Repository: love2d/love Branch: main Commit: 7d41f3ad30f4 Files: 1124 Total size: 37.3 MB Directory structure: gitextract_aaj4kzw1/ ├── .gitattributes ├── .github/ │ └── workflows/ │ └── main.yml ├── .gitignore ├── CMakeLists.txt ├── changes.txt ├── extra/ │ ├── cmake/ │ │ ├── FindHarfbuzz.cmake │ │ ├── FindLuaJIT.cmake │ │ ├── FindModPlug.cmake │ │ ├── FindOgg.cmake │ │ ├── FindSDL2.cmake │ │ ├── FindTheora.cmake │ │ ├── FindVorbis.cmake │ │ ├── LoveMacros.cmake │ │ └── NSIS.template.in │ ├── resources/ │ │ ├── NotoSans-Regular.ttf.gzip │ │ └── b64.lua │ └── windows/ │ └── love.rc ├── license.txt ├── platform/ │ ├── unix/ │ │ ├── debian/ │ │ │ ├── changelog.in │ │ │ ├── compat │ │ │ ├── control.in │ │ │ ├── copyright │ │ │ ├── docs │ │ │ ├── liblove-unstable0.docs │ │ │ ├── liblove-unstable0.install │ │ │ ├── liblove0.docs │ │ │ ├── liblove0.install │ │ │ ├── love-unstable.install │ │ │ ├── love-unstable.manpages │ │ │ ├── love.install │ │ │ ├── love.manpages │ │ │ ├── rules.in │ │ │ └── source/ │ │ │ └── format │ │ ├── love.6 │ │ ├── love.desktop.in │ │ └── love.xml │ └── xcode/ │ ├── Images.xcassets/ │ │ ├── Contents.json │ │ ├── OS X AppIcon.appiconset/ │ │ │ └── Contents.json │ │ └── iOS AppIcon.appiconset/ │ │ └── Contents.json │ ├── ios/ │ │ ├── Launch Screen.xib │ │ ├── love-ios.plist │ │ └── lovedocument.icns │ ├── liblove.xcodeproj/ │ │ ├── project.pbxproj │ │ └── project.xcworkspace/ │ │ └── contents.xcworkspacedata │ ├── love.entitlements │ ├── love.xcodeproj/ │ │ ├── TemplateIcon.icns │ │ ├── default.pbxuser │ │ ├── project.pbxproj │ │ └── project.xcworkspace/ │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata/ │ │ ├── IDEWorkspaceChecks.plist │ │ └── WorkspaceSettings.xcsettings │ └── macosx/ │ ├── liblove-macosx.plist │ ├── love-macosx.plist │ └── macos-copy-app.plist ├── readme-iOS.rtf ├── readme.md ├── src/ │ ├── .editorconfig │ ├── common/ │ │ ├── Color.h │ │ ├── Data.cpp │ │ ├── Data.h │ │ ├── EnumMap.h │ │ ├── Exception.cpp │ │ ├── Exception.h │ │ ├── Matrix.cpp │ │ ├── Matrix.h │ │ ├── Module.cpp │ │ ├── Module.h │ │ ├── Object.cpp │ │ ├── Object.h │ │ ├── Optional.h │ │ ├── Range.h │ │ ├── Reference.cpp │ │ ├── Reference.h │ │ ├── Stream.cpp │ │ ├── Stream.h │ │ ├── StringMap.cpp │ │ ├── StringMap.h │ │ ├── Variant.cpp │ │ ├── Variant.h │ │ ├── Vector.cpp │ │ ├── Vector.h │ │ ├── android.cpp │ │ ├── android.h │ │ ├── apple.h │ │ ├── apple.mm │ │ ├── b64.cpp │ │ ├── b64.h │ │ ├── config.h │ │ ├── delay.cpp │ │ ├── delay.h │ │ ├── deprecation.cpp │ │ ├── deprecation.h │ │ ├── floattypes.cpp │ │ ├── floattypes.h │ │ ├── int.h │ │ ├── ios.h │ │ ├── ios.mm │ │ ├── macos.h │ │ ├── macos.mm │ │ ├── math.h │ │ ├── memory.cpp │ │ ├── memory.h │ │ ├── pixelformat.cpp │ │ ├── pixelformat.h │ │ ├── runtime.cpp │ │ ├── runtime.h │ │ ├── types.cpp │ │ ├── types.h │ │ ├── utf8.cpp │ │ ├── utf8.h │ │ └── version.h │ ├── libraries/ │ │ ├── .editorconfig │ │ ├── Wuff/ │ │ │ ├── wuff.c │ │ │ ├── wuff.h │ │ │ ├── wuff_config.h │ │ │ ├── wuff_convert.c │ │ │ ├── wuff_convert.h │ │ │ ├── wuff_internal.c │ │ │ ├── wuff_internal.h │ │ │ └── wuff_memory.c │ │ ├── box2d/ │ │ │ ├── Box2D.h │ │ │ ├── README.MODIFIED │ │ │ ├── b2_api.h │ │ │ ├── b2_block_allocator.h │ │ │ ├── b2_body.h │ │ │ ├── b2_broad_phase.h │ │ │ ├── b2_chain_shape.h │ │ │ ├── b2_circle_shape.h │ │ │ ├── b2_collision.h │ │ │ ├── b2_common.h │ │ │ ├── b2_contact.h │ │ │ ├── b2_contact_manager.h │ │ │ ├── b2_distance.h │ │ │ ├── b2_distance_joint.h │ │ │ ├── b2_draw.h │ │ │ ├── b2_dynamic_tree.h │ │ │ ├── b2_edge_shape.h │ │ │ ├── b2_fixture.h │ │ │ ├── b2_friction_joint.h │ │ │ ├── b2_gear_joint.h │ │ │ ├── b2_growable_stack.h │ │ │ ├── b2_joint.h │ │ │ ├── b2_math.h │ │ │ ├── b2_motor_joint.h │ │ │ ├── b2_mouse_joint.h │ │ │ ├── b2_polygon_shape.h │ │ │ ├── b2_prismatic_joint.h │ │ │ ├── b2_pulley_joint.h │ │ │ ├── b2_revolute_joint.h │ │ │ ├── b2_rope.h │ │ │ ├── b2_settings.h │ │ │ ├── b2_shape.h │ │ │ ├── b2_stack_allocator.h │ │ │ ├── b2_time_of_impact.h │ │ │ ├── b2_time_step.h │ │ │ ├── b2_timer.h │ │ │ ├── b2_types.h │ │ │ ├── b2_weld_joint.h │ │ │ ├── b2_wheel_joint.h │ │ │ ├── b2_world.h │ │ │ ├── b2_world_callbacks.h │ │ │ ├── collision/ │ │ │ │ ├── b2_broad_phase.cpp │ │ │ │ ├── b2_chain_shape.cpp │ │ │ │ ├── b2_circle_shape.cpp │ │ │ │ ├── b2_collide_circle.cpp │ │ │ │ ├── b2_collide_edge.cpp │ │ │ │ ├── b2_collide_polygon.cpp │ │ │ │ ├── b2_collision.cpp │ │ │ │ ├── b2_distance.cpp │ │ │ │ ├── b2_dynamic_tree.cpp │ │ │ │ ├── b2_edge_shape.cpp │ │ │ │ ├── b2_polygon_shape.cpp │ │ │ │ └── b2_time_of_impact.cpp │ │ │ ├── common/ │ │ │ │ ├── b2_block_allocator.cpp │ │ │ │ ├── b2_draw.cpp │ │ │ │ ├── b2_math.cpp │ │ │ │ ├── b2_settings.cpp │ │ │ │ ├── b2_stack_allocator.cpp │ │ │ │ └── b2_timer.cpp │ │ │ ├── dynamics/ │ │ │ │ ├── b2_body.cpp │ │ │ │ ├── b2_chain_circle_contact.cpp │ │ │ │ ├── b2_chain_circle_contact.h │ │ │ │ ├── b2_chain_polygon_contact.cpp │ │ │ │ ├── b2_chain_polygon_contact.h │ │ │ │ ├── b2_circle_contact.cpp │ │ │ │ ├── b2_circle_contact.h │ │ │ │ ├── b2_contact.cpp │ │ │ │ ├── b2_contact_manager.cpp │ │ │ │ ├── b2_contact_solver.cpp │ │ │ │ ├── b2_contact_solver.h │ │ │ │ ├── b2_distance_joint.cpp │ │ │ │ ├── b2_edge_circle_contact.cpp │ │ │ │ ├── b2_edge_circle_contact.h │ │ │ │ ├── b2_edge_polygon_contact.cpp │ │ │ │ ├── b2_edge_polygon_contact.h │ │ │ │ ├── b2_fixture.cpp │ │ │ │ ├── b2_friction_joint.cpp │ │ │ │ ├── b2_gear_joint.cpp │ │ │ │ ├── b2_island.cpp │ │ │ │ ├── b2_island.h │ │ │ │ ├── b2_joint.cpp │ │ │ │ ├── b2_motor_joint.cpp │ │ │ │ ├── b2_mouse_joint.cpp │ │ │ │ ├── b2_polygon_circle_contact.cpp │ │ │ │ ├── b2_polygon_circle_contact.h │ │ │ │ ├── b2_polygon_contact.cpp │ │ │ │ ├── b2_polygon_contact.h │ │ │ │ ├── b2_prismatic_joint.cpp │ │ │ │ ├── b2_pulley_joint.cpp │ │ │ │ ├── b2_revolute_joint.cpp │ │ │ │ ├── b2_weld_joint.cpp │ │ │ │ ├── b2_wheel_joint.cpp │ │ │ │ ├── b2_world.cpp │ │ │ │ └── b2_world_callbacks.cpp │ │ │ └── rope/ │ │ │ └── b2_rope.cpp │ │ ├── ddsparse/ │ │ │ ├── ddsinfo.h │ │ │ ├── ddsparse.cpp │ │ │ └── ddsparse.h │ │ ├── dr/ │ │ │ ├── dr_flac.h │ │ │ └── dr_mp3.h │ │ ├── enet/ │ │ │ ├── enet.cpp │ │ │ ├── libenet/ │ │ │ │ ├── ChangeLog │ │ │ │ ├── LICENSE │ │ │ │ ├── README │ │ │ │ ├── callbacks.c │ │ │ │ ├── compress.c │ │ │ │ ├── host.c │ │ │ │ ├── include/ │ │ │ │ │ └── enet/ │ │ │ │ │ ├── callbacks.h │ │ │ │ │ ├── enet.h │ │ │ │ │ ├── list.h │ │ │ │ │ ├── protocol.h │ │ │ │ │ ├── time.h │ │ │ │ │ ├── types.h │ │ │ │ │ ├── unix.h │ │ │ │ │ ├── utility.h │ │ │ │ │ └── win32.h │ │ │ │ ├── list.c │ │ │ │ ├── packet.c │ │ │ │ ├── peer.c │ │ │ │ ├── protocol.c │ │ │ │ ├── unix.c │ │ │ │ └── win32.c │ │ │ └── lua-enet.h │ │ ├── glad/ │ │ │ ├── glad.cpp │ │ │ ├── glad.hpp │ │ │ └── gladfuncs.hpp │ │ ├── glslang/ │ │ │ ├── SPIRV/ │ │ │ │ ├── GLSL.ext.AMD.h │ │ │ │ ├── GLSL.ext.ARM.h │ │ │ │ ├── GLSL.ext.EXT.h │ │ │ │ ├── GLSL.ext.KHR.h │ │ │ │ ├── GLSL.ext.NV.h │ │ │ │ ├── GLSL.ext.QCOM.h │ │ │ │ ├── GLSL.std.450.h │ │ │ │ ├── GlslangToSpv.cpp │ │ │ │ ├── GlslangToSpv.h │ │ │ │ ├── InReadableOrder.cpp │ │ │ │ ├── Logger.cpp │ │ │ │ ├── Logger.h │ │ │ │ ├── NonSemanticDebugPrintf.h │ │ │ │ ├── NonSemanticShaderDebugInfo100.h │ │ │ │ ├── SPVRemapper.cpp │ │ │ │ ├── SPVRemapper.h │ │ │ │ ├── SpvBuilder.cpp │ │ │ │ ├── SpvBuilder.h │ │ │ │ ├── SpvPostProcess.cpp │ │ │ │ ├── SpvTools.cpp │ │ │ │ ├── SpvTools.h │ │ │ │ ├── bitutils.h │ │ │ │ ├── disassemble.cpp │ │ │ │ ├── disassemble.h │ │ │ │ ├── doc.cpp │ │ │ │ ├── doc.h │ │ │ │ ├── hex_float.h │ │ │ │ ├── spirv.hpp11 │ │ │ │ ├── spvIR.h │ │ │ │ └── spvUtil.h │ │ │ └── glslang/ │ │ │ ├── ExtensionHeaders/ │ │ │ │ └── GL_EXT_shader_realtime_clock.glsl │ │ │ ├── GenericCodeGen/ │ │ │ │ ├── CodeGen.cpp │ │ │ │ └── Link.cpp │ │ │ ├── Include/ │ │ │ │ ├── BaseTypes.h │ │ │ │ ├── Common.h │ │ │ │ ├── ConstantUnion.h │ │ │ │ ├── InfoSink.h │ │ │ │ ├── InitializeGlobals.h │ │ │ │ ├── PoolAlloc.h │ │ │ │ ├── ResourceLimits.h │ │ │ │ ├── ShHandle.h │ │ │ │ ├── SpirvIntrinsics.h │ │ │ │ ├── Types.h │ │ │ │ ├── arrays.h │ │ │ │ ├── intermediate.h │ │ │ │ └── visibility.h │ │ │ ├── MachineIndependent/ │ │ │ │ ├── Constant.cpp │ │ │ │ ├── InfoSink.cpp │ │ │ │ ├── Initialize.cpp │ │ │ │ ├── Initialize.h │ │ │ │ ├── IntermTraverse.cpp │ │ │ │ ├── Intermediate.cpp │ │ │ │ ├── LiveTraverser.h │ │ │ │ ├── ParseContextBase.cpp │ │ │ │ ├── ParseHelper.cpp │ │ │ │ ├── ParseHelper.h │ │ │ │ ├── PoolAlloc.cpp │ │ │ │ ├── RemoveTree.cpp │ │ │ │ ├── RemoveTree.h │ │ │ │ ├── Scan.cpp │ │ │ │ ├── Scan.h │ │ │ │ ├── ScanContext.h │ │ │ │ ├── ShaderLang.cpp │ │ │ │ ├── SpirvIntrinsics.cpp │ │ │ │ ├── SymbolTable.cpp │ │ │ │ ├── SymbolTable.h │ │ │ │ ├── Versions.cpp │ │ │ │ ├── Versions.h │ │ │ │ ├── attribute.cpp │ │ │ │ ├── attribute.h │ │ │ │ ├── gl_types.h │ │ │ │ ├── glslang_tab.cpp │ │ │ │ ├── glslang_tab.cpp.h │ │ │ │ ├── intermOut.cpp │ │ │ │ ├── iomapper.cpp │ │ │ │ ├── iomapper.h │ │ │ │ ├── limits.cpp │ │ │ │ ├── linkValidate.cpp │ │ │ │ ├── localintermediate.h │ │ │ │ ├── parseConst.cpp │ │ │ │ ├── parseVersions.h │ │ │ │ ├── pch.h │ │ │ │ ├── preprocessor/ │ │ │ │ │ ├── Pp.cpp │ │ │ │ │ ├── PpAtom.cpp │ │ │ │ │ ├── PpContext.cpp │ │ │ │ │ ├── PpContext.h │ │ │ │ │ ├── PpScanner.cpp │ │ │ │ │ ├── PpTokens.cpp │ │ │ │ │ └── PpTokens.h │ │ │ │ ├── propagateNoContraction.cpp │ │ │ │ ├── propagateNoContraction.h │ │ │ │ ├── reflection.cpp │ │ │ │ ├── reflection.h │ │ │ │ └── span.h │ │ │ ├── OSDependent/ │ │ │ │ ├── Unix/ │ │ │ │ │ └── ossource.cpp │ │ │ │ ├── Web/ │ │ │ │ │ ├── glslang.after.js │ │ │ │ │ ├── glslang.js.cpp │ │ │ │ │ └── glslang.pre.js │ │ │ │ ├── Windows/ │ │ │ │ │ └── ossource.cpp │ │ │ │ └── osinclude.h │ │ │ ├── Public/ │ │ │ │ ├── ResourceLimits.h │ │ │ │ └── ShaderLang.h │ │ │ ├── ResourceLimits/ │ │ │ │ └── ResourceLimits.cpp │ │ │ └── build_info.h │ │ ├── lodepng/ │ │ │ ├── lodepng.cpp │ │ │ └── lodepng.h │ │ ├── lua53/ │ │ │ ├── lprefix.h │ │ │ ├── lstrlib.c │ │ │ ├── lstrlib.h │ │ │ ├── lutf8lib.c │ │ │ └── lutf8lib.h │ │ ├── luahttps/ │ │ │ ├── Android.mk │ │ │ ├── java.txt │ │ │ ├── license.txt │ │ │ └── src/ │ │ │ ├── android/ │ │ │ │ ├── AndroidClient.cpp │ │ │ │ ├── AndroidClient.h │ │ │ │ └── java/ │ │ │ │ └── org/ │ │ │ │ └── love2d/ │ │ │ │ └── luahttps/ │ │ │ │ └── LuaHTTPS.java │ │ │ ├── apple/ │ │ │ │ ├── NSURLClient.h │ │ │ │ └── NSURLClient.mm │ │ │ ├── common/ │ │ │ │ ├── Connection.h │ │ │ │ ├── ConnectionClient.h │ │ │ │ ├── HTTPRequest.cpp │ │ │ │ ├── HTTPRequest.h │ │ │ │ ├── HTTPS.cpp │ │ │ │ ├── HTTPS.h │ │ │ │ ├── HTTPSClient.cpp │ │ │ │ ├── HTTPSClient.h │ │ │ │ ├── LibraryLoader.h │ │ │ │ ├── PlaintextConnection.cpp │ │ │ │ ├── PlaintextConnection.h │ │ │ │ └── config.h │ │ │ ├── generic/ │ │ │ │ ├── CurlClient.cpp │ │ │ │ ├── CurlClient.h │ │ │ │ ├── LinktimeLibraryLoader.cpp │ │ │ │ ├── OpenSSLConnection.cpp │ │ │ │ ├── OpenSSLConnection.h │ │ │ │ └── UnixLibraryLoader.cpp │ │ │ ├── lua/ │ │ │ │ └── main.cpp │ │ │ └── windows/ │ │ │ ├── SChannelConnection.cpp │ │ │ ├── SChannelConnection.h │ │ │ ├── WinINetClient.cpp │ │ │ ├── WinINetClient.h │ │ │ └── WindowsLibraryLoader.cpp │ │ ├── luasocket/ │ │ │ ├── libluasocket/ │ │ │ │ ├── auxiliar.c │ │ │ │ ├── auxiliar.h │ │ │ │ ├── buffer.c │ │ │ │ ├── buffer.h │ │ │ │ ├── compat.c │ │ │ │ ├── compat.h │ │ │ │ ├── except.c │ │ │ │ ├── except.h │ │ │ │ ├── ftp.lua │ │ │ │ ├── ftp.lua.h │ │ │ │ ├── headers.lua │ │ │ │ ├── headers.lua.h │ │ │ │ ├── http.lua │ │ │ │ ├── http.lua.h │ │ │ │ ├── inet.c │ │ │ │ ├── inet.h │ │ │ │ ├── io.c │ │ │ │ ├── io.h │ │ │ │ ├── ltn12.lua │ │ │ │ ├── ltn12.lua.h │ │ │ │ ├── luasocket.c │ │ │ │ ├── luasocket.h │ │ │ │ ├── makefile │ │ │ │ ├── mbox.lua │ │ │ │ ├── mbox.lua.h │ │ │ │ ├── mime.c │ │ │ │ ├── mime.h │ │ │ │ ├── mime.lua │ │ │ │ ├── mime.lua.h │ │ │ │ ├── options.c │ │ │ │ ├── options.h │ │ │ │ ├── pierror.h │ │ │ │ ├── select.c │ │ │ │ ├── select.h │ │ │ │ ├── serial.c │ │ │ │ ├── smtp.lua │ │ │ │ ├── smtp.lua.h │ │ │ │ ├── socket.h │ │ │ │ ├── socket.lua │ │ │ │ ├── socket.lua.h │ │ │ │ ├── tcp.c │ │ │ │ ├── tcp.h │ │ │ │ ├── timeout.c │ │ │ │ ├── timeout.h │ │ │ │ ├── tp.lua │ │ │ │ ├── tp.lua.h │ │ │ │ ├── udp.c │ │ │ │ ├── udp.h │ │ │ │ ├── unix.c │ │ │ │ ├── unix.h │ │ │ │ ├── unixdgram.c │ │ │ │ ├── unixdgram.h │ │ │ │ ├── unixstream.c │ │ │ │ ├── unixstream.h │ │ │ │ ├── url.lua │ │ │ │ ├── url.lua.h │ │ │ │ ├── usocket.c │ │ │ │ ├── usocket.h │ │ │ │ ├── wsocket.c │ │ │ │ └── wsocket.h │ │ │ ├── luasocket.cpp │ │ │ └── luasocket.h │ │ ├── lz4/ │ │ │ ├── lz4.c │ │ │ ├── lz4.h │ │ │ ├── lz4hc.c │ │ │ ├── lz4hc.h │ │ │ └── lz4opt.h │ │ ├── noise1234/ │ │ │ ├── noise1234.cpp │ │ │ ├── noise1234.h │ │ │ ├── simplexnoise1234.cpp │ │ │ └── simplexnoise1234.h │ │ ├── physfs/ │ │ │ ├── physfs.c │ │ │ ├── physfs.h │ │ │ ├── physfs_archiver_7z.c │ │ │ ├── physfs_archiver_dir.c │ │ │ ├── physfs_archiver_grp.c │ │ │ ├── physfs_archiver_hog.c │ │ │ ├── physfs_archiver_iso9660.c │ │ │ ├── physfs_archiver_mvl.c │ │ │ ├── physfs_archiver_qpak.c │ │ │ ├── physfs_archiver_slb.c │ │ │ ├── physfs_archiver_unpacked.c │ │ │ ├── physfs_archiver_vdf.c │ │ │ ├── physfs_archiver_wad.c │ │ │ ├── physfs_archiver_zip.c │ │ │ ├── physfs_byteorder.c │ │ │ ├── physfs_casefolding.h │ │ │ ├── physfs_internal.h │ │ │ ├── physfs_lzmasdk.h │ │ │ ├── physfs_miniz.h │ │ │ ├── physfs_platform_android.c │ │ │ ├── physfs_platform_apple.m │ │ │ ├── physfs_platform_haiku.cpp │ │ │ ├── physfs_platform_os2.c │ │ │ ├── physfs_platform_posix.c │ │ │ ├── physfs_platform_qnx.c │ │ │ ├── physfs_platform_unix.c │ │ │ ├── physfs_platform_windows.c │ │ │ ├── physfs_platform_winrt.cpp │ │ │ ├── physfs_platforms.h │ │ │ └── physfs_unicode.c │ │ ├── spirv_cross/ │ │ │ ├── GLSL.std.450.h │ │ │ ├── include/ │ │ │ │ └── spirv_cross/ │ │ │ │ ├── barrier.hpp │ │ │ │ ├── external_interface.h │ │ │ │ ├── image.hpp │ │ │ │ ├── internal_interface.hpp │ │ │ │ ├── sampler.hpp │ │ │ │ └── thread_group.hpp │ │ │ ├── spirv.hpp │ │ │ ├── spirv_cfg.cpp │ │ │ ├── spirv_cfg.hpp │ │ │ ├── spirv_common.hpp │ │ │ ├── spirv_cpp.cpp │ │ │ ├── spirv_cpp.hpp │ │ │ ├── spirv_cross.cpp │ │ │ ├── spirv_cross.hpp │ │ │ ├── spirv_cross_containers.hpp │ │ │ ├── spirv_cross_error_handling.hpp │ │ │ ├── spirv_cross_parsed_ir.cpp │ │ │ ├── spirv_cross_parsed_ir.hpp │ │ │ ├── spirv_cross_util.cpp │ │ │ ├── spirv_cross_util.hpp │ │ │ ├── spirv_glsl.cpp │ │ │ ├── spirv_glsl.hpp │ │ │ ├── spirv_hlsl.cpp │ │ │ ├── spirv_hlsl.hpp │ │ │ ├── spirv_msl.cpp │ │ │ ├── spirv_msl.hpp │ │ │ ├── spirv_parser.cpp │ │ │ ├── spirv_parser.hpp │ │ │ ├── spirv_reflect.cpp │ │ │ └── spirv_reflect.hpp │ │ ├── stb/ │ │ │ └── stb_image.h │ │ ├── tinyexr/ │ │ │ └── tinyexr.h │ │ ├── utf8/ │ │ │ ├── utf8/ │ │ │ │ ├── checked.h │ │ │ │ ├── core.h │ │ │ │ └── unchecked.h │ │ │ └── utf8.h │ │ ├── vk_video/ │ │ │ ├── vulkan_video_codec_av1std.h │ │ │ ├── vulkan_video_codec_av1std_decode.h │ │ │ ├── vulkan_video_codec_av1std_encode.h │ │ │ ├── vulkan_video_codec_h264std.h │ │ │ ├── vulkan_video_codec_h264std_decode.h │ │ │ ├── vulkan_video_codec_h264std_encode.h │ │ │ ├── vulkan_video_codec_h265std.h │ │ │ ├── vulkan_video_codec_h265std_decode.h │ │ │ ├── vulkan_video_codec_h265std_encode.h │ │ │ └── vulkan_video_codecs_common.h │ │ ├── vma/ │ │ │ └── vk_mem_alloc.h │ │ ├── volk/ │ │ │ ├── volk.c │ │ │ └── volk.h │ │ ├── vulkanheaders/ │ │ │ ├── vk_icd.h │ │ │ ├── vk_layer.h │ │ │ ├── vk_platform.h │ │ │ ├── vulkan.h │ │ │ ├── vulkan.hpp │ │ │ ├── vulkan_android.h │ │ │ ├── vulkan_beta.h │ │ │ ├── vulkan_core.h │ │ │ ├── vulkan_directfb.h │ │ │ ├── vulkan_enums.hpp │ │ │ ├── vulkan_extension_inspection.hpp │ │ │ ├── vulkan_format_traits.hpp │ │ │ ├── vulkan_fuchsia.h │ │ │ ├── vulkan_funcs.hpp │ │ │ ├── vulkan_ggp.h │ │ │ ├── vulkan_handles.hpp │ │ │ ├── vulkan_hash.hpp │ │ │ ├── vulkan_hpp_macros.hpp │ │ │ ├── vulkan_ios.h │ │ │ ├── vulkan_macos.h │ │ │ ├── vulkan_metal.h │ │ │ ├── vulkan_raii.hpp │ │ │ ├── vulkan_screen.h │ │ │ ├── vulkan_shared.hpp │ │ │ ├── vulkan_static_assertions.hpp │ │ │ ├── vulkan_structs.hpp │ │ │ ├── vulkan_to_string.hpp │ │ │ ├── vulkan_vi.h │ │ │ ├── vulkan_video.hpp │ │ │ ├── vulkan_wayland.h │ │ │ ├── vulkan_win32.h │ │ │ ├── vulkan_xcb.h │ │ │ ├── vulkan_xlib.h │ │ │ └── vulkan_xlib_xrandr.h │ │ └── xxHash/ │ │ ├── xxhash.c │ │ └── xxhash.h │ ├── love.cpp │ ├── modules/ │ │ ├── audio/ │ │ │ ├── Audio.cpp │ │ │ ├── Audio.h │ │ │ ├── Effect.cpp │ │ │ ├── Effect.h │ │ │ ├── Filter.cpp │ │ │ ├── Filter.h │ │ │ ├── RecordingDevice.cpp │ │ │ ├── RecordingDevice.h │ │ │ ├── Source.cpp │ │ │ ├── Source.h │ │ │ ├── null/ │ │ │ │ ├── Audio.cpp │ │ │ │ ├── Audio.h │ │ │ │ ├── RecordingDevice.cpp │ │ │ │ ├── RecordingDevice.h │ │ │ │ ├── Source.cpp │ │ │ │ └── Source.h │ │ │ ├── openal/ │ │ │ │ ├── Audio.cpp │ │ │ │ ├── Audio.h │ │ │ │ ├── Effect.cpp │ │ │ │ ├── Effect.h │ │ │ │ ├── Filter.cpp │ │ │ │ ├── Filter.h │ │ │ │ ├── Pool.cpp │ │ │ │ ├── Pool.h │ │ │ │ ├── RecordingDevice.cpp │ │ │ │ ├── RecordingDevice.h │ │ │ │ ├── Source.cpp │ │ │ │ └── Source.h │ │ │ ├── wrap_Audio.cpp │ │ │ ├── wrap_Audio.h │ │ │ ├── wrap_RecordingDevice.cpp │ │ │ ├── wrap_RecordingDevice.h │ │ │ ├── wrap_Source.cpp │ │ │ └── wrap_Source.h │ │ ├── data/ │ │ │ ├── ByteData.cpp │ │ │ ├── ByteData.h │ │ │ ├── CompressedData.cpp │ │ │ ├── CompressedData.h │ │ │ ├── Compressor.cpp │ │ │ ├── Compressor.h │ │ │ ├── DataModule.cpp │ │ │ ├── DataModule.h │ │ │ ├── DataStream.cpp │ │ │ ├── DataStream.h │ │ │ ├── DataView.cpp │ │ │ ├── DataView.h │ │ │ ├── HashFunction.cpp │ │ │ ├── HashFunction.h │ │ │ ├── wrap_ByteData.cpp │ │ │ ├── wrap_ByteData.h │ │ │ ├── wrap_CompressedData.cpp │ │ │ ├── wrap_CompressedData.h │ │ │ ├── wrap_Data.cpp │ │ │ ├── wrap_Data.h │ │ │ ├── wrap_Data.lua │ │ │ ├── wrap_DataModule.cpp │ │ │ ├── wrap_DataModule.h │ │ │ ├── wrap_DataView.cpp │ │ │ └── wrap_DataView.h │ │ ├── event/ │ │ │ ├── Event.cpp │ │ │ ├── Event.h │ │ │ ├── sdl/ │ │ │ │ ├── Event.cpp │ │ │ │ └── Event.h │ │ │ ├── wrap_Event.cpp │ │ │ ├── wrap_Event.h │ │ │ └── wrap_Event.lua │ │ ├── filesystem/ │ │ │ ├── File.cpp │ │ │ ├── File.h │ │ │ ├── FileData.cpp │ │ │ ├── FileData.h │ │ │ ├── Filesystem.cpp │ │ │ ├── Filesystem.h │ │ │ ├── NativeFile.cpp │ │ │ ├── NativeFile.h │ │ │ ├── physfs/ │ │ │ │ ├── File.cpp │ │ │ │ ├── File.h │ │ │ │ ├── Filesystem.cpp │ │ │ │ ├── Filesystem.h │ │ │ │ ├── PhysfsIo.cpp │ │ │ │ └── PhysfsIo.h │ │ │ ├── wrap_File.cpp │ │ │ ├── wrap_File.h │ │ │ ├── wrap_FileData.cpp │ │ │ ├── wrap_FileData.h │ │ │ ├── wrap_Filesystem.cpp │ │ │ ├── wrap_Filesystem.h │ │ │ ├── wrap_NativeFile.cpp │ │ │ └── wrap_NativeFile.h │ │ ├── font/ │ │ │ ├── BMFontRasterizer.cpp │ │ │ ├── BMFontRasterizer.h │ │ │ ├── Font.cpp │ │ │ ├── Font.h │ │ │ ├── GenericShaper.cpp │ │ │ ├── GenericShaper.h │ │ │ ├── GlyphData.cpp │ │ │ ├── GlyphData.h │ │ │ ├── ImageRasterizer.cpp │ │ │ ├── ImageRasterizer.h │ │ │ ├── NotoSans-Regular.ttf.gzip.h │ │ │ ├── Rasterizer.cpp │ │ │ ├── Rasterizer.h │ │ │ ├── TextShaper.cpp │ │ │ ├── TextShaper.h │ │ │ ├── TrueTypeRasterizer.cpp │ │ │ ├── TrueTypeRasterizer.h │ │ │ ├── freetype/ │ │ │ │ ├── Font.cpp │ │ │ │ ├── Font.h │ │ │ │ ├── HarfbuzzShaper.cpp │ │ │ │ ├── HarfbuzzShaper.h │ │ │ │ ├── TrueTypeRasterizer.cpp │ │ │ │ └── TrueTypeRasterizer.h │ │ │ ├── wrap_Font.cpp │ │ │ ├── wrap_Font.h │ │ │ ├── wrap_GlyphData.cpp │ │ │ ├── wrap_GlyphData.h │ │ │ ├── wrap_Rasterizer.cpp │ │ │ └── wrap_Rasterizer.h │ │ ├── graphics/ │ │ │ ├── Buffer.cpp │ │ │ ├── Buffer.h │ │ │ ├── Deprecations.cpp │ │ │ ├── Deprecations.h │ │ │ ├── Drawable.cpp │ │ │ ├── Drawable.h │ │ │ ├── Font.cpp │ │ │ ├── Font.h │ │ │ ├── Graphics.cpp │ │ │ ├── Graphics.h │ │ │ ├── GraphicsReadback.cpp │ │ │ ├── GraphicsReadback.h │ │ │ ├── Mesh.cpp │ │ │ ├── Mesh.h │ │ │ ├── ParticleSystem.cpp │ │ │ ├── ParticleSystem.h │ │ │ ├── Polyline.cpp │ │ │ ├── Polyline.h │ │ │ ├── Quad.cpp │ │ │ ├── Quad.h │ │ │ ├── Resource.h │ │ │ ├── Shader.cpp │ │ │ ├── Shader.h │ │ │ ├── ShaderStage.cpp │ │ │ ├── ShaderStage.h │ │ │ ├── SpriteBatch.cpp │ │ │ ├── SpriteBatch.h │ │ │ ├── StreamBuffer.cpp │ │ │ ├── StreamBuffer.h │ │ │ ├── TextBatch.cpp │ │ │ ├── TextBatch.h │ │ │ ├── Texture.cpp │ │ │ ├── Texture.h │ │ │ ├── Video.cpp │ │ │ ├── Video.h │ │ │ ├── Volatile.cpp │ │ │ ├── Volatile.h │ │ │ ├── metal/ │ │ │ │ ├── Buffer.h │ │ │ │ ├── Buffer.mm │ │ │ │ ├── Graphics.h │ │ │ │ ├── Graphics.mm │ │ │ │ ├── GraphicsReadback.h │ │ │ │ ├── GraphicsReadback.mm │ │ │ │ ├── Metal.h │ │ │ │ ├── Metal.mm │ │ │ │ ├── Shader.h │ │ │ │ ├── Shader.mm │ │ │ │ ├── ShaderStage.h │ │ │ │ ├── ShaderStage.mm │ │ │ │ ├── StreamBuffer.h │ │ │ │ ├── StreamBuffer.mm │ │ │ │ ├── Texture.h │ │ │ │ └── Texture.mm │ │ │ ├── opengl/ │ │ │ │ ├── Buffer.cpp │ │ │ │ ├── Buffer.h │ │ │ │ ├── FenceSync.cpp │ │ │ │ ├── FenceSync.h │ │ │ │ ├── Graphics.cpp │ │ │ │ ├── Graphics.h │ │ │ │ ├── GraphicsReadback.cpp │ │ │ │ ├── GraphicsReadback.h │ │ │ │ ├── OpenGL.cpp │ │ │ │ ├── OpenGL.h │ │ │ │ ├── Shader.cpp │ │ │ │ ├── Shader.h │ │ │ │ ├── ShaderStage.cpp │ │ │ │ ├── ShaderStage.h │ │ │ │ ├── StreamBuffer.cpp │ │ │ │ ├── StreamBuffer.h │ │ │ │ ├── Texture.cpp │ │ │ │ └── Texture.h │ │ │ ├── renderstate.cpp │ │ │ ├── renderstate.h │ │ │ ├── vertex.cpp │ │ │ ├── vertex.h │ │ │ ├── vulkan/ │ │ │ │ ├── Buffer.cpp │ │ │ │ ├── Buffer.h │ │ │ │ ├── Graphics.cpp │ │ │ │ ├── Graphics.h │ │ │ │ ├── GraphicsReadback.cpp │ │ │ │ ├── GraphicsReadback.h │ │ │ │ ├── Shader.cpp │ │ │ │ ├── Shader.h │ │ │ │ ├── ShaderStage.cpp │ │ │ │ ├── ShaderStage.h │ │ │ │ ├── StreamBuffer.cpp │ │ │ │ ├── StreamBuffer.h │ │ │ │ ├── Texture.cpp │ │ │ │ ├── Texture.h │ │ │ │ ├── Vulkan.cpp │ │ │ │ ├── Vulkan.h │ │ │ │ └── VulkanWrapper.h │ │ │ ├── wrap_Buffer.cpp │ │ │ ├── wrap_Buffer.h │ │ │ ├── wrap_Font.cpp │ │ │ ├── wrap_Font.h │ │ │ ├── wrap_Graphics.cpp │ │ │ ├── wrap_Graphics.h │ │ │ ├── wrap_Graphics.lua │ │ │ ├── wrap_GraphicsReadback.cpp │ │ │ ├── wrap_GraphicsReadback.h │ │ │ ├── wrap_Mesh.cpp │ │ │ ├── wrap_Mesh.h │ │ │ ├── wrap_ParticleSystem.cpp │ │ │ ├── wrap_ParticleSystem.h │ │ │ ├── wrap_Quad.cpp │ │ │ ├── wrap_Quad.h │ │ │ ├── wrap_Shader.cpp │ │ │ ├── wrap_Shader.h │ │ │ ├── wrap_SpriteBatch.cpp │ │ │ ├── wrap_SpriteBatch.h │ │ │ ├── wrap_TextBatch.cpp │ │ │ ├── wrap_TextBatch.h │ │ │ ├── wrap_Texture.cpp │ │ │ ├── wrap_Texture.h │ │ │ ├── wrap_Video.cpp │ │ │ ├── wrap_Video.h │ │ │ └── wrap_Video.lua │ │ ├── image/ │ │ │ ├── CompressedImageData.cpp │ │ │ ├── CompressedImageData.h │ │ │ ├── CompressedSlice.cpp │ │ │ ├── CompressedSlice.h │ │ │ ├── FormatHandler.cpp │ │ │ ├── FormatHandler.h │ │ │ ├── Image.cpp │ │ │ ├── Image.h │ │ │ ├── ImageData.cpp │ │ │ ├── ImageData.h │ │ │ ├── ImageDataBase.cpp │ │ │ ├── ImageDataBase.h │ │ │ ├── magpie/ │ │ │ │ ├── ASTCHandler.cpp │ │ │ │ ├── ASTCHandler.h │ │ │ │ ├── EXRHandler.cpp │ │ │ │ ├── EXRHandler.h │ │ │ │ ├── KTXHandler.cpp │ │ │ │ ├── KTXHandler.h │ │ │ │ ├── PKMHandler.cpp │ │ │ │ ├── PKMHandler.h │ │ │ │ ├── PNGHandler.cpp │ │ │ │ ├── PNGHandler.h │ │ │ │ ├── PVRHandler.cpp │ │ │ │ ├── PVRHandler.h │ │ │ │ ├── STBHandler.cpp │ │ │ │ ├── STBHandler.h │ │ │ │ ├── ddsHandler.cpp │ │ │ │ └── ddsHandler.h │ │ │ ├── wrap_CompressedImageData.cpp │ │ │ ├── wrap_CompressedImageData.h │ │ │ ├── wrap_Image.cpp │ │ │ ├── wrap_Image.h │ │ │ ├── wrap_ImageData.cpp │ │ │ ├── wrap_ImageData.h │ │ │ └── wrap_ImageData.lua │ │ ├── joystick/ │ │ │ ├── Joystick.cpp │ │ │ ├── Joystick.h │ │ │ ├── JoystickModule.h │ │ │ ├── sdl/ │ │ │ │ ├── Joystick.cpp │ │ │ │ ├── Joystick.h │ │ │ │ ├── JoystickModule.cpp │ │ │ │ └── JoystickModule.h │ │ │ ├── wrap_Joystick.cpp │ │ │ ├── wrap_Joystick.h │ │ │ ├── wrap_JoystickModule.cpp │ │ │ └── wrap_JoystickModule.h │ │ ├── keyboard/ │ │ │ ├── Keyboard.cpp │ │ │ ├── Keyboard.h │ │ │ ├── sdl/ │ │ │ │ ├── Keyboard.cpp │ │ │ │ └── Keyboard.h │ │ │ ├── wrap_Keyboard.cpp │ │ │ └── wrap_Keyboard.h │ │ ├── love/ │ │ │ ├── arg.lua │ │ │ ├── boot.lua │ │ │ ├── callbacks.lua │ │ │ ├── jitsetup.lua │ │ │ ├── love.cpp │ │ │ └── love.h │ │ ├── math/ │ │ │ ├── BezierCurve.cpp │ │ │ ├── BezierCurve.h │ │ │ ├── MathModule.cpp │ │ │ ├── MathModule.h │ │ │ ├── RandomGenerator.cpp │ │ │ ├── RandomGenerator.h │ │ │ ├── Transform.cpp │ │ │ ├── Transform.h │ │ │ ├── wrap_BezierCurve.cpp │ │ │ ├── wrap_BezierCurve.h │ │ │ ├── wrap_Math.cpp │ │ │ ├── wrap_Math.h │ │ │ ├── wrap_Math.lua │ │ │ ├── wrap_RandomGenerator.cpp │ │ │ ├── wrap_RandomGenerator.h │ │ │ ├── wrap_RandomGenerator.lua │ │ │ ├── wrap_Transform.cpp │ │ │ └── wrap_Transform.h │ │ ├── mouse/ │ │ │ ├── Cursor.cpp │ │ │ ├── Cursor.h │ │ │ ├── Mouse.h │ │ │ ├── sdl/ │ │ │ │ ├── Cursor.cpp │ │ │ │ ├── Cursor.h │ │ │ │ ├── Mouse.cpp │ │ │ │ └── Mouse.h │ │ │ ├── wrap_Cursor.cpp │ │ │ ├── wrap_Cursor.h │ │ │ ├── wrap_Mouse.cpp │ │ │ └── wrap_Mouse.h │ │ ├── physics/ │ │ │ ├── Body.cpp │ │ │ ├── Body.h │ │ │ ├── Joint.cpp │ │ │ ├── Joint.h │ │ │ ├── Shape.cpp │ │ │ ├── Shape.h │ │ │ └── box2d/ │ │ │ ├── Body.cpp │ │ │ ├── Body.h │ │ │ ├── ChainShape.cpp │ │ │ ├── ChainShape.h │ │ │ ├── CircleShape.cpp │ │ │ ├── CircleShape.h │ │ │ ├── Contact.cpp │ │ │ ├── Contact.h │ │ │ ├── DistanceJoint.cpp │ │ │ ├── DistanceJoint.h │ │ │ ├── EdgeShape.cpp │ │ │ ├── EdgeShape.h │ │ │ ├── FrictionJoint.cpp │ │ │ ├── FrictionJoint.h │ │ │ ├── GearJoint.cpp │ │ │ ├── GearJoint.h │ │ │ ├── Joint.cpp │ │ │ ├── Joint.h │ │ │ ├── MotorJoint.cpp │ │ │ ├── MotorJoint.h │ │ │ ├── MouseJoint.cpp │ │ │ ├── MouseJoint.h │ │ │ ├── Physics.cpp │ │ │ ├── Physics.h │ │ │ ├── PolygonShape.cpp │ │ │ ├── PolygonShape.h │ │ │ ├── PrismaticJoint.cpp │ │ │ ├── PrismaticJoint.h │ │ │ ├── PulleyJoint.cpp │ │ │ ├── PulleyJoint.h │ │ │ ├── RevoluteJoint.cpp │ │ │ ├── RevoluteJoint.h │ │ │ ├── RopeJoint.cpp │ │ │ ├── RopeJoint.h │ │ │ ├── Shape.cpp │ │ │ ├── Shape.h │ │ │ ├── WeldJoint.cpp │ │ │ ├── WeldJoint.h │ │ │ ├── WheelJoint.cpp │ │ │ ├── WheelJoint.h │ │ │ ├── World.cpp │ │ │ ├── World.h │ │ │ ├── wrap_Body.cpp │ │ │ ├── wrap_Body.h │ │ │ ├── wrap_ChainShape.cpp │ │ │ ├── wrap_ChainShape.h │ │ │ ├── wrap_CircleShape.cpp │ │ │ ├── wrap_CircleShape.h │ │ │ ├── wrap_Contact.cpp │ │ │ ├── wrap_Contact.h │ │ │ ├── wrap_DistanceJoint.cpp │ │ │ ├── wrap_DistanceJoint.h │ │ │ ├── wrap_EdgeShape.cpp │ │ │ ├── wrap_EdgeShape.h │ │ │ ├── wrap_FrictionJoint.cpp │ │ │ ├── wrap_FrictionJoint.h │ │ │ ├── wrap_GearJoint.cpp │ │ │ ├── wrap_GearJoint.h │ │ │ ├── wrap_Joint.cpp │ │ │ ├── wrap_Joint.h │ │ │ ├── wrap_MotorJoint.cpp │ │ │ ├── wrap_MotorJoint.h │ │ │ ├── wrap_MouseJoint.cpp │ │ │ ├── wrap_MouseJoint.h │ │ │ ├── wrap_Physics.cpp │ │ │ ├── wrap_Physics.h │ │ │ ├── wrap_PolygonShape.cpp │ │ │ ├── wrap_PolygonShape.h │ │ │ ├── wrap_PrismaticJoint.cpp │ │ │ ├── wrap_PrismaticJoint.h │ │ │ ├── wrap_PulleyJoint.cpp │ │ │ ├── wrap_PulleyJoint.h │ │ │ ├── wrap_RevoluteJoint.cpp │ │ │ ├── wrap_RevoluteJoint.h │ │ │ ├── wrap_RopeJoint.cpp │ │ │ ├── wrap_RopeJoint.h │ │ │ ├── wrap_Shape.cpp │ │ │ ├── wrap_Shape.h │ │ │ ├── wrap_WeldJoint.cpp │ │ │ ├── wrap_WeldJoint.h │ │ │ ├── wrap_WheelJoint.cpp │ │ │ ├── wrap_WheelJoint.h │ │ │ ├── wrap_World.cpp │ │ │ └── wrap_World.h │ │ ├── sensor/ │ │ │ ├── Sensor.cpp │ │ │ ├── Sensor.h │ │ │ ├── sdl/ │ │ │ │ ├── Sensor.cpp │ │ │ │ └── Sensor.h │ │ │ ├── wrap_Sensor.cpp │ │ │ └── wrap_Sensor.h │ │ ├── sound/ │ │ │ ├── Decoder.cpp │ │ │ ├── Decoder.h │ │ │ ├── Sound.cpp │ │ │ ├── Sound.h │ │ │ ├── SoundData.cpp │ │ │ ├── SoundData.h │ │ │ ├── lullaby/ │ │ │ │ ├── CoreAudioDecoder.cpp │ │ │ │ ├── CoreAudioDecoder.h │ │ │ │ ├── FLACDecoder.cpp │ │ │ │ ├── FLACDecoder.h │ │ │ │ ├── MP3Decoder.cpp │ │ │ │ ├── MP3Decoder.h │ │ │ │ ├── ModPlugDecoder.cpp │ │ │ │ ├── ModPlugDecoder.h │ │ │ │ ├── Sound.cpp │ │ │ │ ├── Sound.h │ │ │ │ ├── VorbisDecoder.cpp │ │ │ │ ├── VorbisDecoder.h │ │ │ │ ├── WaveDecoder.cpp │ │ │ │ └── WaveDecoder.h │ │ │ ├── wrap_Decoder.cpp │ │ │ ├── wrap_Decoder.h │ │ │ ├── wrap_Sound.cpp │ │ │ ├── wrap_Sound.h │ │ │ ├── wrap_SoundData.cpp │ │ │ ├── wrap_SoundData.h │ │ │ └── wrap_SoundData.lua │ │ ├── system/ │ │ │ ├── System.cpp │ │ │ ├── System.h │ │ │ ├── sdl/ │ │ │ │ ├── System.cpp │ │ │ │ └── System.h │ │ │ ├── wrap_System.cpp │ │ │ └── wrap_System.h │ │ ├── thread/ │ │ │ ├── Channel.cpp │ │ │ ├── Channel.h │ │ │ ├── LuaThread.cpp │ │ │ ├── LuaThread.h │ │ │ ├── Thread.h │ │ │ ├── ThreadModule.cpp │ │ │ ├── ThreadModule.h │ │ │ ├── sdl/ │ │ │ │ ├── Thread.cpp │ │ │ │ ├── Thread.h │ │ │ │ ├── threads.cpp │ │ │ │ └── threads.h │ │ │ ├── threads.cpp │ │ │ ├── threads.h │ │ │ ├── wrap_Channel.cpp │ │ │ ├── wrap_Channel.h │ │ │ ├── wrap_LuaThread.cpp │ │ │ ├── wrap_LuaThread.h │ │ │ ├── wrap_ThreadModule.cpp │ │ │ └── wrap_ThreadModule.h │ │ ├── timer/ │ │ │ ├── Timer.cpp │ │ │ ├── Timer.h │ │ │ ├── wrap_Timer.cpp │ │ │ └── wrap_Timer.h │ │ ├── touch/ │ │ │ ├── Touch.cpp │ │ │ ├── Touch.h │ │ │ ├── sdl/ │ │ │ │ ├── Touch.cpp │ │ │ │ └── Touch.h │ │ │ ├── wrap_Touch.cpp │ │ │ └── wrap_Touch.h │ │ ├── video/ │ │ │ ├── Video.h │ │ │ ├── VideoStream.cpp │ │ │ ├── VideoStream.h │ │ │ ├── theora/ │ │ │ │ ├── OggDemuxer.cpp │ │ │ │ ├── OggDemuxer.h │ │ │ │ ├── TheoraVideoStream.cpp │ │ │ │ ├── TheoraVideoStream.h │ │ │ │ ├── Video.cpp │ │ │ │ └── Video.h │ │ │ ├── wrap_Video.cpp │ │ │ ├── wrap_Video.h │ │ │ ├── wrap_VideoStream.cpp │ │ │ └── wrap_VideoStream.h │ │ └── window/ │ │ ├── Window.cpp │ │ ├── Window.h │ │ ├── sdl/ │ │ │ ├── Window.cpp │ │ │ └── Window.h │ │ ├── wrap_Window.cpp │ │ └── wrap_Window.h │ └── scripts/ │ ├── auto.lua │ ├── nogame.lua │ └── nogame.lua.h └── testing/ ├── classes/ │ ├── TestMethod.lua │ ├── TestModule.lua │ └── TestSuite.lua ├── conf.lua ├── examples/ │ ├── lovetest_runAllTests.html │ ├── lovetest_runAllTests.md │ └── lovetest_runAllTests.xml ├── main.lua ├── output/ │ ├── actual/ │ │ └── notes.txt │ ├── difference/ │ │ └── notes.txt │ ├── expected/ │ │ └── notes.txt │ └── notes.txt ├── readme.md ├── resources/ │ ├── alsoft.conf │ ├── click.ogg │ ├── clickmono.ogg │ ├── love.dxt1 │ ├── mappings.txt │ ├── pop.ogg │ ├── sample.ogv │ ├── test.txt │ ├── tone.ogg │ └── vk_layer_settings.txt ├── tests/ │ ├── audio.lua │ ├── data.lua │ ├── event.lua │ ├── filesystem.lua │ ├── font.lua │ ├── graphics.lua │ ├── image.lua │ ├── joystick.lua │ ├── keyboard.lua │ ├── love.lua │ ├── math.lua │ ├── mouse.lua │ ├── physics.lua │ ├── sensor.lua │ ├── sound.lua │ ├── system.lua │ ├── thread.lua │ ├── timer.lua │ ├── touch.lua │ ├── video.lua │ └── window.lua └── todo.md ================================================ FILE CONTENTS ================================================ ================================================ FILE: .gitattributes ================================================ .git* export-ignore .hg* export-ignore *.c diff=cpp *.cpp diff=cpp *.h diff=cpp ================================================ FILE: .github/workflows/main.yml ================================================ name: continuous-integration on: [push, pull_request] jobs: Linux: runs-on: ${{ matrix.runner }} strategy: matrix: runner: [ubuntu-22.04, ubuntu-24.04-arm] permissions: checks: write pull-requests: write env: ALSOFT_CONF: love2d-${{ github.sha }}/testing/resources/alsoft.conf VK_LAYER_SETTINGS_PATH: love2d-${{ github.sha }}/testing/resources/vk_layer_settings.txt DISPLAY: :99 steps: - name: Update APT run: sudo apt-get update - name: Install Dependencies run: | sudo apt-get install --assume-yes build-essential git make cmake autoconf automake \ libtool pkg-config libasound2-dev libpulse-dev libaudio-dev \ libjack-dev libx11-dev libxext-dev libxrandr-dev libxcursor-dev \ libxfixes-dev libxi-dev libxinerama-dev libxxf86vm-dev libxss-dev \ libxtst-dev \ libgl1-mesa-dev libdbus-1-dev libudev-dev libgles2-mesa-dev \ libegl1-mesa-dev libibus-1.0-dev fcitx-libs-dev libsamplerate0-dev \ libsndio-dev libwayland-dev libxkbcommon-dev libdrm-dev libgbm-dev \ libcurl4-openssl-dev libfuse2 wmctrl openbox mesa-vulkan-drivers \ libpipewire-0.3-dev libwayland-dev libdecor-0-dev liburing-dev \ libvulkan1 - name: Install Vulkan SDK if: ${{ runner.arch == 'X64' }} run: | set -e wget -qO- https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo tee /etc/apt/trusted.gpg.d/lunarg.asc sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-1.3.283-jammy.list https://packages.lunarg.com/vulkan/1.3.283/lunarg-vulkan-1.3.283-jammy.list sudo apt-get update sudo apt-get install --assume-yes vulkan-sdk - name: Checkout love-appimage-source uses: actions/checkout@v4 with: repository: love2d/love-appimage-source ref: main - name: Checkout LÖVE uses: actions/checkout@v4 with: path: love2d-${{ github.sha }} - name: Get Dependencies for AppImage shell: python env: LOVE_BRANCH: ${{ github.sha }} run: | import os for i in range(250): if os.system(f"make getdeps LOVE_BRANCH={os.environ['LOVE_BRANCH']}") == 0: raise SystemExit(0) raise Exception("make getdeps failed") - name: Build AppImage run: make LOVE_BRANCH=${{ github.sha }} - name: Print LuaJIT branch run: git -C LuaJIT-v2.1 branch -v # start xvfb for test running - name: Start xvfb and openbox run: | echo "Starting XVFB on $DISPLAY" Xvfb $DISPLAY -screen 0, 360x240x24 & echo "XVFBPID=$!" >> $GITHUB_ENV # wait for xvfb to startup (3s is the same amount xvfb-run waits by default) sleep 3 openbox & echo "OPENBOXPID=$!" >> $GITHUB_ENV # linux opengl tests - name: Run Test Suite (opengl) run: | chmod a+x love-${{ github.sha }}.AppImage ./love-${{ github.sha }}.AppImage love2d-${{ github.sha }}/testing/main.lua --all --isRunner --renderers opengl - name: Love Test Report (opengl) id: report1 uses: ellraiser/love-test-report@main with: name: Love Testsuite Linux title: test-report-linux-${{ runner.arch }}-opengl path: love2d-${{ github.sha }}/testing/output/lovetest_all.md token: ${{ secrets.GITHUB_TOKEN }} - name: Zip Test Output (opengl) run: | 7z a -tzip test-output-linux-opengl-${{ runner.arch }}.zip love2d-${{ github.sha }}/testing/output/ - name: Artifact Test Output (opengl) uses: actions/upload-artifact@v4 with: name: test-output-linux-${{ runner.arch }}-opengl-${{ steps.report1.outputs.conclusion }} path: test-output-linux-${{ runner.arch }}-opengl.zip # linux opengles tests - name: Run Test Suite (opengles) env: LOVE_GRAPHICS_DEBUG: 1 run: | export LOVE_GRAPHICS_USE_OPENGLES=1 ./love-${{ github.sha }}.AppImage love2d-${{ github.sha }}/testing/main.lua --all --isRunner --renderers opengl - name: Love Test Report (opengles) uses: ellraiser/love-test-report@main id: report2 with: name: Love Testsuite Linux title: test-report-linux-${{ runner.arch }}-opengles path: love2d-${{ github.sha }}/testing/output/lovetest_all.md token: ${{ secrets.GITHUB_TOKEN }} - name: Zip Test Output (opengles) run: | 7z a -tzip test-output-linux-opengles-${{ runner.arch }}.zip love2d-${{ github.sha }}/testing/output/ - name: Artifact Test Output (opengles) uses: actions/upload-artifact@v4 with: name: test-output-linux-${{ runner.arch }}-opengles-${{ steps.report2.outputs.conclusion }} path: test-output-linux-${{ runner.arch }}-opengles.zip # linux vulkan tests - name: Run Test Suite (vulkan) env: LOVE_GRAPHICS_DEBUG: ${{ runner.arch == 'ARM64' && '0' || '1' }} LOVE_GRAPHICS_VULKAN_ALLOW_SOFTWARE: 1 run: | ./love-${{ github.sha }}.AppImage love2d-${{ github.sha }}/testing/main.lua --all --isRunner --renderers vulkan - name: Love Test Report (vulkan) uses: ellraiser/love-test-report@main id: report3 with: name: Love Testsuite Linux title: test-report-linux-${{ runner.arch }}-vulkan path: love2d-${{ github.sha }}/testing/output/lovetest_all.md - name: Zip Test Output (vulkan) run: | 7z a -tzip test-output-linux-vulkan-${{ runner.arch }}.zip love2d-${{ github.sha }}/testing/output/ - name: Artifact Test Output (vulkan) uses: actions/upload-artifact@v4 with: name: test-output-linux-${{ runner.arch }}-vulkan-${{ steps.report3.outputs.conclusion }} path: test-output-linux-${{ runner.arch }}-vulkan.zip - name: Stop xvfb and openbox # should always stop xvfb and openbox even if other steps failed if: always() run: | kill $XVFBPID kill $OPENBOXPID - name: Artifact uses: actions/upload-artifact@v4 with: name: love-linux-${{ runner.arch }}.AppImage path: love-${{ github.sha }}.AppImage - name: Artifact Debug Symbols uses: actions/upload-artifact@v4 with: name: love-${{ runner.arch }}-AppImage-debug path: love-${{ github.sha }}.AppImage-debug.tar.gz - name: Check Tests Passing if: steps.report1.outputs.conclusion == 'failure' || steps.report2.outputs.conclusion == 'failure' || steps.report3.outputs.conclusion == 'failure' run: | echo "${{ steps.report1.outputs.failed }} opengl tests failed" echo "${{ steps.report2.outputs.failed }} opengles tests failed" echo "${{ steps.report3.outputs.failed }} vulkan tests failed" exit 1 Windows: runs-on: windows-2025 permissions: checks: write pull-requests: write env: ALSOFT_CONF: megasource/libs/love/testing/resources/alsoft.conf VK_ICD_FILENAMES: ${{ github.workspace }}\mesa\x64\lvp_icd.x86_64.json VULKAN_SDK: C:/VulkanSDK/1.3.231.1 strategy: matrix: platform: [x64, ARM64] defaults: run: shell: cmd continue-on-error: ${{ matrix.platform == 'ARM64' }} steps: - name: Define Variables id: vars run: | rem JIT Modules if "${{ matrix.platform }}" == "x64" ( (echo jitmodules=1)>> "%GITHUB_OUTPUT%" ) else ( (echo jitmodules=0)>> "%GITHUB_OUTPUT%" ) rem Architecture-Specific Switch goto ${{ matrix.platform }} exit /b 1 :Win32 (echo arch=x86)>> "%GITHUB_OUTPUT%" (echo angle=0)>> "%GITHUB_OUTPUT%" echo nofiles=warn>> "%GITHUB_OUTPUT%" exit /b 0 :x64 (echo arch=x64)>> "%GITHUB_OUTPUT%" (echo angle=0)>> "%GITHUB_OUTPUT%" echo nofiles=warn>> "%GITHUB_OUTPUT%" exit /b 0 :ARM64 (echo arch=arm64)>> "%GITHUB_OUTPUT%" (echo angle=1)>> "%GITHUB_OUTPUT%" echo nofiles=ignore>> "%GITHUB_OUTPUT%" echo moredef=-DLOVE_EXTRA_DLLS=%CD%\angle\libEGL.dll;%CD%\angle\libGLESv2.dll>> "%GITHUB_OUTPUT%" exit /b 0 - name: Install NSIS run: winget install nsis --disable-interactivity --accept-source-agreements --accept-package-agreements - name: Download pdbstr run: curl -Lfo pdbstr.nupkg https://www.nuget.org/api/v2/package/Microsoft.Debugging.Tools.PdbStr/20230731.1609.0 - name: Download srctool run: curl -Lfo srctool.nupkg https://www.nuget.org/api/v2/package/Microsoft.Debugging.Tools.SrcTool/20230731.1609.0 - name: Extract Tools and Add to PATH run: | mkdir debugtools cd debugtools if errorlevel 1 exit /b 1 7z e ..\srctool.nupkg content/amd64/srctool.exe if errorlevel 1 exit /b 1 7z e ..\pdbstr.nupkg content/amd64/pdbstr.exe if errorlevel 1 exit /b 1 echo %CD%>>%GITHUB_PATH% - name: Setup Python 3.10 uses: actions/setup-python@v5 with: python-version: "3.10" - name: Download source_index.py run: curl -Lfo source_index.py https://gist.github.com/MikuAuahDark/d9c099f5714e09a765496471c2827a55/raw/df34956052035f3473c5f01861dfb53930d06843/source_index.py - name: Clone Megasource uses: actions/checkout@v4 with: path: megasource repository: love2d/megasource ref: main - id: megasource name: Get Megasource Commit SHA shell: python run: | import os import subprocess result = subprocess.run("git -C megasource rev-parse HEAD".split(), check=True, capture_output=True, encoding="UTF-8") commit = result.stdout.split()[0] with open(os.environ["GITHUB_OUTPUT"], "w", encoding="UTF-8") as f: f.write(f"commit={commit}") - name: Checkout uses: actions/checkout@v4 with: path: megasource/libs/love - name: Download ANGLE uses: robinraju/release-downloader@v1.9 if: steps.vars.outputs.angle == '1' with: repository: MikuAuahDark/angle-winbuild tag: cr_5249 fileName: angle-win-${{ steps.vars.outputs.arch }}.zip tarBall: false zipBall: false out-file-path: angle - name: Extract ANGLE if: steps.vars.outputs.angle == '1' working-directory: angle run: 7z x angle-win-${{ steps.vars.outputs.arch }}.zip - name: Remove Strawbery Perl From Path # https://github.com/actions/runner-images/issues/6627 # In particular, this is not pretty, but even CMAKE_IGNORE_PREFIX_PATH # cannot help in this case. run: | move /y C:\Strawberry C:\Strawberry_not_in_PATH exit /b 0 - name: Configure env: CFLAGS: /Zi CXXFLAGS: /Zi LDFLAGS: /DEBUG:FULL /OPT:REF /OPT:ICF run: cmake -Bbuild -Smegasource -T v143 -A ${{ matrix.platform }},version=10.0.26100.0 --install-prefix %CD%\install -DCMAKE_PDB_OUTPUT_DIRECTORY=%CD%\pdb ${{ steps.vars.outputs.moredef }} - name: Install run: cmake --build build --target PACKAGE --config Release -j2 - name: Copy LuaJIT lua51.pdb run: | copy /Y build\libs\LuaJIT\src\lua51.pdb pdb\Release\lua51.pdb exit /b 0 - name: Add srcsrv to PATH run: | echo C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\srcsrv>>%GITHUB_PATH% - name: Embed Source Index into PDBs run: | python source_index.py ^ --source %CD%\megasource\libs\love https://raw.githubusercontent.com/${{ github.repository }}/${{ github.sha }} ^ --source %CD%\megasource https://raw.githubusercontent.com/love2d/megasource/${{ steps.megasource.outputs.commit }} ^ --source %CD%\build\libs\LuaJIT https://raw.githubusercontent.com/love2d/megasource/${{ steps.megasource.outputs.commit }}/libs/LuaJIT ^ pdb\Release\*.pdb - name: Artifact uses: actions/upload-artifact@v4 with: name: love-windows-${{ steps.vars.outputs.arch }} path: | build/*.zip build/*.exe if-no-files-found: ${{ steps.vars.outputs.nofiles }} - name: Artifact JIT Modules if: steps.vars.outputs.jitmodules == '1' uses: actions/upload-artifact@v4 with: name: love-windows-jitmodules path: build/libs/LuaJIT/src/jit/*.lua - name: Artifact PDB uses: actions/upload-artifact@v4 with: name: love-windows-${{ steps.vars.outputs.arch }}-dbg path: pdb/Release/*.pdb # install mesa for graphic tests - name: Install Mesa if: steps.vars.outputs.arch != 'ARM64' run: | curl -L --output mesa.7z --url https://github.com/pal1000/mesa-dist-win/releases/download/24.2.4/mesa3d-24.2.4-release-msvc.7z 7z x mesa.7z -o* powershell.exe mesa\systemwidedeploy.cmd 1 # build love to use for the tests - name: Build Test Exe if: steps.vars.outputs.arch != 'ARM64' run: cmake --build build --config Release --target install # windows opengl tests - name: Run Tests (opengl) if: steps.vars.outputs.arch != 'ARM64' env: LOVE_GRAPHICS_DEBUG: 1 run: | echo 'check dir' ls powershell.exe ./install/lovec.exe ./megasource/libs/love/testing/main.lua --all --isRunner --renderers opengl - name: Love Test Report (opengl) id: report1 if: steps.vars.outputs.arch != 'ARM64' uses: ellraiser/love-test-report@main with: name: Love Testsuite Windows ${{ steps.vars.outputs.arch }} (opengl) title: test-report-windows-${{ steps.vars.outputs.arch }}-opengl path: megasource/libs/love/testing/output/lovetest_all.md token: ${{ secrets.GITHUB_TOKEN }} - name: Zip Test Output (opengl) if: steps.vars.outputs.arch != 'ARM64' run: | 7z a -tzip test-output-windows-${{ steps.vars.outputs.arch }}-opengl.zip megasource/libs/love/testing/output/ - name: Artifact Test Output (opengl) if: steps.vars.outputs.arch != 'ARM64' uses: actions/upload-artifact@v4 with: name: test-output-windows-${{ steps.vars.outputs.arch }}-opengl-${{ steps.report1.outputs.conclusion }} path: test-output-windows-${{ steps.vars.outputs.arch }}-opengl.zip # windows opengles tests - name: Run Tests (opengles) if: steps.vars.outputs.arch != 'ARM64' env: LOVE_GRAPHICS_DEBUG: 1 LOVE_GRAPHICS_USE_OPENGLES: 1 run: | powershell.exe ./install/lovec.exe ./megasource/libs/love/testing/main.lua --all --isRunner --renderers opengl - name: Love Test Report (opengles) id: report2 if: steps.vars.outputs.arch != 'ARM64' uses: ellraiser/love-test-report@main with: name: Love Testsuite Windows ${{ steps.vars.outputs.arch }} (opengles) title: test-report-windows-${{ steps.vars.outputs.arch }}-opengles path: megasource/libs/love/testing/output/lovetest_all.md token: ${{ secrets.GITHUB_TOKEN }} - name: Zip Test Output (opengles) if: steps.vars.outputs.arch != 'ARM64' run: | 7z a -tzip test-output-windows-${{ steps.vars.outputs.arch }}-opengles.zip megasource/libs/love/testing/output/ - name: Artifact Test Output (opengles) if: steps.vars.outputs.arch != 'ARM64' uses: actions/upload-artifact@v4 with: name: test-output-windows-${{ steps.vars.outputs.arch }}-opengles-${{ steps.report2.outputs.conclusion }} path: test-output-windows-${{ steps.vars.outputs.arch }}-opengles.zip - name: Check Tests Passing if: steps.report1.outputs.conclusion == 'failure' || steps.report2.outputs.conclusion == 'failure' run: | echo "${{ steps.report1.outputs.failed }} opengl tests failed" echo "${{ steps.report2.outputs.failed }} opengles tests failed" exit 1 # # install vulkan # - name: Install Vulkan # if: steps.vars.outputs.arch != 'ARM64' # run: | # curl -L --show-error --output VulkanSDK.exe https://sdk.lunarg.com/sdk/download/1.3.231.1/windows/VulkanSDK-1.3.231.1-Installer.exe # ./VulkanSDK.exe --root C:/VulkanSDK/1.3.231.1 --accept-licenses --default-answer --confirm-command install com.lunarg.vulkan.core com.lunarg.vulkan.vma # curl -L --show-error --output vulkan-runtime.zip https://sdk.lunarg.com/sdk/download/1.3.231.1/windows/vulkan-runtime-components.zip # 7z e vulkan-runtime.zip -o"C:/VulkanSDK/1.3.231.1/runtime/x64" */x64 # copy "C:/VulkanSDK/1.3.231.1/runtime/x64/vulkan-1.dll" "mesa/x64" # copy "C:/VulkanSDK/1.3.231.1/runtime/x64/vulkan-1.dll" "C:/Windows/System32" # copy "C:/VulkanSDK/1.3.231.1/runtime/x64/vulkan-1.dll" "love-12.0-win64/love-12.0-win64" # reg add HKEY_LOCAL_MACHINE\SOFTWARE\Khronos\Vulkan\Drivers /v "${{ github.workspace }}\mesa\x64\lvp_icd.x86_64.json" /t REG_DWORD /d 0 # powershell.exe C:/VulkanSDK/1.3.231.1/runtime/x64/vulkaninfo.exe --summary # # windows vulkan tests # - name: Run Tests (vulkan) # if: steps.vars.outputs.arch != 'ARM64' # env: # LOVE_GRAPHICS_DEBUG: 1 # LOVE_GRAPHICS_VULKAN_ALLOW_SOFTWARE: 1 # run: | # powershell.exe ./install/lovec.exe ./megasource/libs/love/testing/main.lua --all --isRunner --renderers vulkan # - name: Love Test Report (vulkan) # if: steps.vars.outputs.arch != 'ARM64' # uses: ellraiser/love-test-report@main # with: # name: Love Testsuite Windows ${{ steps.vars.outputs.arch }} (vulkan) # title: test-report-windows-${{ steps.vars.outputs.arch }}-vulkan # path: megasource/libs/love/testing/output/lovetest_all.md # - name: Zip Test Output (vulkan) # if: steps.vars.outputs.arch != 'ARM64' # run: | # 7z a -tzip test-output-windows-${{ steps.vars.outputs.arch }}-vulkan.zip megasource/libs/love/testing/output/ # - name: Artifact Test Output (vulkan) # if: steps.vars.outputs.arch != 'ARM64' # uses: actions/upload-artifact@v4 # with: # name: test-output-windows-${{ steps.vars.outputs.arch }}-vulkan # path: test-output-windows-${{ steps.vars.outputs.arch }}-vulkan.zip macOS: runs-on: macos-latest permissions: checks: write pull-requests: write env: ALSOFT_CONF: testing/resources/alsoft.conf steps: - name: Checkout uses: actions/checkout@v4 - name: Clone Dependencies uses: actions/checkout@v4 with: path: apple-dependencies repository: love2d/love-apple-dependencies ref: main - name: Move Dependencies run: | mv apple-dependencies/macOS/Frameworks platform/xcode/macosx mv apple-dependencies/shared platform/xcode - name: Build run: xcodebuild clean archive -project platform/xcode/love.xcodeproj -scheme love-macosx -configuration Release -destination generic/platform=macOS -archivePath love-macos.xcarchive - name: Export Archive run: xcodebuild -exportArchive -archivePath love-macos.xcarchive -exportPath love-macos -exportOptionsPlist platform/xcode/macosx/macos-copy-app.plist - name: Zip Archive run: ditto -c -k --sequesterRsrc --keepParent love-macos/love.app love-macos.zip - name: Artifact uses: actions/upload-artifact@v4 with: name: love-macos path: love-macos.zip # macos opengl tests - name: Run Test Suite (OpenGL) env: LOVE_GRAPHICS_DEBUG: 1 run: | ls love-macos/love.app/Contents/MacOS/love ./testing/main.lua --all --isRunner --renderers opengl - name: Love Test Report (OpenGL) id: report1 uses: ellraiser/love-test-report@main with: name: Love Testsuite MacOS title: test-report-macos-opengl path: testing/output/lovetest_all.md token: ${{ secrets.GITHUB_TOKEN }} - name: Zip Test Output (OpenGL) run: | 7z a -tzip test-output-macos-opengl.zip ./testing/output/ - name: Artifact Test Output (OpenGL) uses: actions/upload-artifact@v4 with: name: test-output-macos-opengl-${{ steps.report1.outputs.conclusion }} path: test-output-macos-opengl.zip - name: Check Tests Passing (OpenGL) if: steps.report1.outputs.conclusion == 'failure' run: | echo "${{ steps.report1.outputs.failed }} opengl tests failed" exit 1 # macos metal tests - name: Run Test Suite (Metal) env: LOVE_GRAPHICS_DEBUG: 1 run: | ls love-macos/love.app/Contents/MacOS/love ./testing/main.lua --all --isRunner --renderers metal - name: Love Test Report (Metal) id: report2 uses: ellraiser/love-test-report@main with: name: Love Testsuite MacOS (Metal) title: test-report-macos-metal path: testing/output/lovetest_all.md token: ${{ secrets.GITHUB_TOKEN }} - name: Zip Test Output (Metal) run: | 7z a -tzip test-output-macos-metal.zip ./testing/output/ - name: Artifact Test Output (Metal) uses: actions/upload-artifact@v4 with: name: test-output-macos-metal-${{ steps.report2.outputs.conclusion }} path: test-output-macos-metal.zip - name: Check Tests Passing (Metal) if: steps.report2.outputs.conclusion == 'failure' run: | echo "${{ steps.report2.outputs.failed }} metal tests failed" exit 1 iOS-Simulator: runs-on: macos-14 steps: - name: Checkout uses: actions/checkout@v4 - name: Clone Dependencies uses: actions/checkout@v4 with: path: apple-dependencies repository: love2d/love-apple-dependencies ref: main - name: Move Dependencies run: | mv apple-dependencies/iOS/libraries platform/xcode/ios mv apple-dependencies/shared platform/xcode - name: Build run: xcodebuild -project platform/xcode/love.xcodeproj -scheme love-ios -configuration Release -destination 'platform=iOS Simulator,name=iPhone 15' Android: runs-on: ubuntu-latest strategy: matrix: build_type: [Debug, Release] env: GRADLE_OPTS: "-Dorg.gradle.jvmargs='-Xmx4G'" steps: - name: Prepare Environment run: sudo apt-get update && curl -Lfo kitware-archive.sh https://apt.kitware.com/kitware-archive.sh && sudo bash ./kitware-archive.sh - name: Install Dependencies run: sudo apt-get install ninja-build cmake - name: Checkout love-android uses: actions/checkout@v4 with: repository: love2d/love-android submodules: false - name: Setup Java 17 uses: actions/setup-java@v4 with: distribution: adopt-hotspot java-version: 17 cache: gradle - name: Clone Megasource uses: actions/checkout@v4 with: path: app/src/main/cpp/megasource repository: love2d/megasource ref: main - name: Checkout uses: actions/checkout@v4 with: path: app/src/main/cpp/love - name: Build Normal Flavor run: bash ./gradlew assembleNormalRecord${{ matrix.build_type }} - name: Build Release-specific Binaries if: ${{ matrix.build_type == 'Release' }} run: bash ./gradlew bundleNormalNoRecordRelease bundleEmbedRecordRelease bundleEmbedNoRecordRelease - name: Artifact (Normal debug APK) if: ${{ matrix.build_type == 'Debug' }} uses: actions/upload-artifact@v4 with: name: love-android-debug.apk path: app/build/outputs/apk/normalRecord/debug/app-normal-record-debug.apk - name: Artifact (Normal unsigned APK) if: ${{ matrix.build_type == 'Release' }} uses: actions/upload-artifact@v4 with: name: love-android.apk path: app/build/outputs/apk/normalRecord/release/app-normal-record-release-unsigned.apk - name: Artifact (Normal AAB w/o recording) if: ${{ matrix.build_type == 'Release' }} uses: actions/upload-artifact@v4 with: name: love-android-ps.aab path: app/build/outputs/bundle/normalNoRecordRelease/app-normal-noRecord-release.aab - name: Artifact (Embed AAB) if: ${{ matrix.build_type == 'Release' }} uses: actions/upload-artifact@v4 with: name: love-android-embed-record.aab path: app/build/outputs/bundle/embedRecordRelease/app-embed-record-release.aab - name: Artifact (Embed AAB w/o recording) if: ${{ matrix.build_type == 'Release' }} uses: actions/upload-artifact@v4 with: name: love-android-embed.aab path: app/build/outputs/bundle/embedNoRecordRelease/app-embed-noRecord-release.aab - name: Artifact (Debug symbols) uses: actions/upload-artifact@v4 with: name: love-android-unstripped-debugsyms-${{ matrix.build_type }} path: app/build/intermediates/cxx ================================================ FILE: .gitignore ================================================ # automake products /config.h /config.h.in /config.log /config.status /configure /configure-modules-post.ac /configure-modules-pre.ac /configure.ac /extra/reshax/Release/ /extra/reshax/Debug/ /extra/reshax/resources.h /extra/reshax/resources.cpp *.obj *.o *.dirstamp *.m4 *.Po *.lo *.Plo *.dll *.user *.suo */Release* */Debug* *.lib *.ncb *.exe *.bat /platform/xcode/Build /platform/xcode/DerivedData /platform/xcode/ios/include /platform/xcode/ios/libraries /platform/xcode/ios/luajit-git /platform/xcode/macosx/Frameworks /platform/xcode/shared/Frameworks *xcuserdata* *.DS_Store *.dylib *.dmg* demos *.orig .*.swp /autom4te.cache/ /src/.libs/ *~ Makefile* libtool /src/config.h /platform/unix/ar-lib /platform/unix/compile /platform/unix/config.guess /platform/unix/config.sub /platform/unix/debian/changelog /platform/unix/debian/control /platform/unix/debian/rules /platform/unix/depcomp /platform/unix/install-sh /platform/unix/love.desktop /platform/unix/ltmain.sh /platform/unix/missing .lineno *.la *.Tpo *.rej */.deps stamp-h1 /src/love /src/tags .vs/ .vscode/ /testing/output/*.xml /testing/output/*.html /testing/output/*.md /testing/output/actual/*.png /testing/output/difference/*.png ================================================ FILE: CMakeLists.txt ================================================ # # Copyright (c) 2006-2026 LOVE Development Team # # This software is provided 'as-is', without any express or implied # warranty. In no event will the authors be held liable for any damages # arising from the use of this software. # # Permission is granted to anyone to use this software for any purpose, # including commercial applications, and to alter it and redistribute it # freely, subject to the following restrictions: # # 1. The origin of this software must not be misrepresented; you must not # claim that you wrote the original software. If you use this software # in a product, an acknowledgment in the product documentation would be # appreciated but is not required. # 2. Altered source versions must be plainly marked as such, and must not be # misrepresented as being the original software. # 3. This notice may not be removed or altered from any source distribution. # if(${CMAKE_CURRENT_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_BINARY_DIR}) # Protip: run cmake like this: cmake -G "" -H. -Bbuild message(FATAL_ERROR "Prevented in-tree build.") endif() cmake_minimum_required(VERSION 3.19) project(love) set(CMAKE_MODULE_PATH "${love_SOURCE_DIR}/extra/cmake" ${CMAKE_MODULE_PATH}) set(CMAKE_POSITION_INDEPENDENT_CODE TRUE) # Needed for shared libs on Linux. (-fPIC). set(CMAKE_CXX_STANDARD 17) set_property(GLOBAL PROPERTY USE_FOLDERS ON) # Allow grouping projects in Visual Studio if(APPLE) message(WARNING "CMake is not an officially supported build system for love on Apple platforms.") message(WARNING "Use the prebuilt .app or the xcode project in platform/xcode/ instead.") endif() if(MINGW) message(WARNING "MinGW is not an officially supported build system for love.") message(WARNING "Use megasource with Visual Studio instead.") message(WARNING "Please see https://github.com/love2d/megasource") endif() include(LoveMacros) # Extract version.h contents. file(READ ${CMAKE_CURRENT_SOURCE_DIR}/src/common/version.h LOVE_VERSION_FILE_CONTENTS) # Extract one of LOVE_VERSION_MAJOR/MINOR/REV. function(match_version ARG_STRING OUT_VAR) string(REGEX MATCH "VERSION_${ARG_STRING} = ([0-9]+);" TMP_VER "${LOVE_VERSION_FILE_CONTENTS}") string(REGEX MATCH "[0-9]+" TMP_VER "${TMP_VER}") set(${OUT_VAR} ${TMP_VER} PARENT_SCOPE) endfunction() match_version("MAJOR" LOVE_VERSION_MAJOR) match_version("MINOR" LOVE_VERSION_MINOR) match_version("REV" LOVE_VERSION_REV) set(LOVE_VERSION_STR "${LOVE_VERSION_MAJOR}.${LOVE_VERSION_MINOR}") message(STATUS "Version: ${LOVE_VERSION_STR}") set(LOVE_EXE_NAME love CACHE STRING "The name of the executable, usually 'love'") set(LOVE_DEFAULT_LIB_NAME liblove) if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") set(LOVE_DEFAULT_LIB_NAME "${LOVE_EXE_NAME}-${LOVE_VERSION_STR}") endif() set(LOVE_LIB_NAME ${LOVE_DEFAULT_LIB_NAME} CACHE STRING "The name of the lua library, usually 'liblove' or 'love'") set(LOVE_CONSOLE_EXE_NAME "${LOVE_EXE_NAME}c" CACHE STRING "The name of the console version of the executable, usually 'lovec'") if(CMAKE_SIZEOF_VOID_P EQUAL 8) set(LOVE_X64 TRUE) set(LOVE_TARGET_PLATFORM x64) else() set(LOVE_X86 TRUE) set(LOVE_TARGET_PLATFORM x86) endif() if(APPLE) set(LOVE_DEFAULT_JIT FALSE) else() set(LOVE_DEFAULT_JIT TRUE) endif() option(LOVE_JIT "Use LuaJIT" ${LOVE_DEFAULT_JIT}) if(LOVE_JIT) if(APPLE) message(WARNING "JIT not supported yet on Mac.") endif() message(STATUS "LuaJIT: Enabled") else() message(STATUS "LuaJIT: Disabled") endif() message(STATUS "Target platform: ${LOVE_TARGET_PLATFORM}") add_library(lovedep::SDL INTERFACE IMPORTED) add_library(lovedep::Freetype INTERFACE IMPORTED) add_library(lovedep::Harfbuzz INTERFACE IMPORTED) add_library(lovedep::OpenAL INTERFACE IMPORTED) add_library(lovedep::Modplug INTERFACE IMPORTED) add_library(lovedep::Theora INTERFACE IMPORTED) add_library(lovedep::Vorbis INTERFACE IMPORTED) add_library(lovedep::Ogg INTERFACE IMPORTED) add_library(lovedep::Zlib INTERFACE IMPORTED) add_library(lovedep::Lua INTERFACE IMPORTED) if(MEGA) # LOVE_MSVC_DLLS contains runtime DLLs that should be bundled with the love # binary (in e.g. the installer). Example: msvcp140.dll. set(LOVE_MSVC_DLLS ${MEGA_MSVC_DLLS}) # These DLLs are moved next to the love binary in a post-build step to # love runnable from inside Visual Studio. # # LOVE_MOVE_DLLS can contain CMake targets, in which case the target's # output is assumed to be a DLL, or it can contain paths to actual files. # We detect whether or not each item is a target, and take the appropriate # action. set(LOVE_MOVE_DLLS ${MEGA_SDL3} ${MEGA_OPENAL} ) # LOVE_EXTRA_DLLS are non-runtime DLLs which should be bundled with the # love binary in installers, etc. It's only needed for external # (non-CMake) targets, i.e. LuaJIT. if(NOT DEFINED LOVE_EXTRA_DLLS) set(LOVE_EXTRA_DLLS) endif() target_link_libraries(lovedep::SDL INTERFACE ${MEGA_SDL3}) target_link_libraries(lovedep::Freetype INTERFACE ${MEGA_FREETYPE}) target_link_libraries(lovedep::Harfbuzz INTERFACE ${MEGA_HARFBUZZ}) target_link_libraries(lovedep::OpenAL INTERFACE ${MEGA_OPENAL}) target_link_libraries(lovedep::Modplug INTERFACE ${MEGA_MODPLUG}) target_link_libraries(lovedep::Theora INTERFACE ${MEGA_LIBTHEORA}) target_link_libraries(lovedep::Vorbis INTERFACE ${MEGA_LIBVORBIS} ${MEGA_LIBVORBISFILE}) target_link_libraries(lovedep::Ogg INTERFACE ${MEGA_LIBOGG}) target_link_libraries(lovedep::Zlib INTERFACE ${MEGA_ZLIB}) if(LOVE_JIT) target_include_directories(lovedep::Lua INTERFACE ${MEGA_LUAJIT_INCLUDE}) target_link_libraries(lovedep::Lua INTERFACE ${MEGA_LUAJIT_LIB}) set(LOVE_EXTRA_DLLS ${LOVE_EXTRA_DLLS} ${MEGA_LUAJIT_DLL}) set(LOVE_EXTRA_DEPENDECIES luajit) set(LOVE_MOVE_DLLS ${LOVE_MOVE_DLLS} ${MEGA_LUAJIT_DLL} ) else() # MEGA_LUA51 is a CMake target, so includes are handled # automatically. target_link_libraries(lovedep::Lua INTERFACE ${MEGA_LUA51}) set(LOVE_MOVE_DLLS ${LOVE_MOVE_DLLS} ${MEGA_LUA51} ) endif() else() if(MSVC OR ANDROID) message(FATAL_ERROR " It is currently only possible to build with megasource on Windows and Android. Please see https://github.com/love2d/megasource ") endif() # required for enet add_definitions(-D HAS_SOCKLEN_T) find_package(SDL3 3.1.3 REQUIRED CONFIG) target_include_directories(lovedep::SDL INTERFACE ${SDL3_INCLUDE_DIRS}) target_link_libraries(lovedep::SDL INTERFACE ${SDL3_LIBRARIES}) find_package(Freetype REQUIRED) target_include_directories(lovedep::Freetype INTERFACE ${FREETYPE_INCLUDE_DIRS}) target_link_libraries(lovedep::Freetype INTERFACE ${FREETYPE_LIBRARY}) find_package(Harfbuzz REQUIRED) target_include_directories(lovedep::Harfbuzz INTERFACE ${HARFBUZZ_INCLUDE_DIR}) target_link_libraries(lovedep::Harfbuzz INTERFACE ${HARFBUZZ_LIBRARY}) find_package(OpenAL REQUIRED) target_include_directories(lovedep::OpenAL INTERFACE ${OPENAL_INCLUDE_DIR}) target_link_libraries(lovedep::OpenAL INTERFACE ${OPENAL_LIBRARY}) find_package(ModPlug REQUIRED) target_include_directories(lovedep::Modplug INTERFACE ${MODPLUG_INCLUDE_DIR}) target_link_libraries(lovedep::Modplug INTERFACE ${MODPLUG_LIBRARY}) find_package(Theora REQUIRED) target_include_directories(lovedep::Theora INTERFACE ${THEORA_INCLUDE_DIR}) target_link_libraries(lovedep::Theora INTERFACE ${THEORA_LIBRARY} ${THEORADEC_LIBRARY}) find_package(Vorbis REQUIRED) target_include_directories(lovedep::Vorbis INTERFACE ${VORBIS_INCLUDE_DIR}) target_link_libraries(lovedep::Vorbis INTERFACE ${VORBISFILE_LIBRARY}) find_package(Ogg REQUIRED) target_include_directories(lovedep::Ogg INTERFACE ${OGG_INCLUDE_DIR}) target_link_libraries(lovedep::Ogg INTERFACE ${OGG_LIBRARY}) find_package(ZLIB REQUIRED) target_include_directories(lovedep::Zlib INTERFACE ${ZLIB_INCLUDE_DIRS}) target_link_libraries(lovedep::Zlib INTERFACE ${ZLIB_LIBRARY}) if(LOVE_JIT) find_package(LuaJIT REQUIRED) target_include_directories(lovedep::Lua INTERFACE ${LUAJIT_INCLUDE_DIR}) target_link_libraries(lovedep::Lua INTERFACE ${LUAJIT_LIBRARY}) else() find_package(Lua51 REQUIRED) target_include_directories(lovedep::Lua INTERFACE ${LUA_INCLUDE_DIR}) target_link_libraries(lovedep::Lua INTERFACE ${LUA_LIBRARY}) endif() endif() ### ### No Megasource-specific stuff beyond this point! ### if(MSVC) set(DISABLE_WARNING_FLAG -W0) else() set(DISABLE_WARNING_FLAG -w) endif() function(love_disable_warnings ARG_TARGET) target_compile_options(${ARG_TARGET} PRIVATE ${DISABLE_WARNING_FLAG}) endfunction() # # common # add_library(love_common STATIC src/common/android.cpp src/common/android.h src/common/b64.cpp src/common/b64.h src/common/Color.h src/common/config.h src/common/Data.cpp src/common/Data.h src/common/delay.cpp src/common/delay.h src/common/deprecation.cpp src/common/deprecation.h src/common/EnumMap.h src/common/Exception.cpp src/common/Exception.h src/common/floattypes.cpp src/common/floattypes.h src/common/int.h src/common/math.h src/common/Matrix.cpp src/common/Matrix.h src/common/memory.cpp src/common/memory.h src/common/Module.cpp src/common/Module.h src/common/Object.cpp src/common/Object.h src/common/Optional.h src/common/pixelformat.cpp src/common/pixelformat.h src/common/Range.h src/common/Reference.cpp src/common/Reference.h src/common/runtime.cpp src/common/runtime.h src/common/Stream.cpp src/common/Stream.h src/common/StringMap.cpp src/common/StringMap.h src/common/types.cpp src/common/types.h src/common/utf8.cpp src/common/utf8.h src/common/Variant.cpp src/common/Variant.h #src/common/Vector.cpp # Vector.cpp is empty. src/common/Vector.h src/common/version.h ) target_link_libraries(love_common PUBLIC lovedep::Lua lovedep::SDL ) if (APPLE) target_sources(love_common PRIVATE src/common/apple.mm ) target_link_libraries(love_common PUBLIC objc "-framework CoreFoundation" ) if(CMAKE_SYSTEM_NAME STREQUAL "Darwin") target_sources(love_common PRIVATE src/common/macos.mm ) target_link_libraries(love_common PUBLIC "-framework AppKit" ) else() target_sources(love_common PRIVATE src/common/ios.mm ) target_link_libraries(love_common PUBLIC "-framework UIKit" ) endif() endif() # # love.audio # add_library(love_audio_root STATIC src/modules/audio/Audio.cpp src/modules/audio/Audio.h src/modules/audio/Source.cpp src/modules/audio/Source.h src/modules/audio/RecordingDevice.cpp src/modules/audio/RecordingDevice.h src/modules/audio/Filter.cpp src/modules/audio/Filter.h src/modules/audio/Effect.cpp src/modules/audio/Effect.h src/modules/audio/wrap_Audio.cpp src/modules/audio/wrap_Audio.h src/modules/audio/wrap_Source.cpp src/modules/audio/wrap_Source.h src/modules/audio/wrap_RecordingDevice.cpp src/modules/audio/wrap_RecordingDevice.h ) target_link_libraries(love_audio_root PUBLIC lovedep::Lua lovedep::OpenAL ) add_library(love_audio_null STATIC src/modules/audio/null/Audio.cpp src/modules/audio/null/Audio.h src/modules/audio/null/Source.cpp src/modules/audio/null/Source.h src/modules/audio/null/RecordingDevice.cpp src/modules/audio/null/RecordingDevice.h ) add_library(love_audio_openal STATIC src/modules/audio/openal/Audio.cpp src/modules/audio/openal/Audio.h src/modules/audio/openal/Pool.cpp src/modules/audio/openal/Pool.h src/modules/audio/openal/Source.cpp src/modules/audio/openal/Source.h src/modules/audio/openal/RecordingDevice.cpp src/modules/audio/openal/RecordingDevice.h src/modules/audio/openal/Filter.cpp src/modules/audio/openal/Filter.h src/modules/audio/openal/Effect.cpp src/modules/audio/openal/Effect.h ) target_link_libraries(love_audio_openal PUBLIC lovedep::OpenAL ) add_library(love_audio INTERFACE) target_link_libraries(love_audio INTERFACE love_audio_root love_audio_null love_audio_openal ) # # love.data # add_library(love_data STATIC src/modules/data/ByteData.cpp src/modules/data/ByteData.h src/modules/data/CompressedData.cpp src/modules/data/CompressedData.h src/modules/data/Compressor.cpp src/modules/data/Compressor.h src/modules/data/DataModule.cpp src/modules/data/DataModule.h src/modules/data/DataStream.cpp src/modules/data/DataStream.h src/modules/data/DataView.cpp src/modules/data/DataView.h src/modules/data/HashFunction.cpp src/modules/data/HashFunction.h src/modules/data/wrap_ByteData.cpp src/modules/data/wrap_ByteData.h src/modules/data/wrap_CompressedData.cpp src/modules/data/wrap_CompressedData.h src/modules/data/wrap_Data.cpp src/modules/data/wrap_Data.h src/modules/data/wrap_Data.lua src/modules/data/wrap_DataModule.cpp src/modules/data/wrap_DataModule.h src/modules/data/wrap_DataView.cpp src/modules/data/wrap_DataView.h ) target_link_libraries(love_data PUBLIC lovedep::Lua lovedep::Zlib ) # # love.event # add_library(love_event_root STATIC src/modules/event/Event.cpp src/modules/event/Event.h src/modules/event/wrap_Event.cpp src/modules/event/wrap_Event.h src/modules/event/wrap_Event.lua ) target_link_libraries(love_event_root PUBLIC lovedep::Lua lovedep::SDL ) add_library(love_event_sdl STATIC src/modules/event/sdl/Event.cpp src/modules/event/sdl/Event.h ) target_link_libraries(love_event_sdl PUBLIC lovedep::SDL ) add_library(love_event INTERFACE) target_link_libraries(love_event INTERFACE love_event_root love_event_sdl ) # # love.filesystem # add_library(love_filesystem_root STATIC src/modules/filesystem/File.cpp src/modules/filesystem/File.h src/modules/filesystem/FileData.cpp src/modules/filesystem/FileData.h src/modules/filesystem/Filesystem.cpp src/modules/filesystem/Filesystem.h src/modules/filesystem/NativeFile.cpp src/modules/filesystem/NativeFile.h src/modules/filesystem/wrap_File.cpp src/modules/filesystem/wrap_File.h src/modules/filesystem/wrap_FileData.cpp src/modules/filesystem/wrap_FileData.h src/modules/filesystem/wrap_Filesystem.cpp src/modules/filesystem/wrap_Filesystem.h src/modules/filesystem/wrap_NativeFile.cpp src/modules/filesystem/wrap_NativeFile.h ) target_link_libraries(love_filesystem_root PUBLIC lovedep::Lua lovedep::SDL ) add_library(love_filesystem_physfs STATIC src/modules/filesystem/physfs/File.cpp src/modules/filesystem/physfs/File.h src/modules/filesystem/physfs/Filesystem.cpp src/modules/filesystem/physfs/Filesystem.h src/modules/filesystem/physfs/PhysfsIo.h src/modules/filesystem/physfs/PhysfsIo.cpp ) if(ANDROID) target_link_libraries(love_filesystem_physfs PUBLIC lovedep::SDL ) endif() add_library(love_filesystem INTERFACE) target_link_libraries(love_filesystem INTERFACE love_filesystem_root love_filesystem_physfs ) # # love.font # add_library(love_font_root STATIC src/modules/font/BMFontRasterizer.cpp src/modules/font/BMFontRasterizer.h src/modules/font/Font.cpp src/modules/font/Font.h src/modules/font/GenericShaper.cpp src/modules/font/GenericShaper.h src/modules/font/GlyphData.cpp src/modules/font/GlyphData.h src/modules/font/ImageRasterizer.cpp src/modules/font/ImageRasterizer.h src/modules/font/Rasterizer.cpp src/modules/font/Rasterizer.h src/modules/font/TextShaper.cpp src/modules/font/TextShaper.h src/modules/font/TrueTypeRasterizer.cpp src/modules/font/TrueTypeRasterizer.h src/modules/font/wrap_Font.cpp src/modules/font/wrap_Font.h src/modules/font/wrap_GlyphData.cpp src/modules/font/wrap_GlyphData.h src/modules/font/wrap_Rasterizer.cpp src/modules/font/wrap_Rasterizer.h ) target_link_libraries(love_font_root PUBLIC lovedep::Lua lovedep::Freetype ) add_library(love_font_freetype STATIC src/modules/font/freetype/Font.cpp src/modules/font/freetype/Font.h src/modules/font/freetype/HarfbuzzShaper.cpp src/modules/font/freetype/HarfbuzzShaper.h src/modules/font/freetype/TrueTypeRasterizer.cpp src/modules/font/freetype/TrueTypeRasterizer.h ) target_link_libraries(love_font_freetype PUBLIC lovedep::Freetype lovedep::Harfbuzz ) add_library(love_font INTERFACE) target_link_libraries(love_font INTERFACE love_font_root love_font_freetype ) # # love.graphics # add_library(love_graphics_root STATIC src/modules/graphics/Buffer.cpp src/modules/graphics/Buffer.h src/modules/graphics/Deprecations.cpp src/modules/graphics/Deprecations.h src/modules/graphics/Drawable.cpp src/modules/graphics/Drawable.h src/modules/graphics/Font.cpp src/modules/graphics/Font.h src/modules/graphics/Graphics.cpp src/modules/graphics/Graphics.h src/modules/graphics/GraphicsReadback.cpp src/modules/graphics/GraphicsReadback.h src/modules/graphics/Mesh.cpp src/modules/graphics/Mesh.h src/modules/graphics/ParticleSystem.cpp src/modules/graphics/ParticleSystem.h src/modules/graphics/Polyline.cpp src/modules/graphics/Polyline.h src/modules/graphics/Quad.cpp src/modules/graphics/Quad.h src/modules/graphics/renderstate.cpp src/modules/graphics/renderstate.h src/modules/graphics/Resource.h src/modules/graphics/Shader.cpp src/modules/graphics/Shader.h src/modules/graphics/ShaderStage.cpp src/modules/graphics/ShaderStage.h src/modules/graphics/SpriteBatch.cpp src/modules/graphics/SpriteBatch.h src/modules/graphics/StreamBuffer.cpp src/modules/graphics/StreamBuffer.h src/modules/graphics/TextBatch.cpp src/modules/graphics/TextBatch.h src/modules/graphics/Texture.cpp src/modules/graphics/Texture.h src/modules/graphics/vertex.cpp src/modules/graphics/vertex.h src/modules/graphics/Video.cpp src/modules/graphics/Video.h src/modules/graphics/Volatile.cpp src/modules/graphics/Volatile.h src/modules/graphics/wrap_Buffer.cpp src/modules/graphics/wrap_Buffer.h src/modules/graphics/wrap_Font.cpp src/modules/graphics/wrap_Font.h src/modules/graphics/wrap_Graphics.cpp src/modules/graphics/wrap_Graphics.h src/modules/graphics/wrap_Graphics.lua src/modules/graphics/wrap_GraphicsReadback.cpp src/modules/graphics/wrap_GraphicsReadback.h src/modules/graphics/wrap_Mesh.cpp src/modules/graphics/wrap_Mesh.h src/modules/graphics/wrap_ParticleSystem.cpp src/modules/graphics/wrap_ParticleSystem.h src/modules/graphics/wrap_Quad.cpp src/modules/graphics/wrap_Quad.h src/modules/graphics/wrap_Shader.cpp src/modules/graphics/wrap_Shader.h src/modules/graphics/wrap_SpriteBatch.cpp src/modules/graphics/wrap_SpriteBatch.h src/modules/graphics/wrap_Texture.cpp src/modules/graphics/wrap_Texture.h src/modules/graphics/wrap_TextBatch.cpp src/modules/graphics/wrap_TextBatch.h src/modules/graphics/wrap_Video.cpp src/modules/graphics/wrap_Video.h src/modules/graphics/wrap_Video.lua ) target_link_libraries(love_graphics_root PUBLIC lovedep::Lua ) add_library(love_graphics_opengl STATIC src/modules/graphics/opengl/Buffer.cpp src/modules/graphics/opengl/Buffer.h src/modules/graphics/opengl/FenceSync.cpp src/modules/graphics/opengl/FenceSync.h src/modules/graphics/opengl/Graphics.cpp src/modules/graphics/opengl/Graphics.h src/modules/graphics/opengl/GraphicsReadback.cpp src/modules/graphics/opengl/GraphicsReadback.h src/modules/graphics/opengl/OpenGL.cpp src/modules/graphics/opengl/OpenGL.h src/modules/graphics/opengl/Shader.cpp src/modules/graphics/opengl/Shader.h src/modules/graphics/opengl/ShaderStage.cpp src/modules/graphics/opengl/ShaderStage.h src/modules/graphics/opengl/StreamBuffer.cpp src/modules/graphics/opengl/StreamBuffer.h src/modules/graphics/opengl/Texture.cpp src/modules/graphics/opengl/Texture.h ) target_link_libraries(love_graphics_opengl PUBLIC lovedep::SDL ) add_library(love_graphics INTERFACE) target_link_libraries(love_graphics INTERFACE love_graphics_root love_graphics_opengl ) if(APPLE) add_library(love_graphics_metal STATIC src/modules/graphics/metal/Buffer.h src/modules/graphics/metal/Buffer.mm src/modules/graphics/metal/Graphics.h src/modules/graphics/metal/Graphics.mm src/modules/graphics/metal/GraphicsReadback.h src/modules/graphics/metal/GraphicsReadback.mm src/modules/graphics/metal/Metal.h src/modules/graphics/metal/Metal.mm src/modules/graphics/metal/Shader.h src/modules/graphics/metal/Shader.mm src/modules/graphics/metal/ShaderStage.h src/modules/graphics/metal/ShaderStage.mm src/modules/graphics/metal/StreamBuffer.h src/modules/graphics/metal/StreamBuffer.mm src/modules/graphics/metal/Texture.h src/modules/graphics/metal/Texture.mm ) target_link_libraries(love_graphics_metal PUBLIC objc "-framework Metal" "-framework QuartzCore" ) target_link_libraries(love_graphics INTERFACE love_graphics_metal ) else() add_library(love_graphics_vulkan STATIC src/modules/graphics/vulkan/Graphics.h src/modules/graphics/vulkan/Graphics.cpp src/modules/graphics/vulkan/GraphicsReadback.h src/modules/graphics/vulkan/GraphicsReadback.cpp src/modules/graphics/vulkan/Shader.h src/modules/graphics/vulkan/Shader.cpp src/modules/graphics/vulkan/ShaderStage.h src/modules/graphics/vulkan/ShaderStage.cpp src/modules/graphics/vulkan/StreamBuffer.h src/modules/graphics/vulkan/StreamBuffer.cpp src/modules/graphics/vulkan/Buffer.h src/modules/graphics/vulkan/Buffer.cpp src/modules/graphics/vulkan/Texture.h src/modules/graphics/vulkan/Texture.cpp src/modules/graphics/vulkan/Vulkan.h src/modules/graphics/vulkan/Vulkan.cpp src/modules/graphics/vulkan/VulkanWrapper.h ) target_link_libraries(love_graphics_vulkan PUBLIC lovedep::SDL ) target_link_libraries(love_graphics INTERFACE love_graphics_vulkan ) endif() # # love.image # add_library(love_image_root STATIC src/modules/image/CompressedImageData.cpp src/modules/image/CompressedImageData.h src/modules/image/CompressedSlice.cpp src/modules/image/CompressedSlice.h src/modules/image/FormatHandler.cpp src/modules/image/FormatHandler.h src/modules/image/Image.cpp src/modules/image/Image.h src/modules/image/ImageData.cpp src/modules/image/ImageData.h src/modules/image/ImageDataBase.cpp src/modules/image/ImageDataBase.h src/modules/image/wrap_CompressedImageData.cpp src/modules/image/wrap_CompressedImageData.h src/modules/image/wrap_Image.cpp src/modules/image/wrap_Image.h src/modules/image/wrap_ImageData.cpp src/modules/image/wrap_ImageData.h src/modules/image/wrap_ImageData.lua ) target_link_libraries(love_image_root PUBLIC lovedep::Lua ) add_library(love_image_magpie STATIC src/modules/image/magpie/ASTCHandler.cpp src/modules/image/magpie/ASTCHandler.h src/modules/image/magpie/ddsHandler.cpp src/modules/image/magpie/ddsHandler.h src/modules/image/magpie/EXRHandler.cpp src/modules/image/magpie/EXRHandler.h src/modules/image/magpie/KTXHandler.cpp src/modules/image/magpie/KTXHandler.h src/modules/image/magpie/PKMHandler.cpp src/modules/image/magpie/PKMHandler.h src/modules/image/magpie/PNGHandler.cpp src/modules/image/magpie/PNGHandler.h src/modules/image/magpie/PVRHandler.cpp src/modules/image/magpie/PVRHandler.h src/modules/image/magpie/STBHandler.cpp src/modules/image/magpie/STBHandler.h ) target_link_libraries(love_image_magpie PUBLIC lovedep::Zlib ) add_library(love_image INTERFACE) target_link_libraries(love_image INTERFACE love_image_root love_image_magpie ) # # love.joystick # add_library(love_joystick_root STATIC src/modules/joystick/Joystick.cpp src/modules/joystick/Joystick.h src/modules/joystick/JoystickModule.h src/modules/joystick/wrap_Joystick.cpp src/modules/joystick/wrap_Joystick.h src/modules/joystick/wrap_JoystickModule.cpp src/modules/joystick/wrap_JoystickModule.h ) target_link_libraries(love_joystick_root PUBLIC lovedep::Lua ) add_library(love_joystick_sdl STATIC src/modules/joystick/sdl/Joystick.cpp src/modules/joystick/sdl/Joystick.h src/modules/joystick/sdl/JoystickModule.cpp src/modules/joystick/sdl/JoystickModule.h ) target_link_libraries(love_joystick_sdl PUBLIC lovedep::SDL ) add_library(love_joystick INTERFACE) target_link_libraries(love_joystick INTERFACE love_joystick_root love_joystick_sdl ) # # love.keyboard # add_library(love_keyboard_root STATIC src/modules/keyboard/Keyboard.cpp src/modules/keyboard/Keyboard.h src/modules/keyboard/wrap_Keyboard.cpp src/modules/keyboard/wrap_Keyboard.h ) target_link_libraries(love_keyboard_root PUBLIC lovedep::Lua lovedep::SDL ) add_library(love_keyboard_sdl STATIC src/modules/keyboard/sdl/Keyboard.cpp src/modules/keyboard/sdl/Keyboard.h ) target_link_libraries(love_keyboard_sdl PUBLIC lovedep::SDL ) add_library(love_keyboard INTERFACE) target_link_libraries(love_keyboard INTERFACE love_keyboard_root love_keyboard_sdl ) # # love.math # add_library(love_math STATIC src/modules/math/BezierCurve.cpp src/modules/math/BezierCurve.h src/modules/math/MathModule.cpp src/modules/math/MathModule.h src/modules/math/RandomGenerator.cpp src/modules/math/RandomGenerator.h src/modules/math/Transform.cpp src/modules/math/Transform.h src/modules/math/wrap_BezierCurve.cpp src/modules/math/wrap_BezierCurve.h src/modules/math/wrap_Math.cpp src/modules/math/wrap_Math.h src/modules/math/wrap_Math.lua src/modules/math/wrap_RandomGenerator.cpp src/modules/math/wrap_RandomGenerator.h src/modules/math/wrap_RandomGenerator.lua src/modules/math/wrap_Transform.cpp src/modules/math/wrap_Transform.h ) target_link_libraries(love_math PUBLIC lovedep::Lua ) # # love.mouse # add_library(love_mouse_root STATIC src/modules/mouse/Cursor.cpp src/modules/mouse/Cursor.h src/modules/mouse/Mouse.h src/modules/mouse/wrap_Cursor.cpp src/modules/mouse/wrap_Cursor.h src/modules/mouse/wrap_Mouse.cpp src/modules/mouse/wrap_Mouse.h ) target_link_libraries(love_mouse_root PUBLIC lovedep::Lua lovedep::SDL ) add_library(love_mouse_sdl STATIC src/modules/mouse/sdl/Cursor.cpp src/modules/mouse/sdl/Cursor.h src/modules/mouse/sdl/Mouse.cpp src/modules/mouse/sdl/Mouse.h ) target_link_libraries(love_mouse_sdl PUBLIC lovedep::SDL ) add_library(love_mouse INTERFACE) target_link_libraries(love_mouse INTERFACE love_mouse_root love_mouse_sdl ) # # love.physics # add_library(love_physics_root STATIC src/modules/physics/Body.cpp src/modules/physics/Body.h src/modules/physics/Joint.cpp src/modules/physics/Joint.h src/modules/physics/Shape.cpp src/modules/physics/Shape.h ) add_library(love_physics_box2d STATIC src/modules/physics/box2d/Body.cpp src/modules/physics/box2d/Body.h src/modules/physics/box2d/ChainShape.cpp src/modules/physics/box2d/ChainShape.h src/modules/physics/box2d/CircleShape.cpp src/modules/physics/box2d/CircleShape.h src/modules/physics/box2d/Contact.cpp src/modules/physics/box2d/Contact.h src/modules/physics/box2d/DistanceJoint.cpp src/modules/physics/box2d/DistanceJoint.h src/modules/physics/box2d/EdgeShape.cpp src/modules/physics/box2d/EdgeShape.h src/modules/physics/box2d/FrictionJoint.cpp src/modules/physics/box2d/FrictionJoint.h src/modules/physics/box2d/GearJoint.cpp src/modules/physics/box2d/GearJoint.h src/modules/physics/box2d/Joint.cpp src/modules/physics/box2d/Joint.h src/modules/physics/box2d/MotorJoint.cpp src/modules/physics/box2d/MotorJoint.h src/modules/physics/box2d/MouseJoint.cpp src/modules/physics/box2d/MouseJoint.h src/modules/physics/box2d/Physics.cpp src/modules/physics/box2d/Physics.h src/modules/physics/box2d/PolygonShape.cpp src/modules/physics/box2d/PolygonShape.h src/modules/physics/box2d/PrismaticJoint.cpp src/modules/physics/box2d/PrismaticJoint.h src/modules/physics/box2d/PulleyJoint.cpp src/modules/physics/box2d/PulleyJoint.h src/modules/physics/box2d/RevoluteJoint.cpp src/modules/physics/box2d/RevoluteJoint.h src/modules/physics/box2d/RopeJoint.cpp src/modules/physics/box2d/RopeJoint.h src/modules/physics/box2d/Shape.cpp src/modules/physics/box2d/Shape.h src/modules/physics/box2d/WeldJoint.cpp src/modules/physics/box2d/WeldJoint.h src/modules/physics/box2d/WheelJoint.cpp src/modules/physics/box2d/WheelJoint.h src/modules/physics/box2d/World.cpp src/modules/physics/box2d/World.h src/modules/physics/box2d/wrap_Body.cpp src/modules/physics/box2d/wrap_Body.h src/modules/physics/box2d/wrap_ChainShape.cpp src/modules/physics/box2d/wrap_ChainShape.h src/modules/physics/box2d/wrap_CircleShape.cpp src/modules/physics/box2d/wrap_CircleShape.h src/modules/physics/box2d/wrap_Contact.cpp src/modules/physics/box2d/wrap_Contact.h src/modules/physics/box2d/wrap_DistanceJoint.cpp src/modules/physics/box2d/wrap_DistanceJoint.h src/modules/physics/box2d/wrap_EdgeShape.cpp src/modules/physics/box2d/wrap_EdgeShape.h src/modules/physics/box2d/wrap_FrictionJoint.cpp src/modules/physics/box2d/wrap_FrictionJoint.h src/modules/physics/box2d/wrap_GearJoint.cpp src/modules/physics/box2d/wrap_GearJoint.h src/modules/physics/box2d/wrap_Joint.cpp src/modules/physics/box2d/wrap_Joint.h src/modules/physics/box2d/wrap_MotorJoint.cpp src/modules/physics/box2d/wrap_MotorJoint.h src/modules/physics/box2d/wrap_MouseJoint.cpp src/modules/physics/box2d/wrap_MouseJoint.h src/modules/physics/box2d/wrap_Physics.cpp src/modules/physics/box2d/wrap_Physics.h src/modules/physics/box2d/wrap_PolygonShape.cpp src/modules/physics/box2d/wrap_PolygonShape.h src/modules/physics/box2d/wrap_PrismaticJoint.cpp src/modules/physics/box2d/wrap_PrismaticJoint.h src/modules/physics/box2d/wrap_PulleyJoint.cpp src/modules/physics/box2d/wrap_PulleyJoint.h src/modules/physics/box2d/wrap_RevoluteJoint.cpp src/modules/physics/box2d/wrap_RevoluteJoint.h src/modules/physics/box2d/wrap_RopeJoint.cpp src/modules/physics/box2d/wrap_RopeJoint.h src/modules/physics/box2d/wrap_Shape.cpp src/modules/physics/box2d/wrap_Shape.h src/modules/physics/box2d/wrap_WeldJoint.cpp src/modules/physics/box2d/wrap_WeldJoint.h src/modules/physics/box2d/wrap_WheelJoint.cpp src/modules/physics/box2d/wrap_WheelJoint.h src/modules/physics/box2d/wrap_World.cpp src/modules/physics/box2d/wrap_World.h ) target_link_libraries(love_physics_box2d PUBLIC lovedep::Lua ) add_library(love_physics INTERFACE) target_link_libraries(love_physics INTERFACE love_physics_root love_physics_box2d ) # # love.sensor # add_library(love_sensor_root STATIC src/modules/sensor/Sensor.cpp src/modules/sensor/Sensor.h src/modules/sensor/wrap_Sensor.cpp src/modules/sensor/wrap_Sensor.h ) target_link_libraries(love_sensor_root PUBLIC lovedep::Lua lovedep::SDL ) add_library(love_sensor_sdl STATIC src/modules/sensor/sdl/Sensor.cpp src/modules/sensor/sdl/Sensor.h ) target_link_libraries(love_sensor_sdl PUBLIC lovedep::SDL ) add_library(love_sensor INTERFACE) target_link_libraries(love_sensor INTERFACE love_sensor_root love_sensor_sdl ) # # love.sound # add_library(love_sound_root STATIC src/modules/sound/Decoder.cpp src/modules/sound/Decoder.h src/modules/sound/Sound.cpp src/modules/sound/Sound.h src/modules/sound/SoundData.cpp src/modules/sound/SoundData.h src/modules/sound/wrap_Decoder.cpp src/modules/sound/wrap_Decoder.h src/modules/sound/wrap_Sound.cpp src/modules/sound/wrap_Sound.h src/modules/sound/wrap_SoundData.cpp src/modules/sound/wrap_SoundData.h src/modules/sound/wrap_SoundData.lua ) target_link_libraries(love_sound_root PUBLIC lovedep::Lua ) add_library(love_sound_lullaby STATIC src/modules/sound/lullaby/FLACDecoder.cpp src/modules/sound/lullaby/FLACDecoder.h src/modules/sound/lullaby/ModPlugDecoder.cpp src/modules/sound/lullaby/ModPlugDecoder.h src/modules/sound/lullaby/MP3Decoder.h src/modules/sound/lullaby/MP3Decoder.cpp src/modules/sound/lullaby/Sound.cpp src/modules/sound/lullaby/Sound.h src/modules/sound/lullaby/VorbisDecoder.cpp src/modules/sound/lullaby/VorbisDecoder.h src/modules/sound/lullaby/WaveDecoder.cpp src/modules/sound/lullaby/WaveDecoder.h ) target_link_libraries(love_sound_lullaby PUBLIC lovedep::Modplug lovedep::Vorbis lovedep::Ogg ) add_library(love_sound INTERFACE) target_link_libraries(love_sound INTERFACE love_sound_root love_sound_lullaby ) # # love.system # add_library(love_system_root STATIC src/modules/system/System.cpp src/modules/system/System.h src/modules/system/wrap_System.cpp src/modules/system/wrap_System.h ) target_link_libraries(love_system_root PUBLIC lovedep::Lua lovedep::SDL ) add_library(love_system_sdl STATIC src/modules/system/sdl/System.cpp src/modules/system/sdl/System.h ) target_link_libraries(love_system_sdl PUBLIC lovedep::SDL ) add_library(love_system INTERFACE) target_link_libraries(love_system INTERFACE love_system_root love_system_sdl ) # # love.thread # add_library(love_thread_root STATIC src/modules/thread/Channel.cpp src/modules/thread/Channel.h src/modules/thread/LuaThread.cpp src/modules/thread/LuaThread.h src/modules/thread/Thread.h src/modules/thread/ThreadModule.cpp src/modules/thread/ThreadModule.h src/modules/thread/threads.cpp src/modules/thread/threads.h src/modules/thread/wrap_Channel.cpp src/modules/thread/wrap_Channel.h src/modules/thread/wrap_LuaThread.cpp src/modules/thread/wrap_LuaThread.h src/modules/thread/wrap_ThreadModule.cpp src/modules/thread/wrap_ThreadModule.h ) target_link_libraries(love_thread_root PUBLIC lovedep::Lua ) add_library(love_thread_sdl STATIC src/modules/thread/sdl/Thread.cpp src/modules/thread/sdl/Thread.h src/modules/thread/sdl/threads.cpp src/modules/thread/sdl/threads.h ) target_link_libraries(love_thread_sdl PUBLIC lovedep::SDL ) add_library(love_thread INTERFACE) target_link_libraries(love_thread INTERFACE love_thread_root love_thread_sdl ) # # love.timer # add_library(love_timer STATIC src/modules/timer/Timer.cpp src/modules/timer/Timer.h src/modules/timer/wrap_Timer.cpp src/modules/timer/wrap_Timer.h ) target_link_libraries(love_timer PUBLIC lovedep::Lua ) # # love.touch # add_library(love_touch_root STATIC src/modules/touch/Touch.cpp src/modules/touch/Touch.h src/modules/touch/wrap_Touch.cpp src/modules/touch/wrap_Touch.h ) target_link_libraries(love_touch_root PUBLIC lovedep::Lua lovedep::SDL ) add_library(love_touch_sdl STATIC src/modules/touch/sdl/Touch.cpp src/modules/touch/sdl/Touch.h ) target_link_libraries(love_touch_sdl PUBLIC lovedep::SDL ) add_library(love_touch INTERFACE) target_link_libraries(love_touch INTERFACE love_touch_root love_touch_sdl ) # # love.video # add_library(love_video_root STATIC src/modules/video/Video.h src/modules/video/VideoStream.cpp src/modules/video/VideoStream.h src/modules/video/wrap_Video.cpp src/modules/video/wrap_Video.h src/modules/video/wrap_VideoStream.cpp src/modules/video/wrap_VideoStream.h ) target_link_libraries(love_video_root PUBLIC lovedep::Lua lovedep::Theora lovedep::Ogg ) add_library(love_video_theora STATIC src/modules/video/theora/Video.cpp src/modules/video/theora/Video.h src/modules/video/theora/OggDemuxer.cpp src/modules/video/theora/OggDemuxer.h src/modules/video/theora/TheoraVideoStream.cpp src/modules/video/theora/TheoraVideoStream.h ) target_link_libraries(love_video_theora PUBLIC lovedep::Theora lovedep::Ogg ) add_library(love_video INTERFACE) target_link_libraries(love_video INTERFACE love_video_root love_video_theora ) # # love.window # add_library(love_window_root STATIC src/modules/window/Window.cpp src/modules/window/Window.h src/modules/window/wrap_Window.cpp src/modules/window/wrap_Window.h ) target_link_libraries(love_window_root PUBLIC lovedep::Lua lovedep::SDL ) add_library(love_window_sdl STATIC src/modules/window/sdl/Window.cpp src/modules/window/sdl/Window.h ) target_link_libraries(love_window_sdl PUBLIC lovedep::SDL ) add_library(love_window INTERFACE) target_link_libraries(love_window INTERFACE love_window_root love_window_sdl ) ################################### # Third-party libraries ################################### # # Box2D # add_library(love_3p_box2d src/libraries/box2d/Box2D.h src/libraries/box2d/collision/b2_broad_phase.cpp src/libraries/box2d/collision/b2_chain_shape.cpp src/libraries/box2d/collision/b2_circle_shape.cpp src/libraries/box2d/collision/b2_collide_circle.cpp src/libraries/box2d/collision/b2_collide_edge.cpp src/libraries/box2d/collision/b2_collide_polygon.cpp src/libraries/box2d/collision/b2_collision.cpp src/libraries/box2d/collision/b2_distance.cpp src/libraries/box2d/collision/b2_dynamic_tree.cpp src/libraries/box2d/collision/b2_edge_shape.cpp src/libraries/box2d/collision/b2_polygon_shape.cpp src/libraries/box2d/collision/b2_time_of_impact.cpp src/libraries/box2d/common/b2_block_allocator.cpp src/libraries/box2d/common/b2_draw.cpp src/libraries/box2d/common/b2_math.cpp src/libraries/box2d/common/b2_settings.cpp src/libraries/box2d/common/b2_stack_allocator.cpp src/libraries/box2d/common/b2_timer.cpp src/libraries/box2d/dynamics/b2_body.cpp src/libraries/box2d/dynamics/b2_chain_circle_contact.cpp src/libraries/box2d/dynamics/b2_chain_circle_contact.h src/libraries/box2d/dynamics/b2_chain_polygon_contact.cpp src/libraries/box2d/dynamics/b2_chain_polygon_contact.h src/libraries/box2d/dynamics/b2_circle_contact.cpp src/libraries/box2d/dynamics/b2_circle_contact.h src/libraries/box2d/dynamics/b2_contact.cpp src/libraries/box2d/dynamics/b2_contact_manager.cpp src/libraries/box2d/dynamics/b2_contact_solver.cpp src/libraries/box2d/dynamics/b2_contact_solver.h src/libraries/box2d/dynamics/b2_distance_joint.cpp src/libraries/box2d/dynamics/b2_edge_circle_contact.cpp src/libraries/box2d/dynamics/b2_edge_circle_contact.h src/libraries/box2d/dynamics/b2_edge_polygon_contact.cpp src/libraries/box2d/dynamics/b2_edge_polygon_contact.h src/libraries/box2d/dynamics/b2_fixture.cpp src/libraries/box2d/dynamics/b2_friction_joint.cpp src/libraries/box2d/dynamics/b2_gear_joint.cpp src/libraries/box2d/dynamics/b2_island.cpp src/libraries/box2d/dynamics/b2_island.h src/libraries/box2d/dynamics/b2_joint.cpp src/libraries/box2d/dynamics/b2_motor_joint.cpp src/libraries/box2d/dynamics/b2_mouse_joint.cpp src/libraries/box2d/dynamics/b2_polygon_circle_contact.cpp src/libraries/box2d/dynamics/b2_polygon_circle_contact.h src/libraries/box2d/dynamics/b2_polygon_contact.cpp src/libraries/box2d/dynamics/b2_polygon_contact.h src/libraries/box2d/dynamics/b2_prismatic_joint.cpp src/libraries/box2d/dynamics/b2_pulley_joint.cpp src/libraries/box2d/dynamics/b2_revolute_joint.cpp src/libraries/box2d/dynamics/b2_weld_joint.cpp src/libraries/box2d/dynamics/b2_wheel_joint.cpp src/libraries/box2d/dynamics/b2_world.cpp src/libraries/box2d/dynamics/b2_world_callbacks.cpp src/libraries/box2d/rope/b2_rope.cpp ) love_disable_warnings(love_3p_box2d) # # ddsparse # add_library(love_3p_ddsparse src/libraries/ddsparse/ddsinfo.h src/libraries/ddsparse/ddsparse.cpp src/libraries/ddsparse/ddsparse.h ) # # dr_flac # # dr_flac has no implementation files of its own. #add_library(love_3p_drflac # src/libraries/dr/dr_flac.h #) # # dr_mp3 # # dr_mp3 has no implementation files of its own. #add_library(love_3p_drmp3 # src/libraries/dr/dr_mp3.h #) # # enet # add_library(love_3p_enet src/libraries/enet/enet.cpp src/libraries/enet/lua-enet.h src/libraries/enet/libenet/callbacks.c src/libraries/enet/libenet/compress.c src/libraries/enet/libenet/host.c src/libraries/enet/libenet/list.c src/libraries/enet/libenet/packet.c src/libraries/enet/libenet/peer.c src/libraries/enet/libenet/protocol.c src/libraries/enet/libenet/unix.c src/libraries/enet/libenet/win32.c src/libraries/enet/libenet/include/enet/enet.h src/libraries/enet/libenet/include/enet/list.h src/libraries/enet/libenet/include/enet/protocol.h src/libraries/enet/libenet/include/enet/time.h src/libraries/enet/libenet/include/enet/types.h src/libraries/enet/libenet/include/enet/unix.h src/libraries/enet/libenet/include/enet/utility.h src/libraries/enet/libenet/include/enet/win32.h ) love_disable_warnings(love_3p_enet) target_link_libraries(love_3p_enet lovedep::Lua) target_include_directories(love_3p_enet PUBLIC src/libraries/enet/libenet/include) if(MINGW) target_link_libraries(love_3p_enet winmm.a) endif() # # GLAD # add_library(love_3p_glad src/libraries/glad/glad.cpp src/libraries/glad/glad.hpp src/libraries/glad/gladfuncs.hpp ) # # glslang # add_library(love_3p_glslang src/libraries/glslang/glslang/build_info.h src/libraries/glslang/glslang/GenericCodeGen/CodeGen.cpp src/libraries/glslang/glslang/GenericCodeGen/Link.cpp src/libraries/glslang/glslang/Include/arrays.h src/libraries/glslang/glslang/Include/BaseTypes.h src/libraries/glslang/glslang/Include/Common.h src/libraries/glslang/glslang/Include/ConstantUnion.h src/libraries/glslang/glslang/Include/InfoSink.h src/libraries/glslang/glslang/Include/InitializeGlobals.h src/libraries/glslang/glslang/Include/intermediate.h src/libraries/glslang/glslang/Include/PoolAlloc.h src/libraries/glslang/glslang/Include/ResourceLimits.h src/libraries/glslang/glslang/Include/ShHandle.h src/libraries/glslang/glslang/Include/SpirvIntrinsics.h src/libraries/glslang/glslang/Include/Types.h src/libraries/glslang/glslang/Include/visibility.h src/libraries/glslang/glslang/MachineIndependent/preprocessor/Pp.cpp src/libraries/glslang/glslang/MachineIndependent/preprocessor/PpAtom.cpp src/libraries/glslang/glslang/MachineIndependent/preprocessor/PpContext.cpp src/libraries/glslang/glslang/MachineIndependent/preprocessor/PpContext.h src/libraries/glslang/glslang/MachineIndependent/preprocessor/PpScanner.cpp src/libraries/glslang/glslang/MachineIndependent/preprocessor/PpTokens.cpp src/libraries/glslang/glslang/MachineIndependent/preprocessor/PpTokens.h src/libraries/glslang/glslang/MachineIndependent/attribute.cpp src/libraries/glslang/glslang/MachineIndependent/attribute.h src/libraries/glslang/glslang/MachineIndependent/Constant.cpp src/libraries/glslang/glslang/MachineIndependent/gl_types.h src/libraries/glslang/glslang/MachineIndependent/glslang_tab.cpp src/libraries/glslang/glslang/MachineIndependent/glslang_tab.cpp.h src/libraries/glslang/glslang/MachineIndependent/InfoSink.cpp src/libraries/glslang/glslang/MachineIndependent/Initialize.cpp src/libraries/glslang/glslang/MachineIndependent/Initialize.h src/libraries/glslang/glslang/MachineIndependent/Intermediate.cpp src/libraries/glslang/glslang/MachineIndependent/intermOut.cpp src/libraries/glslang/glslang/MachineIndependent/IntermTraverse.cpp src/libraries/glslang/glslang/MachineIndependent/iomapper.cpp src/libraries/glslang/glslang/MachineIndependent/iomapper.h src/libraries/glslang/glslang/MachineIndependent/limits.cpp src/libraries/glslang/glslang/MachineIndependent/linkValidate.cpp src/libraries/glslang/glslang/MachineIndependent/LiveTraverser.h src/libraries/glslang/glslang/MachineIndependent/localintermediate.h src/libraries/glslang/glslang/MachineIndependent/parseConst.cpp src/libraries/glslang/glslang/MachineIndependent/ParseContextBase.cpp src/libraries/glslang/glslang/MachineIndependent/ParseHelper.cpp src/libraries/glslang/glslang/MachineIndependent/ParseHelper.h src/libraries/glslang/glslang/MachineIndependent/parseVersions.h src/libraries/glslang/glslang/MachineIndependent/pch.h src/libraries/glslang/glslang/MachineIndependent/PoolAlloc.cpp src/libraries/glslang/glslang/MachineIndependent/propagateNoContraction.cpp src/libraries/glslang/glslang/MachineIndependent/propagateNoContraction.h src/libraries/glslang/glslang/MachineIndependent/reflection.cpp src/libraries/glslang/glslang/MachineIndependent/reflection.h src/libraries/glslang/glslang/MachineIndependent/RemoveTree.cpp src/libraries/glslang/glslang/MachineIndependent/RemoveTree.h src/libraries/glslang/glslang/MachineIndependent/Scan.cpp src/libraries/glslang/glslang/MachineIndependent/Scan.h src/libraries/glslang/glslang/MachineIndependent/ScanContext.h src/libraries/glslang/glslang/MachineIndependent/ShaderLang.cpp src/libraries/glslang/glslang/MachineIndependent/span.h src/libraries/glslang/glslang/MachineIndependent/SpirvIntrinsics.cpp src/libraries/glslang/glslang/MachineIndependent/SymbolTable.cpp src/libraries/glslang/glslang/MachineIndependent/SymbolTable.h src/libraries/glslang/glslang/MachineIndependent/Versions.cpp src/libraries/glslang/glslang/MachineIndependent/Versions.h src/libraries/glslang/glslang/OSDependent/osinclude.h src/libraries/glslang/glslang/Public/ResourceLimits.h src/libraries/glslang/glslang/Public/ShaderLang.h src/libraries/glslang/glslang/ResourceLimits/ResourceLimits.cpp src/libraries/glslang/SPIRV/bitutils.h src/libraries/glslang/SPIRV/disassemble.cpp src/libraries/glslang/SPIRV/disassemble.h src/libraries/glslang/SPIRV/doc.cpp src/libraries/glslang/SPIRV/doc.h src/libraries/glslang/SPIRV/GLSL.ext.AMD.h src/libraries/glslang/SPIRV/GLSL.ext.ARM.h src/libraries/glslang/SPIRV/GLSL.ext.EXT.h src/libraries/glslang/SPIRV/GLSL.ext.KHR.h src/libraries/glslang/SPIRV/GLSL.ext.NV.h src/libraries/glslang/SPIRV/GLSL.ext.QCOM.h src/libraries/glslang/SPIRV/GLSL.std.450.h src/libraries/glslang/SPIRV/GlslangToSpv.cpp src/libraries/glslang/SPIRV/GlslangToSpv.h src/libraries/glslang/SPIRV/hex_float.h src/libraries/glslang/SPIRV/InReadableOrder.cpp src/libraries/glslang/SPIRV/Logger.cpp src/libraries/glslang/SPIRV/Logger.h src/libraries/glslang/SPIRV/NonSemanticDebugPrintf.h src/libraries/glslang/SPIRV/NonSemanticShaderDebugInfo100.h src/libraries/glslang/SPIRV/spirv.hpp11 src/libraries/glslang/SPIRV/SpvBuilder.cpp src/libraries/glslang/SPIRV/SpvBuilder.h src/libraries/glslang/SPIRV/spvIR.h src/libraries/glslang/SPIRV/spvUtil.h src/libraries/glslang/SPIRV/SpvPostProcess.cpp src/libraries/glslang/SPIRV/SPVRemapper.cpp src/libraries/glslang/SPIRV/SPVRemapper.h src/libraries/glslang/SPIRV/SpvTools.cpp src/libraries/glslang/SPIRV/SpvTools.h ) if(MSVC OR MINGW) target_sources(love_3p_glslang PRIVATE src/libraries/glslang/glslang/OSDependent/Windows/ossource.cpp ) else() target_sources(love_3p_glslang PRIVATE src/libraries/glslang/glslang/OSDependent/Unix/ossource.cpp ) endif() # # LodePNG # add_library(love_3p_lodepng src/libraries/lodepng/lodepng.cpp src/libraries/lodepng/lodepng.h ) # # luasocket # if(MINGW) set(WIN32_LIB_EXT .a) else() set(WIN32_LIB_EXT .lib) endif() add_library(love_3p_luasocket src/libraries/luasocket/luasocket.cpp src/libraries/luasocket/luasocket.h src/libraries/luasocket/libluasocket/auxiliar.c src/libraries/luasocket/libluasocket/auxiliar.h src/libraries/luasocket/libluasocket/buffer.c src/libraries/luasocket/libluasocket/buffer.h src/libraries/luasocket/libluasocket/compat.c src/libraries/luasocket/libluasocket/compat.h src/libraries/luasocket/libluasocket/except.c src/libraries/luasocket/libluasocket/except.h src/libraries/luasocket/libluasocket/ftp.lua.h src/libraries/luasocket/libluasocket/headers.lua.h src/libraries/luasocket/libluasocket/http.lua.h src/libraries/luasocket/libluasocket/inet.c src/libraries/luasocket/libluasocket/inet.h src/libraries/luasocket/libluasocket/io.c src/libraries/luasocket/libluasocket/io.h src/libraries/luasocket/libluasocket/ltn12.lua.h src/libraries/luasocket/libluasocket/luasocket.c src/libraries/luasocket/libluasocket/luasocket.h src/libraries/luasocket/libluasocket/mbox.lua.h src/libraries/luasocket/libluasocket/mime.c src/libraries/luasocket/libluasocket/mime.h src/libraries/luasocket/libluasocket/mime.lua.h src/libraries/luasocket/libluasocket/options.c src/libraries/luasocket/libluasocket/options.h src/libraries/luasocket/libluasocket/pierror.h src/libraries/luasocket/libluasocket/select.c src/libraries/luasocket/libluasocket/select.h src/libraries/luasocket/libluasocket/smtp.lua.h src/libraries/luasocket/libluasocket/socket.h src/libraries/luasocket/libluasocket/socket.lua.h src/libraries/luasocket/libluasocket/tcp.c src/libraries/luasocket/libluasocket/tcp.h src/libraries/luasocket/libluasocket/timeout.c src/libraries/luasocket/libluasocket/timeout.h src/libraries/luasocket/libluasocket/tp.lua.h src/libraries/luasocket/libluasocket/udp.c src/libraries/luasocket/libluasocket/udp.h src/libraries/luasocket/libluasocket/url.lua.h src/libraries/luasocket/libluasocket/unix.c src/libraries/luasocket/libluasocket/unix.h src/libraries/luasocket/libluasocket/unixdgram.c src/libraries/luasocket/libluasocket/unixdgram.h src/libraries/luasocket/libluasocket/unixstream.c src/libraries/luasocket/libluasocket/unixstream.h ) target_link_libraries(love_3p_luasocket lovedep::Lua) love_disable_warnings(love_3p_luasocket) if(MSVC OR MINGW) target_sources(love_3p_luasocket PRIVATE src/libraries/luasocket/libluasocket/wsocket.c src/libraries/luasocket/libluasocket/wsocket.h ) target_link_libraries(love_3p_luasocket ws2_32${WIN32_LIB_EXT} ) else() target_sources(love_3p_luasocket PRIVATE src/libraries/luasocket/libluasocket/serial.c src/libraries/luasocket/libluasocket/usocket.c src/libraries/luasocket/libluasocket/usocket.h ) endif() # # APIs from Lua 5.3 # add_library(love_3p_lua53 src/libraries/lua53/lprefix.h src/libraries/lua53/lstrlib.c src/libraries/lua53/lstrlib.h src/libraries/lua53/lutf8lib.c src/libraries/lua53/lutf8lib.h ) target_link_libraries(love_3p_lua53 lovedep::Lua) # # Lua HTTPS # add_library(love_3p_luahttps # These are platform-dependent but have ifdef guards to make sure they only # compile on supported platforms. src/libraries/luahttps/src/android/AndroidClient.cpp src/libraries/luahttps/src/android/AndroidClient.h src/libraries/luahttps/src/common/config.h src/libraries/luahttps/src/common/Connection.h src/libraries/luahttps/src/common/ConnectionClient.h src/libraries/luahttps/src/common/HTTPRequest.cpp src/libraries/luahttps/src/common/HTTPRequest.h src/libraries/luahttps/src/common/HTTPS.cpp src/libraries/luahttps/src/common/HTTPS.h src/libraries/luahttps/src/common/HTTPSClient.cpp src/libraries/luahttps/src/common/HTTPSClient.h src/libraries/luahttps/src/common/LibraryLoader.h src/libraries/luahttps/src/common/PlaintextConnection.cpp src/libraries/luahttps/src/common/PlaintextConnection.h src/libraries/luahttps/src/generic/CurlClient.cpp src/libraries/luahttps/src/generic/CurlClient.h src/libraries/luahttps/src/generic/LinktimeLibraryLoader.cpp src/libraries/luahttps/src/generic/OpenSSLConnection.cpp src/libraries/luahttps/src/generic/OpenSSLConnection.h src/libraries/luahttps/src/generic/UnixLibraryLoader.cpp src/libraries/luahttps/src/lua/main.cpp src/libraries/luahttps/src/windows/SChannelConnection.cpp src/libraries/luahttps/src/windows/SChannelConnection.h src/libraries/luahttps/src/windows/WindowsLibraryLoader.cpp src/libraries/luahttps/src/windows/WinINetClient.cpp src/libraries/luahttps/src/windows/WinINetClient.h ) target_link_libraries(love_3p_luahttps lovedep::Lua) if (APPLE) target_sources(love_3p_luahttps PRIVATE src/libraries/luahttps/src/apple/NSURLClient.mm src/libraries/luahttps/src/apple/NSURLClient.h ) target_compile_options(love_3p_luahttps PRIVATE -fobjc-arc) endif() if(MSVC) target_link_libraries(love_3p_luahttps ws2_32 secur32 ) if(NOT CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") target_link_libraries(love_3p_luahttps wininet ) endif() endif() # # lz4 # add_library(love_3p_lz4 src/libraries/lz4/lz4.c src/libraries/lz4/lz4.h src/libraries/lz4/lz4hc.c src/libraries/lz4/lz4hc.h src/libraries/lz4/lz4opt.h ) # # noise1234 # add_library(love_3p_noise1234 src/libraries/noise1234/noise1234.cpp src/libraries/noise1234/noise1234.h src/libraries/noise1234/simplexnoise1234.cpp src/libraries/noise1234/simplexnoise1234.h ) # # physfs # add_library(love_3p_physfs src/libraries/physfs/physfs_archiver_7z.c src/libraries/physfs/physfs_archiver_dir.c src/libraries/physfs/physfs_archiver_grp.c src/libraries/physfs/physfs_archiver_hog.c src/libraries/physfs/physfs_archiver_iso9660.c src/libraries/physfs/physfs_archiver_mvl.c src/libraries/physfs/physfs_archiver_qpak.c src/libraries/physfs/physfs_archiver_slb.c src/libraries/physfs/physfs_archiver_unpacked.c src/libraries/physfs/physfs_archiver_vdf.c src/libraries/physfs/physfs_archiver_wad.c src/libraries/physfs/physfs_archiver_zip.c src/libraries/physfs/physfs_byteorder.c src/libraries/physfs/physfs_casefolding.h src/libraries/physfs/physfs_internal.h src/libraries/physfs/physfs_lzmasdk.h src/libraries/physfs/physfs_miniz.h src/libraries/physfs/physfs_platform_android.c src/libraries/physfs/physfs_platform_haiku.cpp src/libraries/physfs/physfs_platform_os2.c src/libraries/physfs/physfs_platform_posix.c src/libraries/physfs/physfs_platform_qnx.c src/libraries/physfs/physfs_platform_unix.c src/libraries/physfs/physfs_platform_windows.c src/libraries/physfs/physfs_platform_winrt.cpp src/libraries/physfs/physfs_platforms.h src/libraries/physfs/physfs_unicode.c src/libraries/physfs/physfs.c src/libraries/physfs/physfs.h ) love_disable_warnings(love_3p_physfs) if(APPLE) target_sources(love_3p_physfs PRIVATE src/libraries/physfs/physfs_platform_apple.m ) target_link_libraries(love_3p_physfs INTERFACE "-framework IOKit" ) endif() # # spirv_cross # add_library(love_3p_spirv_cross src/libraries/spirv_cross/GLSL.std.450.h src/libraries/spirv_cross/spirv_cfg.cpp src/libraries/spirv_cross/spirv_cfg.hpp src/libraries/spirv_cross/spirv_common.hpp src/libraries/spirv_cross/spirv_cpp.cpp src/libraries/spirv_cross/spirv_cpp.hpp src/libraries/spirv_cross/spirv_cross_containers.hpp src/libraries/spirv_cross/spirv_cross_error_handling.hpp src/libraries/spirv_cross/spirv_cross_parsed_ir.cpp src/libraries/spirv_cross/spirv_cross_parsed_ir.hpp src/libraries/spirv_cross/spirv_cross_util.cpp src/libraries/spirv_cross/spirv_cross_util.hpp src/libraries/spirv_cross/spirv_cross.cpp src/libraries/spirv_cross/spirv_cross.hpp src/libraries/spirv_cross/spirv_glsl.cpp src/libraries/spirv_cross/spirv_glsl.hpp src/libraries/spirv_cross/spirv_hlsl.cpp src/libraries/spirv_cross/spirv_hlsl.hpp src/libraries/spirv_cross/spirv_msl.cpp src/libraries/spirv_cross/spirv_msl.hpp src/libraries/spirv_cross/spirv_parser.cpp src/libraries/spirv_cross/spirv_parser.hpp src/libraries/spirv_cross/spirv_reflect.cpp src/libraries/spirv_cross/spirv_reflect.hpp src/libraries/spirv_cross/spirv.hpp ) # # stb_image # # stb_image has no implementation files of its own. #add_library(love_3p_stb # src/libraries/stb/stb_image.h #) # # tiny exr # # tinyexr has no implementation files of its own. #add_library(love_3p_tinyexr # src/libraries/tinyexr/tinyexr.h #) # # utf8 # # This library is all headers ... so there is no need to # add_library() here. #add_library(love_3p_utf8 # src/libraries/utf8/utf8.h # src/libraries/utf8/utf8/checked.h # src/libraries/utf8/utf8/core.h # src/libraries/utf8/utf8/unchecked.h #) # # vma # # vulkan memory allocatory has no implementation files of its own. #add_library(love_3p_vma # src/libraries/vma/vk_mem_alloc.h #) # # volk # # since we don't want to use the system vulkan header files we need to # compile this library in the löve source code using VOLK_IMPLEMENTATION. #add_library(love_3p_volk # src/libraries/volk/volk.h # src/libraries/volk/volk.c) # # vulkan headers # # vulkan headers has no implementation files of its own. #add_library(love_3p_vulkan_headers # src/libraries/vulkanheaders/vk_icd.h # src/libraries/vulkanheaders/vk_layer.h # src/libraries/vulkanheaders/vk_platform.h # src/libraries/vulkanheaders/vk_sdk-platform.h # src/libraries/vulkanheaders/vulkan_android.h # src/libraries/vulkanheaders/vulkan_beta.h # src/libraries/vulkanheaders/vulkan_core.h # src/libraries/vulkanheaders/vulkan_directfb.h # src/libraries/vulkanheaders/vulkan_enums.hpp # src/libraries/vulkanheaders/vulkan_format_traits.hpp # src/libraries/vulkanheaders/vulkan_fuchsia.h # src/libraries/vulkanheaders/vulkan_funcs.h # src/libraries/vulkanheaders/vulkan_ggp.h # src/libraries/vulkanheaders/vulkan_handles.h # src/libraries/vulkanheaders/vulkan_hash.hpp # src/libraries/vulkanheaders/vulkan_ios.h # src/libraries/vulkanheaders/vulkan_macos.h # src/libraries/vulkanheaders/vulkan_metal.h # src/libraries/vulkanheaders/vulkan_raii.hpp # src/libraries/vulkanheaders/vulkan_screen.h # src/libraries/vulkanheaders/vulkan_static_assertions.h # src/libraries/vulkanheaders/vulkan_structs.hpp # src/libraries/vulkanheaders/vulkan_to_string.h # src/libraries/vulkanheaders/vulkan_vi.h # src/libraries/vulkanheaders/vulkan_wayland.h # src/libraries/vulkanheaders/vulkan_win32.h # src/libraries/vulkanheaders/vulkan_xcb.h # src/libraries/vulkanheaders/vulkan_xlib_xrandr.h # src/libraries/vulkanheaders/vulkan_xlib.h # src/libraries/vulkanheaders/vulkan.h # src/libraries/vulkanheaders/vulkan.hpp #) # # Wuff # add_library(love_3p_wuff src/libraries/Wuff/wuff.c src/libraries/Wuff/wuff.h src/libraries/Wuff/wuff_config.h src/libraries/Wuff/wuff_convert.c src/libraries/Wuff/wuff_convert.h src/libraries/Wuff/wuff_internal.c src/libraries/Wuff/wuff_internal.h src/libraries/Wuff/wuff_memory.c ) # # xxHash # add_library(love_3p_xxhash src/libraries/xxHash/xxhash.c src/libraries/xxHash/xxhash.h ) # # liblove # include_directories( BEFORE src src/libraries src/libraries/box2D src/modules ) if(MINGW) # UTF-16 flags passed to windres. windres invokes gcc as preprocessor # -> gcc outputs utf8, so windres must read-in codepage 65001 (utf8) set(CMAKE_RC_FLAGS ${CMAKE_RC_FLAGS} "-c 65001 --preprocessor-arg=-finput-charset=UTF-16LE") endif() add_library(liblove SHARED src/modules/love/love.cpp src/modules/love/love.h # These are here so they show up in Visual Studio: src/modules/love/arg.lua src/modules/love/boot.lua src/modules/love/callbacks.lua src/modules/love/jitsetup.lua src/scripts/nogame.lua ) set_target_properties(liblove PROPERTIES C_VISIBILITY_PRESET hidden CXX_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN ON LIBRARY_OUTPUT_NAME "${LOVE_LIB_NAME}") set(LIBLOVE_DEPENDENCIES love_common love_audio love_data love_event love_filesystem love_font love_graphics love_image love_joystick love_keyboard love_math love_mouse love_physics love_sensor love_sound love_system love_thread love_timer love_touch love_video love_window ) set(LIBLOVE_LIBRARIES love_3p_box2d love_3p_ddsparse love_3p_enet love_3p_glad love_3p_glslang love_3p_lodepng love_3p_luasocket love_3p_lua53 love_3p_luahttps love_3p_lz4 love_3p_noise1234 love_3p_physfs love_3p_spirv_cross love_3p_wuff love_3p_xxhash ) target_link_libraries(liblove ${LIBLOVE_DEPENDENCIES} ${LIBLOVE_LIBRARIES}) if(LOVE_EXTRA_DEPENDECIES) add_dependencies(liblove ${LOVE_EXTRA_DEPENDECIES}) endif() # # Group projects in Visual Studio # love_group_projects(NAME "liblove" NESTED TARGETS ${LIBLOVE_DEPENDENCIES}) love_group_projects(NAME "liblove/libraries" NESTED TARGETS ${LIBLOVE_LIBRARIES}) love_group_projects(NAME "liblove" TARGETS liblove ${LOVE_EXTRA_DEPENDECIES}) love_group_projects(NAME "lovedep" TARGETS lovedep::SDL lovedep::Freetype lovedep::Harfbuzz lovedep::OpenAL lovedep::Modplug lovedep::Theora lovedep::Vorbis lovedep::Ogg lovedep::Zlib lovedep::Lua) love_group_projects(NAME "lovedep" TARGETS lua51 alcommon al-excommon harfbuzz-subset zlib) if(MSVC) set_target_properties(liblove PROPERTIES RELEASE_OUTPUT_NAME "love" PDB_NAME "liblove" IMPORT_PREFIX "lib") set_target_properties(liblove PROPERTIES DEBUG_OUTPUT_NAME "love" PDB_NAME "liblove" IMPORT_PREFIX "lib") endif() if(MSVC OR MINGW) target_link_libraries(liblove ws2_32${WIN32_LIB_EXT} winmm${WIN32_LIB_EXT} dwmapi${WIN32_LIB_EXT} ) target_sources(liblove PUBLIC extra/windows/love.rc extra/windows/love.ico ) endif() # # love (executable) # if(ANDROID) add_library(love SHARED) # On Android, the LOVE main entrypoint needs to be compiled as shared library target_link_libraries(liblove android) else() add_executable(love WIN32) endif() target_sources(love PRIVATE src/love.cpp) target_link_libraries(love liblove) set_target_properties(love PROPERTIES C_VISIBILITY_PRESET hidden CXX_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN ON OUTPUT_NAME ${LOVE_EXE_NAME}) if(MSVC OR MINGW) add_executable(lovec src/love.cpp) target_link_libraries(lovec liblove) set_target_properties(lovec PROPERTIES OUTPUT_NAME ${LOVE_CONSOLE_EXE_NAME}) endif() function(post_step_move_dll ARG_POST_TARGET ARG_TARGET_OR_FILE) if(TARGET ${ARG_TARGET_OR_FILE}) add_custom_command(TARGET ${ARG_POST_TARGET} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy $ ${CMAKE_CURRENT_BINARY_DIR}/$/$) else() get_filename_component(TEMP_FILENAME ${ARG_TARGET_OR_FILE} NAME) add_custom_command(TARGET ${ARG_POST_TARGET} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${ARG_TARGET_OR_FILE} ${CMAKE_CURRENT_BINARY_DIR}/$/${TEMP_FILENAME}) endif() endfunction() # Add post build steps to move the DLLs next to the binary. Otherwise # running/debugging the binary will not work from inside VS. if(LOVE_MOVE_DLLS) foreach(DLL ${LOVE_MOVE_DLLS}) post_step_move_dll(love ${DLL}) endforeach() endif() if("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows") ################################### # CPack ################################### install(TARGETS love lovec liblove RUNTIME DESTINATION .) install(PROGRAMS $ DESTINATION .) # Our install script (and NSIS) doesn't fully support Windows ARM64 yet. if(MEGA_ARM64) set(CPACK_GENERATOR ZIP) set(CPACK_SYSTEM_NAME woa64) else() set(CPACK_GENERATOR ZIP NSIS) endif() # Extra DLLs. if(LOVE_EXTRA_DLLS) foreach(DLL ${LOVE_EXTRA_DLLS}) get_filename_component(DLL_NAME ${DLL} NAME) message(STATUS "Extra DLL: ${DLL_NAME}") endforeach() install(FILES ${LOVE_EXTRA_DLLS} DESTINATION .) endif() # Dynamic runtime libs. if(LOVE_MSVC_DLLS) foreach(DLL ${LOVE_MSVC_DLLS}) get_filename_component(DLL_NAME ${DLL} NAME) message(STATUS "Runtime DLL: ${DLL_NAME}") endforeach() install(FILES ${LOVE_MSVC_DLLS} DESTINATION .) endif() # Copy a text file from CMAKE_CURRENT_SOURCE_DIR to CMAKE_CURRENT_BINARY_DIR. # On Windows, this function will convert line endings to CR,LF. function(copy_text_file ARG_FILE_IN ARG_FILE_OUT) file(READ ${CMAKE_CURRENT_SOURCE_DIR}/${ARG_FILE_IN} TMP_TXT_CONTENTS) file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/${ARG_FILE_OUT} ${TMP_TXT_CONTENTS}) endfunction() # Text files. copy_text_file(readme.md readme.txt) copy_text_file(license.txt license.txt) copy_text_file(changes.txt changes.txt) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/changes.txt ${CMAKE_CURRENT_BINARY_DIR}/license.txt ${CMAKE_CURRENT_BINARY_DIR}/readme.txt DESTINATION .) # Icons install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/extra/nsis/love.ico ${CMAKE_CURRENT_SOURCE_DIR}/extra/nsis/game.ico DESTINATION .) set(CPACK_PACKAGE_NAME "love") set(CPACK_PACKAGE_VENDOR "love2d.org") set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "LOVE -- It's awesome") set(CPACK_PACKAGE_VERSION "${LOVE_VERSION_STR}") set(CPACK_PACKAGE_VERSION_MAJOR "${LOVE_VERSION_MAJOR}") set(CPACK_PACKAGE_VERSION_MINOR "${LOVE_VERSION_MINOR}") set(CPACK_PACKAGE_VERSION_PATCH "${LOVE_VERSION_REV}") set(CPACK_PACKAGE_INSTALL_DIRECTORY "LOVE") set(CPACK_PACKAGE_EXECUTABLES "${LOVE_EXE_NAME};LOVE") set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/readme.md") set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/license.txt") set(CPACK_NSIS_EXECUTABLES_DIRECTORY .) set(CPACK_NSIS_PACKAGE_NAME "LOVE") set(CPACK_NSIS_DISPLAY_NAME "LOVE ${LOVE_VERSION_STR}") set(CPACK_NSIS_MODIFY_PATH ON) if(LOVE_X64) set(CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES64") else() set(CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES") endif() set(CPACK_NSIS_MENU_LINKS "http://love2d.org/wiki" "Documentation") # Some bug somewhere in NSIS requires "\\\\" somewhere in the path, # according to The Internet. (And sure enough, it does not work # without it). set(NSIS_LEFT_BMP "${CMAKE_CURRENT_SOURCE_DIR}/extra/nsis\\\\left.bmp") set(NSIS_TOP_BMP "${CMAKE_CURRENT_SOURCE_DIR}/extra/nsis\\\\top.bmp") set(NSIS_MUI_ICON "${CMAKE_CURRENT_SOURCE_DIR}/extra/nsis\\\\love.ico") set(NSIS_MUI_UNICON "${CMAKE_CURRENT_SOURCE_DIR}/extra/nsis\\\\love.ico") set(CPACK_NSIS_INSTALLER_MUI_ICON_CODE " !define MUI_WELCOMEPAGE_TITLE \\\"LOVE ${LOVE_VERSION_STR} Setup\\\" !define MUI_WELCOMEFINISHPAGE_BITMAP \\\"${NSIS_LEFT_BMP}\\\" !define MUI_HEADERIMAGE_BITMAP \\\"${NSIS_TOP_BMP}\\\" !define MUI_ICON \\\"${NSIS_MUI_ICON}\\\" !define MUI_UNICON \\\"${NSIS_MUI_UNICON}\\\" ") set(CPACK_NSIS_EXTRA_INSTALL_COMMANDS " WriteRegStr HKCR \\\".love\\\" \\\"\\\" \\\"LOVE\\\" WriteRegStr HKCR \\\"LOVE\\\" \\\"\\\" \\\"LOVE Game File\\\" WriteRegStr HKCR \\\"LOVE\\\\DefaultIcon\\\" \\\"\\\" \\\"$INSTDIR\\\\game.ico\\\" WriteRegStr HKCR \\\"LOVE\\\\shell\\\" \\\"\\\" \\\"open\\\" WriteRegStr HKCR \\\"LOVE\\\\shell\\\\open\\\" \\\"\\\" \\\"Open in LOVE\\\" WriteRegStr HKCR \\\"LOVE\\\\shell\\\\open\\\\command\\\" \\\"\\\" \\\"$INSTDIR\\\\love.exe $\\\\\\\"%1$\\\\\\\"\\\" System::Call 'shell32.dll::SHChangeNotify(i, i, i, i) v (0x08000000, 0, 0, 0)' ") set(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS " DeleteRegKey HKCR \\\"LOVE\\\" DeleteRegKey HKCR \\\".love\\\" System::Call 'shell32.dll::SHChangeNotify(i, i, i, i) v (0x08000000, 0, 0, 0)' ") include(CPack) elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") include(GNUInstallDirs) string(TIMESTAMP LOVE_CONFIGURE_TIMESTAMP "%a, %d %b %Y %H:%M:%S +0000" UTC) file(COPY platform/unix/debian/ DESTINATION debian PATTERN "*.in" EXCLUDE) configure_file(platform/unix/debian/control.in debian/control @ONLY) configure_file(platform/unix/debian/changelog.in debian/changelog @ONLY) configure_file(platform/unix/debian/rules.in debian/rules @ONLY) configure_file(platform/unix/love.desktop.in love.desktop @ONLY) install(TARGETS love liblove) install(FILES platform/unix/love.6 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1 RENAME love.1) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/love.desktop DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications) install(FILES platform/unix/love.xml DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/mime/packages) install(FILES platform/unix/love.svg DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/pixmaps) install(FILES platform/unix/application-x-love-game.svg DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/mimetypes) endif() ================================================ FILE: changes.txt ================================================ LOVE 12.0 [N/A] --------------- Released: N/A * Added support for launching a specific .lua file as the main file. * Added basic usage instructions printed to the console when '--help' is used as a command-line parameter, and when the no-game screen is run. * Added love.parsedGameArguments and love.rawGameArguments tables, in the main thread. * Added love.markDeprecated. * Added HTTPS Lua module. * Added love.event.restart(optionalvalue). A new love.restart field will contain the value after restarting. * Added love.system.getPreferredLocales. * Added love.localechanged callback. * Added love.audiodisconnected callback. * Added love.filesystem.mountFullPath and love.filesystem.unmountFullPath, including opt-in mount-for-write support. * Added love.filesystem.mountCommonPath, unmountCommonPath, and getFullCommonPath. * Added 'readonly' field to love.filesystem.getInfo's returned table. * Added love.filesystem.openFile (replaces love.filesystem.newFile). * Added an optional load mode parameter to love.filesystem.load whetever to only allow binary chunks, text chunks, or both. * Added love.math.perlinNoise and love.math.simplexNoise (replaces love.math.noise). * Added SoundData:copyFrom. * Added SoundData:slice. * Added optional stream type parameter to love.audio.newSource streaming sources ("file" or "memory"). It defaults to "file". * Added love.audio.getPlaybackDevice, love.audio.getPlaybackDevices, and love.audio.setPlaybackDevice. * Added love.keyboard.isModifierActive. * Added Joystick:setPlayerIndex and Joystick:getPlayerIndex. * Added Joystick:getJoystickType. * Added Joystick:getGamepadType. * Added Joystick:hasSensor. * Added Joystick:isSensorEnabled and Joystick:setSensorEnabled. * Added Joystick:getSensorData. * Added Joystick:getPowerInfo which exposes infomation about batteries in a controller are and if they're charging. * Added Joystick:getConnectionState which indicates if a joystick is connected wired or wireless. * Added new Gamepad API buttons: "misc1", "paddle1", "paddle2", "paddle3", "paddle4". and "touchpad". * Added World:getFixturesInArea(). * Added support for saving .exr image files via ImageData:encode. * Added a Metal backend to love.graphics, available on macOS 10.15+ and iOS 13+. * Added a Vulkan backend to love.graphics, available on Windows, Linux, and Android 7+. * Added '--renderers a,b,c' and '--excluderenderers a,b,c' command line arguments. * Added t.renderers and t.excluderenderers love.conf options. * Added t.highdpi startup flag in love.conf, replacing t.window.highdpi and the highdpi flag of love.window.setMode. * Added support for highdpi mode in Windows. * Added per-shader opt in support for the GLSL 4.30 (desktop) and GLSL ES 3.20 (mobile) shading languages, via #pragma language glsl4. * Added compile options table parameter to love.graphics.newShader. Allows setting #define values via newShader. * Added love.graphics.newTexture. newImage and newCanvas still exist as convenience constructor functions. * Added optional 'mipmapcount' field to the settings table in newTexture/newImage/newCanvas. * Added optional 'computewrite' boolean field to the settings table in newTexture/newImage/newCanvas. * Added love.graphics.getTextureFormats, which replaces getImageFormats and getCanvasFormats. * Added Texture:isCanvas and Texture:isComputeWritable. * Added Texture:isFormatLinear, Texture:getMSAA, Texture:generateMipmaps, Texture:replacePixels, and Texture:renderTo (moved from old Canvas and Image subclasses). * Added integer pixel formats for Textures and ImageData. * Added Graphics Buffer objects, including vertex, index, texel, shader storage, and indirect draw/dispatch argument buffers. * Added love.graphics.copyBuffer, copyBufferToTexture, and copyTextureToBuffer. * Added APIs for interacting with the Buffer objects owned by Meshes. * Added Mesh:getAttachedAttributes. * Added an optional start array index parameter to Mesh:attachAttribute. * Added integer buffer data formats. * Added love.graphics.readbackTexture and love.graphics.readbackTextureAsync (replaces Texture:newImageData). * Added love.graphics.readbackBuffer and love.graphics.readbackBufferAsync. * Added 'readback' buffer data usage enum, useful for advanced memory optimization when using love.graphics.readbackBuffer. * Added new lower level 'vertexmain' and 'pixelmain' shader entry points. * Added Compute Shader support via love.graphics.newComputeShader and a new 'computemain' shader entry point. * Added love.graphics.dispatchThreadgroups and love.graphics.dispatchIndirect for running compute shaders. * Added Shader:hasStage. * Added love.graphics.drawFromShader. * Added love.graphics.drawFromShaderIndirect. * Added love.graphics.drawIndirect. * Added love.graphics.getQuadIndexBuffer. * Added variants of love.graphics.applyTransform and replaceTransform which accept x,y,angle,sx,sy,ox,oy parameters. * Added APIs to override the default orthographic projection: love.graphics.setOrthoProjection, setPerspectiveProjection, and resetProjection. * Added ability to set point size within a vertex shader by setting the 'love_PointSize' variable. * Added love.graphics.setBlendState, which gives lower level control over blend operations than setBlendMode. * Added high level love.graphics.setStencilMode and getStencilMode functions. Replaces love.graphics.stencil and setStencilTest. * Added lower level love.graphics.setStencilState and getStencilState functions. * Added a variant of love.graphics.setColorMask which accepts a single boolean. * Added new 'clampone' wrap mode. * Added 'clampone', 'texelbuffer', 'indexbuffer32bit', 'mipmaprange', and 'indirectdraw' graphics feature enums. * Added 'copybuffer', 'copybuffertotexture', 'copytexturetobuffer', and 'copyrendertargettobuffer' graphics feature enums. * Added initial support for right-to-left (RTL) text when using TrueType and OpenType fonts. * Added a variant of Font:getWidth which takes a codepoint number argument. * Added love.graphics.newTextBatch (renamed from love.graphics.newText). * Added love.sensor module. * Added love.sensorupdated callback. * Added love.joysticksensorupdated callback. * Added variant for enet peer:send and host:broadcast which accepts a pointer (light userdata) and a size. * Added love.system.getMemorySize. * Changed the default font from Vera size 12 to Noto Sans size 13. * Changed TrueType and OpenType font handling to have improved kerning and character combining support. * Changed the Texture class and implementation to no longer have separate Canvas and Image subclasses. * Changed Images to no longer hold onto a CPU copy of their pixel data after creation. * Changed love.graphics.newImage to error instead of loading a placeholder texture, when the image dimensions are too large for the system. * Changed love.graphics.newImage to allow creating a mipmapped texture with less than the full mipmap range, instead of erroring. * Changed love.graphics.newMesh to no longer default to the "fan" Mesh draw mode. * Changed the behaviour of Meshes to no longer allow a vertex map or index buffer when the "fan" mesh draw mode is used. * Changed love.window.setMode to no longer clear the contents of Canvases or otherwise recreate OpenGL resources. * Changed love.graphics.points to require 'love_PointSize' to be set in the vertex shader, if a custom shader is used. * Changed love.graphics.setCanvas to always clear auto-generated temporary depth and stencil buffers when they're used. * Changed shader code parsing to ignore shader entry point functions inside comments. * Changed audio file decoding to choose the most appropriate decoder based on file contents instead of the file extension. * Changed Videos to stream audio from the file instead of loading all the video file into memory for use with audio decoding. * Changed love.filesystem.exists to no longer be deprecated. * Changed RevoluteJoint:getMotorTorque and WheelJoint:getMotorTorque to take 'dt' as a parameter instead of 'inverse_dt'. * Changed love.math.perlinNoise and simplexNoise to use higher precision numbers for its internal calculations. * Changed t.accelerometerjoystick startup flag in love.conf to unset by default. * Changed love.data.hash to take in a container type. * Renamed 'display' field to 'displayindex' in love.window.setMode/updateMode/getMode and love.conf. * Renamed love.graphics Text objects to TextBatch. * Updated Box2D from 2.3 to 2.4.1. * Updated LuaSocket from 3.0-rc1 to 3.1.0. * Deprecated usage of slashes instead of dots for module separators in require. * Deprecated love.filesystem.newFile (replaced by openFile). * Deprecated love.math.noise (replaced by perlinNoise and simplexNoise). * Deprecated love.graphics.setNewFont (use love.graphics.newFont and love.graphics.setFont instead). * Deprecated love.graphics.newText (renamed to love.graphics.newTextBatch). * Deprecated love.graphics.getImageFormats and love.graphics.getCanvasFormats (replaced by getTextureFormats). * Deprecated love.graphics.stencil (replaced by love.graphics.setStencilMode or love.graphics.setStencilState). * Deprecated love.graphics.setStencilTest and love.graphics.getStencilTest (replaced by love.graphics.setStencilMode or setStencilState). * Deprecated t.window.highdpi in love.conf and the highdpi flag of love.window.setMode (replaced by t.highdpi in love.conf). * Deprecated t.accelerometerjoystick in love.conf (replaced by love.sensor module). * Deprecated the variants of Mesh:attachAttribute and SpriteBatch:attachAttribute which accept a Mesh (replaced by variants which accept a Buffer). * Deprecated Texture:newImageData (replaced by love.graphics.readbackTexture). * Deprecated love.data.hash (replaced by function variant, which takes container type). * Removed the variant of SpriteBatch:setColor() which turns off all previously set colors. * Removed the no-argument variant of love.graphics.setColorMask. * Removed functions deprecated in LOVE 11: * Removed love.audio.getSourceCount (renamed to love.audio.getActiveSourceCount). * Removed Source:getChannels (renamed to Source:getChannelCount). * Removed Decoder:getChannels (renamed to Decoder:getChannelCount). * Removed love.filesystem.isDirectory (replaced by love.filesystem.getInfo). * Removed love.filesystem.isFile (replaced by love.filesystem.getInfo). * Removed love.filesystem.isSymlink (replaced by love.filesystem.getInfo). * Removed love.filesystem.getLastModified (replaced by love.filesystem.getInfo). * Removed love.filesystem.getSize (replaced by love.filesystem.getInfo). * Removed ParticleSystem:setAreaSpread and ParticleSystem:getAreaSpread (renamed to ParticleSystem:setEmissionArea and getEmissionArea). * Removed love.math.compress and love.math.decompress (replaced by love.data.compress and love.data.decompress). * Removed World:getBodyList, World:getJointList, and World:getContactList (renamed to World:getBodies, World:getJoints, and World:getContacts). * Removed Body:getFixtureList, Body:getJointList, and Body:getContactList (renamed to Body:getFixtures, Body:getJoints, and Body:getContacts). * Removed PrismaticJoint:hasLimitsEnabled (renamed to PrismaticJoint:areLimitsEnabled). * Removed RevoluteJoint:hasLimitsEnabled (renamed to RevoluteJoint:areLimitsEnabled). * Fixed BezierCurve:render adding collinear points in some situations. * Fixed sound Decoders to cause a Lua error instead of hard-crashing when memory for the decoding buffer can't be allocated. * Fixed enum misspelling for thousandsseparator from thsousandsseparator for both keyboard and scancode enums. LOVE 11.5 [Mysterious Mysteries] -------------------------------- Released: 2023-12-03 * Added "LÖVE Loader" launcher on Android for easier loading of .love files. * Changed iOS game selector to alphabetically sort the list of .love files. * Changed JIT compilation on macOS arm64 (Apple Silicon) to be off by default, since performance and available JIT memory isn't reliable. * Fixed inconsistent and buggy behaviour of 'pairs' by updating LuaJIT. * Fixed "unexpected alignment" errors when running love on some 32 bit Linux systems. * Fixed running fused games on Windows when the executable has been code-signed. * Fixed undefined behaviour in love.data.hash's implementation. * Fixed writing files when a symlink exists in the save directory's path. * Fixed love.threaderror not being called if the error message is an empty string. * Fixed a race condition when a Thread is destroyed immediately after Thread:start. * Fixed unexpectedly slow first frames on macOS. * Fixed love.joystick.setGamepadMapping when replacing an existing mapping. * Fixed love.joystick.getGamepadMappingString. * Fixed duplicate platform fields in love.joystick.saveGamepadMappings. * Fixed DistanceJoint type information. * Fixed time drift in Source:tell after a Source loops. * Fixed audio not always pausing when the app is minimized on Android. * Fixed RecordingDevice:start to return false instead of hard-crashing on iOS. * Fixed identical frames in Ogg Theora videos being skipped. * Fixed love.font.newBMFontRasterizer's single file parameter variant. * Fixed the original window size not always being restored when exiting fullscreen on Linux. * Fixed some cases of framerate hitches in Windows when vsync is enabled in windowed mode. * Fixed colors appearing over-saturated on P3 displays in macOS. * Fixed textures looking washed out when gamma-correct rendering is used on some Android devices. * Fixed images with mipmaps when ANGLE is used with an AMD GPU. * Fixed line rendering when duplicate points are used in the line. * Fixed line rendering with miter and bevel line join modes when antiparallel lines are formed. * Fixed a crash when calling Text:add with an empty string parameter. LOVE 11.4 [Mysterious Mysteries] -------------------------------- Released: 2022-01-02 * Added native arm64 support on macOS. * Added a variant of love.filesystem.newFileData which accepts a Data object. * Added Body:getLocalPoints. * Added Font:getKerning. * Added support for r16, rg16, and rgba16 pixel formats in Canvases. * Added Shader:send(name, matrixlayout, data, ...) variant, whose argument order is more consistent than Shader:send(name, data, matrixlayout, ...). * Changed all builds and platforms where LOVE provides LuaJIT to use LuaJIT 2.1 instead of 2.0. * Changed love.timer.getTime to start at 0 when the module is first loaded. * Changed certain out-of-Lua-memory situations to show a message box instead of instantly crashing. * Changed the naming scheme of LOVE's embedded Lua files for improved integration with Lua chunkname APIs. * Fixed build-time compatibility with Lua 5.4. * Fixed code compatibility with math.mod and string.gfind when LuaJIT 2.1 is used. * Fixed errors on some systems related to > 53 bit pointer addresses, when recent versions of LuaJIT 2.1 are used. * Fixed the default error handler showing a blank screen on some mobile devices. * Fixed drag-and-drop to open a love game on macOS causing love.event.quit("restart") to fail. * Fixed fused macOS apps opening other love games when drag-and-drop is used (if the fused app hasn't already removed .love files from recognized document types). * Fixed File:isEOF when called on a dropped file. * Fixed support for > 2GB dropped files on desktops. * Fixed ByteData and DataView missing Data:clone implementations. * Fixed love.physics meter scale value persisting after love.event.quit("restart"). * Fixed audio to resume properly after interruption on iOS. * Fixed love.graphics.newVideo to error instead of crash when an invalid video file is given. * Fixed initial window creation to set the window's title during creation instead of after. * Fixed the window's screen position when exiting fullscreen via love.window.setFullscreen. * Fixed love.displayrotated being given a boolean instead of an enum string. * Fixed memory corruption and a crash when drawing smooth lines. * Fixed a crash in Canvas:newImageData when the pixel format's pixel byte size multiplied by its width isn't a multiple of 4. * Fixed love.graphics.newVolumeImage when explicit mipmaps are provided. * Fixed freezes and crashes in automatic batching when an AMD GPU is used. * Fixed love.graphics.print and Image:replacePixels on more AMD/ATI GPUs. * Fixed Font:setFallbacks to account for different DPI scales in each fallback font. * Fixed Font:getWrap to not remove trailing newlines. * Fixed Text:getWidth when the Text's string only contains spaces. * Fixed a crash with some Intel graphics drivers on Linux. * Fixed a hang with some Intel graphics drivers on Windows, by preventing gamma correct rendering on affected systems. * Fixed a crash with some Intel graphics drivers on Windows when mipmapped Canvases are used. * Fixed texture memory reported by love.graphics.getStats when a volume or array Canvas is created. * Fixed DXT1 textures which use 1 bit alpha-cutout. * Fixed rare issues where textures were not sent to shaders correctly. * Fixed Shader:send(name, data, matrixlayout, ...). * Fixed quad offsets in ParticleSystems when ParticleSystem:setOffset is not used. * Fixed a performance issue with setting a small subrange of data in non-stream Meshes and SpriteBatches. * Fixed rounded rectangles breaking if the rx or ry parameters are negative. * Fixed rounded rectangle automatic points calculation when rx or ry are more than half the rectangle's size. * Fixed source code compilation on Xcode 12+. * Fixed source code compilation on Linux systems that don't provide posix_spawn APIs. LOVE 11.3 [Mysterious Mysteries] -------------------------------- Released: 2019-10-27 * Added support for FLAC audio files. * Added support for microphone recording on Android. * Added t.audio.mic (false by default). On Android, setting it to true requests microphone recording permission from the user. * Added Decoder:clone. * Added Data:getFFIPointer. * Added Joystick:getDeviceInfo. * Added Joystick:getGamepadMappingString and love.joystick.getGamepadMappingString(guid). * Added love.math.colorToBytes and love.math.colorFromBytes. * Added 'usedpiscale' boolean (true by default) to love.window.setMode and love.conf. Disables automatic DPI scaling when false. * Added love.window.getDisplayOrientation and a love.displayrotated callback. * Added love.window.get/setVSync, to allow setting vsync without recreating the window. * Added love.window.getSafeArea. * Added an optional vertex count parameter to Mesh:setVertices. * Added support for rgba4, rgb5a1, rgb565, rgb10a2, rg11b10f, r8, rg8, r16, rg16, r16f, rg16f, r32f, and rg32f formats in ImageData and Images. * Added support for loading .dds files that contain uncompressed pixel data. * Changed audio file type detection, so it probes all supported backends for unrecognized extensions. * Fixed "bad lightuserdata" errors when running love on some arm64 devices. * Fixed boot.lua's line numbers in stack traces to match its source code. * Fixed the deprecation system not fully restarting when love.event.quit("restart") is used. * Fixed love.isVersionCompatible. * Fixed named Channels persisting across love.event.quit("restart") occurrences. * Fixed race conditions when different love.physics Worlds are used in different threads. * Fixed World:getJoints to return the fully resolved type of the Joint, instead of the base type. * Fixed love.timer.sleep(0) to return control to the OS scheduler instead of being a no-op. * Fixed love.math.randomNormal incorrectly using cached state after love.math.setRandomSeed or setRandomState. * Fixed love.data.hash returning an incorrect hash for certain input sizes. * Fixed love.data.newByteData to cause a Lua error instead of crashing when invalid arguments are used. * Fixed the Data-returning variant of love.filesystem.read and File:read to return the number of bytes that were read. * Fixed love.filesystem's require loaders to error instead of crashing when no argument is given. * Fixed love.filesystem.mount(Data). * Fixed a memory leak when loading files in some situations. * Fixed t.audio.mixwithsystem. * Fixed audio clicks immediately after playing a Source on iOS. * Fixed Source:play + Source:stop + Source:play looping the first few ms of sound for streaming Sources on iOS. * Fixed Source:play + Source:seek looping the first few ms of sound for streaming Sources on iOS. * Fixed occasional pops in streaming sources on iOS. * Fixed love.audio.play(sources) to use previously set playback positions on stopped Sources. * Fixed Source:setEffect(name, true) and Source:getEffect(name) when the effect has no associated Filter. * Fixed love.audio.newSource(filename, "queue") to cause a Lua error. * Fixed Source:setPitch to error if the given pitch is <= 0, NaN, or infinity. * Fixed video seeking and pausing in various scenarios. * Fixed an audio Source memory leak when a Video gets garbage collected after playing it. * Fixed video playback support on some Adreno-based Android devices. * Fixed black fringes around text in some situations. * Fixed extreme flickering when text moves along non-integer coordinates. * Fixed the first character in a string sometimes not being processed during text vertex generation. * Fixed Text:set(" ") not clearing any previously set text in a Text object. * Fixed love.graphics.getTextureTypes to return a table with boolean values in its fields instead of number values. * Fixed lines not rendering properly if a single line has more than 65,000 vertices. * Fixed a pixel shader performance regression on some graphics drivers when OpenGL 3 or OpenGL ES 3 is used. * Fixed text not showing up on Radeon HD 3000-series graphics cards on Windows. * Fixed non-integer DPI scale values being truncated to integers in love.graphics.newCanvas. * Fixed creating depth canvases on Windows systems when using an Intel HD 3000 GPU. * Fixed automatic batching performance to be more consistent on all operating systems. * Fixed gammaToLinearPrecise in shaders not being as precise as it should be. * Fixed ImageData:paste and ImageData:setPixel to have more consistent clamping and rounding of color values when different formats are used. LOVE 11.2 [Mysterious Mysteries] -------------------------------- Released: 2018-11-25 * Added Source:setAirAbsorption and Source:getAirAbsorption. * Added Body:setTransform and Body:getTransform. * Improved performance of love.graphics.draw slightly on iOS and Android. * Fixed filesystem initialization on Windows 10 update 1809. * Fixed compatibility with Lua 5.2 and 5.3. * Fixed the explicit format + Data argument variant of love.data.decompress. * Fixed love.joystick.setGamepadMapping not being able to change existing mappings. * Fixed a crash on quit on Linux if a custom cursor is active when quitting. * Fixed a crash in the Data variant of Shader:send when it's called after love.window.setMode. * Fixed a love.graphics.setCanvas error message to be less confusing. LOVE 11.1 [Mysterious Mysteries] -------------------------------- Released: 2018-04-15 * Fixed love.graphics.setCanvas failing randomly. * Fixed love.graphics.clear(colortable) when no Canvas is active. * Fixed stencil and depth support on older phones. * Fixed love.event.quit causing crashes and other unexpected behaviour if a Canvas is active. * Fixed Fixture:getShape crashing when returning a ChainShape. * Fixed love.joystick.loadJoystickMappings outputting a deprecation warning about love.filesystem.isFile. * Fixed Source:queue to show the correct argument name in the error message when an invalid data parameter is given. * Fixed t.console=true causing an error on Windows if lovec.exe is used. LOVE 11.0 [Mysterious Mysteries] -------------------------------- Released: 2018-04-01 * Added Object:release. * Added Data:clone. * Added queueable audio sources. * Added audio input support. * Added Source filters: low gain, high gain and band pass. * Added audio effect APIs (reverb, echo, etc.) * Added variants of SoundData:getSample/setSample which take a channel parameter. * Added variants of all table-with-fields-returning get* functions, the new variants take an existing table to fill in. * Added a variant to World:update, which accepts the number of iterations to run. The defaults are now 8 and 3. * Added Body:isTouching. * Added RopeJoint:setMaxLength. * Added a click count argument to love.mousepressed and love.mousereleased. * Added variants of love.filesystem.mount which accept a Data or FileData object containing zipped data. * Added love.filesystem.get/setCRequirePath, and use that to find c libraries for require. * Added variants of File:read and love.filesystem.read which take an enum to determine whether they return a FileData or a string. * Added love.data module. It includes hex/base64 encoding functions, MD5 and SHA hashing, string packing, compression APIs, and more. * Added Channel:hasRead, which checks if a message has been read. Takes an id, which Channel:push will now return. * Added variants of Channel:demand and Channel:supply which take a timeout argument. * Added Transform objects to love.math. * Added support for different ImageData formats, including RGBA8 (the default), RGBA16, RGBA16F, and RGBA32F. * Added the ability to load Radiance HDR, OpenEXR, and 16 bit PNG images. * Added love.graphics.getImageFormats (replaces love.graphics.getCompressedImageFormats). * Added the ability to specify a per-object pixel density scale factor when creating Images, Canvases, Fonts, and Videos. Affects drawing. * Added Texture:getPixelWidth/Height and love.graphics.getPixelWidth/Height. * Added Texture:getPixelDensity, love.graphics.getPixelDensity, and Font:getPixelDensity. * Added Texture:getMipmapCount, getFormat, getLayerCount, getDepth, and getTextureType. * Added Array, Cubemap, and Volume texture types and corresponding Image and Canvas APIs. * Added love.graphics.getTextureTypes, returns a table with fields indicating support for each texture type. * Added mipmapping support to Canvases, including both auto-generated mipmaps and manually rendering to a specific mipmap level. * Added 'stencil8', 'depth24stencil8', 'depth32fstencil8', 'depth16', 'depth24', and 'depth32f' pixel formats for Canvases. * Added variant of love.graphics.newCanvas which accepts a table of settings. * Added optional 'readable' boolean field to the table passed into love.graphics.newCanvas. * Added optional 'depthstencil' field to the table passed into love.graphics.setCanvas, for using a depth/stencil Canvas. * Added optional 'depth' and 'stencil' boolean fields to the table passed into setCanvas, for enabling depth and stencil buffers if 'depthstencil' isn't used. * Added shadow sampler support for Canvases. * Added love.graphics.setDepthMode for using the depth buffer for depth testing/writes. Depth values of rendered objects can only be set via shaders. * Added love.graphics.setMeshCullMode, for culling back- or front-facing triangles when drawing a Mesh. * Added love.graphics.setFrontFaceWinding. * Added variant of love.graphics.getCanvasFormats which takes a 'readable' boolean. * Added love.graphics.drawLayer and SpriteBatch:add/setLayer for easily drawing layers of Array Textures. * Added variants of love.graphics.print and printf which take a Font argument. * Added variants of love.graphics.clear to control how the active depth and stencil buffers are cleared. * Added love.graphics.applyTransform and love.graphics.replaceTransform. * Added love.graphics.transformPoint and love.graphics.inverseTransformPoint. * Added love.graphics.getStackDepth. * Added love.graphics.flushBatch for manually flushing automatically batched draws. * Added SpriteBatch:setDrawRange. * Added per-shader opt in support for the GLSL 3.30 and GLSL ES 3.00 shading languages. * Added 'void effect()' pixel shader entry point. * Added love.graphics.validateShader. * Added Shader:hasUniform. * Added support for non-square shader uniform matrices on desktop platforms and on mobile GLSL 3. * Added Shader:send(matrixname, is_column_major, matrix, ...) which specifies how to interpret the matrix table arguments. * Added Shader:send variants which accept a Data object. * Added 'borderellipse' and 'borderrectangle' ParticleSystem distributions. * Added variant of ParticleSystem:setEmissionArea which accepts an area angle and a flag for whether particle directions are relative to the center of the area. * Added ParticleSystem:set/getAreaSpreadAngle and set/getAreaSpreadIsRelativeDirection. * Added love.graphics.captureScreenshot (replaces love.graphics.newScreenshot). * Added 'glsl3', 'instancing', 'fullnpot','pixelshaderhighp', and 'shaderderivatives' graphics features. * Added 'anisotropy' graphics limit. * Added Mesh instancing support via love.graphics.drawInstanced and Mesh:attachAttribute. * Added a Mesh:attachAttribute variant that takes a different target attribute name. * Added Mesh:detachAttribute. * Added a variant of Mesh:setVertexMap which accepts a Data object. * Added love.window.updateMode. * Added love.window.isMinimized. * Added love.window.restore. * Added the ability to prevent love from creating a stencil buffer for the window. * Added cycle detection to Variant's table serialization, cycles now cause an error, rather than a stack overflow. * Added love.graphics.newShader File and FileData variants. * Added a default love.threaderror callback, which raises the error in the main thread. * Added checks for invalid constants passed to love.keyboard.isDown/isScancodeDown. * Added deprecation warnings, on by default for non-fused games. * Added love.filesystem.getInfo. * Added 'drawcallsbatched' to love.graphics.getStats. * Added support for header-less DEFLATE to love.data.compress/decompress. * Deprecated love.filesystem.exists / isFile / isDirectory / isSymlink / getLastModified / getSize (use getInfo instead). * Deprecated love.math.compress / decompress (use love.data.compress / decompress instead). * - All renamed APIs are formally deprecated rather than completely removed. * Renamed love.window.getPixelScale to love.window.getDPIScale. * Renamed love.mouse.hasCursor to love.mouse.isCursorSupported. * Renamed ParticleSystem:setAreaSpread to ParticleSystem:setEmissionArea. * Renamed love.errhand to love.errorhandler. * Renamed Source/SoundData/Decoder:getChannels to getChannelCount. * Renamed PrismaticJoint/RevoluteJoint:hasLimitsEnabled to areLimitsEnabled. * Renamed love.audio.getSourceCount to love.audio.getActiveSourceCount. * Renamed all get[Object]List functions to get[Object]s. * Removed the default source type for love.audio.newSource. * Removed variant of love.filesystem.newFileData which takes base64 data, use love.data.decode instead. * Removed the no-argument variant of Text:set, use Text:clear instead. * Removed love.graphics.getCompressedImageFormats, use love.graphics.getImageFormats instead. * Removed the 'void effects(...)' pixel shader entry point. Use the new 'void effect()' instead. * Removed Shader:getExternVariable, use Shader:hasUniform instead. * Removed love.graphics.newScreenshot, use love.graphics.captureScreenshot instead. * Removed deprecated enet function host:socket_get_address. * Removed functions deprecated in LÖVE 0.10.2: * Removed Shader:sendInt, Shader:sendBoolean, Shader:sentFloat, Shader:sendMatrix, and Shader:sendTexture (use Shader:send instead). * Removed love.window.isCreated (use love.window.isOpen instead). * Improved performance when drawing textures, shapes, lines, and points by automatically batching their draw calls together when possible. * Improved performance of Shader:send when the Shader is not active. * Improved performance of love.math.randomNormal when LuaJIT's JIT compiler is enabled. * Improved performance of love.filesystem.lines and File:lines, especially when reading from a file inside a zip/.love. * Changed all color values to be in the range 0-1, rather than 0-255. * Changed high-dpi functionality to require much less code (often none at all) for graphics to appear at the correct sizes and positions. * Changed love.graphics.print and friends to ignore carriage returns. * Changed the 'multiply' blend mode to error if not used with the 'premultiplied' blend alpha mode, since the formula only works with that anyway. * Changed some love.graphics, love.window, and love.event APIs to cause an error if a Canvas is active. * Changed stenciling functionality with a Canvas active to require stencil=true (or a custom stencil-formatted Canvas) to be set in setCanvas. * Changed Mesh:setDrawRange to take 'start' and 'count' parameters instead of 'min' and 'max'. * Changed the 'vsync' field of love.window.setMode and t.window in love.conf. It's now an integer with 0 disabling vsync. * Changed the audio playback APIs drastically. * Changed enet to no longer set the 'enet' global, again matching luasocket. * Changed Source seeking behaviour, all kinds of Sources now behave similarly when seeking past the boundaries. * Changed love.timer.step, it now returns dt. * Changed love.run and love.errhand to return a function for their main loop, which gets called until love quits. * Updated and improved command line argument handling. * Updated the boot sequence to show an error instead of the no-game screen, if a nonexistant folder is passed in as the source game directory. * Updated 'love.exe --version' on Windows to print to the parent console. * Updated Android print rerouting and JIT compilation disabling to apply inside threads. * Updated invalid enum value error messages to show a list of the valid enum values. * Updated Source:seek to work if the Source isn't playing. * Updated love.event.poll to stop allocating memory unnecessarily. * Updated love.math.random to have improved numeric distribution. * Updated love.graphics to support Core Profile OpenGL 3.3+ when available. * Updated shaders to always expose derivative functions (dFdx, dFdy, fwidth) when available in OpenGL ES. * Updated shaders to allow using VERTEX and PIXEL in shader code. * Updated love.graphics.circle/ellipse/arc/rectangle to take transformation scale into account when determining the number of segments to use. * Updated Font glyph generation to improve antialiasing. * Updated Canvas:newImageData to return an ImageData with a format that matches the Canvas' as closely as possible. * Updated love.graphics.newImage to treat file names ending with "@2x", "@3x", etc. as a pixel density scale factor if none is explicitly supplied. * Updated the error message when bad values are given to love.graphics.line. * Updated the maximum love.graphics transformation/state stack depth from 64 to 128. * Updated the default error handler to allow copying the error to the clipboard when the user decides to do so. * Updated love.filesystem.setRequirePath to support multiple template '?' characters in each path. * Updated luasocket to version 3.0rc1. * Updated love.joystick.loadGamepadMappings so it doesn't error when given an empty string. * Updated love.joystick.setGamepadMapping to use the controller's name for the new mapping when possible. * Fixed error in default error handler when the error message contains non UTF-8 bytes. * Fixed a memory leak when sending love objects to threads which never load that object's module. * Fixed a memory leak in enet when peer:send fails. * Fixed os.execute always returning -1 in Linux. * Fixed the default reference angle for WeldJoint, PrismaticJoint, and RevoluteJoint. * Fixed Fixture:getShape to reuse the existing internal Fixture-owned shape. * Fixed MouseJoint:setFrequency to error instead of crashing if a frequency of 0 is set. * Fixed love.system.set/getClipboardText to error instead of crashing, when a window hasn't been created. * Fixed Joystick:getGamepadMapping to work with xinput controllers. * Fixed love.joystick.setGamepadMapping's replacement code. * Fixed baseline calculation when rendering text. * Fixed VaryingTexCoords and love_ScreenSize in shaders to be 'highp' in OpenGL ES, when supported. * Fixed ParticleSystem:setParticleLifetime to error if a negative value is given. * Fixed Shader:send and Shader:sendColor ignoring the last argument for an array. * Fixed a crash when love.graphics.pop is called after a love.window.setMode while the transformation stack was not empty. * Fixed love.window.isMaximized. * Fixed video playback to work with a wider range of Ogg Theora files. * Fixed video seeking to be faster. * Fixed BezierCurves to error instead of hanging in some situations. * Fixed compilation of luasocket with newer luajit 2.1.0 beta versions. LOVE 0.10.2 [Super Toast] ------------------------- Released: 2016-10-31 * Added lovec.exe in Windows. It is the same as love.exe but built with the Console subsystem, so it always uses or provides a console. * Added the ability to restart the game via love.event.quit("restart"). * Added support for passing a table to love.mouse.isDown, love.keyboard.isDown, love.keyboard.isScancodeDown, Joystick:isDown, and Joystick:isGamepadDown. * Added love.window.isMaximized. * Added 'shaderswitches' field to the table returned by love.graphics.getStats. * Added Quad:getTextureDimensions. * Added 'ellipse' area distribution to ParticleSystems. * Added support for BC4-7 compressed texture formats in KTX files. * Added PrismaticJoint:getAxis and WheelJoint:getAxis. * Added 2-point version of love.physics.newRevoluteJoint. * Added table variants of Fixture:setCategory and Fixture:setMask. * Added getNextVertex and getPreviousVertex to ChainShape and EdgeShape. * Added optional reference angle arguments to RevoluteJoint, PrismaticJoint, and WeldJoint constructors. * Added RevoluteJoint:getReferenceAngle, PrismaticJoint:getReferenceAngle, and WeldJoint:getReferenceAngle. * Deprecated undocumented Shader:sendTexture, Shader:sendMatrix, Shader:sendInt, and Shader:sendFloat functions. * Fixed love on iOS 6. * Fixed os.execute always returning -1 on Linux. * Fixed the love.lowmemory callback to call collectgarbage() after the callback has fired, instead of before. * Fixed love.math.noise(nil) to error instead of returning nil. * Fixed an occasional crash when a Thread ends. * Fixed a hang at the end of video playback with some video files. * Fixed the video decoding thread to not do any work when there are no videos to decode. * Fixed love.graphics.newVideo(file) to no longer error if love.audio is disabled. * Fixed a rare bug in Source:play for streaming Sources if the associated OpenAL source object was previously used for a static Source. * Fixed corrupted Font glyphs in rare cases. * Fixed stencils inside Canvases on some OpenGL ES 2 devices. * Fixed an OpenGL error in OpenGL ES 3 when multiple render targets are used. * Fixed love.window.setMode crashing when called with a Canvas active. * Fixed love.window.maximize to update the reported window dimensions immediately. * Fixed gamma correction of ImageFonts and BMFonts with colored images. * Fixed the default shader improperly applying gamma correction to per-vertex colors when gamma correction is requested but not supported on OpenGL ES. * Fixed text coloring breaking because of an empty string. * Fixed large burst of particles when dramatically increasing the emission rate of a ParticleSystem. * Fixed SpriteBatch:setBufferSize to keep old sprite data if it can fit. * Fixed MouseJoint:getBodies unconditionally erroring. * Fixed memory leak in Text:set. * Fixed incorrect kerning caused by using kerning information for the wrong character in some fonts. * Fixed ImageData:setPixel/getPixel/mapPixel and SoundData:setSample/getSample to properly handle non-integer coordinates. * Improved performance of Channel methods by roughly 2x in many cases. * Improved performance of Shader:send when small numbers of arguments are given. * Updated love.filesystem.mount to accept a DroppedFile as the first parameter. * Updated Shader:send to do type and argument checking based on the specified uniform variable's information instead of the arguments to the function. * Updated Shader:send to accept a flat table for matrix uniforms. LOVE 0.10.1 [Super Toast] ------------------------- Released: 2016-02-14 * Added a new love.conf flag t.externalstorage, which determines whether files are saved in internal or external storage on Android devices. * Added a new variant of love.graphics.arc which can draw different types of arcs ("pie", "open", or "closed"). * Added "lighten" and "darken" BlendModes. They can only be used with the "premultiplied" BlendAlphaMode. * Added the "lighten" GraphicsFeature constant. * Added the ability to avoid clearing specific Canvases when calling love.graphics.clear, if multiple Canvases are active at once via love.graphics.setCanvas. * Added Text:getDimensions. * Added optional "collideconnected" argument to love.physics.newMotorJoint. * Fixed a Lua error in the no-game screen if the window's height is too small. * Fixed the default error handler to reset the mouse Cursor. * Fixed love.filesystem functions crashing when called if liblove is used directly without calling love.filesystem.init. * Fixed audio on Android to pause when the app is inactive, and resume when the app becomes active again. * Fixed the Video decoding thread hanging after Video:seek or when a Video finishes. * Fixed Video:isPlaying to always return false after it finishes playing. * Fixed RandomGenerator:random crashing if a nil 'self' is used. * Fixed loading BMFont files which have characters with 0 width or height (a space character, for example). * Fixed love.graphics.newFont causing crashes if FileData is passed in. * Fixed love.graphics.clear(colortable) causing crashes on OpenGL ES 2 systems when a Canvas is active. * Fixed a driver bug on some Android devices which caused all objects to show up as black. * Fixed a driver bug on Windows with AMD graphics cards where love.graphics.clear would not always work. * Fixed Shader:sendColor incorrectly converting alpha values from sRGB to linear RGB when gamma-correct rendering is enabled. * Fixed love.graphics.newMesh(vertices) double-converting colors from sRGB to linear RGB when gamma-correct rendering is enabled. * Fixed love.graphics.new* crashing when there is no graphics context/window. * Updated the Windows executable to prefer the high-powered AMD graphics card on systems which have switchable Intel+AMD GPUs. * Updated love.touch.getTouches to return the list of IDs in the relative order that the touches initially happened, instead of being in a random order. * Updated the error messages caused by invalid or bad arguments to ImageData and SoundData methods to be more descriptive. LOVE 0.10.0 [Super Toast] ------------------------- Released: 2015-12-22 * Added an iOS port. * Added an Android port. * Added the flag t.accelerometerjoystick to love.conf. Disables accelerometer-as-joystick functionality on mobile devices when false. * Added the flag t.gammacorrect to love.conf (replaces t.window.srgb.) Enabling it globally enables gamma-correct rendering, when supported. * Added video playback support for Ogg Theora videos, via love.graphics.newVideo and Video objects. * Added love.video module. It is not used for displaying videos on-screen, only decoding them. * Added love.touch module. Note that it has important differences from the touch implementation in the LÖVE 0.9 Android and iOS ports. * Added love.touchpressed, love.touchreleased, and love.touchmoved. * Added love.system.vibrate. * Added love.filesystem.setRequirePath and love.filesystem.getRequirePath. * Added an optional program exit argument to love.event.quit. * Added love.filedropped and love.directorydropped event callback functions. * Added love.lowmemory event callback function, called when the app is running out of memory on mobile operating systems. * Added love.textedited event callback function, called when the user is compositing text (e.g. via an IME.) * Added love.wheelmoved event callback function (replaces "wu" and "wd" constants for love.mousepressed.) * Added love.mouse.hasCursor. * Added a boolean argument to love.mousepressed and love.mousereleased indicating whether the button event originated from a touch press. * Added optional x/y/width/height arguments to love.keyboard.setTextInput. They tell the system where text will show up so on-screen keyboards can avoid that area. * Added Source:getType (replaces Source:isStatic.) * Added Source:getDuration and Decoder:getDuration. * Added an optional string argument containing raw pixel byte data to the width/height variant of love.image.newImageData. * Added love.graphics.ellipse. * Added rounded-rectangle support to love.graphics.rectangle. * Added love.graphics.points (replaces love.graphics.point.) * Added love.graphics.intersectScissor. * Added an optional argument to love.graphics.setBlendMode which indicates whether to treat the colors of drawn objects as having pre-multiplied alpha. * Added love.graphics.getSupported (replaces love.graphics.isSupported.) * Added love.graphics.getSystemLimits (replaces love.graphics.getSystemLimit.) * Added love.graphics.stencil and love.graphics.set/getStencilTest (replaces love.graphics.setStencil.) * Added love.graphics.isActive. * Added color arguments to love.graphics.clear. It no longer always uses the background color value. * Added love.graphics.discard. * Added love.graphics.isGammaCorrect. * Added the "clampzero" WrapMode. * Added the ability to specify custom mipmaps when creating an image, via love.graphics.newImage(filename, {mipmaps={mip1, mip2, ...}}) * Added optional x/y/width/height arguments to Image:refresh and Canvas:newImageData. * Added Image:getFlags. * Added one- and two-channel Canvas formats: r8, rg8, r16f, rg16f, r32f, and rg32f. * Added support for different formats in each Canvas when using multi-canvas rendering. Added the "multicanvasformats" Graphics Feature constant. * Added support for OpenGL ES 2 and 3. * Added support for loading ETC, EAC, PVRTC, and ASTC compressed textures on systems that support them. * Added custom vertex attribute support for Meshes via new variants of love.graphics.newMesh. * Added Mesh:setVertexAttribute and Mesh:getVertexAttribute. * Added Mesh:getVertexFormat. * Added Mesh:flush. * Added an optional 'startvertex' argument to Mesh:setVertices. * Added the ability for love.graphics.newMesh and Mesh:setVertices to accept a Data object. * Added Mesh:setAttributeEnabled and Mesh:isAttributeEnabled. * Added Mesh:attachAttribute. * Added SpriteBatch:attachAttribute. * Added Shader:sendColor. * Added new shader functions: gammaCorrectColor, gammaToLinear, and linearToGamma. The functions also have 'precise' and 'fast' variants. * Added Text objects and love.graphics.newText. * Added per-character color support to love.graphics.print/printf and to Text objects. * Added BMFont bitmap font file support to love.graphics.newFont and love.font. * Added kerning support for TrueType/OpenType and BMFont Fonts. * Added an optional font hinting argument to love.graphics.newFont when loading TrueType fonts. * Added an optional spacing argument to love.graphics.newImageFont, which applies additional spacing to all rendered glyphs. * Added Font:setFallbacks. * Added love.window.maximize. * Added love.window.close. * Added love.window.requestAttention. * Added love.window.setDisplaySleepEnabled and love.window.isDisplaySleepEnabled. * Added BezierCurve:renderSegment and BezierCurve:removeControlPoint. * Added BezierCurve:getSegment. * Added love.math.compress and love.math.decompress. * Added Channel:performAtomic. * Changed love.mousepressed, love.mousereleased, and love.mouse.isDown to use button numbers instead of named button constants. * Changed love.keypressed to be love.keypressed(key, scancode, isrepeat). * Changed love.keyreleased to be love.keyreleased(key, scancode). * Changed Font:getWrap's second return value to be a table containing the text split into lines. * Changed love.graphics.newImage's optional second argument to be a table of flags (flags are "mipmaps" and "linear".) * Changed the arguments for the standard variants of love.graphics.newMesh to newMesh(vertices [, drawmode, usage]) and newMesh(vertexcount [, drawmode, usage]). * Changed ImageData:encode to return a FileData object. ImageData:encode's first parameter is now the format to encode to, and the second parameter is an optional filename to write to. * Renamed the "normal" Fullscreen Type to "exclusive". * Renamed the DistanceModel constants "inverse clamped", "linear clamped", and "exponent clamped" to "inverseclamped", "linearclamped", and "exponentclamped". * Renamed the "additive", "subtractive", and "multiplicative" BlendModes to "add", "subtract", and "multiply". * Renamed the KeyConstant and Scancode representing the spacebar from " " to "space". * Renamed File:eof to File:isEOF. * Renamed Canvas:getImageData to Canvas:newImageData. * Renamed love.image's CompressedData type to CompressedImageData. * Removed callback variant of love.filesystem.getDirectoryItems. * Removed the "wu" and "wd" constants for love.mousepressed (replaced by love.wheelmoved.) * Removed the named mouse button constants (replaced by button numbers.) * Removed Source:isStatic (replaced by Source:getType.) * Removed image loading support for all (non-compressed texture) file formats except for PNG, JPEG, TGA, and BMP. * Removed JPEG encoding support from ImageData:encode. * Removed love.graphics.point (replaced by love.graphics.points.) * Removed love.graphics.setPointStyle and love.graphics.getPointStyle. * Removed love.graphics.isSupported (replaced by love.graphics.getSupported.) * Removed love.graphics.getSystemLimit (replaced by love.graphics.getSystemLimits.) * Removed love.graphics.setStencil (replaced by love.graphics.stencil and love.graphics.setStencilTest.) * Removed the "canvas", "shader", "npot", "subtractive", and "mipmap" Graphics Feature constants (the features always have guaranteed support now.) * Removed the "multicanvas" Graphics Feature constant (use love.graphics.getSystemLimits instead.) * Removed the "srgb" Graphics Feature constant (use love.graphics.isGammaCorrect() or love.graphics.getCanvasFormats().srgb instead.) * Removed the "srgb" flag in love.window.setMode and in the t.window table in love.conf (Replaced by t.gammacorrect.) * Removed the "premultiplied" blend mode (love.graphics.setBlendMode("alpha", "premultiplied") now does the same thing.) * Removed Canvas:getPixel (use Canvas:newImageData instead.) * Removed Canvas:clear (use love.graphics.clear instead.) * Removed Mesh:getVertices. * Removed Mesh:setVertexColors and Mesh:hasVertexColors (use Mesh:setAttributeEnabled("VertexColor", enable) instead.) * Removed functions deprecated in LOVE 0.9.1 and 0.9.2: * Removed love.graphics.getMaxImageSize and love.graphics.getMaxPointSize (replaced by love.graphics.getSystemLimits.) * Removed Mesh:set/getImage, SpriteBatch:set/getImage, and ParticleSystem:set/getImage (replaced by set/getTexture.) * Removed SpriteBatch:bind/unbind. * Removed Canvas:getFSAA and the "fsaa" flag in love.conf and love.window.setMode (replaced by Canvas:getMSAA and "msaa".) * Removed the "dxt" and "bc5" Graphics Feature constant (replaced by love.graphics.getCompressedImageFormats.) * Removed the "hdrcanvas" Graphics Feature constant (replaced by love.graphics.getCanvasFormats.) * Removed love.window.getWidth/getHeight/getDimensions (use love.graphics.getWidth/getHeight/getDimensions or love.window.getMode instead.) * Fixed utf8.char. * Fixed detection of fused love games. * Fixed World:getCallbacks and World:getContactFilter when used in coroutines. * Fixed crashes when objects which store Lua callback functions are garbage collected after being used in coroutines. * Fixed memory leaks in love.physics if World:destroy is never called. When a World is GCed it now destroys all objects it owns. * Fixed love.keyboard.getKeyFromScancode crashing when an invalid scancode is given. * Fixed decoding of 8-bit WAV files. * Fixed a crash issue when rewinding streaming ogg Sources, when certain versions of libvorbis are used. * Fixed love.audio.stop() not rewinding streaming Sources. * Fixed the stencil buffer in Canvases when an unsupported MSAA value is used to create the Canvas. * Fixed Canvas:renderTo to restore the previous Canvas if an error occurs in the passed function. * Fixed love.graphics.draw(canvas) to cause an error if that Canvas is the active one. * Fixed Mesh:getVertexMap to return nil rather than an empty table, if no vertex map has been set. * Fixed love.graphics.getColorMask. * Fixed the default offset for particles when ParticleSystem:setQuads or ParticleSystem:setTexture is used. * Fixed love.graphics.shear resetting all love.graphics transformations. * Fixed the "add" and "subtract" blend modes to no longer modify the alpha of the Canvas / screen. * Improved the performance of World:rayCast and World:queryBoundingBox. * Improved the performance of love.graphics.line and other line drawing functions, when the "smooth" LineStyle is used. * Improved the performance of Shader:send when matrices are used. * Improved the performance of ImageData and SoundData methods when LuaJIT's JIT compiler is enabled, by using efficient FFI code. * Improved the performance of love.math.noise, love.math.gammaToLinear, love.math.linearToGamma, love.math.random, and RandomGenerator:random when LuaJIT's JIT compiler is enabled. * Updated the compatibility warning notice to use a message box and to show the version specified in love.conf. * Updated the compatibility warning notice to display before main.lua is loaded. * Updated the __tostring metamethod of love objects to output the pointer value, similar to tostring(table). * Updated World:setCallbacks, World:setContactFilter, World:queryBoundingBox, and World:rayCast to have improved argument type checking. * Updated threads to load love.filesystem automatically. * Updated love.filesystem to enable symlinks by default. * Updated love.math.setRandomSeed and RandomGenerator:setSeed to produce better results for the first few random() calls. * Updated love.math.random and RandomGenerator:random to produce slightly better results in general. * Updated Source methods that deal with spatial audio to error rather than failing silently if the Source isn't mono. * Updated the 3D and 4D variants of love.math.noise to use Perlin noise rather than Simplex noise, to avoid patent issues. * Updated ImageFonts to no longer treat separator pixels as spacing. * Updated the default font to use less memory. * Updated the behavior of text wrapping with love.graphics.printf and Font:getWrap to work better. * Updated love.graphics.print and love.graphics.printf to no longer automatically round the x and y position arguments. * Updated some error messages for love.graphics.newImage to be more descriptive. * Updated love.graphics color functions to automatically apply love.math.gammaToLinear to color values when gamma-correct rendering is enabled. * Updated the 'normal' Canvas format to internally use 'srgb' rather than 'rgba8' when gamma-correct rendering is enabled. * Updated love.graphics.setColor to affect all drawn objects, including ParticleSystems, SpriteBatches, and Meshes. * Updated the default fullscreen type to be "desktop" rather than "exclusive". * Updated the minimum runtime system requirements of LOVE to require OpenGL 2.1 or OpenGL ES 2 support. * Updated the pixel shader effect function so screen_coords.y is 0 at the top of the screen instead of the bottom. * Updated Images to require setting the mipmaps flag to true on creation in order to use mipmaps. * Updated Images to allow mipmaps for non-power-of-two sizes. LOVE 0.9.2 [Baby Inspector] --------------------------- Released: 2015-02-14 * Added Lua 5.3's UTF-8 module (via utf8 = require("utf8")). * Added Shader:getExternVariable. * Added several new canvas texture formats. * Added love.graphics.getCanvasFormats. * Added love.graphics.getCompressedImageFormats. * Added ParticleSystem:setQuads. * Added ParticleSystem:setLinearDamping. * Added SpriteBatch:flush. * Added love.graphics.getStats. * Added "mirroredrepeat" wrap mode. * Added love.audio.setDopplerScale and love.audio.getDopplerScale. * Added optional duration argument to Joystick:setVibration. * Added love.joystick.loadGamepadMappings and love.joystick.saveGamepadMappings. * Added Joint:setUserData and Joint:getUserData. * Added Joint:getBodies. * Added GearJoint:getJoints. * Added Contact:getFixtures and Body:getContactList. * Added Body:getWorld. * Added Body:getJointList. * Added Body/Contact/Fixture/Joint/World:isDestroyed. * Added love.mousemoved event callback. * Added love.mouse.setRelativeMode and love.mouse.getRelativeMode. * Added Scancode enums, love.keyboard.getKeyFromScancode, and love.keyboard.getScancodeFromKey. * Added love.window.getDisplayName. * Added love.window.minimize. * Added love.window.showMessageBox. * Added 'refreshrate' field to the table returned by love.window.getMode. * Added love.window.toPixels and love.window.fromPixels. * Added love.window.setPosition and love.window.getPosition, and 'x' and 'y' fields to love.window.setMode and t.window in love.conf. * Added love.filesystem.isSymlink, love.filesystem.setSymlinksEnabled, and love.filesystem.areSymlinksEnabled. * Added love.filesystem.getRealDirectory. * Deprecated SpriteBatch:bind and SpriteBatch:unbind. * Deprecated all uses of the name 'FSAA' in favor of 'MSAA'. * Deprecated the 'hdrcanvas' graphics feature enum in favor of getCanvasFormats. * Deprecated the 'dxt' and 'bc5' graphics feature enums in favor of getCompressedImageFormats. * Fixed crashes when love objects are used in multiple threads. * Fixed love.filesystem.setIdentity breaking in some situations when called multiple times. * Fixed the default love.filesystem identity when in Fused mode in Windows. * Fixed love.system.openURL sometimes blocking indefinitely on Linux. * Fixed love.joystick.setGamepadMapping. * Fixed the order of vertices in ChainShapes. * Fixed love.mouse.getPosition returning outdated values if love.mouse.setPosition is used in the same frame. * Fixed love.graphics.newFont to error when given an invalid size argument. * Fixed the filename and backtrace given when love.graphics.print errors. * Fixed a small memory leak if love.graphics.newCanvas errors. * Fixed shader:getWarnings returning unnecessary information. * Fixed some cases of noncompliant shader code not properly erroring on some nvidia drivers. * Fixed a potential crash when Shader objects are garbage collected. * Fixed a potential small memory leak triggered when love.graphics.newShader errors. * Fixed love.graphics.newMesh(vertexcount, ...) causing the Mesh to do instanced rendering. * Fixed Mesh:getVertexMap. * Fixed Image:refresh generating mipmaps multiple times if mipmap filtering is enabled. * Fixed Image:setMipmapFilter to not keep bad state around if it errors. * Fixed Mesh:setDrawRange when the Mesh has a vertex map set. * Fixed internal detection of the 'position' and 'effect' shader functions. * Fixed Texture memory leak when Meshes are garbage collected. * Fixed the default line join mode to be 'miter' instead of an undefined value. * Fixed the default error handler text size when highdpi mode is enabled on a Retina monitor. * Fixed the default error handler background color when sRGB mode is enabled for the window. * Fixed love.window.setMode to fall back to the largest available mode if a width or height greater than the largest supported is specified and fullscreen is used. * Fixed the state of wireframe mode when love.window.setMode is called. * Fixed Canvas:getPixel to error if the coordinates are not within the Canvas' size. * Fixed detection of compressed textures to work regardless of the file's extension. * Renamed all cases of FSAA to MSAA. The FSAA names still exist for backward-compatibility. * Updated the Windows executable to automatically prefer the higher performance GPU on nvidia Optimus systems. * Updated the --console command-line argument in Windows to open the console before conf.lua is loaded. * Updated t.console and the --console command-line argument in Windows to use the existing Console window, if love was launched from one. * Updated the love executable to verify that the love library's version matches. * Updated the Lua wrapper code for modules to avoid crashes when the module's instance is created, deleted, and recreated. * Updated internal code for handling garbage collection of love objects to be more efficient. * Updated love's initialization code to trigger a Lua error if love.conf has an error in it. * Updated the paths returned by love.filesystem.getSaveDirectory and friends to strip double-slashes from the string. * Updated the error message when love.filesystem.write or File:open fails because the directory doesn't exist. * Updated the error message when love.math.setRandomseed(0) is attempted. * Updated the error message when invalid UTF-8 strings are used in love functions that expect UTF-8. * Updated love.physics.newPolygonShape and love.physics.newChainShape to accept a table of vertices. * Updated love.physics.newChainShape to error if the number of arguments is invalid. * Updated love.thread.newThread to accept a literal string of code directly. * Updated love-created threads to use names visible in external debuggers. * Updated SpriteBatch:unbind to use less VRAM if the SpriteBatch has the static usage hint. * Updated love.graphics.newImage, love.image.newImageData, etc. to leave less Lua-owned memory around. * Updated love.graphics.push to accept different stack types to push. Current types are "transform" and "all". * Updated love shaders to accept GLSL ES precision qualifiers on variables, although they do nothing. * Updated the error message for love.graphics.newShader to be less cryptic if an invalid filename is given. * Updated compressed texture loading code to allow BC6 and BC7 compressed textures (if the graphics driver supports them.) LOVE 0.9.1 [Baby Inspector] --------------------------- Released: 2014-04-01 * Added Source:clone. * Added blend mode "screen". * Added ParticleSystem:clone. * Added ParticleSystem:moveTo, has smoother emitter movement compared to setPosition. * Added ParticleSystem:setRelativeRotation. * Added love.graphics.setWireframe for debugging. * Added Mesh:setDrawRange and Mesh:getDrawRange. * Added CircleShape:getPoint and CircleShape:setPoint. * Added Mesh/SpriteBatch/ParticleSystem:setTexture, accepts Canvases and Images. * Added high-dpi window support for Retina displays in OS X, via the 'highdpi' window flag. * Added love.window.getPixelScale. * Added love.graphics.getSystemLimit. * Added antialiasing support to Canvases. * Added Canvas:getFSAA. * Added 'love_ScreenSize' built-in variable in shaders. * Added love.getVersion. * Added support for gamma-correct rendering. * Added love.graphics.isSupported("srgb"). * Added love.math.gammaToLinear and love.math.linearToGamma. * Added RandomGenerator:getState and RandomGenerator:setState. * Added Body:setUserData and Body:getUserData. * Added some missing obscure key constants. * Added optional callback function argument to love.filesystem.getDirectoryItems. * Added love.system.openURL. * Deprecated Mesh/SpriteBatch/ParticleSystem:setImage. * Deprecated love.graphics.getMaxImageSize and love.graphics.getMaxPointSize. * Fixed love.graphics.scale with negative values causing incorrect line widths. * Fixed Joystick:isDown using 0-based button index arguments. * Fixed Source:setPitch to error when infinity or NaN is given. * Fixed love.graphics.setCanvas() to restore the proper viewport and scissor rectangles. * Fixed TrueType font glyphs which request a monochrome bitmap pixel mode. * Fixed love.graphics.reset causing crashes when called in between love.graphics.push/pop. * Fixed tab characters ("\t") to display properly with love.graphics.print. * Fixed love.graphics.isCreated to return false when love.window.setMode fails completely. * Fixed love.window.setMode to not destroy OpenGL resources before checking whether a fullsceren size is supported. * Fixed World:getBodyList and World:getJointList causing hard crashes. * Fixed loading BC4 compressed textures. * Fixed SoundData objects being initialized with garbage values. * Fixed 8-bit SoundData samples when used in love.audio Sources. * Updated the error text for love.filesystem’s module searchers when require fails. * Updated the love.filesystem module searchers to be tried after package.preload instead of before. * Updated love.graphics.newParticleSystem, newSpriteBatch, and newMesh to accept Canvases. * Updated Canvas drawing code, texture coordinates are no longer flipped vertically. * Updated Canvas:renderTo to work properly if a Canvas is currently active. * Updated ParticleSystem:setEmissionRate to accept non-integer numbers. * Updated Source:play to return a boolean indicating success. * Updated t.console in conf.lua to create the console before modules are loaded in Windows. * Updated Mesh vertex maps (index buffers) to use less space in VRAM. * Updated love.graphics.newMesh and Mesh:setVertices to default the UV parameters to 0,0. * Updated Fixture:set/getUserData to work in Coroutines. * Updated fullscreen-desktop and resizable window modes in OS X to use Mac OS 10.7's fullscreen Spaces. * Updated love.filesystem's C library loader to look in paths added via love.filesystem.mount, in Fused mode. * Updated the default love.run code to make initial love.math.random calls more random. LOVE 0.9.0 [Baby Inspector] --------------------------- Released: 2013-12-13 * Added better multiplayer networking support via ENet. * Added --fused command line argument, to simulate fusing. * Added liblove. * Added the ability to have exit values. * Added exit value of 1 in case of error by default. * Added basic support for the file:// uri scheme. * Added love.filesystem.isFused. * Added love.filesystem.getIdentity. * Added love.filesystem.append. * Added love.filesystem.getSize. * Added love.filesystem.mount and love.filesystem.unmount. * Added optional file search order parameter to love.filesystem.setIdentity. * Added File:isOpen and File:getMode. * Added Fie:setBuffer, File:getBuffer, and File:flush. * Added textinput event for unicode text input. * Added love.keyboard.setTextInput and love.keyboard.hasTextInput. * Added previously internal Rasterizer and GlyphData object methods. * Added support for UTF-8 ImageFonts. * Added Font:getAscent/getDescent/getBaseline. * Added Font:setFilter/getFilter. * Added Font:hasGlyphs. * Added angle, scale, and shear parameters to love.graphics.printf. * Added HDR canvas support. * Added mipmapping support (has isSupported test). * Added vertex shader support. * Added boolean support to Shader:send. * Added Canvas:getPixel. * Added blend mode "replace". * Added line join modes. * Added Mesh objects, allowing for arbitrary textured polygons. * Added multiple render target support to love.graphics.setCanvas. * Added love.graphics.setColorMask. * Added love.graphics.origin. * Added love.graphics.getRendererInfo. * Added love.graphics.getMaxImageSize. * Added SpriteBatch:getCount and SpriteBatch:getBufferSize. * Added SpriteBatch:getColor. * Added ParticleSystem:emit. * Added ParticleSystem:setInsertMode and ParticleSystem:getInsertMode. * Added many ParticleSystem getter methods. * Added DXT compressed texture support via love.image.newCompressedData. * Added love.image.isCompressed and Image:isCompressed. * Added Image/Canvas/ImageData:getDimensions. * Added anisotropic filtering support for Images, Canvases, and Fonts. * Added Image:refresh. * Added Image:getData. * Added SoundData:getDuration and SoundData:getSampleCount. * Added Source:isPlaying. * Added Source:setRelative and Source:isRelative. * Added Source:setCone and Source:getCone. * Added Source:getChannels. * Added new Channels API for love.thread. * Added limited table support to Channel:push. * Added Thread:getError. * Added Thread:isRunning. * Added threaderror event. * Added love.math module. * Added a platform-independent (good) random implementation to love.math. * Added RandomGenerator objects. * Added BezierCurve objects. * Added love.math.triangulate and love.math.isConvex. * Added love.math.noise. * Added love.timer.getAverageDelta. * Added Data:getString. * Added Contact:getChildren. * Added love.system module. * Added love.system.getClipboardText and love.system.setClipboardText. * Added love.system.getOS and love.system.getProcessorCount. * Added love.window module. * Added love.window.isVisible. * Added flags to love.window.setMode. * Added monitor choosing support to love.window.setMode. * Added support for resizable, borderless, and non-centered windows. * Added support for "fullscreen-desktop" mode. * Added window resize and visible events. * Added love.window.getDimensions. * Added love.window.getIcon. * Added t.window.icon to love.conf. * Added love.mousefocus and love.window.hasMouseFocus. * Added custom hardware cursors via love.mouse.newCursor. * Added love.mouse.setX/setY. * Added Joystick objects. * Added love.joystick.getJoystick. * Added joystick connect and disconnect events. * Added joystickaxis and joystickhat events. * Added unified Gamepad API for joysticks which have a similar layout to the Xbox controller. * Added joystick vibration support, works with most common gamepads. * OPTIONAL: Added support for Game Music Emu. * Fixed fused mode in OS X. * Fixed printing to the console in Windows before love.load is called. * Fixed the default love.run to not include the time taken by love.load in the first frame's dt. * Fixed the error screen not always appearing until the next input event. * Fixed love.event.clear. * Fixed love.mouse.setPosition when called in love.load. * Fixed scaling in several love.physics functions. * Fixed Box2D exception in World:update. * Fixed many uncaught Box2D / love.physics exceptions for Bodies and Joints. * Fixed ChainShape:getPoints running out of Lua stack space and crashing. * Fixed File:read reading past end of file. * Fixed love.filesystem.setIdentity not removing read access from old directories. * Fixed possible memory leak in utf-8 decoder. * Fixed spacing for the last character in an ImageFont. * Fixed line wrapping in love.graphics.printf. * Fixed love.graphics.printf to error if the wrap limit is negative. * Fixed love.graphics.print truncating strings with embedded zeros. * Fixed crashes with font drawing on some ATI cards. * Fixed artifacts when drawing lines at huge scale. * Fixed Fonts and Canvases ignoring default image filter. * Fixed scissor boxes when a canvas is set after love.graphics.setScissor is called. * Fixed love.graphics.getLineWidth returning incorrect values. * Fixed love.graphics.getColor on some Windows systems. * Fixed alpha blend mode. * Fixed multiplicative blend mode. * Fixed love.graphics.getPointStyle. * Fixed line numbers in shader errors. * Fixed Shader:send with Images and Canvases failing sometimes. * Fixed Shader:send to keep a reference to sent Images and Canvases. * Fixed crash when binding SpriteBatches multiple times. * Fixed SpriteBatches with more than 16,384 sprites. * Fixed particle draw order for ParticleSystems. * Fixed ParticleSystem:setSizes resetting the size variation. * Fixed the graphics viewport not matching the window size when using an unsupported fullscreen mode. * Fixed getMode and friends returning wrong values when using desktop size. * Fixed keyrepeat settings being lost after (indirect) setMode. * Fixed the icon being reset after setMode. * Fixed memory leak in the mp3 decoder. * Fixed sound issues with some versions of OpenAL soft, by enabling direct channels. * Fixed 'random' hangs in audio. * Fixed love.sound.newDecoder not accepting FileData. * Fixed case (in)sensitivity of sound file extension parsing. * Fixed looping support in tracker music formats. * Fixed skipping/looping issues when playing streaming audio Sources. * Fixed race condition in Source:play. * Fixed WAVE sound playback. * Moved love's startup to modules/love. * Moved window-related functions from love.graphics to love.window. * Renamed love's boot script to 'love.boot', which can be required. * Renamed love.filesystem.mkdir to love.filesystem.createDirectory. * Renamed love.filesystem.enumerate to love.filesystem.getDirectoryItems. * Renamed World:setAllowSleeping to World:setSleepingAllowed. * Renamed ChainShape:setPrevVertex to ChainShape:setPreviousVertex. * Renamed Joint:enableMotor to Joint:setMotorEnabled. * Renamed Joint:enableLimit and Joint:isLimitEnabled to Joint:setLimitsEnabled and Joint:hasLimitsEnabled. * Renamed t.screen to t.window in love.conf. * Renamed love.graphics.setCaption to love.window.setTitle. * Renamed PixelEffect to Shader (but now with vertex shaders). * Renamed love.graphics.setDefaultImageFilter to love.graphics.setDefaultFilter. * Renamed ParticleSystem:setSprite to ParticleSystem:setImage. * Renamed ParticleSystem:setGravity to ParticleSystem:setLinearAcceleration. * Renamed ParticleSystem:setLifetime/setParticleLife to setEmitter/ParticleLifetime. * Renamed ParticleSystem:count and all getNum* functions to get*Count. * Renamed Source:setDistance to Source:setAttenuationDistances. * Renamed SoundData:getBits and Decoder:getBits to SoundData:getBitDepth and Decoder:getBitDepth. * Renamed love.mouse.setGrab to love.mouse.setGrabbed. * Removed release mode. * Removed love.keyboard.getKeyRepeat (see love.keyboard.hasKeyRepeat). * Removed the unicode argument from love.keypressed (see love.textinput). * Removed love.graphics.drawTest. * Removed love.graphics.quad/triangle. * Removed love.graphics.setColorMode. * Removed love.graphics.newStencil. * Removed love.graphics.setLine/setPoint. * Removed love.graphics.drawq (functionality is merged into love.graphics.draw). * Removed SpriteBatch:addq/setq (functionality is merged into SpriteBatch:add/set). * Removed Quad:flip. * Removed ParticleSystem:isFull/isEmpty. * Removed ParticleSystem:getX/getY. * Removed love.graphics.checkMode. * Removed love.joystick.open and friends. * Removed love.joystick module functions which operated on individual joysticks (see Joystick objects). * Removed joystick ball support. * Removed thread names. * Removed old thread messaging API (see Channels). * Removed love.timer.getMicroTime. * Updated functions which return love objects to re-use the Lua-side object instead of always recreating it. * Updated the windows console, it now tries to re-use an active one first. * Updated error handling, error handlers now get resolved when the error occurs. * Updated order of sleep/present in love.run (now draws, *then* sleeps). * Updated love.filesystem to try to create the appdata directory if it doesn't exist yet. * Updated the default filesystem identity to omit file extension. * Updated love.filesystem.newFile to optionally open the file. * Updated most love.filesystem functions to return nil, error on internal failure. * Updated love.keyboard.setKeyRepeat to take a boolean argument instead of numbers. * Updated love.keypressed's second argument to be a boolean indicating key repeat. * Updated keyboard key constants for some more modern keyboard keys. * Updated window code to use adaptive vsync when available, if vsync is enabled. * updated love.graphics.print's x and y arguments to default to 0. * Updated the setFilter and setWrap methods, the second argument is now optional. * Updated Font and ParticleSystem rendering code, now more performant. * Updated SpriteBatch code, now more performant when adding/setting and (un)binding. * Updated Canvas code to support more systems. * Updated Canvas:getImageData and love.graphics.newScreenshot to be more efficient. * Updated love.graphics.newScreenshot to create a fully opaque image by default. * Updated error messages when sending bad values to Shaders. * Updated love.graphics.newParticleSystem to have a default buffer size of 1000. * Updated ImageData:setPixel to accept a table and default to 255 alpha. * Updated ImageData:mapPixel, is now more efficient and accepts optional x,y,w,h arguments. * Updated love.image memory handling, improves errors and thread-safety. * Updated all love object constructors to optionally accept FileData if they accept a filename. * Updated allocation for SoundData, it's more efficient and less wasteful. * Updated SoundData:set/getSample to error for invalid samples. * Updated Source:set* functions to default z to 0. * Updated Source:seek to error for negative offsets. * Updated Thread:start to accept arguments which get passed to the thread. * Updated love.timer.getFPS to be microsecond-accurate. * Updated love.timer.getTime to be microsecond-accurate and monotonic. * Updated Box2D to version 2.3.0. LOVE 0.8.0 [Rubber Piggy] ------------------------- Released: 2012-04-02 * Added release error screen. * Added alpha to love.graphics.setBackgroundColor. * Added Canvas:clear(r, g, b, a). * Added Canvas support to love.graphics.drawq. * Added Canvas:getWidth and Canvas:getHeight. * Added love.graphics.arc. * Added seek and tell to Source objects. * Added color interpolation to ParticleSystem. * Added automatic PO2 padding for systems not supporting the OpenGL extension. * Added UTF-8 support for fonts. * Added Box2D error handling for some commonly failing functions. * Added ability for fused release games to have their write dir in appdata. * Added shear transformation to drawing functions. * Added origin to font printing. * Added love.graphics.getMode. * Added per-sprite colors on SpriteBatches. * Added PixelEffects. * Added love.graphics.isSupported. * Added love.graphics.getCanvas. * Added love.event.quit. * Added stencil masks. * Added alternative SpriteBatch provider, it should work everywhere now. * Added a loader for binary modules. * Added Thread:getKeys. * Added option of fractions for Quads. * Added PNG, JPEG and GIF support to ImageData:encode. * Added 64-bit support for Mac OS X. * Added premultiplied blending mode. * Added functions to set/get default image filter modes. * Added SpriteBatch:set. * Added new events system, with support for custom events and long event names. * Added sound attenuation by distance. * Added SpriteBatch:getImage. * Added combine color mode. * Added automatic random seeding to love.run. * Added support for the subtract BlendMode on older graphics cards. * Added love._os field, which contains the OS the game is running on. * Fixed wrapping for single words. * Fixed tracebacks not showing filenames. * Fixed love.graphics.push/pop capable of causing overflows/underflows. * Fixed setScissor on Canvases. * Fixed several issues with audio, e.g. clicks and pops in mp3s. * Fixed crashes when bodies were destroyed during collisions. * Fixed bound SpriteBatches corrupting when drawing. * Fixed thread-safety issues with ImageData. * Fixed memory leaks in audio sources. * Fixed thread's set (previously send) accidentally changing the type. * Fixed SoundData allocating the wrong number of samples. * Fixed SpriteBatch support on Intel cards. * Fixed love.filesystem.lines() leaking. * Fixed most leaking on unclosed File objects. * Fixed crashes when operating on non-existent files. * Fixed a bug where empty files on windows would never reach eof. * Fixed crash when SoundData runs out of memory. * Fixed ordering of loaders, love should have priority over lua. * Fixed several miscellaneous memory leaks. * Fixed a few cases where strings with \0 in them would not be stored correctly. * Fixed love's startup time being in the first dt. * Fixed internal string conversions, they are faster now. * Fixed (bad) performance of ImageData:paste. * Fixed love.graphics.toggleFullscreen not maintaining graphics state. * Renamed SpriteBatch's lock/unlock to bind/unbind. * Renamed Framebuffer to Canvas. * Renamed love.thread.send/receive to set/get. * Renamed love.graphics.setRenderTarget to setCanvas. * Removed canvas auto-clearing. * Removed EncodedImageData. * Removed old syntax for require (with extension). * Removed love.graphics.setFont([file], [size]). * Removed Thread:kill. * Updated love.joystick to be 1-indexed. * Updated Sources to update more cleanly and control more intuitively. * Updated font engine. * Updated line drawing to a custom system. * Updated love.timer.sleep to use seconds, like the rest of love. * Updated love.timer to be more accurate. * Updated love.graphics.circle to have max(10, r) as default for segments. * Updated ImageData:encode to write to files directly. * Updated version compatibility system to actually do something. * Updated love.run's order, events are checked just before update. * Updated Box2D to version 2.2.1. LOVE 0.7.2 [Game Slave] ----------------------- Released: 2011-05-04 * Added Framebuffer:get/setWrap. * Added love.event.clear. * Added support for any number of arguments to love.keyboard.isDown, love.mouse.isDown and love.joystick.isDown. * Added SpriteBatch:setImage(). * Fixed fused games not working. * Fixed ParticleSystem:setSize ignoring the variation argument. * Fixed some file-opening exceptions not being caught. * Fixed files loaded by libmodplug being too loud. * Fixed paths with periods in them not working. * Fixed love.graphics.getBlendMode not detecting subtractive and multiplicative blend modes. * Fixed crash when there was no memory available for newImageData(w, h). * Updated PhysicsFS version to 2.0.2 on Windows * Updated OpenAL Soft version to 1.13 on Windows * Updated libmodplug version to 0.8.8.1 on Windows * Updated FreeType version to 2.4.4 on Windows * Updated libmpg123 version to 1.13.2 on Windows * Windows binary no longer depends on VC2005 runtime. * Windows binary no longer depends on SSE2 support. LOVE 0.7.1 [Game Slave] ----------------------- Released: 2011-02-14 * Added source:isPaused() * Added error when initial window can't be created. * Added framebuffer filter modes. * Added love.filesystem.getLastModified. * Added filter modes for ImageFonts. * Added dead key support by using "unknown" key with correct unicode value. * Added 0 width and height in love.conf. (for current desktop resolution) * Added alpha support when encoding TGA images. * Fixed a lot of bugs regarding zero characters in threads. * Fixed handling of a directory named "love" in current directory. * Fixed a few unhandled errors in setScissor. * Fixed a bug where old physics callbacks were never dereferenced. * Fixed loss of mouse visibility settings on setMode. * Fixed creation of a framebuffer unbinding current framebuffer. * Fixed several race conditions in love.thread. * Fixed 'love .', so it won't use lovedir/. as save dir. * Fixed setLineHeight. * Fixed extended ascii and ImageFonts. * Fixed printf's line wrapping. * Fixed crash when playing sounds. * Fixed playback of mp3s with arbitrary sample rates. * Fixed handling of negative indices in love.joystick. * Fixed toggleFullscreen. * Fixed unexpected behaviour with hash tables to love.graphics.line. * Fixed mouse coordinates being capped after setMode. * Fixed setFont's error handling on a non-existant file. * Fixed issue where Windows builds would hard crash on Lua errors * Removed custom sample rates for Decoders. LOVE 0.7.0 [Game Slave] ----------------------- Released: 2010-12-05 * Added love.thread. * Added love.font. * Added love.graphics.Framebuffer. * Added Source:play, Source:pause, etc. * Added Source:isStatic(). * Added get/setPosition, get/setVelocity, and get/setDirection to Source. * Added get/setGroupIndex to CircleShape and PolygonShape. * Added Font:getWrap. * Added identity field to love.conf. * Added love.quit callback. * Added love.focus callback. * Added extra meter parameter to love.physics.newWorld. * Added love.graphics.setIcon. * Added way to make the window desktop resolution. * Added subtractive and multiplicative blend modes. * Added body:getAllowSleeping. * Added shape:getBody. * Added love.filesystem.FileData for public usage. * Added base64 support for love.filesystem.FileData. * Added table support for love.graphics.setColor and love.graphics.setBackgroundColor. * Added love.graphics.hasFocus(). * Added ?/init.lua to the loader. * Fixed the debug module not being an upvalue of the error handlers. (you can now override debug) * Fixed some cases when love.audio.pause and friends, were acting on everything, not just the passed Source. * Fixed setFixedRotation enabling other flags. * Fixed a bug in the loader (for require). * Fixed ParticleSystem::setSprite not retaining the new image. * Fixed setMode removing images settings (wrapping, filters). * Fixed shape:getBody, it's now exposed for LÖVE usage. * Fixed DistanceJoint:getType() returning "circle" - it now returns "distance". * Fixed SpriteBatches being unaffected by setColor * Fixed the audio bug. * Fixed invalid FSAA values crashing LÖVE. * Fixed a bunch of compiler warnings. * Fixed OS X not properly using UTIs for .love files. * Fixed the modplug decoder not properly handeling files that fail to load. * Fixed a memory leak in setFont. * Fixed bug where errors in threads wouldn't get picked up by demand. * Fixed part of the bug with newlines when scaling text (rotating still messes up the lines). * Fixed the bug where newImageFont would try to created ImageData out of ImageData. * Fixed error handler not resetting the blend mode. * Changed fonts, they're now po2 safe. * Changed the traceback in the error screen. * Changed font origin to top-left. * Changed linux save dir location to obey to Freedesktop.org's XDG specs. (~/.local/share/love by default.) * Removed font functions from love.graphics. * Removed love.physics.newWorld(w, h). Use love.physics.newWorld(x1, y1, x2, y2) instead. LOVE 0.6.2 [Jiggly Juice] ------------------------- Released: 2010-03-06 * Fixed a bug causing ImageFonts to cut off some pixels. * Fixed a bug where filled rectangles were too small. * Fixed a bug in Image:setFilter where it would switch the parameters. * Fixed a bug in ImageRasterizer where it wasn't using the data. * Image filter and wrap modes now use string constants as well. * Fixed double-transform bug in SpriteBatch. * Errors are reported on stdout again. * Another fix for the icons on ubuntu. LOVE 0.6.1 [Jiggly Juice] ------------------------- Released: 2010-02-07 * Added Shape:setGroupIndex and getGroupIndex. * Added Body:setFixedRotation and Body:getFixedRotation. * Added Body:setInertia. * Added CircleShape:getLocalCenter and CircleShape:getWorldCenter. * Added icons and file associations for the debs. * Added the demos folder to the Mac OS X DMG. * It's now possible to run a .love from Resources in Mac OS X, thanks to Steve Johnson. * Fixed a bug with multiple Sources on the same Music. * Fixed a bug so the mouse doesn't get crippled when the keyboard is disabled. * Fixed a bug where love.graphics.rectangle drew a too large rectangle. * Fixed a bug where memory wouldn't be released correctly. * Fixed epic physics typo (getRestituion->getRestitution). * Fixed crash on opening non-existent image. * The error screen redraws when an event occurs. * The default love.run() now gracefully handles disabled modules. * The debian packages should now successfully include icons, file associations, etc, and should give the correct architecture. * Added support for drawing polylines to love.graphics.line - the syntax is the same as love.graphics.polygon. * Removed Music and Sound. There are now only sources. * Improved the stability of love.audio/love.sound. LOVE 0.6.0 [Jiggly Juice] ------------------------- Released: 2009-12-24 * Lost track of 0.6.0 changes a long while ago. Don't trust the list below. * Added love.graphics.print()/printf(). * Added unicode-translated parameter to love.keypressed(). * Added love.event. * Added love.filesystem.setIdentity(). * Added OpenAL dependency. * Fixed love.fileystem problems with internal \0 in strings. * Fixed love.filesystem.mkdir/remove not working when write directory not set. * Fixed position of Window. * Changed parameter order of draws(). * Changed origin for images to top-left. * Changed love.filesystem.open to accept mode (removed from love.filesystem.newFile). * Changed love.filesystem.read() which now returns two parameters (data, length). * Changed love.filesystem.write() which now takes up to four parameters (file, data, length, mode). * Changed default color mode to "modulate". * Changed name of love.color_normal to "replace". * Changed name of love.blend_normal to "alpha". * Changed the conf file format. * Removed Color object. * Removed Animation. * Removed several constants. * Removed love.graphics.draw() for strings. * Removed love.system. * Removed SWIG. * Removed boost. * Removed SDL_mixer. LOVE 0.5.0 [Salted Nuts] ------------------------ Released: 2009-01-02 * Added love.joystick. * Added network support via LuaSocket. * Added support for loading of appended .love-file. * Added love.filesystem.lines(). * Added a loader function to enable use of normal require(). * Added love.filesystem.load(). * Added love.filesystem.getSaveDirectory() * Added love.filesystem.getWorkingDirectory() * Added optional explicit destruction of Box2D objects. * Added shape:testSegment(). * Added love.graphics.screenshot() (.bmp only). * Added default size (12) to font-related functions. * Added love.graphics.setFont( filename, size ) * Added love.graphics.setLineStippe and related functions. * Added love.graphics.setPointSize and related functions. * Changed love.filesystem.read() to accept file name. * Changed love.filesystem.write() to accept file name. * Changed love.graphics.triangle() to accept CCW and CW ordering. * Fixed love.graphics.read adding bogus characters at the end of string. * Fixed epic swigfusion bug. * Fixed love.graphics.getFont so it returns nil if no font is present. * Fixed bug where love.graphics.getBlendMode() always returns blend_normal. * Fixed bug which caused error screen to be scissored (when enabled). * Fixed Body:setAngle to accept degrees like everything else. * Cleaned up love::File and love_physfs. * Cleaned up love::Reference so it stores its reference in _G. LOVE 0.4.0 [Taco Beam] ---------------------- Released: 2008-08-29 * Added love.physics. (YES!) * Added love.audio.setMode(). * Added love.audio.setChannels(). * Added love.graphics.polygon(). * Added love.graphics.setScissor() and love.graphics.getScissor() to handle scissoring the graphical area. * Fixed missing constants related to image optimization. * Fixed memory leak related to love::File (thanks amnesiasoft!). LOVE 0.3.2 [Lemony Fresh] ------------------------- Released: 2008-07-04 * Added love.graphics.rectangle() * Added love.graphics.setLineWidth() * Added love.graphics.setLineStyle() * Added love.graphics.getLineWidth() * Added love.graphics.getLineStyle() * Added love.mouse.getPosition() * Added love.audio_loop * Added love.timer.getTime() * Changed love.graphics.quad() to accept CCW and CW ordering. * Fixed default color mode bug. * Fixed line width being applied unnecessarily. * Fixed line width bug related to fullscreen toggle. * Fixed music not looping. LOVE 0.3.1 [Space Meat] ----------------------- Released: 2008-06-21 * Fixed segfault related to graphics. * Fixed wait-forever bug related to audio. * Fixed error reporting not working across modules. * Fixed bug where games with a trailing "/" would not start. * Fixed bug which caused love.timer.sleep to delay for (way) too long. LOVE 0.3.0 [Mutant Vermin] -------------------------- Released: 2008-06-17 * Added ParticleSystem. * Added visual error reporting. * Added love.system for game control needs. * Added input grabbing. * Added functions in love.graphics for display management. * Added love.graphics.point(). * Added functions in love.graphics for getting current color, font, etc. * Added love.filesystem.enumerate() for getting folder contents. * Added functions for setting the window caption. * Added version checking. An error occurs if the game is incompatible. * Fixed print() :) * Removed all keyboard shortcuts. * Save folders are now created only if required. * On Windows, the new save location is %APPDATA%\LOVE\game LOVE 0.2.1 [Impending Doom] --------------------------- Released: 2008-03-29 * Added many functions in love.filesystem. * Added a dedicated save-folder for each game. * Added timer.sleep. * Added line heights to font objects. * Added love.graphics.getWidth/getHeight. * Added scaling and rotation for text. * Added variable spacing to ImageFont. * Added support for variable line quality when drawing primitives. * Added several functions for drawing sections of images. (love.graphics.draws) * Added image optimization function and padding function. * Added love.graphics.getWidth/Height. * Split devices up into actual SWIG-modules. This means that: - Functions are used like this: love.graphics.draw, not love.graphics:draw - love.objects is no more. Objects are created by an appropriate device. * How you draw primitives has been altered. * draw(string, x, y, wrap, align) has become drawf(string, x, y, wrap, align) * Changed getFps to getFPS. * Escape is no more ... enter: Alt+F4. * love.filesystem.include has been renamed to love.filesystem.require. * ImageFonts now consider the spacing as well as the glyph size. * Fixed a massive ImageFont bug which resulted in float-positioning failure. * Fixed a bug when loading fonts where the specified size doesn't represent the true size of the font. * Updated DevIL to version 1.6.8-rc2 (Windows) * Updated FreeType to freetype-2.3.5-1 (Windows) * Updated Lua to 5.1.3 (Windows) * Updated SDL to 1.2.13 (Windows) * Removed boost::filesystem. LOVE 0.2.0 [Mini-Moose] ----------------------- Released: 2008-02-06 * Added ImageFont * Added Animation * Added text formatting functions * Added setCenter for Image and Animation. * Added methods for rendering of scaled/rotated sprites. * Added the drawing of basic shapes. * Added default font and embedded resources. * Added Ctrl+R for reload. * Added blending and color modes. * Fixed memory usage of Graphics. * Fixed a bug where the set text color would change the color of any images rendered. * Fixed CWD bug. * Fixed titlebar. Game title is now displayed. LOVE 0.1.1 [Santa-Power] ------------------------ Initial release! Released: 2008-01-13 * Image loading and rendering. * Sound loading and playing. * Font loading and rendering. * Lua-scriptable games. * Config files. * Stuff is loadable from archive files. * Keyboard, mouse, display, timer, etc. (Basic devices). ================================================ FILE: extra/cmake/FindHarfbuzz.cmake ================================================ # Sets the following variables: # # HARFBUZZ_FOUND # HARFBUZZ_INCLUDE_DIR # HARFBUZZ_LIBRARY set(HARFBUZZ_SEARCH_PATHS /usr/local /usr ) find_path(HARFBUZZ_INCLUDE_DIR NAMES hb.h PATH_SUFFIXES include include/harfbuzz PATHS ${HARFBUZZ_SEARCH_PATHS}) find_library(HARFBUZZ_LIBRARY NAMES harfbuzz PATH_SUFFIXES lib PATHS ${HARFBUZZ_SEARCH_PATHS}) include(FindPackageHandleStandardArgs) find_package_handle_standard_args(Harfbuzz DEFAULT_MSG HARFBUZZ_LIBRARY HARFBUZZ_INCLUDE_DIR) mark_as_advanced(HARFBUZZ_INCLUDE_DIR HARFBUZZ_LIBRARY) ================================================ FILE: extra/cmake/FindLuaJIT.cmake ================================================ # Sets the following variables: # # LUAJIT_FOUND # LUAJIT_INCLUDE_DIR # LUAJIT_LIBRARY set(LUAJIT_SEARCH_PATHS /usr/local /usr ) find_path(LUAJIT_INCLUDE_DIR NAMES luajit.h PATH_SUFFIXES include include/luajit-2.0 include/luajit-2.1 PATHS ${LUAJIT_SEARCH_PATHS}) find_library(LUAJIT_LIBRARY NAMES luajit-5.1 PATH_SUFFIXES lib PATHS ${LUAJIT_SEARCH_PATHS}) include(FindPackageHandleStandardArgs) find_package_handle_standard_args(LuaJIT DEFAULT_MSG LUAJIT_LIBRARY LUAJIT_INCLUDE_DIR) mark_as_advanced(LUAJIT_INCLUDE_DIR LUAJIT_LIBRARY) ================================================ FILE: extra/cmake/FindModPlug.cmake ================================================ # Sets the following variables: # # MODPLUG_FOUND # MODPLUG_INCLUDE_DIR # MODPLUG_LIBRARY set(MODPLUG_SEARCH_PATHS /usr/local /usr ) find_path(MODPLUG_INCLUDE_DIR NAMES libmodplug/modplug.h PATH_SUFFIXES include PATHS ${MODPLUG_SEARCH_PATHS}) find_library(MODPLUG_LIBRARY NAMES modplug PATH_SUFFIXES lib PATHS ${MODPLUG_SEARCH_PATHS}) include(FindPackageHandleStandardArgs) find_package_handle_standard_args(ModPlug DEFAULT_MSG MODPLUG_LIBRARY MODPLUG_INCLUDE_DIR) mark_as_advanced(MODPLUG_INCLUDE_DIR MODPLUG_LIBRARY) ================================================ FILE: extra/cmake/FindOgg.cmake ================================================ # Sets the following variables: # # OGG_FOUND # OGG_INCLUDE_DIR # OGG_LIBRARY set(OGG_SEARCH_PATHS /usr/local /usr ) find_path(OGG_INCLUDE_DIR NAMES ogg/ogg.h PATH_SUFFIXES include PATHS ${OGG_SEARCH_PATHS}) find_library(OGG_LIBRARY NAMES ogg PATH_SUFFIXES lib PATHS ${OGG_SEARCH_PATHS}) include(FindPackageHandleStandardArgs) find_package_handle_standard_args(Ogg DEFAULT_MSG OGG_LIBRARY OGG_INCLUDE_DIR) mark_as_advanced(OGG_INCLUDE_DIR OGG_LIBRARY) ================================================ FILE: extra/cmake/FindSDL2.cmake ================================================ # Sets the following variables: # # SDL2_FOUND # SDL2_INCLUDE_DIR # SDL2_LIBRARY set(SDL2_SEARCH_PATHS /usr/local /usr ) find_path(SDL2_INCLUDE_DIR NAMES SDL.h PATH_SUFFIXES include include/SDL2 PATHS ${SDL2_SEARCH_PATHS}) find_library(SDL2_LIBRARY NAMES SDL2 PATH_SUFFIXES lib PATHS ${SDL2_SEARCH_PATHS}) include(FindPackageHandleStandardArgs) find_package_handle_standard_args(SDL2 DEFAULT_MSG SDL2_LIBRARY SDL2_INCLUDE_DIR) mark_as_advanced(SDL2_INCLUDE_DIR SDL2_LIBRARY) ================================================ FILE: extra/cmake/FindTheora.cmake ================================================ # Sets the following variables: # # THEORA_FOUND # THEORA_INCLUDE_DIR # THEORA_LIBRARY # THEORADEC_LIBRARY set(THEORA_SEARCH_PATHS /usr/local /usr ) find_path(THEORA_INCLUDE_DIR NAMES theora/codec.h PATH_SUFFIXES include PATHS ${THEORA_SEARCH_PATHS}) find_library(THEORA_LIBRARY NAMES theora PATH_SUFFIXES lib PATHS ${THEORA_SEARCH_PATHS}) find_library(THEORADEC_LIBRARY NAMES theoradec PATH_SUFFIXES lib PATHS ${THEORA_SEARCH_PATHS}) include(FindPackageHandleStandardArgs) find_package_handle_standard_args(Theora DEFAULT_MSG THEORA_LIBRARY THEORA_INCLUDE_DIR) mark_as_advanced(THEORA_INCLUDE_DIR THEORA_LIBRARY) ================================================ FILE: extra/cmake/FindVorbis.cmake ================================================ # Sets the following variables: # # VORBIS_FOUND # VORBIS_INCLUDE_DIR # VORBIS_LIBRARY # VORBISFILE_LIBRARY set(VORBIS_SEARCH_PATHS /usr/local /usr ) find_path(VORBIS_INCLUDE_DIR vorbis/vorbisfile.h PATH_SUFFIXES include PATHS ${VORBIS_SEARCH_PATHS}) find_library(VORBIS_LIBRARY NAMES vorbis PATH_SUFFIXES lib PATHS ${VORBIS_SEARCH_PATHS}) find_library(VORBISFILE_LIBRARY NAMES vorbisfile PATH_SUFFIXES lib PATHS ${VORBIS_SEARCH_PATHS}) include(FindPackageHandleStandardArgs) find_package_handle_standard_args(Vorbis DEFAULT_MSG VORBIS_LIBRARY VORBISFILE_LIBRARY VORBIS_INCLUDE_DIR) mark_as_advanced(VORBIS_INCLUDE_DIR VORBIS_LIBRARY VORBISFILE_LIBRARY) ================================================ FILE: extra/cmake/LoveMacros.cmake ================================================ # Group all related stuff in folders in Visual Studio function(love_group_projects) set(options NESTED) set(oneValueArgs NAME) set(multiValueArgs TARGETS) cmake_parse_arguments(LOVE_GROUP "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) foreach(TARGET_NAME ${LOVE_GROUP_TARGETS}) if (TARGET ${TARGET_NAME}) get_target_property(TARGET_TYPE ${TARGET_NAME} TYPE) # If this is an interface target, walk the children if (${TARGET_TYPE} STREQUAL "INTERFACE_LIBRARY") get_target_property(TARGET_LIBS ${TARGET_NAME} INTERFACE_LINK_LIBRARIES) foreach(TARGET_LIB ${TARGET_LIBS}) # Is this a target? (Could also be a .lib file) if (TARGET ${TARGET_LIB}) # Resolve aliased target get_target_property(ORIGINAL_TARGET ${TARGET_LIB} ALIASED_TARGET) if (ORIGINAL_TARGET) set(TARGET_LIB ${ORIGINAL_TARGET}) endif() # Do we want to nest per-project? if (LOVE_GROUP_NESTED) set_target_properties(${TARGET_LIB} PROPERTIES FOLDER "${LOVE_GROUP_NAME}/${TARGET_NAME}") else() set_target_properties(${TARGET_LIB} PROPERTIES FOLDER "${LOVE_GROUP_NAME}") endif() endif() endforeach() else() # This is no interface library, so group it under the root 'NAME' node set_target_properties(${TARGET_NAME} PROPERTIES FOLDER "${LOVE_GROUP_NAME}") endif() endif() endforeach() endfunction() ================================================ FILE: extra/cmake/NSIS.template.in ================================================ ; CMake - Cross Platform Makefile Generator ; Copyright 2000-2024 Kitware, Inc. and Contributors ; All rights reserved. ; ; Redistribution and use in source and binary forms, with or without ; modification, are permitted provided that the following conditions ; are met: ; ; * Redistributions of source code must retain the above copyright ; notice, this list of conditions and the following disclaimer. ; ; * Redistributions in binary form must reproduce the above copyright ; notice, this list of conditions and the following disclaimer in the ; documentation and/or other materials provided with the distribution. ; ; * Neither the name of Kitware, Inc. nor the names of Contributors ; may be used to endorse or promote products derived from this ; software without specific prior written permission. ; ; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ; "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ; LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR ; A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT ; HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ; SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ; LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, ; DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ; THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ; ; ------------------------------------------------------------------------------ ; ; The following individuals and institutions are among the Contributors: ; ; * Aaron C. Meadows ; * Adriaan de Groot ; * Aleksey Avdeev ; * Alexander Neundorf ; * Alexander Smorkalov ; * Alexey Sokolov ; * Alex Merry ; * Alex Turbov ; * Andreas Pakulat ; * Andreas Schneider ; * André Rigland Brodtkorb ; * Axel Huebl, Helmholtz-Zentrum Dresden - Rossendorf ; * Benjamin Eikel ; * Bjoern Ricks ; * Brad Hards ; * Christopher Harvey ; * Christoph Grüninger ; * Clement Creusot ; * Daniel Blezek ; * Daniel Pfeifer ; * Dawid Wróbel ; * Enrico Scholz ; * Eran Ifrah ; * Esben Mose Hansen, Ange Optimization ApS ; * Geoffrey Viola ; * Google Inc ; * Gregor Jasny ; * Helio Chissini de Castro ; * Ilya Lavrenov ; * Insight Software Consortium ; * Intel Corporation ; * Jan Woetzel ; * Jordan Williams ; * Julien Schueller ; * Kelly Thompson ; * Konstantin Podsvirov ; * Laurent Montel ; * Mario Bensi ; * Martin Gräßlin ; * Mathieu Malaterre ; * Matthaeus G. Chajdas ; * Matthias Kretz ; * Matthias Maennich ; * Michael Hirsch, Ph.D. ; * Michael Stürmer ; * Miguel A. Figueroa-Villanueva ; * Mike Durso ; * Mike Jackson ; * Mike McQuaid ; * Nicolas Bock ; * Nicolas Despres ; * Nikita Krupen'ko ; * NVIDIA Corporation ; * OpenGamma Ltd. ; * Patrick Stotko ; * Per Øyvind Karlsen ; * Peter Collingbourne ; * Petr Gotthard ; * Philip Lowman ; * Philippe Proulx ; * Raffi Enficiaud, Max Planck Society ; * Raumfeld ; * Roger Leigh ; * Rolf Eike Beer ; * Roman Donchenko ; * Roman Kharitonov ; * Ruslan Baratov ; * Sebastian Holtermann ; * Stephen Kelly ; * Sylvain Joubert ; * The Qt Company Ltd. ; * Thomas Sondergaard ; * Tobias Hunger ; * Todd Gamblin ; * Tristan Carel ; * University of Dundee ; * Vadim Zhukov ; * Will Dicharry ; ; See version control history for details of individual contributions. ; ; The above copyright and license notice applies to distributions of ; CMake in source and binary form. Third-party software packages supplied ; with CMake under compatible licenses provide their own copyright notices ; documented in corresponding subdirectories or source files. ; ; ------------------------------------------------------------------------------ ; ; CMake was initially developed by Kitware with the following sponsorship: ; ; * National Library of Medicine at the National Institutes of Health ; as part of the Insight Segmentation and Registration Toolkit (ITK). ; ; * US National Labs (Los Alamos, Livermore, Sandia) ASC Parallel ; Visualization Initiative. ; ; * National Alliance for Medical Image Computing (NAMIC) is funded by the ; National Institutes of Health through the NIH Roadmap for Medical Research, ; Grant U54 EB005149. ; ; * Kitware, Inc. ; CPack install script designed for a nmake build ;-------------------------------- ; You must define these values !define VERSION "@CPACK_PACKAGE_VERSION@" !define PATCH "@CPACK_PACKAGE_VERSION_PATCH@" !define INST_DIR "@CPACK_TEMPORARY_DIRECTORY@" ;-------------------------------- ;Variables Var MUI_TEMP Var STARTMENU_FOLDER Var SV_ALLUSERS Var START_MENU Var DO_NOT_ADD_TO_PATH Var ADD_TO_PATH_ALL_USERS Var ADD_TO_PATH_CURRENT_USER Var INSTALL_DESKTOP Var IS_DEFAULT_INSTALLDIR ;-------------------------------- ;Include Modern UI !include "MUI.nsh" ;Default installation folder InstallDir "@CPACK_NSIS_INSTALL_ROOT@\@CPACK_PACKAGE_INSTALL_DIRECTORY@" ;-------------------------------- ;General ;Name and file Name "@CPACK_NSIS_PACKAGE_NAME@" OutFile "@CPACK_TOPLEVEL_DIRECTORY@/@CPACK_OUTPUT_FILE_NAME@" ;Set compression SetCompressor @CPACK_NSIS_COMPRESSOR@ ;Require administrator access RequestExecutionLevel admin @CPACK_NSIS_DEFINES@ @CPACK_NSIS_MANIFEST_DPI_AWARE_CODE@ @CPACK_NSIS_BRANDING_TEXT_CODE@ !include Sections.nsh ;--- Component support macros: --- ; The code for the add/remove functionality is from: ; https://nsis.sourceforge.io/Add/Remove_Functionality ; It has been modified slightly and extended to provide ; inter-component dependencies. Var AR_SecFlags Var AR_RegFlags @CPACK_NSIS_SECTION_SELECTED_VARS@ ; Loads the "selected" flag for the section named SecName into the ; variable VarName. !macro LoadSectionSelectedIntoVar SecName VarName SectionGetFlags ${${SecName}} $${VarName} IntOp $${VarName} $${VarName} & ${SF_SELECTED} ;Turn off all other bits !macroend ; Loads the value of a variable... can we get around this? !macro LoadVar VarName IntOp $R0 0 + $${VarName} !macroend ; Sets the value of a variable !macro StoreVar VarName IntValue IntOp $${VarName} 0 + ${IntValue} !macroend !macro InitSection SecName ; This macro reads component installed flag from the registry and ;changes checked state of the section on the components page. ;Input: section index constant name specified in Section command. ClearErrors ;Reading component status from registry ReadRegDWORD $AR_RegFlags HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@\Components\${SecName}" "Installed" IfErrors "default_${SecName}" ;Status will stay default if registry value not found ;(component was never installed) IntOp $AR_RegFlags $AR_RegFlags & ${SF_SELECTED} ;Turn off all other bits SectionGetFlags ${${SecName}} $AR_SecFlags ;Reading default section flags IntOp $AR_SecFlags $AR_SecFlags & 0xFFFE ;Turn lowest (enabled) bit off IntOp $AR_SecFlags $AR_RegFlags | $AR_SecFlags ;Change lowest bit ; Note whether this component was installed before !insertmacro StoreVar ${SecName}_was_installed $AR_RegFlags IntOp $R0 $AR_RegFlags & $AR_RegFlags ;Writing modified flags SectionSetFlags ${${SecName}} $AR_SecFlags "default_${SecName}:" !insertmacro LoadSectionSelectedIntoVar ${SecName} ${SecName}_selected !macroend !macro FinishSection SecName ; This macro reads section flag set by user and removes the section ;if it is not selected. ;Then it writes component installed flag to registry ;Input: section index constant name specified in Section command. SectionGetFlags ${${SecName}} $AR_SecFlags ;Reading section flags ;Checking lowest bit: IntOp $AR_SecFlags $AR_SecFlags & ${SF_SELECTED} IntCmp $AR_SecFlags 1 "leave_${SecName}" ;Section is not selected: ;Calling Section uninstall macro and writing zero installed flag !insertmacro "Remove_${${SecName}}" WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@\Components\${SecName}" \ "Installed" 0 Goto "exit_${SecName}" "leave_${SecName}:" ;Section is selected: WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@\Components\${SecName}" \ "Installed" 1 "exit_${SecName}:" !macroend !macro RemoveSection_CPack SecName ; This macro is used to call section's Remove_... macro ;from the uninstaller. ;Input: section index constant name specified in Section command. !insertmacro "Remove_${${SecName}}" !macroend ; Determine whether the selection of SecName changed !macro MaybeSelectionChanged SecName !insertmacro LoadVar ${SecName}_selected SectionGetFlags ${${SecName}} $R1 IntOp $R1 $R1 & ${SF_SELECTED} ;Turn off all other bits ; See if the status has changed: IntCmp $R0 $R1 "${SecName}_unchanged" !insertmacro LoadSectionSelectedIntoVar ${SecName} ${SecName}_selected IntCmp $R1 ${SF_SELECTED} "${SecName}_was_selected" !insertmacro "Deselect_required_by_${SecName}" goto "${SecName}_unchanged" "${SecName}_was_selected:" !insertmacro "Select_${SecName}_depends" "${SecName}_unchanged:" !macroend ;--- End of Add/Remove macros --- ;-------------------------------- ;Interface Settings !define MUI_HEADERIMAGE !define MUI_ABORTWARNING ;---------------------------------------- ; based upon a script of "Written by KiCHiK 2003-01-18 05:57:02" ;---------------------------------------- !verbose 3 !include "WinMessages.NSH" !verbose 4 ;==================================================== ; get_NT_environment ; Returns: the selected environment ; Output : head of the stack ;==================================================== !macro select_NT_profile UN Function ${UN}select_NT_profile StrCmp $ADD_TO_PATH_ALL_USERS "1" 0 environment_single DetailPrint "Selected environment for all users" Push "all" Return environment_single: DetailPrint "Selected environment for current user only." Push "current" Return FunctionEnd !macroend !insertmacro select_NT_profile "" !insertmacro select_NT_profile "un." ;---------------------------------------------------- !define NT_current_env 'HKCU "Environment"' !define NT_all_env 'HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"' !ifndef WriteEnvStr_RegKey !ifdef ALL_USERS !define WriteEnvStr_RegKey \ 'HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"' !else !define WriteEnvStr_RegKey 'HKCU "Environment"' !endif !endif ; AddToPath - Adds the given dir to the search path. ; Input - head of the stack ; Note - Win9x systems requires reboot Function AddToPath Exch $0 Push $1 Push $2 Push $3 # don't add if the path doesn't exist IfFileExists "$0\*.*" "" AddToPath_done ReadEnvStr $1 PATH ; if the path is too long for a NSIS variable NSIS will return a 0 ; length string. If we find that, then warn and skip any path ; modification as it will trash the existing path. StrLen $2 $1 IntCmp $2 0 CheckPathLength_ShowPathWarning CheckPathLength_Done CheckPathLength_Done CheckPathLength_ShowPathWarning: Messagebox MB_OK|MB_ICONEXCLAMATION "Warning! PATH too long installer unable to modify PATH!" Goto AddToPath_done CheckPathLength_Done: Push "$1;" Push "$0;" Call StrStr Pop $2 StrCmp $2 "" "" AddToPath_done Push "$1;" Push "$0\;" Call StrStr Pop $2 StrCmp $2 "" "" AddToPath_done GetFullPathName /SHORT $3 $0 Push "$1;" Push "$3;" Call StrStr Pop $2 StrCmp $2 "" "" AddToPath_done Push "$1;" Push "$3\;" Call StrStr Pop $2 StrCmp $2 "" "" AddToPath_done Call IsNT Pop $1 StrCmp $1 1 AddToPath_NT ; Not on NT StrCpy $1 $WINDIR 2 FileOpen $1 "$1\autoexec.bat" a FileSeek $1 -1 END FileReadByte $1 $2 IntCmp $2 26 0 +2 +2 # DOS EOF FileSeek $1 -1 END # write over EOF FileWrite $1 "$\r$\nSET PATH=%PATH%;$3$\r$\n" FileClose $1 SetRebootFlag true Goto AddToPath_done AddToPath_NT: StrCmp $ADD_TO_PATH_ALL_USERS "1" ReadAllKey ReadRegStr $1 ${NT_current_env} "PATH" Goto DoTrim ReadAllKey: ReadRegStr $1 ${NT_all_env} "PATH" DoTrim: StrCmp $1 "" AddToPath_NTdoIt Push $1 Call Trim Pop $1 StrCpy $0 "$1;$0" AddToPath_NTdoIt: StrCmp $ADD_TO_PATH_ALL_USERS "1" WriteAllKey WriteRegExpandStr ${NT_current_env} "PATH" $0 Goto DoSend WriteAllKey: WriteRegExpandStr ${NT_all_env} "PATH" $0 DoSend: SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000 AddToPath_done: Pop $3 Pop $2 Pop $1 Pop $0 FunctionEnd ; RemoveFromPath - Remove a given dir from the path ; Input: head of the stack Function un.RemoveFromPath Exch $0 Push $1 Push $2 Push $3 Push $4 Push $5 Push $6 IntFmt $6 "%c" 26 # DOS EOF Call un.IsNT Pop $1 StrCmp $1 1 unRemoveFromPath_NT ; Not on NT StrCpy $1 $WINDIR 2 FileOpen $1 "$1\autoexec.bat" r GetTempFileName $4 FileOpen $2 $4 w GetFullPathName /SHORT $0 $0 StrCpy $0 "SET PATH=%PATH%;$0" Goto unRemoveFromPath_dosLoop unRemoveFromPath_dosLoop: FileRead $1 $3 StrCpy $5 $3 1 -1 # read last char StrCmp $5 $6 0 +2 # if DOS EOF StrCpy $3 $3 -1 # remove DOS EOF so we can compare StrCmp $3 "$0$\r$\n" unRemoveFromPath_dosLoopRemoveLine StrCmp $3 "$0$\n" unRemoveFromPath_dosLoopRemoveLine StrCmp $3 "$0" unRemoveFromPath_dosLoopRemoveLine StrCmp $3 "" unRemoveFromPath_dosLoopEnd FileWrite $2 $3 Goto unRemoveFromPath_dosLoop unRemoveFromPath_dosLoopRemoveLine: SetRebootFlag true Goto unRemoveFromPath_dosLoop unRemoveFromPath_dosLoopEnd: FileClose $2 FileClose $1 StrCpy $1 $WINDIR 2 Delete "$1\autoexec.bat" CopyFiles /SILENT $4 "$1\autoexec.bat" Delete $4 Goto unRemoveFromPath_done unRemoveFromPath_NT: StrCmp $ADD_TO_PATH_ALL_USERS "1" unReadAllKey ReadRegStr $1 ${NT_current_env} "PATH" Goto unDoTrim unReadAllKey: ReadRegStr $1 ${NT_all_env} "PATH" unDoTrim: StrCpy $5 $1 1 -1 # copy last char StrCmp $5 ";" +2 # if last char != ; StrCpy $1 "$1;" # append ; Push $1 Push "$0;" Call un.StrStr ; Find `$0;` in $1 Pop $2 ; pos of our dir StrCmp $2 "" unRemoveFromPath_done ; else, it is in path # $0 - path to add # $1 - path var StrLen $3 "$0;" StrLen $4 $2 StrCpy $5 $1 -$4 # $5 is now the part before the path to remove StrCpy $6 $2 "" $3 # $6 is now the part after the path to remove StrCpy $3 $5$6 StrCpy $5 $3 1 -1 # copy last char StrCmp $5 ";" 0 +2 # if last char == ; StrCpy $3 $3 -1 # remove last char StrCmp $ADD_TO_PATH_ALL_USERS "1" unWriteAllKey WriteRegExpandStr ${NT_current_env} "PATH" $3 Goto unDoSend unWriteAllKey: WriteRegExpandStr ${NT_all_env} "PATH" $3 unDoSend: SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000 unRemoveFromPath_done: Pop $6 Pop $5 Pop $4 Pop $3 Pop $2 Pop $1 Pop $0 FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Uninstall stuff ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ########################################### # Utility Functions # ########################################### ;==================================================== ; IsNT - Returns 1 if the current system is NT, 0 ; otherwise. ; Output: head of the stack ;==================================================== ; IsNT ; no input ; output, top of the stack = 1 if NT or 0 if not ; ; Usage: ; Call IsNT ; Pop $R0 ; ($R0 at this point is 1 or 0) !macro IsNT un Function ${un}IsNT Push $0 ReadRegStr $0 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion StrCmp $0 "" 0 IsNT_yes ; we are not NT. Pop $0 Push 0 Return IsNT_yes: ; NT!!! Pop $0 Push 1 FunctionEnd !macroend !insertmacro IsNT "" !insertmacro IsNT "un." ; StrStr ; input, top of stack = string to search for ; top of stack-1 = string to search in ; output, top of stack (replaces with the portion of the string remaining) ; modifies no other variables. ; ; Usage: ; Push "this is a long ass string" ; Push "ass" ; Call StrStr ; Pop $R0 ; ($R0 at this point is "ass string") !macro StrStr un Function ${un}StrStr Exch $R1 ; st=haystack,old$R1, $R1=needle Exch ; st=old$R1,haystack Exch $R2 ; st=old$R1,old$R2, $R2=haystack Push $R3 Push $R4 Push $R5 StrLen $R3 $R1 StrCpy $R4 0 ; $R1=needle ; $R2=haystack ; $R3=len(needle) ; $R4=cnt ; $R5=tmp loop: StrCpy $R5 $R2 $R3 $R4 StrCmp $R5 $R1 done StrCmp $R5 "" done IntOp $R4 $R4 + 1 Goto loop done: StrCpy $R1 $R2 "" $R4 Pop $R5 Pop $R4 Pop $R3 Pop $R2 Exch $R1 FunctionEnd !macroend !insertmacro StrStr "" !insertmacro StrStr "un." Function Trim ; Added by Pelaca Exch $R1 Push $R2 Loop: StrCpy $R2 "$R1" 1 -1 StrCmp "$R2" " " RTrim StrCmp "$R2" "$\n" RTrim StrCmp "$R2" "$\r" RTrim StrCmp "$R2" ";" RTrim GoTo Done RTrim: StrCpy $R1 "$R1" -1 Goto Loop Done: Pop $R2 Exch $R1 FunctionEnd Function ConditionalAddToRegistry Pop $0 Pop $1 StrCmp "$0" "" ConditionalAddToRegistry_EmptyString WriteRegStr SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" \ "$1" "$0" ;MessageBox MB_OK "Set Registry: '$1' to '$0'" DetailPrint "Set install registry entry: '$1' to '$0'" ConditionalAddToRegistry_EmptyString: FunctionEnd ;-------------------------------- !ifdef CPACK_USES_DOWNLOAD Function DownloadFile IfFileExists $INSTDIR\* +2 CreateDirectory $INSTDIR Pop $0 ; Skip if already downloaded IfFileExists $INSTDIR\$0 0 +2 Return StrCpy $1 "@CPACK_DOWNLOAD_SITE@" try_again: NSISdl::download "$1/$0" "$INSTDIR\$0" Pop $1 StrCmp $1 "success" success StrCmp $1 "Cancelled" cancel MessageBox MB_OK "Download failed: $1" cancel: Return success: FunctionEnd !endif ;-------------------------------- ; Define some macro setting for the gui @CPACK_NSIS_INSTALLER_MUI_ICON_CODE@ @CPACK_NSIS_INSTALLER_ICON_CODE@ @CPACK_NSIS_INSTALLER_MUI_WELCOMEFINISH_CODE@ @CPACK_NSIS_INSTALLER_MUI_UNWELCOMEFINISH_CODE@ @CPACK_NSIS_INSTALLER_MUI_FINISHPAGE_RUN_CODE@ ;-------------------------------- ;Pages @CPACK_NSIS_INSTALLER_WELCOME_TITLE_CODE@ @CPACK_NSIS_INSTALLER_WELCOME_TITLE_3LINES_CODE@ !insertmacro MUI_PAGE_WELCOME @CPACK_NSIS_LICENSE_PAGE@ Page custom InstallOptionsPage !insertmacro MUI_PAGE_DIRECTORY ;Start Menu Folder Page Configuration !define MUI_STARTMENUPAGE_REGISTRY_ROOT "SHCTX" !define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\@CPACK_PACKAGE_VENDOR@\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" !define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder" !insertmacro MUI_PAGE_STARTMENU Application $STARTMENU_FOLDER @CPACK_NSIS_PAGE_COMPONENTS@ !insertmacro MUI_PAGE_INSTFILES @CPACK_NSIS_INSTALLER_FINISH_TITLE_CODE@ @CPACK_NSIS_INSTALLER_FINISH_TITLE_3LINES_CODE@ !insertmacro MUI_PAGE_FINISH !insertmacro MUI_UNPAGE_CONFIRM !insertmacro MUI_UNPAGE_INSTFILES ;-------------------------------- ;Languages !insertmacro MUI_LANGUAGE "English" ;first language is the default language !insertmacro MUI_LANGUAGE "Afrikaans" !insertmacro MUI_LANGUAGE "Albanian" !insertmacro MUI_LANGUAGE "Arabic" !insertmacro MUI_LANGUAGE "Asturian" !insertmacro MUI_LANGUAGE "Basque" !insertmacro MUI_LANGUAGE "Belarusian" !insertmacro MUI_LANGUAGE "Bosnian" !insertmacro MUI_LANGUAGE "Breton" !insertmacro MUI_LANGUAGE "Bulgarian" !insertmacro MUI_LANGUAGE "Catalan" !insertmacro MUI_LANGUAGE "Corsican" !insertmacro MUI_LANGUAGE "Croatian" !insertmacro MUI_LANGUAGE "Czech" !insertmacro MUI_LANGUAGE "Danish" !insertmacro MUI_LANGUAGE "Dutch" !insertmacro MUI_LANGUAGE "Esperanto" !insertmacro MUI_LANGUAGE "Estonian" !insertmacro MUI_LANGUAGE "Farsi" !insertmacro MUI_LANGUAGE "Finnish" !insertmacro MUI_LANGUAGE "French" !insertmacro MUI_LANGUAGE "Galician" !insertmacro MUI_LANGUAGE "German" !insertmacro MUI_LANGUAGE "Greek" !insertmacro MUI_LANGUAGE "Hebrew" !insertmacro MUI_LANGUAGE "Hungarian" !insertmacro MUI_LANGUAGE "Icelandic" !insertmacro MUI_LANGUAGE "Indonesian" !insertmacro MUI_LANGUAGE "Irish" !insertmacro MUI_LANGUAGE "Italian" !insertmacro MUI_LANGUAGE "Japanese" !insertmacro MUI_LANGUAGE "Korean" !insertmacro MUI_LANGUAGE "Kurdish" !insertmacro MUI_LANGUAGE "Latvian" !insertmacro MUI_LANGUAGE "Lithuanian" !insertmacro MUI_LANGUAGE "Luxembourgish" !insertmacro MUI_LANGUAGE "Macedonian" !insertmacro MUI_LANGUAGE "Malay" !insertmacro MUI_LANGUAGE "Mongolian" !insertmacro MUI_LANGUAGE "Norwegian" !insertmacro MUI_LANGUAGE "NorwegianNynorsk" !insertmacro MUI_LANGUAGE "Pashto" !insertmacro MUI_LANGUAGE "Polish" !insertmacro MUI_LANGUAGE "Portuguese" !insertmacro MUI_LANGUAGE "PortugueseBR" !insertmacro MUI_LANGUAGE "Romanian" !insertmacro MUI_LANGUAGE "Russian" !insertmacro MUI_LANGUAGE "ScotsGaelic" !insertmacro MUI_LANGUAGE "Serbian" !insertmacro MUI_LANGUAGE "SerbianLatin" !insertmacro MUI_LANGUAGE "SimpChinese" !insertmacro MUI_LANGUAGE "Slovak" !insertmacro MUI_LANGUAGE "Slovenian" !insertmacro MUI_LANGUAGE "Spanish" !insertmacro MUI_LANGUAGE "SpanishInternational" !insertmacro MUI_LANGUAGE "Swedish" !insertmacro MUI_LANGUAGE "Tatar" !insertmacro MUI_LANGUAGE "Thai" !insertmacro MUI_LANGUAGE "TradChinese" !insertmacro MUI_LANGUAGE "Turkish" !insertmacro MUI_LANGUAGE "Ukrainian" !insertmacro MUI_LANGUAGE "Uzbek" !insertmacro MUI_LANGUAGE "Vietnamese" !insertmacro MUI_LANGUAGE "Welsh" ;-------------------------------- ;Reserve Files ;These files should be inserted before other files in the data block ;Keep these lines before any File command ;Only for solid compression (by default, solid compression is enabled for BZIP2 and LZMA) ReserveFile "NSIS.InstallOptions.ini" !insertmacro MUI_RESERVEFILE_INSTALLOPTIONS ; for UserInfo::GetName and UserInfo::GetAccountType ReserveFile /plugin 'UserInfo.dll' ;-------------------------------- ; Installation types @CPACK_NSIS_INSTALLATION_TYPES@ ;-------------------------------- ; Component sections @CPACK_NSIS_COMPONENT_SECTIONS@ @CPACK_NSIS_INSTALLER_MUI_COMPONENTS_DESC@ ;-------------------------------- ;Installer Sections Section "-Core installation" ;Use the entire tree produced by the INSTALL target. Keep the ;list of directories here in sync with the RMDir commands below. SetOutPath "$INSTDIR" @CPACK_NSIS_EXTRA_PREINSTALL_COMMANDS@ @CPACK_NSIS_FULL_INSTALL@ ;Store installation folder WriteRegStr SHCTX "Software\@CPACK_PACKAGE_VENDOR@\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" "" $INSTDIR ;Create uninstaller WriteUninstaller "$INSTDIR\@CPACK_NSIS_UNINSTALL_NAME@.exe" Push "DisplayName" Push "@CPACK_NSIS_DISPLAY_NAME@" Call ConditionalAddToRegistry Push "DisplayVersion" Push "@CPACK_PACKAGE_VERSION@" Call ConditionalAddToRegistry Push "Publisher" Push "@CPACK_PACKAGE_VENDOR@" Call ConditionalAddToRegistry Push "UninstallString" Push "$\"$INSTDIR\@CPACK_NSIS_UNINSTALL_NAME@.exe$\"" Call ConditionalAddToRegistry Push "NoRepair" Push "1" Call ConditionalAddToRegistry !ifdef CPACK_NSIS_ADD_REMOVE ;Create add/remove functionality Push "ModifyPath" Push "$INSTDIR\AddRemove.exe" Call ConditionalAddToRegistry !else Push "NoModify" Push "1" Call ConditionalAddToRegistry !endif ; Optional registration Push "DisplayIcon" Push "$INSTDIR\@CPACK_NSIS_INSTALLED_ICON_NAME@" Call ConditionalAddToRegistry Push "HelpLink" Push "@CPACK_NSIS_HELP_LINK@" Call ConditionalAddToRegistry Push "URLInfoAbout" Push "@CPACK_NSIS_URL_INFO_ABOUT@" Call ConditionalAddToRegistry Push "Contact" Push "@CPACK_NSIS_CONTACT@" Call ConditionalAddToRegistry !insertmacro MUI_INSTALLOPTIONS_READ $INSTALL_DESKTOP "NSIS.InstallOptions.ini" "Field 5" "State" !insertmacro MUI_STARTMENU_WRITE_BEGIN Application ;Create shortcuts CreateDirectory "$SMPROGRAMS\$STARTMENU_FOLDER" @CPACK_NSIS_CREATE_ICONS@ @CPACK_NSIS_CREATE_ICONS_EXTRA@ CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Uninstall.lnk" "$INSTDIR\@CPACK_NSIS_UNINSTALL_NAME@.exe" ;Read a value from an InstallOptions INI file !insertmacro MUI_INSTALLOPTIONS_READ $DO_NOT_ADD_TO_PATH "NSIS.InstallOptions.ini" "Field 2" "State" !insertmacro MUI_INSTALLOPTIONS_READ $ADD_TO_PATH_ALL_USERS "NSIS.InstallOptions.ini" "Field 3" "State" !insertmacro MUI_INSTALLOPTIONS_READ $ADD_TO_PATH_CURRENT_USER "NSIS.InstallOptions.ini" "Field 4" "State" ; Write special uninstall registry entries Push "StartMenu" Push "$STARTMENU_FOLDER" Call ConditionalAddToRegistry Push "DoNotAddToPath" Push "$DO_NOT_ADD_TO_PATH" Call ConditionalAddToRegistry Push "AddToPathAllUsers" Push "$ADD_TO_PATH_ALL_USERS" Call ConditionalAddToRegistry Push "AddToPathCurrentUser" Push "$ADD_TO_PATH_CURRENT_USER" Call ConditionalAddToRegistry Push "InstallToDesktop" Push "$INSTALL_DESKTOP" Call ConditionalAddToRegistry !insertmacro MUI_STARTMENU_WRITE_END @CPACK_NSIS_EXTRA_INSTALL_COMMANDS@ SectionEnd Section "-Add to path" Push $INSTDIR StrCmp "@CPACK_NSIS_MODIFY_PATH@" "ON" 0 doNotAddToPath StrCmp $DO_NOT_ADD_TO_PATH "1" doNotAddToPath 0 Call AddToPath doNotAddToPath: SectionEnd ;-------------------------------- ; Create custom pages Function InstallOptionsPage !insertmacro MUI_HEADER_TEXT "Install Options" "Choose options for installing @CPACK_NSIS_PACKAGE_NAME@" !insertmacro MUI_INSTALLOPTIONS_DISPLAY "NSIS.InstallOptions.ini" FunctionEnd ;-------------------------------- ; determine admin versus local install Function un.onInit ClearErrors UserInfo::GetName IfErrors noLM Pop $0 UserInfo::GetAccountType Pop $1 StrCmp $1 "Admin" 0 +3 SetShellVarContext all ;MessageBox MB_OK 'User "$0" is in the Admin group' Goto done StrCmp $1 "Power" 0 +3 SetShellVarContext all ;MessageBox MB_OK 'User "$0" is in the Power Users group' Goto done noLM: ;Get installation folder from registry if available done: FunctionEnd ;--- Add/Remove callback functions: --- !macro SectionList MacroName ;This macro used to perform operation on multiple sections. ;List all of your components in following manner here. @CPACK_NSIS_COMPONENT_SECTION_LIST@ !macroend Section -FinishComponents ;Removes unselected components and writes component status to registry !insertmacro SectionList "FinishSection" !ifdef CPACK_NSIS_ADD_REMOVE ; Get the name of the installer executable System::Call 'kernel32::GetModuleFileNameA(i 0, t .R0, i 1024) i r1' StrCpy $R3 $R0 ; Strip off the last 13 characters, to see if we have AddRemove.exe StrLen $R1 $R0 IntOp $R1 $R0 - 13 StrCpy $R2 $R0 13 $R1 StrCmp $R2 "AddRemove.exe" addremove_installed ; We're not running AddRemove.exe, so install it CopyFiles $R3 $INSTDIR\AddRemove.exe addremove_installed: !endif SectionEnd ;--- End of Add/Remove callback functions --- ;-------------------------------- ; Component dependencies Function .onSelChange !insertmacro SectionList MaybeSelectionChanged FunctionEnd ;-------------------------------- ;Uninstaller Section Section "Uninstall" ReadRegStr $START_MENU SHCTX \ "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" "StartMenu" ;MessageBox MB_OK "Start menu is in: $START_MENU" ReadRegStr $DO_NOT_ADD_TO_PATH SHCTX \ "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" "DoNotAddToPath" ReadRegStr $ADD_TO_PATH_ALL_USERS SHCTX \ "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" "AddToPathAllUsers" ReadRegStr $ADD_TO_PATH_CURRENT_USER SHCTX \ "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" "AddToPathCurrentUser" ;MessageBox MB_OK "Add to path: $DO_NOT_ADD_TO_PATH all users: $ADD_TO_PATH_ALL_USERS" ReadRegStr $INSTALL_DESKTOP SHCTX \ "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" "InstallToDesktop" ;MessageBox MB_OK "Install to desktop: $INSTALL_DESKTOP " @CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS@ ;Remove files we installed. ;Keep the list of directories here in sync with the File commands above. @CPACK_NSIS_DELETE_FILES@ @CPACK_NSIS_DELETE_DIRECTORIES@ !ifdef CPACK_NSIS_ADD_REMOVE ;Remove the add/remove program Delete "$INSTDIR\AddRemove.exe" !endif ;Remove the uninstaller itself. Delete "$INSTDIR\@CPACK_NSIS_UNINSTALL_NAME@.exe" DeleteRegKey SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" ;Remove the installation directory if it is empty. RMDir "$INSTDIR" ; Remove the registry entries. DeleteRegKey SHCTX "Software\@CPACK_PACKAGE_VENDOR@\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" ; Removes all optional components !insertmacro SectionList "RemoveSection_CPack" !insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP Delete "$SMPROGRAMS\$MUI_TEMP\Uninstall.lnk" @CPACK_NSIS_DELETE_ICONS@ @CPACK_NSIS_DELETE_ICONS_EXTRA@ ;Delete empty start menu parent directories StrCpy $MUI_TEMP "$SMPROGRAMS\$MUI_TEMP" startMenuDeleteLoop: ClearErrors RMDir $MUI_TEMP GetFullPathName $MUI_TEMP "$MUI_TEMP\.." IfErrors startMenuDeleteLoopDone StrCmp "$MUI_TEMP" "$SMPROGRAMS" startMenuDeleteLoopDone startMenuDeleteLoop startMenuDeleteLoopDone: ; If the user changed the shortcut, then uninstall may not work. This should ; try to fix it. StrCpy $MUI_TEMP "$START_MENU" Delete "$SMPROGRAMS\$MUI_TEMP\Uninstall.lnk" @CPACK_NSIS_DELETE_ICONS_EXTRA@ ;Delete empty start menu parent directories StrCpy $MUI_TEMP "$SMPROGRAMS\$MUI_TEMP" secondStartMenuDeleteLoop: ClearErrors RMDir $MUI_TEMP GetFullPathName $MUI_TEMP "$MUI_TEMP\.." IfErrors secondStartMenuDeleteLoopDone StrCmp "$MUI_TEMP" "$SMPROGRAMS" secondStartMenuDeleteLoopDone secondStartMenuDeleteLoop secondStartMenuDeleteLoopDone: DeleteRegKey /ifempty SHCTX "Software\@CPACK_PACKAGE_VENDOR@\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" Push $INSTDIR StrCmp $DO_NOT_ADD_TO_PATH_ "1" doNotRemoveFromPath 0 Call un.RemoveFromPath doNotRemoveFromPath: SectionEnd ;-------------------------------- ; determine admin versus local install ; Is install for "AllUsers" or "JustMe"? ; Default to "JustMe" - set to "AllUsers" if admin or on Win9x ; This function is used for the very first "custom page" of the installer. ; This custom page does not show up visibly, but it executes prior to the ; first visible page and sets up $INSTDIR properly... ; Choose different default installation folder based on SV_ALLUSERS... ; "Program Files" for AllUsers, "My Documents" for JustMe... Function .onInit StrCmp "@CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL@" "ON" 0 inst ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" "UninstallString" StrCmp $0 "" inst MessageBox MB_YESNOCANCEL|MB_ICONEXCLAMATION \ "@CPACK_NSIS_PACKAGE_NAME@ is already installed. $\n$\nDo you want to uninstall the old version before installing the new one?" \ /SD IDYES IDYES uninst IDNO inst Abort ;Run the uninstaller uninst: ClearErrors # $0 should _always_ be quoted, however older versions of CMake did not # do this. We'll conditionally remove the begin/end quotes. # Remove first char if quote StrCpy $2 $0 1 0 # copy first char StrCmp $2 "$\"" 0 +2 # if char is quote StrCpy $0 $0 "" 1 # remove first char # Remove last char if quote StrCpy $2 $0 1 -1 # copy last char StrCmp $2 "$\"" 0 +2 # if char is quote StrCpy $0 $0 -1 # remove last char StrLen $2 "\@CPACK_NSIS_UNINSTALL_NAME@.exe" StrCpy $3 $0 -$2 # remove "\@CPACK_NSIS_UNINSTALL_NAME@.exe" from UninstallString to get path ExecWait '"$0" /S _?=$3' ;Do not copy the uninstaller to a temp file IfErrors uninst_failed inst uninst_failed: MessageBox MB_OK|MB_ICONSTOP "Uninstall failed." Abort inst: ; Reads components status for registry !insertmacro SectionList "InitSection" ; check to see if /D has been used to change ; the install directory by comparing it to the ; install directory that is expected to be the ; default StrCpy $IS_DEFAULT_INSTALLDIR 0 StrCmp "$INSTDIR" "@CPACK_NSIS_INSTALL_ROOT@\@CPACK_PACKAGE_INSTALL_DIRECTORY@" 0 +2 StrCpy $IS_DEFAULT_INSTALLDIR 1 StrCpy $SV_ALLUSERS "JustMe" ; if default install dir then change the default ; if it is installed for JustMe StrCmp "$IS_DEFAULT_INSTALLDIR" "1" 0 +2 StrCpy $INSTDIR "$DOCUMENTS\@CPACK_PACKAGE_INSTALL_DIRECTORY@" ClearErrors UserInfo::GetName IfErrors noLM Pop $0 UserInfo::GetAccountType Pop $1 StrCmp $1 "Admin" 0 +4 SetShellVarContext all ;MessageBox MB_OK 'User "$0" is in the Admin group' StrCpy $SV_ALLUSERS "AllUsers" Goto done StrCmp $1 "Power" 0 +3 SetShellVarContext all ;MessageBox MB_OK 'User "$0" is in the Power Users group' StrCpy $SV_ALLUSERS "AllUsers" Goto done noLM: StrCpy $SV_ALLUSERS "AllUsers" ;Get installation folder from registry if available done: StrCmp $SV_ALLUSERS "AllUsers" 0 +3 StrCmp "$IS_DEFAULT_INSTALLDIR" "1" 0 +2 StrCpy $INSTDIR "@CPACK_NSIS_INSTALL_ROOT@\@CPACK_PACKAGE_INSTALL_DIRECTORY@" StrCmp "@CPACK_NSIS_MODIFY_PATH@" "ON" 0 noOptionsPage !insertmacro MUI_INSTALLOPTIONS_EXTRACT "NSIS.InstallOptions.ini" noOptionsPage: FunctionEnd ================================================ FILE: extra/resources/b64.lua ================================================ function b64(name) local i = io.popen("base64 " .. name) local encoded = i:read("*a") i:close() local output = ("local %s =\n%q"):format(name:gsub("%.", "_"), encoded) return output end for i, v in ipairs(arg) do print(b64(v)) end ================================================ FILE: license.txt ================================================ Licensing information ===================== This distribution contains code from the following projects (full license text below): - LOVE Website: https://love2d.org/ License: zlib Copyright (c) 2006-2026 LOVE Development Team - ENet Website: http://enet.bespin.org/index.html License: MIT/Expat Copyright (c) 2002-2016 Lee Salzman - FreeType Website: https://freetype.org/ License: FreeType License Copyright (c) 2006-2017 David Turner, Robert Wilhelm, and Werner Lemberg. - GLAD Website: http://glad.dav1d.de/ License: MIT/Expat Copyright (c) 2013 David Herberth, modified by Sasha Szpakowski - glslang Website: https://github.com/KhronosGroup/glslang License: 3-Clause BSD Copyright (C) 2002-2005 3Dlabs Inc. Ltd. Copyright (C) 2013-2016 LunarG, Inc. - SPIRV-Cross Website: https://github.com/KhronosGroup/SPIRV-Cross License: Apache 2.0 or MIT/Expat Copyright 2015-2021 Arm Limited Copyright 2016-2021 The Brenwill Workshop Ltd. - Kepler Project's lua-compat-5.3 Website: https://github.com/keplerproject/lua-compat-5.3 License: MIT/Expat Copyright (c) 2015 Kepler Project. - lua-enet Website: http://leafo.net/lua-enet/ License: MIT/Expat Copyright (C) 2011 by Leaf Corcoran - LuaJIT Website: http://luajit.org/ License: MIT/Expat LuaJIT is Copyright (c) 2005-2016 Mike Pall - Lua's UTF-8 module Website: https://www.lua.org/ License: MIT/Expat Copyright (C) 1994-2015 Lua.org, PUC-Rio, 2015 LOVE Development Team. - LuaSocket Website: http://w3.impa.br/~diego/software/luasocket/home.html License: MIT/Expat Copyright (C) 2004-2013 Diego Nehab - LZ4 Website: https://lz4.github.io/lz4/ License: 2-Clause BSD Copyright (C) 2011-2015, Yann Collet. You can contact the author at : - LZ4 source repository : https://github.com/Cyan4973/lz4 - LZ4 public forum : https://groups.google.com/forum/#!forum/lz4c - LodePNG Website: https://lodev.org/lodepng/ Source download: https://github.com/lvandeve/lodepng License: zlib Copyright (c) 2005-2020 Lode Vandevenne - TinyEXR Website: https://github.com/syoyo/tinyexr License: 3-Clause BSD Copyright (c) 2014 - 2016, Syoyo Fujita - UTF8-CPP Website: https://github.com/nemtrif/utfcpp License: Unknown, MIT/Expat-like (listed as UTF8-CPP) Copyright 2006 Nemanja Trifunovic - xxHash Website: https://cyan4973.github.io/xxHash/ License: 2-Clause BSD Copyright (C) 2012-2016, Yann Collet. You can contact the author at : - xxHash source repository : https://github.com/Cyan4973/xxHash - dr_flac Website: https://github.com/mackron/dr_libs Source download: https://github.com/mackron/dr_libs/blob/15f37e3/dr_flac.h License: MIT/Expat Copyright 2018 David Reid - dr_mp3 Website: https://mackron.github.io/dr_libs/ Source download: https://github.com/mackron/dr_libs/blob/dd762b8/dr_mp3.h License: MIT/Expat Copyright 2018 David Reid - stb_image Website: https://github.com/nothings/stb Source download: https://github.com/nothings/stb/blob/e140649ccf40818781b7e408f6228a486f6d254b/stb_image.h License: MIT/Expat Copyright (c) 2017 Sean Barrett - OpenAL Soft Website: https://openal-soft.org/ Source download: https://openal-soft.org/#download License: Mixed, licensing information obtained from the debian project - Alc/backends/opensl.c License: Apache 2.0 Copyright 2011 The Android Open Source Project - examples/alhrtf.c examples/allatency.c examples/alloopback.c examples/alreverb.c examples/alstream.c examples/altonegen.c examples/common/alhelpers.c examples/common/sdl_sound.c utils/openal-info.c License: MIT/Expat Copyright © 2010, 2015 Chris Robinson - examples/alffplay.c License: unclear, presumed LGPL 2.1 or higher Copyright © 2003 Fabrice Bellard Copyright © Martin Bohme - Alc/bs2b.c OpenAL32/Include/bs2b.h License: MIT/Expat Copyright 2005 by Boris Mikhaylov - cmake/FindALSA.cmake cmake/FindFFmpeg.cmake cmake/FindJACK.cmake cmake/FindSDL2.cmake License: 3-Clause BSD Copyright © 2006 Matthias Kretz Copyright © 2008 Alexander Neundorf Copyright © 2003-2011 Kitware, Inc. Copyright © 2009-2011 Philip Lowman Copyright © 2011 Michael Jansen Copyright © 2012 Benjamin Eikel - utils/makehrtf.c (not included in distribution) License: GPL 2 or higher (2 listed below) Copyright 2011-2014 Christopher Fitzgerald - Everything else: License: LGPL 2.0 or higher (2.1 listed below) Copyright © 1999-2014 the OpenAL team Copyright © 2008-2015 Christopher Fitzgerald Copyright © 2009-2015 Chris Robinson Copyright © 2013 Anis A. Hireche Copyright © 2013 Nasca Octavian Paul Copyright © 2013 Mike Gorchak Copyright © 2014 Timothy Arceri - Vulkan Memory Allocator Website: https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator License: MIT/Expat Copyright (c) 2017-2022 Advanced Micro Devices, Inc. - volk Website: https://github.com/zeux/volk License: MIT/Expat Copyright (c) 2018-2022 Arseny Kapoulkine - Vulkan-Headers Website: https://github.com/KhronosGroup/Vulkan-Headers License: Apache 2.0 Copyright (c) 2022 Khronos Group License text ============ zlib license This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. MIT/Expat Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. FreeType License The FreeType Project LICENSE ---------------------------- 2006-Jan-27 Copyright 1996-2002, 2006 by David Turner, Robert Wilhelm, and Werner Lemberg Introduction ============ The FreeType Project is distributed in several archive packages; some of them may contain, in addition to the FreeType font engine, various tools and contributions which rely on, or relate to, the FreeType Project. This license applies to all files found in such packages, and which do not fall under their own explicit license. The license affects thus the FreeType font engine, the test programs, documentation and makefiles, at the very least. This license was inspired by the BSD, Artistic, and IJG (Independent JPEG Group) licenses, which all encourage inclusion and use of free software in commercial and freeware products alike. As a consequence, its main points are that: o We don't promise that this software works. However, we will be interested in any kind of bug reports. (`as is' distribution) o You can use this software for whatever you want, in parts or full form, without having to pay us. (`royalty-free' usage) o You may not pretend that you wrote this software. If you use it, or only parts of it, in a program, you must acknowledge somewhere in your documentation that you have used the FreeType code. (`credits') We specifically permit and encourage the inclusion of this software, with or without modifications, in commercial products. We disclaim all warranties covering The FreeType Project and assume no liability related to The FreeType Project. Finally, many people asked us for a preferred form for a credit/disclaimer to use in compliance with this license. We thus encourage you to use the following text: """ Portions of this software are copyright © The FreeType Project (www.freetype.org). All rights reserved. """ Please replace with the value from the FreeType version you actually use. Legal Terms =========== 0. Definitions -------------- Throughout this license, the terms `package', `FreeType Project', and `FreeType archive' refer to the set of files originally distributed by the authors (David Turner, Robert Wilhelm, and Werner Lemberg) as the `FreeType Project', be they named as alpha, beta or final release. `You' refers to the licensee, or person using the project, where `using' is a generic term including compiling the project's source code as well as linking it to form a `program' or `executable'. This program is referred to as `a program using the FreeType engine'. This license applies to all files distributed in the original FreeType Project, including all source code, binaries and documentation, unless otherwise stated in the file in its original, unmodified form as distributed in the original archive. If you are unsure whether or not a particular file is covered by this license, you must contact us to verify this. The FreeType Project is copyright (C) 1996-2000 by David Turner, Robert Wilhelm, and Werner Lemberg. All rights reserved except as specified below. 1. No Warranty -------------- THE FREETYPE PROJECT IS PROVIDED `AS IS' WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL ANY OF THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES CAUSED BY THE USE OR THE INABILITY TO USE, OF THE FREETYPE PROJECT. 2. Redistribution ----------------- This license grants a worldwide, royalty-free, perpetual and irrevocable right and license to use, execute, perform, compile, display, copy, create derivative works of, distribute and sublicense the FreeType Project (in both source and object code forms) and derivative works thereof for any purpose; and to authorize others to exercise some or all of the rights granted herein, subject to the following conditions: o Redistribution of source code must retain this license file (`FTL.TXT') unaltered; any additions, deletions or changes to the original files must be clearly indicated in accompanying documentation. The copyright notices of the unaltered, original files must be preserved in all copies of source files. o Redistribution in binary form must provide a disclaimer that states that the software is based in part of the work of the FreeType Team, in the distribution documentation. We also encourage you to put an URL to the FreeType web page in your documentation, though this isn't mandatory. These conditions apply to any software derived from or based on the FreeType Project, not just the unmodified files. If you use our work, you must acknowledge us. However, no fee need be paid to us. 3. Advertising -------------- Neither the FreeType authors and contributors nor you shall use the name of the other for commercial, advertising, or promotional purposes without specific prior written permission. We suggest, but do not require, that you use one or more of the following phrases to refer to this software in your documentation or advertising materials: `FreeType Project', `FreeType Engine', `FreeType library', or `FreeType Distribution'. As you have not signed this license, you are not required to accept it. However, as the FreeType Project is copyrighted material, only this license, or another one contracted with the authors, grants you the right to use, distribute, and modify it. Therefore, by using, distributing, or modifying the FreeType Project, you indicate that you understand and accept all the terms of this license. 4. Contacts ----------- There are two mailing lists related to FreeType: o freetype@nongnu.org Discusses general use and applications of FreeType, as well as future and wanted additions to the library and distribution. If you are looking for support, start in this list if you haven't found anything to help you in the documentation. o freetype-devel@nongnu.org Discusses bugs, as well as engine internals, design issues, specific licenses, porting, etc. Our home page can be found at http://www.freetype.org 3-Clause BSD All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of 3Dlabs Inc. Ltd. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 2-Clause BSD Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. UTF8-CPP Permission is hereby granted, free of charge, to any person or organization obtaining a copy of the software and accompanying documentation covered by this license (the "Software") to use, reproduce, display, distribute, execute, and transmit the Software, and to prepare derivative works of the Software, and to permit third-parties to whom the Software is furnished to do so, all subject to the following: The copyright notices in the Software and this entire statement, including the above license grant, this restriction and the following disclaimer, must be included in all copies of the Software, in whole or in part, and all derivative works of the Software, unless such copies or derivative works are solely in the form of machine-executable object code generated by a source language processor. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. LGPL 2.1 GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. GNU LESSER GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. , 1 April 1990 Ty Coon, President of Vice That's all there is to it! GPL 2 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. Apache 2.0 Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: You must give any other recipients of the Work or Derivative Works a copy of this License; and You must cause any modified files to carry prominent notices stating that You changed the files; and You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ================================================ FILE: platform/unix/debian/changelog.in ================================================ @LOVE_EXE_NAME@ (@LOVE_VERSION_STR@ppa1) focal; urgency=medium * Upstream testing release -- Bart van Strien @LOVE_CONFIGURE_TIMESTAMP@ ================================================ FILE: platform/unix/debian/compat ================================================ 9 ================================================ FILE: platform/unix/debian/control.in ================================================ Source: @LOVE_EXE_NAME@ Section: games Priority: extra Maintainer: Bart van Strien Build-Depends: debhelper (>= 9), cmake, g++ (>= 4.7.0), libfreetype6-dev, libharfbuzz-dev, luajit, libluajit-5.1-dev, libmodplug-dev, libopenal-dev, libphysfs-dev, libsdl2-dev (>= 2.0.9), libogg-dev, libvorbis-dev, libtheora-dev, zlib1g-dev Standards-Version: 3.9.5 Homepage: http://love2d.org Package: @LOVE_LIB_NAME@0 Section: libs Architecture: any Multi-Arch: same Pre-Depends: ${misc:Pre-Depends} Depends: ${misc:Depends}, ${shlibs:Depends} Description: 2D game engine - runtime LOVE is a free 2D game engine which enables easy game creation in Lua. Package: @LOVE_EXE_NAME@ Architecture: any Depends: ${misc:Depends}, ${shlibs:Depends}, @LOVE_LIB_NAME@0 (= ${binary:Version}) Description: 2D game engine LOVE is a free 2D game engine which enables easy game creation in Lua. Package: @LOVE_LIB_NAME@-dbg Priority: extra Section: debug Architecture: any Multi-Arch: same Depends: ${misc:Depends}, @LOVE_LIB_NAME@0 (= ${binary:Version}) Description: 2D game engine - debug symbols LOVE is a free 2D game engine which enables easy game creation in Lua. ================================================ FILE: platform/unix/debian/copyright ================================================ Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: LÖVE Upstream-Contact: Bart van Strien Source: http://www.love2d.org/ Files: * Copyright: 2006-2026 LOVE Development Team License: zlib This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. . Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: . 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. . 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. . 3. This notice may not be removed or altered from any source distribution. ================================================ FILE: platform/unix/debian/docs ================================================ changes.txt license.txt ================================================ FILE: platform/unix/debian/liblove-unstable0.docs ================================================ readme.md ================================================ FILE: platform/unix/debian/liblove-unstable0.install ================================================ usr/lib/*/liblove-unstable-*.so ================================================ FILE: platform/unix/debian/liblove0.docs ================================================ readme.md ================================================ FILE: platform/unix/debian/liblove0.install ================================================ usr/lib/*/liblove-*.so ================================================ FILE: platform/unix/debian/love-unstable.install ================================================ usr/bin/love-unstable ================================================ FILE: platform/unix/debian/love-unstable.manpages ================================================ platform/unix/love-unstable.6 ================================================ FILE: platform/unix/debian/love.install ================================================ usr/bin usr/share/applications usr/share/mime usr/share/pixmaps usr/share/icons ================================================ FILE: platform/unix/debian/love.manpages ================================================ platform/unix/love.6 ================================================ FILE: platform/unix/debian/rules.in ================================================ #!/usr/bin/make -f %: dh $@ --parallel override_dh_auto_clean: dh_auto_clean rm -f platform/unix/love-unstable.6 override_dh_installdocs: dh_installdocs --link-doc=@LOVE_LIB_NAME@0 override_dh_installchangelogs: dh_installchangelogs changes.txt override_dh_installman: cp -f platform/unix/love.6 platform/unix/love-unstable.6 dh_installman override_dh_strip: dh_strip -p@LOVE_LIB_NAME@0 --dbg-package=@LOVE_LIB_NAME@-dbg dh_strip --remaining-packages ================================================ FILE: platform/unix/debian/source/format ================================================ 3.0 (native) ================================================ FILE: platform/unix/love.6 ================================================ .\" (c) 2008-2011 Miriam Ruiz .\" (c) 2013-2018 Bart van Strien .\" .\" This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damagesarising from the use of this software. .\" .\" Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: .\" .\" 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. .\" .\" 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. .\" .\" 3. This notice may not be removed or altered from any source distribution. .Dd March 31, 2018 .Dt LOVE 6 .Os LÖVE 12.0 .Sh NAME .Nm love .Nd 2D game development framework .Sh SYNOPSIS .Nm love .Op Fl Fl fused .Ar game Ns .love .Pp .Nm love .Fl Fl version .Sh DESCRIPTION LÖVE was created to be a user-friendly engine in which simple (or complicated) games could be made without having extensive knowledge of system or graphics functions and without having to dedicate time towards developing the same engine features time and time again. .Pp Developed with cross-platform implementation in mind, it utilizes the latest open source libraries to deliver a similar game experience, independent of operating system. By relying on the Lua scripting language for game-specific programming, it allows even the novice game creator to quickly and efficiently develop an idea into a fully working game. .Sh SEE ALSO You can find more information at .Lk http://love2d.org/ ================================================ FILE: platform/unix/love.desktop.in ================================================ [Desktop Entry] Name=LÖVE Comment=The unquestionably awesome 2D game engine MimeType=application/x-love-game; Exec=@CMAKE_INSTALL_FULL_BINDIR@/love %f Type=Application Categories=Development;Game; Terminal=false Icon=love NoDisplay=true ================================================ FILE: platform/unix/love.xml ================================================ LÖVE game ================================================ FILE: platform/xcode/Images.xcassets/Contents.json ================================================ { "info" : { "version" : 1, "author" : "xcode" } } ================================================ FILE: platform/xcode/Images.xcassets/OS X AppIcon.appiconset/Contents.json ================================================ { "images" : [ { "size" : "16x16", "idiom" : "mac", "filename" : "16.png", "scale" : "1x" }, { "size" : "16x16", "idiom" : "mac", "filename" : "32.png", "scale" : "2x" }, { "size" : "32x32", "idiom" : "mac", "filename" : "32.png", "scale" : "1x" }, { "size" : "32x32", "idiom" : "mac", "filename" : "64.png", "scale" : "2x" }, { "size" : "128x128", "idiom" : "mac", "filename" : "128.png", "scale" : "1x" }, { "size" : "128x128", "idiom" : "mac", "filename" : "256.png", "scale" : "2x" }, { "size" : "256x256", "idiom" : "mac", "filename" : "256.png", "scale" : "1x" }, { "size" : "256x256", "idiom" : "mac", "filename" : "512.png", "scale" : "2x" }, { "size" : "512x512", "idiom" : "mac", "filename" : "512.png", "scale" : "1x" }, { "size" : "512x512", "idiom" : "mac", "filename" : "1024.png", "scale" : "2x" } ], "info" : { "version" : 1, "author" : "xcode" } } ================================================ FILE: platform/xcode/Images.xcassets/iOS AppIcon.appiconset/Contents.json ================================================ { "images" : [ { "idiom" : "iphone", "size" : "20x20", "scale" : "2x" }, { "idiom" : "iphone", "size" : "20x20", "scale" : "3x" }, { "size" : "29x29", "idiom" : "iphone", "filename" : "icon-29pt@2x.png", "scale" : "2x" }, { "size" : "29x29", "idiom" : "iphone", "filename" : "icon-29pt@3x.png", "scale" : "3x" }, { "size" : "40x40", "idiom" : "iphone", "filename" : "icon-40pt@2x.png", "scale" : "2x" }, { "size" : "40x40", "idiom" : "iphone", "filename" : "icon-40pt@3x.png", "scale" : "3x" }, { "size" : "60x60", "idiom" : "iphone", "filename" : "icon-60pt@2x.png", "scale" : "2x" }, { "size" : "60x60", "idiom" : "iphone", "filename" : "icon-60pt@3x.png", "scale" : "3x" }, { "idiom" : "ipad", "size" : "20x20", "scale" : "1x" }, { "idiom" : "ipad", "size" : "20x20", "scale" : "2x" }, { "size" : "29x29", "idiom" : "ipad", "filename" : "icon-29pt@1x.png", "scale" : "1x" }, { "size" : "29x29", "idiom" : "ipad", "filename" : "icon-29pt@2x.png", "scale" : "2x" }, { "size" : "40x40", "idiom" : "ipad", "filename" : "icon-40pt@1x.png", "scale" : "1x" }, { "size" : "40x40", "idiom" : "ipad", "filename" : "icon-40pt@2x.png", "scale" : "2x" }, { "size" : "76x76", "idiom" : "ipad", "filename" : "icon-76pt@1x.png", "scale" : "1x" }, { "size" : "76x76", "idiom" : "ipad", "filename" : "icon-76pt@2x.png", "scale" : "2x" }, { "size" : "83.5x83.5", "idiom" : "ipad", "filename" : "icon-83.5pt@2x.png", "scale" : "2x" }, { "size" : "1024x1024", "idiom" : "ios-marketing", "filename" : "icon-1024pt@1x.png", "scale" : "1x" } ], "info" : { "version" : 1, "author" : "xcode" } } ================================================ FILE: platform/xcode/ios/Launch Screen.xib ================================================ ================================================ FILE: platform/xcode/ios/love-ios.plist ================================================ CFBundleDevelopmentRegion en CFBundleDisplayName ${PRODUCT_NAME} CFBundleDocumentTypes CFBundleTypeIconFiles LoveDocument.icns CFBundleTypeName LÖVE Project CFBundleTypeRole Viewer LSHandlerRank Owner LSItemContentTypes org.love2d.love-game CFBundleExecutable ${EXECUTABLE_NAME} CFBundleIdentifier $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName ${PRODUCT_NAME} CFBundlePackageType APPL CFBundleShortVersionString $(MARKETING_VERSION) CFBundleSignature ???? CFBundleVersion 1.0 LSRequiresIPhoneOS LSSupportsOpeningDocumentsInPlace UIFileSharingEnabled UILaunchStoryboardName Launch Screen UIRequiredDeviceCapabilities opengles-2 UIStatusBarStyle UIStatusBarStyleLightContent UISupportedInterfaceOrientations UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UISupportedInterfaceOrientations~ipad UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UTExportedTypeDeclarations UTTypeConformsTo com.pkware.zip-archive UTTypeDescription LÖVE Project UTTypeIdentifier org.love2d.love-game UTTypeSize320IconFile LoveDocument UTTypeSize64IconFile LoveDocument UTTypeTagSpecification com.apple.ostype LOVE public.filename-extension love public.mime-type application/x-love-game ================================================ FILE: platform/xcode/liblove.xcodeproj/project.pbxproj ================================================ // !$*UTF8*$! { archiveVersion = 1; classes = { }; objectVersion = 52; objects = { /* Begin PBXBuildFile section */ 217DFBD91D9F6D490055D849 /* auxiliar.c in Sources */ = {isa = PBXBuildFile; fileRef = 217DFB9D1D9F6D490055D849 /* auxiliar.c */; }; 217DFBDA1D9F6D490055D849 /* auxiliar.h in Headers */ = {isa = PBXBuildFile; fileRef = 217DFB9E1D9F6D490055D849 /* auxiliar.h */; }; 217DFBDB1D9F6D490055D849 /* buffer.c in Sources */ = {isa = PBXBuildFile; fileRef = 217DFB9F1D9F6D490055D849 /* buffer.c */; }; 217DFBDC1D9F6D490055D849 /* buffer.h in Headers */ = {isa = PBXBuildFile; fileRef = 217DFBA01D9F6D490055D849 /* buffer.h */; }; 217DFBDD1D9F6D490055D849 /* compat.c in Sources */ = {isa = PBXBuildFile; fileRef = 217DFBA11D9F6D490055D849 /* compat.c */; }; 217DFBDE1D9F6D490055D849 /* compat.h in Headers */ = {isa = PBXBuildFile; fileRef = 217DFBA21D9F6D490055D849 /* compat.h */; }; 217DFBDF1D9F6D490055D849 /* except.c in Sources */ = {isa = PBXBuildFile; fileRef = 217DFBA31D9F6D490055D849 /* except.c */; }; 217DFBE01D9F6D490055D849 /* except.h in Headers */ = {isa = PBXBuildFile; fileRef = 217DFBA41D9F6D490055D849 /* except.h */; }; 217DFBE21D9F6D490055D849 /* ftp.lua.h in Headers */ = {isa = PBXBuildFile; fileRef = 217DFBA61D9F6D490055D849 /* ftp.lua.h */; }; 217DFBE41D9F6D490055D849 /* headers.lua.h in Headers */ = {isa = PBXBuildFile; fileRef = 217DFBA81D9F6D490055D849 /* headers.lua.h */; }; 217DFBE61D9F6D490055D849 /* http.lua.h in Headers */ = {isa = PBXBuildFile; fileRef = 217DFBAA1D9F6D490055D849 /* http.lua.h */; }; 217DFBE71D9F6D490055D849 /* inet.c in Sources */ = {isa = PBXBuildFile; fileRef = 217DFBAB1D9F6D490055D849 /* inet.c */; }; 217DFBE81D9F6D490055D849 /* inet.h in Headers */ = {isa = PBXBuildFile; fileRef = 217DFBAC1D9F6D490055D849 /* inet.h */; }; 217DFBE91D9F6D490055D849 /* io.c in Sources */ = {isa = PBXBuildFile; fileRef = 217DFBAD1D9F6D490055D849 /* io.c */; }; 217DFBEA1D9F6D490055D849 /* io.h in Headers */ = {isa = PBXBuildFile; fileRef = 217DFBAE1D9F6D490055D849 /* io.h */; }; 217DFBEC1D9F6D490055D849 /* ltn12.lua.h in Headers */ = {isa = PBXBuildFile; fileRef = 217DFBB01D9F6D490055D849 /* ltn12.lua.h */; }; 217DFBED1D9F6D490055D849 /* luasocket.c in Sources */ = {isa = PBXBuildFile; fileRef = 217DFBB11D9F6D490055D849 /* luasocket.c */; }; 217DFBEE1D9F6D490055D849 /* luasocket.h in Headers */ = {isa = PBXBuildFile; fileRef = 217DFBB21D9F6D490055D849 /* luasocket.h */; }; 217DFBF11D9F6D490055D849 /* mbox.lua.h in Headers */ = {isa = PBXBuildFile; fileRef = 217DFBB51D9F6D490055D849 /* mbox.lua.h */; }; 217DFBF21D9F6D490055D849 /* mime.c in Sources */ = {isa = PBXBuildFile; fileRef = 217DFBB61D9F6D490055D849 /* mime.c */; }; 217DFBF31D9F6D490055D849 /* mime.h in Headers */ = {isa = PBXBuildFile; fileRef = 217DFBB71D9F6D490055D849 /* mime.h */; }; 217DFBF51D9F6D490055D849 /* mime.lua.h in Headers */ = {isa = PBXBuildFile; fileRef = 217DFBB91D9F6D490055D849 /* mime.lua.h */; }; 217DFBF61D9F6D490055D849 /* options.c in Sources */ = {isa = PBXBuildFile; fileRef = 217DFBBA1D9F6D490055D849 /* options.c */; }; 217DFBF71D9F6D490055D849 /* options.h in Headers */ = {isa = PBXBuildFile; fileRef = 217DFBBB1D9F6D490055D849 /* options.h */; }; 217DFBF81D9F6D490055D849 /* pierror.h in Headers */ = {isa = PBXBuildFile; fileRef = 217DFBBC1D9F6D490055D849 /* pierror.h */; }; 217DFBF91D9F6D490055D849 /* select.c in Sources */ = {isa = PBXBuildFile; fileRef = 217DFBBD1D9F6D490055D849 /* select.c */; }; 217DFBFA1D9F6D490055D849 /* select.h in Headers */ = {isa = PBXBuildFile; fileRef = 217DFBBE1D9F6D490055D849 /* select.h */; }; 217DFBFB1D9F6D490055D849 /* serial.c in Sources */ = {isa = PBXBuildFile; fileRef = 217DFBBF1D9F6D490055D849 /* serial.c */; }; 217DFBFD1D9F6D490055D849 /* smtp.lua.h in Headers */ = {isa = PBXBuildFile; fileRef = 217DFBC11D9F6D490055D849 /* smtp.lua.h */; }; 217DFBFE1D9F6D490055D849 /* socket.h in Headers */ = {isa = PBXBuildFile; fileRef = 217DFBC21D9F6D490055D849 /* socket.h */; }; 217DFC001D9F6D490055D849 /* socket.lua.h in Headers */ = {isa = PBXBuildFile; fileRef = 217DFBC41D9F6D490055D849 /* socket.lua.h */; }; 217DFC011D9F6D490055D849 /* tcp.c in Sources */ = {isa = PBXBuildFile; fileRef = 217DFBC51D9F6D490055D849 /* tcp.c */; }; 217DFC021D9F6D490055D849 /* tcp.h in Headers */ = {isa = PBXBuildFile; fileRef = 217DFBC61D9F6D490055D849 /* tcp.h */; }; 217DFC031D9F6D490055D849 /* timeout.c in Sources */ = {isa = PBXBuildFile; fileRef = 217DFBC71D9F6D490055D849 /* timeout.c */; }; 217DFC041D9F6D490055D849 /* timeout.h in Headers */ = {isa = PBXBuildFile; fileRef = 217DFBC81D9F6D490055D849 /* timeout.h */; }; 217DFC061D9F6D490055D849 /* tp.lua.h in Headers */ = {isa = PBXBuildFile; fileRef = 217DFBCA1D9F6D490055D849 /* tp.lua.h */; }; 217DFC071D9F6D490055D849 /* udp.c in Sources */ = {isa = PBXBuildFile; fileRef = 217DFBCB1D9F6D490055D849 /* udp.c */; }; 217DFC081D9F6D490055D849 /* udp.h in Headers */ = {isa = PBXBuildFile; fileRef = 217DFBCC1D9F6D490055D849 /* udp.h */; }; 217DFC091D9F6D490055D849 /* unix.c in Sources */ = {isa = PBXBuildFile; fileRef = 217DFBCD1D9F6D490055D849 /* unix.c */; }; 217DFC0A1D9F6D490055D849 /* unix.h in Headers */ = {isa = PBXBuildFile; fileRef = 217DFBCE1D9F6D490055D849 /* unix.h */; }; 217DFC101D9F6D490055D849 /* url.lua.h in Headers */ = {isa = PBXBuildFile; fileRef = 217DFBD41D9F6D490055D849 /* url.lua.h */; }; 217DFC111D9F6D490055D849 /* usocket.c in Sources */ = {isa = PBXBuildFile; fileRef = 217DFBD51D9F6D490055D849 /* usocket.c */; }; 217DFC121D9F6D490055D849 /* usocket.h in Headers */ = {isa = PBXBuildFile; fileRef = 217DFBD61D9F6D490055D849 /* usocket.h */; }; D91C76122DE3D088001FC408 /* spvUtil.h in Headers */ = {isa = PBXBuildFile; fileRef = D91C76112DE3D088001FC408 /* spvUtil.h */; }; D91C76132DE3D088001FC408 /* spirv.hpp11 in Resources */ = {isa = PBXBuildFile; fileRef = D91C76102DE3D088001FC408 /* spirv.hpp11 */; }; D91C76152DE3D0A2001FC408 /* visibility.h in Headers */ = {isa = PBXBuildFile; fileRef = D91C76142DE3D0A2001FC408 /* visibility.h */; }; D923E7D3296B85B9002FF1B3 /* harfbuzz.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = D923E7D2296B85B9002FF1B3 /* harfbuzz.xcframework */; }; D93660F82D1C727C00C0EC4B /* Touch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D93660F72D1C727C00C0EC4B /* Touch.cpp */; }; D93660F92D1C727C00C0EC4B /* Touch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D93660F72D1C727C00C0EC4B /* Touch.cpp */; }; D943E58E2A24D56000D80361 /* PhysfsIo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D943E58C2A24D56000D80361 /* PhysfsIo.cpp */; }; D943E58F2A24D56000D80361 /* PhysfsIo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D943E58C2A24D56000D80361 /* PhysfsIo.cpp */; }; D943E5902A24D56000D80361 /* PhysfsIo.h in Headers */ = {isa = PBXBuildFile; fileRef = D943E58D2A24D56000D80361 /* PhysfsIo.h */; }; D9596F612CBAC93800BE58C1 /* SDL3.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = D9596F602CBAC93800BE58C1 /* SDL3.xcframework */; }; D9596F622CBAC93800BE58C1 /* SDL3.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = D9596F602CBAC93800BE58C1 /* SDL3.xcframework */; }; D9DAB9222961F0EE00C64820 /* HarfbuzzShaper.h in Headers */ = {isa = PBXBuildFile; fileRef = D9DAB9202961F0EE00C64820 /* HarfbuzzShaper.h */; }; D9DAB9232961F0EE00C64820 /* HarfbuzzShaper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D9DAB9212961F0EE00C64820 /* HarfbuzzShaper.cpp */; }; D9DAB9242961F0EE00C64820 /* HarfbuzzShaper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D9DAB9212961F0EE00C64820 /* HarfbuzzShaper.cpp */; }; D9DAB9292961F10000C64820 /* GenericShaper.h in Headers */ = {isa = PBXBuildFile; fileRef = D9DAB9252961F0FF00C64820 /* GenericShaper.h */; }; D9DAB92A2961F10000C64820 /* GenericShaper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D9DAB9262961F0FF00C64820 /* GenericShaper.cpp */; }; D9DAB92B2961F10000C64820 /* GenericShaper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D9DAB9262961F0FF00C64820 /* GenericShaper.cpp */; }; D9DAB92C2961F10000C64820 /* TextShaper.h in Headers */ = {isa = PBXBuildFile; fileRef = D9DAB9272961F0FF00C64820 /* TextShaper.h */; }; D9DAB92D2961F10000C64820 /* TextShaper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D9DAB9282961F10000C64820 /* TextShaper.cpp */; }; D9DAB92E2961F10000C64820 /* TextShaper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D9DAB9282961F10000C64820 /* TextShaper.cpp */; }; D9DAB9322963CD7500C64820 /* harfbuzz.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D9DAB9312963CD7500C64820 /* harfbuzz.framework */; }; D9DB6E272B4B40660037A1F6 /* ResourceLimits.h in Headers */ = {isa = PBXBuildFile; fileRef = D9DB6E252B4B40660037A1F6 /* ResourceLimits.h */; }; D9DB6E292B4B40970037A1F6 /* span.h in Headers */ = {isa = PBXBuildFile; fileRef = D9DB6E282B4B40970037A1F6 /* span.h */; }; D9DB6E362B4B41100037A1F6 /* ResourceLimits.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D9DB6E332B4B41100037A1F6 /* ResourceLimits.cpp */; }; D9DB6E372B4B41100037A1F6 /* ResourceLimits.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D9DB6E332B4B41100037A1F6 /* ResourceLimits.cpp */; }; D9DB6E3E2B4B41580037A1F6 /* NonSemanticDebugPrintf.h in Headers */ = {isa = PBXBuildFile; fileRef = D9DB6E382B4B41570037A1F6 /* NonSemanticDebugPrintf.h */; }; D9DB6E3F2B4B41580037A1F6 /* NonSemanticShaderDebugInfo100.h in Headers */ = {isa = PBXBuildFile; fileRef = D9DB6E392B4B41570037A1F6 /* NonSemanticShaderDebugInfo100.h */; }; D9DB6E402B4B41580037A1F6 /* GLSL.ext.ARM.h in Headers */ = {isa = PBXBuildFile; fileRef = D9DB6E3A2B4B41570037A1F6 /* GLSL.ext.ARM.h */; }; D9DB6E412B4B41580037A1F6 /* GLSL.ext.QCOM.h in Headers */ = {isa = PBXBuildFile; fileRef = D9DB6E3B2B4B41580037A1F6 /* GLSL.ext.QCOM.h */; }; D9DB6E452B4B80E80037A1F6 /* build_info.h in Headers */ = {isa = PBXBuildFile; fileRef = D9DB6E442B4B80E80037A1F6 /* build_info.h */; }; D9F0C2CC2C68091200BB2D25 /* LibraryLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = D9F0C2CB2C68091200BB2D25 /* LibraryLoader.h */; }; D9F0C2D42C680A5500BB2D25 /* CurlClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D9F0C2CD2C680A5500BB2D25 /* CurlClient.cpp */; }; D9F0C2D52C680A5500BB2D25 /* CurlClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D9F0C2CD2C680A5500BB2D25 /* CurlClient.cpp */; }; D9F0C2D62C680A5500BB2D25 /* CurlClient.h in Headers */ = {isa = PBXBuildFile; fileRef = D9F0C2CE2C680A5500BB2D25 /* CurlClient.h */; }; D9F0C2D72C680A5500BB2D25 /* LinktimeLibraryLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D9F0C2CF2C680A5500BB2D25 /* LinktimeLibraryLoader.cpp */; }; D9F0C2D82C680A5500BB2D25 /* LinktimeLibraryLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D9F0C2CF2C680A5500BB2D25 /* LinktimeLibraryLoader.cpp */; }; D9F0C2D92C680A5500BB2D25 /* OpenSSLConnection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D9F0C2D02C680A5500BB2D25 /* OpenSSLConnection.cpp */; }; D9F0C2DA2C680A5500BB2D25 /* OpenSSLConnection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D9F0C2D02C680A5500BB2D25 /* OpenSSLConnection.cpp */; }; D9F0C2DB2C680A5500BB2D25 /* OpenSSLConnection.h in Headers */ = {isa = PBXBuildFile; fileRef = D9F0C2D12C680A5500BB2D25 /* OpenSSLConnection.h */; }; D9F0C2DC2C680A5500BB2D25 /* UnixLibraryLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D9F0C2D22C680A5500BB2D25 /* UnixLibraryLoader.cpp */; }; D9F0C2DD2C680A5500BB2D25 /* UnixLibraryLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D9F0C2D22C680A5500BB2D25 /* UnixLibraryLoader.cpp */; }; FA0A3A5F23366CE9001C269E /* floattypes.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0A3A5D23366CE9001C269E /* floattypes.h */; }; FA0A3A6023366CE9001C269E /* floattypes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0A3A5E23366CE9001C269E /* floattypes.cpp */; }; FA0A3A6123366CE9001C269E /* floattypes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0A3A5E23366CE9001C269E /* floattypes.cpp */; }; FA0B791B1A958E3B000E1D17 /* b64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B78F71A958E3B000E1D17 /* b64.cpp */; }; FA0B791C1A958E3B000E1D17 /* b64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B78F71A958E3B000E1D17 /* b64.cpp */; }; FA0B791D1A958E3B000E1D17 /* b64.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B78F81A958E3B000E1D17 /* b64.h */; }; FA0B791E1A958E3B000E1D17 /* config.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B78F91A958E3B000E1D17 /* config.h */; }; FA0B791F1A958E3B000E1D17 /* Data.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B78FA1A958E3B000E1D17 /* Data.h */; }; FA0B79201A958E3B000E1D17 /* delay.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B78FB1A958E3B000E1D17 /* delay.cpp */; }; FA0B79211A958E3B000E1D17 /* delay.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B78FB1A958E3B000E1D17 /* delay.cpp */; }; FA0B79221A958E3B000E1D17 /* delay.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B78FC1A958E3B000E1D17 /* delay.h */; }; FA0B79231A958E3B000E1D17 /* EnumMap.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B78FD1A958E3B000E1D17 /* EnumMap.h */; }; FA0B79241A958E3B000E1D17 /* Exception.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B78FE1A958E3B000E1D17 /* Exception.cpp */; }; FA0B79251A958E3B000E1D17 /* Exception.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B78FE1A958E3B000E1D17 /* Exception.cpp */; }; FA0B79261A958E3B000E1D17 /* Exception.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B78FF1A958E3B000E1D17 /* Exception.h */; }; FA0B79271A958E3B000E1D17 /* int.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B79001A958E3B000E1D17 /* int.h */; }; FA0B79281A958E3B000E1D17 /* math.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B79011A958E3B000E1D17 /* math.h */; }; FA0B79291A958E3B000E1D17 /* Matrix.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B79021A958E3B000E1D17 /* Matrix.cpp */; }; FA0B792A1A958E3B000E1D17 /* Matrix.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B79021A958E3B000E1D17 /* Matrix.cpp */; }; FA0B792B1A958E3B000E1D17 /* Matrix.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B79031A958E3B000E1D17 /* Matrix.h */; }; FA0B792F1A958E3B000E1D17 /* Module.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B79061A958E3B000E1D17 /* Module.cpp */; }; FA0B79301A958E3B000E1D17 /* Module.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B79061A958E3B000E1D17 /* Module.cpp */; }; FA0B79311A958E3B000E1D17 /* Module.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B79071A958E3B000E1D17 /* Module.h */; }; FA0B79321A958E3B000E1D17 /* Object.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B79081A958E3B000E1D17 /* Object.cpp */; }; FA0B79331A958E3B000E1D17 /* Object.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B79081A958E3B000E1D17 /* Object.cpp */; }; FA0B79341A958E3B000E1D17 /* Object.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B79091A958E3B000E1D17 /* Object.h */; }; FA0B79381A958E3B000E1D17 /* Reference.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B790C1A958E3B000E1D17 /* Reference.cpp */; }; FA0B79391A958E3B000E1D17 /* Reference.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B790C1A958E3B000E1D17 /* Reference.cpp */; }; FA0B793A1A958E3B000E1D17 /* Reference.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B790D1A958E3B000E1D17 /* Reference.h */; }; FA0B793B1A958E3B000E1D17 /* runtime.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B790E1A958E3B000E1D17 /* runtime.cpp */; }; FA0B793C1A958E3B000E1D17 /* runtime.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B790E1A958E3B000E1D17 /* runtime.cpp */; }; FA0B793D1A958E3B000E1D17 /* runtime.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B790F1A958E3B000E1D17 /* runtime.h */; }; FA0B793E1A958E3B000E1D17 /* StringMap.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B79101A958E3B000E1D17 /* StringMap.h */; }; FA0B793F1A958E3B000E1D17 /* types.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B79111A958E3B000E1D17 /* types.h */; }; FA0B79401A958E3B000E1D17 /* utf8.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B79121A958E3B000E1D17 /* utf8.cpp */; }; FA0B79411A958E3B000E1D17 /* utf8.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B79121A958E3B000E1D17 /* utf8.cpp */; }; FA0B79421A958E3B000E1D17 /* utf8.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B79131A958E3B000E1D17 /* utf8.h */; }; FA0B79431A958E3B000E1D17 /* Variant.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B79141A958E3B000E1D17 /* Variant.cpp */; }; FA0B79441A958E3B000E1D17 /* Variant.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B79141A958E3B000E1D17 /* Variant.cpp */; }; FA0B79451A958E3B000E1D17 /* Variant.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B79151A958E3B000E1D17 /* Variant.h */; }; FA0B79461A958E3B000E1D17 /* Vector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B79161A958E3B000E1D17 /* Vector.cpp */; }; FA0B79471A958E3B000E1D17 /* Vector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B79161A958E3B000E1D17 /* Vector.cpp */; }; FA0B79481A958E3B000E1D17 /* Vector.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B79171A958E3B000E1D17 /* Vector.h */; }; FA0B79491A958E3B000E1D17 /* version.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B79181A958E3B000E1D17 /* version.h */; }; FA0B7AB41A958EA3000E1D17 /* ddsinfo.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B79B51A958EA3000E1D17 /* ddsinfo.h */; }; FA0B7AB51A958EA3000E1D17 /* ddsparse.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B79B61A958EA3000E1D17 /* ddsparse.cpp */; }; FA0B7AB61A958EA3000E1D17 /* ddsparse.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B79B61A958EA3000E1D17 /* ddsparse.cpp */; }; FA0B7AB71A958EA3000E1D17 /* ddsparse.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B79B71A958EA3000E1D17 /* ddsparse.h */; }; FA0B7AB81A958EA3000E1D17 /* enet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B79B91A958EA3000E1D17 /* enet.cpp */; }; FA0B7AB91A958EA3000E1D17 /* enet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B79B91A958EA3000E1D17 /* enet.cpp */; }; FA0B7ABA1A958EA3000E1D17 /* callbacks.c in Sources */ = {isa = PBXBuildFile; fileRef = FA0B79BB1A958EA3000E1D17 /* callbacks.c */; }; FA0B7ABB1A958EA3000E1D17 /* callbacks.c in Sources */ = {isa = PBXBuildFile; fileRef = FA0B79BB1A958EA3000E1D17 /* callbacks.c */; }; FA0B7ABD1A958EA3000E1D17 /* compress.c in Sources */ = {isa = PBXBuildFile; fileRef = FA0B79BD1A958EA3000E1D17 /* compress.c */; }; FA0B7ABE1A958EA3000E1D17 /* compress.c in Sources */ = {isa = PBXBuildFile; fileRef = FA0B79BD1A958EA3000E1D17 /* compress.c */; }; FA0B7ABF1A958EA3000E1D17 /* host.c in Sources */ = {isa = PBXBuildFile; fileRef = FA0B79BE1A958EA3000E1D17 /* host.c */; }; FA0B7AC01A958EA3000E1D17 /* host.c in Sources */ = {isa = PBXBuildFile; fileRef = FA0B79BE1A958EA3000E1D17 /* host.c */; }; FA0B7AC11A958EA3000E1D17 /* callbacks.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B79C11A958EA3000E1D17 /* callbacks.h */; }; FA0B7AC21A958EA3000E1D17 /* enet.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B79C21A958EA3000E1D17 /* enet.h */; }; FA0B7AC31A958EA3000E1D17 /* list.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B79C31A958EA3000E1D17 /* list.h */; }; FA0B7AC41A958EA3000E1D17 /* protocol.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B79C41A958EA3000E1D17 /* protocol.h */; }; FA0B7AC51A958EA3000E1D17 /* time.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B79C51A958EA3000E1D17 /* time.h */; }; FA0B7AC61A958EA3000E1D17 /* types.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B79C61A958EA3000E1D17 /* types.h */; }; FA0B7AC71A958EA3000E1D17 /* unix.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B79C71A958EA3000E1D17 /* unix.h */; }; FA0B7AC81A958EA3000E1D17 /* utility.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B79C81A958EA3000E1D17 /* utility.h */; }; FA0B7AC91A958EA3000E1D17 /* win32.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B79C91A958EA3000E1D17 /* win32.h */; }; FA0B7ACB1A958EA3000E1D17 /* list.c in Sources */ = {isa = PBXBuildFile; fileRef = FA0B79CB1A958EA3000E1D17 /* list.c */; }; FA0B7ACC1A958EA3000E1D17 /* list.c in Sources */ = {isa = PBXBuildFile; fileRef = FA0B79CB1A958EA3000E1D17 /* list.c */; }; FA0B7ACD1A958EA3000E1D17 /* packet.c in Sources */ = {isa = PBXBuildFile; fileRef = FA0B79CC1A958EA3000E1D17 /* packet.c */; }; FA0B7ACE1A958EA3000E1D17 /* packet.c in Sources */ = {isa = PBXBuildFile; fileRef = FA0B79CC1A958EA3000E1D17 /* packet.c */; }; FA0B7ACF1A958EA3000E1D17 /* peer.c in Sources */ = {isa = PBXBuildFile; fileRef = FA0B79CD1A958EA3000E1D17 /* peer.c */; }; FA0B7AD01A958EA3000E1D17 /* peer.c in Sources */ = {isa = PBXBuildFile; fileRef = FA0B79CD1A958EA3000E1D17 /* peer.c */; }; FA0B7AD11A958EA3000E1D17 /* protocol.c in Sources */ = {isa = PBXBuildFile; fileRef = FA0B79CE1A958EA3000E1D17 /* protocol.c */; }; FA0B7AD21A958EA3000E1D17 /* protocol.c in Sources */ = {isa = PBXBuildFile; fileRef = FA0B79CE1A958EA3000E1D17 /* protocol.c */; }; FA0B7AD41A958EA3000E1D17 /* unix.c in Sources */ = {isa = PBXBuildFile; fileRef = FA0B79D01A958EA3000E1D17 /* unix.c */; }; FA0B7AD51A958EA3000E1D17 /* unix.c in Sources */ = {isa = PBXBuildFile; fileRef = FA0B79D01A958EA3000E1D17 /* unix.c */; }; FA0B7AD61A958EA3000E1D17 /* win32.c in Sources */ = {isa = PBXBuildFile; fileRef = FA0B79D11A958EA3000E1D17 /* win32.c */; }; FA0B7AD71A958EA3000E1D17 /* win32.c in Sources */ = {isa = PBXBuildFile; fileRef = FA0B79D11A958EA3000E1D17 /* win32.c */; }; FA0B7AD81A958EA3000E1D17 /* lua-enet.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B79D21A958EA3000E1D17 /* lua-enet.h */; }; FA0B7AD91A958EA3000E1D17 /* glad.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B79D41A958EA3000E1D17 /* glad.cpp */; }; FA0B7ADA1A958EA3000E1D17 /* glad.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B79D41A958EA3000E1D17 /* glad.cpp */; }; FA0B7ADC1A958EA3000E1D17 /* glad.hpp in Headers */ = {isa = PBXBuildFile; fileRef = FA0B79D61A958EA3000E1D17 /* glad.hpp */; }; FA0B7ADD1A958EA3000E1D17 /* gladfuncs.hpp in Headers */ = {isa = PBXBuildFile; fileRef = FA0B79D71A958EA3000E1D17 /* gladfuncs.hpp */; }; FA0B7ADE1A958EA3000E1D17 /* lodepng.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B79D91A958EA3000E1D17 /* lodepng.cpp */; }; FA0B7ADF1A958EA3000E1D17 /* lodepng.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B79D91A958EA3000E1D17 /* lodepng.cpp */; }; FA0B7AE01A958EA3000E1D17 /* lodepng.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B79DA1A958EA3000E1D17 /* lodepng.h */; }; FA0B7B211A958EA3000E1D17 /* luasocket.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7A0E1A958EA3000E1D17 /* luasocket.cpp */; }; FA0B7B221A958EA3000E1D17 /* luasocket.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7A0E1A958EA3000E1D17 /* luasocket.cpp */; }; FA0B7B231A958EA3000E1D17 /* luasocket.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7A0F1A958EA3000E1D17 /* luasocket.h */; }; FA0B7B281A958EA3000E1D17 /* simplexnoise1234.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7A151A958EA3000E1D17 /* simplexnoise1234.cpp */; }; FA0B7B291A958EA3000E1D17 /* simplexnoise1234.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7A151A958EA3000E1D17 /* simplexnoise1234.cpp */; }; FA0B7B2A1A958EA3000E1D17 /* simplexnoise1234.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7A161A958EA3000E1D17 /* simplexnoise1234.h */; }; FA0B7B2B1A958EA3000E1D17 /* stb_image.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7A181A958EA3000E1D17 /* stb_image.h */; }; FA0B7B2C1A958EA3000E1D17 /* checked.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7A1B1A958EA3000E1D17 /* checked.h */; }; FA0B7B2D1A958EA3000E1D17 /* core.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7A1C1A958EA3000E1D17 /* core.h */; }; FA0B7B2E1A958EA3000E1D17 /* unchecked.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7A1D1A958EA3000E1D17 /* unchecked.h */; }; FA0B7B2F1A958EA3000E1D17 /* utf8.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7A1E1A958EA3000E1D17 /* utf8.h */; }; FA0B7B301A958EA3000E1D17 /* wuff.c in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7A201A958EA3000E1D17 /* wuff.c */; }; FA0B7B311A958EA3000E1D17 /* wuff.c in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7A201A958EA3000E1D17 /* wuff.c */; }; FA0B7B321A958EA3000E1D17 /* wuff.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7A211A958EA3000E1D17 /* wuff.h */; }; FA0B7B331A958EA3000E1D17 /* wuff_config.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7A221A958EA3000E1D17 /* wuff_config.h */; }; FA0B7B341A958EA3000E1D17 /* wuff_convert.c in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7A231A958EA3000E1D17 /* wuff_convert.c */; }; FA0B7B351A958EA3000E1D17 /* wuff_convert.c in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7A231A958EA3000E1D17 /* wuff_convert.c */; }; FA0B7B361A958EA3000E1D17 /* wuff_convert.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7A241A958EA3000E1D17 /* wuff_convert.h */; }; FA0B7B371A958EA3000E1D17 /* wuff_internal.c in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7A251A958EA3000E1D17 /* wuff_internal.c */; }; FA0B7B381A958EA3000E1D17 /* wuff_internal.c in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7A251A958EA3000E1D17 /* wuff_internal.c */; }; FA0B7B391A958EA3000E1D17 /* wuff_internal.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7A261A958EA3000E1D17 /* wuff_internal.h */; }; FA0B7B3A1A958EA3000E1D17 /* wuff_memory.c in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7A271A958EA3000E1D17 /* wuff_memory.c */; }; FA0B7B3B1A958EA3000E1D17 /* wuff_memory.c in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7A271A958EA3000E1D17 /* wuff_memory.c */; }; FA0B7CCD1A95902C000E1D17 /* Audio.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7B3E1A95902C000E1D17 /* Audio.cpp */; }; FA0B7CCE1A95902C000E1D17 /* Audio.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7B3E1A95902C000E1D17 /* Audio.cpp */; }; FA0B7CCF1A95902C000E1D17 /* Audio.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7B3F1A95902C000E1D17 /* Audio.h */; }; FA0B7CD01A95902C000E1D17 /* Audio.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7B411A95902C000E1D17 /* Audio.cpp */; }; FA0B7CD11A95902C000E1D17 /* Audio.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7B411A95902C000E1D17 /* Audio.cpp */; }; FA0B7CD21A95902C000E1D17 /* Audio.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7B421A95902C000E1D17 /* Audio.h */; }; FA0B7CD31A95902C000E1D17 /* Source.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7B431A95902C000E1D17 /* Source.cpp */; }; FA0B7CD41A95902C000E1D17 /* Source.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7B431A95902C000E1D17 /* Source.cpp */; }; FA0B7CD51A95902C000E1D17 /* Source.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7B441A95902C000E1D17 /* Source.h */; }; FA0B7CD61A95902C000E1D17 /* Audio.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7B461A95902C000E1D17 /* Audio.cpp */; }; FA0B7CD71A95902C000E1D17 /* Audio.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7B461A95902C000E1D17 /* Audio.cpp */; }; FA0B7CD81A95902C000E1D17 /* Audio.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7B471A95902C000E1D17 /* Audio.h */; }; FA0B7CD91A95902C000E1D17 /* Pool.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7B481A95902C000E1D17 /* Pool.cpp */; }; FA0B7CDA1A95902C000E1D17 /* Pool.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7B481A95902C000E1D17 /* Pool.cpp */; }; FA0B7CDB1A95902C000E1D17 /* Pool.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7B491A95902C000E1D17 /* Pool.h */; }; FA0B7CDC1A95902C000E1D17 /* Source.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7B4A1A95902C000E1D17 /* Source.cpp */; }; FA0B7CDD1A95902C000E1D17 /* Source.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7B4A1A95902C000E1D17 /* Source.cpp */; }; FA0B7CDE1A95902C000E1D17 /* Source.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7B4B1A95902C000E1D17 /* Source.h */; }; FA0B7CDF1A95902C000E1D17 /* Source.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7B4C1A95902C000E1D17 /* Source.cpp */; }; FA0B7CE01A95902C000E1D17 /* Source.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7B4C1A95902C000E1D17 /* Source.cpp */; }; FA0B7CE11A95902C000E1D17 /* Source.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7B4D1A95902C000E1D17 /* Source.h */; }; FA0B7CE21A95902C000E1D17 /* wrap_Audio.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7B4E1A95902C000E1D17 /* wrap_Audio.cpp */; }; FA0B7CE31A95902C000E1D17 /* wrap_Audio.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7B4E1A95902C000E1D17 /* wrap_Audio.cpp */; }; FA0B7CE41A95902C000E1D17 /* wrap_Audio.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7B4F1A95902C000E1D17 /* wrap_Audio.h */; }; FA0B7CE51A95902C000E1D17 /* wrap_Source.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7B501A95902C000E1D17 /* wrap_Source.cpp */; }; FA0B7CE61A95902C000E1D17 /* wrap_Source.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7B501A95902C000E1D17 /* wrap_Source.cpp */; }; FA0B7CE71A95902C000E1D17 /* wrap_Source.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7B511A95902C000E1D17 /* wrap_Source.h */; }; FA0B7CE81A95902C000E1D17 /* Event.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7B531A95902C000E1D17 /* Event.cpp */; }; FA0B7CE91A95902C000E1D17 /* Event.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7B531A95902C000E1D17 /* Event.cpp */; }; FA0B7CEA1A95902C000E1D17 /* Event.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7B541A95902C000E1D17 /* Event.h */; }; FA0B7CEB1A95902C000E1D17 /* Event.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7B561A95902C000E1D17 /* Event.cpp */; }; FA0B7CEC1A95902C000E1D17 /* Event.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7B561A95902C000E1D17 /* Event.cpp */; }; FA0B7CED1A95902C000E1D17 /* Event.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7B571A95902C000E1D17 /* Event.h */; }; FA0B7CF41A95902C000E1D17 /* File.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7B5D1A95902C000E1D17 /* File.cpp */; }; FA0B7CF51A95902C000E1D17 /* File.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7B5D1A95902C000E1D17 /* File.cpp */; }; FA0B7CF61A95902C000E1D17 /* File.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7B5E1A95902C000E1D17 /* File.h */; }; FA0B7CF71A95902C000E1D17 /* FileData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7B5F1A95902C000E1D17 /* FileData.cpp */; }; FA0B7CF81A95902C000E1D17 /* FileData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7B5F1A95902C000E1D17 /* FileData.cpp */; }; FA0B7CF91A95902C000E1D17 /* FileData.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7B601A95902C000E1D17 /* FileData.h */; }; FA0B7CFA1A95902C000E1D17 /* Filesystem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7B611A95902C000E1D17 /* Filesystem.cpp */; }; FA0B7CFB1A95902C000E1D17 /* Filesystem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7B611A95902C000E1D17 /* Filesystem.cpp */; }; FA0B7CFC1A95902C000E1D17 /* Filesystem.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7B621A95902C000E1D17 /* Filesystem.h */; }; FA0B7CFD1A95902C000E1D17 /* File.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7B641A95902C000E1D17 /* File.cpp */; }; FA0B7CFE1A95902C000E1D17 /* File.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7B641A95902C000E1D17 /* File.cpp */; }; FA0B7CFF1A95902C000E1D17 /* File.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7B651A95902C000E1D17 /* File.h */; }; FA0B7D001A95902C000E1D17 /* Filesystem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7B661A95902C000E1D17 /* Filesystem.cpp */; }; FA0B7D011A95902C000E1D17 /* Filesystem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7B661A95902C000E1D17 /* Filesystem.cpp */; }; FA0B7D021A95902C000E1D17 /* Filesystem.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7B671A95902C000E1D17 /* Filesystem.h */; }; FA0B7D061A95902C000E1D17 /* wrap_File.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7B6A1A95902C000E1D17 /* wrap_File.cpp */; }; FA0B7D071A95902C000E1D17 /* wrap_File.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7B6A1A95902C000E1D17 /* wrap_File.cpp */; }; FA0B7D081A95902C000E1D17 /* wrap_File.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7B6B1A95902C000E1D17 /* wrap_File.h */; }; FA0B7D091A95902C000E1D17 /* wrap_FileData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7B6C1A95902C000E1D17 /* wrap_FileData.cpp */; }; FA0B7D0A1A95902C000E1D17 /* wrap_FileData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7B6C1A95902C000E1D17 /* wrap_FileData.cpp */; }; FA0B7D0B1A95902C000E1D17 /* wrap_FileData.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7B6D1A95902C000E1D17 /* wrap_FileData.h */; }; FA0B7D0C1A95902C000E1D17 /* wrap_Filesystem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7B6E1A95902C000E1D17 /* wrap_Filesystem.cpp */; }; FA0B7D0D1A95902C000E1D17 /* wrap_Filesystem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7B6E1A95902C000E1D17 /* wrap_Filesystem.cpp */; }; FA0B7D0E1A95902C000E1D17 /* wrap_Filesystem.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7B6F1A95902C000E1D17 /* wrap_Filesystem.h */; }; FA0B7D0F1A95902C000E1D17 /* BMFontRasterizer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7B711A95902C000E1D17 /* BMFontRasterizer.cpp */; }; FA0B7D101A95902C000E1D17 /* BMFontRasterizer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7B711A95902C000E1D17 /* BMFontRasterizer.cpp */; }; FA0B7D111A95902C000E1D17 /* BMFontRasterizer.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7B721A95902C000E1D17 /* BMFontRasterizer.h */; }; FA0B7D121A95902C000E1D17 /* Font.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7B731A95902C000E1D17 /* Font.cpp */; }; FA0B7D131A95902C000E1D17 /* Font.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7B731A95902C000E1D17 /* Font.cpp */; }; FA0B7D141A95902C000E1D17 /* Font.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7B741A95902C000E1D17 /* Font.h */; }; FA0B7D151A95902C000E1D17 /* Font.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7B761A95902C000E1D17 /* Font.cpp */; }; FA0B7D161A95902C000E1D17 /* Font.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7B761A95902C000E1D17 /* Font.cpp */; }; FA0B7D171A95902C000E1D17 /* Font.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7B771A95902C000E1D17 /* Font.h */; }; FA0B7D181A95902C000E1D17 /* TrueTypeRasterizer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7B781A95902C000E1D17 /* TrueTypeRasterizer.cpp */; }; FA0B7D191A95902C000E1D17 /* TrueTypeRasterizer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7B781A95902C000E1D17 /* TrueTypeRasterizer.cpp */; }; FA0B7D1A1A95902C000E1D17 /* TrueTypeRasterizer.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7B791A95902C000E1D17 /* TrueTypeRasterizer.h */; }; FA0B7D1B1A95902C000E1D17 /* GlyphData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7B7A1A95902C000E1D17 /* GlyphData.cpp */; }; FA0B7D1C1A95902C000E1D17 /* GlyphData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7B7A1A95902C000E1D17 /* GlyphData.cpp */; }; FA0B7D1D1A95902C000E1D17 /* GlyphData.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7B7B1A95902C000E1D17 /* GlyphData.h */; }; FA0B7D1E1A95902C000E1D17 /* ImageRasterizer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7B7C1A95902C000E1D17 /* ImageRasterizer.cpp */; }; FA0B7D1F1A95902C000E1D17 /* ImageRasterizer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7B7C1A95902C000E1D17 /* ImageRasterizer.cpp */; }; FA0B7D201A95902C000E1D17 /* ImageRasterizer.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7B7D1A95902C000E1D17 /* ImageRasterizer.h */; }; FA0B7D211A95902C000E1D17 /* Rasterizer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7B7E1A95902C000E1D17 /* Rasterizer.cpp */; }; FA0B7D221A95902C000E1D17 /* Rasterizer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7B7E1A95902C000E1D17 /* Rasterizer.cpp */; }; FA0B7D231A95902C000E1D17 /* Rasterizer.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7B7F1A95902C000E1D17 /* Rasterizer.h */; }; FA0B7D251A95902C000E1D17 /* wrap_Font.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7B811A95902C000E1D17 /* wrap_Font.cpp */; }; FA0B7D261A95902C000E1D17 /* wrap_Font.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7B811A95902C000E1D17 /* wrap_Font.cpp */; }; FA0B7D271A95902C000E1D17 /* wrap_Font.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7B821A95902C000E1D17 /* wrap_Font.h */; }; FA0B7D281A95902C000E1D17 /* wrap_GlyphData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7B831A95902C000E1D17 /* wrap_GlyphData.cpp */; }; FA0B7D291A95902C000E1D17 /* wrap_GlyphData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7B831A95902C000E1D17 /* wrap_GlyphData.cpp */; }; FA0B7D2A1A95902C000E1D17 /* wrap_GlyphData.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7B841A95902C000E1D17 /* wrap_GlyphData.h */; }; FA0B7D2B1A95902C000E1D17 /* wrap_Rasterizer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7B851A95902C000E1D17 /* wrap_Rasterizer.cpp */; }; FA0B7D2C1A95902C000E1D17 /* wrap_Rasterizer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7B851A95902C000E1D17 /* wrap_Rasterizer.cpp */; }; FA0B7D2D1A95902C000E1D17 /* wrap_Rasterizer.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7B861A95902C000E1D17 /* wrap_Rasterizer.h */; }; FA0B7D2F1A95902C000E1D17 /* Drawable.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7B891A95902C000E1D17 /* Drawable.h */; }; FA0B7D301A95902C000E1D17 /* Graphics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7B8A1A95902C000E1D17 /* Graphics.cpp */; }; FA0B7D311A95902C000E1D17 /* Graphics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7B8A1A95902C000E1D17 /* Graphics.cpp */; }; FA0B7D321A95902C000E1D17 /* Graphics.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7B8B1A95902C000E1D17 /* Graphics.h */; }; FA0B7D391A95902C000E1D17 /* Graphics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7B911A95902C000E1D17 /* Graphics.cpp */; }; FA0B7D3A1A95902C000E1D17 /* Graphics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7B911A95902C000E1D17 /* Graphics.cpp */; }; FA0B7D3B1A95902C000E1D17 /* Graphics.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7B921A95902C000E1D17 /* Graphics.h */; }; FA0B7D3C1A95902C000E1D17 /* Texture.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7B931A95902C000E1D17 /* Texture.cpp */; }; FA0B7D3D1A95902C000E1D17 /* Texture.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7B931A95902C000E1D17 /* Texture.cpp */; }; FA0B7D3E1A95902C000E1D17 /* Texture.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7B941A95902C000E1D17 /* Texture.h */; }; FA0B7D421A95902C000E1D17 /* OpenGL.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7B971A95902C000E1D17 /* OpenGL.cpp */; }; FA0B7D431A95902C000E1D17 /* OpenGL.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7B971A95902C000E1D17 /* OpenGL.cpp */; }; FA0B7D441A95902C000E1D17 /* OpenGL.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7B981A95902C000E1D17 /* OpenGL.h */; }; FA0B7D481A95902C000E1D17 /* Polyline.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7B9B1A95902C000E1D17 /* Polyline.cpp */; }; FA0B7D491A95902C000E1D17 /* Polyline.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7B9B1A95902C000E1D17 /* Polyline.cpp */; }; FA0B7D4A1A95902C000E1D17 /* Polyline.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7B9C1A95902C000E1D17 /* Polyline.h */; }; FA0B7D4B1A95902C000E1D17 /* Shader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7B9D1A95902C000E1D17 /* Shader.cpp */; }; FA0B7D4C1A95902C000E1D17 /* Shader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7B9D1A95902C000E1D17 /* Shader.cpp */; }; FA0B7D4D1A95902C000E1D17 /* Shader.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7B9E1A95902C000E1D17 /* Shader.h */; }; FA0B7D551A95902C000E1D17 /* Buffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7BA41A95902C000E1D17 /* Buffer.cpp */; }; FA0B7D561A95902C000E1D17 /* Buffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7BA41A95902C000E1D17 /* Buffer.cpp */; }; FA0B7D571A95902C000E1D17 /* Buffer.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7BA51A95902C000E1D17 /* Buffer.h */; }; FA0B7D791A95902C000E1D17 /* Quad.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7BBC1A95902C000E1D17 /* Quad.cpp */; }; FA0B7D7A1A95902C000E1D17 /* Quad.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7BBC1A95902C000E1D17 /* Quad.cpp */; }; FA0B7D7B1A95902C000E1D17 /* Quad.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7BBD1A95902C000E1D17 /* Quad.h */; }; FA0B7D7C1A95902C000E1D17 /* Texture.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7BBE1A95902C000E1D17 /* Texture.cpp */; }; FA0B7D7D1A95902C000E1D17 /* Texture.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7BBE1A95902C000E1D17 /* Texture.cpp */; }; FA0B7D7E1A95902C000E1D17 /* Texture.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7BBF1A95902C000E1D17 /* Texture.h */; }; FA0B7D7F1A95902C000E1D17 /* Volatile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7BC01A95902C000E1D17 /* Volatile.cpp */; }; FA0B7D801A95902C000E1D17 /* Volatile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7BC01A95902C000E1D17 /* Volatile.cpp */; }; FA0B7D811A95902C000E1D17 /* Volatile.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7BC11A95902C000E1D17 /* Volatile.h */; }; FA0B7D821A95902C000E1D17 /* CompressedImageData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7BC31A95902C000E1D17 /* CompressedImageData.cpp */; }; FA0B7D831A95902C000E1D17 /* CompressedImageData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7BC31A95902C000E1D17 /* CompressedImageData.cpp */; }; FA0B7D841A95902C000E1D17 /* CompressedImageData.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7BC41A95902C000E1D17 /* CompressedImageData.h */; }; FA0B7D851A95902C000E1D17 /* Image.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7BC51A95902C000E1D17 /* Image.h */; }; FA0B7D861A95902C000E1D17 /* ImageData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7BC61A95902C000E1D17 /* ImageData.cpp */; }; FA0B7D871A95902C000E1D17 /* ImageData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7BC61A95902C000E1D17 /* ImageData.cpp */; }; FA0B7D881A95902C000E1D17 /* ImageData.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7BC71A95902C000E1D17 /* ImageData.h */; }; FA0B7D8D1A95902C000E1D17 /* ddsHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7BCC1A95902C000E1D17 /* ddsHandler.cpp */; }; FA0B7D8E1A95902C000E1D17 /* ddsHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7BCC1A95902C000E1D17 /* ddsHandler.cpp */; }; FA0B7D8F1A95902C000E1D17 /* ddsHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7BCD1A95902C000E1D17 /* ddsHandler.h */; }; FA0B7D9F1A95902C000E1D17 /* KTXHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7BD81A95902C000E1D17 /* KTXHandler.cpp */; }; FA0B7DA01A95902C000E1D17 /* KTXHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7BD81A95902C000E1D17 /* KTXHandler.cpp */; }; FA0B7DA11A95902C000E1D17 /* KTXHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7BD91A95902C000E1D17 /* KTXHandler.h */; }; FA0B7DA21A95902C000E1D17 /* PKMHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7BDA1A95902C000E1D17 /* PKMHandler.cpp */; }; FA0B7DA31A95902C000E1D17 /* PKMHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7BDA1A95902C000E1D17 /* PKMHandler.cpp */; }; FA0B7DA41A95902C000E1D17 /* PKMHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7BDB1A95902C000E1D17 /* PKMHandler.h */; }; FA0B7DA51A95902C000E1D17 /* PNGHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7BDC1A95902C000E1D17 /* PNGHandler.cpp */; }; FA0B7DA61A95902C000E1D17 /* PNGHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7BDC1A95902C000E1D17 /* PNGHandler.cpp */; }; FA0B7DA71A95902C000E1D17 /* PNGHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7BDD1A95902C000E1D17 /* PNGHandler.h */; }; FA0B7DA81A95902C000E1D17 /* PVRHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7BDE1A95902C000E1D17 /* PVRHandler.cpp */; }; FA0B7DA91A95902C000E1D17 /* PVRHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7BDE1A95902C000E1D17 /* PVRHandler.cpp */; }; FA0B7DAA1A95902C000E1D17 /* PVRHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7BDF1A95902C000E1D17 /* PVRHandler.h */; }; FA0B7DAB1A95902C000E1D17 /* STBHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7BE01A95902C000E1D17 /* STBHandler.cpp */; }; FA0B7DAC1A95902C000E1D17 /* STBHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7BE01A95902C000E1D17 /* STBHandler.cpp */; }; FA0B7DAD1A95902C000E1D17 /* STBHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7BE11A95902C000E1D17 /* STBHandler.h */; }; FA0B7DAE1A95902C000E1D17 /* wrap_CompressedImageData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7BE21A95902C000E1D17 /* wrap_CompressedImageData.cpp */; }; FA0B7DAF1A95902C000E1D17 /* wrap_CompressedImageData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7BE21A95902C000E1D17 /* wrap_CompressedImageData.cpp */; }; FA0B7DB01A95902C000E1D17 /* wrap_CompressedImageData.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7BE31A95902C000E1D17 /* wrap_CompressedImageData.h */; }; FA0B7DB11A95902C000E1D17 /* wrap_Image.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7BE41A95902C000E1D17 /* wrap_Image.cpp */; }; FA0B7DB21A95902C000E1D17 /* wrap_Image.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7BE41A95902C000E1D17 /* wrap_Image.cpp */; }; FA0B7DB31A95902C000E1D17 /* wrap_Image.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7BE51A95902C000E1D17 /* wrap_Image.h */; }; FA0B7DB41A95902C000E1D17 /* wrap_ImageData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7BE61A95902C000E1D17 /* wrap_ImageData.cpp */; }; FA0B7DB51A95902C000E1D17 /* wrap_ImageData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7BE61A95902C000E1D17 /* wrap_ImageData.cpp */; }; FA0B7DB61A95902C000E1D17 /* wrap_ImageData.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7BE71A95902C000E1D17 /* wrap_ImageData.h */; }; FA0B7DB71A95902C000E1D17 /* Joystick.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7BE91A95902C000E1D17 /* Joystick.cpp */; }; FA0B7DB81A95902C000E1D17 /* Joystick.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7BE91A95902C000E1D17 /* Joystick.cpp */; }; FA0B7DB91A95902C000E1D17 /* Joystick.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7BEA1A95902C000E1D17 /* Joystick.h */; }; FA0B7DBA1A95902C000E1D17 /* JoystickModule.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7BEB1A95902C000E1D17 /* JoystickModule.h */; }; FA0B7DBB1A95902C000E1D17 /* Joystick.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7BED1A95902C000E1D17 /* Joystick.cpp */; }; FA0B7DBC1A95902C000E1D17 /* Joystick.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7BED1A95902C000E1D17 /* Joystick.cpp */; }; FA0B7DBD1A95902C000E1D17 /* Joystick.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7BEE1A95902C000E1D17 /* Joystick.h */; }; FA0B7DBE1A95902C000E1D17 /* JoystickModule.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7BEF1A95902C000E1D17 /* JoystickModule.cpp */; }; FA0B7DBF1A95902C000E1D17 /* JoystickModule.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7BEF1A95902C000E1D17 /* JoystickModule.cpp */; }; FA0B7DC01A95902C000E1D17 /* JoystickModule.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7BF01A95902C000E1D17 /* JoystickModule.h */; }; FA0B7DC11A95902C000E1D17 /* wrap_Joystick.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7BF11A95902C000E1D17 /* wrap_Joystick.cpp */; }; FA0B7DC21A95902C000E1D17 /* wrap_Joystick.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7BF11A95902C000E1D17 /* wrap_Joystick.cpp */; }; FA0B7DC31A95902C000E1D17 /* wrap_Joystick.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7BF21A95902C000E1D17 /* wrap_Joystick.h */; }; FA0B7DC41A95902C000E1D17 /* wrap_JoystickModule.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7BF31A95902C000E1D17 /* wrap_JoystickModule.cpp */; }; FA0B7DC51A95902C000E1D17 /* wrap_JoystickModule.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7BF31A95902C000E1D17 /* wrap_JoystickModule.cpp */; }; FA0B7DC61A95902C000E1D17 /* wrap_JoystickModule.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7BF41A95902C000E1D17 /* wrap_JoystickModule.h */; }; FA0B7DC71A95902C000E1D17 /* Keyboard.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7BF61A95902C000E1D17 /* Keyboard.cpp */; }; FA0B7DC81A95902C000E1D17 /* Keyboard.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7BF61A95902C000E1D17 /* Keyboard.cpp */; }; FA0B7DC91A95902C000E1D17 /* Keyboard.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7BF71A95902C000E1D17 /* Keyboard.h */; }; FA0B7DCA1A95902C000E1D17 /* Keyboard.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7BF91A95902C000E1D17 /* Keyboard.cpp */; }; FA0B7DCB1A95902C000E1D17 /* Keyboard.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7BF91A95902C000E1D17 /* Keyboard.cpp */; }; FA0B7DCC1A95902C000E1D17 /* Keyboard.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7BFA1A95902C000E1D17 /* Keyboard.h */; }; FA0B7DCD1A95902C000E1D17 /* wrap_Keyboard.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7BFB1A95902C000E1D17 /* wrap_Keyboard.cpp */; }; FA0B7DCE1A95902C000E1D17 /* wrap_Keyboard.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7BFB1A95902C000E1D17 /* wrap_Keyboard.cpp */; }; FA0B7DCF1A95902C000E1D17 /* wrap_Keyboard.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7BFC1A95902C000E1D17 /* wrap_Keyboard.h */; }; FA0B7DD01A95902C000E1D17 /* love.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7BFE1A95902C000E1D17 /* love.cpp */; }; FA0B7DD11A95902C000E1D17 /* love.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7BFE1A95902C000E1D17 /* love.cpp */; }; FA0B7DD21A95902C000E1D17 /* love.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7BFF1A95902C000E1D17 /* love.h */; }; FA0B7DD31A95902C000E1D17 /* BezierCurve.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C011A95902C000E1D17 /* BezierCurve.cpp */; }; FA0B7DD41A95902C000E1D17 /* BezierCurve.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C011A95902C000E1D17 /* BezierCurve.cpp */; }; FA0B7DD51A95902C000E1D17 /* BezierCurve.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7C021A95902C000E1D17 /* BezierCurve.h */; }; FA0B7DD61A95902C000E1D17 /* MathModule.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C031A95902C000E1D17 /* MathModule.cpp */; }; FA0B7DD71A95902C000E1D17 /* MathModule.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C031A95902C000E1D17 /* MathModule.cpp */; }; FA0B7DD81A95902C000E1D17 /* MathModule.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7C041A95902C000E1D17 /* MathModule.h */; }; FA0B7DD91A95902C000E1D17 /* RandomGenerator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C051A95902C000E1D17 /* RandomGenerator.cpp */; }; FA0B7DDA1A95902C000E1D17 /* RandomGenerator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C051A95902C000E1D17 /* RandomGenerator.cpp */; }; FA0B7DDB1A95902C000E1D17 /* RandomGenerator.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7C061A95902C000E1D17 /* RandomGenerator.h */; }; FA0B7DDC1A95902C000E1D17 /* wrap_BezierCurve.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C071A95902C000E1D17 /* wrap_BezierCurve.cpp */; }; FA0B7DDD1A95902C000E1D17 /* wrap_BezierCurve.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C071A95902C000E1D17 /* wrap_BezierCurve.cpp */; }; FA0B7DDE1A95902C000E1D17 /* wrap_BezierCurve.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7C081A95902C000E1D17 /* wrap_BezierCurve.h */; }; FA0B7DDF1A95902C000E1D17 /* wrap_Math.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C091A95902C000E1D17 /* wrap_Math.cpp */; }; FA0B7DE01A95902C000E1D17 /* wrap_Math.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C091A95902C000E1D17 /* wrap_Math.cpp */; }; FA0B7DE11A95902C000E1D17 /* wrap_Math.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7C0A1A95902C000E1D17 /* wrap_Math.h */; }; FA0B7DE21A95902C000E1D17 /* wrap_RandomGenerator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C0B1A95902C000E1D17 /* wrap_RandomGenerator.cpp */; }; FA0B7DE31A95902C000E1D17 /* wrap_RandomGenerator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C0B1A95902C000E1D17 /* wrap_RandomGenerator.cpp */; }; FA0B7DE41A95902C000E1D17 /* wrap_RandomGenerator.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7C0C1A95902C000E1D17 /* wrap_RandomGenerator.h */; }; FA0B7DE51A95902C000E1D17 /* Cursor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C0E1A95902C000E1D17 /* Cursor.cpp */; }; FA0B7DE61A95902C000E1D17 /* Cursor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C0E1A95902C000E1D17 /* Cursor.cpp */; }; FA0B7DE71A95902C000E1D17 /* Cursor.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7C0F1A95902C000E1D17 /* Cursor.h */; }; FA0B7DEA1A95902C000E1D17 /* Mouse.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7C111A95902C000E1D17 /* Mouse.h */; }; FA0B7DEB1A95902C000E1D17 /* Cursor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C131A95902C000E1D17 /* Cursor.cpp */; }; FA0B7DEC1A95902C000E1D17 /* Cursor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C131A95902C000E1D17 /* Cursor.cpp */; }; FA0B7DED1A95902C000E1D17 /* Cursor.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7C141A95902C000E1D17 /* Cursor.h */; }; FA0B7DEE1A95902C000E1D17 /* Mouse.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C151A95902C000E1D17 /* Mouse.cpp */; }; FA0B7DEF1A95902C000E1D17 /* Mouse.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C151A95902C000E1D17 /* Mouse.cpp */; }; FA0B7DF01A95902C000E1D17 /* Mouse.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7C161A95902C000E1D17 /* Mouse.h */; }; FA0B7DF11A95902C000E1D17 /* wrap_Cursor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C171A95902C000E1D17 /* wrap_Cursor.cpp */; }; FA0B7DF21A95902C000E1D17 /* wrap_Cursor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C171A95902C000E1D17 /* wrap_Cursor.cpp */; }; FA0B7DF31A95902C000E1D17 /* wrap_Cursor.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7C181A95902C000E1D17 /* wrap_Cursor.h */; }; FA0B7DF41A95902C000E1D17 /* wrap_Mouse.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C191A95902C000E1D17 /* wrap_Mouse.cpp */; }; FA0B7DF51A95902C000E1D17 /* wrap_Mouse.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C191A95902C000E1D17 /* wrap_Mouse.cpp */; }; FA0B7DF61A95902C000E1D17 /* wrap_Mouse.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7C1A1A95902C000E1D17 /* wrap_Mouse.h */; }; FA0B7DF71A95902C000E1D17 /* Body.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C1C1A95902C000E1D17 /* Body.cpp */; }; FA0B7DF81A95902C000E1D17 /* Body.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C1C1A95902C000E1D17 /* Body.cpp */; }; FA0B7DF91A95902C000E1D17 /* Body.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7C1D1A95902C000E1D17 /* Body.h */; }; FA0B7DFA1A95902C000E1D17 /* Body.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C1F1A95902C000E1D17 /* Body.cpp */; }; FA0B7DFB1A95902C000E1D17 /* Body.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C1F1A95902C000E1D17 /* Body.cpp */; }; FA0B7DFC1A95902C000E1D17 /* Body.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7C201A95902C000E1D17 /* Body.h */; }; FA0B7DFD1A95902C000E1D17 /* ChainShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C211A95902C000E1D17 /* ChainShape.cpp */; }; FA0B7DFE1A95902C000E1D17 /* ChainShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C211A95902C000E1D17 /* ChainShape.cpp */; }; FA0B7DFF1A95902C000E1D17 /* ChainShape.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7C221A95902C000E1D17 /* ChainShape.h */; }; FA0B7E001A95902C000E1D17 /* CircleShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C231A95902C000E1D17 /* CircleShape.cpp */; }; FA0B7E011A95902C000E1D17 /* CircleShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C231A95902C000E1D17 /* CircleShape.cpp */; }; FA0B7E021A95902C000E1D17 /* CircleShape.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7C241A95902C000E1D17 /* CircleShape.h */; }; FA0B7E031A95902C000E1D17 /* Contact.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C251A95902C000E1D17 /* Contact.cpp */; }; FA0B7E041A95902C000E1D17 /* Contact.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C251A95902C000E1D17 /* Contact.cpp */; }; FA0B7E051A95902C000E1D17 /* Contact.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7C261A95902C000E1D17 /* Contact.h */; }; FA0B7E061A95902C000E1D17 /* DistanceJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C271A95902C000E1D17 /* DistanceJoint.cpp */; }; FA0B7E071A95902C000E1D17 /* DistanceJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C271A95902C000E1D17 /* DistanceJoint.cpp */; }; FA0B7E081A95902C000E1D17 /* DistanceJoint.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7C281A95902C000E1D17 /* DistanceJoint.h */; }; FA0B7E091A95902C000E1D17 /* EdgeShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C291A95902C000E1D17 /* EdgeShape.cpp */; }; FA0B7E0A1A95902C000E1D17 /* EdgeShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C291A95902C000E1D17 /* EdgeShape.cpp */; }; FA0B7E0B1A95902C000E1D17 /* EdgeShape.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7C2A1A95902C000E1D17 /* EdgeShape.h */; }; FA0B7E0F1A95902C000E1D17 /* FrictionJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C2D1A95902C000E1D17 /* FrictionJoint.cpp */; }; FA0B7E101A95902C000E1D17 /* FrictionJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C2D1A95902C000E1D17 /* FrictionJoint.cpp */; }; FA0B7E111A95902C000E1D17 /* FrictionJoint.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7C2E1A95902C000E1D17 /* FrictionJoint.h */; }; FA0B7E121A95902C000E1D17 /* GearJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C2F1A95902C000E1D17 /* GearJoint.cpp */; }; FA0B7E131A95902C000E1D17 /* GearJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C2F1A95902C000E1D17 /* GearJoint.cpp */; }; FA0B7E141A95902C000E1D17 /* GearJoint.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7C301A95902C000E1D17 /* GearJoint.h */; }; FA0B7E151A95902C000E1D17 /* Joint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C311A95902C000E1D17 /* Joint.cpp */; }; FA0B7E161A95902C000E1D17 /* Joint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C311A95902C000E1D17 /* Joint.cpp */; }; FA0B7E171A95902C000E1D17 /* Joint.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7C321A95902C000E1D17 /* Joint.h */; }; FA0B7E181A95902C000E1D17 /* MotorJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C331A95902C000E1D17 /* MotorJoint.cpp */; }; FA0B7E191A95902C000E1D17 /* MotorJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C331A95902C000E1D17 /* MotorJoint.cpp */; }; FA0B7E1A1A95902C000E1D17 /* MotorJoint.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7C341A95902C000E1D17 /* MotorJoint.h */; }; FA0B7E1B1A95902C000E1D17 /* MouseJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C351A95902C000E1D17 /* MouseJoint.cpp */; }; FA0B7E1C1A95902C000E1D17 /* MouseJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C351A95902C000E1D17 /* MouseJoint.cpp */; }; FA0B7E1D1A95902C000E1D17 /* MouseJoint.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7C361A95902C000E1D17 /* MouseJoint.h */; }; FA0B7E1E1A95902C000E1D17 /* Physics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C371A95902C000E1D17 /* Physics.cpp */; }; FA0B7E1F1A95902C000E1D17 /* Physics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C371A95902C000E1D17 /* Physics.cpp */; }; FA0B7E201A95902C000E1D17 /* Physics.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7C381A95902C000E1D17 /* Physics.h */; }; FA0B7E211A95902C000E1D17 /* PolygonShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C391A95902C000E1D17 /* PolygonShape.cpp */; }; FA0B7E221A95902C000E1D17 /* PolygonShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C391A95902C000E1D17 /* PolygonShape.cpp */; }; FA0B7E231A95902C000E1D17 /* PolygonShape.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7C3A1A95902C000E1D17 /* PolygonShape.h */; }; FA0B7E241A95902C000E1D17 /* PrismaticJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C3B1A95902C000E1D17 /* PrismaticJoint.cpp */; }; FA0B7E251A95902C000E1D17 /* PrismaticJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C3B1A95902C000E1D17 /* PrismaticJoint.cpp */; }; FA0B7E261A95902C000E1D17 /* PrismaticJoint.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7C3C1A95902C000E1D17 /* PrismaticJoint.h */; }; FA0B7E271A95902C000E1D17 /* PulleyJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C3D1A95902C000E1D17 /* PulleyJoint.cpp */; }; FA0B7E281A95902C000E1D17 /* PulleyJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C3D1A95902C000E1D17 /* PulleyJoint.cpp */; }; FA0B7E291A95902C000E1D17 /* PulleyJoint.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7C3E1A95902C000E1D17 /* PulleyJoint.h */; }; FA0B7E2A1A95902C000E1D17 /* RevoluteJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C3F1A95902C000E1D17 /* RevoluteJoint.cpp */; }; FA0B7E2B1A95902C000E1D17 /* RevoluteJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C3F1A95902C000E1D17 /* RevoluteJoint.cpp */; }; FA0B7E2C1A95902C000E1D17 /* RevoluteJoint.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7C401A95902C000E1D17 /* RevoluteJoint.h */; }; FA0B7E2D1A95902C000E1D17 /* RopeJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C411A95902C000E1D17 /* RopeJoint.cpp */; }; FA0B7E2E1A95902C000E1D17 /* RopeJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C411A95902C000E1D17 /* RopeJoint.cpp */; }; FA0B7E2F1A95902C000E1D17 /* RopeJoint.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7C421A95902C000E1D17 /* RopeJoint.h */; }; FA0B7E301A95902C000E1D17 /* Shape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C431A95902C000E1D17 /* Shape.cpp */; }; FA0B7E311A95902C000E1D17 /* Shape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C431A95902C000E1D17 /* Shape.cpp */; }; FA0B7E321A95902C000E1D17 /* Shape.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7C441A95902C000E1D17 /* Shape.h */; }; FA0B7E331A95902C000E1D17 /* WeldJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C451A95902C000E1D17 /* WeldJoint.cpp */; }; FA0B7E341A95902C000E1D17 /* WeldJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C451A95902C000E1D17 /* WeldJoint.cpp */; }; FA0B7E351A95902C000E1D17 /* WeldJoint.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7C461A95902C000E1D17 /* WeldJoint.h */; }; FA0B7E361A95902C000E1D17 /* WheelJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C471A95902C000E1D17 /* WheelJoint.cpp */; }; FA0B7E371A95902C000E1D17 /* WheelJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C471A95902C000E1D17 /* WheelJoint.cpp */; }; FA0B7E381A95902C000E1D17 /* WheelJoint.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7C481A95902C000E1D17 /* WheelJoint.h */; }; FA0B7E391A95902C000E1D17 /* World.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C491A95902C000E1D17 /* World.cpp */; }; FA0B7E3A1A95902C000E1D17 /* World.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C491A95902C000E1D17 /* World.cpp */; }; FA0B7E3B1A95902C000E1D17 /* World.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7C4A1A95902C000E1D17 /* World.h */; }; FA0B7E3C1A95902C000E1D17 /* wrap_Body.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C4B1A95902C000E1D17 /* wrap_Body.cpp */; }; FA0B7E3D1A95902C000E1D17 /* wrap_Body.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C4B1A95902C000E1D17 /* wrap_Body.cpp */; }; FA0B7E3E1A95902C000E1D17 /* wrap_Body.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7C4C1A95902C000E1D17 /* wrap_Body.h */; }; FA0B7E3F1A95902C000E1D17 /* wrap_ChainShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C4D1A95902C000E1D17 /* wrap_ChainShape.cpp */; }; FA0B7E401A95902C000E1D17 /* wrap_ChainShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C4D1A95902C000E1D17 /* wrap_ChainShape.cpp */; }; FA0B7E411A95902C000E1D17 /* wrap_ChainShape.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7C4E1A95902C000E1D17 /* wrap_ChainShape.h */; }; FA0B7E421A95902C000E1D17 /* wrap_CircleShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C4F1A95902C000E1D17 /* wrap_CircleShape.cpp */; }; FA0B7E431A95902C000E1D17 /* wrap_CircleShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C4F1A95902C000E1D17 /* wrap_CircleShape.cpp */; }; FA0B7E441A95902C000E1D17 /* wrap_CircleShape.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7C501A95902C000E1D17 /* wrap_CircleShape.h */; }; FA0B7E451A95902C000E1D17 /* wrap_Contact.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C511A95902C000E1D17 /* wrap_Contact.cpp */; }; FA0B7E461A95902C000E1D17 /* wrap_Contact.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C511A95902C000E1D17 /* wrap_Contact.cpp */; }; FA0B7E471A95902C000E1D17 /* wrap_Contact.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7C521A95902C000E1D17 /* wrap_Contact.h */; }; FA0B7E481A95902C000E1D17 /* wrap_DistanceJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C531A95902C000E1D17 /* wrap_DistanceJoint.cpp */; }; FA0B7E491A95902C000E1D17 /* wrap_DistanceJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C531A95902C000E1D17 /* wrap_DistanceJoint.cpp */; }; FA0B7E4A1A95902C000E1D17 /* wrap_DistanceJoint.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7C541A95902C000E1D17 /* wrap_DistanceJoint.h */; }; FA0B7E4B1A95902C000E1D17 /* wrap_EdgeShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C551A95902C000E1D17 /* wrap_EdgeShape.cpp */; }; FA0B7E4C1A95902C000E1D17 /* wrap_EdgeShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C551A95902C000E1D17 /* wrap_EdgeShape.cpp */; }; FA0B7E4D1A95902C000E1D17 /* wrap_EdgeShape.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7C561A95902C000E1D17 /* wrap_EdgeShape.h */; }; FA0B7E511A95902C000E1D17 /* wrap_FrictionJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C591A95902C000E1D17 /* wrap_FrictionJoint.cpp */; }; FA0B7E521A95902C000E1D17 /* wrap_FrictionJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C591A95902C000E1D17 /* wrap_FrictionJoint.cpp */; }; FA0B7E531A95902C000E1D17 /* wrap_FrictionJoint.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7C5A1A95902C000E1D17 /* wrap_FrictionJoint.h */; }; FA0B7E541A95902C000E1D17 /* wrap_GearJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C5B1A95902C000E1D17 /* wrap_GearJoint.cpp */; }; FA0B7E551A95902C000E1D17 /* wrap_GearJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C5B1A95902C000E1D17 /* wrap_GearJoint.cpp */; }; FA0B7E561A95902C000E1D17 /* wrap_GearJoint.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7C5C1A95902C000E1D17 /* wrap_GearJoint.h */; }; FA0B7E571A95902C000E1D17 /* wrap_Joint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C5D1A95902C000E1D17 /* wrap_Joint.cpp */; }; FA0B7E581A95902C000E1D17 /* wrap_Joint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C5D1A95902C000E1D17 /* wrap_Joint.cpp */; }; FA0B7E591A95902C000E1D17 /* wrap_Joint.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7C5E1A95902C000E1D17 /* wrap_Joint.h */; }; FA0B7E5A1A95902C000E1D17 /* wrap_MotorJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C5F1A95902C000E1D17 /* wrap_MotorJoint.cpp */; }; FA0B7E5B1A95902C000E1D17 /* wrap_MotorJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C5F1A95902C000E1D17 /* wrap_MotorJoint.cpp */; }; FA0B7E5C1A95902C000E1D17 /* wrap_MotorJoint.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7C601A95902C000E1D17 /* wrap_MotorJoint.h */; }; FA0B7E5D1A95902C000E1D17 /* wrap_MouseJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C611A95902C000E1D17 /* wrap_MouseJoint.cpp */; }; FA0B7E5E1A95902C000E1D17 /* wrap_MouseJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C611A95902C000E1D17 /* wrap_MouseJoint.cpp */; }; FA0B7E5F1A95902C000E1D17 /* wrap_MouseJoint.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7C621A95902C000E1D17 /* wrap_MouseJoint.h */; }; FA0B7E601A95902C000E1D17 /* wrap_Physics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C631A95902C000E1D17 /* wrap_Physics.cpp */; }; FA0B7E611A95902C000E1D17 /* wrap_Physics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C631A95902C000E1D17 /* wrap_Physics.cpp */; }; FA0B7E621A95902C000E1D17 /* wrap_Physics.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7C641A95902C000E1D17 /* wrap_Physics.h */; }; FA0B7E631A95902C000E1D17 /* wrap_PolygonShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C651A95902C000E1D17 /* wrap_PolygonShape.cpp */; }; FA0B7E641A95902C000E1D17 /* wrap_PolygonShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C651A95902C000E1D17 /* wrap_PolygonShape.cpp */; }; FA0B7E651A95902C000E1D17 /* wrap_PolygonShape.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7C661A95902C000E1D17 /* wrap_PolygonShape.h */; }; FA0B7E661A95902C000E1D17 /* wrap_PrismaticJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C671A95902C000E1D17 /* wrap_PrismaticJoint.cpp */; }; FA0B7E671A95902C000E1D17 /* wrap_PrismaticJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C671A95902C000E1D17 /* wrap_PrismaticJoint.cpp */; }; FA0B7E681A95902C000E1D17 /* wrap_PrismaticJoint.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7C681A95902C000E1D17 /* wrap_PrismaticJoint.h */; }; FA0B7E691A95902C000E1D17 /* wrap_PulleyJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C691A95902C000E1D17 /* wrap_PulleyJoint.cpp */; }; FA0B7E6A1A95902C000E1D17 /* wrap_PulleyJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C691A95902C000E1D17 /* wrap_PulleyJoint.cpp */; }; FA0B7E6B1A95902C000E1D17 /* wrap_PulleyJoint.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7C6A1A95902C000E1D17 /* wrap_PulleyJoint.h */; }; FA0B7E6C1A95902C000E1D17 /* wrap_RevoluteJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C6B1A95902C000E1D17 /* wrap_RevoluteJoint.cpp */; }; FA0B7E6D1A95902C000E1D17 /* wrap_RevoluteJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C6B1A95902C000E1D17 /* wrap_RevoluteJoint.cpp */; }; FA0B7E6E1A95902C000E1D17 /* wrap_RevoluteJoint.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7C6C1A95902C000E1D17 /* wrap_RevoluteJoint.h */; }; FA0B7E6F1A95902C000E1D17 /* wrap_RopeJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C6D1A95902C000E1D17 /* wrap_RopeJoint.cpp */; }; FA0B7E701A95902C000E1D17 /* wrap_RopeJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C6D1A95902C000E1D17 /* wrap_RopeJoint.cpp */; }; FA0B7E711A95902C000E1D17 /* wrap_RopeJoint.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7C6E1A95902C000E1D17 /* wrap_RopeJoint.h */; }; FA0B7E721A95902C000E1D17 /* wrap_Shape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C6F1A95902C000E1D17 /* wrap_Shape.cpp */; }; FA0B7E731A95902C000E1D17 /* wrap_Shape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C6F1A95902C000E1D17 /* wrap_Shape.cpp */; }; FA0B7E741A95902C000E1D17 /* wrap_Shape.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7C701A95902C000E1D17 /* wrap_Shape.h */; }; FA0B7E751A95902C000E1D17 /* wrap_WeldJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C711A95902C000E1D17 /* wrap_WeldJoint.cpp */; }; FA0B7E761A95902C000E1D17 /* wrap_WeldJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C711A95902C000E1D17 /* wrap_WeldJoint.cpp */; }; FA0B7E771A95902C000E1D17 /* wrap_WeldJoint.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7C721A95902C000E1D17 /* wrap_WeldJoint.h */; }; FA0B7E781A95902C000E1D17 /* wrap_WheelJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C731A95902C000E1D17 /* wrap_WheelJoint.cpp */; }; FA0B7E791A95902C000E1D17 /* wrap_WheelJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C731A95902C000E1D17 /* wrap_WheelJoint.cpp */; }; FA0B7E7A1A95902C000E1D17 /* wrap_WheelJoint.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7C741A95902C000E1D17 /* wrap_WheelJoint.h */; }; FA0B7E7B1A95902C000E1D17 /* wrap_World.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C751A95902C000E1D17 /* wrap_World.cpp */; }; FA0B7E7C1A95902C000E1D17 /* wrap_World.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C751A95902C000E1D17 /* wrap_World.cpp */; }; FA0B7E7D1A95902C000E1D17 /* wrap_World.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7C761A95902C000E1D17 /* wrap_World.h */; }; FA0B7E7E1A95902C000E1D17 /* Joint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C771A95902C000E1D17 /* Joint.cpp */; }; FA0B7E7F1A95902C000E1D17 /* Joint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C771A95902C000E1D17 /* Joint.cpp */; }; FA0B7E801A95902C000E1D17 /* Joint.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7C781A95902C000E1D17 /* Joint.h */; }; FA0B7E811A95902C000E1D17 /* Shape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C791A95902C000E1D17 /* Shape.cpp */; }; FA0B7E821A95902C000E1D17 /* Shape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C791A95902C000E1D17 /* Shape.cpp */; }; FA0B7E831A95902C000E1D17 /* Shape.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7C7A1A95902C000E1D17 /* Shape.h */; }; FA0B7E841A95902C000E1D17 /* Decoder.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7C7C1A95902C000E1D17 /* Decoder.h */; }; FA0B7E851A95902C000E1D17 /* CoreAudioDecoder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C7E1A95902C000E1D17 /* CoreAudioDecoder.cpp */; }; FA0B7E861A95902C000E1D17 /* CoreAudioDecoder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C7E1A95902C000E1D17 /* CoreAudioDecoder.cpp */; }; FA0B7E871A95902C000E1D17 /* CoreAudioDecoder.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7C7F1A95902C000E1D17 /* CoreAudioDecoder.h */; }; FA0B7E881A95902C000E1D17 /* Decoder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C801A95902C000E1D17 /* Decoder.cpp */; }; FA0B7E891A95902C000E1D17 /* Decoder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C801A95902C000E1D17 /* Decoder.cpp */; }; FA0B7E8B1A95902C000E1D17 /* FLACDecoder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C821A95902C000E1D17 /* FLACDecoder.cpp */; }; FA0B7E8C1A95902C000E1D17 /* FLACDecoder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C821A95902C000E1D17 /* FLACDecoder.cpp */; }; FA0B7E8D1A95902C000E1D17 /* FLACDecoder.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7C831A95902C000E1D17 /* FLACDecoder.h */; }; FA0B7E911A95902C000E1D17 /* ModPlugDecoder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C861A95902C000E1D17 /* ModPlugDecoder.cpp */; }; FA0B7E921A95902C000E1D17 /* ModPlugDecoder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C861A95902C000E1D17 /* ModPlugDecoder.cpp */; }; FA0B7E931A95902C000E1D17 /* ModPlugDecoder.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7C871A95902C000E1D17 /* ModPlugDecoder.h */; }; FA0B7E971A95902C000E1D17 /* Sound.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C8A1A95902C000E1D17 /* Sound.cpp */; }; FA0B7E981A95902C000E1D17 /* Sound.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C8A1A95902C000E1D17 /* Sound.cpp */; }; FA0B7E991A95902C000E1D17 /* Sound.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7C8B1A95902C000E1D17 /* Sound.h */; }; FA0B7E9A1A95902C000E1D17 /* VorbisDecoder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C8C1A95902C000E1D17 /* VorbisDecoder.cpp */; }; FA0B7E9B1A95902C000E1D17 /* VorbisDecoder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C8C1A95902C000E1D17 /* VorbisDecoder.cpp */; }; FA0B7E9C1A95902C000E1D17 /* VorbisDecoder.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7C8D1A95902C000E1D17 /* VorbisDecoder.h */; }; FA0B7E9D1A95902C000E1D17 /* WaveDecoder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C8E1A95902C000E1D17 /* WaveDecoder.cpp */; }; FA0B7E9E1A95902C000E1D17 /* WaveDecoder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C8E1A95902C000E1D17 /* WaveDecoder.cpp */; }; FA0B7E9F1A95902C000E1D17 /* WaveDecoder.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7C8F1A95902C000E1D17 /* WaveDecoder.h */; }; FA0B7EA01A95902C000E1D17 /* Sound.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C901A95902C000E1D17 /* Sound.cpp */; }; FA0B7EA11A95902C000E1D17 /* Sound.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C901A95902C000E1D17 /* Sound.cpp */; }; FA0B7EA21A95902C000E1D17 /* Sound.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7C911A95902C000E1D17 /* Sound.h */; }; FA0B7EA31A95902C000E1D17 /* SoundData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C921A95902C000E1D17 /* SoundData.cpp */; }; FA0B7EA41A95902C000E1D17 /* SoundData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C921A95902C000E1D17 /* SoundData.cpp */; }; FA0B7EA51A95902C000E1D17 /* SoundData.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7C931A95902C000E1D17 /* SoundData.h */; }; FA0B7EA61A95902C000E1D17 /* wrap_Decoder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C941A95902C000E1D17 /* wrap_Decoder.cpp */; }; FA0B7EA71A95902C000E1D17 /* wrap_Decoder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C941A95902C000E1D17 /* wrap_Decoder.cpp */; }; FA0B7EA81A95902C000E1D17 /* wrap_Decoder.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7C951A95902C000E1D17 /* wrap_Decoder.h */; }; FA0B7EA91A95902C000E1D17 /* wrap_Sound.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C961A95902C000E1D17 /* wrap_Sound.cpp */; }; FA0B7EAA1A95902C000E1D17 /* wrap_Sound.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C961A95902C000E1D17 /* wrap_Sound.cpp */; }; FA0B7EAB1A95902C000E1D17 /* wrap_Sound.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7C971A95902C000E1D17 /* wrap_Sound.h */; }; FA0B7EAC1A95902C000E1D17 /* wrap_SoundData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C981A95902C000E1D17 /* wrap_SoundData.cpp */; }; FA0B7EAD1A95902C000E1D17 /* wrap_SoundData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C981A95902C000E1D17 /* wrap_SoundData.cpp */; }; FA0B7EAE1A95902C000E1D17 /* wrap_SoundData.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7C991A95902C000E1D17 /* wrap_SoundData.h */; }; FA0B7EAF1A95902C000E1D17 /* System.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C9C1A95902C000E1D17 /* System.cpp */; }; FA0B7EB01A95902C000E1D17 /* System.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C9C1A95902C000E1D17 /* System.cpp */; }; FA0B7EB11A95902C000E1D17 /* System.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7C9D1A95902C000E1D17 /* System.h */; }; FA0B7EB21A95902C000E1D17 /* System.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C9E1A95902C000E1D17 /* System.cpp */; }; FA0B7EB31A95902C000E1D17 /* System.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7C9E1A95902C000E1D17 /* System.cpp */; }; FA0B7EB41A95902C000E1D17 /* System.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7C9F1A95902C000E1D17 /* System.h */; }; FA0B7EB51A95902C000E1D17 /* wrap_System.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7CA01A95902C000E1D17 /* wrap_System.cpp */; }; FA0B7EB61A95902C000E1D17 /* wrap_System.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7CA01A95902C000E1D17 /* wrap_System.cpp */; }; FA0B7EB71A95902C000E1D17 /* wrap_System.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7CA11A95902C000E1D17 /* wrap_System.h */; }; FA0B7EB81A95902C000E1D17 /* Channel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7CA31A95902C000E1D17 /* Channel.cpp */; }; FA0B7EB91A95902C000E1D17 /* Channel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7CA31A95902C000E1D17 /* Channel.cpp */; }; FA0B7EBA1A95902C000E1D17 /* Channel.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7CA41A95902C000E1D17 /* Channel.h */; }; FA0B7EBB1A95902C000E1D17 /* LuaThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7CA51A95902C000E1D17 /* LuaThread.cpp */; }; FA0B7EBC1A95902C000E1D17 /* LuaThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7CA51A95902C000E1D17 /* LuaThread.cpp */; }; FA0B7EBD1A95902C000E1D17 /* LuaThread.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7CA61A95902C000E1D17 /* LuaThread.h */; }; FA0B7EBE1A95902C000E1D17 /* Thread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7CA81A95902C000E1D17 /* Thread.cpp */; }; FA0B7EBF1A95902C000E1D17 /* Thread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7CA81A95902C000E1D17 /* Thread.cpp */; }; FA0B7EC01A95902C000E1D17 /* Thread.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7CA91A95902C000E1D17 /* Thread.h */; }; FA0B7EC11A95902C000E1D17 /* threads.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7CAA1A95902C000E1D17 /* threads.cpp */; }; FA0B7EC21A95902C000E1D17 /* threads.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7CAA1A95902C000E1D17 /* threads.cpp */; }; FA0B7EC31A95902C000E1D17 /* threads.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7CAB1A95902C000E1D17 /* threads.h */; }; FA0B7EC41A95902C000E1D17 /* Thread.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7CAC1A95902C000E1D17 /* Thread.h */; }; FA0B7EC51A95902C000E1D17 /* ThreadModule.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7CAD1A95902C000E1D17 /* ThreadModule.cpp */; }; FA0B7EC61A95902C000E1D17 /* ThreadModule.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7CAD1A95902C000E1D17 /* ThreadModule.cpp */; }; FA0B7EC71A95902C000E1D17 /* ThreadModule.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7CAE1A95902C000E1D17 /* ThreadModule.h */; }; FA0B7EC81A95902C000E1D17 /* threads.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7CAF1A95902C000E1D17 /* threads.cpp */; }; FA0B7EC91A95902C000E1D17 /* threads.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7CAF1A95902C000E1D17 /* threads.cpp */; }; FA0B7ECA1A95902C000E1D17 /* threads.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7CB01A95902C000E1D17 /* threads.h */; }; FA0B7ECB1A95902C000E1D17 /* wrap_Channel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7CB11A95902C000E1D17 /* wrap_Channel.cpp */; }; FA0B7ECC1A95902C000E1D17 /* wrap_Channel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7CB11A95902C000E1D17 /* wrap_Channel.cpp */; }; FA0B7ECD1A95902C000E1D17 /* wrap_Channel.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7CB21A95902C000E1D17 /* wrap_Channel.h */; }; FA0B7ECE1A95902C000E1D17 /* wrap_LuaThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7CB31A95902C000E1D17 /* wrap_LuaThread.cpp */; }; FA0B7ECF1A95902C000E1D17 /* wrap_LuaThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7CB31A95902C000E1D17 /* wrap_LuaThread.cpp */; }; FA0B7ED01A95902C000E1D17 /* wrap_LuaThread.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7CB41A95902C000E1D17 /* wrap_LuaThread.h */; }; FA0B7ED11A95902C000E1D17 /* wrap_ThreadModule.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7CB51A95902C000E1D17 /* wrap_ThreadModule.cpp */; }; FA0B7ED21A95902C000E1D17 /* wrap_ThreadModule.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7CB51A95902C000E1D17 /* wrap_ThreadModule.cpp */; }; FA0B7ED31A95902C000E1D17 /* wrap_ThreadModule.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7CB61A95902C000E1D17 /* wrap_ThreadModule.h */; }; FA0B7ED71A95902D000E1D17 /* Timer.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7CBB1A95902C000E1D17 /* Timer.h */; }; FA0B7ED81A95902D000E1D17 /* wrap_Timer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7CBC1A95902C000E1D17 /* wrap_Timer.cpp */; }; FA0B7ED91A95902D000E1D17 /* wrap_Timer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7CBC1A95902C000E1D17 /* wrap_Timer.cpp */; }; FA0B7EDA1A95902D000E1D17 /* wrap_Timer.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7CBD1A95902C000E1D17 /* wrap_Timer.h */; }; FA0B7EDB1A95902D000E1D17 /* Touch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7CC01A95902C000E1D17 /* Touch.cpp */; }; FA0B7EDC1A95902D000E1D17 /* Touch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7CC01A95902C000E1D17 /* Touch.cpp */; }; FA0B7EDD1A95902D000E1D17 /* Touch.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7CC11A95902C000E1D17 /* Touch.h */; }; FA0B7EDE1A95902D000E1D17 /* Touch.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7CC21A95902C000E1D17 /* Touch.h */; }; FA0B7EDF1A95902D000E1D17 /* wrap_Touch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7CC31A95902C000E1D17 /* wrap_Touch.cpp */; }; FA0B7EE01A95902D000E1D17 /* wrap_Touch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7CC31A95902C000E1D17 /* wrap_Touch.cpp */; }; FA0B7EE11A95902D000E1D17 /* wrap_Touch.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7CC41A95902C000E1D17 /* wrap_Touch.h */; }; FA0B7EE21A95902D000E1D17 /* Window.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7CC71A95902C000E1D17 /* Window.cpp */; }; FA0B7EE31A95902D000E1D17 /* Window.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7CC71A95902C000E1D17 /* Window.cpp */; }; FA0B7EE41A95902D000E1D17 /* Window.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7CC81A95902C000E1D17 /* Window.h */; }; FA0B7EE51A95902D000E1D17 /* Window.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7CC91A95902C000E1D17 /* Window.cpp */; }; FA0B7EE61A95902D000E1D17 /* Window.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7CC91A95902C000E1D17 /* Window.cpp */; }; FA0B7EE71A95902D000E1D17 /* Window.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7CCA1A95902C000E1D17 /* Window.h */; }; FA0B7EE81A95902D000E1D17 /* wrap_Window.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7CCB1A95902C000E1D17 /* wrap_Window.cpp */; }; FA0B7EE91A95902D000E1D17 /* wrap_Window.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7CCB1A95902C000E1D17 /* wrap_Window.cpp */; }; FA0B7EEA1A95902D000E1D17 /* wrap_Window.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7CCC1A95902C000E1D17 /* wrap_Window.h */; }; FA0B7EF21A959D2C000E1D17 /* ios.mm in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7EF11A959D2C000E1D17 /* ios.mm */; }; FA1557C01CE90A2C00AFF582 /* tinyexr.h in Headers */ = {isa = PBXBuildFile; fileRef = FA1557BF1CE90A2C00AFF582 /* tinyexr.h */; }; FA1557C31CE90BD200AFF582 /* EXRHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA1557C11CE90BD200AFF582 /* EXRHandler.cpp */; }; FA1557C41CE90BD200AFF582 /* EXRHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = FA1557C21CE90BD200AFF582 /* EXRHandler.h */; }; FA1557C51CE90BD900AFF582 /* EXRHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA1557C11CE90BD200AFF582 /* EXRHandler.cpp */; }; FA1583E21E196180005E603B /* wrap_Shader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA1BA0B51E17043400AA2803 /* wrap_Shader.cpp */; }; FA15DFAC1F9B8C850042AB22 /* StringMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA15DFAB1F9B8C850042AB22 /* StringMap.cpp */; }; FA15DFAD1F9B8CBA0042AB22 /* StringMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA15DFAB1F9B8C850042AB22 /* StringMap.cpp */; }; FA15DFAE1F9B8D360042AB22 /* lutf8lib.c in Sources */ = {isa = PBXBuildFile; fileRef = FAAA3FD61F64B3AD00F89E99 /* lutf8lib.c */; }; FA15DFAF1F9B8D390042AB22 /* lstrlib.c in Sources */ = {isa = PBXBuildFile; fileRef = FAAA3FD41F64B3AD00F89E99 /* lstrlib.c */; }; FA15DFB01F9B8D6A0042AB22 /* wrap_Data.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA6A2B651F5F7B6B0074C308 /* wrap_Data.cpp */; }; FA15DFB11F9B8D820042AB22 /* OggDemuxer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAA54AC91F91660400A8FA7B /* OggDemuxer.cpp */; }; FA15DFB21F9B8D840042AB22 /* TheoraVideoStream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAA54AC81F91660400A8FA7B /* TheoraVideoStream.cpp */; }; FA18CEC523D3AE6700263725 /* wrap_Buffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA18CEC323D3AE6700263725 /* wrap_Buffer.cpp */; }; FA18CEC623D3AE6800263725 /* wrap_Buffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA18CEC323D3AE6700263725 /* wrap_Buffer.cpp */; }; FA18CEC723D3AE6800263725 /* wrap_Buffer.h in Headers */ = {isa = PBXBuildFile; fileRef = FA18CEC423D3AE6700263725 /* wrap_Buffer.h */; }; FA18CED723DBC6E000263725 /* Shader.h in Headers */ = {isa = PBXBuildFile; fileRef = FA18CECD23DBC6E000263725 /* Shader.h */; }; FA18CED823DBC6E000263725 /* StreamBuffer.mm in Sources */ = {isa = PBXBuildFile; fileRef = FA18CECE23DBC6E000263725 /* StreamBuffer.mm */; }; FA18CED923DBC6E000263725 /* StreamBuffer.mm in Sources */ = {isa = PBXBuildFile; fileRef = FA18CECE23DBC6E000263725 /* StreamBuffer.mm */; }; FA18CEDC23DBC6E000263725 /* Metal.mm in Sources */ = {isa = PBXBuildFile; fileRef = FA18CED023DBC6E000263725 /* Metal.mm */; }; FA18CEDD23DBC6E000263725 /* Metal.mm in Sources */ = {isa = PBXBuildFile; fileRef = FA18CED023DBC6E000263725 /* Metal.mm */; }; FA18CEDE23DBC6E000263725 /* Shader.mm in Sources */ = {isa = PBXBuildFile; fileRef = FA18CED123DBC6E000263725 /* Shader.mm */; }; FA18CEDF23DBC6E000263725 /* Shader.mm in Sources */ = {isa = PBXBuildFile; fileRef = FA18CED123DBC6E000263725 /* Shader.mm */; }; FA18CEE023DBC6E000263725 /* StreamBuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = FA18CED223DBC6E000263725 /* StreamBuffer.h */; }; FA18CEE123DBC6E000263725 /* Graphics.mm in Sources */ = {isa = PBXBuildFile; fileRef = FA18CED323DBC6E000263725 /* Graphics.mm */; }; FA18CEE223DBC6E000263725 /* Graphics.mm in Sources */ = {isa = PBXBuildFile; fileRef = FA18CED323DBC6E000263725 /* Graphics.mm */; }; FA18CEE323DBC6E000263725 /* Metal.h in Headers */ = {isa = PBXBuildFile; fileRef = FA18CED423DBC6E000263725 /* Metal.h */; }; FA18CEE423DBC6E000263725 /* Graphics.h in Headers */ = {isa = PBXBuildFile; fileRef = FA18CED523DBC6E000263725 /* Graphics.h */; }; FA18CEE723DBC6F700263725 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA18CEE623DBC6F700263725 /* Metal.framework */; }; FA18CEE923DBC8D400263725 /* Buffer.mm in Sources */ = {isa = PBXBuildFile; fileRef = FA18CEE823DBC8D400263725 /* Buffer.mm */; }; FA18CEEA23DBC8D400263725 /* Buffer.mm in Sources */ = {isa = PBXBuildFile; fileRef = FA18CEE823DBC8D400263725 /* Buffer.mm */; }; FA18CEEF23DC9B3E00263725 /* Texture.mm in Sources */ = {isa = PBXBuildFile; fileRef = FA18CEED23DC9B3E00263725 /* Texture.mm */; }; FA18CEF023DC9B3E00263725 /* Texture.mm in Sources */ = {isa = PBXBuildFile; fileRef = FA18CEED23DC9B3E00263725 /* Texture.mm */; }; FA18CF1623DCF67900263725 /* spirv_parser.hpp in Headers */ = {isa = PBXBuildFile; fileRef = FA18CEF223DCF67800263725 /* spirv_parser.hpp */; }; FA18CF1723DCF67900263725 /* spirv_glsl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA18CEF323DCF67800263725 /* spirv_glsl.cpp */; }; FA18CF1823DCF67900263725 /* spirv_glsl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA18CEF323DCF67800263725 /* spirv_glsl.cpp */; }; FA18CF1923DCF67900263725 /* spirv_cross_error_handling.hpp in Headers */ = {isa = PBXBuildFile; fileRef = FA18CEF423DCF67800263725 /* spirv_cross_error_handling.hpp */; }; FA18CF1A23DCF67900263725 /* barrier.hpp in Headers */ = {isa = PBXBuildFile; fileRef = FA18CEF723DCF67800263725 /* barrier.hpp */; }; FA18CF1B23DCF67900263725 /* thread_group.hpp in Headers */ = {isa = PBXBuildFile; fileRef = FA18CEF823DCF67800263725 /* thread_group.hpp */; }; FA18CF1C23DCF67900263725 /* internal_interface.hpp in Headers */ = {isa = PBXBuildFile; fileRef = FA18CEF923DCF67800263725 /* internal_interface.hpp */; }; FA18CF1D23DCF67900263725 /* sampler.hpp in Headers */ = {isa = PBXBuildFile; fileRef = FA18CEFA23DCF67800263725 /* sampler.hpp */; }; FA18CF1E23DCF67900263725 /* external_interface.h in Headers */ = {isa = PBXBuildFile; fileRef = FA18CEFB23DCF67800263725 /* external_interface.h */; }; FA18CF2023DCF67900263725 /* spirv_hlsl.hpp in Headers */ = {isa = PBXBuildFile; fileRef = FA18CEFD23DCF67800263725 /* spirv_hlsl.hpp */; }; FA18CF2123DCF67900263725 /* spirv.hpp in Headers */ = {isa = PBXBuildFile; fileRef = FA18CEFE23DCF67800263725 /* spirv.hpp */; }; FA18CF2223DCF67900263725 /* spirv_cfg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA18CEFF23DCF67800263725 /* spirv_cfg.cpp */; }; FA18CF2323DCF67900263725 /* spirv_cfg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA18CEFF23DCF67800263725 /* spirv_cfg.cpp */; }; FA18CF2423DCF67900263725 /* spirv_cpp.hpp in Headers */ = {isa = PBXBuildFile; fileRef = FA18CF0023DCF67800263725 /* spirv_cpp.hpp */; }; FA18CF2523DCF67900263725 /* spirv_cross_parsed_ir.hpp in Headers */ = {isa = PBXBuildFile; fileRef = FA18CF0123DCF67800263725 /* spirv_cross_parsed_ir.hpp */; }; FA18CF2623DCF67900263725 /* spirv_reflect.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA18CF0223DCF67800263725 /* spirv_reflect.cpp */; }; FA18CF2723DCF67900263725 /* spirv_reflect.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA18CF0223DCF67800263725 /* spirv_reflect.cpp */; }; FA18CF2823DCF67900263725 /* spirv_msl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA18CF0323DCF67800263725 /* spirv_msl.cpp */; }; FA18CF2923DCF67900263725 /* spirv_msl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA18CF0323DCF67800263725 /* spirv_msl.cpp */; }; FA18CF2A23DCF67900263725 /* spirv_cross_util.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA18CF0423DCF67800263725 /* spirv_cross_util.cpp */; }; FA18CF2B23DCF67900263725 /* spirv_cross_util.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA18CF0423DCF67800263725 /* spirv_cross_util.cpp */; }; FA18CF2C23DCF67900263725 /* spirv_cross.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA18CF0523DCF67800263725 /* spirv_cross.cpp */; }; FA18CF2D23DCF67900263725 /* spirv_cross.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA18CF0523DCF67800263725 /* spirv_cross.cpp */; }; FA18CF3023DCF67900263725 /* spirv_hlsl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA18CF0723DCF67800263725 /* spirv_hlsl.cpp */; }; FA18CF3123DCF67900263725 /* spirv_hlsl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA18CF0723DCF67800263725 /* spirv_hlsl.cpp */; }; FA18CF3223DCF67900263725 /* spirv_cfg.hpp in Headers */ = {isa = PBXBuildFile; fileRef = FA18CF0823DCF67800263725 /* spirv_cfg.hpp */; }; FA18CF3323DCF67900263725 /* spirv_cpp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA18CF0923DCF67800263725 /* spirv_cpp.cpp */; }; FA18CF3423DCF67900263725 /* spirv_cpp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA18CF0923DCF67800263725 /* spirv_cpp.cpp */; }; FA18CF3523DCF67900263725 /* spirv_cross_parsed_ir.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA18CF0A23DCF67800263725 /* spirv_cross_parsed_ir.cpp */; }; FA18CF3623DCF67900263725 /* spirv_cross_parsed_ir.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA18CF0A23DCF67800263725 /* spirv_cross_parsed_ir.cpp */; }; FA18CF3923DCF67900263725 /* spirv_msl.hpp in Headers */ = {isa = PBXBuildFile; fileRef = FA18CF0D23DCF67800263725 /* spirv_msl.hpp */; }; FA18CF3A23DCF67900263725 /* spirv_reflect.hpp in Headers */ = {isa = PBXBuildFile; fileRef = FA18CF0E23DCF67800263725 /* spirv_reflect.hpp */; }; FA18CF3B23DCF67900263725 /* spirv_cross_util.hpp in Headers */ = {isa = PBXBuildFile; fileRef = FA18CF0F23DCF67800263725 /* spirv_cross_util.hpp */; }; FA18CF3C23DCF67900263725 /* spirv_cross.hpp in Headers */ = {isa = PBXBuildFile; fileRef = FA18CF1023DCF67800263725 /* spirv_cross.hpp */; }; FA18CF3D23DCF67900263725 /* GLSL.std.450.h in Headers */ = {isa = PBXBuildFile; fileRef = FA18CF1123DCF67800263725 /* GLSL.std.450.h */; }; FA18CF3E23DCF67900263725 /* spirv_cross_containers.hpp in Headers */ = {isa = PBXBuildFile; fileRef = FA18CF1223DCF67800263725 /* spirv_cross_containers.hpp */; }; FA18CF3F23DCF67900263725 /* spirv_parser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA18CF1323DCF67800263725 /* spirv_parser.cpp */; }; FA18CF4023DCF67900263725 /* spirv_parser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA18CF1323DCF67800263725 /* spirv_parser.cpp */; }; FA18CF4123DCF67900263725 /* spirv_common.hpp in Headers */ = {isa = PBXBuildFile; fileRef = FA18CF1423DCF67800263725 /* spirv_common.hpp */; }; FA18CF4223DCF67900263725 /* spirv_glsl.hpp in Headers */ = {isa = PBXBuildFile; fileRef = FA18CF1523DCF67800263725 /* spirv_glsl.hpp */; }; FA18CF4523DD1A8100263725 /* ShaderStage.h in Headers */ = {isa = PBXBuildFile; fileRef = FA18CF4323DD1A8000263725 /* ShaderStage.h */; }; FA18CF4623DD1A8100263725 /* ShaderStage.mm in Sources */ = {isa = PBXBuildFile; fileRef = FA18CF4423DD1A8000263725 /* ShaderStage.mm */; }; FA18CF4723DD1A8100263725 /* ShaderStage.mm in Sources */ = {isa = PBXBuildFile; fileRef = FA18CF4423DD1A8000263725 /* ShaderStage.mm */; }; FA1BA09D1E16CFCE00AA2803 /* Font.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA1BA09B1E16CFCE00AA2803 /* Font.cpp */; }; FA1BA09E1E16CFCE00AA2803 /* Font.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA1BA09B1E16CFCE00AA2803 /* Font.cpp */; }; FA1BA09F1E16CFCE00AA2803 /* Font.h in Headers */ = {isa = PBXBuildFile; fileRef = FA1BA09C1E16CFCE00AA2803 /* Font.h */; }; FA1BA0A21E16D97500AA2803 /* wrap_Font.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA1BA0A01E16D97500AA2803 /* wrap_Font.cpp */; }; FA1BA0A31E16D97500AA2803 /* wrap_Font.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA1BA0A01E16D97500AA2803 /* wrap_Font.cpp */; }; FA1BA0A41E16D97500AA2803 /* wrap_Font.h in Headers */ = {isa = PBXBuildFile; fileRef = FA1BA0A11E16D97500AA2803 /* wrap_Font.h */; }; FA1BA0B11E16FD0800AA2803 /* Shader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA1BA0AF1E16FD0800AA2803 /* Shader.cpp */; }; FA1BA0B21E16FD0800AA2803 /* Shader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA1BA0AF1E16FD0800AA2803 /* Shader.cpp */; }; FA1BA0B31E16FD0800AA2803 /* Shader.h in Headers */ = {isa = PBXBuildFile; fileRef = FA1BA0B01E16FD0800AA2803 /* Shader.h */; }; FA1BA0B71E17043400AA2803 /* wrap_Shader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA1BA0B51E17043400AA2803 /* wrap_Shader.cpp */; }; FA1BA0B81E17043400AA2803 /* wrap_Shader.h in Headers */ = {isa = PBXBuildFile; fileRef = FA1BA0B61E17043400AA2803 /* wrap_Shader.h */; }; FA1E887E1DF363CD00E808AA /* Filter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA1E887C1DF363CD00E808AA /* Filter.cpp */; }; FA1E887F1DF363CD00E808AA /* Filter.h in Headers */ = {isa = PBXBuildFile; fileRef = FA1E887D1DF363CD00E808AA /* Filter.h */; }; FA1E88801DF363D400E808AA /* Filter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA1E887C1DF363CD00E808AA /* Filter.cpp */; }; FA1E88831DF363DB00E808AA /* Filter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA1E88811DF363DB00E808AA /* Filter.cpp */; }; FA1E88841DF363DB00E808AA /* Filter.h in Headers */ = {isa = PBXBuildFile; fileRef = FA1E88821DF363DB00E808AA /* Filter.h */; }; FA1E88851DF363E100E808AA /* Filter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA1E88811DF363DB00E808AA /* Filter.cpp */; }; FA24348621D401CB00B8918A /* attribute.h in Headers */ = {isa = PBXBuildFile; fileRef = FA24348121D401CB00B8918A /* attribute.h */; }; FA24348721D401CB00B8918A /* attribute.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA24348221D401CB00B8918A /* attribute.cpp */; }; FA24348821D401CB00B8918A /* attribute.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA24348221D401CB00B8918A /* attribute.cpp */; }; FA24348921D401CB00B8918A /* pch.h in Headers */ = {isa = PBXBuildFile; fileRef = FA24348321D401CB00B8918A /* pch.h */; }; FA27B39D1B498151008A9DCE /* Video.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA27B38A1B498151008A9DCE /* Video.cpp */; }; FA27B39E1B498151008A9DCE /* Video.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA27B38A1B498151008A9DCE /* Video.cpp */; }; FA27B39F1B498151008A9DCE /* Video.h in Headers */ = {isa = PBXBuildFile; fileRef = FA27B38B1B498151008A9DCE /* Video.h */; }; FA27B3A91B498151008A9DCE /* Video.h in Headers */ = {isa = PBXBuildFile; fileRef = FA27B3931B498151008A9DCE /* Video.h */; }; FA27B3AA1B498151008A9DCE /* VideoStream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA27B3941B498151008A9DCE /* VideoStream.cpp */; }; FA27B3AB1B498151008A9DCE /* VideoStream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA27B3941B498151008A9DCE /* VideoStream.cpp */; }; FA27B3AC1B498151008A9DCE /* VideoStream.h in Headers */ = {isa = PBXBuildFile; fileRef = FA27B3951B498151008A9DCE /* VideoStream.h */; }; FA27B3B31B498151008A9DCE /* wrap_Video.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA27B39B1B498151008A9DCE /* wrap_Video.cpp */; }; FA27B3B41B498151008A9DCE /* wrap_Video.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA27B39B1B498151008A9DCE /* wrap_Video.cpp */; }; FA27B3B51B498151008A9DCE /* wrap_Video.h in Headers */ = {isa = PBXBuildFile; fileRef = FA27B39C1B498151008A9DCE /* wrap_Video.h */; }; FA27B3C01B4985BF008A9DCE /* wrap_VideoStream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA27B3B91B4985BF008A9DCE /* wrap_VideoStream.cpp */; }; FA27B3C11B4985BF008A9DCE /* wrap_VideoStream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA27B3B91B4985BF008A9DCE /* wrap_VideoStream.cpp */; }; FA27B3C21B4985BF008A9DCE /* wrap_VideoStream.h in Headers */ = {isa = PBXBuildFile; fileRef = FA27B3BA1B4985BF008A9DCE /* wrap_VideoStream.h */; }; FA27B3C91B498623008A9DCE /* theora.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA27B3C81B498623008A9DCE /* theora.framework */; }; FA28EBD51E352DB5003446F4 /* FenceSync.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA28EBD31E352DB5003446F4 /* FenceSync.cpp */; }; FA28EBD61E352DB5003446F4 /* FenceSync.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA28EBD31E352DB5003446F4 /* FenceSync.cpp */; }; FA28EBD71E352DB5003446F4 /* FenceSync.h in Headers */ = {isa = PBXBuildFile; fileRef = FA28EBD41E352DB5003446F4 /* FenceSync.h */; }; FA29C0051E12355B00268CD8 /* StreamBuffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA29C0041E12355B00268CD8 /* StreamBuffer.cpp */; }; FA29C0061E12355B00268CD8 /* StreamBuffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA29C0041E12355B00268CD8 /* StreamBuffer.cpp */; }; FA2AF6741DAD64970032B62C /* vertex.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA2AF6731DAD64970032B62C /* vertex.cpp */; }; FA2AF6751DAD64970032B62C /* vertex.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA2AF6731DAD64970032B62C /* vertex.cpp */; }; FA3C5E421F8C368C0003C579 /* ShaderStage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA3C5E401F8C368C0003C579 /* ShaderStage.cpp */; }; FA3C5E431F8C368C0003C579 /* ShaderStage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA3C5E401F8C368C0003C579 /* ShaderStage.cpp */; }; FA3C5E441F8C368C0003C579 /* ShaderStage.h in Headers */ = {isa = PBXBuildFile; fileRef = FA3C5E411F8C368C0003C579 /* ShaderStage.h */; }; FA3C5E471F8D80CA0003C579 /* ShaderStage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA3C5E451F8D80CA0003C579 /* ShaderStage.cpp */; }; FA3C5E481F8D80CA0003C579 /* ShaderStage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA3C5E451F8D80CA0003C579 /* ShaderStage.cpp */; }; FA3C5E491F8D80CA0003C579 /* ShaderStage.h in Headers */ = {isa = PBXBuildFile; fileRef = FA3C5E461F8D80CA0003C579 /* ShaderStage.h */; }; FA41A3C81C0A1F950084430C /* ASTCHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA41A3C61C0A1F950084430C /* ASTCHandler.cpp */; }; FA41A3C91C0A1F950084430C /* ASTCHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA41A3C61C0A1F950084430C /* ASTCHandler.cpp */; }; FA41A3CA1C0A1F950084430C /* ASTCHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = FA41A3C71C0A1F950084430C /* ASTCHandler.h */; }; FA4B66C91ABBCF1900558F15 /* Timer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA4B66C81ABBCF1900558F15 /* Timer.cpp */; }; FA4B66CA1ABBCF1900558F15 /* Timer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA4B66C81ABBCF1900558F15 /* Timer.cpp */; }; FA4F2B791DE0125B00CA37D7 /* xxhash.c in Sources */ = {isa = PBXBuildFile; fileRef = FA4F2B771DE0125B00CA37D7 /* xxhash.c */; }; FA4F2B7A1DE0125B00CA37D7 /* xxhash.h in Headers */ = {isa = PBXBuildFile; fileRef = FA4F2B781DE0125B00CA37D7 /* xxhash.h */; }; FA4F2B7B1DE0181B00CA37D7 /* xxhash.c in Sources */ = {isa = PBXBuildFile; fileRef = FA4F2B771DE0125B00CA37D7 /* xxhash.c */; }; FA4F2BA61DE1E36400CA37D7 /* RecordingDevice.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA4F2BA21DE1E36400CA37D7 /* RecordingDevice.cpp */; }; FA4F2BA71DE1E36400CA37D7 /* RecordingDevice.h in Headers */ = {isa = PBXBuildFile; fileRef = FA4F2BA31DE1E36400CA37D7 /* RecordingDevice.h */; }; FA4F2BA81DE1E36400CA37D7 /* wrap_RecordingDevice.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA4F2BA41DE1E36400CA37D7 /* wrap_RecordingDevice.cpp */; }; FA4F2BA91DE1E36400CA37D7 /* wrap_RecordingDevice.h in Headers */ = {isa = PBXBuildFile; fileRef = FA4F2BA51DE1E36400CA37D7 /* wrap_RecordingDevice.h */; }; FA4F2BAC1DE1E37000CA37D7 /* RecordingDevice.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA4F2BAA1DE1E37000CA37D7 /* RecordingDevice.cpp */; }; FA4F2BAD1DE1E37000CA37D7 /* RecordingDevice.h in Headers */ = {isa = PBXBuildFile; fileRef = FA4F2BAB1DE1E37000CA37D7 /* RecordingDevice.h */; }; FA4F2BB01DE1E37B00CA37D7 /* RecordingDevice.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA4F2BAE1DE1E37B00CA37D7 /* RecordingDevice.cpp */; }; FA4F2BB11DE1E37B00CA37D7 /* RecordingDevice.h in Headers */ = {isa = PBXBuildFile; fileRef = FA4F2BAF1DE1E37B00CA37D7 /* RecordingDevice.h */; }; FA4F2BB21DE1E4B400CA37D7 /* RecordingDevice.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA4F2BAE1DE1E37B00CA37D7 /* RecordingDevice.cpp */; }; FA4F2BB31DE1E4B800CA37D7 /* RecordingDevice.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA4F2BA21DE1E36400CA37D7 /* RecordingDevice.cpp */; }; FA4F2BB41DE1E4BD00CA37D7 /* RecordingDevice.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA4F2BAA1DE1E37000CA37D7 /* RecordingDevice.cpp */; }; FA4F2BB51DE1E4C300CA37D7 /* wrap_RecordingDevice.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA4F2BA41DE1E36400CA37D7 /* wrap_RecordingDevice.cpp */; }; FA4F2BE31DE6650600CA37D7 /* Transform.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA4F2BDF1DE6650600CA37D7 /* Transform.cpp */; }; FA4F2BE41DE6650600CA37D7 /* Transform.h in Headers */ = {isa = PBXBuildFile; fileRef = FA4F2BE01DE6650600CA37D7 /* Transform.h */; }; FA4F2BE51DE6650600CA37D7 /* wrap_Transform.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA4F2BE11DE6650600CA37D7 /* wrap_Transform.cpp */; }; FA4F2BE61DE6650600CA37D7 /* wrap_Transform.h in Headers */ = {isa = PBXBuildFile; fileRef = FA4F2BE21DE6650600CA37D7 /* wrap_Transform.h */; }; FA4F2BE71DE6650D00CA37D7 /* Transform.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA4F2BDF1DE6650600CA37D7 /* Transform.cpp */; }; FA4F2BE81DE6651000CA37D7 /* wrap_Transform.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA4F2BE11DE6650600CA37D7 /* wrap_Transform.cpp */; }; FA4F2C031DE936C200CA37D7 /* auxiliar.c in Sources */ = {isa = PBXBuildFile; fileRef = 217DFB9D1D9F6D490055D849 /* auxiliar.c */; }; FA4F2C041DE936C600CA37D7 /* buffer.c in Sources */ = {isa = PBXBuildFile; fileRef = 217DFB9F1D9F6D490055D849 /* buffer.c */; }; FA4F2C051DE936C900CA37D7 /* compat.c in Sources */ = {isa = PBXBuildFile; fileRef = 217DFBA11D9F6D490055D849 /* compat.c */; }; FA4F2C061DE936CD00CA37D7 /* except.c in Sources */ = {isa = PBXBuildFile; fileRef = 217DFBA31D9F6D490055D849 /* except.c */; }; FA4F2C071DE936DA00CA37D7 /* inet.c in Sources */ = {isa = PBXBuildFile; fileRef = 217DFBAB1D9F6D490055D849 /* inet.c */; }; FA4F2C081DE936DD00CA37D7 /* io.c in Sources */ = {isa = PBXBuildFile; fileRef = 217DFBAD1D9F6D490055D849 /* io.c */; }; FA4F2C091DE936E200CA37D7 /* luasocket.c in Sources */ = {isa = PBXBuildFile; fileRef = 217DFBB11D9F6D490055D849 /* luasocket.c */; }; FA4F2C0A1DE936E600CA37D7 /* mime.c in Sources */ = {isa = PBXBuildFile; fileRef = 217DFBB61D9F6D490055D849 /* mime.c */; }; FA4F2C0B1DE936EA00CA37D7 /* options.c in Sources */ = {isa = PBXBuildFile; fileRef = 217DFBBA1D9F6D490055D849 /* options.c */; }; FA4F2C0C1DE936ED00CA37D7 /* select.c in Sources */ = {isa = PBXBuildFile; fileRef = 217DFBBD1D9F6D490055D849 /* select.c */; }; FA4F2C0D1DE936F100CA37D7 /* serial.c in Sources */ = {isa = PBXBuildFile; fileRef = 217DFBBF1D9F6D490055D849 /* serial.c */; }; FA4F2C0E1DE936FE00CA37D7 /* tcp.c in Sources */ = {isa = PBXBuildFile; fileRef = 217DFBC51D9F6D490055D849 /* tcp.c */; }; FA4F2C0F1DE936FE00CA37D7 /* timeout.c in Sources */ = {isa = PBXBuildFile; fileRef = 217DFBC71D9F6D490055D849 /* timeout.c */; }; FA4F2C101DE936FE00CA37D7 /* udp.c in Sources */ = {isa = PBXBuildFile; fileRef = 217DFBCB1D9F6D490055D849 /* udp.c */; }; FA4F2C111DE936FE00CA37D7 /* unix.c in Sources */ = {isa = PBXBuildFile; fileRef = 217DFBCD1D9F6D490055D849 /* unix.c */; }; FA4F2C141DE936FE00CA37D7 /* usocket.c in Sources */ = {isa = PBXBuildFile; fileRef = 217DFBD51D9F6D490055D849 /* usocket.c */; }; FA522D4D23F9FE380059EE3C /* MP3Decoder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA522D4B23F9FE370059EE3C /* MP3Decoder.cpp */; }; FA522D4E23F9FE380059EE3C /* MP3Decoder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA522D4B23F9FE370059EE3C /* MP3Decoder.cpp */; }; FA522D4F23F9FE380059EE3C /* MP3Decoder.h in Headers */ = {isa = PBXBuildFile; fileRef = FA522D4C23F9FE380059EE3C /* MP3Decoder.h */; }; FA522D5323F9FF2A0059EE3C /* dr_mp3.h in Headers */ = {isa = PBXBuildFile; fileRef = FA522D5123F9FF2A0059EE3C /* dr_mp3.h */; }; FA522D5423F9FF2A0059EE3C /* dr_flac.h in Headers */ = {isa = PBXBuildFile; fileRef = FA522D5223F9FF2A0059EE3C /* dr_flac.h */; }; FA522D5A23FA5ED50059EE3C /* NotoSans-Regular.ttf.gzip.h in Headers */ = {isa = PBXBuildFile; fileRef = FA522D5923FA5ED40059EE3C /* NotoSans-Regular.ttf.gzip.h */; }; FA56AA381FAFF02000A43D5F /* memory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA56AA361FAFF02000A43D5F /* memory.cpp */; }; FA56AA391FAFF02000A43D5F /* memory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA56AA361FAFF02000A43D5F /* memory.cpp */; }; FA56AA3A1FAFF02000A43D5F /* memory.h in Headers */ = {isa = PBXBuildFile; fileRef = FA56AA371FAFF02000A43D5F /* memory.h */; }; FA577AB016C7507900860150 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA577A7916C71A1700860150 /* Cocoa.framework */; }; FA577AC516C7513400860150 /* libmodplug.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA577A8216C71A5300860150 /* libmodplug.framework */; }; FA577AC816C7513C00860150 /* ogg.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA577A7116C719F400860150 /* ogg.framework */; }; FA577ACA16C7514100860150 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA577A7C16C71A2600860150 /* OpenGL.framework */; }; FA577ACD16C7514C00860150 /* vorbis.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA577A7716C71A0800860150 /* vorbis.framework */; }; FA57FB981AE1993600F2AD6D /* noise1234.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA57FB961AE1993600F2AD6D /* noise1234.cpp */; }; FA57FB991AE1993600F2AD6D /* noise1234.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA57FB961AE1993600F2AD6D /* noise1234.cpp */; }; FA57FB9A1AE1993600F2AD6D /* noise1234.h in Headers */ = {isa = PBXBuildFile; fileRef = FA57FB971AE1993600F2AD6D /* noise1234.h */; }; FA59A2D31C06481400328DBA /* ParticleSystem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAE272501C05A15B00A67640 /* ParticleSystem.cpp */; }; FA620A321AA2F8DB005DB4C2 /* wrap_Quad.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA620A2E1AA2F8DB005DB4C2 /* wrap_Quad.cpp */; }; FA620A331AA2F8DB005DB4C2 /* wrap_Quad.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA620A2E1AA2F8DB005DB4C2 /* wrap_Quad.cpp */; }; FA620A341AA2F8DB005DB4C2 /* wrap_Quad.h in Headers */ = {isa = PBXBuildFile; fileRef = FA620A2F1AA2F8DB005DB4C2 /* wrap_Quad.h */; }; FA620A351AA2F8DB005DB4C2 /* wrap_Texture.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA620A301AA2F8DB005DB4C2 /* wrap_Texture.cpp */; }; FA620A361AA2F8DB005DB4C2 /* wrap_Texture.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA620A301AA2F8DB005DB4C2 /* wrap_Texture.cpp */; }; FA620A371AA2F8DB005DB4C2 /* wrap_Texture.h in Headers */ = {isa = PBXBuildFile; fileRef = FA620A311AA2F8DB005DB4C2 /* wrap_Texture.h */; }; FA620A3A1AA305F6005DB4C2 /* types.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA620A391AA305F6005DB4C2 /* types.cpp */; }; FA620A3B1AA305F6005DB4C2 /* types.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA620A391AA305F6005DB4C2 /* types.cpp */; }; FA6A2B661F5F7B6B0074C308 /* wrap_Data.h in Headers */ = {isa = PBXBuildFile; fileRef = FA6A2B641F5F7B6B0074C308 /* wrap_Data.h */; }; FA6A2B671F5F7B6B0074C308 /* wrap_Data.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA6A2B651F5F7B6B0074C308 /* wrap_Data.cpp */; }; FA6A2B6A1F5F7F560074C308 /* DataView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA6A2B681F5F7F560074C308 /* DataView.cpp */; }; FA6A2B6B1F5F7F560074C308 /* DataView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA6A2B681F5F7F560074C308 /* DataView.cpp */; }; FA6A2B6C1F5F7F560074C308 /* DataView.h in Headers */ = {isa = PBXBuildFile; fileRef = FA6A2B691F5F7F560074C308 /* DataView.h */; }; FA6A2B6F1F5F845F0074C308 /* wrap_DataView.h in Headers */ = {isa = PBXBuildFile; fileRef = FA6A2B6D1F5F845F0074C308 /* wrap_DataView.h */; }; FA6A2B701F5F845F0074C308 /* wrap_DataView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA6A2B6E1F5F845F0074C308 /* wrap_DataView.cpp */; }; FA6A2B711F5F845F0074C308 /* wrap_DataView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA6A2B6E1F5F845F0074C308 /* wrap_DataView.cpp */; }; FA6A2B741F60B6710074C308 /* ByteData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA6A2B721F60B6710074C308 /* ByteData.cpp */; }; FA6A2B751F60B6710074C308 /* ByteData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA6A2B721F60B6710074C308 /* ByteData.cpp */; }; FA6A2B761F60B6710074C308 /* ByteData.h in Headers */ = {isa = PBXBuildFile; fileRef = FA6A2B731F60B6710074C308 /* ByteData.h */; }; FA6A2B791F60B8250074C308 /* wrap_ByteData.h in Headers */ = {isa = PBXBuildFile; fileRef = FA6A2B771F60B8250074C308 /* wrap_ByteData.h */; }; FA6A2B7A1F60B8250074C308 /* wrap_ByteData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA6A2B781F60B8250074C308 /* wrap_ByteData.cpp */; }; FA6A2B7B1F60B8250074C308 /* wrap_ByteData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA6A2B781F60B8250074C308 /* wrap_ByteData.cpp */; }; FA6BDE5C1F31725300786805 /* Color.h in Headers */ = {isa = PBXBuildFile; fileRef = FA6BDE5B1F31725300786805 /* Color.h */; }; FA6BDF89280B62A000240F2A /* GraphicsReadback.mm in Sources */ = {isa = PBXBuildFile; fileRef = FA6BDF88280B62A000240F2A /* GraphicsReadback.mm */; }; FA6BDF8A280B62A000240F2A /* GraphicsReadback.mm in Sources */ = {isa = PBXBuildFile; fileRef = FA6BDF88280B62A000240F2A /* GraphicsReadback.mm */; }; FA6BDF8E281219E900240F2A /* DataStream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA6BDF8C281219E900240F2A /* DataStream.cpp */; }; FA6BDF8F281219E900240F2A /* DataStream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA6BDF8C281219E900240F2A /* DataStream.cpp */; }; FA6BDF90281219E900240F2A /* DataStream.h in Headers */ = {isa = PBXBuildFile; fileRef = FA6BDF8D281219E900240F2A /* DataStream.h */; }; FA76344A1E28722A0066EF9E /* StreamBuffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA7634481E28722A0066EF9E /* StreamBuffer.cpp */; }; FA76344B1E28722A0066EF9E /* StreamBuffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA7634481E28722A0066EF9E /* StreamBuffer.cpp */; }; FA76344C1E28722A0066EF9E /* StreamBuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = FA7634491E28722A0066EF9E /* StreamBuffer.h */; }; FA7E9207277E120900C24CB2 /* theora.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA7E9206277E120900C24CB2 /* theora.xcframework */; }; FA84DE612778D7F3002674C6 /* SpirvIntrinsics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA84DE602778D7F3002674C6 /* SpirvIntrinsics.cpp */; }; FA84DE622778D7F3002674C6 /* SpirvIntrinsics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA84DE602778D7F3002674C6 /* SpirvIntrinsics.cpp */; }; FA84DE6627791C36002674C6 /* GraphicsReadback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA84DE6427791C36002674C6 /* GraphicsReadback.cpp */; }; FA84DE6727791C36002674C6 /* GraphicsReadback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA84DE6427791C36002674C6 /* GraphicsReadback.cpp */; }; FA84DE6827791C36002674C6 /* GraphicsReadback.h in Headers */ = {isa = PBXBuildFile; fileRef = FA84DE6527791C36002674C6 /* GraphicsReadback.h */; }; FA84DE6B277943F6002674C6 /* GraphicsReadback.h in Headers */ = {isa = PBXBuildFile; fileRef = FA84DE69277943F6002674C6 /* GraphicsReadback.h */; }; FA84DE6C277943F6002674C6 /* GraphicsReadback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA84DE6A277943F6002674C6 /* GraphicsReadback.cpp */; }; FA84DE6D277943F6002674C6 /* GraphicsReadback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA84DE6A277943F6002674C6 /* GraphicsReadback.cpp */; }; FA84DE7127795E22002674C6 /* wrap_GraphicsReadback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA84DE6F27795E22002674C6 /* wrap_GraphicsReadback.cpp */; }; FA84DE7227795E22002674C6 /* wrap_GraphicsReadback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA84DE6F27795E22002674C6 /* wrap_GraphicsReadback.cpp */; }; FA84DE7A277D4C88002674C6 /* modplug.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA84DE79277D4C88002674C6 /* modplug.xcframework */; }; FA84DE7C277E045E002674C6 /* ogg.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA84DE7B277E045E002674C6 /* ogg.xcframework */; }; FA84DE7E277E0A43002674C6 /* vorbis.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA84DE7D277E0A43002674C6 /* vorbis.xcframework */; }; FA8951A21AA2EDF300EC385A /* wrap_Event.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA8951A01AA2EDF300EC385A /* wrap_Event.cpp */; }; FA8951A31AA2EDF300EC385A /* wrap_Event.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA8951A01AA2EDF300EC385A /* wrap_Event.cpp */; }; FA8951A41AA2EDF300EC385A /* wrap_Event.h in Headers */ = {isa = PBXBuildFile; fileRef = FA8951A11AA2EDF300EC385A /* wrap_Event.h */; }; FA91DA8B1F377C3900C80E33 /* deprecation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA91DA891F377C3900C80E33 /* deprecation.cpp */; }; FA91DA8C1F377C3900C80E33 /* deprecation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA91DA891F377C3900C80E33 /* deprecation.cpp */; }; FA91DA8D1F377C3900C80E33 /* deprecation.h in Headers */ = {isa = PBXBuildFile; fileRef = FA91DA8A1F377C3900C80E33 /* deprecation.h */; }; FA93C4531F315B960087CCD4 /* FormatHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = FA93C4501F315B960087CCD4 /* FormatHandler.h */; }; FA93C4541F315B960087CCD4 /* FormatHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA93C4511F315B960087CCD4 /* FormatHandler.cpp */; }; FA94727827A6EE1B00817677 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA94725227A6EE1B00817677 /* main.cpp */; }; FA94727927A6EE1B00817677 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA94725227A6EE1B00817677 /* main.cpp */; }; FA94727A27A6EE1B00817677 /* Connection.h in Headers */ = {isa = PBXBuildFile; fileRef = FA94725427A6EE1B00817677 /* Connection.h */; }; FA94727B27A6EE1B00817677 /* HTTPSClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA94725527A6EE1B00817677 /* HTTPSClient.cpp */; }; FA94727C27A6EE1B00817677 /* HTTPSClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA94725527A6EE1B00817677 /* HTTPSClient.cpp */; }; FA94727D27A6EE1B00817677 /* HTTPSClient.h in Headers */ = {isa = PBXBuildFile; fileRef = FA94725627A6EE1B00817677 /* HTTPSClient.h */; }; FA94727E27A6EE1B00817677 /* PlaintextConnection.h in Headers */ = {isa = PBXBuildFile; fileRef = FA94725727A6EE1B00817677 /* PlaintextConnection.h */; }; FA94727F27A6EE1B00817677 /* config.h in Headers */ = {isa = PBXBuildFile; fileRef = FA94725827A6EE1B00817677 /* config.h */; }; FA94728127A6EE1B00817677 /* HTTPS.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA94725A27A6EE1B00817677 /* HTTPS.cpp */; }; FA94728227A6EE1B00817677 /* HTTPS.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA94725A27A6EE1B00817677 /* HTTPS.cpp */; }; FA94728327A6EE1B00817677 /* HTTPRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = FA94725B27A6EE1B00817677 /* HTTPRequest.h */; }; FA94728427A6EE1B00817677 /* ConnectionClient.h in Headers */ = {isa = PBXBuildFile; fileRef = FA94725C27A6EE1B00817677 /* ConnectionClient.h */; }; FA94728527A6EE1B00817677 /* PlaintextConnection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA94725D27A6EE1B00817677 /* PlaintextConnection.cpp */; }; FA94728627A6EE1B00817677 /* PlaintextConnection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA94725D27A6EE1B00817677 /* PlaintextConnection.cpp */; }; FA94728727A6EE1B00817677 /* HTTPS.h in Headers */ = {isa = PBXBuildFile; fileRef = FA94725E27A6EE1B00817677 /* HTTPS.h */; }; FA94728827A6EE1B00817677 /* HTTPRequest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA94725F27A6EE1B00817677 /* HTTPRequest.cpp */; }; FA94728927A6EE1B00817677 /* HTTPRequest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA94725F27A6EE1B00817677 /* HTTPRequest.cpp */; }; FA94729B27A6F9AD00817677 /* NSURLClient.mm in Sources */ = {isa = PBXBuildFile; fileRef = FA94729927A6F9AC00817677 /* NSURLClient.mm */; }; FA94729C27A6F9AD00817677 /* NSURLClient.mm in Sources */ = {isa = PBXBuildFile; fileRef = FA94729927A6F9AC00817677 /* NSURLClient.mm */; }; FA94729D27A6F9AD00817677 /* NSURLClient.h in Headers */ = {isa = PBXBuildFile; fileRef = FA94729A27A6F9AC00817677 /* NSURLClient.h */; }; FA9D53AC1F5307E900125C6B /* Deprecations.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA9D53AA1F5307E900125C6B /* Deprecations.cpp */; }; FA9D53AD1F5307E900125C6B /* Deprecations.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA9D53AA1F5307E900125C6B /* Deprecations.cpp */; }; FA9D53AE1F5307E900125C6B /* Deprecations.h in Headers */ = {isa = PBXBuildFile; fileRef = FA9D53AB1F5307E900125C6B /* Deprecations.h */; }; FA9D8DD11DEB56C3002CD881 /* pixelformat.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA9D8DCF1DEB56C3002CD881 /* pixelformat.cpp */; }; FA9D8DD21DEB56C3002CD881 /* pixelformat.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA9D8DCF1DEB56C3002CD881 /* pixelformat.cpp */; }; FA9D8DD31DEB56C3002CD881 /* pixelformat.h in Headers */ = {isa = PBXBuildFile; fileRef = FA9D8DD01DEB56C3002CD881 /* pixelformat.h */; }; FA9D8DD71DEF8411002CD881 /* Data.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA9D8DD41DEF8411002CD881 /* Data.cpp */; }; FA9D8DD81DEF8411002CD881 /* Data.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA9D8DD41DEF8411002CD881 /* Data.cpp */; }; FA9D8DD91DEF8411002CD881 /* Stream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA9D8DD51DEF8411002CD881 /* Stream.cpp */; }; FA9D8DDA1DEF8411002CD881 /* Stream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA9D8DD51DEF8411002CD881 /* Stream.cpp */; }; FA9D8DDB1DEF8411002CD881 /* Stream.h in Headers */ = {isa = PBXBuildFile; fileRef = FA9D8DD61DEF8411002CD881 /* Stream.h */; }; FA9D8DDD1DEF842A002CD881 /* Drawable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA9D8DDC1DEF842A002CD881 /* Drawable.cpp */; }; FA9D8DDE1DEF842A002CD881 /* Drawable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA9D8DDC1DEF842A002CD881 /* Drawable.cpp */; }; FA9D8DE01DEF843D002CD881 /* Image.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA9D8DDF1DEF843D002CD881 /* Image.cpp */; }; FA9D8DE11DEF843D002CD881 /* Image.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA9D8DDF1DEF843D002CD881 /* Image.cpp */; }; FAA3A9AE1B7D465A00CED060 /* android.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAA3A9AC1B7D465A00CED060 /* android.cpp */; }; FAA3A9AF1B7D465A00CED060 /* android.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAA3A9AC1B7D465A00CED060 /* android.cpp */; }; FAA3A9B01B7D465A00CED060 /* android.h in Headers */ = {isa = PBXBuildFile; fileRef = FAA3A9AD1B7D465A00CED060 /* android.h */; }; FAA54ACA1F91660400A8FA7B /* OggDemuxer.h in Headers */ = {isa = PBXBuildFile; fileRef = FAA54AC61F91660400A8FA7B /* OggDemuxer.h */; }; FAA54ACB1F91660400A8FA7B /* TheoraVideoStream.h in Headers */ = {isa = PBXBuildFile; fileRef = FAA54AC71F91660400A8FA7B /* TheoraVideoStream.h */; }; FAA54ACC1F91660400A8FA7B /* TheoraVideoStream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAA54AC81F91660400A8FA7B /* TheoraVideoStream.cpp */; }; FAA54ACD1F91660400A8FA7B /* OggDemuxer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAA54AC91F91660400A8FA7B /* OggDemuxer.cpp */; }; FAA627CE18E7E1560080752D /* CoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FAA627CD18E7E1560080752D /* CoreServices.framework */; }; FAAA3FD81F64B3AD00F89E99 /* lprefix.h in Headers */ = {isa = PBXBuildFile; fileRef = FAAA3FD31F64B3AD00F89E99 /* lprefix.h */; }; FAAA3FD91F64B3AD00F89E99 /* lstrlib.c in Sources */ = {isa = PBXBuildFile; fileRef = FAAA3FD41F64B3AD00F89E99 /* lstrlib.c */; }; FAAA3FDA1F64B3AD00F89E99 /* lstrlib.h in Headers */ = {isa = PBXBuildFile; fileRef = FAAA3FD51F64B3AD00F89E99 /* lstrlib.h */; }; FAAA3FDB1F64B3AD00F89E99 /* lutf8lib.c in Sources */ = {isa = PBXBuildFile; fileRef = FAAA3FD61F64B3AD00F89E99 /* lutf8lib.c */; }; FAAA3FDC1F64B3AD00F89E99 /* lutf8lib.h in Headers */ = {isa = PBXBuildFile; fileRef = FAAA3FD71F64B3AD00F89E99 /* lutf8lib.h */; }; FAAC2F79251A9D2200BCB81B /* apple.mm in Sources */ = {isa = PBXBuildFile; fileRef = FAAC2F78251A9D2200BCB81B /* apple.mm */; }; FAAC2F7A251A9D2200BCB81B /* apple.mm in Sources */ = {isa = PBXBuildFile; fileRef = FAAC2F78251A9D2200BCB81B /* apple.mm */; }; FAAFF04416CB11C700CCDE45 /* OpenAL-Soft.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FAAFF04316CB11C700CCDE45 /* OpenAL-Soft.framework */; }; FAB17BE61ABFAA9000F9BA27 /* lz4.c in Sources */ = {isa = PBXBuildFile; fileRef = FAB17BE41ABFAA9000F9BA27 /* lz4.c */; }; FAB17BE71ABFAA9000F9BA27 /* lz4.c in Sources */ = {isa = PBXBuildFile; fileRef = FAB17BE41ABFAA9000F9BA27 /* lz4.c */; }; FAB17BE81ABFAA9000F9BA27 /* lz4.h in Headers */ = {isa = PBXBuildFile; fileRef = FAB17BE51ABFAA9000F9BA27 /* lz4.h */; }; FAB17BF51ABFC4B100F9BA27 /* lz4hc.c in Sources */ = {isa = PBXBuildFile; fileRef = FAB17BF31ABFC4B100F9BA27 /* lz4hc.c */; }; FAB17BF61ABFC4B100F9BA27 /* lz4hc.c in Sources */ = {isa = PBXBuildFile; fileRef = FAB17BF31ABFC4B100F9BA27 /* lz4hc.c */; }; FAB17BF71ABFC4B100F9BA27 /* lz4hc.h in Headers */ = {isa = PBXBuildFile; fileRef = FAB17BF41ABFC4B100F9BA27 /* lz4hc.h */; }; FAB2D5AA1AABDD8A008224A4 /* TrueTypeRasterizer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAB2D5A81AABDD8A008224A4 /* TrueTypeRasterizer.cpp */; }; FAB2D5AB1AABDD8A008224A4 /* TrueTypeRasterizer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAB2D5A81AABDD8A008224A4 /* TrueTypeRasterizer.cpp */; }; FAB2D5AC1AABDD8A008224A4 /* TrueTypeRasterizer.h in Headers */ = {isa = PBXBuildFile; fileRef = FAB2D5A91AABDD8A008224A4 /* TrueTypeRasterizer.h */; }; FAB922C6257D99EF0035DAD6 /* Range.h in Headers */ = {isa = PBXBuildFile; fileRef = FAB922C3257D99EF0035DAD6 /* Range.h */; }; FABDA9762552448200B5C523 /* b2_joint.h in Headers */ = {isa = PBXBuildFile; fileRef = FABDA9112552448200B5C523 /* b2_joint.h */; }; FABDA9772552448200B5C523 /* b2_shape.h in Headers */ = {isa = PBXBuildFile; fileRef = FABDA9122552448200B5C523 /* b2_shape.h */; }; FABDA9782552448200B5C523 /* b2_block_allocator.h in Headers */ = {isa = PBXBuildFile; fileRef = FABDA9132552448200B5C523 /* b2_block_allocator.h */; }; FABDA9792552448200B5C523 /* b2_joint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABDA9152552448200B5C523 /* b2_joint.cpp */; }; FABDA97A2552448200B5C523 /* b2_joint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABDA9152552448200B5C523 /* b2_joint.cpp */; }; FABDA97B2552448200B5C523 /* b2_chain_polygon_contact.h in Headers */ = {isa = PBXBuildFile; fileRef = FABDA9162552448200B5C523 /* b2_chain_polygon_contact.h */; }; FABDA97C2552448200B5C523 /* b2_chain_circle_contact.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABDA9172552448200B5C523 /* b2_chain_circle_contact.cpp */; }; FABDA97D2552448200B5C523 /* b2_chain_circle_contact.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABDA9172552448200B5C523 /* b2_chain_circle_contact.cpp */; }; FABDA97E2552448200B5C523 /* b2_chain_circle_contact.h in Headers */ = {isa = PBXBuildFile; fileRef = FABDA9182552448200B5C523 /* b2_chain_circle_contact.h */; }; FABDA97F2552448200B5C523 /* b2_polygon_circle_contact.h in Headers */ = {isa = PBXBuildFile; fileRef = FABDA9192552448200B5C523 /* b2_polygon_circle_contact.h */; }; FABDA9802552448200B5C523 /* b2_circle_contact.h in Headers */ = {isa = PBXBuildFile; fileRef = FABDA91A2552448200B5C523 /* b2_circle_contact.h */; }; FABDA9812552448200B5C523 /* b2_weld_joint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABDA91B2552448200B5C523 /* b2_weld_joint.cpp */; }; FABDA9822552448200B5C523 /* b2_weld_joint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABDA91B2552448200B5C523 /* b2_weld_joint.cpp */; }; FABDA9832552448200B5C523 /* b2_chain_polygon_contact.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABDA91C2552448200B5C523 /* b2_chain_polygon_contact.cpp */; }; FABDA9842552448200B5C523 /* b2_chain_polygon_contact.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABDA91C2552448200B5C523 /* b2_chain_polygon_contact.cpp */; }; FABDA9852552448200B5C523 /* b2_edge_circle_contact.h in Headers */ = {isa = PBXBuildFile; fileRef = FABDA91D2552448200B5C523 /* b2_edge_circle_contact.h */; }; FABDA9862552448200B5C523 /* b2_body.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABDA91E2552448200B5C523 /* b2_body.cpp */; }; FABDA9872552448200B5C523 /* b2_body.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABDA91E2552448200B5C523 /* b2_body.cpp */; }; FABDA9882552448300B5C523 /* b2_contact.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABDA91F2552448200B5C523 /* b2_contact.cpp */; }; FABDA9892552448300B5C523 /* b2_contact.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABDA91F2552448200B5C523 /* b2_contact.cpp */; }; FABDA98A2552448300B5C523 /* b2_revolute_joint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABDA9202552448200B5C523 /* b2_revolute_joint.cpp */; }; FABDA98B2552448300B5C523 /* b2_revolute_joint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABDA9202552448200B5C523 /* b2_revolute_joint.cpp */; }; FABDA98C2552448300B5C523 /* b2_contact_solver.h in Headers */ = {isa = PBXBuildFile; fileRef = FABDA9212552448200B5C523 /* b2_contact_solver.h */; }; FABDA98D2552448300B5C523 /* b2_contact_solver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABDA9222552448200B5C523 /* b2_contact_solver.cpp */; }; FABDA98E2552448300B5C523 /* b2_contact_solver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABDA9222552448200B5C523 /* b2_contact_solver.cpp */; }; FABDA98F2552448300B5C523 /* b2_world_callbacks.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABDA9232552448200B5C523 /* b2_world_callbacks.cpp */; }; FABDA9902552448300B5C523 /* b2_world_callbacks.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABDA9232552448200B5C523 /* b2_world_callbacks.cpp */; }; FABDA9912552448300B5C523 /* b2_pulley_joint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABDA9242552448200B5C523 /* b2_pulley_joint.cpp */; }; FABDA9922552448300B5C523 /* b2_pulley_joint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABDA9242552448200B5C523 /* b2_pulley_joint.cpp */; }; FABDA9932552448300B5C523 /* b2_polygon_circle_contact.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABDA9252552448200B5C523 /* b2_polygon_circle_contact.cpp */; }; FABDA9942552448300B5C523 /* b2_polygon_circle_contact.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABDA9252552448200B5C523 /* b2_polygon_circle_contact.cpp */; }; FABDA9952552448300B5C523 /* b2_edge_polygon_contact.h in Headers */ = {isa = PBXBuildFile; fileRef = FABDA9262552448200B5C523 /* b2_edge_polygon_contact.h */; }; FABDA9962552448300B5C523 /* b2_distance_joint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABDA9272552448200B5C523 /* b2_distance_joint.cpp */; }; FABDA9972552448300B5C523 /* b2_distance_joint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABDA9272552448200B5C523 /* b2_distance_joint.cpp */; }; FABDA9982552448300B5C523 /* b2_contact_manager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABDA9282552448200B5C523 /* b2_contact_manager.cpp */; }; FABDA9992552448300B5C523 /* b2_contact_manager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABDA9282552448200B5C523 /* b2_contact_manager.cpp */; }; FABDA99A2552448300B5C523 /* b2_polygon_contact.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABDA9292552448200B5C523 /* b2_polygon_contact.cpp */; }; FABDA99B2552448300B5C523 /* b2_polygon_contact.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABDA9292552448200B5C523 /* b2_polygon_contact.cpp */; }; FABDA99C2552448300B5C523 /* b2_edge_polygon_contact.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABDA92A2552448200B5C523 /* b2_edge_polygon_contact.cpp */; }; FABDA99D2552448300B5C523 /* b2_edge_polygon_contact.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABDA92A2552448200B5C523 /* b2_edge_polygon_contact.cpp */; }; FABDA99E2552448300B5C523 /* b2_edge_circle_contact.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABDA92B2552448200B5C523 /* b2_edge_circle_contact.cpp */; }; FABDA99F2552448300B5C523 /* b2_edge_circle_contact.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABDA92B2552448200B5C523 /* b2_edge_circle_contact.cpp */; }; FABDA9A02552448300B5C523 /* b2_gear_joint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABDA92C2552448200B5C523 /* b2_gear_joint.cpp */; }; FABDA9A12552448300B5C523 /* b2_gear_joint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABDA92C2552448200B5C523 /* b2_gear_joint.cpp */; }; FABDA9A22552448300B5C523 /* b2_friction_joint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABDA92D2552448200B5C523 /* b2_friction_joint.cpp */; }; FABDA9A32552448300B5C523 /* b2_friction_joint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABDA92D2552448200B5C523 /* b2_friction_joint.cpp */; }; FABDA9A42552448300B5C523 /* b2_wheel_joint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABDA92E2552448200B5C523 /* b2_wheel_joint.cpp */; }; FABDA9A52552448300B5C523 /* b2_wheel_joint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABDA92E2552448200B5C523 /* b2_wheel_joint.cpp */; }; FABDA9A62552448300B5C523 /* b2_polygon_contact.h in Headers */ = {isa = PBXBuildFile; fileRef = FABDA92F2552448200B5C523 /* b2_polygon_contact.h */; }; FABDA9A72552448300B5C523 /* b2_motor_joint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABDA9302552448200B5C523 /* b2_motor_joint.cpp */; }; FABDA9A82552448300B5C523 /* b2_motor_joint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABDA9302552448200B5C523 /* b2_motor_joint.cpp */; }; FABDA9AB2552448300B5C523 /* b2_world.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABDA9322552448200B5C523 /* b2_world.cpp */; }; FABDA9AC2552448300B5C523 /* b2_world.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABDA9322552448200B5C523 /* b2_world.cpp */; }; FABDA9AD2552448300B5C523 /* b2_island.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABDA9332552448200B5C523 /* b2_island.cpp */; }; FABDA9AE2552448300B5C523 /* b2_island.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABDA9332552448200B5C523 /* b2_island.cpp */; }; FABDA9AF2552448300B5C523 /* b2_mouse_joint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABDA9342552448200B5C523 /* b2_mouse_joint.cpp */; }; FABDA9B02552448300B5C523 /* b2_mouse_joint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABDA9342552448200B5C523 /* b2_mouse_joint.cpp */; }; FABDA9B12552448300B5C523 /* b2_circle_contact.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABDA9352552448200B5C523 /* b2_circle_contact.cpp */; }; FABDA9B22552448300B5C523 /* b2_circle_contact.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABDA9352552448200B5C523 /* b2_circle_contact.cpp */; }; FABDA9B32552448300B5C523 /* b2_prismatic_joint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABDA9362552448200B5C523 /* b2_prismatic_joint.cpp */; }; FABDA9B42552448300B5C523 /* b2_prismatic_joint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABDA9362552448200B5C523 /* b2_prismatic_joint.cpp */; }; FABDA9B52552448300B5C523 /* b2_fixture.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABDA9372552448200B5C523 /* b2_fixture.cpp */; }; FABDA9B62552448300B5C523 /* b2_fixture.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABDA9372552448200B5C523 /* b2_fixture.cpp */; }; FABDA9B72552448300B5C523 /* b2_island.h in Headers */ = {isa = PBXBuildFile; fileRef = FABDA9382552448200B5C523 /* b2_island.h */; }; FABDA9B82552448300B5C523 /* b2_motor_joint.h in Headers */ = {isa = PBXBuildFile; fileRef = FABDA9392552448200B5C523 /* b2_motor_joint.h */; }; FABDA9B92552448300B5C523 /* b2_common.h in Headers */ = {isa = PBXBuildFile; fileRef = FABDA93A2552448200B5C523 /* b2_common.h */; }; FABDA9BA2552448300B5C523 /* b2_weld_joint.h in Headers */ = {isa = PBXBuildFile; fileRef = FABDA93B2552448200B5C523 /* b2_weld_joint.h */; }; FABDA9BB2552448300B5C523 /* b2_dynamic_tree.h in Headers */ = {isa = PBXBuildFile; fileRef = FABDA93C2552448200B5C523 /* b2_dynamic_tree.h */; }; FABDA9BC2552448300B5C523 /* b2_fixture.h in Headers */ = {isa = PBXBuildFile; fileRef = FABDA93D2552448200B5C523 /* b2_fixture.h */; }; FABDA9BD2552448300B5C523 /* b2_stack_allocator.h in Headers */ = {isa = PBXBuildFile; fileRef = FABDA93E2552448200B5C523 /* b2_stack_allocator.h */; }; FABDA9BE2552448300B5C523 /* Box2D.h in Headers */ = {isa = PBXBuildFile; fileRef = FABDA93F2552448200B5C523 /* Box2D.h */; }; FABDA9BF2552448300B5C523 /* b2_types.h in Headers */ = {isa = PBXBuildFile; fileRef = FABDA9402552448200B5C523 /* b2_types.h */; }; FABDA9C02552448300B5C523 /* b2_broad_phase.h in Headers */ = {isa = PBXBuildFile; fileRef = FABDA9412552448200B5C523 /* b2_broad_phase.h */; }; FABDA9C12552448300B5C523 /* b2_rope.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABDA9432552448200B5C523 /* b2_rope.cpp */; }; FABDA9C22552448300B5C523 /* b2_rope.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABDA9432552448200B5C523 /* b2_rope.cpp */; }; FABDA9C32552448300B5C523 /* b2_settings.h in Headers */ = {isa = PBXBuildFile; fileRef = FABDA9442552448200B5C523 /* b2_settings.h */; }; FABDA9C42552448300B5C523 /* b2_revolute_joint.h in Headers */ = {isa = PBXBuildFile; fileRef = FABDA9452552448200B5C523 /* b2_revolute_joint.h */; }; FABDA9C62552448300B5C523 /* b2_rope.h in Headers */ = {isa = PBXBuildFile; fileRef = FABDA9472552448200B5C523 /* b2_rope.h */; }; FABDA9C72552448300B5C523 /* b2_distance_joint.h in Headers */ = {isa = PBXBuildFile; fileRef = FABDA9482552448200B5C523 /* b2_distance_joint.h */; }; FABDA9C82552448300B5C523 /* b2_body.h in Headers */ = {isa = PBXBuildFile; fileRef = FABDA9492552448200B5C523 /* b2_body.h */; }; FABDA9C92552448300B5C523 /* b2_distance.h in Headers */ = {isa = PBXBuildFile; fileRef = FABDA94A2552448200B5C523 /* b2_distance.h */; }; FABDA9CA2552448300B5C523 /* b2_time_step.h in Headers */ = {isa = PBXBuildFile; fileRef = FABDA94B2552448200B5C523 /* b2_time_step.h */; }; FABDA9CB2552448300B5C523 /* b2_pulley_joint.h in Headers */ = {isa = PBXBuildFile; fileRef = FABDA94C2552448200B5C523 /* b2_pulley_joint.h */; }; FABDA9CC2552448300B5C523 /* b2_circle_shape.h in Headers */ = {isa = PBXBuildFile; fileRef = FABDA94D2552448200B5C523 /* b2_circle_shape.h */; }; FABDA9CD2552448300B5C523 /* b2_math.h in Headers */ = {isa = PBXBuildFile; fileRef = FABDA94E2552448200B5C523 /* b2_math.h */; }; FABDA9CE2552448300B5C523 /* b2_time_of_impact.h in Headers */ = {isa = PBXBuildFile; fileRef = FABDA94F2552448200B5C523 /* b2_time_of_impact.h */; }; FABDA9CF2552448300B5C523 /* b2_mouse_joint.h in Headers */ = {isa = PBXBuildFile; fileRef = FABDA9502552448200B5C523 /* b2_mouse_joint.h */; }; FABDA9D02552448300B5C523 /* b2_draw.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABDA9522552448200B5C523 /* b2_draw.cpp */; }; FABDA9D12552448300B5C523 /* b2_draw.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABDA9522552448200B5C523 /* b2_draw.cpp */; }; FABDA9D22552448300B5C523 /* b2_timer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABDA9532552448200B5C523 /* b2_timer.cpp */; }; FABDA9D32552448300B5C523 /* b2_timer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABDA9532552448200B5C523 /* b2_timer.cpp */; }; FABDA9D42552448300B5C523 /* b2_block_allocator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABDA9542552448200B5C523 /* b2_block_allocator.cpp */; }; FABDA9D52552448300B5C523 /* b2_block_allocator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABDA9542552448200B5C523 /* b2_block_allocator.cpp */; }; FABDA9D62552448300B5C523 /* b2_stack_allocator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABDA9552552448200B5C523 /* b2_stack_allocator.cpp */; }; FABDA9D72552448300B5C523 /* b2_stack_allocator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABDA9552552448200B5C523 /* b2_stack_allocator.cpp */; }; FABDA9D82552448300B5C523 /* b2_settings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABDA9562552448200B5C523 /* b2_settings.cpp */; }; FABDA9D92552448300B5C523 /* b2_settings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABDA9562552448200B5C523 /* b2_settings.cpp */; }; FABDA9DA2552448300B5C523 /* b2_math.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABDA9572552448200B5C523 /* b2_math.cpp */; }; FABDA9DB2552448300B5C523 /* b2_math.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABDA9572552448200B5C523 /* b2_math.cpp */; }; FABDA9DC2552448300B5C523 /* b2_friction_joint.h in Headers */ = {isa = PBXBuildFile; fileRef = FABDA9582552448200B5C523 /* b2_friction_joint.h */; }; FABDA9DD2552448300B5C523 /* b2_contact.h in Headers */ = {isa = PBXBuildFile; fileRef = FABDA9592552448200B5C523 /* b2_contact.h */; }; FABDA9DE2552448300B5C523 /* b2_prismatic_joint.h in Headers */ = {isa = PBXBuildFile; fileRef = FABDA95A2552448200B5C523 /* b2_prismatic_joint.h */; }; FABDA9DF2552448300B5C523 /* b2_world.h in Headers */ = {isa = PBXBuildFile; fileRef = FABDA95B2552448200B5C523 /* b2_world.h */; }; FABDA9E02552448300B5C523 /* b2_polygon_shape.h in Headers */ = {isa = PBXBuildFile; fileRef = FABDA95C2552448200B5C523 /* b2_polygon_shape.h */; }; FABDA9E12552448300B5C523 /* b2_wheel_joint.h in Headers */ = {isa = PBXBuildFile; fileRef = FABDA95D2552448200B5C523 /* b2_wheel_joint.h */; }; FABDA9E22552448300B5C523 /* b2_growable_stack.h in Headers */ = {isa = PBXBuildFile; fileRef = FABDA95E2552448200B5C523 /* b2_growable_stack.h */; }; FABDA9E32552448300B5C523 /* b2_draw.h in Headers */ = {isa = PBXBuildFile; fileRef = FABDA95F2552448200B5C523 /* b2_draw.h */; }; FABDA9E42552448300B5C523 /* b2_collision.h in Headers */ = {isa = PBXBuildFile; fileRef = FABDA9602552448200B5C523 /* b2_collision.h */; }; FABDA9E62552448300B5C523 /* b2_api.h in Headers */ = {isa = PBXBuildFile; fileRef = FABDA9622552448200B5C523 /* b2_api.h */; }; FABDA9E72552448300B5C523 /* b2_chain_shape.h in Headers */ = {isa = PBXBuildFile; fileRef = FABDA9632552448200B5C523 /* b2_chain_shape.h */; }; FABDA9E82552448300B5C523 /* b2_gear_joint.h in Headers */ = {isa = PBXBuildFile; fileRef = FABDA9642552448200B5C523 /* b2_gear_joint.h */; }; FABDA9E92552448300B5C523 /* b2_timer.h in Headers */ = {isa = PBXBuildFile; fileRef = FABDA9652552448200B5C523 /* b2_timer.h */; }; FABDA9EA2552448300B5C523 /* b2_world_callbacks.h in Headers */ = {isa = PBXBuildFile; fileRef = FABDA9662552448200B5C523 /* b2_world_callbacks.h */; }; FABDA9EB2552448300B5C523 /* b2_collide_circle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABDA9682552448200B5C523 /* b2_collide_circle.cpp */; }; FABDA9EC2552448300B5C523 /* b2_collide_circle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABDA9682552448200B5C523 /* b2_collide_circle.cpp */; }; FABDA9ED2552448300B5C523 /* b2_circle_shape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABDA9692552448200B5C523 /* b2_circle_shape.cpp */; }; FABDA9EE2552448300B5C523 /* b2_circle_shape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABDA9692552448200B5C523 /* b2_circle_shape.cpp */; }; FABDA9EF2552448300B5C523 /* b2_collision.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABDA96A2552448200B5C523 /* b2_collision.cpp */; }; FABDA9F02552448300B5C523 /* b2_collision.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABDA96A2552448200B5C523 /* b2_collision.cpp */; }; FABDA9F12552448300B5C523 /* b2_collide_edge.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABDA96B2552448200B5C523 /* b2_collide_edge.cpp */; }; FABDA9F22552448300B5C523 /* b2_collide_edge.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABDA96B2552448200B5C523 /* b2_collide_edge.cpp */; }; FABDA9F32552448300B5C523 /* b2_chain_shape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABDA96C2552448200B5C523 /* b2_chain_shape.cpp */; }; FABDA9F42552448300B5C523 /* b2_chain_shape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABDA96C2552448200B5C523 /* b2_chain_shape.cpp */; }; FABDA9F52552448300B5C523 /* b2_broad_phase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABDA96D2552448200B5C523 /* b2_broad_phase.cpp */; }; FABDA9F62552448300B5C523 /* b2_broad_phase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABDA96D2552448200B5C523 /* b2_broad_phase.cpp */; }; FABDA9F72552448300B5C523 /* b2_dynamic_tree.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABDA96E2552448200B5C523 /* b2_dynamic_tree.cpp */; }; FABDA9F82552448300B5C523 /* b2_dynamic_tree.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABDA96E2552448200B5C523 /* b2_dynamic_tree.cpp */; }; FABDA9F92552448300B5C523 /* b2_polygon_shape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABDA96F2552448200B5C523 /* b2_polygon_shape.cpp */; }; FABDA9FA2552448300B5C523 /* b2_polygon_shape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABDA96F2552448200B5C523 /* b2_polygon_shape.cpp */; }; FABDA9FB2552448300B5C523 /* b2_collide_polygon.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABDA9702552448200B5C523 /* b2_collide_polygon.cpp */; }; FABDA9FC2552448300B5C523 /* b2_collide_polygon.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABDA9702552448200B5C523 /* b2_collide_polygon.cpp */; }; FABDA9FD2552448300B5C523 /* b2_edge_shape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABDA9712552448200B5C523 /* b2_edge_shape.cpp */; }; FABDA9FE2552448300B5C523 /* b2_edge_shape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABDA9712552448200B5C523 /* b2_edge_shape.cpp */; }; FABDA9FF2552448300B5C523 /* b2_time_of_impact.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABDA9722552448200B5C523 /* b2_time_of_impact.cpp */; }; FABDAA002552448300B5C523 /* b2_time_of_impact.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABDA9722552448200B5C523 /* b2_time_of_impact.cpp */; }; FABDAA012552448300B5C523 /* b2_distance.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABDA9732552448200B5C523 /* b2_distance.cpp */; }; FABDAA022552448300B5C523 /* b2_distance.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABDA9732552448200B5C523 /* b2_distance.cpp */; }; FABDAA032552448300B5C523 /* b2_contact_manager.h in Headers */ = {isa = PBXBuildFile; fileRef = FABDA9742552448200B5C523 /* b2_contact_manager.h */; }; FABDAA042552448300B5C523 /* b2_edge_shape.h in Headers */ = {isa = PBXBuildFile; fileRef = FABDA9752552448200B5C523 /* b2_edge_shape.h */; }; FAC271E523B5B5B400C200D3 /* renderstate.h in Headers */ = {isa = PBXBuildFile; fileRef = FAC271E323B5B5B400C200D3 /* renderstate.h */; }; FAC271E623B5B5B400C200D3 /* renderstate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAC271E423B5B5B400C200D3 /* renderstate.cpp */; }; FAC271E723B5B5B400C200D3 /* renderstate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAC271E423B5B5B400C200D3 /* renderstate.cpp */; }; FAC756F51E4F99B400B91289 /* Effect.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAC756F31E4F99B400B91289 /* Effect.cpp */; }; FAC756F61E4F99B400B91289 /* Effect.h in Headers */ = {isa = PBXBuildFile; fileRef = FAC756F41E4F99B400B91289 /* Effect.h */; }; FAC756F71E4F99BC00B91289 /* Effect.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAC756F31E4F99B400B91289 /* Effect.cpp */; }; FAC756FA1E4F99D200B91289 /* Effect.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAC756F81E4F99D200B91289 /* Effect.cpp */; }; FAC756FB1E4F99D200B91289 /* Effect.h in Headers */ = {isa = PBXBuildFile; fileRef = FAC756F91E4F99D200B91289 /* Effect.h */; }; FAC756FC1E4F99DB00B91289 /* Effect.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAC756F81E4F99D200B91289 /* Effect.cpp */; }; FAC7CD771FE35E95006A60C7 /* physfs_internal.h in Headers */ = {isa = PBXBuildFile; fileRef = FAC7CD5A1FE35E95006A60C7 /* physfs_internal.h */; }; FAC7CD781FE35E95006A60C7 /* physfs_platform_qnx.c in Sources */ = {isa = PBXBuildFile; fileRef = FAC7CD5B1FE35E95006A60C7 /* physfs_platform_qnx.c */; }; FAC7CD791FE35E95006A60C7 /* physfs.c in Sources */ = {isa = PBXBuildFile; fileRef = FAC7CD5C1FE35E95006A60C7 /* physfs.c */; }; FAC7CD7A1FE35E95006A60C7 /* physfs_archiver_7z.c in Sources */ = {isa = PBXBuildFile; fileRef = FAC7CD5D1FE35E95006A60C7 /* physfs_archiver_7z.c */; }; FAC7CD7B1FE35E95006A60C7 /* physfs_platform_unix.c in Sources */ = {isa = PBXBuildFile; fileRef = FAC7CD5E1FE35E95006A60C7 /* physfs_platform_unix.c */; }; FAC7CD7C1FE35E95006A60C7 /* physfs_archiver_slb.c in Sources */ = {isa = PBXBuildFile; fileRef = FAC7CD5F1FE35E95006A60C7 /* physfs_archiver_slb.c */; }; FAC7CD7D1FE35E95006A60C7 /* physfs_platform_winrt.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAC7CD601FE35E95006A60C7 /* physfs_platform_winrt.cpp */; }; FAC7CD7E1FE35E95006A60C7 /* physfs_archiver_mvl.c in Sources */ = {isa = PBXBuildFile; fileRef = FAC7CD611FE35E95006A60C7 /* physfs_archiver_mvl.c */; }; FAC7CD7F1FE35E95006A60C7 /* physfs_archiver_wad.c in Sources */ = {isa = PBXBuildFile; fileRef = FAC7CD621FE35E95006A60C7 /* physfs_archiver_wad.c */; }; FAC7CD801FE35E95006A60C7 /* physfs_casefolding.h in Headers */ = {isa = PBXBuildFile; fileRef = FAC7CD631FE35E95006A60C7 /* physfs_casefolding.h */; }; FAC7CD811FE35E95006A60C7 /* physfs_platform_os2.c in Sources */ = {isa = PBXBuildFile; fileRef = FAC7CD641FE35E95006A60C7 /* physfs_platform_os2.c */; }; FAC7CD821FE35E95006A60C7 /* physfs_platform_haiku.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAC7CD651FE35E95006A60C7 /* physfs_platform_haiku.cpp */; }; FAC7CD831FE35E95006A60C7 /* physfs_platform_windows.c in Sources */ = {isa = PBXBuildFile; fileRef = FAC7CD661FE35E95006A60C7 /* physfs_platform_windows.c */; }; FAC7CD841FE35E95006A60C7 /* physfs_archiver_unpacked.c in Sources */ = {isa = PBXBuildFile; fileRef = FAC7CD671FE35E95006A60C7 /* physfs_archiver_unpacked.c */; }; FAC7CD851FE35E95006A60C7 /* physfs_unicode.c in Sources */ = {isa = PBXBuildFile; fileRef = FAC7CD681FE35E95006A60C7 /* physfs_unicode.c */; }; FAC7CD861FE35E95006A60C7 /* physfs.h in Headers */ = {isa = PBXBuildFile; fileRef = FAC7CD691FE35E95006A60C7 /* physfs.h */; }; FAC7CD871FE35E95006A60C7 /* physfs_archiver_vdf.c in Sources */ = {isa = PBXBuildFile; fileRef = FAC7CD6A1FE35E95006A60C7 /* physfs_archiver_vdf.c */; }; FAC7CD881FE35E95006A60C7 /* physfs_platform_apple.m in Sources */ = {isa = PBXBuildFile; fileRef = FAC7CD6B1FE35E95006A60C7 /* physfs_platform_apple.m */; }; FAC7CD891FE35E95006A60C7 /* physfs_archiver_dir.c in Sources */ = {isa = PBXBuildFile; fileRef = FAC7CD6C1FE35E95006A60C7 /* physfs_archiver_dir.c */; }; FAC7CD8A1FE35E95006A60C7 /* physfs_byteorder.c in Sources */ = {isa = PBXBuildFile; fileRef = FAC7CD6D1FE35E95006A60C7 /* physfs_byteorder.c */; }; FAC7CD8B1FE35E95006A60C7 /* physfs_archiver_iso9660.c in Sources */ = {isa = PBXBuildFile; fileRef = FAC7CD6E1FE35E95006A60C7 /* physfs_archiver_iso9660.c */; }; FAC7CD8C1FE35E95006A60C7 /* physfs_archiver_qpak.c in Sources */ = {isa = PBXBuildFile; fileRef = FAC7CD6F1FE35E95006A60C7 /* physfs_archiver_qpak.c */; }; FAC7CD8D1FE35E95006A60C7 /* physfs_platforms.h in Headers */ = {isa = PBXBuildFile; fileRef = FAC7CD701FE35E95006A60C7 /* physfs_platforms.h */; }; FAC7CD8E1FE35E95006A60C7 /* physfs_lzmasdk.h in Headers */ = {isa = PBXBuildFile; fileRef = FAC7CD711FE35E95006A60C7 /* physfs_lzmasdk.h */; }; FAC7CD8F1FE35E95006A60C7 /* physfs_platform_posix.c in Sources */ = {isa = PBXBuildFile; fileRef = FAC7CD721FE35E95006A60C7 /* physfs_platform_posix.c */; }; FAC7CD901FE35E95006A60C7 /* physfs_miniz.h in Headers */ = {isa = PBXBuildFile; fileRef = FAC7CD731FE35E95006A60C7 /* physfs_miniz.h */; }; FAC7CD911FE35E95006A60C7 /* physfs_archiver_grp.c in Sources */ = {isa = PBXBuildFile; fileRef = FAC7CD741FE35E95006A60C7 /* physfs_archiver_grp.c */; }; FAC7CD921FE35E95006A60C7 /* physfs_archiver_hog.c in Sources */ = {isa = PBXBuildFile; fileRef = FAC7CD751FE35E95006A60C7 /* physfs_archiver_hog.c */; }; FAC7CD931FE35E95006A60C7 /* physfs_archiver_zip.c in Sources */ = {isa = PBXBuildFile; fileRef = FAC7CD761FE35E95006A60C7 /* physfs_archiver_zip.c */; }; FAC7CD961FE755B4006A60C7 /* lz4opt.h in Headers */ = {isa = PBXBuildFile; fileRef = FAC7CD951FE755B3006A60C7 /* lz4opt.h */; }; FAC8E54523AC832A007B07C8 /* NativeFile.h in Headers */ = {isa = PBXBuildFile; fileRef = FAC8E54323AC832A007B07C8 /* NativeFile.h */; }; FAC8E54623AC832A007B07C8 /* NativeFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAC8E54423AC832A007B07C8 /* NativeFile.cpp */; }; FAC8E54723AC832A007B07C8 /* NativeFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAC8E54423AC832A007B07C8 /* NativeFile.cpp */; }; FAC8E54A23AC8379007B07C8 /* wrap_NativeFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAC8E54823AC8379007B07C8 /* wrap_NativeFile.cpp */; }; FAC8E54B23AC8379007B07C8 /* wrap_NativeFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAC8E54823AC8379007B07C8 /* wrap_NativeFile.cpp */; }; FAC8E54C23AC8379007B07C8 /* wrap_NativeFile.h in Headers */ = {isa = PBXBuildFile; fileRef = FAC8E54923AC8379007B07C8 /* wrap_NativeFile.h */; }; FAC8E55023B01C0D007B07C8 /* macos.h in Headers */ = {isa = PBXBuildFile; fileRef = FAC8E54E23B01C0C007B07C8 /* macos.h */; }; FAC8E55123B01C0D007B07C8 /* macos.mm in Sources */ = {isa = PBXBuildFile; fileRef = FAC8E54F23B01C0C007B07C8 /* macos.mm */; }; FACA02EC1F5E396B0084B28F /* CompressedData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FACA02E01F5E396B0084B28F /* CompressedData.cpp */; }; FACA02ED1F5E396B0084B28F /* CompressedData.h in Headers */ = {isa = PBXBuildFile; fileRef = FACA02E11F5E396B0084B28F /* CompressedData.h */; }; FACA02EE1F5E396B0084B28F /* Compressor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FACA02E21F5E396B0084B28F /* Compressor.cpp */; }; FACA02EF1F5E396B0084B28F /* Compressor.h in Headers */ = {isa = PBXBuildFile; fileRef = FACA02E31F5E396B0084B28F /* Compressor.h */; }; FACA02F01F5E396B0084B28F /* DataModule.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FACA02E41F5E396B0084B28F /* DataModule.cpp */; }; FACA02F11F5E396B0084B28F /* DataModule.h in Headers */ = {isa = PBXBuildFile; fileRef = FACA02E51F5E396B0084B28F /* DataModule.h */; }; FACA02F21F5E396B0084B28F /* HashFunction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FACA02E61F5E396B0084B28F /* HashFunction.cpp */; }; FACA02F31F5E396B0084B28F /* HashFunction.h in Headers */ = {isa = PBXBuildFile; fileRef = FACA02E71F5E396B0084B28F /* HashFunction.h */; }; FACA02F41F5E396B0084B28F /* wrap_CompressedData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FACA02E81F5E396B0084B28F /* wrap_CompressedData.cpp */; }; FACA02F51F5E396B0084B28F /* wrap_CompressedData.h in Headers */ = {isa = PBXBuildFile; fileRef = FACA02E91F5E396B0084B28F /* wrap_CompressedData.h */; }; FACA02F61F5E396B0084B28F /* wrap_DataModule.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FACA02EA1F5E396B0084B28F /* wrap_DataModule.cpp */; }; FACA02F71F5E396B0084B28F /* wrap_DataModule.h in Headers */ = {isa = PBXBuildFile; fileRef = FACA02EB1F5E396B0084B28F /* wrap_DataModule.h */; }; FACA02F81F5E39760084B28F /* CompressedData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FACA02E01F5E396B0084B28F /* CompressedData.cpp */; }; FACA02F91F5E39790084B28F /* Compressor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FACA02E21F5E396B0084B28F /* Compressor.cpp */; }; FACA02FA1F5E397B0084B28F /* DataModule.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FACA02E41F5E396B0084B28F /* DataModule.cpp */; }; FACA02FB1F5E397E0084B28F /* HashFunction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FACA02E61F5E396B0084B28F /* HashFunction.cpp */; }; FACA02FC1F5E39810084B28F /* wrap_CompressedData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FACA02E81F5E396B0084B28F /* wrap_CompressedData.cpp */; }; FACA02FD1F5E39840084B28F /* wrap_DataModule.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FACA02EA1F5E396B0084B28F /* wrap_DataModule.cpp */; }; FACA06AC293EE5CD001A2557 /* wrap_Sensor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FACA06A5293EE5CD001A2557 /* wrap_Sensor.cpp */; }; FACA06AD293EE5CD001A2557 /* wrap_Sensor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FACA06A5293EE5CD001A2557 /* wrap_Sensor.cpp */; }; FACA06AE293EE5CD001A2557 /* Sensor.h in Headers */ = {isa = PBXBuildFile; fileRef = FACA06A6293EE5CD001A2557 /* Sensor.h */; }; FACA06AF293EE5CD001A2557 /* Sensor.h in Headers */ = {isa = PBXBuildFile; fileRef = FACA06A8293EE5CD001A2557 /* Sensor.h */; }; FACA06B0293EE5CD001A2557 /* Sensor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FACA06A9293EE5CD001A2557 /* Sensor.cpp */; }; FACA06B1293EE5CD001A2557 /* Sensor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FACA06A9293EE5CD001A2557 /* Sensor.cpp */; }; FACA06B2293EE5CD001A2557 /* Sensor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FACA06AA293EE5CD001A2557 /* Sensor.cpp */; }; FACA06B3293EE5CD001A2557 /* Sensor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FACA06AA293EE5CD001A2557 /* Sensor.cpp */; }; FACA06B4293EE5CD001A2557 /* wrap_Sensor.h in Headers */ = {isa = PBXBuildFile; fileRef = FACA06AB293EE5CD001A2557 /* wrap_Sensor.h */; }; FACFB751276D7E3B0089F78D /* freetype.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = FACFB750276D7E2B0089F78D /* freetype.xcframework */; }; FACFB753276D7F860089F78D /* Lua.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = FACFB752276D7F6F0089F78D /* Lua.xcframework */; }; FAD19A171DFF8CA200D5398A /* ImageDataBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAD19A151DFF8CA200D5398A /* ImageDataBase.cpp */; }; FAD19A181DFF8CA200D5398A /* ImageDataBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAD19A151DFF8CA200D5398A /* ImageDataBase.cpp */; }; FAD19A191DFF8CA200D5398A /* ImageDataBase.h in Headers */ = {isa = PBXBuildFile; fileRef = FAD19A161DFF8CA200D5398A /* ImageDataBase.h */; }; FAD43ECC1FF312D800831BB8 /* freetype.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FAD43ECB1FF312D800831BB8 /* freetype.framework */; }; FADF4CC62663D0EC004F95C1 /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = FADF4CC52663D0EC004F95C1 /* libz.tbd */; }; FADF53F81E3C7ACD00012CC0 /* Buffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FADF53F61E3C7ACD00012CC0 /* Buffer.cpp */; }; FADF53F91E3C7ACD00012CC0 /* Buffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FADF53F61E3C7ACD00012CC0 /* Buffer.cpp */; }; FADF53FA1E3C7ACD00012CC0 /* Buffer.h in Headers */ = {isa = PBXBuildFile; fileRef = FADF53F71E3C7ACD00012CC0 /* Buffer.h */; }; FADF53FD1E3D74F200012CC0 /* TextBatch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FADF53FB1E3D74F200012CC0 /* TextBatch.cpp */; }; FADF53FE1E3D74F200012CC0 /* TextBatch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FADF53FB1E3D74F200012CC0 /* TextBatch.cpp */; }; FADF53FF1E3D74F200012CC0 /* TextBatch.h in Headers */ = {isa = PBXBuildFile; fileRef = FADF53FC1E3D74F200012CC0 /* TextBatch.h */; }; FADF54021E3D77B500012CC0 /* wrap_TextBatch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FADF54001E3D77B500012CC0 /* wrap_TextBatch.cpp */; }; FADF54031E3D77B500012CC0 /* wrap_TextBatch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FADF54001E3D77B500012CC0 /* wrap_TextBatch.cpp */; }; FADF54041E3D77B500012CC0 /* wrap_TextBatch.h in Headers */ = {isa = PBXBuildFile; fileRef = FADF54011E3D77B500012CC0 /* wrap_TextBatch.h */; }; FADF54071E3D78F700012CC0 /* Video.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FADF54051E3D78F700012CC0 /* Video.cpp */; }; FADF54081E3D78F700012CC0 /* Video.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FADF54051E3D78F700012CC0 /* Video.cpp */; }; FADF54091E3D78F700012CC0 /* Video.h in Headers */ = {isa = PBXBuildFile; fileRef = FADF54061E3D78F700012CC0 /* Video.h */; }; FADF540D1E3D7CDD00012CC0 /* wrap_Video.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FADF540A1E3D7CDD00012CC0 /* wrap_Video.cpp */; }; FADF540E1E3D7CDD00012CC0 /* wrap_Video.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FADF540A1E3D7CDD00012CC0 /* wrap_Video.cpp */; }; FADF540F1E3D7CDD00012CC0 /* wrap_Video.h in Headers */ = {isa = PBXBuildFile; fileRef = FADF540B1E3D7CDD00012CC0 /* wrap_Video.h */; }; FADF54201E3DA52C00012CC0 /* wrap_ParticleSystem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FADF541E1E3DA52C00012CC0 /* wrap_ParticleSystem.cpp */; }; FADF54211E3DA52C00012CC0 /* wrap_ParticleSystem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FADF541E1E3DA52C00012CC0 /* wrap_ParticleSystem.cpp */; }; FADF54221E3DA52C00012CC0 /* wrap_ParticleSystem.h in Headers */ = {isa = PBXBuildFile; fileRef = FADF541F1E3DA52C00012CC0 /* wrap_ParticleSystem.h */; }; FADF54251E3DA5BA00012CC0 /* Mesh.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FADF54231E3DA5BA00012CC0 /* Mesh.cpp */; }; FADF54261E3DA5BA00012CC0 /* Mesh.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FADF54231E3DA5BA00012CC0 /* Mesh.cpp */; }; FADF54271E3DA5BA00012CC0 /* Mesh.h in Headers */ = {isa = PBXBuildFile; fileRef = FADF54241E3DA5BA00012CC0 /* Mesh.h */; }; FADF542A1E3DAADA00012CC0 /* wrap_Mesh.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FADF54281E3DAADA00012CC0 /* wrap_Mesh.cpp */; }; FADF542B1E3DAADA00012CC0 /* wrap_Mesh.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FADF54281E3DAADA00012CC0 /* wrap_Mesh.cpp */; }; FADF542C1E3DAADA00012CC0 /* wrap_Mesh.h in Headers */ = {isa = PBXBuildFile; fileRef = FADF54291E3DAADA00012CC0 /* wrap_Mesh.h */; }; FADF542F1E3DABF600012CC0 /* SpriteBatch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FADF542D1E3DABF600012CC0 /* SpriteBatch.cpp */; }; FADF54301E3DABF600012CC0 /* SpriteBatch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FADF542D1E3DABF600012CC0 /* SpriteBatch.cpp */; }; FADF54311E3DABF600012CC0 /* SpriteBatch.h in Headers */ = {isa = PBXBuildFile; fileRef = FADF542E1E3DABF600012CC0 /* SpriteBatch.h */; }; FADF54341E3DAE6E00012CC0 /* wrap_SpriteBatch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FADF54321E3DAE6E00012CC0 /* wrap_SpriteBatch.cpp */; }; FADF54351E3DAE6E00012CC0 /* wrap_SpriteBatch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FADF54321E3DAE6E00012CC0 /* wrap_SpriteBatch.cpp */; }; FADF54361E3DAE6E00012CC0 /* wrap_SpriteBatch.h in Headers */ = {isa = PBXBuildFile; fileRef = FADF54331E3DAE6E00012CC0 /* wrap_SpriteBatch.h */; }; FADF543B1E3DAFF700012CC0 /* wrap_Graphics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FADF54391E3DAFF700012CC0 /* wrap_Graphics.cpp */; }; FADF543C1E3DAFF700012CC0 /* wrap_Graphics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FADF54391E3DAFF700012CC0 /* wrap_Graphics.cpp */; }; FADF543D1E3DAFF700012CC0 /* wrap_Graphics.h in Headers */ = {isa = PBXBuildFile; fileRef = FADF543A1E3DAFF700012CC0 /* wrap_Graphics.h */; }; FAE272521C05A15B00A67640 /* ParticleSystem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAE272501C05A15B00A67640 /* ParticleSystem.cpp */; }; FAE272531C05A15B00A67640 /* ParticleSystem.h in Headers */ = {isa = PBXBuildFile; fileRef = FAE272511C05A15B00A67640 /* ParticleSystem.h */; }; FAE64A802071362A00BC7981 /* physfs_archiver_7z.c in Sources */ = {isa = PBXBuildFile; fileRef = FAC7CD5D1FE35E95006A60C7 /* physfs_archiver_7z.c */; }; FAE64A812071363100BC7981 /* physfs_archiver_dir.c in Sources */ = {isa = PBXBuildFile; fileRef = FAC7CD6C1FE35E95006A60C7 /* physfs_archiver_dir.c */; }; FAE64A822071363100BC7981 /* physfs_archiver_grp.c in Sources */ = {isa = PBXBuildFile; fileRef = FAC7CD741FE35E95006A60C7 /* physfs_archiver_grp.c */; }; FAE64A832071363100BC7981 /* physfs_archiver_hog.c in Sources */ = {isa = PBXBuildFile; fileRef = FAC7CD751FE35E95006A60C7 /* physfs_archiver_hog.c */; }; FAE64A842071363100BC7981 /* physfs_archiver_iso9660.c in Sources */ = {isa = PBXBuildFile; fileRef = FAC7CD6E1FE35E95006A60C7 /* physfs_archiver_iso9660.c */; }; FAE64A852071363100BC7981 /* physfs_archiver_mvl.c in Sources */ = {isa = PBXBuildFile; fileRef = FAC7CD611FE35E95006A60C7 /* physfs_archiver_mvl.c */; }; FAE64A862071363100BC7981 /* physfs_archiver_qpak.c in Sources */ = {isa = PBXBuildFile; fileRef = FAC7CD6F1FE35E95006A60C7 /* physfs_archiver_qpak.c */; }; FAE64A872071363100BC7981 /* physfs_archiver_slb.c in Sources */ = {isa = PBXBuildFile; fileRef = FAC7CD5F1FE35E95006A60C7 /* physfs_archiver_slb.c */; }; FAE64A882071363100BC7981 /* physfs_archiver_unpacked.c in Sources */ = {isa = PBXBuildFile; fileRef = FAC7CD671FE35E95006A60C7 /* physfs_archiver_unpacked.c */; }; FAE64A892071363100BC7981 /* physfs_archiver_vdf.c in Sources */ = {isa = PBXBuildFile; fileRef = FAC7CD6A1FE35E95006A60C7 /* physfs_archiver_vdf.c */; }; FAE64A8A2071363100BC7981 /* physfs_archiver_wad.c in Sources */ = {isa = PBXBuildFile; fileRef = FAC7CD621FE35E95006A60C7 /* physfs_archiver_wad.c */; }; FAE64A8B2071363100BC7981 /* physfs_archiver_zip.c in Sources */ = {isa = PBXBuildFile; fileRef = FAC7CD761FE35E95006A60C7 /* physfs_archiver_zip.c */; }; FAE64A8C2071363100BC7981 /* physfs_byteorder.c in Sources */ = {isa = PBXBuildFile; fileRef = FAC7CD6D1FE35E95006A60C7 /* physfs_byteorder.c */; }; FAE64A8D2071363500BC7981 /* physfs_platform_apple.m in Sources */ = {isa = PBXBuildFile; fileRef = FAC7CD6B1FE35E95006A60C7 /* physfs_platform_apple.m */; }; FAE64A8E2071363A00BC7981 /* physfs_platform_posix.c in Sources */ = {isa = PBXBuildFile; fileRef = FAC7CD721FE35E95006A60C7 /* physfs_platform_posix.c */; }; FAE64A8F2071364200BC7981 /* physfs_platform_unix.c in Sources */ = {isa = PBXBuildFile; fileRef = FAC7CD5E1FE35E95006A60C7 /* physfs_platform_unix.c */; }; FAE64A902071364800BC7981 /* physfs_unicode.c in Sources */ = {isa = PBXBuildFile; fileRef = FAC7CD681FE35E95006A60C7 /* physfs_unicode.c */; }; FAE64A912071364800BC7981 /* physfs.c in Sources */ = {isa = PBXBuildFile; fileRef = FAC7CD5C1FE35E95006A60C7 /* physfs.c */; }; FAE64A922071364B00BC7981 /* physfs_platform_winrt.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAC7CD601FE35E95006A60C7 /* physfs_platform_winrt.cpp */; }; FAE64A932071365100BC7981 /* physfs_platform_haiku.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAC7CD651FE35E95006A60C7 /* physfs_platform_haiku.cpp */; }; FAE64A942071365100BC7981 /* physfs_platform_os2.c in Sources */ = {isa = PBXBuildFile; fileRef = FAC7CD641FE35E95006A60C7 /* physfs_platform_os2.c */; }; FAE64A952071365100BC7981 /* physfs_platform_qnx.c in Sources */ = {isa = PBXBuildFile; fileRef = FAC7CD5B1FE35E95006A60C7 /* physfs_platform_qnx.c */; }; FAE64A962071365100BC7981 /* physfs_platform_windows.c in Sources */ = {isa = PBXBuildFile; fileRef = FAC7CD661FE35E95006A60C7 /* physfs_platform_windows.c */; }; FAECA1B21F3164700095D008 /* CompressedSlice.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAECA1B01F3164700095D008 /* CompressedSlice.cpp */; }; FAECA1B31F3164700095D008 /* CompressedSlice.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAECA1B01F3164700095D008 /* CompressedSlice.cpp */; }; FAECA1B41F3164700095D008 /* CompressedSlice.h in Headers */ = {isa = PBXBuildFile; fileRef = FAECA1B11F3164700095D008 /* CompressedSlice.h */; }; FAECA1B51F31648A0095D008 /* FormatHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA93C4511F315B960087CCD4 /* FormatHandler.cpp */; }; FAF140531E20934C00F898D2 /* CodeGen.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAF13FC21E20934C00F898D2 /* CodeGen.cpp */; }; FAF140541E20934C00F898D2 /* CodeGen.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAF13FC21E20934C00F898D2 /* CodeGen.cpp */; }; FAF140551E20934C00F898D2 /* Link.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAF13FC31E20934C00F898D2 /* Link.cpp */; }; FAF140561E20934C00F898D2 /* Link.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAF13FC31E20934C00F898D2 /* Link.cpp */; }; FAF140571E20934C00F898D2 /* arrays.h in Headers */ = {isa = PBXBuildFile; fileRef = FAF13FC51E20934C00F898D2 /* arrays.h */; }; FAF140581E20934C00F898D2 /* BaseTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = FAF13FC61E20934C00F898D2 /* BaseTypes.h */; }; FAF140591E20934C00F898D2 /* Common.h in Headers */ = {isa = PBXBuildFile; fileRef = FAF13FC71E20934C00F898D2 /* Common.h */; }; FAF1405A1E20934C00F898D2 /* ConstantUnion.h in Headers */ = {isa = PBXBuildFile; fileRef = FAF13FC81E20934C00F898D2 /* ConstantUnion.h */; }; FAF1405B1E20934C00F898D2 /* InfoSink.h in Headers */ = {isa = PBXBuildFile; fileRef = FAF13FC91E20934C00F898D2 /* InfoSink.h */; }; FAF1405C1E20934C00F898D2 /* InitializeGlobals.h in Headers */ = {isa = PBXBuildFile; fileRef = FAF13FCA1E20934C00F898D2 /* InitializeGlobals.h */; }; FAF1405D1E20934C00F898D2 /* intermediate.h in Headers */ = {isa = PBXBuildFile; fileRef = FAF13FCB1E20934C00F898D2 /* intermediate.h */; }; FAF1405E1E20934C00F898D2 /* PoolAlloc.h in Headers */ = {isa = PBXBuildFile; fileRef = FAF13FCC1E20934C00F898D2 /* PoolAlloc.h */; }; FAF1405F1E20934C00F898D2 /* ResourceLimits.h in Headers */ = {isa = PBXBuildFile; fileRef = FAF13FCD1E20934C00F898D2 /* ResourceLimits.h */; }; FAF140621E20934C00F898D2 /* ShHandle.h in Headers */ = {isa = PBXBuildFile; fileRef = FAF13FD01E20934C00F898D2 /* ShHandle.h */; }; FAF140631E20934C00F898D2 /* Types.h in Headers */ = {isa = PBXBuildFile; fileRef = FAF13FD11E20934C00F898D2 /* Types.h */; }; FAF140641E20934C00F898D2 /* Constant.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAF13FD31E20934C00F898D2 /* Constant.cpp */; }; FAF140651E20934C00F898D2 /* Constant.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAF13FD31E20934C00F898D2 /* Constant.cpp */; }; FAF140661E20934C00F898D2 /* gl_types.h in Headers */ = {isa = PBXBuildFile; fileRef = FAF13FD41E20934C00F898D2 /* gl_types.h */; }; FAF140691E20934C00F898D2 /* glslang_tab.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAF13FD61E20934C00F898D2 /* glslang_tab.cpp */; }; FAF1406A1E20934C00F898D2 /* glslang_tab.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAF13FD61E20934C00F898D2 /* glslang_tab.cpp */; }; FAF1406B1E20934C00F898D2 /* glslang_tab.cpp.h in Headers */ = {isa = PBXBuildFile; fileRef = FAF13FD71E20934C00F898D2 /* glslang_tab.cpp.h */; }; FAF1406C1E20934C00F898D2 /* InfoSink.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAF13FD81E20934C00F898D2 /* InfoSink.cpp */; }; FAF1406D1E20934C00F898D2 /* InfoSink.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAF13FD81E20934C00F898D2 /* InfoSink.cpp */; }; FAF1406E1E20934C00F898D2 /* Initialize.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAF13FD91E20934C00F898D2 /* Initialize.cpp */; }; FAF1406F1E20934C00F898D2 /* Initialize.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAF13FD91E20934C00F898D2 /* Initialize.cpp */; }; FAF140701E20934C00F898D2 /* Initialize.h in Headers */ = {isa = PBXBuildFile; fileRef = FAF13FDA1E20934C00F898D2 /* Initialize.h */; }; FAF140711E20934C00F898D2 /* Intermediate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAF13FDB1E20934C00F898D2 /* Intermediate.cpp */; }; FAF140721E20934C00F898D2 /* Intermediate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAF13FDB1E20934C00F898D2 /* Intermediate.cpp */; }; FAF140731E20934C00F898D2 /* intermOut.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAF13FDC1E20934C00F898D2 /* intermOut.cpp */; }; FAF140741E20934C00F898D2 /* intermOut.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAF13FDC1E20934C00F898D2 /* intermOut.cpp */; }; FAF140751E20934C00F898D2 /* IntermTraverse.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAF13FDD1E20934C00F898D2 /* IntermTraverse.cpp */; }; FAF140761E20934C00F898D2 /* IntermTraverse.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAF13FDD1E20934C00F898D2 /* IntermTraverse.cpp */; }; FAF140771E20934C00F898D2 /* iomapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAF13FDE1E20934C00F898D2 /* iomapper.cpp */; }; FAF140781E20934C00F898D2 /* iomapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAF13FDE1E20934C00F898D2 /* iomapper.cpp */; }; FAF140791E20934C00F898D2 /* iomapper.h in Headers */ = {isa = PBXBuildFile; fileRef = FAF13FDF1E20934C00F898D2 /* iomapper.h */; }; FAF1407A1E20934C00F898D2 /* limits.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAF13FE01E20934C00F898D2 /* limits.cpp */; }; FAF1407B1E20934C00F898D2 /* limits.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAF13FE01E20934C00F898D2 /* limits.cpp */; }; FAF1407C1E20934C00F898D2 /* linkValidate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAF13FE11E20934C00F898D2 /* linkValidate.cpp */; }; FAF1407D1E20934C00F898D2 /* linkValidate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAF13FE11E20934C00F898D2 /* linkValidate.cpp */; }; FAF1407E1E20934C00F898D2 /* LiveTraverser.h in Headers */ = {isa = PBXBuildFile; fileRef = FAF13FE21E20934C00F898D2 /* LiveTraverser.h */; }; FAF1407F1E20934C00F898D2 /* localintermediate.h in Headers */ = {isa = PBXBuildFile; fileRef = FAF13FE31E20934C00F898D2 /* localintermediate.h */; }; FAF140801E20934C00F898D2 /* parseConst.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAF13FE41E20934C00F898D2 /* parseConst.cpp */; }; FAF140811E20934C00F898D2 /* parseConst.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAF13FE41E20934C00F898D2 /* parseConst.cpp */; }; FAF140821E20934C00F898D2 /* ParseContextBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAF13FE51E20934C00F898D2 /* ParseContextBase.cpp */; }; FAF140831E20934C00F898D2 /* ParseContextBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAF13FE51E20934C00F898D2 /* ParseContextBase.cpp */; }; FAF140841E20934C00F898D2 /* ParseHelper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAF13FE61E20934C00F898D2 /* ParseHelper.cpp */; }; FAF140851E20934C00F898D2 /* ParseHelper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAF13FE61E20934C00F898D2 /* ParseHelper.cpp */; }; FAF140861E20934C00F898D2 /* ParseHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = FAF13FE71E20934C00F898D2 /* ParseHelper.h */; }; FAF140871E20934C00F898D2 /* parseVersions.h in Headers */ = {isa = PBXBuildFile; fileRef = FAF13FE81E20934C00F898D2 /* parseVersions.h */; }; FAF140881E20934C00F898D2 /* PoolAlloc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAF13FE91E20934C00F898D2 /* PoolAlloc.cpp */; }; FAF140891E20934C00F898D2 /* PoolAlloc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAF13FE91E20934C00F898D2 /* PoolAlloc.cpp */; }; FAF1408A1E20934C00F898D2 /* Pp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAF13FEB1E20934C00F898D2 /* Pp.cpp */; }; FAF1408B1E20934C00F898D2 /* Pp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAF13FEB1E20934C00F898D2 /* Pp.cpp */; }; FAF1408C1E20934C00F898D2 /* PpAtom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAF13FEC1E20934C00F898D2 /* PpAtom.cpp */; }; FAF1408D1E20934C00F898D2 /* PpAtom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAF13FEC1E20934C00F898D2 /* PpAtom.cpp */; }; FAF1408E1E20934C00F898D2 /* PpContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAF13FED1E20934C00F898D2 /* PpContext.cpp */; }; FAF1408F1E20934C00F898D2 /* PpContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAF13FED1E20934C00F898D2 /* PpContext.cpp */; }; FAF140901E20934C00F898D2 /* PpContext.h in Headers */ = {isa = PBXBuildFile; fileRef = FAF13FEE1E20934C00F898D2 /* PpContext.h */; }; FAF140931E20934C00F898D2 /* PpScanner.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAF13FF01E20934C00F898D2 /* PpScanner.cpp */; }; FAF140941E20934C00F898D2 /* PpScanner.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAF13FF01E20934C00F898D2 /* PpScanner.cpp */; }; FAF140971E20934C00F898D2 /* PpTokens.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAF13FF21E20934C00F898D2 /* PpTokens.cpp */; }; FAF140981E20934C00F898D2 /* PpTokens.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAF13FF21E20934C00F898D2 /* PpTokens.cpp */; }; FAF140991E20934C00F898D2 /* PpTokens.h in Headers */ = {isa = PBXBuildFile; fileRef = FAF13FF31E20934C00F898D2 /* PpTokens.h */; }; FAF1409A1E20934C00F898D2 /* propagateNoContraction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAF13FF41E20934C00F898D2 /* propagateNoContraction.cpp */; }; FAF1409B1E20934C00F898D2 /* propagateNoContraction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAF13FF41E20934C00F898D2 /* propagateNoContraction.cpp */; }; FAF1409C1E20934C00F898D2 /* propagateNoContraction.h in Headers */ = {isa = PBXBuildFile; fileRef = FAF13FF51E20934C00F898D2 /* propagateNoContraction.h */; }; FAF1409D1E20934C00F898D2 /* reflection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAF13FF61E20934C00F898D2 /* reflection.cpp */; }; FAF1409E1E20934C00F898D2 /* reflection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAF13FF61E20934C00F898D2 /* reflection.cpp */; }; FAF1409F1E20934C00F898D2 /* reflection.h in Headers */ = {isa = PBXBuildFile; fileRef = FAF13FF71E20934C00F898D2 /* reflection.h */; }; FAF140A01E20934C00F898D2 /* RemoveTree.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAF13FF81E20934C00F898D2 /* RemoveTree.cpp */; }; FAF140A11E20934C00F898D2 /* RemoveTree.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAF13FF81E20934C00F898D2 /* RemoveTree.cpp */; }; FAF140A21E20934C00F898D2 /* RemoveTree.h in Headers */ = {isa = PBXBuildFile; fileRef = FAF13FF91E20934C00F898D2 /* RemoveTree.h */; }; FAF140A31E20934C00F898D2 /* Scan.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAF13FFA1E20934C00F898D2 /* Scan.cpp */; }; FAF140A41E20934C00F898D2 /* Scan.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAF13FFA1E20934C00F898D2 /* Scan.cpp */; }; FAF140A51E20934C00F898D2 /* Scan.h in Headers */ = {isa = PBXBuildFile; fileRef = FAF13FFB1E20934C00F898D2 /* Scan.h */; }; FAF140A61E20934C00F898D2 /* ScanContext.h in Headers */ = {isa = PBXBuildFile; fileRef = FAF13FFC1E20934C00F898D2 /* ScanContext.h */; }; FAF140A71E20934C00F898D2 /* ShaderLang.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAF13FFD1E20934C00F898D2 /* ShaderLang.cpp */; }; FAF140A81E20934C00F898D2 /* ShaderLang.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAF13FFD1E20934C00F898D2 /* ShaderLang.cpp */; }; FAF140A91E20934C00F898D2 /* SymbolTable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAF13FFE1E20934C00F898D2 /* SymbolTable.cpp */; }; FAF140AA1E20934C00F898D2 /* SymbolTable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAF13FFE1E20934C00F898D2 /* SymbolTable.cpp */; }; FAF140AB1E20934C00F898D2 /* SymbolTable.h in Headers */ = {isa = PBXBuildFile; fileRef = FAF13FFF1E20934C00F898D2 /* SymbolTable.h */; }; FAF140AC1E20934C00F898D2 /* Versions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAF140001E20934C00F898D2 /* Versions.cpp */; }; FAF140AD1E20934C00F898D2 /* Versions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAF140001E20934C00F898D2 /* Versions.cpp */; }; FAF140AE1E20934C00F898D2 /* Versions.h in Headers */ = {isa = PBXBuildFile; fileRef = FAF140011E20934C00F898D2 /* Versions.h */; }; FAF140AF1E20934C00F898D2 /* osinclude.h in Headers */ = {isa = PBXBuildFile; fileRef = FAF140031E20934C00F898D2 /* osinclude.h */; }; FAF140BB1E20934C00F898D2 /* ossource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAF140211E20934C00F898D2 /* ossource.cpp */; }; FAF140BC1E20934C00F898D2 /* ossource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAF140211E20934C00F898D2 /* ossource.cpp */; }; FAF140C41E20934C00F898D2 /* ShaderLang.h in Headers */ = {isa = PBXBuildFile; fileRef = FAF140291E20934C00F898D2 /* ShaderLang.h */; }; FAF6C9DA23C2DE2900D7B5BC /* SPVRemapper.h in Headers */ = {isa = PBXBuildFile; fileRef = FAF6C9C123C2DE2900D7B5BC /* SPVRemapper.h */; }; FAF6C9DB23C2DE2900D7B5BC /* SpvBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = FAF6C9C223C2DE2900D7B5BC /* SpvBuilder.h */; }; FAF6C9DC23C2DE2900D7B5BC /* SpvPostProcess.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAF6C9C323C2DE2900D7B5BC /* SpvPostProcess.cpp */; }; FAF6C9DD23C2DE2900D7B5BC /* SpvPostProcess.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAF6C9C323C2DE2900D7B5BC /* SpvPostProcess.cpp */; }; FAF6C9DE23C2DE2900D7B5BC /* SpvTools.h in Headers */ = {isa = PBXBuildFile; fileRef = FAF6C9C423C2DE2900D7B5BC /* SpvTools.h */; }; FAF6C9DF23C2DE2900D7B5BC /* SpvTools.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAF6C9C523C2DE2900D7B5BC /* SpvTools.cpp */; }; FAF6C9E023C2DE2900D7B5BC /* SpvTools.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAF6C9C523C2DE2900D7B5BC /* SpvTools.cpp */; }; FAF6C9E123C2DE2900D7B5BC /* InReadableOrder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAF6C9C623C2DE2900D7B5BC /* InReadableOrder.cpp */; }; FAF6C9E223C2DE2900D7B5BC /* InReadableOrder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAF6C9C623C2DE2900D7B5BC /* InReadableOrder.cpp */; }; FAF6C9E323C2DE2900D7B5BC /* GLSL.ext.AMD.h in Headers */ = {isa = PBXBuildFile; fileRef = FAF6C9C723C2DE2900D7B5BC /* GLSL.ext.AMD.h */; }; FAF6C9E423C2DE2900D7B5BC /* doc.h in Headers */ = {isa = PBXBuildFile; fileRef = FAF6C9C823C2DE2900D7B5BC /* doc.h */; }; FAF6C9E623C2DE2900D7B5BC /* SpvBuilder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAF6C9CA23C2DE2900D7B5BC /* SpvBuilder.cpp */; }; FAF6C9E723C2DE2900D7B5BC /* SpvBuilder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAF6C9CA23C2DE2900D7B5BC /* SpvBuilder.cpp */; }; FAF6C9E823C2DE2900D7B5BC /* GLSL.ext.EXT.h in Headers */ = {isa = PBXBuildFile; fileRef = FAF6C9CB23C2DE2900D7B5BC /* GLSL.ext.EXT.h */; }; FAF6C9E923C2DE2900D7B5BC /* GLSL.ext.KHR.h in Headers */ = {isa = PBXBuildFile; fileRef = FAF6C9CC23C2DE2900D7B5BC /* GLSL.ext.KHR.h */; }; FAF6C9EA23C2DE2900D7B5BC /* GLSL.ext.NV.h in Headers */ = {isa = PBXBuildFile; fileRef = FAF6C9CD23C2DE2900D7B5BC /* GLSL.ext.NV.h */; }; FAF6C9EB23C2DE2900D7B5BC /* GlslangToSpv.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAF6C9CE23C2DE2900D7B5BC /* GlslangToSpv.cpp */; }; FAF6C9EC23C2DE2900D7B5BC /* GlslangToSpv.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAF6C9CE23C2DE2900D7B5BC /* GlslangToSpv.cpp */; }; FAF6C9ED23C2DE2900D7B5BC /* spvIR.h in Headers */ = {isa = PBXBuildFile; fileRef = FAF6C9CF23C2DE2900D7B5BC /* spvIR.h */; }; FAF6C9EE23C2DE2900D7B5BC /* bitutils.h in Headers */ = {isa = PBXBuildFile; fileRef = FAF6C9D023C2DE2900D7B5BC /* bitutils.h */; }; FAF6C9EF23C2DE2900D7B5BC /* disassemble.h in Headers */ = {isa = PBXBuildFile; fileRef = FAF6C9D123C2DE2900D7B5BC /* disassemble.h */; }; FAF6C9F023C2DE2900D7B5BC /* GlslangToSpv.h in Headers */ = {isa = PBXBuildFile; fileRef = FAF6C9D223C2DE2900D7B5BC /* GlslangToSpv.h */; }; FAF6C9F123C2DE2900D7B5BC /* GLSL.std.450.h in Headers */ = {isa = PBXBuildFile; fileRef = FAF6C9D323C2DE2900D7B5BC /* GLSL.std.450.h */; }; FAF6C9F223C2DE2900D7B5BC /* SPVRemapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAF6C9D423C2DE2900D7B5BC /* SPVRemapper.cpp */; }; FAF6C9F323C2DE2900D7B5BC /* SPVRemapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAF6C9D423C2DE2900D7B5BC /* SPVRemapper.cpp */; }; FAF6C9F423C2DE2900D7B5BC /* Logger.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAF6C9D523C2DE2900D7B5BC /* Logger.cpp */; }; FAF6C9F523C2DE2900D7B5BC /* Logger.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAF6C9D523C2DE2900D7B5BC /* Logger.cpp */; }; FAF6C9F623C2DE2900D7B5BC /* hex_float.h in Headers */ = {isa = PBXBuildFile; fileRef = FAF6C9D623C2DE2900D7B5BC /* hex_float.h */; }; FAF6C9F723C2DE2900D7B5BC /* Logger.h in Headers */ = {isa = PBXBuildFile; fileRef = FAF6C9D723C2DE2900D7B5BC /* Logger.h */; }; FAF6C9F823C2DE2900D7B5BC /* doc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAF6C9D823C2DE2900D7B5BC /* doc.cpp */; }; FAF6C9F923C2DE2900D7B5BC /* doc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAF6C9D823C2DE2900D7B5BC /* doc.cpp */; }; FAF6C9FA23C2DE2900D7B5BC /* disassemble.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAF6C9D923C2DE2900D7B5BC /* disassemble.cpp */; }; FAF6C9FB23C2DE2900D7B5BC /* disassemble.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAF6C9D923C2DE2900D7B5BC /* disassemble.cpp */; }; FAFEB29928F210550025D7D0 /* unixdgram.c in Sources */ = {isa = PBXBuildFile; fileRef = FAFEB29528F210540025D7D0 /* unixdgram.c */; }; FAFEB29A28F210550025D7D0 /* unixdgram.c in Sources */ = {isa = PBXBuildFile; fileRef = FAFEB29528F210540025D7D0 /* unixdgram.c */; }; FAFEB29B28F210550025D7D0 /* unixdgram.h in Headers */ = {isa = PBXBuildFile; fileRef = FAFEB29628F210550025D7D0 /* unixdgram.h */; }; FAFEB29C28F210550025D7D0 /* unixstream.c in Sources */ = {isa = PBXBuildFile; fileRef = FAFEB29728F210550025D7D0 /* unixstream.c */; }; FAFEB29D28F210550025D7D0 /* unixstream.c in Sources */ = {isa = PBXBuildFile; fileRef = FAFEB29728F210550025D7D0 /* unixstream.c */; }; FAFEB29E28F210550025D7D0 /* unixstream.h in Headers */ = {isa = PBXBuildFile; fileRef = FAFEB29828F210550025D7D0 /* unixstream.h */; }; /* End PBXBuildFile section */ /* Begin PBXCopyFilesBuildPhase section */ FA0B78DB1A958B90000E1D17 /* CopyFiles */ = { isa = PBXCopyFilesBuildPhase; buildActionMask = 2147483647; dstPath = "include/$(PRODUCT_NAME)"; dstSubfolderSpec = 16; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ 217DFB9D1D9F6D490055D849 /* auxiliar.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = auxiliar.c; sourceTree = ""; }; 217DFB9E1D9F6D490055D849 /* auxiliar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = auxiliar.h; sourceTree = ""; }; 217DFB9F1D9F6D490055D849 /* buffer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = buffer.c; sourceTree = ""; }; 217DFBA01D9F6D490055D849 /* buffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = buffer.h; sourceTree = ""; }; 217DFBA11D9F6D490055D849 /* compat.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = compat.c; sourceTree = ""; }; 217DFBA21D9F6D490055D849 /* compat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = compat.h; sourceTree = ""; }; 217DFBA31D9F6D490055D849 /* except.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = except.c; sourceTree = ""; }; 217DFBA41D9F6D490055D849 /* except.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = except.h; sourceTree = ""; }; 217DFBA51D9F6D490055D849 /* ftp.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ftp.lua; sourceTree = ""; }; 217DFBA61D9F6D490055D849 /* ftp.lua.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ftp.lua.h; sourceTree = ""; }; 217DFBA71D9F6D490055D849 /* headers.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = headers.lua; sourceTree = ""; }; 217DFBA81D9F6D490055D849 /* headers.lua.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = headers.lua.h; sourceTree = ""; }; 217DFBA91D9F6D490055D849 /* http.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = http.lua; sourceTree = ""; }; 217DFBAA1D9F6D490055D849 /* http.lua.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = http.lua.h; sourceTree = ""; }; 217DFBAB1D9F6D490055D849 /* inet.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = inet.c; sourceTree = ""; }; 217DFBAC1D9F6D490055D849 /* inet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = inet.h; sourceTree = ""; }; 217DFBAD1D9F6D490055D849 /* io.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = io.c; sourceTree = ""; }; 217DFBAE1D9F6D490055D849 /* io.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = io.h; sourceTree = ""; }; 217DFBAF1D9F6D490055D849 /* ltn12.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ltn12.lua; sourceTree = ""; }; 217DFBB01D9F6D490055D849 /* ltn12.lua.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ltn12.lua.h; sourceTree = ""; }; 217DFBB11D9F6D490055D849 /* luasocket.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = luasocket.c; sourceTree = ""; }; 217DFBB21D9F6D490055D849 /* luasocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = luasocket.h; sourceTree = ""; }; 217DFBB41D9F6D490055D849 /* mbox.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = mbox.lua; sourceTree = ""; }; 217DFBB51D9F6D490055D849 /* mbox.lua.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mbox.lua.h; sourceTree = ""; }; 217DFBB61D9F6D490055D849 /* mime.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = mime.c; sourceTree = ""; }; 217DFBB71D9F6D490055D849 /* mime.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mime.h; sourceTree = ""; }; 217DFBB81D9F6D490055D849 /* mime.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = mime.lua; sourceTree = ""; }; 217DFBB91D9F6D490055D849 /* mime.lua.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mime.lua.h; sourceTree = ""; }; 217DFBBA1D9F6D490055D849 /* options.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = options.c; sourceTree = ""; }; 217DFBBB1D9F6D490055D849 /* options.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = options.h; sourceTree = ""; }; 217DFBBC1D9F6D490055D849 /* pierror.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pierror.h; sourceTree = ""; }; 217DFBBD1D9F6D490055D849 /* select.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = select.c; sourceTree = ""; }; 217DFBBE1D9F6D490055D849 /* select.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = select.h; sourceTree = ""; }; 217DFBBF1D9F6D490055D849 /* serial.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = serial.c; sourceTree = ""; }; 217DFBC01D9F6D490055D849 /* smtp.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = smtp.lua; sourceTree = ""; }; 217DFBC11D9F6D490055D849 /* smtp.lua.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = smtp.lua.h; sourceTree = ""; }; 217DFBC21D9F6D490055D849 /* socket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = socket.h; sourceTree = ""; }; 217DFBC31D9F6D490055D849 /* socket.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = socket.lua; sourceTree = ""; }; 217DFBC41D9F6D490055D849 /* socket.lua.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = socket.lua.h; sourceTree = ""; }; 217DFBC51D9F6D490055D849 /* tcp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tcp.c; sourceTree = ""; }; 217DFBC61D9F6D490055D849 /* tcp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tcp.h; sourceTree = ""; }; 217DFBC71D9F6D490055D849 /* timeout.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = timeout.c; sourceTree = ""; }; 217DFBC81D9F6D490055D849 /* timeout.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = timeout.h; sourceTree = ""; }; 217DFBC91D9F6D490055D849 /* tp.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = tp.lua; sourceTree = ""; }; 217DFBCA1D9F6D490055D849 /* tp.lua.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tp.lua.h; sourceTree = ""; }; 217DFBCB1D9F6D490055D849 /* udp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = udp.c; sourceTree = ""; }; 217DFBCC1D9F6D490055D849 /* udp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = udp.h; sourceTree = ""; }; 217DFBCD1D9F6D490055D849 /* unix.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = unix.c; sourceTree = ""; }; 217DFBCE1D9F6D490055D849 /* unix.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = unix.h; sourceTree = ""; }; 217DFBD31D9F6D490055D849 /* url.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = url.lua; sourceTree = ""; }; 217DFBD41D9F6D490055D849 /* url.lua.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = url.lua.h; sourceTree = ""; }; 217DFBD51D9F6D490055D849 /* usocket.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = usocket.c; sourceTree = ""; }; 217DFBD61D9F6D490055D849 /* usocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = usocket.h; sourceTree = ""; }; D91C76102DE3D088001FC408 /* spirv.hpp11 */ = {isa = PBXFileReference; lastKnownFileType = text; path = spirv.hpp11; sourceTree = ""; }; D91C76112DE3D088001FC408 /* spvUtil.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = spvUtil.h; sourceTree = ""; }; D91C76142DE3D0A2001FC408 /* visibility.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = visibility.h; sourceTree = ""; }; D923E7D2296B85B9002FF1B3 /* harfbuzz.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = harfbuzz.xcframework; path = ios/libraries/harfbuzz.xcframework; sourceTree = ""; }; D93660F72D1C727C00C0EC4B /* Touch.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = Touch.cpp; sourceTree = ""; }; D943E58C2A24D56000D80361 /* PhysfsIo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PhysfsIo.cpp; sourceTree = ""; }; D943E58D2A24D56000D80361 /* PhysfsIo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PhysfsIo.h; sourceTree = ""; }; D9596F602CBAC93800BE58C1 /* SDL3.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = SDL3.xcframework; path = shared/Frameworks/SDL3.xcframework; sourceTree = ""; }; D9DAB9202961F0EE00C64820 /* HarfbuzzShaper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HarfbuzzShaper.h; sourceTree = ""; }; D9DAB9212961F0EE00C64820 /* HarfbuzzShaper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HarfbuzzShaper.cpp; sourceTree = ""; }; D9DAB9252961F0FF00C64820 /* GenericShaper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GenericShaper.h; sourceTree = ""; }; D9DAB9262961F0FF00C64820 /* GenericShaper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GenericShaper.cpp; sourceTree = ""; }; D9DAB9272961F0FF00C64820 /* TextShaper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextShaper.h; sourceTree = ""; }; D9DAB9282961F10000C64820 /* TextShaper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TextShaper.cpp; sourceTree = ""; }; D9DAB9312963CD7500C64820 /* harfbuzz.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = harfbuzz.framework; path = macosx/Frameworks/harfbuzz.framework; sourceTree = ""; }; D9DB6E252B4B40660037A1F6 /* ResourceLimits.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ResourceLimits.h; sourceTree = ""; }; D9DB6E282B4B40970037A1F6 /* span.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = span.h; sourceTree = ""; }; D9DB6E332B4B41100037A1F6 /* ResourceLimits.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ResourceLimits.cpp; sourceTree = ""; }; D9DB6E382B4B41570037A1F6 /* NonSemanticDebugPrintf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NonSemanticDebugPrintf.h; sourceTree = ""; }; D9DB6E392B4B41570037A1F6 /* NonSemanticShaderDebugInfo100.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NonSemanticShaderDebugInfo100.h; sourceTree = ""; }; D9DB6E3A2B4B41570037A1F6 /* GLSL.ext.ARM.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GLSL.ext.ARM.h; sourceTree = ""; }; D9DB6E3B2B4B41580037A1F6 /* GLSL.ext.QCOM.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GLSL.ext.QCOM.h; sourceTree = ""; }; D9DB6E442B4B80E80037A1F6 /* build_info.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = build_info.h; sourceTree = ""; }; D9F0C2CB2C68091200BB2D25 /* LibraryLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LibraryLoader.h; sourceTree = ""; }; D9F0C2CD2C680A5500BB2D25 /* CurlClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CurlClient.cpp; sourceTree = ""; }; D9F0C2CE2C680A5500BB2D25 /* CurlClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CurlClient.h; sourceTree = ""; }; D9F0C2CF2C680A5500BB2D25 /* LinktimeLibraryLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LinktimeLibraryLoader.cpp; sourceTree = ""; }; D9F0C2D02C680A5500BB2D25 /* OpenSSLConnection.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = OpenSSLConnection.cpp; sourceTree = ""; }; D9F0C2D12C680A5500BB2D25 /* OpenSSLConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OpenSSLConnection.h; sourceTree = ""; }; D9F0C2D22C680A5500BB2D25 /* UnixLibraryLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UnixLibraryLoader.cpp; sourceTree = ""; }; FA08F5AE16C7525600F007B5 /* liblove-macosx.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "liblove-macosx.plist"; path = "macosx/liblove-macosx.plist"; sourceTree = ""; }; FA0A3A5D23366CE9001C269E /* floattypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = floattypes.h; sourceTree = ""; }; FA0A3A5E23366CE9001C269E /* floattypes.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = floattypes.cpp; sourceTree = ""; }; FA0B78DD1A958B90000E1D17 /* liblove.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = liblove.a; sourceTree = BUILT_PRODUCTS_DIR; }; FA0B78F71A958E3B000E1D17 /* b64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; path = b64.cpp; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.cpp; }; FA0B78F81A958E3B000E1D17 /* b64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = b64.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; FA0B78F91A958E3B000E1D17 /* config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = config.h; sourceTree = ""; }; FA0B78FA1A958E3B000E1D17 /* Data.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Data.h; sourceTree = ""; }; FA0B78FB1A958E3B000E1D17 /* delay.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = delay.cpp; sourceTree = ""; }; FA0B78FC1A958E3B000E1D17 /* delay.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = delay.h; sourceTree = ""; }; FA0B78FD1A958E3B000E1D17 /* EnumMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EnumMap.h; sourceTree = ""; }; FA0B78FE1A958E3B000E1D17 /* Exception.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Exception.cpp; sourceTree = ""; }; FA0B78FF1A958E3B000E1D17 /* Exception.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Exception.h; sourceTree = ""; }; FA0B79001A958E3B000E1D17 /* int.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = int.h; sourceTree = ""; }; FA0B79011A958E3B000E1D17 /* math.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = math.h; sourceTree = ""; }; FA0B79021A958E3B000E1D17 /* Matrix.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Matrix.cpp; sourceTree = ""; }; FA0B79031A958E3B000E1D17 /* Matrix.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Matrix.h; sourceTree = ""; }; FA0B79061A958E3B000E1D17 /* Module.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Module.cpp; sourceTree = ""; }; FA0B79071A958E3B000E1D17 /* Module.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Module.h; sourceTree = ""; }; FA0B79081A958E3B000E1D17 /* Object.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Object.cpp; sourceTree = ""; }; FA0B79091A958E3B000E1D17 /* Object.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Object.h; sourceTree = ""; }; FA0B790C1A958E3B000E1D17 /* Reference.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Reference.cpp; sourceTree = ""; }; FA0B790D1A958E3B000E1D17 /* Reference.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Reference.h; sourceTree = ""; }; FA0B790E1A958E3B000E1D17 /* runtime.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = runtime.cpp; sourceTree = ""; }; FA0B790F1A958E3B000E1D17 /* runtime.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = runtime.h; sourceTree = ""; }; FA0B79101A958E3B000E1D17 /* StringMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StringMap.h; sourceTree = ""; }; FA0B79111A958E3B000E1D17 /* types.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = types.h; sourceTree = ""; }; FA0B79121A958E3B000E1D17 /* utf8.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = utf8.cpp; sourceTree = ""; }; FA0B79131A958E3B000E1D17 /* utf8.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = utf8.h; sourceTree = ""; }; FA0B79141A958E3B000E1D17 /* Variant.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Variant.cpp; sourceTree = ""; }; FA0B79151A958E3B000E1D17 /* Variant.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Variant.h; sourceTree = ""; }; FA0B79161A958E3B000E1D17 /* Vector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Vector.cpp; sourceTree = ""; }; FA0B79171A958E3B000E1D17 /* Vector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Vector.h; sourceTree = ""; }; FA0B79181A958E3B000E1D17 /* version.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = version.h; sourceTree = ""; }; FA0B79B51A958EA3000E1D17 /* ddsinfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ddsinfo.h; sourceTree = ""; }; FA0B79B61A958EA3000E1D17 /* ddsparse.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ddsparse.cpp; sourceTree = ""; }; FA0B79B71A958EA3000E1D17 /* ddsparse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ddsparse.h; sourceTree = ""; }; FA0B79B91A958EA3000E1D17 /* enet.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = enet.cpp; sourceTree = ""; }; FA0B79BB1A958EA3000E1D17 /* callbacks.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = callbacks.c; sourceTree = ""; }; FA0B79BD1A958EA3000E1D17 /* compress.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = compress.c; sourceTree = ""; }; FA0B79BE1A958EA3000E1D17 /* host.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = host.c; sourceTree = ""; }; FA0B79C11A958EA3000E1D17 /* callbacks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = callbacks.h; sourceTree = ""; }; FA0B79C21A958EA3000E1D17 /* enet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = enet.h; sourceTree = ""; }; FA0B79C31A958EA3000E1D17 /* list.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = list.h; sourceTree = ""; }; FA0B79C41A958EA3000E1D17 /* protocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = protocol.h; sourceTree = ""; }; FA0B79C51A958EA3000E1D17 /* time.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = time.h; sourceTree = ""; }; FA0B79C61A958EA3000E1D17 /* types.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = types.h; sourceTree = ""; }; FA0B79C71A958EA3000E1D17 /* unix.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = unix.h; sourceTree = ""; }; FA0B79C81A958EA3000E1D17 /* utility.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = utility.h; sourceTree = ""; }; FA0B79C91A958EA3000E1D17 /* win32.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = win32.h; sourceTree = ""; }; FA0B79CB1A958EA3000E1D17 /* list.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = list.c; sourceTree = ""; }; FA0B79CC1A958EA3000E1D17 /* packet.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = packet.c; sourceTree = ""; }; FA0B79CD1A958EA3000E1D17 /* peer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = peer.c; sourceTree = ""; }; FA0B79CE1A958EA3000E1D17 /* protocol.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = protocol.c; sourceTree = ""; }; FA0B79D01A958EA3000E1D17 /* unix.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = unix.c; sourceTree = ""; }; FA0B79D11A958EA3000E1D17 /* win32.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = win32.c; sourceTree = ""; }; FA0B79D21A958EA3000E1D17 /* lua-enet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "lua-enet.h"; sourceTree = ""; }; FA0B79D41A958EA3000E1D17 /* glad.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = glad.cpp; sourceTree = ""; }; FA0B79D61A958EA3000E1D17 /* glad.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = glad.hpp; sourceTree = ""; }; FA0B79D71A958EA3000E1D17 /* gladfuncs.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = gladfuncs.hpp; sourceTree = ""; }; FA0B79D91A958EA3000E1D17 /* lodepng.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = lodepng.cpp; sourceTree = ""; }; FA0B79DA1A958EA3000E1D17 /* lodepng.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = lodepng.h; sourceTree = ""; }; FA0B7A0E1A958EA3000E1D17 /* luasocket.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = luasocket.cpp; sourceTree = ""; }; FA0B7A0F1A958EA3000E1D17 /* luasocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = luasocket.h; sourceTree = ""; }; FA0B7A151A958EA3000E1D17 /* simplexnoise1234.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = simplexnoise1234.cpp; sourceTree = ""; }; FA0B7A161A958EA3000E1D17 /* simplexnoise1234.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = simplexnoise1234.h; sourceTree = ""; }; FA0B7A181A958EA3000E1D17 /* stb_image.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = stb_image.h; sourceTree = ""; }; FA0B7A1B1A958EA3000E1D17 /* checked.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = checked.h; sourceTree = ""; }; FA0B7A1C1A958EA3000E1D17 /* core.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = core.h; sourceTree = ""; }; FA0B7A1D1A958EA3000E1D17 /* unchecked.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = unchecked.h; sourceTree = ""; }; FA0B7A1E1A958EA3000E1D17 /* utf8.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = utf8.h; sourceTree = ""; }; FA0B7A201A958EA3000E1D17 /* wuff.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = wuff.c; sourceTree = ""; }; FA0B7A211A958EA3000E1D17 /* wuff.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wuff.h; sourceTree = ""; }; FA0B7A221A958EA3000E1D17 /* wuff_config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wuff_config.h; sourceTree = ""; }; FA0B7A231A958EA3000E1D17 /* wuff_convert.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = wuff_convert.c; sourceTree = ""; }; FA0B7A241A958EA3000E1D17 /* wuff_convert.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wuff_convert.h; sourceTree = ""; }; FA0B7A251A958EA3000E1D17 /* wuff_internal.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = wuff_internal.c; sourceTree = ""; }; FA0B7A261A958EA3000E1D17 /* wuff_internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wuff_internal.h; sourceTree = ""; }; FA0B7A271A958EA3000E1D17 /* wuff_memory.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = wuff_memory.c; sourceTree = ""; }; FA0B7B3E1A95902C000E1D17 /* Audio.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; path = Audio.cpp; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.cpp; }; FA0B7B3F1A95902C000E1D17 /* Audio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = Audio.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; FA0B7B411A95902C000E1D17 /* Audio.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; path = Audio.cpp; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.cpp; }; FA0B7B421A95902C000E1D17 /* Audio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = Audio.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; FA0B7B431A95902C000E1D17 /* Source.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Source.cpp; sourceTree = ""; }; FA0B7B441A95902C000E1D17 /* Source.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Source.h; sourceTree = ""; }; FA0B7B461A95902C000E1D17 /* Audio.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; path = Audio.cpp; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.cpp; }; FA0B7B471A95902C000E1D17 /* Audio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = Audio.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; FA0B7B481A95902C000E1D17 /* Pool.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Pool.cpp; sourceTree = ""; }; FA0B7B491A95902C000E1D17 /* Pool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Pool.h; sourceTree = ""; }; FA0B7B4A1A95902C000E1D17 /* Source.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Source.cpp; sourceTree = ""; }; FA0B7B4B1A95902C000E1D17 /* Source.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Source.h; sourceTree = ""; }; FA0B7B4C1A95902C000E1D17 /* Source.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Source.cpp; sourceTree = ""; }; FA0B7B4D1A95902C000E1D17 /* Source.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Source.h; sourceTree = ""; }; FA0B7B4E1A95902C000E1D17 /* wrap_Audio.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_Audio.cpp; sourceTree = ""; }; FA0B7B4F1A95902C000E1D17 /* wrap_Audio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_Audio.h; sourceTree = ""; }; FA0B7B501A95902C000E1D17 /* wrap_Source.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_Source.cpp; sourceTree = ""; }; FA0B7B511A95902C000E1D17 /* wrap_Source.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_Source.h; sourceTree = ""; }; FA0B7B531A95902C000E1D17 /* Event.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Event.cpp; sourceTree = ""; }; FA0B7B541A95902C000E1D17 /* Event.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Event.h; sourceTree = ""; }; FA0B7B561A95902C000E1D17 /* Event.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Event.cpp; sourceTree = ""; }; FA0B7B571A95902C000E1D17 /* Event.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Event.h; sourceTree = ""; }; FA0B7B5D1A95902C000E1D17 /* File.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = File.cpp; sourceTree = ""; }; FA0B7B5E1A95902C000E1D17 /* File.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = File.h; sourceTree = ""; }; FA0B7B5F1A95902C000E1D17 /* FileData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FileData.cpp; sourceTree = ""; }; FA0B7B601A95902C000E1D17 /* FileData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FileData.h; sourceTree = ""; }; FA0B7B611A95902C000E1D17 /* Filesystem.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Filesystem.cpp; sourceTree = ""; }; FA0B7B621A95902C000E1D17 /* Filesystem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Filesystem.h; sourceTree = ""; }; FA0B7B641A95902C000E1D17 /* File.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = File.cpp; sourceTree = ""; }; FA0B7B651A95902C000E1D17 /* File.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = File.h; sourceTree = ""; }; FA0B7B661A95902C000E1D17 /* Filesystem.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Filesystem.cpp; sourceTree = ""; }; FA0B7B671A95902C000E1D17 /* Filesystem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Filesystem.h; sourceTree = ""; }; FA0B7B6A1A95902C000E1D17 /* wrap_File.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_File.cpp; sourceTree = ""; }; FA0B7B6B1A95902C000E1D17 /* wrap_File.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_File.h; sourceTree = ""; }; FA0B7B6C1A95902C000E1D17 /* wrap_FileData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_FileData.cpp; sourceTree = ""; }; FA0B7B6D1A95902C000E1D17 /* wrap_FileData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_FileData.h; sourceTree = ""; }; FA0B7B6E1A95902C000E1D17 /* wrap_Filesystem.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_Filesystem.cpp; sourceTree = ""; }; FA0B7B6F1A95902C000E1D17 /* wrap_Filesystem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_Filesystem.h; sourceTree = ""; }; FA0B7B711A95902C000E1D17 /* BMFontRasterizer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; path = BMFontRasterizer.cpp; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.cpp; }; FA0B7B721A95902C000E1D17 /* BMFontRasterizer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BMFontRasterizer.h; sourceTree = ""; }; FA0B7B731A95902C000E1D17 /* Font.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Font.cpp; sourceTree = ""; }; FA0B7B741A95902C000E1D17 /* Font.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Font.h; sourceTree = ""; }; FA0B7B761A95902C000E1D17 /* Font.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Font.cpp; sourceTree = ""; }; FA0B7B771A95902C000E1D17 /* Font.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Font.h; sourceTree = ""; }; FA0B7B781A95902C000E1D17 /* TrueTypeRasterizer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TrueTypeRasterizer.cpp; sourceTree = ""; }; FA0B7B791A95902C000E1D17 /* TrueTypeRasterizer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TrueTypeRasterizer.h; sourceTree = ""; }; FA0B7B7A1A95902C000E1D17 /* GlyphData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GlyphData.cpp; sourceTree = ""; }; FA0B7B7B1A95902C000E1D17 /* GlyphData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GlyphData.h; sourceTree = ""; }; FA0B7B7C1A95902C000E1D17 /* ImageRasterizer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ImageRasterizer.cpp; sourceTree = ""; }; FA0B7B7D1A95902C000E1D17 /* ImageRasterizer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageRasterizer.h; sourceTree = ""; }; FA0B7B7E1A95902C000E1D17 /* Rasterizer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Rasterizer.cpp; sourceTree = ""; }; FA0B7B7F1A95902C000E1D17 /* Rasterizer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Rasterizer.h; sourceTree = ""; }; FA0B7B811A95902C000E1D17 /* wrap_Font.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_Font.cpp; sourceTree = ""; }; FA0B7B821A95902C000E1D17 /* wrap_Font.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_Font.h; sourceTree = ""; }; FA0B7B831A95902C000E1D17 /* wrap_GlyphData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_GlyphData.cpp; sourceTree = ""; }; FA0B7B841A95902C000E1D17 /* wrap_GlyphData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_GlyphData.h; sourceTree = ""; }; FA0B7B851A95902C000E1D17 /* wrap_Rasterizer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_Rasterizer.cpp; sourceTree = ""; }; FA0B7B861A95902C000E1D17 /* wrap_Rasterizer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_Rasterizer.h; sourceTree = ""; }; FA0B7B891A95902C000E1D17 /* Drawable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Drawable.h; sourceTree = ""; }; FA0B7B8A1A95902C000E1D17 /* Graphics.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; path = Graphics.cpp; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.cpp; }; FA0B7B8B1A95902C000E1D17 /* Graphics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Graphics.h; sourceTree = ""; }; FA0B7B911A95902C000E1D17 /* Graphics.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; path = Graphics.cpp; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.cpp; }; FA0B7B921A95902C000E1D17 /* Graphics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Graphics.h; sourceTree = ""; }; FA0B7B931A95902C000E1D17 /* Texture.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Texture.cpp; sourceTree = ""; }; FA0B7B941A95902C000E1D17 /* Texture.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Texture.h; sourceTree = ""; }; FA0B7B971A95902C000E1D17 /* OpenGL.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = OpenGL.cpp; sourceTree = ""; }; FA0B7B981A95902C000E1D17 /* OpenGL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OpenGL.h; sourceTree = ""; }; FA0B7B9B1A95902C000E1D17 /* Polyline.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Polyline.cpp; sourceTree = ""; }; FA0B7B9C1A95902C000E1D17 /* Polyline.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Polyline.h; sourceTree = ""; }; FA0B7B9D1A95902C000E1D17 /* Shader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Shader.cpp; sourceTree = ""; }; FA0B7B9E1A95902C000E1D17 /* Shader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Shader.h; sourceTree = ""; }; FA0B7BA41A95902C000E1D17 /* Buffer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Buffer.cpp; sourceTree = ""; }; FA0B7BA51A95902C000E1D17 /* Buffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Buffer.h; sourceTree = ""; }; FA0B7BBC1A95902C000E1D17 /* Quad.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Quad.cpp; sourceTree = ""; }; FA0B7BBD1A95902C000E1D17 /* Quad.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Quad.h; sourceTree = ""; }; FA0B7BBE1A95902C000E1D17 /* Texture.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; path = Texture.cpp; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.cpp; }; FA0B7BBF1A95902C000E1D17 /* Texture.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Texture.h; sourceTree = ""; }; FA0B7BC01A95902C000E1D17 /* Volatile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Volatile.cpp; sourceTree = ""; }; FA0B7BC11A95902C000E1D17 /* Volatile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Volatile.h; sourceTree = ""; }; FA0B7BC31A95902C000E1D17 /* CompressedImageData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CompressedImageData.cpp; sourceTree = ""; }; FA0B7BC41A95902C000E1D17 /* CompressedImageData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CompressedImageData.h; sourceTree = ""; }; FA0B7BC51A95902C000E1D17 /* Image.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Image.h; sourceTree = ""; }; FA0B7BC61A95902C000E1D17 /* ImageData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ImageData.cpp; sourceTree = ""; }; FA0B7BC71A95902C000E1D17 /* ImageData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageData.h; sourceTree = ""; }; FA0B7BCC1A95902C000E1D17 /* ddsHandler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ddsHandler.cpp; sourceTree = ""; }; FA0B7BCD1A95902C000E1D17 /* ddsHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ddsHandler.h; sourceTree = ""; }; FA0B7BD81A95902C000E1D17 /* KTXHandler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = KTXHandler.cpp; sourceTree = ""; }; FA0B7BD91A95902C000E1D17 /* KTXHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KTXHandler.h; sourceTree = ""; }; FA0B7BDA1A95902C000E1D17 /* PKMHandler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PKMHandler.cpp; sourceTree = ""; }; FA0B7BDB1A95902C000E1D17 /* PKMHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PKMHandler.h; sourceTree = ""; }; FA0B7BDC1A95902C000E1D17 /* PNGHandler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PNGHandler.cpp; sourceTree = ""; }; FA0B7BDD1A95902C000E1D17 /* PNGHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PNGHandler.h; sourceTree = ""; }; FA0B7BDE1A95902C000E1D17 /* PVRHandler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PVRHandler.cpp; sourceTree = ""; }; FA0B7BDF1A95902C000E1D17 /* PVRHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PVRHandler.h; sourceTree = ""; }; FA0B7BE01A95902C000E1D17 /* STBHandler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = STBHandler.cpp; sourceTree = ""; }; FA0B7BE11A95902C000E1D17 /* STBHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = STBHandler.h; sourceTree = ""; }; FA0B7BE21A95902C000E1D17 /* wrap_CompressedImageData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_CompressedImageData.cpp; sourceTree = ""; }; FA0B7BE31A95902C000E1D17 /* wrap_CompressedImageData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_CompressedImageData.h; sourceTree = ""; }; FA0B7BE41A95902C000E1D17 /* wrap_Image.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_Image.cpp; sourceTree = ""; }; FA0B7BE51A95902C000E1D17 /* wrap_Image.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_Image.h; sourceTree = ""; }; FA0B7BE61A95902C000E1D17 /* wrap_ImageData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_ImageData.cpp; sourceTree = ""; }; FA0B7BE71A95902C000E1D17 /* wrap_ImageData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_ImageData.h; sourceTree = ""; }; FA0B7BE91A95902C000E1D17 /* Joystick.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Joystick.cpp; sourceTree = ""; }; FA0B7BEA1A95902C000E1D17 /* Joystick.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Joystick.h; sourceTree = ""; }; FA0B7BEB1A95902C000E1D17 /* JoystickModule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JoystickModule.h; sourceTree = ""; }; FA0B7BED1A95902C000E1D17 /* Joystick.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Joystick.cpp; sourceTree = ""; }; FA0B7BEE1A95902C000E1D17 /* Joystick.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Joystick.h; sourceTree = ""; }; FA0B7BEF1A95902C000E1D17 /* JoystickModule.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JoystickModule.cpp; sourceTree = ""; }; FA0B7BF01A95902C000E1D17 /* JoystickModule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JoystickModule.h; sourceTree = ""; }; FA0B7BF11A95902C000E1D17 /* wrap_Joystick.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_Joystick.cpp; sourceTree = ""; }; FA0B7BF21A95902C000E1D17 /* wrap_Joystick.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_Joystick.h; sourceTree = ""; }; FA0B7BF31A95902C000E1D17 /* wrap_JoystickModule.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_JoystickModule.cpp; sourceTree = ""; }; FA0B7BF41A95902C000E1D17 /* wrap_JoystickModule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_JoystickModule.h; sourceTree = ""; }; FA0B7BF61A95902C000E1D17 /* Keyboard.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Keyboard.cpp; sourceTree = ""; }; FA0B7BF71A95902C000E1D17 /* Keyboard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Keyboard.h; sourceTree = ""; }; FA0B7BF91A95902C000E1D17 /* Keyboard.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Keyboard.cpp; sourceTree = ""; }; FA0B7BFA1A95902C000E1D17 /* Keyboard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Keyboard.h; sourceTree = ""; }; FA0B7BFB1A95902C000E1D17 /* wrap_Keyboard.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_Keyboard.cpp; sourceTree = ""; }; FA0B7BFC1A95902C000E1D17 /* wrap_Keyboard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_Keyboard.h; sourceTree = ""; }; FA0B7BFE1A95902C000E1D17 /* love.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = love.cpp; sourceTree = ""; }; FA0B7BFF1A95902C000E1D17 /* love.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = love.h; sourceTree = ""; }; FA0B7C011A95902C000E1D17 /* BezierCurve.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; path = BezierCurve.cpp; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.cpp; }; FA0B7C021A95902C000E1D17 /* BezierCurve.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = BezierCurve.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; FA0B7C031A95902C000E1D17 /* MathModule.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MathModule.cpp; sourceTree = ""; }; FA0B7C041A95902C000E1D17 /* MathModule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MathModule.h; sourceTree = ""; }; FA0B7C051A95902C000E1D17 /* RandomGenerator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RandomGenerator.cpp; sourceTree = ""; }; FA0B7C061A95902C000E1D17 /* RandomGenerator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RandomGenerator.h; sourceTree = ""; }; FA0B7C071A95902C000E1D17 /* wrap_BezierCurve.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_BezierCurve.cpp; sourceTree = ""; }; FA0B7C081A95902C000E1D17 /* wrap_BezierCurve.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_BezierCurve.h; sourceTree = ""; }; FA0B7C091A95902C000E1D17 /* wrap_Math.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_Math.cpp; sourceTree = ""; }; FA0B7C0A1A95902C000E1D17 /* wrap_Math.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_Math.h; sourceTree = ""; }; FA0B7C0B1A95902C000E1D17 /* wrap_RandomGenerator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_RandomGenerator.cpp; sourceTree = ""; }; FA0B7C0C1A95902C000E1D17 /* wrap_RandomGenerator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_RandomGenerator.h; sourceTree = ""; }; FA0B7C0E1A95902C000E1D17 /* Cursor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Cursor.cpp; sourceTree = ""; }; FA0B7C0F1A95902C000E1D17 /* Cursor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Cursor.h; sourceTree = ""; }; FA0B7C111A95902C000E1D17 /* Mouse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Mouse.h; sourceTree = ""; }; FA0B7C131A95902C000E1D17 /* Cursor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Cursor.cpp; sourceTree = ""; }; FA0B7C141A95902C000E1D17 /* Cursor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Cursor.h; sourceTree = ""; }; FA0B7C151A95902C000E1D17 /* Mouse.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Mouse.cpp; sourceTree = ""; }; FA0B7C161A95902C000E1D17 /* Mouse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Mouse.h; sourceTree = ""; }; FA0B7C171A95902C000E1D17 /* wrap_Cursor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_Cursor.cpp; sourceTree = ""; }; FA0B7C181A95902C000E1D17 /* wrap_Cursor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_Cursor.h; sourceTree = ""; }; FA0B7C191A95902C000E1D17 /* wrap_Mouse.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_Mouse.cpp; sourceTree = ""; }; FA0B7C1A1A95902C000E1D17 /* wrap_Mouse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_Mouse.h; sourceTree = ""; }; FA0B7C1C1A95902C000E1D17 /* Body.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Body.cpp; sourceTree = ""; }; FA0B7C1D1A95902C000E1D17 /* Body.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Body.h; sourceTree = ""; }; FA0B7C1F1A95902C000E1D17 /* Body.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Body.cpp; sourceTree = ""; }; FA0B7C201A95902C000E1D17 /* Body.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Body.h; sourceTree = ""; }; FA0B7C211A95902C000E1D17 /* ChainShape.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ChainShape.cpp; sourceTree = ""; }; FA0B7C221A95902C000E1D17 /* ChainShape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ChainShape.h; sourceTree = ""; }; FA0B7C231A95902C000E1D17 /* CircleShape.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CircleShape.cpp; sourceTree = ""; }; FA0B7C241A95902C000E1D17 /* CircleShape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CircleShape.h; sourceTree = ""; }; FA0B7C251A95902C000E1D17 /* Contact.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Contact.cpp; sourceTree = ""; }; FA0B7C261A95902C000E1D17 /* Contact.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Contact.h; sourceTree = ""; }; FA0B7C271A95902C000E1D17 /* DistanceJoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DistanceJoint.cpp; sourceTree = ""; }; FA0B7C281A95902C000E1D17 /* DistanceJoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DistanceJoint.h; sourceTree = ""; }; FA0B7C291A95902C000E1D17 /* EdgeShape.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EdgeShape.cpp; sourceTree = ""; }; FA0B7C2A1A95902C000E1D17 /* EdgeShape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EdgeShape.h; sourceTree = ""; }; FA0B7C2D1A95902C000E1D17 /* FrictionJoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FrictionJoint.cpp; sourceTree = ""; }; FA0B7C2E1A95902C000E1D17 /* FrictionJoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FrictionJoint.h; sourceTree = ""; }; FA0B7C2F1A95902C000E1D17 /* GearJoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GearJoint.cpp; sourceTree = ""; }; FA0B7C301A95902C000E1D17 /* GearJoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GearJoint.h; sourceTree = ""; }; FA0B7C311A95902C000E1D17 /* Joint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Joint.cpp; sourceTree = ""; }; FA0B7C321A95902C000E1D17 /* Joint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Joint.h; sourceTree = ""; }; FA0B7C331A95902C000E1D17 /* MotorJoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MotorJoint.cpp; sourceTree = ""; }; FA0B7C341A95902C000E1D17 /* MotorJoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MotorJoint.h; sourceTree = ""; }; FA0B7C351A95902C000E1D17 /* MouseJoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MouseJoint.cpp; sourceTree = ""; }; FA0B7C361A95902C000E1D17 /* MouseJoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MouseJoint.h; sourceTree = ""; }; FA0B7C371A95902C000E1D17 /* Physics.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Physics.cpp; sourceTree = ""; }; FA0B7C381A95902C000E1D17 /* Physics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Physics.h; sourceTree = ""; }; FA0B7C391A95902C000E1D17 /* PolygonShape.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PolygonShape.cpp; sourceTree = ""; }; FA0B7C3A1A95902C000E1D17 /* PolygonShape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PolygonShape.h; sourceTree = ""; }; FA0B7C3B1A95902C000E1D17 /* PrismaticJoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PrismaticJoint.cpp; sourceTree = ""; }; FA0B7C3C1A95902C000E1D17 /* PrismaticJoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PrismaticJoint.h; sourceTree = ""; }; FA0B7C3D1A95902C000E1D17 /* PulleyJoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PulleyJoint.cpp; sourceTree = ""; }; FA0B7C3E1A95902C000E1D17 /* PulleyJoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PulleyJoint.h; sourceTree = ""; }; FA0B7C3F1A95902C000E1D17 /* RevoluteJoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RevoluteJoint.cpp; sourceTree = ""; }; FA0B7C401A95902C000E1D17 /* RevoluteJoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RevoluteJoint.h; sourceTree = ""; }; FA0B7C411A95902C000E1D17 /* RopeJoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RopeJoint.cpp; sourceTree = ""; }; FA0B7C421A95902C000E1D17 /* RopeJoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RopeJoint.h; sourceTree = ""; }; FA0B7C431A95902C000E1D17 /* Shape.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Shape.cpp; sourceTree = ""; }; FA0B7C441A95902C000E1D17 /* Shape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Shape.h; sourceTree = ""; }; FA0B7C451A95902C000E1D17 /* WeldJoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WeldJoint.cpp; sourceTree = ""; }; FA0B7C461A95902C000E1D17 /* WeldJoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WeldJoint.h; sourceTree = ""; }; FA0B7C471A95902C000E1D17 /* WheelJoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WheelJoint.cpp; sourceTree = ""; }; FA0B7C481A95902C000E1D17 /* WheelJoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WheelJoint.h; sourceTree = ""; }; FA0B7C491A95902C000E1D17 /* World.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = World.cpp; sourceTree = ""; }; FA0B7C4A1A95902C000E1D17 /* World.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = World.h; sourceTree = ""; }; FA0B7C4B1A95902C000E1D17 /* wrap_Body.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_Body.cpp; sourceTree = ""; }; FA0B7C4C1A95902C000E1D17 /* wrap_Body.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_Body.h; sourceTree = ""; }; FA0B7C4D1A95902C000E1D17 /* wrap_ChainShape.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_ChainShape.cpp; sourceTree = ""; }; FA0B7C4E1A95902C000E1D17 /* wrap_ChainShape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_ChainShape.h; sourceTree = ""; }; FA0B7C4F1A95902C000E1D17 /* wrap_CircleShape.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_CircleShape.cpp; sourceTree = ""; }; FA0B7C501A95902C000E1D17 /* wrap_CircleShape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_CircleShape.h; sourceTree = ""; }; FA0B7C511A95902C000E1D17 /* wrap_Contact.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_Contact.cpp; sourceTree = ""; }; FA0B7C521A95902C000E1D17 /* wrap_Contact.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_Contact.h; sourceTree = ""; }; FA0B7C531A95902C000E1D17 /* wrap_DistanceJoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_DistanceJoint.cpp; sourceTree = ""; }; FA0B7C541A95902C000E1D17 /* wrap_DistanceJoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_DistanceJoint.h; sourceTree = ""; }; FA0B7C551A95902C000E1D17 /* wrap_EdgeShape.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_EdgeShape.cpp; sourceTree = ""; }; FA0B7C561A95902C000E1D17 /* wrap_EdgeShape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_EdgeShape.h; sourceTree = ""; }; FA0B7C591A95902C000E1D17 /* wrap_FrictionJoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_FrictionJoint.cpp; sourceTree = ""; }; FA0B7C5A1A95902C000E1D17 /* wrap_FrictionJoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_FrictionJoint.h; sourceTree = ""; }; FA0B7C5B1A95902C000E1D17 /* wrap_GearJoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_GearJoint.cpp; sourceTree = ""; }; FA0B7C5C1A95902C000E1D17 /* wrap_GearJoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_GearJoint.h; sourceTree = ""; }; FA0B7C5D1A95902C000E1D17 /* wrap_Joint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_Joint.cpp; sourceTree = ""; }; FA0B7C5E1A95902C000E1D17 /* wrap_Joint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_Joint.h; sourceTree = ""; }; FA0B7C5F1A95902C000E1D17 /* wrap_MotorJoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_MotorJoint.cpp; sourceTree = ""; }; FA0B7C601A95902C000E1D17 /* wrap_MotorJoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_MotorJoint.h; sourceTree = ""; }; FA0B7C611A95902C000E1D17 /* wrap_MouseJoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_MouseJoint.cpp; sourceTree = ""; }; FA0B7C621A95902C000E1D17 /* wrap_MouseJoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_MouseJoint.h; sourceTree = ""; }; FA0B7C631A95902C000E1D17 /* wrap_Physics.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_Physics.cpp; sourceTree = ""; }; FA0B7C641A95902C000E1D17 /* wrap_Physics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_Physics.h; sourceTree = ""; }; FA0B7C651A95902C000E1D17 /* wrap_PolygonShape.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_PolygonShape.cpp; sourceTree = ""; }; FA0B7C661A95902C000E1D17 /* wrap_PolygonShape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_PolygonShape.h; sourceTree = ""; }; FA0B7C671A95902C000E1D17 /* wrap_PrismaticJoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_PrismaticJoint.cpp; sourceTree = ""; }; FA0B7C681A95902C000E1D17 /* wrap_PrismaticJoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_PrismaticJoint.h; sourceTree = ""; }; FA0B7C691A95902C000E1D17 /* wrap_PulleyJoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_PulleyJoint.cpp; sourceTree = ""; }; FA0B7C6A1A95902C000E1D17 /* wrap_PulleyJoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_PulleyJoint.h; sourceTree = ""; }; FA0B7C6B1A95902C000E1D17 /* wrap_RevoluteJoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_RevoluteJoint.cpp; sourceTree = ""; }; FA0B7C6C1A95902C000E1D17 /* wrap_RevoluteJoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_RevoluteJoint.h; sourceTree = ""; }; FA0B7C6D1A95902C000E1D17 /* wrap_RopeJoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_RopeJoint.cpp; sourceTree = ""; }; FA0B7C6E1A95902C000E1D17 /* wrap_RopeJoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_RopeJoint.h; sourceTree = ""; }; FA0B7C6F1A95902C000E1D17 /* wrap_Shape.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_Shape.cpp; sourceTree = ""; }; FA0B7C701A95902C000E1D17 /* wrap_Shape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_Shape.h; sourceTree = ""; }; FA0B7C711A95902C000E1D17 /* wrap_WeldJoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_WeldJoint.cpp; sourceTree = ""; }; FA0B7C721A95902C000E1D17 /* wrap_WeldJoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_WeldJoint.h; sourceTree = ""; }; FA0B7C731A95902C000E1D17 /* wrap_WheelJoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_WheelJoint.cpp; sourceTree = ""; }; FA0B7C741A95902C000E1D17 /* wrap_WheelJoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_WheelJoint.h; sourceTree = ""; }; FA0B7C751A95902C000E1D17 /* wrap_World.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_World.cpp; sourceTree = ""; }; FA0B7C761A95902C000E1D17 /* wrap_World.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_World.h; sourceTree = ""; }; FA0B7C771A95902C000E1D17 /* Joint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Joint.cpp; sourceTree = ""; }; FA0B7C781A95902C000E1D17 /* Joint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Joint.h; sourceTree = ""; }; FA0B7C791A95902C000E1D17 /* Shape.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Shape.cpp; sourceTree = ""; }; FA0B7C7A1A95902C000E1D17 /* Shape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Shape.h; sourceTree = ""; }; FA0B7C7C1A95902C000E1D17 /* Decoder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Decoder.h; sourceTree = ""; }; FA0B7C7E1A95902C000E1D17 /* CoreAudioDecoder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CoreAudioDecoder.cpp; sourceTree = ""; }; FA0B7C7F1A95902C000E1D17 /* CoreAudioDecoder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CoreAudioDecoder.h; sourceTree = ""; }; FA0B7C801A95902C000E1D17 /* Decoder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Decoder.cpp; sourceTree = ""; }; FA0B7C821A95902C000E1D17 /* FLACDecoder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FLACDecoder.cpp; sourceTree = ""; }; FA0B7C831A95902C000E1D17 /* FLACDecoder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FLACDecoder.h; sourceTree = ""; }; FA0B7C861A95902C000E1D17 /* ModPlugDecoder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ModPlugDecoder.cpp; sourceTree = ""; }; FA0B7C871A95902C000E1D17 /* ModPlugDecoder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ModPlugDecoder.h; sourceTree = ""; }; FA0B7C8A1A95902C000E1D17 /* Sound.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Sound.cpp; sourceTree = ""; }; FA0B7C8B1A95902C000E1D17 /* Sound.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Sound.h; sourceTree = ""; }; FA0B7C8C1A95902C000E1D17 /* VorbisDecoder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = VorbisDecoder.cpp; sourceTree = ""; }; FA0B7C8D1A95902C000E1D17 /* VorbisDecoder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VorbisDecoder.h; sourceTree = ""; }; FA0B7C8E1A95902C000E1D17 /* WaveDecoder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WaveDecoder.cpp; sourceTree = ""; }; FA0B7C8F1A95902C000E1D17 /* WaveDecoder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WaveDecoder.h; sourceTree = ""; }; FA0B7C901A95902C000E1D17 /* Sound.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Sound.cpp; sourceTree = ""; }; FA0B7C911A95902C000E1D17 /* Sound.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Sound.h; sourceTree = ""; }; FA0B7C921A95902C000E1D17 /* SoundData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SoundData.cpp; sourceTree = ""; }; FA0B7C931A95902C000E1D17 /* SoundData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SoundData.h; sourceTree = ""; }; FA0B7C941A95902C000E1D17 /* wrap_Decoder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_Decoder.cpp; sourceTree = ""; }; FA0B7C951A95902C000E1D17 /* wrap_Decoder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_Decoder.h; sourceTree = ""; }; FA0B7C961A95902C000E1D17 /* wrap_Sound.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_Sound.cpp; sourceTree = ""; }; FA0B7C971A95902C000E1D17 /* wrap_Sound.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_Sound.h; sourceTree = ""; }; FA0B7C981A95902C000E1D17 /* wrap_SoundData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_SoundData.cpp; sourceTree = ""; }; FA0B7C991A95902C000E1D17 /* wrap_SoundData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_SoundData.h; sourceTree = ""; }; FA0B7C9C1A95902C000E1D17 /* System.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = System.cpp; sourceTree = ""; }; FA0B7C9D1A95902C000E1D17 /* System.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = System.h; sourceTree = ""; }; FA0B7C9E1A95902C000E1D17 /* System.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = System.cpp; sourceTree = ""; }; FA0B7C9F1A95902C000E1D17 /* System.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = System.h; sourceTree = ""; }; FA0B7CA01A95902C000E1D17 /* wrap_System.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_System.cpp; sourceTree = ""; }; FA0B7CA11A95902C000E1D17 /* wrap_System.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_System.h; sourceTree = ""; }; FA0B7CA31A95902C000E1D17 /* Channel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Channel.cpp; sourceTree = ""; }; FA0B7CA41A95902C000E1D17 /* Channel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Channel.h; sourceTree = ""; }; FA0B7CA51A95902C000E1D17 /* LuaThread.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LuaThread.cpp; sourceTree = ""; }; FA0B7CA61A95902C000E1D17 /* LuaThread.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LuaThread.h; sourceTree = ""; }; FA0B7CA81A95902C000E1D17 /* Thread.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Thread.cpp; sourceTree = ""; }; FA0B7CA91A95902C000E1D17 /* Thread.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Thread.h; sourceTree = ""; }; FA0B7CAA1A95902C000E1D17 /* threads.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = threads.cpp; sourceTree = ""; }; FA0B7CAB1A95902C000E1D17 /* threads.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = threads.h; sourceTree = ""; }; FA0B7CAC1A95902C000E1D17 /* Thread.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Thread.h; sourceTree = ""; }; FA0B7CAD1A95902C000E1D17 /* ThreadModule.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ThreadModule.cpp; sourceTree = ""; }; FA0B7CAE1A95902C000E1D17 /* ThreadModule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ThreadModule.h; sourceTree = ""; }; FA0B7CAF1A95902C000E1D17 /* threads.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = threads.cpp; sourceTree = ""; }; FA0B7CB01A95902C000E1D17 /* threads.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = threads.h; sourceTree = ""; }; FA0B7CB11A95902C000E1D17 /* wrap_Channel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_Channel.cpp; sourceTree = ""; }; FA0B7CB21A95902C000E1D17 /* wrap_Channel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_Channel.h; sourceTree = ""; }; FA0B7CB31A95902C000E1D17 /* wrap_LuaThread.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_LuaThread.cpp; sourceTree = ""; }; FA0B7CB41A95902C000E1D17 /* wrap_LuaThread.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_LuaThread.h; sourceTree = ""; }; FA0B7CB51A95902C000E1D17 /* wrap_ThreadModule.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_ThreadModule.cpp; sourceTree = ""; }; FA0B7CB61A95902C000E1D17 /* wrap_ThreadModule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_ThreadModule.h; sourceTree = ""; }; FA0B7CBB1A95902C000E1D17 /* Timer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Timer.h; sourceTree = ""; }; FA0B7CBC1A95902C000E1D17 /* wrap_Timer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_Timer.cpp; sourceTree = ""; }; FA0B7CBD1A95902C000E1D17 /* wrap_Timer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_Timer.h; sourceTree = ""; }; FA0B7CC01A95902C000E1D17 /* Touch.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Touch.cpp; sourceTree = ""; }; FA0B7CC11A95902C000E1D17 /* Touch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Touch.h; sourceTree = ""; }; FA0B7CC21A95902C000E1D17 /* Touch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Touch.h; sourceTree = ""; }; FA0B7CC31A95902C000E1D17 /* wrap_Touch.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_Touch.cpp; sourceTree = ""; }; FA0B7CC41A95902C000E1D17 /* wrap_Touch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_Touch.h; sourceTree = ""; }; FA0B7CC71A95902C000E1D17 /* Window.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Window.cpp; sourceTree = ""; }; FA0B7CC81A95902C000E1D17 /* Window.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Window.h; sourceTree = ""; }; FA0B7CC91A95902C000E1D17 /* Window.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Window.cpp; sourceTree = ""; }; FA0B7CCA1A95902C000E1D17 /* Window.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Window.h; sourceTree = ""; }; FA0B7CCB1A95902C000E1D17 /* wrap_Window.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_Window.cpp; sourceTree = ""; }; FA0B7CCC1A95902C000E1D17 /* wrap_Window.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_Window.h; sourceTree = ""; }; FA0B7EF01A959D2C000E1D17 /* ios.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ios.h; sourceTree = ""; }; FA0B7EF11A959D2C000E1D17 /* ios.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ios.mm; sourceTree = ""; }; FA10DD7B1F9EC24E00E1FE3D /* Resource.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Resource.h; sourceTree = ""; }; FA1557BF1CE90A2C00AFF582 /* tinyexr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tinyexr.h; sourceTree = ""; }; FA1557C11CE90BD200AFF582 /* EXRHandler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EXRHandler.cpp; sourceTree = ""; }; FA1557C21CE90BD200AFF582 /* EXRHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EXRHandler.h; sourceTree = ""; }; FA15DFAB1F9B8C850042AB22 /* StringMap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StringMap.cpp; sourceTree = ""; }; FA18CEC323D3AE6700263725 /* wrap_Buffer.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_Buffer.cpp; sourceTree = ""; }; FA18CEC423D3AE6700263725 /* wrap_Buffer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = wrap_Buffer.h; sourceTree = ""; }; FA18CECD23DBC6E000263725 /* Shader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Shader.h; sourceTree = ""; }; FA18CECE23DBC6E000263725 /* StreamBuffer.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = StreamBuffer.mm; sourceTree = ""; }; FA18CED023DBC6E000263725 /* Metal.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = Metal.mm; sourceTree = ""; }; FA18CED123DBC6E000263725 /* Shader.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = Shader.mm; sourceTree = ""; }; FA18CED223DBC6E000263725 /* StreamBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StreamBuffer.h; sourceTree = ""; }; FA18CED323DBC6E000263725 /* Graphics.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = Graphics.mm; sourceTree = ""; }; FA18CED423DBC6E000263725 /* Metal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Metal.h; sourceTree = ""; }; FA18CED523DBC6E000263725 /* Graphics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Graphics.h; sourceTree = ""; }; FA18CEE623DBC6F700263725 /* Metal.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Metal.framework; path = System/Library/Frameworks/Metal.framework; sourceTree = SDKROOT; }; FA18CEE823DBC8D400263725 /* Buffer.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = Buffer.mm; sourceTree = ""; }; FA18CEEB23DBC8EB00263725 /* Buffer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Buffer.h; sourceTree = ""; }; FA18CEEC23DC9B3E00263725 /* Texture.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Texture.h; sourceTree = ""; }; FA18CEED23DC9B3E00263725 /* Texture.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = Texture.mm; sourceTree = ""; }; FA18CEF223DCF67800263725 /* spirv_parser.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = spirv_parser.hpp; sourceTree = ""; }; FA18CEF323DCF67800263725 /* spirv_glsl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = spirv_glsl.cpp; sourceTree = ""; }; FA18CEF423DCF67800263725 /* spirv_cross_error_handling.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = spirv_cross_error_handling.hpp; sourceTree = ""; }; FA18CEF723DCF67800263725 /* barrier.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = barrier.hpp; sourceTree = ""; }; FA18CEF823DCF67800263725 /* thread_group.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = thread_group.hpp; sourceTree = ""; }; FA18CEF923DCF67800263725 /* internal_interface.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = internal_interface.hpp; sourceTree = ""; }; FA18CEFA23DCF67800263725 /* sampler.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = sampler.hpp; sourceTree = ""; }; FA18CEFB23DCF67800263725 /* external_interface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = external_interface.h; sourceTree = ""; }; FA18CEFC23DCF67800263725 /* image.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = image.hpp; sourceTree = ""; }; FA18CEFD23DCF67800263725 /* spirv_hlsl.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = spirv_hlsl.hpp; sourceTree = ""; }; FA18CEFE23DCF67800263725 /* spirv.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = spirv.hpp; sourceTree = ""; }; FA18CEFF23DCF67800263725 /* spirv_cfg.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = spirv_cfg.cpp; sourceTree = ""; }; FA18CF0023DCF67800263725 /* spirv_cpp.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = spirv_cpp.hpp; sourceTree = ""; }; FA18CF0123DCF67800263725 /* spirv_cross_parsed_ir.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = spirv_cross_parsed_ir.hpp; sourceTree = ""; }; FA18CF0223DCF67800263725 /* spirv_reflect.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = spirv_reflect.cpp; sourceTree = ""; }; FA18CF0323DCF67800263725 /* spirv_msl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = spirv_msl.cpp; sourceTree = ""; }; FA18CF0423DCF67800263725 /* spirv_cross_util.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = spirv_cross_util.cpp; sourceTree = ""; }; FA18CF0523DCF67800263725 /* spirv_cross.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = spirv_cross.cpp; sourceTree = ""; }; FA18CF0723DCF67800263725 /* spirv_hlsl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = spirv_hlsl.cpp; sourceTree = ""; }; FA18CF0823DCF67800263725 /* spirv_cfg.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = spirv_cfg.hpp; sourceTree = ""; }; FA18CF0923DCF67800263725 /* spirv_cpp.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = spirv_cpp.cpp; sourceTree = ""; }; FA18CF0A23DCF67800263725 /* spirv_cross_parsed_ir.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = spirv_cross_parsed_ir.cpp; sourceTree = ""; }; FA18CF0D23DCF67800263725 /* spirv_msl.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = spirv_msl.hpp; sourceTree = ""; }; FA18CF0E23DCF67800263725 /* spirv_reflect.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = spirv_reflect.hpp; sourceTree = ""; }; FA18CF0F23DCF67800263725 /* spirv_cross_util.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = spirv_cross_util.hpp; sourceTree = ""; }; FA18CF1023DCF67800263725 /* spirv_cross.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = spirv_cross.hpp; sourceTree = ""; }; FA18CF1123DCF67800263725 /* GLSL.std.450.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GLSL.std.450.h; sourceTree = ""; }; FA18CF1223DCF67800263725 /* spirv_cross_containers.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = spirv_cross_containers.hpp; sourceTree = ""; }; FA18CF1323DCF67800263725 /* spirv_parser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = spirv_parser.cpp; sourceTree = ""; }; FA18CF1423DCF67800263725 /* spirv_common.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = spirv_common.hpp; sourceTree = ""; }; FA18CF1523DCF67800263725 /* spirv_glsl.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = spirv_glsl.hpp; sourceTree = ""; }; FA18CF4323DD1A8000263725 /* ShaderStage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ShaderStage.h; sourceTree = ""; }; FA18CF4423DD1A8000263725 /* ShaderStage.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ShaderStage.mm; sourceTree = ""; }; FA1BA09B1E16CFCE00AA2803 /* Font.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Font.cpp; sourceTree = ""; }; FA1BA09C1E16CFCE00AA2803 /* Font.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Font.h; sourceTree = ""; }; FA1BA0A01E16D97500AA2803 /* wrap_Font.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_Font.cpp; sourceTree = ""; }; FA1BA0A11E16D97500AA2803 /* wrap_Font.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_Font.h; sourceTree = ""; }; FA1BA0AF1E16FD0800AA2803 /* Shader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Shader.cpp; sourceTree = ""; }; FA1BA0B01E16FD0800AA2803 /* Shader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Shader.h; sourceTree = ""; }; FA1BA0B51E17043400AA2803 /* wrap_Shader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_Shader.cpp; sourceTree = ""; }; FA1BA0B61E17043400AA2803 /* wrap_Shader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_Shader.h; sourceTree = ""; }; FA1E887C1DF363CD00E808AA /* Filter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Filter.cpp; sourceTree = ""; }; FA1E887D1DF363CD00E808AA /* Filter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Filter.h; sourceTree = ""; }; FA1E88811DF363DB00E808AA /* Filter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Filter.cpp; sourceTree = ""; }; FA1E88821DF363DB00E808AA /* Filter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Filter.h; sourceTree = ""; }; FA1E95B4271F932B0044CF08 /* arg.lua */ = {isa = PBXFileReference; lastKnownFileType = text; path = arg.lua; sourceTree = ""; }; FA1E95B5271F932B0044CF08 /* callbacks.lua */ = {isa = PBXFileReference; lastKnownFileType = text; path = callbacks.lua; sourceTree = ""; }; FA24348121D401CB00B8918A /* attribute.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = attribute.h; sourceTree = ""; }; FA24348221D401CB00B8918A /* attribute.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = attribute.cpp; sourceTree = ""; }; FA24348321D401CB00B8918A /* pch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pch.h; sourceTree = ""; }; FA27B38A1B498151008A9DCE /* Video.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Video.cpp; sourceTree = ""; }; FA27B38B1B498151008A9DCE /* Video.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Video.h; sourceTree = ""; }; FA27B3931B498151008A9DCE /* Video.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Video.h; sourceTree = ""; }; FA27B3941B498151008A9DCE /* VideoStream.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = VideoStream.cpp; sourceTree = ""; }; FA27B3951B498151008A9DCE /* VideoStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VideoStream.h; sourceTree = ""; }; FA27B39B1B498151008A9DCE /* wrap_Video.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_Video.cpp; sourceTree = ""; }; FA27B39C1B498151008A9DCE /* wrap_Video.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_Video.h; sourceTree = ""; }; FA27B3B91B4985BF008A9DCE /* wrap_VideoStream.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_VideoStream.cpp; sourceTree = ""; }; FA27B3BA1B4985BF008A9DCE /* wrap_VideoStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_VideoStream.h; sourceTree = ""; }; FA27B3C81B498623008A9DCE /* theora.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = theora.framework; path = macosx/Frameworks/theora.framework; sourceTree = ""; }; FA283EDC1B27CFAA00C70067 /* nogame.lua */ = {isa = PBXFileReference; lastKnownFileType = text; path = nogame.lua; sourceTree = ""; }; FA283EDD1B27CFAA00C70067 /* nogame.lua.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = nogame.lua.h; sourceTree = ""; }; FA28EBD31E352DB5003446F4 /* FenceSync.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FenceSync.cpp; sourceTree = ""; }; FA28EBD41E352DB5003446F4 /* FenceSync.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FenceSync.h; sourceTree = ""; }; FA29C0041E12355B00268CD8 /* StreamBuffer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StreamBuffer.cpp; sourceTree = ""; }; FA2AF6711DAC76FF0032B62C /* vertex.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = vertex.h; sourceTree = ""; }; FA2AF6721DAD62710032B62C /* StreamBuffer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = StreamBuffer.h; sourceTree = ""; }; FA2AF6731DAD64970032B62C /* vertex.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = vertex.cpp; sourceTree = ""; }; FA2E9BFE1C19E00C0004A1EE /* wrap_RandomGenerator.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = wrap_RandomGenerator.lua; sourceTree = ""; }; FA34AF6A22E2977700F77015 /* wrap_Data.lua */ = {isa = PBXFileReference; lastKnownFileType = text; path = wrap_Data.lua; sourceTree = ""; }; FA3C5E401F8C368C0003C579 /* ShaderStage.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = ShaderStage.cpp; sourceTree = ""; }; FA3C5E411F8C368C0003C579 /* ShaderStage.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ShaderStage.h; sourceTree = ""; }; FA3C5E451F8D80CA0003C579 /* ShaderStage.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = ShaderStage.cpp; sourceTree = ""; }; FA3C5E461F8D80CA0003C579 /* ShaderStage.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ShaderStage.h; sourceTree = ""; }; FA41A3C61C0A1F950084430C /* ASTCHandler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; path = ASTCHandler.cpp; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.cpp; }; FA41A3C71C0A1F950084430C /* ASTCHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = ASTCHandler.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; FA4B66C81ABBCF1900558F15 /* Timer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Timer.cpp; sourceTree = ""; }; FA4F2B771DE0125B00CA37D7 /* xxhash.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = xxhash.c; sourceTree = ""; }; FA4F2B781DE0125B00CA37D7 /* xxhash.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = xxhash.h; sourceTree = ""; }; FA4F2BA21DE1E36400CA37D7 /* RecordingDevice.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RecordingDevice.cpp; sourceTree = ""; }; FA4F2BA31DE1E36400CA37D7 /* RecordingDevice.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RecordingDevice.h; sourceTree = ""; }; FA4F2BA41DE1E36400CA37D7 /* wrap_RecordingDevice.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_RecordingDevice.cpp; sourceTree = ""; }; FA4F2BA51DE1E36400CA37D7 /* wrap_RecordingDevice.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_RecordingDevice.h; sourceTree = ""; }; FA4F2BAA1DE1E37000CA37D7 /* RecordingDevice.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RecordingDevice.cpp; sourceTree = ""; }; FA4F2BAB1DE1E37000CA37D7 /* RecordingDevice.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RecordingDevice.h; sourceTree = ""; }; FA4F2BAE1DE1E37B00CA37D7 /* RecordingDevice.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RecordingDevice.cpp; sourceTree = ""; }; FA4F2BAF1DE1E37B00CA37D7 /* RecordingDevice.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RecordingDevice.h; sourceTree = ""; }; FA4F2BDF1DE6650600CA37D7 /* Transform.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Transform.cpp; sourceTree = ""; }; FA4F2BE01DE6650600CA37D7 /* Transform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Transform.h; sourceTree = ""; }; FA4F2BE11DE6650600CA37D7 /* wrap_Transform.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_Transform.cpp; sourceTree = ""; }; FA4F2BE21DE6650600CA37D7 /* wrap_Transform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_Transform.h; sourceTree = ""; }; FA522D4B23F9FE370059EE3C /* MP3Decoder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MP3Decoder.cpp; sourceTree = ""; }; FA522D4C23F9FE380059EE3C /* MP3Decoder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MP3Decoder.h; sourceTree = ""; }; FA522D5123F9FF2A0059EE3C /* dr_mp3.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = dr_mp3.h; sourceTree = ""; }; FA522D5223F9FF2A0059EE3C /* dr_flac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = dr_flac.h; sourceTree = ""; }; FA522D5923FA5ED40059EE3C /* NotoSans-Regular.ttf.gzip.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NotoSans-Regular.ttf.gzip.h"; sourceTree = ""; }; FA56AA361FAFF02000A43D5F /* memory.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = memory.cpp; sourceTree = ""; }; FA56AA371FAFF02000A43D5F /* memory.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = memory.h; sourceTree = ""; }; FA577A6D16C719EA00860150 /* Lua.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Lua.framework; path = macosx/Frameworks/Lua.framework; sourceTree = ""; }; FA577A7116C719F400860150 /* ogg.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ogg.framework; path = macosx/Frameworks/ogg.framework; sourceTree = ""; }; FA577A7716C71A0800860150 /* vorbis.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = vorbis.framework; path = macosx/Frameworks/vorbis.framework; sourceTree = ""; }; FA577A7916C71A1700860150 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; FA577A7C16C71A2600860150 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = ""; }; FA577A8216C71A5300860150 /* libmodplug.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = libmodplug.framework; path = macosx/Frameworks/libmodplug.framework; sourceTree = ""; }; FA577A8C16C71D3600860150 /* auto.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; lineEnding = 0; path = auto.lua; sourceTree = ""; xcLanguageSpecificationIdentifier = ""; }; FA577A8D16C71D3600860150 /* boot.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = boot.lua; sourceTree = ""; }; FA577AAF16C7507900860150 /* love.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = love.framework; sourceTree = BUILT_PRODUCTS_DIR; }; FA57FB961AE1993600F2AD6D /* noise1234.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = noise1234.cpp; sourceTree = ""; }; FA57FB971AE1993600F2AD6D /* noise1234.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = noise1234.h; sourceTree = ""; }; FA620A2E1AA2F8DB005DB4C2 /* wrap_Quad.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_Quad.cpp; sourceTree = ""; }; FA620A2F1AA2F8DB005DB4C2 /* wrap_Quad.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_Quad.h; sourceTree = ""; }; FA620A301AA2F8DB005DB4C2 /* wrap_Texture.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_Texture.cpp; sourceTree = ""; }; FA620A311AA2F8DB005DB4C2 /* wrap_Texture.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_Texture.h; sourceTree = ""; }; FA620A391AA305F6005DB4C2 /* types.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = types.cpp; sourceTree = ""; }; FA69B918273828DD00CDC2E7 /* jitsetup.lua */ = {isa = PBXFileReference; lastKnownFileType = text; path = jitsetup.lua; sourceTree = ""; }; FA6A2B641F5F7B6B0074C308 /* wrap_Data.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_Data.h; sourceTree = ""; }; FA6A2B651F5F7B6B0074C308 /* wrap_Data.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_Data.cpp; sourceTree = ""; }; FA6A2B681F5F7F560074C308 /* DataView.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = DataView.cpp; sourceTree = ""; }; FA6A2B691F5F7F560074C308 /* DataView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DataView.h; sourceTree = ""; }; FA6A2B6D1F5F845F0074C308 /* wrap_DataView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_DataView.h; sourceTree = ""; }; FA6A2B6E1F5F845F0074C308 /* wrap_DataView.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_DataView.cpp; sourceTree = ""; }; FA6A2B721F60B6710074C308 /* ByteData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ByteData.cpp; sourceTree = ""; }; FA6A2B731F60B6710074C308 /* ByteData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ByteData.h; sourceTree = ""; }; FA6A2B771F60B8250074C308 /* wrap_ByteData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_ByteData.h; sourceTree = ""; }; FA6A2B781F60B8250074C308 /* wrap_ByteData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_ByteData.cpp; sourceTree = ""; }; FA6BDE5B1F31725300786805 /* Color.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Color.h; sourceTree = ""; }; FA6BDF88280B62A000240F2A /* GraphicsReadback.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = GraphicsReadback.mm; sourceTree = ""; }; FA6BDF8B280B62B600240F2A /* GraphicsReadback.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GraphicsReadback.h; sourceTree = ""; }; FA6BDF8C281219E900240F2A /* DataStream.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DataStream.cpp; sourceTree = ""; }; FA6BDF8D281219E900240F2A /* DataStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DataStream.h; sourceTree = ""; }; FA7634481E28722A0066EF9E /* StreamBuffer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StreamBuffer.cpp; sourceTree = ""; }; FA7634491E28722A0066EF9E /* StreamBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StreamBuffer.h; sourceTree = ""; }; FA7DA04C1C16874A0056B200 /* wrap_Math.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = wrap_Math.lua; sourceTree = ""; }; FA7E9206277E120900C24CB2 /* theora.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = theora.xcframework; path = ios/libraries/theora.xcframework; sourceTree = ""; }; FA84DE5D2778D7DB002674C6 /* SpirvIntrinsics.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SpirvIntrinsics.h; sourceTree = ""; }; FA84DE602778D7F3002674C6 /* SpirvIntrinsics.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SpirvIntrinsics.cpp; sourceTree = ""; }; FA84DE6427791C36002674C6 /* GraphicsReadback.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = GraphicsReadback.cpp; sourceTree = ""; }; FA84DE6527791C36002674C6 /* GraphicsReadback.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GraphicsReadback.h; sourceTree = ""; }; FA84DE69277943F6002674C6 /* GraphicsReadback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GraphicsReadback.h; sourceTree = ""; }; FA84DE6A277943F6002674C6 /* GraphicsReadback.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GraphicsReadback.cpp; sourceTree = ""; }; FA84DE6E27795E22002674C6 /* wrap_GraphicsReadback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_GraphicsReadback.h; sourceTree = ""; }; FA84DE6F27795E22002674C6 /* wrap_GraphicsReadback.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_GraphicsReadback.cpp; sourceTree = ""; }; FA84DE75277CB3D4002674C6 /* SDL2.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = SDL2.xcframework; path = ios/libraries/SDL2.xcframework; sourceTree = ""; }; FA84DE79277D4C88002674C6 /* modplug.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = modplug.xcframework; path = ios/libraries/modplug.xcframework; sourceTree = ""; }; FA84DE7B277E045E002674C6 /* ogg.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = ogg.xcframework; path = ios/libraries/ogg.xcframework; sourceTree = ""; }; FA84DE7D277E0A43002674C6 /* vorbis.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = vorbis.xcframework; path = ios/libraries/vorbis.xcframework; sourceTree = ""; }; FA8951A01AA2EDF300EC385A /* wrap_Event.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_Event.cpp; sourceTree = ""; }; FA8951A11AA2EDF300EC385A /* wrap_Event.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_Event.h; sourceTree = ""; }; FA91DA891F377C3900C80E33 /* deprecation.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = deprecation.cpp; sourceTree = ""; }; FA91DA8A1F377C3900C80E33 /* deprecation.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = deprecation.h; sourceTree = ""; }; FA93C4501F315B960087CCD4 /* FormatHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FormatHandler.h; sourceTree = ""; }; FA93C4511F315B960087CCD4 /* FormatHandler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FormatHandler.cpp; sourceTree = ""; }; FA94725227A6EE1B00817677 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = ""; }; FA94725427A6EE1B00817677 /* Connection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Connection.h; sourceTree = ""; }; FA94725527A6EE1B00817677 /* HTTPSClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTTPSClient.cpp; sourceTree = ""; }; FA94725627A6EE1B00817677 /* HTTPSClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTTPSClient.h; sourceTree = ""; }; FA94725727A6EE1B00817677 /* PlaintextConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlaintextConnection.h; sourceTree = ""; }; FA94725827A6EE1B00817677 /* config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = config.h; sourceTree = ""; }; FA94725A27A6EE1B00817677 /* HTTPS.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTTPS.cpp; sourceTree = ""; }; FA94725B27A6EE1B00817677 /* HTTPRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTTPRequest.h; sourceTree = ""; }; FA94725C27A6EE1B00817677 /* ConnectionClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ConnectionClient.h; sourceTree = ""; }; FA94725D27A6EE1B00817677 /* PlaintextConnection.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PlaintextConnection.cpp; sourceTree = ""; }; FA94725E27A6EE1B00817677 /* HTTPS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTTPS.h; sourceTree = ""; }; FA94725F27A6EE1B00817677 /* HTTPRequest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTTPRequest.cpp; sourceTree = ""; }; FA94729927A6F9AC00817677 /* NSURLClient.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = NSURLClient.mm; sourceTree = ""; }; FA94729A27A6F9AC00817677 /* NSURLClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NSURLClient.h; sourceTree = ""; }; FA9B4A0716E1578300074F42 /* SDL2.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SDL2.framework; path = macosx/Frameworks/SDL2.framework; sourceTree = ""; }; FA9D53AA1F5307E900125C6B /* Deprecations.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = Deprecations.cpp; sourceTree = ""; }; FA9D53AB1F5307E900125C6B /* Deprecations.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Deprecations.h; sourceTree = ""; }; FA9D8DCF1DEB56C3002CD881 /* pixelformat.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = pixelformat.cpp; sourceTree = ""; }; FA9D8DD01DEB56C3002CD881 /* pixelformat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pixelformat.h; sourceTree = ""; }; FA9D8DD41DEF8411002CD881 /* Data.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Data.cpp; sourceTree = ""; }; FA9D8DD51DEF8411002CD881 /* Stream.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Stream.cpp; sourceTree = ""; }; FA9D8DD61DEF8411002CD881 /* Stream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Stream.h; sourceTree = ""; }; FA9D8DDC1DEF842A002CD881 /* Drawable.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Drawable.cpp; sourceTree = ""; }; FA9D8DDF1DEF843D002CD881 /* Image.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Image.cpp; sourceTree = ""; }; FAA3A9AC1B7D465A00CED060 /* android.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; path = android.cpp; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.cpp; }; FAA3A9AD1B7D465A00CED060 /* android.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = android.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; FAA54AC61F91660400A8FA7B /* OggDemuxer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OggDemuxer.h; sourceTree = ""; }; FAA54AC71F91660400A8FA7B /* TheoraVideoStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TheoraVideoStream.h; sourceTree = ""; }; FAA54AC81F91660400A8FA7B /* TheoraVideoStream.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TheoraVideoStream.cpp; sourceTree = ""; }; FAA54AC91F91660400A8FA7B /* OggDemuxer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = OggDemuxer.cpp; sourceTree = ""; }; FAA627CD18E7E1560080752D /* CoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreServices.framework; path = System/Library/Frameworks/CoreServices.framework; sourceTree = SDKROOT; }; FAAA3FD31F64B3AD00F89E99 /* lprefix.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = lprefix.h; sourceTree = ""; }; FAAA3FD41F64B3AD00F89E99 /* lstrlib.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = lstrlib.c; sourceTree = ""; }; FAAA3FD51F64B3AD00F89E99 /* lstrlib.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = lstrlib.h; sourceTree = ""; }; FAAA3FD61F64B3AD00F89E99 /* lutf8lib.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = lutf8lib.c; sourceTree = ""; }; FAAA3FD71F64B3AD00F89E99 /* lutf8lib.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = lutf8lib.h; sourceTree = ""; }; FAAC2F78251A9D2200BCB81B /* apple.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = apple.mm; sourceTree = ""; }; FAAC2F7F251A9D3E00BCB81B /* apple.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = apple.h; sourceTree = ""; }; FAAFF04316CB11C700CCDE45 /* OpenAL-Soft.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = "OpenAL-Soft.framework"; path = "macosx/Frameworks/OpenAL-Soft.framework"; sourceTree = ""; }; FAB17BE41ABFAA9000F9BA27 /* lz4.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = lz4.c; sourceTree = ""; }; FAB17BE51ABFAA9000F9BA27 /* lz4.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = lz4.h; sourceTree = ""; }; FAB17BF31ABFC4B100F9BA27 /* lz4hc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = lz4hc.c; sourceTree = ""; }; FAB17BF41ABFC4B100F9BA27 /* lz4hc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = lz4hc.h; sourceTree = ""; }; FAB2D5A81AABDD8A008224A4 /* TrueTypeRasterizer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TrueTypeRasterizer.cpp; sourceTree = ""; }; FAB2D5A91AABDD8A008224A4 /* TrueTypeRasterizer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TrueTypeRasterizer.h; sourceTree = ""; }; FAB922C3257D99EF0035DAD6 /* Range.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Range.h; sourceTree = ""; }; FABDA9112552448200B5C523 /* b2_joint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2_joint.h; sourceTree = ""; }; FABDA9122552448200B5C523 /* b2_shape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2_shape.h; sourceTree = ""; }; FABDA9132552448200B5C523 /* b2_block_allocator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2_block_allocator.h; sourceTree = ""; }; FABDA9152552448200B5C523 /* b2_joint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2_joint.cpp; sourceTree = ""; }; FABDA9162552448200B5C523 /* b2_chain_polygon_contact.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2_chain_polygon_contact.h; sourceTree = ""; }; FABDA9172552448200B5C523 /* b2_chain_circle_contact.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2_chain_circle_contact.cpp; sourceTree = ""; }; FABDA9182552448200B5C523 /* b2_chain_circle_contact.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2_chain_circle_contact.h; sourceTree = ""; }; FABDA9192552448200B5C523 /* b2_polygon_circle_contact.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2_polygon_circle_contact.h; sourceTree = ""; }; FABDA91A2552448200B5C523 /* b2_circle_contact.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2_circle_contact.h; sourceTree = ""; }; FABDA91B2552448200B5C523 /* b2_weld_joint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2_weld_joint.cpp; sourceTree = ""; }; FABDA91C2552448200B5C523 /* b2_chain_polygon_contact.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2_chain_polygon_contact.cpp; sourceTree = ""; }; FABDA91D2552448200B5C523 /* b2_edge_circle_contact.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2_edge_circle_contact.h; sourceTree = ""; }; FABDA91E2552448200B5C523 /* b2_body.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2_body.cpp; sourceTree = ""; }; FABDA91F2552448200B5C523 /* b2_contact.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2_contact.cpp; sourceTree = ""; }; FABDA9202552448200B5C523 /* b2_revolute_joint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2_revolute_joint.cpp; sourceTree = ""; }; FABDA9212552448200B5C523 /* b2_contact_solver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2_contact_solver.h; sourceTree = ""; }; FABDA9222552448200B5C523 /* b2_contact_solver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2_contact_solver.cpp; sourceTree = ""; }; FABDA9232552448200B5C523 /* b2_world_callbacks.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2_world_callbacks.cpp; sourceTree = ""; }; FABDA9242552448200B5C523 /* b2_pulley_joint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2_pulley_joint.cpp; sourceTree = ""; }; FABDA9252552448200B5C523 /* b2_polygon_circle_contact.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2_polygon_circle_contact.cpp; sourceTree = ""; }; FABDA9262552448200B5C523 /* b2_edge_polygon_contact.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2_edge_polygon_contact.h; sourceTree = ""; }; FABDA9272552448200B5C523 /* b2_distance_joint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2_distance_joint.cpp; sourceTree = ""; }; FABDA9282552448200B5C523 /* b2_contact_manager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2_contact_manager.cpp; sourceTree = ""; }; FABDA9292552448200B5C523 /* b2_polygon_contact.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2_polygon_contact.cpp; sourceTree = ""; }; FABDA92A2552448200B5C523 /* b2_edge_polygon_contact.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2_edge_polygon_contact.cpp; sourceTree = ""; }; FABDA92B2552448200B5C523 /* b2_edge_circle_contact.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2_edge_circle_contact.cpp; sourceTree = ""; }; FABDA92C2552448200B5C523 /* b2_gear_joint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2_gear_joint.cpp; sourceTree = ""; }; FABDA92D2552448200B5C523 /* b2_friction_joint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2_friction_joint.cpp; sourceTree = ""; }; FABDA92E2552448200B5C523 /* b2_wheel_joint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2_wheel_joint.cpp; sourceTree = ""; }; FABDA92F2552448200B5C523 /* b2_polygon_contact.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2_polygon_contact.h; sourceTree = ""; }; FABDA9302552448200B5C523 /* b2_motor_joint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2_motor_joint.cpp; sourceTree = ""; }; FABDA9322552448200B5C523 /* b2_world.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2_world.cpp; sourceTree = ""; }; FABDA9332552448200B5C523 /* b2_island.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2_island.cpp; sourceTree = ""; }; FABDA9342552448200B5C523 /* b2_mouse_joint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2_mouse_joint.cpp; sourceTree = ""; }; FABDA9352552448200B5C523 /* b2_circle_contact.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2_circle_contact.cpp; sourceTree = ""; }; FABDA9362552448200B5C523 /* b2_prismatic_joint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2_prismatic_joint.cpp; sourceTree = ""; }; FABDA9372552448200B5C523 /* b2_fixture.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2_fixture.cpp; sourceTree = ""; }; FABDA9382552448200B5C523 /* b2_island.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2_island.h; sourceTree = ""; }; FABDA9392552448200B5C523 /* b2_motor_joint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2_motor_joint.h; sourceTree = ""; }; FABDA93A2552448200B5C523 /* b2_common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2_common.h; sourceTree = ""; }; FABDA93B2552448200B5C523 /* b2_weld_joint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2_weld_joint.h; sourceTree = ""; }; FABDA93C2552448200B5C523 /* b2_dynamic_tree.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2_dynamic_tree.h; sourceTree = ""; }; FABDA93D2552448200B5C523 /* b2_fixture.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2_fixture.h; sourceTree = ""; }; FABDA93E2552448200B5C523 /* b2_stack_allocator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2_stack_allocator.h; sourceTree = ""; }; FABDA93F2552448200B5C523 /* Box2D.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Box2D.h; sourceTree = ""; }; FABDA9402552448200B5C523 /* b2_types.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2_types.h; sourceTree = ""; }; FABDA9412552448200B5C523 /* b2_broad_phase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2_broad_phase.h; sourceTree = ""; }; FABDA9432552448200B5C523 /* b2_rope.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2_rope.cpp; sourceTree = ""; }; FABDA9442552448200B5C523 /* b2_settings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2_settings.h; sourceTree = ""; }; FABDA9452552448200B5C523 /* b2_revolute_joint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2_revolute_joint.h; sourceTree = ""; }; FABDA9462552448200B5C523 /* README.MODIFIED */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README.MODIFIED; sourceTree = ""; }; FABDA9472552448200B5C523 /* b2_rope.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2_rope.h; sourceTree = ""; }; FABDA9482552448200B5C523 /* b2_distance_joint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2_distance_joint.h; sourceTree = ""; }; FABDA9492552448200B5C523 /* b2_body.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2_body.h; sourceTree = ""; }; FABDA94A2552448200B5C523 /* b2_distance.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2_distance.h; sourceTree = ""; }; FABDA94B2552448200B5C523 /* b2_time_step.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2_time_step.h; sourceTree = ""; }; FABDA94C2552448200B5C523 /* b2_pulley_joint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2_pulley_joint.h; sourceTree = ""; }; FABDA94D2552448200B5C523 /* b2_circle_shape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2_circle_shape.h; sourceTree = ""; }; FABDA94E2552448200B5C523 /* b2_math.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2_math.h; sourceTree = ""; }; FABDA94F2552448200B5C523 /* b2_time_of_impact.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2_time_of_impact.h; sourceTree = ""; }; FABDA9502552448200B5C523 /* b2_mouse_joint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2_mouse_joint.h; sourceTree = ""; }; FABDA9522552448200B5C523 /* b2_draw.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2_draw.cpp; sourceTree = ""; }; FABDA9532552448200B5C523 /* b2_timer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2_timer.cpp; sourceTree = ""; }; FABDA9542552448200B5C523 /* b2_block_allocator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2_block_allocator.cpp; sourceTree = ""; }; FABDA9552552448200B5C523 /* b2_stack_allocator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2_stack_allocator.cpp; sourceTree = ""; }; FABDA9562552448200B5C523 /* b2_settings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2_settings.cpp; sourceTree = ""; }; FABDA9572552448200B5C523 /* b2_math.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2_math.cpp; sourceTree = ""; }; FABDA9582552448200B5C523 /* b2_friction_joint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2_friction_joint.h; sourceTree = ""; }; FABDA9592552448200B5C523 /* b2_contact.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2_contact.h; sourceTree = ""; }; FABDA95A2552448200B5C523 /* b2_prismatic_joint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2_prismatic_joint.h; sourceTree = ""; }; FABDA95B2552448200B5C523 /* b2_world.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2_world.h; sourceTree = ""; }; FABDA95C2552448200B5C523 /* b2_polygon_shape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2_polygon_shape.h; sourceTree = ""; }; FABDA95D2552448200B5C523 /* b2_wheel_joint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2_wheel_joint.h; sourceTree = ""; }; FABDA95E2552448200B5C523 /* b2_growable_stack.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2_growable_stack.h; sourceTree = ""; }; FABDA95F2552448200B5C523 /* b2_draw.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2_draw.h; sourceTree = ""; }; FABDA9602552448200B5C523 /* b2_collision.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2_collision.h; sourceTree = ""; }; FABDA9622552448200B5C523 /* b2_api.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2_api.h; sourceTree = ""; }; FABDA9632552448200B5C523 /* b2_chain_shape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2_chain_shape.h; sourceTree = ""; }; FABDA9642552448200B5C523 /* b2_gear_joint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2_gear_joint.h; sourceTree = ""; }; FABDA9652552448200B5C523 /* b2_timer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2_timer.h; sourceTree = ""; }; FABDA9662552448200B5C523 /* b2_world_callbacks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2_world_callbacks.h; sourceTree = ""; }; FABDA9682552448200B5C523 /* b2_collide_circle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2_collide_circle.cpp; sourceTree = ""; }; FABDA9692552448200B5C523 /* b2_circle_shape.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2_circle_shape.cpp; sourceTree = ""; }; FABDA96A2552448200B5C523 /* b2_collision.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2_collision.cpp; sourceTree = ""; }; FABDA96B2552448200B5C523 /* b2_collide_edge.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2_collide_edge.cpp; sourceTree = ""; }; FABDA96C2552448200B5C523 /* b2_chain_shape.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2_chain_shape.cpp; sourceTree = ""; }; FABDA96D2552448200B5C523 /* b2_broad_phase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2_broad_phase.cpp; sourceTree = ""; }; FABDA96E2552448200B5C523 /* b2_dynamic_tree.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2_dynamic_tree.cpp; sourceTree = ""; }; FABDA96F2552448200B5C523 /* b2_polygon_shape.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2_polygon_shape.cpp; sourceTree = ""; }; FABDA9702552448200B5C523 /* b2_collide_polygon.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2_collide_polygon.cpp; sourceTree = ""; }; FABDA9712552448200B5C523 /* b2_edge_shape.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2_edge_shape.cpp; sourceTree = ""; }; FABDA9722552448200B5C523 /* b2_time_of_impact.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2_time_of_impact.cpp; sourceTree = ""; }; FABDA9732552448200B5C523 /* b2_distance.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2_distance.cpp; sourceTree = ""; }; FABDA9742552448200B5C523 /* b2_contact_manager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2_contact_manager.h; sourceTree = ""; }; FABDA9752552448200B5C523 /* b2_edge_shape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2_edge_shape.h; sourceTree = ""; }; FAC271E323B5B5B400C200D3 /* renderstate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = renderstate.h; sourceTree = ""; }; FAC271E423B5B5B400C200D3 /* renderstate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = renderstate.cpp; sourceTree = ""; }; FAC734C11B2E021A00AB460A /* wrap_SoundData.lua */ = {isa = PBXFileReference; lastKnownFileType = text; path = wrap_SoundData.lua; sourceTree = ""; }; FAC734C21B2E628700AB460A /* wrap_ImageData.lua */ = {isa = PBXFileReference; lastKnownFileType = text; path = wrap_ImageData.lua; sourceTree = ""; }; FAC756F31E4F99B400B91289 /* Effect.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Effect.cpp; sourceTree = ""; }; FAC756F41E4F99B400B91289 /* Effect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Effect.h; sourceTree = ""; }; FAC756F81E4F99D200B91289 /* Effect.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Effect.cpp; sourceTree = ""; }; FAC756F91E4F99D200B91289 /* Effect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Effect.h; sourceTree = ""; }; FAC7CD5A1FE35E95006A60C7 /* physfs_internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = physfs_internal.h; sourceTree = ""; }; FAC7CD5B1FE35E95006A60C7 /* physfs_platform_qnx.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = physfs_platform_qnx.c; sourceTree = ""; }; FAC7CD5C1FE35E95006A60C7 /* physfs.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = physfs.c; sourceTree = ""; }; FAC7CD5D1FE35E95006A60C7 /* physfs_archiver_7z.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = physfs_archiver_7z.c; sourceTree = ""; }; FAC7CD5E1FE35E95006A60C7 /* physfs_platform_unix.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = physfs_platform_unix.c; sourceTree = ""; }; FAC7CD5F1FE35E95006A60C7 /* physfs_archiver_slb.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = physfs_archiver_slb.c; sourceTree = ""; }; FAC7CD601FE35E95006A60C7 /* physfs_platform_winrt.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = physfs_platform_winrt.cpp; sourceTree = ""; }; FAC7CD611FE35E95006A60C7 /* physfs_archiver_mvl.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = physfs_archiver_mvl.c; sourceTree = ""; }; FAC7CD621FE35E95006A60C7 /* physfs_archiver_wad.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = physfs_archiver_wad.c; sourceTree = ""; }; FAC7CD631FE35E95006A60C7 /* physfs_casefolding.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = physfs_casefolding.h; sourceTree = ""; }; FAC7CD641FE35E95006A60C7 /* physfs_platform_os2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = physfs_platform_os2.c; sourceTree = ""; }; FAC7CD651FE35E95006A60C7 /* physfs_platform_haiku.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = physfs_platform_haiku.cpp; sourceTree = ""; }; FAC7CD661FE35E95006A60C7 /* physfs_platform_windows.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = physfs_platform_windows.c; sourceTree = ""; }; FAC7CD671FE35E95006A60C7 /* physfs_archiver_unpacked.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = physfs_archiver_unpacked.c; sourceTree = ""; }; FAC7CD681FE35E95006A60C7 /* physfs_unicode.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = physfs_unicode.c; sourceTree = ""; }; FAC7CD691FE35E95006A60C7 /* physfs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = physfs.h; sourceTree = ""; }; FAC7CD6A1FE35E95006A60C7 /* physfs_archiver_vdf.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = physfs_archiver_vdf.c; sourceTree = ""; }; FAC7CD6B1FE35E95006A60C7 /* physfs_platform_apple.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = physfs_platform_apple.m; sourceTree = ""; }; FAC7CD6C1FE35E95006A60C7 /* physfs_archiver_dir.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = physfs_archiver_dir.c; sourceTree = ""; }; FAC7CD6D1FE35E95006A60C7 /* physfs_byteorder.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = physfs_byteorder.c; sourceTree = ""; }; FAC7CD6E1FE35E95006A60C7 /* physfs_archiver_iso9660.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = physfs_archiver_iso9660.c; sourceTree = ""; }; FAC7CD6F1FE35E95006A60C7 /* physfs_archiver_qpak.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = physfs_archiver_qpak.c; sourceTree = ""; }; FAC7CD701FE35E95006A60C7 /* physfs_platforms.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = physfs_platforms.h; sourceTree = ""; }; FAC7CD711FE35E95006A60C7 /* physfs_lzmasdk.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = physfs_lzmasdk.h; sourceTree = ""; }; FAC7CD721FE35E95006A60C7 /* physfs_platform_posix.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = physfs_platform_posix.c; sourceTree = ""; }; FAC7CD731FE35E95006A60C7 /* physfs_miniz.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = physfs_miniz.h; sourceTree = ""; }; FAC7CD741FE35E95006A60C7 /* physfs_archiver_grp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = physfs_archiver_grp.c; sourceTree = ""; }; FAC7CD751FE35E95006A60C7 /* physfs_archiver_hog.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = physfs_archiver_hog.c; sourceTree = ""; }; FAC7CD761FE35E95006A60C7 /* physfs_archiver_zip.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = physfs_archiver_zip.c; sourceTree = ""; }; FAC7CD951FE755B3006A60C7 /* lz4opt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = lz4opt.h; sourceTree = ""; }; FAC8E54323AC832A007B07C8 /* NativeFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NativeFile.h; sourceTree = ""; }; FAC8E54423AC832A007B07C8 /* NativeFile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NativeFile.cpp; sourceTree = ""; }; FAC8E54823AC8379007B07C8 /* wrap_NativeFile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_NativeFile.cpp; sourceTree = ""; }; FAC8E54923AC8379007B07C8 /* wrap_NativeFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_NativeFile.h; sourceTree = ""; }; FAC8E54E23B01C0C007B07C8 /* macos.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = macos.h; sourceTree = ""; }; FAC8E54F23B01C0C007B07C8 /* macos.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = macos.mm; sourceTree = ""; }; FACA02E01F5E396B0084B28F /* CompressedData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CompressedData.cpp; sourceTree = ""; }; FACA02E11F5E396B0084B28F /* CompressedData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CompressedData.h; sourceTree = ""; }; FACA02E21F5E396B0084B28F /* Compressor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Compressor.cpp; sourceTree = ""; }; FACA02E31F5E396B0084B28F /* Compressor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Compressor.h; sourceTree = ""; }; FACA02E41F5E396B0084B28F /* DataModule.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DataModule.cpp; sourceTree = ""; }; FACA02E51F5E396B0084B28F /* DataModule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DataModule.h; sourceTree = ""; }; FACA02E61F5E396B0084B28F /* HashFunction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HashFunction.cpp; sourceTree = ""; }; FACA02E71F5E396B0084B28F /* HashFunction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HashFunction.h; sourceTree = ""; }; FACA02E81F5E396B0084B28F /* wrap_CompressedData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_CompressedData.cpp; sourceTree = ""; }; FACA02E91F5E396B0084B28F /* wrap_CompressedData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_CompressedData.h; sourceTree = ""; }; FACA02EA1F5E396B0084B28F /* wrap_DataModule.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_DataModule.cpp; sourceTree = ""; }; FACA02EB1F5E396B0084B28F /* wrap_DataModule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_DataModule.h; sourceTree = ""; }; FACA06A5293EE5CD001A2557 /* wrap_Sensor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_Sensor.cpp; sourceTree = ""; }; FACA06A6293EE5CD001A2557 /* Sensor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Sensor.h; sourceTree = ""; }; FACA06A8293EE5CD001A2557 /* Sensor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Sensor.h; sourceTree = ""; }; FACA06A9293EE5CD001A2557 /* Sensor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Sensor.cpp; sourceTree = ""; }; FACA06AA293EE5CD001A2557 /* Sensor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Sensor.cpp; sourceTree = ""; }; FACA06AB293EE5CD001A2557 /* wrap_Sensor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_Sensor.h; sourceTree = ""; }; FACFB750276D7E2B0089F78D /* freetype.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = freetype.xcframework; path = ios/libraries/freetype.xcframework; sourceTree = ""; }; FACFB752276D7F6F0089F78D /* Lua.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = Lua.xcframework; path = ios/libraries/Lua.xcframework; sourceTree = ""; }; FAD19A151DFF8CA200D5398A /* ImageDataBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ImageDataBase.cpp; sourceTree = ""; }; FAD19A161DFF8CA200D5398A /* ImageDataBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageDataBase.h; sourceTree = ""; }; FAD43ECB1FF312D800831BB8 /* freetype.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = freetype.framework; path = macosx/Frameworks/freetype.framework; sourceTree = ""; }; FADF4CC52663D0EC004F95C1 /* libz.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = usr/lib/libz.tbd; sourceTree = SDKROOT; }; FADF53F61E3C7ACD00012CC0 /* Buffer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Buffer.cpp; sourceTree = ""; }; FADF53F71E3C7ACD00012CC0 /* Buffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Buffer.h; sourceTree = ""; }; FADF53FB1E3D74F200012CC0 /* TextBatch.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TextBatch.cpp; sourceTree = ""; }; FADF53FC1E3D74F200012CC0 /* TextBatch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextBatch.h; sourceTree = ""; }; FADF54001E3D77B500012CC0 /* wrap_TextBatch.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_TextBatch.cpp; sourceTree = ""; }; FADF54011E3D77B500012CC0 /* wrap_TextBatch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_TextBatch.h; sourceTree = ""; }; FADF54051E3D78F700012CC0 /* Video.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Video.cpp; sourceTree = ""; }; FADF54061E3D78F700012CC0 /* Video.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Video.h; sourceTree = ""; }; FADF540A1E3D7CDD00012CC0 /* wrap_Video.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_Video.cpp; sourceTree = ""; }; FADF540B1E3D7CDD00012CC0 /* wrap_Video.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_Video.h; sourceTree = ""; }; FADF540C1E3D7CDD00012CC0 /* wrap_Video.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = wrap_Video.lua; sourceTree = ""; }; FADF541E1E3DA52C00012CC0 /* wrap_ParticleSystem.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_ParticleSystem.cpp; sourceTree = ""; }; FADF541F1E3DA52C00012CC0 /* wrap_ParticleSystem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_ParticleSystem.h; sourceTree = ""; }; FADF54231E3DA5BA00012CC0 /* Mesh.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Mesh.cpp; sourceTree = ""; }; FADF54241E3DA5BA00012CC0 /* Mesh.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Mesh.h; sourceTree = ""; }; FADF54281E3DAADA00012CC0 /* wrap_Mesh.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_Mesh.cpp; sourceTree = ""; }; FADF54291E3DAADA00012CC0 /* wrap_Mesh.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_Mesh.h; sourceTree = ""; }; FADF542D1E3DABF600012CC0 /* SpriteBatch.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SpriteBatch.cpp; sourceTree = ""; }; FADF542E1E3DABF600012CC0 /* SpriteBatch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpriteBatch.h; sourceTree = ""; }; FADF54321E3DAE6E00012CC0 /* wrap_SpriteBatch.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_SpriteBatch.cpp; sourceTree = ""; }; FADF54331E3DAE6E00012CC0 /* wrap_SpriteBatch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_SpriteBatch.h; sourceTree = ""; }; FADF54371E3DAFBA00012CC0 /* wrap_Graphics.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = wrap_Graphics.lua; sourceTree = ""; }; FADF54391E3DAFF700012CC0 /* wrap_Graphics.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_Graphics.cpp; sourceTree = ""; }; FADF543A1E3DAFF700012CC0 /* wrap_Graphics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_Graphics.h; sourceTree = ""; }; FAE272501C05A15B00A67640 /* ParticleSystem.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ParticleSystem.cpp; sourceTree = ""; }; FAE272511C05A15B00A67640 /* ParticleSystem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ParticleSystem.h; sourceTree = ""; }; FAECA1B01F3164700095D008 /* CompressedSlice.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = CompressedSlice.cpp; sourceTree = ""; }; FAECA1B11F3164700095D008 /* CompressedSlice.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CompressedSlice.h; sourceTree = ""; }; FAF13FC21E20934C00F898D2 /* CodeGen.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CodeGen.cpp; sourceTree = ""; }; FAF13FC31E20934C00F898D2 /* Link.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Link.cpp; sourceTree = ""; }; FAF13FC51E20934C00F898D2 /* arrays.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = arrays.h; sourceTree = ""; }; FAF13FC61E20934C00F898D2 /* BaseTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BaseTypes.h; sourceTree = ""; }; FAF13FC71E20934C00F898D2 /* Common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Common.h; sourceTree = ""; }; FAF13FC81E20934C00F898D2 /* ConstantUnion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ConstantUnion.h; sourceTree = ""; }; FAF13FC91E20934C00F898D2 /* InfoSink.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InfoSink.h; sourceTree = ""; }; FAF13FCA1E20934C00F898D2 /* InitializeGlobals.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InitializeGlobals.h; sourceTree = ""; }; FAF13FCB1E20934C00F898D2 /* intermediate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = intermediate.h; sourceTree = ""; }; FAF13FCC1E20934C00F898D2 /* PoolAlloc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PoolAlloc.h; sourceTree = ""; }; FAF13FCD1E20934C00F898D2 /* ResourceLimits.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ResourceLimits.h; sourceTree = ""; }; FAF13FD01E20934C00F898D2 /* ShHandle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ShHandle.h; sourceTree = ""; }; FAF13FD11E20934C00F898D2 /* Types.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Types.h; sourceTree = ""; }; FAF13FD31E20934C00F898D2 /* Constant.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Constant.cpp; sourceTree = ""; }; FAF13FD41E20934C00F898D2 /* gl_types.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gl_types.h; sourceTree = ""; }; FAF13FD61E20934C00F898D2 /* glslang_tab.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = glslang_tab.cpp; sourceTree = ""; }; FAF13FD71E20934C00F898D2 /* glslang_tab.cpp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = glslang_tab.cpp.h; sourceTree = ""; }; FAF13FD81E20934C00F898D2 /* InfoSink.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InfoSink.cpp; sourceTree = ""; }; FAF13FD91E20934C00F898D2 /* Initialize.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Initialize.cpp; sourceTree = ""; }; FAF13FDA1E20934C00F898D2 /* Initialize.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Initialize.h; sourceTree = ""; }; FAF13FDB1E20934C00F898D2 /* Intermediate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Intermediate.cpp; sourceTree = ""; }; FAF13FDC1E20934C00F898D2 /* intermOut.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = intermOut.cpp; sourceTree = ""; }; FAF13FDD1E20934C00F898D2 /* IntermTraverse.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IntermTraverse.cpp; sourceTree = ""; }; FAF13FDE1E20934C00F898D2 /* iomapper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = iomapper.cpp; sourceTree = ""; }; FAF13FDF1E20934C00F898D2 /* iomapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = iomapper.h; sourceTree = ""; }; FAF13FE01E20934C00F898D2 /* limits.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = limits.cpp; sourceTree = ""; }; FAF13FE11E20934C00F898D2 /* linkValidate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = linkValidate.cpp; sourceTree = ""; }; FAF13FE21E20934C00F898D2 /* LiveTraverser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LiveTraverser.h; sourceTree = ""; }; FAF13FE31E20934C00F898D2 /* localintermediate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = localintermediate.h; sourceTree = ""; }; FAF13FE41E20934C00F898D2 /* parseConst.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = parseConst.cpp; sourceTree = ""; }; FAF13FE51E20934C00F898D2 /* ParseContextBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ParseContextBase.cpp; sourceTree = ""; }; FAF13FE61E20934C00F898D2 /* ParseHelper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ParseHelper.cpp; sourceTree = ""; }; FAF13FE71E20934C00F898D2 /* ParseHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ParseHelper.h; sourceTree = ""; }; FAF13FE81E20934C00F898D2 /* parseVersions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = parseVersions.h; sourceTree = ""; }; FAF13FE91E20934C00F898D2 /* PoolAlloc.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PoolAlloc.cpp; sourceTree = ""; }; FAF13FEB1E20934C00F898D2 /* Pp.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Pp.cpp; sourceTree = ""; }; FAF13FEC1E20934C00F898D2 /* PpAtom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PpAtom.cpp; sourceTree = ""; }; FAF13FED1E20934C00F898D2 /* PpContext.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PpContext.cpp; sourceTree = ""; }; FAF13FEE1E20934C00F898D2 /* PpContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PpContext.h; sourceTree = ""; }; FAF13FF01E20934C00F898D2 /* PpScanner.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PpScanner.cpp; sourceTree = ""; }; FAF13FF21E20934C00F898D2 /* PpTokens.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PpTokens.cpp; sourceTree = ""; }; FAF13FF31E20934C00F898D2 /* PpTokens.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PpTokens.h; sourceTree = ""; }; FAF13FF41E20934C00F898D2 /* propagateNoContraction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = propagateNoContraction.cpp; sourceTree = ""; }; FAF13FF51E20934C00F898D2 /* propagateNoContraction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = propagateNoContraction.h; sourceTree = ""; }; FAF13FF61E20934C00F898D2 /* reflection.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = reflection.cpp; sourceTree = ""; }; FAF13FF71E20934C00F898D2 /* reflection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = reflection.h; sourceTree = ""; }; FAF13FF81E20934C00F898D2 /* RemoveTree.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RemoveTree.cpp; sourceTree = ""; }; FAF13FF91E20934C00F898D2 /* RemoveTree.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RemoveTree.h; sourceTree = ""; }; FAF13FFA1E20934C00F898D2 /* Scan.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Scan.cpp; sourceTree = ""; }; FAF13FFB1E20934C00F898D2 /* Scan.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Scan.h; sourceTree = ""; }; FAF13FFC1E20934C00F898D2 /* ScanContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScanContext.h; sourceTree = ""; }; FAF13FFD1E20934C00F898D2 /* ShaderLang.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ShaderLang.cpp; sourceTree = ""; }; FAF13FFE1E20934C00F898D2 /* SymbolTable.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SymbolTable.cpp; sourceTree = ""; }; FAF13FFF1E20934C00F898D2 /* SymbolTable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SymbolTable.h; sourceTree = ""; }; FAF140001E20934C00F898D2 /* Versions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Versions.cpp; sourceTree = ""; }; FAF140011E20934C00F898D2 /* Versions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Versions.h; sourceTree = ""; }; FAF140031E20934C00F898D2 /* osinclude.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = osinclude.h; sourceTree = ""; }; FAF140211E20934C00F898D2 /* ossource.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ossource.cpp; sourceTree = ""; }; FAF140291E20934C00F898D2 /* ShaderLang.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ShaderLang.h; sourceTree = ""; }; FAF1889C1E9DA834008C1479 /* Optional.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Optional.h; sourceTree = ""; }; FAF6C9C123C2DE2900D7B5BC /* SPVRemapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPVRemapper.h; sourceTree = ""; }; FAF6C9C223C2DE2900D7B5BC /* SpvBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpvBuilder.h; sourceTree = ""; }; FAF6C9C323C2DE2900D7B5BC /* SpvPostProcess.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SpvPostProcess.cpp; sourceTree = ""; }; FAF6C9C423C2DE2900D7B5BC /* SpvTools.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpvTools.h; sourceTree = ""; }; FAF6C9C523C2DE2900D7B5BC /* SpvTools.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SpvTools.cpp; sourceTree = ""; }; FAF6C9C623C2DE2900D7B5BC /* InReadableOrder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InReadableOrder.cpp; sourceTree = ""; }; FAF6C9C723C2DE2900D7B5BC /* GLSL.ext.AMD.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GLSL.ext.AMD.h; sourceTree = ""; }; FAF6C9C823C2DE2900D7B5BC /* doc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = doc.h; sourceTree = ""; }; FAF6C9CA23C2DE2900D7B5BC /* SpvBuilder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SpvBuilder.cpp; sourceTree = ""; }; FAF6C9CB23C2DE2900D7B5BC /* GLSL.ext.EXT.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GLSL.ext.EXT.h; sourceTree = ""; }; FAF6C9CC23C2DE2900D7B5BC /* GLSL.ext.KHR.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GLSL.ext.KHR.h; sourceTree = ""; }; FAF6C9CD23C2DE2900D7B5BC /* GLSL.ext.NV.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GLSL.ext.NV.h; sourceTree = ""; }; FAF6C9CE23C2DE2900D7B5BC /* GlslangToSpv.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GlslangToSpv.cpp; sourceTree = ""; }; FAF6C9CF23C2DE2900D7B5BC /* spvIR.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = spvIR.h; sourceTree = ""; }; FAF6C9D023C2DE2900D7B5BC /* bitutils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = bitutils.h; sourceTree = ""; }; FAF6C9D123C2DE2900D7B5BC /* disassemble.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = disassemble.h; sourceTree = ""; }; FAF6C9D223C2DE2900D7B5BC /* GlslangToSpv.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GlslangToSpv.h; sourceTree = ""; }; FAF6C9D323C2DE2900D7B5BC /* GLSL.std.450.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GLSL.std.450.h; sourceTree = ""; }; FAF6C9D423C2DE2900D7B5BC /* SPVRemapper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SPVRemapper.cpp; sourceTree = ""; }; FAF6C9D523C2DE2900D7B5BC /* Logger.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Logger.cpp; sourceTree = ""; }; FAF6C9D623C2DE2900D7B5BC /* hex_float.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = hex_float.h; sourceTree = ""; }; FAF6C9D723C2DE2900D7B5BC /* Logger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Logger.h; sourceTree = ""; }; FAF6C9D823C2DE2900D7B5BC /* doc.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = doc.cpp; sourceTree = ""; }; FAF6C9D923C2DE2900D7B5BC /* disassemble.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = disassemble.cpp; sourceTree = ""; }; FAF949FD21DEE8B7001CD27E /* wrap_Event.lua */ = {isa = PBXFileReference; lastKnownFileType = text; path = wrap_Event.lua; sourceTree = ""; }; FAFEB29528F210540025D7D0 /* unixdgram.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = unixdgram.c; sourceTree = ""; }; FAFEB29628F210550025D7D0 /* unixdgram.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = unixdgram.h; sourceTree = ""; }; FAFEB29728F210550025D7D0 /* unixstream.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = unixstream.c; sourceTree = ""; }; FAFEB29828F210550025D7D0 /* unixstream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = unixstream.h; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ FA0B78DA1A958B90000E1D17 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( FACFB751276D7E3B0089F78D /* freetype.xcframework in Frameworks */, D923E7D3296B85B9002FF1B3 /* harfbuzz.xcframework in Frameworks */, FA84DE7A277D4C88002674C6 /* modplug.xcframework in Frameworks */, FA84DE7C277E045E002674C6 /* ogg.xcframework in Frameworks */, FACFB753276D7F860089F78D /* Lua.xcframework in Frameworks */, D9596F622CBAC93800BE58C1 /* SDL3.xcframework in Frameworks */, FA7E9207277E120900C24CB2 /* theora.xcframework in Frameworks */, FA84DE7E277E0A43002674C6 /* vorbis.xcframework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; FA577AAB16C7507900860150 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( FA18CEE723DBC6F700263725 /* Metal.framework in Frameworks */, FA27B3C91B498623008A9DCE /* theora.framework in Frameworks */, FAA627CE18E7E1560080752D /* CoreServices.framework in Frameworks */, FAAFF04416CB11C700CCDE45 /* OpenAL-Soft.framework in Frameworks */, FAD43ECC1FF312D800831BB8 /* freetype.framework in Frameworks */, FA577AB016C7507900860150 /* Cocoa.framework in Frameworks */, FA577AC516C7513400860150 /* libmodplug.framework in Frameworks */, FADF4CC62663D0EC004F95C1 /* libz.tbd in Frameworks */, D9596F612CBAC93800BE58C1 /* SDL3.xcframework in Frameworks */, FA577AC816C7513C00860150 /* ogg.framework in Frameworks */, D9DAB9322963CD7500C64820 /* harfbuzz.framework in Frameworks */, FA577ACA16C7514100860150 /* OpenGL.framework in Frameworks */, FA577ACD16C7514C00860150 /* vorbis.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ 2F654C0235EB60C744A22507 /* Products */ = { isa = PBXGroup; children = ( FA577AAF16C7507900860150 /* love.framework */, FA0B78DD1A958B90000E1D17 /* liblove.a */, ); name = Products; sourceTree = ""; }; 352E6C5F6F8A681766EB5299 /* scripts */ = { isa = PBXGroup; children = ( FA577A8C16C71D3600860150 /* auto.lua */, FA283EDC1B27CFAA00C70067 /* nogame.lua */, FA283EDD1B27CFAA00C70067 /* nogame.lua.h */, ); name = scripts; path = ../../src/scripts; sourceTree = ""; }; 54067CFB7D564E5764FA17DC /* love */ = { isa = PBXGroup; children = ( FA0B78F61A958E3B000E1D17 /* common */, FA0B794D1A958EA3000E1D17 /* libraries */, FA0B7B3C1A95902C000E1D17 /* modules */, 352E6C5F6F8A681766EB5299 /* scripts */, FA577A6616C7199700860150 /* Frameworks */, FA5D24A11A96D24500C6FC8F /* Libraries */, FA08F5AC16C751BA00F007B5 /* Resources */, 2F654C0235EB60C744A22507 /* Products */, ); name = love; sourceTree = ""; usesTabs = 1; }; D9DB6E312B4B41100037A1F6 /* ResourceLimits */ = { isa = PBXGroup; children = ( D9DB6E332B4B41100037A1F6 /* ResourceLimits.cpp */, ); path = ResourceLimits; sourceTree = ""; }; D9F0C2D32C680A5500BB2D25 /* generic */ = { isa = PBXGroup; children = ( D9F0C2CD2C680A5500BB2D25 /* CurlClient.cpp */, D9F0C2CE2C680A5500BB2D25 /* CurlClient.h */, D9F0C2CF2C680A5500BB2D25 /* LinktimeLibraryLoader.cpp */, D9F0C2D02C680A5500BB2D25 /* OpenSSLConnection.cpp */, D9F0C2D12C680A5500BB2D25 /* OpenSSLConnection.h */, D9F0C2D22C680A5500BB2D25 /* UnixLibraryLoader.cpp */, ); path = generic; sourceTree = ""; }; FA08F5AC16C751BA00F007B5 /* Resources */ = { isa = PBXGroup; children = ( FA08F5AE16C7525600F007B5 /* liblove-macosx.plist */, ); name = Resources; sourceTree = ""; }; FA0B78F61A958E3B000E1D17 /* common */ = { isa = PBXGroup; children = ( FAA3A9AC1B7D465A00CED060 /* android.cpp */, FAA3A9AD1B7D465A00CED060 /* android.h */, FAAC2F7F251A9D3E00BCB81B /* apple.h */, FAAC2F78251A9D2200BCB81B /* apple.mm */, FA0B78F71A958E3B000E1D17 /* b64.cpp */, FA0B78F81A958E3B000E1D17 /* b64.h */, FA6BDE5B1F31725300786805 /* Color.h */, FA0B78F91A958E3B000E1D17 /* config.h */, FA9D8DD41DEF8411002CD881 /* Data.cpp */, FA0B78FA1A958E3B000E1D17 /* Data.h */, FA0B78FB1A958E3B000E1D17 /* delay.cpp */, FA0B78FC1A958E3B000E1D17 /* delay.h */, FA91DA891F377C3900C80E33 /* deprecation.cpp */, FA91DA8A1F377C3900C80E33 /* deprecation.h */, FA0B78FD1A958E3B000E1D17 /* EnumMap.h */, FA0B78FE1A958E3B000E1D17 /* Exception.cpp */, FA0B78FF1A958E3B000E1D17 /* Exception.h */, FA0A3A5E23366CE9001C269E /* floattypes.cpp */, FA0A3A5D23366CE9001C269E /* floattypes.h */, FA0B79001A958E3B000E1D17 /* int.h */, FA0B7EF01A959D2C000E1D17 /* ios.h */, FA0B7EF11A959D2C000E1D17 /* ios.mm */, FAC8E54E23B01C0C007B07C8 /* macos.h */, FAC8E54F23B01C0C007B07C8 /* macos.mm */, FA0B79011A958E3B000E1D17 /* math.h */, FA0B79021A958E3B000E1D17 /* Matrix.cpp */, FA0B79031A958E3B000E1D17 /* Matrix.h */, FA56AA361FAFF02000A43D5F /* memory.cpp */, FA56AA371FAFF02000A43D5F /* memory.h */, FA0B79061A958E3B000E1D17 /* Module.cpp */, FA0B79071A958E3B000E1D17 /* Module.h */, FA0B79081A958E3B000E1D17 /* Object.cpp */, FA0B79091A958E3B000E1D17 /* Object.h */, FAF1889C1E9DA834008C1479 /* Optional.h */, FA9D8DCF1DEB56C3002CD881 /* pixelformat.cpp */, FA9D8DD01DEB56C3002CD881 /* pixelformat.h */, FAB922C3257D99EF0035DAD6 /* Range.h */, FA0B790C1A958E3B000E1D17 /* Reference.cpp */, FA0B790D1A958E3B000E1D17 /* Reference.h */, FA0B790E1A958E3B000E1D17 /* runtime.cpp */, FA0B790F1A958E3B000E1D17 /* runtime.h */, FA9D8DD51DEF8411002CD881 /* Stream.cpp */, FA9D8DD61DEF8411002CD881 /* Stream.h */, FA15DFAB1F9B8C850042AB22 /* StringMap.cpp */, FA0B79101A958E3B000E1D17 /* StringMap.h */, FA620A391AA305F6005DB4C2 /* types.cpp */, FA0B79111A958E3B000E1D17 /* types.h */, FA0B79121A958E3B000E1D17 /* utf8.cpp */, FA0B79131A958E3B000E1D17 /* utf8.h */, FA0B79141A958E3B000E1D17 /* Variant.cpp */, FA0B79151A958E3B000E1D17 /* Variant.h */, FA0B79161A958E3B000E1D17 /* Vector.cpp */, FA0B79171A958E3B000E1D17 /* Vector.h */, FA0B79181A958E3B000E1D17 /* version.h */, ); name = common; path = ../../src/common; sourceTree = ""; }; FA0B794D1A958EA3000E1D17 /* libraries */ = { isa = PBXGroup; children = ( FABDA9102552448200B5C523 /* box2d */, FA0B79B41A958EA3000E1D17 /* ddsparse */, FA522D5023F9FF2A0059EE3C /* dr */, FA0B79B81A958EA3000E1D17 /* enet */, FA0B79D31A958EA3000E1D17 /* glad */, FAF13FBF1E20934C00F898D2 /* glslang */, FA0B79D81A958EA3000E1D17 /* lodepng */, FA94724527A6EE1B00817677 /* luahttps */, FAAA3FD21F64B3AD00F89E99 /* lua53 */, FA0B79DB1A958EA3000E1D17 /* luasocket */, FAB17BE31ABFAA9000F9BA27 /* lz4 */, FA0B7A141A958EA3000E1D17 /* noise1234 */, FAC7CD591FE35E95006A60C7 /* physfs */, FA18CEF123DCF67800263725 /* spirv_cross */, FA0B7A171A958EA3000E1D17 /* stb */, FA1557BE1CE90A2C00AFF582 /* tinyexr */, FA0B7A191A958EA3000E1D17 /* utf8 */, FA0B7A1F1A958EA3000E1D17 /* Wuff */, FA4F2B761DE0125B00CA37D7 /* xxHash */, ); name = libraries; path = ../../src/libraries; sourceTree = ""; }; FA0B79B41A958EA3000E1D17 /* ddsparse */ = { isa = PBXGroup; children = ( FA0B79B51A958EA3000E1D17 /* ddsinfo.h */, FA0B79B61A958EA3000E1D17 /* ddsparse.cpp */, FA0B79B71A958EA3000E1D17 /* ddsparse.h */, ); path = ddsparse; sourceTree = ""; }; FA0B79B81A958EA3000E1D17 /* enet */ = { isa = PBXGroup; children = ( FA0B79B91A958EA3000E1D17 /* enet.cpp */, FA0B79BA1A958EA3000E1D17 /* libenet */, FA0B79D21A958EA3000E1D17 /* lua-enet.h */, ); path = enet; sourceTree = ""; }; FA0B79BA1A958EA3000E1D17 /* libenet */ = { isa = PBXGroup; children = ( FA0B79BB1A958EA3000E1D17 /* callbacks.c */, FA0B79BD1A958EA3000E1D17 /* compress.c */, FA0B79BE1A958EA3000E1D17 /* host.c */, FA0B79BF1A958EA3000E1D17 /* include */, FA0B79CB1A958EA3000E1D17 /* list.c */, FA0B79CC1A958EA3000E1D17 /* packet.c */, FA0B79CD1A958EA3000E1D17 /* peer.c */, FA0B79CE1A958EA3000E1D17 /* protocol.c */, FA0B79D01A958EA3000E1D17 /* unix.c */, FA0B79D11A958EA3000E1D17 /* win32.c */, ); path = libenet; sourceTree = ""; }; FA0B79BF1A958EA3000E1D17 /* include */ = { isa = PBXGroup; children = ( FA0B79C01A958EA3000E1D17 /* enet */, ); path = include; sourceTree = ""; }; FA0B79C01A958EA3000E1D17 /* enet */ = { isa = PBXGroup; children = ( FA0B79C11A958EA3000E1D17 /* callbacks.h */, FA0B79C21A958EA3000E1D17 /* enet.h */, FA0B79C31A958EA3000E1D17 /* list.h */, FA0B79C41A958EA3000E1D17 /* protocol.h */, FA0B79C51A958EA3000E1D17 /* time.h */, FA0B79C61A958EA3000E1D17 /* types.h */, FA0B79C71A958EA3000E1D17 /* unix.h */, FA0B79C81A958EA3000E1D17 /* utility.h */, FA0B79C91A958EA3000E1D17 /* win32.h */, ); path = enet; sourceTree = ""; }; FA0B79D31A958EA3000E1D17 /* glad */ = { isa = PBXGroup; children = ( FA0B79D41A958EA3000E1D17 /* glad.cpp */, FA0B79D61A958EA3000E1D17 /* glad.hpp */, FA0B79D71A958EA3000E1D17 /* gladfuncs.hpp */, ); path = glad; sourceTree = ""; }; FA0B79D81A958EA3000E1D17 /* lodepng */ = { isa = PBXGroup; children = ( FA0B79D91A958EA3000E1D17 /* lodepng.cpp */, FA0B79DA1A958EA3000E1D17 /* lodepng.h */, ); path = lodepng; sourceTree = ""; }; FA0B79DB1A958EA3000E1D17 /* luasocket */ = { isa = PBXGroup; children = ( FA0B79DC1A958EA3000E1D17 /* libluasocket */, FA0B7A0E1A958EA3000E1D17 /* luasocket.cpp */, FA0B7A0F1A958EA3000E1D17 /* luasocket.h */, ); path = luasocket; sourceTree = ""; }; FA0B79DC1A958EA3000E1D17 /* libluasocket */ = { isa = PBXGroup; children = ( 217DFB9D1D9F6D490055D849 /* auxiliar.c */, 217DFB9E1D9F6D490055D849 /* auxiliar.h */, 217DFB9F1D9F6D490055D849 /* buffer.c */, 217DFBA01D9F6D490055D849 /* buffer.h */, 217DFBA11D9F6D490055D849 /* compat.c */, 217DFBA21D9F6D490055D849 /* compat.h */, 217DFBA31D9F6D490055D849 /* except.c */, 217DFBA41D9F6D490055D849 /* except.h */, 217DFBA51D9F6D490055D849 /* ftp.lua */, 217DFBA61D9F6D490055D849 /* ftp.lua.h */, 217DFBA71D9F6D490055D849 /* headers.lua */, 217DFBA81D9F6D490055D849 /* headers.lua.h */, 217DFBA91D9F6D490055D849 /* http.lua */, 217DFBAA1D9F6D490055D849 /* http.lua.h */, 217DFBAB1D9F6D490055D849 /* inet.c */, 217DFBAC1D9F6D490055D849 /* inet.h */, 217DFBAD1D9F6D490055D849 /* io.c */, 217DFBAE1D9F6D490055D849 /* io.h */, 217DFBAF1D9F6D490055D849 /* ltn12.lua */, 217DFBB01D9F6D490055D849 /* ltn12.lua.h */, 217DFBB11D9F6D490055D849 /* luasocket.c */, 217DFBB21D9F6D490055D849 /* luasocket.h */, 217DFBB41D9F6D490055D849 /* mbox.lua */, 217DFBB51D9F6D490055D849 /* mbox.lua.h */, 217DFBB61D9F6D490055D849 /* mime.c */, 217DFBB71D9F6D490055D849 /* mime.h */, 217DFBB81D9F6D490055D849 /* mime.lua */, 217DFBB91D9F6D490055D849 /* mime.lua.h */, 217DFBBA1D9F6D490055D849 /* options.c */, 217DFBBB1D9F6D490055D849 /* options.h */, 217DFBBC1D9F6D490055D849 /* pierror.h */, 217DFBBD1D9F6D490055D849 /* select.c */, 217DFBBE1D9F6D490055D849 /* select.h */, 217DFBBF1D9F6D490055D849 /* serial.c */, 217DFBC01D9F6D490055D849 /* smtp.lua */, 217DFBC11D9F6D490055D849 /* smtp.lua.h */, 217DFBC21D9F6D490055D849 /* socket.h */, 217DFBC31D9F6D490055D849 /* socket.lua */, 217DFBC41D9F6D490055D849 /* socket.lua.h */, 217DFBC51D9F6D490055D849 /* tcp.c */, 217DFBC61D9F6D490055D849 /* tcp.h */, 217DFBC71D9F6D490055D849 /* timeout.c */, 217DFBC81D9F6D490055D849 /* timeout.h */, 217DFBC91D9F6D490055D849 /* tp.lua */, 217DFBCA1D9F6D490055D849 /* tp.lua.h */, 217DFBCB1D9F6D490055D849 /* udp.c */, 217DFBCC1D9F6D490055D849 /* udp.h */, 217DFBCD1D9F6D490055D849 /* unix.c */, 217DFBCE1D9F6D490055D849 /* unix.h */, FAFEB29528F210540025D7D0 /* unixdgram.c */, FAFEB29628F210550025D7D0 /* unixdgram.h */, FAFEB29728F210550025D7D0 /* unixstream.c */, FAFEB29828F210550025D7D0 /* unixstream.h */, 217DFBD31D9F6D490055D849 /* url.lua */, 217DFBD41D9F6D490055D849 /* url.lua.h */, 217DFBD51D9F6D490055D849 /* usocket.c */, 217DFBD61D9F6D490055D849 /* usocket.h */, ); path = libluasocket; sourceTree = ""; }; FA0B7A141A958EA3000E1D17 /* noise1234 */ = { isa = PBXGroup; children = ( FA57FB961AE1993600F2AD6D /* noise1234.cpp */, FA57FB971AE1993600F2AD6D /* noise1234.h */, FA0B7A151A958EA3000E1D17 /* simplexnoise1234.cpp */, FA0B7A161A958EA3000E1D17 /* simplexnoise1234.h */, ); path = noise1234; sourceTree = ""; }; FA0B7A171A958EA3000E1D17 /* stb */ = { isa = PBXGroup; children = ( FA0B7A181A958EA3000E1D17 /* stb_image.h */, ); path = stb; sourceTree = ""; }; FA0B7A191A958EA3000E1D17 /* utf8 */ = { isa = PBXGroup; children = ( FA0B7A1A1A958EA3000E1D17 /* utf8 */, FA0B7A1E1A958EA3000E1D17 /* utf8.h */, ); path = utf8; sourceTree = ""; }; FA0B7A1A1A958EA3000E1D17 /* utf8 */ = { isa = PBXGroup; children = ( FA0B7A1B1A958EA3000E1D17 /* checked.h */, FA0B7A1C1A958EA3000E1D17 /* core.h */, FA0B7A1D1A958EA3000E1D17 /* unchecked.h */, ); path = utf8; sourceTree = ""; }; FA0B7A1F1A958EA3000E1D17 /* Wuff */ = { isa = PBXGroup; children = ( FA0B7A201A958EA3000E1D17 /* wuff.c */, FA0B7A211A958EA3000E1D17 /* wuff.h */, FA0B7A221A958EA3000E1D17 /* wuff_config.h */, FA0B7A231A958EA3000E1D17 /* wuff_convert.c */, FA0B7A241A958EA3000E1D17 /* wuff_convert.h */, FA0B7A251A958EA3000E1D17 /* wuff_internal.c */, FA0B7A261A958EA3000E1D17 /* wuff_internal.h */, FA0B7A271A958EA3000E1D17 /* wuff_memory.c */, ); path = Wuff; sourceTree = ""; }; FA0B7B3C1A95902C000E1D17 /* modules */ = { isa = PBXGroup; children = ( FA0B7B3D1A95902C000E1D17 /* audio */, FACA02DF1F5E396B0084B28F /* data */, FA0B7B521A95902C000E1D17 /* event */, FA0B7B5A1A95902C000E1D17 /* filesystem */, FA0B7B701A95902C000E1D17 /* font */, FA0B7B871A95902C000E1D17 /* graphics */, FA0B7BC21A95902C000E1D17 /* image */, FA0B7BE81A95902C000E1D17 /* joystick */, FA0B7BF51A95902C000E1D17 /* keyboard */, FA0B7BFD1A95902C000E1D17 /* love */, FA0B7C001A95902C000E1D17 /* math */, FA0B7C0D1A95902C000E1D17 /* mouse */, FA0B7C1B1A95902C000E1D17 /* physics */, FACA06A4293EE5CD001A2557 /* sensor */, FA0B7C7B1A95902C000E1D17 /* sound */, FA0B7C9A1A95902C000E1D17 /* system */, FA0B7CA21A95902C000E1D17 /* thread */, FA0B7CB71A95902C000E1D17 /* timer */, FA0B7CBE1A95902C000E1D17 /* touch */, FA27B3881B498151008A9DCE /* video */, FA0B7CC51A95902C000E1D17 /* window */, ); name = modules; path = ../../src/modules; sourceTree = ""; }; FA0B7B3D1A95902C000E1D17 /* audio */ = { isa = PBXGroup; children = ( FA0B7B3E1A95902C000E1D17 /* Audio.cpp */, FA0B7B3F1A95902C000E1D17 /* Audio.h */, FAC756F31E4F99B400B91289 /* Effect.cpp */, FAC756F41E4F99B400B91289 /* Effect.h */, FA1E887C1DF363CD00E808AA /* Filter.cpp */, FA1E887D1DF363CD00E808AA /* Filter.h */, FA0B7B401A95902C000E1D17 /* null */, FA0B7B451A95902C000E1D17 /* openal */, FA4F2BA21DE1E36400CA37D7 /* RecordingDevice.cpp */, FA4F2BA31DE1E36400CA37D7 /* RecordingDevice.h */, FA0B7B4C1A95902C000E1D17 /* Source.cpp */, FA0B7B4D1A95902C000E1D17 /* Source.h */, FA0B7B4E1A95902C000E1D17 /* wrap_Audio.cpp */, FA0B7B4F1A95902C000E1D17 /* wrap_Audio.h */, FA4F2BA41DE1E36400CA37D7 /* wrap_RecordingDevice.cpp */, FA4F2BA51DE1E36400CA37D7 /* wrap_RecordingDevice.h */, FA0B7B501A95902C000E1D17 /* wrap_Source.cpp */, FA0B7B511A95902C000E1D17 /* wrap_Source.h */, ); path = audio; sourceTree = ""; }; FA0B7B401A95902C000E1D17 /* null */ = { isa = PBXGroup; children = ( FA0B7B411A95902C000E1D17 /* Audio.cpp */, FA0B7B421A95902C000E1D17 /* Audio.h */, FA4F2BAA1DE1E37000CA37D7 /* RecordingDevice.cpp */, FA4F2BAB1DE1E37000CA37D7 /* RecordingDevice.h */, FA0B7B431A95902C000E1D17 /* Source.cpp */, FA0B7B441A95902C000E1D17 /* Source.h */, ); path = null; sourceTree = ""; }; FA0B7B451A95902C000E1D17 /* openal */ = { isa = PBXGroup; children = ( FA0B7B461A95902C000E1D17 /* Audio.cpp */, FA0B7B471A95902C000E1D17 /* Audio.h */, FAC756F81E4F99D200B91289 /* Effect.cpp */, FAC756F91E4F99D200B91289 /* Effect.h */, FA1E88811DF363DB00E808AA /* Filter.cpp */, FA1E88821DF363DB00E808AA /* Filter.h */, FA0B7B481A95902C000E1D17 /* Pool.cpp */, FA0B7B491A95902C000E1D17 /* Pool.h */, FA4F2BAE1DE1E37B00CA37D7 /* RecordingDevice.cpp */, FA4F2BAF1DE1E37B00CA37D7 /* RecordingDevice.h */, FA0B7B4A1A95902C000E1D17 /* Source.cpp */, FA0B7B4B1A95902C000E1D17 /* Source.h */, ); path = openal; sourceTree = ""; }; FA0B7B521A95902C000E1D17 /* event */ = { isa = PBXGroup; children = ( FA0B7B531A95902C000E1D17 /* Event.cpp */, FA0B7B541A95902C000E1D17 /* Event.h */, FA0B7B551A95902C000E1D17 /* sdl */, FA8951A01AA2EDF300EC385A /* wrap_Event.cpp */, FA8951A11AA2EDF300EC385A /* wrap_Event.h */, FAF949FD21DEE8B7001CD27E /* wrap_Event.lua */, ); path = event; sourceTree = ""; }; FA0B7B551A95902C000E1D17 /* sdl */ = { isa = PBXGroup; children = ( FA0B7B561A95902C000E1D17 /* Event.cpp */, FA0B7B571A95902C000E1D17 /* Event.h */, ); path = sdl; sourceTree = ""; }; FA0B7B5A1A95902C000E1D17 /* filesystem */ = { isa = PBXGroup; children = ( FA0B7B5D1A95902C000E1D17 /* File.cpp */, FA0B7B5E1A95902C000E1D17 /* File.h */, FA0B7B5F1A95902C000E1D17 /* FileData.cpp */, FA0B7B601A95902C000E1D17 /* FileData.h */, FA0B7B611A95902C000E1D17 /* Filesystem.cpp */, FA0B7B621A95902C000E1D17 /* Filesystem.h */, FAC8E54423AC832A007B07C8 /* NativeFile.cpp */, FAC8E54323AC832A007B07C8 /* NativeFile.h */, FA0B7B631A95902C000E1D17 /* physfs */, FA0B7B6A1A95902C000E1D17 /* wrap_File.cpp */, FA0B7B6B1A95902C000E1D17 /* wrap_File.h */, FA0B7B6C1A95902C000E1D17 /* wrap_FileData.cpp */, FA0B7B6D1A95902C000E1D17 /* wrap_FileData.h */, FA0B7B6E1A95902C000E1D17 /* wrap_Filesystem.cpp */, FA0B7B6F1A95902C000E1D17 /* wrap_Filesystem.h */, FAC8E54823AC8379007B07C8 /* wrap_NativeFile.cpp */, FAC8E54923AC8379007B07C8 /* wrap_NativeFile.h */, ); path = filesystem; sourceTree = ""; }; FA0B7B631A95902C000E1D17 /* physfs */ = { isa = PBXGroup; children = ( FA0B7B641A95902C000E1D17 /* File.cpp */, FA0B7B651A95902C000E1D17 /* File.h */, FA0B7B661A95902C000E1D17 /* Filesystem.cpp */, FA0B7B671A95902C000E1D17 /* Filesystem.h */, D943E58C2A24D56000D80361 /* PhysfsIo.cpp */, D943E58D2A24D56000D80361 /* PhysfsIo.h */, ); path = physfs; sourceTree = ""; }; FA0B7B701A95902C000E1D17 /* font */ = { isa = PBXGroup; children = ( FA0B7B711A95902C000E1D17 /* BMFontRasterizer.cpp */, FA0B7B721A95902C000E1D17 /* BMFontRasterizer.h */, FA0B7B731A95902C000E1D17 /* Font.cpp */, FA0B7B741A95902C000E1D17 /* Font.h */, FA0B7B751A95902C000E1D17 /* freetype */, D9DAB9262961F0FF00C64820 /* GenericShaper.cpp */, D9DAB9252961F0FF00C64820 /* GenericShaper.h */, FA0B7B7A1A95902C000E1D17 /* GlyphData.cpp */, FA0B7B7B1A95902C000E1D17 /* GlyphData.h */, FA0B7B7C1A95902C000E1D17 /* ImageRasterizer.cpp */, FA0B7B7D1A95902C000E1D17 /* ImageRasterizer.h */, FA522D5923FA5ED40059EE3C /* NotoSans-Regular.ttf.gzip.h */, FA0B7B7E1A95902C000E1D17 /* Rasterizer.cpp */, FA0B7B7F1A95902C000E1D17 /* Rasterizer.h */, D9DAB9282961F10000C64820 /* TextShaper.cpp */, D9DAB9272961F0FF00C64820 /* TextShaper.h */, FAB2D5A81AABDD8A008224A4 /* TrueTypeRasterizer.cpp */, FAB2D5A91AABDD8A008224A4 /* TrueTypeRasterizer.h */, FA0B7B811A95902C000E1D17 /* wrap_Font.cpp */, FA0B7B821A95902C000E1D17 /* wrap_Font.h */, FA0B7B831A95902C000E1D17 /* wrap_GlyphData.cpp */, FA0B7B841A95902C000E1D17 /* wrap_GlyphData.h */, FA0B7B851A95902C000E1D17 /* wrap_Rasterizer.cpp */, FA0B7B861A95902C000E1D17 /* wrap_Rasterizer.h */, ); path = font; sourceTree = ""; }; FA0B7B751A95902C000E1D17 /* freetype */ = { isa = PBXGroup; children = ( FA0B7B761A95902C000E1D17 /* Font.cpp */, FA0B7B771A95902C000E1D17 /* Font.h */, D9DAB9212961F0EE00C64820 /* HarfbuzzShaper.cpp */, D9DAB9202961F0EE00C64820 /* HarfbuzzShaper.h */, FA0B7B781A95902C000E1D17 /* TrueTypeRasterizer.cpp */, FA0B7B791A95902C000E1D17 /* TrueTypeRasterizer.h */, ); path = freetype; sourceTree = ""; }; FA0B7B871A95902C000E1D17 /* graphics */ = { isa = PBXGroup; children = ( FADF53F61E3C7ACD00012CC0 /* Buffer.cpp */, FADF53F71E3C7ACD00012CC0 /* Buffer.h */, FA9D53AA1F5307E900125C6B /* Deprecations.cpp */, FA9D53AB1F5307E900125C6B /* Deprecations.h */, FA9D8DDC1DEF842A002CD881 /* Drawable.cpp */, FA0B7B891A95902C000E1D17 /* Drawable.h */, FA1BA09B1E16CFCE00AA2803 /* Font.cpp */, FA1BA09C1E16CFCE00AA2803 /* Font.h */, FA0B7B8A1A95902C000E1D17 /* Graphics.cpp */, FA0B7B8B1A95902C000E1D17 /* Graphics.h */, FA84DE6427791C36002674C6 /* GraphicsReadback.cpp */, FA84DE6527791C36002674C6 /* GraphicsReadback.h */, FADF54231E3DA5BA00012CC0 /* Mesh.cpp */, FADF54241E3DA5BA00012CC0 /* Mesh.h */, FA18CECC23DBC6E000263725 /* metal */, FA0B7B8C1A95902C000E1D17 /* opengl */, FAE272501C05A15B00A67640 /* ParticleSystem.cpp */, FAE272511C05A15B00A67640 /* ParticleSystem.h */, FA0B7B9B1A95902C000E1D17 /* Polyline.cpp */, FA0B7B9C1A95902C000E1D17 /* Polyline.h */, FA0B7BBC1A95902C000E1D17 /* Quad.cpp */, FA0B7BBD1A95902C000E1D17 /* Quad.h */, FAC271E423B5B5B400C200D3 /* renderstate.cpp */, FAC271E323B5B5B400C200D3 /* renderstate.h */, FA10DD7B1F9EC24E00E1FE3D /* Resource.h */, FA1BA0AF1E16FD0800AA2803 /* Shader.cpp */, FA1BA0B01E16FD0800AA2803 /* Shader.h */, FA3C5E401F8C368C0003C579 /* ShaderStage.cpp */, FA3C5E411F8C368C0003C579 /* ShaderStage.h */, FADF542D1E3DABF600012CC0 /* SpriteBatch.cpp */, FADF542E1E3DABF600012CC0 /* SpriteBatch.h */, FA29C0041E12355B00268CD8 /* StreamBuffer.cpp */, FA2AF6721DAD62710032B62C /* StreamBuffer.h */, FADF53FB1E3D74F200012CC0 /* TextBatch.cpp */, FADF53FC1E3D74F200012CC0 /* TextBatch.h */, FA0B7BBE1A95902C000E1D17 /* Texture.cpp */, FA0B7BBF1A95902C000E1D17 /* Texture.h */, FA2AF6731DAD64970032B62C /* vertex.cpp */, FA2AF6711DAC76FF0032B62C /* vertex.h */, FADF54051E3D78F700012CC0 /* Video.cpp */, FADF54061E3D78F700012CC0 /* Video.h */, FA0B7BC01A95902C000E1D17 /* Volatile.cpp */, FA0B7BC11A95902C000E1D17 /* Volatile.h */, FA18CEC323D3AE6700263725 /* wrap_Buffer.cpp */, FA18CEC423D3AE6700263725 /* wrap_Buffer.h */, FA1BA0A01E16D97500AA2803 /* wrap_Font.cpp */, FA1BA0A11E16D97500AA2803 /* wrap_Font.h */, FADF54391E3DAFF700012CC0 /* wrap_Graphics.cpp */, FADF543A1E3DAFF700012CC0 /* wrap_Graphics.h */, FADF54371E3DAFBA00012CC0 /* wrap_Graphics.lua */, FA84DE6F27795E22002674C6 /* wrap_GraphicsReadback.cpp */, FA84DE6E27795E22002674C6 /* wrap_GraphicsReadback.h */, FADF54281E3DAADA00012CC0 /* wrap_Mesh.cpp */, FADF54291E3DAADA00012CC0 /* wrap_Mesh.h */, FADF541E1E3DA52C00012CC0 /* wrap_ParticleSystem.cpp */, FADF541F1E3DA52C00012CC0 /* wrap_ParticleSystem.h */, FA620A2E1AA2F8DB005DB4C2 /* wrap_Quad.cpp */, FA620A2F1AA2F8DB005DB4C2 /* wrap_Quad.h */, FA1BA0B51E17043400AA2803 /* wrap_Shader.cpp */, FA1BA0B61E17043400AA2803 /* wrap_Shader.h */, FADF54321E3DAE6E00012CC0 /* wrap_SpriteBatch.cpp */, FADF54331E3DAE6E00012CC0 /* wrap_SpriteBatch.h */, FADF54001E3D77B500012CC0 /* wrap_TextBatch.cpp */, FADF54011E3D77B500012CC0 /* wrap_TextBatch.h */, FA620A301AA2F8DB005DB4C2 /* wrap_Texture.cpp */, FA620A311AA2F8DB005DB4C2 /* wrap_Texture.h */, FADF540A1E3D7CDD00012CC0 /* wrap_Video.cpp */, FADF540B1E3D7CDD00012CC0 /* wrap_Video.h */, FADF540C1E3D7CDD00012CC0 /* wrap_Video.lua */, ); path = graphics; sourceTree = ""; }; FA0B7B8C1A95902C000E1D17 /* opengl */ = { isa = PBXGroup; children = ( FA0B7BA41A95902C000E1D17 /* Buffer.cpp */, FA0B7BA51A95902C000E1D17 /* Buffer.h */, FA28EBD31E352DB5003446F4 /* FenceSync.cpp */, FA28EBD41E352DB5003446F4 /* FenceSync.h */, FA0B7B911A95902C000E1D17 /* Graphics.cpp */, FA0B7B921A95902C000E1D17 /* Graphics.h */, FA84DE6A277943F6002674C6 /* GraphicsReadback.cpp */, FA84DE69277943F6002674C6 /* GraphicsReadback.h */, FA0B7B971A95902C000E1D17 /* OpenGL.cpp */, FA0B7B981A95902C000E1D17 /* OpenGL.h */, FA0B7B9D1A95902C000E1D17 /* Shader.cpp */, FA0B7B9E1A95902C000E1D17 /* Shader.h */, FA3C5E451F8D80CA0003C579 /* ShaderStage.cpp */, FA3C5E461F8D80CA0003C579 /* ShaderStage.h */, FA7634481E28722A0066EF9E /* StreamBuffer.cpp */, FA7634491E28722A0066EF9E /* StreamBuffer.h */, FA0B7B931A95902C000E1D17 /* Texture.cpp */, FA0B7B941A95902C000E1D17 /* Texture.h */, ); path = opengl; sourceTree = ""; }; FA0B7BC21A95902C000E1D17 /* image */ = { isa = PBXGroup; children = ( FA0B7BC31A95902C000E1D17 /* CompressedImageData.cpp */, FA0B7BC41A95902C000E1D17 /* CompressedImageData.h */, FAECA1B01F3164700095D008 /* CompressedSlice.cpp */, FAECA1B11F3164700095D008 /* CompressedSlice.h */, FA93C4511F315B960087CCD4 /* FormatHandler.cpp */, FA93C4501F315B960087CCD4 /* FormatHandler.h */, FA9D8DDF1DEF843D002CD881 /* Image.cpp */, FA0B7BC51A95902C000E1D17 /* Image.h */, FA0B7BC61A95902C000E1D17 /* ImageData.cpp */, FA0B7BC71A95902C000E1D17 /* ImageData.h */, FAD19A151DFF8CA200D5398A /* ImageDataBase.cpp */, FAD19A161DFF8CA200D5398A /* ImageDataBase.h */, FA0B7BC81A95902C000E1D17 /* magpie */, FA0B7BE21A95902C000E1D17 /* wrap_CompressedImageData.cpp */, FA0B7BE31A95902C000E1D17 /* wrap_CompressedImageData.h */, FA0B7BE41A95902C000E1D17 /* wrap_Image.cpp */, FA0B7BE51A95902C000E1D17 /* wrap_Image.h */, FA0B7BE61A95902C000E1D17 /* wrap_ImageData.cpp */, FA0B7BE71A95902C000E1D17 /* wrap_ImageData.h */, FAC734C21B2E628700AB460A /* wrap_ImageData.lua */, ); path = image; sourceTree = ""; }; FA0B7BC81A95902C000E1D17 /* magpie */ = { isa = PBXGroup; children = ( FA41A3C61C0A1F950084430C /* ASTCHandler.cpp */, FA41A3C71C0A1F950084430C /* ASTCHandler.h */, FA0B7BCC1A95902C000E1D17 /* ddsHandler.cpp */, FA0B7BCD1A95902C000E1D17 /* ddsHandler.h */, FA1557C11CE90BD200AFF582 /* EXRHandler.cpp */, FA1557C21CE90BD200AFF582 /* EXRHandler.h */, FA0B7BD81A95902C000E1D17 /* KTXHandler.cpp */, FA0B7BD91A95902C000E1D17 /* KTXHandler.h */, FA0B7BDA1A95902C000E1D17 /* PKMHandler.cpp */, FA0B7BDB1A95902C000E1D17 /* PKMHandler.h */, FA0B7BDC1A95902C000E1D17 /* PNGHandler.cpp */, FA0B7BDD1A95902C000E1D17 /* PNGHandler.h */, FA0B7BDE1A95902C000E1D17 /* PVRHandler.cpp */, FA0B7BDF1A95902C000E1D17 /* PVRHandler.h */, FA0B7BE01A95902C000E1D17 /* STBHandler.cpp */, FA0B7BE11A95902C000E1D17 /* STBHandler.h */, ); path = magpie; sourceTree = ""; }; FA0B7BE81A95902C000E1D17 /* joystick */ = { isa = PBXGroup; children = ( FA0B7BE91A95902C000E1D17 /* Joystick.cpp */, FA0B7BEA1A95902C000E1D17 /* Joystick.h */, FA0B7BEB1A95902C000E1D17 /* JoystickModule.h */, FA0B7BEC1A95902C000E1D17 /* sdl */, FA0B7BF11A95902C000E1D17 /* wrap_Joystick.cpp */, FA0B7BF21A95902C000E1D17 /* wrap_Joystick.h */, FA0B7BF31A95902C000E1D17 /* wrap_JoystickModule.cpp */, FA0B7BF41A95902C000E1D17 /* wrap_JoystickModule.h */, ); path = joystick; sourceTree = ""; }; FA0B7BEC1A95902C000E1D17 /* sdl */ = { isa = PBXGroup; children = ( FA0B7BED1A95902C000E1D17 /* Joystick.cpp */, FA0B7BEE1A95902C000E1D17 /* Joystick.h */, FA0B7BEF1A95902C000E1D17 /* JoystickModule.cpp */, FA0B7BF01A95902C000E1D17 /* JoystickModule.h */, ); path = sdl; sourceTree = ""; }; FA0B7BF51A95902C000E1D17 /* keyboard */ = { isa = PBXGroup; children = ( FA0B7BF61A95902C000E1D17 /* Keyboard.cpp */, FA0B7BF71A95902C000E1D17 /* Keyboard.h */, FA0B7BF81A95902C000E1D17 /* sdl */, FA0B7BFB1A95902C000E1D17 /* wrap_Keyboard.cpp */, FA0B7BFC1A95902C000E1D17 /* wrap_Keyboard.h */, ); path = keyboard; sourceTree = ""; }; FA0B7BF81A95902C000E1D17 /* sdl */ = { isa = PBXGroup; children = ( FA0B7BF91A95902C000E1D17 /* Keyboard.cpp */, FA0B7BFA1A95902C000E1D17 /* Keyboard.h */, ); path = sdl; sourceTree = ""; }; FA0B7BFD1A95902C000E1D17 /* love */ = { isa = PBXGroup; children = ( FA1E95B4271F932B0044CF08 /* arg.lua */, FA577A8D16C71D3600860150 /* boot.lua */, FA1E95B5271F932B0044CF08 /* callbacks.lua */, FA69B918273828DD00CDC2E7 /* jitsetup.lua */, FA0B7BFE1A95902C000E1D17 /* love.cpp */, FA0B7BFF1A95902C000E1D17 /* love.h */, ); path = love; sourceTree = ""; }; FA0B7C001A95902C000E1D17 /* math */ = { isa = PBXGroup; children = ( FA0B7C011A95902C000E1D17 /* BezierCurve.cpp */, FA0B7C021A95902C000E1D17 /* BezierCurve.h */, FA0B7C031A95902C000E1D17 /* MathModule.cpp */, FA0B7C041A95902C000E1D17 /* MathModule.h */, FA0B7C051A95902C000E1D17 /* RandomGenerator.cpp */, FA0B7C061A95902C000E1D17 /* RandomGenerator.h */, FA4F2BDF1DE6650600CA37D7 /* Transform.cpp */, FA4F2BE01DE6650600CA37D7 /* Transform.h */, FA0B7C071A95902C000E1D17 /* wrap_BezierCurve.cpp */, FA0B7C081A95902C000E1D17 /* wrap_BezierCurve.h */, FA0B7C091A95902C000E1D17 /* wrap_Math.cpp */, FA0B7C0A1A95902C000E1D17 /* wrap_Math.h */, FA7DA04C1C16874A0056B200 /* wrap_Math.lua */, FA0B7C0B1A95902C000E1D17 /* wrap_RandomGenerator.cpp */, FA0B7C0C1A95902C000E1D17 /* wrap_RandomGenerator.h */, FA2E9BFE1C19E00C0004A1EE /* wrap_RandomGenerator.lua */, FA4F2BE11DE6650600CA37D7 /* wrap_Transform.cpp */, FA4F2BE21DE6650600CA37D7 /* wrap_Transform.h */, ); path = math; sourceTree = ""; }; FA0B7C0D1A95902C000E1D17 /* mouse */ = { isa = PBXGroup; children = ( FA0B7C0E1A95902C000E1D17 /* Cursor.cpp */, FA0B7C0F1A95902C000E1D17 /* Cursor.h */, FA0B7C111A95902C000E1D17 /* Mouse.h */, FA0B7C121A95902C000E1D17 /* sdl */, FA0B7C171A95902C000E1D17 /* wrap_Cursor.cpp */, FA0B7C181A95902C000E1D17 /* wrap_Cursor.h */, FA0B7C191A95902C000E1D17 /* wrap_Mouse.cpp */, FA0B7C1A1A95902C000E1D17 /* wrap_Mouse.h */, ); path = mouse; sourceTree = ""; }; FA0B7C121A95902C000E1D17 /* sdl */ = { isa = PBXGroup; children = ( FA0B7C131A95902C000E1D17 /* Cursor.cpp */, FA0B7C141A95902C000E1D17 /* Cursor.h */, FA0B7C151A95902C000E1D17 /* Mouse.cpp */, FA0B7C161A95902C000E1D17 /* Mouse.h */, ); path = sdl; sourceTree = ""; }; FA0B7C1B1A95902C000E1D17 /* physics */ = { isa = PBXGroup; children = ( FA0B7C1C1A95902C000E1D17 /* Body.cpp */, FA0B7C1D1A95902C000E1D17 /* Body.h */, FA0B7C1E1A95902C000E1D17 /* box2d */, FA0B7C771A95902C000E1D17 /* Joint.cpp */, FA0B7C781A95902C000E1D17 /* Joint.h */, FA0B7C791A95902C000E1D17 /* Shape.cpp */, FA0B7C7A1A95902C000E1D17 /* Shape.h */, ); path = physics; sourceTree = ""; }; FA0B7C1E1A95902C000E1D17 /* box2d */ = { isa = PBXGroup; children = ( FA0B7C1F1A95902C000E1D17 /* Body.cpp */, FA0B7C201A95902C000E1D17 /* Body.h */, FA0B7C211A95902C000E1D17 /* ChainShape.cpp */, FA0B7C221A95902C000E1D17 /* ChainShape.h */, FA0B7C231A95902C000E1D17 /* CircleShape.cpp */, FA0B7C241A95902C000E1D17 /* CircleShape.h */, FA0B7C251A95902C000E1D17 /* Contact.cpp */, FA0B7C261A95902C000E1D17 /* Contact.h */, FA0B7C271A95902C000E1D17 /* DistanceJoint.cpp */, FA0B7C281A95902C000E1D17 /* DistanceJoint.h */, FA0B7C291A95902C000E1D17 /* EdgeShape.cpp */, FA0B7C2A1A95902C000E1D17 /* EdgeShape.h */, FA0B7C2D1A95902C000E1D17 /* FrictionJoint.cpp */, FA0B7C2E1A95902C000E1D17 /* FrictionJoint.h */, FA0B7C2F1A95902C000E1D17 /* GearJoint.cpp */, FA0B7C301A95902C000E1D17 /* GearJoint.h */, FA0B7C311A95902C000E1D17 /* Joint.cpp */, FA0B7C321A95902C000E1D17 /* Joint.h */, FA0B7C331A95902C000E1D17 /* MotorJoint.cpp */, FA0B7C341A95902C000E1D17 /* MotorJoint.h */, FA0B7C351A95902C000E1D17 /* MouseJoint.cpp */, FA0B7C361A95902C000E1D17 /* MouseJoint.h */, FA0B7C371A95902C000E1D17 /* Physics.cpp */, FA0B7C381A95902C000E1D17 /* Physics.h */, FA0B7C391A95902C000E1D17 /* PolygonShape.cpp */, FA0B7C3A1A95902C000E1D17 /* PolygonShape.h */, FA0B7C3B1A95902C000E1D17 /* PrismaticJoint.cpp */, FA0B7C3C1A95902C000E1D17 /* PrismaticJoint.h */, FA0B7C3D1A95902C000E1D17 /* PulleyJoint.cpp */, FA0B7C3E1A95902C000E1D17 /* PulleyJoint.h */, FA0B7C3F1A95902C000E1D17 /* RevoluteJoint.cpp */, FA0B7C401A95902C000E1D17 /* RevoluteJoint.h */, FA0B7C411A95902C000E1D17 /* RopeJoint.cpp */, FA0B7C421A95902C000E1D17 /* RopeJoint.h */, FA0B7C431A95902C000E1D17 /* Shape.cpp */, FA0B7C441A95902C000E1D17 /* Shape.h */, FA0B7C451A95902C000E1D17 /* WeldJoint.cpp */, FA0B7C461A95902C000E1D17 /* WeldJoint.h */, FA0B7C471A95902C000E1D17 /* WheelJoint.cpp */, FA0B7C481A95902C000E1D17 /* WheelJoint.h */, FA0B7C491A95902C000E1D17 /* World.cpp */, FA0B7C4A1A95902C000E1D17 /* World.h */, FA0B7C4B1A95902C000E1D17 /* wrap_Body.cpp */, FA0B7C4C1A95902C000E1D17 /* wrap_Body.h */, FA0B7C4D1A95902C000E1D17 /* wrap_ChainShape.cpp */, FA0B7C4E1A95902C000E1D17 /* wrap_ChainShape.h */, FA0B7C4F1A95902C000E1D17 /* wrap_CircleShape.cpp */, FA0B7C501A95902C000E1D17 /* wrap_CircleShape.h */, FA0B7C511A95902C000E1D17 /* wrap_Contact.cpp */, FA0B7C521A95902C000E1D17 /* wrap_Contact.h */, FA0B7C531A95902C000E1D17 /* wrap_DistanceJoint.cpp */, FA0B7C541A95902C000E1D17 /* wrap_DistanceJoint.h */, FA0B7C551A95902C000E1D17 /* wrap_EdgeShape.cpp */, FA0B7C561A95902C000E1D17 /* wrap_EdgeShape.h */, FA0B7C591A95902C000E1D17 /* wrap_FrictionJoint.cpp */, FA0B7C5A1A95902C000E1D17 /* wrap_FrictionJoint.h */, FA0B7C5B1A95902C000E1D17 /* wrap_GearJoint.cpp */, FA0B7C5C1A95902C000E1D17 /* wrap_GearJoint.h */, FA0B7C5D1A95902C000E1D17 /* wrap_Joint.cpp */, FA0B7C5E1A95902C000E1D17 /* wrap_Joint.h */, FA0B7C5F1A95902C000E1D17 /* wrap_MotorJoint.cpp */, FA0B7C601A95902C000E1D17 /* wrap_MotorJoint.h */, FA0B7C611A95902C000E1D17 /* wrap_MouseJoint.cpp */, FA0B7C621A95902C000E1D17 /* wrap_MouseJoint.h */, FA0B7C631A95902C000E1D17 /* wrap_Physics.cpp */, FA0B7C641A95902C000E1D17 /* wrap_Physics.h */, FA0B7C651A95902C000E1D17 /* wrap_PolygonShape.cpp */, FA0B7C661A95902C000E1D17 /* wrap_PolygonShape.h */, FA0B7C671A95902C000E1D17 /* wrap_PrismaticJoint.cpp */, FA0B7C681A95902C000E1D17 /* wrap_PrismaticJoint.h */, FA0B7C691A95902C000E1D17 /* wrap_PulleyJoint.cpp */, FA0B7C6A1A95902C000E1D17 /* wrap_PulleyJoint.h */, FA0B7C6B1A95902C000E1D17 /* wrap_RevoluteJoint.cpp */, FA0B7C6C1A95902C000E1D17 /* wrap_RevoluteJoint.h */, FA0B7C6D1A95902C000E1D17 /* wrap_RopeJoint.cpp */, FA0B7C6E1A95902C000E1D17 /* wrap_RopeJoint.h */, FA0B7C6F1A95902C000E1D17 /* wrap_Shape.cpp */, FA0B7C701A95902C000E1D17 /* wrap_Shape.h */, FA0B7C711A95902C000E1D17 /* wrap_WeldJoint.cpp */, FA0B7C721A95902C000E1D17 /* wrap_WeldJoint.h */, FA0B7C731A95902C000E1D17 /* wrap_WheelJoint.cpp */, FA0B7C741A95902C000E1D17 /* wrap_WheelJoint.h */, FA0B7C751A95902C000E1D17 /* wrap_World.cpp */, FA0B7C761A95902C000E1D17 /* wrap_World.h */, ); path = box2d; sourceTree = ""; }; FA0B7C7B1A95902C000E1D17 /* sound */ = { isa = PBXGroup; children = ( FA0B7C801A95902C000E1D17 /* Decoder.cpp */, FA0B7C7C1A95902C000E1D17 /* Decoder.h */, FA0B7C7D1A95902C000E1D17 /* lullaby */, FA0B7C901A95902C000E1D17 /* Sound.cpp */, FA0B7C911A95902C000E1D17 /* Sound.h */, FA0B7C921A95902C000E1D17 /* SoundData.cpp */, FA0B7C931A95902C000E1D17 /* SoundData.h */, FA0B7C941A95902C000E1D17 /* wrap_Decoder.cpp */, FA0B7C951A95902C000E1D17 /* wrap_Decoder.h */, FA0B7C961A95902C000E1D17 /* wrap_Sound.cpp */, FA0B7C971A95902C000E1D17 /* wrap_Sound.h */, FA0B7C981A95902C000E1D17 /* wrap_SoundData.cpp */, FA0B7C991A95902C000E1D17 /* wrap_SoundData.h */, FAC734C11B2E021A00AB460A /* wrap_SoundData.lua */, ); path = sound; sourceTree = ""; }; FA0B7C7D1A95902C000E1D17 /* lullaby */ = { isa = PBXGroup; children = ( FA0B7C7E1A95902C000E1D17 /* CoreAudioDecoder.cpp */, FA0B7C7F1A95902C000E1D17 /* CoreAudioDecoder.h */, FA0B7C821A95902C000E1D17 /* FLACDecoder.cpp */, FA0B7C831A95902C000E1D17 /* FLACDecoder.h */, FA0B7C861A95902C000E1D17 /* ModPlugDecoder.cpp */, FA0B7C871A95902C000E1D17 /* ModPlugDecoder.h */, FA522D4B23F9FE370059EE3C /* MP3Decoder.cpp */, FA522D4C23F9FE380059EE3C /* MP3Decoder.h */, FA0B7C8A1A95902C000E1D17 /* Sound.cpp */, FA0B7C8B1A95902C000E1D17 /* Sound.h */, FA0B7C8C1A95902C000E1D17 /* VorbisDecoder.cpp */, FA0B7C8D1A95902C000E1D17 /* VorbisDecoder.h */, FA0B7C8E1A95902C000E1D17 /* WaveDecoder.cpp */, FA0B7C8F1A95902C000E1D17 /* WaveDecoder.h */, ); path = lullaby; sourceTree = ""; }; FA0B7C9A1A95902C000E1D17 /* system */ = { isa = PBXGroup; children = ( FA0B7C9B1A95902C000E1D17 /* sdl */, FA0B7C9E1A95902C000E1D17 /* System.cpp */, FA0B7C9F1A95902C000E1D17 /* System.h */, FA0B7CA01A95902C000E1D17 /* wrap_System.cpp */, FA0B7CA11A95902C000E1D17 /* wrap_System.h */, ); path = system; sourceTree = ""; }; FA0B7C9B1A95902C000E1D17 /* sdl */ = { isa = PBXGroup; children = ( FA0B7C9C1A95902C000E1D17 /* System.cpp */, FA0B7C9D1A95902C000E1D17 /* System.h */, ); path = sdl; sourceTree = ""; }; FA0B7CA21A95902C000E1D17 /* thread */ = { isa = PBXGroup; children = ( FA0B7CA31A95902C000E1D17 /* Channel.cpp */, FA0B7CA41A95902C000E1D17 /* Channel.h */, FA0B7CA51A95902C000E1D17 /* LuaThread.cpp */, FA0B7CA61A95902C000E1D17 /* LuaThread.h */, FA0B7CA71A95902C000E1D17 /* sdl */, FA0B7CAC1A95902C000E1D17 /* Thread.h */, FA0B7CAD1A95902C000E1D17 /* ThreadModule.cpp */, FA0B7CAE1A95902C000E1D17 /* ThreadModule.h */, FA0B7CAF1A95902C000E1D17 /* threads.cpp */, FA0B7CB01A95902C000E1D17 /* threads.h */, FA0B7CB11A95902C000E1D17 /* wrap_Channel.cpp */, FA0B7CB21A95902C000E1D17 /* wrap_Channel.h */, FA0B7CB31A95902C000E1D17 /* wrap_LuaThread.cpp */, FA0B7CB41A95902C000E1D17 /* wrap_LuaThread.h */, FA0B7CB51A95902C000E1D17 /* wrap_ThreadModule.cpp */, FA0B7CB61A95902C000E1D17 /* wrap_ThreadModule.h */, ); path = thread; sourceTree = ""; }; FA0B7CA71A95902C000E1D17 /* sdl */ = { isa = PBXGroup; children = ( FA0B7CA81A95902C000E1D17 /* Thread.cpp */, FA0B7CA91A95902C000E1D17 /* Thread.h */, FA0B7CAA1A95902C000E1D17 /* threads.cpp */, FA0B7CAB1A95902C000E1D17 /* threads.h */, ); path = sdl; sourceTree = ""; }; FA0B7CB71A95902C000E1D17 /* timer */ = { isa = PBXGroup; children = ( FA4B66C81ABBCF1900558F15 /* Timer.cpp */, FA0B7CBB1A95902C000E1D17 /* Timer.h */, FA0B7CBC1A95902C000E1D17 /* wrap_Timer.cpp */, FA0B7CBD1A95902C000E1D17 /* wrap_Timer.h */, ); path = timer; sourceTree = ""; }; FA0B7CBE1A95902C000E1D17 /* touch */ = { isa = PBXGroup; children = ( FA0B7CBF1A95902C000E1D17 /* sdl */, FA0B7CC21A95902C000E1D17 /* Touch.h */, D93660F72D1C727C00C0EC4B /* Touch.cpp */, FA0B7CC41A95902C000E1D17 /* wrap_Touch.h */, FA0B7CC31A95902C000E1D17 /* wrap_Touch.cpp */, ); path = touch; sourceTree = ""; }; FA0B7CBF1A95902C000E1D17 /* sdl */ = { isa = PBXGroup; children = ( FA0B7CC01A95902C000E1D17 /* Touch.cpp */, FA0B7CC11A95902C000E1D17 /* Touch.h */, ); path = sdl; sourceTree = ""; }; FA0B7CC51A95902C000E1D17 /* window */ = { isa = PBXGroup; children = ( FA0B7CC61A95902C000E1D17 /* sdl */, FA0B7CC91A95902C000E1D17 /* Window.cpp */, FA0B7CCA1A95902C000E1D17 /* Window.h */, FA0B7CCB1A95902C000E1D17 /* wrap_Window.cpp */, FA0B7CCC1A95902C000E1D17 /* wrap_Window.h */, ); path = window; sourceTree = ""; }; FA0B7CC61A95902C000E1D17 /* sdl */ = { isa = PBXGroup; children = ( FA0B7CC71A95902C000E1D17 /* Window.cpp */, FA0B7CC81A95902C000E1D17 /* Window.h */, ); path = sdl; sourceTree = ""; }; FA0B7EEB1A959125000E1D17 /* macosx */ = { isa = PBXGroup; children = ( FA577A7916C71A1700860150 /* Cocoa.framework */, FAA627CD18E7E1560080752D /* CoreServices.framework */, FAD43ECB1FF312D800831BB8 /* freetype.framework */, D9DAB9312963CD7500C64820 /* harfbuzz.framework */, FA577A8216C71A5300860150 /* libmodplug.framework */, FADF4CC52663D0EC004F95C1 /* libz.tbd */, FA577A6D16C719EA00860150 /* Lua.framework */, FA577A7116C719F400860150 /* ogg.framework */, FAAFF04316CB11C700CCDE45 /* OpenAL-Soft.framework */, FA577A7C16C71A2600860150 /* OpenGL.framework */, FA9B4A0716E1578300074F42 /* SDL2.framework */, FA27B3C81B498623008A9DCE /* theora.framework */, FA577A7716C71A0800860150 /* vorbis.framework */, ); name = macosx; sourceTree = ""; }; FA1557BE1CE90A2C00AFF582 /* tinyexr */ = { isa = PBXGroup; children = ( FA1557BF1CE90A2C00AFF582 /* tinyexr.h */, ); path = tinyexr; sourceTree = ""; }; FA18CECC23DBC6E000263725 /* metal */ = { isa = PBXGroup; children = ( FA18CEEB23DBC8EB00263725 /* Buffer.h */, FA18CEE823DBC8D400263725 /* Buffer.mm */, FA18CED523DBC6E000263725 /* Graphics.h */, FA18CED323DBC6E000263725 /* Graphics.mm */, FA6BDF8B280B62B600240F2A /* GraphicsReadback.h */, FA6BDF88280B62A000240F2A /* GraphicsReadback.mm */, FA18CED423DBC6E000263725 /* Metal.h */, FA18CED023DBC6E000263725 /* Metal.mm */, FA18CECD23DBC6E000263725 /* Shader.h */, FA18CED123DBC6E000263725 /* Shader.mm */, FA18CF4323DD1A8000263725 /* ShaderStage.h */, FA18CF4423DD1A8000263725 /* ShaderStage.mm */, FA18CED223DBC6E000263725 /* StreamBuffer.h */, FA18CECE23DBC6E000263725 /* StreamBuffer.mm */, FA18CEEC23DC9B3E00263725 /* Texture.h */, FA18CEED23DC9B3E00263725 /* Texture.mm */, ); path = metal; sourceTree = ""; }; FA18CEF123DCF67800263725 /* spirv_cross */ = { isa = PBXGroup; children = ( FA18CF1123DCF67800263725 /* GLSL.std.450.h */, FA18CEF523DCF67800263725 /* include */, FA18CEFF23DCF67800263725 /* spirv_cfg.cpp */, FA18CF0823DCF67800263725 /* spirv_cfg.hpp */, FA18CF1423DCF67800263725 /* spirv_common.hpp */, FA18CF0923DCF67800263725 /* spirv_cpp.cpp */, FA18CF0023DCF67800263725 /* spirv_cpp.hpp */, FA18CF1223DCF67800263725 /* spirv_cross_containers.hpp */, FA18CEF423DCF67800263725 /* spirv_cross_error_handling.hpp */, FA18CF0A23DCF67800263725 /* spirv_cross_parsed_ir.cpp */, FA18CF0123DCF67800263725 /* spirv_cross_parsed_ir.hpp */, FA18CF0423DCF67800263725 /* spirv_cross_util.cpp */, FA18CF0F23DCF67800263725 /* spirv_cross_util.hpp */, FA18CF0523DCF67800263725 /* spirv_cross.cpp */, FA18CF1023DCF67800263725 /* spirv_cross.hpp */, FA18CEF323DCF67800263725 /* spirv_glsl.cpp */, FA18CF1523DCF67800263725 /* spirv_glsl.hpp */, FA18CF0723DCF67800263725 /* spirv_hlsl.cpp */, FA18CEFD23DCF67800263725 /* spirv_hlsl.hpp */, FA18CF0323DCF67800263725 /* spirv_msl.cpp */, FA18CF0D23DCF67800263725 /* spirv_msl.hpp */, FA18CF1323DCF67800263725 /* spirv_parser.cpp */, FA18CEF223DCF67800263725 /* spirv_parser.hpp */, FA18CF0223DCF67800263725 /* spirv_reflect.cpp */, FA18CF0E23DCF67800263725 /* spirv_reflect.hpp */, FA18CEFE23DCF67800263725 /* spirv.hpp */, ); path = spirv_cross; sourceTree = ""; }; FA18CEF523DCF67800263725 /* include */ = { isa = PBXGroup; children = ( FA18CEF623DCF67800263725 /* spirv_cross */, ); path = include; sourceTree = ""; }; FA18CEF623DCF67800263725 /* spirv_cross */ = { isa = PBXGroup; children = ( FA18CEF723DCF67800263725 /* barrier.hpp */, FA18CEFB23DCF67800263725 /* external_interface.h */, FA18CEFC23DCF67800263725 /* image.hpp */, FA18CEF923DCF67800263725 /* internal_interface.hpp */, FA18CEFA23DCF67800263725 /* sampler.hpp */, FA18CEF823DCF67800263725 /* thread_group.hpp */, ); path = spirv_cross; sourceTree = ""; }; FA27B3881B498151008A9DCE /* video */ = { isa = PBXGroup; children = ( FA27B3891B498151008A9DCE /* theora */, FA27B3931B498151008A9DCE /* Video.h */, FA27B3941B498151008A9DCE /* VideoStream.cpp */, FA27B3951B498151008A9DCE /* VideoStream.h */, FA27B39B1B498151008A9DCE /* wrap_Video.cpp */, FA27B39C1B498151008A9DCE /* wrap_Video.h */, FA27B3B91B4985BF008A9DCE /* wrap_VideoStream.cpp */, FA27B3BA1B4985BF008A9DCE /* wrap_VideoStream.h */, ); path = video; sourceTree = ""; }; FA27B3891B498151008A9DCE /* theora */ = { isa = PBXGroup; children = ( FAA54AC91F91660400A8FA7B /* OggDemuxer.cpp */, FAA54AC61F91660400A8FA7B /* OggDemuxer.h */, FAA54AC81F91660400A8FA7B /* TheoraVideoStream.cpp */, FAA54AC71F91660400A8FA7B /* TheoraVideoStream.h */, FA27B38A1B498151008A9DCE /* Video.cpp */, FA27B38B1B498151008A9DCE /* Video.h */, ); path = theora; sourceTree = ""; }; FA4F2B761DE0125B00CA37D7 /* xxHash */ = { isa = PBXGroup; children = ( FA4F2B771DE0125B00CA37D7 /* xxhash.c */, FA4F2B781DE0125B00CA37D7 /* xxhash.h */, ); path = xxHash; sourceTree = ""; }; FA522D5023F9FF2A0059EE3C /* dr */ = { isa = PBXGroup; children = ( FA522D5123F9FF2A0059EE3C /* dr_mp3.h */, FA522D5223F9FF2A0059EE3C /* dr_flac.h */, ); path = dr; sourceTree = ""; }; FA577A6616C7199700860150 /* Frameworks */ = { isa = PBXGroup; children = ( D9596F602CBAC93800BE58C1 /* SDL3.xcframework */, FA18CEE623DBC6F700263725 /* Metal.framework */, FA0B7EEB1A959125000E1D17 /* macosx */, ); name = Frameworks; sourceTree = ""; }; FA5D24A11A96D24500C6FC8F /* Libraries */ = { isa = PBXGroup; children = ( FA5D24A31A96D2C300C6FC8F /* ios */, ); name = Libraries; sourceTree = ""; }; FA5D24A31A96D2C300C6FC8F /* ios */ = { isa = PBXGroup; children = ( D923E7D2296B85B9002FF1B3 /* harfbuzz.xcframework */, FACFB750276D7E2B0089F78D /* freetype.xcframework */, FACFB752276D7F6F0089F78D /* Lua.xcframework */, FA84DE79277D4C88002674C6 /* modplug.xcframework */, FA84DE7B277E045E002674C6 /* ogg.xcframework */, FA84DE75277CB3D4002674C6 /* SDL2.xcframework */, FA7E9206277E120900C24CB2 /* theora.xcframework */, FA84DE7D277E0A43002674C6 /* vorbis.xcframework */, ); name = ios; sourceTree = ""; }; FA94724527A6EE1B00817677 /* luahttps */ = { isa = PBXGroup; children = ( FA94724D27A6EE1B00817677 /* src */, ); path = luahttps; sourceTree = ""; }; FA94724D27A6EE1B00817677 /* src */ = { isa = PBXGroup; children = ( FA94729827A6F9AC00817677 /* apple */, FA94725327A6EE1B00817677 /* common */, D9F0C2D32C680A5500BB2D25 /* generic */, FA94725127A6EE1B00817677 /* lua */, ); path = src; sourceTree = ""; }; FA94725127A6EE1B00817677 /* lua */ = { isa = PBXGroup; children = ( FA94725227A6EE1B00817677 /* main.cpp */, ); path = lua; sourceTree = ""; }; FA94725327A6EE1B00817677 /* common */ = { isa = PBXGroup; children = ( FA94725827A6EE1B00817677 /* config.h */, FA94725427A6EE1B00817677 /* Connection.h */, FA94725C27A6EE1B00817677 /* ConnectionClient.h */, FA94725F27A6EE1B00817677 /* HTTPRequest.cpp */, FA94725B27A6EE1B00817677 /* HTTPRequest.h */, FA94725A27A6EE1B00817677 /* HTTPS.cpp */, FA94725E27A6EE1B00817677 /* HTTPS.h */, FA94725527A6EE1B00817677 /* HTTPSClient.cpp */, FA94725627A6EE1B00817677 /* HTTPSClient.h */, D9F0C2CB2C68091200BB2D25 /* LibraryLoader.h */, FA94725D27A6EE1B00817677 /* PlaintextConnection.cpp */, FA94725727A6EE1B00817677 /* PlaintextConnection.h */, ); path = common; sourceTree = ""; }; FA94729827A6F9AC00817677 /* apple */ = { isa = PBXGroup; children = ( FA94729A27A6F9AC00817677 /* NSURLClient.h */, FA94729927A6F9AC00817677 /* NSURLClient.mm */, ); path = apple; sourceTree = ""; }; FAAA3FD21F64B3AD00F89E99 /* lua53 */ = { isa = PBXGroup; children = ( FAAA3FD31F64B3AD00F89E99 /* lprefix.h */, FAAA3FD41F64B3AD00F89E99 /* lstrlib.c */, FAAA3FD51F64B3AD00F89E99 /* lstrlib.h */, FAAA3FD61F64B3AD00F89E99 /* lutf8lib.c */, FAAA3FD71F64B3AD00F89E99 /* lutf8lib.h */, ); path = lua53; sourceTree = ""; }; FAB17BE31ABFAA9000F9BA27 /* lz4 */ = { isa = PBXGroup; children = ( FAB17BE41ABFAA9000F9BA27 /* lz4.c */, FAB17BE51ABFAA9000F9BA27 /* lz4.h */, FAB17BF31ABFC4B100F9BA27 /* lz4hc.c */, FAB17BF41ABFC4B100F9BA27 /* lz4hc.h */, FAC7CD951FE755B3006A60C7 /* lz4opt.h */, ); path = lz4; sourceTree = ""; }; FABDA9102552448200B5C523 /* box2d */ = { isa = PBXGroup; children = ( FABDA9622552448200B5C523 /* b2_api.h */, FABDA9132552448200B5C523 /* b2_block_allocator.h */, FABDA9492552448200B5C523 /* b2_body.h */, FABDA9412552448200B5C523 /* b2_broad_phase.h */, FABDA9632552448200B5C523 /* b2_chain_shape.h */, FABDA94D2552448200B5C523 /* b2_circle_shape.h */, FABDA9602552448200B5C523 /* b2_collision.h */, FABDA93A2552448200B5C523 /* b2_common.h */, FABDA9742552448200B5C523 /* b2_contact_manager.h */, FABDA9592552448200B5C523 /* b2_contact.h */, FABDA9482552448200B5C523 /* b2_distance_joint.h */, FABDA94A2552448200B5C523 /* b2_distance.h */, FABDA95F2552448200B5C523 /* b2_draw.h */, FABDA93C2552448200B5C523 /* b2_dynamic_tree.h */, FABDA9752552448200B5C523 /* b2_edge_shape.h */, FABDA93D2552448200B5C523 /* b2_fixture.h */, FABDA9582552448200B5C523 /* b2_friction_joint.h */, FABDA9642552448200B5C523 /* b2_gear_joint.h */, FABDA95E2552448200B5C523 /* b2_growable_stack.h */, FABDA9112552448200B5C523 /* b2_joint.h */, FABDA94E2552448200B5C523 /* b2_math.h */, FABDA9392552448200B5C523 /* b2_motor_joint.h */, FABDA9502552448200B5C523 /* b2_mouse_joint.h */, FABDA95C2552448200B5C523 /* b2_polygon_shape.h */, FABDA95A2552448200B5C523 /* b2_prismatic_joint.h */, FABDA94C2552448200B5C523 /* b2_pulley_joint.h */, FABDA9452552448200B5C523 /* b2_revolute_joint.h */, FABDA9472552448200B5C523 /* b2_rope.h */, FABDA9442552448200B5C523 /* b2_settings.h */, FABDA9122552448200B5C523 /* b2_shape.h */, FABDA93E2552448200B5C523 /* b2_stack_allocator.h */, FABDA94F2552448200B5C523 /* b2_time_of_impact.h */, FABDA94B2552448200B5C523 /* b2_time_step.h */, FABDA9652552448200B5C523 /* b2_timer.h */, FABDA9402552448200B5C523 /* b2_types.h */, FABDA93B2552448200B5C523 /* b2_weld_joint.h */, FABDA95D2552448200B5C523 /* b2_wheel_joint.h */, FABDA9662552448200B5C523 /* b2_world_callbacks.h */, FABDA95B2552448200B5C523 /* b2_world.h */, FABDA93F2552448200B5C523 /* Box2D.h */, FABDA9672552448200B5C523 /* collision */, FABDA9512552448200B5C523 /* common */, FABDA9142552448200B5C523 /* dynamics */, FABDA9462552448200B5C523 /* README.MODIFIED */, FABDA9422552448200B5C523 /* rope */, ); path = box2d; sourceTree = ""; }; FABDA9142552448200B5C523 /* dynamics */ = { isa = PBXGroup; children = ( FABDA91E2552448200B5C523 /* b2_body.cpp */, FABDA9172552448200B5C523 /* b2_chain_circle_contact.cpp */, FABDA9182552448200B5C523 /* b2_chain_circle_contact.h */, FABDA91C2552448200B5C523 /* b2_chain_polygon_contact.cpp */, FABDA9162552448200B5C523 /* b2_chain_polygon_contact.h */, FABDA9352552448200B5C523 /* b2_circle_contact.cpp */, FABDA91A2552448200B5C523 /* b2_circle_contact.h */, FABDA9282552448200B5C523 /* b2_contact_manager.cpp */, FABDA9222552448200B5C523 /* b2_contact_solver.cpp */, FABDA9212552448200B5C523 /* b2_contact_solver.h */, FABDA91F2552448200B5C523 /* b2_contact.cpp */, FABDA9272552448200B5C523 /* b2_distance_joint.cpp */, FABDA92B2552448200B5C523 /* b2_edge_circle_contact.cpp */, FABDA91D2552448200B5C523 /* b2_edge_circle_contact.h */, FABDA92A2552448200B5C523 /* b2_edge_polygon_contact.cpp */, FABDA9262552448200B5C523 /* b2_edge_polygon_contact.h */, FABDA9372552448200B5C523 /* b2_fixture.cpp */, FABDA92D2552448200B5C523 /* b2_friction_joint.cpp */, FABDA92C2552448200B5C523 /* b2_gear_joint.cpp */, FABDA9332552448200B5C523 /* b2_island.cpp */, FABDA9382552448200B5C523 /* b2_island.h */, FABDA9152552448200B5C523 /* b2_joint.cpp */, FABDA9302552448200B5C523 /* b2_motor_joint.cpp */, FABDA9342552448200B5C523 /* b2_mouse_joint.cpp */, FABDA9252552448200B5C523 /* b2_polygon_circle_contact.cpp */, FABDA9192552448200B5C523 /* b2_polygon_circle_contact.h */, FABDA9292552448200B5C523 /* b2_polygon_contact.cpp */, FABDA92F2552448200B5C523 /* b2_polygon_contact.h */, FABDA9362552448200B5C523 /* b2_prismatic_joint.cpp */, FABDA9242552448200B5C523 /* b2_pulley_joint.cpp */, FABDA9202552448200B5C523 /* b2_revolute_joint.cpp */, FABDA91B2552448200B5C523 /* b2_weld_joint.cpp */, FABDA92E2552448200B5C523 /* b2_wheel_joint.cpp */, FABDA9232552448200B5C523 /* b2_world_callbacks.cpp */, FABDA9322552448200B5C523 /* b2_world.cpp */, ); path = dynamics; sourceTree = ""; }; FABDA9422552448200B5C523 /* rope */ = { isa = PBXGroup; children = ( FABDA9432552448200B5C523 /* b2_rope.cpp */, ); path = rope; sourceTree = ""; }; FABDA9512552448200B5C523 /* common */ = { isa = PBXGroup; children = ( FABDA9542552448200B5C523 /* b2_block_allocator.cpp */, FABDA9522552448200B5C523 /* b2_draw.cpp */, FABDA9572552448200B5C523 /* b2_math.cpp */, FABDA9562552448200B5C523 /* b2_settings.cpp */, FABDA9552552448200B5C523 /* b2_stack_allocator.cpp */, FABDA9532552448200B5C523 /* b2_timer.cpp */, ); path = common; sourceTree = ""; }; FABDA9672552448200B5C523 /* collision */ = { isa = PBXGroup; children = ( FABDA96D2552448200B5C523 /* b2_broad_phase.cpp */, FABDA96C2552448200B5C523 /* b2_chain_shape.cpp */, FABDA9692552448200B5C523 /* b2_circle_shape.cpp */, FABDA9682552448200B5C523 /* b2_collide_circle.cpp */, FABDA96B2552448200B5C523 /* b2_collide_edge.cpp */, FABDA9702552448200B5C523 /* b2_collide_polygon.cpp */, FABDA96A2552448200B5C523 /* b2_collision.cpp */, FABDA9732552448200B5C523 /* b2_distance.cpp */, FABDA96E2552448200B5C523 /* b2_dynamic_tree.cpp */, FABDA9712552448200B5C523 /* b2_edge_shape.cpp */, FABDA96F2552448200B5C523 /* b2_polygon_shape.cpp */, FABDA9722552448200B5C523 /* b2_time_of_impact.cpp */, ); path = collision; sourceTree = ""; }; FAC7CD591FE35E95006A60C7 /* physfs */ = { isa = PBXGroup; children = ( FAC7CD5D1FE35E95006A60C7 /* physfs_archiver_7z.c */, FAC7CD6C1FE35E95006A60C7 /* physfs_archiver_dir.c */, FAC7CD741FE35E95006A60C7 /* physfs_archiver_grp.c */, FAC7CD751FE35E95006A60C7 /* physfs_archiver_hog.c */, FAC7CD6E1FE35E95006A60C7 /* physfs_archiver_iso9660.c */, FAC7CD611FE35E95006A60C7 /* physfs_archiver_mvl.c */, FAC7CD6F1FE35E95006A60C7 /* physfs_archiver_qpak.c */, FAC7CD5F1FE35E95006A60C7 /* physfs_archiver_slb.c */, FAC7CD671FE35E95006A60C7 /* physfs_archiver_unpacked.c */, FAC7CD6A1FE35E95006A60C7 /* physfs_archiver_vdf.c */, FAC7CD621FE35E95006A60C7 /* physfs_archiver_wad.c */, FAC7CD761FE35E95006A60C7 /* physfs_archiver_zip.c */, FAC7CD6D1FE35E95006A60C7 /* physfs_byteorder.c */, FAC7CD631FE35E95006A60C7 /* physfs_casefolding.h */, FAC7CD5A1FE35E95006A60C7 /* physfs_internal.h */, FAC7CD711FE35E95006A60C7 /* physfs_lzmasdk.h */, FAC7CD731FE35E95006A60C7 /* physfs_miniz.h */, FAC7CD6B1FE35E95006A60C7 /* physfs_platform_apple.m */, FAC7CD651FE35E95006A60C7 /* physfs_platform_haiku.cpp */, FAC7CD641FE35E95006A60C7 /* physfs_platform_os2.c */, FAC7CD721FE35E95006A60C7 /* physfs_platform_posix.c */, FAC7CD5B1FE35E95006A60C7 /* physfs_platform_qnx.c */, FAC7CD5E1FE35E95006A60C7 /* physfs_platform_unix.c */, FAC7CD661FE35E95006A60C7 /* physfs_platform_windows.c */, FAC7CD601FE35E95006A60C7 /* physfs_platform_winrt.cpp */, FAC7CD701FE35E95006A60C7 /* physfs_platforms.h */, FAC7CD681FE35E95006A60C7 /* physfs_unicode.c */, FAC7CD5C1FE35E95006A60C7 /* physfs.c */, FAC7CD691FE35E95006A60C7 /* physfs.h */, ); path = physfs; sourceTree = ""; }; FACA02DF1F5E396B0084B28F /* data */ = { isa = PBXGroup; children = ( FA6A2B721F60B6710074C308 /* ByteData.cpp */, FA6A2B731F60B6710074C308 /* ByteData.h */, FACA02E01F5E396B0084B28F /* CompressedData.cpp */, FACA02E11F5E396B0084B28F /* CompressedData.h */, FACA02E21F5E396B0084B28F /* Compressor.cpp */, FACA02E31F5E396B0084B28F /* Compressor.h */, FACA02E41F5E396B0084B28F /* DataModule.cpp */, FACA02E51F5E396B0084B28F /* DataModule.h */, FA6BDF8C281219E900240F2A /* DataStream.cpp */, FA6BDF8D281219E900240F2A /* DataStream.h */, FA6A2B681F5F7F560074C308 /* DataView.cpp */, FA6A2B691F5F7F560074C308 /* DataView.h */, FACA02E61F5E396B0084B28F /* HashFunction.cpp */, FACA02E71F5E396B0084B28F /* HashFunction.h */, FA6A2B781F60B8250074C308 /* wrap_ByteData.cpp */, FA6A2B771F60B8250074C308 /* wrap_ByteData.h */, FACA02E81F5E396B0084B28F /* wrap_CompressedData.cpp */, FACA02E91F5E396B0084B28F /* wrap_CompressedData.h */, FA6A2B651F5F7B6B0074C308 /* wrap_Data.cpp */, FA6A2B641F5F7B6B0074C308 /* wrap_Data.h */, FA34AF6A22E2977700F77015 /* wrap_Data.lua */, FACA02EA1F5E396B0084B28F /* wrap_DataModule.cpp */, FACA02EB1F5E396B0084B28F /* wrap_DataModule.h */, FA6A2B6E1F5F845F0074C308 /* wrap_DataView.cpp */, FA6A2B6D1F5F845F0074C308 /* wrap_DataView.h */, ); path = data; sourceTree = ""; }; FACA06A4293EE5CD001A2557 /* sensor */ = { isa = PBXGroup; children = ( FACA06A7293EE5CD001A2557 /* sdl */, FACA06AA293EE5CD001A2557 /* Sensor.cpp */, FACA06A6293EE5CD001A2557 /* Sensor.h */, FACA06A5293EE5CD001A2557 /* wrap_Sensor.cpp */, FACA06AB293EE5CD001A2557 /* wrap_Sensor.h */, ); path = sensor; sourceTree = ""; }; FACA06A7293EE5CD001A2557 /* sdl */ = { isa = PBXGroup; children = ( FACA06A9293EE5CD001A2557 /* Sensor.cpp */, FACA06A8293EE5CD001A2557 /* Sensor.h */, ); path = sdl; sourceTree = ""; }; FAF13FBF1E20934C00F898D2 /* glslang */ = { isa = PBXGroup; children = ( FAF13FC01E20934C00F898D2 /* glslang */, FAF6C9C023C2DE2900D7B5BC /* SPIRV */, ); path = glslang; sourceTree = ""; }; FAF13FC01E20934C00F898D2 /* glslang */ = { isa = PBXGroup; children = ( D9DB6E442B4B80E80037A1F6 /* build_info.h */, FAF13FC11E20934C00F898D2 /* GenericCodeGen */, FAF13FC41E20934C00F898D2 /* Include */, FAF13FD21E20934C00F898D2 /* MachineIndependent */, FAF140021E20934C00F898D2 /* OSDependent */, FAF140281E20934C00F898D2 /* Public */, D9DB6E312B4B41100037A1F6 /* ResourceLimits */, ); path = glslang; sourceTree = ""; }; FAF13FC11E20934C00F898D2 /* GenericCodeGen */ = { isa = PBXGroup; children = ( FAF13FC21E20934C00F898D2 /* CodeGen.cpp */, FAF13FC31E20934C00F898D2 /* Link.cpp */, ); path = GenericCodeGen; sourceTree = ""; }; FAF13FC41E20934C00F898D2 /* Include */ = { isa = PBXGroup; children = ( FAF13FC51E20934C00F898D2 /* arrays.h */, FAF13FC61E20934C00F898D2 /* BaseTypes.h */, FAF13FC71E20934C00F898D2 /* Common.h */, FAF13FC81E20934C00F898D2 /* ConstantUnion.h */, FAF13FC91E20934C00F898D2 /* InfoSink.h */, FAF13FCA1E20934C00F898D2 /* InitializeGlobals.h */, FAF13FCB1E20934C00F898D2 /* intermediate.h */, FAF13FCC1E20934C00F898D2 /* PoolAlloc.h */, FAF13FCD1E20934C00F898D2 /* ResourceLimits.h */, FAF13FD01E20934C00F898D2 /* ShHandle.h */, FA84DE5D2778D7DB002674C6 /* SpirvIntrinsics.h */, FAF13FD11E20934C00F898D2 /* Types.h */, D91C76142DE3D0A2001FC408 /* visibility.h */, ); path = Include; sourceTree = ""; }; FAF13FD21E20934C00F898D2 /* MachineIndependent */ = { isa = PBXGroup; children = ( FA24348221D401CB00B8918A /* attribute.cpp */, FA24348121D401CB00B8918A /* attribute.h */, FAF13FD31E20934C00F898D2 /* Constant.cpp */, FAF13FD41E20934C00F898D2 /* gl_types.h */, FAF13FD61E20934C00F898D2 /* glslang_tab.cpp */, FAF13FD71E20934C00F898D2 /* glslang_tab.cpp.h */, FAF13FD81E20934C00F898D2 /* InfoSink.cpp */, FAF13FD91E20934C00F898D2 /* Initialize.cpp */, FAF13FDA1E20934C00F898D2 /* Initialize.h */, FAF13FDB1E20934C00F898D2 /* Intermediate.cpp */, FAF13FDC1E20934C00F898D2 /* intermOut.cpp */, FAF13FDD1E20934C00F898D2 /* IntermTraverse.cpp */, FAF13FDE1E20934C00F898D2 /* iomapper.cpp */, FAF13FDF1E20934C00F898D2 /* iomapper.h */, FAF13FE01E20934C00F898D2 /* limits.cpp */, FAF13FE11E20934C00F898D2 /* linkValidate.cpp */, FAF13FE21E20934C00F898D2 /* LiveTraverser.h */, FAF13FE31E20934C00F898D2 /* localintermediate.h */, FAF13FE41E20934C00F898D2 /* parseConst.cpp */, FAF13FE51E20934C00F898D2 /* ParseContextBase.cpp */, FAF13FE61E20934C00F898D2 /* ParseHelper.cpp */, FAF13FE71E20934C00F898D2 /* ParseHelper.h */, FAF13FE81E20934C00F898D2 /* parseVersions.h */, FA24348321D401CB00B8918A /* pch.h */, FAF13FE91E20934C00F898D2 /* PoolAlloc.cpp */, FAF13FEA1E20934C00F898D2 /* preprocessor */, FAF13FF41E20934C00F898D2 /* propagateNoContraction.cpp */, FAF13FF51E20934C00F898D2 /* propagateNoContraction.h */, FAF13FF61E20934C00F898D2 /* reflection.cpp */, FAF13FF71E20934C00F898D2 /* reflection.h */, FAF13FF81E20934C00F898D2 /* RemoveTree.cpp */, FAF13FF91E20934C00F898D2 /* RemoveTree.h */, FAF13FFA1E20934C00F898D2 /* Scan.cpp */, FAF13FFB1E20934C00F898D2 /* Scan.h */, FAF13FFC1E20934C00F898D2 /* ScanContext.h */, FAF13FFD1E20934C00F898D2 /* ShaderLang.cpp */, D9DB6E282B4B40970037A1F6 /* span.h */, FA84DE602778D7F3002674C6 /* SpirvIntrinsics.cpp */, FAF13FFE1E20934C00F898D2 /* SymbolTable.cpp */, FAF13FFF1E20934C00F898D2 /* SymbolTable.h */, FAF140001E20934C00F898D2 /* Versions.cpp */, FAF140011E20934C00F898D2 /* Versions.h */, ); path = MachineIndependent; sourceTree = ""; }; FAF13FEA1E20934C00F898D2 /* preprocessor */ = { isa = PBXGroup; children = ( FAF13FEB1E20934C00F898D2 /* Pp.cpp */, FAF13FEC1E20934C00F898D2 /* PpAtom.cpp */, FAF13FED1E20934C00F898D2 /* PpContext.cpp */, FAF13FEE1E20934C00F898D2 /* PpContext.h */, FAF13FF01E20934C00F898D2 /* PpScanner.cpp */, FAF13FF21E20934C00F898D2 /* PpTokens.cpp */, FAF13FF31E20934C00F898D2 /* PpTokens.h */, ); path = preprocessor; sourceTree = ""; }; FAF140021E20934C00F898D2 /* OSDependent */ = { isa = PBXGroup; children = ( FAF140031E20934C00F898D2 /* osinclude.h */, FAF140041E20934C00F898D2 /* Unix */, ); path = OSDependent; sourceTree = ""; }; FAF140041E20934C00F898D2 /* Unix */ = { isa = PBXGroup; children = ( FAF140211E20934C00F898D2 /* ossource.cpp */, ); path = Unix; sourceTree = ""; }; FAF140281E20934C00F898D2 /* Public */ = { isa = PBXGroup; children = ( D9DB6E252B4B40660037A1F6 /* ResourceLimits.h */, FAF140291E20934C00F898D2 /* ShaderLang.h */, ); path = Public; sourceTree = ""; }; FAF6C9C023C2DE2900D7B5BC /* SPIRV */ = { isa = PBXGroup; children = ( FAF6C9D023C2DE2900D7B5BC /* bitutils.h */, FAF6C9D123C2DE2900D7B5BC /* disassemble.h */, FAF6C9D923C2DE2900D7B5BC /* disassemble.cpp */, FAF6C9C823C2DE2900D7B5BC /* doc.h */, FAF6C9D823C2DE2900D7B5BC /* doc.cpp */, FAF6C9C723C2DE2900D7B5BC /* GLSL.ext.AMD.h */, D9DB6E3A2B4B41570037A1F6 /* GLSL.ext.ARM.h */, FAF6C9CB23C2DE2900D7B5BC /* GLSL.ext.EXT.h */, FAF6C9CC23C2DE2900D7B5BC /* GLSL.ext.KHR.h */, FAF6C9CD23C2DE2900D7B5BC /* GLSL.ext.NV.h */, D9DB6E3B2B4B41580037A1F6 /* GLSL.ext.QCOM.h */, FAF6C9D323C2DE2900D7B5BC /* GLSL.std.450.h */, FAF6C9D223C2DE2900D7B5BC /* GlslangToSpv.h */, FAF6C9CE23C2DE2900D7B5BC /* GlslangToSpv.cpp */, FAF6C9D623C2DE2900D7B5BC /* hex_float.h */, FAF6C9C623C2DE2900D7B5BC /* InReadableOrder.cpp */, FAF6C9D723C2DE2900D7B5BC /* Logger.h */, FAF6C9D523C2DE2900D7B5BC /* Logger.cpp */, D9DB6E382B4B41570037A1F6 /* NonSemanticDebugPrintf.h */, D9DB6E392B4B41570037A1F6 /* NonSemanticShaderDebugInfo100.h */, D91C76102DE3D088001FC408 /* spirv.hpp11 */, FAF6C9C223C2DE2900D7B5BC /* SpvBuilder.h */, FAF6C9CA23C2DE2900D7B5BC /* SpvBuilder.cpp */, FAF6C9CF23C2DE2900D7B5BC /* spvIR.h */, FAF6C9C323C2DE2900D7B5BC /* SpvPostProcess.cpp */, FAF6C9C123C2DE2900D7B5BC /* SPVRemapper.h */, FAF6C9D423C2DE2900D7B5BC /* SPVRemapper.cpp */, FAF6C9C423C2DE2900D7B5BC /* SpvTools.h */, FAF6C9C523C2DE2900D7B5BC /* SpvTools.cpp */, D91C76112DE3D088001FC408 /* spvUtil.h */, ); path = SPIRV; sourceTree = ""; }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ FA577AAC16C7507900860150 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( FAF6C9F623C2DE2900D7B5BC /* hex_float.h in Headers */, FADF54221E3DA52C00012CC0 /* wrap_ParticleSystem.h in Headers */, FAF6C9EE23C2DE2900D7B5BC /* bitutils.h in Headers */, 217DFC0A1D9F6D490055D849 /* unix.h in Headers */, FA0B7D7E1A95902C000E1D17 /* Texture.h in Headers */, FA18CF3C23DCF67900263725 /* spirv_cross.hpp in Headers */, FA0B7E561A95902C000E1D17 /* wrap_GearJoint.h in Headers */, FAF1409F1E20934C00F898D2 /* reflection.h in Headers */, FA0B7E1D1A95902C000E1D17 /* MouseJoint.h in Headers */, FA1BA0B81E17043400AA2803 /* wrap_Shader.h in Headers */, FA1557C41CE90BD200AFF582 /* EXRHandler.h in Headers */, FA0B7DC91A95902C000E1D17 /* Keyboard.h in Headers */, FA0B7D4A1A95902C000E1D17 /* Polyline.h in Headers */, FABDA9E72552448300B5C523 /* b2_chain_shape.h in Headers */, FAF1405C1E20934C00F898D2 /* InitializeGlobals.h in Headers */, FACA06B4293EE5CD001A2557 /* wrap_Sensor.h in Headers */, FA0B7DB31A95902C000E1D17 /* wrap_Image.h in Headers */, FAF140591E20934C00F898D2 /* Common.h in Headers */, FA0B7EC31A95902C000E1D17 /* threads.h in Headers */, FA0B7AC21A958EA3000E1D17 /* enet.h in Headers */, FA4F2BA71DE1E36400CA37D7 /* RecordingDevice.h in Headers */, FA0B7E201A95902C000E1D17 /* Physics.h in Headers */, FAF140791E20934C00F898D2 /* iomapper.h in Headers */, 217DFBEA1D9F6D490055D849 /* io.h in Headers */, FA0B79221A958E3B000E1D17 /* delay.h in Headers */, FAFEB29E28F210550025D7D0 /* unixstream.h in Headers */, FA0B79481A958E3B000E1D17 /* Vector.h in Headers */, FA94728427A6EE1B00817677 /* ConnectionClient.h in Headers */, FA0B7CCF1A95902C000E1D17 /* Audio.h in Headers */, FA0B7EC01A95902C000E1D17 /* Thread.h in Headers */, FABDA9E12552448300B5C523 /* b2_wheel_joint.h in Headers */, FA0B7E9C1A95902C000E1D17 /* VorbisDecoder.h in Headers */, FAC271E523B5B5B400C200D3 /* renderstate.h in Headers */, FAC756FB1E4F99D200B91289 /* Effect.h in Headers */, FAF6C9EF23C2DE2900D7B5BC /* disassemble.h in Headers */, FA18CF4123DCF67900263725 /* spirv_common.hpp in Headers */, FAC7CD901FE35E95006A60C7 /* physfs_miniz.h in Headers */, D9DB6E3F2B4B41580037A1F6 /* NonSemanticShaderDebugInfo100.h in Headers */, FA0B791D1A958E3B000E1D17 /* b64.h in Headers */, FA0B7DC61A95902C000E1D17 /* wrap_JoystickModule.h in Headers */, FA0B7D201A95902C000E1D17 /* ImageRasterizer.h in Headers */, FAF6C9EA23C2DE2900D7B5BC /* GLSL.ext.NV.h in Headers */, FADF54311E3DABF600012CC0 /* SpriteBatch.h in Headers */, FA0B7E5F1A95902C000E1D17 /* wrap_MouseJoint.h in Headers */, FA76344C1E28722A0066EF9E /* StreamBuffer.h in Headers */, FA6A2B761F60B6710074C308 /* ByteData.h in Headers */, 217DFBF31D9F6D490055D849 /* mime.h in Headers */, FA0B7B361A958EA3000E1D17 /* wuff_convert.h in Headers */, FA0B7CDE1A95902C000E1D17 /* Source.h in Headers */, FA0B7E141A95902C000E1D17 /* GearJoint.h in Headers */, FAAA3FDA1F64B3AD00F89E99 /* lstrlib.h in Headers */, FABDA98C2552448300B5C523 /* b2_contact_solver.h in Headers */, FA0B7E9F1A95902C000E1D17 /* WaveDecoder.h in Headers */, FAF140871E20934C00F898D2 /* parseVersions.h in Headers */, FA0B7AC61A958EA3000E1D17 /* types.h in Headers */, FA0B7DBD1A95902C000E1D17 /* Joystick.h in Headers */, D9DB6E452B4B80E80037A1F6 /* build_info.h in Headers */, FA0B7D0E1A95902C000E1D17 /* wrap_Filesystem.h in Headers */, FA0B7EE41A95902D000E1D17 /* Window.h in Headers */, FA0B7CFC1A95902C000E1D17 /* Filesystem.h in Headers */, FA0B7AD81A958EA3000E1D17 /* lua-enet.h in Headers */, FA0B7EBA1A95902C000E1D17 /* Channel.h in Headers */, FA0B7D3E1A95902C000E1D17 /* Texture.h in Headers */, FA0B7ECA1A95902C000E1D17 /* threads.h in Headers */, FADF54361E3DAE6E00012CC0 /* wrap_SpriteBatch.h in Headers */, D9F0C2D62C680A5500BB2D25 /* CurlClient.h in Headers */, FA0B7DB01A95902C000E1D17 /* wrap_CompressedImageData.h in Headers */, FAC7CD8D1FE35E95006A60C7 /* physfs_platforms.h in Headers */, FABDA9B82552448300B5C523 /* b2_motor_joint.h in Headers */, FA0B7AC11A958EA3000E1D17 /* callbacks.h in Headers */, FA3C5E491F8D80CA0003C579 /* ShaderStage.h in Headers */, D9DAB9292961F10000C64820 /* GenericShaper.h in Headers */, FA0B7D8F1A95902C000E1D17 /* ddsHandler.h in Headers */, FAB2D5AC1AABDD8A008224A4 /* TrueTypeRasterizer.h in Headers */, FABDAA042552448300B5C523 /* b2_edge_shape.h in Headers */, FAF140C41E20934C00F898D2 /* ShaderLang.h in Headers */, FA1E887F1DF363CD00E808AA /* Filter.h in Headers */, FA27B3C21B4985BF008A9DCE /* wrap_VideoStream.h in Headers */, FAF140621E20934C00F898D2 /* ShHandle.h in Headers */, FA0B7B2F1A958EA3000E1D17 /* utf8.h in Headers */, FA0B79231A958E3B000E1D17 /* EnumMap.h in Headers */, FAF140571E20934C00F898D2 /* arrays.h in Headers */, FA0B7E681A95902C000E1D17 /* wrap_PrismaticJoint.h in Headers */, FABDA9DC2552448300B5C523 /* b2_friction_joint.h in Headers */, FABDA9CA2552448300B5C523 /* b2_time_step.h in Headers */, FABDA9CC2552448300B5C523 /* b2_circle_shape.h in Headers */, FA0B7D571A95902C000E1D17 /* Buffer.h in Headers */, FAF140AB1E20934C00F898D2 /* SymbolTable.h in Headers */, FA18CF1E23DCF67900263725 /* external_interface.h in Headers */, FA0B7ED71A95902D000E1D17 /* Timer.h in Headers */, FA0B7AC31A958EA3000E1D17 /* list.h in Headers */, FA0B7B2D1A958EA3000E1D17 /* core.h in Headers */, FA1E88841DF363DB00E808AA /* Filter.h in Headers */, FA94727D27A6EE1B00817677 /* HTTPSClient.h in Headers */, 217DFC061D9F6D490055D849 /* tp.lua.h in Headers */, FABDA9E02552448300B5C523 /* b2_polygon_shape.h in Headers */, FAB17BF71ABFC4B100F9BA27 /* lz4hc.h in Headers */, FA0B7E831A95902C000E1D17 /* Shape.h in Headers */, FAE272531C05A15B00A67640 /* ParticleSystem.h in Headers */, FA6A2B6C1F5F7F560074C308 /* DataView.h in Headers */, FAF140701E20934C00F898D2 /* Initialize.h in Headers */, FAC8E54C23AC8379007B07C8 /* wrap_NativeFile.h in Headers */, FAAA3FDC1F64B3AD00F89E99 /* lutf8lib.h in Headers */, FAC7CD801FE35E95006A60C7 /* physfs_casefolding.h in Headers */, FA1BA09F1E16CFCE00AA2803 /* Font.h in Headers */, FA0B7EDD1A95902D000E1D17 /* Touch.h in Headers */, FA0B7EDE1A95902D000E1D17 /* Touch.h in Headers */, FAC7CD861FE35E95006A60C7 /* physfs.h in Headers */, D9DAB92C2961F10000C64820 /* TextShaper.h in Headers */, FA522D4F23F9FE380059EE3C /* MP3Decoder.h in Headers */, 217DFBEE1D9F6D490055D849 /* luasocket.h in Headers */, FACA02F31F5E396B0084B28F /* HashFunction.h in Headers */, FA0B7ED01A95902C000E1D17 /* wrap_LuaThread.h in Headers */, FAF6C9E923C2DE2900D7B5BC /* GLSL.ext.KHR.h in Headers */, FA0B7CE41A95902C000E1D17 /* wrap_Audio.h in Headers */, FADF540F1E3D7CDD00012CC0 /* wrap_Video.h in Headers */, FAA54ACA1F91660400A8FA7B /* OggDemuxer.h in Headers */, FA0B79491A958E3B000E1D17 /* version.h in Headers */, FAF140581E20934C00F898D2 /* BaseTypes.h in Headers */, FA18CED723DBC6E000263725 /* Shader.h in Headers */, FABDA9E32552448300B5C523 /* b2_draw.h in Headers */, FA0B7B2B1A958EA3000E1D17 /* stb_image.h in Headers */, FAF140AE1E20934C00F898D2 /* Versions.h in Headers */, FA0B7CD21A95902C000E1D17 /* Audio.h in Headers */, FA0B79421A958E3B000E1D17 /* utf8.h in Headers */, FA0B7D171A95902C000E1D17 /* Font.h in Headers */, FAECA1B41F3164700095D008 /* CompressedSlice.h in Headers */, FA0B7EAE1A95902C000E1D17 /* wrap_SoundData.h in Headers */, FA0B7CFF1A95902C000E1D17 /* File.h in Headers */, FA0B7AB41A958EA3000E1D17 /* ddsinfo.h in Headers */, FABDA9C62552448300B5C523 /* b2_rope.h in Headers */, FA0B7DD21A95902C000E1D17 /* love.h in Headers */, FAC8E54523AC832A007B07C8 /* NativeFile.h in Headers */, FA6A2B6F1F5F845F0074C308 /* wrap_DataView.h in Headers */, FA18CF3D23DCF67900263725 /* GLSL.std.450.h in Headers */, FA18CF3E23DCF67900263725 /* spirv_cross_containers.hpp in Headers */, FA18CF1B23DCF67900263725 /* thread_group.hpp in Headers */, FAF140861E20934C00F898D2 /* ParseHelper.h in Headers */, FA0B7CE71A95902C000E1D17 /* wrap_Source.h in Headers */, FA0B7B231A958EA3000E1D17 /* luasocket.h in Headers */, FA0B7D1D1A95902C000E1D17 /* GlyphData.h in Headers */, FA522D5A23FA5ED50059EE3C /* NotoSans-Regular.ttf.gzip.h in Headers */, FAC7CD8E1FE35E95006A60C7 /* physfs_lzmasdk.h in Headers */, FA0B7B391A958EA3000E1D17 /* wuff_internal.h in Headers */, FAC7CD771FE35E95006A60C7 /* physfs_internal.h in Headers */, FA0B7D881A95902C000E1D17 /* ImageData.h in Headers */, FAF6C9DA23C2DE2900D7B5BC /* SPVRemapper.h in Headers */, FA0B7EE11A95902D000E1D17 /* wrap_Touch.h in Headers */, FA9D8DDB1DEF8411002CD881 /* Stream.h in Headers */, FAF6C9E823C2DE2900D7B5BC /* GLSL.ext.EXT.h in Headers */, FACA02F71F5E396B0084B28F /* wrap_DataModule.h in Headers */, FABDA9BE2552448300B5C523 /* Box2D.h in Headers */, D9DAB9222961F0EE00C64820 /* HarfbuzzShaper.h in Headers */, FA56AA3A1FAFF02000A43D5F /* memory.h in Headers */, FA0B7E441A95902C000E1D17 /* wrap_CircleShape.h in Headers */, FA0B7EB41A95902C000E1D17 /* System.h in Headers */, FAF1405A1E20934C00F898D2 /* ConstantUnion.h in Headers */, FABDA9782552448200B5C523 /* b2_block_allocator.h in Headers */, FAF140A51E20934C00F898D2 /* Scan.h in Headers */, FABDA9C72552448300B5C523 /* b2_distance_joint.h in Headers */, FA0B7CE11A95902C000E1D17 /* Source.h in Headers */, FABDA9C32552448300B5C523 /* b2_settings.h in Headers */, FA24348621D401CB00B8918A /* attribute.h in Headers */, FABDA9C02552448300B5C523 /* b2_broad_phase.h in Headers */, FAF140901E20934C00F898D2 /* PpContext.h in Headers */, FA0B7E621A95902C000E1D17 /* wrap_Physics.h in Headers */, FA0B7DF01A95902C000E1D17 /* Mouse.h in Headers */, FABDA9E62552448300B5C523 /* b2_api.h in Headers */, 217DFBDC1D9F6D490055D849 /* buffer.h in Headers */, FA0B7DAD1A95902C000E1D17 /* STBHandler.h in Headers */, FABDA9BB2552448300B5C523 /* b2_dynamic_tree.h in Headers */, FA1BA0A41E16D97500AA2803 /* wrap_Font.h in Headers */, D91C76122DE3D088001FC408 /* spvUtil.h in Headers */, FA0B7DE11A95902C000E1D17 /* wrap_Math.h in Headers */, FA0B7D1A1A95902C000E1D17 /* TrueTypeRasterizer.h in Headers */, FA0B7EA81A95902C000E1D17 /* wrap_Decoder.h in Headers */, FA0B7AC51A958EA3000E1D17 /* time.h in Headers */, FA0B793E1A958E3B000E1D17 /* StringMap.h in Headers */, FA18CF1623DCF67900263725 /* spirv_parser.hpp in Headers */, FA0B793A1A958E3B000E1D17 /* Reference.h in Headers */, FACA02F51F5E396B0084B28F /* wrap_CompressedData.h in Headers */, FABDA9DF2552448300B5C523 /* b2_world.h in Headers */, FA0B7DCC1A95902C000E1D17 /* Keyboard.h in Headers */, FA620A341AA2F8DB005DB4C2 /* wrap_Quad.h in Headers */, FA0B7EA51A95902C000E1D17 /* SoundData.h in Headers */, FADF54271E3DA5BA00012CC0 /* Mesh.h in Headers */, FAF1405E1E20934C00F898D2 /* PoolAlloc.h in Headers */, FA0B79341A958E3B000E1D17 /* Object.h in Headers */, 217DFBF11D9F6D490055D849 /* mbox.lua.h in Headers */, FA0B7CEA1A95902C000E1D17 /* Event.h in Headers */, FA0B7E351A95902C000E1D17 /* WeldJoint.h in Headers */, FABDA9CB2552448300B5C523 /* b2_pulley_joint.h in Headers */, FA0B7E2F1A95902C000E1D17 /* RopeJoint.h in Headers */, FA0B7D141A95902C000E1D17 /* Font.h in Headers */, FA0B7E591A95902C000E1D17 /* wrap_Joint.h in Headers */, FA0B7E771A95902C000E1D17 /* wrap_WeldJoint.h in Headers */, FA18CEC723D3AE6800263725 /* wrap_Buffer.h in Headers */, FA0B7E291A95902C000E1D17 /* PulleyJoint.h in Headers */, FA6BDE5C1F31725300786805 /* Color.h in Headers */, FA0B7E231A95902C000E1D17 /* PolygonShape.h in Headers */, FA0B791E1A958E3B000E1D17 /* config.h in Headers */, FAB17BE81ABFAA9000F9BA27 /* lz4.h in Headers */, FA0B7E6B1A95902C000E1D17 /* wrap_PulleyJoint.h in Headers */, FAFEB29B28F210550025D7D0 /* unixdgram.h in Headers */, FA0B7E051A95902C000E1D17 /* Contact.h in Headers */, FA4F2BE41DE6650600CA37D7 /* Transform.h in Headers */, FA6A2B661F5F7B6B0074C308 /* wrap_Data.h in Headers */, FA18CEE423DBC6E000263725 /* Graphics.h in Headers */, 217DFBE81D9F6D490055D849 /* inet.h in Headers */, FADF53FA1E3C7ACD00012CC0 /* Buffer.h in Headers */, FA18CF4223DCF67900263725 /* spirv_glsl.hpp in Headers */, FA18CF1C23DCF67900263725 /* internal_interface.hpp in Headers */, FA18CF2523DCF67900263725 /* spirv_cross_parsed_ir.hpp in Headers */, FA0B7EEA1A95902D000E1D17 /* wrap_Window.h in Headers */, FA1557C01CE90A2C00AFF582 /* tinyexr.h in Headers */, FA0B7E381A95902C000E1D17 /* WheelJoint.h in Headers */, D943E5902A24D56000D80361 /* PhysfsIo.h in Headers */, FA0B7D851A95902C000E1D17 /* Image.h in Headers */, FABDA9EA2552448300B5C523 /* b2_world_callbacks.h in Headers */, FA0B7E7D1A95902C000E1D17 /* wrap_World.h in Headers */, FA0B7EBD1A95902C000E1D17 /* LuaThread.h in Headers */, FADF53FF1E3D74F200012CC0 /* TextBatch.h in Headers */, FA0B7DC01A95902C000E1D17 /* JoystickModule.h in Headers */, FA18CF3923DCF67900263725 /* spirv_msl.hpp in Headers */, FA0B7E871A95902C000E1D17 /* CoreAudioDecoder.h in Headers */, FA0B7CD51A95902C000E1D17 /* Source.h in Headers */, 217DFBFD1D9F6D490055D849 /* smtp.lua.h in Headers */, FABDA9772552448200B5C523 /* b2_shape.h in Headers */, FA27B39F1B498151008A9DCE /* Video.h in Headers */, FA94727A27A6EE1B00817677 /* Connection.h in Headers */, FA18CF3223DCF67900263725 /* spirv_cfg.hpp in Headers */, FA94727F27A6EE1B00817677 /* config.h in Headers */, 217DFC041D9F6D490055D849 /* timeout.h in Headers */, FA0B7E7A1A95902C000E1D17 /* wrap_WheelJoint.h in Headers */, FA0B7DD81A95902C000E1D17 /* MathModule.h in Headers */, 217DFBDA1D9F6D490055D849 /* auxiliar.h in Headers */, FA0B7EC71A95902C000E1D17 /* ThreadModule.h in Headers */, D9F0C2DB2C680A5500BB2D25 /* OpenSSLConnection.h in Headers */, FA4F2BAD1DE1E37000CA37D7 /* RecordingDevice.h in Headers */, FABDA9CE2552448300B5C523 /* b2_time_of_impact.h in Headers */, FA0B792B1A958E3B000E1D17 /* Matrix.h in Headers */, FA0B7DA41A95902C000E1D17 /* PKMHandler.h in Headers */, FAF6C9E423C2DE2900D7B5BC /* doc.h in Headers */, FA0B7AC81A958EA3000E1D17 /* utility.h in Headers */, FABDA9BA2552448300B5C523 /* b2_weld_joint.h in Headers */, FA522D5323F9FF2A0059EE3C /* dr_mp3.h in Headers */, D9DB6E272B4B40660037A1F6 /* ResourceLimits.h in Headers */, FA0B791F1A958E3B000E1D17 /* Data.h in Headers */, FA18CF4523DD1A8100263725 /* ShaderStage.h in Headers */, 217DFBE41D9F6D490055D849 /* headers.lua.h in Headers */, FA0B7D021A95902C000E1D17 /* Filesystem.h in Headers */, FA0B7E471A95902C000E1D17 /* wrap_Contact.h in Headers */, FA0B7E021A95902C000E1D17 /* CircleShape.h in Headers */, D9DB6E3E2B4B41580037A1F6 /* NonSemanticDebugPrintf.h in Headers */, FABDA9E92552448300B5C523 /* b2_timer.h in Headers */, FA0B7E111A95902C000E1D17 /* FrictionJoint.h in Headers */, FA0B7AE01A958EA3000E1D17 /* lodepng.h in Headers */, FA0B7ECD1A95902C000E1D17 /* wrap_Channel.h in Headers */, FAF140AF1E20934C00F898D2 /* osinclude.h in Headers */, FA93C4531F315B960087CCD4 /* FormatHandler.h in Headers */, FA0B7CD81A95902C000E1D17 /* Audio.h in Headers */, FA0B7CF61A95902C000E1D17 /* File.h in Headers */, D9F0C2CC2C68091200BB2D25 /* LibraryLoader.h in Headers */, FA18CF2123DCF67900263725 /* spirv.hpp in Headers */, FA0A3A5F23366CE9001C269E /* floattypes.h in Headers */, FADF54091E3D78F700012CC0 /* Video.h in Headers */, FAA54ACB1F91660400A8FA7B /* TheoraVideoStream.h in Headers */, FA0B7DD51A95902C000E1D17 /* BezierCurve.h in Headers */, FA0B79271A958E3B000E1D17 /* int.h in Headers */, FA0B7E531A95902C000E1D17 /* wrap_FrictionJoint.h in Headers */, FA0B7EB71A95902C000E1D17 /* wrap_System.h in Headers */, FA18CF1923DCF67900263725 /* spirv_cross_error_handling.hpp in Headers */, FABDAA032552448300B5C523 /* b2_contact_manager.h in Headers */, FA27B3A91B498151008A9DCE /* Video.h in Headers */, FAAA3FD81F64B3AD00F89E99 /* lprefix.h in Headers */, FAF6C9F023C2DE2900D7B5BC /* GlslangToSpv.h in Headers */, FAF6C9F723C2DE2900D7B5BC /* Logger.h in Headers */, 217DFBFA1D9F6D490055D849 /* select.h in Headers */, FABDA9BF2552448300B5C523 /* b2_types.h in Headers */, FA0B7DF61A95902C000E1D17 /* wrap_Mouse.h in Headers */, FAF140661E20934C00F898D2 /* gl_types.h in Headers */, FA0B7E801A95902C000E1D17 /* Joint.h in Headers */, FA0B7D2F1A95902C000E1D17 /* Drawable.h in Headers */, FA18CF3A23DCF67900263725 /* spirv_reflect.hpp in Headers */, 217DFBE21D9F6D490055D849 /* ftp.lua.h in Headers */, FA0B7EC41A95902C000E1D17 /* Thread.h in Headers */, FA0B7DFF1A95902C000E1D17 /* ChainShape.h in Headers */, FA18CEE023DBC6E000263725 /* StreamBuffer.h in Headers */, FA0B7E4D1A95902C000E1D17 /* wrap_EdgeShape.h in Headers */, FA522D5423F9FF2A0059EE3C /* dr_flac.h in Headers */, FAF1405F1E20934C00F898D2 /* ResourceLimits.h in Headers */, FA0B7DDB1A95902C000E1D17 /* RandomGenerator.h in Headers */, FA0B7E841A95902C000E1D17 /* Decoder.h in Headers */, FA0B7EAB1A95902C000E1D17 /* wrap_Sound.h in Headers */, FA0B7B2C1A958EA3000E1D17 /* checked.h in Headers */, FABDA9A62552448300B5C523 /* b2_polygon_contact.h in Headers */, FA94728727A6EE1B00817677 /* HTTPS.h in Headers */, FA0B7D2A1A95902C000E1D17 /* wrap_GlyphData.h in Headers */, FACA02F11F5E396B0084B28F /* DataModule.h in Headers */, FABDA9C82552448300B5C523 /* b2_body.h in Headers */, FA0B7E741A95902C000E1D17 /* wrap_Shape.h in Headers */, FABDA9762552448200B5C523 /* b2_joint.h in Headers */, FABDA9CD2552448300B5C523 /* b2_math.h in Headers */, FABDA9C42552448300B5C523 /* b2_revolute_joint.h in Headers */, FA91DA8D1F377C3900C80E33 /* deprecation.h in Headers */, FAF1407F1E20934C00F898D2 /* localintermediate.h in Headers */, FAF1406B1E20934C00F898D2 /* glslang_tab.cpp.h in Headers */, 217DFBF71D9F6D490055D849 /* options.h in Headers */, FA94728327A6EE1B00817677 /* HTTPRequest.h in Headers */, FAF6C9ED23C2DE2900D7B5BC /* spvIR.h in Headers */, FA0B7E3B1A95902C000E1D17 /* World.h in Headers */, FA0B7DC31A95902C000E1D17 /* wrap_Joystick.h in Headers */, FA18CF3B23DCF67900263725 /* spirv_cross_util.hpp in Headers */, FAF140631E20934C00F898D2 /* Types.h in Headers */, D9DB6E292B4B40970037A1F6 /* span.h in Headers */, FACA06AF293EE5CD001A2557 /* Sensor.h in Headers */, FA4F2BE61DE6650600CA37D7 /* wrap_Transform.h in Headers */, FA0B7EE71A95902D000E1D17 /* Window.h in Headers */, FA0B7E651A95902C000E1D17 /* wrap_PolygonShape.h in Headers */, FA18CEE323DBC6E000263725 /* Metal.h in Headers */, FABDA9952552448300B5C523 /* b2_edge_polygon_contact.h in Headers */, FA94729D27A6F9AD00817677 /* NSURLClient.h in Headers */, FA0B7AC91A958EA3000E1D17 /* win32.h in Headers */, FABDA9B92552448300B5C523 /* b2_common.h in Headers */, FA0B7DFC1A95902C000E1D17 /* Body.h in Headers */, FA1BA0B31E16FD0800AA2803 /* Shader.h in Headers */, FAF6C9F123C2DE2900D7B5BC /* GLSL.std.450.h in Headers */, FABDA97E2552448200B5C523 /* b2_chain_circle_contact.h in Headers */, FABDA9DD2552448300B5C523 /* b2_contact.h in Headers */, FABDA9802552448200B5C523 /* b2_circle_contact.h in Headers */, 217DFC101D9F6D490055D849 /* url.lua.h in Headers */, FA0B7DF31A95902C000E1D17 /* wrap_Cursor.h in Headers */, FA18CF2023DCF67900263725 /* spirv_hlsl.hpp in Headers */, FA0B7D271A95902C000E1D17 /* wrap_Font.h in Headers */, FA0B7DAA1A95902C000E1D17 /* PVRHandler.h in Headers */, FA27B3B51B498151008A9DCE /* wrap_Video.h in Headers */, FABDA9BC2552448300B5C523 /* b2_fixture.h in Headers */, FA0B7D7B1A95902C000E1D17 /* Quad.h in Headers */, FA0B7E261A95902C000E1D17 /* PrismaticJoint.h in Headers */, FABDA9852552448200B5C523 /* b2_edge_circle_contact.h in Headers */, FA0B7E991A95902C000E1D17 /* Sound.h in Headers */, FA0B7D841A95902C000E1D17 /* CompressedImageData.h in Headers */, FACA02ED1F5E396B0084B28F /* CompressedData.h in Headers */, FAF1407E1E20934C00F898D2 /* LiveTraverser.h in Headers */, FA0B7D231A95902C000E1D17 /* Rasterizer.h in Headers */, FABDA9B72552448300B5C523 /* b2_island.h in Headers */, FAD19A191DFF8CA200D5398A /* ImageDataBase.h in Headers */, FABDA9E22552448300B5C523 /* b2_growable_stack.h in Headers */, FA0B7CDB1A95902C000E1D17 /* Pool.h in Headers */, FA0B7D0B1A95902C000E1D17 /* wrap_FileData.h in Headers */, FA0B7DF91A95902C000E1D17 /* Body.h in Headers */, FA0B7DB91A95902C000E1D17 /* Joystick.h in Headers */, FA4F2BB11DE1E37B00CA37D7 /* RecordingDevice.h in Headers */, FA0B7E2C1A95902C000E1D17 /* RevoluteJoint.h in Headers */, FA8951A41AA2EDF300EC385A /* wrap_Event.h in Headers */, FA0B7B2A1A958EA3000E1D17 /* simplexnoise1234.h in Headers */, FA9D53AE1F5307E900125C6B /* Deprecations.h in Headers */, FA0B7ADC1A958EA3000E1D17 /* glad.hpp in Headers */, FA6A2B791F60B8250074C308 /* wrap_ByteData.h in Headers */, FA0B7CF91A95902C000E1D17 /* FileData.h in Headers */, FA0B7DA71A95902C000E1D17 /* PNGHandler.h in Headers */, FA0B7AC41A958EA3000E1D17 /* protocol.h in Headers */, FABDA97F2552448200B5C523 /* b2_polygon_circle_contact.h in Headers */, FAF140A21E20934C00F898D2 /* RemoveTree.h in Headers */, FAF6C9DE23C2DE2900D7B5BC /* SpvTools.h in Headers */, FABDA9E82552448300B5C523 /* b2_gear_joint.h in Headers */, FA0B7D321A95902C000E1D17 /* Graphics.h in Headers */, FA0B7E321A95902C000E1D17 /* Shape.h in Headers */, FA620A371AA2F8DB005DB4C2 /* wrap_Texture.h in Headers */, FA0B7DBA1A95902C000E1D17 /* JoystickModule.h in Headers */, FA0B7DEA1A95902C000E1D17 /* Mouse.h in Headers */, FA0B7E931A95902C000E1D17 /* ModPlugDecoder.h in Headers */, FA0B7D111A95902C000E1D17 /* BMFontRasterizer.h in Headers */, 217DFBE61D9F6D490055D849 /* http.lua.h in Headers */, FACA06AE293EE5CD001A2557 /* Sensor.h in Headers */, FA18CF1D23DCF67900263725 /* sampler.hpp in Headers */, FA0B7E3E1A95902C000E1D17 /* wrap_Body.h in Headers */, FABDA9C92552448300B5C523 /* b2_distance.h in Headers */, FA24348921D401CB00B8918A /* pch.h in Headers */, FAF140991E20934C00F898D2 /* PpTokens.h in Headers */, FA84DE6827791C36002674C6 /* GraphicsReadback.h in Headers */, FAF1405B1E20934C00F898D2 /* InfoSink.h in Headers */, FA18CF2423DCF67900263725 /* spirv_cpp.hpp in Headers */, FA0B7B321A958EA3000E1D17 /* wuff.h in Headers */, 217DFBF81D9F6D490055D849 /* pierror.h in Headers */, 217DFC021D9F6D490055D849 /* tcp.h in Headers */, FA3C5E441F8C368C0003C579 /* ShaderStage.h in Headers */, FA0B79261A958E3B000E1D17 /* Exception.h in Headers */, D9DB6E402B4B41580037A1F6 /* GLSL.ext.ARM.h in Headers */, FA0B7D4D1A95902C000E1D17 /* Shader.h in Headers */, FA0B793D1A958E3B000E1D17 /* runtime.h in Headers */, FAF6C9E323C2DE2900D7B5BC /* GLSL.ext.AMD.h in Headers */, FA57FB9A1AE1993600F2AD6D /* noise1234.h in Headers */, D91C76152DE3D0A2001FC408 /* visibility.h in Headers */, FACA02EF1F5E396B0084B28F /* Compressor.h in Headers */, FA0B7CED1A95902C000E1D17 /* Event.h in Headers */, FA0B7D811A95902C000E1D17 /* Volatile.h in Headers */, FA0B7B2E1A958EA3000E1D17 /* unchecked.h in Headers */, FA0B7D081A95902C000E1D17 /* wrap_File.h in Headers */, FA0B79451A958E3B000E1D17 /* Variant.h in Headers */, FA0B7E5C1A95902C000E1D17 /* wrap_MotorJoint.h in Headers */, FA4F2BA91DE1E36400CA37D7 /* wrap_RecordingDevice.h in Headers */, FA4F2B7A1DE0125B00CA37D7 /* xxhash.h in Headers */, FA0B7DDE1A95902C000E1D17 /* wrap_BezierCurve.h in Headers */, FA0B7DED1A95902C000E1D17 /* Cursor.h in Headers */, FA28EBD71E352DB5003446F4 /* FenceSync.h in Headers */, FADF542C1E3DAADA00012CC0 /* wrap_Mesh.h in Headers */, FAA3A9B01B7D465A00CED060 /* android.h in Headers */, 217DFBDE1D9F6D490055D849 /* compat.h in Headers */, FA0B79281A958E3B000E1D17 /* math.h in Headers */, 217DFC121D9F6D490055D849 /* usocket.h in Headers */, 217DFC081D9F6D490055D849 /* udp.h in Headers */, FA0B7DCF1A95902C000E1D17 /* wrap_Keyboard.h in Headers */, FA6BDF90281219E900240F2A /* DataStream.h in Headers */, FAF6C9DB23C2DE2900D7B5BC /* SpvBuilder.h in Headers */, FA0B7EA21A95902C000E1D17 /* Sound.h in Headers */, D9DB6E412B4B41580037A1F6 /* GLSL.ext.QCOM.h in Headers */, FA0B7B331A958EA3000E1D17 /* wuff_config.h in Headers */, FA0B7D3B1A95902C000E1D17 /* Graphics.h in Headers */, FA0B7E6E1A95902C000E1D17 /* wrap_RevoluteJoint.h in Headers */, FA27B3AC1B498151008A9DCE /* VideoStream.h in Headers */, FA0B7AC71A958EA3000E1D17 /* unix.h in Headers */, FA0B7E8D1A95902C000E1D17 /* FLACDecoder.h in Headers */, 217DFC001D9F6D490055D849 /* socket.lua.h in Headers */, FA0B7DE71A95902C000E1D17 /* Cursor.h in Headers */, 217DFBEC1D9F6D490055D849 /* ltn12.lua.h in Headers */, FA0B7DB61A95902C000E1D17 /* wrap_ImageData.h in Headers */, FADF543D1E3DAFF700012CC0 /* wrap_Graphics.h in Headers */, 217DFBFE1D9F6D490055D849 /* socket.h in Headers */, FAF1409C1E20934C00F898D2 /* propagateNoContraction.h in Headers */, FA0B7D2D1A95902C000E1D17 /* wrap_Rasterizer.h in Headers */, FA0B7AB71A958EA3000E1D17 /* ddsparse.h in Headers */, FA0B7DA11A95902C000E1D17 /* KTXHandler.h in Headers */, 217DFBE01D9F6D490055D849 /* except.h in Headers */, FA0B79311A958E3B000E1D17 /* Module.h in Headers */, 217DFBF51D9F6D490055D849 /* mime.lua.h in Headers */, FAC7CD961FE755B4006A60C7 /* lz4opt.h in Headers */, FA9D8DD31DEB56C3002CD881 /* pixelformat.h in Headers */, FABDA9DE2552448300B5C523 /* b2_prismatic_joint.h in Headers */, FA84DE6B277943F6002674C6 /* GraphicsReadback.h in Headers */, FAF140A61E20934C00F898D2 /* ScanContext.h in Headers */, FABDA97B2552448200B5C523 /* b2_chain_polygon_contact.h in Headers */, FA0B7E4A1A95902C000E1D17 /* wrap_DistanceJoint.h in Headers */, FA0B7DE41A95902C000E1D17 /* wrap_RandomGenerator.h in Headers */, FAC8E55023B01C0D007B07C8 /* macos.h in Headers */, FA0B7E0B1A95902C000E1D17 /* EdgeShape.h in Headers */, FA0B7EDA1A95902D000E1D17 /* wrap_Timer.h in Headers */, FA0B7EB11A95902C000E1D17 /* System.h in Headers */, FA0B7E1A1A95902C000E1D17 /* MotorJoint.h in Headers */, FA0B7D441A95902C000E1D17 /* OpenGL.h in Headers */, FA0B7E081A95902C000E1D17 /* DistanceJoint.h in Headers */, FA0B7E711A95902C000E1D17 /* wrap_RopeJoint.h in Headers */, FA0B7E411A95902C000E1D17 /* wrap_ChainShape.h in Headers */, FA18CF1A23DCF67900263725 /* barrier.hpp in Headers */, FA0B7E171A95902C000E1D17 /* Joint.h in Headers */, FA94727E27A6EE1B00817677 /* PlaintextConnection.h in Headers */, FA0B793F1A958E3B000E1D17 /* types.h in Headers */, FABDA9BD2552448300B5C523 /* b2_stack_allocator.h in Headers */, FABDA9CF2552448300B5C523 /* b2_mouse_joint.h in Headers */, FABDA9E42552448300B5C523 /* b2_collision.h in Headers */, FA41A3CA1C0A1F950084430C /* ASTCHandler.h in Headers */, FADF54041E3D77B500012CC0 /* wrap_TextBatch.h in Headers */, FA0B7ED31A95902C000E1D17 /* wrap_ThreadModule.h in Headers */, FAB922C6257D99EF0035DAD6 /* Range.h in Headers */, FAC756F61E4F99B400B91289 /* Effect.h in Headers */, FA0B7ADD1A958EA3000E1D17 /* gladfuncs.hpp in Headers */, FAF1405D1E20934C00F898D2 /* intermediate.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ FA0B78DC1A958B90000E1D17 /* liblove-ios */ = { isa = PBXNativeTarget; buildConfigurationList = FA0B78EE1A958B90000E1D17 /* Build configuration list for PBXNativeTarget "liblove-ios" */; buildPhases = ( FA0B78D91A958B90000E1D17 /* Sources */, FA0B78DA1A958B90000E1D17 /* Frameworks */, FA0B78DB1A958B90000E1D17 /* CopyFiles */, ); buildRules = ( ); dependencies = ( ); name = "liblove-ios"; productName = "liblove-ios"; productReference = FA0B78DD1A958B90000E1D17 /* liblove.a */; productType = "com.apple.product-type.library.static"; }; FA577AAE16C7507900860150 /* liblove-macosx */ = { isa = PBXNativeTarget; buildConfigurationList = FA577ABF16C7507900860150 /* Build configuration list for PBXNativeTarget "liblove-macosx" */; buildPhases = ( FA577AAA16C7507900860150 /* Sources */, FA577AAB16C7507900860150 /* Frameworks */, FA577AAC16C7507900860150 /* Headers */, FA577AAD16C7507900860150 /* Resources */, ); buildRules = ( ); dependencies = ( ); name = "liblove-macosx"; productName = love; productReference = FA577AAF16C7507900860150 /* love.framework */; productType = "com.apple.product-type.framework"; }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ 08FB7793FE84155DC02AAC07 /* Project object */ = { isa = PBXProject; attributes = { LastUpgradeCheck = 1340; TargetAttributes = { FA0B78DC1A958B90000E1D17 = { CreatedOnToolsVersion = 6.1.1; }; }; }; buildConfigurationList = 1DEB928908733DD80010E9CD /* Build configuration list for PBXProject "liblove" */; compatibilityVersion = "Xcode 11.0"; developmentRegion = en; hasScannedForEncodings = 1; knownRegions = ( en, Base, ); mainGroup = 54067CFB7D564E5764FA17DC /* love */; projectDirPath = ""; projectRoot = ""; targets = ( FA577AAE16C7507900860150 /* liblove-macosx */, FA0B78DC1A958B90000E1D17 /* liblove-ios */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ FA577AAD16C7507900860150 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( D91C76132DE3D088001FC408 /* spirv.hpp11 in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ FA0B78D91A958B90000E1D17 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( FA0B7DE01A95902C000E1D17 /* wrap_Math.cpp in Sources */, FA0B7DA91A95902C000E1D17 /* PVRHandler.cpp in Sources */, FAE64A842071363100BC7981 /* physfs_archiver_iso9660.c in Sources */, FA0B7EC61A95902C000E1D17 /* ThreadModule.cpp in Sources */, FAC8E54B23AC8379007B07C8 /* wrap_NativeFile.cpp in Sources */, FA0B7D2C1A95902C000E1D17 /* wrap_Rasterizer.cpp in Sources */, FADF54081E3D78F700012CC0 /* Video.cpp in Sources */, FA9D8DD81DEF8411002CD881 /* Data.cpp in Sources */, FABDA9992552448300B5C523 /* b2_contact_manager.cpp in Sources */, FADF542B1E3DAADA00012CC0 /* wrap_Mesh.cpp in Sources */, FA0B7CD71A95902C000E1D17 /* Audio.cpp in Sources */, FA0B7AC01A958EA3000E1D17 /* host.c in Sources */, FA0B7EB01A95902C000E1D17 /* System.cpp in Sources */, FA0B7EE31A95902D000E1D17 /* Window.cpp in Sources */, FA0B7EC21A95902C000E1D17 /* threads.cpp in Sources */, FA4F2C051DE936C900CA37D7 /* compat.c in Sources */, FA4F2BE81DE6651000CA37D7 /* wrap_Transform.cpp in Sources */, FA0B7D011A95902C000E1D17 /* Filesystem.cpp in Sources */, FAF140651E20934C00F898D2 /* Constant.cpp in Sources */, FA0B7ED91A95902D000E1D17 /* wrap_Timer.cpp in Sources */, FAF1407D1E20934C00F898D2 /* linkValidate.cpp in Sources */, FAE64A872071363100BC7981 /* physfs_archiver_slb.c in Sources */, FAF6C9E723C2DE2900D7B5BC /* SpvBuilder.cpp in Sources */, FA0B7DD11A95902C000E1D17 /* love.cpp in Sources */, FABDA9B42552448300B5C523 /* b2_prismatic_joint.cpp in Sources */, FA15DFAF1F9B8D390042AB22 /* lstrlib.c in Sources */, FA0B7AB61A958EA3000E1D17 /* ddsparse.cpp in Sources */, FABDA9F42552448300B5C523 /* b2_chain_shape.cpp in Sources */, FA0B7D221A95902C000E1D17 /* Rasterizer.cpp in Sources */, FAF6C9E223C2DE2900D7B5BC /* InReadableOrder.cpp in Sources */, FAF140BC1E20934C00F898D2 /* ossource.cpp in Sources */, FA0B7D7D1A95902C000E1D17 /* Texture.cpp in Sources */, FACA02FB1F5E397E0084B28F /* HashFunction.cpp in Sources */, FAF140A81E20934C00F898D2 /* ShaderLang.cpp in Sources */, FA1BA09E1E16CFCE00AA2803 /* Font.cpp in Sources */, FABDA9A12552448300B5C523 /* b2_gear_joint.cpp in Sources */, D9DB6E372B4B41100037A1F6 /* ResourceLimits.cpp in Sources */, FAE64A8A2071363100BC7981 /* physfs_archiver_wad.c in Sources */, FA18CF4723DD1A8100263725 /* ShaderStage.mm in Sources */, FA0B7ECC1A95902C000E1D17 /* wrap_Channel.cpp in Sources */, FA0B7E6D1A95902C000E1D17 /* wrap_RevoluteJoint.cpp in Sources */, FA84DE7227795E22002674C6 /* wrap_GraphicsReadback.cpp in Sources */, FACA02FA1F5E397B0084B28F /* DataModule.cpp in Sources */, FA0B7E641A95902C000E1D17 /* wrap_PolygonShape.cpp in Sources */, FA4F2C031DE936C200CA37D7 /* auxiliar.c in Sources */, FA0B7E731A95902C000E1D17 /* wrap_Shape.cpp in Sources */, FA0B7CFE1A95902C000E1D17 /* File.cpp in Sources */, FA3C5E481F8D80CA0003C579 /* ShaderStage.cpp in Sources */, FA27B39E1B498151008A9DCE /* Video.cpp in Sources */, FA0B7E6A1A95902C000E1D17 /* wrap_PulleyJoint.cpp in Sources */, FA0B7DB81A95902C000E1D17 /* Joystick.cpp in Sources */, FA91DA8C1F377C3900C80E33 /* deprecation.cpp in Sources */, FABDA9B02552448300B5C523 /* b2_mouse_joint.cpp in Sources */, FA6A2B6B1F5F7F560074C308 /* DataView.cpp in Sources */, FA0B7E401A95902C000E1D17 /* wrap_ChainShape.cpp in Sources */, FABDA99F2552448300B5C523 /* b2_edge_circle_contact.cpp in Sources */, FA0B7DEC1A95902C000E1D17 /* Cursor.cpp in Sources */, FA18CF2B23DCF67900263725 /* spirv_cross_util.cpp in Sources */, FA0B7D871A95902C000E1D17 /* ImageData.cpp in Sources */, FA18CF3123DCF67900263725 /* spirv_hlsl.cpp in Sources */, FA0B7E101A95902C000E1D17 /* FrictionJoint.cpp in Sources */, FABDA9902552448300B5C523 /* b2_world_callbacks.cpp in Sources */, FABDA9A52552448300B5C523 /* b2_wheel_joint.cpp in Sources */, FAF140741E20934C00F898D2 /* intermOut.cpp in Sources */, FA620A361AA2F8DB005DB4C2 /* wrap_Texture.cpp in Sources */, FA0B7D0A1A95902C000E1D17 /* wrap_FileData.cpp in Sources */, FAF140781E20934C00F898D2 /* iomapper.cpp in Sources */, FA0B7ABE1A958EA3000E1D17 /* compress.c in Sources */, FABDA9AE2552448300B5C523 /* b2_island.cpp in Sources */, FA4F2C141DE936FE00CA37D7 /* usocket.c in Sources */, FAF140831E20934C00F898D2 /* ParseContextBase.cpp in Sources */, FA0B7AD21A958EA3000E1D17 /* protocol.c in Sources */, FAF140A41E20934C00F898D2 /* Scan.cpp in Sources */, FA0B7D1F1A95902C000E1D17 /* ImageRasterizer.cpp in Sources */, FABDA9C22552448300B5C523 /* b2_rope.cpp in Sources */, FAE64A952071365100BC7981 /* physfs_platform_qnx.c in Sources */, FABDA9FC2552448300B5C523 /* b2_collide_polygon.cpp in Sources */, FABDA9D12552448300B5C523 /* b2_draw.cpp in Sources */, FACA06B3293EE5CD001A2557 /* Sensor.cpp in Sources */, FA0B7EA41A95902C000E1D17 /* SoundData.cpp in Sources */, FAF1406A1E20934C00F898D2 /* glslang_tab.cpp in Sources */, FA8951A31AA2EDF300EC385A /* wrap_Event.cpp in Sources */, FADF540E1E3D7CDD00012CC0 /* wrap_Video.cpp in Sources */, FA0B7D4C1A95902C000E1D17 /* Shader.cpp in Sources */, FA0B792A1A958E3B000E1D17 /* Matrix.cpp in Sources */, D9DAB92B2961F10000C64820 /* GenericShaper.cpp in Sources */, FAF140981E20934C00F898D2 /* PpTokens.cpp in Sources */, FAF140AA1E20934C00F898D2 /* SymbolTable.cpp in Sources */, FABDA9892552448300B5C523 /* b2_contact.cpp in Sources */, FA3C5E431F8C368C0003C579 /* ShaderStage.cpp in Sources */, FA0B7E191A95902C000E1D17 /* MotorJoint.cpp in Sources */, FAF1406F1E20934C00F898D2 /* Initialize.cpp in Sources */, FA0B7EBF1A95902C000E1D17 /* Thread.cpp in Sources */, FACA02F91F5E39790084B28F /* Compressor.cpp in Sources */, FABDAA002552448300B5C523 /* b2_time_of_impact.cpp in Sources */, FAF140811E20934C00F898D2 /* parseConst.cpp in Sources */, FA18CF3623DCF67900263725 /* spirv_cross_parsed_ir.cpp in Sources */, FA0B7EB91A95902C000E1D17 /* Channel.cpp in Sources */, FA18CF2323DCF67900263725 /* spirv_cfg.cpp in Sources */, FAE64A962071365100BC7981 /* physfs_platform_windows.c in Sources */, FA4B66CA1ABBCF1900558F15 /* Timer.cpp in Sources */, FA94727927A6EE1B00817677 /* main.cpp in Sources */, FA0B7E921A95902C000E1D17 /* ModPlugDecoder.cpp in Sources */, FA0B7E521A95902C000E1D17 /* wrap_FrictionJoint.cpp in Sources */, FADF54351E3DAE6E00012CC0 /* wrap_SpriteBatch.cpp in Sources */, FA4F2BB51DE1E4C300CA37D7 /* wrap_RecordingDevice.cpp in Sources */, FA4F2C111DE936FE00CA37D7 /* unix.c in Sources */, FA1BA0A31E16D97500AA2803 /* wrap_Font.cpp in Sources */, FABDA9842552448200B5C523 /* b2_chain_polygon_contact.cpp in Sources */, FADF53FE1E3D74F200012CC0 /* TextBatch.cpp in Sources */, FA0B7D191A95902C000E1D17 /* TrueTypeRasterizer.cpp in Sources */, FAC271E723B5B5B400C200D3 /* renderstate.cpp in Sources */, FA84DE6727791C36002674C6 /* GraphicsReadback.cpp in Sources */, FA0B7CFB1A95902C000E1D17 /* Filesystem.cpp in Sources */, FABDA9F82552448300B5C523 /* b2_dynamic_tree.cpp in Sources */, FABDA98B2552448300B5C523 /* b2_revolute_joint.cpp in Sources */, FA0B7D3D1A95902C000E1D17 /* Texture.cpp in Sources */, FA0B7B351A958EA3000E1D17 /* wuff_convert.c in Sources */, FAF140941E20934C00F898D2 /* PpScanner.cpp in Sources */, FABDA9EC2552448300B5C523 /* b2_collide_circle.cpp in Sources */, FA9D53AD1F5307E900125C6B /* Deprecations.cpp in Sources */, FA84DE622778D7F3002674C6 /* SpirvIntrinsics.cpp in Sources */, FA0B7E431A95902C000E1D17 /* wrap_CircleShape.cpp in Sources */, FAFEB29D28F210550025D7D0 /* unixstream.c in Sources */, FAE64A912071364800BC7981 /* physfs.c in Sources */, FAE64A852071363100BC7981 /* physfs_archiver_mvl.c in Sources */, FA0B7CE61A95902C000E1D17 /* wrap_Source.cpp in Sources */, FA9D8DDE1DEF842A002CD881 /* Drawable.cpp in Sources */, FA0B7CCE1A95902C000E1D17 /* Audio.cpp in Sources */, FADF54031E3D77B500012CC0 /* wrap_TextBatch.cpp in Sources */, FA0B7DCB1A95902C000E1D17 /* Keyboard.cpp in Sources */, D9F0C2DD2C680A5500BB2D25 /* UnixLibraryLoader.cpp in Sources */, FA0B7DFB1A95902C000E1D17 /* Body.cpp in Sources */, FA0B7ED21A95902C000E1D17 /* wrap_ThreadModule.cpp in Sources */, FADF54261E3DA5BA00012CC0 /* Mesh.cpp in Sources */, FA0B7EE01A95902D000E1D17 /* wrap_Touch.cpp in Sources */, FA4F2C081DE936DD00CA37D7 /* io.c in Sources */, FA0B7CDD1A95902C000E1D17 /* Source.cpp in Sources */, FAF6C9EC23C2DE2900D7B5BC /* GlslangToSpv.cpp in Sources */, FA0B7DC51A95902C000E1D17 /* wrap_JoystickModule.cpp in Sources */, FA0B7E701A95902C000E1D17 /* wrap_RopeJoint.cpp in Sources */, FA18CF4023DCF67900263725 /* spirv_parser.cpp in Sources */, FA24348821D401CB00B8918A /* attribute.cpp in Sources */, FACA02FC1F5E39810084B28F /* wrap_CompressedData.cpp in Sources */, D9F0C2DA2C680A5500BB2D25 /* OpenSSLConnection.cpp in Sources */, FABDA9A32552448300B5C523 /* b2_friction_joint.cpp in Sources */, D9F0C2D52C680A5500BB2D25 /* CurlClient.cpp in Sources */, FAF140AD1E20934C00F898D2 /* Versions.cpp in Sources */, FA0B793C1A958E3B000E1D17 /* runtime.cpp in Sources */, FA6BDF8A280B62A000240F2A /* GraphicsReadback.mm in Sources */, FA0B7DBC1A95902C000E1D17 /* Joystick.cpp in Sources */, FA0B7DAF1A95902C000E1D17 /* wrap_CompressedImageData.cpp in Sources */, FA0B7AD51A958EA3000E1D17 /* unix.c in Sources */, D93660F92D1C727C00C0EC4B /* Touch.cpp in Sources */, FAB17BE71ABFAA9000F9BA27 /* lz4.c in Sources */, FAE64A902071364800BC7981 /* physfs_unicode.c in Sources */, FACA06B1293EE5CD001A2557 /* Sensor.cpp in Sources */, FA4F2BE71DE6650D00CA37D7 /* Transform.cpp in Sources */, FAF140A11E20934C00F898D2 /* RemoveTree.cpp in Sources */, FABDA9972552448300B5C523 /* b2_distance_joint.cpp in Sources */, FA0B7CDA1A95902C000E1D17 /* Pool.cpp in Sources */, FA0B7E161A95902C000E1D17 /* Joint.cpp in Sources */, FA0B7EE91A95902D000E1D17 /* wrap_Window.cpp in Sources */, FA1583E21E196180005E603B /* wrap_Shader.cpp in Sources */, D943E58F2A24D56000D80361 /* PhysfsIo.cpp in Sources */, FA0B7AB91A958EA3000E1D17 /* enet.cpp in Sources */, FA0B7E281A95902C000E1D17 /* PulleyJoint.cpp in Sources */, FA56AA391FAFF02000A43D5F /* memory.cpp in Sources */, FABDA98E2552448300B5C523 /* b2_contact_solver.cpp in Sources */, FAF1409E1E20934C00F898D2 /* reflection.cpp in Sources */, FA15DFAE1F9B8D360042AB22 /* lutf8lib.c in Sources */, FAF1408B1E20934C00F898D2 /* Pp.cpp in Sources */, FA76344B1E28722A0066EF9E /* StreamBuffer.cpp in Sources */, FA0B7E041A95902C000E1D17 /* Contact.cpp in Sources */, FA0B7D831A95902C000E1D17 /* CompressedImageData.cpp in Sources */, FA0B7B311A958EA3000E1D17 /* wuff.c in Sources */, FA0B7DF21A95902C000E1D17 /* wrap_Cursor.cpp in Sources */, FA0B7E011A95902C000E1D17 /* CircleShape.cpp in Sources */, FAE64A8C2071363100BC7981 /* physfs_byteorder.c in Sources */, FA0B7E461A95902C000E1D17 /* wrap_Contact.cpp in Sources */, FA94727C27A6EE1B00817677 /* HTTPSClient.cpp in Sources */, FA0B7D161A95902C000E1D17 /* Font.cpp in Sources */, FA0B7EB61A95902C000E1D17 /* wrap_System.cpp in Sources */, FA0B7DAC1A95902C000E1D17 /* STBHandler.cpp in Sources */, FADF53F91E3C7ACD00012CC0 /* Buffer.cpp in Sources */, FA0B79301A958E3B000E1D17 /* Module.cpp in Sources */, FAF1409B1E20934C00F898D2 /* propagateNoContraction.cpp in Sources */, FA0B7DDA1A95902C000E1D17 /* RandomGenerator.cpp in Sources */, FA2AF6751DAD64970032B62C /* vertex.cpp in Sources */, FAF140561E20934C00F898D2 /* Link.cpp in Sources */, FAF140851E20934C00F898D2 /* ParseHelper.cpp in Sources */, FA0B7D801A95902C000E1D17 /* Volatile.cpp in Sources */, FA1BA0B21E16FD0800AA2803 /* Shader.cpp in Sources */, FA0B7EBC1A95902C000E1D17 /* LuaThread.cpp in Sources */, FA0B7EF21A959D2C000E1D17 /* ios.mm in Sources */, FAE64A802071362A00BC7981 /* physfs_archiver_7z.c in Sources */, FABDA9942552448300B5C523 /* b2_polygon_circle_contact.cpp in Sources */, FA0B7D3A1A95902C000E1D17 /* Graphics.cpp in Sources */, FA4F2BB21DE1E4B400CA37D7 /* RecordingDevice.cpp in Sources */, FAE64A922071364B00BC7981 /* physfs_platform_winrt.cpp in Sources */, FABDA97A2552448200B5C523 /* b2_joint.cpp in Sources */, FA4F2C0F1DE936FE00CA37D7 /* timeout.c in Sources */, FA6BDF8F281219E900240F2A /* DataStream.cpp in Sources */, FA59A2D31C06481400328DBA /* ParticleSystem.cpp in Sources */, FA0B7E131A95902C000E1D17 /* GearJoint.cpp in Sources */, FABDA99B2552448300B5C523 /* b2_polygon_contact.cpp in Sources */, D9DAB9242961F0EE00C64820 /* HarfbuzzShaper.cpp in Sources */, FA0B7DC21A95902C000E1D17 /* wrap_Joystick.cpp in Sources */, FA0B7CD41A95902C000E1D17 /* Source.cpp in Sources */, FAA3A9AF1B7D465A00CED060 /* android.cpp in Sources */, FAE64A812071363100BC7981 /* physfs_archiver_dir.c in Sources */, FA18CEF023DC9B3E00263725 /* Texture.mm in Sources */, FA0B7CD11A95902C000E1D17 /* Audio.cpp in Sources */, FA4F2B7B1DE0181B00CA37D7 /* xxhash.c in Sources */, FA0B7D131A95902C000E1D17 /* Font.cpp in Sources */, FABDA9F62552448300B5C523 /* b2_broad_phase.cpp in Sources */, FA0B7EC91A95902C000E1D17 /* threads.cpp in Sources */, FAF1408D1E20934C00F898D2 /* PpAtom.cpp in Sources */, FABDA99D2552448300B5C523 /* b2_edge_polygon_contact.cpp in Sources */, FAF140721E20934C00F898D2 /* Intermediate.cpp in Sources */, FA41A3C91C0A1F950084430C /* ASTCHandler.cpp in Sources */, FA0B7E551A95902C000E1D17 /* wrap_GearJoint.cpp in Sources */, FA0B7E791A95902C000E1D17 /* wrap_WheelJoint.cpp in Sources */, FABDA9AC2552448300B5C523 /* b2_world.cpp in Sources */, FA0B7DDD1A95902C000E1D17 /* wrap_BezierCurve.cpp in Sources */, FA0A3A6123366CE9001C269E /* floattypes.cpp in Sources */, FA0B7D071A95902C000E1D17 /* wrap_File.cpp in Sources */, FA18CF3423DCF67900263725 /* spirv_cpp.cpp in Sources */, FABDA9D52552448300B5C523 /* b2_block_allocator.cpp in Sources */, FA6A2B751F60B6710074C308 /* ByteData.cpp in Sources */, FABDA9F02552448300B5C523 /* b2_collision.cpp in Sources */, FAD19A181DFF8CA200D5398A /* ImageDataBase.cpp in Sources */, FA0B7AD01A958EA3000E1D17 /* peer.c in Sources */, FA27B3C11B4985BF008A9DCE /* wrap_VideoStream.cpp in Sources */, FADF54211E3DA52C00012CC0 /* wrap_ParticleSystem.cpp in Sources */, FA0B791C1A958E3B000E1D17 /* b64.cpp in Sources */, FA1E88851DF363E100E808AA /* Filter.cpp in Sources */, FABDA9DB2552448300B5C523 /* b2_math.cpp in Sources */, FA0B7DA01A95902C000E1D17 /* KTXHandler.cpp in Sources */, FA0B7CEC1A95902C000E1D17 /* Event.cpp in Sources */, FA27B3AB1B498151008A9DCE /* VideoStream.cpp in Sources */, FA94728227A6EE1B00817677 /* HTTPS.cpp in Sources */, FA0B7E581A95902C000E1D17 /* wrap_Joint.cpp in Sources */, FAECA1B51F31648A0095D008 /* FormatHandler.cpp in Sources */, FA4F2C0A1DE936E600CA37D7 /* mime.c in Sources */, FA0B7E311A95902C000E1D17 /* Shape.cpp in Sources */, FA0B7E491A95902C000E1D17 /* wrap_DistanceJoint.cpp in Sources */, FA4F2C101DE936FE00CA37D7 /* udp.c in Sources */, FAF6C9E023C2DE2900D7B5BC /* SpvTools.cpp in Sources */, FAE64A8F2071364200BC7981 /* physfs_platform_unix.c in Sources */, FA94729C27A6F9AD00817677 /* NSURLClient.mm in Sources */, FA94728927A6EE1B00817677 /* HTTPRequest.cpp in Sources */, FA18CEC623D3AE6800263725 /* wrap_Buffer.cpp in Sources */, FA0B7E2B1A95902C000E1D17 /* RevoluteJoint.cpp in Sources */, FA0B7B291A958EA3000E1D17 /* simplexnoise1234.cpp in Sources */, FA0B7D261A95902C000E1D17 /* wrap_Font.cpp in Sources */, FA4F2BB31DE1E4B800CA37D7 /* RecordingDevice.cpp in Sources */, FABDA9A82552448300B5C523 /* b2_motor_joint.cpp in Sources */, FA4F2C071DE936DA00CA37D7 /* inet.c in Sources */, FAE64A8B2071363100BC7981 /* physfs_archiver_zip.c in Sources */, FA4F2C0B1DE936EA00CA37D7 /* options.c in Sources */, FA4F2C0D1DE936F100CA37D7 /* serial.c in Sources */, FABDA9922552448300B5C523 /* b2_pulley_joint.cpp in Sources */, FA0B7E0A1A95902C000E1D17 /* EdgeShape.cpp in Sources */, FADF54301E3DABF600012CC0 /* SpriteBatch.cpp in Sources */, FA0B7CF81A95902C000E1D17 /* FileData.cpp in Sources */, FA0B7DA61A95902C000E1D17 /* PNGHandler.cpp in Sources */, FAF6C9F523C2DE2900D7B5BC /* Logger.cpp in Sources */, FA84DE6D277943F6002674C6 /* GraphicsReadback.cpp in Sources */, FAE64A932071365100BC7981 /* physfs_platform_haiku.cpp in Sources */, FA0B7E981A95902C000E1D17 /* Sound.cpp in Sources */, FA0B7E371A95902C000E1D17 /* WheelJoint.cpp in Sources */, FA4F2C0C1DE936ED00CA37D7 /* select.c in Sources */, FA0B7D8E1A95902C000E1D17 /* ddsHandler.cpp in Sources */, FA0B7DFE1A95902C000E1D17 /* ChainShape.cpp in Sources */, FAFEB29A28F210550025D7D0 /* unixdgram.c in Sources */, FAE64A892071363100BC7981 /* physfs_archiver_vdf.c in Sources */, FA15DFB21F9B8D840042AB22 /* TheoraVideoStream.cpp in Sources */, FAF1406D1E20934C00F898D2 /* InfoSink.cpp in Sources */, FAF1407B1E20934C00F898D2 /* limits.cpp in Sources */, FA0B7ABB1A958EA3000E1D17 /* callbacks.c in Sources */, FA0B7EAA1A95902C000E1D17 /* wrap_Sound.cpp in Sources */, FA0B79391A958E3B000E1D17 /* Reference.cpp in Sources */, FA620A331AA2F8DB005DB4C2 /* wrap_Quad.cpp in Sources */, FA0B7E071A95902C000E1D17 /* DistanceJoint.cpp in Sources */, FA18CEEA23DBC8D400263725 /* Buffer.mm in Sources */, FADF543C1E3DAFF700012CC0 /* wrap_Graphics.cpp in Sources */, FAE64A942071365100BC7981 /* physfs_platform_os2.c in Sources */, FA0B7E5E1A95902C000E1D17 /* wrap_MouseJoint.cpp in Sources */, FA0B7B3B1A958EA3000E1D17 /* wuff_memory.c in Sources */, FA0B79411A958E3B000E1D17 /* utf8.cpp in Sources */, FAE64A862071363100BC7981 /* physfs_archiver_qpak.c in Sources */, FA0B7ADF1A958EA3000E1D17 /* lodepng.cpp in Sources */, FAF140761E20934C00F898D2 /* IntermTraverse.cpp in Sources */, FA0B7E8C1A95902C000E1D17 /* FLACDecoder.cpp in Sources */, FA18CF2923DCF67900263725 /* spirv_msl.cpp in Sources */, FA0B7D491A95902C000E1D17 /* Polyline.cpp in Sources */, FA0B7CE31A95902C000E1D17 /* wrap_Audio.cpp in Sources */, FA0B7B381A958EA3000E1D17 /* wuff_internal.c in Sources */, FA0B7DF81A95902C000E1D17 /* Body.cpp in Sources */, FABDA9EE2552448300B5C523 /* b2_circle_shape.cpp in Sources */, FA4F2BB41DE1E4BD00CA37D7 /* RecordingDevice.cpp in Sources */, FA0B7DF51A95902C000E1D17 /* wrap_Mouse.cpp in Sources */, FA0B7E861A95902C000E1D17 /* CoreAudioDecoder.cpp in Sources */, FACA06AD293EE5CD001A2557 /* wrap_Sensor.cpp in Sources */, FA0B7E761A95902C000E1D17 /* wrap_WeldJoint.cpp in Sources */, FA0B7D561A95902C000E1D17 /* Buffer.cpp in Sources */, FA1557C51CE90BD900AFF582 /* EXRHandler.cpp in Sources */, FA57FB991AE1993600F2AD6D /* noise1234.cpp in Sources */, FA0B7E221A95902C000E1D17 /* PolygonShape.cpp in Sources */, FA18CEE223DBC6E000263725 /* Graphics.mm in Sources */, FA28EBD61E352DB5003446F4 /* FenceSync.cpp in Sources */, FA0B7DA31A95902C000E1D17 /* PKMHandler.cpp in Sources */, FAB17BF61ABFC4B100F9BA27 /* lz4hc.c in Sources */, FAF1408F1E20934C00F898D2 /* PpContext.cpp in Sources */, FA0B7EA71A95902C000E1D17 /* wrap_Decoder.cpp in Sources */, FA0B7E1C1A95902C000E1D17 /* MouseJoint.cpp in Sources */, FA29C0061E12355B00268CD8 /* StreamBuffer.cpp in Sources */, FABDA9B62552448300B5C523 /* b2_fixture.cpp in Sources */, FAE64A882071363100BC7981 /* physfs_archiver_unpacked.c in Sources */, FA94728627A6EE1B00817677 /* PlaintextConnection.cpp in Sources */, FA18CEDF23DBC6E000263725 /* Shader.mm in Sources */, FA0B7CF51A95902C000E1D17 /* File.cpp in Sources */, FA0B7E341A95902C000E1D17 /* WeldJoint.cpp in Sources */, FA4F2C091DE936E200CA37D7 /* luasocket.c in Sources */, FA9D8DD21DEB56C3002CD881 /* pixelformat.cpp in Sources */, FA0B7B221A958EA3000E1D17 /* luasocket.cpp in Sources */, FA0B7D311A95902C000E1D17 /* Graphics.cpp in Sources */, FA0B7E9E1A95902C000E1D17 /* WaveDecoder.cpp in Sources */, FA0B7EB31A95902C000E1D17 /* System.cpp in Sources */, FA522D4E23F9FE380059EE3C /* MP3Decoder.cpp in Sources */, FA0B7D1C1A95902C000E1D17 /* GlyphData.cpp in Sources */, FA4F2C061DE936CD00CA37D7 /* except.c in Sources */, FABDA9B22552448300B5C523 /* b2_circle_contact.cpp in Sources */, FABDA9822552448200B5C523 /* b2_weld_joint.cpp in Sources */, FA15DFB01F9B8D6A0042AB22 /* wrap_Data.cpp in Sources */, FA0B7E671A95902C000E1D17 /* wrap_PrismaticJoint.cpp in Sources */, FA0B7DCE1A95902C000E1D17 /* wrap_Keyboard.cpp in Sources */, FABDA9D32552448300B5C523 /* b2_timer.cpp in Sources */, FA0B7EE61A95902D000E1D17 /* Window.cpp in Sources */, FA0B7E3A1A95902C000E1D17 /* World.cpp in Sources */, FA18CF2D23DCF67900263725 /* spirv_cross.cpp in Sources */, FA0B79471A958E3B000E1D17 /* Vector.cpp in Sources */, FAE64A832071363100BC7981 /* physfs_archiver_hog.c in Sources */, FAC756F71E4F99BC00B91289 /* Effect.cpp in Sources */, FA0B7E7F1A95902C000E1D17 /* Joint.cpp in Sources */, FABDA9D92552448300B5C523 /* b2_settings.cpp in Sources */, FA0B7DB21A95902C000E1D17 /* wrap_Image.cpp in Sources */, FA0B7E891A95902C000E1D17 /* Decoder.cpp in Sources */, D9F0C2D82C680A5500BB2D25 /* LinktimeLibraryLoader.cpp in Sources */, FAECA1B31F3164700095D008 /* CompressedSlice.cpp in Sources */, FA18CF1823DCF67900263725 /* spirv_glsl.cpp in Sources */, FA0B7E3D1A95902C000E1D17 /* wrap_Body.cpp in Sources */, FABDA9FE2552448300B5C523 /* b2_edge_shape.cpp in Sources */, FA0B7D7A1A95902C000E1D17 /* Quad.cpp in Sources */, FA620A3B1AA305F6005DB4C2 /* types.cpp in Sources */, D9DAB92E2961F10000C64820 /* TextShaper.cpp in Sources */, FA0B7DD41A95902C000E1D17 /* BezierCurve.cpp in Sources */, FA0B7E7C1A95902C000E1D17 /* wrap_World.cpp in Sources */, FAF6C9F923C2DE2900D7B5BC /* doc.cpp in Sources */, FA4F2C0E1DE936FE00CA37D7 /* tcp.c in Sources */, FA0B7D431A95902C000E1D17 /* OpenGL.cpp in Sources */, FAF6C9DD23C2DE2900D7B5BC /* SpvPostProcess.cpp in Sources */, FA0B7DBF1A95902C000E1D17 /* JoystickModule.cpp in Sources */, FAB2D5AB1AABDD8A008224A4 /* TrueTypeRasterizer.cpp in Sources */, FAF6C9FB23C2DE2900D7B5BC /* disassemble.cpp in Sources */, FA18CEDD23DBC6E000263725 /* Metal.mm in Sources */, FAE64A822071363100BC7981 /* physfs_archiver_grp.c in Sources */, FAF6C9F323C2DE2900D7B5BC /* SPVRemapper.cpp in Sources */, FA0B79331A958E3B000E1D17 /* Object.cpp in Sources */, FAE64A8D2071363500BC7981 /* physfs_platform_apple.m in Sources */, FA0B7E5B1A95902C000E1D17 /* wrap_MotorJoint.cpp in Sources */, FA18CF2723DCF67900263725 /* spirv_reflect.cpp in Sources */, FA0B79441A958E3B000E1D17 /* Variant.cpp in Sources */, FA9D8DDA1DEF8411002CD881 /* Stream.cpp in Sources */, FA0B7DD71A95902C000E1D17 /* MathModule.cpp in Sources */, FAC756FC1E4F99DB00B91289 /* Effect.cpp in Sources */, FA0B7D101A95902C000E1D17 /* BMFontRasterizer.cpp in Sources */, FA0B7E9B1A95902C000E1D17 /* VorbisDecoder.cpp in Sources */, FA0B7E4C1A95902C000E1D17 /* wrap_EdgeShape.cpp in Sources */, FA0B7E251A95902C000E1D17 /* PrismaticJoint.cpp in Sources */, FA0B7E611A95902C000E1D17 /* wrap_Physics.cpp in Sources */, FA4F2C041DE936C600CA37D7 /* buffer.c in Sources */, FA0B7DC81A95902C000E1D17 /* Keyboard.cpp in Sources */, FA0B7EAD1A95902C000E1D17 /* wrap_SoundData.cpp in Sources */, FA0B7E2E1A95902C000E1D17 /* RopeJoint.cpp in Sources */, FABDA9F22552448300B5C523 /* b2_collide_edge.cpp in Sources */, FA0B7CE01A95902C000E1D17 /* Source.cpp in Sources */, FA18CED923DBC6E000263725 /* StreamBuffer.mm in Sources */, FA0B7ECF1A95902C000E1D17 /* wrap_LuaThread.cpp in Sources */, FA0B7EA11A95902C000E1D17 /* Sound.cpp in Sources */, FA0B7DE61A95902C000E1D17 /* Cursor.cpp in Sources */, FA6A2B711F5F845F0074C308 /* wrap_DataView.cpp in Sources */, FA0B7EDC1A95902D000E1D17 /* Touch.cpp in Sources */, FA0B7CE91A95902C000E1D17 /* Event.cpp in Sources */, FABDA97D2552448200B5C523 /* b2_chain_circle_contact.cpp in Sources */, FA9D8DE11DEF843D002CD881 /* Image.cpp in Sources */, FAC8E54723AC832A007B07C8 /* NativeFile.cpp in Sources */, FA15DFAD1F9B8CBA0042AB22 /* StringMap.cpp in Sources */, FACA02F81F5E39760084B28F /* CompressedData.cpp in Sources */, FA0B7ADA1A958EA3000E1D17 /* glad.cpp in Sources */, FAF140541E20934C00F898D2 /* CodeGen.cpp in Sources */, FA0B7E1F1A95902C000E1D17 /* Physics.cpp in Sources */, FA6A2B7B1F60B8250074C308 /* wrap_ByteData.cpp in Sources */, FA0B7E821A95902C000E1D17 /* Shape.cpp in Sources */, FAAC2F7A251A9D2200BCB81B /* apple.mm in Sources */, FA0B7ACE1A958EA3000E1D17 /* packet.c in Sources */, FABDA9872552448200B5C523 /* b2_body.cpp in Sources */, FAF140891E20934C00F898D2 /* PoolAlloc.cpp in Sources */, FABDA9FA2552448300B5C523 /* b2_polygon_shape.cpp in Sources */, FA27B3B41B498151008A9DCE /* wrap_Video.cpp in Sources */, FA1E88801DF363D400E808AA /* Filter.cpp in Sources */, FABDAA022552448300B5C523 /* b2_distance.cpp in Sources */, FA0B7ACC1A958EA3000E1D17 /* list.c in Sources */, FACA02FD1F5E39840084B28F /* wrap_DataModule.cpp in Sources */, FA0B7DEF1A95902C000E1D17 /* Mouse.cpp in Sources */, FABDA9D72552448300B5C523 /* b2_stack_allocator.cpp in Sources */, FA0B79251A958E3B000E1D17 /* Exception.cpp in Sources */, FA0B7D291A95902C000E1D17 /* wrap_GlyphData.cpp in Sources */, FA0B7DE31A95902C000E1D17 /* wrap_RandomGenerator.cpp in Sources */, FAE64A8E2071363A00BC7981 /* physfs_platform_posix.c in Sources */, FA0B7AD71A958EA3000E1D17 /* win32.c in Sources */, FA15DFB11F9B8D820042AB22 /* OggDemuxer.cpp in Sources */, FA0B7D0D1A95902C000E1D17 /* wrap_Filesystem.cpp in Sources */, FA0B79211A958E3B000E1D17 /* delay.cpp in Sources */, FA0B7DB51A95902C000E1D17 /* wrap_ImageData.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; FA577AAA16C7507900860150 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( 217DFBDD1D9F6D490055D849 /* compat.c in Sources */, FA0B7DDF1A95902C000E1D17 /* wrap_Math.cpp in Sources */, FA0B7DA81A95902C000E1D17 /* PVRHandler.cpp in Sources */, FA0B7EC51A95902C000E1D17 /* ThreadModule.cpp in Sources */, FAC8E54A23AC8379007B07C8 /* wrap_NativeFile.cpp in Sources */, FADF54071E3D78F700012CC0 /* Video.cpp in Sources */, 217DFC031D9F6D490055D849 /* timeout.c in Sources */, FA18CF2623DCF67900263725 /* spirv_reflect.cpp in Sources */, FA9D8DD71DEF8411002CD881 /* Data.cpp in Sources */, FABDA9982552448300B5C523 /* b2_contact_manager.cpp in Sources */, FADF542A1E3DAADA00012CC0 /* wrap_Mesh.cpp in Sources */, FA0B7D2B1A95902C000E1D17 /* wrap_Rasterizer.cpp in Sources */, FA0B7CD61A95902C000E1D17 /* Audio.cpp in Sources */, FA3C5E421F8C368C0003C579 /* ShaderStage.cpp in Sources */, FA0B7EAF1A95902C000E1D17 /* System.cpp in Sources */, FA0B7EE21A95902D000E1D17 /* Window.cpp in Sources */, FAF6C9E123C2DE2900D7B5BC /* InReadableOrder.cpp in Sources */, FA0B791B1A958E3B000E1D17 /* b64.cpp in Sources */, FA0B7EC11A95902C000E1D17 /* threads.cpp in Sources */, FA0B79321A958E3B000E1D17 /* Object.cpp in Sources */, FA0B7D001A95902C000E1D17 /* Filesystem.cpp in Sources */, FAF140641E20934C00F898D2 /* Constant.cpp in Sources */, FA0B7ED81A95902D000E1D17 /* wrap_Timer.cpp in Sources */, FAF1407C1E20934C00F898D2 /* linkValidate.cpp in Sources */, FAF6C9DC23C2DE2900D7B5BC /* SpvPostProcess.cpp in Sources */, FABDA9B32552448300B5C523 /* b2_prismatic_joint.cpp in Sources */, FA0B7DD01A95902C000E1D17 /* love.cpp in Sources */, FA0B7D211A95902C000E1D17 /* Rasterizer.cpp in Sources */, FABDA9F32552448300B5C523 /* b2_chain_shape.cpp in Sources */, FAC7CD7C1FE35E95006A60C7 /* physfs_archiver_slb.c in Sources */, FAF6C9FA23C2DE2900D7B5BC /* disassemble.cpp in Sources */, FA18CF2C23DCF67900263725 /* spirv_cross.cpp in Sources */, FAC7CD931FE35E95006A60C7 /* physfs_archiver_zip.c in Sources */, FA0B7D7C1A95902C000E1D17 /* Texture.cpp in Sources */, FAF140BB1E20934C00F898D2 /* ossource.cpp in Sources */, FA0B7ECB1A95902C000E1D17 /* wrap_Channel.cpp in Sources */, D9DB6E362B4B41100037A1F6 /* ResourceLimits.cpp in Sources */, FACA02F21F5E396B0084B28F /* HashFunction.cpp in Sources */, FABDA9A02552448300B5C523 /* b2_gear_joint.cpp in Sources */, FAF140A71E20934C00F898D2 /* ShaderLang.cpp in Sources */, FAC271E623B5B5B400C200D3 /* renderstate.cpp in Sources */, FA1BA09D1E16CFCE00AA2803 /* Font.cpp in Sources */, FA84DE7127795E22002674C6 /* wrap_GraphicsReadback.cpp in Sources */, FA0B7E6C1A95902C000E1D17 /* wrap_RevoluteJoint.cpp in Sources */, FA0B7E631A95902C000E1D17 /* wrap_PolygonShape.cpp in Sources */, FAC7CD7B1FE35E95006A60C7 /* physfs_platform_unix.c in Sources */, FACA02F01F5E396B0084B28F /* DataModule.cpp in Sources */, FA0B7E721A95902C000E1D17 /* wrap_Shape.cpp in Sources */, FA0B7CFD1A95902C000E1D17 /* File.cpp in Sources */, FA4F2BB01DE1E37B00CA37D7 /* RecordingDevice.cpp in Sources */, FAC7CD911FE35E95006A60C7 /* physfs_archiver_grp.c in Sources */, FA27B39D1B498151008A9DCE /* Video.cpp in Sources */, FA15DFAC1F9B8C850042AB22 /* StringMap.cpp in Sources */, FABDA9AF2552448300B5C523 /* b2_mouse_joint.cpp in Sources */, FA4F2BAC1DE1E37000CA37D7 /* RecordingDevice.cpp in Sources */, FA0B7E691A95902C000E1D17 /* wrap_PulleyJoint.cpp in Sources */, FA18CF2223DCF67900263725 /* spirv_cfg.cpp in Sources */, FABDA99E2552448300B5C523 /* b2_edge_circle_contact.cpp in Sources */, FA0B7DB71A95902C000E1D17 /* Joystick.cpp in Sources */, FA91DA8B1F377C3900C80E33 /* deprecation.cpp in Sources */, FA0B7E3F1A95902C000E1D17 /* wrap_ChainShape.cpp in Sources */, FA18CF3023DCF67900263725 /* spirv_hlsl.cpp in Sources */, FABDA98F2552448300B5C523 /* b2_world_callbacks.cpp in Sources */, FABDA9A42552448300B5C523 /* b2_wheel_joint.cpp in Sources */, FA0B7DEB1A95902C000E1D17 /* Cursor.cpp in Sources */, FA0B7D861A95902C000E1D17 /* ImageData.cpp in Sources */, FAF140731E20934C00F898D2 /* intermOut.cpp in Sources */, FA0B7E0F1A95902C000E1D17 /* FrictionJoint.cpp in Sources */, FA620A351AA2F8DB005DB4C2 /* wrap_Texture.cpp in Sources */, FABDA9AD2552448300B5C523 /* b2_island.cpp in Sources */, FAF140771E20934C00F898D2 /* iomapper.cpp in Sources */, FA0B7D091A95902C000E1D17 /* wrap_FileData.cpp in Sources */, FA18CEDC23DBC6E000263725 /* Metal.mm in Sources */, FA0B7B341A958EA3000E1D17 /* wuff_convert.c in Sources */, FAF140821E20934C00F898D2 /* ParseContextBase.cpp in Sources */, FAF6C9E623C2DE2900D7B5BC /* SpvBuilder.cpp in Sources */, FABDA9C12552448300B5C523 /* b2_rope.cpp in Sources */, FA0B7D1E1A95902C000E1D17 /* ImageRasterizer.cpp in Sources */, FACA06B2293EE5CD001A2557 /* Sensor.cpp in Sources */, FABDA9FB2552448300B5C523 /* b2_collide_polygon.cpp in Sources */, FABDA9D02552448300B5C523 /* b2_draw.cpp in Sources */, FAF140A31E20934C00F898D2 /* Scan.cpp in Sources */, FA0B7EA31A95902C000E1D17 /* SoundData.cpp in Sources */, FA0B79291A958E3B000E1D17 /* Matrix.cpp in Sources */, FA8951A21AA2EDF300EC385A /* wrap_Event.cpp in Sources */, D9DAB92A2961F10000C64820 /* GenericShaper.cpp in Sources */, FAF140691E20934C00F898D2 /* glslang_tab.cpp in Sources */, FA0B7ABF1A958EA3000E1D17 /* host.c in Sources */, FA0B7D4B1A95902C000E1D17 /* Shader.cpp in Sources */, FADF540D1E3D7CDD00012CC0 /* wrap_Video.cpp in Sources */, FABDA9882552448300B5C523 /* b2_contact.cpp in Sources */, FAF140971E20934C00F898D2 /* PpTokens.cpp in Sources */, FAF140A91E20934C00F898D2 /* SymbolTable.cpp in Sources */, FA0B7E181A95902C000E1D17 /* MotorJoint.cpp in Sources */, FA18CEC523D3AE6700263725 /* wrap_Buffer.cpp in Sources */, FAF6C9F423C2DE2900D7B5BC /* Logger.cpp in Sources */, FABDA9FF2552448300B5C523 /* b2_time_of_impact.cpp in Sources */, FA0B7EBE1A95902C000E1D17 /* Thread.cpp in Sources */, FAC7CD8F1FE35E95006A60C7 /* physfs_platform_posix.c in Sources */, FAF1406E1E20934C00F898D2 /* Initialize.cpp in Sources */, FAF6C9DF23C2DE2900D7B5BC /* SpvTools.cpp in Sources */, FA0B7EB81A95902C000E1D17 /* Channel.cpp in Sources */, FA94727827A6EE1B00817677 /* main.cpp in Sources */, 217DFC091D9F6D490055D849 /* unix.c in Sources */, FACA02EE1F5E396B0084B28F /* Compressor.cpp in Sources */, FAF140801E20934C00F898D2 /* parseConst.cpp in Sources */, FA4B66C91ABBCF1900558F15 /* Timer.cpp in Sources */, FA0B7E911A95902C000E1D17 /* ModPlugDecoder.cpp in Sources */, FA0B7E511A95902C000E1D17 /* wrap_FrictionJoint.cpp in Sources */, FABDA9832552448200B5C523 /* b2_chain_polygon_contact.cpp in Sources */, FA0B7AD61A958EA3000E1D17 /* win32.c in Sources */, FADF54341E3DAE6E00012CC0 /* wrap_SpriteBatch.cpp in Sources */, FA0B7D181A95902C000E1D17 /* TrueTypeRasterizer.cpp in Sources */, FA84DE6627791C36002674C6 /* GraphicsReadback.cpp in Sources */, FA0B7CFA1A95902C000E1D17 /* Filesystem.cpp in Sources */, FABDA9F72552448300B5C523 /* b2_dynamic_tree.cpp in Sources */, FABDA98A2552448300B5C523 /* b2_revolute_joint.cpp in Sources */, FA1BA0A21E16D97500AA2803 /* wrap_Font.cpp in Sources */, FAC7CD781FE35E95006A60C7 /* physfs_platform_qnx.c in Sources */, FA0B7D3C1A95902C000E1D17 /* Texture.cpp in Sources */, FABDA9EB2552448300B5C523 /* b2_collide_circle.cpp in Sources */, FADF53FD1E3D74F200012CC0 /* TextBatch.cpp in Sources */, FA84DE612778D7F3002674C6 /* SpirvIntrinsics.cpp in Sources */, FAFEB29C28F210550025D7D0 /* unixstream.c in Sources */, FA6A2B741F60B6710074C308 /* ByteData.cpp in Sources */, 217DFBE91D9F6D490055D849 /* io.c in Sources */, FA0B7E421A95902C000E1D17 /* wrap_CircleShape.cpp in Sources */, FA0B7CE51A95902C000E1D17 /* wrap_Source.cpp in Sources */, FAC7CD921FE35E95006A60C7 /* physfs_archiver_hog.c in Sources */, FAF140931E20934C00F898D2 /* PpScanner.cpp in Sources */, FA9D53AC1F5307E900125C6B /* Deprecations.cpp in Sources */, D9F0C2DC2C680A5500BB2D25 /* UnixLibraryLoader.cpp in Sources */, FA0B7CCD1A95902C000E1D17 /* Audio.cpp in Sources */, FA0B7DCA1A95902C000E1D17 /* Keyboard.cpp in Sources */, FA9D8DDD1DEF842A002CD881 /* Drawable.cpp in Sources */, FA0B7DFA1A95902C000E1D17 /* Body.cpp in Sources */, FAF6C9EB23C2DE2900D7B5BC /* GlslangToSpv.cpp in Sources */, FADF54021E3D77B500012CC0 /* wrap_TextBatch.cpp in Sources */, FA0B7ED11A95902C000E1D17 /* wrap_ThreadModule.cpp in Sources */, FAC7CD7F1FE35E95006A60C7 /* physfs_archiver_wad.c in Sources */, FA0B7EDF1A95902D000E1D17 /* wrap_Touch.cpp in Sources */, 217DFBFB1D9F6D490055D849 /* serial.c in Sources */, FA18CED823DBC6E000263725 /* StreamBuffer.mm in Sources */, FADF54251E3DA5BA00012CC0 /* Mesh.cpp in Sources */, D9F0C2D92C680A5500BB2D25 /* OpenSSLConnection.cpp in Sources */, FA4F2BE51DE6650600CA37D7 /* wrap_Transform.cpp in Sources */, D9F0C2D42C680A5500BB2D25 /* CurlClient.cpp in Sources */, FABDA9A22552448300B5C523 /* b2_friction_joint.cpp in Sources */, FA0B7CDC1A95902C000E1D17 /* Source.cpp in Sources */, FA6BDF89280B62A000240F2A /* GraphicsReadback.mm in Sources */, FA0B7DC41A95902C000E1D17 /* wrap_JoystickModule.cpp in Sources */, FA0B7E6F1A95902C000E1D17 /* wrap_RopeJoint.cpp in Sources */, FA24348721D401CB00B8918A /* attribute.cpp in Sources */, D93660F82D1C727C00C0EC4B /* Touch.cpp in Sources */, FA0B7AB51A958EA3000E1D17 /* ddsparse.cpp in Sources */, FACA02F41F5E396B0084B28F /* wrap_CompressedData.cpp in Sources */, FAF140AC1E20934C00F898D2 /* Versions.cpp in Sources */, FACA06B0293EE5CD001A2557 /* Sensor.cpp in Sources */, FA0B79461A958E3B000E1D17 /* Vector.cpp in Sources */, FAC7CD811FE35E95006A60C7 /* physfs_platform_os2.c in Sources */, FABDA9962552448300B5C523 /* b2_distance_joint.cpp in Sources */, FA0B7DBB1A95902C000E1D17 /* Joystick.cpp in Sources */, FA0B7DAE1A95902C000E1D17 /* wrap_CompressedImageData.cpp in Sources */, FA6A2B701F5F845F0074C308 /* wrap_DataView.cpp in Sources */, FAB17BE61ABFAA9000F9BA27 /* lz4.c in Sources */, FA0B7B211A958EA3000E1D17 /* luasocket.cpp in Sources */, FA0B7CD91A95902C000E1D17 /* Pool.cpp in Sources */, FABDA98D2552448300B5C523 /* b2_contact_solver.cpp in Sources */, FAF140A01E20934C00F898D2 /* RemoveTree.cpp in Sources */, FA0B7E151A95902C000E1D17 /* Joint.cpp in Sources */, FA0B7EE81A95902D000E1D17 /* wrap_Window.cpp in Sources */, D943E58E2A24D56000D80361 /* PhysfsIo.cpp in Sources */, FA0B7E271A95902C000E1D17 /* PulleyJoint.cpp in Sources */, FA1BA0B71E17043400AA2803 /* wrap_Shader.cpp in Sources */, FA0B7B301A958EA3000E1D17 /* wuff.c in Sources */, FA56AA381FAFF02000A43D5F /* memory.cpp in Sources */, FA0B7E031A95902C000E1D17 /* Contact.cpp in Sources */, FA0B7D821A95902C000E1D17 /* CompressedImageData.cpp in Sources */, FA18CF2823DCF67900263725 /* spirv_msl.cpp in Sources */, FAF1409D1E20934C00F898D2 /* reflection.cpp in Sources */, FA94727B27A6EE1B00817677 /* HTTPSClient.cpp in Sources */, FAAA3FDB1F64B3AD00F89E99 /* lutf8lib.c in Sources */, FA18CEDE23DBC6E000263725 /* Shader.mm in Sources */, FAF1408A1E20934C00F898D2 /* Pp.cpp in Sources */, FA76344A1E28722A0066EF9E /* StreamBuffer.cpp in Sources */, FA0B7DF11A95902C000E1D17 /* wrap_Cursor.cpp in Sources */, FA0B7E001A95902C000E1D17 /* CircleShape.cpp in Sources */, FA0B7E451A95902C000E1D17 /* wrap_Contact.cpp in Sources */, 217DFBE71D9F6D490055D849 /* inet.c in Sources */, FA0B7D151A95902C000E1D17 /* Font.cpp in Sources */, FA0B7EB51A95902C000E1D17 /* wrap_System.cpp in Sources */, FAC8E55123B01C0D007B07C8 /* macos.mm in Sources */, FA0B7DAB1A95902C000E1D17 /* STBHandler.cpp in Sources */, FA0B7AB81A958EA3000E1D17 /* enet.cpp in Sources */, FADF53F81E3C7ACD00012CC0 /* Buffer.cpp in Sources */, FA0B7DD91A95902C000E1D17 /* RandomGenerator.cpp in Sources */, FAF1409A1E20934C00F898D2 /* propagateNoContraction.cpp in Sources */, FA18CEE123DBC6E000263725 /* Graphics.mm in Sources */, FA2AF6741DAD64970032B62C /* vertex.cpp in Sources */, FABDA9932552448300B5C523 /* b2_polygon_circle_contact.cpp in Sources */, FAC7CD851FE35E95006A60C7 /* physfs_unicode.c in Sources */, FA6A2B7A1F60B8250074C308 /* wrap_ByteData.cpp in Sources */, FA6BDF8E281219E900240F2A /* DataStream.cpp in Sources */, FAF140551E20934C00F898D2 /* Link.cpp in Sources */, FABDA9792552448200B5C523 /* b2_joint.cpp in Sources */, FAF140841E20934C00F898D2 /* ParseHelper.cpp in Sources */, D9DAB9232961F0EE00C64820 /* HarfbuzzShaper.cpp in Sources */, FA0B7D7F1A95902C000E1D17 /* Volatile.cpp in Sources */, FA1BA0B11E16FD0800AA2803 /* Shader.cpp in Sources */, FABDA99A2552448300B5C523 /* b2_polygon_contact.cpp in Sources */, 217DFBED1D9F6D490055D849 /* luasocket.c in Sources */, 217DFC011D9F6D490055D849 /* tcp.c in Sources */, FA0B7EBB1A95902C000E1D17 /* LuaThread.cpp in Sources */, FA0B79381A958E3B000E1D17 /* Reference.cpp in Sources */, FAC7CD881FE35E95006A60C7 /* physfs_platform_apple.m in Sources */, FA0B7D391A95902C000E1D17 /* Graphics.cpp in Sources */, FA0B7E121A95902C000E1D17 /* GearJoint.cpp in Sources */, FABDA9F52552448300B5C523 /* b2_broad_phase.cpp in Sources */, FAE272521C05A15B00A67640 /* ParticleSystem.cpp in Sources */, FA0B7DC11A95902C000E1D17 /* wrap_Joystick.cpp in Sources */, FA18CF3523DCF67900263725 /* spirv_cross_parsed_ir.cpp in Sources */, FABDA99C2552448300B5C523 /* b2_edge_polygon_contact.cpp in Sources */, FA0B7CD31A95902C000E1D17 /* Source.cpp in Sources */, FA0B7CD01A95902C000E1D17 /* Audio.cpp in Sources */, FAA3A9AE1B7D465A00CED060 /* android.cpp in Sources */, FA0B7D121A95902C000E1D17 /* Font.cpp in Sources */, FABDA9AB2552448300B5C523 /* b2_world.cpp in Sources */, FA0B7EC81A95902C000E1D17 /* threads.cpp in Sources */, FAC7CD8B1FE35E95006A60C7 /* physfs_archiver_iso9660.c in Sources */, 217DFBF91D9F6D490055D849 /* select.c in Sources */, FABDA9D42552448300B5C523 /* b2_block_allocator.cpp in Sources */, FAF1408C1E20934C00F898D2 /* PpAtom.cpp in Sources */, FABDA9EF2552448300B5C523 /* b2_collision.cpp in Sources */, FAF140711E20934C00F898D2 /* Intermediate.cpp in Sources */, FAF6C9F823C2DE2900D7B5BC /* doc.cpp in Sources */, FAC7CD7D1FE35E95006A60C7 /* physfs_platform_winrt.cpp in Sources */, FA0B7E541A95902C000E1D17 /* wrap_GearJoint.cpp in Sources */, FA0A3A6023366CE9001C269E /* floattypes.cpp in Sources */, FA41A3C81C0A1F950084430C /* ASTCHandler.cpp in Sources */, FABDA9DA2552448300B5C523 /* b2_math.cpp in Sources */, FA0B7E781A95902C000E1D17 /* wrap_WheelJoint.cpp in Sources */, FA94728127A6EE1B00817677 /* HTTPS.cpp in Sources */, FA0B7DDC1A95902C000E1D17 /* wrap_BezierCurve.cpp in Sources */, FA0B7D061A95902C000E1D17 /* wrap_File.cpp in Sources */, FAC7CD871FE35E95006A60C7 /* physfs_archiver_vdf.c in Sources */, FAD19A171DFF8CA200D5398A /* ImageDataBase.cpp in Sources */, FA27B3C01B4985BF008A9DCE /* wrap_VideoStream.cpp in Sources */, FADF54201E3DA52C00012CC0 /* wrap_ParticleSystem.cpp in Sources */, FA0B7D9F1A95902C000E1D17 /* KTXHandler.cpp in Sources */, FA1E88831DF363DB00E808AA /* Filter.cpp in Sources */, FA94729B27A6F9AD00817677 /* NSURLClient.mm in Sources */, FA94728827A6EE1B00817677 /* HTTPRequest.cpp in Sources */, FA0B7CEB1A95902C000E1D17 /* Event.cpp in Sources */, FA1557C31CE90BD200AFF582 /* EXRHandler.cpp in Sources */, FA27B3AA1B498151008A9DCE /* VideoStream.cpp in Sources */, FA0B7E571A95902C000E1D17 /* wrap_Joint.cpp in Sources */, FA0B7E301A95902C000E1D17 /* Shape.cpp in Sources */, FA93C4541F315B960087CCD4 /* FormatHandler.cpp in Sources */, FA0B7E481A95902C000E1D17 /* wrap_DistanceJoint.cpp in Sources */, FABDA9A72552448300B5C523 /* b2_motor_joint.cpp in Sources */, FA0B792F1A958E3B000E1D17 /* Module.cpp in Sources */, FA0B7E2A1A95902C000E1D17 /* RevoluteJoint.cpp in Sources */, FA0B7D251A95902C000E1D17 /* wrap_Font.cpp in Sources */, FA0B7E091A95902C000E1D17 /* EdgeShape.cpp in Sources */, FABDA9912552448300B5C523 /* b2_pulley_joint.cpp in Sources */, FA0B7CF71A95902C000E1D17 /* FileData.cpp in Sources */, FA18CF2A23DCF67900263725 /* spirv_cross_util.cpp in Sources */, FAC7CD8C1FE35E95006A60C7 /* physfs_archiver_qpak.c in Sources */, FA0B7DA51A95902C000E1D17 /* PNGHandler.cpp in Sources */, FA0B7B371A958EA3000E1D17 /* wuff_internal.c in Sources */, FA0B7E971A95902C000E1D17 /* Sound.cpp in Sources */, FA84DE6C277943F6002674C6 /* GraphicsReadback.cpp in Sources */, FA4F2B791DE0125B00CA37D7 /* xxhash.c in Sources */, FA0B7E361A95902C000E1D17 /* WheelJoint.cpp in Sources */, FAFEB29928F210550025D7D0 /* unixdgram.c in Sources */, FADF542F1E3DABF600012CC0 /* SpriteBatch.cpp in Sources */, FA0B7D8D1A95902C000E1D17 /* ddsHandler.cpp in Sources */, FAAA3FD91F64B3AD00F89E99 /* lstrlib.c in Sources */, FA0B7DFD1A95902C000E1D17 /* ChainShape.cpp in Sources */, FA0B79201A958E3B000E1D17 /* delay.cpp in Sources */, FA18CF1723DCF67900263725 /* spirv_glsl.cpp in Sources */, FA0B7EA91A95902C000E1D17 /* wrap_Sound.cpp in Sources */, FA6A2B671F5F7B6B0074C308 /* wrap_Data.cpp in Sources */, FA18CF3323DCF67900263725 /* spirv_cpp.cpp in Sources */, FA0B7E061A95902C000E1D17 /* DistanceJoint.cpp in Sources */, FA620A321AA2F8DB005DB4C2 /* wrap_Quad.cpp in Sources */, FA4F2BA61DE1E36400CA37D7 /* RecordingDevice.cpp in Sources */, FA18CF4623DD1A8100263725 /* ShaderStage.mm in Sources */, FAF1406C1E20934C00F898D2 /* InfoSink.cpp in Sources */, FAF1407A1E20934C00F898D2 /* limits.cpp in Sources */, FAC7CD7E1FE35E95006A60C7 /* physfs_archiver_mvl.c in Sources */, FA0B793B1A958E3B000E1D17 /* runtime.cpp in Sources */, FA0B7E5D1A95902C000E1D17 /* wrap_MouseJoint.cpp in Sources */, FA0B7AD41A958EA3000E1D17 /* unix.c in Sources */, FADF543B1E3DAFF700012CC0 /* wrap_Graphics.cpp in Sources */, FA0B7E8B1A95902C000E1D17 /* FLACDecoder.cpp in Sources */, FA0B7B3A1A958EA3000E1D17 /* wuff_memory.c in Sources */, FAECA1B21F3164700095D008 /* CompressedSlice.cpp in Sources */, FA0B7D481A95902C000E1D17 /* Polyline.cpp in Sources */, 217DFC111D9F6D490055D849 /* usocket.c in Sources */, FAC7CD891FE35E95006A60C7 /* physfs_archiver_dir.c in Sources */, FAF140751E20934C00F898D2 /* IntermTraverse.cpp in Sources */, FA0B7CE21A95902C000E1D17 /* wrap_Audio.cpp in Sources */, FACA06AC293EE5CD001A2557 /* wrap_Sensor.cpp in Sources */, FA0B7DF71A95902C000E1D17 /* Body.cpp in Sources */, FABDA9ED2552448300B5C523 /* b2_circle_shape.cpp in Sources */, FA0B7DF41A95902C000E1D17 /* wrap_Mouse.cpp in Sources */, FA0B7E851A95902C000E1D17 /* CoreAudioDecoder.cpp in Sources */, FA0B7E751A95902C000E1D17 /* wrap_WeldJoint.cpp in Sources */, FA0B7D551A95902C000E1D17 /* Buffer.cpp in Sources */, FA57FB981AE1993600F2AD6D /* noise1234.cpp in Sources */, FA0B7E211A95902C000E1D17 /* PolygonShape.cpp in Sources */, FA0B7DA21A95902C000E1D17 /* PKMHandler.cpp in Sources */, FA0B7ABA1A958EA3000E1D17 /* callbacks.c in Sources */, FAB17BF51ABFC4B100F9BA27 /* lz4hc.c in Sources */, FA0B7EA61A95902C000E1D17 /* wrap_Decoder.cpp in Sources */, FA18CF3F23DCF67900263725 /* spirv_parser.cpp in Sources */, 217DFBF21D9F6D490055D849 /* mime.c in Sources */, 217DFBDF1D9F6D490055D849 /* except.c in Sources */, FA94728527A6EE1B00817677 /* PlaintextConnection.cpp in Sources */, FA28EBD51E352DB5003446F4 /* FenceSync.cpp in Sources */, FA0B7E1B1A95902C000E1D17 /* MouseJoint.cpp in Sources */, FA0B7CF41A95902C000E1D17 /* File.cpp in Sources */, FABDA9B52552448300B5C523 /* b2_fixture.cpp in Sources */, FAC7CD7A1FE35E95006A60C7 /* physfs_archiver_7z.c in Sources */, FA0B7E331A95902C000E1D17 /* WeldJoint.cpp in Sources */, FA0B7D301A95902C000E1D17 /* Graphics.cpp in Sources */, FAF1408E1E20934C00F898D2 /* PpContext.cpp in Sources */, FA0B7E9D1A95902C000E1D17 /* WaveDecoder.cpp in Sources */, FA29C0051E12355B00268CD8 /* StreamBuffer.cpp in Sources */, FA0B7EB21A95902C000E1D17 /* System.cpp in Sources */, FA0B7D1B1A95902C000E1D17 /* GlyphData.cpp in Sources */, FA0B7AD11A958EA3000E1D17 /* protocol.c in Sources */, FA522D4D23F9FE380059EE3C /* MP3Decoder.cpp in Sources */, FA9D8DD11DEB56C3002CD881 /* pixelformat.cpp in Sources */, FA0B7E661A95902C000E1D17 /* wrap_PrismaticJoint.cpp in Sources */, FABDA9B12552448300B5C523 /* b2_circle_contact.cpp in Sources */, FABDA9812552448200B5C523 /* b2_weld_joint.cpp in Sources */, FA0B7DCD1A95902C000E1D17 /* wrap_Keyboard.cpp in Sources */, FA0B7EE51A95902D000E1D17 /* Window.cpp in Sources */, FA18CEE923DBC8D400263725 /* Buffer.mm in Sources */, FA6A2B6A1F5F7F560074C308 /* DataView.cpp in Sources */, FABDA9D22552448300B5C523 /* b2_timer.cpp in Sources */, FA3C5E471F8D80CA0003C579 /* ShaderStage.cpp in Sources */, FA0B7E391A95902C000E1D17 /* World.cpp in Sources */, FA0B7ABD1A958EA3000E1D17 /* compress.c in Sources */, FA0B7ACB1A958EA3000E1D17 /* list.c in Sources */, FA0B7E7E1A95902C000E1D17 /* Joint.cpp in Sources */, FA0B7DB11A95902C000E1D17 /* wrap_Image.cpp in Sources */, D9F0C2D72C680A5500BB2D25 /* LinktimeLibraryLoader.cpp in Sources */, FABDA9D82552448300B5C523 /* b2_settings.cpp in Sources */, FAC7CD831FE35E95006A60C7 /* physfs_platform_windows.c in Sources */, FA0B7E881A95902C000E1D17 /* Decoder.cpp in Sources */, FA0B7E3C1A95902C000E1D17 /* wrap_Body.cpp in Sources */, FA0B7D791A95902C000E1D17 /* Quad.cpp in Sources */, D9DAB92D2961F10000C64820 /* TextShaper.cpp in Sources */, FABDA9FD2552448300B5C523 /* b2_edge_shape.cpp in Sources */, FAC756F51E4F99B400B91289 /* Effect.cpp in Sources */, FA620A3A1AA305F6005DB4C2 /* types.cpp in Sources */, FA0B7DD31A95902C000E1D17 /* BezierCurve.cpp in Sources */, FA0B7E7B1A95902C000E1D17 /* wrap_World.cpp in Sources */, FA0B7B281A958EA3000E1D17 /* simplexnoise1234.cpp in Sources */, FA0B7D421A95902C000E1D17 /* OpenGL.cpp in Sources */, FA0B7DBE1A95902C000E1D17 /* JoystickModule.cpp in Sources */, FAB2D5AA1AABDD8A008224A4 /* TrueTypeRasterizer.cpp in Sources */, FA0B7ACD1A958EA3000E1D17 /* packet.c in Sources */, FA0B7E5A1A95902C000E1D17 /* wrap_MotorJoint.cpp in Sources */, FA0B7DD61A95902C000E1D17 /* MathModule.cpp in Sources */, FAC7CD8A1FE35E95006A60C7 /* physfs_byteorder.c in Sources */, FA0B7D0F1A95902C000E1D17 /* BMFontRasterizer.cpp in Sources */, FA0B7E9A1A95902C000E1D17 /* VorbisDecoder.cpp in Sources */, FA0B7E4B1A95902C000E1D17 /* wrap_EdgeShape.cpp in Sources */, FA9D8DD91DEF8411002CD881 /* Stream.cpp in Sources */, FA0B7E241A95902C000E1D17 /* PrismaticJoint.cpp in Sources */, FAC7CD791FE35E95006A60C7 /* physfs.c in Sources */, FAC756FA1E4F99D200B91289 /* Effect.cpp in Sources */, FA0B7E601A95902C000E1D17 /* wrap_Physics.cpp in Sources */, FA0B7DC71A95902C000E1D17 /* Keyboard.cpp in Sources */, 217DFC071D9F6D490055D849 /* udp.c in Sources */, FA0B7EAC1A95902C000E1D17 /* wrap_SoundData.cpp in Sources */, FA0B7E2D1A95902C000E1D17 /* RopeJoint.cpp in Sources */, FA0B7CDF1A95902C000E1D17 /* Source.cpp in Sources */, FA0B7ECE1A95902C000E1D17 /* wrap_LuaThread.cpp in Sources */, FA0B79431A958E3B000E1D17 /* Variant.cpp in Sources */, FA4F2BE31DE6650600CA37D7 /* Transform.cpp in Sources */, FA0B7EA01A95902C000E1D17 /* Sound.cpp in Sources */, FABDA9F12552448300B5C523 /* b2_collide_edge.cpp in Sources */, FA0B7DE51A95902C000E1D17 /* Cursor.cpp in Sources */, FA0B7EDB1A95902D000E1D17 /* Touch.cpp in Sources */, FA0B7CE81A95902C000E1D17 /* Event.cpp in Sources */, FA0B7ACF1A958EA3000E1D17 /* peer.c in Sources */, FA0B7ADE1A958EA3000E1D17 /* lodepng.cpp in Sources */, FA0B7E1E1A95902C000E1D17 /* Physics.cpp in Sources */, FA9D8DE01DEF843D002CD881 /* Image.cpp in Sources */, FA0B7E811A95902C000E1D17 /* Shape.cpp in Sources */, FABDA97C2552448200B5C523 /* b2_chain_circle_contact.cpp in Sources */, FAC8E54623AC832A007B07C8 /* NativeFile.cpp in Sources */, FA4F2BA81DE1E36400CA37D7 /* wrap_RecordingDevice.cpp in Sources */, FACA02EC1F5E396B0084B28F /* CompressedData.cpp in Sources */, FAF140531E20934C00F898D2 /* CodeGen.cpp in Sources */, FA27B3B31B498151008A9DCE /* wrap_Video.cpp in Sources */, FAF140881E20934C00F898D2 /* PoolAlloc.cpp in Sources */, FA0B7DEE1A95902C000E1D17 /* Mouse.cpp in Sources */, FAAC2F79251A9D2200BCB81B /* apple.mm in Sources */, FAA54ACC1F91660400A8FA7B /* TheoraVideoStream.cpp in Sources */, FA1E887E1DF363CD00E808AA /* Filter.cpp in Sources */, FABDA9862552448200B5C523 /* b2_body.cpp in Sources */, FA0B7D281A95902C000E1D17 /* wrap_GlyphData.cpp in Sources */, FABDA9F92552448300B5C523 /* b2_polygon_shape.cpp in Sources */, FA0B7DE21A95902C000E1D17 /* wrap_RandomGenerator.cpp in Sources */, FAF6C9F223C2DE2900D7B5BC /* SPVRemapper.cpp in Sources */, FA18CEEF23DC9B3E00263725 /* Texture.mm in Sources */, FABDAA012552448300B5C523 /* b2_distance.cpp in Sources */, FACA02F61F5E396B0084B28F /* wrap_DataModule.cpp in Sources */, FA0B79401A958E3B000E1D17 /* utf8.cpp in Sources */, FA0B79241A958E3B000E1D17 /* Exception.cpp in Sources */, FABDA9D62552448300B5C523 /* b2_stack_allocator.cpp in Sources */, FA0B7D0C1A95902C000E1D17 /* wrap_Filesystem.cpp in Sources */, FA0B7AD91A958EA3000E1D17 /* glad.cpp in Sources */, FAC7CD841FE35E95006A60C7 /* physfs_archiver_unpacked.c in Sources */, 217DFBF61D9F6D490055D849 /* options.c in Sources */, FAA54ACD1F91660400A8FA7B /* OggDemuxer.cpp in Sources */, FAC7CD821FE35E95006A60C7 /* physfs_platform_haiku.cpp in Sources */, 217DFBD91D9F6D490055D849 /* auxiliar.c in Sources */, 217DFBDB1D9F6D490055D849 /* buffer.c in Sources */, FA0B7DB41A95902C000E1D17 /* wrap_ImageData.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin XCBuildConfiguration section */ 10D5479E63C26BB35EB5482E /* Release */ = { isa = XCBuildConfiguration; buildSettings = { CLANG_CXX_LANGUAGE_STANDARD = "c++17"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = NO; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEAD_CODE_STRIPPING = YES; ENABLE_STRICT_OBJC_MSGSEND = YES; FRAMEWORK_SEARCH_PATHS = ""; GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 3; GCC_PREPROCESSOR_DEFINITIONS = LOVE_APPLE_USE_FRAMEWORKS; GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = NO; GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES; GCC_WARN_ABOUT_MISSING_NEWLINE = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES; GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_SIGN_COMPARE = YES; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_PARAMETER = YES; GCC_WARN_UNUSED_VARIABLE = YES; HEADER_SEARCH_PATHS = ( "$(inherited)", "\"$(SRCROOT)/../../src\"", "\"$(SRCROOT)/../../src/libraries\"", "\"$(SRCROOT)/../../src/modules\"", "\"$(SRCROOT)/../../src/libraries/enet/libenet/include\"", ); IPHONEOS_DEPLOYMENT_TARGET = 13.0; LIBRARY_SEARCH_PATHS = ""; MACOSX_DEPLOYMENT_TARGET = 10.15; ONLY_ACTIVE_ARCH = NO; SDKROOT = macosx; USE_HEADERMAP = NO; WARNING_CFLAGS = "-Wall"; }; name = Release; }; 64274E785071353E1A1D0D4B /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { CLANG_CXX_LANGUAGE_STANDARD = "c++17"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = NO; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; FRAMEWORK_SEARCH_PATHS = ""; GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( LOVE_APPLE_USE_FRAMEWORKS, "DEBUG=1", ); GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = NO; GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES; GCC_WARN_ABOUT_MISSING_NEWLINE = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES; GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_SIGN_COMPARE = YES; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_PARAMETER = YES; GCC_WARN_UNUSED_VARIABLE = YES; HEADER_SEARCH_PATHS = ( "$(inherited)", "\"$(SRCROOT)/../../src\"", "\"$(SRCROOT)/../../src/libraries\"", "\"$(SRCROOT)/../../src/modules\"", "\"$(SRCROOT)/../../src/libraries/enet/libenet/include\"", ); IPHONEOS_DEPLOYMENT_TARGET = 13.0; LIBRARY_SEARCH_PATHS = ""; MACOSX_DEPLOYMENT_TARGET = 10.15; ONLY_ACTIVE_ARCH = YES; SDKROOT = macosx; USE_HEADERMAP = NO; WARNING_CFLAGS = "-Wall"; }; name = Debug; }; FA0B78EF1A958B90000E1D17 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; ARCHS = "$(ARCHS_STANDARD_64_BIT)"; "ARCHS[sdk=iphonesimulator*]" = "$(ARCHS_STANDARD_64_BIT)"; FRAMEWORK_SEARCH_PATHS = "$(PROJECT_DIR)/ios/libraries"; GCC_PREPROCESSOR_DEFINITIONS = ( "$(inherited)", LOVE_SUPPORT_COREAUDIO, ); GCC_SYMBOLS_PRIVATE_EXTERN = NO; GCC_WARN_64_TO_32_BIT_CONVERSION = NO; HEADER_SEARCH_PATHS = "$(inherited)"; LIBRARY_SEARCH_PATHS = "$(inherited)"; MTL_ENABLE_DEBUG_INFO = YES; OTHER_LDFLAGS = "-ObjC"; PRODUCT_NAME = love; SDKROOT = iphoneos; SKIP_INSTALL = YES; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; }; FA0B78F01A958B90000E1D17 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; ARCHS = "$(ARCHS_STANDARD_64_BIT)"; "ARCHS[sdk=iphonesimulator*]" = "$(ARCHS_STANDARD_64_BIT)"; COPY_PHASE_STRIP = YES; ENABLE_NS_ASSERTIONS = NO; FRAMEWORK_SEARCH_PATHS = "$(PROJECT_DIR)/ios/libraries"; GCC_PREPROCESSOR_DEFINITIONS = ( "$(inherited)", LOVE_SUPPORT_COREAUDIO, ); GCC_WARN_64_TO_32_BIT_CONVERSION = NO; HEADER_SEARCH_PATHS = "$(inherited)"; LIBRARY_SEARCH_PATHS = "$(inherited)"; MTL_ENABLE_DEBUG_INFO = NO; OTHER_LDFLAGS = "-ObjC"; PRODUCT_NAME = love; SDKROOT = iphoneos; SKIP_INSTALL = YES; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; }; name = Release; }; FA0B78F11A958B90000E1D17 /* Distribution */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; ARCHS = "$(ARCHS_STANDARD_64_BIT)"; "ARCHS[sdk=iphonesimulator*]" = "$(ARCHS_STANDARD_64_BIT)"; COPY_PHASE_STRIP = YES; ENABLE_NS_ASSERTIONS = NO; FRAMEWORK_SEARCH_PATHS = "$(PROJECT_DIR)/ios/libraries"; GCC_PREPROCESSOR_DEFINITIONS = ( "$(inherited)", LOVE_SUPPORT_COREAUDIO, ); GCC_WARN_64_TO_32_BIT_CONVERSION = NO; HEADER_SEARCH_PATHS = "$(inherited)"; LIBRARY_SEARCH_PATHS = "$(inherited)"; MTL_ENABLE_DEBUG_INFO = NO; OTHER_LDFLAGS = "-ObjC"; PRODUCT_NAME = love; SDKROOT = iphoneos; SKIP_INSTALL = YES; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; }; name = Distribution; }; FA5326C4189719C700F7BBF4 /* Distribution */ = { isa = XCBuildConfiguration; buildSettings = { CLANG_CXX_LANGUAGE_STANDARD = "c++17"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = NO; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEAD_CODE_STRIPPING = YES; ENABLE_STRICT_OBJC_MSGSEND = YES; FRAMEWORK_SEARCH_PATHS = ""; GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 3; GCC_PREPROCESSOR_DEFINITIONS = LOVE_APPLE_USE_FRAMEWORKS; GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = NO; GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES; GCC_WARN_ABOUT_MISSING_NEWLINE = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES; GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; GCC_WARN_SIGN_COMPARE = YES; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_PARAMETER = YES; GCC_WARN_UNUSED_VARIABLE = YES; HEADER_SEARCH_PATHS = ( "$(inherited)", "\"$(SRCROOT)/../../src\"", "\"$(SRCROOT)/../../src/libraries\"", "\"$(SRCROOT)/../../src/modules\"", "\"$(SRCROOT)/../../src/libraries/enet/libenet/include\"", ); IPHONEOS_DEPLOYMENT_TARGET = 13.0; LIBRARY_SEARCH_PATHS = ""; LLVM_LTO = YES; MACOSX_DEPLOYMENT_TARGET = 10.15; ONLY_ACTIVE_ARCH = NO; SDKROOT = macosx; USE_HEADERMAP = NO; WARNING_CFLAGS = "-Wall"; }; name = Distribution; }; FA5326C5189719C700F7BBF4 /* Distribution */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; COMBINE_HIDPI_IMAGES = YES; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DYLIB_COMPATIBILITY_VERSION = 9.0; DYLIB_CURRENT_VERSION = 9.0; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/macosx/Frameworks", "$(PROJECT_DIR)", ); FRAMEWORK_VERSION = A; GCC_ENABLE_OBJC_EXCEPTIONS = YES; HEADER_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/macosx/Frameworks/freetype.framework/Headers", "$(PROJECT_DIR)/macosx/Frameworks/Lua.framework/Headers", "$(PROJECT_DIR)/macosx/Frameworks/SDL2.framework/Headers", "$(PROJECT_DIR)/macosx/Frameworks/harfbuzz.framework/Headers", ); INFOPLIST_FILE = "macosx/liblove-macosx.plist"; LD_DYLIB_INSTALL_NAME = "@rpath/$(EXECUTABLE_PATH)"; LD_RUNPATH_SEARCH_PATHS = "@loader_path/../../../"; MARKETING_VERSION = 11.5; OTHER_LDFLAGS = ( "-undefined", dynamic_lookup, ); PRODUCT_BUNDLE_IDENTIFIER = "love2d.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = love; SKIP_INSTALL = YES; WRAPPER_EXTENSION = framework; }; name = Distribution; }; FA577AC016C7507900860150 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; COMBINE_HIDPI_IMAGES = YES; DYLIB_COMPATIBILITY_VERSION = 9.0; DYLIB_CURRENT_VERSION = 9.0; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/macosx/Frameworks", "$(PROJECT_DIR)", ); FRAMEWORK_VERSION = A; GCC_ENABLE_OBJC_EXCEPTIONS = YES; HEADER_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/macosx/Frameworks/freetype.framework/Headers", "$(PROJECT_DIR)/macosx/Frameworks/Lua.framework/Headers", "$(PROJECT_DIR)/macosx/Frameworks/SDL2.framework/Headers", "$(PROJECT_DIR)/macosx/Frameworks/harfbuzz.framework/Headers", ); INFOPLIST_FILE = "macosx/liblove-macosx.plist"; LD_DYLIB_INSTALL_NAME = "@rpath/$(EXECUTABLE_PATH)"; LD_RUNPATH_SEARCH_PATHS = "@loader_path/../../../"; MARKETING_VERSION = 11.5; OTHER_LDFLAGS = ( "-undefined", dynamic_lookup, ); PRODUCT_BUNDLE_IDENTIFIER = "love2d.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = love; SKIP_INSTALL = YES; WRAPPER_EXTENSION = framework; }; name = Debug; }; FA577AC116C7507900860150 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; COMBINE_HIDPI_IMAGES = YES; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DYLIB_COMPATIBILITY_VERSION = 9.0; DYLIB_CURRENT_VERSION = 9.0; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/macosx/Frameworks", "$(PROJECT_DIR)", ); FRAMEWORK_VERSION = A; GCC_ENABLE_OBJC_EXCEPTIONS = YES; HEADER_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/macosx/Frameworks/freetype.framework/Headers", "$(PROJECT_DIR)/macosx/Frameworks/Lua.framework/Headers", "$(PROJECT_DIR)/macosx/Frameworks/SDL2.framework/Headers", "$(PROJECT_DIR)/macosx/Frameworks/harfbuzz.framework/Headers", ); INFOPLIST_FILE = "macosx/liblove-macosx.plist"; LD_DYLIB_INSTALL_NAME = "@rpath/$(EXECUTABLE_PATH)"; LD_RUNPATH_SEARCH_PATHS = "@loader_path/../../../"; MARKETING_VERSION = 11.5; OTHER_LDFLAGS = ( "-undefined", dynamic_lookup, ); PRODUCT_BUNDLE_IDENTIFIER = "love2d.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = love; SKIP_INSTALL = YES; WRAPPER_EXTENSION = framework; }; name = Release; }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ 1DEB928908733DD80010E9CD /* Build configuration list for PBXProject "liblove" */ = { isa = XCConfigurationList; buildConfigurations = ( 64274E785071353E1A1D0D4B /* Debug */, 10D5479E63C26BB35EB5482E /* Release */, FA5326C4189719C700F7BBF4 /* Distribution */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; }; FA0B78EE1A958B90000E1D17 /* Build configuration list for PBXNativeTarget "liblove-ios" */ = { isa = XCConfigurationList; buildConfigurations = ( FA0B78EF1A958B90000E1D17 /* Debug */, FA0B78F01A958B90000E1D17 /* Release */, FA0B78F11A958B90000E1D17 /* Distribution */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; }; FA577ABF16C7507900860150 /* Build configuration list for PBXNativeTarget "liblove-macosx" */ = { isa = XCConfigurationList; buildConfigurations = ( FA577AC016C7507900860150 /* Debug */, FA577AC116C7507900860150 /* Release */, FA5326C5189719C700F7BBF4 /* Distribution */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; }; /* End XCConfigurationList section */ }; rootObject = 08FB7793FE84155DC02AAC07 /* Project object */; } ================================================ FILE: platform/xcode/liblove.xcodeproj/project.xcworkspace/contents.xcworkspacedata ================================================ ================================================ FILE: platform/xcode/love.entitlements ================================================ com.apple.security.cs.allow-jit com.apple.security.cs.allow-unsigned-executable-memory com.apple.security.cs.disable-library-validation com.apple.security.device.audio-input ================================================ FILE: platform/xcode/love.xcodeproj/default.pbxuser ================================================ // !$*UTF8*$! { 29B97313FDCFA39411CA2CEA /* Project object */ = { activeArchitecturePreference = ppc; activeBuildConfigurationName = Release; activeExecutable = A93E69C010420A88007D418B /* love */; activeSDKPreference = macosx10.5; activeTarget = 8D1107260486CEB800E47090 /* love */; addToTargets = ( 8D1107260486CEB800E47090 /* love */, ); breakpoints = ( ); codeSenseManager = A93E69C410420AA6007D418B /* Code sense */; executables = ( A93E69C010420A88007D418B /* love */, ); perUserDictionary = { PBXConfiguration.PBXFileTableDataSource3.PBXBookmarksDataSource = { PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; PBXFileTableDataSourceColumnSortingKey = PBXBookmarksDataSource_NameID; PBXFileTableDataSourceColumnWidthsKey = ( 200, 200, 150.58349609375, ); PBXFileTableDataSourceColumnsKey = ( PBXBookmarksDataSource_LocationID, PBXBookmarksDataSource_NameID, PBXBookmarksDataSource_CommentsID, ); }; PBXConfiguration.PBXFileTableDataSource3.PBXErrorsWarningsDataSource = { PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; PBXFileTableDataSourceColumnSortingKey = PBXErrorsWarningsDataSource_LocationID; PBXFileTableDataSourceColumnWidthsKey = ( 20, 300, 193.20849609375, ); PBXFileTableDataSourceColumnsKey = ( PBXErrorsWarningsDataSource_TypeID, PBXErrorsWarningsDataSource_MessageID, PBXErrorsWarningsDataSource_LocationID, ); }; PBXConfiguration.PBXFileTableDataSource3.PBXExecutablesDataSource = { PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; PBXFileTableDataSourceColumnSortingKey = PBXExecutablesDataSource_NameID; PBXFileTableDataSourceColumnWidthsKey = ( 22, 300, 191, ); PBXFileTableDataSourceColumnsKey = ( PBXExecutablesDataSource_ActiveFlagID, PBXExecutablesDataSource_NameID, PBXExecutablesDataSource_CommentsID, ); }; PBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = { PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_FiletypeID; PBXFileTableDataSourceColumnWidthsKey = ( 20, 341, 20, 48, 43, 43, 20, ); PBXFileTableDataSourceColumnsKey = ( PBXFileDataSource_FiletypeID, PBXFileDataSource_Filename_ColumnID, PBXFileDataSource_Built_ColumnID, PBXFileDataSource_ObjectSize_ColumnID, PBXFileDataSource_Errors_ColumnID, PBXFileDataSource_Warnings_ColumnID, PBXFileDataSource_Target_ColumnID, ); }; PBXConfiguration.PBXTargetDataSource.PBXTargetDataSource = { PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID; PBXFileTableDataSourceColumnWidthsKey = ( 20, 301, 60, 20, 48, 43, 43, ); PBXFileTableDataSourceColumnsKey = ( PBXFileDataSource_FiletypeID, PBXFileDataSource_Filename_ColumnID, PBXTargetDataSource_PrimaryAttribute, PBXFileDataSource_Built_ColumnID, PBXFileDataSource_ObjectSize_ColumnID, PBXFileDataSource_Errors_ColumnID, PBXFileDataSource_Warnings_ColumnID, ); }; PBXPerProjectTemplateStateSaveDate = 272885036; PBXWorkspaceStateSaveDate = 272885036; }; perUserProjectItems = { A9D8FBD21043E5320063561F /* PBXTextBookmark */ = A9D8FBD21043E5320063561F /* PBXTextBookmark */; A9D8FBE01043E5AE0063561F /* PBXTextBookmark */ = A9D8FBE01043E5AE0063561F /* PBXTextBookmark */; A9D8FBE21043E5AE0063561F /* PBXTextBookmark */ = A9D8FBE21043E5AE0063561F /* PBXTextBookmark */; A9D8FBE71043E5C10063561F /* PBXTextBookmark */ = A9D8FBE71043E5C10063561F /* PBXTextBookmark */; A9D8FBE81043E5C10063561F /* PBXTextBookmark */ = A9D8FBE81043E5C10063561F /* PBXTextBookmark */; A9D8FBE91043E5C10063561F /* PBXTextBookmark */ = A9D8FBE91043E5C10063561F /* PBXTextBookmark */; A9D8FBEA1043E5C10063561F /* PBXTextBookmark */ = A9D8FBEA1043E5C10063561F /* PBXTextBookmark */; A9D8FBEB1043E5C10063561F /* PBXTextBookmark */ = A9D8FBEB1043E5C10063561F /* PBXTextBookmark */; A9D8FBEC1043E5C10063561F /* PBXTextBookmark */ = A9D8FBEC1043E5C10063561F /* PBXTextBookmark */; A9D8FBED1043E5C10063561F /* PBXTextBookmark */ = A9D8FBED1043E5C10063561F /* PBXTextBookmark */; A9D8FBFC1043E7C20063561F /* PBXTextBookmark */ = A9D8FBFC1043E7C20063561F /* PBXTextBookmark */; A9D8FC011043E8770063561F /* PBXTextBookmark */ = A9D8FC011043E8770063561F /* PBXTextBookmark */; A9D8FC031043E94F0063561F /* PBXTextBookmark */ = A9D8FC031043E94F0063561F /* PBXTextBookmark */; A9D8FC041043E94F0063561F /* PBXTextBookmark */ = A9D8FC041043E94F0063561F /* PBXTextBookmark */; A9D8FC051043E94F0063561F /* PBXTextBookmark */ = A9D8FC051043E94F0063561F /* PBXTextBookmark */; A9D8FC061043E94F0063561F /* PBXTextBookmark */ = A9D8FC061043E94F0063561F /* PBXTextBookmark */; A9D8FC0D1043EBD30063561F /* PBXTextBookmark */ = A9D8FC0D1043EBD30063561F /* PBXTextBookmark */; A9D8FC131043EC200063561F /* PBXTextBookmark */ = A9D8FC131043EC200063561F /* PBXTextBookmark */; A9D8FC1E1043EFA00063561F /* PBXTextBookmark */ = A9D8FC1E1043EFA00063561F /* PBXTextBookmark */; A9D8FC2010441C030063561F /* PBXTextBookmark */ = A9D8FC2010441C030063561F /* PBXTextBookmark */; A9D8FC2110441C0F0063561F /* PBXTextBookmark */ = A9D8FC2110441C0F0063561F /* PBXTextBookmark */; A9D8FC2410441DF10063561F /* PBXTextBookmark */ = A9D8FC2410441DF10063561F /* PBXTextBookmark */; A9D8FC2510441E590063561F /* PBXTextBookmark */ = A9D8FC2510441E590063561F /* PBXTextBookmark */; A9D8FC2610441E700063561F /* PBXTextBookmark */ = A9D8FC2610441E700063561F /* PBXTextBookmark */; A9D8FC2710441E890063561F /* PBXTextBookmark */ = A9D8FC2710441E890063561F /* PBXTextBookmark */; A9D8FC2910441E9B0063561F /* PBXTextBookmark */ = A9D8FC2910441E9B0063561F /* PBXTextBookmark */; A9D8FC2F104423D80063561F /* PBXTextBookmark */ = A9D8FC2F104423D80063561F /* PBXTextBookmark */; A9D8FC30104423D80063561F /* PBXTextBookmark */ = A9D8FC30104423D80063561F /* PBXTextBookmark */; A9D8FC31104423D80063561F /* PBXTextBookmark */ = A9D8FC31104423D80063561F /* PBXTextBookmark */; A9D8FC32104423D80063561F /* PBXTextBookmark */ = A9D8FC32104423D80063561F /* PBXTextBookmark */; A9D8FC36104423F90063561F /* PBXTextBookmark */ = A9D8FC36104423F90063561F /* PBXTextBookmark */; A9D8FC3D104427770063561F /* PBXTextBookmark */ = A9D8FC3D104427770063561F /* PBXTextBookmark */; A9D8FC3F104427A10063561F /* PBXTextBookmark */ = A9D8FC3F104427A10063561F /* PBXTextBookmark */; A9D8FC40104427AE0063561F /* PBXTextBookmark */ = A9D8FC40104427AE0063561F /* PBXTextBookmark */; A9D8FC421044283D0063561F /* PBXTextBookmark */ = A9D8FC421044283D0063561F /* PBXTextBookmark */; A9DE83571043CE2800567BA4 = A9DE83571043CE2800567BA4 /* PBXTextBookmark */; A9DE835A1043CE2800567BA4 = A9DE835A1043CE2800567BA4 /* PBXTextBookmark */; A9DE83781043CFEF00567BA4 = A9DE83781043CFEF00567BA4 /* PBXTextBookmark */; A9DE83791043CFEF00567BA4 = A9DE83791043CFEF00567BA4 /* PBXTextBookmark */; A9DE837A1043CFEF00567BA4 = A9DE837A1043CFEF00567BA4 /* PBXBookmark */; A9DE837B1043CFEF00567BA4 = A9DE837B1043CFEF00567BA4 /* PBXTextBookmark */; A9DE837C1043CFEF00567BA4 = A9DE837C1043CFEF00567BA4 /* PBXTextBookmark */; A9DE85AA1043E49900567BA4 = A9DE85AA1043E49900567BA4 /* PBXTextBookmark */; }; sourceControlManager = A93E69C310420AA6007D418B /* Source Control */; userBuildSettings = { }; }; 8D1107260486CEB800E47090 /* love */ = { activeExec = 0; executables = ( A93E69C010420A88007D418B /* love */, ); }; A9255DEA1043188D00BA1496 /* SDLMain.m */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {762, 5586}}"; sepNavSelRange = "{0, 0}"; sepNavVisRange = "{561, 596}"; }; }; A93E69C010420A88007D418B /* love */ = { isa = PBXExecutable; activeArgIndices = ( ); argumentStrings = ( ); autoAttachOnCrash = 1; breakpointsEnabled = 0; configStateDict = { }; customDataFormattersEnabled = 1; debuggerPlugin = GDBDebugging; disassemblyDisplayState = 0; dylibVariantSuffix = ""; enableDebugStr = 1; environmentEntries = ( ); executableSystemSymbolLevel = 0; executableUserSymbolLevel = 0; libgmallocEnabled = 0; name = love; sourceDirectories = ( ); }; A93E69C310420AA6007D418B /* Source Control */ = { isa = PBXSourceControlManager; fallbackIsa = XCSourceControlManager; isSCMEnabled = 0; scmConfiguration = { }; }; A93E69C410420AA6007D418B /* Code sense */ = { isa = PBXCodeSenseManager; indexTemplatePath = ""; }; A93E69DE10420ABF007D418B /* config.h */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {481, 812}}"; sepNavSelRange = "{0, 0}"; sepNavVisRange = "{922, 334}"; }; }; A93E69E110420ABF007D418B /* Exception.h */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {481, 770}}"; sepNavSelRange = "{0, 0}"; sepNavVisRange = "{0, 844}"; }; }; A93E69E610420ABF007D418B /* MemoryData.h */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {481, 910}}"; sepNavSelRange = "{0, 0}"; sepNavVisRange = "{987, 353}"; }; }; A93E69E710420ABF007D418B /* Module.h */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {481, 798}}"; sepNavSelRange = "{0, 0}"; sepNavVisRange = "{1168, 298}"; }; }; A93E69EA10420ABF007D418B /* Reference.cpp */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {519, 742}}"; sepNavSelRange = "{0, 0}"; sepNavVisRange = "{0, 927}"; }; }; A93E69ED10420ABF007D418B /* runtime.h */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {798, 3990}}"; sepNavSelRange = "{1030, 18}"; sepNavVisRange = "{9125, 493}"; }; }; A93E69F110420ABF007D418B /* version.h */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {481, 532}}"; sepNavSelRange = "{0, 0}"; sepNavVisRange = "{0, 844}"; }; }; A93E69F710420ABF007D418B /* keeper.lch */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {519, 3094}}"; sepNavSelRange = "{0, 0}"; sepNavVisRange = "{0, 1141}"; }; }; A93E6A0410420ABF007D418B /* auxiliar.c */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {519, 2156}}"; sepNavSelRange = "{0, 0}"; sepNavVisRange = "{0, 765}"; }; }; A93E6A2C10420AC0007D418B /* unix.c */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {519, 5054}}"; sepNavSelRange = "{0, 0}"; sepNavVisRange = "{0, 534}"; }; }; A93E6A3010420AC0007D418B /* usocket.c */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {519, 5250}}"; sepNavSelRange = "{0, 0}"; sepNavVisRange = "{0, 728}"; }; }; A93E6A3110420AC0007D418B /* usocket.h */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {1206, 641}}"; sepNavSelRange = "{601, 0}"; sepNavVisRange = "{0, 1146}"; sepNavWindowFrame = "{{15, 4}, {1265, 769}}"; }; }; A93E6A3410420AC0007D418B /* love.cpp */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {606, 2576}}"; sepNavSelRange = "{4804, 0}"; sepNavVisRange = "{3953, 397}"; }; }; A93E6A4410420AC0007D418B /* Audio.cpp */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {468, 2590}}"; sepNavSelRange = "{0, 0}"; sepNavVisRange = "{0, 674}"; }; }; A93E6A4510420AC0007D418B /* Audio.h */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {481, 1624}}"; sepNavSelRange = "{1170, 127}"; sepNavVisRange = "{1062, 295}"; }; }; A93E6A4710420AC0007D418B /* Music.h */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {481, 1064}}"; sepNavSelRange = "{1084, 127}"; sepNavVisRange = "{1065, 229}"; }; }; A93E6A4910420AC0007D418B /* Pool.h */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {481, 1806}}"; sepNavSelRange = "{1297, 0}"; sepNavVisRange = "{1139, 229}"; }; }; A93E6A4A10420AC0007D418B /* Sound.cpp */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {519, 1008}}"; sepNavSelRange = "{0, 0}"; sepNavVisRange = "{0, 926}"; }; }; A93E6A4B10420AC0007D418B /* Sound.h */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {481, 980}}"; sepNavSelRange = "{1242, 0}"; sepNavVisRange = "{1066, 274}"; }; }; A93E6A4D10420AC0007D418B /* Source.h */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {481, 1190}}"; sepNavSelRange = "{1243, 0}"; sepNavVisRange = "{1095, 229}"; }; }; A93E6A5210420AC0007D418B /* wrap_Audio.h */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {519, 798}}"; sepNavSelRange = "{1721, 64}"; sepNavVisRange = "{1247, 565}"; }; }; A93E6A5E10420AC1007D418B /* wrap_Event.cpp */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {519, 1260}}"; sepNavSelRange = "{0, 0}"; sepNavVisRange = "{0, 927}"; }; }; A93E6A6B10420AC1007D418B /* wrap_FileData.cpp */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {519, 798}}"; sepNavSelRange = "{0, 0}"; sepNavVisRange = "{0, 908}"; }; }; A93E6A7510420AC2007D418B /* wrap_Font.cpp */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {519, 1064}}"; sepNavSelRange = "{0, 0}"; sepNavVisRange = "{0, 927}"; }; }; A93E6A8910420AC2007D418B /* GLee.c */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {519, 182112}}"; sepNavSelRange = "{0, 0}"; sepNavVisRange = "{0, 847}"; }; }; A93E6A8D10420AC2007D418B /* Graphics.cpp */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {696, 17220}}"; sepNavSelRange = "{2543, 0}"; sepNavVisRange = "{2152, 690}"; }; }; A93E6A8E10420AC2007D418B /* Graphics.h */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {481, 7588}}"; sepNavSelRange = "{2168, 0}"; sepNavVisRange = "{1975, 342}"; }; }; A93E6A9010420AC2007D418B /* Image.h */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {519, 2002}}"; sepNavSelRange = "{0, 0}"; sepNavVisRange = "{1597, 394}"; }; }; A93E6AB210420AC3007D418B /* wrap_ImageData.cpp */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {519, 1932}}"; sepNavSelRange = "{0, 0}"; sepNavVisRange = "{0, 927}"; }; }; A93E6AB710420AC3007D418B /* Joystick.cpp */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {519, 2968}}"; sepNavSelRange = "{0, 0}"; sepNavVisRange = "{0, 926}"; }; }; A93E6AB910420AC3007D418B /* wrap_Joystick.cpp */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {519, 2366}}"; sepNavSelRange = "{0, 0}"; sepNavVisRange = "{0, 927}"; }; }; A93E6ABE10420AC3007D418B /* Keyboard.cpp */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {519, 812}}"; sepNavSelRange = "{0, 0}"; sepNavVisRange = "{0, 926}"; }; }; A93E6AC510420AC3007D418B /* Mouse.cpp */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {519, 980}}"; sepNavSelRange = "{0, 0}"; sepNavVisRange = "{0, 926}"; }; }; A93E6AC710420AC3007D418B /* wrap_Mouse.cpp */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {519, 1694}}"; sepNavSelRange = "{0, 0}"; sepNavVisRange = "{0, 927}"; }; }; A93E6ACB10420AC3007D418B /* api.c */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {481, 1680}}"; sepNavSelRange = "{0, 0}"; sepNavVisRange = "{1254, 265}"; }; }; A93E6AD710420AC5007D418B /* libtcc.c */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {444, 31906}}"; sepNavSelRange = "{39418, 40}"; sepNavVisRange = "{39238, 339}"; sepNavWindowFrame = "{{15, 4}, {1265, 769}}"; }; }; A93E6AD810420AC5007D418B /* libtcc.h */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {519, 1526}}"; sepNavSelRange = "{0, 0}"; sepNavVisRange = "{0, 299}"; }; }; A93E6AD910420AC5007D418B /* stab.def */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {519, 3332}}"; sepNavSelRange = "{8422, 0}"; sepNavVisRange = "{8041, 701}"; }; }; A93E6ADB10420AC5007D418B /* tcc.c */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {498, 7854}}"; sepNavSelRange = "{0, 0}"; sepNavVisRange = "{16939, 512}"; sepNavWindowFrame = "{{15, 4}, {1265, 769}}"; }; }; A93E6ADC10420AC5007D418B /* tcc.h */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {481, 10990}}"; sepNavSelRange = "{0, 0}"; sepNavVisRange = "{2051, 632}"; sepNavWindowFrame = "{{15, 4}, {1265, 769}}"; }; }; A93E6ADF10420AC6007D418B /* tccelf.c */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {519, 38388}}"; sepNavSelRange = "{0, 0}"; sepNavVisRange = "{0, 822}"; }; }; A93E6AE210420AC7007D418B /* tccpp.c */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {481, 40502}}"; sepNavSelRange = "{5078, 31}"; sepNavVisRange = "{4906, 460}"; }; }; A93E6AE510420AC7007D418B /* Native.cpp */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {519, 2282}}"; sepNavSelRange = "{0, 0}"; sepNavVisRange = "{598, 493}"; }; }; A93E6AE610420AC7007D418B /* Native.h */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {519, 1162}}"; sepNavSelRange = "{0, 0}"; sepNavVisRange = "{844, 283}"; }; }; A93E6AE710420AC7007D418B /* wrap_Native.cpp */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {519, 1792}}"; sepNavSelRange = "{0, 0}"; sepNavVisRange = "{0, 927}"; }; }; A93E6AF010420AC7007D418B /* Contact.h */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {468, 1526}}"; sepNavSelRange = "{1359, 0}"; sepNavVisRange = "{1199, 238}"; }; }; A93E6B0810420AC8007D418B /* Shape.cpp */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {519, 2660}}"; sepNavSelRange = "{0, 0}"; sepNavVisRange = "{0, 927}"; }; }; A93E6B1710420AC8007D418B /* b2CircleShape.cpp */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {519, 1568}}"; sepNavSelRange = "{0, 0}"; sepNavVisRange = "{0, 947}"; }; }; A93E6B5810420ACA007D418B /* wrap_GearJoint.cpp */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {519, 854}}"; sepNavSelRange = "{0, 0}"; sepNavVisRange = "{0, 927}"; }; }; A93E6B7010420ACB007D418B /* Signal.cpp */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {519, 896}}"; sepNavSelRange = "{0, 0}"; sepNavVisRange = "{0, 908}"; }; }; A93E6B7110420ACB007D418B /* Signal.h */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {519, 812}}"; sepNavSelRange = "{1377, 23}"; sepNavVisRange = "{4, 905}"; }; }; A93E6B7210420ACB007D418B /* wrap_Signal.cpp */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {519, 1106}}"; sepNavSelRange = "{0, 0}"; sepNavVisRange = "{0, 908}"; }; }; A93E6B7910420ACB007D418B /* FLACDecoder.cpp */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {519, 2296}}"; sepNavSelRange = "{0, 0}"; sepNavVisRange = "{0, 908}"; }; }; A93E6B7F10420ACB007D418B /* Sound.cpp */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {618, 1050}}"; sepNavSelRange = "{1940, 0}"; sepNavVisRange = "{0, 926}"; }; }; A93E6B9710420ACC007D418B /* boot.lua */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {481, 9702}}"; sepNavSelRange = "{0, 0}"; sepNavVisRange = "{0, 391}"; }; }; A93E6B9810420ACC007D418B /* boot.lua.h */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {519, 9926}}"; sepNavSelRange = "{0, 0}"; sepNavVisRange = "{0, 1228}"; }; }; A9D8FBD21043E5320063561F /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = A93E6A8910420AC2007D418B /* GLee.c */; name = "GLee.c: 1"; rLen = 0; rLoc = 0; rType = 0; vrLen = 847; vrLoc = 0; }; A9D8FBE01043E5AE0063561F /* PBXTextBookmark */ = { isa = PBXTextBookmark; comments = "warning: 'OV_CALLBACKS_DEFAULT' defined but not used"; fRef = A9D8FBE11043E5AE0063561F /* vorbisfile.h */; rLen = 1; rLoc = 55; rType = 1; }; A9D8FBE11043E5AE0063561F /* vorbisfile.h */ = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = vorbisfile.h; path = /opt/local/include/vorbis/vorbisfile.h; sourceTree = ""; uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {519, 2464}}"; sepNavSelRange = "{2279, 45}"; sepNavVisRange = "{1931, 733}"; }; }; A9D8FBE21043E5AE0063561F /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = A9D8FBE31043E5AE0063561F /* vorbisfile.h */; name = "vorbisfile.h: 56"; rLen = 45; rLoc = 2279; rType = 0; vrLen = 629; vrLoc = 1931; }; A9D8FBE31043E5AE0063561F /* vorbisfile.h */ = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = vorbisfile.h; path = /opt/local/include/vorbis/vorbisfile.h; sourceTree = ""; uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {492, 2618}}"; sepNavSelRange = "{2279, 45}"; sepNavVisRange = "{1931, 629}"; }; }; A9D8FBE71043E5C10063561F /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = A93E6A8910420AC2007D418B /* GLee.c */; name = "GLee.c: 1"; rLen = 0; rLoc = 0; rType = 0; vrLen = 847; vrLoc = 0; }; A9D8FBE81043E5C10063561F /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = A93E6B7910420ACB007D418B /* FLACDecoder.cpp */; name = "FLACDecoder.cpp: 1"; rLen = 0; rLoc = 0; rType = 0; vrLen = 908; vrLoc = 0; }; A9D8FBE91043E5C10063561F /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = A93E6B7F10420ACB007D418B /* Sound.cpp */; name = "Sound.cpp: 63"; rLen = 0; rLoc = 1940; rType = 0; vrLen = 926; vrLoc = 0; }; A9D8FBEA1043E5C10063561F /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = A93E6A8910420AC2007D418B /* GLee.c */; name = "GLee.c: 1"; rLen = 0; rLoc = 0; rType = 0; vrLen = 847; vrLoc = 0; }; A9D8FBEB1043E5C10063561F /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = A93E6B7910420ACB007D418B /* FLACDecoder.cpp */; name = "FLACDecoder.cpp: 1"; rLen = 0; rLoc = 0; rType = 0; vrLen = 908; vrLoc = 0; }; A9D8FBEC1043E5C10063561F /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = A93E6B7F10420ACB007D418B /* Sound.cpp */; name = "Sound.cpp: 63"; rLen = 0; rLoc = 1940; rType = 0; vrLen = 926; vrLoc = 0; }; A9D8FBED1043E5C10063561F /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = A9D8FBE11043E5AE0063561F /* vorbisfile.h */; name = "vorbisfile.h: 56"; rLen = 45; rLoc = 2279; rType = 0; vrLen = 733; vrLoc = 1931; }; A9D8FBFC1043E7C20063561F /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = A9D8FBE11043E5AE0063561F /* vorbisfile.h */; name = "vorbisfile.h: 56"; rLen = 45; rLoc = 2279; rType = 0; vrLen = 733; vrLoc = 1931; }; A9D8FC011043E8770063561F /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = A9D8FBE11043E5AE0063561F /* vorbisfile.h */; name = "vorbisfile.h: 56"; rLen = 45; rLoc = 2279; rType = 0; vrLen = 733; vrLoc = 1931; }; A9D8FC031043E94F0063561F /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = A9D8FBE11043E5AE0063561F /* vorbisfile.h */; name = "vorbisfile.h: 56"; rLen = 45; rLoc = 2279; rType = 0; vrLen = 733; vrLoc = 1931; }; A9D8FC041043E94F0063561F /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = A9255DEA1043188D00BA1496 /* SDLMain.m */; name = "SDLMain.m: 1"; rLen = 0; rLoc = 0; rType = 0; vrLen = 604; vrLoc = 0; }; A9D8FC051043E94F0063561F /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = A9D8FBE11043E5AE0063561F /* vorbisfile.h */; name = "vorbisfile.h: 56"; rLen = 45; rLoc = 2279; rType = 0; vrLen = 733; vrLoc = 1931; }; A9D8FC061043E94F0063561F /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = A9255DEA1043188D00BA1496 /* SDLMain.m */; name = "SDLMain.m: 1"; rLen = 0; rLoc = 0; rType = 0; vrLen = 549; vrLoc = 347; }; A9D8FC0D1043EBD30063561F /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = A9255DEA1043188D00BA1496 /* SDLMain.m */; name = "SDLMain.m: 1"; rLen = 0; rLoc = 0; rType = 0; vrLen = 596; vrLoc = 561; }; A9D8FC131043EC200063561F /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = A9255DEA1043188D00BA1496 /* SDLMain.m */; name = "SDLMain.m: 1"; rLen = 0; rLoc = 0; rType = 0; vrLen = 596; vrLoc = 561; }; A9D8FC1E1043EFA00063561F /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = A9255DEA1043188D00BA1496 /* SDLMain.m */; name = "SDLMain.m: 1"; rLen = 0; rLoc = 0; rType = 0; vrLen = 596; vrLoc = 561; }; A9D8FC2010441C030063561F /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = A9255DEA1043188D00BA1496 /* SDLMain.m */; name = "SDLMain.m: 1"; rLen = 0; rLoc = 0; rType = 0; vrLen = 596; vrLoc = 561; }; A9D8FC2110441C0F0063561F /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = A9255DEA1043188D00BA1496 /* SDLMain.m */; name = "SDLMain.m: 1"; rLen = 0; rLoc = 0; rType = 0; vrLen = 596; vrLoc = 561; }; A9D8FC2410441DF10063561F /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = A9255DEA1043188D00BA1496 /* SDLMain.m */; name = "SDLMain.m: 1"; rLen = 0; rLoc = 0; rType = 0; vrLen = 596; vrLoc = 561; }; A9D8FC2510441E590063561F /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = A9255DEA1043188D00BA1496 /* SDLMain.m */; name = "SDLMain.m: 1"; rLen = 0; rLoc = 0; rType = 0; vrLen = 596; vrLoc = 561; }; A9D8FC2610441E700063561F /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = A9255DEA1043188D00BA1496 /* SDLMain.m */; name = "SDLMain.m: 1"; rLen = 0; rLoc = 0; rType = 0; vrLen = 596; vrLoc = 561; }; A9D8FC2710441E890063561F /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = A9255DEA1043188D00BA1496 /* SDLMain.m */; name = "SDLMain.m: 1"; rLen = 0; rLoc = 0; rType = 0; vrLen = 596; vrLoc = 561; }; A9D8FC2910441E9B0063561F /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = A9255DEA1043188D00BA1496 /* SDLMain.m */; name = "SDLMain.m: 1"; rLen = 0; rLoc = 0; rType = 0; vrLen = 596; vrLoc = 561; }; A9D8FC2F104423D80063561F /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = A9D8FBE31043E5AE0063561F /* vorbisfile.h */; name = "vorbisfile.h: 56"; rLen = 45; rLoc = 2279; rType = 0; vrLen = 629; vrLoc = 1931; }; A9D8FC30104423D80063561F /* PBXTextBookmark */ = { isa = PBXTextBookmark; comments = "error: 'struct mcontext' has no member named '__ss'"; fRef = A93E6AD710420AC5007D418B /* libtcc.c */; rLen = 1; rLoc = 1480; rType = 1; }; A9D8FC31104423D80063561F /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = A9D8FBE31043E5AE0063561F /* vorbisfile.h */; name = "vorbisfile.h: 56"; rLen = 45; rLoc = 2279; rType = 0; vrLen = 629; vrLoc = 1931; }; A9D8FC32104423D80063561F /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = A93E6AD710420AC5007D418B /* libtcc.c */; name = "libtcc.c: 1481"; rLen = 40; rLoc = 39418; rType = 0; vrLen = 300; vrLoc = 39238; }; A9D8FC36104423F90063561F /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = A9255DEA1043188D00BA1496 /* SDLMain.m */; name = "SDLMain.m: 1"; rLen = 0; rLoc = 0; rType = 0; vrLen = 596; vrLoc = 561; }; A9D8FC3D104427770063561F /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = A9255DEA1043188D00BA1496 /* SDLMain.m */; name = "SDLMain.m: 1"; rLen = 0; rLoc = 0; rType = 0; vrLen = 596; vrLoc = 561; }; A9D8FC3F104427A10063561F /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = A9255DEA1043188D00BA1496 /* SDLMain.m */; name = "SDLMain.m: 1"; rLen = 0; rLoc = 0; rType = 0; vrLen = 596; vrLoc = 561; }; A9D8FC40104427AE0063561F /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = A9255DEA1043188D00BA1496 /* SDLMain.m */; name = "SDLMain.m: 1"; rLen = 0; rLoc = 0; rType = 0; vrLen = 596; vrLoc = 561; }; A9D8FC421044283D0063561F /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = A9255DEA1043188D00BA1496 /* SDLMain.m */; name = "SDLMain.m: 1"; rLen = 0; rLoc = 0; rType = 0; vrLen = 596; vrLoc = 561; }; A9DE83571043CE2800567BA4 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = A93E6B7110420ACB007D418B /* Signal.h */; name = "Signal.h: 52"; rLen = 23; rLoc = 1377; rType = 0; vrLen = 905; vrLoc = 4; }; A9DE83591043CE2800567BA4 /* Makefile */ = { isa = PBXFileReference; lastKnownFileType = sourcecode.make; name = Makefile; path = "/Users/bill/Downloads/flac-1.2.1/src/libFLAC++/Makefile"; sourceTree = ""; }; A9DE835A1043CE2800567BA4 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = A93E6B7110420ACB007D418B /* Signal.h */; name = "Signal.h: 52"; rLen = 23; rLoc = 1377; rType = 0; vrLen = 905; vrLoc = 4; }; A9DE83781043CFEF00567BA4 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = A9DE83591043CE2800567BA4 /* Makefile */; name = "Makefile: 608"; rLen = 0; rLoc = 18653; rType = 0; vrLen = 753; vrLoc = 233; }; A9DE83791043CFEF00567BA4 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = A93E6ADF10420AC6007D418B /* tccelf.c */; name = "tccelf.c: 1"; rLen = 0; rLoc = 0; rType = 0; vrLen = 822; vrLoc = 0; }; A9DE837A1043CFEF00567BA4 /* PBXBookmark */ = { isa = PBXBookmark; fRef = A93E6A8910420AC2007D418B /* GLee.c */; }; A9DE837B1043CFEF00567BA4 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = A9DE83591043CE2800567BA4 /* Makefile */; name = "Makefile: 608"; rLen = 0; rLoc = 18653; rType = 0; vrLen = 753; vrLoc = 233; }; A9DE837C1043CFEF00567BA4 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = A93E6ADF10420AC6007D418B /* tccelf.c */; name = "tccelf.c: 1"; rLen = 0; rLoc = 0; rType = 0; vrLen = 822; vrLoc = 0; }; A9DE85AA1043E49900567BA4 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = A93E6A8910420AC2007D418B /* GLee.c */; name = "GLee.c: 1"; rLen = 0; rLoc = 0; rType = 0; vrLen = 847; vrLoc = 0; }; } ================================================ FILE: platform/xcode/love.xcodeproj/project.pbxproj ================================================ // !$*UTF8*$! { archiveVersion = 1; classes = { }; objectVersion = 52; objects = { /* Begin PBXBuildFile section */ 05D204142D37FEFA00C1EE87 /* SDL3.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = D9596F632CBAC98B00BE58C1 /* SDL3.xcframework */; }; 05D204152D37FEFA00C1EE87 /* SDL3.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = D9596F632CBAC98B00BE58C1 /* SDL3.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; }; A9255DD31043183600BA1496 /* Lua.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = A93E6E5310420B57007D418B /* Lua.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; A9255E031043195A00BA1496 /* vorbis.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = A9255E021043195A00BA1496 /* vorbis.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; A9255F58104324E100BA1496 /* ogg.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = A9255F51104324D700BA1496 /* ogg.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; A93E6E5510420B57007D418B /* Lua.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A93E6E5310420B57007D418B /* Lua.framework */; }; A93E6EED10420BA8007D418B /* love.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A93E6A3410420AC0007D418B /* love.cpp */; }; A9F169AD109E825000FC83D1 /* libmodplug.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = A9F16926109E7BAD00FC83D1 /* libmodplug.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; CE73F8001EEB64150052DAB3 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CE73F7FF1EEB64150052DAB3 /* AVFoundation.framework */; }; D9596F642CBAC98B00BE58C1 /* SDL3.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = D9596F632CBAC98B00BE58C1 /* SDL3.xcframework */; }; D9596F662CBAC99F00BE58C1 /* SDL3.xcframework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = D9596F632CBAC98B00BE58C1 /* SDL3.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; D9DAB9372963CF6900C64820 /* harfbuzz.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = D9DAB9352963CF5F00C64820 /* harfbuzz.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; FA0797991BF480A200034B7C /* GameController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA0797981BF480A200034B7C /* GameController.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; FA08F69616C766E000F007B5 /* love.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA08F69116C765A200F007B5 /* love.framework */; }; FA08F69716C766E700F007B5 /* love.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = FA08F69116C765A200F007B5 /* love.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; FA0B7F301A95AC7D000E1D17 /* love.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A93E6A3410420AC0007D418B /* love.cpp */; }; FA15DFB41F9B8D9E0042AB22 /* libbz2.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = FA15DFB31F9B8D9E0042AB22 /* libbz2.tbd */; }; FA27B3CB1B498696008A9DCE /* theora.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA27B3CA1B498696008A9DCE /* theora.framework */; }; FA5933751C6D625B000EC779 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = FA5D249A1A96CF4300C6FC8F /* Images.xcassets */; }; FA5D24821A96CA1800C6FC8F /* OpenAL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA5D24811A96CA1800C6FC8F /* OpenAL.framework */; }; FA5D24841A96CA2700C6FC8F /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA5D24831A96CA2700C6FC8F /* OpenGLES.framework */; }; FA5D24881A96CA8A00C6FC8F /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA5D24871A96CA8A00C6FC8F /* UIKit.framework */; }; FA5D248A1A96CA9600C6FC8F /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA5D24891A96CA9600C6FC8F /* AudioToolbox.framework */; }; FA5D248C1A96CA9E00C6FC8F /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA5D248B1A96CA9E00C6FC8F /* QuartzCore.framework */; }; FA5D248E1A96CAA700C6FC8F /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA5D248D1A96CAA700C6FC8F /* CoreGraphics.framework */; }; FA5D24941A96CABA00C6FC8F /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = FA5D24931A96CABA00C6FC8F /* libz.dylib */; }; FA5D24961A96CAC200C6FC8F /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA5D24951A96CAC200C6FC8F /* CoreMotion.framework */; }; FA5D249C1A96CF4300C6FC8F /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = FA5D249A1A96CF4300C6FC8F /* Images.xcassets */; }; FA5D24C21A96D78000C6FC8F /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA5D24C11A96D78000C6FC8F /* Foundation.framework */; }; FA5D24D11A96E73300C6FC8F /* liblove.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FA0B7EEF1A95924A000E1D17 /* liblove.a */; }; FA7C636A1A9C49570000FD29 /* Launch Screen.xib in Resources */ = {isa = PBXBuildFile; fileRef = FA7C63691A9C49570000FD29 /* Launch Screen.xib */; }; FA84DE78277CB55B002674C6 /* CoreHaptics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA84DE77277CB55B002674C6 /* CoreHaptics.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; FAAFF04716CB120000CCDE45 /* OpenAL-Soft.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = FAAFF04616CB120000CCDE45 /* OpenAL-Soft.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; FAC1A449196F5DC600125284 /* license.txt in Resources */ = {isa = PBXBuildFile; fileRef = FAC1A448196F5DC600125284 /* license.txt */; }; FAD43ED01FF3136500831BB8 /* freetype.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = FAD43ECF1FF3133700831BB8 /* freetype.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; FAD4B1731C1F50A3004CF150 /* theora.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = FA27B3CA1B498696008A9DCE /* theora.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; FAE64A9D2072738600BC7981 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FAE64A9C2072738600BC7981 /* Metal.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ FA0B78D71A958301000E1D17 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = FA577A9316C7217800860150 /* liblove.xcodeproj */; proxyType = 2; remoteGlobalIDString = FA577AAF16C7507900860150; remoteInfo = Framework; }; FA0B7EEE1A95924A000E1D17 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = FA577A9316C7217800860150 /* liblove.xcodeproj */; proxyType = 2; remoteGlobalIDString = FA0B78DD1A958B90000E1D17; remoteInfo = "liblove-ios"; }; FA5D24BA1A96D6FC00C6FC8F /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = FA577A9316C7217800860150 /* liblove.xcodeproj */; proxyType = 1; remoteGlobalIDString = FA0B78DC1A958B90000E1D17; remoteInfo = "liblove-ios"; }; FAA287711B0ABF1400B82827 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = FA577A9316C7217800860150 /* liblove.xcodeproj */; proxyType = 1; remoteGlobalIDString = FA577AAE16C7507900860150; remoteInfo = "liblove-macosx"; }; /* End PBXContainerItemProxy section */ /* Begin PBXCopyFilesBuildPhase section */ 05D204162D37FEFA00C1EE87 /* Embed Frameworks */ = { isa = PBXCopyFilesBuildPhase; buildActionMask = 2147483647; dstPath = ""; dstSubfolderSpec = 10; files = ( 05D204152D37FEFA00C1EE87 /* SDL3.xcframework in Embed Frameworks */, ); name = "Embed Frameworks"; runOnlyForDeploymentPostprocessing = 0; }; A9255DDE1043185300BA1496 /* Copy Frameworks */ = { isa = PBXCopyFilesBuildPhase; buildActionMask = 2147483647; dstPath = ""; dstSubfolderSpec = 10; files = ( FA08F69716C766E700F007B5 /* love.framework in Copy Frameworks */, D9596F662CBAC99F00BE58C1 /* SDL3.xcframework in Copy Frameworks */, FAD4B1731C1F50A3004CF150 /* theora.framework in Copy Frameworks */, FAAFF04716CB120000CCDE45 /* OpenAL-Soft.framework in Copy Frameworks */, FAD43ED01FF3136500831BB8 /* freetype.framework in Copy Frameworks */, D9DAB9372963CF6900C64820 /* harfbuzz.framework in Copy Frameworks */, A9F169AD109E825000FC83D1 /* libmodplug.framework in Copy Frameworks */, A9255F58104324E100BA1496 /* ogg.framework in Copy Frameworks */, A9255E031043195A00BA1496 /* vorbis.framework in Copy Frameworks */, A9255DD31043183600BA1496 /* Lua.framework in Copy Frameworks */, ); name = "Copy Frameworks"; runOnlyForDeploymentPostprocessing = 0; }; /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; 8D1107320486CEB800E47090 /* love.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = love.app; sourceTree = BUILT_PRODUCTS_DIR; }; A9255E021043195A00BA1496 /* vorbis.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = vorbis.framework; path = macosx/Frameworks/vorbis.framework; sourceTree = ""; }; A9255F51104324D700BA1496 /* ogg.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ogg.framework; path = macosx/Frameworks/ogg.framework; sourceTree = ""; }; A93E6A3410420AC0007D418B /* love.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = love.cpp; path = ../../src/love.cpp; sourceTree = ""; }; A93E6E4710420B4A007D418B /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = ""; }; A93E6E5310420B57007D418B /* Lua.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Lua.framework; path = macosx/Frameworks/Lua.framework; sourceTree = ""; }; A97E3842132A9EDE00198A2F /* love-macosx.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "love-macosx.plist"; path = "macosx/love-macosx.plist"; sourceTree = ""; }; A9F16926109E7BAD00FC83D1 /* libmodplug.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = libmodplug.framework; path = macosx/Frameworks/libmodplug.framework; sourceTree = ""; }; CE73F7FF1EEB64150052DAB3 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/System/Library/Frameworks/AVFoundation.framework; sourceTree = DEVELOPER_DIR; }; D9596F632CBAC98B00BE58C1 /* SDL3.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = SDL3.xcframework; path = shared/Frameworks/SDL3.xcframework; sourceTree = ""; }; D9DAB9352963CF5F00C64820 /* harfbuzz.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = harfbuzz.framework; path = macosx/Frameworks/harfbuzz.framework; sourceTree = ""; }; FA0797981BF480A200034B7C /* GameController.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GameController.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.1.sdk/System/Library/Frameworks/GameController.framework; sourceTree = DEVELOPER_DIR; }; FA08F69116C765A200F007B5 /* love.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = love.framework; sourceTree = BUILT_PRODUCTS_DIR; }; FA0B7F061A95AAF3000E1D17 /* love.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = love.app; sourceTree = BUILT_PRODUCTS_DIR; }; FA15DFB31F9B8D9E0042AB22 /* libbz2.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libbz2.tbd; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk/usr/lib/libbz2.tbd; sourceTree = DEVELOPER_DIR; }; FA27B3CA1B498696008A9DCE /* theora.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = theora.framework; path = macosx/Frameworks/theora.framework; sourceTree = ""; }; FA577A9316C7217800860150 /* liblove.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; path = liblove.xcodeproj; sourceTree = ""; }; FA5D24811A96CA1800C6FC8F /* OpenAL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenAL.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/OpenAL.framework; sourceTree = DEVELOPER_DIR; }; FA5D24831A96CA2700C6FC8F /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/OpenGLES.framework; sourceTree = DEVELOPER_DIR; }; FA5D24871A96CA8A00C6FC8F /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; }; FA5D24891A96CA9600C6FC8F /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/AudioToolbox.framework; sourceTree = DEVELOPER_DIR; }; FA5D248B1A96CA9E00C6FC8F /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/QuartzCore.framework; sourceTree = DEVELOPER_DIR; }; FA5D248D1A96CAA700C6FC8F /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/CoreGraphics.framework; sourceTree = DEVELOPER_DIR; }; FA5D24931A96CABA00C6FC8F /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/usr/lib/libz.dylib; sourceTree = DEVELOPER_DIR; }; FA5D24951A96CAC200C6FC8F /* CoreMotion.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMotion.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/CoreMotion.framework; sourceTree = DEVELOPER_DIR; }; FA5D24971A96CE1E00C6FC8F /* love-ios.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "love-ios.plist"; path = "ios/love-ios.plist"; sourceTree = ""; }; FA5D249A1A96CF4300C6FC8F /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; FA5D24C11A96D78000C6FC8F /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; FA7C63691A9C49570000FD29 /* Launch Screen.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = "Launch Screen.xib"; path = "ios/Launch Screen.xib"; sourceTree = ""; }; FA84DE77277CB55B002674C6 /* CoreHaptics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreHaptics.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.2.sdk/System/Library/Frameworks/CoreHaptics.framework; sourceTree = DEVELOPER_DIR; }; FA9B4A0916E1579F00074F42 /* SDL2.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SDL2.framework; path = macosx/Frameworks/SDL2.framework; sourceTree = ""; }; FAAFF04616CB120000CCDE45 /* OpenAL-Soft.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = "OpenAL-Soft.framework"; path = "macosx/Frameworks/OpenAL-Soft.framework"; sourceTree = ""; }; FAC1A448196F5DC600125284 /* license.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = license.txt; path = ../../license.txt; sourceTree = ""; }; FAD43ECF1FF3133700831BB8 /* freetype.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = freetype.framework; path = macosx/Frameworks/freetype.framework; sourceTree = ""; }; FAE64A9C2072738600BC7981 /* Metal.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Metal.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.2.sdk/System/Library/Frameworks/Metal.framework; sourceTree = DEVELOPER_DIR; }; FAF5F96C233965DF0030A68A /* love.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = love.entitlements; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ 8D11072E0486CEB800E47090 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( FA08F69616C766E000F007B5 /* love.framework in Frameworks */, D9596F642CBAC98B00BE58C1 /* SDL3.xcframework in Frameworks */, 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */, A93E6E5510420B57007D418B /* Lua.framework in Frameworks */, FA27B3CB1B498696008A9DCE /* theora.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; FA0B7F031A95AAF3000E1D17 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( FA84DE78277CB55B002674C6 /* CoreHaptics.framework in Frameworks */, FAE64A9D2072738600BC7981 /* Metal.framework in Frameworks */, FA15DFB41F9B8D9E0042AB22 /* libbz2.tbd in Frameworks */, CE73F8001EEB64150052DAB3 /* AVFoundation.framework in Frameworks */, FA5D24D11A96E73300C6FC8F /* liblove.a in Frameworks */, FA5D24C21A96D78000C6FC8F /* Foundation.framework in Frameworks */, FA5D24961A96CAC200C6FC8F /* CoreMotion.framework in Frameworks */, FA0797991BF480A200034B7C /* GameController.framework in Frameworks */, FA5D24941A96CABA00C6FC8F /* libz.dylib in Frameworks */, FA5D248E1A96CAA700C6FC8F /* CoreGraphics.framework in Frameworks */, FA5D248C1A96CA9E00C6FC8F /* QuartzCore.framework in Frameworks */, FA5D248A1A96CA9600C6FC8F /* AudioToolbox.framework in Frameworks */, FA5D24881A96CA8A00C6FC8F /* UIKit.framework in Frameworks */, 05D204142D37FEFA00C1EE87 /* SDL3.xcframework in Frameworks */, FA5D24841A96CA2700C6FC8F /* OpenGLES.framework in Frameworks */, FA5D24821A96CA1800C6FC8F /* OpenAL.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ 1058C7A0FEA54F0111CA2CBB /* Frameworks */ = { isa = PBXGroup; children = ( D9596F632CBAC98B00BE58C1 /* SDL3.xcframework */, FA84DE77277CB55B002674C6 /* CoreHaptics.framework */, FAE64A9C2072738600BC7981 /* Metal.framework */, FA15DFB31F9B8D9E0042AB22 /* libbz2.tbd */, CE73F7FF1EEB64150052DAB3 /* AVFoundation.framework */, FA5D24801A96C97900C6FC8F /* ios */, FA0B7EEC1A959249000E1D17 /* macosx */, ); name = Frameworks; sourceTree = ""; }; 19C28FACFE9D520D11CA2CBB /* Products */ = { isa = PBXGroup; children = ( 8D1107320486CEB800E47090 /* love.app */, FA0B7F061A95AAF3000E1D17 /* love.app */, ); name = Products; sourceTree = ""; }; 29B97314FDCFA39411CA2CEA /* love */ = { isa = PBXGroup; children = ( FA5D249A1A96CF4300C6FC8F /* Images.xcassets */, FAF5F96C233965DF0030A68A /* love.entitlements */, 19C28FACFE9D520D11CA2CBB /* Products */, 1058C7A0FEA54F0111CA2CBB /* Frameworks */, FA5D24A01A96CF7200C6FC8F /* Supporting Files */, 29B97317FDCFA39411CA2CEA /* Resources */, FA577A9D16C7262E00860150 /* Source */, FA577A9316C7217800860150 /* liblove.xcodeproj */, ); name = love; sourceTree = ""; usesTabs = 1; }; 29B97317FDCFA39411CA2CEA /* Resources */ = { isa = PBXGroup; children = ( FAC1A448196F5DC600125284 /* license.txt */, ); name = Resources; sourceTree = ""; }; FA0B78D41A958301000E1D17 /* Products */ = { isa = PBXGroup; children = ( FA0B78D81A958301000E1D17 /* love.framework */, FA0B7EEF1A95924A000E1D17 /* liblove.a */, ); name = Products; sourceTree = ""; }; FA0B7EEC1A959249000E1D17 /* macosx */ = { isa = PBXGroup; children = ( 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */, FAD43ECF1FF3133700831BB8 /* freetype.framework */, D9DAB9352963CF5F00C64820 /* harfbuzz.framework */, A9F16926109E7BAD00FC83D1 /* libmodplug.framework */, FA08F69116C765A200F007B5 /* love.framework */, A93E6E5310420B57007D418B /* Lua.framework */, A9255F51104324D700BA1496 /* ogg.framework */, FAAFF04616CB120000CCDE45 /* OpenAL-Soft.framework */, A93E6E4710420B4A007D418B /* OpenGL.framework */, FA9B4A0916E1579F00074F42 /* SDL2.framework */, FA27B3CA1B498696008A9DCE /* theora.framework */, A9255E021043195A00BA1496 /* vorbis.framework */, ); name = macosx; sourceTree = ""; }; FA577A9D16C7262E00860150 /* Source */ = { isa = PBXGroup; children = ( A93E6A3410420AC0007D418B /* love.cpp */, ); name = Source; sourceTree = ""; }; FA5D24801A96C97900C6FC8F /* ios */ = { isa = PBXGroup; children = ( FA0797981BF480A200034B7C /* GameController.framework */, FA5D24C11A96D78000C6FC8F /* Foundation.framework */, FA5D24891A96CA9600C6FC8F /* AudioToolbox.framework */, FA5D248D1A96CAA700C6FC8F /* CoreGraphics.framework */, FA5D24951A96CAC200C6FC8F /* CoreMotion.framework */, FA5D24931A96CABA00C6FC8F /* libz.dylib */, FA5D24811A96CA1800C6FC8F /* OpenAL.framework */, FA5D24831A96CA2700C6FC8F /* OpenGLES.framework */, FA5D248B1A96CA9E00C6FC8F /* QuartzCore.framework */, FA5D24871A96CA8A00C6FC8F /* UIKit.framework */, ); name = ios; sourceTree = ""; }; FA5D24A01A96CF7200C6FC8F /* Supporting Files */ = { isa = PBXGroup; children = ( FA7C63691A9C49570000FD29 /* Launch Screen.xib */, FA5D24971A96CE1E00C6FC8F /* love-ios.plist */, A97E3842132A9EDE00198A2F /* love-macosx.plist */, ); name = "Supporting Files"; sourceTree = ""; }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ 8D1107260486CEB800E47090 /* love-macosx */ = { isa = PBXNativeTarget; buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "love-macosx" */; buildPhases = ( 8D1107290486CEB800E47090 /* Resources */, 8D11072C0486CEB800E47090 /* Sources */, A9255DDE1043185300BA1496 /* Copy Frameworks */, 8D11072E0486CEB800E47090 /* Frameworks */, ); buildRules = ( ); dependencies = ( FAA287721B0ABF1400B82827 /* PBXTargetDependency */, ); name = "love-macosx"; productInstallPath = "$(HOME)/Applications"; productName = love; productReference = 8D1107320486CEB800E47090 /* love.app */; productType = "com.apple.product-type.application"; }; FA0B7F051A95AAF3000E1D17 /* love-ios */ = { isa = PBXNativeTarget; buildConfigurationList = FA0B7F2E1A95AAF4000E1D17 /* Build configuration list for PBXNativeTarget "love-ios" */; buildPhases = ( FA0B7F021A95AAF3000E1D17 /* Sources */, FA0B7F031A95AAF3000E1D17 /* Frameworks */, FA0B7F041A95AAF3000E1D17 /* Resources */, 05D204162D37FEFA00C1EE87 /* Embed Frameworks */, ); buildRules = ( ); dependencies = ( FA5D24BB1A96D6FC00C6FC8F /* PBXTargetDependency */, ); name = "love-ios"; productName = "love-ios"; productReference = FA0B7F061A95AAF3000E1D17 /* love.app */; productType = "com.apple.product-type.application"; }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ 29B97313FDCFA39411CA2CEA /* Project object */ = { isa = PBXProject; attributes = { LastUpgradeCheck = 1340; TargetAttributes = { FA0B7F051A95AAF3000E1D17 = { CreatedOnToolsVersion = 6.1.1; }; }; }; buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "love" */; compatibilityVersion = "Xcode 11.0"; developmentRegion = en; hasScannedForEncodings = 1; knownRegions = ( Base, fr, en, ja, de, ); mainGroup = 29B97314FDCFA39411CA2CEA /* love */; projectDirPath = ""; projectReferences = ( { ProductGroup = FA0B78D41A958301000E1D17 /* Products */; ProjectRef = FA577A9316C7217800860150 /* liblove.xcodeproj */; }, ); projectRoot = ""; targets = ( 8D1107260486CEB800E47090 /* love-macosx */, FA0B7F051A95AAF3000E1D17 /* love-ios */, ); }; /* End PBXProject section */ /* Begin PBXReferenceProxy section */ FA0B78D81A958301000E1D17 /* love.framework */ = { isa = PBXReferenceProxy; fileType = wrapper.framework; path = love.framework; remoteRef = FA0B78D71A958301000E1D17 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; FA0B7EEF1A95924A000E1D17 /* liblove.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = liblove.a; remoteRef = FA0B7EEE1A95924A000E1D17 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXReferenceProxy section */ /* Begin PBXResourcesBuildPhase section */ 8D1107290486CEB800E47090 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( FA5933751C6D625B000EC779 /* Images.xcassets in Resources */, FAC1A449196F5DC600125284 /* license.txt in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; FA0B7F041A95AAF3000E1D17 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( FA5D249C1A96CF4300C6FC8F /* Images.xcassets in Resources */, FA7C636A1A9C49570000FD29 /* Launch Screen.xib in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ 8D11072C0486CEB800E47090 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( A93E6EED10420BA8007D418B /* love.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; FA0B7F021A95AAF3000E1D17 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( FA0B7F301A95AC7D000E1D17 /* love.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ FA5D24BB1A96D6FC00C6FC8F /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = "liblove-ios"; targetProxy = FA5D24BA1A96D6FC00C6FC8F /* PBXContainerItemProxy */; }; FAA287721B0ABF1400B82827 /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = "liblove-macosx"; targetProxy = FAA287711B0ABF1400B82827 /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ C01FCF4B08A954540054247B /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = "OS X AppIcon"; CODE_SIGN_ENTITLEMENTS = love.entitlements; CODE_SIGN_IDENTITY = ""; COMBINE_HIDPI_IMAGES = YES; ENABLE_HARDENED_RUNTIME = YES; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/macosx/Frameworks", "\"$(SRCROOT)/build/Release\"", "\"$(SRCROOT)/build/Debug\"", ); GCC_DYNAMIC_NO_PIC = NO; GCC_OPTIMIZATION_LEVEL = 0; HEADER_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/macosx/Frameworks/Lua.framework/Headers", "$(PROJECT_DIR)/macosx/Frameworks/SDL2.framework/Headers", ); INFOPLIST_FILE = "macosx/love-macosx.plist"; INSTALL_PATH = /Applications; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/../Frameworks", ); MARKETING_VERSION = 12.0; PRODUCT_BUNDLE_IDENTIFIER = org.love2d.love; PRODUCT_NAME = love; }; name = Debug; }; C01FCF4C08A954540054247B /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = "OS X AppIcon"; CODE_SIGN_ENTITLEMENTS = love.entitlements; CODE_SIGN_IDENTITY = ""; COMBINE_HIDPI_IMAGES = YES; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_HARDENED_RUNTIME = YES; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/macosx/Frameworks", "\"$(SRCROOT)/build/Release\"", "\"$(SRCROOT)/build/Debug\"", ); HEADER_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/macosx/Frameworks/Lua.framework/Headers", "$(PROJECT_DIR)/macosx/Frameworks/SDL2.framework/Headers", ); INFOPLIST_FILE = "macosx/love-macosx.plist"; INSTALL_PATH = /Applications; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/../Frameworks", ); MARKETING_VERSION = 12.0; PRODUCT_BUNDLE_IDENTIFIER = org.love2d.love; PRODUCT_NAME = love; }; name = Release; }; C01FCF4F08A954540054247B /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "c++17"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; FRAMEWORK_SEARCH_PATHS = ""; GCC_INCREASE_PRECOMPILED_HEADER_SHARING = YES; GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = LOVE_APPLE_USE_FRAMEWORKS; GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = NO; GCC_WARN_64_TO_32_BIT_CONVERSION = NO; GCC_WARN_ABOUT_MISSING_NEWLINE = NO; GCC_WARN_ABOUT_MISSING_PROTOTYPES = NO; GCC_WARN_ABOUT_POINTER_SIGNEDNESS = YES; GCC_WARN_ABOUT_RETURN_TYPE = NO; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO; GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS = NO; GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = NO; GCC_WARN_MISSING_PARENTHESES = NO; GCC_WARN_NON_VIRTUAL_DESTRUCTOR = NO; GCC_WARN_PEDANTIC = NO; GCC_WARN_SHADOW = NO; GCC_WARN_SIGN_COMPARE = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = NO; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; HEADER_SEARCH_PATHS = ( "\"$(SRCROOT)/../../src\"", "\"$(SRCROOT)/../../src/libraries\"", "\"$(SRCROOT)/../../src/modules\"", ); INFOPLIST_FILE = "love-Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks"; MACOSX_DEPLOYMENT_TARGET = 10.15; ONLY_ACTIVE_ARCH = YES; PRODUCT_NAME = love; SDKROOT = macosx; WARNING_CFLAGS = ( "-Wall", "-W", ); }; name = Debug; }; C01FCF5008A954540054247B /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "c++17"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEPLOYMENT_POSTPROCESSING = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; FRAMEWORK_SEARCH_PATHS = ""; GCC_INPUT_FILETYPE = automatic; GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 3; GCC_PREPROCESSOR_DEFINITIONS = LOVE_APPLE_USE_FRAMEWORKS; GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = NO; GCC_WARN_64_TO_32_BIT_CONVERSION = NO; GCC_WARN_ABOUT_MISSING_NEWLINE = NO; GCC_WARN_ABOUT_MISSING_PROTOTYPES = NO; GCC_WARN_ABOUT_POINTER_SIGNEDNESS = YES; GCC_WARN_ABOUT_RETURN_TYPE = NO; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO; GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS = NO; GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = NO; GCC_WARN_MISSING_PARENTHESES = NO; GCC_WARN_NON_VIRTUAL_DESTRUCTOR = NO; GCC_WARN_PEDANTIC = NO; GCC_WARN_SHADOW = NO; GCC_WARN_SIGN_COMPARE = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = NO; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_PARAMETER = NO; GCC_WARN_UNUSED_VALUE = NO; GCC_WARN_UNUSED_VARIABLE = YES; HEADER_SEARCH_PATHS = ( "\"$(SRCROOT)/../../src\"", "\"$(SRCROOT)/../../src/libraries\"", "\"$(SRCROOT)/../../src/modules\"", ); INFOPLIST_FILE = "love-Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks"; LLVM_LTO = YES; MACOSX_DEPLOYMENT_TARGET = 10.15; ONLY_ACTIVE_ARCH = NO; PRODUCT_NAME = love; SCAN_ALL_SOURCE_FILES_FOR_INCLUDES = YES; SDKROOT = macosx; WARNING_CFLAGS = ( "-Wall", "-W", ); }; name = Release; }; FA0B7F261A95AAF4000E1D17 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ARCHS = "$(ARCHS_STANDARD_64_BIT)"; ASSETCATALOG_COMPILER_APPICON_NAME = "iOS AppIcon"; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; DEVELOPMENT_TEAM = ""; ENABLE_BITCODE = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)", "$(PROJECT_DIR)/ios/libraries", ); GCC_DYNAMIC_NO_PIC = NO; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", "$(inherited)", ); GCC_SYMBOLS_PRIVATE_EXTERN = NO; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; HEADER_SEARCH_PATHS = ( "$(inherited)", ios/include, ); INFOPLIST_FILE = "$(SRCROOT)/ios/love-ios.plist"; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); MARKETING_VERSION = 12.0; MTL_ENABLE_DEBUG_INFO = YES; PRODUCT_BUNDLE_IDENTIFIER = org.love2d.love; PRODUCT_NAME = love; PROVISIONING_PROFILE = ""; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; }; FA0B7F271A95AAF4000E1D17 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ARCHS = "$(ARCHS_STANDARD_64_BIT)"; ASSETCATALOG_COMPILER_APPICON_NAME = "iOS AppIcon"; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = YES; DEVELOPMENT_TEAM = ""; ENABLE_BITCODE = NO; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)", "$(PROJECT_DIR)/ios/libraries", ); GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; HEADER_SEARCH_PATHS = ( "$(inherited)", ios/include, ); INFOPLIST_FILE = "$(SRCROOT)/ios/love-ios.plist"; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); MARKETING_VERSION = 12.0; MTL_ENABLE_DEBUG_INFO = NO; PRODUCT_BUNDLE_IDENTIFIER = org.love2d.love; PRODUCT_NAME = love; PROVISIONING_PROFILE = ""; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; }; name = Release; }; FA0B7F281A95AAF4000E1D17 /* Distribution */ = { isa = XCBuildConfiguration; buildSettings = { ARCHS = "$(ARCHS_STANDARD_64_BIT)"; ASSETCATALOG_COMPILER_APPICON_NAME = "iOS AppIcon"; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = YES; DEVELOPMENT_TEAM = ""; ENABLE_BITCODE = NO; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)", "$(PROJECT_DIR)/ios/libraries", ); GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; HEADER_SEARCH_PATHS = ( "$(inherited)", ios/include, ); INFOPLIST_FILE = "$(SRCROOT)/ios/love-ios.plist"; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); MARKETING_VERSION = 12.0; MTL_ENABLE_DEBUG_INFO = NO; PRODUCT_BUNDLE_IDENTIFIER = org.love2d.love; PRODUCT_NAME = love; PROVISIONING_PROFILE = ""; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; }; name = Distribution; }; FA5326C618971A0900F7BBF4 /* Distribution */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "c++17"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEPLOYMENT_POSTPROCESSING = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; FRAMEWORK_SEARCH_PATHS = ""; GCC_INPUT_FILETYPE = automatic; GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 3; GCC_PREPROCESSOR_DEFINITIONS = LOVE_APPLE_USE_FRAMEWORKS; GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = NO; GCC_WARN_64_TO_32_BIT_CONVERSION = NO; GCC_WARN_ABOUT_MISSING_NEWLINE = NO; GCC_WARN_ABOUT_MISSING_PROTOTYPES = NO; GCC_WARN_ABOUT_POINTER_SIGNEDNESS = YES; GCC_WARN_ABOUT_RETURN_TYPE = NO; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO; GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS = NO; GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = NO; GCC_WARN_MISSING_PARENTHESES = NO; GCC_WARN_NON_VIRTUAL_DESTRUCTOR = NO; GCC_WARN_PEDANTIC = NO; GCC_WARN_SHADOW = NO; GCC_WARN_SIGN_COMPARE = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = NO; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_PARAMETER = NO; GCC_WARN_UNUSED_VALUE = NO; GCC_WARN_UNUSED_VARIABLE = YES; HEADER_SEARCH_PATHS = ( "\"$(SRCROOT)/../../src\"", "\"$(SRCROOT)/../../src/libraries\"", "\"$(SRCROOT)/../../src/modules\"", ); INFOPLIST_FILE = "love-Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks"; LLVM_LTO = YES; MACOSX_DEPLOYMENT_TARGET = 10.15; ONLY_ACTIVE_ARCH = NO; PRODUCT_NAME = love; SCAN_ALL_SOURCE_FILES_FOR_INCLUDES = YES; SDKROOT = macosx; WARNING_CFLAGS = ( "-Wall", "-W", ); }; name = Distribution; }; FA5326C718971A0900F7BBF4 /* Distribution */ = { isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = "OS X AppIcon"; CODE_SIGN_ENTITLEMENTS = love.entitlements; CODE_SIGN_IDENTITY = ""; COMBINE_HIDPI_IMAGES = YES; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_HARDENED_RUNTIME = YES; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/macosx/Frameworks", "\"$(SRCROOT)/build/Release\"", "\"$(SRCROOT)/build/Debug\"", ); HEADER_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/macosx/Frameworks/Lua.framework/Headers", "$(PROJECT_DIR)/macosx/Frameworks/SDL2.framework/Headers", ); INFOPLIST_FILE = "macosx/love-macosx.plist"; INSTALL_PATH = /Applications; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/../Frameworks", ); MARKETING_VERSION = 12.0; PRODUCT_BUNDLE_IDENTIFIER = org.love2d.love; PRODUCT_NAME = love; }; name = Distribution; }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "love-macosx" */ = { isa = XCConfigurationList; buildConfigurations = ( C01FCF4B08A954540054247B /* Debug */, C01FCF4C08A954540054247B /* Release */, FA5326C718971A0900F7BBF4 /* Distribution */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; C01FCF4E08A954540054247B /* Build configuration list for PBXProject "love" */ = { isa = XCConfigurationList; buildConfigurations = ( C01FCF4F08A954540054247B /* Debug */, C01FCF5008A954540054247B /* Release */, FA5326C618971A0900F7BBF4 /* Distribution */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; FA0B7F2E1A95AAF4000E1D17 /* Build configuration list for PBXNativeTarget "love-ios" */ = { isa = XCConfigurationList; buildConfigurations = ( FA0B7F261A95AAF4000E1D17 /* Debug */, FA0B7F271A95AAF4000E1D17 /* Release */, FA0B7F281A95AAF4000E1D17 /* Distribution */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; /* End XCConfigurationList section */ }; rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; } ================================================ FILE: platform/xcode/love.xcodeproj/project.xcworkspace/contents.xcworkspacedata ================================================ ================================================ FILE: platform/xcode/love.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist ================================================ IDEDidComputeMac32BitWarning ================================================ FILE: platform/xcode/love.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings ================================================ ================================================ FILE: platform/xcode/macosx/liblove-macosx.plist ================================================ CFBundleDevelopmentRegion English CFBundleExecutable ${EXECUTABLE_NAME} CFBundleIconFile CFBundleIdentifier $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName LÖVE CFBundlePackageType FMWK CFBundleShortVersionString 12.0 CFBundleSignature LoVe NSPrincipalClass ================================================ FILE: platform/xcode/macosx/love-macosx.plist ================================================ CFBundleDevelopmentRegion English CFBundleDocumentTypes CFBundleTypeExtensions love CFBundleTypeIconFile GameIcon CFBundleTypeName LÖVE Project CFBundleTypeRole Viewer LSHandlerRank Owner LSItemContentTypes org.love2d.love-game LSTypeIsPackage 1 CFBundleTypeName Folder CFBundleTypeOSTypes fold CFBundleTypeRole Viewer LSHandlerRank None CFBundleTypeIconFile Document CFBundleTypeName Document CFBundleTypeOSTypes **** CFBundleTypeRole Editor CFBundleExecutable love CFBundleIdentifier $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName LÖVE CFBundlePackageType APPL CFBundleShortVersionString $(MARKETING_VERSION) CFBundleSignature LoVe LSApplicationCategoryType public.app-category.games NSHighResolutionCapable NSHumanReadableCopyright © 2006-2024 LÖVE Development Team NSPrincipalClass NSApplication NSSupportsAutomaticGraphicsSwitching UTExportedTypeDeclarations UTTypeConformsTo com.pkware.zip-archive com.apple.package UTTypeDescription LÖVE Project UTTypeIconFile GameIcon UTTypeIdentifier org.love2d.love-game UTTypeReferenceURL http://love2d.org/wiki/Game_Distribution UTTypeTagSpecification com.apple.ostype LOVE public.filename-extension love public.mime-type application/x-love-game ================================================ FILE: platform/xcode/macosx/macos-copy-app.plist ================================================ method mac-application ================================================ FILE: readme-iOS.rtf ================================================ {\rtf1\ansi\ansicpg1252\cocoartf2818 \cocoatextscaling0\cocoaplatform0{\fonttbl\f0\fswiss\fcharset0 Helvetica-Bold;\f1\fswiss\fcharset0 Helvetica;\f2\fnil\fcharset0 Monaco; \f3\fnil\fcharset0 LucidaGrande;} {\colortbl;\red255\green255\blue255;} {\*\expandedcolortbl;;} {\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1} {\list\listtemplateid2\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid101\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid2} {\list\listtemplateid3\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid201\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid3} {\list\listtemplateid4\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid301\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid4} {\list\listtemplateid5\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid401\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid5} {\list\listtemplateid6\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid501\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid6}} {\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}{\listoverride\listid2\listoverridecount0\ls2}{\listoverride\listid3\listoverridecount0\ls3}{\listoverride\listid4\listoverridecount0\ls4}{\listoverride\listid5\listoverridecount0\ls5}{\listoverride\listid6\listoverridecount0\ls6}} \margl1440\margr1440\vieww14040\viewh10200\viewkind0 \pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0 \f0\b\fs36 \cf0 Building L\'d6VE for iOS \f1\b0\fs24 \ \ In order to run L\'d6VE for iOS, it must first be compiled and installed. To do that, you\'92ll need macOS and {\field{\*\fldinst{HYPERLINK "https://developer.apple.com/xcode/"}}{\fldrslt Xcode}}.\ \ \pard\tx220\tx720\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\li720\fi-720\pardirnatural\partightenfactor0 \ls1\ilvl0\cf0 {\listtext \uc0\u8226 }If the \f2\fs22 include \f1\fs24 and \f2\fs22 libraries \f1\fs24 folders are not present in the \f2\fs22 love/platform/xcode/ios \f1\fs24 folder and there\'92s no l \f2\fs22 ove/platform/xcode/shared/ \f1\fs24 folder, {\field{\*\fldinst{HYPERLINK "https://bitbucket.org/rude/love/downloads/love-0.10.0-ios-libraries.zip"}}{\fldrslt download them}} and place them there. They contain the third-party library dependencies used by L\'d6VE.\ \pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0 \cf0 \ \pard\tx220\tx720\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\li720\fi-720\pardirnatural\partightenfactor0 \ls2\ilvl0\cf0 {\listtext \uc0\u8226 }Open the Xcode project found at \f2\fs22 love/platform/xcode/love.xcodeproj \f1\fs24 , and select the \'93love-ios\'94 target in the dropdown menu at the top of the window.\ \pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0 \cf0 \ \pard\tx220\tx720\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\li720\fi-720\pardirnatural\partightenfactor0 \ls3\ilvl0\cf0 {\listtext \uc0\u8226 }You may want to change the Build Configuration from Debug to Release mode for better runtime performance, by opening the \'93Edit Scheme\'85\'94 menu from the same dropdown selection.\ \pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0 \cf0 \ \pard\tx220\tx720\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\li720\fi-720\pardirnatural\partightenfactor0 \ls4\ilvl0\cf0 {\listtext \uc0\u8226 }Choose either an iOS Simulator device or your plugged-in iOS device from the dropdown selection to the right of the previous one, and click the Build-and-Run \f3 \uc0\u9654 \u65038 \f1 button to the left, which will install and run L\'d6VE on the target device after compiling it.\ \pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0 \cf0 \ \pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0 \f0\b\fs36 \cf0 Running Games on iOS \f1\b0\fs24 \ \ L\'d6VE on iOS includes a simple list interface of games that are installed (until you {\field{\*\fldinst{HYPERLINK "https://love2d.org/wiki/Game_Distribution"}}{\fldrslt fuse}} a .love to it for distribution.)\ \ \pard\tx220\tx720\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\li720\fi-720\pardirnatural\partightenfactor0 \ls5\ilvl0\cf0 {\listtext \uc0\u8226 }To put a .love file on the iOS Simulator after L\'d6VE is installed, drag the file onto the iOS Simulator\'92s window while it\'92s open. L\'d6VE will launch if it\'92s not running already. If another game is currently active you may need to quit L\'d6VE for the new game to show up (press Shift-Command-H twice to open the App Switcher menu on the iOS Simulator.)\ \pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0 \cf0 \ \pard\tx220\tx720\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\li720\fi-720\pardirnatural\partightenfactor0 \ls6\ilvl0\cf0 {\listtext \uc0\u8226 }To put a .love file or game folder on your iOS device after L\'d6VE is installed, you can either download it with the Safari, or transfer it from your computer through iTunes when your device is connected: open iTunes, go to the iOS device which has L\'d6VE installed, go to the \'91Apps\'92 section and scroll down and find L\'d6VE, and add the .love file or game folder to L\'d6VE\'92s Documents section.\ \pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0 \cf0 \ \pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0 \f0\b\fs36 \cf0 Distributing a Game on iOS \f1\b0\fs24 \ \ Refer to the {\field{\*\fldinst{HYPERLINK "https://love2d.org/wiki/Game_Distribution#iOS"}}{\fldrslt Game Distribution}} L\'d6VE wiki page.\ } ================================================ FILE: readme.md ================================================ LÖVE is an *awesome* framework you can use to make 2D games in Lua. It's free, open-source, and works on Windows, macOS, Linux, Android, and iOS. [![Build Status: Github CI](https://github.com/love2d/love/workflows/continuous-integration/badge.svg)](https://github.com/love2d/love/actions?query=workflow%3Acontinuous-integration) Documentation ------------- We use our [wiki][wiki] for documentation. If you need further help, feel free to ask on our [forums][forums], our [Discord server][discord], or our [subreddit][subreddit]. Repository ---------- We use the 'main' branch for development of the next major release, and therefore it should not be considered stable. There are also branches for currently released major versions, which may have fixes and changes meant for upcoming patch releases within that major version. We tag all our releases (since we started using mercurial and git), and have binary downloads available for them. Experimental changes are sometimes developed in a separate [love-experiments][love-experiments] repository. Builds ------ Files for releases are in the [releases][releases] section on GitHub. [The site][site] has links to files and additional platform content for the latest release. There are also unstable/nightly builds: - Builds for some platforms are automatically created after each commit and are available through GitHub's CI interfaces. - For ubuntu linux they are in [ppa:bartbes/love-unstable][unstableppa] - For arch linux there's [love-git][aur] in the AUR. Test Suite ---------- The test suite in `testing/` covers all the LÖVE APIs, and tests them the same way developers use them. You can view current test coverage from any [action][workflows]. You can run the suite locally like you would run a normal LÖVE project, e.g.: `love testing` See the [readme][testsuite] in the testing folder for more info. Contributing ------------ The best places to contribute are through the issue tracker and the official Discord server or IRC channel. For code contributions, pull requests and patches are welcome. Be sure to read the [source code style guide][codestyle]. Changes and new features typically get discussed in the issue tracker or on Discord or the forums before a pull request is made. > [!NOTE] > Pull requests, bug reports, and other contributions made with LLM / generative AI technology will not be accepted. Compilation ----------- ### Windows Follow the instructions at the [megasource][megasource] repository page. ### *nix Because in-tree builds are not allowed, the Makefiles needs to be generated in a separate build directory. In this example, folder named `build` is used: $ cmake -B build -S. --install-prefix $PWD/prefix # this will create the directory `build/`. $ cmake --build build --target install -j$(nproc) # this will build with all cores and put the files in `prefix/`. > [!NOTE] > CMake 3.15 and earlier doesn't support `--install-prefix`. In that case, use `-DCMAKE_INSTALL_PREFIX=` instead. ### macOS Download or clone [this repository][dependencies-apple] and copy, move, or symlink the `macOS/Frameworks` subfolder into love's `platform/xcode/macosx` folder and the `shared` subfolder into love's `platform/xcode` folder. Then use the Xcode project found at `platform/xcode/love.xcodeproj` to build the `love-macosx` target. ### iOS Building for iOS requires macOS and Xcode. Download the `love-apple-dependencies` zip file corresponding to the LÖVE version being used from the [Releases page][dependencies-ios], unzip it, and place the `iOS/libraries` subfolder into love's `platform/xcode/ios` folder and the `shared` subfolder into love's `platform/xcode` folder. Or, download or clone [this repository][dependencies-apple] and copy, move, or symlink the `iOS/libraries` subfolder into love's `platform/xcode/ios` folder and the `shared` subfolder into love's `platform/xcode` folder. Then use the Xcode project found at `platform/xcode/love.xcodeproj` to build the `love-ios` target. See `readme-iOS.rtf` for more information. ### Android Visit the [Android build repository][android-repository] for build instructions. Dependencies ------------ - SDL3 - OpenGL 3.3+ / OpenGL ES 3.0+ / Vulkan / Metal - OpenAL - Lua / LuaJIT / LLVM-lua - FreeType - harfbuzz - ModPlug - Vorbisfile - Theora [site]: https://love2d.org [wiki]: https://love2d.org/wiki [forums]: https://love2d.org/forums [discord]: https://discord.gg/rhUets9 [subreddit]: https://www.reddit.com/r/love2d [dependencies-apple]: https://github.com/love2d/love-apple-dependencies [dependencies-ios]: https://github.com/love2d/love/releases [megasource]: https://github.com/love2d/megasource [unstableppa]: https://launchpad.net/~bartbes/+archive/love-unstable [aur]: https://aur.archlinux.org/packages/love-git [love-experiments]: https://github.com/slime73/love-experiments [codestyle]: https://love2d.org/wiki/Code_Style [android-repository]: https://github.com/love2d/love-android [releases]: https://github.com/love2d/love/releases [testsuite]: https://github.com/love2d/love/tree/main/testing [workflows]: https://github.com/love2d/love/actions/workflows/main.yml?query=branch%3Amain ================================================ FILE: src/.editorconfig ================================================ # Loosely based on https://love2d.org/wiki/Code_Style and other existing code. # Ref: https://learn.microsoft.com/en-us/visualstudio/ide/cpp-editorconfig-properties?view=vs-2022 root = true [*] insert_final_newline = true indent_style = tab [*.{cpp,mm,h}] cpp_space_pointer_reference_alignment = right cpp_indent_namespace_contents = false cpp_new_line_before_open_brace_namespace = new_line cpp_new_line_before_open_brace_type = new_line cpp_new_line_before_open_brace_function = new_line cpp_new_line_before_open_brace_block = new_line cpp_new_line_before_else = true cpp_space_before_function_open_parenthesis = remove cpp_space_within_parameter_list_parentheses = false cpp_space_between_empty_parameter_list_parentheses = false cpp_space_after_keywords_in_control_flow_statements = true cpp_space_within_control_flow_statement_parentheses = false ================================================ FILE: src/common/Color.h ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ #ifndef LOVE_COLOR_H #define LOVE_COLOR_H namespace love { template struct ColorT { T r; T g; T b; T a; ColorT() : r(0), g(0), b(0), a(0) {} ColorT(T r_, T g_, T b_, T a_) : r(r_), g(g_), b(b_), a(a_) {} void set(T r_, T g_, T b_, T a_) { r = r_; g = g_; b = b_; a = a_; } bool operator==(const ColorT &other) const; bool operator!=(const ColorT &other) const; ColorT operator+=(const ColorT &other); ColorT operator*=(const ColorT &other); ColorT operator*=(T s); ColorT operator/=(T s); }; template bool ColorT::operator==(const ColorT &other) const { return r == other.r && g == other.g && b == other.b && a == other.a; } template bool ColorT::operator!=(const ColorT &other) const { return !(operator==(other)); } template ColorT ColorT::operator+=(const ColorT &other) { r += other.r; g += other.g; b += other.b; a += other.a; return *this; } template ColorT ColorT::operator*=(const ColorT &other) { r *= other.r; g *= other.g; b *= other.b; a *= other.a; return *this; } template ColorT ColorT::operator*=(T s) { r *= s; g *= s; b *= s; a *= s; return *this; } template ColorT ColorT::operator/=(T s) { r /= s; g /= s; b /= s; a /= s; return *this; } template ColorT operator+(const ColorT &a, const ColorT &b) { ColorT tmp(a); return tmp += b; } template ColorT operator*(const ColorT &a, const ColorT &b) { ColorT res; res.r = a.r * b.r; res.g = a.g * b.g; res.b = a.b * b.b; res.a = a.a * b.a; return res; } template ColorT operator*(const ColorT &a, T s) { ColorT tmp(a); return tmp *= s; } template ColorT operator/(const ColorT &a, T s) { ColorT tmp(a); return tmp /= s; } typedef ColorT Color32; typedef ColorT Colorf; typedef ColorT ColorD; inline Color32 toColor32(Colorf cf) { return Color32((unsigned char) (cf.r * 255.0f), (unsigned char) (cf.g * 255.0f), (unsigned char) (cf.b * 255.0f), (unsigned char) (cf.a * 255.0f)); } inline Colorf toColorf(Color32 c) { return Colorf(c.r / 255.0f, c.g / 255.0f, c.b / 255.0f, c.a / 255.0f); } } // love #endif // LOVE_COLOR_H ================================================ FILE: src/common/Data.cpp ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ // LOVE #include "Data.h" #include "thread/threads.h" namespace love { love::Type Data::type("Data", &Object::type); Data::~Data() { delete mutex; } static void createMutex(love::thread::Mutex **mutexAddress) { *mutexAddress = love::thread::newMutex(); } love::thread::Mutex *Data::getMutex() { std::call_once(mutexCreated, createMutex, &mutex); return mutex; } } // love ================================================ FILE: src/common/Data.h ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ #ifndef LOVE_DATA_H #define LOVE_DATA_H // LOVE #include "Object.h" // C #include #include namespace love { namespace thread { class Mutex; } /** * This class is a simple abstraction over all objects which contain data. **/ class Data : public Object { public: static love::Type type; Data() {}; virtual ~Data(); /** * Creates a duplicate of Data derived class instance. **/ virtual Data *clone() const = 0; /** * Gets a pointer to the data. This pointer will obviously not * be valid if the Data object is destroyed. **/ virtual void *getData() const = 0; /** * Gets the size of the Data in bytes. **/ virtual size_t getSize() const = 0; /** * Gets the Mutex associated with this Data object. Creates it in a thread- * safe manner if necessary. **/ love::thread::Mutex *getMutex(); private: love::thread::Mutex *mutex = nullptr; std::once_flag mutexCreated; }; // Data } // love #endif // LOVE_DATA_H ================================================ FILE: src/common/EnumMap.h ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ #ifndef LOVE_ENUM_MAP_H #define LOVE_ENUM_MAP_H #include "Exception.h" namespace love { template class EnumMap { public: struct Entry { T t; U u; }; EnumMap(const Entry *entries, unsigned int size) { unsigned int n = size / sizeof(Entry); for (unsigned int i = 0; i < n; ++i) { unsigned int e_t = (unsigned int) entries[i].t; unsigned int e_u = (unsigned int) entries[i].u; if (e_t < PEAK) { values_u[e_t].v = e_u; values_u[e_t].set = true; } if (e_u < PEAK) { values_t[e_u].v = e_t; values_t[e_u].set = true; } } } bool find(T t, U &u) { if ((unsigned int) t < PEAK && values_u[(unsigned int) t].set) { u = (U) values_u[(unsigned int) t].v; return true; } return false; } bool find(U u, T &t) { if ((unsigned int) u < PEAK && values_t[(unsigned int) u].set) { t = (T) values_t[(unsigned int) u].v; return true; } return false; } private: struct Value { unsigned v; bool set; Value() : set(false) {} }; Value values_t[PEAK]; Value values_u[PEAK]; }; // EnumMap } // love #endif // LOVE_ENUM_MAP_H ================================================ FILE: src/common/Exception.cpp ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ #include "common/config.h" #include "Exception.h" #include namespace love { Exception::Exception(const char *fmt, ...) { va_list args; int size_buffer = 256, size_out; char *buffer; while (true) { buffer = new char[size_buffer]; memset(buffer, 0, size_buffer); va_start(args, fmt); size_out = vsnprintf(buffer, size_buffer, fmt, args); va_end(args); // see http://perfec.to/vsnprintf/pasprintf.c // if size_out ... // == -1 --> output was truncated // == size_buffer --> output was truncated // == size_buffer-1 --> ambiguous, /may/ have been truncated // > size_buffer --> output was truncated, and size_out // bytes would have been written if (size_out == size_buffer || size_out == -1 || size_out == size_buffer-1) size_buffer *= 2; else if (size_out > size_buffer) size_buffer = size_out + 2; // to avoid the ambiguous case else break; delete[] buffer; } message = std::string(buffer); delete[] buffer; } Exception::~Exception() throw() { } } ================================================ FILE: src/common/Exception.h ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ #ifndef LOVE_EXCEPTION_H #define LOVE_EXCEPTION_H #include #include // vararg #include // vsnprintf #include // strncpy #include namespace love { /** * A convenient vararg-enabled exception class. **/ class Exception : public std::exception { public: /** * Creates a new Exception according to printf-rules. * * See: http://www.cplusplus.com/reference/clibrary/cstdio/printf/ * * @param fmt The format string (see printf). **/ Exception(const char *fmt, ...); virtual ~Exception() throw(); /** * Returns a string containing reason for the exception. * @return A description of the exception. **/ inline virtual const char *what() const throw() { return message.c_str(); } private: std::string message; }; // Exception } // love #endif // LOVE_EXCEPTION_H ================================================ FILE: src/common/Matrix.cpp ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ #include "Matrix.h" #include "common/config.h" // STD #include // memcpy #include #if defined(LOVE_SIMD_SSE) #include #endif #if defined(LOVE_SIMD_NEON) #include #endif namespace love { // | e0 e4 e8 e12 | // | e1 e5 e9 e13 | // | e2 e6 e10 e14 | // | e3 e7 e11 e15 | // | e0 e4 e8 e12 | // | e1 e5 e9 e13 | // | e2 e6 e10 e14 | // | e3 e7 e11 e15 | void Matrix4::multiply(const Matrix4 &a, const Matrix4 &b, float t[16]) { #if defined(LOVE_SIMD_SSE) // We can't guarantee 16-bit alignment (e.g. for heap-allocated Matrix4 // objects) so we use unaligned loads and stores. __m128 col1 = _mm_loadu_ps(&a.e[0]); __m128 col2 = _mm_loadu_ps(&a.e[4]); __m128 col3 = _mm_loadu_ps(&a.e[8]); __m128 col4 = _mm_loadu_ps(&a.e[12]); for (int i = 0; i < 4; i++) { __m128 brod1 = _mm_set1_ps(b.e[4*i + 0]); __m128 brod2 = _mm_set1_ps(b.e[4*i + 1]); __m128 brod3 = _mm_set1_ps(b.e[4*i + 2]); __m128 brod4 = _mm_set1_ps(b.e[4*i + 3]); __m128 col = _mm_add_ps( _mm_add_ps(_mm_mul_ps(brod1, col1), _mm_mul_ps(brod2, col2)), _mm_add_ps(_mm_mul_ps(brod3, col3), _mm_mul_ps(brod4, col4)) ); _mm_storeu_ps(&t[4*i], col); } #elif defined(LOVE_SIMD_NEON) float32x4_t cola1 = vld1q_f32(&a.e[0]); float32x4_t cola2 = vld1q_f32(&a.e[4]); float32x4_t cola3 = vld1q_f32(&a.e[8]); float32x4_t cola4 = vld1q_f32(&a.e[12]); float32x4_t col1 = vmulq_n_f32(cola1, b.e[0]); col1 = vmlaq_n_f32(col1, cola2, b.e[1]); col1 = vmlaq_n_f32(col1, cola3, b.e[2]); col1 = vmlaq_n_f32(col1, cola4, b.e[3]); float32x4_t col2 = vmulq_n_f32(cola1, b.e[4]); col2 = vmlaq_n_f32(col2, cola2, b.e[5]); col2 = vmlaq_n_f32(col2, cola3, b.e[6]); col2 = vmlaq_n_f32(col2, cola4, b.e[7]); float32x4_t col3 = vmulq_n_f32(cola1, b.e[8]); col3 = vmlaq_n_f32(col3, cola2, b.e[9]); col3 = vmlaq_n_f32(col3, cola3, b.e[10]); col3 = vmlaq_n_f32(col3, cola4, b.e[11]); float32x4_t col4 = vmulq_n_f32(cola1, b.e[12]); col4 = vmlaq_n_f32(col4, cola2, b.e[13]); col4 = vmlaq_n_f32(col4, cola3, b.e[14]); col4 = vmlaq_n_f32(col4, cola4, b.e[15]); vst1q_f32(&t[0], col1); vst1q_f32(&t[4], col2); vst1q_f32(&t[8], col3); vst1q_f32(&t[12], col4); #else t[0] = (a.e[0]*b.e[0]) + (a.e[4]*b.e[1]) + (a.e[8]*b.e[2]) + (a.e[12]*b.e[3]); t[4] = (a.e[0]*b.e[4]) + (a.e[4]*b.e[5]) + (a.e[8]*b.e[6]) + (a.e[12]*b.e[7]); t[8] = (a.e[0]*b.e[8]) + (a.e[4]*b.e[9]) + (a.e[8]*b.e[10]) + (a.e[12]*b.e[11]); t[12] = (a.e[0]*b.e[12]) + (a.e[4]*b.e[13]) + (a.e[8]*b.e[14]) + (a.e[12]*b.e[15]); t[1] = (a.e[1]*b.e[0]) + (a.e[5]*b.e[1]) + (a.e[9]*b.e[2]) + (a.e[13]*b.e[3]); t[5] = (a.e[1]*b.e[4]) + (a.e[5]*b.e[5]) + (a.e[9]*b.e[6]) + (a.e[13]*b.e[7]); t[9] = (a.e[1]*b.e[8]) + (a.e[5]*b.e[9]) + (a.e[9]*b.e[10]) + (a.e[13]*b.e[11]); t[13] = (a.e[1]*b.e[12]) + (a.e[5]*b.e[13]) + (a.e[9]*b.e[14]) + (a.e[13]*b.e[15]); t[2] = (a.e[2]*b.e[0]) + (a.e[6]*b.e[1]) + (a.e[10]*b.e[2]) + (a.e[14]*b.e[3]); t[6] = (a.e[2]*b.e[4]) + (a.e[6]*b.e[5]) + (a.e[10]*b.e[6]) + (a.e[14]*b.e[7]); t[10] = (a.e[2]*b.e[8]) + (a.e[6]*b.e[9]) + (a.e[10]*b.e[10]) + (a.e[14]*b.e[11]); t[14] = (a.e[2]*b.e[12]) + (a.e[6]*b.e[13]) + (a.e[10]*b.e[14]) + (a.e[14]*b.e[15]); t[3] = (a.e[3]*b.e[0]) + (a.e[7]*b.e[1]) + (a.e[11]*b.e[2]) + (a.e[15]*b.e[3]); t[7] = (a.e[3]*b.e[4]) + (a.e[7]*b.e[5]) + (a.e[11]*b.e[6]) + (a.e[15]*b.e[7]); t[11] = (a.e[3]*b.e[8]) + (a.e[7]*b.e[9]) + (a.e[11]*b.e[10]) + (a.e[15]*b.e[11]); t[15] = (a.e[3]*b.e[12]) + (a.e[7]*b.e[13]) + (a.e[11]*b.e[14]) + (a.e[15]*b.e[15]); #endif } void Matrix4::multiply(const Matrix4 &a, const Matrix4 &b, Matrix4 &t) { multiply(a, b, t.e); } // | e0 e4 e8 e12 | // | e1 e5 e9 e13 | // | e2 e6 e10 e14 | // | e3 e7 e11 e15 | Matrix4::Matrix4() { setIdentity(); } Matrix4::Matrix4(const float elements[16]) { memcpy(e, elements, sizeof(float) * 16); } Matrix4::Matrix4(float t00, float t10, float t01, float t11, float x, float y) { setRawTransformation(t00, t10, t01, t11, x, y); } Matrix4::Matrix4(const Matrix4 &a, const Matrix4 &b) { multiply(a, b, e); } Matrix4::Matrix4(float x, float y, float angle, float sx, float sy, float ox, float oy, float kx, float ky) { setTransformation(x, y, angle, sx, sy, ox, oy, kx, ky); } Matrix4 Matrix4::operator * (const Matrix4 &m) const { return Matrix4(*this, m); } void Matrix4::operator *= (const Matrix4 &m) { float t[16]; multiply(*this, m, t); memcpy(this->e, t, sizeof(float)*16); } const float *Matrix4::getElements() const { return e; } void Matrix4::setRow(int r, const Vector4 &v) { e[0 * 4 + r] = v.x; e[1 * 4 + r] = v.y; e[2 * 4 + r] = v.z; e[3 * 4 + r] = v.w; } Vector4 Matrix4::getRow(int r) const { return Vector4(e[0 * 4 + r], e[1 * 4 + r], e[2 * 4 + r], e[3 * 4 + r]); } void Matrix4::setColumn(int c, const Vector4 &v) { e[c * 4 + 0] = v.x; e[c * 4 + 1] = v.y; e[c * 4 + 2] = v.z; e[c * 4 + 3] = v.w; } Vector4 Matrix4::getColumn(int c) const { return Vector4(e[c * 4 + 0], e[c * 4 + 1], e[c * 4 + 2], e[c * 4 + 3]); } void Matrix4::setIdentity() { memset(e, 0, sizeof(float)*16); e[15] = e[10] = e[5] = e[0] = 1; } void Matrix4::setTranslation(float x, float y) { setIdentity(); e[12] = x; e[13] = y; } void Matrix4::setRotation(float rad) { setIdentity(); float c = cosf(rad), s = sinf(rad); e[0] = c; e[4] = -s; e[1] = s; e[5] = c; } void Matrix4::setScale(float sx, float sy) { setIdentity(); e[0] = sx; e[5] = sy; } void Matrix4::setShear(float kx, float ky) { setIdentity(); e[1] = ky; e[4] = kx; } void Matrix4::getApproximateScale(float &sx, float &sy) const { sx = sqrtf(e[0] * e[0] + e[4] * e[4]); sy = sqrtf(e[1] * e[1] + e[5] * e[5]); } void Matrix4::setRawTransformation(float t00, float t10, float t01, float t11, float x, float y) { memset(e, 0, sizeof(float)*16); // zero out matrix e[10] = e[15] = 1.0f; e[0] = t00; e[1] = t10; e[4] = t01; e[5] = t11; e[12] = x; e[13] = y; } void Matrix4::setTransformation(float x, float y, float angle, float sx, float sy, float ox, float oy, float kx, float ky) { memset(e, 0, sizeof(float)*16); // zero out matrix float c = cosf(angle), s = sinf(angle); // matrix multiplication carried out on paper: // |1 x| |c -s | |sx | | 1 ky | |1 -ox| // | 1 y| |s c | | sy | |kx 1 | | 1 -oy| // | 1 | | 1 | | 1 | | 1 | | 1 | // | 1| | 1| | 1| | 1| | 1 | // move rotate scale skew origin e[10] = e[15] = 1.0f; e[0] = c * sx - ky * s * sy; // = a e[1] = s * sx + ky * c * sy; // = b e[4] = kx * c * sx - s * sy; // = c e[5] = kx * s * sx + c * sy; // = d e[12] = x - ox * e[0] - oy * e[4]; e[13] = y - ox * e[1] - oy * e[5]; } void Matrix4::translate(float x, float y) { Matrix4 t; t.setTranslation(x, y); this->operator *=(t); } void Matrix4::rotate(float rad) { Matrix4 t; t.setRotation(rad); this->operator *=(t); } void Matrix4::scale(float sx, float sy) { Matrix4 t; t.setScale(sx, sy); this->operator *=(t); } void Matrix4::shear(float kx, float ky) { Matrix4 t; t.setShear(kx,ky); this->operator *=(t); } bool Matrix4::isAffine2DTransform() const { return fabsf(e[2] + e[3] + e[6] + e[7] + e[8] + e[9] + e[11] + e[14]) < 0.00001f && fabsf(e[10] + e[15] - 2.0f) < 0.00001f; } Matrix4 Matrix4::inverse() const { Matrix4 inv; inv.e[0] = e[5] * e[10] * e[15] - e[5] * e[11] * e[14] - e[9] * e[6] * e[15] + e[9] * e[7] * e[14] + e[13] * e[6] * e[11] - e[13] * e[7] * e[10]; inv.e[4] = -e[4] * e[10] * e[15] + e[4] * e[11] * e[14] + e[8] * e[6] * e[15] - e[8] * e[7] * e[14] - e[12] * e[6] * e[11] + e[12] * e[7] * e[10]; inv.e[8] = e[4] * e[9] * e[15] - e[4] * e[11] * e[13] - e[8] * e[5] * e[15] + e[8] * e[7] * e[13] + e[12] * e[5] * e[11] - e[12] * e[7] * e[9]; inv.e[12] = -e[4] * e[9] * e[14] + e[4] * e[10] * e[13] + e[8] * e[5] * e[14] - e[8] * e[6] * e[13] - e[12] * e[5] * e[10] + e[12] * e[6] * e[9]; inv.e[1] = -e[1] * e[10] * e[15] + e[1] * e[11] * e[14] + e[9] * e[2] * e[15] - e[9] * e[3] * e[14] - e[13] * e[2] * e[11] + e[13] * e[3] * e[10]; inv.e[5] = e[0] * e[10] * e[15] - e[0] * e[11] * e[14] - e[8] * e[2] * e[15] + e[8] * e[3] * e[14] + e[12] * e[2] * e[11] - e[12] * e[3] * e[10]; inv.e[9] = -e[0] * e[9] * e[15] + e[0] * e[11] * e[13] + e[8] * e[1] * e[15] - e[8] * e[3] * e[13] - e[12] * e[1] * e[11] + e[12] * e[3] * e[9]; inv.e[13] = e[0] * e[9] * e[14] - e[0] * e[10] * e[13] - e[8] * e[1] * e[14] + e[8] * e[2] * e[13] + e[12] * e[1] * e[10] - e[12] * e[2] * e[9]; inv.e[2] = e[1] * e[6] * e[15] - e[1] * e[7] * e[14] - e[5] * e[2] * e[15] + e[5] * e[3] * e[14] + e[13] * e[2] * e[7] - e[13] * e[3] * e[6]; inv.e[6] = -e[0] * e[6] * e[15] + e[0] * e[7] * e[14] + e[4] * e[2] * e[15] - e[4] * e[3] * e[14] - e[12] * e[2] * e[7] + e[12] * e[3] * e[6]; inv.e[10] = e[0] * e[5] * e[15] - e[0] * e[7] * e[13] - e[4] * e[1] * e[15] + e[4] * e[3] * e[13] + e[12] * e[1] * e[7] - e[12] * e[3] * e[5]; inv.e[14] = -e[0] * e[5] * e[14] + e[0] * e[6] * e[13] + e[4] * e[1] * e[14] - e[4] * e[2] * e[13] - e[12] * e[1] * e[6] + e[12] * e[2] * e[5]; inv.e[3] = -e[1] * e[6] * e[11] + e[1] * e[7] * e[10] + e[5] * e[2] * e[11] - e[5] * e[3] * e[10] - e[9] * e[2] * e[7] + e[9] * e[3] * e[6]; inv.e[7] = e[0] * e[6] * e[11] - e[0] * e[7] * e[10] - e[4] * e[2] * e[11] + e[4] * e[3] * e[10] + e[8] * e[2] * e[7] - e[8] * e[3] * e[6]; inv.e[11] = -e[0] * e[5] * e[11] + e[0] * e[7] * e[9] + e[4] * e[1] * e[11] - e[4] * e[3] * e[9] - e[8] * e[1] * e[7] + e[8] * e[3] * e[5]; inv.e[15] = e[0] * e[5] * e[10] - e[0] * e[6] * e[9] - e[4] * e[1] * e[10] + e[4] * e[2] * e[9] + e[8] * e[1] * e[6] - e[8] * e[2] * e[5]; float det = e[0] * inv.e[0] + e[1] * inv.e[4] + e[2] * inv.e[8] + e[3] * inv.e[12]; float invdet = 1.0f / det; for (int i = 0; i < 16; i++) inv.e[i] *= invdet; return inv; } Matrix4 Matrix4::ortho(float left, float right, float bottom, float top, float near, float far) { Matrix4 m; m.e[0] = 2.0f / (right - left); m.e[5] = 2.0f / (top - bottom); m.e[10] = -2.0f / (far - near); m.e[12] = -(right + left) / (right - left); m.e[13] = -(top + bottom) / (top - bottom); m.e[14] = -(far + near) / (far - near); return m; } Matrix4 Matrix4::perspective(float verticalfov, float aspect, float near, float far) { Matrix4 m; float cotangent = 1.0f / tanf(verticalfov * 0.5f); m.e[0] = cotangent / aspect; m.e[5] = cotangent; m.e[10] = (far + near) / (near - far); m.e[11] = -1.0f; m.e[14] = 2.0f * near * far / (near - far); m.e[15] = 0.0f; return m; } /** * | e0 e3 e6 | * | e1 e4 e7 | * | e2 e5 e8 | **/ Matrix3::Matrix3() { setIdentity(); } Matrix3::Matrix3(const Matrix4 &mat4) { const float *mat4elems = mat4.getElements(); // Column 0. e[0] = mat4elems[0]; e[1] = mat4elems[1]; e[2] = mat4elems[2]; // Column 1. e[3] = mat4elems[4]; e[4] = mat4elems[5]; e[5] = mat4elems[6]; // Column 2. e[6] = mat4elems[8]; e[7] = mat4elems[9]; e[8] = mat4elems[10]; } Matrix3::Matrix3(float x, float y, float angle, float sx, float sy, float ox, float oy, float kx, float ky) { setTransformation(x, y, angle, sx, sy, ox, oy, kx, ky); } Matrix3::~Matrix3() { } void Matrix3::setIdentity() { memset(e, 0, sizeof(float) * 9); e[8] = e[4] = e[0] = 1.0f; } Matrix3 Matrix3::operator * (const love::Matrix3 &m) const { Matrix3 t; t.e[0] = (e[0]*m.e[0]) + (e[3]*m.e[1]) + (e[6]*m.e[2]); t.e[3] = (e[0]*m.e[3]) + (e[3]*m.e[4]) + (e[6]*m.e[5]); t.e[6] = (e[0]*m.e[6]) + (e[3]*m.e[7]) + (e[6]*m.e[8]); t.e[1] = (e[1]*m.e[0]) + (e[4]*m.e[1]) + (e[7]*m.e[2]); t.e[4] = (e[1]*m.e[3]) + (e[4]*m.e[4]) + (e[7]*m.e[5]); t.e[7] = (e[1]*m.e[6]) + (e[4]*m.e[7]) + (e[7]*m.e[8]); t.e[2] = (e[2]*m.e[0]) + (e[5]*m.e[1]) + (e[8]*m.e[2]); t.e[5] = (e[2]*m.e[3]) + (e[5]*m.e[4]) + (e[8]*m.e[5]); t.e[8] = (e[2]*m.e[6]) + (e[5]*m.e[7]) + (e[8]*m.e[8]); return t; } void Matrix3::operator *= (const Matrix3 &m) { Matrix3 t = (*this) * m; memcpy(e, t.e, sizeof(float) * 9); } const float *Matrix3::getElements() const { return e; } Matrix3 Matrix3::transposedInverse() const { // e0 e3 e6 // e1 e4 e7 // e2 e5 e8 float det = e[0] * (e[4]*e[8] - e[7]*e[5]) - e[1] * (e[3]*e[8] - e[5]*e[6]) + e[2] * (e[3]*e[7] - e[4]*e[6]); float invdet = 1.0f / det; Matrix3 m; m.e[0] = invdet * (e[4]*e[8] - e[7]*e[5]); m.e[3] = -invdet * (e[1]*e[8] - e[2]*e[7]); m.e[6] = invdet * (e[1]*e[5] - e[2]*e[4]); m.e[1] = -invdet * (e[3]*e[8] - e[5]*e[6]); m.e[4] = invdet * (e[0]*e[8] - e[2]*e[6]); m.e[7] = -invdet * (e[0]*e[5] - e[3]*e[2]); m.e[2] = invdet * (e[3]*e[7] - e[6]*e[4]); m.e[5] = -invdet * (e[0]*e[7] - e[6]*e[1]); m.e[8] = invdet * (e[0]*e[4] - e[3]*e[1]); return m; } void Matrix3::setTransformation(float x, float y, float angle, float sx, float sy, float ox, float oy, float kx, float ky) { float c = cosf(angle), s = sinf(angle); // matrix multiplication carried out on paper: // |1 x| |c -s | |sx | | 1 ky | |1 -ox| // | 1 y| |s c | | sy | |kx 1 | | 1 -oy| // | 1| | 1| | 1| | 1| | 1 | // move rotate scale skew origin e[0] = c * sx - ky * s * sy; // = a e[1] = s * sx + ky * c * sy; // = b e[3] = kx * c * sx - s * sy; // = c e[4] = kx * s * sx + c * sy; // = d e[6] = x - ox * e[0] - oy * e[3]; e[7] = y - ox * e[1] - oy * e[4]; e[2] = e[5] = 0.0f; e[8] = 1.0f; } } // love ================================================ FILE: src/common/Matrix.h ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ #ifndef LOVE_MATRIX_H #define LOVE_MATRIX_H // LOVE #include "math.h" #include "Vector.h" namespace love { /** * This class is the basis for all transformations in LOVE. Although not really * needed for 2D, it contains 4x4 elements to be compatible with OpenGL without * conversions. **/ class Matrix4 { private: static void multiply(const Matrix4 &a, const Matrix4 &b, float t[16]); public: static void multiply(const Matrix4 &a, const Matrix4 &b, Matrix4 &result); /** * Creates a new identity matrix. **/ Matrix4(); /** * Creates a new matrix with the transform values set. **/ Matrix4(float t00, float t10, float t01, float t11, float x, float y); /** * Creates a new matrix from the specified elements. Be sure to pass * exactly 16 elements in! **/ Matrix4(const float elements[16]); /** * Creates a new matrix from the result of multiplying the two specified * matrices. **/ Matrix4(const Matrix4 &a, const Matrix4 &b); /** * Creates a new matrix set to a transformation. **/ Matrix4(float x, float y, float angle, float sx, float sy, float ox, float oy, float kx, float ky); /** * Multiplies this Matrix with another Matrix, changing neither. * @param m The Matrix to multiply with this Matrix. * @return The combined matrix. **/ Matrix4 operator * (const Matrix4 &m) const; /** * Multiplies a Matrix into this Matrix. * @param m The Matrix to combine into this Matrix. **/ void operator *= (const Matrix4 &m); /** * Gets a pointer to the 16 array elements. * @return The array elements. **/ const float *getElements() const; void setRow(int r, const Vector4 &v); Vector4 getRow(int r) const; void setColumn(int c, const Vector4 &v); Vector4 getColumn(int c) const; /** * Resets this Matrix to the identity matrix. **/ void setIdentity(); /** * Resets this Matrix to a translation. * @param x Translation along x-axis. * @param y Translation along y-axis. **/ void setTranslation(float x, float y); /** * Resets this Matrix to a rotation. * @param r The angle in radians. **/ void setRotation(float r); /** * Resets this Matrix to a scale transformation. * @param sx Scale factor along the x-axis. * @param sy Scale factor along the y-axis. **/ void setScale(float sx, float sy); /** * Resets this Matrix to a shear transformation. * @param kx Shear along x-axis. * @param ky Shear along y-axis. **/ void setShear(float kx, float ky); /** * Calculates the scale factors for a 2D affine transform. The output values * are absolute (not signed). **/ void getApproximateScale(float &sx, float &sy) const; /** * Sets a transformation's values directly. Useful if you want to modify them inplace, * or if you want to create a transformation that's not buildable with setTransformation() * i.e. the inverse of setTransformation() is not easily built with another call * to setTransformation() with tweaked values. * * @param t00 The sx*cos(angle) component of the transformation. * @param t10 The sx*sin(angle) component of the transformation. * @param t01 The sy*(-sin(angle)) component of the transformation. * @param t11 The sy*cos(angle) component of the transformation. * @param x The x translation component of the transformation. * @param y The y translation component of the transformation. **/ void setRawTransformation(float t00, float t10, float t01, float t11, float x, float y); /** * Creates a transformation with a certain position, orientation, scale * and offset. Perfect for Drawables -- what a coincidence! * * @param x The translation along the x-axis. * @param y The translation along the y-axis. * @param angle The rotation (rad) around the center with offset (ox,oy). * @param sx Scale along x-axis. * @param sy Scale along y-axis. * @param ox The offset for rotation along the x-axis. * @param oy The offset for rotation along the y-axis. * @param kx Shear along x-axis * @param ky Shear along y-axis **/ void setTransformation(float x, float y, float angle, float sx, float sy, float ox, float oy, float kx, float ky); /** * Multiplies this Matrix with a translation. * @param x Translation along x-axis. * @param y Translation along y-axis. **/ void translate(float x, float y); /** * Multiplies this Matrix with a rotation. * @param r Angle in radians. **/ void rotate(float r); /** * Multiplies this Matrix with a scale transformation. * @param sx Scale factor along the x-axis. * @param sy Scale factor along the y-axis. **/ void scale(float sx, float sy); /** * Multiplies this Matrix with a shear transformation. * @param kx Shear along the x-axis. * @param ky Shear along the y-axis. **/ void shear(float kx, float ky); /** * Transforms an array of 2-component vertices by this Matrix. The source * and destination arrays may be the same. **/ template void transformXY(Vdst *dst, const Vsrc *src, int size) const; /** * Transforms an array of 2-component vertices by this Matrix, and stores * them in an array of 3-component vertices. **/ template void transformXY0(Vdst *dst, const Vsrc *src, int size) const; /** * Transforms an array of 3-component vertices by this Matrix. The source * and destination arrays may be the same. **/ template void transformXYZ(Vdst *dst, const Vsrc *src, int size) const; /** * Gets whether this matrix is an affine 2D transform (if the only non- * identity elements are the upper-left 2x2 and 2 translation values in the * 4th column). **/ bool isAffine2DTransform() const; /** * Computes and returns the inverse of the matrix. **/ Matrix4 inverse() const; /** * Creates a new orthographic projection matrix. **/ static Matrix4 ortho(float left, float right, float bottom, float top, float near, float far); /** * Creates a new perspective projection matrix. **/ static Matrix4 perspective(float verticalfov, float aspect, float near, float far); private: /** * | e0 e4 e8 e12 | * | e1 e5 e9 e13 | * | e2 e6 e10 e14 | * | e3 e7 e11 e15 | **/ float e[16]; }; // Matrix4 class Matrix3 { public: Matrix3(); /** * Constructs a 3x3 matrix from the upper left section of a 4x4 matrix. **/ Matrix3(const Matrix4 &mat4); /** * Creates a new matrix set to a transformation. **/ Matrix3(float x, float y, float angle, float sx, float sy, float ox, float oy, float kx, float ky); ~Matrix3(); /** * Resets this matrix to the identity matrix. **/ void setIdentity(); Matrix3 operator * (const Matrix3 &m) const; void operator *= (const Matrix3 &m); /** * Gets a pointer to the 9 array elements. **/ const float *getElements() const; /** * Calculates the inverse of the transpose of this matrix. **/ Matrix3 transposedInverse() const; /** * Creates a transformation with a certain position, orientation, scale * and offset. * * @param x The translation along the x-axis. * @param y The translation along the y-axis. * @param angle The rotation (rad) around the center with offset (ox,oy). * @param sx Scale along x-axis. * @param sy Scale along y-axis. * @param ox The offset for rotation along the x-axis. * @param oy The offset for rotation along the y-axis. * @param kx Shear along x-axis * @param ky Shear along y-axis **/ void setTransformation(float x, float y, float angle, float sx, float sy, float ox, float oy, float kx, float ky); /** * Transforms an array of vertices by this matrix. **/ template void transformXY(Vdst *dst, const Vsrc *src, int size) const; private: /** * | e0 e3 e6 * | e1 e4 e7 * | e2 e5 e8 **/ float e[9]; }; // Matrix3 // | x | // | y | // | 0 | // | 1 | // | e0 e4 e8 e12 | // | e1 e5 e9 e13 | // | e2 e6 e10 e14 | // | e3 e7 e11 e15 | template void Matrix4::transformXY(Vdst *dst, const Vsrc *src, int size) const { for (int i = 0; i < size; i++) { // Store in temp variables in case src = dst float x = (e[0]*src[i].x) + (e[4]*src[i].y) + (0) + (e[12]); float y = (e[1]*src[i].x) + (e[5]*src[i].y) + (0) + (e[13]); dst[i].x = x; dst[i].y = y; } } template void Matrix4::transformXY0(Vdst *dst, const Vsrc *src, int size) const { for (int i = 0; i < size; i++) { // Store in temp variables in case src = dst float x = (e[0]*src[i].x) + (e[4]*src[i].y) + (0) + (e[12]); float y = (e[1]*src[i].x) + (e[5]*src[i].y) + (0) + (e[13]); float z = (e[2]*src[i].x) + (e[6]*src[i].y) + (0) + (e[14]); dst[i].x = x; dst[i].y = y; dst[i].z = z; } } // | x | // | y | // | z | // | 1 | // | e0 e4 e8 e12 | // | e1 e5 e9 e13 | // | e2 e6 e10 e14 | // | e3 e7 e11 e15 | template void Matrix4::transformXYZ(Vdst *dst, const Vsrc *src, int size) const { for (int i = 0; i < size; i++) { // Store in temp variables in case src = dst float x = (e[0]*src[i].x) + (e[4]*src[i].y) + (e[ 8]*src[i].z) + (e[12]); float y = (e[1]*src[i].x) + (e[5]*src[i].y) + (e[ 9]*src[i].z) + (e[13]); float z = (e[2]*src[i].x) + (e[6]*src[i].y) + (e[10]*src[i].z) + (e[14]); dst[i].x = x; dst[i].y = y; dst[i].z = z; } } // | x | // | y | // | 1 | // | e0 e3 e6 | // | e1 e4 e7 | // | e2 e5 e8 | template void Matrix3::transformXY(Vdst *dst, const Vsrc *src, int size) const { for (int i = 0; i < size; i++) { float x = (e[0]*src[i].x) + (e[3]*src[i].y) + (e[6]); float y = (e[1]*src[i].x) + (e[4]*src[i].y) + (e[7]); dst[i].x = x; dst[i].y = y; } } } //love #endif// LOVE_MATRIX_H ================================================ FILE: src/common/Module.cpp ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ // LOVE #include "Module.h" #include "Exception.h" #include "deprecation.h" // std #include #include #include namespace { typedef std::map ModuleRegistry; // The registry must be dynamically managed, because some modules // (the math module) are static globals that are not guaranteed to // be destroyed before other static globals. ModuleRegistry *registry = nullptr; ModuleRegistry ®istryInstance() { if (!registry) registry = new ModuleRegistry; return *registry; } void freeEmptyRegistry() { if (registry && registry->empty()) { delete registry; registry = nullptr; } } } // anonymous namespace namespace love { love::Type Module::type("Module", &Object::type); Module *Module::instances[] = {}; Module::Module(Module::ModuleType moduleType, const char *name) : moduleType(moduleType) , name(name) { initDeprecation(); registerInstance(this); } Module::~Module() { ModuleRegistry ®istry = registryInstance(); // We can't use the overridden Module::getName() in this destructor. for (auto it = registry.begin(); it != registry.end(); ++it) { if (it->second == this) { registry.erase(it); break; } } // Same deal with Module::getModuleType(). for (int i = 0; i < (int) M_MAX_ENUM; i++) { if (instances[i] == this) instances[i] = nullptr; } freeEmptyRegistry(); deinitDeprecation(); } void Module::registerInstance(Module *instance) { if (instance == nullptr) throw Exception("Module instance is null"); std::string name(instance->getName()); ModuleRegistry ®istry = registryInstance(); auto it = registry.find(name); if (it != registry.end()) { if (it->second == instance) return; throw Exception("Module %s already registered!", instance->getName()); } registry.insert(make_pair(name, instance)); ModuleType mtype = instance->getModuleType(); if (mtype != M_UNKNOWN) { if (instances[mtype] != nullptr) { printf("Warning: overwriting module instance %s with new instance %s\n", instances[mtype]->getName(), instance->getName()); } instances[mtype] = instance; } } Module *Module::getInstance(const std::string &name) { ModuleRegistry ®istry = registryInstance(); auto it = registry.find(name); if (registry.end() == it) return nullptr; return it->second; } } // love ================================================ FILE: src/common/Module.h ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ #ifndef LOVE_MODULE_H #define LOVE_MODULE_H // LOVE #include "Exception.h" #include "Object.h" namespace love { /** * Abstract superclass for all modules. **/ class Module : public Object { public: static love::Type type; enum ModuleType { M_UNKNOWN = -1, // Use this for modules outside of LOVE's source code. M_AUDIO, M_DATA, M_EVENT, M_FILESYSTEM, M_FONT, M_GRAPHICS, M_IMAGE, M_JOYSTICK, M_KEYBOARD, M_MATH, M_MOUSE, M_PHYSICS, M_SENSOR, M_SOUND, M_SYSTEM, M_THREAD, M_TIMER, M_TOUCH, M_VIDEO, M_WINDOW, M_MAX_ENUM }; Module(ModuleType moduleType, const char *name); virtual ~Module(); /** * Gets the base type of the module. **/ ModuleType getModuleType() const { return moduleType; } /** * Gets the name of the module. This is used in case of errors * and other messages. * * @return The full name of the module, eg. love.graphics.opengl. **/ const char *getName() const { return name.c_str(); } /** * Retrieve module instance from internal registry. May return NULL * if module not registered. * @param name The full name of the module. * @return Module instance or NULL if the module is not registered. */ static Module *getInstance(const std::string &name); /** * Retrieve module instance from the internal registry using the base * module type. May return null if the module is not registered. * @param type The base type of the module. **/ template static T *getInstance(ModuleType type) { return type != M_UNKNOWN ? (T *) instances[type] : nullptr; } private: static void registerInstance(Module *instance); ModuleType moduleType; std::string name; static Module *instances[M_MAX_ENUM]; }; // Module } // love #endif // LOVE_MODULE_H ================================================ FILE: src/common/Object.cpp ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ // LOVE #include "Object.h" namespace love { love::Type Object::type("Object", nullptr); Object::Object() : count(1) { } Object::Object(const Object & /*other*/) : count(1) // Always start with a reference count of 1. { } Object::~Object() { } int Object::getReferenceCount() const { return count; } void Object::retain() { count.fetch_add(1, std::memory_order_relaxed); } void Object::release() { // http://www.boost.org/doc/libs/1_56_0/doc/html/atomic/usage_examples.html if (count.fetch_sub(1, std::memory_order_release) == 1) { std::atomic_thread_fence(std::memory_order_acquire); delete this; } } } // love ================================================ FILE: src/common/Object.h ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ #ifndef LOVE_OBJECT_H #define LOVE_OBJECT_H #include #include "types.h" namespace love { /** * Superclass for all object that should be able to cross the Lua/C border * (this pertains to most objects). * * This class is an alternative to using smart pointers; it contains retain/release * methods, and will delete itself with the reference count hits zero. The wrapper * code assumes that all userdata inherits from this class. **/ class Object { public: static love::Type type; /** * Constructor. Sets reference count to one. **/ Object(); Object(const Object &other); /** * Destructor. **/ virtual ~Object() = 0; /** * Gets the reference count of this Object. * @returns The reference count. **/ int getReferenceCount() const; /** * Retains the Object, i.e. increases the * reference count by one. **/ void retain(); /** * Releases one reference to the Object, i.e. decrements the * reference count by one, and potentially deletes the Object * if there are no more references. **/ void release(); private: // The reference count. std::atomic count; }; // Object /** * Structure wrapping an object and its associated Type instance. This is used * for storing everything necessary to identify an object's properties in * environments where the Type is not easily obtained otherwise, for example in * a Lua state. **/ struct Proxy { // Holds type information (see types.h). love::Type *type; // Pointer to the actual object. Object *object; }; enum class Acquire { RETAIN, NORETAIN, }; template class StrongRef { public: StrongRef() : object(nullptr) { } StrongRef(T *obj, Acquire acquire = Acquire::RETAIN) : object(obj) { if (object && acquire == Acquire::RETAIN) object->retain(); } StrongRef(const StrongRef &other) : object(other.get()) { if (object) object->retain(); } StrongRef(StrongRef &&other) : object(other.object) { other.object = nullptr; } ~StrongRef() { if (object) object->release(); } StrongRef &operator = (const StrongRef &other) { set(other.get()); return *this; } T *operator->() const { return object; } explicit operator bool() const { return object != nullptr; } operator T*() const { return object; } void set(T *obj, Acquire acquire = Acquire::RETAIN) { if (obj && acquire == Acquire::RETAIN) obj->retain(); if (object) object->release(); object = obj; } T *get() const { return object; } private: T *object; }; // StrongRef } // love #endif // LOVE_OBJECT_H ================================================ FILE: src/common/Optional.h ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ #pragma once namespace love { // Currently only meant for simple and small types. template struct Optional { T value; bool hasValue; Optional() : value(T()) , hasValue(false) {} Optional(T val) : value(val) , hasValue(true) {} void set(T val) { value = val; hasValue = true; } T get(T defaultVal) const { return hasValue ? value : defaultVal; } void clear() { hasValue = false; } }; typedef Optional OptionalBool; typedef Optional OptionalFloat; typedef Optional OptionalDouble; typedef Optional OptionalInt; } // love ================================================ FILE: src/common/Range.h ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ #pragma once #include #include #include namespace love { struct Range { size_t first; size_t last; Range() : first(std::numeric_limits::max()) , last(0) {} Range(size_t offset, size_t size) : first(offset) , last(offset + size - 1) {} bool isValid() const { return first <= last; } void invalidate() { first = std::numeric_limits::max(); last = 0; } size_t getMin() const { return first; } size_t getMax() const { return last; } size_t getOffset() const { return first; } size_t getSize() const { return (last - first) + 1; } bool contains(const Range &other) const { return first <= other.first && last >= other.last; } bool intersects(const Range &other) const { return !(first > other.last || last < other.first); } void intersect(const Range &other) { first = std::max(first, other.first); last = std::min(last, other.last); } void encapsulate(size_t index) { first = std::min(first, index); last = std::max(last, index); } void encapsulate(size_t offset, size_t size) { first = std::min(first, offset); last = std::max(last, offset + size - 1); } void encapsulate(const Range &other) { first = std::min(first, other.first); last = std::max(last, other.last); } }; } // love ================================================ FILE: src/common/Reference.cpp ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ #include "Reference.h" #include "runtime.h" namespace love { const char REFERENCE_TABLE_NAME[] = "love-references"; Reference::Reference() : pinnedL(nullptr) , idx(LUA_REFNIL) { } Reference::Reference(lua_State *L) : pinnedL(nullptr) , idx(LUA_REFNIL) { ref(L); } Reference::~Reference() { unref(); } void Reference::ref(lua_State *L) { unref(); // Previously created reference needs to be cleared pinnedL = luax_getpinnedthread(L); luax_insist(L, LUA_REGISTRYINDEX, REFERENCE_TABLE_NAME); lua_insert(L, -2); // Move reference table behind value. idx = luaL_ref(L, -2); lua_pop(L, 1); } void Reference::unref() { if (idx != LUA_REFNIL) { // We use a pinned thread/coroutine for the Lua state because we know it // hasn't been garbage collected and is valid, as long as the whole lua // state is still open. luax_insist(pinnedL, LUA_REGISTRYINDEX, REFERENCE_TABLE_NAME); luaL_unref(pinnedL, -1, idx); lua_pop(pinnedL, 1); idx = LUA_REFNIL; } } void Reference::push(lua_State *L) { if (idx != LUA_REFNIL) { luax_insist(L, LUA_REGISTRYINDEX, REFERENCE_TABLE_NAME); lua_rawgeti(L, -1, idx); lua_remove(L, -2); } else lua_pushnil(L); } } // love ================================================ FILE: src/common/Reference.h ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ #ifndef LOVE_REFERENCE_H #define LOVE_REFERENCE_H struct lua_State; namespace love { /** * This class wraps the reference functionality built into * Lua, which allows C++ code to refer to Lua variables. **/ class Reference { public: /** * Creates the reference object, but does not create * the actual reference. **/ Reference(); /** * Creates the object and a reference to the value * on the top of the stack. **/ Reference(lua_State *L); /** * Deletes the reference, if any. **/ virtual ~Reference(); /** * Creates a reference to the value on the * top of the stack. **/ void ref(lua_State *L); /** * Unrefs the reference, if any. **/ void unref(); /** * Pushes the referred value onto the stack of the specified Lua coroutine. * NOTE: The coroutine *must* belong to the same Lua state that was used for * Reference::ref. **/ void push(lua_State *L); lua_State *getPinnedL() const { return pinnedL; } private: // A pinned coroutine (probably the main thread) belonging to the Lua state // in which the reference resides. lua_State *pinnedL; // Index to the Lua reference. int idx; }; } // love #endif // LOVE_REFERENCE_H ================================================ FILE: src/common/Stream.cpp ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ // LOVE #include "Stream.h" #include "Data.h" #include "data/ByteData.h" #include "Exception.h" namespace love { love::Type Stream::type("Stream", &Object::type); Data *Stream::read(int64 size) { int64 max = LOVE_INT64_MAX; int64 cur = 0; if (isSeekable()) { max = getSize(); cur = tell(); } if (cur < 0) cur = 0; else if (cur > max) cur = max; if (cur + size > max) size = max - cur; StrongRef dst(new data::ByteData(size, false), Acquire::NORETAIN); int64 bytesRead = read(dst->getData(), size); if (bytesRead < 0 || (bytesRead == 0 && bytesRead != size)) throw love::Exception("Could not read from stream."); if (bytesRead < size) dst.set(new data::ByteData(dst->getData(), (size_t) bytesRead), Acquire::NORETAIN); dst->retain(); return dst; } bool Stream::write(Data *src) { return write(src, 0, src->getSize()); } bool Stream::write(Data *src, int64 offset, int64 size) { if (offset < 0 || size < 0 || offset + size > (int64) src->getSize()) throw love::Exception("Offset and size parameters do not fit within the given Data's size."); return write((const uint8 *) src->getData() + offset, size); } } // love ================================================ FILE: src/common/Stream.h ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ #ifndef LOVE_STREAM_H #define LOVE_STREAM_H // LOVE #include #include "Object.h" #include "int.h" namespace love { class Data; class Stream : public Object { public: enum SeekOrigin { SEEKORIGIN_BEGIN, SEEKORIGIN_CURRENT, SEEKORIGIN_END, SEEKORIGIN_MAX_ENUM }; static love::Type type; virtual ~Stream() {} /** * Creates a new copy of the Stream, with the same settings as the original. * The seek position will be reset in the copy. **/ virtual Stream *clone() = 0; /** * Gets whether read() is supported for this Stream. **/ virtual bool isReadable() const = 0; /** * Gets whether write() is supported for this Stream. **/ virtual bool isWritable() const = 0; /** * Gets whether seek(), tell(), and getSize() are supported for this Stream. **/ virtual bool isSeekable() const = 0; /** * Reads data into the destination buffer, and returns the number of bytes * actually read. **/ virtual int64 read(void *dst, int64 size) = 0; /** * Reads data into a new Data object. **/ virtual Data *read(int64 size); /** * Writes data from the source buffer into the Stream. **/ virtual bool write(const void *src, int64 size) = 0; /** * Writes data from the source Data object into the Stream. **/ virtual bool write(Data *src, int64 offset, int64 size); bool write(Data *src); /** * Flushes all data written to the Stream. **/ virtual bool flush() = 0; /** * Gets the total size of the Stream, if supported. **/ virtual int64 getSize() = 0; /** * Sets the current position in the Stream, if supported. **/ virtual bool seek(int64 pos, SeekOrigin origin = SEEKORIGIN_BEGIN) = 0; /** * Gets the current position in the Stream, if supported. **/ virtual int64 tell() = 0; }; // Stream } // love #endif // LOVE_STREAM_H ================================================ FILE: src/common/StringMap.cpp ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ #include "StringMap.h" // See the header template class std::vector; ================================================ FILE: src/common/StringMap.h ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ #ifndef LOVE_STRING_MAP_H #define LOVE_STRING_MAP_H #include #include // As StringMap instantiates std::vector for instances that use // getNames(), we end up with multiple copies in the object files. This // declaration means we only emit it once (in StringMap.cpp). extern template class std::vector; namespace love { template class StringMap { public: struct Entry { const char *key; T value; }; StringMap(const Entry *entries, unsigned int num) { for (unsigned int i = 0; i < SIZE; ++i) reverse[i] = nullptr; unsigned int n = num / sizeof(Entry); for (unsigned int i = 0; i < n; ++i) add(entries[i].key, entries[i].value); } bool streq(const char *a, const char *b) { while (*a != 0 && *b != 0) { if (*a != *b) return false; ++a; ++b; } return (*a == 0 && *b == 0); } bool find(const char *key, T &t) { unsigned int str_hash = djb2(key); for (unsigned int i = 0; i < MAX; ++i) { unsigned int str_i = (str_hash + i) % MAX; if (!records[str_i].set) return false; if (streq(records[str_i].key, key)) { t = records[str_i].value; return true; } } return false; } bool find(T key, const char *&str) { unsigned int index = (unsigned int) key; if (index >= SIZE) return false; if (reverse[index] != nullptr) { str = reverse[index]; return true; } else { return false; } } bool add(const char *key, T value) { unsigned int str_hash = djb2(key); bool inserted = false; for (unsigned int i = 0; i < MAX; ++i) { unsigned int str_i = (str_hash + i) % MAX; if (!records[str_i].set) { inserted = true; records[str_i].set = true; records[str_i].key = key; records[str_i].value = value; break; } } unsigned int index = (unsigned int) value; if (index >= SIZE) { printf("Constant %s out of bounds with %u!\n", key, index); return false; } reverse[index] = key; return inserted; } unsigned int djb2(const char *key) { unsigned int hash = 5381; int c; while ((c = *key++)) hash = ((hash << 5) + hash) + c; return hash; } std::vector getNames() const { std::vector names; names.reserve(SIZE); for (unsigned int i = 0; i < SIZE; ++i) if (reverse[i] != nullptr) names.emplace_back(reverse[i]); return names; } private: struct Record { const char *key; T value; bool set; Record() : set(false) {} }; static const unsigned int MAX = SIZE * 2; Record records[MAX]; const char *reverse[SIZE]; }; // StringMap #define STRINGMAP_DECLARE(type) \ bool getConstant(const char *in, type &out); \ bool getConstant(type in, const char *&out); \ std::vector getConstants(type); \ #define STRINGMAP_BEGIN(type, count, name) \ static StringMap::Entry name##Entries[] = #define STRINGMAP_END(type, count, name) \ ; \ static StringMap name##s(name##Entries, sizeof(name##Entries)); \ bool getConstant(const char *in, type &out) { return name##s.find(in, out); } \ bool getConstant(type in, const char *&out) { return name##s.find(in, out); } \ std::vector getConstants(type) { return name##s.getNames(); } #define STRINGMAP_CLASS_DECLARE(type) \ static bool getConstant(const char *in, type &out); \ static bool getConstant(type in, const char *&out); \ static std::vector getConstants(type); \ #define STRINGMAP_CLASS_BEGIN(classname, type, count, name) \ static StringMap::Entry name##Entries[] = #define STRINGMAP_CLASS_END(classname, type, count, name) \ ; \ static StringMap name##s(name##Entries, sizeof(name##Entries)); \ bool classname::getConstant(const char *in, type &out) { return name##s.find(in, out); } \ bool classname::getConstant(type in, const char *&out) { return name##s.find(in, out); } \ std::vector classname::getConstants(type) { return name##s.getNames(); } } // love #endif // LOVE_STRING_MAP_H ================================================ FILE: src/common/Variant.cpp ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ #include #include "Variant.h" #include "common/StringMap.h" namespace love { Variant::Variant(Type vtype) : type(vtype) {} Variant::Variant() : type(NIL) {} Variant::Variant(bool boolean) : type(BOOLEAN) { data.boolean = boolean; } Variant::Variant(double number) : type(NUMBER) { data.number = number; } Variant::Variant(const char *str, size_t len) { if (len <= MAX_SMALL_STRING_LENGTH) { type = SMALLSTRING; memcpy(data.smallstring.str, str, len); data.smallstring.len = (uint8) len; } else { type = STRING; data.string = new SharedString(str, len); } } Variant::Variant(const std::string &str) : Variant(str.c_str(), str.length()) { } Variant::Variant(void *lightuserdata) : type(LUSERDATA) { data.userdata = lightuserdata; } Variant::Variant(love::Type *lovetype, love::Object *object) : type(LOVEOBJECT) { data.objectproxy.type = lovetype; data.objectproxy.object = object; if (data.objectproxy.object != nullptr) data.objectproxy.object->retain(); } // Variant gets ownership of the vector. Variant::Variant(SharedTable *table) : type(TABLE) { data.table = table; } Variant::Variant(const Variant &v) : type(v.type) , data(v.data) { if (type == STRING) data.string->retain(); else if (type == LOVEOBJECT && data.objectproxy.object != nullptr) data.objectproxy.object->retain(); else if (type == TABLE) data.table->retain(); } Variant::Variant(Variant &&v) : type(std::move(v.type)) , data(std::move(v.data)) { v.type = NIL; } Variant::~Variant() { if (type == STRING) data.string->release(); else if (type == LOVEOBJECT && data.objectproxy.object != nullptr) data.objectproxy.object->release(); else if (type == TABLE) data.table->release(); } Variant &Variant::operator = (const Variant &v) { if (v.type == STRING) v.data.string->retain(); else if (v.type == LOVEOBJECT && v.data.objectproxy.object != nullptr) v.data.objectproxy.object->retain(); else if (v.type == TABLE) v.data.table->retain(); if (type == STRING) data.string->release(); else if (type == LOVEOBJECT && data.objectproxy.object != nullptr) data.objectproxy.object->release(); else if (type == TABLE) data.table->release(); type = v.type; data = v.data; return *this; } } // love ================================================ FILE: src/common/Variant.h ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ #ifndef LOVE_VARIANT_H #define LOVE_VARIANT_H #include "common/config.h" #include "common/Object.h" #include "common/int.h" #include #include #include namespace love { class LOVE_EXPORT Variant { public: static const int MAX_SMALL_STRING_LENGTH = 15; enum Type { UNKNOWN = 0, BOOLEAN, NUMBER, STRING, SMALLSTRING, LUSERDATA, LOVEOBJECT, NIL, TABLE }; class SharedString : public love::Object { public: SharedString(const char *string, size_t len) : len(len) { str = new char[len+1]; str[len] = '\0'; memcpy(str, string, len); } virtual ~SharedString() { delete[] str; } char *str; size_t len; }; class SharedTable : public love::Object { public: SharedTable() {} virtual ~SharedTable() {} std::vector> pairs; }; union Data { bool boolean; double number; SharedString *string; void *userdata; Proxy objectproxy; SharedTable *table; struct { char str[MAX_SMALL_STRING_LENGTH]; uint8 len; } smallstring; }; Variant(); Variant(bool boolean); Variant(double number); Variant(const char *str, size_t len); Variant(const std::string &str); Variant(void *lightuserdata); Variant(love::Type *type, love::Object *object); Variant(SharedTable *table); Variant(const Variant &v); Variant(Variant &&v); ~Variant(); Variant &operator = (const Variant &v); Type getType() const { return type; } const Data &getData() const { return data; } static Variant unknown() { return Variant(UNKNOWN); } private: Variant(Type vtype); Type type; Data data; }; // Variant } // love #endif // LOVE_VARIANT_H ================================================ FILE: src/common/Vector.cpp ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ #include "Vector.h" namespace love { // Implementation in header. } ================================================ FILE: src/common/Vector.h ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ #ifndef LOVE_VECTOR_H #define LOVE_VECTOR_H // STD #include namespace love { // All math operators are component-wise. struct Vector2 { float x, y; Vector2() : x(0.0f), y(0.0f) {} Vector2(float x, float y) : x(x), y(y) {} Vector2(const Vector2 &v) : x(v.x), y(v.y) {} float getLength() const; float getLengthSquare() const; /** * Normalizes the Vector. * @param length Desired length of the vector. **/ void normalize(float length = 1.0f); /** * Gets a vector perpendicular to the Vector. * To get the true (normalized) normal, use v.getNormal(1.0f / v.getLength()) **/ Vector2 getNormal() const; /** * Gets a vector perpendicular to the Vector. * To get the true (normalized) normal, use v.getNormal(1.0f / v.getLength()) **/ Vector2 getNormal(float scale) const; static inline float dot(const Vector2 &a, const Vector2 &b); static inline float cross(const Vector2 &a, const Vector2 &b); Vector2 operator + (const Vector2 &v) const; Vector2 operator - (const Vector2 &v) const; Vector2 operator * (float s) const; Vector2 operator / (float s) const; Vector2 operator - () const; void operator += (const Vector2 &v); void operator -= (const Vector2 &v); void operator *= (float s); void operator /= (float s); bool operator == (const Vector2 &v) const; bool operator != (const Vector2 &v) const; }; // Vector2 // All math operators are component-wise. struct Vector3 { float x, y, z; Vector3() : x(0.0f), y(0.0f), z(0.0f) {} Vector3(float x, float y, float z) : x(x), y(y), z(z) {} Vector3(const Vector2 &v, float z = 0.0f) : x(v.x), y(v.y), z(z) {} float getLength() const; float getLengthSquare() const; /** * Normalizes the Vector. * @param length Desired length of the vector. **/ void normalize(float length = 1.0); static inline float dot(const Vector3 &a, const Vector3 &b); static inline Vector3 cross(const Vector3 &a, const Vector3 &b); Vector3 operator + (const Vector3 &v) const; Vector3 operator - (const Vector3 &v) const; Vector3 operator * (float s) const; Vector3 operator / (float s) const; Vector3 operator - () const; void operator += (const Vector3 &v); void operator -= (const Vector3 &v); void operator *= (float s); void operator /= (float s); bool operator == (const Vector3 &v) const; bool operator != (const Vector3 &v) const; }; // Vector3 // All math operators are component-wise. struct Vector4 { float x, y, z, w; Vector4() : x(0.0f), y(0.0f), z(0.0f), w(0.0f) {} Vector4(float x, float y, float z, float w) : x(x), y(y), z(z), w(w) {} Vector4(const Vector2 &v, float z = 0.0f, float w = 0.0f) : x(v.x), y(v.y), z(z), w(w) {} Vector4(const Vector3 &v, float w = 0.0f) : x(v.x), y(v.y), z(v.z), w(w) {} float getLength() const; float getLengthSquare() const; /** * Normalizes the Vector. * @param length Desired length of the vector. **/ void normalize(float length = 1.0); static inline float dot(const Vector4 &a, const Vector4 &b); Vector4 operator + (const Vector4 &v) const; Vector4 operator - (const Vector4 &v) const; Vector4 operator * (float s) const; Vector4 operator / (float s) const; Vector4 operator - () const; void operator += (const Vector4 &v); void operator -= (const Vector4 &v); void operator *= (float s); void operator /= (float s); bool operator == (const Vector4 &v) const; bool operator != (const Vector4 &v) const; }; // Vector4 inline float Vector2::getLength() const { return sqrtf(x*x + y*y); } inline float Vector2::getLengthSquare() const { return x*x + y*y; } inline Vector2 Vector2::getNormal() const { return Vector2(-y, x); } inline Vector2 Vector2::getNormal(float scale) const { return Vector2(-y * scale, x * scale); } inline float Vector2::dot(const Vector2 &a, const Vector2 &b) { return a.x * b.x + a.y * b.y; } inline float Vector2::cross(const Vector2 &a, const Vector2 &b) { return a.x * b.y - a.y * b.x; } inline void Vector2::normalize(float length) { float length_current = getLength(); if (length_current > 0) { float m = length / length_current; x *= m; y *= m; } } inline Vector2 Vector2::operator + (const Vector2 &v) const { return Vector2(x + v.x, y + v.y); } inline Vector2 Vector2::operator - (const Vector2 &v) const { return Vector2(x - v.x, y - v.y); } inline Vector2 Vector2::operator * (float s) const { return Vector2(x*s, y*s); } inline Vector2 Vector2::operator / (float s) const { float invs = 1.0f / s; return Vector2(x*invs, y*invs); } inline Vector2 Vector2::operator - () const { return Vector2(-x, -y); } inline void Vector2::operator += (const Vector2 &v) { x += v.x; y += v.y; } inline void Vector2::operator -= (const Vector2 &v) { x -= v.x; y -= v.y; } inline void Vector2::operator *= (float s) { x *= s; y *= s; } inline void Vector2::operator /= (float s) { float invs = 1.0f / s; x *= invs; y *= invs; } inline bool Vector2::operator == (const Vector2 &v) const { return x == v.x && y == v.y; } inline bool Vector2::operator != (const Vector2 &v) const { return x != v.x || y != v.y; } inline float Vector3::getLength() const { return sqrtf(x*x + y*y + z*z); } inline float Vector3::getLengthSquare() const { return x*x + y*y + z*z; } inline float Vector3::dot(const Vector3 &a, const Vector3 &b) { return a.x * b.x + a.y * b.y + a.z * b.z; } inline Vector3 Vector3::cross(const Vector3 &a, const Vector3 &b) { return Vector3(a.y*b.z - a.z*b.y, a.z*b.x - a.x*b.z, a.x*b.y - a.y*b.x); } inline void Vector3::normalize(float length) { float length_current = getLength(); if (length_current > 0) { float m = length / length_current; x *= m; y *= m; z *= m; } } inline Vector3 Vector3::operator + (const Vector3 &v) const { return Vector3(x + v.x, y + v.y, z + v.z); } inline Vector3 Vector3::operator - (const Vector3 &v) const { return Vector3(x - v.x, y - v.y, z - v.z); } inline Vector3 Vector3::operator * (float s) const { return Vector3(x*s, y*s, z*s); } inline Vector3 Vector3::operator / (float s) const { float invs = 1.0f / s; return Vector3(x*invs, y*invs, z*invs); } inline Vector3 Vector3::operator - () const { return Vector3(-x, -y, -z); } inline void Vector3::operator += (const Vector3 &v) { x += v.x; y += v.y; z += v.z; } inline void Vector3::operator -= (const Vector3 &v) { x -= v.x; y -= v.y; z -= v.z; } inline void Vector3::operator *= (float s) { x *= s; y *= s; z *= s; } inline void Vector3::operator /= (float s) { float invs = 1.0f / s; x *= invs; y *= invs; z *= invs; } inline bool Vector3::operator == (const Vector3 &v) const { return x == v.x && y == v.y && z == v.z; } inline bool Vector3::operator != (const Vector3 &v) const { return x != v.x || y != v.y || z != v.z; } inline float Vector4::getLength() const { return sqrtf(x*x + y*y + z*z + w*w); } inline float Vector4::getLengthSquare() const { return x*x + y*y + z*z + w*w; } inline float Vector4::dot(const Vector4 &a, const Vector4 &b) { return a.x * b.x + a.y * b.y + a.z * b.z + a.w * b.w; } inline void Vector4::normalize(float length) { float length_current = getLength(); if (length_current > 0) { float m = length / length_current; x *= m; y *= m; z *= m; w *= m; } } inline Vector4 Vector4::operator + (const Vector4 &v) const { return Vector4(x + v.x, y + v.y, z + v.z, w + v.w); } inline Vector4 Vector4::operator - (const Vector4 &v) const { return Vector4(x - v.x, y - v.y, z - v.z, w - v.w); } inline Vector4 Vector4::operator * (float s) const { return Vector4(x*s, y*s, z*s, w*s); } inline Vector4 Vector4::operator / (float s) const { float invs = 1.0f / s; return Vector4(x*invs, y*invs, z*invs, w*invs); } inline Vector4 Vector4::operator - () const { return Vector4(-x, -y, -z, -w); } inline void Vector4::operator += (const Vector4 &v) { x += v.x; y += v.y; z += v.z; w += v.w; } inline void Vector4::operator -= (const Vector4 &v) { x -= v.x; y -= v.y; z -= v.z; w -= v.w; } inline void Vector4::operator *= (float s) { x *= s; y *= s; z *= s; w *= s; } inline void Vector4::operator /= (float s) { float invs = 1.0f / s; x *= invs; y *= invs; z *= invs; w *= invs; } inline bool Vector4::operator == (const Vector4 &v) const { return x == v.x && y == v.y && z == v.z && w == v.w; } inline bool Vector4::operator != (const Vector4 &v) const { return x != v.x || y != v.y || z != v.z || w != v.w; } } //love #endif// LOVE_VECTOR_H ================================================ FILE: src/common/android.cpp ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ #include "android.h" #include "Object.h" #ifdef LOVE_ANDROID #include #include #include #include #include #include #include #include #include #include #include "libraries/physfs/physfs.h" #include "filesystem/physfs/PhysfsIo.h" namespace love { namespace android { void setImmersive(bool immersive_active) { JNIEnv *env = (JNIEnv*) SDL_GetAndroidJNIEnv(); jobject activity = (jobject) SDL_GetAndroidActivity(); jclass clazz = env->GetObjectClass(activity); static jmethodID setImmersiveMethod = env->GetMethodID(clazz, "setImmersiveMode", "(Z)V"); env->CallVoidMethod(activity, setImmersiveMethod, immersive_active); env->DeleteLocalRef(activity); env->DeleteLocalRef(clazz); } bool getImmersive() { JNIEnv *env = (JNIEnv*) SDL_GetAndroidJNIEnv(); jobject activity = (jobject) SDL_GetAndroidActivity(); jclass clazz = env->GetObjectClass(activity); static jmethodID getImmersiveMethod = env->GetMethodID(clazz, "getImmersiveMode", "()Z"); jboolean immersiveActive = env->CallBooleanMethod(activity, getImmersiveMethod); env->DeleteLocalRef(activity); env->DeleteLocalRef(clazz); return immersiveActive; } double getScreenScale() { static double result = -1.; if (result == -1.) { JNIEnv *env = (JNIEnv*) SDL_GetAndroidJNIEnv(); jobject activity = (jobject) SDL_GetAndroidActivity(); jclass clazz = env->GetObjectClass(activity); jmethodID getDPIMethod = env->GetMethodID(clazz, "getDPIScale", "()F"); result = (double) env->CallFloatMethod(activity, getDPIMethod); env->DeleteLocalRef(clazz); env->DeleteLocalRef(activity); } return result; } bool getSafeArea(int &top, int &left, int &bottom, int &right) { JNIEnv *env = (JNIEnv*) SDL_GetAndroidJNIEnv(); jobject activity = (jobject) SDL_GetAndroidActivity(); jclass clazz = env->GetObjectClass(activity); jclass rectClass = env->FindClass("android/graphics/Rect"); jmethodID methodID = env->GetMethodID(clazz, "getSafeArea", "()Landroid/graphics/Rect;"); jobject safeArea = env->CallObjectMethod(activity, methodID); if (safeArea != nullptr) { top = env->GetIntField(safeArea, env->GetFieldID(rectClass, "top", "I")); left = env->GetIntField(safeArea, env->GetFieldID(rectClass, "left", "I")); bottom = env->GetIntField(safeArea, env->GetFieldID(rectClass, "bottom", "I")); right = env->GetIntField(safeArea, env->GetFieldID(rectClass, "right", "I")); env->DeleteLocalRef(safeArea); } env->DeleteLocalRef(rectClass); env->DeleteLocalRef(clazz); env->DeleteLocalRef(activity); return safeArea != nullptr; } void vibrate(double seconds) { JNIEnv *env = (JNIEnv*) SDL_GetAndroidJNIEnv(); jobject activity = (jobject) SDL_GetAndroidActivity(); jclass clazz = env->GetObjectClass(activity); static jmethodID vibrateMethod = env->GetMethodID(clazz, "vibrate", "(D)V"); env->CallVoidMethod(activity, vibrateMethod, seconds); env->DeleteLocalRef(clazz); env->DeleteLocalRef(activity); } /* * Helper functions for the filesystem module */ void freeGameArchiveMemory(void *ptr) { char *game_love_data = static_cast(ptr); delete[] game_love_data; } bool directoryExists(const char *path) { struct stat s {}; int err = stat(path, &s); if (err == -1) { if (errno != ENOENT) SDL_Log("Error checking for directory %s errno = %d: %s", path, errno, strerror(errno)); return false; } return S_ISDIR(s.st_mode); } bool mkdir(const char *path) { int err = ::mkdir(path, S_IRWXU | S_IRWXG | S_IRWXO | S_ISGID); if (err == -1) { const char *error = strerror(errno); SDL_Log("Error: Could not create directory '%s': %s", path, error); return false; } return true; } bool chmod(const char *path, int mode) { int err = ::chmod(path, mode); if (err == -1) { const char *error = strerror(errno); SDL_Log("Error: Could not change mode '%s': %s", path, error); return false; } return true; } inline bool tryCreateDirectory(const char *path) { SDL_Log("Trying to create directory '%s'", path); if (directoryExists(path)) return true; else if (mkdir(path)) return true; return false; } bool createStorageDirectories() { std::string internalStoragePath = SDL_GetAndroidInternalStoragePath(); std::string externalStoragePath = SDL_GetAndroidExternalStoragePath(); std::string saveDirectoryInternal = internalStoragePath + "/save"; if (!tryCreateDirectory(saveDirectoryInternal.c_str())) return false; std::string saveDirectoryExternal = externalStoragePath + "/save"; if (!tryCreateDirectory(saveDirectoryExternal.c_str())) return false; std::string game_directory = externalStoragePath + "/game"; if (!tryCreateDirectory (game_directory.c_str())) return false; return true; } void fixupPermissionSingleFile(const std::string &savedir, const std::string &path, int mode) { std::string fixedSavedir = savedir.back() == '/' ? savedir : (savedir + "/"); std::string target = fixedSavedir + path; ::chmod(target.c_str(), mode); } void fixupExternalStoragePermission(const std::string &savedir, const std::string &path) { std::set pathsToFix; size_t start = 0; while (true) { size_t pos = path.find('/', start); if (pos == std::string::npos) { pathsToFix.insert(path); break; } pathsToFix.insert(path.substr(0, pos)); start = pos + 1; } std::string fixedSavedir = savedir.back() == '/' ? savedir : (savedir + "/"); chmod(savedir.c_str(), S_IRWXU | S_IRWXG | S_IRWXO | S_ISGID); for (const std::string &dir: pathsToFix) { const char *realPath = PHYSFS_getRealDir(dir.c_str()); if (!dir.empty() && strcmp(realPath, savedir.c_str()) == 0) { std::string target = fixedSavedir + dir; chmod(target.c_str(), S_IRWXU | S_IRWXG | S_IRWXO | S_ISGID); } } } bool hasBackgroundMusic() { JNIEnv *env = (JNIEnv*) SDL_GetAndroidJNIEnv(); jobject activity = (jobject) SDL_GetAndroidActivity(); jclass clazz(env->GetObjectClass(activity)); jmethodID method_id = env->GetMethodID(clazz, "hasBackgroundMusic", "()Z"); jboolean result = env->CallBooleanMethod(activity, method_id); env->DeleteLocalRef(activity); env->DeleteLocalRef(clazz); return result; } bool hasRecordingPermission() { JNIEnv *env = (JNIEnv*) SDL_GetAndroidJNIEnv(); jobject activity = (jobject) SDL_GetAndroidActivity(); jclass clazz = env->GetObjectClass(activity); static jmethodID methodID = env->GetMethodID(clazz, "hasRecordAudioPermission", "()Z"); jboolean result = false; if (methodID == nullptr) env->ExceptionClear(); else result = env->CallBooleanMethod(activity, methodID); env->DeleteLocalRef(activity); env->DeleteLocalRef(clazz); return result; } void requestRecordingPermission() { JNIEnv *env = (JNIEnv*) SDL_GetAndroidJNIEnv(); jobject activity = (jobject) SDL_GetAndroidActivity(); jclass clazz(env->GetObjectClass(activity)); jmethodID methodID = env->GetMethodID(clazz, "requestRecordAudioPermission", "()V"); if (methodID == nullptr) env->ExceptionClear(); else env->CallVoidMethod(activity, methodID); env->DeleteLocalRef(clazz); env->DeleteLocalRef(activity); } void showRecordingPermissionMissingDialog() { JNIEnv *env = (JNIEnv*) SDL_GetAndroidJNIEnv(); jobject activity = (jobject) SDL_GetAndroidActivity(); jclass clazz(env->GetObjectClass(activity)); jmethodID methodID = env->GetMethodID(clazz, "showRecordingAudioPermissionMissingDialog", "()V"); if (methodID == nullptr) env->ExceptionClear(); else env->CallVoidMethod(activity, methodID); env->DeleteLocalRef(clazz); env->DeleteLocalRef(activity); } /* A container for AssetManager Java object */ class AssetManagerObject { public: AssetManagerObject() { JNIEnv *env = (JNIEnv *) SDL_GetAndroidJNIEnv(); jobject am = getLocalAssetManager(env); assetManager = env->NewGlobalRef(am); env->DeleteLocalRef(am); } ~AssetManagerObject() { JNIEnv *env = (JNIEnv *) SDL_GetAndroidJNIEnv(); env->DeleteGlobalRef(assetManager); } static jobject getLocalAssetManager(JNIEnv *env) { jobject self = (jobject) SDL_GetAndroidActivity(); jclass activity = env->GetObjectClass(self); jmethodID method = env->GetMethodID(activity, "getAssets", "()Landroid/content/res/AssetManager;"); jobject am = env->CallObjectMethod(self, method); env->DeleteLocalRef(self); env->DeleteLocalRef(activity); return am; } explicit operator jobject() { return assetManager; }; private: jobject assetManager; }; /* * Helper functions to aid new fusing method */ // This returns *global* reference, no need to free it. static jobject getJavaAssetManager() { static AssetManagerObject assetManager; return (jobject) assetManager; } static AAssetManager *getAssetManager() { JNIEnv *env = (JNIEnv*) SDL_GetAndroidJNIEnv(); return AAssetManager_fromJava(env, (jobject) getJavaAssetManager()); } namespace aasset { struct AssetInfo: public love::filesystem::physfs::PhysfsIo { static const uint32_t version = 0; AAssetManager *assetManager; AAsset *asset; char *filename; size_t size; static AssetInfo *fromAAsset(AAssetManager *assetManager, const char *filename, AAsset *asset) { return new AssetInfo(assetManager, filename, asset); } int64_t read(void* buf, uint64_t len) const { int readed = AAsset_read(asset, buf, (size_t) len); PHYSFS_setErrorCode(readed < 0 ? PHYSFS_ERR_OS_ERROR : PHYSFS_ERR_OK); return (PHYSFS_sint64) readed; } int64_t write(const void* buf, uint64_t len) const { LOVE_UNUSED(buf); LOVE_UNUSED(len); PHYSFS_setErrorCode(PHYSFS_ERR_READ_ONLY); return -1; } int64_t seek(uint64_t offset) const { int64_t success = AAsset_seek64(asset, (off64_t) offset, SEEK_SET) != -1; PHYSFS_setErrorCode(success ? PHYSFS_ERR_OK : PHYSFS_ERR_OS_ERROR); return success; } int64_t tell() const { off64_t len = AAsset_getLength64(asset); off64_t remain = AAsset_getRemainingLength64(asset); return len - remain; } int64_t length() const { return AAsset_getLength64(asset); } int flush() const { // Do nothing PHYSFS_setErrorCode(PHYSFS_ERR_OK); return 1; } AssetInfo(const AssetInfo &other) : assetManager(other.assetManager) , size(strlen(other.filename) + 1) { asset = AAssetManager_open(assetManager, other.filename, AASSET_MODE_RANDOM); if (asset == nullptr) { PHYSFS_setErrorCode(PHYSFS_ERR_OS_ERROR); throw love::Exception("Unable to duplicate AssetInfo"); } filename = new (std::nothrow) char[size]; memcpy(filename, other.filename, size); } ~AssetInfo() override { AAsset_close(asset); delete[] filename; } private: AssetInfo(AAssetManager *assetManager, const char *filename, AAsset *asset) : assetManager(assetManager) , asset(asset) , size(strlen(filename) + 1) { this->filename = new (std::nothrow) char[size]; memcpy(this->filename, filename, size); } }; static std::unordered_map fileTree; void *openArchive(PHYSFS_Io *io, const char *name, int forWrite, int *claimed) { if (forWrite || io->opaque == nullptr || memcmp(io->opaque, "ASET", 4) != 0) return nullptr; // It's our archive *claimed = 1; AAssetManager *assetManager = getAssetManager(); if (fileTree.empty()) { // AAssetDir_getNextFileName intentionally excludes directories, so // we have to use JNI that calls AssetManager.list() recursively. JNIEnv *env = (JNIEnv *) SDL_GetAndroidJNIEnv(); jobject activity = (jobject) SDL_GetAndroidActivity(); jclass clazz = env->GetObjectClass(activity); jmethodID method = env->GetMethodID(clazz, "buildFileTree", "()[Ljava/lang/String;"); jobjectArray list = (jobjectArray) env->CallObjectMethod(activity, method); for (jsize i = 0; i < env->GetArrayLength(list); i++) { jstring jstr = (jstring) env->GetObjectArrayElement(list, i); const char *str = env->GetStringUTFChars(jstr, nullptr); fileTree[str + 1] = str[0] == 'd' ? PHYSFS_FILETYPE_DIRECTORY : PHYSFS_FILETYPE_REGULAR; env->ReleaseStringUTFChars(jstr, str); env->DeleteLocalRef(jstr); } env->DeleteLocalRef(list); env->DeleteLocalRef(clazz); env->DeleteLocalRef(activity); } return assetManager; } PHYSFS_EnumerateCallbackResult enumerate( void *opaque, const char *dirname, PHYSFS_EnumerateCallback cb, const char *origdir, void *callbackdata ) { using FileTreeIterator = std::unordered_map::iterator; LOVE_UNUSED(opaque); const char *path = dirname; if (path == nullptr || (path[0] == '/' && path[1] == 0)) path = ""; if (path[0] != 0) { FileTreeIterator result = fileTree.find(path); if (result == fileTree.end() || result->second != PHYSFS_FILETYPE_DIRECTORY) { PHYSFS_setErrorCode(PHYSFS_ERR_NOT_FOUND); return PHYSFS_ENUM_ERROR; } } JNIEnv *env = (JNIEnv *) SDL_GetAndroidJNIEnv(); jobject assetManager = getJavaAssetManager(); jclass clazz = env->GetObjectClass(assetManager); jmethodID method = env->GetMethodID(clazz, "list", "(Ljava/lang/String;)[Ljava/lang/String;"); jstring jstringDir = env->NewStringUTF(path); jobjectArray dir = (jobjectArray) env->CallObjectMethod(assetManager, method, jstringDir); PHYSFS_EnumerateCallbackResult ret = PHYSFS_ENUM_OK; if (env->ExceptionCheck()) { // IOException occured ret = PHYSFS_ENUM_ERROR; env->ExceptionClear(); } else { jsize i = 0; jsize len = env->GetArrayLength(dir); while (ret == PHYSFS_ENUM_OK && i < len) { jstring jstr = (jstring) env->GetObjectArrayElement(dir, i++); const char *name = env->GetStringUTFChars(jstr, nullptr); ret = cb(callbackdata, origdir, name); env->ReleaseStringUTFChars(jstr, name); env->DeleteLocalRef(jstr); } env->DeleteLocalRef(dir); } env->DeleteLocalRef(jstringDir); env->DeleteLocalRef(clazz); return ret; } PHYSFS_Io *openRead(void *opaque, const char *name) { AAssetManager *assetManager = (AAssetManager *) opaque; AAsset *file = AAssetManager_open(assetManager, name, AASSET_MODE_UNKNOWN); if (file == nullptr) { PHYSFS_setErrorCode(PHYSFS_ERR_NOT_FOUND); return nullptr; } PHYSFS_setErrorCode(PHYSFS_ERR_OK); return AssetInfo::fromAAsset(assetManager, name, file); } PHYSFS_Io *openWriteAppend(void *opaque, const char *name) { LOVE_UNUSED(opaque); LOVE_UNUSED(name); // AAsset doesn't support modification PHYSFS_setErrorCode(PHYSFS_ERR_READ_ONLY); return nullptr; } int removeMkdir(void *opaque, const char *name) { LOVE_UNUSED(opaque); LOVE_UNUSED(name); // AAsset doesn't support modification PHYSFS_setErrorCode(PHYSFS_ERR_READ_ONLY); return 0; } int stat(void *opaque, const char *name, PHYSFS_Stat *out) { using FileTreeIterator = std::unordered_map::iterator; LOVE_UNUSED(opaque); FileTreeIterator result = fileTree.find(name); if (result != fileTree.end()) { out->filetype = result->second; out->modtime = -1; out->createtime = -1; out->accesstime = -1; out->readonly = 1; PHYSFS_setErrorCode(PHYSFS_ERR_OK); return 1; } PHYSFS_setErrorCode(PHYSFS_ERR_NOT_FOUND); return 0; } void closeArchive(void *opaque) { // Do nothing LOVE_UNUSED(opaque); PHYSFS_setErrorCode(PHYSFS_ERR_OK); } static PHYSFS_Archiver g_AAssetArchiver = { 0, { "AASSET", "Android AAsset Wrapper", "LOVE Development Team", "https://developer.android.com/ndk/reference/group/asset", 0 }, openArchive, enumerate, openRead, openWriteAppend, openWriteAppend, removeMkdir, removeMkdir, stat, closeArchive }; static PHYSFS_sint64 dummyReturn0(PHYSFS_Io *io) { LOVE_UNUSED(io); PHYSFS_setErrorCode(PHYSFS_ERR_OK); return 0; } static PHYSFS_Io *getDummyIO(PHYSFS_Io *io); static char dummyOpaque[] = "ASET"; static PHYSFS_Io dummyIo = { 0, dummyOpaque, nullptr, nullptr, [](PHYSFS_Io *io, PHYSFS_uint64 offset) -> int { PHYSFS_setErrorCode(offset == 0 ? PHYSFS_ERR_OK : PHYSFS_ERR_PAST_EOF); return offset == 0; }, dummyReturn0, dummyReturn0, getDummyIO, nullptr, [](PHYSFS_Io *io) { LOVE_UNUSED(io); } }; static PHYSFS_Io *getDummyIO(PHYSFS_Io *io) { return &dummyIo; } } // aasset struct SDLIO: public love::filesystem::physfs::PhysfsIo { static const uint32_t version = 0; SDLIO(const std::string &filename) : filename(filename) , io(nullptr) { io = SDL_IOFromFile(filename.c_str(), "rb"); if (!io) throw love::Exception("Cannot open %s: %s", filename.c_str(), SDL_GetError()); } SDLIO(const SDLIO &other) : filename(other.filename) , io(nullptr) { io = SDL_IOFromFile(filename.c_str(), "rb"); if (!io) throw love::Exception("Cannot open %s: %s", filename.c_str(), SDL_GetError()); } int64_t read(void* buf, uint64_t len) const { size_t readed = SDL_ReadIO(io, buf, (size_t) len); return (int64_t) readed; } int64_t write(const void* buf, uint64_t len) const { size_t written = SDL_WriteIO(io, buf, (size_t) len); return (int64_t) written; } int seek(uint64_t offset) const { int64_t newpos = SDL_SeekIO(io, (Sint64) offset, SDL_IO_SEEK_SET); PHYSFS_setErrorCode(newpos >= 0 ? PHYSFS_ERR_OK : PHYSFS_ERR_OS_ERROR); return newpos >= 0; } int64_t tell() const { int64_t pos = SDL_TellIO(io); PHYSFS_setErrorCode(pos >= 0 ? PHYSFS_ERR_OK : PHYSFS_ERR_OS_ERROR); return pos; } int64_t length() const { int64_t size = SDL_GetIOSize(io); PHYSFS_setErrorCode(size >= 0 ? PHYSFS_ERR_OK : PHYSFS_ERR_OS_ERROR); return size; } int flush() const { bool success = SDL_FlushIO(io); PHYSFS_setErrorCode(success ? PHYSFS_ERR_OK : PHYSFS_ERR_OS_ERROR); return success; } ~SDLIO() override { SDL_CloseIO(io); } private: std::string filename; SDL_IOStream *io; }; static bool isVirtualArchiveInitialized = false; bool initializeVirtualArchive() { if (isVirtualArchiveInitialized) return true; if (!PHYSFS_registerArchiver(&aasset::g_AAssetArchiver)) return false; if (!PHYSFS_mountIo(&aasset::dummyIo, "ASET.AASSET", nullptr, 0)) { PHYSFS_deregisterArchiver(aasset::g_AAssetArchiver.info.extension); return false; } isVirtualArchiveInitialized = true; return true; } void deinitializeVirtualArchive() { if (isVirtualArchiveInitialized) { PHYSFS_deregisterArchiver(aasset::g_AAssetArchiver.info.extension); isVirtualArchiveInitialized = false; } } bool checkFusedGame(void **physfsIO_Out) { PHYSFS_Io *&io = *(PHYSFS_Io **) physfsIO_Out; AAssetManager *assetManager = getAssetManager(); // Prefer main.lua inside assets/ folder AAsset *asset = AAssetManager_open(assetManager, "main.lua", AASSET_MODE_STREAMING); if (asset) { AAsset_close(asset); io = nullptr; return true; } // If there's no main.lua inside assets/ try game.love asset = AAssetManager_open(assetManager, "game.love", AASSET_MODE_RANDOM); if (asset) { io = aasset::AssetInfo::fromAAsset(assetManager, "game.love", asset); return true; } // Not found return false; } const char *getCRequirePath() { static bool initialized = false; static std::string path; if (!initialized) { JNIEnv *env = (JNIEnv*) SDL_GetAndroidJNIEnv(); jobject activity = (jobject) SDL_GetAndroidActivity(); jclass clazz = env->GetObjectClass(activity); static jmethodID getCRequireMethod = env->GetMethodID(clazz, "getCRequirePath", "()Ljava/lang/String;"); jstring cpath = (jstring) env->CallObjectMethod(activity, getCRequireMethod); const char *utf = env->GetStringUTFChars(cpath, nullptr); if (utf) { path = utf; env->ReleaseStringUTFChars(cpath, utf); } env->DeleteLocalRef(cpath); env->DeleteLocalRef(activity); env->DeleteLocalRef(clazz); } return path.c_str(); } void *getIOFromContentProtocol(const char *uri) { // Note: The static_cast is necessary, otherwise the pointer is shifted. return static_cast(new SDLIO(uri)); } const char *getArg0() { static PHYSFS_AndroidInit androidInit = {nullptr, nullptr}; androidInit.jnienv = SDL_GetAndroidJNIEnv(); androidInit.context = SDL_GetAndroidActivity(); return (const char *) &androidInit; } } // android } // love #endif // LOVE_ANDROID ================================================ FILE: src/common/android.h ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ #ifndef LOVE_ANDROID_H #define LOVE_ANDROID_H #include "config.h" #ifdef LOVE_ANDROID #include namespace love { namespace android { /** * Enables or disables immersive mode where the navigation bar is hidden. **/ void setImmersive(bool immersive_active); bool getImmersive(); /** * Gets the scale factor of the window's screen, e.g. on Retina displays this * will return 2.0. **/ double getScreenScale(); /** * Gets the window safe area, e.g. phone with notch display. * Returns false if safe area is not set. **/ bool getSafeArea(int &top, int &left, int &bottom, int &right); void vibrate(double seconds); bool directoryExists(const char *path); bool mkdir(const char *path); bool createStorageDirectories(); void fixupPermissionSingleFile(const std::string &savedir, const std::string &path, int mode = 0666); void fixupExternalStoragePermission(const std::string &savedir, const std::string &path); bool hasBackgroundMusic(); bool hasRecordingPermission(); void requestRecordingPermission(); void showRecordingPermissionMissingDialog(); /** * Initialize Android AAsset virtual archive. * @return true if successful. */ bool initializeVirtualArchive(); /** * Deinitialize Android AAsset virtual archive. * @return true if successful. */ void deinitializeVirtualArchive(); /** * Retrieve the fused game inside the APK * @param physfsIO_Out Pointer to PHYSFS_Io* struct * @return true if there's game inside the APK. If physfsIO_Out is not null, then it contains * the game.love which needs to be mounted to root. false if it's not fused, in which case * physfsIO_Out is undefined. */ bool checkFusedGame(void **physfsIO_Out); const char *getCRequirePath(); /** * Convert "content://" to PHYSFS_Io using SDL_IOStream. * @param path Path with content:// URI * @return PHYSFS_Io casted to void*. */ void *getIOFromContentProtocol(const char *path); /** * Retrieve PHYSFS_AndroidInit structure. * @return Pointer to PHYSFS_AndroidInit structure, casted to pointer of char. */ const char *getArg0(); } // android } // love #endif // LOVE_ANDROID #endif // LOVE_ANDROID_H ================================================ FILE: src/common/apple.h ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ #pragma once #include "config.h" #if defined(LOVE_IOS) || defined(LOVE_MACOS) #include namespace love { namespace apple { enum UserDirectory { USER_DIRECTORY_HOME, USER_DIRECTORY_APPSUPPORT, USER_DIRECTORY_DOCUMENTS, USER_DIRECTORY_DESKTOP, USER_DIRECTORY_CACHES, USER_DIRECTORY_TEMP, }; std::string getUserDirectory(UserDirectory dir); std::string getExecutablePath(); } // apple } // love #endif // defined(LOVE_IOS) || defined(LOVE_MACOS) ================================================ FILE: src/common/apple.mm ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ #include "apple.h" #if defined(LOVE_IOS) || defined(LOVE_MACOS) #import namespace love { namespace apple { std::string getUserDirectory(UserDirectory dir) { std::string path; NSSearchPathDirectory nsdir = NSTrashDirectory; @autoreleasepool { switch (dir) { case USER_DIRECTORY_HOME: return NSHomeDirectory().UTF8String; case USER_DIRECTORY_APPSUPPORT: nsdir = NSApplicationSupportDirectory; break; case USER_DIRECTORY_DOCUMENTS: nsdir = NSDocumentDirectory; break; case USER_DIRECTORY_DESKTOP: nsdir = NSDesktopDirectory; break; case USER_DIRECTORY_CACHES: nsdir = NSCachesDirectory; break; case USER_DIRECTORY_TEMP: nsdir = NSItemReplacementDirectory; break; } NSArray *dirs = [[NSFileManager defaultManager] URLsForDirectory:nsdir inDomains:NSUserDomainMask]; if (dirs.count > 0) path = [dirs[0].path UTF8String]; } return path; } std::string getExecutablePath() { @autoreleasepool { return std::string([NSBundle mainBundle].executablePath.UTF8String); } } } // apple } // love #endif // defined(LOVE_IOS) || defined(LOVE_MACOS) ================================================ FILE: src/common/b64.cpp ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ #include "b64.h" #include "Exception.h" #include #include namespace love { // Translation table as described in RFC1113 static const char cb64[]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; // Translation table to decode (created by Bob Trower) static const char cd64[]="|$$$}rstuvwxyz{$$$$$$$>?@ABCDEFGHIJKLMNOPQRSTUVW$$$$$$XYZ[\\]^_`abcdefghijklmnopq"; /** * encode 3 8-bit binary bytes as 4 '6-bit' characters **/ static void b64_encode_block(char in[3], char out[4], int len) { out[0] = (char) cb64[(int)((in[0] & 0xfc) >> 2)]; out[1] = (char) cb64[(int)(((in[0] & 0x03) << 4) | ((in[1] & 0xf0) >> 4))]; out[2] = (char) (len > 1 ? cb64[(int)(((in[1] & 0x0f) << 2) | ((in[2] & 0xc0) >> 6))] : '='); out[3] = (char) (len > 2 ? cb64[(int)(in[2] & 0x3f)] : '='); } char *b64_encode(const char *src, size_t srclen, size_t linelen, size_t &dstlen) { if (linelen == 0) linelen = std::numeric_limits::max(); size_t blocksout = 0; size_t srcpos = 0; size_t adjustment = (srclen % 3) ? (3 - (srclen % 3)) : 0; size_t paddedlen = ((srclen + adjustment) / 3) * 4; dstlen = paddedlen + paddedlen / linelen; if (dstlen == 0) return nullptr; char *dst = nullptr; try { dst = new char[dstlen + 1]; } catch (std::exception &) { throw love::Exception("Out of memory."); } size_t dstpos = 0; while (srcpos < srclen) { char in[3] = {0}; char out[4] = {0}; int len = 0; for (int i = 0; i < 3; i++) { if (srcpos >= srclen) break; in[i] = src[srcpos++]; len++; } if (len > 0) { b64_encode_block(in, out, len); for (int i = 0; i < 4 && dstpos < dstlen; i++, dstpos++) dst[dstpos] = out[i]; blocksout++; } if (blocksout >= linelen / 4 || srcpos >= srclen) { if (blocksout > 0 && dstpos < dstlen) dst[dstpos++] = '\n'; blocksout = 0; } } dst[dstpos] = '\0'; return dst; } static void b64_decode_block(char in[4], char out[3]) { out[0] = (char)(in[0] << 2 | in[1] >> 4); out[1] = (char)(in[1] << 4 | in[2] >> 2); out[2] = (char)(((in[2] << 6) & 0xc0) | in[3]); } char *b64_decode(const char *src, size_t srclen, size_t &size) { size_t paddedsize = (srclen / 4) * 3; char *dst = nullptr; try { dst = new char[paddedsize]; } catch (std::exception &) { throw love::Exception("Out of memory."); } char *d = dst; char in[4] = {0}; char out[3] = {0}; size_t i, len, srcpos = 0; while (srcpos <= srclen) { for (len = 0, i = 0; i < 4 && srcpos <= srclen; i++) { char v = 0; while (srcpos <= srclen && v == 0) { v = src[srcpos++]; v = (char)((v < 43 || v > 122) ? 0 : cd64[v - 43]); if (v != 0) v = (char)((v == '$') ? 0 : v - 61); } if (srcpos <= srclen) { len++; if (v != 0) in[i] = (char)(v - 1); } else in[i] = 0; } if (len) { b64_decode_block(in, out); for (i = 0; i < len - 1; i++) *(d++) = out[i]; } } size = (size_t)(ptrdiff_t) (d - dst); return dst; } } // love ================================================ FILE: src/common/b64.h ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ #include "config.h" #include #ifndef LOVE_B64_H #define LOVE_B64_H namespace love { /** * Base64-encode data. * * @param src The data to encode. * @param srclen The size in bytes of the data. * @param linelen The maximum length of each line in the encoded string. * 0 indicates no maximum length. * @param dstlen The length of the encoded string is stored here. * @return A string containing the base64-encoded data (allocated with new[]). */ char *b64_encode(const char *src, size_t srclen, size_t linelen, size_t &dstlen); /** * Decode base64 encoded data. * * @param src The string containing the base64 data. * @param srclen The length of the string. * @param dstlen The size of the binary data is stored here. * @return A chunk of memory containing the binary data (allocated with new[]). */ char *b64_decode(const char *src, size_t srclen, size_t &dstlen); } // love #endif // LOVE_B64_H ================================================ FILE: src/common/config.h ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ #ifndef LOVE_CONFIG_H #define LOVE_CONFIG_H // Platform stuff. #if defined(WIN32) || defined(_WIN32) # define LOVE_WINDOWS 1 # include # if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) # define LOVE_WINDOWS_UWP 1 # define LOVE_NO_MODPLUG 1 # endif #endif #if defined(linux) || defined(__linux) || defined(__linux__) # define LOVE_LINUX 1 #endif #if defined(__ANDROID__) # define LOVE_ANDROID 1 // Needed for ENet # define HAS_SOCKLEN_T 1 #endif #if defined(__APPLE__) # include # if TARGET_OS_IPHONE # define LOVE_IOS 1 # elif TARGET_OS_MAC # define LOVE_MACOS 1 # endif #endif #if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) // I know it's not linux, but it seems most "linux-only" code is bsd-compatible # define LOVE_LINUX 1 #endif // Endianness. #if defined(__ppc__) || defined(__ppc) || defined(__powerpc__) || defined(__powerpc) # define LOVE_BIG_ENDIAN 1 #else # define LOVE_LITTLE_ENDIAN 1 #endif // SSE instructions. #if defined(__SSE__) # define LOVE_SIMD_SSE #elif defined(_MSC_VER) # if defined(_M_AMD64) || defined(_M_X64) # define LOVE_SIMD_SSE # elif _M_IX86_FP # define LOVE_SIMD_SSE # endif #endif // NEON instructions. #if defined(__ARM_NEON) || defined(_M_ARM64) # define LOVE_SIMD_NEON #endif // Warnings. #ifndef _CRT_SECURE_NO_WARNINGS # define _CRT_SECURE_NO_WARNINGS #endif // Preferably, and ironically, this macro should go unused. #ifndef LOVE_UNUSED # define LOVE_UNUSED(x) (void)sizeof(x) #endif // Warn on unused return values #ifdef __GNUC__ # define LOVE_WARN_UNUSED __attribute__((warn_unused_result)) #elif _MSC_VER # define LOVE_WARN_UNUSED _Check_return_ #else # define LOVE_WARN_UNUSED #endif #ifndef LOVE_BUILD # define LOVE_BUILD # define LOVE_BUILD_STANDALONE # define LOVE_BUILD_EXE //# define LOVE_BUILD_DLL #endif // DLL-stuff. #if defined(_MSC_VER) || defined(__MINGW32__) # define LOVE_EXPORT __declspec(dllexport) #elif defined(__GNUC__) || defined(__clang__) # define LOVE_EXPORT __attribute__((visibility("default"))) #else # define LOVE_EXPORT #endif #if defined(LOVE_WINDOWS) #ifndef LOVE_WINDOWS_UWP # define LOVE_LEGENDARY_CONSOLE_IO_HACK #endif // LOVE_WINDOWS_UWP #ifndef __MINGW32__ # define NOMINMAX #endif #endif #if defined(LOVE_MACOS) || defined(LOVE_IOS) # define LOVE_LEGENDARY_APP_ARGV_HACK #endif #if defined(LOVE_WINDOWS) || defined(LOVE_LINUX) || defined(LOVE_ANDROID) # define LOVE_GRAPHICS_VULKAN #endif #if defined(LOVE_MACOS) || defined(LOVE_IOS) # define LOVE_GRAPHICS_METAL #endif // Autotools config.h #ifdef HAVE_CONFIG_H # include <../config.h> # undef VERSION # ifdef WORDS_BIGENDIAN # undef LOVE_LITTLE_ENDIAN # define LOVE_BIG_ENDIAN 1 # else # undef LOVE_BIG_ENDIAN # define LOVE_LITTLE_ENDIAN 1 # endif #else # define LOVE_ENABLE_LOVE # define LOVE_ENABLE_AUDIO # define LOVE_ENABLE_DATA # define LOVE_ENABLE_EVENT # define LOVE_ENABLE_FILESYSTEM # define LOVE_ENABLE_FONT # define LOVE_ENABLE_GRAPHICS # define LOVE_ENABLE_IMAGE # define LOVE_ENABLE_JOYSTICK # define LOVE_ENABLE_KEYBOARD # define LOVE_ENABLE_MATH # define LOVE_ENABLE_MOUSE # define LOVE_ENABLE_PHYSICS # define LOVE_ENABLE_SENSOR # define LOVE_ENABLE_SOUND # define LOVE_ENABLE_SYSTEM # define LOVE_ENABLE_THREAD # define LOVE_ENABLE_TIMER # define LOVE_ENABLE_TOUCH # define LOVE_ENABLE_VIDEO # define LOVE_ENABLE_WINDOW # define LOVE_ENABLE_ENET # define LOVE_ENABLE_LUASOCKET # define LOVE_ENABLE_LUA53 # define LOVE_ENABLE_LUAHTTPS #endif // Check we have a sane configuration #if !defined(LOVE_WINDOWS) && !defined(LOVE_LINUX) && !defined(LOVE_IOS) && !defined(LOVE_MACOS) && !defined(LOVE_ANDROID) # error Could not detect target platform #endif #if !defined(LOVE_LITTLE_ENDIAN) && !defined(LOVE_BIG_ENDIAN) # error Could not detect endianness #endif #endif // LOVE_CONFIG_H ================================================ FILE: src/common/delay.cpp ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ #include "delay.h" #include namespace love { void sleep(double ms) { // We don't need to initialize the SDL timer subsystem for SDL_Delay to // function - and doing so causes SDL to create a worker thread. SDL_DelayNS(SDL_NS_PER_MS * ms); } } // love ================================================ FILE: src/common/delay.h ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ #ifndef DELAY_H_ #define DELAY_H_ namespace love { void sleep(double ms); } // namespace love #endif // DELAY_H_ ================================================ FILE: src/common/deprecation.cpp ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ #include "common/config.h" #include "deprecation.h" #include "thread/threads.h" #include #include #include namespace love { static std::map *deprecated = nullptr; static std::vector *deprecatedList = nullptr; static std::atomic initCount; static thread::Mutex *mutex = nullptr; static bool outputEnabled = false; void initDeprecation() { if (initCount.fetch_add(1) == 0) { mutex = thread::newMutex(); // These are heap-allocated because we want to clear them on deinit, // and deinit may be called when the program is shutting down in the // middle of static variable cleanup (eg in the Math module destructor). // Calling std::map::clear() in that case was causing segfaults. deprecated = new std::map(); deprecatedList = new std::vector(); } } void deinitDeprecation() { if (initCount.fetch_sub(1) == 1) { delete deprecated; delete deprecatedList; delete mutex; deprecated = nullptr; deprecatedList = nullptr; mutex = nullptr; } } static void printDeprecationNotice(const DeprecationInfo &info) { std::string notice = getDeprecationNotice(info, true); printf("LOVE - Warning: %s\n", notice.c_str()); } void setDeprecationOutputEnabled(bool enable) { if (enable == outputEnabled) return; outputEnabled = enable; if (enable) { GetDeprecated deprecated; for (const DeprecationInfo *info : deprecated.all) { if (info->uses == 1) printDeprecationNotice(*info); } } } bool isDeprecationOutputEnabled() { return outputEnabled; } std::string getDeprecationNotice(const DeprecationInfo &info, bool usewhere) { std::stringstream notice; if (usewhere) notice << info.where; notice << "Using deprecated "; if (info.apiType == API_FUNCTION) notice << "function "; else if (info.apiType == API_FUNCTION_VARIANT) notice << "function variant in "; else if (info.apiType == API_METHOD) notice << "method "; else if (info.apiType == API_METHOD_VARIANT) notice << "method variant in "; else if (info.apiType == API_CALLBACK) notice << "callback "; else if (info.apiType == API_FIELD) notice << "field "; else if (info.apiType == API_CONSTANT) notice << "constant "; notice << info.name; if (info.type == DEPRECATED_REPLACED && !info.replacement.empty()) notice << " (replaced by " << info.replacement << ")"; else if (info.type == DEPRECATED_RENAMED && !info.replacement.empty()) notice << " (renamed to " << info.replacement << ")"; return notice.str(); } GetDeprecated::GetDeprecated() : all(*deprecatedList) { if (mutex != nullptr) mutex->lock(); } GetDeprecated::~GetDeprecated() { if (mutex != nullptr) mutex->unlock(); } MarkDeprecated::MarkDeprecated(const char *name, APIType api) : MarkDeprecated(name, api, DEPRECATED_NO_REPLACEMENT, nullptr) { } MarkDeprecated::MarkDeprecated(const char *name, APIType api, DeprecationType type, const char *replacement) : info(nullptr) { if (mutex != nullptr) mutex->lock(); auto it = deprecated->find(name); if (it != deprecated->end()) { it->second.uses++; info = &it->second; } else { DeprecationInfo newinfo = {}; newinfo.type = type; newinfo.apiType = api; newinfo.uses = 1; newinfo.name = name; if (replacement != nullptr) newinfo.replacement = replacement; auto inserted = deprecated->insert(std::make_pair(newinfo.name, newinfo)); info = &inserted.first->second; deprecatedList->push_back(info); } } MarkDeprecated::~MarkDeprecated() { if (outputEnabled && info != nullptr && info->uses == 1) printDeprecationNotice(*info); if (mutex != nullptr) mutex->unlock(); } STRINGMAP_BEGIN(APIType, API_MAX_ENUM, apiType) { { "function", API_FUNCTION }, { "functionvariant", API_FUNCTION_VARIANT }, { "method", API_METHOD }, { "methodvariant", API_METHOD_VARIANT }, { "callback", API_CALLBACK }, { "field", API_FIELD }, { "constant", API_CONSTANT }, { "custom", API_CUSTOM }, } STRINGMAP_END(APIType, API_MAX_ENUM, apiType) STRINGMAP_BEGIN(DeprecationType, DEPRECATED_MAX_ENUM, deprecationType) { { "noreplacement", DEPRECATED_NO_REPLACEMENT }, { "replaced", DEPRECATED_REPLACED }, { "renamed", DEPRECATED_RENAMED }, } STRINGMAP_END(DeprecationType, DEPRECATED_MAX_ENUM, deprecationType) } // love ================================================ FILE: src/common/deprecation.h ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ #pragma once #include "int.h" #include "StringMap.h" #include #include namespace love { enum APIType { API_FUNCTION, API_FUNCTION_VARIANT, API_METHOD, API_METHOD_VARIANT, API_CALLBACK, API_FIELD, API_CONSTANT, API_CUSTOM, API_MAX_ENUM }; enum DeprecationType { DEPRECATED_NO_REPLACEMENT, DEPRECATED_REPLACED, DEPRECATED_RENAMED, DEPRECATED_MAX_ENUM }; struct DeprecationInfo { DeprecationType type; APIType apiType; int64 uses; std::string name; std::string replacement; std::string where; }; void initDeprecation(); void deinitDeprecation(); void setDeprecationOutputEnabled(bool enable); bool isDeprecationOutputEnabled(); std::string getDeprecationNotice(const DeprecationInfo &info, bool usewhere); struct GetDeprecated { GetDeprecated(); ~GetDeprecated(); const std::vector &all; }; struct MarkDeprecated { MarkDeprecated(const char *name, APIType api); MarkDeprecated(const char *name, APIType api, DeprecationType type, const char *replacement); ~MarkDeprecated(); DeprecationInfo *info; }; STRINGMAP_DECLARE(APIType); STRINGMAP_DECLARE(DeprecationType); } // love ================================================ FILE: src/common/floattypes.cpp ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ #include "floattypes.h" #include #include namespace love { // Code from ftp://www.fox-toolkit.org/pub/fasthalffloatconversion.pdf static bool halfInitialized = false; // tables for half -> float conversions static uint32 mantissatable[2048]; static uint16 offsettable[64]; static uint32 exponenttable[64]; // tables for float -> half conversions static uint16 basetable[512]; static uint8 shifttable[512]; static uint32 convertMantissa(uint32 i) { uint32 m = i << 13; // Zero pad mantissa bits uint32 e = 0; // Zero exponent while (!(m & 0x00800000)) // While not normalized { e -= 0x00800000; // Decrement exponent (1<<23) m <<= 1; // Shift mantissa } m &= ~(0x00800000); // Clear leading 1 bit e += 0x38800000; // Adjust bias ((127-14)<<23) return m | e; // Return combined number } void float16Init() { if (halfInitialized) return; halfInitialized = true; // tables for float16 -> float32 conversions. mantissatable[0] = 0; for (uint32 i = 1; i < 1024; i++) mantissatable[i] = convertMantissa(i); for (uint32 i = 1024; i < 2048; i++) mantissatable[i] = 0x38000000 + ((i - 1024) << 13); exponenttable[0] = 0; exponenttable[32] = 0x80000000; for (uint32 i = 0; i < 31; i++) exponenttable[i] = i << 23; for (uint32 i = 33; i < 63; i++) exponenttable[i] = 0x80000000 + ((i - 32) << 23); exponenttable[31] = 0x47800000; exponenttable[63] = 0xC7800000; for (int i = 0; i < 64; i++) { if (i == 0 || i == 32) offsettable[i] = 0; else offsettable[i] = 1024; } // tables for float32 -> float16 conversions. for (uint32 i = 0; i < 256; i++) { int e = (int) i - 127; if (e < -24) // Very small numbers map to zero { basetable[i | 0x000] = 0x0000; basetable[i | 0x100] = 0x8000; shifttable[i | 0x000] = 24; shifttable[i | 0x100] = 24; } else if (e < -14) // Small numbers map to denorms { basetable[i | 0x000] = (0x0400 >> (-e - 14)); basetable[i | 0x100] = (0x0400 >> (-e - 14)) | 0x8000; shifttable[i | 0x000] = -e - 1; shifttable[i | 0x100] = -e - 1; } else if (e <= 15) // Normal numbers just lose precision { basetable[i | 0x000] = ((e + 15) << 10); basetable[i | 0x100] = ((e + 15) << 10) | 0x8000; shifttable[i | 0x000] = 13; shifttable[i | 0x100] = 13; } else if (e < 128) // Large numbers map to Infinity { basetable[i | 0x000] = 0x7C00; basetable[i | 0x100] = 0xFC00; shifttable[i | 0x000] = 24; shifttable[i | 0x100] = 24; } else // Infinity and NaN's stay Infinity and NaN's { basetable[i | 0x000] = 0x7C00; basetable[i | 0x100] = 0xFC00; shifttable[i | 0x000] = 13; shifttable[i | 0x100] = 13; } } } static inline uint32 asuint32(float f) { union { float f; uint32 u; } conv; conv.f = f; return conv.u; } static inline float asfloat32(uint32 u) { union { float f; uint32 u; } conv; conv.u = u; return conv.f; } float float16to32(float16 f) { return asfloat32(mantissatable[offsettable[f >> 10] + (f & 0x3FF)] + exponenttable[f >> 10]); } float16 float32to16(float f) { uint32 u = asuint32(f); return basetable[(u >> 23) & 0x1FF] + ((u & 0x007FFFFF) >> shifttable[(u >> 23) & 0x1FF]); } // Adapted from https://stackoverflow.com/questions/41532085/how-to-pack-unpack-11-and-10-bit-floats-in-javascript-for-webgl2 float float11to32(float11 f) { uint16 exponent = f >> 6; uint16 mantissa = f & 0x3F; if (exponent == 0) return mantissa == 0 ? 0 : powf(2.0f, -14.0f) * (mantissa / 64.0f); if (exponent < 31) return powf(2.0f, exponent - 15) * (1.0f + mantissa / 64.0f); return mantissa == 0 ? std::numeric_limits::infinity() : std::numeric_limits::quiet_NaN(); } float11 float32to11(float f) { const uint16 EXPONENT_BITS = 0x1F; const uint16 EXPONENT_SHIFT = 6; const uint16 EXPONENT_BIAS = 15; const uint16 MANTISSA_BITS = 0x3F; const uint16 MANTISSA_SHIFT = (23 - EXPONENT_SHIFT); const uint16 MAX_EXPONENT = (EXPONENT_BITS << EXPONENT_SHIFT); uint32 u = asuint32(f); if (u & 0x80000000) return 0; // Negative values go to 0. // Map exponent to the range [-127,128] int32 exponent = (int32)((u >> 23) & 0xFF) - 127; uint32 mantissa = u & 0x007FFFFF; if (exponent > 15) // Infinity or NaN return MAX_EXPONENT | (exponent == 128 ? (mantissa & MANTISSA_BITS) : 0); else if (exponent <= -15) return 0; exponent += EXPONENT_BIAS; return ((uint16)exponent << EXPONENT_SHIFT) | (mantissa >> MANTISSA_SHIFT); } float float10to32(float10 f) { uint16 exponent = f >> 5; uint16 mantissa = f & 0x1F; if (exponent == 0) return mantissa == 0 ? 0 : powf(2.0f, -14.0f) * (mantissa / 32.0f); if (exponent < 31) return powf(2.0f, exponent - 15) * (1.0f + mantissa / 32.0f); return mantissa == 0 ? std::numeric_limits::infinity() : std::numeric_limits::quiet_NaN(); } float10 float32to10(float f) { const uint16 EXPONENT_BITS = 0x1F; const uint16 EXPONENT_SHIFT = 5; const uint16 EXPONENT_BIAS = 15; const uint16 MANTISSA_BITS = 0x1F; const uint16 MANTISSA_SHIFT = (23 - EXPONENT_SHIFT); const uint16 MAX_EXPONENT = (EXPONENT_BITS << EXPONENT_SHIFT); uint32 u = asuint32(f); if (u & 0x80000000) return 0; // Negative values go to 0. // Map exponent to the range [-127,128] int32 exponent = (int32)((u >> 23) & 0xFF) - 127; uint32 mantissa = u & 0x007FFFFF; if (exponent > 15) // Infinity or NaN return MAX_EXPONENT | (exponent == 128 ? (mantissa & MANTISSA_BITS) : 0); else if (exponent <= -15) return 0; exponent += EXPONENT_BIAS; return ((uint16)exponent << EXPONENT_SHIFT) | (mantissa >> MANTISSA_SHIFT); } } // love ================================================ FILE: src/common/floattypes.h ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ #pragma once #include "int.h" namespace love { typedef uint16 float16; typedef uint16 float11; typedef uint16 float10; void float16Init(); float float16to32(float16 f); float16 float32to16(float f); float float11to32(float11 f); float11 float32to11(float f); float float10to32(float10 f); float10 float32to10(float f); } // love ================================================ FILE: src/common/int.h ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ #ifndef LOVE_INT_H #define LOVE_INT_H // C standard sized integer types. #include #define LOVE_INT8_MAX 0x7F #define LOVE_UINT8_MAX 0xFF #define LOVE_INT16_MAX 0x7FFF #define LOVE_UINT16_MAX 0xFFFF #define LOVE_INT32_MAX 0x7FFFFFFF #define LOVE_UINT32_MAX 0xFFFFFFFF #define LOVE_INT64_MAX 0x7FFFFFFFFFFFFFFF #define LOVE_UINT64_MAX 0xFFFFFFFFFFFFFFFF namespace love { typedef int8_t int8; typedef uint8_t uint8; typedef int16_t int16; typedef uint16_t uint16; typedef int32_t int32; typedef uint32_t uint32; typedef int64_t int64; typedef uint64_t uint64; static inline uint16 swapuint16(uint16 x) { return (x >> 8) | (x << 8); } static inline uint32 swapuint32(uint32 x) { return ((x & 0x000000FF) << 24) | ((x & 0x0000FF00) << 8) | ((x & 0x00FF0000) >> 8) | ((x & 0xFF000000) >> 24); } static inline uint64 swapuint64(uint64 x) { return ((x << 56) & 0xFF00000000000000ULL) | ((x << 40) & 0x00FF000000000000ULL) | ((x << 24) & 0x0000FF0000000000ULL) | ((x << 8) & 0x000000FF00000000ULL) | ((x >> 8) & 0x00000000FF000000ULL) | ((x >> 24) & 0x0000000000FF0000ULL) | ((x >> 40) & 0x000000000000FF00ULL) | ((x >> 56) & 0x00000000000000FFULL); } } // love #endif // LOVE_INT_H ================================================ FILE: src/common/ios.h ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ #ifndef LOVE_IOS_H #define LOVE_IOS_H #include "config.h" #ifdef LOVE_IOS #include "common/math.h" #include struct SDL_Window; namespace love { namespace ios { /** * Gets the filepath of the first detected love file. The main .app Bundle is * searched first, and then the app's Documents folder. **/ std::string getLoveInResources(bool &fused); /** * Causes devices with vibration support to vibrate for about 0.5 seconds. **/ void vibrate(); /** * Enable mix mode (e.g. with background music apps) and playback with a muted device. **/ bool setAudioMixWithOthers(bool mixEnabled); /** * Returns whether another application is playing audio. **/ bool hasBackgroundMusic(); /** * Registers notifications to handle and restore audio interruptions **/ void initAudioSessionInterruptionHandler(); void destroyAudioSessionInterruptionHandler(); /** * Gets the area in the window that is safe for UI to render to (not covered by * the status bar, notch, etc.) **/ Rect getSafeArea(SDL_Window *window); } // ios } // love #endif // LOVE_IOS #endif // LOVE_IOS_H ================================================ FILE: src/common/ios.mm ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ #include "ios.h" #include "apple.h" using namespace love::apple; #ifdef LOVE_IOS #import #import #import #import #include "modules/audio/Audio.h" #include #if __has_include() #include #include #include #else #include #include #include #include #endif static NSArray *getLovesInDocuments(); static bool deleteFileInDocuments(NSString *filename); @interface LOVETableViewController : UITableViewController - (instancetype)initWithGameList:(NSArray *)list; @property (nonatomic) NSMutableArray *gameList; @property (nonatomic, readonly, copy) NSString *selectedGame; @end @implementation LOVETableViewController - (instancetype)initWithGameList:(NSArray *)list { if ((self = [super init])) { _gameList = [[NSMutableArray alloc] initWithArray:list copyItems:YES]; self.title = @"LÖVE Games"; self.navigationItem.rightBarButtonItem = self.editButtonItem; } return self; } - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { #pragma unused(tableView) #pragma unused(section) // We want to list all games plus the no-game screen. return self.gameList.count + 1; } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *cellIdentifier = @"LOVETableCell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier]; if (cell == nil) cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellIdentifier]; if (indexPath.row < (NSInteger) self.gameList.count) cell.textLabel.text = self.gameList[indexPath.row]; else cell.textLabel.text = @"No-game screen"; return cell; } - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { #pragma unused(tableView) if (indexPath.row < (NSInteger) self.gameList.count) _selectedGame = [(NSString *)(self.gameList[indexPath.row]) copy]; else { // We test against nil to check if a game has been selected, so we'll // just use an empty string instead to represent the no-game screen. _selectedGame = @""; } } - (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath { if (editingStyle != UITableViewCellEditingStyleDelete) return; if (indexPath.row >= (NSInteger) self.gameList.count) return; NSString *filename = self.gameList[indexPath.row]; // Delete the file. if (deleteFileInDocuments(filename)) { [self.gameList removeObjectAtIndex:indexPath.row]; [tableView deleteRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationFade]; } } - (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath; { #pragma unused(tableView) // The no-game screen isn't removable. return indexPath.row < (NSInteger) self.gameList.count; } @end static NSArray *getLovesInDocuments() { std::string docdir = getUserDirectory(USER_DIRECTORY_DOCUMENTS); NSMutableArray *paths = [NSMutableArray new]; NSFileManager *manager = [NSFileManager defaultManager]; NSDirectoryEnumerator *enumerator = [manager enumeratorAtPath:@(docdir.c_str())]; NSString *path = nil; while ((path = [enumerator nextObject])) { // Add .love files plus folders that contain main.lua to our list. if ([path.pathExtension isEqualToString:@"love"]) [paths addObject:path]; else if ([path.lastPathComponent isEqualToString:@"main.lua"]) [paths addObject:path.stringByDeletingLastPathComponent]; } [paths sortUsingSelector:@selector(localizedCaseInsensitiveCompare:)]; return paths; } static bool deleteFileInDocuments(NSString *filename) { std::string docdir = getUserDirectory(USER_DIRECTORY_DOCUMENTS); NSString *file = [@(docdir.c_str()) stringByAppendingPathComponent:filename]; bool success = [[NSFileManager defaultManager] removeItemAtPath:file error:nil]; if (success) NSLog(@"Deleted file %@ in Documents folder.", filename); return success; } #if SDL_VERSION_ATLEAST(3, 0, 0) static bool #else static int #endif dropFileEventFilter(void *userdata, SDL_Event *event) { @autoreleasepool { #if SDL_VERSION_ATLEAST(3, 0, 0) if (event->type != SDL_EVENT_DROP_FILE) #else if (event->type != SDL_DROPFILE) #endif return 1; #if SDL_VERSION_ATLEAST(3, 0, 0) NSString *fname = @(event->drop.data); #else NSString *fname = @(event->drop.file); #endif NSFileManager *fmanager = [NSFileManager defaultManager]; if ([fmanager fileExistsAtPath:fname] && [fname.pathExtension isEqual:@"love"]) { std::string docdir = getUserDirectory(USER_DIRECTORY_DOCUMENTS); NSString *documents = @(docdir.c_str()); documents = documents.stringByStandardizingPath.stringByResolvingSymlinksInPath; fname = fname.stringByStandardizingPath.stringByResolvingSymlinksInPath; // Is the file inside the Documents directory? if ([fname hasPrefix:documents]) { LOVETableViewController *vc = (__bridge LOVETableViewController *) userdata; // Update the game list. NSArray *games = getLovesInDocuments(); vc.gameList = [[NSMutableArray alloc] initWithArray:games copyItems:YES]; [vc.tableView reloadData]; #if !SDL_VERSION_ATLEAST(3, 0, 0) SDL_free(event->drop.file); #endif return 0; } } return 1; } } @interface LoveAudioInterruptionListener : NSObject @end @implementation LoveAudioInterruptionListener + (id) shared { // thread-safe singleton static dispatch_once_t pred = 0; __strong static id _shared = nil; dispatch_once(&pred, ^{ _shared = [[self alloc] init]; }); return _shared; } - (void)audioSessionInterruption:(NSNotification *)note { @synchronized (self) { auto audio = love::Module::getInstance(love::Module::M_AUDIO); if (!audio) { NSLog(@"LoveAudioInterruptionListener could not get love audio module"); return; } NSNumber *type = note.userInfo[AVAudioSessionInterruptionTypeKey]; if (type.unsignedIntegerValue == AVAudioSessionInterruptionTypeBegan) audio->pauseContext(); else audio->resumeContext(); } } - (void)applicationBecameActive:(NSNotification *)note { @synchronized (self) { auto audio = love::Module::getInstance(love::Module::M_AUDIO); if (!audio) { NSLog(@"ERROR:could not get love audio module"); return; } audio->resumeContext(); } } @end // LoveAudioInterruptionListener namespace love { namespace ios { /** * Displays a full-screen list of available LOVE games for the user to choose. * Returns the index of the selected game from the list. The list of games * includes the no-game screen, and the function will return an index outside * of the array's range if that is selected. **/ static NSString *showGameList(NSArray *filenames) { // Game list view controller. LOVETableViewController *tablecontroller = [[LOVETableViewController alloc] initWithGameList:filenames]; // Navigation view controller (only used for the header bar right now.) // Contains the game list view/controller. UINavigationController *navcontroller = [[UINavigationController alloc] initWithRootViewController:tablecontroller]; UIWindow *window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; window.rootViewController = navcontroller; SDL_EventFilter oldfilter = nullptr; void *oldudata = nullptr; SDL_GetEventFilter(&oldfilter, &oldudata); // Manually retain the table VC and use it for the event filter userdata. // We need to set a custom event filter to update the table when .love files // are opened by the user. void *tableudata = (void *) CFBridgingRetain(tablecontroller); SDL_SetEventFilter(dropFileEventFilter, tableudata); [window makeKeyAndVisible]; // Process events until a game in the list is selected. NSRunLoop *runloop = [NSRunLoop currentRunLoop]; while (tablecontroller.selectedGame == nil) { [runloop runMode:NSDefaultRunLoopMode beforeDate:[NSDate distantPast]]; [runloop runMode:UITrackingRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:1.0/60.0]]; } // The window will get released and cleaned up once we go out of scope. window.hidden = YES; SDL_SetEventFilter(oldfilter, oldudata); CFBridgingRelease(tableudata); return tablecontroller.selectedGame; } std::string getLoveInResources(bool &fused) { fused = false; std::string path; @autoreleasepool { // Start by looking in the main bundle (.app) folder for .love files. NSArray *bundlepaths = [[NSBundle mainBundle] pathsForResourcesOfType:@"love" inDirectory:nil]; if (bundlepaths.count > 0) { // The game should be fused if we have something here. fused = true; return [bundlepaths[0] UTF8String]; } // Otherwise look in the app's Documents directory. The game won't be // fused. NSArray *filepaths = getLovesInDocuments(); // Let the user select a game from the un-fused list. NSString *selectedfile = showGameList(filepaths); // The string length might be 0 if the no-game screen was selected. if (selectedfile != nil && selectedfile.length > 0) { std::string docdir = getUserDirectory(USER_DIRECTORY_DOCUMENTS); NSString *documents = @(docdir.c_str()); path = [documents stringByAppendingPathComponent:selectedfile].UTF8String; } } return path; } void vibrate() { @autoreleasepool { AudioServicesPlaySystemSound(kSystemSoundID_Vibrate); } } bool setAudioMixWithOthers(bool mixEnabled) { @autoreleasepool { NSString *category = AVAudioSessionCategorySoloAmbient; NSError *err; if (mixEnabled) category = AVAudioSessionCategoryAmbient; bool success = [[AVAudioSession sharedInstance] setCategory:category error:&err]; if (!success) NSLog(@"Error in AVAudioSession setCategory: %@", [err localizedDescription]); return success; } } bool hasBackgroundMusic() { @autoreleasepool { AVAudioSession *session = [AVAudioSession sharedInstance]; if ([session respondsToSelector:@selector(secondaryAudioShouldBeSilencedHint)]) return session.secondaryAudioShouldBeSilencedHint; return false; } } void initAudioSessionInterruptionHandler() { @autoreleasepool { AVAudioSession *session = [AVAudioSession sharedInstance]; NSNotificationCenter *center = [NSNotificationCenter defaultCenter]; [center addObserver:[LoveAudioInterruptionListener shared] selector:@selector(audioSessionInterruption:) name:AVAudioSessionInterruptionNotification object:session]; // An interruption end notification is not guaranteed to be sent if // we were previously interrupted... resuming if needed when the app // becomes active seems to be the way to go. [center addObserver:[LoveAudioInterruptionListener shared] selector:@selector(applicationBecameActive:) name:UIApplicationDidBecomeActiveNotification object:nil]; [center addObserver:[LoveAudioInterruptionListener shared] selector:@selector(applicationBecameActive:) name:UIApplicationWillEnterForegroundNotification object:nil]; } } void destroyAudioSessionInterruptionHandler() { [[NSNotificationCenter defaultCenter] removeObserver:[LoveAudioInterruptionListener shared]]; } Rect getSafeArea(SDL_Window *window) { @autoreleasepool { Rect rect = {}; SDL_GetWindowSize(window, &rect.w, &rect.h); #if SDL_VERSION_ATLEAST(3, 0, 0) SDL_PropertiesID props = SDL_GetWindowProperties(window); UIWindow *window = (__bridge UIWindow *) SDL_GetPointerProperty(props, SDL_PROP_WINDOW_UIKIT_WINDOW_POINTER, nullptr); if (window != nil) { UIView *view = window.rootViewController.view; #else SDL_SysWMinfo info = {}; SDL_VERSION(&info.version); if (SDL_GetWindowWMInfo(window, &info)) { UIView *view = info.info.uikit.window.rootViewController.view; #endif if (@available(iOS 11.0, tvOS 11.0, *)) { UIEdgeInsets insets = view.safeAreaInsets; rect.x += insets.left; rect.w -= insets.left; rect.w -= insets.right; rect.y += insets.top; rect.h -= insets.top; rect.h -= insets.bottom; } } return rect; } } } // ios } // love #endif // LOVE_IOS ================================================ FILE: src/common/macos.h ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ #pragma once #include "config.h" #ifdef LOVE_MACOS #include typedef struct SDL_Window SDL_Window; namespace love { namespace macos { /** * Returns the filepath of the first detected love file in the Resources folder * in the main bundle (love.app.) * Returns an empty string if no love file is found. **/ LOVE_EXPORT std::string getLoveInResources(); /** * Checks for drop-file events. Returns the filepath if an event occurred, or * an empty string otherwise. **/ LOVE_EXPORT std::string checkDropEvents(); /** * Bounce the dock icon, if the app isn't in the foreground. **/ void requestAttention(bool continuous); /** * Sets whether vsync is enabled for the given CAMetalLayer **/ void setMetalLayerVSync(void *metallayer, bool vsync); bool getMetalLayerVSync(void *metallayer); /** * Explicitly sets the window's color space to be sRGB - which stops the OS * from interpreting the backbuffer output as P3 on P3-capable displays. **/ void setWindowSRGBColorSpace(SDL_Window *window); } // macos } // love #endif // LOVE_MACOS ================================================ FILE: src/common/macos.mm ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ #include "macos.h" #ifdef LOVE_MACOS #import #import #import #if __has_include() #include #else #include #include #endif namespace love { namespace macos { std::string getLoveInResources() { std::string path; @autoreleasepool { // Check to see if there are any .love files in Resources. NSString *lovepath = [[NSBundle mainBundle] pathForResource:nil ofType:@"love"]; if (lovepath != nil) path = lovepath.UTF8String; } return path; } std::string checkDropEvents() { std::string dropstr; SDL_Event event; SDL_InitSubSystem(SDL_INIT_VIDEO); SDL_PumpEvents(); #if SDL_VERSION_ATLEAST(3, 0, 0) if (SDL_PeepEvents(&event, 1, SDL_GETEVENT, SDL_EVENT_DROP_FILE, SDL_EVENT_DROP_FILE) > 0) { if (event.type == SDL_EVENT_DROP_FILE) dropstr = std::string(event.drop.data); } #else if (SDL_PeepEvents(&event, 1, SDL_GETEVENT, SDL_DROPFILE, SDL_DROPFILE) > 0) { if (event.type == SDL_DROPFILE) { dropstr = std::string(event.drop.file); SDL_free(event.drop.file); } } #endif SDL_QuitSubSystem(SDL_INIT_VIDEO); return dropstr; } void requestAttention(bool continuous) { @autoreleasepool { if (continuous) [NSApp requestUserAttention:NSCriticalRequest]; else [NSApp requestUserAttention:NSInformationalRequest]; } } void setMetalLayerVSync(void *metallayer, bool vsync) { @autoreleasepool { if (@available(macOS 10.13, *)) { CAMetalLayer *layer = (__bridge CAMetalLayer *) metallayer; layer.displaySyncEnabled = vsync; } } } bool getMetalLayerVSync(void *metallayer) { @autoreleasepool { if (@available(macOS 10.13, *)) { CAMetalLayer *layer = (__bridge CAMetalLayer *) metallayer; return layer.displaySyncEnabled; } } return true; } void setWindowSRGBColorSpace(SDL_Window *window) { @autoreleasepool { // This works on earlier macOS versions, but performance may be worse // (at least, it was back when I tested in December 2016). if (@available(macOS 11.0, *)) { #if SDL_VERSION_ATLEAST(3, 0, 0) SDL_PropertiesID props = SDL_GetWindowProperties(window); NSWindow *window = (__bridge NSWindow *) SDL_GetPointerProperty(props, SDL_PROP_WINDOW_COCOA_WINDOW_POINTER, nullptr); window.colorSpace = [NSColorSpace sRGBColorSpace]; #else SDL_SysWMinfo info = {}; if (SDL_GetWindowWMInfo(window, &info)) info.info.cocoa.window.colorSpace = [NSColorSpace sRGBColorSpace]; #endif } } } } // macos } // love #endif // LOVE_MACOS ================================================ FILE: src/common/math.h ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ #ifndef LOVE_MATH_H #define LOVE_MATH_H #include // for CHAR_BIT #include // for rand() and RAND_MAX /* Definitions of useful mathematical constants * M_E - e * M_LOG2E - log2(e) * M_LOG10E - log10(e) * M_LN2 - ln(2) * M_LN10 - ln(10) * M_PI - pi * M_PI_2 - pi/2 * M_PI_4 - pi/4 * M_1_PI - 1/pi * M_2_PI - 2/pi * M_2_SQRTPI - 2/sqrt(pi) * M_SQRT2 - sqrt(2) * M_SQRT1_2 - 1/sqrt(2) */ #define LOVE_M_E 2.71828182845904523536 #define LOVE_M_LOG2E 1.44269504088896340736 #define LOVE_M_LOG10E 0.434294481903251827651 #define LOVE_M_LN2 0.693147180559945309417 #define LOVE_M_LN10 2.30258509299404568402 #define LOVE_M_PI 3.14159265358979323846 #define LOVE_M_PI_2 1.57079632679489661923 #define LOVE_M_PI_4 0.785398163397448309616 #define LOVE_M_1_PI 0.318309886183790671538 #define LOVE_M_2_PI 0.636619772367581343076 #define LOVE_M_2_SQRTPI 1.12837916709551257390 #define LOVE_M_SQRT2 1.41421356237309504880 #define LOVE_M_SQRT1_2 0.707106781186547524401 #define LOVE_M_TORAD (float)(LOVE_M_PI/180.0) #define LOVE_M_TODEG (float)(180.0/LOVE_M_PI) #define LOVE_TORAD(x) (float)(x*LOVE_M_TORAD) #define LOVE_TODEG(x) (float)(x*LOVE_M_TODEG) namespace love { struct Rect { int x, y; int w, h; bool operator == (const Rect &rhs) const { return x == rhs.x && y == rhs.y && w == rhs.w && h == rhs.h; } }; inline int nextP2(int x) { x += (x == 0); x--; for (unsigned int i = 1; i < sizeof(int)*CHAR_BIT; i <<= 1) x |= x >> i; return ++x; } inline float nextP2(float x) { return (float) nextP2((int) x); } } // love #endif // LOVE_MATH_H ================================================ FILE: src/common/memory.cpp ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ #include "config.h" #include "memory.h" #include #ifdef LOVE_WINDOWS #define WIN32_LEAN_AND_MEAN #include #include #else #include // Assume POSIX support. #endif namespace love { bool alignedMalloc(void **mem, size_t size, size_t alignment) { #ifdef LOVE_WINDOWS *mem = _aligned_malloc(size, alignment); return *mem != nullptr; #else return posix_memalign(mem, alignment, size) == 0; #endif } void alignedFree(void *mem) { #ifdef LOVE_WINDOWS _aligned_free(mem); #else free(mem); #endif } size_t getPageSize() { #ifdef LOVE_WINDOWS static DWORD size = 0; if (size == 0) { SYSTEM_INFO si; GetSystemInfo(&si); size = si.dwPageSize; } return (size_t) size; #else static const long size = sysconf(_SC_PAGESIZE); return size > 0 ? (size_t) size : 4096; #endif } size_t alignUp(size_t size, size_t alignment) { return (size + alignment - 1) & (~(alignment - 1)); } } // love ================================================ FILE: src/common/memory.h ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ #pragma once #include namespace love { bool alignedMalloc(void **mem, size_t size, size_t alignment); void alignedFree(void *mem); size_t getPageSize(); /** * 'alignment' must be a power of two. **/ size_t alignUp(size_t size, size_t alignment); } // love ================================================ FILE: src/common/pixelformat.cpp ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ #include "pixelformat.h" #include "StringMap.h" namespace love { static PixelFormatInfo formatInfo[] = { // components, blockW, blockH, blockSize, color, depth, stencil, compressed, sRGB, dataType { 0, 1, 1, 0, false, false, false, false, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_UNKNOWN { 0, 1, 1, 0, true, false, false, false, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_NORMAL { 0, 1, 1, 0, true, false, false, false, false, PIXELFORMATTYPE_SFLOAT }, // PIXELFORMAT_HDR { 1, 1, 1, 1, true, false, false, false, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_R8_UNORM { 1, 1, 1, 1, true, false, false, false, false, PIXELFORMATTYPE_SINT }, // PIXELFORMAT_R8_INT { 1, 1, 1, 1, true, false, false, false, false, PIXELFORMATTYPE_UINT }, // PIXELFORMAT_R8_UINT { 1, 1, 1, 2, true, false, false, false, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_R16_UNORM { 1, 1, 1, 2, true, false, false, false, false, PIXELFORMATTYPE_SFLOAT }, // PIXELFORMAT_R16_FLOAT { 1, 1, 1, 2, true, false, false, false, false, PIXELFORMATTYPE_SINT }, // PIXELFORMAT_R16_INT { 1, 1, 1, 2, true, false, false, false, false, PIXELFORMATTYPE_UINT }, // PIXELFORMAT_R16_UINT { 1, 1, 1, 4, true, false, false, false, false, PIXELFORMATTYPE_SFLOAT }, // PIXELFORMAT_R32_FLOAT { 1, 1, 1, 4, true, false, false, false, false, PIXELFORMATTYPE_SINT }, // PIXELFORMAT_R32_INT { 1, 1, 1, 4, true, false, false, false, false, PIXELFORMATTYPE_UINT }, // PIXELFORMAT_R32_UINT { 2, 1, 1, 2, true, false, false, false, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_RG8_UNORM { 2, 1, 1, 2, true, false, false, false, false, PIXELFORMATTYPE_SINT }, // PIXELFORMAT_RG8_INT { 2, 1, 1, 2, true, false, false, false, false, PIXELFORMATTYPE_UINT }, // PIXELFORMAT_RG8_UINT { 2, 1, 1, 2, true, false, false, false, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_LA8_UNORM { 2, 1, 1, 4, true, false, false, false, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_RG16_UNORM { 2, 1, 1, 4, true, false, false, false, false, PIXELFORMATTYPE_SFLOAT }, // PIXELFORMAT_RG16_FLOAT { 2, 1, 1, 4, true, false, false, false, false, PIXELFORMATTYPE_SINT }, // PIXELFORMAT_RG16_INT { 2, 1, 1, 4, true, false, false, false, false, PIXELFORMATTYPE_UINT }, // PIXELFORMAT_RG16_UINT { 2, 1, 1, 8, true, false, false, false, false, PIXELFORMATTYPE_SFLOAT }, // PIXELFORMAT_RG32_FLOAT { 2, 1, 1, 8, true, false, false, false, false, PIXELFORMATTYPE_SINT }, // PIXELFORMAT_RG32_INT { 2, 1, 1, 8, true, false, false, false, false, PIXELFORMATTYPE_UINT }, // PIXELFORMAT_RG32_UINT { 4, 1, 1, 4, true, false, false, false, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_RGBA8_UNORM { 4, 1, 1, 4, true, false, false, false, true, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_RGBA8_sRGB { 4, 1, 1, 4, true, false, false, false, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_BGRA8_UNORM { 4, 1, 1, 4, true, false, false, false, true, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_BGRA8_sRGB { 4, 1, 1, 4, true, false, false, false, false, PIXELFORMATTYPE_SINT }, // PIXELFORMAT_RGBA8_INT { 4, 1, 1, 4, true, false, false, false, false, PIXELFORMATTYPE_UINT }, // PIXELFORMAT_RGBA8_UINT { 4, 1, 1, 8, true, false, false, false, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_RGBA16_UNORM { 4, 1, 1, 8, true, false, false, false, false, PIXELFORMATTYPE_SFLOAT }, // PIXELFORMAT_RGBA16_FLOAT { 4, 1, 1, 8, true, false, false, false, false, PIXELFORMATTYPE_SINT }, // PIXELFORMAT_RGBA16_INT { 4, 1, 1, 8, true, false, false, false, false, PIXELFORMATTYPE_UINT }, // PIXELFORMAT_RGBA16_UINT { 4, 1, 1, 16, true, false, false, false, false, PIXELFORMATTYPE_SFLOAT }, // PIXELFORMAT_RGBA32_FLOAT { 4, 1, 1, 16, true, false, false, false, false, PIXELFORMATTYPE_SINT }, // PIXELFORMAT_RGBA32_INT { 4, 1, 1, 16, true, false, false, false, false, PIXELFORMATTYPE_UINT }, // PIXELFORMAT_RGBA32_UINT { 4, 1, 1, 2, true, false, false, false, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_RGBA4_UNORM { 4, 1, 1, 2, true, false, false, false, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_RGB5A1_UNORM { 3, 1, 1, 2, true, false, false, false, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_RGB565_UNORM { 4, 1, 1, 4, true, false, false, false, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_RGB10A2_UNORM { 3, 1, 1, 4, true, false, false, false, false, PIXELFORMATTYPE_UFLOAT }, // PIXELFORMAT_RG11B10_FLOAT { 1, 1, 1, 1, false, false, true , false, false, PIXELFORMATTYPE_UINT }, // PIXELFORMAT_STENCIL8 { 1, 1, 1, 2, false, true, false, false, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_DEPTH16_UNORM { 1, 1, 1, 3, false, true, false, false, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_DEPTH24_UNORM { 1, 1, 1, 4, false, true, false, false, false, PIXELFORMATTYPE_SFLOAT }, // PIXELFORMAT_DEPTH32_FLOAT { 2, 1, 1, 4, false, true, true , false, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_DEPTH24_UNORM_STENCIL8 { 2, 1, 1, 5, false, true, true , false, false, PIXELFORMATTYPE_SFLOAT }, // PIXELFORMAT_DEPTH32_FLOAT_STENCIL8 { 3, 4, 4, 8, true, false, false, true, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_DXT1_UNORM { 3, 4, 4, 8, true, false, false, true, true, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_DXT1_sRGB { 4, 4, 4, 16, true, false, false, true, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_DXT3_UNORM { 4, 4, 4, 16, true, false, false, true, true, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_DXT3_sRGB { 4, 4, 4, 16, true, false, false, true, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_DXT5_UNORM { 4, 4, 4, 16, true, false, false, true, true, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_DXT5_sRGB { 1, 4, 4, 8, true, false, false, true, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_BC4_UNORM { 1, 4, 4, 8, true, false, false, true, false, PIXELFORMATTYPE_SNORM }, // PIXELFORMAT_BC4_SNORM { 2, 4, 4, 16, true, false, false, true, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_BC5_UNORM { 2, 4, 4, 16, true, false, false, true, false, PIXELFORMATTYPE_SNORM }, // PIXELFORMAT_BC5_SNORM { 3, 4, 4, 16, true, false, false, true, false, PIXELFORMATTYPE_UFLOAT }, // PIXELFORMAT_BC6H_UFLOAT { 3, 4, 4, 16, true, false, false, true, false, PIXELFORMATTYPE_SFLOAT }, // PIXELFORMAT_BC6H_FLOAT { 4, 4, 4, 16, true, false, false, true, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_BC7_UNORM { 4, 4, 4, 16, true, false, false, true, true, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_BC7_sRGB { 3, 16, 8, 32, true, false, false, true, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_PVR1_RGB2_UNORM { 3, 16, 8, 32, true, false, false, true, true, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_PVR1_RGB2_sRGB { 3, 8, 8, 32, true, false, false, true, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_PVR1_RGB4_UNORM { 3, 8, 8, 32, true, false, false, true, true, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_PVR1_RGB4_sRGB { 4, 16, 8, 32, true, false, false, true, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_PVR1_RGBA2_UNORM { 4, 16, 8, 32, true, false, false, true, true, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_PVR1_RGBA2_sRGB { 4, 8, 8, 32, true, false, false, true, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_PVR1_RGBA4_UNORM { 4, 8, 8, 32, true, false, false, true, true, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_PVR1_RGBA4_sRGB { 3, 4, 4, 8, true, false, false, true, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_ETC1_UNORM { 3, 4, 4, 8, true, false, false, true, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_ETC2_RGB_UNORM { 3, 4, 4, 8, true, false, false, true, true, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_ETC2_RGB_sRGB { 4, 4, 4, 16, true, false, false, true, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_ETC2_RGBA_UNORM { 4, 4, 4, 16, true, false, false, true, true, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_ETC2_RGBA_sRGB { 4, 4, 4, 8, true, false, false, true, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_ETC2_RGBA1_UNORM { 4, 4, 4, 8, true, false, false, true, true, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_ETC2_RGBA1_sRGB { 1, 4, 4, 8, true, false, false, true, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_EAC_R_UNORM { 1, 4, 4, 8, true, false, false, true, false, PIXELFORMATTYPE_SNORM }, // PIXELFORMAT_EAC_R_SNORM { 2, 4, 4, 16, true, false, false, true, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_EAC_RG_UNORM { 2, 4, 4, 16, true, false, false, true, false, PIXELFORMATTYPE_SNORM }, // PIXELFORMAT_EAC_RG_SNORM { 4, 4, 4, 1, true, false, false, true, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_ASTC_4x4_UNORM { 4, 5, 4, 1, true, false, false, true, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_ASTC_5x4_UNORM { 4, 5, 5, 1, true, false, false, true, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_ASTC_5x5_UNORM { 4, 6, 5, 1, true, false, false, true, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_ASTC_6x5_UNORM { 4, 6, 6, 1, true, false, false, true, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_ASTC_6x6_UNORM { 4, 8, 5, 1, true, false, false, true, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_ASTC_8x5_UNORM { 4, 8, 6, 1, true, false, false, true, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_ASTC_8x6_UNORM { 4, 8, 8, 1, true, false, false, true, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_ASTC_8x8_UNORM { 4, 8, 5, 1, true, false, false, true, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_ASTC_10x5_UNORM { 4, 10, 6, 1, true, false, false, true, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_ASTC_10x6_UNORM { 4, 10, 8, 1, true, false, false, true, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_ASTC_10x8_UNORM { 4, 10, 10, 1, true, false, false, true, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_ASTC_10x10_UNORM { 4, 12, 10, 1, true, false, false, true, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_ASTC_12x10_UNORM { 4, 12, 12, 1, true, false, false, true, false, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_ASTC_12x12_UNORM { 4, 4, 4, 1, true, false, false, true, true, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_ASTC_4x4_sRGB { 4, 5, 4, 1, true, false, false, true, true, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_ASTC_5x4_sRGB { 4, 5, 5, 1, true, false, false, true, true, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_ASTC_5x5_sRGB { 4, 6, 5, 1, true, false, false, true, true, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_ASTC_6x5_sRGB { 4, 6, 6, 1, true, false, false, true, true, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_ASTC_6x6_sRGB { 4, 8, 5, 1, true, false, false, true, true, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_ASTC_8x5_sRGB { 4, 8, 6, 1, true, false, false, true, true, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_ASTC_8x6_sRGB { 4, 8, 8, 1, true, false, false, true, true, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_ASTC_8x8_sRGB { 4, 8, 5, 1, true, false, false, true, true, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_ASTC_10x5_sRGB { 4, 10, 6, 1, true, false, false, true, true, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_ASTC_10x6_sRGB { 4, 10, 8, 1, true, false, false, true, true, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_ASTC_10x8_sRGB { 4, 10, 10, 1, true, false, false, true, true, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_ASTC_10x10_sRGB { 4, 12, 10, 1, true, false, false, true, true, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_ASTC_12x10_sRGB { 4, 12, 12, 1, true, false, false, true, true, PIXELFORMATTYPE_UNORM }, // PIXELFORMAT_ASTC_12x12_sRGB }; static_assert(sizeof(formatInfo) / sizeof(PixelFormatInfo) == PIXELFORMAT_MAX_ENUM, "Update the formatInfo array when adding or removing a PixelFormat"); static StringMap::Entry formatEntries[] = { { "unknown", PIXELFORMAT_UNKNOWN }, { "normal", PIXELFORMAT_NORMAL }, { "hdr", PIXELFORMAT_HDR }, { "r8", PIXELFORMAT_R8_UNORM }, { "r8i", PIXELFORMAT_R8_INT }, { "r8ui", PIXELFORMAT_R8_UINT }, { "r16", PIXELFORMAT_R16_UNORM }, { "r16f", PIXELFORMAT_R16_FLOAT }, { "r16i", PIXELFORMAT_R16_INT }, { "r16ui", PIXELFORMAT_R16_UINT }, { "r32f", PIXELFORMAT_R32_FLOAT }, { "r32i", PIXELFORMAT_R32_INT }, { "r32ui", PIXELFORMAT_R32_UINT }, { "rg8", PIXELFORMAT_RG8_UNORM }, { "rg8i", PIXELFORMAT_RG8_INT }, { "rg8ui", PIXELFORMAT_RG8_UINT }, { "la8", PIXELFORMAT_LA8_UNORM }, { "rg16", PIXELFORMAT_RG16_UNORM }, { "rg16f", PIXELFORMAT_RG16_FLOAT }, { "rg16i", PIXELFORMAT_RG16_INT }, { "rg16ui", PIXELFORMAT_RG16_UINT }, { "rg32f", PIXELFORMAT_RG32_FLOAT }, { "rg32i", PIXELFORMAT_RG32_INT }, { "rg32ui", PIXELFORMAT_RG32_UINT }, { "rgba8", PIXELFORMAT_RGBA8_UNORM }, { "srgba8", PIXELFORMAT_RGBA8_sRGB }, { "bgra8", PIXELFORMAT_BGRA8_UNORM }, { "bgra8srgb", PIXELFORMAT_BGRA8_sRGB }, { "rgba8i", PIXELFORMAT_RGBA8_INT }, { "rgba8ui", PIXELFORMAT_RGBA8_UINT }, { "rgba16", PIXELFORMAT_RGBA16_UNORM }, { "rgba16f", PIXELFORMAT_RGBA16_FLOAT }, { "rgba16i", PIXELFORMAT_RGBA16_INT }, { "rgba16ui", PIXELFORMAT_RGBA16_UINT }, { "rgba32f", PIXELFORMAT_RGBA32_FLOAT }, { "rgba32i", PIXELFORMAT_RGBA32_INT }, { "rgba32ui", PIXELFORMAT_RGBA32_UINT }, { "rgba4", PIXELFORMAT_RGBA4_UNORM }, { "rgb5a1", PIXELFORMAT_RGB5A1_UNORM }, { "rgb565", PIXELFORMAT_RGB565_UNORM }, { "rgb10a2", PIXELFORMAT_RGB10A2_UNORM }, { "rg11b10f", PIXELFORMAT_RG11B10_FLOAT }, { "stencil8", PIXELFORMAT_STENCIL8 }, { "depth16", PIXELFORMAT_DEPTH16_UNORM }, { "depth24", PIXELFORMAT_DEPTH24_UNORM }, { "depth32f", PIXELFORMAT_DEPTH32_FLOAT }, { "depth24stencil8", PIXELFORMAT_DEPTH24_UNORM_STENCIL8 }, { "depth32fstencil8", PIXELFORMAT_DEPTH32_FLOAT_STENCIL8 }, { "DXT1", PIXELFORMAT_DXT1_UNORM }, { "DXT1srgb", PIXELFORMAT_DXT1_sRGB }, { "DXT3", PIXELFORMAT_DXT3_UNORM }, { "DXT3srgb", PIXELFORMAT_DXT3_sRGB }, { "DXT5", PIXELFORMAT_DXT5_UNORM }, { "DXT5srgb", PIXELFORMAT_DXT5_sRGB }, { "BC4", PIXELFORMAT_BC4_UNORM }, { "BC4s", PIXELFORMAT_BC4_SNORM }, { "BC5", PIXELFORMAT_BC5_UNORM }, { "BC5s", PIXELFORMAT_BC5_SNORM }, { "BC6h", PIXELFORMAT_BC6H_UFLOAT }, { "BC6hs", PIXELFORMAT_BC6H_FLOAT }, { "BC7", PIXELFORMAT_BC7_UNORM }, { "BC7srgb", PIXELFORMAT_BC7_sRGB }, { "PVR1rgb2", PIXELFORMAT_PVR1_RGB2_UNORM }, { "PVR1rgb2srgb", PIXELFORMAT_PVR1_RGB2_sRGB }, { "PVR1rgb4", PIXELFORMAT_PVR1_RGB4_UNORM }, { "PVR1rgb4srgb", PIXELFORMAT_PVR1_RGB4_sRGB }, { "PVR1rgba2", PIXELFORMAT_PVR1_RGBA2_UNORM }, { "PVR1rgba2srgb", PIXELFORMAT_PVR1_RGBA2_sRGB }, { "PVR1rgba4", PIXELFORMAT_PVR1_RGBA4_UNORM }, { "PVR1rgba4srgb", PIXELFORMAT_PVR1_RGBA4_sRGB }, { "ETC1", PIXELFORMAT_ETC1_UNORM }, { "ETC2rgb", PIXELFORMAT_ETC2_RGB_UNORM }, { "ETC2srgb", PIXELFORMAT_ETC2_RGB_sRGB }, { "ETC2rgba", PIXELFORMAT_ETC2_RGBA_UNORM }, { "ETC2srgba", PIXELFORMAT_ETC2_RGBA_sRGB }, { "ETC2rgba1", PIXELFORMAT_ETC2_RGBA1_UNORM }, { "ETC2srgba1", PIXELFORMAT_ETC2_RGBA1_sRGB }, { "EACr", PIXELFORMAT_EAC_R_UNORM }, { "EACrs", PIXELFORMAT_EAC_R_SNORM }, { "EACrg", PIXELFORMAT_EAC_RG_UNORM }, { "EACrgs", PIXELFORMAT_EAC_RG_SNORM }, { "ASTC4x4", PIXELFORMAT_ASTC_4x4_UNORM }, { "ASTC5x4", PIXELFORMAT_ASTC_5x4_UNORM }, { "ASTC5x5", PIXELFORMAT_ASTC_5x5_UNORM }, { "ASTC6x5", PIXELFORMAT_ASTC_6x5_UNORM }, { "ASTC6x6", PIXELFORMAT_ASTC_6x6_UNORM }, { "ASTC8x5", PIXELFORMAT_ASTC_8x5_UNORM }, { "ASTC8x6", PIXELFORMAT_ASTC_8x6_UNORM }, { "ASTC8x8", PIXELFORMAT_ASTC_8x8_UNORM }, { "ASTC10x5", PIXELFORMAT_ASTC_10x5_UNORM }, { "ASTC10x6", PIXELFORMAT_ASTC_10x6_UNORM }, { "ASTC10x8", PIXELFORMAT_ASTC_10x8_UNORM }, { "ASTC10x10", PIXELFORMAT_ASTC_10x10_UNORM }, { "ASTC12x10", PIXELFORMAT_ASTC_12x10_UNORM }, { "ASTC12x12", PIXELFORMAT_ASTC_12x12_UNORM }, { "ASTC4x4srgb", PIXELFORMAT_ASTC_4x4_sRGB }, { "ASTC5x4srgb", PIXELFORMAT_ASTC_5x4_sRGB }, { "ASTC5x5srgb", PIXELFORMAT_ASTC_5x5_sRGB }, { "ASTC6x5srgb", PIXELFORMAT_ASTC_6x5_sRGB }, { "ASTC6x6srgb", PIXELFORMAT_ASTC_6x6_sRGB }, { "ASTC8x5srgb", PIXELFORMAT_ASTC_8x5_sRGB }, { "ASTC8x6srgb", PIXELFORMAT_ASTC_8x6_sRGB }, { "ASTC8x8srgb", PIXELFORMAT_ASTC_8x8_sRGB }, { "ASTC10x5srgb", PIXELFORMAT_ASTC_10x5_sRGB }, { "ASTC10x6srgb", PIXELFORMAT_ASTC_10x6_sRGB }, { "ASTC10x8srgb", PIXELFORMAT_ASTC_10x8_sRGB }, { "ASTC10x10srgb", PIXELFORMAT_ASTC_10x10_sRGB }, { "ASTC12x10srgb", PIXELFORMAT_ASTC_12x10_sRGB }, { "ASTC12x12srgb", PIXELFORMAT_ASTC_12x12_sRGB }, }; static_assert(sizeof(formatEntries) / sizeof(formatEntries[0]) == (size_t) PIXELFORMAT_MAX_ENUM, "pixel format string map is missing entries!"); static StringMap formats(formatEntries, sizeof(formatEntries)); bool getConstant(const char *in, PixelFormat &out) { return formats.find(in, out); } bool getConstant(PixelFormat in, const char *&out) { return formats.find(in, out); } const PixelFormatInfo &getPixelFormatInfo(PixelFormat format) { return formatInfo[format]; } const char *getPixelFormatName(PixelFormat format) { const char *name = "unknown"; getConstant(format, name); return name; } bool isPixelFormatCompressed(PixelFormat format) { return formatInfo[format].compressed; } bool isPixelFormatColor(PixelFormat format) { return formatInfo[format].color; } bool isPixelFormatDepthStencil(PixelFormat format) { const PixelFormatInfo &info = formatInfo[format]; return info.depth || info.stencil; } bool isPixelFormatDepth(PixelFormat format) { return formatInfo[format].depth; } bool isPixelFormatStencil(PixelFormat format) { return formatInfo[format].stencil; } bool isPixelFormatSRGB(PixelFormat format) { return formatInfo[format].sRGB; } bool isPixelFormatInteger(PixelFormat format) { auto type = formatInfo[format].dataType; return type == PIXELFORMATTYPE_SINT || type == PIXELFORMATTYPE_UINT; } PixelFormat getSRGBPixelFormat(PixelFormat format) { switch (format) { case PIXELFORMAT_RGBA8_UNORM: return PIXELFORMAT_RGBA8_sRGB; case PIXELFORMAT_BGRA8_UNORM: return PIXELFORMAT_BGRA8_sRGB; case PIXELFORMAT_DXT1_UNORM: return PIXELFORMAT_DXT1_sRGB; case PIXELFORMAT_DXT3_UNORM: return PIXELFORMAT_DXT3_sRGB; case PIXELFORMAT_DXT5_UNORM: return PIXELFORMAT_DXT5_sRGB; case PIXELFORMAT_BC7_UNORM: return PIXELFORMAT_BC7_sRGB; case PIXELFORMAT_PVR1_RGB2_UNORM: return PIXELFORMAT_PVR1_RGB2_sRGB; case PIXELFORMAT_PVR1_RGB4_UNORM: return PIXELFORMAT_PVR1_RGB4_sRGB; case PIXELFORMAT_PVR1_RGBA2_UNORM: return PIXELFORMAT_PVR1_RGBA2_sRGB; case PIXELFORMAT_PVR1_RGBA4_UNORM: return PIXELFORMAT_PVR1_RGBA4_sRGB; case PIXELFORMAT_ETC1_UNORM: return PIXELFORMAT_ETC2_RGB_sRGB; // ETC2 can load ETC1 data. case PIXELFORMAT_ETC2_RGB_UNORM: return PIXELFORMAT_ETC2_RGB_sRGB; case PIXELFORMAT_ETC2_RGBA_UNORM: return PIXELFORMAT_ETC2_RGBA_sRGB; case PIXELFORMAT_ETC2_RGBA1_UNORM: return PIXELFORMAT_ETC2_RGBA1_sRGB; case PIXELFORMAT_ASTC_4x4_UNORM: return PIXELFORMAT_ASTC_4x4_sRGB; case PIXELFORMAT_ASTC_5x4_UNORM: return PIXELFORMAT_ASTC_5x4_sRGB; case PIXELFORMAT_ASTC_5x5_UNORM: return PIXELFORMAT_ASTC_5x5_sRGB; case PIXELFORMAT_ASTC_6x5_UNORM: return PIXELFORMAT_ASTC_6x5_sRGB; case PIXELFORMAT_ASTC_6x6_UNORM: return PIXELFORMAT_ASTC_6x6_sRGB; case PIXELFORMAT_ASTC_8x5_UNORM: return PIXELFORMAT_ASTC_8x5_sRGB; case PIXELFORMAT_ASTC_8x6_UNORM: return PIXELFORMAT_ASTC_8x6_sRGB; case PIXELFORMAT_ASTC_8x8_UNORM: return PIXELFORMAT_ASTC_8x8_sRGB; case PIXELFORMAT_ASTC_10x5_UNORM: return PIXELFORMAT_ASTC_10x5_sRGB; case PIXELFORMAT_ASTC_10x6_UNORM: return PIXELFORMAT_ASTC_10x6_sRGB; case PIXELFORMAT_ASTC_10x8_UNORM: return PIXELFORMAT_ASTC_10x8_sRGB; case PIXELFORMAT_ASTC_10x10_UNORM: return PIXELFORMAT_ASTC_10x10_sRGB; case PIXELFORMAT_ASTC_12x10_UNORM: return PIXELFORMAT_ASTC_12x10_sRGB; case PIXELFORMAT_ASTC_12x12_UNORM: return PIXELFORMAT_ASTC_12x12_sRGB; default: return format; } } PixelFormat getLinearPixelFormat(PixelFormat format) { switch (format) { case PIXELFORMAT_RGBA8_sRGB: return PIXELFORMAT_RGBA8_UNORM; case PIXELFORMAT_BGRA8_sRGB: return PIXELFORMAT_BGRA8_UNORM; case PIXELFORMAT_DXT1_sRGB: return PIXELFORMAT_DXT1_UNORM; case PIXELFORMAT_DXT3_sRGB: return PIXELFORMAT_DXT3_UNORM; case PIXELFORMAT_DXT5_sRGB: return PIXELFORMAT_DXT5_UNORM; case PIXELFORMAT_BC7_sRGB: return PIXELFORMAT_BC7_UNORM; case PIXELFORMAT_PVR1_RGB2_sRGB: return PIXELFORMAT_PVR1_RGB2_UNORM; case PIXELFORMAT_PVR1_RGB4_sRGB: return PIXELFORMAT_PVR1_RGB4_UNORM; case PIXELFORMAT_PVR1_RGBA2_sRGB: return PIXELFORMAT_PVR1_RGBA2_UNORM; case PIXELFORMAT_PVR1_RGBA4_sRGB: return PIXELFORMAT_PVR1_RGBA4_UNORM; case PIXELFORMAT_ETC2_RGB_sRGB: return PIXELFORMAT_ETC2_RGB_UNORM; case PIXELFORMAT_ETC2_RGBA_sRGB: return PIXELFORMAT_ETC2_RGBA_UNORM; case PIXELFORMAT_ETC2_RGBA1_sRGB: return PIXELFORMAT_ETC2_RGBA1_UNORM; case PIXELFORMAT_ASTC_4x4_sRGB: return PIXELFORMAT_ASTC_4x4_UNORM; case PIXELFORMAT_ASTC_5x4_sRGB: return PIXELFORMAT_ASTC_5x4_UNORM; case PIXELFORMAT_ASTC_5x5_sRGB: return PIXELFORMAT_ASTC_5x5_UNORM; case PIXELFORMAT_ASTC_6x5_sRGB: return PIXELFORMAT_ASTC_6x5_UNORM; case PIXELFORMAT_ASTC_6x6_sRGB: return PIXELFORMAT_ASTC_6x6_UNORM; case PIXELFORMAT_ASTC_8x5_sRGB: return PIXELFORMAT_ASTC_8x5_UNORM; case PIXELFORMAT_ASTC_8x6_sRGB: return PIXELFORMAT_ASTC_8x6_UNORM; case PIXELFORMAT_ASTC_8x8_sRGB: return PIXELFORMAT_ASTC_8x8_UNORM; case PIXELFORMAT_ASTC_10x5_sRGB: return PIXELFORMAT_ASTC_10x5_UNORM; case PIXELFORMAT_ASTC_10x6_sRGB: return PIXELFORMAT_ASTC_10x6_UNORM; case PIXELFORMAT_ASTC_10x8_sRGB: return PIXELFORMAT_ASTC_10x8_UNORM; case PIXELFORMAT_ASTC_10x10_sRGB: return PIXELFORMAT_ASTC_10x10_UNORM; case PIXELFORMAT_ASTC_12x10_sRGB: return PIXELFORMAT_ASTC_12x10_UNORM; case PIXELFORMAT_ASTC_12x12_sRGB: return PIXELFORMAT_ASTC_12x12_UNORM; default: return format; } } size_t getPixelFormatBlockSize(PixelFormat format) { return formatInfo[format].blockSize; } size_t getPixelFormatUncompressedRowSize(PixelFormat format, int width) { const PixelFormatInfo &info = formatInfo[format]; if (info.compressed) return 0; return info.blockSize * width / info.blockWidth; } size_t getPixelFormatCompressedBlockRowSize(PixelFormat format, int width) { const PixelFormatInfo &info = formatInfo[format]; if (!info.compressed) return 0; return info.blockSize * ((width + info.blockWidth - 1) / info.blockWidth); } size_t getPixelFormatCompressedBlockRowCount(PixelFormat format, int height) { const PixelFormatInfo &info = formatInfo[format]; if (!info.compressed) return 0; return (height + info.blockHeight - 1) / info.blockHeight; } size_t getPixelFormatSliceSize(PixelFormat format, int width, int height) { const PixelFormatInfo &info = formatInfo[format]; size_t blockW = (width + info.blockWidth - 1) / info.blockWidth; size_t blockH = (height + info.blockHeight - 1) / info.blockHeight; return info.blockSize * blockW * blockH; } int getPixelFormatColorComponents(PixelFormat format) { return formatInfo[format].components; } } // love ================================================ FILE: src/common/pixelformat.h ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ #pragma once #include "stddef.h" namespace love { enum PixelFormat { PIXELFORMAT_UNKNOWN, // these are converted to an actual format by love PIXELFORMAT_NORMAL, PIXELFORMAT_HDR, // 1-channel normal formats PIXELFORMAT_R8_UNORM, PIXELFORMAT_R8_INT, PIXELFORMAT_R8_UINT, PIXELFORMAT_R16_UNORM, PIXELFORMAT_R16_FLOAT, PIXELFORMAT_R16_INT, PIXELFORMAT_R16_UINT, PIXELFORMAT_R32_FLOAT, PIXELFORMAT_R32_INT, PIXELFORMAT_R32_UINT, // 2-channel normal formats PIXELFORMAT_RG8_UNORM, PIXELFORMAT_RG8_INT, PIXELFORMAT_RG8_UINT, PIXELFORMAT_LA8_UNORM, // Same as RG8, but accessed as (L, L, L, A) PIXELFORMAT_RG16_UNORM, PIXELFORMAT_RG16_FLOAT, PIXELFORMAT_RG16_INT, PIXELFORMAT_RG16_UINT, PIXELFORMAT_RG32_FLOAT, PIXELFORMAT_RG32_INT, PIXELFORMAT_RG32_UINT, // 4-channel normal formats PIXELFORMAT_RGBA8_UNORM, PIXELFORMAT_RGBA8_sRGB, PIXELFORMAT_BGRA8_UNORM, PIXELFORMAT_BGRA8_sRGB, PIXELFORMAT_RGBA8_INT, PIXELFORMAT_RGBA8_UINT, PIXELFORMAT_RGBA16_UNORM, PIXELFORMAT_RGBA16_FLOAT, PIXELFORMAT_RGBA16_INT, PIXELFORMAT_RGBA16_UINT, PIXELFORMAT_RGBA32_FLOAT, PIXELFORMAT_RGBA32_INT, PIXELFORMAT_RGBA32_UINT, // packed formats PIXELFORMAT_RGBA4_UNORM, // LSB->MSB: [a, b, g, r] PIXELFORMAT_RGB5A1_UNORM, // LSB->MSB: [a, b, g, r] PIXELFORMAT_RGB565_UNORM, // LSB->MSB: [b, g, r] PIXELFORMAT_RGB10A2_UNORM, // LSB->MSB: [r, g, b, a] PIXELFORMAT_RG11B10_FLOAT, // LSB->MSB: [r, g, b] // depth/stencil formats PIXELFORMAT_STENCIL8, PIXELFORMAT_DEPTH16_UNORM, PIXELFORMAT_DEPTH24_UNORM, PIXELFORMAT_DEPTH32_FLOAT, PIXELFORMAT_DEPTH24_UNORM_STENCIL8, PIXELFORMAT_DEPTH32_FLOAT_STENCIL8, // compressed formats PIXELFORMAT_DXT1_UNORM, PIXELFORMAT_DXT1_sRGB, PIXELFORMAT_DXT3_UNORM, PIXELFORMAT_DXT3_sRGB, PIXELFORMAT_DXT5_UNORM, PIXELFORMAT_DXT5_sRGB, PIXELFORMAT_BC4_UNORM, PIXELFORMAT_BC4_SNORM, PIXELFORMAT_BC5_UNORM, PIXELFORMAT_BC5_SNORM, PIXELFORMAT_BC6H_UFLOAT, PIXELFORMAT_BC6H_FLOAT, PIXELFORMAT_BC7_UNORM, PIXELFORMAT_BC7_sRGB, PIXELFORMAT_PVR1_RGB2_UNORM, PIXELFORMAT_PVR1_RGB2_sRGB, PIXELFORMAT_PVR1_RGB4_UNORM, PIXELFORMAT_PVR1_RGB4_sRGB, PIXELFORMAT_PVR1_RGBA2_UNORM, PIXELFORMAT_PVR1_RGBA2_sRGB, PIXELFORMAT_PVR1_RGBA4_UNORM, PIXELFORMAT_PVR1_RGBA4_sRGB, PIXELFORMAT_ETC1_UNORM, PIXELFORMAT_ETC2_RGB_UNORM, PIXELFORMAT_ETC2_RGB_sRGB, PIXELFORMAT_ETC2_RGBA_UNORM, PIXELFORMAT_ETC2_RGBA_sRGB, PIXELFORMAT_ETC2_RGBA1_UNORM, PIXELFORMAT_ETC2_RGBA1_sRGB, PIXELFORMAT_EAC_R_UNORM, PIXELFORMAT_EAC_R_SNORM, PIXELFORMAT_EAC_RG_UNORM, PIXELFORMAT_EAC_RG_SNORM, PIXELFORMAT_ASTC_4x4_UNORM, PIXELFORMAT_ASTC_5x4_UNORM, PIXELFORMAT_ASTC_5x5_UNORM, PIXELFORMAT_ASTC_6x5_UNORM, PIXELFORMAT_ASTC_6x6_UNORM, PIXELFORMAT_ASTC_8x5_UNORM, PIXELFORMAT_ASTC_8x6_UNORM, PIXELFORMAT_ASTC_8x8_UNORM, PIXELFORMAT_ASTC_10x5_UNORM, PIXELFORMAT_ASTC_10x6_UNORM, PIXELFORMAT_ASTC_10x8_UNORM, PIXELFORMAT_ASTC_10x10_UNORM, PIXELFORMAT_ASTC_12x10_UNORM, PIXELFORMAT_ASTC_12x12_UNORM, PIXELFORMAT_ASTC_4x4_sRGB, PIXELFORMAT_ASTC_5x4_sRGB, PIXELFORMAT_ASTC_5x5_sRGB, PIXELFORMAT_ASTC_6x5_sRGB, PIXELFORMAT_ASTC_6x6_sRGB, PIXELFORMAT_ASTC_8x5_sRGB, PIXELFORMAT_ASTC_8x6_sRGB, PIXELFORMAT_ASTC_8x8_sRGB, PIXELFORMAT_ASTC_10x5_sRGB, PIXELFORMAT_ASTC_10x6_sRGB, PIXELFORMAT_ASTC_10x8_sRGB, PIXELFORMAT_ASTC_10x10_sRGB, PIXELFORMAT_ASTC_12x10_sRGB, PIXELFORMAT_ASTC_12x12_sRGB, PIXELFORMAT_MAX_ENUM }; enum PixelFormatType { PIXELFORMATTYPE_UNORM, PIXELFORMATTYPE_SNORM, PIXELFORMATTYPE_UFLOAT, PIXELFORMATTYPE_SFLOAT, PIXELFORMATTYPE_UINT, PIXELFORMATTYPE_SINT, }; struct PixelFormatInfo { int components; size_t blockWidth; size_t blockHeight; size_t blockSize; bool color; bool depth; bool stencil; bool compressed; bool sRGB; PixelFormatType dataType; }; bool getConstant(PixelFormat in, const char *&out); bool getConstant(const char *in, PixelFormat &out); const PixelFormatInfo &getPixelFormatInfo(PixelFormat format); /** * Gets the name of the specified pixel format. **/ const char *getPixelFormatName(PixelFormat format); /** * Gets whether the specified pixel format is a compressed type. **/ bool isPixelFormatCompressed(PixelFormat format); /** * Gets whether the specified pixel format is a color type. **/ bool isPixelFormatColor(PixelFormat format); /** * Gets whether the specified pixel format is a depth or stencil type. **/ bool isPixelFormatDepthStencil(PixelFormat format); /** * Gets whether the specified pixel format is a depth type. **/ bool isPixelFormatDepth(PixelFormat format); /** * Gets whether the specified pixel format is a stencil type. **/ bool isPixelFormatStencil(PixelFormat format); /** * Gets whether the specified color pixel format is sRGB-encoded. **/ bool isPixelFormatSRGB(PixelFormat format); /** * Gets whether the specified pixel format is a signed or unsigned integer type. **/ bool isPixelFormatInteger(PixelFormat format); /** * Gets the sRGB version of a linear pixel format, if applicable. **/ PixelFormat getSRGBPixelFormat(PixelFormat format); /** * Gets the linear version of a sRGB pixel format, if applicable. **/ PixelFormat getLinearPixelFormat(PixelFormat format); /** * Gets the block size in bytes of the specified pixel format. * This is the size in bytes of a pixel for uncompressed formats, but *not* * for compressed formats! **/ size_t getPixelFormatBlockSize(PixelFormat format); /** * Gets the size in bytes of a row of an uncompressed pixel format. **/ size_t getPixelFormatUncompressedRowSize(PixelFormat format, int width); /** * Gets the size in bytes of a row of a compressed pixel format. This is the * number of blocks used by the given width, multiplied by the block size. The * number of rows of blocks for a given height can be computed by * getPixelFormatCompressedBlockRowCount. **/ size_t getPixelFormatCompressedBlockRowSize(PixelFormat format, int width); /** * Gets the number of rows of blocks the given compressed pixel format will use, * for the given height in pixels. **/ size_t getPixelFormatCompressedBlockRowCount(PixelFormat format, int height); /** * Gets the size in bytes of a slice (width x height 2D plane) which uses the * given pixel format. **/ size_t getPixelFormatSliceSize(PixelFormat format, int width, int height); /** * Gets the number of color components in the given pixel format. **/ int getPixelFormatColorComponents(PixelFormat format); } // love ================================================ FILE: src/common/runtime.cpp ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ #include "config.h" #include "runtime.h" // LOVE #include "Module.h" #include "Object.h" #include "Reference.h" #include "StringMap.h" // C++ #include #include #include #include #include #include #include namespace love { /** * Called when an object is collected. The object is released * once in this function, possibly deleting it. **/ static int w__gc(lua_State *L) { Proxy *p = (Proxy *) lua_touserdata(L, 1); if (p->object != nullptr) { p->object->release(); p->object = nullptr; } return 0; } static int w__tostring(lua_State *L) { Proxy *p = (Proxy *) lua_touserdata(L, 1); const char *typname = lua_tostring(L, lua_upvalueindex(1)); lua_pushfstring(L, "%s: %p", typname, p->object); return 1; } static int w__type(lua_State *L) { lua_pushvalue(L, lua_upvalueindex(1)); return 1; } static int w__typeOf(lua_State *L) { Proxy *p = (Proxy *)lua_touserdata(L, 1); Type *t = luax_type(L, 2); if (!t) luax_pushboolean(L, false); else luax_pushboolean(L, p->type->isa(*t)); return 1; } static int w__eq(lua_State *L) { Proxy *p1 = (Proxy *)lua_touserdata(L, 1); Proxy *p2 = (Proxy *)lua_touserdata(L, 2); luax_pushboolean(L, p1->object == p2->object && p1->object != nullptr); return 1; } typedef uint64 ObjectKey; static bool luax_isfulllightuserdatasupported(lua_State *L) { // LuaJIT prior to commit e9af1abec542e6f9851ff2368e7f196b6382a44c doesn't // support lightuserdata > 48 bits. This is not a problem with Android, // Windows, macOS, and iOS as they'll use updated LuaJIT or won't use // pointers > 48 bits, but this is not the case for Linux. So check for // this capability first! static bool checked = false; static bool supported = false; if (sizeof(void*) == 4) // 32-bit platforms always supports full-lightuserdata. return true; if (!checked) { lua_pushcclosure(L, [](lua_State *L) -> int { // Try to push pointer with all bits set. lua_pushlightuserdata(L, (void *) (~((size_t) 0))); return 1; }, 0); supported = lua_pcall(L, 0, 1, 0) == 0; checked = true; lua_pop(L, 1); } return supported; } // For use with the love object pointer -> Proxy pointer registry. // Using the pointer directly via lightuserdata would be ideal, but LuaJIT // (before a commit to 2.1 in 2020) cannot use lightuserdata with more than 47 // bits whereas some newer arm64 architectures allow pointers which use more // than that. static ObjectKey luax_computeloveobjectkey(lua_State *L, love::Object *object) { // love objects should be allocated on the heap, and thus are subject // to the alignment rules of operator new / malloc. Lua numbers (doubles) // can store all possible integers up to 2^53. We can store pointers that // use more than 53 bits if their alignment is guaranteed to be more than 1. // For example an alignment requirement of 8 means we can shift the // pointer's bits by 3. However, this is not always reliable on 32-bit platforms // as can be seen in this bug report: https://github.com/love2d/love/issues/1916. // It appears to be ABI violation. However it seems there's no reliable way to // get the correct alignment pre-C++17. Consider that 32-bit pointer still fits // in 2^53 range, it's perfectly fine to assume alignment of 1 there. const size_t minalign = sizeof(void*) == 8 ? alignof(std::max_align_t) : 1; uintptr_t key = (uintptr_t) object; if ((key & (minalign - 1)) != 0) { luaL_error(L, "Cannot push love object to Lua: unexpected alignment " "(pointer is %p but alignment should be %d)", object, (int) minalign); } static const size_t shift = (size_t) log2(minalign); key >>= shift; return (ObjectKey) key; } static void luax_pushloveobjectkey(lua_State *L, ObjectKey key) { // If full 64-bit lightuserdata is supported, always use that. Otherwise, // if the key is smaller than 2^53 (which is integer precision for double // datatype), then push number. Otherwise, throw error. if (luax_isfulllightuserdatasupported(L)) lua_pushlightuserdata(L, (void *) key); else if (key > 0x20000000000000ULL) // 2^53 luaL_error(L, "Cannot push love object to Lua: pointer value %p is too large", key); else lua_pushnumber(L, (lua_Number) key); } static int w__release(lua_State *L) { Proxy *p = (Proxy *) lua_touserdata(L, 1); Object *object = p->object; if (object != nullptr) { p->object = nullptr; object->release(); // Fetch the registry table of instantiated objects. luax_getregistry(L, REGISTRY_OBJECTS); if (lua_istable(L, -1)) { // loveobjects[object] = nil ObjectKey objectkey = luax_computeloveobjectkey(L, object); luax_pushloveobjectkey(L, objectkey); lua_pushnil(L); lua_settable(L, -3); } lua_pop(L, 1); } luax_pushboolean(L, object != nullptr); return 1; } Reference *luax_refif(lua_State *L, int type) { Reference *r = nullptr; // Create a reference only if the test succeeds. if (lua_type(L, -1) == type) r = new Reference(L); else // Pop the value manually if it fails (done by Reference if it succeeds). lua_pop(L, 1); return r; } void luax_printstack(lua_State *L) { for (int i = 1; i <= lua_gettop(L); i++) std::cout << i << " - " << luaL_typename(L, i) << std::endl; } int luax_traceback(lua_State *L) { if (!lua_isstring(L, 1)) // 'message' not a string? return 1; // keep it intact lua_getglobal(L, "debug"); if (!lua_istable(L, -1)) { lua_pop(L, 1); return 1; } lua_getfield(L, -1, "traceback"); if (!lua_isfunction(L, -1)) { lua_pop(L, 2); return 1; } lua_pushvalue(L, 1); // pass error message lua_pushinteger(L, 2); // skip this function and traceback lua_call(L, 2, 1); // call debug.traceback return 1; } bool luax_isarrayoftables(lua_State *L, int idx) { if (!lua_istable(L, idx)) return false; lua_rawgeti(L, idx, 1); bool tableoftables = lua_istable(L, -1); lua_pop(L, 1); return tableoftables; } bool luax_toboolean(lua_State *L, int idx) { return (lua_toboolean(L, idx) != 0); } bool luax_checkboolean(lua_State *L, int idx) { luaL_checktype(L, idx, LUA_TBOOLEAN); return luax_toboolean(L, idx); } void luax_pushboolean(lua_State *L, bool b) { lua_pushboolean(L, b ? 1 : 0); } bool luax_optboolean(lua_State *L, int idx, bool b) { if (lua_isboolean(L, idx) == 1) return (lua_toboolean(L, idx) == 1 ? true : false); return b; } std::string luax_tostring(lua_State *L, int idx) { size_t len; const char *str = lua_tolstring(L, idx, &len); return std::string(str, len); } std::string luax_checkstring(lua_State *L, int idx) { size_t len; const char *str = luaL_checklstring(L, idx, &len); return std::string(str, len); } void luax_pushstring(lua_State *L, const std::string &str) { lua_pushlstring(L, str.data(), str.size()); } void luax_pushpointerasstring(lua_State *L, const void *pointer) { char str[sizeof(void *)]; memcpy(str, &pointer, sizeof(void *)); lua_pushlstring(L, str, sizeof(void *)); } bool luax_boolflag(lua_State *L, int table_index, const char *key, bool defaultValue) { lua_getfield(L, table_index, key); bool retval; if (lua_isnoneornil(L, -1)) retval = defaultValue; else retval = lua_toboolean(L, -1) != 0; lua_pop(L, 1); return retval; } int luax_intflag(lua_State *L, int table_index, const char *key, int defaultValue) { lua_getfield(L, table_index, key); int retval; if (!lua_isnumber(L, -1)) retval = defaultValue; else retval = (int) lua_tointeger(L, -1); lua_pop(L, 1); return retval; } double luax_numberflag(lua_State *L, int table_index, const char *key, double defaultValue) { lua_getfield(L, table_index, key); double retval; if (!lua_isnumber(L, -1)) retval = defaultValue; else retval = lua_tonumber(L, -1); lua_pop(L, 1); return retval; } bool luax_checkboolflag(lua_State *L, int table_index, const char *key) { lua_getfield(L, table_index, key); bool retval = false; if (lua_type(L, -1) != LUA_TBOOLEAN) { std::string err = "expected boolean field '" + std::string(key) + "' in table"; return luaL_argerror(L, table_index, err.c_str()); } else retval = luax_toboolean(L, -1); lua_pop(L, 1); return retval; } int luax_checkintflag(lua_State *L, int table_index, const char *key) { lua_getfield(L, table_index, key); int retval; if (!lua_isnumber(L, -1)) { std::string err = "expected integer field '" + std::string(key) + "' in table"; return luaL_argerror(L, table_index, err.c_str()); } else retval = (int) luaL_checkinteger(L, -1); lua_pop(L, 1); return retval; } int luax_assert_argc(lua_State *L, int min) { int argc = lua_gettop(L); if (argc < min) return luaL_error(L, "Incorrect number of arguments. Got [%d], expected at least [%d]", argc, min); return 0; } int luax_assert_argc(lua_State *L, int min, int max) { int argc = lua_gettop(L); if (argc < min || argc > max) return luaL_error(L, "Incorrect number of arguments. Got [%d], expected [%d-%d]", argc, min, max); return 0; } int luax_assert_function(lua_State *L, int idx) { if (!lua_isfunction(L, idx)) return luaL_error(L, "Argument must be of type \"function\"."); return 0; } int luax_assert_nilerror(lua_State *L, int idx) { if (lua_isnoneornil(L, idx)) { if (lua_isstring(L, idx + 1)) return luaL_error(L, lua_tostring(L, idx + 1)); else return luaL_error(L, "assertion failed!"); } return 0; } void luax_setfuncs(lua_State *L, const luaL_Reg *l) { if (l == nullptr) return; for (; l->name != nullptr; l++) { lua_pushcfunction(L, l->func); lua_setfield(L, -2, l->name); } } int luax_require(lua_State *L, const char *name) { lua_getglobal(L, "require"); lua_pushstring(L, name); lua_call(L, 1, 1); return 1; } int luax_register_module(lua_State *L, const WrappedModule &m) { m.type->init(); // Put a reference to the C++ module in Lua. luax_insistregistry(L, REGISTRY_MODULES); Proxy *p = (Proxy *)lua_newuserdata(L, sizeof(Proxy)); p->object = m.module; p->type = m.type; luaL_newmetatable(L, m.module->getName()); lua_pushvalue(L, -1); lua_setfield(L, -2, "__index"); lua_pushcfunction(L, w__gc); lua_setfield(L, -2, "__gc"); lua_setmetatable(L, -2); lua_setfield(L, -2, m.name); // _modules[name] = proxy lua_pop(L, 1); // Gets the love table. luax_insistglobal(L, "love"); // Create new table for module. lua_newtable(L); // Register all the functions. if (m.functions != nullptr) luax_setfuncs(L, m.functions); // Register types. if (m.types != nullptr) { for (const lua_CFunction *t = m.types; *t != nullptr; t++) (*t)(L); } lua_pushvalue(L, -1); lua_setfield(L, -3, m.name); // love.graphics = table lua_remove(L, -2); // love return 1; } int luax_preload(lua_State *L, lua_CFunction f, const char *name) { lua_getglobal(L, "package"); lua_getfield(L, -1, "preload"); lua_pushcfunction(L, f); lua_setfield(L, -2, name); lua_pop(L, 2); return 0; } int luax_register_type(lua_State *L, love::Type *type, ...) { type->init(); // Get the place for storing and re-using instantiated love types. luax_getregistry(L, REGISTRY_OBJECTS); // Create registry._loveobjects if it doesn't exist yet. if (!lua_istable(L, -1)) { lua_newtable(L); lua_replace(L, -2); // Create a metatable. lua_newtable(L); // metatable.__mode = "v". Weak userdata values. lua_pushliteral(L, "v"); lua_setfield(L, -2, "__mode"); // setmetatable(newtable, metatable) lua_setmetatable(L, -2); // registry._loveobjects = newtable lua_setfield(L, LUA_REGISTRYINDEX, "_loveobjects"); } else lua_pop(L, 1); luaL_newmetatable(L, type->getName()); // m.__index = m lua_pushvalue(L, -1); lua_setfield(L, -2, "__index"); // setup gc lua_pushcfunction(L, w__gc); lua_setfield(L, -2, "__gc"); // Add equality lua_pushcfunction(L, w__eq); lua_setfield(L, -2, "__eq"); // Add tostring function. lua_pushstring(L, type->getName()); lua_pushcclosure(L, w__tostring, 1); lua_setfield(L, -2, "__tostring"); // Add type lua_pushstring(L, type->getName()); lua_pushcclosure(L, w__type, 1); lua_setfield(L, -2, "type"); // Add typeOf lua_pushcfunction(L, w__typeOf); lua_setfield(L, -2, "typeOf"); // Add release lua_pushcfunction(L, w__release); lua_setfield(L, -2, "release"); // Add __close for lua 5.4 (just calls release) lua_pushcfunction(L, w__release); lua_setfield(L, -2, "__close"); va_list fs; va_start(fs, type); for (const luaL_Reg *f = va_arg(fs, const luaL_Reg *); f; f = va_arg(fs, const luaL_Reg *)) luax_setfuncs(L, f); va_end(fs); lua_pop(L, 1); // Pops metatable. return 0; } void luax_gettypemetatable(lua_State *L, const love::Type &type) { const char *name = type.getName(); lua_getfield(L, LUA_REGISTRYINDEX, name); } int luax_table_insert(lua_State *L, int tindex, int vindex, int pos) { if (tindex < 0) tindex = lua_gettop(L)+1+tindex; if (vindex < 0) vindex = lua_gettop(L)+1+vindex; if (pos == -1) { lua_pushvalue(L, vindex); lua_rawseti(L, tindex, (int) luax_objlen(L, tindex)+1); return 0; } else if (pos < 0) pos = (int) luax_objlen(L, tindex)+1+pos; for (int i = (int) luax_objlen(L, tindex)+1; i > pos; i--) { lua_rawgeti(L, tindex, i-1); lua_rawseti(L, tindex, i); } lua_pushvalue(L, vindex); lua_rawseti(L, tindex, pos); return 0; } int luax_register_searcher(lua_State *L, lua_CFunction f, int pos) { // Add the package loader to the package.loaders table. lua_getglobal(L, "package"); if (lua_isnil(L, -1)) return luaL_error(L, "Can't register searcher: package table does not exist."); lua_getfield(L, -1, "loaders"); // Lua 5.2 renamed package.loaders to package.searchers. if (lua_isnil(L, -1)) { lua_pop(L, 1); lua_getfield(L, -1, "searchers"); } if (lua_isnil(L, -1)) return luaL_error(L, "Can't register searcher: package.loaders table does not exist."); lua_pushcfunction(L, f); luax_table_insert(L, -2, -1, pos); lua_pop(L, 3); return 0; } void luax_rawnewtype(lua_State *L, love::Type &type, love::Object *object) { Proxy *u = (Proxy *)lua_newuserdata(L, sizeof(Proxy)); object->retain(); u->object = object; u->type = &type; const char *name = type.getName(); luaL_newmetatable(L, name); lua_getfield(L, -1, "__gc"); bool has_gc = !lua_isnoneornil(L, -1); lua_pop(L, 1); // Make sure mt.__gc exists, so Lua states which don't have the object's // module loaded will still clean the object up when it's collected. if (!has_gc) { lua_pushcfunction(L, w__gc); lua_setfield(L, -2, "__gc"); } lua_setmetatable(L, -2); } void luax_pushtype(lua_State *L, love::Type &type, love::Object *object) { if (object == nullptr) { lua_pushnil(L); return; } // Fetch the registry table of instantiated objects. luax_getregistry(L, REGISTRY_OBJECTS); // The table might not exist - it should be insisted in luax_register_type. if (lua_isnoneornil(L, -1)) { lua_pop(L, 1); return luax_rawnewtype(L, type, object); } ObjectKey objectkey = luax_computeloveobjectkey(L, object); // Get the value of loveobjects[object] on the stack. luax_pushloveobjectkey(L, objectkey); lua_gettable(L, -2); // If the Proxy userdata isn't in the instantiated types table yet, add it. if (lua_type(L, -1) != LUA_TUSERDATA) { lua_pop(L, 1); luax_rawnewtype(L, type, object); luax_pushloveobjectkey(L, objectkey); lua_pushvalue(L, -2); // loveobjects[object] = Proxy. lua_settable(L, -4); } // Remove the loveobjects table from the stack. lua_remove(L, -2); // Keep the Proxy userdata on the stack. } bool luax_istype(lua_State *L, int idx, love::Type &type) { if (lua_type(L, idx) != LUA_TUSERDATA) return false; Proxy *p = (Proxy *) lua_touserdata(L, idx); if (p->type != nullptr) return p->type->isa(type); else return false; } static Proxy *tryextractproxy(lua_State *L, int idx) { Proxy *u = (Proxy *)lua_touserdata(L, idx); if (u == nullptr || u->type == nullptr) return nullptr; // We could get rid of the dynamic_cast for more performance, but it would // be less safe... if (dynamic_cast(u->object) != nullptr) return u; return nullptr; } Variant luax_checkvariant(lua_State *L, int n, bool allowuserdata, std::set *tableSet) { size_t len; const char *str; Proxy *p = nullptr; if (n < 0) // Fix the stack position, we might modify it later n += lua_gettop(L) + 1; switch (lua_type(L, n)) { case LUA_TBOOLEAN: return Variant(luax_toboolean(L, n)); case LUA_TNUMBER: return Variant(lua_tonumber(L, n)); case LUA_TSTRING: str = lua_tolstring(L, n, &len); return Variant(str, len); case LUA_TLIGHTUSERDATA: return Variant(lua_touserdata(L, n)); case LUA_TUSERDATA: if (!allowuserdata) { luax_typerror(L, n, "copyable Lua value"); return Variant(); } p = tryextractproxy(L, n); if (p != nullptr) return Variant(p->type, p->object); else { luax_typerror(L, n, "love type"); return Variant(); } case LUA_TNIL: return Variant(); case LUA_TTABLE: { bool success = true; std::set topTableSet; // We can use a pointer to a stack-allocated variable because it's // never used after the stack-allocated variable is destroyed. if (tableSet == nullptr) tableSet = &topTableSet; // Now make sure this table wasn't already serialised const void *tablePointer = lua_topointer(L, n); { auto result = tableSet->insert(tablePointer); if (!result.second) // insertion failed throw love::Exception("Cycle detected in table"); } Variant::SharedTable *table = new Variant::SharedTable(); size_t len = luax_objlen(L, n); if (len > 0) table->pairs.reserve(len); lua_pushnil(L); while (lua_next(L, n)) { table->pairs.emplace_back( luax_checkvariant(L, -2, allowuserdata, tableSet), luax_checkvariant(L, -1, allowuserdata, tableSet) ); lua_pop(L, 1); const auto &p = table->pairs.back(); if (p.first.getType() == Variant::UNKNOWN || p.second.getType() == Variant::UNKNOWN) { success = false; break; } } // And remove the table from the set again tableSet->erase(tablePointer); if (success) return Variant(table); else table->release(); } break; } return Variant::unknown(); } void luax_pushvariant(lua_State *L, const Variant &v) { const Variant::Data &data = v.getData(); switch (v.getType()) { case Variant::BOOLEAN: lua_pushboolean(L, data.boolean); break; case Variant::NUMBER: lua_pushnumber(L, data.number); break; case Variant::STRING: lua_pushlstring(L, data.string->str, data.string->len); break; case Variant::SMALLSTRING: lua_pushlstring(L, data.smallstring.str, data.smallstring.len); break; case Variant::LUSERDATA: lua_pushlightuserdata(L, data.userdata); break; case Variant::LOVEOBJECT: luax_pushtype(L, *data.objectproxy.type, data.objectproxy.object); break; case Variant::TABLE: { std::vector> &table = data.table->pairs; int tsize = (int) table.size(); lua_createtable(L, 0, tsize); for (int i = 0; i < tsize; ++i) { std::pair &kv = table[i]; luax_pushvariant(L, kv.first); luax_pushvariant(L, kv.second); lua_settable(L, -3); } break; } case Variant::NIL: default: lua_pushnil(L); break; } } int luax_getfunction(lua_State *L, const char *mod, const char *fn) { lua_getglobal(L, "love"); if (lua_isnil(L, -1)) return luaL_error(L, "Could not find global love!"); lua_getfield(L, -1, mod); if (lua_isnil(L, -1)) return luaL_error(L, "Could not find love.%s!", mod); lua_getfield(L, -1, fn); if (lua_isnil(L, -1)) return luaL_error(L, "Could not find love.%s.%s!", mod, fn); lua_remove(L, -2); // remove mod lua_remove(L, -2); // remove fn return 0; } int luax_convobj(lua_State *L, int idx, const char *mod, const char *fn) { // Convert to absolute index if necessary. if (idx < 0 && idx > LUA_REGISTRYINDEX) idx += lua_gettop(L) + 1; // Convert string to a file. luax_getfunction(L, mod, fn); lua_pushvalue(L, idx); // The initial argument. lua_call(L, 1, 2); // Call the function, one arg, one return value (plus optional errstring.) luax_assert_nilerror(L, -2); // Make sure the function returned something. lua_pop(L, 1); // Pop the second return value now that we don't need it. lua_replace(L, idx); // Replace the initial argument with the new object. return 0; } int luax_convobj(lua_State *L, const int idxs[], int n, const char *mod, const char *fn) { luax_getfunction(L, mod, fn); for (int i = 0; i < n; i++) { lua_pushvalue(L, idxs[i]); // The arguments. } lua_call(L, n, 2); // Call the function, n args, one return value (plus optional errstring.) luax_assert_nilerror(L, -2); // Make sure the function returned something. lua_pop(L, 1); // Pop the second return value now that we don't need it. if (n > 0) lua_replace(L, idxs[0]); // Replace the initial argument with the new object. return 0; } int luax_convobj(lua_State *L, const std::vector& idxs, const char *module, const char *function) { const int *idxPtr = idxs.size() > 0 ? &idxs[0] : nullptr; return luax_convobj(L, idxPtr, (int) idxs.size(), module, function); } int luax_pconvobj(lua_State *L, int idx, const char *mod, const char *fn) { // Convert string to a file. luax_getfunction(L, mod, fn); lua_pushvalue(L, idx); // The initial argument. int ret = lua_pcall(L, 1, 1, 0); // Call the function, one arg, one return value. if (ret == 0) lua_replace(L, idx); // Replace the initial argument with the new object. return ret; } int luax_pconvobj(lua_State *L, const int idxs[], int n, const char *mod, const char *fn) { luax_getfunction(L, mod, fn); for (int i = 0; i < n; i++) { lua_pushvalue(L, idxs[i]); // The arguments. } int ret = lua_pcall(L, n, 1, 0); // Call the function, n args, one return value. if (ret == 0) lua_replace(L, idxs[0]); // Replace the initial argument with the new object. return ret; } int luax_pconvobj(lua_State *L, const std::vector& idxs, const char *module, const char *function) { const int *idxPtr = idxs.size() > 0 ? &idxs[0] : nullptr; return luax_pconvobj(L, idxPtr, (int) idxs.size(), module, function); } int luax_insist(lua_State *L, int idx, const char *k) { // Convert to absolute index if necessary. if (idx < 0 && idx > LUA_REGISTRYINDEX) idx += lua_gettop(L) + 1; lua_getfield(L, idx, k); // Create if necessary. if (!lua_istable(L, -1)) { lua_pop(L, 1); // Pop the non-table. lua_newtable(L); lua_pushvalue(L, -1); // Duplicate the table to leave on top. lua_setfield(L, idx, k); // lua_stack[idx][k] = lua_stack[-1] (table) } return 1; } int luax_insistglobal(lua_State *L, const char *k) { lua_getglobal(L, k); if (!lua_istable(L, -1)) { lua_pop(L, 1); // Pop the non-table. lua_newtable(L); lua_pushvalue(L, -1); lua_setglobal(L, k); } return 1; } int luax_c_insistglobal(lua_State *L, const char *k) { return luax_insistglobal(L, k); } int luax_insistlove(lua_State *L, const char *k) { luax_insistglobal(L, "love"); luax_insist(L, -1, k); // The love table should be replaced with the top stack // item. Only the reqested table should remain on the stack. lua_replace(L, -2); return 1; } int luax_getlove(lua_State *L, const char *k) { lua_getglobal(L, "love"); if (!lua_isnil(L, -1)) { lua_getfield(L, -1, k); lua_replace(L, -2); } return 1; } int luax_insistregistry(lua_State *L, Registry r) { switch (r) { case REGISTRY_MODULES: return luax_insistlove(L, "_modules"); case REGISTRY_OBJECTS: return luax_insist(L, LUA_REGISTRYINDEX, "_loveobjects"); default: return luaL_error(L, "Attempted to use invalid registry."); } } int luax_getregistry(lua_State *L, Registry r) { switch (r) { case REGISTRY_MODULES: return luax_getlove(L, "_modules"); case REGISTRY_OBJECTS: lua_getfield(L, LUA_REGISTRYINDEX, "_loveobjects"); return 1; default: return luaL_error(L, "Attempted to use invalid registry."); } } static const char *MAIN_THREAD_KEY = "_love_mainthread"; lua_State *luax_insistpinnedthread(lua_State *L) { lua_getfield(L, LUA_REGISTRYINDEX, MAIN_THREAD_KEY); if (lua_isnoneornil(L, -1)) { lua_pop(L, 1); // lua_pushthread returns 1 if it's actually the main thread, but we // can't actually get the real main thread if lua_pushthread doesn't // return it (in Lua 5.1 at least), so we ignore that for now... // We do store a strong reference to the current thread/coroutine in // the registry, however. lua_pushthread(L); lua_pushvalue(L, -1); lua_setfield(L, LUA_REGISTRYINDEX, MAIN_THREAD_KEY); } lua_State *thread = lua_tothread(L, -1); lua_pop(L, 1); return thread; } lua_State *luax_getpinnedthread(lua_State *L) { lua_getfield(L, LUA_REGISTRYINDEX, MAIN_THREAD_KEY); lua_State *thread = lua_tothread(L, -1); lua_pop(L, 1); return thread; } void luax_markdeprecated(lua_State *L, int level, const char *name, APIType api) { luax_markdeprecated(L, level, name, api, DEPRECATED_NO_REPLACEMENT, nullptr); } void luax_markdeprecated(lua_State *L, int level, const char *name, APIType api, DeprecationType type, const char *replacement) { MarkDeprecated deprecated(name, api, type, replacement); if (deprecated.info != nullptr && deprecated.info->uses == 1) { luaL_where(L, level); const char *where = lua_tostring(L, -1); if (where != nullptr) deprecated.info->where = where; lua_pop(L, 1); } } extern "C" int luax_typerror(lua_State *L, int narg, const char *tname) { int argtype = lua_type(L, narg); const char *argtname = nullptr; // We want to use the love type name for userdata, if possible. if (argtype == LUA_TUSERDATA && luaL_getmetafield(L, narg, "type") != 0) { lua_pushvalue(L, narg); if (lua_pcall(L, 1, 1, 0) == 0 && lua_type(L, -1) == LUA_TSTRING) { argtname = lua_tostring(L, -1); // Non-love userdata might have a type metamethod which doesn't // describe its type properly, so we only use it for love types. if (!Type::byName(argtname)) argtname = nullptr; } } if (argtname == nullptr) argtname = lua_typename(L, argtype); const char *msg = lua_pushfstring(L, "%s expected, got %s", tname, argtname); return luaL_argerror(L, narg, msg); } int luax_enumerror(lua_State *L, const char *enumName, const char *value) { return luaL_error(L, "Invalid %s: %s", enumName, value); } int luax_enumerror(lua_State *L, const char *enumName, const std::vector &values, const char *value) { std::stringstream valueStream; bool first = true; for (auto value : values) { valueStream << (first ? "'" : ", '") << value << "'"; first = false; } std::string valueString = valueStream.str(); return luaL_error(L, "Invalid %s '%s', expected one of: %s", enumName, value, valueString.c_str()); } size_t luax_objlen(lua_State *L, int ndx) { #if LUA_VERSION_NUM == 501 return lua_objlen(L, ndx); #else return lua_rawlen(L, ndx); #endif } void luax_register(lua_State *L, const char *name, const luaL_Reg *l) { if (name) lua_newtable(L); luax_setfuncs(L, l); if (name) { lua_pushvalue(L, -1); lua_setglobal(L, name); } } void luax_runwrapper(lua_State *L, const char *filedata, size_t datalen, const char *filename, const love::Type &type, void *ffifuncs) { luax_gettypemetatable(L, type); // Load and execute the given Lua file, sending the metatable and the ffi // functions struct pointer as arguments. if (lua_istable(L, -1)) { std::string chunkname = std::string("=[love \"") + std::string(filename) + std::string("\"]"); luaL_loadbuffer(L, filedata, datalen, chunkname.c_str()); lua_pushvalue(L, -2); if (ffifuncs != nullptr) luax_pushpointerasstring(L, ffifuncs); else lua_pushnil(L); lua_call(L, 2, 0); } // Pop the metatable. lua_pop(L, 1); } Type *luax_type(lua_State *L, int idx) { return Type::byName(luaL_checkstring(L, idx)); } int luax_resume(lua_State *L, int nargs, int* nres) { #if LUA_VERSION_NUM >= 504 return lua_resume(L, nullptr, nargs, nres); #elif LUA_VERSION_NUM >= 502 LOVE_UNUSED(nres); return lua_resume(L, nullptr, nargs); #else LOVE_UNUSED(nres); return lua_resume(L, nargs); #endif } } // love ================================================ FILE: src/common/runtime.h ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ #ifndef LOVE_RUNTIME_H #define LOVE_RUNTIME_H // LOVE #include "config.h" #include "types.h" #include "Object.h" #include "Variant.h" #include "deprecation.h" // Lua extern "C" { #define LUA_COMPAT_ALL #include #include #include } // C++ #include #include #include namespace love { // Forward declarations. class Module; class Reference; template class StrongRef; /** * Registries represent special tables which can be accessed with * luax_insistregistry and luax_getregistry. **/ enum Registry { REGISTRY_MODULES, REGISTRY_OBJECTS }; /** * A Module with Lua wrapper functions and other data. **/ struct WrappedModule { // The module containing the functions. Module *module; // The name for the table to put the functions in, without the 'love'-prefix. const char *name; // The type of this module. love::Type *type; // The functions of the module (last element {0,0}). const luaL_Reg *functions; // A list of functions which expose the types of the modules (last element 0). const lua_CFunction *types; }; /** * Returns a reference to the top stack element (-1) if the value * is of the specified type. If the value is incorrect, zero is returned. * * In any case, the top stack element is popped, regardless of its type. **/ Reference *luax_refif(lua_State *L, int type); /** * Prints the current contents of the stack. Only useful for debugging. * @param L The Lua state. **/ void luax_printstack(lua_State *L); /** * Traceback function for use with lua_pcall. Calls debug.traceback. **/ int luax_traceback(lua_State *L); /** * Gets whether the value at idx is an array of tables. **/ bool luax_isarrayoftables(lua_State *L, int idx); /** * Converts the value at idx to a bool. It follow the same rules * as lua_toboolean, but returns a bool instead of an int. * @param L The Lua state. * @param idx The index on the Lua stack. * @return True if the value evaluates to true, false otherwise. **/ bool luax_toboolean(lua_State *L, int idx); /** * Returns the boolean value at idx. Causes a Lua error if the value is not * a boolean. **/ bool luax_checkboolean(lua_State *L, int idx); /** * Pushes a bool onto the stack. It's the same as lua_pushboolean, * but with bool instead of int. * @param L The Lua state. * @param b The bool to push. **/ void luax_pushboolean(lua_State *L, bool b); /** * Converts the value at idx to a bool, or if not present, b is returned. * @param L The Lua state. * @param idx The index of the Lua stack. * @param b The value to return if no value exist at the specified index. * @return True if the value evaluates to true, false otherwise. **/ bool luax_optboolean(lua_State *L, int idx, bool b); /** * Converts the value at idx to a std::string. It takes care of the string * size and possible embedded nulls. * @param L The Lua state. * @param idx The index on the Lua stack. * @return Copy of the string at the specified index. **/ std::string luax_tostring(lua_State *L, int idx); /** * Converts the value at idx to a std::string. It takes care of the string * size and possible embedded nulls. * @param L The Lua state. * @param idx The index on the Lua stack. * @return Copy of the string at the specified index. **/ std::string luax_checkstring(lua_State *L, int idx); /** * Pushes a std::string onto the stack. It uses the length of the string * for lua_pushlstring's len argument. * @param L The Lua state. * @param str The string to push. **/ void luax_pushstring(lua_State *L, const std::string &str); /** * Pushes a pointer onto the stack as a string (i.e. a new string with a length * of 4 or 8 will be created, containing the given address in its bytes). * This is a workaround for lua_pushlightuserdata not working on systems which * use more than the lower 47 bits of address space, when LuaJIT is used. **/ void luax_pushpointerasstring(lua_State *L, const void *pointer); bool luax_boolflag(lua_State *L, int table_index, const char *key, bool defaultValue); int luax_intflag(lua_State *L, int table_index, const char *key, int defaultValue); double luax_numberflag(lua_State *L, int table_index, const char *key, double defaultValue); bool luax_checkboolflag(lua_State *L, int table_index, const char *key); int luax_checkintflag(lua_State *L, int table_index, const char *key); /** * Convert the value at the specified index to an Lua number, and then * convert to a float. * * @param L The Lua state. * @param idx The index on the stack. */ inline float luax_tofloat(lua_State *L, int idx) { return static_cast(lua_tonumber(L, idx)); } /** * Like luax_tofloat, but checks that the value is a number. * * @see luax_tofloat */ inline float luax_checkfloat(lua_State *L, int idx) { return static_cast(luaL_checknumber(L, idx)); } inline int luax_toint(lua_State *L, int idx) { return (int)lua_tointeger(L, idx); } inline int luax_checkint(lua_State *L, int idx) { return (int)luaL_checkinteger(L, idx); } inline int luax_optint(lua_State *L, int idx, int def) { return (int)luaL_optinteger(L, idx, (lua_Integer)def); } inline lua_Number luax_checknumberclamped(lua_State *L, int idx, double minv, double maxv) { return std::min(std::max(luaL_checknumber(L, idx), minv), maxv); } inline lua_Number luax_optnumberclamped(lua_State *L, int idx, double minv, double maxv, double def) { return std::min(std::max(luaL_optnumber(L, idx, def), minv), maxv); } inline lua_Number luax_checknumberclamped01(lua_State *L, int idx) { return std::min(std::max(luaL_checknumber(L, idx), 0.0), 1.0); } inline lua_Number luax_optnumberclamped01(lua_State *L, int idx, double def) { return std::min(std::max(luaL_optnumber(L, idx, def), 0.0), 1.0); } /** * Require at least 'min' number of items on the stack. * @param L The Lua state. * @param min The minimum number of items on the stack. * @return Zero if conditions are met, otherwise a Lua error (longjmp). **/ int luax_assert_argc(lua_State *L, int min); /** * Require at least 'min', but more than 'max' items on the stack. * @param L The Lua state. * @param min The minimum number of items on the stack. * @param max The maximum number of items on the stack. * @return Zero if conditions are met, otherwise a Lua error (longjmp). **/ int luax_assert_argc(lua_State *L, int min, int max); /** * Require that the value at idx is a function. * @param L The Lua state. *@param idx The index on the stack. **/ int luax_assert_function(lua_State *L, int idx); /** * Require that the value at idx is not nil. If it is, the function throws an * error using an optional error string at idx+1. * @param L The Lua state. * @param idx The index on the stack. **/ int luax_assert_nilerror(lua_State *L, int idx); /** * Registers all functions in the array l (see luaL_Reg) into the table at the * top of the stack. * Similar to Lua 5.2's luaL_setfuncs without the upvalues, and to Lua 5.1's * luaL_register without the library name. **/ void luax_setfuncs(lua_State *L, const luaL_Reg *l); /** * Loads a Lua module using the 'require' function. Leaves the return result on * the stack. * @param name The name of the module to require. **/ int luax_require(lua_State *L, const char *name); /** * Register a module in the love table. The love table will be created if it does not exist. * NOTE: The module-object is expected to have a +1 reference count before calling * this function, as it doesn't retain the object itself but Lua will release it * upon garbage collection. * @param L The Lua state. **/ int luax_register_module(lua_State *L, const WrappedModule &m); /** * Inserts a module with 'name' into the package.preloaded table. * @param f The function to be called when the module is opened. * @param name The name of the module, with 'love'-prefix, for instance 'love.graphics'. **/ int luax_preload(lua_State *L, lua_CFunction f, const char *name); /** * Register a new type. * NOTE: The type is passed by pointer instead of reference because calling va_start * on a reference is undefined behaviour. * @param type The type. * @param ... The list of lists of member functions for the type. (of type luaL_Reg*) **/ int luax_register_type(lua_State *L, love::Type *type, ...); /** * Pushes the metatable of the specified type onto the stack. **/ void luax_gettypemetatable(lua_State *L, const love::Type &type); /** * Do a table.insert from C * @param L the state * @param tindex the stack index of the table * @param vindex the stack index of the value * @param pos the position to insert it in **/ int luax_table_insert(lua_State *L, int tindex, int vindex, int pos = -1); /** * Register a new searcher function for package.loaders. This can for instance enable * loading of files through love.filesystem using standard require. * @param L The Lua state. * @param f The searcher function. * @param pos The position to insert the loader in. **/ int luax_register_searcher(lua_State *L, lua_CFunction f, int pos = -1); /** * Pushes a Lua representation of the given object onto the stack, creating and * storing the Lua representation in a weak table if it doesn't exist yet. * NOTE: The object will be retained by Lua and released upon garbage collection. * @param L The Lua state. * @param type The type information of the object. * @param object The pointer to the actual object. **/ void luax_pushtype(lua_State *L, love::Type &type, love::Object *object); template void luax_pushtype(lua_State *L, T *object) { luax_pushtype(L, T::type, object); } template void luax_pushtype(lua_State *L, StrongRef &object) { luax_pushtype(L, T::type, object); } /** * Creates a new Lua representation of the given object *without* checking if it * exists yet, and *without* storing it in a weak table. * This should only be used when performance is an extreme concern and the * object is not ever expected to be pushed to Lua again, as it prevents the * Lua-side objects from working in some cases when used as keys in tables. * NOTE: The object will be retained by Lua and released upon garbage collection. * @param L The Lua state. * @param type The type information of the object. * @param object The pointer to the actual object. **/ void luax_rawnewtype(lua_State *L, love::Type &type, love::Object *object); /** * Stores the value at the given index on the stack into a Variant object. */ LOVE_EXPORT Variant luax_checkvariant(lua_State *L, int idx, bool allowuserdata = true, std::set *tableSet = nullptr); /** * Pushes the contents of the given Variant index onto the stack. */ LOVE_EXPORT void luax_pushvariant(lua_State *L, const Variant &v); /** * Checks whether the value at idx is a certain type. * @param L The Lua state. * @param idx The index on the stack. * @param type The type to check for. * @return True if the value is Proxy of the specified type, false otherwise. **/ bool luax_istype(lua_State *L, int idx, love::Type &type); /** * Gets the function love.module.function and puts it on top of the stack (alone). If the * love table, the module, or the function does not exist, an error is returned. * @return An error if nonexistent, or 1 if successful. **/ int luax_getfunction(lua_State *L, const char *module, const char *function); /** * Converts an object into another object by the specified function love.module.function. * The conversion function must accept a single object of the relevant type as a parameter, * and returnone value. If the function does not exist (see luax_getfunction), an error is returned. * * Note that the initial object at idx is replaced by the new object. * * @param L The Lua state. * @param idx The index on the stack. * @param module The module in the love table. * @param function The function in the module. **/ int luax_convobj(lua_State *L, int idx, const char *module, const char *function); /** * Converts an object into another object by the specified function love.module.function. * The conversion function must accept a single object of the relevant type as its first parameter, * and return one value. If the function does not exist (see luax_getfunction), an error is returned. * * Note that the initial object at idx is replaced by the new object. * * @param L The Lua state. * @param idxs An array of indices on the stack. * @param n How many arguments are being passed. * @param module The module in the love table. * @param function The function in the module. **/ int luax_convobj(lua_State *L, const int idxs[], int n, const char *module, const char *function); int luax_convobj(lua_State *L, const std::vector& idxs, const char *module, const char *function); // pcall versions of the above int luax_pconvobj(lua_State *L, int idx, const char *module, const char *function); int luax_pconvobj(lua_State *L, const int idxs[], int n, const char *module, const char *function); int luax_pconvobj(lua_State *L, const std::vector& idxs, const char *module, const char *function); /** * 'Insist' that a table 'k' exists in the table at idx. Insistence involves that the * table (k) is created if it does not exist in the table at idx. The table at idx must * pre-exist, however. Also note that if the a non-table value exists at the specified * location, it will be overwritten with a new table. The insisted table, and only the * insisted table, will be placed on top of the stack. * * @param idx The index on the stack containing a table. * @param k The name of the table we are insisting exist. **/ int luax_insist(lua_State *L, int idx, const char *k); /** * Insist that a global table 'k' exists. See luax_insist. * @param k The name of the table we are insisting exist. **/ int luax_insistglobal(lua_State *L, const char *k); /** * Insists that a table 'k' exists inside the 'love' table. See luax_insist. * @param k The name of the table we are insisting exist. **/ int luax_insistlove(lua_State *L, const char *k); /** * Pushes the table 'k' in the love table onto the stack. Pushes nil if the * table doesn't exist. * @param k The name of the table we want to get. **/ int luax_getlove(lua_State *L, const char *k); /** * Gets (creates if needed) the specified Registry, and pushes it into the * stack. * @param L The Lua state. * @param r The Registry to get. **/ int luax_insistregistry(lua_State *L, Registry r); /** * Gets the specified Registry, and pushes it onto the stack. Pushes nil if the * registry hasn't been created (see luax_insistregistry.) * @param L The Lua state. * @param r The Registry to get. **/ int luax_getregistry(lua_State *L, Registry r); /** * Gets (and pins if needed) a "pinned" Lua thread (coroutine) in the specified * Lua state. This will usually be the main Lua thread, unless the first call * to this function for a specific Lua state is made from within a coroutine. * NOTE: This does not push anything to the stack. **/ lua_State *luax_insistpinnedthread(lua_State *L); /** * Gets a "pinned" Lua thread (coroutine) in the specified Lua state. This will * usually be the main Lua thread. This can be used to access global variables * in a specific Lua state without needing another alive lua_State value. * PRECONDITION: luax_insistpinnedthread must have been called on a lua_State * value corresponding to the Lua state which will be used with this function. * NOTE: This does not push anything to the stack. **/ lua_State *luax_getpinnedthread(lua_State *L); /** * Mark a function as deprecated. Should only be called inside wrapper function * code. **/ void luax_markdeprecated(lua_State *L, int level, const char *name, APIType api); void luax_markdeprecated(lua_State *L, int level, const char *name, APIType api, DeprecationType type, const char *replacement); extern "C" { // Also called from luasocket int luax_typerror(lua_State *L, int narg, const char *tname); } int luax_enumerror(lua_State *L, const char *enumName, const char *value); int luax_enumerror(lua_State *L, const char *enumName, const std::vector &values, const char *value); template void luax_checktablefields(lua_State *L, int idx, const char *enumName, bool (*getConstant)(const char *, T &)) { luaL_checktype(L, idx, LUA_TTABLE); // We want to error for invalid / misspelled fields in the table. lua_pushnil(L); while (lua_next(L, idx)) { if (lua_type(L, -2) != LUA_TSTRING) luax_typerror(L, -2, "string"); const char *key = luaL_checkstring(L, -2); T constantvalue; if (!getConstant(key, constantvalue)) luax_enumerror(L, enumName, key); lua_pop(L, 1); } } void luax_runwrapper(lua_State *L, const char *filedata, size_t datalen, const char *filename, const love::Type &type, void *ffifuncs); /** * Calls luax_objlen/lua_rawlen depending on version **/ size_t luax_objlen(lua_State *L, int ndx); extern "C" { // Called by enet and luasocket void luax_register(lua_State *L, const char *name, const luaL_Reg *l); int luax_c_insistglobal(lua_State *L, const char *k); } /** * Like luax_totype, but causes an error if the value at idx is not Proxy, * or is not the specified type. * @param L The Lua state. * @param idx The index on the stack. * @param type The type bit. **/ template T *luax_checktype(lua_State *L, int idx, const love::Type &type) { if (lua_type(L, idx) != LUA_TUSERDATA) { const char *name = type.getName(); luax_typerror(L, idx, name); } Proxy *u = (Proxy *)lua_touserdata(L, idx); if (u->type == nullptr || !u->type->isa(type)) { const char *name = type.getName(); luax_typerror(L, idx, name); } if (u->object == nullptr) luaL_error(L, "Cannot use object after it has been released."); return (T *)u->object; } template T *luax_checktype(lua_State *L, int idx) { return luax_checktype(L, idx, T::type); } template T *luax_ffi_checktype(Proxy *p, const love::Type &type = T::type) { // FIXME: We need better type-checking... if (p == nullptr || p->object == nullptr || p->type == nullptr || !p->type->isa(type)) return nullptr; return (T *) p->object; } template T *luax_getmodule(lua_State *L, const love::Type &type) { const char *name = type.getName(); luax_insistregistry(L, REGISTRY_MODULES); lua_getfield(L, -1, name); if (!lua_isuserdata(L, -1)) luaL_error(L, "Tried to get nonexistent module %s.", name); Proxy *u = (Proxy *)lua_touserdata(L, -1); if (u->type == nullptr || !u->type->isa(type)) luaL_error(L, "Incorrect module %s", name); lua_pop(L, 2); return (T *)u->object; } template T *luax_getmodule(lua_State *L) { return luax_getmodule(L, T::type); } template T *luax_optmodule(lua_State *L, const love::Type &type) { const char *name = type.getName(); luax_insistregistry(L, REGISTRY_MODULES); lua_getfield(L, -1, name); if (!lua_isuserdata(L, -1)) { lua_pop(L, 2); return 0; } Proxy *u = (Proxy *)lua_touserdata(L, -1); if (!u->type->isa(type)) luaL_error(L, "Incorrect module %s", name); lua_pop(L, 2); return (T *) u->object; } template T *luax_optmodule(lua_State *L) { return luax_optmodule(L, T::type); } /** * Converts the value at idx to the specified type. Returns null if the type * doesn't match. * @param L The Lua state. * @param idx The index on the stack. * @param type The type of the object. **/ template T *luax_totype(lua_State *L, int idx, const love::Type &type) { if (lua_type(L, idx) != LUA_TUSERDATA) return nullptr; Proxy *p = (Proxy *) lua_touserdata(L, idx); if (p->type != nullptr && p->type->isa(type)) { if (p->object == nullptr) luaL_error(L, "Cannot use object after it has been released."); return (T *) p->object; } return nullptr; } template T *luax_totype(lua_State *L, int idx) { return luax_totype(L, idx, T::type); } Type *luax_type(lua_State *L, int idx); /** * Converts any exceptions thrown by the passed lambda function into a Lua error. * lua_error (and luaL_error) cannot be called from inside the exception handler * because they use longjmp, which causes undefined behaviour when the * destructor of the exception would have been called. **/ template int luax_catchexcept(lua_State *L, const T& func) { bool should_error = false; try { func(); } catch (const std::exception &e) { should_error = true; lua_pushstring(L, e.what()); } if (should_error) return luaL_error(L, "%s", lua_tostring(L, -1)); return 0; } template int luax_catchexcept(lua_State *L, const T& func, const F& finallyfunc) { bool should_error = false; try { func(); } catch (const std::exception &e) { should_error = true; lua_pushstring(L, e.what()); } finallyfunc(should_error); if (should_error) return luaL_error(L, "%s", lua_tostring(L, -1)); return 0; } /** * Compatibility shim for lua_resume * Exported because it's used in the launcher **/ LOVE_EXPORT int luax_resume(lua_State *L, int nargs, int* nres); } // love #endif // LOVE_RUNTIME_H ================================================ FILE: src/common/types.cpp ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ // STL #include #include "types.h" namespace love { static std::unordered_map types; Type::Type(const char *name, Type *parent) : name(name) , parent(parent) , id(0) , inited(false) { } void Type::init() { static uint32 nextId = 1; // Make sure we don't init twice, that would be bad if (inited) return; // Note: we add it here, not in the constructor, because some Types can get initialized before the map! types[name] = this; id = nextId++; bits[id] = true; inited = true; if (!parent) return; if (!parent->inited) parent->init(); bits |= parent->bits; } uint32 Type::getId() { if (!inited) init(); return id; } const char *Type::getName() const { return name; } Type *Type::byName(const char *name) { auto pos = types.find(name); if (pos == types.end()) return nullptr; return pos->second; } } // love ================================================ FILE: src/common/types.h ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ #ifndef LOVE_TYPES_H #define LOVE_TYPES_H #include "int.h" // STD #include namespace love { class Type { public: static const uint32 MAX_TYPES = 128; Type(const char *name, Type *parent); Type(const Type&) = delete; static Type *byName(const char *name); void init(); uint32 getId(); const char *getName() const; bool isa(const uint32 &other) { if (!inited) init(); return bits[other]; } bool isa(const Type &other) { if (!inited) init(); // Note that if this type implements the other // calling init above will also have inited // the other. return bits[other.id]; } private: const char * const name; Type * const parent; uint32 id; bool inited; std::bitset bits; }; } // love #endif // LOVE_TYPES_H ================================================ FILE: src/common/utf8.cpp ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ #include "utf8.h" #ifdef LOVE_WINDOWS namespace love { std::string to_utf8(LPCWSTR wstr) { size_t wide_len = wcslen(wstr)+1; // Get size in UTF-8. int utf8_size = WideCharToMultiByte(CP_UTF8, 0, wstr, wide_len, 0, 0, 0, 0); char *utf8_str = new char[utf8_size]; // Convert to UTF-8. int ok = WideCharToMultiByte(CP_UTF8, 0, wstr, wide_len, utf8_str, utf8_size, 0, 0); std::string ret; if (ok) ret = utf8_str; delete[] utf8_str; return ret; } std::wstring to_widestr(const std::string &str) { if (str.empty()) return std::wstring(); int wide_size = MultiByteToWideChar(CP_UTF8, 0, str.c_str(), (int) str.length(), nullptr, 0); if (wide_size == 0) return std::wstring(); std::wstring widestr; widestr.resize(wide_size); int ok = MultiByteToWideChar(CP_UTF8, 0, str.c_str(), (int) str.length(), &widestr[0], widestr.length()); if (!ok) return std::wstring(); return widestr; } void replace_char(std::string &str, char find, char replace) { int length = str.length(); for (int i = 0; i #define WIN32_LEAN_AND_MEAN #include namespace love { /** * Convert the wide string to a UTF-8 encoded string. * @param wstr The wide-char string. * @return A UTF-8 string. **/ std::string to_utf8(LPCWSTR wstr); /** * Convert a UTF-8 encoded string to a wide string. * @param str The UTF-8 string. * @return A wide string. **/ std::wstring to_widestr(const std::string &str); /** * Replace all occurences of 'find' with 'replace' in a string. * @param str The string to modify. * @param find The character to match. * @param replace The character to replace matches. **/ void replace_char(std::string &str, char find, char replace); } // love #endif // LOVE_WINDOWS ================================================ FILE: src/common/version.h ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ #ifndef LOVE_VERSION_H #define LOVE_VERSION_H namespace love { // Version stuff. #define LOVE_VERSION_STRING "12.0" static const int VERSION_MAJOR = 12; static const int VERSION_MINOR = 0; static const int VERSION_REV = 0; static const char *VERSION = LOVE_VERSION_STRING; static const char *VERSION_COMPATIBILITY[] = { VERSION, 0 }; static const char *VERSION_CODENAME = "Bestest Friend"; } // love #endif // LOVE_VERSION_H ================================================ FILE: src/libraries/.editorconfig ================================================ # Don't enforce any styles here, it's all third party code. root = true ================================================ FILE: src/libraries/Wuff/wuff.c ================================================ #include #include "wuff_config.h" #include "wuff.h" #include "wuff_internal.h" wuff_sint32 wuff_open(struct wuff_handle ** handle_pointer, struct wuff_callback * callback, void * userdata) { struct wuff_handle * handle; wuff_sint32 wuff_status; if (handle_pointer == NULL || callback == NULL) return WUFF_INVALID_PARAM; handle = wuff_alloc(sizeof(struct wuff_handle)); if (handle == NULL) return WUFF_MEMALLOC_ERROR; memset(handle, 0, sizeof(struct wuff_handle)); handle->buffer.data = NULL; handle->callback = callback; handle->userdata = userdata; wuff_status = wuff_setup(handle); if (wuff_status < 0) { wuff_cleanup(handle); return wuff_status; } *handle_pointer = handle; return WUFF_SUCCESS; } wuff_sint32 wuff_close(struct wuff_handle * handle) { wuff_sint32 wuff_status; if (handle == NULL) return WUFF_INVALID_PARAM; wuff_status = wuff_cleanup(handle); WUFF_STATUS_BAIL() return WUFF_SUCCESS; } wuff_sint32 wuff_seek(struct wuff_handle * handle, wuff_uint64 offset) { wuff_sint32 wuff_status; wuff_uint64 seek_offset; if (handle == NULL) return WUFF_INVALID_PARAM; /* Clamp offset to stream length. */ offset = offset <= handle->stream.length ? offset : handle->stream.length; seek_offset = offset * handle->stream.header.block_size; wuff_status = handle->callback->seek(handle->userdata, handle->stream.data.offset + seek_offset); WUFF_STATUS_BAIL() handle->stream.position = offset; handle->output.block_offset = 0; /* A new position requires an empty buffer. */ wuff_status = wuff_buffer_clear(handle); WUFF_STATUS_BAIL() return WUFF_SUCCESS; } wuff_sint32 wuff_tell(struct wuff_handle * handle, wuff_uint64 * offset) { if (handle == NULL) return WUFF_INVALID_PARAM; *offset = handle->stream.position; return WUFF_SUCCESS; } wuff_sint32 wuff_stream_info(struct wuff_handle * handle, struct wuff_info * info) { if (handle == NULL || info == NULL) return WUFF_INVALID_PARAM; info->format = handle->stream.format; info->channels = handle->stream.header.channels; info->sample_rate = handle->stream.header.sample_rate; info->bits_per_sample = handle->stream.header.bits_per_sample; info->length = handle->stream.length; /* Think about adding channel mapping and perhaps other things. */ return WUFF_SUCCESS; } wuff_sint32 wuff_format(struct wuff_handle * handle, wuff_uint16 format) { wuff_sint32 wuff_status; if (handle == NULL) return WUFF_INVALID_PARAM; else if (format >= WUFF_FORMAT_MAX) return WUFF_FORMAT_UNSUPPORTED; /* A format change resets the position to the start of the block. */ wuff_status = wuff_seek(handle, handle->stream.position); WUFF_STATUS_BAIL() wuff_status = wuff_set_output_format(handle, format); WUFF_STATUS_BAIL() return WUFF_SUCCESS; } wuff_sint32 wuff_read(struct wuff_handle * handle, wuff_uint8 * out_buffer, size_t * out_size) { size_t current_offset; size_t r_samples, num_samples; wuff_uint8 head_offset, head, tail, sample_size; wuff_uint8 * in_buffer; wuff_sint32 wuff_status; if (handle == NULL || out_buffer == NULL || out_size == NULL) return WUFF_INVALID_PARAM; if (*out_size == 0) return WUFF_SUCCESS; sample_size = (wuff_uint8)handle->output.bytes_per_sample; /* Calculating the number of samples that fit into the application buffer. */ /* The first and last sample may be truncated. */ current_offset = handle->output.block_offset; head_offset = current_offset % sample_size; head = head_offset == 0 ? 0 : sample_size - head_offset; num_samples = wuff_calculate_samples(*out_size, sample_size, &head, &tail); /* Requesting the number of samples from the buffer. */ /* Calculate the new sample count if necessary and write the output. */ r_samples = num_samples; wuff_status = wuff_buffer_request(handle, &in_buffer, &r_samples); WUFF_STATUS_BAIL() else if (r_samples == 0) { /* Possible EOF. */ *out_size = 0; } else { if (r_samples == 1 && head != 0) { /* Only the first truncated sample fits. */ /* I really hope nobody will use small buffers like this. */ num_samples = 0; tail = 0; } else { /* At this point the first (possibly truncated) sample will be fully written. */ /* Subtract the first and last sample from the count if they're truncated. */ if (r_samples < num_samples) tail = 0; num_samples = r_samples - !!head - !!tail; } handle->output.function(out_buffer, in_buffer, num_samples, head_offset, head, tail); /* Report the number of bytes written. */ *out_size = num_samples * sample_size + head + tail; /* Adjust the block offset and sample position. */ current_offset += *out_size; if (current_offset >= handle->output.block_size) { handle->stream.position += current_offset / handle->output.block_size; handle->output.block_offset = current_offset % handle->output.block_size; } else { handle->output.block_offset = current_offset; } /* Release the fully processed samples from the buffer. */ wuff_status = wuff_buffer_release(handle, head_offset + head == sample_size ? num_samples + 1 : num_samples); WUFF_STATUS_BAIL() } return WUFF_SUCCESS; } void wuff_version(struct wuff_version * version) { if (version == NULL) return; version->major = WUFF_VERSION_MAJOR; version->minor = WUFF_VERSION_MINOR; version->build = WUFF_VERSION_BUILD; version->revision = WUFF_VERSION_REVISION; } ================================================ FILE: src/libraries/Wuff/wuff.h ================================================ /* * Wuff - A very basic WAVE reader */ #ifndef WUFF_H #define WUFF_H #ifdef __cplusplus extern "C" { #endif #define WUFF_VERSION_MAJOR 0 #define WUFF_VERSION_MINOR 0 #define WUFF_VERSION_BUILD 0 #define WUFF_VERSION_REVISION 2 #ifndef WUFF_API_OVERRIDE #if defined(_WIN32) && defined(WUFF_DYNAMIC_LIB) #define WUFF_EXPORT __declspec(dllexport) #define WUFF_IMPORT __declspec(dllimport) #else #define WUFF_EXPORT #define WUFF_IMPORT #endif #endif #ifdef WUFF_BUILDING_CORE #define WUFF_API WUFF_EXPORT #else #define WUFF_API WUFF_IMPORT #endif #ifdef WUFF_FORCE_STDINT_H #include typedef uint8_t wuff_uint8; typedef int8_t wuff_sint8; typedef uint16_t wuff_uint16; typedef int16_t wuff_sint16; typedef uint32_t wuff_uint32; typedef int32_t wuff_sint32; #ifdef WUFF_NO_64BIT_TYPE typedef uint32_t wuff_uint64; typedef int32_t wuff_sint64; #else typedef uint64_t wuff_uint64; typedef int64_t wuff_sint64; #endif #elif _MSC_VER typedef unsigned __int8 wuff_uint8; typedef signed __int8 wuff_sint8; typedef unsigned __int16 wuff_uint16; typedef signed __int16 wuff_sint16; typedef unsigned __int32 wuff_uint32; typedef signed __int32 wuff_sint32; typedef unsigned __int64 wuff_uint64; typedef signed __int64 wuff_sint64; #else typedef unsigned char wuff_uint8; typedef signed char wuff_sint8; typedef unsigned short wuff_uint16; typedef signed short wuff_sint16; typedef unsigned int wuff_uint32; typedef signed int wuff_sint32; #ifdef WUFF_NO_64BIT_TYPE typedef unsigned long wuff_uint64; typedef signed long wuff_sint64; #else typedef unsigned long long wuff_uint64; typedef signed long long wuff_sint64; #endif #endif /** @file */ /** * Opaque structure used to identify the open Wuff streams. */ struct wuff_handle; /** * Callbacks that control the delivery of the data of the WAVE file. * * The return values of the functions indicate their status. A zero or positive * value means success and a negative value failure. The macros WUFF_SUCCESS and * WUFF_ERROR, or a value equal or below WUFF_USER_ERROR can be used. The error * value will be returned by the function called by the application. */ struct wuff_callback { /** * The read callback requests the linking application to write at least * 'size' bytes into the memory where 'buffer' is pointing to. The value * pointed to by 'size' must be update to the actual number of bytes * written. Zero will be interepreted as the end-of-file. * * @param userdata The userdata set with wuff_open. * @param buffer A pointer to the memory where the data can be written to. * @param size A pointer to the size of the buffer and the bytes written. */ wuff_sint32 (* read)(void * userdata, wuff_uint8 * buffer, size_t * size); /** * The seek callback requests the linking application to seek to a new byte * offset in the WAVE data. The next call to the read callback must then * write data starting from this position. The offset is always relative * to the beginning of the WAVE data. * * @param userdata The userdata set with wuff_open. * @param offset The new offset. */ wuff_sint32 (* seek)(void * userdata, wuff_uint64 offset); /** * The tell callback requests the linking application to write the current * byte position to the integer pointed to by 'offset'. * * @param userdata The userdata set with wuff_open. * @param offset A pointer to an integer where the current position can be written to. */ wuff_sint32 (* tell)(void * userdata, wuff_uint64 * offset); }; /** * Stream information structure. */ struct wuff_info { wuff_uint16 format; /**< The format of the stream. * See "Wuff raw sample formats" below. */ wuff_uint16 channels; /**< The number of channels in the stream. */ wuff_uint32 sample_rate; /**< The sample rate in hertz. */ wuff_uint16 bits_per_sample; /**< The number of bits per sample. */ wuff_uint64 length; /**< The length of the stream in samples. */ }; /** * Version information structure. */ struct wuff_version { wuff_uint16 major; wuff_uint16 minor; wuff_uint16 build; wuff_uint16 revision; }; /** * Opens a new Wuff stream. This will read from the callbacks immediately, make * sure they're ready. It will check if the WAVE file is supported. * * @param handle A pointer to pointer of a wuff_handle that will be * initialized if the function succeeds. * @param callback The callbacks for the data of the WAVE file. * @param userdata A void pointer that will be passed to the callbacks. * @return Returns a negative value if an error occured. */ WUFF_API wuff_sint32 wuff_open(struct wuff_handle ** handle, struct wuff_callback * callback, void * userdata); /** * Closes a Wuff stream. * * @param handle The Wuff stream handle. * @return Returns a negative value if an error occured. */ WUFF_API wuff_sint32 wuff_close(struct wuff_handle * handle); /** * Fills the wuff_info struct with information about the stream. * * @param handle The Wuff stream handle. * @param info A pointer to a wuff_info struct. * @return Returns a negative value if an error occured. */ WUFF_API wuff_sint32 wuff_stream_info(struct wuff_handle * handle, struct wuff_info * info); /** * Sets the output format of the decoder. A new format resets the decoder output * to the beginning of the current block (the sample of the first channel). * * @param handle The Wuff stream handle. * @param format The new output format. * @return Returns a negative value if an error occured. */ WUFF_API wuff_sint32 wuff_format(struct wuff_handle * handle, wuff_uint16 format); /** * Decodes samples to the passed memory location. The size_t pointer points to * the maximum number of bytes that can be written to the buffer. This count * will be adjusted to the number of bytes written to the buffer. * * @param handle The Wuff stream handle. * @param buffer The buffer to write to. * @param size The maximum number of bytes to write to the buffer. * @return Returns a negative value if an error occured. */ WUFF_API wuff_sint32 wuff_read(struct wuff_handle * handle, wuff_uint8 * buffer, size_t * size); /** * Seeks to a sample location. * The next call to wuff_read will return samples starting from this position. * * @param handle The Wuff stream handle. * @param offset The sample offset to seek to. * @return Returns a negative value if an error occured. */ WUFF_API wuff_sint32 wuff_seek(struct wuff_handle * handle, wuff_uint64 offset); /** * Sets the current position. * * @param handle The Wuff stream handle. * @param offset A pointer to a integer that will receive the sample offset. * @return Returns a negative value if an error occured. */ WUFF_API wuff_sint32 wuff_tell(struct wuff_handle * handle, wuff_uint64 * offset); /** * Copies the Wuff version of the binary into the struct. * For compile-time version information use the WUFF_VERSION_MAJOR, * WUFF_VERSION_MINOR, WUFF_VERSION_BUILD, and WUFF_VERSION_REVISION macros. * * @param version A pointer to a wuff_version struct that will receive the * version information. */ WUFF_API void wuff_version(struct wuff_version * version); /* Wuff raw sample formats. */ #define WUFF_FORMAT_PCM_U8 0 #define WUFF_FORMAT_PCM_S16 1 #define WUFF_FORMAT_PCM_S24 2 #define WUFF_FORMAT_PCM_S32 3 #define WUFF_FORMAT_IEEE_FLOAT_32 4 #define WUFF_FORMAT_IEEE_FLOAT_64 5 #define WUFF_FORMAT_MAX 6 /* Success and error return values for all functions. */ #define WUFF_STREAM_EOF 100 #define WUFF_SUCCESS 0 #define WUFF_ERROR -1 #define WUFF_INVALID_PARAM -2 #define WUFF_MEMALLOC_ERROR -3 #define WUFF_STREAM_NOT_RIFF -100 #define WUFF_STREAM_NOT_WAVE -101 #define WUFF_STREAM_INVALID -102 #define WUFF_STREAM_ZERO_CHANNELS -103 #define WUFF_STREAM_ZERO_SAMPLE_RATE -104 #define WUFF_STREAM_ZERO_BITS_PER_SAMPLE -105 #define WUFF_STREAM_FORMAT_CHUNK_MISSING -106 #define WUFF_STREAM_DATA_CHUNK_MISSING -107 #define WUFF_STREAM_CHUNK_NOT_FOUND -108 #define WUFF_FORMAT_UNSUPPORTED -200 #define WUFF_BUFFER_INVALID_SIZE -300 #define WUFF_BUFFER_INVALID_STREAM_POSITION -301 #define WUFF_USER_ERROR -10000 #ifdef __cplusplus } #endif #endif /* WUFF_H */ ================================================ FILE: src/libraries/Wuff/wuff_config.h ================================================ #ifndef WUFF_CONFIG_H #define WUFF_CONFIG_H /* Defines that the internal code is being built. */ /* The wuff.h header uses this to change export and import macros. */ #define WUFF_BUILDING_CORE #ifndef WUFF_INLINE_OVERRIDE #ifdef __cplusplus #define WUFF_INLINE inline #else #ifdef _MSC_VER #define WUFF_INLINE __inline #elif __GNUC__ #define WUFF_INLINE __inline__ #else #define WUFF_INLINE #endif #endif #endif #ifndef WUFF_GCC_VISIBILITY_OVERRIDE #if __GNUC__ >= 4 #define WUFF_INTERN_API __attribute__((visibility("hidden"))) #else #define WUFF_INTERN_API #endif #endif #ifdef WUFF_MEMALLOC_OVERRIDE #ifdef __cplusplus extern "C" { #endif /* Define your own memory allocator. */ void * wuff_alloc(size_t size); void wuff_free(void * mem); #ifdef __cplusplus } #endif #else WUFF_INTERN_API void * wuff_alloc(size_t size); WUFF_INTERN_API void wuff_free(void * mem); #endif #endif /* WUFF_CONFIG_H */ ================================================ FILE: src/libraries/Wuff/wuff_convert.c ================================================ #include #include "wuff_config.h" #include "wuff.h" #include "wuff_convert.h" /* * int8 functions. */ WUFF_CONV_FUNC(wuff_int8_to_int8) { (void)offset; memcpy(dst, src, samples + head + tail); } WUFF_CONV_FUNC(wuff_int8_to_int16) { wuff_sint16 i16; size_t i; if (head != 0) { i16 = (src[0] - 128) << 8; memcpy(dst, (wuff_uint8 *)&i16 + offset, head); src += 1; dst += head; } for (i = 0; i < samples; i++) { i16 = (src[i] - 128) << 8; memcpy(dst + i * 2, &i16, 2); } if (tail != 0) { i16 = (src[samples] - 128) << 8; memcpy(dst + samples * 2, &i16, tail); } } WUFF_CONV_FUNC(wuff_int8_to_int24) { wuff_sint32 i24; size_t i; if (head != 0) { i24 = (src[0] - 128) << 24; memcpy(dst, (wuff_uint8 *)&i24 + 1 + offset, head); src += 1; dst += head; } for (i = 0; i < samples; i++) { i24 = (src[i] - 128) << 24; memcpy(dst + i * 3, (wuff_uint8 *)&i24 + 1, 3); } if (tail != 0) { i24 = (src[samples] - 128) << 24; memcpy(dst + samples * 3, (wuff_uint8 *)&i24 + 1, tail); } } WUFF_CONV_FUNC(wuff_int8_to_int32) { wuff_sint32 i32; size_t i; if (head != 0) { i32 = (src[0] - 128) << 24; memcpy(dst, (wuff_uint8 *)&i32 + offset, head); src += 1; dst += head; } for (i = 0; i < samples; i++) { i32 = (src[i] - 128) << 24; memcpy(dst + i * 4, &i32, 4); } if (tail != 0) { i32 = (src[samples] - 128) << 24; memcpy(dst + samples * 4, &i32, tail); } } WUFF_CONV_FUNC(wuff_int8_to_float32) { float f32; size_t i; if (head != 0) { f32 = (float)(src[0] - 128) / 128.0f; memcpy(dst, (wuff_uint8 *)&f32 + offset, head); src += 1; dst += head; } for (i = 0; i < samples; i++) { f32 = (float)(src[i] - 128) / 128.0f; memcpy(dst + i * 4, &f32, 4); } if (tail != 0) { f32 = (float)(src[samples] - 128) / 128.0f; memcpy(dst + samples * 4, &f32, tail); } } WUFF_CONV_FUNC(wuff_int8_to_float64) { double f64; size_t i; if (head != 0) { f64 = (double)(src[0] - 128) / 128.0; memcpy(dst, (wuff_uint8 *)&f64 + offset, head); src += 1; dst += head; } for (i = 0; i < samples; i++) { f64 = (double)(src[i] - 128) / 128.0; memcpy(dst + i * 8, &f64, 8); } if (tail != 0) { f64 = (double)(src[samples] - 128) / 128.0; memcpy(dst + samples * 8, &f64, tail); } } /* * int16 functions. */ WUFF_CONV_FUNC(wuff_int16_to_int8) { wuff_sint16 i16; size_t i; (void)offset; (void)head; (void)tail; for (i = 0; i < samples; i++) { memcpy(&i16, src + i * 2, 2); dst[i] = (i16 >> 8) + 128; } } WUFF_CONV_FUNC(wuff_int16_to_int16) { memcpy(dst, src + offset, samples * 2 + head + tail); } WUFF_CONV_FUNC(wuff_int16_to_int24) { wuff_sint16 i16; wuff_sint32 i24; size_t i; if (head != 0) { memcpy(&i16, src, 2); i24 = i16 << 16; memcpy(dst, (wuff_uint8 *)&i24 + 1 + offset, head); src += 2; dst += head; } for (i = 0; i < samples; i++) { memcpy(&i16, src + i * 2, 2); i24 = i16 << 16; memcpy(dst + i * 3, (wuff_uint8 *)&i24 + 1, 3); } if (tail != 0) { memcpy(&i16, src + samples * 2, 2); i24 = i16 << 16; memcpy(dst + samples * 3, (wuff_uint8 *)&i24 + 1, tail); } } WUFF_CONV_FUNC(wuff_int16_to_int32) { wuff_sint16 i16; wuff_sint32 i32; size_t i; if (head != 0) { memcpy(&i16, src, 2); i32 = i16 << 16; memcpy(dst, (wuff_uint8 *)&i32 + offset, head); src += 2; dst += head; } for (i = 0; i < samples; i++) { memcpy(&i16, src + i * 2, 2); i32 = i16 << 16; memcpy(dst + i * 4, &i32, 4); } if (tail != 0) { memcpy(&i16, src + samples * 2, 2); i32 = i16 << 16; memcpy(dst + samples * 4, &i32, tail); } } WUFF_CONV_FUNC(wuff_int16_to_float32) { wuff_sint16 i16; float f32; size_t i; if (head != 0) { memcpy(&i16, src, 2); f32 = (float)i16 / 32768.0f; memcpy(dst, (wuff_uint8 *)&f32 + offset, head); src += 2; dst += head; } for (i = 0; i < samples; i++) { memcpy(&i16, src + i * 2, 2); f32 = (float)i16 / 32768.0f; memcpy(dst + i * 4, &f32, 4); } if (tail != 0) { memcpy(&i16, src + samples * 2, 2); f32 = (float)i16 / 32768.0f; memcpy(dst + samples * 4, &f32, tail); } } WUFF_CONV_FUNC(wuff_int16_to_float64) { wuff_sint16 i16; double f64; size_t i; if (head != 0) { memcpy(&i16, src, 2); f64 = (double)i16 / 32768.0; memcpy(dst, (wuff_uint8 *)&f64 + offset, head); src += 2; dst += head; } for (i = 0; i < samples; i++) { memcpy(&i16, src + i * 2, 2); f64 = (double)i16 / 32768.0; memcpy(dst + i * 8, &f64, 8); } if (tail != 0) { memcpy(&i16, src + samples * 2, 2); f64 = (double)i16 / 32768.0; memcpy(dst + samples * 8, &f64, tail); } } /* * int24 functions. */ WUFF_CONV_FUNC(wuff_int24_to_int8) { wuff_sint32 i24 = 0; size_t i; (void)offset; (void)head; (void)tail; for (i = 0; i < samples; i++) { memcpy((wuff_uint8 *)&i24 + 1, src + i * 3, 3); dst[i] = (wuff_uint8)((i24 >> 16) + 128); } } WUFF_CONV_FUNC(wuff_int24_to_int16) { size_t i; if (head != 0) { memcpy(dst, src + 1 + offset, head); src += 3; dst += head; } for (i = 0; i < samples; i++) { memcpy(dst + i * 2, src + 1 + i * 3, 2); } if (tail != 0) { memcpy(dst + samples * 2, src + 1 + samples * 3, tail); } } WUFF_CONV_FUNC(wuff_int24_to_int24) { memcpy(dst, src + offset, samples * 3 + head + tail); } WUFF_CONV_FUNC(wuff_int24_to_int32) { wuff_sint32 i32 = 0; size_t i; if (head != 0) { memcpy((wuff_uint8 *)&i32 + 1, src, 3); memcpy(dst, (wuff_uint8 *)&i32 + offset, head); src += 3; dst += head; } for (i = 0; i < samples; i++) { memcpy((wuff_uint8 *)&i32 + 1, src + i * 3, 3); memcpy(dst + i * 4, &i32, 4); } if (tail != 0) { memcpy((wuff_uint8 *)&i32 + 1, src + samples * 3, 3); memcpy(dst + samples * 4, &i32, tail); } } WUFF_CONV_FUNC(wuff_int24_to_float32) { wuff_sint32 i24 = 0; float f32; size_t i; if (head != 0) { memcpy((wuff_uint8 *)&i24 + 1, src, 3); f32 = (float)((double)i24 / 2147483648.0); memcpy(dst, (wuff_uint8 *)&f32 + offset, head); src += 3; dst += head; } for (i = 0; i < samples; i++) { memcpy((wuff_uint8 *)&i24 + 1, src + i * 3, 3); f32 = (float)((double)i24 / 2147483648.0); memcpy(dst + i * 4, &f32, 4); } if (tail != 0) { memcpy((wuff_uint8 *)&i24 + 1, src + samples * 3, 3); f32 = (float)((double)i24 / 2147483648.0); memcpy(dst + samples * 4, &f32, tail); } } WUFF_CONV_FUNC(wuff_int24_to_float64) { wuff_sint32 i24 = 0; double f64; size_t i; if (head != 0) { memcpy((wuff_uint8 *)&i24 + 1, src, 3); f64 = (double)i24 / 2147483648.0; memcpy(dst, (wuff_uint8 *)&f64 + offset, head); src += 3; dst += head; } for (i = 0; i < samples; i++) { memcpy((wuff_uint8 *)&i24 + 1, src + i * 3, 3); f64 = (double)i24 / 2147483648.0; memcpy(dst + i * 8, &f64, 8); } if (tail != 0) { memcpy((wuff_uint8 *)&i24 + 1, src + samples * 3, 3); f64 = (double)i24 / 2147483648.0; memcpy(dst + samples * 8, &f64, tail); } } /* * int32 functions. */ WUFF_CONV_FUNC(wuff_int32_to_int8) { wuff_sint32 i32 = 0; size_t i; (void)offset; (void)head; (void)tail; for (i = 0; i < samples; i++) { memcpy(&i32, src + i * 4, 4); dst[i] = (i32 >> 24) + 128; } } WUFF_CONV_FUNC(wuff_int32_to_int16) { size_t i; if (head != 0) { memcpy(dst, src + 2 + offset, head); src += 4; dst += head; } for (i = 0; i < samples; i++) { memcpy(dst + i * 2, src + 2 + i * 4, 2); } if (tail != 0) { memcpy(dst + samples * 2, src + 2 + samples * 4, tail); } } WUFF_CONV_FUNC(wuff_int32_to_int24) { size_t i; if (head != 0) { memcpy(dst, src + 1 + offset, head); src += 4; dst += head; } for (i = 0; i < samples; i++) { memcpy(dst + i * 3, src + 1 + i * 4, 3); } if (tail != 0) { memcpy(dst + samples * 3, src + 1 + samples * 4, tail); } } WUFF_CONV_FUNC(wuff_int32_to_int32) { memcpy(dst, src + offset, samples * 4 + head + tail); } WUFF_CONV_FUNC(wuff_int32_to_float32) { wuff_sint32 i32; float f32; size_t i; if (head != 0) { memcpy(&i32, src, 4); f32 = (float)((double)i32 / 2147483648.0); memcpy(dst, (wuff_uint8 *)&f32 + offset, head); src += 4; dst += head; } for (i = 0; i < samples; i++) { memcpy(&i32, src + i * 4, 4); f32 = (float)((double)i32 / 2147483648.0); memcpy(dst + i * 4, &f32, 4); } if (tail != 0) { memcpy(&i32, src + samples * 4, 4); f32 = (float)((double)i32 / 2147483648.0); memcpy(dst + samples * 4, &f32, tail); } } WUFF_CONV_FUNC(wuff_int32_to_float64) { wuff_sint32 i32; double f64; size_t i; if (head != 0) { memcpy(&i32, src, 4); f64 = (double)i32 / 2147483648.0; memcpy(dst, (wuff_uint8 *)&f64 + offset, head); src += 4; dst += head; } for (i = 0; i < samples; i++) { memcpy(&i32, src + i * 4, 4); f64 = (double)i32 / 2147483648.0; memcpy(dst + i * 8, &f64, 8); } if (tail != 0) { memcpy(&i32, src + samples * 4, 4); f64 = (double)i32 / 2147483648.0; memcpy(dst + samples * 8, &f64, tail); } } /* * float32 functions. */ WUFF_CONV_FUNC(wuff_float32_to_int8) { float f32; size_t i; (void)offset; (void)head; (void)tail; for (i = 0; i < samples; i++) { memcpy(&f32, src + i * 4, 4); dst[i] = (wuff_uint8)((f32 * 127.5f) + 128.0f); } } WUFF_CONV_FUNC(wuff_float32_to_int16) { float f32; wuff_sint16 i16; size_t i; if (head != 0) { memcpy(&f32, src, 4); i16 = (wuff_sint16)(f32 * 32767.5f); memcpy(dst, (wuff_uint8 *)&i16 + offset, head); src += 4; dst += head; } for (i = 0; i < samples; i++) { memcpy(&f32, src + i * 4, 4); i16 = (wuff_sint16)(f32 * 32767.5f); memcpy(dst + i * 2, &i16, 2); } if (tail != 0) { memcpy(&f32, src + i * 4, 4); i16 = (wuff_sint16)(f32 * 32767.5f); memcpy(dst + i * 2, &i16, tail); } } WUFF_CONV_FUNC(wuff_float32_to_int24) { float f32; wuff_sint32 i24; size_t i; if (head != 0) { memcpy(&f32, src, 4); i24 = (wuff_sint32)((double)f32 * 2147483647.5); memcpy(dst, (wuff_uint8 *)&i24 + 1 + offset, head); src += 4; dst += head; } for (i = 0; i < samples; i++) { memcpy(&f32, src + i * 4, 4); i24 = (wuff_sint32)((double)f32 * 2147483647.5); memcpy(dst + i * 3, (wuff_uint8 *)&i24 + 1, 3); } if (tail != 0) { memcpy(&f32, src + samples * 4, 4); i24 = (wuff_sint32)((double)f32 * 2147483647.5); memcpy(dst + samples * 3, (wuff_uint8 *)&i24 + 1, tail); } } WUFF_CONV_FUNC(wuff_float32_to_int32) { float f32; wuff_sint32 i32; size_t i; if (head != 0) { memcpy(&f32, src, 4); i32 = (wuff_sint32)((double)f32 * 2147483647.5); memcpy(dst, (wuff_uint8 *)&i32 + offset, head); src += 4; dst += head; } for (i = 0; i < samples; i++) { memcpy(&f32, src + i * 4, 4); i32 = (wuff_sint32)((double)f32 * 2147483647.5); memcpy(dst + i * 4, &i32, 4); } if (tail != 0) { memcpy(&f32, src + samples * 4, 4); i32 = (wuff_sint32)((double)f32 * 2147483647.5); memcpy(dst + samples * 4, &i32, tail); } } WUFF_CONV_FUNC(wuff_float32_to_float32) { memcpy(dst, src + offset, samples * 4 + head + tail); } WUFF_CONV_FUNC(wuff_float32_to_float64) { float f32; double f64; size_t i; if (head != 0) { memcpy(&f32, src, 4); f64 = f32; memcpy(dst, (wuff_uint8 *)&f64 + offset, head); src += 4; dst += head; } for (i = 0; i < samples; i++) { memcpy(&f32, src + i * 4, 4); f64 = f32; memcpy(dst + i * 8, &f64, 8); } if (tail != 0) { memcpy(&f32, src + samples * 4, 4); f64 = f32; memcpy(dst + samples * 8, &f64, tail); } } /* * float64 functions. */ WUFF_CONV_FUNC(wuff_float64_to_int8) { double f64; size_t i; (void)offset; (void)head; (void)tail; for (i = 0; i < samples; i++) { memcpy(&f64, src + i * 8, 8); dst[i] = (wuff_uint8)((f64 * 127.5) + 128.0); } } WUFF_CONV_FUNC(wuff_float64_to_int16) { double f64; wuff_sint16 i16; size_t i; if (head != 0) { memcpy(&f64, src, 8); i16 = (wuff_sint16)(f64 * 32767.5); memcpy(dst, (wuff_uint8 *)&i16 + offset, head); src += 8; dst += head; } for (i = 0; i < samples; i++) { memcpy(&f64, src + i * 8, 8); i16 = (wuff_sint16)(f64 * 32767.5); memcpy(dst + i * 2, &i16, 2); } if (tail != 0) { memcpy(&f64, src + i * 8, 8); i16 = (wuff_sint16)(f64 * 32767.5); memcpy(dst + i * 2, &i16, tail); } } WUFF_CONV_FUNC(wuff_float64_to_int24) { double f64; wuff_sint32 i24; size_t i; if (head != 0) { memcpy(&f64, src, 8); i24 = (wuff_sint32)(f64 * 2147483647.5); memcpy(dst, (wuff_uint8 *)&i24 + 1 + offset, head); src += 8; dst += head; } for (i = 0; i < samples; i++) { memcpy(&f64, src + i * 8, 8); i24 = (wuff_sint32)(f64 * 2147483647.5); memcpy(dst + i * 3, (wuff_uint8 *)&i24 + 1, 3); } if (tail != 0) { memcpy(&f64, src + samples * 8, 8); i24 = (wuff_sint32)(f64 * 2147483647.5); memcpy(dst + samples * 3, (wuff_uint8 *)&i24 + 1, tail); } } WUFF_CONV_FUNC(wuff_float64_to_int32) { double f64; wuff_sint32 i32; size_t i; if (head != 0) { memcpy(&f64, src, 8); i32 = (wuff_sint32)(f64 * 2147483647.5); memcpy(dst, (wuff_uint8 *)&i32 + offset, head); src += 8; dst += head; } for (i = 0; i < samples; i++) { memcpy(&f64, src + i * 8, 8); i32 = (wuff_sint32)(f64 * 2147483647.5); memcpy(dst + i * 4, &i32, 4); } if (tail != 0) { memcpy(&f64, src + samples * 8, 8); i32 = (wuff_sint32)(f64 * 2147483647.5); memcpy(dst + samples * 4, &i32, tail); } } WUFF_CONV_FUNC(wuff_float64_to_float32) { double f64; float f32; size_t i; if (head != 0) { memcpy(&f64, src, 8); f32 = (float)f64; memcpy(dst, (wuff_uint8 *)&f32 + offset, head); src += 8; dst += head; } for (i = 0; i < samples; i++) { memcpy(&f64, src + i * 8, 8); f32 = (float)f64; memcpy(dst + i * 4, &f32, 4); } if (tail != 0) { memcpy(&f64, src + samples * 8, 8); f32 = (float)f64; memcpy(dst + samples * 4, &f32, tail); } } WUFF_CONV_FUNC(wuff_float64_to_float64) { memcpy(dst, src + offset, samples * 8 + head + tail); } ================================================ FILE: src/libraries/Wuff/wuff_convert.h ================================================ #ifndef WUFF_CONVERT_H #define WUFF_CONVERT_H #define WUFF_CONV_FUNC(name) WUFF_INTERN_API void name(wuff_uint8 * dst, wuff_uint8 * src, size_t samples, wuff_uint8 offset, wuff_uint8 head, wuff_uint8 tail) WUFF_CONV_FUNC(wuff_int8_to_int8); WUFF_CONV_FUNC(wuff_int8_to_int16); WUFF_CONV_FUNC(wuff_int8_to_int24); WUFF_CONV_FUNC(wuff_int8_to_int32); WUFF_CONV_FUNC(wuff_int8_to_float32); WUFF_CONV_FUNC(wuff_int8_to_float64); WUFF_CONV_FUNC(wuff_int16_to_int8); WUFF_CONV_FUNC(wuff_int16_to_int16); WUFF_CONV_FUNC(wuff_int16_to_int24); WUFF_CONV_FUNC(wuff_int16_to_int32); WUFF_CONV_FUNC(wuff_int16_to_float32); WUFF_CONV_FUNC(wuff_int16_to_float64); WUFF_CONV_FUNC(wuff_int24_to_int8); WUFF_CONV_FUNC(wuff_int24_to_int16); WUFF_CONV_FUNC(wuff_int24_to_int24); WUFF_CONV_FUNC(wuff_int24_to_int32); WUFF_CONV_FUNC(wuff_int24_to_float32); WUFF_CONV_FUNC(wuff_int24_to_float64); WUFF_CONV_FUNC(wuff_int32_to_int8); WUFF_CONV_FUNC(wuff_int32_to_int16); WUFF_CONV_FUNC(wuff_int32_to_int24); WUFF_CONV_FUNC(wuff_int32_to_int32); WUFF_CONV_FUNC(wuff_int32_to_float32); WUFF_CONV_FUNC(wuff_int32_to_float64); WUFF_CONV_FUNC(wuff_float32_to_int8); WUFF_CONV_FUNC(wuff_float32_to_int16); WUFF_CONV_FUNC(wuff_float32_to_int24); WUFF_CONV_FUNC(wuff_float32_to_int32); WUFF_CONV_FUNC(wuff_float32_to_float32); WUFF_CONV_FUNC(wuff_float32_to_float64); WUFF_CONV_FUNC(wuff_float64_to_int8); WUFF_CONV_FUNC(wuff_float64_to_int16); WUFF_CONV_FUNC(wuff_float64_to_int24); WUFF_CONV_FUNC(wuff_float64_to_int32); WUFF_CONV_FUNC(wuff_float64_to_float32); WUFF_CONV_FUNC(wuff_float64_to_float64); #endif /* WUFF_CONVERT_H */ ================================================ FILE: src/libraries/Wuff/wuff_internal.c ================================================ #include #include #include "wuff_config.h" #include "wuff.h" #include "wuff_internal.h" #include "wuff_convert.h" wuff_sint32 wuff_setup(struct wuff_handle * handle) { wuff_sint32 wuff_status; if (handle == NULL) return WUFF_INVALID_PARAM; wuff_status = wuff_init_stream(handle); WUFF_STATUS_BAIL() /* Allocating the buffer for the handle requires information from the stream. */ wuff_status = wuff_buffer_alloc(handle); WUFF_STATUS_BAIL() /* The output format defaults to the stream format. */ wuff_status = wuff_format(handle, handle->stream.format); WUFF_STATUS_BAIL() return WUFF_SUCCESS; } wuff_sint32 wuff_cleanup(struct wuff_handle * handle) { if (handle == NULL) return WUFF_INVALID_PARAM; if (handle->buffer.data != NULL) wuff_free(handle->buffer.data); wuff_free(handle); return WUFF_SUCCESS; } wuff_sint32 wuff_set_output_format(struct wuff_handle * handle, wuff_uint16 format) { wuff_uint16 bits; wuff_uint16 stream_format; if (handle == NULL) return WUFF_INVALID_PARAM; else if (format >= WUFF_FORMAT_MAX) return WUFF_FORMAT_UNSUPPORTED; stream_format = handle->stream.format; switch (format) { case WUFF_FORMAT_PCM_U8: bits = 8; switch (stream_format) { case WUFF_FORMAT_PCM_U8: handle->output.function = wuff_int8_to_int8; break; case WUFF_FORMAT_PCM_S16: handle->output.function = wuff_int16_to_int8; break; case WUFF_FORMAT_PCM_S24: handle->output.function = wuff_int24_to_int8; break; case WUFF_FORMAT_PCM_S32: handle->output.function = wuff_int32_to_int8; break; case WUFF_FORMAT_IEEE_FLOAT_32: handle->output.function = wuff_float32_to_int8; break; case WUFF_FORMAT_IEEE_FLOAT_64: handle->output.function = wuff_float64_to_int8; break; } break; case WUFF_FORMAT_PCM_S16: bits = 16; switch (stream_format) { case WUFF_FORMAT_PCM_U8: handle->output.function = wuff_int8_to_int16; break; case WUFF_FORMAT_PCM_S16: handle->output.function = wuff_int16_to_int16; break; case WUFF_FORMAT_PCM_S24: handle->output.function = wuff_int24_to_int16; break; case WUFF_FORMAT_PCM_S32: handle->output.function = wuff_int32_to_int16; break; case WUFF_FORMAT_IEEE_FLOAT_32: handle->output.function = wuff_float32_to_int16; break; case WUFF_FORMAT_IEEE_FLOAT_64: handle->output.function = wuff_float64_to_int16; break; } break; case WUFF_FORMAT_PCM_S24: bits = 24; switch (stream_format) { case WUFF_FORMAT_PCM_U8: handle->output.function = wuff_int8_to_int24; break; case WUFF_FORMAT_PCM_S16: handle->output.function = wuff_int16_to_int24; break; case WUFF_FORMAT_PCM_S24: handle->output.function = wuff_int24_to_int24; break; case WUFF_FORMAT_PCM_S32: handle->output.function = wuff_int32_to_int24; break; case WUFF_FORMAT_IEEE_FLOAT_32: handle->output.function = wuff_float32_to_int24; break; case WUFF_FORMAT_IEEE_FLOAT_64: handle->output.function = wuff_float64_to_int24; break; } break; case WUFF_FORMAT_PCM_S32: bits = 32; switch (stream_format) { case WUFF_FORMAT_PCM_U8: handle->output.function = wuff_int8_to_int32; break; case WUFF_FORMAT_PCM_S16: handle->output.function = wuff_int16_to_int32; break; case WUFF_FORMAT_PCM_S24: handle->output.function = wuff_int24_to_int32; break; case WUFF_FORMAT_PCM_S32: handle->output.function = wuff_int32_to_int32; break; case WUFF_FORMAT_IEEE_FLOAT_32: handle->output.function = wuff_float32_to_int32; break; case WUFF_FORMAT_IEEE_FLOAT_64: handle->output.function = wuff_float64_to_int32; break; } break; case WUFF_FORMAT_IEEE_FLOAT_32: bits = 32; switch (stream_format) { case WUFF_FORMAT_PCM_U8: handle->output.function = wuff_int8_to_float32; break; case WUFF_FORMAT_PCM_S16: handle->output.function = wuff_int16_to_float32; break; case WUFF_FORMAT_PCM_S24: handle->output.function = wuff_int24_to_float32; break; case WUFF_FORMAT_PCM_S32: handle->output.function = wuff_int32_to_float32; break; case WUFF_FORMAT_IEEE_FLOAT_32: handle->output.function = wuff_float32_to_float32; break; case WUFF_FORMAT_IEEE_FLOAT_64: handle->output.function = wuff_float64_to_float32; break; } break; case WUFF_FORMAT_IEEE_FLOAT_64: bits = 64; switch (stream_format) { case WUFF_FORMAT_PCM_U8: handle->output.function = wuff_int8_to_float64; break; case WUFF_FORMAT_PCM_S16: handle->output.function = wuff_int16_to_float64; break; case WUFF_FORMAT_PCM_S24: handle->output.function = wuff_int24_to_float64; break; case WUFF_FORMAT_PCM_S32: handle->output.function = wuff_int32_to_float64; break; case WUFF_FORMAT_IEEE_FLOAT_32: handle->output.function = wuff_float32_to_float64; break; case WUFF_FORMAT_IEEE_FLOAT_64: handle->output.function = wuff_float64_to_float64; break; } break; default: return WUFF_FORMAT_UNSUPPORTED; } handle->output.format = format; handle->output.bytes_per_sample = bits / 8; handle->output.block_size = handle->stream.header.channels * (bits / 8); return WUFF_SUCCESS; } wuff_sint32 wuff_check_bits(wuff_uint16 bits, wuff_uint16 * format) { if (*format == WUFF_FORMAT_PCM) { switch (bits) { case 8: *format = WUFF_FORMAT_PCM_U8; break; case 16: *format = WUFF_FORMAT_PCM_S16; break; case 24: *format = WUFF_FORMAT_PCM_S24; break; case 32: *format = WUFF_FORMAT_PCM_S32; break; default: return WUFF_FORMAT_UNSUPPORTED; } } else if (*format == WUFF_FORMAT_IEEE_FLOAT) { switch (bits) { case 32: *format = WUFF_FORMAT_IEEE_FLOAT_32; break; case 64: *format = WUFF_FORMAT_IEEE_FLOAT_64; break; default: return WUFF_FORMAT_UNSUPPORTED; } } else { return WUFF_FORMAT_UNSUPPORTED; } return WUFF_SUCCESS; } size_t wuff_calculate_samples(size_t target_size, wuff_uint8 sample_size, wuff_uint8 * head, wuff_uint8 * tail) { size_t samples = 0; if (*head != 0) { if (target_size <= *head) { *head = (wuff_uint8)target_size; *tail = 0; return 1; } target_size -= *head; ++samples; } samples = target_size / sample_size; *tail = target_size % sample_size; if (*tail != 0) ++samples; return samples; } wuff_sint32 wuff_init_stream(struct wuff_handle * handle) { /* Allocate some space on the stack. */ /* No need to do dynamic allocation for simple header probing. */ wuff_uint8 buffer[WUFF_HEADER_FETCH_SIZE]; size_t buffer_size = WUFF_HEADER_FETCH_SIZE; wuff_uint64 search_offset; struct wuff_chunk_header chunk; wuff_sint32 wuff_status; wuff_status = handle->callback->read(handle->userdata, buffer, &buffer_size); WUFF_STATUS_BAIL() else if (buffer_size < WUFF_STREAM_MIN_SIZE) return WUFF_STREAM_NOT_RIFF; /* Check for RIFF signature. */ wuff_copy_chunk_header_data(&chunk, buffer); if (chunk.id != WUFF_RIFF_CHUNK_ID) return WUFF_STREAM_NOT_RIFF; handle->stream.size = chunk.size; /* Check for WAVE format. */ wuff_copy_chunk_header_data(&chunk, buffer + 8); if (chunk.id != WUFF_WAVE_CHUNK_ID) return WUFF_STREAM_NOT_WAVE; /* Search fmt chunk. */ wuff_copy_chunk_header_data(&chunk, buffer + 12); search_offset = 12; if (chunk.id != WUFF_FORMAT_CHUNK_ID) { chunk.id = 0; /* The fmt chunk must appear before the data chunk. */ wuff_status = wuff_search_chunk(handle, &chunk, &search_offset, WUFF_FORMAT_CHUNK_ID, WUFF_DATA_CHUNK_ID); if (wuff_status == WUFF_STREAM_CHUNK_NOT_FOUND) return WUFF_STREAM_FORMAT_CHUNK_MISSING; else WUFF_STATUS_BAIL() /* In case the fmt chunk is not the first chunk, align it on the stack buffer as if it were. */ buffer_size = WUFF_HEADER_FETCH_SIZE - 20; wuff_status = handle->callback->read(handle->userdata, buffer + 20, &buffer_size); WUFF_STATUS_BAIL() /* EOF bail. */ else if (buffer_size < WUFF_HEADER_MIN_SIZE) return WUFF_STREAM_INVALID; } /* Extract header information. */ handle->stream.header.size = chunk.size; handle->stream.header.offset = search_offset + 8; handle->stream.header.format = wuff_get_uint16(buffer + 20); handle->stream.header.channels = wuff_get_uint16(buffer + 22); handle->stream.header.sample_rate = wuff_get_uint32(buffer + 24); handle->stream.header.bits_per_sample = wuff_get_uint16(buffer + 34); handle->stream.header.bytes_per_sample = handle->stream.header.bits_per_sample / 8; handle->stream.header.block_size = handle->stream.header.channels * handle->stream.header.bytes_per_sample; /* Bail on invalid streams. */ if (handle->stream.header.channels == 0) return WUFF_STREAM_ZERO_CHANNELS; else if (handle->stream.header.sample_rate == 0) return WUFF_STREAM_ZERO_SAMPLE_RATE; else if (handle->stream.header.bits_per_sample == 0) return WUFF_STREAM_ZERO_BITS_PER_SAMPLE; /* Grab the format from the extended header. */ if (handle->stream.header.size > WUFF_HEADER_MIN_SIZE && wuff_get_uint16(buffer + 36) == 22) { if (handle->stream.header.format == WUFF_FORMAT_EXTENSIBLE) handle->stream.header.format = wuff_get_uint16(buffer + 44); } /* The check if this format is actually supported. */ handle->stream.format = handle->stream.header.format; wuff_status = wuff_check_bits(handle->stream.header.bits_per_sample, &handle->stream.format); WUFF_STATUS_BAIL() /* The search for the data chunk begins. */ wuff_copy_chunk_header_data(&chunk, buffer + 20 + handle->stream.header.size); search_offset = handle->stream.header.offset + handle->stream.header.size; wuff_status = wuff_search_chunk(handle, &chunk, &search_offset, WUFF_DATA_CHUNK_ID, 0); if (wuff_status == WUFF_STREAM_CHUNK_NOT_FOUND) return WUFF_STREAM_DATA_CHUNK_MISSING; else WUFF_STATUS_BAIL() handle->stream.data.size = chunk.size; handle->stream.data.offset = search_offset + 8; handle->stream.length = handle->stream.data.size / handle->stream.header.channels / handle->stream.header.bytes_per_sample; handle->stream.position = 0; return WUFF_SUCCESS; } wuff_sint32 wuff_search_chunk(struct wuff_handle * handle, struct wuff_chunk_header * chunk, wuff_uint64 * offset, wuff_uint32 id, wuff_uint32 stop_id) { wuff_uint8 buffer[8]; wuff_uint64 search_offset; size_t buffer_size; wuff_sint32 wuff_status = 0; if (chunk->id != 0 && chunk->id == id) return WUFF_SUCCESS; /* Copy the current file position. */ search_offset = *offset; while (wuff_status >= 0) { search_offset += 8 + chunk->size; /* FIXME: Non-compliant RIFFs may not pad to WORD alignment. What now? */ if (search_offset & 1) search_offset++; wuff_status = handle->callback->seek(handle->userdata, search_offset); WUFF_STATUS_BAIL() /*else if (wuff_status == WUFF_CALLBACK_EOF) return WUFF_STREAM_CHUNK_NOT_FOUND;*/ buffer_size = 8; wuff_status = handle->callback->read(handle->userdata, buffer, &buffer_size); WUFF_STATUS_BAIL() wuff_copy_chunk_header_data(chunk, buffer); /* Bail if we're at the EOF or the stop id. */ if (buffer_size < 8 || (stop_id != 0 && chunk->id == stop_id)) return WUFF_STREAM_CHUNK_NOT_FOUND; else if (chunk->id == id) break; } /* Report chunk offset. */ *offset = search_offset; return WUFF_SUCCESS; } wuff_sint32 wuff_buffer_alloc(struct wuff_handle * handle) { wuff_sint32 wuff_status; if (handle == NULL) return WUFF_INVALID_PARAM; /* Try to allocate a buffer for 0.25 seconds, but clamp at some minimum and maximum value. */ handle->buffer.size = handle->stream.header.sample_rate * handle->stream.header.block_size / 4; if (handle->buffer.size < WUFF_BUFFER_MIN_SIZE) handle->buffer.size = WUFF_BUFFER_MIN_SIZE; else if (handle->buffer.size > WUFF_BUFFER_MAX_SIZE) handle->buffer.size = WUFF_BUFFER_MAX_SIZE; handle->buffer.data = wuff_alloc(handle->buffer.size); if (handle->buffer.data == NULL) return WUFF_MEMALLOC_ERROR; /* Just in case, let's null the offsets. */ wuff_status = wuff_buffer_clear(handle); WUFF_STATUS_BAIL() return WUFF_SUCCESS; } wuff_sint32 wuff_buffer_clear(struct wuff_handle * handle) { wuff_uint64 position; wuff_sint32 wuff_status; if (handle == NULL) return WUFF_INVALID_PARAM; wuff_status = handle->callback->tell(handle->userdata, &position); WUFF_STATUS_BAIL() if (position < handle->stream.data.offset || position > handle->stream.data.offset + handle->stream.data.size) return WUFF_BUFFER_INVALID_STREAM_POSITION; handle->buffer.bytes_left = handle->stream.data.size - (position - handle->stream.data.offset); handle->buffer.offset = 0; handle->buffer.end = 0; return WUFF_SUCCESS; } wuff_sint32 wuff_buffer_fill(struct wuff_handle * handle) { size_t bytes_in_buffer; size_t bytes_to_read; wuff_sint32 wuff_status; if (handle == NULL) return WUFF_INVALID_PARAM; /* Check if there are bytes in the buffer and move them to the start of the buffer. */ /* Probably not the most efficient way. Think on it some more! */ bytes_in_buffer = handle->buffer.end - handle->buffer.offset; if (bytes_in_buffer == handle->buffer.size) return WUFF_SUCCESS; else if (bytes_in_buffer > 0) memmove(handle->buffer.data, handle->buffer.data + handle->buffer.offset, bytes_in_buffer); bytes_to_read = handle->buffer.size - bytes_in_buffer; if (bytes_to_read > handle->buffer.bytes_left) bytes_to_read = (size_t)handle->buffer.bytes_left; wuff_status = handle->callback->read(handle->userdata, handle->buffer.data + bytes_in_buffer, &bytes_to_read); WUFF_STATUS_BAIL() handle->buffer.offset = 0; handle->buffer.end = bytes_in_buffer + bytes_to_read; handle->buffer.bytes_left -= bytes_to_read; return WUFF_SUCCESS; } wuff_sint32 wuff_buffer_release(struct wuff_handle * handle, size_t samples) { size_t size; if (handle == NULL) return WUFF_INVALID_PARAM; size = samples * handle->stream.header.bytes_per_sample; /* Check for an attempt to release more samples than the buffer could hold. */ /* "This should never happen." Let's throw an error anyway in case.*/ if (size > handle->buffer.end - handle->buffer.offset) return WUFF_BUFFER_INVALID_SIZE; handle->buffer.offset += size; return WUFF_SUCCESS; } wuff_sint32 wuff_buffer_request(struct wuff_handle * handle, wuff_uint8 ** buffer, size_t * samples) { size_t request_samples = *samples; size_t buffer_samples, size; size_t bps = handle->stream.header.bytes_per_sample; wuff_sint32 wuff_status; if (handle == NULL || buffer == NULL || samples == NULL) return WUFF_INVALID_PARAM; /* Fill the buffer some more if the requested size is bigger than the current data in the buffer. */ size = request_samples * bps; if (size > handle->buffer.end - handle->buffer.offset) { wuff_status = wuff_buffer_fill(handle); WUFF_STATUS_BAIL() } buffer_samples = (handle->buffer.end - handle->buffer.offset) / bps; /* Report sample count change. */ if (buffer_samples < request_samples) *samples = buffer_samples; /* Report sample buffer start. */ *buffer = handle->buffer.data + handle->buffer.offset; return WUFF_SUCCESS; } ================================================ FILE: src/libraries/Wuff/wuff_internal.h ================================================ #ifndef WUFF_INTERNAL_H #define WUFF_INTERNAL_H #define WUFF_BUFFER_MIN_SIZE 4096 #define WUFF_BUFFER_MAX_SIZE 2097152 #define WUFF_STREAM_MIN_SIZE 36 #define WUFF_HEADER_MIN_SIZE 16 #define WUFF_HEADER_FETCH_SIZE 80 #define WUFF_FORMAT_PCM 1 #define WUFF_FORMAT_IEEE_FLOAT 3 #define WUFF_FORMAT_EXTENSIBLE 0xFFFE #define WUFF_RIFF_CHUNK_ID wuff_get_chunk_id("RIFF") #define WUFF_WAVE_CHUNK_ID wuff_get_chunk_id("WAVE") #define WUFF_FORMAT_CHUNK_ID wuff_get_chunk_id("fmt ") #define WUFF_DATA_CHUNK_ID wuff_get_chunk_id("data") #define WUFF_STATUS_BAIL() if (wuff_status < 0) return wuff_status; static WUFF_INLINE wuff_uint32 wuff_get_uint32(wuff_uint8 * data) { return data[0] + (data[1] << 8) + (data[2] << 16) + (data[3] << 24); } static WUFF_INLINE wuff_uint16 wuff_get_uint16(wuff_uint8 * data) { return data[0] + (data[1] << 8); } struct wuff_chunk_header { wuff_uint32 id; wuff_uint32 size; }; static WUFF_INLINE wuff_uint32 wuff_get_chunk_id(const char txt[5]) { const wuff_uint8 * id = (wuff_uint8*) txt; wuff_uint32 int_id; wuff_uint8 * id_bytes = (wuff_uint8 *)&int_id; id_bytes[0] = id[0]; id_bytes[1] = id[1]; id_bytes[2] = id[2]; id_bytes[3] = id[3]; return int_id; } static WUFF_INLINE void wuff_copy_chunk_header_data(struct wuff_chunk_header * chunk, wuff_uint8 * data) { wuff_uint8 * id = (wuff_uint8 *)&chunk->id; id[0] = data[0]; id[1] = data[1]; id[2] = data[2]; id[3] = data[3]; chunk->size = wuff_get_uint32(data + 4); } struct wuff_stream_header { wuff_uint64 size; wuff_uint64 offset; wuff_uint16 format; wuff_uint16 channels; wuff_uint32 sample_rate; wuff_uint16 bits_per_sample; wuff_uint16 bytes_per_sample; size_t block_size; }; struct wuff_stream_data { wuff_uint64 size; wuff_uint64 offset; }; struct wuff_buffer { wuff_uint8 * data; wuff_uint64 bytes_left; size_t size; size_t offset; size_t end; }; struct wuff_output { wuff_uint16 format; size_t bytes_per_sample; size_t block_size; size_t block_offset; void (* function)(wuff_uint8 *, wuff_uint8 *, size_t, wuff_uint8, wuff_uint8, wuff_uint8); }; struct wuff_stream { wuff_uint64 size; wuff_uint64 length; wuff_uint16 format; wuff_uint64 position; struct wuff_stream_header header; struct wuff_stream_data data; }; struct wuff_handle { struct wuff_stream stream; struct wuff_buffer buffer; struct wuff_output output; struct wuff_callback * callback; void * userdata; }; /* Initializes the stream, allocates the buffer, and sets the output format. */ /* Expects a nulled wuff_handle and the callbacks set and ready. */ WUFF_INTERN_API wuff_sint32 wuff_setup(struct wuff_handle * handle); /* Cleans the stream up, frees the buffer and the wuff_handle. */ WUFF_INTERN_API wuff_sint32 wuff_cleanup(struct wuff_handle * handle); /* Called by wuff_setup. Initializes the stream by reading the data from the */ /* callbacks, searching for headers and stream information. */ WUFF_INTERN_API wuff_sint32 wuff_init_stream(struct wuff_handle * handle); /* Searches for a specific chunk id and stops before another if it's not 0. */ /* If the id in wuff_chunk_header is not 0, it will be checked too and if */ /* they match, then the function will return immediately. */ /* Expects offset to point to the file position of a chunk and */ /* wuff_chunk_header to have the size of this chunk. */ WUFF_INTERN_API wuff_sint32 wuff_search_chunk(struct wuff_handle * handle, struct wuff_chunk_header * chunk, wuff_uint64 * offset, wuff_uint32 id, wuff_uint32 stop_id); /* Sets the output struct of the stream to the new format. */ WUFF_INTERN_API wuff_sint32 wuff_set_output_format(struct wuff_handle * handle, wuff_uint16); /* Checks if the number of bits per samples is supported and writes the */ /* output identifier to the 16-bit integer. */ WUFF_INTERN_API wuff_sint32 wuff_check_bits(wuff_uint16 bits, wuff_uint16 * format); /* Calculates the number of samples that have to be requested from the buffer */ /* by also taking the truncated samples at the start and end into account. */ /* The return value is the number of samples needed. */ WUFF_INTERN_API size_t wuff_calculate_samples(size_t target_size, wuff_uint8 sample_size, wuff_uint8 * head, wuff_uint8 * tail); /* Allocates the buffer for the input stream. */ /* Expects the stream to be initialized, as format information is needed. */ WUFF_INTERN_API wuff_sint32 wuff_buffer_alloc(struct wuff_handle * handle); /* Fills the buffer with new data. */ WUFF_INTERN_API wuff_sint32 wuff_buffer_fill(struct wuff_handle * handle); /* Marks all bytes in the buffer as free. */ WUFF_INTERN_API wuff_sint32 wuff_buffer_clear(struct wuff_handle * handle); /* Requests samples and a pointer to them. */ /* The number of samples may be lower than requested. */ WUFF_INTERN_API wuff_sint32 wuff_buffer_request(struct wuff_handle * handle, wuff_uint8 ** buffer, size_t * samples); /* Releases the number of samples from the buffer. */ WUFF_INTERN_API wuff_sint32 wuff_buffer_release(struct wuff_handle * handle, size_t samples); #endif /* WUFF_INTERNAL_H */ ================================================ FILE: src/libraries/Wuff/wuff_memory.c ================================================ #include #include "wuff_config.h" /* Default memory allocators. */ /* They can be overridden with custom functions at build time. */ #ifndef WUFF_MEMALLOC_OVERRIDE void * wuff_alloc(size_t size) { return malloc(size); } void wuff_free(void * mem) { free(mem); } #endif ================================================ FILE: src/libraries/box2d/Box2D.h ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #ifndef BOX2D_H #define BOX2D_H // These include files constitute the main Box2D API #include "b2_settings.h" #include "b2_draw.h" #include "b2_timer.h" #include "b2_chain_shape.h" #include "b2_circle_shape.h" #include "b2_edge_shape.h" #include "b2_polygon_shape.h" #include "b2_broad_phase.h" #include "b2_dynamic_tree.h" #include "b2_body.h" #include "b2_contact.h" #include "b2_fixture.h" #include "b2_time_step.h" #include "b2_world.h" #include "b2_world_callbacks.h" #include "b2_distance.h" #include "b2_distance_joint.h" #include "b2_friction_joint.h" #include "b2_gear_joint.h" #include "b2_motor_joint.h" #include "b2_mouse_joint.h" #include "b2_prismatic_joint.h" #include "b2_pulley_joint.h" #include "b2_revolute_joint.h" #include "b2_weld_joint.h" #include "b2_wheel_joint.h" #endif ================================================ FILE: src/libraries/box2d/README.MODIFIED ================================================ PLEASE NOTE, this version of Box2D is NOT original, it has been MODIFIED by the LÖVE Development Team. ================================================ FILE: src/libraries/box2d/b2_api.h ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #ifndef B2_API_H #define B2_API_H #ifdef B2_SHARED #if defined _WIN32 || defined __CYGWIN__ #ifdef box2d_EXPORTS #ifdef __GNUC__ #define B2_API __attribute__ ((dllexport)) #else #define B2_API __declspec(dllexport) #endif #else #ifdef __GNUC__ #define B2_API __attribute__ ((dllimport)) #else #define B2_API __declspec(dllimport) #endif #endif #else #if __GNUC__ >= 4 #define B2_API __attribute__ ((visibility ("default"))) #else #define B2_API #endif #endif #else #define B2_API #endif #endif ================================================ FILE: src/libraries/box2d/b2_block_allocator.h ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #ifndef B2_BLOCK_ALLOCATOR_H #define B2_BLOCK_ALLOCATOR_H #include "b2_api.h" #include "b2_settings.h" const int32 b2_blockSizeCount = 14; struct b2Block; struct b2Chunk; /// This is a small object allocator used for allocating small /// objects that persist for more than one time step. /// See: http://www.codeproject.com/useritems/Small_Block_Allocator.asp class B2_API b2BlockAllocator { public: b2BlockAllocator(); ~b2BlockAllocator(); /// Allocate memory. This will use b2Alloc if the size is larger than b2_maxBlockSize. void* Allocate(int32 size); /// Free memory. This will use b2Free if the size is larger than b2_maxBlockSize. void Free(void* p, int32 size); void Clear(); private: b2Chunk* m_chunks; int32 m_chunkCount; int32 m_chunkSpace; b2Block* m_freeLists[b2_blockSizeCount]; }; #endif ================================================ FILE: src/libraries/box2d/b2_body.h ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #ifndef B2_BODY_H #define B2_BODY_H #include "b2_api.h" #include "b2_math.h" #include "b2_shape.h" class b2Fixture; class b2Joint; class b2Contact; class b2Controller; class b2World; struct b2FixtureDef; struct b2JointEdge; struct b2ContactEdge; /// The body type. /// static: zero mass, zero velocity, may be manually moved /// kinematic: zero mass, non-zero velocity set by user, moved by solver /// dynamic: positive mass, non-zero velocity determined by forces, moved by solver enum b2BodyType { b2_staticBody = 0, b2_kinematicBody, b2_dynamicBody }; /// A body definition holds all the data needed to construct a rigid body. /// You can safely re-use body definitions. Shapes are added to a body after construction. struct B2_API b2BodyDef { /// This constructor sets the body definition default values. b2BodyDef() { position.Set(0.0f, 0.0f); angle = 0.0f; linearVelocity.Set(0.0f, 0.0f); angularVelocity = 0.0f; linearDamping = 0.0f; angularDamping = 0.0f; allowSleep = true; awake = true; fixedRotation = false; bullet = false; type = b2_staticBody; enabled = true; gravityScale = 1.0f; } /// The body type: static, kinematic, or dynamic. /// Note: if a dynamic body would have zero mass, the mass is set to one. b2BodyType type; /// The world position of the body. Avoid creating bodies at the origin /// since this can lead to many overlapping shapes. b2Vec2 position; /// The world angle of the body in radians. float angle; /// The linear velocity of the body's origin in world co-ordinates. b2Vec2 linearVelocity; /// The angular velocity of the body. float angularVelocity; /// Linear damping is use to reduce the linear velocity. The damping parameter /// can be larger than 1.0f but the damping effect becomes sensitive to the /// time step when the damping parameter is large. /// Units are 1/time float linearDamping; /// Angular damping is use to reduce the angular velocity. The damping parameter /// can be larger than 1.0f but the damping effect becomes sensitive to the /// time step when the damping parameter is large. /// Units are 1/time float angularDamping; /// Set this flag to false if this body should never fall asleep. Note that /// this increases CPU usage. bool allowSleep; /// Is this body initially awake or sleeping? bool awake; /// Should this body be prevented from rotating? Useful for characters. bool fixedRotation; /// Is this a fast moving body that should be prevented from tunneling through /// other moving bodies? Note that all bodies are prevented from tunneling through /// kinematic and static bodies. This setting is only considered on dynamic bodies. /// @warning You should use this flag sparingly since it increases processing time. bool bullet; /// Does this body start out enabled? bool enabled; /// Use this to store application specific body data. b2BodyUserData userData; /// Scale the gravity applied to this body. float gravityScale; }; /// A rigid body. These are created via b2World::CreateBody. class B2_API b2Body { public: /// Creates a fixture and attach it to this body. Use this function if you need /// to set some fixture parameters, like friction. Otherwise you can create the /// fixture directly from a shape. /// If the density is non-zero, this function automatically updates the mass of the body. /// Contacts are not created until the next time step. /// @param def the fixture definition. /// @warning This function is locked during callbacks. b2Fixture* CreateFixture(const b2FixtureDef* def); /// Creates a fixture from a shape and attach it to this body. /// This is a convenience function. Use b2FixtureDef if you need to set parameters /// like friction, restitution, user data, or filtering. /// If the density is non-zero, this function automatically updates the mass of the body. /// @param shape the shape to be cloned. /// @param density the shape density (set to zero for static bodies). /// @warning This function is locked during callbacks. b2Fixture* CreateFixture(const b2Shape* shape, float density); /// Destroy a fixture. This removes the fixture from the broad-phase and /// destroys all contacts associated with this fixture. This will /// automatically adjust the mass of the body if the body is dynamic and the /// fixture has positive density. /// All fixtures attached to a body are implicitly destroyed when the body is destroyed. /// @param fixture the fixture to be removed. /// @warning This function is locked during callbacks. void DestroyFixture(b2Fixture* fixture); /// Set the position of the body's origin and rotation. /// Manipulating a body's transform may cause non-physical behavior. /// Note: contacts are updated on the next call to b2World::Step. /// @param position the world position of the body's local origin. /// @param angle the world rotation in radians. void SetTransform(const b2Vec2& position, float angle); /// Get the body transform for the body's origin. /// @return the world transform of the body's origin. const b2Transform& GetTransform() const; /// Get the world body origin position. /// @return the world position of the body's origin. const b2Vec2& GetPosition() const; /// Get the angle in radians. /// @return the current world rotation angle in radians. float GetAngle() const; /// Get the world position of the center of mass. const b2Vec2& GetWorldCenter() const; /// Get the local position of the center of mass. const b2Vec2& GetLocalCenter() const; /// Set the linear velocity of the center of mass. /// @param v the new linear velocity of the center of mass. void SetLinearVelocity(const b2Vec2& v); /// Get the linear velocity of the center of mass. /// @return the linear velocity of the center of mass. const b2Vec2& GetLinearVelocity() const; /// Set the angular velocity. /// @param omega the new angular velocity in radians/second. void SetAngularVelocity(float omega); /// Get the angular velocity. /// @return the angular velocity in radians/second. float GetAngularVelocity() const; /// Apply a force at a world point. If the force is not /// applied at the center of mass, it will generate a torque and /// affect the angular velocity. This wakes up the body. /// @param force the world force vector, usually in Newtons (N). /// @param point the world position of the point of application. /// @param wake also wake up the body void ApplyForce(const b2Vec2& force, const b2Vec2& point, bool wake); /// Apply a force to the center of mass. This wakes up the body. /// @param force the world force vector, usually in Newtons (N). /// @param wake also wake up the body void ApplyForceToCenter(const b2Vec2& force, bool wake); /// Apply a torque. This affects the angular velocity /// without affecting the linear velocity of the center of mass. /// @param torque about the z-axis (out of the screen), usually in N-m. /// @param wake also wake up the body void ApplyTorque(float torque, bool wake); /// Apply an impulse at a point. This immediately modifies the velocity. /// It also modifies the angular velocity if the point of application /// is not at the center of mass. This wakes up the body. /// @param impulse the world impulse vector, usually in N-seconds or kg-m/s. /// @param point the world position of the point of application. /// @param wake also wake up the body void ApplyLinearImpulse(const b2Vec2& impulse, const b2Vec2& point, bool wake); /// Apply an impulse to the center of mass. This immediately modifies the velocity. /// @param impulse the world impulse vector, usually in N-seconds or kg-m/s. /// @param wake also wake up the body void ApplyLinearImpulseToCenter(const b2Vec2& impulse, bool wake); /// Apply an angular impulse. /// @param impulse the angular impulse in units of kg*m*m/s /// @param wake also wake up the body void ApplyAngularImpulse(float impulse, bool wake); /// Get the total mass of the body. /// @return the mass, usually in kilograms (kg). float GetMass() const; /// Get the rotational inertia of the body about the local origin. /// @return the rotational inertia, usually in kg-m^2. float GetInertia() const; /// Get the mass data of the body. /// @return a struct containing the mass, inertia and center of the body. void GetMassData(b2MassData* data) const; /// Set the mass properties to override the mass properties of the fixtures. /// Note that this changes the center of mass position. /// Note that creating or destroying fixtures can also alter the mass. /// This function has no effect if the body isn't dynamic. /// @param data the mass properties. void SetMassData(const b2MassData* data); /// This resets the mass properties to the sum of the mass properties of the fixtures. /// This normally does not need to be called unless you called SetMassData to override /// the mass and you later want to reset the mass. void ResetMassData(); /// Get the world coordinates of a point given the local coordinates. /// @param localPoint a point on the body measured relative the the body's origin. /// @return the same point expressed in world coordinates. b2Vec2 GetWorldPoint(const b2Vec2& localPoint) const; /// Get the world coordinates of a vector given the local coordinates. /// @param localVector a vector fixed in the body. /// @return the same vector expressed in world coordinates. b2Vec2 GetWorldVector(const b2Vec2& localVector) const; /// Gets a local point relative to the body's origin given a world point. /// @param worldPoint a point in world coordinates. /// @return the corresponding local point relative to the body's origin. b2Vec2 GetLocalPoint(const b2Vec2& worldPoint) const; /// Gets a local vector given a world vector. /// @param worldVector a vector in world coordinates. /// @return the corresponding local vector. b2Vec2 GetLocalVector(const b2Vec2& worldVector) const; /// Get the world linear velocity of a world point attached to this body. /// @param worldPoint a point in world coordinates. /// @return the world velocity of a point. b2Vec2 GetLinearVelocityFromWorldPoint(const b2Vec2& worldPoint) const; /// Get the world velocity of a local point. /// @param localPoint a point in local coordinates. /// @return the world velocity of a point. b2Vec2 GetLinearVelocityFromLocalPoint(const b2Vec2& localPoint) const; /// Get the linear damping of the body. float GetLinearDamping() const; /// Set the linear damping of the body. void SetLinearDamping(float linearDamping); /// Get the angular damping of the body. float GetAngularDamping() const; /// Set the angular damping of the body. void SetAngularDamping(float angularDamping); /// Get the gravity scale of the body. float GetGravityScale() const; /// Set the gravity scale of the body. void SetGravityScale(float scale); /// Set the type of this body. This may alter the mass and velocity. void SetType(b2BodyType type); /// Get the type of this body. b2BodyType GetType() const; /// Should this body be treated like a bullet for continuous collision detection? void SetBullet(bool flag); /// Is this body treated like a bullet for continuous collision detection? bool IsBullet() const; /// You can disable sleeping on this body. If you disable sleeping, the /// body will be woken. void SetSleepingAllowed(bool flag); /// Is this body allowed to sleep bool IsSleepingAllowed() const; /// Set the sleep state of the body. A sleeping body has very /// low CPU cost. /// @param flag set to true to wake the body, false to put it to sleep. void SetAwake(bool flag); /// Get the sleeping state of this body. /// @return true if the body is awake. bool IsAwake() const; /// Allow a body to be disabled. A disabled body is not simulated and cannot /// be collided with or woken up. /// If you pass a flag of true, all fixtures will be added to the broad-phase. /// If you pass a flag of false, all fixtures will be removed from the /// broad-phase and all contacts will be destroyed. /// Fixtures and joints are otherwise unaffected. You may continue /// to create/destroy fixtures and joints on disabled bodies. /// Fixtures on a disabled body are implicitly disabled and will /// not participate in collisions, ray-casts, or queries. /// Joints connected to a disabled body are implicitly disabled. /// An diabled body is still owned by a b2World object and remains /// in the body list. void SetEnabled(bool flag); /// Get the active state of the body. bool IsEnabled() const; /// Set this body to have fixed rotation. This causes the mass /// to be reset. void SetFixedRotation(bool flag); /// Does this body have fixed rotation? bool IsFixedRotation() const; /// Get the list of all fixtures attached to this body. b2Fixture* GetFixtureList(); const b2Fixture* GetFixtureList() const; /// Get the list of all joints attached to this body. b2JointEdge* GetJointList(); const b2JointEdge* GetJointList() const; /// Get the list of all contacts attached to this body. /// @warning this list changes during the time step and you may /// miss some collisions if you don't use b2ContactListener. b2ContactEdge* GetContactList(); const b2ContactEdge* GetContactList() const; /// Get the next body in the world's body list. b2Body* GetNext(); const b2Body* GetNext() const; /// Get the user data pointer that was provided in the body definition. b2BodyUserData& GetUserData(); /// Set the user data. Use this to store your application specific data. void SetUserData(void* data); /// Get the parent world of this body. b2World* GetWorld(); const b2World* GetWorld() const; /// Dump this body to a file void Dump(); private: friend class b2World; friend class b2Island; friend class b2ContactManager; friend class b2ContactSolver; friend class b2Contact; friend class b2DistanceJoint; friend class b2FrictionJoint; friend class b2GearJoint; friend class b2MotorJoint; friend class b2MouseJoint; friend class b2PrismaticJoint; friend class b2PulleyJoint; friend class b2RevoluteJoint; friend class b2RopeJoint; friend class b2WeldJoint; friend class b2WheelJoint; // m_flags enum { e_islandFlag = 0x0001, e_awakeFlag = 0x0002, e_autoSleepFlag = 0x0004, e_bulletFlag = 0x0008, e_fixedRotationFlag = 0x0010, e_enabledFlag = 0x0020, e_toiFlag = 0x0040 }; b2Body(const b2BodyDef* bd, b2World* world); ~b2Body(); void SynchronizeFixtures(); void SynchronizeTransform(); // This is used to prevent connected bodies from colliding. // It may lie, depending on the collideConnected flag. bool ShouldCollide(const b2Body* other) const; void Advance(float t); b2BodyType m_type; uint16 m_flags; int32 m_islandIndex; b2Transform m_xf; // the body origin transform b2Sweep m_sweep; // the swept motion for CCD b2Vec2 m_linearVelocity; float m_angularVelocity; b2Vec2 m_force; float m_torque; b2World* m_world; b2Body* m_prev; b2Body* m_next; b2Fixture* m_fixtureList; int32 m_fixtureCount; b2JointEdge* m_jointList; b2ContactEdge* m_contactList; float m_mass, m_invMass; // Rotational inertia about the center of mass. float m_I, m_invI; float m_linearDamping; float m_angularDamping; float m_gravityScale; float m_sleepTime; b2BodyUserData m_userData; }; inline b2BodyType b2Body::GetType() const { return m_type; } inline const b2Transform& b2Body::GetTransform() const { return m_xf; } inline const b2Vec2& b2Body::GetPosition() const { return m_xf.p; } inline float b2Body::GetAngle() const { return m_sweep.a; } inline const b2Vec2& b2Body::GetWorldCenter() const { return m_sweep.c; } inline const b2Vec2& b2Body::GetLocalCenter() const { return m_sweep.localCenter; } inline void b2Body::SetLinearVelocity(const b2Vec2& v) { if (m_type == b2_staticBody) { return; } if (b2Dot(v,v) > 0.0f) { SetAwake(true); } m_linearVelocity = v; } inline const b2Vec2& b2Body::GetLinearVelocity() const { return m_linearVelocity; } inline void b2Body::SetAngularVelocity(float w) { if (m_type == b2_staticBody) { return; } if (w * w > 0.0f) { SetAwake(true); } m_angularVelocity = w; } inline float b2Body::GetAngularVelocity() const { return m_angularVelocity; } inline float b2Body::GetMass() const { return m_mass; } inline float b2Body::GetInertia() const { return m_I + m_mass * b2Dot(m_sweep.localCenter, m_sweep.localCenter); } inline void b2Body::GetMassData(b2MassData* data) const { data->mass = m_mass; data->I = m_I + m_mass * b2Dot(m_sweep.localCenter, m_sweep.localCenter); data->center = m_sweep.localCenter; } inline b2Vec2 b2Body::GetWorldPoint(const b2Vec2& localPoint) const { return b2Mul(m_xf, localPoint); } inline b2Vec2 b2Body::GetWorldVector(const b2Vec2& localVector) const { return b2Mul(m_xf.q, localVector); } inline b2Vec2 b2Body::GetLocalPoint(const b2Vec2& worldPoint) const { return b2MulT(m_xf, worldPoint); } inline b2Vec2 b2Body::GetLocalVector(const b2Vec2& worldVector) const { return b2MulT(m_xf.q, worldVector); } inline b2Vec2 b2Body::GetLinearVelocityFromWorldPoint(const b2Vec2& worldPoint) const { return m_linearVelocity + b2Cross(m_angularVelocity, worldPoint - m_sweep.c); } inline b2Vec2 b2Body::GetLinearVelocityFromLocalPoint(const b2Vec2& localPoint) const { return GetLinearVelocityFromWorldPoint(GetWorldPoint(localPoint)); } inline float b2Body::GetLinearDamping() const { return m_linearDamping; } inline void b2Body::SetLinearDamping(float linearDamping) { m_linearDamping = linearDamping; } inline float b2Body::GetAngularDamping() const { return m_angularDamping; } inline void b2Body::SetAngularDamping(float angularDamping) { m_angularDamping = angularDamping; } inline float b2Body::GetGravityScale() const { return m_gravityScale; } inline void b2Body::SetGravityScale(float scale) { m_gravityScale = scale; } inline void b2Body::SetBullet(bool flag) { if (flag) { m_flags |= e_bulletFlag; } else { m_flags &= ~e_bulletFlag; } } inline bool b2Body::IsBullet() const { return (m_flags & e_bulletFlag) == e_bulletFlag; } inline void b2Body::SetAwake(bool flag) { if (m_type == b2_staticBody) { return; } if (flag) { m_flags |= e_awakeFlag; m_sleepTime = 0.0f; } else { m_flags &= ~e_awakeFlag; m_sleepTime = 0.0f; m_linearVelocity.SetZero(); m_angularVelocity = 0.0f; m_force.SetZero(); m_torque = 0.0f; } } inline bool b2Body::IsAwake() const { return (m_flags & e_awakeFlag) == e_awakeFlag; } inline bool b2Body::IsEnabled() const { return (m_flags & e_enabledFlag) == e_enabledFlag; } inline bool b2Body::IsFixedRotation() const { return (m_flags & e_fixedRotationFlag) == e_fixedRotationFlag; } inline void b2Body::SetSleepingAllowed(bool flag) { if (flag) { m_flags |= e_autoSleepFlag; } else { m_flags &= ~e_autoSleepFlag; SetAwake(true); } } inline bool b2Body::IsSleepingAllowed() const { return (m_flags & e_autoSleepFlag) == e_autoSleepFlag; } inline b2Fixture* b2Body::GetFixtureList() { return m_fixtureList; } inline const b2Fixture* b2Body::GetFixtureList() const { return m_fixtureList; } inline b2JointEdge* b2Body::GetJointList() { return m_jointList; } inline const b2JointEdge* b2Body::GetJointList() const { return m_jointList; } inline b2ContactEdge* b2Body::GetContactList() { return m_contactList; } inline const b2ContactEdge* b2Body::GetContactList() const { return m_contactList; } inline b2Body* b2Body::GetNext() { return m_next; } inline const b2Body* b2Body::GetNext() const { return m_next; } inline b2BodyUserData& b2Body::GetUserData() { return m_userData; } inline void b2Body::ApplyForce(const b2Vec2& force, const b2Vec2& point, bool wake) { if (m_type != b2_dynamicBody) { return; } if (wake && (m_flags & e_awakeFlag) == 0) { SetAwake(true); } // Don't accumulate a force if the body is sleeping. if (m_flags & e_awakeFlag) { m_force += force; m_torque += b2Cross(point - m_sweep.c, force); } } inline void b2Body::ApplyForceToCenter(const b2Vec2& force, bool wake) { if (m_type != b2_dynamicBody) { return; } if (wake && (m_flags & e_awakeFlag) == 0) { SetAwake(true); } // Don't accumulate a force if the body is sleeping if (m_flags & e_awakeFlag) { m_force += force; } } inline void b2Body::ApplyTorque(float torque, bool wake) { if (m_type != b2_dynamicBody) { return; } if (wake && (m_flags & e_awakeFlag) == 0) { SetAwake(true); } // Don't accumulate a force if the body is sleeping if (m_flags & e_awakeFlag) { m_torque += torque; } } inline void b2Body::ApplyLinearImpulse(const b2Vec2& impulse, const b2Vec2& point, bool wake) { if (m_type != b2_dynamicBody) { return; } if (wake && (m_flags & e_awakeFlag) == 0) { SetAwake(true); } // Don't accumulate velocity if the body is sleeping if (m_flags & e_awakeFlag) { m_linearVelocity += m_invMass * impulse; m_angularVelocity += m_invI * b2Cross(point - m_sweep.c, impulse); } } inline void b2Body::ApplyLinearImpulseToCenter(const b2Vec2& impulse, bool wake) { if (m_type != b2_dynamicBody) { return; } if (wake && (m_flags & e_awakeFlag) == 0) { SetAwake(true); } // Don't accumulate velocity if the body is sleeping if (m_flags & e_awakeFlag) { m_linearVelocity += m_invMass * impulse; } } inline void b2Body::ApplyAngularImpulse(float impulse, bool wake) { if (m_type != b2_dynamicBody) { return; } if (wake && (m_flags & e_awakeFlag) == 0) { SetAwake(true); } // Don't accumulate velocity if the body is sleeping if (m_flags & e_awakeFlag) { m_angularVelocity += m_invI * impulse; } } inline void b2Body::SynchronizeTransform() { m_xf.q.Set(m_sweep.a); m_xf.p = m_sweep.c - b2Mul(m_xf.q, m_sweep.localCenter); } inline void b2Body::Advance(float alpha) { // Advance to the new safe time. This doesn't sync the broad-phase. m_sweep.Advance(alpha); m_sweep.c = m_sweep.c0; m_sweep.a = m_sweep.a0; m_xf.q.Set(m_sweep.a); m_xf.p = m_sweep.c - b2Mul(m_xf.q, m_sweep.localCenter); } inline b2World* b2Body::GetWorld() { return m_world; } inline const b2World* b2Body::GetWorld() const { return m_world; } #endif ================================================ FILE: src/libraries/box2d/b2_broad_phase.h ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #ifndef B2_BROAD_PHASE_H #define B2_BROAD_PHASE_H #include "b2_api.h" #include "b2_settings.h" #include "b2_collision.h" #include "b2_dynamic_tree.h" struct B2_API b2Pair { int32 proxyIdA; int32 proxyIdB; }; /// The broad-phase is used for computing pairs and performing volume queries and ray casts. /// This broad-phase does not persist pairs. Instead, this reports potentially new pairs. /// It is up to the client to consume the new pairs and to track subsequent overlap. class B2_API b2BroadPhase { public: enum { e_nullProxy = -1 }; b2BroadPhase(); ~b2BroadPhase(); /// Create a proxy with an initial AABB. Pairs are not reported until /// UpdatePairs is called. int32 CreateProxy(const b2AABB& aabb, void* userData); /// Destroy a proxy. It is up to the client to remove any pairs. void DestroyProxy(int32 proxyId); /// Call MoveProxy as many times as you like, then when you are done /// call UpdatePairs to finalized the proxy pairs (for your time step). void MoveProxy(int32 proxyId, const b2AABB& aabb, const b2Vec2& displacement); /// Call to trigger a re-processing of it's pairs on the next call to UpdatePairs. void TouchProxy(int32 proxyId); /// Get the fat AABB for a proxy. const b2AABB& GetFatAABB(int32 proxyId) const; /// Get user data from a proxy. Returns nullptr if the id is invalid. void* GetUserData(int32 proxyId) const; /// Test overlap of fat AABBs. bool TestOverlap(int32 proxyIdA, int32 proxyIdB) const; /// Get the number of proxies. int32 GetProxyCount() const; /// Update the pairs. This results in pair callbacks. This can only add pairs. template void UpdatePairs(T* callback); /// Query an AABB for overlapping proxies. The callback class /// is called for each proxy that overlaps the supplied AABB. template void Query(T* callback, const b2AABB& aabb) const; /// Ray-cast against the proxies in the tree. This relies on the callback /// to perform a exact ray-cast in the case were the proxy contains a shape. /// The callback also performs the any collision filtering. This has performance /// roughly equal to k * log(n), where k is the number of collisions and n is the /// number of proxies in the tree. /// @param input the ray-cast input data. The ray extends from p1 to p1 + maxFraction * (p2 - p1). /// @param callback a callback class that is called for each proxy that is hit by the ray. template void RayCast(T* callback, const b2RayCastInput& input) const; /// Get the height of the embedded tree. int32 GetTreeHeight() const; /// Get the balance of the embedded tree. int32 GetTreeBalance() const; /// Get the quality metric of the embedded tree. float GetTreeQuality() const; /// Shift the world origin. Useful for large worlds. /// The shift formula is: position -= newOrigin /// @param newOrigin the new origin with respect to the old origin void ShiftOrigin(const b2Vec2& newOrigin); private: friend class b2DynamicTree; void BufferMove(int32 proxyId); void UnBufferMove(int32 proxyId); bool QueryCallback(int32 proxyId); b2DynamicTree m_tree; int32 m_proxyCount; int32* m_moveBuffer; int32 m_moveCapacity; int32 m_moveCount; b2Pair* m_pairBuffer; int32 m_pairCapacity; int32 m_pairCount; int32 m_queryProxyId; }; inline void* b2BroadPhase::GetUserData(int32 proxyId) const { return m_tree.GetUserData(proxyId); } inline bool b2BroadPhase::TestOverlap(int32 proxyIdA, int32 proxyIdB) const { const b2AABB& aabbA = m_tree.GetFatAABB(proxyIdA); const b2AABB& aabbB = m_tree.GetFatAABB(proxyIdB); return b2TestOverlap(aabbA, aabbB); } inline const b2AABB& b2BroadPhase::GetFatAABB(int32 proxyId) const { return m_tree.GetFatAABB(proxyId); } inline int32 b2BroadPhase::GetProxyCount() const { return m_proxyCount; } inline int32 b2BroadPhase::GetTreeHeight() const { return m_tree.GetHeight(); } inline int32 b2BroadPhase::GetTreeBalance() const { return m_tree.GetMaxBalance(); } inline float b2BroadPhase::GetTreeQuality() const { return m_tree.GetAreaRatio(); } template void b2BroadPhase::UpdatePairs(T* callback) { // Reset pair buffer m_pairCount = 0; // Perform tree queries for all moving proxies. for (int32 i = 0; i < m_moveCount; ++i) { m_queryProxyId = m_moveBuffer[i]; if (m_queryProxyId == e_nullProxy) { continue; } // We have to query the tree with the fat AABB so that // we don't fail to create a pair that may touch later. const b2AABB& fatAABB = m_tree.GetFatAABB(m_queryProxyId); // Query tree, create pairs and add them pair buffer. m_tree.Query(this, fatAABB); } // Send pairs to caller for (int32 i = 0; i < m_pairCount; ++i) { b2Pair* primaryPair = m_pairBuffer + i; void* userDataA = m_tree.GetUserData(primaryPair->proxyIdA); void* userDataB = m_tree.GetUserData(primaryPair->proxyIdB); callback->AddPair(userDataA, userDataB); } // Clear move flags for (int32 i = 0; i < m_moveCount; ++i) { int32 proxyId = m_moveBuffer[i]; if (proxyId == e_nullProxy) { continue; } m_tree.ClearMoved(proxyId); } // Reset move buffer m_moveCount = 0; } template inline void b2BroadPhase::Query(T* callback, const b2AABB& aabb) const { m_tree.Query(callback, aabb); } template inline void b2BroadPhase::RayCast(T* callback, const b2RayCastInput& input) const { m_tree.RayCast(callback, input); } inline void b2BroadPhase::ShiftOrigin(const b2Vec2& newOrigin) { m_tree.ShiftOrigin(newOrigin); } #endif ================================================ FILE: src/libraries/box2d/b2_chain_shape.h ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #ifndef B2_CHAIN_SHAPE_H #define B2_CHAIN_SHAPE_H #include "b2_api.h" #include "b2_shape.h" class b2EdgeShape; /// A chain shape is a free form sequence of line segments. /// The chain has one-sided collision, with the surface normal pointing to the right of the edge. /// This provides a counter-clockwise winding like the polygon shape. /// Connectivity information is used to create smooth collisions. /// @warning the chain will not collide properly if there are self-intersections. class B2_API b2ChainShape : public b2Shape { public: b2ChainShape(); /// The destructor frees the vertices using b2Free. ~b2ChainShape(); /// Clear all data. void Clear(); /// Create a loop. This automatically adjusts connectivity. /// @param vertices an array of vertices, these are copied /// @param count the vertex count void CreateLoop(const b2Vec2* vertices, int32 count); /// Create a chain with ghost vertices to connect multiple chains together. /// @param vertices an array of vertices, these are copied /// @param count the vertex count /// @param prevVertex previous vertex from chain that connects to the start /// @param nextVertex next vertex from chain that connects to the end void CreateChain(const b2Vec2* vertices, int32 count, const b2Vec2& prevVertex, const b2Vec2& nextVertex); /// Implement b2Shape. Vertices are cloned using b2Alloc. b2Shape* Clone(b2BlockAllocator* allocator) const override; /// @see b2Shape::GetChildCount int32 GetChildCount() const override; /// Get a child edge. void GetChildEdge(b2EdgeShape* edge, int32 index) const; /// This always return false. /// @see b2Shape::TestPoint bool TestPoint(const b2Transform& transform, const b2Vec2& p) const override; /// Implement b2Shape. bool RayCast(b2RayCastOutput* output, const b2RayCastInput& input, const b2Transform& transform, int32 childIndex) const override; /// @see b2Shape::ComputeAABB void ComputeAABB(b2AABB* aabb, const b2Transform& transform, int32 childIndex) const override; /// Chains have zero mass. /// @see b2Shape::ComputeMass void ComputeMass(b2MassData* massData, float density) const override; /// The vertices. Owned by this class. b2Vec2* m_vertices; /// The vertex count. int32 m_count; b2Vec2 m_prevVertex, m_nextVertex; }; inline b2ChainShape::b2ChainShape() { m_type = e_chain; m_radius = b2_polygonRadius; m_vertices = nullptr; m_count = 0; } #endif ================================================ FILE: src/libraries/box2d/b2_circle_shape.h ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #ifndef B2_CIRCLE_SHAPE_H #define B2_CIRCLE_SHAPE_H #include "b2_api.h" #include "b2_shape.h" /// A solid circle shape class B2_API b2CircleShape : public b2Shape { public: b2CircleShape(); /// Implement b2Shape. b2Shape* Clone(b2BlockAllocator* allocator) const override; /// @see b2Shape::GetChildCount int32 GetChildCount() const override; /// Implement b2Shape. bool TestPoint(const b2Transform& transform, const b2Vec2& p) const override; /// Implement b2Shape. /// @note because the circle is solid, rays that start inside do not hit because the normal is /// not defined. bool RayCast(b2RayCastOutput* output, const b2RayCastInput& input, const b2Transform& transform, int32 childIndex) const override; /// @see b2Shape::ComputeAABB void ComputeAABB(b2AABB* aabb, const b2Transform& transform, int32 childIndex) const override; /// @see b2Shape::ComputeMass void ComputeMass(b2MassData* massData, float density) const override; /// Position b2Vec2 m_p; }; inline b2CircleShape::b2CircleShape() { m_type = e_circle; m_radius = 0.0f; m_p.SetZero(); } #endif ================================================ FILE: src/libraries/box2d/b2_collision.h ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #ifndef B2_COLLISION_H #define B2_COLLISION_H #include #include "b2_api.h" #include "b2_math.h" /// @file /// Structures and functions used for computing contact points, distance /// queries, and TOI queries. class b2Shape; class b2CircleShape; class b2EdgeShape; class b2PolygonShape; const uint8 b2_nullFeature = UCHAR_MAX; /// The features that intersect to form the contact point /// This must be 4 bytes or less. struct B2_API b2ContactFeature { enum Type { e_vertex = 0, e_face = 1 }; uint8 indexA; ///< Feature index on shapeA uint8 indexB; ///< Feature index on shapeB uint8 typeA; ///< The feature type on shapeA uint8 typeB; ///< The feature type on shapeB }; /// Contact ids to facilitate warm starting. union B2_API b2ContactID { b2ContactFeature cf; uint32 key; ///< Used to quickly compare contact ids. }; /// A manifold point is a contact point belonging to a contact /// manifold. It holds details related to the geometry and dynamics /// of the contact points. /// The local point usage depends on the manifold type: /// -e_circles: the local center of circleB /// -e_faceA: the local center of cirlceB or the clip point of polygonB /// -e_faceB: the clip point of polygonA /// This structure is stored across time steps, so we keep it small. /// Note: the impulses are used for internal caching and may not /// provide reliable contact forces, especially for high speed collisions. struct B2_API b2ManifoldPoint { b2Vec2 localPoint; ///< usage depends on manifold type float normalImpulse; ///< the non-penetration impulse float tangentImpulse; ///< the friction impulse b2ContactID id; ///< uniquely identifies a contact point between two shapes }; /// A manifold for two touching convex shapes. /// Box2D supports multiple types of contact: /// - clip point versus plane with radius /// - point versus point with radius (circles) /// The local point usage depends on the manifold type: /// -e_circles: the local center of circleA /// -e_faceA: the center of faceA /// -e_faceB: the center of faceB /// Similarly the local normal usage: /// -e_circles: not used /// -e_faceA: the normal on polygonA /// -e_faceB: the normal on polygonB /// We store contacts in this way so that position correction can /// account for movement, which is critical for continuous physics. /// All contact scenarios must be expressed in one of these types. /// This structure is stored across time steps, so we keep it small. struct B2_API b2Manifold { enum Type { e_circles, e_faceA, e_faceB }; b2ManifoldPoint points[b2_maxManifoldPoints]; ///< the points of contact b2Vec2 localNormal; ///< not use for Type::e_points b2Vec2 localPoint; ///< usage depends on manifold type Type type; int32 pointCount; ///< the number of manifold points }; /// This is used to compute the current state of a contact manifold. struct B2_API b2WorldManifold { /// Evaluate the manifold with supplied transforms. This assumes /// modest motion from the original state. This does not change the /// point count, impulses, etc. The radii must come from the shapes /// that generated the manifold. void Initialize(const b2Manifold* manifold, const b2Transform& xfA, float radiusA, const b2Transform& xfB, float radiusB); b2Vec2 normal; ///< world vector pointing from A to B b2Vec2 points[b2_maxManifoldPoints]; ///< world contact point (point of intersection) float separations[b2_maxManifoldPoints]; ///< a negative value indicates overlap, in meters }; /// This is used for determining the state of contact points. enum b2PointState { b2_nullState, ///< point does not exist b2_addState, ///< point was added in the update b2_persistState, ///< point persisted across the update b2_removeState ///< point was removed in the update }; /// Compute the point states given two manifolds. The states pertain to the transition from manifold1 /// to manifold2. So state1 is either persist or remove while state2 is either add or persist. B2_API void b2GetPointStates(b2PointState state1[b2_maxManifoldPoints], b2PointState state2[b2_maxManifoldPoints], const b2Manifold* manifold1, const b2Manifold* manifold2); /// Used for computing contact manifolds. struct B2_API b2ClipVertex { b2Vec2 v; b2ContactID id; }; /// Ray-cast input data. The ray extends from p1 to p1 + maxFraction * (p2 - p1). struct B2_API b2RayCastInput { b2Vec2 p1, p2; float maxFraction; }; /// Ray-cast output data. The ray hits at p1 + fraction * (p2 - p1), where p1 and p2 /// come from b2RayCastInput. struct B2_API b2RayCastOutput { b2Vec2 normal; float fraction; }; /// An axis aligned bounding box. struct B2_API b2AABB { /// Verify that the bounds are sorted. bool IsValid() const; /// Get the center of the AABB. b2Vec2 GetCenter() const { return 0.5f * (lowerBound + upperBound); } /// Get the extents of the AABB (half-widths). b2Vec2 GetExtents() const { return 0.5f * (upperBound - lowerBound); } /// Get the perimeter length float GetPerimeter() const { float wx = upperBound.x - lowerBound.x; float wy = upperBound.y - lowerBound.y; return 2.0f * (wx + wy); } /// Combine an AABB into this one. void Combine(const b2AABB& aabb) { lowerBound = b2Min(lowerBound, aabb.lowerBound); upperBound = b2Max(upperBound, aabb.upperBound); } /// Combine two AABBs into this one. void Combine(const b2AABB& aabb1, const b2AABB& aabb2) { lowerBound = b2Min(aabb1.lowerBound, aabb2.lowerBound); upperBound = b2Max(aabb1.upperBound, aabb2.upperBound); } /// Does this aabb contain the provided AABB. bool Contains(const b2AABB& aabb) const { bool result = true; result = result && lowerBound.x <= aabb.lowerBound.x; result = result && lowerBound.y <= aabb.lowerBound.y; result = result && aabb.upperBound.x <= upperBound.x; result = result && aabb.upperBound.y <= upperBound.y; return result; } bool RayCast(b2RayCastOutput* output, const b2RayCastInput& input) const; b2Vec2 lowerBound; ///< the lower vertex b2Vec2 upperBound; ///< the upper vertex }; /// Compute the collision manifold between two circles. B2_API void b2CollideCircles(b2Manifold* manifold, const b2CircleShape* circleA, const b2Transform& xfA, const b2CircleShape* circleB, const b2Transform& xfB); /// Compute the collision manifold between a polygon and a circle. B2_API void b2CollidePolygonAndCircle(b2Manifold* manifold, const b2PolygonShape* polygonA, const b2Transform& xfA, const b2CircleShape* circleB, const b2Transform& xfB); /// Compute the collision manifold between two polygons. B2_API void b2CollidePolygons(b2Manifold* manifold, const b2PolygonShape* polygonA, const b2Transform& xfA, const b2PolygonShape* polygonB, const b2Transform& xfB); /// Compute the collision manifold between an edge and a circle. B2_API void b2CollideEdgeAndCircle(b2Manifold* manifold, const b2EdgeShape* polygonA, const b2Transform& xfA, const b2CircleShape* circleB, const b2Transform& xfB); /// Compute the collision manifold between an edge and a polygon. B2_API void b2CollideEdgeAndPolygon(b2Manifold* manifold, const b2EdgeShape* edgeA, const b2Transform& xfA, const b2PolygonShape* circleB, const b2Transform& xfB); /// Clipping for contact manifolds. B2_API int32 b2ClipSegmentToLine(b2ClipVertex vOut[2], const b2ClipVertex vIn[2], const b2Vec2& normal, float offset, int32 vertexIndexA); /// Determine if two generic shapes overlap. B2_API bool b2TestOverlap( const b2Shape* shapeA, int32 indexA, const b2Shape* shapeB, int32 indexB, const b2Transform& xfA, const b2Transform& xfB); // ---------------- Inline Functions ------------------------------------------ inline bool b2AABB::IsValid() const { b2Vec2 d = upperBound - lowerBound; bool valid = d.x >= 0.0f && d.y >= 0.0f; valid = valid && lowerBound.IsValid() && upperBound.IsValid(); return valid; } inline bool b2TestOverlap(const b2AABB& a, const b2AABB& b) { b2Vec2 d1, d2; d1 = b.lowerBound - a.upperBound; d2 = a.lowerBound - b.upperBound; if (d1.x > 0.0f || d1.y > 0.0f) return false; if (d2.x > 0.0f || d2.y > 0.0f) return false; return true; } #endif ================================================ FILE: src/libraries/box2d/b2_common.h ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #ifndef B2_COMMON_H #define B2_COMMON_H #include "b2_settings.h" #include #include #include #if !defined(NDEBUG) #define b2DEBUG #endif #define B2_NOT_USED(x) ((void)(x)) void loveAssert(bool test, const char* teststr); #define b2Assert(A) loveAssert((A), #A) #define b2_maxFloat FLT_MAX #define b2_epsilon FLT_EPSILON #define b2_pi 3.14159265359f /// @file /// Global tuning constants based on meters-kilograms-seconds (MKS) units. /// // Collision /// The maximum number of contact points between two convex shapes. Do /// not change this value. #define b2_maxManifoldPoints 2 /// This is used to fatten AABBs in the dynamic tree. This allows proxies /// to move by a small amount without triggering a tree adjustment. /// This is in meters. #define b2_aabbExtension (0.1f * b2_lengthUnitsPerMeter) /// This is used to fatten AABBs in the dynamic tree. This is used to predict /// the future position based on the current displacement. /// This is a dimensionless multiplier. #define b2_aabbMultiplier 4.0f /// A small length used as a collision and constraint tolerance. Usually it is /// chosen to be numerically significant, but visually insignificant. In meters. #define b2_linearSlop (0.005f * b2_lengthUnitsPerMeter) /// A small angle used as a collision and constraint tolerance. Usually it is /// chosen to be numerically significant, but visually insignificant. #define b2_angularSlop (2.0f / 180.0f * b2_pi) /// The radius of the polygon/edge shape skin. This should not be modified. Making /// this smaller means polygons will have an insufficient buffer for continuous collision. /// Making it larger may create artifacts for vertex collision. #define b2_polygonRadius (2.0f * b2_linearSlop) /// Maximum number of sub-steps per contact in continuous physics simulation. #define b2_maxSubSteps 8 // Dynamics /// Maximum number of contacts to be handled to solve a TOI impact. #define b2_maxTOIContacts 32 /// The maximum linear position correction used when solving constraints. This helps to /// prevent overshoot. Meters. #define b2_maxLinearCorrection (0.2f * b2_lengthUnitsPerMeter) /// The maximum angular position correction used when solving constraints. This helps to /// prevent overshoot. #define b2_maxAngularCorrection (8.0f / 180.0f * b2_pi) /// The maximum linear translation of a body per step. This limit is very large and is used /// to prevent numerical problems. You shouldn't need to adjust this. Meters. #define b2_maxTranslation (2.0f * b2_lengthUnitsPerMeter) #define b2_maxTranslationSquared (b2_maxTranslation * b2_maxTranslation) /// The maximum angular velocity of a body. This limit is very large and is used /// to prevent numerical problems. You shouldn't need to adjust this. #define b2_maxRotation (0.5f * b2_pi) #define b2_maxRotationSquared (b2_maxRotation * b2_maxRotation) /// This scale factor controls how fast overlap is resolved. Ideally this would be 1 so /// that overlap is removed in one time step. However using values close to 1 often lead /// to overshoot. #define b2_baumgarte 0.2f #define b2_toiBaumgarte 0.75f // Sleep /// The time that a body must be still before it will go to sleep. #define b2_timeToSleep 0.5f /// A body cannot sleep if its linear velocity is above this tolerance. #define b2_linearSleepTolerance (0.01f * b2_lengthUnitsPerMeter) /// A body cannot sleep if its angular velocity is above this tolerance. #define b2_angularSleepTolerance (2.0f / 180.0f * b2_pi) /// Dump to a file. Only one dump file allowed at a time. void b2OpenDump(const char* fileName); void b2Dump(const char* string, ...); void b2CloseDump(); /// Version numbering scheme. /// See http://en.wikipedia.org/wiki/Software_versioning struct b2Version { int32 major; ///< significant changes int32 minor; ///< incremental changes int32 revision; ///< bug fixes }; /// Current version. extern B2_API b2Version b2_version; #endif ================================================ FILE: src/libraries/box2d/b2_contact.h ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #ifndef B2_CONTACT_H #define B2_CONTACT_H #include "b2_api.h" #include "b2_collision.h" #include "b2_fixture.h" #include "b2_math.h" #include "b2_shape.h" class b2Body; class b2Contact; class b2Fixture; class b2World; class b2BlockAllocator; class b2StackAllocator; class b2ContactListener; /// Friction mixing law. The idea is to allow either fixture to drive the friction to zero. /// For example, anything slides on ice. inline float b2MixFriction(float friction1, float friction2) { return b2Sqrt(friction1 * friction2); } /// Restitution mixing law. The idea is allow for anything to bounce off an inelastic surface. /// For example, a superball bounces on anything. inline float b2MixRestitution(float restitution1, float restitution2) { return restitution1 > restitution2 ? restitution1 : restitution2; } /// Restitution mixing law. This picks the lowest value. inline float b2MixRestitutionThreshold(float threshold1, float threshold2) { return threshold1 < threshold2 ? threshold1 : threshold2; } typedef b2Contact* b2ContactCreateFcn( b2Fixture* fixtureA, int32 indexA, b2Fixture* fixtureB, int32 indexB, b2BlockAllocator* allocator); typedef void b2ContactDestroyFcn(b2Contact* contact, b2BlockAllocator* allocator); struct B2_API b2ContactRegister { b2ContactCreateFcn* createFcn; b2ContactDestroyFcn* destroyFcn; bool primary; }; /// A contact edge is used to connect bodies and contacts together /// in a contact graph where each body is a node and each contact /// is an edge. A contact edge belongs to a doubly linked list /// maintained in each attached body. Each contact has two contact /// nodes, one for each attached body. struct B2_API b2ContactEdge { b2Body* other; ///< provides quick access to the other body attached. b2Contact* contact; ///< the contact b2ContactEdge* prev; ///< the previous contact edge in the body's contact list b2ContactEdge* next; ///< the next contact edge in the body's contact list }; /// The class manages contact between two shapes. A contact exists for each overlapping /// AABB in the broad-phase (except if filtered). Therefore a contact object may exist /// that has no contact points. class B2_API b2Contact { public: /// Get the contact manifold. Do not modify the manifold unless you understand the /// internals of Box2D. b2Manifold* GetManifold(); const b2Manifold* GetManifold() const; /// Get the world manifold. void GetWorldManifold(b2WorldManifold* worldManifold) const; /// Is this contact touching? bool IsTouching() const; /// Enable/disable this contact. This can be used inside the pre-solve /// contact listener. The contact is only disabled for the current /// time step (or sub-step in continuous collisions). void SetEnabled(bool flag); /// Has this contact been disabled? bool IsEnabled() const; /// Get the next contact in the world's contact list. b2Contact* GetNext(); const b2Contact* GetNext() const; /// Get fixture A in this contact. b2Fixture* GetFixtureA(); const b2Fixture* GetFixtureA() const; /// Get the child primitive index for fixture A. int32 GetChildIndexA() const; /// Get fixture B in this contact. b2Fixture* GetFixtureB(); const b2Fixture* GetFixtureB() const; /// Get the child primitive index for fixture B. int32 GetChildIndexB() const; /// Override the default friction mixture. You can call this in b2ContactListener::PreSolve. /// This value persists until set or reset. void SetFriction(float friction); /// Get the friction. float GetFriction() const; /// Reset the friction mixture to the default value. void ResetFriction(); /// Override the default restitution mixture. You can call this in b2ContactListener::PreSolve. /// The value persists until you set or reset. void SetRestitution(float restitution); /// Get the restitution. float GetRestitution() const; /// Reset the restitution to the default value. void ResetRestitution(); /// Override the default restitution velocity threshold mixture. You can call this in b2ContactListener::PreSolve. /// The value persists until you set or reset. void SetRestitutionThreshold(float threshold); /// Get the restitution threshold. float GetRestitutionThreshold() const; /// Reset the restitution threshold to the default value. void ResetRestitutionThreshold(); /// Set the desired tangent speed for a conveyor belt behavior. In meters per second. void SetTangentSpeed(float speed); /// Get the desired tangent speed. In meters per second. float GetTangentSpeed() const; /// Evaluate this contact with your own manifold and transforms. virtual void Evaluate(b2Manifold* manifold, const b2Transform& xfA, const b2Transform& xfB) = 0; protected: friend class b2ContactManager; friend class b2World; friend class b2ContactSolver; friend class b2Body; friend class b2Fixture; // Flags stored in m_flags enum { // Used when crawling contact graph when forming islands. e_islandFlag = 0x0001, // Set when the shapes are touching. e_touchingFlag = 0x0002, // This contact can be disabled (by user) e_enabledFlag = 0x0004, // This contact needs filtering because a fixture filter was changed. e_filterFlag = 0x0008, // This bullet contact had a TOI event e_bulletHitFlag = 0x0010, // This contact has a valid TOI in m_toi e_toiFlag = 0x0020 }; /// Flag this contact for filtering. Filtering will occur the next time step. void FlagForFiltering(); static void AddType(b2ContactCreateFcn* createFcn, b2ContactDestroyFcn* destroyFcn, b2Shape::Type typeA, b2Shape::Type typeB); static void InitializeRegisters(); static b2Contact* Create(b2Fixture* fixtureA, int32 indexA, b2Fixture* fixtureB, int32 indexB, b2BlockAllocator* allocator); static void Destroy(b2Contact* contact, b2Shape::Type typeA, b2Shape::Type typeB, b2BlockAllocator* allocator); static void Destroy(b2Contact* contact, b2BlockAllocator* allocator); b2Contact() : m_fixtureA(nullptr), m_fixtureB(nullptr) {} b2Contact(b2Fixture* fixtureA, int32 indexA, b2Fixture* fixtureB, int32 indexB); virtual ~b2Contact() {} void Update(b2ContactListener* listener); static b2ContactRegister s_registers[b2Shape::e_typeCount][b2Shape::e_typeCount]; static bool s_initialized; uint32 m_flags; // World pool and list pointers. b2Contact* m_prev; b2Contact* m_next; // Nodes for connecting bodies. b2ContactEdge m_nodeA; b2ContactEdge m_nodeB; b2Fixture* m_fixtureA; b2Fixture* m_fixtureB; int32 m_indexA; int32 m_indexB; b2Manifold m_manifold; int32 m_toiCount; float m_toi; float m_friction; float m_restitution; float m_restitutionThreshold; float m_tangentSpeed; }; inline b2Manifold* b2Contact::GetManifold() { return &m_manifold; } inline const b2Manifold* b2Contact::GetManifold() const { return &m_manifold; } inline void b2Contact::GetWorldManifold(b2WorldManifold* worldManifold) const { const b2Body* bodyA = m_fixtureA->GetBody(); const b2Body* bodyB = m_fixtureB->GetBody(); const b2Shape* shapeA = m_fixtureA->GetShape(); const b2Shape* shapeB = m_fixtureB->GetShape(); worldManifold->Initialize(&m_manifold, bodyA->GetTransform(), shapeA->m_radius, bodyB->GetTransform(), shapeB->m_radius); } inline void b2Contact::SetEnabled(bool flag) { if (flag) { m_flags |= e_enabledFlag; } else { m_flags &= ~e_enabledFlag; } } inline bool b2Contact::IsEnabled() const { return (m_flags & e_enabledFlag) == e_enabledFlag; } inline bool b2Contact::IsTouching() const { return (m_flags & e_touchingFlag) == e_touchingFlag; } inline b2Contact* b2Contact::GetNext() { return m_next; } inline const b2Contact* b2Contact::GetNext() const { return m_next; } inline b2Fixture* b2Contact::GetFixtureA() { return m_fixtureA; } inline const b2Fixture* b2Contact::GetFixtureA() const { return m_fixtureA; } inline b2Fixture* b2Contact::GetFixtureB() { return m_fixtureB; } inline int32 b2Contact::GetChildIndexA() const { return m_indexA; } inline const b2Fixture* b2Contact::GetFixtureB() const { return m_fixtureB; } inline int32 b2Contact::GetChildIndexB() const { return m_indexB; } inline void b2Contact::FlagForFiltering() { m_flags |= e_filterFlag; } inline void b2Contact::SetFriction(float friction) { m_friction = friction; } inline float b2Contact::GetFriction() const { return m_friction; } inline void b2Contact::ResetFriction() { m_friction = b2MixFriction(m_fixtureA->m_friction, m_fixtureB->m_friction); } inline void b2Contact::SetRestitution(float restitution) { m_restitution = restitution; } inline float b2Contact::GetRestitution() const { return m_restitution; } inline void b2Contact::ResetRestitution() { m_restitution = b2MixRestitution(m_fixtureA->m_restitution, m_fixtureB->m_restitution); } inline void b2Contact::SetRestitutionThreshold(float threshold) { m_restitutionThreshold = threshold; } inline float b2Contact::GetRestitutionThreshold() const { return m_restitutionThreshold; } inline void b2Contact::ResetRestitutionThreshold() { m_restitutionThreshold = b2MixRestitutionThreshold(m_fixtureA->m_restitutionThreshold, m_fixtureB->m_restitutionThreshold); } inline void b2Contact::SetTangentSpeed(float speed) { m_tangentSpeed = speed; } inline float b2Contact::GetTangentSpeed() const { return m_tangentSpeed; } #endif ================================================ FILE: src/libraries/box2d/b2_contact_manager.h ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #ifndef B2_CONTACT_MANAGER_H #define B2_CONTACT_MANAGER_H #include "b2_api.h" #include "b2_broad_phase.h" class b2Contact; class b2ContactFilter; class b2ContactListener; class b2BlockAllocator; // Delegate of b2World. class B2_API b2ContactManager { public: b2ContactManager(); // Broad-phase callback. void AddPair(void* proxyUserDataA, void* proxyUserDataB); void FindNewContacts(); void Destroy(b2Contact* c); void Collide(); b2BroadPhase m_broadPhase; b2Contact* m_contactList; int32 m_contactCount; b2ContactFilter* m_contactFilter; b2ContactListener* m_contactListener; b2BlockAllocator* m_allocator; }; #endif ================================================ FILE: src/libraries/box2d/b2_distance.h ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #ifndef B2_DISTANCE_H #define B2_DISTANCE_H #include "b2_api.h" #include "b2_math.h" class b2Shape; /// A distance proxy is used by the GJK algorithm. /// It encapsulates any shape. struct B2_API b2DistanceProxy { b2DistanceProxy() : m_vertices(nullptr), m_count(0), m_radius(0.0f) {} /// Initialize the proxy using the given shape. The shape /// must remain in scope while the proxy is in use. void Set(const b2Shape* shape, int32 index); /// Initialize the proxy using a vertex cloud and radius. The vertices /// must remain in scope while the proxy is in use. void Set(const b2Vec2* vertices, int32 count, float radius); /// Get the supporting vertex index in the given direction. int32 GetSupport(const b2Vec2& d) const; /// Get the supporting vertex in the given direction. const b2Vec2& GetSupportVertex(const b2Vec2& d) const; /// Get the vertex count. int32 GetVertexCount() const; /// Get a vertex by index. Used by b2Distance. const b2Vec2& GetVertex(int32 index) const; b2Vec2 m_buffer[2]; const b2Vec2* m_vertices; int32 m_count; float m_radius; }; /// Used to warm start b2Distance. /// Set count to zero on first call. struct B2_API b2SimplexCache { float metric; ///< length or area uint16 count; uint8 indexA[3]; ///< vertices on shape A uint8 indexB[3]; ///< vertices on shape B }; /// Input for b2Distance. /// You have to option to use the shape radii /// in the computation. Even struct B2_API b2DistanceInput { b2DistanceProxy proxyA; b2DistanceProxy proxyB; b2Transform transformA; b2Transform transformB; bool useRadii; }; /// Output for b2Distance. struct B2_API b2DistanceOutput { b2Vec2 pointA; ///< closest point on shapeA b2Vec2 pointB; ///< closest point on shapeB float distance; int32 iterations; ///< number of GJK iterations used }; /// Compute the closest points between two shapes. Supports any combination of: /// b2CircleShape, b2PolygonShape, b2EdgeShape. The simplex cache is input/output. /// On the first call set b2SimplexCache.count to zero. B2_API void b2Distance(b2DistanceOutput* output, b2SimplexCache* cache, const b2DistanceInput* input); /// Input parameters for b2ShapeCast struct B2_API b2ShapeCastInput { b2DistanceProxy proxyA; b2DistanceProxy proxyB; b2Transform transformA; b2Transform transformB; b2Vec2 translationB; }; /// Output results for b2ShapeCast struct B2_API b2ShapeCastOutput { b2Vec2 point; b2Vec2 normal; float lambda; int32 iterations; }; /// Perform a linear shape cast of shape B moving and shape A fixed. Determines the hit point, normal, and translation fraction. /// @returns true if hit, false if there is no hit or an initial overlap B2_API bool b2ShapeCast(b2ShapeCastOutput* output, const b2ShapeCastInput* input); ////////////////////////////////////////////////////////////////////////// inline int32 b2DistanceProxy::GetVertexCount() const { return m_count; } inline const b2Vec2& b2DistanceProxy::GetVertex(int32 index) const { b2Assert(0 <= index && index < m_count); return m_vertices[index]; } inline int32 b2DistanceProxy::GetSupport(const b2Vec2& d) const { int32 bestIndex = 0; float bestValue = b2Dot(m_vertices[0], d); for (int32 i = 1; i < m_count; ++i) { float value = b2Dot(m_vertices[i], d); if (value > bestValue) { bestIndex = i; bestValue = value; } } return bestIndex; } inline const b2Vec2& b2DistanceProxy::GetSupportVertex(const b2Vec2& d) const { int32 bestIndex = 0; float bestValue = b2Dot(m_vertices[0], d); for (int32 i = 1; i < m_count; ++i) { float value = b2Dot(m_vertices[i], d); if (value > bestValue) { bestIndex = i; bestValue = value; } } return m_vertices[bestIndex]; } #endif ================================================ FILE: src/libraries/box2d/b2_distance_joint.h ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #ifndef B2_DISTANCE_JOINT_H #define B2_DISTANCE_JOINT_H #include "b2_api.h" #include "b2_joint.h" /// Distance joint definition. This requires defining an anchor point on both /// bodies and the non-zero distance of the distance joint. The definition uses /// local anchor points so that the initial configuration can violate the /// constraint slightly. This helps when saving and loading a game. struct B2_API b2DistanceJointDef : public b2JointDef { b2DistanceJointDef() { type = e_distanceJoint; localAnchorA.Set(0.0f, 0.0f); localAnchorB.Set(0.0f, 0.0f); length = 1.0f; minLength = 0.0f; maxLength = FLT_MAX; stiffness = 0.0f; damping = 0.0f; } /// Initialize the bodies, anchors, and rest length using world space anchors. /// The minimum and maximum lengths are set to the rest length. void Initialize(b2Body* bodyA, b2Body* bodyB, const b2Vec2& anchorA, const b2Vec2& anchorB); /// The local anchor point relative to bodyA's origin. b2Vec2 localAnchorA; /// The local anchor point relative to bodyB's origin. b2Vec2 localAnchorB; /// The rest length of this joint. Clamped to a stable minimum value. float length; /// Minimum length. Clamped to a stable minimum value. float minLength; /// Maximum length. Must be greater than or equal to the minimum length. float maxLength; /// The linear stiffness in N/m. float stiffness; /// The linear damping in N*s/m. float damping; }; /// A distance joint constrains two points on two bodies to remain at a fixed /// distance from each other. You can view this as a massless, rigid rod. class B2_API b2DistanceJoint : public b2Joint { public: b2Vec2 GetAnchorA() const override; b2Vec2 GetAnchorB() const override; /// Get the reaction force given the inverse time step. /// Unit is N. b2Vec2 GetReactionForce(float inv_dt) const override; /// Get the reaction torque given the inverse time step. /// Unit is N*m. This is always zero for a distance joint. float GetReactionTorque(float inv_dt) const override; /// The local anchor point relative to bodyA's origin. const b2Vec2& GetLocalAnchorA() const { return m_localAnchorA; } /// The local anchor point relative to bodyB's origin. const b2Vec2& GetLocalAnchorB() const { return m_localAnchorB; } /// Get the rest length float GetLength() const { return m_length; } /// Set the rest length /// @returns clamped rest length float SetLength(float length); /// Get the minimum length float GetMinLength() const { return m_minLength; } /// Set the minimum length /// @returns the clamped minimum length float SetMinLength(float minLength); /// Get the maximum length float GetMaxLength() const { return m_maxLength; } /// Set the maximum length /// @returns the clamped maximum length float SetMaxLength(float maxLength); /// Get the current length float GetCurrentLength() const; /// Set/get the linear stiffness in N/m void SetStiffness(float stiffness) { m_stiffness = stiffness; } float GetStiffness() const { return m_stiffness; } /// Set/get linear damping in N*s/m void SetDamping(float damping) { m_damping = damping; } float GetDamping() const { return m_damping; } /// Dump joint to dmLog void Dump() override; /// void Draw(b2Draw* draw) const override; protected: friend class b2Joint; b2DistanceJoint(const b2DistanceJointDef* data); void InitVelocityConstraints(const b2SolverData& data) override; void SolveVelocityConstraints(const b2SolverData& data) override; bool SolvePositionConstraints(const b2SolverData& data) override; float m_stiffness; float m_damping; float m_bias; float m_length; float m_minLength; float m_maxLength; // Solver shared b2Vec2 m_localAnchorA; b2Vec2 m_localAnchorB; float m_gamma; float m_impulse; float m_lowerImpulse; float m_upperImpulse; // Solver temp int32 m_indexA; int32 m_indexB; b2Vec2 m_u; b2Vec2 m_rA; b2Vec2 m_rB; b2Vec2 m_localCenterA; b2Vec2 m_localCenterB; float m_currentLength; float m_invMassA; float m_invMassB; float m_invIA; float m_invIB; float m_softMass; float m_mass; }; #endif ================================================ FILE: src/libraries/box2d/b2_draw.h ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #ifndef B2_DRAW_H #define B2_DRAW_H #include "b2_api.h" #include "b2_math.h" /// Color for debug drawing. Each value has the range [0,1]. struct B2_API b2Color { b2Color() {} b2Color(float rIn, float gIn, float bIn, float aIn = 1.0f) { r = rIn; g = gIn; b = bIn; a = aIn; } void Set(float rIn, float gIn, float bIn, float aIn = 1.0f) { r = rIn; g = gIn; b = bIn; a = aIn; } float r, g, b, a; }; /// Implement and register this class with a b2World to provide debug drawing of physics /// entities in your game. class B2_API b2Draw { public: b2Draw(); virtual ~b2Draw() {} enum { e_shapeBit = 0x0001, ///< draw shapes e_jointBit = 0x0002, ///< draw joint connections e_aabbBit = 0x0004, ///< draw axis aligned bounding boxes e_pairBit = 0x0008, ///< draw broad-phase pairs e_centerOfMassBit = 0x0010 ///< draw center of mass frame }; /// Set the drawing flags. void SetFlags(uint32 flags); /// Get the drawing flags. uint32 GetFlags() const; /// Append flags to the current flags. void AppendFlags(uint32 flags); /// Clear flags from the current flags. void ClearFlags(uint32 flags); /// Draw a closed polygon provided in CCW order. virtual void DrawPolygon(const b2Vec2* vertices, int32 vertexCount, const b2Color& color) = 0; /// Draw a solid closed polygon provided in CCW order. virtual void DrawSolidPolygon(const b2Vec2* vertices, int32 vertexCount, const b2Color& color) = 0; /// Draw a circle. virtual void DrawCircle(const b2Vec2& center, float radius, const b2Color& color) = 0; /// Draw a solid circle. virtual void DrawSolidCircle(const b2Vec2& center, float radius, const b2Vec2& axis, const b2Color& color) = 0; /// Draw a line segment. virtual void DrawSegment(const b2Vec2& p1, const b2Vec2& p2, const b2Color& color) = 0; /// Draw a transform. Choose your own length scale. /// @param xf a transform. virtual void DrawTransform(const b2Transform& xf) = 0; /// Draw a point. virtual void DrawPoint(const b2Vec2& p, float size, const b2Color& color) = 0; protected: uint32 m_drawFlags; }; #endif ================================================ FILE: src/libraries/box2d/b2_dynamic_tree.h ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #ifndef B2_DYNAMIC_TREE_H #define B2_DYNAMIC_TREE_H #include "b2_api.h" #include "b2_collision.h" #include "b2_growable_stack.h" #define b2_nullNode (-1) /// A node in the dynamic tree. The client does not interact with this directly. struct B2_API b2TreeNode { bool IsLeaf() const { return child1 == b2_nullNode; } /// Enlarged AABB b2AABB aabb; void* userData; union { int32 parent; int32 next; }; int32 child1; int32 child2; // leaf = 0, free node = -1 int32 height; bool moved; }; /// A dynamic AABB tree broad-phase, inspired by Nathanael Presson's btDbvt. /// A dynamic tree arranges data in a binary tree to accelerate /// queries such as volume queries and ray casts. Leafs are proxies /// with an AABB. In the tree we expand the proxy AABB by b2_fatAABBFactor /// so that the proxy AABB is bigger than the client object. This allows the client /// object to move by small amounts without triggering a tree update. /// /// Nodes are pooled and relocatable, so we use node indices rather than pointers. class B2_API b2DynamicTree { public: /// Constructing the tree initializes the node pool. b2DynamicTree(); /// Destroy the tree, freeing the node pool. ~b2DynamicTree(); /// Create a proxy. Provide a tight fitting AABB and a userData pointer. int32 CreateProxy(const b2AABB& aabb, void* userData); /// Destroy a proxy. This asserts if the id is invalid. void DestroyProxy(int32 proxyId); /// Move a proxy with a swepted AABB. If the proxy has moved outside of its fattened AABB, /// then the proxy is removed from the tree and re-inserted. Otherwise /// the function returns immediately. /// @return true if the proxy was re-inserted. bool MoveProxy(int32 proxyId, const b2AABB& aabb1, const b2Vec2& displacement); /// Get proxy user data. /// @return the proxy user data or 0 if the id is invalid. void* GetUserData(int32 proxyId) const; bool WasMoved(int32 proxyId) const; void ClearMoved(int32 proxyId); /// Get the fat AABB for a proxy. const b2AABB& GetFatAABB(int32 proxyId) const; /// Query an AABB for overlapping proxies. The callback class /// is called for each proxy that overlaps the supplied AABB. template void Query(T* callback, const b2AABB& aabb) const; /// Ray-cast against the proxies in the tree. This relies on the callback /// to perform a exact ray-cast in the case were the proxy contains a shape. /// The callback also performs the any collision filtering. This has performance /// roughly equal to k * log(n), where k is the number of collisions and n is the /// number of proxies in the tree. /// @param input the ray-cast input data. The ray extends from p1 to p1 + maxFraction * (p2 - p1). /// @param callback a callback class that is called for each proxy that is hit by the ray. template void RayCast(T* callback, const b2RayCastInput& input) const; /// Validate this tree. For testing. void Validate() const; /// Compute the height of the binary tree in O(N) time. Should not be /// called often. int32 GetHeight() const; /// Get the maximum balance of an node in the tree. The balance is the difference /// in height of the two children of a node. int32 GetMaxBalance() const; /// Get the ratio of the sum of the node areas to the root area. float GetAreaRatio() const; /// Build an optimal tree. Very expensive. For testing. void RebuildBottomUp(); /// Shift the world origin. Useful for large worlds. /// The shift formula is: position -= newOrigin /// @param newOrigin the new origin with respect to the old origin void ShiftOrigin(const b2Vec2& newOrigin); private: int32 AllocateNode(); void FreeNode(int32 node); void InsertLeaf(int32 node); void RemoveLeaf(int32 node); int32 Balance(int32 index); int32 ComputeHeight() const; int32 ComputeHeight(int32 nodeId) const; void ValidateStructure(int32 index) const; void ValidateMetrics(int32 index) const; int32 m_root; b2TreeNode* m_nodes; int32 m_nodeCount; int32 m_nodeCapacity; int32 m_freeList; int32 m_insertionCount; }; inline void* b2DynamicTree::GetUserData(int32 proxyId) const { b2Assert(0 <= proxyId && proxyId < m_nodeCapacity); return m_nodes[proxyId].userData; } inline bool b2DynamicTree::WasMoved(int32 proxyId) const { b2Assert(0 <= proxyId && proxyId < m_nodeCapacity); return m_nodes[proxyId].moved; } inline void b2DynamicTree::ClearMoved(int32 proxyId) { b2Assert(0 <= proxyId && proxyId < m_nodeCapacity); m_nodes[proxyId].moved = false; } inline const b2AABB& b2DynamicTree::GetFatAABB(int32 proxyId) const { b2Assert(0 <= proxyId && proxyId < m_nodeCapacity); return m_nodes[proxyId].aabb; } template inline void b2DynamicTree::Query(T* callback, const b2AABB& aabb) const { b2GrowableStack stack; stack.Push(m_root); while (stack.GetCount() > 0) { int32 nodeId = stack.Pop(); if (nodeId == b2_nullNode) { continue; } const b2TreeNode* node = m_nodes + nodeId; if (b2TestOverlap(node->aabb, aabb)) { if (node->IsLeaf()) { bool proceed = callback->QueryCallback(nodeId); if (proceed == false) { return; } } else { stack.Push(node->child1); stack.Push(node->child2); } } } } template inline void b2DynamicTree::RayCast(T* callback, const b2RayCastInput& input) const { b2Vec2 p1 = input.p1; b2Vec2 p2 = input.p2; b2Vec2 r = p2 - p1; b2Assert(r.LengthSquared() > 0.0f); r.Normalize(); // v is perpendicular to the segment. b2Vec2 v = b2Cross(1.0f, r); b2Vec2 abs_v = b2Abs(v); // Separating axis for segment (Gino, p80). // |dot(v, p1 - c)| > dot(|v|, h) float maxFraction = input.maxFraction; // Build a bounding box for the segment. b2AABB segmentAABB; { b2Vec2 t = p1 + maxFraction * (p2 - p1); segmentAABB.lowerBound = b2Min(p1, t); segmentAABB.upperBound = b2Max(p1, t); } b2GrowableStack stack; stack.Push(m_root); while (stack.GetCount() > 0) { int32 nodeId = stack.Pop(); if (nodeId == b2_nullNode) { continue; } const b2TreeNode* node = m_nodes + nodeId; if (b2TestOverlap(node->aabb, segmentAABB) == false) { continue; } // Separating axis for segment (Gino, p80). // |dot(v, p1 - c)| > dot(|v|, h) b2Vec2 c = node->aabb.GetCenter(); b2Vec2 h = node->aabb.GetExtents(); float separation = b2Abs(b2Dot(v, p1 - c)) - b2Dot(abs_v, h); if (separation > 0.0f) { continue; } if (node->IsLeaf()) { b2RayCastInput subInput; subInput.p1 = input.p1; subInput.p2 = input.p2; subInput.maxFraction = maxFraction; float value = callback->RayCastCallback(subInput, nodeId); if (value == 0.0f) { // The client has terminated the ray cast. return; } if (value > 0.0f) { // Update segment bounding box. maxFraction = value; b2Vec2 t = p1 + maxFraction * (p2 - p1); segmentAABB.lowerBound = b2Min(p1, t); segmentAABB.upperBound = b2Max(p1, t); } } else { stack.Push(node->child1); stack.Push(node->child2); } } } #endif ================================================ FILE: src/libraries/box2d/b2_edge_shape.h ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #ifndef B2_EDGE_SHAPE_H #define B2_EDGE_SHAPE_H #include "b2_api.h" #include "b2_shape.h" /// A line segment (edge) shape. These can be connected in chains or loops /// to other edge shapes. Edges created independently are two-sided and do /// no provide smooth movement across junctions. class B2_API b2EdgeShape : public b2Shape { public: b2EdgeShape(); /// Set this as a part of a sequence. Vertex v0 precedes the edge and vertex v3 /// follows. These extra vertices are used to provide smooth movement /// across junctions. This also makes the collision one-sided. The edge /// normal points to the right looking from v1 to v2. void SetOneSided(const b2Vec2& v0, const b2Vec2& v1,const b2Vec2& v2, const b2Vec2& v3); /// Set this as an isolated edge. Collision is two-sided. void SetTwoSided(const b2Vec2& v1, const b2Vec2& v2); /// Implement b2Shape. b2Shape* Clone(b2BlockAllocator* allocator) const override; /// @see b2Shape::GetChildCount int32 GetChildCount() const override; /// @see b2Shape::TestPoint bool TestPoint(const b2Transform& transform, const b2Vec2& p) const override; /// Implement b2Shape. bool RayCast(b2RayCastOutput* output, const b2RayCastInput& input, const b2Transform& transform, int32 childIndex) const override; /// @see b2Shape::ComputeAABB void ComputeAABB(b2AABB* aabb, const b2Transform& transform, int32 childIndex) const override; /// @see b2Shape::ComputeMass void ComputeMass(b2MassData* massData, float density) const override; /// These are the edge vertices b2Vec2 m_vertex1, m_vertex2; /// Optional adjacent vertices. These are used for smooth collision. b2Vec2 m_vertex0, m_vertex3; /// Uses m_vertex0 and m_vertex3 to create smooth collision. bool m_oneSided; }; inline b2EdgeShape::b2EdgeShape() { m_type = e_edge; m_radius = b2_polygonRadius; m_vertex0.x = 0.0f; m_vertex0.y = 0.0f; m_vertex3.x = 0.0f; m_vertex3.y = 0.0f; m_oneSided = false; } #endif ================================================ FILE: src/libraries/box2d/b2_fixture.h ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #ifndef B2_FIXTURE_H #define B2_FIXTURE_H #include "b2_api.h" #include "b2_body.h" #include "b2_collision.h" #include "b2_shape.h" class b2BlockAllocator; class b2Body; class b2BroadPhase; class b2Fixture; /// This holds contact filtering data. struct B2_API b2Filter { b2Filter() { categoryBits = 0x0001; maskBits = 0xFFFF; groupIndex = 0; } /// The collision category bits. Normally you would just set one bit. uint16 categoryBits; /// The collision mask bits. This states the categories that this /// shape would accept for collision. uint16 maskBits; /// Collision groups allow a certain group of objects to never collide (negative) /// or always collide (positive). Zero means no collision group. Non-zero group /// filtering always wins against the mask bits. int16 groupIndex; }; /// A fixture definition is used to create a fixture. This class defines an /// abstract fixture definition. You can reuse fixture definitions safely. struct B2_API b2FixtureDef { /// The constructor sets the default fixture definition values. b2FixtureDef() { shape = nullptr; friction = 0.2f; restitution = 0.0f; restitutionThreshold = 1.0f * b2_lengthUnitsPerMeter; density = 0.0f; isSensor = false; } /// The shape, this must be set. The shape will be cloned, so you /// can create the shape on the stack. const b2Shape* shape; /// Use this to store application specific fixture data. b2FixtureUserData userData; /// The friction coefficient, usually in the range [0,1]. float friction; /// The restitution (elasticity) usually in the range [0,1]. float restitution; /// Restitution velocity threshold, usually in m/s. Collisions above this /// speed have restitution applied (will bounce). float restitutionThreshold; /// The density, usually in kg/m^2. float density; /// A sensor shape collects contact information but never generates a collision /// response. bool isSensor; /// Contact filtering data. b2Filter filter; }; /// This proxy is used internally to connect fixtures to the broad-phase. struct B2_API b2FixtureProxy { b2AABB aabb; b2Fixture* fixture; int32 childIndex; int32 proxyId; }; /// A fixture is used to attach a shape to a body for collision detection. A fixture /// inherits its transform from its parent. Fixtures hold additional non-geometric data /// such as friction, collision filters, etc. /// Fixtures are created via b2Body::CreateFixture. /// @warning you cannot reuse fixtures. class B2_API b2Fixture { public: /// Get the type of the child shape. You can use this to down cast to the concrete shape. /// @return the shape type. b2Shape::Type GetType() const; /// Get the child shape. You can modify the child shape, however you should not change the /// number of vertices because this will crash some collision caching mechanisms. /// Manipulating the shape may lead to non-physical behavior. b2Shape* GetShape(); const b2Shape* GetShape() const; /// Set if this fixture is a sensor. void SetSensor(bool sensor); /// Is this fixture a sensor (non-solid)? /// @return the true if the shape is a sensor. bool IsSensor() const; /// Set the contact filtering data. This will not update contacts until the next time /// step when either parent body is active and awake. /// This automatically calls Refilter. void SetFilterData(const b2Filter& filter); /// Get the contact filtering data. const b2Filter& GetFilterData() const; /// Call this if you want to establish collision that was previously disabled by b2ContactFilter::ShouldCollide. void Refilter(); /// Get the parent body of this fixture. This is nullptr if the fixture is not attached. /// @return the parent body. b2Body* GetBody(); const b2Body* GetBody() const; /// Get the next fixture in the parent body's fixture list. /// @return the next shape. b2Fixture* GetNext(); const b2Fixture* GetNext() const; /// Get the user data that was assigned in the fixture definition. Use this to /// store your application specific data. b2FixtureUserData& GetUserData(); /// Test a point for containment in this fixture. /// @param p a point in world coordinates. bool TestPoint(const b2Vec2& p) const; /// Cast a ray against this shape. /// @param output the ray-cast results. /// @param input the ray-cast input parameters. /// @param childIndex the child shape index (e.g. edge index) bool RayCast(b2RayCastOutput* output, const b2RayCastInput& input, int32 childIndex) const; /// Get the mass data for this fixture. The mass data is based on the density and /// the shape. The rotational inertia is about the shape's origin. This operation /// may be expensive. void GetMassData(b2MassData* massData) const; /// Set the density of this fixture. This will _not_ automatically adjust the mass /// of the body. You must call b2Body::ResetMassData to update the body's mass. void SetDensity(float density); /// Get the density of this fixture. float GetDensity() const; /// Get the coefficient of friction. float GetFriction() const; /// Set the coefficient of friction. This will _not_ change the friction of /// existing contacts. void SetFriction(float friction); /// Get the coefficient of restitution. float GetRestitution() const; /// Set the coefficient of restitution. This will _not_ change the restitution of /// existing contacts. void SetRestitution(float restitution); /// Get the restitution velocity threshold. float GetRestitutionThreshold() const; /// Set the restitution threshold. This will _not_ change the restitution threshold of /// existing contacts. void SetRestitutionThreshold(float threshold); /// Get the fixture's AABB. This AABB may be enlarge and/or stale. /// If you need a more accurate AABB, compute it using the shape and /// the body transform. const b2AABB& GetAABB(int32 childIndex) const; /// Dump this fixture to the log file. void Dump(int32 bodyIndex); protected: friend class b2Body; friend class b2World; friend class b2Contact; friend class b2ContactManager; b2Fixture(); // We need separation create/destroy functions from the constructor/destructor because // the destructor cannot access the allocator (no destructor arguments allowed by C++). void Create(b2BlockAllocator* allocator, b2Body* body, const b2FixtureDef* def); void Destroy(b2BlockAllocator* allocator); // These support body activation/deactivation. void CreateProxies(b2BroadPhase* broadPhase, const b2Transform& xf); void DestroyProxies(b2BroadPhase* broadPhase); void Synchronize(b2BroadPhase* broadPhase, const b2Transform& xf1, const b2Transform& xf2); float m_density; b2Fixture* m_next; b2Body* m_body; b2Shape* m_shape; float m_friction; float m_restitution; float m_restitutionThreshold; b2FixtureProxy* m_proxies; int32 m_proxyCount; b2Filter m_filter; bool m_isSensor; b2FixtureUserData m_userData; }; inline b2Shape::Type b2Fixture::GetType() const { return m_shape->GetType(); } inline b2Shape* b2Fixture::GetShape() { return m_shape; } inline const b2Shape* b2Fixture::GetShape() const { return m_shape; } inline bool b2Fixture::IsSensor() const { return m_isSensor; } inline const b2Filter& b2Fixture::GetFilterData() const { return m_filter; } inline b2FixtureUserData& b2Fixture::GetUserData() { return m_userData; } inline b2Body* b2Fixture::GetBody() { return m_body; } inline const b2Body* b2Fixture::GetBody() const { return m_body; } inline b2Fixture* b2Fixture::GetNext() { return m_next; } inline const b2Fixture* b2Fixture::GetNext() const { return m_next; } inline void b2Fixture::SetDensity(float density) { b2Assert(b2IsValid(density) && density >= 0.0f); m_density = density; } inline float b2Fixture::GetDensity() const { return m_density; } inline float b2Fixture::GetFriction() const { return m_friction; } inline void b2Fixture::SetFriction(float friction) { m_friction = friction; } inline float b2Fixture::GetRestitution() const { return m_restitution; } inline void b2Fixture::SetRestitution(float restitution) { m_restitution = restitution; } inline float b2Fixture::GetRestitutionThreshold() const { return m_restitutionThreshold; } inline void b2Fixture::SetRestitutionThreshold(float threshold) { m_restitutionThreshold = threshold; } inline bool b2Fixture::TestPoint(const b2Vec2& p) const { return m_shape->TestPoint(m_body->GetTransform(), p); } inline bool b2Fixture::RayCast(b2RayCastOutput* output, const b2RayCastInput& input, int32 childIndex) const { return m_shape->RayCast(output, input, m_body->GetTransform(), childIndex); } inline void b2Fixture::GetMassData(b2MassData* massData) const { m_shape->ComputeMass(massData, m_density); } inline const b2AABB& b2Fixture::GetAABB(int32 childIndex) const { b2Assert(0 <= childIndex && childIndex < m_proxyCount); return m_proxies[childIndex].aabb; } #endif ================================================ FILE: src/libraries/box2d/b2_friction_joint.h ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #ifndef B2_FRICTION_JOINT_H #define B2_FRICTION_JOINT_H #include "b2_api.h" #include "b2_joint.h" /// Friction joint definition. struct B2_API b2FrictionJointDef : public b2JointDef { b2FrictionJointDef() { type = e_frictionJoint; localAnchorA.SetZero(); localAnchorB.SetZero(); maxForce = 0.0f; maxTorque = 0.0f; } /// Initialize the bodies, anchors, axis, and reference angle using the world /// anchor and world axis. void Initialize(b2Body* bodyA, b2Body* bodyB, const b2Vec2& anchor); /// The local anchor point relative to bodyA's origin. b2Vec2 localAnchorA; /// The local anchor point relative to bodyB's origin. b2Vec2 localAnchorB; /// The maximum friction force in N. float maxForce; /// The maximum friction torque in N-m. float maxTorque; }; /// Friction joint. This is used for top-down friction. /// It provides 2D translational friction and angular friction. class B2_API b2FrictionJoint : public b2Joint { public: b2Vec2 GetAnchorA() const override; b2Vec2 GetAnchorB() const override; b2Vec2 GetReactionForce(float inv_dt) const override; float GetReactionTorque(float inv_dt) const override; /// The local anchor point relative to bodyA's origin. const b2Vec2& GetLocalAnchorA() const { return m_localAnchorA; } /// The local anchor point relative to bodyB's origin. const b2Vec2& GetLocalAnchorB() const { return m_localAnchorB; } /// Set the maximum friction force in N. void SetMaxForce(float force); /// Get the maximum friction force in N. float GetMaxForce() const; /// Set the maximum friction torque in N*m. void SetMaxTorque(float torque); /// Get the maximum friction torque in N*m. float GetMaxTorque() const; /// Dump joint to dmLog void Dump() override; protected: friend class b2Joint; b2FrictionJoint(const b2FrictionJointDef* def); void InitVelocityConstraints(const b2SolverData& data) override; void SolveVelocityConstraints(const b2SolverData& data) override; bool SolvePositionConstraints(const b2SolverData& data) override; b2Vec2 m_localAnchorA; b2Vec2 m_localAnchorB; // Solver shared b2Vec2 m_linearImpulse; float m_angularImpulse; float m_maxForce; float m_maxTorque; // Solver temp int32 m_indexA; int32 m_indexB; b2Vec2 m_rA; b2Vec2 m_rB; b2Vec2 m_localCenterA; b2Vec2 m_localCenterB; float m_invMassA; float m_invMassB; float m_invIA; float m_invIB; b2Mat22 m_linearMass; float m_angularMass; }; #endif ================================================ FILE: src/libraries/box2d/b2_gear_joint.h ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #ifndef B2_GEAR_JOINT_H #define B2_GEAR_JOINT_H #include "b2_joint.h" /// Gear joint definition. This definition requires two existing /// revolute or prismatic joints (any combination will work). /// @warning bodyB on the input joints must both be dynamic struct B2_API b2GearJointDef : public b2JointDef { b2GearJointDef() { type = e_gearJoint; joint1 = nullptr; joint2 = nullptr; ratio = 1.0f; } /// The first revolute/prismatic joint attached to the gear joint. b2Joint* joint1; /// The second revolute/prismatic joint attached to the gear joint. b2Joint* joint2; /// The gear ratio. /// @see b2GearJoint for explanation. float ratio; }; /// A gear joint is used to connect two joints together. Either joint /// can be a revolute or prismatic joint. You specify a gear ratio /// to bind the motions together: /// coordinate1 + ratio * coordinate2 = constant /// The ratio can be negative or positive. If one joint is a revolute joint /// and the other joint is a prismatic joint, then the ratio will have units /// of length or units of 1/length. /// @warning You have to manually destroy the gear joint if joint1 or joint2 /// is destroyed. class B2_API b2GearJoint : public b2Joint { public: b2Vec2 GetAnchorA() const override; b2Vec2 GetAnchorB() const override; b2Vec2 GetReactionForce(float inv_dt) const override; float GetReactionTorque(float inv_dt) const override; /// Get the first joint. b2Joint* GetJoint1() { return m_joint1; } /// Get the second joint. b2Joint* GetJoint2() { return m_joint2; } /// Set/Get the gear ratio. void SetRatio(float ratio); float GetRatio() const; /// Dump joint to dmLog void Dump() override; protected: friend class b2Joint; b2GearJoint(const b2GearJointDef* data); void InitVelocityConstraints(const b2SolverData& data) override; void SolveVelocityConstraints(const b2SolverData& data) override; bool SolvePositionConstraints(const b2SolverData& data) override; b2Joint* m_joint1; b2Joint* m_joint2; b2JointType m_typeA; b2JointType m_typeB; // Body A is connected to body C // Body B is connected to body D b2Body* m_bodyC; b2Body* m_bodyD; // Solver shared b2Vec2 m_localAnchorA; b2Vec2 m_localAnchorB; b2Vec2 m_localAnchorC; b2Vec2 m_localAnchorD; b2Vec2 m_localAxisC; b2Vec2 m_localAxisD; float m_referenceAngleA; float m_referenceAngleB; float m_constant; float m_ratio; float m_impulse; // Solver temp int32 m_indexA, m_indexB, m_indexC, m_indexD; b2Vec2 m_lcA, m_lcB, m_lcC, m_lcD; float m_mA, m_mB, m_mC, m_mD; float m_iA, m_iB, m_iC, m_iD; b2Vec2 m_JvAC, m_JvBD; float m_JwA, m_JwB, m_JwC, m_JwD; float m_mass; }; #endif ================================================ FILE: src/libraries/box2d/b2_growable_stack.h ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #ifndef B2_GROWABLE_STACK_H #define B2_GROWABLE_STACK_H #include #include "b2_settings.h" /// This is a growable LIFO stack with an initial capacity of N. /// If the stack size exceeds the initial capacity, the heap is used /// to increase the size of the stack. template class b2GrowableStack { public: b2GrowableStack() { m_stack = m_array; m_count = 0; m_capacity = N; } ~b2GrowableStack() { if (m_stack != m_array) { b2Free(m_stack); m_stack = nullptr; } } void Push(const T& element) { if (m_count == m_capacity) { T* old = m_stack; m_capacity *= 2; m_stack = (T*)b2Alloc(m_capacity * sizeof(T)); memcpy(m_stack, old, m_count * sizeof(T)); if (old != m_array) { b2Free(old); } } m_stack[m_count] = element; ++m_count; } T Pop() { b2Assert(m_count > 0); --m_count; return m_stack[m_count]; } int32 GetCount() { return m_count; } private: T* m_stack; T m_array[N]; int32 m_count; int32 m_capacity; }; #endif ================================================ FILE: src/libraries/box2d/b2_joint.h ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #ifndef B2_JOINT_H #define B2_JOINT_H #include "b2_api.h" #include "b2_math.h" class b2Body; class b2Draw; class b2Joint; struct b2SolverData; class b2BlockAllocator; enum b2JointType { e_unknownJoint, e_revoluteJoint, e_prismaticJoint, e_distanceJoint, e_pulleyJoint, e_mouseJoint, e_gearJoint, e_wheelJoint, e_weldJoint, e_frictionJoint, e_ropeJoint, e_motorJoint }; struct B2_API b2Jacobian { b2Vec2 linear; float angularA; float angularB; }; /// A joint edge is used to connect bodies and joints together /// in a joint graph where each body is a node and each joint /// is an edge. A joint edge belongs to a doubly linked list /// maintained in each attached body. Each joint has two joint /// nodes, one for each attached body. struct B2_API b2JointEdge { b2Body* other; ///< provides quick access to the other body attached. b2Joint* joint; ///< the joint b2JointEdge* prev; ///< the previous joint edge in the body's joint list b2JointEdge* next; ///< the next joint edge in the body's joint list }; /// Joint definitions are used to construct joints. struct B2_API b2JointDef { b2JointDef() { type = e_unknownJoint; bodyA = nullptr; bodyB = nullptr; collideConnected = false; } /// The joint type is set automatically for concrete joint types. b2JointType type; /// Use this to attach application specific data to your joints. b2JointUserData userData; /// The first attached body. b2Body* bodyA; /// The second attached body. b2Body* bodyB; /// Set this flag to true if the attached bodies should collide. bool collideConnected; }; /// Utility to compute linear stiffness values from frequency and damping ratio B2_API void b2LinearStiffness(float& stiffness, float& damping, float frequencyHertz, float dampingRatio, const b2Body* bodyA, const b2Body* bodyB); /// Utility to compute rotational stiffness values frequency and damping ratio B2_API void b2AngularStiffness(float& stiffness, float& damping, float frequencyHertz, float dampingRatio, const b2Body* bodyA, const b2Body* bodyB); /// The base joint class. Joints are used to constraint two bodies together in /// various fashions. Some joints also feature limits and motors. class B2_API b2Joint { public: /// Get the type of the concrete joint. b2JointType GetType() const; /// Get the first body attached to this joint. b2Body* GetBodyA(); /// Get the second body attached to this joint. b2Body* GetBodyB(); /// Get the anchor point on bodyA in world coordinates. virtual b2Vec2 GetAnchorA() const = 0; /// Get the anchor point on bodyB in world coordinates. virtual b2Vec2 GetAnchorB() const = 0; /// Get the reaction force on bodyB at the joint anchor in Newtons. virtual b2Vec2 GetReactionForce(float inv_dt) const = 0; /// Get the reaction torque on bodyB in N*m. virtual float GetReactionTorque(float inv_dt) const = 0; /// Get the next joint the world joint list. b2Joint* GetNext(); const b2Joint* GetNext() const; /// Get the user data pointer. b2JointUserData& GetUserData(); /// Short-cut function to determine if either body is enabled. bool IsEnabled() const; /// Get collide connected. /// Note: modifying the collide connect flag won't work correctly because /// the flag is only checked when fixture AABBs begin to overlap. bool GetCollideConnected() const; /// Dump this joint to the log file. virtual void Dump() { b2Dump("// Dump is not supported for this joint type.\n"); } /// Shift the origin for any points stored in world coordinates. virtual void ShiftOrigin(const b2Vec2& newOrigin) { B2_NOT_USED(newOrigin); } /// Debug draw this joint virtual void Draw(b2Draw* draw) const; protected: friend class b2World; friend class b2Body; friend class b2Island; friend class b2GearJoint; static b2Joint* Create(const b2JointDef* def, b2BlockAllocator* allocator); static void Destroy(b2Joint* joint, b2BlockAllocator* allocator); b2Joint(const b2JointDef* def); virtual ~b2Joint() {} virtual void InitVelocityConstraints(const b2SolverData& data) = 0; virtual void SolveVelocityConstraints(const b2SolverData& data) = 0; // This returns true if the position errors are within tolerance. virtual bool SolvePositionConstraints(const b2SolverData& data) = 0; b2JointType m_type; b2Joint* m_prev; b2Joint* m_next; b2JointEdge m_edgeA; b2JointEdge m_edgeB; b2Body* m_bodyA; b2Body* m_bodyB; int32 m_index; bool m_islandFlag; bool m_collideConnected; b2JointUserData m_userData; }; inline b2JointType b2Joint::GetType() const { return m_type; } inline b2Body* b2Joint::GetBodyA() { return m_bodyA; } inline b2Body* b2Joint::GetBodyB() { return m_bodyB; } inline b2Joint* b2Joint::GetNext() { return m_next; } inline const b2Joint* b2Joint::GetNext() const { return m_next; } inline b2JointUserData& b2Joint::GetUserData() { return m_userData; } inline bool b2Joint::GetCollideConnected() const { return m_collideConnected; } #endif ================================================ FILE: src/libraries/box2d/b2_math.h ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #ifndef B2_MATH_H #define B2_MATH_H #include #include #include "b2_api.h" #include "b2_settings.h" /// This function is used to ensure that a floating point number is not a NaN or infinity. inline bool b2IsValid(float x) { return std::isfinite(x); } #define b2Sqrt(x) sqrtf(x) #define b2Atan2(y, x) atan2f(y, x) /// A 2D column vector. struct B2_API b2Vec2 { /// Default constructor does nothing (for performance). b2Vec2() {} /// Construct using coordinates. b2Vec2(float xIn, float yIn) : x(xIn), y(yIn) {} /// Set this vector to all zeros. void SetZero() { x = 0.0f; y = 0.0f; } /// Set this vector to some specified coordinates. void Set(float x_, float y_) { x = x_; y = y_; } /// Negate this vector. b2Vec2 operator -() const { b2Vec2 v; v.Set(-x, -y); return v; } /// Read from and indexed element. float operator () (int32 i) const { return (&x)[i]; } /// Write to an indexed element. float& operator () (int32 i) { return (&x)[i]; } /// Add a vector to this vector. void operator += (const b2Vec2& v) { x += v.x; y += v.y; } /// Subtract a vector from this vector. void operator -= (const b2Vec2& v) { x -= v.x; y -= v.y; } /// Multiply this vector by a scalar. void operator *= (float a) { x *= a; y *= a; } /// Get the length of this vector (the norm). float Length() const { return b2Sqrt(x * x + y * y); } /// Get the length squared. For performance, use this instead of /// b2Vec2::Length (if possible). float LengthSquared() const { return x * x + y * y; } /// Convert this vector into a unit vector. Returns the length. float Normalize() { float length = Length(); if (length < b2_epsilon) { return 0.0f; } float invLength = 1.0f / length; x *= invLength; y *= invLength; return length; } /// Does this vector contain finite coordinates? bool IsValid() const { return b2IsValid(x) && b2IsValid(y); } /// Get the skew vector such that dot(skew_vec, other) == cross(vec, other) b2Vec2 Skew() const { return b2Vec2(-y, x); } float x, y; }; /// A 2D column vector with 3 elements. struct B2_API b2Vec3 { /// Default constructor does nothing (for performance). b2Vec3() {} /// Construct using coordinates. b2Vec3(float xIn, float yIn, float zIn) : x(xIn), y(yIn), z(zIn) {} /// Set this vector to all zeros. void SetZero() { x = 0.0f; y = 0.0f; z = 0.0f; } /// Set this vector to some specified coordinates. void Set(float x_, float y_, float z_) { x = x_; y = y_; z = z_; } /// Negate this vector. b2Vec3 operator -() const { b2Vec3 v; v.Set(-x, -y, -z); return v; } /// Add a vector to this vector. void operator += (const b2Vec3& v) { x += v.x; y += v.y; z += v.z; } /// Subtract a vector from this vector. void operator -= (const b2Vec3& v) { x -= v.x; y -= v.y; z -= v.z; } /// Multiply this vector by a scalar. void operator *= (float s) { x *= s; y *= s; z *= s; } float x, y, z; }; /// A 2-by-2 matrix. Stored in column-major order. struct B2_API b2Mat22 { /// The default constructor does nothing (for performance). b2Mat22() {} /// Construct this matrix using columns. b2Mat22(const b2Vec2& c1, const b2Vec2& c2) { ex = c1; ey = c2; } /// Construct this matrix using scalars. b2Mat22(float a11, float a12, float a21, float a22) { ex.x = a11; ex.y = a21; ey.x = a12; ey.y = a22; } /// Initialize this matrix using columns. void Set(const b2Vec2& c1, const b2Vec2& c2) { ex = c1; ey = c2; } /// Set this to the identity matrix. void SetIdentity() { ex.x = 1.0f; ey.x = 0.0f; ex.y = 0.0f; ey.y = 1.0f; } /// Set this matrix to all zeros. void SetZero() { ex.x = 0.0f; ey.x = 0.0f; ex.y = 0.0f; ey.y = 0.0f; } b2Mat22 GetInverse() const { float a = ex.x, b = ey.x, c = ex.y, d = ey.y; b2Mat22 B; float det = a * d - b * c; if (det != 0.0f) { det = 1.0f / det; } B.ex.x = det * d; B.ey.x = -det * b; B.ex.y = -det * c; B.ey.y = det * a; return B; } /// Solve A * x = b, where b is a column vector. This is more efficient /// than computing the inverse in one-shot cases. b2Vec2 Solve(const b2Vec2& b) const { float a11 = ex.x, a12 = ey.x, a21 = ex.y, a22 = ey.y; float det = a11 * a22 - a12 * a21; if (det != 0.0f) { det = 1.0f / det; } b2Vec2 x; x.x = det * (a22 * b.x - a12 * b.y); x.y = det * (a11 * b.y - a21 * b.x); return x; } b2Vec2 ex, ey; }; /// A 3-by-3 matrix. Stored in column-major order. struct B2_API b2Mat33 { /// The default constructor does nothing (for performance). b2Mat33() {} /// Construct this matrix using columns. b2Mat33(const b2Vec3& c1, const b2Vec3& c2, const b2Vec3& c3) { ex = c1; ey = c2; ez = c3; } /// Set this matrix to all zeros. void SetZero() { ex.SetZero(); ey.SetZero(); ez.SetZero(); } /// Solve A * x = b, where b is a column vector. This is more efficient /// than computing the inverse in one-shot cases. b2Vec3 Solve33(const b2Vec3& b) const; /// Solve A * x = b, where b is a column vector. This is more efficient /// than computing the inverse in one-shot cases. Solve only the upper /// 2-by-2 matrix equation. b2Vec2 Solve22(const b2Vec2& b) const; /// Get the inverse of this matrix as a 2-by-2. /// Returns the zero matrix if singular. void GetInverse22(b2Mat33* M) const; /// Get the symmetric inverse of this matrix as a 3-by-3. /// Returns the zero matrix if singular. void GetSymInverse33(b2Mat33* M) const; b2Vec3 ex, ey, ez; }; /// Rotation struct B2_API b2Rot { b2Rot() {} /// Initialize from an angle in radians explicit b2Rot(float angle) { /// TODO_ERIN optimize s = sinf(angle); c = cosf(angle); } /// Set using an angle in radians. void Set(float angle) { /// TODO_ERIN optimize s = sinf(angle); c = cosf(angle); } /// Set to the identity rotation void SetIdentity() { s = 0.0f; c = 1.0f; } /// Get the angle in radians float GetAngle() const { return b2Atan2(s, c); } /// Get the x-axis b2Vec2 GetXAxis() const { return b2Vec2(c, s); } /// Get the u-axis b2Vec2 GetYAxis() const { return b2Vec2(-s, c); } /// Sine and cosine float s, c; }; /// A transform contains translation and rotation. It is used to represent /// the position and orientation of rigid frames. struct B2_API b2Transform { /// The default constructor does nothing. b2Transform() {} /// Initialize using a position vector and a rotation. b2Transform(const b2Vec2& position, const b2Rot& rotation) : p(position), q(rotation) {} /// Set this to the identity transform. void SetIdentity() { p.SetZero(); q.SetIdentity(); } /// Set this based on the position and angle. void Set(const b2Vec2& position, float angle) { p = position; q.Set(angle); } b2Vec2 p; b2Rot q; }; /// This describes the motion of a body/shape for TOI computation. /// Shapes are defined with respect to the body origin, which may /// no coincide with the center of mass. However, to support dynamics /// we must interpolate the center of mass position. struct B2_API b2Sweep { /// Get the interpolated transform at a specific time. /// @param transform the output transform /// @param beta is a factor in [0,1], where 0 indicates alpha0. void GetTransform(b2Transform* transform, float beta) const; /// Advance the sweep forward, yielding a new initial state. /// @param alpha the new initial time. void Advance(float alpha); /// Normalize the angles. void Normalize(); b2Vec2 localCenter; ///< local center of mass position b2Vec2 c0, c; ///< center world positions float a0, a; ///< world angles /// Fraction of the current time step in the range [0,1] /// c0 and a0 are the positions at alpha0. float alpha0; }; /// Useful constant extern B2_API const b2Vec2 b2Vec2_zero; /// Perform the dot product on two vectors. inline float b2Dot(const b2Vec2& a, const b2Vec2& b) { return a.x * b.x + a.y * b.y; } /// Perform the cross product on two vectors. In 2D this produces a scalar. inline float b2Cross(const b2Vec2& a, const b2Vec2& b) { return a.x * b.y - a.y * b.x; } /// Perform the cross product on a vector and a scalar. In 2D this produces /// a vector. inline b2Vec2 b2Cross(const b2Vec2& a, float s) { return b2Vec2(s * a.y, -s * a.x); } /// Perform the cross product on a scalar and a vector. In 2D this produces /// a vector. inline b2Vec2 b2Cross(float s, const b2Vec2& a) { return b2Vec2(-s * a.y, s * a.x); } /// Multiply a matrix times a vector. If a rotation matrix is provided, /// then this transforms the vector from one frame to another. inline b2Vec2 b2Mul(const b2Mat22& A, const b2Vec2& v) { return b2Vec2(A.ex.x * v.x + A.ey.x * v.y, A.ex.y * v.x + A.ey.y * v.y); } /// Multiply a matrix transpose times a vector. If a rotation matrix is provided, /// then this transforms the vector from one frame to another (inverse transform). inline b2Vec2 b2MulT(const b2Mat22& A, const b2Vec2& v) { return b2Vec2(b2Dot(v, A.ex), b2Dot(v, A.ey)); } /// Add two vectors component-wise. inline b2Vec2 operator + (const b2Vec2& a, const b2Vec2& b) { return b2Vec2(a.x + b.x, a.y + b.y); } /// Subtract two vectors component-wise. inline b2Vec2 operator - (const b2Vec2& a, const b2Vec2& b) { return b2Vec2(a.x - b.x, a.y - b.y); } inline b2Vec2 operator * (float s, const b2Vec2& a) { return b2Vec2(s * a.x, s * a.y); } inline bool operator == (const b2Vec2& a, const b2Vec2& b) { return a.x == b.x && a.y == b.y; } inline bool operator != (const b2Vec2& a, const b2Vec2& b) { return a.x != b.x || a.y != b.y; } inline float b2Distance(const b2Vec2& a, const b2Vec2& b) { b2Vec2 c = a - b; return c.Length(); } inline float b2DistanceSquared(const b2Vec2& a, const b2Vec2& b) { b2Vec2 c = a - b; return b2Dot(c, c); } inline b2Vec3 operator * (float s, const b2Vec3& a) { return b2Vec3(s * a.x, s * a.y, s * a.z); } /// Add two vectors component-wise. inline b2Vec3 operator + (const b2Vec3& a, const b2Vec3& b) { return b2Vec3(a.x + b.x, a.y + b.y, a.z + b.z); } /// Subtract two vectors component-wise. inline b2Vec3 operator - (const b2Vec3& a, const b2Vec3& b) { return b2Vec3(a.x - b.x, a.y - b.y, a.z - b.z); } /// Perform the dot product on two vectors. inline float b2Dot(const b2Vec3& a, const b2Vec3& b) { return a.x * b.x + a.y * b.y + a.z * b.z; } /// Perform the cross product on two vectors. inline b2Vec3 b2Cross(const b2Vec3& a, const b2Vec3& b) { return b2Vec3(a.y * b.z - a.z * b.y, a.z * b.x - a.x * b.z, a.x * b.y - a.y * b.x); } inline b2Mat22 operator + (const b2Mat22& A, const b2Mat22& B) { return b2Mat22(A.ex + B.ex, A.ey + B.ey); } // A * B inline b2Mat22 b2Mul(const b2Mat22& A, const b2Mat22& B) { return b2Mat22(b2Mul(A, B.ex), b2Mul(A, B.ey)); } // A^T * B inline b2Mat22 b2MulT(const b2Mat22& A, const b2Mat22& B) { b2Vec2 c1(b2Dot(A.ex, B.ex), b2Dot(A.ey, B.ex)); b2Vec2 c2(b2Dot(A.ex, B.ey), b2Dot(A.ey, B.ey)); return b2Mat22(c1, c2); } /// Multiply a matrix times a vector. inline b2Vec3 b2Mul(const b2Mat33& A, const b2Vec3& v) { return v.x * A.ex + v.y * A.ey + v.z * A.ez; } /// Multiply a matrix times a vector. inline b2Vec2 b2Mul22(const b2Mat33& A, const b2Vec2& v) { return b2Vec2(A.ex.x * v.x + A.ey.x * v.y, A.ex.y * v.x + A.ey.y * v.y); } /// Multiply two rotations: q * r inline b2Rot b2Mul(const b2Rot& q, const b2Rot& r) { // [qc -qs] * [rc -rs] = [qc*rc-qs*rs -qc*rs-qs*rc] // [qs qc] [rs rc] [qs*rc+qc*rs -qs*rs+qc*rc] // s = qs * rc + qc * rs // c = qc * rc - qs * rs b2Rot qr; qr.s = q.s * r.c + q.c * r.s; qr.c = q.c * r.c - q.s * r.s; return qr; } /// Transpose multiply two rotations: qT * r inline b2Rot b2MulT(const b2Rot& q, const b2Rot& r) { // [ qc qs] * [rc -rs] = [qc*rc+qs*rs -qc*rs+qs*rc] // [-qs qc] [rs rc] [-qs*rc+qc*rs qs*rs+qc*rc] // s = qc * rs - qs * rc // c = qc * rc + qs * rs b2Rot qr; qr.s = q.c * r.s - q.s * r.c; qr.c = q.c * r.c + q.s * r.s; return qr; } /// Rotate a vector inline b2Vec2 b2Mul(const b2Rot& q, const b2Vec2& v) { return b2Vec2(q.c * v.x - q.s * v.y, q.s * v.x + q.c * v.y); } /// Inverse rotate a vector inline b2Vec2 b2MulT(const b2Rot& q, const b2Vec2& v) { return b2Vec2(q.c * v.x + q.s * v.y, -q.s * v.x + q.c * v.y); } inline b2Vec2 b2Mul(const b2Transform& T, const b2Vec2& v) { float x = (T.q.c * v.x - T.q.s * v.y) + T.p.x; float y = (T.q.s * v.x + T.q.c * v.y) + T.p.y; return b2Vec2(x, y); } inline b2Vec2 b2MulT(const b2Transform& T, const b2Vec2& v) { float px = v.x - T.p.x; float py = v.y - T.p.y; float x = (T.q.c * px + T.q.s * py); float y = (-T.q.s * px + T.q.c * py); return b2Vec2(x, y); } // v2 = A.q.Rot(B.q.Rot(v1) + B.p) + A.p // = (A.q * B.q).Rot(v1) + A.q.Rot(B.p) + A.p inline b2Transform b2Mul(const b2Transform& A, const b2Transform& B) { b2Transform C; C.q = b2Mul(A.q, B.q); C.p = b2Mul(A.q, B.p) + A.p; return C; } // v2 = A.q' * (B.q * v1 + B.p - A.p) // = A.q' * B.q * v1 + A.q' * (B.p - A.p) inline b2Transform b2MulT(const b2Transform& A, const b2Transform& B) { b2Transform C; C.q = b2MulT(A.q, B.q); C.p = b2MulT(A.q, B.p - A.p); return C; } template inline T b2Abs(T a) { return a > T(0) ? a : -a; } inline b2Vec2 b2Abs(const b2Vec2& a) { return b2Vec2(b2Abs(a.x), b2Abs(a.y)); } inline b2Mat22 b2Abs(const b2Mat22& A) { return b2Mat22(b2Abs(A.ex), b2Abs(A.ey)); } template inline T b2Min(T a, T b) { return a < b ? a : b; } inline b2Vec2 b2Min(const b2Vec2& a, const b2Vec2& b) { return b2Vec2(b2Min(a.x, b.x), b2Min(a.y, b.y)); } template inline T b2Max(T a, T b) { return a > b ? a : b; } inline b2Vec2 b2Max(const b2Vec2& a, const b2Vec2& b) { return b2Vec2(b2Max(a.x, b.x), b2Max(a.y, b.y)); } template inline T b2Clamp(T a, T low, T high) { return b2Max(low, b2Min(a, high)); } inline b2Vec2 b2Clamp(const b2Vec2& a, const b2Vec2& low, const b2Vec2& high) { return b2Max(low, b2Min(a, high)); } template inline void b2Swap(T& a, T& b) { T tmp = a; a = b; b = tmp; } /// "Next Largest Power of 2 /// Given a binary integer value x, the next largest power of 2 can be computed by a SWAR algorithm /// that recursively "folds" the upper bits into the lower bits. This process yields a bit vector with /// the same most significant 1 as x, but all 1's below it. Adding 1 to that value yields the next /// largest power of 2. For a 32-bit value:" inline uint32 b2NextPowerOfTwo(uint32 x) { x |= (x >> 1); x |= (x >> 2); x |= (x >> 4); x |= (x >> 8); x |= (x >> 16); return x + 1; } inline bool b2IsPowerOfTwo(uint32 x) { bool result = x > 0 && (x & (x - 1)) == 0; return result; } // https://fgiesen.wordpress.com/2012/08/15/linear-interpolation-past-present-and-future/ inline void b2Sweep::GetTransform(b2Transform* xf, float beta) const { xf->p = (1.0f - beta) * c0 + beta * c; float angle = (1.0f - beta) * a0 + beta * a; xf->q.Set(angle); // Shift to origin xf->p -= b2Mul(xf->q, localCenter); } inline void b2Sweep::Advance(float alpha) { b2Assert(alpha0 < 1.0f); float beta = (alpha - alpha0) / (1.0f - alpha0); c0 += beta * (c - c0); a0 += beta * (a - a0); alpha0 = alpha; } /// Normalize an angle in radians to be between -pi and pi inline void b2Sweep::Normalize() { float twoPi = 2.0f * b2_pi; float d = twoPi * floorf(a0 / twoPi); a0 -= d; a -= d; } #endif ================================================ FILE: src/libraries/box2d/b2_motor_joint.h ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #ifndef B2_MOTOR_JOINT_H #define B2_MOTOR_JOINT_H #include "b2_api.h" #include "b2_joint.h" /// Motor joint definition. struct B2_API b2MotorJointDef : public b2JointDef { b2MotorJointDef() { type = e_motorJoint; linearOffset.SetZero(); angularOffset = 0.0f; maxForce = 1.0f; maxTorque = 1.0f; correctionFactor = 0.3f; } /// Initialize the bodies and offsets using the current transforms. void Initialize(b2Body* bodyA, b2Body* bodyB); /// Position of bodyB minus the position of bodyA, in bodyA's frame, in meters. b2Vec2 linearOffset; /// The bodyB angle minus bodyA angle in radians. float angularOffset; /// The maximum motor force in N. float maxForce; /// The maximum motor torque in N-m. float maxTorque; /// Position correction factor in the range [0,1]. float correctionFactor; }; /// A motor joint is used to control the relative motion /// between two bodies. A typical usage is to control the movement /// of a dynamic body with respect to the ground. class B2_API b2MotorJoint : public b2Joint { public: b2Vec2 GetAnchorA() const override; b2Vec2 GetAnchorB() const override; b2Vec2 GetReactionForce(float inv_dt) const override; float GetReactionTorque(float inv_dt) const override; /// Set/get the target linear offset, in frame A, in meters. void SetLinearOffset(const b2Vec2& linearOffset); const b2Vec2& GetLinearOffset() const; /// Set/get the target angular offset, in radians. void SetAngularOffset(float angularOffset); float GetAngularOffset() const; /// Set the maximum friction force in N. void SetMaxForce(float force); /// Get the maximum friction force in N. float GetMaxForce() const; /// Set the maximum friction torque in N*m. void SetMaxTorque(float torque); /// Get the maximum friction torque in N*m. float GetMaxTorque() const; /// Set the position correction factor in the range [0,1]. void SetCorrectionFactor(float factor); /// Get the position correction factor in the range [0,1]. float GetCorrectionFactor() const; /// Dump to b2Log void Dump() override; protected: friend class b2Joint; b2MotorJoint(const b2MotorJointDef* def); void InitVelocityConstraints(const b2SolverData& data) override; void SolveVelocityConstraints(const b2SolverData& data) override; bool SolvePositionConstraints(const b2SolverData& data) override; // Solver shared b2Vec2 m_linearOffset; float m_angularOffset; b2Vec2 m_linearImpulse; float m_angularImpulse; float m_maxForce; float m_maxTorque; float m_correctionFactor; // Solver temp int32 m_indexA; int32 m_indexB; b2Vec2 m_rA; b2Vec2 m_rB; b2Vec2 m_localCenterA; b2Vec2 m_localCenterB; b2Vec2 m_linearError; float m_angularError; float m_invMassA; float m_invMassB; float m_invIA; float m_invIB; b2Mat22 m_linearMass; float m_angularMass; }; #endif ================================================ FILE: src/libraries/box2d/b2_mouse_joint.h ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #ifndef B2_MOUSE_JOINT_H #define B2_MOUSE_JOINT_H #include "b2_api.h" #include "b2_joint.h" /// Mouse joint definition. This requires a world target point, /// tuning parameters, and the time step. struct B2_API b2MouseJointDef : public b2JointDef { b2MouseJointDef() { type = e_mouseJoint; target.Set(0.0f, 0.0f); maxForce = 0.0f; stiffness = 0.0f; damping = 0.0f; } /// The initial world target point. This is assumed /// to coincide with the body anchor initially. b2Vec2 target; /// The maximum constraint force that can be exerted /// to move the candidate body. Usually you will express /// as some multiple of the weight (multiplier * mass * gravity). float maxForce; /// The linear stiffness in N/m float stiffness; /// The linear damping in N*s/m float damping; }; /// A mouse joint is used to make a point on a body track a /// specified world point. This a soft constraint with a maximum /// force. This allows the constraint to stretch and without /// applying huge forces. /// NOTE: this joint is not documented in the manual because it was /// developed to be used in the testbed. If you want to learn how to /// use the mouse joint, look at the testbed. class B2_API b2MouseJoint : public b2Joint { public: /// Implements b2Joint. b2Vec2 GetAnchorA() const override; /// Implements b2Joint. b2Vec2 GetAnchorB() const override; /// Implements b2Joint. b2Vec2 GetReactionForce(float inv_dt) const override; /// Implements b2Joint. float GetReactionTorque(float inv_dt) const override; /// Use this to update the target point. void SetTarget(const b2Vec2& target); const b2Vec2& GetTarget() const; /// Set/get the maximum force in Newtons. void SetMaxForce(float force); float GetMaxForce() const; /// Set/get the linear stiffness in N/m void SetStiffness(float stiffness) { m_stiffness = stiffness; } float GetStiffness() const { return m_stiffness; } /// Set/get linear damping in N*s/m void SetDamping(float damping) { m_damping = damping; } float GetDamping() const { return m_damping; } /// The mouse joint does not support dumping. void Dump() override { b2Log("Mouse joint dumping is not supported.\n"); } /// Implement b2Joint::ShiftOrigin void ShiftOrigin(const b2Vec2& newOrigin) override; protected: friend class b2Joint; b2MouseJoint(const b2MouseJointDef* def); void InitVelocityConstraints(const b2SolverData& data) override; void SolveVelocityConstraints(const b2SolverData& data) override; bool SolvePositionConstraints(const b2SolverData& data) override; b2Vec2 m_localAnchorB; b2Vec2 m_targetA; float m_stiffness; float m_damping; float m_beta; // Solver shared b2Vec2 m_impulse; float m_maxForce; float m_gamma; // Solver temp int32 m_indexA; int32 m_indexB; b2Vec2 m_rB; b2Vec2 m_localCenterB; float m_invMassB; float m_invIB; b2Mat22 m_mass; b2Vec2 m_C; }; #endif ================================================ FILE: src/libraries/box2d/b2_polygon_shape.h ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #ifndef B2_POLYGON_SHAPE_H #define B2_POLYGON_SHAPE_H #include "b2_api.h" #include "b2_shape.h" /// A solid convex polygon. It is assumed that the interior of the polygon is to /// the left of each edge. /// Polygons have a maximum number of vertices equal to b2_maxPolygonVertices. /// In most cases you should not need many vertices for a convex polygon. class B2_API b2PolygonShape : public b2Shape { public: b2PolygonShape(); /// Implement b2Shape. b2Shape* Clone(b2BlockAllocator* allocator) const override; /// @see b2Shape::GetChildCount int32 GetChildCount() const override; /// Create a convex hull from the given array of local points. /// The count must be in the range [3, b2_maxPolygonVertices]. /// @warning the points may be re-ordered, even if they form a convex polygon /// @warning collinear points are handled but not removed. Collinear points /// may lead to poor stacking behavior. void Set(const b2Vec2* points, int32 count); /// Build vertices to represent an axis-aligned box centered on the local origin. /// @param hx the half-width. /// @param hy the half-height. void SetAsBox(float hx, float hy); /// Build vertices to represent an oriented box. /// @param hx the half-width. /// @param hy the half-height. /// @param center the center of the box in local coordinates. /// @param angle the rotation of the box in local coordinates. void SetAsBox(float hx, float hy, const b2Vec2& center, float angle); /// @see b2Shape::TestPoint bool TestPoint(const b2Transform& transform, const b2Vec2& p) const override; /// Implement b2Shape. /// @note because the polygon is solid, rays that start inside do not hit because the normal is /// not defined. bool RayCast(b2RayCastOutput* output, const b2RayCastInput& input, const b2Transform& transform, int32 childIndex) const override; /// @see b2Shape::ComputeAABB void ComputeAABB(b2AABB* aabb, const b2Transform& transform, int32 childIndex) const override; /// @see b2Shape::ComputeMass void ComputeMass(b2MassData* massData, float density) const override; /// Validate convexity. This is a very time consuming operation. /// @returns true if valid bool Validate() const; b2Vec2 m_centroid; b2Vec2 m_vertices[b2_maxPolygonVertices]; b2Vec2 m_normals[b2_maxPolygonVertices]; int32 m_count; }; inline b2PolygonShape::b2PolygonShape() { m_type = e_polygon; m_radius = b2_polygonRadius; m_count = 0; m_centroid.SetZero(); } #endif ================================================ FILE: src/libraries/box2d/b2_prismatic_joint.h ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #ifndef B2_PRISMATIC_JOINT_H #define B2_PRISMATIC_JOINT_H #include "b2_api.h" #include "b2_joint.h" /// Prismatic joint definition. This requires defining a line of /// motion using an axis and an anchor point. The definition uses local /// anchor points and a local axis so that the initial configuration /// can violate the constraint slightly. The joint translation is zero /// when the local anchor points coincide in world space. Using local /// anchors and a local axis helps when saving and loading a game. struct B2_API b2PrismaticJointDef : public b2JointDef { b2PrismaticJointDef() { type = e_prismaticJoint; localAnchorA.SetZero(); localAnchorB.SetZero(); localAxisA.Set(1.0f, 0.0f); referenceAngle = 0.0f; enableLimit = false; lowerTranslation = 0.0f; upperTranslation = 0.0f; enableMotor = false; maxMotorForce = 0.0f; motorSpeed = 0.0f; } /// Initialize the bodies, anchors, axis, and reference angle using the world /// anchor and unit world axis. void Initialize(b2Body* bodyA, b2Body* bodyB, const b2Vec2& anchor, const b2Vec2& axis); /// The local anchor point relative to bodyA's origin. b2Vec2 localAnchorA; /// The local anchor point relative to bodyB's origin. b2Vec2 localAnchorB; /// The local translation unit axis in bodyA. b2Vec2 localAxisA; /// The constrained angle between the bodies: bodyB_angle - bodyA_angle. float referenceAngle; /// Enable/disable the joint limit. bool enableLimit; /// The lower translation limit, usually in meters. float lowerTranslation; /// The upper translation limit, usually in meters. float upperTranslation; /// Enable/disable the joint motor. bool enableMotor; /// The maximum motor torque, usually in N-m. float maxMotorForce; /// The desired motor speed in radians per second. float motorSpeed; }; /// A prismatic joint. This joint provides one degree of freedom: translation /// along an axis fixed in bodyA. Relative rotation is prevented. You can /// use a joint limit to restrict the range of motion and a joint motor to /// drive the motion or to model joint friction. class B2_API b2PrismaticJoint : public b2Joint { public: b2Vec2 GetAnchorA() const override; b2Vec2 GetAnchorB() const override; b2Vec2 GetReactionForce(float inv_dt) const override; float GetReactionTorque(float inv_dt) const override; /// The local anchor point relative to bodyA's origin. const b2Vec2& GetLocalAnchorA() const { return m_localAnchorA; } /// The local anchor point relative to bodyB's origin. const b2Vec2& GetLocalAnchorB() const { return m_localAnchorB; } /// The local joint axis relative to bodyA. const b2Vec2& GetLocalAxisA() const { return m_localXAxisA; } /// Get the reference angle. float GetReferenceAngle() const { return m_referenceAngle; } /// Get the current joint translation, usually in meters. float GetJointTranslation() const; /// Get the current joint translation speed, usually in meters per second. float GetJointSpeed() const; /// Is the joint limit enabled? bool IsLimitEnabled() const; /// Enable/disable the joint limit. void EnableLimit(bool flag); /// Get the lower joint limit, usually in meters. float GetLowerLimit() const; /// Get the upper joint limit, usually in meters. float GetUpperLimit() const; /// Set the joint limits, usually in meters. void SetLimits(float lower, float upper); /// Is the joint motor enabled? bool IsMotorEnabled() const; /// Enable/disable the joint motor. void EnableMotor(bool flag); /// Set the motor speed, usually in meters per second. void SetMotorSpeed(float speed); /// Get the motor speed, usually in meters per second. float GetMotorSpeed() const; /// Set the maximum motor force, usually in N. void SetMaxMotorForce(float force); float GetMaxMotorForce() const { return m_maxMotorForce; } /// Get the current motor force given the inverse time step, usually in N. float GetMotorForce(float inv_dt) const; /// Dump to b2Log void Dump() override; /// void Draw(b2Draw* draw) const override; protected: friend class b2Joint; friend class b2GearJoint; b2PrismaticJoint(const b2PrismaticJointDef* def); void InitVelocityConstraints(const b2SolverData& data) override; void SolveVelocityConstraints(const b2SolverData& data) override; bool SolvePositionConstraints(const b2SolverData& data) override; b2Vec2 m_localAnchorA; b2Vec2 m_localAnchorB; b2Vec2 m_localXAxisA; b2Vec2 m_localYAxisA; float m_referenceAngle; b2Vec2 m_impulse; float m_motorImpulse; float m_lowerImpulse; float m_upperImpulse; float m_lowerTranslation; float m_upperTranslation; float m_maxMotorForce; float m_motorSpeed; bool m_enableLimit; bool m_enableMotor; // Solver temp int32 m_indexA; int32 m_indexB; b2Vec2 m_localCenterA; b2Vec2 m_localCenterB; float m_invMassA; float m_invMassB; float m_invIA; float m_invIB; b2Vec2 m_axis, m_perp; float m_s1, m_s2; float m_a1, m_a2; b2Mat22 m_K; float m_translation; float m_axialMass; }; inline float b2PrismaticJoint::GetMotorSpeed() const { return m_motorSpeed; } #endif ================================================ FILE: src/libraries/box2d/b2_pulley_joint.h ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #ifndef B2_PULLEY_JOINT_H #define B2_PULLEY_JOINT_H #include "b2_api.h" #include "b2_joint.h" const float b2_minPulleyLength = 2.0f; /// Pulley joint definition. This requires two ground anchors, /// two dynamic body anchor points, and a pulley ratio. struct B2_API b2PulleyJointDef : public b2JointDef { b2PulleyJointDef() { type = e_pulleyJoint; groundAnchorA.Set(-1.0f, 1.0f); groundAnchorB.Set(1.0f, 1.0f); localAnchorA.Set(-1.0f, 0.0f); localAnchorB.Set(1.0f, 0.0f); lengthA = 0.0f; lengthB = 0.0f; ratio = 1.0f; collideConnected = true; } /// Initialize the bodies, anchors, lengths, max lengths, and ratio using the world anchors. void Initialize(b2Body* bodyA, b2Body* bodyB, const b2Vec2& groundAnchorA, const b2Vec2& groundAnchorB, const b2Vec2& anchorA, const b2Vec2& anchorB, float ratio); /// The first ground anchor in world coordinates. This point never moves. b2Vec2 groundAnchorA; /// The second ground anchor in world coordinates. This point never moves. b2Vec2 groundAnchorB; /// The local anchor point relative to bodyA's origin. b2Vec2 localAnchorA; /// The local anchor point relative to bodyB's origin. b2Vec2 localAnchorB; /// The a reference length for the segment attached to bodyA. float lengthA; /// The a reference length for the segment attached to bodyB. float lengthB; /// The pulley ratio, used to simulate a block-and-tackle. float ratio; }; /// The pulley joint is connected to two bodies and two fixed ground points. /// The pulley supports a ratio such that: /// length1 + ratio * length2 <= constant /// Yes, the force transmitted is scaled by the ratio. /// Warning: the pulley joint can get a bit squirrelly by itself. They often /// work better when combined with prismatic joints. You should also cover the /// the anchor points with static shapes to prevent one side from going to /// zero length. class B2_API b2PulleyJoint : public b2Joint { public: b2Vec2 GetAnchorA() const override; b2Vec2 GetAnchorB() const override; b2Vec2 GetReactionForce(float inv_dt) const override; float GetReactionTorque(float inv_dt) const override; /// Get the first ground anchor. b2Vec2 GetGroundAnchorA() const; /// Get the second ground anchor. b2Vec2 GetGroundAnchorB() const; /// Get the current length of the segment attached to bodyA. float GetLengthA() const; /// Get the current length of the segment attached to bodyB. float GetLengthB() const; /// Get the pulley ratio. float GetRatio() const; /// Get the current length of the segment attached to bodyA. float GetCurrentLengthA() const; /// Get the current length of the segment attached to bodyB. float GetCurrentLengthB() const; /// Dump joint to dmLog void Dump() override; /// Implement b2Joint::ShiftOrigin void ShiftOrigin(const b2Vec2& newOrigin) override; protected: friend class b2Joint; b2PulleyJoint(const b2PulleyJointDef* data); void InitVelocityConstraints(const b2SolverData& data) override; void SolveVelocityConstraints(const b2SolverData& data) override; bool SolvePositionConstraints(const b2SolverData& data) override; b2Vec2 m_groundAnchorA; b2Vec2 m_groundAnchorB; float m_lengthA; float m_lengthB; // Solver shared b2Vec2 m_localAnchorA; b2Vec2 m_localAnchorB; float m_constant; float m_ratio; float m_impulse; // Solver temp int32 m_indexA; int32 m_indexB; b2Vec2 m_uA; b2Vec2 m_uB; b2Vec2 m_rA; b2Vec2 m_rB; b2Vec2 m_localCenterA; b2Vec2 m_localCenterB; float m_invMassA; float m_invMassB; float m_invIA; float m_invIB; float m_mass; }; #endif ================================================ FILE: src/libraries/box2d/b2_revolute_joint.h ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #ifndef B2_REVOLUTE_JOINT_H #define B2_REVOLUTE_JOINT_H #include "b2_api.h" #include "b2_joint.h" /// Revolute joint definition. This requires defining an anchor point where the /// bodies are joined. The definition uses local anchor points so that the /// initial configuration can violate the constraint slightly. You also need to /// specify the initial relative angle for joint limits. This helps when saving /// and loading a game. /// The local anchor points are measured from the body's origin /// rather than the center of mass because: /// 1. you might not know where the center of mass will be. /// 2. if you add/remove shapes from a body and recompute the mass, /// the joints will be broken. struct B2_API b2RevoluteJointDef : public b2JointDef { b2RevoluteJointDef() { type = e_revoluteJoint; localAnchorA.Set(0.0f, 0.0f); localAnchorB.Set(0.0f, 0.0f); referenceAngle = 0.0f; lowerAngle = 0.0f; upperAngle = 0.0f; maxMotorTorque = 0.0f; motorSpeed = 0.0f; enableLimit = false; enableMotor = false; } /// Initialize the bodies, anchors, and reference angle using a world /// anchor point. void Initialize(b2Body* bodyA, b2Body* bodyB, const b2Vec2& anchor); /// The local anchor point relative to bodyA's origin. b2Vec2 localAnchorA; /// The local anchor point relative to bodyB's origin. b2Vec2 localAnchorB; /// The bodyB angle minus bodyA angle in the reference state (radians). float referenceAngle; /// A flag to enable joint limits. bool enableLimit; /// The lower angle for the joint limit (radians). float lowerAngle; /// The upper angle for the joint limit (radians). float upperAngle; /// A flag to enable the joint motor. bool enableMotor; /// The desired motor speed. Usually in radians per second. float motorSpeed; /// The maximum motor torque used to achieve the desired motor speed. /// Usually in N-m. float maxMotorTorque; }; /// A revolute joint constrains two bodies to share a common point while they /// are free to rotate about the point. The relative rotation about the shared /// point is the joint angle. You can limit the relative rotation with /// a joint limit that specifies a lower and upper angle. You can use a motor /// to drive the relative rotation about the shared point. A maximum motor torque /// is provided so that infinite forces are not generated. class B2_API b2RevoluteJoint : public b2Joint { public: b2Vec2 GetAnchorA() const override; b2Vec2 GetAnchorB() const override; /// The local anchor point relative to bodyA's origin. const b2Vec2& GetLocalAnchorA() const { return m_localAnchorA; } /// The local anchor point relative to bodyB's origin. const b2Vec2& GetLocalAnchorB() const { return m_localAnchorB; } /// Get the reference angle. float GetReferenceAngle() const { return m_referenceAngle; } /// Get the current joint angle in radians. float GetJointAngle() const; /// Get the current joint angle speed in radians per second. float GetJointSpeed() const; /// Is the joint limit enabled? bool IsLimitEnabled() const; /// Enable/disable the joint limit. void EnableLimit(bool flag); /// Get the lower joint limit in radians. float GetLowerLimit() const; /// Get the upper joint limit in radians. float GetUpperLimit() const; /// Set the joint limits in radians. void SetLimits(float lower, float upper); /// Is the joint motor enabled? bool IsMotorEnabled() const; /// Enable/disable the joint motor. void EnableMotor(bool flag); /// Set the motor speed in radians per second. void SetMotorSpeed(float speed); /// Get the motor speed in radians per second. float GetMotorSpeed() const; /// Set the maximum motor torque, usually in N-m. void SetMaxMotorTorque(float torque); float GetMaxMotorTorque() const { return m_maxMotorTorque; } /// Get the reaction force given the inverse time step. /// Unit is N. b2Vec2 GetReactionForce(float inv_dt) const override; /// Get the reaction torque due to the joint limit given the inverse time step. /// Unit is N*m. float GetReactionTorque(float inv_dt) const override; /// Get the current motor torque given the inverse time step. /// Unit is N*m. float GetMotorTorque(float inv_dt) const; /// Dump to b2Log. void Dump() override; /// void Draw(b2Draw* draw) const override; protected: friend class b2Joint; friend class b2GearJoint; b2RevoluteJoint(const b2RevoluteJointDef* def); void InitVelocityConstraints(const b2SolverData& data) override; void SolveVelocityConstraints(const b2SolverData& data) override; bool SolvePositionConstraints(const b2SolverData& data) override; // Solver shared b2Vec2 m_localAnchorA; b2Vec2 m_localAnchorB; b2Vec2 m_impulse; float m_motorImpulse; float m_lowerImpulse; float m_upperImpulse; bool m_enableMotor; float m_maxMotorTorque; float m_motorSpeed; bool m_enableLimit; float m_referenceAngle; float m_lowerAngle; float m_upperAngle; // Solver temp int32 m_indexA; int32 m_indexB; b2Vec2 m_rA; b2Vec2 m_rB; b2Vec2 m_localCenterA; b2Vec2 m_localCenterB; float m_invMassA; float m_invMassB; float m_invIA; float m_invIB; b2Mat22 m_K; float m_angle; float m_axialMass; }; inline float b2RevoluteJoint::GetMotorSpeed() const { return m_motorSpeed; } #endif ================================================ FILE: src/libraries/box2d/b2_rope.h ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #ifndef B2_ROPE_H #define B2_ROPE_H #include "b2_api.h" #include "b2_math.h" class b2Draw; struct b2RopeStretch; struct b2RopeBend; enum b2StretchingModel { b2_pbdStretchingModel, b2_xpbdStretchingModel }; enum b2BendingModel { b2_springAngleBendingModel = 0, b2_pbdAngleBendingModel, b2_xpbdAngleBendingModel, b2_pbdDistanceBendingModel, b2_pbdHeightBendingModel, b2_pbdTriangleBendingModel }; /// struct B2_API b2RopeTuning { b2RopeTuning() { stretchingModel = b2_pbdStretchingModel; bendingModel = b2_pbdAngleBendingModel; damping = 0.0f; stretchStiffness = 1.0f; bendStiffness = 0.5f; bendHertz = 1.0f; bendDamping = 0.0f; isometric = false; fixedEffectiveMass = false; warmStart = false; } b2StretchingModel stretchingModel; b2BendingModel bendingModel; float damping; float stretchStiffness; float stretchHertz; float stretchDamping; float bendStiffness; float bendHertz; float bendDamping; bool isometric; bool fixedEffectiveMass; bool warmStart; }; /// struct B2_API b2RopeDef { b2RopeDef() { position.SetZero(); vertices = nullptr; count = 0; masses = nullptr; gravity.SetZero(); } b2Vec2 position; b2Vec2* vertices; int32 count; float* masses; b2Vec2 gravity; b2RopeTuning tuning; }; /// class B2_API b2Rope { public: b2Rope(); ~b2Rope(); /// void Create(const b2RopeDef& def); /// void SetTuning(const b2RopeTuning& tuning); /// void Step(float timeStep, int32 iterations, const b2Vec2& position); /// void Reset(const b2Vec2& position); /// void Draw(b2Draw* draw) const; private: void SolveStretch_PBD(); void SolveStretch_XPBD(float dt); void SolveBend_PBD_Angle(); void SolveBend_XPBD_Angle(float dt); void SolveBend_PBD_Distance(); void SolveBend_PBD_Height(); void SolveBend_PBD_Triangle(); void ApplyBendForces(float dt); b2Vec2 m_position; int32 m_count; int32 m_stretchCount; int32 m_bendCount; b2RopeStretch* m_stretchConstraints; b2RopeBend* m_bendConstraints; b2Vec2* m_bindPositions; b2Vec2* m_ps; b2Vec2* m_p0s; b2Vec2* m_vs; float* m_invMasses; b2Vec2 m_gravity; b2RopeTuning m_tuning; }; #endif ================================================ FILE: src/libraries/box2d/b2_settings.h ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #ifndef B2_SETTINGS_H #define B2_SETTINGS_H #include "b2_types.h" #include "b2_api.h" /// @file /// Settings that can be overriden for your application /// /// Define this macro in your build if you want to override settings #ifdef B2_USER_SETTINGS /// This is a user file that includes custom definitions of the macros, structs, and functions /// defined below. #include "b2_user_settings.h" #else #include #include // Tunable Constants /// You can use this to change the length scale used by your game. /// For example for inches you could use 39.4. #define b2_lengthUnitsPerMeter 1.0f /// The maximum number of vertices on a convex polygon. You cannot increase /// this too much because b2BlockAllocator has a maximum object size. #define b2_maxPolygonVertices 8 // User data /// You can define this to inject whatever data you want in b2Body struct B2_API b2BodyUserData { b2BodyUserData() { pointer = 0; } /// For legacy compatibility uintptr_t pointer; }; /// You can define this to inject whatever data you want in b2Fixture struct B2_API b2FixtureUserData { b2FixtureUserData() { pointer = 0; } /// For legacy compatibility uintptr_t pointer; }; /// You can define this to inject whatever data you want in b2Joint struct B2_API b2JointUserData { b2JointUserData() { pointer = 0; } /// For legacy compatibility uintptr_t pointer; }; // Memory Allocation /// Default allocation functions B2_API void* b2Alloc_Default(int32 size); B2_API void b2Free_Default(void* mem); /// Implement this function to use your own memory allocator. inline void* b2Alloc(int32 size) { return b2Alloc_Default(size); } /// If you implement b2Alloc, you should also implement this function. inline void b2Free(void* mem) { b2Free_Default(mem); } /// Default logging function B2_API void b2Log_Default(const char* string, va_list args); /// Implement this to use your own logging. inline void b2Log(const char* string, ...) { va_list args; va_start(args, string); b2Log_Default(string, args); va_end(args); } #endif // B2_USER_SETTINGS #include "b2_common.h" #endif ================================================ FILE: src/libraries/box2d/b2_shape.h ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #ifndef B2_SHAPE_H #define B2_SHAPE_H #include "b2_api.h" #include "b2_math.h" #include "b2_collision.h" class b2BlockAllocator; /// This holds the mass data computed for a shape. struct B2_API b2MassData { /// The mass of the shape, usually in kilograms. float mass; /// The position of the shape's centroid relative to the shape's origin. b2Vec2 center; /// The rotational inertia of the shape about the local origin. float I; }; /// A shape is used for collision detection. You can create a shape however you like. /// Shapes used for simulation in b2World are created automatically when a b2Fixture /// is created. Shapes may encapsulate a one or more child shapes. class B2_API b2Shape { public: enum Type { e_circle = 0, e_edge = 1, e_polygon = 2, e_chain = 3, e_typeCount = 4 }; virtual ~b2Shape() {} /// Clone the concrete shape using the provided allocator. virtual b2Shape* Clone(b2BlockAllocator* allocator) const = 0; /// Get the type of this shape. You can use this to down cast to the concrete shape. /// @return the shape type. Type GetType() const; /// Get the number of child primitives. virtual int32 GetChildCount() const = 0; /// Test a point for containment in this shape. This only works for convex shapes. /// @param xf the shape world transform. /// @param p a point in world coordinates. virtual bool TestPoint(const b2Transform& xf, const b2Vec2& p) const = 0; /// Cast a ray against a child shape. /// @param output the ray-cast results. /// @param input the ray-cast input parameters. /// @param transform the transform to be applied to the shape. /// @param childIndex the child shape index virtual bool RayCast(b2RayCastOutput* output, const b2RayCastInput& input, const b2Transform& transform, int32 childIndex) const = 0; /// Given a transform, compute the associated axis aligned bounding box for a child shape. /// @param aabb returns the axis aligned box. /// @param xf the world transform of the shape. /// @param childIndex the child shape virtual void ComputeAABB(b2AABB* aabb, const b2Transform& xf, int32 childIndex) const = 0; /// Compute the mass properties of this shape using its dimensions and density. /// The inertia tensor is computed about the local origin. /// @param massData returns the mass data for this shape. /// @param density the density in kilograms per meter squared. virtual void ComputeMass(b2MassData* massData, float density) const = 0; Type m_type; /// Radius of a shape. For polygonal shapes this must be b2_polygonRadius. There is no support for /// making rounded polygons. float m_radius; }; inline b2Shape::Type b2Shape::GetType() const { return m_type; } #endif ================================================ FILE: src/libraries/box2d/b2_stack_allocator.h ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #ifndef B2_STACK_ALLOCATOR_H #define B2_STACK_ALLOCATOR_H #include "b2_api.h" #include "b2_settings.h" const int32 b2_stackSize = 100 * 1024; // 100k const int32 b2_maxStackEntries = 32; struct B2_API b2StackEntry { char* data; int32 size; bool usedMalloc; }; // This is a stack allocator used for fast per step allocations. // You must nest allocate/free pairs. The code will assert // if you try to interleave multiple allocate/free pairs. class B2_API b2StackAllocator { public: b2StackAllocator(); ~b2StackAllocator(); void* Allocate(int32 size); void Free(void* p); int32 GetMaxAllocation() const; private: char m_data[b2_stackSize]; int32 m_index; int32 m_allocation; int32 m_maxAllocation; b2StackEntry m_entries[b2_maxStackEntries]; int32 m_entryCount; }; #endif ================================================ FILE: src/libraries/box2d/b2_time_of_impact.h ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #ifndef B2_TIME_OF_IMPACT_H #define B2_TIME_OF_IMPACT_H #include "b2_api.h" #include "b2_math.h" #include "b2_distance.h" /// Input parameters for b2TimeOfImpact struct B2_API b2TOIInput { b2DistanceProxy proxyA; b2DistanceProxy proxyB; b2Sweep sweepA; b2Sweep sweepB; float tMax; // defines sweep interval [0, tMax] }; /// Output parameters for b2TimeOfImpact. struct B2_API b2TOIOutput { enum State { e_unknown, e_failed, e_overlapped, e_touching, e_separated }; State state; float t; }; /// Compute the upper bound on time before two shapes penetrate. Time is represented as /// a fraction between [0,tMax]. This uses a swept separating axis and may miss some intermediate, /// non-tunneling collisions. If you change the time interval, you should call this function /// again. /// Note: use b2Distance to compute the contact point and normal at the time of impact. B2_API void b2TimeOfImpact(b2TOIOutput* output, const b2TOIInput* input); #endif ================================================ FILE: src/libraries/box2d/b2_time_step.h ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #ifndef B2_TIME_STEP_H #define B2_TIME_STEP_H #include "b2_api.h" #include "b2_math.h" /// Profiling data. Times are in milliseconds. struct B2_API b2Profile { float step; float collide; float solve; float solveInit; float solveVelocity; float solvePosition; float broadphase; float solveTOI; }; /// This is an internal structure. struct B2_API b2TimeStep { float dt; // time step float inv_dt; // inverse time step (0 if dt == 0). float dtRatio; // dt * inv_dt0 int32 velocityIterations; int32 positionIterations; bool warmStarting; }; /// This is an internal structure. struct B2_API b2Position { b2Vec2 c; float a; }; /// This is an internal structure. struct B2_API b2Velocity { b2Vec2 v; float w; }; /// Solver Data struct B2_API b2SolverData { b2TimeStep step; b2Position* positions; b2Velocity* velocities; }; #endif ================================================ FILE: src/libraries/box2d/b2_timer.h ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #ifndef B2_TIMER_H #define B2_TIMER_H #include "b2_api.h" #include "b2_settings.h" /// Timer for profiling. This has platform specific code and may /// not work on every platform. class B2_API b2Timer { public: /// Constructor b2Timer(); /// Reset the timer. void Reset(); /// Get the time since construction or the last reset. float GetMilliseconds() const; private: #if defined(_WIN32) double m_start; static double s_invFrequency; #elif defined(__linux__) || defined (__APPLE__) unsigned long long m_start_sec; unsigned long long m_start_usec; #endif }; #endif ================================================ FILE: src/libraries/box2d/b2_types.h ================================================ // MIT License // Copyright (c) 2020 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #ifndef B2_TYPES_H #define B2_TYPES_H typedef signed char int8; typedef signed short int16; typedef signed int int32; typedef unsigned char uint8; typedef unsigned short uint16; typedef unsigned int uint32; #endif ================================================ FILE: src/libraries/box2d/b2_weld_joint.h ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #ifndef B2_WELD_JOINT_H #define B2_WELD_JOINT_H #include "b2_api.h" #include "b2_joint.h" /// Weld joint definition. You need to specify local anchor points /// where they are attached and the relative body angle. The position /// of the anchor points is important for computing the reaction torque. struct B2_API b2WeldJointDef : public b2JointDef { b2WeldJointDef() { type = e_weldJoint; localAnchorA.Set(0.0f, 0.0f); localAnchorB.Set(0.0f, 0.0f); referenceAngle = 0.0f; stiffness = 0.0f; damping = 0.0f; } /// Initialize the bodies, anchors, reference angle, stiffness, and damping. /// @param bodyA the first body connected by this joint /// @param bodyB the second body connected by this joint /// @param anchor the point of connection in world coordinates void Initialize(b2Body* bodyA, b2Body* bodyB, const b2Vec2& anchor); /// The local anchor point relative to bodyA's origin. b2Vec2 localAnchorA; /// The local anchor point relative to bodyB's origin. b2Vec2 localAnchorB; /// The bodyB angle minus bodyA angle in the reference state (radians). float referenceAngle; /// The rotational stiffness in N*m /// Disable softness with a value of 0 float stiffness; /// The rotational damping in N*m*s float damping; }; /// A weld joint essentially glues two bodies together. A weld joint may /// distort somewhat because the island constraint solver is approximate. class B2_API b2WeldJoint : public b2Joint { public: b2Vec2 GetAnchorA() const override; b2Vec2 GetAnchorB() const override; b2Vec2 GetReactionForce(float inv_dt) const override; float GetReactionTorque(float inv_dt) const override; /// The local anchor point relative to bodyA's origin. const b2Vec2& GetLocalAnchorA() const { return m_localAnchorA; } /// The local anchor point relative to bodyB's origin. const b2Vec2& GetLocalAnchorB() const { return m_localAnchorB; } /// Get the reference angle. float GetReferenceAngle() const { return m_referenceAngle; } /// Set/get stiffness in N*m void SetStiffness(float hz) { m_stiffness = hz; } float GetStiffness() const { return m_stiffness; } /// Set/get damping in N*m*s void SetDamping(float damping) { m_damping = damping; } float GetDamping() const { return m_damping; } /// Dump to b2Log void Dump() override; protected: friend class b2Joint; b2WeldJoint(const b2WeldJointDef* def); void InitVelocityConstraints(const b2SolverData& data) override; void SolveVelocityConstraints(const b2SolverData& data) override; bool SolvePositionConstraints(const b2SolverData& data) override; float m_stiffness; float m_damping; float m_bias; // Solver shared b2Vec2 m_localAnchorA; b2Vec2 m_localAnchorB; float m_referenceAngle; float m_gamma; b2Vec3 m_impulse; // Solver temp int32 m_indexA; int32 m_indexB; b2Vec2 m_rA; b2Vec2 m_rB; b2Vec2 m_localCenterA; b2Vec2 m_localCenterB; float m_invMassA; float m_invMassB; float m_invIA; float m_invIB; b2Mat33 m_mass; }; #endif ================================================ FILE: src/libraries/box2d/b2_wheel_joint.h ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #ifndef B2_WHEEL_JOINT_H #define B2_WHEEL_JOINT_H #include "b2_api.h" #include "b2_joint.h" /// Wheel joint definition. This requires defining a line of /// motion using an axis and an anchor point. The definition uses local /// anchor points and a local axis so that the initial configuration /// can violate the constraint slightly. The joint translation is zero /// when the local anchor points coincide in world space. Using local /// anchors and a local axis helps when saving and loading a game. struct B2_API b2WheelJointDef : public b2JointDef { b2WheelJointDef() { type = e_wheelJoint; localAnchorA.SetZero(); localAnchorB.SetZero(); localAxisA.Set(1.0f, 0.0f); enableLimit = false; lowerTranslation = 0.0f; upperTranslation = 0.0f; enableMotor = false; maxMotorTorque = 0.0f; motorSpeed = 0.0f; stiffness = 0.0f; damping = 0.0f; } /// Initialize the bodies, anchors, axis, and reference angle using the world /// anchor and world axis. void Initialize(b2Body* bodyA, b2Body* bodyB, const b2Vec2& anchor, const b2Vec2& axis); /// The local anchor point relative to bodyA's origin. b2Vec2 localAnchorA; /// The local anchor point relative to bodyB's origin. b2Vec2 localAnchorB; /// The local translation axis in bodyA. b2Vec2 localAxisA; /// Enable/disable the joint limit. bool enableLimit; /// The lower translation limit, usually in meters. float lowerTranslation; /// The upper translation limit, usually in meters. float upperTranslation; /// Enable/disable the joint motor. bool enableMotor; /// The maximum motor torque, usually in N-m. float maxMotorTorque; /// The desired motor speed in radians per second. float motorSpeed; /// Suspension stiffness. Typically in units N/m. float stiffness; /// Suspension damping. Typically in units of N*s/m. float damping; }; /// A wheel joint. This joint provides two degrees of freedom: translation /// along an axis fixed in bodyA and rotation in the plane. In other words, it is a point to /// line constraint with a rotational motor and a linear spring/damper. The spring/damper is /// initialized upon creation. This joint is designed for vehicle suspensions. class B2_API b2WheelJoint : public b2Joint { public: b2Vec2 GetAnchorA() const override; b2Vec2 GetAnchorB() const override; b2Vec2 GetReactionForce(float inv_dt) const override; float GetReactionTorque(float inv_dt) const override; /// The local anchor point relative to bodyA's origin. const b2Vec2& GetLocalAnchorA() const { return m_localAnchorA; } /// The local anchor point relative to bodyB's origin. const b2Vec2& GetLocalAnchorB() const { return m_localAnchorB; } /// The local joint axis relative to bodyA. const b2Vec2& GetLocalAxisA() const { return m_localXAxisA; } /// Get the current joint translation, usually in meters. float GetJointTranslation() const; /// Get the current joint linear speed, usually in meters per second. float GetJointLinearSpeed() const; /// Get the current joint angle in radians. float GetJointAngle() const; /// Get the current joint angular speed in radians per second. float GetJointAngularSpeed() const; /// Is the joint limit enabled? bool IsLimitEnabled() const; /// Enable/disable the joint translation limit. void EnableLimit(bool flag); /// Get the lower joint translation limit, usually in meters. float GetLowerLimit() const; /// Get the upper joint translation limit, usually in meters. float GetUpperLimit() const; /// Set the joint translation limits, usually in meters. void SetLimits(float lower, float upper); /// Is the joint motor enabled? bool IsMotorEnabled() const; /// Enable/disable the joint motor. void EnableMotor(bool flag); /// Set the motor speed, usually in radians per second. void SetMotorSpeed(float speed); /// Get the motor speed, usually in radians per second. float GetMotorSpeed() const; /// Set/Get the maximum motor force, usually in N-m. void SetMaxMotorTorque(float torque); float GetMaxMotorTorque() const; /// Get the current motor torque given the inverse time step, usually in N-m. float GetMotorTorque(float inv_dt) const; /// Access spring stiffness void SetStiffness(float stiffness); float GetStiffness() const; /// Access damping void SetDamping(float damping); float GetDamping() const; /// Dump to b2Log void Dump() override; /// void Draw(b2Draw* draw) const override; protected: friend class b2Joint; b2WheelJoint(const b2WheelJointDef* def); void InitVelocityConstraints(const b2SolverData& data) override; void SolveVelocityConstraints(const b2SolverData& data) override; bool SolvePositionConstraints(const b2SolverData& data) override; b2Vec2 m_localAnchorA; b2Vec2 m_localAnchorB; b2Vec2 m_localXAxisA; b2Vec2 m_localYAxisA; float m_impulse; float m_motorImpulse; float m_springImpulse; float m_lowerImpulse; float m_upperImpulse; float m_translation; float m_lowerTranslation; float m_upperTranslation; float m_maxMotorTorque; float m_motorSpeed; bool m_enableLimit; bool m_enableMotor; float m_stiffness; float m_damping; // Solver temp int32 m_indexA; int32 m_indexB; b2Vec2 m_localCenterA; b2Vec2 m_localCenterB; float m_invMassA; float m_invMassB; float m_invIA; float m_invIB; b2Vec2 m_ax, m_ay; float m_sAx, m_sBx; float m_sAy, m_sBy; float m_mass; float m_motorMass; float m_axialMass; float m_springMass; float m_bias; float m_gamma; }; inline float b2WheelJoint::GetMotorSpeed() const { return m_motorSpeed; } inline float b2WheelJoint::GetMaxMotorTorque() const { return m_maxMotorTorque; } #endif ================================================ FILE: src/libraries/box2d/b2_world.h ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #ifndef B2_WORLD_H #define B2_WORLD_H #include "b2_api.h" #include "b2_block_allocator.h" #include "b2_contact_manager.h" #include "b2_math.h" #include "b2_stack_allocator.h" #include "b2_time_step.h" #include "b2_world_callbacks.h" struct b2AABB; struct b2BodyDef; struct b2Color; struct b2JointDef; class b2Body; class b2Draw; class b2Fixture; class b2Joint; /// The world class manages all physics entities, dynamic simulation, /// and asynchronous queries. The world also contains efficient memory /// management facilities. class B2_API b2World { public: /// Construct a world object. /// @param gravity the world gravity vector. b2World(const b2Vec2& gravity); /// Destruct the world. All physics entities are destroyed and all heap memory is released. ~b2World(); /// Register a destruction listener. The listener is owned by you and must /// remain in scope. void SetDestructionListener(b2DestructionListener* listener); /// Register a contact filter to provide specific control over collision. /// Otherwise the default filter is used (b2_defaultFilter). The listener is /// owned by you and must remain in scope. void SetContactFilter(b2ContactFilter* filter); /// Register a contact event listener. The listener is owned by you and must /// remain in scope. void SetContactListener(b2ContactListener* listener); /// Register a routine for debug drawing. The debug draw functions are called /// inside with b2World::DebugDraw method. The debug draw object is owned /// by you and must remain in scope. void SetDebugDraw(b2Draw* debugDraw); /// Create a rigid body given a definition. No reference to the definition /// is retained. /// @warning This function is locked during callbacks. b2Body* CreateBody(const b2BodyDef* def); /// Destroy a rigid body given a definition. No reference to the definition /// is retained. This function is locked during callbacks. /// @warning This automatically deletes all associated shapes and joints. /// @warning This function is locked during callbacks. void DestroyBody(b2Body* body); /// Create a joint to constrain bodies together. No reference to the definition /// is retained. This may cause the connected bodies to cease colliding. /// @warning This function is locked during callbacks. b2Joint* CreateJoint(const b2JointDef* def); /// Destroy a joint. This may cause the connected bodies to begin colliding. /// @warning This function is locked during callbacks. void DestroyJoint(b2Joint* joint); /// Take a time step. This performs collision detection, integration, /// and constraint solution. /// @param timeStep the amount of time to simulate, this should not vary. /// @param velocityIterations for the velocity constraint solver. /// @param positionIterations for the position constraint solver. void Step( float timeStep, int32 velocityIterations, int32 positionIterations); /// Manually clear the force buffer on all bodies. By default, forces are cleared automatically /// after each call to Step. The default behavior is modified by calling SetAutoClearForces. /// The purpose of this function is to support sub-stepping. Sub-stepping is often used to maintain /// a fixed sized time step under a variable frame-rate. /// When you perform sub-stepping you will disable auto clearing of forces and instead call /// ClearForces after all sub-steps are complete in one pass of your game loop. /// @see SetAutoClearForces void ClearForces(); /// Call this to draw shapes and other debug draw data. This is intentionally non-const. void DebugDraw(); /// Query the world for all fixtures that potentially overlap the /// provided AABB. /// @param callback a user implemented callback class. /// @param aabb the query box. void QueryAABB(b2QueryCallback* callback, const b2AABB& aabb) const; /// Ray-cast the world for all fixtures in the path of the ray. Your callback /// controls whether you get the closest point, any point, or n-points. /// The ray-cast ignores shapes that contain the starting point. /// @param callback a user implemented callback class. /// @param point1 the ray starting point /// @param point2 the ray ending point void RayCast(b2RayCastCallback* callback, const b2Vec2& point1, const b2Vec2& point2) const; /// Get the world body list. With the returned body, use b2Body::GetNext to get /// the next body in the world list. A nullptr body indicates the end of the list. /// @return the head of the world body list. b2Body* GetBodyList(); const b2Body* GetBodyList() const; /// Get the world joint list. With the returned joint, use b2Joint::GetNext to get /// the next joint in the world list. A nullptr joint indicates the end of the list. /// @return the head of the world joint list. b2Joint* GetJointList(); const b2Joint* GetJointList() const; /// Get the world contact list. With the returned contact, use b2Contact::GetNext to get /// the next contact in the world list. A nullptr contact indicates the end of the list. /// @return the head of the world contact list. /// @warning contacts are created and destroyed in the middle of a time step. /// Use b2ContactListener to avoid missing contacts. b2Contact* GetContactList(); const b2Contact* GetContactList() const; /// Enable/disable sleep. void SetAllowSleeping(bool flag); bool GetAllowSleeping() const { return m_allowSleep; } /// Enable/disable warm starting. For testing. void SetWarmStarting(bool flag) { m_warmStarting = flag; } bool GetWarmStarting() const { return m_warmStarting; } /// Enable/disable continuous physics. For testing. void SetContinuousPhysics(bool flag) { m_continuousPhysics = flag; } bool GetContinuousPhysics() const { return m_continuousPhysics; } /// Enable/disable single stepped continuous physics. For testing. void SetSubStepping(bool flag) { m_subStepping = flag; } bool GetSubStepping() const { return m_subStepping; } /// Get the number of broad-phase proxies. int32 GetProxyCount() const; /// Get the number of bodies. int32 GetBodyCount() const; /// Get the number of joints. int32 GetJointCount() const; /// Get the number of contacts (each may have 0 or more contact points). int32 GetContactCount() const; /// Get the height of the dynamic tree. int32 GetTreeHeight() const; /// Get the balance of the dynamic tree. int32 GetTreeBalance() const; /// Get the quality metric of the dynamic tree. The smaller the better. /// The minimum is 1. float GetTreeQuality() const; /// Change the global gravity vector. void SetGravity(const b2Vec2& gravity); /// Get the global gravity vector. b2Vec2 GetGravity() const; /// Is the world locked (in the middle of a time step). bool IsLocked() const; /// Set flag to control automatic clearing of forces after each time step. void SetAutoClearForces(bool flag); /// Get the flag that controls automatic clearing of forces after each time step. bool GetAutoClearForces() const; /// Shift the world origin. Useful for large worlds. /// The body shift formula is: position -= newOrigin /// @param newOrigin the new origin with respect to the old origin void ShiftOrigin(const b2Vec2& newOrigin); /// Get the contact manager for testing. const b2ContactManager& GetContactManager() const; /// Get the current profile. const b2Profile& GetProfile() const; /// Dump the world into the log file. /// @warning this should be called outside of a time step. void Dump(); private: friend class b2Body; friend class b2Fixture; friend class b2ContactManager; friend class b2Controller; void Solve(const b2TimeStep& step); void SolveTOI(const b2TimeStep& step); void DrawShape(b2Fixture* shape, const b2Transform& xf, const b2Color& color); b2BlockAllocator m_blockAllocator; b2StackAllocator m_stackAllocator; b2ContactManager m_contactManager; b2Body* m_bodyList; b2Joint* m_jointList; int32 m_bodyCount; int32 m_jointCount; b2Vec2 m_gravity; bool m_allowSleep; b2DestructionListener* m_destructionListener; b2Draw* m_debugDraw; // This is used to compute the time step ratio to // support a variable time step. float m_inv_dt0; bool m_newContacts; bool m_locked; bool m_clearForces; // These are for debugging the solver. bool m_warmStarting; bool m_continuousPhysics; bool m_subStepping; bool m_stepComplete; b2Profile m_profile; }; inline b2Body* b2World::GetBodyList() { return m_bodyList; } inline const b2Body* b2World::GetBodyList() const { return m_bodyList; } inline b2Joint* b2World::GetJointList() { return m_jointList; } inline const b2Joint* b2World::GetJointList() const { return m_jointList; } inline b2Contact* b2World::GetContactList() { return m_contactManager.m_contactList; } inline const b2Contact* b2World::GetContactList() const { return m_contactManager.m_contactList; } inline int32 b2World::GetBodyCount() const { return m_bodyCount; } inline int32 b2World::GetJointCount() const { return m_jointCount; } inline int32 b2World::GetContactCount() const { return m_contactManager.m_contactCount; } inline void b2World::SetGravity(const b2Vec2& gravity) { m_gravity = gravity; } inline b2Vec2 b2World::GetGravity() const { return m_gravity; } inline bool b2World::IsLocked() const { return m_locked; } inline void b2World::SetAutoClearForces(bool flag) { m_clearForces = flag; } /// Get the flag that controls automatic clearing of forces after each time step. inline bool b2World::GetAutoClearForces() const { return m_clearForces; } inline const b2ContactManager& b2World::GetContactManager() const { return m_contactManager; } inline const b2Profile& b2World::GetProfile() const { return m_profile; } #endif ================================================ FILE: src/libraries/box2d/b2_world_callbacks.h ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #ifndef B2_WORLD_CALLBACKS_H #define B2_WORLD_CALLBACKS_H #include "b2_api.h" #include "b2_settings.h" struct b2Vec2; struct b2Transform; class b2Fixture; class b2Body; class b2Joint; class b2Contact; struct b2ContactResult; struct b2Manifold; /// Joints and fixtures are destroyed when their associated /// body is destroyed. Implement this listener so that you /// may nullify references to these joints and shapes. class B2_API b2DestructionListener { public: virtual ~b2DestructionListener() {} /// Called when any joint is about to be destroyed due /// to the destruction of one of its attached bodies. virtual void SayGoodbye(b2Joint* joint) = 0; /// Called when any fixture is about to be destroyed due /// to the destruction of its parent body. virtual void SayGoodbye(b2Fixture* fixture) = 0; }; /// Implement this class to provide collision filtering. In other words, you can implement /// this class if you want finer control over contact creation. class B2_API b2ContactFilter { public: virtual ~b2ContactFilter() {} /// Return true if contact calculations should be performed between these two shapes. /// @warning for performance reasons this is only called when the AABBs begin to overlap. virtual bool ShouldCollide(b2Fixture* fixtureA, b2Fixture* fixtureB); }; /// Contact impulses for reporting. Impulses are used instead of forces because /// sub-step forces may approach infinity for rigid body collisions. These /// match up one-to-one with the contact points in b2Manifold. struct B2_API b2ContactImpulse { float normalImpulses[b2_maxManifoldPoints]; float tangentImpulses[b2_maxManifoldPoints]; int32 count; }; /// Implement this class to get contact information. You can use these results for /// things like sounds and game logic. You can also get contact results by /// traversing the contact lists after the time step. However, you might miss /// some contacts because continuous physics leads to sub-stepping. /// Additionally you may receive multiple callbacks for the same contact in a /// single time step. /// You should strive to make your callbacks efficient because there may be /// many callbacks per time step. /// @warning You cannot create/destroy Box2D entities inside these callbacks. class B2_API b2ContactListener { public: virtual ~b2ContactListener() {} /// Called when two fixtures begin to touch. virtual void BeginContact(b2Contact* contact) { B2_NOT_USED(contact); } /// Called when two fixtures cease to touch. virtual void EndContact(b2Contact* contact) { B2_NOT_USED(contact); } /// This is called after a contact is updated. This allows you to inspect a /// contact before it goes to the solver. If you are careful, you can modify the /// contact manifold (e.g. disable contact). /// A copy of the old manifold is provided so that you can detect changes. /// Note: this is called only for awake bodies. /// Note: this is called even when the number of contact points is zero. /// Note: this is not called for sensors. /// Note: if you set the number of contact points to zero, you will not /// get an EndContact callback. However, you may get a BeginContact callback /// the next step. virtual void PreSolve(b2Contact* contact, const b2Manifold* oldManifold) { B2_NOT_USED(contact); B2_NOT_USED(oldManifold); } /// This lets you inspect a contact after the solver is finished. This is useful /// for inspecting impulses. /// Note: the contact manifold does not include time of impact impulses, which can be /// arbitrarily large if the sub-step is small. Hence the impulse is provided explicitly /// in a separate data structure. /// Note: this is only called for contacts that are touching, solid, and awake. virtual void PostSolve(b2Contact* contact, const b2ContactImpulse* impulse) { B2_NOT_USED(contact); B2_NOT_USED(impulse); } }; /// Callback class for AABB queries. /// See b2World::Query class B2_API b2QueryCallback { public: virtual ~b2QueryCallback() {} /// Called for each fixture found in the query AABB. /// @return false to terminate the query. virtual bool ReportFixture(b2Fixture* fixture) = 0; }; /// Callback class for ray casts. /// See b2World::RayCast class B2_API b2RayCastCallback { public: virtual ~b2RayCastCallback() {} /// Called for each fixture found in the query. You control how the ray cast /// proceeds by returning a float: /// return -1: ignore this fixture and continue /// return 0: terminate the ray cast /// return fraction: clip the ray to this point /// return 1: don't clip the ray and continue /// @param fixture the fixture hit by the ray /// @param point the point of initial intersection /// @param normal the normal vector at the point of intersection /// @param fraction the fraction along the ray at the point of intersection /// @return -1 to filter, 0 to terminate, fraction to clip the ray for /// closest hit, 1 to continue virtual float ReportFixture( b2Fixture* fixture, const b2Vec2& point, const b2Vec2& normal, float fraction) = 0; }; #endif ================================================ FILE: src/libraries/box2d/collision/b2_broad_phase.cpp ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #include "box2d/b2_broad_phase.h" #include b2BroadPhase::b2BroadPhase() { m_proxyCount = 0; m_pairCapacity = 16; m_pairCount = 0; m_pairBuffer = (b2Pair*)b2Alloc(m_pairCapacity * sizeof(b2Pair)); m_moveCapacity = 16; m_moveCount = 0; m_moveBuffer = (int32*)b2Alloc(m_moveCapacity * sizeof(int32)); } b2BroadPhase::~b2BroadPhase() { b2Free(m_moveBuffer); b2Free(m_pairBuffer); } int32 b2BroadPhase::CreateProxy(const b2AABB& aabb, void* userData) { int32 proxyId = m_tree.CreateProxy(aabb, userData); ++m_proxyCount; BufferMove(proxyId); return proxyId; } void b2BroadPhase::DestroyProxy(int32 proxyId) { UnBufferMove(proxyId); --m_proxyCount; m_tree.DestroyProxy(proxyId); } void b2BroadPhase::MoveProxy(int32 proxyId, const b2AABB& aabb, const b2Vec2& displacement) { bool buffer = m_tree.MoveProxy(proxyId, aabb, displacement); if (buffer) { BufferMove(proxyId); } } void b2BroadPhase::TouchProxy(int32 proxyId) { BufferMove(proxyId); } void b2BroadPhase::BufferMove(int32 proxyId) { if (m_moveCount == m_moveCapacity) { int32* oldBuffer = m_moveBuffer; m_moveCapacity *= 2; m_moveBuffer = (int32*)b2Alloc(m_moveCapacity * sizeof(int32)); memcpy(m_moveBuffer, oldBuffer, m_moveCount * sizeof(int32)); b2Free(oldBuffer); } m_moveBuffer[m_moveCount] = proxyId; ++m_moveCount; } void b2BroadPhase::UnBufferMove(int32 proxyId) { for (int32 i = 0; i < m_moveCount; ++i) { if (m_moveBuffer[i] == proxyId) { m_moveBuffer[i] = e_nullProxy; } } } // This is called from b2DynamicTree::Query when we are gathering pairs. bool b2BroadPhase::QueryCallback(int32 proxyId) { // A proxy cannot form a pair with itself. if (proxyId == m_queryProxyId) { return true; } const bool moved = m_tree.WasMoved(proxyId); if (moved && proxyId > m_queryProxyId) { // Both proxies are moving. Avoid duplicate pairs. return true; } // Grow the pair buffer as needed. if (m_pairCount == m_pairCapacity) { b2Pair* oldBuffer = m_pairBuffer; m_pairCapacity = m_pairCapacity + (m_pairCapacity >> 1); m_pairBuffer = (b2Pair*)b2Alloc(m_pairCapacity * sizeof(b2Pair)); memcpy(m_pairBuffer, oldBuffer, m_pairCount * sizeof(b2Pair)); b2Free(oldBuffer); } m_pairBuffer[m_pairCount].proxyIdA = b2Min(proxyId, m_queryProxyId); m_pairBuffer[m_pairCount].proxyIdB = b2Max(proxyId, m_queryProxyId); ++m_pairCount; return true; } ================================================ FILE: src/libraries/box2d/collision/b2_chain_shape.cpp ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #include "box2d/b2_chain_shape.h" #include "box2d/b2_edge_shape.h" #include "box2d/b2_block_allocator.h" #include #include b2ChainShape::~b2ChainShape() { Clear(); } void b2ChainShape::Clear() { b2Free(m_vertices); m_vertices = nullptr; m_count = 0; } void b2ChainShape::CreateLoop(const b2Vec2* vertices, int32 count) { b2Assert(m_vertices == nullptr && m_count == 0); b2Assert(count >= 3); if (count < 3) { return; } for (int32 i = 1; i < count; ++i) { b2Vec2 v1 = vertices[i-1]; b2Vec2 v2 = vertices[i]; // If the code crashes here, it means your vertices are too close together. b2Assert(b2DistanceSquared(v1, v2) > b2_linearSlop * b2_linearSlop); } m_count = count + 1; m_vertices = (b2Vec2*)b2Alloc(m_count * sizeof(b2Vec2)); memcpy(m_vertices, vertices, count * sizeof(b2Vec2)); m_vertices[count] = m_vertices[0]; m_prevVertex = m_vertices[m_count - 2]; m_nextVertex = m_vertices[1]; } void b2ChainShape::CreateChain(const b2Vec2* vertices, int32 count, const b2Vec2& prevVertex, const b2Vec2& nextVertex) { b2Assert(m_vertices == nullptr && m_count == 0); b2Assert(count >= 2); for (int32 i = 1; i < count; ++i) { // If the code crashes here, it means your vertices are too close together. b2Assert(b2DistanceSquared(vertices[i-1], vertices[i]) > b2_linearSlop * b2_linearSlop); } m_count = count; m_vertices = (b2Vec2*)b2Alloc(count * sizeof(b2Vec2)); memcpy(m_vertices, vertices, m_count * sizeof(b2Vec2)); m_prevVertex = prevVertex; m_nextVertex = nextVertex; } b2Shape* b2ChainShape::Clone(b2BlockAllocator* allocator) const { void* mem = allocator->Allocate(sizeof(b2ChainShape)); b2ChainShape* clone = new (mem) b2ChainShape; clone->CreateChain(m_vertices, m_count, m_prevVertex, m_nextVertex); return clone; } int32 b2ChainShape::GetChildCount() const { // edge count = vertex count - 1 return m_count - 1; } void b2ChainShape::GetChildEdge(b2EdgeShape* edge, int32 index) const { b2Assert(0 <= index && index < m_count - 1); edge->m_type = b2Shape::e_edge; edge->m_radius = m_radius; edge->m_vertex1 = m_vertices[index + 0]; edge->m_vertex2 = m_vertices[index + 1]; edge->m_oneSided = true; if (index > 0) { edge->m_vertex0 = m_vertices[index - 1]; } else { edge->m_vertex0 = m_prevVertex; } if (index < m_count - 2) { edge->m_vertex3 = m_vertices[index + 2]; } else { edge->m_vertex3 = m_nextVertex; } } bool b2ChainShape::TestPoint(const b2Transform& xf, const b2Vec2& p) const { B2_NOT_USED(xf); B2_NOT_USED(p); return false; } bool b2ChainShape::RayCast(b2RayCastOutput* output, const b2RayCastInput& input, const b2Transform& xf, int32 childIndex) const { b2Assert(childIndex < m_count); b2EdgeShape edgeShape; int32 i1 = childIndex; int32 i2 = childIndex + 1; if (i2 == m_count) { i2 = 0; } edgeShape.m_vertex1 = m_vertices[i1]; edgeShape.m_vertex2 = m_vertices[i2]; return edgeShape.RayCast(output, input, xf, 0); } void b2ChainShape::ComputeAABB(b2AABB* aabb, const b2Transform& xf, int32 childIndex) const { b2Assert(childIndex < m_count); int32 i1 = childIndex; int32 i2 = childIndex + 1; if (i2 == m_count) { i2 = 0; } b2Vec2 v1 = b2Mul(xf, m_vertices[i1]); b2Vec2 v2 = b2Mul(xf, m_vertices[i2]); b2Vec2 lower = b2Min(v1, v2); b2Vec2 upper = b2Max(v1, v2); b2Vec2 r(m_radius, m_radius); aabb->lowerBound = lower - r; aabb->upperBound = upper + r; } void b2ChainShape::ComputeMass(b2MassData* massData, float density) const { B2_NOT_USED(density); massData->mass = 0.0f; massData->center.SetZero(); massData->I = 0.0f; } ================================================ FILE: src/libraries/box2d/collision/b2_circle_shape.cpp ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #include "box2d/b2_circle_shape.h" #include "box2d/b2_block_allocator.h" #include b2Shape* b2CircleShape::Clone(b2BlockAllocator* allocator) const { void* mem = allocator->Allocate(sizeof(b2CircleShape)); b2CircleShape* clone = new (mem) b2CircleShape; *clone = *this; return clone; } int32 b2CircleShape::GetChildCount() const { return 1; } bool b2CircleShape::TestPoint(const b2Transform& transform, const b2Vec2& p) const { b2Vec2 center = transform.p + b2Mul(transform.q, m_p); b2Vec2 d = p - center; return b2Dot(d, d) <= m_radius * m_radius; } // Collision Detection in Interactive 3D Environments by Gino van den Bergen // From Section 3.1.2 // x = s + a * r // norm(x) = radius bool b2CircleShape::RayCast(b2RayCastOutput* output, const b2RayCastInput& input, const b2Transform& transform, int32 childIndex) const { B2_NOT_USED(childIndex); b2Vec2 position = transform.p + b2Mul(transform.q, m_p); b2Vec2 s = input.p1 - position; float b = b2Dot(s, s) - m_radius * m_radius; // Solve quadratic equation. b2Vec2 r = input.p2 - input.p1; float c = b2Dot(s, r); float rr = b2Dot(r, r); float sigma = c * c - rr * b; // Check for negative discriminant and short segment. if (sigma < 0.0f || rr < b2_epsilon) { return false; } // Find the point of intersection of the line with the circle. float a = -(c + b2Sqrt(sigma)); // Is the intersection point on the segment? if (0.0f <= a && a <= input.maxFraction * rr) { a /= rr; output->fraction = a; output->normal = s + a * r; output->normal.Normalize(); return true; } return false; } void b2CircleShape::ComputeAABB(b2AABB* aabb, const b2Transform& transform, int32 childIndex) const { B2_NOT_USED(childIndex); b2Vec2 p = transform.p + b2Mul(transform.q, m_p); aabb->lowerBound.Set(p.x - m_radius, p.y - m_radius); aabb->upperBound.Set(p.x + m_radius, p.y + m_radius); } void b2CircleShape::ComputeMass(b2MassData* massData, float density) const { massData->mass = density * b2_pi * m_radius * m_radius; massData->center = m_p; // inertia about the local origin massData->I = massData->mass * (0.5f * m_radius * m_radius + b2Dot(m_p, m_p)); } ================================================ FILE: src/libraries/box2d/collision/b2_collide_circle.cpp ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #include "box2d/b2_collision.h" #include "box2d/b2_circle_shape.h" #include "box2d/b2_polygon_shape.h" void b2CollideCircles( b2Manifold* manifold, const b2CircleShape* circleA, const b2Transform& xfA, const b2CircleShape* circleB, const b2Transform& xfB) { manifold->pointCount = 0; b2Vec2 pA = b2Mul(xfA, circleA->m_p); b2Vec2 pB = b2Mul(xfB, circleB->m_p); b2Vec2 d = pB - pA; float distSqr = b2Dot(d, d); float rA = circleA->m_radius, rB = circleB->m_radius; float radius = rA + rB; if (distSqr > radius * radius) { return; } manifold->type = b2Manifold::e_circles; manifold->localPoint = circleA->m_p; manifold->localNormal.SetZero(); manifold->pointCount = 1; manifold->points[0].localPoint = circleB->m_p; manifold->points[0].id.key = 0; } void b2CollidePolygonAndCircle( b2Manifold* manifold, const b2PolygonShape* polygonA, const b2Transform& xfA, const b2CircleShape* circleB, const b2Transform& xfB) { manifold->pointCount = 0; // Compute circle position in the frame of the polygon. b2Vec2 c = b2Mul(xfB, circleB->m_p); b2Vec2 cLocal = b2MulT(xfA, c); // Find the min separating edge. int32 normalIndex = 0; float separation = -b2_maxFloat; float radius = polygonA->m_radius + circleB->m_radius; int32 vertexCount = polygonA->m_count; const b2Vec2* vertices = polygonA->m_vertices; const b2Vec2* normals = polygonA->m_normals; for (int32 i = 0; i < vertexCount; ++i) { float s = b2Dot(normals[i], cLocal - vertices[i]); if (s > radius) { // Early out. return; } if (s > separation) { separation = s; normalIndex = i; } } // Vertices that subtend the incident face. int32 vertIndex1 = normalIndex; int32 vertIndex2 = vertIndex1 + 1 < vertexCount ? vertIndex1 + 1 : 0; b2Vec2 v1 = vertices[vertIndex1]; b2Vec2 v2 = vertices[vertIndex2]; // If the center is inside the polygon ... if (separation < b2_epsilon) { manifold->pointCount = 1; manifold->type = b2Manifold::e_faceA; manifold->localNormal = normals[normalIndex]; manifold->localPoint = 0.5f * (v1 + v2); manifold->points[0].localPoint = circleB->m_p; manifold->points[0].id.key = 0; return; } // Compute barycentric coordinates float u1 = b2Dot(cLocal - v1, v2 - v1); float u2 = b2Dot(cLocal - v2, v1 - v2); if (u1 <= 0.0f) { if (b2DistanceSquared(cLocal, v1) > radius * radius) { return; } manifold->pointCount = 1; manifold->type = b2Manifold::e_faceA; manifold->localNormal = cLocal - v1; manifold->localNormal.Normalize(); manifold->localPoint = v1; manifold->points[0].localPoint = circleB->m_p; manifold->points[0].id.key = 0; } else if (u2 <= 0.0f) { if (b2DistanceSquared(cLocal, v2) > radius * radius) { return; } manifold->pointCount = 1; manifold->type = b2Manifold::e_faceA; manifold->localNormal = cLocal - v2; manifold->localNormal.Normalize(); manifold->localPoint = v2; manifold->points[0].localPoint = circleB->m_p; manifold->points[0].id.key = 0; } else { b2Vec2 faceCenter = 0.5f * (v1 + v2); float s = b2Dot(cLocal - faceCenter, normals[vertIndex1]); if (s > radius) { return; } manifold->pointCount = 1; manifold->type = b2Manifold::e_faceA; manifold->localNormal = normals[vertIndex1]; manifold->localPoint = faceCenter; manifold->points[0].localPoint = circleB->m_p; manifold->points[0].id.key = 0; } } ================================================ FILE: src/libraries/box2d/collision/b2_collide_edge.cpp ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #include "box2d/b2_collision.h" #include "box2d/b2_circle_shape.h" #include "box2d/b2_edge_shape.h" #include "box2d/b2_polygon_shape.h" // Compute contact points for edge versus circle. // This accounts for edge connectivity. void b2CollideEdgeAndCircle(b2Manifold* manifold, const b2EdgeShape* edgeA, const b2Transform& xfA, const b2CircleShape* circleB, const b2Transform& xfB) { manifold->pointCount = 0; // Compute circle in frame of edge b2Vec2 Q = b2MulT(xfA, b2Mul(xfB, circleB->m_p)); b2Vec2 A = edgeA->m_vertex1, B = edgeA->m_vertex2; b2Vec2 e = B - A; // Normal points to the right for a CCW winding b2Vec2 n(e.y, -e.x); float offset = b2Dot(n, Q - A); bool oneSided = edgeA->m_oneSided; if (oneSided && offset < 0.0f) { return; } // Barycentric coordinates float u = b2Dot(e, B - Q); float v = b2Dot(e, Q - A); float radius = edgeA->m_radius + circleB->m_radius; b2ContactFeature cf; cf.indexB = 0; cf.typeB = b2ContactFeature::e_vertex; // Region A if (v <= 0.0f) { b2Vec2 P = A; b2Vec2 d = Q - P; float dd = b2Dot(d, d); if (dd > radius * radius) { return; } // Is there an edge connected to A? if (edgeA->m_oneSided) { b2Vec2 A1 = edgeA->m_vertex0; b2Vec2 B1 = A; b2Vec2 e1 = B1 - A1; float u1 = b2Dot(e1, B1 - Q); // Is the circle in Region AB of the previous edge? if (u1 > 0.0f) { return; } } cf.indexA = 0; cf.typeA = b2ContactFeature::e_vertex; manifold->pointCount = 1; manifold->type = b2Manifold::e_circles; manifold->localNormal.SetZero(); manifold->localPoint = P; manifold->points[0].id.key = 0; manifold->points[0].id.cf = cf; manifold->points[0].localPoint = circleB->m_p; return; } // Region B if (u <= 0.0f) { b2Vec2 P = B; b2Vec2 d = Q - P; float dd = b2Dot(d, d); if (dd > radius * radius) { return; } // Is there an edge connected to B? if (edgeA->m_oneSided) { b2Vec2 B2 = edgeA->m_vertex3; b2Vec2 A2 = B; b2Vec2 e2 = B2 - A2; float v2 = b2Dot(e2, Q - A2); // Is the circle in Region AB of the next edge? if (v2 > 0.0f) { return; } } cf.indexA = 1; cf.typeA = b2ContactFeature::e_vertex; manifold->pointCount = 1; manifold->type = b2Manifold::e_circles; manifold->localNormal.SetZero(); manifold->localPoint = P; manifold->points[0].id.key = 0; manifold->points[0].id.cf = cf; manifold->points[0].localPoint = circleB->m_p; return; } // Region AB float den = b2Dot(e, e); b2Assert(den > 0.0f); b2Vec2 P = (1.0f / den) * (u * A + v * B); b2Vec2 d = Q - P; float dd = b2Dot(d, d); if (dd > radius * radius) { return; } if (offset < 0.0f) { n.Set(-n.x, -n.y); } n.Normalize(); cf.indexA = 0; cf.typeA = b2ContactFeature::e_face; manifold->pointCount = 1; manifold->type = b2Manifold::e_faceA; manifold->localNormal = n; manifold->localPoint = A; manifold->points[0].id.key = 0; manifold->points[0].id.cf = cf; manifold->points[0].localPoint = circleB->m_p; } // This structure is used to keep track of the best separating axis. struct b2EPAxis { enum Type { e_unknown, e_edgeA, e_edgeB }; b2Vec2 normal; Type type; int32 index; float separation; }; // This holds polygon B expressed in frame A. struct b2TempPolygon { b2Vec2 vertices[b2_maxPolygonVertices]; b2Vec2 normals[b2_maxPolygonVertices]; int32 count; }; // Reference face used for clipping struct b2ReferenceFace { int32 i1, i2; b2Vec2 v1, v2; b2Vec2 normal; b2Vec2 sideNormal1; float sideOffset1; b2Vec2 sideNormal2; float sideOffset2; }; static b2EPAxis b2ComputeEdgeSeparation(const b2TempPolygon& polygonB, const b2Vec2& v1, const b2Vec2& normal1) { b2EPAxis axis; axis.type = b2EPAxis::e_edgeA; axis.index = -1; axis.separation = -FLT_MAX; axis.normal.SetZero(); b2Vec2 axes[2] = { normal1, -normal1 }; // Find axis with least overlap (min-max problem) for (int32 j = 0; j < 2; ++j) { float sj = FLT_MAX; // Find deepest polygon vertex along axis j for (int32 i = 0; i < polygonB.count; ++i) { float si = b2Dot(axes[j], polygonB.vertices[i] - v1); if (si < sj) { sj = si; } } if (sj > axis.separation) { axis.index = j; axis.separation = sj; axis.normal = axes[j]; } } return axis; } static b2EPAxis b2ComputePolygonSeparation(const b2TempPolygon& polygonB, const b2Vec2& v1, const b2Vec2& v2) { b2EPAxis axis; axis.type = b2EPAxis::e_unknown; axis.index = -1; axis.separation = -FLT_MAX; axis.normal.SetZero(); for (int32 i = 0; i < polygonB.count; ++i) { b2Vec2 n = -polygonB.normals[i]; float s1 = b2Dot(n, polygonB.vertices[i] - v1); float s2 = b2Dot(n, polygonB.vertices[i] - v2); float s = b2Min(s1, s2); if (s > axis.separation) { axis.type = b2EPAxis::e_edgeB; axis.index = i; axis.separation = s; axis.normal = n; } } return axis; } void b2CollideEdgeAndPolygon(b2Manifold* manifold, const b2EdgeShape* edgeA, const b2Transform& xfA, const b2PolygonShape* polygonB, const b2Transform& xfB) { manifold->pointCount = 0; b2Transform xf = b2MulT(xfA, xfB); b2Vec2 centroidB = b2Mul(xf, polygonB->m_centroid); b2Vec2 v1 = edgeA->m_vertex1; b2Vec2 v2 = edgeA->m_vertex2; b2Vec2 edge1 = v2 - v1; edge1.Normalize(); // Normal points to the right for a CCW winding b2Vec2 normal1(edge1.y, -edge1.x); float offset1 = b2Dot(normal1, centroidB - v1); bool oneSided = edgeA->m_oneSided; if (oneSided && offset1 < 0.0f) { return; } // Get polygonB in frameA b2TempPolygon tempPolygonB; tempPolygonB.count = polygonB->m_count; for (int32 i = 0; i < polygonB->m_count; ++i) { tempPolygonB.vertices[i] = b2Mul(xf, polygonB->m_vertices[i]); tempPolygonB.normals[i] = b2Mul(xf.q, polygonB->m_normals[i]); } float radius = polygonB->m_radius + edgeA->m_radius; b2EPAxis edgeAxis = b2ComputeEdgeSeparation(tempPolygonB, v1, normal1); if (edgeAxis.separation > radius) { return; } b2EPAxis polygonAxis = b2ComputePolygonSeparation(tempPolygonB, v1, v2); if (polygonAxis.separation > radius) { return; } // Use hysteresis for jitter reduction. const float k_relativeTol = 0.98f; const float k_absoluteTol = 0.001f; b2EPAxis primaryAxis; if (polygonAxis.separation - radius > k_relativeTol * (edgeAxis.separation - radius) + k_absoluteTol) { primaryAxis = polygonAxis; } else { primaryAxis = edgeAxis; } if (oneSided) { // Smooth collision // See https://box2d.org/posts/2020/06/ghost-collisions/ b2Vec2 edge0 = v1 - edgeA->m_vertex0; edge0.Normalize(); b2Vec2 normal0(edge0.y, -edge0.x); bool convex1 = b2Cross(edge0, edge1) >= 0.0f; b2Vec2 edge2 = edgeA->m_vertex3 - v2; edge2.Normalize(); b2Vec2 normal2(edge2.y, -edge2.x); bool convex2 = b2Cross(edge1, edge2) >= 0.0f; const float sinTol = 0.1f; bool side1 = b2Dot(primaryAxis.normal, edge1) <= 0.0f; // Check Gauss Map if (side1) { if (convex1) { if (b2Cross(primaryAxis.normal, normal0) > sinTol) { // Skip region return; } // Admit region } else { // Snap region primaryAxis = edgeAxis; } } else { if (convex2) { if (b2Cross(normal2, primaryAxis.normal) > sinTol) { // Skip region return; } // Admit region } else { // Snap region primaryAxis = edgeAxis; } } } b2ClipVertex clipPoints[2]; b2ReferenceFace ref; if (primaryAxis.type == b2EPAxis::e_edgeA) { manifold->type = b2Manifold::e_faceA; // Search for the polygon normal that is most anti-parallel to the edge normal. int32 bestIndex = 0; float bestValue = b2Dot(primaryAxis.normal, tempPolygonB.normals[0]); for (int32 i = 1; i < tempPolygonB.count; ++i) { float value = b2Dot(primaryAxis.normal, tempPolygonB.normals[i]); if (value < bestValue) { bestValue = value; bestIndex = i; } } int32 i1 = bestIndex; int32 i2 = i1 + 1 < tempPolygonB.count ? i1 + 1 : 0; clipPoints[0].v = tempPolygonB.vertices[i1]; clipPoints[0].id.cf.indexA = 0; clipPoints[0].id.cf.indexB = static_cast(i1); clipPoints[0].id.cf.typeA = b2ContactFeature::e_face; clipPoints[0].id.cf.typeB = b2ContactFeature::e_vertex; clipPoints[1].v = tempPolygonB.vertices[i2]; clipPoints[1].id.cf.indexA = 0; clipPoints[1].id.cf.indexB = static_cast(i2); clipPoints[1].id.cf.typeA = b2ContactFeature::e_face; clipPoints[1].id.cf.typeB = b2ContactFeature::e_vertex; ref.i1 = 0; ref.i2 = 1; ref.v1 = v1; ref.v2 = v2; ref.normal = primaryAxis.normal; ref.sideNormal1 = -edge1; ref.sideNormal2 = edge1; } else { manifold->type = b2Manifold::e_faceB; clipPoints[0].v = v2; clipPoints[0].id.cf.indexA = 1; clipPoints[0].id.cf.indexB = static_cast(primaryAxis.index); clipPoints[0].id.cf.typeA = b2ContactFeature::e_vertex; clipPoints[0].id.cf.typeB = b2ContactFeature::e_face; clipPoints[1].v = v1; clipPoints[1].id.cf.indexA = 0; clipPoints[1].id.cf.indexB = static_cast(primaryAxis.index); clipPoints[1].id.cf.typeA = b2ContactFeature::e_vertex; clipPoints[1].id.cf.typeB = b2ContactFeature::e_face; ref.i1 = primaryAxis.index; ref.i2 = ref.i1 + 1 < tempPolygonB.count ? ref.i1 + 1 : 0; ref.v1 = tempPolygonB.vertices[ref.i1]; ref.v2 = tempPolygonB.vertices[ref.i2]; ref.normal = tempPolygonB.normals[ref.i1]; // CCW winding ref.sideNormal1.Set(ref.normal.y, -ref.normal.x); ref.sideNormal2 = -ref.sideNormal1; } ref.sideOffset1 = b2Dot(ref.sideNormal1, ref.v1); ref.sideOffset2 = b2Dot(ref.sideNormal2, ref.v2); // Clip incident edge against reference face side planes b2ClipVertex clipPoints1[2]; b2ClipVertex clipPoints2[2]; int32 np; // Clip to side 1 np = b2ClipSegmentToLine(clipPoints1, clipPoints, ref.sideNormal1, ref.sideOffset1, ref.i1); if (np < b2_maxManifoldPoints) { return; } // Clip to side 2 np = b2ClipSegmentToLine(clipPoints2, clipPoints1, ref.sideNormal2, ref.sideOffset2, ref.i2); if (np < b2_maxManifoldPoints) { return; } // Now clipPoints2 contains the clipped points. if (primaryAxis.type == b2EPAxis::e_edgeA) { manifold->localNormal = ref.normal; manifold->localPoint = ref.v1; } else { manifold->localNormal = polygonB->m_normals[ref.i1]; manifold->localPoint = polygonB->m_vertices[ref.i1]; } int32 pointCount = 0; for (int32 i = 0; i < b2_maxManifoldPoints; ++i) { float separation; separation = b2Dot(ref.normal, clipPoints2[i].v - ref.v1); if (separation <= radius) { b2ManifoldPoint* cp = manifold->points + pointCount; if (primaryAxis.type == b2EPAxis::e_edgeA) { cp->localPoint = b2MulT(xf, clipPoints2[i].v); cp->id = clipPoints2[i].id; } else { cp->localPoint = clipPoints2[i].v; cp->id.cf.typeA = clipPoints2[i].id.cf.typeB; cp->id.cf.typeB = clipPoints2[i].id.cf.typeA; cp->id.cf.indexA = clipPoints2[i].id.cf.indexB; cp->id.cf.indexB = clipPoints2[i].id.cf.indexA; } ++pointCount; } } manifold->pointCount = pointCount; } ================================================ FILE: src/libraries/box2d/collision/b2_collide_polygon.cpp ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #include "box2d/b2_collision.h" #include "box2d/b2_polygon_shape.h" // Find the max separation between poly1 and poly2 using edge normals from poly1. static float b2FindMaxSeparation(int32* edgeIndex, const b2PolygonShape* poly1, const b2Transform& xf1, const b2PolygonShape* poly2, const b2Transform& xf2) { int32 count1 = poly1->m_count; int32 count2 = poly2->m_count; const b2Vec2* n1s = poly1->m_normals; const b2Vec2* v1s = poly1->m_vertices; const b2Vec2* v2s = poly2->m_vertices; b2Transform xf = b2MulT(xf2, xf1); int32 bestIndex = 0; float maxSeparation = -b2_maxFloat; for (int32 i = 0; i < count1; ++i) { // Get poly1 normal in frame2. b2Vec2 n = b2Mul(xf.q, n1s[i]); b2Vec2 v1 = b2Mul(xf, v1s[i]); // Find deepest point for normal i. float si = b2_maxFloat; for (int32 j = 0; j < count2; ++j) { float sij = b2Dot(n, v2s[j] - v1); if (sij < si) { si = sij; } } if (si > maxSeparation) { maxSeparation = si; bestIndex = i; } } *edgeIndex = bestIndex; return maxSeparation; } static void b2FindIncidentEdge(b2ClipVertex c[2], const b2PolygonShape* poly1, const b2Transform& xf1, int32 edge1, const b2PolygonShape* poly2, const b2Transform& xf2) { const b2Vec2* normals1 = poly1->m_normals; int32 count2 = poly2->m_count; const b2Vec2* vertices2 = poly2->m_vertices; const b2Vec2* normals2 = poly2->m_normals; b2Assert(0 <= edge1 && edge1 < poly1->m_count); // Get the normal of the reference edge in poly2's frame. b2Vec2 normal1 = b2MulT(xf2.q, b2Mul(xf1.q, normals1[edge1])); // Find the incident edge on poly2. int32 index = 0; float minDot = b2_maxFloat; for (int32 i = 0; i < count2; ++i) { float dot = b2Dot(normal1, normals2[i]); if (dot < minDot) { minDot = dot; index = i; } } // Build the clip vertices for the incident edge. int32 i1 = index; int32 i2 = i1 + 1 < count2 ? i1 + 1 : 0; c[0].v = b2Mul(xf2, vertices2[i1]); c[0].id.cf.indexA = (uint8)edge1; c[0].id.cf.indexB = (uint8)i1; c[0].id.cf.typeA = b2ContactFeature::e_face; c[0].id.cf.typeB = b2ContactFeature::e_vertex; c[1].v = b2Mul(xf2, vertices2[i2]); c[1].id.cf.indexA = (uint8)edge1; c[1].id.cf.indexB = (uint8)i2; c[1].id.cf.typeA = b2ContactFeature::e_face; c[1].id.cf.typeB = b2ContactFeature::e_vertex; } // Find edge normal of max separation on A - return if separating axis is found // Find edge normal of max separation on B - return if separation axis is found // Choose reference edge as min(minA, minB) // Find incident edge // Clip // The normal points from 1 to 2 void b2CollidePolygons(b2Manifold* manifold, const b2PolygonShape* polyA, const b2Transform& xfA, const b2PolygonShape* polyB, const b2Transform& xfB) { manifold->pointCount = 0; float totalRadius = polyA->m_radius + polyB->m_radius; int32 edgeA = 0; float separationA = b2FindMaxSeparation(&edgeA, polyA, xfA, polyB, xfB); if (separationA > totalRadius) return; int32 edgeB = 0; float separationB = b2FindMaxSeparation(&edgeB, polyB, xfB, polyA, xfA); if (separationB > totalRadius) return; const b2PolygonShape* poly1; // reference polygon const b2PolygonShape* poly2; // incident polygon b2Transform xf1, xf2; int32 edge1; // reference edge uint8 flip; const float k_tol = 0.1f * b2_linearSlop; if (separationB > separationA + k_tol) { poly1 = polyB; poly2 = polyA; xf1 = xfB; xf2 = xfA; edge1 = edgeB; manifold->type = b2Manifold::e_faceB; flip = 1; } else { poly1 = polyA; poly2 = polyB; xf1 = xfA; xf2 = xfB; edge1 = edgeA; manifold->type = b2Manifold::e_faceA; flip = 0; } b2ClipVertex incidentEdge[2]; b2FindIncidentEdge(incidentEdge, poly1, xf1, edge1, poly2, xf2); int32 count1 = poly1->m_count; const b2Vec2* vertices1 = poly1->m_vertices; int32 iv1 = edge1; int32 iv2 = edge1 + 1 < count1 ? edge1 + 1 : 0; b2Vec2 v11 = vertices1[iv1]; b2Vec2 v12 = vertices1[iv2]; b2Vec2 localTangent = v12 - v11; localTangent.Normalize(); b2Vec2 localNormal = b2Cross(localTangent, 1.0f); b2Vec2 planePoint = 0.5f * (v11 + v12); b2Vec2 tangent = b2Mul(xf1.q, localTangent); b2Vec2 normal = b2Cross(tangent, 1.0f); v11 = b2Mul(xf1, v11); v12 = b2Mul(xf1, v12); // Face offset. float frontOffset = b2Dot(normal, v11); // Side offsets, extended by polytope skin thickness. float sideOffset1 = -b2Dot(tangent, v11) + totalRadius; float sideOffset2 = b2Dot(tangent, v12) + totalRadius; // Clip incident edge against extruded edge1 side edges. b2ClipVertex clipPoints1[2]; b2ClipVertex clipPoints2[2]; int np; // Clip to box side 1 np = b2ClipSegmentToLine(clipPoints1, incidentEdge, -tangent, sideOffset1, iv1); if (np < 2) return; // Clip to negative box side 1 np = b2ClipSegmentToLine(clipPoints2, clipPoints1, tangent, sideOffset2, iv2); if (np < 2) { return; } // Now clipPoints2 contains the clipped points. manifold->localNormal = localNormal; manifold->localPoint = planePoint; int32 pointCount = 0; for (int32 i = 0; i < b2_maxManifoldPoints; ++i) { float separation = b2Dot(normal, clipPoints2[i].v) - frontOffset; if (separation <= totalRadius) { b2ManifoldPoint* cp = manifold->points + pointCount; cp->localPoint = b2MulT(xf2, clipPoints2[i].v); cp->id = clipPoints2[i].id; if (flip) { // Swap features b2ContactFeature cf = cp->id.cf; cp->id.cf.indexA = cf.indexB; cp->id.cf.indexB = cf.indexA; cp->id.cf.typeA = cf.typeB; cp->id.cf.typeB = cf.typeA; } ++pointCount; } } manifold->pointCount = pointCount; } ================================================ FILE: src/libraries/box2d/collision/b2_collision.cpp ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #include "box2d/b2_collision.h" #include "box2d/b2_distance.h" void b2WorldManifold::Initialize(const b2Manifold* manifold, const b2Transform& xfA, float radiusA, const b2Transform& xfB, float radiusB) { if (manifold->pointCount == 0) { return; } switch (manifold->type) { case b2Manifold::e_circles: { normal.Set(1.0f, 0.0f); b2Vec2 pointA = b2Mul(xfA, manifold->localPoint); b2Vec2 pointB = b2Mul(xfB, manifold->points[0].localPoint); if (b2DistanceSquared(pointA, pointB) > b2_epsilon * b2_epsilon) { normal = pointB - pointA; normal.Normalize(); } b2Vec2 cA = pointA + radiusA * normal; b2Vec2 cB = pointB - radiusB * normal; points[0] = 0.5f * (cA + cB); separations[0] = b2Dot(cB - cA, normal); } break; case b2Manifold::e_faceA: { normal = b2Mul(xfA.q, manifold->localNormal); b2Vec2 planePoint = b2Mul(xfA, manifold->localPoint); for (int32 i = 0; i < manifold->pointCount; ++i) { b2Vec2 clipPoint = b2Mul(xfB, manifold->points[i].localPoint); b2Vec2 cA = clipPoint + (radiusA - b2Dot(clipPoint - planePoint, normal)) * normal; b2Vec2 cB = clipPoint - radiusB * normal; points[i] = 0.5f * (cA + cB); separations[i] = b2Dot(cB - cA, normal); } } break; case b2Manifold::e_faceB: { normal = b2Mul(xfB.q, manifold->localNormal); b2Vec2 planePoint = b2Mul(xfB, manifold->localPoint); for (int32 i = 0; i < manifold->pointCount; ++i) { b2Vec2 clipPoint = b2Mul(xfA, manifold->points[i].localPoint); b2Vec2 cB = clipPoint + (radiusB - b2Dot(clipPoint - planePoint, normal)) * normal; b2Vec2 cA = clipPoint - radiusA * normal; points[i] = 0.5f * (cA + cB); separations[i] = b2Dot(cA - cB, normal); } // Ensure normal points from A to B. normal = -normal; } break; } } void b2GetPointStates(b2PointState state1[b2_maxManifoldPoints], b2PointState state2[b2_maxManifoldPoints], const b2Manifold* manifold1, const b2Manifold* manifold2) { for (int32 i = 0; i < b2_maxManifoldPoints; ++i) { state1[i] = b2_nullState; state2[i] = b2_nullState; } // Detect persists and removes. for (int32 i = 0; i < manifold1->pointCount; ++i) { b2ContactID id = manifold1->points[i].id; state1[i] = b2_removeState; for (int32 j = 0; j < manifold2->pointCount; ++j) { if (manifold2->points[j].id.key == id.key) { state1[i] = b2_persistState; break; } } } // Detect persists and adds. for (int32 i = 0; i < manifold2->pointCount; ++i) { b2ContactID id = manifold2->points[i].id; state2[i] = b2_addState; for (int32 j = 0; j < manifold1->pointCount; ++j) { if (manifold1->points[j].id.key == id.key) { state2[i] = b2_persistState; break; } } } } // From Real-time Collision Detection, p179. bool b2AABB::RayCast(b2RayCastOutput* output, const b2RayCastInput& input) const { float tmin = -b2_maxFloat; float tmax = b2_maxFloat; b2Vec2 p = input.p1; b2Vec2 d = input.p2 - input.p1; b2Vec2 absD = b2Abs(d); b2Vec2 normal; for (int32 i = 0; i < 2; ++i) { if (absD(i) < b2_epsilon) { // Parallel. if (p(i) < lowerBound(i) || upperBound(i) < p(i)) { return false; } } else { float inv_d = 1.0f / d(i); float t1 = (lowerBound(i) - p(i)) * inv_d; float t2 = (upperBound(i) - p(i)) * inv_d; // Sign of the normal vector. float s = -1.0f; if (t1 > t2) { b2Swap(t1, t2); s = 1.0f; } // Push the min up if (t1 > tmin) { normal.SetZero(); normal(i) = s; tmin = t1; } // Pull the max down tmax = b2Min(tmax, t2); if (tmin > tmax) { return false; } } } // Does the ray start inside the box? // Does the ray intersect beyond the max fraction? if (tmin < 0.0f || input.maxFraction < tmin) { return false; } // Intersection. output->fraction = tmin; output->normal = normal; return true; } // Sutherland-Hodgman clipping. int32 b2ClipSegmentToLine(b2ClipVertex vOut[2], const b2ClipVertex vIn[2], const b2Vec2& normal, float offset, int32 vertexIndexA) { // Start with no output points int32 count = 0; // Calculate the distance of end points to the line float distance0 = b2Dot(normal, vIn[0].v) - offset; float distance1 = b2Dot(normal, vIn[1].v) - offset; // If the points are behind the plane if (distance0 <= 0.0f) vOut[count++] = vIn[0]; if (distance1 <= 0.0f) vOut[count++] = vIn[1]; // If the points are on different sides of the plane if (distance0 * distance1 < 0.0f) { // Find intersection point of edge and plane float interp = distance0 / (distance0 - distance1); vOut[count].v = vIn[0].v + interp * (vIn[1].v - vIn[0].v); // VertexA is hitting edgeB. vOut[count].id.cf.indexA = static_cast(vertexIndexA); vOut[count].id.cf.indexB = vIn[0].id.cf.indexB; vOut[count].id.cf.typeA = b2ContactFeature::e_vertex; vOut[count].id.cf.typeB = b2ContactFeature::e_face; ++count; b2Assert(count == 2); } return count; } bool b2TestOverlap( const b2Shape* shapeA, int32 indexA, const b2Shape* shapeB, int32 indexB, const b2Transform& xfA, const b2Transform& xfB) { b2DistanceInput input; input.proxyA.Set(shapeA, indexA); input.proxyB.Set(shapeB, indexB); input.transformA = xfA; input.transformB = xfB; input.useRadii = true; b2SimplexCache cache; cache.count = 0; b2DistanceOutput output; b2Distance(&output, &cache, &input); return output.distance < 10.0f * b2_epsilon; } ================================================ FILE: src/libraries/box2d/collision/b2_distance.cpp ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #include "box2d/b2_circle_shape.h" #include "box2d/b2_distance.h" #include "box2d/b2_edge_shape.h" #include "box2d/b2_chain_shape.h" #include "box2d/b2_polygon_shape.h" // GJK using Voronoi regions (Christer Ericson) and Barycentric coordinates. B2_API int32 b2_gjkCalls, b2_gjkIters, b2_gjkMaxIters; void b2DistanceProxy::Set(const b2Shape* shape, int32 index) { switch (shape->GetType()) { case b2Shape::e_circle: { const b2CircleShape* circle = static_cast(shape); m_vertices = &circle->m_p; m_count = 1; m_radius = circle->m_radius; } break; case b2Shape::e_polygon: { const b2PolygonShape* polygon = static_cast(shape); m_vertices = polygon->m_vertices; m_count = polygon->m_count; m_radius = polygon->m_radius; } break; case b2Shape::e_chain: { const b2ChainShape* chain = static_cast(shape); b2Assert(0 <= index && index < chain->m_count); m_buffer[0] = chain->m_vertices[index]; if (index + 1 < chain->m_count) { m_buffer[1] = chain->m_vertices[index + 1]; } else { m_buffer[1] = chain->m_vertices[0]; } m_vertices = m_buffer; m_count = 2; m_radius = chain->m_radius; } break; case b2Shape::e_edge: { const b2EdgeShape* edge = static_cast(shape); m_vertices = &edge->m_vertex1; m_count = 2; m_radius = edge->m_radius; } break; default: b2Assert(false); } } void b2DistanceProxy::Set(const b2Vec2* vertices, int32 count, float radius) { m_vertices = vertices; m_count = count; m_radius = radius; } struct b2SimplexVertex { b2Vec2 wA; // support point in proxyA b2Vec2 wB; // support point in proxyB b2Vec2 w; // wB - wA float a; // barycentric coordinate for closest point int32 indexA; // wA index int32 indexB; // wB index }; struct b2Simplex { void ReadCache( const b2SimplexCache* cache, const b2DistanceProxy* proxyA, const b2Transform& transformA, const b2DistanceProxy* proxyB, const b2Transform& transformB) { b2Assert(cache->count <= 3); // Copy data from cache. m_count = cache->count; b2SimplexVertex* vertices = &m_v1; for (int32 i = 0; i < m_count; ++i) { b2SimplexVertex* v = vertices + i; v->indexA = cache->indexA[i]; v->indexB = cache->indexB[i]; b2Vec2 wALocal = proxyA->GetVertex(v->indexA); b2Vec2 wBLocal = proxyB->GetVertex(v->indexB); v->wA = b2Mul(transformA, wALocal); v->wB = b2Mul(transformB, wBLocal); v->w = v->wB - v->wA; v->a = 0.0f; } // Compute the new simplex metric, if it is substantially different than // old metric then flush the simplex. if (m_count > 1) { float metric1 = cache->metric; float metric2 = GetMetric(); if (metric2 < 0.5f * metric1 || 2.0f * metric1 < metric2 || metric2 < b2_epsilon) { // Reset the simplex. m_count = 0; } } // If the cache is empty or invalid ... if (m_count == 0) { b2SimplexVertex* v = vertices + 0; v->indexA = 0; v->indexB = 0; b2Vec2 wALocal = proxyA->GetVertex(0); b2Vec2 wBLocal = proxyB->GetVertex(0); v->wA = b2Mul(transformA, wALocal); v->wB = b2Mul(transformB, wBLocal); v->w = v->wB - v->wA; v->a = 1.0f; m_count = 1; } } void WriteCache(b2SimplexCache* cache) const { cache->metric = GetMetric(); cache->count = uint16(m_count); const b2SimplexVertex* vertices = &m_v1; for (int32 i = 0; i < m_count; ++i) { cache->indexA[i] = uint8(vertices[i].indexA); cache->indexB[i] = uint8(vertices[i].indexB); } } b2Vec2 GetSearchDirection() const { switch (m_count) { case 1: return -m_v1.w; case 2: { b2Vec2 e12 = m_v2.w - m_v1.w; float sgn = b2Cross(e12, -m_v1.w); if (sgn > 0.0f) { // Origin is left of e12. return b2Cross(1.0f, e12); } else { // Origin is right of e12. return b2Cross(e12, 1.0f); } } default: b2Assert(false); return b2Vec2_zero; } } b2Vec2 GetClosestPoint() const { switch (m_count) { case 0: b2Assert(false); return b2Vec2_zero; case 1: return m_v1.w; case 2: return m_v1.a * m_v1.w + m_v2.a * m_v2.w; case 3: return b2Vec2_zero; default: b2Assert(false); return b2Vec2_zero; } } void GetWitnessPoints(b2Vec2* pA, b2Vec2* pB) const { switch (m_count) { case 0: b2Assert(false); break; case 1: *pA = m_v1.wA; *pB = m_v1.wB; break; case 2: *pA = m_v1.a * m_v1.wA + m_v2.a * m_v2.wA; *pB = m_v1.a * m_v1.wB + m_v2.a * m_v2.wB; break; case 3: *pA = m_v1.a * m_v1.wA + m_v2.a * m_v2.wA + m_v3.a * m_v3.wA; *pB = *pA; break; default: b2Assert(false); break; } } float GetMetric() const { switch (m_count) { case 0: b2Assert(false); return 0.0f; case 1: return 0.0f; case 2: return b2Distance(m_v1.w, m_v2.w); case 3: return b2Cross(m_v2.w - m_v1.w, m_v3.w - m_v1.w); default: b2Assert(false); return 0.0f; } } void Solve2(); void Solve3(); b2SimplexVertex m_v1, m_v2, m_v3; int32 m_count; }; // Solve a line segment using barycentric coordinates. // // p = a1 * w1 + a2 * w2 // a1 + a2 = 1 // // The vector from the origin to the closest point on the line is // perpendicular to the line. // e12 = w2 - w1 // dot(p, e) = 0 // a1 * dot(w1, e) + a2 * dot(w2, e) = 0 // // 2-by-2 linear system // [1 1 ][a1] = [1] // [w1.e12 w2.e12][a2] = [0] // // Define // d12_1 = dot(w2, e12) // d12_2 = -dot(w1, e12) // d12 = d12_1 + d12_2 // // Solution // a1 = d12_1 / d12 // a2 = d12_2 / d12 void b2Simplex::Solve2() { b2Vec2 w1 = m_v1.w; b2Vec2 w2 = m_v2.w; b2Vec2 e12 = w2 - w1; // w1 region float d12_2 = -b2Dot(w1, e12); if (d12_2 <= 0.0f) { // a2 <= 0, so we clamp it to 0 m_v1.a = 1.0f; m_count = 1; return; } // w2 region float d12_1 = b2Dot(w2, e12); if (d12_1 <= 0.0f) { // a1 <= 0, so we clamp it to 0 m_v2.a = 1.0f; m_count = 1; m_v1 = m_v2; return; } // Must be in e12 region. float inv_d12 = 1.0f / (d12_1 + d12_2); m_v1.a = d12_1 * inv_d12; m_v2.a = d12_2 * inv_d12; m_count = 2; } // Possible regions: // - points[2] // - edge points[0]-points[2] // - edge points[1]-points[2] // - inside the triangle void b2Simplex::Solve3() { b2Vec2 w1 = m_v1.w; b2Vec2 w2 = m_v2.w; b2Vec2 w3 = m_v3.w; // Edge12 // [1 1 ][a1] = [1] // [w1.e12 w2.e12][a2] = [0] // a3 = 0 b2Vec2 e12 = w2 - w1; float w1e12 = b2Dot(w1, e12); float w2e12 = b2Dot(w2, e12); float d12_1 = w2e12; float d12_2 = -w1e12; // Edge13 // [1 1 ][a1] = [1] // [w1.e13 w3.e13][a3] = [0] // a2 = 0 b2Vec2 e13 = w3 - w1; float w1e13 = b2Dot(w1, e13); float w3e13 = b2Dot(w3, e13); float d13_1 = w3e13; float d13_2 = -w1e13; // Edge23 // [1 1 ][a2] = [1] // [w2.e23 w3.e23][a3] = [0] // a1 = 0 b2Vec2 e23 = w3 - w2; float w2e23 = b2Dot(w2, e23); float w3e23 = b2Dot(w3, e23); float d23_1 = w3e23; float d23_2 = -w2e23; // Triangle123 float n123 = b2Cross(e12, e13); float d123_1 = n123 * b2Cross(w2, w3); float d123_2 = n123 * b2Cross(w3, w1); float d123_3 = n123 * b2Cross(w1, w2); // w1 region if (d12_2 <= 0.0f && d13_2 <= 0.0f) { m_v1.a = 1.0f; m_count = 1; return; } // e12 if (d12_1 > 0.0f && d12_2 > 0.0f && d123_3 <= 0.0f) { float inv_d12 = 1.0f / (d12_1 + d12_2); m_v1.a = d12_1 * inv_d12; m_v2.a = d12_2 * inv_d12; m_count = 2; return; } // e13 if (d13_1 > 0.0f && d13_2 > 0.0f && d123_2 <= 0.0f) { float inv_d13 = 1.0f / (d13_1 + d13_2); m_v1.a = d13_1 * inv_d13; m_v3.a = d13_2 * inv_d13; m_count = 2; m_v2 = m_v3; return; } // w2 region if (d12_1 <= 0.0f && d23_2 <= 0.0f) { m_v2.a = 1.0f; m_count = 1; m_v1 = m_v2; return; } // w3 region if (d13_1 <= 0.0f && d23_1 <= 0.0f) { m_v3.a = 1.0f; m_count = 1; m_v1 = m_v3; return; } // e23 if (d23_1 > 0.0f && d23_2 > 0.0f && d123_1 <= 0.0f) { float inv_d23 = 1.0f / (d23_1 + d23_2); m_v2.a = d23_1 * inv_d23; m_v3.a = d23_2 * inv_d23; m_count = 2; m_v1 = m_v3; return; } // Must be in triangle123 float inv_d123 = 1.0f / (d123_1 + d123_2 + d123_3); m_v1.a = d123_1 * inv_d123; m_v2.a = d123_2 * inv_d123; m_v3.a = d123_3 * inv_d123; m_count = 3; } void b2Distance(b2DistanceOutput* output, b2SimplexCache* cache, const b2DistanceInput* input) { ++b2_gjkCalls; const b2DistanceProxy* proxyA = &input->proxyA; const b2DistanceProxy* proxyB = &input->proxyB; b2Transform transformA = input->transformA; b2Transform transformB = input->transformB; // Initialize the simplex. b2Simplex simplex; simplex.ReadCache(cache, proxyA, transformA, proxyB, transformB); // Get simplex vertices as an array. b2SimplexVertex* vertices = &simplex.m_v1; const int32 k_maxIters = 20; // These store the vertices of the last simplex so that we // can check for duplicates and prevent cycling. int32 saveA[3], saveB[3]; int32 saveCount = 0; // Main iteration loop. int32 iter = 0; while (iter < k_maxIters) { // Copy simplex so we can identify duplicates. saveCount = simplex.m_count; for (int32 i = 0; i < saveCount; ++i) { saveA[i] = vertices[i].indexA; saveB[i] = vertices[i].indexB; } switch (simplex.m_count) { case 1: break; case 2: simplex.Solve2(); break; case 3: simplex.Solve3(); break; default: b2Assert(false); } // If we have 3 points, then the origin is in the corresponding triangle. if (simplex.m_count == 3) { break; } // Get search direction. b2Vec2 d = simplex.GetSearchDirection(); // Ensure the search direction is numerically fit. if (d.LengthSquared() < b2_epsilon * b2_epsilon) { // The origin is probably contained by a line segment // or triangle. Thus the shapes are overlapped. // We can't return zero here even though there may be overlap. // In case the simplex is a point, segment, or triangle it is difficult // to determine if the origin is contained in the CSO or very close to it. break; } // Compute a tentative new simplex vertex using support points. b2SimplexVertex* vertex = vertices + simplex.m_count; vertex->indexA = proxyA->GetSupport(b2MulT(transformA.q, -d)); vertex->wA = b2Mul(transformA, proxyA->GetVertex(vertex->indexA)); vertex->indexB = proxyB->GetSupport(b2MulT(transformB.q, d)); vertex->wB = b2Mul(transformB, proxyB->GetVertex(vertex->indexB)); vertex->w = vertex->wB - vertex->wA; // Iteration count is equated to the number of support point calls. ++iter; ++b2_gjkIters; // Check for duplicate support points. This is the main termination criteria. bool duplicate = false; for (int32 i = 0; i < saveCount; ++i) { if (vertex->indexA == saveA[i] && vertex->indexB == saveB[i]) { duplicate = true; break; } } // If we found a duplicate support point we must exit to avoid cycling. if (duplicate) { break; } // New vertex is ok and needed. ++simplex.m_count; } b2_gjkMaxIters = b2Max(b2_gjkMaxIters, iter); // Prepare output. simplex.GetWitnessPoints(&output->pointA, &output->pointB); output->distance = b2Distance(output->pointA, output->pointB); output->iterations = iter; // Cache the simplex. simplex.WriteCache(cache); // Apply radii if requested. if (input->useRadii) { float rA = proxyA->m_radius; float rB = proxyB->m_radius; if (output->distance > rA + rB && output->distance > b2_epsilon) { // Shapes are still no overlapped. // Move the witness points to the outer surface. output->distance -= rA + rB; b2Vec2 normal = output->pointB - output->pointA; normal.Normalize(); output->pointA += rA * normal; output->pointB -= rB * normal; } else { // Shapes are overlapped when radii are considered. // Move the witness points to the middle. b2Vec2 p = 0.5f * (output->pointA + output->pointB); output->pointA = p; output->pointB = p; output->distance = 0.0f; } } } // GJK-raycast // Algorithm by Gino van den Bergen. // "Smooth Mesh Contacts with GJK" in Game Physics Pearls. 2010 bool b2ShapeCast(b2ShapeCastOutput * output, const b2ShapeCastInput * input) { output->iterations = 0; output->lambda = 1.0f; output->normal.SetZero(); output->point.SetZero(); const b2DistanceProxy* proxyA = &input->proxyA; const b2DistanceProxy* proxyB = &input->proxyB; float radiusA = b2Max(proxyA->m_radius, b2_polygonRadius); float radiusB = b2Max(proxyB->m_radius, b2_polygonRadius); float radius = radiusA + radiusB; b2Transform xfA = input->transformA; b2Transform xfB = input->transformB; b2Vec2 r = input->translationB; b2Vec2 n(0.0f, 0.0f); float lambda = 0.0f; // Initial simplex b2Simplex simplex; simplex.m_count = 0; // Get simplex vertices as an array. b2SimplexVertex* vertices = &simplex.m_v1; // Get support point in -r direction int32 indexA = proxyA->GetSupport(b2MulT(xfA.q, -r)); b2Vec2 wA = b2Mul(xfA, proxyA->GetVertex(indexA)); int32 indexB = proxyB->GetSupport(b2MulT(xfB.q, r)); b2Vec2 wB = b2Mul(xfB, proxyB->GetVertex(indexB)); b2Vec2 v = wA - wB; // Sigma is the target distance between polygons float sigma = b2Max(b2_polygonRadius, radius - b2_polygonRadius); const float tolerance = 0.5f * b2_linearSlop; // Main iteration loop. const int32 k_maxIters = 20; int32 iter = 0; while (iter < k_maxIters && v.Length() - sigma > tolerance) { b2Assert(simplex.m_count < 3); output->iterations += 1; // Support in direction -v (A - B) indexA = proxyA->GetSupport(b2MulT(xfA.q, -v)); wA = b2Mul(xfA, proxyA->GetVertex(indexA)); indexB = proxyB->GetSupport(b2MulT(xfB.q, v)); wB = b2Mul(xfB, proxyB->GetVertex(indexB)); b2Vec2 p = wA - wB; // -v is a normal at p v.Normalize(); // Intersect ray with plane float vp = b2Dot(v, p); float vr = b2Dot(v, r); if (vp - sigma > lambda * vr) { if (vr <= 0.0f) { return false; } lambda = (vp - sigma) / vr; if (lambda > 1.0f) { return false; } n = -v; simplex.m_count = 0; } // Reverse simplex since it works with B - A. // Shift by lambda * r because we want the closest point to the current clip point. // Note that the support point p is not shifted because we want the plane equation // to be formed in unshifted space. b2SimplexVertex* vertex = vertices + simplex.m_count; vertex->indexA = indexB; vertex->wA = wB + lambda * r; vertex->indexB = indexA; vertex->wB = wA; vertex->w = vertex->wB - vertex->wA; vertex->a = 1.0f; simplex.m_count += 1; switch (simplex.m_count) { case 1: break; case 2: simplex.Solve2(); break; case 3: simplex.Solve3(); break; default: b2Assert(false); } // If we have 3 points, then the origin is in the corresponding triangle. if (simplex.m_count == 3) { // Overlap return false; } // Get search direction. v = simplex.GetClosestPoint(); // Iteration count is equated to the number of support point calls. ++iter; } if (iter == 0) { // Initial overlap return false; } // Prepare output. b2Vec2 pointA, pointB; simplex.GetWitnessPoints(&pointB, &pointA); if (v.LengthSquared() > 0.0f) { n = -v; n.Normalize(); } output->point = pointA + radiusA * n; output->normal = n; output->lambda = lambda; output->iterations = iter; return true; } ================================================ FILE: src/libraries/box2d/collision/b2_dynamic_tree.cpp ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #include "box2d/b2_dynamic_tree.h" #include b2DynamicTree::b2DynamicTree() { m_root = b2_nullNode; m_nodeCapacity = 16; m_nodeCount = 0; m_nodes = (b2TreeNode*)b2Alloc(m_nodeCapacity * sizeof(b2TreeNode)); memset(m_nodes, 0, m_nodeCapacity * sizeof(b2TreeNode)); // Build a linked list for the free list. for (int32 i = 0; i < m_nodeCapacity - 1; ++i) { m_nodes[i].next = i + 1; m_nodes[i].height = -1; } m_nodes[m_nodeCapacity-1].next = b2_nullNode; m_nodes[m_nodeCapacity-1].height = -1; m_freeList = 0; m_insertionCount = 0; } b2DynamicTree::~b2DynamicTree() { // This frees the entire tree in one shot. b2Free(m_nodes); } // Allocate a node from the pool. Grow the pool if necessary. int32 b2DynamicTree::AllocateNode() { // Expand the node pool as needed. if (m_freeList == b2_nullNode) { b2Assert(m_nodeCount == m_nodeCapacity); // The free list is empty. Rebuild a bigger pool. b2TreeNode* oldNodes = m_nodes; m_nodeCapacity *= 2; m_nodes = (b2TreeNode*)b2Alloc(m_nodeCapacity * sizeof(b2TreeNode)); memcpy(m_nodes, oldNodes, m_nodeCount * sizeof(b2TreeNode)); b2Free(oldNodes); // Build a linked list for the free list. The parent // pointer becomes the "next" pointer. for (int32 i = m_nodeCount; i < m_nodeCapacity - 1; ++i) { m_nodes[i].next = i + 1; m_nodes[i].height = -1; } m_nodes[m_nodeCapacity-1].next = b2_nullNode; m_nodes[m_nodeCapacity-1].height = -1; m_freeList = m_nodeCount; } // Peel a node off the free list. int32 nodeId = m_freeList; m_freeList = m_nodes[nodeId].next; m_nodes[nodeId].parent = b2_nullNode; m_nodes[nodeId].child1 = b2_nullNode; m_nodes[nodeId].child2 = b2_nullNode; m_nodes[nodeId].height = 0; m_nodes[nodeId].userData = nullptr; m_nodes[nodeId].moved = false; ++m_nodeCount; return nodeId; } // Return a node to the pool. void b2DynamicTree::FreeNode(int32 nodeId) { b2Assert(0 <= nodeId && nodeId < m_nodeCapacity); b2Assert(0 < m_nodeCount); m_nodes[nodeId].next = m_freeList; m_nodes[nodeId].height = -1; m_freeList = nodeId; --m_nodeCount; } // Create a proxy in the tree as a leaf node. We return the index // of the node instead of a pointer so that we can grow // the node pool. int32 b2DynamicTree::CreateProxy(const b2AABB& aabb, void* userData) { int32 proxyId = AllocateNode(); // Fatten the aabb. b2Vec2 r(b2_aabbExtension, b2_aabbExtension); m_nodes[proxyId].aabb.lowerBound = aabb.lowerBound - r; m_nodes[proxyId].aabb.upperBound = aabb.upperBound + r; m_nodes[proxyId].userData = userData; m_nodes[proxyId].height = 0; m_nodes[proxyId].moved = true; InsertLeaf(proxyId); return proxyId; } void b2DynamicTree::DestroyProxy(int32 proxyId) { b2Assert(0 <= proxyId && proxyId < m_nodeCapacity); b2Assert(m_nodes[proxyId].IsLeaf()); RemoveLeaf(proxyId); FreeNode(proxyId); } bool b2DynamicTree::MoveProxy(int32 proxyId, const b2AABB& aabb, const b2Vec2& displacement) { b2Assert(0 <= proxyId && proxyId < m_nodeCapacity); b2Assert(m_nodes[proxyId].IsLeaf()); // Extend AABB b2AABB fatAABB; b2Vec2 r(b2_aabbExtension, b2_aabbExtension); fatAABB.lowerBound = aabb.lowerBound - r; fatAABB.upperBound = aabb.upperBound + r; // Predict AABB movement b2Vec2 d = b2_aabbMultiplier * displacement; if (d.x < 0.0f) { fatAABB.lowerBound.x += d.x; } else { fatAABB.upperBound.x += d.x; } if (d.y < 0.0f) { fatAABB.lowerBound.y += d.y; } else { fatAABB.upperBound.y += d.y; } const b2AABB& treeAABB = m_nodes[proxyId].aabb; if (treeAABB.Contains(aabb)) { // The tree AABB still contains the object, but it might be too large. // Perhaps the object was moving fast but has since gone to sleep. // The huge AABB is larger than the new fat AABB. b2AABB hugeAABB; hugeAABB.lowerBound = fatAABB.lowerBound - 4.0f * r; hugeAABB.upperBound = fatAABB.upperBound + 4.0f * r; if (hugeAABB.Contains(treeAABB)) { // The tree AABB contains the object AABB and the tree AABB is // not too large. No tree update needed. return false; } // Otherwise the tree AABB is huge and needs to be shrunk } RemoveLeaf(proxyId); m_nodes[proxyId].aabb = fatAABB; InsertLeaf(proxyId); m_nodes[proxyId].moved = true; return true; } void b2DynamicTree::InsertLeaf(int32 leaf) { ++m_insertionCount; if (m_root == b2_nullNode) { m_root = leaf; m_nodes[m_root].parent = b2_nullNode; return; } // Find the best sibling for this node b2AABB leafAABB = m_nodes[leaf].aabb; int32 index = m_root; while (m_nodes[index].IsLeaf() == false) { int32 child1 = m_nodes[index].child1; int32 child2 = m_nodes[index].child2; float area = m_nodes[index].aabb.GetPerimeter(); b2AABB combinedAABB; combinedAABB.Combine(m_nodes[index].aabb, leafAABB); float combinedArea = combinedAABB.GetPerimeter(); // Cost of creating a new parent for this node and the new leaf float cost = 2.0f * combinedArea; // Minimum cost of pushing the leaf further down the tree float inheritanceCost = 2.0f * (combinedArea - area); // Cost of descending into child1 float cost1; if (m_nodes[child1].IsLeaf()) { b2AABB aabb; aabb.Combine(leafAABB, m_nodes[child1].aabb); cost1 = aabb.GetPerimeter() + inheritanceCost; } else { b2AABB aabb; aabb.Combine(leafAABB, m_nodes[child1].aabb); float oldArea = m_nodes[child1].aabb.GetPerimeter(); float newArea = aabb.GetPerimeter(); cost1 = (newArea - oldArea) + inheritanceCost; } // Cost of descending into child2 float cost2; if (m_nodes[child2].IsLeaf()) { b2AABB aabb; aabb.Combine(leafAABB, m_nodes[child2].aabb); cost2 = aabb.GetPerimeter() + inheritanceCost; } else { b2AABB aabb; aabb.Combine(leafAABB, m_nodes[child2].aabb); float oldArea = m_nodes[child2].aabb.GetPerimeter(); float newArea = aabb.GetPerimeter(); cost2 = newArea - oldArea + inheritanceCost; } // Descend according to the minimum cost. if (cost < cost1 && cost < cost2) { break; } // Descend if (cost1 < cost2) { index = child1; } else { index = child2; } } int32 sibling = index; // Create a new parent. int32 oldParent = m_nodes[sibling].parent; int32 newParent = AllocateNode(); m_nodes[newParent].parent = oldParent; m_nodes[newParent].userData = nullptr; m_nodes[newParent].aabb.Combine(leafAABB, m_nodes[sibling].aabb); m_nodes[newParent].height = m_nodes[sibling].height + 1; if (oldParent != b2_nullNode) { // The sibling was not the root. if (m_nodes[oldParent].child1 == sibling) { m_nodes[oldParent].child1 = newParent; } else { m_nodes[oldParent].child2 = newParent; } m_nodes[newParent].child1 = sibling; m_nodes[newParent].child2 = leaf; m_nodes[sibling].parent = newParent; m_nodes[leaf].parent = newParent; } else { // The sibling was the root. m_nodes[newParent].child1 = sibling; m_nodes[newParent].child2 = leaf; m_nodes[sibling].parent = newParent; m_nodes[leaf].parent = newParent; m_root = newParent; } // Walk back up the tree fixing heights and AABBs index = m_nodes[leaf].parent; while (index != b2_nullNode) { index = Balance(index); int32 child1 = m_nodes[index].child1; int32 child2 = m_nodes[index].child2; b2Assert(child1 != b2_nullNode); b2Assert(child2 != b2_nullNode); m_nodes[index].height = 1 + b2Max(m_nodes[child1].height, m_nodes[child2].height); m_nodes[index].aabb.Combine(m_nodes[child1].aabb, m_nodes[child2].aabb); index = m_nodes[index].parent; } //Validate(); } void b2DynamicTree::RemoveLeaf(int32 leaf) { if (leaf == m_root) { m_root = b2_nullNode; return; } int32 parent = m_nodes[leaf].parent; int32 grandParent = m_nodes[parent].parent; int32 sibling; if (m_nodes[parent].child1 == leaf) { sibling = m_nodes[parent].child2; } else { sibling = m_nodes[parent].child1; } if (grandParent != b2_nullNode) { // Destroy parent and connect sibling to grandParent. if (m_nodes[grandParent].child1 == parent) { m_nodes[grandParent].child1 = sibling; } else { m_nodes[grandParent].child2 = sibling; } m_nodes[sibling].parent = grandParent; FreeNode(parent); // Adjust ancestor bounds. int32 index = grandParent; while (index != b2_nullNode) { index = Balance(index); int32 child1 = m_nodes[index].child1; int32 child2 = m_nodes[index].child2; m_nodes[index].aabb.Combine(m_nodes[child1].aabb, m_nodes[child2].aabb); m_nodes[index].height = 1 + b2Max(m_nodes[child1].height, m_nodes[child2].height); index = m_nodes[index].parent; } } else { m_root = sibling; m_nodes[sibling].parent = b2_nullNode; FreeNode(parent); } //Validate(); } // Perform a left or right rotation if node A is imbalanced. // Returns the new root index. int32 b2DynamicTree::Balance(int32 iA) { b2Assert(iA != b2_nullNode); b2TreeNode* A = m_nodes + iA; if (A->IsLeaf() || A->height < 2) { return iA; } int32 iB = A->child1; int32 iC = A->child2; b2Assert(0 <= iB && iB < m_nodeCapacity); b2Assert(0 <= iC && iC < m_nodeCapacity); b2TreeNode* B = m_nodes + iB; b2TreeNode* C = m_nodes + iC; int32 balance = C->height - B->height; // Rotate C up if (balance > 1) { int32 iF = C->child1; int32 iG = C->child2; b2TreeNode* F = m_nodes + iF; b2TreeNode* G = m_nodes + iG; b2Assert(0 <= iF && iF < m_nodeCapacity); b2Assert(0 <= iG && iG < m_nodeCapacity); // Swap A and C C->child1 = iA; C->parent = A->parent; A->parent = iC; // A's old parent should point to C if (C->parent != b2_nullNode) { if (m_nodes[C->parent].child1 == iA) { m_nodes[C->parent].child1 = iC; } else { b2Assert(m_nodes[C->parent].child2 == iA); m_nodes[C->parent].child2 = iC; } } else { m_root = iC; } // Rotate if (F->height > G->height) { C->child2 = iF; A->child2 = iG; G->parent = iA; A->aabb.Combine(B->aabb, G->aabb); C->aabb.Combine(A->aabb, F->aabb); A->height = 1 + b2Max(B->height, G->height); C->height = 1 + b2Max(A->height, F->height); } else { C->child2 = iG; A->child2 = iF; F->parent = iA; A->aabb.Combine(B->aabb, F->aabb); C->aabb.Combine(A->aabb, G->aabb); A->height = 1 + b2Max(B->height, F->height); C->height = 1 + b2Max(A->height, G->height); } return iC; } // Rotate B up if (balance < -1) { int32 iD = B->child1; int32 iE = B->child2; b2TreeNode* D = m_nodes + iD; b2TreeNode* E = m_nodes + iE; b2Assert(0 <= iD && iD < m_nodeCapacity); b2Assert(0 <= iE && iE < m_nodeCapacity); // Swap A and B B->child1 = iA; B->parent = A->parent; A->parent = iB; // A's old parent should point to B if (B->parent != b2_nullNode) { if (m_nodes[B->parent].child1 == iA) { m_nodes[B->parent].child1 = iB; } else { b2Assert(m_nodes[B->parent].child2 == iA); m_nodes[B->parent].child2 = iB; } } else { m_root = iB; } // Rotate if (D->height > E->height) { B->child2 = iD; A->child1 = iE; E->parent = iA; A->aabb.Combine(C->aabb, E->aabb); B->aabb.Combine(A->aabb, D->aabb); A->height = 1 + b2Max(C->height, E->height); B->height = 1 + b2Max(A->height, D->height); } else { B->child2 = iE; A->child1 = iD; D->parent = iA; A->aabb.Combine(C->aabb, D->aabb); B->aabb.Combine(A->aabb, E->aabb); A->height = 1 + b2Max(C->height, D->height); B->height = 1 + b2Max(A->height, E->height); } return iB; } return iA; } int32 b2DynamicTree::GetHeight() const { if (m_root == b2_nullNode) { return 0; } return m_nodes[m_root].height; } // float b2DynamicTree::GetAreaRatio() const { if (m_root == b2_nullNode) { return 0.0f; } const b2TreeNode* root = m_nodes + m_root; float rootArea = root->aabb.GetPerimeter(); float totalArea = 0.0f; for (int32 i = 0; i < m_nodeCapacity; ++i) { const b2TreeNode* node = m_nodes + i; if (node->height < 0) { // Free node in pool continue; } totalArea += node->aabb.GetPerimeter(); } return totalArea / rootArea; } // Compute the height of a sub-tree. int32 b2DynamicTree::ComputeHeight(int32 nodeId) const { b2Assert(0 <= nodeId && nodeId < m_nodeCapacity); b2TreeNode* node = m_nodes + nodeId; if (node->IsLeaf()) { return 0; } int32 height1 = ComputeHeight(node->child1); int32 height2 = ComputeHeight(node->child2); return 1 + b2Max(height1, height2); } int32 b2DynamicTree::ComputeHeight() const { int32 height = ComputeHeight(m_root); return height; } void b2DynamicTree::ValidateStructure(int32 index) const { if (index == b2_nullNode) { return; } if (index == m_root) { b2Assert(m_nodes[index].parent == b2_nullNode); } const b2TreeNode* node = m_nodes + index; int32 child1 = node->child1; int32 child2 = node->child2; if (node->IsLeaf()) { b2Assert(child1 == b2_nullNode); b2Assert(child2 == b2_nullNode); b2Assert(node->height == 0); return; } b2Assert(0 <= child1 && child1 < m_nodeCapacity); b2Assert(0 <= child2 && child2 < m_nodeCapacity); b2Assert(m_nodes[child1].parent == index); b2Assert(m_nodes[child2].parent == index); ValidateStructure(child1); ValidateStructure(child2); } void b2DynamicTree::ValidateMetrics(int32 index) const { if (index == b2_nullNode) { return; } const b2TreeNode* node = m_nodes + index; int32 child1 = node->child1; int32 child2 = node->child2; if (node->IsLeaf()) { b2Assert(child1 == b2_nullNode); b2Assert(child2 == b2_nullNode); b2Assert(node->height == 0); return; } b2Assert(0 <= child1 && child1 < m_nodeCapacity); b2Assert(0 <= child2 && child2 < m_nodeCapacity); int32 height1 = m_nodes[child1].height; int32 height2 = m_nodes[child2].height; int32 height; height = 1 + b2Max(height1, height2); b2Assert(node->height == height); b2AABB aabb; aabb.Combine(m_nodes[child1].aabb, m_nodes[child2].aabb); b2Assert(aabb.lowerBound == node->aabb.lowerBound); b2Assert(aabb.upperBound == node->aabb.upperBound); ValidateMetrics(child1); ValidateMetrics(child2); } void b2DynamicTree::Validate() const { #if defined(b2DEBUG) ValidateStructure(m_root); ValidateMetrics(m_root); int32 freeCount = 0; int32 freeIndex = m_freeList; while (freeIndex != b2_nullNode) { b2Assert(0 <= freeIndex && freeIndex < m_nodeCapacity); freeIndex = m_nodes[freeIndex].next; ++freeCount; } b2Assert(GetHeight() == ComputeHeight()); b2Assert(m_nodeCount + freeCount == m_nodeCapacity); #endif } int32 b2DynamicTree::GetMaxBalance() const { int32 maxBalance = 0; for (int32 i = 0; i < m_nodeCapacity; ++i) { const b2TreeNode* node = m_nodes + i; if (node->height <= 1) { continue; } b2Assert(node->IsLeaf() == false); int32 child1 = node->child1; int32 child2 = node->child2; int32 balance = b2Abs(m_nodes[child2].height - m_nodes[child1].height); maxBalance = b2Max(maxBalance, balance); } return maxBalance; } void b2DynamicTree::RebuildBottomUp() { int32* nodes = (int32*)b2Alloc(m_nodeCount * sizeof(int32)); int32 count = 0; // Build array of leaves. Free the rest. for (int32 i = 0; i < m_nodeCapacity; ++i) { if (m_nodes[i].height < 0) { // free node in pool continue; } if (m_nodes[i].IsLeaf()) { m_nodes[i].parent = b2_nullNode; nodes[count] = i; ++count; } else { FreeNode(i); } } while (count > 1) { float minCost = b2_maxFloat; int32 iMin = -1, jMin = -1; for (int32 i = 0; i < count; ++i) { b2AABB aabbi = m_nodes[nodes[i]].aabb; for (int32 j = i + 1; j < count; ++j) { b2AABB aabbj = m_nodes[nodes[j]].aabb; b2AABB b; b.Combine(aabbi, aabbj); float cost = b.GetPerimeter(); if (cost < minCost) { iMin = i; jMin = j; minCost = cost; } } } int32 index1 = nodes[iMin]; int32 index2 = nodes[jMin]; b2TreeNode* child1 = m_nodes + index1; b2TreeNode* child2 = m_nodes + index2; int32 parentIndex = AllocateNode(); b2TreeNode* parent = m_nodes + parentIndex; parent->child1 = index1; parent->child2 = index2; parent->height = 1 + b2Max(child1->height, child2->height); parent->aabb.Combine(child1->aabb, child2->aabb); parent->parent = b2_nullNode; child1->parent = parentIndex; child2->parent = parentIndex; nodes[jMin] = nodes[count-1]; nodes[iMin] = parentIndex; --count; } m_root = nodes[0]; b2Free(nodes); Validate(); } void b2DynamicTree::ShiftOrigin(const b2Vec2& newOrigin) { // Build array of leaves. Free the rest. for (int32 i = 0; i < m_nodeCapacity; ++i) { m_nodes[i].aabb.lowerBound -= newOrigin; m_nodes[i].aabb.upperBound -= newOrigin; } } ================================================ FILE: src/libraries/box2d/collision/b2_edge_shape.cpp ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #include "box2d/b2_edge_shape.h" #include "box2d/b2_block_allocator.h" #include void b2EdgeShape::SetOneSided(const b2Vec2& v0, const b2Vec2& v1, const b2Vec2& v2, const b2Vec2& v3) { m_vertex0 = v0; m_vertex1 = v1; m_vertex2 = v2; m_vertex3 = v3; m_oneSided = true; } void b2EdgeShape::SetTwoSided(const b2Vec2& v1, const b2Vec2& v2) { m_vertex1 = v1; m_vertex2 = v2; m_oneSided = false; } b2Shape* b2EdgeShape::Clone(b2BlockAllocator* allocator) const { void* mem = allocator->Allocate(sizeof(b2EdgeShape)); b2EdgeShape* clone = new (mem) b2EdgeShape; *clone = *this; return clone; } int32 b2EdgeShape::GetChildCount() const { return 1; } bool b2EdgeShape::TestPoint(const b2Transform& xf, const b2Vec2& p) const { B2_NOT_USED(xf); B2_NOT_USED(p); return false; } // p = p1 + t * d // v = v1 + s * e // p1 + t * d = v1 + s * e // s * e - t * d = p1 - v1 bool b2EdgeShape::RayCast(b2RayCastOutput* output, const b2RayCastInput& input, const b2Transform& xf, int32 childIndex) const { B2_NOT_USED(childIndex); // Put the ray into the edge's frame of reference. b2Vec2 p1 = b2MulT(xf.q, input.p1 - xf.p); b2Vec2 p2 = b2MulT(xf.q, input.p2 - xf.p); b2Vec2 d = p2 - p1; b2Vec2 v1 = m_vertex1; b2Vec2 v2 = m_vertex2; b2Vec2 e = v2 - v1; // Normal points to the right, looking from v1 at v2 b2Vec2 normal(e.y, -e.x); normal.Normalize(); // q = p1 + t * d // dot(normal, q - v1) = 0 // dot(normal, p1 - v1) + t * dot(normal, d) = 0 float numerator = b2Dot(normal, v1 - p1); if (m_oneSided && numerator > 0.0f) { return false; } float denominator = b2Dot(normal, d); if (denominator == 0.0f) { return false; } float t = numerator / denominator; if (t < 0.0f || input.maxFraction < t) { return false; } b2Vec2 q = p1 + t * d; // q = v1 + s * r // s = dot(q - v1, r) / dot(r, r) b2Vec2 r = v2 - v1; float rr = b2Dot(r, r); if (rr == 0.0f) { return false; } float s = b2Dot(q - v1, r) / rr; if (s < 0.0f || 1.0f < s) { return false; } output->fraction = t; if (numerator > 0.0f) { output->normal = -b2Mul(xf.q, normal); } else { output->normal = b2Mul(xf.q, normal); } return true; } void b2EdgeShape::ComputeAABB(b2AABB* aabb, const b2Transform& xf, int32 childIndex) const { B2_NOT_USED(childIndex); b2Vec2 v1 = b2Mul(xf, m_vertex1); b2Vec2 v2 = b2Mul(xf, m_vertex2); b2Vec2 lower = b2Min(v1, v2); b2Vec2 upper = b2Max(v1, v2); b2Vec2 r(m_radius, m_radius); aabb->lowerBound = lower - r; aabb->upperBound = upper + r; } void b2EdgeShape::ComputeMass(b2MassData* massData, float density) const { B2_NOT_USED(density); massData->mass = 0.0f; massData->center = 0.5f * (m_vertex1 + m_vertex2); massData->I = 0.0f; } ================================================ FILE: src/libraries/box2d/collision/b2_polygon_shape.cpp ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #include "box2d/b2_polygon_shape.h" #include "box2d/b2_block_allocator.h" #include b2Shape* b2PolygonShape::Clone(b2BlockAllocator* allocator) const { void* mem = allocator->Allocate(sizeof(b2PolygonShape)); b2PolygonShape* clone = new (mem) b2PolygonShape; *clone = *this; return clone; } void b2PolygonShape::SetAsBox(float hx, float hy) { m_count = 4; m_vertices[0].Set(-hx, -hy); m_vertices[1].Set( hx, -hy); m_vertices[2].Set( hx, hy); m_vertices[3].Set(-hx, hy); m_normals[0].Set(0.0f, -1.0f); m_normals[1].Set(1.0f, 0.0f); m_normals[2].Set(0.0f, 1.0f); m_normals[3].Set(-1.0f, 0.0f); m_centroid.SetZero(); } void b2PolygonShape::SetAsBox(float hx, float hy, const b2Vec2& center, float angle) { m_count = 4; m_vertices[0].Set(-hx, -hy); m_vertices[1].Set( hx, -hy); m_vertices[2].Set( hx, hy); m_vertices[3].Set(-hx, hy); m_normals[0].Set(0.0f, -1.0f); m_normals[1].Set(1.0f, 0.0f); m_normals[2].Set(0.0f, 1.0f); m_normals[3].Set(-1.0f, 0.0f); m_centroid = center; b2Transform xf; xf.p = center; xf.q.Set(angle); // Transform vertices and normals. for (int32 i = 0; i < m_count; ++i) { m_vertices[i] = b2Mul(xf, m_vertices[i]); m_normals[i] = b2Mul(xf.q, m_normals[i]); } } int32 b2PolygonShape::GetChildCount() const { return 1; } static b2Vec2 ComputeCentroid(const b2Vec2* vs, int32 count) { b2Assert(count >= 3); b2Vec2 c(0.0f, 0.0f); float area = 0.0f; // Get a reference point for forming triangles. // Use the first vertex to reduce round-off errors. b2Vec2 s = vs[0]; const float inv3 = 1.0f / 3.0f; for (int32 i = 0; i < count; ++i) { // Triangle vertices. b2Vec2 p1 = vs[0] - s; b2Vec2 p2 = vs[i] - s; b2Vec2 p3 = i + 1 < count ? vs[i+1] - s : vs[0] - s; b2Vec2 e1 = p2 - p1; b2Vec2 e2 = p3 - p1; float D = b2Cross(e1, e2); float triangleArea = 0.5f * D; area += triangleArea; // Area weighted centroid c += triangleArea * inv3 * (p1 + p2 + p3); } // Centroid b2Assert(area > b2_epsilon); c = (1.0f / area) * c + s; return c; } void b2PolygonShape::Set(const b2Vec2* vertices, int32 count) { b2Assert(3 <= count && count <= b2_maxPolygonVertices); if (count < 3) { SetAsBox(1.0f, 1.0f); return; } int32 n = b2Min(count, b2_maxPolygonVertices); // Perform welding and copy vertices into local buffer. b2Vec2 ps[b2_maxPolygonVertices]; int32 tempCount = 0; for (int32 i = 0; i < n; ++i) { b2Vec2 v = vertices[i]; bool unique = true; for (int32 j = 0; j < tempCount; ++j) { if (b2DistanceSquared(v, ps[j]) < ((0.5f * b2_linearSlop) * (0.5f * b2_linearSlop))) { unique = false; break; } } if (unique) { ps[tempCount++] = v; } } n = tempCount; if (n < 3) { // Polygon is degenerate. b2Assert(false); SetAsBox(1.0f, 1.0f); return; } // Create the convex hull using the Gift wrapping algorithm // http://en.wikipedia.org/wiki/Gift_wrapping_algorithm // Find the right most point on the hull int32 i0 = 0; float x0 = ps[0].x; for (int32 i = 1; i < n; ++i) { float x = ps[i].x; if (x > x0 || (x == x0 && ps[i].y < ps[i0].y)) { i0 = i; x0 = x; } } int32 hull[b2_maxPolygonVertices]; int32 m = 0; int32 ih = i0; for (;;) { b2Assert(m < b2_maxPolygonVertices); hull[m] = ih; int32 ie = 0; for (int32 j = 1; j < n; ++j) { if (ie == ih) { ie = j; continue; } b2Vec2 r = ps[ie] - ps[hull[m]]; b2Vec2 v = ps[j] - ps[hull[m]]; float c = b2Cross(r, v); if (c < 0.0f) { ie = j; } // Collinearity check if (c == 0.0f && v.LengthSquared() > r.LengthSquared()) { ie = j; } } ++m; ih = ie; if (ie == i0) { break; } } if (m < 3) { // Polygon is degenerate. b2Assert(false); SetAsBox(1.0f, 1.0f); return; } m_count = m; // Copy vertices. for (int32 i = 0; i < m; ++i) { m_vertices[i] = ps[hull[i]]; } // Compute normals. Ensure the edges have non-zero length. for (int32 i = 0; i < m; ++i) { int32 i1 = i; int32 i2 = i + 1 < m ? i + 1 : 0; b2Vec2 edge = m_vertices[i2] - m_vertices[i1]; b2Assert(edge.LengthSquared() > b2_epsilon * b2_epsilon); m_normals[i] = b2Cross(edge, 1.0f); m_normals[i].Normalize(); } // Compute the polygon centroid. m_centroid = ComputeCentroid(m_vertices, m); } bool b2PolygonShape::TestPoint(const b2Transform& xf, const b2Vec2& p) const { b2Vec2 pLocal = b2MulT(xf.q, p - xf.p); for (int32 i = 0; i < m_count; ++i) { float dot = b2Dot(m_normals[i], pLocal - m_vertices[i]); if (dot > 0.0f) { return false; } } return true; } bool b2PolygonShape::RayCast(b2RayCastOutput* output, const b2RayCastInput& input, const b2Transform& xf, int32 childIndex) const { B2_NOT_USED(childIndex); // Put the ray into the polygon's frame of reference. b2Vec2 p1 = b2MulT(xf.q, input.p1 - xf.p); b2Vec2 p2 = b2MulT(xf.q, input.p2 - xf.p); b2Vec2 d = p2 - p1; float lower = 0.0f, upper = input.maxFraction; int32 index = -1; for (int32 i = 0; i < m_count; ++i) { // p = p1 + a * d // dot(normal, p - v) = 0 // dot(normal, p1 - v) + a * dot(normal, d) = 0 float numerator = b2Dot(m_normals[i], m_vertices[i] - p1); float denominator = b2Dot(m_normals[i], d); if (denominator == 0.0f) { if (numerator < 0.0f) { return false; } } else { // Note: we want this predicate without division: // lower < numerator / denominator, where denominator < 0 // Since denominator < 0, we have to flip the inequality: // lower < numerator / denominator <==> denominator * lower > numerator. if (denominator < 0.0f && numerator < lower * denominator) { // Increase lower. // The segment enters this half-space. lower = numerator / denominator; index = i; } else if (denominator > 0.0f && numerator < upper * denominator) { // Decrease upper. // The segment exits this half-space. upper = numerator / denominator; } } // The use of epsilon here causes the assert on lower to trip // in some cases. Apparently the use of epsilon was to make edge // shapes work, but now those are handled separately. //if (upper < lower - b2_epsilon) if (upper < lower) { return false; } } b2Assert(0.0f <= lower && lower <= input.maxFraction); if (index >= 0) { output->fraction = lower; output->normal = b2Mul(xf.q, m_normals[index]); return true; } return false; } void b2PolygonShape::ComputeAABB(b2AABB* aabb, const b2Transform& xf, int32 childIndex) const { B2_NOT_USED(childIndex); b2Vec2 lower = b2Mul(xf, m_vertices[0]); b2Vec2 upper = lower; for (int32 i = 1; i < m_count; ++i) { b2Vec2 v = b2Mul(xf, m_vertices[i]); lower = b2Min(lower, v); upper = b2Max(upper, v); } b2Vec2 r(m_radius, m_radius); aabb->lowerBound = lower - r; aabb->upperBound = upper + r; } void b2PolygonShape::ComputeMass(b2MassData* massData, float density) const { // Polygon mass, centroid, and inertia. // Let rho be the polygon density in mass per unit area. // Then: // mass = rho * int(dA) // centroid.x = (1/mass) * rho * int(x * dA) // centroid.y = (1/mass) * rho * int(y * dA) // I = rho * int((x*x + y*y) * dA) // // We can compute these integrals by summing all the integrals // for each triangle of the polygon. To evaluate the integral // for a single triangle, we make a change of variables to // the (u,v) coordinates of the triangle: // x = x0 + e1x * u + e2x * v // y = y0 + e1y * u + e2y * v // where 0 <= u && 0 <= v && u + v <= 1. // // We integrate u from [0,1-v] and then v from [0,1]. // We also need to use the Jacobian of the transformation: // D = cross(e1, e2) // // Simplification: triangle centroid = (1/3) * (p1 + p2 + p3) // // The rest of the derivation is handled by computer algebra. b2Assert(m_count >= 3); b2Vec2 center(0.0f, 0.0f); float area = 0.0f; float I = 0.0f; // Get a reference point for forming triangles. // Use the first vertex to reduce round-off errors. b2Vec2 s = m_vertices[0]; const float k_inv3 = 1.0f / 3.0f; for (int32 i = 0; i < m_count; ++i) { // Triangle vertices. b2Vec2 e1 = m_vertices[i] - s; b2Vec2 e2 = i + 1 < m_count ? m_vertices[i+1] - s : m_vertices[0] - s; float D = b2Cross(e1, e2); float triangleArea = 0.5f * D; area += triangleArea; // Area weighted centroid center += triangleArea * k_inv3 * (e1 + e2); float ex1 = e1.x, ey1 = e1.y; float ex2 = e2.x, ey2 = e2.y; float intx2 = ex1*ex1 + ex2*ex1 + ex2*ex2; float inty2 = ey1*ey1 + ey2*ey1 + ey2*ey2; I += (0.25f * k_inv3 * D) * (intx2 + inty2); } // Total mass massData->mass = density * area; // Center of mass b2Assert(area > b2_epsilon); center *= 1.0f / area; massData->center = center + s; // Inertia tensor relative to the local origin (point s). massData->I = density * I; // Shift to center of mass then to original body origin. massData->I += massData->mass * (b2Dot(massData->center, massData->center) - b2Dot(center, center)); } bool b2PolygonShape::Validate() const { for (int32 i = 0; i < m_count; ++i) { int32 i1 = i; int32 i2 = i < m_count - 1 ? i1 + 1 : 0; b2Vec2 p = m_vertices[i1]; b2Vec2 e = m_vertices[i2] - p; for (int32 j = 0; j < m_count; ++j) { if (j == i1 || j == i2) { continue; } b2Vec2 v = m_vertices[j] - p; float c = b2Cross(e, v); if (c < 0.0f) { return false; } } } return true; } ================================================ FILE: src/libraries/box2d/collision/b2_time_of_impact.cpp ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #include "box2d/b2_collision.h" #include "box2d/b2_distance.h" #include "box2d/b2_circle_shape.h" #include "box2d/b2_polygon_shape.h" #include "box2d/b2_time_of_impact.h" #include "box2d/b2_timer.h" #include B2_API float b2_toiTime, b2_toiMaxTime; B2_API int32 b2_toiCalls, b2_toiIters, b2_toiMaxIters; B2_API int32 b2_toiRootIters, b2_toiMaxRootIters; // struct b2SeparationFunction { enum Type { e_points, e_faceA, e_faceB }; // TODO_ERIN might not need to return the separation float Initialize(const b2SimplexCache* cache, const b2DistanceProxy* proxyA, const b2Sweep& sweepA, const b2DistanceProxy* proxyB, const b2Sweep& sweepB, float t1) { m_proxyA = proxyA; m_proxyB = proxyB; int32 count = cache->count; b2Assert(0 < count && count < 3); m_sweepA = sweepA; m_sweepB = sweepB; b2Transform xfA, xfB; m_sweepA.GetTransform(&xfA, t1); m_sweepB.GetTransform(&xfB, t1); if (count == 1) { m_type = e_points; b2Vec2 localPointA = m_proxyA->GetVertex(cache->indexA[0]); b2Vec2 localPointB = m_proxyB->GetVertex(cache->indexB[0]); b2Vec2 pointA = b2Mul(xfA, localPointA); b2Vec2 pointB = b2Mul(xfB, localPointB); m_axis = pointB - pointA; float s = m_axis.Normalize(); return s; } else if (cache->indexA[0] == cache->indexA[1]) { // Two points on B and one on A. m_type = e_faceB; b2Vec2 localPointB1 = proxyB->GetVertex(cache->indexB[0]); b2Vec2 localPointB2 = proxyB->GetVertex(cache->indexB[1]); m_axis = b2Cross(localPointB2 - localPointB1, 1.0f); m_axis.Normalize(); b2Vec2 normal = b2Mul(xfB.q, m_axis); m_localPoint = 0.5f * (localPointB1 + localPointB2); b2Vec2 pointB = b2Mul(xfB, m_localPoint); b2Vec2 localPointA = proxyA->GetVertex(cache->indexA[0]); b2Vec2 pointA = b2Mul(xfA, localPointA); float s = b2Dot(pointA - pointB, normal); if (s < 0.0f) { m_axis = -m_axis; s = -s; } return s; } else { // Two points on A and one or two points on B. m_type = e_faceA; b2Vec2 localPointA1 = m_proxyA->GetVertex(cache->indexA[0]); b2Vec2 localPointA2 = m_proxyA->GetVertex(cache->indexA[1]); m_axis = b2Cross(localPointA2 - localPointA1, 1.0f); m_axis.Normalize(); b2Vec2 normal = b2Mul(xfA.q, m_axis); m_localPoint = 0.5f * (localPointA1 + localPointA2); b2Vec2 pointA = b2Mul(xfA, m_localPoint); b2Vec2 localPointB = m_proxyB->GetVertex(cache->indexB[0]); b2Vec2 pointB = b2Mul(xfB, localPointB); float s = b2Dot(pointB - pointA, normal); if (s < 0.0f) { m_axis = -m_axis; s = -s; } return s; } } // float FindMinSeparation(int32* indexA, int32* indexB, float t) const { b2Transform xfA, xfB; m_sweepA.GetTransform(&xfA, t); m_sweepB.GetTransform(&xfB, t); switch (m_type) { case e_points: { b2Vec2 axisA = b2MulT(xfA.q, m_axis); b2Vec2 axisB = b2MulT(xfB.q, -m_axis); *indexA = m_proxyA->GetSupport(axisA); *indexB = m_proxyB->GetSupport(axisB); b2Vec2 localPointA = m_proxyA->GetVertex(*indexA); b2Vec2 localPointB = m_proxyB->GetVertex(*indexB); b2Vec2 pointA = b2Mul(xfA, localPointA); b2Vec2 pointB = b2Mul(xfB, localPointB); float separation = b2Dot(pointB - pointA, m_axis); return separation; } case e_faceA: { b2Vec2 normal = b2Mul(xfA.q, m_axis); b2Vec2 pointA = b2Mul(xfA, m_localPoint); b2Vec2 axisB = b2MulT(xfB.q, -normal); *indexA = -1; *indexB = m_proxyB->GetSupport(axisB); b2Vec2 localPointB = m_proxyB->GetVertex(*indexB); b2Vec2 pointB = b2Mul(xfB, localPointB); float separation = b2Dot(pointB - pointA, normal); return separation; } case e_faceB: { b2Vec2 normal = b2Mul(xfB.q, m_axis); b2Vec2 pointB = b2Mul(xfB, m_localPoint); b2Vec2 axisA = b2MulT(xfA.q, -normal); *indexB = -1; *indexA = m_proxyA->GetSupport(axisA); b2Vec2 localPointA = m_proxyA->GetVertex(*indexA); b2Vec2 pointA = b2Mul(xfA, localPointA); float separation = b2Dot(pointA - pointB, normal); return separation; } default: b2Assert(false); *indexA = -1; *indexB = -1; return 0.0f; } } // float Evaluate(int32 indexA, int32 indexB, float t) const { b2Transform xfA, xfB; m_sweepA.GetTransform(&xfA, t); m_sweepB.GetTransform(&xfB, t); switch (m_type) { case e_points: { b2Vec2 localPointA = m_proxyA->GetVertex(indexA); b2Vec2 localPointB = m_proxyB->GetVertex(indexB); b2Vec2 pointA = b2Mul(xfA, localPointA); b2Vec2 pointB = b2Mul(xfB, localPointB); float separation = b2Dot(pointB - pointA, m_axis); return separation; } case e_faceA: { b2Vec2 normal = b2Mul(xfA.q, m_axis); b2Vec2 pointA = b2Mul(xfA, m_localPoint); b2Vec2 localPointB = m_proxyB->GetVertex(indexB); b2Vec2 pointB = b2Mul(xfB, localPointB); float separation = b2Dot(pointB - pointA, normal); return separation; } case e_faceB: { b2Vec2 normal = b2Mul(xfB.q, m_axis); b2Vec2 pointB = b2Mul(xfB, m_localPoint); b2Vec2 localPointA = m_proxyA->GetVertex(indexA); b2Vec2 pointA = b2Mul(xfA, localPointA); float separation = b2Dot(pointA - pointB, normal); return separation; } default: b2Assert(false); return 0.0f; } } const b2DistanceProxy* m_proxyA; const b2DistanceProxy* m_proxyB; b2Sweep m_sweepA, m_sweepB; Type m_type; b2Vec2 m_localPoint; b2Vec2 m_axis; }; // CCD via the local separating axis method. This seeks progression // by computing the largest time at which separation is maintained. void b2TimeOfImpact(b2TOIOutput* output, const b2TOIInput* input) { b2Timer timer; ++b2_toiCalls; output->state = b2TOIOutput::e_unknown; output->t = input->tMax; const b2DistanceProxy* proxyA = &input->proxyA; const b2DistanceProxy* proxyB = &input->proxyB; b2Sweep sweepA = input->sweepA; b2Sweep sweepB = input->sweepB; // Large rotations can make the root finder fail, so we normalize the // sweep angles. sweepA.Normalize(); sweepB.Normalize(); float tMax = input->tMax; float totalRadius = proxyA->m_radius + proxyB->m_radius; float target = b2Max(b2_linearSlop, totalRadius - 3.0f * b2_linearSlop); float tolerance = 0.25f * b2_linearSlop; b2Assert(target > tolerance); float t1 = 0.0f; const int32 k_maxIterations = 20; // TODO_ERIN b2Settings int32 iter = 0; // Prepare input for distance query. b2SimplexCache cache; cache.count = 0; b2DistanceInput distanceInput; distanceInput.proxyA = input->proxyA; distanceInput.proxyB = input->proxyB; distanceInput.useRadii = false; // The outer loop progressively attempts to compute new separating axes. // This loop terminates when an axis is repeated (no progress is made). for(;;) { b2Transform xfA, xfB; sweepA.GetTransform(&xfA, t1); sweepB.GetTransform(&xfB, t1); // Get the distance between shapes. We can also use the results // to get a separating axis. distanceInput.transformA = xfA; distanceInput.transformB = xfB; b2DistanceOutput distanceOutput; b2Distance(&distanceOutput, &cache, &distanceInput); // If the shapes are overlapped, we give up on continuous collision. if (distanceOutput.distance <= 0.0f) { // Failure! output->state = b2TOIOutput::e_overlapped; output->t = 0.0f; break; } if (distanceOutput.distance < target + tolerance) { // Victory! output->state = b2TOIOutput::e_touching; output->t = t1; break; } // Initialize the separating axis. b2SeparationFunction fcn; fcn.Initialize(&cache, proxyA, sweepA, proxyB, sweepB, t1); #if 0 // Dump the curve seen by the root finder { const int32 N = 100; float dx = 1.0f / N; float xs[N+1]; float fs[N+1]; float x = 0.0f; for (int32 i = 0; i <= N; ++i) { sweepA.GetTransform(&xfA, x); sweepB.GetTransform(&xfB, x); float f = fcn.Evaluate(xfA, xfB) - target; printf("%g %g\n", x, f); xs[i] = x; fs[i] = f; x += dx; } } #endif // Compute the TOI on the separating axis. We do this by successively // resolving the deepest point. This loop is bounded by the number of vertices. bool done = false; float t2 = tMax; int32 pushBackIter = 0; for (;;) { // Find the deepest point at t2. Store the witness point indices. int32 indexA, indexB; float s2 = fcn.FindMinSeparation(&indexA, &indexB, t2); // Is the final configuration separated? if (s2 > target + tolerance) { // Victory! output->state = b2TOIOutput::e_separated; output->t = tMax; done = true; break; } // Has the separation reached tolerance? if (s2 > target - tolerance) { // Advance the sweeps t1 = t2; break; } // Compute the initial separation of the witness points. float s1 = fcn.Evaluate(indexA, indexB, t1); // Check for initial overlap. This might happen if the root finder // runs out of iterations. if (s1 < target - tolerance) { output->state = b2TOIOutput::e_failed; output->t = t1; done = true; break; } // Check for touching if (s1 <= target + tolerance) { // Victory! t1 should hold the TOI (could be 0.0). output->state = b2TOIOutput::e_touching; output->t = t1; done = true; break; } // Compute 1D root of: f(x) - target = 0 int32 rootIterCount = 0; float a1 = t1, a2 = t2; for (;;) { // Use a mix of the secant rule and bisection. float t; if (rootIterCount & 1) { // Secant rule to improve convergence. t = a1 + (target - s1) * (a2 - a1) / (s2 - s1); } else { // Bisection to guarantee progress. t = 0.5f * (a1 + a2); } ++rootIterCount; ++b2_toiRootIters; float s = fcn.Evaluate(indexA, indexB, t); if (b2Abs(s - target) < tolerance) { // t2 holds a tentative value for t1 t2 = t; break; } // Ensure we continue to bracket the root. if (s > target) { a1 = t; s1 = s; } else { a2 = t; s2 = s; } if (rootIterCount == 50) { break; } } b2_toiMaxRootIters = b2Max(b2_toiMaxRootIters, rootIterCount); ++pushBackIter; if (pushBackIter == b2_maxPolygonVertices) { break; } } ++iter; ++b2_toiIters; if (done) { break; } if (iter == k_maxIterations) { // Root finder got stuck. Semi-victory. output->state = b2TOIOutput::e_failed; output->t = t1; break; } } b2_toiMaxIters = b2Max(b2_toiMaxIters, iter); float time = timer.GetMilliseconds(); b2_toiMaxTime = b2Max(b2_toiMaxTime, time); b2_toiTime += time; } ================================================ FILE: src/libraries/box2d/common/b2_block_allocator.cpp ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #include "box2d/b2_block_allocator.h" #include #include #include static const int32 b2_chunkSize = 16 * 1024; static const int32 b2_maxBlockSize = 640; static const int32 b2_chunkArrayIncrement = 128; // These are the supported object sizes. Actual allocations are rounded up the next size. static const int32 b2_blockSizes[b2_blockSizeCount] = { 16, // 0 32, // 1 64, // 2 96, // 3 128, // 4 160, // 5 192, // 6 224, // 7 256, // 8 320, // 9 384, // 10 448, // 11 512, // 12 640, // 13 }; // This maps an arbitrary allocation size to a suitable slot in b2_blockSizes. struct b2SizeMap { b2SizeMap() { int32 j = 0; values[0] = 0; for (int32 i = 1; i <= b2_maxBlockSize; ++i) { b2Assert(j < b2_blockSizeCount); if (i <= b2_blockSizes[j]) { values[i] = (uint8)j; } else { ++j; values[i] = (uint8)j; } } } uint8 values[b2_maxBlockSize + 1]; }; static const b2SizeMap b2_sizeMap; struct b2Chunk { int32 blockSize; b2Block* blocks; }; struct b2Block { b2Block* next; }; b2BlockAllocator::b2BlockAllocator() { b2Assert(b2_blockSizeCount < UCHAR_MAX); m_chunkSpace = b2_chunkArrayIncrement; m_chunkCount = 0; m_chunks = (b2Chunk*)b2Alloc(m_chunkSpace * sizeof(b2Chunk)); memset(m_chunks, 0, m_chunkSpace * sizeof(b2Chunk)); memset(m_freeLists, 0, sizeof(m_freeLists)); } b2BlockAllocator::~b2BlockAllocator() { for (int32 i = 0; i < m_chunkCount; ++i) { b2Free(m_chunks[i].blocks); } b2Free(m_chunks); } void* b2BlockAllocator::Allocate(int32 size) { if (size == 0) { return nullptr; } b2Assert(0 < size); if (size > b2_maxBlockSize) { return b2Alloc(size); } int32 index = b2_sizeMap.values[size]; b2Assert(0 <= index && index < b2_blockSizeCount); if (m_freeLists[index]) { b2Block* block = m_freeLists[index]; m_freeLists[index] = block->next; return block; } else { if (m_chunkCount == m_chunkSpace) { b2Chunk* oldChunks = m_chunks; m_chunkSpace += b2_chunkArrayIncrement; m_chunks = (b2Chunk*)b2Alloc(m_chunkSpace * sizeof(b2Chunk)); memcpy(m_chunks, oldChunks, m_chunkCount * sizeof(b2Chunk)); memset(m_chunks + m_chunkCount, 0, b2_chunkArrayIncrement * sizeof(b2Chunk)); b2Free(oldChunks); } b2Chunk* chunk = m_chunks + m_chunkCount; chunk->blocks = (b2Block*)b2Alloc(b2_chunkSize); #if defined(_DEBUG) memset(chunk->blocks, 0xcd, b2_chunkSize); #endif int32 blockSize = b2_blockSizes[index]; chunk->blockSize = blockSize; int32 blockCount = b2_chunkSize / blockSize; b2Assert(blockCount * blockSize <= b2_chunkSize); for (int32 i = 0; i < blockCount - 1; ++i) { b2Block* block = (b2Block*)((int8*)chunk->blocks + blockSize * i); b2Block* next = (b2Block*)((int8*)chunk->blocks + blockSize * (i + 1)); block->next = next; } b2Block* last = (b2Block*)((int8*)chunk->blocks + blockSize * (blockCount - 1)); last->next = nullptr; m_freeLists[index] = chunk->blocks->next; ++m_chunkCount; return chunk->blocks; } } void b2BlockAllocator::Free(void* p, int32 size) { if (size == 0) { return; } b2Assert(0 < size); if (size > b2_maxBlockSize) { b2Free(p); return; } int32 index = b2_sizeMap.values[size]; b2Assert(0 <= index && index < b2_blockSizeCount); #if defined(_DEBUG) // Verify the memory address and size is valid. int32 blockSize = b2_blockSizes[index]; bool found = false; for (int32 i = 0; i < m_chunkCount; ++i) { b2Chunk* chunk = m_chunks + i; if (chunk->blockSize != blockSize) { b2Assert( (int8*)p + blockSize <= (int8*)chunk->blocks || (int8*)chunk->blocks + b2_chunkSize <= (int8*)p); } else { if ((int8*)chunk->blocks <= (int8*)p && (int8*)p + blockSize <= (int8*)chunk->blocks + b2_chunkSize) { found = true; } } } b2Assert(found); memset(p, 0xfd, blockSize); #endif b2Block* block = (b2Block*)p; block->next = m_freeLists[index]; m_freeLists[index] = block; } void b2BlockAllocator::Clear() { for (int32 i = 0; i < m_chunkCount; ++i) { b2Free(m_chunks[i].blocks); } m_chunkCount = 0; memset(m_chunks, 0, m_chunkSpace * sizeof(b2Chunk)); memset(m_freeLists, 0, sizeof(m_freeLists)); } ================================================ FILE: src/libraries/box2d/common/b2_draw.cpp ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #include "box2d/b2_draw.h" b2Draw::b2Draw() { m_drawFlags = 0; } void b2Draw::SetFlags(uint32 flags) { m_drawFlags = flags; } uint32 b2Draw::GetFlags() const { return m_drawFlags; } void b2Draw::AppendFlags(uint32 flags) { m_drawFlags |= flags; } void b2Draw::ClearFlags(uint32 flags) { m_drawFlags &= ~flags; } ================================================ FILE: src/libraries/box2d/common/b2_math.cpp ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #include "box2d/b2_math.h" const b2Vec2 b2Vec2_zero(0.0f, 0.0f); /// Solve A * x = b, where b is a column vector. This is more efficient /// than computing the inverse in one-shot cases. b2Vec3 b2Mat33::Solve33(const b2Vec3& b) const { float det = b2Dot(ex, b2Cross(ey, ez)); if (det != 0.0f) { det = 1.0f / det; } b2Vec3 x; x.x = det * b2Dot(b, b2Cross(ey, ez)); x.y = det * b2Dot(ex, b2Cross(b, ez)); x.z = det * b2Dot(ex, b2Cross(ey, b)); return x; } /// Solve A * x = b, where b is a column vector. This is more efficient /// than computing the inverse in one-shot cases. b2Vec2 b2Mat33::Solve22(const b2Vec2& b) const { float a11 = ex.x, a12 = ey.x, a21 = ex.y, a22 = ey.y; float det = a11 * a22 - a12 * a21; if (det != 0.0f) { det = 1.0f / det; } b2Vec2 x; x.x = det * (a22 * b.x - a12 * b.y); x.y = det * (a11 * b.y - a21 * b.x); return x; } /// void b2Mat33::GetInverse22(b2Mat33* M) const { float a = ex.x, b = ey.x, c = ex.y, d = ey.y; float det = a * d - b * c; if (det != 0.0f) { det = 1.0f / det; } M->ex.x = det * d; M->ey.x = -det * b; M->ex.z = 0.0f; M->ex.y = -det * c; M->ey.y = det * a; M->ey.z = 0.0f; M->ez.x = 0.0f; M->ez.y = 0.0f; M->ez.z = 0.0f; } /// Returns the zero matrix if singular. void b2Mat33::GetSymInverse33(b2Mat33* M) const { float det = b2Dot(ex, b2Cross(ey, ez)); if (det != 0.0f) { det = 1.0f / det; } float a11 = ex.x, a12 = ey.x, a13 = ez.x; float a22 = ey.y, a23 = ez.y; float a33 = ez.z; M->ex.x = det * (a22 * a33 - a23 * a23); M->ex.y = det * (a13 * a23 - a12 * a33); M->ex.z = det * (a12 * a23 - a13 * a22); M->ey.x = M->ex.y; M->ey.y = det * (a11 * a33 - a13 * a13); M->ey.z = det * (a13 * a12 - a11 * a23); M->ez.x = M->ex.z; M->ez.y = M->ey.z; M->ez.z = det * (a11 * a22 - a12 * a12); } ================================================ FILE: src/libraries/box2d/common/b2_settings.cpp ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #define _CRT_SECURE_NO_WARNINGS #include "box2d/b2_settings.h" #include #include #include #include "common/Exception.h" b2Version b2_version = {2, 4, 0}; // Memory allocators. Modify these to use your own allocator. void* b2Alloc_Default(int32 size) { return malloc(size); } void b2Free_Default(void* mem) { free(mem); } // You can modify this to use your logging facility. void b2Log_Default(const char* string, va_list args) { vprintf(string, args); } void loveAssert(bool test, const char* teststr) { if (!test) throw love::Exception("Box2D assertion failed: %s", teststr); } FILE* b2_dumpFile = nullptr; void b2OpenDump(const char* fileName) { b2Assert(b2_dumpFile == nullptr); b2_dumpFile = fopen(fileName, "w"); } void b2Dump(const char* string, ...) { if (b2_dumpFile == nullptr) { return; } va_list args; va_start(args, string); vfprintf(b2_dumpFile, string, args); va_end(args); } void b2CloseDump() { fclose(b2_dumpFile); b2_dumpFile = nullptr; } ================================================ FILE: src/libraries/box2d/common/b2_stack_allocator.cpp ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #include "box2d/b2_stack_allocator.h" #include "box2d/b2_math.h" b2StackAllocator::b2StackAllocator() { m_index = 0; m_allocation = 0; m_maxAllocation = 0; m_entryCount = 0; } b2StackAllocator::~b2StackAllocator() { b2Assert(m_index == 0); b2Assert(m_entryCount == 0); } void* b2StackAllocator::Allocate(int32 size) { b2Assert(m_entryCount < b2_maxStackEntries); b2StackEntry* entry = m_entries + m_entryCount; entry->size = size; if (m_index + size > b2_stackSize) { entry->data = (char*)b2Alloc(size); entry->usedMalloc = true; } else { entry->data = m_data + m_index; entry->usedMalloc = false; m_index += size; } m_allocation += size; m_maxAllocation = b2Max(m_maxAllocation, m_allocation); ++m_entryCount; return entry->data; } void b2StackAllocator::Free(void* p) { b2Assert(m_entryCount > 0); b2StackEntry* entry = m_entries + m_entryCount - 1; b2Assert(p == entry->data); if (entry->usedMalloc) { b2Free(p); } else { m_index -= entry->size; } m_allocation -= entry->size; --m_entryCount; p = nullptr; } int32 b2StackAllocator::GetMaxAllocation() const { return m_maxAllocation; } ================================================ FILE: src/libraries/box2d/common/b2_timer.cpp ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #include "box2d/b2_timer.h" #if defined(_WIN32) double b2Timer::s_invFrequency = 0.0; #ifndef WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN #endif #include b2Timer::b2Timer() { LARGE_INTEGER largeInteger; if (s_invFrequency == 0.0) { QueryPerformanceFrequency(&largeInteger); s_invFrequency = double(largeInteger.QuadPart); if (s_invFrequency > 0.0) { s_invFrequency = 1000.0 / s_invFrequency; } } QueryPerformanceCounter(&largeInteger); m_start = double(largeInteger.QuadPart); } void b2Timer::Reset() { LARGE_INTEGER largeInteger; QueryPerformanceCounter(&largeInteger); m_start = double(largeInteger.QuadPart); } float b2Timer::GetMilliseconds() const { LARGE_INTEGER largeInteger; QueryPerformanceCounter(&largeInteger); double count = double(largeInteger.QuadPart); float ms = float(s_invFrequency * (count - m_start)); return ms; } #elif defined(__linux__) || defined (__APPLE__) #include b2Timer::b2Timer() { Reset(); } void b2Timer::Reset() { timeval t; gettimeofday(&t, 0); m_start_sec = t.tv_sec; m_start_usec = t.tv_usec; } float b2Timer::GetMilliseconds() const { timeval t; gettimeofday(&t, 0); time_t start_sec = m_start_sec; suseconds_t start_usec = m_start_usec; // http://www.gnu.org/software/libc/manual/html_node/Elapsed-Time.html if (t.tv_usec < start_usec) { int nsec = (start_usec - t.tv_usec) / 1000000 + 1; start_usec -= 1000000 * nsec; start_sec += nsec; } if (t.tv_usec - start_usec > 1000000) { int nsec = (t.tv_usec - start_usec) / 1000000; start_usec += 1000000 * nsec; start_sec -= nsec; } return 1000.0f * (t.tv_sec - start_sec) + 0.001f * (t.tv_usec - start_usec); } #else b2Timer::b2Timer() { } void b2Timer::Reset() { } float b2Timer::GetMilliseconds() const { return 0.0f; } #endif ================================================ FILE: src/libraries/box2d/dynamics/b2_body.cpp ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #include "box2d/b2_body.h" #include "box2d/b2_contact.h" #include "box2d/b2_fixture.h" #include "box2d/b2_joint.h" #include "box2d/b2_world.h" #include b2Body::b2Body(const b2BodyDef* bd, b2World* world) { b2Assert(bd->position.IsValid()); b2Assert(bd->linearVelocity.IsValid()); b2Assert(b2IsValid(bd->angle)); b2Assert(b2IsValid(bd->angularVelocity)); b2Assert(b2IsValid(bd->angularDamping) && bd->angularDamping >= 0.0f); b2Assert(b2IsValid(bd->linearDamping) && bd->linearDamping >= 0.0f); m_flags = 0; if (bd->bullet) { m_flags |= e_bulletFlag; } if (bd->fixedRotation) { m_flags |= e_fixedRotationFlag; } if (bd->allowSleep) { m_flags |= e_autoSleepFlag; } if (bd->awake && bd->type != b2_staticBody) { m_flags |= e_awakeFlag; } if (bd->enabled) { m_flags |= e_enabledFlag; } m_world = world; m_xf.p = bd->position; m_xf.q.Set(bd->angle); m_sweep.localCenter.SetZero(); m_sweep.c0 = m_xf.p; m_sweep.c = m_xf.p; m_sweep.a0 = bd->angle; m_sweep.a = bd->angle; m_sweep.alpha0 = 0.0f; m_jointList = nullptr; m_contactList = nullptr; m_prev = nullptr; m_next = nullptr; m_linearVelocity = bd->linearVelocity; m_angularVelocity = bd->angularVelocity; m_linearDamping = bd->linearDamping; m_angularDamping = bd->angularDamping; m_gravityScale = bd->gravityScale; m_force.SetZero(); m_torque = 0.0f; m_sleepTime = 0.0f; m_type = bd->type; m_mass = 0.0f; m_invMass = 0.0f; m_I = 0.0f; m_invI = 0.0f; m_userData = bd->userData; m_fixtureList = nullptr; m_fixtureCount = 0; } b2Body::~b2Body() { // shapes and joints are destroyed in b2World::Destroy } void b2Body::SetType(b2BodyType type) { b2Assert(m_world->IsLocked() == false); if (m_world->IsLocked() == true) { return; } if (m_type == type) { return; } m_type = type; ResetMassData(); if (m_type == b2_staticBody) { m_linearVelocity.SetZero(); m_angularVelocity = 0.0f; m_sweep.a0 = m_sweep.a; m_sweep.c0 = m_sweep.c; m_flags &= ~e_awakeFlag; SynchronizeFixtures(); } SetAwake(true); m_force.SetZero(); m_torque = 0.0f; // Delete the attached contacts. b2ContactEdge* ce = m_contactList; while (ce) { b2ContactEdge* ce0 = ce; ce = ce->next; m_world->m_contactManager.Destroy(ce0->contact); } m_contactList = nullptr; // Touch the proxies so that new contacts will be created (when appropriate) b2BroadPhase* broadPhase = &m_world->m_contactManager.m_broadPhase; for (b2Fixture* f = m_fixtureList; f; f = f->m_next) { int32 proxyCount = f->m_proxyCount; for (int32 i = 0; i < proxyCount; ++i) { broadPhase->TouchProxy(f->m_proxies[i].proxyId); } } } b2Fixture* b2Body::CreateFixture(const b2FixtureDef* def) { b2Assert(m_world->IsLocked() == false); if (m_world->IsLocked() == true) { return nullptr; } b2BlockAllocator* allocator = &m_world->m_blockAllocator; void* memory = allocator->Allocate(sizeof(b2Fixture)); b2Fixture* fixture = new (memory) b2Fixture; fixture->Create(allocator, this, def); if (m_flags & e_enabledFlag) { b2BroadPhase* broadPhase = &m_world->m_contactManager.m_broadPhase; fixture->CreateProxies(broadPhase, m_xf); } fixture->m_next = m_fixtureList; m_fixtureList = fixture; ++m_fixtureCount; fixture->m_body = this; // Adjust mass properties if needed. if (fixture->m_density > 0.0f) { ResetMassData(); } // Let the world know we have a new fixture. This will cause new contacts // to be created at the beginning of the next time step. m_world->m_newContacts = true; return fixture; } b2Fixture* b2Body::CreateFixture(const b2Shape* shape, float density) { b2FixtureDef def; def.shape = shape; def.density = density; return CreateFixture(&def); } void b2Body::DestroyFixture(b2Fixture* fixture) { if (fixture == NULL) { return; } b2Assert(m_world->IsLocked() == false); if (m_world->IsLocked() == true) { return; } b2Assert(fixture->m_body == this); // Remove the fixture from this body's singly linked list. b2Assert(m_fixtureCount > 0); b2Fixture** node = &m_fixtureList; bool found = false; while (*node != nullptr) { if (*node == fixture) { *node = fixture->m_next; found = true; break; } node = &(*node)->m_next; } // You tried to remove a shape that is not attached to this body. b2Assert(found); // Destroy any contacts associated with the fixture. b2ContactEdge* edge = m_contactList; while (edge) { b2Contact* c = edge->contact; edge = edge->next; b2Fixture* fixtureA = c->GetFixtureA(); b2Fixture* fixtureB = c->GetFixtureB(); if (fixture == fixtureA || fixture == fixtureB) { // This destroys the contact and removes it from // this body's contact list. m_world->m_contactManager.Destroy(c); } } b2BlockAllocator* allocator = &m_world->m_blockAllocator; if (m_flags & e_enabledFlag) { b2BroadPhase* broadPhase = &m_world->m_contactManager.m_broadPhase; fixture->DestroyProxies(broadPhase); } fixture->m_body = nullptr; fixture->m_next = nullptr; fixture->Destroy(allocator); fixture->~b2Fixture(); allocator->Free(fixture, sizeof(b2Fixture)); --m_fixtureCount; // Reset the mass data. ResetMassData(); } void b2Body::ResetMassData() { // Compute mass data from shapes. Each shape has its own density. m_mass = 0.0f; m_invMass = 0.0f; m_I = 0.0f; m_invI = 0.0f; m_sweep.localCenter.SetZero(); // Static and kinematic bodies have zero mass. if (m_type == b2_staticBody || m_type == b2_kinematicBody) { m_sweep.c0 = m_xf.p; m_sweep.c = m_xf.p; m_sweep.a0 = m_sweep.a; return; } b2Assert(m_type == b2_dynamicBody); // Accumulate mass over all fixtures. b2Vec2 localCenter = b2Vec2_zero; for (b2Fixture* f = m_fixtureList; f; f = f->m_next) { if (f->m_density == 0.0f) { continue; } b2MassData massData; f->GetMassData(&massData); m_mass += massData.mass; localCenter += massData.mass * massData.center; m_I += massData.I; } // Compute center of mass. if (m_mass > 0.0f) { m_invMass = 1.0f / m_mass; localCenter *= m_invMass; } if (m_I > 0.0f && (m_flags & e_fixedRotationFlag) == 0) { // Center the inertia about the center of mass. m_I -= m_mass * b2Dot(localCenter, localCenter); b2Assert(m_I > 0.0f); m_invI = 1.0f / m_I; } else { m_I = 0.0f; m_invI = 0.0f; } // Move center of mass. b2Vec2 oldCenter = m_sweep.c; m_sweep.localCenter = localCenter; m_sweep.c0 = m_sweep.c = b2Mul(m_xf, m_sweep.localCenter); // Update center of mass velocity. m_linearVelocity += b2Cross(m_angularVelocity, m_sweep.c - oldCenter); } void b2Body::SetMassData(const b2MassData* massData) { b2Assert(m_world->IsLocked() == false); if (m_world->IsLocked() == true) { return; } if (m_type != b2_dynamicBody) { return; } m_invMass = 0.0f; m_I = 0.0f; m_invI = 0.0f; m_mass = massData->mass; if (m_mass <= 0.0f) { m_mass = 1.0f; } m_invMass = 1.0f / m_mass; if (massData->I > 0.0f && (m_flags & b2Body::e_fixedRotationFlag) == 0) { m_I = massData->I - m_mass * b2Dot(massData->center, massData->center); b2Assert(m_I > 0.0f); m_invI = 1.0f / m_I; } // Move center of mass. b2Vec2 oldCenter = m_sweep.c; m_sweep.localCenter = massData->center; m_sweep.c0 = m_sweep.c = b2Mul(m_xf, m_sweep.localCenter); // Update center of mass velocity. m_linearVelocity += b2Cross(m_angularVelocity, m_sweep.c - oldCenter); } bool b2Body::ShouldCollide(const b2Body* other) const { // At least one body should be dynamic. if (m_type != b2_dynamicBody && other->m_type != b2_dynamicBody) { return false; } // Does a joint prevent collision? for (b2JointEdge* jn = m_jointList; jn; jn = jn->next) { if (jn->other == other) { if (jn->joint->m_collideConnected == false) { return false; } } } return true; } void b2Body::SetTransform(const b2Vec2& position, float angle) { b2Assert(m_world->IsLocked() == false); if (m_world->IsLocked() == true) { return; } m_xf.q.Set(angle); m_xf.p = position; m_sweep.c = b2Mul(m_xf, m_sweep.localCenter); m_sweep.a = angle; m_sweep.c0 = m_sweep.c; m_sweep.a0 = angle; b2BroadPhase* broadPhase = &m_world->m_contactManager.m_broadPhase; for (b2Fixture* f = m_fixtureList; f; f = f->m_next) { f->Synchronize(broadPhase, m_xf, m_xf); } // Check for new contacts the next step m_world->m_newContacts = true; } void b2Body::SynchronizeFixtures() { b2BroadPhase* broadPhase = &m_world->m_contactManager.m_broadPhase; if (m_flags & b2Body::e_awakeFlag) { b2Transform xf1; xf1.q.Set(m_sweep.a0); xf1.p = m_sweep.c0 - b2Mul(xf1.q, m_sweep.localCenter); for (b2Fixture* f = m_fixtureList; f; f = f->m_next) { f->Synchronize(broadPhase, xf1, m_xf); } } else { for (b2Fixture* f = m_fixtureList; f; f = f->m_next) { f->Synchronize(broadPhase, m_xf, m_xf); } } } void b2Body::SetEnabled(bool flag) { b2Assert(m_world->IsLocked() == false); if (flag == IsEnabled()) { return; } if (flag) { m_flags |= e_enabledFlag; // Create all proxies. b2BroadPhase* broadPhase = &m_world->m_contactManager.m_broadPhase; for (b2Fixture* f = m_fixtureList; f; f = f->m_next) { f->CreateProxies(broadPhase, m_xf); } // Contacts are created at the beginning of the next m_world->m_newContacts = true; } else { m_flags &= ~e_enabledFlag; // Destroy all proxies. b2BroadPhase* broadPhase = &m_world->m_contactManager.m_broadPhase; for (b2Fixture* f = m_fixtureList; f; f = f->m_next) { f->DestroyProxies(broadPhase); } // Destroy the attached contacts. b2ContactEdge* ce = m_contactList; while (ce) { b2ContactEdge* ce0 = ce; ce = ce->next; m_world->m_contactManager.Destroy(ce0->contact); } m_contactList = nullptr; } } void b2Body::SetFixedRotation(bool flag) { bool status = (m_flags & e_fixedRotationFlag) == e_fixedRotationFlag; if (status == flag) { return; } if (flag) { m_flags |= e_fixedRotationFlag; } else { m_flags &= ~e_fixedRotationFlag; } m_angularVelocity = 0.0f; ResetMassData(); } void b2Body::Dump() { int32 bodyIndex = m_islandIndex; // %.9g is sufficient to save and load the same value using text // FLT_DECIMAL_DIG == 9 b2Dump("{\n"); b2Dump(" b2BodyDef bd;\n"); b2Dump(" bd.type = b2BodyType(%d);\n", m_type); b2Dump(" bd.position.Set(%.9g, %.9g);\n", m_xf.p.x, m_xf.p.y); b2Dump(" bd.angle = %.9g;\n", m_sweep.a); b2Dump(" bd.linearVelocity.Set(%.9g, %.9g);\n", m_linearVelocity.x, m_linearVelocity.y); b2Dump(" bd.angularVelocity = %.9g;\n", m_angularVelocity); b2Dump(" bd.linearDamping = %.9g;\n", m_linearDamping); b2Dump(" bd.angularDamping = %.9g;\n", m_angularDamping); b2Dump(" bd.allowSleep = bool(%d);\n", m_flags & e_autoSleepFlag); b2Dump(" bd.awake = bool(%d);\n", m_flags & e_awakeFlag); b2Dump(" bd.fixedRotation = bool(%d);\n", m_flags & e_fixedRotationFlag); b2Dump(" bd.bullet = bool(%d);\n", m_flags & e_bulletFlag); b2Dump(" bd.enabled = bool(%d);\n", m_flags & e_enabledFlag); b2Dump(" bd.gravityScale = %.9g;\n", m_gravityScale); b2Dump(" bodies[%d] = m_world->CreateBody(&bd);\n", m_islandIndex); b2Dump("\n"); for (b2Fixture* f = m_fixtureList; f; f = f->m_next) { b2Dump(" {\n"); f->Dump(bodyIndex); b2Dump(" }\n"); } b2Dump("}\n"); } ================================================ FILE: src/libraries/box2d/dynamics/b2_chain_circle_contact.cpp ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #include "b2_chain_circle_contact.h" #include "box2d/b2_block_allocator.h" #include "box2d/b2_fixture.h" #include "box2d/b2_chain_shape.h" #include "box2d/b2_edge_shape.h" #include b2Contact* b2ChainAndCircleContact::Create(b2Fixture* fixtureA, int32 indexA, b2Fixture* fixtureB, int32 indexB, b2BlockAllocator* allocator) { void* mem = allocator->Allocate(sizeof(b2ChainAndCircleContact)); return new (mem) b2ChainAndCircleContact(fixtureA, indexA, fixtureB, indexB); } void b2ChainAndCircleContact::Destroy(b2Contact* contact, b2BlockAllocator* allocator) { ((b2ChainAndCircleContact*)contact)->~b2ChainAndCircleContact(); allocator->Free(contact, sizeof(b2ChainAndCircleContact)); } b2ChainAndCircleContact::b2ChainAndCircleContact(b2Fixture* fixtureA, int32 indexA, b2Fixture* fixtureB, int32 indexB) : b2Contact(fixtureA, indexA, fixtureB, indexB) { b2Assert(m_fixtureA->GetType() == b2Shape::e_chain); b2Assert(m_fixtureB->GetType() == b2Shape::e_circle); } void b2ChainAndCircleContact::Evaluate(b2Manifold* manifold, const b2Transform& xfA, const b2Transform& xfB) { b2ChainShape* chain = (b2ChainShape*)m_fixtureA->GetShape(); b2EdgeShape edge; chain->GetChildEdge(&edge, m_indexA); b2CollideEdgeAndCircle( manifold, &edge, xfA, (b2CircleShape*)m_fixtureB->GetShape(), xfB); } ================================================ FILE: src/libraries/box2d/dynamics/b2_chain_circle_contact.h ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #ifndef B2_CHAIN_AND_CIRCLE_CONTACT_H #define B2_CHAIN_AND_CIRCLE_CONTACT_H #include "box2d/b2_contact.h" class b2BlockAllocator; class b2ChainAndCircleContact : public b2Contact { public: static b2Contact* Create( b2Fixture* fixtureA, int32 indexA, b2Fixture* fixtureB, int32 indexB, b2BlockAllocator* allocator); static void Destroy(b2Contact* contact, b2BlockAllocator* allocator); b2ChainAndCircleContact(b2Fixture* fixtureA, int32 indexA, b2Fixture* fixtureB, int32 indexB); ~b2ChainAndCircleContact() {} void Evaluate(b2Manifold* manifold, const b2Transform& xfA, const b2Transform& xfB) override; }; #endif ================================================ FILE: src/libraries/box2d/dynamics/b2_chain_polygon_contact.cpp ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #include "b2_chain_polygon_contact.h" #include "box2d/b2_block_allocator.h" #include "box2d/b2_fixture.h" #include "box2d/b2_chain_shape.h" #include "box2d/b2_edge_shape.h" #include b2Contact* b2ChainAndPolygonContact::Create(b2Fixture* fixtureA, int32 indexA, b2Fixture* fixtureB, int32 indexB, b2BlockAllocator* allocator) { void* mem = allocator->Allocate(sizeof(b2ChainAndPolygonContact)); return new (mem) b2ChainAndPolygonContact(fixtureA, indexA, fixtureB, indexB); } void b2ChainAndPolygonContact::Destroy(b2Contact* contact, b2BlockAllocator* allocator) { ((b2ChainAndPolygonContact*)contact)->~b2ChainAndPolygonContact(); allocator->Free(contact, sizeof(b2ChainAndPolygonContact)); } b2ChainAndPolygonContact::b2ChainAndPolygonContact(b2Fixture* fixtureA, int32 indexA, b2Fixture* fixtureB, int32 indexB) : b2Contact(fixtureA, indexA, fixtureB, indexB) { b2Assert(m_fixtureA->GetType() == b2Shape::e_chain); b2Assert(m_fixtureB->GetType() == b2Shape::e_polygon); } void b2ChainAndPolygonContact::Evaluate(b2Manifold* manifold, const b2Transform& xfA, const b2Transform& xfB) { b2ChainShape* chain = (b2ChainShape*)m_fixtureA->GetShape(); b2EdgeShape edge; chain->GetChildEdge(&edge, m_indexA); b2CollideEdgeAndPolygon( manifold, &edge, xfA, (b2PolygonShape*)m_fixtureB->GetShape(), xfB); } ================================================ FILE: src/libraries/box2d/dynamics/b2_chain_polygon_contact.h ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #ifndef B2_CHAIN_AND_POLYGON_CONTACT_H #define B2_CHAIN_AND_POLYGON_CONTACT_H #include "box2d/b2_contact.h" class b2BlockAllocator; class b2ChainAndPolygonContact : public b2Contact { public: static b2Contact* Create( b2Fixture* fixtureA, int32 indexA, b2Fixture* fixtureB, int32 indexB, b2BlockAllocator* allocator); static void Destroy(b2Contact* contact, b2BlockAllocator* allocator); b2ChainAndPolygonContact(b2Fixture* fixtureA, int32 indexA, b2Fixture* fixtureB, int32 indexB); ~b2ChainAndPolygonContact() {} void Evaluate(b2Manifold* manifold, const b2Transform& xfA, const b2Transform& xfB) override; }; #endif ================================================ FILE: src/libraries/box2d/dynamics/b2_circle_contact.cpp ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #include "b2_circle_contact.h" #include "box2d/b2_block_allocator.h" #include "box2d/b2_body.h" #include "box2d/b2_fixture.h" #include "box2d/b2_time_of_impact.h" #include "box2d/b2_world_callbacks.h" #include b2Contact* b2CircleContact::Create(b2Fixture* fixtureA, int32, b2Fixture* fixtureB, int32, b2BlockAllocator* allocator) { void* mem = allocator->Allocate(sizeof(b2CircleContact)); return new (mem) b2CircleContact(fixtureA, fixtureB); } void b2CircleContact::Destroy(b2Contact* contact, b2BlockAllocator* allocator) { ((b2CircleContact*)contact)->~b2CircleContact(); allocator->Free(contact, sizeof(b2CircleContact)); } b2CircleContact::b2CircleContact(b2Fixture* fixtureA, b2Fixture* fixtureB) : b2Contact(fixtureA, 0, fixtureB, 0) { b2Assert(m_fixtureA->GetType() == b2Shape::e_circle); b2Assert(m_fixtureB->GetType() == b2Shape::e_circle); } void b2CircleContact::Evaluate(b2Manifold* manifold, const b2Transform& xfA, const b2Transform& xfB) { b2CollideCircles(manifold, (b2CircleShape*)m_fixtureA->GetShape(), xfA, (b2CircleShape*)m_fixtureB->GetShape(), xfB); } ================================================ FILE: src/libraries/box2d/dynamics/b2_circle_contact.h ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #ifndef B2_CIRCLE_CONTACT_H #define B2_CIRCLE_CONTACT_H #include "box2d/b2_contact.h" class b2BlockAllocator; class b2CircleContact : public b2Contact { public: static b2Contact* Create( b2Fixture* fixtureA, int32 indexA, b2Fixture* fixtureB, int32 indexB, b2BlockAllocator* allocator); static void Destroy(b2Contact* contact, b2BlockAllocator* allocator); b2CircleContact(b2Fixture* fixtureA, b2Fixture* fixtureB); ~b2CircleContact() {} void Evaluate(b2Manifold* manifold, const b2Transform& xfA, const b2Transform& xfB) override; }; #endif ================================================ FILE: src/libraries/box2d/dynamics/b2_contact.cpp ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #include "b2_chain_circle_contact.h" #include "b2_chain_polygon_contact.h" #include "b2_circle_contact.h" #include "b2_contact_solver.h" #include "b2_edge_circle_contact.h" #include "b2_edge_polygon_contact.h" #include "b2_polygon_circle_contact.h" #include "b2_polygon_contact.h" #include "box2d/b2_contact.h" #include "box2d/b2_block_allocator.h" #include "box2d/b2_body.h" #include "box2d/b2_collision.h" #include "box2d/b2_fixture.h" #include "box2d/b2_shape.h" #include "box2d/b2_time_of_impact.h" #include "box2d/b2_world.h" b2ContactRegister b2Contact::s_registers[b2Shape::e_typeCount][b2Shape::e_typeCount]; bool b2Contact::s_initialized = false; void b2Contact::InitializeRegisters() { AddType(b2CircleContact::Create, b2CircleContact::Destroy, b2Shape::e_circle, b2Shape::e_circle); AddType(b2PolygonAndCircleContact::Create, b2PolygonAndCircleContact::Destroy, b2Shape::e_polygon, b2Shape::e_circle); AddType(b2PolygonContact::Create, b2PolygonContact::Destroy, b2Shape::e_polygon, b2Shape::e_polygon); AddType(b2EdgeAndCircleContact::Create, b2EdgeAndCircleContact::Destroy, b2Shape::e_edge, b2Shape::e_circle); AddType(b2EdgeAndPolygonContact::Create, b2EdgeAndPolygonContact::Destroy, b2Shape::e_edge, b2Shape::e_polygon); AddType(b2ChainAndCircleContact::Create, b2ChainAndCircleContact::Destroy, b2Shape::e_chain, b2Shape::e_circle); AddType(b2ChainAndPolygonContact::Create, b2ChainAndPolygonContact::Destroy, b2Shape::e_chain, b2Shape::e_polygon); } void b2Contact::AddType(b2ContactCreateFcn* createFcn, b2ContactDestroyFcn* destoryFcn, b2Shape::Type type1, b2Shape::Type type2) { b2Assert(0 <= type1 && type1 < b2Shape::e_typeCount); b2Assert(0 <= type2 && type2 < b2Shape::e_typeCount); s_registers[type1][type2].createFcn = createFcn; s_registers[type1][type2].destroyFcn = destoryFcn; s_registers[type1][type2].primary = true; if (type1 != type2) { s_registers[type2][type1].createFcn = createFcn; s_registers[type2][type1].destroyFcn = destoryFcn; s_registers[type2][type1].primary = false; } } b2Contact* b2Contact::Create(b2Fixture* fixtureA, int32 indexA, b2Fixture* fixtureB, int32 indexB, b2BlockAllocator* allocator) { if (s_initialized == false) { InitializeRegisters(); s_initialized = true; } b2Shape::Type type1 = fixtureA->GetType(); b2Shape::Type type2 = fixtureB->GetType(); b2Assert(0 <= type1 && type1 < b2Shape::e_typeCount); b2Assert(0 <= type2 && type2 < b2Shape::e_typeCount); b2ContactCreateFcn* createFcn = s_registers[type1][type2].createFcn; if (createFcn) { if (s_registers[type1][type2].primary) { return createFcn(fixtureA, indexA, fixtureB, indexB, allocator); } else { return createFcn(fixtureB, indexB, fixtureA, indexA, allocator); } } else { return nullptr; } } void b2Contact::Destroy(b2Contact* contact, b2BlockAllocator* allocator) { b2Assert(s_initialized == true); b2Fixture* fixtureA = contact->m_fixtureA; b2Fixture* fixtureB = contact->m_fixtureB; if (contact->m_manifold.pointCount > 0 && fixtureA->IsSensor() == false && fixtureB->IsSensor() == false) { fixtureA->GetBody()->SetAwake(true); fixtureB->GetBody()->SetAwake(true); } b2Shape::Type typeA = fixtureA->GetType(); b2Shape::Type typeB = fixtureB->GetType(); b2Assert(0 <= typeA && typeA < b2Shape::e_typeCount); b2Assert(0 <= typeB && typeB < b2Shape::e_typeCount); b2ContactDestroyFcn* destroyFcn = s_registers[typeA][typeB].destroyFcn; destroyFcn(contact, allocator); } b2Contact::b2Contact(b2Fixture* fA, int32 indexA, b2Fixture* fB, int32 indexB) { m_flags = e_enabledFlag; m_fixtureA = fA; m_fixtureB = fB; m_indexA = indexA; m_indexB = indexB; m_manifold.pointCount = 0; m_prev = nullptr; m_next = nullptr; m_nodeA.contact = nullptr; m_nodeA.prev = nullptr; m_nodeA.next = nullptr; m_nodeA.other = nullptr; m_nodeB.contact = nullptr; m_nodeB.prev = nullptr; m_nodeB.next = nullptr; m_nodeB.other = nullptr; m_toiCount = 0; m_friction = b2MixFriction(m_fixtureA->m_friction, m_fixtureB->m_friction); m_restitution = b2MixRestitution(m_fixtureA->m_restitution, m_fixtureB->m_restitution); m_restitutionThreshold = b2MixRestitutionThreshold(m_fixtureA->m_restitutionThreshold, m_fixtureB->m_restitutionThreshold); m_tangentSpeed = 0.0f; } // Update the contact manifold and touching status. // Note: do not assume the fixture AABBs are overlapping or are valid. void b2Contact::Update(b2ContactListener* listener) { b2Manifold oldManifold = m_manifold; // Re-enable this contact. m_flags |= e_enabledFlag; bool touching = false; bool wasTouching = (m_flags & e_touchingFlag) == e_touchingFlag; bool sensorA = m_fixtureA->IsSensor(); bool sensorB = m_fixtureB->IsSensor(); bool sensor = sensorA || sensorB; b2Body* bodyA = m_fixtureA->GetBody(); b2Body* bodyB = m_fixtureB->GetBody(); const b2Transform& xfA = bodyA->GetTransform(); const b2Transform& xfB = bodyB->GetTransform(); // Is this contact a sensor? if (sensor) { const b2Shape* shapeA = m_fixtureA->GetShape(); const b2Shape* shapeB = m_fixtureB->GetShape(); touching = b2TestOverlap(shapeA, m_indexA, shapeB, m_indexB, xfA, xfB); // Sensors don't generate manifolds. m_manifold.pointCount = 0; } else { Evaluate(&m_manifold, xfA, xfB); touching = m_manifold.pointCount > 0; // Match old contact ids to new contact ids and copy the // stored impulses to warm start the solver. for (int32 i = 0; i < m_manifold.pointCount; ++i) { b2ManifoldPoint* mp2 = m_manifold.points + i; mp2->normalImpulse = 0.0f; mp2->tangentImpulse = 0.0f; b2ContactID id2 = mp2->id; for (int32 j = 0; j < oldManifold.pointCount; ++j) { b2ManifoldPoint* mp1 = oldManifold.points + j; if (mp1->id.key == id2.key) { mp2->normalImpulse = mp1->normalImpulse; mp2->tangentImpulse = mp1->tangentImpulse; break; } } } if (touching != wasTouching) { bodyA->SetAwake(true); bodyB->SetAwake(true); } } if (touching) { m_flags |= e_touchingFlag; } else { m_flags &= ~e_touchingFlag; } if (wasTouching == false && touching == true && listener) { listener->BeginContact(this); } if (wasTouching == true && touching == false && listener) { listener->EndContact(this); } if (sensor == false && touching && listener) { listener->PreSolve(this, &oldManifold); } } ================================================ FILE: src/libraries/box2d/dynamics/b2_contact_manager.cpp ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #include "box2d/b2_body.h" #include "box2d/b2_contact.h" #include "box2d/b2_contact_manager.h" #include "box2d/b2_fixture.h" #include "box2d/b2_world_callbacks.h" b2ContactFilter b2_defaultFilter; b2ContactListener b2_defaultListener; b2ContactManager::b2ContactManager() { m_contactList = nullptr; m_contactCount = 0; m_contactFilter = &b2_defaultFilter; m_contactListener = &b2_defaultListener; m_allocator = nullptr; } void b2ContactManager::Destroy(b2Contact* c) { b2Fixture* fixtureA = c->GetFixtureA(); b2Fixture* fixtureB = c->GetFixtureB(); b2Body* bodyA = fixtureA->GetBody(); b2Body* bodyB = fixtureB->GetBody(); if (m_contactListener && c->IsTouching()) { m_contactListener->EndContact(c); } // Remove from the world. if (c->m_prev) { c->m_prev->m_next = c->m_next; } if (c->m_next) { c->m_next->m_prev = c->m_prev; } if (c == m_contactList) { m_contactList = c->m_next; } // Remove from body 1 if (c->m_nodeA.prev) { c->m_nodeA.prev->next = c->m_nodeA.next; } if (c->m_nodeA.next) { c->m_nodeA.next->prev = c->m_nodeA.prev; } if (&c->m_nodeA == bodyA->m_contactList) { bodyA->m_contactList = c->m_nodeA.next; } // Remove from body 2 if (c->m_nodeB.prev) { c->m_nodeB.prev->next = c->m_nodeB.next; } if (c->m_nodeB.next) { c->m_nodeB.next->prev = c->m_nodeB.prev; } if (&c->m_nodeB == bodyB->m_contactList) { bodyB->m_contactList = c->m_nodeB.next; } // Call the factory. b2Contact::Destroy(c, m_allocator); --m_contactCount; } // This is the top level collision call for the time step. Here // all the narrow phase collision is processed for the world // contact list. void b2ContactManager::Collide() { // Update awake contacts. b2Contact* c = m_contactList; while (c) { b2Fixture* fixtureA = c->GetFixtureA(); b2Fixture* fixtureB = c->GetFixtureB(); int32 indexA = c->GetChildIndexA(); int32 indexB = c->GetChildIndexB(); b2Body* bodyA = fixtureA->GetBody(); b2Body* bodyB = fixtureB->GetBody(); // Is this contact flagged for filtering? if (c->m_flags & b2Contact::e_filterFlag) { // Should these bodies collide? if (bodyB->ShouldCollide(bodyA) == false) { b2Contact* cNuke = c; c = cNuke->GetNext(); Destroy(cNuke); continue; } // Check user filtering. if (m_contactFilter && m_contactFilter->ShouldCollide(fixtureA, fixtureB) == false) { b2Contact* cNuke = c; c = cNuke->GetNext(); Destroy(cNuke); continue; } // Clear the filtering flag. c->m_flags &= ~b2Contact::e_filterFlag; } bool activeA = bodyA->IsAwake() && bodyA->m_type != b2_staticBody; bool activeB = bodyB->IsAwake() && bodyB->m_type != b2_staticBody; // At least one body must be awake and it must be dynamic or kinematic. if (activeA == false && activeB == false) { c = c->GetNext(); continue; } int32 proxyIdA = fixtureA->m_proxies[indexA].proxyId; int32 proxyIdB = fixtureB->m_proxies[indexB].proxyId; bool overlap = m_broadPhase.TestOverlap(proxyIdA, proxyIdB); // Here we destroy contacts that cease to overlap in the broad-phase. if (overlap == false) { b2Contact* cNuke = c; c = cNuke->GetNext(); Destroy(cNuke); continue; } // The contact persists. c->Update(m_contactListener); c = c->GetNext(); } } void b2ContactManager::FindNewContacts() { m_broadPhase.UpdatePairs(this); } void b2ContactManager::AddPair(void* proxyUserDataA, void* proxyUserDataB) { b2FixtureProxy* proxyA = (b2FixtureProxy*)proxyUserDataA; b2FixtureProxy* proxyB = (b2FixtureProxy*)proxyUserDataB; b2Fixture* fixtureA = proxyA->fixture; b2Fixture* fixtureB = proxyB->fixture; int32 indexA = proxyA->childIndex; int32 indexB = proxyB->childIndex; b2Body* bodyA = fixtureA->GetBody(); b2Body* bodyB = fixtureB->GetBody(); // Are the fixtures on the same body? if (bodyA == bodyB) { return; } // TODO_ERIN use a hash table to remove a potential bottleneck when both // bodies have a lot of contacts. // Does a contact already exist? b2ContactEdge* edge = bodyB->GetContactList(); while (edge) { if (edge->other == bodyA) { b2Fixture* fA = edge->contact->GetFixtureA(); b2Fixture* fB = edge->contact->GetFixtureB(); int32 iA = edge->contact->GetChildIndexA(); int32 iB = edge->contact->GetChildIndexB(); if (fA == fixtureA && fB == fixtureB && iA == indexA && iB == indexB) { // A contact already exists. return; } if (fA == fixtureB && fB == fixtureA && iA == indexB && iB == indexA) { // A contact already exists. return; } } edge = edge->next; } // Does a joint override collision? Is at least one body dynamic? if (bodyB->ShouldCollide(bodyA) == false) { return; } // Check user filtering. if (m_contactFilter && m_contactFilter->ShouldCollide(fixtureA, fixtureB) == false) { return; } // Call the factory. b2Contact* c = b2Contact::Create(fixtureA, indexA, fixtureB, indexB, m_allocator); if (c == nullptr) { return; } // Contact creation may swap fixtures. fixtureA = c->GetFixtureA(); fixtureB = c->GetFixtureB(); indexA = c->GetChildIndexA(); indexB = c->GetChildIndexB(); bodyA = fixtureA->GetBody(); bodyB = fixtureB->GetBody(); // Insert into the world. c->m_prev = nullptr; c->m_next = m_contactList; if (m_contactList != nullptr) { m_contactList->m_prev = c; } m_contactList = c; // Connect to island graph. // Connect to body A c->m_nodeA.contact = c; c->m_nodeA.other = bodyB; c->m_nodeA.prev = nullptr; c->m_nodeA.next = bodyA->m_contactList; if (bodyA->m_contactList != nullptr) { bodyA->m_contactList->prev = &c->m_nodeA; } bodyA->m_contactList = &c->m_nodeA; // Connect to body B c->m_nodeB.contact = c; c->m_nodeB.other = bodyA; c->m_nodeB.prev = nullptr; c->m_nodeB.next = bodyB->m_contactList; if (bodyB->m_contactList != nullptr) { bodyB->m_contactList->prev = &c->m_nodeB; } bodyB->m_contactList = &c->m_nodeB; ++m_contactCount; } ================================================ FILE: src/libraries/box2d/dynamics/b2_contact_solver.cpp ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #include "b2_contact_solver.h" #include "box2d/b2_body.h" #include "box2d/b2_contact.h" #include "box2d/b2_fixture.h" #include "box2d/b2_stack_allocator.h" #include "box2d/b2_world.h" // Solver debugging is normally disabled because the block solver sometimes has to deal with a poorly conditioned effective mass matrix. #define B2_DEBUG_SOLVER 0 B2_API bool g_blockSolve = true; struct b2ContactPositionConstraint { b2Vec2 localPoints[b2_maxManifoldPoints]; b2Vec2 localNormal; b2Vec2 localPoint; int32 indexA; int32 indexB; float invMassA, invMassB; b2Vec2 localCenterA, localCenterB; float invIA, invIB; b2Manifold::Type type; float radiusA, radiusB; int32 pointCount; }; b2ContactSolver::b2ContactSolver(b2ContactSolverDef* def) { m_step = def->step; m_allocator = def->allocator; m_count = def->count; m_positionConstraints = (b2ContactPositionConstraint*)m_allocator->Allocate(m_count * sizeof(b2ContactPositionConstraint)); m_velocityConstraints = (b2ContactVelocityConstraint*)m_allocator->Allocate(m_count * sizeof(b2ContactVelocityConstraint)); m_positions = def->positions; m_velocities = def->velocities; m_contacts = def->contacts; // Initialize position independent portions of the constraints. for (int32 i = 0; i < m_count; ++i) { b2Contact* contact = m_contacts[i]; b2Fixture* fixtureA = contact->m_fixtureA; b2Fixture* fixtureB = contact->m_fixtureB; b2Shape* shapeA = fixtureA->GetShape(); b2Shape* shapeB = fixtureB->GetShape(); float radiusA = shapeA->m_radius; float radiusB = shapeB->m_radius; b2Body* bodyA = fixtureA->GetBody(); b2Body* bodyB = fixtureB->GetBody(); b2Manifold* manifold = contact->GetManifold(); int32 pointCount = manifold->pointCount; b2Assert(pointCount > 0); b2ContactVelocityConstraint* vc = m_velocityConstraints + i; vc->friction = contact->m_friction; vc->restitution = contact->m_restitution; vc->threshold = contact->m_restitutionThreshold; vc->tangentSpeed = contact->m_tangentSpeed; vc->indexA = bodyA->m_islandIndex; vc->indexB = bodyB->m_islandIndex; vc->invMassA = bodyA->m_invMass; vc->invMassB = bodyB->m_invMass; vc->invIA = bodyA->m_invI; vc->invIB = bodyB->m_invI; vc->contactIndex = i; vc->pointCount = pointCount; vc->K.SetZero(); vc->normalMass.SetZero(); b2ContactPositionConstraint* pc = m_positionConstraints + i; pc->indexA = bodyA->m_islandIndex; pc->indexB = bodyB->m_islandIndex; pc->invMassA = bodyA->m_invMass; pc->invMassB = bodyB->m_invMass; pc->localCenterA = bodyA->m_sweep.localCenter; pc->localCenterB = bodyB->m_sweep.localCenter; pc->invIA = bodyA->m_invI; pc->invIB = bodyB->m_invI; pc->localNormal = manifold->localNormal; pc->localPoint = manifold->localPoint; pc->pointCount = pointCount; pc->radiusA = radiusA; pc->radiusB = radiusB; pc->type = manifold->type; for (int32 j = 0; j < pointCount; ++j) { b2ManifoldPoint* cp = manifold->points + j; b2VelocityConstraintPoint* vcp = vc->points + j; if (m_step.warmStarting) { vcp->normalImpulse = m_step.dtRatio * cp->normalImpulse; vcp->tangentImpulse = m_step.dtRatio * cp->tangentImpulse; } else { vcp->normalImpulse = 0.0f; vcp->tangentImpulse = 0.0f; } vcp->rA.SetZero(); vcp->rB.SetZero(); vcp->normalMass = 0.0f; vcp->tangentMass = 0.0f; vcp->velocityBias = 0.0f; pc->localPoints[j] = cp->localPoint; } } } b2ContactSolver::~b2ContactSolver() { m_allocator->Free(m_velocityConstraints); m_allocator->Free(m_positionConstraints); } // Initialize position dependent portions of the velocity constraints. void b2ContactSolver::InitializeVelocityConstraints() { for (int32 i = 0; i < m_count; ++i) { b2ContactVelocityConstraint* vc = m_velocityConstraints + i; b2ContactPositionConstraint* pc = m_positionConstraints + i; float radiusA = pc->radiusA; float radiusB = pc->radiusB; b2Manifold* manifold = m_contacts[vc->contactIndex]->GetManifold(); int32 indexA = vc->indexA; int32 indexB = vc->indexB; float mA = vc->invMassA; float mB = vc->invMassB; float iA = vc->invIA; float iB = vc->invIB; b2Vec2 localCenterA = pc->localCenterA; b2Vec2 localCenterB = pc->localCenterB; b2Vec2 cA = m_positions[indexA].c; float aA = m_positions[indexA].a; b2Vec2 vA = m_velocities[indexA].v; float wA = m_velocities[indexA].w; b2Vec2 cB = m_positions[indexB].c; float aB = m_positions[indexB].a; b2Vec2 vB = m_velocities[indexB].v; float wB = m_velocities[indexB].w; b2Assert(manifold->pointCount > 0); b2Transform xfA, xfB; xfA.q.Set(aA); xfB.q.Set(aB); xfA.p = cA - b2Mul(xfA.q, localCenterA); xfB.p = cB - b2Mul(xfB.q, localCenterB); b2WorldManifold worldManifold; worldManifold.Initialize(manifold, xfA, radiusA, xfB, radiusB); vc->normal = worldManifold.normal; int32 pointCount = vc->pointCount; for (int32 j = 0; j < pointCount; ++j) { b2VelocityConstraintPoint* vcp = vc->points + j; vcp->rA = worldManifold.points[j] - cA; vcp->rB = worldManifold.points[j] - cB; float rnA = b2Cross(vcp->rA, vc->normal); float rnB = b2Cross(vcp->rB, vc->normal); float kNormal = mA + mB + iA * rnA * rnA + iB * rnB * rnB; vcp->normalMass = kNormal > 0.0f ? 1.0f / kNormal : 0.0f; b2Vec2 tangent = b2Cross(vc->normal, 1.0f); float rtA = b2Cross(vcp->rA, tangent); float rtB = b2Cross(vcp->rB, tangent); float kTangent = mA + mB + iA * rtA * rtA + iB * rtB * rtB; vcp->tangentMass = kTangent > 0.0f ? 1.0f / kTangent : 0.0f; // Setup a velocity bias for restitution. vcp->velocityBias = 0.0f; float vRel = b2Dot(vc->normal, vB + b2Cross(wB, vcp->rB) - vA - b2Cross(wA, vcp->rA)); if (vRel < -vc->threshold) { vcp->velocityBias = -vc->restitution * vRel; } } // If we have two points, then prepare the block solver. if (vc->pointCount == 2 && g_blockSolve) { b2VelocityConstraintPoint* vcp1 = vc->points + 0; b2VelocityConstraintPoint* vcp2 = vc->points + 1; float rn1A = b2Cross(vcp1->rA, vc->normal); float rn1B = b2Cross(vcp1->rB, vc->normal); float rn2A = b2Cross(vcp2->rA, vc->normal); float rn2B = b2Cross(vcp2->rB, vc->normal); float k11 = mA + mB + iA * rn1A * rn1A + iB * rn1B * rn1B; float k22 = mA + mB + iA * rn2A * rn2A + iB * rn2B * rn2B; float k12 = mA + mB + iA * rn1A * rn2A + iB * rn1B * rn2B; // Ensure a reasonable condition number. const float k_maxConditionNumber = 1000.0f; if (k11 * k11 < k_maxConditionNumber * (k11 * k22 - k12 * k12)) { // K is safe to invert. vc->K.ex.Set(k11, k12); vc->K.ey.Set(k12, k22); vc->normalMass = vc->K.GetInverse(); } else { // The constraints are redundant, just use one. // TODO_ERIN use deepest? vc->pointCount = 1; } } } } void b2ContactSolver::WarmStart() { // Warm start. for (int32 i = 0; i < m_count; ++i) { b2ContactVelocityConstraint* vc = m_velocityConstraints + i; int32 indexA = vc->indexA; int32 indexB = vc->indexB; float mA = vc->invMassA; float iA = vc->invIA; float mB = vc->invMassB; float iB = vc->invIB; int32 pointCount = vc->pointCount; b2Vec2 vA = m_velocities[indexA].v; float wA = m_velocities[indexA].w; b2Vec2 vB = m_velocities[indexB].v; float wB = m_velocities[indexB].w; b2Vec2 normal = vc->normal; b2Vec2 tangent = b2Cross(normal, 1.0f); for (int32 j = 0; j < pointCount; ++j) { b2VelocityConstraintPoint* vcp = vc->points + j; b2Vec2 P = vcp->normalImpulse * normal + vcp->tangentImpulse * tangent; wA -= iA * b2Cross(vcp->rA, P); vA -= mA * P; wB += iB * b2Cross(vcp->rB, P); vB += mB * P; } m_velocities[indexA].v = vA; m_velocities[indexA].w = wA; m_velocities[indexB].v = vB; m_velocities[indexB].w = wB; } } void b2ContactSolver::SolveVelocityConstraints() { for (int32 i = 0; i < m_count; ++i) { b2ContactVelocityConstraint* vc = m_velocityConstraints + i; int32 indexA = vc->indexA; int32 indexB = vc->indexB; float mA = vc->invMassA; float iA = vc->invIA; float mB = vc->invMassB; float iB = vc->invIB; int32 pointCount = vc->pointCount; b2Vec2 vA = m_velocities[indexA].v; float wA = m_velocities[indexA].w; b2Vec2 vB = m_velocities[indexB].v; float wB = m_velocities[indexB].w; b2Vec2 normal = vc->normal; b2Vec2 tangent = b2Cross(normal, 1.0f); float friction = vc->friction; b2Assert(pointCount == 1 || pointCount == 2); // Solve tangent constraints first because non-penetration is more important // than friction. for (int32 j = 0; j < pointCount; ++j) { b2VelocityConstraintPoint* vcp = vc->points + j; // Relative velocity at contact b2Vec2 dv = vB + b2Cross(wB, vcp->rB) - vA - b2Cross(wA, vcp->rA); // Compute tangent force float vt = b2Dot(dv, tangent) - vc->tangentSpeed; float lambda = vcp->tangentMass * (-vt); // b2Clamp the accumulated force float maxFriction = friction * vcp->normalImpulse; float newImpulse = b2Clamp(vcp->tangentImpulse + lambda, -maxFriction, maxFriction); lambda = newImpulse - vcp->tangentImpulse; vcp->tangentImpulse = newImpulse; // Apply contact impulse b2Vec2 P = lambda * tangent; vA -= mA * P; wA -= iA * b2Cross(vcp->rA, P); vB += mB * P; wB += iB * b2Cross(vcp->rB, P); } // Solve normal constraints if (pointCount == 1 || g_blockSolve == false) { for (int32 j = 0; j < pointCount; ++j) { b2VelocityConstraintPoint* vcp = vc->points + j; // Relative velocity at contact b2Vec2 dv = vB + b2Cross(wB, vcp->rB) - vA - b2Cross(wA, vcp->rA); // Compute normal impulse float vn = b2Dot(dv, normal); float lambda = -vcp->normalMass * (vn - vcp->velocityBias); // b2Clamp the accumulated impulse float newImpulse = b2Max(vcp->normalImpulse + lambda, 0.0f); lambda = newImpulse - vcp->normalImpulse; vcp->normalImpulse = newImpulse; // Apply contact impulse b2Vec2 P = lambda * normal; vA -= mA * P; wA -= iA * b2Cross(vcp->rA, P); vB += mB * P; wB += iB * b2Cross(vcp->rB, P); } } else { // Block solver developed in collaboration with Dirk Gregorius (back in 01/07 on Box2D_Lite). // Build the mini LCP for this contact patch // // vn = A * x + b, vn >= 0, x >= 0 and vn_i * x_i = 0 with i = 1..2 // // A = J * W * JT and J = ( -n, -r1 x n, n, r2 x n ) // b = vn0 - velocityBias // // The system is solved using the "Total enumeration method" (s. Murty). The complementary constraint vn_i * x_i // implies that we must have in any solution either vn_i = 0 or x_i = 0. So for the 2D contact problem the cases // vn1 = 0 and vn2 = 0, x1 = 0 and x2 = 0, x1 = 0 and vn2 = 0, x2 = 0 and vn1 = 0 need to be tested. The first valid // solution that satisfies the problem is chosen. // // In order to account of the accumulated impulse 'a' (because of the iterative nature of the solver which only requires // that the accumulated impulse is clamped and not the incremental impulse) we change the impulse variable (x_i). // // Substitute: // // x = a + d // // a := old total impulse // x := new total impulse // d := incremental impulse // // For the current iteration we extend the formula for the incremental impulse // to compute the new total impulse: // // vn = A * d + b // = A * (x - a) + b // = A * x + b - A * a // = A * x + b' // b' = b - A * a; b2VelocityConstraintPoint* cp1 = vc->points + 0; b2VelocityConstraintPoint* cp2 = vc->points + 1; b2Vec2 a(cp1->normalImpulse, cp2->normalImpulse); b2Assert(a.x >= 0.0f && a.y >= 0.0f); // Relative velocity at contact b2Vec2 dv1 = vB + b2Cross(wB, cp1->rB) - vA - b2Cross(wA, cp1->rA); b2Vec2 dv2 = vB + b2Cross(wB, cp2->rB) - vA - b2Cross(wA, cp2->rA); // Compute normal velocity float vn1 = b2Dot(dv1, normal); float vn2 = b2Dot(dv2, normal); b2Vec2 b; b.x = vn1 - cp1->velocityBias; b.y = vn2 - cp2->velocityBias; // Compute b' b -= b2Mul(vc->K, a); const float k_errorTol = 1e-3f; B2_NOT_USED(k_errorTol); for (;;) { // // Case 1: vn = 0 // // 0 = A * x + b' // // Solve for x: // // x = - inv(A) * b' // b2Vec2 x = - b2Mul(vc->normalMass, b); if (x.x >= 0.0f && x.y >= 0.0f) { // Get the incremental impulse b2Vec2 d = x - a; // Apply incremental impulse b2Vec2 P1 = d.x * normal; b2Vec2 P2 = d.y * normal; vA -= mA * (P1 + P2); wA -= iA * (b2Cross(cp1->rA, P1) + b2Cross(cp2->rA, P2)); vB += mB * (P1 + P2); wB += iB * (b2Cross(cp1->rB, P1) + b2Cross(cp2->rB, P2)); // Accumulate cp1->normalImpulse = x.x; cp2->normalImpulse = x.y; #if B2_DEBUG_SOLVER == 1 // Postconditions dv1 = vB + b2Cross(wB, cp1->rB) - vA - b2Cross(wA, cp1->rA); dv2 = vB + b2Cross(wB, cp2->rB) - vA - b2Cross(wA, cp2->rA); // Compute normal velocity vn1 = b2Dot(dv1, normal); vn2 = b2Dot(dv2, normal); b2Assert(b2Abs(vn1 - cp1->velocityBias) < k_errorTol); b2Assert(b2Abs(vn2 - cp2->velocityBias) < k_errorTol); #endif break; } // // Case 2: vn1 = 0 and x2 = 0 // // 0 = a11 * x1 + a12 * 0 + b1' // vn2 = a21 * x1 + a22 * 0 + b2' // x.x = - cp1->normalMass * b.x; x.y = 0.0f; vn1 = 0.0f; vn2 = vc->K.ex.y * x.x + b.y; if (x.x >= 0.0f && vn2 >= 0.0f) { // Get the incremental impulse b2Vec2 d = x - a; // Apply incremental impulse b2Vec2 P1 = d.x * normal; b2Vec2 P2 = d.y * normal; vA -= mA * (P1 + P2); wA -= iA * (b2Cross(cp1->rA, P1) + b2Cross(cp2->rA, P2)); vB += mB * (P1 + P2); wB += iB * (b2Cross(cp1->rB, P1) + b2Cross(cp2->rB, P2)); // Accumulate cp1->normalImpulse = x.x; cp2->normalImpulse = x.y; #if B2_DEBUG_SOLVER == 1 // Postconditions dv1 = vB + b2Cross(wB, cp1->rB) - vA - b2Cross(wA, cp1->rA); // Compute normal velocity vn1 = b2Dot(dv1, normal); b2Assert(b2Abs(vn1 - cp1->velocityBias) < k_errorTol); #endif break; } // // Case 3: vn2 = 0 and x1 = 0 // // vn1 = a11 * 0 + a12 * x2 + b1' // 0 = a21 * 0 + a22 * x2 + b2' // x.x = 0.0f; x.y = - cp2->normalMass * b.y; vn1 = vc->K.ey.x * x.y + b.x; vn2 = 0.0f; if (x.y >= 0.0f && vn1 >= 0.0f) { // Resubstitute for the incremental impulse b2Vec2 d = x - a; // Apply incremental impulse b2Vec2 P1 = d.x * normal; b2Vec2 P2 = d.y * normal; vA -= mA * (P1 + P2); wA -= iA * (b2Cross(cp1->rA, P1) + b2Cross(cp2->rA, P2)); vB += mB * (P1 + P2); wB += iB * (b2Cross(cp1->rB, P1) + b2Cross(cp2->rB, P2)); // Accumulate cp1->normalImpulse = x.x; cp2->normalImpulse = x.y; #if B2_DEBUG_SOLVER == 1 // Postconditions dv2 = vB + b2Cross(wB, cp2->rB) - vA - b2Cross(wA, cp2->rA); // Compute normal velocity vn2 = b2Dot(dv2, normal); b2Assert(b2Abs(vn2 - cp2->velocityBias) < k_errorTol); #endif break; } // // Case 4: x1 = 0 and x2 = 0 // // vn1 = b1 // vn2 = b2; x.x = 0.0f; x.y = 0.0f; vn1 = b.x; vn2 = b.y; if (vn1 >= 0.0f && vn2 >= 0.0f ) { // Resubstitute for the incremental impulse b2Vec2 d = x - a; // Apply incremental impulse b2Vec2 P1 = d.x * normal; b2Vec2 P2 = d.y * normal; vA -= mA * (P1 + P2); wA -= iA * (b2Cross(cp1->rA, P1) + b2Cross(cp2->rA, P2)); vB += mB * (P1 + P2); wB += iB * (b2Cross(cp1->rB, P1) + b2Cross(cp2->rB, P2)); // Accumulate cp1->normalImpulse = x.x; cp2->normalImpulse = x.y; break; } // No solution, give up. This is hit sometimes, but it doesn't seem to matter. break; } } m_velocities[indexA].v = vA; m_velocities[indexA].w = wA; m_velocities[indexB].v = vB; m_velocities[indexB].w = wB; } } void b2ContactSolver::StoreImpulses() { for (int32 i = 0; i < m_count; ++i) { b2ContactVelocityConstraint* vc = m_velocityConstraints + i; b2Manifold* manifold = m_contacts[vc->contactIndex]->GetManifold(); for (int32 j = 0; j < vc->pointCount; ++j) { manifold->points[j].normalImpulse = vc->points[j].normalImpulse; manifold->points[j].tangentImpulse = vc->points[j].tangentImpulse; } } } struct b2PositionSolverManifold { void Initialize(b2ContactPositionConstraint* pc, const b2Transform& xfA, const b2Transform& xfB, int32 index) { b2Assert(pc->pointCount > 0); switch (pc->type) { case b2Manifold::e_circles: { b2Vec2 pointA = b2Mul(xfA, pc->localPoint); b2Vec2 pointB = b2Mul(xfB, pc->localPoints[0]); normal = pointB - pointA; normal.Normalize(); point = 0.5f * (pointA + pointB); separation = b2Dot(pointB - pointA, normal) - pc->radiusA - pc->radiusB; } break; case b2Manifold::e_faceA: { normal = b2Mul(xfA.q, pc->localNormal); b2Vec2 planePoint = b2Mul(xfA, pc->localPoint); b2Vec2 clipPoint = b2Mul(xfB, pc->localPoints[index]); separation = b2Dot(clipPoint - planePoint, normal) - pc->radiusA - pc->radiusB; point = clipPoint; } break; case b2Manifold::e_faceB: { normal = b2Mul(xfB.q, pc->localNormal); b2Vec2 planePoint = b2Mul(xfB, pc->localPoint); b2Vec2 clipPoint = b2Mul(xfA, pc->localPoints[index]); separation = b2Dot(clipPoint - planePoint, normal) - pc->radiusA - pc->radiusB; point = clipPoint; // Ensure normal points from A to B normal = -normal; } break; } } b2Vec2 normal; b2Vec2 point; float separation; }; // Sequential solver. bool b2ContactSolver::SolvePositionConstraints() { float minSeparation = 0.0f; for (int32 i = 0; i < m_count; ++i) { b2ContactPositionConstraint* pc = m_positionConstraints + i; int32 indexA = pc->indexA; int32 indexB = pc->indexB; b2Vec2 localCenterA = pc->localCenterA; float mA = pc->invMassA; float iA = pc->invIA; b2Vec2 localCenterB = pc->localCenterB; float mB = pc->invMassB; float iB = pc->invIB; int32 pointCount = pc->pointCount; b2Vec2 cA = m_positions[indexA].c; float aA = m_positions[indexA].a; b2Vec2 cB = m_positions[indexB].c; float aB = m_positions[indexB].a; // Solve normal constraints for (int32 j = 0; j < pointCount; ++j) { b2Transform xfA, xfB; xfA.q.Set(aA); xfB.q.Set(aB); xfA.p = cA - b2Mul(xfA.q, localCenterA); xfB.p = cB - b2Mul(xfB.q, localCenterB); b2PositionSolverManifold psm; psm.Initialize(pc, xfA, xfB, j); b2Vec2 normal = psm.normal; b2Vec2 point = psm.point; float separation = psm.separation; b2Vec2 rA = point - cA; b2Vec2 rB = point - cB; // Track max constraint error. minSeparation = b2Min(minSeparation, separation); // Prevent large corrections and allow slop. float C = b2Clamp(b2_baumgarte * (separation + b2_linearSlop), -b2_maxLinearCorrection, 0.0f); // Compute the effective mass. float rnA = b2Cross(rA, normal); float rnB = b2Cross(rB, normal); float K = mA + mB + iA * rnA * rnA + iB * rnB * rnB; // Compute normal impulse float impulse = K > 0.0f ? - C / K : 0.0f; b2Vec2 P = impulse * normal; cA -= mA * P; aA -= iA * b2Cross(rA, P); cB += mB * P; aB += iB * b2Cross(rB, P); } m_positions[indexA].c = cA; m_positions[indexA].a = aA; m_positions[indexB].c = cB; m_positions[indexB].a = aB; } // We can't expect minSpeparation >= -b2_linearSlop because we don't // push the separation above -b2_linearSlop. return minSeparation >= -3.0f * b2_linearSlop; } // Sequential position solver for position constraints. bool b2ContactSolver::SolveTOIPositionConstraints(int32 toiIndexA, int32 toiIndexB) { float minSeparation = 0.0f; for (int32 i = 0; i < m_count; ++i) { b2ContactPositionConstraint* pc = m_positionConstraints + i; int32 indexA = pc->indexA; int32 indexB = pc->indexB; b2Vec2 localCenterA = pc->localCenterA; b2Vec2 localCenterB = pc->localCenterB; int32 pointCount = pc->pointCount; float mA = 0.0f; float iA = 0.0f; if (indexA == toiIndexA || indexA == toiIndexB) { mA = pc->invMassA; iA = pc->invIA; } float mB = 0.0f; float iB = 0.; if (indexB == toiIndexA || indexB == toiIndexB) { mB = pc->invMassB; iB = pc->invIB; } b2Vec2 cA = m_positions[indexA].c; float aA = m_positions[indexA].a; b2Vec2 cB = m_positions[indexB].c; float aB = m_positions[indexB].a; // Solve normal constraints for (int32 j = 0; j < pointCount; ++j) { b2Transform xfA, xfB; xfA.q.Set(aA); xfB.q.Set(aB); xfA.p = cA - b2Mul(xfA.q, localCenterA); xfB.p = cB - b2Mul(xfB.q, localCenterB); b2PositionSolverManifold psm; psm.Initialize(pc, xfA, xfB, j); b2Vec2 normal = psm.normal; b2Vec2 point = psm.point; float separation = psm.separation; b2Vec2 rA = point - cA; b2Vec2 rB = point - cB; // Track max constraint error. minSeparation = b2Min(minSeparation, separation); // Prevent large corrections and allow slop. float C = b2Clamp(b2_toiBaumgarte * (separation + b2_linearSlop), -b2_maxLinearCorrection, 0.0f); // Compute the effective mass. float rnA = b2Cross(rA, normal); float rnB = b2Cross(rB, normal); float K = mA + mB + iA * rnA * rnA + iB * rnB * rnB; // Compute normal impulse float impulse = K > 0.0f ? - C / K : 0.0f; b2Vec2 P = impulse * normal; cA -= mA * P; aA -= iA * b2Cross(rA, P); cB += mB * P; aB += iB * b2Cross(rB, P); } m_positions[indexA].c = cA; m_positions[indexA].a = aA; m_positions[indexB].c = cB; m_positions[indexB].a = aB; } // We can't expect minSpeparation >= -b2_linearSlop because we don't // push the separation above -b2_linearSlop. return minSeparation >= -1.5f * b2_linearSlop; } ================================================ FILE: src/libraries/box2d/dynamics/b2_contact_solver.h ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #ifndef B2_CONTACT_SOLVER_H #define B2_CONTACT_SOLVER_H #include "box2d/b2_collision.h" #include "box2d/b2_math.h" #include "box2d/b2_time_step.h" class b2Contact; class b2Body; class b2StackAllocator; struct b2ContactPositionConstraint; struct b2VelocityConstraintPoint { b2Vec2 rA; b2Vec2 rB; float normalImpulse; float tangentImpulse; float normalMass; float tangentMass; float velocityBias; }; struct b2ContactVelocityConstraint { b2VelocityConstraintPoint points[b2_maxManifoldPoints]; b2Vec2 normal; b2Mat22 normalMass; b2Mat22 K; int32 indexA; int32 indexB; float invMassA, invMassB; float invIA, invIB; float friction; float restitution; float threshold; float tangentSpeed; int32 pointCount; int32 contactIndex; }; struct b2ContactSolverDef { b2TimeStep step; b2Contact** contacts; int32 count; b2Position* positions; b2Velocity* velocities; b2StackAllocator* allocator; }; class b2ContactSolver { public: b2ContactSolver(b2ContactSolverDef* def); ~b2ContactSolver(); void InitializeVelocityConstraints(); void WarmStart(); void SolveVelocityConstraints(); void StoreImpulses(); bool SolvePositionConstraints(); bool SolveTOIPositionConstraints(int32 toiIndexA, int32 toiIndexB); b2TimeStep m_step; b2Position* m_positions; b2Velocity* m_velocities; b2StackAllocator* m_allocator; b2ContactPositionConstraint* m_positionConstraints; b2ContactVelocityConstraint* m_velocityConstraints; b2Contact** m_contacts; int m_count; }; #endif ================================================ FILE: src/libraries/box2d/dynamics/b2_distance_joint.cpp ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #include "box2d/b2_body.h" #include "box2d/b2_draw.h" #include "box2d/b2_distance_joint.h" #include "box2d/b2_time_step.h" // 1-D constrained system // m (v2 - v1) = lambda // v2 + (beta/h) * x1 + gamma * lambda = 0, gamma has units of inverse mass. // x2 = x1 + h * v2 // 1-D mass-damper-spring system // m (v2 - v1) + h * d * v2 + h * k * // C = norm(p2 - p1) - L // u = (p2 - p1) / norm(p2 - p1) // Cdot = dot(u, v2 + cross(w2, r2) - v1 - cross(w1, r1)) // J = [-u -cross(r1, u) u cross(r2, u)] // K = J * invM * JT // = invMass1 + invI1 * cross(r1, u)^2 + invMass2 + invI2 * cross(r2, u)^2 void b2DistanceJointDef::Initialize(b2Body* b1, b2Body* b2, const b2Vec2& anchor1, const b2Vec2& anchor2) { bodyA = b1; bodyB = b2; localAnchorA = bodyA->GetLocalPoint(anchor1); localAnchorB = bodyB->GetLocalPoint(anchor2); b2Vec2 d = anchor2 - anchor1; length = b2Max(d.Length(), b2_linearSlop); minLength = length; maxLength = length; } b2DistanceJoint::b2DistanceJoint(const b2DistanceJointDef* def) : b2Joint(def) { m_localAnchorA = def->localAnchorA; m_localAnchorB = def->localAnchorB; m_length = b2Max(def->length, b2_linearSlop); m_minLength = b2Max(def->minLength, b2_linearSlop); m_maxLength = b2Max(def->maxLength, m_minLength); m_stiffness = def->stiffness; m_damping = def->damping; m_gamma = 0.0f; m_bias = 0.0f; m_impulse = 0.0f; m_lowerImpulse = 0.0f; m_upperImpulse = 0.0f; m_currentLength = 0.0f; } void b2DistanceJoint::InitVelocityConstraints(const b2SolverData& data) { m_indexA = m_bodyA->m_islandIndex; m_indexB = m_bodyB->m_islandIndex; m_localCenterA = m_bodyA->m_sweep.localCenter; m_localCenterB = m_bodyB->m_sweep.localCenter; m_invMassA = m_bodyA->m_invMass; m_invMassB = m_bodyB->m_invMass; m_invIA = m_bodyA->m_invI; m_invIB = m_bodyB->m_invI; b2Vec2 cA = data.positions[m_indexA].c; float aA = data.positions[m_indexA].a; b2Vec2 vA = data.velocities[m_indexA].v; float wA = data.velocities[m_indexA].w; b2Vec2 cB = data.positions[m_indexB].c; float aB = data.positions[m_indexB].a; b2Vec2 vB = data.velocities[m_indexB].v; float wB = data.velocities[m_indexB].w; b2Rot qA(aA), qB(aB); m_rA = b2Mul(qA, m_localAnchorA - m_localCenterA); m_rB = b2Mul(qB, m_localAnchorB - m_localCenterB); m_u = cB + m_rB - cA - m_rA; // Handle singularity. m_currentLength = m_u.Length(); if (m_currentLength > b2_linearSlop) { m_u *= 1.0f / m_currentLength; } else { m_u.Set(0.0f, 0.0f); m_mass = 0.0f; m_impulse = 0.0f; m_lowerImpulse = 0.0f; m_upperImpulse = 0.0f; } float crAu = b2Cross(m_rA, m_u); float crBu = b2Cross(m_rB, m_u); float invMass = m_invMassA + m_invIA * crAu * crAu + m_invMassB + m_invIB * crBu * crBu; m_mass = invMass != 0.0f ? 1.0f / invMass : 0.0f; if (m_stiffness > 0.0f && m_minLength < m_maxLength) { // soft float C = m_currentLength - m_length; float d = m_damping; float k = m_stiffness; // magic formulas float h = data.step.dt; // gamma = 1 / (h * (d + h * k)) // the extra factor of h in the denominator is since the lambda is an impulse, not a force m_gamma = h * (d + h * k); m_gamma = m_gamma != 0.0f ? 1.0f / m_gamma : 0.0f; m_bias = C * h * k * m_gamma; invMass += m_gamma; m_softMass = invMass != 0.0f ? 1.0f / invMass : 0.0f; } else { // rigid m_gamma = 0.0f; m_bias = 0.0f; m_softMass = m_mass; } if (data.step.warmStarting) { // Scale the impulse to support a variable time step. m_impulse *= data.step.dtRatio; m_lowerImpulse *= data.step.dtRatio; m_upperImpulse *= data.step.dtRatio; b2Vec2 P = (m_impulse + m_lowerImpulse - m_upperImpulse) * m_u; vA -= m_invMassA * P; wA -= m_invIA * b2Cross(m_rA, P); vB += m_invMassB * P; wB += m_invIB * b2Cross(m_rB, P); } else { m_impulse = 0.0f; } data.velocities[m_indexA].v = vA; data.velocities[m_indexA].w = wA; data.velocities[m_indexB].v = vB; data.velocities[m_indexB].w = wB; } void b2DistanceJoint::SolveVelocityConstraints(const b2SolverData& data) { b2Vec2 vA = data.velocities[m_indexA].v; float wA = data.velocities[m_indexA].w; b2Vec2 vB = data.velocities[m_indexB].v; float wB = data.velocities[m_indexB].w; if (m_minLength < m_maxLength) { if (m_stiffness > 0.0f) { // Cdot = dot(u, v + cross(w, r)) b2Vec2 vpA = vA + b2Cross(wA, m_rA); b2Vec2 vpB = vB + b2Cross(wB, m_rB); float Cdot = b2Dot(m_u, vpB - vpA); float impulse = -m_softMass * (Cdot + m_bias + m_gamma * m_impulse); m_impulse += impulse; b2Vec2 P = impulse * m_u; vA -= m_invMassA * P; wA -= m_invIA * b2Cross(m_rA, P); vB += m_invMassB * P; wB += m_invIB * b2Cross(m_rB, P); } // lower { float C = m_currentLength - m_minLength; float bias = b2Max(0.0f, C) * data.step.inv_dt; b2Vec2 vpA = vA + b2Cross(wA, m_rA); b2Vec2 vpB = vB + b2Cross(wB, m_rB); float Cdot = b2Dot(m_u, vpB - vpA); float impulse = -m_mass * (Cdot + bias); float oldImpulse = m_lowerImpulse; m_lowerImpulse = b2Max(0.0f, m_lowerImpulse + impulse); impulse = m_lowerImpulse - oldImpulse; b2Vec2 P = impulse * m_u; vA -= m_invMassA * P; wA -= m_invIA * b2Cross(m_rA, P); vB += m_invMassB * P; wB += m_invIB * b2Cross(m_rB, P); } // upper { float C = m_maxLength - m_currentLength; float bias = b2Max(0.0f, C) * data.step.inv_dt; b2Vec2 vpA = vA + b2Cross(wA, m_rA); b2Vec2 vpB = vB + b2Cross(wB, m_rB); float Cdot = b2Dot(m_u, vpA - vpB); float impulse = -m_mass * (Cdot + bias); float oldImpulse = m_upperImpulse; m_upperImpulse = b2Max(0.0f, m_upperImpulse + impulse); impulse = m_upperImpulse - oldImpulse; b2Vec2 P = -impulse * m_u; vA -= m_invMassA * P; wA -= m_invIA * b2Cross(m_rA, P); vB += m_invMassB * P; wB += m_invIB * b2Cross(m_rB, P); } } else { // Equal limits // Cdot = dot(u, v + cross(w, r)) b2Vec2 vpA = vA + b2Cross(wA, m_rA); b2Vec2 vpB = vB + b2Cross(wB, m_rB); float Cdot = b2Dot(m_u, vpB - vpA); float impulse = -m_mass * Cdot; m_impulse += impulse; b2Vec2 P = impulse * m_u; vA -= m_invMassA * P; wA -= m_invIA * b2Cross(m_rA, P); vB += m_invMassB * P; wB += m_invIB * b2Cross(m_rB, P); } data.velocities[m_indexA].v = vA; data.velocities[m_indexA].w = wA; data.velocities[m_indexB].v = vB; data.velocities[m_indexB].w = wB; } bool b2DistanceJoint::SolvePositionConstraints(const b2SolverData& data) { b2Vec2 cA = data.positions[m_indexA].c; float aA = data.positions[m_indexA].a; b2Vec2 cB = data.positions[m_indexB].c; float aB = data.positions[m_indexB].a; b2Rot qA(aA), qB(aB); b2Vec2 rA = b2Mul(qA, m_localAnchorA - m_localCenterA); b2Vec2 rB = b2Mul(qB, m_localAnchorB - m_localCenterB); b2Vec2 u = cB + rB - cA - rA; float length = u.Normalize(); float C; if (m_minLength == m_maxLength) { C = length - m_minLength; } else if (length < m_minLength) { C = length - m_minLength; } else if (m_maxLength < length) { C = length - m_maxLength; } else { return true; } float impulse = -m_mass * C; b2Vec2 P = impulse * u; cA -= m_invMassA * P; aA -= m_invIA * b2Cross(rA, P); cB += m_invMassB * P; aB += m_invIB * b2Cross(rB, P); data.positions[m_indexA].c = cA; data.positions[m_indexA].a = aA; data.positions[m_indexB].c = cB; data.positions[m_indexB].a = aB; return b2Abs(C) < b2_linearSlop; } b2Vec2 b2DistanceJoint::GetAnchorA() const { return m_bodyA->GetWorldPoint(m_localAnchorA); } b2Vec2 b2DistanceJoint::GetAnchorB() const { return m_bodyB->GetWorldPoint(m_localAnchorB); } b2Vec2 b2DistanceJoint::GetReactionForce(float inv_dt) const { b2Vec2 F = inv_dt * (m_impulse + m_lowerImpulse - m_upperImpulse) * m_u; return F; } float b2DistanceJoint::GetReactionTorque(float inv_dt) const { B2_NOT_USED(inv_dt); return 0.0f; } float b2DistanceJoint::SetLength(float length) { m_impulse = 0.0f; m_length = b2Max(b2_linearSlop, length); return m_length; } float b2DistanceJoint::SetMinLength(float minLength) { m_lowerImpulse = 0.0f; m_minLength = b2Clamp(minLength, b2_linearSlop, m_maxLength); return m_minLength; } float b2DistanceJoint::SetMaxLength(float maxLength) { m_upperImpulse = 0.0f; m_maxLength = b2Max(maxLength, m_minLength); return m_maxLength; } float b2DistanceJoint::GetCurrentLength() const { b2Vec2 pA = m_bodyA->GetWorldPoint(m_localAnchorA); b2Vec2 pB = m_bodyB->GetWorldPoint(m_localAnchorB); b2Vec2 d = pB - pA; float length = d.Length(); return length; } void b2DistanceJoint::Dump() { int32 indexA = m_bodyA->m_islandIndex; int32 indexB = m_bodyB->m_islandIndex; b2Dump(" b2DistanceJointDef jd;\n"); b2Dump(" jd.bodyA = bodies[%d];\n", indexA); b2Dump(" jd.bodyB = bodies[%d];\n", indexB); b2Dump(" jd.collideConnected = bool(%d);\n", m_collideConnected); b2Dump(" jd.localAnchorA.Set(%.9g, %.9g);\n", m_localAnchorA.x, m_localAnchorA.y); b2Dump(" jd.localAnchorB.Set(%.9g, %.9g);\n", m_localAnchorB.x, m_localAnchorB.y); b2Dump(" jd.length = %.9g;\n", m_length); b2Dump(" jd.minLength = %.9g;\n", m_minLength); b2Dump(" jd.maxLength = %.9g;\n", m_maxLength); b2Dump(" jd.stiffness = %.9g;\n", m_stiffness); b2Dump(" jd.damping = %.9g;\n", m_damping); b2Dump(" joints[%d] = m_world->CreateJoint(&jd);\n", m_index); } void b2DistanceJoint::Draw(b2Draw* draw) const { const b2Transform& xfA = m_bodyA->GetTransform(); const b2Transform& xfB = m_bodyB->GetTransform(); b2Vec2 pA = b2Mul(xfA, m_localAnchorA); b2Vec2 pB = b2Mul(xfB, m_localAnchorB); b2Vec2 axis = pB - pA; float length = axis.Normalize(); b2Color c1(0.7f, 0.7f, 0.7f); b2Color c2(0.3f, 0.9f, 0.3f); b2Color c3(0.9f, 0.3f, 0.3f); b2Color c4(0.4f, 0.4f, 0.4f); draw->DrawSegment(pA, pB, c4); b2Vec2 pRest = pA + m_length * axis; draw->DrawPoint(pRest, 8.0f, c1); if (m_minLength != m_maxLength) { if (m_minLength > b2_linearSlop) { b2Vec2 pMin = pA + m_minLength * axis; draw->DrawPoint(pMin, 4.0f, c2); } if (m_maxLength < FLT_MAX) { b2Vec2 pMax = pA + m_maxLength * axis; draw->DrawPoint(pMax, 4.0f, c3); } } } ================================================ FILE: src/libraries/box2d/dynamics/b2_edge_circle_contact.cpp ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #include "b2_edge_circle_contact.h" #include "box2d/b2_block_allocator.h" #include "box2d/b2_fixture.h" #include b2Contact* b2EdgeAndCircleContact::Create(b2Fixture* fixtureA, int32, b2Fixture* fixtureB, int32, b2BlockAllocator* allocator) { void* mem = allocator->Allocate(sizeof(b2EdgeAndCircleContact)); return new (mem) b2EdgeAndCircleContact(fixtureA, fixtureB); } void b2EdgeAndCircleContact::Destroy(b2Contact* contact, b2BlockAllocator* allocator) { ((b2EdgeAndCircleContact*)contact)->~b2EdgeAndCircleContact(); allocator->Free(contact, sizeof(b2EdgeAndCircleContact)); } b2EdgeAndCircleContact::b2EdgeAndCircleContact(b2Fixture* fixtureA, b2Fixture* fixtureB) : b2Contact(fixtureA, 0, fixtureB, 0) { b2Assert(m_fixtureA->GetType() == b2Shape::e_edge); b2Assert(m_fixtureB->GetType() == b2Shape::e_circle); } void b2EdgeAndCircleContact::Evaluate(b2Manifold* manifold, const b2Transform& xfA, const b2Transform& xfB) { b2CollideEdgeAndCircle( manifold, (b2EdgeShape*)m_fixtureA->GetShape(), xfA, (b2CircleShape*)m_fixtureB->GetShape(), xfB); } ================================================ FILE: src/libraries/box2d/dynamics/b2_edge_circle_contact.h ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #ifndef B2_EDGE_AND_CIRCLE_CONTACT_H #define B2_EDGE_AND_CIRCLE_CONTACT_H #include "box2d/b2_contact.h" class b2BlockAllocator; class b2EdgeAndCircleContact : public b2Contact { public: static b2Contact* Create( b2Fixture* fixtureA, int32 indexA, b2Fixture* fixtureB, int32 indexB, b2BlockAllocator* allocator); static void Destroy(b2Contact* contact, b2BlockAllocator* allocator); b2EdgeAndCircleContact(b2Fixture* fixtureA, b2Fixture* fixtureB); ~b2EdgeAndCircleContact() {} void Evaluate(b2Manifold* manifold, const b2Transform& xfA, const b2Transform& xfB) override; }; #endif ================================================ FILE: src/libraries/box2d/dynamics/b2_edge_polygon_contact.cpp ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #include "b2_edge_polygon_contact.h" #include "box2d/b2_block_allocator.h" #include "box2d/b2_fixture.h" #include b2Contact* b2EdgeAndPolygonContact::Create(b2Fixture* fixtureA, int32, b2Fixture* fixtureB, int32, b2BlockAllocator* allocator) { void* mem = allocator->Allocate(sizeof(b2EdgeAndPolygonContact)); return new (mem) b2EdgeAndPolygonContact(fixtureA, fixtureB); } void b2EdgeAndPolygonContact::Destroy(b2Contact* contact, b2BlockAllocator* allocator) { ((b2EdgeAndPolygonContact*)contact)->~b2EdgeAndPolygonContact(); allocator->Free(contact, sizeof(b2EdgeAndPolygonContact)); } b2EdgeAndPolygonContact::b2EdgeAndPolygonContact(b2Fixture* fixtureA, b2Fixture* fixtureB) : b2Contact(fixtureA, 0, fixtureB, 0) { b2Assert(m_fixtureA->GetType() == b2Shape::e_edge); b2Assert(m_fixtureB->GetType() == b2Shape::e_polygon); } void b2EdgeAndPolygonContact::Evaluate(b2Manifold* manifold, const b2Transform& xfA, const b2Transform& xfB) { b2CollideEdgeAndPolygon( manifold, (b2EdgeShape*)m_fixtureA->GetShape(), xfA, (b2PolygonShape*)m_fixtureB->GetShape(), xfB); } ================================================ FILE: src/libraries/box2d/dynamics/b2_edge_polygon_contact.h ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #ifndef B2_EDGE_AND_POLYGON_CONTACT_H #define B2_EDGE_AND_POLYGON_CONTACT_H #include "box2d/b2_contact.h" class b2BlockAllocator; class b2EdgeAndPolygonContact : public b2Contact { public: static b2Contact* Create( b2Fixture* fixtureA, int32 indexA, b2Fixture* fixtureB, int32 indexB, b2BlockAllocator* allocator); static void Destroy(b2Contact* contact, b2BlockAllocator* allocator); b2EdgeAndPolygonContact(b2Fixture* fixtureA, b2Fixture* fixtureB); ~b2EdgeAndPolygonContact() {} void Evaluate(b2Manifold* manifold, const b2Transform& xfA, const b2Transform& xfB) override; }; #endif ================================================ FILE: src/libraries/box2d/dynamics/b2_fixture.cpp ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #include "box2d/b2_fixture.h" #include "box2d/b2_block_allocator.h" #include "box2d/b2_broad_phase.h" #include "box2d/b2_chain_shape.h" #include "box2d/b2_circle_shape.h" #include "box2d/b2_collision.h" #include "box2d/b2_contact.h" #include "box2d/b2_edge_shape.h" #include "box2d/b2_polygon_shape.h" #include "box2d/b2_world.h" b2Fixture::b2Fixture() { m_body = nullptr; m_next = nullptr; m_proxies = nullptr; m_proxyCount = 0; m_shape = nullptr; m_density = 0.0f; } void b2Fixture::Create(b2BlockAllocator* allocator, b2Body* body, const b2FixtureDef* def) { m_userData = def->userData; m_friction = def->friction; m_restitution = def->restitution; m_restitutionThreshold = def->restitutionThreshold; m_body = body; m_next = nullptr; m_filter = def->filter; m_isSensor = def->isSensor; m_shape = def->shape->Clone(allocator); // Reserve proxy space int32 childCount = m_shape->GetChildCount(); m_proxies = (b2FixtureProxy*)allocator->Allocate(childCount * sizeof(b2FixtureProxy)); for (int32 i = 0; i < childCount; ++i) { m_proxies[i].fixture = nullptr; m_proxies[i].proxyId = b2BroadPhase::e_nullProxy; } m_proxyCount = 0; m_density = def->density; } void b2Fixture::Destroy(b2BlockAllocator* allocator) { // The proxies must be destroyed before calling this. b2Assert(m_proxyCount == 0); // Free the proxy array. int32 childCount = m_shape->GetChildCount(); allocator->Free(m_proxies, childCount * sizeof(b2FixtureProxy)); m_proxies = nullptr; // Free the child shape. switch (m_shape->m_type) { case b2Shape::e_circle: { b2CircleShape* s = (b2CircleShape*)m_shape; s->~b2CircleShape(); allocator->Free(s, sizeof(b2CircleShape)); } break; case b2Shape::e_edge: { b2EdgeShape* s = (b2EdgeShape*)m_shape; s->~b2EdgeShape(); allocator->Free(s, sizeof(b2EdgeShape)); } break; case b2Shape::e_polygon: { b2PolygonShape* s = (b2PolygonShape*)m_shape; s->~b2PolygonShape(); allocator->Free(s, sizeof(b2PolygonShape)); } break; case b2Shape::e_chain: { b2ChainShape* s = (b2ChainShape*)m_shape; s->~b2ChainShape(); allocator->Free(s, sizeof(b2ChainShape)); } break; default: b2Assert(false); break; } m_shape = nullptr; } void b2Fixture::CreateProxies(b2BroadPhase* broadPhase, const b2Transform& xf) { b2Assert(m_proxyCount == 0); // Create proxies in the broad-phase. m_proxyCount = m_shape->GetChildCount(); for (int32 i = 0; i < m_proxyCount; ++i) { b2FixtureProxy* proxy = m_proxies + i; m_shape->ComputeAABB(&proxy->aabb, xf, i); proxy->proxyId = broadPhase->CreateProxy(proxy->aabb, proxy); proxy->fixture = this; proxy->childIndex = i; } } void b2Fixture::DestroyProxies(b2BroadPhase* broadPhase) { // Destroy proxies in the broad-phase. for (int32 i = 0; i < m_proxyCount; ++i) { b2FixtureProxy* proxy = m_proxies + i; broadPhase->DestroyProxy(proxy->proxyId); proxy->proxyId = b2BroadPhase::e_nullProxy; } m_proxyCount = 0; } void b2Fixture::Synchronize(b2BroadPhase* broadPhase, const b2Transform& transform1, const b2Transform& transform2) { if (m_proxyCount == 0) { return; } for (int32 i = 0; i < m_proxyCount; ++i) { b2FixtureProxy* proxy = m_proxies + i; // Compute an AABB that covers the swept shape (may miss some rotation effect). b2AABB aabb1, aabb2; m_shape->ComputeAABB(&aabb1, transform1, proxy->childIndex); m_shape->ComputeAABB(&aabb2, transform2, proxy->childIndex); proxy->aabb.Combine(aabb1, aabb2); b2Vec2 displacement = aabb2.GetCenter() - aabb1.GetCenter(); broadPhase->MoveProxy(proxy->proxyId, proxy->aabb, displacement); } } void b2Fixture::SetFilterData(const b2Filter& filter) { m_filter = filter; Refilter(); } void b2Fixture::Refilter() { if (m_body == nullptr) { return; } // Flag associated contacts for filtering. b2ContactEdge* edge = m_body->GetContactList(); while (edge) { b2Contact* contact = edge->contact; b2Fixture* fixtureA = contact->GetFixtureA(); b2Fixture* fixtureB = contact->GetFixtureB(); if (fixtureA == this || fixtureB == this) { contact->FlagForFiltering(); } edge = edge->next; } b2World* world = m_body->GetWorld(); if (world == nullptr) { return; } // Touch each proxy so that new pairs may be created b2BroadPhase* broadPhase = &world->m_contactManager.m_broadPhase; for (int32 i = 0; i < m_proxyCount; ++i) { broadPhase->TouchProxy(m_proxies[i].proxyId); } } void b2Fixture::SetSensor(bool sensor) { if (sensor != m_isSensor) { m_body->SetAwake(true); m_isSensor = sensor; } } void b2Fixture::Dump(int32 bodyIndex) { b2Dump(" b2FixtureDef fd;\n"); b2Dump(" fd.friction = %.9g;\n", m_friction); b2Dump(" fd.restitution = %.9g;\n", m_restitution); b2Dump(" fd.restitutionThreshold = %.9g;\n", m_restitutionThreshold); b2Dump(" fd.density = %.9g;\n", m_density); b2Dump(" fd.isSensor = bool(%d);\n", m_isSensor); b2Dump(" fd.filter.categoryBits = uint16(%d);\n", m_filter.categoryBits); b2Dump(" fd.filter.maskBits = uint16(%d);\n", m_filter.maskBits); b2Dump(" fd.filter.groupIndex = int16(%d);\n", m_filter.groupIndex); switch (m_shape->m_type) { case b2Shape::e_circle: { b2CircleShape* s = (b2CircleShape*)m_shape; b2Dump(" b2CircleShape shape;\n"); b2Dump(" shape.m_radius = %.9g;\n", s->m_radius); b2Dump(" shape.m_p.Set(%.9g, %.9g);\n", s->m_p.x, s->m_p.y); } break; case b2Shape::e_edge: { b2EdgeShape* s = (b2EdgeShape*)m_shape; b2Dump(" b2EdgeShape shape;\n"); b2Dump(" shape.m_radius = %.9g;\n", s->m_radius); b2Dump(" shape.m_vertex0.Set(%.9g, %.9g);\n", s->m_vertex0.x, s->m_vertex0.y); b2Dump(" shape.m_vertex1.Set(%.9g, %.9g);\n", s->m_vertex1.x, s->m_vertex1.y); b2Dump(" shape.m_vertex2.Set(%.9g, %.9g);\n", s->m_vertex2.x, s->m_vertex2.y); b2Dump(" shape.m_vertex3.Set(%.9g, %.9g);\n", s->m_vertex3.x, s->m_vertex3.y); b2Dump(" shape.m_oneSided = bool(%d);\n", s->m_oneSided); } break; case b2Shape::e_polygon: { b2PolygonShape* s = (b2PolygonShape*)m_shape; b2Dump(" b2PolygonShape shape;\n"); b2Dump(" b2Vec2 vs[%d];\n", b2_maxPolygonVertices); for (int32 i = 0; i < s->m_count; ++i) { b2Dump(" vs[%d].Set(%.9g, %.9g);\n", i, s->m_vertices[i].x, s->m_vertices[i].y); } b2Dump(" shape.Set(vs, %d);\n", s->m_count); } break; case b2Shape::e_chain: { b2ChainShape* s = (b2ChainShape*)m_shape; b2Dump(" b2ChainShape shape;\n"); b2Dump(" b2Vec2 vs[%d];\n", s->m_count); for (int32 i = 0; i < s->m_count; ++i) { b2Dump(" vs[%d].Set(%.9g, %.9g);\n", i, s->m_vertices[i].x, s->m_vertices[i].y); } b2Dump(" shape.CreateChain(vs, %d);\n", s->m_count); b2Dump(" shape.m_prevVertex.Set(%.9g, %.9g);\n", s->m_prevVertex.x, s->m_prevVertex.y); b2Dump(" shape.m_nextVertex.Set(%.9g, %.9g);\n", s->m_nextVertex.x, s->m_nextVertex.y); } break; default: return; } b2Dump("\n"); b2Dump(" fd.shape = &shape;\n"); b2Dump("\n"); b2Dump(" bodies[%d]->CreateFixture(&fd);\n", bodyIndex); } ================================================ FILE: src/libraries/box2d/dynamics/b2_friction_joint.cpp ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #include "box2d/b2_friction_joint.h" #include "box2d/b2_body.h" #include "box2d/b2_time_step.h" // Point-to-point constraint // Cdot = v2 - v1 // = v2 + cross(w2, r2) - v1 - cross(w1, r1) // J = [-I -r1_skew I r2_skew ] // Identity used: // w k % (rx i + ry j) = w * (-ry i + rx j) // Angle constraint // Cdot = w2 - w1 // J = [0 0 -1 0 0 1] // K = invI1 + invI2 void b2FrictionJointDef::Initialize(b2Body* bA, b2Body* bB, const b2Vec2& anchor) { bodyA = bA; bodyB = bB; localAnchorA = bodyA->GetLocalPoint(anchor); localAnchorB = bodyB->GetLocalPoint(anchor); } b2FrictionJoint::b2FrictionJoint(const b2FrictionJointDef* def) : b2Joint(def) { m_localAnchorA = def->localAnchorA; m_localAnchorB = def->localAnchorB; m_linearImpulse.SetZero(); m_angularImpulse = 0.0f; m_maxForce = def->maxForce; m_maxTorque = def->maxTorque; } void b2FrictionJoint::InitVelocityConstraints(const b2SolverData& data) { m_indexA = m_bodyA->m_islandIndex; m_indexB = m_bodyB->m_islandIndex; m_localCenterA = m_bodyA->m_sweep.localCenter; m_localCenterB = m_bodyB->m_sweep.localCenter; m_invMassA = m_bodyA->m_invMass; m_invMassB = m_bodyB->m_invMass; m_invIA = m_bodyA->m_invI; m_invIB = m_bodyB->m_invI; float aA = data.positions[m_indexA].a; b2Vec2 vA = data.velocities[m_indexA].v; float wA = data.velocities[m_indexA].w; float aB = data.positions[m_indexB].a; b2Vec2 vB = data.velocities[m_indexB].v; float wB = data.velocities[m_indexB].w; b2Rot qA(aA), qB(aB); // Compute the effective mass matrix. m_rA = b2Mul(qA, m_localAnchorA - m_localCenterA); m_rB = b2Mul(qB, m_localAnchorB - m_localCenterB); // J = [-I -r1_skew I r2_skew] // [ 0 -1 0 1] // r_skew = [-ry; rx] // Matlab // K = [ mA+r1y^2*iA+mB+r2y^2*iB, -r1y*iA*r1x-r2y*iB*r2x, -r1y*iA-r2y*iB] // [ -r1y*iA*r1x-r2y*iB*r2x, mA+r1x^2*iA+mB+r2x^2*iB, r1x*iA+r2x*iB] // [ -r1y*iA-r2y*iB, r1x*iA+r2x*iB, iA+iB] float mA = m_invMassA, mB = m_invMassB; float iA = m_invIA, iB = m_invIB; b2Mat22 K; K.ex.x = mA + mB + iA * m_rA.y * m_rA.y + iB * m_rB.y * m_rB.y; K.ex.y = -iA * m_rA.x * m_rA.y - iB * m_rB.x * m_rB.y; K.ey.x = K.ex.y; K.ey.y = mA + mB + iA * m_rA.x * m_rA.x + iB * m_rB.x * m_rB.x; m_linearMass = K.GetInverse(); m_angularMass = iA + iB; if (m_angularMass > 0.0f) { m_angularMass = 1.0f / m_angularMass; } if (data.step.warmStarting) { // Scale impulses to support a variable time step. m_linearImpulse *= data.step.dtRatio; m_angularImpulse *= data.step.dtRatio; b2Vec2 P(m_linearImpulse.x, m_linearImpulse.y); vA -= mA * P; wA -= iA * (b2Cross(m_rA, P) + m_angularImpulse); vB += mB * P; wB += iB * (b2Cross(m_rB, P) + m_angularImpulse); } else { m_linearImpulse.SetZero(); m_angularImpulse = 0.0f; } data.velocities[m_indexA].v = vA; data.velocities[m_indexA].w = wA; data.velocities[m_indexB].v = vB; data.velocities[m_indexB].w = wB; } void b2FrictionJoint::SolveVelocityConstraints(const b2SolverData& data) { b2Vec2 vA = data.velocities[m_indexA].v; float wA = data.velocities[m_indexA].w; b2Vec2 vB = data.velocities[m_indexB].v; float wB = data.velocities[m_indexB].w; float mA = m_invMassA, mB = m_invMassB; float iA = m_invIA, iB = m_invIB; float h = data.step.dt; // Solve angular friction { float Cdot = wB - wA; float impulse = -m_angularMass * Cdot; float oldImpulse = m_angularImpulse; float maxImpulse = h * m_maxTorque; m_angularImpulse = b2Clamp(m_angularImpulse + impulse, -maxImpulse, maxImpulse); impulse = m_angularImpulse - oldImpulse; wA -= iA * impulse; wB += iB * impulse; } // Solve linear friction { b2Vec2 Cdot = vB + b2Cross(wB, m_rB) - vA - b2Cross(wA, m_rA); b2Vec2 impulse = -b2Mul(m_linearMass, Cdot); b2Vec2 oldImpulse = m_linearImpulse; m_linearImpulse += impulse; float maxImpulse = h * m_maxForce; if (m_linearImpulse.LengthSquared() > maxImpulse * maxImpulse) { m_linearImpulse.Normalize(); m_linearImpulse *= maxImpulse; } impulse = m_linearImpulse - oldImpulse; vA -= mA * impulse; wA -= iA * b2Cross(m_rA, impulse); vB += mB * impulse; wB += iB * b2Cross(m_rB, impulse); } data.velocities[m_indexA].v = vA; data.velocities[m_indexA].w = wA; data.velocities[m_indexB].v = vB; data.velocities[m_indexB].w = wB; } bool b2FrictionJoint::SolvePositionConstraints(const b2SolverData& data) { B2_NOT_USED(data); return true; } b2Vec2 b2FrictionJoint::GetAnchorA() const { return m_bodyA->GetWorldPoint(m_localAnchorA); } b2Vec2 b2FrictionJoint::GetAnchorB() const { return m_bodyB->GetWorldPoint(m_localAnchorB); } b2Vec2 b2FrictionJoint::GetReactionForce(float inv_dt) const { return inv_dt * m_linearImpulse; } float b2FrictionJoint::GetReactionTorque(float inv_dt) const { return inv_dt * m_angularImpulse; } void b2FrictionJoint::SetMaxForce(float force) { b2Assert(b2IsValid(force) && force >= 0.0f); m_maxForce = force; } float b2FrictionJoint::GetMaxForce() const { return m_maxForce; } void b2FrictionJoint::SetMaxTorque(float torque) { b2Assert(b2IsValid(torque) && torque >= 0.0f); m_maxTorque = torque; } float b2FrictionJoint::GetMaxTorque() const { return m_maxTorque; } void b2FrictionJoint::Dump() { int32 indexA = m_bodyA->m_islandIndex; int32 indexB = m_bodyB->m_islandIndex; b2Dump(" b2FrictionJointDef jd;\n"); b2Dump(" jd.bodyA = bodies[%d];\n", indexA); b2Dump(" jd.bodyB = bodies[%d];\n", indexB); b2Dump(" jd.collideConnected = bool(%d);\n", m_collideConnected); b2Dump(" jd.localAnchorA.Set(%.9g, %.9g);\n", m_localAnchorA.x, m_localAnchorA.y); b2Dump(" jd.localAnchorB.Set(%.9g, %.9g);\n", m_localAnchorB.x, m_localAnchorB.y); b2Dump(" jd.maxForce = %.9g;\n", m_maxForce); b2Dump(" jd.maxTorque = %.9g;\n", m_maxTorque); b2Dump(" joints[%d] = m_world->CreateJoint(&jd);\n", m_index); } ================================================ FILE: src/libraries/box2d/dynamics/b2_gear_joint.cpp ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #include "box2d/b2_gear_joint.h" #include "box2d/b2_revolute_joint.h" #include "box2d/b2_prismatic_joint.h" #include "box2d/b2_body.h" #include "box2d/b2_time_step.h" // Gear Joint: // C0 = (coordinate1 + ratio * coordinate2)_initial // C = (coordinate1 + ratio * coordinate2) - C0 = 0 // J = [J1 ratio * J2] // K = J * invM * JT // = J1 * invM1 * J1T + ratio * ratio * J2 * invM2 * J2T // // Revolute: // coordinate = rotation // Cdot = angularVelocity // J = [0 0 1] // K = J * invM * JT = invI // // Prismatic: // coordinate = dot(p - pg, ug) // Cdot = dot(v + cross(w, r), ug) // J = [ug cross(r, ug)] // K = J * invM * JT = invMass + invI * cross(r, ug)^2 b2GearJoint::b2GearJoint(const b2GearJointDef* def) : b2Joint(def) { m_joint1 = def->joint1; m_joint2 = def->joint2; m_typeA = m_joint1->GetType(); m_typeB = m_joint2->GetType(); b2Assert(m_typeA == e_revoluteJoint || m_typeA == e_prismaticJoint); b2Assert(m_typeB == e_revoluteJoint || m_typeB == e_prismaticJoint); float coordinateA, coordinateB; // TODO_ERIN there might be some problem with the joint edges in b2Joint. m_bodyC = m_joint1->GetBodyA(); m_bodyA = m_joint1->GetBodyB(); // Body B on joint1 must be dynamic b2Assert(m_bodyA->m_type == b2_dynamicBody); // Get geometry of joint1 b2Transform xfA = m_bodyA->m_xf; float aA = m_bodyA->m_sweep.a; b2Transform xfC = m_bodyC->m_xf; float aC = m_bodyC->m_sweep.a; if (m_typeA == e_revoluteJoint) { b2RevoluteJoint* revolute = (b2RevoluteJoint*)def->joint1; m_localAnchorC = revolute->m_localAnchorA; m_localAnchorA = revolute->m_localAnchorB; m_referenceAngleA = revolute->m_referenceAngle; m_localAxisC.SetZero(); coordinateA = aA - aC - m_referenceAngleA; } else { b2PrismaticJoint* prismatic = (b2PrismaticJoint*)def->joint1; m_localAnchorC = prismatic->m_localAnchorA; m_localAnchorA = prismatic->m_localAnchorB; m_referenceAngleA = prismatic->m_referenceAngle; m_localAxisC = prismatic->m_localXAxisA; b2Vec2 pC = m_localAnchorC; b2Vec2 pA = b2MulT(xfC.q, b2Mul(xfA.q, m_localAnchorA) + (xfA.p - xfC.p)); coordinateA = b2Dot(pA - pC, m_localAxisC); } m_bodyD = m_joint2->GetBodyA(); m_bodyB = m_joint2->GetBodyB(); // Body B on joint2 must be dynamic b2Assert(m_bodyB->m_type == b2_dynamicBody); // Get geometry of joint2 b2Transform xfB = m_bodyB->m_xf; float aB = m_bodyB->m_sweep.a; b2Transform xfD = m_bodyD->m_xf; float aD = m_bodyD->m_sweep.a; if (m_typeB == e_revoluteJoint) { b2RevoluteJoint* revolute = (b2RevoluteJoint*)def->joint2; m_localAnchorD = revolute->m_localAnchorA; m_localAnchorB = revolute->m_localAnchorB; m_referenceAngleB = revolute->m_referenceAngle; m_localAxisD.SetZero(); coordinateB = aB - aD - m_referenceAngleB; } else { b2PrismaticJoint* prismatic = (b2PrismaticJoint*)def->joint2; m_localAnchorD = prismatic->m_localAnchorA; m_localAnchorB = prismatic->m_localAnchorB; m_referenceAngleB = prismatic->m_referenceAngle; m_localAxisD = prismatic->m_localXAxisA; b2Vec2 pD = m_localAnchorD; b2Vec2 pB = b2MulT(xfD.q, b2Mul(xfB.q, m_localAnchorB) + (xfB.p - xfD.p)); coordinateB = b2Dot(pB - pD, m_localAxisD); } m_ratio = def->ratio; m_constant = coordinateA + m_ratio * coordinateB; m_impulse = 0.0f; } void b2GearJoint::InitVelocityConstraints(const b2SolverData& data) { m_indexA = m_bodyA->m_islandIndex; m_indexB = m_bodyB->m_islandIndex; m_indexC = m_bodyC->m_islandIndex; m_indexD = m_bodyD->m_islandIndex; m_lcA = m_bodyA->m_sweep.localCenter; m_lcB = m_bodyB->m_sweep.localCenter; m_lcC = m_bodyC->m_sweep.localCenter; m_lcD = m_bodyD->m_sweep.localCenter; m_mA = m_bodyA->m_invMass; m_mB = m_bodyB->m_invMass; m_mC = m_bodyC->m_invMass; m_mD = m_bodyD->m_invMass; m_iA = m_bodyA->m_invI; m_iB = m_bodyB->m_invI; m_iC = m_bodyC->m_invI; m_iD = m_bodyD->m_invI; float aA = data.positions[m_indexA].a; b2Vec2 vA = data.velocities[m_indexA].v; float wA = data.velocities[m_indexA].w; float aB = data.positions[m_indexB].a; b2Vec2 vB = data.velocities[m_indexB].v; float wB = data.velocities[m_indexB].w; float aC = data.positions[m_indexC].a; b2Vec2 vC = data.velocities[m_indexC].v; float wC = data.velocities[m_indexC].w; float aD = data.positions[m_indexD].a; b2Vec2 vD = data.velocities[m_indexD].v; float wD = data.velocities[m_indexD].w; b2Rot qA(aA), qB(aB), qC(aC), qD(aD); m_mass = 0.0f; if (m_typeA == e_revoluteJoint) { m_JvAC.SetZero(); m_JwA = 1.0f; m_JwC = 1.0f; m_mass += m_iA + m_iC; } else { b2Vec2 u = b2Mul(qC, m_localAxisC); b2Vec2 rC = b2Mul(qC, m_localAnchorC - m_lcC); b2Vec2 rA = b2Mul(qA, m_localAnchorA - m_lcA); m_JvAC = u; m_JwC = b2Cross(rC, u); m_JwA = b2Cross(rA, u); m_mass += m_mC + m_mA + m_iC * m_JwC * m_JwC + m_iA * m_JwA * m_JwA; } if (m_typeB == e_revoluteJoint) { m_JvBD.SetZero(); m_JwB = m_ratio; m_JwD = m_ratio; m_mass += m_ratio * m_ratio * (m_iB + m_iD); } else { b2Vec2 u = b2Mul(qD, m_localAxisD); b2Vec2 rD = b2Mul(qD, m_localAnchorD - m_lcD); b2Vec2 rB = b2Mul(qB, m_localAnchorB - m_lcB); m_JvBD = m_ratio * u; m_JwD = m_ratio * b2Cross(rD, u); m_JwB = m_ratio * b2Cross(rB, u); m_mass += m_ratio * m_ratio * (m_mD + m_mB) + m_iD * m_JwD * m_JwD + m_iB * m_JwB * m_JwB; } // Compute effective mass. m_mass = m_mass > 0.0f ? 1.0f / m_mass : 0.0f; if (data.step.warmStarting) { vA += (m_mA * m_impulse) * m_JvAC; wA += m_iA * m_impulse * m_JwA; vB += (m_mB * m_impulse) * m_JvBD; wB += m_iB * m_impulse * m_JwB; vC -= (m_mC * m_impulse) * m_JvAC; wC -= m_iC * m_impulse * m_JwC; vD -= (m_mD * m_impulse) * m_JvBD; wD -= m_iD * m_impulse * m_JwD; } else { m_impulse = 0.0f; } data.velocities[m_indexA].v = vA; data.velocities[m_indexA].w = wA; data.velocities[m_indexB].v = vB; data.velocities[m_indexB].w = wB; data.velocities[m_indexC].v = vC; data.velocities[m_indexC].w = wC; data.velocities[m_indexD].v = vD; data.velocities[m_indexD].w = wD; } void b2GearJoint::SolveVelocityConstraints(const b2SolverData& data) { b2Vec2 vA = data.velocities[m_indexA].v; float wA = data.velocities[m_indexA].w; b2Vec2 vB = data.velocities[m_indexB].v; float wB = data.velocities[m_indexB].w; b2Vec2 vC = data.velocities[m_indexC].v; float wC = data.velocities[m_indexC].w; b2Vec2 vD = data.velocities[m_indexD].v; float wD = data.velocities[m_indexD].w; float Cdot = b2Dot(m_JvAC, vA - vC) + b2Dot(m_JvBD, vB - vD); Cdot += (m_JwA * wA - m_JwC * wC) + (m_JwB * wB - m_JwD * wD); float impulse = -m_mass * Cdot; m_impulse += impulse; vA += (m_mA * impulse) * m_JvAC; wA += m_iA * impulse * m_JwA; vB += (m_mB * impulse) * m_JvBD; wB += m_iB * impulse * m_JwB; vC -= (m_mC * impulse) * m_JvAC; wC -= m_iC * impulse * m_JwC; vD -= (m_mD * impulse) * m_JvBD; wD -= m_iD * impulse * m_JwD; data.velocities[m_indexA].v = vA; data.velocities[m_indexA].w = wA; data.velocities[m_indexB].v = vB; data.velocities[m_indexB].w = wB; data.velocities[m_indexC].v = vC; data.velocities[m_indexC].w = wC; data.velocities[m_indexD].v = vD; data.velocities[m_indexD].w = wD; } bool b2GearJoint::SolvePositionConstraints(const b2SolverData& data) { b2Vec2 cA = data.positions[m_indexA].c; float aA = data.positions[m_indexA].a; b2Vec2 cB = data.positions[m_indexB].c; float aB = data.positions[m_indexB].a; b2Vec2 cC = data.positions[m_indexC].c; float aC = data.positions[m_indexC].a; b2Vec2 cD = data.positions[m_indexD].c; float aD = data.positions[m_indexD].a; b2Rot qA(aA), qB(aB), qC(aC), qD(aD); float linearError = 0.0f; float coordinateA, coordinateB; b2Vec2 JvAC, JvBD; float JwA, JwB, JwC, JwD; float mass = 0.0f; if (m_typeA == e_revoluteJoint) { JvAC.SetZero(); JwA = 1.0f; JwC = 1.0f; mass += m_iA + m_iC; coordinateA = aA - aC - m_referenceAngleA; } else { b2Vec2 u = b2Mul(qC, m_localAxisC); b2Vec2 rC = b2Mul(qC, m_localAnchorC - m_lcC); b2Vec2 rA = b2Mul(qA, m_localAnchorA - m_lcA); JvAC = u; JwC = b2Cross(rC, u); JwA = b2Cross(rA, u); mass += m_mC + m_mA + m_iC * JwC * JwC + m_iA * JwA * JwA; b2Vec2 pC = m_localAnchorC - m_lcC; b2Vec2 pA = b2MulT(qC, rA + (cA - cC)); coordinateA = b2Dot(pA - pC, m_localAxisC); } if (m_typeB == e_revoluteJoint) { JvBD.SetZero(); JwB = m_ratio; JwD = m_ratio; mass += m_ratio * m_ratio * (m_iB + m_iD); coordinateB = aB - aD - m_referenceAngleB; } else { b2Vec2 u = b2Mul(qD, m_localAxisD); b2Vec2 rD = b2Mul(qD, m_localAnchorD - m_lcD); b2Vec2 rB = b2Mul(qB, m_localAnchorB - m_lcB); JvBD = m_ratio * u; JwD = m_ratio * b2Cross(rD, u); JwB = m_ratio * b2Cross(rB, u); mass += m_ratio * m_ratio * (m_mD + m_mB) + m_iD * JwD * JwD + m_iB * JwB * JwB; b2Vec2 pD = m_localAnchorD - m_lcD; b2Vec2 pB = b2MulT(qD, rB + (cB - cD)); coordinateB = b2Dot(pB - pD, m_localAxisD); } float C = (coordinateA + m_ratio * coordinateB) - m_constant; float impulse = 0.0f; if (mass > 0.0f) { impulse = -C / mass; } cA += m_mA * impulse * JvAC; aA += m_iA * impulse * JwA; cB += m_mB * impulse * JvBD; aB += m_iB * impulse * JwB; cC -= m_mC * impulse * JvAC; aC -= m_iC * impulse * JwC; cD -= m_mD * impulse * JvBD; aD -= m_iD * impulse * JwD; data.positions[m_indexA].c = cA; data.positions[m_indexA].a = aA; data.positions[m_indexB].c = cB; data.positions[m_indexB].a = aB; data.positions[m_indexC].c = cC; data.positions[m_indexC].a = aC; data.positions[m_indexD].c = cD; data.positions[m_indexD].a = aD; // TODO_ERIN not implemented return linearError < b2_linearSlop; } b2Vec2 b2GearJoint::GetAnchorA() const { return m_bodyA->GetWorldPoint(m_localAnchorA); } b2Vec2 b2GearJoint::GetAnchorB() const { return m_bodyB->GetWorldPoint(m_localAnchorB); } b2Vec2 b2GearJoint::GetReactionForce(float inv_dt) const { b2Vec2 P = m_impulse * m_JvAC; return inv_dt * P; } float b2GearJoint::GetReactionTorque(float inv_dt) const { float L = m_impulse * m_JwA; return inv_dt * L; } void b2GearJoint::SetRatio(float ratio) { b2Assert(b2IsValid(ratio)); m_ratio = ratio; } float b2GearJoint::GetRatio() const { return m_ratio; } void b2GearJoint::Dump() { int32 indexA = m_bodyA->m_islandIndex; int32 indexB = m_bodyB->m_islandIndex; int32 index1 = m_joint1->m_index; int32 index2 = m_joint2->m_index; b2Dump(" b2GearJointDef jd;\n"); b2Dump(" jd.bodyA = bodies[%d];\n", indexA); b2Dump(" jd.bodyB = bodies[%d];\n", indexB); b2Dump(" jd.collideConnected = bool(%d);\n", m_collideConnected); b2Dump(" jd.joint1 = joints[%d];\n", index1); b2Dump(" jd.joint2 = joints[%d];\n", index2); b2Dump(" jd.ratio = %.9g;\n", m_ratio); b2Dump(" joints[%d] = m_world->CreateJoint(&jd);\n", m_index); } ================================================ FILE: src/libraries/box2d/dynamics/b2_island.cpp ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #include "box2d/b2_body.h" #include "box2d/b2_contact.h" #include "box2d/b2_distance.h" #include "box2d/b2_fixture.h" #include "box2d/b2_joint.h" #include "box2d/b2_stack_allocator.h" #include "box2d/b2_timer.h" #include "box2d/b2_world.h" #include "b2_island.h" #include "b2_contact_solver.h" /* Position Correction Notes ========================= I tried the several algorithms for position correction of the 2D revolute joint. I looked at these systems: - simple pendulum (1m diameter sphere on massless 5m stick) with initial angular velocity of 100 rad/s. - suspension bridge with 30 1m long planks of length 1m. - multi-link chain with 30 1m long links. Here are the algorithms: Baumgarte - A fraction of the position error is added to the velocity error. There is no separate position solver. Pseudo Velocities - After the velocity solver and position integration, the position error, Jacobian, and effective mass are recomputed. Then the velocity constraints are solved with pseudo velocities and a fraction of the position error is added to the pseudo velocity error. The pseudo velocities are initialized to zero and there is no warm-starting. After the position solver, the pseudo velocities are added to the positions. This is also called the First Order World method or the Position LCP method. Modified Nonlinear Gauss-Seidel (NGS) - Like Pseudo Velocities except the position error is re-computed for each constraint and the positions are updated after the constraint is solved. The radius vectors (aka Jacobians) are re-computed too (otherwise the algorithm has horrible instability). The pseudo velocity states are not needed because they are effectively zero at the beginning of each iteration. Since we have the current position error, we allow the iterations to terminate early if the error becomes smaller than b2_linearSlop. Full NGS or just NGS - Like Modified NGS except the effective mass are re-computed each time a constraint is solved. Here are the results: Baumgarte - this is the cheapest algorithm but it has some stability problems, especially with the bridge. The chain links separate easily close to the root and they jitter as they struggle to pull together. This is one of the most common methods in the field. The big drawback is that the position correction artificially affects the momentum, thus leading to instabilities and false bounce. I used a bias factor of 0.2. A larger bias factor makes the bridge less stable, a smaller factor makes joints and contacts more spongy. Pseudo Velocities - the is more stable than the Baumgarte method. The bridge is stable. However, joints still separate with large angular velocities. Drag the simple pendulum in a circle quickly and the joint will separate. The chain separates easily and does not recover. I used a bias factor of 0.2. A larger value lead to the bridge collapsing when a heavy cube drops on it. Modified NGS - this algorithm is better in some ways than Baumgarte and Pseudo Velocities, but in other ways it is worse. The bridge and chain are much more stable, but the simple pendulum goes unstable at high angular velocities. Full NGS - stable in all tests. The joints display good stiffness. The bridge still sags, but this is better than infinite forces. Recommendations Pseudo Velocities are not really worthwhile because the bridge and chain cannot recover from joint separation. In other cases the benefit over Baumgarte is small. Modified NGS is not a robust method for the revolute joint due to the violent instability seen in the simple pendulum. Perhaps it is viable with other constraint types, especially scalar constraints where the effective mass is a scalar. This leaves Baumgarte and Full NGS. Baumgarte has small, but manageable instabilities and is very fast. I don't think we can escape Baumgarte, especially in highly demanding cases where high constraint fidelity is not needed. Full NGS is robust and easy on the eyes. I recommend this as an option for higher fidelity simulation and certainly for suspension bridges and long chains. Full NGS might be a good choice for ragdolls, especially motorized ragdolls where joint separation can be problematic. The number of NGS iterations can be reduced for better performance without harming robustness much. Each joint in a can be handled differently in the position solver. So I recommend a system where the user can select the algorithm on a per joint basis. I would probably default to the slower Full NGS and let the user select the faster Baumgarte method in performance critical scenarios. */ /* Cache Performance The Box2D solvers are dominated by cache misses. Data structures are designed to increase the number of cache hits. Much of misses are due to random access to body data. The constraint structures are iterated over linearly, which leads to few cache misses. The bodies are not accessed during iteration. Instead read only data, such as the mass values are stored with the constraints. The mutable data are the constraint impulses and the bodies velocities/positions. The impulses are held inside the constraint structures. The body velocities/positions are held in compact, temporary arrays to increase the number of cache hits. Linear and angular velocity are stored in a single array since multiple arrays lead to multiple misses. */ /* 2D Rotation R = [cos(theta) -sin(theta)] [sin(theta) cos(theta) ] thetaDot = omega Let q1 = cos(theta), q2 = sin(theta). R = [q1 -q2] [q2 q1] q1Dot = -thetaDot * q2 q2Dot = thetaDot * q1 q1_new = q1_old - dt * w * q2 q2_new = q2_old + dt * w * q1 then normalize. This might be faster than computing sin+cos. However, we can compute sin+cos of the same angle fast. */ b2Island::b2Island( int32 bodyCapacity, int32 contactCapacity, int32 jointCapacity, b2StackAllocator* allocator, b2ContactListener* listener) { m_bodyCapacity = bodyCapacity; m_contactCapacity = contactCapacity; m_jointCapacity = jointCapacity; m_bodyCount = 0; m_contactCount = 0; m_jointCount = 0; m_allocator = allocator; m_listener = listener; m_bodies = (b2Body**)m_allocator->Allocate(bodyCapacity * sizeof(b2Body*)); m_contacts = (b2Contact**)m_allocator->Allocate(contactCapacity * sizeof(b2Contact*)); m_joints = (b2Joint**)m_allocator->Allocate(jointCapacity * sizeof(b2Joint*)); m_velocities = (b2Velocity*)m_allocator->Allocate(m_bodyCapacity * sizeof(b2Velocity)); m_positions = (b2Position*)m_allocator->Allocate(m_bodyCapacity * sizeof(b2Position)); } b2Island::~b2Island() { // Warning: the order should reverse the constructor order. m_allocator->Free(m_positions); m_allocator->Free(m_velocities); m_allocator->Free(m_joints); m_allocator->Free(m_contacts); m_allocator->Free(m_bodies); } void b2Island::Solve(b2Profile* profile, const b2TimeStep& step, const b2Vec2& gravity, bool allowSleep) { b2Timer timer; float h = step.dt; // Integrate velocities and apply damping. Initialize the body state. for (int32 i = 0; i < m_bodyCount; ++i) { b2Body* b = m_bodies[i]; b2Vec2 c = b->m_sweep.c; float a = b->m_sweep.a; b2Vec2 v = b->m_linearVelocity; float w = b->m_angularVelocity; // Store positions for continuous collision. b->m_sweep.c0 = b->m_sweep.c; b->m_sweep.a0 = b->m_sweep.a; if (b->m_type == b2_dynamicBody) { // Integrate velocities. v += h * b->m_invMass * (b->m_gravityScale * b->m_mass * gravity + b->m_force); w += h * b->m_invI * b->m_torque; // Apply damping. // ODE: dv/dt + c * v = 0 // Solution: v(t) = v0 * exp(-c * t) // Time step: v(t + dt) = v0 * exp(-c * (t + dt)) = v0 * exp(-c * t) * exp(-c * dt) = v * exp(-c * dt) // v2 = exp(-c * dt) * v1 // Pade approximation: // v2 = v1 * 1 / (1 + c * dt) v *= 1.0f / (1.0f + h * b->m_linearDamping); w *= 1.0f / (1.0f + h * b->m_angularDamping); } m_positions[i].c = c; m_positions[i].a = a; m_velocities[i].v = v; m_velocities[i].w = w; } timer.Reset(); // Solver data b2SolverData solverData; solverData.step = step; solverData.positions = m_positions; solverData.velocities = m_velocities; // Initialize velocity constraints. b2ContactSolverDef contactSolverDef; contactSolverDef.step = step; contactSolverDef.contacts = m_contacts; contactSolverDef.count = m_contactCount; contactSolverDef.positions = m_positions; contactSolverDef.velocities = m_velocities; contactSolverDef.allocator = m_allocator; b2ContactSolver contactSolver(&contactSolverDef); contactSolver.InitializeVelocityConstraints(); if (step.warmStarting) { contactSolver.WarmStart(); } for (int32 i = 0; i < m_jointCount; ++i) { m_joints[i]->InitVelocityConstraints(solverData); } profile->solveInit = timer.GetMilliseconds(); // Solve velocity constraints timer.Reset(); for (int32 i = 0; i < step.velocityIterations; ++i) { for (int32 j = 0; j < m_jointCount; ++j) { m_joints[j]->SolveVelocityConstraints(solverData); } contactSolver.SolveVelocityConstraints(); } // Store impulses for warm starting contactSolver.StoreImpulses(); profile->solveVelocity = timer.GetMilliseconds(); // Integrate positions for (int32 i = 0; i < m_bodyCount; ++i) { b2Vec2 c = m_positions[i].c; float a = m_positions[i].a; b2Vec2 v = m_velocities[i].v; float w = m_velocities[i].w; // Check for large velocities b2Vec2 translation = h * v; if (b2Dot(translation, translation) > b2_maxTranslationSquared) { float ratio = b2_maxTranslation / translation.Length(); v *= ratio; } float rotation = h * w; if (rotation * rotation > b2_maxRotationSquared) { float ratio = b2_maxRotation / b2Abs(rotation); w *= ratio; } // Integrate c += h * v; a += h * w; m_positions[i].c = c; m_positions[i].a = a; m_velocities[i].v = v; m_velocities[i].w = w; } // Solve position constraints timer.Reset(); bool positionSolved = false; for (int32 i = 0; i < step.positionIterations; ++i) { bool contactsOkay = contactSolver.SolvePositionConstraints(); bool jointsOkay = true; for (int32 j = 0; j < m_jointCount; ++j) { bool jointOkay = m_joints[j]->SolvePositionConstraints(solverData); jointsOkay = jointsOkay && jointOkay; } if (contactsOkay && jointsOkay) { // Exit early if the position errors are small. positionSolved = true; break; } } // Copy state buffers back to the bodies for (int32 i = 0; i < m_bodyCount; ++i) { b2Body* body = m_bodies[i]; body->m_sweep.c = m_positions[i].c; body->m_sweep.a = m_positions[i].a; body->m_linearVelocity = m_velocities[i].v; body->m_angularVelocity = m_velocities[i].w; body->SynchronizeTransform(); } profile->solvePosition = timer.GetMilliseconds(); Report(contactSolver.m_velocityConstraints); if (allowSleep) { float minSleepTime = b2_maxFloat; const float linTolSqr = b2_linearSleepTolerance * b2_linearSleepTolerance; const float angTolSqr = b2_angularSleepTolerance * b2_angularSleepTolerance; for (int32 i = 0; i < m_bodyCount; ++i) { b2Body* b = m_bodies[i]; if (b->GetType() == b2_staticBody) { continue; } if ((b->m_flags & b2Body::e_autoSleepFlag) == 0 || b->m_angularVelocity * b->m_angularVelocity > angTolSqr || b2Dot(b->m_linearVelocity, b->m_linearVelocity) > linTolSqr) { b->m_sleepTime = 0.0f; minSleepTime = 0.0f; } else { b->m_sleepTime += h; minSleepTime = b2Min(minSleepTime, b->m_sleepTime); } } if (minSleepTime >= b2_timeToSleep && positionSolved) { for (int32 i = 0; i < m_bodyCount; ++i) { b2Body* b = m_bodies[i]; b->SetAwake(false); } } } } void b2Island::SolveTOI(const b2TimeStep& subStep, int32 toiIndexA, int32 toiIndexB) { b2Assert(toiIndexA < m_bodyCount); b2Assert(toiIndexB < m_bodyCount); // Initialize the body state. for (int32 i = 0; i < m_bodyCount; ++i) { b2Body* b = m_bodies[i]; m_positions[i].c = b->m_sweep.c; m_positions[i].a = b->m_sweep.a; m_velocities[i].v = b->m_linearVelocity; m_velocities[i].w = b->m_angularVelocity; } b2ContactSolverDef contactSolverDef; contactSolverDef.contacts = m_contacts; contactSolverDef.count = m_contactCount; contactSolverDef.allocator = m_allocator; contactSolverDef.step = subStep; contactSolverDef.positions = m_positions; contactSolverDef.velocities = m_velocities; b2ContactSolver contactSolver(&contactSolverDef); // Solve position constraints. for (int32 i = 0; i < subStep.positionIterations; ++i) { bool contactsOkay = contactSolver.SolveTOIPositionConstraints(toiIndexA, toiIndexB); if (contactsOkay) { break; } } #if 0 // Is the new position really safe? for (int32 i = 0; i < m_contactCount; ++i) { b2Contact* c = m_contacts[i]; b2Fixture* fA = c->GetFixtureA(); b2Fixture* fB = c->GetFixtureB(); b2Body* bA = fA->GetBody(); b2Body* bB = fB->GetBody(); int32 indexA = c->GetChildIndexA(); int32 indexB = c->GetChildIndexB(); b2DistanceInput input; input.proxyA.Set(fA->GetShape(), indexA); input.proxyB.Set(fB->GetShape(), indexB); input.transformA = bA->GetTransform(); input.transformB = bB->GetTransform(); input.useRadii = false; b2DistanceOutput output; b2SimplexCache cache; cache.count = 0; b2Distance(&output, &cache, &input); if (output.distance == 0 || cache.count == 3) { cache.count += 0; } } #endif // Leap of faith to new safe state. m_bodies[toiIndexA]->m_sweep.c0 = m_positions[toiIndexA].c; m_bodies[toiIndexA]->m_sweep.a0 = m_positions[toiIndexA].a; m_bodies[toiIndexB]->m_sweep.c0 = m_positions[toiIndexB].c; m_bodies[toiIndexB]->m_sweep.a0 = m_positions[toiIndexB].a; // No warm starting is needed for TOI events because warm // starting impulses were applied in the discrete solver. contactSolver.InitializeVelocityConstraints(); // Solve velocity constraints. for (int32 i = 0; i < subStep.velocityIterations; ++i) { contactSolver.SolveVelocityConstraints(); } // Don't store the TOI contact forces for warm starting // because they can be quite large. float h = subStep.dt; // Integrate positions for (int32 i = 0; i < m_bodyCount; ++i) { b2Vec2 c = m_positions[i].c; float a = m_positions[i].a; b2Vec2 v = m_velocities[i].v; float w = m_velocities[i].w; // Check for large velocities b2Vec2 translation = h * v; if (b2Dot(translation, translation) > b2_maxTranslationSquared) { float ratio = b2_maxTranslation / translation.Length(); v *= ratio; } float rotation = h * w; if (rotation * rotation > b2_maxRotationSquared) { float ratio = b2_maxRotation / b2Abs(rotation); w *= ratio; } // Integrate c += h * v; a += h * w; m_positions[i].c = c; m_positions[i].a = a; m_velocities[i].v = v; m_velocities[i].w = w; // Sync bodies b2Body* body = m_bodies[i]; body->m_sweep.c = c; body->m_sweep.a = a; body->m_linearVelocity = v; body->m_angularVelocity = w; body->SynchronizeTransform(); } Report(contactSolver.m_velocityConstraints); } void b2Island::Report(const b2ContactVelocityConstraint* constraints) { if (m_listener == nullptr) { return; } for (int32 i = 0; i < m_contactCount; ++i) { b2Contact* c = m_contacts[i]; const b2ContactVelocityConstraint* vc = constraints + i; b2ContactImpulse impulse; impulse.count = vc->pointCount; for (int32 j = 0; j < vc->pointCount; ++j) { impulse.normalImpulses[j] = vc->points[j].normalImpulse; impulse.tangentImpulses[j] = vc->points[j].tangentImpulse; } m_listener->PostSolve(c, &impulse); } } ================================================ FILE: src/libraries/box2d/dynamics/b2_island.h ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #ifndef B2_ISLAND_H #define B2_ISLAND_H #include "box2d/b2_body.h" #include "box2d/b2_math.h" #include "box2d/b2_time_step.h" class b2Contact; class b2Joint; class b2StackAllocator; class b2ContactListener; struct b2ContactVelocityConstraint; struct b2Profile; /// This is an internal class. class b2Island { public: b2Island(int32 bodyCapacity, int32 contactCapacity, int32 jointCapacity, b2StackAllocator* allocator, b2ContactListener* listener); ~b2Island(); void Clear() { m_bodyCount = 0; m_contactCount = 0; m_jointCount = 0; } void Solve(b2Profile* profile, const b2TimeStep& step, const b2Vec2& gravity, bool allowSleep); void SolveTOI(const b2TimeStep& subStep, int32 toiIndexA, int32 toiIndexB); void Add(b2Body* body) { b2Assert(m_bodyCount < m_bodyCapacity); body->m_islandIndex = m_bodyCount; m_bodies[m_bodyCount] = body; ++m_bodyCount; } void Add(b2Contact* contact) { b2Assert(m_contactCount < m_contactCapacity); m_contacts[m_contactCount++] = contact; } void Add(b2Joint* joint) { b2Assert(m_jointCount < m_jointCapacity); m_joints[m_jointCount++] = joint; } void Report(const b2ContactVelocityConstraint* constraints); b2StackAllocator* m_allocator; b2ContactListener* m_listener; b2Body** m_bodies; b2Contact** m_contacts; b2Joint** m_joints; b2Position* m_positions; b2Velocity* m_velocities; int32 m_bodyCount; int32 m_jointCount; int32 m_contactCount; int32 m_bodyCapacity; int32 m_contactCapacity; int32 m_jointCapacity; }; #endif ================================================ FILE: src/libraries/box2d/dynamics/b2_joint.cpp ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #include "box2d/b2_block_allocator.h" #include "box2d/b2_body.h" #include "box2d/b2_distance_joint.h" #include "box2d/b2_draw.h" #include "box2d/b2_friction_joint.h" #include "box2d/b2_gear_joint.h" #include "box2d/b2_motor_joint.h" #include "box2d/b2_mouse_joint.h" #include "box2d/b2_prismatic_joint.h" #include "box2d/b2_pulley_joint.h" #include "box2d/b2_revolute_joint.h" #include "box2d/b2_weld_joint.h" #include "box2d/b2_wheel_joint.h" #include "box2d/b2_world.h" #include void b2LinearStiffness(float& stiffness, float& damping, float frequencyHertz, float dampingRatio, const b2Body* bodyA, const b2Body* bodyB) { float massA = bodyA->GetMass(); float massB = bodyB->GetMass(); float mass; if (massA > 0.0f && massB > 0.0f) { mass = massA * massB / (massA + massB); } else if (massA > 0.0f) { mass = massA; } else { mass = massB; } float omega = 2.0f * b2_pi * frequencyHertz; stiffness = mass * omega * omega; damping = 2.0f * mass * dampingRatio * omega; } void b2AngularStiffness(float& stiffness, float& damping, float frequencyHertz, float dampingRatio, const b2Body* bodyA, const b2Body* bodyB) { float IA = bodyA->GetInertia(); float IB = bodyB->GetInertia(); float I; if (IA > 0.0f && IB > 0.0f) { I = IA * IB / (IA + IB); } else if (IA > 0.0f) { I = IA; } else { I = IB; } float omega = 2.0f * b2_pi * frequencyHertz; stiffness = I * omega * omega; damping = 2.0f * I * dampingRatio * omega; } b2Joint* b2Joint::Create(const b2JointDef* def, b2BlockAllocator* allocator) { b2Joint* joint = nullptr; switch (def->type) { case e_distanceJoint: { void* mem = allocator->Allocate(sizeof(b2DistanceJoint)); joint = new (mem) b2DistanceJoint(static_cast(def)); } break; case e_mouseJoint: { void* mem = allocator->Allocate(sizeof(b2MouseJoint)); joint = new (mem) b2MouseJoint(static_cast(def)); } break; case e_prismaticJoint: { void* mem = allocator->Allocate(sizeof(b2PrismaticJoint)); joint = new (mem) b2PrismaticJoint(static_cast(def)); } break; case e_revoluteJoint: { void* mem = allocator->Allocate(sizeof(b2RevoluteJoint)); joint = new (mem) b2RevoluteJoint(static_cast(def)); } break; case e_pulleyJoint: { void* mem = allocator->Allocate(sizeof(b2PulleyJoint)); joint = new (mem) b2PulleyJoint(static_cast(def)); } break; case e_gearJoint: { void* mem = allocator->Allocate(sizeof(b2GearJoint)); joint = new (mem) b2GearJoint(static_cast(def)); } break; case e_wheelJoint: { void* mem = allocator->Allocate(sizeof(b2WheelJoint)); joint = new (mem) b2WheelJoint(static_cast(def)); } break; case e_weldJoint: { void* mem = allocator->Allocate(sizeof(b2WeldJoint)); joint = new (mem) b2WeldJoint(static_cast(def)); } break; case e_frictionJoint: { void* mem = allocator->Allocate(sizeof(b2FrictionJoint)); joint = new (mem) b2FrictionJoint(static_cast(def)); } break; case e_motorJoint: { void* mem = allocator->Allocate(sizeof(b2MotorJoint)); joint = new (mem) b2MotorJoint(static_cast(def)); } break; default: b2Assert(false); break; } return joint; } void b2Joint::Destroy(b2Joint* joint, b2BlockAllocator* allocator) { joint->~b2Joint(); switch (joint->m_type) { case e_distanceJoint: allocator->Free(joint, sizeof(b2DistanceJoint)); break; case e_mouseJoint: allocator->Free(joint, sizeof(b2MouseJoint)); break; case e_prismaticJoint: allocator->Free(joint, sizeof(b2PrismaticJoint)); break; case e_revoluteJoint: allocator->Free(joint, sizeof(b2RevoluteJoint)); break; case e_pulleyJoint: allocator->Free(joint, sizeof(b2PulleyJoint)); break; case e_gearJoint: allocator->Free(joint, sizeof(b2GearJoint)); break; case e_wheelJoint: allocator->Free(joint, sizeof(b2WheelJoint)); break; case e_weldJoint: allocator->Free(joint, sizeof(b2WeldJoint)); break; case e_frictionJoint: allocator->Free(joint, sizeof(b2FrictionJoint)); break; case e_motorJoint: allocator->Free(joint, sizeof(b2MotorJoint)); break; default: b2Assert(false); break; } } b2Joint::b2Joint(const b2JointDef* def) { b2Assert(def->bodyA != def->bodyB); m_type = def->type; m_prev = nullptr; m_next = nullptr; m_bodyA = def->bodyA; m_bodyB = def->bodyB; m_index = 0; m_collideConnected = def->collideConnected; m_islandFlag = false; m_userData = def->userData; m_edgeA.joint = nullptr; m_edgeA.other = nullptr; m_edgeA.prev = nullptr; m_edgeA.next = nullptr; m_edgeB.joint = nullptr; m_edgeB.other = nullptr; m_edgeB.prev = nullptr; m_edgeB.next = nullptr; } bool b2Joint::IsEnabled() const { return m_bodyA->IsEnabled() && m_bodyB->IsEnabled(); } void b2Joint::Draw(b2Draw* draw) const { const b2Transform& xf1 = m_bodyA->GetTransform(); const b2Transform& xf2 = m_bodyB->GetTransform(); b2Vec2 x1 = xf1.p; b2Vec2 x2 = xf2.p; b2Vec2 p1 = GetAnchorA(); b2Vec2 p2 = GetAnchorB(); b2Color color(0.5f, 0.8f, 0.8f); switch (m_type) { case e_distanceJoint: draw->DrawSegment(p1, p2, color); break; case e_pulleyJoint: { b2PulleyJoint* pulley = (b2PulleyJoint*)this; b2Vec2 s1 = pulley->GetGroundAnchorA(); b2Vec2 s2 = pulley->GetGroundAnchorB(); draw->DrawSegment(s1, p1, color); draw->DrawSegment(s2, p2, color); draw->DrawSegment(s1, s2, color); } break; case e_mouseJoint: { b2Color c; c.Set(0.0f, 1.0f, 0.0f); draw->DrawPoint(p1, 4.0f, c); draw->DrawPoint(p2, 4.0f, c); c.Set(0.8f, 0.8f, 0.8f); draw->DrawSegment(p1, p2, c); } break; default: draw->DrawSegment(x1, p1, color); draw->DrawSegment(p1, p2, color); draw->DrawSegment(x2, p2, color); } } ================================================ FILE: src/libraries/box2d/dynamics/b2_motor_joint.cpp ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #include "box2d/b2_body.h" #include "box2d/b2_motor_joint.h" #include "box2d/b2_time_step.h" // Point-to-point constraint // Cdot = v2 - v1 // = v2 + cross(w2, r2) - v1 - cross(w1, r1) // J = [-I -r1_skew I r2_skew ] // Identity used: // w k % (rx i + ry j) = w * (-ry i + rx j) // // r1 = offset - c1 // r2 = -c2 // Angle constraint // Cdot = w2 - w1 // J = [0 0 -1 0 0 1] // K = invI1 + invI2 void b2MotorJointDef::Initialize(b2Body* bA, b2Body* bB) { bodyA = bA; bodyB = bB; b2Vec2 xB = bodyB->GetPosition(); linearOffset = bodyA->GetLocalPoint(xB); float angleA = bodyA->GetAngle(); float angleB = bodyB->GetAngle(); angularOffset = angleB - angleA; } b2MotorJoint::b2MotorJoint(const b2MotorJointDef* def) : b2Joint(def) { m_linearOffset = def->linearOffset; m_angularOffset = def->angularOffset; m_linearImpulse.SetZero(); m_angularImpulse = 0.0f; m_maxForce = def->maxForce; m_maxTorque = def->maxTorque; m_correctionFactor = def->correctionFactor; } void b2MotorJoint::InitVelocityConstraints(const b2SolverData& data) { m_indexA = m_bodyA->m_islandIndex; m_indexB = m_bodyB->m_islandIndex; m_localCenterA = m_bodyA->m_sweep.localCenter; m_localCenterB = m_bodyB->m_sweep.localCenter; m_invMassA = m_bodyA->m_invMass; m_invMassB = m_bodyB->m_invMass; m_invIA = m_bodyA->m_invI; m_invIB = m_bodyB->m_invI; b2Vec2 cA = data.positions[m_indexA].c; float aA = data.positions[m_indexA].a; b2Vec2 vA = data.velocities[m_indexA].v; float wA = data.velocities[m_indexA].w; b2Vec2 cB = data.positions[m_indexB].c; float aB = data.positions[m_indexB].a; b2Vec2 vB = data.velocities[m_indexB].v; float wB = data.velocities[m_indexB].w; b2Rot qA(aA), qB(aB); // Compute the effective mass matrix. m_rA = b2Mul(qA, m_linearOffset - m_localCenterA); m_rB = b2Mul(qB, -m_localCenterB); // J = [-I -r1_skew I r2_skew] // r_skew = [-ry; rx] // Matlab // K = [ mA+r1y^2*iA+mB+r2y^2*iB, -r1y*iA*r1x-r2y*iB*r2x, -r1y*iA-r2y*iB] // [ -r1y*iA*r1x-r2y*iB*r2x, mA+r1x^2*iA+mB+r2x^2*iB, r1x*iA+r2x*iB] // [ -r1y*iA-r2y*iB, r1x*iA+r2x*iB, iA+iB] float mA = m_invMassA, mB = m_invMassB; float iA = m_invIA, iB = m_invIB; // Upper 2 by 2 of K for point to point b2Mat22 K; K.ex.x = mA + mB + iA * m_rA.y * m_rA.y + iB * m_rB.y * m_rB.y; K.ex.y = -iA * m_rA.x * m_rA.y - iB * m_rB.x * m_rB.y; K.ey.x = K.ex.y; K.ey.y = mA + mB + iA * m_rA.x * m_rA.x + iB * m_rB.x * m_rB.x; m_linearMass = K.GetInverse(); m_angularMass = iA + iB; if (m_angularMass > 0.0f) { m_angularMass = 1.0f / m_angularMass; } m_linearError = cB + m_rB - cA - m_rA; m_angularError = aB - aA - m_angularOffset; if (data.step.warmStarting) { // Scale impulses to support a variable time step. m_linearImpulse *= data.step.dtRatio; m_angularImpulse *= data.step.dtRatio; b2Vec2 P(m_linearImpulse.x, m_linearImpulse.y); vA -= mA * P; wA -= iA * (b2Cross(m_rA, P) + m_angularImpulse); vB += mB * P; wB += iB * (b2Cross(m_rB, P) + m_angularImpulse); } else { m_linearImpulse.SetZero(); m_angularImpulse = 0.0f; } data.velocities[m_indexA].v = vA; data.velocities[m_indexA].w = wA; data.velocities[m_indexB].v = vB; data.velocities[m_indexB].w = wB; } void b2MotorJoint::SolveVelocityConstraints(const b2SolverData& data) { b2Vec2 vA = data.velocities[m_indexA].v; float wA = data.velocities[m_indexA].w; b2Vec2 vB = data.velocities[m_indexB].v; float wB = data.velocities[m_indexB].w; float mA = m_invMassA, mB = m_invMassB; float iA = m_invIA, iB = m_invIB; float h = data.step.dt; float inv_h = data.step.inv_dt; // Solve angular friction { float Cdot = wB - wA + inv_h * m_correctionFactor * m_angularError; float impulse = -m_angularMass * Cdot; float oldImpulse = m_angularImpulse; float maxImpulse = h * m_maxTorque; m_angularImpulse = b2Clamp(m_angularImpulse + impulse, -maxImpulse, maxImpulse); impulse = m_angularImpulse - oldImpulse; wA -= iA * impulse; wB += iB * impulse; } // Solve linear friction { b2Vec2 Cdot = vB + b2Cross(wB, m_rB) - vA - b2Cross(wA, m_rA) + inv_h * m_correctionFactor * m_linearError; b2Vec2 impulse = -b2Mul(m_linearMass, Cdot); b2Vec2 oldImpulse = m_linearImpulse; m_linearImpulse += impulse; float maxImpulse = h * m_maxForce; if (m_linearImpulse.LengthSquared() > maxImpulse * maxImpulse) { m_linearImpulse.Normalize(); m_linearImpulse *= maxImpulse; } impulse = m_linearImpulse - oldImpulse; vA -= mA * impulse; wA -= iA * b2Cross(m_rA, impulse); vB += mB * impulse; wB += iB * b2Cross(m_rB, impulse); } data.velocities[m_indexA].v = vA; data.velocities[m_indexA].w = wA; data.velocities[m_indexB].v = vB; data.velocities[m_indexB].w = wB; } bool b2MotorJoint::SolvePositionConstraints(const b2SolverData& data) { B2_NOT_USED(data); return true; } b2Vec2 b2MotorJoint::GetAnchorA() const { return m_bodyA->GetPosition(); } b2Vec2 b2MotorJoint::GetAnchorB() const { return m_bodyB->GetPosition(); } b2Vec2 b2MotorJoint::GetReactionForce(float inv_dt) const { return inv_dt * m_linearImpulse; } float b2MotorJoint::GetReactionTorque(float inv_dt) const { return inv_dt * m_angularImpulse; } void b2MotorJoint::SetMaxForce(float force) { b2Assert(b2IsValid(force) && force >= 0.0f); m_maxForce = force; } float b2MotorJoint::GetMaxForce() const { return m_maxForce; } void b2MotorJoint::SetMaxTorque(float torque) { b2Assert(b2IsValid(torque) && torque >= 0.0f); m_maxTorque = torque; } float b2MotorJoint::GetMaxTorque() const { return m_maxTorque; } void b2MotorJoint::SetCorrectionFactor(float factor) { b2Assert(b2IsValid(factor) && 0.0f <= factor && factor <= 1.0f); m_correctionFactor = factor; } float b2MotorJoint::GetCorrectionFactor() const { return m_correctionFactor; } void b2MotorJoint::SetLinearOffset(const b2Vec2& linearOffset) { if (linearOffset.x != m_linearOffset.x || linearOffset.y != m_linearOffset.y) { m_bodyA->SetAwake(true); m_bodyB->SetAwake(true); m_linearOffset = linearOffset; } } const b2Vec2& b2MotorJoint::GetLinearOffset() const { return m_linearOffset; } void b2MotorJoint::SetAngularOffset(float angularOffset) { if (angularOffset != m_angularOffset) { m_bodyA->SetAwake(true); m_bodyB->SetAwake(true); m_angularOffset = angularOffset; } } float b2MotorJoint::GetAngularOffset() const { return m_angularOffset; } void b2MotorJoint::Dump() { int32 indexA = m_bodyA->m_islandIndex; int32 indexB = m_bodyB->m_islandIndex; b2Dump(" b2MotorJointDef jd;\n"); b2Dump(" jd.bodyA = bodies[%d];\n", indexA); b2Dump(" jd.bodyB = bodies[%d];\n", indexB); b2Dump(" jd.collideConnected = bool(%d);\n", m_collideConnected); b2Dump(" jd.linearOffset.Set(%.9g, %.9g);\n", m_linearOffset.x, m_linearOffset.y); b2Dump(" jd.angularOffset = %.9g;\n", m_angularOffset); b2Dump(" jd.maxForce = %.9g;\n", m_maxForce); b2Dump(" jd.maxTorque = %.9g;\n", m_maxTorque); b2Dump(" jd.correctionFactor = %.9g;\n", m_correctionFactor); b2Dump(" joints[%d] = m_world->CreateJoint(&jd);\n", m_index); } ================================================ FILE: src/libraries/box2d/dynamics/b2_mouse_joint.cpp ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #include "box2d/b2_body.h" #include "box2d/b2_mouse_joint.h" #include "box2d/b2_time_step.h" // p = attached point, m = mouse point // C = p - m // Cdot = v // = v + cross(w, r) // J = [I r_skew] // Identity used: // w k % (rx i + ry j) = w * (-ry i + rx j) b2MouseJoint::b2MouseJoint(const b2MouseJointDef* def) : b2Joint(def) { m_targetA = def->target; m_localAnchorB = b2MulT(m_bodyB->GetTransform(), m_targetA); m_maxForce = def->maxForce; m_stiffness = def->stiffness; m_damping = def->damping; m_impulse.SetZero(); m_beta = 0.0f; m_gamma = 0.0f; } void b2MouseJoint::SetTarget(const b2Vec2& target) { if (target != m_targetA) { m_bodyB->SetAwake(true); m_targetA = target; } } const b2Vec2& b2MouseJoint::GetTarget() const { return m_targetA; } void b2MouseJoint::SetMaxForce(float force) { m_maxForce = force; } float b2MouseJoint::GetMaxForce() const { return m_maxForce; } void b2MouseJoint::InitVelocityConstraints(const b2SolverData& data) { m_indexB = m_bodyB->m_islandIndex; m_localCenterB = m_bodyB->m_sweep.localCenter; m_invMassB = m_bodyB->m_invMass; m_invIB = m_bodyB->m_invI; b2Vec2 cB = data.positions[m_indexB].c; float aB = data.positions[m_indexB].a; b2Vec2 vB = data.velocities[m_indexB].v; float wB = data.velocities[m_indexB].w; b2Rot qB(aB); float mass = m_bodyB->GetMass(); float d = m_damping; float k = m_stiffness; // magic formulas // gamma has units of inverse mass. // beta has units of inverse time. float h = data.step.dt; m_gamma = h * (d + h * k); if (m_gamma != 0.0f) { m_gamma = 1.0f / m_gamma; } m_beta = h * k * m_gamma; // Compute the effective mass matrix. m_rB = b2Mul(qB, m_localAnchorB - m_localCenterB); // K = [(1/m1 + 1/m2) * eye(2) - skew(r1) * invI1 * skew(r1) - skew(r2) * invI2 * skew(r2)] // = [1/m1+1/m2 0 ] + invI1 * [r1.y*r1.y -r1.x*r1.y] + invI2 * [r1.y*r1.y -r1.x*r1.y] // [ 0 1/m1+1/m2] [-r1.x*r1.y r1.x*r1.x] [-r1.x*r1.y r1.x*r1.x] b2Mat22 K; K.ex.x = m_invMassB + m_invIB * m_rB.y * m_rB.y + m_gamma; K.ex.y = -m_invIB * m_rB.x * m_rB.y; K.ey.x = K.ex.y; K.ey.y = m_invMassB + m_invIB * m_rB.x * m_rB.x + m_gamma; m_mass = K.GetInverse(); m_C = cB + m_rB - m_targetA; m_C *= m_beta; // Cheat with some damping wB *= 0.98f; if (data.step.warmStarting) { m_impulse *= data.step.dtRatio; vB += m_invMassB * m_impulse; wB += m_invIB * b2Cross(m_rB, m_impulse); } else { m_impulse.SetZero(); } data.velocities[m_indexB].v = vB; data.velocities[m_indexB].w = wB; } void b2MouseJoint::SolveVelocityConstraints(const b2SolverData& data) { b2Vec2 vB = data.velocities[m_indexB].v; float wB = data.velocities[m_indexB].w; // Cdot = v + cross(w, r) b2Vec2 Cdot = vB + b2Cross(wB, m_rB); b2Vec2 impulse = b2Mul(m_mass, -(Cdot + m_C + m_gamma * m_impulse)); b2Vec2 oldImpulse = m_impulse; m_impulse += impulse; float maxImpulse = data.step.dt * m_maxForce; if (m_impulse.LengthSquared() > maxImpulse * maxImpulse) { m_impulse *= maxImpulse / m_impulse.Length(); } impulse = m_impulse - oldImpulse; vB += m_invMassB * impulse; wB += m_invIB * b2Cross(m_rB, impulse); data.velocities[m_indexB].v = vB; data.velocities[m_indexB].w = wB; } bool b2MouseJoint::SolvePositionConstraints(const b2SolverData& data) { B2_NOT_USED(data); return true; } b2Vec2 b2MouseJoint::GetAnchorA() const { return m_targetA; } b2Vec2 b2MouseJoint::GetAnchorB() const { return m_bodyB->GetWorldPoint(m_localAnchorB); } b2Vec2 b2MouseJoint::GetReactionForce(float inv_dt) const { return inv_dt * m_impulse; } float b2MouseJoint::GetReactionTorque(float inv_dt) const { return inv_dt * 0.0f; } void b2MouseJoint::ShiftOrigin(const b2Vec2& newOrigin) { m_targetA -= newOrigin; } ================================================ FILE: src/libraries/box2d/dynamics/b2_polygon_circle_contact.cpp ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #include "b2_polygon_circle_contact.h" #include "box2d/b2_block_allocator.h" #include "box2d/b2_fixture.h" #include b2Contact* b2PolygonAndCircleContact::Create(b2Fixture* fixtureA, int32, b2Fixture* fixtureB, int32, b2BlockAllocator* allocator) { void* mem = allocator->Allocate(sizeof(b2PolygonAndCircleContact)); return new (mem) b2PolygonAndCircleContact(fixtureA, fixtureB); } void b2PolygonAndCircleContact::Destroy(b2Contact* contact, b2BlockAllocator* allocator) { ((b2PolygonAndCircleContact*)contact)->~b2PolygonAndCircleContact(); allocator->Free(contact, sizeof(b2PolygonAndCircleContact)); } b2PolygonAndCircleContact::b2PolygonAndCircleContact(b2Fixture* fixtureA, b2Fixture* fixtureB) : b2Contact(fixtureA, 0, fixtureB, 0) { b2Assert(m_fixtureA->GetType() == b2Shape::e_polygon); b2Assert(m_fixtureB->GetType() == b2Shape::e_circle); } void b2PolygonAndCircleContact::Evaluate(b2Manifold* manifold, const b2Transform& xfA, const b2Transform& xfB) { b2CollidePolygonAndCircle( manifold, (b2PolygonShape*)m_fixtureA->GetShape(), xfA, (b2CircleShape*)m_fixtureB->GetShape(), xfB); } ================================================ FILE: src/libraries/box2d/dynamics/b2_polygon_circle_contact.h ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #ifndef B2_POLYGON_AND_CIRCLE_CONTACT_H #define B2_POLYGON_AND_CIRCLE_CONTACT_H #include "box2d/b2_contact.h" class b2BlockAllocator; class b2PolygonAndCircleContact : public b2Contact { public: static b2Contact* Create(b2Fixture* fixtureA, int32 indexA, b2Fixture* fixtureB, int32 indexB, b2BlockAllocator* allocator); static void Destroy(b2Contact* contact, b2BlockAllocator* allocator); b2PolygonAndCircleContact(b2Fixture* fixtureA, b2Fixture* fixtureB); ~b2PolygonAndCircleContact() {} void Evaluate(b2Manifold* manifold, const b2Transform& xfA, const b2Transform& xfB) override; }; #endif ================================================ FILE: src/libraries/box2d/dynamics/b2_polygon_contact.cpp ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #include "b2_polygon_contact.h" #include "box2d/b2_block_allocator.h" #include "box2d/b2_body.h" #include "box2d/b2_fixture.h" #include "box2d/b2_time_of_impact.h" #include "box2d/b2_world_callbacks.h" #include b2Contact* b2PolygonContact::Create(b2Fixture* fixtureA, int32, b2Fixture* fixtureB, int32, b2BlockAllocator* allocator) { void* mem = allocator->Allocate(sizeof(b2PolygonContact)); return new (mem) b2PolygonContact(fixtureA, fixtureB); } void b2PolygonContact::Destroy(b2Contact* contact, b2BlockAllocator* allocator) { ((b2PolygonContact*)contact)->~b2PolygonContact(); allocator->Free(contact, sizeof(b2PolygonContact)); } b2PolygonContact::b2PolygonContact(b2Fixture* fixtureA, b2Fixture* fixtureB) : b2Contact(fixtureA, 0, fixtureB, 0) { b2Assert(m_fixtureA->GetType() == b2Shape::e_polygon); b2Assert(m_fixtureB->GetType() == b2Shape::e_polygon); } void b2PolygonContact::Evaluate(b2Manifold* manifold, const b2Transform& xfA, const b2Transform& xfB) { b2CollidePolygons( manifold, (b2PolygonShape*)m_fixtureA->GetShape(), xfA, (b2PolygonShape*)m_fixtureB->GetShape(), xfB); } ================================================ FILE: src/libraries/box2d/dynamics/b2_polygon_contact.h ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #ifndef B2_POLYGON_CONTACT_H #define B2_POLYGON_CONTACT_H #include "box2d/b2_contact.h" class b2BlockAllocator; class b2PolygonContact : public b2Contact { public: static b2Contact* Create( b2Fixture* fixtureA, int32 indexA, b2Fixture* fixtureB, int32 indexB, b2BlockAllocator* allocator); static void Destroy(b2Contact* contact, b2BlockAllocator* allocator); b2PolygonContact(b2Fixture* fixtureA, b2Fixture* fixtureB); ~b2PolygonContact() {} void Evaluate(b2Manifold* manifold, const b2Transform& xfA, const b2Transform& xfB) override; }; #endif ================================================ FILE: src/libraries/box2d/dynamics/b2_prismatic_joint.cpp ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #include "box2d/b2_body.h" #include "box2d/b2_draw.h" #include "box2d/b2_prismatic_joint.h" #include "box2d/b2_time_step.h" // Linear constraint (point-to-line) // d = p2 - p1 = x2 + r2 - x1 - r1 // C = dot(perp, d) // Cdot = dot(d, cross(w1, perp)) + dot(perp, v2 + cross(w2, r2) - v1 - cross(w1, r1)) // = -dot(perp, v1) - dot(cross(d + r1, perp), w1) + dot(perp, v2) + dot(cross(r2, perp), v2) // J = [-perp, -cross(d + r1, perp), perp, cross(r2,perp)] // // Angular constraint // C = a2 - a1 + a_initial // Cdot = w2 - w1 // J = [0 0 -1 0 0 1] // // K = J * invM * JT // // J = [-a -s1 a s2] // [0 -1 0 1] // a = perp // s1 = cross(d + r1, a) = cross(p2 - x1, a) // s2 = cross(r2, a) = cross(p2 - x2, a) // Motor/Limit linear constraint // C = dot(ax1, d) // Cdot = -dot(ax1, v1) - dot(cross(d + r1, ax1), w1) + dot(ax1, v2) + dot(cross(r2, ax1), v2) // J = [-ax1 -cross(d+r1,ax1) ax1 cross(r2,ax1)] // Predictive limit is applied even when the limit is not active. // Prevents a constraint speed that can lead to a constraint error in one time step. // Want C2 = C1 + h * Cdot >= 0 // Or: // Cdot + C1/h >= 0 // I do not apply a negative constraint error because that is handled in position correction. // So: // Cdot + max(C1, 0)/h >= 0 // Block Solver // We develop a block solver that includes the angular and linear constraints. This makes the limit stiffer. // // The Jacobian has 2 rows: // J = [-uT -s1 uT s2] // linear // [0 -1 0 1] // angular // // u = perp // s1 = cross(d + r1, u), s2 = cross(r2, u) // a1 = cross(d + r1, v), a2 = cross(r2, v) void b2PrismaticJointDef::Initialize(b2Body* bA, b2Body* bB, const b2Vec2& anchor, const b2Vec2& axis) { bodyA = bA; bodyB = bB; localAnchorA = bodyA->GetLocalPoint(anchor); localAnchorB = bodyB->GetLocalPoint(anchor); localAxisA = bodyA->GetLocalVector(axis); referenceAngle = bodyB->GetAngle() - bodyA->GetAngle(); } b2PrismaticJoint::b2PrismaticJoint(const b2PrismaticJointDef* def) : b2Joint(def) { m_localAnchorA = def->localAnchorA; m_localAnchorB = def->localAnchorB; m_localXAxisA = def->localAxisA; m_localXAxisA.Normalize(); m_localYAxisA = b2Cross(1.0f, m_localXAxisA); m_referenceAngle = def->referenceAngle; m_impulse.SetZero(); m_axialMass = 0.0f; m_motorImpulse = 0.0f; m_lowerImpulse = 0.0f; m_upperImpulse = 0.0f; m_lowerTranslation = def->lowerTranslation; m_upperTranslation = def->upperTranslation; b2Assert(m_lowerTranslation <= m_upperTranslation); m_maxMotorForce = def->maxMotorForce; m_motorSpeed = def->motorSpeed; m_enableLimit = def->enableLimit; m_enableMotor = def->enableMotor; m_translation = 0.0f; m_axis.SetZero(); m_perp.SetZero(); } void b2PrismaticJoint::InitVelocityConstraints(const b2SolverData& data) { m_indexA = m_bodyA->m_islandIndex; m_indexB = m_bodyB->m_islandIndex; m_localCenterA = m_bodyA->m_sweep.localCenter; m_localCenterB = m_bodyB->m_sweep.localCenter; m_invMassA = m_bodyA->m_invMass; m_invMassB = m_bodyB->m_invMass; m_invIA = m_bodyA->m_invI; m_invIB = m_bodyB->m_invI; b2Vec2 cA = data.positions[m_indexA].c; float aA = data.positions[m_indexA].a; b2Vec2 vA = data.velocities[m_indexA].v; float wA = data.velocities[m_indexA].w; b2Vec2 cB = data.positions[m_indexB].c; float aB = data.positions[m_indexB].a; b2Vec2 vB = data.velocities[m_indexB].v; float wB = data.velocities[m_indexB].w; b2Rot qA(aA), qB(aB); // Compute the effective masses. b2Vec2 rA = b2Mul(qA, m_localAnchorA - m_localCenterA); b2Vec2 rB = b2Mul(qB, m_localAnchorB - m_localCenterB); b2Vec2 d = (cB - cA) + rB - rA; float mA = m_invMassA, mB = m_invMassB; float iA = m_invIA, iB = m_invIB; // Compute motor Jacobian and effective mass. { m_axis = b2Mul(qA, m_localXAxisA); m_a1 = b2Cross(d + rA, m_axis); m_a2 = b2Cross(rB, m_axis); m_axialMass = mA + mB + iA * m_a1 * m_a1 + iB * m_a2 * m_a2; if (m_axialMass > 0.0f) { m_axialMass = 1.0f / m_axialMass; } } // Prismatic constraint. { m_perp = b2Mul(qA, m_localYAxisA); m_s1 = b2Cross(d + rA, m_perp); m_s2 = b2Cross(rB, m_perp); float k11 = mA + mB + iA * m_s1 * m_s1 + iB * m_s2 * m_s2; float k12 = iA * m_s1 + iB * m_s2; float k22 = iA + iB; if (k22 == 0.0f) { // For bodies with fixed rotation. k22 = 1.0f; } m_K.ex.Set(k11, k12); m_K.ey.Set(k12, k22); } if (m_enableLimit) { m_translation = b2Dot(m_axis, d); } else { m_lowerImpulse = 0.0f; m_upperImpulse = 0.0f; } if (m_enableMotor == false) { m_motorImpulse = 0.0f; } if (data.step.warmStarting) { // Account for variable time step. m_impulse *= data.step.dtRatio; m_motorImpulse *= data.step.dtRatio; m_lowerImpulse *= data.step.dtRatio; m_upperImpulse *= data.step.dtRatio; float axialImpulse = m_motorImpulse + m_lowerImpulse - m_upperImpulse; b2Vec2 P = m_impulse.x * m_perp + axialImpulse * m_axis; float LA = m_impulse.x * m_s1 + m_impulse.y + axialImpulse * m_a1; float LB = m_impulse.x * m_s2 + m_impulse.y + axialImpulse * m_a2; vA -= mA * P; wA -= iA * LA; vB += mB * P; wB += iB * LB; } else { m_impulse.SetZero(); m_motorImpulse = 0.0f; m_lowerImpulse = 0.0f; m_upperImpulse = 0.0f; } data.velocities[m_indexA].v = vA; data.velocities[m_indexA].w = wA; data.velocities[m_indexB].v = vB; data.velocities[m_indexB].w = wB; } void b2PrismaticJoint::SolveVelocityConstraints(const b2SolverData& data) { b2Vec2 vA = data.velocities[m_indexA].v; float wA = data.velocities[m_indexA].w; b2Vec2 vB = data.velocities[m_indexB].v; float wB = data.velocities[m_indexB].w; float mA = m_invMassA, mB = m_invMassB; float iA = m_invIA, iB = m_invIB; // Solve linear motor constraint if (m_enableMotor) { float Cdot = b2Dot(m_axis, vB - vA) + m_a2 * wB - m_a1 * wA; float impulse = m_axialMass * (m_motorSpeed - Cdot); float oldImpulse = m_motorImpulse; float maxImpulse = data.step.dt * m_maxMotorForce; m_motorImpulse = b2Clamp(m_motorImpulse + impulse, -maxImpulse, maxImpulse); impulse = m_motorImpulse - oldImpulse; b2Vec2 P = impulse * m_axis; float LA = impulse * m_a1; float LB = impulse * m_a2; vA -= mA * P; wA -= iA * LA; vB += mB * P; wB += iB * LB; } if (m_enableLimit) { // Lower limit { float C = m_translation - m_lowerTranslation; float Cdot = b2Dot(m_axis, vB - vA) + m_a2 * wB - m_a1 * wA; float impulse = -m_axialMass * (Cdot + b2Max(C, 0.0f) * data.step.inv_dt); float oldImpulse = m_lowerImpulse; m_lowerImpulse = b2Max(m_lowerImpulse + impulse, 0.0f); impulse = m_lowerImpulse - oldImpulse; b2Vec2 P = impulse * m_axis; float LA = impulse * m_a1; float LB = impulse * m_a2; vA -= mA * P; wA -= iA * LA; vB += mB * P; wB += iB * LB; } // Upper limit // Note: signs are flipped to keep C positive when the constraint is satisfied. // This also keeps the impulse positive when the limit is active. { float C = m_upperTranslation - m_translation; float Cdot = b2Dot(m_axis, vA - vB) + m_a1 * wA - m_a2 * wB; float impulse = -m_axialMass * (Cdot + b2Max(C, 0.0f) * data.step.inv_dt); float oldImpulse = m_upperImpulse; m_upperImpulse = b2Max(m_upperImpulse + impulse, 0.0f); impulse = m_upperImpulse - oldImpulse; b2Vec2 P = impulse * m_axis; float LA = impulse * m_a1; float LB = impulse * m_a2; vA += mA * P; wA += iA * LA; vB -= mB * P; wB -= iB * LB; } } // Solve the prismatic constraint in block form. { b2Vec2 Cdot; Cdot.x = b2Dot(m_perp, vB - vA) + m_s2 * wB - m_s1 * wA; Cdot.y = wB - wA; b2Vec2 df = m_K.Solve(-Cdot); m_impulse += df; b2Vec2 P = df.x * m_perp; float LA = df.x * m_s1 + df.y; float LB = df.x * m_s2 + df.y; vA -= mA * P; wA -= iA * LA; vB += mB * P; wB += iB * LB; } data.velocities[m_indexA].v = vA; data.velocities[m_indexA].w = wA; data.velocities[m_indexB].v = vB; data.velocities[m_indexB].w = wB; } // A velocity based solver computes reaction forces(impulses) using the velocity constraint solver.Under this context, // the position solver is not there to resolve forces.It is only there to cope with integration error. // // Therefore, the pseudo impulses in the position solver do not have any physical meaning.Thus it is okay if they suck. // // We could take the active state from the velocity solver.However, the joint might push past the limit when the velocity // solver indicates the limit is inactive. bool b2PrismaticJoint::SolvePositionConstraints(const b2SolverData& data) { b2Vec2 cA = data.positions[m_indexA].c; float aA = data.positions[m_indexA].a; b2Vec2 cB = data.positions[m_indexB].c; float aB = data.positions[m_indexB].a; b2Rot qA(aA), qB(aB); float mA = m_invMassA, mB = m_invMassB; float iA = m_invIA, iB = m_invIB; // Compute fresh Jacobians b2Vec2 rA = b2Mul(qA, m_localAnchorA - m_localCenterA); b2Vec2 rB = b2Mul(qB, m_localAnchorB - m_localCenterB); b2Vec2 d = cB + rB - cA - rA; b2Vec2 axis = b2Mul(qA, m_localXAxisA); float a1 = b2Cross(d + rA, axis); float a2 = b2Cross(rB, axis); b2Vec2 perp = b2Mul(qA, m_localYAxisA); float s1 = b2Cross(d + rA, perp); float s2 = b2Cross(rB, perp); b2Vec3 impulse; b2Vec2 C1; C1.x = b2Dot(perp, d); C1.y = aB - aA - m_referenceAngle; float linearError = b2Abs(C1.x); float angularError = b2Abs(C1.y); bool active = false; float C2 = 0.0f; if (m_enableLimit) { float translation = b2Dot(axis, d); if (b2Abs(m_upperTranslation - m_lowerTranslation) < 2.0f * b2_linearSlop) { C2 = translation; linearError = b2Max(linearError, b2Abs(translation)); active = true; } else if (translation <= m_lowerTranslation) { C2 = b2Min(translation - m_lowerTranslation, 0.0f); linearError = b2Max(linearError, m_lowerTranslation - translation); active = true; } else if (translation >= m_upperTranslation) { C2 = b2Max(translation - m_upperTranslation, 0.0f); linearError = b2Max(linearError, translation - m_upperTranslation); active = true; } } if (active) { float k11 = mA + mB + iA * s1 * s1 + iB * s2 * s2; float k12 = iA * s1 + iB * s2; float k13 = iA * s1 * a1 + iB * s2 * a2; float k22 = iA + iB; if (k22 == 0.0f) { // For fixed rotation k22 = 1.0f; } float k23 = iA * a1 + iB * a2; float k33 = mA + mB + iA * a1 * a1 + iB * a2 * a2; b2Mat33 K; K.ex.Set(k11, k12, k13); K.ey.Set(k12, k22, k23); K.ez.Set(k13, k23, k33); b2Vec3 C; C.x = C1.x; C.y = C1.y; C.z = C2; impulse = K.Solve33(-C); } else { float k11 = mA + mB + iA * s1 * s1 + iB * s2 * s2; float k12 = iA * s1 + iB * s2; float k22 = iA + iB; if (k22 == 0.0f) { k22 = 1.0f; } b2Mat22 K; K.ex.Set(k11, k12); K.ey.Set(k12, k22); b2Vec2 impulse1 = K.Solve(-C1); impulse.x = impulse1.x; impulse.y = impulse1.y; impulse.z = 0.0f; } b2Vec2 P = impulse.x * perp + impulse.z * axis; float LA = impulse.x * s1 + impulse.y + impulse.z * a1; float LB = impulse.x * s2 + impulse.y + impulse.z * a2; cA -= mA * P; aA -= iA * LA; cB += mB * P; aB += iB * LB; data.positions[m_indexA].c = cA; data.positions[m_indexA].a = aA; data.positions[m_indexB].c = cB; data.positions[m_indexB].a = aB; return linearError <= b2_linearSlop && angularError <= b2_angularSlop; } b2Vec2 b2PrismaticJoint::GetAnchorA() const { return m_bodyA->GetWorldPoint(m_localAnchorA); } b2Vec2 b2PrismaticJoint::GetAnchorB() const { return m_bodyB->GetWorldPoint(m_localAnchorB); } b2Vec2 b2PrismaticJoint::GetReactionForce(float inv_dt) const { return inv_dt * (m_impulse.x * m_perp + (m_motorImpulse + m_lowerImpulse - m_upperImpulse) * m_axis); } float b2PrismaticJoint::GetReactionTorque(float inv_dt) const { return inv_dt * m_impulse.y; } float b2PrismaticJoint::GetJointTranslation() const { b2Vec2 pA = m_bodyA->GetWorldPoint(m_localAnchorA); b2Vec2 pB = m_bodyB->GetWorldPoint(m_localAnchorB); b2Vec2 d = pB - pA; b2Vec2 axis = m_bodyA->GetWorldVector(m_localXAxisA); float translation = b2Dot(d, axis); return translation; } float b2PrismaticJoint::GetJointSpeed() const { b2Body* bA = m_bodyA; b2Body* bB = m_bodyB; b2Vec2 rA = b2Mul(bA->m_xf.q, m_localAnchorA - bA->m_sweep.localCenter); b2Vec2 rB = b2Mul(bB->m_xf.q, m_localAnchorB - bB->m_sweep.localCenter); b2Vec2 p1 = bA->m_sweep.c + rA; b2Vec2 p2 = bB->m_sweep.c + rB; b2Vec2 d = p2 - p1; b2Vec2 axis = b2Mul(bA->m_xf.q, m_localXAxisA); b2Vec2 vA = bA->m_linearVelocity; b2Vec2 vB = bB->m_linearVelocity; float wA = bA->m_angularVelocity; float wB = bB->m_angularVelocity; float speed = b2Dot(d, b2Cross(wA, axis)) + b2Dot(axis, vB + b2Cross(wB, rB) - vA - b2Cross(wA, rA)); return speed; } bool b2PrismaticJoint::IsLimitEnabled() const { return m_enableLimit; } void b2PrismaticJoint::EnableLimit(bool flag) { if (flag != m_enableLimit) { m_bodyA->SetAwake(true); m_bodyB->SetAwake(true); m_enableLimit = flag; m_lowerImpulse = 0.0f; m_upperImpulse = 0.0f; } } float b2PrismaticJoint::GetLowerLimit() const { return m_lowerTranslation; } float b2PrismaticJoint::GetUpperLimit() const { return m_upperTranslation; } void b2PrismaticJoint::SetLimits(float lower, float upper) { b2Assert(lower <= upper); if (lower != m_lowerTranslation || upper != m_upperTranslation) { m_bodyA->SetAwake(true); m_bodyB->SetAwake(true); m_lowerTranslation = lower; m_upperTranslation = upper; m_lowerImpulse = 0.0f; m_upperImpulse = 0.0f; } } bool b2PrismaticJoint::IsMotorEnabled() const { return m_enableMotor; } void b2PrismaticJoint::EnableMotor(bool flag) { if (flag != m_enableMotor) { m_bodyA->SetAwake(true); m_bodyB->SetAwake(true); m_enableMotor = flag; } } void b2PrismaticJoint::SetMotorSpeed(float speed) { if (speed != m_motorSpeed) { m_bodyA->SetAwake(true); m_bodyB->SetAwake(true); m_motorSpeed = speed; } } void b2PrismaticJoint::SetMaxMotorForce(float force) { if (force != m_maxMotorForce) { m_bodyA->SetAwake(true); m_bodyB->SetAwake(true); m_maxMotorForce = force; } } float b2PrismaticJoint::GetMotorForce(float inv_dt) const { return inv_dt * m_motorImpulse; } void b2PrismaticJoint::Dump() { // FLT_DECIMAL_DIG == 9 int32 indexA = m_bodyA->m_islandIndex; int32 indexB = m_bodyB->m_islandIndex; b2Dump(" b2PrismaticJointDef jd;\n"); b2Dump(" jd.bodyA = bodies[%d];\n", indexA); b2Dump(" jd.bodyB = bodies[%d];\n", indexB); b2Dump(" jd.collideConnected = bool(%d);\n", m_collideConnected); b2Dump(" jd.localAnchorA.Set(%.9g, %.9g);\n", m_localAnchorA.x, m_localAnchorA.y); b2Dump(" jd.localAnchorB.Set(%.9g, %.9g);\n", m_localAnchorB.x, m_localAnchorB.y); b2Dump(" jd.localAxisA.Set(%.9g, %.9g);\n", m_localXAxisA.x, m_localXAxisA.y); b2Dump(" jd.referenceAngle = %.9g;\n", m_referenceAngle); b2Dump(" jd.enableLimit = bool(%d);\n", m_enableLimit); b2Dump(" jd.lowerTranslation = %.9g;\n", m_lowerTranslation); b2Dump(" jd.upperTranslation = %.9g;\n", m_upperTranslation); b2Dump(" jd.enableMotor = bool(%d);\n", m_enableMotor); b2Dump(" jd.motorSpeed = %.9g;\n", m_motorSpeed); b2Dump(" jd.maxMotorForce = %.9g;\n", m_maxMotorForce); b2Dump(" joints[%d] = m_world->CreateJoint(&jd);\n", m_index); } void b2PrismaticJoint::Draw(b2Draw* draw) const { const b2Transform& xfA = m_bodyA->GetTransform(); const b2Transform& xfB = m_bodyB->GetTransform(); b2Vec2 pA = b2Mul(xfA, m_localAnchorA); b2Vec2 pB = b2Mul(xfB, m_localAnchorB); b2Vec2 axis = b2Mul(xfA.q, m_localXAxisA); b2Color c1(0.7f, 0.7f, 0.7f); b2Color c2(0.3f, 0.9f, 0.3f); b2Color c3(0.9f, 0.3f, 0.3f); b2Color c4(0.3f, 0.3f, 0.9f); b2Color c5(0.4f, 0.4f, 0.4f); draw->DrawSegment(pA, pB, c5); if (m_enableLimit) { b2Vec2 lower = pA + m_lowerTranslation * axis; b2Vec2 upper = pA + m_upperTranslation * axis; b2Vec2 perp = b2Mul(xfA.q, m_localYAxisA); draw->DrawSegment(lower, upper, c1); draw->DrawSegment(lower - 0.5f * perp, lower + 0.5f * perp, c2); draw->DrawSegment(upper - 0.5f * perp, upper + 0.5f * perp, c3); } else { draw->DrawSegment(pA - 1.0f * axis, pA + 1.0f * axis, c1); } draw->DrawPoint(pA, 5.0f, c1); draw->DrawPoint(pB, 5.0f, c4); } ================================================ FILE: src/libraries/box2d/dynamics/b2_pulley_joint.cpp ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #include "box2d/b2_body.h" #include "box2d/b2_pulley_joint.h" #include "box2d/b2_time_step.h" // Pulley: // length1 = norm(p1 - s1) // length2 = norm(p2 - s2) // C0 = (length1 + ratio * length2)_initial // C = C0 - (length1 + ratio * length2) // u1 = (p1 - s1) / norm(p1 - s1) // u2 = (p2 - s2) / norm(p2 - s2) // Cdot = -dot(u1, v1 + cross(w1, r1)) - ratio * dot(u2, v2 + cross(w2, r2)) // J = -[u1 cross(r1, u1) ratio * u2 ratio * cross(r2, u2)] // K = J * invM * JT // = invMass1 + invI1 * cross(r1, u1)^2 + ratio^2 * (invMass2 + invI2 * cross(r2, u2)^2) void b2PulleyJointDef::Initialize(b2Body* bA, b2Body* bB, const b2Vec2& groundA, const b2Vec2& groundB, const b2Vec2& anchorA, const b2Vec2& anchorB, float r) { bodyA = bA; bodyB = bB; groundAnchorA = groundA; groundAnchorB = groundB; localAnchorA = bodyA->GetLocalPoint(anchorA); localAnchorB = bodyB->GetLocalPoint(anchorB); b2Vec2 dA = anchorA - groundA; lengthA = dA.Length(); b2Vec2 dB = anchorB - groundB; lengthB = dB.Length(); ratio = r; b2Assert(ratio > b2_epsilon); } b2PulleyJoint::b2PulleyJoint(const b2PulleyJointDef* def) : b2Joint(def) { m_groundAnchorA = def->groundAnchorA; m_groundAnchorB = def->groundAnchorB; m_localAnchorA = def->localAnchorA; m_localAnchorB = def->localAnchorB; m_lengthA = def->lengthA; m_lengthB = def->lengthB; b2Assert(def->ratio != 0.0f); m_ratio = def->ratio; m_constant = def->lengthA + m_ratio * def->lengthB; m_impulse = 0.0f; } void b2PulleyJoint::InitVelocityConstraints(const b2SolverData& data) { m_indexA = m_bodyA->m_islandIndex; m_indexB = m_bodyB->m_islandIndex; m_localCenterA = m_bodyA->m_sweep.localCenter; m_localCenterB = m_bodyB->m_sweep.localCenter; m_invMassA = m_bodyA->m_invMass; m_invMassB = m_bodyB->m_invMass; m_invIA = m_bodyA->m_invI; m_invIB = m_bodyB->m_invI; b2Vec2 cA = data.positions[m_indexA].c; float aA = data.positions[m_indexA].a; b2Vec2 vA = data.velocities[m_indexA].v; float wA = data.velocities[m_indexA].w; b2Vec2 cB = data.positions[m_indexB].c; float aB = data.positions[m_indexB].a; b2Vec2 vB = data.velocities[m_indexB].v; float wB = data.velocities[m_indexB].w; b2Rot qA(aA), qB(aB); m_rA = b2Mul(qA, m_localAnchorA - m_localCenterA); m_rB = b2Mul(qB, m_localAnchorB - m_localCenterB); // Get the pulley axes. m_uA = cA + m_rA - m_groundAnchorA; m_uB = cB + m_rB - m_groundAnchorB; float lengthA = m_uA.Length(); float lengthB = m_uB.Length(); if (lengthA > 10.0f * b2_linearSlop) { m_uA *= 1.0f / lengthA; } else { m_uA.SetZero(); } if (lengthB > 10.0f * b2_linearSlop) { m_uB *= 1.0f / lengthB; } else { m_uB.SetZero(); } // Compute effective mass. float ruA = b2Cross(m_rA, m_uA); float ruB = b2Cross(m_rB, m_uB); float mA = m_invMassA + m_invIA * ruA * ruA; float mB = m_invMassB + m_invIB * ruB * ruB; m_mass = mA + m_ratio * m_ratio * mB; if (m_mass > 0.0f) { m_mass = 1.0f / m_mass; } if (data.step.warmStarting) { // Scale impulses to support variable time steps. m_impulse *= data.step.dtRatio; // Warm starting. b2Vec2 PA = -(m_impulse) * m_uA; b2Vec2 PB = (-m_ratio * m_impulse) * m_uB; vA += m_invMassA * PA; wA += m_invIA * b2Cross(m_rA, PA); vB += m_invMassB * PB; wB += m_invIB * b2Cross(m_rB, PB); } else { m_impulse = 0.0f; } data.velocities[m_indexA].v = vA; data.velocities[m_indexA].w = wA; data.velocities[m_indexB].v = vB; data.velocities[m_indexB].w = wB; } void b2PulleyJoint::SolveVelocityConstraints(const b2SolverData& data) { b2Vec2 vA = data.velocities[m_indexA].v; float wA = data.velocities[m_indexA].w; b2Vec2 vB = data.velocities[m_indexB].v; float wB = data.velocities[m_indexB].w; b2Vec2 vpA = vA + b2Cross(wA, m_rA); b2Vec2 vpB = vB + b2Cross(wB, m_rB); float Cdot = -b2Dot(m_uA, vpA) - m_ratio * b2Dot(m_uB, vpB); float impulse = -m_mass * Cdot; m_impulse += impulse; b2Vec2 PA = -impulse * m_uA; b2Vec2 PB = -m_ratio * impulse * m_uB; vA += m_invMassA * PA; wA += m_invIA * b2Cross(m_rA, PA); vB += m_invMassB * PB; wB += m_invIB * b2Cross(m_rB, PB); data.velocities[m_indexA].v = vA; data.velocities[m_indexA].w = wA; data.velocities[m_indexB].v = vB; data.velocities[m_indexB].w = wB; } bool b2PulleyJoint::SolvePositionConstraints(const b2SolverData& data) { b2Vec2 cA = data.positions[m_indexA].c; float aA = data.positions[m_indexA].a; b2Vec2 cB = data.positions[m_indexB].c; float aB = data.positions[m_indexB].a; b2Rot qA(aA), qB(aB); b2Vec2 rA = b2Mul(qA, m_localAnchorA - m_localCenterA); b2Vec2 rB = b2Mul(qB, m_localAnchorB - m_localCenterB); // Get the pulley axes. b2Vec2 uA = cA + rA - m_groundAnchorA; b2Vec2 uB = cB + rB - m_groundAnchorB; float lengthA = uA.Length(); float lengthB = uB.Length(); if (lengthA > 10.0f * b2_linearSlop) { uA *= 1.0f / lengthA; } else { uA.SetZero(); } if (lengthB > 10.0f * b2_linearSlop) { uB *= 1.0f / lengthB; } else { uB.SetZero(); } // Compute effective mass. float ruA = b2Cross(rA, uA); float ruB = b2Cross(rB, uB); float mA = m_invMassA + m_invIA * ruA * ruA; float mB = m_invMassB + m_invIB * ruB * ruB; float mass = mA + m_ratio * m_ratio * mB; if (mass > 0.0f) { mass = 1.0f / mass; } float C = m_constant - lengthA - m_ratio * lengthB; float linearError = b2Abs(C); float impulse = -mass * C; b2Vec2 PA = -impulse * uA; b2Vec2 PB = -m_ratio * impulse * uB; cA += m_invMassA * PA; aA += m_invIA * b2Cross(rA, PA); cB += m_invMassB * PB; aB += m_invIB * b2Cross(rB, PB); data.positions[m_indexA].c = cA; data.positions[m_indexA].a = aA; data.positions[m_indexB].c = cB; data.positions[m_indexB].a = aB; return linearError < b2_linearSlop; } b2Vec2 b2PulleyJoint::GetAnchorA() const { return m_bodyA->GetWorldPoint(m_localAnchorA); } b2Vec2 b2PulleyJoint::GetAnchorB() const { return m_bodyB->GetWorldPoint(m_localAnchorB); } b2Vec2 b2PulleyJoint::GetReactionForce(float inv_dt) const { b2Vec2 P = m_impulse * m_uB; return inv_dt * P; } float b2PulleyJoint::GetReactionTorque(float inv_dt) const { B2_NOT_USED(inv_dt); return 0.0f; } b2Vec2 b2PulleyJoint::GetGroundAnchorA() const { return m_groundAnchorA; } b2Vec2 b2PulleyJoint::GetGroundAnchorB() const { return m_groundAnchorB; } float b2PulleyJoint::GetLengthA() const { return m_lengthA; } float b2PulleyJoint::GetLengthB() const { return m_lengthB; } float b2PulleyJoint::GetRatio() const { return m_ratio; } float b2PulleyJoint::GetCurrentLengthA() const { b2Vec2 p = m_bodyA->GetWorldPoint(m_localAnchorA); b2Vec2 s = m_groundAnchorA; b2Vec2 d = p - s; return d.Length(); } float b2PulleyJoint::GetCurrentLengthB() const { b2Vec2 p = m_bodyB->GetWorldPoint(m_localAnchorB); b2Vec2 s = m_groundAnchorB; b2Vec2 d = p - s; return d.Length(); } void b2PulleyJoint::Dump() { int32 indexA = m_bodyA->m_islandIndex; int32 indexB = m_bodyB->m_islandIndex; b2Dump(" b2PulleyJointDef jd;\n"); b2Dump(" jd.bodyA = bodies[%d];\n", indexA); b2Dump(" jd.bodyB = bodies[%d];\n", indexB); b2Dump(" jd.collideConnected = bool(%d);\n", m_collideConnected); b2Dump(" jd.groundAnchorA.Set(%.9g, %.9g);\n", m_groundAnchorA.x, m_groundAnchorA.y); b2Dump(" jd.groundAnchorB.Set(%.9g, %.9g);\n", m_groundAnchorB.x, m_groundAnchorB.y); b2Dump(" jd.localAnchorA.Set(%.9g, %.9g);\n", m_localAnchorA.x, m_localAnchorA.y); b2Dump(" jd.localAnchorB.Set(%.9g, %.9g);\n", m_localAnchorB.x, m_localAnchorB.y); b2Dump(" jd.lengthA = %.9g;\n", m_lengthA); b2Dump(" jd.lengthB = %.9g;\n", m_lengthB); b2Dump(" jd.ratio = %.9g;\n", m_ratio); b2Dump(" joints[%d] = m_world->CreateJoint(&jd);\n", m_index); } void b2PulleyJoint::ShiftOrigin(const b2Vec2& newOrigin) { m_groundAnchorA -= newOrigin; m_groundAnchorB -= newOrigin; } ================================================ FILE: src/libraries/box2d/dynamics/b2_revolute_joint.cpp ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #include "box2d/b2_body.h" #include "box2d/b2_draw.h" #include "box2d/b2_revolute_joint.h" #include "box2d/b2_time_step.h" // Point-to-point constraint // C = p2 - p1 // Cdot = v2 - v1 // = v2 + cross(w2, r2) - v1 - cross(w1, r1) // J = [-I -r1_skew I r2_skew ] // Identity used: // w k % (rx i + ry j) = w * (-ry i + rx j) // Motor constraint // Cdot = w2 - w1 // J = [0 0 -1 0 0 1] // K = invI1 + invI2 void b2RevoluteJointDef::Initialize(b2Body* bA, b2Body* bB, const b2Vec2& anchor) { bodyA = bA; bodyB = bB; localAnchorA = bodyA->GetLocalPoint(anchor); localAnchorB = bodyB->GetLocalPoint(anchor); referenceAngle = bodyB->GetAngle() - bodyA->GetAngle(); } b2RevoluteJoint::b2RevoluteJoint(const b2RevoluteJointDef* def) : b2Joint(def) { m_localAnchorA = def->localAnchorA; m_localAnchorB = def->localAnchorB; m_referenceAngle = def->referenceAngle; m_impulse.SetZero(); m_axialMass = 0.0f; m_motorImpulse = 0.0f; m_lowerImpulse = 0.0f; m_upperImpulse = 0.0f; m_lowerAngle = def->lowerAngle; m_upperAngle = def->upperAngle; m_maxMotorTorque = def->maxMotorTorque; m_motorSpeed = def->motorSpeed; m_enableLimit = def->enableLimit; m_enableMotor = def->enableMotor; m_angle = 0.0f; } void b2RevoluteJoint::InitVelocityConstraints(const b2SolverData& data) { m_indexA = m_bodyA->m_islandIndex; m_indexB = m_bodyB->m_islandIndex; m_localCenterA = m_bodyA->m_sweep.localCenter; m_localCenterB = m_bodyB->m_sweep.localCenter; m_invMassA = m_bodyA->m_invMass; m_invMassB = m_bodyB->m_invMass; m_invIA = m_bodyA->m_invI; m_invIB = m_bodyB->m_invI; float aA = data.positions[m_indexA].a; b2Vec2 vA = data.velocities[m_indexA].v; float wA = data.velocities[m_indexA].w; float aB = data.positions[m_indexB].a; b2Vec2 vB = data.velocities[m_indexB].v; float wB = data.velocities[m_indexB].w; b2Rot qA(aA), qB(aB); m_rA = b2Mul(qA, m_localAnchorA - m_localCenterA); m_rB = b2Mul(qB, m_localAnchorB - m_localCenterB); // J = [-I -r1_skew I r2_skew] // r_skew = [-ry; rx] // Matlab // K = [ mA+r1y^2*iA+mB+r2y^2*iB, -r1y*iA*r1x-r2y*iB*r2x] // [ -r1y*iA*r1x-r2y*iB*r2x, mA+r1x^2*iA+mB+r2x^2*iB] float mA = m_invMassA, mB = m_invMassB; float iA = m_invIA, iB = m_invIB; m_K.ex.x = mA + mB + m_rA.y * m_rA.y * iA + m_rB.y * m_rB.y * iB; m_K.ey.x = -m_rA.y * m_rA.x * iA - m_rB.y * m_rB.x * iB; m_K.ex.y = m_K.ey.x; m_K.ey.y = mA + mB + m_rA.x * m_rA.x * iA + m_rB.x * m_rB.x * iB; m_axialMass = iA + iB; bool fixedRotation; if (m_axialMass > 0.0f) { m_axialMass = 1.0f / m_axialMass; fixedRotation = false; } else { fixedRotation = true; } m_angle = aB - aA - m_referenceAngle; if (m_enableLimit == false || fixedRotation) { m_lowerImpulse = 0.0f; m_upperImpulse = 0.0f; } if (m_enableMotor == false || fixedRotation) { m_motorImpulse = 0.0f; } if (data.step.warmStarting) { // Scale impulses to support a variable time step. m_impulse *= data.step.dtRatio; m_motorImpulse *= data.step.dtRatio; m_lowerImpulse *= data.step.dtRatio; m_upperImpulse *= data.step.dtRatio; float axialImpulse = m_motorImpulse + m_lowerImpulse - m_upperImpulse; b2Vec2 P(m_impulse.x, m_impulse.y); vA -= mA * P; wA -= iA * (b2Cross(m_rA, P) + axialImpulse); vB += mB * P; wB += iB * (b2Cross(m_rB, P) + axialImpulse); } else { m_impulse.SetZero(); m_motorImpulse = 0.0f; m_lowerImpulse = 0.0f; m_upperImpulse = 0.0f; } data.velocities[m_indexA].v = vA; data.velocities[m_indexA].w = wA; data.velocities[m_indexB].v = vB; data.velocities[m_indexB].w = wB; } void b2RevoluteJoint::SolveVelocityConstraints(const b2SolverData& data) { b2Vec2 vA = data.velocities[m_indexA].v; float wA = data.velocities[m_indexA].w; b2Vec2 vB = data.velocities[m_indexB].v; float wB = data.velocities[m_indexB].w; float mA = m_invMassA, mB = m_invMassB; float iA = m_invIA, iB = m_invIB; bool fixedRotation = (iA + iB == 0.0f); // Solve motor constraint. if (m_enableMotor && fixedRotation == false) { float Cdot = wB - wA - m_motorSpeed; float impulse = -m_axialMass * Cdot; float oldImpulse = m_motorImpulse; float maxImpulse = data.step.dt * m_maxMotorTorque; m_motorImpulse = b2Clamp(m_motorImpulse + impulse, -maxImpulse, maxImpulse); impulse = m_motorImpulse - oldImpulse; wA -= iA * impulse; wB += iB * impulse; } if (m_enableLimit && fixedRotation == false) { // Lower limit { float C = m_angle - m_lowerAngle; float Cdot = wB - wA; float impulse = -m_axialMass * (Cdot + b2Max(C, 0.0f) * data.step.inv_dt); float oldImpulse = m_lowerImpulse; m_lowerImpulse = b2Max(m_lowerImpulse + impulse, 0.0f); impulse = m_lowerImpulse - oldImpulse; wA -= iA * impulse; wB += iB * impulse; } // Upper limit // Note: signs are flipped to keep C positive when the constraint is satisfied. // This also keeps the impulse positive when the limit is active. { float C = m_upperAngle - m_angle; float Cdot = wA - wB; float impulse = -m_axialMass * (Cdot + b2Max(C, 0.0f) * data.step.inv_dt); float oldImpulse = m_upperImpulse; m_upperImpulse = b2Max(m_upperImpulse + impulse, 0.0f); impulse = m_upperImpulse - oldImpulse; wA += iA * impulse; wB -= iB * impulse; } } // Solve point-to-point constraint { b2Vec2 Cdot = vB + b2Cross(wB, m_rB) - vA - b2Cross(wA, m_rA); b2Vec2 impulse = m_K.Solve(-Cdot); m_impulse.x += impulse.x; m_impulse.y += impulse.y; vA -= mA * impulse; wA -= iA * b2Cross(m_rA, impulse); vB += mB * impulse; wB += iB * b2Cross(m_rB, impulse); } data.velocities[m_indexA].v = vA; data.velocities[m_indexA].w = wA; data.velocities[m_indexB].v = vB; data.velocities[m_indexB].w = wB; } bool b2RevoluteJoint::SolvePositionConstraints(const b2SolverData& data) { b2Vec2 cA = data.positions[m_indexA].c; float aA = data.positions[m_indexA].a; b2Vec2 cB = data.positions[m_indexB].c; float aB = data.positions[m_indexB].a; b2Rot qA(aA), qB(aB); float angularError = 0.0f; float positionError = 0.0f; bool fixedRotation = (m_invIA + m_invIB == 0.0f); // Solve angular limit constraint if (m_enableLimit && fixedRotation == false) { float angle = aB - aA - m_referenceAngle; float C = 0.0f; if (b2Abs(m_upperAngle - m_lowerAngle) < 2.0f * b2_angularSlop) { // Prevent large angular corrections C = b2Clamp(angle - m_lowerAngle, -b2_maxAngularCorrection, b2_maxAngularCorrection); } else if (angle <= m_lowerAngle) { // Prevent large angular corrections and allow some slop. C = b2Clamp(angle - m_lowerAngle + b2_angularSlop, -b2_maxAngularCorrection, 0.0f); } else if (angle >= m_upperAngle) { // Prevent large angular corrections and allow some slop. C = b2Clamp(angle - m_upperAngle - b2_angularSlop, 0.0f, b2_maxAngularCorrection); } float limitImpulse = -m_axialMass * C; aA -= m_invIA * limitImpulse; aB += m_invIB * limitImpulse; angularError = b2Abs(C); } // Solve point-to-point constraint. { qA.Set(aA); qB.Set(aB); b2Vec2 rA = b2Mul(qA, m_localAnchorA - m_localCenterA); b2Vec2 rB = b2Mul(qB, m_localAnchorB - m_localCenterB); b2Vec2 C = cB + rB - cA - rA; positionError = C.Length(); float mA = m_invMassA, mB = m_invMassB; float iA = m_invIA, iB = m_invIB; b2Mat22 K; K.ex.x = mA + mB + iA * rA.y * rA.y + iB * rB.y * rB.y; K.ex.y = -iA * rA.x * rA.y - iB * rB.x * rB.y; K.ey.x = K.ex.y; K.ey.y = mA + mB + iA * rA.x * rA.x + iB * rB.x * rB.x; b2Vec2 impulse = -K.Solve(C); cA -= mA * impulse; aA -= iA * b2Cross(rA, impulse); cB += mB * impulse; aB += iB * b2Cross(rB, impulse); } data.positions[m_indexA].c = cA; data.positions[m_indexA].a = aA; data.positions[m_indexB].c = cB; data.positions[m_indexB].a = aB; return positionError <= b2_linearSlop && angularError <= b2_angularSlop; } b2Vec2 b2RevoluteJoint::GetAnchorA() const { return m_bodyA->GetWorldPoint(m_localAnchorA); } b2Vec2 b2RevoluteJoint::GetAnchorB() const { return m_bodyB->GetWorldPoint(m_localAnchorB); } b2Vec2 b2RevoluteJoint::GetReactionForce(float inv_dt) const { b2Vec2 P(m_impulse.x, m_impulse.y); return inv_dt * P; } float b2RevoluteJoint::GetReactionTorque(float inv_dt) const { return inv_dt * (m_motorImpulse + m_lowerImpulse - m_upperImpulse); } float b2RevoluteJoint::GetJointAngle() const { b2Body* bA = m_bodyA; b2Body* bB = m_bodyB; return bB->m_sweep.a - bA->m_sweep.a - m_referenceAngle; } float b2RevoluteJoint::GetJointSpeed() const { b2Body* bA = m_bodyA; b2Body* bB = m_bodyB; return bB->m_angularVelocity - bA->m_angularVelocity; } bool b2RevoluteJoint::IsMotorEnabled() const { return m_enableMotor; } void b2RevoluteJoint::EnableMotor(bool flag) { if (flag != m_enableMotor) { m_bodyA->SetAwake(true); m_bodyB->SetAwake(true); m_enableMotor = flag; } } float b2RevoluteJoint::GetMotorTorque(float inv_dt) const { return inv_dt * m_motorImpulse; } void b2RevoluteJoint::SetMotorSpeed(float speed) { if (speed != m_motorSpeed) { m_bodyA->SetAwake(true); m_bodyB->SetAwake(true); m_motorSpeed = speed; } } void b2RevoluteJoint::SetMaxMotorTorque(float torque) { if (torque != m_maxMotorTorque) { m_bodyA->SetAwake(true); m_bodyB->SetAwake(true); m_maxMotorTorque = torque; } } bool b2RevoluteJoint::IsLimitEnabled() const { return m_enableLimit; } void b2RevoluteJoint::EnableLimit(bool flag) { if (flag != m_enableLimit) { m_bodyA->SetAwake(true); m_bodyB->SetAwake(true); m_enableLimit = flag; m_lowerImpulse = 0.0f; m_upperImpulse = 0.0f; } } float b2RevoluteJoint::GetLowerLimit() const { return m_lowerAngle; } float b2RevoluteJoint::GetUpperLimit() const { return m_upperAngle; } void b2RevoluteJoint::SetLimits(float lower, float upper) { b2Assert(lower <= upper); if (lower != m_lowerAngle || upper != m_upperAngle) { m_bodyA->SetAwake(true); m_bodyB->SetAwake(true); m_lowerImpulse = 0.0f; m_upperImpulse = 0.0f; m_lowerAngle = lower; m_upperAngle = upper; } } void b2RevoluteJoint::Dump() { int32 indexA = m_bodyA->m_islandIndex; int32 indexB = m_bodyB->m_islandIndex; b2Dump(" b2RevoluteJointDef jd;\n"); b2Dump(" jd.bodyA = bodies[%d];\n", indexA); b2Dump(" jd.bodyB = bodies[%d];\n", indexB); b2Dump(" jd.collideConnected = bool(%d);\n", m_collideConnected); b2Dump(" jd.localAnchorA.Set(%.9g, %.9g);\n", m_localAnchorA.x, m_localAnchorA.y); b2Dump(" jd.localAnchorB.Set(%.9g, %.9g);\n", m_localAnchorB.x, m_localAnchorB.y); b2Dump(" jd.referenceAngle = %.9g;\n", m_referenceAngle); b2Dump(" jd.enableLimit = bool(%d);\n", m_enableLimit); b2Dump(" jd.lowerAngle = %.9g;\n", m_lowerAngle); b2Dump(" jd.upperAngle = %.9g;\n", m_upperAngle); b2Dump(" jd.enableMotor = bool(%d);\n", m_enableMotor); b2Dump(" jd.motorSpeed = %.9g;\n", m_motorSpeed); b2Dump(" jd.maxMotorTorque = %.9g;\n", m_maxMotorTorque); b2Dump(" joints[%d] = m_world->CreateJoint(&jd);\n", m_index); } /// void b2RevoluteJoint::Draw(b2Draw* draw) const { const b2Transform& xfA = m_bodyA->GetTransform(); const b2Transform& xfB = m_bodyB->GetTransform(); b2Vec2 pA = b2Mul(xfA, m_localAnchorA); b2Vec2 pB = b2Mul(xfB, m_localAnchorB); b2Color c1(0.7f, 0.7f, 0.7f); b2Color c2(0.3f, 0.9f, 0.3f); b2Color c3(0.9f, 0.3f, 0.3f); b2Color c4(0.3f, 0.3f, 0.9f); b2Color c5(0.4f, 0.4f, 0.4f); draw->DrawPoint(pA, 5.0f, c4); draw->DrawPoint(pB, 5.0f, c5); float aA = m_bodyA->GetAngle(); float aB = m_bodyB->GetAngle(); float angle = aB - aA - m_referenceAngle; const float L = 0.5f; b2Vec2 r = L * b2Vec2(cosf(angle), sinf(angle)); draw->DrawSegment(pB, pB + r, c1); draw->DrawCircle(pB, L, c1); if (m_enableLimit) { b2Vec2 rlo = L * b2Vec2(cosf(m_lowerAngle), sinf(m_lowerAngle)); b2Vec2 rhi = L * b2Vec2(cosf(m_upperAngle), sinf(m_upperAngle)); draw->DrawSegment(pB, pB + rlo, c2); draw->DrawSegment(pB, pB + rhi, c3); } b2Color color(0.5f, 0.8f, 0.8f); draw->DrawSegment(xfA.p, pA, color); draw->DrawSegment(pA, pB, color); draw->DrawSegment(xfB.p, pB, color); } ================================================ FILE: src/libraries/box2d/dynamics/b2_weld_joint.cpp ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #include "box2d/b2_body.h" #include "box2d/b2_time_step.h" #include "box2d/b2_weld_joint.h" // Point-to-point constraint // C = p2 - p1 // Cdot = v2 - v1 // = v2 + cross(w2, r2) - v1 - cross(w1, r1) // J = [-I -r1_skew I r2_skew ] // Identity used: // w k % (rx i + ry j) = w * (-ry i + rx j) // Angle constraint // C = angle2 - angle1 - referenceAngle // Cdot = w2 - w1 // J = [0 0 -1 0 0 1] // K = invI1 + invI2 void b2WeldJointDef::Initialize(b2Body* bA, b2Body* bB, const b2Vec2& anchor) { bodyA = bA; bodyB = bB; localAnchorA = bodyA->GetLocalPoint(anchor); localAnchorB = bodyB->GetLocalPoint(anchor); referenceAngle = bodyB->GetAngle() - bodyA->GetAngle(); } b2WeldJoint::b2WeldJoint(const b2WeldJointDef* def) : b2Joint(def) { m_localAnchorA = def->localAnchorA; m_localAnchorB = def->localAnchorB; m_referenceAngle = def->referenceAngle; m_stiffness = def->stiffness; m_damping = def->damping; m_impulse.SetZero(); } void b2WeldJoint::InitVelocityConstraints(const b2SolverData& data) { m_indexA = m_bodyA->m_islandIndex; m_indexB = m_bodyB->m_islandIndex; m_localCenterA = m_bodyA->m_sweep.localCenter; m_localCenterB = m_bodyB->m_sweep.localCenter; m_invMassA = m_bodyA->m_invMass; m_invMassB = m_bodyB->m_invMass; m_invIA = m_bodyA->m_invI; m_invIB = m_bodyB->m_invI; float aA = data.positions[m_indexA].a; b2Vec2 vA = data.velocities[m_indexA].v; float wA = data.velocities[m_indexA].w; float aB = data.positions[m_indexB].a; b2Vec2 vB = data.velocities[m_indexB].v; float wB = data.velocities[m_indexB].w; b2Rot qA(aA), qB(aB); m_rA = b2Mul(qA, m_localAnchorA - m_localCenterA); m_rB = b2Mul(qB, m_localAnchorB - m_localCenterB); // J = [-I -r1_skew I r2_skew] // [ 0 -1 0 1] // r_skew = [-ry; rx] // Matlab // K = [ mA+r1y^2*iA+mB+r2y^2*iB, -r1y*iA*r1x-r2y*iB*r2x, -r1y*iA-r2y*iB] // [ -r1y*iA*r1x-r2y*iB*r2x, mA+r1x^2*iA+mB+r2x^2*iB, r1x*iA+r2x*iB] // [ -r1y*iA-r2y*iB, r1x*iA+r2x*iB, iA+iB] float mA = m_invMassA, mB = m_invMassB; float iA = m_invIA, iB = m_invIB; b2Mat33 K; K.ex.x = mA + mB + m_rA.y * m_rA.y * iA + m_rB.y * m_rB.y * iB; K.ey.x = -m_rA.y * m_rA.x * iA - m_rB.y * m_rB.x * iB; K.ez.x = -m_rA.y * iA - m_rB.y * iB; K.ex.y = K.ey.x; K.ey.y = mA + mB + m_rA.x * m_rA.x * iA + m_rB.x * m_rB.x * iB; K.ez.y = m_rA.x * iA + m_rB.x * iB; K.ex.z = K.ez.x; K.ey.z = K.ez.y; K.ez.z = iA + iB; if (m_stiffness > 0.0f) { K.GetInverse22(&m_mass); float invM = iA + iB; float C = aB - aA - m_referenceAngle; // Damping coefficient float d = m_damping; // Spring stiffness float k = m_stiffness; // magic formulas float h = data.step.dt; m_gamma = h * (d + h * k); m_gamma = m_gamma != 0.0f ? 1.0f / m_gamma : 0.0f; m_bias = C * h * k * m_gamma; invM += m_gamma; m_mass.ez.z = invM != 0.0f ? 1.0f / invM : 0.0f; } else if (K.ez.z == 0.0f) { K.GetInverse22(&m_mass); m_gamma = 0.0f; m_bias = 0.0f; } else { K.GetSymInverse33(&m_mass); m_gamma = 0.0f; m_bias = 0.0f; } if (data.step.warmStarting) { // Scale impulses to support a variable time step. m_impulse *= data.step.dtRatio; b2Vec2 P(m_impulse.x, m_impulse.y); vA -= mA * P; wA -= iA * (b2Cross(m_rA, P) + m_impulse.z); vB += mB * P; wB += iB * (b2Cross(m_rB, P) + m_impulse.z); } else { m_impulse.SetZero(); } data.velocities[m_indexA].v = vA; data.velocities[m_indexA].w = wA; data.velocities[m_indexB].v = vB; data.velocities[m_indexB].w = wB; } void b2WeldJoint::SolveVelocityConstraints(const b2SolverData& data) { b2Vec2 vA = data.velocities[m_indexA].v; float wA = data.velocities[m_indexA].w; b2Vec2 vB = data.velocities[m_indexB].v; float wB = data.velocities[m_indexB].w; float mA = m_invMassA, mB = m_invMassB; float iA = m_invIA, iB = m_invIB; if (m_stiffness > 0.0f) { float Cdot2 = wB - wA; float impulse2 = -m_mass.ez.z * (Cdot2 + m_bias + m_gamma * m_impulse.z); m_impulse.z += impulse2; wA -= iA * impulse2; wB += iB * impulse2; b2Vec2 Cdot1 = vB + b2Cross(wB, m_rB) - vA - b2Cross(wA, m_rA); b2Vec2 impulse1 = -b2Mul22(m_mass, Cdot1); m_impulse.x += impulse1.x; m_impulse.y += impulse1.y; b2Vec2 P = impulse1; vA -= mA * P; wA -= iA * b2Cross(m_rA, P); vB += mB * P; wB += iB * b2Cross(m_rB, P); } else { b2Vec2 Cdot1 = vB + b2Cross(wB, m_rB) - vA - b2Cross(wA, m_rA); float Cdot2 = wB - wA; b2Vec3 Cdot(Cdot1.x, Cdot1.y, Cdot2); b2Vec3 impulse = -b2Mul(m_mass, Cdot); m_impulse += impulse; b2Vec2 P(impulse.x, impulse.y); vA -= mA * P; wA -= iA * (b2Cross(m_rA, P) + impulse.z); vB += mB * P; wB += iB * (b2Cross(m_rB, P) + impulse.z); } data.velocities[m_indexA].v = vA; data.velocities[m_indexA].w = wA; data.velocities[m_indexB].v = vB; data.velocities[m_indexB].w = wB; } bool b2WeldJoint::SolvePositionConstraints(const b2SolverData& data) { b2Vec2 cA = data.positions[m_indexA].c; float aA = data.positions[m_indexA].a; b2Vec2 cB = data.positions[m_indexB].c; float aB = data.positions[m_indexB].a; b2Rot qA(aA), qB(aB); float mA = m_invMassA, mB = m_invMassB; float iA = m_invIA, iB = m_invIB; b2Vec2 rA = b2Mul(qA, m_localAnchorA - m_localCenterA); b2Vec2 rB = b2Mul(qB, m_localAnchorB - m_localCenterB); float positionError, angularError; b2Mat33 K; K.ex.x = mA + mB + rA.y * rA.y * iA + rB.y * rB.y * iB; K.ey.x = -rA.y * rA.x * iA - rB.y * rB.x * iB; K.ez.x = -rA.y * iA - rB.y * iB; K.ex.y = K.ey.x; K.ey.y = mA + mB + rA.x * rA.x * iA + rB.x * rB.x * iB; K.ez.y = rA.x * iA + rB.x * iB; K.ex.z = K.ez.x; K.ey.z = K.ez.y; K.ez.z = iA + iB; if (m_stiffness > 0.0f) { b2Vec2 C1 = cB + rB - cA - rA; positionError = C1.Length(); angularError = 0.0f; b2Vec2 P = -K.Solve22(C1); cA -= mA * P; aA -= iA * b2Cross(rA, P); cB += mB * P; aB += iB * b2Cross(rB, P); } else { b2Vec2 C1 = cB + rB - cA - rA; float C2 = aB - aA - m_referenceAngle; positionError = C1.Length(); angularError = b2Abs(C2); b2Vec3 C(C1.x, C1.y, C2); b2Vec3 impulse; if (K.ez.z > 0.0f) { impulse = -K.Solve33(C); } else { b2Vec2 impulse2 = -K.Solve22(C1); impulse.Set(impulse2.x, impulse2.y, 0.0f); } b2Vec2 P(impulse.x, impulse.y); cA -= mA * P; aA -= iA * (b2Cross(rA, P) + impulse.z); cB += mB * P; aB += iB * (b2Cross(rB, P) + impulse.z); } data.positions[m_indexA].c = cA; data.positions[m_indexA].a = aA; data.positions[m_indexB].c = cB; data.positions[m_indexB].a = aB; return positionError <= b2_linearSlop && angularError <= b2_angularSlop; } b2Vec2 b2WeldJoint::GetAnchorA() const { return m_bodyA->GetWorldPoint(m_localAnchorA); } b2Vec2 b2WeldJoint::GetAnchorB() const { return m_bodyB->GetWorldPoint(m_localAnchorB); } b2Vec2 b2WeldJoint::GetReactionForce(float inv_dt) const { b2Vec2 P(m_impulse.x, m_impulse.y); return inv_dt * P; } float b2WeldJoint::GetReactionTorque(float inv_dt) const { return inv_dt * m_impulse.z; } void b2WeldJoint::Dump() { int32 indexA = m_bodyA->m_islandIndex; int32 indexB = m_bodyB->m_islandIndex; b2Dump(" b2WeldJointDef jd;\n"); b2Dump(" jd.bodyA = bodies[%d];\n", indexA); b2Dump(" jd.bodyB = bodies[%d];\n", indexB); b2Dump(" jd.collideConnected = bool(%d);\n", m_collideConnected); b2Dump(" jd.localAnchorA.Set(%.9g, %.9g);\n", m_localAnchorA.x, m_localAnchorA.y); b2Dump(" jd.localAnchorB.Set(%.9g, %.9g);\n", m_localAnchorB.x, m_localAnchorB.y); b2Dump(" jd.referenceAngle = %.9g;\n", m_referenceAngle); b2Dump(" jd.stiffness = %.9g;\n", m_stiffness); b2Dump(" jd.damping = %.9g;\n", m_damping); b2Dump(" joints[%d] = m_world->CreateJoint(&jd);\n", m_index); } ================================================ FILE: src/libraries/box2d/dynamics/b2_wheel_joint.cpp ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #include "box2d/b2_body.h" #include "box2d/b2_draw.h" #include "box2d/b2_wheel_joint.h" #include "box2d/b2_time_step.h" // Linear constraint (point-to-line) // d = pB - pA = xB + rB - xA - rA // C = dot(ay, d) // Cdot = dot(d, cross(wA, ay)) + dot(ay, vB + cross(wB, rB) - vA - cross(wA, rA)) // = -dot(ay, vA) - dot(cross(d + rA, ay), wA) + dot(ay, vB) + dot(cross(rB, ay), vB) // J = [-ay, -cross(d + rA, ay), ay, cross(rB, ay)] // Spring linear constraint // C = dot(ax, d) // Cdot = = -dot(ax, vA) - dot(cross(d + rA, ax), wA) + dot(ax, vB) + dot(cross(rB, ax), vB) // J = [-ax -cross(d+rA, ax) ax cross(rB, ax)] // Motor rotational constraint // Cdot = wB - wA // J = [0 0 -1 0 0 1] void b2WheelJointDef::Initialize(b2Body* bA, b2Body* bB, const b2Vec2& anchor, const b2Vec2& axis) { bodyA = bA; bodyB = bB; localAnchorA = bodyA->GetLocalPoint(anchor); localAnchorB = bodyB->GetLocalPoint(anchor); localAxisA = bodyA->GetLocalVector(axis); } b2WheelJoint::b2WheelJoint(const b2WheelJointDef* def) : b2Joint(def) { m_localAnchorA = def->localAnchorA; m_localAnchorB = def->localAnchorB; m_localXAxisA = def->localAxisA; m_localYAxisA = b2Cross(1.0f, m_localXAxisA); m_mass = 0.0f; m_impulse = 0.0f; m_motorMass = 0.0f; m_motorImpulse = 0.0f; m_springMass = 0.0f; m_springImpulse = 0.0f; m_axialMass = 0.0f; m_lowerImpulse = 0.0f; m_upperImpulse = 0.0f; m_lowerTranslation = def->lowerTranslation; m_upperTranslation = def->upperTranslation; m_enableLimit = def->enableLimit; m_maxMotorTorque = def->maxMotorTorque; m_motorSpeed = def->motorSpeed; m_enableMotor = def->enableMotor; m_bias = 0.0f; m_gamma = 0.0f; m_ax.SetZero(); m_ay.SetZero(); m_stiffness = def->stiffness; m_damping = def->damping; } void b2WheelJoint::InitVelocityConstraints(const b2SolverData& data) { m_indexA = m_bodyA->m_islandIndex; m_indexB = m_bodyB->m_islandIndex; m_localCenterA = m_bodyA->m_sweep.localCenter; m_localCenterB = m_bodyB->m_sweep.localCenter; m_invMassA = m_bodyA->m_invMass; m_invMassB = m_bodyB->m_invMass; m_invIA = m_bodyA->m_invI; m_invIB = m_bodyB->m_invI; float mA = m_invMassA, mB = m_invMassB; float iA = m_invIA, iB = m_invIB; b2Vec2 cA = data.positions[m_indexA].c; float aA = data.positions[m_indexA].a; b2Vec2 vA = data.velocities[m_indexA].v; float wA = data.velocities[m_indexA].w; b2Vec2 cB = data.positions[m_indexB].c; float aB = data.positions[m_indexB].a; b2Vec2 vB = data.velocities[m_indexB].v; float wB = data.velocities[m_indexB].w; b2Rot qA(aA), qB(aB); // Compute the effective masses. b2Vec2 rA = b2Mul(qA, m_localAnchorA - m_localCenterA); b2Vec2 rB = b2Mul(qB, m_localAnchorB - m_localCenterB); b2Vec2 d = cB + rB - cA - rA; // Point to line constraint { m_ay = b2Mul(qA, m_localYAxisA); m_sAy = b2Cross(d + rA, m_ay); m_sBy = b2Cross(rB, m_ay); m_mass = mA + mB + iA * m_sAy * m_sAy + iB * m_sBy * m_sBy; if (m_mass > 0.0f) { m_mass = 1.0f / m_mass; } } // Spring constraint m_ax = b2Mul(qA, m_localXAxisA); m_sAx = b2Cross(d + rA, m_ax); m_sBx = b2Cross(rB, m_ax); const float invMass = mA + mB + iA * m_sAx * m_sAx + iB * m_sBx * m_sBx; if (invMass > 0.0f) { m_axialMass = 1.0f / invMass; } else { m_axialMass = 0.0f; } m_springMass = 0.0f; m_bias = 0.0f; m_gamma = 0.0f; if (m_stiffness > 0.0f && invMass > 0.0f) { m_springMass = 1.0f / invMass; float C = b2Dot(d, m_ax); // magic formulas float h = data.step.dt; m_gamma = h * (m_damping + h * m_stiffness); if (m_gamma > 0.0f) { m_gamma = 1.0f / m_gamma; } m_bias = C * h * m_stiffness * m_gamma; m_springMass = invMass + m_gamma; if (m_springMass > 0.0f) { m_springMass = 1.0f / m_springMass; } } else { m_springImpulse = 0.0f; } if (m_enableLimit) { m_translation = b2Dot(m_ax, d); } else { m_lowerImpulse = 0.0f; m_upperImpulse = 0.0f; } if (m_enableMotor) { m_motorMass = iA + iB; if (m_motorMass > 0.0f) { m_motorMass = 1.0f / m_motorMass; } } else { m_motorMass = 0.0f; m_motorImpulse = 0.0f; } if (data.step.warmStarting) { // Account for variable time step. m_impulse *= data.step.dtRatio; m_springImpulse *= data.step.dtRatio; m_motorImpulse *= data.step.dtRatio; float axialImpulse = m_springImpulse + m_lowerImpulse - m_upperImpulse; b2Vec2 P = m_impulse * m_ay + axialImpulse * m_ax; float LA = m_impulse * m_sAy + axialImpulse * m_sAx + m_motorImpulse; float LB = m_impulse * m_sBy + axialImpulse * m_sBx + m_motorImpulse; vA -= m_invMassA * P; wA -= m_invIA * LA; vB += m_invMassB * P; wB += m_invIB * LB; } else { m_impulse = 0.0f; m_springImpulse = 0.0f; m_motorImpulse = 0.0f; m_lowerImpulse = 0.0f; m_upperImpulse = 0.0f; } data.velocities[m_indexA].v = vA; data.velocities[m_indexA].w = wA; data.velocities[m_indexB].v = vB; data.velocities[m_indexB].w = wB; } void b2WheelJoint::SolveVelocityConstraints(const b2SolverData& data) { float mA = m_invMassA, mB = m_invMassB; float iA = m_invIA, iB = m_invIB; b2Vec2 vA = data.velocities[m_indexA].v; float wA = data.velocities[m_indexA].w; b2Vec2 vB = data.velocities[m_indexB].v; float wB = data.velocities[m_indexB].w; // Solve spring constraint { float Cdot = b2Dot(m_ax, vB - vA) + m_sBx * wB - m_sAx * wA; float impulse = -m_springMass * (Cdot + m_bias + m_gamma * m_springImpulse); m_springImpulse += impulse; b2Vec2 P = impulse * m_ax; float LA = impulse * m_sAx; float LB = impulse * m_sBx; vA -= mA * P; wA -= iA * LA; vB += mB * P; wB += iB * LB; } // Solve rotational motor constraint { float Cdot = wB - wA - m_motorSpeed; float impulse = -m_motorMass * Cdot; float oldImpulse = m_motorImpulse; float maxImpulse = data.step.dt * m_maxMotorTorque; m_motorImpulse = b2Clamp(m_motorImpulse + impulse, -maxImpulse, maxImpulse); impulse = m_motorImpulse - oldImpulse; wA -= iA * impulse; wB += iB * impulse; } if (m_enableLimit) { // Lower limit { float C = m_translation - m_lowerTranslation; float Cdot = b2Dot(m_ax, vB - vA) + m_sBx * wB - m_sAx * wA; float impulse = -m_axialMass * (Cdot + b2Max(C, 0.0f) * data.step.inv_dt); float oldImpulse = m_lowerImpulse; m_lowerImpulse = b2Max(m_lowerImpulse + impulse, 0.0f); impulse = m_lowerImpulse - oldImpulse; b2Vec2 P = impulse * m_ax; float LA = impulse * m_sAx; float LB = impulse * m_sBx; vA -= mA * P; wA -= iA * LA; vB += mB * P; wB += iB * LB; } // Upper limit // Note: signs are flipped to keep C positive when the constraint is satisfied. // This also keeps the impulse positive when the limit is active. { float C = m_upperTranslation - m_translation; float Cdot = b2Dot(m_ax, vA - vB) + m_sAx * wA - m_sBx * wB; float impulse = -m_axialMass * (Cdot + b2Max(C, 0.0f) * data.step.inv_dt); float oldImpulse = m_upperImpulse; m_upperImpulse = b2Max(m_upperImpulse + impulse, 0.0f); impulse = m_upperImpulse - oldImpulse; b2Vec2 P = impulse * m_ax; float LA = impulse * m_sAx; float LB = impulse * m_sBx; vA += mA * P; wA += iA * LA; vB -= mB * P; wB -= iB * LB; } } // Solve point to line constraint { float Cdot = b2Dot(m_ay, vB - vA) + m_sBy * wB - m_sAy * wA; float impulse = -m_mass * Cdot; m_impulse += impulse; b2Vec2 P = impulse * m_ay; float LA = impulse * m_sAy; float LB = impulse * m_sBy; vA -= mA * P; wA -= iA * LA; vB += mB * P; wB += iB * LB; } data.velocities[m_indexA].v = vA; data.velocities[m_indexA].w = wA; data.velocities[m_indexB].v = vB; data.velocities[m_indexB].w = wB; } bool b2WheelJoint::SolvePositionConstraints(const b2SolverData& data) { b2Vec2 cA = data.positions[m_indexA].c; float aA = data.positions[m_indexA].a; b2Vec2 cB = data.positions[m_indexB].c; float aB = data.positions[m_indexB].a; float linearError = 0.0f; if (m_enableLimit) { b2Rot qA(aA), qB(aB); b2Vec2 rA = b2Mul(qA, m_localAnchorA - m_localCenterA); b2Vec2 rB = b2Mul(qB, m_localAnchorB - m_localCenterB); b2Vec2 d = (cB - cA) + rB - rA; b2Vec2 ax = b2Mul(qA, m_localXAxisA); float sAx = b2Cross(d + rA, m_ax); float sBx = b2Cross(rB, m_ax); float C = 0.0f; float translation = b2Dot(ax, d); if (b2Abs(m_upperTranslation - m_lowerTranslation) < 2.0f * b2_linearSlop) { C = translation; } else if (translation <= m_lowerTranslation) { C = b2Min(translation - m_lowerTranslation, 0.0f); } else if (translation >= m_upperTranslation) { C = b2Max(translation - m_upperTranslation, 0.0f); } if (C != 0.0f) { float invMass = m_invMassA + m_invMassB + m_invIA * sAx * sAx + m_invIB * sBx * sBx; float impulse = 0.0f; if (invMass != 0.0f) { impulse = -C / invMass; } b2Vec2 P = impulse * ax; float LA = impulse * sAx; float LB = impulse * sBx; cA -= m_invMassA * P; aA -= m_invIA * LA; cB += m_invMassB * P; aB += m_invIB * LB; linearError = b2Abs(C); } } // Solve perpendicular constraint { b2Rot qA(aA), qB(aB); b2Vec2 rA = b2Mul(qA, m_localAnchorA - m_localCenterA); b2Vec2 rB = b2Mul(qB, m_localAnchorB - m_localCenterB); b2Vec2 d = (cB - cA) + rB - rA; b2Vec2 ay = b2Mul(qA, m_localYAxisA); float sAy = b2Cross(d + rA, ay); float sBy = b2Cross(rB, ay); float C = b2Dot(d, ay); float invMass = m_invMassA + m_invMassB + m_invIA * m_sAy * m_sAy + m_invIB * m_sBy * m_sBy; float impulse = 0.0f; if (invMass != 0.0f) { impulse = - C / invMass; } b2Vec2 P = impulse * ay; float LA = impulse * sAy; float LB = impulse * sBy; cA -= m_invMassA * P; aA -= m_invIA * LA; cB += m_invMassB * P; aB += m_invIB * LB; linearError = b2Max(linearError, b2Abs(C)); } data.positions[m_indexA].c = cA; data.positions[m_indexA].a = aA; data.positions[m_indexB].c = cB; data.positions[m_indexB].a = aB; return linearError <= b2_linearSlop; } b2Vec2 b2WheelJoint::GetAnchorA() const { return m_bodyA->GetWorldPoint(m_localAnchorA); } b2Vec2 b2WheelJoint::GetAnchorB() const { return m_bodyB->GetWorldPoint(m_localAnchorB); } b2Vec2 b2WheelJoint::GetReactionForce(float inv_dt) const { return inv_dt * (m_impulse * m_ay + (m_springImpulse + m_lowerImpulse - m_upperImpulse) * m_ax); } float b2WheelJoint::GetReactionTorque(float inv_dt) const { return inv_dt * m_motorImpulse; } float b2WheelJoint::GetJointTranslation() const { b2Body* bA = m_bodyA; b2Body* bB = m_bodyB; b2Vec2 pA = bA->GetWorldPoint(m_localAnchorA); b2Vec2 pB = bB->GetWorldPoint(m_localAnchorB); b2Vec2 d = pB - pA; b2Vec2 axis = bA->GetWorldVector(m_localXAxisA); float translation = b2Dot(d, axis); return translation; } float b2WheelJoint::GetJointLinearSpeed() const { b2Body* bA = m_bodyA; b2Body* bB = m_bodyB; b2Vec2 rA = b2Mul(bA->m_xf.q, m_localAnchorA - bA->m_sweep.localCenter); b2Vec2 rB = b2Mul(bB->m_xf.q, m_localAnchorB - bB->m_sweep.localCenter); b2Vec2 p1 = bA->m_sweep.c + rA; b2Vec2 p2 = bB->m_sweep.c + rB; b2Vec2 d = p2 - p1; b2Vec2 axis = b2Mul(bA->m_xf.q, m_localXAxisA); b2Vec2 vA = bA->m_linearVelocity; b2Vec2 vB = bB->m_linearVelocity; float wA = bA->m_angularVelocity; float wB = bB->m_angularVelocity; float speed = b2Dot(d, b2Cross(wA, axis)) + b2Dot(axis, vB + b2Cross(wB, rB) - vA - b2Cross(wA, rA)); return speed; } float b2WheelJoint::GetJointAngle() const { b2Body* bA = m_bodyA; b2Body* bB = m_bodyB; return bB->m_sweep.a - bA->m_sweep.a; } float b2WheelJoint::GetJointAngularSpeed() const { float wA = m_bodyA->m_angularVelocity; float wB = m_bodyB->m_angularVelocity; return wB - wA; } bool b2WheelJoint::IsLimitEnabled() const { return m_enableLimit; } void b2WheelJoint::EnableLimit(bool flag) { if (flag != m_enableLimit) { m_bodyA->SetAwake(true); m_bodyB->SetAwake(true); m_enableLimit = flag; m_lowerImpulse = 0.0f; m_upperImpulse = 0.0f; } } float b2WheelJoint::GetLowerLimit() const { return m_lowerTranslation; } float b2WheelJoint::GetUpperLimit() const { return m_upperTranslation; } void b2WheelJoint::SetLimits(float lower, float upper) { b2Assert(lower <= upper); if (lower != m_lowerTranslation || upper != m_upperTranslation) { m_bodyA->SetAwake(true); m_bodyB->SetAwake(true); m_lowerTranslation = lower; m_upperTranslation = upper; m_lowerImpulse = 0.0f; m_upperImpulse = 0.0f; } } bool b2WheelJoint::IsMotorEnabled() const { return m_enableMotor; } void b2WheelJoint::EnableMotor(bool flag) { if (flag != m_enableMotor) { m_bodyA->SetAwake(true); m_bodyB->SetAwake(true); m_enableMotor = flag; } } void b2WheelJoint::SetMotorSpeed(float speed) { if (speed != m_motorSpeed) { m_bodyA->SetAwake(true); m_bodyB->SetAwake(true); m_motorSpeed = speed; } } void b2WheelJoint::SetMaxMotorTorque(float torque) { if (torque != m_maxMotorTorque) { m_bodyA->SetAwake(true); m_bodyB->SetAwake(true); m_maxMotorTorque = torque; } } float b2WheelJoint::GetMotorTorque(float inv_dt) const { return inv_dt * m_motorImpulse; } void b2WheelJoint::SetStiffness(float stiffness) { m_stiffness = stiffness; } float b2WheelJoint::GetStiffness() const { return m_stiffness; } void b2WheelJoint::SetDamping(float damping) { m_damping = damping; } float b2WheelJoint::GetDamping() const { return m_damping; } void b2WheelJoint::Dump() { // FLT_DECIMAL_DIG == 9 int32 indexA = m_bodyA->m_islandIndex; int32 indexB = m_bodyB->m_islandIndex; b2Dump(" b2WheelJointDef jd;\n"); b2Dump(" jd.bodyA = bodies[%d];\n", indexA); b2Dump(" jd.bodyB = bodies[%d];\n", indexB); b2Dump(" jd.collideConnected = bool(%d);\n", m_collideConnected); b2Dump(" jd.localAnchorA.Set(%.9g, %.9g);\n", m_localAnchorA.x, m_localAnchorA.y); b2Dump(" jd.localAnchorB.Set(%.9g, %.9g);\n", m_localAnchorB.x, m_localAnchorB.y); b2Dump(" jd.localAxisA.Set(%.9g, %.9g);\n", m_localXAxisA.x, m_localXAxisA.y); b2Dump(" jd.enableMotor = bool(%d);\n", m_enableMotor); b2Dump(" jd.motorSpeed = %.9g;\n", m_motorSpeed); b2Dump(" jd.maxMotorTorque = %.9g;\n", m_maxMotorTorque); b2Dump(" jd.stiffness = %.9g;\n", m_stiffness); b2Dump(" jd.damping = %.9g;\n", m_damping); b2Dump(" joints[%d] = m_world->CreateJoint(&jd);\n", m_index); } /// void b2WheelJoint::Draw(b2Draw* draw) const { const b2Transform& xfA = m_bodyA->GetTransform(); const b2Transform& xfB = m_bodyB->GetTransform(); b2Vec2 pA = b2Mul(xfA, m_localAnchorA); b2Vec2 pB = b2Mul(xfB, m_localAnchorB); b2Vec2 axis = b2Mul(xfA.q, m_localXAxisA); b2Color c1(0.7f, 0.7f, 0.7f); b2Color c2(0.3f, 0.9f, 0.3f); b2Color c3(0.9f, 0.3f, 0.3f); b2Color c4(0.3f, 0.3f, 0.9f); b2Color c5(0.4f, 0.4f, 0.4f); draw->DrawSegment(pA, pB, c5); if (m_enableLimit) { b2Vec2 lower = pA + m_lowerTranslation * axis; b2Vec2 upper = pA + m_upperTranslation * axis; b2Vec2 perp = b2Mul(xfA.q, m_localYAxisA); draw->DrawSegment(lower, upper, c1); draw->DrawSegment(lower - 0.5f * perp, lower + 0.5f * perp, c2); draw->DrawSegment(upper - 0.5f * perp, upper + 0.5f * perp, c3); } else { draw->DrawSegment(pA - 1.0f * axis, pA + 1.0f * axis, c1); } draw->DrawPoint(pA, 5.0f, c1); draw->DrawPoint(pB, 5.0f, c4); } ================================================ FILE: src/libraries/box2d/dynamics/b2_world.cpp ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #include "b2_contact_solver.h" #include "b2_island.h" #include "box2d/b2_body.h" #include "box2d/b2_broad_phase.h" #include "box2d/b2_chain_shape.h" #include "box2d/b2_circle_shape.h" #include "box2d/b2_collision.h" #include "box2d/b2_contact.h" #include "box2d/b2_draw.h" #include "box2d/b2_edge_shape.h" #include "box2d/b2_fixture.h" #include "box2d/b2_polygon_shape.h" #include "box2d/b2_pulley_joint.h" #include "box2d/b2_time_of_impact.h" #include "box2d/b2_timer.h" #include "box2d/b2_world.h" #include b2World::b2World(const b2Vec2& gravity) { m_destructionListener = nullptr; m_debugDraw = nullptr; m_bodyList = nullptr; m_jointList = nullptr; m_bodyCount = 0; m_jointCount = 0; m_warmStarting = true; m_continuousPhysics = true; m_subStepping = false; m_stepComplete = true; m_allowSleep = true; m_gravity = gravity; m_newContacts = false; m_locked = false; m_clearForces = true; m_inv_dt0 = 0.0f; m_contactManager.m_allocator = &m_blockAllocator; memset(&m_profile, 0, sizeof(b2Profile)); } b2World::~b2World() { // Some shapes allocate using b2Alloc. b2Body* b = m_bodyList; while (b) { b2Body* bNext = b->m_next; b2Fixture* f = b->m_fixtureList; while (f) { b2Fixture* fNext = f->m_next; f->m_proxyCount = 0; f->Destroy(&m_blockAllocator); f = fNext; } b = bNext; } } void b2World::SetDestructionListener(b2DestructionListener* listener) { m_destructionListener = listener; } void b2World::SetContactFilter(b2ContactFilter* filter) { m_contactManager.m_contactFilter = filter; } void b2World::SetContactListener(b2ContactListener* listener) { m_contactManager.m_contactListener = listener; } void b2World::SetDebugDraw(b2Draw* debugDraw) { m_debugDraw = debugDraw; } b2Body* b2World::CreateBody(const b2BodyDef* def) { b2Assert(IsLocked() == false); if (IsLocked()) { return nullptr; } void* mem = m_blockAllocator.Allocate(sizeof(b2Body)); b2Body* b = new (mem) b2Body(def, this); // Add to world doubly linked list. b->m_prev = nullptr; b->m_next = m_bodyList; if (m_bodyList) { m_bodyList->m_prev = b; } m_bodyList = b; ++m_bodyCount; return b; } void b2World::DestroyBody(b2Body* b) { b2Assert(m_bodyCount > 0); b2Assert(IsLocked() == false); if (IsLocked()) { return; } // Delete the attached joints. b2JointEdge* je = b->m_jointList; while (je) { b2JointEdge* je0 = je; je = je->next; if (m_destructionListener) { m_destructionListener->SayGoodbye(je0->joint); } DestroyJoint(je0->joint); b->m_jointList = je; } b->m_jointList = nullptr; // Delete the attached contacts. b2ContactEdge* ce = b->m_contactList; while (ce) { b2ContactEdge* ce0 = ce; ce = ce->next; m_contactManager.Destroy(ce0->contact); } b->m_contactList = nullptr; // Delete the attached fixtures. This destroys broad-phase proxies. b2Fixture* f = b->m_fixtureList; while (f) { b2Fixture* f0 = f; f = f->m_next; if (m_destructionListener) { m_destructionListener->SayGoodbye(f0); } f0->DestroyProxies(&m_contactManager.m_broadPhase); f0->Destroy(&m_blockAllocator); f0->~b2Fixture(); m_blockAllocator.Free(f0, sizeof(b2Fixture)); b->m_fixtureList = f; b->m_fixtureCount -= 1; } b->m_fixtureList = nullptr; b->m_fixtureCount = 0; // Remove world body list. if (b->m_prev) { b->m_prev->m_next = b->m_next; } if (b->m_next) { b->m_next->m_prev = b->m_prev; } if (b == m_bodyList) { m_bodyList = b->m_next; } --m_bodyCount; b->~b2Body(); m_blockAllocator.Free(b, sizeof(b2Body)); } b2Joint* b2World::CreateJoint(const b2JointDef* def) { b2Assert(IsLocked() == false); if (IsLocked()) { return nullptr; } b2Joint* j = b2Joint::Create(def, &m_blockAllocator); // Connect to the world list. j->m_prev = nullptr; j->m_next = m_jointList; if (m_jointList) { m_jointList->m_prev = j; } m_jointList = j; ++m_jointCount; // Connect to the bodies' doubly linked lists. j->m_edgeA.joint = j; j->m_edgeA.other = j->m_bodyB; j->m_edgeA.prev = nullptr; j->m_edgeA.next = j->m_bodyA->m_jointList; if (j->m_bodyA->m_jointList) j->m_bodyA->m_jointList->prev = &j->m_edgeA; j->m_bodyA->m_jointList = &j->m_edgeA; j->m_edgeB.joint = j; j->m_edgeB.other = j->m_bodyA; j->m_edgeB.prev = nullptr; j->m_edgeB.next = j->m_bodyB->m_jointList; if (j->m_bodyB->m_jointList) j->m_bodyB->m_jointList->prev = &j->m_edgeB; j->m_bodyB->m_jointList = &j->m_edgeB; b2Body* bodyA = def->bodyA; b2Body* bodyB = def->bodyB; // If the joint prevents collisions, then flag any contacts for filtering. if (def->collideConnected == false) { b2ContactEdge* edge = bodyB->GetContactList(); while (edge) { if (edge->other == bodyA) { // Flag the contact for filtering at the next time step (where either // body is awake). edge->contact->FlagForFiltering(); } edge = edge->next; } } // Note: creating a joint doesn't wake the bodies. return j; } void b2World::DestroyJoint(b2Joint* j) { b2Assert(IsLocked() == false); if (IsLocked()) { return; } bool collideConnected = j->m_collideConnected; // Remove from the doubly linked list. if (j->m_prev) { j->m_prev->m_next = j->m_next; } if (j->m_next) { j->m_next->m_prev = j->m_prev; } if (j == m_jointList) { m_jointList = j->m_next; } // Disconnect from island graph. b2Body* bodyA = j->m_bodyA; b2Body* bodyB = j->m_bodyB; // Wake up connected bodies. bodyA->SetAwake(true); bodyB->SetAwake(true); // Remove from body 1. if (j->m_edgeA.prev) { j->m_edgeA.prev->next = j->m_edgeA.next; } if (j->m_edgeA.next) { j->m_edgeA.next->prev = j->m_edgeA.prev; } if (&j->m_edgeA == bodyA->m_jointList) { bodyA->m_jointList = j->m_edgeA.next; } j->m_edgeA.prev = nullptr; j->m_edgeA.next = nullptr; // Remove from body 2 if (j->m_edgeB.prev) { j->m_edgeB.prev->next = j->m_edgeB.next; } if (j->m_edgeB.next) { j->m_edgeB.next->prev = j->m_edgeB.prev; } if (&j->m_edgeB == bodyB->m_jointList) { bodyB->m_jointList = j->m_edgeB.next; } j->m_edgeB.prev = nullptr; j->m_edgeB.next = nullptr; b2Joint::Destroy(j, &m_blockAllocator); b2Assert(m_jointCount > 0); --m_jointCount; // If the joint prevents collisions, then flag any contacts for filtering. if (collideConnected == false) { b2ContactEdge* edge = bodyB->GetContactList(); while (edge) { if (edge->other == bodyA) { // Flag the contact for filtering at the next time step (where either // body is awake). edge->contact->FlagForFiltering(); } edge = edge->next; } } } // void b2World::SetAllowSleeping(bool flag) { if (flag == m_allowSleep) { return; } m_allowSleep = flag; if (m_allowSleep == false) { for (b2Body* b = m_bodyList; b; b = b->m_next) { b->SetAwake(true); } } } // Find islands, integrate and solve constraints, solve position constraints void b2World::Solve(const b2TimeStep& step) { m_profile.solveInit = 0.0f; m_profile.solveVelocity = 0.0f; m_profile.solvePosition = 0.0f; // Size the island for the worst case. b2Island island(m_bodyCount, m_contactManager.m_contactCount, m_jointCount, &m_stackAllocator, m_contactManager.m_contactListener); // Clear all the island flags. for (b2Body* b = m_bodyList; b; b = b->m_next) { b->m_flags &= ~b2Body::e_islandFlag; } for (b2Contact* c = m_contactManager.m_contactList; c; c = c->m_next) { c->m_flags &= ~b2Contact::e_islandFlag; } for (b2Joint* j = m_jointList; j; j = j->m_next) { j->m_islandFlag = false; } // Build and simulate all awake islands. int32 stackSize = m_bodyCount; b2Body** stack = (b2Body**)m_stackAllocator.Allocate(stackSize * sizeof(b2Body*)); for (b2Body* seed = m_bodyList; seed; seed = seed->m_next) { if (seed->m_flags & b2Body::e_islandFlag) { continue; } if (seed->IsAwake() == false || seed->IsEnabled() == false) { continue; } // The seed can be dynamic or kinematic. if (seed->GetType() == b2_staticBody) { continue; } // Reset island and stack. island.Clear(); int32 stackCount = 0; stack[stackCount++] = seed; seed->m_flags |= b2Body::e_islandFlag; // Perform a depth first search (DFS) on the constraint graph. while (stackCount > 0) { // Grab the next body off the stack and add it to the island. b2Body* b = stack[--stackCount]; b2Assert(b->IsEnabled() == true); island.Add(b); // To keep islands as small as possible, we don't // propagate islands across static bodies. if (b->GetType() == b2_staticBody) { continue; } // Make sure the body is awake (without resetting sleep timer). b->m_flags |= b2Body::e_awakeFlag; // Search all contacts connected to this body. for (b2ContactEdge* ce = b->m_contactList; ce; ce = ce->next) { b2Contact* contact = ce->contact; // Has this contact already been added to an island? if (contact->m_flags & b2Contact::e_islandFlag) { continue; } // Is this contact solid and touching? if (contact->IsEnabled() == false || contact->IsTouching() == false) { continue; } // Skip sensors. bool sensorA = contact->m_fixtureA->m_isSensor; bool sensorB = contact->m_fixtureB->m_isSensor; if (sensorA || sensorB) { continue; } island.Add(contact); contact->m_flags |= b2Contact::e_islandFlag; b2Body* other = ce->other; // Was the other body already added to this island? if (other->m_flags & b2Body::e_islandFlag) { continue; } b2Assert(stackCount < stackSize); stack[stackCount++] = other; other->m_flags |= b2Body::e_islandFlag; } // Search all joints connect to this body. for (b2JointEdge* je = b->m_jointList; je; je = je->next) { if (je->joint->m_islandFlag == true) { continue; } b2Body* other = je->other; // Don't simulate joints connected to diabled bodies. if (other->IsEnabled() == false) { continue; } island.Add(je->joint); je->joint->m_islandFlag = true; if (other->m_flags & b2Body::e_islandFlag) { continue; } b2Assert(stackCount < stackSize); stack[stackCount++] = other; other->m_flags |= b2Body::e_islandFlag; } } b2Profile profile; island.Solve(&profile, step, m_gravity, m_allowSleep); m_profile.solveInit += profile.solveInit; m_profile.solveVelocity += profile.solveVelocity; m_profile.solvePosition += profile.solvePosition; // Post solve cleanup. for (int32 i = 0; i < island.m_bodyCount; ++i) { // Allow static bodies to participate in other islands. b2Body* b = island.m_bodies[i]; if (b->GetType() == b2_staticBody) { b->m_flags &= ~b2Body::e_islandFlag; } } } m_stackAllocator.Free(stack); { b2Timer timer; // Synchronize fixtures, check for out of range bodies. for (b2Body* b = m_bodyList; b; b = b->GetNext()) { // If a body was not in an island then it did not move. if ((b->m_flags & b2Body::e_islandFlag) == 0) { continue; } if (b->GetType() == b2_staticBody) { continue; } // Update fixtures (for broad-phase). b->SynchronizeFixtures(); } // Look for new contacts. m_contactManager.FindNewContacts(); m_profile.broadphase = timer.GetMilliseconds(); } } // Find TOI contacts and solve them. void b2World::SolveTOI(const b2TimeStep& step) { b2Island island(2 * b2_maxTOIContacts, b2_maxTOIContacts, 0, &m_stackAllocator, m_contactManager.m_contactListener); if (m_stepComplete) { for (b2Body* b = m_bodyList; b; b = b->m_next) { b->m_flags &= ~b2Body::e_islandFlag; b->m_sweep.alpha0 = 0.0f; } for (b2Contact* c = m_contactManager.m_contactList; c; c = c->m_next) { // Invalidate TOI c->m_flags &= ~(b2Contact::e_toiFlag | b2Contact::e_islandFlag); c->m_toiCount = 0; c->m_toi = 1.0f; } } // Find TOI events and solve them. for (;;) { // Find the first TOI. b2Contact* minContact = nullptr; float minAlpha = 1.0f; for (b2Contact* c = m_contactManager.m_contactList; c; c = c->m_next) { // Is this contact disabled? if (c->IsEnabled() == false) { continue; } // Prevent excessive sub-stepping. if (c->m_toiCount > b2_maxSubSteps) { continue; } float alpha = 1.0f; if (c->m_flags & b2Contact::e_toiFlag) { // This contact has a valid cached TOI. alpha = c->m_toi; } else { b2Fixture* fA = c->GetFixtureA(); b2Fixture* fB = c->GetFixtureB(); // Is there a sensor? if (fA->IsSensor() || fB->IsSensor()) { continue; } b2Body* bA = fA->GetBody(); b2Body* bB = fB->GetBody(); b2BodyType typeA = bA->m_type; b2BodyType typeB = bB->m_type; b2Assert(typeA == b2_dynamicBody || typeB == b2_dynamicBody); bool activeA = bA->IsAwake() && typeA != b2_staticBody; bool activeB = bB->IsAwake() && typeB != b2_staticBody; // Is at least one body active (awake and dynamic or kinematic)? if (activeA == false && activeB == false) { continue; } bool collideA = bA->IsBullet() || typeA != b2_dynamicBody; bool collideB = bB->IsBullet() || typeB != b2_dynamicBody; // Are these two non-bullet dynamic bodies? if (collideA == false && collideB == false) { continue; } // Compute the TOI for this contact. // Put the sweeps onto the same time interval. float alpha0 = bA->m_sweep.alpha0; if (bA->m_sweep.alpha0 < bB->m_sweep.alpha0) { alpha0 = bB->m_sweep.alpha0; bA->m_sweep.Advance(alpha0); } else if (bB->m_sweep.alpha0 < bA->m_sweep.alpha0) { alpha0 = bA->m_sweep.alpha0; bB->m_sweep.Advance(alpha0); } b2Assert(alpha0 < 1.0f); int32 indexA = c->GetChildIndexA(); int32 indexB = c->GetChildIndexB(); // Compute the time of impact in interval [0, minTOI] b2TOIInput input; input.proxyA.Set(fA->GetShape(), indexA); input.proxyB.Set(fB->GetShape(), indexB); input.sweepA = bA->m_sweep; input.sweepB = bB->m_sweep; input.tMax = 1.0f; b2TOIOutput output; b2TimeOfImpact(&output, &input); // Beta is the fraction of the remaining portion of the . float beta = output.t; if (output.state == b2TOIOutput::e_touching) { alpha = b2Min(alpha0 + (1.0f - alpha0) * beta, 1.0f); } else { alpha = 1.0f; } c->m_toi = alpha; c->m_flags |= b2Contact::e_toiFlag; } if (alpha < minAlpha) { // This is the minimum TOI found so far. minContact = c; minAlpha = alpha; } } if (minContact == nullptr || 1.0f - 10.0f * b2_epsilon < minAlpha) { // No more TOI events. Done! m_stepComplete = true; break; } // Advance the bodies to the TOI. b2Fixture* fA = minContact->GetFixtureA(); b2Fixture* fB = minContact->GetFixtureB(); b2Body* bA = fA->GetBody(); b2Body* bB = fB->GetBody(); b2Sweep backup1 = bA->m_sweep; b2Sweep backup2 = bB->m_sweep; bA->Advance(minAlpha); bB->Advance(minAlpha); // The TOI contact likely has some new contact points. minContact->Update(m_contactManager.m_contactListener); minContact->m_flags &= ~b2Contact::e_toiFlag; ++minContact->m_toiCount; // Is the contact solid? if (minContact->IsEnabled() == false || minContact->IsTouching() == false) { // Restore the sweeps. minContact->SetEnabled(false); bA->m_sweep = backup1; bB->m_sweep = backup2; bA->SynchronizeTransform(); bB->SynchronizeTransform(); continue; } bA->SetAwake(true); bB->SetAwake(true); // Build the island island.Clear(); island.Add(bA); island.Add(bB); island.Add(minContact); bA->m_flags |= b2Body::e_islandFlag; bB->m_flags |= b2Body::e_islandFlag; minContact->m_flags |= b2Contact::e_islandFlag; // Get contacts on bodyA and bodyB. b2Body* bodies[2] = {bA, bB}; for (int32 i = 0; i < 2; ++i) { b2Body* body = bodies[i]; if (body->m_type == b2_dynamicBody) { for (b2ContactEdge* ce = body->m_contactList; ce; ce = ce->next) { if (island.m_bodyCount == island.m_bodyCapacity) { break; } if (island.m_contactCount == island.m_contactCapacity) { break; } b2Contact* contact = ce->contact; // Has this contact already been added to the island? if (contact->m_flags & b2Contact::e_islandFlag) { continue; } // Only add static, kinematic, or bullet bodies. b2Body* other = ce->other; if (other->m_type == b2_dynamicBody && body->IsBullet() == false && other->IsBullet() == false) { continue; } // Skip sensors. bool sensorA = contact->m_fixtureA->m_isSensor; bool sensorB = contact->m_fixtureB->m_isSensor; if (sensorA || sensorB) { continue; } // Tentatively advance the body to the TOI. b2Sweep backup = other->m_sweep; if ((other->m_flags & b2Body::e_islandFlag) == 0) { other->Advance(minAlpha); } // Update the contact points contact->Update(m_contactManager.m_contactListener); // Was the contact disabled by the user? if (contact->IsEnabled() == false) { other->m_sweep = backup; other->SynchronizeTransform(); continue; } // Are there contact points? if (contact->IsTouching() == false) { other->m_sweep = backup; other->SynchronizeTransform(); continue; } // Add the contact to the island contact->m_flags |= b2Contact::e_islandFlag; island.Add(contact); // Has the other body already been added to the island? if (other->m_flags & b2Body::e_islandFlag) { continue; } // Add the other body to the island. other->m_flags |= b2Body::e_islandFlag; if (other->m_type != b2_staticBody) { other->SetAwake(true); } island.Add(other); } } } b2TimeStep subStep; subStep.dt = (1.0f - minAlpha) * step.dt; subStep.inv_dt = 1.0f / subStep.dt; subStep.dtRatio = 1.0f; subStep.positionIterations = 20; subStep.velocityIterations = step.velocityIterations; subStep.warmStarting = false; island.SolveTOI(subStep, bA->m_islandIndex, bB->m_islandIndex); // Reset island flags and synchronize broad-phase proxies. for (int32 i = 0; i < island.m_bodyCount; ++i) { b2Body* body = island.m_bodies[i]; body->m_flags &= ~b2Body::e_islandFlag; if (body->m_type != b2_dynamicBody) { continue; } body->SynchronizeFixtures(); // Invalidate all contact TOIs on this displaced body. for (b2ContactEdge* ce = body->m_contactList; ce; ce = ce->next) { ce->contact->m_flags &= ~(b2Contact::e_toiFlag | b2Contact::e_islandFlag); } } // Commit fixture proxy movements to the broad-phase so that new contacts are created. // Also, some contacts can be destroyed. m_contactManager.FindNewContacts(); if (m_subStepping) { m_stepComplete = false; break; } } } void b2World::Step(float dt, int32 velocityIterations, int32 positionIterations) { b2Timer stepTimer; // If new fixtures were added, we need to find the new contacts. if (m_newContacts) { m_contactManager.FindNewContacts(); m_newContacts = false; } m_locked = true; b2TimeStep step; step.dt = dt; step.velocityIterations = velocityIterations; step.positionIterations = positionIterations; if (dt > 0.0f) { step.inv_dt = 1.0f / dt; } else { step.inv_dt = 0.0f; } step.dtRatio = m_inv_dt0 * dt; step.warmStarting = m_warmStarting; // Update contacts. This is where some contacts are destroyed. { b2Timer timer; m_contactManager.Collide(); m_profile.collide = timer.GetMilliseconds(); } // Integrate velocities, solve velocity constraints, and integrate positions. if (m_stepComplete && step.dt > 0.0f) { b2Timer timer; Solve(step); m_profile.solve = timer.GetMilliseconds(); } // Handle TOI events. if (m_continuousPhysics && step.dt > 0.0f) { b2Timer timer; SolveTOI(step); m_profile.solveTOI = timer.GetMilliseconds(); } if (step.dt > 0.0f) { m_inv_dt0 = step.inv_dt; } if (m_clearForces) { ClearForces(); } m_locked = false; m_profile.step = stepTimer.GetMilliseconds(); } void b2World::ClearForces() { for (b2Body* body = m_bodyList; body; body = body->GetNext()) { body->m_force.SetZero(); body->m_torque = 0.0f; } } struct b2WorldQueryWrapper { bool QueryCallback(int32 proxyId) { b2FixtureProxy* proxy = (b2FixtureProxy*)broadPhase->GetUserData(proxyId); return callback->ReportFixture(proxy->fixture); } const b2BroadPhase* broadPhase; b2QueryCallback* callback; }; void b2World::QueryAABB(b2QueryCallback* callback, const b2AABB& aabb) const { b2WorldQueryWrapper wrapper; wrapper.broadPhase = &m_contactManager.m_broadPhase; wrapper.callback = callback; m_contactManager.m_broadPhase.Query(&wrapper, aabb); } struct b2WorldRayCastWrapper { float RayCastCallback(const b2RayCastInput& input, int32 proxyId) { void* userData = broadPhase->GetUserData(proxyId); b2FixtureProxy* proxy = (b2FixtureProxy*)userData; b2Fixture* fixture = proxy->fixture; int32 index = proxy->childIndex; b2RayCastOutput output; bool hit = fixture->RayCast(&output, input, index); if (hit) { float fraction = output.fraction; b2Vec2 point = (1.0f - fraction) * input.p1 + fraction * input.p2; return callback->ReportFixture(fixture, point, output.normal, fraction); } return input.maxFraction; } const b2BroadPhase* broadPhase; b2RayCastCallback* callback; }; void b2World::RayCast(b2RayCastCallback* callback, const b2Vec2& point1, const b2Vec2& point2) const { b2WorldRayCastWrapper wrapper; wrapper.broadPhase = &m_contactManager.m_broadPhase; wrapper.callback = callback; b2RayCastInput input; input.maxFraction = 1.0f; input.p1 = point1; input.p2 = point2; m_contactManager.m_broadPhase.RayCast(&wrapper, input); } void b2World::DrawShape(b2Fixture* fixture, const b2Transform& xf, const b2Color& color) { switch (fixture->GetType()) { case b2Shape::e_circle: { b2CircleShape* circle = (b2CircleShape*)fixture->GetShape(); b2Vec2 center = b2Mul(xf, circle->m_p); float radius = circle->m_radius; b2Vec2 axis = b2Mul(xf.q, b2Vec2(1.0f, 0.0f)); m_debugDraw->DrawSolidCircle(center, radius, axis, color); } break; case b2Shape::e_edge: { b2EdgeShape* edge = (b2EdgeShape*)fixture->GetShape(); b2Vec2 v1 = b2Mul(xf, edge->m_vertex1); b2Vec2 v2 = b2Mul(xf, edge->m_vertex2); m_debugDraw->DrawSegment(v1, v2, color); if (edge->m_oneSided == false) { m_debugDraw->DrawPoint(v1, 4.0f, color); m_debugDraw->DrawPoint(v2, 4.0f, color); } } break; case b2Shape::e_chain: { b2ChainShape* chain = (b2ChainShape*)fixture->GetShape(); int32 count = chain->m_count; const b2Vec2* vertices = chain->m_vertices; b2Vec2 v1 = b2Mul(xf, vertices[0]); for (int32 i = 1; i < count; ++i) { b2Vec2 v2 = b2Mul(xf, vertices[i]); m_debugDraw->DrawSegment(v1, v2, color); v1 = v2; } } break; case b2Shape::e_polygon: { b2PolygonShape* poly = (b2PolygonShape*)fixture->GetShape(); int32 vertexCount = poly->m_count; b2Assert(vertexCount <= b2_maxPolygonVertices); b2Vec2 vertices[b2_maxPolygonVertices]; for (int32 i = 0; i < vertexCount; ++i) { vertices[i] = b2Mul(xf, poly->m_vertices[i]); } m_debugDraw->DrawSolidPolygon(vertices, vertexCount, color); } break; default: break; } } void b2World::DebugDraw() { if (m_debugDraw == nullptr) { return; } uint32 flags = m_debugDraw->GetFlags(); if (flags & b2Draw::e_shapeBit) { for (b2Body* b = m_bodyList; b; b = b->GetNext()) { const b2Transform& xf = b->GetTransform(); for (b2Fixture* f = b->GetFixtureList(); f; f = f->GetNext()) { if (b->GetType() == b2_dynamicBody && b->m_mass == 0.0f) { // Bad body DrawShape(f, xf, b2Color(1.0f, 0.0f, 0.0f)); } else if (b->IsEnabled() == false) { DrawShape(f, xf, b2Color(0.5f, 0.5f, 0.3f)); } else if (b->GetType() == b2_staticBody) { DrawShape(f, xf, b2Color(0.5f, 0.9f, 0.5f)); } else if (b->GetType() == b2_kinematicBody) { DrawShape(f, xf, b2Color(0.5f, 0.5f, 0.9f)); } else if (b->IsAwake() == false) { DrawShape(f, xf, b2Color(0.6f, 0.6f, 0.6f)); } else { DrawShape(f, xf, b2Color(0.9f, 0.7f, 0.7f)); } } } } if (flags & b2Draw::e_jointBit) { for (b2Joint* j = m_jointList; j; j = j->GetNext()) { j->Draw(m_debugDraw); } } if (flags & b2Draw::e_pairBit) { b2Color color(0.3f, 0.9f, 0.9f); for (b2Contact* c = m_contactManager.m_contactList; c; c = c->GetNext()) { b2Fixture* fixtureA = c->GetFixtureA(); b2Fixture* fixtureB = c->GetFixtureB(); int32 indexA = c->GetChildIndexA(); int32 indexB = c->GetChildIndexB(); b2Vec2 cA = fixtureA->GetAABB(indexA).GetCenter(); b2Vec2 cB = fixtureB->GetAABB(indexB).GetCenter(); m_debugDraw->DrawSegment(cA, cB, color); } } if (flags & b2Draw::e_aabbBit) { b2Color color(0.9f, 0.3f, 0.9f); b2BroadPhase* bp = &m_contactManager.m_broadPhase; for (b2Body* b = m_bodyList; b; b = b->GetNext()) { if (b->IsEnabled() == false) { continue; } for (b2Fixture* f = b->GetFixtureList(); f; f = f->GetNext()) { for (int32 i = 0; i < f->m_proxyCount; ++i) { b2FixtureProxy* proxy = f->m_proxies + i; b2AABB aabb = bp->GetFatAABB(proxy->proxyId); b2Vec2 vs[4]; vs[0].Set(aabb.lowerBound.x, aabb.lowerBound.y); vs[1].Set(aabb.upperBound.x, aabb.lowerBound.y); vs[2].Set(aabb.upperBound.x, aabb.upperBound.y); vs[3].Set(aabb.lowerBound.x, aabb.upperBound.y); m_debugDraw->DrawPolygon(vs, 4, color); } } } } if (flags & b2Draw::e_centerOfMassBit) { for (b2Body* b = m_bodyList; b; b = b->GetNext()) { b2Transform xf = b->GetTransform(); xf.p = b->GetWorldCenter(); m_debugDraw->DrawTransform(xf); } } } int32 b2World::GetProxyCount() const { return m_contactManager.m_broadPhase.GetProxyCount(); } int32 b2World::GetTreeHeight() const { return m_contactManager.m_broadPhase.GetTreeHeight(); } int32 b2World::GetTreeBalance() const { return m_contactManager.m_broadPhase.GetTreeBalance(); } float b2World::GetTreeQuality() const { return m_contactManager.m_broadPhase.GetTreeQuality(); } void b2World::ShiftOrigin(const b2Vec2& newOrigin) { b2Assert(m_locked == false); if (m_locked) { return; } for (b2Body* b = m_bodyList; b; b = b->m_next) { b->m_xf.p -= newOrigin; b->m_sweep.c0 -= newOrigin; b->m_sweep.c -= newOrigin; } for (b2Joint* j = m_jointList; j; j = j->m_next) { j->ShiftOrigin(newOrigin); } m_contactManager.m_broadPhase.ShiftOrigin(newOrigin); } void b2World::Dump() { if (m_locked) { return; } b2OpenDump("box2d_dump.inl"); b2Dump("b2Vec2 g(%.9g, %.9g);\n", m_gravity.x, m_gravity.y); b2Dump("m_world->SetGravity(g);\n"); b2Dump("b2Body** bodies = (b2Body**)b2Alloc(%d * sizeof(b2Body*));\n", m_bodyCount); b2Dump("b2Joint** joints = (b2Joint**)b2Alloc(%d * sizeof(b2Joint*));\n", m_jointCount); int32 i = 0; for (b2Body* b = m_bodyList; b; b = b->m_next) { b->m_islandIndex = i; b->Dump(); ++i; } i = 0; for (b2Joint* j = m_jointList; j; j = j->m_next) { j->m_index = i; ++i; } // First pass on joints, skip gear joints. for (b2Joint* j = m_jointList; j; j = j->m_next) { if (j->m_type == e_gearJoint) { continue; } b2Dump("{\n"); j->Dump(); b2Dump("}\n"); } // Second pass on joints, only gear joints. for (b2Joint* j = m_jointList; j; j = j->m_next) { if (j->m_type != e_gearJoint) { continue; } b2Dump("{\n"); j->Dump(); b2Dump("}\n"); } b2Dump("b2Free(joints);\n"); b2Dump("b2Free(bodies);\n"); b2Dump("joints = nullptr;\n"); b2Dump("bodies = nullptr;\n"); b2CloseDump(); } ================================================ FILE: src/libraries/box2d/dynamics/b2_world_callbacks.cpp ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #include "box2d/b2_fixture.h" #include "box2d/b2_world_callbacks.h" // Return true if contact calculations should be performed between these two shapes. // If you implement your own collision filter you may want to build from this implementation. bool b2ContactFilter::ShouldCollide(b2Fixture* fixtureA, b2Fixture* fixtureB) { const b2Filter& filterA = fixtureA->GetFilterData(); const b2Filter& filterB = fixtureB->GetFilterData(); if (filterA.groupIndex == filterB.groupIndex && filterA.groupIndex != 0) { return filterA.groupIndex > 0; } bool collide = (filterA.maskBits & filterB.categoryBits) != 0 && (filterA.categoryBits & filterB.maskBits) != 0; return collide; } ================================================ FILE: src/libraries/box2d/rope/b2_rope.cpp ================================================ // MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #include "box2d/b2_draw.h" #include "box2d/b2_rope.h" #include struct b2RopeStretch { int32 i1, i2; float invMass1, invMass2; float L; float lambda; float spring; float damper; }; struct b2RopeBend { int32 i1, i2, i3; float invMass1, invMass2, invMass3; float invEffectiveMass; float lambda; float L1, L2; float alpha1, alpha2; float spring; float damper; }; b2Rope::b2Rope() { m_position.SetZero(); m_count = 0; m_stretchCount = 0; m_bendCount = 0; m_stretchConstraints = nullptr; m_bendConstraints = nullptr; m_bindPositions = nullptr; m_ps = nullptr; m_p0s = nullptr; m_vs = nullptr; m_invMasses = nullptr; m_gravity.SetZero(); } b2Rope::~b2Rope() { b2Free(m_stretchConstraints); b2Free(m_bendConstraints); b2Free(m_bindPositions); b2Free(m_ps); b2Free(m_p0s); b2Free(m_vs); b2Free(m_invMasses); } void b2Rope::Create(const b2RopeDef& def) { b2Assert(def.count >= 3); m_position = def.position; m_count = def.count; m_bindPositions = (b2Vec2*)b2Alloc(m_count * sizeof(b2Vec2)); m_ps = (b2Vec2*)b2Alloc(m_count * sizeof(b2Vec2)); m_p0s = (b2Vec2*)b2Alloc(m_count * sizeof(b2Vec2)); m_vs = (b2Vec2*)b2Alloc(m_count * sizeof(b2Vec2)); m_invMasses = (float*)b2Alloc(m_count * sizeof(float)); for (int32 i = 0; i < m_count; ++i) { m_bindPositions[i] = def.vertices[i]; m_ps[i] = def.vertices[i] + m_position; m_p0s[i] = def.vertices[i] + m_position; m_vs[i].SetZero(); float m = def.masses[i]; if (m > 0.0f) { m_invMasses[i] = 1.0f / m; } else { m_invMasses[i] = 0.0f; } } m_stretchCount = m_count - 1; m_bendCount = m_count - 2; m_stretchConstraints = (b2RopeStretch*)b2Alloc(m_stretchCount * sizeof(b2RopeStretch)); m_bendConstraints = (b2RopeBend*)b2Alloc(m_bendCount * sizeof(b2RopeBend)); for (int32 i = 0; i < m_stretchCount; ++i) { b2RopeStretch& c = m_stretchConstraints[i]; b2Vec2 p1 = m_ps[i]; b2Vec2 p2 = m_ps[i+1]; c.i1 = i; c.i2 = i + 1; c.L = b2Distance(p1, p2); c.invMass1 = m_invMasses[i]; c.invMass2 = m_invMasses[i + 1]; c.lambda = 0.0f; c.damper = 0.0f; c.spring = 0.0f; } for (int32 i = 0; i < m_bendCount; ++i) { b2RopeBend& c = m_bendConstraints[i]; b2Vec2 p1 = m_ps[i]; b2Vec2 p2 = m_ps[i + 1]; b2Vec2 p3 = m_ps[i + 2]; c.i1 = i; c.i2 = i + 1; c.i3 = i + 2; c.invMass1 = m_invMasses[i]; c.invMass2 = m_invMasses[i + 1]; c.invMass3 = m_invMasses[i + 2]; c.invEffectiveMass = 0.0f; c.L1 = b2Distance(p1, p2); c.L2 = b2Distance(p2, p3); c.lambda = 0.0f; // Pre-compute effective mass (TODO use flattened config) b2Vec2 e1 = p2 - p1; b2Vec2 e2 = p3 - p2; float L1sqr = e1.LengthSquared(); float L2sqr = e2.LengthSquared(); if (L1sqr * L2sqr == 0.0f) { continue; } b2Vec2 Jd1 = (-1.0f / L1sqr) * e1.Skew(); b2Vec2 Jd2 = (1.0f / L2sqr) * e2.Skew(); b2Vec2 J1 = -Jd1; b2Vec2 J2 = Jd1 - Jd2; b2Vec2 J3 = Jd2; c.invEffectiveMass = c.invMass1 * b2Dot(J1, J1) + c.invMass2 * b2Dot(J2, J2) + c.invMass3 * b2Dot(J3, J3); b2Vec2 r = p3 - p1; float rr = r.LengthSquared(); if (rr == 0.0f) { continue; } // a1 = h2 / (h1 + h2) // a2 = h1 / (h1 + h2) c.alpha1 = b2Dot(e2, r) / rr; c.alpha2 = b2Dot(e1, r) / rr; } m_gravity = def.gravity; SetTuning(def.tuning); } void b2Rope::SetTuning(const b2RopeTuning& tuning) { m_tuning = tuning; // Pre-compute spring and damper values based on tuning const float bendOmega = 2.0f * b2_pi * m_tuning.bendHertz; for (int32 i = 0; i < m_bendCount; ++i) { b2RopeBend& c = m_bendConstraints[i]; float L1sqr = c.L1 * c.L1; float L2sqr = c.L2 * c.L2; if (L1sqr * L2sqr == 0.0f) { c.spring = 0.0f; c.damper = 0.0f; continue; } // Flatten the triangle formed by the two edges float J2 = 1.0f / c.L1 + 1.0f / c.L2; float sum = c.invMass1 / L1sqr + c.invMass2 * J2 * J2 + c.invMass3 / L2sqr; if (sum == 0.0f) { c.spring = 0.0f; c.damper = 0.0f; continue; } float mass = 1.0f / sum; c.spring = mass * bendOmega * bendOmega; c.damper = 2.0f * mass * m_tuning.bendDamping * bendOmega; } const float stretchOmega = 2.0f * b2_pi * m_tuning.stretchHertz; for (int32 i = 0; i < m_stretchCount; ++i) { b2RopeStretch& c = m_stretchConstraints[i]; float sum = c.invMass1 + c.invMass2; if (sum == 0.0f) { continue; } float mass = 1.0f / sum; c.spring = mass * stretchOmega * stretchOmega; c.damper = 2.0f * mass * m_tuning.stretchDamping * stretchOmega; } } void b2Rope::Step(float dt, int32 iterations, const b2Vec2& position) { if (dt == 0.0) { return; } const float inv_dt = 1.0f / dt; float d = expf(- dt * m_tuning.damping); // Apply gravity and damping for (int32 i = 0; i < m_count; ++i) { if (m_invMasses[i] > 0.0f) { m_vs[i] *= d; m_vs[i] += dt * m_gravity; } else { m_vs[i] = inv_dt * (m_bindPositions[i] + position - m_p0s[i]); } } // Apply bending spring if (m_tuning.bendingModel == b2_springAngleBendingModel) { ApplyBendForces(dt); } for (int32 i = 0; i < m_bendCount; ++i) { m_bendConstraints[i].lambda = 0.0f; } for (int32 i = 0; i < m_stretchCount; ++i) { m_stretchConstraints[i].lambda = 0.0f; } // Update position for (int32 i = 0; i < m_count; ++i) { m_ps[i] += dt * m_vs[i]; } // Solve constraints for (int32 i = 0; i < iterations; ++i) { if (m_tuning.bendingModel == b2_pbdAngleBendingModel) { SolveBend_PBD_Angle(); } else if (m_tuning.bendingModel == b2_xpbdAngleBendingModel) { SolveBend_XPBD_Angle(dt); } else if (m_tuning.bendingModel == b2_pbdDistanceBendingModel) { SolveBend_PBD_Distance(); } else if (m_tuning.bendingModel == b2_pbdHeightBendingModel) { SolveBend_PBD_Height(); } else if (m_tuning.bendingModel == b2_pbdTriangleBendingModel) { SolveBend_PBD_Triangle(); } if (m_tuning.stretchingModel == b2_pbdStretchingModel) { SolveStretch_PBD(); } else if (m_tuning.stretchingModel == b2_xpbdStretchingModel) { SolveStretch_XPBD(dt); } } // Constrain velocity for (int32 i = 0; i < m_count; ++i) { m_vs[i] = inv_dt * (m_ps[i] - m_p0s[i]); m_p0s[i] = m_ps[i]; } } void b2Rope::Reset(const b2Vec2& position) { m_position = position; for (int32 i = 0; i < m_count; ++i) { m_ps[i] = m_bindPositions[i] + m_position; m_p0s[i] = m_bindPositions[i] + m_position; m_vs[i].SetZero(); } for (int32 i = 0; i < m_bendCount; ++i) { m_bendConstraints[i].lambda = 0.0f; } for (int32 i = 0; i < m_stretchCount; ++i) { m_stretchConstraints[i].lambda = 0.0f; } } void b2Rope::SolveStretch_PBD() { const float stiffness = m_tuning.stretchStiffness; for (int32 i = 0; i < m_stretchCount; ++i) { const b2RopeStretch& c = m_stretchConstraints[i]; b2Vec2 p1 = m_ps[c.i1]; b2Vec2 p2 = m_ps[c.i2]; b2Vec2 d = p2 - p1; float L = d.Normalize(); float sum = c.invMass1 + c.invMass2; if (sum == 0.0f) { continue; } float s1 = c.invMass1 / sum; float s2 = c.invMass2 / sum; p1 -= stiffness * s1 * (c.L - L) * d; p2 += stiffness * s2 * (c.L - L) * d; m_ps[c.i1] = p1; m_ps[c.i2] = p2; } } void b2Rope::SolveStretch_XPBD(float dt) { b2Assert(dt > 0.0f); for (int32 i = 0; i < m_stretchCount; ++i) { b2RopeStretch& c = m_stretchConstraints[i]; b2Vec2 p1 = m_ps[c.i1]; b2Vec2 p2 = m_ps[c.i2]; b2Vec2 dp1 = p1 - m_p0s[c.i1]; b2Vec2 dp2 = p2 - m_p0s[c.i2]; b2Vec2 u = p2 - p1; float L = u.Normalize(); b2Vec2 J1 = -u; b2Vec2 J2 = u; float sum = c.invMass1 + c.invMass2; if (sum == 0.0f) { continue; } const float alpha = 1.0f / (c.spring * dt * dt); // 1 / kg const float beta = dt * dt * c.damper; // kg * s const float sigma = alpha * beta / dt; // non-dimensional float C = L - c.L; // This is using the initial velocities float Cdot = b2Dot(J1, dp1) + b2Dot(J2, dp2); float B = C + alpha * c.lambda + sigma * Cdot; float sum2 = (1.0f + sigma) * sum + alpha; float impulse = -B / sum2; p1 += (c.invMass1 * impulse) * J1; p2 += (c.invMass2 * impulse) * J2; m_ps[c.i1] = p1; m_ps[c.i2] = p2; c.lambda += impulse; } } void b2Rope::SolveBend_PBD_Angle() { const float stiffness = m_tuning.bendStiffness; for (int32 i = 0; i < m_bendCount; ++i) { const b2RopeBend& c = m_bendConstraints[i]; b2Vec2 p1 = m_ps[c.i1]; b2Vec2 p2 = m_ps[c.i2]; b2Vec2 p3 = m_ps[c.i3]; b2Vec2 d1 = p2 - p1; b2Vec2 d2 = p3 - p2; float a = b2Cross(d1, d2); float b = b2Dot(d1, d2); float angle = b2Atan2(a, b); float L1sqr, L2sqr; if (m_tuning.isometric) { L1sqr = c.L1 * c.L1; L2sqr = c.L2 * c.L2; } else { L1sqr = d1.LengthSquared(); L2sqr = d2.LengthSquared(); } if (L1sqr * L2sqr == 0.0f) { continue; } b2Vec2 Jd1 = (-1.0f / L1sqr) * d1.Skew(); b2Vec2 Jd2 = (1.0f / L2sqr) * d2.Skew(); b2Vec2 J1 = -Jd1; b2Vec2 J2 = Jd1 - Jd2; b2Vec2 J3 = Jd2; float sum; if (m_tuning.fixedEffectiveMass) { sum = c.invEffectiveMass; } else { sum = c.invMass1 * b2Dot(J1, J1) + c.invMass2 * b2Dot(J2, J2) + c.invMass3 * b2Dot(J3, J3); } if (sum == 0.0f) { sum = c.invEffectiveMass; } float impulse = -stiffness * angle / sum; p1 += (c.invMass1 * impulse) * J1; p2 += (c.invMass2 * impulse) * J2; p3 += (c.invMass3 * impulse) * J3; m_ps[c.i1] = p1; m_ps[c.i2] = p2; m_ps[c.i3] = p3; } } void b2Rope::SolveBend_XPBD_Angle(float dt) { b2Assert(dt > 0.0f); for (int32 i = 0; i < m_bendCount; ++i) { b2RopeBend& c = m_bendConstraints[i]; b2Vec2 p1 = m_ps[c.i1]; b2Vec2 p2 = m_ps[c.i2]; b2Vec2 p3 = m_ps[c.i3]; b2Vec2 dp1 = p1 - m_p0s[c.i1]; b2Vec2 dp2 = p2 - m_p0s[c.i2]; b2Vec2 dp3 = p3 - m_p0s[c.i3]; b2Vec2 d1 = p2 - p1; b2Vec2 d2 = p3 - p2; float L1sqr, L2sqr; if (m_tuning.isometric) { L1sqr = c.L1 * c.L1; L2sqr = c.L2 * c.L2; } else { L1sqr = d1.LengthSquared(); L2sqr = d2.LengthSquared(); } if (L1sqr * L2sqr == 0.0f) { continue; } float a = b2Cross(d1, d2); float b = b2Dot(d1, d2); float angle = b2Atan2(a, b); b2Vec2 Jd1 = (-1.0f / L1sqr) * d1.Skew(); b2Vec2 Jd2 = (1.0f / L2sqr) * d2.Skew(); b2Vec2 J1 = -Jd1; b2Vec2 J2 = Jd1 - Jd2; b2Vec2 J3 = Jd2; float sum; if (m_tuning.fixedEffectiveMass) { sum = c.invEffectiveMass; } else { sum = c.invMass1 * b2Dot(J1, J1) + c.invMass2 * b2Dot(J2, J2) + c.invMass3 * b2Dot(J3, J3); } if (sum == 0.0f) { continue; } const float alpha = 1.0f / (c.spring * dt * dt); const float beta = dt * dt * c.damper; const float sigma = alpha * beta / dt; float C = angle; // This is using the initial velocities float Cdot = b2Dot(J1, dp1) + b2Dot(J2, dp2) + b2Dot(J3, dp3); float B = C + alpha * c.lambda + sigma * Cdot; float sum2 = (1.0f + sigma) * sum + alpha; float impulse = -B / sum2; p1 += (c.invMass1 * impulse) * J1; p2 += (c.invMass2 * impulse) * J2; p3 += (c.invMass3 * impulse) * J3; m_ps[c.i1] = p1; m_ps[c.i2] = p2; m_ps[c.i3] = p3; c.lambda += impulse; } } void b2Rope::ApplyBendForces(float dt) { // omega = 2 * pi * hz const float omega = 2.0f * b2_pi * m_tuning.bendHertz; for (int32 i = 0; i < m_bendCount; ++i) { const b2RopeBend& c = m_bendConstraints[i]; b2Vec2 p1 = m_ps[c.i1]; b2Vec2 p2 = m_ps[c.i2]; b2Vec2 p3 = m_ps[c.i3]; b2Vec2 v1 = m_vs[c.i1]; b2Vec2 v2 = m_vs[c.i2]; b2Vec2 v3 = m_vs[c.i3]; b2Vec2 d1 = p2 - p1; b2Vec2 d2 = p3 - p2; float L1sqr, L2sqr; if (m_tuning.isometric) { L1sqr = c.L1 * c.L1; L2sqr = c.L2 * c.L2; } else { L1sqr = d1.LengthSquared(); L2sqr = d2.LengthSquared(); } if (L1sqr * L2sqr == 0.0f) { continue; } float a = b2Cross(d1, d2); float b = b2Dot(d1, d2); float angle = b2Atan2(a, b); b2Vec2 Jd1 = (-1.0f / L1sqr) * d1.Skew(); b2Vec2 Jd2 = (1.0f / L2sqr) * d2.Skew(); b2Vec2 J1 = -Jd1; b2Vec2 J2 = Jd1 - Jd2; b2Vec2 J3 = Jd2; float sum; if (m_tuning.fixedEffectiveMass) { sum = c.invEffectiveMass; } else { sum = c.invMass1 * b2Dot(J1, J1) + c.invMass2 * b2Dot(J2, J2) + c.invMass3 * b2Dot(J3, J3); } if (sum == 0.0f) { continue; } float mass = 1.0f / sum; const float spring = mass * omega * omega; const float damper = 2.0f * mass * m_tuning.bendDamping * omega; float C = angle; float Cdot = b2Dot(J1, v1) + b2Dot(J2, v2) + b2Dot(J3, v3); float impulse = -dt * (spring * C + damper * Cdot); m_vs[c.i1] += (c.invMass1 * impulse) * J1; m_vs[c.i2] += (c.invMass2 * impulse) * J2; m_vs[c.i3] += (c.invMass3 * impulse) * J3; } } void b2Rope::SolveBend_PBD_Distance() { const float stiffness = m_tuning.bendStiffness; for (int32 i = 0; i < m_bendCount; ++i) { const b2RopeBend& c = m_bendConstraints[i]; int32 i1 = c.i1; int32 i2 = c.i3; b2Vec2 p1 = m_ps[i1]; b2Vec2 p2 = m_ps[i2]; b2Vec2 d = p2 - p1; float L = d.Normalize(); float sum = c.invMass1 + c.invMass3; if (sum == 0.0f) { continue; } float s1 = c.invMass1 / sum; float s2 = c.invMass3 / sum; p1 -= stiffness * s1 * (c.L1 + c.L2 - L) * d; p2 += stiffness * s2 * (c.L1 + c.L2 - L) * d; m_ps[i1] = p1; m_ps[i2] = p2; } } // Constraint based implementation of: // P. Volino: Simple Linear Bending Stiffness in Particle Systems void b2Rope::SolveBend_PBD_Height() { const float stiffness = m_tuning.bendStiffness; for (int32 i = 0; i < m_bendCount; ++i) { const b2RopeBend& c = m_bendConstraints[i]; b2Vec2 p1 = m_ps[c.i1]; b2Vec2 p2 = m_ps[c.i2]; b2Vec2 p3 = m_ps[c.i3]; // Barycentric coordinates are held constant b2Vec2 d = c.alpha1 * p1 + c.alpha2 * p3 - p2; float dLen = d.Length(); if (dLen == 0.0f) { continue; } b2Vec2 dHat = (1.0f / dLen) * d; b2Vec2 J1 = c.alpha1 * dHat; b2Vec2 J2 = -dHat; b2Vec2 J3 = c.alpha2 * dHat; float sum = c.invMass1 * c.alpha1 * c.alpha1 + c.invMass2 + c.invMass3 * c.alpha2 * c.alpha2; if (sum == 0.0f) { continue; } float C = dLen; float mass = 1.0f / sum; float impulse = -stiffness * mass * C; p1 += (c.invMass1 * impulse) * J1; p2 += (c.invMass2 * impulse) * J2; p3 += (c.invMass3 * impulse) * J3; m_ps[c.i1] = p1; m_ps[c.i2] = p2; m_ps[c.i3] = p3; } } // M. Kelager: A Triangle Bending Constraint Model for PBD void b2Rope::SolveBend_PBD_Triangle() { const float stiffness = m_tuning.bendStiffness; for (int32 i = 0; i < m_bendCount; ++i) { const b2RopeBend& c = m_bendConstraints[i]; b2Vec2 b0 = m_ps[c.i1]; b2Vec2 v = m_ps[c.i2]; b2Vec2 b1 = m_ps[c.i3]; float wb0 = c.invMass1; float wv = c.invMass2; float wb1 = c.invMass3; float W = wb0 + wb1 + 2.0f * wv; float invW = stiffness / W; b2Vec2 d = v - (1.0f / 3.0f) * (b0 + v + b1); b2Vec2 db0 = 2.0f * wb0 * invW * d; b2Vec2 dv = -4.0f * wv * invW * d; b2Vec2 db1 = 2.0f * wb1 * invW * d; b0 += db0; v += dv; b1 += db1; m_ps[c.i1] = b0; m_ps[c.i2] = v; m_ps[c.i3] = b1; } } void b2Rope::Draw(b2Draw* draw) const { b2Color c(0.4f, 0.5f, 0.7f); b2Color pg(0.1f, 0.8f, 0.1f); b2Color pd(0.7f, 0.2f, 0.4f); for (int32 i = 0; i < m_count - 1; ++i) { draw->DrawSegment(m_ps[i], m_ps[i+1], c); const b2Color& pc = m_invMasses[i] > 0.0f ? pd : pg; draw->DrawPoint(m_ps[i], 5.0f, pc); } const b2Color& pc = m_invMasses[m_count - 1] > 0.0f ? pd : pg; draw->DrawPoint(m_ps[m_count - 1], 5.0f, pc); } ================================================ FILE: src/libraries/ddsparse/ddsinfo.h ================================================ /** * Simple DDS data parser for compressed 2D textures. * * Copyright (c) 2013-2024 Sasha Szpakowski * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. * * * Enums and structs copied from Microsoft. * http://msdn.microsoft.com/en-us/library/bb943991.aspx **/ #ifndef DDS_INFO_H #define DDS_INFO_H #include namespace dds { namespace dxinfo { enum DDPF { DDPF_ALPHAPIXELS = 0x000001, DDPF_ALPHA = 0x000002, DDPF_FOURCC = 0x000004, DDPF_RGB = 0x000040, DDPF_YUV = 0x000200, DDPF_LUMINANCE = 0x020000, DDPF_BUMPDUDV = 0x080000, }; enum D3D10ResourceDimension { D3D10_RESOURCE_DIMENSION_UNKNOWN = 0, D3D10_RESOURCE_DIMENSION_BUFFER = 1, D3D10_RESOURCE_DIMENSION_TEXTURE1D = 2, D3D10_RESOURCE_DIMENSION_TEXTURE2D = 3, D3D10_RESOURCE_DIMENSION_TEXTURE3D = 4 }; enum DXGIFormat { DXGI_FORMAT_UNKNOWN = 0, DXGI_FORMAT_R32G32B32A32_TYPELESS = 1, DXGI_FORMAT_R32G32B32A32_FLOAT = 2, DXGI_FORMAT_R32G32B32A32_UINT = 3, DXGI_FORMAT_R32G32B32A32_SINT = 4, DXGI_FORMAT_R32G32B32_TYPELESS = 5, DXGI_FORMAT_R32G32B32_FLOAT = 6, DXGI_FORMAT_R32G32B32_UINT = 7, DXGI_FORMAT_R32G32B32_SINT = 8, DXGI_FORMAT_R16G16B16A16_TYPELESS = 9, DXGI_FORMAT_R16G16B16A16_FLOAT = 10, DXGI_FORMAT_R16G16B16A16_UNORM = 11, DXGI_FORMAT_R16G16B16A16_UINT = 12, DXGI_FORMAT_R16G16B16A16_SNORM = 13, DXGI_FORMAT_R16G16B16A16_SINT = 14, DXGI_FORMAT_R32G32_TYPELESS = 15, DXGI_FORMAT_R32G32_FLOAT = 16, DXGI_FORMAT_R32G32_UINT = 17, DXGI_FORMAT_R32G32_SINT = 18, DXGI_FORMAT_R32G8X24_TYPELESS = 19, DXGI_FORMAT_D32_FLOAT_S8X24_UINT = 20, DXGI_FORMAT_R32_FLOAT_X8X24_TYPELESS = 21, DXGI_FORMAT_X32_TYPELESS_G8X24_UINT = 22, DXGI_FORMAT_R10G10B10A2_TYPELESS = 23, DXGI_FORMAT_R10G10B10A2_UNORM = 24, DXGI_FORMAT_R10G10B10A2_UINT = 25, DXGI_FORMAT_R11G11B10_FLOAT = 26, DXGI_FORMAT_R8G8B8A8_TYPELESS = 27, DXGI_FORMAT_R8G8B8A8_UNORM = 28, DXGI_FORMAT_R8G8B8A8_UNORM_SRGB = 29, DXGI_FORMAT_R8G8B8A8_UINT = 30, DXGI_FORMAT_R8G8B8A8_SNORM = 31, DXGI_FORMAT_R8G8B8A8_SINT = 32, DXGI_FORMAT_R16G16_TYPELESS = 33, DXGI_FORMAT_R16G16_FLOAT = 34, DXGI_FORMAT_R16G16_UNORM = 35, DXGI_FORMAT_R16G16_UINT = 36, DXGI_FORMAT_R16G16_SNORM = 37, DXGI_FORMAT_R16G16_SINT = 38, DXGI_FORMAT_R32_TYPELESS = 39, DXGI_FORMAT_D32_FLOAT = 40, DXGI_FORMAT_R32_FLOAT = 41, DXGI_FORMAT_R32_UINT = 42, DXGI_FORMAT_R32_SINT = 43, DXGI_FORMAT_R24G8_TYPELESS = 44, DXGI_FORMAT_D24_UNORM_S8_UINT = 45, DXGI_FORMAT_R24_UNORM_X8_TYPELESS = 46, DXGI_FORMAT_X24_TYPELESS_G8_UINT = 47, DXGI_FORMAT_R8G8_TYPELESS = 48, DXGI_FORMAT_R8G8_UNORM = 49, DXGI_FORMAT_R8G8_UINT = 50, DXGI_FORMAT_R8G8_SNORM = 51, DXGI_FORMAT_R8G8_SINT = 52, DXGI_FORMAT_R16_TYPELESS = 53, DXGI_FORMAT_R16_FLOAT = 54, DXGI_FORMAT_D16_UNORM = 55, DXGI_FORMAT_R16_UNORM = 56, DXGI_FORMAT_R16_UINT = 57, DXGI_FORMAT_R16_SNORM = 58, DXGI_FORMAT_R16_SINT = 59, DXGI_FORMAT_R8_TYPELESS = 60, DXGI_FORMAT_R8_UNORM = 61, DXGI_FORMAT_R8_UINT = 62, DXGI_FORMAT_R8_SNORM = 63, DXGI_FORMAT_R8_SINT = 64, DXGI_FORMAT_A8_UNORM = 65, DXGI_FORMAT_R1_UNORM = 66, DXGI_FORMAT_R9G9B9E5_SHAREDEXP = 67, DXGI_FORMAT_R8G8_B8G8_UNORM = 68, DXGI_FORMAT_G8R8_G8B8_UNORM = 69, DXGI_FORMAT_BC1_TYPELESS = 70, DXGI_FORMAT_BC1_UNORM = 71, DXGI_FORMAT_BC1_UNORM_SRGB = 72, DXGI_FORMAT_BC2_TYPELESS = 73, DXGI_FORMAT_BC2_UNORM = 74, DXGI_FORMAT_BC2_UNORM_SRGB = 75, DXGI_FORMAT_BC3_TYPELESS = 76, DXGI_FORMAT_BC3_UNORM = 77, DXGI_FORMAT_BC3_UNORM_SRGB = 78, DXGI_FORMAT_BC4_TYPELESS = 79, DXGI_FORMAT_BC4_UNORM = 80, DXGI_FORMAT_BC4_SNORM = 81, DXGI_FORMAT_BC5_TYPELESS = 82, DXGI_FORMAT_BC5_UNORM = 83, DXGI_FORMAT_BC5_SNORM = 84, DXGI_FORMAT_B5G6R5_UNORM = 85, DXGI_FORMAT_B5G5R5A1_UNORM = 86, DXGI_FORMAT_B8G8R8A8_UNORM = 87, DXGI_FORMAT_B8G8R8X8_UNORM = 88, DXGI_FORMAT_R10G10B10_XR_BIAS_A2_UNORM = 89, DXGI_FORMAT_B8G8R8A8_TYPELESS = 90, DXGI_FORMAT_B8G8R8A8_UNORM_SRGB = 91, DXGI_FORMAT_B8G8R8X8_TYPELESS = 92, DXGI_FORMAT_B8G8R8X8_UNORM_SRGB = 93, DXGI_FORMAT_BC6H_TYPELESS = 94, DXGI_FORMAT_BC6H_UF16 = 95, DXGI_FORMAT_BC6H_SF16 = 96, DXGI_FORMAT_BC7_TYPELESS = 97, DXGI_FORMAT_BC7_UNORM = 98, DXGI_FORMAT_BC7_UNORM_SRGB = 99, DXGI_FORMAT_FORCE_UINT = 0xffffffffUL }; struct DDSPixelFormat { uint32_t size; uint32_t flags; uint32_t fourCC; uint32_t rgbBitCount; uint32_t rBitMask; uint32_t gBitMask; uint32_t bBitMask; uint32_t aBitMask; }; struct DDSHeader { uint32_t size; uint32_t flags; uint32_t height; uint32_t width; uint32_t pitchOrLinearSize; uint32_t depth; uint32_t mipMapCount; uint32_t reserved[11]; DDSPixelFormat format; uint32_t caps1; uint32_t caps2; uint32_t caps3; uint32_t caps4; uint32_t reserved2; }; struct DDSHeader10 { DXGIFormat dxgiFormat; D3D10ResourceDimension resourceDimension; uint32_t miscFlag; uint32_t arraySize; uint32_t reserved; }; } // dxinfo } // dds #endif // DDS_INFO_H ================================================ FILE: src/libraries/ddsparse/ddsparse.cpp ================================================ /** * Simple DDS data parser for compressed 2D textures. * * Copyright (c) 2013-2024 Sasha Szpakowski * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ #include "ddsparse.h" #include "ddsinfo.h" #include namespace dds { using namespace dds::dxinfo; // Creates a packed uint representation of a FourCC code. #define MakeFourCC(a, b, c, d) ((uint32_t) (((d)<<24) | ((c)<<16) | ((b)<<8) | (a))) #define ISBITMASK(r,g,b,a) (ddpf.rBitMask == r && ddpf.gBitMask == g && ddpf.bBitMask == b && ddpf.aBitMask == a) // Function adapted from DirectXTex: // https://github.com/microsoft/DirectXTex/blob/master/DDSTextureLoader/DDSTextureLoader.cpp#L623 static DXGIFormat getDXGIFormat(const DDSPixelFormat& ddpf) { if (ddpf.flags & DDPF_RGB) { // Note that sRGB formats are written using the "DX10" extended header switch (ddpf.rgbBitCount) { case 32: if (ISBITMASK(0x000000ff, 0x0000ff00, 0x00ff0000, 0xff000000)) return DXGI_FORMAT_R8G8B8A8_UNORM; if (ISBITMASK(0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000)) return DXGI_FORMAT_B8G8R8A8_UNORM; if (ISBITMASK(0x00ff0000, 0x0000ff00, 0x000000ff, 0x00000000)) return DXGI_FORMAT_B8G8R8X8_UNORM; // No DXGI format maps to ISBITMASK(0x000000ff,0x0000ff00,0x00ff0000,0x00000000) aka D3DFMT_X8B8G8R8 // Note that many common DDS reader/writers (including D3DX) swap the // the RED/BLUE masks for 10:10:10:2 formats. We assume // below that the 'backwards' header mask is being used since it is most // likely written by D3DX. The more robust solution is to use the 'DX10' // header extension and specify the DXGI_FORMAT_R10G10B10A2_UNORM format directly // For 'correct' writers, this should be 0x000003ff,0x000ffc00,0x3ff00000 for RGB data if (ISBITMASK(0x3ff00000, 0x000ffc00, 0x000003ff, 0xc0000000)) return DXGI_FORMAT_R10G10B10A2_UNORM; // No DXGI format maps to ISBITMASK(0x000003ff,0x000ffc00,0x3ff00000,0xc0000000) aka D3DFMT_A2R10G10B10 if (ISBITMASK(0x0000ffff, 0xffff0000, 0x00000000, 0x00000000)) return DXGI_FORMAT_R16G16_UNORM; if (ISBITMASK(0xffffffff, 0x00000000, 0x00000000, 0x00000000)) // Only 32-bit color channel format in D3D9 was R32F return DXGI_FORMAT_R32_FLOAT; // D3DX writes this out as a FourCC of 114 break; case 24: // No 24bpp DXGI formats aka D3DFMT_R8G8B8 break; case 16: if (ISBITMASK(0x7c00, 0x03e0, 0x001f, 0x8000)) return DXGI_FORMAT_B5G5R5A1_UNORM; if (ISBITMASK(0xf800, 0x07e0, 0x001f, 0x0000)) return DXGI_FORMAT_B5G6R5_UNORM; // No DXGI format maps to ISBITMASK(0x7c00,0x03e0,0x001f,0x0000) aka D3DFMT_X1R5G5B5 // No DXGI format maps to ISBITMASK(0x0f00,0x00f0,0x000f,0x0000) aka D3DFMT_X4R4G4B4 // No 3:3:2, 3:3:2:8, or paletted DXGI formats aka D3DFMT_A8R3G3B2, D3DFMT_R3G3B2, D3DFMT_P8, D3DFMT_A8P8, etc. break; } } else if (ddpf.flags & DDPF_LUMINANCE) { if (ddpf.rgbBitCount == 8) { if (ISBITMASK(0x000000ff, 0x00000000, 0x00000000, 0x00000000)) return DXGI_FORMAT_R8_UNORM; // D3DX10/11 writes this out as DX10 extension // No DXGI format maps to ISBITMASK(0x0f,0x00,0x00,0xf0) aka D3DFMT_A4L4 if (ISBITMASK(0x000000ff, 0x00000000, 0x00000000, 0x0000ff00)) return DXGI_FORMAT_R8G8_UNORM; // Some DDS writers assume the bitcount should be 8 instead of 16 } if (ddpf.rgbBitCount == 16) { if (ISBITMASK(0x0000ffff, 0x00000000, 0x00000000, 0x00000000)) return DXGI_FORMAT_R16_UNORM; // D3DX10/11 writes this out as DX10 extension if (ISBITMASK(0x000000ff, 0x00000000, 0x00000000, 0x0000ff00)) return DXGI_FORMAT_R8G8_UNORM; // D3DX10/11 writes this out as DX10 extension } } else if (ddpf.flags & DDPF_ALPHA) { if (ddpf.rgbBitCount == 8) return DXGI_FORMAT_A8_UNORM; } else if (ddpf.flags & DDPF_BUMPDUDV) { if (ddpf.rgbBitCount == 16) { if (ISBITMASK(0x00ff, 0xff00, 0x0000, 0x0000)) return DXGI_FORMAT_R8G8_SNORM; // D3DX10/11 writes this out as DX10 extension } if (ddpf.rgbBitCount == 32) { if (ISBITMASK(0x000000ff, 0x0000ff00, 0x00ff0000, 0xff000000)) return DXGI_FORMAT_R8G8B8A8_SNORM; // D3DX10/11 writes this out as DX10 extension if (ISBITMASK(0x0000ffff, 0xffff0000, 0x00000000, 0x00000000)) return DXGI_FORMAT_R16G16_SNORM; // D3DX10/11 writes this out as DX10 extension // No DXGI format maps to ISBITMASK(0x3ff00000, 0x000ffc00, 0x000003ff, 0xc0000000) aka D3DFMT_A2W10V10U10 } } else if (ddpf.flags & DDPF_FOURCC) { switch (ddpf.fourCC) { case MakeFourCC('D','X','T','1'): return DXGI_FORMAT_BC1_UNORM; case MakeFourCC('D','X','T','3'): return DXGI_FORMAT_BC2_UNORM; case MakeFourCC('D','X','T','5'): return DXGI_FORMAT_BC3_UNORM; // While pre-multiplied alpha isn't directly supported by the DXGI formats, // they are basically the same as these BC formats so they can be mapped case MakeFourCC('D','X','T','2'): return DXGI_FORMAT_BC2_UNORM; case MakeFourCC('D','X','T','4'): return DXGI_FORMAT_BC3_UNORM; case MakeFourCC('A','T','I','1'): return DXGI_FORMAT_BC4_UNORM; case MakeFourCC('B','C','4','U'): return DXGI_FORMAT_BC4_UNORM; case MakeFourCC('B','C','4','S'): return DXGI_FORMAT_BC4_SNORM; case MakeFourCC('A','T','I','2'): return DXGI_FORMAT_BC5_UNORM; case MakeFourCC('B','C','5','U'): return DXGI_FORMAT_BC5_UNORM; case MakeFourCC('B','C','5','S'): return DXGI_FORMAT_BC5_SNORM; // BC6H and BC7 are written using the "DX10" extended header case MakeFourCC('R','G','B','G'): return DXGI_FORMAT_R8G8_B8G8_UNORM; case MakeFourCC('G','R','G','B'): return DXGI_FORMAT_G8R8_G8B8_UNORM; // Check for D3DFORMAT enums being set here case 36: // D3DFMT_A16B16G16R16 return DXGI_FORMAT_R16G16B16A16_UNORM; case 110: // D3DFMT_Q16W16V16U16 return DXGI_FORMAT_R16G16B16A16_SNORM; case 111: // D3DFMT_R16F return DXGI_FORMAT_R16_FLOAT; case 112: // D3DFMT_G16R16F return DXGI_FORMAT_R16G16_FLOAT; case 113: // D3DFMT_A16B16G16R16F return DXGI_FORMAT_R16G16B16A16_FLOAT; case 114: // D3DFMT_R32F return DXGI_FORMAT_R32_FLOAT; case 115: // D3DFMT_G32R32F return DXGI_FORMAT_R32G32_FLOAT; case 116: // D3DFMT_A32B32G32R32F return DXGI_FORMAT_R32G32B32A32_FLOAT; } } return DXGI_FORMAT_UNKNOWN; } static size_t getBitsPerPixel(DXGIFormat fmt) { switch (fmt) { case DXGI_FORMAT_R32G32B32A32_TYPELESS: case DXGI_FORMAT_R32G32B32A32_FLOAT: case DXGI_FORMAT_R32G32B32A32_UINT: case DXGI_FORMAT_R32G32B32A32_SINT: return 128; case DXGI_FORMAT_R32G32B32_TYPELESS: case DXGI_FORMAT_R32G32B32_FLOAT: case DXGI_FORMAT_R32G32B32_UINT: case DXGI_FORMAT_R32G32B32_SINT: return 96; case DXGI_FORMAT_R16G16B16A16_TYPELESS: case DXGI_FORMAT_R16G16B16A16_FLOAT: case DXGI_FORMAT_R16G16B16A16_UNORM: case DXGI_FORMAT_R16G16B16A16_UINT: case DXGI_FORMAT_R16G16B16A16_SNORM: case DXGI_FORMAT_R16G16B16A16_SINT: case DXGI_FORMAT_R32G32_TYPELESS: case DXGI_FORMAT_R32G32_FLOAT: case DXGI_FORMAT_R32G32_UINT: case DXGI_FORMAT_R32G32_SINT: case DXGI_FORMAT_R32G8X24_TYPELESS: case DXGI_FORMAT_D32_FLOAT_S8X24_UINT: case DXGI_FORMAT_R32_FLOAT_X8X24_TYPELESS: case DXGI_FORMAT_X32_TYPELESS_G8X24_UINT: return 64; case DXGI_FORMAT_R10G10B10A2_TYPELESS: case DXGI_FORMAT_R10G10B10A2_UNORM: case DXGI_FORMAT_R10G10B10A2_UINT: case DXGI_FORMAT_R11G11B10_FLOAT: case DXGI_FORMAT_R8G8B8A8_TYPELESS: case DXGI_FORMAT_R8G8B8A8_UNORM: case DXGI_FORMAT_R8G8B8A8_UNORM_SRGB: case DXGI_FORMAT_R8G8B8A8_UINT: case DXGI_FORMAT_R8G8B8A8_SNORM: case DXGI_FORMAT_R8G8B8A8_SINT: case DXGI_FORMAT_R16G16_TYPELESS: case DXGI_FORMAT_R16G16_FLOAT: case DXGI_FORMAT_R16G16_UNORM: case DXGI_FORMAT_R16G16_UINT: case DXGI_FORMAT_R16G16_SNORM: case DXGI_FORMAT_R16G16_SINT: case DXGI_FORMAT_R32_TYPELESS: case DXGI_FORMAT_D32_FLOAT: case DXGI_FORMAT_R32_FLOAT: case DXGI_FORMAT_R32_UINT: case DXGI_FORMAT_R32_SINT: case DXGI_FORMAT_R24G8_TYPELESS: case DXGI_FORMAT_D24_UNORM_S8_UINT: case DXGI_FORMAT_R24_UNORM_X8_TYPELESS: case DXGI_FORMAT_X24_TYPELESS_G8_UINT: case DXGI_FORMAT_R9G9B9E5_SHAREDEXP: case DXGI_FORMAT_R8G8_B8G8_UNORM: case DXGI_FORMAT_G8R8_G8B8_UNORM: case DXGI_FORMAT_B8G8R8A8_UNORM: case DXGI_FORMAT_B8G8R8X8_UNORM: case DXGI_FORMAT_R10G10B10_XR_BIAS_A2_UNORM: case DXGI_FORMAT_B8G8R8A8_TYPELESS: case DXGI_FORMAT_B8G8R8A8_UNORM_SRGB: case DXGI_FORMAT_B8G8R8X8_TYPELESS: case DXGI_FORMAT_B8G8R8X8_UNORM_SRGB: return 32; case DXGI_FORMAT_R8G8_TYPELESS: case DXGI_FORMAT_R8G8_UNORM: case DXGI_FORMAT_R8G8_UINT: case DXGI_FORMAT_R8G8_SNORM: case DXGI_FORMAT_R8G8_SINT: case DXGI_FORMAT_R16_TYPELESS: case DXGI_FORMAT_R16_FLOAT: case DXGI_FORMAT_D16_UNORM: case DXGI_FORMAT_R16_UNORM: case DXGI_FORMAT_R16_UINT: case DXGI_FORMAT_R16_SNORM: case DXGI_FORMAT_R16_SINT: case DXGI_FORMAT_B5G6R5_UNORM: case DXGI_FORMAT_B5G5R5A1_UNORM: return 16; case DXGI_FORMAT_R8_TYPELESS: case DXGI_FORMAT_R8_UNORM: case DXGI_FORMAT_R8_UINT: case DXGI_FORMAT_R8_SNORM: case DXGI_FORMAT_R8_SINT: case DXGI_FORMAT_A8_UNORM: return 8; case DXGI_FORMAT_R1_UNORM: return 1; case DXGI_FORMAT_BC1_TYPELESS: case DXGI_FORMAT_BC1_UNORM: case DXGI_FORMAT_BC1_UNORM_SRGB: case DXGI_FORMAT_BC4_TYPELESS: case DXGI_FORMAT_BC4_UNORM: case DXGI_FORMAT_BC4_SNORM: return 4; case DXGI_FORMAT_BC2_TYPELESS: case DXGI_FORMAT_BC2_UNORM: case DXGI_FORMAT_BC2_UNORM_SRGB: case DXGI_FORMAT_BC3_TYPELESS: case DXGI_FORMAT_BC3_UNORM: case DXGI_FORMAT_BC3_UNORM_SRGB: case DXGI_FORMAT_BC5_TYPELESS: case DXGI_FORMAT_BC5_UNORM: case DXGI_FORMAT_BC5_SNORM: case DXGI_FORMAT_BC6H_TYPELESS: case DXGI_FORMAT_BC6H_UF16: case DXGI_FORMAT_BC6H_SF16: case DXGI_FORMAT_BC7_TYPELESS: case DXGI_FORMAT_BC7_UNORM: case DXGI_FORMAT_BC7_UNORM_SRGB: return 8; default: return 0; } } static bool isBlockCompressed(DXGIFormat fmt) { switch (fmt) { case DXGI_FORMAT_BC1_TYPELESS: case DXGI_FORMAT_BC1_UNORM: case DXGI_FORMAT_BC1_UNORM_SRGB: case DXGI_FORMAT_BC4_TYPELESS: case DXGI_FORMAT_BC4_UNORM: case DXGI_FORMAT_BC4_SNORM: case DXGI_FORMAT_BC2_TYPELESS: case DXGI_FORMAT_BC2_UNORM: case DXGI_FORMAT_BC2_UNORM_SRGB: case DXGI_FORMAT_BC3_TYPELESS: case DXGI_FORMAT_BC3_UNORM: case DXGI_FORMAT_BC3_UNORM_SRGB: case DXGI_FORMAT_BC5_TYPELESS: case DXGI_FORMAT_BC5_UNORM: case DXGI_FORMAT_BC5_SNORM: case DXGI_FORMAT_BC6H_TYPELESS: case DXGI_FORMAT_BC6H_UF16: case DXGI_FORMAT_BC6H_SF16: case DXGI_FORMAT_BC7_TYPELESS: case DXGI_FORMAT_BC7_UNORM: case DXGI_FORMAT_BC7_UNORM_SRGB: return true; default: return false; } } bool isDDS(const void *data, size_t dataSize) { const uint8_t *readData = (const uint8_t *) data; ptrdiff_t offset = 0; // Is the data large enough to hold the DDS header? if(dataSize < sizeof(uint32_t) + sizeof(DDSHeader)) return false; // All DDS files start with "DDS ". if((*(uint32_t *) readData) != MakeFourCC('D','D','S',' ')) return false; offset += sizeof(uint32_t); DDSHeader *header = (DDSHeader *) &readData[offset]; // Verify header to validate DDS data. if (header->size != sizeof(DDSHeader) || header->format.size != sizeof(DDSPixelFormat)) return false; offset += sizeof(DDSHeader); // Check for DX10 extension. if ((header->format.flags & DDPF_FOURCC) && (header->format.fourCC == MakeFourCC('D','X','1','0'))) { // Data must be big enough for both headers plus the magic value. if (dataSize < (sizeof(uint32_t) + sizeof(DDSHeader) + sizeof(DDSHeader10))) return false; } return true; } DXGIFormat getDDSPixelFormat(const void *data, size_t dataSize) { if (!isDDS(data, dataSize)) return DXGI_FORMAT_UNKNOWN; const uint8_t *readData = (const uint8_t *) data; ptrdiff_t offset = sizeof(uint32_t); DDSHeader *header = (DDSHeader *) &readData[offset]; offset += sizeof(DDSHeader); // Check for DX10 extension. if ((header->format.flags & DDPF_FOURCC) && (header->format.fourCC == MakeFourCC('D','X','1','0'))) { DDSHeader10 *header10 = (DDSHeader10 *) &readData[offset]; return header10->dxgiFormat; } return getDXGIFormat(header->format); } bool isCompressedDDS(const void *data, size_t dataSize) { DXGIFormat format = getDDSPixelFormat(data, dataSize); return format != DXGI_FORMAT_UNKNOWN && isBlockCompressed(format); } Parser::Parser(const void *data, size_t dataSize) : format(DXGI_FORMAT_UNKNOWN) { parseData(data, dataSize); } Parser::Parser(const Parser &other) : texData(other.texData) , format(other.format) { } Parser::Parser() : format(DXGI_FORMAT_UNKNOWN) { } Parser &Parser::operator = (const Parser &other) { texData = other.texData; format = other.format; return *this; } Parser::~Parser() { } DXGIFormat Parser::getFormat() const { return format; } const Image *Parser::getImageData(size_t miplevel) const { if (miplevel >= texData.size()) return 0; return &texData[miplevel]; } size_t Parser::getMipmapCount() const { return texData.size(); } size_t Parser::parseImageSize(DXGIFormat fmt, int width, int height) const { size_t bytes = 0; size_t bytesPerBlock = 0; bool packed = false; bool blockCompressed = false; switch (fmt) { case DXGI_FORMAT_BC1_TYPELESS: case DXGI_FORMAT_BC1_UNORM: case DXGI_FORMAT_BC1_UNORM_SRGB: case DXGI_FORMAT_BC4_TYPELESS: case DXGI_FORMAT_BC4_UNORM: case DXGI_FORMAT_BC4_SNORM: blockCompressed = true; bytesPerBlock = 8; break; case DXGI_FORMAT_BC2_TYPELESS: case DXGI_FORMAT_BC2_UNORM: case DXGI_FORMAT_BC2_UNORM_SRGB: case DXGI_FORMAT_BC3_TYPELESS: case DXGI_FORMAT_BC3_UNORM: case DXGI_FORMAT_BC3_UNORM_SRGB: case DXGI_FORMAT_BC5_TYPELESS: case DXGI_FORMAT_BC5_UNORM: case DXGI_FORMAT_BC5_SNORM: case DXGI_FORMAT_BC6H_TYPELESS: case DXGI_FORMAT_BC6H_UF16: case DXGI_FORMAT_BC6H_SF16: case DXGI_FORMAT_BC7_TYPELESS: case DXGI_FORMAT_BC7_UNORM: case DXGI_FORMAT_BC7_UNORM_SRGB: blockCompressed = true; bytesPerBlock = 16; break; case DXGI_FORMAT_R8G8_B8G8_UNORM: case DXGI_FORMAT_G8R8_G8B8_UNORM: packed = true; bytesPerBlock = 4; break; default: break; } if (packed) { size_t rowBytes = (((size_t) width + 1u) >> 1) * bytesPerBlock; bytes = rowBytes * height; } else if (blockCompressed) { size_t numBlocksWide = width > 0 ? std::max(1, (width + 3) / 4) : 0; size_t numBlocksHigh = height > 0 ? std::max(1, (height + 3) / 4) : 0; bytes = numBlocksWide * bytesPerBlock * numBlocksHigh; } else { size_t bpp = getBitsPerPixel(fmt); if (bpp == 0) return 0; // Round up to the nearest byte. size_t rowBytes = ((size_t) width * bpp + 7u) / 8u; bytes = rowBytes * height; } return bytes; } bool Parser::parseTexData(const uint8_t *data, size_t dataSize, DXGIFormat fmt, int w, int h, int nb_mips) { size_t offset = 0; std::vector newTexData; for (int i = 0; i < nb_mips; i++) { Image img; img.width = w; img.height = h; img.dataSize = parseImageSize(fmt, img.width, img.height); // Make sure the data size is valid. if (img.dataSize == 0 || (offset + img.dataSize) > dataSize) return false; // Store the memory address of the data representing this mip level. img.data = &data[offset]; newTexData.push_back(img); // Move to the next mip level. offset += img.dataSize; w = std::max(w / 2, 1); h = std::max(h / 2, 1); } texData = newTexData; return true; } bool Parser::parseData(const void *data, size_t dataSize) { if (!isDDS(data, dataSize)) return false; const uint8_t *readData = (const uint8_t *) data; ptrdiff_t offset = sizeof(uint32_t); DDSHeader *header = (DDSHeader *) &readData[offset]; offset += sizeof(DDSHeader); // Check for DX10 extension. if ((header->format.flags & DDPF_FOURCC) && (header->format.fourCC == MakeFourCC('D','X','1','0'))) { DDSHeader10 *header10 = (DDSHeader10 *) &readData[offset]; offset += sizeof(DDSHeader10); // We can't deal with 1D/3D textures. switch (header10->resourceDimension) { case D3D10_RESOURCE_DIMENSION_TEXTURE2D: case D3D10_RESOURCE_DIMENSION_UNKNOWN: break; default: return false; } // We also can't deal with texture arrays and cubemaps. if (header10->arraySize > 1) return false; format = header10->dxgiFormat; } else format = getDXGIFormat(header->format); if (format == DXGI_FORMAT_UNKNOWN) return false; int w = header->width; int h = header->height; int nb_mips = std::max((int) header->mipMapCount, 1); return parseTexData(&readData[offset], dataSize - offset, format, w, h, nb_mips); } } // dds ================================================ FILE: src/libraries/ddsparse/ddsparse.h ================================================ /** * Simple DDS data parser for compressed 2D textures. * * Copyright (c) 2013-2024 Sasha Szpakowski * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ #ifndef DDS_PARSE_H #define DDS_PARSE_H #include #include #include #include "ddsinfo.h" namespace dds { // Represents a single mipmap level of a texture. struct Image { int width = 0; int height = 0; size_t dataSize = 0; const uint8_t *data = nullptr; }; /** * Determines whether the input byte data represents a valid DDS file. * Does not take into account whether the texture format is supported. * * @param data The byte data to parse. * @param dataSize The size in bytes of the data. **/ bool isDDS(const void *data, size_t dataSize); /** * Determines whether the input byte data represents a valid compressed DDS * file. Takes into account texture format, but not type (3D textures, etc.) * * @param data The byte data to parse. * @param dataSize The size in bytes of the data. **/ bool isCompressedDDS(const void *data, size_t dataSize); dxinfo::DXGIFormat getDDSPixelFormat(const void *data, size_t dataSize); class Parser { public: /** * Constructor. * Attempts to parse byte data as a compressed DDS file. * * @param data The byte data to parse. * @param dataSize The size in bytes of the data. **/ Parser(const void *data, size_t dataSize); Parser(const Parser &other); Parser(); Parser &operator = (const Parser &other); ~Parser(); /** * Gets the format of this texture. **/ dxinfo::DXGIFormat getFormat() const; /** * Gets the data of this texture at a mipmap level. Mipmap level 0 * represents the base image. * * @param miplevel The mipmap level to get the data of. * @return Pointer to the image data, or NULL if miplevel is not within the * range of [0, numMipmaps). **/ const Image *getImageData(size_t miplevel = 0) const; /** * Gets the number of mipmap levels in this texture. * Includes the base mip level. **/ size_t getMipmapCount() const; private: size_t parseImageSize(dxinfo::DXGIFormat fmt, int width, int height) const; bool parseTexData(const uint8_t *data, size_t dataSize, dxinfo::DXGIFormat fmt, int w, int h, int nb_mips); bool parseData(const void *data, size_t dataSize); std::vector texData; dxinfo::DXGIFormat format; }; // Parser } // dds #endif // DDS_PARSE_H ================================================ FILE: src/libraries/dr/dr_flac.h ================================================ /* FLAC audio decoder. Choice of public domain or MIT-0. See license statements at the end of this file. dr_flac - v0.12.38 - 2022-04-10 David Reid - mackron@gmail.com GitHub: https://github.com/mackron/dr_libs */ /* RELEASE NOTES - v0.12.0 ======================= Version 0.12.0 has breaking API changes including changes to the existing API and the removal of deprecated APIs. Improved Client-Defined Memory Allocation ----------------------------------------- The main change with this release is the addition of a more flexible way of implementing custom memory allocation routines. The existing system of DRFLAC_MALLOC, DRFLAC_REALLOC and DRFLAC_FREE are still in place and will be used by default when no custom allocation callbacks are specified. To use the new system, you pass in a pointer to a drflac_allocation_callbacks object to drflac_open() and family, like this: void* my_malloc(size_t sz, void* pUserData) { return malloc(sz); } void* my_realloc(void* p, size_t sz, void* pUserData) { return realloc(p, sz); } void my_free(void* p, void* pUserData) { free(p); } ... drflac_allocation_callbacks allocationCallbacks; allocationCallbacks.pUserData = &myData; allocationCallbacks.onMalloc = my_malloc; allocationCallbacks.onRealloc = my_realloc; allocationCallbacks.onFree = my_free; drflac* pFlac = drflac_open_file("my_file.flac", &allocationCallbacks); The advantage of this new system is that it allows you to specify user data which will be passed in to the allocation routines. Passing in null for the allocation callbacks object will cause dr_flac to use defaults which is the same as DRFLAC_MALLOC, DRFLAC_REALLOC and DRFLAC_FREE and the equivalent of how it worked in previous versions. Every API that opens a drflac object now takes this extra parameter. These include the following: drflac_open() drflac_open_relaxed() drflac_open_with_metadata() drflac_open_with_metadata_relaxed() drflac_open_file() drflac_open_file_with_metadata() drflac_open_memory() drflac_open_memory_with_metadata() drflac_open_and_read_pcm_frames_s32() drflac_open_and_read_pcm_frames_s16() drflac_open_and_read_pcm_frames_f32() drflac_open_file_and_read_pcm_frames_s32() drflac_open_file_and_read_pcm_frames_s16() drflac_open_file_and_read_pcm_frames_f32() drflac_open_memory_and_read_pcm_frames_s32() drflac_open_memory_and_read_pcm_frames_s16() drflac_open_memory_and_read_pcm_frames_f32() Optimizations ------------- Seeking performance has been greatly improved. A new binary search based seeking algorithm has been introduced which significantly improves performance over the brute force method which was used when no seek table was present. Seek table based seeking also takes advantage of the new binary search seeking system to further improve performance there as well. Note that this depends on CRC which means it will be disabled when DR_FLAC_NO_CRC is used. The SSE4.1 pipeline has been cleaned up and optimized. You should see some improvements with decoding speed of 24-bit files in particular. 16-bit streams should also see some improvement. drflac_read_pcm_frames_s16() has been optimized. Previously this sat on top of drflac_read_pcm_frames_s32() and performed it's s32 to s16 conversion in a second pass. This is now all done in a single pass. This includes SSE2 and ARM NEON optimized paths. A minor optimization has been implemented for drflac_read_pcm_frames_s32(). This will now use an SSE2 optimized pipeline for stereo channel reconstruction which is the last part of the decoding process. The ARM build has seen a few improvements. The CLZ (count leading zeroes) and REV (byte swap) instructions are now used when compiling with GCC and Clang which is achieved using inline assembly. The CLZ instruction requires ARM architecture version 5 at compile time and the REV instruction requires ARM architecture version 6. An ARM NEON optimized pipeline has been implemented. To enable this you'll need to add -mfpu=neon to the command line when compiling. Removed APIs ------------ The following APIs were deprecated in version 0.11.0 and have been completely removed in version 0.12.0: drflac_read_s32() -> drflac_read_pcm_frames_s32() drflac_read_s16() -> drflac_read_pcm_frames_s16() drflac_read_f32() -> drflac_read_pcm_frames_f32() drflac_seek_to_sample() -> drflac_seek_to_pcm_frame() drflac_open_and_decode_s32() -> drflac_open_and_read_pcm_frames_s32() drflac_open_and_decode_s16() -> drflac_open_and_read_pcm_frames_s16() drflac_open_and_decode_f32() -> drflac_open_and_read_pcm_frames_f32() drflac_open_and_decode_file_s32() -> drflac_open_file_and_read_pcm_frames_s32() drflac_open_and_decode_file_s16() -> drflac_open_file_and_read_pcm_frames_s16() drflac_open_and_decode_file_f32() -> drflac_open_file_and_read_pcm_frames_f32() drflac_open_and_decode_memory_s32() -> drflac_open_memory_and_read_pcm_frames_s32() drflac_open_and_decode_memory_s16() -> drflac_open_memory_and_read_pcm_frames_s16() drflac_open_and_decode_memory_f32() -> drflac_open_memroy_and_read_pcm_frames_f32() Prior versions of dr_flac operated on a per-sample basis whereas now it operates on PCM frames. The removed APIs all relate to the old per-sample APIs. You now need to use the "pcm_frame" versions. */ /* Introduction ============ dr_flac is a single file library. To use it, do something like the following in one .c file. ```c #define DR_FLAC_IMPLEMENTATION #include "dr_flac.h" ``` You can then #include this file in other parts of the program as you would with any other header file. To decode audio data, do something like the following: ```c drflac* pFlac = drflac_open_file("MySong.flac", NULL); if (pFlac == NULL) { // Failed to open FLAC file } drflac_int32* pSamples = malloc(pFlac->totalPCMFrameCount * pFlac->channels * sizeof(drflac_int32)); drflac_uint64 numberOfInterleavedSamplesActuallyRead = drflac_read_pcm_frames_s32(pFlac, pFlac->totalPCMFrameCount, pSamples); ``` The drflac object represents the decoder. It is a transparent type so all the information you need, such as the number of channels and the bits per sample, should be directly accessible - just make sure you don't change their values. Samples are always output as interleaved signed 32-bit PCM. In the example above a native FLAC stream was opened, however dr_flac has seamless support for Ogg encapsulated FLAC streams as well. You do not need to decode the entire stream in one go - you just specify how many samples you'd like at any given time and the decoder will give you as many samples as it can, up to the amount requested. Later on when you need the next batch of samples, just call it again. Example: ```c while (drflac_read_pcm_frames_s32(pFlac, chunkSizeInPCMFrames, pChunkSamples) > 0) { do_something(); } ``` You can seek to a specific PCM frame with `drflac_seek_to_pcm_frame()`. If you just want to quickly decode an entire FLAC file in one go you can do something like this: ```c unsigned int channels; unsigned int sampleRate; drflac_uint64 totalPCMFrameCount; drflac_int32* pSampleData = drflac_open_file_and_read_pcm_frames_s32("MySong.flac", &channels, &sampleRate, &totalPCMFrameCount, NULL); if (pSampleData == NULL) { // Failed to open and decode FLAC file. } ... drflac_free(pSampleData, NULL); ``` You can read samples as signed 16-bit integer and 32-bit floating-point PCM with the *_s16() and *_f32() family of APIs respectively, but note that these should be considered lossy. If you need access to metadata (album art, etc.), use `drflac_open_with_metadata()`, `drflac_open_file_with_metdata()` or `drflac_open_memory_with_metadata()`. The rationale for keeping these APIs separate is that they're slightly slower than the normal versions and also just a little bit harder to use. dr_flac reports metadata to the application through the use of a callback, and every metadata block is reported before `drflac_open_with_metdata()` returns. The main opening APIs (`drflac_open()`, etc.) will fail if the header is not present. The presents a problem in certain scenarios such as broadcast style streams or internet radio where the header may not be present because the user has started playback mid-stream. To handle this, use the relaxed APIs: `drflac_open_relaxed()` `drflac_open_with_metadata_relaxed()` It is not recommended to use these APIs for file based streams because a missing header would usually indicate a corrupt or perverse file. In addition, these APIs can take a long time to initialize because they may need to spend a lot of time finding the first frame. Build Options ============= #define these options before including this file. #define DR_FLAC_NO_STDIO Disable `drflac_open_file()` and family. #define DR_FLAC_NO_OGG Disables support for Ogg/FLAC streams. #define DR_FLAC_BUFFER_SIZE Defines the size of the internal buffer to store data from onRead(). This buffer is used to reduce the number of calls back to the client for more data. Larger values means more memory, but better performance. My tests show diminishing returns after about 4KB (which is the default). Consider reducing this if you have a very efficient implementation of onRead(), or increase it if it's very inefficient. Must be a multiple of 8. #define DR_FLAC_NO_CRC Disables CRC checks. This will offer a performance boost when CRC is unnecessary. This will disable binary search seeking. When seeking, the seek table will be used if available. Otherwise the seek will be performed using brute force. #define DR_FLAC_NO_SIMD Disables SIMD optimizations (SSE on x86/x64 architectures, NEON on ARM architectures). Use this if you are having compatibility issues with your compiler. Notes ===== - dr_flac does not support changing the sample rate nor channel count mid stream. - dr_flac is not thread-safe, but its APIs can be called from any thread so long as you do your own synchronization. - When using Ogg encapsulation, a corrupted metadata block will result in `drflac_open_with_metadata()` and `drflac_open()` returning inconsistent samples due to differences in corrupted stream recorvery logic between the two APIs. */ #ifndef dr_flac_h #define dr_flac_h #ifdef __cplusplus extern "C" { #endif #define DRFLAC_STRINGIFY(x) #x #define DRFLAC_XSTRINGIFY(x) DRFLAC_STRINGIFY(x) #define DRFLAC_VERSION_MAJOR 0 #define DRFLAC_VERSION_MINOR 12 #define DRFLAC_VERSION_REVISION 38 #define DRFLAC_VERSION_STRING DRFLAC_XSTRINGIFY(DRFLAC_VERSION_MAJOR) "." DRFLAC_XSTRINGIFY(DRFLAC_VERSION_MINOR) "." DRFLAC_XSTRINGIFY(DRFLAC_VERSION_REVISION) #include /* For size_t. */ /* Sized types. */ typedef signed char drflac_int8; typedef unsigned char drflac_uint8; typedef signed short drflac_int16; typedef unsigned short drflac_uint16; typedef signed int drflac_int32; typedef unsigned int drflac_uint32; #if defined(_MSC_VER) && !defined(__clang__) typedef signed __int64 drflac_int64; typedef unsigned __int64 drflac_uint64; #else #if defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wlong-long" #if defined(__clang__) #pragma GCC diagnostic ignored "-Wc++11-long-long" #endif #endif typedef signed long long drflac_int64; typedef unsigned long long drflac_uint64; #if defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))) #pragma GCC diagnostic pop #endif #endif #if defined(__LP64__) || defined(_WIN64) || (defined(__x86_64__) && !defined(__ILP32__)) || defined(_M_X64) || defined(__ia64) || defined(_M_IA64) || defined(__aarch64__) || defined(_M_ARM64) || defined(__powerpc64__) typedef drflac_uint64 drflac_uintptr; #else typedef drflac_uint32 drflac_uintptr; #endif typedef drflac_uint8 drflac_bool8; typedef drflac_uint32 drflac_bool32; #define DRFLAC_TRUE 1 #define DRFLAC_FALSE 0 #if !defined(DRFLAC_API) #if defined(DRFLAC_DLL) #if defined(_WIN32) #define DRFLAC_DLL_IMPORT __declspec(dllimport) #define DRFLAC_DLL_EXPORT __declspec(dllexport) #define DRFLAC_DLL_PRIVATE static #else #if defined(__GNUC__) && __GNUC__ >= 4 #define DRFLAC_DLL_IMPORT __attribute__((visibility("default"))) #define DRFLAC_DLL_EXPORT __attribute__((visibility("default"))) #define DRFLAC_DLL_PRIVATE __attribute__((visibility("hidden"))) #else #define DRFLAC_DLL_IMPORT #define DRFLAC_DLL_EXPORT #define DRFLAC_DLL_PRIVATE static #endif #endif #if defined(DR_FLAC_IMPLEMENTATION) || defined(DRFLAC_IMPLEMENTATION) #define DRFLAC_API DRFLAC_DLL_EXPORT #else #define DRFLAC_API DRFLAC_DLL_IMPORT #endif #define DRFLAC_PRIVATE DRFLAC_DLL_PRIVATE #else #define DRFLAC_API extern #define DRFLAC_PRIVATE static #endif #endif #if defined(_MSC_VER) && _MSC_VER >= 1700 /* Visual Studio 2012 */ #define DRFLAC_DEPRECATED __declspec(deprecated) #elif (defined(__GNUC__) && __GNUC__ >= 4) /* GCC 4 */ #define DRFLAC_DEPRECATED __attribute__((deprecated)) #elif defined(__has_feature) /* Clang */ #if __has_feature(attribute_deprecated) #define DRFLAC_DEPRECATED __attribute__((deprecated)) #else #define DRFLAC_DEPRECATED #endif #else #define DRFLAC_DEPRECATED #endif DRFLAC_API void drflac_version(drflac_uint32* pMajor, drflac_uint32* pMinor, drflac_uint32* pRevision); DRFLAC_API const char* drflac_version_string(void); /* As data is read from the client it is placed into an internal buffer for fast access. This controls the size of that buffer. Larger values means more speed, but also more memory. In my testing there is diminishing returns after about 4KB, but you can fiddle with this to suit your own needs. Must be a multiple of 8. */ #ifndef DR_FLAC_BUFFER_SIZE #define DR_FLAC_BUFFER_SIZE 4096 #endif /* Check if we can enable 64-bit optimizations. */ #if defined(_WIN64) || defined(_LP64) || defined(__LP64__) #define DRFLAC_64BIT #endif #ifdef DRFLAC_64BIT typedef drflac_uint64 drflac_cache_t; #else typedef drflac_uint32 drflac_cache_t; #endif /* The various metadata block types. */ #define DRFLAC_METADATA_BLOCK_TYPE_STREAMINFO 0 #define DRFLAC_METADATA_BLOCK_TYPE_PADDING 1 #define DRFLAC_METADATA_BLOCK_TYPE_APPLICATION 2 #define DRFLAC_METADATA_BLOCK_TYPE_SEEKTABLE 3 #define DRFLAC_METADATA_BLOCK_TYPE_VORBIS_COMMENT 4 #define DRFLAC_METADATA_BLOCK_TYPE_CUESHEET 5 #define DRFLAC_METADATA_BLOCK_TYPE_PICTURE 6 #define DRFLAC_METADATA_BLOCK_TYPE_INVALID 127 /* The various picture types specified in the PICTURE block. */ #define DRFLAC_PICTURE_TYPE_OTHER 0 #define DRFLAC_PICTURE_TYPE_FILE_ICON 1 #define DRFLAC_PICTURE_TYPE_OTHER_FILE_ICON 2 #define DRFLAC_PICTURE_TYPE_COVER_FRONT 3 #define DRFLAC_PICTURE_TYPE_COVER_BACK 4 #define DRFLAC_PICTURE_TYPE_LEAFLET_PAGE 5 #define DRFLAC_PICTURE_TYPE_MEDIA 6 #define DRFLAC_PICTURE_TYPE_LEAD_ARTIST 7 #define DRFLAC_PICTURE_TYPE_ARTIST 8 #define DRFLAC_PICTURE_TYPE_CONDUCTOR 9 #define DRFLAC_PICTURE_TYPE_BAND 10 #define DRFLAC_PICTURE_TYPE_COMPOSER 11 #define DRFLAC_PICTURE_TYPE_LYRICIST 12 #define DRFLAC_PICTURE_TYPE_RECORDING_LOCATION 13 #define DRFLAC_PICTURE_TYPE_DURING_RECORDING 14 #define DRFLAC_PICTURE_TYPE_DURING_PERFORMANCE 15 #define DRFLAC_PICTURE_TYPE_SCREEN_CAPTURE 16 #define DRFLAC_PICTURE_TYPE_BRIGHT_COLORED_FISH 17 #define DRFLAC_PICTURE_TYPE_ILLUSTRATION 18 #define DRFLAC_PICTURE_TYPE_BAND_LOGOTYPE 19 #define DRFLAC_PICTURE_TYPE_PUBLISHER_LOGOTYPE 20 typedef enum { drflac_container_native, drflac_container_ogg, drflac_container_unknown } drflac_container; typedef enum { drflac_seek_origin_start, drflac_seek_origin_current } drflac_seek_origin; /* Packing is important on this structure because we map this directly to the raw data within the SEEKTABLE metadata block. */ #pragma pack(2) typedef struct { drflac_uint64 firstPCMFrame; drflac_uint64 flacFrameOffset; /* The offset from the first byte of the header of the first frame. */ drflac_uint16 pcmFrameCount; } drflac_seekpoint; #pragma pack() typedef struct { drflac_uint16 minBlockSizeInPCMFrames; drflac_uint16 maxBlockSizeInPCMFrames; drflac_uint32 minFrameSizeInPCMFrames; drflac_uint32 maxFrameSizeInPCMFrames; drflac_uint32 sampleRate; drflac_uint8 channels; drflac_uint8 bitsPerSample; drflac_uint64 totalPCMFrameCount; drflac_uint8 md5[16]; } drflac_streaminfo; typedef struct { /* The metadata type. Use this to know how to interpret the data below. Will be set to one of the DRFLAC_METADATA_BLOCK_TYPE_* tokens. */ drflac_uint32 type; /* A pointer to the raw data. This points to a temporary buffer so don't hold on to it. It's best to not modify the contents of this buffer. Use the structures below for more meaningful and structured information about the metadata. It's possible for this to be null. */ const void* pRawData; /* The size in bytes of the block and the buffer pointed to by pRawData if it's non-NULL. */ drflac_uint32 rawDataSize; union { drflac_streaminfo streaminfo; struct { int unused; } padding; struct { drflac_uint32 id; const void* pData; drflac_uint32 dataSize; } application; struct { drflac_uint32 seekpointCount; const drflac_seekpoint* pSeekpoints; } seektable; struct { drflac_uint32 vendorLength; const char* vendor; drflac_uint32 commentCount; const void* pComments; } vorbis_comment; struct { char catalog[128]; drflac_uint64 leadInSampleCount; drflac_bool32 isCD; drflac_uint8 trackCount; const void* pTrackData; } cuesheet; struct { drflac_uint32 type; drflac_uint32 mimeLength; const char* mime; drflac_uint32 descriptionLength; const char* description; drflac_uint32 width; drflac_uint32 height; drflac_uint32 colorDepth; drflac_uint32 indexColorCount; drflac_uint32 pictureDataSize; const drflac_uint8* pPictureData; } picture; } data; } drflac_metadata; /* Callback for when data needs to be read from the client. Parameters ---------- pUserData (in) The user data that was passed to drflac_open() and family. pBufferOut (out) The output buffer. bytesToRead (in) The number of bytes to read. Return Value ------------ The number of bytes actually read. Remarks ------- A return value of less than bytesToRead indicates the end of the stream. Do _not_ return from this callback until either the entire bytesToRead is filled or you have reached the end of the stream. */ typedef size_t (* drflac_read_proc)(void* pUserData, void* pBufferOut, size_t bytesToRead); /* Callback for when data needs to be seeked. Parameters ---------- pUserData (in) The user data that was passed to drflac_open() and family. offset (in) The number of bytes to move, relative to the origin. Will never be negative. origin (in) The origin of the seek - the current position or the start of the stream. Return Value ------------ Whether or not the seek was successful. Remarks ------- The offset will never be negative. Whether or not it is relative to the beginning or current position is determined by the "origin" parameter which will be either drflac_seek_origin_start or drflac_seek_origin_current. When seeking to a PCM frame using drflac_seek_to_pcm_frame(), dr_flac may call this with an offset beyond the end of the FLAC stream. This needs to be detected and handled by returning DRFLAC_FALSE. */ typedef drflac_bool32 (* drflac_seek_proc)(void* pUserData, int offset, drflac_seek_origin origin); /* Callback for when a metadata block is read. Parameters ---------- pUserData (in) The user data that was passed to drflac_open() and family. pMetadata (in) A pointer to a structure containing the data of the metadata block. Remarks ------- Use pMetadata->type to determine which metadata block is being handled and how to read the data. This will be set to one of the DRFLAC_METADATA_BLOCK_TYPE_* tokens. */ typedef void (* drflac_meta_proc)(void* pUserData, drflac_metadata* pMetadata); typedef struct { void* pUserData; void* (* onMalloc)(size_t sz, void* pUserData); void* (* onRealloc)(void* p, size_t sz, void* pUserData); void (* onFree)(void* p, void* pUserData); } drflac_allocation_callbacks; /* Structure for internal use. Only used for decoders opened with drflac_open_memory. */ typedef struct { const drflac_uint8* data; size_t dataSize; size_t currentReadPos; } drflac__memory_stream; /* Structure for internal use. Used for bit streaming. */ typedef struct { /* The function to call when more data needs to be read. */ drflac_read_proc onRead; /* The function to call when the current read position needs to be moved. */ drflac_seek_proc onSeek; /* The user data to pass around to onRead and onSeek. */ void* pUserData; /* The number of unaligned bytes in the L2 cache. This will always be 0 until the end of the stream is hit. At the end of the stream there will be a number of bytes that don't cleanly fit in an L1 cache line, so we use this variable to know whether or not the bistreamer needs to run on a slower path to read those last bytes. This will never be more than sizeof(drflac_cache_t). */ size_t unalignedByteCount; /* The content of the unaligned bytes. */ drflac_cache_t unalignedCache; /* The index of the next valid cache line in the "L2" cache. */ drflac_uint32 nextL2Line; /* The number of bits that have been consumed by the cache. This is used to determine how many valid bits are remaining. */ drflac_uint32 consumedBits; /* The cached data which was most recently read from the client. There are two levels of cache. Data flows as such: Client -> L2 -> L1. The L2 -> L1 movement is aligned and runs on a fast path in just a few instructions. */ drflac_cache_t cacheL2[DR_FLAC_BUFFER_SIZE/sizeof(drflac_cache_t)]; drflac_cache_t cache; /* CRC-16. This is updated whenever bits are read from the bit stream. Manually set this to 0 to reset the CRC. For FLAC, this is reset to 0 at the beginning of each frame. */ drflac_uint16 crc16; drflac_cache_t crc16Cache; /* A cache for optimizing CRC calculations. This is filled when when the L1 cache is reloaded. */ drflac_uint32 crc16CacheIgnoredBytes; /* The number of bytes to ignore when updating the CRC-16 from the CRC-16 cache. */ } drflac_bs; typedef struct { /* The type of the subframe: SUBFRAME_CONSTANT, SUBFRAME_VERBATIM, SUBFRAME_FIXED or SUBFRAME_LPC. */ drflac_uint8 subframeType; /* The number of wasted bits per sample as specified by the sub-frame header. */ drflac_uint8 wastedBitsPerSample; /* The order to use for the prediction stage for SUBFRAME_FIXED and SUBFRAME_LPC. */ drflac_uint8 lpcOrder; /* A pointer to the buffer containing the decoded samples in the subframe. This pointer is an offset from drflac::pExtraData. */ drflac_int32* pSamplesS32; } drflac_subframe; typedef struct { /* If the stream uses variable block sizes, this will be set to the index of the first PCM frame. If fixed block sizes are used, this will always be set to 0. This is 64-bit because the decoded PCM frame number will be 36 bits. */ drflac_uint64 pcmFrameNumber; /* If the stream uses fixed block sizes, this will be set to the frame number. If variable block sizes are used, this will always be 0. This is 32-bit because in fixed block sizes, the maximum frame number will be 31 bits. */ drflac_uint32 flacFrameNumber; /* The sample rate of this frame. */ drflac_uint32 sampleRate; /* The number of PCM frames in each sub-frame within this frame. */ drflac_uint16 blockSizeInPCMFrames; /* The channel assignment of this frame. This is not always set to the channel count. If interchannel decorrelation is being used this will be set to DRFLAC_CHANNEL_ASSIGNMENT_LEFT_SIDE, DRFLAC_CHANNEL_ASSIGNMENT_RIGHT_SIDE or DRFLAC_CHANNEL_ASSIGNMENT_MID_SIDE. */ drflac_uint8 channelAssignment; /* The number of bits per sample within this frame. */ drflac_uint8 bitsPerSample; /* The frame's CRC. */ drflac_uint8 crc8; } drflac_frame_header; typedef struct { /* The header. */ drflac_frame_header header; /* The number of PCM frames left to be read in this FLAC frame. This is initially set to the block size. As PCM frames are read, this will be decremented. When it reaches 0, the decoder will see this frame as fully consumed and load the next frame. */ drflac_uint32 pcmFramesRemaining; /* The list of sub-frames within the frame. There is one sub-frame for each channel, and there's a maximum of 8 channels. */ drflac_subframe subframes[8]; } drflac_frame; typedef struct { /* The function to call when a metadata block is read. */ drflac_meta_proc onMeta; /* The user data posted to the metadata callback function. */ void* pUserDataMD; /* Memory allocation callbacks. */ drflac_allocation_callbacks allocationCallbacks; /* The sample rate. Will be set to something like 44100. */ drflac_uint32 sampleRate; /* The number of channels. This will be set to 1 for monaural streams, 2 for stereo, etc. Maximum 8. This is set based on the value specified in the STREAMINFO block. */ drflac_uint8 channels; /* The bits per sample. Will be set to something like 16, 24, etc. */ drflac_uint8 bitsPerSample; /* The maximum block size, in samples. This number represents the number of samples in each channel (not combined). */ drflac_uint16 maxBlockSizeInPCMFrames; /* The total number of PCM Frames making up the stream. Can be 0 in which case it's still a valid stream, but just means the total PCM frame count is unknown. Likely the case with streams like internet radio. */ drflac_uint64 totalPCMFrameCount; /* The container type. This is set based on whether or not the decoder was opened from a native or Ogg stream. */ drflac_container container; /* The number of seekpoints in the seektable. */ drflac_uint32 seekpointCount; /* Information about the frame the decoder is currently sitting on. */ drflac_frame currentFLACFrame; /* The index of the PCM frame the decoder is currently sitting on. This is only used for seeking. */ drflac_uint64 currentPCMFrame; /* The position of the first FLAC frame in the stream. This is only ever used for seeking. */ drflac_uint64 firstFLACFramePosInBytes; /* A hack to avoid a malloc() when opening a decoder with drflac_open_memory(). */ drflac__memory_stream memoryStream; /* A pointer to the decoded sample data. This is an offset of pExtraData. */ drflac_int32* pDecodedSamples; /* A pointer to the seek table. This is an offset of pExtraData, or NULL if there is no seek table. */ drflac_seekpoint* pSeekpoints; /* Internal use only. Only used with Ogg containers. Points to a drflac_oggbs object. This is an offset of pExtraData. */ void* _oggbs; /* Internal use only. Used for profiling and testing different seeking modes. */ drflac_bool32 _noSeekTableSeek : 1; drflac_bool32 _noBinarySearchSeek : 1; drflac_bool32 _noBruteForceSeek : 1; /* The bit streamer. The raw FLAC data is fed through this object. */ drflac_bs bs; /* Variable length extra data. We attach this to the end of the object so we can avoid unnecessary mallocs. */ drflac_uint8 pExtraData[1]; } drflac; /* Opens a FLAC decoder. Parameters ---------- onRead (in) The function to call when data needs to be read from the client. onSeek (in) The function to call when the read position of the client data needs to move. pUserData (in, optional) A pointer to application defined data that will be passed to onRead and onSeek. pAllocationCallbacks (in, optional) A pointer to application defined callbacks for managing memory allocations. Return Value ------------ Returns a pointer to an object representing the decoder. Remarks ------- Close the decoder with `drflac_close()`. `pAllocationCallbacks` can be NULL in which case it will use `DRFLAC_MALLOC`, `DRFLAC_REALLOC` and `DRFLAC_FREE`. This function will automatically detect whether or not you are attempting to open a native or Ogg encapsulated FLAC, both of which should work seamlessly without any manual intervention. Ogg encapsulation also works with multiplexed streams which basically means it can play FLAC encoded audio tracks in videos. This is the lowest level function for opening a FLAC stream. You can also use `drflac_open_file()` and `drflac_open_memory()` to open the stream from a file or from a block of memory respectively. The STREAMINFO block must be present for this to succeed. Use `drflac_open_relaxed()` to open a FLAC stream where the header may not be present. Use `drflac_open_with_metadata()` if you need access to metadata. Seek Also --------- drflac_open_file() drflac_open_memory() drflac_open_with_metadata() drflac_close() */ DRFLAC_API drflac* drflac_open(drflac_read_proc onRead, drflac_seek_proc onSeek, void* pUserData, const drflac_allocation_callbacks* pAllocationCallbacks); /* Opens a FLAC stream with relaxed validation of the header block. Parameters ---------- onRead (in) The function to call when data needs to be read from the client. onSeek (in) The function to call when the read position of the client data needs to move. container (in) Whether or not the FLAC stream is encapsulated using standard FLAC encapsulation or Ogg encapsulation. pUserData (in, optional) A pointer to application defined data that will be passed to onRead and onSeek. pAllocationCallbacks (in, optional) A pointer to application defined callbacks for managing memory allocations. Return Value ------------ A pointer to an object representing the decoder. Remarks ------- The same as drflac_open(), except attempts to open the stream even when a header block is not present. Because the header is not necessarily available, the caller must explicitly define the container (Native or Ogg). Do not set this to `drflac_container_unknown` as that is for internal use only. Opening in relaxed mode will continue reading data from onRead until it finds a valid frame. If a frame is never found it will continue forever. To abort, force your `onRead` callback to return 0, which dr_flac will use as an indicator that the end of the stream was found. Use `drflac_open_with_metadata_relaxed()` if you need access to metadata. */ DRFLAC_API drflac* drflac_open_relaxed(drflac_read_proc onRead, drflac_seek_proc onSeek, drflac_container container, void* pUserData, const drflac_allocation_callbacks* pAllocationCallbacks); /* Opens a FLAC decoder and notifies the caller of the metadata chunks (album art, etc.). Parameters ---------- onRead (in) The function to call when data needs to be read from the client. onSeek (in) The function to call when the read position of the client data needs to move. onMeta (in) The function to call for every metadata block. pUserData (in, optional) A pointer to application defined data that will be passed to onRead, onSeek and onMeta. pAllocationCallbacks (in, optional) A pointer to application defined callbacks for managing memory allocations. Return Value ------------ A pointer to an object representing the decoder. Remarks ------- Close the decoder with `drflac_close()`. `pAllocationCallbacks` can be NULL in which case it will use `DRFLAC_MALLOC`, `DRFLAC_REALLOC` and `DRFLAC_FREE`. This is slower than `drflac_open()`, so avoid this one if you don't need metadata. Internally, this will allocate and free memory on the heap for every metadata block except for STREAMINFO and PADDING blocks. The caller is notified of the metadata via the `onMeta` callback. All metadata blocks will be handled before the function returns. This callback takes a pointer to a `drflac_metadata` object which is a union containing the data of all relevant metadata blocks. Use the `type` member to discriminate against the different metadata types. The STREAMINFO block must be present for this to succeed. Use `drflac_open_with_metadata_relaxed()` to open a FLAC stream where the header may not be present. Note that this will behave inconsistently with `drflac_open()` if the stream is an Ogg encapsulated stream and a metadata block is corrupted. This is due to the way the Ogg stream recovers from corrupted pages. When `drflac_open_with_metadata()` is being used, the open routine will try to read the contents of the metadata block, whereas `drflac_open()` will simply seek past it (for the sake of efficiency). This inconsistency can result in different samples being returned depending on whether or not the stream is being opened with metadata. Seek Also --------- drflac_open_file_with_metadata() drflac_open_memory_with_metadata() drflac_open() drflac_close() */ DRFLAC_API drflac* drflac_open_with_metadata(drflac_read_proc onRead, drflac_seek_proc onSeek, drflac_meta_proc onMeta, void* pUserData, const drflac_allocation_callbacks* pAllocationCallbacks); /* The same as drflac_open_with_metadata(), except attempts to open the stream even when a header block is not present. See Also -------- drflac_open_with_metadata() drflac_open_relaxed() */ DRFLAC_API drflac* drflac_open_with_metadata_relaxed(drflac_read_proc onRead, drflac_seek_proc onSeek, drflac_meta_proc onMeta, drflac_container container, void* pUserData, const drflac_allocation_callbacks* pAllocationCallbacks); /* Closes the given FLAC decoder. Parameters ---------- pFlac (in) The decoder to close. Remarks ------- This will destroy the decoder object. See Also -------- drflac_open() drflac_open_with_metadata() drflac_open_file() drflac_open_file_w() drflac_open_file_with_metadata() drflac_open_file_with_metadata_w() drflac_open_memory() drflac_open_memory_with_metadata() */ DRFLAC_API void drflac_close(drflac* pFlac); /* Reads sample data from the given FLAC decoder, output as interleaved signed 32-bit PCM. Parameters ---------- pFlac (in) The decoder. framesToRead (in) The number of PCM frames to read. pBufferOut (out, optional) A pointer to the buffer that will receive the decoded samples. Return Value ------------ Returns the number of PCM frames actually read. If the return value is less than `framesToRead` it has reached the end. Remarks ------- pBufferOut can be null, in which case the call will act as a seek, and the return value will be the number of frames seeked. */ DRFLAC_API drflac_uint64 drflac_read_pcm_frames_s32(drflac* pFlac, drflac_uint64 framesToRead, drflac_int32* pBufferOut); /* Reads sample data from the given FLAC decoder, output as interleaved signed 16-bit PCM. Parameters ---------- pFlac (in) The decoder. framesToRead (in) The number of PCM frames to read. pBufferOut (out, optional) A pointer to the buffer that will receive the decoded samples. Return Value ------------ Returns the number of PCM frames actually read. If the return value is less than `framesToRead` it has reached the end. Remarks ------- pBufferOut can be null, in which case the call will act as a seek, and the return value will be the number of frames seeked. Note that this is lossy for streams where the bits per sample is larger than 16. */ DRFLAC_API drflac_uint64 drflac_read_pcm_frames_s16(drflac* pFlac, drflac_uint64 framesToRead, drflac_int16* pBufferOut); /* Reads sample data from the given FLAC decoder, output as interleaved 32-bit floating point PCM. Parameters ---------- pFlac (in) The decoder. framesToRead (in) The number of PCM frames to read. pBufferOut (out, optional) A pointer to the buffer that will receive the decoded samples. Return Value ------------ Returns the number of PCM frames actually read. If the return value is less than `framesToRead` it has reached the end. Remarks ------- pBufferOut can be null, in which case the call will act as a seek, and the return value will be the number of frames seeked. Note that this should be considered lossy due to the nature of floating point numbers not being able to exactly represent every possible number. */ DRFLAC_API drflac_uint64 drflac_read_pcm_frames_f32(drflac* pFlac, drflac_uint64 framesToRead, float* pBufferOut); /* Seeks to the PCM frame at the given index. Parameters ---------- pFlac (in) The decoder. pcmFrameIndex (in) The index of the PCM frame to seek to. See notes below. Return Value ------------- `DRFLAC_TRUE` if successful; `DRFLAC_FALSE` otherwise. */ DRFLAC_API drflac_bool32 drflac_seek_to_pcm_frame(drflac* pFlac, drflac_uint64 pcmFrameIndex); #ifndef DR_FLAC_NO_STDIO /* Opens a FLAC decoder from the file at the given path. Parameters ---------- pFileName (in) The path of the file to open, either absolute or relative to the current directory. pAllocationCallbacks (in, optional) A pointer to application defined callbacks for managing memory allocations. Return Value ------------ A pointer to an object representing the decoder. Remarks ------- Close the decoder with drflac_close(). Remarks ------- This will hold a handle to the file until the decoder is closed with drflac_close(). Some platforms will restrict the number of files a process can have open at any given time, so keep this mind if you have many decoders open at the same time. See Also -------- drflac_open_file_with_metadata() drflac_open() drflac_close() */ DRFLAC_API drflac* drflac_open_file(const char* pFileName, const drflac_allocation_callbacks* pAllocationCallbacks); DRFLAC_API drflac* drflac_open_file_w(const wchar_t* pFileName, const drflac_allocation_callbacks* pAllocationCallbacks); /* Opens a FLAC decoder from the file at the given path and notifies the caller of the metadata chunks (album art, etc.) Parameters ---------- pFileName (in) The path of the file to open, either absolute or relative to the current directory. pAllocationCallbacks (in, optional) A pointer to application defined callbacks for managing memory allocations. onMeta (in) The callback to fire for each metadata block. pUserData (in) A pointer to the user data to pass to the metadata callback. pAllocationCallbacks (in) A pointer to application defined callbacks for managing memory allocations. Remarks ------- Look at the documentation for drflac_open_with_metadata() for more information on how metadata is handled. See Also -------- drflac_open_with_metadata() drflac_open() drflac_close() */ DRFLAC_API drflac* drflac_open_file_with_metadata(const char* pFileName, drflac_meta_proc onMeta, void* pUserData, const drflac_allocation_callbacks* pAllocationCallbacks); DRFLAC_API drflac* drflac_open_file_with_metadata_w(const wchar_t* pFileName, drflac_meta_proc onMeta, void* pUserData, const drflac_allocation_callbacks* pAllocationCallbacks); #endif /* Opens a FLAC decoder from a pre-allocated block of memory Parameters ---------- pData (in) A pointer to the raw encoded FLAC data. dataSize (in) The size in bytes of `data`. pAllocationCallbacks (in) A pointer to application defined callbacks for managing memory allocations. Return Value ------------ A pointer to an object representing the decoder. Remarks ------- This does not create a copy of the data. It is up to the application to ensure the buffer remains valid for the lifetime of the decoder. See Also -------- drflac_open() drflac_close() */ DRFLAC_API drflac* drflac_open_memory(const void* pData, size_t dataSize, const drflac_allocation_callbacks* pAllocationCallbacks); /* Opens a FLAC decoder from a pre-allocated block of memory and notifies the caller of the metadata chunks (album art, etc.) Parameters ---------- pData (in) A pointer to the raw encoded FLAC data. dataSize (in) The size in bytes of `data`. onMeta (in) The callback to fire for each metadata block. pUserData (in) A pointer to the user data to pass to the metadata callback. pAllocationCallbacks (in) A pointer to application defined callbacks for managing memory allocations. Remarks ------- Look at the documentation for drflac_open_with_metadata() for more information on how metadata is handled. See Also ------- drflac_open_with_metadata() drflac_open() drflac_close() */ DRFLAC_API drflac* drflac_open_memory_with_metadata(const void* pData, size_t dataSize, drflac_meta_proc onMeta, void* pUserData, const drflac_allocation_callbacks* pAllocationCallbacks); /* High Level APIs */ /* Opens a FLAC stream from the given callbacks and fully decodes it in a single operation. The return value is a pointer to the sample data as interleaved signed 32-bit PCM. The returned data must be freed with drflac_free(). You can pass in custom memory allocation callbacks via the pAllocationCallbacks parameter. This can be NULL in which case it will use DRFLAC_MALLOC, DRFLAC_REALLOC and DRFLAC_FREE. Sometimes a FLAC file won't keep track of the total sample count. In this situation the function will continuously read samples into a dynamically sized buffer on the heap until no samples are left. Do not call this function on a broadcast type of stream (like internet radio streams and whatnot). */ DRFLAC_API drflac_int32* drflac_open_and_read_pcm_frames_s32(drflac_read_proc onRead, drflac_seek_proc onSeek, void* pUserData, unsigned int* channels, unsigned int* sampleRate, drflac_uint64* totalPCMFrameCount, const drflac_allocation_callbacks* pAllocationCallbacks); /* Same as drflac_open_and_read_pcm_frames_s32(), except returns signed 16-bit integer samples. */ DRFLAC_API drflac_int16* drflac_open_and_read_pcm_frames_s16(drflac_read_proc onRead, drflac_seek_proc onSeek, void* pUserData, unsigned int* channels, unsigned int* sampleRate, drflac_uint64* totalPCMFrameCount, const drflac_allocation_callbacks* pAllocationCallbacks); /* Same as drflac_open_and_read_pcm_frames_s32(), except returns 32-bit floating-point samples. */ DRFLAC_API float* drflac_open_and_read_pcm_frames_f32(drflac_read_proc onRead, drflac_seek_proc onSeek, void* pUserData, unsigned int* channels, unsigned int* sampleRate, drflac_uint64* totalPCMFrameCount, const drflac_allocation_callbacks* pAllocationCallbacks); #ifndef DR_FLAC_NO_STDIO /* Same as drflac_open_and_read_pcm_frames_s32() except opens the decoder from a file. */ DRFLAC_API drflac_int32* drflac_open_file_and_read_pcm_frames_s32(const char* filename, unsigned int* channels, unsigned int* sampleRate, drflac_uint64* totalPCMFrameCount, const drflac_allocation_callbacks* pAllocationCallbacks); /* Same as drflac_open_file_and_read_pcm_frames_s32(), except returns signed 16-bit integer samples. */ DRFLAC_API drflac_int16* drflac_open_file_and_read_pcm_frames_s16(const char* filename, unsigned int* channels, unsigned int* sampleRate, drflac_uint64* totalPCMFrameCount, const drflac_allocation_callbacks* pAllocationCallbacks); /* Same as drflac_open_file_and_read_pcm_frames_s32(), except returns 32-bit floating-point samples. */ DRFLAC_API float* drflac_open_file_and_read_pcm_frames_f32(const char* filename, unsigned int* channels, unsigned int* sampleRate, drflac_uint64* totalPCMFrameCount, const drflac_allocation_callbacks* pAllocationCallbacks); #endif /* Same as drflac_open_and_read_pcm_frames_s32() except opens the decoder from a block of memory. */ DRFLAC_API drflac_int32* drflac_open_memory_and_read_pcm_frames_s32(const void* data, size_t dataSize, unsigned int* channels, unsigned int* sampleRate, drflac_uint64* totalPCMFrameCount, const drflac_allocation_callbacks* pAllocationCallbacks); /* Same as drflac_open_memory_and_read_pcm_frames_s32(), except returns signed 16-bit integer samples. */ DRFLAC_API drflac_int16* drflac_open_memory_and_read_pcm_frames_s16(const void* data, size_t dataSize, unsigned int* channels, unsigned int* sampleRate, drflac_uint64* totalPCMFrameCount, const drflac_allocation_callbacks* pAllocationCallbacks); /* Same as drflac_open_memory_and_read_pcm_frames_s32(), except returns 32-bit floating-point samples. */ DRFLAC_API float* drflac_open_memory_and_read_pcm_frames_f32(const void* data, size_t dataSize, unsigned int* channels, unsigned int* sampleRate, drflac_uint64* totalPCMFrameCount, const drflac_allocation_callbacks* pAllocationCallbacks); /* Frees memory that was allocated internally by dr_flac. Set pAllocationCallbacks to the same object that was passed to drflac_open_*_and_read_pcm_frames_*(). If you originally passed in NULL, pass in NULL for this. */ DRFLAC_API void drflac_free(void* p, const drflac_allocation_callbacks* pAllocationCallbacks); /* Structure representing an iterator for vorbis comments in a VORBIS_COMMENT metadata block. */ typedef struct { drflac_uint32 countRemaining; const char* pRunningData; } drflac_vorbis_comment_iterator; /* Initializes a vorbis comment iterator. This can be used for iterating over the vorbis comments in a VORBIS_COMMENT metadata block. */ DRFLAC_API void drflac_init_vorbis_comment_iterator(drflac_vorbis_comment_iterator* pIter, drflac_uint32 commentCount, const void* pComments); /* Goes to the next vorbis comment in the given iterator. If null is returned it means there are no more comments. The returned string is NOT null terminated. */ DRFLAC_API const char* drflac_next_vorbis_comment(drflac_vorbis_comment_iterator* pIter, drflac_uint32* pCommentLengthOut); /* Structure representing an iterator for cuesheet tracks in a CUESHEET metadata block. */ typedef struct { drflac_uint32 countRemaining; const char* pRunningData; } drflac_cuesheet_track_iterator; /* Packing is important on this structure because we map this directly to the raw data within the CUESHEET metadata block. */ #pragma pack(4) typedef struct { drflac_uint64 offset; drflac_uint8 index; drflac_uint8 reserved[3]; } drflac_cuesheet_track_index; #pragma pack() typedef struct { drflac_uint64 offset; drflac_uint8 trackNumber; char ISRC[12]; drflac_bool8 isAudio; drflac_bool8 preEmphasis; drflac_uint8 indexCount; const drflac_cuesheet_track_index* pIndexPoints; } drflac_cuesheet_track; /* Initializes a cuesheet track iterator. This can be used for iterating over the cuesheet tracks in a CUESHEET metadata block. */ DRFLAC_API void drflac_init_cuesheet_track_iterator(drflac_cuesheet_track_iterator* pIter, drflac_uint32 trackCount, const void* pTrackData); /* Goes to the next cuesheet track in the given iterator. If DRFLAC_FALSE is returned it means there are no more comments. */ DRFLAC_API drflac_bool32 drflac_next_cuesheet_track(drflac_cuesheet_track_iterator* pIter, drflac_cuesheet_track* pCuesheetTrack); #ifdef __cplusplus } #endif #endif /* dr_flac_h */ /************************************************************************************************************************************************************ ************************************************************************************************************************************************************ IMPLEMENTATION ************************************************************************************************************************************************************ ************************************************************************************************************************************************************/ #if defined(DR_FLAC_IMPLEMENTATION) || defined(DRFLAC_IMPLEMENTATION) #ifndef dr_flac_c #define dr_flac_c /* Disable some annoying warnings. */ #if defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))) #pragma GCC diagnostic push #if __GNUC__ >= 7 #pragma GCC diagnostic ignored "-Wimplicit-fallthrough" #endif #endif #ifdef __linux__ #ifndef _BSD_SOURCE #define _BSD_SOURCE #endif #ifndef _DEFAULT_SOURCE #define _DEFAULT_SOURCE #endif #ifndef __USE_BSD #define __USE_BSD #endif #include #endif #include #include #ifdef _MSC_VER #define DRFLAC_INLINE __forceinline #elif defined(__GNUC__) /* I've had a bug report where GCC is emitting warnings about functions possibly not being inlineable. This warning happens when the __attribute__((always_inline)) attribute is defined without an "inline" statement. I think therefore there must be some case where "__inline__" is not always defined, thus the compiler emitting these warnings. When using -std=c89 or -ansi on the command line, we cannot use the "inline" keyword and instead need to use "__inline__". In an attempt to work around this issue I am using "__inline__" only when we're compiling in strict ANSI mode. */ #if defined(__STRICT_ANSI__) #define DRFLAC_GNUC_INLINE_HINT __inline__ #else #define DRFLAC_GNUC_INLINE_HINT inline #endif #if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)) || defined(__clang__) #define DRFLAC_INLINE DRFLAC_GNUC_INLINE_HINT __attribute__((always_inline)) #else #define DRFLAC_INLINE DRFLAC_GNUC_INLINE_HINT #endif #elif defined(__WATCOMC__) #define DRFLAC_INLINE __inline #else #define DRFLAC_INLINE #endif /* CPU architecture. */ #if defined(__x86_64__) || defined(_M_X64) #define DRFLAC_X64 #elif defined(__i386) || defined(_M_IX86) #define DRFLAC_X86 #elif defined(__arm__) || defined(_M_ARM) || defined(__arm64) || defined(__arm64__) || defined(__aarch64__) || defined(_M_ARM64) #define DRFLAC_ARM #endif /* Intrinsics Support There's a bug in GCC 4.2.x which results in an incorrect compilation error when using _mm_slli_epi32() where it complains with "error: shift must be an immediate" Unfortuantely dr_flac depends on this for a few things so we're just going to disable SSE on GCC 4.2 and below. */ #if !defined(DR_FLAC_NO_SIMD) #if defined(DRFLAC_X64) || defined(DRFLAC_X86) #if defined(_MSC_VER) && !defined(__clang__) /* MSVC. */ #if _MSC_VER >= 1400 && !defined(DRFLAC_NO_SSE2) /* 2005 */ #define DRFLAC_SUPPORT_SSE2 #endif #if _MSC_VER >= 1600 && !defined(DRFLAC_NO_SSE41) /* 2010 */ #define DRFLAC_SUPPORT_SSE41 #endif #elif defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))) /* Assume GNUC-style. */ #if defined(__SSE2__) && !defined(DRFLAC_NO_SSE2) #define DRFLAC_SUPPORT_SSE2 #endif #if defined(__SSE4_1__) && !defined(DRFLAC_NO_SSE41) #define DRFLAC_SUPPORT_SSE41 #endif #endif /* If at this point we still haven't determined compiler support for the intrinsics just fall back to __has_include. */ #if !defined(__GNUC__) && !defined(__clang__) && defined(__has_include) #if !defined(DRFLAC_SUPPORT_SSE2) && !defined(DRFLAC_NO_SSE2) && __has_include() #define DRFLAC_SUPPORT_SSE2 #endif #if !defined(DRFLAC_SUPPORT_SSE41) && !defined(DRFLAC_NO_SSE41) && __has_include() #define DRFLAC_SUPPORT_SSE41 #endif #endif #if defined(DRFLAC_SUPPORT_SSE41) #include #elif defined(DRFLAC_SUPPORT_SSE2) #include #endif #endif #if defined(DRFLAC_ARM) #if !defined(DRFLAC_NO_NEON) && (defined(__ARM_NEON) || defined(__aarch64__) || defined(_M_ARM64)) #define DRFLAC_SUPPORT_NEON #include #endif #endif #endif /* Compile-time CPU feature support. */ #if !defined(DR_FLAC_NO_SIMD) && (defined(DRFLAC_X86) || defined(DRFLAC_X64)) #if defined(_MSC_VER) && !defined(__clang__) #if _MSC_VER >= 1400 #include static void drflac__cpuid(int info[4], int fid) { __cpuid(info, fid); } #else #define DRFLAC_NO_CPUID #endif #else #if defined(__GNUC__) || defined(__clang__) static void drflac__cpuid(int info[4], int fid) { /* It looks like the -fPIC option uses the ebx register which GCC complains about. We can work around this by just using a different register, the specific register of which I'm letting the compiler decide on. The "k" prefix is used to specify a 32-bit register. The {...} syntax is for supporting different assembly dialects. What's basically happening is that we're saving and restoring the ebx register manually. */ #if defined(DRFLAC_X86) && defined(__PIC__) __asm__ __volatile__ ( "xchg{l} {%%}ebx, %k1;" "cpuid;" "xchg{l} {%%}ebx, %k1;" : "=a"(info[0]), "=&r"(info[1]), "=c"(info[2]), "=d"(info[3]) : "a"(fid), "c"(0) ); #else __asm__ __volatile__ ( "cpuid" : "=a"(info[0]), "=b"(info[1]), "=c"(info[2]), "=d"(info[3]) : "a"(fid), "c"(0) ); #endif } #else #define DRFLAC_NO_CPUID #endif #endif #else #define DRFLAC_NO_CPUID #endif static DRFLAC_INLINE drflac_bool32 drflac_has_sse2(void) { #if defined(DRFLAC_SUPPORT_SSE2) #if (defined(DRFLAC_X64) || defined(DRFLAC_X86)) && !defined(DRFLAC_NO_SSE2) #if defined(DRFLAC_X64) return DRFLAC_TRUE; /* 64-bit targets always support SSE2. */ #elif (defined(_M_IX86_FP) && _M_IX86_FP == 2) || defined(__SSE2__) return DRFLAC_TRUE; /* If the compiler is allowed to freely generate SSE2 code we can assume support. */ #else #if defined(DRFLAC_NO_CPUID) return DRFLAC_FALSE; #else int info[4]; drflac__cpuid(info, 1); return (info[3] & (1 << 26)) != 0; #endif #endif #else return DRFLAC_FALSE; /* SSE2 is only supported on x86 and x64 architectures. */ #endif #else return DRFLAC_FALSE; /* No compiler support. */ #endif } static DRFLAC_INLINE drflac_bool32 drflac_has_sse41(void) { #if defined(DRFLAC_SUPPORT_SSE41) #if (defined(DRFLAC_X64) || defined(DRFLAC_X86)) && !defined(DRFLAC_NO_SSE41) #if defined(DRFLAC_X64) return DRFLAC_TRUE; /* 64-bit targets always support SSE4.1. */ #elif (defined(_M_IX86_FP) && _M_IX86_FP == 2) || defined(__SSE4_1__) return DRFLAC_TRUE; /* If the compiler is allowed to freely generate SSE41 code we can assume support. */ #else #if defined(DRFLAC_NO_CPUID) return DRFLAC_FALSE; #else int info[4]; drflac__cpuid(info, 1); return (info[2] & (1 << 19)) != 0; #endif #endif #else return DRFLAC_FALSE; /* SSE41 is only supported on x86 and x64 architectures. */ #endif #else return DRFLAC_FALSE; /* No compiler support. */ #endif } #if defined(_MSC_VER) && _MSC_VER >= 1500 && (defined(DRFLAC_X86) || defined(DRFLAC_X64)) && !defined(__clang__) #define DRFLAC_HAS_LZCNT_INTRINSIC #elif (defined(__GNUC__) && ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7))) #define DRFLAC_HAS_LZCNT_INTRINSIC #elif defined(__clang__) #if defined(__has_builtin) #if __has_builtin(__builtin_clzll) || __has_builtin(__builtin_clzl) #define DRFLAC_HAS_LZCNT_INTRINSIC #endif #endif #endif #if defined(_MSC_VER) && _MSC_VER >= 1400 && !defined(__clang__) #define DRFLAC_HAS_BYTESWAP16_INTRINSIC #define DRFLAC_HAS_BYTESWAP32_INTRINSIC #define DRFLAC_HAS_BYTESWAP64_INTRINSIC #elif defined(__clang__) #if defined(__has_builtin) #if __has_builtin(__builtin_bswap16) #define DRFLAC_HAS_BYTESWAP16_INTRINSIC #endif #if __has_builtin(__builtin_bswap32) #define DRFLAC_HAS_BYTESWAP32_INTRINSIC #endif #if __has_builtin(__builtin_bswap64) #define DRFLAC_HAS_BYTESWAP64_INTRINSIC #endif #endif #elif defined(__GNUC__) #if ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) #define DRFLAC_HAS_BYTESWAP32_INTRINSIC #define DRFLAC_HAS_BYTESWAP64_INTRINSIC #endif #if ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)) #define DRFLAC_HAS_BYTESWAP16_INTRINSIC #endif #elif defined(__WATCOMC__) && defined(__386__) #define DRFLAC_HAS_BYTESWAP16_INTRINSIC #define DRFLAC_HAS_BYTESWAP32_INTRINSIC #define DRFLAC_HAS_BYTESWAP64_INTRINSIC extern __inline drflac_uint16 _watcom_bswap16(drflac_uint16); extern __inline drflac_uint32 _watcom_bswap32(drflac_uint32); extern __inline drflac_uint64 _watcom_bswap64(drflac_uint64); #pragma aux _watcom_bswap16 = \ "xchg al, ah" \ parm [ax] \ modify [ax]; #pragma aux _watcom_bswap32 = \ "bswap eax" \ parm [eax] \ modify [eax]; #pragma aux _watcom_bswap64 = \ "bswap eax" \ "bswap edx" \ "xchg eax,edx" \ parm [eax edx] \ modify [eax edx]; #endif /* Standard library stuff. */ #ifndef DRFLAC_ASSERT #include #define DRFLAC_ASSERT(expression) assert(expression) #endif #ifndef DRFLAC_MALLOC #define DRFLAC_MALLOC(sz) malloc((sz)) #endif #ifndef DRFLAC_REALLOC #define DRFLAC_REALLOC(p, sz) realloc((p), (sz)) #endif #ifndef DRFLAC_FREE #define DRFLAC_FREE(p) free((p)) #endif #ifndef DRFLAC_COPY_MEMORY #define DRFLAC_COPY_MEMORY(dst, src, sz) memcpy((dst), (src), (sz)) #endif #ifndef DRFLAC_ZERO_MEMORY #define DRFLAC_ZERO_MEMORY(p, sz) memset((p), 0, (sz)) #endif #ifndef DRFLAC_ZERO_OBJECT #define DRFLAC_ZERO_OBJECT(p) DRFLAC_ZERO_MEMORY((p), sizeof(*(p))) #endif #define DRFLAC_MAX_SIMD_VECTOR_SIZE 64 /* 64 for AVX-512 in the future. */ typedef drflac_int32 drflac_result; #define DRFLAC_SUCCESS 0 #define DRFLAC_ERROR -1 /* A generic error. */ #define DRFLAC_INVALID_ARGS -2 #define DRFLAC_INVALID_OPERATION -3 #define DRFLAC_OUT_OF_MEMORY -4 #define DRFLAC_OUT_OF_RANGE -5 #define DRFLAC_ACCESS_DENIED -6 #define DRFLAC_DOES_NOT_EXIST -7 #define DRFLAC_ALREADY_EXISTS -8 #define DRFLAC_TOO_MANY_OPEN_FILES -9 #define DRFLAC_INVALID_FILE -10 #define DRFLAC_TOO_BIG -11 #define DRFLAC_PATH_TOO_LONG -12 #define DRFLAC_NAME_TOO_LONG -13 #define DRFLAC_NOT_DIRECTORY -14 #define DRFLAC_IS_DIRECTORY -15 #define DRFLAC_DIRECTORY_NOT_EMPTY -16 #define DRFLAC_END_OF_FILE -17 #define DRFLAC_NO_SPACE -18 #define DRFLAC_BUSY -19 #define DRFLAC_IO_ERROR -20 #define DRFLAC_INTERRUPT -21 #define DRFLAC_UNAVAILABLE -22 #define DRFLAC_ALREADY_IN_USE -23 #define DRFLAC_BAD_ADDRESS -24 #define DRFLAC_BAD_SEEK -25 #define DRFLAC_BAD_PIPE -26 #define DRFLAC_DEADLOCK -27 #define DRFLAC_TOO_MANY_LINKS -28 #define DRFLAC_NOT_IMPLEMENTED -29 #define DRFLAC_NO_MESSAGE -30 #define DRFLAC_BAD_MESSAGE -31 #define DRFLAC_NO_DATA_AVAILABLE -32 #define DRFLAC_INVALID_DATA -33 #define DRFLAC_TIMEOUT -34 #define DRFLAC_NO_NETWORK -35 #define DRFLAC_NOT_UNIQUE -36 #define DRFLAC_NOT_SOCKET -37 #define DRFLAC_NO_ADDRESS -38 #define DRFLAC_BAD_PROTOCOL -39 #define DRFLAC_PROTOCOL_UNAVAILABLE -40 #define DRFLAC_PROTOCOL_NOT_SUPPORTED -41 #define DRFLAC_PROTOCOL_FAMILY_NOT_SUPPORTED -42 #define DRFLAC_ADDRESS_FAMILY_NOT_SUPPORTED -43 #define DRFLAC_SOCKET_NOT_SUPPORTED -44 #define DRFLAC_CONNECTION_RESET -45 #define DRFLAC_ALREADY_CONNECTED -46 #define DRFLAC_NOT_CONNECTED -47 #define DRFLAC_CONNECTION_REFUSED -48 #define DRFLAC_NO_HOST -49 #define DRFLAC_IN_PROGRESS -50 #define DRFLAC_CANCELLED -51 #define DRFLAC_MEMORY_ALREADY_MAPPED -52 #define DRFLAC_AT_END -53 #define DRFLAC_CRC_MISMATCH -128 #define DRFLAC_SUBFRAME_CONSTANT 0 #define DRFLAC_SUBFRAME_VERBATIM 1 #define DRFLAC_SUBFRAME_FIXED 8 #define DRFLAC_SUBFRAME_LPC 32 #define DRFLAC_SUBFRAME_RESERVED 255 #define DRFLAC_RESIDUAL_CODING_METHOD_PARTITIONED_RICE 0 #define DRFLAC_RESIDUAL_CODING_METHOD_PARTITIONED_RICE2 1 #define DRFLAC_CHANNEL_ASSIGNMENT_INDEPENDENT 0 #define DRFLAC_CHANNEL_ASSIGNMENT_LEFT_SIDE 8 #define DRFLAC_CHANNEL_ASSIGNMENT_RIGHT_SIDE 9 #define DRFLAC_CHANNEL_ASSIGNMENT_MID_SIDE 10 #define drflac_align(x, a) ((((x) + (a) - 1) / (a)) * (a)) DRFLAC_API void drflac_version(drflac_uint32* pMajor, drflac_uint32* pMinor, drflac_uint32* pRevision) { if (pMajor) { *pMajor = DRFLAC_VERSION_MAJOR; } if (pMinor) { *pMinor = DRFLAC_VERSION_MINOR; } if (pRevision) { *pRevision = DRFLAC_VERSION_REVISION; } } DRFLAC_API const char* drflac_version_string(void) { return DRFLAC_VERSION_STRING; } /* CPU caps. */ #if defined(__has_feature) #if __has_feature(thread_sanitizer) #define DRFLAC_NO_THREAD_SANITIZE __attribute__((no_sanitize("thread"))) #else #define DRFLAC_NO_THREAD_SANITIZE #endif #else #define DRFLAC_NO_THREAD_SANITIZE #endif #if defined(DRFLAC_HAS_LZCNT_INTRINSIC) static drflac_bool32 drflac__gIsLZCNTSupported = DRFLAC_FALSE; #endif #ifndef DRFLAC_NO_CPUID static drflac_bool32 drflac__gIsSSE2Supported = DRFLAC_FALSE; static drflac_bool32 drflac__gIsSSE41Supported = DRFLAC_FALSE; /* I've had a bug report that Clang's ThreadSanitizer presents a warning in this function. Having reviewed this, this does actually make sense. However, since CPU caps should never differ for a running process, I don't think the trade off of complicating internal API's by passing around CPU caps versus just disabling the warnings is worthwhile. I'm therefore just going to disable these warnings. This is disabled via the DRFLAC_NO_THREAD_SANITIZE attribute. */ DRFLAC_NO_THREAD_SANITIZE static void drflac__init_cpu_caps(void) { static drflac_bool32 isCPUCapsInitialized = DRFLAC_FALSE; if (!isCPUCapsInitialized) { /* LZCNT */ #if defined(DRFLAC_HAS_LZCNT_INTRINSIC) int info[4] = {0}; drflac__cpuid(info, 0x80000001); drflac__gIsLZCNTSupported = (info[2] & (1 << 5)) != 0; #endif /* SSE2 */ drflac__gIsSSE2Supported = drflac_has_sse2(); /* SSE4.1 */ drflac__gIsSSE41Supported = drflac_has_sse41(); /* Initialized. */ isCPUCapsInitialized = DRFLAC_TRUE; } } #else static drflac_bool32 drflac__gIsNEONSupported = DRFLAC_FALSE; static DRFLAC_INLINE drflac_bool32 drflac__has_neon(void) { #if defined(DRFLAC_SUPPORT_NEON) #if defined(DRFLAC_ARM) && !defined(DRFLAC_NO_NEON) #if (defined(__ARM_NEON) || defined(__aarch64__) || defined(_M_ARM64)) return DRFLAC_TRUE; /* If the compiler is allowed to freely generate NEON code we can assume support. */ #else /* TODO: Runtime check. */ return DRFLAC_FALSE; #endif #else return DRFLAC_FALSE; /* NEON is only supported on ARM architectures. */ #endif #else return DRFLAC_FALSE; /* No compiler support. */ #endif } DRFLAC_NO_THREAD_SANITIZE static void drflac__init_cpu_caps(void) { drflac__gIsNEONSupported = drflac__has_neon(); #if defined(DRFLAC_HAS_LZCNT_INTRINSIC) && defined(DRFLAC_ARM) && (defined(__ARM_ARCH) && __ARM_ARCH >= 5) drflac__gIsLZCNTSupported = DRFLAC_TRUE; #endif } #endif /* Endian Management */ static DRFLAC_INLINE drflac_bool32 drflac__is_little_endian(void) { #if defined(DRFLAC_X86) || defined(DRFLAC_X64) return DRFLAC_TRUE; #elif defined(__BYTE_ORDER) && defined(__LITTLE_ENDIAN) && __BYTE_ORDER == __LITTLE_ENDIAN return DRFLAC_TRUE; #else int n = 1; return (*(char*)&n) == 1; #endif } static DRFLAC_INLINE drflac_uint16 drflac__swap_endian_uint16(drflac_uint16 n) { #ifdef DRFLAC_HAS_BYTESWAP16_INTRINSIC #if defined(_MSC_VER) && !defined(__clang__) return _byteswap_ushort(n); #elif defined(__GNUC__) || defined(__clang__) return __builtin_bswap16(n); #elif defined(__WATCOMC__) && defined(__386__) return _watcom_bswap16(n); #else #error "This compiler does not support the byte swap intrinsic." #endif #else return ((n & 0xFF00) >> 8) | ((n & 0x00FF) << 8); #endif } static DRFLAC_INLINE drflac_uint32 drflac__swap_endian_uint32(drflac_uint32 n) { #ifdef DRFLAC_HAS_BYTESWAP32_INTRINSIC #if defined(_MSC_VER) && !defined(__clang__) return _byteswap_ulong(n); #elif defined(__GNUC__) || defined(__clang__) #if defined(DRFLAC_ARM) && (defined(__ARM_ARCH) && __ARM_ARCH >= 6) && !defined(DRFLAC_64BIT) /* <-- 64-bit inline assembly has not been tested, so disabling for now. */ /* Inline assembly optimized implementation for ARM. In my testing, GCC does not generate optimized code with __builtin_bswap32(). */ drflac_uint32 r; __asm__ __volatile__ ( #if defined(DRFLAC_64BIT) "rev %w[out], %w[in]" : [out]"=r"(r) : [in]"r"(n) /* <-- This is untested. If someone in the community could test this, that would be appreciated! */ #else "rev %[out], %[in]" : [out]"=r"(r) : [in]"r"(n) #endif ); return r; #else return __builtin_bswap32(n); #endif #elif defined(__WATCOMC__) && defined(__386__) return _watcom_bswap32(n); #else #error "This compiler does not support the byte swap intrinsic." #endif #else return ((n & 0xFF000000) >> 24) | ((n & 0x00FF0000) >> 8) | ((n & 0x0000FF00) << 8) | ((n & 0x000000FF) << 24); #endif } static DRFLAC_INLINE drflac_uint64 drflac__swap_endian_uint64(drflac_uint64 n) { #ifdef DRFLAC_HAS_BYTESWAP64_INTRINSIC #if defined(_MSC_VER) && !defined(__clang__) return _byteswap_uint64(n); #elif defined(__GNUC__) || defined(__clang__) return __builtin_bswap64(n); #elif defined(__WATCOMC__) && defined(__386__) return _watcom_bswap64(n); #else #error "This compiler does not support the byte swap intrinsic." #endif #else /* Weird "<< 32" bitshift is required for C89 because it doesn't support 64-bit constants. Should be optimized out by a good compiler. */ return ((n & ((drflac_uint64)0xFF000000 << 32)) >> 56) | ((n & ((drflac_uint64)0x00FF0000 << 32)) >> 40) | ((n & ((drflac_uint64)0x0000FF00 << 32)) >> 24) | ((n & ((drflac_uint64)0x000000FF << 32)) >> 8) | ((n & ((drflac_uint64)0xFF000000 )) << 8) | ((n & ((drflac_uint64)0x00FF0000 )) << 24) | ((n & ((drflac_uint64)0x0000FF00 )) << 40) | ((n & ((drflac_uint64)0x000000FF )) << 56); #endif } static DRFLAC_INLINE drflac_uint16 drflac__be2host_16(drflac_uint16 n) { if (drflac__is_little_endian()) { return drflac__swap_endian_uint16(n); } return n; } static DRFLAC_INLINE drflac_uint32 drflac__be2host_32(drflac_uint32 n) { if (drflac__is_little_endian()) { return drflac__swap_endian_uint32(n); } return n; } static DRFLAC_INLINE drflac_uint32 drflac__be2host_32_ptr_unaligned(const void* pData) { const drflac_uint8* pNum = (drflac_uint8*)pData; return *(pNum) << 24 | *(pNum+1) << 16 | *(pNum+2) << 8 | *(pNum+3); } static DRFLAC_INLINE drflac_uint64 drflac__be2host_64(drflac_uint64 n) { if (drflac__is_little_endian()) { return drflac__swap_endian_uint64(n); } return n; } static DRFLAC_INLINE drflac_uint32 drflac__le2host_32(drflac_uint32 n) { if (!drflac__is_little_endian()) { return drflac__swap_endian_uint32(n); } return n; } static DRFLAC_INLINE drflac_uint32 drflac__le2host_32_ptr_unaligned(const void* pData) { const drflac_uint8* pNum = (drflac_uint8*)pData; return *pNum | *(pNum+1) << 8 | *(pNum+2) << 16 | *(pNum+3) << 24; } static DRFLAC_INLINE drflac_uint32 drflac__unsynchsafe_32(drflac_uint32 n) { drflac_uint32 result = 0; result |= (n & 0x7F000000) >> 3; result |= (n & 0x007F0000) >> 2; result |= (n & 0x00007F00) >> 1; result |= (n & 0x0000007F) >> 0; return result; } /* The CRC code below is based on this document: http://zlib.net/crc_v3.txt */ static drflac_uint8 drflac__crc8_table[] = { 0x00, 0x07, 0x0E, 0x09, 0x1C, 0x1B, 0x12, 0x15, 0x38, 0x3F, 0x36, 0x31, 0x24, 0x23, 0x2A, 0x2D, 0x70, 0x77, 0x7E, 0x79, 0x6C, 0x6B, 0x62, 0x65, 0x48, 0x4F, 0x46, 0x41, 0x54, 0x53, 0x5A, 0x5D, 0xE0, 0xE7, 0xEE, 0xE9, 0xFC, 0xFB, 0xF2, 0xF5, 0xD8, 0xDF, 0xD6, 0xD1, 0xC4, 0xC3, 0xCA, 0xCD, 0x90, 0x97, 0x9E, 0x99, 0x8C, 0x8B, 0x82, 0x85, 0xA8, 0xAF, 0xA6, 0xA1, 0xB4, 0xB3, 0xBA, 0xBD, 0xC7, 0xC0, 0xC9, 0xCE, 0xDB, 0xDC, 0xD5, 0xD2, 0xFF, 0xF8, 0xF1, 0xF6, 0xE3, 0xE4, 0xED, 0xEA, 0xB7, 0xB0, 0xB9, 0xBE, 0xAB, 0xAC, 0xA5, 0xA2, 0x8F, 0x88, 0x81, 0x86, 0x93, 0x94, 0x9D, 0x9A, 0x27, 0x20, 0x29, 0x2E, 0x3B, 0x3C, 0x35, 0x32, 0x1F, 0x18, 0x11, 0x16, 0x03, 0x04, 0x0D, 0x0A, 0x57, 0x50, 0x59, 0x5E, 0x4B, 0x4C, 0x45, 0x42, 0x6F, 0x68, 0x61, 0x66, 0x73, 0x74, 0x7D, 0x7A, 0x89, 0x8E, 0x87, 0x80, 0x95, 0x92, 0x9B, 0x9C, 0xB1, 0xB6, 0xBF, 0xB8, 0xAD, 0xAA, 0xA3, 0xA4, 0xF9, 0xFE, 0xF7, 0xF0, 0xE5, 0xE2, 0xEB, 0xEC, 0xC1, 0xC6, 0xCF, 0xC8, 0xDD, 0xDA, 0xD3, 0xD4, 0x69, 0x6E, 0x67, 0x60, 0x75, 0x72, 0x7B, 0x7C, 0x51, 0x56, 0x5F, 0x58, 0x4D, 0x4A, 0x43, 0x44, 0x19, 0x1E, 0x17, 0x10, 0x05, 0x02, 0x0B, 0x0C, 0x21, 0x26, 0x2F, 0x28, 0x3D, 0x3A, 0x33, 0x34, 0x4E, 0x49, 0x40, 0x47, 0x52, 0x55, 0x5C, 0x5B, 0x76, 0x71, 0x78, 0x7F, 0x6A, 0x6D, 0x64, 0x63, 0x3E, 0x39, 0x30, 0x37, 0x22, 0x25, 0x2C, 0x2B, 0x06, 0x01, 0x08, 0x0F, 0x1A, 0x1D, 0x14, 0x13, 0xAE, 0xA9, 0xA0, 0xA7, 0xB2, 0xB5, 0xBC, 0xBB, 0x96, 0x91, 0x98, 0x9F, 0x8A, 0x8D, 0x84, 0x83, 0xDE, 0xD9, 0xD0, 0xD7, 0xC2, 0xC5, 0xCC, 0xCB, 0xE6, 0xE1, 0xE8, 0xEF, 0xFA, 0xFD, 0xF4, 0xF3 }; static drflac_uint16 drflac__crc16_table[] = { 0x0000, 0x8005, 0x800F, 0x000A, 0x801B, 0x001E, 0x0014, 0x8011, 0x8033, 0x0036, 0x003C, 0x8039, 0x0028, 0x802D, 0x8027, 0x0022, 0x8063, 0x0066, 0x006C, 0x8069, 0x0078, 0x807D, 0x8077, 0x0072, 0x0050, 0x8055, 0x805F, 0x005A, 0x804B, 0x004E, 0x0044, 0x8041, 0x80C3, 0x00C6, 0x00CC, 0x80C9, 0x00D8, 0x80DD, 0x80D7, 0x00D2, 0x00F0, 0x80F5, 0x80FF, 0x00FA, 0x80EB, 0x00EE, 0x00E4, 0x80E1, 0x00A0, 0x80A5, 0x80AF, 0x00AA, 0x80BB, 0x00BE, 0x00B4, 0x80B1, 0x8093, 0x0096, 0x009C, 0x8099, 0x0088, 0x808D, 0x8087, 0x0082, 0x8183, 0x0186, 0x018C, 0x8189, 0x0198, 0x819D, 0x8197, 0x0192, 0x01B0, 0x81B5, 0x81BF, 0x01BA, 0x81AB, 0x01AE, 0x01A4, 0x81A1, 0x01E0, 0x81E5, 0x81EF, 0x01EA, 0x81FB, 0x01FE, 0x01F4, 0x81F1, 0x81D3, 0x01D6, 0x01DC, 0x81D9, 0x01C8, 0x81CD, 0x81C7, 0x01C2, 0x0140, 0x8145, 0x814F, 0x014A, 0x815B, 0x015E, 0x0154, 0x8151, 0x8173, 0x0176, 0x017C, 0x8179, 0x0168, 0x816D, 0x8167, 0x0162, 0x8123, 0x0126, 0x012C, 0x8129, 0x0138, 0x813D, 0x8137, 0x0132, 0x0110, 0x8115, 0x811F, 0x011A, 0x810B, 0x010E, 0x0104, 0x8101, 0x8303, 0x0306, 0x030C, 0x8309, 0x0318, 0x831D, 0x8317, 0x0312, 0x0330, 0x8335, 0x833F, 0x033A, 0x832B, 0x032E, 0x0324, 0x8321, 0x0360, 0x8365, 0x836F, 0x036A, 0x837B, 0x037E, 0x0374, 0x8371, 0x8353, 0x0356, 0x035C, 0x8359, 0x0348, 0x834D, 0x8347, 0x0342, 0x03C0, 0x83C5, 0x83CF, 0x03CA, 0x83DB, 0x03DE, 0x03D4, 0x83D1, 0x83F3, 0x03F6, 0x03FC, 0x83F9, 0x03E8, 0x83ED, 0x83E7, 0x03E2, 0x83A3, 0x03A6, 0x03AC, 0x83A9, 0x03B8, 0x83BD, 0x83B7, 0x03B2, 0x0390, 0x8395, 0x839F, 0x039A, 0x838B, 0x038E, 0x0384, 0x8381, 0x0280, 0x8285, 0x828F, 0x028A, 0x829B, 0x029E, 0x0294, 0x8291, 0x82B3, 0x02B6, 0x02BC, 0x82B9, 0x02A8, 0x82AD, 0x82A7, 0x02A2, 0x82E3, 0x02E6, 0x02EC, 0x82E9, 0x02F8, 0x82FD, 0x82F7, 0x02F2, 0x02D0, 0x82D5, 0x82DF, 0x02DA, 0x82CB, 0x02CE, 0x02C4, 0x82C1, 0x8243, 0x0246, 0x024C, 0x8249, 0x0258, 0x825D, 0x8257, 0x0252, 0x0270, 0x8275, 0x827F, 0x027A, 0x826B, 0x026E, 0x0264, 0x8261, 0x0220, 0x8225, 0x822F, 0x022A, 0x823B, 0x023E, 0x0234, 0x8231, 0x8213, 0x0216, 0x021C, 0x8219, 0x0208, 0x820D, 0x8207, 0x0202 }; static DRFLAC_INLINE drflac_uint8 drflac_crc8_byte(drflac_uint8 crc, drflac_uint8 data) { return drflac__crc8_table[crc ^ data]; } static DRFLAC_INLINE drflac_uint8 drflac_crc8(drflac_uint8 crc, drflac_uint32 data, drflac_uint32 count) { #ifdef DR_FLAC_NO_CRC (void)crc; (void)data; (void)count; return 0; #else #if 0 /* REFERENCE (use of this implementation requires an explicit flush by doing "drflac_crc8(crc, 0, 8);") */ drflac_uint8 p = 0x07; for (int i = count-1; i >= 0; --i) { drflac_uint8 bit = (data & (1 << i)) >> i; if (crc & 0x80) { crc = ((crc << 1) | bit) ^ p; } else { crc = ((crc << 1) | bit); } } return crc; #else drflac_uint32 wholeBytes; drflac_uint32 leftoverBits; drflac_uint64 leftoverDataMask; static drflac_uint64 leftoverDataMaskTable[8] = { 0x00, 0x01, 0x03, 0x07, 0x0F, 0x1F, 0x3F, 0x7F }; DRFLAC_ASSERT(count <= 32); wholeBytes = count >> 3; leftoverBits = count - (wholeBytes*8); leftoverDataMask = leftoverDataMaskTable[leftoverBits]; switch (wholeBytes) { case 4: crc = drflac_crc8_byte(crc, (drflac_uint8)((data & (0xFF000000UL << leftoverBits)) >> (24 + leftoverBits))); case 3: crc = drflac_crc8_byte(crc, (drflac_uint8)((data & (0x00FF0000UL << leftoverBits)) >> (16 + leftoverBits))); case 2: crc = drflac_crc8_byte(crc, (drflac_uint8)((data & (0x0000FF00UL << leftoverBits)) >> ( 8 + leftoverBits))); case 1: crc = drflac_crc8_byte(crc, (drflac_uint8)((data & (0x000000FFUL << leftoverBits)) >> ( 0 + leftoverBits))); case 0: if (leftoverBits > 0) crc = (drflac_uint8)((crc << leftoverBits) ^ drflac__crc8_table[(crc >> (8 - leftoverBits)) ^ (data & leftoverDataMask)]); } return crc; #endif #endif } static DRFLAC_INLINE drflac_uint16 drflac_crc16_byte(drflac_uint16 crc, drflac_uint8 data) { return (crc << 8) ^ drflac__crc16_table[(drflac_uint8)(crc >> 8) ^ data]; } static DRFLAC_INLINE drflac_uint16 drflac_crc16_cache(drflac_uint16 crc, drflac_cache_t data) { #ifdef DRFLAC_64BIT crc = drflac_crc16_byte(crc, (drflac_uint8)((data >> 56) & 0xFF)); crc = drflac_crc16_byte(crc, (drflac_uint8)((data >> 48) & 0xFF)); crc = drflac_crc16_byte(crc, (drflac_uint8)((data >> 40) & 0xFF)); crc = drflac_crc16_byte(crc, (drflac_uint8)((data >> 32) & 0xFF)); #endif crc = drflac_crc16_byte(crc, (drflac_uint8)((data >> 24) & 0xFF)); crc = drflac_crc16_byte(crc, (drflac_uint8)((data >> 16) & 0xFF)); crc = drflac_crc16_byte(crc, (drflac_uint8)((data >> 8) & 0xFF)); crc = drflac_crc16_byte(crc, (drflac_uint8)((data >> 0) & 0xFF)); return crc; } static DRFLAC_INLINE drflac_uint16 drflac_crc16_bytes(drflac_uint16 crc, drflac_cache_t data, drflac_uint32 byteCount) { switch (byteCount) { #ifdef DRFLAC_64BIT case 8: crc = drflac_crc16_byte(crc, (drflac_uint8)((data >> 56) & 0xFF)); case 7: crc = drflac_crc16_byte(crc, (drflac_uint8)((data >> 48) & 0xFF)); case 6: crc = drflac_crc16_byte(crc, (drflac_uint8)((data >> 40) & 0xFF)); case 5: crc = drflac_crc16_byte(crc, (drflac_uint8)((data >> 32) & 0xFF)); #endif case 4: crc = drflac_crc16_byte(crc, (drflac_uint8)((data >> 24) & 0xFF)); case 3: crc = drflac_crc16_byte(crc, (drflac_uint8)((data >> 16) & 0xFF)); case 2: crc = drflac_crc16_byte(crc, (drflac_uint8)((data >> 8) & 0xFF)); case 1: crc = drflac_crc16_byte(crc, (drflac_uint8)((data >> 0) & 0xFF)); } return crc; } #if 0 static DRFLAC_INLINE drflac_uint16 drflac_crc16__32bit(drflac_uint16 crc, drflac_uint32 data, drflac_uint32 count) { #ifdef DR_FLAC_NO_CRC (void)crc; (void)data; (void)count; return 0; #else #if 0 /* REFERENCE (use of this implementation requires an explicit flush by doing "drflac_crc16(crc, 0, 16);") */ drflac_uint16 p = 0x8005; for (int i = count-1; i >= 0; --i) { drflac_uint16 bit = (data & (1ULL << i)) >> i; if (r & 0x8000) { r = ((r << 1) | bit) ^ p; } else { r = ((r << 1) | bit); } } return crc; #else drflac_uint32 wholeBytes; drflac_uint32 leftoverBits; drflac_uint64 leftoverDataMask; static drflac_uint64 leftoverDataMaskTable[8] = { 0x00, 0x01, 0x03, 0x07, 0x0F, 0x1F, 0x3F, 0x7F }; DRFLAC_ASSERT(count <= 64); wholeBytes = count >> 3; leftoverBits = count & 7; leftoverDataMask = leftoverDataMaskTable[leftoverBits]; switch (wholeBytes) { default: case 4: crc = drflac_crc16_byte(crc, (drflac_uint8)((data & (0xFF000000UL << leftoverBits)) >> (24 + leftoverBits))); case 3: crc = drflac_crc16_byte(crc, (drflac_uint8)((data & (0x00FF0000UL << leftoverBits)) >> (16 + leftoverBits))); case 2: crc = drflac_crc16_byte(crc, (drflac_uint8)((data & (0x0000FF00UL << leftoverBits)) >> ( 8 + leftoverBits))); case 1: crc = drflac_crc16_byte(crc, (drflac_uint8)((data & (0x000000FFUL << leftoverBits)) >> ( 0 + leftoverBits))); case 0: if (leftoverBits > 0) crc = (crc << leftoverBits) ^ drflac__crc16_table[(crc >> (16 - leftoverBits)) ^ (data & leftoverDataMask)]; } return crc; #endif #endif } static DRFLAC_INLINE drflac_uint16 drflac_crc16__64bit(drflac_uint16 crc, drflac_uint64 data, drflac_uint32 count) { #ifdef DR_FLAC_NO_CRC (void)crc; (void)data; (void)count; return 0; #else drflac_uint32 wholeBytes; drflac_uint32 leftoverBits; drflac_uint64 leftoverDataMask; static drflac_uint64 leftoverDataMaskTable[8] = { 0x00, 0x01, 0x03, 0x07, 0x0F, 0x1F, 0x3F, 0x7F }; DRFLAC_ASSERT(count <= 64); wholeBytes = count >> 3; leftoverBits = count & 7; leftoverDataMask = leftoverDataMaskTable[leftoverBits]; switch (wholeBytes) { default: case 8: crc = drflac_crc16_byte(crc, (drflac_uint8)((data & (((drflac_uint64)0xFF000000 << 32) << leftoverBits)) >> (56 + leftoverBits))); /* Weird "<< 32" bitshift is required for C89 because it doesn't support 64-bit constants. Should be optimized out by a good compiler. */ case 7: crc = drflac_crc16_byte(crc, (drflac_uint8)((data & (((drflac_uint64)0x00FF0000 << 32) << leftoverBits)) >> (48 + leftoverBits))); case 6: crc = drflac_crc16_byte(crc, (drflac_uint8)((data & (((drflac_uint64)0x0000FF00 << 32) << leftoverBits)) >> (40 + leftoverBits))); case 5: crc = drflac_crc16_byte(crc, (drflac_uint8)((data & (((drflac_uint64)0x000000FF << 32) << leftoverBits)) >> (32 + leftoverBits))); case 4: crc = drflac_crc16_byte(crc, (drflac_uint8)((data & (((drflac_uint64)0xFF000000 ) << leftoverBits)) >> (24 + leftoverBits))); case 3: crc = drflac_crc16_byte(crc, (drflac_uint8)((data & (((drflac_uint64)0x00FF0000 ) << leftoverBits)) >> (16 + leftoverBits))); case 2: crc = drflac_crc16_byte(crc, (drflac_uint8)((data & (((drflac_uint64)0x0000FF00 ) << leftoverBits)) >> ( 8 + leftoverBits))); case 1: crc = drflac_crc16_byte(crc, (drflac_uint8)((data & (((drflac_uint64)0x000000FF ) << leftoverBits)) >> ( 0 + leftoverBits))); case 0: if (leftoverBits > 0) crc = (crc << leftoverBits) ^ drflac__crc16_table[(crc >> (16 - leftoverBits)) ^ (data & leftoverDataMask)]; } return crc; #endif } static DRFLAC_INLINE drflac_uint16 drflac_crc16(drflac_uint16 crc, drflac_cache_t data, drflac_uint32 count) { #ifdef DRFLAC_64BIT return drflac_crc16__64bit(crc, data, count); #else return drflac_crc16__32bit(crc, data, count); #endif } #endif #ifdef DRFLAC_64BIT #define drflac__be2host__cache_line drflac__be2host_64 #else #define drflac__be2host__cache_line drflac__be2host_32 #endif /* BIT READING ATTEMPT #2 This uses a 32- or 64-bit bit-shifted cache - as bits are read, the cache is shifted such that the first valid bit is sitting on the most significant bit. It uses the notion of an L1 and L2 cache (borrowed from CPU architecture), where the L1 cache is a 32- or 64-bit unsigned integer (depending on whether or not a 32- or 64-bit build is being compiled) and the L2 is an array of "cache lines", with each cache line being the same size as the L1. The L2 is a buffer of about 4KB and is where data from onRead() is read into. */ #define DRFLAC_CACHE_L1_SIZE_BYTES(bs) (sizeof((bs)->cache)) #define DRFLAC_CACHE_L1_SIZE_BITS(bs) (sizeof((bs)->cache)*8) #define DRFLAC_CACHE_L1_BITS_REMAINING(bs) (DRFLAC_CACHE_L1_SIZE_BITS(bs) - (bs)->consumedBits) #define DRFLAC_CACHE_L1_SELECTION_MASK(_bitCount) (~((~(drflac_cache_t)0) >> (_bitCount))) #define DRFLAC_CACHE_L1_SELECTION_SHIFT(bs, _bitCount) (DRFLAC_CACHE_L1_SIZE_BITS(bs) - (_bitCount)) #define DRFLAC_CACHE_L1_SELECT(bs, _bitCount) (((bs)->cache) & DRFLAC_CACHE_L1_SELECTION_MASK(_bitCount)) #define DRFLAC_CACHE_L1_SELECT_AND_SHIFT(bs, _bitCount) (DRFLAC_CACHE_L1_SELECT((bs), (_bitCount)) >> DRFLAC_CACHE_L1_SELECTION_SHIFT((bs), (_bitCount))) #define DRFLAC_CACHE_L1_SELECT_AND_SHIFT_SAFE(bs, _bitCount)(DRFLAC_CACHE_L1_SELECT((bs), (_bitCount)) >> (DRFLAC_CACHE_L1_SELECTION_SHIFT((bs), (_bitCount)) & (DRFLAC_CACHE_L1_SIZE_BITS(bs)-1))) #define DRFLAC_CACHE_L2_SIZE_BYTES(bs) (sizeof((bs)->cacheL2)) #define DRFLAC_CACHE_L2_LINE_COUNT(bs) (DRFLAC_CACHE_L2_SIZE_BYTES(bs) / sizeof((bs)->cacheL2[0])) #define DRFLAC_CACHE_L2_LINES_REMAINING(bs) (DRFLAC_CACHE_L2_LINE_COUNT(bs) - (bs)->nextL2Line) #ifndef DR_FLAC_NO_CRC static DRFLAC_INLINE void drflac__reset_crc16(drflac_bs* bs) { bs->crc16 = 0; bs->crc16CacheIgnoredBytes = bs->consumedBits >> 3; } static DRFLAC_INLINE void drflac__update_crc16(drflac_bs* bs) { if (bs->crc16CacheIgnoredBytes == 0) { bs->crc16 = drflac_crc16_cache(bs->crc16, bs->crc16Cache); } else { bs->crc16 = drflac_crc16_bytes(bs->crc16, bs->crc16Cache, DRFLAC_CACHE_L1_SIZE_BYTES(bs) - bs->crc16CacheIgnoredBytes); bs->crc16CacheIgnoredBytes = 0; } } static DRFLAC_INLINE drflac_uint16 drflac__flush_crc16(drflac_bs* bs) { /* We should never be flushing in a situation where we are not aligned on a byte boundary. */ DRFLAC_ASSERT((DRFLAC_CACHE_L1_BITS_REMAINING(bs) & 7) == 0); /* The bits that were read from the L1 cache need to be accumulated. The number of bytes needing to be accumulated is determined by the number of bits that have been consumed. */ if (DRFLAC_CACHE_L1_BITS_REMAINING(bs) == 0) { drflac__update_crc16(bs); } else { /* We only accumulate the consumed bits. */ bs->crc16 = drflac_crc16_bytes(bs->crc16, bs->crc16Cache >> DRFLAC_CACHE_L1_BITS_REMAINING(bs), (bs->consumedBits >> 3) - bs->crc16CacheIgnoredBytes); /* The bits that we just accumulated should never be accumulated again. We need to keep track of how many bytes were accumulated so we can handle that later. */ bs->crc16CacheIgnoredBytes = bs->consumedBits >> 3; } return bs->crc16; } #endif static DRFLAC_INLINE drflac_bool32 drflac__reload_l1_cache_from_l2(drflac_bs* bs) { size_t bytesRead; size_t alignedL1LineCount; /* Fast path. Try loading straight from L2. */ if (bs->nextL2Line < DRFLAC_CACHE_L2_LINE_COUNT(bs)) { bs->cache = bs->cacheL2[bs->nextL2Line++]; return DRFLAC_TRUE; } /* If we get here it means we've run out of data in the L2 cache. We'll need to fetch more from the client, if there's any left. */ if (bs->unalignedByteCount > 0) { return DRFLAC_FALSE; /* If we have any unaligned bytes it means there's no more aligned bytes left in the client. */ } bytesRead = bs->onRead(bs->pUserData, bs->cacheL2, DRFLAC_CACHE_L2_SIZE_BYTES(bs)); bs->nextL2Line = 0; if (bytesRead == DRFLAC_CACHE_L2_SIZE_BYTES(bs)) { bs->cache = bs->cacheL2[bs->nextL2Line++]; return DRFLAC_TRUE; } /* If we get here it means we were unable to retrieve enough data to fill the entire L2 cache. It probably means we've just reached the end of the file. We need to move the valid data down to the end of the buffer and adjust the index of the next line accordingly. Also keep in mind that the L2 cache must be aligned to the size of the L1 so we'll need to seek backwards by any misaligned bytes. */ alignedL1LineCount = bytesRead / DRFLAC_CACHE_L1_SIZE_BYTES(bs); /* We need to keep track of any unaligned bytes for later use. */ bs->unalignedByteCount = bytesRead - (alignedL1LineCount * DRFLAC_CACHE_L1_SIZE_BYTES(bs)); if (bs->unalignedByteCount > 0) { bs->unalignedCache = bs->cacheL2[alignedL1LineCount]; } if (alignedL1LineCount > 0) { size_t offset = DRFLAC_CACHE_L2_LINE_COUNT(bs) - alignedL1LineCount; size_t i; for (i = alignedL1LineCount; i > 0; --i) { bs->cacheL2[i-1 + offset] = bs->cacheL2[i-1]; } bs->nextL2Line = (drflac_uint32)offset; bs->cache = bs->cacheL2[bs->nextL2Line++]; return DRFLAC_TRUE; } else { /* If we get into this branch it means we weren't able to load any L1-aligned data. */ bs->nextL2Line = DRFLAC_CACHE_L2_LINE_COUNT(bs); return DRFLAC_FALSE; } } static drflac_bool32 drflac__reload_cache(drflac_bs* bs) { size_t bytesRead; #ifndef DR_FLAC_NO_CRC drflac__update_crc16(bs); #endif /* Fast path. Try just moving the next value in the L2 cache to the L1 cache. */ if (drflac__reload_l1_cache_from_l2(bs)) { bs->cache = drflac__be2host__cache_line(bs->cache); bs->consumedBits = 0; #ifndef DR_FLAC_NO_CRC bs->crc16Cache = bs->cache; #endif return DRFLAC_TRUE; } /* Slow path. */ /* If we get here it means we have failed to load the L1 cache from the L2. Likely we've just reached the end of the stream and the last few bytes did not meet the alignment requirements for the L2 cache. In this case we need to fall back to a slower path and read the data from the unaligned cache. */ bytesRead = bs->unalignedByteCount; if (bytesRead == 0) { bs->consumedBits = DRFLAC_CACHE_L1_SIZE_BITS(bs); /* <-- The stream has been exhausted, so marked the bits as consumed. */ return DRFLAC_FALSE; } DRFLAC_ASSERT(bytesRead < DRFLAC_CACHE_L1_SIZE_BYTES(bs)); bs->consumedBits = (drflac_uint32)(DRFLAC_CACHE_L1_SIZE_BYTES(bs) - bytesRead) * 8; bs->cache = drflac__be2host__cache_line(bs->unalignedCache); bs->cache &= DRFLAC_CACHE_L1_SELECTION_MASK(DRFLAC_CACHE_L1_BITS_REMAINING(bs)); /* <-- Make sure the consumed bits are always set to zero. Other parts of the library depend on this property. */ bs->unalignedByteCount = 0; /* <-- At this point the unaligned bytes have been moved into the cache and we thus have no more unaligned bytes. */ #ifndef DR_FLAC_NO_CRC bs->crc16Cache = bs->cache >> bs->consumedBits; bs->crc16CacheIgnoredBytes = bs->consumedBits >> 3; #endif return DRFLAC_TRUE; } static void drflac__reset_cache(drflac_bs* bs) { bs->nextL2Line = DRFLAC_CACHE_L2_LINE_COUNT(bs); /* <-- This clears the L2 cache. */ bs->consumedBits = DRFLAC_CACHE_L1_SIZE_BITS(bs); /* <-- This clears the L1 cache. */ bs->cache = 0; bs->unalignedByteCount = 0; /* <-- This clears the trailing unaligned bytes. */ bs->unalignedCache = 0; #ifndef DR_FLAC_NO_CRC bs->crc16Cache = 0; bs->crc16CacheIgnoredBytes = 0; #endif } static DRFLAC_INLINE drflac_bool32 drflac__read_uint32(drflac_bs* bs, unsigned int bitCount, drflac_uint32* pResultOut) { DRFLAC_ASSERT(bs != NULL); DRFLAC_ASSERT(pResultOut != NULL); DRFLAC_ASSERT(bitCount > 0); DRFLAC_ASSERT(bitCount <= 32); if (bs->consumedBits == DRFLAC_CACHE_L1_SIZE_BITS(bs)) { if (!drflac__reload_cache(bs)) { return DRFLAC_FALSE; } } if (bitCount <= DRFLAC_CACHE_L1_BITS_REMAINING(bs)) { /* If we want to load all 32-bits from a 32-bit cache we need to do it slightly differently because we can't do a 32-bit shift on a 32-bit integer. This will never be the case on 64-bit caches, so we can have a slightly more optimal solution for this. */ #ifdef DRFLAC_64BIT *pResultOut = (drflac_uint32)DRFLAC_CACHE_L1_SELECT_AND_SHIFT(bs, bitCount); bs->consumedBits += bitCount; bs->cache <<= bitCount; #else if (bitCount < DRFLAC_CACHE_L1_SIZE_BITS(bs)) { *pResultOut = (drflac_uint32)DRFLAC_CACHE_L1_SELECT_AND_SHIFT(bs, bitCount); bs->consumedBits += bitCount; bs->cache <<= bitCount; } else { /* Cannot shift by 32-bits, so need to do it differently. */ *pResultOut = (drflac_uint32)bs->cache; bs->consumedBits = DRFLAC_CACHE_L1_SIZE_BITS(bs); bs->cache = 0; } #endif return DRFLAC_TRUE; } else { /* It straddles the cached data. It will never cover more than the next chunk. We just read the number in two parts and combine them. */ drflac_uint32 bitCountHi = DRFLAC_CACHE_L1_BITS_REMAINING(bs); drflac_uint32 bitCountLo = bitCount - bitCountHi; drflac_uint32 resultHi; DRFLAC_ASSERT(bitCountHi > 0); DRFLAC_ASSERT(bitCountHi < 32); resultHi = (drflac_uint32)DRFLAC_CACHE_L1_SELECT_AND_SHIFT(bs, bitCountHi); if (!drflac__reload_cache(bs)) { return DRFLAC_FALSE; } if (bitCountLo > DRFLAC_CACHE_L1_BITS_REMAINING(bs)) { /* This happens when we get to end of stream */ return DRFLAC_FALSE; } *pResultOut = (resultHi << bitCountLo) | (drflac_uint32)DRFLAC_CACHE_L1_SELECT_AND_SHIFT(bs, bitCountLo); bs->consumedBits += bitCountLo; bs->cache <<= bitCountLo; return DRFLAC_TRUE; } } static drflac_bool32 drflac__read_int32(drflac_bs* bs, unsigned int bitCount, drflac_int32* pResult) { drflac_uint32 result; DRFLAC_ASSERT(bs != NULL); DRFLAC_ASSERT(pResult != NULL); DRFLAC_ASSERT(bitCount > 0); DRFLAC_ASSERT(bitCount <= 32); if (!drflac__read_uint32(bs, bitCount, &result)) { return DRFLAC_FALSE; } /* Do not attempt to shift by 32 as it's undefined. */ if (bitCount < 32) { drflac_uint32 signbit; signbit = ((result >> (bitCount-1)) & 0x01); result |= (~signbit + 1) << bitCount; } *pResult = (drflac_int32)result; return DRFLAC_TRUE; } #ifdef DRFLAC_64BIT static drflac_bool32 drflac__read_uint64(drflac_bs* bs, unsigned int bitCount, drflac_uint64* pResultOut) { drflac_uint32 resultHi; drflac_uint32 resultLo; DRFLAC_ASSERT(bitCount <= 64); DRFLAC_ASSERT(bitCount > 32); if (!drflac__read_uint32(bs, bitCount - 32, &resultHi)) { return DRFLAC_FALSE; } if (!drflac__read_uint32(bs, 32, &resultLo)) { return DRFLAC_FALSE; } *pResultOut = (((drflac_uint64)resultHi) << 32) | ((drflac_uint64)resultLo); return DRFLAC_TRUE; } #endif /* Function below is unused, but leaving it here in case I need to quickly add it again. */ #if 0 static drflac_bool32 drflac__read_int64(drflac_bs* bs, unsigned int bitCount, drflac_int64* pResultOut) { drflac_uint64 result; drflac_uint64 signbit; DRFLAC_ASSERT(bitCount <= 64); if (!drflac__read_uint64(bs, bitCount, &result)) { return DRFLAC_FALSE; } signbit = ((result >> (bitCount-1)) & 0x01); result |= (~signbit + 1) << bitCount; *pResultOut = (drflac_int64)result; return DRFLAC_TRUE; } #endif static drflac_bool32 drflac__read_uint16(drflac_bs* bs, unsigned int bitCount, drflac_uint16* pResult) { drflac_uint32 result; DRFLAC_ASSERT(bs != NULL); DRFLAC_ASSERT(pResult != NULL); DRFLAC_ASSERT(bitCount > 0); DRFLAC_ASSERT(bitCount <= 16); if (!drflac__read_uint32(bs, bitCount, &result)) { return DRFLAC_FALSE; } *pResult = (drflac_uint16)result; return DRFLAC_TRUE; } #if 0 static drflac_bool32 drflac__read_int16(drflac_bs* bs, unsigned int bitCount, drflac_int16* pResult) { drflac_int32 result; DRFLAC_ASSERT(bs != NULL); DRFLAC_ASSERT(pResult != NULL); DRFLAC_ASSERT(bitCount > 0); DRFLAC_ASSERT(bitCount <= 16); if (!drflac__read_int32(bs, bitCount, &result)) { return DRFLAC_FALSE; } *pResult = (drflac_int16)result; return DRFLAC_TRUE; } #endif static drflac_bool32 drflac__read_uint8(drflac_bs* bs, unsigned int bitCount, drflac_uint8* pResult) { drflac_uint32 result; DRFLAC_ASSERT(bs != NULL); DRFLAC_ASSERT(pResult != NULL); DRFLAC_ASSERT(bitCount > 0); DRFLAC_ASSERT(bitCount <= 8); if (!drflac__read_uint32(bs, bitCount, &result)) { return DRFLAC_FALSE; } *pResult = (drflac_uint8)result; return DRFLAC_TRUE; } static drflac_bool32 drflac__read_int8(drflac_bs* bs, unsigned int bitCount, drflac_int8* pResult) { drflac_int32 result; DRFLAC_ASSERT(bs != NULL); DRFLAC_ASSERT(pResult != NULL); DRFLAC_ASSERT(bitCount > 0); DRFLAC_ASSERT(bitCount <= 8); if (!drflac__read_int32(bs, bitCount, &result)) { return DRFLAC_FALSE; } *pResult = (drflac_int8)result; return DRFLAC_TRUE; } static drflac_bool32 drflac__seek_bits(drflac_bs* bs, size_t bitsToSeek) { if (bitsToSeek <= DRFLAC_CACHE_L1_BITS_REMAINING(bs)) { bs->consumedBits += (drflac_uint32)bitsToSeek; bs->cache <<= bitsToSeek; return DRFLAC_TRUE; } else { /* It straddles the cached data. This function isn't called too frequently so I'm favouring simplicity here. */ bitsToSeek -= DRFLAC_CACHE_L1_BITS_REMAINING(bs); bs->consumedBits += DRFLAC_CACHE_L1_BITS_REMAINING(bs); bs->cache = 0; /* Simple case. Seek in groups of the same number as bits that fit within a cache line. */ #ifdef DRFLAC_64BIT while (bitsToSeek >= DRFLAC_CACHE_L1_SIZE_BITS(bs)) { drflac_uint64 bin; if (!drflac__read_uint64(bs, DRFLAC_CACHE_L1_SIZE_BITS(bs), &bin)) { return DRFLAC_FALSE; } bitsToSeek -= DRFLAC_CACHE_L1_SIZE_BITS(bs); } #else while (bitsToSeek >= DRFLAC_CACHE_L1_SIZE_BITS(bs)) { drflac_uint32 bin; if (!drflac__read_uint32(bs, DRFLAC_CACHE_L1_SIZE_BITS(bs), &bin)) { return DRFLAC_FALSE; } bitsToSeek -= DRFLAC_CACHE_L1_SIZE_BITS(bs); } #endif /* Whole leftover bytes. */ while (bitsToSeek >= 8) { drflac_uint8 bin; if (!drflac__read_uint8(bs, 8, &bin)) { return DRFLAC_FALSE; } bitsToSeek -= 8; } /* Leftover bits. */ if (bitsToSeek > 0) { drflac_uint8 bin; if (!drflac__read_uint8(bs, (drflac_uint32)bitsToSeek, &bin)) { return DRFLAC_FALSE; } bitsToSeek = 0; /* <-- Necessary for the assert below. */ } DRFLAC_ASSERT(bitsToSeek == 0); return DRFLAC_TRUE; } } /* This function moves the bit streamer to the first bit after the sync code (bit 15 of the of the frame header). It will also update the CRC-16. */ static drflac_bool32 drflac__find_and_seek_to_next_sync_code(drflac_bs* bs) { DRFLAC_ASSERT(bs != NULL); /* The sync code is always aligned to 8 bits. This is convenient for us because it means we can do byte-aligned movements. The first thing to do is align to the next byte. */ if (!drflac__seek_bits(bs, DRFLAC_CACHE_L1_BITS_REMAINING(bs) & 7)) { return DRFLAC_FALSE; } for (;;) { drflac_uint8 hi; #ifndef DR_FLAC_NO_CRC drflac__reset_crc16(bs); #endif if (!drflac__read_uint8(bs, 8, &hi)) { return DRFLAC_FALSE; } if (hi == 0xFF) { drflac_uint8 lo; if (!drflac__read_uint8(bs, 6, &lo)) { return DRFLAC_FALSE; } if (lo == 0x3E) { return DRFLAC_TRUE; } else { if (!drflac__seek_bits(bs, DRFLAC_CACHE_L1_BITS_REMAINING(bs) & 7)) { return DRFLAC_FALSE; } } } } /* Should never get here. */ /*return DRFLAC_FALSE;*/ } #if defined(DRFLAC_HAS_LZCNT_INTRINSIC) #define DRFLAC_IMPLEMENT_CLZ_LZCNT #endif #if defined(_MSC_VER) && _MSC_VER >= 1400 && (defined(DRFLAC_X64) || defined(DRFLAC_X86)) && !defined(__clang__) #define DRFLAC_IMPLEMENT_CLZ_MSVC #endif #if defined(__WATCOMC__) && defined(__386__) #define DRFLAC_IMPLEMENT_CLZ_WATCOM #endif static DRFLAC_INLINE drflac_uint32 drflac__clz_software(drflac_cache_t x) { drflac_uint32 n; static drflac_uint32 clz_table_4[] = { 0, 4, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1 }; if (x == 0) { return sizeof(x)*8; } n = clz_table_4[x >> (sizeof(x)*8 - 4)]; if (n == 0) { #ifdef DRFLAC_64BIT if ((x & ((drflac_uint64)0xFFFFFFFF << 32)) == 0) { n = 32; x <<= 32; } if ((x & ((drflac_uint64)0xFFFF0000 << 32)) == 0) { n += 16; x <<= 16; } if ((x & ((drflac_uint64)0xFF000000 << 32)) == 0) { n += 8; x <<= 8; } if ((x & ((drflac_uint64)0xF0000000 << 32)) == 0) { n += 4; x <<= 4; } #else if ((x & 0xFFFF0000) == 0) { n = 16; x <<= 16; } if ((x & 0xFF000000) == 0) { n += 8; x <<= 8; } if ((x & 0xF0000000) == 0) { n += 4; x <<= 4; } #endif n += clz_table_4[x >> (sizeof(x)*8 - 4)]; } return n - 1; } #ifdef DRFLAC_IMPLEMENT_CLZ_LZCNT static DRFLAC_INLINE drflac_bool32 drflac__is_lzcnt_supported(void) { /* Fast compile time check for ARM. */ #if defined(DRFLAC_HAS_LZCNT_INTRINSIC) && defined(DRFLAC_ARM) && (defined(__ARM_ARCH) && __ARM_ARCH >= 5) return DRFLAC_TRUE; #else /* If the compiler itself does not support the intrinsic then we'll need to return false. */ #ifdef DRFLAC_HAS_LZCNT_INTRINSIC return drflac__gIsLZCNTSupported; #else return DRFLAC_FALSE; #endif #endif } static DRFLAC_INLINE drflac_uint32 drflac__clz_lzcnt(drflac_cache_t x) { /* It's critical for competitive decoding performance that this function be highly optimal. With MSVC we can use the __lzcnt64() and __lzcnt() intrinsics to achieve good performance, however on GCC and Clang it's a little bit more annoying. The __builtin_clzl() and __builtin_clzll() intrinsics leave it undefined as to the return value when `x` is 0. We need this to be well defined as returning 32 or 64, depending on whether or not it's a 32- or 64-bit build. To work around this we would need to add a conditional to check for the x = 0 case, but this creates unnecessary inefficiency. To work around this problem I have written some inline assembly to emit the LZCNT (x86) or CLZ (ARM) instruction directly which removes the need to include the conditional. This has worked well in the past, but for some reason Clang's MSVC compatible driver, clang-cl, does not seem to be handling this in the same way as the normal Clang driver. It seems that `clang-cl` is just outputting the wrong results sometimes, maybe due to some register getting clobbered? I'm not sure if this is a bug with dr_flac's inlined assembly (most likely), a bug in `clang-cl` or just a misunderstanding on my part with inline assembly rules for `clang-cl`. If somebody can identify an error in dr_flac's inlined assembly I'm happy to get that fixed. Fortunately there is an easy workaround for this. Clang implements MSVC-specific intrinsics for compatibility. It also defines _MSC_VER for extra compatibility. We can therefore just check for _MSC_VER and use the MSVC intrinsic which, fortunately for us, Clang supports. It would still be nice to know how to fix the inlined assembly for correctness sake, however. */ #if defined(_MSC_VER) /*&& !defined(__clang__)*/ /* <-- Intentionally wanting Clang to use the MSVC __lzcnt64/__lzcnt intrinsics due to above ^. */ #ifdef DRFLAC_64BIT return (drflac_uint32)__lzcnt64(x); #else return (drflac_uint32)__lzcnt(x); #endif #else #if defined(__GNUC__) || defined(__clang__) #if defined(DRFLAC_X64) { drflac_uint64 r; __asm__ __volatile__ ( "lzcnt{ %1, %0| %0, %1}" : "=r"(r) : "r"(x) : "cc" ); return (drflac_uint32)r; } #elif defined(DRFLAC_X86) { drflac_uint32 r; __asm__ __volatile__ ( "lzcnt{l %1, %0| %0, %1}" : "=r"(r) : "r"(x) : "cc" ); return r; } #elif defined(DRFLAC_ARM) && (defined(__ARM_ARCH) && __ARM_ARCH >= 5) && !defined(DRFLAC_64BIT) /* <-- I haven't tested 64-bit inline assembly, so only enabling this for the 32-bit build for now. */ { unsigned int r; __asm__ __volatile__ ( #if defined(DRFLAC_64BIT) "clz %w[out], %w[in]" : [out]"=r"(r) : [in]"r"(x) /* <-- This is untested. If someone in the community could test this, that would be appreciated! */ #else "clz %[out], %[in]" : [out]"=r"(r) : [in]"r"(x) #endif ); return r; } #else if (x == 0) { return sizeof(x)*8; } #ifdef DRFLAC_64BIT return (drflac_uint32)__builtin_clzll((drflac_uint64)x); #else return (drflac_uint32)__builtin_clzl((drflac_uint32)x); #endif #endif #else /* Unsupported compiler. */ #error "This compiler does not support the lzcnt intrinsic." #endif #endif } #endif #ifdef DRFLAC_IMPLEMENT_CLZ_MSVC #include /* For BitScanReverse(). */ static DRFLAC_INLINE drflac_uint32 drflac__clz_msvc(drflac_cache_t x) { drflac_uint32 n; if (x == 0) { return sizeof(x)*8; } #ifdef DRFLAC_64BIT _BitScanReverse64((unsigned long*)&n, x); #else _BitScanReverse((unsigned long*)&n, x); #endif return sizeof(x)*8 - n - 1; } #endif #ifdef DRFLAC_IMPLEMENT_CLZ_WATCOM static __inline drflac_uint32 drflac__clz_watcom (drflac_uint32); #pragma aux drflac__clz_watcom = \ "bsr eax, eax" \ "xor eax, 31" \ parm [eax] nomemory \ value [eax] \ modify exact [eax] nomemory; #endif static DRFLAC_INLINE drflac_uint32 drflac__clz(drflac_cache_t x) { #ifdef DRFLAC_IMPLEMENT_CLZ_LZCNT if (drflac__is_lzcnt_supported()) { return drflac__clz_lzcnt(x); } else #endif { #ifdef DRFLAC_IMPLEMENT_CLZ_MSVC return drflac__clz_msvc(x); #elif defined(DRFLAC_IMPLEMENT_CLZ_WATCOM) return (x == 0) ? sizeof(x)*8 : drflac__clz_watcom(x); #else return drflac__clz_software(x); #endif } } static DRFLAC_INLINE drflac_bool32 drflac__seek_past_next_set_bit(drflac_bs* bs, unsigned int* pOffsetOut) { drflac_uint32 zeroCounter = 0; drflac_uint32 setBitOffsetPlus1; while (bs->cache == 0) { zeroCounter += (drflac_uint32)DRFLAC_CACHE_L1_BITS_REMAINING(bs); if (!drflac__reload_cache(bs)) { return DRFLAC_FALSE; } } if (bs->cache == 1) { /* Not catching this would lead to undefined behaviour: a shift of a 32-bit number by 32 or more is undefined */ *pOffsetOut = zeroCounter + (drflac_uint32)DRFLAC_CACHE_L1_BITS_REMAINING(bs) - 1; if (!drflac__reload_cache(bs)) { return DRFLAC_FALSE; } return DRFLAC_TRUE; } setBitOffsetPlus1 = drflac__clz(bs->cache); setBitOffsetPlus1 += 1; if (setBitOffsetPlus1 > DRFLAC_CACHE_L1_BITS_REMAINING(bs)) { /* This happens when we get to end of stream */ return DRFLAC_FALSE; } bs->consumedBits += setBitOffsetPlus1; bs->cache <<= setBitOffsetPlus1; *pOffsetOut = zeroCounter + setBitOffsetPlus1 - 1; return DRFLAC_TRUE; } static drflac_bool32 drflac__seek_to_byte(drflac_bs* bs, drflac_uint64 offsetFromStart) { DRFLAC_ASSERT(bs != NULL); DRFLAC_ASSERT(offsetFromStart > 0); /* Seeking from the start is not quite as trivial as it sounds because the onSeek callback takes a signed 32-bit integer (which is intentional because it simplifies the implementation of the onSeek callbacks), however offsetFromStart is unsigned 64-bit. To resolve we just need to do an initial seek from the start, and then a series of offset seeks to make up the remainder. */ if (offsetFromStart > 0x7FFFFFFF) { drflac_uint64 bytesRemaining = offsetFromStart; if (!bs->onSeek(bs->pUserData, 0x7FFFFFFF, drflac_seek_origin_start)) { return DRFLAC_FALSE; } bytesRemaining -= 0x7FFFFFFF; while (bytesRemaining > 0x7FFFFFFF) { if (!bs->onSeek(bs->pUserData, 0x7FFFFFFF, drflac_seek_origin_current)) { return DRFLAC_FALSE; } bytesRemaining -= 0x7FFFFFFF; } if (bytesRemaining > 0) { if (!bs->onSeek(bs->pUserData, (int)bytesRemaining, drflac_seek_origin_current)) { return DRFLAC_FALSE; } } } else { if (!bs->onSeek(bs->pUserData, (int)offsetFromStart, drflac_seek_origin_start)) { return DRFLAC_FALSE; } } /* The cache should be reset to force a reload of fresh data from the client. */ drflac__reset_cache(bs); return DRFLAC_TRUE; } static drflac_result drflac__read_utf8_coded_number(drflac_bs* bs, drflac_uint64* pNumberOut, drflac_uint8* pCRCOut) { drflac_uint8 crc; drflac_uint64 result; drflac_uint8 utf8[7] = {0}; int byteCount; int i; DRFLAC_ASSERT(bs != NULL); DRFLAC_ASSERT(pNumberOut != NULL); DRFLAC_ASSERT(pCRCOut != NULL); crc = *pCRCOut; if (!drflac__read_uint8(bs, 8, utf8)) { *pNumberOut = 0; return DRFLAC_AT_END; } crc = drflac_crc8(crc, utf8[0], 8); if ((utf8[0] & 0x80) == 0) { *pNumberOut = utf8[0]; *pCRCOut = crc; return DRFLAC_SUCCESS; } /*byteCount = 1;*/ if ((utf8[0] & 0xE0) == 0xC0) { byteCount = 2; } else if ((utf8[0] & 0xF0) == 0xE0) { byteCount = 3; } else if ((utf8[0] & 0xF8) == 0xF0) { byteCount = 4; } else if ((utf8[0] & 0xFC) == 0xF8) { byteCount = 5; } else if ((utf8[0] & 0xFE) == 0xFC) { byteCount = 6; } else if ((utf8[0] & 0xFF) == 0xFE) { byteCount = 7; } else { *pNumberOut = 0; return DRFLAC_CRC_MISMATCH; /* Bad UTF-8 encoding. */ } /* Read extra bytes. */ DRFLAC_ASSERT(byteCount > 1); result = (drflac_uint64)(utf8[0] & (0xFF >> (byteCount + 1))); for (i = 1; i < byteCount; ++i) { if (!drflac__read_uint8(bs, 8, utf8 + i)) { *pNumberOut = 0; return DRFLAC_AT_END; } crc = drflac_crc8(crc, utf8[i], 8); result = (result << 6) | (utf8[i] & 0x3F); } *pNumberOut = result; *pCRCOut = crc; return DRFLAC_SUCCESS; } static DRFLAC_INLINE drflac_uint32 drflac__ilog2_u32(drflac_uint32 x) { #if 1 /* Needs optimizing. */ drflac_uint32 result = 0; while (x > 0) { result += 1; x >>= 1; } return result; #endif } static DRFLAC_INLINE drflac_bool32 drflac__use_64_bit_prediction(drflac_uint32 bitsPerSample, drflac_uint32 order, drflac_uint32 precision) { /* https://web.archive.org/web/20220205005724/https://github.com/ietf-wg-cellar/flac-specification/blob/37a49aa48ba4ba12e8757badfc59c0df35435fec/rfc_backmatter.md */ return bitsPerSample + precision + drflac__ilog2_u32(order) > 32; } /* The next two functions are responsible for calculating the prediction. When the bits per sample is >16 we need to use 64-bit integer arithmetic because otherwise we'll run out of precision. It's safe to assume this will be slower on 32-bit platforms so we use a more optimal solution when the bits per sample is <=16. */ #if defined(__clang__) __attribute__((no_sanitize("signed-integer-overflow"))) #endif static DRFLAC_INLINE drflac_int32 drflac__calculate_prediction_32(drflac_uint32 order, drflac_int32 shift, const drflac_int32* coefficients, drflac_int32* pDecodedSamples) { drflac_int32 prediction = 0; DRFLAC_ASSERT(order <= 32); /* 32-bit version. */ /* VC++ optimizes this to a single jmp. I've not yet verified this for other compilers. */ switch (order) { case 32: prediction += coefficients[31] * pDecodedSamples[-32]; case 31: prediction += coefficients[30] * pDecodedSamples[-31]; case 30: prediction += coefficients[29] * pDecodedSamples[-30]; case 29: prediction += coefficients[28] * pDecodedSamples[-29]; case 28: prediction += coefficients[27] * pDecodedSamples[-28]; case 27: prediction += coefficients[26] * pDecodedSamples[-27]; case 26: prediction += coefficients[25] * pDecodedSamples[-26]; case 25: prediction += coefficients[24] * pDecodedSamples[-25]; case 24: prediction += coefficients[23] * pDecodedSamples[-24]; case 23: prediction += coefficients[22] * pDecodedSamples[-23]; case 22: prediction += coefficients[21] * pDecodedSamples[-22]; case 21: prediction += coefficients[20] * pDecodedSamples[-21]; case 20: prediction += coefficients[19] * pDecodedSamples[-20]; case 19: prediction += coefficients[18] * pDecodedSamples[-19]; case 18: prediction += coefficients[17] * pDecodedSamples[-18]; case 17: prediction += coefficients[16] * pDecodedSamples[-17]; case 16: prediction += coefficients[15] * pDecodedSamples[-16]; case 15: prediction += coefficients[14] * pDecodedSamples[-15]; case 14: prediction += coefficients[13] * pDecodedSamples[-14]; case 13: prediction += coefficients[12] * pDecodedSamples[-13]; case 12: prediction += coefficients[11] * pDecodedSamples[-12]; case 11: prediction += coefficients[10] * pDecodedSamples[-11]; case 10: prediction += coefficients[ 9] * pDecodedSamples[-10]; case 9: prediction += coefficients[ 8] * pDecodedSamples[- 9]; case 8: prediction += coefficients[ 7] * pDecodedSamples[- 8]; case 7: prediction += coefficients[ 6] * pDecodedSamples[- 7]; case 6: prediction += coefficients[ 5] * pDecodedSamples[- 6]; case 5: prediction += coefficients[ 4] * pDecodedSamples[- 5]; case 4: prediction += coefficients[ 3] * pDecodedSamples[- 4]; case 3: prediction += coefficients[ 2] * pDecodedSamples[- 3]; case 2: prediction += coefficients[ 1] * pDecodedSamples[- 2]; case 1: prediction += coefficients[ 0] * pDecodedSamples[- 1]; } return (drflac_int32)(prediction >> shift); } static DRFLAC_INLINE drflac_int32 drflac__calculate_prediction_64(drflac_uint32 order, drflac_int32 shift, const drflac_int32* coefficients, drflac_int32* pDecodedSamples) { drflac_int64 prediction; DRFLAC_ASSERT(order <= 32); /* 64-bit version. */ /* This method is faster on the 32-bit build when compiling with VC++. See note below. */ #ifndef DRFLAC_64BIT if (order == 8) { prediction = coefficients[0] * (drflac_int64)pDecodedSamples[-1]; prediction += coefficients[1] * (drflac_int64)pDecodedSamples[-2]; prediction += coefficients[2] * (drflac_int64)pDecodedSamples[-3]; prediction += coefficients[3] * (drflac_int64)pDecodedSamples[-4]; prediction += coefficients[4] * (drflac_int64)pDecodedSamples[-5]; prediction += coefficients[5] * (drflac_int64)pDecodedSamples[-6]; prediction += coefficients[6] * (drflac_int64)pDecodedSamples[-7]; prediction += coefficients[7] * (drflac_int64)pDecodedSamples[-8]; } else if (order == 7) { prediction = coefficients[0] * (drflac_int64)pDecodedSamples[-1]; prediction += coefficients[1] * (drflac_int64)pDecodedSamples[-2]; prediction += coefficients[2] * (drflac_int64)pDecodedSamples[-3]; prediction += coefficients[3] * (drflac_int64)pDecodedSamples[-4]; prediction += coefficients[4] * (drflac_int64)pDecodedSamples[-5]; prediction += coefficients[5] * (drflac_int64)pDecodedSamples[-6]; prediction += coefficients[6] * (drflac_int64)pDecodedSamples[-7]; } else if (order == 3) { prediction = coefficients[0] * (drflac_int64)pDecodedSamples[-1]; prediction += coefficients[1] * (drflac_int64)pDecodedSamples[-2]; prediction += coefficients[2] * (drflac_int64)pDecodedSamples[-3]; } else if (order == 6) { prediction = coefficients[0] * (drflac_int64)pDecodedSamples[-1]; prediction += coefficients[1] * (drflac_int64)pDecodedSamples[-2]; prediction += coefficients[2] * (drflac_int64)pDecodedSamples[-3]; prediction += coefficients[3] * (drflac_int64)pDecodedSamples[-4]; prediction += coefficients[4] * (drflac_int64)pDecodedSamples[-5]; prediction += coefficients[5] * (drflac_int64)pDecodedSamples[-6]; } else if (order == 5) { prediction = coefficients[0] * (drflac_int64)pDecodedSamples[-1]; prediction += coefficients[1] * (drflac_int64)pDecodedSamples[-2]; prediction += coefficients[2] * (drflac_int64)pDecodedSamples[-3]; prediction += coefficients[3] * (drflac_int64)pDecodedSamples[-4]; prediction += coefficients[4] * (drflac_int64)pDecodedSamples[-5]; } else if (order == 4) { prediction = coefficients[0] * (drflac_int64)pDecodedSamples[-1]; prediction += coefficients[1] * (drflac_int64)pDecodedSamples[-2]; prediction += coefficients[2] * (drflac_int64)pDecodedSamples[-3]; prediction += coefficients[3] * (drflac_int64)pDecodedSamples[-4]; } else if (order == 12) { prediction = coefficients[0] * (drflac_int64)pDecodedSamples[-1]; prediction += coefficients[1] * (drflac_int64)pDecodedSamples[-2]; prediction += coefficients[2] * (drflac_int64)pDecodedSamples[-3]; prediction += coefficients[3] * (drflac_int64)pDecodedSamples[-4]; prediction += coefficients[4] * (drflac_int64)pDecodedSamples[-5]; prediction += coefficients[5] * (drflac_int64)pDecodedSamples[-6]; prediction += coefficients[6] * (drflac_int64)pDecodedSamples[-7]; prediction += coefficients[7] * (drflac_int64)pDecodedSamples[-8]; prediction += coefficients[8] * (drflac_int64)pDecodedSamples[-9]; prediction += coefficients[9] * (drflac_int64)pDecodedSamples[-10]; prediction += coefficients[10] * (drflac_int64)pDecodedSamples[-11]; prediction += coefficients[11] * (drflac_int64)pDecodedSamples[-12]; } else if (order == 2) { prediction = coefficients[0] * (drflac_int64)pDecodedSamples[-1]; prediction += coefficients[1] * (drflac_int64)pDecodedSamples[-2]; } else if (order == 1) { prediction = coefficients[0] * (drflac_int64)pDecodedSamples[-1]; } else if (order == 10) { prediction = coefficients[0] * (drflac_int64)pDecodedSamples[-1]; prediction += coefficients[1] * (drflac_int64)pDecodedSamples[-2]; prediction += coefficients[2] * (drflac_int64)pDecodedSamples[-3]; prediction += coefficients[3] * (drflac_int64)pDecodedSamples[-4]; prediction += coefficients[4] * (drflac_int64)pDecodedSamples[-5]; prediction += coefficients[5] * (drflac_int64)pDecodedSamples[-6]; prediction += coefficients[6] * (drflac_int64)pDecodedSamples[-7]; prediction += coefficients[7] * (drflac_int64)pDecodedSamples[-8]; prediction += coefficients[8] * (drflac_int64)pDecodedSamples[-9]; prediction += coefficients[9] * (drflac_int64)pDecodedSamples[-10]; } else if (order == 9) { prediction = coefficients[0] * (drflac_int64)pDecodedSamples[-1]; prediction += coefficients[1] * (drflac_int64)pDecodedSamples[-2]; prediction += coefficients[2] * (drflac_int64)pDecodedSamples[-3]; prediction += coefficients[3] * (drflac_int64)pDecodedSamples[-4]; prediction += coefficients[4] * (drflac_int64)pDecodedSamples[-5]; prediction += coefficients[5] * (drflac_int64)pDecodedSamples[-6]; prediction += coefficients[6] * (drflac_int64)pDecodedSamples[-7]; prediction += coefficients[7] * (drflac_int64)pDecodedSamples[-8]; prediction += coefficients[8] * (drflac_int64)pDecodedSamples[-9]; } else if (order == 11) { prediction = coefficients[0] * (drflac_int64)pDecodedSamples[-1]; prediction += coefficients[1] * (drflac_int64)pDecodedSamples[-2]; prediction += coefficients[2] * (drflac_int64)pDecodedSamples[-3]; prediction += coefficients[3] * (drflac_int64)pDecodedSamples[-4]; prediction += coefficients[4] * (drflac_int64)pDecodedSamples[-5]; prediction += coefficients[5] * (drflac_int64)pDecodedSamples[-6]; prediction += coefficients[6] * (drflac_int64)pDecodedSamples[-7]; prediction += coefficients[7] * (drflac_int64)pDecodedSamples[-8]; prediction += coefficients[8] * (drflac_int64)pDecodedSamples[-9]; prediction += coefficients[9] * (drflac_int64)pDecodedSamples[-10]; prediction += coefficients[10] * (drflac_int64)pDecodedSamples[-11]; } else { int j; prediction = 0; for (j = 0; j < (int)order; ++j) { prediction += coefficients[j] * (drflac_int64)pDecodedSamples[-j-1]; } } #endif /* VC++ optimizes this to a single jmp instruction, but only the 64-bit build. The 32-bit build generates less efficient code for some reason. The ugly version above is faster so we'll just switch between the two depending on the target platform. */ #ifdef DRFLAC_64BIT prediction = 0; switch (order) { case 32: prediction += coefficients[31] * (drflac_int64)pDecodedSamples[-32]; case 31: prediction += coefficients[30] * (drflac_int64)pDecodedSamples[-31]; case 30: prediction += coefficients[29] * (drflac_int64)pDecodedSamples[-30]; case 29: prediction += coefficients[28] * (drflac_int64)pDecodedSamples[-29]; case 28: prediction += coefficients[27] * (drflac_int64)pDecodedSamples[-28]; case 27: prediction += coefficients[26] * (drflac_int64)pDecodedSamples[-27]; case 26: prediction += coefficients[25] * (drflac_int64)pDecodedSamples[-26]; case 25: prediction += coefficients[24] * (drflac_int64)pDecodedSamples[-25]; case 24: prediction += coefficients[23] * (drflac_int64)pDecodedSamples[-24]; case 23: prediction += coefficients[22] * (drflac_int64)pDecodedSamples[-23]; case 22: prediction += coefficients[21] * (drflac_int64)pDecodedSamples[-22]; case 21: prediction += coefficients[20] * (drflac_int64)pDecodedSamples[-21]; case 20: prediction += coefficients[19] * (drflac_int64)pDecodedSamples[-20]; case 19: prediction += coefficients[18] * (drflac_int64)pDecodedSamples[-19]; case 18: prediction += coefficients[17] * (drflac_int64)pDecodedSamples[-18]; case 17: prediction += coefficients[16] * (drflac_int64)pDecodedSamples[-17]; case 16: prediction += coefficients[15] * (drflac_int64)pDecodedSamples[-16]; case 15: prediction += coefficients[14] * (drflac_int64)pDecodedSamples[-15]; case 14: prediction += coefficients[13] * (drflac_int64)pDecodedSamples[-14]; case 13: prediction += coefficients[12] * (drflac_int64)pDecodedSamples[-13]; case 12: prediction += coefficients[11] * (drflac_int64)pDecodedSamples[-12]; case 11: prediction += coefficients[10] * (drflac_int64)pDecodedSamples[-11]; case 10: prediction += coefficients[ 9] * (drflac_int64)pDecodedSamples[-10]; case 9: prediction += coefficients[ 8] * (drflac_int64)pDecodedSamples[- 9]; case 8: prediction += coefficients[ 7] * (drflac_int64)pDecodedSamples[- 8]; case 7: prediction += coefficients[ 6] * (drflac_int64)pDecodedSamples[- 7]; case 6: prediction += coefficients[ 5] * (drflac_int64)pDecodedSamples[- 6]; case 5: prediction += coefficients[ 4] * (drflac_int64)pDecodedSamples[- 5]; case 4: prediction += coefficients[ 3] * (drflac_int64)pDecodedSamples[- 4]; case 3: prediction += coefficients[ 2] * (drflac_int64)pDecodedSamples[- 3]; case 2: prediction += coefficients[ 1] * (drflac_int64)pDecodedSamples[- 2]; case 1: prediction += coefficients[ 0] * (drflac_int64)pDecodedSamples[- 1]; } #endif return (drflac_int32)(prediction >> shift); } #if 0 /* Reference implementation for reading and decoding samples with residual. This is intentionally left unoptimized for the sake of readability and should only be used as a reference. */ static drflac_bool32 drflac__decode_samples_with_residual__rice__reference(drflac_bs* bs, drflac_uint32 bitsPerSample, drflac_uint32 count, drflac_uint8 riceParam, drflac_uint32 lpcOrder, drflac_int32 lpcShift, drflac_uint32 lpcPrecision, const drflac_int32* coefficients, drflac_int32* pSamplesOut) { drflac_uint32 i; DRFLAC_ASSERT(bs != NULL); DRFLAC_ASSERT(pSamplesOut != NULL); for (i = 0; i < count; ++i) { drflac_uint32 zeroCounter = 0; for (;;) { drflac_uint8 bit; if (!drflac__read_uint8(bs, 1, &bit)) { return DRFLAC_FALSE; } if (bit == 0) { zeroCounter += 1; } else { break; } } drflac_uint32 decodedRice; if (riceParam > 0) { if (!drflac__read_uint32(bs, riceParam, &decodedRice)) { return DRFLAC_FALSE; } } else { decodedRice = 0; } decodedRice |= (zeroCounter << riceParam); if ((decodedRice & 0x01)) { decodedRice = ~(decodedRice >> 1); } else { decodedRice = (decodedRice >> 1); } if (drflac__use_64_bit_prediction(bitsPerSample, lpcOrder, lpcPrecision)) { pSamplesOut[i] = decodedRice + drflac__calculate_prediction_64(lpcOrder, lpcShift, coefficients, pSamplesOut + i); } else { pSamplesOut[i] = decodedRice + drflac__calculate_prediction_32(lpcOrder, lpcShift, coefficients, pSamplesOut + i); } } return DRFLAC_TRUE; } #endif #if 0 static drflac_bool32 drflac__read_rice_parts__reference(drflac_bs* bs, drflac_uint8 riceParam, drflac_uint32* pZeroCounterOut, drflac_uint32* pRiceParamPartOut) { drflac_uint32 zeroCounter = 0; drflac_uint32 decodedRice; for (;;) { drflac_uint8 bit; if (!drflac__read_uint8(bs, 1, &bit)) { return DRFLAC_FALSE; } if (bit == 0) { zeroCounter += 1; } else { break; } } if (riceParam > 0) { if (!drflac__read_uint32(bs, riceParam, &decodedRice)) { return DRFLAC_FALSE; } } else { decodedRice = 0; } *pZeroCounterOut = zeroCounter; *pRiceParamPartOut = decodedRice; return DRFLAC_TRUE; } #endif #if 0 static DRFLAC_INLINE drflac_bool32 drflac__read_rice_parts(drflac_bs* bs, drflac_uint8 riceParam, drflac_uint32* pZeroCounterOut, drflac_uint32* pRiceParamPartOut) { drflac_cache_t riceParamMask; drflac_uint32 zeroCounter; drflac_uint32 setBitOffsetPlus1; drflac_uint32 riceParamPart; drflac_uint32 riceLength; DRFLAC_ASSERT(riceParam > 0); /* <-- riceParam should never be 0. drflac__read_rice_parts__param_equals_zero() should be used instead for this case. */ riceParamMask = DRFLAC_CACHE_L1_SELECTION_MASK(riceParam); zeroCounter = 0; while (bs->cache == 0) { zeroCounter += (drflac_uint32)DRFLAC_CACHE_L1_BITS_REMAINING(bs); if (!drflac__reload_cache(bs)) { return DRFLAC_FALSE; } } setBitOffsetPlus1 = drflac__clz(bs->cache); zeroCounter += setBitOffsetPlus1; setBitOffsetPlus1 += 1; riceLength = setBitOffsetPlus1 + riceParam; if (riceLength < DRFLAC_CACHE_L1_BITS_REMAINING(bs)) { riceParamPart = (drflac_uint32)((bs->cache & (riceParamMask >> setBitOffsetPlus1)) >> DRFLAC_CACHE_L1_SELECTION_SHIFT(bs, riceLength)); bs->consumedBits += riceLength; bs->cache <<= riceLength; } else { drflac_uint32 bitCountLo; drflac_cache_t resultHi; bs->consumedBits += riceLength; bs->cache <<= setBitOffsetPlus1 & (DRFLAC_CACHE_L1_SIZE_BITS(bs)-1); /* <-- Equivalent to "if (setBitOffsetPlus1 < DRFLAC_CACHE_L1_SIZE_BITS(bs)) { bs->cache <<= setBitOffsetPlus1; }" */ /* It straddles the cached data. It will never cover more than the next chunk. We just read the number in two parts and combine them. */ bitCountLo = bs->consumedBits - DRFLAC_CACHE_L1_SIZE_BITS(bs); resultHi = DRFLAC_CACHE_L1_SELECT_AND_SHIFT(bs, riceParam); /* <-- Use DRFLAC_CACHE_L1_SELECT_AND_SHIFT_SAFE() if ever this function allows riceParam=0. */ if (bs->nextL2Line < DRFLAC_CACHE_L2_LINE_COUNT(bs)) { #ifndef DR_FLAC_NO_CRC drflac__update_crc16(bs); #endif bs->cache = drflac__be2host__cache_line(bs->cacheL2[bs->nextL2Line++]); bs->consumedBits = 0; #ifndef DR_FLAC_NO_CRC bs->crc16Cache = bs->cache; #endif } else { /* Slow path. We need to fetch more data from the client. */ if (!drflac__reload_cache(bs)) { return DRFLAC_FALSE; } if (bitCountLo > DRFLAC_CACHE_L1_BITS_REMAINING(bs)) { /* This happens when we get to end of stream */ return DRFLAC_FALSE; } } riceParamPart = (drflac_uint32)(resultHi | DRFLAC_CACHE_L1_SELECT_AND_SHIFT_SAFE(bs, bitCountLo)); bs->consumedBits += bitCountLo; bs->cache <<= bitCountLo; } pZeroCounterOut[0] = zeroCounter; pRiceParamPartOut[0] = riceParamPart; return DRFLAC_TRUE; } #endif static DRFLAC_INLINE drflac_bool32 drflac__read_rice_parts_x1(drflac_bs* bs, drflac_uint8 riceParam, drflac_uint32* pZeroCounterOut, drflac_uint32* pRiceParamPartOut) { drflac_uint32 riceParamPlus1 = riceParam + 1; /*drflac_cache_t riceParamPlus1Mask = DRFLAC_CACHE_L1_SELECTION_MASK(riceParamPlus1);*/ drflac_uint32 riceParamPlus1Shift = DRFLAC_CACHE_L1_SELECTION_SHIFT(bs, riceParamPlus1); drflac_uint32 riceParamPlus1MaxConsumedBits = DRFLAC_CACHE_L1_SIZE_BITS(bs) - riceParamPlus1; /* The idea here is to use local variables for the cache in an attempt to encourage the compiler to store them in registers. I have no idea how this will work in practice... */ drflac_cache_t bs_cache = bs->cache; drflac_uint32 bs_consumedBits = bs->consumedBits; /* The first thing to do is find the first unset bit. Most likely a bit will be set in the current cache line. */ drflac_uint32 lzcount = drflac__clz(bs_cache); if (lzcount < sizeof(bs_cache)*8) { pZeroCounterOut[0] = lzcount; /* It is most likely that the riceParam part (which comes after the zero counter) is also on this cache line. When extracting this, we include the set bit from the unary coded part because it simplifies cache management. This bit will be handled outside of this function at a higher level. */ extract_rice_param_part: bs_cache <<= lzcount; bs_consumedBits += lzcount; if (bs_consumedBits <= riceParamPlus1MaxConsumedBits) { /* Getting here means the rice parameter part is wholly contained within the current cache line. */ pRiceParamPartOut[0] = (drflac_uint32)(bs_cache >> riceParamPlus1Shift); bs_cache <<= riceParamPlus1; bs_consumedBits += riceParamPlus1; } else { drflac_uint32 riceParamPartHi; drflac_uint32 riceParamPartLo; drflac_uint32 riceParamPartLoBitCount; /* Getting here means the rice parameter part straddles the cache line. We need to read from the tail of the current cache line, reload the cache, and then combine it with the head of the next cache line. */ /* Grab the high part of the rice parameter part. */ riceParamPartHi = (drflac_uint32)(bs_cache >> riceParamPlus1Shift); /* Before reloading the cache we need to grab the size in bits of the low part. */ riceParamPartLoBitCount = bs_consumedBits - riceParamPlus1MaxConsumedBits; DRFLAC_ASSERT(riceParamPartLoBitCount > 0 && riceParamPartLoBitCount < 32); /* Now reload the cache. */ if (bs->nextL2Line < DRFLAC_CACHE_L2_LINE_COUNT(bs)) { #ifndef DR_FLAC_NO_CRC drflac__update_crc16(bs); #endif bs_cache = drflac__be2host__cache_line(bs->cacheL2[bs->nextL2Line++]); bs_consumedBits = riceParamPartLoBitCount; #ifndef DR_FLAC_NO_CRC bs->crc16Cache = bs_cache; #endif } else { /* Slow path. We need to fetch more data from the client. */ if (!drflac__reload_cache(bs)) { return DRFLAC_FALSE; } if (riceParamPartLoBitCount > DRFLAC_CACHE_L1_BITS_REMAINING(bs)) { /* This happens when we get to end of stream */ return DRFLAC_FALSE; } bs_cache = bs->cache; bs_consumedBits = bs->consumedBits + riceParamPartLoBitCount; } /* We should now have enough information to construct the rice parameter part. */ riceParamPartLo = (drflac_uint32)(bs_cache >> (DRFLAC_CACHE_L1_SELECTION_SHIFT(bs, riceParamPartLoBitCount))); pRiceParamPartOut[0] = riceParamPartHi | riceParamPartLo; bs_cache <<= riceParamPartLoBitCount; } } else { /* Getting here means there are no bits set on the cache line. This is a less optimal case because we just wasted a call to drflac__clz() and we need to reload the cache. */ drflac_uint32 zeroCounter = (drflac_uint32)(DRFLAC_CACHE_L1_SIZE_BITS(bs) - bs_consumedBits); for (;;) { if (bs->nextL2Line < DRFLAC_CACHE_L2_LINE_COUNT(bs)) { #ifndef DR_FLAC_NO_CRC drflac__update_crc16(bs); #endif bs_cache = drflac__be2host__cache_line(bs->cacheL2[bs->nextL2Line++]); bs_consumedBits = 0; #ifndef DR_FLAC_NO_CRC bs->crc16Cache = bs_cache; #endif } else { /* Slow path. We need to fetch more data from the client. */ if (!drflac__reload_cache(bs)) { return DRFLAC_FALSE; } bs_cache = bs->cache; bs_consumedBits = bs->consumedBits; } lzcount = drflac__clz(bs_cache); zeroCounter += lzcount; if (lzcount < sizeof(bs_cache)*8) { break; } } pZeroCounterOut[0] = zeroCounter; goto extract_rice_param_part; } /* Make sure the cache is restored at the end of it all. */ bs->cache = bs_cache; bs->consumedBits = bs_consumedBits; return DRFLAC_TRUE; } static DRFLAC_INLINE drflac_bool32 drflac__seek_rice_parts(drflac_bs* bs, drflac_uint8 riceParam) { drflac_uint32 riceParamPlus1 = riceParam + 1; drflac_uint32 riceParamPlus1MaxConsumedBits = DRFLAC_CACHE_L1_SIZE_BITS(bs) - riceParamPlus1; /* The idea here is to use local variables for the cache in an attempt to encourage the compiler to store them in registers. I have no idea how this will work in practice... */ drflac_cache_t bs_cache = bs->cache; drflac_uint32 bs_consumedBits = bs->consumedBits; /* The first thing to do is find the first unset bit. Most likely a bit will be set in the current cache line. */ drflac_uint32 lzcount = drflac__clz(bs_cache); if (lzcount < sizeof(bs_cache)*8) { /* It is most likely that the riceParam part (which comes after the zero counter) is also on this cache line. When extracting this, we include the set bit from the unary coded part because it simplifies cache management. This bit will be handled outside of this function at a higher level. */ extract_rice_param_part: bs_cache <<= lzcount; bs_consumedBits += lzcount; if (bs_consumedBits <= riceParamPlus1MaxConsumedBits) { /* Getting here means the rice parameter part is wholly contained within the current cache line. */ bs_cache <<= riceParamPlus1; bs_consumedBits += riceParamPlus1; } else { /* Getting here means the rice parameter part straddles the cache line. We need to read from the tail of the current cache line, reload the cache, and then combine it with the head of the next cache line. */ /* Before reloading the cache we need to grab the size in bits of the low part. */ drflac_uint32 riceParamPartLoBitCount = bs_consumedBits - riceParamPlus1MaxConsumedBits; DRFLAC_ASSERT(riceParamPartLoBitCount > 0 && riceParamPartLoBitCount < 32); /* Now reload the cache. */ if (bs->nextL2Line < DRFLAC_CACHE_L2_LINE_COUNT(bs)) { #ifndef DR_FLAC_NO_CRC drflac__update_crc16(bs); #endif bs_cache = drflac__be2host__cache_line(bs->cacheL2[bs->nextL2Line++]); bs_consumedBits = riceParamPartLoBitCount; #ifndef DR_FLAC_NO_CRC bs->crc16Cache = bs_cache; #endif } else { /* Slow path. We need to fetch more data from the client. */ if (!drflac__reload_cache(bs)) { return DRFLAC_FALSE; } if (riceParamPartLoBitCount > DRFLAC_CACHE_L1_BITS_REMAINING(bs)) { /* This happens when we get to end of stream */ return DRFLAC_FALSE; } bs_cache = bs->cache; bs_consumedBits = bs->consumedBits + riceParamPartLoBitCount; } bs_cache <<= riceParamPartLoBitCount; } } else { /* Getting here means there are no bits set on the cache line. This is a less optimal case because we just wasted a call to drflac__clz() and we need to reload the cache. */ for (;;) { if (bs->nextL2Line < DRFLAC_CACHE_L2_LINE_COUNT(bs)) { #ifndef DR_FLAC_NO_CRC drflac__update_crc16(bs); #endif bs_cache = drflac__be2host__cache_line(bs->cacheL2[bs->nextL2Line++]); bs_consumedBits = 0; #ifndef DR_FLAC_NO_CRC bs->crc16Cache = bs_cache; #endif } else { /* Slow path. We need to fetch more data from the client. */ if (!drflac__reload_cache(bs)) { return DRFLAC_FALSE; } bs_cache = bs->cache; bs_consumedBits = bs->consumedBits; } lzcount = drflac__clz(bs_cache); if (lzcount < sizeof(bs_cache)*8) { break; } } goto extract_rice_param_part; } /* Make sure the cache is restored at the end of it all. */ bs->cache = bs_cache; bs->consumedBits = bs_consumedBits; return DRFLAC_TRUE; } static drflac_bool32 drflac__decode_samples_with_residual__rice__scalar_zeroorder(drflac_bs* bs, drflac_uint32 bitsPerSample, drflac_uint32 count, drflac_uint8 riceParam, drflac_uint32 order, drflac_int32 shift, const drflac_int32* coefficients, drflac_int32* pSamplesOut) { drflac_uint32 t[2] = {0x00000000, 0xFFFFFFFF}; drflac_uint32 zeroCountPart0; drflac_uint32 riceParamPart0; drflac_uint32 riceParamMask; drflac_uint32 i; DRFLAC_ASSERT(bs != NULL); DRFLAC_ASSERT(pSamplesOut != NULL); (void)bitsPerSample; (void)order; (void)shift; (void)coefficients; riceParamMask = (drflac_uint32)~((~0UL) << riceParam); i = 0; while (i < count) { /* Rice extraction. */ if (!drflac__read_rice_parts_x1(bs, riceParam, &zeroCountPart0, &riceParamPart0)) { return DRFLAC_FALSE; } /* Rice reconstruction. */ riceParamPart0 &= riceParamMask; riceParamPart0 |= (zeroCountPart0 << riceParam); riceParamPart0 = (riceParamPart0 >> 1) ^ t[riceParamPart0 & 0x01]; pSamplesOut[i] = riceParamPart0; i += 1; } return DRFLAC_TRUE; } static drflac_bool32 drflac__decode_samples_with_residual__rice__scalar(drflac_bs* bs, drflac_uint32 bitsPerSample, drflac_uint32 count, drflac_uint8 riceParam, drflac_uint32 lpcOrder, drflac_int32 lpcShift, drflac_uint32 lpcPrecision, const drflac_int32* coefficients, drflac_int32* pSamplesOut) { drflac_uint32 t[2] = {0x00000000, 0xFFFFFFFF}; drflac_uint32 zeroCountPart0 = 0; drflac_uint32 zeroCountPart1 = 0; drflac_uint32 zeroCountPart2 = 0; drflac_uint32 zeroCountPart3 = 0; drflac_uint32 riceParamPart0 = 0; drflac_uint32 riceParamPart1 = 0; drflac_uint32 riceParamPart2 = 0; drflac_uint32 riceParamPart3 = 0; drflac_uint32 riceParamMask; const drflac_int32* pSamplesOutEnd; drflac_uint32 i; DRFLAC_ASSERT(bs != NULL); DRFLAC_ASSERT(pSamplesOut != NULL); if (lpcOrder == 0) { return drflac__decode_samples_with_residual__rice__scalar_zeroorder(bs, bitsPerSample, count, riceParam, lpcOrder, lpcShift, coefficients, pSamplesOut); } riceParamMask = (drflac_uint32)~((~0UL) << riceParam); pSamplesOutEnd = pSamplesOut + (count & ~3); if (drflac__use_64_bit_prediction(bitsPerSample, lpcOrder, lpcPrecision)) { while (pSamplesOut < pSamplesOutEnd) { /* Rice extraction. It's faster to do this one at a time against local variables than it is to use the x4 version against an array. Not sure why, but perhaps it's making more efficient use of registers? */ if (!drflac__read_rice_parts_x1(bs, riceParam, &zeroCountPart0, &riceParamPart0) || !drflac__read_rice_parts_x1(bs, riceParam, &zeroCountPart1, &riceParamPart1) || !drflac__read_rice_parts_x1(bs, riceParam, &zeroCountPart2, &riceParamPart2) || !drflac__read_rice_parts_x1(bs, riceParam, &zeroCountPart3, &riceParamPart3)) { return DRFLAC_FALSE; } riceParamPart0 &= riceParamMask; riceParamPart1 &= riceParamMask; riceParamPart2 &= riceParamMask; riceParamPart3 &= riceParamMask; riceParamPart0 |= (zeroCountPart0 << riceParam); riceParamPart1 |= (zeroCountPart1 << riceParam); riceParamPart2 |= (zeroCountPart2 << riceParam); riceParamPart3 |= (zeroCountPart3 << riceParam); riceParamPart0 = (riceParamPart0 >> 1) ^ t[riceParamPart0 & 0x01]; riceParamPart1 = (riceParamPart1 >> 1) ^ t[riceParamPart1 & 0x01]; riceParamPart2 = (riceParamPart2 >> 1) ^ t[riceParamPart2 & 0x01]; riceParamPart3 = (riceParamPart3 >> 1) ^ t[riceParamPart3 & 0x01]; pSamplesOut[0] = riceParamPart0 + drflac__calculate_prediction_64(lpcOrder, lpcShift, coefficients, pSamplesOut + 0); pSamplesOut[1] = riceParamPart1 + drflac__calculate_prediction_64(lpcOrder, lpcShift, coefficients, pSamplesOut + 1); pSamplesOut[2] = riceParamPart2 + drflac__calculate_prediction_64(lpcOrder, lpcShift, coefficients, pSamplesOut + 2); pSamplesOut[3] = riceParamPart3 + drflac__calculate_prediction_64(lpcOrder, lpcShift, coefficients, pSamplesOut + 3); pSamplesOut += 4; } } else { while (pSamplesOut < pSamplesOutEnd) { if (!drflac__read_rice_parts_x1(bs, riceParam, &zeroCountPart0, &riceParamPart0) || !drflac__read_rice_parts_x1(bs, riceParam, &zeroCountPart1, &riceParamPart1) || !drflac__read_rice_parts_x1(bs, riceParam, &zeroCountPart2, &riceParamPart2) || !drflac__read_rice_parts_x1(bs, riceParam, &zeroCountPart3, &riceParamPart3)) { return DRFLAC_FALSE; } riceParamPart0 &= riceParamMask; riceParamPart1 &= riceParamMask; riceParamPart2 &= riceParamMask; riceParamPart3 &= riceParamMask; riceParamPart0 |= (zeroCountPart0 << riceParam); riceParamPart1 |= (zeroCountPart1 << riceParam); riceParamPart2 |= (zeroCountPart2 << riceParam); riceParamPart3 |= (zeroCountPart3 << riceParam); riceParamPart0 = (riceParamPart0 >> 1) ^ t[riceParamPart0 & 0x01]; riceParamPart1 = (riceParamPart1 >> 1) ^ t[riceParamPart1 & 0x01]; riceParamPart2 = (riceParamPart2 >> 1) ^ t[riceParamPart2 & 0x01]; riceParamPart3 = (riceParamPart3 >> 1) ^ t[riceParamPart3 & 0x01]; pSamplesOut[0] = riceParamPart0 + drflac__calculate_prediction_32(lpcOrder, lpcShift, coefficients, pSamplesOut + 0); pSamplesOut[1] = riceParamPart1 + drflac__calculate_prediction_32(lpcOrder, lpcShift, coefficients, pSamplesOut + 1); pSamplesOut[2] = riceParamPart2 + drflac__calculate_prediction_32(lpcOrder, lpcShift, coefficients, pSamplesOut + 2); pSamplesOut[3] = riceParamPart3 + drflac__calculate_prediction_32(lpcOrder, lpcShift, coefficients, pSamplesOut + 3); pSamplesOut += 4; } } i = (count & ~3); while (i < count) { /* Rice extraction. */ if (!drflac__read_rice_parts_x1(bs, riceParam, &zeroCountPart0, &riceParamPart0)) { return DRFLAC_FALSE; } /* Rice reconstruction. */ riceParamPart0 &= riceParamMask; riceParamPart0 |= (zeroCountPart0 << riceParam); riceParamPart0 = (riceParamPart0 >> 1) ^ t[riceParamPart0 & 0x01]; /*riceParamPart0 = (riceParamPart0 >> 1) ^ (~(riceParamPart0 & 0x01) + 1);*/ /* Sample reconstruction. */ if (drflac__use_64_bit_prediction(bitsPerSample, lpcOrder, lpcPrecision)) { pSamplesOut[0] = riceParamPart0 + drflac__calculate_prediction_64(lpcOrder, lpcShift, coefficients, pSamplesOut + 0); } else { pSamplesOut[0] = riceParamPart0 + drflac__calculate_prediction_32(lpcOrder, lpcShift, coefficients, pSamplesOut + 0); } i += 1; pSamplesOut += 1; } return DRFLAC_TRUE; } #if defined(DRFLAC_SUPPORT_SSE2) static DRFLAC_INLINE __m128i drflac__mm_packs_interleaved_epi32(__m128i a, __m128i b) { __m128i r; /* Pack. */ r = _mm_packs_epi32(a, b); /* a3a2 a1a0 b3b2 b1b0 -> a3a2 b3b2 a1a0 b1b0 */ r = _mm_shuffle_epi32(r, _MM_SHUFFLE(3, 1, 2, 0)); /* a3a2 b3b2 a1a0 b1b0 -> a3b3 a2b2 a1b1 a0b0 */ r = _mm_shufflehi_epi16(r, _MM_SHUFFLE(3, 1, 2, 0)); r = _mm_shufflelo_epi16(r, _MM_SHUFFLE(3, 1, 2, 0)); return r; } #endif #if defined(DRFLAC_SUPPORT_SSE41) static DRFLAC_INLINE __m128i drflac__mm_not_si128(__m128i a) { return _mm_xor_si128(a, _mm_cmpeq_epi32(_mm_setzero_si128(), _mm_setzero_si128())); } static DRFLAC_INLINE __m128i drflac__mm_hadd_epi32(__m128i x) { __m128i x64 = _mm_add_epi32(x, _mm_shuffle_epi32(x, _MM_SHUFFLE(1, 0, 3, 2))); __m128i x32 = _mm_shufflelo_epi16(x64, _MM_SHUFFLE(1, 0, 3, 2)); return _mm_add_epi32(x64, x32); } static DRFLAC_INLINE __m128i drflac__mm_hadd_epi64(__m128i x) { return _mm_add_epi64(x, _mm_shuffle_epi32(x, _MM_SHUFFLE(1, 0, 3, 2))); } static DRFLAC_INLINE __m128i drflac__mm_srai_epi64(__m128i x, int count) { /* To simplify this we are assuming count < 32. This restriction allows us to work on a low side and a high side. The low side is shifted with zero bits, whereas the right side is shifted with sign bits. */ __m128i lo = _mm_srli_epi64(x, count); __m128i hi = _mm_srai_epi32(x, count); hi = _mm_and_si128(hi, _mm_set_epi32(0xFFFFFFFF, 0, 0xFFFFFFFF, 0)); /* The high part needs to have the low part cleared. */ return _mm_or_si128(lo, hi); } static drflac_bool32 drflac__decode_samples_with_residual__rice__sse41_32(drflac_bs* bs, drflac_uint32 count, drflac_uint8 riceParam, drflac_uint32 order, drflac_int32 shift, const drflac_int32* coefficients, drflac_int32* pSamplesOut) { int i; drflac_uint32 riceParamMask; drflac_int32* pDecodedSamples = pSamplesOut; drflac_int32* pDecodedSamplesEnd = pSamplesOut + (count & ~3); drflac_uint32 zeroCountParts0 = 0; drflac_uint32 zeroCountParts1 = 0; drflac_uint32 zeroCountParts2 = 0; drflac_uint32 zeroCountParts3 = 0; drflac_uint32 riceParamParts0 = 0; drflac_uint32 riceParamParts1 = 0; drflac_uint32 riceParamParts2 = 0; drflac_uint32 riceParamParts3 = 0; __m128i coefficients128_0; __m128i coefficients128_4; __m128i coefficients128_8; __m128i samples128_0; __m128i samples128_4; __m128i samples128_8; __m128i riceParamMask128; const drflac_uint32 t[2] = {0x00000000, 0xFFFFFFFF}; riceParamMask = (drflac_uint32)~((~0UL) << riceParam); riceParamMask128 = _mm_set1_epi32(riceParamMask); /* Pre-load. */ coefficients128_0 = _mm_setzero_si128(); coefficients128_4 = _mm_setzero_si128(); coefficients128_8 = _mm_setzero_si128(); samples128_0 = _mm_setzero_si128(); samples128_4 = _mm_setzero_si128(); samples128_8 = _mm_setzero_si128(); /* Pre-loading the coefficients and prior samples is annoying because we need to ensure we don't try reading more than what's available in the input buffers. It would be convenient to use a fall-through switch to do this, but this results in strict aliasing warnings with GCC. To work around this I'm just doing something hacky. This feels a bit convoluted so I think there's opportunity for this to be simplified. */ #if 1 { int runningOrder = order; /* 0 - 3. */ if (runningOrder >= 4) { coefficients128_0 = _mm_loadu_si128((const __m128i*)(coefficients + 0)); samples128_0 = _mm_loadu_si128((const __m128i*)(pSamplesOut - 4)); runningOrder -= 4; } else { switch (runningOrder) { case 3: coefficients128_0 = _mm_set_epi32(0, coefficients[2], coefficients[1], coefficients[0]); samples128_0 = _mm_set_epi32(pSamplesOut[-1], pSamplesOut[-2], pSamplesOut[-3], 0); break; case 2: coefficients128_0 = _mm_set_epi32(0, 0, coefficients[1], coefficients[0]); samples128_0 = _mm_set_epi32(pSamplesOut[-1], pSamplesOut[-2], 0, 0); break; case 1: coefficients128_0 = _mm_set_epi32(0, 0, 0, coefficients[0]); samples128_0 = _mm_set_epi32(pSamplesOut[-1], 0, 0, 0); break; } runningOrder = 0; } /* 4 - 7 */ if (runningOrder >= 4) { coefficients128_4 = _mm_loadu_si128((const __m128i*)(coefficients + 4)); samples128_4 = _mm_loadu_si128((const __m128i*)(pSamplesOut - 8)); runningOrder -= 4; } else { switch (runningOrder) { case 3: coefficients128_4 = _mm_set_epi32(0, coefficients[6], coefficients[5], coefficients[4]); samples128_4 = _mm_set_epi32(pSamplesOut[-5], pSamplesOut[-6], pSamplesOut[-7], 0); break; case 2: coefficients128_4 = _mm_set_epi32(0, 0, coefficients[5], coefficients[4]); samples128_4 = _mm_set_epi32(pSamplesOut[-5], pSamplesOut[-6], 0, 0); break; case 1: coefficients128_4 = _mm_set_epi32(0, 0, 0, coefficients[4]); samples128_4 = _mm_set_epi32(pSamplesOut[-5], 0, 0, 0); break; } runningOrder = 0; } /* 8 - 11 */ if (runningOrder == 4) { coefficients128_8 = _mm_loadu_si128((const __m128i*)(coefficients + 8)); samples128_8 = _mm_loadu_si128((const __m128i*)(pSamplesOut - 12)); runningOrder -= 4; } else { switch (runningOrder) { case 3: coefficients128_8 = _mm_set_epi32(0, coefficients[10], coefficients[9], coefficients[8]); samples128_8 = _mm_set_epi32(pSamplesOut[-9], pSamplesOut[-10], pSamplesOut[-11], 0); break; case 2: coefficients128_8 = _mm_set_epi32(0, 0, coefficients[9], coefficients[8]); samples128_8 = _mm_set_epi32(pSamplesOut[-9], pSamplesOut[-10], 0, 0); break; case 1: coefficients128_8 = _mm_set_epi32(0, 0, 0, coefficients[8]); samples128_8 = _mm_set_epi32(pSamplesOut[-9], 0, 0, 0); break; } runningOrder = 0; } /* Coefficients need to be shuffled for our streaming algorithm below to work. Samples are already in the correct order from the loading routine above. */ coefficients128_0 = _mm_shuffle_epi32(coefficients128_0, _MM_SHUFFLE(0, 1, 2, 3)); coefficients128_4 = _mm_shuffle_epi32(coefficients128_4, _MM_SHUFFLE(0, 1, 2, 3)); coefficients128_8 = _mm_shuffle_epi32(coefficients128_8, _MM_SHUFFLE(0, 1, 2, 3)); } #else /* This causes strict-aliasing warnings with GCC. */ switch (order) { case 12: ((drflac_int32*)&coefficients128_8)[0] = coefficients[11]; ((drflac_int32*)&samples128_8)[0] = pDecodedSamples[-12]; case 11: ((drflac_int32*)&coefficients128_8)[1] = coefficients[10]; ((drflac_int32*)&samples128_8)[1] = pDecodedSamples[-11]; case 10: ((drflac_int32*)&coefficients128_8)[2] = coefficients[ 9]; ((drflac_int32*)&samples128_8)[2] = pDecodedSamples[-10]; case 9: ((drflac_int32*)&coefficients128_8)[3] = coefficients[ 8]; ((drflac_int32*)&samples128_8)[3] = pDecodedSamples[- 9]; case 8: ((drflac_int32*)&coefficients128_4)[0] = coefficients[ 7]; ((drflac_int32*)&samples128_4)[0] = pDecodedSamples[- 8]; case 7: ((drflac_int32*)&coefficients128_4)[1] = coefficients[ 6]; ((drflac_int32*)&samples128_4)[1] = pDecodedSamples[- 7]; case 6: ((drflac_int32*)&coefficients128_4)[2] = coefficients[ 5]; ((drflac_int32*)&samples128_4)[2] = pDecodedSamples[- 6]; case 5: ((drflac_int32*)&coefficients128_4)[3] = coefficients[ 4]; ((drflac_int32*)&samples128_4)[3] = pDecodedSamples[- 5]; case 4: ((drflac_int32*)&coefficients128_0)[0] = coefficients[ 3]; ((drflac_int32*)&samples128_0)[0] = pDecodedSamples[- 4]; case 3: ((drflac_int32*)&coefficients128_0)[1] = coefficients[ 2]; ((drflac_int32*)&samples128_0)[1] = pDecodedSamples[- 3]; case 2: ((drflac_int32*)&coefficients128_0)[2] = coefficients[ 1]; ((drflac_int32*)&samples128_0)[2] = pDecodedSamples[- 2]; case 1: ((drflac_int32*)&coefficients128_0)[3] = coefficients[ 0]; ((drflac_int32*)&samples128_0)[3] = pDecodedSamples[- 1]; } #endif /* For this version we are doing one sample at a time. */ while (pDecodedSamples < pDecodedSamplesEnd) { __m128i prediction128; __m128i zeroCountPart128; __m128i riceParamPart128; if (!drflac__read_rice_parts_x1(bs, riceParam, &zeroCountParts0, &riceParamParts0) || !drflac__read_rice_parts_x1(bs, riceParam, &zeroCountParts1, &riceParamParts1) || !drflac__read_rice_parts_x1(bs, riceParam, &zeroCountParts2, &riceParamParts2) || !drflac__read_rice_parts_x1(bs, riceParam, &zeroCountParts3, &riceParamParts3)) { return DRFLAC_FALSE; } zeroCountPart128 = _mm_set_epi32(zeroCountParts3, zeroCountParts2, zeroCountParts1, zeroCountParts0); riceParamPart128 = _mm_set_epi32(riceParamParts3, riceParamParts2, riceParamParts1, riceParamParts0); riceParamPart128 = _mm_and_si128(riceParamPart128, riceParamMask128); riceParamPart128 = _mm_or_si128(riceParamPart128, _mm_slli_epi32(zeroCountPart128, riceParam)); riceParamPart128 = _mm_xor_si128(_mm_srli_epi32(riceParamPart128, 1), _mm_add_epi32(drflac__mm_not_si128(_mm_and_si128(riceParamPart128, _mm_set1_epi32(0x01))), _mm_set1_epi32(0x01))); /* <-- SSE2 compatible */ /*riceParamPart128 = _mm_xor_si128(_mm_srli_epi32(riceParamPart128, 1), _mm_mullo_epi32(_mm_and_si128(riceParamPart128, _mm_set1_epi32(0x01)), _mm_set1_epi32(0xFFFFFFFF)));*/ /* <-- Only supported from SSE4.1 and is slower in my testing... */ if (order <= 4) { for (i = 0; i < 4; i += 1) { prediction128 = _mm_mullo_epi32(coefficients128_0, samples128_0); /* Horizontal add and shift. */ prediction128 = drflac__mm_hadd_epi32(prediction128); prediction128 = _mm_srai_epi32(prediction128, shift); prediction128 = _mm_add_epi32(riceParamPart128, prediction128); samples128_0 = _mm_alignr_epi8(prediction128, samples128_0, 4); riceParamPart128 = _mm_alignr_epi8(_mm_setzero_si128(), riceParamPart128, 4); } } else if (order <= 8) { for (i = 0; i < 4; i += 1) { prediction128 = _mm_mullo_epi32(coefficients128_4, samples128_4); prediction128 = _mm_add_epi32(prediction128, _mm_mullo_epi32(coefficients128_0, samples128_0)); /* Horizontal add and shift. */ prediction128 = drflac__mm_hadd_epi32(prediction128); prediction128 = _mm_srai_epi32(prediction128, shift); prediction128 = _mm_add_epi32(riceParamPart128, prediction128); samples128_4 = _mm_alignr_epi8(samples128_0, samples128_4, 4); samples128_0 = _mm_alignr_epi8(prediction128, samples128_0, 4); riceParamPart128 = _mm_alignr_epi8(_mm_setzero_si128(), riceParamPart128, 4); } } else { for (i = 0; i < 4; i += 1) { prediction128 = _mm_mullo_epi32(coefficients128_8, samples128_8); prediction128 = _mm_add_epi32(prediction128, _mm_mullo_epi32(coefficients128_4, samples128_4)); prediction128 = _mm_add_epi32(prediction128, _mm_mullo_epi32(coefficients128_0, samples128_0)); /* Horizontal add and shift. */ prediction128 = drflac__mm_hadd_epi32(prediction128); prediction128 = _mm_srai_epi32(prediction128, shift); prediction128 = _mm_add_epi32(riceParamPart128, prediction128); samples128_8 = _mm_alignr_epi8(samples128_4, samples128_8, 4); samples128_4 = _mm_alignr_epi8(samples128_0, samples128_4, 4); samples128_0 = _mm_alignr_epi8(prediction128, samples128_0, 4); riceParamPart128 = _mm_alignr_epi8(_mm_setzero_si128(), riceParamPart128, 4); } } /* We store samples in groups of 4. */ _mm_storeu_si128((__m128i*)pDecodedSamples, samples128_0); pDecodedSamples += 4; } /* Make sure we process the last few samples. */ i = (count & ~3); while (i < (int)count) { /* Rice extraction. */ if (!drflac__read_rice_parts_x1(bs, riceParam, &zeroCountParts0, &riceParamParts0)) { return DRFLAC_FALSE; } /* Rice reconstruction. */ riceParamParts0 &= riceParamMask; riceParamParts0 |= (zeroCountParts0 << riceParam); riceParamParts0 = (riceParamParts0 >> 1) ^ t[riceParamParts0 & 0x01]; /* Sample reconstruction. */ pDecodedSamples[0] = riceParamParts0 + drflac__calculate_prediction_32(order, shift, coefficients, pDecodedSamples); i += 1; pDecodedSamples += 1; } return DRFLAC_TRUE; } static drflac_bool32 drflac__decode_samples_with_residual__rice__sse41_64(drflac_bs* bs, drflac_uint32 count, drflac_uint8 riceParam, drflac_uint32 order, drflac_int32 shift, const drflac_int32* coefficients, drflac_int32* pSamplesOut) { int i; drflac_uint32 riceParamMask; drflac_int32* pDecodedSamples = pSamplesOut; drflac_int32* pDecodedSamplesEnd = pSamplesOut + (count & ~3); drflac_uint32 zeroCountParts0 = 0; drflac_uint32 zeroCountParts1 = 0; drflac_uint32 zeroCountParts2 = 0; drflac_uint32 zeroCountParts3 = 0; drflac_uint32 riceParamParts0 = 0; drflac_uint32 riceParamParts1 = 0; drflac_uint32 riceParamParts2 = 0; drflac_uint32 riceParamParts3 = 0; __m128i coefficients128_0; __m128i coefficients128_4; __m128i coefficients128_8; __m128i samples128_0; __m128i samples128_4; __m128i samples128_8; __m128i prediction128; __m128i riceParamMask128; const drflac_uint32 t[2] = {0x00000000, 0xFFFFFFFF}; DRFLAC_ASSERT(order <= 12); riceParamMask = (drflac_uint32)~((~0UL) << riceParam); riceParamMask128 = _mm_set1_epi32(riceParamMask); prediction128 = _mm_setzero_si128(); /* Pre-load. */ coefficients128_0 = _mm_setzero_si128(); coefficients128_4 = _mm_setzero_si128(); coefficients128_8 = _mm_setzero_si128(); samples128_0 = _mm_setzero_si128(); samples128_4 = _mm_setzero_si128(); samples128_8 = _mm_setzero_si128(); #if 1 { int runningOrder = order; /* 0 - 3. */ if (runningOrder >= 4) { coefficients128_0 = _mm_loadu_si128((const __m128i*)(coefficients + 0)); samples128_0 = _mm_loadu_si128((const __m128i*)(pSamplesOut - 4)); runningOrder -= 4; } else { switch (runningOrder) { case 3: coefficients128_0 = _mm_set_epi32(0, coefficients[2], coefficients[1], coefficients[0]); samples128_0 = _mm_set_epi32(pSamplesOut[-1], pSamplesOut[-2], pSamplesOut[-3], 0); break; case 2: coefficients128_0 = _mm_set_epi32(0, 0, coefficients[1], coefficients[0]); samples128_0 = _mm_set_epi32(pSamplesOut[-1], pSamplesOut[-2], 0, 0); break; case 1: coefficients128_0 = _mm_set_epi32(0, 0, 0, coefficients[0]); samples128_0 = _mm_set_epi32(pSamplesOut[-1], 0, 0, 0); break; } runningOrder = 0; } /* 4 - 7 */ if (runningOrder >= 4) { coefficients128_4 = _mm_loadu_si128((const __m128i*)(coefficients + 4)); samples128_4 = _mm_loadu_si128((const __m128i*)(pSamplesOut - 8)); runningOrder -= 4; } else { switch (runningOrder) { case 3: coefficients128_4 = _mm_set_epi32(0, coefficients[6], coefficients[5], coefficients[4]); samples128_4 = _mm_set_epi32(pSamplesOut[-5], pSamplesOut[-6], pSamplesOut[-7], 0); break; case 2: coefficients128_4 = _mm_set_epi32(0, 0, coefficients[5], coefficients[4]); samples128_4 = _mm_set_epi32(pSamplesOut[-5], pSamplesOut[-6], 0, 0); break; case 1: coefficients128_4 = _mm_set_epi32(0, 0, 0, coefficients[4]); samples128_4 = _mm_set_epi32(pSamplesOut[-5], 0, 0, 0); break; } runningOrder = 0; } /* 8 - 11 */ if (runningOrder == 4) { coefficients128_8 = _mm_loadu_si128((const __m128i*)(coefficients + 8)); samples128_8 = _mm_loadu_si128((const __m128i*)(pSamplesOut - 12)); runningOrder -= 4; } else { switch (runningOrder) { case 3: coefficients128_8 = _mm_set_epi32(0, coefficients[10], coefficients[9], coefficients[8]); samples128_8 = _mm_set_epi32(pSamplesOut[-9], pSamplesOut[-10], pSamplesOut[-11], 0); break; case 2: coefficients128_8 = _mm_set_epi32(0, 0, coefficients[9], coefficients[8]); samples128_8 = _mm_set_epi32(pSamplesOut[-9], pSamplesOut[-10], 0, 0); break; case 1: coefficients128_8 = _mm_set_epi32(0, 0, 0, coefficients[8]); samples128_8 = _mm_set_epi32(pSamplesOut[-9], 0, 0, 0); break; } runningOrder = 0; } /* Coefficients need to be shuffled for our streaming algorithm below to work. Samples are already in the correct order from the loading routine above. */ coefficients128_0 = _mm_shuffle_epi32(coefficients128_0, _MM_SHUFFLE(0, 1, 2, 3)); coefficients128_4 = _mm_shuffle_epi32(coefficients128_4, _MM_SHUFFLE(0, 1, 2, 3)); coefficients128_8 = _mm_shuffle_epi32(coefficients128_8, _MM_SHUFFLE(0, 1, 2, 3)); } #else switch (order) { case 12: ((drflac_int32*)&coefficients128_8)[0] = coefficients[11]; ((drflac_int32*)&samples128_8)[0] = pDecodedSamples[-12]; case 11: ((drflac_int32*)&coefficients128_8)[1] = coefficients[10]; ((drflac_int32*)&samples128_8)[1] = pDecodedSamples[-11]; case 10: ((drflac_int32*)&coefficients128_8)[2] = coefficients[ 9]; ((drflac_int32*)&samples128_8)[2] = pDecodedSamples[-10]; case 9: ((drflac_int32*)&coefficients128_8)[3] = coefficients[ 8]; ((drflac_int32*)&samples128_8)[3] = pDecodedSamples[- 9]; case 8: ((drflac_int32*)&coefficients128_4)[0] = coefficients[ 7]; ((drflac_int32*)&samples128_4)[0] = pDecodedSamples[- 8]; case 7: ((drflac_int32*)&coefficients128_4)[1] = coefficients[ 6]; ((drflac_int32*)&samples128_4)[1] = pDecodedSamples[- 7]; case 6: ((drflac_int32*)&coefficients128_4)[2] = coefficients[ 5]; ((drflac_int32*)&samples128_4)[2] = pDecodedSamples[- 6]; case 5: ((drflac_int32*)&coefficients128_4)[3] = coefficients[ 4]; ((drflac_int32*)&samples128_4)[3] = pDecodedSamples[- 5]; case 4: ((drflac_int32*)&coefficients128_0)[0] = coefficients[ 3]; ((drflac_int32*)&samples128_0)[0] = pDecodedSamples[- 4]; case 3: ((drflac_int32*)&coefficients128_0)[1] = coefficients[ 2]; ((drflac_int32*)&samples128_0)[1] = pDecodedSamples[- 3]; case 2: ((drflac_int32*)&coefficients128_0)[2] = coefficients[ 1]; ((drflac_int32*)&samples128_0)[2] = pDecodedSamples[- 2]; case 1: ((drflac_int32*)&coefficients128_0)[3] = coefficients[ 0]; ((drflac_int32*)&samples128_0)[3] = pDecodedSamples[- 1]; } #endif /* For this version we are doing one sample at a time. */ while (pDecodedSamples < pDecodedSamplesEnd) { __m128i zeroCountPart128; __m128i riceParamPart128; if (!drflac__read_rice_parts_x1(bs, riceParam, &zeroCountParts0, &riceParamParts0) || !drflac__read_rice_parts_x1(bs, riceParam, &zeroCountParts1, &riceParamParts1) || !drflac__read_rice_parts_x1(bs, riceParam, &zeroCountParts2, &riceParamParts2) || !drflac__read_rice_parts_x1(bs, riceParam, &zeroCountParts3, &riceParamParts3)) { return DRFLAC_FALSE; } zeroCountPart128 = _mm_set_epi32(zeroCountParts3, zeroCountParts2, zeroCountParts1, zeroCountParts0); riceParamPart128 = _mm_set_epi32(riceParamParts3, riceParamParts2, riceParamParts1, riceParamParts0); riceParamPart128 = _mm_and_si128(riceParamPart128, riceParamMask128); riceParamPart128 = _mm_or_si128(riceParamPart128, _mm_slli_epi32(zeroCountPart128, riceParam)); riceParamPart128 = _mm_xor_si128(_mm_srli_epi32(riceParamPart128, 1), _mm_add_epi32(drflac__mm_not_si128(_mm_and_si128(riceParamPart128, _mm_set1_epi32(1))), _mm_set1_epi32(1))); for (i = 0; i < 4; i += 1) { prediction128 = _mm_xor_si128(prediction128, prediction128); /* Reset to 0. */ switch (order) { case 12: case 11: prediction128 = _mm_add_epi64(prediction128, _mm_mul_epi32(_mm_shuffle_epi32(coefficients128_8, _MM_SHUFFLE(1, 1, 0, 0)), _mm_shuffle_epi32(samples128_8, _MM_SHUFFLE(1, 1, 0, 0)))); case 10: case 9: prediction128 = _mm_add_epi64(prediction128, _mm_mul_epi32(_mm_shuffle_epi32(coefficients128_8, _MM_SHUFFLE(3, 3, 2, 2)), _mm_shuffle_epi32(samples128_8, _MM_SHUFFLE(3, 3, 2, 2)))); case 8: case 7: prediction128 = _mm_add_epi64(prediction128, _mm_mul_epi32(_mm_shuffle_epi32(coefficients128_4, _MM_SHUFFLE(1, 1, 0, 0)), _mm_shuffle_epi32(samples128_4, _MM_SHUFFLE(1, 1, 0, 0)))); case 6: case 5: prediction128 = _mm_add_epi64(prediction128, _mm_mul_epi32(_mm_shuffle_epi32(coefficients128_4, _MM_SHUFFLE(3, 3, 2, 2)), _mm_shuffle_epi32(samples128_4, _MM_SHUFFLE(3, 3, 2, 2)))); case 4: case 3: prediction128 = _mm_add_epi64(prediction128, _mm_mul_epi32(_mm_shuffle_epi32(coefficients128_0, _MM_SHUFFLE(1, 1, 0, 0)), _mm_shuffle_epi32(samples128_0, _MM_SHUFFLE(1, 1, 0, 0)))); case 2: case 1: prediction128 = _mm_add_epi64(prediction128, _mm_mul_epi32(_mm_shuffle_epi32(coefficients128_0, _MM_SHUFFLE(3, 3, 2, 2)), _mm_shuffle_epi32(samples128_0, _MM_SHUFFLE(3, 3, 2, 2)))); } /* Horizontal add and shift. */ prediction128 = drflac__mm_hadd_epi64(prediction128); prediction128 = drflac__mm_srai_epi64(prediction128, shift); prediction128 = _mm_add_epi32(riceParamPart128, prediction128); /* Our value should be sitting in prediction128[0]. We need to combine this with our SSE samples. */ samples128_8 = _mm_alignr_epi8(samples128_4, samples128_8, 4); samples128_4 = _mm_alignr_epi8(samples128_0, samples128_4, 4); samples128_0 = _mm_alignr_epi8(prediction128, samples128_0, 4); /* Slide our rice parameter down so that the value in position 0 contains the next one to process. */ riceParamPart128 = _mm_alignr_epi8(_mm_setzero_si128(), riceParamPart128, 4); } /* We store samples in groups of 4. */ _mm_storeu_si128((__m128i*)pDecodedSamples, samples128_0); pDecodedSamples += 4; } /* Make sure we process the last few samples. */ i = (count & ~3); while (i < (int)count) { /* Rice extraction. */ if (!drflac__read_rice_parts_x1(bs, riceParam, &zeroCountParts0, &riceParamParts0)) { return DRFLAC_FALSE; } /* Rice reconstruction. */ riceParamParts0 &= riceParamMask; riceParamParts0 |= (zeroCountParts0 << riceParam); riceParamParts0 = (riceParamParts0 >> 1) ^ t[riceParamParts0 & 0x01]; /* Sample reconstruction. */ pDecodedSamples[0] = riceParamParts0 + drflac__calculate_prediction_64(order, shift, coefficients, pDecodedSamples); i += 1; pDecodedSamples += 1; } return DRFLAC_TRUE; } static drflac_bool32 drflac__decode_samples_with_residual__rice__sse41(drflac_bs* bs, drflac_uint32 bitsPerSample, drflac_uint32 count, drflac_uint8 riceParam, drflac_uint32 lpcOrder, drflac_int32 lpcShift, drflac_uint32 lpcPrecision, const drflac_int32* coefficients, drflac_int32* pSamplesOut) { DRFLAC_ASSERT(bs != NULL); DRFLAC_ASSERT(pSamplesOut != NULL); /* In my testing the order is rarely > 12, so in this case I'm going to simplify the SSE implementation by only handling order <= 12. */ if (lpcOrder > 0 && lpcOrder <= 12) { if (drflac__use_64_bit_prediction(bitsPerSample, lpcOrder, lpcPrecision)) { return drflac__decode_samples_with_residual__rice__sse41_64(bs, count, riceParam, lpcOrder, lpcShift, coefficients, pSamplesOut); } else { return drflac__decode_samples_with_residual__rice__sse41_32(bs, count, riceParam, lpcOrder, lpcShift, coefficients, pSamplesOut); } } else { return drflac__decode_samples_with_residual__rice__scalar(bs, bitsPerSample, count, riceParam, lpcOrder, lpcShift, lpcPrecision, coefficients, pSamplesOut); } } #endif #if defined(DRFLAC_SUPPORT_NEON) static DRFLAC_INLINE void drflac__vst2q_s32(drflac_int32* p, int32x4x2_t x) { vst1q_s32(p+0, x.val[0]); vst1q_s32(p+4, x.val[1]); } static DRFLAC_INLINE void drflac__vst2q_u32(drflac_uint32* p, uint32x4x2_t x) { vst1q_u32(p+0, x.val[0]); vst1q_u32(p+4, x.val[1]); } static DRFLAC_INLINE void drflac__vst2q_f32(float* p, float32x4x2_t x) { vst1q_f32(p+0, x.val[0]); vst1q_f32(p+4, x.val[1]); } static DRFLAC_INLINE void drflac__vst2q_s16(drflac_int16* p, int16x4x2_t x) { vst1q_s16(p, vcombine_s16(x.val[0], x.val[1])); } static DRFLAC_INLINE void drflac__vst2q_u16(drflac_uint16* p, uint16x4x2_t x) { vst1q_u16(p, vcombine_u16(x.val[0], x.val[1])); } static DRFLAC_INLINE int32x4_t drflac__vdupq_n_s32x4(drflac_int32 x3, drflac_int32 x2, drflac_int32 x1, drflac_int32 x0) { drflac_int32 x[4]; x[3] = x3; x[2] = x2; x[1] = x1; x[0] = x0; return vld1q_s32(x); } static DRFLAC_INLINE int32x4_t drflac__valignrq_s32_1(int32x4_t a, int32x4_t b) { /* Equivalent to SSE's _mm_alignr_epi8(a, b, 4) */ /* Reference */ /*return drflac__vdupq_n_s32x4( vgetq_lane_s32(a, 0), vgetq_lane_s32(b, 3), vgetq_lane_s32(b, 2), vgetq_lane_s32(b, 1) );*/ return vextq_s32(b, a, 1); } static DRFLAC_INLINE uint32x4_t drflac__valignrq_u32_1(uint32x4_t a, uint32x4_t b) { /* Equivalent to SSE's _mm_alignr_epi8(a, b, 4) */ /* Reference */ /*return drflac__vdupq_n_s32x4( vgetq_lane_s32(a, 0), vgetq_lane_s32(b, 3), vgetq_lane_s32(b, 2), vgetq_lane_s32(b, 1) );*/ return vextq_u32(b, a, 1); } static DRFLAC_INLINE int32x2_t drflac__vhaddq_s32(int32x4_t x) { /* The sum must end up in position 0. */ /* Reference */ /*return vdupq_n_s32( vgetq_lane_s32(x, 3) + vgetq_lane_s32(x, 2) + vgetq_lane_s32(x, 1) + vgetq_lane_s32(x, 0) );*/ int32x2_t r = vadd_s32(vget_high_s32(x), vget_low_s32(x)); return vpadd_s32(r, r); } static DRFLAC_INLINE int64x1_t drflac__vhaddq_s64(int64x2_t x) { return vadd_s64(vget_high_s64(x), vget_low_s64(x)); } static DRFLAC_INLINE int32x4_t drflac__vrevq_s32(int32x4_t x) { /* Reference */ /*return drflac__vdupq_n_s32x4( vgetq_lane_s32(x, 0), vgetq_lane_s32(x, 1), vgetq_lane_s32(x, 2), vgetq_lane_s32(x, 3) );*/ return vrev64q_s32(vcombine_s32(vget_high_s32(x), vget_low_s32(x))); } static DRFLAC_INLINE int32x4_t drflac__vnotq_s32(int32x4_t x) { return veorq_s32(x, vdupq_n_s32(0xFFFFFFFF)); } static DRFLAC_INLINE uint32x4_t drflac__vnotq_u32(uint32x4_t x) { return veorq_u32(x, vdupq_n_u32(0xFFFFFFFF)); } static drflac_bool32 drflac__decode_samples_with_residual__rice__neon_32(drflac_bs* bs, drflac_uint32 count, drflac_uint8 riceParam, drflac_uint32 order, drflac_int32 shift, const drflac_int32* coefficients, drflac_int32* pSamplesOut) { int i; drflac_uint32 riceParamMask; drflac_int32* pDecodedSamples = pSamplesOut; drflac_int32* pDecodedSamplesEnd = pSamplesOut + (count & ~3); drflac_uint32 zeroCountParts[4]; drflac_uint32 riceParamParts[4]; int32x4_t coefficients128_0; int32x4_t coefficients128_4; int32x4_t coefficients128_8; int32x4_t samples128_0; int32x4_t samples128_4; int32x4_t samples128_8; uint32x4_t riceParamMask128; int32x4_t riceParam128; int32x2_t shift64; uint32x4_t one128; const drflac_uint32 t[2] = {0x00000000, 0xFFFFFFFF}; riceParamMask = ~((~0UL) << riceParam); riceParamMask128 = vdupq_n_u32(riceParamMask); riceParam128 = vdupq_n_s32(riceParam); shift64 = vdup_n_s32(-shift); /* Negate the shift because we'll be doing a variable shift using vshlq_s32(). */ one128 = vdupq_n_u32(1); /* Pre-loading the coefficients and prior samples is annoying because we need to ensure we don't try reading more than what's available in the input buffers. It would be conenient to use a fall-through switch to do this, but this results in strict aliasing warnings with GCC. To work around this I'm just doing something hacky. This feels a bit convoluted so I think there's opportunity for this to be simplified. */ { int runningOrder = order; drflac_int32 tempC[4] = {0, 0, 0, 0}; drflac_int32 tempS[4] = {0, 0, 0, 0}; /* 0 - 3. */ if (runningOrder >= 4) { coefficients128_0 = vld1q_s32(coefficients + 0); samples128_0 = vld1q_s32(pSamplesOut - 4); runningOrder -= 4; } else { switch (runningOrder) { case 3: tempC[2] = coefficients[2]; tempS[1] = pSamplesOut[-3]; /* fallthrough */ case 2: tempC[1] = coefficients[1]; tempS[2] = pSamplesOut[-2]; /* fallthrough */ case 1: tempC[0] = coefficients[0]; tempS[3] = pSamplesOut[-1]; /* fallthrough */ } coefficients128_0 = vld1q_s32(tempC); samples128_0 = vld1q_s32(tempS); runningOrder = 0; } /* 4 - 7 */ if (runningOrder >= 4) { coefficients128_4 = vld1q_s32(coefficients + 4); samples128_4 = vld1q_s32(pSamplesOut - 8); runningOrder -= 4; } else { switch (runningOrder) { case 3: tempC[2] = coefficients[6]; tempS[1] = pSamplesOut[-7]; /* fallthrough */ case 2: tempC[1] = coefficients[5]; tempS[2] = pSamplesOut[-6]; /* fallthrough */ case 1: tempC[0] = coefficients[4]; tempS[3] = pSamplesOut[-5]; /* fallthrough */ } coefficients128_4 = vld1q_s32(tempC); samples128_4 = vld1q_s32(tempS); runningOrder = 0; } /* 8 - 11 */ if (runningOrder == 4) { coefficients128_8 = vld1q_s32(coefficients + 8); samples128_8 = vld1q_s32(pSamplesOut - 12); runningOrder -= 4; } else { switch (runningOrder) { case 3: tempC[2] = coefficients[10]; tempS[1] = pSamplesOut[-11]; /* fallthrough */ case 2: tempC[1] = coefficients[ 9]; tempS[2] = pSamplesOut[-10]; /* fallthrough */ case 1: tempC[0] = coefficients[ 8]; tempS[3] = pSamplesOut[- 9]; /* fallthrough */ } coefficients128_8 = vld1q_s32(tempC); samples128_8 = vld1q_s32(tempS); runningOrder = 0; } /* Coefficients need to be shuffled for our streaming algorithm below to work. Samples are already in the correct order from the loading routine above. */ coefficients128_0 = drflac__vrevq_s32(coefficients128_0); coefficients128_4 = drflac__vrevq_s32(coefficients128_4); coefficients128_8 = drflac__vrevq_s32(coefficients128_8); } /* For this version we are doing one sample at a time. */ while (pDecodedSamples < pDecodedSamplesEnd) { int32x4_t prediction128; int32x2_t prediction64; uint32x4_t zeroCountPart128; uint32x4_t riceParamPart128; if (!drflac__read_rice_parts_x1(bs, riceParam, &zeroCountParts[0], &riceParamParts[0]) || !drflac__read_rice_parts_x1(bs, riceParam, &zeroCountParts[1], &riceParamParts[1]) || !drflac__read_rice_parts_x1(bs, riceParam, &zeroCountParts[2], &riceParamParts[2]) || !drflac__read_rice_parts_x1(bs, riceParam, &zeroCountParts[3], &riceParamParts[3])) { return DRFLAC_FALSE; } zeroCountPart128 = vld1q_u32(zeroCountParts); riceParamPart128 = vld1q_u32(riceParamParts); riceParamPart128 = vandq_u32(riceParamPart128, riceParamMask128); riceParamPart128 = vorrq_u32(riceParamPart128, vshlq_u32(zeroCountPart128, riceParam128)); riceParamPart128 = veorq_u32(vshrq_n_u32(riceParamPart128, 1), vaddq_u32(drflac__vnotq_u32(vandq_u32(riceParamPart128, one128)), one128)); if (order <= 4) { for (i = 0; i < 4; i += 1) { prediction128 = vmulq_s32(coefficients128_0, samples128_0); /* Horizontal add and shift. */ prediction64 = drflac__vhaddq_s32(prediction128); prediction64 = vshl_s32(prediction64, shift64); prediction64 = vadd_s32(prediction64, vget_low_s32(vreinterpretq_s32_u32(riceParamPart128))); samples128_0 = drflac__valignrq_s32_1(vcombine_s32(prediction64, vdup_n_s32(0)), samples128_0); riceParamPart128 = drflac__valignrq_u32_1(vdupq_n_u32(0), riceParamPart128); } } else if (order <= 8) { for (i = 0; i < 4; i += 1) { prediction128 = vmulq_s32(coefficients128_4, samples128_4); prediction128 = vmlaq_s32(prediction128, coefficients128_0, samples128_0); /* Horizontal add and shift. */ prediction64 = drflac__vhaddq_s32(prediction128); prediction64 = vshl_s32(prediction64, shift64); prediction64 = vadd_s32(prediction64, vget_low_s32(vreinterpretq_s32_u32(riceParamPart128))); samples128_4 = drflac__valignrq_s32_1(samples128_0, samples128_4); samples128_0 = drflac__valignrq_s32_1(vcombine_s32(prediction64, vdup_n_s32(0)), samples128_0); riceParamPart128 = drflac__valignrq_u32_1(vdupq_n_u32(0), riceParamPart128); } } else { for (i = 0; i < 4; i += 1) { prediction128 = vmulq_s32(coefficients128_8, samples128_8); prediction128 = vmlaq_s32(prediction128, coefficients128_4, samples128_4); prediction128 = vmlaq_s32(prediction128, coefficients128_0, samples128_0); /* Horizontal add and shift. */ prediction64 = drflac__vhaddq_s32(prediction128); prediction64 = vshl_s32(prediction64, shift64); prediction64 = vadd_s32(prediction64, vget_low_s32(vreinterpretq_s32_u32(riceParamPart128))); samples128_8 = drflac__valignrq_s32_1(samples128_4, samples128_8); samples128_4 = drflac__valignrq_s32_1(samples128_0, samples128_4); samples128_0 = drflac__valignrq_s32_1(vcombine_s32(prediction64, vdup_n_s32(0)), samples128_0); riceParamPart128 = drflac__valignrq_u32_1(vdupq_n_u32(0), riceParamPart128); } } /* We store samples in groups of 4. */ vst1q_s32(pDecodedSamples, samples128_0); pDecodedSamples += 4; } /* Make sure we process the last few samples. */ i = (count & ~3); while (i < (int)count) { /* Rice extraction. */ if (!drflac__read_rice_parts_x1(bs, riceParam, &zeroCountParts[0], &riceParamParts[0])) { return DRFLAC_FALSE; } /* Rice reconstruction. */ riceParamParts[0] &= riceParamMask; riceParamParts[0] |= (zeroCountParts[0] << riceParam); riceParamParts[0] = (riceParamParts[0] >> 1) ^ t[riceParamParts[0] & 0x01]; /* Sample reconstruction. */ pDecodedSamples[0] = riceParamParts[0] + drflac__calculate_prediction_32(order, shift, coefficients, pDecodedSamples); i += 1; pDecodedSamples += 1; } return DRFLAC_TRUE; } static drflac_bool32 drflac__decode_samples_with_residual__rice__neon_64(drflac_bs* bs, drflac_uint32 count, drflac_uint8 riceParam, drflac_uint32 order, drflac_int32 shift, const drflac_int32* coefficients, drflac_int32* pSamplesOut) { int i; drflac_uint32 riceParamMask; drflac_int32* pDecodedSamples = pSamplesOut; drflac_int32* pDecodedSamplesEnd = pSamplesOut + (count & ~3); drflac_uint32 zeroCountParts[4]; drflac_uint32 riceParamParts[4]; int32x4_t coefficients128_0; int32x4_t coefficients128_4; int32x4_t coefficients128_8; int32x4_t samples128_0; int32x4_t samples128_4; int32x4_t samples128_8; uint32x4_t riceParamMask128; int32x4_t riceParam128; int64x1_t shift64; uint32x4_t one128; const drflac_uint32 t[2] = {0x00000000, 0xFFFFFFFF}; riceParamMask = ~((~0UL) << riceParam); riceParamMask128 = vdupq_n_u32(riceParamMask); riceParam128 = vdupq_n_s32(riceParam); shift64 = vdup_n_s64(-shift); /* Negate the shift because we'll be doing a variable shift using vshlq_s32(). */ one128 = vdupq_n_u32(1); /* Pre-loading the coefficients and prior samples is annoying because we need to ensure we don't try reading more than what's available in the input buffers. It would be convenient to use a fall-through switch to do this, but this results in strict aliasing warnings with GCC. To work around this I'm just doing something hacky. This feels a bit convoluted so I think there's opportunity for this to be simplified. */ { int runningOrder = order; drflac_int32 tempC[4] = {0, 0, 0, 0}; drflac_int32 tempS[4] = {0, 0, 0, 0}; /* 0 - 3. */ if (runningOrder >= 4) { coefficients128_0 = vld1q_s32(coefficients + 0); samples128_0 = vld1q_s32(pSamplesOut - 4); runningOrder -= 4; } else { switch (runningOrder) { case 3: tempC[2] = coefficients[2]; tempS[1] = pSamplesOut[-3]; /* fallthrough */ case 2: tempC[1] = coefficients[1]; tempS[2] = pSamplesOut[-2]; /* fallthrough */ case 1: tempC[0] = coefficients[0]; tempS[3] = pSamplesOut[-1]; /* fallthrough */ } coefficients128_0 = vld1q_s32(tempC); samples128_0 = vld1q_s32(tempS); runningOrder = 0; } /* 4 - 7 */ if (runningOrder >= 4) { coefficients128_4 = vld1q_s32(coefficients + 4); samples128_4 = vld1q_s32(pSamplesOut - 8); runningOrder -= 4; } else { switch (runningOrder) { case 3: tempC[2] = coefficients[6]; tempS[1] = pSamplesOut[-7]; /* fallthrough */ case 2: tempC[1] = coefficients[5]; tempS[2] = pSamplesOut[-6]; /* fallthrough */ case 1: tempC[0] = coefficients[4]; tempS[3] = pSamplesOut[-5]; /* fallthrough */ } coefficients128_4 = vld1q_s32(tempC); samples128_4 = vld1q_s32(tempS); runningOrder = 0; } /* 8 - 11 */ if (runningOrder == 4) { coefficients128_8 = vld1q_s32(coefficients + 8); samples128_8 = vld1q_s32(pSamplesOut - 12); runningOrder -= 4; } else { switch (runningOrder) { case 3: tempC[2] = coefficients[10]; tempS[1] = pSamplesOut[-11]; /* fallthrough */ case 2: tempC[1] = coefficients[ 9]; tempS[2] = pSamplesOut[-10]; /* fallthrough */ case 1: tempC[0] = coefficients[ 8]; tempS[3] = pSamplesOut[- 9]; /* fallthrough */ } coefficients128_8 = vld1q_s32(tempC); samples128_8 = vld1q_s32(tempS); runningOrder = 0; } /* Coefficients need to be shuffled for our streaming algorithm below to work. Samples are already in the correct order from the loading routine above. */ coefficients128_0 = drflac__vrevq_s32(coefficients128_0); coefficients128_4 = drflac__vrevq_s32(coefficients128_4); coefficients128_8 = drflac__vrevq_s32(coefficients128_8); } /* For this version we are doing one sample at a time. */ while (pDecodedSamples < pDecodedSamplesEnd) { int64x2_t prediction128; uint32x4_t zeroCountPart128; uint32x4_t riceParamPart128; if (!drflac__read_rice_parts_x1(bs, riceParam, &zeroCountParts[0], &riceParamParts[0]) || !drflac__read_rice_parts_x1(bs, riceParam, &zeroCountParts[1], &riceParamParts[1]) || !drflac__read_rice_parts_x1(bs, riceParam, &zeroCountParts[2], &riceParamParts[2]) || !drflac__read_rice_parts_x1(bs, riceParam, &zeroCountParts[3], &riceParamParts[3])) { return DRFLAC_FALSE; } zeroCountPart128 = vld1q_u32(zeroCountParts); riceParamPart128 = vld1q_u32(riceParamParts); riceParamPart128 = vandq_u32(riceParamPart128, riceParamMask128); riceParamPart128 = vorrq_u32(riceParamPart128, vshlq_u32(zeroCountPart128, riceParam128)); riceParamPart128 = veorq_u32(vshrq_n_u32(riceParamPart128, 1), vaddq_u32(drflac__vnotq_u32(vandq_u32(riceParamPart128, one128)), one128)); for (i = 0; i < 4; i += 1) { int64x1_t prediction64; prediction128 = veorq_s64(prediction128, prediction128); /* Reset to 0. */ switch (order) { case 12: case 11: prediction128 = vaddq_s64(prediction128, vmull_s32(vget_low_s32(coefficients128_8), vget_low_s32(samples128_8))); case 10: case 9: prediction128 = vaddq_s64(prediction128, vmull_s32(vget_high_s32(coefficients128_8), vget_high_s32(samples128_8))); case 8: case 7: prediction128 = vaddq_s64(prediction128, vmull_s32(vget_low_s32(coefficients128_4), vget_low_s32(samples128_4))); case 6: case 5: prediction128 = vaddq_s64(prediction128, vmull_s32(vget_high_s32(coefficients128_4), vget_high_s32(samples128_4))); case 4: case 3: prediction128 = vaddq_s64(prediction128, vmull_s32(vget_low_s32(coefficients128_0), vget_low_s32(samples128_0))); case 2: case 1: prediction128 = vaddq_s64(prediction128, vmull_s32(vget_high_s32(coefficients128_0), vget_high_s32(samples128_0))); } /* Horizontal add and shift. */ prediction64 = drflac__vhaddq_s64(prediction128); prediction64 = vshl_s64(prediction64, shift64); prediction64 = vadd_s64(prediction64, vdup_n_s64(vgetq_lane_u32(riceParamPart128, 0))); /* Our value should be sitting in prediction64[0]. We need to combine this with our SSE samples. */ samples128_8 = drflac__valignrq_s32_1(samples128_4, samples128_8); samples128_4 = drflac__valignrq_s32_1(samples128_0, samples128_4); samples128_0 = drflac__valignrq_s32_1(vcombine_s32(vreinterpret_s32_s64(prediction64), vdup_n_s32(0)), samples128_0); /* Slide our rice parameter down so that the value in position 0 contains the next one to process. */ riceParamPart128 = drflac__valignrq_u32_1(vdupq_n_u32(0), riceParamPart128); } /* We store samples in groups of 4. */ vst1q_s32(pDecodedSamples, samples128_0); pDecodedSamples += 4; } /* Make sure we process the last few samples. */ i = (count & ~3); while (i < (int)count) { /* Rice extraction. */ if (!drflac__read_rice_parts_x1(bs, riceParam, &zeroCountParts[0], &riceParamParts[0])) { return DRFLAC_FALSE; } /* Rice reconstruction. */ riceParamParts[0] &= riceParamMask; riceParamParts[0] |= (zeroCountParts[0] << riceParam); riceParamParts[0] = (riceParamParts[0] >> 1) ^ t[riceParamParts[0] & 0x01]; /* Sample reconstruction. */ pDecodedSamples[0] = riceParamParts[0] + drflac__calculate_prediction_64(order, shift, coefficients, pDecodedSamples); i += 1; pDecodedSamples += 1; } return DRFLAC_TRUE; } static drflac_bool32 drflac__decode_samples_with_residual__rice__neon(drflac_bs* bs, drflac_uint32 bitsPerSample, drflac_uint32 count, drflac_uint8 riceParam, drflac_uint32 lpcOrder, drflac_int32 lpcShift, drflac_uint32 lpcPrecision, const drflac_int32* coefficients, drflac_int32* pSamplesOut) { DRFLAC_ASSERT(bs != NULL); DRFLAC_ASSERT(pSamplesOut != NULL); /* In my testing the order is rarely > 12, so in this case I'm going to simplify the NEON implementation by only handling order <= 12. */ if (lpcOrder > 0 && lpcOrder <= 12) { if (drflac__use_64_bit_prediction(bitsPerSample, lpcOrder, lpcPrecision)) { return drflac__decode_samples_with_residual__rice__neon_64(bs, count, riceParam, lpcOrder, lpcShift, coefficients, pSamplesOut); } else { return drflac__decode_samples_with_residual__rice__neon_32(bs, count, riceParam, lpcOrder, lpcShift, coefficients, pSamplesOut); } } else { return drflac__decode_samples_with_residual__rice__scalar(bs, bitsPerSample, count, riceParam, lpcOrder, lpcShift, lpcPrecision, coefficients, pSamplesOut); } } #endif static drflac_bool32 drflac__decode_samples_with_residual__rice(drflac_bs* bs, drflac_uint32 bitsPerSample, drflac_uint32 count, drflac_uint8 riceParam, drflac_uint32 lpcOrder, drflac_int32 lpcShift, drflac_uint32 lpcPrecision, const drflac_int32* coefficients, drflac_int32* pSamplesOut) { #if defined(DRFLAC_SUPPORT_SSE41) if (drflac__gIsSSE41Supported) { return drflac__decode_samples_with_residual__rice__sse41(bs, bitsPerSample, count, riceParam, lpcOrder, lpcShift, lpcPrecision, coefficients, pSamplesOut); } else #elif defined(DRFLAC_SUPPORT_NEON) if (drflac__gIsNEONSupported) { return drflac__decode_samples_with_residual__rice__neon(bs, bitsPerSample, count, riceParam, lpcOrder, lpcShift, lpcPrecision, coefficients, pSamplesOut); } else #endif { /* Scalar fallback. */ #if 0 return drflac__decode_samples_with_residual__rice__reference(bs, bitsPerSample, count, riceParam, lpcOrder, lpcShift, lpcPrecision, coefficients, pSamplesOut); #else return drflac__decode_samples_with_residual__rice__scalar(bs, bitsPerSample, count, riceParam, lpcOrder, lpcShift, lpcPrecision, coefficients, pSamplesOut); #endif } } /* Reads and seeks past a string of residual values as Rice codes. The decoder should be sitting on the first bit of the Rice codes. */ static drflac_bool32 drflac__read_and_seek_residual__rice(drflac_bs* bs, drflac_uint32 count, drflac_uint8 riceParam) { drflac_uint32 i; DRFLAC_ASSERT(bs != NULL); for (i = 0; i < count; ++i) { if (!drflac__seek_rice_parts(bs, riceParam)) { return DRFLAC_FALSE; } } return DRFLAC_TRUE; } #if defined(__clang__) __attribute__((no_sanitize("signed-integer-overflow"))) #endif static drflac_bool32 drflac__decode_samples_with_residual__unencoded(drflac_bs* bs, drflac_uint32 bitsPerSample, drflac_uint32 count, drflac_uint8 unencodedBitsPerSample, drflac_uint32 lpcOrder, drflac_int32 lpcShift, drflac_uint32 lpcPrecision, const drflac_int32* coefficients, drflac_int32* pSamplesOut) { drflac_uint32 i; DRFLAC_ASSERT(bs != NULL); DRFLAC_ASSERT(unencodedBitsPerSample <= 31); /* <-- unencodedBitsPerSample is a 5 bit number, so cannot exceed 31. */ DRFLAC_ASSERT(pSamplesOut != NULL); for (i = 0; i < count; ++i) { if (unencodedBitsPerSample > 0) { if (!drflac__read_int32(bs, unencodedBitsPerSample, pSamplesOut + i)) { return DRFLAC_FALSE; } } else { pSamplesOut[i] = 0; } if (drflac__use_64_bit_prediction(bitsPerSample, lpcOrder, lpcPrecision)) { pSamplesOut[i] += drflac__calculate_prediction_64(lpcOrder, lpcShift, coefficients, pSamplesOut + i); } else { pSamplesOut[i] += drflac__calculate_prediction_32(lpcOrder, lpcShift, coefficients, pSamplesOut + i); } } return DRFLAC_TRUE; } /* Reads and decodes the residual for the sub-frame the decoder is currently sitting on. This function should be called when the decoder is sitting at the very start of the RESIDUAL block. The first residuals will be ignored. The and parameters are used to determine how many residual values need to be decoded. */ static drflac_bool32 drflac__decode_samples_with_residual(drflac_bs* bs, drflac_uint32 bitsPerSample, drflac_uint32 blockSize, drflac_uint32 lpcOrder, drflac_int32 lpcShift, drflac_uint32 lpcPrecision, const drflac_int32* coefficients, drflac_int32* pDecodedSamples) { drflac_uint8 residualMethod; drflac_uint8 partitionOrder; drflac_uint32 samplesInPartition; drflac_uint32 partitionsRemaining; DRFLAC_ASSERT(bs != NULL); DRFLAC_ASSERT(blockSize != 0); DRFLAC_ASSERT(pDecodedSamples != NULL); /* <-- Should we allow NULL, in which case we just seek past the residual rather than do a full decode? */ if (!drflac__read_uint8(bs, 2, &residualMethod)) { return DRFLAC_FALSE; } if (residualMethod != DRFLAC_RESIDUAL_CODING_METHOD_PARTITIONED_RICE && residualMethod != DRFLAC_RESIDUAL_CODING_METHOD_PARTITIONED_RICE2) { return DRFLAC_FALSE; /* Unknown or unsupported residual coding method. */ } /* Ignore the first values. */ pDecodedSamples += lpcOrder; if (!drflac__read_uint8(bs, 4, &partitionOrder)) { return DRFLAC_FALSE; } /* From the FLAC spec: The Rice partition order in a Rice-coded residual section must be less than or equal to 8. */ if (partitionOrder > 8) { return DRFLAC_FALSE; } /* Validation check. */ if ((blockSize / (1 << partitionOrder)) < lpcOrder) { return DRFLAC_FALSE; } samplesInPartition = (blockSize / (1 << partitionOrder)) - lpcOrder; partitionsRemaining = (1 << partitionOrder); for (;;) { drflac_uint8 riceParam = 0; if (residualMethod == DRFLAC_RESIDUAL_CODING_METHOD_PARTITIONED_RICE) { if (!drflac__read_uint8(bs, 4, &riceParam)) { return DRFLAC_FALSE; } if (riceParam == 15) { riceParam = 0xFF; } } else if (residualMethod == DRFLAC_RESIDUAL_CODING_METHOD_PARTITIONED_RICE2) { if (!drflac__read_uint8(bs, 5, &riceParam)) { return DRFLAC_FALSE; } if (riceParam == 31) { riceParam = 0xFF; } } if (riceParam != 0xFF) { if (!drflac__decode_samples_with_residual__rice(bs, bitsPerSample, samplesInPartition, riceParam, lpcOrder, lpcShift, lpcPrecision, coefficients, pDecodedSamples)) { return DRFLAC_FALSE; } } else { drflac_uint8 unencodedBitsPerSample = 0; if (!drflac__read_uint8(bs, 5, &unencodedBitsPerSample)) { return DRFLAC_FALSE; } if (!drflac__decode_samples_with_residual__unencoded(bs, bitsPerSample, samplesInPartition, unencodedBitsPerSample, lpcOrder, lpcShift, lpcPrecision, coefficients, pDecodedSamples)) { return DRFLAC_FALSE; } } pDecodedSamples += samplesInPartition; if (partitionsRemaining == 1) { break; } partitionsRemaining -= 1; if (partitionOrder != 0) { samplesInPartition = blockSize / (1 << partitionOrder); } } return DRFLAC_TRUE; } /* Reads and seeks past the residual for the sub-frame the decoder is currently sitting on. This function should be called when the decoder is sitting at the very start of the RESIDUAL block. The first residuals will be set to 0. The and parameters are used to determine how many residual values need to be decoded. */ static drflac_bool32 drflac__read_and_seek_residual(drflac_bs* bs, drflac_uint32 blockSize, drflac_uint32 order) { drflac_uint8 residualMethod; drflac_uint8 partitionOrder; drflac_uint32 samplesInPartition; drflac_uint32 partitionsRemaining; DRFLAC_ASSERT(bs != NULL); DRFLAC_ASSERT(blockSize != 0); if (!drflac__read_uint8(bs, 2, &residualMethod)) { return DRFLAC_FALSE; } if (residualMethod != DRFLAC_RESIDUAL_CODING_METHOD_PARTITIONED_RICE && residualMethod != DRFLAC_RESIDUAL_CODING_METHOD_PARTITIONED_RICE2) { return DRFLAC_FALSE; /* Unknown or unsupported residual coding method. */ } if (!drflac__read_uint8(bs, 4, &partitionOrder)) { return DRFLAC_FALSE; } /* From the FLAC spec: The Rice partition order in a Rice-coded residual section must be less than or equal to 8. */ if (partitionOrder > 8) { return DRFLAC_FALSE; } /* Validation check. */ if ((blockSize / (1 << partitionOrder)) <= order) { return DRFLAC_FALSE; } samplesInPartition = (blockSize / (1 << partitionOrder)) - order; partitionsRemaining = (1 << partitionOrder); for (;;) { drflac_uint8 riceParam = 0; if (residualMethod == DRFLAC_RESIDUAL_CODING_METHOD_PARTITIONED_RICE) { if (!drflac__read_uint8(bs, 4, &riceParam)) { return DRFLAC_FALSE; } if (riceParam == 15) { riceParam = 0xFF; } } else if (residualMethod == DRFLAC_RESIDUAL_CODING_METHOD_PARTITIONED_RICE2) { if (!drflac__read_uint8(bs, 5, &riceParam)) { return DRFLAC_FALSE; } if (riceParam == 31) { riceParam = 0xFF; } } if (riceParam != 0xFF) { if (!drflac__read_and_seek_residual__rice(bs, samplesInPartition, riceParam)) { return DRFLAC_FALSE; } } else { drflac_uint8 unencodedBitsPerSample = 0; if (!drflac__read_uint8(bs, 5, &unencodedBitsPerSample)) { return DRFLAC_FALSE; } if (!drflac__seek_bits(bs, unencodedBitsPerSample * samplesInPartition)) { return DRFLAC_FALSE; } } if (partitionsRemaining == 1) { break; } partitionsRemaining -= 1; samplesInPartition = blockSize / (1 << partitionOrder); } return DRFLAC_TRUE; } static drflac_bool32 drflac__decode_samples__constant(drflac_bs* bs, drflac_uint32 blockSize, drflac_uint32 subframeBitsPerSample, drflac_int32* pDecodedSamples) { drflac_uint32 i; /* Only a single sample needs to be decoded here. */ drflac_int32 sample; if (!drflac__read_int32(bs, subframeBitsPerSample, &sample)) { return DRFLAC_FALSE; } /* We don't really need to expand this, but it does simplify the process of reading samples. If this becomes a performance issue (unlikely) we'll want to look at a more efficient way. */ for (i = 0; i < blockSize; ++i) { pDecodedSamples[i] = sample; } return DRFLAC_TRUE; } static drflac_bool32 drflac__decode_samples__verbatim(drflac_bs* bs, drflac_uint32 blockSize, drflac_uint32 subframeBitsPerSample, drflac_int32* pDecodedSamples) { drflac_uint32 i; for (i = 0; i < blockSize; ++i) { drflac_int32 sample; if (!drflac__read_int32(bs, subframeBitsPerSample, &sample)) { return DRFLAC_FALSE; } pDecodedSamples[i] = sample; } return DRFLAC_TRUE; } static drflac_bool32 drflac__decode_samples__fixed(drflac_bs* bs, drflac_uint32 blockSize, drflac_uint32 subframeBitsPerSample, drflac_uint8 lpcOrder, drflac_int32* pDecodedSamples) { drflac_uint32 i; static drflac_int32 lpcCoefficientsTable[5][4] = { {0, 0, 0, 0}, {1, 0, 0, 0}, {2, -1, 0, 0}, {3, -3, 1, 0}, {4, -6, 4, -1} }; /* Warm up samples and coefficients. */ for (i = 0; i < lpcOrder; ++i) { drflac_int32 sample; if (!drflac__read_int32(bs, subframeBitsPerSample, &sample)) { return DRFLAC_FALSE; } pDecodedSamples[i] = sample; } if (!drflac__decode_samples_with_residual(bs, subframeBitsPerSample, blockSize, lpcOrder, 0, 4, lpcCoefficientsTable[lpcOrder], pDecodedSamples)) { return DRFLAC_FALSE; } return DRFLAC_TRUE; } static drflac_bool32 drflac__decode_samples__lpc(drflac_bs* bs, drflac_uint32 blockSize, drflac_uint32 bitsPerSample, drflac_uint8 lpcOrder, drflac_int32* pDecodedSamples) { drflac_uint8 i; drflac_uint8 lpcPrecision; drflac_int8 lpcShift; drflac_int32 coefficients[32]; /* Warm up samples. */ for (i = 0; i < lpcOrder; ++i) { drflac_int32 sample; if (!drflac__read_int32(bs, bitsPerSample, &sample)) { return DRFLAC_FALSE; } pDecodedSamples[i] = sample; } if (!drflac__read_uint8(bs, 4, &lpcPrecision)) { return DRFLAC_FALSE; } if (lpcPrecision == 15) { return DRFLAC_FALSE; /* Invalid. */ } lpcPrecision += 1; if (!drflac__read_int8(bs, 5, &lpcShift)) { return DRFLAC_FALSE; } /* From the FLAC specification: Quantized linear predictor coefficient shift needed in bits (NOTE: this number is signed two's-complement) Emphasis on the "signed two's-complement". In practice there does not seem to be any encoders nor decoders supporting negative shifts. For now dr_flac is not going to support negative shifts as I don't have any reference files. However, when a reference file comes through I will consider adding support. */ if (lpcShift < 0) { return DRFLAC_FALSE; } DRFLAC_ZERO_MEMORY(coefficients, sizeof(coefficients)); for (i = 0; i < lpcOrder; ++i) { if (!drflac__read_int32(bs, lpcPrecision, coefficients + i)) { return DRFLAC_FALSE; } } if (!drflac__decode_samples_with_residual(bs, bitsPerSample, blockSize, lpcOrder, lpcShift, lpcPrecision, coefficients, pDecodedSamples)) { return DRFLAC_FALSE; } return DRFLAC_TRUE; } static drflac_bool32 drflac__read_next_flac_frame_header(drflac_bs* bs, drflac_uint8 streaminfoBitsPerSample, drflac_frame_header* header) { const drflac_uint32 sampleRateTable[12] = {0, 88200, 176400, 192000, 8000, 16000, 22050, 24000, 32000, 44100, 48000, 96000}; const drflac_uint8 bitsPerSampleTable[8] = {0, 8, 12, (drflac_uint8)-1, 16, 20, 24, (drflac_uint8)-1}; /* -1 = reserved. */ DRFLAC_ASSERT(bs != NULL); DRFLAC_ASSERT(header != NULL); /* Keep looping until we find a valid sync code. */ for (;;) { drflac_uint8 crc8 = 0xCE; /* 0xCE = drflac_crc8(0, 0x3FFE, 14); */ drflac_uint8 reserved = 0; drflac_uint8 blockingStrategy = 0; drflac_uint8 blockSize = 0; drflac_uint8 sampleRate = 0; drflac_uint8 channelAssignment = 0; drflac_uint8 bitsPerSample = 0; drflac_bool32 isVariableBlockSize; if (!drflac__find_and_seek_to_next_sync_code(bs)) { return DRFLAC_FALSE; } if (!drflac__read_uint8(bs, 1, &reserved)) { return DRFLAC_FALSE; } if (reserved == 1) { continue; } crc8 = drflac_crc8(crc8, reserved, 1); if (!drflac__read_uint8(bs, 1, &blockingStrategy)) { return DRFLAC_FALSE; } crc8 = drflac_crc8(crc8, blockingStrategy, 1); if (!drflac__read_uint8(bs, 4, &blockSize)) { return DRFLAC_FALSE; } if (blockSize == 0) { continue; } crc8 = drflac_crc8(crc8, blockSize, 4); if (!drflac__read_uint8(bs, 4, &sampleRate)) { return DRFLAC_FALSE; } crc8 = drflac_crc8(crc8, sampleRate, 4); if (!drflac__read_uint8(bs, 4, &channelAssignment)) { return DRFLAC_FALSE; } if (channelAssignment > 10) { continue; } crc8 = drflac_crc8(crc8, channelAssignment, 4); if (!drflac__read_uint8(bs, 3, &bitsPerSample)) { return DRFLAC_FALSE; } if (bitsPerSample == 3 || bitsPerSample == 7) { continue; } crc8 = drflac_crc8(crc8, bitsPerSample, 3); if (!drflac__read_uint8(bs, 1, &reserved)) { return DRFLAC_FALSE; } if (reserved == 1) { continue; } crc8 = drflac_crc8(crc8, reserved, 1); isVariableBlockSize = blockingStrategy == 1; if (isVariableBlockSize) { drflac_uint64 pcmFrameNumber; drflac_result result = drflac__read_utf8_coded_number(bs, &pcmFrameNumber, &crc8); if (result != DRFLAC_SUCCESS) { if (result == DRFLAC_AT_END) { return DRFLAC_FALSE; } else { continue; } } header->flacFrameNumber = 0; header->pcmFrameNumber = pcmFrameNumber; } else { drflac_uint64 flacFrameNumber = 0; drflac_result result = drflac__read_utf8_coded_number(bs, &flacFrameNumber, &crc8); if (result != DRFLAC_SUCCESS) { if (result == DRFLAC_AT_END) { return DRFLAC_FALSE; } else { continue; } } header->flacFrameNumber = (drflac_uint32)flacFrameNumber; /* <-- Safe cast. */ header->pcmFrameNumber = 0; } DRFLAC_ASSERT(blockSize > 0); if (blockSize == 1) { header->blockSizeInPCMFrames = 192; } else if (blockSize <= 5) { DRFLAC_ASSERT(blockSize >= 2); header->blockSizeInPCMFrames = 576 * (1 << (blockSize - 2)); } else if (blockSize == 6) { if (!drflac__read_uint16(bs, 8, &header->blockSizeInPCMFrames)) { return DRFLAC_FALSE; } crc8 = drflac_crc8(crc8, header->blockSizeInPCMFrames, 8); header->blockSizeInPCMFrames += 1; } else if (blockSize == 7) { if (!drflac__read_uint16(bs, 16, &header->blockSizeInPCMFrames)) { return DRFLAC_FALSE; } crc8 = drflac_crc8(crc8, header->blockSizeInPCMFrames, 16); if (header->blockSizeInPCMFrames == 0xFFFF) { return DRFLAC_FALSE; /* Frame is too big. This is the size of the frame minus 1. The STREAMINFO block defines the max block size which is 16-bits. Adding one will make it 17 bits and therefore too big. */ } header->blockSizeInPCMFrames += 1; } else { DRFLAC_ASSERT(blockSize >= 8); header->blockSizeInPCMFrames = 256 * (1 << (blockSize - 8)); } if (sampleRate <= 11) { header->sampleRate = sampleRateTable[sampleRate]; } else if (sampleRate == 12) { if (!drflac__read_uint32(bs, 8, &header->sampleRate)) { return DRFLAC_FALSE; } crc8 = drflac_crc8(crc8, header->sampleRate, 8); header->sampleRate *= 1000; } else if (sampleRate == 13) { if (!drflac__read_uint32(bs, 16, &header->sampleRate)) { return DRFLAC_FALSE; } crc8 = drflac_crc8(crc8, header->sampleRate, 16); } else if (sampleRate == 14) { if (!drflac__read_uint32(bs, 16, &header->sampleRate)) { return DRFLAC_FALSE; } crc8 = drflac_crc8(crc8, header->sampleRate, 16); header->sampleRate *= 10; } else { continue; /* Invalid. Assume an invalid block. */ } header->channelAssignment = channelAssignment; header->bitsPerSample = bitsPerSampleTable[bitsPerSample]; if (header->bitsPerSample == 0) { header->bitsPerSample = streaminfoBitsPerSample; } if (header->bitsPerSample != streaminfoBitsPerSample) { /* If this subframe has a different bitsPerSample then streaminfo or the first frame, reject it */ return DRFLAC_FALSE; } if (!drflac__read_uint8(bs, 8, &header->crc8)) { return DRFLAC_FALSE; } #ifndef DR_FLAC_NO_CRC if (header->crc8 != crc8) { continue; /* CRC mismatch. Loop back to the top and find the next sync code. */ } #endif return DRFLAC_TRUE; } } static drflac_bool32 drflac__read_subframe_header(drflac_bs* bs, drflac_subframe* pSubframe) { drflac_uint8 header; int type; if (!drflac__read_uint8(bs, 8, &header)) { return DRFLAC_FALSE; } /* First bit should always be 0. */ if ((header & 0x80) != 0) { return DRFLAC_FALSE; } type = (header & 0x7E) >> 1; if (type == 0) { pSubframe->subframeType = DRFLAC_SUBFRAME_CONSTANT; } else if (type == 1) { pSubframe->subframeType = DRFLAC_SUBFRAME_VERBATIM; } else { if ((type & 0x20) != 0) { pSubframe->subframeType = DRFLAC_SUBFRAME_LPC; pSubframe->lpcOrder = (drflac_uint8)(type & 0x1F) + 1; } else if ((type & 0x08) != 0) { pSubframe->subframeType = DRFLAC_SUBFRAME_FIXED; pSubframe->lpcOrder = (drflac_uint8)(type & 0x07); if (pSubframe->lpcOrder > 4) { pSubframe->subframeType = DRFLAC_SUBFRAME_RESERVED; pSubframe->lpcOrder = 0; } } else { pSubframe->subframeType = DRFLAC_SUBFRAME_RESERVED; } } if (pSubframe->subframeType == DRFLAC_SUBFRAME_RESERVED) { return DRFLAC_FALSE; } /* Wasted bits per sample. */ pSubframe->wastedBitsPerSample = 0; if ((header & 0x01) == 1) { unsigned int wastedBitsPerSample; if (!drflac__seek_past_next_set_bit(bs, &wastedBitsPerSample)) { return DRFLAC_FALSE; } pSubframe->wastedBitsPerSample = (drflac_uint8)wastedBitsPerSample + 1; } return DRFLAC_TRUE; } static drflac_bool32 drflac__decode_subframe(drflac_bs* bs, drflac_frame* frame, int subframeIndex, drflac_int32* pDecodedSamplesOut) { drflac_subframe* pSubframe; drflac_uint32 subframeBitsPerSample; DRFLAC_ASSERT(bs != NULL); DRFLAC_ASSERT(frame != NULL); pSubframe = frame->subframes + subframeIndex; if (!drflac__read_subframe_header(bs, pSubframe)) { return DRFLAC_FALSE; } /* Side channels require an extra bit per sample. Took a while to figure that one out... */ subframeBitsPerSample = frame->header.bitsPerSample; if ((frame->header.channelAssignment == DRFLAC_CHANNEL_ASSIGNMENT_LEFT_SIDE || frame->header.channelAssignment == DRFLAC_CHANNEL_ASSIGNMENT_MID_SIDE) && subframeIndex == 1) { subframeBitsPerSample += 1; } else if (frame->header.channelAssignment == DRFLAC_CHANNEL_ASSIGNMENT_RIGHT_SIDE && subframeIndex == 0) { subframeBitsPerSample += 1; } if (subframeBitsPerSample > 32) { /* libFLAC and ffmpeg reject 33-bit subframes as well */ return DRFLAC_FALSE; } /* Need to handle wasted bits per sample. */ if (pSubframe->wastedBitsPerSample >= subframeBitsPerSample) { return DRFLAC_FALSE; } subframeBitsPerSample -= pSubframe->wastedBitsPerSample; pSubframe->pSamplesS32 = pDecodedSamplesOut; switch (pSubframe->subframeType) { case DRFLAC_SUBFRAME_CONSTANT: { drflac__decode_samples__constant(bs, frame->header.blockSizeInPCMFrames, subframeBitsPerSample, pSubframe->pSamplesS32); } break; case DRFLAC_SUBFRAME_VERBATIM: { drflac__decode_samples__verbatim(bs, frame->header.blockSizeInPCMFrames, subframeBitsPerSample, pSubframe->pSamplesS32); } break; case DRFLAC_SUBFRAME_FIXED: { drflac__decode_samples__fixed(bs, frame->header.blockSizeInPCMFrames, subframeBitsPerSample, pSubframe->lpcOrder, pSubframe->pSamplesS32); } break; case DRFLAC_SUBFRAME_LPC: { drflac__decode_samples__lpc(bs, frame->header.blockSizeInPCMFrames, subframeBitsPerSample, pSubframe->lpcOrder, pSubframe->pSamplesS32); } break; default: return DRFLAC_FALSE; } return DRFLAC_TRUE; } static drflac_bool32 drflac__seek_subframe(drflac_bs* bs, drflac_frame* frame, int subframeIndex) { drflac_subframe* pSubframe; drflac_uint32 subframeBitsPerSample; DRFLAC_ASSERT(bs != NULL); DRFLAC_ASSERT(frame != NULL); pSubframe = frame->subframes + subframeIndex; if (!drflac__read_subframe_header(bs, pSubframe)) { return DRFLAC_FALSE; } /* Side channels require an extra bit per sample. Took a while to figure that one out... */ subframeBitsPerSample = frame->header.bitsPerSample; if ((frame->header.channelAssignment == DRFLAC_CHANNEL_ASSIGNMENT_LEFT_SIDE || frame->header.channelAssignment == DRFLAC_CHANNEL_ASSIGNMENT_MID_SIDE) && subframeIndex == 1) { subframeBitsPerSample += 1; } else if (frame->header.channelAssignment == DRFLAC_CHANNEL_ASSIGNMENT_RIGHT_SIDE && subframeIndex == 0) { subframeBitsPerSample += 1; } /* Need to handle wasted bits per sample. */ if (pSubframe->wastedBitsPerSample >= subframeBitsPerSample) { return DRFLAC_FALSE; } subframeBitsPerSample -= pSubframe->wastedBitsPerSample; pSubframe->pSamplesS32 = NULL; switch (pSubframe->subframeType) { case DRFLAC_SUBFRAME_CONSTANT: { if (!drflac__seek_bits(bs, subframeBitsPerSample)) { return DRFLAC_FALSE; } } break; case DRFLAC_SUBFRAME_VERBATIM: { unsigned int bitsToSeek = frame->header.blockSizeInPCMFrames * subframeBitsPerSample; if (!drflac__seek_bits(bs, bitsToSeek)) { return DRFLAC_FALSE; } } break; case DRFLAC_SUBFRAME_FIXED: { unsigned int bitsToSeek = pSubframe->lpcOrder * subframeBitsPerSample; if (!drflac__seek_bits(bs, bitsToSeek)) { return DRFLAC_FALSE; } if (!drflac__read_and_seek_residual(bs, frame->header.blockSizeInPCMFrames, pSubframe->lpcOrder)) { return DRFLAC_FALSE; } } break; case DRFLAC_SUBFRAME_LPC: { drflac_uint8 lpcPrecision; unsigned int bitsToSeek = pSubframe->lpcOrder * subframeBitsPerSample; if (!drflac__seek_bits(bs, bitsToSeek)) { return DRFLAC_FALSE; } if (!drflac__read_uint8(bs, 4, &lpcPrecision)) { return DRFLAC_FALSE; } if (lpcPrecision == 15) { return DRFLAC_FALSE; /* Invalid. */ } lpcPrecision += 1; bitsToSeek = (pSubframe->lpcOrder * lpcPrecision) + 5; /* +5 for shift. */ if (!drflac__seek_bits(bs, bitsToSeek)) { return DRFLAC_FALSE; } if (!drflac__read_and_seek_residual(bs, frame->header.blockSizeInPCMFrames, pSubframe->lpcOrder)) { return DRFLAC_FALSE; } } break; default: return DRFLAC_FALSE; } return DRFLAC_TRUE; } static DRFLAC_INLINE drflac_uint8 drflac__get_channel_count_from_channel_assignment(drflac_int8 channelAssignment) { drflac_uint8 lookup[] = {1, 2, 3, 4, 5, 6, 7, 8, 2, 2, 2}; DRFLAC_ASSERT(channelAssignment <= 10); return lookup[channelAssignment]; } static drflac_result drflac__decode_flac_frame(drflac* pFlac) { int channelCount; int i; drflac_uint8 paddingSizeInBits; drflac_uint16 desiredCRC16; #ifndef DR_FLAC_NO_CRC drflac_uint16 actualCRC16; #endif /* This function should be called while the stream is sitting on the first byte after the frame header. */ DRFLAC_ZERO_MEMORY(pFlac->currentFLACFrame.subframes, sizeof(pFlac->currentFLACFrame.subframes)); /* The frame block size must never be larger than the maximum block size defined by the FLAC stream. */ if (pFlac->currentFLACFrame.header.blockSizeInPCMFrames > pFlac->maxBlockSizeInPCMFrames) { return DRFLAC_ERROR; } /* The number of channels in the frame must match the channel count from the STREAMINFO block. */ channelCount = drflac__get_channel_count_from_channel_assignment(pFlac->currentFLACFrame.header.channelAssignment); if (channelCount != (int)pFlac->channels) { return DRFLAC_ERROR; } for (i = 0; i < channelCount; ++i) { if (!drflac__decode_subframe(&pFlac->bs, &pFlac->currentFLACFrame, i, pFlac->pDecodedSamples + (pFlac->currentFLACFrame.header.blockSizeInPCMFrames * i))) { return DRFLAC_ERROR; } } paddingSizeInBits = (drflac_uint8)(DRFLAC_CACHE_L1_BITS_REMAINING(&pFlac->bs) & 7); if (paddingSizeInBits > 0) { drflac_uint8 padding = 0; if (!drflac__read_uint8(&pFlac->bs, paddingSizeInBits, &padding)) { return DRFLAC_AT_END; } } #ifndef DR_FLAC_NO_CRC actualCRC16 = drflac__flush_crc16(&pFlac->bs); #endif if (!drflac__read_uint16(&pFlac->bs, 16, &desiredCRC16)) { return DRFLAC_AT_END; } #ifndef DR_FLAC_NO_CRC if (actualCRC16 != desiredCRC16) { return DRFLAC_CRC_MISMATCH; /* CRC mismatch. */ } #endif pFlac->currentFLACFrame.pcmFramesRemaining = pFlac->currentFLACFrame.header.blockSizeInPCMFrames; return DRFLAC_SUCCESS; } static drflac_result drflac__seek_flac_frame(drflac* pFlac) { int channelCount; int i; drflac_uint16 desiredCRC16; #ifndef DR_FLAC_NO_CRC drflac_uint16 actualCRC16; #endif channelCount = drflac__get_channel_count_from_channel_assignment(pFlac->currentFLACFrame.header.channelAssignment); for (i = 0; i < channelCount; ++i) { if (!drflac__seek_subframe(&pFlac->bs, &pFlac->currentFLACFrame, i)) { return DRFLAC_ERROR; } } /* Padding. */ if (!drflac__seek_bits(&pFlac->bs, DRFLAC_CACHE_L1_BITS_REMAINING(&pFlac->bs) & 7)) { return DRFLAC_ERROR; } /* CRC. */ #ifndef DR_FLAC_NO_CRC actualCRC16 = drflac__flush_crc16(&pFlac->bs); #endif if (!drflac__read_uint16(&pFlac->bs, 16, &desiredCRC16)) { return DRFLAC_AT_END; } #ifndef DR_FLAC_NO_CRC if (actualCRC16 != desiredCRC16) { return DRFLAC_CRC_MISMATCH; /* CRC mismatch. */ } #endif return DRFLAC_SUCCESS; } static drflac_bool32 drflac__read_and_decode_next_flac_frame(drflac* pFlac) { DRFLAC_ASSERT(pFlac != NULL); for (;;) { drflac_result result; if (!drflac__read_next_flac_frame_header(&pFlac->bs, pFlac->bitsPerSample, &pFlac->currentFLACFrame.header)) { return DRFLAC_FALSE; } result = drflac__decode_flac_frame(pFlac); if (result != DRFLAC_SUCCESS) { if (result == DRFLAC_CRC_MISMATCH) { continue; /* CRC mismatch. Skip to the next frame. */ } else { return DRFLAC_FALSE; } } return DRFLAC_TRUE; } } static void drflac__get_pcm_frame_range_of_current_flac_frame(drflac* pFlac, drflac_uint64* pFirstPCMFrame, drflac_uint64* pLastPCMFrame) { drflac_uint64 firstPCMFrame; drflac_uint64 lastPCMFrame; DRFLAC_ASSERT(pFlac != NULL); firstPCMFrame = pFlac->currentFLACFrame.header.pcmFrameNumber; if (firstPCMFrame == 0) { firstPCMFrame = ((drflac_uint64)pFlac->currentFLACFrame.header.flacFrameNumber) * pFlac->maxBlockSizeInPCMFrames; } lastPCMFrame = firstPCMFrame + pFlac->currentFLACFrame.header.blockSizeInPCMFrames; if (lastPCMFrame > 0) { lastPCMFrame -= 1; /* Needs to be zero based. */ } if (pFirstPCMFrame) { *pFirstPCMFrame = firstPCMFrame; } if (pLastPCMFrame) { *pLastPCMFrame = lastPCMFrame; } } static drflac_bool32 drflac__seek_to_first_frame(drflac* pFlac) { drflac_bool32 result; DRFLAC_ASSERT(pFlac != NULL); result = drflac__seek_to_byte(&pFlac->bs, pFlac->firstFLACFramePosInBytes); DRFLAC_ZERO_MEMORY(&pFlac->currentFLACFrame, sizeof(pFlac->currentFLACFrame)); pFlac->currentPCMFrame = 0; return result; } static DRFLAC_INLINE drflac_result drflac__seek_to_next_flac_frame(drflac* pFlac) { /* This function should only ever be called while the decoder is sitting on the first byte past the FRAME_HEADER section. */ DRFLAC_ASSERT(pFlac != NULL); return drflac__seek_flac_frame(pFlac); } static drflac_uint64 drflac__seek_forward_by_pcm_frames(drflac* pFlac, drflac_uint64 pcmFramesToSeek) { drflac_uint64 pcmFramesRead = 0; while (pcmFramesToSeek > 0) { if (pFlac->currentFLACFrame.pcmFramesRemaining == 0) { if (!drflac__read_and_decode_next_flac_frame(pFlac)) { break; /* Couldn't read the next frame, so just break from the loop and return. */ } } else { if (pFlac->currentFLACFrame.pcmFramesRemaining > pcmFramesToSeek) { pcmFramesRead += pcmFramesToSeek; pFlac->currentFLACFrame.pcmFramesRemaining -= (drflac_uint32)pcmFramesToSeek; /* <-- Safe cast. Will always be < currentFrame.pcmFramesRemaining < 65536. */ pcmFramesToSeek = 0; } else { pcmFramesRead += pFlac->currentFLACFrame.pcmFramesRemaining; pcmFramesToSeek -= pFlac->currentFLACFrame.pcmFramesRemaining; pFlac->currentFLACFrame.pcmFramesRemaining = 0; } } } pFlac->currentPCMFrame += pcmFramesRead; return pcmFramesRead; } static drflac_bool32 drflac__seek_to_pcm_frame__brute_force(drflac* pFlac, drflac_uint64 pcmFrameIndex) { drflac_bool32 isMidFrame = DRFLAC_FALSE; drflac_uint64 runningPCMFrameCount; DRFLAC_ASSERT(pFlac != NULL); /* If we are seeking forward we start from the current position. Otherwise we need to start all the way from the start of the file. */ if (pcmFrameIndex >= pFlac->currentPCMFrame) { /* Seeking forward. Need to seek from the current position. */ runningPCMFrameCount = pFlac->currentPCMFrame; /* The frame header for the first frame may not yet have been read. We need to do that if necessary. */ if (pFlac->currentPCMFrame == 0 && pFlac->currentFLACFrame.pcmFramesRemaining == 0) { if (!drflac__read_next_flac_frame_header(&pFlac->bs, pFlac->bitsPerSample, &pFlac->currentFLACFrame.header)) { return DRFLAC_FALSE; } } else { isMidFrame = DRFLAC_TRUE; } } else { /* Seeking backwards. Need to seek from the start of the file. */ runningPCMFrameCount = 0; /* Move back to the start. */ if (!drflac__seek_to_first_frame(pFlac)) { return DRFLAC_FALSE; } /* Decode the first frame in preparation for sample-exact seeking below. */ if (!drflac__read_next_flac_frame_header(&pFlac->bs, pFlac->bitsPerSample, &pFlac->currentFLACFrame.header)) { return DRFLAC_FALSE; } } /* We need to as quickly as possible find the frame that contains the target sample. To do this, we iterate over each frame and inspect its header. If based on the header we can determine that the frame contains the sample, we do a full decode of that frame. */ for (;;) { drflac_uint64 pcmFrameCountInThisFLACFrame; drflac_uint64 firstPCMFrameInFLACFrame = 0; drflac_uint64 lastPCMFrameInFLACFrame = 0; drflac__get_pcm_frame_range_of_current_flac_frame(pFlac, &firstPCMFrameInFLACFrame, &lastPCMFrameInFLACFrame); pcmFrameCountInThisFLACFrame = (lastPCMFrameInFLACFrame - firstPCMFrameInFLACFrame) + 1; if (pcmFrameIndex < (runningPCMFrameCount + pcmFrameCountInThisFLACFrame)) { /* The sample should be in this frame. We need to fully decode it, however if it's an invalid frame (a CRC mismatch), we need to pretend it never existed and keep iterating. */ drflac_uint64 pcmFramesToDecode = pcmFrameIndex - runningPCMFrameCount; if (!isMidFrame) { drflac_result result = drflac__decode_flac_frame(pFlac); if (result == DRFLAC_SUCCESS) { /* The frame is valid. We just need to skip over some samples to ensure it's sample-exact. */ return drflac__seek_forward_by_pcm_frames(pFlac, pcmFramesToDecode) == pcmFramesToDecode; /* <-- If this fails, something bad has happened (it should never fail). */ } else { if (result == DRFLAC_CRC_MISMATCH) { goto next_iteration; /* CRC mismatch. Pretend this frame never existed. */ } else { return DRFLAC_FALSE; } } } else { /* We started seeking mid-frame which means we need to skip the frame decoding part. */ return drflac__seek_forward_by_pcm_frames(pFlac, pcmFramesToDecode) == pcmFramesToDecode; } } else { /* It's not in this frame. We need to seek past the frame, but check if there was a CRC mismatch. If so, we pretend this frame never existed and leave the running sample count untouched. */ if (!isMidFrame) { drflac_result result = drflac__seek_to_next_flac_frame(pFlac); if (result == DRFLAC_SUCCESS) { runningPCMFrameCount += pcmFrameCountInThisFLACFrame; } else { if (result == DRFLAC_CRC_MISMATCH) { goto next_iteration; /* CRC mismatch. Pretend this frame never existed. */ } else { return DRFLAC_FALSE; } } } else { /* We started seeking mid-frame which means we need to seek by reading to the end of the frame instead of with drflac__seek_to_next_flac_frame() which only works if the decoder is sitting on the byte just after the frame header. */ runningPCMFrameCount += pFlac->currentFLACFrame.pcmFramesRemaining; pFlac->currentFLACFrame.pcmFramesRemaining = 0; isMidFrame = DRFLAC_FALSE; } /* If we are seeking to the end of the file and we've just hit it, we're done. */ if (pcmFrameIndex == pFlac->totalPCMFrameCount && runningPCMFrameCount == pFlac->totalPCMFrameCount) { return DRFLAC_TRUE; } } next_iteration: /* Grab the next frame in preparation for the next iteration. */ if (!drflac__read_next_flac_frame_header(&pFlac->bs, pFlac->bitsPerSample, &pFlac->currentFLACFrame.header)) { return DRFLAC_FALSE; } } } #if !defined(DR_FLAC_NO_CRC) /* We use an average compression ratio to determine our approximate start location. FLAC files are generally about 50%-70% the size of their uncompressed counterparts so we'll use this as a basis. I'm going to split the middle and use a factor of 0.6 to determine the starting location. */ #define DRFLAC_BINARY_SEARCH_APPROX_COMPRESSION_RATIO 0.6f static drflac_bool32 drflac__seek_to_approximate_flac_frame_to_byte(drflac* pFlac, drflac_uint64 targetByte, drflac_uint64 rangeLo, drflac_uint64 rangeHi, drflac_uint64* pLastSuccessfulSeekOffset) { DRFLAC_ASSERT(pFlac != NULL); DRFLAC_ASSERT(pLastSuccessfulSeekOffset != NULL); DRFLAC_ASSERT(targetByte >= rangeLo); DRFLAC_ASSERT(targetByte <= rangeHi); *pLastSuccessfulSeekOffset = pFlac->firstFLACFramePosInBytes; for (;;) { /* After rangeLo == rangeHi == targetByte fails, we need to break out. */ drflac_uint64 lastTargetByte = targetByte; /* When seeking to a byte, failure probably means we've attempted to seek beyond the end of the stream. To counter this we just halve it each attempt. */ if (!drflac__seek_to_byte(&pFlac->bs, targetByte)) { /* If we couldn't even seek to the first byte in the stream we have a problem. Just abandon the whole thing. */ if (targetByte == 0) { drflac__seek_to_first_frame(pFlac); /* Try to recover. */ return DRFLAC_FALSE; } /* Halve the byte location and continue. */ targetByte = rangeLo + ((rangeHi - rangeLo)/2); rangeHi = targetByte; } else { /* Getting here should mean that we have seeked to an appropriate byte. */ /* Clear the details of the FLAC frame so we don't misreport data. */ DRFLAC_ZERO_MEMORY(&pFlac->currentFLACFrame, sizeof(pFlac->currentFLACFrame)); /* Now seek to the next FLAC frame. We need to decode the entire frame (not just the header) because it's possible for the header to incorrectly pass the CRC check and return bad data. We need to decode the entire frame to be more certain. Although this seems unlikely, this has happened to me in testing so it needs to stay this way for now. */ #if 1 if (!drflac__read_and_decode_next_flac_frame(pFlac)) { /* Halve the byte location and continue. */ targetByte = rangeLo + ((rangeHi - rangeLo)/2); rangeHi = targetByte; } else { break; } #else if (!drflac__read_next_flac_frame_header(&pFlac->bs, pFlac->bitsPerSample, &pFlac->currentFLACFrame.header)) { /* Halve the byte location and continue. */ targetByte = rangeLo + ((rangeHi - rangeLo)/2); rangeHi = targetByte; } else { break; } #endif } /* We already tried this byte and there are no more to try, break out. */ if(targetByte == lastTargetByte) { return DRFLAC_FALSE; } } /* The current PCM frame needs to be updated based on the frame we just seeked to. */ drflac__get_pcm_frame_range_of_current_flac_frame(pFlac, &pFlac->currentPCMFrame, NULL); DRFLAC_ASSERT(targetByte <= rangeHi); *pLastSuccessfulSeekOffset = targetByte; return DRFLAC_TRUE; } static drflac_bool32 drflac__decode_flac_frame_and_seek_forward_by_pcm_frames(drflac* pFlac, drflac_uint64 offset) { /* This section of code would be used if we were only decoding the FLAC frame header when calling drflac__seek_to_approximate_flac_frame_to_byte(). */ #if 0 if (drflac__decode_flac_frame(pFlac) != DRFLAC_SUCCESS) { /* We failed to decode this frame which may be due to it being corrupt. We'll just use the next valid FLAC frame. */ if (drflac__read_and_decode_next_flac_frame(pFlac) == DRFLAC_FALSE) { return DRFLAC_FALSE; } } #endif return drflac__seek_forward_by_pcm_frames(pFlac, offset) == offset; } static drflac_bool32 drflac__seek_to_pcm_frame__binary_search_internal(drflac* pFlac, drflac_uint64 pcmFrameIndex, drflac_uint64 byteRangeLo, drflac_uint64 byteRangeHi) { /* This assumes pFlac->currentPCMFrame is sitting on byteRangeLo upon entry. */ drflac_uint64 targetByte; drflac_uint64 pcmRangeLo = pFlac->totalPCMFrameCount; drflac_uint64 pcmRangeHi = 0; drflac_uint64 lastSuccessfulSeekOffset = (drflac_uint64)-1; drflac_uint64 closestSeekOffsetBeforeTargetPCMFrame = byteRangeLo; drflac_uint32 seekForwardThreshold = (pFlac->maxBlockSizeInPCMFrames != 0) ? pFlac->maxBlockSizeInPCMFrames*2 : 4096; targetByte = byteRangeLo + (drflac_uint64)(((drflac_int64)((pcmFrameIndex - pFlac->currentPCMFrame) * pFlac->channels * pFlac->bitsPerSample)/8.0f) * DRFLAC_BINARY_SEARCH_APPROX_COMPRESSION_RATIO); if (targetByte > byteRangeHi) { targetByte = byteRangeHi; } for (;;) { if (drflac__seek_to_approximate_flac_frame_to_byte(pFlac, targetByte, byteRangeLo, byteRangeHi, &lastSuccessfulSeekOffset)) { /* We found a FLAC frame. We need to check if it contains the sample we're looking for. */ drflac_uint64 newPCMRangeLo; drflac_uint64 newPCMRangeHi; drflac__get_pcm_frame_range_of_current_flac_frame(pFlac, &newPCMRangeLo, &newPCMRangeHi); /* If we selected the same frame, it means we should be pretty close. Just decode the rest. */ if (pcmRangeLo == newPCMRangeLo) { if (!drflac__seek_to_approximate_flac_frame_to_byte(pFlac, closestSeekOffsetBeforeTargetPCMFrame, closestSeekOffsetBeforeTargetPCMFrame, byteRangeHi, &lastSuccessfulSeekOffset)) { break; /* Failed to seek to closest frame. */ } if (drflac__decode_flac_frame_and_seek_forward_by_pcm_frames(pFlac, pcmFrameIndex - pFlac->currentPCMFrame)) { return DRFLAC_TRUE; } else { break; /* Failed to seek forward. */ } } pcmRangeLo = newPCMRangeLo; pcmRangeHi = newPCMRangeHi; if (pcmRangeLo <= pcmFrameIndex && pcmRangeHi >= pcmFrameIndex) { /* The target PCM frame is in this FLAC frame. */ if (drflac__decode_flac_frame_and_seek_forward_by_pcm_frames(pFlac, pcmFrameIndex - pFlac->currentPCMFrame) ) { return DRFLAC_TRUE; } else { break; /* Failed to seek to FLAC frame. */ } } else { const float approxCompressionRatio = (drflac_int64)(lastSuccessfulSeekOffset - pFlac->firstFLACFramePosInBytes) / ((drflac_int64)(pcmRangeLo * pFlac->channels * pFlac->bitsPerSample)/8.0f); if (pcmRangeLo > pcmFrameIndex) { /* We seeked too far forward. We need to move our target byte backward and try again. */ byteRangeHi = lastSuccessfulSeekOffset; if (byteRangeLo > byteRangeHi) { byteRangeLo = byteRangeHi; } targetByte = byteRangeLo + ((byteRangeHi - byteRangeLo) / 2); if (targetByte < byteRangeLo) { targetByte = byteRangeLo; } } else /*if (pcmRangeHi < pcmFrameIndex)*/ { /* We didn't seek far enough. We need to move our target byte forward and try again. */ /* If we're close enough we can just seek forward. */ if ((pcmFrameIndex - pcmRangeLo) < seekForwardThreshold) { if (drflac__decode_flac_frame_and_seek_forward_by_pcm_frames(pFlac, pcmFrameIndex - pFlac->currentPCMFrame)) { return DRFLAC_TRUE; } else { break; /* Failed to seek to FLAC frame. */ } } else { byteRangeLo = lastSuccessfulSeekOffset; if (byteRangeHi < byteRangeLo) { byteRangeHi = byteRangeLo; } targetByte = lastSuccessfulSeekOffset + (drflac_uint64)(((drflac_int64)((pcmFrameIndex-pcmRangeLo) * pFlac->channels * pFlac->bitsPerSample)/8.0f) * approxCompressionRatio); if (targetByte > byteRangeHi) { targetByte = byteRangeHi; } if (closestSeekOffsetBeforeTargetPCMFrame < lastSuccessfulSeekOffset) { closestSeekOffsetBeforeTargetPCMFrame = lastSuccessfulSeekOffset; } } } } } else { /* Getting here is really bad. We just recover as best we can, but moving to the first frame in the stream, and then abort. */ break; } } drflac__seek_to_first_frame(pFlac); /* <-- Try to recover. */ return DRFLAC_FALSE; } static drflac_bool32 drflac__seek_to_pcm_frame__binary_search(drflac* pFlac, drflac_uint64 pcmFrameIndex) { drflac_uint64 byteRangeLo; drflac_uint64 byteRangeHi; drflac_uint32 seekForwardThreshold = (pFlac->maxBlockSizeInPCMFrames != 0) ? pFlac->maxBlockSizeInPCMFrames*2 : 4096; /* Our algorithm currently assumes the FLAC stream is currently sitting at the start. */ if (drflac__seek_to_first_frame(pFlac) == DRFLAC_FALSE) { return DRFLAC_FALSE; } /* If we're close enough to the start, just move to the start and seek forward. */ if (pcmFrameIndex < seekForwardThreshold) { return drflac__seek_forward_by_pcm_frames(pFlac, pcmFrameIndex) == pcmFrameIndex; } /* Our starting byte range is the byte position of the first FLAC frame and the approximate end of the file as if it were completely uncompressed. This ensures the entire file is included, even though most of the time it'll exceed the end of the actual stream. This is OK as the frame searching logic will handle it. */ byteRangeLo = pFlac->firstFLACFramePosInBytes; byteRangeHi = pFlac->firstFLACFramePosInBytes + (drflac_uint64)((drflac_int64)(pFlac->totalPCMFrameCount * pFlac->channels * pFlac->bitsPerSample)/8.0f); return drflac__seek_to_pcm_frame__binary_search_internal(pFlac, pcmFrameIndex, byteRangeLo, byteRangeHi); } #endif /* !DR_FLAC_NO_CRC */ static drflac_bool32 drflac__seek_to_pcm_frame__seek_table(drflac* pFlac, drflac_uint64 pcmFrameIndex) { drflac_uint32 iClosestSeekpoint = 0; drflac_bool32 isMidFrame = DRFLAC_FALSE; drflac_uint64 runningPCMFrameCount; drflac_uint32 iSeekpoint; DRFLAC_ASSERT(pFlac != NULL); if (pFlac->pSeekpoints == NULL || pFlac->seekpointCount == 0) { return DRFLAC_FALSE; } /* Do not use the seektable if pcmFramIndex is not coverd by it. */ if (pFlac->pSeekpoints[0].firstPCMFrame > pcmFrameIndex) { return DRFLAC_FALSE; } for (iSeekpoint = 0; iSeekpoint < pFlac->seekpointCount; ++iSeekpoint) { if (pFlac->pSeekpoints[iSeekpoint].firstPCMFrame >= pcmFrameIndex) { break; } iClosestSeekpoint = iSeekpoint; } /* There's been cases where the seek table contains only zeros. We need to do some basic validation on the closest seekpoint. */ if (pFlac->pSeekpoints[iClosestSeekpoint].pcmFrameCount == 0 || pFlac->pSeekpoints[iClosestSeekpoint].pcmFrameCount > pFlac->maxBlockSizeInPCMFrames) { return DRFLAC_FALSE; } if (pFlac->pSeekpoints[iClosestSeekpoint].firstPCMFrame > pFlac->totalPCMFrameCount && pFlac->totalPCMFrameCount > 0) { return DRFLAC_FALSE; } #if !defined(DR_FLAC_NO_CRC) /* At this point we should know the closest seek point. We can use a binary search for this. We need to know the total sample count for this. */ if (pFlac->totalPCMFrameCount > 0) { drflac_uint64 byteRangeLo; drflac_uint64 byteRangeHi; byteRangeHi = pFlac->firstFLACFramePosInBytes + (drflac_uint64)((drflac_int64)(pFlac->totalPCMFrameCount * pFlac->channels * pFlac->bitsPerSample)/8.0f); byteRangeLo = pFlac->firstFLACFramePosInBytes + pFlac->pSeekpoints[iClosestSeekpoint].flacFrameOffset; /* If our closest seek point is not the last one, we only need to search between it and the next one. The section below calculates an appropriate starting value for byteRangeHi which will clamp it appropriately. Note that the next seekpoint must have an offset greater than the closest seekpoint because otherwise our binary search algorithm will break down. There have been cases where a seektable consists of seek points where every byte offset is set to 0 which causes problems. If this happens we need to abort. */ if (iClosestSeekpoint < pFlac->seekpointCount-1) { drflac_uint32 iNextSeekpoint = iClosestSeekpoint + 1; /* Basic validation on the seekpoints to ensure they're usable. */ if (pFlac->pSeekpoints[iClosestSeekpoint].flacFrameOffset >= pFlac->pSeekpoints[iNextSeekpoint].flacFrameOffset || pFlac->pSeekpoints[iNextSeekpoint].pcmFrameCount == 0) { return DRFLAC_FALSE; /* The next seekpoint doesn't look right. The seek table cannot be trusted from here. Abort. */ } if (pFlac->pSeekpoints[iNextSeekpoint].firstPCMFrame != (((drflac_uint64)0xFFFFFFFF << 32) | 0xFFFFFFFF)) { /* Make sure it's not a placeholder seekpoint. */ byteRangeHi = pFlac->firstFLACFramePosInBytes + pFlac->pSeekpoints[iNextSeekpoint].flacFrameOffset - 1; /* byteRangeHi must be zero based. */ } } if (drflac__seek_to_byte(&pFlac->bs, pFlac->firstFLACFramePosInBytes + pFlac->pSeekpoints[iClosestSeekpoint].flacFrameOffset)) { if (drflac__read_next_flac_frame_header(&pFlac->bs, pFlac->bitsPerSample, &pFlac->currentFLACFrame.header)) { drflac__get_pcm_frame_range_of_current_flac_frame(pFlac, &pFlac->currentPCMFrame, NULL); if (drflac__seek_to_pcm_frame__binary_search_internal(pFlac, pcmFrameIndex, byteRangeLo, byteRangeHi)) { return DRFLAC_TRUE; } } } } #endif /* !DR_FLAC_NO_CRC */ /* Getting here means we need to use a slower algorithm because the binary search method failed or cannot be used. */ /* If we are seeking forward and the closest seekpoint is _before_ the current sample, we just seek forward from where we are. Otherwise we start seeking from the seekpoint's first sample. */ if (pcmFrameIndex >= pFlac->currentPCMFrame && pFlac->pSeekpoints[iClosestSeekpoint].firstPCMFrame <= pFlac->currentPCMFrame) { /* Optimized case. Just seek forward from where we are. */ runningPCMFrameCount = pFlac->currentPCMFrame; /* The frame header for the first frame may not yet have been read. We need to do that if necessary. */ if (pFlac->currentPCMFrame == 0 && pFlac->currentFLACFrame.pcmFramesRemaining == 0) { if (!drflac__read_next_flac_frame_header(&pFlac->bs, pFlac->bitsPerSample, &pFlac->currentFLACFrame.header)) { return DRFLAC_FALSE; } } else { isMidFrame = DRFLAC_TRUE; } } else { /* Slower case. Seek to the start of the seekpoint and then seek forward from there. */ runningPCMFrameCount = pFlac->pSeekpoints[iClosestSeekpoint].firstPCMFrame; if (!drflac__seek_to_byte(&pFlac->bs, pFlac->firstFLACFramePosInBytes + pFlac->pSeekpoints[iClosestSeekpoint].flacFrameOffset)) { return DRFLAC_FALSE; } /* Grab the frame the seekpoint is sitting on in preparation for the sample-exact seeking below. */ if (!drflac__read_next_flac_frame_header(&pFlac->bs, pFlac->bitsPerSample, &pFlac->currentFLACFrame.header)) { return DRFLAC_FALSE; } } for (;;) { drflac_uint64 pcmFrameCountInThisFLACFrame; drflac_uint64 firstPCMFrameInFLACFrame = 0; drflac_uint64 lastPCMFrameInFLACFrame = 0; drflac__get_pcm_frame_range_of_current_flac_frame(pFlac, &firstPCMFrameInFLACFrame, &lastPCMFrameInFLACFrame); pcmFrameCountInThisFLACFrame = (lastPCMFrameInFLACFrame - firstPCMFrameInFLACFrame) + 1; if (pcmFrameIndex < (runningPCMFrameCount + pcmFrameCountInThisFLACFrame)) { /* The sample should be in this frame. We need to fully decode it, but if it's an invalid frame (a CRC mismatch) we need to pretend it never existed and keep iterating. */ drflac_uint64 pcmFramesToDecode = pcmFrameIndex - runningPCMFrameCount; if (!isMidFrame) { drflac_result result = drflac__decode_flac_frame(pFlac); if (result == DRFLAC_SUCCESS) { /* The frame is valid. We just need to skip over some samples to ensure it's sample-exact. */ return drflac__seek_forward_by_pcm_frames(pFlac, pcmFramesToDecode) == pcmFramesToDecode; /* <-- If this fails, something bad has happened (it should never fail). */ } else { if (result == DRFLAC_CRC_MISMATCH) { goto next_iteration; /* CRC mismatch. Pretend this frame never existed. */ } else { return DRFLAC_FALSE; } } } else { /* We started seeking mid-frame which means we need to skip the frame decoding part. */ return drflac__seek_forward_by_pcm_frames(pFlac, pcmFramesToDecode) == pcmFramesToDecode; } } else { /* It's not in this frame. We need to seek past the frame, but check if there was a CRC mismatch. If so, we pretend this frame never existed and leave the running sample count untouched. */ if (!isMidFrame) { drflac_result result = drflac__seek_to_next_flac_frame(pFlac); if (result == DRFLAC_SUCCESS) { runningPCMFrameCount += pcmFrameCountInThisFLACFrame; } else { if (result == DRFLAC_CRC_MISMATCH) { goto next_iteration; /* CRC mismatch. Pretend this frame never existed. */ } else { return DRFLAC_FALSE; } } } else { /* We started seeking mid-frame which means we need to seek by reading to the end of the frame instead of with drflac__seek_to_next_flac_frame() which only works if the decoder is sitting on the byte just after the frame header. */ runningPCMFrameCount += pFlac->currentFLACFrame.pcmFramesRemaining; pFlac->currentFLACFrame.pcmFramesRemaining = 0; isMidFrame = DRFLAC_FALSE; } /* If we are seeking to the end of the file and we've just hit it, we're done. */ if (pcmFrameIndex == pFlac->totalPCMFrameCount && runningPCMFrameCount == pFlac->totalPCMFrameCount) { return DRFLAC_TRUE; } } next_iteration: /* Grab the next frame in preparation for the next iteration. */ if (!drflac__read_next_flac_frame_header(&pFlac->bs, pFlac->bitsPerSample, &pFlac->currentFLACFrame.header)) { return DRFLAC_FALSE; } } } #ifndef DR_FLAC_NO_OGG typedef struct { drflac_uint8 capturePattern[4]; /* Should be "OggS" */ drflac_uint8 structureVersion; /* Always 0. */ drflac_uint8 headerType; drflac_uint64 granulePosition; drflac_uint32 serialNumber; drflac_uint32 sequenceNumber; drflac_uint32 checksum; drflac_uint8 segmentCount; drflac_uint8 segmentTable[255]; } drflac_ogg_page_header; #endif typedef struct { drflac_read_proc onRead; drflac_seek_proc onSeek; drflac_meta_proc onMeta; drflac_container container; void* pUserData; void* pUserDataMD; drflac_uint32 sampleRate; drflac_uint8 channels; drflac_uint8 bitsPerSample; drflac_uint64 totalPCMFrameCount; drflac_uint16 maxBlockSizeInPCMFrames; drflac_uint64 runningFilePos; drflac_bool32 hasStreamInfoBlock; drflac_bool32 hasMetadataBlocks; drflac_bs bs; /* <-- A bit streamer is required for loading data during initialization. */ drflac_frame_header firstFrameHeader; /* <-- The header of the first frame that was read during relaxed initalization. Only set if there is no STREAMINFO block. */ #ifndef DR_FLAC_NO_OGG drflac_uint32 oggSerial; drflac_uint64 oggFirstBytePos; drflac_ogg_page_header oggBosHeader; #endif } drflac_init_info; static DRFLAC_INLINE void drflac__decode_block_header(drflac_uint32 blockHeader, drflac_uint8* isLastBlock, drflac_uint8* blockType, drflac_uint32* blockSize) { blockHeader = drflac__be2host_32(blockHeader); *isLastBlock = (drflac_uint8)((blockHeader & 0x80000000UL) >> 31); *blockType = (drflac_uint8)((blockHeader & 0x7F000000UL) >> 24); *blockSize = (blockHeader & 0x00FFFFFFUL); } static DRFLAC_INLINE drflac_bool32 drflac__read_and_decode_block_header(drflac_read_proc onRead, void* pUserData, drflac_uint8* isLastBlock, drflac_uint8* blockType, drflac_uint32* blockSize) { drflac_uint32 blockHeader; *blockSize = 0; if (onRead(pUserData, &blockHeader, 4) != 4) { return DRFLAC_FALSE; } drflac__decode_block_header(blockHeader, isLastBlock, blockType, blockSize); return DRFLAC_TRUE; } static drflac_bool32 drflac__read_streaminfo(drflac_read_proc onRead, void* pUserData, drflac_streaminfo* pStreamInfo) { drflac_uint32 blockSizes; drflac_uint64 frameSizes = 0; drflac_uint64 importantProps; drflac_uint8 md5[16]; /* min/max block size. */ if (onRead(pUserData, &blockSizes, 4) != 4) { return DRFLAC_FALSE; } /* min/max frame size. */ if (onRead(pUserData, &frameSizes, 6) != 6) { return DRFLAC_FALSE; } /* Sample rate, channels, bits per sample and total sample count. */ if (onRead(pUserData, &importantProps, 8) != 8) { return DRFLAC_FALSE; } /* MD5 */ if (onRead(pUserData, md5, sizeof(md5)) != sizeof(md5)) { return DRFLAC_FALSE; } blockSizes = drflac__be2host_32(blockSizes); frameSizes = drflac__be2host_64(frameSizes); importantProps = drflac__be2host_64(importantProps); pStreamInfo->minBlockSizeInPCMFrames = (drflac_uint16)((blockSizes & 0xFFFF0000) >> 16); pStreamInfo->maxBlockSizeInPCMFrames = (drflac_uint16) (blockSizes & 0x0000FFFF); pStreamInfo->minFrameSizeInPCMFrames = (drflac_uint32)((frameSizes & (((drflac_uint64)0x00FFFFFF << 16) << 24)) >> 40); pStreamInfo->maxFrameSizeInPCMFrames = (drflac_uint32)((frameSizes & (((drflac_uint64)0x00FFFFFF << 16) << 0)) >> 16); pStreamInfo->sampleRate = (drflac_uint32)((importantProps & (((drflac_uint64)0x000FFFFF << 16) << 28)) >> 44); pStreamInfo->channels = (drflac_uint8 )((importantProps & (((drflac_uint64)0x0000000E << 16) << 24)) >> 41) + 1; pStreamInfo->bitsPerSample = (drflac_uint8 )((importantProps & (((drflac_uint64)0x0000001F << 16) << 20)) >> 36) + 1; pStreamInfo->totalPCMFrameCount = ((importantProps & ((((drflac_uint64)0x0000000F << 16) << 16) | 0xFFFFFFFF))); DRFLAC_COPY_MEMORY(pStreamInfo->md5, md5, sizeof(md5)); return DRFLAC_TRUE; } static void* drflac__malloc_default(size_t sz, void* pUserData) { (void)pUserData; return DRFLAC_MALLOC(sz); } static void* drflac__realloc_default(void* p, size_t sz, void* pUserData) { (void)pUserData; return DRFLAC_REALLOC(p, sz); } static void drflac__free_default(void* p, void* pUserData) { (void)pUserData; DRFLAC_FREE(p); } static void* drflac__malloc_from_callbacks(size_t sz, const drflac_allocation_callbacks* pAllocationCallbacks) { if (pAllocationCallbacks == NULL) { return NULL; } if (pAllocationCallbacks->onMalloc != NULL) { return pAllocationCallbacks->onMalloc(sz, pAllocationCallbacks->pUserData); } /* Try using realloc(). */ if (pAllocationCallbacks->onRealloc != NULL) { return pAllocationCallbacks->onRealloc(NULL, sz, pAllocationCallbacks->pUserData); } return NULL; } static void* drflac__realloc_from_callbacks(void* p, size_t szNew, size_t szOld, const drflac_allocation_callbacks* pAllocationCallbacks) { if (pAllocationCallbacks == NULL) { return NULL; } if (pAllocationCallbacks->onRealloc != NULL) { return pAllocationCallbacks->onRealloc(p, szNew, pAllocationCallbacks->pUserData); } /* Try emulating realloc() in terms of malloc()/free(). */ if (pAllocationCallbacks->onMalloc != NULL && pAllocationCallbacks->onFree != NULL) { void* p2; p2 = pAllocationCallbacks->onMalloc(szNew, pAllocationCallbacks->pUserData); if (p2 == NULL) { return NULL; } if (p != NULL) { DRFLAC_COPY_MEMORY(p2, p, szOld); pAllocationCallbacks->onFree(p, pAllocationCallbacks->pUserData); } return p2; } return NULL; } static void drflac__free_from_callbacks(void* p, const drflac_allocation_callbacks* pAllocationCallbacks) { if (p == NULL || pAllocationCallbacks == NULL) { return; } if (pAllocationCallbacks->onFree != NULL) { pAllocationCallbacks->onFree(p, pAllocationCallbacks->pUserData); } } static drflac_bool32 drflac__read_and_decode_metadata(drflac_read_proc onRead, drflac_seek_proc onSeek, drflac_meta_proc onMeta, void* pUserData, void* pUserDataMD, drflac_uint64* pFirstFramePos, drflac_uint64* pSeektablePos, drflac_uint32* pSeektableSize, drflac_allocation_callbacks* pAllocationCallbacks) { /* We want to keep track of the byte position in the stream of the seektable. At the time of calling this function we know that we'll be sitting on byte 42. */ drflac_uint64 runningFilePos = 42; drflac_uint64 seektablePos = 0; drflac_uint32 seektableSize = 0; for (;;) { drflac_metadata metadata; drflac_uint8 isLastBlock = 0; drflac_uint8 blockType; drflac_uint32 blockSize; if (drflac__read_and_decode_block_header(onRead, pUserData, &isLastBlock, &blockType, &blockSize) == DRFLAC_FALSE) { return DRFLAC_FALSE; } runningFilePos += 4; metadata.type = blockType; metadata.pRawData = NULL; metadata.rawDataSize = 0; switch (blockType) { case DRFLAC_METADATA_BLOCK_TYPE_APPLICATION: { if (blockSize < 4) { return DRFLAC_FALSE; } if (onMeta) { void* pRawData = drflac__malloc_from_callbacks(blockSize, pAllocationCallbacks); if (pRawData == NULL) { return DRFLAC_FALSE; } if (onRead(pUserData, pRawData, blockSize) != blockSize) { drflac__free_from_callbacks(pRawData, pAllocationCallbacks); return DRFLAC_FALSE; } metadata.pRawData = pRawData; metadata.rawDataSize = blockSize; metadata.data.application.id = drflac__be2host_32(*(drflac_uint32*)pRawData); metadata.data.application.pData = (const void*)((drflac_uint8*)pRawData + sizeof(drflac_uint32)); metadata.data.application.dataSize = blockSize - sizeof(drflac_uint32); onMeta(pUserDataMD, &metadata); drflac__free_from_callbacks(pRawData, pAllocationCallbacks); } } break; case DRFLAC_METADATA_BLOCK_TYPE_SEEKTABLE: { seektablePos = runningFilePos; seektableSize = blockSize; if (onMeta) { drflac_uint32 iSeekpoint; void* pRawData; pRawData = drflac__malloc_from_callbacks(blockSize, pAllocationCallbacks); if (pRawData == NULL) { return DRFLAC_FALSE; } if (onRead(pUserData, pRawData, blockSize) != blockSize) { drflac__free_from_callbacks(pRawData, pAllocationCallbacks); return DRFLAC_FALSE; } metadata.pRawData = pRawData; metadata.rawDataSize = blockSize; metadata.data.seektable.seekpointCount = blockSize/sizeof(drflac_seekpoint); metadata.data.seektable.pSeekpoints = (const drflac_seekpoint*)pRawData; /* Endian swap. */ for (iSeekpoint = 0; iSeekpoint < metadata.data.seektable.seekpointCount; ++iSeekpoint) { drflac_seekpoint* pSeekpoint = (drflac_seekpoint*)pRawData + iSeekpoint; pSeekpoint->firstPCMFrame = drflac__be2host_64(pSeekpoint->firstPCMFrame); pSeekpoint->flacFrameOffset = drflac__be2host_64(pSeekpoint->flacFrameOffset); pSeekpoint->pcmFrameCount = drflac__be2host_16(pSeekpoint->pcmFrameCount); } onMeta(pUserDataMD, &metadata); drflac__free_from_callbacks(pRawData, pAllocationCallbacks); } } break; case DRFLAC_METADATA_BLOCK_TYPE_VORBIS_COMMENT: { if (blockSize < 8) { return DRFLAC_FALSE; } if (onMeta) { void* pRawData; const char* pRunningData; const char* pRunningDataEnd; drflac_uint32 i; pRawData = drflac__malloc_from_callbacks(blockSize, pAllocationCallbacks); if (pRawData == NULL) { return DRFLAC_FALSE; } if (onRead(pUserData, pRawData, blockSize) != blockSize) { drflac__free_from_callbacks(pRawData, pAllocationCallbacks); return DRFLAC_FALSE; } metadata.pRawData = pRawData; metadata.rawDataSize = blockSize; pRunningData = (const char*)pRawData; pRunningDataEnd = (const char*)pRawData + blockSize; metadata.data.vorbis_comment.vendorLength = drflac__le2host_32_ptr_unaligned(pRunningData); pRunningData += 4; /* Need space for the rest of the block */ if ((pRunningDataEnd - pRunningData) - 4 < (drflac_int64)metadata.data.vorbis_comment.vendorLength) { /* <-- Note the order of operations to avoid overflow to a valid value */ drflac__free_from_callbacks(pRawData, pAllocationCallbacks); return DRFLAC_FALSE; } metadata.data.vorbis_comment.vendor = pRunningData; pRunningData += metadata.data.vorbis_comment.vendorLength; metadata.data.vorbis_comment.commentCount = drflac__le2host_32_ptr_unaligned(pRunningData); pRunningData += 4; /* Need space for 'commentCount' comments after the block, which at minimum is a drflac_uint32 per comment */ if ((pRunningDataEnd - pRunningData) / sizeof(drflac_uint32) < metadata.data.vorbis_comment.commentCount) { /* <-- Note the order of operations to avoid overflow to a valid value */ drflac__free_from_callbacks(pRawData, pAllocationCallbacks); return DRFLAC_FALSE; } metadata.data.vorbis_comment.pComments = pRunningData; /* Check that the comments section is valid before passing it to the callback */ for (i = 0; i < metadata.data.vorbis_comment.commentCount; ++i) { drflac_uint32 commentLength; if (pRunningDataEnd - pRunningData < 4) { drflac__free_from_callbacks(pRawData, pAllocationCallbacks); return DRFLAC_FALSE; } commentLength = drflac__le2host_32_ptr_unaligned(pRunningData); pRunningData += 4; if (pRunningDataEnd - pRunningData < (drflac_int64)commentLength) { /* <-- Note the order of operations to avoid overflow to a valid value */ drflac__free_from_callbacks(pRawData, pAllocationCallbacks); return DRFLAC_FALSE; } pRunningData += commentLength; } onMeta(pUserDataMD, &metadata); drflac__free_from_callbacks(pRawData, pAllocationCallbacks); } } break; case DRFLAC_METADATA_BLOCK_TYPE_CUESHEET: { if (blockSize < 396) { return DRFLAC_FALSE; } if (onMeta) { void* pRawData; const char* pRunningData; const char* pRunningDataEnd; drflac_uint8 iTrack; drflac_uint8 iIndex; pRawData = drflac__malloc_from_callbacks(blockSize, pAllocationCallbacks); if (pRawData == NULL) { return DRFLAC_FALSE; } if (onRead(pUserData, pRawData, blockSize) != blockSize) { drflac__free_from_callbacks(pRawData, pAllocationCallbacks); return DRFLAC_FALSE; } metadata.pRawData = pRawData; metadata.rawDataSize = blockSize; pRunningData = (const char*)pRawData; pRunningDataEnd = (const char*)pRawData + blockSize; DRFLAC_COPY_MEMORY(metadata.data.cuesheet.catalog, pRunningData, 128); pRunningData += 128; metadata.data.cuesheet.leadInSampleCount = drflac__be2host_64(*(const drflac_uint64*)pRunningData); pRunningData += 8; metadata.data.cuesheet.isCD = (pRunningData[0] & 0x80) != 0; pRunningData += 259; metadata.data.cuesheet.trackCount = pRunningData[0]; pRunningData += 1; metadata.data.cuesheet.pTrackData = pRunningData; /* Check that the cuesheet tracks are valid before passing it to the callback */ for (iTrack = 0; iTrack < metadata.data.cuesheet.trackCount; ++iTrack) { drflac_uint8 indexCount; drflac_uint32 indexPointSize; if (pRunningDataEnd - pRunningData < 36) { drflac__free_from_callbacks(pRawData, pAllocationCallbacks); return DRFLAC_FALSE; } /* Skip to the index point count */ pRunningData += 35; indexCount = pRunningData[0]; pRunningData += 1; indexPointSize = indexCount * sizeof(drflac_cuesheet_track_index); if (pRunningDataEnd - pRunningData < (drflac_int64)indexPointSize) { drflac__free_from_callbacks(pRawData, pAllocationCallbacks); return DRFLAC_FALSE; } /* Endian swap. */ for (iIndex = 0; iIndex < indexCount; ++iIndex) { drflac_cuesheet_track_index* pTrack = (drflac_cuesheet_track_index*)pRunningData; pRunningData += sizeof(drflac_cuesheet_track_index); pTrack->offset = drflac__be2host_64(pTrack->offset); } } onMeta(pUserDataMD, &metadata); drflac__free_from_callbacks(pRawData, pAllocationCallbacks); } } break; case DRFLAC_METADATA_BLOCK_TYPE_PICTURE: { if (blockSize < 32) { return DRFLAC_FALSE; } if (onMeta) { void* pRawData; const char* pRunningData; const char* pRunningDataEnd; pRawData = drflac__malloc_from_callbacks(blockSize, pAllocationCallbacks); if (pRawData == NULL) { return DRFLAC_FALSE; } if (onRead(pUserData, pRawData, blockSize) != blockSize) { drflac__free_from_callbacks(pRawData, pAllocationCallbacks); return DRFLAC_FALSE; } metadata.pRawData = pRawData; metadata.rawDataSize = blockSize; pRunningData = (const char*)pRawData; pRunningDataEnd = (const char*)pRawData + blockSize; metadata.data.picture.type = drflac__be2host_32_ptr_unaligned(pRunningData); pRunningData += 4; metadata.data.picture.mimeLength = drflac__be2host_32_ptr_unaligned(pRunningData); pRunningData += 4; /* Need space for the rest of the block */ if ((pRunningDataEnd - pRunningData) - 24 < (drflac_int64)metadata.data.picture.mimeLength) { /* <-- Note the order of operations to avoid overflow to a valid value */ drflac__free_from_callbacks(pRawData, pAllocationCallbacks); return DRFLAC_FALSE; } metadata.data.picture.mime = pRunningData; pRunningData += metadata.data.picture.mimeLength; metadata.data.picture.descriptionLength = drflac__be2host_32_ptr_unaligned(pRunningData); pRunningData += 4; /* Need space for the rest of the block */ if ((pRunningDataEnd - pRunningData) - 20 < (drflac_int64)metadata.data.picture.descriptionLength) { /* <-- Note the order of operations to avoid overflow to a valid value */ drflac__free_from_callbacks(pRawData, pAllocationCallbacks); return DRFLAC_FALSE; } metadata.data.picture.description = pRunningData; pRunningData += metadata.data.picture.descriptionLength; metadata.data.picture.width = drflac__be2host_32_ptr_unaligned(pRunningData); pRunningData += 4; metadata.data.picture.height = drflac__be2host_32_ptr_unaligned(pRunningData); pRunningData += 4; metadata.data.picture.colorDepth = drflac__be2host_32_ptr_unaligned(pRunningData); pRunningData += 4; metadata.data.picture.indexColorCount = drflac__be2host_32_ptr_unaligned(pRunningData); pRunningData += 4; metadata.data.picture.pictureDataSize = drflac__be2host_32_ptr_unaligned(pRunningData); pRunningData += 4; metadata.data.picture.pPictureData = (const drflac_uint8*)pRunningData; /* Need space for the picture after the block */ if (pRunningDataEnd - pRunningData < (drflac_int64)metadata.data.picture.pictureDataSize) { /* <-- Note the order of operations to avoid overflow to a valid value */ drflac__free_from_callbacks(pRawData, pAllocationCallbacks); return DRFLAC_FALSE; } onMeta(pUserDataMD, &metadata); drflac__free_from_callbacks(pRawData, pAllocationCallbacks); } } break; case DRFLAC_METADATA_BLOCK_TYPE_PADDING: { if (onMeta) { metadata.data.padding.unused = 0; /* Padding doesn't have anything meaningful in it, so just skip over it, but make sure the caller is aware of it by firing the callback. */ if (!onSeek(pUserData, blockSize, drflac_seek_origin_current)) { isLastBlock = DRFLAC_TRUE; /* An error occurred while seeking. Attempt to recover by treating this as the last block which will in turn terminate the loop. */ } else { onMeta(pUserDataMD, &metadata); } } } break; case DRFLAC_METADATA_BLOCK_TYPE_INVALID: { /* Invalid chunk. Just skip over this one. */ if (onMeta) { if (!onSeek(pUserData, blockSize, drflac_seek_origin_current)) { isLastBlock = DRFLAC_TRUE; /* An error occurred while seeking. Attempt to recover by treating this as the last block which will in turn terminate the loop. */ } } } break; default: { /* It's an unknown chunk, but not necessarily invalid. There's a chance more metadata blocks might be defined later on, so we can at the very least report the chunk to the application and let it look at the raw data. */ if (onMeta) { void* pRawData = drflac__malloc_from_callbacks(blockSize, pAllocationCallbacks); if (pRawData == NULL) { return DRFLAC_FALSE; } if (onRead(pUserData, pRawData, blockSize) != blockSize) { drflac__free_from_callbacks(pRawData, pAllocationCallbacks); return DRFLAC_FALSE; } metadata.pRawData = pRawData; metadata.rawDataSize = blockSize; onMeta(pUserDataMD, &metadata); drflac__free_from_callbacks(pRawData, pAllocationCallbacks); } } break; } /* If we're not handling metadata, just skip over the block. If we are, it will have been handled earlier in the switch statement above. */ if (onMeta == NULL && blockSize > 0) { if (!onSeek(pUserData, blockSize, drflac_seek_origin_current)) { isLastBlock = DRFLAC_TRUE; } } runningFilePos += blockSize; if (isLastBlock) { break; } } *pSeektablePos = seektablePos; *pSeektableSize = seektableSize; *pFirstFramePos = runningFilePos; return DRFLAC_TRUE; } static drflac_bool32 drflac__init_private__native(drflac_init_info* pInit, drflac_read_proc onRead, drflac_seek_proc onSeek, drflac_meta_proc onMeta, void* pUserData, void* pUserDataMD, drflac_bool32 relaxed) { /* Pre Condition: The bit stream should be sitting just past the 4-byte id header. */ drflac_uint8 isLastBlock; drflac_uint8 blockType; drflac_uint32 blockSize; (void)onSeek; pInit->container = drflac_container_native; /* The first metadata block should be the STREAMINFO block. */ if (!drflac__read_and_decode_block_header(onRead, pUserData, &isLastBlock, &blockType, &blockSize)) { return DRFLAC_FALSE; } if (blockType != DRFLAC_METADATA_BLOCK_TYPE_STREAMINFO || blockSize != 34) { if (!relaxed) { /* We're opening in strict mode and the first block is not the STREAMINFO block. Error. */ return DRFLAC_FALSE; } else { /* Relaxed mode. To open from here we need to just find the first frame and set the sample rate, etc. to whatever is defined for that frame. */ pInit->hasStreamInfoBlock = DRFLAC_FALSE; pInit->hasMetadataBlocks = DRFLAC_FALSE; if (!drflac__read_next_flac_frame_header(&pInit->bs, 0, &pInit->firstFrameHeader)) { return DRFLAC_FALSE; /* Couldn't find a frame. */ } if (pInit->firstFrameHeader.bitsPerSample == 0) { return DRFLAC_FALSE; /* Failed to initialize because the first frame depends on the STREAMINFO block, which does not exist. */ } pInit->sampleRate = pInit->firstFrameHeader.sampleRate; pInit->channels = drflac__get_channel_count_from_channel_assignment(pInit->firstFrameHeader.channelAssignment); pInit->bitsPerSample = pInit->firstFrameHeader.bitsPerSample; pInit->maxBlockSizeInPCMFrames = 65535; /* <-- See notes here: https://xiph.org/flac/format.html#metadata_block_streaminfo */ return DRFLAC_TRUE; } } else { drflac_streaminfo streaminfo; if (!drflac__read_streaminfo(onRead, pUserData, &streaminfo)) { return DRFLAC_FALSE; } pInit->hasStreamInfoBlock = DRFLAC_TRUE; pInit->sampleRate = streaminfo.sampleRate; pInit->channels = streaminfo.channels; pInit->bitsPerSample = streaminfo.bitsPerSample; pInit->totalPCMFrameCount = streaminfo.totalPCMFrameCount; pInit->maxBlockSizeInPCMFrames = streaminfo.maxBlockSizeInPCMFrames; /* Don't care about the min block size - only the max (used for determining the size of the memory allocation). */ pInit->hasMetadataBlocks = !isLastBlock; if (onMeta) { drflac_metadata metadata; metadata.type = DRFLAC_METADATA_BLOCK_TYPE_STREAMINFO; metadata.pRawData = NULL; metadata.rawDataSize = 0; metadata.data.streaminfo = streaminfo; onMeta(pUserDataMD, &metadata); } return DRFLAC_TRUE; } } #ifndef DR_FLAC_NO_OGG #define DRFLAC_OGG_MAX_PAGE_SIZE 65307 #define DRFLAC_OGG_CAPTURE_PATTERN_CRC32 1605413199 /* CRC-32 of "OggS". */ typedef enum { drflac_ogg_recover_on_crc_mismatch, drflac_ogg_fail_on_crc_mismatch } drflac_ogg_crc_mismatch_recovery; #ifndef DR_FLAC_NO_CRC static drflac_uint32 drflac__crc32_table[] = { 0x00000000L, 0x04C11DB7L, 0x09823B6EL, 0x0D4326D9L, 0x130476DCL, 0x17C56B6BL, 0x1A864DB2L, 0x1E475005L, 0x2608EDB8L, 0x22C9F00FL, 0x2F8AD6D6L, 0x2B4BCB61L, 0x350C9B64L, 0x31CD86D3L, 0x3C8EA00AL, 0x384FBDBDL, 0x4C11DB70L, 0x48D0C6C7L, 0x4593E01EL, 0x4152FDA9L, 0x5F15ADACL, 0x5BD4B01BL, 0x569796C2L, 0x52568B75L, 0x6A1936C8L, 0x6ED82B7FL, 0x639B0DA6L, 0x675A1011L, 0x791D4014L, 0x7DDC5DA3L, 0x709F7B7AL, 0x745E66CDL, 0x9823B6E0L, 0x9CE2AB57L, 0x91A18D8EL, 0x95609039L, 0x8B27C03CL, 0x8FE6DD8BL, 0x82A5FB52L, 0x8664E6E5L, 0xBE2B5B58L, 0xBAEA46EFL, 0xB7A96036L, 0xB3687D81L, 0xAD2F2D84L, 0xA9EE3033L, 0xA4AD16EAL, 0xA06C0B5DL, 0xD4326D90L, 0xD0F37027L, 0xDDB056FEL, 0xD9714B49L, 0xC7361B4CL, 0xC3F706FBL, 0xCEB42022L, 0xCA753D95L, 0xF23A8028L, 0xF6FB9D9FL, 0xFBB8BB46L, 0xFF79A6F1L, 0xE13EF6F4L, 0xE5FFEB43L, 0xE8BCCD9AL, 0xEC7DD02DL, 0x34867077L, 0x30476DC0L, 0x3D044B19L, 0x39C556AEL, 0x278206ABL, 0x23431B1CL, 0x2E003DC5L, 0x2AC12072L, 0x128E9DCFL, 0x164F8078L, 0x1B0CA6A1L, 0x1FCDBB16L, 0x018AEB13L, 0x054BF6A4L, 0x0808D07DL, 0x0CC9CDCAL, 0x7897AB07L, 0x7C56B6B0L, 0x71159069L, 0x75D48DDEL, 0x6B93DDDBL, 0x6F52C06CL, 0x6211E6B5L, 0x66D0FB02L, 0x5E9F46BFL, 0x5A5E5B08L, 0x571D7DD1L, 0x53DC6066L, 0x4D9B3063L, 0x495A2DD4L, 0x44190B0DL, 0x40D816BAL, 0xACA5C697L, 0xA864DB20L, 0xA527FDF9L, 0xA1E6E04EL, 0xBFA1B04BL, 0xBB60ADFCL, 0xB6238B25L, 0xB2E29692L, 0x8AAD2B2FL, 0x8E6C3698L, 0x832F1041L, 0x87EE0DF6L, 0x99A95DF3L, 0x9D684044L, 0x902B669DL, 0x94EA7B2AL, 0xE0B41DE7L, 0xE4750050L, 0xE9362689L, 0xEDF73B3EL, 0xF3B06B3BL, 0xF771768CL, 0xFA325055L, 0xFEF34DE2L, 0xC6BCF05FL, 0xC27DEDE8L, 0xCF3ECB31L, 0xCBFFD686L, 0xD5B88683L, 0xD1799B34L, 0xDC3ABDEDL, 0xD8FBA05AL, 0x690CE0EEL, 0x6DCDFD59L, 0x608EDB80L, 0x644FC637L, 0x7A089632L, 0x7EC98B85L, 0x738AAD5CL, 0x774BB0EBL, 0x4F040D56L, 0x4BC510E1L, 0x46863638L, 0x42472B8FL, 0x5C007B8AL, 0x58C1663DL, 0x558240E4L, 0x51435D53L, 0x251D3B9EL, 0x21DC2629L, 0x2C9F00F0L, 0x285E1D47L, 0x36194D42L, 0x32D850F5L, 0x3F9B762CL, 0x3B5A6B9BL, 0x0315D626L, 0x07D4CB91L, 0x0A97ED48L, 0x0E56F0FFL, 0x1011A0FAL, 0x14D0BD4DL, 0x19939B94L, 0x1D528623L, 0xF12F560EL, 0xF5EE4BB9L, 0xF8AD6D60L, 0xFC6C70D7L, 0xE22B20D2L, 0xE6EA3D65L, 0xEBA91BBCL, 0xEF68060BL, 0xD727BBB6L, 0xD3E6A601L, 0xDEA580D8L, 0xDA649D6FL, 0xC423CD6AL, 0xC0E2D0DDL, 0xCDA1F604L, 0xC960EBB3L, 0xBD3E8D7EL, 0xB9FF90C9L, 0xB4BCB610L, 0xB07DABA7L, 0xAE3AFBA2L, 0xAAFBE615L, 0xA7B8C0CCL, 0xA379DD7BL, 0x9B3660C6L, 0x9FF77D71L, 0x92B45BA8L, 0x9675461FL, 0x8832161AL, 0x8CF30BADL, 0x81B02D74L, 0x857130C3L, 0x5D8A9099L, 0x594B8D2EL, 0x5408ABF7L, 0x50C9B640L, 0x4E8EE645L, 0x4A4FFBF2L, 0x470CDD2BL, 0x43CDC09CL, 0x7B827D21L, 0x7F436096L, 0x7200464FL, 0x76C15BF8L, 0x68860BFDL, 0x6C47164AL, 0x61043093L, 0x65C52D24L, 0x119B4BE9L, 0x155A565EL, 0x18197087L, 0x1CD86D30L, 0x029F3D35L, 0x065E2082L, 0x0B1D065BL, 0x0FDC1BECL, 0x3793A651L, 0x3352BBE6L, 0x3E119D3FL, 0x3AD08088L, 0x2497D08DL, 0x2056CD3AL, 0x2D15EBE3L, 0x29D4F654L, 0xC5A92679L, 0xC1683BCEL, 0xCC2B1D17L, 0xC8EA00A0L, 0xD6AD50A5L, 0xD26C4D12L, 0xDF2F6BCBL, 0xDBEE767CL, 0xE3A1CBC1L, 0xE760D676L, 0xEA23F0AFL, 0xEEE2ED18L, 0xF0A5BD1DL, 0xF464A0AAL, 0xF9278673L, 0xFDE69BC4L, 0x89B8FD09L, 0x8D79E0BEL, 0x803AC667L, 0x84FBDBD0L, 0x9ABC8BD5L, 0x9E7D9662L, 0x933EB0BBL, 0x97FFAD0CL, 0xAFB010B1L, 0xAB710D06L, 0xA6322BDFL, 0xA2F33668L, 0xBCB4666DL, 0xB8757BDAL, 0xB5365D03L, 0xB1F740B4L }; #endif static DRFLAC_INLINE drflac_uint32 drflac_crc32_byte(drflac_uint32 crc32, drflac_uint8 data) { #ifndef DR_FLAC_NO_CRC return (crc32 << 8) ^ drflac__crc32_table[(drflac_uint8)((crc32 >> 24) & 0xFF) ^ data]; #else (void)data; return crc32; #endif } #if 0 static DRFLAC_INLINE drflac_uint32 drflac_crc32_uint32(drflac_uint32 crc32, drflac_uint32 data) { crc32 = drflac_crc32_byte(crc32, (drflac_uint8)((data >> 24) & 0xFF)); crc32 = drflac_crc32_byte(crc32, (drflac_uint8)((data >> 16) & 0xFF)); crc32 = drflac_crc32_byte(crc32, (drflac_uint8)((data >> 8) & 0xFF)); crc32 = drflac_crc32_byte(crc32, (drflac_uint8)((data >> 0) & 0xFF)); return crc32; } static DRFLAC_INLINE drflac_uint32 drflac_crc32_uint64(drflac_uint32 crc32, drflac_uint64 data) { crc32 = drflac_crc32_uint32(crc32, (drflac_uint32)((data >> 32) & 0xFFFFFFFF)); crc32 = drflac_crc32_uint32(crc32, (drflac_uint32)((data >> 0) & 0xFFFFFFFF)); return crc32; } #endif static DRFLAC_INLINE drflac_uint32 drflac_crc32_buffer(drflac_uint32 crc32, drflac_uint8* pData, drflac_uint32 dataSize) { /* This can be optimized. */ drflac_uint32 i; for (i = 0; i < dataSize; ++i) { crc32 = drflac_crc32_byte(crc32, pData[i]); } return crc32; } static DRFLAC_INLINE drflac_bool32 drflac_ogg__is_capture_pattern(drflac_uint8 pattern[4]) { return pattern[0] == 'O' && pattern[1] == 'g' && pattern[2] == 'g' && pattern[3] == 'S'; } static DRFLAC_INLINE drflac_uint32 drflac_ogg__get_page_header_size(drflac_ogg_page_header* pHeader) { return 27 + pHeader->segmentCount; } static DRFLAC_INLINE drflac_uint32 drflac_ogg__get_page_body_size(drflac_ogg_page_header* pHeader) { drflac_uint32 pageBodySize = 0; int i; for (i = 0; i < pHeader->segmentCount; ++i) { pageBodySize += pHeader->segmentTable[i]; } return pageBodySize; } static drflac_result drflac_ogg__read_page_header_after_capture_pattern(drflac_read_proc onRead, void* pUserData, drflac_ogg_page_header* pHeader, drflac_uint32* pBytesRead, drflac_uint32* pCRC32) { drflac_uint8 data[23]; drflac_uint32 i; DRFLAC_ASSERT(*pCRC32 == DRFLAC_OGG_CAPTURE_PATTERN_CRC32); if (onRead(pUserData, data, 23) != 23) { return DRFLAC_AT_END; } *pBytesRead += 23; /* It's not actually used, but set the capture pattern to 'OggS' for completeness. Not doing this will cause static analysers to complain about us trying to access uninitialized data. We could alternatively just comment out this member of the drflac_ogg_page_header structure, but I like to have it map to the structure of the underlying data. */ pHeader->capturePattern[0] = 'O'; pHeader->capturePattern[1] = 'g'; pHeader->capturePattern[2] = 'g'; pHeader->capturePattern[3] = 'S'; pHeader->structureVersion = data[0]; pHeader->headerType = data[1]; DRFLAC_COPY_MEMORY(&pHeader->granulePosition, &data[ 2], 8); DRFLAC_COPY_MEMORY(&pHeader->serialNumber, &data[10], 4); DRFLAC_COPY_MEMORY(&pHeader->sequenceNumber, &data[14], 4); DRFLAC_COPY_MEMORY(&pHeader->checksum, &data[18], 4); pHeader->segmentCount = data[22]; /* Calculate the CRC. Note that for the calculation the checksum part of the page needs to be set to 0. */ data[18] = 0; data[19] = 0; data[20] = 0; data[21] = 0; for (i = 0; i < 23; ++i) { *pCRC32 = drflac_crc32_byte(*pCRC32, data[i]); } if (onRead(pUserData, pHeader->segmentTable, pHeader->segmentCount) != pHeader->segmentCount) { return DRFLAC_AT_END; } *pBytesRead += pHeader->segmentCount; for (i = 0; i < pHeader->segmentCount; ++i) { *pCRC32 = drflac_crc32_byte(*pCRC32, pHeader->segmentTable[i]); } return DRFLAC_SUCCESS; } static drflac_result drflac_ogg__read_page_header(drflac_read_proc onRead, void* pUserData, drflac_ogg_page_header* pHeader, drflac_uint32* pBytesRead, drflac_uint32* pCRC32) { drflac_uint8 id[4]; *pBytesRead = 0; if (onRead(pUserData, id, 4) != 4) { return DRFLAC_AT_END; } *pBytesRead += 4; /* We need to read byte-by-byte until we find the OggS capture pattern. */ for (;;) { if (drflac_ogg__is_capture_pattern(id)) { drflac_result result; *pCRC32 = DRFLAC_OGG_CAPTURE_PATTERN_CRC32; result = drflac_ogg__read_page_header_after_capture_pattern(onRead, pUserData, pHeader, pBytesRead, pCRC32); if (result == DRFLAC_SUCCESS) { return DRFLAC_SUCCESS; } else { if (result == DRFLAC_CRC_MISMATCH) { continue; } else { return result; } } } else { /* The first 4 bytes did not equal the capture pattern. Read the next byte and try again. */ id[0] = id[1]; id[1] = id[2]; id[2] = id[3]; if (onRead(pUserData, &id[3], 1) != 1) { return DRFLAC_AT_END; } *pBytesRead += 1; } } } /* The main part of the Ogg encapsulation is the conversion from the physical Ogg bitstream to the native FLAC bitstream. It works in three general stages: Ogg Physical Bitstream -> Ogg/FLAC Logical Bitstream -> FLAC Native Bitstream. dr_flac is designed in such a way that the core sections assume everything is delivered in native format. Therefore, for each encapsulation type dr_flac is supporting there needs to be a layer sitting on top of the onRead and onSeek callbacks that ensures the bits read from the physical Ogg bitstream are converted and delivered in native FLAC format. */ typedef struct { drflac_read_proc onRead; /* The original onRead callback from drflac_open() and family. */ drflac_seek_proc onSeek; /* The original onSeek callback from drflac_open() and family. */ void* pUserData; /* The user data passed on onRead and onSeek. This is the user data that was passed on drflac_open() and family. */ drflac_uint64 currentBytePos; /* The position of the byte we are sitting on in the physical byte stream. Used for efficient seeking. */ drflac_uint64 firstBytePos; /* The position of the first byte in the physical bitstream. Points to the start of the "OggS" identifier of the FLAC bos page. */ drflac_uint32 serialNumber; /* The serial number of the FLAC audio pages. This is determined by the initial header page that was read during initialization. */ drflac_ogg_page_header bosPageHeader; /* Used for seeking. */ drflac_ogg_page_header currentPageHeader; drflac_uint32 bytesRemainingInPage; drflac_uint32 pageDataSize; drflac_uint8 pageData[DRFLAC_OGG_MAX_PAGE_SIZE]; } drflac_oggbs; /* oggbs = Ogg Bitstream */ static size_t drflac_oggbs__read_physical(drflac_oggbs* oggbs, void* bufferOut, size_t bytesToRead) { size_t bytesActuallyRead = oggbs->onRead(oggbs->pUserData, bufferOut, bytesToRead); oggbs->currentBytePos += bytesActuallyRead; return bytesActuallyRead; } static drflac_bool32 drflac_oggbs__seek_physical(drflac_oggbs* oggbs, drflac_uint64 offset, drflac_seek_origin origin) { if (origin == drflac_seek_origin_start) { if (offset <= 0x7FFFFFFF) { if (!oggbs->onSeek(oggbs->pUserData, (int)offset, drflac_seek_origin_start)) { return DRFLAC_FALSE; } oggbs->currentBytePos = offset; return DRFLAC_TRUE; } else { if (!oggbs->onSeek(oggbs->pUserData, 0x7FFFFFFF, drflac_seek_origin_start)) { return DRFLAC_FALSE; } oggbs->currentBytePos = offset; return drflac_oggbs__seek_physical(oggbs, offset - 0x7FFFFFFF, drflac_seek_origin_current); } } else { while (offset > 0x7FFFFFFF) { if (!oggbs->onSeek(oggbs->pUserData, 0x7FFFFFFF, drflac_seek_origin_current)) { return DRFLAC_FALSE; } oggbs->currentBytePos += 0x7FFFFFFF; offset -= 0x7FFFFFFF; } if (!oggbs->onSeek(oggbs->pUserData, (int)offset, drflac_seek_origin_current)) { /* <-- Safe cast thanks to the loop above. */ return DRFLAC_FALSE; } oggbs->currentBytePos += offset; return DRFLAC_TRUE; } } static drflac_bool32 drflac_oggbs__goto_next_page(drflac_oggbs* oggbs, drflac_ogg_crc_mismatch_recovery recoveryMethod) { drflac_ogg_page_header header; for (;;) { drflac_uint32 crc32 = 0; drflac_uint32 bytesRead; drflac_uint32 pageBodySize; #ifndef DR_FLAC_NO_CRC drflac_uint32 actualCRC32; #endif if (drflac_ogg__read_page_header(oggbs->onRead, oggbs->pUserData, &header, &bytesRead, &crc32) != DRFLAC_SUCCESS) { return DRFLAC_FALSE; } oggbs->currentBytePos += bytesRead; pageBodySize = drflac_ogg__get_page_body_size(&header); if (pageBodySize > DRFLAC_OGG_MAX_PAGE_SIZE) { continue; /* Invalid page size. Assume it's corrupted and just move to the next page. */ } if (header.serialNumber != oggbs->serialNumber) { /* It's not a FLAC page. Skip it. */ if (pageBodySize > 0 && !drflac_oggbs__seek_physical(oggbs, pageBodySize, drflac_seek_origin_current)) { return DRFLAC_FALSE; } continue; } /* We need to read the entire page and then do a CRC check on it. If there's a CRC mismatch we need to skip this page. */ if (drflac_oggbs__read_physical(oggbs, oggbs->pageData, pageBodySize) != pageBodySize) { return DRFLAC_FALSE; } oggbs->pageDataSize = pageBodySize; #ifndef DR_FLAC_NO_CRC actualCRC32 = drflac_crc32_buffer(crc32, oggbs->pageData, oggbs->pageDataSize); if (actualCRC32 != header.checksum) { if (recoveryMethod == drflac_ogg_recover_on_crc_mismatch) { continue; /* CRC mismatch. Skip this page. */ } else { /* Even though we are failing on a CRC mismatch, we still want our stream to be in a good state. Therefore we go to the next valid page to ensure we're in a good state, but return false to let the caller know that the seek did not fully complete. */ drflac_oggbs__goto_next_page(oggbs, drflac_ogg_recover_on_crc_mismatch); return DRFLAC_FALSE; } } #else (void)recoveryMethod; /* <-- Silence a warning. */ #endif oggbs->currentPageHeader = header; oggbs->bytesRemainingInPage = pageBodySize; return DRFLAC_TRUE; } } /* Function below is unused at the moment, but I might be re-adding it later. */ #if 0 static drflac_uint8 drflac_oggbs__get_current_segment_index(drflac_oggbs* oggbs, drflac_uint8* pBytesRemainingInSeg) { drflac_uint32 bytesConsumedInPage = drflac_ogg__get_page_body_size(&oggbs->currentPageHeader) - oggbs->bytesRemainingInPage; drflac_uint8 iSeg = 0; drflac_uint32 iByte = 0; while (iByte < bytesConsumedInPage) { drflac_uint8 segmentSize = oggbs->currentPageHeader.segmentTable[iSeg]; if (iByte + segmentSize > bytesConsumedInPage) { break; } else { iSeg += 1; iByte += segmentSize; } } *pBytesRemainingInSeg = oggbs->currentPageHeader.segmentTable[iSeg] - (drflac_uint8)(bytesConsumedInPage - iByte); return iSeg; } static drflac_bool32 drflac_oggbs__seek_to_next_packet(drflac_oggbs* oggbs) { /* The current packet ends when we get to the segment with a lacing value of < 255 which is not at the end of a page. */ for (;;) { drflac_bool32 atEndOfPage = DRFLAC_FALSE; drflac_uint8 bytesRemainingInSeg; drflac_uint8 iFirstSeg = drflac_oggbs__get_current_segment_index(oggbs, &bytesRemainingInSeg); drflac_uint32 bytesToEndOfPacketOrPage = bytesRemainingInSeg; for (drflac_uint8 iSeg = iFirstSeg; iSeg < oggbs->currentPageHeader.segmentCount; ++iSeg) { drflac_uint8 segmentSize = oggbs->currentPageHeader.segmentTable[iSeg]; if (segmentSize < 255) { if (iSeg == oggbs->currentPageHeader.segmentCount-1) { atEndOfPage = DRFLAC_TRUE; } break; } bytesToEndOfPacketOrPage += segmentSize; } /* At this point we will have found either the packet or the end of the page. If were at the end of the page we'll want to load the next page and keep searching for the end of the packet. */ drflac_oggbs__seek_physical(oggbs, bytesToEndOfPacketOrPage, drflac_seek_origin_current); oggbs->bytesRemainingInPage -= bytesToEndOfPacketOrPage; if (atEndOfPage) { /* We're potentially at the next packet, but we need to check the next page first to be sure because the packet may straddle pages. */ if (!drflac_oggbs__goto_next_page(oggbs)) { return DRFLAC_FALSE; } /* If it's a fresh packet it most likely means we're at the next packet. */ if ((oggbs->currentPageHeader.headerType & 0x01) == 0) { return DRFLAC_TRUE; } } else { /* We're at the next packet. */ return DRFLAC_TRUE; } } } static drflac_bool32 drflac_oggbs__seek_to_next_frame(drflac_oggbs* oggbs) { /* The bitstream should be sitting on the first byte just after the header of the frame. */ /* What we're actually doing here is seeking to the start of the next packet. */ return drflac_oggbs__seek_to_next_packet(oggbs); } #endif static size_t drflac__on_read_ogg(void* pUserData, void* bufferOut, size_t bytesToRead) { drflac_oggbs* oggbs = (drflac_oggbs*)pUserData; drflac_uint8* pRunningBufferOut = (drflac_uint8*)bufferOut; size_t bytesRead = 0; DRFLAC_ASSERT(oggbs != NULL); DRFLAC_ASSERT(pRunningBufferOut != NULL); /* Reading is done page-by-page. If we've run out of bytes in the page we need to move to the next one. */ while (bytesRead < bytesToRead) { size_t bytesRemainingToRead = bytesToRead - bytesRead; if (oggbs->bytesRemainingInPage >= bytesRemainingToRead) { DRFLAC_COPY_MEMORY(pRunningBufferOut, oggbs->pageData + (oggbs->pageDataSize - oggbs->bytesRemainingInPage), bytesRemainingToRead); bytesRead += bytesRemainingToRead; oggbs->bytesRemainingInPage -= (drflac_uint32)bytesRemainingToRead; break; } /* If we get here it means some of the requested data is contained in the next pages. */ if (oggbs->bytesRemainingInPage > 0) { DRFLAC_COPY_MEMORY(pRunningBufferOut, oggbs->pageData + (oggbs->pageDataSize - oggbs->bytesRemainingInPage), oggbs->bytesRemainingInPage); bytesRead += oggbs->bytesRemainingInPage; pRunningBufferOut += oggbs->bytesRemainingInPage; oggbs->bytesRemainingInPage = 0; } DRFLAC_ASSERT(bytesRemainingToRead > 0); if (!drflac_oggbs__goto_next_page(oggbs, drflac_ogg_recover_on_crc_mismatch)) { break; /* Failed to go to the next page. Might have simply hit the end of the stream. */ } } return bytesRead; } static drflac_bool32 drflac__on_seek_ogg(void* pUserData, int offset, drflac_seek_origin origin) { drflac_oggbs* oggbs = (drflac_oggbs*)pUserData; int bytesSeeked = 0; DRFLAC_ASSERT(oggbs != NULL); DRFLAC_ASSERT(offset >= 0); /* <-- Never seek backwards. */ /* Seeking is always forward which makes things a lot simpler. */ if (origin == drflac_seek_origin_start) { if (!drflac_oggbs__seek_physical(oggbs, (int)oggbs->firstBytePos, drflac_seek_origin_start)) { return DRFLAC_FALSE; } if (!drflac_oggbs__goto_next_page(oggbs, drflac_ogg_fail_on_crc_mismatch)) { return DRFLAC_FALSE; } return drflac__on_seek_ogg(pUserData, offset, drflac_seek_origin_current); } DRFLAC_ASSERT(origin == drflac_seek_origin_current); while (bytesSeeked < offset) { int bytesRemainingToSeek = offset - bytesSeeked; DRFLAC_ASSERT(bytesRemainingToSeek >= 0); if (oggbs->bytesRemainingInPage >= (size_t)bytesRemainingToSeek) { bytesSeeked += bytesRemainingToSeek; (void)bytesSeeked; /* <-- Silence a dead store warning emitted by Clang Static Analyzer. */ oggbs->bytesRemainingInPage -= bytesRemainingToSeek; break; } /* If we get here it means some of the requested data is contained in the next pages. */ if (oggbs->bytesRemainingInPage > 0) { bytesSeeked += (int)oggbs->bytesRemainingInPage; oggbs->bytesRemainingInPage = 0; } DRFLAC_ASSERT(bytesRemainingToSeek > 0); if (!drflac_oggbs__goto_next_page(oggbs, drflac_ogg_fail_on_crc_mismatch)) { /* Failed to go to the next page. We either hit the end of the stream or had a CRC mismatch. */ return DRFLAC_FALSE; } } return DRFLAC_TRUE; } static drflac_bool32 drflac_ogg__seek_to_pcm_frame(drflac* pFlac, drflac_uint64 pcmFrameIndex) { drflac_oggbs* oggbs = (drflac_oggbs*)pFlac->_oggbs; drflac_uint64 originalBytePos; drflac_uint64 runningGranulePosition; drflac_uint64 runningFrameBytePos; drflac_uint64 runningPCMFrameCount; DRFLAC_ASSERT(oggbs != NULL); originalBytePos = oggbs->currentBytePos; /* For recovery. Points to the OggS identifier. */ /* First seek to the first frame. */ if (!drflac__seek_to_byte(&pFlac->bs, pFlac->firstFLACFramePosInBytes)) { return DRFLAC_FALSE; } oggbs->bytesRemainingInPage = 0; runningGranulePosition = 0; for (;;) { if (!drflac_oggbs__goto_next_page(oggbs, drflac_ogg_recover_on_crc_mismatch)) { drflac_oggbs__seek_physical(oggbs, originalBytePos, drflac_seek_origin_start); return DRFLAC_FALSE; /* Never did find that sample... */ } runningFrameBytePos = oggbs->currentBytePos - drflac_ogg__get_page_header_size(&oggbs->currentPageHeader) - oggbs->pageDataSize; if (oggbs->currentPageHeader.granulePosition >= pcmFrameIndex) { break; /* The sample is somewhere in the previous page. */ } /* At this point we know the sample is not in the previous page. It could possibly be in this page. For simplicity we disregard any pages that do not begin a fresh packet. */ if ((oggbs->currentPageHeader.headerType & 0x01) == 0) { /* <-- Is it a fresh page? */ if (oggbs->currentPageHeader.segmentTable[0] >= 2) { drflac_uint8 firstBytesInPage[2]; firstBytesInPage[0] = oggbs->pageData[0]; firstBytesInPage[1] = oggbs->pageData[1]; if ((firstBytesInPage[0] == 0xFF) && (firstBytesInPage[1] & 0xFC) == 0xF8) { /* <-- Does the page begin with a frame's sync code? */ runningGranulePosition = oggbs->currentPageHeader.granulePosition; } continue; } } } /* We found the page that that is closest to the sample, so now we need to find it. The first thing to do is seek to the start of that page. In the loop above we checked that it was a fresh page which means this page is also the start of a new frame. This property means that after we've seeked to the page we can immediately start looping over frames until we find the one containing the target sample. */ if (!drflac_oggbs__seek_physical(oggbs, runningFrameBytePos, drflac_seek_origin_start)) { return DRFLAC_FALSE; } if (!drflac_oggbs__goto_next_page(oggbs, drflac_ogg_recover_on_crc_mismatch)) { return DRFLAC_FALSE; } /* At this point we'll be sitting on the first byte of the frame header of the first frame in the page. We just keep looping over these frames until we find the one containing the sample we're after. */ runningPCMFrameCount = runningGranulePosition; for (;;) { /* There are two ways to find the sample and seek past irrelevant frames: 1) Use the native FLAC decoder. 2) Use Ogg's framing system. Both of these options have their own pros and cons. Using the native FLAC decoder is slower because it needs to do a full decode of the frame. Using Ogg's framing system is faster, but more complicated and involves some code duplication for the decoding of frame headers. Another thing to consider is that using the Ogg framing system will perform direct seeking of the physical Ogg bitstream. This is important to consider because it means we cannot read data from the drflac_bs object using the standard drflac__*() APIs because that will read in extra data for its own internal caching which in turn breaks the positioning of the read pointer of the physical Ogg bitstream. Therefore, anything that would normally be read using the native FLAC decoding APIs, such as drflac__read_next_flac_frame_header(), need to be re-implemented so as to avoid the use of the drflac_bs object. Considering these issues, I have decided to use the slower native FLAC decoding method for the following reasons: 1) Seeking is already partially accelerated using Ogg's paging system in the code block above. 2) Seeking in an Ogg encapsulated FLAC stream is probably quite uncommon. 3) Simplicity. */ drflac_uint64 firstPCMFrameInFLACFrame = 0; drflac_uint64 lastPCMFrameInFLACFrame = 0; drflac_uint64 pcmFrameCountInThisFrame; if (!drflac__read_next_flac_frame_header(&pFlac->bs, pFlac->bitsPerSample, &pFlac->currentFLACFrame.header)) { return DRFLAC_FALSE; } drflac__get_pcm_frame_range_of_current_flac_frame(pFlac, &firstPCMFrameInFLACFrame, &lastPCMFrameInFLACFrame); pcmFrameCountInThisFrame = (lastPCMFrameInFLACFrame - firstPCMFrameInFLACFrame) + 1; /* If we are seeking to the end of the file and we've just hit it, we're done. */ if (pcmFrameIndex == pFlac->totalPCMFrameCount && (runningPCMFrameCount + pcmFrameCountInThisFrame) == pFlac->totalPCMFrameCount) { drflac_result result = drflac__decode_flac_frame(pFlac); if (result == DRFLAC_SUCCESS) { pFlac->currentPCMFrame = pcmFrameIndex; pFlac->currentFLACFrame.pcmFramesRemaining = 0; return DRFLAC_TRUE; } else { return DRFLAC_FALSE; } } if (pcmFrameIndex < (runningPCMFrameCount + pcmFrameCountInThisFrame)) { /* The sample should be in this FLAC frame. We need to fully decode it, however if it's an invalid frame (a CRC mismatch), we need to pretend it never existed and keep iterating. */ drflac_result result = drflac__decode_flac_frame(pFlac); if (result == DRFLAC_SUCCESS) { /* The frame is valid. We just need to skip over some samples to ensure it's sample-exact. */ drflac_uint64 pcmFramesToDecode = (size_t)(pcmFrameIndex - runningPCMFrameCount); /* <-- Safe cast because the maximum number of samples in a frame is 65535. */ if (pcmFramesToDecode == 0) { return DRFLAC_TRUE; } pFlac->currentPCMFrame = runningPCMFrameCount; return drflac__seek_forward_by_pcm_frames(pFlac, pcmFramesToDecode) == pcmFramesToDecode; /* <-- If this fails, something bad has happened (it should never fail). */ } else { if (result == DRFLAC_CRC_MISMATCH) { continue; /* CRC mismatch. Pretend this frame never existed. */ } else { return DRFLAC_FALSE; } } } else { /* It's not in this frame. We need to seek past the frame, but check if there was a CRC mismatch. If so, we pretend this frame never existed and leave the running sample count untouched. */ drflac_result result = drflac__seek_to_next_flac_frame(pFlac); if (result == DRFLAC_SUCCESS) { runningPCMFrameCount += pcmFrameCountInThisFrame; } else { if (result == DRFLAC_CRC_MISMATCH) { continue; /* CRC mismatch. Pretend this frame never existed. */ } else { return DRFLAC_FALSE; } } } } } static drflac_bool32 drflac__init_private__ogg(drflac_init_info* pInit, drflac_read_proc onRead, drflac_seek_proc onSeek, drflac_meta_proc onMeta, void* pUserData, void* pUserDataMD, drflac_bool32 relaxed) { drflac_ogg_page_header header; drflac_uint32 crc32 = DRFLAC_OGG_CAPTURE_PATTERN_CRC32; drflac_uint32 bytesRead = 0; /* Pre Condition: The bit stream should be sitting just past the 4-byte OggS capture pattern. */ (void)relaxed; pInit->container = drflac_container_ogg; pInit->oggFirstBytePos = 0; /* We'll get here if the first 4 bytes of the stream were the OggS capture pattern, however it doesn't necessarily mean the stream includes FLAC encoded audio. To check for this we need to scan the beginning-of-stream page markers and check if any match the FLAC specification. Important to keep in mind that the stream may be multiplexed. */ if (drflac_ogg__read_page_header_after_capture_pattern(onRead, pUserData, &header, &bytesRead, &crc32) != DRFLAC_SUCCESS) { return DRFLAC_FALSE; } pInit->runningFilePos += bytesRead; for (;;) { int pageBodySize; /* Break if we're past the beginning of stream page. */ if ((header.headerType & 0x02) == 0) { return DRFLAC_FALSE; } /* Check if it's a FLAC header. */ pageBodySize = drflac_ogg__get_page_body_size(&header); if (pageBodySize == 51) { /* 51 = the lacing value of the FLAC header packet. */ /* It could be a FLAC page... */ drflac_uint32 bytesRemainingInPage = pageBodySize; drflac_uint8 packetType; if (onRead(pUserData, &packetType, 1) != 1) { return DRFLAC_FALSE; } bytesRemainingInPage -= 1; if (packetType == 0x7F) { /* Increasingly more likely to be a FLAC page... */ drflac_uint8 sig[4]; if (onRead(pUserData, sig, 4) != 4) { return DRFLAC_FALSE; } bytesRemainingInPage -= 4; if (sig[0] == 'F' && sig[1] == 'L' && sig[2] == 'A' && sig[3] == 'C') { /* Almost certainly a FLAC page... */ drflac_uint8 mappingVersion[2]; if (onRead(pUserData, mappingVersion, 2) != 2) { return DRFLAC_FALSE; } if (mappingVersion[0] != 1) { return DRFLAC_FALSE; /* Only supporting version 1.x of the Ogg mapping. */ } /* The next 2 bytes are the non-audio packets, not including this one. We don't care about this because we're going to be handling it in a generic way based on the serial number and packet types. */ if (!onSeek(pUserData, 2, drflac_seek_origin_current)) { return DRFLAC_FALSE; } /* Expecting the native FLAC signature "fLaC". */ if (onRead(pUserData, sig, 4) != 4) { return DRFLAC_FALSE; } if (sig[0] == 'f' && sig[1] == 'L' && sig[2] == 'a' && sig[3] == 'C') { /* The remaining data in the page should be the STREAMINFO block. */ drflac_streaminfo streaminfo; drflac_uint8 isLastBlock; drflac_uint8 blockType; drflac_uint32 blockSize; if (!drflac__read_and_decode_block_header(onRead, pUserData, &isLastBlock, &blockType, &blockSize)) { return DRFLAC_FALSE; } if (blockType != DRFLAC_METADATA_BLOCK_TYPE_STREAMINFO || blockSize != 34) { return DRFLAC_FALSE; /* Invalid block type. First block must be the STREAMINFO block. */ } if (drflac__read_streaminfo(onRead, pUserData, &streaminfo)) { /* Success! */ pInit->hasStreamInfoBlock = DRFLAC_TRUE; pInit->sampleRate = streaminfo.sampleRate; pInit->channels = streaminfo.channels; pInit->bitsPerSample = streaminfo.bitsPerSample; pInit->totalPCMFrameCount = streaminfo.totalPCMFrameCount; pInit->maxBlockSizeInPCMFrames = streaminfo.maxBlockSizeInPCMFrames; pInit->hasMetadataBlocks = !isLastBlock; if (onMeta) { drflac_metadata metadata; metadata.type = DRFLAC_METADATA_BLOCK_TYPE_STREAMINFO; metadata.pRawData = NULL; metadata.rawDataSize = 0; metadata.data.streaminfo = streaminfo; onMeta(pUserDataMD, &metadata); } pInit->runningFilePos += pageBodySize; pInit->oggFirstBytePos = pInit->runningFilePos - 79; /* Subtracting 79 will place us right on top of the "OggS" identifier of the FLAC bos page. */ pInit->oggSerial = header.serialNumber; pInit->oggBosHeader = header; break; } else { /* Failed to read STREAMINFO block. Aww, so close... */ return DRFLAC_FALSE; } } else { /* Invalid file. */ return DRFLAC_FALSE; } } else { /* Not a FLAC header. Skip it. */ if (!onSeek(pUserData, bytesRemainingInPage, drflac_seek_origin_current)) { return DRFLAC_FALSE; } } } else { /* Not a FLAC header. Seek past the entire page and move on to the next. */ if (!onSeek(pUserData, bytesRemainingInPage, drflac_seek_origin_current)) { return DRFLAC_FALSE; } } } else { if (!onSeek(pUserData, pageBodySize, drflac_seek_origin_current)) { return DRFLAC_FALSE; } } pInit->runningFilePos += pageBodySize; /* Read the header of the next page. */ if (drflac_ogg__read_page_header(onRead, pUserData, &header, &bytesRead, &crc32) != DRFLAC_SUCCESS) { return DRFLAC_FALSE; } pInit->runningFilePos += bytesRead; } /* If we get here it means we found a FLAC audio stream. We should be sitting on the first byte of the header of the next page. The next packets in the FLAC logical stream contain the metadata. The only thing left to do in the initialization phase for Ogg is to create the Ogg bistream object. */ pInit->hasMetadataBlocks = DRFLAC_TRUE; /* <-- Always have at least VORBIS_COMMENT metadata block. */ return DRFLAC_TRUE; } #endif static drflac_bool32 drflac__init_private(drflac_init_info* pInit, drflac_read_proc onRead, drflac_seek_proc onSeek, drflac_meta_proc onMeta, drflac_container container, void* pUserData, void* pUserDataMD) { drflac_bool32 relaxed; drflac_uint8 id[4]; if (pInit == NULL || onRead == NULL || onSeek == NULL) { return DRFLAC_FALSE; } DRFLAC_ZERO_MEMORY(pInit, sizeof(*pInit)); pInit->onRead = onRead; pInit->onSeek = onSeek; pInit->onMeta = onMeta; pInit->container = container; pInit->pUserData = pUserData; pInit->pUserDataMD = pUserDataMD; pInit->bs.onRead = onRead; pInit->bs.onSeek = onSeek; pInit->bs.pUserData = pUserData; drflac__reset_cache(&pInit->bs); /* If the container is explicitly defined then we can try opening in relaxed mode. */ relaxed = container != drflac_container_unknown; /* Skip over any ID3 tags. */ for (;;) { if (onRead(pUserData, id, 4) != 4) { return DRFLAC_FALSE; /* Ran out of data. */ } pInit->runningFilePos += 4; if (id[0] == 'I' && id[1] == 'D' && id[2] == '3') { drflac_uint8 header[6]; drflac_uint8 flags; drflac_uint32 headerSize; if (onRead(pUserData, header, 6) != 6) { return DRFLAC_FALSE; /* Ran out of data. */ } pInit->runningFilePos += 6; flags = header[1]; DRFLAC_COPY_MEMORY(&headerSize, header+2, 4); headerSize = drflac__unsynchsafe_32(drflac__be2host_32(headerSize)); if (flags & 0x10) { headerSize += 10; } if (!onSeek(pUserData, headerSize, drflac_seek_origin_current)) { return DRFLAC_FALSE; /* Failed to seek past the tag. */ } pInit->runningFilePos += headerSize; } else { break; } } if (id[0] == 'f' && id[1] == 'L' && id[2] == 'a' && id[3] == 'C') { return drflac__init_private__native(pInit, onRead, onSeek, onMeta, pUserData, pUserDataMD, relaxed); } #ifndef DR_FLAC_NO_OGG if (id[0] == 'O' && id[1] == 'g' && id[2] == 'g' && id[3] == 'S') { return drflac__init_private__ogg(pInit, onRead, onSeek, onMeta, pUserData, pUserDataMD, relaxed); } #endif /* If we get here it means we likely don't have a header. Try opening in relaxed mode, if applicable. */ if (relaxed) { if (container == drflac_container_native) { return drflac__init_private__native(pInit, onRead, onSeek, onMeta, pUserData, pUserDataMD, relaxed); } #ifndef DR_FLAC_NO_OGG if (container == drflac_container_ogg) { return drflac__init_private__ogg(pInit, onRead, onSeek, onMeta, pUserData, pUserDataMD, relaxed); } #endif } /* Unsupported container. */ return DRFLAC_FALSE; } static void drflac__init_from_info(drflac* pFlac, const drflac_init_info* pInit) { DRFLAC_ASSERT(pFlac != NULL); DRFLAC_ASSERT(pInit != NULL); DRFLAC_ZERO_MEMORY(pFlac, sizeof(*pFlac)); pFlac->bs = pInit->bs; pFlac->onMeta = pInit->onMeta; pFlac->pUserDataMD = pInit->pUserDataMD; pFlac->maxBlockSizeInPCMFrames = pInit->maxBlockSizeInPCMFrames; pFlac->sampleRate = pInit->sampleRate; pFlac->channels = (drflac_uint8)pInit->channels; pFlac->bitsPerSample = (drflac_uint8)pInit->bitsPerSample; pFlac->totalPCMFrameCount = pInit->totalPCMFrameCount; pFlac->container = pInit->container; } static drflac* drflac_open_with_metadata_private(drflac_read_proc onRead, drflac_seek_proc onSeek, drflac_meta_proc onMeta, drflac_container container, void* pUserData, void* pUserDataMD, const drflac_allocation_callbacks* pAllocationCallbacks) { drflac_init_info init; drflac_uint32 allocationSize; drflac_uint32 wholeSIMDVectorCountPerChannel; drflac_uint32 decodedSamplesAllocationSize; #ifndef DR_FLAC_NO_OGG drflac_oggbs oggbs; #endif drflac_uint64 firstFramePos; drflac_uint64 seektablePos; drflac_uint32 seektableSize; drflac_allocation_callbacks allocationCallbacks; drflac* pFlac; /* CPU support first. */ drflac__init_cpu_caps(); if (!drflac__init_private(&init, onRead, onSeek, onMeta, container, pUserData, pUserDataMD)) { return NULL; } if (pAllocationCallbacks != NULL) { allocationCallbacks = *pAllocationCallbacks; if (allocationCallbacks.onFree == NULL || (allocationCallbacks.onMalloc == NULL && allocationCallbacks.onRealloc == NULL)) { return NULL; /* Invalid allocation callbacks. */ } } else { allocationCallbacks.pUserData = NULL; allocationCallbacks.onMalloc = drflac__malloc_default; allocationCallbacks.onRealloc = drflac__realloc_default; allocationCallbacks.onFree = drflac__free_default; } /* The size of the allocation for the drflac object needs to be large enough to fit the following: 1) The main members of the drflac structure 2) A block of memory large enough to store the decoded samples of the largest frame in the stream 3) If the container is Ogg, a drflac_oggbs object The complicated part of the allocation is making sure there's enough room the decoded samples, taking into consideration the different SIMD instruction sets. */ allocationSize = sizeof(drflac); /* The allocation size for decoded frames depends on the number of 32-bit integers that fit inside the largest SIMD vector we are supporting. */ if ((init.maxBlockSizeInPCMFrames % (DRFLAC_MAX_SIMD_VECTOR_SIZE / sizeof(drflac_int32))) == 0) { wholeSIMDVectorCountPerChannel = (init.maxBlockSizeInPCMFrames / (DRFLAC_MAX_SIMD_VECTOR_SIZE / sizeof(drflac_int32))); } else { wholeSIMDVectorCountPerChannel = (init.maxBlockSizeInPCMFrames / (DRFLAC_MAX_SIMD_VECTOR_SIZE / sizeof(drflac_int32))) + 1; } decodedSamplesAllocationSize = wholeSIMDVectorCountPerChannel * DRFLAC_MAX_SIMD_VECTOR_SIZE * init.channels; allocationSize += decodedSamplesAllocationSize; allocationSize += DRFLAC_MAX_SIMD_VECTOR_SIZE; /* Allocate extra bytes to ensure we have enough for alignment. */ #ifndef DR_FLAC_NO_OGG /* There's additional data required for Ogg streams. */ if (init.container == drflac_container_ogg) { allocationSize += sizeof(drflac_oggbs); } DRFLAC_ZERO_MEMORY(&oggbs, sizeof(oggbs)); if (init.container == drflac_container_ogg) { oggbs.onRead = onRead; oggbs.onSeek = onSeek; oggbs.pUserData = pUserData; oggbs.currentBytePos = init.oggFirstBytePos; oggbs.firstBytePos = init.oggFirstBytePos; oggbs.serialNumber = init.oggSerial; oggbs.bosPageHeader = init.oggBosHeader; oggbs.bytesRemainingInPage = 0; } #endif /* This part is a bit awkward. We need to load the seektable so that it can be referenced in-memory, but I want the drflac object to consist of only a single heap allocation. To this, the size of the seek table needs to be known, which we determine when reading and decoding the metadata. */ firstFramePos = 42; /* <-- We know we are at byte 42 at this point. */ seektablePos = 0; seektableSize = 0; if (init.hasMetadataBlocks) { drflac_read_proc onReadOverride = onRead; drflac_seek_proc onSeekOverride = onSeek; void* pUserDataOverride = pUserData; #ifndef DR_FLAC_NO_OGG if (init.container == drflac_container_ogg) { onReadOverride = drflac__on_read_ogg; onSeekOverride = drflac__on_seek_ogg; pUserDataOverride = (void*)&oggbs; } #endif if (!drflac__read_and_decode_metadata(onReadOverride, onSeekOverride, onMeta, pUserDataOverride, pUserDataMD, &firstFramePos, &seektablePos, &seektableSize, &allocationCallbacks)) { return NULL; } allocationSize += seektableSize; } pFlac = (drflac*)drflac__malloc_from_callbacks(allocationSize, &allocationCallbacks); if (pFlac == NULL) { return NULL; } drflac__init_from_info(pFlac, &init); pFlac->allocationCallbacks = allocationCallbacks; pFlac->pDecodedSamples = (drflac_int32*)drflac_align((size_t)pFlac->pExtraData, DRFLAC_MAX_SIMD_VECTOR_SIZE); #ifndef DR_FLAC_NO_OGG if (init.container == drflac_container_ogg) { drflac_oggbs* pInternalOggbs = (drflac_oggbs*)((drflac_uint8*)pFlac->pDecodedSamples + decodedSamplesAllocationSize + seektableSize); DRFLAC_COPY_MEMORY(pInternalOggbs, &oggbs, sizeof(oggbs)); /* The Ogg bistream needs to be layered on top of the original bitstream. */ pFlac->bs.onRead = drflac__on_read_ogg; pFlac->bs.onSeek = drflac__on_seek_ogg; pFlac->bs.pUserData = (void*)pInternalOggbs; pFlac->_oggbs = (void*)pInternalOggbs; } #endif pFlac->firstFLACFramePosInBytes = firstFramePos; /* NOTE: Seektables are not currently compatible with Ogg encapsulation (Ogg has its own accelerated seeking system). I may change this later, so I'm leaving this here for now. */ #ifndef DR_FLAC_NO_OGG if (init.container == drflac_container_ogg) { pFlac->pSeekpoints = NULL; pFlac->seekpointCount = 0; } else #endif { /* If we have a seektable we need to load it now, making sure we move back to where we were previously. */ if (seektablePos != 0) { pFlac->seekpointCount = seektableSize / sizeof(*pFlac->pSeekpoints); pFlac->pSeekpoints = (drflac_seekpoint*)((drflac_uint8*)pFlac->pDecodedSamples + decodedSamplesAllocationSize); DRFLAC_ASSERT(pFlac->bs.onSeek != NULL); DRFLAC_ASSERT(pFlac->bs.onRead != NULL); /* Seek to the seektable, then just read directly into our seektable buffer. */ if (pFlac->bs.onSeek(pFlac->bs.pUserData, (int)seektablePos, drflac_seek_origin_start)) { if (pFlac->bs.onRead(pFlac->bs.pUserData, pFlac->pSeekpoints, seektableSize) == seektableSize) { /* Endian swap. */ drflac_uint32 iSeekpoint; for (iSeekpoint = 0; iSeekpoint < pFlac->seekpointCount; ++iSeekpoint) { pFlac->pSeekpoints[iSeekpoint].firstPCMFrame = drflac__be2host_64(pFlac->pSeekpoints[iSeekpoint].firstPCMFrame); pFlac->pSeekpoints[iSeekpoint].flacFrameOffset = drflac__be2host_64(pFlac->pSeekpoints[iSeekpoint].flacFrameOffset); pFlac->pSeekpoints[iSeekpoint].pcmFrameCount = drflac__be2host_16(pFlac->pSeekpoints[iSeekpoint].pcmFrameCount); } } else { /* Failed to read the seektable. Pretend we don't have one. */ pFlac->pSeekpoints = NULL; pFlac->seekpointCount = 0; } /* We need to seek back to where we were. If this fails it's a critical error. */ if (!pFlac->bs.onSeek(pFlac->bs.pUserData, (int)pFlac->firstFLACFramePosInBytes, drflac_seek_origin_start)) { drflac__free_from_callbacks(pFlac, &allocationCallbacks); return NULL; } } else { /* Failed to seek to the seektable. Ominous sign, but for now we can just pretend we don't have one. */ pFlac->pSeekpoints = NULL; pFlac->seekpointCount = 0; } } } /* If we get here, but don't have a STREAMINFO block, it means we've opened the stream in relaxed mode and need to decode the first frame. */ if (!init.hasStreamInfoBlock) { pFlac->currentFLACFrame.header = init.firstFrameHeader; for (;;) { drflac_result result = drflac__decode_flac_frame(pFlac); if (result == DRFLAC_SUCCESS) { break; } else { if (result == DRFLAC_CRC_MISMATCH) { if (!drflac__read_next_flac_frame_header(&pFlac->bs, pFlac->bitsPerSample, &pFlac->currentFLACFrame.header)) { drflac__free_from_callbacks(pFlac, &allocationCallbacks); return NULL; } continue; } else { drflac__free_from_callbacks(pFlac, &allocationCallbacks); return NULL; } } } } return pFlac; } #ifndef DR_FLAC_NO_STDIO #include #include /* For wcslen(), wcsrtombs() */ /* drflac_result_from_errno() is only used for fopen() and wfopen() so putting it inside DR_WAV_NO_STDIO for now. If something else needs this later we can move it out. */ #include static drflac_result drflac_result_from_errno(int e) { switch (e) { case 0: return DRFLAC_SUCCESS; #ifdef EPERM case EPERM: return DRFLAC_INVALID_OPERATION; #endif #ifdef ENOENT case ENOENT: return DRFLAC_DOES_NOT_EXIST; #endif #ifdef ESRCH case ESRCH: return DRFLAC_DOES_NOT_EXIST; #endif #ifdef EINTR case EINTR: return DRFLAC_INTERRUPT; #endif #ifdef EIO case EIO: return DRFLAC_IO_ERROR; #endif #ifdef ENXIO case ENXIO: return DRFLAC_DOES_NOT_EXIST; #endif #ifdef E2BIG case E2BIG: return DRFLAC_INVALID_ARGS; #endif #ifdef ENOEXEC case ENOEXEC: return DRFLAC_INVALID_FILE; #endif #ifdef EBADF case EBADF: return DRFLAC_INVALID_FILE; #endif #ifdef ECHILD case ECHILD: return DRFLAC_ERROR; #endif #ifdef EAGAIN case EAGAIN: return DRFLAC_UNAVAILABLE; #endif #ifdef ENOMEM case ENOMEM: return DRFLAC_OUT_OF_MEMORY; #endif #ifdef EACCES case EACCES: return DRFLAC_ACCESS_DENIED; #endif #ifdef EFAULT case EFAULT: return DRFLAC_BAD_ADDRESS; #endif #ifdef ENOTBLK case ENOTBLK: return DRFLAC_ERROR; #endif #ifdef EBUSY case EBUSY: return DRFLAC_BUSY; #endif #ifdef EEXIST case EEXIST: return DRFLAC_ALREADY_EXISTS; #endif #ifdef EXDEV case EXDEV: return DRFLAC_ERROR; #endif #ifdef ENODEV case ENODEV: return DRFLAC_DOES_NOT_EXIST; #endif #ifdef ENOTDIR case ENOTDIR: return DRFLAC_NOT_DIRECTORY; #endif #ifdef EISDIR case EISDIR: return DRFLAC_IS_DIRECTORY; #endif #ifdef EINVAL case EINVAL: return DRFLAC_INVALID_ARGS; #endif #ifdef ENFILE case ENFILE: return DRFLAC_TOO_MANY_OPEN_FILES; #endif #ifdef EMFILE case EMFILE: return DRFLAC_TOO_MANY_OPEN_FILES; #endif #ifdef ENOTTY case ENOTTY: return DRFLAC_INVALID_OPERATION; #endif #ifdef ETXTBSY case ETXTBSY: return DRFLAC_BUSY; #endif #ifdef EFBIG case EFBIG: return DRFLAC_TOO_BIG; #endif #ifdef ENOSPC case ENOSPC: return DRFLAC_NO_SPACE; #endif #ifdef ESPIPE case ESPIPE: return DRFLAC_BAD_SEEK; #endif #ifdef EROFS case EROFS: return DRFLAC_ACCESS_DENIED; #endif #ifdef EMLINK case EMLINK: return DRFLAC_TOO_MANY_LINKS; #endif #ifdef EPIPE case EPIPE: return DRFLAC_BAD_PIPE; #endif #ifdef EDOM case EDOM: return DRFLAC_OUT_OF_RANGE; #endif #ifdef ERANGE case ERANGE: return DRFLAC_OUT_OF_RANGE; #endif #ifdef EDEADLK case EDEADLK: return DRFLAC_DEADLOCK; #endif #ifdef ENAMETOOLONG case ENAMETOOLONG: return DRFLAC_PATH_TOO_LONG; #endif #ifdef ENOLCK case ENOLCK: return DRFLAC_ERROR; #endif #ifdef ENOSYS case ENOSYS: return DRFLAC_NOT_IMPLEMENTED; #endif #ifdef ENOTEMPTY case ENOTEMPTY: return DRFLAC_DIRECTORY_NOT_EMPTY; #endif #ifdef ELOOP case ELOOP: return DRFLAC_TOO_MANY_LINKS; #endif #ifdef ENOMSG case ENOMSG: return DRFLAC_NO_MESSAGE; #endif #ifdef EIDRM case EIDRM: return DRFLAC_ERROR; #endif #ifdef ECHRNG case ECHRNG: return DRFLAC_ERROR; #endif #ifdef EL2NSYNC case EL2NSYNC: return DRFLAC_ERROR; #endif #ifdef EL3HLT case EL3HLT: return DRFLAC_ERROR; #endif #ifdef EL3RST case EL3RST: return DRFLAC_ERROR; #endif #ifdef ELNRNG case ELNRNG: return DRFLAC_OUT_OF_RANGE; #endif #ifdef EUNATCH case EUNATCH: return DRFLAC_ERROR; #endif #ifdef ENOCSI case ENOCSI: return DRFLAC_ERROR; #endif #ifdef EL2HLT case EL2HLT: return DRFLAC_ERROR; #endif #ifdef EBADE case EBADE: return DRFLAC_ERROR; #endif #ifdef EBADR case EBADR: return DRFLAC_ERROR; #endif #ifdef EXFULL case EXFULL: return DRFLAC_ERROR; #endif #ifdef ENOANO case ENOANO: return DRFLAC_ERROR; #endif #ifdef EBADRQC case EBADRQC: return DRFLAC_ERROR; #endif #ifdef EBADSLT case EBADSLT: return DRFLAC_ERROR; #endif #ifdef EBFONT case EBFONT: return DRFLAC_INVALID_FILE; #endif #ifdef ENOSTR case ENOSTR: return DRFLAC_ERROR; #endif #ifdef ENODATA case ENODATA: return DRFLAC_NO_DATA_AVAILABLE; #endif #ifdef ETIME case ETIME: return DRFLAC_TIMEOUT; #endif #ifdef ENOSR case ENOSR: return DRFLAC_NO_DATA_AVAILABLE; #endif #ifdef ENONET case ENONET: return DRFLAC_NO_NETWORK; #endif #ifdef ENOPKG case ENOPKG: return DRFLAC_ERROR; #endif #ifdef EREMOTE case EREMOTE: return DRFLAC_ERROR; #endif #ifdef ENOLINK case ENOLINK: return DRFLAC_ERROR; #endif #ifdef EADV case EADV: return DRFLAC_ERROR; #endif #ifdef ESRMNT case ESRMNT: return DRFLAC_ERROR; #endif #ifdef ECOMM case ECOMM: return DRFLAC_ERROR; #endif #ifdef EPROTO case EPROTO: return DRFLAC_ERROR; #endif #ifdef EMULTIHOP case EMULTIHOP: return DRFLAC_ERROR; #endif #ifdef EDOTDOT case EDOTDOT: return DRFLAC_ERROR; #endif #ifdef EBADMSG case EBADMSG: return DRFLAC_BAD_MESSAGE; #endif #ifdef EOVERFLOW case EOVERFLOW: return DRFLAC_TOO_BIG; #endif #ifdef ENOTUNIQ case ENOTUNIQ: return DRFLAC_NOT_UNIQUE; #endif #ifdef EBADFD case EBADFD: return DRFLAC_ERROR; #endif #ifdef EREMCHG case EREMCHG: return DRFLAC_ERROR; #endif #ifdef ELIBACC case ELIBACC: return DRFLAC_ACCESS_DENIED; #endif #ifdef ELIBBAD case ELIBBAD: return DRFLAC_INVALID_FILE; #endif #ifdef ELIBSCN case ELIBSCN: return DRFLAC_INVALID_FILE; #endif #ifdef ELIBMAX case ELIBMAX: return DRFLAC_ERROR; #endif #ifdef ELIBEXEC case ELIBEXEC: return DRFLAC_ERROR; #endif #ifdef EILSEQ case EILSEQ: return DRFLAC_INVALID_DATA; #endif #ifdef ERESTART case ERESTART: return DRFLAC_ERROR; #endif #ifdef ESTRPIPE case ESTRPIPE: return DRFLAC_ERROR; #endif #ifdef EUSERS case EUSERS: return DRFLAC_ERROR; #endif #ifdef ENOTSOCK case ENOTSOCK: return DRFLAC_NOT_SOCKET; #endif #ifdef EDESTADDRREQ case EDESTADDRREQ: return DRFLAC_NO_ADDRESS; #endif #ifdef EMSGSIZE case EMSGSIZE: return DRFLAC_TOO_BIG; #endif #ifdef EPROTOTYPE case EPROTOTYPE: return DRFLAC_BAD_PROTOCOL; #endif #ifdef ENOPROTOOPT case ENOPROTOOPT: return DRFLAC_PROTOCOL_UNAVAILABLE; #endif #ifdef EPROTONOSUPPORT case EPROTONOSUPPORT: return DRFLAC_PROTOCOL_NOT_SUPPORTED; #endif #ifdef ESOCKTNOSUPPORT case ESOCKTNOSUPPORT: return DRFLAC_SOCKET_NOT_SUPPORTED; #endif #ifdef EOPNOTSUPP case EOPNOTSUPP: return DRFLAC_INVALID_OPERATION; #endif #ifdef EPFNOSUPPORT case EPFNOSUPPORT: return DRFLAC_PROTOCOL_FAMILY_NOT_SUPPORTED; #endif #ifdef EAFNOSUPPORT case EAFNOSUPPORT: return DRFLAC_ADDRESS_FAMILY_NOT_SUPPORTED; #endif #ifdef EADDRINUSE case EADDRINUSE: return DRFLAC_ALREADY_IN_USE; #endif #ifdef EADDRNOTAVAIL case EADDRNOTAVAIL: return DRFLAC_ERROR; #endif #ifdef ENETDOWN case ENETDOWN: return DRFLAC_NO_NETWORK; #endif #ifdef ENETUNREACH case ENETUNREACH: return DRFLAC_NO_NETWORK; #endif #ifdef ENETRESET case ENETRESET: return DRFLAC_NO_NETWORK; #endif #ifdef ECONNABORTED case ECONNABORTED: return DRFLAC_NO_NETWORK; #endif #ifdef ECONNRESET case ECONNRESET: return DRFLAC_CONNECTION_RESET; #endif #ifdef ENOBUFS case ENOBUFS: return DRFLAC_NO_SPACE; #endif #ifdef EISCONN case EISCONN: return DRFLAC_ALREADY_CONNECTED; #endif #ifdef ENOTCONN case ENOTCONN: return DRFLAC_NOT_CONNECTED; #endif #ifdef ESHUTDOWN case ESHUTDOWN: return DRFLAC_ERROR; #endif #ifdef ETOOMANYREFS case ETOOMANYREFS: return DRFLAC_ERROR; #endif #ifdef ETIMEDOUT case ETIMEDOUT: return DRFLAC_TIMEOUT; #endif #ifdef ECONNREFUSED case ECONNREFUSED: return DRFLAC_CONNECTION_REFUSED; #endif #ifdef EHOSTDOWN case EHOSTDOWN: return DRFLAC_NO_HOST; #endif #ifdef EHOSTUNREACH case EHOSTUNREACH: return DRFLAC_NO_HOST; #endif #ifdef EALREADY case EALREADY: return DRFLAC_IN_PROGRESS; #endif #ifdef EINPROGRESS case EINPROGRESS: return DRFLAC_IN_PROGRESS; #endif #ifdef ESTALE case ESTALE: return DRFLAC_INVALID_FILE; #endif #ifdef EUCLEAN case EUCLEAN: return DRFLAC_ERROR; #endif #ifdef ENOTNAM case ENOTNAM: return DRFLAC_ERROR; #endif #ifdef ENAVAIL case ENAVAIL: return DRFLAC_ERROR; #endif #ifdef EISNAM case EISNAM: return DRFLAC_ERROR; #endif #ifdef EREMOTEIO case EREMOTEIO: return DRFLAC_IO_ERROR; #endif #ifdef EDQUOT case EDQUOT: return DRFLAC_NO_SPACE; #endif #ifdef ENOMEDIUM case ENOMEDIUM: return DRFLAC_DOES_NOT_EXIST; #endif #ifdef EMEDIUMTYPE case EMEDIUMTYPE: return DRFLAC_ERROR; #endif #ifdef ECANCELED case ECANCELED: return DRFLAC_CANCELLED; #endif #ifdef ENOKEY case ENOKEY: return DRFLAC_ERROR; #endif #ifdef EKEYEXPIRED case EKEYEXPIRED: return DRFLAC_ERROR; #endif #ifdef EKEYREVOKED case EKEYREVOKED: return DRFLAC_ERROR; #endif #ifdef EKEYREJECTED case EKEYREJECTED: return DRFLAC_ERROR; #endif #ifdef EOWNERDEAD case EOWNERDEAD: return DRFLAC_ERROR; #endif #ifdef ENOTRECOVERABLE case ENOTRECOVERABLE: return DRFLAC_ERROR; #endif #ifdef ERFKILL case ERFKILL: return DRFLAC_ERROR; #endif #ifdef EHWPOISON case EHWPOISON: return DRFLAC_ERROR; #endif default: return DRFLAC_ERROR; } } static drflac_result drflac_fopen(FILE** ppFile, const char* pFilePath, const char* pOpenMode) { #if defined(_MSC_VER) && _MSC_VER >= 1400 errno_t err; #endif if (ppFile != NULL) { *ppFile = NULL; /* Safety. */ } if (pFilePath == NULL || pOpenMode == NULL || ppFile == NULL) { return DRFLAC_INVALID_ARGS; } #if defined(_MSC_VER) && _MSC_VER >= 1400 err = fopen_s(ppFile, pFilePath, pOpenMode); if (err != 0) { return drflac_result_from_errno(err); } #else #if defined(_WIN32) || defined(__APPLE__) *ppFile = fopen(pFilePath, pOpenMode); #else #if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64 && defined(_LARGEFILE64_SOURCE) *ppFile = fopen64(pFilePath, pOpenMode); #else *ppFile = fopen(pFilePath, pOpenMode); #endif #endif if (*ppFile == NULL) { drflac_result result = drflac_result_from_errno(errno); if (result == DRFLAC_SUCCESS) { result = DRFLAC_ERROR; /* Just a safety check to make sure we never ever return success when pFile == NULL. */ } return result; } #endif return DRFLAC_SUCCESS; } /* _wfopen() isn't always available in all compilation environments. * Windows only. * MSVC seems to support it universally as far back as VC6 from what I can tell (haven't checked further back). * MinGW-64 (both 32- and 64-bit) seems to support it. * MinGW wraps it in !defined(__STRICT_ANSI__). * OpenWatcom wraps it in !defined(_NO_EXT_KEYS). This can be reviewed as compatibility issues arise. The preference is to use _wfopen_s() and _wfopen() as opposed to the wcsrtombs() fallback, so if you notice your compiler not detecting this properly I'm happy to look at adding support. */ #if defined(_WIN32) #if defined(_MSC_VER) || defined(__MINGW64__) || (!defined(__STRICT_ANSI__) && !defined(_NO_EXT_KEYS)) #define DRFLAC_HAS_WFOPEN #endif #endif static drflac_result drflac_wfopen(FILE** ppFile, const wchar_t* pFilePath, const wchar_t* pOpenMode, const drflac_allocation_callbacks* pAllocationCallbacks) { if (ppFile != NULL) { *ppFile = NULL; /* Safety. */ } if (pFilePath == NULL || pOpenMode == NULL || ppFile == NULL) { return DRFLAC_INVALID_ARGS; } #if defined(DRFLAC_HAS_WFOPEN) { /* Use _wfopen() on Windows. */ #if defined(_MSC_VER) && _MSC_VER >= 1400 errno_t err = _wfopen_s(ppFile, pFilePath, pOpenMode); if (err != 0) { return drflac_result_from_errno(err); } #else *ppFile = _wfopen(pFilePath, pOpenMode); if (*ppFile == NULL) { return drflac_result_from_errno(errno); } #endif (void)pAllocationCallbacks; } #else /* Use fopen() on anything other than Windows. Requires a conversion. This is annoying because fopen() is locale specific. The only real way I can think of to do this is with wcsrtombs(). Note that wcstombs() is apparently not thread-safe because it uses a static global mbstate_t object for maintaining state. I've checked this with -std=c89 and it works, but if somebody get's a compiler error I'll look into improving compatibility. */ { mbstate_t mbs; size_t lenMB; const wchar_t* pFilePathTemp = pFilePath; char* pFilePathMB = NULL; char pOpenModeMB[32] = {0}; /* Get the length first. */ DRFLAC_ZERO_OBJECT(&mbs); lenMB = wcsrtombs(NULL, &pFilePathTemp, 0, &mbs); if (lenMB == (size_t)-1) { return drflac_result_from_errno(errno); } pFilePathMB = (char*)drflac__malloc_from_callbacks(lenMB + 1, pAllocationCallbacks); if (pFilePathMB == NULL) { return DRFLAC_OUT_OF_MEMORY; } pFilePathTemp = pFilePath; DRFLAC_ZERO_OBJECT(&mbs); wcsrtombs(pFilePathMB, &pFilePathTemp, lenMB + 1, &mbs); /* The open mode should always consist of ASCII characters so we should be able to do a trivial conversion. */ { size_t i = 0; for (;;) { if (pOpenMode[i] == 0) { pOpenModeMB[i] = '\0'; break; } pOpenModeMB[i] = (char)pOpenMode[i]; i += 1; } } *ppFile = fopen(pFilePathMB, pOpenModeMB); drflac__free_from_callbacks(pFilePathMB, pAllocationCallbacks); } if (*ppFile == NULL) { return DRFLAC_ERROR; } #endif return DRFLAC_SUCCESS; } static size_t drflac__on_read_stdio(void* pUserData, void* bufferOut, size_t bytesToRead) { return fread(bufferOut, 1, bytesToRead, (FILE*)pUserData); } static drflac_bool32 drflac__on_seek_stdio(void* pUserData, int offset, drflac_seek_origin origin) { DRFLAC_ASSERT(offset >= 0); /* <-- Never seek backwards. */ return fseek((FILE*)pUserData, offset, (origin == drflac_seek_origin_current) ? SEEK_CUR : SEEK_SET) == 0; } DRFLAC_API drflac* drflac_open_file(const char* pFileName, const drflac_allocation_callbacks* pAllocationCallbacks) { drflac* pFlac; FILE* pFile; if (drflac_fopen(&pFile, pFileName, "rb") != DRFLAC_SUCCESS) { return NULL; } pFlac = drflac_open(drflac__on_read_stdio, drflac__on_seek_stdio, (void*)pFile, pAllocationCallbacks); if (pFlac == NULL) { fclose(pFile); return NULL; } return pFlac; } DRFLAC_API drflac* drflac_open_file_w(const wchar_t* pFileName, const drflac_allocation_callbacks* pAllocationCallbacks) { drflac* pFlac; FILE* pFile; if (drflac_wfopen(&pFile, pFileName, L"rb", pAllocationCallbacks) != DRFLAC_SUCCESS) { return NULL; } pFlac = drflac_open(drflac__on_read_stdio, drflac__on_seek_stdio, (void*)pFile, pAllocationCallbacks); if (pFlac == NULL) { fclose(pFile); return NULL; } return pFlac; } DRFLAC_API drflac* drflac_open_file_with_metadata(const char* pFileName, drflac_meta_proc onMeta, void* pUserData, const drflac_allocation_callbacks* pAllocationCallbacks) { drflac* pFlac; FILE* pFile; if (drflac_fopen(&pFile, pFileName, "rb") != DRFLAC_SUCCESS) { return NULL; } pFlac = drflac_open_with_metadata_private(drflac__on_read_stdio, drflac__on_seek_stdio, onMeta, drflac_container_unknown, (void*)pFile, pUserData, pAllocationCallbacks); if (pFlac == NULL) { fclose(pFile); return pFlac; } return pFlac; } DRFLAC_API drflac* drflac_open_file_with_metadata_w(const wchar_t* pFileName, drflac_meta_proc onMeta, void* pUserData, const drflac_allocation_callbacks* pAllocationCallbacks) { drflac* pFlac; FILE* pFile; if (drflac_wfopen(&pFile, pFileName, L"rb", pAllocationCallbacks) != DRFLAC_SUCCESS) { return NULL; } pFlac = drflac_open_with_metadata_private(drflac__on_read_stdio, drflac__on_seek_stdio, onMeta, drflac_container_unknown, (void*)pFile, pUserData, pAllocationCallbacks); if (pFlac == NULL) { fclose(pFile); return pFlac; } return pFlac; } #endif /* DR_FLAC_NO_STDIO */ static size_t drflac__on_read_memory(void* pUserData, void* bufferOut, size_t bytesToRead) { drflac__memory_stream* memoryStream = (drflac__memory_stream*)pUserData; size_t bytesRemaining; DRFLAC_ASSERT(memoryStream != NULL); DRFLAC_ASSERT(memoryStream->dataSize >= memoryStream->currentReadPos); bytesRemaining = memoryStream->dataSize - memoryStream->currentReadPos; if (bytesToRead > bytesRemaining) { bytesToRead = bytesRemaining; } if (bytesToRead > 0) { DRFLAC_COPY_MEMORY(bufferOut, memoryStream->data + memoryStream->currentReadPos, bytesToRead); memoryStream->currentReadPos += bytesToRead; } return bytesToRead; } static drflac_bool32 drflac__on_seek_memory(void* pUserData, int offset, drflac_seek_origin origin) { drflac__memory_stream* memoryStream = (drflac__memory_stream*)pUserData; DRFLAC_ASSERT(memoryStream != NULL); DRFLAC_ASSERT(offset >= 0); /* <-- Never seek backwards. */ if (offset > (drflac_int64)memoryStream->dataSize) { return DRFLAC_FALSE; } if (origin == drflac_seek_origin_current) { if (memoryStream->currentReadPos + offset <= memoryStream->dataSize) { memoryStream->currentReadPos += offset; } else { return DRFLAC_FALSE; /* Trying to seek too far forward. */ } } else { if ((drflac_uint32)offset <= memoryStream->dataSize) { memoryStream->currentReadPos = offset; } else { return DRFLAC_FALSE; /* Trying to seek too far forward. */ } } return DRFLAC_TRUE; } DRFLAC_API drflac* drflac_open_memory(const void* pData, size_t dataSize, const drflac_allocation_callbacks* pAllocationCallbacks) { drflac__memory_stream memoryStream; drflac* pFlac; memoryStream.data = (const drflac_uint8*)pData; memoryStream.dataSize = dataSize; memoryStream.currentReadPos = 0; pFlac = drflac_open(drflac__on_read_memory, drflac__on_seek_memory, &memoryStream, pAllocationCallbacks); if (pFlac == NULL) { return NULL; } pFlac->memoryStream = memoryStream; /* This is an awful hack... */ #ifndef DR_FLAC_NO_OGG if (pFlac->container == drflac_container_ogg) { drflac_oggbs* oggbs = (drflac_oggbs*)pFlac->_oggbs; oggbs->pUserData = &pFlac->memoryStream; } else #endif { pFlac->bs.pUserData = &pFlac->memoryStream; } return pFlac; } DRFLAC_API drflac* drflac_open_memory_with_metadata(const void* pData, size_t dataSize, drflac_meta_proc onMeta, void* pUserData, const drflac_allocation_callbacks* pAllocationCallbacks) { drflac__memory_stream memoryStream; drflac* pFlac; memoryStream.data = (const drflac_uint8*)pData; memoryStream.dataSize = dataSize; memoryStream.currentReadPos = 0; pFlac = drflac_open_with_metadata_private(drflac__on_read_memory, drflac__on_seek_memory, onMeta, drflac_container_unknown, &memoryStream, pUserData, pAllocationCallbacks); if (pFlac == NULL) { return NULL; } pFlac->memoryStream = memoryStream; /* This is an awful hack... */ #ifndef DR_FLAC_NO_OGG if (pFlac->container == drflac_container_ogg) { drflac_oggbs* oggbs = (drflac_oggbs*)pFlac->_oggbs; oggbs->pUserData = &pFlac->memoryStream; } else #endif { pFlac->bs.pUserData = &pFlac->memoryStream; } return pFlac; } DRFLAC_API drflac* drflac_open(drflac_read_proc onRead, drflac_seek_proc onSeek, void* pUserData, const drflac_allocation_callbacks* pAllocationCallbacks) { return drflac_open_with_metadata_private(onRead, onSeek, NULL, drflac_container_unknown, pUserData, pUserData, pAllocationCallbacks); } DRFLAC_API drflac* drflac_open_relaxed(drflac_read_proc onRead, drflac_seek_proc onSeek, drflac_container container, void* pUserData, const drflac_allocation_callbacks* pAllocationCallbacks) { return drflac_open_with_metadata_private(onRead, onSeek, NULL, container, pUserData, pUserData, pAllocationCallbacks); } DRFLAC_API drflac* drflac_open_with_metadata(drflac_read_proc onRead, drflac_seek_proc onSeek, drflac_meta_proc onMeta, void* pUserData, const drflac_allocation_callbacks* pAllocationCallbacks) { return drflac_open_with_metadata_private(onRead, onSeek, onMeta, drflac_container_unknown, pUserData, pUserData, pAllocationCallbacks); } DRFLAC_API drflac* drflac_open_with_metadata_relaxed(drflac_read_proc onRead, drflac_seek_proc onSeek, drflac_meta_proc onMeta, drflac_container container, void* pUserData, const drflac_allocation_callbacks* pAllocationCallbacks) { return drflac_open_with_metadata_private(onRead, onSeek, onMeta, container, pUserData, pUserData, pAllocationCallbacks); } DRFLAC_API void drflac_close(drflac* pFlac) { if (pFlac == NULL) { return; } #ifndef DR_FLAC_NO_STDIO /* If we opened the file with drflac_open_file() we will want to close the file handle. We can know whether or not drflac_open_file() was used by looking at the callbacks. */ if (pFlac->bs.onRead == drflac__on_read_stdio) { fclose((FILE*)pFlac->bs.pUserData); } #ifndef DR_FLAC_NO_OGG /* Need to clean up Ogg streams a bit differently due to the way the bit streaming is chained. */ if (pFlac->container == drflac_container_ogg) { drflac_oggbs* oggbs = (drflac_oggbs*)pFlac->_oggbs; DRFLAC_ASSERT(pFlac->bs.onRead == drflac__on_read_ogg); if (oggbs->onRead == drflac__on_read_stdio) { fclose((FILE*)oggbs->pUserData); } } #endif #endif drflac__free_from_callbacks(pFlac, &pFlac->allocationCallbacks); } #if 0 static DRFLAC_INLINE void drflac_read_pcm_frames_s32__decode_left_side__reference(drflac* pFlac, drflac_uint64 frameCount, drflac_uint32 unusedBitsPerSample, const drflac_int32* pInputSamples0, const drflac_int32* pInputSamples1, drflac_int32* pOutputSamples) { drflac_uint64 i; for (i = 0; i < frameCount; ++i) { drflac_uint32 left = (drflac_uint32)pInputSamples0[i] << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample); drflac_uint32 side = (drflac_uint32)pInputSamples1[i] << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample); drflac_uint32 right = left - side; pOutputSamples[i*2+0] = (drflac_int32)left; pOutputSamples[i*2+1] = (drflac_int32)right; } } #endif static DRFLAC_INLINE void drflac_read_pcm_frames_s32__decode_left_side__scalar(drflac* pFlac, drflac_uint64 frameCount, drflac_uint32 unusedBitsPerSample, const drflac_int32* pInputSamples0, const drflac_int32* pInputSamples1, drflac_int32* pOutputSamples) { drflac_uint64 i; drflac_uint64 frameCount4 = frameCount >> 2; const drflac_uint32* pInputSamples0U32 = (const drflac_uint32*)pInputSamples0; const drflac_uint32* pInputSamples1U32 = (const drflac_uint32*)pInputSamples1; drflac_uint32 shift0 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; drflac_uint32 shift1 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; for (i = 0; i < frameCount4; ++i) { drflac_uint32 left0 = pInputSamples0U32[i*4+0] << shift0; drflac_uint32 left1 = pInputSamples0U32[i*4+1] << shift0; drflac_uint32 left2 = pInputSamples0U32[i*4+2] << shift0; drflac_uint32 left3 = pInputSamples0U32[i*4+3] << shift0; drflac_uint32 side0 = pInputSamples1U32[i*4+0] << shift1; drflac_uint32 side1 = pInputSamples1U32[i*4+1] << shift1; drflac_uint32 side2 = pInputSamples1U32[i*4+2] << shift1; drflac_uint32 side3 = pInputSamples1U32[i*4+3] << shift1; drflac_uint32 right0 = left0 - side0; drflac_uint32 right1 = left1 - side1; drflac_uint32 right2 = left2 - side2; drflac_uint32 right3 = left3 - side3; pOutputSamples[i*8+0] = (drflac_int32)left0; pOutputSamples[i*8+1] = (drflac_int32)right0; pOutputSamples[i*8+2] = (drflac_int32)left1; pOutputSamples[i*8+3] = (drflac_int32)right1; pOutputSamples[i*8+4] = (drflac_int32)left2; pOutputSamples[i*8+5] = (drflac_int32)right2; pOutputSamples[i*8+6] = (drflac_int32)left3; pOutputSamples[i*8+7] = (drflac_int32)right3; } for (i = (frameCount4 << 2); i < frameCount; ++i) { drflac_uint32 left = pInputSamples0U32[i] << shift0; drflac_uint32 side = pInputSamples1U32[i] << shift1; drflac_uint32 right = left - side; pOutputSamples[i*2+0] = (drflac_int32)left; pOutputSamples[i*2+1] = (drflac_int32)right; } } #if defined(DRFLAC_SUPPORT_SSE2) static DRFLAC_INLINE void drflac_read_pcm_frames_s32__decode_left_side__sse2(drflac* pFlac, drflac_uint64 frameCount, drflac_uint32 unusedBitsPerSample, const drflac_int32* pInputSamples0, const drflac_int32* pInputSamples1, drflac_int32* pOutputSamples) { drflac_uint64 i; drflac_uint64 frameCount4 = frameCount >> 2; const drflac_uint32* pInputSamples0U32 = (const drflac_uint32*)pInputSamples0; const drflac_uint32* pInputSamples1U32 = (const drflac_uint32*)pInputSamples1; drflac_uint32 shift0 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; drflac_uint32 shift1 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; DRFLAC_ASSERT(pFlac->bitsPerSample <= 24); for (i = 0; i < frameCount4; ++i) { __m128i left = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples0 + i), shift0); __m128i side = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples1 + i), shift1); __m128i right = _mm_sub_epi32(left, side); _mm_storeu_si128((__m128i*)(pOutputSamples + i*8 + 0), _mm_unpacklo_epi32(left, right)); _mm_storeu_si128((__m128i*)(pOutputSamples + i*8 + 4), _mm_unpackhi_epi32(left, right)); } for (i = (frameCount4 << 2); i < frameCount; ++i) { drflac_uint32 left = pInputSamples0U32[i] << shift0; drflac_uint32 side = pInputSamples1U32[i] << shift1; drflac_uint32 right = left - side; pOutputSamples[i*2+0] = (drflac_int32)left; pOutputSamples[i*2+1] = (drflac_int32)right; } } #endif #if defined(DRFLAC_SUPPORT_NEON) static DRFLAC_INLINE void drflac_read_pcm_frames_s32__decode_left_side__neon(drflac* pFlac, drflac_uint64 frameCount, drflac_uint32 unusedBitsPerSample, const drflac_int32* pInputSamples0, const drflac_int32* pInputSamples1, drflac_int32* pOutputSamples) { drflac_uint64 i; drflac_uint64 frameCount4 = frameCount >> 2; const drflac_uint32* pInputSamples0U32 = (const drflac_uint32*)pInputSamples0; const drflac_uint32* pInputSamples1U32 = (const drflac_uint32*)pInputSamples1; drflac_uint32 shift0 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; drflac_uint32 shift1 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; int32x4_t shift0_4; int32x4_t shift1_4; DRFLAC_ASSERT(pFlac->bitsPerSample <= 24); shift0_4 = vdupq_n_s32(shift0); shift1_4 = vdupq_n_s32(shift1); for (i = 0; i < frameCount4; ++i) { uint32x4_t left; uint32x4_t side; uint32x4_t right; left = vshlq_u32(vld1q_u32(pInputSamples0U32 + i*4), shift0_4); side = vshlq_u32(vld1q_u32(pInputSamples1U32 + i*4), shift1_4); right = vsubq_u32(left, side); drflac__vst2q_u32((drflac_uint32*)pOutputSamples + i*8, vzipq_u32(left, right)); } for (i = (frameCount4 << 2); i < frameCount; ++i) { drflac_uint32 left = pInputSamples0U32[i] << shift0; drflac_uint32 side = pInputSamples1U32[i] << shift1; drflac_uint32 right = left - side; pOutputSamples[i*2+0] = (drflac_int32)left; pOutputSamples[i*2+1] = (drflac_int32)right; } } #endif static DRFLAC_INLINE void drflac_read_pcm_frames_s32__decode_left_side(drflac* pFlac, drflac_uint64 frameCount, drflac_uint32 unusedBitsPerSample, const drflac_int32* pInputSamples0, const drflac_int32* pInputSamples1, drflac_int32* pOutputSamples) { #if defined(DRFLAC_SUPPORT_SSE2) if (drflac__gIsSSE2Supported && pFlac->bitsPerSample <= 24) { drflac_read_pcm_frames_s32__decode_left_side__sse2(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); } else #elif defined(DRFLAC_SUPPORT_NEON) if (drflac__gIsNEONSupported && pFlac->bitsPerSample <= 24) { drflac_read_pcm_frames_s32__decode_left_side__neon(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); } else #endif { /* Scalar fallback. */ #if 0 drflac_read_pcm_frames_s32__decode_left_side__reference(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); #else drflac_read_pcm_frames_s32__decode_left_side__scalar(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); #endif } } #if 0 static DRFLAC_INLINE void drflac_read_pcm_frames_s32__decode_right_side__reference(drflac* pFlac, drflac_uint64 frameCount, drflac_uint32 unusedBitsPerSample, const drflac_int32* pInputSamples0, const drflac_int32* pInputSamples1, drflac_int32* pOutputSamples) { drflac_uint64 i; for (i = 0; i < frameCount; ++i) { drflac_uint32 side = (drflac_uint32)pInputSamples0[i] << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample); drflac_uint32 right = (drflac_uint32)pInputSamples1[i] << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample); drflac_uint32 left = right + side; pOutputSamples[i*2+0] = (drflac_int32)left; pOutputSamples[i*2+1] = (drflac_int32)right; } } #endif static DRFLAC_INLINE void drflac_read_pcm_frames_s32__decode_right_side__scalar(drflac* pFlac, drflac_uint64 frameCount, drflac_uint32 unusedBitsPerSample, const drflac_int32* pInputSamples0, const drflac_int32* pInputSamples1, drflac_int32* pOutputSamples) { drflac_uint64 i; drflac_uint64 frameCount4 = frameCount >> 2; const drflac_uint32* pInputSamples0U32 = (const drflac_uint32*)pInputSamples0; const drflac_uint32* pInputSamples1U32 = (const drflac_uint32*)pInputSamples1; drflac_uint32 shift0 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; drflac_uint32 shift1 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; for (i = 0; i < frameCount4; ++i) { drflac_uint32 side0 = pInputSamples0U32[i*4+0] << shift0; drflac_uint32 side1 = pInputSamples0U32[i*4+1] << shift0; drflac_uint32 side2 = pInputSamples0U32[i*4+2] << shift0; drflac_uint32 side3 = pInputSamples0U32[i*4+3] << shift0; drflac_uint32 right0 = pInputSamples1U32[i*4+0] << shift1; drflac_uint32 right1 = pInputSamples1U32[i*4+1] << shift1; drflac_uint32 right2 = pInputSamples1U32[i*4+2] << shift1; drflac_uint32 right3 = pInputSamples1U32[i*4+3] << shift1; drflac_uint32 left0 = right0 + side0; drflac_uint32 left1 = right1 + side1; drflac_uint32 left2 = right2 + side2; drflac_uint32 left3 = right3 + side3; pOutputSamples[i*8+0] = (drflac_int32)left0; pOutputSamples[i*8+1] = (drflac_int32)right0; pOutputSamples[i*8+2] = (drflac_int32)left1; pOutputSamples[i*8+3] = (drflac_int32)right1; pOutputSamples[i*8+4] = (drflac_int32)left2; pOutputSamples[i*8+5] = (drflac_int32)right2; pOutputSamples[i*8+6] = (drflac_int32)left3; pOutputSamples[i*8+7] = (drflac_int32)right3; } for (i = (frameCount4 << 2); i < frameCount; ++i) { drflac_uint32 side = pInputSamples0U32[i] << shift0; drflac_uint32 right = pInputSamples1U32[i] << shift1; drflac_uint32 left = right + side; pOutputSamples[i*2+0] = (drflac_int32)left; pOutputSamples[i*2+1] = (drflac_int32)right; } } #if defined(DRFLAC_SUPPORT_SSE2) static DRFLAC_INLINE void drflac_read_pcm_frames_s32__decode_right_side__sse2(drflac* pFlac, drflac_uint64 frameCount, drflac_uint32 unusedBitsPerSample, const drflac_int32* pInputSamples0, const drflac_int32* pInputSamples1, drflac_int32* pOutputSamples) { drflac_uint64 i; drflac_uint64 frameCount4 = frameCount >> 2; const drflac_uint32* pInputSamples0U32 = (const drflac_uint32*)pInputSamples0; const drflac_uint32* pInputSamples1U32 = (const drflac_uint32*)pInputSamples1; drflac_uint32 shift0 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; drflac_uint32 shift1 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; DRFLAC_ASSERT(pFlac->bitsPerSample <= 24); for (i = 0; i < frameCount4; ++i) { __m128i side = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples0 + i), shift0); __m128i right = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples1 + i), shift1); __m128i left = _mm_add_epi32(right, side); _mm_storeu_si128((__m128i*)(pOutputSamples + i*8 + 0), _mm_unpacklo_epi32(left, right)); _mm_storeu_si128((__m128i*)(pOutputSamples + i*8 + 4), _mm_unpackhi_epi32(left, right)); } for (i = (frameCount4 << 2); i < frameCount; ++i) { drflac_uint32 side = pInputSamples0U32[i] << shift0; drflac_uint32 right = pInputSamples1U32[i] << shift1; drflac_uint32 left = right + side; pOutputSamples[i*2+0] = (drflac_int32)left; pOutputSamples[i*2+1] = (drflac_int32)right; } } #endif #if defined(DRFLAC_SUPPORT_NEON) static DRFLAC_INLINE void drflac_read_pcm_frames_s32__decode_right_side__neon(drflac* pFlac, drflac_uint64 frameCount, drflac_uint32 unusedBitsPerSample, const drflac_int32* pInputSamples0, const drflac_int32* pInputSamples1, drflac_int32* pOutputSamples) { drflac_uint64 i; drflac_uint64 frameCount4 = frameCount >> 2; const drflac_uint32* pInputSamples0U32 = (const drflac_uint32*)pInputSamples0; const drflac_uint32* pInputSamples1U32 = (const drflac_uint32*)pInputSamples1; drflac_uint32 shift0 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; drflac_uint32 shift1 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; int32x4_t shift0_4; int32x4_t shift1_4; DRFLAC_ASSERT(pFlac->bitsPerSample <= 24); shift0_4 = vdupq_n_s32(shift0); shift1_4 = vdupq_n_s32(shift1); for (i = 0; i < frameCount4; ++i) { uint32x4_t side; uint32x4_t right; uint32x4_t left; side = vshlq_u32(vld1q_u32(pInputSamples0U32 + i*4), shift0_4); right = vshlq_u32(vld1q_u32(pInputSamples1U32 + i*4), shift1_4); left = vaddq_u32(right, side); drflac__vst2q_u32((drflac_uint32*)pOutputSamples + i*8, vzipq_u32(left, right)); } for (i = (frameCount4 << 2); i < frameCount; ++i) { drflac_uint32 side = pInputSamples0U32[i] << shift0; drflac_uint32 right = pInputSamples1U32[i] << shift1; drflac_uint32 left = right + side; pOutputSamples[i*2+0] = (drflac_int32)left; pOutputSamples[i*2+1] = (drflac_int32)right; } } #endif static DRFLAC_INLINE void drflac_read_pcm_frames_s32__decode_right_side(drflac* pFlac, drflac_uint64 frameCount, drflac_uint32 unusedBitsPerSample, const drflac_int32* pInputSamples0, const drflac_int32* pInputSamples1, drflac_int32* pOutputSamples) { #if defined(DRFLAC_SUPPORT_SSE2) if (drflac__gIsSSE2Supported && pFlac->bitsPerSample <= 24) { drflac_read_pcm_frames_s32__decode_right_side__sse2(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); } else #elif defined(DRFLAC_SUPPORT_NEON) if (drflac__gIsNEONSupported && pFlac->bitsPerSample <= 24) { drflac_read_pcm_frames_s32__decode_right_side__neon(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); } else #endif { /* Scalar fallback. */ #if 0 drflac_read_pcm_frames_s32__decode_right_side__reference(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); #else drflac_read_pcm_frames_s32__decode_right_side__scalar(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); #endif } } #if 0 static DRFLAC_INLINE void drflac_read_pcm_frames_s32__decode_mid_side__reference(drflac* pFlac, drflac_uint64 frameCount, drflac_uint32 unusedBitsPerSample, const drflac_int32* pInputSamples0, const drflac_int32* pInputSamples1, drflac_int32* pOutputSamples) { for (drflac_uint64 i = 0; i < frameCount; ++i) { drflac_uint32 mid = pInputSamples0U32[i] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; drflac_uint32 side = pInputSamples1U32[i] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; mid = (mid << 1) | (side & 0x01); pOutputSamples[i*2+0] = (drflac_int32)((drflac_uint32)((drflac_int32)(mid + side) >> 1) << unusedBitsPerSample); pOutputSamples[i*2+1] = (drflac_int32)((drflac_uint32)((drflac_int32)(mid - side) >> 1) << unusedBitsPerSample); } } #endif static DRFLAC_INLINE void drflac_read_pcm_frames_s32__decode_mid_side__scalar(drflac* pFlac, drflac_uint64 frameCount, drflac_uint32 unusedBitsPerSample, const drflac_int32* pInputSamples0, const drflac_int32* pInputSamples1, drflac_int32* pOutputSamples) { drflac_uint64 i; drflac_uint64 frameCount4 = frameCount >> 2; const drflac_uint32* pInputSamples0U32 = (const drflac_uint32*)pInputSamples0; const drflac_uint32* pInputSamples1U32 = (const drflac_uint32*)pInputSamples1; drflac_int32 shift = unusedBitsPerSample; if (shift > 0) { shift -= 1; for (i = 0; i < frameCount4; ++i) { drflac_uint32 temp0L; drflac_uint32 temp1L; drflac_uint32 temp2L; drflac_uint32 temp3L; drflac_uint32 temp0R; drflac_uint32 temp1R; drflac_uint32 temp2R; drflac_uint32 temp3R; drflac_uint32 mid0 = pInputSamples0U32[i*4+0] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; drflac_uint32 mid1 = pInputSamples0U32[i*4+1] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; drflac_uint32 mid2 = pInputSamples0U32[i*4+2] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; drflac_uint32 mid3 = pInputSamples0U32[i*4+3] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; drflac_uint32 side0 = pInputSamples1U32[i*4+0] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; drflac_uint32 side1 = pInputSamples1U32[i*4+1] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; drflac_uint32 side2 = pInputSamples1U32[i*4+2] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; drflac_uint32 side3 = pInputSamples1U32[i*4+3] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; mid0 = (mid0 << 1) | (side0 & 0x01); mid1 = (mid1 << 1) | (side1 & 0x01); mid2 = (mid2 << 1) | (side2 & 0x01); mid3 = (mid3 << 1) | (side3 & 0x01); temp0L = (mid0 + side0) << shift; temp1L = (mid1 + side1) << shift; temp2L = (mid2 + side2) << shift; temp3L = (mid3 + side3) << shift; temp0R = (mid0 - side0) << shift; temp1R = (mid1 - side1) << shift; temp2R = (mid2 - side2) << shift; temp3R = (mid3 - side3) << shift; pOutputSamples[i*8+0] = (drflac_int32)temp0L; pOutputSamples[i*8+1] = (drflac_int32)temp0R; pOutputSamples[i*8+2] = (drflac_int32)temp1L; pOutputSamples[i*8+3] = (drflac_int32)temp1R; pOutputSamples[i*8+4] = (drflac_int32)temp2L; pOutputSamples[i*8+5] = (drflac_int32)temp2R; pOutputSamples[i*8+6] = (drflac_int32)temp3L; pOutputSamples[i*8+7] = (drflac_int32)temp3R; } } else { for (i = 0; i < frameCount4; ++i) { drflac_uint32 temp0L; drflac_uint32 temp1L; drflac_uint32 temp2L; drflac_uint32 temp3L; drflac_uint32 temp0R; drflac_uint32 temp1R; drflac_uint32 temp2R; drflac_uint32 temp3R; drflac_uint32 mid0 = pInputSamples0U32[i*4+0] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; drflac_uint32 mid1 = pInputSamples0U32[i*4+1] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; drflac_uint32 mid2 = pInputSamples0U32[i*4+2] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; drflac_uint32 mid3 = pInputSamples0U32[i*4+3] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; drflac_uint32 side0 = pInputSamples1U32[i*4+0] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; drflac_uint32 side1 = pInputSamples1U32[i*4+1] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; drflac_uint32 side2 = pInputSamples1U32[i*4+2] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; drflac_uint32 side3 = pInputSamples1U32[i*4+3] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; mid0 = (mid0 << 1) | (side0 & 0x01); mid1 = (mid1 << 1) | (side1 & 0x01); mid2 = (mid2 << 1) | (side2 & 0x01); mid3 = (mid3 << 1) | (side3 & 0x01); temp0L = (drflac_uint32)((drflac_int32)(mid0 + side0) >> 1); temp1L = (drflac_uint32)((drflac_int32)(mid1 + side1) >> 1); temp2L = (drflac_uint32)((drflac_int32)(mid2 + side2) >> 1); temp3L = (drflac_uint32)((drflac_int32)(mid3 + side3) >> 1); temp0R = (drflac_uint32)((drflac_int32)(mid0 - side0) >> 1); temp1R = (drflac_uint32)((drflac_int32)(mid1 - side1) >> 1); temp2R = (drflac_uint32)((drflac_int32)(mid2 - side2) >> 1); temp3R = (drflac_uint32)((drflac_int32)(mid3 - side3) >> 1); pOutputSamples[i*8+0] = (drflac_int32)temp0L; pOutputSamples[i*8+1] = (drflac_int32)temp0R; pOutputSamples[i*8+2] = (drflac_int32)temp1L; pOutputSamples[i*8+3] = (drflac_int32)temp1R; pOutputSamples[i*8+4] = (drflac_int32)temp2L; pOutputSamples[i*8+5] = (drflac_int32)temp2R; pOutputSamples[i*8+6] = (drflac_int32)temp3L; pOutputSamples[i*8+7] = (drflac_int32)temp3R; } } for (i = (frameCount4 << 2); i < frameCount; ++i) { drflac_uint32 mid = pInputSamples0U32[i] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; drflac_uint32 side = pInputSamples1U32[i] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; mid = (mid << 1) | (side & 0x01); pOutputSamples[i*2+0] = (drflac_int32)((drflac_uint32)((drflac_int32)(mid + side) >> 1) << unusedBitsPerSample); pOutputSamples[i*2+1] = (drflac_int32)((drflac_uint32)((drflac_int32)(mid - side) >> 1) << unusedBitsPerSample); } } #if defined(DRFLAC_SUPPORT_SSE2) static DRFLAC_INLINE void drflac_read_pcm_frames_s32__decode_mid_side__sse2(drflac* pFlac, drflac_uint64 frameCount, drflac_uint32 unusedBitsPerSample, const drflac_int32* pInputSamples0, const drflac_int32* pInputSamples1, drflac_int32* pOutputSamples) { drflac_uint64 i; drflac_uint64 frameCount4 = frameCount >> 2; const drflac_uint32* pInputSamples0U32 = (const drflac_uint32*)pInputSamples0; const drflac_uint32* pInputSamples1U32 = (const drflac_uint32*)pInputSamples1; drflac_int32 shift = unusedBitsPerSample; DRFLAC_ASSERT(pFlac->bitsPerSample <= 24); if (shift == 0) { for (i = 0; i < frameCount4; ++i) { __m128i mid; __m128i side; __m128i left; __m128i right; mid = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples0 + i), pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample); side = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples1 + i), pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample); mid = _mm_or_si128(_mm_slli_epi32(mid, 1), _mm_and_si128(side, _mm_set1_epi32(0x01))); left = _mm_srai_epi32(_mm_add_epi32(mid, side), 1); right = _mm_srai_epi32(_mm_sub_epi32(mid, side), 1); _mm_storeu_si128((__m128i*)(pOutputSamples + i*8 + 0), _mm_unpacklo_epi32(left, right)); _mm_storeu_si128((__m128i*)(pOutputSamples + i*8 + 4), _mm_unpackhi_epi32(left, right)); } for (i = (frameCount4 << 2); i < frameCount; ++i) { drflac_uint32 mid = pInputSamples0U32[i] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; drflac_uint32 side = pInputSamples1U32[i] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; mid = (mid << 1) | (side & 0x01); pOutputSamples[i*2+0] = (drflac_int32)(mid + side) >> 1; pOutputSamples[i*2+1] = (drflac_int32)(mid - side) >> 1; } } else { shift -= 1; for (i = 0; i < frameCount4; ++i) { __m128i mid; __m128i side; __m128i left; __m128i right; mid = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples0 + i), pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample); side = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples1 + i), pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample); mid = _mm_or_si128(_mm_slli_epi32(mid, 1), _mm_and_si128(side, _mm_set1_epi32(0x01))); left = _mm_slli_epi32(_mm_add_epi32(mid, side), shift); right = _mm_slli_epi32(_mm_sub_epi32(mid, side), shift); _mm_storeu_si128((__m128i*)(pOutputSamples + i*8 + 0), _mm_unpacklo_epi32(left, right)); _mm_storeu_si128((__m128i*)(pOutputSamples + i*8 + 4), _mm_unpackhi_epi32(left, right)); } for (i = (frameCount4 << 2); i < frameCount; ++i) { drflac_uint32 mid = pInputSamples0U32[i] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; drflac_uint32 side = pInputSamples1U32[i] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; mid = (mid << 1) | (side & 0x01); pOutputSamples[i*2+0] = (drflac_int32)((mid + side) << shift); pOutputSamples[i*2+1] = (drflac_int32)((mid - side) << shift); } } } #endif #if defined(DRFLAC_SUPPORT_NEON) static DRFLAC_INLINE void drflac_read_pcm_frames_s32__decode_mid_side__neon(drflac* pFlac, drflac_uint64 frameCount, drflac_uint32 unusedBitsPerSample, const drflac_int32* pInputSamples0, const drflac_int32* pInputSamples1, drflac_int32* pOutputSamples) { drflac_uint64 i; drflac_uint64 frameCount4 = frameCount >> 2; const drflac_uint32* pInputSamples0U32 = (const drflac_uint32*)pInputSamples0; const drflac_uint32* pInputSamples1U32 = (const drflac_uint32*)pInputSamples1; drflac_int32 shift = unusedBitsPerSample; int32x4_t wbpsShift0_4; /* wbps = Wasted Bits Per Sample */ int32x4_t wbpsShift1_4; /* wbps = Wasted Bits Per Sample */ uint32x4_t one4; DRFLAC_ASSERT(pFlac->bitsPerSample <= 24); wbpsShift0_4 = vdupq_n_s32(pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample); wbpsShift1_4 = vdupq_n_s32(pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample); one4 = vdupq_n_u32(1); if (shift == 0) { for (i = 0; i < frameCount4; ++i) { uint32x4_t mid; uint32x4_t side; int32x4_t left; int32x4_t right; mid = vshlq_u32(vld1q_u32(pInputSamples0U32 + i*4), wbpsShift0_4); side = vshlq_u32(vld1q_u32(pInputSamples1U32 + i*4), wbpsShift1_4); mid = vorrq_u32(vshlq_n_u32(mid, 1), vandq_u32(side, one4)); left = vshrq_n_s32(vreinterpretq_s32_u32(vaddq_u32(mid, side)), 1); right = vshrq_n_s32(vreinterpretq_s32_u32(vsubq_u32(mid, side)), 1); drflac__vst2q_s32(pOutputSamples + i*8, vzipq_s32(left, right)); } for (i = (frameCount4 << 2); i < frameCount; ++i) { drflac_uint32 mid = pInputSamples0U32[i] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; drflac_uint32 side = pInputSamples1U32[i] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; mid = (mid << 1) | (side & 0x01); pOutputSamples[i*2+0] = (drflac_int32)(mid + side) >> 1; pOutputSamples[i*2+1] = (drflac_int32)(mid - side) >> 1; } } else { int32x4_t shift4; shift -= 1; shift4 = vdupq_n_s32(shift); for (i = 0; i < frameCount4; ++i) { uint32x4_t mid; uint32x4_t side; int32x4_t left; int32x4_t right; mid = vshlq_u32(vld1q_u32(pInputSamples0U32 + i*4), wbpsShift0_4); side = vshlq_u32(vld1q_u32(pInputSamples1U32 + i*4), wbpsShift1_4); mid = vorrq_u32(vshlq_n_u32(mid, 1), vandq_u32(side, one4)); left = vreinterpretq_s32_u32(vshlq_u32(vaddq_u32(mid, side), shift4)); right = vreinterpretq_s32_u32(vshlq_u32(vsubq_u32(mid, side), shift4)); drflac__vst2q_s32(pOutputSamples + i*8, vzipq_s32(left, right)); } for (i = (frameCount4 << 2); i < frameCount; ++i) { drflac_uint32 mid = pInputSamples0U32[i] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; drflac_uint32 side = pInputSamples1U32[i] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; mid = (mid << 1) | (side & 0x01); pOutputSamples[i*2+0] = (drflac_int32)((mid + side) << shift); pOutputSamples[i*2+1] = (drflac_int32)((mid - side) << shift); } } } #endif static DRFLAC_INLINE void drflac_read_pcm_frames_s32__decode_mid_side(drflac* pFlac, drflac_uint64 frameCount, drflac_uint32 unusedBitsPerSample, const drflac_int32* pInputSamples0, const drflac_int32* pInputSamples1, drflac_int32* pOutputSamples) { #if defined(DRFLAC_SUPPORT_SSE2) if (drflac__gIsSSE2Supported && pFlac->bitsPerSample <= 24) { drflac_read_pcm_frames_s32__decode_mid_side__sse2(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); } else #elif defined(DRFLAC_SUPPORT_NEON) if (drflac__gIsNEONSupported && pFlac->bitsPerSample <= 24) { drflac_read_pcm_frames_s32__decode_mid_side__neon(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); } else #endif { /* Scalar fallback. */ #if 0 drflac_read_pcm_frames_s32__decode_mid_side__reference(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); #else drflac_read_pcm_frames_s32__decode_mid_side__scalar(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); #endif } } #if 0 static DRFLAC_INLINE void drflac_read_pcm_frames_s32__decode_independent_stereo__reference(drflac* pFlac, drflac_uint64 frameCount, drflac_uint32 unusedBitsPerSample, const drflac_int32* pInputSamples0, const drflac_int32* pInputSamples1, drflac_int32* pOutputSamples) { for (drflac_uint64 i = 0; i < frameCount; ++i) { pOutputSamples[i*2+0] = (drflac_int32)((drflac_uint32)pInputSamples0[i] << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample)); pOutputSamples[i*2+1] = (drflac_int32)((drflac_uint32)pInputSamples1[i] << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample)); } } #endif static DRFLAC_INLINE void drflac_read_pcm_frames_s32__decode_independent_stereo__scalar(drflac* pFlac, drflac_uint64 frameCount, drflac_uint32 unusedBitsPerSample, const drflac_int32* pInputSamples0, const drflac_int32* pInputSamples1, drflac_int32* pOutputSamples) { drflac_uint64 i; drflac_uint64 frameCount4 = frameCount >> 2; const drflac_uint32* pInputSamples0U32 = (const drflac_uint32*)pInputSamples0; const drflac_uint32* pInputSamples1U32 = (const drflac_uint32*)pInputSamples1; drflac_uint32 shift0 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; drflac_uint32 shift1 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; for (i = 0; i < frameCount4; ++i) { drflac_uint32 tempL0 = pInputSamples0U32[i*4+0] << shift0; drflac_uint32 tempL1 = pInputSamples0U32[i*4+1] << shift0; drflac_uint32 tempL2 = pInputSamples0U32[i*4+2] << shift0; drflac_uint32 tempL3 = pInputSamples0U32[i*4+3] << shift0; drflac_uint32 tempR0 = pInputSamples1U32[i*4+0] << shift1; drflac_uint32 tempR1 = pInputSamples1U32[i*4+1] << shift1; drflac_uint32 tempR2 = pInputSamples1U32[i*4+2] << shift1; drflac_uint32 tempR3 = pInputSamples1U32[i*4+3] << shift1; pOutputSamples[i*8+0] = (drflac_int32)tempL0; pOutputSamples[i*8+1] = (drflac_int32)tempR0; pOutputSamples[i*8+2] = (drflac_int32)tempL1; pOutputSamples[i*8+3] = (drflac_int32)tempR1; pOutputSamples[i*8+4] = (drflac_int32)tempL2; pOutputSamples[i*8+5] = (drflac_int32)tempR2; pOutputSamples[i*8+6] = (drflac_int32)tempL3; pOutputSamples[i*8+7] = (drflac_int32)tempR3; } for (i = (frameCount4 << 2); i < frameCount; ++i) { pOutputSamples[i*2+0] = (drflac_int32)(pInputSamples0U32[i] << shift0); pOutputSamples[i*2+1] = (drflac_int32)(pInputSamples1U32[i] << shift1); } } #if defined(DRFLAC_SUPPORT_SSE2) static DRFLAC_INLINE void drflac_read_pcm_frames_s32__decode_independent_stereo__sse2(drflac* pFlac, drflac_uint64 frameCount, drflac_uint32 unusedBitsPerSample, const drflac_int32* pInputSamples0, const drflac_int32* pInputSamples1, drflac_int32* pOutputSamples) { drflac_uint64 i; drflac_uint64 frameCount4 = frameCount >> 2; const drflac_uint32* pInputSamples0U32 = (const drflac_uint32*)pInputSamples0; const drflac_uint32* pInputSamples1U32 = (const drflac_uint32*)pInputSamples1; drflac_uint32 shift0 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; drflac_uint32 shift1 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; for (i = 0; i < frameCount4; ++i) { __m128i left = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples0 + i), shift0); __m128i right = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples1 + i), shift1); _mm_storeu_si128((__m128i*)(pOutputSamples + i*8 + 0), _mm_unpacklo_epi32(left, right)); _mm_storeu_si128((__m128i*)(pOutputSamples + i*8 + 4), _mm_unpackhi_epi32(left, right)); } for (i = (frameCount4 << 2); i < frameCount; ++i) { pOutputSamples[i*2+0] = (drflac_int32)(pInputSamples0U32[i] << shift0); pOutputSamples[i*2+1] = (drflac_int32)(pInputSamples1U32[i] << shift1); } } #endif #if defined(DRFLAC_SUPPORT_NEON) static DRFLAC_INLINE void drflac_read_pcm_frames_s32__decode_independent_stereo__neon(drflac* pFlac, drflac_uint64 frameCount, drflac_uint32 unusedBitsPerSample, const drflac_int32* pInputSamples0, const drflac_int32* pInputSamples1, drflac_int32* pOutputSamples) { drflac_uint64 i; drflac_uint64 frameCount4 = frameCount >> 2; const drflac_uint32* pInputSamples0U32 = (const drflac_uint32*)pInputSamples0; const drflac_uint32* pInputSamples1U32 = (const drflac_uint32*)pInputSamples1; drflac_uint32 shift0 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; drflac_uint32 shift1 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; int32x4_t shift4_0 = vdupq_n_s32(shift0); int32x4_t shift4_1 = vdupq_n_s32(shift1); for (i = 0; i < frameCount4; ++i) { int32x4_t left; int32x4_t right; left = vreinterpretq_s32_u32(vshlq_u32(vld1q_u32(pInputSamples0U32 + i*4), shift4_0)); right = vreinterpretq_s32_u32(vshlq_u32(vld1q_u32(pInputSamples1U32 + i*4), shift4_1)); drflac__vst2q_s32(pOutputSamples + i*8, vzipq_s32(left, right)); } for (i = (frameCount4 << 2); i < frameCount; ++i) { pOutputSamples[i*2+0] = (drflac_int32)(pInputSamples0U32[i] << shift0); pOutputSamples[i*2+1] = (drflac_int32)(pInputSamples1U32[i] << shift1); } } #endif static DRFLAC_INLINE void drflac_read_pcm_frames_s32__decode_independent_stereo(drflac* pFlac, drflac_uint64 frameCount, drflac_uint32 unusedBitsPerSample, const drflac_int32* pInputSamples0, const drflac_int32* pInputSamples1, drflac_int32* pOutputSamples) { #if defined(DRFLAC_SUPPORT_SSE2) if (drflac__gIsSSE2Supported && pFlac->bitsPerSample <= 24) { drflac_read_pcm_frames_s32__decode_independent_stereo__sse2(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); } else #elif defined(DRFLAC_SUPPORT_NEON) if (drflac__gIsNEONSupported && pFlac->bitsPerSample <= 24) { drflac_read_pcm_frames_s32__decode_independent_stereo__neon(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); } else #endif { /* Scalar fallback. */ #if 0 drflac_read_pcm_frames_s32__decode_independent_stereo__reference(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); #else drflac_read_pcm_frames_s32__decode_independent_stereo__scalar(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); #endif } } DRFLAC_API drflac_uint64 drflac_read_pcm_frames_s32(drflac* pFlac, drflac_uint64 framesToRead, drflac_int32* pBufferOut) { drflac_uint64 framesRead; drflac_uint32 unusedBitsPerSample; if (pFlac == NULL || framesToRead == 0) { return 0; } if (pBufferOut == NULL) { return drflac__seek_forward_by_pcm_frames(pFlac, framesToRead); } DRFLAC_ASSERT(pFlac->bitsPerSample <= 32); unusedBitsPerSample = 32 - pFlac->bitsPerSample; framesRead = 0; while (framesToRead > 0) { /* If we've run out of samples in this frame, go to the next. */ if (pFlac->currentFLACFrame.pcmFramesRemaining == 0) { if (!drflac__read_and_decode_next_flac_frame(pFlac)) { break; /* Couldn't read the next frame, so just break from the loop and return. */ } } else { unsigned int channelCount = drflac__get_channel_count_from_channel_assignment(pFlac->currentFLACFrame.header.channelAssignment); drflac_uint64 iFirstPCMFrame = pFlac->currentFLACFrame.header.blockSizeInPCMFrames - pFlac->currentFLACFrame.pcmFramesRemaining; drflac_uint64 frameCountThisIteration = framesToRead; if (frameCountThisIteration > pFlac->currentFLACFrame.pcmFramesRemaining) { frameCountThisIteration = pFlac->currentFLACFrame.pcmFramesRemaining; } if (channelCount == 2) { const drflac_int32* pDecodedSamples0 = pFlac->currentFLACFrame.subframes[0].pSamplesS32 + iFirstPCMFrame; const drflac_int32* pDecodedSamples1 = pFlac->currentFLACFrame.subframes[1].pSamplesS32 + iFirstPCMFrame; switch (pFlac->currentFLACFrame.header.channelAssignment) { case DRFLAC_CHANNEL_ASSIGNMENT_LEFT_SIDE: { drflac_read_pcm_frames_s32__decode_left_side(pFlac, frameCountThisIteration, unusedBitsPerSample, pDecodedSamples0, pDecodedSamples1, pBufferOut); } break; case DRFLAC_CHANNEL_ASSIGNMENT_RIGHT_SIDE: { drflac_read_pcm_frames_s32__decode_right_side(pFlac, frameCountThisIteration, unusedBitsPerSample, pDecodedSamples0, pDecodedSamples1, pBufferOut); } break; case DRFLAC_CHANNEL_ASSIGNMENT_MID_SIDE: { drflac_read_pcm_frames_s32__decode_mid_side(pFlac, frameCountThisIteration, unusedBitsPerSample, pDecodedSamples0, pDecodedSamples1, pBufferOut); } break; case DRFLAC_CHANNEL_ASSIGNMENT_INDEPENDENT: default: { drflac_read_pcm_frames_s32__decode_independent_stereo(pFlac, frameCountThisIteration, unusedBitsPerSample, pDecodedSamples0, pDecodedSamples1, pBufferOut); } break; } } else { /* Generic interleaving. */ drflac_uint64 i; for (i = 0; i < frameCountThisIteration; ++i) { unsigned int j; for (j = 0; j < channelCount; ++j) { pBufferOut[(i*channelCount)+j] = (drflac_int32)((drflac_uint32)(pFlac->currentFLACFrame.subframes[j].pSamplesS32[iFirstPCMFrame + i]) << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[j].wastedBitsPerSample)); } } } framesRead += frameCountThisIteration; pBufferOut += frameCountThisIteration * channelCount; framesToRead -= frameCountThisIteration; pFlac->currentPCMFrame += frameCountThisIteration; pFlac->currentFLACFrame.pcmFramesRemaining -= (drflac_uint32)frameCountThisIteration; } } return framesRead; } #if 0 static DRFLAC_INLINE void drflac_read_pcm_frames_s16__decode_left_side__reference(drflac* pFlac, drflac_uint64 frameCount, drflac_uint32 unusedBitsPerSample, const drflac_int32* pInputSamples0, const drflac_int32* pInputSamples1, drflac_int16* pOutputSamples) { drflac_uint64 i; for (i = 0; i < frameCount; ++i) { drflac_uint32 left = (drflac_uint32)pInputSamples0[i] << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample); drflac_uint32 side = (drflac_uint32)pInputSamples1[i] << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample); drflac_uint32 right = left - side; left >>= 16; right >>= 16; pOutputSamples[i*2+0] = (drflac_int16)left; pOutputSamples[i*2+1] = (drflac_int16)right; } } #endif static DRFLAC_INLINE void drflac_read_pcm_frames_s16__decode_left_side__scalar(drflac* pFlac, drflac_uint64 frameCount, drflac_uint32 unusedBitsPerSample, const drflac_int32* pInputSamples0, const drflac_int32* pInputSamples1, drflac_int16* pOutputSamples) { drflac_uint64 i; drflac_uint64 frameCount4 = frameCount >> 2; const drflac_uint32* pInputSamples0U32 = (const drflac_uint32*)pInputSamples0; const drflac_uint32* pInputSamples1U32 = (const drflac_uint32*)pInputSamples1; drflac_uint32 shift0 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; drflac_uint32 shift1 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; for (i = 0; i < frameCount4; ++i) { drflac_uint32 left0 = pInputSamples0U32[i*4+0] << shift0; drflac_uint32 left1 = pInputSamples0U32[i*4+1] << shift0; drflac_uint32 left2 = pInputSamples0U32[i*4+2] << shift0; drflac_uint32 left3 = pInputSamples0U32[i*4+3] << shift0; drflac_uint32 side0 = pInputSamples1U32[i*4+0] << shift1; drflac_uint32 side1 = pInputSamples1U32[i*4+1] << shift1; drflac_uint32 side2 = pInputSamples1U32[i*4+2] << shift1; drflac_uint32 side3 = pInputSamples1U32[i*4+3] << shift1; drflac_uint32 right0 = left0 - side0; drflac_uint32 right1 = left1 - side1; drflac_uint32 right2 = left2 - side2; drflac_uint32 right3 = left3 - side3; left0 >>= 16; left1 >>= 16; left2 >>= 16; left3 >>= 16; right0 >>= 16; right1 >>= 16; right2 >>= 16; right3 >>= 16; pOutputSamples[i*8+0] = (drflac_int16)left0; pOutputSamples[i*8+1] = (drflac_int16)right0; pOutputSamples[i*8+2] = (drflac_int16)left1; pOutputSamples[i*8+3] = (drflac_int16)right1; pOutputSamples[i*8+4] = (drflac_int16)left2; pOutputSamples[i*8+5] = (drflac_int16)right2; pOutputSamples[i*8+6] = (drflac_int16)left3; pOutputSamples[i*8+7] = (drflac_int16)right3; } for (i = (frameCount4 << 2); i < frameCount; ++i) { drflac_uint32 left = pInputSamples0U32[i] << shift0; drflac_uint32 side = pInputSamples1U32[i] << shift1; drflac_uint32 right = left - side; left >>= 16; right >>= 16; pOutputSamples[i*2+0] = (drflac_int16)left; pOutputSamples[i*2+1] = (drflac_int16)right; } } #if defined(DRFLAC_SUPPORT_SSE2) static DRFLAC_INLINE void drflac_read_pcm_frames_s16__decode_left_side__sse2(drflac* pFlac, drflac_uint64 frameCount, drflac_uint32 unusedBitsPerSample, const drflac_int32* pInputSamples0, const drflac_int32* pInputSamples1, drflac_int16* pOutputSamples) { drflac_uint64 i; drflac_uint64 frameCount4 = frameCount >> 2; const drflac_uint32* pInputSamples0U32 = (const drflac_uint32*)pInputSamples0; const drflac_uint32* pInputSamples1U32 = (const drflac_uint32*)pInputSamples1; drflac_uint32 shift0 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; drflac_uint32 shift1 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; DRFLAC_ASSERT(pFlac->bitsPerSample <= 24); for (i = 0; i < frameCount4; ++i) { __m128i left = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples0 + i), shift0); __m128i side = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples1 + i), shift1); __m128i right = _mm_sub_epi32(left, side); left = _mm_srai_epi32(left, 16); right = _mm_srai_epi32(right, 16); _mm_storeu_si128((__m128i*)(pOutputSamples + i*8), drflac__mm_packs_interleaved_epi32(left, right)); } for (i = (frameCount4 << 2); i < frameCount; ++i) { drflac_uint32 left = pInputSamples0U32[i] << shift0; drflac_uint32 side = pInputSamples1U32[i] << shift1; drflac_uint32 right = left - side; left >>= 16; right >>= 16; pOutputSamples[i*2+0] = (drflac_int16)left; pOutputSamples[i*2+1] = (drflac_int16)right; } } #endif #if defined(DRFLAC_SUPPORT_NEON) static DRFLAC_INLINE void drflac_read_pcm_frames_s16__decode_left_side__neon(drflac* pFlac, drflac_uint64 frameCount, drflac_uint32 unusedBitsPerSample, const drflac_int32* pInputSamples0, const drflac_int32* pInputSamples1, drflac_int16* pOutputSamples) { drflac_uint64 i; drflac_uint64 frameCount4 = frameCount >> 2; const drflac_uint32* pInputSamples0U32 = (const drflac_uint32*)pInputSamples0; const drflac_uint32* pInputSamples1U32 = (const drflac_uint32*)pInputSamples1; drflac_uint32 shift0 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; drflac_uint32 shift1 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; int32x4_t shift0_4; int32x4_t shift1_4; DRFLAC_ASSERT(pFlac->bitsPerSample <= 24); shift0_4 = vdupq_n_s32(shift0); shift1_4 = vdupq_n_s32(shift1); for (i = 0; i < frameCount4; ++i) { uint32x4_t left; uint32x4_t side; uint32x4_t right; left = vshlq_u32(vld1q_u32(pInputSamples0U32 + i*4), shift0_4); side = vshlq_u32(vld1q_u32(pInputSamples1U32 + i*4), shift1_4); right = vsubq_u32(left, side); left = vshrq_n_u32(left, 16); right = vshrq_n_u32(right, 16); drflac__vst2q_u16((drflac_uint16*)pOutputSamples + i*8, vzip_u16(vmovn_u32(left), vmovn_u32(right))); } for (i = (frameCount4 << 2); i < frameCount; ++i) { drflac_uint32 left = pInputSamples0U32[i] << shift0; drflac_uint32 side = pInputSamples1U32[i] << shift1; drflac_uint32 right = left - side; left >>= 16; right >>= 16; pOutputSamples[i*2+0] = (drflac_int16)left; pOutputSamples[i*2+1] = (drflac_int16)right; } } #endif static DRFLAC_INLINE void drflac_read_pcm_frames_s16__decode_left_side(drflac* pFlac, drflac_uint64 frameCount, drflac_uint32 unusedBitsPerSample, const drflac_int32* pInputSamples0, const drflac_int32* pInputSamples1, drflac_int16* pOutputSamples) { #if defined(DRFLAC_SUPPORT_SSE2) if (drflac__gIsSSE2Supported && pFlac->bitsPerSample <= 24) { drflac_read_pcm_frames_s16__decode_left_side__sse2(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); } else #elif defined(DRFLAC_SUPPORT_NEON) if (drflac__gIsNEONSupported && pFlac->bitsPerSample <= 24) { drflac_read_pcm_frames_s16__decode_left_side__neon(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); } else #endif { /* Scalar fallback. */ #if 0 drflac_read_pcm_frames_s16__decode_left_side__reference(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); #else drflac_read_pcm_frames_s16__decode_left_side__scalar(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); #endif } } #if 0 static DRFLAC_INLINE void drflac_read_pcm_frames_s16__decode_right_side__reference(drflac* pFlac, drflac_uint64 frameCount, drflac_uint32 unusedBitsPerSample, const drflac_int32* pInputSamples0, const drflac_int32* pInputSamples1, drflac_int16* pOutputSamples) { drflac_uint64 i; for (i = 0; i < frameCount; ++i) { drflac_uint32 side = (drflac_uint32)pInputSamples0[i] << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample); drflac_uint32 right = (drflac_uint32)pInputSamples1[i] << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample); drflac_uint32 left = right + side; left >>= 16; right >>= 16; pOutputSamples[i*2+0] = (drflac_int16)left; pOutputSamples[i*2+1] = (drflac_int16)right; } } #endif static DRFLAC_INLINE void drflac_read_pcm_frames_s16__decode_right_side__scalar(drflac* pFlac, drflac_uint64 frameCount, drflac_uint32 unusedBitsPerSample, const drflac_int32* pInputSamples0, const drflac_int32* pInputSamples1, drflac_int16* pOutputSamples) { drflac_uint64 i; drflac_uint64 frameCount4 = frameCount >> 2; const drflac_uint32* pInputSamples0U32 = (const drflac_uint32*)pInputSamples0; const drflac_uint32* pInputSamples1U32 = (const drflac_uint32*)pInputSamples1; drflac_uint32 shift0 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; drflac_uint32 shift1 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; for (i = 0; i < frameCount4; ++i) { drflac_uint32 side0 = pInputSamples0U32[i*4+0] << shift0; drflac_uint32 side1 = pInputSamples0U32[i*4+1] << shift0; drflac_uint32 side2 = pInputSamples0U32[i*4+2] << shift0; drflac_uint32 side3 = pInputSamples0U32[i*4+3] << shift0; drflac_uint32 right0 = pInputSamples1U32[i*4+0] << shift1; drflac_uint32 right1 = pInputSamples1U32[i*4+1] << shift1; drflac_uint32 right2 = pInputSamples1U32[i*4+2] << shift1; drflac_uint32 right3 = pInputSamples1U32[i*4+3] << shift1; drflac_uint32 left0 = right0 + side0; drflac_uint32 left1 = right1 + side1; drflac_uint32 left2 = right2 + side2; drflac_uint32 left3 = right3 + side3; left0 >>= 16; left1 >>= 16; left2 >>= 16; left3 >>= 16; right0 >>= 16; right1 >>= 16; right2 >>= 16; right3 >>= 16; pOutputSamples[i*8+0] = (drflac_int16)left0; pOutputSamples[i*8+1] = (drflac_int16)right0; pOutputSamples[i*8+2] = (drflac_int16)left1; pOutputSamples[i*8+3] = (drflac_int16)right1; pOutputSamples[i*8+4] = (drflac_int16)left2; pOutputSamples[i*8+5] = (drflac_int16)right2; pOutputSamples[i*8+6] = (drflac_int16)left3; pOutputSamples[i*8+7] = (drflac_int16)right3; } for (i = (frameCount4 << 2); i < frameCount; ++i) { drflac_uint32 side = pInputSamples0U32[i] << shift0; drflac_uint32 right = pInputSamples1U32[i] << shift1; drflac_uint32 left = right + side; left >>= 16; right >>= 16; pOutputSamples[i*2+0] = (drflac_int16)left; pOutputSamples[i*2+1] = (drflac_int16)right; } } #if defined(DRFLAC_SUPPORT_SSE2) static DRFLAC_INLINE void drflac_read_pcm_frames_s16__decode_right_side__sse2(drflac* pFlac, drflac_uint64 frameCount, drflac_uint32 unusedBitsPerSample, const drflac_int32* pInputSamples0, const drflac_int32* pInputSamples1, drflac_int16* pOutputSamples) { drflac_uint64 i; drflac_uint64 frameCount4 = frameCount >> 2; const drflac_uint32* pInputSamples0U32 = (const drflac_uint32*)pInputSamples0; const drflac_uint32* pInputSamples1U32 = (const drflac_uint32*)pInputSamples1; drflac_uint32 shift0 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; drflac_uint32 shift1 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; DRFLAC_ASSERT(pFlac->bitsPerSample <= 24); for (i = 0; i < frameCount4; ++i) { __m128i side = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples0 + i), shift0); __m128i right = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples1 + i), shift1); __m128i left = _mm_add_epi32(right, side); left = _mm_srai_epi32(left, 16); right = _mm_srai_epi32(right, 16); _mm_storeu_si128((__m128i*)(pOutputSamples + i*8), drflac__mm_packs_interleaved_epi32(left, right)); } for (i = (frameCount4 << 2); i < frameCount; ++i) { drflac_uint32 side = pInputSamples0U32[i] << shift0; drflac_uint32 right = pInputSamples1U32[i] << shift1; drflac_uint32 left = right + side; left >>= 16; right >>= 16; pOutputSamples[i*2+0] = (drflac_int16)left; pOutputSamples[i*2+1] = (drflac_int16)right; } } #endif #if defined(DRFLAC_SUPPORT_NEON) static DRFLAC_INLINE void drflac_read_pcm_frames_s16__decode_right_side__neon(drflac* pFlac, drflac_uint64 frameCount, drflac_uint32 unusedBitsPerSample, const drflac_int32* pInputSamples0, const drflac_int32* pInputSamples1, drflac_int16* pOutputSamples) { drflac_uint64 i; drflac_uint64 frameCount4 = frameCount >> 2; const drflac_uint32* pInputSamples0U32 = (const drflac_uint32*)pInputSamples0; const drflac_uint32* pInputSamples1U32 = (const drflac_uint32*)pInputSamples1; drflac_uint32 shift0 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; drflac_uint32 shift1 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; int32x4_t shift0_4; int32x4_t shift1_4; DRFLAC_ASSERT(pFlac->bitsPerSample <= 24); shift0_4 = vdupq_n_s32(shift0); shift1_4 = vdupq_n_s32(shift1); for (i = 0; i < frameCount4; ++i) { uint32x4_t side; uint32x4_t right; uint32x4_t left; side = vshlq_u32(vld1q_u32(pInputSamples0U32 + i*4), shift0_4); right = vshlq_u32(vld1q_u32(pInputSamples1U32 + i*4), shift1_4); left = vaddq_u32(right, side); left = vshrq_n_u32(left, 16); right = vshrq_n_u32(right, 16); drflac__vst2q_u16((drflac_uint16*)pOutputSamples + i*8, vzip_u16(vmovn_u32(left), vmovn_u32(right))); } for (i = (frameCount4 << 2); i < frameCount; ++i) { drflac_uint32 side = pInputSamples0U32[i] << shift0; drflac_uint32 right = pInputSamples1U32[i] << shift1; drflac_uint32 left = right + side; left >>= 16; right >>= 16; pOutputSamples[i*2+0] = (drflac_int16)left; pOutputSamples[i*2+1] = (drflac_int16)right; } } #endif static DRFLAC_INLINE void drflac_read_pcm_frames_s16__decode_right_side(drflac* pFlac, drflac_uint64 frameCount, drflac_uint32 unusedBitsPerSample, const drflac_int32* pInputSamples0, const drflac_int32* pInputSamples1, drflac_int16* pOutputSamples) { #if defined(DRFLAC_SUPPORT_SSE2) if (drflac__gIsSSE2Supported && pFlac->bitsPerSample <= 24) { drflac_read_pcm_frames_s16__decode_right_side__sse2(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); } else #elif defined(DRFLAC_SUPPORT_NEON) if (drflac__gIsNEONSupported && pFlac->bitsPerSample <= 24) { drflac_read_pcm_frames_s16__decode_right_side__neon(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); } else #endif { /* Scalar fallback. */ #if 0 drflac_read_pcm_frames_s16__decode_right_side__reference(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); #else drflac_read_pcm_frames_s16__decode_right_side__scalar(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); #endif } } #if 0 static DRFLAC_INLINE void drflac_read_pcm_frames_s16__decode_mid_side__reference(drflac* pFlac, drflac_uint64 frameCount, drflac_uint32 unusedBitsPerSample, const drflac_int32* pInputSamples0, const drflac_int32* pInputSamples1, drflac_int16* pOutputSamples) { for (drflac_uint64 i = 0; i < frameCount; ++i) { drflac_uint32 mid = (drflac_uint32)pInputSamples0[i] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; drflac_uint32 side = (drflac_uint32)pInputSamples1[i] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; mid = (mid << 1) | (side & 0x01); pOutputSamples[i*2+0] = (drflac_int16)(((drflac_uint32)((drflac_int32)(mid + side) >> 1) << unusedBitsPerSample) >> 16); pOutputSamples[i*2+1] = (drflac_int16)(((drflac_uint32)((drflac_int32)(mid - side) >> 1) << unusedBitsPerSample) >> 16); } } #endif static DRFLAC_INLINE void drflac_read_pcm_frames_s16__decode_mid_side__scalar(drflac* pFlac, drflac_uint64 frameCount, drflac_uint32 unusedBitsPerSample, const drflac_int32* pInputSamples0, const drflac_int32* pInputSamples1, drflac_int16* pOutputSamples) { drflac_uint64 i; drflac_uint64 frameCount4 = frameCount >> 2; const drflac_uint32* pInputSamples0U32 = (const drflac_uint32*)pInputSamples0; const drflac_uint32* pInputSamples1U32 = (const drflac_uint32*)pInputSamples1; drflac_uint32 shift = unusedBitsPerSample; if (shift > 0) { shift -= 1; for (i = 0; i < frameCount4; ++i) { drflac_uint32 temp0L; drflac_uint32 temp1L; drflac_uint32 temp2L; drflac_uint32 temp3L; drflac_uint32 temp0R; drflac_uint32 temp1R; drflac_uint32 temp2R; drflac_uint32 temp3R; drflac_uint32 mid0 = pInputSamples0U32[i*4+0] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; drflac_uint32 mid1 = pInputSamples0U32[i*4+1] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; drflac_uint32 mid2 = pInputSamples0U32[i*4+2] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; drflac_uint32 mid3 = pInputSamples0U32[i*4+3] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; drflac_uint32 side0 = pInputSamples1U32[i*4+0] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; drflac_uint32 side1 = pInputSamples1U32[i*4+1] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; drflac_uint32 side2 = pInputSamples1U32[i*4+2] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; drflac_uint32 side3 = pInputSamples1U32[i*4+3] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; mid0 = (mid0 << 1) | (side0 & 0x01); mid1 = (mid1 << 1) | (side1 & 0x01); mid2 = (mid2 << 1) | (side2 & 0x01); mid3 = (mid3 << 1) | (side3 & 0x01); temp0L = (mid0 + side0) << shift; temp1L = (mid1 + side1) << shift; temp2L = (mid2 + side2) << shift; temp3L = (mid3 + side3) << shift; temp0R = (mid0 - side0) << shift; temp1R = (mid1 - side1) << shift; temp2R = (mid2 - side2) << shift; temp3R = (mid3 - side3) << shift; temp0L >>= 16; temp1L >>= 16; temp2L >>= 16; temp3L >>= 16; temp0R >>= 16; temp1R >>= 16; temp2R >>= 16; temp3R >>= 16; pOutputSamples[i*8+0] = (drflac_int16)temp0L; pOutputSamples[i*8+1] = (drflac_int16)temp0R; pOutputSamples[i*8+2] = (drflac_int16)temp1L; pOutputSamples[i*8+3] = (drflac_int16)temp1R; pOutputSamples[i*8+4] = (drflac_int16)temp2L; pOutputSamples[i*8+5] = (drflac_int16)temp2R; pOutputSamples[i*8+6] = (drflac_int16)temp3L; pOutputSamples[i*8+7] = (drflac_int16)temp3R; } } else { for (i = 0; i < frameCount4; ++i) { drflac_uint32 temp0L; drflac_uint32 temp1L; drflac_uint32 temp2L; drflac_uint32 temp3L; drflac_uint32 temp0R; drflac_uint32 temp1R; drflac_uint32 temp2R; drflac_uint32 temp3R; drflac_uint32 mid0 = pInputSamples0U32[i*4+0] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; drflac_uint32 mid1 = pInputSamples0U32[i*4+1] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; drflac_uint32 mid2 = pInputSamples0U32[i*4+2] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; drflac_uint32 mid3 = pInputSamples0U32[i*4+3] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; drflac_uint32 side0 = pInputSamples1U32[i*4+0] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; drflac_uint32 side1 = pInputSamples1U32[i*4+1] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; drflac_uint32 side2 = pInputSamples1U32[i*4+2] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; drflac_uint32 side3 = pInputSamples1U32[i*4+3] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; mid0 = (mid0 << 1) | (side0 & 0x01); mid1 = (mid1 << 1) | (side1 & 0x01); mid2 = (mid2 << 1) | (side2 & 0x01); mid3 = (mid3 << 1) | (side3 & 0x01); temp0L = ((drflac_int32)(mid0 + side0) >> 1); temp1L = ((drflac_int32)(mid1 + side1) >> 1); temp2L = ((drflac_int32)(mid2 + side2) >> 1); temp3L = ((drflac_int32)(mid3 + side3) >> 1); temp0R = ((drflac_int32)(mid0 - side0) >> 1); temp1R = ((drflac_int32)(mid1 - side1) >> 1); temp2R = ((drflac_int32)(mid2 - side2) >> 1); temp3R = ((drflac_int32)(mid3 - side3) >> 1); temp0L >>= 16; temp1L >>= 16; temp2L >>= 16; temp3L >>= 16; temp0R >>= 16; temp1R >>= 16; temp2R >>= 16; temp3R >>= 16; pOutputSamples[i*8+0] = (drflac_int16)temp0L; pOutputSamples[i*8+1] = (drflac_int16)temp0R; pOutputSamples[i*8+2] = (drflac_int16)temp1L; pOutputSamples[i*8+3] = (drflac_int16)temp1R; pOutputSamples[i*8+4] = (drflac_int16)temp2L; pOutputSamples[i*8+5] = (drflac_int16)temp2R; pOutputSamples[i*8+6] = (drflac_int16)temp3L; pOutputSamples[i*8+7] = (drflac_int16)temp3R; } } for (i = (frameCount4 << 2); i < frameCount; ++i) { drflac_uint32 mid = pInputSamples0U32[i] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; drflac_uint32 side = pInputSamples1U32[i] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; mid = (mid << 1) | (side & 0x01); pOutputSamples[i*2+0] = (drflac_int16)(((drflac_uint32)((drflac_int32)(mid + side) >> 1) << unusedBitsPerSample) >> 16); pOutputSamples[i*2+1] = (drflac_int16)(((drflac_uint32)((drflac_int32)(mid - side) >> 1) << unusedBitsPerSample) >> 16); } } #if defined(DRFLAC_SUPPORT_SSE2) static DRFLAC_INLINE void drflac_read_pcm_frames_s16__decode_mid_side__sse2(drflac* pFlac, drflac_uint64 frameCount, drflac_uint32 unusedBitsPerSample, const drflac_int32* pInputSamples0, const drflac_int32* pInputSamples1, drflac_int16* pOutputSamples) { drflac_uint64 i; drflac_uint64 frameCount4 = frameCount >> 2; const drflac_uint32* pInputSamples0U32 = (const drflac_uint32*)pInputSamples0; const drflac_uint32* pInputSamples1U32 = (const drflac_uint32*)pInputSamples1; drflac_uint32 shift = unusedBitsPerSample; DRFLAC_ASSERT(pFlac->bitsPerSample <= 24); if (shift == 0) { for (i = 0; i < frameCount4; ++i) { __m128i mid; __m128i side; __m128i left; __m128i right; mid = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples0 + i), pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample); side = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples1 + i), pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample); mid = _mm_or_si128(_mm_slli_epi32(mid, 1), _mm_and_si128(side, _mm_set1_epi32(0x01))); left = _mm_srai_epi32(_mm_add_epi32(mid, side), 1); right = _mm_srai_epi32(_mm_sub_epi32(mid, side), 1); left = _mm_srai_epi32(left, 16); right = _mm_srai_epi32(right, 16); _mm_storeu_si128((__m128i*)(pOutputSamples + i*8), drflac__mm_packs_interleaved_epi32(left, right)); } for (i = (frameCount4 << 2); i < frameCount; ++i) { drflac_uint32 mid = pInputSamples0U32[i] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; drflac_uint32 side = pInputSamples1U32[i] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; mid = (mid << 1) | (side & 0x01); pOutputSamples[i*2+0] = (drflac_int16)(((drflac_int32)(mid + side) >> 1) >> 16); pOutputSamples[i*2+1] = (drflac_int16)(((drflac_int32)(mid - side) >> 1) >> 16); } } else { shift -= 1; for (i = 0; i < frameCount4; ++i) { __m128i mid; __m128i side; __m128i left; __m128i right; mid = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples0 + i), pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample); side = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples1 + i), pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample); mid = _mm_or_si128(_mm_slli_epi32(mid, 1), _mm_and_si128(side, _mm_set1_epi32(0x01))); left = _mm_slli_epi32(_mm_add_epi32(mid, side), shift); right = _mm_slli_epi32(_mm_sub_epi32(mid, side), shift); left = _mm_srai_epi32(left, 16); right = _mm_srai_epi32(right, 16); _mm_storeu_si128((__m128i*)(pOutputSamples + i*8), drflac__mm_packs_interleaved_epi32(left, right)); } for (i = (frameCount4 << 2); i < frameCount; ++i) { drflac_uint32 mid = pInputSamples0U32[i] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; drflac_uint32 side = pInputSamples1U32[i] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; mid = (mid << 1) | (side & 0x01); pOutputSamples[i*2+0] = (drflac_int16)(((mid + side) << shift) >> 16); pOutputSamples[i*2+1] = (drflac_int16)(((mid - side) << shift) >> 16); } } } #endif #if defined(DRFLAC_SUPPORT_NEON) static DRFLAC_INLINE void drflac_read_pcm_frames_s16__decode_mid_side__neon(drflac* pFlac, drflac_uint64 frameCount, drflac_uint32 unusedBitsPerSample, const drflac_int32* pInputSamples0, const drflac_int32* pInputSamples1, drflac_int16* pOutputSamples) { drflac_uint64 i; drflac_uint64 frameCount4 = frameCount >> 2; const drflac_uint32* pInputSamples0U32 = (const drflac_uint32*)pInputSamples0; const drflac_uint32* pInputSamples1U32 = (const drflac_uint32*)pInputSamples1; drflac_uint32 shift = unusedBitsPerSample; int32x4_t wbpsShift0_4; /* wbps = Wasted Bits Per Sample */ int32x4_t wbpsShift1_4; /* wbps = Wasted Bits Per Sample */ DRFLAC_ASSERT(pFlac->bitsPerSample <= 24); wbpsShift0_4 = vdupq_n_s32(pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample); wbpsShift1_4 = vdupq_n_s32(pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample); if (shift == 0) { for (i = 0; i < frameCount4; ++i) { uint32x4_t mid; uint32x4_t side; int32x4_t left; int32x4_t right; mid = vshlq_u32(vld1q_u32(pInputSamples0U32 + i*4), wbpsShift0_4); side = vshlq_u32(vld1q_u32(pInputSamples1U32 + i*4), wbpsShift1_4); mid = vorrq_u32(vshlq_n_u32(mid, 1), vandq_u32(side, vdupq_n_u32(1))); left = vshrq_n_s32(vreinterpretq_s32_u32(vaddq_u32(mid, side)), 1); right = vshrq_n_s32(vreinterpretq_s32_u32(vsubq_u32(mid, side)), 1); left = vshrq_n_s32(left, 16); right = vshrq_n_s32(right, 16); drflac__vst2q_s16(pOutputSamples + i*8, vzip_s16(vmovn_s32(left), vmovn_s32(right))); } for (i = (frameCount4 << 2); i < frameCount; ++i) { drflac_uint32 mid = pInputSamples0U32[i] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; drflac_uint32 side = pInputSamples1U32[i] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; mid = (mid << 1) | (side & 0x01); pOutputSamples[i*2+0] = (drflac_int16)(((drflac_int32)(mid + side) >> 1) >> 16); pOutputSamples[i*2+1] = (drflac_int16)(((drflac_int32)(mid - side) >> 1) >> 16); } } else { int32x4_t shift4; shift -= 1; shift4 = vdupq_n_s32(shift); for (i = 0; i < frameCount4; ++i) { uint32x4_t mid; uint32x4_t side; int32x4_t left; int32x4_t right; mid = vshlq_u32(vld1q_u32(pInputSamples0U32 + i*4), wbpsShift0_4); side = vshlq_u32(vld1q_u32(pInputSamples1U32 + i*4), wbpsShift1_4); mid = vorrq_u32(vshlq_n_u32(mid, 1), vandq_u32(side, vdupq_n_u32(1))); left = vreinterpretq_s32_u32(vshlq_u32(vaddq_u32(mid, side), shift4)); right = vreinterpretq_s32_u32(vshlq_u32(vsubq_u32(mid, side), shift4)); left = vshrq_n_s32(left, 16); right = vshrq_n_s32(right, 16); drflac__vst2q_s16(pOutputSamples + i*8, vzip_s16(vmovn_s32(left), vmovn_s32(right))); } for (i = (frameCount4 << 2); i < frameCount; ++i) { drflac_uint32 mid = pInputSamples0U32[i] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; drflac_uint32 side = pInputSamples1U32[i] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; mid = (mid << 1) | (side & 0x01); pOutputSamples[i*2+0] = (drflac_int16)(((mid + side) << shift) >> 16); pOutputSamples[i*2+1] = (drflac_int16)(((mid - side) << shift) >> 16); } } } #endif static DRFLAC_INLINE void drflac_read_pcm_frames_s16__decode_mid_side(drflac* pFlac, drflac_uint64 frameCount, drflac_uint32 unusedBitsPerSample, const drflac_int32* pInputSamples0, const drflac_int32* pInputSamples1, drflac_int16* pOutputSamples) { #if defined(DRFLAC_SUPPORT_SSE2) if (drflac__gIsSSE2Supported && pFlac->bitsPerSample <= 24) { drflac_read_pcm_frames_s16__decode_mid_side__sse2(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); } else #elif defined(DRFLAC_SUPPORT_NEON) if (drflac__gIsNEONSupported && pFlac->bitsPerSample <= 24) { drflac_read_pcm_frames_s16__decode_mid_side__neon(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); } else #endif { /* Scalar fallback. */ #if 0 drflac_read_pcm_frames_s16__decode_mid_side__reference(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); #else drflac_read_pcm_frames_s16__decode_mid_side__scalar(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); #endif } } #if 0 static DRFLAC_INLINE void drflac_read_pcm_frames_s16__decode_independent_stereo__reference(drflac* pFlac, drflac_uint64 frameCount, drflac_uint32 unusedBitsPerSample, const drflac_int32* pInputSamples0, const drflac_int32* pInputSamples1, drflac_int16* pOutputSamples) { for (drflac_uint64 i = 0; i < frameCount; ++i) { pOutputSamples[i*2+0] = (drflac_int16)((drflac_int32)((drflac_uint32)pInputSamples0[i] << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample)) >> 16); pOutputSamples[i*2+1] = (drflac_int16)((drflac_int32)((drflac_uint32)pInputSamples1[i] << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample)) >> 16); } } #endif static DRFLAC_INLINE void drflac_read_pcm_frames_s16__decode_independent_stereo__scalar(drflac* pFlac, drflac_uint64 frameCount, drflac_uint32 unusedBitsPerSample, const drflac_int32* pInputSamples0, const drflac_int32* pInputSamples1, drflac_int16* pOutputSamples) { drflac_uint64 i; drflac_uint64 frameCount4 = frameCount >> 2; const drflac_uint32* pInputSamples0U32 = (const drflac_uint32*)pInputSamples0; const drflac_uint32* pInputSamples1U32 = (const drflac_uint32*)pInputSamples1; drflac_uint32 shift0 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; drflac_uint32 shift1 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; for (i = 0; i < frameCount4; ++i) { drflac_uint32 tempL0 = pInputSamples0U32[i*4+0] << shift0; drflac_uint32 tempL1 = pInputSamples0U32[i*4+1] << shift0; drflac_uint32 tempL2 = pInputSamples0U32[i*4+2] << shift0; drflac_uint32 tempL3 = pInputSamples0U32[i*4+3] << shift0; drflac_uint32 tempR0 = pInputSamples1U32[i*4+0] << shift1; drflac_uint32 tempR1 = pInputSamples1U32[i*4+1] << shift1; drflac_uint32 tempR2 = pInputSamples1U32[i*4+2] << shift1; drflac_uint32 tempR3 = pInputSamples1U32[i*4+3] << shift1; tempL0 >>= 16; tempL1 >>= 16; tempL2 >>= 16; tempL3 >>= 16; tempR0 >>= 16; tempR1 >>= 16; tempR2 >>= 16; tempR3 >>= 16; pOutputSamples[i*8+0] = (drflac_int16)tempL0; pOutputSamples[i*8+1] = (drflac_int16)tempR0; pOutputSamples[i*8+2] = (drflac_int16)tempL1; pOutputSamples[i*8+3] = (drflac_int16)tempR1; pOutputSamples[i*8+4] = (drflac_int16)tempL2; pOutputSamples[i*8+5] = (drflac_int16)tempR2; pOutputSamples[i*8+6] = (drflac_int16)tempL3; pOutputSamples[i*8+7] = (drflac_int16)tempR3; } for (i = (frameCount4 << 2); i < frameCount; ++i) { pOutputSamples[i*2+0] = (drflac_int16)((pInputSamples0U32[i] << shift0) >> 16); pOutputSamples[i*2+1] = (drflac_int16)((pInputSamples1U32[i] << shift1) >> 16); } } #if defined(DRFLAC_SUPPORT_SSE2) static DRFLAC_INLINE void drflac_read_pcm_frames_s16__decode_independent_stereo__sse2(drflac* pFlac, drflac_uint64 frameCount, drflac_uint32 unusedBitsPerSample, const drflac_int32* pInputSamples0, const drflac_int32* pInputSamples1, drflac_int16* pOutputSamples) { drflac_uint64 i; drflac_uint64 frameCount4 = frameCount >> 2; const drflac_uint32* pInputSamples0U32 = (const drflac_uint32*)pInputSamples0; const drflac_uint32* pInputSamples1U32 = (const drflac_uint32*)pInputSamples1; drflac_uint32 shift0 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; drflac_uint32 shift1 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; for (i = 0; i < frameCount4; ++i) { __m128i left = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples0 + i), shift0); __m128i right = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples1 + i), shift1); left = _mm_srai_epi32(left, 16); right = _mm_srai_epi32(right, 16); /* At this point we have results. We can now pack and interleave these into a single __m128i object and then store the in the output buffer. */ _mm_storeu_si128((__m128i*)(pOutputSamples + i*8), drflac__mm_packs_interleaved_epi32(left, right)); } for (i = (frameCount4 << 2); i < frameCount; ++i) { pOutputSamples[i*2+0] = (drflac_int16)((pInputSamples0U32[i] << shift0) >> 16); pOutputSamples[i*2+1] = (drflac_int16)((pInputSamples1U32[i] << shift1) >> 16); } } #endif #if defined(DRFLAC_SUPPORT_NEON) static DRFLAC_INLINE void drflac_read_pcm_frames_s16__decode_independent_stereo__neon(drflac* pFlac, drflac_uint64 frameCount, drflac_uint32 unusedBitsPerSample, const drflac_int32* pInputSamples0, const drflac_int32* pInputSamples1, drflac_int16* pOutputSamples) { drflac_uint64 i; drflac_uint64 frameCount4 = frameCount >> 2; const drflac_uint32* pInputSamples0U32 = (const drflac_uint32*)pInputSamples0; const drflac_uint32* pInputSamples1U32 = (const drflac_uint32*)pInputSamples1; drflac_uint32 shift0 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; drflac_uint32 shift1 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; int32x4_t shift0_4 = vdupq_n_s32(shift0); int32x4_t shift1_4 = vdupq_n_s32(shift1); for (i = 0; i < frameCount4; ++i) { int32x4_t left; int32x4_t right; left = vreinterpretq_s32_u32(vshlq_u32(vld1q_u32(pInputSamples0U32 + i*4), shift0_4)); right = vreinterpretq_s32_u32(vshlq_u32(vld1q_u32(pInputSamples1U32 + i*4), shift1_4)); left = vshrq_n_s32(left, 16); right = vshrq_n_s32(right, 16); drflac__vst2q_s16(pOutputSamples + i*8, vzip_s16(vmovn_s32(left), vmovn_s32(right))); } for (i = (frameCount4 << 2); i < frameCount; ++i) { pOutputSamples[i*2+0] = (drflac_int16)((pInputSamples0U32[i] << shift0) >> 16); pOutputSamples[i*2+1] = (drflac_int16)((pInputSamples1U32[i] << shift1) >> 16); } } #endif static DRFLAC_INLINE void drflac_read_pcm_frames_s16__decode_independent_stereo(drflac* pFlac, drflac_uint64 frameCount, drflac_uint32 unusedBitsPerSample, const drflac_int32* pInputSamples0, const drflac_int32* pInputSamples1, drflac_int16* pOutputSamples) { #if defined(DRFLAC_SUPPORT_SSE2) if (drflac__gIsSSE2Supported && pFlac->bitsPerSample <= 24) { drflac_read_pcm_frames_s16__decode_independent_stereo__sse2(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); } else #elif defined(DRFLAC_SUPPORT_NEON) if (drflac__gIsNEONSupported && pFlac->bitsPerSample <= 24) { drflac_read_pcm_frames_s16__decode_independent_stereo__neon(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); } else #endif { /* Scalar fallback. */ #if 0 drflac_read_pcm_frames_s16__decode_independent_stereo__reference(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); #else drflac_read_pcm_frames_s16__decode_independent_stereo__scalar(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); #endif } } DRFLAC_API drflac_uint64 drflac_read_pcm_frames_s16(drflac* pFlac, drflac_uint64 framesToRead, drflac_int16* pBufferOut) { drflac_uint64 framesRead; drflac_uint32 unusedBitsPerSample; if (pFlac == NULL || framesToRead == 0) { return 0; } if (pBufferOut == NULL) { return drflac__seek_forward_by_pcm_frames(pFlac, framesToRead); } DRFLAC_ASSERT(pFlac->bitsPerSample <= 32); unusedBitsPerSample = 32 - pFlac->bitsPerSample; framesRead = 0; while (framesToRead > 0) { /* If we've run out of samples in this frame, go to the next. */ if (pFlac->currentFLACFrame.pcmFramesRemaining == 0) { if (!drflac__read_and_decode_next_flac_frame(pFlac)) { break; /* Couldn't read the next frame, so just break from the loop and return. */ } } else { unsigned int channelCount = drflac__get_channel_count_from_channel_assignment(pFlac->currentFLACFrame.header.channelAssignment); drflac_uint64 iFirstPCMFrame = pFlac->currentFLACFrame.header.blockSizeInPCMFrames - pFlac->currentFLACFrame.pcmFramesRemaining; drflac_uint64 frameCountThisIteration = framesToRead; if (frameCountThisIteration > pFlac->currentFLACFrame.pcmFramesRemaining) { frameCountThisIteration = pFlac->currentFLACFrame.pcmFramesRemaining; } if (channelCount == 2) { const drflac_int32* pDecodedSamples0 = pFlac->currentFLACFrame.subframes[0].pSamplesS32 + iFirstPCMFrame; const drflac_int32* pDecodedSamples1 = pFlac->currentFLACFrame.subframes[1].pSamplesS32 + iFirstPCMFrame; switch (pFlac->currentFLACFrame.header.channelAssignment) { case DRFLAC_CHANNEL_ASSIGNMENT_LEFT_SIDE: { drflac_read_pcm_frames_s16__decode_left_side(pFlac, frameCountThisIteration, unusedBitsPerSample, pDecodedSamples0, pDecodedSamples1, pBufferOut); } break; case DRFLAC_CHANNEL_ASSIGNMENT_RIGHT_SIDE: { drflac_read_pcm_frames_s16__decode_right_side(pFlac, frameCountThisIteration, unusedBitsPerSample, pDecodedSamples0, pDecodedSamples1, pBufferOut); } break; case DRFLAC_CHANNEL_ASSIGNMENT_MID_SIDE: { drflac_read_pcm_frames_s16__decode_mid_side(pFlac, frameCountThisIteration, unusedBitsPerSample, pDecodedSamples0, pDecodedSamples1, pBufferOut); } break; case DRFLAC_CHANNEL_ASSIGNMENT_INDEPENDENT: default: { drflac_read_pcm_frames_s16__decode_independent_stereo(pFlac, frameCountThisIteration, unusedBitsPerSample, pDecodedSamples0, pDecodedSamples1, pBufferOut); } break; } } else { /* Generic interleaving. */ drflac_uint64 i; for (i = 0; i < frameCountThisIteration; ++i) { unsigned int j; for (j = 0; j < channelCount; ++j) { drflac_int32 sampleS32 = (drflac_int32)((drflac_uint32)(pFlac->currentFLACFrame.subframes[j].pSamplesS32[iFirstPCMFrame + i]) << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[j].wastedBitsPerSample)); pBufferOut[(i*channelCount)+j] = (drflac_int16)(sampleS32 >> 16); } } } framesRead += frameCountThisIteration; pBufferOut += frameCountThisIteration * channelCount; framesToRead -= frameCountThisIteration; pFlac->currentPCMFrame += frameCountThisIteration; pFlac->currentFLACFrame.pcmFramesRemaining -= (drflac_uint32)frameCountThisIteration; } } return framesRead; } #if 0 static DRFLAC_INLINE void drflac_read_pcm_frames_f32__decode_left_side__reference(drflac* pFlac, drflac_uint64 frameCount, drflac_uint32 unusedBitsPerSample, const drflac_int32* pInputSamples0, const drflac_int32* pInputSamples1, float* pOutputSamples) { drflac_uint64 i; for (i = 0; i < frameCount; ++i) { drflac_uint32 left = (drflac_uint32)pInputSamples0[i] << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample); drflac_uint32 side = (drflac_uint32)pInputSamples1[i] << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample); drflac_uint32 right = left - side; pOutputSamples[i*2+0] = (float)((drflac_int32)left / 2147483648.0); pOutputSamples[i*2+1] = (float)((drflac_int32)right / 2147483648.0); } } #endif static DRFLAC_INLINE void drflac_read_pcm_frames_f32__decode_left_side__scalar(drflac* pFlac, drflac_uint64 frameCount, drflac_uint32 unusedBitsPerSample, const drflac_int32* pInputSamples0, const drflac_int32* pInputSamples1, float* pOutputSamples) { drflac_uint64 i; drflac_uint64 frameCount4 = frameCount >> 2; const drflac_uint32* pInputSamples0U32 = (const drflac_uint32*)pInputSamples0; const drflac_uint32* pInputSamples1U32 = (const drflac_uint32*)pInputSamples1; drflac_uint32 shift0 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; drflac_uint32 shift1 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; float factor = 1 / 2147483648.0; for (i = 0; i < frameCount4; ++i) { drflac_uint32 left0 = pInputSamples0U32[i*4+0] << shift0; drflac_uint32 left1 = pInputSamples0U32[i*4+1] << shift0; drflac_uint32 left2 = pInputSamples0U32[i*4+2] << shift0; drflac_uint32 left3 = pInputSamples0U32[i*4+3] << shift0; drflac_uint32 side0 = pInputSamples1U32[i*4+0] << shift1; drflac_uint32 side1 = pInputSamples1U32[i*4+1] << shift1; drflac_uint32 side2 = pInputSamples1U32[i*4+2] << shift1; drflac_uint32 side3 = pInputSamples1U32[i*4+3] << shift1; drflac_uint32 right0 = left0 - side0; drflac_uint32 right1 = left1 - side1; drflac_uint32 right2 = left2 - side2; drflac_uint32 right3 = left3 - side3; pOutputSamples[i*8+0] = (drflac_int32)left0 * factor; pOutputSamples[i*8+1] = (drflac_int32)right0 * factor; pOutputSamples[i*8+2] = (drflac_int32)left1 * factor; pOutputSamples[i*8+3] = (drflac_int32)right1 * factor; pOutputSamples[i*8+4] = (drflac_int32)left2 * factor; pOutputSamples[i*8+5] = (drflac_int32)right2 * factor; pOutputSamples[i*8+6] = (drflac_int32)left3 * factor; pOutputSamples[i*8+7] = (drflac_int32)right3 * factor; } for (i = (frameCount4 << 2); i < frameCount; ++i) { drflac_uint32 left = pInputSamples0U32[i] << shift0; drflac_uint32 side = pInputSamples1U32[i] << shift1; drflac_uint32 right = left - side; pOutputSamples[i*2+0] = (drflac_int32)left * factor; pOutputSamples[i*2+1] = (drflac_int32)right * factor; } } #if defined(DRFLAC_SUPPORT_SSE2) static DRFLAC_INLINE void drflac_read_pcm_frames_f32__decode_left_side__sse2(drflac* pFlac, drflac_uint64 frameCount, drflac_uint32 unusedBitsPerSample, const drflac_int32* pInputSamples0, const drflac_int32* pInputSamples1, float* pOutputSamples) { drflac_uint64 i; drflac_uint64 frameCount4 = frameCount >> 2; const drflac_uint32* pInputSamples0U32 = (const drflac_uint32*)pInputSamples0; const drflac_uint32* pInputSamples1U32 = (const drflac_uint32*)pInputSamples1; drflac_uint32 shift0 = (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample) - 8; drflac_uint32 shift1 = (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample) - 8; __m128 factor; DRFLAC_ASSERT(pFlac->bitsPerSample <= 24); factor = _mm_set1_ps(1.0f / 8388608.0f); for (i = 0; i < frameCount4; ++i) { __m128i left = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples0 + i), shift0); __m128i side = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples1 + i), shift1); __m128i right = _mm_sub_epi32(left, side); __m128 leftf = _mm_mul_ps(_mm_cvtepi32_ps(left), factor); __m128 rightf = _mm_mul_ps(_mm_cvtepi32_ps(right), factor); _mm_storeu_ps(pOutputSamples + i*8 + 0, _mm_unpacklo_ps(leftf, rightf)); _mm_storeu_ps(pOutputSamples + i*8 + 4, _mm_unpackhi_ps(leftf, rightf)); } for (i = (frameCount4 << 2); i < frameCount; ++i) { drflac_uint32 left = pInputSamples0U32[i] << shift0; drflac_uint32 side = pInputSamples1U32[i] << shift1; drflac_uint32 right = left - side; pOutputSamples[i*2+0] = (drflac_int32)left / 8388608.0f; pOutputSamples[i*2+1] = (drflac_int32)right / 8388608.0f; } } #endif #if defined(DRFLAC_SUPPORT_NEON) static DRFLAC_INLINE void drflac_read_pcm_frames_f32__decode_left_side__neon(drflac* pFlac, drflac_uint64 frameCount, drflac_uint32 unusedBitsPerSample, const drflac_int32* pInputSamples0, const drflac_int32* pInputSamples1, float* pOutputSamples) { drflac_uint64 i; drflac_uint64 frameCount4 = frameCount >> 2; const drflac_uint32* pInputSamples0U32 = (const drflac_uint32*)pInputSamples0; const drflac_uint32* pInputSamples1U32 = (const drflac_uint32*)pInputSamples1; drflac_uint32 shift0 = (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample) - 8; drflac_uint32 shift1 = (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample) - 8; float32x4_t factor4; int32x4_t shift0_4; int32x4_t shift1_4; DRFLAC_ASSERT(pFlac->bitsPerSample <= 24); factor4 = vdupq_n_f32(1.0f / 8388608.0f); shift0_4 = vdupq_n_s32(shift0); shift1_4 = vdupq_n_s32(shift1); for (i = 0; i < frameCount4; ++i) { uint32x4_t left; uint32x4_t side; uint32x4_t right; float32x4_t leftf; float32x4_t rightf; left = vshlq_u32(vld1q_u32(pInputSamples0U32 + i*4), shift0_4); side = vshlq_u32(vld1q_u32(pInputSamples1U32 + i*4), shift1_4); right = vsubq_u32(left, side); leftf = vmulq_f32(vcvtq_f32_s32(vreinterpretq_s32_u32(left)), factor4); rightf = vmulq_f32(vcvtq_f32_s32(vreinterpretq_s32_u32(right)), factor4); drflac__vst2q_f32(pOutputSamples + i*8, vzipq_f32(leftf, rightf)); } for (i = (frameCount4 << 2); i < frameCount; ++i) { drflac_uint32 left = pInputSamples0U32[i] << shift0; drflac_uint32 side = pInputSamples1U32[i] << shift1; drflac_uint32 right = left - side; pOutputSamples[i*2+0] = (drflac_int32)left / 8388608.0f; pOutputSamples[i*2+1] = (drflac_int32)right / 8388608.0f; } } #endif static DRFLAC_INLINE void drflac_read_pcm_frames_f32__decode_left_side(drflac* pFlac, drflac_uint64 frameCount, drflac_uint32 unusedBitsPerSample, const drflac_int32* pInputSamples0, const drflac_int32* pInputSamples1, float* pOutputSamples) { #if defined(DRFLAC_SUPPORT_SSE2) if (drflac__gIsSSE2Supported && pFlac->bitsPerSample <= 24) { drflac_read_pcm_frames_f32__decode_left_side__sse2(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); } else #elif defined(DRFLAC_SUPPORT_NEON) if (drflac__gIsNEONSupported && pFlac->bitsPerSample <= 24) { drflac_read_pcm_frames_f32__decode_left_side__neon(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); } else #endif { /* Scalar fallback. */ #if 0 drflac_read_pcm_frames_f32__decode_left_side__reference(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); #else drflac_read_pcm_frames_f32__decode_left_side__scalar(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); #endif } } #if 0 static DRFLAC_INLINE void drflac_read_pcm_frames_f32__decode_right_side__reference(drflac* pFlac, drflac_uint64 frameCount, drflac_uint32 unusedBitsPerSample, const drflac_int32* pInputSamples0, const drflac_int32* pInputSamples1, float* pOutputSamples) { drflac_uint64 i; for (i = 0; i < frameCount; ++i) { drflac_uint32 side = (drflac_uint32)pInputSamples0[i] << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample); drflac_uint32 right = (drflac_uint32)pInputSamples1[i] << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample); drflac_uint32 left = right + side; pOutputSamples[i*2+0] = (float)((drflac_int32)left / 2147483648.0); pOutputSamples[i*2+1] = (float)((drflac_int32)right / 2147483648.0); } } #endif static DRFLAC_INLINE void drflac_read_pcm_frames_f32__decode_right_side__scalar(drflac* pFlac, drflac_uint64 frameCount, drflac_uint32 unusedBitsPerSample, const drflac_int32* pInputSamples0, const drflac_int32* pInputSamples1, float* pOutputSamples) { drflac_uint64 i; drflac_uint64 frameCount4 = frameCount >> 2; const drflac_uint32* pInputSamples0U32 = (const drflac_uint32*)pInputSamples0; const drflac_uint32* pInputSamples1U32 = (const drflac_uint32*)pInputSamples1; drflac_uint32 shift0 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; drflac_uint32 shift1 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; float factor = 1 / 2147483648.0; for (i = 0; i < frameCount4; ++i) { drflac_uint32 side0 = pInputSamples0U32[i*4+0] << shift0; drflac_uint32 side1 = pInputSamples0U32[i*4+1] << shift0; drflac_uint32 side2 = pInputSamples0U32[i*4+2] << shift0; drflac_uint32 side3 = pInputSamples0U32[i*4+3] << shift0; drflac_uint32 right0 = pInputSamples1U32[i*4+0] << shift1; drflac_uint32 right1 = pInputSamples1U32[i*4+1] << shift1; drflac_uint32 right2 = pInputSamples1U32[i*4+2] << shift1; drflac_uint32 right3 = pInputSamples1U32[i*4+3] << shift1; drflac_uint32 left0 = right0 + side0; drflac_uint32 left1 = right1 + side1; drflac_uint32 left2 = right2 + side2; drflac_uint32 left3 = right3 + side3; pOutputSamples[i*8+0] = (drflac_int32)left0 * factor; pOutputSamples[i*8+1] = (drflac_int32)right0 * factor; pOutputSamples[i*8+2] = (drflac_int32)left1 * factor; pOutputSamples[i*8+3] = (drflac_int32)right1 * factor; pOutputSamples[i*8+4] = (drflac_int32)left2 * factor; pOutputSamples[i*8+5] = (drflac_int32)right2 * factor; pOutputSamples[i*8+6] = (drflac_int32)left3 * factor; pOutputSamples[i*8+7] = (drflac_int32)right3 * factor; } for (i = (frameCount4 << 2); i < frameCount; ++i) { drflac_uint32 side = pInputSamples0U32[i] << shift0; drflac_uint32 right = pInputSamples1U32[i] << shift1; drflac_uint32 left = right + side; pOutputSamples[i*2+0] = (drflac_int32)left * factor; pOutputSamples[i*2+1] = (drflac_int32)right * factor; } } #if defined(DRFLAC_SUPPORT_SSE2) static DRFLAC_INLINE void drflac_read_pcm_frames_f32__decode_right_side__sse2(drflac* pFlac, drflac_uint64 frameCount, drflac_uint32 unusedBitsPerSample, const drflac_int32* pInputSamples0, const drflac_int32* pInputSamples1, float* pOutputSamples) { drflac_uint64 i; drflac_uint64 frameCount4 = frameCount >> 2; const drflac_uint32* pInputSamples0U32 = (const drflac_uint32*)pInputSamples0; const drflac_uint32* pInputSamples1U32 = (const drflac_uint32*)pInputSamples1; drflac_uint32 shift0 = (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample) - 8; drflac_uint32 shift1 = (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample) - 8; __m128 factor; DRFLAC_ASSERT(pFlac->bitsPerSample <= 24); factor = _mm_set1_ps(1.0f / 8388608.0f); for (i = 0; i < frameCount4; ++i) { __m128i side = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples0 + i), shift0); __m128i right = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples1 + i), shift1); __m128i left = _mm_add_epi32(right, side); __m128 leftf = _mm_mul_ps(_mm_cvtepi32_ps(left), factor); __m128 rightf = _mm_mul_ps(_mm_cvtepi32_ps(right), factor); _mm_storeu_ps(pOutputSamples + i*8 + 0, _mm_unpacklo_ps(leftf, rightf)); _mm_storeu_ps(pOutputSamples + i*8 + 4, _mm_unpackhi_ps(leftf, rightf)); } for (i = (frameCount4 << 2); i < frameCount; ++i) { drflac_uint32 side = pInputSamples0U32[i] << shift0; drflac_uint32 right = pInputSamples1U32[i] << shift1; drflac_uint32 left = right + side; pOutputSamples[i*2+0] = (drflac_int32)left / 8388608.0f; pOutputSamples[i*2+1] = (drflac_int32)right / 8388608.0f; } } #endif #if defined(DRFLAC_SUPPORT_NEON) static DRFLAC_INLINE void drflac_read_pcm_frames_f32__decode_right_side__neon(drflac* pFlac, drflac_uint64 frameCount, drflac_uint32 unusedBitsPerSample, const drflac_int32* pInputSamples0, const drflac_int32* pInputSamples1, float* pOutputSamples) { drflac_uint64 i; drflac_uint64 frameCount4 = frameCount >> 2; const drflac_uint32* pInputSamples0U32 = (const drflac_uint32*)pInputSamples0; const drflac_uint32* pInputSamples1U32 = (const drflac_uint32*)pInputSamples1; drflac_uint32 shift0 = (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample) - 8; drflac_uint32 shift1 = (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample) - 8; float32x4_t factor4; int32x4_t shift0_4; int32x4_t shift1_4; DRFLAC_ASSERT(pFlac->bitsPerSample <= 24); factor4 = vdupq_n_f32(1.0f / 8388608.0f); shift0_4 = vdupq_n_s32(shift0); shift1_4 = vdupq_n_s32(shift1); for (i = 0; i < frameCount4; ++i) { uint32x4_t side; uint32x4_t right; uint32x4_t left; float32x4_t leftf; float32x4_t rightf; side = vshlq_u32(vld1q_u32(pInputSamples0U32 + i*4), shift0_4); right = vshlq_u32(vld1q_u32(pInputSamples1U32 + i*4), shift1_4); left = vaddq_u32(right, side); leftf = vmulq_f32(vcvtq_f32_s32(vreinterpretq_s32_u32(left)), factor4); rightf = vmulq_f32(vcvtq_f32_s32(vreinterpretq_s32_u32(right)), factor4); drflac__vst2q_f32(pOutputSamples + i*8, vzipq_f32(leftf, rightf)); } for (i = (frameCount4 << 2); i < frameCount; ++i) { drflac_uint32 side = pInputSamples0U32[i] << shift0; drflac_uint32 right = pInputSamples1U32[i] << shift1; drflac_uint32 left = right + side; pOutputSamples[i*2+0] = (drflac_int32)left / 8388608.0f; pOutputSamples[i*2+1] = (drflac_int32)right / 8388608.0f; } } #endif static DRFLAC_INLINE void drflac_read_pcm_frames_f32__decode_right_side(drflac* pFlac, drflac_uint64 frameCount, drflac_uint32 unusedBitsPerSample, const drflac_int32* pInputSamples0, const drflac_int32* pInputSamples1, float* pOutputSamples) { #if defined(DRFLAC_SUPPORT_SSE2) if (drflac__gIsSSE2Supported && pFlac->bitsPerSample <= 24) { drflac_read_pcm_frames_f32__decode_right_side__sse2(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); } else #elif defined(DRFLAC_SUPPORT_NEON) if (drflac__gIsNEONSupported && pFlac->bitsPerSample <= 24) { drflac_read_pcm_frames_f32__decode_right_side__neon(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); } else #endif { /* Scalar fallback. */ #if 0 drflac_read_pcm_frames_f32__decode_right_side__reference(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); #else drflac_read_pcm_frames_f32__decode_right_side__scalar(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); #endif } } #if 0 static DRFLAC_INLINE void drflac_read_pcm_frames_f32__decode_mid_side__reference(drflac* pFlac, drflac_uint64 frameCount, drflac_uint32 unusedBitsPerSample, const drflac_int32* pInputSamples0, const drflac_int32* pInputSamples1, float* pOutputSamples) { for (drflac_uint64 i = 0; i < frameCount; ++i) { drflac_uint32 mid = (drflac_uint32)pInputSamples0[i] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; drflac_uint32 side = (drflac_uint32)pInputSamples1[i] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; mid = (mid << 1) | (side & 0x01); pOutputSamples[i*2+0] = (float)((((drflac_int32)(mid + side) >> 1) << (unusedBitsPerSample)) / 2147483648.0); pOutputSamples[i*2+1] = (float)((((drflac_int32)(mid - side) >> 1) << (unusedBitsPerSample)) / 2147483648.0); } } #endif static DRFLAC_INLINE void drflac_read_pcm_frames_f32__decode_mid_side__scalar(drflac* pFlac, drflac_uint64 frameCount, drflac_uint32 unusedBitsPerSample, const drflac_int32* pInputSamples0, const drflac_int32* pInputSamples1, float* pOutputSamples) { drflac_uint64 i; drflac_uint64 frameCount4 = frameCount >> 2; const drflac_uint32* pInputSamples0U32 = (const drflac_uint32*)pInputSamples0; const drflac_uint32* pInputSamples1U32 = (const drflac_uint32*)pInputSamples1; drflac_uint32 shift = unusedBitsPerSample; float factor = 1 / 2147483648.0; if (shift > 0) { shift -= 1; for (i = 0; i < frameCount4; ++i) { drflac_uint32 temp0L; drflac_uint32 temp1L; drflac_uint32 temp2L; drflac_uint32 temp3L; drflac_uint32 temp0R; drflac_uint32 temp1R; drflac_uint32 temp2R; drflac_uint32 temp3R; drflac_uint32 mid0 = pInputSamples0U32[i*4+0] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; drflac_uint32 mid1 = pInputSamples0U32[i*4+1] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; drflac_uint32 mid2 = pInputSamples0U32[i*4+2] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; drflac_uint32 mid3 = pInputSamples0U32[i*4+3] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; drflac_uint32 side0 = pInputSamples1U32[i*4+0] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; drflac_uint32 side1 = pInputSamples1U32[i*4+1] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; drflac_uint32 side2 = pInputSamples1U32[i*4+2] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; drflac_uint32 side3 = pInputSamples1U32[i*4+3] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; mid0 = (mid0 << 1) | (side0 & 0x01); mid1 = (mid1 << 1) | (side1 & 0x01); mid2 = (mid2 << 1) | (side2 & 0x01); mid3 = (mid3 << 1) | (side3 & 0x01); temp0L = (mid0 + side0) << shift; temp1L = (mid1 + side1) << shift; temp2L = (mid2 + side2) << shift; temp3L = (mid3 + side3) << shift; temp0R = (mid0 - side0) << shift; temp1R = (mid1 - side1) << shift; temp2R = (mid2 - side2) << shift; temp3R = (mid3 - side3) << shift; pOutputSamples[i*8+0] = (drflac_int32)temp0L * factor; pOutputSamples[i*8+1] = (drflac_int32)temp0R * factor; pOutputSamples[i*8+2] = (drflac_int32)temp1L * factor; pOutputSamples[i*8+3] = (drflac_int32)temp1R * factor; pOutputSamples[i*8+4] = (drflac_int32)temp2L * factor; pOutputSamples[i*8+5] = (drflac_int32)temp2R * factor; pOutputSamples[i*8+6] = (drflac_int32)temp3L * factor; pOutputSamples[i*8+7] = (drflac_int32)temp3R * factor; } } else { for (i = 0; i < frameCount4; ++i) { drflac_uint32 temp0L; drflac_uint32 temp1L; drflac_uint32 temp2L; drflac_uint32 temp3L; drflac_uint32 temp0R; drflac_uint32 temp1R; drflac_uint32 temp2R; drflac_uint32 temp3R; drflac_uint32 mid0 = pInputSamples0U32[i*4+0] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; drflac_uint32 mid1 = pInputSamples0U32[i*4+1] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; drflac_uint32 mid2 = pInputSamples0U32[i*4+2] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; drflac_uint32 mid3 = pInputSamples0U32[i*4+3] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; drflac_uint32 side0 = pInputSamples1U32[i*4+0] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; drflac_uint32 side1 = pInputSamples1U32[i*4+1] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; drflac_uint32 side2 = pInputSamples1U32[i*4+2] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; drflac_uint32 side3 = pInputSamples1U32[i*4+3] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; mid0 = (mid0 << 1) | (side0 & 0x01); mid1 = (mid1 << 1) | (side1 & 0x01); mid2 = (mid2 << 1) | (side2 & 0x01); mid3 = (mid3 << 1) | (side3 & 0x01); temp0L = (drflac_uint32)((drflac_int32)(mid0 + side0) >> 1); temp1L = (drflac_uint32)((drflac_int32)(mid1 + side1) >> 1); temp2L = (drflac_uint32)((drflac_int32)(mid2 + side2) >> 1); temp3L = (drflac_uint32)((drflac_int32)(mid3 + side3) >> 1); temp0R = (drflac_uint32)((drflac_int32)(mid0 - side0) >> 1); temp1R = (drflac_uint32)((drflac_int32)(mid1 - side1) >> 1); temp2R = (drflac_uint32)((drflac_int32)(mid2 - side2) >> 1); temp3R = (drflac_uint32)((drflac_int32)(mid3 - side3) >> 1); pOutputSamples[i*8+0] = (drflac_int32)temp0L * factor; pOutputSamples[i*8+1] = (drflac_int32)temp0R * factor; pOutputSamples[i*8+2] = (drflac_int32)temp1L * factor; pOutputSamples[i*8+3] = (drflac_int32)temp1R * factor; pOutputSamples[i*8+4] = (drflac_int32)temp2L * factor; pOutputSamples[i*8+5] = (drflac_int32)temp2R * factor; pOutputSamples[i*8+6] = (drflac_int32)temp3L * factor; pOutputSamples[i*8+7] = (drflac_int32)temp3R * factor; } } for (i = (frameCount4 << 2); i < frameCount; ++i) { drflac_uint32 mid = pInputSamples0U32[i] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; drflac_uint32 side = pInputSamples1U32[i] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; mid = (mid << 1) | (side & 0x01); pOutputSamples[i*2+0] = (drflac_int32)((drflac_uint32)((drflac_int32)(mid + side) >> 1) << unusedBitsPerSample) * factor; pOutputSamples[i*2+1] = (drflac_int32)((drflac_uint32)((drflac_int32)(mid - side) >> 1) << unusedBitsPerSample) * factor; } } #if defined(DRFLAC_SUPPORT_SSE2) static DRFLAC_INLINE void drflac_read_pcm_frames_f32__decode_mid_side__sse2(drflac* pFlac, drflac_uint64 frameCount, drflac_uint32 unusedBitsPerSample, const drflac_int32* pInputSamples0, const drflac_int32* pInputSamples1, float* pOutputSamples) { drflac_uint64 i; drflac_uint64 frameCount4 = frameCount >> 2; const drflac_uint32* pInputSamples0U32 = (const drflac_uint32*)pInputSamples0; const drflac_uint32* pInputSamples1U32 = (const drflac_uint32*)pInputSamples1; drflac_uint32 shift = unusedBitsPerSample - 8; float factor; __m128 factor128; DRFLAC_ASSERT(pFlac->bitsPerSample <= 24); factor = 1.0f / 8388608.0f; factor128 = _mm_set1_ps(factor); if (shift == 0) { for (i = 0; i < frameCount4; ++i) { __m128i mid; __m128i side; __m128i tempL; __m128i tempR; __m128 leftf; __m128 rightf; mid = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples0 + i), pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample); side = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples1 + i), pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample); mid = _mm_or_si128(_mm_slli_epi32(mid, 1), _mm_and_si128(side, _mm_set1_epi32(0x01))); tempL = _mm_srai_epi32(_mm_add_epi32(mid, side), 1); tempR = _mm_srai_epi32(_mm_sub_epi32(mid, side), 1); leftf = _mm_mul_ps(_mm_cvtepi32_ps(tempL), factor128); rightf = _mm_mul_ps(_mm_cvtepi32_ps(tempR), factor128); _mm_storeu_ps(pOutputSamples + i*8 + 0, _mm_unpacklo_ps(leftf, rightf)); _mm_storeu_ps(pOutputSamples + i*8 + 4, _mm_unpackhi_ps(leftf, rightf)); } for (i = (frameCount4 << 2); i < frameCount; ++i) { drflac_uint32 mid = pInputSamples0U32[i] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; drflac_uint32 side = pInputSamples1U32[i] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; mid = (mid << 1) | (side & 0x01); pOutputSamples[i*2+0] = ((drflac_int32)(mid + side) >> 1) * factor; pOutputSamples[i*2+1] = ((drflac_int32)(mid - side) >> 1) * factor; } } else { shift -= 1; for (i = 0; i < frameCount4; ++i) { __m128i mid; __m128i side; __m128i tempL; __m128i tempR; __m128 leftf; __m128 rightf; mid = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples0 + i), pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample); side = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples1 + i), pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample); mid = _mm_or_si128(_mm_slli_epi32(mid, 1), _mm_and_si128(side, _mm_set1_epi32(0x01))); tempL = _mm_slli_epi32(_mm_add_epi32(mid, side), shift); tempR = _mm_slli_epi32(_mm_sub_epi32(mid, side), shift); leftf = _mm_mul_ps(_mm_cvtepi32_ps(tempL), factor128); rightf = _mm_mul_ps(_mm_cvtepi32_ps(tempR), factor128); _mm_storeu_ps(pOutputSamples + i*8 + 0, _mm_unpacklo_ps(leftf, rightf)); _mm_storeu_ps(pOutputSamples + i*8 + 4, _mm_unpackhi_ps(leftf, rightf)); } for (i = (frameCount4 << 2); i < frameCount; ++i) { drflac_uint32 mid = pInputSamples0U32[i] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; drflac_uint32 side = pInputSamples1U32[i] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; mid = (mid << 1) | (side & 0x01); pOutputSamples[i*2+0] = (drflac_int32)((mid + side) << shift) * factor; pOutputSamples[i*2+1] = (drflac_int32)((mid - side) << shift) * factor; } } } #endif #if defined(DRFLAC_SUPPORT_NEON) static DRFLAC_INLINE void drflac_read_pcm_frames_f32__decode_mid_side__neon(drflac* pFlac, drflac_uint64 frameCount, drflac_uint32 unusedBitsPerSample, const drflac_int32* pInputSamples0, const drflac_int32* pInputSamples1, float* pOutputSamples) { drflac_uint64 i; drflac_uint64 frameCount4 = frameCount >> 2; const drflac_uint32* pInputSamples0U32 = (const drflac_uint32*)pInputSamples0; const drflac_uint32* pInputSamples1U32 = (const drflac_uint32*)pInputSamples1; drflac_uint32 shift = unusedBitsPerSample - 8; float factor; float32x4_t factor4; int32x4_t shift4; int32x4_t wbps0_4; /* Wasted Bits Per Sample */ int32x4_t wbps1_4; /* Wasted Bits Per Sample */ DRFLAC_ASSERT(pFlac->bitsPerSample <= 24); factor = 1.0f / 8388608.0f; factor4 = vdupq_n_f32(factor); wbps0_4 = vdupq_n_s32(pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample); wbps1_4 = vdupq_n_s32(pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample); if (shift == 0) { for (i = 0; i < frameCount4; ++i) { int32x4_t lefti; int32x4_t righti; float32x4_t leftf; float32x4_t rightf; uint32x4_t mid = vshlq_u32(vld1q_u32(pInputSamples0U32 + i*4), wbps0_4); uint32x4_t side = vshlq_u32(vld1q_u32(pInputSamples1U32 + i*4), wbps1_4); mid = vorrq_u32(vshlq_n_u32(mid, 1), vandq_u32(side, vdupq_n_u32(1))); lefti = vshrq_n_s32(vreinterpretq_s32_u32(vaddq_u32(mid, side)), 1); righti = vshrq_n_s32(vreinterpretq_s32_u32(vsubq_u32(mid, side)), 1); leftf = vmulq_f32(vcvtq_f32_s32(lefti), factor4); rightf = vmulq_f32(vcvtq_f32_s32(righti), factor4); drflac__vst2q_f32(pOutputSamples + i*8, vzipq_f32(leftf, rightf)); } for (i = (frameCount4 << 2); i < frameCount; ++i) { drflac_uint32 mid = pInputSamples0U32[i] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; drflac_uint32 side = pInputSamples1U32[i] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; mid = (mid << 1) | (side & 0x01); pOutputSamples[i*2+0] = ((drflac_int32)(mid + side) >> 1) * factor; pOutputSamples[i*2+1] = ((drflac_int32)(mid - side) >> 1) * factor; } } else { shift -= 1; shift4 = vdupq_n_s32(shift); for (i = 0; i < frameCount4; ++i) { uint32x4_t mid; uint32x4_t side; int32x4_t lefti; int32x4_t righti; float32x4_t leftf; float32x4_t rightf; mid = vshlq_u32(vld1q_u32(pInputSamples0U32 + i*4), wbps0_4); side = vshlq_u32(vld1q_u32(pInputSamples1U32 + i*4), wbps1_4); mid = vorrq_u32(vshlq_n_u32(mid, 1), vandq_u32(side, vdupq_n_u32(1))); lefti = vreinterpretq_s32_u32(vshlq_u32(vaddq_u32(mid, side), shift4)); righti = vreinterpretq_s32_u32(vshlq_u32(vsubq_u32(mid, side), shift4)); leftf = vmulq_f32(vcvtq_f32_s32(lefti), factor4); rightf = vmulq_f32(vcvtq_f32_s32(righti), factor4); drflac__vst2q_f32(pOutputSamples + i*8, vzipq_f32(leftf, rightf)); } for (i = (frameCount4 << 2); i < frameCount; ++i) { drflac_uint32 mid = pInputSamples0U32[i] << pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; drflac_uint32 side = pInputSamples1U32[i] << pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; mid = (mid << 1) | (side & 0x01); pOutputSamples[i*2+0] = (drflac_int32)((mid + side) << shift) * factor; pOutputSamples[i*2+1] = (drflac_int32)((mid - side) << shift) * factor; } } } #endif static DRFLAC_INLINE void drflac_read_pcm_frames_f32__decode_mid_side(drflac* pFlac, drflac_uint64 frameCount, drflac_uint32 unusedBitsPerSample, const drflac_int32* pInputSamples0, const drflac_int32* pInputSamples1, float* pOutputSamples) { #if defined(DRFLAC_SUPPORT_SSE2) if (drflac__gIsSSE2Supported && pFlac->bitsPerSample <= 24) { drflac_read_pcm_frames_f32__decode_mid_side__sse2(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); } else #elif defined(DRFLAC_SUPPORT_NEON) if (drflac__gIsNEONSupported && pFlac->bitsPerSample <= 24) { drflac_read_pcm_frames_f32__decode_mid_side__neon(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); } else #endif { /* Scalar fallback. */ #if 0 drflac_read_pcm_frames_f32__decode_mid_side__reference(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); #else drflac_read_pcm_frames_f32__decode_mid_side__scalar(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); #endif } } #if 0 static DRFLAC_INLINE void drflac_read_pcm_frames_f32__decode_independent_stereo__reference(drflac* pFlac, drflac_uint64 frameCount, drflac_uint32 unusedBitsPerSample, const drflac_int32* pInputSamples0, const drflac_int32* pInputSamples1, float* pOutputSamples) { for (drflac_uint64 i = 0; i < frameCount; ++i) { pOutputSamples[i*2+0] = (float)((drflac_int32)((drflac_uint32)pInputSamples0[i] << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample)) / 2147483648.0); pOutputSamples[i*2+1] = (float)((drflac_int32)((drflac_uint32)pInputSamples1[i] << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample)) / 2147483648.0); } } #endif static DRFLAC_INLINE void drflac_read_pcm_frames_f32__decode_independent_stereo__scalar(drflac* pFlac, drflac_uint64 frameCount, drflac_uint32 unusedBitsPerSample, const drflac_int32* pInputSamples0, const drflac_int32* pInputSamples1, float* pOutputSamples) { drflac_uint64 i; drflac_uint64 frameCount4 = frameCount >> 2; const drflac_uint32* pInputSamples0U32 = (const drflac_uint32*)pInputSamples0; const drflac_uint32* pInputSamples1U32 = (const drflac_uint32*)pInputSamples1; drflac_uint32 shift0 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample; drflac_uint32 shift1 = unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample; float factor = 1 / 2147483648.0; for (i = 0; i < frameCount4; ++i) { drflac_uint32 tempL0 = pInputSamples0U32[i*4+0] << shift0; drflac_uint32 tempL1 = pInputSamples0U32[i*4+1] << shift0; drflac_uint32 tempL2 = pInputSamples0U32[i*4+2] << shift0; drflac_uint32 tempL3 = pInputSamples0U32[i*4+3] << shift0; drflac_uint32 tempR0 = pInputSamples1U32[i*4+0] << shift1; drflac_uint32 tempR1 = pInputSamples1U32[i*4+1] << shift1; drflac_uint32 tempR2 = pInputSamples1U32[i*4+2] << shift1; drflac_uint32 tempR3 = pInputSamples1U32[i*4+3] << shift1; pOutputSamples[i*8+0] = (drflac_int32)tempL0 * factor; pOutputSamples[i*8+1] = (drflac_int32)tempR0 * factor; pOutputSamples[i*8+2] = (drflac_int32)tempL1 * factor; pOutputSamples[i*8+3] = (drflac_int32)tempR1 * factor; pOutputSamples[i*8+4] = (drflac_int32)tempL2 * factor; pOutputSamples[i*8+5] = (drflac_int32)tempR2 * factor; pOutputSamples[i*8+6] = (drflac_int32)tempL3 * factor; pOutputSamples[i*8+7] = (drflac_int32)tempR3 * factor; } for (i = (frameCount4 << 2); i < frameCount; ++i) { pOutputSamples[i*2+0] = (drflac_int32)(pInputSamples0U32[i] << shift0) * factor; pOutputSamples[i*2+1] = (drflac_int32)(pInputSamples1U32[i] << shift1) * factor; } } #if defined(DRFLAC_SUPPORT_SSE2) static DRFLAC_INLINE void drflac_read_pcm_frames_f32__decode_independent_stereo__sse2(drflac* pFlac, drflac_uint64 frameCount, drflac_uint32 unusedBitsPerSample, const drflac_int32* pInputSamples0, const drflac_int32* pInputSamples1, float* pOutputSamples) { drflac_uint64 i; drflac_uint64 frameCount4 = frameCount >> 2; const drflac_uint32* pInputSamples0U32 = (const drflac_uint32*)pInputSamples0; const drflac_uint32* pInputSamples1U32 = (const drflac_uint32*)pInputSamples1; drflac_uint32 shift0 = (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample) - 8; drflac_uint32 shift1 = (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample) - 8; float factor = 1.0f / 8388608.0f; __m128 factor128 = _mm_set1_ps(factor); for (i = 0; i < frameCount4; ++i) { __m128i lefti; __m128i righti; __m128 leftf; __m128 rightf; lefti = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples0 + i), shift0); righti = _mm_slli_epi32(_mm_loadu_si128((const __m128i*)pInputSamples1 + i), shift1); leftf = _mm_mul_ps(_mm_cvtepi32_ps(lefti), factor128); rightf = _mm_mul_ps(_mm_cvtepi32_ps(righti), factor128); _mm_storeu_ps(pOutputSamples + i*8 + 0, _mm_unpacklo_ps(leftf, rightf)); _mm_storeu_ps(pOutputSamples + i*8 + 4, _mm_unpackhi_ps(leftf, rightf)); } for (i = (frameCount4 << 2); i < frameCount; ++i) { pOutputSamples[i*2+0] = (drflac_int32)(pInputSamples0U32[i] << shift0) * factor; pOutputSamples[i*2+1] = (drflac_int32)(pInputSamples1U32[i] << shift1) * factor; } } #endif #if defined(DRFLAC_SUPPORT_NEON) static DRFLAC_INLINE void drflac_read_pcm_frames_f32__decode_independent_stereo__neon(drflac* pFlac, drflac_uint64 frameCount, drflac_uint32 unusedBitsPerSample, const drflac_int32* pInputSamples0, const drflac_int32* pInputSamples1, float* pOutputSamples) { drflac_uint64 i; drflac_uint64 frameCount4 = frameCount >> 2; const drflac_uint32* pInputSamples0U32 = (const drflac_uint32*)pInputSamples0; const drflac_uint32* pInputSamples1U32 = (const drflac_uint32*)pInputSamples1; drflac_uint32 shift0 = (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[0].wastedBitsPerSample) - 8; drflac_uint32 shift1 = (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[1].wastedBitsPerSample) - 8; float factor = 1.0f / 8388608.0f; float32x4_t factor4 = vdupq_n_f32(factor); int32x4_t shift0_4 = vdupq_n_s32(shift0); int32x4_t shift1_4 = vdupq_n_s32(shift1); for (i = 0; i < frameCount4; ++i) { int32x4_t lefti; int32x4_t righti; float32x4_t leftf; float32x4_t rightf; lefti = vreinterpretq_s32_u32(vshlq_u32(vld1q_u32(pInputSamples0U32 + i*4), shift0_4)); righti = vreinterpretq_s32_u32(vshlq_u32(vld1q_u32(pInputSamples1U32 + i*4), shift1_4)); leftf = vmulq_f32(vcvtq_f32_s32(lefti), factor4); rightf = vmulq_f32(vcvtq_f32_s32(righti), factor4); drflac__vst2q_f32(pOutputSamples + i*8, vzipq_f32(leftf, rightf)); } for (i = (frameCount4 << 2); i < frameCount; ++i) { pOutputSamples[i*2+0] = (drflac_int32)(pInputSamples0U32[i] << shift0) * factor; pOutputSamples[i*2+1] = (drflac_int32)(pInputSamples1U32[i] << shift1) * factor; } } #endif static DRFLAC_INLINE void drflac_read_pcm_frames_f32__decode_independent_stereo(drflac* pFlac, drflac_uint64 frameCount, drflac_uint32 unusedBitsPerSample, const drflac_int32* pInputSamples0, const drflac_int32* pInputSamples1, float* pOutputSamples) { #if defined(DRFLAC_SUPPORT_SSE2) if (drflac__gIsSSE2Supported && pFlac->bitsPerSample <= 24) { drflac_read_pcm_frames_f32__decode_independent_stereo__sse2(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); } else #elif defined(DRFLAC_SUPPORT_NEON) if (drflac__gIsNEONSupported && pFlac->bitsPerSample <= 24) { drflac_read_pcm_frames_f32__decode_independent_stereo__neon(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); } else #endif { /* Scalar fallback. */ #if 0 drflac_read_pcm_frames_f32__decode_independent_stereo__reference(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); #else drflac_read_pcm_frames_f32__decode_independent_stereo__scalar(pFlac, frameCount, unusedBitsPerSample, pInputSamples0, pInputSamples1, pOutputSamples); #endif } } DRFLAC_API drflac_uint64 drflac_read_pcm_frames_f32(drflac* pFlac, drflac_uint64 framesToRead, float* pBufferOut) { drflac_uint64 framesRead; drflac_uint32 unusedBitsPerSample; if (pFlac == NULL || framesToRead == 0) { return 0; } if (pBufferOut == NULL) { return drflac__seek_forward_by_pcm_frames(pFlac, framesToRead); } DRFLAC_ASSERT(pFlac->bitsPerSample <= 32); unusedBitsPerSample = 32 - pFlac->bitsPerSample; framesRead = 0; while (framesToRead > 0) { /* If we've run out of samples in this frame, go to the next. */ if (pFlac->currentFLACFrame.pcmFramesRemaining == 0) { if (!drflac__read_and_decode_next_flac_frame(pFlac)) { break; /* Couldn't read the next frame, so just break from the loop and return. */ } } else { unsigned int channelCount = drflac__get_channel_count_from_channel_assignment(pFlac->currentFLACFrame.header.channelAssignment); drflac_uint64 iFirstPCMFrame = pFlac->currentFLACFrame.header.blockSizeInPCMFrames - pFlac->currentFLACFrame.pcmFramesRemaining; drflac_uint64 frameCountThisIteration = framesToRead; if (frameCountThisIteration > pFlac->currentFLACFrame.pcmFramesRemaining) { frameCountThisIteration = pFlac->currentFLACFrame.pcmFramesRemaining; } if (channelCount == 2) { const drflac_int32* pDecodedSamples0 = pFlac->currentFLACFrame.subframes[0].pSamplesS32 + iFirstPCMFrame; const drflac_int32* pDecodedSamples1 = pFlac->currentFLACFrame.subframes[1].pSamplesS32 + iFirstPCMFrame; switch (pFlac->currentFLACFrame.header.channelAssignment) { case DRFLAC_CHANNEL_ASSIGNMENT_LEFT_SIDE: { drflac_read_pcm_frames_f32__decode_left_side(pFlac, frameCountThisIteration, unusedBitsPerSample, pDecodedSamples0, pDecodedSamples1, pBufferOut); } break; case DRFLAC_CHANNEL_ASSIGNMENT_RIGHT_SIDE: { drflac_read_pcm_frames_f32__decode_right_side(pFlac, frameCountThisIteration, unusedBitsPerSample, pDecodedSamples0, pDecodedSamples1, pBufferOut); } break; case DRFLAC_CHANNEL_ASSIGNMENT_MID_SIDE: { drflac_read_pcm_frames_f32__decode_mid_side(pFlac, frameCountThisIteration, unusedBitsPerSample, pDecodedSamples0, pDecodedSamples1, pBufferOut); } break; case DRFLAC_CHANNEL_ASSIGNMENT_INDEPENDENT: default: { drflac_read_pcm_frames_f32__decode_independent_stereo(pFlac, frameCountThisIteration, unusedBitsPerSample, pDecodedSamples0, pDecodedSamples1, pBufferOut); } break; } } else { /* Generic interleaving. */ drflac_uint64 i; for (i = 0; i < frameCountThisIteration; ++i) { unsigned int j; for (j = 0; j < channelCount; ++j) { drflac_int32 sampleS32 = (drflac_int32)((drflac_uint32)(pFlac->currentFLACFrame.subframes[j].pSamplesS32[iFirstPCMFrame + i]) << (unusedBitsPerSample + pFlac->currentFLACFrame.subframes[j].wastedBitsPerSample)); pBufferOut[(i*channelCount)+j] = (float)(sampleS32 / 2147483648.0); } } } framesRead += frameCountThisIteration; pBufferOut += frameCountThisIteration * channelCount; framesToRead -= frameCountThisIteration; pFlac->currentPCMFrame += frameCountThisIteration; pFlac->currentFLACFrame.pcmFramesRemaining -= (unsigned int)frameCountThisIteration; } } return framesRead; } DRFLAC_API drflac_bool32 drflac_seek_to_pcm_frame(drflac* pFlac, drflac_uint64 pcmFrameIndex) { if (pFlac == NULL) { return DRFLAC_FALSE; } /* Don't do anything if we're already on the seek point. */ if (pFlac->currentPCMFrame == pcmFrameIndex) { return DRFLAC_TRUE; } /* If we don't know where the first frame begins then we can't seek. This will happen when the STREAMINFO block was not present when the decoder was opened. */ if (pFlac->firstFLACFramePosInBytes == 0) { return DRFLAC_FALSE; } if (pcmFrameIndex == 0) { pFlac->currentPCMFrame = 0; return drflac__seek_to_first_frame(pFlac); } else { drflac_bool32 wasSuccessful = DRFLAC_FALSE; drflac_uint64 originalPCMFrame = pFlac->currentPCMFrame; /* Clamp the sample to the end. */ if (pcmFrameIndex > pFlac->totalPCMFrameCount) { pcmFrameIndex = pFlac->totalPCMFrameCount; } /* If the target sample and the current sample are in the same frame we just move the position forward. */ if (pcmFrameIndex > pFlac->currentPCMFrame) { /* Forward. */ drflac_uint32 offset = (drflac_uint32)(pcmFrameIndex - pFlac->currentPCMFrame); if (pFlac->currentFLACFrame.pcmFramesRemaining > offset) { pFlac->currentFLACFrame.pcmFramesRemaining -= offset; pFlac->currentPCMFrame = pcmFrameIndex; return DRFLAC_TRUE; } } else { /* Backward. */ drflac_uint32 offsetAbs = (drflac_uint32)(pFlac->currentPCMFrame - pcmFrameIndex); drflac_uint32 currentFLACFramePCMFrameCount = pFlac->currentFLACFrame.header.blockSizeInPCMFrames; drflac_uint32 currentFLACFramePCMFramesConsumed = currentFLACFramePCMFrameCount - pFlac->currentFLACFrame.pcmFramesRemaining; if (currentFLACFramePCMFramesConsumed > offsetAbs) { pFlac->currentFLACFrame.pcmFramesRemaining += offsetAbs; pFlac->currentPCMFrame = pcmFrameIndex; return DRFLAC_TRUE; } } /* Different techniques depending on encapsulation. Using the native FLAC seektable with Ogg encapsulation is a bit awkward so we'll instead use Ogg's natural seeking facility. */ #ifndef DR_FLAC_NO_OGG if (pFlac->container == drflac_container_ogg) { wasSuccessful = drflac_ogg__seek_to_pcm_frame(pFlac, pcmFrameIndex); } else #endif { /* First try seeking via the seek table. If this fails, fall back to a brute force seek which is much slower. */ if (/*!wasSuccessful && */!pFlac->_noSeekTableSeek) { wasSuccessful = drflac__seek_to_pcm_frame__seek_table(pFlac, pcmFrameIndex); } #if !defined(DR_FLAC_NO_CRC) /* Fall back to binary search if seek table seeking fails. This requires the length of the stream to be known. */ if (!wasSuccessful && !pFlac->_noBinarySearchSeek && pFlac->totalPCMFrameCount > 0) { wasSuccessful = drflac__seek_to_pcm_frame__binary_search(pFlac, pcmFrameIndex); } #endif /* Fall back to brute force if all else fails. */ if (!wasSuccessful && !pFlac->_noBruteForceSeek) { wasSuccessful = drflac__seek_to_pcm_frame__brute_force(pFlac, pcmFrameIndex); } } if (wasSuccessful) { pFlac->currentPCMFrame = pcmFrameIndex; } else { /* Seek failed. Try putting the decoder back to it's original state. */ if (drflac_seek_to_pcm_frame(pFlac, originalPCMFrame) == DRFLAC_FALSE) { /* Failed to seek back to the original PCM frame. Fall back to 0. */ drflac_seek_to_pcm_frame(pFlac, 0); } } return wasSuccessful; } } /* High Level APIs */ #if defined(SIZE_MAX) #define DRFLAC_SIZE_MAX SIZE_MAX #else #if defined(DRFLAC_64BIT) #define DRFLAC_SIZE_MAX ((drflac_uint64)0xFFFFFFFFFFFFFFFF) #else #define DRFLAC_SIZE_MAX 0xFFFFFFFF #endif #endif /* Using a macro as the definition of the drflac__full_decode_and_close_*() API family. Sue me. */ #define DRFLAC_DEFINE_FULL_READ_AND_CLOSE(extension, type) \ static type* drflac__full_read_and_close_ ## extension (drflac* pFlac, unsigned int* channelsOut, unsigned int* sampleRateOut, drflac_uint64* totalPCMFrameCountOut)\ { \ type* pSampleData = NULL; \ drflac_uint64 totalPCMFrameCount; \ \ DRFLAC_ASSERT(pFlac != NULL); \ \ totalPCMFrameCount = pFlac->totalPCMFrameCount; \ \ if (totalPCMFrameCount == 0) { \ type buffer[4096]; \ drflac_uint64 pcmFramesRead; \ size_t sampleDataBufferSize = sizeof(buffer); \ \ pSampleData = (type*)drflac__malloc_from_callbacks(sampleDataBufferSize, &pFlac->allocationCallbacks); \ if (pSampleData == NULL) { \ goto on_error; \ } \ \ while ((pcmFramesRead = (drflac_uint64)drflac_read_pcm_frames_##extension(pFlac, sizeof(buffer)/sizeof(buffer[0])/pFlac->channels, buffer)) > 0) { \ if (((totalPCMFrameCount + pcmFramesRead) * pFlac->channels * sizeof(type)) > sampleDataBufferSize) { \ type* pNewSampleData; \ size_t newSampleDataBufferSize; \ \ newSampleDataBufferSize = sampleDataBufferSize * 2; \ pNewSampleData = (type*)drflac__realloc_from_callbacks(pSampleData, newSampleDataBufferSize, sampleDataBufferSize, &pFlac->allocationCallbacks); \ if (pNewSampleData == NULL) { \ drflac__free_from_callbacks(pSampleData, &pFlac->allocationCallbacks); \ goto on_error; \ } \ \ sampleDataBufferSize = newSampleDataBufferSize; \ pSampleData = pNewSampleData; \ } \ \ DRFLAC_COPY_MEMORY(pSampleData + (totalPCMFrameCount*pFlac->channels), buffer, (size_t)(pcmFramesRead*pFlac->channels*sizeof(type))); \ totalPCMFrameCount += pcmFramesRead; \ } \ \ /* At this point everything should be decoded, but we just want to fill the unused part buffer with silence - need to \ protect those ears from random noise! */ \ DRFLAC_ZERO_MEMORY(pSampleData + (totalPCMFrameCount*pFlac->channels), (size_t)(sampleDataBufferSize - totalPCMFrameCount*pFlac->channels*sizeof(type))); \ } else { \ drflac_uint64 dataSize = totalPCMFrameCount*pFlac->channels*sizeof(type); \ if (dataSize > (drflac_uint64)DRFLAC_SIZE_MAX) { \ goto on_error; /* The decoded data is too big. */ \ } \ \ pSampleData = (type*)drflac__malloc_from_callbacks((size_t)dataSize, &pFlac->allocationCallbacks); /* <-- Safe cast as per the check above. */ \ if (pSampleData == NULL) { \ goto on_error; \ } \ \ totalPCMFrameCount = drflac_read_pcm_frames_##extension(pFlac, pFlac->totalPCMFrameCount, pSampleData); \ } \ \ if (sampleRateOut) *sampleRateOut = pFlac->sampleRate; \ if (channelsOut) *channelsOut = pFlac->channels; \ if (totalPCMFrameCountOut) *totalPCMFrameCountOut = totalPCMFrameCount; \ \ drflac_close(pFlac); \ return pSampleData; \ \ on_error: \ drflac_close(pFlac); \ return NULL; \ } DRFLAC_DEFINE_FULL_READ_AND_CLOSE(s32, drflac_int32) DRFLAC_DEFINE_FULL_READ_AND_CLOSE(s16, drflac_int16) DRFLAC_DEFINE_FULL_READ_AND_CLOSE(f32, float) DRFLAC_API drflac_int32* drflac_open_and_read_pcm_frames_s32(drflac_read_proc onRead, drflac_seek_proc onSeek, void* pUserData, unsigned int* channelsOut, unsigned int* sampleRateOut, drflac_uint64* totalPCMFrameCountOut, const drflac_allocation_callbacks* pAllocationCallbacks) { drflac* pFlac; if (channelsOut) { *channelsOut = 0; } if (sampleRateOut) { *sampleRateOut = 0; } if (totalPCMFrameCountOut) { *totalPCMFrameCountOut = 0; } pFlac = drflac_open(onRead, onSeek, pUserData, pAllocationCallbacks); if (pFlac == NULL) { return NULL; } return drflac__full_read_and_close_s32(pFlac, channelsOut, sampleRateOut, totalPCMFrameCountOut); } DRFLAC_API drflac_int16* drflac_open_and_read_pcm_frames_s16(drflac_read_proc onRead, drflac_seek_proc onSeek, void* pUserData, unsigned int* channelsOut, unsigned int* sampleRateOut, drflac_uint64* totalPCMFrameCountOut, const drflac_allocation_callbacks* pAllocationCallbacks) { drflac* pFlac; if (channelsOut) { *channelsOut = 0; } if (sampleRateOut) { *sampleRateOut = 0; } if (totalPCMFrameCountOut) { *totalPCMFrameCountOut = 0; } pFlac = drflac_open(onRead, onSeek, pUserData, pAllocationCallbacks); if (pFlac == NULL) { return NULL; } return drflac__full_read_and_close_s16(pFlac, channelsOut, sampleRateOut, totalPCMFrameCountOut); } DRFLAC_API float* drflac_open_and_read_pcm_frames_f32(drflac_read_proc onRead, drflac_seek_proc onSeek, void* pUserData, unsigned int* channelsOut, unsigned int* sampleRateOut, drflac_uint64* totalPCMFrameCountOut, const drflac_allocation_callbacks* pAllocationCallbacks) { drflac* pFlac; if (channelsOut) { *channelsOut = 0; } if (sampleRateOut) { *sampleRateOut = 0; } if (totalPCMFrameCountOut) { *totalPCMFrameCountOut = 0; } pFlac = drflac_open(onRead, onSeek, pUserData, pAllocationCallbacks); if (pFlac == NULL) { return NULL; } return drflac__full_read_and_close_f32(pFlac, channelsOut, sampleRateOut, totalPCMFrameCountOut); } #ifndef DR_FLAC_NO_STDIO DRFLAC_API drflac_int32* drflac_open_file_and_read_pcm_frames_s32(const char* filename, unsigned int* channels, unsigned int* sampleRate, drflac_uint64* totalPCMFrameCount, const drflac_allocation_callbacks* pAllocationCallbacks) { drflac* pFlac; if (sampleRate) { *sampleRate = 0; } if (channels) { *channels = 0; } if (totalPCMFrameCount) { *totalPCMFrameCount = 0; } pFlac = drflac_open_file(filename, pAllocationCallbacks); if (pFlac == NULL) { return NULL; } return drflac__full_read_and_close_s32(pFlac, channels, sampleRate, totalPCMFrameCount); } DRFLAC_API drflac_int16* drflac_open_file_and_read_pcm_frames_s16(const char* filename, unsigned int* channels, unsigned int* sampleRate, drflac_uint64* totalPCMFrameCount, const drflac_allocation_callbacks* pAllocationCallbacks) { drflac* pFlac; if (sampleRate) { *sampleRate = 0; } if (channels) { *channels = 0; } if (totalPCMFrameCount) { *totalPCMFrameCount = 0; } pFlac = drflac_open_file(filename, pAllocationCallbacks); if (pFlac == NULL) { return NULL; } return drflac__full_read_and_close_s16(pFlac, channels, sampleRate, totalPCMFrameCount); } DRFLAC_API float* drflac_open_file_and_read_pcm_frames_f32(const char* filename, unsigned int* channels, unsigned int* sampleRate, drflac_uint64* totalPCMFrameCount, const drflac_allocation_callbacks* pAllocationCallbacks) { drflac* pFlac; if (sampleRate) { *sampleRate = 0; } if (channels) { *channels = 0; } if (totalPCMFrameCount) { *totalPCMFrameCount = 0; } pFlac = drflac_open_file(filename, pAllocationCallbacks); if (pFlac == NULL) { return NULL; } return drflac__full_read_and_close_f32(pFlac, channels, sampleRate, totalPCMFrameCount); } #endif DRFLAC_API drflac_int32* drflac_open_memory_and_read_pcm_frames_s32(const void* data, size_t dataSize, unsigned int* channels, unsigned int* sampleRate, drflac_uint64* totalPCMFrameCount, const drflac_allocation_callbacks* pAllocationCallbacks) { drflac* pFlac; if (sampleRate) { *sampleRate = 0; } if (channels) { *channels = 0; } if (totalPCMFrameCount) { *totalPCMFrameCount = 0; } pFlac = drflac_open_memory(data, dataSize, pAllocationCallbacks); if (pFlac == NULL) { return NULL; } return drflac__full_read_and_close_s32(pFlac, channels, sampleRate, totalPCMFrameCount); } DRFLAC_API drflac_int16* drflac_open_memory_and_read_pcm_frames_s16(const void* data, size_t dataSize, unsigned int* channels, unsigned int* sampleRate, drflac_uint64* totalPCMFrameCount, const drflac_allocation_callbacks* pAllocationCallbacks) { drflac* pFlac; if (sampleRate) { *sampleRate = 0; } if (channels) { *channels = 0; } if (totalPCMFrameCount) { *totalPCMFrameCount = 0; } pFlac = drflac_open_memory(data, dataSize, pAllocationCallbacks); if (pFlac == NULL) { return NULL; } return drflac__full_read_and_close_s16(pFlac, channels, sampleRate, totalPCMFrameCount); } DRFLAC_API float* drflac_open_memory_and_read_pcm_frames_f32(const void* data, size_t dataSize, unsigned int* channels, unsigned int* sampleRate, drflac_uint64* totalPCMFrameCount, const drflac_allocation_callbacks* pAllocationCallbacks) { drflac* pFlac; if (sampleRate) { *sampleRate = 0; } if (channels) { *channels = 0; } if (totalPCMFrameCount) { *totalPCMFrameCount = 0; } pFlac = drflac_open_memory(data, dataSize, pAllocationCallbacks); if (pFlac == NULL) { return NULL; } return drflac__full_read_and_close_f32(pFlac, channels, sampleRate, totalPCMFrameCount); } DRFLAC_API void drflac_free(void* p, const drflac_allocation_callbacks* pAllocationCallbacks) { if (pAllocationCallbacks != NULL) { drflac__free_from_callbacks(p, pAllocationCallbacks); } else { drflac__free_default(p, NULL); } } DRFLAC_API void drflac_init_vorbis_comment_iterator(drflac_vorbis_comment_iterator* pIter, drflac_uint32 commentCount, const void* pComments) { if (pIter == NULL) { return; } pIter->countRemaining = commentCount; pIter->pRunningData = (const char*)pComments; } DRFLAC_API const char* drflac_next_vorbis_comment(drflac_vorbis_comment_iterator* pIter, drflac_uint32* pCommentLengthOut) { drflac_int32 length; const char* pComment; /* Safety. */ if (pCommentLengthOut) { *pCommentLengthOut = 0; } if (pIter == NULL || pIter->countRemaining == 0 || pIter->pRunningData == NULL) { return NULL; } length = drflac__le2host_32_ptr_unaligned(pIter->pRunningData); pIter->pRunningData += 4; pComment = pIter->pRunningData; pIter->pRunningData += length; pIter->countRemaining -= 1; if (pCommentLengthOut) { *pCommentLengthOut = length; } return pComment; } DRFLAC_API void drflac_init_cuesheet_track_iterator(drflac_cuesheet_track_iterator* pIter, drflac_uint32 trackCount, const void* pTrackData) { if (pIter == NULL) { return; } pIter->countRemaining = trackCount; pIter->pRunningData = (const char*)pTrackData; } DRFLAC_API drflac_bool32 drflac_next_cuesheet_track(drflac_cuesheet_track_iterator* pIter, drflac_cuesheet_track* pCuesheetTrack) { drflac_cuesheet_track cuesheetTrack; const char* pRunningData; drflac_uint64 offsetHi; drflac_uint64 offsetLo; if (pIter == NULL || pIter->countRemaining == 0 || pIter->pRunningData == NULL) { return DRFLAC_FALSE; } pRunningData = pIter->pRunningData; offsetHi = drflac__be2host_32(*(const drflac_uint32*)pRunningData); pRunningData += 4; offsetLo = drflac__be2host_32(*(const drflac_uint32*)pRunningData); pRunningData += 4; cuesheetTrack.offset = offsetLo | (offsetHi << 32); cuesheetTrack.trackNumber = pRunningData[0]; pRunningData += 1; DRFLAC_COPY_MEMORY(cuesheetTrack.ISRC, pRunningData, sizeof(cuesheetTrack.ISRC)); pRunningData += 12; cuesheetTrack.isAudio = (pRunningData[0] & 0x80) != 0; cuesheetTrack.preEmphasis = (pRunningData[0] & 0x40) != 0; pRunningData += 14; cuesheetTrack.indexCount = pRunningData[0]; pRunningData += 1; cuesheetTrack.pIndexPoints = (const drflac_cuesheet_track_index*)pRunningData; pRunningData += cuesheetTrack.indexCount * sizeof(drflac_cuesheet_track_index); pIter->pRunningData = pRunningData; pIter->countRemaining -= 1; if (pCuesheetTrack) { *pCuesheetTrack = cuesheetTrack; } return DRFLAC_TRUE; } #if defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))) #pragma GCC diagnostic pop #endif #endif /* dr_flac_c */ #endif /* DR_FLAC_IMPLEMENTATION */ /* REVISION HISTORY ================ v0.12.38 - 2022-04-10 - Fix compilation error on older versions of GCC. v0.12.37 - 2022-02-12 - Improve ARM detection. v0.12.36 - 2022-02-07 - Fix a compilation error with the ARM build. v0.12.35 - 2022-02-06 - Fix a bug due to underestimating the amount of precision required for the prediction stage. - Fix some bugs found from fuzz testing. v0.12.34 - 2022-01-07 - Fix some misalignment bugs when reading metadata. v0.12.33 - 2021-12-22 - Fix a bug with seeking when the seek table does not start at PCM frame 0. v0.12.32 - 2021-12-11 - Fix a warning with Clang. v0.12.31 - 2021-08-16 - Silence some warnings. v0.12.30 - 2021-07-31 - Fix platform detection for ARM64. v0.12.29 - 2021-04-02 - Fix a bug where the running PCM frame index is set to an invalid value when over-seeking. - Fix a decoding error due to an incorrect validation check. v0.12.28 - 2021-02-21 - Fix a warning due to referencing _MSC_VER when it is undefined. v0.12.27 - 2021-01-31 - Fix a static analysis warning. v0.12.26 - 2021-01-17 - Fix a compilation warning due to _BSD_SOURCE being deprecated. v0.12.25 - 2020-12-26 - Update documentation. v0.12.24 - 2020-11-29 - Fix ARM64/NEON detection when compiling with MSVC. v0.12.23 - 2020-11-21 - Fix compilation with OpenWatcom. v0.12.22 - 2020-11-01 - Fix an error with the previous release. v0.12.21 - 2020-11-01 - Fix a possible deadlock when seeking. - Improve compiler support for older versions of GCC. v0.12.20 - 2020-09-08 - Fix a compilation error on older compilers. v0.12.19 - 2020-08-30 - Fix a bug due to an undefined 32-bit shift. v0.12.18 - 2020-08-14 - Fix a crash when compiling with clang-cl. v0.12.17 - 2020-08-02 - Simplify sized types. v0.12.16 - 2020-07-25 - Fix a compilation warning. v0.12.15 - 2020-07-06 - Check for negative LPC shifts and return an error. v0.12.14 - 2020-06-23 - Add include guard for the implementation section. v0.12.13 - 2020-05-16 - Add compile-time and run-time version querying. - DRFLAC_VERSION_MINOR - DRFLAC_VERSION_MAJOR - DRFLAC_VERSION_REVISION - DRFLAC_VERSION_STRING - drflac_version() - drflac_version_string() v0.12.12 - 2020-04-30 - Fix compilation errors with VC6. v0.12.11 - 2020-04-19 - Fix some pedantic warnings. - Fix some undefined behaviour warnings. v0.12.10 - 2020-04-10 - Fix some bugs when trying to seek with an invalid seek table. v0.12.9 - 2020-04-05 - Fix warnings. v0.12.8 - 2020-04-04 - Add drflac_open_file_w() and drflac_open_file_with_metadata_w(). - Fix some static analysis warnings. - Minor documentation updates. v0.12.7 - 2020-03-14 - Fix compilation errors with VC6. v0.12.6 - 2020-03-07 - Fix compilation error with Visual Studio .NET 2003. v0.12.5 - 2020-01-30 - Silence some static analysis warnings. v0.12.4 - 2020-01-29 - Silence some static analysis warnings. v0.12.3 - 2019-12-02 - Fix some warnings when compiling with GCC and the -Og flag. - Fix a crash in out-of-memory situations. - Fix potential integer overflow bug. - Fix some static analysis warnings. - Fix a possible crash when using custom memory allocators without a custom realloc() implementation. - Fix a bug with binary search seeking where the bits per sample is not a multiple of 8. v0.12.2 - 2019-10-07 - Internal code clean up. v0.12.1 - 2019-09-29 - Fix some Clang Static Analyzer warnings. - Fix an unused variable warning. v0.12.0 - 2019-09-23 - API CHANGE: Add support for user defined memory allocation routines. This system allows the program to specify their own memory allocation routines with a user data pointer for client-specific contextual data. This adds an extra parameter to the end of the following APIs: - drflac_open() - drflac_open_relaxed() - drflac_open_with_metadata() - drflac_open_with_metadata_relaxed() - drflac_open_file() - drflac_open_file_with_metadata() - drflac_open_memory() - drflac_open_memory_with_metadata() - drflac_open_and_read_pcm_frames_s32() - drflac_open_and_read_pcm_frames_s16() - drflac_open_and_read_pcm_frames_f32() - drflac_open_file_and_read_pcm_frames_s32() - drflac_open_file_and_read_pcm_frames_s16() - drflac_open_file_and_read_pcm_frames_f32() - drflac_open_memory_and_read_pcm_frames_s32() - drflac_open_memory_and_read_pcm_frames_s16() - drflac_open_memory_and_read_pcm_frames_f32() Set this extra parameter to NULL to use defaults which is the same as the previous behaviour. Setting this NULL will use DRFLAC_MALLOC, DRFLAC_REALLOC and DRFLAC_FREE. - Remove deprecated APIs: - drflac_read_s32() - drflac_read_s16() - drflac_read_f32() - drflac_seek_to_sample() - drflac_open_and_decode_s32() - drflac_open_and_decode_s16() - drflac_open_and_decode_f32() - drflac_open_and_decode_file_s32() - drflac_open_and_decode_file_s16() - drflac_open_and_decode_file_f32() - drflac_open_and_decode_memory_s32() - drflac_open_and_decode_memory_s16() - drflac_open_and_decode_memory_f32() - Remove drflac.totalSampleCount which is now replaced with drflac.totalPCMFrameCount. You can emulate drflac.totalSampleCount by doing pFlac->totalPCMFrameCount*pFlac->channels. - Rename drflac.currentFrame to drflac.currentFLACFrame to remove ambiguity with PCM frames. - Fix errors when seeking to the end of a stream. - Optimizations to seeking. - SSE improvements and optimizations. - ARM NEON optimizations. - Optimizations to drflac_read_pcm_frames_s16(). - Optimizations to drflac_read_pcm_frames_s32(). v0.11.10 - 2019-06-26 - Fix a compiler error. v0.11.9 - 2019-06-16 - Silence some ThreadSanitizer warnings. v0.11.8 - 2019-05-21 - Fix warnings. v0.11.7 - 2019-05-06 - C89 fixes. v0.11.6 - 2019-05-05 - Add support for C89. - Fix a compiler warning when CRC is disabled. - Change license to choice of public domain or MIT-0. v0.11.5 - 2019-04-19 - Fix a compiler error with GCC. v0.11.4 - 2019-04-17 - Fix some warnings with GCC when compiling with -std=c99. v0.11.3 - 2019-04-07 - Silence warnings with GCC. v0.11.2 - 2019-03-10 - Fix a warning. v0.11.1 - 2019-02-17 - Fix a potential bug with seeking. v0.11.0 - 2018-12-16 - API CHANGE: Deprecated drflac_read_s32(), drflac_read_s16() and drflac_read_f32() and replaced them with drflac_read_pcm_frames_s32(), drflac_read_pcm_frames_s16() and drflac_read_pcm_frames_f32(). The new APIs take and return PCM frame counts instead of sample counts. To upgrade you will need to change the input count by dividing it by the channel count, and then do the same with the return value. - API_CHANGE: Deprecated drflac_seek_to_sample() and replaced with drflac_seek_to_pcm_frame(). Same rules as the changes to drflac_read_*() apply. - API CHANGE: Deprecated drflac_open_and_decode_*() and replaced with drflac_open_*_and_read_*(). Same rules as the changes to drflac_read_*() apply. - Optimizations. v0.10.0 - 2018-09-11 - Remove the DR_FLAC_NO_WIN32_IO option and the Win32 file IO functionality. If you need to use Win32 file IO you need to do it yourself via the callback API. - Fix the clang build. - Fix undefined behavior. - Fix errors with CUESHEET metdata blocks. - Add an API for iterating over each cuesheet track in the CUESHEET metadata block. This works the same way as the Vorbis comment API. - Other miscellaneous bug fixes, mostly relating to invalid FLAC streams. - Minor optimizations. v0.9.11 - 2018-08-29 - Fix a bug with sample reconstruction. v0.9.10 - 2018-08-07 - Improve 64-bit detection. v0.9.9 - 2018-08-05 - Fix C++ build on older versions of GCC. v0.9.8 - 2018-07-24 - Fix compilation errors. v0.9.7 - 2018-07-05 - Fix a warning. v0.9.6 - 2018-06-29 - Fix some typos. v0.9.5 - 2018-06-23 - Fix some warnings. v0.9.4 - 2018-06-14 - Optimizations to seeking. - Clean up. v0.9.3 - 2018-05-22 - Bug fix. v0.9.2 - 2018-05-12 - Fix a compilation error due to a missing break statement. v0.9.1 - 2018-04-29 - Fix compilation error with Clang. v0.9 - 2018-04-24 - Fix Clang build. - Start using major.minor.revision versioning. v0.8g - 2018-04-19 - Fix build on non-x86/x64 architectures. v0.8f - 2018-02-02 - Stop pretending to support changing rate/channels mid stream. v0.8e - 2018-02-01 - Fix a crash when the block size of a frame is larger than the maximum block size defined by the FLAC stream. - Fix a crash the the Rice partition order is invalid. v0.8d - 2017-09-22 - Add support for decoding streams with ID3 tags. ID3 tags are just skipped. v0.8c - 2017-09-07 - Fix warning on non-x86/x64 architectures. v0.8b - 2017-08-19 - Fix build on non-x86/x64 architectures. v0.8a - 2017-08-13 - A small optimization for the Clang build. v0.8 - 2017-08-12 - API CHANGE: Rename dr_* types to drflac_*. - Optimizations. This brings dr_flac back to about the same class of efficiency as the reference implementation. - Add support for custom implementations of malloc(), realloc(), etc. - Add CRC checking to Ogg encapsulated streams. - Fix VC++ 6 build. This is only for the C++ compiler. The C compiler is not currently supported. - Bug fixes. v0.7 - 2017-07-23 - Add support for opening a stream without a header block. To do this, use drflac_open_relaxed() / drflac_open_with_metadata_relaxed(). v0.6 - 2017-07-22 - Add support for recovering from invalid frames. With this change, dr_flac will simply skip over invalid frames as if they never existed. Frames are checked against their sync code, the CRC-8 of the frame header and the CRC-16 of the whole frame. v0.5 - 2017-07-16 - Fix typos. - Change drflac_bool* types to unsigned. - Add CRC checking. This makes dr_flac slower, but can be disabled with #define DR_FLAC_NO_CRC. v0.4f - 2017-03-10 - Fix a couple of bugs with the bitstreaming code. v0.4e - 2017-02-17 - Fix some warnings. v0.4d - 2016-12-26 - Add support for 32-bit floating-point PCM decoding. - Use drflac_int* and drflac_uint* sized types to improve compiler support. - Minor improvements to documentation. v0.4c - 2016-12-26 - Add support for signed 16-bit integer PCM decoding. v0.4b - 2016-10-23 - A minor change to drflac_bool8 and drflac_bool32 types. v0.4a - 2016-10-11 - Rename drBool32 to drflac_bool32 for styling consistency. v0.4 - 2016-09-29 - API/ABI CHANGE: Use fixed size 32-bit booleans instead of the built-in bool type. - API CHANGE: Rename drflac_open_and_decode*() to drflac_open_and_decode*_s32(). - API CHANGE: Swap the order of "channels" and "sampleRate" parameters in drflac_open_and_decode*(). Rationale for this is to keep it consistent with drflac_audio. v0.3f - 2016-09-21 - Fix a warning with GCC. v0.3e - 2016-09-18 - Fixed a bug where GCC 4.3+ was not getting properly identified. - Fixed a few typos. - Changed date formats to ISO 8601 (YYYY-MM-DD). v0.3d - 2016-06-11 - Minor clean up. v0.3c - 2016-05-28 - Fixed compilation error. v0.3b - 2016-05-16 - Fixed Linux/GCC build. - Updated documentation. v0.3a - 2016-05-15 - Minor fixes to documentation. v0.3 - 2016-05-11 - Optimizations. Now at about parity with the reference implementation on 32-bit builds. - Lots of clean up. v0.2b - 2016-05-10 - Bug fixes. v0.2a - 2016-05-10 - Made drflac_open_and_decode() more robust. - Removed an unused debugging variable v0.2 - 2016-05-09 - Added support for Ogg encapsulation. - API CHANGE. Have the onSeek callback take a third argument which specifies whether or not the seek should be relative to the start or the current position. Also changes the seeking rules such that seeking offsets will never be negative. - Have drflac_open_and_decode() fail gracefully if the stream has an unknown total sample count. v0.1b - 2016-05-07 - Properly close the file handle in drflac_open_file() and family when the decoder fails to initialize. - Removed a stale comment. v0.1a - 2016-05-05 - Minor formatting changes. - Fixed a warning on the GCC build. v0.1 - 2016-05-03 - Initial versioned release. */ /* This software is available as a choice of the following licenses. Choose whichever you prefer. =============================================================================== ALTERNATIVE 1 - Public Domain (www.unlicense.org) =============================================================================== This is free and unencumbered software released into the public domain. Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means. In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. For more information, please refer to =============================================================================== ALTERNATIVE 2 - MIT No Attribution =============================================================================== Copyright 2020 David Reid Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ ================================================ FILE: src/libraries/dr/dr_mp3.h ================================================ /* MP3 audio decoder. Choice of public domain or MIT-0. See license statements at the end of this file. dr_mp3 - v0.6.34 - 2022-09-17 David Reid - mackron@gmail.com GitHub: https://github.com/mackron/dr_libs Based on minimp3 (https://github.com/lieff/minimp3) which is where the real work was done. See the bottom of this file for differences between minimp3 and dr_mp3. */ /* RELEASE NOTES - VERSION 0.6 =========================== Version 0.6 includes breaking changes with the configuration of decoders. The ability to customize the number of output channels and the sample rate has been removed. You must now use the channel count and sample rate reported by the MP3 stream itself, and all channel and sample rate conversion must be done yourself. Changes to Initialization ------------------------- Previously, `drmp3_init()`, etc. took a pointer to a `drmp3_config` object that allowed you to customize the output channels and sample rate. This has been removed. If you need the old behaviour you will need to convert the data yourself or just not upgrade. The following APIs have changed. `drmp3_init()` `drmp3_init_memory()` `drmp3_init_file()` Miscellaneous Changes --------------------- Support for loading a file from a `wchar_t` string has been added via the `drmp3_init_file_w()` API. */ /* Introducation ============= dr_mp3 is a single file library. To use it, do something like the following in one .c file. ```c #define DR_MP3_IMPLEMENTATION #include "dr_mp3.h" ``` You can then #include this file in other parts of the program as you would with any other header file. To decode audio data, do something like the following: ```c drmp3 mp3; if (!drmp3_init_file(&mp3, "MySong.mp3", NULL)) { // Failed to open file } ... drmp3_uint64 framesRead = drmp3_read_pcm_frames_f32(pMP3, framesToRead, pFrames); ``` The drmp3 object is transparent so you can get access to the channel count and sample rate like so: ``` drmp3_uint32 channels = mp3.channels; drmp3_uint32 sampleRate = mp3.sampleRate; ``` The example above initializes a decoder from a file, but you can also initialize it from a block of memory and read and seek callbacks with `drmp3_init_memory()` and `drmp3_init()` respectively. You do not need to do any annoying memory management when reading PCM frames - this is all managed internally. You can request any number of PCM frames in each call to `drmp3_read_pcm_frames_f32()` and it will return as many PCM frames as it can, up to the requested amount. You can also decode an entire file in one go with `drmp3_open_and_read_pcm_frames_f32()`, `drmp3_open_memory_and_read_pcm_frames_f32()` and `drmp3_open_file_and_read_pcm_frames_f32()`. Build Options ============= #define these options before including this file. #define DR_MP3_NO_STDIO Disable drmp3_init_file(), etc. #define DR_MP3_NO_SIMD Disable SIMD optimizations. */ #ifndef dr_mp3_h #define dr_mp3_h #ifdef __cplusplus extern "C" { #endif #define DRMP3_STRINGIFY(x) #x #define DRMP3_XSTRINGIFY(x) DRMP3_STRINGIFY(x) #define DRMP3_VERSION_MAJOR 0 #define DRMP3_VERSION_MINOR 6 #define DRMP3_VERSION_REVISION 34 #define DRMP3_VERSION_STRING DRMP3_XSTRINGIFY(DRMP3_VERSION_MAJOR) "." DRMP3_XSTRINGIFY(DRMP3_VERSION_MINOR) "." DRMP3_XSTRINGIFY(DRMP3_VERSION_REVISION) #include /* For size_t. */ /* Sized types. */ typedef signed char drmp3_int8; typedef unsigned char drmp3_uint8; typedef signed short drmp3_int16; typedef unsigned short drmp3_uint16; typedef signed int drmp3_int32; typedef unsigned int drmp3_uint32; #if defined(_MSC_VER) && !defined(__clang__) typedef signed __int64 drmp3_int64; typedef unsigned __int64 drmp3_uint64; #else #if defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wlong-long" #if defined(__clang__) #pragma GCC diagnostic ignored "-Wc++11-long-long" #endif #endif typedef signed long long drmp3_int64; typedef unsigned long long drmp3_uint64; #if defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))) #pragma GCC diagnostic pop #endif #endif #if defined(__LP64__) || defined(_WIN64) || (defined(__x86_64__) && !defined(__ILP32__)) || defined(_M_X64) || defined(__ia64) || defined (_M_IA64) || defined(__aarch64__) || defined(_M_ARM64) || defined(__powerpc64__) typedef drmp3_uint64 drmp3_uintptr; #else typedef drmp3_uint32 drmp3_uintptr; #endif typedef drmp3_uint8 drmp3_bool8; typedef drmp3_uint32 drmp3_bool32; #define DRMP3_TRUE 1 #define DRMP3_FALSE 0 #if !defined(DRMP3_API) #if defined(DRMP3_DLL) #if defined(_WIN32) #define DRMP3_DLL_IMPORT __declspec(dllimport) #define DRMP3_DLL_EXPORT __declspec(dllexport) #define DRMP3_DLL_PRIVATE static #else #if defined(__GNUC__) && __GNUC__ >= 4 #define DRMP3_DLL_IMPORT __attribute__((visibility("default"))) #define DRMP3_DLL_EXPORT __attribute__((visibility("default"))) #define DRMP3_DLL_PRIVATE __attribute__((visibility("hidden"))) #else #define DRMP3_DLL_IMPORT #define DRMP3_DLL_EXPORT #define DRMP3_DLL_PRIVATE static #endif #endif #if defined(DR_MP3_IMPLEMENTATION) || defined(DRMP3_IMPLEMENTATION) #define DRMP3_API DRMP3_DLL_EXPORT #else #define DRMP3_API DRMP3_DLL_IMPORT #endif #define DRMP3_PRIVATE DRMP3_DLL_PRIVATE #else #define DRMP3_API extern #define DRMP3_PRIVATE static #endif #endif typedef drmp3_int32 drmp3_result; #define DRMP3_SUCCESS 0 #define DRMP3_ERROR -1 /* A generic error. */ #define DRMP3_INVALID_ARGS -2 #define DRMP3_INVALID_OPERATION -3 #define DRMP3_OUT_OF_MEMORY -4 #define DRMP3_OUT_OF_RANGE -5 #define DRMP3_ACCESS_DENIED -6 #define DRMP3_DOES_NOT_EXIST -7 #define DRMP3_ALREADY_EXISTS -8 #define DRMP3_TOO_MANY_OPEN_FILES -9 #define DRMP3_INVALID_FILE -10 #define DRMP3_TOO_BIG -11 #define DRMP3_PATH_TOO_LONG -12 #define DRMP3_NAME_TOO_LONG -13 #define DRMP3_NOT_DIRECTORY -14 #define DRMP3_IS_DIRECTORY -15 #define DRMP3_DIRECTORY_NOT_EMPTY -16 #define DRMP3_END_OF_FILE -17 #define DRMP3_NO_SPACE -18 #define DRMP3_BUSY -19 #define DRMP3_IO_ERROR -20 #define DRMP3_INTERRUPT -21 #define DRMP3_UNAVAILABLE -22 #define DRMP3_ALREADY_IN_USE -23 #define DRMP3_BAD_ADDRESS -24 #define DRMP3_BAD_SEEK -25 #define DRMP3_BAD_PIPE -26 #define DRMP3_DEADLOCK -27 #define DRMP3_TOO_MANY_LINKS -28 #define DRMP3_NOT_IMPLEMENTED -29 #define DRMP3_NO_MESSAGE -30 #define DRMP3_BAD_MESSAGE -31 #define DRMP3_NO_DATA_AVAILABLE -32 #define DRMP3_INVALID_DATA -33 #define DRMP3_TIMEOUT -34 #define DRMP3_NO_NETWORK -35 #define DRMP3_NOT_UNIQUE -36 #define DRMP3_NOT_SOCKET -37 #define DRMP3_NO_ADDRESS -38 #define DRMP3_BAD_PROTOCOL -39 #define DRMP3_PROTOCOL_UNAVAILABLE -40 #define DRMP3_PROTOCOL_NOT_SUPPORTED -41 #define DRMP3_PROTOCOL_FAMILY_NOT_SUPPORTED -42 #define DRMP3_ADDRESS_FAMILY_NOT_SUPPORTED -43 #define DRMP3_SOCKET_NOT_SUPPORTED -44 #define DRMP3_CONNECTION_RESET -45 #define DRMP3_ALREADY_CONNECTED -46 #define DRMP3_NOT_CONNECTED -47 #define DRMP3_CONNECTION_REFUSED -48 #define DRMP3_NO_HOST -49 #define DRMP3_IN_PROGRESS -50 #define DRMP3_CANCELLED -51 #define DRMP3_MEMORY_ALREADY_MAPPED -52 #define DRMP3_AT_END -53 #define DRMP3_MAX_PCM_FRAMES_PER_MP3_FRAME 1152 #define DRMP3_MAX_SAMPLES_PER_FRAME (DRMP3_MAX_PCM_FRAMES_PER_MP3_FRAME*2) #ifdef _MSC_VER #define DRMP3_INLINE __forceinline #elif defined(__GNUC__) /* I've had a bug report where GCC is emitting warnings about functions possibly not being inlineable. This warning happens when the __attribute__((always_inline)) attribute is defined without an "inline" statement. I think therefore there must be some case where "__inline__" is not always defined, thus the compiler emitting these warnings. When using -std=c89 or -ansi on the command line, we cannot use the "inline" keyword and instead need to use "__inline__". In an attempt to work around this issue I am using "__inline__" only when we're compiling in strict ANSI mode. */ #if defined(__STRICT_ANSI__) #define DRMP3_GNUC_INLINE_HINT __inline__ #else #define DRMP3_GNUC_INLINE_HINT inline #endif #if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)) || defined(__clang__) #define DRMP3_INLINE DRMP3_GNUC_INLINE_HINT __attribute__((always_inline)) #else #define DRMP3_INLINE DRMP3_GNUC_INLINE_HINT #endif #elif defined(__WATCOMC__) #define DRMP3_INLINE __inline #else #define DRMP3_INLINE #endif DRMP3_API void drmp3_version(drmp3_uint32* pMajor, drmp3_uint32* pMinor, drmp3_uint32* pRevision); DRMP3_API const char* drmp3_version_string(void); /* Low Level Push API ================== */ typedef struct { int frame_bytes, channels, hz, layer, bitrate_kbps; } drmp3dec_frame_info; typedef struct { float mdct_overlap[2][9*32], qmf_state[15*2*32]; int reserv, free_format_bytes; drmp3_uint8 header[4], reserv_buf[511]; } drmp3dec; /* Initializes a low level decoder. */ DRMP3_API void drmp3dec_init(drmp3dec *dec); /* Reads a frame from a low level decoder. */ DRMP3_API int drmp3dec_decode_frame(drmp3dec *dec, const drmp3_uint8 *mp3, int mp3_bytes, void *pcm, drmp3dec_frame_info *info); /* Helper for converting between f32 and s16. */ DRMP3_API void drmp3dec_f32_to_s16(const float *in, drmp3_int16 *out, size_t num_samples); /* Main API (Pull API) =================== */ typedef enum { drmp3_seek_origin_start, drmp3_seek_origin_current } drmp3_seek_origin; typedef struct { drmp3_uint64 seekPosInBytes; /* Points to the first byte of an MP3 frame. */ drmp3_uint64 pcmFrameIndex; /* The index of the PCM frame this seek point targets. */ drmp3_uint16 mp3FramesToDiscard; /* The number of whole MP3 frames to be discarded before pcmFramesToDiscard. */ drmp3_uint16 pcmFramesToDiscard; /* The number of leading samples to read and discard. These are discarded after mp3FramesToDiscard. */ } drmp3_seek_point; /* Callback for when data is read. Return value is the number of bytes actually read. pUserData [in] The user data that was passed to drmp3_init(), drmp3_open() and family. pBufferOut [out] The output buffer. bytesToRead [in] The number of bytes to read. Returns the number of bytes actually read. A return value of less than bytesToRead indicates the end of the stream. Do _not_ return from this callback until either the entire bytesToRead is filled or you have reached the end of the stream. */ typedef size_t (* drmp3_read_proc)(void* pUserData, void* pBufferOut, size_t bytesToRead); /* Callback for when data needs to be seeked. pUserData [in] The user data that was passed to drmp3_init(), drmp3_open() and family. offset [in] The number of bytes to move, relative to the origin. Will never be negative. origin [in] The origin of the seek - the current position or the start of the stream. Returns whether or not the seek was successful. Whether or not it is relative to the beginning or current position is determined by the "origin" parameter which will be either drmp3_seek_origin_start or drmp3_seek_origin_current. */ typedef drmp3_bool32 (* drmp3_seek_proc)(void* pUserData, int offset, drmp3_seek_origin origin); typedef struct { void* pUserData; void* (* onMalloc)(size_t sz, void* pUserData); void* (* onRealloc)(void* p, size_t sz, void* pUserData); void (* onFree)(void* p, void* pUserData); } drmp3_allocation_callbacks; typedef struct { drmp3_uint32 channels; drmp3_uint32 sampleRate; } drmp3_config; typedef struct { drmp3dec decoder; drmp3_uint32 channels; drmp3_uint32 sampleRate; drmp3_read_proc onRead; drmp3_seek_proc onSeek; void* pUserData; drmp3_allocation_callbacks allocationCallbacks; drmp3_uint32 mp3FrameChannels; /* The number of channels in the currently loaded MP3 frame. Internal use only. */ drmp3_uint32 mp3FrameSampleRate; /* The sample rate of the currently loaded MP3 frame. Internal use only. */ drmp3_uint32 pcmFramesConsumedInMP3Frame; drmp3_uint32 pcmFramesRemainingInMP3Frame; drmp3_uint8 pcmFrames[sizeof(float)*DRMP3_MAX_SAMPLES_PER_FRAME]; /* <-- Multipled by sizeof(float) to ensure there's enough room for DR_MP3_FLOAT_OUTPUT. */ drmp3_uint64 currentPCMFrame; /* The current PCM frame, globally, based on the output sample rate. Mainly used for seeking. */ drmp3_uint64 streamCursor; /* The current byte the decoder is sitting on in the raw stream. */ drmp3_seek_point* pSeekPoints; /* NULL by default. Set with drmp3_bind_seek_table(). Memory is owned by the client. dr_mp3 will never attempt to free this pointer. */ drmp3_uint32 seekPointCount; /* The number of items in pSeekPoints. When set to 0 assumes to no seek table. Defaults to zero. */ size_t dataSize; size_t dataCapacity; size_t dataConsumed; drmp3_uint8* pData; drmp3_bool32 atEnd : 1; struct { const drmp3_uint8* pData; size_t dataSize; size_t currentReadPos; } memory; /* Only used for decoders that were opened against a block of memory. */ } drmp3; /* Initializes an MP3 decoder. onRead [in] The function to call when data needs to be read from the client. onSeek [in] The function to call when the read position of the client data needs to move. pUserData [in, optional] A pointer to application defined data that will be passed to onRead and onSeek. Returns true if successful; false otherwise. Close the loader with drmp3_uninit(). See also: drmp3_init_file(), drmp3_init_memory(), drmp3_uninit() */ DRMP3_API drmp3_bool32 drmp3_init(drmp3* pMP3, drmp3_read_proc onRead, drmp3_seek_proc onSeek, void* pUserData, const drmp3_allocation_callbacks* pAllocationCallbacks); /* Initializes an MP3 decoder from a block of memory. This does not create a copy of the data. It is up to the application to ensure the buffer remains valid for the lifetime of the drmp3 object. The buffer should contain the contents of the entire MP3 file. */ DRMP3_API drmp3_bool32 drmp3_init_memory(drmp3* pMP3, const void* pData, size_t dataSize, const drmp3_allocation_callbacks* pAllocationCallbacks); #ifndef DR_MP3_NO_STDIO /* Initializes an MP3 decoder from a file. This holds the internal FILE object until drmp3_uninit() is called. Keep this in mind if you're caching drmp3 objects because the operating system may restrict the number of file handles an application can have open at any given time. */ DRMP3_API drmp3_bool32 drmp3_init_file(drmp3* pMP3, const char* pFilePath, const drmp3_allocation_callbacks* pAllocationCallbacks); DRMP3_API drmp3_bool32 drmp3_init_file_w(drmp3* pMP3, const wchar_t* pFilePath, const drmp3_allocation_callbacks* pAllocationCallbacks); #endif /* Uninitializes an MP3 decoder. */ DRMP3_API void drmp3_uninit(drmp3* pMP3); /* Reads PCM frames as interleaved 32-bit IEEE floating point PCM. Note that framesToRead specifies the number of PCM frames to read, _not_ the number of MP3 frames. */ DRMP3_API drmp3_uint64 drmp3_read_pcm_frames_f32(drmp3* pMP3, drmp3_uint64 framesToRead, float* pBufferOut); /* Reads PCM frames as interleaved signed 16-bit integer PCM. Note that framesToRead specifies the number of PCM frames to read, _not_ the number of MP3 frames. */ DRMP3_API drmp3_uint64 drmp3_read_pcm_frames_s16(drmp3* pMP3, drmp3_uint64 framesToRead, drmp3_int16* pBufferOut); /* Seeks to a specific frame. Note that this is _not_ an MP3 frame, but rather a PCM frame. */ DRMP3_API drmp3_bool32 drmp3_seek_to_pcm_frame(drmp3* pMP3, drmp3_uint64 frameIndex); /* Calculates the total number of PCM frames in the MP3 stream. Cannot be used for infinite streams such as internet radio. Runs in linear time. Returns 0 on error. */ DRMP3_API drmp3_uint64 drmp3_get_pcm_frame_count(drmp3* pMP3); /* Calculates the total number of MP3 frames in the MP3 stream. Cannot be used for infinite streams such as internet radio. Runs in linear time. Returns 0 on error. */ DRMP3_API drmp3_uint64 drmp3_get_mp3_frame_count(drmp3* pMP3); /* Calculates the total number of MP3 and PCM frames in the MP3 stream. Cannot be used for infinite streams such as internet radio. Runs in linear time. Returns 0 on error. This is equivalent to calling drmp3_get_mp3_frame_count() and drmp3_get_pcm_frame_count() except that it's more efficient. */ DRMP3_API drmp3_bool32 drmp3_get_mp3_and_pcm_frame_count(drmp3* pMP3, drmp3_uint64* pMP3FrameCount, drmp3_uint64* pPCMFrameCount); /* Calculates the seekpoints based on PCM frames. This is slow. pSeekpoint count is a pointer to a uint32 containing the seekpoint count. On input it contains the desired count. On output it contains the actual count. The reason for this design is that the client may request too many seekpoints, in which case dr_mp3 will return a corrected count. Note that seektable seeking is not quite sample exact when the MP3 stream contains inconsistent sample rates. */ DRMP3_API drmp3_bool32 drmp3_calculate_seek_points(drmp3* pMP3, drmp3_uint32* pSeekPointCount, drmp3_seek_point* pSeekPoints); /* Binds a seek table to the decoder. This does _not_ make a copy of pSeekPoints - it only references it. It is up to the application to ensure this remains valid while it is bound to the decoder. Use drmp3_calculate_seek_points() to calculate the seek points. */ DRMP3_API drmp3_bool32 drmp3_bind_seek_table(drmp3* pMP3, drmp3_uint32 seekPointCount, drmp3_seek_point* pSeekPoints); /* Opens an decodes an entire MP3 stream as a single operation. On output pConfig will receive the channel count and sample rate of the stream. Free the returned pointer with drmp3_free(). */ DRMP3_API float* drmp3_open_and_read_pcm_frames_f32(drmp3_read_proc onRead, drmp3_seek_proc onSeek, void* pUserData, drmp3_config* pConfig, drmp3_uint64* pTotalFrameCount, const drmp3_allocation_callbacks* pAllocationCallbacks); DRMP3_API drmp3_int16* drmp3_open_and_read_pcm_frames_s16(drmp3_read_proc onRead, drmp3_seek_proc onSeek, void* pUserData, drmp3_config* pConfig, drmp3_uint64* pTotalFrameCount, const drmp3_allocation_callbacks* pAllocationCallbacks); DRMP3_API float* drmp3_open_memory_and_read_pcm_frames_f32(const void* pData, size_t dataSize, drmp3_config* pConfig, drmp3_uint64* pTotalFrameCount, const drmp3_allocation_callbacks* pAllocationCallbacks); DRMP3_API drmp3_int16* drmp3_open_memory_and_read_pcm_frames_s16(const void* pData, size_t dataSize, drmp3_config* pConfig, drmp3_uint64* pTotalFrameCount, const drmp3_allocation_callbacks* pAllocationCallbacks); #ifndef DR_MP3_NO_STDIO DRMP3_API float* drmp3_open_file_and_read_pcm_frames_f32(const char* filePath, drmp3_config* pConfig, drmp3_uint64* pTotalFrameCount, const drmp3_allocation_callbacks* pAllocationCallbacks); DRMP3_API drmp3_int16* drmp3_open_file_and_read_pcm_frames_s16(const char* filePath, drmp3_config* pConfig, drmp3_uint64* pTotalFrameCount, const drmp3_allocation_callbacks* pAllocationCallbacks); #endif /* Allocates a block of memory on the heap. */ DRMP3_API void* drmp3_malloc(size_t sz, const drmp3_allocation_callbacks* pAllocationCallbacks); /* Frees any memory that was allocated by a public drmp3 API. */ DRMP3_API void drmp3_free(void* p, const drmp3_allocation_callbacks* pAllocationCallbacks); #ifdef __cplusplus } #endif #endif /* dr_mp3_h */ /************************************************************************************************************************************************************ ************************************************************************************************************************************************************ IMPLEMENTATION ************************************************************************************************************************************************************ ************************************************************************************************************************************************************/ #if defined(DR_MP3_IMPLEMENTATION) || defined(DRMP3_IMPLEMENTATION) #ifndef dr_mp3_c #define dr_mp3_c #include #include #include /* For INT_MAX */ DRMP3_API void drmp3_version(drmp3_uint32* pMajor, drmp3_uint32* pMinor, drmp3_uint32* pRevision) { if (pMajor) { *pMajor = DRMP3_VERSION_MAJOR; } if (pMinor) { *pMinor = DRMP3_VERSION_MINOR; } if (pRevision) { *pRevision = DRMP3_VERSION_REVISION; } } DRMP3_API const char* drmp3_version_string(void) { return DRMP3_VERSION_STRING; } /* Disable SIMD when compiling with TCC for now. */ #if defined(__TINYC__) #define DR_MP3_NO_SIMD #endif #define DRMP3_OFFSET_PTR(p, offset) ((void*)((drmp3_uint8*)(p) + (offset))) #define DRMP3_MAX_FREE_FORMAT_FRAME_SIZE 2304 /* more than ISO spec's */ #ifndef DRMP3_MAX_FRAME_SYNC_MATCHES #define DRMP3_MAX_FRAME_SYNC_MATCHES 10 #endif #define DRMP3_MAX_L3_FRAME_PAYLOAD_BYTES DRMP3_MAX_FREE_FORMAT_FRAME_SIZE /* MUST be >= 320000/8/32000*1152 = 1440 */ #define DRMP3_MAX_BITRESERVOIR_BYTES 511 #define DRMP3_SHORT_BLOCK_TYPE 2 #define DRMP3_STOP_BLOCK_TYPE 3 #define DRMP3_MODE_MONO 3 #define DRMP3_MODE_JOINT_STEREO 1 #define DRMP3_HDR_SIZE 4 #define DRMP3_HDR_IS_MONO(h) (((h[3]) & 0xC0) == 0xC0) #define DRMP3_HDR_IS_MS_STEREO(h) (((h[3]) & 0xE0) == 0x60) #define DRMP3_HDR_IS_FREE_FORMAT(h) (((h[2]) & 0xF0) == 0) #define DRMP3_HDR_IS_CRC(h) (!((h[1]) & 1)) #define DRMP3_HDR_TEST_PADDING(h) ((h[2]) & 0x2) #define DRMP3_HDR_TEST_MPEG1(h) ((h[1]) & 0x8) #define DRMP3_HDR_TEST_NOT_MPEG25(h) ((h[1]) & 0x10) #define DRMP3_HDR_TEST_I_STEREO(h) ((h[3]) & 0x10) #define DRMP3_HDR_TEST_MS_STEREO(h) ((h[3]) & 0x20) #define DRMP3_HDR_GET_STEREO_MODE(h) (((h[3]) >> 6) & 3) #define DRMP3_HDR_GET_STEREO_MODE_EXT(h) (((h[3]) >> 4) & 3) #define DRMP3_HDR_GET_LAYER(h) (((h[1]) >> 1) & 3) #define DRMP3_HDR_GET_BITRATE(h) ((h[2]) >> 4) #define DRMP3_HDR_GET_SAMPLE_RATE(h) (((h[2]) >> 2) & 3) #define DRMP3_HDR_GET_MY_SAMPLE_RATE(h) (DRMP3_HDR_GET_SAMPLE_RATE(h) + (((h[1] >> 3) & 1) + ((h[1] >> 4) & 1))*3) #define DRMP3_HDR_IS_FRAME_576(h) ((h[1] & 14) == 2) #define DRMP3_HDR_IS_LAYER_1(h) ((h[1] & 6) == 6) #define DRMP3_BITS_DEQUANTIZER_OUT -1 #define DRMP3_MAX_SCF (255 + DRMP3_BITS_DEQUANTIZER_OUT*4 - 210) #define DRMP3_MAX_SCFI ((DRMP3_MAX_SCF + 3) & ~3) #define DRMP3_MIN(a, b) ((a) > (b) ? (b) : (a)) #define DRMP3_MAX(a, b) ((a) < (b) ? (b) : (a)) #if !defined(DR_MP3_NO_SIMD) #if !defined(DR_MP3_ONLY_SIMD) && (defined(_M_X64) || defined(__x86_64__) || defined(__aarch64__) || defined(_M_ARM64)) /* x64 always have SSE2, arm64 always have neon, no need for generic code */ #define DR_MP3_ONLY_SIMD #endif #if ((defined(_MSC_VER) && _MSC_VER >= 1400) && defined(_M_X64)) || ((defined(__i386) || defined(_M_IX86) || defined(__i386__) || defined(__x86_64__)) && ((defined(_M_IX86_FP) && _M_IX86_FP == 2) || defined(__SSE2__))) #if defined(_MSC_VER) #include #endif #include #define DRMP3_HAVE_SSE 1 #define DRMP3_HAVE_SIMD 1 #define DRMP3_VSTORE _mm_storeu_ps #define DRMP3_VLD _mm_loadu_ps #define DRMP3_VSET _mm_set1_ps #define DRMP3_VADD _mm_add_ps #define DRMP3_VSUB _mm_sub_ps #define DRMP3_VMUL _mm_mul_ps #define DRMP3_VMAC(a, x, y) _mm_add_ps(a, _mm_mul_ps(x, y)) #define DRMP3_VMSB(a, x, y) _mm_sub_ps(a, _mm_mul_ps(x, y)) #define DRMP3_VMUL_S(x, s) _mm_mul_ps(x, _mm_set1_ps(s)) #define DRMP3_VREV(x) _mm_shuffle_ps(x, x, _MM_SHUFFLE(0, 1, 2, 3)) typedef __m128 drmp3_f4; #if defined(_MSC_VER) || defined(DR_MP3_ONLY_SIMD) #define drmp3_cpuid __cpuid #else static __inline__ __attribute__((always_inline)) void drmp3_cpuid(int CPUInfo[], const int InfoType) { #if defined(__PIC__) __asm__ __volatile__( #if defined(__x86_64__) "push %%rbx\n" "cpuid\n" "xchgl %%ebx, %1\n" "pop %%rbx\n" #else "xchgl %%ebx, %1\n" "cpuid\n" "xchgl %%ebx, %1\n" #endif : "=a" (CPUInfo[0]), "=r" (CPUInfo[1]), "=c" (CPUInfo[2]), "=d" (CPUInfo[3]) : "a" (InfoType)); #else __asm__ __volatile__( "cpuid" : "=a" (CPUInfo[0]), "=b" (CPUInfo[1]), "=c" (CPUInfo[2]), "=d" (CPUInfo[3]) : "a" (InfoType)); #endif } #endif static int drmp3_have_simd(void) { #ifdef DR_MP3_ONLY_SIMD return 1; #else static int g_have_simd; int CPUInfo[4]; #ifdef MINIMP3_TEST static int g_counter; if (g_counter++ > 100) return 0; #endif if (g_have_simd) goto end; drmp3_cpuid(CPUInfo, 0); if (CPUInfo[0] > 0) { drmp3_cpuid(CPUInfo, 1); g_have_simd = (CPUInfo[3] & (1 << 26)) + 1; /* SSE2 */ return g_have_simd - 1; } end: return g_have_simd - 1; #endif } #elif defined(__ARM_NEON) || defined(__aarch64__) || defined(_M_ARM64) #include #define DRMP3_HAVE_SSE 0 #define DRMP3_HAVE_SIMD 1 #define DRMP3_VSTORE vst1q_f32 #define DRMP3_VLD vld1q_f32 #define DRMP3_VSET vmovq_n_f32 #define DRMP3_VADD vaddq_f32 #define DRMP3_VSUB vsubq_f32 #define DRMP3_VMUL vmulq_f32 #define DRMP3_VMAC(a, x, y) vmlaq_f32(a, x, y) #define DRMP3_VMSB(a, x, y) vmlsq_f32(a, x, y) #define DRMP3_VMUL_S(x, s) vmulq_f32(x, vmovq_n_f32(s)) #define DRMP3_VREV(x) vcombine_f32(vget_high_f32(vrev64q_f32(x)), vget_low_f32(vrev64q_f32(x))) typedef float32x4_t drmp3_f4; static int drmp3_have_simd(void) { /* TODO: detect neon for !DR_MP3_ONLY_SIMD */ return 1; } #else #define DRMP3_HAVE_SSE 0 #define DRMP3_HAVE_SIMD 0 #ifdef DR_MP3_ONLY_SIMD #error DR_MP3_ONLY_SIMD used, but SSE/NEON not enabled #endif #endif #else #define DRMP3_HAVE_SIMD 0 #endif #if defined(__ARM_ARCH) && (__ARM_ARCH >= 6) && !defined(__aarch64__) && !defined(_M_ARM64) #define DRMP3_HAVE_ARMV6 1 static __inline__ __attribute__((always_inline)) drmp3_int32 drmp3_clip_int16_arm(drmp3_int32 a) { drmp3_int32 x = 0; __asm__ ("ssat %0, #16, %1" : "=r"(x) : "r"(a)); return x; } #else #define DRMP3_HAVE_ARMV6 0 #endif /* Standard library stuff. */ #ifndef DRMP3_ASSERT #include #define DRMP3_ASSERT(expression) assert(expression) #endif #ifndef DRMP3_COPY_MEMORY #define DRMP3_COPY_MEMORY(dst, src, sz) memcpy((dst), (src), (sz)) #endif #ifndef DRMP3_MOVE_MEMORY #define DRMP3_MOVE_MEMORY(dst, src, sz) memmove((dst), (src), (sz)) #endif #ifndef DRMP3_ZERO_MEMORY #define DRMP3_ZERO_MEMORY(p, sz) memset((p), 0, (sz)) #endif #define DRMP3_ZERO_OBJECT(p) DRMP3_ZERO_MEMORY((p), sizeof(*(p))) #ifndef DRMP3_MALLOC #define DRMP3_MALLOC(sz) malloc((sz)) #endif #ifndef DRMP3_REALLOC #define DRMP3_REALLOC(p, sz) realloc((p), (sz)) #endif #ifndef DRMP3_FREE #define DRMP3_FREE(p) free((p)) #endif typedef struct { const drmp3_uint8 *buf; int pos, limit; } drmp3_bs; typedef struct { float scf[3*64]; drmp3_uint8 total_bands, stereo_bands, bitalloc[64], scfcod[64]; } drmp3_L12_scale_info; typedef struct { drmp3_uint8 tab_offset, code_tab_width, band_count; } drmp3_L12_subband_alloc; typedef struct { const drmp3_uint8 *sfbtab; drmp3_uint16 part_23_length, big_values, scalefac_compress; drmp3_uint8 global_gain, block_type, mixed_block_flag, n_long_sfb, n_short_sfb; drmp3_uint8 table_select[3], region_count[3], subblock_gain[3]; drmp3_uint8 preflag, scalefac_scale, count1_table, scfsi; } drmp3_L3_gr_info; typedef struct { drmp3_bs bs; drmp3_uint8 maindata[DRMP3_MAX_BITRESERVOIR_BYTES + DRMP3_MAX_L3_FRAME_PAYLOAD_BYTES]; drmp3_L3_gr_info gr_info[4]; float grbuf[2][576], scf[40], syn[18 + 15][2*32]; drmp3_uint8 ist_pos[2][39]; } drmp3dec_scratch; static void drmp3_bs_init(drmp3_bs *bs, const drmp3_uint8 *data, int bytes) { bs->buf = data; bs->pos = 0; bs->limit = bytes*8; } static drmp3_uint32 drmp3_bs_get_bits(drmp3_bs *bs, int n) { drmp3_uint32 next, cache = 0, s = bs->pos & 7; int shl = n + s; const drmp3_uint8 *p = bs->buf + (bs->pos >> 3); if ((bs->pos += n) > bs->limit) return 0; next = *p++ & (255 >> s); while ((shl -= 8) > 0) { cache |= next << shl; next = *p++; } return cache | (next >> -shl); } static int drmp3_hdr_valid(const drmp3_uint8 *h) { return h[0] == 0xff && ((h[1] & 0xF0) == 0xf0 || (h[1] & 0xFE) == 0xe2) && (DRMP3_HDR_GET_LAYER(h) != 0) && (DRMP3_HDR_GET_BITRATE(h) != 15) && (DRMP3_HDR_GET_SAMPLE_RATE(h) != 3); } static int drmp3_hdr_compare(const drmp3_uint8 *h1, const drmp3_uint8 *h2) { return drmp3_hdr_valid(h2) && ((h1[1] ^ h2[1]) & 0xFE) == 0 && ((h1[2] ^ h2[2]) & 0x0C) == 0 && !(DRMP3_HDR_IS_FREE_FORMAT(h1) ^ DRMP3_HDR_IS_FREE_FORMAT(h2)); } static unsigned drmp3_hdr_bitrate_kbps(const drmp3_uint8 *h) { static const drmp3_uint8 halfrate[2][3][15] = { { { 0,4,8,12,16,20,24,28,32,40,48,56,64,72,80 }, { 0,4,8,12,16,20,24,28,32,40,48,56,64,72,80 }, { 0,16,24,28,32,40,48,56,64,72,80,88,96,112,128 } }, { { 0,16,20,24,28,32,40,48,56,64,80,96,112,128,160 }, { 0,16,24,28,32,40,48,56,64,80,96,112,128,160,192 }, { 0,16,32,48,64,80,96,112,128,144,160,176,192,208,224 } }, }; return 2*halfrate[!!DRMP3_HDR_TEST_MPEG1(h)][DRMP3_HDR_GET_LAYER(h) - 1][DRMP3_HDR_GET_BITRATE(h)]; } static unsigned drmp3_hdr_sample_rate_hz(const drmp3_uint8 *h) { static const unsigned g_hz[3] = { 44100, 48000, 32000 }; return g_hz[DRMP3_HDR_GET_SAMPLE_RATE(h)] >> (int)!DRMP3_HDR_TEST_MPEG1(h) >> (int)!DRMP3_HDR_TEST_NOT_MPEG25(h); } static unsigned drmp3_hdr_frame_samples(const drmp3_uint8 *h) { return DRMP3_HDR_IS_LAYER_1(h) ? 384 : (1152 >> (int)DRMP3_HDR_IS_FRAME_576(h)); } static int drmp3_hdr_frame_bytes(const drmp3_uint8 *h, int free_format_size) { int frame_bytes = drmp3_hdr_frame_samples(h)*drmp3_hdr_bitrate_kbps(h)*125/drmp3_hdr_sample_rate_hz(h); if (DRMP3_HDR_IS_LAYER_1(h)) { frame_bytes &= ~3; /* slot align */ } return frame_bytes ? frame_bytes : free_format_size; } static int drmp3_hdr_padding(const drmp3_uint8 *h) { return DRMP3_HDR_TEST_PADDING(h) ? (DRMP3_HDR_IS_LAYER_1(h) ? 4 : 1) : 0; } #ifndef DR_MP3_ONLY_MP3 static const drmp3_L12_subband_alloc *drmp3_L12_subband_alloc_table(const drmp3_uint8 *hdr, drmp3_L12_scale_info *sci) { const drmp3_L12_subband_alloc *alloc; int mode = DRMP3_HDR_GET_STEREO_MODE(hdr); int nbands, stereo_bands = (mode == DRMP3_MODE_MONO) ? 0 : (mode == DRMP3_MODE_JOINT_STEREO) ? (DRMP3_HDR_GET_STEREO_MODE_EXT(hdr) << 2) + 4 : 32; if (DRMP3_HDR_IS_LAYER_1(hdr)) { static const drmp3_L12_subband_alloc g_alloc_L1[] = { { 76, 4, 32 } }; alloc = g_alloc_L1; nbands = 32; } else if (!DRMP3_HDR_TEST_MPEG1(hdr)) { static const drmp3_L12_subband_alloc g_alloc_L2M2[] = { { 60, 4, 4 }, { 44, 3, 7 }, { 44, 2, 19 } }; alloc = g_alloc_L2M2; nbands = 30; } else { static const drmp3_L12_subband_alloc g_alloc_L2M1[] = { { 0, 4, 3 }, { 16, 4, 8 }, { 32, 3, 12 }, { 40, 2, 7 } }; int sample_rate_idx = DRMP3_HDR_GET_SAMPLE_RATE(hdr); unsigned kbps = drmp3_hdr_bitrate_kbps(hdr) >> (int)(mode != DRMP3_MODE_MONO); if (!kbps) /* free-format */ { kbps = 192; } alloc = g_alloc_L2M1; nbands = 27; if (kbps < 56) { static const drmp3_L12_subband_alloc g_alloc_L2M1_lowrate[] = { { 44, 4, 2 }, { 44, 3, 10 } }; alloc = g_alloc_L2M1_lowrate; nbands = sample_rate_idx == 2 ? 12 : 8; } else if (kbps >= 96 && sample_rate_idx != 1) { nbands = 30; } } sci->total_bands = (drmp3_uint8)nbands; sci->stereo_bands = (drmp3_uint8)DRMP3_MIN(stereo_bands, nbands); return alloc; } static void drmp3_L12_read_scalefactors(drmp3_bs *bs, drmp3_uint8 *pba, drmp3_uint8 *scfcod, int bands, float *scf) { static const float g_deq_L12[18*3] = { #define DRMP3_DQ(x) 9.53674316e-07f/x, 7.56931807e-07f/x, 6.00777173e-07f/x DRMP3_DQ(3),DRMP3_DQ(7),DRMP3_DQ(15),DRMP3_DQ(31),DRMP3_DQ(63),DRMP3_DQ(127),DRMP3_DQ(255),DRMP3_DQ(511),DRMP3_DQ(1023),DRMP3_DQ(2047),DRMP3_DQ(4095),DRMP3_DQ(8191),DRMP3_DQ(16383),DRMP3_DQ(32767),DRMP3_DQ(65535),DRMP3_DQ(3),DRMP3_DQ(5),DRMP3_DQ(9) }; int i, m; for (i = 0; i < bands; i++) { float s = 0; int ba = *pba++; int mask = ba ? 4 + ((19 >> scfcod[i]) & 3) : 0; for (m = 4; m; m >>= 1) { if (mask & m) { int b = drmp3_bs_get_bits(bs, 6); s = g_deq_L12[ba*3 - 6 + b % 3]*(int)(1 << 21 >> b/3); } *scf++ = s; } } } static void drmp3_L12_read_scale_info(const drmp3_uint8 *hdr, drmp3_bs *bs, drmp3_L12_scale_info *sci) { static const drmp3_uint8 g_bitalloc_code_tab[] = { 0,17, 3, 4, 5,6,7, 8,9,10,11,12,13,14,15,16, 0,17,18, 3,19,4,5, 6,7, 8, 9,10,11,12,13,16, 0,17,18, 3,19,4,5,16, 0,17,18,16, 0,17,18,19, 4,5,6, 7,8, 9,10,11,12,13,14,15, 0,17,18, 3,19,4,5, 6,7, 8, 9,10,11,12,13,14, 0, 2, 3, 4, 5,6,7, 8,9,10,11,12,13,14,15,16 }; const drmp3_L12_subband_alloc *subband_alloc = drmp3_L12_subband_alloc_table(hdr, sci); int i, k = 0, ba_bits = 0; const drmp3_uint8 *ba_code_tab = g_bitalloc_code_tab; for (i = 0; i < sci->total_bands; i++) { drmp3_uint8 ba; if (i == k) { k += subband_alloc->band_count; ba_bits = subband_alloc->code_tab_width; ba_code_tab = g_bitalloc_code_tab + subband_alloc->tab_offset; subband_alloc++; } ba = ba_code_tab[drmp3_bs_get_bits(bs, ba_bits)]; sci->bitalloc[2*i] = ba; if (i < sci->stereo_bands) { ba = ba_code_tab[drmp3_bs_get_bits(bs, ba_bits)]; } sci->bitalloc[2*i + 1] = sci->stereo_bands ? ba : 0; } for (i = 0; i < 2*sci->total_bands; i++) { sci->scfcod[i] = (drmp3_uint8)(sci->bitalloc[i] ? DRMP3_HDR_IS_LAYER_1(hdr) ? 2 : drmp3_bs_get_bits(bs, 2) : 6); } drmp3_L12_read_scalefactors(bs, sci->bitalloc, sci->scfcod, sci->total_bands*2, sci->scf); for (i = sci->stereo_bands; i < sci->total_bands; i++) { sci->bitalloc[2*i + 1] = 0; } } static int drmp3_L12_dequantize_granule(float *grbuf, drmp3_bs *bs, drmp3_L12_scale_info *sci, int group_size) { int i, j, k, choff = 576; for (j = 0; j < 4; j++) { float *dst = grbuf + group_size*j; for (i = 0; i < 2*sci->total_bands; i++) { int ba = sci->bitalloc[i]; if (ba != 0) { if (ba < 17) { int half = (1 << (ba - 1)) - 1; for (k = 0; k < group_size; k++) { dst[k] = (float)((int)drmp3_bs_get_bits(bs, ba) - half); } } else { unsigned mod = (2 << (ba - 17)) + 1; /* 3, 5, 9 */ unsigned code = drmp3_bs_get_bits(bs, mod + 2 - (mod >> 3)); /* 5, 7, 10 */ for (k = 0; k < group_size; k++, code /= mod) { dst[k] = (float)((int)(code % mod - mod/2)); } } } dst += choff; choff = 18 - choff; } } return group_size*4; } static void drmp3_L12_apply_scf_384(drmp3_L12_scale_info *sci, const float *scf, float *dst) { int i, k; DRMP3_COPY_MEMORY(dst + 576 + sci->stereo_bands*18, dst + sci->stereo_bands*18, (sci->total_bands - sci->stereo_bands)*18*sizeof(float)); for (i = 0; i < sci->total_bands; i++, dst += 18, scf += 6) { for (k = 0; k < 12; k++) { dst[k + 0] *= scf[0]; dst[k + 576] *= scf[3]; } } } #endif static int drmp3_L3_read_side_info(drmp3_bs *bs, drmp3_L3_gr_info *gr, const drmp3_uint8 *hdr) { static const drmp3_uint8 g_scf_long[8][23] = { { 6,6,6,6,6,6,8,10,12,14,16,20,24,28,32,38,46,52,60,68,58,54,0 }, { 12,12,12,12,12,12,16,20,24,28,32,40,48,56,64,76,90,2,2,2,2,2,0 }, { 6,6,6,6,6,6,8,10,12,14,16,20,24,28,32,38,46,52,60,68,58,54,0 }, { 6,6,6,6,6,6,8,10,12,14,16,18,22,26,32,38,46,54,62,70,76,36,0 }, { 6,6,6,6,6,6,8,10,12,14,16,20,24,28,32,38,46,52,60,68,58,54,0 }, { 4,4,4,4,4,4,6,6,8,8,10,12,16,20,24,28,34,42,50,54,76,158,0 }, { 4,4,4,4,4,4,6,6,6,8,10,12,16,18,22,28,34,40,46,54,54,192,0 }, { 4,4,4,4,4,4,6,6,8,10,12,16,20,24,30,38,46,56,68,84,102,26,0 } }; static const drmp3_uint8 g_scf_short[8][40] = { { 4,4,4,4,4,4,4,4,4,6,6,6,8,8,8,10,10,10,12,12,12,14,14,14,18,18,18,24,24,24,30,30,30,40,40,40,18,18,18,0 }, { 8,8,8,8,8,8,8,8,8,12,12,12,16,16,16,20,20,20,24,24,24,28,28,28,36,36,36,2,2,2,2,2,2,2,2,2,26,26,26,0 }, { 4,4,4,4,4,4,4,4,4,6,6,6,6,6,6,8,8,8,10,10,10,14,14,14,18,18,18,26,26,26,32,32,32,42,42,42,18,18,18,0 }, { 4,4,4,4,4,4,4,4,4,6,6,6,8,8,8,10,10,10,12,12,12,14,14,14,18,18,18,24,24,24,32,32,32,44,44,44,12,12,12,0 }, { 4,4,4,4,4,4,4,4,4,6,6,6,8,8,8,10,10,10,12,12,12,14,14,14,18,18,18,24,24,24,30,30,30,40,40,40,18,18,18,0 }, { 4,4,4,4,4,4,4,4,4,4,4,4,6,6,6,8,8,8,10,10,10,12,12,12,14,14,14,18,18,18,22,22,22,30,30,30,56,56,56,0 }, { 4,4,4,4,4,4,4,4,4,4,4,4,6,6,6,6,6,6,10,10,10,12,12,12,14,14,14,16,16,16,20,20,20,26,26,26,66,66,66,0 }, { 4,4,4,4,4,4,4,4,4,4,4,4,6,6,6,8,8,8,12,12,12,16,16,16,20,20,20,26,26,26,34,34,34,42,42,42,12,12,12,0 } }; static const drmp3_uint8 g_scf_mixed[8][40] = { { 6,6,6,6,6,6,6,6,6,8,8,8,10,10,10,12,12,12,14,14,14,18,18,18,24,24,24,30,30,30,40,40,40,18,18,18,0 }, { 12,12,12,4,4,4,8,8,8,12,12,12,16,16,16,20,20,20,24,24,24,28,28,28,36,36,36,2,2,2,2,2,2,2,2,2,26,26,26,0 }, { 6,6,6,6,6,6,6,6,6,6,6,6,8,8,8,10,10,10,14,14,14,18,18,18,26,26,26,32,32,32,42,42,42,18,18,18,0 }, { 6,6,6,6,6,6,6,6,6,8,8,8,10,10,10,12,12,12,14,14,14,18,18,18,24,24,24,32,32,32,44,44,44,12,12,12,0 }, { 6,6,6,6,6,6,6,6,6,8,8,8,10,10,10,12,12,12,14,14,14,18,18,18,24,24,24,30,30,30,40,40,40,18,18,18,0 }, { 4,4,4,4,4,4,6,6,4,4,4,6,6,6,8,8,8,10,10,10,12,12,12,14,14,14,18,18,18,22,22,22,30,30,30,56,56,56,0 }, { 4,4,4,4,4,4,6,6,4,4,4,6,6,6,6,6,6,10,10,10,12,12,12,14,14,14,16,16,16,20,20,20,26,26,26,66,66,66,0 }, { 4,4,4,4,4,4,6,6,4,4,4,6,6,6,8,8,8,12,12,12,16,16,16,20,20,20,26,26,26,34,34,34,42,42,42,12,12,12,0 } }; unsigned tables, scfsi = 0; int main_data_begin, part_23_sum = 0; int gr_count = DRMP3_HDR_IS_MONO(hdr) ? 1 : 2; int sr_idx = DRMP3_HDR_GET_MY_SAMPLE_RATE(hdr); sr_idx -= (sr_idx != 0); if (DRMP3_HDR_TEST_MPEG1(hdr)) { gr_count *= 2; main_data_begin = drmp3_bs_get_bits(bs, 9); scfsi = drmp3_bs_get_bits(bs, 7 + gr_count); } else { main_data_begin = drmp3_bs_get_bits(bs, 8 + gr_count) >> gr_count; } do { if (DRMP3_HDR_IS_MONO(hdr)) { scfsi <<= 4; } gr->part_23_length = (drmp3_uint16)drmp3_bs_get_bits(bs, 12); part_23_sum += gr->part_23_length; gr->big_values = (drmp3_uint16)drmp3_bs_get_bits(bs, 9); if (gr->big_values > 288) { return -1; } gr->global_gain = (drmp3_uint8)drmp3_bs_get_bits(bs, 8); gr->scalefac_compress = (drmp3_uint16)drmp3_bs_get_bits(bs, DRMP3_HDR_TEST_MPEG1(hdr) ? 4 : 9); gr->sfbtab = g_scf_long[sr_idx]; gr->n_long_sfb = 22; gr->n_short_sfb = 0; if (drmp3_bs_get_bits(bs, 1)) { gr->block_type = (drmp3_uint8)drmp3_bs_get_bits(bs, 2); if (!gr->block_type) { return -1; } gr->mixed_block_flag = (drmp3_uint8)drmp3_bs_get_bits(bs, 1); gr->region_count[0] = 7; gr->region_count[1] = 255; if (gr->block_type == DRMP3_SHORT_BLOCK_TYPE) { scfsi &= 0x0F0F; if (!gr->mixed_block_flag) { gr->region_count[0] = 8; gr->sfbtab = g_scf_short[sr_idx]; gr->n_long_sfb = 0; gr->n_short_sfb = 39; } else { gr->sfbtab = g_scf_mixed[sr_idx]; gr->n_long_sfb = DRMP3_HDR_TEST_MPEG1(hdr) ? 8 : 6; gr->n_short_sfb = 30; } } tables = drmp3_bs_get_bits(bs, 10); tables <<= 5; gr->subblock_gain[0] = (drmp3_uint8)drmp3_bs_get_bits(bs, 3); gr->subblock_gain[1] = (drmp3_uint8)drmp3_bs_get_bits(bs, 3); gr->subblock_gain[2] = (drmp3_uint8)drmp3_bs_get_bits(bs, 3); } else { gr->block_type = 0; gr->mixed_block_flag = 0; tables = drmp3_bs_get_bits(bs, 15); gr->region_count[0] = (drmp3_uint8)drmp3_bs_get_bits(bs, 4); gr->region_count[1] = (drmp3_uint8)drmp3_bs_get_bits(bs, 3); gr->region_count[2] = 255; } gr->table_select[0] = (drmp3_uint8)(tables >> 10); gr->table_select[1] = (drmp3_uint8)((tables >> 5) & 31); gr->table_select[2] = (drmp3_uint8)((tables) & 31); gr->preflag = (drmp3_uint8)(DRMP3_HDR_TEST_MPEG1(hdr) ? drmp3_bs_get_bits(bs, 1) : (gr->scalefac_compress >= 500)); gr->scalefac_scale = (drmp3_uint8)drmp3_bs_get_bits(bs, 1); gr->count1_table = (drmp3_uint8)drmp3_bs_get_bits(bs, 1); gr->scfsi = (drmp3_uint8)((scfsi >> 12) & 15); scfsi <<= 4; gr++; } while(--gr_count); if (part_23_sum + bs->pos > bs->limit + main_data_begin*8) { return -1; } return main_data_begin; } static void drmp3_L3_read_scalefactors(drmp3_uint8 *scf, drmp3_uint8 *ist_pos, const drmp3_uint8 *scf_size, const drmp3_uint8 *scf_count, drmp3_bs *bitbuf, int scfsi) { int i, k; for (i = 0; i < 4 && scf_count[i]; i++, scfsi *= 2) { int cnt = scf_count[i]; if (scfsi & 8) { DRMP3_COPY_MEMORY(scf, ist_pos, cnt); } else { int bits = scf_size[i]; if (!bits) { DRMP3_ZERO_MEMORY(scf, cnt); DRMP3_ZERO_MEMORY(ist_pos, cnt); } else { int max_scf = (scfsi < 0) ? (1 << bits) - 1 : -1; for (k = 0; k < cnt; k++) { int s = drmp3_bs_get_bits(bitbuf, bits); ist_pos[k] = (drmp3_uint8)(s == max_scf ? -1 : s); scf[k] = (drmp3_uint8)s; } } } ist_pos += cnt; scf += cnt; } scf[0] = scf[1] = scf[2] = 0; } static float drmp3_L3_ldexp_q2(float y, int exp_q2) { static const float g_expfrac[4] = { 9.31322575e-10f,7.83145814e-10f,6.58544508e-10f,5.53767716e-10f }; int e; do { e = DRMP3_MIN(30*4, exp_q2); y *= g_expfrac[e & 3]*(1 << 30 >> (e >> 2)); } while ((exp_q2 -= e) > 0); return y; } static void drmp3_L3_decode_scalefactors(const drmp3_uint8 *hdr, drmp3_uint8 *ist_pos, drmp3_bs *bs, const drmp3_L3_gr_info *gr, float *scf, int ch) { static const drmp3_uint8 g_scf_partitions[3][28] = { { 6,5,5, 5,6,5,5,5,6,5, 7,3,11,10,0,0, 7, 7, 7,0, 6, 6,6,3, 8, 8,5,0 }, { 8,9,6,12,6,9,9,9,6,9,12,6,15,18,0,0, 6,15,12,0, 6,12,9,6, 6,18,9,0 }, { 9,9,6,12,9,9,9,9,9,9,12,6,18,18,0,0,12,12,12,0,12, 9,9,6,15,12,9,0 } }; const drmp3_uint8 *scf_partition = g_scf_partitions[!!gr->n_short_sfb + !gr->n_long_sfb]; drmp3_uint8 scf_size[4], iscf[40]; int i, scf_shift = gr->scalefac_scale + 1, gain_exp, scfsi = gr->scfsi; float gain; if (DRMP3_HDR_TEST_MPEG1(hdr)) { static const drmp3_uint8 g_scfc_decode[16] = { 0,1,2,3, 12,5,6,7, 9,10,11,13, 14,15,18,19 }; int part = g_scfc_decode[gr->scalefac_compress]; scf_size[1] = scf_size[0] = (drmp3_uint8)(part >> 2); scf_size[3] = scf_size[2] = (drmp3_uint8)(part & 3); } else { static const drmp3_uint8 g_mod[6*4] = { 5,5,4,4,5,5,4,1,4,3,1,1,5,6,6,1,4,4,4,1,4,3,1,1 }; int k, modprod, sfc, ist = DRMP3_HDR_TEST_I_STEREO(hdr) && ch; sfc = gr->scalefac_compress >> ist; for (k = ist*3*4; sfc >= 0; sfc -= modprod, k += 4) { for (modprod = 1, i = 3; i >= 0; i--) { scf_size[i] = (drmp3_uint8)(sfc / modprod % g_mod[k + i]); modprod *= g_mod[k + i]; } } scf_partition += k; scfsi = -16; } drmp3_L3_read_scalefactors(iscf, ist_pos, scf_size, scf_partition, bs, scfsi); if (gr->n_short_sfb) { int sh = 3 - scf_shift; for (i = 0; i < gr->n_short_sfb; i += 3) { iscf[gr->n_long_sfb + i + 0] = (drmp3_uint8)(iscf[gr->n_long_sfb + i + 0] + (gr->subblock_gain[0] << sh)); iscf[gr->n_long_sfb + i + 1] = (drmp3_uint8)(iscf[gr->n_long_sfb + i + 1] + (gr->subblock_gain[1] << sh)); iscf[gr->n_long_sfb + i + 2] = (drmp3_uint8)(iscf[gr->n_long_sfb + i + 2] + (gr->subblock_gain[2] << sh)); } } else if (gr->preflag) { static const drmp3_uint8 g_preamp[10] = { 1,1,1,1,2,2,3,3,3,2 }; for (i = 0; i < 10; i++) { iscf[11 + i] = (drmp3_uint8)(iscf[11 + i] + g_preamp[i]); } } gain_exp = gr->global_gain + DRMP3_BITS_DEQUANTIZER_OUT*4 - 210 - (DRMP3_HDR_IS_MS_STEREO(hdr) ? 2 : 0); gain = drmp3_L3_ldexp_q2(1 << (DRMP3_MAX_SCFI/4), DRMP3_MAX_SCFI - gain_exp); for (i = 0; i < (int)(gr->n_long_sfb + gr->n_short_sfb); i++) { scf[i] = drmp3_L3_ldexp_q2(gain, iscf[i] << scf_shift); } } static const float g_drmp3_pow43[129 + 16] = { 0,-1,-2.519842f,-4.326749f,-6.349604f,-8.549880f,-10.902724f,-13.390518f,-16.000000f,-18.720754f,-21.544347f,-24.463781f,-27.473142f,-30.567351f,-33.741992f,-36.993181f, 0,1,2.519842f,4.326749f,6.349604f,8.549880f,10.902724f,13.390518f,16.000000f,18.720754f,21.544347f,24.463781f,27.473142f,30.567351f,33.741992f,36.993181f,40.317474f,43.711787f,47.173345f,50.699631f,54.288352f,57.937408f,61.644865f,65.408941f,69.227979f,73.100443f,77.024898f,81.000000f,85.024491f,89.097188f,93.216975f,97.382800f,101.593667f,105.848633f,110.146801f,114.487321f,118.869381f,123.292209f,127.755065f,132.257246f,136.798076f,141.376907f,145.993119f,150.646117f,155.335327f,160.060199f,164.820202f,169.614826f,174.443577f,179.305980f,184.201575f,189.129918f,194.090580f,199.083145f,204.107210f,209.162385f,214.248292f,219.364564f,224.510845f,229.686789f,234.892058f,240.126328f,245.389280f,250.680604f,256.000000f,261.347174f,266.721841f,272.123723f,277.552547f,283.008049f,288.489971f,293.998060f,299.532071f,305.091761f,310.676898f,316.287249f,321.922592f,327.582707f,333.267377f,338.976394f,344.709550f,350.466646f,356.247482f,362.051866f,367.879608f,373.730522f,379.604427f,385.501143f,391.420496f,397.362314f,403.326427f,409.312672f,415.320884f,421.350905f,427.402579f,433.475750f,439.570269f,445.685987f,451.822757f,457.980436f,464.158883f,470.357960f,476.577530f,482.817459f,489.077615f,495.357868f,501.658090f,507.978156f,514.317941f,520.677324f,527.056184f,533.454404f,539.871867f,546.308458f,552.764065f,559.238575f,565.731879f,572.243870f,578.774440f,585.323483f,591.890898f,598.476581f,605.080431f,611.702349f,618.342238f,625.000000f,631.675540f,638.368763f,645.079578f }; static float drmp3_L3_pow_43(int x) { float frac; int sign, mult = 256; if (x < 129) { return g_drmp3_pow43[16 + x]; } if (x < 1024) { mult = 16; x <<= 3; } sign = 2*x & 64; frac = (float)((x & 63) - sign) / ((x & ~63) + sign); return g_drmp3_pow43[16 + ((x + sign) >> 6)]*(1.f + frac*((4.f/3) + frac*(2.f/9)))*mult; } static void drmp3_L3_huffman(float *dst, drmp3_bs *bs, const drmp3_L3_gr_info *gr_info, const float *scf, int layer3gr_limit) { static const drmp3_int16 tabs[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 785,785,785,785,784,784,784,784,513,513,513,513,513,513,513,513,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256, -255,1313,1298,1282,785,785,785,785,784,784,784,784,769,769,769,769,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,290,288, -255,1313,1298,1282,769,769,769,769,529,529,529,529,529,529,529,529,528,528,528,528,528,528,528,528,512,512,512,512,512,512,512,512,290,288, -253,-318,-351,-367,785,785,785,785,784,784,784,784,769,769,769,769,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,819,818,547,547,275,275,275,275,561,560,515,546,289,274,288,258, -254,-287,1329,1299,1314,1312,1057,1057,1042,1042,1026,1026,784,784,784,784,529,529,529,529,529,529,529,529,769,769,769,769,768,768,768,768,563,560,306,306,291,259, -252,-413,-477,-542,1298,-575,1041,1041,784,784,784,784,769,769,769,769,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,-383,-399,1107,1092,1106,1061,849,849,789,789,1104,1091,773,773,1076,1075,341,340,325,309,834,804,577,577,532,532,516,516,832,818,803,816,561,561,531,531,515,546,289,289,288,258, -252,-429,-493,-559,1057,1057,1042,1042,529,529,529,529,529,529,529,529,784,784,784,784,769,769,769,769,512,512,512,512,512,512,512,512,-382,1077,-415,1106,1061,1104,849,849,789,789,1091,1076,1029,1075,834,834,597,581,340,340,339,324,804,833,532,532,832,772,818,803,817,787,816,771,290,290,290,290,288,258, -253,-349,-414,-447,-463,1329,1299,-479,1314,1312,1057,1057,1042,1042,1026,1026,785,785,785,785,784,784,784,784,769,769,769,769,768,768,768,768,-319,851,821,-335,836,850,805,849,341,340,325,336,533,533,579,579,564,564,773,832,578,548,563,516,321,276,306,291,304,259, -251,-572,-733,-830,-863,-879,1041,1041,784,784,784,784,769,769,769,769,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,-511,-527,-543,1396,1351,1381,1366,1395,1335,1380,-559,1334,1138,1138,1063,1063,1350,1392,1031,1031,1062,1062,1364,1363,1120,1120,1333,1348,881,881,881,881,375,374,359,373,343,358,341,325,791,791,1123,1122,-703,1105,1045,-719,865,865,790,790,774,774,1104,1029,338,293,323,308,-799,-815,833,788,772,818,803,816,322,292,307,320,561,531,515,546,289,274,288,258, -251,-525,-605,-685,-765,-831,-846,1298,1057,1057,1312,1282,785,785,785,785,784,784,784,784,769,769,769,769,512,512,512,512,512,512,512,512,1399,1398,1383,1367,1382,1396,1351,-511,1381,1366,1139,1139,1079,1079,1124,1124,1364,1349,1363,1333,882,882,882,882,807,807,807,807,1094,1094,1136,1136,373,341,535,535,881,775,867,822,774,-591,324,338,-671,849,550,550,866,864,609,609,293,336,534,534,789,835,773,-751,834,804,308,307,833,788,832,772,562,562,547,547,305,275,560,515,290,290, -252,-397,-477,-557,-622,-653,-719,-735,-750,1329,1299,1314,1057,1057,1042,1042,1312,1282,1024,1024,785,785,785,785,784,784,784,784,769,769,769,769,-383,1127,1141,1111,1126,1140,1095,1110,869,869,883,883,1079,1109,882,882,375,374,807,868,838,881,791,-463,867,822,368,263,852,837,836,-543,610,610,550,550,352,336,534,534,865,774,851,821,850,805,593,533,579,564,773,832,578,578,548,548,577,577,307,276,306,291,516,560,259,259, -250,-2107,-2507,-2764,-2909,-2974,-3007,-3023,1041,1041,1040,1040,769,769,769,769,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,-767,-1052,-1213,-1277,-1358,-1405,-1469,-1535,-1550,-1582,-1614,-1647,-1662,-1694,-1726,-1759,-1774,-1807,-1822,-1854,-1886,1565,-1919,-1935,-1951,-1967,1731,1730,1580,1717,-1983,1729,1564,-1999,1548,-2015,-2031,1715,1595,-2047,1714,-2063,1610,-2079,1609,-2095,1323,1323,1457,1457,1307,1307,1712,1547,1641,1700,1699,1594,1685,1625,1442,1442,1322,1322,-780,-973,-910,1279,1278,1277,1262,1276,1261,1275,1215,1260,1229,-959,974,974,989,989,-943,735,478,478,495,463,506,414,-1039,1003,958,1017,927,942,987,957,431,476,1272,1167,1228,-1183,1256,-1199,895,895,941,941,1242,1227,1212,1135,1014,1014,490,489,503,487,910,1013,985,925,863,894,970,955,1012,847,-1343,831,755,755,984,909,428,366,754,559,-1391,752,486,457,924,997,698,698,983,893,740,740,908,877,739,739,667,667,953,938,497,287,271,271,683,606,590,712,726,574,302,302,738,736,481,286,526,725,605,711,636,724,696,651,589,681,666,710,364,467,573,695,466,466,301,465,379,379,709,604,665,679,316,316,634,633,436,436,464,269,424,394,452,332,438,363,347,408,393,448,331,422,362,407,392,421,346,406,391,376,375,359,1441,1306,-2367,1290,-2383,1337,-2399,-2415,1426,1321,-2431,1411,1336,-2447,-2463,-2479,1169,1169,1049,1049,1424,1289,1412,1352,1319,-2495,1154,1154,1064,1064,1153,1153,416,390,360,404,403,389,344,374,373,343,358,372,327,357,342,311,356,326,1395,1394,1137,1137,1047,1047,1365,1392,1287,1379,1334,1364,1349,1378,1318,1363,792,792,792,792,1152,1152,1032,1032,1121,1121,1046,1046,1120,1120,1030,1030,-2895,1106,1061,1104,849,849,789,789,1091,1076,1029,1090,1060,1075,833,833,309,324,532,532,832,772,818,803,561,561,531,560,515,546,289,274,288,258, -250,-1179,-1579,-1836,-1996,-2124,-2253,-2333,-2413,-2477,-2542,-2574,-2607,-2622,-2655,1314,1313,1298,1312,1282,785,785,785,785,1040,1040,1025,1025,768,768,768,768,-766,-798,-830,-862,-895,-911,-927,-943,-959,-975,-991,-1007,-1023,-1039,-1055,-1070,1724,1647,-1103,-1119,1631,1767,1662,1738,1708,1723,-1135,1780,1615,1779,1599,1677,1646,1778,1583,-1151,1777,1567,1737,1692,1765,1722,1707,1630,1751,1661,1764,1614,1736,1676,1763,1750,1645,1598,1721,1691,1762,1706,1582,1761,1566,-1167,1749,1629,767,766,751,765,494,494,735,764,719,749,734,763,447,447,748,718,477,506,431,491,446,476,461,505,415,430,475,445,504,399,460,489,414,503,383,474,429,459,502,502,746,752,488,398,501,473,413,472,486,271,480,270,-1439,-1455,1357,-1471,-1487,-1503,1341,1325,-1519,1489,1463,1403,1309,-1535,1372,1448,1418,1476,1356,1462,1387,-1551,1475,1340,1447,1402,1386,-1567,1068,1068,1474,1461,455,380,468,440,395,425,410,454,364,467,466,464,453,269,409,448,268,432,1371,1473,1432,1417,1308,1460,1355,1446,1459,1431,1083,1083,1401,1416,1458,1445,1067,1067,1370,1457,1051,1051,1291,1430,1385,1444,1354,1415,1400,1443,1082,1082,1173,1113,1186,1066,1185,1050,-1967,1158,1128,1172,1097,1171,1081,-1983,1157,1112,416,266,375,400,1170,1142,1127,1065,793,793,1169,1033,1156,1096,1141,1111,1155,1080,1126,1140,898,898,808,808,897,897,792,792,1095,1152,1032,1125,1110,1139,1079,1124,882,807,838,881,853,791,-2319,867,368,263,822,852,837,866,806,865,-2399,851,352,262,534,534,821,836,594,594,549,549,593,593,533,533,848,773,579,579,564,578,548,563,276,276,577,576,306,291,516,560,305,305,275,259, -251,-892,-2058,-2620,-2828,-2957,-3023,-3039,1041,1041,1040,1040,769,769,769,769,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,-511,-527,-543,-559,1530,-575,-591,1528,1527,1407,1526,1391,1023,1023,1023,1023,1525,1375,1268,1268,1103,1103,1087,1087,1039,1039,1523,-604,815,815,815,815,510,495,509,479,508,463,507,447,431,505,415,399,-734,-782,1262,-815,1259,1244,-831,1258,1228,-847,-863,1196,-879,1253,987,987,748,-767,493,493,462,477,414,414,686,669,478,446,461,445,474,429,487,458,412,471,1266,1264,1009,1009,799,799,-1019,-1276,-1452,-1581,-1677,-1757,-1821,-1886,-1933,-1997,1257,1257,1483,1468,1512,1422,1497,1406,1467,1496,1421,1510,1134,1134,1225,1225,1466,1451,1374,1405,1252,1252,1358,1480,1164,1164,1251,1251,1238,1238,1389,1465,-1407,1054,1101,-1423,1207,-1439,830,830,1248,1038,1237,1117,1223,1148,1236,1208,411,426,395,410,379,269,1193,1222,1132,1235,1221,1116,976,976,1192,1162,1177,1220,1131,1191,963,963,-1647,961,780,-1663,558,558,994,993,437,408,393,407,829,978,813,797,947,-1743,721,721,377,392,844,950,828,890,706,706,812,859,796,960,948,843,934,874,571,571,-1919,690,555,689,421,346,539,539,944,779,918,873,932,842,903,888,570,570,931,917,674,674,-2575,1562,-2591,1609,-2607,1654,1322,1322,1441,1441,1696,1546,1683,1593,1669,1624,1426,1426,1321,1321,1639,1680,1425,1425,1305,1305,1545,1668,1608,1623,1667,1592,1638,1666,1320,1320,1652,1607,1409,1409,1304,1304,1288,1288,1664,1637,1395,1395,1335,1335,1622,1636,1394,1394,1319,1319,1606,1621,1392,1392,1137,1137,1137,1137,345,390,360,375,404,373,1047,-2751,-2767,-2783,1062,1121,1046,-2799,1077,-2815,1106,1061,789,789,1105,1104,263,355,310,340,325,354,352,262,339,324,1091,1076,1029,1090,1060,1075,833,833,788,788,1088,1028,818,818,803,803,561,561,531,531,816,771,546,546,289,274,288,258, -253,-317,-381,-446,-478,-509,1279,1279,-811,-1179,-1451,-1756,-1900,-2028,-2189,-2253,-2333,-2414,-2445,-2511,-2526,1313,1298,-2559,1041,1041,1040,1040,1025,1025,1024,1024,1022,1007,1021,991,1020,975,1019,959,687,687,1018,1017,671,671,655,655,1016,1015,639,639,758,758,623,623,757,607,756,591,755,575,754,559,543,543,1009,783,-575,-621,-685,-749,496,-590,750,749,734,748,974,989,1003,958,988,973,1002,942,987,957,972,1001,926,986,941,971,956,1000,910,985,925,999,894,970,-1071,-1087,-1102,1390,-1135,1436,1509,1451,1374,-1151,1405,1358,1480,1420,-1167,1507,1494,1389,1342,1465,1435,1450,1326,1505,1310,1493,1373,1479,1404,1492,1464,1419,428,443,472,397,736,526,464,464,486,457,442,471,484,482,1357,1449,1434,1478,1388,1491,1341,1490,1325,1489,1463,1403,1309,1477,1372,1448,1418,1433,1476,1356,1462,1387,-1439,1475,1340,1447,1402,1474,1324,1461,1371,1473,269,448,1432,1417,1308,1460,-1711,1459,-1727,1441,1099,1099,1446,1386,1431,1401,-1743,1289,1083,1083,1160,1160,1458,1445,1067,1067,1370,1457,1307,1430,1129,1129,1098,1098,268,432,267,416,266,400,-1887,1144,1187,1082,1173,1113,1186,1066,1050,1158,1128,1143,1172,1097,1171,1081,420,391,1157,1112,1170,1142,1127,1065,1169,1049,1156,1096,1141,1111,1155,1080,1126,1154,1064,1153,1140,1095,1048,-2159,1125,1110,1137,-2175,823,823,1139,1138,807,807,384,264,368,263,868,838,853,791,867,822,852,837,866,806,865,790,-2319,851,821,836,352,262,850,805,849,-2399,533,533,835,820,336,261,578,548,563,577,532,532,832,772,562,562,547,547,305,275,560,515,290,290,288,258 }; static const drmp3_uint8 tab32[] = { 130,162,193,209,44,28,76,140,9,9,9,9,9,9,9,9,190,254,222,238,126,94,157,157,109,61,173,205}; static const drmp3_uint8 tab33[] = { 252,236,220,204,188,172,156,140,124,108,92,76,60,44,28,12 }; static const drmp3_int16 tabindex[2*16] = { 0,32,64,98,0,132,180,218,292,364,426,538,648,746,0,1126,1460,1460,1460,1460,1460,1460,1460,1460,1842,1842,1842,1842,1842,1842,1842,1842 }; static const drmp3_uint8 g_linbits[] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,4,6,8,10,13,4,5,6,7,8,9,11,13 }; #define DRMP3_PEEK_BITS(n) (bs_cache >> (32 - (n))) #define DRMP3_FLUSH_BITS(n) { bs_cache <<= (n); bs_sh += (n); } #define DRMP3_CHECK_BITS while (bs_sh >= 0) { bs_cache |= (drmp3_uint32)*bs_next_ptr++ << bs_sh; bs_sh -= 8; } #define DRMP3_BSPOS ((bs_next_ptr - bs->buf)*8 - 24 + bs_sh) float one = 0.0f; int ireg = 0, big_val_cnt = gr_info->big_values; const drmp3_uint8 *sfb = gr_info->sfbtab; const drmp3_uint8 *bs_next_ptr = bs->buf + bs->pos/8; drmp3_uint32 bs_cache = (((bs_next_ptr[0]*256u + bs_next_ptr[1])*256u + bs_next_ptr[2])*256u + bs_next_ptr[3]) << (bs->pos & 7); int pairs_to_decode, np, bs_sh = (bs->pos & 7) - 8; bs_next_ptr += 4; while (big_val_cnt > 0) { int tab_num = gr_info->table_select[ireg]; int sfb_cnt = gr_info->region_count[ireg++]; const drmp3_int16 *codebook = tabs + tabindex[tab_num]; int linbits = g_linbits[tab_num]; if (linbits) { do { np = *sfb++ / 2; pairs_to_decode = DRMP3_MIN(big_val_cnt, np); one = *scf++; do { int j, w = 5; int leaf = codebook[DRMP3_PEEK_BITS(w)]; while (leaf < 0) { DRMP3_FLUSH_BITS(w); w = leaf & 7; leaf = codebook[DRMP3_PEEK_BITS(w) - (leaf >> 3)]; } DRMP3_FLUSH_BITS(leaf >> 8); for (j = 0; j < 2; j++, dst++, leaf >>= 4) { int lsb = leaf & 0x0F; if (lsb == 15) { lsb += DRMP3_PEEK_BITS(linbits); DRMP3_FLUSH_BITS(linbits); DRMP3_CHECK_BITS; *dst = one*drmp3_L3_pow_43(lsb)*((drmp3_int32)bs_cache < 0 ? -1: 1); } else { *dst = g_drmp3_pow43[16 + lsb - 16*(bs_cache >> 31)]*one; } DRMP3_FLUSH_BITS(lsb ? 1 : 0); } DRMP3_CHECK_BITS; } while (--pairs_to_decode); } while ((big_val_cnt -= np) > 0 && --sfb_cnt >= 0); } else { do { np = *sfb++ / 2; pairs_to_decode = DRMP3_MIN(big_val_cnt, np); one = *scf++; do { int j, w = 5; int leaf = codebook[DRMP3_PEEK_BITS(w)]; while (leaf < 0) { DRMP3_FLUSH_BITS(w); w = leaf & 7; leaf = codebook[DRMP3_PEEK_BITS(w) - (leaf >> 3)]; } DRMP3_FLUSH_BITS(leaf >> 8); for (j = 0; j < 2; j++, dst++, leaf >>= 4) { int lsb = leaf & 0x0F; *dst = g_drmp3_pow43[16 + lsb - 16*(bs_cache >> 31)]*one; DRMP3_FLUSH_BITS(lsb ? 1 : 0); } DRMP3_CHECK_BITS; } while (--pairs_to_decode); } while ((big_val_cnt -= np) > 0 && --sfb_cnt >= 0); } } for (np = 1 - big_val_cnt;; dst += 4) { const drmp3_uint8 *codebook_count1 = (gr_info->count1_table) ? tab33 : tab32; int leaf = codebook_count1[DRMP3_PEEK_BITS(4)]; if (!(leaf & 8)) { leaf = codebook_count1[(leaf >> 3) + (bs_cache << 4 >> (32 - (leaf & 3)))]; } DRMP3_FLUSH_BITS(leaf & 7); if (DRMP3_BSPOS > layer3gr_limit) { break; } #define DRMP3_RELOAD_SCALEFACTOR if (!--np) { np = *sfb++/2; if (!np) break; one = *scf++; } #define DRMP3_DEQ_COUNT1(s) if (leaf & (128 >> s)) { dst[s] = ((drmp3_int32)bs_cache < 0) ? -one : one; DRMP3_FLUSH_BITS(1) } DRMP3_RELOAD_SCALEFACTOR; DRMP3_DEQ_COUNT1(0); DRMP3_DEQ_COUNT1(1); DRMP3_RELOAD_SCALEFACTOR; DRMP3_DEQ_COUNT1(2); DRMP3_DEQ_COUNT1(3); DRMP3_CHECK_BITS; } bs->pos = layer3gr_limit; } static void drmp3_L3_midside_stereo(float *left, int n) { int i = 0; float *right = left + 576; #if DRMP3_HAVE_SIMD if (drmp3_have_simd()) { for (; i < n - 3; i += 4) { drmp3_f4 vl = DRMP3_VLD(left + i); drmp3_f4 vr = DRMP3_VLD(right + i); DRMP3_VSTORE(left + i, DRMP3_VADD(vl, vr)); DRMP3_VSTORE(right + i, DRMP3_VSUB(vl, vr)); } #ifdef __GNUC__ /* Workaround for spurious -Waggressive-loop-optimizations warning from gcc. * For more info see: https://github.com/lieff/minimp3/issues/88 */ if (__builtin_constant_p(n % 4 == 0) && n % 4 == 0) return; #endif } #endif for (; i < n; i++) { float a = left[i]; float b = right[i]; left[i] = a + b; right[i] = a - b; } } static void drmp3_L3_intensity_stereo_band(float *left, int n, float kl, float kr) { int i; for (i = 0; i < n; i++) { left[i + 576] = left[i]*kr; left[i] = left[i]*kl; } } static void drmp3_L3_stereo_top_band(const float *right, const drmp3_uint8 *sfb, int nbands, int max_band[3]) { int i, k; max_band[0] = max_band[1] = max_band[2] = -1; for (i = 0; i < nbands; i++) { for (k = 0; k < sfb[i]; k += 2) { if (right[k] != 0 || right[k + 1] != 0) { max_band[i % 3] = i; break; } } right += sfb[i]; } } static void drmp3_L3_stereo_process(float *left, const drmp3_uint8 *ist_pos, const drmp3_uint8 *sfb, const drmp3_uint8 *hdr, int max_band[3], int mpeg2_sh) { static const float g_pan[7*2] = { 0,1,0.21132487f,0.78867513f,0.36602540f,0.63397460f,0.5f,0.5f,0.63397460f,0.36602540f,0.78867513f,0.21132487f,1,0 }; unsigned i, max_pos = DRMP3_HDR_TEST_MPEG1(hdr) ? 7 : 64; for (i = 0; sfb[i]; i++) { unsigned ipos = ist_pos[i]; if ((int)i > max_band[i % 3] && ipos < max_pos) { float kl, kr, s = DRMP3_HDR_TEST_MS_STEREO(hdr) ? 1.41421356f : 1; if (DRMP3_HDR_TEST_MPEG1(hdr)) { kl = g_pan[2*ipos]; kr = g_pan[2*ipos + 1]; } else { kl = 1; kr = drmp3_L3_ldexp_q2(1, (ipos + 1) >> 1 << mpeg2_sh); if (ipos & 1) { kl = kr; kr = 1; } } drmp3_L3_intensity_stereo_band(left, sfb[i], kl*s, kr*s); } else if (DRMP3_HDR_TEST_MS_STEREO(hdr)) { drmp3_L3_midside_stereo(left, sfb[i]); } left += sfb[i]; } } static void drmp3_L3_intensity_stereo(float *left, drmp3_uint8 *ist_pos, const drmp3_L3_gr_info *gr, const drmp3_uint8 *hdr) { int max_band[3], n_sfb = gr->n_long_sfb + gr->n_short_sfb; int i, max_blocks = gr->n_short_sfb ? 3 : 1; drmp3_L3_stereo_top_band(left + 576, gr->sfbtab, n_sfb, max_band); if (gr->n_long_sfb) { max_band[0] = max_band[1] = max_band[2] = DRMP3_MAX(DRMP3_MAX(max_band[0], max_band[1]), max_band[2]); } for (i = 0; i < max_blocks; i++) { int default_pos = DRMP3_HDR_TEST_MPEG1(hdr) ? 3 : 0; int itop = n_sfb - max_blocks + i; int prev = itop - max_blocks; ist_pos[itop] = (drmp3_uint8)(max_band[i] >= prev ? default_pos : ist_pos[prev]); } drmp3_L3_stereo_process(left, ist_pos, gr->sfbtab, hdr, max_band, gr[1].scalefac_compress & 1); } static void drmp3_L3_reorder(float *grbuf, float *scratch, const drmp3_uint8 *sfb) { int i, len; float *src = grbuf, *dst = scratch; for (;0 != (len = *sfb); sfb += 3, src += 2*len) { for (i = 0; i < len; i++, src++) { *dst++ = src[0*len]; *dst++ = src[1*len]; *dst++ = src[2*len]; } } DRMP3_COPY_MEMORY(grbuf, scratch, (dst - scratch)*sizeof(float)); } static void drmp3_L3_antialias(float *grbuf, int nbands) { static const float g_aa[2][8] = { {0.85749293f,0.88174200f,0.94962865f,0.98331459f,0.99551782f,0.99916056f,0.99989920f,0.99999316f}, {0.51449576f,0.47173197f,0.31337745f,0.18191320f,0.09457419f,0.04096558f,0.01419856f,0.00369997f} }; for (; nbands > 0; nbands--, grbuf += 18) { int i = 0; #if DRMP3_HAVE_SIMD if (drmp3_have_simd()) for (; i < 8; i += 4) { drmp3_f4 vu = DRMP3_VLD(grbuf + 18 + i); drmp3_f4 vd = DRMP3_VLD(grbuf + 14 - i); drmp3_f4 vc0 = DRMP3_VLD(g_aa[0] + i); drmp3_f4 vc1 = DRMP3_VLD(g_aa[1] + i); vd = DRMP3_VREV(vd); DRMP3_VSTORE(grbuf + 18 + i, DRMP3_VSUB(DRMP3_VMUL(vu, vc0), DRMP3_VMUL(vd, vc1))); vd = DRMP3_VADD(DRMP3_VMUL(vu, vc1), DRMP3_VMUL(vd, vc0)); DRMP3_VSTORE(grbuf + 14 - i, DRMP3_VREV(vd)); } #endif #ifndef DR_MP3_ONLY_SIMD for(; i < 8; i++) { float u = grbuf[18 + i]; float d = grbuf[17 - i]; grbuf[18 + i] = u*g_aa[0][i] - d*g_aa[1][i]; grbuf[17 - i] = u*g_aa[1][i] + d*g_aa[0][i]; } #endif } } static void drmp3_L3_dct3_9(float *y) { float s0, s1, s2, s3, s4, s5, s6, s7, s8, t0, t2, t4; s0 = y[0]; s2 = y[2]; s4 = y[4]; s6 = y[6]; s8 = y[8]; t0 = s0 + s6*0.5f; s0 -= s6; t4 = (s4 + s2)*0.93969262f; t2 = (s8 + s2)*0.76604444f; s6 = (s4 - s8)*0.17364818f; s4 += s8 - s2; s2 = s0 - s4*0.5f; y[4] = s4 + s0; s8 = t0 - t2 + s6; s0 = t0 - t4 + t2; s4 = t0 + t4 - s6; s1 = y[1]; s3 = y[3]; s5 = y[5]; s7 = y[7]; s3 *= 0.86602540f; t0 = (s5 + s1)*0.98480775f; t4 = (s5 - s7)*0.34202014f; t2 = (s1 + s7)*0.64278761f; s1 = (s1 - s5 - s7)*0.86602540f; s5 = t0 - s3 - t2; s7 = t4 - s3 - t0; s3 = t4 + s3 - t2; y[0] = s4 - s7; y[1] = s2 + s1; y[2] = s0 - s3; y[3] = s8 + s5; y[5] = s8 - s5; y[6] = s0 + s3; y[7] = s2 - s1; y[8] = s4 + s7; } static void drmp3_L3_imdct36(float *grbuf, float *overlap, const float *window, int nbands) { int i, j; static const float g_twid9[18] = { 0.73727734f,0.79335334f,0.84339145f,0.88701083f,0.92387953f,0.95371695f,0.97629601f,0.99144486f,0.99904822f,0.67559021f,0.60876143f,0.53729961f,0.46174861f,0.38268343f,0.30070580f,0.21643961f,0.13052619f,0.04361938f }; for (j = 0; j < nbands; j++, grbuf += 18, overlap += 9) { float co[9], si[9]; co[0] = -grbuf[0]; si[0] = grbuf[17]; for (i = 0; i < 4; i++) { si[8 - 2*i] = grbuf[4*i + 1] - grbuf[4*i + 2]; co[1 + 2*i] = grbuf[4*i + 1] + grbuf[4*i + 2]; si[7 - 2*i] = grbuf[4*i + 4] - grbuf[4*i + 3]; co[2 + 2*i] = -(grbuf[4*i + 3] + grbuf[4*i + 4]); } drmp3_L3_dct3_9(co); drmp3_L3_dct3_9(si); si[1] = -si[1]; si[3] = -si[3]; si[5] = -si[5]; si[7] = -si[7]; i = 0; #if DRMP3_HAVE_SIMD if (drmp3_have_simd()) for (; i < 8; i += 4) { drmp3_f4 vovl = DRMP3_VLD(overlap + i); drmp3_f4 vc = DRMP3_VLD(co + i); drmp3_f4 vs = DRMP3_VLD(si + i); drmp3_f4 vr0 = DRMP3_VLD(g_twid9 + i); drmp3_f4 vr1 = DRMP3_VLD(g_twid9 + 9 + i); drmp3_f4 vw0 = DRMP3_VLD(window + i); drmp3_f4 vw1 = DRMP3_VLD(window + 9 + i); drmp3_f4 vsum = DRMP3_VADD(DRMP3_VMUL(vc, vr1), DRMP3_VMUL(vs, vr0)); DRMP3_VSTORE(overlap + i, DRMP3_VSUB(DRMP3_VMUL(vc, vr0), DRMP3_VMUL(vs, vr1))); DRMP3_VSTORE(grbuf + i, DRMP3_VSUB(DRMP3_VMUL(vovl, vw0), DRMP3_VMUL(vsum, vw1))); vsum = DRMP3_VADD(DRMP3_VMUL(vovl, vw1), DRMP3_VMUL(vsum, vw0)); DRMP3_VSTORE(grbuf + 14 - i, DRMP3_VREV(vsum)); } #endif for (; i < 9; i++) { float ovl = overlap[i]; float sum = co[i]*g_twid9[9 + i] + si[i]*g_twid9[0 + i]; overlap[i] = co[i]*g_twid9[0 + i] - si[i]*g_twid9[9 + i]; grbuf[i] = ovl*window[0 + i] - sum*window[9 + i]; grbuf[17 - i] = ovl*window[9 + i] + sum*window[0 + i]; } } } static void drmp3_L3_idct3(float x0, float x1, float x2, float *dst) { float m1 = x1*0.86602540f; float a1 = x0 - x2*0.5f; dst[1] = x0 + x2; dst[0] = a1 + m1; dst[2] = a1 - m1; } static void drmp3_L3_imdct12(float *x, float *dst, float *overlap) { static const float g_twid3[6] = { 0.79335334f,0.92387953f,0.99144486f, 0.60876143f,0.38268343f,0.13052619f }; float co[3], si[3]; int i; drmp3_L3_idct3(-x[0], x[6] + x[3], x[12] + x[9], co); drmp3_L3_idct3(x[15], x[12] - x[9], x[6] - x[3], si); si[1] = -si[1]; for (i = 0; i < 3; i++) { float ovl = overlap[i]; float sum = co[i]*g_twid3[3 + i] + si[i]*g_twid3[0 + i]; overlap[i] = co[i]*g_twid3[0 + i] - si[i]*g_twid3[3 + i]; dst[i] = ovl*g_twid3[2 - i] - sum*g_twid3[5 - i]; dst[5 - i] = ovl*g_twid3[5 - i] + sum*g_twid3[2 - i]; } } static void drmp3_L3_imdct_short(float *grbuf, float *overlap, int nbands) { for (;nbands > 0; nbands--, overlap += 9, grbuf += 18) { float tmp[18]; DRMP3_COPY_MEMORY(tmp, grbuf, sizeof(tmp)); DRMP3_COPY_MEMORY(grbuf, overlap, 6*sizeof(float)); drmp3_L3_imdct12(tmp, grbuf + 6, overlap + 6); drmp3_L3_imdct12(tmp + 1, grbuf + 12, overlap + 6); drmp3_L3_imdct12(tmp + 2, overlap, overlap + 6); } } static void drmp3_L3_change_sign(float *grbuf) { int b, i; for (b = 0, grbuf += 18; b < 32; b += 2, grbuf += 36) for (i = 1; i < 18; i += 2) grbuf[i] = -grbuf[i]; } static void drmp3_L3_imdct_gr(float *grbuf, float *overlap, unsigned block_type, unsigned n_long_bands) { static const float g_mdct_window[2][18] = { { 0.99904822f,0.99144486f,0.97629601f,0.95371695f,0.92387953f,0.88701083f,0.84339145f,0.79335334f,0.73727734f,0.04361938f,0.13052619f,0.21643961f,0.30070580f,0.38268343f,0.46174861f,0.53729961f,0.60876143f,0.67559021f }, { 1,1,1,1,1,1,0.99144486f,0.92387953f,0.79335334f,0,0,0,0,0,0,0.13052619f,0.38268343f,0.60876143f } }; if (n_long_bands) { drmp3_L3_imdct36(grbuf, overlap, g_mdct_window[0], n_long_bands); grbuf += 18*n_long_bands; overlap += 9*n_long_bands; } if (block_type == DRMP3_SHORT_BLOCK_TYPE) drmp3_L3_imdct_short(grbuf, overlap, 32 - n_long_bands); else drmp3_L3_imdct36(grbuf, overlap, g_mdct_window[block_type == DRMP3_STOP_BLOCK_TYPE], 32 - n_long_bands); } static void drmp3_L3_save_reservoir(drmp3dec *h, drmp3dec_scratch *s) { int pos = (s->bs.pos + 7)/8u; int remains = s->bs.limit/8u - pos; if (remains > DRMP3_MAX_BITRESERVOIR_BYTES) { pos += remains - DRMP3_MAX_BITRESERVOIR_BYTES; remains = DRMP3_MAX_BITRESERVOIR_BYTES; } if (remains > 0) { DRMP3_MOVE_MEMORY(h->reserv_buf, s->maindata + pos, remains); } h->reserv = remains; } static int drmp3_L3_restore_reservoir(drmp3dec *h, drmp3_bs *bs, drmp3dec_scratch *s, int main_data_begin) { int frame_bytes = (bs->limit - bs->pos)/8; int bytes_have = DRMP3_MIN(h->reserv, main_data_begin); DRMP3_COPY_MEMORY(s->maindata, h->reserv_buf + DRMP3_MAX(0, h->reserv - main_data_begin), DRMP3_MIN(h->reserv, main_data_begin)); DRMP3_COPY_MEMORY(s->maindata + bytes_have, bs->buf + bs->pos/8, frame_bytes); drmp3_bs_init(&s->bs, s->maindata, bytes_have + frame_bytes); return h->reserv >= main_data_begin; } static void drmp3_L3_decode(drmp3dec *h, drmp3dec_scratch *s, drmp3_L3_gr_info *gr_info, int nch) { int ch; for (ch = 0; ch < nch; ch++) { int layer3gr_limit = s->bs.pos + gr_info[ch].part_23_length; drmp3_L3_decode_scalefactors(h->header, s->ist_pos[ch], &s->bs, gr_info + ch, s->scf, ch); drmp3_L3_huffman(s->grbuf[ch], &s->bs, gr_info + ch, s->scf, layer3gr_limit); } if (DRMP3_HDR_TEST_I_STEREO(h->header)) { drmp3_L3_intensity_stereo(s->grbuf[0], s->ist_pos[1], gr_info, h->header); } else if (DRMP3_HDR_IS_MS_STEREO(h->header)) { drmp3_L3_midside_stereo(s->grbuf[0], 576); } for (ch = 0; ch < nch; ch++, gr_info++) { int aa_bands = 31; int n_long_bands = (gr_info->mixed_block_flag ? 2 : 0) << (int)(DRMP3_HDR_GET_MY_SAMPLE_RATE(h->header) == 2); if (gr_info->n_short_sfb) { aa_bands = n_long_bands - 1; drmp3_L3_reorder(s->grbuf[ch] + n_long_bands*18, s->syn[0], gr_info->sfbtab + gr_info->n_long_sfb); } drmp3_L3_antialias(s->grbuf[ch], aa_bands); drmp3_L3_imdct_gr(s->grbuf[ch], h->mdct_overlap[ch], gr_info->block_type, n_long_bands); drmp3_L3_change_sign(s->grbuf[ch]); } } static void drmp3d_DCT_II(float *grbuf, int n) { static const float g_sec[24] = { 10.19000816f,0.50060302f,0.50241929f,3.40760851f,0.50547093f,0.52249861f,2.05778098f,0.51544732f,0.56694406f,1.48416460f,0.53104258f,0.64682180f,1.16943991f,0.55310392f,0.78815460f,0.97256821f,0.58293498f,1.06067765f,0.83934963f,0.62250412f,1.72244716f,0.74453628f,0.67480832f,5.10114861f }; int i, k = 0; #if DRMP3_HAVE_SIMD if (drmp3_have_simd()) for (; k < n; k += 4) { drmp3_f4 t[4][8], *x; float *y = grbuf + k; for (x = t[0], i = 0; i < 8; i++, x++) { drmp3_f4 x0 = DRMP3_VLD(&y[i*18]); drmp3_f4 x1 = DRMP3_VLD(&y[(15 - i)*18]); drmp3_f4 x2 = DRMP3_VLD(&y[(16 + i)*18]); drmp3_f4 x3 = DRMP3_VLD(&y[(31 - i)*18]); drmp3_f4 t0 = DRMP3_VADD(x0, x3); drmp3_f4 t1 = DRMP3_VADD(x1, x2); drmp3_f4 t2 = DRMP3_VMUL_S(DRMP3_VSUB(x1, x2), g_sec[3*i + 0]); drmp3_f4 t3 = DRMP3_VMUL_S(DRMP3_VSUB(x0, x3), g_sec[3*i + 1]); x[0] = DRMP3_VADD(t0, t1); x[8] = DRMP3_VMUL_S(DRMP3_VSUB(t0, t1), g_sec[3*i + 2]); x[16] = DRMP3_VADD(t3, t2); x[24] = DRMP3_VMUL_S(DRMP3_VSUB(t3, t2), g_sec[3*i + 2]); } for (x = t[0], i = 0; i < 4; i++, x += 8) { drmp3_f4 x0 = x[0], x1 = x[1], x2 = x[2], x3 = x[3], x4 = x[4], x5 = x[5], x6 = x[6], x7 = x[7], xt; xt = DRMP3_VSUB(x0, x7); x0 = DRMP3_VADD(x0, x7); x7 = DRMP3_VSUB(x1, x6); x1 = DRMP3_VADD(x1, x6); x6 = DRMP3_VSUB(x2, x5); x2 = DRMP3_VADD(x2, x5); x5 = DRMP3_VSUB(x3, x4); x3 = DRMP3_VADD(x3, x4); x4 = DRMP3_VSUB(x0, x3); x0 = DRMP3_VADD(x0, x3); x3 = DRMP3_VSUB(x1, x2); x1 = DRMP3_VADD(x1, x2); x[0] = DRMP3_VADD(x0, x1); x[4] = DRMP3_VMUL_S(DRMP3_VSUB(x0, x1), 0.70710677f); x5 = DRMP3_VADD(x5, x6); x6 = DRMP3_VMUL_S(DRMP3_VADD(x6, x7), 0.70710677f); x7 = DRMP3_VADD(x7, xt); x3 = DRMP3_VMUL_S(DRMP3_VADD(x3, x4), 0.70710677f); x5 = DRMP3_VSUB(x5, DRMP3_VMUL_S(x7, 0.198912367f)); /* rotate by PI/8 */ x7 = DRMP3_VADD(x7, DRMP3_VMUL_S(x5, 0.382683432f)); x5 = DRMP3_VSUB(x5, DRMP3_VMUL_S(x7, 0.198912367f)); x0 = DRMP3_VSUB(xt, x6); xt = DRMP3_VADD(xt, x6); x[1] = DRMP3_VMUL_S(DRMP3_VADD(xt, x7), 0.50979561f); x[2] = DRMP3_VMUL_S(DRMP3_VADD(x4, x3), 0.54119611f); x[3] = DRMP3_VMUL_S(DRMP3_VSUB(x0, x5), 0.60134488f); x[5] = DRMP3_VMUL_S(DRMP3_VADD(x0, x5), 0.89997619f); x[6] = DRMP3_VMUL_S(DRMP3_VSUB(x4, x3), 1.30656302f); x[7] = DRMP3_VMUL_S(DRMP3_VSUB(xt, x7), 2.56291556f); } if (k > n - 3) { #if DRMP3_HAVE_SSE #define DRMP3_VSAVE2(i, v) _mm_storel_pi((__m64 *)(void*)&y[i*18], v) #else #define DRMP3_VSAVE2(i, v) vst1_f32((float32_t *)&y[(i)*18], vget_low_f32(v)) #endif for (i = 0; i < 7; i++, y += 4*18) { drmp3_f4 s = DRMP3_VADD(t[3][i], t[3][i + 1]); DRMP3_VSAVE2(0, t[0][i]); DRMP3_VSAVE2(1, DRMP3_VADD(t[2][i], s)); DRMP3_VSAVE2(2, DRMP3_VADD(t[1][i], t[1][i + 1])); DRMP3_VSAVE2(3, DRMP3_VADD(t[2][1 + i], s)); } DRMP3_VSAVE2(0, t[0][7]); DRMP3_VSAVE2(1, DRMP3_VADD(t[2][7], t[3][7])); DRMP3_VSAVE2(2, t[1][7]); DRMP3_VSAVE2(3, t[3][7]); } else { #define DRMP3_VSAVE4(i, v) DRMP3_VSTORE(&y[(i)*18], v) for (i = 0; i < 7; i++, y += 4*18) { drmp3_f4 s = DRMP3_VADD(t[3][i], t[3][i + 1]); DRMP3_VSAVE4(0, t[0][i]); DRMP3_VSAVE4(1, DRMP3_VADD(t[2][i], s)); DRMP3_VSAVE4(2, DRMP3_VADD(t[1][i], t[1][i + 1])); DRMP3_VSAVE4(3, DRMP3_VADD(t[2][1 + i], s)); } DRMP3_VSAVE4(0, t[0][7]); DRMP3_VSAVE4(1, DRMP3_VADD(t[2][7], t[3][7])); DRMP3_VSAVE4(2, t[1][7]); DRMP3_VSAVE4(3, t[3][7]); } } else #endif #ifdef DR_MP3_ONLY_SIMD {} /* for HAVE_SIMD=1, MINIMP3_ONLY_SIMD=1 case we do not need non-intrinsic "else" branch */ #else for (; k < n; k++) { float t[4][8], *x, *y = grbuf + k; for (x = t[0], i = 0; i < 8; i++, x++) { float x0 = y[i*18]; float x1 = y[(15 - i)*18]; float x2 = y[(16 + i)*18]; float x3 = y[(31 - i)*18]; float t0 = x0 + x3; float t1 = x1 + x2; float t2 = (x1 - x2)*g_sec[3*i + 0]; float t3 = (x0 - x3)*g_sec[3*i + 1]; x[0] = t0 + t1; x[8] = (t0 - t1)*g_sec[3*i + 2]; x[16] = t3 + t2; x[24] = (t3 - t2)*g_sec[3*i + 2]; } for (x = t[0], i = 0; i < 4; i++, x += 8) { float x0 = x[0], x1 = x[1], x2 = x[2], x3 = x[3], x4 = x[4], x5 = x[5], x6 = x[6], x7 = x[7], xt; xt = x0 - x7; x0 += x7; x7 = x1 - x6; x1 += x6; x6 = x2 - x5; x2 += x5; x5 = x3 - x4; x3 += x4; x4 = x0 - x3; x0 += x3; x3 = x1 - x2; x1 += x2; x[0] = x0 + x1; x[4] = (x0 - x1)*0.70710677f; x5 = x5 + x6; x6 = (x6 + x7)*0.70710677f; x7 = x7 + xt; x3 = (x3 + x4)*0.70710677f; x5 -= x7*0.198912367f; /* rotate by PI/8 */ x7 += x5*0.382683432f; x5 -= x7*0.198912367f; x0 = xt - x6; xt += x6; x[1] = (xt + x7)*0.50979561f; x[2] = (x4 + x3)*0.54119611f; x[3] = (x0 - x5)*0.60134488f; x[5] = (x0 + x5)*0.89997619f; x[6] = (x4 - x3)*1.30656302f; x[7] = (xt - x7)*2.56291556f; } for (i = 0; i < 7; i++, y += 4*18) { y[0*18] = t[0][i]; y[1*18] = t[2][i] + t[3][i] + t[3][i + 1]; y[2*18] = t[1][i] + t[1][i + 1]; y[3*18] = t[2][i + 1] + t[3][i] + t[3][i + 1]; } y[0*18] = t[0][7]; y[1*18] = t[2][7] + t[3][7]; y[2*18] = t[1][7]; y[3*18] = t[3][7]; } #endif } #ifndef DR_MP3_FLOAT_OUTPUT typedef drmp3_int16 drmp3d_sample_t; static drmp3_int16 drmp3d_scale_pcm(float sample) { drmp3_int16 s; #if DRMP3_HAVE_ARMV6 drmp3_int32 s32 = (drmp3_int32)(sample + .5f); s32 -= (s32 < 0); s = (drmp3_int16)drmp3_clip_int16_arm(s32); #else if (sample >= 32766.5) return (drmp3_int16) 32767; if (sample <= -32767.5) return (drmp3_int16)-32768; s = (drmp3_int16)(sample + .5f); s -= (s < 0); /* away from zero, to be compliant */ #endif return s; } #else typedef float drmp3d_sample_t; static float drmp3d_scale_pcm(float sample) { return sample*(1.f/32768.f); } #endif static void drmp3d_synth_pair(drmp3d_sample_t *pcm, int nch, const float *z) { float a; a = (z[14*64] - z[ 0]) * 29; a += (z[ 1*64] + z[13*64]) * 213; a += (z[12*64] - z[ 2*64]) * 459; a += (z[ 3*64] + z[11*64]) * 2037; a += (z[10*64] - z[ 4*64]) * 5153; a += (z[ 5*64] + z[ 9*64]) * 6574; a += (z[ 8*64] - z[ 6*64]) * 37489; a += z[ 7*64] * 75038; pcm[0] = drmp3d_scale_pcm(a); z += 2; a = z[14*64] * 104; a += z[12*64] * 1567; a += z[10*64] * 9727; a += z[ 8*64] * 64019; a += z[ 6*64] * -9975; a += z[ 4*64] * -45; a += z[ 2*64] * 146; a += z[ 0*64] * -5; pcm[16*nch] = drmp3d_scale_pcm(a); } static void drmp3d_synth(float *xl, drmp3d_sample_t *dstl, int nch, float *lins) { int i; float *xr = xl + 576*(nch - 1); drmp3d_sample_t *dstr = dstl + (nch - 1); static const float g_win[] = { -1,26,-31,208,218,401,-519,2063,2000,4788,-5517,7134,5959,35640,-39336,74992, -1,24,-35,202,222,347,-581,2080,1952,4425,-5879,7640,5288,33791,-41176,74856, -1,21,-38,196,225,294,-645,2087,1893,4063,-6237,8092,4561,31947,-43006,74630, -1,19,-41,190,227,244,-711,2085,1822,3705,-6589,8492,3776,30112,-44821,74313, -1,17,-45,183,228,197,-779,2075,1739,3351,-6935,8840,2935,28289,-46617,73908, -1,16,-49,176,228,153,-848,2057,1644,3004,-7271,9139,2037,26482,-48390,73415, -2,14,-53,169,227,111,-919,2032,1535,2663,-7597,9389,1082,24694,-50137,72835, -2,13,-58,161,224,72,-991,2001,1414,2330,-7910,9592,70,22929,-51853,72169, -2,11,-63,154,221,36,-1064,1962,1280,2006,-8209,9750,-998,21189,-53534,71420, -2,10,-68,147,215,2,-1137,1919,1131,1692,-8491,9863,-2122,19478,-55178,70590, -3,9,-73,139,208,-29,-1210,1870,970,1388,-8755,9935,-3300,17799,-56778,69679, -3,8,-79,132,200,-57,-1283,1817,794,1095,-8998,9966,-4533,16155,-58333,68692, -4,7,-85,125,189,-83,-1356,1759,605,814,-9219,9959,-5818,14548,-59838,67629, -4,7,-91,117,177,-106,-1428,1698,402,545,-9416,9916,-7154,12980,-61289,66494, -5,6,-97,111,163,-127,-1498,1634,185,288,-9585,9838,-8540,11455,-62684,65290 }; float *zlin = lins + 15*64; const float *w = g_win; zlin[4*15] = xl[18*16]; zlin[4*15 + 1] = xr[18*16]; zlin[4*15 + 2] = xl[0]; zlin[4*15 + 3] = xr[0]; zlin[4*31] = xl[1 + 18*16]; zlin[4*31 + 1] = xr[1 + 18*16]; zlin[4*31 + 2] = xl[1]; zlin[4*31 + 3] = xr[1]; drmp3d_synth_pair(dstr, nch, lins + 4*15 + 1); drmp3d_synth_pair(dstr + 32*nch, nch, lins + 4*15 + 64 + 1); drmp3d_synth_pair(dstl, nch, lins + 4*15); drmp3d_synth_pair(dstl + 32*nch, nch, lins + 4*15 + 64); #if DRMP3_HAVE_SIMD if (drmp3_have_simd()) for (i = 14; i >= 0; i--) { #define DRMP3_VLOAD(k) drmp3_f4 w0 = DRMP3_VSET(*w++); drmp3_f4 w1 = DRMP3_VSET(*w++); drmp3_f4 vz = DRMP3_VLD(&zlin[4*i - 64*k]); drmp3_f4 vy = DRMP3_VLD(&zlin[4*i - 64*(15 - k)]); #define DRMP3_V0(k) { DRMP3_VLOAD(k) b = DRMP3_VADD(DRMP3_VMUL(vz, w1), DRMP3_VMUL(vy, w0)) ; a = DRMP3_VSUB(DRMP3_VMUL(vz, w0), DRMP3_VMUL(vy, w1)); } #define DRMP3_V1(k) { DRMP3_VLOAD(k) b = DRMP3_VADD(b, DRMP3_VADD(DRMP3_VMUL(vz, w1), DRMP3_VMUL(vy, w0))); a = DRMP3_VADD(a, DRMP3_VSUB(DRMP3_VMUL(vz, w0), DRMP3_VMUL(vy, w1))); } #define DRMP3_V2(k) { DRMP3_VLOAD(k) b = DRMP3_VADD(b, DRMP3_VADD(DRMP3_VMUL(vz, w1), DRMP3_VMUL(vy, w0))); a = DRMP3_VADD(a, DRMP3_VSUB(DRMP3_VMUL(vy, w1), DRMP3_VMUL(vz, w0))); } drmp3_f4 a, b; zlin[4*i] = xl[18*(31 - i)]; zlin[4*i + 1] = xr[18*(31 - i)]; zlin[4*i + 2] = xl[1 + 18*(31 - i)]; zlin[4*i + 3] = xr[1 + 18*(31 - i)]; zlin[4*i + 64] = xl[1 + 18*(1 + i)]; zlin[4*i + 64 + 1] = xr[1 + 18*(1 + i)]; zlin[4*i - 64 + 2] = xl[18*(1 + i)]; zlin[4*i - 64 + 3] = xr[18*(1 + i)]; DRMP3_V0(0) DRMP3_V2(1) DRMP3_V1(2) DRMP3_V2(3) DRMP3_V1(4) DRMP3_V2(5) DRMP3_V1(6) DRMP3_V2(7) { #ifndef DR_MP3_FLOAT_OUTPUT #if DRMP3_HAVE_SSE static const drmp3_f4 g_max = { 32767.0f, 32767.0f, 32767.0f, 32767.0f }; static const drmp3_f4 g_min = { -32768.0f, -32768.0f, -32768.0f, -32768.0f }; __m128i pcm8 = _mm_packs_epi32(_mm_cvtps_epi32(_mm_max_ps(_mm_min_ps(a, g_max), g_min)), _mm_cvtps_epi32(_mm_max_ps(_mm_min_ps(b, g_max), g_min))); dstr[(15 - i)*nch] = (drmp3_int16)_mm_extract_epi16(pcm8, 1); dstr[(17 + i)*nch] = (drmp3_int16)_mm_extract_epi16(pcm8, 5); dstl[(15 - i)*nch] = (drmp3_int16)_mm_extract_epi16(pcm8, 0); dstl[(17 + i)*nch] = (drmp3_int16)_mm_extract_epi16(pcm8, 4); dstr[(47 - i)*nch] = (drmp3_int16)_mm_extract_epi16(pcm8, 3); dstr[(49 + i)*nch] = (drmp3_int16)_mm_extract_epi16(pcm8, 7); dstl[(47 - i)*nch] = (drmp3_int16)_mm_extract_epi16(pcm8, 2); dstl[(49 + i)*nch] = (drmp3_int16)_mm_extract_epi16(pcm8, 6); #else int16x4_t pcma, pcmb; a = DRMP3_VADD(a, DRMP3_VSET(0.5f)); b = DRMP3_VADD(b, DRMP3_VSET(0.5f)); pcma = vqmovn_s32(vqaddq_s32(vcvtq_s32_f32(a), vreinterpretq_s32_u32(vcltq_f32(a, DRMP3_VSET(0))))); pcmb = vqmovn_s32(vqaddq_s32(vcvtq_s32_f32(b), vreinterpretq_s32_u32(vcltq_f32(b, DRMP3_VSET(0))))); vst1_lane_s16(dstr + (15 - i)*nch, pcma, 1); vst1_lane_s16(dstr + (17 + i)*nch, pcmb, 1); vst1_lane_s16(dstl + (15 - i)*nch, pcma, 0); vst1_lane_s16(dstl + (17 + i)*nch, pcmb, 0); vst1_lane_s16(dstr + (47 - i)*nch, pcma, 3); vst1_lane_s16(dstr + (49 + i)*nch, pcmb, 3); vst1_lane_s16(dstl + (47 - i)*nch, pcma, 2); vst1_lane_s16(dstl + (49 + i)*nch, pcmb, 2); #endif #else #if DRMP3_HAVE_SSE static const drmp3_f4 g_scale = { 1.0f/32768.0f, 1.0f/32768.0f, 1.0f/32768.0f, 1.0f/32768.0f }; #else const drmp3_f4 g_scale = vdupq_n_f32(1.0f/32768.0f); #endif a = DRMP3_VMUL(a, g_scale); b = DRMP3_VMUL(b, g_scale); #if DRMP3_HAVE_SSE _mm_store_ss(dstr + (15 - i)*nch, _mm_shuffle_ps(a, a, _MM_SHUFFLE(1, 1, 1, 1))); _mm_store_ss(dstr + (17 + i)*nch, _mm_shuffle_ps(b, b, _MM_SHUFFLE(1, 1, 1, 1))); _mm_store_ss(dstl + (15 - i)*nch, _mm_shuffle_ps(a, a, _MM_SHUFFLE(0, 0, 0, 0))); _mm_store_ss(dstl + (17 + i)*nch, _mm_shuffle_ps(b, b, _MM_SHUFFLE(0, 0, 0, 0))); _mm_store_ss(dstr + (47 - i)*nch, _mm_shuffle_ps(a, a, _MM_SHUFFLE(3, 3, 3, 3))); _mm_store_ss(dstr + (49 + i)*nch, _mm_shuffle_ps(b, b, _MM_SHUFFLE(3, 3, 3, 3))); _mm_store_ss(dstl + (47 - i)*nch, _mm_shuffle_ps(a, a, _MM_SHUFFLE(2, 2, 2, 2))); _mm_store_ss(dstl + (49 + i)*nch, _mm_shuffle_ps(b, b, _MM_SHUFFLE(2, 2, 2, 2))); #else vst1q_lane_f32(dstr + (15 - i)*nch, a, 1); vst1q_lane_f32(dstr + (17 + i)*nch, b, 1); vst1q_lane_f32(dstl + (15 - i)*nch, a, 0); vst1q_lane_f32(dstl + (17 + i)*nch, b, 0); vst1q_lane_f32(dstr + (47 - i)*nch, a, 3); vst1q_lane_f32(dstr + (49 + i)*nch, b, 3); vst1q_lane_f32(dstl + (47 - i)*nch, a, 2); vst1q_lane_f32(dstl + (49 + i)*nch, b, 2); #endif #endif /* DR_MP3_FLOAT_OUTPUT */ } } else #endif #ifdef DR_MP3_ONLY_SIMD {} /* for HAVE_SIMD=1, MINIMP3_ONLY_SIMD=1 case we do not need non-intrinsic "else" branch */ #else for (i = 14; i >= 0; i--) { #define DRMP3_LOAD(k) float w0 = *w++; float w1 = *w++; float *vz = &zlin[4*i - k*64]; float *vy = &zlin[4*i - (15 - k)*64]; #define DRMP3_S0(k) { int j; DRMP3_LOAD(k); for (j = 0; j < 4; j++) b[j] = vz[j]*w1 + vy[j]*w0, a[j] = vz[j]*w0 - vy[j]*w1; } #define DRMP3_S1(k) { int j; DRMP3_LOAD(k); for (j = 0; j < 4; j++) b[j] += vz[j]*w1 + vy[j]*w0, a[j] += vz[j]*w0 - vy[j]*w1; } #define DRMP3_S2(k) { int j; DRMP3_LOAD(k); for (j = 0; j < 4; j++) b[j] += vz[j]*w1 + vy[j]*w0, a[j] += vy[j]*w1 - vz[j]*w0; } float a[4], b[4]; zlin[4*i] = xl[18*(31 - i)]; zlin[4*i + 1] = xr[18*(31 - i)]; zlin[4*i + 2] = xl[1 + 18*(31 - i)]; zlin[4*i + 3] = xr[1 + 18*(31 - i)]; zlin[4*(i + 16)] = xl[1 + 18*(1 + i)]; zlin[4*(i + 16) + 1] = xr[1 + 18*(1 + i)]; zlin[4*(i - 16) + 2] = xl[18*(1 + i)]; zlin[4*(i - 16) + 3] = xr[18*(1 + i)]; DRMP3_S0(0) DRMP3_S2(1) DRMP3_S1(2) DRMP3_S2(3) DRMP3_S1(4) DRMP3_S2(5) DRMP3_S1(6) DRMP3_S2(7) dstr[(15 - i)*nch] = drmp3d_scale_pcm(a[1]); dstr[(17 + i)*nch] = drmp3d_scale_pcm(b[1]); dstl[(15 - i)*nch] = drmp3d_scale_pcm(a[0]); dstl[(17 + i)*nch] = drmp3d_scale_pcm(b[0]); dstr[(47 - i)*nch] = drmp3d_scale_pcm(a[3]); dstr[(49 + i)*nch] = drmp3d_scale_pcm(b[3]); dstl[(47 - i)*nch] = drmp3d_scale_pcm(a[2]); dstl[(49 + i)*nch] = drmp3d_scale_pcm(b[2]); } #endif } static void drmp3d_synth_granule(float *qmf_state, float *grbuf, int nbands, int nch, drmp3d_sample_t *pcm, float *lins) { int i; for (i = 0; i < nch; i++) { drmp3d_DCT_II(grbuf + 576*i, nbands); } DRMP3_COPY_MEMORY(lins, qmf_state, sizeof(float)*15*64); for (i = 0; i < nbands; i += 2) { drmp3d_synth(grbuf + i, pcm + 32*nch*i, nch, lins + i*64); } #ifndef DR_MP3_NONSTANDARD_BUT_LOGICAL if (nch == 1) { for (i = 0; i < 15*64; i += 2) { qmf_state[i] = lins[nbands*64 + i]; } } else #endif { DRMP3_COPY_MEMORY(qmf_state, lins + nbands*64, sizeof(float)*15*64); } } static int drmp3d_match_frame(const drmp3_uint8 *hdr, int mp3_bytes, int frame_bytes) { int i, nmatch; for (i = 0, nmatch = 0; nmatch < DRMP3_MAX_FRAME_SYNC_MATCHES; nmatch++) { i += drmp3_hdr_frame_bytes(hdr + i, frame_bytes) + drmp3_hdr_padding(hdr + i); if (i + DRMP3_HDR_SIZE > mp3_bytes) return nmatch > 0; if (!drmp3_hdr_compare(hdr, hdr + i)) return 0; } return 1; } static int drmp3d_find_frame(const drmp3_uint8 *mp3, int mp3_bytes, int *free_format_bytes, int *ptr_frame_bytes) { int i, k; for (i = 0; i < mp3_bytes - DRMP3_HDR_SIZE; i++, mp3++) { if (drmp3_hdr_valid(mp3)) { int frame_bytes = drmp3_hdr_frame_bytes(mp3, *free_format_bytes); int frame_and_padding = frame_bytes + drmp3_hdr_padding(mp3); for (k = DRMP3_HDR_SIZE; !frame_bytes && k < DRMP3_MAX_FREE_FORMAT_FRAME_SIZE && i + 2*k < mp3_bytes - DRMP3_HDR_SIZE; k++) { if (drmp3_hdr_compare(mp3, mp3 + k)) { int fb = k - drmp3_hdr_padding(mp3); int nextfb = fb + drmp3_hdr_padding(mp3 + k); if (i + k + nextfb + DRMP3_HDR_SIZE > mp3_bytes || !drmp3_hdr_compare(mp3, mp3 + k + nextfb)) continue; frame_and_padding = k; frame_bytes = fb; *free_format_bytes = fb; } } if ((frame_bytes && i + frame_and_padding <= mp3_bytes && drmp3d_match_frame(mp3, mp3_bytes - i, frame_bytes)) || (!i && frame_and_padding == mp3_bytes)) { *ptr_frame_bytes = frame_and_padding; return i; } *free_format_bytes = 0; } } *ptr_frame_bytes = 0; return mp3_bytes; } DRMP3_API void drmp3dec_init(drmp3dec *dec) { dec->header[0] = 0; } DRMP3_API int drmp3dec_decode_frame(drmp3dec *dec, const drmp3_uint8 *mp3, int mp3_bytes, void *pcm, drmp3dec_frame_info *info) { int i = 0, igr, frame_size = 0, success = 1; const drmp3_uint8 *hdr; drmp3_bs bs_frame[1]; drmp3dec_scratch scratch; if (mp3_bytes > 4 && dec->header[0] == 0xff && drmp3_hdr_compare(dec->header, mp3)) { frame_size = drmp3_hdr_frame_bytes(mp3, dec->free_format_bytes) + drmp3_hdr_padding(mp3); if (frame_size != mp3_bytes && (frame_size + DRMP3_HDR_SIZE > mp3_bytes || !drmp3_hdr_compare(mp3, mp3 + frame_size))) { frame_size = 0; } } if (!frame_size) { DRMP3_ZERO_MEMORY(dec, sizeof(drmp3dec)); i = drmp3d_find_frame(mp3, mp3_bytes, &dec->free_format_bytes, &frame_size); if (!frame_size || i + frame_size > mp3_bytes) { info->frame_bytes = i; return 0; } } hdr = mp3 + i; DRMP3_COPY_MEMORY(dec->header, hdr, DRMP3_HDR_SIZE); info->frame_bytes = i + frame_size; info->channels = DRMP3_HDR_IS_MONO(hdr) ? 1 : 2; info->hz = drmp3_hdr_sample_rate_hz(hdr); info->layer = 4 - DRMP3_HDR_GET_LAYER(hdr); info->bitrate_kbps = drmp3_hdr_bitrate_kbps(hdr); drmp3_bs_init(bs_frame, hdr + DRMP3_HDR_SIZE, frame_size - DRMP3_HDR_SIZE); if (DRMP3_HDR_IS_CRC(hdr)) { drmp3_bs_get_bits(bs_frame, 16); } if (info->layer == 3) { int main_data_begin = drmp3_L3_read_side_info(bs_frame, scratch.gr_info, hdr); if (main_data_begin < 0 || bs_frame->pos > bs_frame->limit) { drmp3dec_init(dec); return 0; } success = drmp3_L3_restore_reservoir(dec, bs_frame, &scratch, main_data_begin); if (success && pcm != NULL) { for (igr = 0; igr < (DRMP3_HDR_TEST_MPEG1(hdr) ? 2 : 1); igr++, pcm = DRMP3_OFFSET_PTR(pcm, sizeof(drmp3d_sample_t)*576*info->channels)) { DRMP3_ZERO_MEMORY(scratch.grbuf[0], 576*2*sizeof(float)); drmp3_L3_decode(dec, &scratch, scratch.gr_info + igr*info->channels, info->channels); drmp3d_synth_granule(dec->qmf_state, scratch.grbuf[0], 18, info->channels, (drmp3d_sample_t*)pcm, scratch.syn[0]); } } drmp3_L3_save_reservoir(dec, &scratch); } else { #ifdef DR_MP3_ONLY_MP3 return 0; #else drmp3_L12_scale_info sci[1]; if (pcm == NULL) { return drmp3_hdr_frame_samples(hdr); } drmp3_L12_read_scale_info(hdr, bs_frame, sci); DRMP3_ZERO_MEMORY(scratch.grbuf[0], 576*2*sizeof(float)); for (i = 0, igr = 0; igr < 3; igr++) { if (12 == (i += drmp3_L12_dequantize_granule(scratch.grbuf[0] + i, bs_frame, sci, info->layer | 1))) { i = 0; drmp3_L12_apply_scf_384(sci, sci->scf + igr, scratch.grbuf[0]); drmp3d_synth_granule(dec->qmf_state, scratch.grbuf[0], 12, info->channels, (drmp3d_sample_t*)pcm, scratch.syn[0]); DRMP3_ZERO_MEMORY(scratch.grbuf[0], 576*2*sizeof(float)); pcm = DRMP3_OFFSET_PTR(pcm, sizeof(drmp3d_sample_t)*384*info->channels); } if (bs_frame->pos > bs_frame->limit) { drmp3dec_init(dec); return 0; } } #endif } return success*drmp3_hdr_frame_samples(dec->header); } DRMP3_API void drmp3dec_f32_to_s16(const float *in, drmp3_int16 *out, size_t num_samples) { size_t i = 0; #if DRMP3_HAVE_SIMD size_t aligned_count = num_samples & ~7; for(; i < aligned_count; i+=8) { drmp3_f4 scale = DRMP3_VSET(32768.0f); drmp3_f4 a = DRMP3_VMUL(DRMP3_VLD(&in[i ]), scale); drmp3_f4 b = DRMP3_VMUL(DRMP3_VLD(&in[i+4]), scale); #if DRMP3_HAVE_SSE drmp3_f4 s16max = DRMP3_VSET( 32767.0f); drmp3_f4 s16min = DRMP3_VSET(-32768.0f); __m128i pcm8 = _mm_packs_epi32(_mm_cvtps_epi32(_mm_max_ps(_mm_min_ps(a, s16max), s16min)), _mm_cvtps_epi32(_mm_max_ps(_mm_min_ps(b, s16max), s16min))); out[i ] = (drmp3_int16)_mm_extract_epi16(pcm8, 0); out[i+1] = (drmp3_int16)_mm_extract_epi16(pcm8, 1); out[i+2] = (drmp3_int16)_mm_extract_epi16(pcm8, 2); out[i+3] = (drmp3_int16)_mm_extract_epi16(pcm8, 3); out[i+4] = (drmp3_int16)_mm_extract_epi16(pcm8, 4); out[i+5] = (drmp3_int16)_mm_extract_epi16(pcm8, 5); out[i+6] = (drmp3_int16)_mm_extract_epi16(pcm8, 6); out[i+7] = (drmp3_int16)_mm_extract_epi16(pcm8, 7); #else int16x4_t pcma, pcmb; a = DRMP3_VADD(a, DRMP3_VSET(0.5f)); b = DRMP3_VADD(b, DRMP3_VSET(0.5f)); pcma = vqmovn_s32(vqaddq_s32(vcvtq_s32_f32(a), vreinterpretq_s32_u32(vcltq_f32(a, DRMP3_VSET(0))))); pcmb = vqmovn_s32(vqaddq_s32(vcvtq_s32_f32(b), vreinterpretq_s32_u32(vcltq_f32(b, DRMP3_VSET(0))))); vst1_lane_s16(out+i , pcma, 0); vst1_lane_s16(out+i+1, pcma, 1); vst1_lane_s16(out+i+2, pcma, 2); vst1_lane_s16(out+i+3, pcma, 3); vst1_lane_s16(out+i+4, pcmb, 0); vst1_lane_s16(out+i+5, pcmb, 1); vst1_lane_s16(out+i+6, pcmb, 2); vst1_lane_s16(out+i+7, pcmb, 3); #endif } #endif for(; i < num_samples; i++) { float sample = in[i] * 32768.0f; if (sample >= 32766.5) out[i] = (drmp3_int16) 32767; else if (sample <= -32767.5) out[i] = (drmp3_int16)-32768; else { short s = (drmp3_int16)(sample + .5f); s -= (s < 0); /* away from zero, to be compliant */ out[i] = s; } } } /************************************************************************************************************************************************************ Main Public API ************************************************************************************************************************************************************/ #if defined(SIZE_MAX) #define DRMP3_SIZE_MAX SIZE_MAX #else #if defined(_WIN64) || defined(_LP64) || defined(__LP64__) #define DRMP3_SIZE_MAX ((drmp3_uint64)0xFFFFFFFFFFFFFFFF) #else #define DRMP3_SIZE_MAX 0xFFFFFFFF #endif #endif /* Options. */ #ifndef DRMP3_SEEK_LEADING_MP3_FRAMES #define DRMP3_SEEK_LEADING_MP3_FRAMES 2 #endif #define DRMP3_MIN_DATA_CHUNK_SIZE 16384 /* The size in bytes of each chunk of data to read from the MP3 stream. minimp3 recommends at least 16K, but in an attempt to reduce data movement I'm making this slightly larger. */ #ifndef DRMP3_DATA_CHUNK_SIZE #define DRMP3_DATA_CHUNK_SIZE (DRMP3_MIN_DATA_CHUNK_SIZE*4) #endif #define DRMP3_COUNTOF(x) (sizeof(x) / sizeof(x[0])) #define DRMP3_CLAMP(x, lo, hi) (DRMP3_MAX(lo, DRMP3_MIN(x, hi))) #ifndef DRMP3_PI_D #define DRMP3_PI_D 3.14159265358979323846264 #endif #define DRMP3_DEFAULT_RESAMPLER_LPF_ORDER 2 static DRMP3_INLINE float drmp3_mix_f32(float x, float y, float a) { return x*(1-a) + y*a; } static DRMP3_INLINE float drmp3_mix_f32_fast(float x, float y, float a) { float r0 = (y - x); float r1 = r0*a; return x + r1; /*return x + (y - x)*a;*/ } /* Greatest common factor using Euclid's algorithm iteratively. */ static DRMP3_INLINE drmp3_uint32 drmp3_gcf_u32(drmp3_uint32 a, drmp3_uint32 b) { for (;;) { if (b == 0) { break; } else { drmp3_uint32 t = a; a = b; b = t % a; } } return a; } static void* drmp3__malloc_default(size_t sz, void* pUserData) { (void)pUserData; return DRMP3_MALLOC(sz); } static void* drmp3__realloc_default(void* p, size_t sz, void* pUserData) { (void)pUserData; return DRMP3_REALLOC(p, sz); } static void drmp3__free_default(void* p, void* pUserData) { (void)pUserData; DRMP3_FREE(p); } static void* drmp3__malloc_from_callbacks(size_t sz, const drmp3_allocation_callbacks* pAllocationCallbacks) { if (pAllocationCallbacks == NULL) { return NULL; } if (pAllocationCallbacks->onMalloc != NULL) { return pAllocationCallbacks->onMalloc(sz, pAllocationCallbacks->pUserData); } /* Try using realloc(). */ if (pAllocationCallbacks->onRealloc != NULL) { return pAllocationCallbacks->onRealloc(NULL, sz, pAllocationCallbacks->pUserData); } return NULL; } static void* drmp3__realloc_from_callbacks(void* p, size_t szNew, size_t szOld, const drmp3_allocation_callbacks* pAllocationCallbacks) { if (pAllocationCallbacks == NULL) { return NULL; } if (pAllocationCallbacks->onRealloc != NULL) { return pAllocationCallbacks->onRealloc(p, szNew, pAllocationCallbacks->pUserData); } /* Try emulating realloc() in terms of malloc()/free(). */ if (pAllocationCallbacks->onMalloc != NULL && pAllocationCallbacks->onFree != NULL) { void* p2; p2 = pAllocationCallbacks->onMalloc(szNew, pAllocationCallbacks->pUserData); if (p2 == NULL) { return NULL; } if (p != NULL) { DRMP3_COPY_MEMORY(p2, p, szOld); pAllocationCallbacks->onFree(p, pAllocationCallbacks->pUserData); } return p2; } return NULL; } static void drmp3__free_from_callbacks(void* p, const drmp3_allocation_callbacks* pAllocationCallbacks) { if (p == NULL || pAllocationCallbacks == NULL) { return; } if (pAllocationCallbacks->onFree != NULL) { pAllocationCallbacks->onFree(p, pAllocationCallbacks->pUserData); } } static drmp3_allocation_callbacks drmp3_copy_allocation_callbacks_or_defaults(const drmp3_allocation_callbacks* pAllocationCallbacks) { if (pAllocationCallbacks != NULL) { /* Copy. */ return *pAllocationCallbacks; } else { /* Defaults. */ drmp3_allocation_callbacks allocationCallbacks; allocationCallbacks.pUserData = NULL; allocationCallbacks.onMalloc = drmp3__malloc_default; allocationCallbacks.onRealloc = drmp3__realloc_default; allocationCallbacks.onFree = drmp3__free_default; return allocationCallbacks; } } static size_t drmp3__on_read(drmp3* pMP3, void* pBufferOut, size_t bytesToRead) { size_t bytesRead = pMP3->onRead(pMP3->pUserData, pBufferOut, bytesToRead); pMP3->streamCursor += bytesRead; return bytesRead; } static drmp3_bool32 drmp3__on_seek(drmp3* pMP3, int offset, drmp3_seek_origin origin) { DRMP3_ASSERT(offset >= 0); if (!pMP3->onSeek(pMP3->pUserData, offset, origin)) { return DRMP3_FALSE; } if (origin == drmp3_seek_origin_start) { pMP3->streamCursor = (drmp3_uint64)offset; } else { pMP3->streamCursor += offset; } return DRMP3_TRUE; } static drmp3_bool32 drmp3__on_seek_64(drmp3* pMP3, drmp3_uint64 offset, drmp3_seek_origin origin) { if (offset <= 0x7FFFFFFF) { return drmp3__on_seek(pMP3, (int)offset, origin); } /* Getting here "offset" is too large for a 32-bit integer. We just keep seeking forward until we hit the offset. */ if (!drmp3__on_seek(pMP3, 0x7FFFFFFF, drmp3_seek_origin_start)) { return DRMP3_FALSE; } offset -= 0x7FFFFFFF; while (offset > 0) { if (offset <= 0x7FFFFFFF) { if (!drmp3__on_seek(pMP3, (int)offset, drmp3_seek_origin_current)) { return DRMP3_FALSE; } offset = 0; } else { if (!drmp3__on_seek(pMP3, 0x7FFFFFFF, drmp3_seek_origin_current)) { return DRMP3_FALSE; } offset -= 0x7FFFFFFF; } } return DRMP3_TRUE; } static drmp3_uint32 drmp3_decode_next_frame_ex__callbacks(drmp3* pMP3, drmp3d_sample_t* pPCMFrames) { drmp3_uint32 pcmFramesRead = 0; DRMP3_ASSERT(pMP3 != NULL); DRMP3_ASSERT(pMP3->onRead != NULL); if (pMP3->atEnd) { return 0; } for (;;) { drmp3dec_frame_info info; /* minimp3 recommends doing data submission in chunks of at least 16K. If we don't have at least 16K bytes available, get more. */ if (pMP3->dataSize < DRMP3_MIN_DATA_CHUNK_SIZE) { size_t bytesRead; /* First we need to move the data down. */ if (pMP3->pData != NULL) { DRMP3_MOVE_MEMORY(pMP3->pData, pMP3->pData + pMP3->dataConsumed, pMP3->dataSize); } pMP3->dataConsumed = 0; if (pMP3->dataCapacity < DRMP3_DATA_CHUNK_SIZE) { drmp3_uint8* pNewData; size_t newDataCap; newDataCap = DRMP3_DATA_CHUNK_SIZE; pNewData = (drmp3_uint8*)drmp3__realloc_from_callbacks(pMP3->pData, newDataCap, pMP3->dataCapacity, &pMP3->allocationCallbacks); if (pNewData == NULL) { return 0; /* Out of memory. */ } pMP3->pData = pNewData; pMP3->dataCapacity = newDataCap; } bytesRead = drmp3__on_read(pMP3, pMP3->pData + pMP3->dataSize, (pMP3->dataCapacity - pMP3->dataSize)); if (bytesRead == 0) { if (pMP3->dataSize == 0) { pMP3->atEnd = DRMP3_TRUE; return 0; /* No data. */ } } pMP3->dataSize += bytesRead; } if (pMP3->dataSize > INT_MAX) { pMP3->atEnd = DRMP3_TRUE; return 0; /* File too big. */ } DRMP3_ASSERT(pMP3->pData != NULL); DRMP3_ASSERT(pMP3->dataCapacity > 0); pcmFramesRead = drmp3dec_decode_frame(&pMP3->decoder, pMP3->pData + pMP3->dataConsumed, (int)pMP3->dataSize, pPCMFrames, &info); /* <-- Safe size_t -> int conversion thanks to the check above. */ /* Consume the data. */ if (info.frame_bytes > 0) { pMP3->dataConsumed += (size_t)info.frame_bytes; pMP3->dataSize -= (size_t)info.frame_bytes; } /* pcmFramesRead will be equal to 0 if decoding failed. If it is zero and info.frame_bytes > 0 then we have successfully decoded the frame. */ if (pcmFramesRead > 0) { pcmFramesRead = drmp3_hdr_frame_samples(pMP3->decoder.header); pMP3->pcmFramesConsumedInMP3Frame = 0; pMP3->pcmFramesRemainingInMP3Frame = pcmFramesRead; pMP3->mp3FrameChannels = info.channels; pMP3->mp3FrameSampleRate = info.hz; break; } else if (info.frame_bytes == 0) { /* Need more data. minimp3 recommends doing data submission in 16K chunks. */ size_t bytesRead; /* First we need to move the data down. */ DRMP3_MOVE_MEMORY(pMP3->pData, pMP3->pData + pMP3->dataConsumed, pMP3->dataSize); pMP3->dataConsumed = 0; if (pMP3->dataCapacity == pMP3->dataSize) { /* No room. Expand. */ drmp3_uint8* pNewData; size_t newDataCap; newDataCap = pMP3->dataCapacity + DRMP3_DATA_CHUNK_SIZE; pNewData = (drmp3_uint8*)drmp3__realloc_from_callbacks(pMP3->pData, newDataCap, pMP3->dataCapacity, &pMP3->allocationCallbacks); if (pNewData == NULL) { return 0; /* Out of memory. */ } pMP3->pData = pNewData; pMP3->dataCapacity = newDataCap; } /* Fill in a chunk. */ bytesRead = drmp3__on_read(pMP3, pMP3->pData + pMP3->dataSize, (pMP3->dataCapacity - pMP3->dataSize)); if (bytesRead == 0) { pMP3->atEnd = DRMP3_TRUE; return 0; /* Error reading more data. */ } pMP3->dataSize += bytesRead; } }; return pcmFramesRead; } static drmp3_uint32 drmp3_decode_next_frame_ex__memory(drmp3* pMP3, drmp3d_sample_t* pPCMFrames) { drmp3_uint32 pcmFramesRead = 0; drmp3dec_frame_info info; DRMP3_ASSERT(pMP3 != NULL); DRMP3_ASSERT(pMP3->memory.pData != NULL); if (pMP3->atEnd) { return 0; } for (;;) { pcmFramesRead = drmp3dec_decode_frame(&pMP3->decoder, pMP3->memory.pData + pMP3->memory.currentReadPos, (int)(pMP3->memory.dataSize - pMP3->memory.currentReadPos), pPCMFrames, &info); if (pcmFramesRead > 0) { pcmFramesRead = drmp3_hdr_frame_samples(pMP3->decoder.header); pMP3->pcmFramesConsumedInMP3Frame = 0; pMP3->pcmFramesRemainingInMP3Frame = pcmFramesRead; pMP3->mp3FrameChannels = info.channels; pMP3->mp3FrameSampleRate = info.hz; break; } else if (info.frame_bytes > 0) { /* No frames were read, but it looks like we skipped past one. Read the next MP3 frame. */ pMP3->memory.currentReadPos += (size_t)info.frame_bytes; } else { /* Nothing at all was read. Abort. */ break; } } /* Consume the data. */ pMP3->memory.currentReadPos += (size_t)info.frame_bytes; return pcmFramesRead; } static drmp3_uint32 drmp3_decode_next_frame_ex(drmp3* pMP3, drmp3d_sample_t* pPCMFrames) { if (pMP3->memory.pData != NULL && pMP3->memory.dataSize > 0) { return drmp3_decode_next_frame_ex__memory(pMP3, pPCMFrames); } else { return drmp3_decode_next_frame_ex__callbacks(pMP3, pPCMFrames); } } static drmp3_uint32 drmp3_decode_next_frame(drmp3* pMP3) { DRMP3_ASSERT(pMP3 != NULL); return drmp3_decode_next_frame_ex(pMP3, (drmp3d_sample_t*)pMP3->pcmFrames); } #if 0 static drmp3_uint32 drmp3_seek_next_frame(drmp3* pMP3) { drmp3_uint32 pcmFrameCount; DRMP3_ASSERT(pMP3 != NULL); pcmFrameCount = drmp3_decode_next_frame_ex(pMP3, NULL); if (pcmFrameCount == 0) { return 0; } /* We have essentially just skipped past the frame, so just set the remaining samples to 0. */ pMP3->currentPCMFrame += pcmFrameCount; pMP3->pcmFramesConsumedInMP3Frame = pcmFrameCount; pMP3->pcmFramesRemainingInMP3Frame = 0; return pcmFrameCount; } #endif static drmp3_bool32 drmp3_init_internal(drmp3* pMP3, drmp3_read_proc onRead, drmp3_seek_proc onSeek, void* pUserData, const drmp3_allocation_callbacks* pAllocationCallbacks) { DRMP3_ASSERT(pMP3 != NULL); DRMP3_ASSERT(onRead != NULL); /* This function assumes the output object has already been reset to 0. Do not do that here, otherwise things will break. */ drmp3dec_init(&pMP3->decoder); pMP3->onRead = onRead; pMP3->onSeek = onSeek; pMP3->pUserData = pUserData; pMP3->allocationCallbacks = drmp3_copy_allocation_callbacks_or_defaults(pAllocationCallbacks); if (pMP3->allocationCallbacks.onFree == NULL || (pMP3->allocationCallbacks.onMalloc == NULL && pMP3->allocationCallbacks.onRealloc == NULL)) { return DRMP3_FALSE; /* Invalid allocation callbacks. */ } /* Decode the first frame to confirm that it is indeed a valid MP3 stream. */ if (drmp3_decode_next_frame(pMP3) == 0) { drmp3__free_from_callbacks(pMP3->pData, &pMP3->allocationCallbacks); /* The call above may have allocated memory. Need to make sure it's freed before aborting. */ return DRMP3_FALSE; /* Not a valid MP3 stream. */ } pMP3->channels = pMP3->mp3FrameChannels; pMP3->sampleRate = pMP3->mp3FrameSampleRate; return DRMP3_TRUE; } DRMP3_API drmp3_bool32 drmp3_init(drmp3* pMP3, drmp3_read_proc onRead, drmp3_seek_proc onSeek, void* pUserData, const drmp3_allocation_callbacks* pAllocationCallbacks) { if (pMP3 == NULL || onRead == NULL) { return DRMP3_FALSE; } DRMP3_ZERO_OBJECT(pMP3); return drmp3_init_internal(pMP3, onRead, onSeek, pUserData, pAllocationCallbacks); } static size_t drmp3__on_read_memory(void* pUserData, void* pBufferOut, size_t bytesToRead) { drmp3* pMP3 = (drmp3*)pUserData; size_t bytesRemaining; DRMP3_ASSERT(pMP3 != NULL); DRMP3_ASSERT(pMP3->memory.dataSize >= pMP3->memory.currentReadPos); bytesRemaining = pMP3->memory.dataSize - pMP3->memory.currentReadPos; if (bytesToRead > bytesRemaining) { bytesToRead = bytesRemaining; } if (bytesToRead > 0) { DRMP3_COPY_MEMORY(pBufferOut, pMP3->memory.pData + pMP3->memory.currentReadPos, bytesToRead); pMP3->memory.currentReadPos += bytesToRead; } return bytesToRead; } static drmp3_bool32 drmp3__on_seek_memory(void* pUserData, int byteOffset, drmp3_seek_origin origin) { drmp3* pMP3 = (drmp3*)pUserData; DRMP3_ASSERT(pMP3 != NULL); if (origin == drmp3_seek_origin_current) { if (byteOffset > 0) { if (pMP3->memory.currentReadPos + byteOffset > pMP3->memory.dataSize) { byteOffset = (int)(pMP3->memory.dataSize - pMP3->memory.currentReadPos); /* Trying to seek too far forward. */ } } else { if (pMP3->memory.currentReadPos < (size_t)-byteOffset) { byteOffset = -(int)pMP3->memory.currentReadPos; /* Trying to seek too far backwards. */ } } /* This will never underflow thanks to the clamps above. */ pMP3->memory.currentReadPos += byteOffset; } else { if ((drmp3_uint32)byteOffset <= pMP3->memory.dataSize) { pMP3->memory.currentReadPos = byteOffset; } else { pMP3->memory.currentReadPos = pMP3->memory.dataSize; /* Trying to seek too far forward. */ } } return DRMP3_TRUE; } DRMP3_API drmp3_bool32 drmp3_init_memory(drmp3* pMP3, const void* pData, size_t dataSize, const drmp3_allocation_callbacks* pAllocationCallbacks) { if (pMP3 == NULL) { return DRMP3_FALSE; } DRMP3_ZERO_OBJECT(pMP3); if (pData == NULL || dataSize == 0) { return DRMP3_FALSE; } pMP3->memory.pData = (const drmp3_uint8*)pData; pMP3->memory.dataSize = dataSize; pMP3->memory.currentReadPos = 0; return drmp3_init_internal(pMP3, drmp3__on_read_memory, drmp3__on_seek_memory, pMP3, pAllocationCallbacks); } #ifndef DR_MP3_NO_STDIO #include #include /* For wcslen(), wcsrtombs() */ /* drmp3_result_from_errno() is only used inside DR_MP3_NO_STDIO for now. Move this out if it's ever used elsewhere. */ #include static drmp3_result drmp3_result_from_errno(int e) { switch (e) { case 0: return DRMP3_SUCCESS; #ifdef EPERM case EPERM: return DRMP3_INVALID_OPERATION; #endif #ifdef ENOENT case ENOENT: return DRMP3_DOES_NOT_EXIST; #endif #ifdef ESRCH case ESRCH: return DRMP3_DOES_NOT_EXIST; #endif #ifdef EINTR case EINTR: return DRMP3_INTERRUPT; #endif #ifdef EIO case EIO: return DRMP3_IO_ERROR; #endif #ifdef ENXIO case ENXIO: return DRMP3_DOES_NOT_EXIST; #endif #ifdef E2BIG case E2BIG: return DRMP3_INVALID_ARGS; #endif #ifdef ENOEXEC case ENOEXEC: return DRMP3_INVALID_FILE; #endif #ifdef EBADF case EBADF: return DRMP3_INVALID_FILE; #endif #ifdef ECHILD case ECHILD: return DRMP3_ERROR; #endif #ifdef EAGAIN case EAGAIN: return DRMP3_UNAVAILABLE; #endif #ifdef ENOMEM case ENOMEM: return DRMP3_OUT_OF_MEMORY; #endif #ifdef EACCES case EACCES: return DRMP3_ACCESS_DENIED; #endif #ifdef EFAULT case EFAULT: return DRMP3_BAD_ADDRESS; #endif #ifdef ENOTBLK case ENOTBLK: return DRMP3_ERROR; #endif #ifdef EBUSY case EBUSY: return DRMP3_BUSY; #endif #ifdef EEXIST case EEXIST: return DRMP3_ALREADY_EXISTS; #endif #ifdef EXDEV case EXDEV: return DRMP3_ERROR; #endif #ifdef ENODEV case ENODEV: return DRMP3_DOES_NOT_EXIST; #endif #ifdef ENOTDIR case ENOTDIR: return DRMP3_NOT_DIRECTORY; #endif #ifdef EISDIR case EISDIR: return DRMP3_IS_DIRECTORY; #endif #ifdef EINVAL case EINVAL: return DRMP3_INVALID_ARGS; #endif #ifdef ENFILE case ENFILE: return DRMP3_TOO_MANY_OPEN_FILES; #endif #ifdef EMFILE case EMFILE: return DRMP3_TOO_MANY_OPEN_FILES; #endif #ifdef ENOTTY case ENOTTY: return DRMP3_INVALID_OPERATION; #endif #ifdef ETXTBSY case ETXTBSY: return DRMP3_BUSY; #endif #ifdef EFBIG case EFBIG: return DRMP3_TOO_BIG; #endif #ifdef ENOSPC case ENOSPC: return DRMP3_NO_SPACE; #endif #ifdef ESPIPE case ESPIPE: return DRMP3_BAD_SEEK; #endif #ifdef EROFS case EROFS: return DRMP3_ACCESS_DENIED; #endif #ifdef EMLINK case EMLINK: return DRMP3_TOO_MANY_LINKS; #endif #ifdef EPIPE case EPIPE: return DRMP3_BAD_PIPE; #endif #ifdef EDOM case EDOM: return DRMP3_OUT_OF_RANGE; #endif #ifdef ERANGE case ERANGE: return DRMP3_OUT_OF_RANGE; #endif #ifdef EDEADLK case EDEADLK: return DRMP3_DEADLOCK; #endif #ifdef ENAMETOOLONG case ENAMETOOLONG: return DRMP3_PATH_TOO_LONG; #endif #ifdef ENOLCK case ENOLCK: return DRMP3_ERROR; #endif #ifdef ENOSYS case ENOSYS: return DRMP3_NOT_IMPLEMENTED; #endif #ifdef ENOTEMPTY case ENOTEMPTY: return DRMP3_DIRECTORY_NOT_EMPTY; #endif #ifdef ELOOP case ELOOP: return DRMP3_TOO_MANY_LINKS; #endif #ifdef ENOMSG case ENOMSG: return DRMP3_NO_MESSAGE; #endif #ifdef EIDRM case EIDRM: return DRMP3_ERROR; #endif #ifdef ECHRNG case ECHRNG: return DRMP3_ERROR; #endif #ifdef EL2NSYNC case EL2NSYNC: return DRMP3_ERROR; #endif #ifdef EL3HLT case EL3HLT: return DRMP3_ERROR; #endif #ifdef EL3RST case EL3RST: return DRMP3_ERROR; #endif #ifdef ELNRNG case ELNRNG: return DRMP3_OUT_OF_RANGE; #endif #ifdef EUNATCH case EUNATCH: return DRMP3_ERROR; #endif #ifdef ENOCSI case ENOCSI: return DRMP3_ERROR; #endif #ifdef EL2HLT case EL2HLT: return DRMP3_ERROR; #endif #ifdef EBADE case EBADE: return DRMP3_ERROR; #endif #ifdef EBADR case EBADR: return DRMP3_ERROR; #endif #ifdef EXFULL case EXFULL: return DRMP3_ERROR; #endif #ifdef ENOANO case ENOANO: return DRMP3_ERROR; #endif #ifdef EBADRQC case EBADRQC: return DRMP3_ERROR; #endif #ifdef EBADSLT case EBADSLT: return DRMP3_ERROR; #endif #ifdef EBFONT case EBFONT: return DRMP3_INVALID_FILE; #endif #ifdef ENOSTR case ENOSTR: return DRMP3_ERROR; #endif #ifdef ENODATA case ENODATA: return DRMP3_NO_DATA_AVAILABLE; #endif #ifdef ETIME case ETIME: return DRMP3_TIMEOUT; #endif #ifdef ENOSR case ENOSR: return DRMP3_NO_DATA_AVAILABLE; #endif #ifdef ENONET case ENONET: return DRMP3_NO_NETWORK; #endif #ifdef ENOPKG case ENOPKG: return DRMP3_ERROR; #endif #ifdef EREMOTE case EREMOTE: return DRMP3_ERROR; #endif #ifdef ENOLINK case ENOLINK: return DRMP3_ERROR; #endif #ifdef EADV case EADV: return DRMP3_ERROR; #endif #ifdef ESRMNT case ESRMNT: return DRMP3_ERROR; #endif #ifdef ECOMM case ECOMM: return DRMP3_ERROR; #endif #ifdef EPROTO case EPROTO: return DRMP3_ERROR; #endif #ifdef EMULTIHOP case EMULTIHOP: return DRMP3_ERROR; #endif #ifdef EDOTDOT case EDOTDOT: return DRMP3_ERROR; #endif #ifdef EBADMSG case EBADMSG: return DRMP3_BAD_MESSAGE; #endif #ifdef EOVERFLOW case EOVERFLOW: return DRMP3_TOO_BIG; #endif #ifdef ENOTUNIQ case ENOTUNIQ: return DRMP3_NOT_UNIQUE; #endif #ifdef EBADFD case EBADFD: return DRMP3_ERROR; #endif #ifdef EREMCHG case EREMCHG: return DRMP3_ERROR; #endif #ifdef ELIBACC case ELIBACC: return DRMP3_ACCESS_DENIED; #endif #ifdef ELIBBAD case ELIBBAD: return DRMP3_INVALID_FILE; #endif #ifdef ELIBSCN case ELIBSCN: return DRMP3_INVALID_FILE; #endif #ifdef ELIBMAX case ELIBMAX: return DRMP3_ERROR; #endif #ifdef ELIBEXEC case ELIBEXEC: return DRMP3_ERROR; #endif #ifdef EILSEQ case EILSEQ: return DRMP3_INVALID_DATA; #endif #ifdef ERESTART case ERESTART: return DRMP3_ERROR; #endif #ifdef ESTRPIPE case ESTRPIPE: return DRMP3_ERROR; #endif #ifdef EUSERS case EUSERS: return DRMP3_ERROR; #endif #ifdef ENOTSOCK case ENOTSOCK: return DRMP3_NOT_SOCKET; #endif #ifdef EDESTADDRREQ case EDESTADDRREQ: return DRMP3_NO_ADDRESS; #endif #ifdef EMSGSIZE case EMSGSIZE: return DRMP3_TOO_BIG; #endif #ifdef EPROTOTYPE case EPROTOTYPE: return DRMP3_BAD_PROTOCOL; #endif #ifdef ENOPROTOOPT case ENOPROTOOPT: return DRMP3_PROTOCOL_UNAVAILABLE; #endif #ifdef EPROTONOSUPPORT case EPROTONOSUPPORT: return DRMP3_PROTOCOL_NOT_SUPPORTED; #endif #ifdef ESOCKTNOSUPPORT case ESOCKTNOSUPPORT: return DRMP3_SOCKET_NOT_SUPPORTED; #endif #ifdef EOPNOTSUPP case EOPNOTSUPP: return DRMP3_INVALID_OPERATION; #endif #ifdef EPFNOSUPPORT case EPFNOSUPPORT: return DRMP3_PROTOCOL_FAMILY_NOT_SUPPORTED; #endif #ifdef EAFNOSUPPORT case EAFNOSUPPORT: return DRMP3_ADDRESS_FAMILY_NOT_SUPPORTED; #endif #ifdef EADDRINUSE case EADDRINUSE: return DRMP3_ALREADY_IN_USE; #endif #ifdef EADDRNOTAVAIL case EADDRNOTAVAIL: return DRMP3_ERROR; #endif #ifdef ENETDOWN case ENETDOWN: return DRMP3_NO_NETWORK; #endif #ifdef ENETUNREACH case ENETUNREACH: return DRMP3_NO_NETWORK; #endif #ifdef ENETRESET case ENETRESET: return DRMP3_NO_NETWORK; #endif #ifdef ECONNABORTED case ECONNABORTED: return DRMP3_NO_NETWORK; #endif #ifdef ECONNRESET case ECONNRESET: return DRMP3_CONNECTION_RESET; #endif #ifdef ENOBUFS case ENOBUFS: return DRMP3_NO_SPACE; #endif #ifdef EISCONN case EISCONN: return DRMP3_ALREADY_CONNECTED; #endif #ifdef ENOTCONN case ENOTCONN: return DRMP3_NOT_CONNECTED; #endif #ifdef ESHUTDOWN case ESHUTDOWN: return DRMP3_ERROR; #endif #ifdef ETOOMANYREFS case ETOOMANYREFS: return DRMP3_ERROR; #endif #ifdef ETIMEDOUT case ETIMEDOUT: return DRMP3_TIMEOUT; #endif #ifdef ECONNREFUSED case ECONNREFUSED: return DRMP3_CONNECTION_REFUSED; #endif #ifdef EHOSTDOWN case EHOSTDOWN: return DRMP3_NO_HOST; #endif #ifdef EHOSTUNREACH case EHOSTUNREACH: return DRMP3_NO_HOST; #endif #ifdef EALREADY case EALREADY: return DRMP3_IN_PROGRESS; #endif #ifdef EINPROGRESS case EINPROGRESS: return DRMP3_IN_PROGRESS; #endif #ifdef ESTALE case ESTALE: return DRMP3_INVALID_FILE; #endif #ifdef EUCLEAN case EUCLEAN: return DRMP3_ERROR; #endif #ifdef ENOTNAM case ENOTNAM: return DRMP3_ERROR; #endif #ifdef ENAVAIL case ENAVAIL: return DRMP3_ERROR; #endif #ifdef EISNAM case EISNAM: return DRMP3_ERROR; #endif #ifdef EREMOTEIO case EREMOTEIO: return DRMP3_IO_ERROR; #endif #ifdef EDQUOT case EDQUOT: return DRMP3_NO_SPACE; #endif #ifdef ENOMEDIUM case ENOMEDIUM: return DRMP3_DOES_NOT_EXIST; #endif #ifdef EMEDIUMTYPE case EMEDIUMTYPE: return DRMP3_ERROR; #endif #ifdef ECANCELED case ECANCELED: return DRMP3_CANCELLED; #endif #ifdef ENOKEY case ENOKEY: return DRMP3_ERROR; #endif #ifdef EKEYEXPIRED case EKEYEXPIRED: return DRMP3_ERROR; #endif #ifdef EKEYREVOKED case EKEYREVOKED: return DRMP3_ERROR; #endif #ifdef EKEYREJECTED case EKEYREJECTED: return DRMP3_ERROR; #endif #ifdef EOWNERDEAD case EOWNERDEAD: return DRMP3_ERROR; #endif #ifdef ENOTRECOVERABLE case ENOTRECOVERABLE: return DRMP3_ERROR; #endif #ifdef ERFKILL case ERFKILL: return DRMP3_ERROR; #endif #ifdef EHWPOISON case EHWPOISON: return DRMP3_ERROR; #endif default: return DRMP3_ERROR; } } static drmp3_result drmp3_fopen(FILE** ppFile, const char* pFilePath, const char* pOpenMode) { #if defined(_MSC_VER) && _MSC_VER >= 1400 errno_t err; #endif if (ppFile != NULL) { *ppFile = NULL; /* Safety. */ } if (pFilePath == NULL || pOpenMode == NULL || ppFile == NULL) { return DRMP3_INVALID_ARGS; } #if defined(_MSC_VER) && _MSC_VER >= 1400 err = fopen_s(ppFile, pFilePath, pOpenMode); if (err != 0) { return drmp3_result_from_errno(err); } #else #if defined(_WIN32) || defined(__APPLE__) *ppFile = fopen(pFilePath, pOpenMode); #else #if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64 && defined(_LARGEFILE64_SOURCE) *ppFile = fopen64(pFilePath, pOpenMode); #else *ppFile = fopen(pFilePath, pOpenMode); #endif #endif if (*ppFile == NULL) { drmp3_result result = drmp3_result_from_errno(errno); if (result == DRMP3_SUCCESS) { result = DRMP3_ERROR; /* Just a safety check to make sure we never ever return success when pFile == NULL. */ } return result; } #endif return DRMP3_SUCCESS; } /* _wfopen() isn't always available in all compilation environments. * Windows only. * MSVC seems to support it universally as far back as VC6 from what I can tell (haven't checked further back). * MinGW-64 (both 32- and 64-bit) seems to support it. * MinGW wraps it in !defined(__STRICT_ANSI__). * OpenWatcom wraps it in !defined(_NO_EXT_KEYS). This can be reviewed as compatibility issues arise. The preference is to use _wfopen_s() and _wfopen() as opposed to the wcsrtombs() fallback, so if you notice your compiler not detecting this properly I'm happy to look at adding support. */ #if defined(_WIN32) #if defined(_MSC_VER) || defined(__MINGW64__) || (!defined(__STRICT_ANSI__) && !defined(_NO_EXT_KEYS)) #define DRMP3_HAS_WFOPEN #endif #endif static drmp3_result drmp3_wfopen(FILE** ppFile, const wchar_t* pFilePath, const wchar_t* pOpenMode, const drmp3_allocation_callbacks* pAllocationCallbacks) { if (ppFile != NULL) { *ppFile = NULL; /* Safety. */ } if (pFilePath == NULL || pOpenMode == NULL || ppFile == NULL) { return DRMP3_INVALID_ARGS; } #if defined(DRMP3_HAS_WFOPEN) { /* Use _wfopen() on Windows. */ #if defined(_MSC_VER) && _MSC_VER >= 1400 errno_t err = _wfopen_s(ppFile, pFilePath, pOpenMode); if (err != 0) { return drmp3_result_from_errno(err); } #else *ppFile = _wfopen(pFilePath, pOpenMode); if (*ppFile == NULL) { return drmp3_result_from_errno(errno); } #endif (void)pAllocationCallbacks; } #else /* Use fopen() on anything other than Windows. Requires a conversion. This is annoying because fopen() is locale specific. The only real way I can think of to do this is with wcsrtombs(). Note that wcstombs() is apparently not thread-safe because it uses a static global mbstate_t object for maintaining state. I've checked this with -std=c89 and it works, but if somebody get's a compiler error I'll look into improving compatibility. */ /* Some compilers don't support wchar_t or wcsrtombs() which we're using below. In this case we just need to abort with an error. If you encounter a compiler lacking such support, add it to this list and submit a bug report and it'll be added to the library upstream. */ #if defined(__DJGPP__) { /* Nothing to do here. This will fall through to the error check below. */ } #else { mbstate_t mbs; size_t lenMB; const wchar_t* pFilePathTemp = pFilePath; char* pFilePathMB = NULL; char pOpenModeMB[32] = {0}; /* Get the length first. */ DRMP3_ZERO_OBJECT(&mbs); lenMB = wcsrtombs(NULL, &pFilePathTemp, 0, &mbs); if (lenMB == (size_t)-1) { return drmp3_result_from_errno(errno); } pFilePathMB = (char*)drmp3__malloc_from_callbacks(lenMB + 1, pAllocationCallbacks); if (pFilePathMB == NULL) { return DRMP3_OUT_OF_MEMORY; } pFilePathTemp = pFilePath; DRMP3_ZERO_OBJECT(&mbs); wcsrtombs(pFilePathMB, &pFilePathTemp, lenMB + 1, &mbs); /* The open mode should always consist of ASCII characters so we should be able to do a trivial conversion. */ { size_t i = 0; for (;;) { if (pOpenMode[i] == 0) { pOpenModeMB[i] = '\0'; break; } pOpenModeMB[i] = (char)pOpenMode[i]; i += 1; } } *ppFile = fopen(pFilePathMB, pOpenModeMB); drmp3__free_from_callbacks(pFilePathMB, pAllocationCallbacks); } #endif if (*ppFile == NULL) { return DRMP3_ERROR; } #endif return DRMP3_SUCCESS; } static size_t drmp3__on_read_stdio(void* pUserData, void* pBufferOut, size_t bytesToRead) { return fread(pBufferOut, 1, bytesToRead, (FILE*)pUserData); } static drmp3_bool32 drmp3__on_seek_stdio(void* pUserData, int offset, drmp3_seek_origin origin) { return fseek((FILE*)pUserData, offset, (origin == drmp3_seek_origin_current) ? SEEK_CUR : SEEK_SET) == 0; } DRMP3_API drmp3_bool32 drmp3_init_file(drmp3* pMP3, const char* pFilePath, const drmp3_allocation_callbacks* pAllocationCallbacks) { drmp3_bool32 result; FILE* pFile; if (drmp3_fopen(&pFile, pFilePath, "rb") != DRMP3_SUCCESS) { return DRMP3_FALSE; } result = drmp3_init(pMP3, drmp3__on_read_stdio, drmp3__on_seek_stdio, (void*)pFile, pAllocationCallbacks); if (result != DRMP3_TRUE) { fclose(pFile); return result; } return DRMP3_TRUE; } DRMP3_API drmp3_bool32 drmp3_init_file_w(drmp3* pMP3, const wchar_t* pFilePath, const drmp3_allocation_callbacks* pAllocationCallbacks) { drmp3_bool32 result; FILE* pFile; if (drmp3_wfopen(&pFile, pFilePath, L"rb", pAllocationCallbacks) != DRMP3_SUCCESS) { return DRMP3_FALSE; } result = drmp3_init(pMP3, drmp3__on_read_stdio, drmp3__on_seek_stdio, (void*)pFile, pAllocationCallbacks); if (result != DRMP3_TRUE) { fclose(pFile); return result; } return DRMP3_TRUE; } #endif DRMP3_API void drmp3_uninit(drmp3* pMP3) { if (pMP3 == NULL) { return; } #ifndef DR_MP3_NO_STDIO if (pMP3->onRead == drmp3__on_read_stdio) { FILE* pFile = (FILE*)pMP3->pUserData; if (pFile != NULL) { fclose(pFile); pMP3->pUserData = NULL; /* Make sure the file handle is cleared to NULL to we don't attempt to close it a second time. */ } } #endif drmp3__free_from_callbacks(pMP3->pData, &pMP3->allocationCallbacks); } #if defined(DR_MP3_FLOAT_OUTPUT) static void drmp3_f32_to_s16(drmp3_int16* dst, const float* src, drmp3_uint64 sampleCount) { drmp3_uint64 i; drmp3_uint64 i4; drmp3_uint64 sampleCount4; /* Unrolled. */ i = 0; sampleCount4 = sampleCount >> 2; for (i4 = 0; i4 < sampleCount4; i4 += 1) { float x0 = src[i+0]; float x1 = src[i+1]; float x2 = src[i+2]; float x3 = src[i+3]; x0 = ((x0 < -1) ? -1 : ((x0 > 1) ? 1 : x0)); x1 = ((x1 < -1) ? -1 : ((x1 > 1) ? 1 : x1)); x2 = ((x2 < -1) ? -1 : ((x2 > 1) ? 1 : x2)); x3 = ((x3 < -1) ? -1 : ((x3 > 1) ? 1 : x3)); x0 = x0 * 32767.0f; x1 = x1 * 32767.0f; x2 = x2 * 32767.0f; x3 = x3 * 32767.0f; dst[i+0] = (drmp3_int16)x0; dst[i+1] = (drmp3_int16)x1; dst[i+2] = (drmp3_int16)x2; dst[i+3] = (drmp3_int16)x3; i += 4; } /* Leftover. */ for (; i < sampleCount; i += 1) { float x = src[i]; x = ((x < -1) ? -1 : ((x > 1) ? 1 : x)); /* clip */ x = x * 32767.0f; /* -1..1 to -32767..32767 */ dst[i] = (drmp3_int16)x; } } #endif #if !defined(DR_MP3_FLOAT_OUTPUT) static void drmp3_s16_to_f32(float* dst, const drmp3_int16* src, drmp3_uint64 sampleCount) { drmp3_uint64 i; for (i = 0; i < sampleCount; i += 1) { float x = (float)src[i]; x = x * 0.000030517578125f; /* -32768..32767 to -1..0.999969482421875 */ dst[i] = x; } } #endif static drmp3_uint64 drmp3_read_pcm_frames_raw(drmp3* pMP3, drmp3_uint64 framesToRead, void* pBufferOut) { drmp3_uint64 totalFramesRead = 0; DRMP3_ASSERT(pMP3 != NULL); DRMP3_ASSERT(pMP3->onRead != NULL); while (framesToRead > 0) { drmp3_uint32 framesToConsume = (drmp3_uint32)DRMP3_MIN(pMP3->pcmFramesRemainingInMP3Frame, framesToRead); if (pBufferOut != NULL) { #if defined(DR_MP3_FLOAT_OUTPUT) /* f32 */ float* pFramesOutF32 = (float*)DRMP3_OFFSET_PTR(pBufferOut, sizeof(float) * totalFramesRead * pMP3->channels); float* pFramesInF32 = (float*)DRMP3_OFFSET_PTR(&pMP3->pcmFrames[0], sizeof(float) * pMP3->pcmFramesConsumedInMP3Frame * pMP3->mp3FrameChannels); DRMP3_COPY_MEMORY(pFramesOutF32, pFramesInF32, sizeof(float) * framesToConsume * pMP3->channels); #else /* s16 */ drmp3_int16* pFramesOutS16 = (drmp3_int16*)DRMP3_OFFSET_PTR(pBufferOut, sizeof(drmp3_int16) * totalFramesRead * pMP3->channels); drmp3_int16* pFramesInS16 = (drmp3_int16*)DRMP3_OFFSET_PTR(&pMP3->pcmFrames[0], sizeof(drmp3_int16) * pMP3->pcmFramesConsumedInMP3Frame * pMP3->mp3FrameChannels); DRMP3_COPY_MEMORY(pFramesOutS16, pFramesInS16, sizeof(drmp3_int16) * framesToConsume * pMP3->channels); #endif } pMP3->currentPCMFrame += framesToConsume; pMP3->pcmFramesConsumedInMP3Frame += framesToConsume; pMP3->pcmFramesRemainingInMP3Frame -= framesToConsume; totalFramesRead += framesToConsume; framesToRead -= framesToConsume; if (framesToRead == 0) { break; } DRMP3_ASSERT(pMP3->pcmFramesRemainingInMP3Frame == 0); /* At this point we have exhausted our in-memory buffer so we need to re-fill. Note that the sample rate may have changed at this point which means we'll also need to update our sample rate conversion pipeline. */ if (drmp3_decode_next_frame(pMP3) == 0) { break; } } return totalFramesRead; } DRMP3_API drmp3_uint64 drmp3_read_pcm_frames_f32(drmp3* pMP3, drmp3_uint64 framesToRead, float* pBufferOut) { if (pMP3 == NULL || pMP3->onRead == NULL) { return 0; } #if defined(DR_MP3_FLOAT_OUTPUT) /* Fast path. No conversion required. */ return drmp3_read_pcm_frames_raw(pMP3, framesToRead, pBufferOut); #else /* Slow path. Convert from s16 to f32. */ { drmp3_int16 pTempS16[8192]; drmp3_uint64 totalPCMFramesRead = 0; while (totalPCMFramesRead < framesToRead) { drmp3_uint64 framesJustRead; drmp3_uint64 framesRemaining = framesToRead - totalPCMFramesRead; drmp3_uint64 framesToReadNow = DRMP3_COUNTOF(pTempS16) / pMP3->channels; if (framesToReadNow > framesRemaining) { framesToReadNow = framesRemaining; } framesJustRead = drmp3_read_pcm_frames_raw(pMP3, framesToReadNow, pTempS16); if (framesJustRead == 0) { break; } drmp3_s16_to_f32((float*)DRMP3_OFFSET_PTR(pBufferOut, sizeof(float) * totalPCMFramesRead * pMP3->channels), pTempS16, framesJustRead * pMP3->channels); totalPCMFramesRead += framesJustRead; } return totalPCMFramesRead; } #endif } DRMP3_API drmp3_uint64 drmp3_read_pcm_frames_s16(drmp3* pMP3, drmp3_uint64 framesToRead, drmp3_int16* pBufferOut) { if (pMP3 == NULL || pMP3->onRead == NULL) { return 0; } #if !defined(DR_MP3_FLOAT_OUTPUT) /* Fast path. No conversion required. */ return drmp3_read_pcm_frames_raw(pMP3, framesToRead, pBufferOut); #else /* Slow path. Convert from f32 to s16. */ { float pTempF32[4096]; drmp3_uint64 totalPCMFramesRead = 0; while (totalPCMFramesRead < framesToRead) { drmp3_uint64 framesJustRead; drmp3_uint64 framesRemaining = framesToRead - totalPCMFramesRead; drmp3_uint64 framesToReadNow = DRMP3_COUNTOF(pTempF32) / pMP3->channels; if (framesToReadNow > framesRemaining) { framesToReadNow = framesRemaining; } framesJustRead = drmp3_read_pcm_frames_raw(pMP3, framesToReadNow, pTempF32); if (framesJustRead == 0) { break; } drmp3_f32_to_s16((drmp3_int16*)DRMP3_OFFSET_PTR(pBufferOut, sizeof(drmp3_int16) * totalPCMFramesRead * pMP3->channels), pTempF32, framesJustRead * pMP3->channels); totalPCMFramesRead += framesJustRead; } return totalPCMFramesRead; } #endif } static void drmp3_reset(drmp3* pMP3) { DRMP3_ASSERT(pMP3 != NULL); pMP3->pcmFramesConsumedInMP3Frame = 0; pMP3->pcmFramesRemainingInMP3Frame = 0; pMP3->currentPCMFrame = 0; pMP3->dataSize = 0; pMP3->atEnd = DRMP3_FALSE; drmp3dec_init(&pMP3->decoder); } static drmp3_bool32 drmp3_seek_to_start_of_stream(drmp3* pMP3) { DRMP3_ASSERT(pMP3 != NULL); DRMP3_ASSERT(pMP3->onSeek != NULL); /* Seek to the start of the stream to begin with. */ if (!drmp3__on_seek(pMP3, 0, drmp3_seek_origin_start)) { return DRMP3_FALSE; } /* Clear any cached data. */ drmp3_reset(pMP3); return DRMP3_TRUE; } static drmp3_bool32 drmp3_seek_forward_by_pcm_frames__brute_force(drmp3* pMP3, drmp3_uint64 frameOffset) { drmp3_uint64 framesRead; /* Just using a dumb read-and-discard for now. What would be nice is to parse only the header of the MP3 frame, and then skip over leading frames without spending the time doing a full decode. I cannot see an easy way to do this in minimp3, however, so it may involve some kind of manual processing. */ #if defined(DR_MP3_FLOAT_OUTPUT) framesRead = drmp3_read_pcm_frames_f32(pMP3, frameOffset, NULL); #else framesRead = drmp3_read_pcm_frames_s16(pMP3, frameOffset, NULL); #endif if (framesRead != frameOffset) { return DRMP3_FALSE; } return DRMP3_TRUE; } static drmp3_bool32 drmp3_seek_to_pcm_frame__brute_force(drmp3* pMP3, drmp3_uint64 frameIndex) { DRMP3_ASSERT(pMP3 != NULL); if (frameIndex == pMP3->currentPCMFrame) { return DRMP3_TRUE; } /* If we're moving foward we just read from where we're at. Otherwise we need to move back to the start of the stream and read from the beginning. */ if (frameIndex < pMP3->currentPCMFrame) { /* Moving backward. Move to the start of the stream and then move forward. */ if (!drmp3_seek_to_start_of_stream(pMP3)) { return DRMP3_FALSE; } } DRMP3_ASSERT(frameIndex >= pMP3->currentPCMFrame); return drmp3_seek_forward_by_pcm_frames__brute_force(pMP3, (frameIndex - pMP3->currentPCMFrame)); } static drmp3_bool32 drmp3_find_closest_seek_point(drmp3* pMP3, drmp3_uint64 frameIndex, drmp3_uint32* pSeekPointIndex) { drmp3_uint32 iSeekPoint; DRMP3_ASSERT(pSeekPointIndex != NULL); *pSeekPointIndex = 0; if (frameIndex < pMP3->pSeekPoints[0].pcmFrameIndex) { return DRMP3_FALSE; } /* Linear search for simplicity to begin with while I'm getting this thing working. Once it's all working change this to a binary search. */ for (iSeekPoint = 0; iSeekPoint < pMP3->seekPointCount; ++iSeekPoint) { if (pMP3->pSeekPoints[iSeekPoint].pcmFrameIndex > frameIndex) { break; /* Found it. */ } *pSeekPointIndex = iSeekPoint; } return DRMP3_TRUE; } static drmp3_bool32 drmp3_seek_to_pcm_frame__seek_table(drmp3* pMP3, drmp3_uint64 frameIndex) { drmp3_seek_point seekPoint; drmp3_uint32 priorSeekPointIndex; drmp3_uint16 iMP3Frame; drmp3_uint64 leftoverFrames; DRMP3_ASSERT(pMP3 != NULL); DRMP3_ASSERT(pMP3->pSeekPoints != NULL); DRMP3_ASSERT(pMP3->seekPointCount > 0); /* If there is no prior seekpoint it means the target PCM frame comes before the first seek point. Just assume a seekpoint at the start of the file in this case. */ if (drmp3_find_closest_seek_point(pMP3, frameIndex, &priorSeekPointIndex)) { seekPoint = pMP3->pSeekPoints[priorSeekPointIndex]; } else { seekPoint.seekPosInBytes = 0; seekPoint.pcmFrameIndex = 0; seekPoint.mp3FramesToDiscard = 0; seekPoint.pcmFramesToDiscard = 0; } /* First thing to do is seek to the first byte of the relevant MP3 frame. */ if (!drmp3__on_seek_64(pMP3, seekPoint.seekPosInBytes, drmp3_seek_origin_start)) { return DRMP3_FALSE; /* Failed to seek. */ } /* Clear any cached data. */ drmp3_reset(pMP3); /* Whole MP3 frames need to be discarded first. */ for (iMP3Frame = 0; iMP3Frame < seekPoint.mp3FramesToDiscard; ++iMP3Frame) { drmp3_uint32 pcmFramesRead; drmp3d_sample_t* pPCMFrames; /* Pass in non-null for the last frame because we want to ensure the sample rate converter is preloaded correctly. */ pPCMFrames = NULL; if (iMP3Frame == seekPoint.mp3FramesToDiscard-1) { pPCMFrames = (drmp3d_sample_t*)pMP3->pcmFrames; } /* We first need to decode the next frame. */ pcmFramesRead = drmp3_decode_next_frame_ex(pMP3, pPCMFrames); if (pcmFramesRead == 0) { return DRMP3_FALSE; } } /* We seeked to an MP3 frame in the raw stream so we need to make sure the current PCM frame is set correctly. */ pMP3->currentPCMFrame = seekPoint.pcmFrameIndex - seekPoint.pcmFramesToDiscard; /* Now at this point we can follow the same process as the brute force technique where we just skip over unnecessary MP3 frames and then read-and-discard at least 2 whole MP3 frames. */ leftoverFrames = frameIndex - pMP3->currentPCMFrame; return drmp3_seek_forward_by_pcm_frames__brute_force(pMP3, leftoverFrames); } DRMP3_API drmp3_bool32 drmp3_seek_to_pcm_frame(drmp3* pMP3, drmp3_uint64 frameIndex) { if (pMP3 == NULL || pMP3->onSeek == NULL) { return DRMP3_FALSE; } if (frameIndex == 0) { return drmp3_seek_to_start_of_stream(pMP3); } /* Use the seek table if we have one. */ if (pMP3->pSeekPoints != NULL && pMP3->seekPointCount > 0) { return drmp3_seek_to_pcm_frame__seek_table(pMP3, frameIndex); } else { return drmp3_seek_to_pcm_frame__brute_force(pMP3, frameIndex); } } DRMP3_API drmp3_bool32 drmp3_get_mp3_and_pcm_frame_count(drmp3* pMP3, drmp3_uint64* pMP3FrameCount, drmp3_uint64* pPCMFrameCount) { drmp3_uint64 currentPCMFrame; drmp3_uint64 totalPCMFrameCount; drmp3_uint64 totalMP3FrameCount; if (pMP3 == NULL) { return DRMP3_FALSE; } /* The way this works is we move back to the start of the stream, iterate over each MP3 frame and calculate the frame count based on our output sample rate, the seek back to the PCM frame we were sitting on before calling this function. */ /* The stream must support seeking for this to work. */ if (pMP3->onSeek == NULL) { return DRMP3_FALSE; } /* We'll need to seek back to where we were, so grab the PCM frame we're currently sitting on so we can restore later. */ currentPCMFrame = pMP3->currentPCMFrame; if (!drmp3_seek_to_start_of_stream(pMP3)) { return DRMP3_FALSE; } totalPCMFrameCount = 0; totalMP3FrameCount = 0; for (;;) { drmp3_uint32 pcmFramesInCurrentMP3Frame; pcmFramesInCurrentMP3Frame = drmp3_decode_next_frame_ex(pMP3, NULL); if (pcmFramesInCurrentMP3Frame == 0) { break; } totalPCMFrameCount += pcmFramesInCurrentMP3Frame; totalMP3FrameCount += 1; } /* Finally, we need to seek back to where we were. */ if (!drmp3_seek_to_start_of_stream(pMP3)) { return DRMP3_FALSE; } if (!drmp3_seek_to_pcm_frame(pMP3, currentPCMFrame)) { return DRMP3_FALSE; } if (pMP3FrameCount != NULL) { *pMP3FrameCount = totalMP3FrameCount; } if (pPCMFrameCount != NULL) { *pPCMFrameCount = totalPCMFrameCount; } return DRMP3_TRUE; } DRMP3_API drmp3_uint64 drmp3_get_pcm_frame_count(drmp3* pMP3) { drmp3_uint64 totalPCMFrameCount; if (!drmp3_get_mp3_and_pcm_frame_count(pMP3, NULL, &totalPCMFrameCount)) { return 0; } return totalPCMFrameCount; } DRMP3_API drmp3_uint64 drmp3_get_mp3_frame_count(drmp3* pMP3) { drmp3_uint64 totalMP3FrameCount; if (!drmp3_get_mp3_and_pcm_frame_count(pMP3, &totalMP3FrameCount, NULL)) { return 0; } return totalMP3FrameCount; } static void drmp3__accumulate_running_pcm_frame_count(drmp3* pMP3, drmp3_uint32 pcmFrameCountIn, drmp3_uint64* pRunningPCMFrameCount, float* pRunningPCMFrameCountFractionalPart) { float srcRatio; float pcmFrameCountOutF; drmp3_uint32 pcmFrameCountOut; srcRatio = (float)pMP3->mp3FrameSampleRate / (float)pMP3->sampleRate; DRMP3_ASSERT(srcRatio > 0); pcmFrameCountOutF = *pRunningPCMFrameCountFractionalPart + (pcmFrameCountIn / srcRatio); pcmFrameCountOut = (drmp3_uint32)pcmFrameCountOutF; *pRunningPCMFrameCountFractionalPart = pcmFrameCountOutF - pcmFrameCountOut; *pRunningPCMFrameCount += pcmFrameCountOut; } typedef struct { drmp3_uint64 bytePos; drmp3_uint64 pcmFrameIndex; /* <-- After sample rate conversion. */ } drmp3__seeking_mp3_frame_info; DRMP3_API drmp3_bool32 drmp3_calculate_seek_points(drmp3* pMP3, drmp3_uint32* pSeekPointCount, drmp3_seek_point* pSeekPoints) { drmp3_uint32 seekPointCount; drmp3_uint64 currentPCMFrame; drmp3_uint64 totalMP3FrameCount; drmp3_uint64 totalPCMFrameCount; if (pMP3 == NULL || pSeekPointCount == NULL || pSeekPoints == NULL) { return DRMP3_FALSE; /* Invalid args. */ } seekPointCount = *pSeekPointCount; if (seekPointCount == 0) { return DRMP3_FALSE; /* The client has requested no seek points. Consider this to be invalid arguments since the client has probably not intended this. */ } /* We'll need to seek back to the current sample after calculating the seekpoints so we need to go ahead and grab the current location at the top. */ currentPCMFrame = pMP3->currentPCMFrame; /* We never do more than the total number of MP3 frames and we limit it to 32-bits. */ if (!drmp3_get_mp3_and_pcm_frame_count(pMP3, &totalMP3FrameCount, &totalPCMFrameCount)) { return DRMP3_FALSE; } /* If there's less than DRMP3_SEEK_LEADING_MP3_FRAMES+1 frames we just report 1 seek point which will be the very start of the stream. */ if (totalMP3FrameCount < DRMP3_SEEK_LEADING_MP3_FRAMES+1) { seekPointCount = 1; pSeekPoints[0].seekPosInBytes = 0; pSeekPoints[0].pcmFrameIndex = 0; pSeekPoints[0].mp3FramesToDiscard = 0; pSeekPoints[0].pcmFramesToDiscard = 0; } else { drmp3_uint64 pcmFramesBetweenSeekPoints; drmp3__seeking_mp3_frame_info mp3FrameInfo[DRMP3_SEEK_LEADING_MP3_FRAMES+1]; drmp3_uint64 runningPCMFrameCount = 0; float runningPCMFrameCountFractionalPart = 0; drmp3_uint64 nextTargetPCMFrame; drmp3_uint32 iMP3Frame; drmp3_uint32 iSeekPoint; if (seekPointCount > totalMP3FrameCount-1) { seekPointCount = (drmp3_uint32)totalMP3FrameCount-1; } pcmFramesBetweenSeekPoints = totalPCMFrameCount / (seekPointCount+1); /* Here is where we actually calculate the seek points. We need to start by moving the start of the stream. We then enumerate over each MP3 frame. */ if (!drmp3_seek_to_start_of_stream(pMP3)) { return DRMP3_FALSE; } /* We need to cache the byte positions of the previous MP3 frames. As a new MP3 frame is iterated, we cycle the byte positions in this array. The value in the first item in this array is the byte position that will be reported in the next seek point. */ /* We need to initialize the array of MP3 byte positions for the leading MP3 frames. */ for (iMP3Frame = 0; iMP3Frame < DRMP3_SEEK_LEADING_MP3_FRAMES+1; ++iMP3Frame) { drmp3_uint32 pcmFramesInCurrentMP3FrameIn; /* The byte position of the next frame will be the stream's cursor position, minus whatever is sitting in the buffer. */ DRMP3_ASSERT(pMP3->streamCursor >= pMP3->dataSize); mp3FrameInfo[iMP3Frame].bytePos = pMP3->streamCursor - pMP3->dataSize; mp3FrameInfo[iMP3Frame].pcmFrameIndex = runningPCMFrameCount; /* We need to get information about this frame so we can know how many samples it contained. */ pcmFramesInCurrentMP3FrameIn = drmp3_decode_next_frame_ex(pMP3, NULL); if (pcmFramesInCurrentMP3FrameIn == 0) { return DRMP3_FALSE; /* This should never happen. */ } drmp3__accumulate_running_pcm_frame_count(pMP3, pcmFramesInCurrentMP3FrameIn, &runningPCMFrameCount, &runningPCMFrameCountFractionalPart); } /* At this point we will have extracted the byte positions of the leading MP3 frames. We can now start iterating over each seek point and calculate them. */ nextTargetPCMFrame = 0; for (iSeekPoint = 0; iSeekPoint < seekPointCount; ++iSeekPoint) { nextTargetPCMFrame += pcmFramesBetweenSeekPoints; for (;;) { if (nextTargetPCMFrame < runningPCMFrameCount) { /* The next seek point is in the current MP3 frame. */ pSeekPoints[iSeekPoint].seekPosInBytes = mp3FrameInfo[0].bytePos; pSeekPoints[iSeekPoint].pcmFrameIndex = nextTargetPCMFrame; pSeekPoints[iSeekPoint].mp3FramesToDiscard = DRMP3_SEEK_LEADING_MP3_FRAMES; pSeekPoints[iSeekPoint].pcmFramesToDiscard = (drmp3_uint16)(nextTargetPCMFrame - mp3FrameInfo[DRMP3_SEEK_LEADING_MP3_FRAMES-1].pcmFrameIndex); break; } else { size_t i; drmp3_uint32 pcmFramesInCurrentMP3FrameIn; /* The next seek point is not in the current MP3 frame, so continue on to the next one. The first thing to do is cycle the cached MP3 frame info. */ for (i = 0; i < DRMP3_COUNTOF(mp3FrameInfo)-1; ++i) { mp3FrameInfo[i] = mp3FrameInfo[i+1]; } /* Cache previous MP3 frame info. */ mp3FrameInfo[DRMP3_COUNTOF(mp3FrameInfo)-1].bytePos = pMP3->streamCursor - pMP3->dataSize; mp3FrameInfo[DRMP3_COUNTOF(mp3FrameInfo)-1].pcmFrameIndex = runningPCMFrameCount; /* Go to the next MP3 frame. This shouldn't ever fail, but just in case it does we just set the seek point and break. If it happens, it should only ever do it for the last seek point. */ pcmFramesInCurrentMP3FrameIn = drmp3_decode_next_frame_ex(pMP3, NULL); if (pcmFramesInCurrentMP3FrameIn == 0) { pSeekPoints[iSeekPoint].seekPosInBytes = mp3FrameInfo[0].bytePos; pSeekPoints[iSeekPoint].pcmFrameIndex = nextTargetPCMFrame; pSeekPoints[iSeekPoint].mp3FramesToDiscard = DRMP3_SEEK_LEADING_MP3_FRAMES; pSeekPoints[iSeekPoint].pcmFramesToDiscard = (drmp3_uint16)(nextTargetPCMFrame - mp3FrameInfo[DRMP3_SEEK_LEADING_MP3_FRAMES-1].pcmFrameIndex); break; } drmp3__accumulate_running_pcm_frame_count(pMP3, pcmFramesInCurrentMP3FrameIn, &runningPCMFrameCount, &runningPCMFrameCountFractionalPart); } } } /* Finally, we need to seek back to where we were. */ if (!drmp3_seek_to_start_of_stream(pMP3)) { return DRMP3_FALSE; } if (!drmp3_seek_to_pcm_frame(pMP3, currentPCMFrame)) { return DRMP3_FALSE; } } *pSeekPointCount = seekPointCount; return DRMP3_TRUE; } DRMP3_API drmp3_bool32 drmp3_bind_seek_table(drmp3* pMP3, drmp3_uint32 seekPointCount, drmp3_seek_point* pSeekPoints) { if (pMP3 == NULL) { return DRMP3_FALSE; } if (seekPointCount == 0 || pSeekPoints == NULL) { /* Unbinding. */ pMP3->seekPointCount = 0; pMP3->pSeekPoints = NULL; } else { /* Binding. */ pMP3->seekPointCount = seekPointCount; pMP3->pSeekPoints = pSeekPoints; } return DRMP3_TRUE; } static float* drmp3__full_read_and_close_f32(drmp3* pMP3, drmp3_config* pConfig, drmp3_uint64* pTotalFrameCount) { drmp3_uint64 totalFramesRead = 0; drmp3_uint64 framesCapacity = 0; float* pFrames = NULL; float temp[4096]; DRMP3_ASSERT(pMP3 != NULL); for (;;) { drmp3_uint64 framesToReadRightNow = DRMP3_COUNTOF(temp) / pMP3->channels; drmp3_uint64 framesJustRead = drmp3_read_pcm_frames_f32(pMP3, framesToReadRightNow, temp); if (framesJustRead == 0) { break; } /* Reallocate the output buffer if there's not enough room. */ if (framesCapacity < totalFramesRead + framesJustRead) { drmp3_uint64 oldFramesBufferSize; drmp3_uint64 newFramesBufferSize; drmp3_uint64 newFramesCap; float* pNewFrames; newFramesCap = framesCapacity * 2; if (newFramesCap < totalFramesRead + framesJustRead) { newFramesCap = totalFramesRead + framesJustRead; } oldFramesBufferSize = framesCapacity * pMP3->channels * sizeof(float); newFramesBufferSize = newFramesCap * pMP3->channels * sizeof(float); if (newFramesBufferSize > (drmp3_uint64)DRMP3_SIZE_MAX) { break; } pNewFrames = (float*)drmp3__realloc_from_callbacks(pFrames, (size_t)newFramesBufferSize, (size_t)oldFramesBufferSize, &pMP3->allocationCallbacks); if (pNewFrames == NULL) { drmp3__free_from_callbacks(pFrames, &pMP3->allocationCallbacks); break; } pFrames = pNewFrames; framesCapacity = newFramesCap; } DRMP3_COPY_MEMORY(pFrames + totalFramesRead*pMP3->channels, temp, (size_t)(framesJustRead*pMP3->channels*sizeof(float))); totalFramesRead += framesJustRead; /* If the number of frames we asked for is less that what we actually read it means we've reached the end. */ if (framesJustRead != framesToReadRightNow) { break; } } if (pConfig != NULL) { pConfig->channels = pMP3->channels; pConfig->sampleRate = pMP3->sampleRate; } drmp3_uninit(pMP3); if (pTotalFrameCount) { *pTotalFrameCount = totalFramesRead; } return pFrames; } static drmp3_int16* drmp3__full_read_and_close_s16(drmp3* pMP3, drmp3_config* pConfig, drmp3_uint64* pTotalFrameCount) { drmp3_uint64 totalFramesRead = 0; drmp3_uint64 framesCapacity = 0; drmp3_int16* pFrames = NULL; drmp3_int16 temp[4096]; DRMP3_ASSERT(pMP3 != NULL); for (;;) { drmp3_uint64 framesToReadRightNow = DRMP3_COUNTOF(temp) / pMP3->channels; drmp3_uint64 framesJustRead = drmp3_read_pcm_frames_s16(pMP3, framesToReadRightNow, temp); if (framesJustRead == 0) { break; } /* Reallocate the output buffer if there's not enough room. */ if (framesCapacity < totalFramesRead + framesJustRead) { drmp3_uint64 newFramesBufferSize; drmp3_uint64 oldFramesBufferSize; drmp3_uint64 newFramesCap; drmp3_int16* pNewFrames; newFramesCap = framesCapacity * 2; if (newFramesCap < totalFramesRead + framesJustRead) { newFramesCap = totalFramesRead + framesJustRead; } oldFramesBufferSize = framesCapacity * pMP3->channels * sizeof(drmp3_int16); newFramesBufferSize = newFramesCap * pMP3->channels * sizeof(drmp3_int16); if (newFramesBufferSize > (drmp3_uint64)DRMP3_SIZE_MAX) { break; } pNewFrames = (drmp3_int16*)drmp3__realloc_from_callbacks(pFrames, (size_t)newFramesBufferSize, (size_t)oldFramesBufferSize, &pMP3->allocationCallbacks); if (pNewFrames == NULL) { drmp3__free_from_callbacks(pFrames, &pMP3->allocationCallbacks); break; } pFrames = pNewFrames; framesCapacity = newFramesCap; } DRMP3_COPY_MEMORY(pFrames + totalFramesRead*pMP3->channels, temp, (size_t)(framesJustRead*pMP3->channels*sizeof(drmp3_int16))); totalFramesRead += framesJustRead; /* If the number of frames we asked for is less that what we actually read it means we've reached the end. */ if (framesJustRead != framesToReadRightNow) { break; } } if (pConfig != NULL) { pConfig->channels = pMP3->channels; pConfig->sampleRate = pMP3->sampleRate; } drmp3_uninit(pMP3); if (pTotalFrameCount) { *pTotalFrameCount = totalFramesRead; } return pFrames; } DRMP3_API float* drmp3_open_and_read_pcm_frames_f32(drmp3_read_proc onRead, drmp3_seek_proc onSeek, void* pUserData, drmp3_config* pConfig, drmp3_uint64* pTotalFrameCount, const drmp3_allocation_callbacks* pAllocationCallbacks) { drmp3 mp3; if (!drmp3_init(&mp3, onRead, onSeek, pUserData, pAllocationCallbacks)) { return NULL; } return drmp3__full_read_and_close_f32(&mp3, pConfig, pTotalFrameCount); } DRMP3_API drmp3_int16* drmp3_open_and_read_pcm_frames_s16(drmp3_read_proc onRead, drmp3_seek_proc onSeek, void* pUserData, drmp3_config* pConfig, drmp3_uint64* pTotalFrameCount, const drmp3_allocation_callbacks* pAllocationCallbacks) { drmp3 mp3; if (!drmp3_init(&mp3, onRead, onSeek, pUserData, pAllocationCallbacks)) { return NULL; } return drmp3__full_read_and_close_s16(&mp3, pConfig, pTotalFrameCount); } DRMP3_API float* drmp3_open_memory_and_read_pcm_frames_f32(const void* pData, size_t dataSize, drmp3_config* pConfig, drmp3_uint64* pTotalFrameCount, const drmp3_allocation_callbacks* pAllocationCallbacks) { drmp3 mp3; if (!drmp3_init_memory(&mp3, pData, dataSize, pAllocationCallbacks)) { return NULL; } return drmp3__full_read_and_close_f32(&mp3, pConfig, pTotalFrameCount); } DRMP3_API drmp3_int16* drmp3_open_memory_and_read_pcm_frames_s16(const void* pData, size_t dataSize, drmp3_config* pConfig, drmp3_uint64* pTotalFrameCount, const drmp3_allocation_callbacks* pAllocationCallbacks) { drmp3 mp3; if (!drmp3_init_memory(&mp3, pData, dataSize, pAllocationCallbacks)) { return NULL; } return drmp3__full_read_and_close_s16(&mp3, pConfig, pTotalFrameCount); } #ifndef DR_MP3_NO_STDIO DRMP3_API float* drmp3_open_file_and_read_pcm_frames_f32(const char* filePath, drmp3_config* pConfig, drmp3_uint64* pTotalFrameCount, const drmp3_allocation_callbacks* pAllocationCallbacks) { drmp3 mp3; if (!drmp3_init_file(&mp3, filePath, pAllocationCallbacks)) { return NULL; } return drmp3__full_read_and_close_f32(&mp3, pConfig, pTotalFrameCount); } DRMP3_API drmp3_int16* drmp3_open_file_and_read_pcm_frames_s16(const char* filePath, drmp3_config* pConfig, drmp3_uint64* pTotalFrameCount, const drmp3_allocation_callbacks* pAllocationCallbacks) { drmp3 mp3; if (!drmp3_init_file(&mp3, filePath, pAllocationCallbacks)) { return NULL; } return drmp3__full_read_and_close_s16(&mp3, pConfig, pTotalFrameCount); } #endif DRMP3_API void* drmp3_malloc(size_t sz, const drmp3_allocation_callbacks* pAllocationCallbacks) { if (pAllocationCallbacks != NULL) { return drmp3__malloc_from_callbacks(sz, pAllocationCallbacks); } else { return drmp3__malloc_default(sz, NULL); } } DRMP3_API void drmp3_free(void* p, const drmp3_allocation_callbacks* pAllocationCallbacks) { if (pAllocationCallbacks != NULL) { drmp3__free_from_callbacks(p, pAllocationCallbacks); } else { drmp3__free_default(p, NULL); } } #endif /* dr_mp3_c */ #endif /*DR_MP3_IMPLEMENTATION*/ /* DIFFERENCES BETWEEN minimp3 AND dr_mp3 ====================================== - First, keep in mind that minimp3 (https://github.com/lieff/minimp3) is where all the real work was done. All of the code relating to the actual decoding remains mostly unmodified, apart from some namespacing changes. - dr_mp3 adds a pulling style API which allows you to deliver raw data via callbacks. So, rather than pushing data to the decoder, the decoder _pulls_ data from your callbacks. - In addition to callbacks, a decoder can be initialized from a block of memory and a file. - The dr_mp3 pull API reads PCM frames rather than whole MP3 frames. - dr_mp3 adds convenience APIs for opening and decoding entire files in one go. - dr_mp3 is fully namespaced, including the implementation section, which is more suitable when compiling projects as a single translation unit (aka unity builds). At the time of writing this, a unity build is not possible when using minimp3 in conjunction with stb_vorbis. dr_mp3 addresses this. */ /* RELEASE NOTES - v0.5.0 ======================= Version 0.5.0 has breaking API changes. Improved Client-Defined Memory Allocation ----------------------------------------- The main change with this release is the addition of a more flexible way of implementing custom memory allocation routines. The existing system of DRMP3_MALLOC, DRMP3_REALLOC and DRMP3_FREE are still in place and will be used by default when no custom allocation callbacks are specified. To use the new system, you pass in a pointer to a drmp3_allocation_callbacks object to drmp3_init() and family, like this: void* my_malloc(size_t sz, void* pUserData) { return malloc(sz); } void* my_realloc(void* p, size_t sz, void* pUserData) { return realloc(p, sz); } void my_free(void* p, void* pUserData) { free(p); } ... drmp3_allocation_callbacks allocationCallbacks; allocationCallbacks.pUserData = &myData; allocationCallbacks.onMalloc = my_malloc; allocationCallbacks.onRealloc = my_realloc; allocationCallbacks.onFree = my_free; drmp3_init_file(&mp3, "my_file.mp3", NULL, &allocationCallbacks); The advantage of this new system is that it allows you to specify user data which will be passed in to the allocation routines. Passing in null for the allocation callbacks object will cause dr_mp3 to use defaults which is the same as DRMP3_MALLOC, DRMP3_REALLOC and DRMP3_FREE and the equivalent of how it worked in previous versions. Every API that opens a drmp3 object now takes this extra parameter. These include the following: drmp3_init() drmp3_init_file() drmp3_init_memory() drmp3_open_and_read_pcm_frames_f32() drmp3_open_and_read_pcm_frames_s16() drmp3_open_memory_and_read_pcm_frames_f32() drmp3_open_memory_and_read_pcm_frames_s16() drmp3_open_file_and_read_pcm_frames_f32() drmp3_open_file_and_read_pcm_frames_s16() Renamed APIs ------------ The following APIs have been renamed for consistency with other dr_* libraries and to make it clear that they return PCM frame counts rather than sample counts. drmp3_open_and_read_f32() -> drmp3_open_and_read_pcm_frames_f32() drmp3_open_and_read_s16() -> drmp3_open_and_read_pcm_frames_s16() drmp3_open_memory_and_read_f32() -> drmp3_open_memory_and_read_pcm_frames_f32() drmp3_open_memory_and_read_s16() -> drmp3_open_memory_and_read_pcm_frames_s16() drmp3_open_file_and_read_f32() -> drmp3_open_file_and_read_pcm_frames_f32() drmp3_open_file_and_read_s16() -> drmp3_open_file_and_read_pcm_frames_s16() */ /* REVISION HISTORY ================ v0.6.34 - 2022-09-17 - Fix compilation with DJGPP. - Fix compilation when compiling with x86 with no SSE2. - Remove an unnecessary variable from the drmp3 structure. v0.6.33 - 2022-04-10 - Fix compilation error with the MSVC ARM64 build. - Fix compilation error on older versions of GCC. - Remove some unused functions. v0.6.32 - 2021-12-11 - Fix a warning with Clang. v0.6.31 - 2021-08-22 - Fix a bug when loading from memory. v0.6.30 - 2021-08-16 - Silence some warnings. - Replace memory operations with DRMP3_* macros. v0.6.29 - 2021-08-08 - Bring up to date with minimp3. v0.6.28 - 2021-07-31 - Fix platform detection for ARM64. - Fix a compilation error with C89. v0.6.27 - 2021-02-21 - Fix a warning due to referencing _MSC_VER when it is undefined. v0.6.26 - 2021-01-31 - Bring up to date with minimp3. v0.6.25 - 2020-12-26 - Remove DRMP3_DEFAULT_CHANNELS and DRMP3_DEFAULT_SAMPLE_RATE which are leftovers from some removed APIs. v0.6.24 - 2020-12-07 - Fix a typo in version date for 0.6.23. v0.6.23 - 2020-12-03 - Fix an error where a file can be closed twice when initialization of the decoder fails. v0.6.22 - 2020-12-02 - Fix an error where it's possible for a file handle to be left open when initialization of the decoder fails. v0.6.21 - 2020-11-28 - Bring up to date with minimp3. v0.6.20 - 2020-11-21 - Fix compilation with OpenWatcom. v0.6.19 - 2020-11-13 - Minor code clean up. v0.6.18 - 2020-11-01 - Improve compiler support for older versions of GCC. v0.6.17 - 2020-09-28 - Bring up to date with minimp3. v0.6.16 - 2020-08-02 - Simplify sized types. v0.6.15 - 2020-07-25 - Fix a compilation warning. v0.6.14 - 2020-07-23 - Fix undefined behaviour with memmove(). v0.6.13 - 2020-07-06 - Fix a bug when converting from s16 to f32 in drmp3_read_pcm_frames_f32(). v0.6.12 - 2020-06-23 - Add include guard for the implementation section. v0.6.11 - 2020-05-26 - Fix use of uninitialized variable error. v0.6.10 - 2020-05-16 - Add compile-time and run-time version querying. - DRMP3_VERSION_MINOR - DRMP3_VERSION_MAJOR - DRMP3_VERSION_REVISION - DRMP3_VERSION_STRING - drmp3_version() - drmp3_version_string() v0.6.9 - 2020-04-30 - Change the `pcm` parameter of drmp3dec_decode_frame() to a `const drmp3_uint8*` for consistency with internal APIs. v0.6.8 - 2020-04-26 - Optimizations to decoding when initializing from memory. v0.6.7 - 2020-04-25 - Fix a compilation error with DR_MP3_NO_STDIO - Optimization to decoding by reducing some data movement. v0.6.6 - 2020-04-23 - Fix a minor bug with the running PCM frame counter. v0.6.5 - 2020-04-19 - Fix compilation error on ARM builds. v0.6.4 - 2020-04-19 - Bring up to date with changes to minimp3. v0.6.3 - 2020-04-13 - Fix some pedantic warnings. v0.6.2 - 2020-04-10 - Fix a crash in drmp3_open_*_and_read_pcm_frames_*() if the output config object is NULL. v0.6.1 - 2020-04-05 - Fix warnings. v0.6.0 - 2020-04-04 - API CHANGE: Remove the pConfig parameter from the following APIs: - drmp3_init() - drmp3_init_memory() - drmp3_init_file() - Add drmp3_init_file_w() for opening a file from a wchar_t encoded path. v0.5.6 - 2020-02-12 - Bring up to date with minimp3. v0.5.5 - 2020-01-29 - Fix a memory allocation bug in high level s16 decoding APIs. v0.5.4 - 2019-12-02 - Fix a possible null pointer dereference when using custom memory allocators for realloc(). v0.5.3 - 2019-11-14 - Fix typos in documentation. v0.5.2 - 2019-11-02 - Bring up to date with minimp3. v0.5.1 - 2019-10-08 - Fix a warning with GCC. v0.5.0 - 2019-10-07 - API CHANGE: Add support for user defined memory allocation routines. This system allows the program to specify their own memory allocation routines with a user data pointer for client-specific contextual data. This adds an extra parameter to the end of the following APIs: - drmp3_init() - drmp3_init_file() - drmp3_init_memory() - drmp3_open_and_read_pcm_frames_f32() - drmp3_open_and_read_pcm_frames_s16() - drmp3_open_memory_and_read_pcm_frames_f32() - drmp3_open_memory_and_read_pcm_frames_s16() - drmp3_open_file_and_read_pcm_frames_f32() - drmp3_open_file_and_read_pcm_frames_s16() - API CHANGE: Renamed the following APIs: - drmp3_open_and_read_f32() -> drmp3_open_and_read_pcm_frames_f32() - drmp3_open_and_read_s16() -> drmp3_open_and_read_pcm_frames_s16() - drmp3_open_memory_and_read_f32() -> drmp3_open_memory_and_read_pcm_frames_f32() - drmp3_open_memory_and_read_s16() -> drmp3_open_memory_and_read_pcm_frames_s16() - drmp3_open_file_and_read_f32() -> drmp3_open_file_and_read_pcm_frames_f32() - drmp3_open_file_and_read_s16() -> drmp3_open_file_and_read_pcm_frames_s16() v0.4.7 - 2019-07-28 - Fix a compiler error. v0.4.6 - 2019-06-14 - Fix a compiler error. v0.4.5 - 2019-06-06 - Bring up to date with minimp3. v0.4.4 - 2019-05-06 - Fixes to the VC6 build. v0.4.3 - 2019-05-05 - Use the channel count and/or sample rate of the first MP3 frame instead of DRMP3_DEFAULT_CHANNELS and DRMP3_DEFAULT_SAMPLE_RATE when they are set to 0. To use the old behaviour, just set the relevant property to DRMP3_DEFAULT_CHANNELS or DRMP3_DEFAULT_SAMPLE_RATE. - Add s16 reading APIs - drmp3_read_pcm_frames_s16 - drmp3_open_memory_and_read_pcm_frames_s16 - drmp3_open_and_read_pcm_frames_s16 - drmp3_open_file_and_read_pcm_frames_s16 - Add drmp3_get_mp3_and_pcm_frame_count() to the public header section. - Add support for C89. - Change license to choice of public domain or MIT-0. v0.4.2 - 2019-02-21 - Fix a warning. v0.4.1 - 2018-12-30 - Fix a warning. v0.4.0 - 2018-12-16 - API CHANGE: Rename some APIs: - drmp3_read_f32 -> to drmp3_read_pcm_frames_f32 - drmp3_seek_to_frame -> drmp3_seek_to_pcm_frame - drmp3_open_and_decode_f32 -> drmp3_open_and_read_pcm_frames_f32 - drmp3_open_and_decode_memory_f32 -> drmp3_open_memory_and_read_pcm_frames_f32 - drmp3_open_and_decode_file_f32 -> drmp3_open_file_and_read_pcm_frames_f32 - Add drmp3_get_pcm_frame_count(). - Add drmp3_get_mp3_frame_count(). - Improve seeking performance. v0.3.2 - 2018-09-11 - Fix a couple of memory leaks. - Bring up to date with minimp3. v0.3.1 - 2018-08-25 - Fix C++ build. v0.3.0 - 2018-08-25 - Bring up to date with minimp3. This has a minor API change: the "pcm" parameter of drmp3dec_decode_frame() has been changed from short* to void* because it can now output both s16 and f32 samples, depending on whether or not the DR_MP3_FLOAT_OUTPUT option is set. v0.2.11 - 2018-08-08 - Fix a bug where the last part of a file is not read. v0.2.10 - 2018-08-07 - Improve 64-bit detection. v0.2.9 - 2018-08-05 - Fix C++ build on older versions of GCC. - Bring up to date with minimp3. v0.2.8 - 2018-08-02 - Fix compilation errors with older versions of GCC. v0.2.7 - 2018-07-13 - Bring up to date with minimp3. v0.2.6 - 2018-07-12 - Bring up to date with minimp3. v0.2.5 - 2018-06-22 - Bring up to date with minimp3. v0.2.4 - 2018-05-12 - Bring up to date with minimp3. v0.2.3 - 2018-04-29 - Fix TCC build. v0.2.2 - 2018-04-28 - Fix bug when opening a decoder from memory. v0.2.1 - 2018-04-27 - Efficiency improvements when the decoder reaches the end of the stream. v0.2 - 2018-04-21 - Bring up to date with minimp3. - Start using major.minor.revision versioning. v0.1d - 2018-03-30 - Bring up to date with minimp3. v0.1c - 2018-03-11 - Fix C++ build error. v0.1b - 2018-03-07 - Bring up to date with minimp3. v0.1a - 2018-02-28 - Fix compilation error on GCC/Clang. - Fix some warnings. v0.1 - 2018-02-xx - Initial versioned release. */ /* This software is available as a choice of the following licenses. Choose whichever you prefer. =============================================================================== ALTERNATIVE 1 - Public Domain (www.unlicense.org) =============================================================================== This is free and unencumbered software released into the public domain. Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means. In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. For more information, please refer to =============================================================================== ALTERNATIVE 2 - MIT No Attribution =============================================================================== Copyright 2020 David Reid Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /* https://github.com/lieff/minimp3 To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This software is distributed without any warranty. See . */ ================================================ FILE: src/libraries/enet/enet.cpp ================================================ /** * * Copyright (C) 2014 by Leaf Corcoran * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifdef _WIN32 #define NOMINMAX #endif #include #include #include #include #include #include #include extern "C" { #define LUA_COMPAT_ALL #include "lua.h" #include "lualib.h" #include "lauxlib.h" #include } #define check_host(l, idx)\ *(ENetHost**)luaL_checkudata(l, idx, "enet_host") #define check_peer(l, idx)\ *(ENetPeer**)luaL_checkudata(l, idx, "enet_peer") /** * Parse address string, eg: * *:5959 * 127.0.0.1:* * website.com:8080 */ static void parse_address(lua_State *l, const char *addr_str, ENetAddress *address) { int host_i = 0, port_i = 0; char host_str[128] = {0}; char port_str[32] = {0}; int scanning_port = 0; char *c = (char *)addr_str; while (*c != 0) { if (host_i >= 128 || port_i >= 32 ) luaL_error(l, "Hostname too long"); if (scanning_port) { port_str[port_i++] = *c; } else { if (*c == ':') { scanning_port = 1; } else { host_str[host_i++] = *c; } } c++; } host_str[host_i] = '\0'; port_str[port_i] = '\0'; if (host_i == 0) luaL_error(l, "Failed to parse address"); if (port_i == 0) luaL_error(l, "Missing port in address"); if (strcmp("*", host_str) == 0) { address->host = ENET_HOST_ANY; } else { if (enet_address_set_host(address, host_str) != 0) { luaL_error(l, "Failed to resolve host name"); } } if (strcmp("*", port_str) == 0) { address->port = ENET_PORT_ANY; } else { address->port = atoi(port_str); } } /** * Find the index of a given peer for which we only have the pointer. */ static size_t find_peer_index(lua_State *l, ENetHost *enet_host, ENetPeer *peer) { size_t peer_index; for (peer_index = 0; peer_index < enet_host->peerCount; peer_index++) { if (peer == &(enet_host->peers[peer_index])) return peer_index; } luaL_error (l, "enet: could not find peer id!"); return peer_index; } static bool supports_full_lightuserdata(lua_State *L) { static bool checked = false; static bool supported = false; if (sizeof(void*) == 4) // 32-bit platforms always supports full-lightuserdata. return true; if (!checked) { lua_pushcclosure(L, [](lua_State* L) -> int { // Try to push pointer with all bits set. lua_pushlightuserdata(L, (void*)(~((size_t)0))); return 1; }, 0); supported = lua_pcall(L, 0, 1, 0) == 0; checked = true; lua_pop(L, 1); } return supported; } static uintptr_t compute_peer_key(lua_State *L, ENetPeer *peer) { // ENet peers are be allocated on the heap in an array. Lua numbers // (doubles) can store all possible integers up to 2^53. We can store // pointers that use more than 53 bits if their alignment is guaranteed to // be more than 1. For example an alignment requirement of 8 means we can // shift the pointer's bits by 3. // Please see these for the reason of this ternary operator: // * https://github.com/love2d/love/issues/1916 // * https://github.com/love2d/love/commit/4ab9a1ce8c const size_t minalign = sizeof(void*) == 8 ? std::min(alignof(ENetPeer), alignof(std::max_align_t)) : 1; uintptr_t key = (uintptr_t) peer; if ((key & (minalign - 1)) != 0) { luaL_error(L, "Cannot push enet peer to Lua: unexpected alignment " "(pointer is %p but alignment should be %d)", peer, minalign); } static const size_t shift = (size_t) log2((double) minalign); return key >> shift; } static void push_peer_key(lua_State *L, uintptr_t key) { // If full 64-bit lightuserdata is supported (or it's 32-bit platform), // always use that. Otherwise, if the key is smaller than 2^53 (which is // integer precision for double datatype) on 64-bit platform, then push // number. Otherwise, throw error. if (supports_full_lightuserdata(L)) lua_pushlightuserdata(L, (void*) key); #if UINTPTR_MAX == 0xffffffffffffffff else if (key > 0x20000000000000ULL) // 2^53 luaL_error(L, "Cannot push enet peer to Lua: pointer value %p is too large", key); #endif else lua_pushnumber(L, (lua_Number) key); } static void push_peer(lua_State *l, ENetPeer *peer) { uintptr_t key = compute_peer_key(l, peer); // try to find in peer table lua_getfield(l, LUA_REGISTRYINDEX, "enet_peers"); push_peer_key(l, key); lua_gettable(l, -2); if (lua_isnil(l, -1)) { // printf("creating new peer\n"); lua_pop(l, 1); *(ENetPeer**)lua_newuserdata(l, sizeof(void*)) = peer; luaL_getmetatable(l, "enet_peer"); lua_setmetatable(l, -2); push_peer_key(l, key); lua_pushvalue(l, -2); lua_settable(l, -4); } lua_remove(l, -2); // remove enet_peers } static void push_event(lua_State *l, ENetEvent *event) { lua_newtable(l); // event table if (event->peer) { push_peer(l, event->peer); lua_setfield(l, -2, "peer"); } switch (event->type) { case ENET_EVENT_TYPE_CONNECT: lua_pushinteger(l, event->data); lua_setfield(l, -2, "data"); lua_pushstring(l, "connect"); break; case ENET_EVENT_TYPE_DISCONNECT: lua_pushinteger(l, event->data); lua_setfield(l, -2, "data"); lua_pushstring(l, "disconnect"); break; case ENET_EVENT_TYPE_RECEIVE: lua_pushlstring(l, (const char *)event->packet->data, event->packet->dataLength); lua_setfield(l, -2, "data"); lua_pushinteger(l, event->channelID); lua_setfield(l, -2, "channel"); lua_pushstring(l, "receive"); enet_packet_destroy(event->packet); break; case ENET_EVENT_TYPE_NONE: lua_pushstring(l, "none"); break; } lua_setfield(l, -2, "type"); } /** * Read a packet off the stack as a string * idx is position of string or lightuserdata */ static ENetPacket *read_packet(lua_State *l, int idx, enet_uint8 *channel_id) { size_t size; int argc = lua_gettop(l); const void* data; if (lua_islightuserdata(l, idx)) { data = lua_touserdata(l, idx); size = (size_t) luaL_checknumber(l, idx + 1); idx++; } else { data = luaL_checklstring(l, idx, &size); } ENetPacket *packet; enet_uint32 flags = ENET_PACKET_FLAG_RELIABLE; *channel_id = 0; if (argc >= idx+2 && !lua_isnil(l, idx+2)) { const char *flag_str = luaL_checkstring(l, idx+2); if (strcmp("unsequenced", flag_str) == 0) { flags = ENET_PACKET_FLAG_UNSEQUENCED; } else if (strcmp("reliable", flag_str) == 0) { flags = ENET_PACKET_FLAG_RELIABLE; } else if (strcmp("unreliable", flag_str) == 0) { flags = 0; } else { luaL_error(l, "Unknown packet flag: %s", flag_str); } } if (argc >= idx+1 && !lua_isnil(l, idx+1)) { *channel_id = (int) luaL_checknumber(l, idx+1); } packet = enet_packet_create(data, size, flags); if (packet == NULL) { luaL_error(l, "Failed to create packet"); } return packet; } /** * Create a new host * Args: * address (nil for client) * [peer_count = 64] * [channel_count = 1] * [in_bandwidth = 0] * [out_bandwidth = 0] */ static int host_create(lua_State *l) { ENetHost *host; size_t peer_count = 64, channel_count = 1; enet_uint32 in_bandwidth = 0, out_bandwidth = 0; int have_address = 1; ENetAddress address; if (lua_gettop(l) == 0 || lua_isnil(l, 1)) { have_address = 0; } else { parse_address(l, luaL_checkstring(l, 1), &address); } switch (lua_gettop(l)) { case 5: if (!lua_isnil(l, 5)) out_bandwidth = (int) luaL_checknumber(l, 5); case 4: if (!lua_isnil(l, 4)) in_bandwidth = (int) luaL_checknumber(l, 4); case 3: if (!lua_isnil(l, 3)) channel_count = (int) luaL_checknumber(l, 3); case 2: if (!lua_isnil(l, 2)) peer_count = (int) luaL_checknumber(l, 2); } // printf("host create, peers=%d, channels=%d, in=%d, out=%d\n", // peer_count, channel_count, in_bandwidth, out_bandwidth); host = enet_host_create(have_address ? &address : NULL, peer_count, channel_count, in_bandwidth, out_bandwidth); if (host == NULL) { lua_pushnil (l); lua_pushstring(l, "enet: failed to create host (already listening?)"); return 2; } *(ENetHost**)lua_newuserdata(l, sizeof(void*)) = host; luaL_getmetatable(l, "enet_host"); lua_setmetatable(l, -2); return 1; } static int linked_version(lua_State *l) { lua_pushfstring(l, "%d.%d.%d", ENET_VERSION_GET_MAJOR(enet_linked_version()), ENET_VERSION_GET_MINOR(enet_linked_version()), ENET_VERSION_GET_PATCH(enet_linked_version())); return 1; } /** * Serice a host * Args: * timeout * * Return * nil on no event * an event table on event */ static int host_service(lua_State *l) { ENetHost *host = check_host(l, 1); if (!host) { return luaL_error(l, "Tried to index a nil host!"); } ENetEvent event; int timeout = 0, out; if (lua_gettop(l) > 1) timeout = (int) luaL_checknumber(l, 2); out = enet_host_service(host, &event, timeout); if (out == 0) return 0; if (out < 0) return luaL_error(l, "Error during service"); push_event(l, &event); return 1; } /** * Dispatch a single event if available */ static int host_check_events(lua_State *l) { ENetHost *host = check_host(l, 1); if (!host) { return luaL_error(l, "Tried to index a nil host!"); } ENetEvent event; int out = enet_host_check_events(host, &event); if (out == 0) return 0; if (out < 0) return luaL_error(l, "Error checking event"); push_event(l, &event); return 1; } /** * Enables an adaptive order-2 PPM range coder for the transmitted data of * all peers. */ static int host_compress_with_range_coder(lua_State *l) { ENetHost *host = check_host(l, 1); if (!host) { return luaL_error(l, "Tried to index a nil host!"); } int result = enet_host_compress_with_range_coder (host); if (result == 0) { lua_pushboolean (l, 1); } else { lua_pushboolean (l, 0); } return 1; } /** * Connect a host to an address * Args: * the address * [channel_count = 1] * [data = 0] */ static int host_connect(lua_State *l) { ENetHost *host = check_host(l, 1); if (!host) { return luaL_error(l, "Tried to index a nil host!"); } ENetAddress address; ENetPeer *peer; enet_uint32 data = 0; size_t channel_count = 1; parse_address(l, luaL_checkstring(l, 2), &address); switch (lua_gettop(l)) { case 4: if (!lua_isnil(l, 4)) data = (int) luaL_checknumber(l, 4); case 3: if (!lua_isnil(l, 3)) channel_count = (int) luaL_checknumber(l, 3); } // printf("host connect, channels=%d, data=%d\n", channel_count, data); peer = enet_host_connect(host, &address, channel_count, data); if (peer == NULL) { return luaL_error(l, "Failed to create peer"); } push_peer(l, peer); return 1; } static int host_flush(lua_State *l) { ENetHost *host = check_host(l, 1); if (!host) { return luaL_error(l, "Tried to index a nil host!"); } enet_host_flush(host); return 0; } static int host_broadcast(lua_State *l) { ENetHost *host = check_host(l, 1); if (!host) { return luaL_error(l, "Tried to index a nil host!"); } enet_uint8 channel_id; ENetPacket *packet = read_packet(l, 2, &channel_id); enet_host_broadcast(host, channel_id, packet); return 0; } // Args: limit:number static int host_channel_limit(lua_State *l) { ENetHost *host = check_host(l, 1); if (!host) { return luaL_error(l, "Tried to index a nil host!"); } int limit = (int) luaL_checknumber(l, 2); enet_host_channel_limit(host, limit); return 0; } static int host_bandwidth_limit(lua_State *l) { ENetHost *host = check_host(l, 1); if (!host) { return luaL_error(l, "Tried to index a nil host!"); } enet_uint32 in_bandwidth = (int) luaL_checknumber(l, 2); enet_uint32 out_bandwidth = (int) luaL_checknumber(l, 2); enet_host_bandwidth_limit(host, in_bandwidth, out_bandwidth); return 0; } static int host_get_socket_address(lua_State *l) { ENetHost *host = check_host(l, 1); if (!host) { return luaL_error(l, "Tried to index a nil host!"); } ENetAddress address; enet_socket_get_address (host->socket, &address); lua_pushfstring(l, "%d.%d.%d.%d:%d", ((address.host) & 0xFF), ((address.host >> 8) & 0xFF), ((address.host >> 16) & 0xFF), (address.host >> 24& 0xFF), address.port); return 1; } static int host_total_sent_data(lua_State *l) { ENetHost *host = check_host(l, 1); if (!host) { return luaL_error(l, "Tried to index a nil host!"); } lua_pushinteger (l, host->totalSentData); return 1; } static int host_total_received_data(lua_State *l) { ENetHost *host = check_host(l, 1); if (!host) { return luaL_error(l, "Tried to index a nil host!"); } lua_pushinteger (l, host->totalReceivedData); return 1; } static int host_service_time(lua_State *l) { ENetHost *host = check_host(l, 1); if (!host) { return luaL_error(l, "Tried to index a nil host!"); } lua_pushinteger (l, host->serviceTime); return 1; } static int host_peer_count(lua_State *l) { ENetHost *host = check_host(l, 1); if (!host) { return luaL_error(l, "Tried to index a nil host!"); } lua_pushinteger (l, host->peerCount); return 1; } static int host_get_peer(lua_State *l) { ENetHost *host = check_host(l, 1); if (!host) { return luaL_error(l, "Tried to index a nil host!"); } int peer_index = (int) luaL_checknumber(l, 2) - 1; if (peer_index < 0 || ((size_t) peer_index) >= host->peerCount) { luaL_argerror (l, 2, "Invalid peer index"); } ENetPeer *peer = &(host->peers[peer_index]); push_peer (l, peer); return 1; } static int host_gc(lua_State *l) { // We have to manually grab the userdata so that we can set it to NULL. ENetHost** host = (ENetHost**)luaL_checkudata(l, 1, "enet_host"); // We don't want to crash by destroying a non-existant host. if (*host) { enet_host_destroy(*host); } *host = NULL; return 0; } static int peer_tostring(lua_State *l) { ENetPeer *peer = check_peer(l, 1); char host_str[128]; enet_address_get_host_ip(&peer->address, host_str, 128); lua_pushstring(l, host_str); lua_pushstring(l, ":"); lua_pushinteger(l, peer->address.port); lua_concat(l, 3); return 1; } static int peer_ping(lua_State *l) { ENetPeer *peer = check_peer(l, 1); enet_peer_ping(peer); return 0; } static int peer_throttle_configure(lua_State *l) { ENetPeer *peer = check_peer(l, 1); enet_uint32 interval = (int) luaL_checknumber(l, 2); enet_uint32 acceleration = (int) luaL_checknumber(l, 3); enet_uint32 deceleration = (int) luaL_checknumber(l, 4); enet_peer_throttle_configure(peer, interval, acceleration, deceleration); return 0; } static int peer_round_trip_time(lua_State *l) { ENetPeer *peer = check_peer(l, 1); if (lua_gettop(l) > 1) { enet_uint32 round_trip_time = (int) luaL_checknumber(l, 2); peer->roundTripTime = round_trip_time; } lua_pushinteger (l, peer->roundTripTime); return 1; } static int peer_last_round_trip_time(lua_State *l) { ENetPeer *peer = check_peer(l, 1); if (lua_gettop(l) > 1) { enet_uint32 round_trip_time = (int) luaL_checknumber(l, 2); peer->lastRoundTripTime = round_trip_time; } lua_pushinteger (l, peer->lastRoundTripTime); return 1; } static int peer_ping_interval(lua_State *l) { ENetPeer *peer = check_peer(l, 1); if (lua_gettop(l) > 1) { enet_uint32 interval = (int) luaL_checknumber(l, 2); enet_peer_ping_interval (peer, interval); } lua_pushinteger (l, peer->pingInterval); return 1; } static int peer_timeout(lua_State *l) { ENetPeer *peer = check_peer(l, 1); enet_uint32 timeout_limit = 0; enet_uint32 timeout_minimum = 0; enet_uint32 timeout_maximum = 0; switch (lua_gettop(l)) { case 4: if (!lua_isnil(l, 4)) timeout_maximum = (int) luaL_checknumber(l, 4); case 3: if (!lua_isnil(l, 3)) timeout_minimum = (int) luaL_checknumber(l, 3); case 2: if (!lua_isnil(l, 2)) timeout_limit = (int) luaL_checknumber(l, 2); } enet_peer_timeout (peer, timeout_limit, timeout_minimum, timeout_maximum); lua_pushinteger (l, peer->timeoutLimit); lua_pushinteger (l, peer->timeoutMinimum); lua_pushinteger (l, peer->timeoutMaximum); return 3; } static int peer_disconnect(lua_State *l) { ENetPeer *peer = check_peer(l, 1); enet_uint32 data = lua_gettop(l) > 1 ? (int) luaL_checknumber(l, 2) : 0; enet_peer_disconnect(peer, data); return 0; } static int peer_disconnect_now(lua_State *l) { ENetPeer *peer = check_peer(l, 1); enet_uint32 data = lua_gettop(l) > 1 ? (int) luaL_checknumber(l, 2) : 0; enet_peer_disconnect_now(peer, data); return 0; } static int peer_disconnect_later(lua_State *l) { ENetPeer *peer = check_peer(l, 1); enet_uint32 data = lua_gettop(l) > 1 ? (int) luaL_checknumber(l, 2) : 0; enet_peer_disconnect_later(peer, data); return 0; } static int peer_index(lua_State *l) { ENetPeer *peer = check_peer(l, 1); size_t peer_index = find_peer_index (l, peer->host, peer); lua_pushinteger (l, peer_index + 1); return 1; } static int peer_state(lua_State *l) { ENetPeer *peer = check_peer(l, 1); switch (peer->state) { case (ENET_PEER_STATE_DISCONNECTED): lua_pushstring (l, "disconnected"); break; case (ENET_PEER_STATE_CONNECTING): lua_pushstring (l, "connecting"); break; case (ENET_PEER_STATE_ACKNOWLEDGING_CONNECT): lua_pushstring (l, "acknowledging_connect"); break; case (ENET_PEER_STATE_CONNECTION_PENDING): lua_pushstring (l, "connection_pending"); break; case (ENET_PEER_STATE_CONNECTION_SUCCEEDED): lua_pushstring (l, "connection_succeeded"); break; case (ENET_PEER_STATE_CONNECTED): lua_pushstring (l, "connected"); break; case (ENET_PEER_STATE_DISCONNECT_LATER): lua_pushstring (l, "disconnect_later"); break; case (ENET_PEER_STATE_DISCONNECTING): lua_pushstring (l, "disconnecting"); break; case (ENET_PEER_STATE_ACKNOWLEDGING_DISCONNECT): lua_pushstring (l, "acknowledging_disconnect"); break; case (ENET_PEER_STATE_ZOMBIE): lua_pushstring (l, "zombie"); break; default: lua_pushstring (l, "unknown"); } return 1; } static int peer_connect_id(lua_State *l) { ENetPeer *peer = check_peer(l, 1); lua_pushinteger (l, peer->connectID); return 1; } static int peer_reset(lua_State *l) { ENetPeer *peer = check_peer(l, 1); enet_peer_reset(peer); return 0; } static int peer_receive(lua_State *l) { ENetPeer *peer = check_peer(l, 1); ENetPacket *packet; enet_uint8 channel_id = 0; if (lua_gettop(l) > 1) { channel_id = (int) luaL_checknumber(l, 2); } packet = enet_peer_receive(peer, &channel_id); if (packet == NULL) return 0; lua_pushlstring(l, (const char *)packet->data, packet->dataLength); lua_pushinteger(l, channel_id); enet_packet_destroy(packet); return 2; } /** * Send a lua string to a peer * Args: * packet data, string * channel id * flags ["reliable", nil] * */ static int peer_send(lua_State *l) { ENetPeer *peer = check_peer(l, 1); enet_uint8 channel_id; ENetPacket *packet = read_packet(l, 2, &channel_id); // printf("sending, channel_id=%d\n", channel_id); int ret = enet_peer_send(peer, channel_id, packet); if (ret < 0) { enet_packet_destroy(packet); } lua_pushinteger(l, ret); return 1; } static const struct luaL_Reg enet_funcs [] = { {"host_create", host_create}, {"linked_version", linked_version}, {NULL, NULL} }; static const struct luaL_Reg enet_host_funcs [] = { {"service", host_service}, {"check_events", host_check_events}, {"compress_with_range_coder", host_compress_with_range_coder}, {"connect", host_connect}, {"flush", host_flush}, {"broadcast", host_broadcast}, {"channel_limit", host_channel_limit}, {"bandwidth_limit", host_bandwidth_limit}, // Since ENetSocket isn't part of enet-lua, we should try to keep // naming conventions the same as the rest of the lib. {"get_socket_address", host_get_socket_address}, // We need this function to free up our ports when needed! {"destroy", host_gc}, // additional convenience functions (mostly accessors) {"total_sent_data", host_total_sent_data}, {"total_received_data", host_total_received_data}, {"service_time", host_service_time}, {"peer_count", host_peer_count}, {"get_peer", host_get_peer}, {NULL, NULL} }; static const struct luaL_Reg enet_peer_funcs [] = { {"disconnect", peer_disconnect}, {"disconnect_now", peer_disconnect_now}, {"disconnect_later", peer_disconnect_later}, {"reset", peer_reset}, {"ping", peer_ping}, {"receive", peer_receive}, {"send", peer_send}, {"throttle_configure", peer_throttle_configure}, {"ping_interval", peer_ping_interval}, {"timeout", peer_timeout}, // additional convenience functions to member variables {"index", peer_index}, {"state", peer_state}, {"connect_id", peer_connect_id}, {"round_trip_time", peer_round_trip_time}, {"last_round_trip_time", peer_last_round_trip_time}, {NULL, NULL} }; extern "C" { void luax_register(lua_State *L, const char *name, const luaL_Reg *l); } int luaopen_enet(lua_State *l) { enet_initialize(); atexit(enet_deinitialize); // create metatables luaL_newmetatable(l, "enet_host"); lua_newtable(l); // index luax_register(l, NULL, enet_host_funcs); lua_setfield(l, -2, "__index"); lua_pushcfunction(l, host_gc); lua_setfield(l, -2, "__gc"); luaL_newmetatable(l, "enet_peer"); lua_newtable(l); luax_register(l, NULL, enet_peer_funcs); lua_setfield(l, -2, "__index"); lua_pushcfunction(l, peer_tostring); lua_setfield(l, -2, "__tostring"); // set up peer table lua_newtable(l); lua_newtable(l); // metatable lua_pushstring(l, "v"); lua_setfield(l, -2, "__mode"); lua_setmetatable(l, -2); lua_setfield(l, LUA_REGISTRYINDEX, "enet_peers"); luax_register(l, nullptr, enet_funcs); // return the enet table created with luaL_register return 1; } ================================================ FILE: src/libraries/enet/libenet/ChangeLog ================================================ * use getaddrinfo and getnameinfo where available ENet 1.3.13 (April 30, 2015): * miscellaneous bug fixes * added premake and cmake support * miscellaneous documentation cleanups ENet 1.3.12 (April 24, 2014): * added maximumPacketSize and maximumWaitingData fields to ENetHost to limit the amount of data waiting to be delivered on a peer (beware that the default maximumPacketSize is 32MB and should be set higher if desired as should maximumWaitingData) ENet 1.3.11 (December 26, 2013): * allow an ENetHost to connect to itself * fixed possible bug with disconnect notifications during connect attempts * fixed some preprocessor definition bugs ENet 1.3.10 (October 23, 2013); * doubled maximum reliable window size * fixed RCVTIMEO/SNDTIMEO socket options and also added NODELAY ENet 1.3.9 (August 19, 2013): * added duplicatePeers option to ENetHost which can limit the number of peers from duplicate IPs * added enet_socket_get_option() and ENET_SOCKOPT_ERROR * added enet_host_random_seed() platform stub ENet 1.3.8 (June 2, 2013): * added enet_linked_version() for checking the linked version * added enet_socket_get_address() for querying the local address of a socket * silenced some debugging prints unless ENET_DEBUG is defined during compilation * handle EINTR in enet_socket_wait() so that enet_host_service() doesn't propagate errors from signals * optimized enet_host_bandwidth_throttle() to be less expensive for large numbers of peers ENet 1.3.7 (March 6, 2013): * added ENET_PACKET_FLAG_SENT to indicate that a packet is being freed because it has been sent * added userData field to ENetPacket * changed how random seed is generated on Windows to avoid import warnings * fixed case where disconnects could be generated with no preceding connect event ENet 1.3.6 (December 11, 2012): * added support for intercept callback in ENetHost that can be used to process raw packets before ENet * added enet_socket_shutdown() for issuing shutdown on a socket * fixed enet_socket_connect() to not error on non-blocking connects * fixed bug in MTU negotiation during connections ENet 1.3.5 (July 31, 2012): * fixed bug in unreliable packet fragment queuing ENet 1.3.4 (May 29, 2012): * added enet_peer_ping_interval() for configuring per-peer ping intervals * added enet_peer_timeout() for configuring per-peer timeouts * added protocol packet size limits ENet 1.3.3 (June 28, 2011): * fixed bug with simultaneous disconnects not dispatching events ENet 1.3.2 (May 31, 2011): * added support for unreliable packet fragmenting via the packet flag ENET_PACKET_FLAG_UNRELIABLE_FRAGMENT * fixed regression in unreliable packet queuing * added check against received port to limit some forms of IP-spoofing ENet 1.3.1 (February 10, 2011): * fixed bug in tracking of reliable data in transit * reliable data window size now scales with the throttle * fixed bug in fragment length calculation when checksums are used ENet 1.3.0 (June 5, 2010): * enet_host_create() now requires the channel limit to be specified as a parameter * enet_host_connect() now accepts a data parameter which is supplied to the receiving receiving host in the event data field for a connect event * added an adaptive order-2 PPM range coder as a built-in compressor option which can be set with enet_host_compress_with_range_coder() * added support for packet compression configurable with a callback * improved session number handling to not rely on the packet checksum field, saving 4 bytes per packet unless the checksum option is used * removed the dependence on the rand callback for session number handling Caveats: This version is not protocol compatible with the 1.2 series or earlier. The enet_host_connect and enet_host_create API functions require supplying additional parameters. ENet 1.2.5 (June 28, 2011): * fixed bug with simultaneous disconnects not dispatching events ENet 1.2.4 (May 31, 2011): * fixed regression in unreliable packet queuing * added check against received port to limit some forms of IP-spoofing ENet 1.2.3 (February 10, 2011): * fixed bug in tracking reliable data in transit ENet 1.2.2 (June 5, 2010): * checksum functionality is now enabled by setting a checksum callback inside ENetHost instead of being a configure script option * added totalSentData, totalSentPackets, totalReceivedData, and totalReceivedPackets counters inside ENetHost for getting usage statistics * added enet_host_channel_limit() for limiting the maximum number of channels allowed by connected peers * now uses dispatch queues for event dispatch rather than potentially unscalable array walking * added no_memory callback that is called when a malloc attempt fails, such that if no_memory returns rather than aborts (the default behavior), then the error is propagated to the return value of the API calls * now uses packed attribute for protocol structures on platforms with strange alignment rules * improved autoconf build system contributed by Nathan Brink allowing for easier building as a shared library Caveats: If you were using the compile-time option that enabled checksums, make sure to set the checksum callback inside ENetHost to enet_crc32 to regain the old behavior. The ENetCallbacks structure has added new fields, so make sure to clear the structure to zero before use if using enet_initialize_with_callbacks(). ENet 1.2.1 (November 12, 2009): * fixed bug that could cause disconnect events to be dropped * added thin wrapper around select() for portable usage * added ENET_SOCKOPT_REUSEADDR socket option * factored enet_socket_bind()/enet_socket_listen() out of enet_socket_create() * added contributed Code::Blocks build file ENet 1.2 (February 12, 2008): * fixed bug in VERIFY_CONNECT acknowledgement that could cause connect attempts to occasionally timeout * fixed acknowledgements to check both the outgoing and sent queues when removing acknowledged packets * fixed accidental bit rot in the MSVC project file * revised sequence number overflow handling to address some possible disconnect bugs * added enet_host_check_events() for getting only local queued events * factored out socket option setting into enet_socket_set_option() so that socket options are now set separately from enet_socket_create() Caveats: While this release is superficially protocol compatible with 1.1, differences in the sequence number overflow handling can potentially cause random disconnects. ENet 1.1 (June 6, 2007): * optional CRC32 just in case someone needs a stronger checksum than UDP provides (--enable-crc32 configure option) * the size of packet headers are half the size they used to be (so less overhead when sending small packets) * enet_peer_disconnect_later() that waits till all queued outgoing packets get sent before issuing an actual disconnect * freeCallback field in individual packets for notification of when a packet is about to be freed * ENET_PACKET_FLAG_NO_ALLOCATE for supplying pre-allocated data to a packet (can be used in concert with freeCallback to support some custom allocation schemes that the normal memory allocation callbacks would normally not allow) * enet_address_get_host_ip() for printing address numbers * promoted the enet_socket_*() functions to be part of the API now * a few stability/crash fixes ================================================ FILE: src/libraries/enet/libenet/LICENSE ================================================ Copyright (c) 2002-2016 Lee Salzman Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: src/libraries/enet/libenet/README ================================================ Please visit the ENet homepage at http://enet.bespin.org for installation and usage instructions. If you obtained this package from github, the quick description on how to build is: # Generate the build system. autoreconf -vfi # Compile and install the library. ./configure && make && make install ================================================ FILE: src/libraries/enet/libenet/callbacks.c ================================================ /** @file callbacks.c @brief ENet callback functions */ #define ENET_BUILDING_LIB 1 #include "enet/enet.h" static ENetCallbacks callbacks = { malloc, free, abort }; int enet_initialize_with_callbacks (ENetVersion version, const ENetCallbacks * inits) { if (version < ENET_VERSION_CREATE (1, 3, 0)) return -1; if (inits -> malloc != NULL || inits -> free != NULL) { if (inits -> malloc == NULL || inits -> free == NULL) return -1; callbacks.malloc = inits -> malloc; callbacks.free = inits -> free; } if (inits -> no_memory != NULL) callbacks.no_memory = inits -> no_memory; return enet_initialize (); } ENetVersion enet_linked_version (void) { return ENET_VERSION; } void * enet_malloc (size_t size) { void * memory = callbacks.malloc (size); if (memory == NULL) callbacks.no_memory (); return memory; } void enet_free (void * memory) { callbacks.free (memory); } ================================================ FILE: src/libraries/enet/libenet/compress.c ================================================ /** @file compress.c @brief An adaptive order-2 PPM range coder */ #define ENET_BUILDING_LIB 1 #include #include "enet/enet.h" typedef struct _ENetSymbol { /* binary indexed tree of symbols */ enet_uint8 value; enet_uint8 count; enet_uint16 under; enet_uint16 left, right; /* context defined by this symbol */ enet_uint16 symbols; enet_uint16 escapes; enet_uint16 total; enet_uint16 parent; } ENetSymbol; /* adaptation constants tuned aggressively for small packet sizes rather than large file compression */ enum { ENET_RANGE_CODER_TOP = 1<<24, ENET_RANGE_CODER_BOTTOM = 1<<16, ENET_CONTEXT_SYMBOL_DELTA = 3, ENET_CONTEXT_SYMBOL_MINIMUM = 1, ENET_CONTEXT_ESCAPE_MINIMUM = 1, ENET_SUBCONTEXT_ORDER = 2, ENET_SUBCONTEXT_SYMBOL_DELTA = 2, ENET_SUBCONTEXT_ESCAPE_DELTA = 5 }; /* context exclusion roughly halves compression speed, so disable for now */ #undef ENET_CONTEXT_EXCLUSION typedef struct _ENetRangeCoder { /* only allocate enough symbols for reasonable MTUs, would need to be larger for large file compression */ ENetSymbol symbols[4096]; } ENetRangeCoder; void * enet_range_coder_create (void) { ENetRangeCoder * rangeCoder = (ENetRangeCoder *) enet_malloc (sizeof (ENetRangeCoder)); if (rangeCoder == NULL) return NULL; return rangeCoder; } void enet_range_coder_destroy (void * context) { ENetRangeCoder * rangeCoder = (ENetRangeCoder *) context; if (rangeCoder == NULL) return; enet_free (rangeCoder); } #define ENET_SYMBOL_CREATE(symbol, value_, count_) \ { \ symbol = & rangeCoder -> symbols [nextSymbol ++]; \ symbol -> value = value_; \ symbol -> count = count_; \ symbol -> under = count_; \ symbol -> left = 0; \ symbol -> right = 0; \ symbol -> symbols = 0; \ symbol -> escapes = 0; \ symbol -> total = 0; \ symbol -> parent = 0; \ } #define ENET_CONTEXT_CREATE(context, escapes_, minimum) \ { \ ENET_SYMBOL_CREATE (context, 0, 0); \ (context) -> escapes = escapes_; \ (context) -> total = escapes_ + 256*minimum; \ (context) -> symbols = 0; \ } static enet_uint16 enet_symbol_rescale (ENetSymbol * symbol) { enet_uint16 total = 0; for (;;) { symbol -> count -= symbol->count >> 1; symbol -> under = symbol -> count; if (symbol -> left) symbol -> under += enet_symbol_rescale (symbol + symbol -> left); total += symbol -> under; if (! symbol -> right) break; symbol += symbol -> right; } return total; } #define ENET_CONTEXT_RESCALE(context, minimum) \ { \ (context) -> total = (context) -> symbols ? enet_symbol_rescale ((context) + (context) -> symbols) : 0; \ (context) -> escapes -= (context) -> escapes >> 1; \ (context) -> total += (context) -> escapes + 256*minimum; \ } #define ENET_RANGE_CODER_OUTPUT(value) \ { \ if (outData >= outEnd) \ return 0; \ * outData ++ = value; \ } #define ENET_RANGE_CODER_ENCODE(under, count, total) \ { \ encodeRange /= (total); \ encodeLow += (under) * encodeRange; \ encodeRange *= (count); \ for (;;) \ { \ if((encodeLow ^ (encodeLow + encodeRange)) >= ENET_RANGE_CODER_TOP) \ { \ if(encodeRange >= ENET_RANGE_CODER_BOTTOM) break; \ encodeRange = -encodeLow & (ENET_RANGE_CODER_BOTTOM - 1); \ } \ ENET_RANGE_CODER_OUTPUT (encodeLow >> 24); \ encodeRange <<= 8; \ encodeLow <<= 8; \ } \ } #define ENET_RANGE_CODER_FLUSH \ { \ while (encodeLow) \ { \ ENET_RANGE_CODER_OUTPUT (encodeLow >> 24); \ encodeLow <<= 8; \ } \ } #define ENET_RANGE_CODER_FREE_SYMBOLS \ { \ if (nextSymbol >= sizeof (rangeCoder -> symbols) / sizeof (ENetSymbol) - ENET_SUBCONTEXT_ORDER ) \ { \ nextSymbol = 0; \ ENET_CONTEXT_CREATE (root, ENET_CONTEXT_ESCAPE_MINIMUM, ENET_CONTEXT_SYMBOL_MINIMUM); \ predicted = 0; \ order = 0; \ } \ } #define ENET_CONTEXT_ENCODE(context, symbol_, value_, under_, count_, update, minimum) \ { \ under_ = value*minimum; \ count_ = minimum; \ if (! (context) -> symbols) \ { \ ENET_SYMBOL_CREATE (symbol_, value_, update); \ (context) -> symbols = symbol_ - (context); \ } \ else \ { \ ENetSymbol * node = (context) + (context) -> symbols; \ for (;;) \ { \ if (value_ < node -> value) \ { \ node -> under += update; \ if (node -> left) { node += node -> left; continue; } \ ENET_SYMBOL_CREATE (symbol_, value_, update); \ node -> left = symbol_ - node; \ } \ else \ if (value_ > node -> value) \ { \ under_ += node -> under; \ if (node -> right) { node += node -> right; continue; } \ ENET_SYMBOL_CREATE (symbol_, value_, update); \ node -> right = symbol_ - node; \ } \ else \ { \ count_ += node -> count; \ under_ += node -> under - node -> count; \ node -> under += update; \ node -> count += update; \ symbol_ = node; \ } \ break; \ } \ } \ } #ifdef ENET_CONTEXT_EXCLUSION static const ENetSymbol emptyContext = { 0, 0, 0, 0, 0, 0, 0, 0, 0 }; #define ENET_CONTEXT_WALK(context, body) \ { \ const ENetSymbol * node = (context) + (context) -> symbols; \ const ENetSymbol * stack [256]; \ size_t stackSize = 0; \ while (node -> left) \ { \ stack [stackSize ++] = node; \ node += node -> left; \ } \ for (;;) \ { \ body; \ if (node -> right) \ { \ node += node -> right; \ while (node -> left) \ { \ stack [stackSize ++] = node; \ node += node -> left; \ } \ } \ else \ if (stackSize <= 0) \ break; \ else \ node = stack [-- stackSize]; \ } \ } #define ENET_CONTEXT_ENCODE_EXCLUDE(context, value_, under, total, minimum) \ ENET_CONTEXT_WALK(context, { \ if (node -> value != value_) \ { \ enet_uint16 parentCount = rangeCoder -> symbols [node -> parent].count + minimum; \ if (node -> value < value_) \ under -= parentCount; \ total -= parentCount; \ } \ }) #endif size_t enet_range_coder_compress (void * context, const ENetBuffer * inBuffers, size_t inBufferCount, size_t inLimit, enet_uint8 * outData, size_t outLimit) { ENetRangeCoder * rangeCoder = (ENetRangeCoder *) context; enet_uint8 * outStart = outData, * outEnd = & outData [outLimit]; const enet_uint8 * inData, * inEnd; enet_uint32 encodeLow = 0, encodeRange = ~0; ENetSymbol * root; enet_uint16 predicted = 0; size_t order = 0, nextSymbol = 0; if (rangeCoder == NULL || inBufferCount <= 0 || inLimit <= 0) return 0; inData = (const enet_uint8 *) inBuffers -> data; inEnd = & inData [inBuffers -> dataLength]; inBuffers ++; inBufferCount --; ENET_CONTEXT_CREATE (root, ENET_CONTEXT_ESCAPE_MINIMUM, ENET_CONTEXT_SYMBOL_MINIMUM); for (;;) { ENetSymbol * subcontext, * symbol; #ifdef ENET_CONTEXT_EXCLUSION const ENetSymbol * childContext = & emptyContext; #endif enet_uint8 value; enet_uint16 count, under, * parent = & predicted, total; if (inData >= inEnd) { if (inBufferCount <= 0) break; inData = (const enet_uint8 *) inBuffers -> data; inEnd = & inData [inBuffers -> dataLength]; inBuffers ++; inBufferCount --; } value = * inData ++; for (subcontext = & rangeCoder -> symbols [predicted]; subcontext != root; #ifdef ENET_CONTEXT_EXCLUSION childContext = subcontext, #endif subcontext = & rangeCoder -> symbols [subcontext -> parent]) { ENET_CONTEXT_ENCODE (subcontext, symbol, value, under, count, ENET_SUBCONTEXT_SYMBOL_DELTA, 0); * parent = symbol - rangeCoder -> symbols; parent = & symbol -> parent; total = subcontext -> total; #ifdef ENET_CONTEXT_EXCLUSION if (childContext -> total > ENET_SUBCONTEXT_SYMBOL_DELTA + ENET_SUBCONTEXT_ESCAPE_DELTA) ENET_CONTEXT_ENCODE_EXCLUDE (childContext, value, under, total, 0); #endif if (count > 0) { ENET_RANGE_CODER_ENCODE (subcontext -> escapes + under, count, total); } else { if (subcontext -> escapes > 0 && subcontext -> escapes < total) ENET_RANGE_CODER_ENCODE (0, subcontext -> escapes, total); subcontext -> escapes += ENET_SUBCONTEXT_ESCAPE_DELTA; subcontext -> total += ENET_SUBCONTEXT_ESCAPE_DELTA; } subcontext -> total += ENET_SUBCONTEXT_SYMBOL_DELTA; if (count > 0xFF - 2*ENET_SUBCONTEXT_SYMBOL_DELTA || subcontext -> total > ENET_RANGE_CODER_BOTTOM - 0x100) ENET_CONTEXT_RESCALE (subcontext, 0); if (count > 0) goto nextInput; } ENET_CONTEXT_ENCODE (root, symbol, value, under, count, ENET_CONTEXT_SYMBOL_DELTA, ENET_CONTEXT_SYMBOL_MINIMUM); * parent = symbol - rangeCoder -> symbols; parent = & symbol -> parent; total = root -> total; #ifdef ENET_CONTEXT_EXCLUSION if (childContext -> total > ENET_SUBCONTEXT_SYMBOL_DELTA + ENET_SUBCONTEXT_ESCAPE_DELTA) ENET_CONTEXT_ENCODE_EXCLUDE (childContext, value, under, total, ENET_CONTEXT_SYMBOL_MINIMUM); #endif ENET_RANGE_CODER_ENCODE (root -> escapes + under, count, total); root -> total += ENET_CONTEXT_SYMBOL_DELTA; if (count > 0xFF - 2*ENET_CONTEXT_SYMBOL_DELTA + ENET_CONTEXT_SYMBOL_MINIMUM || root -> total > ENET_RANGE_CODER_BOTTOM - 0x100) ENET_CONTEXT_RESCALE (root, ENET_CONTEXT_SYMBOL_MINIMUM); nextInput: if (order >= ENET_SUBCONTEXT_ORDER) predicted = rangeCoder -> symbols [predicted].parent; else order ++; ENET_RANGE_CODER_FREE_SYMBOLS; } ENET_RANGE_CODER_FLUSH; return (size_t) (outData - outStart); } #define ENET_RANGE_CODER_SEED \ { \ if (inData < inEnd) decodeCode |= * inData ++ << 24; \ if (inData < inEnd) decodeCode |= * inData ++ << 16; \ if (inData < inEnd) decodeCode |= * inData ++ << 8; \ if (inData < inEnd) decodeCode |= * inData ++; \ } #define ENET_RANGE_CODER_READ(total) ((decodeCode - decodeLow) / (decodeRange /= (total))) #define ENET_RANGE_CODER_DECODE(under, count, total) \ { \ decodeLow += (under) * decodeRange; \ decodeRange *= (count); \ for (;;) \ { \ if((decodeLow ^ (decodeLow + decodeRange)) >= ENET_RANGE_CODER_TOP) \ { \ if(decodeRange >= ENET_RANGE_CODER_BOTTOM) break; \ decodeRange = -decodeLow & (ENET_RANGE_CODER_BOTTOM - 1); \ } \ decodeCode <<= 8; \ if (inData < inEnd) \ decodeCode |= * inData ++; \ decodeRange <<= 8; \ decodeLow <<= 8; \ } \ } #define ENET_CONTEXT_DECODE(context, symbol_, code, value_, under_, count_, update, minimum, createRoot, visitNode, createRight, createLeft) \ { \ under_ = 0; \ count_ = minimum; \ if (! (context) -> symbols) \ { \ createRoot; \ } \ else \ { \ ENetSymbol * node = (context) + (context) -> symbols; \ for (;;) \ { \ enet_uint16 after = under_ + node -> under + (node -> value + 1)*minimum, before = node -> count + minimum; \ visitNode; \ if (code >= after) \ { \ under_ += node -> under; \ if (node -> right) { node += node -> right; continue; } \ createRight; \ } \ else \ if (code < after - before) \ { \ node -> under += update; \ if (node -> left) { node += node -> left; continue; } \ createLeft; \ } \ else \ { \ value_ = node -> value; \ count_ += node -> count; \ under_ = after - before; \ node -> under += update; \ node -> count += update; \ symbol_ = node; \ } \ break; \ } \ } \ } #define ENET_CONTEXT_TRY_DECODE(context, symbol_, code, value_, under_, count_, update, minimum, exclude) \ ENET_CONTEXT_DECODE (context, symbol_, code, value_, under_, count_, update, minimum, return 0, exclude (node -> value, after, before), return 0, return 0) #define ENET_CONTEXT_ROOT_DECODE(context, symbol_, code, value_, under_, count_, update, minimum, exclude) \ ENET_CONTEXT_DECODE (context, symbol_, code, value_, under_, count_, update, minimum, \ { \ value_ = code / minimum; \ under_ = code - code%minimum; \ ENET_SYMBOL_CREATE (symbol_, value_, update); \ (context) -> symbols = symbol_ - (context); \ }, \ exclude (node -> value, after, before), \ { \ value_ = node->value + 1 + (code - after)/minimum; \ under_ = code - (code - after)%minimum; \ ENET_SYMBOL_CREATE (symbol_, value_, update); \ node -> right = symbol_ - node; \ }, \ { \ value_ = node->value - 1 - (after - before - code - 1)/minimum; \ under_ = code - (after - before - code - 1)%minimum; \ ENET_SYMBOL_CREATE (symbol_, value_, update); \ node -> left = symbol_ - node; \ }) \ #ifdef ENET_CONTEXT_EXCLUSION typedef struct _ENetExclude { enet_uint8 value; enet_uint16 under; } ENetExclude; #define ENET_CONTEXT_DECODE_EXCLUDE(context, total, minimum) \ { \ enet_uint16 under = 0; \ nextExclude = excludes; \ ENET_CONTEXT_WALK (context, { \ under += rangeCoder -> symbols [node -> parent].count + minimum; \ nextExclude -> value = node -> value; \ nextExclude -> under = under; \ nextExclude ++; \ }); \ total -= under; \ } #define ENET_CONTEXT_EXCLUDED(value_, after, before) \ { \ size_t low = 0, high = nextExclude - excludes; \ for(;;) \ { \ size_t mid = (low + high) >> 1; \ const ENetExclude * exclude = & excludes [mid]; \ if (value_ < exclude -> value) \ { \ if (low + 1 < high) \ { \ high = mid; \ continue; \ } \ if (exclude > excludes) \ after -= exclude [-1].under; \ } \ else \ { \ if (value_ > exclude -> value) \ { \ if (low + 1 < high) \ { \ low = mid; \ continue; \ } \ } \ else \ before = 0; \ after -= exclude -> under; \ } \ break; \ } \ } #endif #define ENET_CONTEXT_NOT_EXCLUDED(value_, after, before) size_t enet_range_coder_decompress (void * context, const enet_uint8 * inData, size_t inLimit, enet_uint8 * outData, size_t outLimit) { ENetRangeCoder * rangeCoder = (ENetRangeCoder *) context; enet_uint8 * outStart = outData, * outEnd = & outData [outLimit]; const enet_uint8 * inEnd = & inData [inLimit]; enet_uint32 decodeLow = 0, decodeCode = 0, decodeRange = ~0; ENetSymbol * root; enet_uint16 predicted = 0; size_t order = 0, nextSymbol = 0; #ifdef ENET_CONTEXT_EXCLUSION ENetExclude excludes [256]; ENetExclude * nextExclude = excludes; #endif if (rangeCoder == NULL || inLimit <= 0) return 0; ENET_CONTEXT_CREATE (root, ENET_CONTEXT_ESCAPE_MINIMUM, ENET_CONTEXT_SYMBOL_MINIMUM); ENET_RANGE_CODER_SEED; for (;;) { ENetSymbol * subcontext, * symbol, * patch; #ifdef ENET_CONTEXT_EXCLUSION const ENetSymbol * childContext = & emptyContext; #endif enet_uint8 value = 0; enet_uint16 code, under, count, bottom, * parent = & predicted, total; for (subcontext = & rangeCoder -> symbols [predicted]; subcontext != root; #ifdef ENET_CONTEXT_EXCLUSION childContext = subcontext, #endif subcontext = & rangeCoder -> symbols [subcontext -> parent]) { if (subcontext -> escapes <= 0) continue; total = subcontext -> total; #ifdef ENET_CONTEXT_EXCLUSION if (childContext -> total > 0) ENET_CONTEXT_DECODE_EXCLUDE (childContext, total, 0); #endif if (subcontext -> escapes >= total) continue; code = ENET_RANGE_CODER_READ (total); if (code < subcontext -> escapes) { ENET_RANGE_CODER_DECODE (0, subcontext -> escapes, total); continue; } code -= subcontext -> escapes; #ifdef ENET_CONTEXT_EXCLUSION if (childContext -> total > 0) { ENET_CONTEXT_TRY_DECODE (subcontext, symbol, code, value, under, count, ENET_SUBCONTEXT_SYMBOL_DELTA, 0, ENET_CONTEXT_EXCLUDED); } else #endif { ENET_CONTEXT_TRY_DECODE (subcontext, symbol, code, value, under, count, ENET_SUBCONTEXT_SYMBOL_DELTA, 0, ENET_CONTEXT_NOT_EXCLUDED); } bottom = symbol - rangeCoder -> symbols; ENET_RANGE_CODER_DECODE (subcontext -> escapes + under, count, total); subcontext -> total += ENET_SUBCONTEXT_SYMBOL_DELTA; if (count > 0xFF - 2*ENET_SUBCONTEXT_SYMBOL_DELTA || subcontext -> total > ENET_RANGE_CODER_BOTTOM - 0x100) ENET_CONTEXT_RESCALE (subcontext, 0); goto patchContexts; } total = root -> total; #ifdef ENET_CONTEXT_EXCLUSION if (childContext -> total > 0) ENET_CONTEXT_DECODE_EXCLUDE (childContext, total, ENET_CONTEXT_SYMBOL_MINIMUM); #endif code = ENET_RANGE_CODER_READ (total); if (code < root -> escapes) { ENET_RANGE_CODER_DECODE (0, root -> escapes, total); break; } code -= root -> escapes; #ifdef ENET_CONTEXT_EXCLUSION if (childContext -> total > 0) { ENET_CONTEXT_ROOT_DECODE (root, symbol, code, value, under, count, ENET_CONTEXT_SYMBOL_DELTA, ENET_CONTEXT_SYMBOL_MINIMUM, ENET_CONTEXT_EXCLUDED); } else #endif { ENET_CONTEXT_ROOT_DECODE (root, symbol, code, value, under, count, ENET_CONTEXT_SYMBOL_DELTA, ENET_CONTEXT_SYMBOL_MINIMUM, ENET_CONTEXT_NOT_EXCLUDED); } bottom = symbol - rangeCoder -> symbols; ENET_RANGE_CODER_DECODE (root -> escapes + under, count, total); root -> total += ENET_CONTEXT_SYMBOL_DELTA; if (count > 0xFF - 2*ENET_CONTEXT_SYMBOL_DELTA + ENET_CONTEXT_SYMBOL_MINIMUM || root -> total > ENET_RANGE_CODER_BOTTOM - 0x100) ENET_CONTEXT_RESCALE (root, ENET_CONTEXT_SYMBOL_MINIMUM); patchContexts: for (patch = & rangeCoder -> symbols [predicted]; patch != subcontext; patch = & rangeCoder -> symbols [patch -> parent]) { ENET_CONTEXT_ENCODE (patch, symbol, value, under, count, ENET_SUBCONTEXT_SYMBOL_DELTA, 0); * parent = symbol - rangeCoder -> symbols; parent = & symbol -> parent; if (count <= 0) { patch -> escapes += ENET_SUBCONTEXT_ESCAPE_DELTA; patch -> total += ENET_SUBCONTEXT_ESCAPE_DELTA; } patch -> total += ENET_SUBCONTEXT_SYMBOL_DELTA; if (count > 0xFF - 2*ENET_SUBCONTEXT_SYMBOL_DELTA || patch -> total > ENET_RANGE_CODER_BOTTOM - 0x100) ENET_CONTEXT_RESCALE (patch, 0); } * parent = bottom; ENET_RANGE_CODER_OUTPUT (value); if (order >= ENET_SUBCONTEXT_ORDER) predicted = rangeCoder -> symbols [predicted].parent; else order ++; ENET_RANGE_CODER_FREE_SYMBOLS; } return (size_t) (outData - outStart); } /** @defgroup host ENet host functions @{ */ /** Sets the packet compressor the host should use to the default range coder. @param host host to enable the range coder for @returns 0 on success, < 0 on failure */ int enet_host_compress_with_range_coder (ENetHost * host) { ENetCompressor compressor; memset (& compressor, 0, sizeof (compressor)); compressor.context = enet_range_coder_create(); if (compressor.context == NULL) return -1; compressor.compress = enet_range_coder_compress; compressor.decompress = enet_range_coder_decompress; compressor.destroy = enet_range_coder_destroy; enet_host_compress (host, & compressor); return 0; } /** @} */ ================================================ FILE: src/libraries/enet/libenet/host.c ================================================ /** @file host.c @brief ENet host management functions */ #define ENET_BUILDING_LIB 1 #include #include "enet/enet.h" /** @defgroup host ENet host functions @{ */ /** Creates a host for communicating to peers. @param address the address at which other peers may connect to this host. If NULL, then no peers may connect to the host. @param peerCount the maximum number of peers that should be allocated for the host. @param channelLimit the maximum number of channels allowed; if 0, then this is equivalent to ENET_PROTOCOL_MAXIMUM_CHANNEL_COUNT @param incomingBandwidth downstream bandwidth of the host in bytes/second; if 0, ENet will assume unlimited bandwidth. @param outgoingBandwidth upstream bandwidth of the host in bytes/second; if 0, ENet will assume unlimited bandwidth. @returns the host on success and NULL on failure @remarks ENet will strategically drop packets on specific sides of a connection between hosts to ensure the host's bandwidth is not overwhelmed. The bandwidth parameters also determine the window size of a connection which limits the amount of reliable packets that may be in transit at any given time. */ ENetHost * enet_host_create (const ENetAddress * address, size_t peerCount, size_t channelLimit, enet_uint32 incomingBandwidth, enet_uint32 outgoingBandwidth) { ENetHost * host; ENetPeer * currentPeer; if (peerCount > ENET_PROTOCOL_MAXIMUM_PEER_ID) return NULL; host = (ENetHost *) enet_malloc (sizeof (ENetHost)); if (host == NULL) return NULL; memset (host, 0, sizeof (ENetHost)); host -> peers = (ENetPeer *) enet_malloc (peerCount * sizeof (ENetPeer)); if (host -> peers == NULL) { enet_free (host); return NULL; } memset (host -> peers, 0, peerCount * sizeof (ENetPeer)); host -> socket = enet_socket_create (ENET_SOCKET_TYPE_DATAGRAM); if (host -> socket == ENET_SOCKET_NULL || (address != NULL && enet_socket_bind (host -> socket, address) < 0)) { if (host -> socket != ENET_SOCKET_NULL) enet_socket_destroy (host -> socket); enet_free (host -> peers); enet_free (host); return NULL; } enet_socket_set_option (host -> socket, ENET_SOCKOPT_NONBLOCK, 1); enet_socket_set_option (host -> socket, ENET_SOCKOPT_BROADCAST, 1); enet_socket_set_option (host -> socket, ENET_SOCKOPT_RCVBUF, ENET_HOST_RECEIVE_BUFFER_SIZE); enet_socket_set_option (host -> socket, ENET_SOCKOPT_SNDBUF, ENET_HOST_SEND_BUFFER_SIZE); if (address != NULL && enet_socket_get_address (host -> socket, & host -> address) < 0) host -> address = * address; if (! channelLimit || channelLimit > ENET_PROTOCOL_MAXIMUM_CHANNEL_COUNT) channelLimit = ENET_PROTOCOL_MAXIMUM_CHANNEL_COUNT; else if (channelLimit < ENET_PROTOCOL_MINIMUM_CHANNEL_COUNT) channelLimit = ENET_PROTOCOL_MINIMUM_CHANNEL_COUNT; host -> randomSeed = (enet_uint32) (size_t) host; host -> randomSeed += enet_host_random_seed (); host -> randomSeed = (host -> randomSeed << 16) | (host -> randomSeed >> 16); host -> channelLimit = channelLimit; host -> incomingBandwidth = incomingBandwidth; host -> outgoingBandwidth = outgoingBandwidth; host -> bandwidthThrottleEpoch = 0; host -> recalculateBandwidthLimits = 0; host -> mtu = ENET_HOST_DEFAULT_MTU; host -> peerCount = peerCount; host -> commandCount = 0; host -> bufferCount = 0; host -> checksum = NULL; host -> receivedAddress.host = ENET_HOST_ANY; host -> receivedAddress.port = 0; host -> receivedData = NULL; host -> receivedDataLength = 0; host -> totalSentData = 0; host -> totalSentPackets = 0; host -> totalReceivedData = 0; host -> totalReceivedPackets = 0; host -> connectedPeers = 0; host -> bandwidthLimitedPeers = 0; host -> duplicatePeers = ENET_PROTOCOL_MAXIMUM_PEER_ID; host -> maximumPacketSize = ENET_HOST_DEFAULT_MAXIMUM_PACKET_SIZE; host -> maximumWaitingData = ENET_HOST_DEFAULT_MAXIMUM_WAITING_DATA; host -> compressor.context = NULL; host -> compressor.compress = NULL; host -> compressor.decompress = NULL; host -> compressor.destroy = NULL; host -> intercept = NULL; enet_list_clear (& host -> dispatchQueue); for (currentPeer = host -> peers; currentPeer < & host -> peers [host -> peerCount]; ++ currentPeer) { currentPeer -> host = host; currentPeer -> incomingPeerID = currentPeer - host -> peers; currentPeer -> outgoingSessionID = currentPeer -> incomingSessionID = 0xFF; currentPeer -> data = NULL; enet_list_clear (& currentPeer -> acknowledgements); enet_list_clear (& currentPeer -> sentReliableCommands); enet_list_clear (& currentPeer -> sentUnreliableCommands); enet_list_clear (& currentPeer -> outgoingReliableCommands); enet_list_clear (& currentPeer -> outgoingUnreliableCommands); enet_list_clear (& currentPeer -> dispatchedCommands); enet_peer_reset (currentPeer); } return host; } /** Destroys the host and all resources associated with it. @param host pointer to the host to destroy */ void enet_host_destroy (ENetHost * host) { ENetPeer * currentPeer; if (host == NULL) return; enet_socket_destroy (host -> socket); for (currentPeer = host -> peers; currentPeer < & host -> peers [host -> peerCount]; ++ currentPeer) { enet_peer_reset (currentPeer); } if (host -> compressor.context != NULL && host -> compressor.destroy) (* host -> compressor.destroy) (host -> compressor.context); enet_free (host -> peers); enet_free (host); } /** Initiates a connection to a foreign host. @param host host seeking the connection @param address destination for the connection @param channelCount number of channels to allocate @param data user data supplied to the receiving host @returns a peer representing the foreign host on success, NULL on failure @remarks The peer returned will have not completed the connection until enet_host_service() notifies of an ENET_EVENT_TYPE_CONNECT event for the peer. */ ENetPeer * enet_host_connect (ENetHost * host, const ENetAddress * address, size_t channelCount, enet_uint32 data) { ENetPeer * currentPeer; ENetChannel * channel; ENetProtocol command; if (channelCount < ENET_PROTOCOL_MINIMUM_CHANNEL_COUNT) channelCount = ENET_PROTOCOL_MINIMUM_CHANNEL_COUNT; else if (channelCount > ENET_PROTOCOL_MAXIMUM_CHANNEL_COUNT) channelCount = ENET_PROTOCOL_MAXIMUM_CHANNEL_COUNT; for (currentPeer = host -> peers; currentPeer < & host -> peers [host -> peerCount]; ++ currentPeer) { if (currentPeer -> state == ENET_PEER_STATE_DISCONNECTED) break; } if (currentPeer >= & host -> peers [host -> peerCount]) return NULL; currentPeer -> channels = (ENetChannel *) enet_malloc (channelCount * sizeof (ENetChannel)); if (currentPeer -> channels == NULL) return NULL; currentPeer -> channelCount = channelCount; currentPeer -> state = ENET_PEER_STATE_CONNECTING; currentPeer -> address = * address; currentPeer -> connectID = ++ host -> randomSeed; if (host -> outgoingBandwidth == 0) currentPeer -> windowSize = ENET_PROTOCOL_MAXIMUM_WINDOW_SIZE; else currentPeer -> windowSize = (host -> outgoingBandwidth / ENET_PEER_WINDOW_SIZE_SCALE) * ENET_PROTOCOL_MINIMUM_WINDOW_SIZE; if (currentPeer -> windowSize < ENET_PROTOCOL_MINIMUM_WINDOW_SIZE) currentPeer -> windowSize = ENET_PROTOCOL_MINIMUM_WINDOW_SIZE; else if (currentPeer -> windowSize > ENET_PROTOCOL_MAXIMUM_WINDOW_SIZE) currentPeer -> windowSize = ENET_PROTOCOL_MAXIMUM_WINDOW_SIZE; for (channel = currentPeer -> channels; channel < & currentPeer -> channels [channelCount]; ++ channel) { channel -> outgoingReliableSequenceNumber = 0; channel -> outgoingUnreliableSequenceNumber = 0; channel -> incomingReliableSequenceNumber = 0; channel -> incomingUnreliableSequenceNumber = 0; enet_list_clear (& channel -> incomingReliableCommands); enet_list_clear (& channel -> incomingUnreliableCommands); channel -> usedReliableWindows = 0; memset (channel -> reliableWindows, 0, sizeof (channel -> reliableWindows)); } command.header.command = ENET_PROTOCOL_COMMAND_CONNECT | ENET_PROTOCOL_COMMAND_FLAG_ACKNOWLEDGE; command.header.channelID = 0xFF; command.connect.outgoingPeerID = ENET_HOST_TO_NET_16 (currentPeer -> incomingPeerID); command.connect.incomingSessionID = currentPeer -> incomingSessionID; command.connect.outgoingSessionID = currentPeer -> outgoingSessionID; command.connect.mtu = ENET_HOST_TO_NET_32 (currentPeer -> mtu); command.connect.windowSize = ENET_HOST_TO_NET_32 (currentPeer -> windowSize); command.connect.channelCount = ENET_HOST_TO_NET_32 (channelCount); command.connect.incomingBandwidth = ENET_HOST_TO_NET_32 (host -> incomingBandwidth); command.connect.outgoingBandwidth = ENET_HOST_TO_NET_32 (host -> outgoingBandwidth); command.connect.packetThrottleInterval = ENET_HOST_TO_NET_32 (currentPeer -> packetThrottleInterval); command.connect.packetThrottleAcceleration = ENET_HOST_TO_NET_32 (currentPeer -> packetThrottleAcceleration); command.connect.packetThrottleDeceleration = ENET_HOST_TO_NET_32 (currentPeer -> packetThrottleDeceleration); command.connect.connectID = currentPeer -> connectID; command.connect.data = ENET_HOST_TO_NET_32 (data); enet_peer_queue_outgoing_command (currentPeer, & command, NULL, 0, 0); return currentPeer; } /** Queues a packet to be sent to all peers associated with the host. @param host host on which to broadcast the packet @param channelID channel on which to broadcast @param packet packet to broadcast */ void enet_host_broadcast (ENetHost * host, enet_uint8 channelID, ENetPacket * packet) { ENetPeer * currentPeer; for (currentPeer = host -> peers; currentPeer < & host -> peers [host -> peerCount]; ++ currentPeer) { if (currentPeer -> state != ENET_PEER_STATE_CONNECTED) continue; enet_peer_send (currentPeer, channelID, packet); } if (packet -> referenceCount == 0) enet_packet_destroy (packet); } /** Sets the packet compressor the host should use to compress and decompress packets. @param host host to enable or disable compression for @param compressor callbacks for for the packet compressor; if NULL, then compression is disabled */ void enet_host_compress (ENetHost * host, const ENetCompressor * compressor) { if (host -> compressor.context != NULL && host -> compressor.destroy) (* host -> compressor.destroy) (host -> compressor.context); if (compressor) host -> compressor = * compressor; else host -> compressor.context = NULL; } /** Limits the maximum allowed channels of future incoming connections. @param host host to limit @param channelLimit the maximum number of channels allowed; if 0, then this is equivalent to ENET_PROTOCOL_MAXIMUM_CHANNEL_COUNT */ void enet_host_channel_limit (ENetHost * host, size_t channelLimit) { if (! channelLimit || channelLimit > ENET_PROTOCOL_MAXIMUM_CHANNEL_COUNT) channelLimit = ENET_PROTOCOL_MAXIMUM_CHANNEL_COUNT; else if (channelLimit < ENET_PROTOCOL_MINIMUM_CHANNEL_COUNT) channelLimit = ENET_PROTOCOL_MINIMUM_CHANNEL_COUNT; host -> channelLimit = channelLimit; } /** Adjusts the bandwidth limits of a host. @param host host to adjust @param incomingBandwidth new incoming bandwidth @param outgoingBandwidth new outgoing bandwidth @remarks the incoming and outgoing bandwidth parameters are identical in function to those specified in enet_host_create(). */ void enet_host_bandwidth_limit (ENetHost * host, enet_uint32 incomingBandwidth, enet_uint32 outgoingBandwidth) { host -> incomingBandwidth = incomingBandwidth; host -> outgoingBandwidth = outgoingBandwidth; host -> recalculateBandwidthLimits = 1; } void enet_host_bandwidth_throttle (ENetHost * host) { enet_uint32 timeCurrent = enet_time_get (), elapsedTime = timeCurrent - host -> bandwidthThrottleEpoch, peersRemaining = (enet_uint32) host -> connectedPeers, dataTotal = ~0, bandwidth = ~0, throttle = 0, bandwidthLimit = 0; int needsAdjustment = host -> bandwidthLimitedPeers > 0 ? 1 : 0; ENetPeer * peer; ENetProtocol command; if (elapsedTime < ENET_HOST_BANDWIDTH_THROTTLE_INTERVAL) return; host -> bandwidthThrottleEpoch = timeCurrent; if (peersRemaining == 0) return; if (host -> outgoingBandwidth != 0) { dataTotal = 0; bandwidth = (host -> outgoingBandwidth * elapsedTime) / 1000; for (peer = host -> peers; peer < & host -> peers [host -> peerCount]; ++ peer) { if (peer -> state != ENET_PEER_STATE_CONNECTED && peer -> state != ENET_PEER_STATE_DISCONNECT_LATER) continue; dataTotal += peer -> outgoingDataTotal; } } while (peersRemaining > 0 && needsAdjustment != 0) { needsAdjustment = 0; if (dataTotal <= bandwidth) throttle = ENET_PEER_PACKET_THROTTLE_SCALE; else throttle = (bandwidth * ENET_PEER_PACKET_THROTTLE_SCALE) / dataTotal; for (peer = host -> peers; peer < & host -> peers [host -> peerCount]; ++ peer) { enet_uint32 peerBandwidth; if ((peer -> state != ENET_PEER_STATE_CONNECTED && peer -> state != ENET_PEER_STATE_DISCONNECT_LATER) || peer -> incomingBandwidth == 0 || peer -> outgoingBandwidthThrottleEpoch == timeCurrent) continue; peerBandwidth = (peer -> incomingBandwidth * elapsedTime) / 1000; if ((throttle * peer -> outgoingDataTotal) / ENET_PEER_PACKET_THROTTLE_SCALE <= peerBandwidth) continue; peer -> packetThrottleLimit = (peerBandwidth * ENET_PEER_PACKET_THROTTLE_SCALE) / peer -> outgoingDataTotal; if (peer -> packetThrottleLimit == 0) peer -> packetThrottleLimit = 1; if (peer -> packetThrottle > peer -> packetThrottleLimit) peer -> packetThrottle = peer -> packetThrottleLimit; peer -> outgoingBandwidthThrottleEpoch = timeCurrent; peer -> incomingDataTotal = 0; peer -> outgoingDataTotal = 0; needsAdjustment = 1; -- peersRemaining; bandwidth -= peerBandwidth; dataTotal -= peerBandwidth; } } if (peersRemaining > 0) { if (dataTotal <= bandwidth) throttle = ENET_PEER_PACKET_THROTTLE_SCALE; else throttle = (bandwidth * ENET_PEER_PACKET_THROTTLE_SCALE) / dataTotal; for (peer = host -> peers; peer < & host -> peers [host -> peerCount]; ++ peer) { if ((peer -> state != ENET_PEER_STATE_CONNECTED && peer -> state != ENET_PEER_STATE_DISCONNECT_LATER) || peer -> outgoingBandwidthThrottleEpoch == timeCurrent) continue; peer -> packetThrottleLimit = throttle; if (peer -> packetThrottle > peer -> packetThrottleLimit) peer -> packetThrottle = peer -> packetThrottleLimit; peer -> incomingDataTotal = 0; peer -> outgoingDataTotal = 0; } } if (host -> recalculateBandwidthLimits) { host -> recalculateBandwidthLimits = 0; peersRemaining = (enet_uint32) host -> connectedPeers; bandwidth = host -> incomingBandwidth; needsAdjustment = 1; if (bandwidth == 0) bandwidthLimit = 0; else while (peersRemaining > 0 && needsAdjustment != 0) { needsAdjustment = 0; bandwidthLimit = bandwidth / peersRemaining; for (peer = host -> peers; peer < & host -> peers [host -> peerCount]; ++ peer) { if ((peer -> state != ENET_PEER_STATE_CONNECTED && peer -> state != ENET_PEER_STATE_DISCONNECT_LATER) || peer -> incomingBandwidthThrottleEpoch == timeCurrent) continue; if (peer -> outgoingBandwidth > 0 && peer -> outgoingBandwidth >= bandwidthLimit) continue; peer -> incomingBandwidthThrottleEpoch = timeCurrent; needsAdjustment = 1; -- peersRemaining; bandwidth -= peer -> outgoingBandwidth; } } for (peer = host -> peers; peer < & host -> peers [host -> peerCount]; ++ peer) { if (peer -> state != ENET_PEER_STATE_CONNECTED && peer -> state != ENET_PEER_STATE_DISCONNECT_LATER) continue; command.header.command = ENET_PROTOCOL_COMMAND_BANDWIDTH_LIMIT | ENET_PROTOCOL_COMMAND_FLAG_ACKNOWLEDGE; command.header.channelID = 0xFF; command.bandwidthLimit.outgoingBandwidth = ENET_HOST_TO_NET_32 (host -> outgoingBandwidth); if (peer -> incomingBandwidthThrottleEpoch == timeCurrent) command.bandwidthLimit.incomingBandwidth = ENET_HOST_TO_NET_32 (peer -> outgoingBandwidth); else command.bandwidthLimit.incomingBandwidth = ENET_HOST_TO_NET_32 (bandwidthLimit); enet_peer_queue_outgoing_command (peer, & command, NULL, 0, 0); } } } /** @} */ ================================================ FILE: src/libraries/enet/libenet/include/enet/callbacks.h ================================================ /** @file callbacks.h @brief ENet callbacks */ #ifndef __ENET_CALLBACKS_H__ #define __ENET_CALLBACKS_H__ #include typedef struct _ENetCallbacks { void * (ENET_CALLBACK * malloc) (size_t size); void (ENET_CALLBACK * free) (void * memory); void (ENET_CALLBACK * no_memory) (void); } ENetCallbacks; /** @defgroup callbacks ENet internal callbacks @{ @ingroup private */ extern void * enet_malloc (size_t); extern void enet_free (void *); /** @} */ #endif /* __ENET_CALLBACKS_H__ */ ================================================ FILE: src/libraries/enet/libenet/include/enet/enet.h ================================================ /** @file enet.h @brief ENet public header file */ #ifndef __ENET_ENET_H__ #define __ENET_ENET_H__ #ifdef __cplusplus extern "C" { #endif #include #ifdef _WIN32 #include "enet/win32.h" #else #include "enet/unix.h" #endif #include "enet/types.h" #include "enet/protocol.h" #include "enet/list.h" #include "enet/callbacks.h" #define ENET_VERSION_MAJOR 1 #define ENET_VERSION_MINOR 3 #define ENET_VERSION_PATCH 13 #define ENET_VERSION_CREATE(major, minor, patch) (((major)<<16) | ((minor)<<8) | (patch)) #define ENET_VERSION_GET_MAJOR(version) (((version)>>16)&0xFF) #define ENET_VERSION_GET_MINOR(version) (((version)>>8)&0xFF) #define ENET_VERSION_GET_PATCH(version) ((version)&0xFF) #define ENET_VERSION ENET_VERSION_CREATE(ENET_VERSION_MAJOR, ENET_VERSION_MINOR, ENET_VERSION_PATCH) typedef enet_uint32 ENetVersion; struct _ENetHost; struct _ENetEvent; struct _ENetPacket; typedef enum _ENetSocketType { ENET_SOCKET_TYPE_STREAM = 1, ENET_SOCKET_TYPE_DATAGRAM = 2 } ENetSocketType; typedef enum _ENetSocketWait { ENET_SOCKET_WAIT_NONE = 0, ENET_SOCKET_WAIT_SEND = (1 << 0), ENET_SOCKET_WAIT_RECEIVE = (1 << 1), ENET_SOCKET_WAIT_INTERRUPT = (1 << 2) } ENetSocketWait; typedef enum _ENetSocketOption { ENET_SOCKOPT_NONBLOCK = 1, ENET_SOCKOPT_BROADCAST = 2, ENET_SOCKOPT_RCVBUF = 3, ENET_SOCKOPT_SNDBUF = 4, ENET_SOCKOPT_REUSEADDR = 5, ENET_SOCKOPT_RCVTIMEO = 6, ENET_SOCKOPT_SNDTIMEO = 7, ENET_SOCKOPT_ERROR = 8, ENET_SOCKOPT_NODELAY = 9 } ENetSocketOption; typedef enum _ENetSocketShutdown { ENET_SOCKET_SHUTDOWN_READ = 0, ENET_SOCKET_SHUTDOWN_WRITE = 1, ENET_SOCKET_SHUTDOWN_READ_WRITE = 2 } ENetSocketShutdown; #define ENET_HOST_ANY 0 #define ENET_HOST_BROADCAST 0xFFFFFFFFU #define ENET_PORT_ANY 0 /** * Portable internet address structure. * * The host must be specified in network byte-order, and the port must be in host * byte-order. The constant ENET_HOST_ANY may be used to specify the default * server host. The constant ENET_HOST_BROADCAST may be used to specify the * broadcast address (255.255.255.255). This makes sense for enet_host_connect, * but not for enet_host_create. Once a server responds to a broadcast, the * address is updated from ENET_HOST_BROADCAST to the server's actual IP address. */ typedef struct _ENetAddress { enet_uint32 host; enet_uint16 port; } ENetAddress; /** * Packet flag bit constants. * * The host must be specified in network byte-order, and the port must be in * host byte-order. The constant ENET_HOST_ANY may be used to specify the * default server host. @sa ENetPacket */ typedef enum _ENetPacketFlag { /** packet must be received by the target peer and resend attempts should be * made until the packet is delivered */ ENET_PACKET_FLAG_RELIABLE = (1 << 0), /** packet will not be sequenced with other packets * not supported for reliable packets */ ENET_PACKET_FLAG_UNSEQUENCED = (1 << 1), /** packet will not allocate data, and user must supply it instead */ ENET_PACKET_FLAG_NO_ALLOCATE = (1 << 2), /** packet will be fragmented using unreliable (instead of reliable) sends * if it exceeds the MTU */ ENET_PACKET_FLAG_UNRELIABLE_FRAGMENT = (1 << 3), /** whether the packet has been sent from all queues it has been entered into */ ENET_PACKET_FLAG_SENT = (1<<8) } ENetPacketFlag; typedef void (ENET_CALLBACK * ENetPacketFreeCallback) (struct _ENetPacket *); /** * ENet packet structure. * * An ENet data packet that may be sent to or received from a peer. The shown * fields should only be read and never modified. The data field contains the * allocated data for the packet. The dataLength fields specifies the length * of the allocated data. The flags field is either 0 (specifying no flags), * or a bitwise-or of any combination of the following flags: * * ENET_PACKET_FLAG_RELIABLE - packet must be received by the target peer * and resend attempts should be made until the packet is delivered * * ENET_PACKET_FLAG_UNSEQUENCED - packet will not be sequenced with other packets * (not supported for reliable packets) * * ENET_PACKET_FLAG_NO_ALLOCATE - packet will not allocate data, and user must supply it instead * * ENET_PACKET_FLAG_UNRELIABLE_FRAGMENT - packet will be fragmented using unreliable * (instead of reliable) sends if it exceeds the MTU * * ENET_PACKET_FLAG_SENT - whether the packet has been sent from all queues it has been entered into @sa ENetPacketFlag */ typedef struct _ENetPacket { size_t referenceCount; /**< internal use only */ enet_uint32 flags; /**< bitwise-or of ENetPacketFlag constants */ enet_uint8 * data; /**< allocated data for packet */ size_t dataLength; /**< length of data */ ENetPacketFreeCallback freeCallback; /**< function to be called when the packet is no longer in use */ void * userData; /**< application private data, may be freely modified */ } ENetPacket; typedef struct _ENetAcknowledgement { ENetListNode acknowledgementList; enet_uint32 sentTime; ENetProtocol command; } ENetAcknowledgement; typedef struct _ENetOutgoingCommand { ENetListNode outgoingCommandList; enet_uint16 reliableSequenceNumber; enet_uint16 unreliableSequenceNumber; enet_uint32 sentTime; enet_uint32 roundTripTimeout; enet_uint32 roundTripTimeoutLimit; enet_uint32 fragmentOffset; enet_uint16 fragmentLength; enet_uint16 sendAttempts; ENetProtocol command; ENetPacket * packet; } ENetOutgoingCommand; typedef struct _ENetIncomingCommand { ENetListNode incomingCommandList; enet_uint16 reliableSequenceNumber; enet_uint16 unreliableSequenceNumber; ENetProtocol command; enet_uint32 fragmentCount; enet_uint32 fragmentsRemaining; enet_uint32 * fragments; ENetPacket * packet; } ENetIncomingCommand; typedef enum _ENetPeerState { ENET_PEER_STATE_DISCONNECTED = 0, ENET_PEER_STATE_CONNECTING = 1, ENET_PEER_STATE_ACKNOWLEDGING_CONNECT = 2, ENET_PEER_STATE_CONNECTION_PENDING = 3, ENET_PEER_STATE_CONNECTION_SUCCEEDED = 4, ENET_PEER_STATE_CONNECTED = 5, ENET_PEER_STATE_DISCONNECT_LATER = 6, ENET_PEER_STATE_DISCONNECTING = 7, ENET_PEER_STATE_ACKNOWLEDGING_DISCONNECT = 8, ENET_PEER_STATE_ZOMBIE = 9 } ENetPeerState; #ifndef ENET_BUFFER_MAXIMUM #define ENET_BUFFER_MAXIMUM (1 + 2 * ENET_PROTOCOL_MAXIMUM_PACKET_COMMANDS) #endif enum { ENET_HOST_RECEIVE_BUFFER_SIZE = 256 * 1024, ENET_HOST_SEND_BUFFER_SIZE = 256 * 1024, ENET_HOST_BANDWIDTH_THROTTLE_INTERVAL = 1000, ENET_HOST_DEFAULT_MTU = 1400, ENET_HOST_DEFAULT_MAXIMUM_PACKET_SIZE = 32 * 1024 * 1024, ENET_HOST_DEFAULT_MAXIMUM_WAITING_DATA = 32 * 1024 * 1024, ENET_PEER_DEFAULT_ROUND_TRIP_TIME = 500, ENET_PEER_DEFAULT_PACKET_THROTTLE = 32, ENET_PEER_PACKET_THROTTLE_SCALE = 32, ENET_PEER_PACKET_THROTTLE_COUNTER = 7, ENET_PEER_PACKET_THROTTLE_ACCELERATION = 2, ENET_PEER_PACKET_THROTTLE_DECELERATION = 2, ENET_PEER_PACKET_THROTTLE_INTERVAL = 5000, ENET_PEER_PACKET_LOSS_SCALE = (1 << 16), ENET_PEER_PACKET_LOSS_INTERVAL = 10000, ENET_PEER_WINDOW_SIZE_SCALE = 64 * 1024, ENET_PEER_TIMEOUT_LIMIT = 32, ENET_PEER_TIMEOUT_MINIMUM = 5000, ENET_PEER_TIMEOUT_MAXIMUM = 30000, ENET_PEER_PING_INTERVAL = 500, ENET_PEER_UNSEQUENCED_WINDOWS = 64, ENET_PEER_UNSEQUENCED_WINDOW_SIZE = 1024, ENET_PEER_FREE_UNSEQUENCED_WINDOWS = 32, ENET_PEER_RELIABLE_WINDOWS = 16, ENET_PEER_RELIABLE_WINDOW_SIZE = 0x1000, ENET_PEER_FREE_RELIABLE_WINDOWS = 8 }; typedef struct _ENetChannel { enet_uint16 outgoingReliableSequenceNumber; enet_uint16 outgoingUnreliableSequenceNumber; enet_uint16 usedReliableWindows; enet_uint16 reliableWindows [ENET_PEER_RELIABLE_WINDOWS]; enet_uint16 incomingReliableSequenceNumber; enet_uint16 incomingUnreliableSequenceNumber; ENetList incomingReliableCommands; ENetList incomingUnreliableCommands; } ENetChannel; /** * An ENet peer which data packets may be sent or received from. * * No fields should be modified unless otherwise specified. */ typedef struct _ENetPeer { ENetListNode dispatchList; struct _ENetHost * host; enet_uint16 outgoingPeerID; enet_uint16 incomingPeerID; enet_uint32 connectID; enet_uint8 outgoingSessionID; enet_uint8 incomingSessionID; ENetAddress address; /**< Internet address of the peer */ void * data; /**< Application private data, may be freely modified */ ENetPeerState state; ENetChannel * channels; size_t channelCount; /**< Number of channels allocated for communication with peer */ enet_uint32 incomingBandwidth; /**< Downstream bandwidth of the client in bytes/second */ enet_uint32 outgoingBandwidth; /**< Upstream bandwidth of the client in bytes/second */ enet_uint32 incomingBandwidthThrottleEpoch; enet_uint32 outgoingBandwidthThrottleEpoch; enet_uint32 incomingDataTotal; enet_uint32 outgoingDataTotal; enet_uint32 lastSendTime; enet_uint32 lastReceiveTime; enet_uint32 nextTimeout; enet_uint32 earliestTimeout; enet_uint32 packetLossEpoch; enet_uint32 packetsSent; enet_uint32 packetsLost; enet_uint32 packetLoss; /**< mean packet loss of reliable packets as a ratio with respect to the constant ENET_PEER_PACKET_LOSS_SCALE */ enet_uint32 packetLossVariance; enet_uint32 packetThrottle; enet_uint32 packetThrottleLimit; enet_uint32 packetThrottleCounter; enet_uint32 packetThrottleEpoch; enet_uint32 packetThrottleAcceleration; enet_uint32 packetThrottleDeceleration; enet_uint32 packetThrottleInterval; enet_uint32 pingInterval; enet_uint32 timeoutLimit; enet_uint32 timeoutMinimum; enet_uint32 timeoutMaximum; enet_uint32 lastRoundTripTime; enet_uint32 lowestRoundTripTime; enet_uint32 lastRoundTripTimeVariance; enet_uint32 highestRoundTripTimeVariance; enet_uint32 roundTripTime; /**< mean round trip time (RTT), in milliseconds, between sending a reliable packet and receiving its acknowledgement */ enet_uint32 roundTripTimeVariance; enet_uint32 mtu; enet_uint32 windowSize; enet_uint32 reliableDataInTransit; enet_uint16 outgoingReliableSequenceNumber; ENetList acknowledgements; ENetList sentReliableCommands; ENetList sentUnreliableCommands; ENetList outgoingReliableCommands; ENetList outgoingUnreliableCommands; ENetList dispatchedCommands; int needsDispatch; enet_uint16 incomingUnsequencedGroup; enet_uint16 outgoingUnsequencedGroup; enet_uint32 unsequencedWindow [ENET_PEER_UNSEQUENCED_WINDOW_SIZE / 32]; enet_uint32 eventData; size_t totalWaitingData; } ENetPeer; /** An ENet packet compressor for compressing UDP packets before socket sends or receives. */ typedef struct _ENetCompressor { /** Context data for the compressor. Must be non-NULL. */ void * context; /** Compresses from inBuffers[0:inBufferCount-1], containing inLimit bytes, to outData, outputting at most outLimit bytes. Should return 0 on failure. */ size_t (ENET_CALLBACK * compress) (void * context, const ENetBuffer * inBuffers, size_t inBufferCount, size_t inLimit, enet_uint8 * outData, size_t outLimit); /** Decompresses from inData, containing inLimit bytes, to outData, outputting at most outLimit bytes. Should return 0 on failure. */ size_t (ENET_CALLBACK * decompress) (void * context, const enet_uint8 * inData, size_t inLimit, enet_uint8 * outData, size_t outLimit); /** Destroys the context when compression is disabled or the host is destroyed. May be NULL. */ void (ENET_CALLBACK * destroy) (void * context); } ENetCompressor; /** Callback that computes the checksum of the data held in buffers[0:bufferCount-1] */ typedef enet_uint32 (ENET_CALLBACK * ENetChecksumCallback) (const ENetBuffer * buffers, size_t bufferCount); /** Callback for intercepting received raw UDP packets. Should return 1 to intercept, 0 to ignore, or -1 to propagate an error. */ typedef int (ENET_CALLBACK * ENetInterceptCallback) (struct _ENetHost * host, struct _ENetEvent * event); /** An ENet host for communicating with peers. * * No fields should be modified unless otherwise stated. @sa enet_host_create() @sa enet_host_destroy() @sa enet_host_connect() @sa enet_host_service() @sa enet_host_flush() @sa enet_host_broadcast() @sa enet_host_compress() @sa enet_host_compress_with_range_coder() @sa enet_host_channel_limit() @sa enet_host_bandwidth_limit() @sa enet_host_bandwidth_throttle() */ typedef struct _ENetHost { ENetSocket socket; ENetAddress address; /**< Internet address of the host */ enet_uint32 incomingBandwidth; /**< downstream bandwidth of the host */ enet_uint32 outgoingBandwidth; /**< upstream bandwidth of the host */ enet_uint32 bandwidthThrottleEpoch; enet_uint32 mtu; enet_uint32 randomSeed; int recalculateBandwidthLimits; ENetPeer * peers; /**< array of peers allocated for this host */ size_t peerCount; /**< number of peers allocated for this host */ size_t channelLimit; /**< maximum number of channels allowed for connected peers */ enet_uint32 serviceTime; ENetList dispatchQueue; int continueSending; size_t packetSize; enet_uint16 headerFlags; ENetProtocol commands [ENET_PROTOCOL_MAXIMUM_PACKET_COMMANDS]; size_t commandCount; ENetBuffer buffers [ENET_BUFFER_MAXIMUM]; size_t bufferCount; ENetChecksumCallback checksum; /**< callback the user can set to enable packet checksums for this host */ ENetCompressor compressor; enet_uint8 packetData [2][ENET_PROTOCOL_MAXIMUM_MTU]; ENetAddress receivedAddress; enet_uint8 * receivedData; size_t receivedDataLength; enet_uint32 totalSentData; /**< total data sent, user should reset to 0 as needed to prevent overflow */ enet_uint32 totalSentPackets; /**< total UDP packets sent, user should reset to 0 as needed to prevent overflow */ enet_uint32 totalReceivedData; /**< total data received, user should reset to 0 as needed to prevent overflow */ enet_uint32 totalReceivedPackets; /**< total UDP packets received, user should reset to 0 as needed to prevent overflow */ ENetInterceptCallback intercept; /**< callback the user can set to intercept received raw UDP packets */ size_t connectedPeers; size_t bandwidthLimitedPeers; size_t duplicatePeers; /**< optional number of allowed peers from duplicate IPs, defaults to ENET_PROTOCOL_MAXIMUM_PEER_ID */ size_t maximumPacketSize; /**< the maximum allowable packet size that may be sent or received on a peer */ size_t maximumWaitingData; /**< the maximum aggregate amount of buffer space a peer may use waiting for packets to be delivered */ } ENetHost; /** * An ENet event type, as specified in @ref ENetEvent. */ typedef enum _ENetEventType { /** no event occurred within the specified time limit */ ENET_EVENT_TYPE_NONE = 0, /** a connection request initiated by enet_host_connect has completed. * The peer field contains the peer which successfully connected. */ ENET_EVENT_TYPE_CONNECT = 1, /** a peer has disconnected. This event is generated on a successful * completion of a disconnect initiated by enet_pper_disconnect, if * a peer has timed out, or if a connection request intialized by * enet_host_connect has timed out. The peer field contains the peer * which disconnected. The data field contains user supplied data * describing the disconnection, or 0, if none is available. */ ENET_EVENT_TYPE_DISCONNECT = 2, /** a packet has been received from a peer. The peer field specifies the * peer which sent the packet. The channelID field specifies the channel * number upon which the packet was received. The packet field contains * the packet that was received; this packet must be destroyed with * enet_packet_destroy after use. */ ENET_EVENT_TYPE_RECEIVE = 3 } ENetEventType; /** * An ENet event as returned by enet_host_service(). @sa enet_host_service */ typedef struct _ENetEvent { ENetEventType type; /**< type of the event */ ENetPeer * peer; /**< peer that generated a connect, disconnect or receive event */ enet_uint8 channelID; /**< channel on the peer that generated the event, if appropriate */ enet_uint32 data; /**< data associated with the event, if appropriate */ ENetPacket * packet; /**< packet associated with the event, if appropriate */ } ENetEvent; /** @defgroup global ENet global functions @{ */ /** Initializes ENet globally. Must be called prior to using any functions in ENet. @returns 0 on success, < 0 on failure */ ENET_API int enet_initialize (void); /** Initializes ENet globally and supplies user-overridden callbacks. Must be called prior to using any functions in ENet. Do not use enet_initialize() if you use this variant. Make sure the ENetCallbacks structure is zeroed out so that any additional callbacks added in future versions will be properly ignored. @param version the constant ENET_VERSION should be supplied so ENet knows which version of ENetCallbacks struct to use @param inits user-overridden callbacks where any NULL callbacks will use ENet's defaults @returns 0 on success, < 0 on failure */ ENET_API int enet_initialize_with_callbacks (ENetVersion version, const ENetCallbacks * inits); /** Shuts down ENet globally. Should be called when a program that has initialized ENet exits. */ ENET_API void enet_deinitialize (void); /** Gives the linked version of the ENet library. @returns the version number */ ENET_API ENetVersion enet_linked_version (void); /** @} */ /** @defgroup private ENet private implementation functions */ /** Returns the wall-time in milliseconds. Its initial value is unspecified unless otherwise set. */ ENET_API enet_uint32 enet_time_get (void); /** Sets the current wall-time in milliseconds. */ ENET_API void enet_time_set (enet_uint32); /** @defgroup socket ENet socket functions @{ */ ENET_API ENetSocket enet_socket_create (ENetSocketType); ENET_API int enet_socket_bind (ENetSocket, const ENetAddress *); ENET_API int enet_socket_get_address (ENetSocket, ENetAddress *); ENET_API int enet_socket_listen (ENetSocket, int); ENET_API ENetSocket enet_socket_accept (ENetSocket, ENetAddress *); ENET_API int enet_socket_connect (ENetSocket, const ENetAddress *); ENET_API int enet_socket_send (ENetSocket, const ENetAddress *, const ENetBuffer *, size_t); ENET_API int enet_socket_receive (ENetSocket, ENetAddress *, ENetBuffer *, size_t); ENET_API int enet_socket_wait (ENetSocket, enet_uint32 *, enet_uint32); ENET_API int enet_socket_set_option (ENetSocket, ENetSocketOption, int); ENET_API int enet_socket_get_option (ENetSocket, ENetSocketOption, int *); ENET_API int enet_socket_shutdown (ENetSocket, ENetSocketShutdown); ENET_API void enet_socket_destroy (ENetSocket); ENET_API int enet_socketset_select (ENetSocket, ENetSocketSet *, ENetSocketSet *, enet_uint32); /** @} */ /** @defgroup Address ENet address functions @{ */ /** Attempts to resolve the host named by the parameter hostName and sets the host field in the address parameter if successful. @param address destination to store resolved address @param hostName host name to lookup @retval 0 on success @retval < 0 on failure @returns the address of the given hostName in address on success */ ENET_API int enet_address_set_host (ENetAddress * address, const char * hostName); /** Gives the printable form of the IP address specified in the address parameter. @param address address printed @param hostName destination for name, must not be NULL @param nameLength maximum length of hostName. @returns the null-terminated name of the host in hostName on success @retval 0 on success @retval < 0 on failure */ ENET_API int enet_address_get_host_ip (const ENetAddress * address, char * hostName, size_t nameLength); /** Attempts to do a reverse lookup of the host field in the address parameter. @param address address used for reverse lookup @param hostName destination for name, must not be NULL @param nameLength maximum length of hostName. @returns the null-terminated name of the host in hostName on success @retval 0 on success @retval < 0 on failure */ ENET_API int enet_address_get_host (const ENetAddress * address, char * hostName, size_t nameLength); /** @} */ ENET_API ENetPacket * enet_packet_create (const void *, size_t, enet_uint32); ENET_API void enet_packet_destroy (ENetPacket *); ENET_API int enet_packet_resize (ENetPacket *, size_t); ENET_API enet_uint32 enet_crc32 (const ENetBuffer *, size_t); ENET_API ENetHost * enet_host_create (const ENetAddress *, size_t, size_t, enet_uint32, enet_uint32); ENET_API void enet_host_destroy (ENetHost *); ENET_API ENetPeer * enet_host_connect (ENetHost *, const ENetAddress *, size_t, enet_uint32); ENET_API int enet_host_check_events (ENetHost *, ENetEvent *); ENET_API int enet_host_service (ENetHost *, ENetEvent *, enet_uint32); ENET_API void enet_host_flush (ENetHost *); ENET_API void enet_host_broadcast (ENetHost *, enet_uint8, ENetPacket *); ENET_API void enet_host_compress (ENetHost *, const ENetCompressor *); ENET_API int enet_host_compress_with_range_coder (ENetHost * host); ENET_API void enet_host_channel_limit (ENetHost *, size_t); ENET_API void enet_host_bandwidth_limit (ENetHost *, enet_uint32, enet_uint32); extern void enet_host_bandwidth_throttle (ENetHost *); extern enet_uint32 enet_host_random_seed (void); ENET_API int enet_peer_send (ENetPeer *, enet_uint8, ENetPacket *); ENET_API ENetPacket * enet_peer_receive (ENetPeer *, enet_uint8 * channelID); ENET_API void enet_peer_ping (ENetPeer *); ENET_API void enet_peer_ping_interval (ENetPeer *, enet_uint32); ENET_API void enet_peer_timeout (ENetPeer *, enet_uint32, enet_uint32, enet_uint32); ENET_API void enet_peer_reset (ENetPeer *); ENET_API void enet_peer_disconnect (ENetPeer *, enet_uint32); ENET_API void enet_peer_disconnect_now (ENetPeer *, enet_uint32); ENET_API void enet_peer_disconnect_later (ENetPeer *, enet_uint32); ENET_API void enet_peer_throttle_configure (ENetPeer *, enet_uint32, enet_uint32, enet_uint32); extern int enet_peer_throttle (ENetPeer *, enet_uint32); extern void enet_peer_reset_queues (ENetPeer *); extern void enet_peer_setup_outgoing_command (ENetPeer *, ENetOutgoingCommand *); extern ENetOutgoingCommand * enet_peer_queue_outgoing_command (ENetPeer *, const ENetProtocol *, ENetPacket *, enet_uint32, enet_uint16); extern ENetIncomingCommand * enet_peer_queue_incoming_command (ENetPeer *, const ENetProtocol *, const void *, size_t, enet_uint32, enet_uint32); extern ENetAcknowledgement * enet_peer_queue_acknowledgement (ENetPeer *, const ENetProtocol *, enet_uint16); extern void enet_peer_dispatch_incoming_unreliable_commands (ENetPeer *, ENetChannel *); extern void enet_peer_dispatch_incoming_reliable_commands (ENetPeer *, ENetChannel *); extern void enet_peer_on_connect (ENetPeer *); extern void enet_peer_on_disconnect (ENetPeer *); ENET_API void * enet_range_coder_create (void); ENET_API void enet_range_coder_destroy (void *); ENET_API size_t enet_range_coder_compress (void *, const ENetBuffer *, size_t, size_t, enet_uint8 *, size_t); ENET_API size_t enet_range_coder_decompress (void *, const enet_uint8 *, size_t, enet_uint8 *, size_t); extern size_t enet_protocol_command_size (enet_uint8); #ifdef __cplusplus } #endif #endif /* __ENET_ENET_H__ */ ================================================ FILE: src/libraries/enet/libenet/include/enet/list.h ================================================ /** @file list.h @brief ENet list management */ #ifndef __ENET_LIST_H__ #define __ENET_LIST_H__ #include typedef struct _ENetListNode { struct _ENetListNode * next; struct _ENetListNode * previous; } ENetListNode; typedef ENetListNode * ENetListIterator; typedef struct _ENetList { ENetListNode sentinel; } ENetList; extern void enet_list_clear (ENetList *); extern ENetListIterator enet_list_insert (ENetListIterator, void *); extern void * enet_list_remove (ENetListIterator); extern ENetListIterator enet_list_move (ENetListIterator, void *, void *); extern size_t enet_list_size (ENetList *); #define enet_list_begin(list) ((list) -> sentinel.next) #define enet_list_end(list) (& (list) -> sentinel) #define enet_list_empty(list) (enet_list_begin (list) == enet_list_end (list)) #define enet_list_next(iterator) ((iterator) -> next) #define enet_list_previous(iterator) ((iterator) -> previous) #define enet_list_front(list) ((void *) (list) -> sentinel.next) #define enet_list_back(list) ((void *) (list) -> sentinel.previous) #endif /* __ENET_LIST_H__ */ ================================================ FILE: src/libraries/enet/libenet/include/enet/protocol.h ================================================ /** @file protocol.h @brief ENet protocol */ #ifndef __ENET_PROTOCOL_H__ #define __ENET_PROTOCOL_H__ #include "enet/types.h" enum { ENET_PROTOCOL_MINIMUM_MTU = 576, ENET_PROTOCOL_MAXIMUM_MTU = 4096, ENET_PROTOCOL_MAXIMUM_PACKET_COMMANDS = 32, ENET_PROTOCOL_MINIMUM_WINDOW_SIZE = 4096, ENET_PROTOCOL_MAXIMUM_WINDOW_SIZE = 65536, ENET_PROTOCOL_MINIMUM_CHANNEL_COUNT = 1, ENET_PROTOCOL_MAXIMUM_CHANNEL_COUNT = 255, ENET_PROTOCOL_MAXIMUM_PEER_ID = 0xFFF, ENET_PROTOCOL_MAXIMUM_FRAGMENT_COUNT = 1024 * 1024 }; typedef enum _ENetProtocolCommand { ENET_PROTOCOL_COMMAND_NONE = 0, ENET_PROTOCOL_COMMAND_ACKNOWLEDGE = 1, ENET_PROTOCOL_COMMAND_CONNECT = 2, ENET_PROTOCOL_COMMAND_VERIFY_CONNECT = 3, ENET_PROTOCOL_COMMAND_DISCONNECT = 4, ENET_PROTOCOL_COMMAND_PING = 5, ENET_PROTOCOL_COMMAND_SEND_RELIABLE = 6, ENET_PROTOCOL_COMMAND_SEND_UNRELIABLE = 7, ENET_PROTOCOL_COMMAND_SEND_FRAGMENT = 8, ENET_PROTOCOL_COMMAND_SEND_UNSEQUENCED = 9, ENET_PROTOCOL_COMMAND_BANDWIDTH_LIMIT = 10, ENET_PROTOCOL_COMMAND_THROTTLE_CONFIGURE = 11, ENET_PROTOCOL_COMMAND_SEND_UNRELIABLE_FRAGMENT = 12, ENET_PROTOCOL_COMMAND_COUNT = 13, ENET_PROTOCOL_COMMAND_MASK = 0x0F } ENetProtocolCommand; typedef enum _ENetProtocolFlag { ENET_PROTOCOL_COMMAND_FLAG_ACKNOWLEDGE = (1 << 7), ENET_PROTOCOL_COMMAND_FLAG_UNSEQUENCED = (1 << 6), ENET_PROTOCOL_HEADER_FLAG_COMPRESSED = (1 << 14), ENET_PROTOCOL_HEADER_FLAG_SENT_TIME = (1 << 15), ENET_PROTOCOL_HEADER_FLAG_MASK = ENET_PROTOCOL_HEADER_FLAG_COMPRESSED | ENET_PROTOCOL_HEADER_FLAG_SENT_TIME, ENET_PROTOCOL_HEADER_SESSION_MASK = (3 << 12), ENET_PROTOCOL_HEADER_SESSION_SHIFT = 12 } ENetProtocolFlag; #ifdef _MSC_VER #pragma pack(push, 1) #define ENET_PACKED #elif defined(__GNUC__) || defined(__clang__) #define ENET_PACKED __attribute__ ((packed)) #else #define ENET_PACKED #endif typedef struct _ENetProtocolHeader { enet_uint16 peerID; enet_uint16 sentTime; } ENET_PACKED ENetProtocolHeader; typedef struct _ENetProtocolCommandHeader { enet_uint8 command; enet_uint8 channelID; enet_uint16 reliableSequenceNumber; } ENET_PACKED ENetProtocolCommandHeader; typedef struct _ENetProtocolAcknowledge { ENetProtocolCommandHeader header; enet_uint16 receivedReliableSequenceNumber; enet_uint16 receivedSentTime; } ENET_PACKED ENetProtocolAcknowledge; typedef struct _ENetProtocolConnect { ENetProtocolCommandHeader header; enet_uint16 outgoingPeerID; enet_uint8 incomingSessionID; enet_uint8 outgoingSessionID; enet_uint32 mtu; enet_uint32 windowSize; enet_uint32 channelCount; enet_uint32 incomingBandwidth; enet_uint32 outgoingBandwidth; enet_uint32 packetThrottleInterval; enet_uint32 packetThrottleAcceleration; enet_uint32 packetThrottleDeceleration; enet_uint32 connectID; enet_uint32 data; } ENET_PACKED ENetProtocolConnect; typedef struct _ENetProtocolVerifyConnect { ENetProtocolCommandHeader header; enet_uint16 outgoingPeerID; enet_uint8 incomingSessionID; enet_uint8 outgoingSessionID; enet_uint32 mtu; enet_uint32 windowSize; enet_uint32 channelCount; enet_uint32 incomingBandwidth; enet_uint32 outgoingBandwidth; enet_uint32 packetThrottleInterval; enet_uint32 packetThrottleAcceleration; enet_uint32 packetThrottleDeceleration; enet_uint32 connectID; } ENET_PACKED ENetProtocolVerifyConnect; typedef struct _ENetProtocolBandwidthLimit { ENetProtocolCommandHeader header; enet_uint32 incomingBandwidth; enet_uint32 outgoingBandwidth; } ENET_PACKED ENetProtocolBandwidthLimit; typedef struct _ENetProtocolThrottleConfigure { ENetProtocolCommandHeader header; enet_uint32 packetThrottleInterval; enet_uint32 packetThrottleAcceleration; enet_uint32 packetThrottleDeceleration; } ENET_PACKED ENetProtocolThrottleConfigure; typedef struct _ENetProtocolDisconnect { ENetProtocolCommandHeader header; enet_uint32 data; } ENET_PACKED ENetProtocolDisconnect; typedef struct _ENetProtocolPing { ENetProtocolCommandHeader header; } ENET_PACKED ENetProtocolPing; typedef struct _ENetProtocolSendReliable { ENetProtocolCommandHeader header; enet_uint16 dataLength; } ENET_PACKED ENetProtocolSendReliable; typedef struct _ENetProtocolSendUnreliable { ENetProtocolCommandHeader header; enet_uint16 unreliableSequenceNumber; enet_uint16 dataLength; } ENET_PACKED ENetProtocolSendUnreliable; typedef struct _ENetProtocolSendUnsequenced { ENetProtocolCommandHeader header; enet_uint16 unsequencedGroup; enet_uint16 dataLength; } ENET_PACKED ENetProtocolSendUnsequenced; typedef struct _ENetProtocolSendFragment { ENetProtocolCommandHeader header; enet_uint16 startSequenceNumber; enet_uint16 dataLength; enet_uint32 fragmentCount; enet_uint32 fragmentNumber; enet_uint32 totalLength; enet_uint32 fragmentOffset; } ENET_PACKED ENetProtocolSendFragment; typedef union _ENetProtocol { ENetProtocolCommandHeader header; ENetProtocolAcknowledge acknowledge; ENetProtocolConnect connect; ENetProtocolVerifyConnect verifyConnect; ENetProtocolDisconnect disconnect; ENetProtocolPing ping; ENetProtocolSendReliable sendReliable; ENetProtocolSendUnreliable sendUnreliable; ENetProtocolSendUnsequenced sendUnsequenced; ENetProtocolSendFragment sendFragment; ENetProtocolBandwidthLimit bandwidthLimit; ENetProtocolThrottleConfigure throttleConfigure; } ENET_PACKED ENetProtocol; #ifdef _MSC_VER #pragma pack(pop) #endif #endif /* __ENET_PROTOCOL_H__ */ ================================================ FILE: src/libraries/enet/libenet/include/enet/time.h ================================================ /** @file time.h @brief ENet time constants and macros */ #ifndef __ENET_TIME_H__ #define __ENET_TIME_H__ #define ENET_TIME_OVERFLOW 86400000 #define ENET_TIME_LESS(a, b) ((a) - (b) >= ENET_TIME_OVERFLOW) #define ENET_TIME_GREATER(a, b) ((b) - (a) >= ENET_TIME_OVERFLOW) #define ENET_TIME_LESS_EQUAL(a, b) (! ENET_TIME_GREATER (a, b)) #define ENET_TIME_GREATER_EQUAL(a, b) (! ENET_TIME_LESS (a, b)) #define ENET_TIME_DIFFERENCE(a, b) ((a) - (b) >= ENET_TIME_OVERFLOW ? (b) - (a) : (a) - (b)) #endif /* __ENET_TIME_H__ */ ================================================ FILE: src/libraries/enet/libenet/include/enet/types.h ================================================ /** @file types.h @brief type definitions for ENet */ #ifndef __ENET_TYPES_H__ #define __ENET_TYPES_H__ typedef unsigned char enet_uint8; /**< unsigned 8-bit type */ typedef unsigned short enet_uint16; /**< unsigned 16-bit type */ typedef unsigned int enet_uint32; /**< unsigned 32-bit type */ #endif /* __ENET_TYPES_H__ */ ================================================ FILE: src/libraries/enet/libenet/include/enet/unix.h ================================================ /** @file unix.h @brief ENet Unix header */ #ifndef __ENET_UNIX_H__ #define __ENET_UNIX_H__ #include #include #include #include #include #include #ifdef MSG_MAXIOVLEN #define ENET_BUFFER_MAXIMUM MSG_MAXIOVLEN #endif typedef int ENetSocket; #define ENET_SOCKET_NULL -1 #define ENET_HOST_TO_NET_16(value) (htons (value)) /**< macro that converts host to net byte-order of a 16-bit value */ #define ENET_HOST_TO_NET_32(value) (htonl (value)) /**< macro that converts host to net byte-order of a 32-bit value */ #define ENET_NET_TO_HOST_16(value) (ntohs (value)) /**< macro that converts net to host byte-order of a 16-bit value */ #define ENET_NET_TO_HOST_32(value) (ntohl (value)) /**< macro that converts net to host byte-order of a 32-bit value */ typedef struct { void * data; size_t dataLength; } ENetBuffer; #define ENET_CALLBACK #define ENET_API extern typedef fd_set ENetSocketSet; #define ENET_SOCKETSET_EMPTY(sockset) FD_ZERO (& (sockset)) #define ENET_SOCKETSET_ADD(sockset, socket) FD_SET (socket, & (sockset)) #define ENET_SOCKETSET_REMOVE(sockset, socket) FD_CLR (socket, & (sockset)) #define ENET_SOCKETSET_CHECK(sockset, socket) FD_ISSET (socket, & (sockset)) #endif /* __ENET_UNIX_H__ */ ================================================ FILE: src/libraries/enet/libenet/include/enet/utility.h ================================================ /** @file utility.h @brief ENet utility header */ #ifndef __ENET_UTILITY_H__ #define __ENET_UTILITY_H__ #define ENET_MAX(x, y) ((x) > (y) ? (x) : (y)) #define ENET_MIN(x, y) ((x) < (y) ? (x) : (y)) #endif /* __ENET_UTILITY_H__ */ ================================================ FILE: src/libraries/enet/libenet/include/enet/win32.h ================================================ /** @file win32.h @brief ENet Win32 header */ #ifndef __ENET_WIN32_H__ #define __ENET_WIN32_H__ #ifdef _MSC_VER #ifdef ENET_BUILDING_LIB #pragma warning (disable: 4267) // size_t to int conversion #pragma warning (disable: 4244) // 64bit to 32bit int #pragma warning (disable: 4018) // signed/unsigned mismatch #pragma warning (disable: 4146) // unary minus operator applied to unsigned type #endif #endif #include #include typedef SOCKET ENetSocket; #define ENET_SOCKET_NULL INVALID_SOCKET #define ENET_HOST_TO_NET_16(value) (htons (value)) #define ENET_HOST_TO_NET_32(value) (htonl (value)) #define ENET_NET_TO_HOST_16(value) (ntohs (value)) #define ENET_NET_TO_HOST_32(value) (ntohl (value)) typedef struct { size_t dataLength; void * data; } ENetBuffer; #define ENET_CALLBACK __cdecl #ifdef ENET_DLL #ifdef ENET_BUILDING_LIB #define ENET_API __declspec( dllexport ) #else #define ENET_API __declspec( dllimport ) #endif /* ENET_BUILDING_LIB */ #else /* !ENET_DLL */ #define ENET_API extern #endif /* ENET_DLL */ typedef fd_set ENetSocketSet; #define ENET_SOCKETSET_EMPTY(sockset) FD_ZERO (& (sockset)) #define ENET_SOCKETSET_ADD(sockset, socket) FD_SET (socket, & (sockset)) #define ENET_SOCKETSET_REMOVE(sockset, socket) FD_CLR (socket, & (sockset)) #define ENET_SOCKETSET_CHECK(sockset, socket) FD_ISSET (socket, & (sockset)) #endif /* __ENET_WIN32_H__ */ ================================================ FILE: src/libraries/enet/libenet/list.c ================================================ /** @file list.c @brief ENet linked list functions */ #define ENET_BUILDING_LIB 1 #include "enet/enet.h" /** @defgroup list ENet linked list utility functions @ingroup private @{ */ void enet_list_clear (ENetList * list) { list -> sentinel.next = & list -> sentinel; list -> sentinel.previous = & list -> sentinel; } ENetListIterator enet_list_insert (ENetListIterator position, void * data) { ENetListIterator result = (ENetListIterator) data; result -> previous = position -> previous; result -> next = position; result -> previous -> next = result; position -> previous = result; return result; } void * enet_list_remove (ENetListIterator position) { position -> previous -> next = position -> next; position -> next -> previous = position -> previous; return position; } ENetListIterator enet_list_move (ENetListIterator position, void * dataFirst, void * dataLast) { ENetListIterator first = (ENetListIterator) dataFirst, last = (ENetListIterator) dataLast; first -> previous -> next = last -> next; last -> next -> previous = first -> previous; first -> previous = position -> previous; last -> next = position; first -> previous -> next = first; position -> previous = last; return first; } size_t enet_list_size (ENetList * list) { size_t size = 0; ENetListIterator position; for (position = enet_list_begin (list); position != enet_list_end (list); position = enet_list_next (position)) ++ size; return size; } /** @} */ ================================================ FILE: src/libraries/enet/libenet/packet.c ================================================ /** @file packet.c @brief ENet packet management functions */ #include #define ENET_BUILDING_LIB 1 #include "enet/enet.h" /** @defgroup Packet ENet packet functions @{ */ /** Creates a packet that may be sent to a peer. @param data initial contents of the packet's data; the packet's data will remain uninitialized if data is NULL. @param dataLength size of the data allocated for this packet @param flags flags for this packet as described for the ENetPacket structure. @returns the packet on success, NULL on failure */ ENetPacket * enet_packet_create (const void * data, size_t dataLength, enet_uint32 flags) { ENetPacket * packet = (ENetPacket *) enet_malloc (sizeof (ENetPacket)); if (packet == NULL) return NULL; if (flags & ENET_PACKET_FLAG_NO_ALLOCATE) packet -> data = (enet_uint8 *) data; else if (dataLength <= 0) packet -> data = NULL; else { packet -> data = (enet_uint8 *) enet_malloc (dataLength); if (packet -> data == NULL) { enet_free (packet); return NULL; } if (data != NULL) memcpy (packet -> data, data, dataLength); } packet -> referenceCount = 0; packet -> flags = flags; packet -> dataLength = dataLength; packet -> freeCallback = NULL; packet -> userData = NULL; return packet; } /** Destroys the packet and deallocates its data. @param packet packet to be destroyed */ void enet_packet_destroy (ENetPacket * packet) { if (packet == NULL) return; if (packet -> freeCallback != NULL) (* packet -> freeCallback) (packet); if (! (packet -> flags & ENET_PACKET_FLAG_NO_ALLOCATE) && packet -> data != NULL) enet_free (packet -> data); enet_free (packet); } /** Attempts to resize the data in the packet to length specified in the dataLength parameter @param packet packet to resize @param dataLength new size for the packet data @returns 0 on success, < 0 on failure */ int enet_packet_resize (ENetPacket * packet, size_t dataLength) { enet_uint8 * newData; if (dataLength <= packet -> dataLength || (packet -> flags & ENET_PACKET_FLAG_NO_ALLOCATE)) { packet -> dataLength = dataLength; return 0; } newData = (enet_uint8 *) enet_malloc (dataLength); if (newData == NULL) return -1; memcpy (newData, packet -> data, packet -> dataLength); enet_free (packet -> data); packet -> data = newData; packet -> dataLength = dataLength; return 0; } static int initializedCRC32 = 0; static enet_uint32 crcTable [256]; static enet_uint32 reflect_crc (int val, int bits) { int result = 0, bit; for (bit = 0; bit < bits; bit ++) { if(val & 1) result |= 1 << (bits - 1 - bit); val >>= 1; } return result; } static void initialize_crc32 (void) { int byte; for (byte = 0; byte < 256; ++ byte) { enet_uint32 crc = reflect_crc (byte, 8) << 24; int offset; for(offset = 0; offset < 8; ++ offset) { if (crc & 0x80000000) crc = (crc << 1) ^ 0x04c11db7; else crc <<= 1; } crcTable [byte] = reflect_crc (crc, 32); } initializedCRC32 = 1; } enet_uint32 enet_crc32 (const ENetBuffer * buffers, size_t bufferCount) { enet_uint32 crc = 0xFFFFFFFF; if (! initializedCRC32) initialize_crc32 (); while (bufferCount -- > 0) { const enet_uint8 * data = (const enet_uint8 *) buffers -> data, * dataEnd = & data [buffers -> dataLength]; while (data < dataEnd) { crc = (crc >> 8) ^ crcTable [(crc & 0xFF) ^ *data++]; } ++ buffers; } return ENET_HOST_TO_NET_32 (~ crc); } /** @} */ ================================================ FILE: src/libraries/enet/libenet/peer.c ================================================ /** @file peer.c @brief ENet peer management functions */ #include #define ENET_BUILDING_LIB 1 #include "enet/enet.h" /** @defgroup peer ENet peer functions @{ */ /** Configures throttle parameter for a peer. Unreliable packets are dropped by ENet in response to the varying conditions of the Internet connection to the peer. The throttle represents a probability that an unreliable packet should not be dropped and thus sent by ENet to the peer. The lowest mean round trip time from the sending of a reliable packet to the receipt of its acknowledgement is measured over an amount of time specified by the interval parameter in milliseconds. If a measured round trip time happens to be significantly less than the mean round trip time measured over the interval, then the throttle probability is increased to allow more traffic by an amount specified in the acceleration parameter, which is a ratio to the ENET_PEER_PACKET_THROTTLE_SCALE constant. If a measured round trip time happens to be significantly greater than the mean round trip time measured over the interval, then the throttle probability is decreased to limit traffic by an amount specified in the deceleration parameter, which is a ratio to the ENET_PEER_PACKET_THROTTLE_SCALE constant. When the throttle has a value of ENET_PEER_PACKET_THROTTLE_SCALE, no unreliable packets are dropped by ENet, and so 100% of all unreliable packets will be sent. When the throttle has a value of 0, all unreliable packets are dropped by ENet, and so 0% of all unreliable packets will be sent. Intermediate values for the throttle represent intermediate probabilities between 0% and 100% of unreliable packets being sent. The bandwidth limits of the local and foreign hosts are taken into account to determine a sensible limit for the throttle probability above which it should not raise even in the best of conditions. @param peer peer to configure @param interval interval, in milliseconds, over which to measure lowest mean RTT; the default value is ENET_PEER_PACKET_THROTTLE_INTERVAL. @param acceleration rate at which to increase the throttle probability as mean RTT declines @param deceleration rate at which to decrease the throttle probability as mean RTT increases */ void enet_peer_throttle_configure (ENetPeer * peer, enet_uint32 interval, enet_uint32 acceleration, enet_uint32 deceleration) { ENetProtocol command; peer -> packetThrottleInterval = interval; peer -> packetThrottleAcceleration = acceleration; peer -> packetThrottleDeceleration = deceleration; command.header.command = ENET_PROTOCOL_COMMAND_THROTTLE_CONFIGURE | ENET_PROTOCOL_COMMAND_FLAG_ACKNOWLEDGE; command.header.channelID = 0xFF; command.throttleConfigure.packetThrottleInterval = ENET_HOST_TO_NET_32 (interval); command.throttleConfigure.packetThrottleAcceleration = ENET_HOST_TO_NET_32 (acceleration); command.throttleConfigure.packetThrottleDeceleration = ENET_HOST_TO_NET_32 (deceleration); enet_peer_queue_outgoing_command (peer, & command, NULL, 0, 0); } int enet_peer_throttle (ENetPeer * peer, enet_uint32 rtt) { if (peer -> lastRoundTripTime <= peer -> lastRoundTripTimeVariance) { peer -> packetThrottle = peer -> packetThrottleLimit; } else if (rtt < peer -> lastRoundTripTime) { peer -> packetThrottle += peer -> packetThrottleAcceleration; if (peer -> packetThrottle > peer -> packetThrottleLimit) peer -> packetThrottle = peer -> packetThrottleLimit; return 1; } else if (rtt > peer -> lastRoundTripTime + 2 * peer -> lastRoundTripTimeVariance) { if (peer -> packetThrottle > peer -> packetThrottleDeceleration) peer -> packetThrottle -= peer -> packetThrottleDeceleration; else peer -> packetThrottle = 0; return -1; } return 0; } /** Queues a packet to be sent. @param peer destination for the packet @param channelID channel on which to send @param packet packet to send @retval 0 on success @retval < 0 on failure */ int enet_peer_send (ENetPeer * peer, enet_uint8 channelID, ENetPacket * packet) { ENetChannel * channel = & peer -> channels [channelID]; ENetProtocol command; size_t fragmentLength; if (peer -> state != ENET_PEER_STATE_CONNECTED || channelID >= peer -> channelCount || packet -> dataLength > peer -> host -> maximumPacketSize) return -1; fragmentLength = peer -> mtu - sizeof (ENetProtocolHeader) - sizeof (ENetProtocolSendFragment); if (peer -> host -> checksum != NULL) fragmentLength -= sizeof(enet_uint32); if (packet -> dataLength > fragmentLength) { enet_uint32 fragmentCount = (packet -> dataLength + fragmentLength - 1) / fragmentLength, fragmentNumber, fragmentOffset; enet_uint8 commandNumber; enet_uint16 startSequenceNumber; ENetList fragments; ENetOutgoingCommand * fragment; if (fragmentCount > ENET_PROTOCOL_MAXIMUM_FRAGMENT_COUNT) return -1; if ((packet -> flags & (ENET_PACKET_FLAG_RELIABLE | ENET_PACKET_FLAG_UNRELIABLE_FRAGMENT)) == ENET_PACKET_FLAG_UNRELIABLE_FRAGMENT && channel -> outgoingUnreliableSequenceNumber < 0xFFFF) { commandNumber = ENET_PROTOCOL_COMMAND_SEND_UNRELIABLE_FRAGMENT; startSequenceNumber = ENET_HOST_TO_NET_16 (channel -> outgoingUnreliableSequenceNumber + 1); } else { commandNumber = ENET_PROTOCOL_COMMAND_SEND_FRAGMENT | ENET_PROTOCOL_COMMAND_FLAG_ACKNOWLEDGE; startSequenceNumber = ENET_HOST_TO_NET_16 (channel -> outgoingReliableSequenceNumber + 1); } enet_list_clear (& fragments); for (fragmentNumber = 0, fragmentOffset = 0; fragmentOffset < packet -> dataLength; ++ fragmentNumber, fragmentOffset += fragmentLength) { if (packet -> dataLength - fragmentOffset < fragmentLength) fragmentLength = packet -> dataLength - fragmentOffset; fragment = (ENetOutgoingCommand *) enet_malloc (sizeof (ENetOutgoingCommand)); if (fragment == NULL) { while (! enet_list_empty (& fragments)) { fragment = (ENetOutgoingCommand *) enet_list_remove (enet_list_begin (& fragments)); enet_free (fragment); } return -1; } fragment -> fragmentOffset = fragmentOffset; fragment -> fragmentLength = fragmentLength; fragment -> packet = packet; fragment -> command.header.command = commandNumber; fragment -> command.header.channelID = channelID; fragment -> command.sendFragment.startSequenceNumber = startSequenceNumber; fragment -> command.sendFragment.dataLength = ENET_HOST_TO_NET_16 (fragmentLength); fragment -> command.sendFragment.fragmentCount = ENET_HOST_TO_NET_32 (fragmentCount); fragment -> command.sendFragment.fragmentNumber = ENET_HOST_TO_NET_32 (fragmentNumber); fragment -> command.sendFragment.totalLength = ENET_HOST_TO_NET_32 (packet -> dataLength); fragment -> command.sendFragment.fragmentOffset = ENET_NET_TO_HOST_32 (fragmentOffset); enet_list_insert (enet_list_end (& fragments), fragment); } packet -> referenceCount += fragmentNumber; while (! enet_list_empty (& fragments)) { fragment = (ENetOutgoingCommand *) enet_list_remove (enet_list_begin (& fragments)); enet_peer_setup_outgoing_command (peer, fragment); } return 0; } command.header.channelID = channelID; if ((packet -> flags & (ENET_PACKET_FLAG_RELIABLE | ENET_PACKET_FLAG_UNSEQUENCED)) == ENET_PACKET_FLAG_UNSEQUENCED) { command.header.command = ENET_PROTOCOL_COMMAND_SEND_UNSEQUENCED | ENET_PROTOCOL_COMMAND_FLAG_UNSEQUENCED; command.sendUnsequenced.dataLength = ENET_HOST_TO_NET_16 (packet -> dataLength); } else if (packet -> flags & ENET_PACKET_FLAG_RELIABLE || channel -> outgoingUnreliableSequenceNumber >= 0xFFFF) { command.header.command = ENET_PROTOCOL_COMMAND_SEND_RELIABLE | ENET_PROTOCOL_COMMAND_FLAG_ACKNOWLEDGE; command.sendReliable.dataLength = ENET_HOST_TO_NET_16 (packet -> dataLength); } else { command.header.command = ENET_PROTOCOL_COMMAND_SEND_UNRELIABLE; command.sendUnreliable.dataLength = ENET_HOST_TO_NET_16 (packet -> dataLength); } if (enet_peer_queue_outgoing_command (peer, & command, packet, 0, packet -> dataLength) == NULL) return -1; return 0; } /** Attempts to dequeue any incoming queued packet. @param peer peer to dequeue packets from @param channelID holds the channel ID of the channel the packet was received on success @returns a pointer to the packet, or NULL if there are no available incoming queued packets */ ENetPacket * enet_peer_receive (ENetPeer * peer, enet_uint8 * channelID) { ENetIncomingCommand * incomingCommand; ENetPacket * packet; if (enet_list_empty (& peer -> dispatchedCommands)) return NULL; incomingCommand = (ENetIncomingCommand *) enet_list_remove (enet_list_begin (& peer -> dispatchedCommands)); if (channelID != NULL) * channelID = incomingCommand -> command.header.channelID; packet = incomingCommand -> packet; -- packet -> referenceCount; if (incomingCommand -> fragments != NULL) enet_free (incomingCommand -> fragments); enet_free (incomingCommand); peer -> totalWaitingData -= packet -> dataLength; return packet; } static void enet_peer_reset_outgoing_commands (ENetList * queue) { ENetOutgoingCommand * outgoingCommand; while (! enet_list_empty (queue)) { outgoingCommand = (ENetOutgoingCommand *) enet_list_remove (enet_list_begin (queue)); if (outgoingCommand -> packet != NULL) { -- outgoingCommand -> packet -> referenceCount; if (outgoingCommand -> packet -> referenceCount == 0) enet_packet_destroy (outgoingCommand -> packet); } enet_free (outgoingCommand); } } static void enet_peer_remove_incoming_commands (ENetList * queue, ENetListIterator startCommand, ENetListIterator endCommand) { ENetListIterator currentCommand; for (currentCommand = startCommand; currentCommand != endCommand; ) { ENetIncomingCommand * incomingCommand = (ENetIncomingCommand *) currentCommand; currentCommand = enet_list_next (currentCommand); enet_list_remove (& incomingCommand -> incomingCommandList); if (incomingCommand -> packet != NULL) { -- incomingCommand -> packet -> referenceCount; if (incomingCommand -> packet -> referenceCount == 0) enet_packet_destroy (incomingCommand -> packet); } if (incomingCommand -> fragments != NULL) enet_free (incomingCommand -> fragments); enet_free (incomingCommand); } } static void enet_peer_reset_incoming_commands (ENetList * queue) { enet_peer_remove_incoming_commands(queue, enet_list_begin (queue), enet_list_end (queue)); } void enet_peer_reset_queues (ENetPeer * peer) { ENetChannel * channel; if (peer -> needsDispatch) { enet_list_remove (& peer -> dispatchList); peer -> needsDispatch = 0; } while (! enet_list_empty (& peer -> acknowledgements)) enet_free (enet_list_remove (enet_list_begin (& peer -> acknowledgements))); enet_peer_reset_outgoing_commands (& peer -> sentReliableCommands); enet_peer_reset_outgoing_commands (& peer -> sentUnreliableCommands); enet_peer_reset_outgoing_commands (& peer -> outgoingReliableCommands); enet_peer_reset_outgoing_commands (& peer -> outgoingUnreliableCommands); enet_peer_reset_incoming_commands (& peer -> dispatchedCommands); if (peer -> channels != NULL && peer -> channelCount > 0) { for (channel = peer -> channels; channel < & peer -> channels [peer -> channelCount]; ++ channel) { enet_peer_reset_incoming_commands (& channel -> incomingReliableCommands); enet_peer_reset_incoming_commands (& channel -> incomingUnreliableCommands); } enet_free (peer -> channels); } peer -> channels = NULL; peer -> channelCount = 0; } void enet_peer_on_connect (ENetPeer * peer) { if (peer -> state != ENET_PEER_STATE_CONNECTED && peer -> state != ENET_PEER_STATE_DISCONNECT_LATER) { if (peer -> incomingBandwidth != 0) ++ peer -> host -> bandwidthLimitedPeers; ++ peer -> host -> connectedPeers; } } void enet_peer_on_disconnect (ENetPeer * peer) { if (peer -> state == ENET_PEER_STATE_CONNECTED || peer -> state == ENET_PEER_STATE_DISCONNECT_LATER) { if (peer -> incomingBandwidth != 0) -- peer -> host -> bandwidthLimitedPeers; -- peer -> host -> connectedPeers; } } /** Forcefully disconnects a peer. @param peer peer to forcefully disconnect @remarks The foreign host represented by the peer is not notified of the disconnection and will timeout on its connection to the local host. */ void enet_peer_reset (ENetPeer * peer) { enet_peer_on_disconnect (peer); peer -> outgoingPeerID = ENET_PROTOCOL_MAXIMUM_PEER_ID; peer -> connectID = 0; peer -> state = ENET_PEER_STATE_DISCONNECTED; peer -> incomingBandwidth = 0; peer -> outgoingBandwidth = 0; peer -> incomingBandwidthThrottleEpoch = 0; peer -> outgoingBandwidthThrottleEpoch = 0; peer -> incomingDataTotal = 0; peer -> outgoingDataTotal = 0; peer -> lastSendTime = 0; peer -> lastReceiveTime = 0; peer -> nextTimeout = 0; peer -> earliestTimeout = 0; peer -> packetLossEpoch = 0; peer -> packetsSent = 0; peer -> packetsLost = 0; peer -> packetLoss = 0; peer -> packetLossVariance = 0; peer -> packetThrottle = ENET_PEER_DEFAULT_PACKET_THROTTLE; peer -> packetThrottleLimit = ENET_PEER_PACKET_THROTTLE_SCALE; peer -> packetThrottleCounter = 0; peer -> packetThrottleEpoch = 0; peer -> packetThrottleAcceleration = ENET_PEER_PACKET_THROTTLE_ACCELERATION; peer -> packetThrottleDeceleration = ENET_PEER_PACKET_THROTTLE_DECELERATION; peer -> packetThrottleInterval = ENET_PEER_PACKET_THROTTLE_INTERVAL; peer -> pingInterval = ENET_PEER_PING_INTERVAL; peer -> timeoutLimit = ENET_PEER_TIMEOUT_LIMIT; peer -> timeoutMinimum = ENET_PEER_TIMEOUT_MINIMUM; peer -> timeoutMaximum = ENET_PEER_TIMEOUT_MAXIMUM; peer -> lastRoundTripTime = ENET_PEER_DEFAULT_ROUND_TRIP_TIME; peer -> lowestRoundTripTime = ENET_PEER_DEFAULT_ROUND_TRIP_TIME; peer -> lastRoundTripTimeVariance = 0; peer -> highestRoundTripTimeVariance = 0; peer -> roundTripTime = ENET_PEER_DEFAULT_ROUND_TRIP_TIME; peer -> roundTripTimeVariance = 0; peer -> mtu = peer -> host -> mtu; peer -> reliableDataInTransit = 0; peer -> outgoingReliableSequenceNumber = 0; peer -> windowSize = ENET_PROTOCOL_MAXIMUM_WINDOW_SIZE; peer -> incomingUnsequencedGroup = 0; peer -> outgoingUnsequencedGroup = 0; peer -> eventData = 0; peer -> totalWaitingData = 0; memset (peer -> unsequencedWindow, 0, sizeof (peer -> unsequencedWindow)); enet_peer_reset_queues (peer); } /** Sends a ping request to a peer. @param peer destination for the ping request @remarks ping requests factor into the mean round trip time as designated by the roundTripTime field in the ENetPeer structure. ENet automatically pings all connected peers at regular intervals, however, this function may be called to ensure more frequent ping requests. */ void enet_peer_ping (ENetPeer * peer) { ENetProtocol command; if (peer -> state != ENET_PEER_STATE_CONNECTED) return; command.header.command = ENET_PROTOCOL_COMMAND_PING | ENET_PROTOCOL_COMMAND_FLAG_ACKNOWLEDGE; command.header.channelID = 0xFF; enet_peer_queue_outgoing_command (peer, & command, NULL, 0, 0); } /** Sets the interval at which pings will be sent to a peer. Pings are used both to monitor the liveness of the connection and also to dynamically adjust the throttle during periods of low traffic so that the throttle has reasonable responsiveness during traffic spikes. @param peer the peer to adjust @param pingInterval the interval at which to send pings; defaults to ENET_PEER_PING_INTERVAL if 0 */ void enet_peer_ping_interval (ENetPeer * peer, enet_uint32 pingInterval) { peer -> pingInterval = pingInterval ? pingInterval : ENET_PEER_PING_INTERVAL; } /** Sets the timeout parameters for a peer. The timeout parameter control how and when a peer will timeout from a failure to acknowledge reliable traffic. Timeout values use an exponential backoff mechanism, where if a reliable packet is not acknowledge within some multiple of the average RTT plus a variance tolerance, the timeout will be doubled until it reaches a set limit. If the timeout is thus at this limit and reliable packets have been sent but not acknowledged within a certain minimum time period, the peer will be disconnected. Alternatively, if reliable packets have been sent but not acknowledged for a certain maximum time period, the peer will be disconnected regardless of the current timeout limit value. @param peer the peer to adjust @param timeoutLimit the timeout limit; defaults to ENET_PEER_TIMEOUT_LIMIT if 0 @param timeoutMinimum the timeout minimum; defaults to ENET_PEER_TIMEOUT_MINIMUM if 0 @param timeoutMaximum the timeout maximum; defaults to ENET_PEER_TIMEOUT_MAXIMUM if 0 */ void enet_peer_timeout (ENetPeer * peer, enet_uint32 timeoutLimit, enet_uint32 timeoutMinimum, enet_uint32 timeoutMaximum) { peer -> timeoutLimit = timeoutLimit ? timeoutLimit : ENET_PEER_TIMEOUT_LIMIT; peer -> timeoutMinimum = timeoutMinimum ? timeoutMinimum : ENET_PEER_TIMEOUT_MINIMUM; peer -> timeoutMaximum = timeoutMaximum ? timeoutMaximum : ENET_PEER_TIMEOUT_MAXIMUM; } /** Force an immediate disconnection from a peer. @param peer peer to disconnect @param data data describing the disconnection @remarks No ENET_EVENT_DISCONNECT event will be generated. The foreign peer is not guaranteed to receive the disconnect notification, and is reset immediately upon return from this function. */ void enet_peer_disconnect_now (ENetPeer * peer, enet_uint32 data) { ENetProtocol command; if (peer -> state == ENET_PEER_STATE_DISCONNECTED) return; if (peer -> state != ENET_PEER_STATE_ZOMBIE && peer -> state != ENET_PEER_STATE_DISCONNECTING) { enet_peer_reset_queues (peer); command.header.command = ENET_PROTOCOL_COMMAND_DISCONNECT | ENET_PROTOCOL_COMMAND_FLAG_UNSEQUENCED; command.header.channelID = 0xFF; command.disconnect.data = ENET_HOST_TO_NET_32 (data); enet_peer_queue_outgoing_command (peer, & command, NULL, 0, 0); enet_host_flush (peer -> host); } enet_peer_reset (peer); } /** Request a disconnection from a peer. @param peer peer to request a disconnection @param data data describing the disconnection @remarks An ENET_EVENT_DISCONNECT event will be generated by enet_host_service() once the disconnection is complete. */ void enet_peer_disconnect (ENetPeer * peer, enet_uint32 data) { ENetProtocol command; if (peer -> state == ENET_PEER_STATE_DISCONNECTING || peer -> state == ENET_PEER_STATE_DISCONNECTED || peer -> state == ENET_PEER_STATE_ACKNOWLEDGING_DISCONNECT || peer -> state == ENET_PEER_STATE_ZOMBIE) return; enet_peer_reset_queues (peer); command.header.command = ENET_PROTOCOL_COMMAND_DISCONNECT; command.header.channelID = 0xFF; command.disconnect.data = ENET_HOST_TO_NET_32 (data); if (peer -> state == ENET_PEER_STATE_CONNECTED || peer -> state == ENET_PEER_STATE_DISCONNECT_LATER) command.header.command |= ENET_PROTOCOL_COMMAND_FLAG_ACKNOWLEDGE; else command.header.command |= ENET_PROTOCOL_COMMAND_FLAG_UNSEQUENCED; enet_peer_queue_outgoing_command (peer, & command, NULL, 0, 0); if (peer -> state == ENET_PEER_STATE_CONNECTED || peer -> state == ENET_PEER_STATE_DISCONNECT_LATER) { enet_peer_on_disconnect (peer); peer -> state = ENET_PEER_STATE_DISCONNECTING; } else { enet_host_flush (peer -> host); enet_peer_reset (peer); } } /** Request a disconnection from a peer, but only after all queued outgoing packets are sent. @param peer peer to request a disconnection @param data data describing the disconnection @remarks An ENET_EVENT_DISCONNECT event will be generated by enet_host_service() once the disconnection is complete. */ void enet_peer_disconnect_later (ENetPeer * peer, enet_uint32 data) { if ((peer -> state == ENET_PEER_STATE_CONNECTED || peer -> state == ENET_PEER_STATE_DISCONNECT_LATER) && ! (enet_list_empty (& peer -> outgoingReliableCommands) && enet_list_empty (& peer -> outgoingUnreliableCommands) && enet_list_empty (& peer -> sentReliableCommands))) { peer -> state = ENET_PEER_STATE_DISCONNECT_LATER; peer -> eventData = data; } else enet_peer_disconnect (peer, data); } ENetAcknowledgement * enet_peer_queue_acknowledgement (ENetPeer * peer, const ENetProtocol * command, enet_uint16 sentTime) { ENetAcknowledgement * acknowledgement; if (command -> header.channelID < peer -> channelCount) { ENetChannel * channel = & peer -> channels [command -> header.channelID]; enet_uint16 reliableWindow = command -> header.reliableSequenceNumber / ENET_PEER_RELIABLE_WINDOW_SIZE, currentWindow = channel -> incomingReliableSequenceNumber / ENET_PEER_RELIABLE_WINDOW_SIZE; if (command -> header.reliableSequenceNumber < channel -> incomingReliableSequenceNumber) reliableWindow += ENET_PEER_RELIABLE_WINDOWS; if (reliableWindow >= currentWindow + ENET_PEER_FREE_RELIABLE_WINDOWS - 1 && reliableWindow <= currentWindow + ENET_PEER_FREE_RELIABLE_WINDOWS) return NULL; } acknowledgement = (ENetAcknowledgement *) enet_malloc (sizeof (ENetAcknowledgement)); if (acknowledgement == NULL) return NULL; peer -> outgoingDataTotal += sizeof (ENetProtocolAcknowledge); acknowledgement -> sentTime = sentTime; acknowledgement -> command = * command; enet_list_insert (enet_list_end (& peer -> acknowledgements), acknowledgement); return acknowledgement; } void enet_peer_setup_outgoing_command (ENetPeer * peer, ENetOutgoingCommand * outgoingCommand) { ENetChannel * channel = & peer -> channels [outgoingCommand -> command.header.channelID]; peer -> outgoingDataTotal += enet_protocol_command_size (outgoingCommand -> command.header.command) + outgoingCommand -> fragmentLength; if (outgoingCommand -> command.header.channelID == 0xFF) { ++ peer -> outgoingReliableSequenceNumber; outgoingCommand -> reliableSequenceNumber = peer -> outgoingReliableSequenceNumber; outgoingCommand -> unreliableSequenceNumber = 0; } else if (outgoingCommand -> command.header.command & ENET_PROTOCOL_COMMAND_FLAG_ACKNOWLEDGE) { ++ channel -> outgoingReliableSequenceNumber; channel -> outgoingUnreliableSequenceNumber = 0; outgoingCommand -> reliableSequenceNumber = channel -> outgoingReliableSequenceNumber; outgoingCommand -> unreliableSequenceNumber = 0; } else if (outgoingCommand -> command.header.command & ENET_PROTOCOL_COMMAND_FLAG_UNSEQUENCED) { ++ peer -> outgoingUnsequencedGroup; outgoingCommand -> reliableSequenceNumber = 0; outgoingCommand -> unreliableSequenceNumber = 0; } else { if (outgoingCommand -> fragmentOffset == 0) ++ channel -> outgoingUnreliableSequenceNumber; outgoingCommand -> reliableSequenceNumber = channel -> outgoingReliableSequenceNumber; outgoingCommand -> unreliableSequenceNumber = channel -> outgoingUnreliableSequenceNumber; } outgoingCommand -> sendAttempts = 0; outgoingCommand -> sentTime = 0; outgoingCommand -> roundTripTimeout = 0; outgoingCommand -> roundTripTimeoutLimit = 0; outgoingCommand -> command.header.reliableSequenceNumber = ENET_HOST_TO_NET_16 (outgoingCommand -> reliableSequenceNumber); switch (outgoingCommand -> command.header.command & ENET_PROTOCOL_COMMAND_MASK) { case ENET_PROTOCOL_COMMAND_SEND_UNRELIABLE: outgoingCommand -> command.sendUnreliable.unreliableSequenceNumber = ENET_HOST_TO_NET_16 (outgoingCommand -> unreliableSequenceNumber); break; case ENET_PROTOCOL_COMMAND_SEND_UNSEQUENCED: outgoingCommand -> command.sendUnsequenced.unsequencedGroup = ENET_HOST_TO_NET_16 (peer -> outgoingUnsequencedGroup); break; default: break; } if (outgoingCommand -> command.header.command & ENET_PROTOCOL_COMMAND_FLAG_ACKNOWLEDGE) enet_list_insert (enet_list_end (& peer -> outgoingReliableCommands), outgoingCommand); else enet_list_insert (enet_list_end (& peer -> outgoingUnreliableCommands), outgoingCommand); } ENetOutgoingCommand * enet_peer_queue_outgoing_command (ENetPeer * peer, const ENetProtocol * command, ENetPacket * packet, enet_uint32 offset, enet_uint16 length) { ENetOutgoingCommand * outgoingCommand = (ENetOutgoingCommand *) enet_malloc (sizeof (ENetOutgoingCommand)); if (outgoingCommand == NULL) return NULL; outgoingCommand -> command = * command; outgoingCommand -> fragmentOffset = offset; outgoingCommand -> fragmentLength = length; outgoingCommand -> packet = packet; if (packet != NULL) ++ packet -> referenceCount; enet_peer_setup_outgoing_command (peer, outgoingCommand); return outgoingCommand; } void enet_peer_dispatch_incoming_unreliable_commands (ENetPeer * peer, ENetChannel * channel) { ENetListIterator droppedCommand, startCommand, currentCommand; for (droppedCommand = startCommand = currentCommand = enet_list_begin (& channel -> incomingUnreliableCommands); currentCommand != enet_list_end (& channel -> incomingUnreliableCommands); currentCommand = enet_list_next (currentCommand)) { ENetIncomingCommand * incomingCommand = (ENetIncomingCommand *) currentCommand; if ((incomingCommand -> command.header.command & ENET_PROTOCOL_COMMAND_MASK) == ENET_PROTOCOL_COMMAND_SEND_UNSEQUENCED) continue; if (incomingCommand -> reliableSequenceNumber == channel -> incomingReliableSequenceNumber) { if (incomingCommand -> fragmentsRemaining <= 0) { channel -> incomingUnreliableSequenceNumber = incomingCommand -> unreliableSequenceNumber; continue; } if (startCommand != currentCommand) { enet_list_move (enet_list_end (& peer -> dispatchedCommands), startCommand, enet_list_previous (currentCommand)); if (! peer -> needsDispatch) { enet_list_insert (enet_list_end (& peer -> host -> dispatchQueue), & peer -> dispatchList); peer -> needsDispatch = 1; } droppedCommand = currentCommand; } else if (droppedCommand != currentCommand) droppedCommand = enet_list_previous (currentCommand); } else { enet_uint16 reliableWindow = incomingCommand -> reliableSequenceNumber / ENET_PEER_RELIABLE_WINDOW_SIZE, currentWindow = channel -> incomingReliableSequenceNumber / ENET_PEER_RELIABLE_WINDOW_SIZE; if (incomingCommand -> reliableSequenceNumber < channel -> incomingReliableSequenceNumber) reliableWindow += ENET_PEER_RELIABLE_WINDOWS; if (reliableWindow >= currentWindow && reliableWindow < currentWindow + ENET_PEER_FREE_RELIABLE_WINDOWS - 1) break; droppedCommand = enet_list_next (currentCommand); if (startCommand != currentCommand) { enet_list_move (enet_list_end (& peer -> dispatchedCommands), startCommand, enet_list_previous (currentCommand)); if (! peer -> needsDispatch) { enet_list_insert (enet_list_end (& peer -> host -> dispatchQueue), & peer -> dispatchList); peer -> needsDispatch = 1; } } } startCommand = enet_list_next (currentCommand); } if (startCommand != currentCommand) { enet_list_move (enet_list_end (& peer -> dispatchedCommands), startCommand, enet_list_previous (currentCommand)); if (! peer -> needsDispatch) { enet_list_insert (enet_list_end (& peer -> host -> dispatchQueue), & peer -> dispatchList); peer -> needsDispatch = 1; } droppedCommand = currentCommand; } enet_peer_remove_incoming_commands (& channel -> incomingUnreliableCommands, enet_list_begin (& channel -> incomingUnreliableCommands), droppedCommand); } void enet_peer_dispatch_incoming_reliable_commands (ENetPeer * peer, ENetChannel * channel) { ENetListIterator currentCommand; for (currentCommand = enet_list_begin (& channel -> incomingReliableCommands); currentCommand != enet_list_end (& channel -> incomingReliableCommands); currentCommand = enet_list_next (currentCommand)) { ENetIncomingCommand * incomingCommand = (ENetIncomingCommand *) currentCommand; if (incomingCommand -> fragmentsRemaining > 0 || incomingCommand -> reliableSequenceNumber != (enet_uint16) (channel -> incomingReliableSequenceNumber + 1)) break; channel -> incomingReliableSequenceNumber = incomingCommand -> reliableSequenceNumber; if (incomingCommand -> fragmentCount > 0) channel -> incomingReliableSequenceNumber += incomingCommand -> fragmentCount - 1; } if (currentCommand == enet_list_begin (& channel -> incomingReliableCommands)) return; channel -> incomingUnreliableSequenceNumber = 0; enet_list_move (enet_list_end (& peer -> dispatchedCommands), enet_list_begin (& channel -> incomingReliableCommands), enet_list_previous (currentCommand)); if (! peer -> needsDispatch) { enet_list_insert (enet_list_end (& peer -> host -> dispatchQueue), & peer -> dispatchList); peer -> needsDispatch = 1; } if (! enet_list_empty (& channel -> incomingUnreliableCommands)) enet_peer_dispatch_incoming_unreliable_commands (peer, channel); } ENetIncomingCommand * enet_peer_queue_incoming_command (ENetPeer * peer, const ENetProtocol * command, const void * data, size_t dataLength, enet_uint32 flags, enet_uint32 fragmentCount) { static ENetIncomingCommand dummyCommand; ENetChannel * channel = & peer -> channels [command -> header.channelID]; enet_uint32 unreliableSequenceNumber = 0, reliableSequenceNumber = 0; enet_uint16 reliableWindow, currentWindow; ENetIncomingCommand * incomingCommand; ENetListIterator currentCommand; ENetPacket * packet = NULL; if (peer -> state == ENET_PEER_STATE_DISCONNECT_LATER) goto discardCommand; if ((command -> header.command & ENET_PROTOCOL_COMMAND_MASK) != ENET_PROTOCOL_COMMAND_SEND_UNSEQUENCED) { reliableSequenceNumber = command -> header.reliableSequenceNumber; reliableWindow = reliableSequenceNumber / ENET_PEER_RELIABLE_WINDOW_SIZE; currentWindow = channel -> incomingReliableSequenceNumber / ENET_PEER_RELIABLE_WINDOW_SIZE; if (reliableSequenceNumber < channel -> incomingReliableSequenceNumber) reliableWindow += ENET_PEER_RELIABLE_WINDOWS; if (reliableWindow < currentWindow || reliableWindow >= currentWindow + ENET_PEER_FREE_RELIABLE_WINDOWS - 1) goto discardCommand; } switch (command -> header.command & ENET_PROTOCOL_COMMAND_MASK) { case ENET_PROTOCOL_COMMAND_SEND_FRAGMENT: case ENET_PROTOCOL_COMMAND_SEND_RELIABLE: if (reliableSequenceNumber == channel -> incomingReliableSequenceNumber) goto discardCommand; for (currentCommand = enet_list_previous (enet_list_end (& channel -> incomingReliableCommands)); currentCommand != enet_list_end (& channel -> incomingReliableCommands); currentCommand = enet_list_previous (currentCommand)) { incomingCommand = (ENetIncomingCommand *) currentCommand; if (reliableSequenceNumber >= channel -> incomingReliableSequenceNumber) { if (incomingCommand -> reliableSequenceNumber < channel -> incomingReliableSequenceNumber) continue; } else if (incomingCommand -> reliableSequenceNumber >= channel -> incomingReliableSequenceNumber) break; if (incomingCommand -> reliableSequenceNumber <= reliableSequenceNumber) { if (incomingCommand -> reliableSequenceNumber < reliableSequenceNumber) break; goto discardCommand; } } break; case ENET_PROTOCOL_COMMAND_SEND_UNRELIABLE: case ENET_PROTOCOL_COMMAND_SEND_UNRELIABLE_FRAGMENT: unreliableSequenceNumber = ENET_NET_TO_HOST_16 (command -> sendUnreliable.unreliableSequenceNumber); if (reliableSequenceNumber == channel -> incomingReliableSequenceNumber && unreliableSequenceNumber <= channel -> incomingUnreliableSequenceNumber) goto discardCommand; for (currentCommand = enet_list_previous (enet_list_end (& channel -> incomingUnreliableCommands)); currentCommand != enet_list_end (& channel -> incomingUnreliableCommands); currentCommand = enet_list_previous (currentCommand)) { incomingCommand = (ENetIncomingCommand *) currentCommand; if ((command -> header.command & ENET_PROTOCOL_COMMAND_MASK) == ENET_PROTOCOL_COMMAND_SEND_UNSEQUENCED) continue; if (reliableSequenceNumber >= channel -> incomingReliableSequenceNumber) { if (incomingCommand -> reliableSequenceNumber < channel -> incomingReliableSequenceNumber) continue; } else if (incomingCommand -> reliableSequenceNumber >= channel -> incomingReliableSequenceNumber) break; if (incomingCommand -> reliableSequenceNumber < reliableSequenceNumber) break; if (incomingCommand -> reliableSequenceNumber > reliableSequenceNumber) continue; if (incomingCommand -> unreliableSequenceNumber <= unreliableSequenceNumber) { if (incomingCommand -> unreliableSequenceNumber < unreliableSequenceNumber) break; goto discardCommand; } } break; case ENET_PROTOCOL_COMMAND_SEND_UNSEQUENCED: currentCommand = enet_list_end (& channel -> incomingUnreliableCommands); break; default: goto discardCommand; } if (peer -> totalWaitingData >= peer -> host -> maximumWaitingData) goto notifyError; packet = enet_packet_create (data, dataLength, flags); if (packet == NULL) goto notifyError; incomingCommand = (ENetIncomingCommand *) enet_malloc (sizeof (ENetIncomingCommand)); if (incomingCommand == NULL) goto notifyError; incomingCommand -> reliableSequenceNumber = command -> header.reliableSequenceNumber; incomingCommand -> unreliableSequenceNumber = unreliableSequenceNumber & 0xFFFF; incomingCommand -> command = * command; incomingCommand -> fragmentCount = fragmentCount; incomingCommand -> fragmentsRemaining = fragmentCount; incomingCommand -> packet = packet; incomingCommand -> fragments = NULL; if (fragmentCount > 0) { if (fragmentCount <= ENET_PROTOCOL_MAXIMUM_FRAGMENT_COUNT) incomingCommand -> fragments = (enet_uint32 *) enet_malloc ((fragmentCount + 31) / 32 * sizeof (enet_uint32)); if (incomingCommand -> fragments == NULL) { enet_free (incomingCommand); goto notifyError; } memset (incomingCommand -> fragments, 0, (fragmentCount + 31) / 32 * sizeof (enet_uint32)); } if (packet != NULL) { ++ packet -> referenceCount; peer -> totalWaitingData += packet -> dataLength; } enet_list_insert (enet_list_next (currentCommand), incomingCommand); switch (command -> header.command & ENET_PROTOCOL_COMMAND_MASK) { case ENET_PROTOCOL_COMMAND_SEND_FRAGMENT: case ENET_PROTOCOL_COMMAND_SEND_RELIABLE: enet_peer_dispatch_incoming_reliable_commands (peer, channel); break; default: enet_peer_dispatch_incoming_unreliable_commands (peer, channel); break; } return incomingCommand; discardCommand: if (fragmentCount > 0) goto notifyError; if (packet != NULL && packet -> referenceCount == 0) enet_packet_destroy (packet); return & dummyCommand; notifyError: if (packet != NULL && packet -> referenceCount == 0) enet_packet_destroy (packet); return NULL; } /** @} */ ================================================ FILE: src/libraries/enet/libenet/protocol.c ================================================ /** @file protocol.c @brief ENet protocol functions */ #include #include #define ENET_BUILDING_LIB 1 #include "enet/utility.h" #include "enet/time.h" #include "enet/enet.h" static size_t commandSizes [ENET_PROTOCOL_COMMAND_COUNT] = { 0, sizeof (ENetProtocolAcknowledge), sizeof (ENetProtocolConnect), sizeof (ENetProtocolVerifyConnect), sizeof (ENetProtocolDisconnect), sizeof (ENetProtocolPing), sizeof (ENetProtocolSendReliable), sizeof (ENetProtocolSendUnreliable), sizeof (ENetProtocolSendFragment), sizeof (ENetProtocolSendUnsequenced), sizeof (ENetProtocolBandwidthLimit), sizeof (ENetProtocolThrottleConfigure), sizeof (ENetProtocolSendFragment) }; size_t enet_protocol_command_size (enet_uint8 commandNumber) { return commandSizes [commandNumber & ENET_PROTOCOL_COMMAND_MASK]; } static void enet_protocol_change_state (ENetHost * host, ENetPeer * peer, ENetPeerState state) { if (state == ENET_PEER_STATE_CONNECTED || state == ENET_PEER_STATE_DISCONNECT_LATER) enet_peer_on_connect (peer); else enet_peer_on_disconnect (peer); peer -> state = state; } static void enet_protocol_dispatch_state (ENetHost * host, ENetPeer * peer, ENetPeerState state) { enet_protocol_change_state (host, peer, state); if (! peer -> needsDispatch) { enet_list_insert (enet_list_end (& host -> dispatchQueue), & peer -> dispatchList); peer -> needsDispatch = 1; } } static int enet_protocol_dispatch_incoming_commands (ENetHost * host, ENetEvent * event) { while (! enet_list_empty (& host -> dispatchQueue)) { ENetPeer * peer = (ENetPeer *) enet_list_remove (enet_list_begin (& host -> dispatchQueue)); peer -> needsDispatch = 0; switch (peer -> state) { case ENET_PEER_STATE_CONNECTION_PENDING: case ENET_PEER_STATE_CONNECTION_SUCCEEDED: enet_protocol_change_state (host, peer, ENET_PEER_STATE_CONNECTED); event -> type = ENET_EVENT_TYPE_CONNECT; event -> peer = peer; event -> data = peer -> eventData; return 1; case ENET_PEER_STATE_ZOMBIE: host -> recalculateBandwidthLimits = 1; event -> type = ENET_EVENT_TYPE_DISCONNECT; event -> peer = peer; event -> data = peer -> eventData; enet_peer_reset (peer); return 1; case ENET_PEER_STATE_CONNECTED: if (enet_list_empty (& peer -> dispatchedCommands)) continue; event -> packet = enet_peer_receive (peer, & event -> channelID); if (event -> packet == NULL) continue; event -> type = ENET_EVENT_TYPE_RECEIVE; event -> peer = peer; if (! enet_list_empty (& peer -> dispatchedCommands)) { peer -> needsDispatch = 1; enet_list_insert (enet_list_end (& host -> dispatchQueue), & peer -> dispatchList); } return 1; default: break; } } return 0; } static void enet_protocol_notify_connect (ENetHost * host, ENetPeer * peer, ENetEvent * event) { host -> recalculateBandwidthLimits = 1; if (event != NULL) { enet_protocol_change_state (host, peer, ENET_PEER_STATE_CONNECTED); event -> type = ENET_EVENT_TYPE_CONNECT; event -> peer = peer; event -> data = peer -> eventData; } else enet_protocol_dispatch_state (host, peer, peer -> state == ENET_PEER_STATE_CONNECTING ? ENET_PEER_STATE_CONNECTION_SUCCEEDED : ENET_PEER_STATE_CONNECTION_PENDING); } static void enet_protocol_notify_disconnect (ENetHost * host, ENetPeer * peer, ENetEvent * event) { if (peer -> state >= ENET_PEER_STATE_CONNECTION_PENDING) host -> recalculateBandwidthLimits = 1; if (peer -> state != ENET_PEER_STATE_CONNECTING && peer -> state < ENET_PEER_STATE_CONNECTION_SUCCEEDED) enet_peer_reset (peer); else if (event != NULL) { event -> type = ENET_EVENT_TYPE_DISCONNECT; event -> peer = peer; event -> data = 0; enet_peer_reset (peer); } else { peer -> eventData = 0; enet_protocol_dispatch_state (host, peer, ENET_PEER_STATE_ZOMBIE); } } static void enet_protocol_remove_sent_unreliable_commands (ENetPeer * peer) { ENetOutgoingCommand * outgoingCommand; while (! enet_list_empty (& peer -> sentUnreliableCommands)) { outgoingCommand = (ENetOutgoingCommand *) enet_list_front (& peer -> sentUnreliableCommands); enet_list_remove (& outgoingCommand -> outgoingCommandList); if (outgoingCommand -> packet != NULL) { -- outgoingCommand -> packet -> referenceCount; if (outgoingCommand -> packet -> referenceCount == 0) { outgoingCommand -> packet -> flags |= ENET_PACKET_FLAG_SENT; enet_packet_destroy (outgoingCommand -> packet); } } enet_free (outgoingCommand); } } static ENetProtocolCommand enet_protocol_remove_sent_reliable_command (ENetPeer * peer, enet_uint16 reliableSequenceNumber, enet_uint8 channelID) { ENetOutgoingCommand * outgoingCommand = NULL; ENetListIterator currentCommand; ENetProtocolCommand commandNumber; int wasSent = 1; for (currentCommand = enet_list_begin (& peer -> sentReliableCommands); currentCommand != enet_list_end (& peer -> sentReliableCommands); currentCommand = enet_list_next (currentCommand)) { outgoingCommand = (ENetOutgoingCommand *) currentCommand; if (outgoingCommand -> reliableSequenceNumber == reliableSequenceNumber && outgoingCommand -> command.header.channelID == channelID) break; } if (currentCommand == enet_list_end (& peer -> sentReliableCommands)) { for (currentCommand = enet_list_begin (& peer -> outgoingReliableCommands); currentCommand != enet_list_end (& peer -> outgoingReliableCommands); currentCommand = enet_list_next (currentCommand)) { outgoingCommand = (ENetOutgoingCommand *) currentCommand; if (outgoingCommand -> sendAttempts < 1) return ENET_PROTOCOL_COMMAND_NONE; if (outgoingCommand -> reliableSequenceNumber == reliableSequenceNumber && outgoingCommand -> command.header.channelID == channelID) break; } if (currentCommand == enet_list_end (& peer -> outgoingReliableCommands)) return ENET_PROTOCOL_COMMAND_NONE; wasSent = 0; } if (outgoingCommand == NULL) return ENET_PROTOCOL_COMMAND_NONE; if (channelID < peer -> channelCount) { ENetChannel * channel = & peer -> channels [channelID]; enet_uint16 reliableWindow = reliableSequenceNumber / ENET_PEER_RELIABLE_WINDOW_SIZE; if (channel -> reliableWindows [reliableWindow] > 0) { -- channel -> reliableWindows [reliableWindow]; if (! channel -> reliableWindows [reliableWindow]) channel -> usedReliableWindows &= ~ (1 << reliableWindow); } } commandNumber = (ENetProtocolCommand) (outgoingCommand -> command.header.command & ENET_PROTOCOL_COMMAND_MASK); enet_list_remove (& outgoingCommand -> outgoingCommandList); if (outgoingCommand -> packet != NULL) { if (wasSent) peer -> reliableDataInTransit -= outgoingCommand -> fragmentLength; -- outgoingCommand -> packet -> referenceCount; if (outgoingCommand -> packet -> referenceCount == 0) { outgoingCommand -> packet -> flags |= ENET_PACKET_FLAG_SENT; enet_packet_destroy (outgoingCommand -> packet); } } enet_free (outgoingCommand); if (enet_list_empty (& peer -> sentReliableCommands)) return commandNumber; outgoingCommand = (ENetOutgoingCommand *) enet_list_front (& peer -> sentReliableCommands); peer -> nextTimeout = outgoingCommand -> sentTime + outgoingCommand -> roundTripTimeout; return commandNumber; } static ENetPeer * enet_protocol_handle_connect (ENetHost * host, ENetProtocolHeader * header, ENetProtocol * command) { enet_uint8 incomingSessionID, outgoingSessionID; enet_uint32 mtu, windowSize; ENetChannel * channel; size_t channelCount, duplicatePeers = 0; ENetPeer * currentPeer, * peer = NULL; ENetProtocol verifyCommand; channelCount = ENET_NET_TO_HOST_32 (command -> connect.channelCount); if (channelCount < ENET_PROTOCOL_MINIMUM_CHANNEL_COUNT || channelCount > ENET_PROTOCOL_MAXIMUM_CHANNEL_COUNT) return NULL; for (currentPeer = host -> peers; currentPeer < & host -> peers [host -> peerCount]; ++ currentPeer) { if (currentPeer -> state == ENET_PEER_STATE_DISCONNECTED) { if (peer == NULL) peer = currentPeer; } else if (currentPeer -> state != ENET_PEER_STATE_CONNECTING && currentPeer -> address.host == host -> receivedAddress.host) { if (currentPeer -> address.port == host -> receivedAddress.port && currentPeer -> connectID == command -> connect.connectID) return NULL; ++ duplicatePeers; } } if (peer == NULL || duplicatePeers >= host -> duplicatePeers) return NULL; if (channelCount > host -> channelLimit) channelCount = host -> channelLimit; peer -> channels = (ENetChannel *) enet_malloc (channelCount * sizeof (ENetChannel)); if (peer -> channels == NULL) return NULL; peer -> channelCount = channelCount; peer -> state = ENET_PEER_STATE_ACKNOWLEDGING_CONNECT; peer -> connectID = command -> connect.connectID; peer -> address = host -> receivedAddress; peer -> outgoingPeerID = ENET_NET_TO_HOST_16 (command -> connect.outgoingPeerID); peer -> incomingBandwidth = ENET_NET_TO_HOST_32 (command -> connect.incomingBandwidth); peer -> outgoingBandwidth = ENET_NET_TO_HOST_32 (command -> connect.outgoingBandwidth); peer -> packetThrottleInterval = ENET_NET_TO_HOST_32 (command -> connect.packetThrottleInterval); peer -> packetThrottleAcceleration = ENET_NET_TO_HOST_32 (command -> connect.packetThrottleAcceleration); peer -> packetThrottleDeceleration = ENET_NET_TO_HOST_32 (command -> connect.packetThrottleDeceleration); peer -> eventData = ENET_NET_TO_HOST_32 (command -> connect.data); incomingSessionID = command -> connect.incomingSessionID == 0xFF ? peer -> outgoingSessionID : command -> connect.incomingSessionID; incomingSessionID = (incomingSessionID + 1) & (ENET_PROTOCOL_HEADER_SESSION_MASK >> ENET_PROTOCOL_HEADER_SESSION_SHIFT); if (incomingSessionID == peer -> outgoingSessionID) incomingSessionID = (incomingSessionID + 1) & (ENET_PROTOCOL_HEADER_SESSION_MASK >> ENET_PROTOCOL_HEADER_SESSION_SHIFT); peer -> outgoingSessionID = incomingSessionID; outgoingSessionID = command -> connect.outgoingSessionID == 0xFF ? peer -> incomingSessionID : command -> connect.outgoingSessionID; outgoingSessionID = (outgoingSessionID + 1) & (ENET_PROTOCOL_HEADER_SESSION_MASK >> ENET_PROTOCOL_HEADER_SESSION_SHIFT); if (outgoingSessionID == peer -> incomingSessionID) outgoingSessionID = (outgoingSessionID + 1) & (ENET_PROTOCOL_HEADER_SESSION_MASK >> ENET_PROTOCOL_HEADER_SESSION_SHIFT); peer -> incomingSessionID = outgoingSessionID; for (channel = peer -> channels; channel < & peer -> channels [channelCount]; ++ channel) { channel -> outgoingReliableSequenceNumber = 0; channel -> outgoingUnreliableSequenceNumber = 0; channel -> incomingReliableSequenceNumber = 0; channel -> incomingUnreliableSequenceNumber = 0; enet_list_clear (& channel -> incomingReliableCommands); enet_list_clear (& channel -> incomingUnreliableCommands); channel -> usedReliableWindows = 0; memset (channel -> reliableWindows, 0, sizeof (channel -> reliableWindows)); } mtu = ENET_NET_TO_HOST_32 (command -> connect.mtu); if (mtu < ENET_PROTOCOL_MINIMUM_MTU) mtu = ENET_PROTOCOL_MINIMUM_MTU; else if (mtu > ENET_PROTOCOL_MAXIMUM_MTU) mtu = ENET_PROTOCOL_MAXIMUM_MTU; peer -> mtu = mtu; if (host -> outgoingBandwidth == 0 && peer -> incomingBandwidth == 0) peer -> windowSize = ENET_PROTOCOL_MAXIMUM_WINDOW_SIZE; else if (host -> outgoingBandwidth == 0 || peer -> incomingBandwidth == 0) peer -> windowSize = (ENET_MAX (host -> outgoingBandwidth, peer -> incomingBandwidth) / ENET_PEER_WINDOW_SIZE_SCALE) * ENET_PROTOCOL_MINIMUM_WINDOW_SIZE; else peer -> windowSize = (ENET_MIN (host -> outgoingBandwidth, peer -> incomingBandwidth) / ENET_PEER_WINDOW_SIZE_SCALE) * ENET_PROTOCOL_MINIMUM_WINDOW_SIZE; if (peer -> windowSize < ENET_PROTOCOL_MINIMUM_WINDOW_SIZE) peer -> windowSize = ENET_PROTOCOL_MINIMUM_WINDOW_SIZE; else if (peer -> windowSize > ENET_PROTOCOL_MAXIMUM_WINDOW_SIZE) peer -> windowSize = ENET_PROTOCOL_MAXIMUM_WINDOW_SIZE; if (host -> incomingBandwidth == 0) windowSize = ENET_PROTOCOL_MAXIMUM_WINDOW_SIZE; else windowSize = (host -> incomingBandwidth / ENET_PEER_WINDOW_SIZE_SCALE) * ENET_PROTOCOL_MINIMUM_WINDOW_SIZE; if (windowSize > ENET_NET_TO_HOST_32 (command -> connect.windowSize)) windowSize = ENET_NET_TO_HOST_32 (command -> connect.windowSize); if (windowSize < ENET_PROTOCOL_MINIMUM_WINDOW_SIZE) windowSize = ENET_PROTOCOL_MINIMUM_WINDOW_SIZE; else if (windowSize > ENET_PROTOCOL_MAXIMUM_WINDOW_SIZE) windowSize = ENET_PROTOCOL_MAXIMUM_WINDOW_SIZE; verifyCommand.header.command = ENET_PROTOCOL_COMMAND_VERIFY_CONNECT | ENET_PROTOCOL_COMMAND_FLAG_ACKNOWLEDGE; verifyCommand.header.channelID = 0xFF; verifyCommand.verifyConnect.outgoingPeerID = ENET_HOST_TO_NET_16 (peer -> incomingPeerID); verifyCommand.verifyConnect.incomingSessionID = incomingSessionID; verifyCommand.verifyConnect.outgoingSessionID = outgoingSessionID; verifyCommand.verifyConnect.mtu = ENET_HOST_TO_NET_32 (peer -> mtu); verifyCommand.verifyConnect.windowSize = ENET_HOST_TO_NET_32 (windowSize); verifyCommand.verifyConnect.channelCount = ENET_HOST_TO_NET_32 (channelCount); verifyCommand.verifyConnect.incomingBandwidth = ENET_HOST_TO_NET_32 (host -> incomingBandwidth); verifyCommand.verifyConnect.outgoingBandwidth = ENET_HOST_TO_NET_32 (host -> outgoingBandwidth); verifyCommand.verifyConnect.packetThrottleInterval = ENET_HOST_TO_NET_32 (peer -> packetThrottleInterval); verifyCommand.verifyConnect.packetThrottleAcceleration = ENET_HOST_TO_NET_32 (peer -> packetThrottleAcceleration); verifyCommand.verifyConnect.packetThrottleDeceleration = ENET_HOST_TO_NET_32 (peer -> packetThrottleDeceleration); verifyCommand.verifyConnect.connectID = peer -> connectID; enet_peer_queue_outgoing_command (peer, & verifyCommand, NULL, 0, 0); return peer; } static int enet_protocol_handle_send_reliable (ENetHost * host, ENetPeer * peer, const ENetProtocol * command, enet_uint8 ** currentData) { size_t dataLength; if (command -> header.channelID >= peer -> channelCount || (peer -> state != ENET_PEER_STATE_CONNECTED && peer -> state != ENET_PEER_STATE_DISCONNECT_LATER)) return -1; dataLength = ENET_NET_TO_HOST_16 (command -> sendReliable.dataLength); * currentData += dataLength; if (dataLength > host -> maximumPacketSize || * currentData < host -> receivedData || * currentData > & host -> receivedData [host -> receivedDataLength]) return -1; if (enet_peer_queue_incoming_command (peer, command, (const enet_uint8 *) command + sizeof (ENetProtocolSendReliable), dataLength, ENET_PACKET_FLAG_RELIABLE, 0) == NULL) return -1; return 0; } static int enet_protocol_handle_send_unsequenced (ENetHost * host, ENetPeer * peer, const ENetProtocol * command, enet_uint8 ** currentData) { enet_uint32 unsequencedGroup, index; size_t dataLength; if (command -> header.channelID >= peer -> channelCount || (peer -> state != ENET_PEER_STATE_CONNECTED && peer -> state != ENET_PEER_STATE_DISCONNECT_LATER)) return -1; dataLength = ENET_NET_TO_HOST_16 (command -> sendUnsequenced.dataLength); * currentData += dataLength; if (dataLength > host -> maximumPacketSize || * currentData < host -> receivedData || * currentData > & host -> receivedData [host -> receivedDataLength]) return -1; unsequencedGroup = ENET_NET_TO_HOST_16 (command -> sendUnsequenced.unsequencedGroup); index = unsequencedGroup % ENET_PEER_UNSEQUENCED_WINDOW_SIZE; if (unsequencedGroup < peer -> incomingUnsequencedGroup) unsequencedGroup += 0x10000; if (unsequencedGroup >= (enet_uint32) peer -> incomingUnsequencedGroup + ENET_PEER_FREE_UNSEQUENCED_WINDOWS * ENET_PEER_UNSEQUENCED_WINDOW_SIZE) return 0; unsequencedGroup &= 0xFFFF; if (unsequencedGroup - index != peer -> incomingUnsequencedGroup) { peer -> incomingUnsequencedGroup = unsequencedGroup - index; memset (peer -> unsequencedWindow, 0, sizeof (peer -> unsequencedWindow)); } else if (peer -> unsequencedWindow [index / 32] & (1 << (index % 32))) return 0; if (enet_peer_queue_incoming_command (peer, command, (const enet_uint8 *) command + sizeof (ENetProtocolSendUnsequenced), dataLength, ENET_PACKET_FLAG_UNSEQUENCED, 0) == NULL) return -1; peer -> unsequencedWindow [index / 32] |= 1 << (index % 32); return 0; } static int enet_protocol_handle_send_unreliable (ENetHost * host, ENetPeer * peer, const ENetProtocol * command, enet_uint8 ** currentData) { size_t dataLength; if (command -> header.channelID >= peer -> channelCount || (peer -> state != ENET_PEER_STATE_CONNECTED && peer -> state != ENET_PEER_STATE_DISCONNECT_LATER)) return -1; dataLength = ENET_NET_TO_HOST_16 (command -> sendUnreliable.dataLength); * currentData += dataLength; if (dataLength > host -> maximumPacketSize || * currentData < host -> receivedData || * currentData > & host -> receivedData [host -> receivedDataLength]) return -1; if (enet_peer_queue_incoming_command (peer, command, (const enet_uint8 *) command + sizeof (ENetProtocolSendUnreliable), dataLength, 0, 0) == NULL) return -1; return 0; } static int enet_protocol_handle_send_fragment (ENetHost * host, ENetPeer * peer, const ENetProtocol * command, enet_uint8 ** currentData) { enet_uint32 fragmentNumber, fragmentCount, fragmentOffset, fragmentLength, startSequenceNumber, totalLength; ENetChannel * channel; enet_uint16 startWindow, currentWindow; ENetListIterator currentCommand; ENetIncomingCommand * startCommand = NULL; if (command -> header.channelID >= peer -> channelCount || (peer -> state != ENET_PEER_STATE_CONNECTED && peer -> state != ENET_PEER_STATE_DISCONNECT_LATER)) return -1; fragmentLength = ENET_NET_TO_HOST_16 (command -> sendFragment.dataLength); * currentData += fragmentLength; if (fragmentLength > host -> maximumPacketSize || * currentData < host -> receivedData || * currentData > & host -> receivedData [host -> receivedDataLength]) return -1; channel = & peer -> channels [command -> header.channelID]; startSequenceNumber = ENET_NET_TO_HOST_16 (command -> sendFragment.startSequenceNumber); startWindow = startSequenceNumber / ENET_PEER_RELIABLE_WINDOW_SIZE; currentWindow = channel -> incomingReliableSequenceNumber / ENET_PEER_RELIABLE_WINDOW_SIZE; if (startSequenceNumber < channel -> incomingReliableSequenceNumber) startWindow += ENET_PEER_RELIABLE_WINDOWS; if (startWindow < currentWindow || startWindow >= currentWindow + ENET_PEER_FREE_RELIABLE_WINDOWS - 1) return 0; fragmentNumber = ENET_NET_TO_HOST_32 (command -> sendFragment.fragmentNumber); fragmentCount = ENET_NET_TO_HOST_32 (command -> sendFragment.fragmentCount); fragmentOffset = ENET_NET_TO_HOST_32 (command -> sendFragment.fragmentOffset); totalLength = ENET_NET_TO_HOST_32 (command -> sendFragment.totalLength); if (fragmentCount > ENET_PROTOCOL_MAXIMUM_FRAGMENT_COUNT || fragmentNumber >= fragmentCount || totalLength > host -> maximumPacketSize || fragmentOffset >= totalLength || fragmentLength > totalLength - fragmentOffset) return -1; for (currentCommand = enet_list_previous (enet_list_end (& channel -> incomingReliableCommands)); currentCommand != enet_list_end (& channel -> incomingReliableCommands); currentCommand = enet_list_previous (currentCommand)) { ENetIncomingCommand * incomingCommand = (ENetIncomingCommand *) currentCommand; if (startSequenceNumber >= channel -> incomingReliableSequenceNumber) { if (incomingCommand -> reliableSequenceNumber < channel -> incomingReliableSequenceNumber) continue; } else if (incomingCommand -> reliableSequenceNumber >= channel -> incomingReliableSequenceNumber) break; if (incomingCommand -> reliableSequenceNumber <= startSequenceNumber) { if (incomingCommand -> reliableSequenceNumber < startSequenceNumber) break; if ((incomingCommand -> command.header.command & ENET_PROTOCOL_COMMAND_MASK) != ENET_PROTOCOL_COMMAND_SEND_FRAGMENT || totalLength != incomingCommand -> packet -> dataLength || fragmentCount != incomingCommand -> fragmentCount) return -1; startCommand = incomingCommand; break; } } if (startCommand == NULL) { ENetProtocol hostCommand = * command; hostCommand.header.reliableSequenceNumber = startSequenceNumber; startCommand = enet_peer_queue_incoming_command (peer, & hostCommand, NULL, totalLength, ENET_PACKET_FLAG_RELIABLE, fragmentCount); if (startCommand == NULL) return -1; } if ((startCommand -> fragments [fragmentNumber / 32] & (1 << (fragmentNumber % 32))) == 0) { -- startCommand -> fragmentsRemaining; startCommand -> fragments [fragmentNumber / 32] |= (1 << (fragmentNumber % 32)); if (fragmentOffset + fragmentLength > startCommand -> packet -> dataLength) fragmentLength = startCommand -> packet -> dataLength - fragmentOffset; memcpy (startCommand -> packet -> data + fragmentOffset, (enet_uint8 *) command + sizeof (ENetProtocolSendFragment), fragmentLength); if (startCommand -> fragmentsRemaining <= 0) enet_peer_dispatch_incoming_reliable_commands (peer, channel); } return 0; } static int enet_protocol_handle_send_unreliable_fragment (ENetHost * host, ENetPeer * peer, const ENetProtocol * command, enet_uint8 ** currentData) { enet_uint32 fragmentNumber, fragmentCount, fragmentOffset, fragmentLength, reliableSequenceNumber, startSequenceNumber, totalLength; enet_uint16 reliableWindow, currentWindow; ENetChannel * channel; ENetListIterator currentCommand; ENetIncomingCommand * startCommand = NULL; if (command -> header.channelID >= peer -> channelCount || (peer -> state != ENET_PEER_STATE_CONNECTED && peer -> state != ENET_PEER_STATE_DISCONNECT_LATER)) return -1; fragmentLength = ENET_NET_TO_HOST_16 (command -> sendFragment.dataLength); * currentData += fragmentLength; if (fragmentLength > host -> maximumPacketSize || * currentData < host -> receivedData || * currentData > & host -> receivedData [host -> receivedDataLength]) return -1; channel = & peer -> channels [command -> header.channelID]; reliableSequenceNumber = command -> header.reliableSequenceNumber; startSequenceNumber = ENET_NET_TO_HOST_16 (command -> sendFragment.startSequenceNumber); reliableWindow = reliableSequenceNumber / ENET_PEER_RELIABLE_WINDOW_SIZE; currentWindow = channel -> incomingReliableSequenceNumber / ENET_PEER_RELIABLE_WINDOW_SIZE; if (reliableSequenceNumber < channel -> incomingReliableSequenceNumber) reliableWindow += ENET_PEER_RELIABLE_WINDOWS; if (reliableWindow < currentWindow || reliableWindow >= currentWindow + ENET_PEER_FREE_RELIABLE_WINDOWS - 1) return 0; if (reliableSequenceNumber == channel -> incomingReliableSequenceNumber && startSequenceNumber <= channel -> incomingUnreliableSequenceNumber) return 0; fragmentNumber = ENET_NET_TO_HOST_32 (command -> sendFragment.fragmentNumber); fragmentCount = ENET_NET_TO_HOST_32 (command -> sendFragment.fragmentCount); fragmentOffset = ENET_NET_TO_HOST_32 (command -> sendFragment.fragmentOffset); totalLength = ENET_NET_TO_HOST_32 (command -> sendFragment.totalLength); if (fragmentCount > ENET_PROTOCOL_MAXIMUM_FRAGMENT_COUNT || fragmentNumber >= fragmentCount || totalLength > host -> maximumPacketSize || fragmentOffset >= totalLength || fragmentLength > totalLength - fragmentOffset) return -1; for (currentCommand = enet_list_previous (enet_list_end (& channel -> incomingUnreliableCommands)); currentCommand != enet_list_end (& channel -> incomingUnreliableCommands); currentCommand = enet_list_previous (currentCommand)) { ENetIncomingCommand * incomingCommand = (ENetIncomingCommand *) currentCommand; if (reliableSequenceNumber >= channel -> incomingReliableSequenceNumber) { if (incomingCommand -> reliableSequenceNumber < channel -> incomingReliableSequenceNumber) continue; } else if (incomingCommand -> reliableSequenceNumber >= channel -> incomingReliableSequenceNumber) break; if (incomingCommand -> reliableSequenceNumber < reliableSequenceNumber) break; if (incomingCommand -> reliableSequenceNumber > reliableSequenceNumber) continue; if (incomingCommand -> unreliableSequenceNumber <= startSequenceNumber) { if (incomingCommand -> unreliableSequenceNumber < startSequenceNumber) break; if ((incomingCommand -> command.header.command & ENET_PROTOCOL_COMMAND_MASK) != ENET_PROTOCOL_COMMAND_SEND_UNRELIABLE_FRAGMENT || totalLength != incomingCommand -> packet -> dataLength || fragmentCount != incomingCommand -> fragmentCount) return -1; startCommand = incomingCommand; break; } } if (startCommand == NULL) { startCommand = enet_peer_queue_incoming_command (peer, command, NULL, totalLength, ENET_PACKET_FLAG_UNRELIABLE_FRAGMENT, fragmentCount); if (startCommand == NULL) return -1; } if ((startCommand -> fragments [fragmentNumber / 32] & (1 << (fragmentNumber % 32))) == 0) { -- startCommand -> fragmentsRemaining; startCommand -> fragments [fragmentNumber / 32] |= (1 << (fragmentNumber % 32)); if (fragmentOffset + fragmentLength > startCommand -> packet -> dataLength) fragmentLength = startCommand -> packet -> dataLength - fragmentOffset; memcpy (startCommand -> packet -> data + fragmentOffset, (enet_uint8 *) command + sizeof (ENetProtocolSendFragment), fragmentLength); if (startCommand -> fragmentsRemaining <= 0) enet_peer_dispatch_incoming_unreliable_commands (peer, channel); } return 0; } static int enet_protocol_handle_ping (ENetHost * host, ENetPeer * peer, const ENetProtocol * command) { if (peer -> state != ENET_PEER_STATE_CONNECTED && peer -> state != ENET_PEER_STATE_DISCONNECT_LATER) return -1; return 0; } static int enet_protocol_handle_bandwidth_limit (ENetHost * host, ENetPeer * peer, const ENetProtocol * command) { if (peer -> state != ENET_PEER_STATE_CONNECTED && peer -> state != ENET_PEER_STATE_DISCONNECT_LATER) return -1; if (peer -> incomingBandwidth != 0) -- host -> bandwidthLimitedPeers; peer -> incomingBandwidth = ENET_NET_TO_HOST_32 (command -> bandwidthLimit.incomingBandwidth); peer -> outgoingBandwidth = ENET_NET_TO_HOST_32 (command -> bandwidthLimit.outgoingBandwidth); if (peer -> incomingBandwidth != 0) ++ host -> bandwidthLimitedPeers; if (peer -> incomingBandwidth == 0 && host -> outgoingBandwidth == 0) peer -> windowSize = ENET_PROTOCOL_MAXIMUM_WINDOW_SIZE; else if (peer -> incomingBandwidth == 0 || host -> outgoingBandwidth == 0) peer -> windowSize = (ENET_MAX (peer -> incomingBandwidth, host -> outgoingBandwidth) / ENET_PEER_WINDOW_SIZE_SCALE) * ENET_PROTOCOL_MINIMUM_WINDOW_SIZE; else peer -> windowSize = (ENET_MIN (peer -> incomingBandwidth, host -> outgoingBandwidth) / ENET_PEER_WINDOW_SIZE_SCALE) * ENET_PROTOCOL_MINIMUM_WINDOW_SIZE; if (peer -> windowSize < ENET_PROTOCOL_MINIMUM_WINDOW_SIZE) peer -> windowSize = ENET_PROTOCOL_MINIMUM_WINDOW_SIZE; else if (peer -> windowSize > ENET_PROTOCOL_MAXIMUM_WINDOW_SIZE) peer -> windowSize = ENET_PROTOCOL_MAXIMUM_WINDOW_SIZE; return 0; } static int enet_protocol_handle_throttle_configure (ENetHost * host, ENetPeer * peer, const ENetProtocol * command) { if (peer -> state != ENET_PEER_STATE_CONNECTED && peer -> state != ENET_PEER_STATE_DISCONNECT_LATER) return -1; peer -> packetThrottleInterval = ENET_NET_TO_HOST_32 (command -> throttleConfigure.packetThrottleInterval); peer -> packetThrottleAcceleration = ENET_NET_TO_HOST_32 (command -> throttleConfigure.packetThrottleAcceleration); peer -> packetThrottleDeceleration = ENET_NET_TO_HOST_32 (command -> throttleConfigure.packetThrottleDeceleration); return 0; } static int enet_protocol_handle_disconnect (ENetHost * host, ENetPeer * peer, const ENetProtocol * command) { if (peer -> state == ENET_PEER_STATE_DISCONNECTED || peer -> state == ENET_PEER_STATE_ZOMBIE || peer -> state == ENET_PEER_STATE_ACKNOWLEDGING_DISCONNECT) return 0; enet_peer_reset_queues (peer); if (peer -> state == ENET_PEER_STATE_CONNECTION_SUCCEEDED || peer -> state == ENET_PEER_STATE_DISCONNECTING || peer -> state == ENET_PEER_STATE_CONNECTING) enet_protocol_dispatch_state (host, peer, ENET_PEER_STATE_ZOMBIE); else if (peer -> state != ENET_PEER_STATE_CONNECTED && peer -> state != ENET_PEER_STATE_DISCONNECT_LATER) { if (peer -> state == ENET_PEER_STATE_CONNECTION_PENDING) host -> recalculateBandwidthLimits = 1; enet_peer_reset (peer); } else if (command -> header.command & ENET_PROTOCOL_COMMAND_FLAG_ACKNOWLEDGE) enet_protocol_change_state (host, peer, ENET_PEER_STATE_ACKNOWLEDGING_DISCONNECT); else enet_protocol_dispatch_state (host, peer, ENET_PEER_STATE_ZOMBIE); if (peer -> state != ENET_PEER_STATE_DISCONNECTED) peer -> eventData = ENET_NET_TO_HOST_32 (command -> disconnect.data); return 0; } static int enet_protocol_handle_acknowledge (ENetHost * host, ENetEvent * event, ENetPeer * peer, const ENetProtocol * command) { enet_uint32 roundTripTime, receivedSentTime, receivedReliableSequenceNumber; ENetProtocolCommand commandNumber; if (peer -> state == ENET_PEER_STATE_DISCONNECTED || peer -> state == ENET_PEER_STATE_ZOMBIE) return 0; receivedSentTime = ENET_NET_TO_HOST_16 (command -> acknowledge.receivedSentTime); receivedSentTime |= host -> serviceTime & 0xFFFF0000; if ((receivedSentTime & 0x8000) > (host -> serviceTime & 0x8000)) receivedSentTime -= 0x10000; if (ENET_TIME_LESS (host -> serviceTime, receivedSentTime)) return 0; peer -> lastReceiveTime = host -> serviceTime; peer -> earliestTimeout = 0; roundTripTime = ENET_TIME_DIFFERENCE (host -> serviceTime, receivedSentTime); enet_peer_throttle (peer, roundTripTime); peer -> roundTripTimeVariance -= peer -> roundTripTimeVariance / 4; if (roundTripTime >= peer -> roundTripTime) { peer -> roundTripTime += (roundTripTime - peer -> roundTripTime) / 8; peer -> roundTripTimeVariance += (roundTripTime - peer -> roundTripTime) / 4; } else { peer -> roundTripTime -= (peer -> roundTripTime - roundTripTime) / 8; peer -> roundTripTimeVariance += (peer -> roundTripTime - roundTripTime) / 4; } if (peer -> roundTripTime < peer -> lowestRoundTripTime) peer -> lowestRoundTripTime = peer -> roundTripTime; if (peer -> roundTripTimeVariance > peer -> highestRoundTripTimeVariance) peer -> highestRoundTripTimeVariance = peer -> roundTripTimeVariance; if (peer -> packetThrottleEpoch == 0 || ENET_TIME_DIFFERENCE (host -> serviceTime, peer -> packetThrottleEpoch) >= peer -> packetThrottleInterval) { peer -> lastRoundTripTime = peer -> lowestRoundTripTime; peer -> lastRoundTripTimeVariance = peer -> highestRoundTripTimeVariance; peer -> lowestRoundTripTime = peer -> roundTripTime; peer -> highestRoundTripTimeVariance = peer -> roundTripTimeVariance; peer -> packetThrottleEpoch = host -> serviceTime; } receivedReliableSequenceNumber = ENET_NET_TO_HOST_16 (command -> acknowledge.receivedReliableSequenceNumber); commandNumber = enet_protocol_remove_sent_reliable_command (peer, receivedReliableSequenceNumber, command -> header.channelID); switch (peer -> state) { case ENET_PEER_STATE_ACKNOWLEDGING_CONNECT: if (commandNumber != ENET_PROTOCOL_COMMAND_VERIFY_CONNECT) return -1; enet_protocol_notify_connect (host, peer, event); break; case ENET_PEER_STATE_DISCONNECTING: if (commandNumber != ENET_PROTOCOL_COMMAND_DISCONNECT) return -1; enet_protocol_notify_disconnect (host, peer, event); break; case ENET_PEER_STATE_DISCONNECT_LATER: if (enet_list_empty (& peer -> outgoingReliableCommands) && enet_list_empty (& peer -> outgoingUnreliableCommands) && enet_list_empty (& peer -> sentReliableCommands)) enet_peer_disconnect (peer, peer -> eventData); break; default: break; } return 0; } static int enet_protocol_handle_verify_connect (ENetHost * host, ENetEvent * event, ENetPeer * peer, const ENetProtocol * command) { enet_uint32 mtu, windowSize; size_t channelCount; if (peer -> state != ENET_PEER_STATE_CONNECTING) return 0; channelCount = ENET_NET_TO_HOST_32 (command -> verifyConnect.channelCount); if (channelCount < ENET_PROTOCOL_MINIMUM_CHANNEL_COUNT || channelCount > ENET_PROTOCOL_MAXIMUM_CHANNEL_COUNT || ENET_NET_TO_HOST_32 (command -> verifyConnect.packetThrottleInterval) != peer -> packetThrottleInterval || ENET_NET_TO_HOST_32 (command -> verifyConnect.packetThrottleAcceleration) != peer -> packetThrottleAcceleration || ENET_NET_TO_HOST_32 (command -> verifyConnect.packetThrottleDeceleration) != peer -> packetThrottleDeceleration || command -> verifyConnect.connectID != peer -> connectID) { peer -> eventData = 0; enet_protocol_dispatch_state (host, peer, ENET_PEER_STATE_ZOMBIE); return -1; } enet_protocol_remove_sent_reliable_command (peer, 1, 0xFF); if (channelCount < peer -> channelCount) peer -> channelCount = channelCount; peer -> outgoingPeerID = ENET_NET_TO_HOST_16 (command -> verifyConnect.outgoingPeerID); peer -> incomingSessionID = command -> verifyConnect.incomingSessionID; peer -> outgoingSessionID = command -> verifyConnect.outgoingSessionID; mtu = ENET_NET_TO_HOST_32 (command -> verifyConnect.mtu); if (mtu < ENET_PROTOCOL_MINIMUM_MTU) mtu = ENET_PROTOCOL_MINIMUM_MTU; else if (mtu > ENET_PROTOCOL_MAXIMUM_MTU) mtu = ENET_PROTOCOL_MAXIMUM_MTU; if (mtu < peer -> mtu) peer -> mtu = mtu; windowSize = ENET_NET_TO_HOST_32 (command -> verifyConnect.windowSize); if (windowSize < ENET_PROTOCOL_MINIMUM_WINDOW_SIZE) windowSize = ENET_PROTOCOL_MINIMUM_WINDOW_SIZE; if (windowSize > ENET_PROTOCOL_MAXIMUM_WINDOW_SIZE) windowSize = ENET_PROTOCOL_MAXIMUM_WINDOW_SIZE; if (windowSize < peer -> windowSize) peer -> windowSize = windowSize; peer -> incomingBandwidth = ENET_NET_TO_HOST_32 (command -> verifyConnect.incomingBandwidth); peer -> outgoingBandwidth = ENET_NET_TO_HOST_32 (command -> verifyConnect.outgoingBandwidth); enet_protocol_notify_connect (host, peer, event); return 0; } static int enet_protocol_handle_incoming_commands (ENetHost * host, ENetEvent * event) { ENetProtocolHeader * header; ENetProtocol * command; ENetPeer * peer; enet_uint8 * currentData; size_t headerSize; enet_uint16 peerID, flags; enet_uint8 sessionID; if (host -> receivedDataLength < (size_t) & ((ENetProtocolHeader *) 0) -> sentTime) return 0; header = (ENetProtocolHeader *) host -> receivedData; peerID = ENET_NET_TO_HOST_16 (header -> peerID); sessionID = (peerID & ENET_PROTOCOL_HEADER_SESSION_MASK) >> ENET_PROTOCOL_HEADER_SESSION_SHIFT; flags = peerID & ENET_PROTOCOL_HEADER_FLAG_MASK; peerID &= ~ (ENET_PROTOCOL_HEADER_FLAG_MASK | ENET_PROTOCOL_HEADER_SESSION_MASK); headerSize = (flags & ENET_PROTOCOL_HEADER_FLAG_SENT_TIME ? sizeof (ENetProtocolHeader) : (size_t) & ((ENetProtocolHeader *) 0) -> sentTime); if (host -> checksum != NULL) headerSize += sizeof (enet_uint32); if (peerID == ENET_PROTOCOL_MAXIMUM_PEER_ID) peer = NULL; else if (peerID >= host -> peerCount) return 0; else { peer = & host -> peers [peerID]; if (peer -> state == ENET_PEER_STATE_DISCONNECTED || peer -> state == ENET_PEER_STATE_ZOMBIE || ((host -> receivedAddress.host != peer -> address.host || host -> receivedAddress.port != peer -> address.port) && peer -> address.host != ENET_HOST_BROADCAST) || (peer -> outgoingPeerID < ENET_PROTOCOL_MAXIMUM_PEER_ID && sessionID != peer -> incomingSessionID)) return 0; } if (flags & ENET_PROTOCOL_HEADER_FLAG_COMPRESSED) { size_t originalSize; if (host -> compressor.context == NULL || host -> compressor.decompress == NULL) return 0; originalSize = host -> compressor.decompress (host -> compressor.context, host -> receivedData + headerSize, host -> receivedDataLength - headerSize, host -> packetData [1] + headerSize, sizeof (host -> packetData [1]) - headerSize); if (originalSize <= 0 || originalSize > sizeof (host -> packetData [1]) - headerSize) return 0; memcpy (host -> packetData [1], header, headerSize); host -> receivedData = host -> packetData [1]; host -> receivedDataLength = headerSize + originalSize; } if (host -> checksum != NULL) { enet_uint32 * checksum = (enet_uint32 *) & host -> receivedData [headerSize - sizeof (enet_uint32)], desiredChecksum = * checksum; ENetBuffer buffer; * checksum = peer != NULL ? peer -> connectID : 0; buffer.data = host -> receivedData; buffer.dataLength = host -> receivedDataLength; if (host -> checksum (& buffer, 1) != desiredChecksum) return 0; } if (peer != NULL) { peer -> address.host = host -> receivedAddress.host; peer -> address.port = host -> receivedAddress.port; peer -> incomingDataTotal += host -> receivedDataLength; } currentData = host -> receivedData + headerSize; while (currentData < & host -> receivedData [host -> receivedDataLength]) { enet_uint8 commandNumber; size_t commandSize; command = (ENetProtocol *) currentData; if (currentData + sizeof (ENetProtocolCommandHeader) > & host -> receivedData [host -> receivedDataLength]) break; commandNumber = command -> header.command & ENET_PROTOCOL_COMMAND_MASK; if (commandNumber >= ENET_PROTOCOL_COMMAND_COUNT) break; commandSize = commandSizes [commandNumber]; if (commandSize == 0 || currentData + commandSize > & host -> receivedData [host -> receivedDataLength]) break; currentData += commandSize; if (peer == NULL && commandNumber != ENET_PROTOCOL_COMMAND_CONNECT) break; command -> header.reliableSequenceNumber = ENET_NET_TO_HOST_16 (command -> header.reliableSequenceNumber); switch (commandNumber) { case ENET_PROTOCOL_COMMAND_ACKNOWLEDGE: if (enet_protocol_handle_acknowledge (host, event, peer, command)) goto commandError; break; case ENET_PROTOCOL_COMMAND_CONNECT: if (peer != NULL) goto commandError; peer = enet_protocol_handle_connect (host, header, command); if (peer == NULL) goto commandError; break; case ENET_PROTOCOL_COMMAND_VERIFY_CONNECT: if (enet_protocol_handle_verify_connect (host, event, peer, command)) goto commandError; break; case ENET_PROTOCOL_COMMAND_DISCONNECT: if (enet_protocol_handle_disconnect (host, peer, command)) goto commandError; break; case ENET_PROTOCOL_COMMAND_PING: if (enet_protocol_handle_ping (host, peer, command)) goto commandError; break; case ENET_PROTOCOL_COMMAND_SEND_RELIABLE: if (enet_protocol_handle_send_reliable (host, peer, command, & currentData)) goto commandError; break; case ENET_PROTOCOL_COMMAND_SEND_UNRELIABLE: if (enet_protocol_handle_send_unreliable (host, peer, command, & currentData)) goto commandError; break; case ENET_PROTOCOL_COMMAND_SEND_UNSEQUENCED: if (enet_protocol_handle_send_unsequenced (host, peer, command, & currentData)) goto commandError; break; case ENET_PROTOCOL_COMMAND_SEND_FRAGMENT: if (enet_protocol_handle_send_fragment (host, peer, command, & currentData)) goto commandError; break; case ENET_PROTOCOL_COMMAND_BANDWIDTH_LIMIT: if (enet_protocol_handle_bandwidth_limit (host, peer, command)) goto commandError; break; case ENET_PROTOCOL_COMMAND_THROTTLE_CONFIGURE: if (enet_protocol_handle_throttle_configure (host, peer, command)) goto commandError; break; case ENET_PROTOCOL_COMMAND_SEND_UNRELIABLE_FRAGMENT: if (enet_protocol_handle_send_unreliable_fragment (host, peer, command, & currentData)) goto commandError; break; default: goto commandError; } if (peer != NULL && (command -> header.command & ENET_PROTOCOL_COMMAND_FLAG_ACKNOWLEDGE) != 0) { enet_uint16 sentTime; if (! (flags & ENET_PROTOCOL_HEADER_FLAG_SENT_TIME)) break; sentTime = ENET_NET_TO_HOST_16 (header -> sentTime); switch (peer -> state) { case ENET_PEER_STATE_DISCONNECTING: case ENET_PEER_STATE_ACKNOWLEDGING_CONNECT: case ENET_PEER_STATE_DISCONNECTED: case ENET_PEER_STATE_ZOMBIE: break; case ENET_PEER_STATE_ACKNOWLEDGING_DISCONNECT: if ((command -> header.command & ENET_PROTOCOL_COMMAND_MASK) == ENET_PROTOCOL_COMMAND_DISCONNECT) enet_peer_queue_acknowledgement (peer, command, sentTime); break; default: enet_peer_queue_acknowledgement (peer, command, sentTime); break; } } } commandError: if (event != NULL && event -> type != ENET_EVENT_TYPE_NONE) return 1; return 0; } static int enet_protocol_receive_incoming_commands (ENetHost * host, ENetEvent * event) { int packets; for (packets = 0; packets < 256; ++ packets) { int receivedLength; ENetBuffer buffer; buffer.data = host -> packetData [0]; buffer.dataLength = sizeof (host -> packetData [0]); receivedLength = enet_socket_receive (host -> socket, & host -> receivedAddress, & buffer, 1); if (receivedLength < 0) return -1; if (receivedLength == 0) return 0; host -> receivedData = host -> packetData [0]; host -> receivedDataLength = receivedLength; host -> totalReceivedData += receivedLength; host -> totalReceivedPackets ++; if (host -> intercept != NULL) { switch (host -> intercept (host, event)) { case 1: if (event != NULL && event -> type != ENET_EVENT_TYPE_NONE) return 1; continue; case -1: return -1; default: break; } } switch (enet_protocol_handle_incoming_commands (host, event)) { case 1: return 1; case -1: return -1; default: break; } } return -1; } static void enet_protocol_send_acknowledgements (ENetHost * host, ENetPeer * peer) { ENetProtocol * command = & host -> commands [host -> commandCount]; ENetBuffer * buffer = & host -> buffers [host -> bufferCount]; ENetAcknowledgement * acknowledgement; ENetListIterator currentAcknowledgement; enet_uint16 reliableSequenceNumber; currentAcknowledgement = enet_list_begin (& peer -> acknowledgements); while (currentAcknowledgement != enet_list_end (& peer -> acknowledgements)) { if (command >= & host -> commands [sizeof (host -> commands) / sizeof (ENetProtocol)] || buffer >= & host -> buffers [sizeof (host -> buffers) / sizeof (ENetBuffer)] || peer -> mtu - host -> packetSize < sizeof (ENetProtocolAcknowledge)) { host -> continueSending = 1; break; } acknowledgement = (ENetAcknowledgement *) currentAcknowledgement; currentAcknowledgement = enet_list_next (currentAcknowledgement); buffer -> data = command; buffer -> dataLength = sizeof (ENetProtocolAcknowledge); host -> packetSize += buffer -> dataLength; reliableSequenceNumber = ENET_HOST_TO_NET_16 (acknowledgement -> command.header.reliableSequenceNumber); command -> header.command = ENET_PROTOCOL_COMMAND_ACKNOWLEDGE; command -> header.channelID = acknowledgement -> command.header.channelID; command -> header.reliableSequenceNumber = reliableSequenceNumber; command -> acknowledge.receivedReliableSequenceNumber = reliableSequenceNumber; command -> acknowledge.receivedSentTime = ENET_HOST_TO_NET_16 (acknowledgement -> sentTime); if ((acknowledgement -> command.header.command & ENET_PROTOCOL_COMMAND_MASK) == ENET_PROTOCOL_COMMAND_DISCONNECT) enet_protocol_dispatch_state (host, peer, ENET_PEER_STATE_ZOMBIE); enet_list_remove (& acknowledgement -> acknowledgementList); enet_free (acknowledgement); ++ command; ++ buffer; } host -> commandCount = command - host -> commands; host -> bufferCount = buffer - host -> buffers; } static void enet_protocol_send_unreliable_outgoing_commands (ENetHost * host, ENetPeer * peer) { ENetProtocol * command = & host -> commands [host -> commandCount]; ENetBuffer * buffer = & host -> buffers [host -> bufferCount]; ENetOutgoingCommand * outgoingCommand; ENetListIterator currentCommand; currentCommand = enet_list_begin (& peer -> outgoingUnreliableCommands); while (currentCommand != enet_list_end (& peer -> outgoingUnreliableCommands)) { size_t commandSize; outgoingCommand = (ENetOutgoingCommand *) currentCommand; commandSize = commandSizes [outgoingCommand -> command.header.command & ENET_PROTOCOL_COMMAND_MASK]; if (command >= & host -> commands [sizeof (host -> commands) / sizeof (ENetProtocol)] || buffer + 1 >= & host -> buffers [sizeof (host -> buffers) / sizeof (ENetBuffer)] || peer -> mtu - host -> packetSize < commandSize || (outgoingCommand -> packet != NULL && peer -> mtu - host -> packetSize < commandSize + outgoingCommand -> fragmentLength)) { host -> continueSending = 1; break; } currentCommand = enet_list_next (currentCommand); if (outgoingCommand -> packet != NULL && outgoingCommand -> fragmentOffset == 0) { peer -> packetThrottleCounter += ENET_PEER_PACKET_THROTTLE_COUNTER; peer -> packetThrottleCounter %= ENET_PEER_PACKET_THROTTLE_SCALE; if (peer -> packetThrottleCounter > peer -> packetThrottle) { enet_uint16 reliableSequenceNumber = outgoingCommand -> reliableSequenceNumber, unreliableSequenceNumber = outgoingCommand -> unreliableSequenceNumber; for (;;) { -- outgoingCommand -> packet -> referenceCount; if (outgoingCommand -> packet -> referenceCount == 0) enet_packet_destroy (outgoingCommand -> packet); enet_list_remove (& outgoingCommand -> outgoingCommandList); enet_free (outgoingCommand); if (currentCommand == enet_list_end (& peer -> outgoingUnreliableCommands)) break; outgoingCommand = (ENetOutgoingCommand *) currentCommand; if (outgoingCommand -> reliableSequenceNumber != reliableSequenceNumber || outgoingCommand -> unreliableSequenceNumber != unreliableSequenceNumber) break; currentCommand = enet_list_next (currentCommand); } continue; } } buffer -> data = command; buffer -> dataLength = commandSize; host -> packetSize += buffer -> dataLength; * command = outgoingCommand -> command; enet_list_remove (& outgoingCommand -> outgoingCommandList); if (outgoingCommand -> packet != NULL) { ++ buffer; buffer -> data = outgoingCommand -> packet -> data + outgoingCommand -> fragmentOffset; buffer -> dataLength = outgoingCommand -> fragmentLength; host -> packetSize += buffer -> dataLength; enet_list_insert (enet_list_end (& peer -> sentUnreliableCommands), outgoingCommand); } else enet_free (outgoingCommand); ++ command; ++ buffer; } host -> commandCount = command - host -> commands; host -> bufferCount = buffer - host -> buffers; if (peer -> state == ENET_PEER_STATE_DISCONNECT_LATER && enet_list_empty (& peer -> outgoingReliableCommands) && enet_list_empty (& peer -> outgoingUnreliableCommands) && enet_list_empty (& peer -> sentReliableCommands)) enet_peer_disconnect (peer, peer -> eventData); } static int enet_protocol_check_timeouts (ENetHost * host, ENetPeer * peer, ENetEvent * event) { ENetOutgoingCommand * outgoingCommand; ENetListIterator currentCommand, insertPosition; currentCommand = enet_list_begin (& peer -> sentReliableCommands); insertPosition = enet_list_begin (& peer -> outgoingReliableCommands); while (currentCommand != enet_list_end (& peer -> sentReliableCommands)) { outgoingCommand = (ENetOutgoingCommand *) currentCommand; currentCommand = enet_list_next (currentCommand); if (ENET_TIME_DIFFERENCE (host -> serviceTime, outgoingCommand -> sentTime) < outgoingCommand -> roundTripTimeout) continue; if (peer -> earliestTimeout == 0 || ENET_TIME_LESS (outgoingCommand -> sentTime, peer -> earliestTimeout)) peer -> earliestTimeout = outgoingCommand -> sentTime; if (peer -> earliestTimeout != 0 && (ENET_TIME_DIFFERENCE (host -> serviceTime, peer -> earliestTimeout) >= peer -> timeoutMaximum || (outgoingCommand -> roundTripTimeout >= outgoingCommand -> roundTripTimeoutLimit && ENET_TIME_DIFFERENCE (host -> serviceTime, peer -> earliestTimeout) >= peer -> timeoutMinimum))) { enet_protocol_notify_disconnect (host, peer, event); return 1; } if (outgoingCommand -> packet != NULL) peer -> reliableDataInTransit -= outgoingCommand -> fragmentLength; ++ peer -> packetsLost; outgoingCommand -> roundTripTimeout *= 2; enet_list_insert (insertPosition, enet_list_remove (& outgoingCommand -> outgoingCommandList)); if (currentCommand == enet_list_begin (& peer -> sentReliableCommands) && ! enet_list_empty (& peer -> sentReliableCommands)) { outgoingCommand = (ENetOutgoingCommand *) currentCommand; peer -> nextTimeout = outgoingCommand -> sentTime + outgoingCommand -> roundTripTimeout; } } return 0; } static int enet_protocol_send_reliable_outgoing_commands (ENetHost * host, ENetPeer * peer) { ENetProtocol * command = & host -> commands [host -> commandCount]; ENetBuffer * buffer = & host -> buffers [host -> bufferCount]; ENetOutgoingCommand * outgoingCommand; ENetListIterator currentCommand; ENetChannel *channel; enet_uint16 reliableWindow; size_t commandSize; int windowExceeded = 0, windowWrap = 0, canPing = 1; currentCommand = enet_list_begin (& peer -> outgoingReliableCommands); while (currentCommand != enet_list_end (& peer -> outgoingReliableCommands)) { outgoingCommand = (ENetOutgoingCommand *) currentCommand; channel = outgoingCommand -> command.header.channelID < peer -> channelCount ? & peer -> channels [outgoingCommand -> command.header.channelID] : NULL; reliableWindow = outgoingCommand -> reliableSequenceNumber / ENET_PEER_RELIABLE_WINDOW_SIZE; if (channel != NULL) { if (! windowWrap && outgoingCommand -> sendAttempts < 1 && ! (outgoingCommand -> reliableSequenceNumber % ENET_PEER_RELIABLE_WINDOW_SIZE) && (channel -> reliableWindows [(reliableWindow + ENET_PEER_RELIABLE_WINDOWS - 1) % ENET_PEER_RELIABLE_WINDOWS] >= ENET_PEER_RELIABLE_WINDOW_SIZE || channel -> usedReliableWindows & ((((1 << ENET_PEER_FREE_RELIABLE_WINDOWS) - 1) << reliableWindow) | (((1 << ENET_PEER_FREE_RELIABLE_WINDOWS) - 1) >> (ENET_PEER_RELIABLE_WINDOWS - reliableWindow))))) windowWrap = 1; if (windowWrap) { currentCommand = enet_list_next (currentCommand); continue; } } if (outgoingCommand -> packet != NULL) { if (! windowExceeded) { enet_uint32 windowSize = (peer -> packetThrottle * peer -> windowSize) / ENET_PEER_PACKET_THROTTLE_SCALE; if (peer -> reliableDataInTransit + outgoingCommand -> fragmentLength > ENET_MAX (windowSize, peer -> mtu)) windowExceeded = 1; } if (windowExceeded) { currentCommand = enet_list_next (currentCommand); continue; } } canPing = 0; commandSize = commandSizes [outgoingCommand -> command.header.command & ENET_PROTOCOL_COMMAND_MASK]; if (command >= & host -> commands [sizeof (host -> commands) / sizeof (ENetProtocol)] || buffer + 1 >= & host -> buffers [sizeof (host -> buffers) / sizeof (ENetBuffer)] || peer -> mtu - host -> packetSize < commandSize || (outgoingCommand -> packet != NULL && (enet_uint16) (peer -> mtu - host -> packetSize) < (enet_uint16) (commandSize + outgoingCommand -> fragmentLength))) { host -> continueSending = 1; break; } currentCommand = enet_list_next (currentCommand); if (channel != NULL && outgoingCommand -> sendAttempts < 1) { channel -> usedReliableWindows |= 1 << reliableWindow; ++ channel -> reliableWindows [reliableWindow]; } ++ outgoingCommand -> sendAttempts; if (outgoingCommand -> roundTripTimeout == 0) { outgoingCommand -> roundTripTimeout = peer -> roundTripTime + 4 * peer -> roundTripTimeVariance; outgoingCommand -> roundTripTimeoutLimit = peer -> timeoutLimit * outgoingCommand -> roundTripTimeout; } if (enet_list_empty (& peer -> sentReliableCommands)) peer -> nextTimeout = host -> serviceTime + outgoingCommand -> roundTripTimeout; enet_list_insert (enet_list_end (& peer -> sentReliableCommands), enet_list_remove (& outgoingCommand -> outgoingCommandList)); outgoingCommand -> sentTime = host -> serviceTime; buffer -> data = command; buffer -> dataLength = commandSize; host -> packetSize += buffer -> dataLength; host -> headerFlags |= ENET_PROTOCOL_HEADER_FLAG_SENT_TIME; * command = outgoingCommand -> command; if (outgoingCommand -> packet != NULL) { ++ buffer; buffer -> data = outgoingCommand -> packet -> data + outgoingCommand -> fragmentOffset; buffer -> dataLength = outgoingCommand -> fragmentLength; host -> packetSize += outgoingCommand -> fragmentLength; peer -> reliableDataInTransit += outgoingCommand -> fragmentLength; } ++ peer -> packetsSent; ++ command; ++ buffer; } host -> commandCount = command - host -> commands; host -> bufferCount = buffer - host -> buffers; return canPing; } static int enet_protocol_send_outgoing_commands (ENetHost * host, ENetEvent * event, int checkForTimeouts) { enet_uint8 headerData [sizeof (ENetProtocolHeader) + sizeof (enet_uint32)]; ENetProtocolHeader * header = (ENetProtocolHeader *) headerData; ENetPeer * currentPeer; int sentLength; size_t shouldCompress = 0; host -> continueSending = 1; while (host -> continueSending) for (host -> continueSending = 0, currentPeer = host -> peers; currentPeer < & host -> peers [host -> peerCount]; ++ currentPeer) { if (currentPeer -> state == ENET_PEER_STATE_DISCONNECTED || currentPeer -> state == ENET_PEER_STATE_ZOMBIE) continue; host -> headerFlags = 0; host -> commandCount = 0; host -> bufferCount = 1; host -> packetSize = sizeof (ENetProtocolHeader); if (! enet_list_empty (& currentPeer -> acknowledgements)) enet_protocol_send_acknowledgements (host, currentPeer); if (checkForTimeouts != 0 && ! enet_list_empty (& currentPeer -> sentReliableCommands) && ENET_TIME_GREATER_EQUAL (host -> serviceTime, currentPeer -> nextTimeout) && enet_protocol_check_timeouts (host, currentPeer, event) == 1) { if (event != NULL && event -> type != ENET_EVENT_TYPE_NONE) return 1; else continue; } if ((enet_list_empty (& currentPeer -> outgoingReliableCommands) || enet_protocol_send_reliable_outgoing_commands (host, currentPeer)) && enet_list_empty (& currentPeer -> sentReliableCommands) && ENET_TIME_DIFFERENCE (host -> serviceTime, currentPeer -> lastReceiveTime) >= currentPeer -> pingInterval && currentPeer -> mtu - host -> packetSize >= sizeof (ENetProtocolPing)) { enet_peer_ping (currentPeer); enet_protocol_send_reliable_outgoing_commands (host, currentPeer); } if (! enet_list_empty (& currentPeer -> outgoingUnreliableCommands)) enet_protocol_send_unreliable_outgoing_commands (host, currentPeer); if (host -> commandCount == 0) continue; if (currentPeer -> packetLossEpoch == 0) currentPeer -> packetLossEpoch = host -> serviceTime; else if (ENET_TIME_DIFFERENCE (host -> serviceTime, currentPeer -> packetLossEpoch) >= ENET_PEER_PACKET_LOSS_INTERVAL && currentPeer -> packetsSent > 0) { enet_uint32 packetLoss = currentPeer -> packetsLost * ENET_PEER_PACKET_LOSS_SCALE / currentPeer -> packetsSent; #ifdef ENET_DEBUG printf ("peer %u: %f%%+-%f%% packet loss, %u+-%u ms round trip time, %f%% throttle, %u/%u outgoing, %u/%u incoming\n", currentPeer -> incomingPeerID, currentPeer -> packetLoss / (float) ENET_PEER_PACKET_LOSS_SCALE, currentPeer -> packetLossVariance / (float) ENET_PEER_PACKET_LOSS_SCALE, currentPeer -> roundTripTime, currentPeer -> roundTripTimeVariance, currentPeer -> packetThrottle / (float) ENET_PEER_PACKET_THROTTLE_SCALE, enet_list_size (& currentPeer -> outgoingReliableCommands), enet_list_size (& currentPeer -> outgoingUnreliableCommands), currentPeer -> channels != NULL ? enet_list_size (& currentPeer -> channels -> incomingReliableCommands) : 0, currentPeer -> channels != NULL ? enet_list_size (& currentPeer -> channels -> incomingUnreliableCommands) : 0); #endif currentPeer -> packetLossVariance -= currentPeer -> packetLossVariance / 4; if (packetLoss >= currentPeer -> packetLoss) { currentPeer -> packetLoss += (packetLoss - currentPeer -> packetLoss) / 8; currentPeer -> packetLossVariance += (packetLoss - currentPeer -> packetLoss) / 4; } else { currentPeer -> packetLoss -= (currentPeer -> packetLoss - packetLoss) / 8; currentPeer -> packetLossVariance += (currentPeer -> packetLoss - packetLoss) / 4; } currentPeer -> packetLossEpoch = host -> serviceTime; currentPeer -> packetsSent = 0; currentPeer -> packetsLost = 0; } host -> buffers -> data = headerData; if (host -> headerFlags & ENET_PROTOCOL_HEADER_FLAG_SENT_TIME) { header -> sentTime = ENET_HOST_TO_NET_16 (host -> serviceTime & 0xFFFF); host -> buffers -> dataLength = sizeof (ENetProtocolHeader); } else host -> buffers -> dataLength = (size_t) & ((ENetProtocolHeader *) 0) -> sentTime; shouldCompress = 0; if (host -> compressor.context != NULL && host -> compressor.compress != NULL) { size_t originalSize = host -> packetSize - sizeof(ENetProtocolHeader), compressedSize = host -> compressor.compress (host -> compressor.context, & host -> buffers [1], host -> bufferCount - 1, originalSize, host -> packetData [1], originalSize); if (compressedSize > 0 && compressedSize < originalSize) { host -> headerFlags |= ENET_PROTOCOL_HEADER_FLAG_COMPRESSED; shouldCompress = compressedSize; #ifdef ENET_DEBUG_COMPRESS printf ("peer %u: compressed %u -> %u (%u%%)\n", currentPeer -> incomingPeerID, originalSize, compressedSize, (compressedSize * 100) / originalSize); #endif } } if (currentPeer -> outgoingPeerID < ENET_PROTOCOL_MAXIMUM_PEER_ID) host -> headerFlags |= currentPeer -> outgoingSessionID << ENET_PROTOCOL_HEADER_SESSION_SHIFT; header -> peerID = ENET_HOST_TO_NET_16 (currentPeer -> outgoingPeerID | host -> headerFlags); if (host -> checksum != NULL) { enet_uint32 * checksum = (enet_uint32 *) & headerData [host -> buffers -> dataLength]; * checksum = currentPeer -> outgoingPeerID < ENET_PROTOCOL_MAXIMUM_PEER_ID ? currentPeer -> connectID : 0; host -> buffers -> dataLength += sizeof (enet_uint32); * checksum = host -> checksum (host -> buffers, host -> bufferCount); } if (shouldCompress > 0) { host -> buffers [1].data = host -> packetData [1]; host -> buffers [1].dataLength = shouldCompress; host -> bufferCount = 2; } currentPeer -> lastSendTime = host -> serviceTime; sentLength = enet_socket_send (host -> socket, & currentPeer -> address, host -> buffers, host -> bufferCount); enet_protocol_remove_sent_unreliable_commands (currentPeer); if (sentLength < 0) return -1; host -> totalSentData += sentLength; host -> totalSentPackets ++; } return 0; } /** Sends any queued packets on the host specified to its designated peers. @param host host to flush @remarks this function need only be used in circumstances where one wishes to send queued packets earlier than in a call to enet_host_service(). @ingroup host */ void enet_host_flush (ENetHost * host) { host -> serviceTime = enet_time_get (); enet_protocol_send_outgoing_commands (host, NULL, 0); } /** Checks for any queued events on the host and dispatches one if available. @param host host to check for events @param event an event structure where event details will be placed if available @retval > 0 if an event was dispatched @retval 0 if no events are available @retval < 0 on failure @ingroup host */ int enet_host_check_events (ENetHost * host, ENetEvent * event) { if (event == NULL) return -1; event -> type = ENET_EVENT_TYPE_NONE; event -> peer = NULL; event -> packet = NULL; return enet_protocol_dispatch_incoming_commands (host, event); } /** Waits for events on the host specified and shuttles packets between the host and its peers. @param host host to service @param event an event structure where event details will be placed if one occurs if event == NULL then no events will be delivered @param timeout number of milliseconds that ENet should wait for events @retval > 0 if an event occurred within the specified time limit @retval 0 if no event occurred @retval < 0 on failure @remarks enet_host_service should be called fairly regularly for adequate performance @ingroup host */ int enet_host_service (ENetHost * host, ENetEvent * event, enet_uint32 timeout) { enet_uint32 waitCondition; if (event != NULL) { event -> type = ENET_EVENT_TYPE_NONE; event -> peer = NULL; event -> packet = NULL; switch (enet_protocol_dispatch_incoming_commands (host, event)) { case 1: return 1; case -1: #ifdef ENET_DEBUG perror ("Error dispatching incoming packets"); #endif return -1; default: break; } } host -> serviceTime = enet_time_get (); timeout += host -> serviceTime; do { if (ENET_TIME_DIFFERENCE (host -> serviceTime, host -> bandwidthThrottleEpoch) >= ENET_HOST_BANDWIDTH_THROTTLE_INTERVAL) enet_host_bandwidth_throttle (host); switch (enet_protocol_send_outgoing_commands (host, event, 1)) { case 1: return 1; case -1: #ifdef ENET_DEBUG perror ("Error sending outgoing packets"); #endif return -1; default: break; } switch (enet_protocol_receive_incoming_commands (host, event)) { case 1: return 1; case -1: #ifdef ENET_DEBUG perror ("Error receiving incoming packets"); #endif return -1; default: break; } switch (enet_protocol_send_outgoing_commands (host, event, 1)) { case 1: return 1; case -1: #ifdef ENET_DEBUG perror ("Error sending outgoing packets"); #endif return -1; default: break; } if (event != NULL) { switch (enet_protocol_dispatch_incoming_commands (host, event)) { case 1: return 1; case -1: #ifdef ENET_DEBUG perror ("Error dispatching incoming packets"); #endif return -1; default: break; } } if (ENET_TIME_GREATER_EQUAL (host -> serviceTime, timeout)) return 0; do { host -> serviceTime = enet_time_get (); if (ENET_TIME_GREATER_EQUAL (host -> serviceTime, timeout)) return 0; waitCondition = ENET_SOCKET_WAIT_RECEIVE | ENET_SOCKET_WAIT_INTERRUPT; if (enet_socket_wait (host -> socket, & waitCondition, ENET_TIME_DIFFERENCE (timeout, host -> serviceTime)) != 0) return -1; } while (waitCondition & ENET_SOCKET_WAIT_INTERRUPT); host -> serviceTime = enet_time_get (); } while (waitCondition & ENET_SOCKET_WAIT_RECEIVE); return 0; } ================================================ FILE: src/libraries/enet/libenet/unix.c ================================================ /** @file unix.c @brief ENet Unix system specific functions */ #ifndef _WIN32 #include #include #include #include #include #include #include #include #include #include #include #define ENET_BUILDING_LIB 1 #include "enet/enet.h" #ifdef __APPLE__ #ifdef HAS_POLL #undef HAS_POLL #endif #ifndef HAS_FCNTL #define HAS_FCNTL 1 #endif #ifndef HAS_INET_PTON #define HAS_INET_PTON 1 #endif #ifndef HAS_INET_NTOP #define HAS_INET_NTOP 1 #endif #ifndef HAS_MSGHDR_FLAGS #define HAS_MSGHDR_FLAGS 1 #endif #ifndef HAS_SOCKLEN_T #define HAS_SOCKLEN_T 1 #endif #ifndef HAS_GETADDRINFO #define HAS_GETADDRINFO 1 #endif #ifndef HAS_GETNAMEINFO #define HAS_GETNAMEINFO 1 #endif #endif #ifdef HAS_FCNTL #include #endif #ifdef HAS_POLL #include #endif #include "common/config.h" #ifndef HAS_SOCKLEN_T typedef int socklen_t; #endif #ifndef MSG_NOSIGNAL #define MSG_NOSIGNAL 0 #endif static enet_uint32 timeBase = 0; int enet_initialize (void) { return 0; } void enet_deinitialize (void) { } enet_uint32 enet_host_random_seed (void) { return (enet_uint32) time (NULL); } enet_uint32 enet_time_get (void) { struct timeval timeVal; gettimeofday (& timeVal, NULL); return timeVal.tv_sec * 1000 + timeVal.tv_usec / 1000 - timeBase; } void enet_time_set (enet_uint32 newTimeBase) { struct timeval timeVal; gettimeofday (& timeVal, NULL); timeBase = timeVal.tv_sec * 1000 + timeVal.tv_usec / 1000 - newTimeBase; } int enet_address_set_host (ENetAddress * address, const char * name) { #ifdef HAS_GETADDRINFO struct addrinfo hints, * resultList = NULL, * result = NULL; memset (& hints, 0, sizeof (hints)); hints.ai_family = AF_INET; if (getaddrinfo (name, NULL, NULL, & resultList) != 0) return -1; for (result = resultList; result != NULL; result = result -> ai_next) { if (result -> ai_family == AF_INET && result -> ai_addr != NULL && result -> ai_addrlen >= sizeof (struct sockaddr_in)) { struct sockaddr_in * sin = (struct sockaddr_in *) result -> ai_addr; address -> host = sin -> sin_addr.s_addr; freeaddrinfo (resultList); return 0; } } if (resultList != NULL) freeaddrinfo (resultList); #else struct hostent * hostEntry = NULL; #ifdef HAS_GETHOSTBYNAME_R struct hostent hostData; char buffer [2048]; int errnum; #if defined(linux) || defined(__linux) || defined(__linux__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) gethostbyname_r (name, & hostData, buffer, sizeof (buffer), & hostEntry, & errnum); #else hostEntry = gethostbyname_r (name, & hostData, buffer, sizeof (buffer), & errnum); #endif #else hostEntry = gethostbyname (name); #endif if (hostEntry != NULL && hostEntry -> h_addrtype == AF_INET) { address -> host = * (enet_uint32 *) hostEntry -> h_addr_list [0]; return 0; } #endif #ifdef HAS_INET_PTON if (! inet_pton (AF_INET, name, & address -> host)) #else if (! inet_aton (name, (struct in_addr *) & address -> host)) #endif return -1; return 0; } int enet_address_get_host_ip (const ENetAddress * address, char * name, size_t nameLength) { #ifdef HAS_INET_NTOP if (inet_ntop (AF_INET, & address -> host, name, nameLength) == NULL) #else char * addr = inet_ntoa (* (struct in_addr *) & address -> host); if (addr != NULL) { size_t addrLen = strlen(addr); if (addrLen >= nameLength) return -1; memcpy (name, addr, addrLen + 1); } else #endif return -1; return 0; } int enet_address_get_host (const ENetAddress * address, char * name, size_t nameLength) { #ifdef HAS_GETNAMEINFO struct sockaddr_in sin; int err; memset (& sin, 0, sizeof (struct sockaddr_in)); sin.sin_family = AF_INET; sin.sin_port = ENET_HOST_TO_NET_16 (address -> port); sin.sin_addr.s_addr = address -> host; err = getnameinfo ((struct sockaddr *) & sin, sizeof (sin), name, nameLength, NULL, 0, NI_NAMEREQD); if (! err) { if (name != NULL && nameLength > 0 && ! memchr (name, '\0', nameLength)) return -1; return 0; } if (err != EAI_NONAME) return -1; #else struct in_addr in; struct hostent * hostEntry = NULL; #ifdef HAS_GETHOSTBYADDR_R struct hostent hostData; char buffer [2048]; int errnum; in.s_addr = address -> host; #if defined(linux) || defined(__linux) || defined(__linux__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) gethostbyaddr_r ((char *) & in, sizeof (struct in_addr), AF_INET, & hostData, buffer, sizeof (buffer), & hostEntry, & errnum); #else hostEntry = gethostbyaddr_r ((char *) & in, sizeof (struct in_addr), AF_INET, & hostData, buffer, sizeof (buffer), & errnum); #endif #else in.s_addr = address -> host; hostEntry = gethostbyaddr ((char *) & in, sizeof (struct in_addr), AF_INET); #endif if (hostEntry != NULL) { size_t hostLen = strlen (hostEntry -> h_name); if (hostLen >= nameLength) return -1; memcpy (name, hostEntry -> h_name, hostLen + 1); return 0; } #endif return enet_address_get_host_ip (address, name, nameLength); } int enet_socket_bind (ENetSocket socket, const ENetAddress * address) { struct sockaddr_in sin; memset (& sin, 0, sizeof (struct sockaddr_in)); sin.sin_family = AF_INET; if (address != NULL) { sin.sin_port = ENET_HOST_TO_NET_16 (address -> port); sin.sin_addr.s_addr = address -> host; } else { sin.sin_port = 0; sin.sin_addr.s_addr = INADDR_ANY; } return bind (socket, (struct sockaddr *) & sin, sizeof (struct sockaddr_in)); } int enet_socket_get_address (ENetSocket socket, ENetAddress * address) { struct sockaddr_in sin; socklen_t sinLength = sizeof (struct sockaddr_in); if (getsockname (socket, (struct sockaddr *) & sin, & sinLength) == -1) return -1; address -> host = (enet_uint32) sin.sin_addr.s_addr; address -> port = ENET_NET_TO_HOST_16 (sin.sin_port); return 0; } int enet_socket_listen (ENetSocket socket, int backlog) { return listen (socket, backlog < 0 ? SOMAXCONN : backlog); } ENetSocket enet_socket_create (ENetSocketType type) { return socket (PF_INET, type == ENET_SOCKET_TYPE_DATAGRAM ? SOCK_DGRAM : SOCK_STREAM, 0); } int enet_socket_set_option (ENetSocket socket, ENetSocketOption option, int value) { int result = -1; switch (option) { case ENET_SOCKOPT_NONBLOCK: #ifdef HAS_FCNTL result = fcntl (socket, F_SETFL, (value ? O_NONBLOCK : 0) | (fcntl (socket, F_GETFL) & ~O_NONBLOCK)); #else result = ioctl (socket, FIONBIO, & value); #endif break; case ENET_SOCKOPT_BROADCAST: result = setsockopt (socket, SOL_SOCKET, SO_BROADCAST, (char *) & value, sizeof (int)); break; case ENET_SOCKOPT_REUSEADDR: result = setsockopt (socket, SOL_SOCKET, SO_REUSEADDR, (char *) & value, sizeof (int)); break; case ENET_SOCKOPT_RCVBUF: result = setsockopt (socket, SOL_SOCKET, SO_RCVBUF, (char *) & value, sizeof (int)); break; case ENET_SOCKOPT_SNDBUF: result = setsockopt (socket, SOL_SOCKET, SO_SNDBUF, (char *) & value, sizeof (int)); break; case ENET_SOCKOPT_RCVTIMEO: { struct timeval timeVal; timeVal.tv_sec = value / 1000; timeVal.tv_usec = (value % 1000) * 1000; result = setsockopt (socket, SOL_SOCKET, SO_RCVTIMEO, (char *) & timeVal, sizeof (struct timeval)); break; } case ENET_SOCKOPT_SNDTIMEO: { struct timeval timeVal; timeVal.tv_sec = value / 1000; timeVal.tv_usec = (value % 1000) * 1000; result = setsockopt (socket, SOL_SOCKET, SO_SNDTIMEO, (char *) & timeVal, sizeof (struct timeval)); break; } case ENET_SOCKOPT_NODELAY: result = setsockopt (socket, IPPROTO_TCP, TCP_NODELAY, (char *) & value, sizeof (int)); break; default: break; } return result == -1 ? -1 : 0; } int enet_socket_get_option (ENetSocket socket, ENetSocketOption option, int * value) { int result = -1; socklen_t len; switch (option) { case ENET_SOCKOPT_ERROR: len = sizeof (int); result = getsockopt (socket, SOL_SOCKET, SO_ERROR, value, & len); break; default: break; } return result == -1 ? -1 : 0; } int enet_socket_connect (ENetSocket socket, const ENetAddress * address) { struct sockaddr_in sin; int result; memset (& sin, 0, sizeof (struct sockaddr_in)); sin.sin_family = AF_INET; sin.sin_port = ENET_HOST_TO_NET_16 (address -> port); sin.sin_addr.s_addr = address -> host; result = connect (socket, (struct sockaddr *) & sin, sizeof (struct sockaddr_in)); if (result == -1 && errno == EINPROGRESS) return 0; return result; } ENetSocket enet_socket_accept (ENetSocket socket, ENetAddress * address) { int result; struct sockaddr_in sin; socklen_t sinLength = sizeof (struct sockaddr_in); result = accept (socket, address != NULL ? (struct sockaddr *) & sin : NULL, address != NULL ? & sinLength : NULL); if (result == -1) return ENET_SOCKET_NULL; if (address != NULL) { address -> host = (enet_uint32) sin.sin_addr.s_addr; address -> port = ENET_NET_TO_HOST_16 (sin.sin_port); } return result; } int enet_socket_shutdown (ENetSocket socket, ENetSocketShutdown how) { return shutdown (socket, (int) how); } void enet_socket_destroy (ENetSocket socket) { if (socket != -1) close (socket); } int enet_socket_send (ENetSocket socket, const ENetAddress * address, const ENetBuffer * buffers, size_t bufferCount) { struct msghdr msgHdr; struct sockaddr_in sin; int sentLength; memset (& msgHdr, 0, sizeof (struct msghdr)); if (address != NULL) { memset (& sin, 0, sizeof (struct sockaddr_in)); sin.sin_family = AF_INET; sin.sin_port = ENET_HOST_TO_NET_16 (address -> port); sin.sin_addr.s_addr = address -> host; msgHdr.msg_name = & sin; msgHdr.msg_namelen = sizeof (struct sockaddr_in); } msgHdr.msg_iov = (struct iovec *) buffers; msgHdr.msg_iovlen = bufferCount; sentLength = sendmsg (socket, & msgHdr, MSG_NOSIGNAL); if (sentLength == -1) { if (errno == EWOULDBLOCK) return 0; return -1; } return sentLength; } int enet_socket_receive (ENetSocket socket, ENetAddress * address, ENetBuffer * buffers, size_t bufferCount) { struct msghdr msgHdr; struct sockaddr_in sin; int recvLength; memset (& msgHdr, 0, sizeof (struct msghdr)); if (address != NULL) { msgHdr.msg_name = & sin; msgHdr.msg_namelen = sizeof (struct sockaddr_in); } msgHdr.msg_iov = (struct iovec *) buffers; msgHdr.msg_iovlen = bufferCount; recvLength = recvmsg (socket, & msgHdr, MSG_NOSIGNAL); if (recvLength == -1) { if (errno == EWOULDBLOCK) return 0; return -1; } #ifdef HAS_MSGHDR_FLAGS if (msgHdr.msg_flags & MSG_TRUNC) return -1; #endif if (address != NULL) { address -> host = (enet_uint32) sin.sin_addr.s_addr; address -> port = ENET_NET_TO_HOST_16 (sin.sin_port); } return recvLength; } int enet_socketset_select (ENetSocket maxSocket, ENetSocketSet * readSet, ENetSocketSet * writeSet, enet_uint32 timeout) { struct timeval timeVal; timeVal.tv_sec = timeout / 1000; timeVal.tv_usec = (timeout % 1000) * 1000; return select (maxSocket + 1, readSet, writeSet, NULL, & timeVal); } int enet_socket_wait (ENetSocket socket, enet_uint32 * condition, enet_uint32 timeout) { #ifdef HAS_POLL struct pollfd pollSocket; int pollCount; pollSocket.fd = socket; pollSocket.events = 0; if (* condition & ENET_SOCKET_WAIT_SEND) pollSocket.events |= POLLOUT; if (* condition & ENET_SOCKET_WAIT_RECEIVE) pollSocket.events |= POLLIN; pollCount = poll (& pollSocket, 1, timeout); if (pollCount < 0) { if (errno == EINTR && * condition & ENET_SOCKET_WAIT_INTERRUPT) { * condition = ENET_SOCKET_WAIT_INTERRUPT; return 0; } return -1; } * condition = ENET_SOCKET_WAIT_NONE; if (pollCount == 0) return 0; if (pollSocket.revents & POLLOUT) * condition |= ENET_SOCKET_WAIT_SEND; if (pollSocket.revents & POLLIN) * condition |= ENET_SOCKET_WAIT_RECEIVE; return 0; #else fd_set readSet, writeSet; struct timeval timeVal; int selectCount; timeVal.tv_sec = timeout / 1000; timeVal.tv_usec = (timeout % 1000) * 1000; FD_ZERO (& readSet); FD_ZERO (& writeSet); if (* condition & ENET_SOCKET_WAIT_SEND) FD_SET (socket, & writeSet); if (* condition & ENET_SOCKET_WAIT_RECEIVE) FD_SET (socket, & readSet); selectCount = select (socket + 1, & readSet, & writeSet, NULL, & timeVal); if (selectCount < 0) { if (errno == EINTR && * condition & ENET_SOCKET_WAIT_INTERRUPT) { * condition = ENET_SOCKET_WAIT_INTERRUPT; return 0; } return -1; } * condition = ENET_SOCKET_WAIT_NONE; if (selectCount == 0) return 0; if (FD_ISSET (socket, & writeSet)) * condition |= ENET_SOCKET_WAIT_SEND; if (FD_ISSET (socket, & readSet)) * condition |= ENET_SOCKET_WAIT_RECEIVE; return 0; #endif } #endif ================================================ FILE: src/libraries/enet/libenet/win32.c ================================================ /** @file win32.c @brief ENet Win32 system specific functions */ #ifdef _WIN32 #define ENET_BUILDING_LIB 1 #include "enet/enet.h" #include #include static enet_uint32 timeBase = 0; int enet_initialize (void) { WORD versionRequested = MAKEWORD (1, 1); WSADATA wsaData; if (WSAStartup (versionRequested, & wsaData)) return -1; if (LOBYTE (wsaData.wVersion) != 1|| HIBYTE (wsaData.wVersion) != 1) { WSACleanup (); return -1; } timeBeginPeriod (1); return 0; } void enet_deinitialize (void) { timeEndPeriod (1); WSACleanup (); } enet_uint32 enet_host_random_seed (void) { return (enet_uint32) timeGetTime (); } enet_uint32 enet_time_get (void) { return (enet_uint32) timeGetTime () - timeBase; } void enet_time_set (enet_uint32 newTimeBase) { timeBase = (enet_uint32) timeGetTime () - newTimeBase; } int enet_address_set_host (ENetAddress * address, const char * name) { struct hostent * hostEntry; hostEntry = gethostbyname (name); if (hostEntry == NULL || hostEntry -> h_addrtype != AF_INET) { unsigned long host = inet_addr (name); if (host == INADDR_NONE) return -1; address -> host = host; return 0; } address -> host = * (enet_uint32 *) hostEntry -> h_addr_list [0]; return 0; } int enet_address_get_host_ip (const ENetAddress * address, char * name, size_t nameLength) { char * addr = inet_ntoa (* (struct in_addr *) & address -> host); if (addr == NULL) return -1; else { size_t addrLen = strlen(addr); if (addrLen >= nameLength) return -1; memcpy (name, addr, addrLen + 1); } return 0; } int enet_address_get_host (const ENetAddress * address, char * name, size_t nameLength) { struct in_addr in; struct hostent * hostEntry; in.s_addr = address -> host; hostEntry = gethostbyaddr ((char *) & in, sizeof (struct in_addr), AF_INET); if (hostEntry == NULL) return enet_address_get_host_ip (address, name, nameLength); else { size_t hostLen = strlen (hostEntry -> h_name); if (hostLen >= nameLength) return -1; memcpy (name, hostEntry -> h_name, hostLen + 1); } return 0; } int enet_socket_bind (ENetSocket socket, const ENetAddress * address) { struct sockaddr_in sin; memset (& sin, 0, sizeof (struct sockaddr_in)); sin.sin_family = AF_INET; if (address != NULL) { sin.sin_port = ENET_HOST_TO_NET_16 (address -> port); sin.sin_addr.s_addr = address -> host; } else { sin.sin_port = 0; sin.sin_addr.s_addr = INADDR_ANY; } return bind (socket, (struct sockaddr *) & sin, sizeof (struct sockaddr_in)) == SOCKET_ERROR ? -1 : 0; } int enet_socket_get_address (ENetSocket socket, ENetAddress * address) { struct sockaddr_in sin; int sinLength = sizeof (struct sockaddr_in); if (getsockname (socket, (struct sockaddr *) & sin, & sinLength) == -1) return -1; address -> host = (enet_uint32) sin.sin_addr.s_addr; address -> port = ENET_NET_TO_HOST_16 (sin.sin_port); return 0; } int enet_socket_listen (ENetSocket socket, int backlog) { return listen (socket, backlog < 0 ? SOMAXCONN : backlog) == SOCKET_ERROR ? -1 : 0; } ENetSocket enet_socket_create (ENetSocketType type) { return socket (PF_INET, type == ENET_SOCKET_TYPE_DATAGRAM ? SOCK_DGRAM : SOCK_STREAM, 0); } int enet_socket_set_option (ENetSocket socket, ENetSocketOption option, int value) { int result = SOCKET_ERROR; switch (option) { case ENET_SOCKOPT_NONBLOCK: { u_long nonBlocking = (u_long) value; result = ioctlsocket (socket, FIONBIO, & nonBlocking); break; } case ENET_SOCKOPT_BROADCAST: result = setsockopt (socket, SOL_SOCKET, SO_BROADCAST, (char *) & value, sizeof (int)); break; case ENET_SOCKOPT_REUSEADDR: result = setsockopt (socket, SOL_SOCKET, SO_REUSEADDR, (char *) & value, sizeof (int)); break; case ENET_SOCKOPT_RCVBUF: result = setsockopt (socket, SOL_SOCKET, SO_RCVBUF, (char *) & value, sizeof (int)); break; case ENET_SOCKOPT_SNDBUF: result = setsockopt (socket, SOL_SOCKET, SO_SNDBUF, (char *) & value, sizeof (int)); break; case ENET_SOCKOPT_RCVTIMEO: result = setsockopt (socket, SOL_SOCKET, SO_RCVTIMEO, (char *) & value, sizeof (int)); break; case ENET_SOCKOPT_SNDTIMEO: result = setsockopt (socket, SOL_SOCKET, SO_SNDTIMEO, (char *) & value, sizeof (int)); break; case ENET_SOCKOPT_NODELAY: result = setsockopt (socket, IPPROTO_TCP, TCP_NODELAY, (char *) & value, sizeof (int)); break; default: break; } return result == SOCKET_ERROR ? -1 : 0; } int enet_socket_get_option (ENetSocket socket, ENetSocketOption option, int * value) { int result = SOCKET_ERROR, len; switch (option) { case ENET_SOCKOPT_ERROR: len = sizeof(int); result = getsockopt (socket, SOL_SOCKET, SO_ERROR, (char *) value, & len); break; default: break; } return result == SOCKET_ERROR ? -1 : 0; } int enet_socket_connect (ENetSocket socket, const ENetAddress * address) { struct sockaddr_in sin; int result; memset (& sin, 0, sizeof (struct sockaddr_in)); sin.sin_family = AF_INET; sin.sin_port = ENET_HOST_TO_NET_16 (address -> port); sin.sin_addr.s_addr = address -> host; result = connect (socket, (struct sockaddr *) & sin, sizeof (struct sockaddr_in)); if (result == SOCKET_ERROR && WSAGetLastError () != WSAEWOULDBLOCK) return -1; return 0; } ENetSocket enet_socket_accept (ENetSocket socket, ENetAddress * address) { SOCKET result; struct sockaddr_in sin; int sinLength = sizeof (struct sockaddr_in); result = accept (socket, address != NULL ? (struct sockaddr *) & sin : NULL, address != NULL ? & sinLength : NULL); if (result == INVALID_SOCKET) return ENET_SOCKET_NULL; if (address != NULL) { address -> host = (enet_uint32) sin.sin_addr.s_addr; address -> port = ENET_NET_TO_HOST_16 (sin.sin_port); } return result; } int enet_socket_shutdown (ENetSocket socket, ENetSocketShutdown how) { return shutdown (socket, (int) how) == SOCKET_ERROR ? -1 : 0; } void enet_socket_destroy (ENetSocket socket) { if (socket != INVALID_SOCKET) closesocket (socket); } int enet_socket_send (ENetSocket socket, const ENetAddress * address, const ENetBuffer * buffers, size_t bufferCount) { struct sockaddr_in sin; DWORD sentLength; if (address != NULL) { memset (& sin, 0, sizeof (struct sockaddr_in)); sin.sin_family = AF_INET; sin.sin_port = ENET_HOST_TO_NET_16 (address -> port); sin.sin_addr.s_addr = address -> host; } if (WSASendTo (socket, (LPWSABUF) buffers, (DWORD) bufferCount, & sentLength, 0, address != NULL ? (struct sockaddr *) & sin : NULL, address != NULL ? sizeof (struct sockaddr_in) : 0, NULL, NULL) == SOCKET_ERROR) { if (WSAGetLastError () == WSAEWOULDBLOCK) return 0; return -1; } return (int) sentLength; } int enet_socket_receive (ENetSocket socket, ENetAddress * address, ENetBuffer * buffers, size_t bufferCount) { INT sinLength = sizeof (struct sockaddr_in); DWORD flags = 0, recvLength; struct sockaddr_in sin; if (WSARecvFrom (socket, (LPWSABUF) buffers, (DWORD) bufferCount, & recvLength, & flags, address != NULL ? (struct sockaddr *) & sin : NULL, address != NULL ? & sinLength : NULL, NULL, NULL) == SOCKET_ERROR) { switch (WSAGetLastError ()) { case WSAEWOULDBLOCK: case WSAECONNRESET: return 0; } return -1; } if (flags & MSG_PARTIAL) return -1; if (address != NULL) { address -> host = (enet_uint32) sin.sin_addr.s_addr; address -> port = ENET_NET_TO_HOST_16 (sin.sin_port); } return (int) recvLength; } int enet_socketset_select (ENetSocket maxSocket, ENetSocketSet * readSet, ENetSocketSet * writeSet, enet_uint32 timeout) { struct timeval timeVal; timeVal.tv_sec = timeout / 1000; timeVal.tv_usec = (timeout % 1000) * 1000; return select (maxSocket + 1, readSet, writeSet, NULL, & timeVal); } int enet_socket_wait (ENetSocket socket, enet_uint32 * condition, enet_uint32 timeout) { fd_set readSet, writeSet; struct timeval timeVal; int selectCount; timeVal.tv_sec = timeout / 1000; timeVal.tv_usec = (timeout % 1000) * 1000; FD_ZERO (& readSet); FD_ZERO (& writeSet); if (* condition & ENET_SOCKET_WAIT_SEND) FD_SET (socket, & writeSet); if (* condition & ENET_SOCKET_WAIT_RECEIVE) FD_SET (socket, & readSet); selectCount = select (socket + 1, & readSet, & writeSet, NULL, & timeVal); if (selectCount < 0) return -1; * condition = ENET_SOCKET_WAIT_NONE; if (selectCount == 0) return 0; if (FD_ISSET (socket, & writeSet)) * condition |= ENET_SOCKET_WAIT_SEND; if (FD_ISSET (socket, & readSet)) * condition |= ENET_SOCKET_WAIT_RECEIVE; return 0; } #endif ================================================ FILE: src/libraries/enet/lua-enet.h ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ #ifndef LOVE_LUAENET_LUAENET_H #define LOVE_LUAENET_LUAENET_H int luaopen_enet(lua_State * L); #endif // LOVE_LUAENET_LUAENET_H ================================================ FILE: src/libraries/glad/glad.cpp ================================================ #include #ifdef GLAD_USE_SDL #include #if !SDL_VERSION_ATLEAST(2,0,0) #error SDL 2 is required! #endif #else #include #endif #include "glad.hpp" namespace glad { bool gladLoadGL(void) { #ifdef GLAD_USE_SDL return gladLoadGLLoader(SDL_GL_GetProcAddress); #else // generic gladLoadGL is not implemented, use gladLoadGLLoader or define GLAD_USE_SDL assert(0); return false; #endif } struct { int major; int minor; int gles; } GLVersion; static bool has_ext(const char *ext) { if(GLVersion.major < 3) { const char *extensions; const char *loc; const char *terminator; extensions = (const char *)fp_glGetString(GL_EXTENSIONS); if(extensions == NULL || ext == NULL) { return false; } while(1) { loc = strstr(extensions, ext); if(loc == NULL) { return false; } terminator = loc + strlen(ext); if((loc == extensions || *(loc - 1) == ' ') && (*terminator == ' ' || *terminator == '\0')) { return true; } extensions = terminator; } } else { int num; fp_glGetIntegerv(GL_NUM_EXTENSIONS, &num); int index; for(index = 0; index < num; index++) { const char *e = (const char*)fp_glGetStringi(GL_EXTENSIONS, index); if(strcmp(e, ext) == 0) { return true; } } } return false; } pfn_glCopyTexImage1D fp_glCopyTexImage1D; pfn_glTextureParameterf fp_glTextureParameterf; pfn_glVertexAttribI3ui fp_glVertexAttribI3ui; pfn_glVertexArrayElementBuffer fp_glVertexArrayElementBuffer; pfn_glWindowPos2s fp_glWindowPos2s; pfn_glTextureStorage3DMultisample fp_glTextureStorage3DMultisample; pfn_glTextureParameterfv fp_glTextureParameterfv; pfn_glWindowPos2i fp_glWindowPos2i; pfn_glWindowPos2f fp_glWindowPos2f; pfn_glWindowPos2d fp_glWindowPos2d; pfn_glVertex2fv fp_glVertex2fv; pfn_glIndexi fp_glIndexi; pfn_glFramebufferRenderbuffer fp_glFramebufferRenderbuffer; pfn_glUniformSubroutinesuiv fp_glUniformSubroutinesuiv; pfn_glRectdv fp_glRectdv; pfn_glCompressedTexSubImage3D fp_glCompressedTexSubImage3D; pfn_glEvalCoord2d fp_glEvalCoord2d; pfn_glEvalCoord2f fp_glEvalCoord2f; pfn_glGetDoublei_v fp_glGetDoublei_v; pfn_glIndexd fp_glIndexd; pfn_glVertexAttrib1sv fp_glVertexAttrib1sv; pfn_glIndexf fp_glIndexf; pfn_glBindSampler fp_glBindSampler; pfn_glLineWidth fp_glLineWidth; pfn_glColorP3uiv fp_glColorP3uiv; pfn_glGetIntegeri_v fp_glGetIntegeri_v; pfn_glGetMapfv fp_glGetMapfv; pfn_glIndexs fp_glIndexs; pfn_glCompileShader fp_glCompileShader; pfn_glGetTransformFeedbackVarying fp_glGetTransformFeedbackVarying; pfn_glWindowPos2iv fp_glWindowPos2iv; pfn_glDrawTransformFeedbackStreamInstanced fp_glDrawTransformFeedbackStreamInstanced; pfn_glIndexfv fp_glIndexfv; pfn_glGetCompressedTextureImage fp_glGetCompressedTextureImage; pfn_glGetnMapfv fp_glGetnMapfv; pfn_glFogiv fp_glFogiv; pfn_glStencilMaskSeparate fp_glStencilMaskSeparate; pfn_glRasterPos2fv fp_glRasterPos2fv; pfn_glLightModeliv fp_glLightModeliv; pfn_glDepthRangef fp_glDepthRangef; pfn_glColor4ui fp_glColor4ui; pfn_glSecondaryColor3fv fp_glSecondaryColor3fv; pfn_glMultiTexCoordP3ui fp_glMultiTexCoordP3ui; pfn_glMemoryBarrierByRegion fp_glMemoryBarrierByRegion; pfn_glGetNamedBufferParameteriv fp_glGetNamedBufferParameteriv; pfn_glFogfv fp_glFogfv; pfn_glVertexP4ui fp_glVertexP4ui; pfn_glDrawElementsInstancedBaseInstance fp_glDrawElementsInstancedBaseInstance; pfn_glEnablei fp_glEnablei; pfn_glProgramUniform3dv fp_glProgramUniform3dv; pfn_glVertex4iv fp_glVertex4iv; pfn_glEvalCoord1fv fp_glEvalCoord1fv; pfn_glWindowPos2sv fp_glWindowPos2sv; pfn_glVertexAttribP4ui fp_glVertexAttribP4ui; pfn_glCreateShader fp_glCreateShader; pfn_glIsBuffer fp_glIsBuffer; pfn_glGetMultisamplefv fp_glGetMultisamplefv; pfn_glProgramUniformMatrix2dv fp_glProgramUniformMatrix2dv; pfn_glGenRenderbuffers fp_glGenRenderbuffers; pfn_glCopyTexSubImage2D fp_glCopyTexSubImage2D; pfn_glCompressedTexImage2D fp_glCompressedTexImage2D; pfn_glVertexAttrib1f fp_glVertexAttrib1f; pfn_glBlendFuncSeparate fp_glBlendFuncSeparate; pfn_glVertex4fv fp_glVertex4fv; pfn_glMinSampleShading fp_glMinSampleShading; pfn_glClearNamedFramebufferfi fp_glClearNamedFramebufferfi; pfn_glGetQueryBufferObjectuiv fp_glGetQueryBufferObjectuiv; pfn_glBindTexture fp_glBindTexture; pfn_glVertexAttrib1s fp_glVertexAttrib1s; pfn_glTexCoord2fv fp_glTexCoord2fv; pfn_glSampleMaski fp_glSampleMaski; pfn_glVertexP2ui fp_glVertexP2ui; pfn_glDrawRangeElementsBaseVertex fp_glDrawRangeElementsBaseVertex; pfn_glTexCoord4fv fp_glTexCoord4fv; pfn_glUniformMatrix3x2fv fp_glUniformMatrix3x2fv; pfn_glDebugMessageControl fp_glDebugMessageControl; pfn_glPointSize fp_glPointSize; pfn_glBindTextureUnit fp_glBindTextureUnit; pfn_glVertexAttrib2dv fp_glVertexAttrib2dv; pfn_glDeleteProgram fp_glDeleteProgram; pfn_glColor4bv fp_glColor4bv; pfn_glRasterPos2f fp_glRasterPos2f; pfn_glRasterPos2d fp_glRasterPos2d; pfn_glLoadIdentity fp_glLoadIdentity; pfn_glRasterPos2i fp_glRasterPos2i; pfn_glMultiDrawArraysIndirect fp_glMultiDrawArraysIndirect; pfn_glRenderbufferStorage fp_glRenderbufferStorage; pfn_glUniformMatrix4x3fv fp_glUniformMatrix4x3fv; pfn_glColor3b fp_glColor3b; pfn_glClearBufferfv fp_glClearBufferfv; pfn_glEdgeFlag fp_glEdgeFlag; pfn_glDeleteSamplers fp_glDeleteSamplers; pfn_glVertex3d fp_glVertex3d; pfn_glVertex3f fp_glVertex3f; pfn_glGetnMapiv fp_glGetnMapiv; pfn_glVertex3i fp_glVertex3i; pfn_glColor3i fp_glColor3i; pfn_glUniform3d fp_glUniform3d; pfn_glUniform3f fp_glUniform3f; pfn_glVertexAttrib4ubv fp_glVertexAttrib4ubv; pfn_glColor3s fp_glColor3s; pfn_glVertex3s fp_glVertex3s; pfn_glTexCoordP2ui fp_glTexCoordP2ui; pfn_glColorMaski fp_glColorMaski; pfn_glClearBufferfi fp_glClearBufferfi; pfn_glDrawArraysIndirect fp_glDrawArraysIndirect; pfn_glTexCoord1iv fp_glTexCoord1iv; pfn_glBlitFramebuffer fp_glBlitFramebuffer; pfn_glPauseTransformFeedback fp_glPauseTransformFeedback; pfn_glMultiTexCoordP2ui fp_glMultiTexCoordP2ui; pfn_glProgramUniformMatrix3x2dv fp_glProgramUniformMatrix3x2dv; pfn_glCopyNamedBufferSubData fp_glCopyNamedBufferSubData; pfn_glNamedFramebufferTexture fp_glNamedFramebufferTexture; pfn_glProgramUniformMatrix3x2fv fp_glProgramUniformMatrix3x2fv; pfn_glGetSamplerParameterIiv fp_glGetSamplerParameterIiv; pfn_glGetFragDataIndex fp_glGetFragDataIndex; pfn_glVertexAttribL4d fp_glVertexAttribL4d; pfn_glBindImageTexture fp_glBindImageTexture; pfn_glVertexAttrib3f fp_glVertexAttrib3f; pfn_glProgramUniformMatrix4fv fp_glProgramUniformMatrix4fv; pfn_glVertex2iv fp_glVertex2iv; pfn_glGetQueryBufferObjecti64v fp_glGetQueryBufferObjecti64v; pfn_glColor3sv fp_glColor3sv; pfn_glGetVertexAttribdv fp_glGetVertexAttribdv; pfn_glActiveShaderProgram fp_glActiveShaderProgram; pfn_glUniformMatrix3x4fv fp_glUniformMatrix3x4fv; pfn_glUniformMatrix3dv fp_glUniformMatrix3dv; pfn_glNormalPointer fp_glNormalPointer; pfn_glTexCoordP3uiv fp_glTexCoordP3uiv; pfn_glVertex4sv fp_glVertex4sv; pfn_glVertexArrayAttribLFormat fp_glVertexArrayAttribLFormat; pfn_glInvalidateBufferSubData fp_glInvalidateBufferSubData; pfn_glPassThrough fp_glPassThrough; pfn_glMultiTexCoordP4ui fp_glMultiTexCoordP4ui; pfn_glFogi fp_glFogi; pfn_glBegin fp_glBegin; pfn_glEvalCoord2dv fp_glEvalCoord2dv; pfn_glColor3ubv fp_glColor3ubv; pfn_glVertexPointer fp_glVertexPointer; pfn_glSecondaryColor3uiv fp_glSecondaryColor3uiv; pfn_glDeleteFramebuffers fp_glDeleteFramebuffers; pfn_glDrawArrays fp_glDrawArrays; pfn_glUniform1ui fp_glUniform1ui; pfn_glGetTransformFeedbackiv fp_glGetTransformFeedbackiv; pfn_glMultiTexCoord1d fp_glMultiTexCoord1d; pfn_glMultiTexCoord1f fp_glMultiTexCoord1f; pfn_glProgramParameteri fp_glProgramParameteri; pfn_glLightfv fp_glLightfv; pfn_glTexCoordP3ui fp_glTexCoordP3ui; pfn_glVertexAttrib3d fp_glVertexAttrib3d; pfn_glClear fp_glClear; pfn_glMultiTexCoord1i fp_glMultiTexCoord1i; pfn_glGetActiveUniformName fp_glGetActiveUniformName; pfn_glMemoryBarrier fp_glMemoryBarrier; pfn_glGetGraphicsResetStatus fp_glGetGraphicsResetStatus; pfn_glMultiTexCoord1s fp_glMultiTexCoord1s; pfn_glIsEnabled fp_glIsEnabled; pfn_glStencilOp fp_glStencilOp; pfn_glGetQueryObjectuiv fp_glGetQueryObjectuiv; pfn_glFramebufferTexture2D fp_glFramebufferTexture2D; pfn_glGetFramebufferAttachmentParameteriv fp_glGetFramebufferAttachmentParameteriv; pfn_glTranslatef fp_glTranslatef; pfn_glVertexAttrib4Nub fp_glVertexAttrib4Nub; pfn_glTranslated fp_glTranslated; pfn_glTexCoord3sv fp_glTexCoord3sv; pfn_glGetFragDataLocation fp_glGetFragDataLocation; pfn_glGetTextureParameterIiv fp_glGetTextureParameterIiv; pfn_glTexImage1D fp_glTexImage1D; pfn_glCopyTextureSubImage3D fp_glCopyTextureSubImage3D; pfn_glVertexP3uiv fp_glVertexP3uiv; pfn_glTexParameteriv fp_glTexParameteriv; pfn_glVertexArrayAttribIFormat fp_glVertexArrayAttribIFormat; pfn_glSecondaryColor3bv fp_glSecondaryColor3bv; pfn_glGetMaterialfv fp_glGetMaterialfv; pfn_glGetTexImage fp_glGetTexImage; pfn_glFogCoordfv fp_glFogCoordfv; pfn_glPixelMapuiv fp_glPixelMapuiv; pfn_glGetShaderInfoLog fp_glGetShaderInfoLog; pfn_glGetQueryObjecti64v fp_glGetQueryObjecti64v; pfn_glGenFramebuffers fp_glGenFramebuffers; pfn_glCreateTextures fp_glCreateTextures; pfn_glTransformFeedbackBufferBase fp_glTransformFeedbackBufferBase; pfn_glIndexsv fp_glIndexsv; pfn_glClearTexSubImage fp_glClearTexSubImage; pfn_glProgramUniformMatrix3x4dv fp_glProgramUniformMatrix3x4dv; pfn_glGetAttachedShaders fp_glGetAttachedShaders; pfn_glIsRenderbuffer fp_glIsRenderbuffer; pfn_glVertex3iv fp_glVertex3iv; pfn_glBitmap fp_glBitmap; pfn_glGetDebugMessageLog fp_glGetDebugMessageLog; pfn_glProgramUniform1uiv fp_glProgramUniform1uiv; pfn_glMateriali fp_glMateriali; pfn_glIsVertexArray fp_glIsVertexArray; pfn_glDisableVertexAttribArray fp_glDisableVertexAttribArray; pfn_glProgramUniform2iv fp_glProgramUniform2iv; pfn_glGetQueryiv fp_glGetQueryiv; pfn_glTexCoord4f fp_glTexCoord4f; pfn_glBlitNamedFramebuffer fp_glBlitNamedFramebuffer; pfn_glTexCoord4d fp_glTexCoord4d; pfn_glCreateQueries fp_glCreateQueries; pfn_glGetSamplerParameterfv fp_glGetSamplerParameterfv; pfn_glTexCoord4i fp_glTexCoord4i; pfn_glShaderStorageBlockBinding fp_glShaderStorageBlockBinding; pfn_glMaterialf fp_glMaterialf; pfn_glTexCoord4s fp_glTexCoord4s; pfn_glProgramUniformMatrix4x2dv fp_glProgramUniformMatrix4x2dv; pfn_glGetUniformIndices fp_glGetUniformIndices; pfn_glIsShader fp_glIsShader; pfn_glMultiTexCoord2s fp_glMultiTexCoord2s; pfn_glVertexAttribI4ubv fp_glVertexAttribI4ubv; pfn_glVertex3dv fp_glVertex3dv; pfn_glGetInteger64v fp_glGetInteger64v; pfn_glPointParameteriv fp_glPointParameteriv; pfn_glGetnMinmax fp_glGetnMinmax; pfn_glEnable fp_glEnable; pfn_glGetActiveUniformsiv fp_glGetActiveUniformsiv; pfn_glColor4fv fp_glColor4fv; pfn_glTexCoord1fv fp_glTexCoord1fv; pfn_glVertexArrayAttribBinding fp_glVertexArrayAttribBinding; pfn_glTextureStorage1D fp_glTextureStorage1D; pfn_glPopDebugGroup fp_glPopDebugGroup; pfn_glBlendEquationi fp_glBlendEquationi; pfn_glTexCoord2sv fp_glTexCoord2sv; pfn_glVertexAttrib4dv fp_glVertexAttrib4dv; pfn_glMultiTexCoord1dv fp_glMultiTexCoord1dv; pfn_glGetProgramInterfaceiv fp_glGetProgramInterfaceiv; pfn_glMultiTexCoord2i fp_glMultiTexCoord2i; pfn_glTexCoord3fv fp_glTexCoord3fv; pfn_glSecondaryColor3usv fp_glSecondaryColor3usv; pfn_glTexGenf fp_glTexGenf; pfn_glMapNamedBuffer fp_glMapNamedBuffer; pfn_glMultiTexCoordP3uiv fp_glMultiTexCoordP3uiv; pfn_glVertexAttribP3ui fp_glVertexAttribP3ui; pfn_glVertexAttribL1dv fp_glVertexAttribL1dv; pfn_glTextureBufferRange fp_glTextureBufferRange; pfn_glGetnUniformdv fp_glGetnUniformdv; pfn_glMultiTexCoordP1ui fp_glMultiTexCoordP1ui; pfn_glProgramUniform3ui fp_glProgramUniform3ui; pfn_glTransformFeedbackBufferRange fp_glTransformFeedbackBufferRange; pfn_glGetPointerv fp_glGetPointerv; pfn_glVertexBindingDivisor fp_glVertexBindingDivisor; pfn_glPolygonOffset fp_glPolygonOffset; pfn_glGetUniformuiv fp_glGetUniformuiv; pfn_glNormal3fv fp_glNormal3fv; pfn_glSecondaryColor3s fp_glSecondaryColor3s; pfn_glNamedFramebufferDrawBuffers fp_glNamedFramebufferDrawBuffers; pfn_glDepthRange fp_glDepthRange; pfn_glFrustum fp_glFrustum; pfn_glMultiTexCoord4sv fp_glMultiTexCoord4sv; pfn_glVertexArrayBindingDivisor fp_glVertexArrayBindingDivisor; pfn_glDrawBuffer fp_glDrawBuffer; pfn_glPushMatrix fp_glPushMatrix; pfn_glGetnPixelMapusv fp_glGetnPixelMapusv; pfn_glRasterPos3fv fp_glRasterPos3fv; pfn_glOrtho fp_glOrtho; pfn_glDrawElementsInstanced fp_glDrawElementsInstanced; pfn_glWindowPos3sv fp_glWindowPos3sv; pfn_glVertexAttribL4dv fp_glVertexAttribL4dv; pfn_glProgramUniform1i fp_glProgramUniform1i; pfn_glUniform2dv fp_glUniform2dv; pfn_glProgramUniform1d fp_glProgramUniform1d; pfn_glProgramUniform1f fp_glProgramUniform1f; pfn_glClearIndex fp_glClearIndex; pfn_glMap1d fp_glMap1d; pfn_glMap1f fp_glMap1f; pfn_glFlush fp_glFlush; pfn_glGetRenderbufferParameteriv fp_glGetRenderbufferParameteriv; pfn_glBeginQueryIndexed fp_glBeginQueryIndexed; pfn_glProgramUniform3iv fp_glProgramUniform3iv; pfn_glIndexiv fp_glIndexiv; pfn_glNamedRenderbufferStorage fp_glNamedRenderbufferStorage; pfn_glRasterPos3sv fp_glRasterPos3sv; pfn_glGetVertexAttribPointerv fp_glGetVertexAttribPointerv; pfn_glPixelZoom fp_glPixelZoom; pfn_glFenceSync fp_glFenceSync; pfn_glDeleteVertexArrays fp_glDeleteVertexArrays; pfn_glColorP3ui fp_glColorP3ui; pfn_glDrawElementsInstancedBaseVertexBaseInstance fp_glDrawElementsInstancedBaseVertexBaseInstance; pfn_glTextureStorage2DMultisample fp_glTextureStorage2DMultisample; pfn_glVertexAttrib3sv fp_glVertexAttrib3sv; pfn_glBeginConditionalRender fp_glBeginConditionalRender; pfn_glPushDebugGroup fp_glPushDebugGroup; pfn_glGetShaderPrecisionFormat fp_glGetShaderPrecisionFormat; pfn_glValidateProgramPipeline fp_glValidateProgramPipeline; pfn_glDrawElementsBaseVertex fp_glDrawElementsBaseVertex; pfn_glGetTexLevelParameteriv fp_glGetTexLevelParameteriv; pfn_glLighti fp_glLighti; pfn_glMultiTexCoordP4uiv fp_glMultiTexCoordP4uiv; pfn_glVertexArrayVertexBuffer fp_glVertexArrayVertexBuffer; pfn_glLightf fp_glLightf; pfn_glBindVertexBuffers fp_glBindVertexBuffers; pfn_glGetAttribLocation fp_glGetAttribLocation; pfn_glTexStorage3DMultisample fp_glTexStorage3DMultisample; pfn_glStencilFuncSeparate fp_glStencilFuncSeparate; pfn_glDisableVertexArrayAttrib fp_glDisableVertexArrayAttrib; pfn_glGenSamplers fp_glGenSamplers; pfn_glClampColor fp_glClampColor; pfn_glUniform4iv fp_glUniform4iv; pfn_glClearStencil fp_glClearStencil; pfn_glTexCoordP1uiv fp_glTexCoordP1uiv; pfn_glGetNamedRenderbufferParameteriv fp_glGetNamedRenderbufferParameteriv; pfn_glDrawTransformFeedbackInstanced fp_glDrawTransformFeedbackInstanced; pfn_glMultiTexCoord3fv fp_glMultiTexCoord3fv; pfn_glGetPixelMapuiv fp_glGetPixelMapuiv; pfn_glGenTextures fp_glGenTextures; pfn_glTexCoord4iv fp_glTexCoord4iv; pfn_glDrawTransformFeedback fp_glDrawTransformFeedback; pfn_glUniform1dv fp_glUniform1dv; pfn_glGetTexParameterIuiv fp_glGetTexParameterIuiv; pfn_glGetTransformFeedbacki_v fp_glGetTransformFeedbacki_v; pfn_glIndexPointer fp_glIndexPointer; pfn_glGetnPolygonStipple fp_glGetnPolygonStipple; pfn_glVertexAttrib4Nbv fp_glVertexAttrib4Nbv; pfn_glClearNamedFramebufferuiv fp_glClearNamedFramebufferuiv; pfn_glGetVertexArrayIndexediv fp_glGetVertexArrayIndexediv; pfn_glIsSync fp_glIsSync; pfn_glVertex2f fp_glVertex2f; pfn_glVertex2d fp_glVertex2d; pfn_glDeleteRenderbuffers fp_glDeleteRenderbuffers; pfn_glUniform2i fp_glUniform2i; pfn_glMapGrid2d fp_glMapGrid2d; pfn_glMapGrid2f fp_glMapGrid2f; pfn_glTexCoordP4ui fp_glTexCoordP4ui; pfn_glVertex2i fp_glVertex2i; pfn_glVertexAttribPointer fp_glVertexAttribPointer; pfn_glProgramUniform1ui fp_glProgramUniform1ui; pfn_glFramebufferTextureLayer fp_glFramebufferTextureLayer; pfn_glVertex2s fp_glVertex2s; pfn_glGetObjectPtrLabel fp_glGetObjectPtrLabel; pfn_glTextureParameteri fp_glTextureParameteri; pfn_glNormal3bv fp_glNormal3bv; pfn_glVertexAttrib4Nuiv fp_glVertexAttrib4Nuiv; pfn_glFlushMappedBufferRange fp_glFlushMappedBufferRange; pfn_glProgramUniform2fv fp_glProgramUniform2fv; pfn_glUniformMatrix2x3dv fp_glUniformMatrix2x3dv; pfn_glProgramUniformMatrix4dv fp_glProgramUniformMatrix4dv; pfn_glSecondaryColor3sv fp_glSecondaryColor3sv; pfn_glPrimitiveBoundingBox fp_glPrimitiveBoundingBox; pfn_glProgramUniformMatrix2x4dv fp_glProgramUniformMatrix2x4dv; pfn_glDispatchCompute fp_glDispatchCompute; pfn_glVertex3sv fp_glVertex3sv; pfn_glGenQueries fp_glGenQueries; pfn_glGetPixelMapfv fp_glGetPixelMapfv; pfn_glTexEnvf fp_glTexEnvf; pfn_glVertexAttribP1ui fp_glVertexAttribP1ui; pfn_glTexSubImage3D fp_glTexSubImage3D; pfn_glGetInteger64i_v fp_glGetInteger64i_v; pfn_glFogCoordd fp_glFogCoordd; pfn_glFogCoordf fp_glFogCoordf; pfn_glCopyTexImage2D fp_glCopyTexImage2D; pfn_glTexEnvi fp_glTexEnvi; pfn_glMultiTexCoord1iv fp_glMultiTexCoord1iv; pfn_glIsEnabledi fp_glIsEnabledi; pfn_glBindBuffersRange fp_glBindBuffersRange; pfn_glSecondaryColorP3ui fp_glSecondaryColorP3ui; pfn_glVertexAttribI2i fp_glVertexAttribI2i; pfn_glBindFragDataLocationIndexed fp_glBindFragDataLocationIndexed; pfn_glCopyImageSubData fp_glCopyImageSubData; pfn_glMultiTexCoord2dv fp_glMultiTexCoord2dv; pfn_glUniform2iv fp_glUniform2iv; pfn_glVertexAttrib1fv fp_glVertexAttrib1fv; pfn_glGetInternalformativ fp_glGetInternalformativ; pfn_glUniform4uiv fp_glUniform4uiv; pfn_glMatrixMode fp_glMatrixMode; pfn_glGetTextureImage fp_glGetTextureImage; pfn_glFeedbackBuffer fp_glFeedbackBuffer; pfn_glProgramUniform2dv fp_glProgramUniform2dv; pfn_glEndQueryIndexed fp_glEndQueryIndexed; pfn_glGetMapiv fp_glGetMapiv; pfn_glTextureSubImage3D fp_glTextureSubImage3D; pfn_glFramebufferTexture1D fp_glFramebufferTexture1D; pfn_glUniform4d fp_glUniform4d; pfn_glGetShaderiv fp_glGetShaderiv; pfn_glMultiTexCoord2d fp_glMultiTexCoord2d; pfn_glMultiTexCoord2f fp_glMultiTexCoord2f; pfn_glProgramUniformMatrix3fv fp_glProgramUniformMatrix3fv; pfn_glObjectPtrLabel fp_glObjectPtrLabel; pfn_glInvalidateFramebuffer fp_glInvalidateFramebuffer; pfn_glBindTextures fp_glBindTextures; pfn_glBindFragDataLocation fp_glBindFragDataLocation; pfn_glNamedBufferStorage fp_glNamedBufferStorage; pfn_glScissorArrayv fp_glScissorArrayv; pfn_glPrioritizeTextures fp_glPrioritizeTextures; pfn_glCallList fp_glCallList; pfn_glPatchParameterfv fp_glPatchParameterfv; pfn_glSecondaryColor3ubv fp_glSecondaryColor3ubv; pfn_glGetDoublev fp_glGetDoublev; pfn_glMultiTexCoord3iv fp_glMultiTexCoord3iv; pfn_glVertexAttrib1d fp_glVertexAttrib1d; pfn_glUniform4dv fp_glUniform4dv; pfn_glLightModelf fp_glLightModelf; pfn_glGetUniformiv fp_glGetUniformiv; pfn_glInvalidateBufferData fp_glInvalidateBufferData; pfn_glVertex2sv fp_glVertex2sv; pfn_glVertexArrayVertexBuffers fp_glVertexArrayVertexBuffers; pfn_glCompressedTextureSubImage1D fp_glCompressedTextureSubImage1D; pfn_glLightModeli fp_glLightModeli; pfn_glWindowPos3iv fp_glWindowPos3iv; pfn_glMultiTexCoordP1uiv fp_glMultiTexCoordP1uiv; pfn_glUniform3fv fp_glUniform3fv; pfn_glPixelStorei fp_glPixelStorei; pfn_glGetProgramPipelineInfoLog fp_glGetProgramPipelineInfoLog; pfn_glCallLists fp_glCallLists; pfn_glProgramUniformMatrix3x4fv fp_glProgramUniformMatrix3x4fv; pfn_glInvalidateSubFramebuffer fp_glInvalidateSubFramebuffer; pfn_glMapBuffer fp_glMapBuffer; pfn_glSecondaryColor3d fp_glSecondaryColor3d; pfn_glTexCoord3i fp_glTexCoord3i; pfn_glMultiTexCoord4fv fp_glMultiTexCoord4fv; pfn_glRasterPos3i fp_glRasterPos3i; pfn_glSecondaryColor3b fp_glSecondaryColor3b; pfn_glRasterPos3d fp_glRasterPos3d; pfn_glRasterPos3f fp_glRasterPos3f; pfn_glCompressedTexImage3D fp_glCompressedTexImage3D; pfn_glTexCoord3f fp_glTexCoord3f; pfn_glDeleteSync fp_glDeleteSync; pfn_glTexCoord3d fp_glTexCoord3d; pfn_glGetTransformFeedbacki64_v fp_glGetTransformFeedbacki64_v; pfn_glUniformMatrix4dv fp_glUniformMatrix4dv; pfn_glTexImage2DMultisample fp_glTexImage2DMultisample; pfn_glGetVertexAttribiv fp_glGetVertexAttribiv; pfn_glUniformMatrix4x2dv fp_glUniformMatrix4x2dv; pfn_glMultiDrawElements fp_glMultiDrawElements; pfn_glVertexAttrib3fv fp_glVertexAttrib3fv; pfn_glTexCoord3s fp_glTexCoord3s; pfn_glUniform3iv fp_glUniform3iv; pfn_glRasterPos3s fp_glRasterPos3s; pfn_glPolygonMode fp_glPolygonMode; pfn_glDrawBuffers fp_glDrawBuffers; pfn_glGetnHistogram fp_glGetnHistogram; pfn_glGetActiveUniformBlockiv fp_glGetActiveUniformBlockiv; pfn_glAreTexturesResident fp_glAreTexturesResident; pfn_glProgramUniform2d fp_glProgramUniform2d; pfn_glProgramUniformMatrix4x3dv fp_glProgramUniformMatrix4x3dv; pfn_glIsList fp_glIsList; pfn_glProgramUniform4iv fp_glProgramUniform4iv; pfn_glRasterPos2sv fp_glRasterPos2sv; pfn_glRasterPos4sv fp_glRasterPos4sv; pfn_glColor4s fp_glColor4s; pfn_glGetProgramBinary fp_glGetProgramBinary; pfn_glUseProgram fp_glUseProgram; pfn_glLineStipple fp_glLineStipple; pfn_glMultiTexCoord1sv fp_glMultiTexCoord1sv; pfn_glGetProgramInfoLog fp_glGetProgramInfoLog; pfn_glClearTexImage fp_glClearTexImage; pfn_glGetBufferParameteriv fp_glGetBufferParameteriv; pfn_glMultiTexCoord2iv fp_glMultiTexCoord2iv; pfn_glUniformMatrix2x4fv fp_glUniformMatrix2x4fv; pfn_glBindVertexArray fp_glBindVertexArray; pfn_glColor4b fp_glColor4b; pfn_glSecondaryColor3f fp_glSecondaryColor3f; pfn_glColor4f fp_glColor4f; pfn_glColor4d fp_glColor4d; pfn_glColor4i fp_glColor4i; pfn_glSamplerParameterIiv fp_glSamplerParameterIiv; pfn_glMultiDrawElementsBaseVertex fp_glMultiDrawElementsBaseVertex; pfn_glVertexAttribLFormat fp_glVertexAttribLFormat; pfn_glRasterPos3iv fp_glRasterPos3iv; pfn_glTextureStorage2D fp_glTextureStorage2D; pfn_glGenerateTextureMipmap fp_glGenerateTextureMipmap; pfn_glVertex2dv fp_glVertex2dv; pfn_glTexCoord4sv fp_glTexCoord4sv; pfn_glUniform2uiv fp_glUniform2uiv; pfn_glCompressedTexSubImage1D fp_glCompressedTexSubImage1D; pfn_glFinish fp_glFinish; pfn_glDepthRangeIndexed fp_glDepthRangeIndexed; pfn_glGetBooleanv fp_glGetBooleanv; pfn_glDeleteShader fp_glDeleteShader; pfn_glDrawElements fp_glDrawElements; pfn_glGetInternalformati64v fp_glGetInternalformati64v; pfn_glRasterPos2s fp_glRasterPos2s; pfn_glCopyTextureSubImage1D fp_glCopyTextureSubImage1D; pfn_glGetMapdv fp_glGetMapdv; pfn_glVertexAttrib4Nsv fp_glVertexAttrib4Nsv; pfn_glMaterialfv fp_glMaterialfv; pfn_glTextureParameterIuiv fp_glTextureParameterIuiv; pfn_glViewport fp_glViewport; pfn_glUniform1uiv fp_glUniform1uiv; pfn_glTransformFeedbackVaryings fp_glTransformFeedbackVaryings; pfn_glIndexdv fp_glIndexdv; pfn_glCopyTexSubImage3D fp_glCopyTexSubImage3D; pfn_glTexCoord3iv fp_glTexCoord3iv; pfn_glDebugMessageCallback fp_glDebugMessageCallback; pfn_glVertexAttribI3i fp_glVertexAttribI3i; pfn_glInvalidateTexImage fp_glInvalidateTexImage; pfn_glVertexAttribFormat fp_glVertexAttribFormat; pfn_glClearDepth fp_glClearDepth; pfn_glVertexAttribI4usv fp_glVertexAttribI4usv; pfn_glTexParameterf fp_glTexParameterf; pfn_glVertexAttribBinding fp_glVertexAttribBinding; pfn_glTexParameteri fp_glTexParameteri; pfn_glGetActiveSubroutineUniformiv fp_glGetActiveSubroutineUniformiv; pfn_glGetShaderSource fp_glGetShaderSource; pfn_glCreateTransformFeedbacks fp_glCreateTransformFeedbacks; pfn_glGetnTexImage fp_glGetnTexImage; pfn_glTexBuffer fp_glTexBuffer; pfn_glPopName fp_glPopName; pfn_glValidateProgram fp_glValidateProgram; pfn_glPixelStoref fp_glPixelStoref; pfn_glUniform3uiv fp_glUniform3uiv; pfn_glViewportIndexedf fp_glViewportIndexedf; pfn_glRasterPos4fv fp_glRasterPos4fv; pfn_glEvalCoord1dv fp_glEvalCoord1dv; pfn_glMultiTexCoordP2uiv fp_glMultiTexCoordP2uiv; pfn_glGenProgramPipelines fp_glGenProgramPipelines; pfn_glRecti fp_glRecti; pfn_glColor4ub fp_glColor4ub; pfn_glMultTransposeMatrixf fp_glMultTransposeMatrixf; pfn_glRectf fp_glRectf; pfn_glRectd fp_glRectd; pfn_glNormal3sv fp_glNormal3sv; pfn_glNewList fp_glNewList; pfn_glProgramUniformMatrix2x3dv fp_glProgramUniformMatrix2x3dv; pfn_glColor4us fp_glColor4us; pfn_glVertexAttribP1uiv fp_glVertexAttribP1uiv; pfn_glLinkProgram fp_glLinkProgram; pfn_glHint fp_glHint; pfn_glRects fp_glRects; pfn_glTexCoord2dv fp_glTexCoord2dv; pfn_glRasterPos4iv fp_glRasterPos4iv; pfn_glGetObjectLabel fp_glGetObjectLabel; pfn_glProgramUniform2f fp_glProgramUniform2f; pfn_glGetString fp_glGetString; pfn_glVertexAttribP2uiv fp_glVertexAttribP2uiv; pfn_glEdgeFlagv fp_glEdgeFlagv; pfn_glDetachShader fp_glDetachShader; pfn_glProgramUniform3i fp_glProgramUniform3i; pfn_glScalef fp_glScalef; pfn_glEndQuery fp_glEndQuery; pfn_glScaled fp_glScaled; pfn_glEdgeFlagPointer fp_glEdgeFlagPointer; pfn_glFramebufferParameteri fp_glFramebufferParameteri; pfn_glGetProgramResourceName fp_glGetProgramResourceName; pfn_glUniformMatrix4x3dv fp_glUniformMatrix4x3dv; pfn_glDepthRangeArrayv fp_glDepthRangeArrayv; pfn_glCopyPixels fp_glCopyPixels; pfn_glVertexAttribI2ui fp_glVertexAttribI2ui; pfn_glGetProgramResourceLocation fp_glGetProgramResourceLocation; pfn_glPopAttrib fp_glPopAttrib; pfn_glDeleteTextures fp_glDeleteTextures; pfn_glGetActiveAtomicCounterBufferiv fp_glGetActiveAtomicCounterBufferiv; pfn_glStencilOpSeparate fp_glStencilOpSeparate; pfn_glGetTextureParameteriv fp_glGetTextureParameteriv; pfn_glDeleteQueries fp_glDeleteQueries; pfn_glNormalP3uiv fp_glNormalP3uiv; pfn_glVertexAttrib4f fp_glVertexAttrib4f; pfn_glVertexAttrib4d fp_glVertexAttrib4d; pfn_glViewportIndexedfv fp_glViewportIndexedfv; pfn_glInitNames fp_glInitNames; pfn_glGetBufferParameteri64v fp_glGetBufferParameteri64v; pfn_glColor3dv fp_glColor3dv; pfn_glVertexAttribI1i fp_glVertexAttribI1i; pfn_glGetTexParameteriv fp_glGetTexParameteriv; pfn_glWaitSync fp_glWaitSync; pfn_glCreateVertexArrays fp_glCreateVertexArrays; pfn_glProgramUniform1dv fp_glProgramUniform1dv; pfn_glVertexAttrib4s fp_glVertexAttrib4s; pfn_glColorMaterial fp_glColorMaterial; pfn_glSampleCoverage fp_glSampleCoverage; pfn_glSamplerParameteri fp_glSamplerParameteri; pfn_glClearBufferSubData fp_glClearBufferSubData; pfn_glSamplerParameterf fp_glSamplerParameterf; pfn_glTexStorage1D fp_glTexStorage1D; pfn_glUniform1f fp_glUniform1f; pfn_glGetVertexAttribfv fp_glGetVertexAttribfv; pfn_glUniform1d fp_glUniform1d; pfn_glRenderMode fp_glRenderMode; pfn_glGetCompressedTexImage fp_glGetCompressedTexImage; pfn_glGetnCompressedTexImage fp_glGetnCompressedTexImage; pfn_glWindowPos2dv fp_glWindowPos2dv; pfn_glUniform1i fp_glUniform1i; pfn_glGetActiveAttrib fp_glGetActiveAttrib; pfn_glUniform3i fp_glUniform3i; pfn_glPixelTransferi fp_glPixelTransferi; pfn_glTexSubImage2D fp_glTexSubImage2D; pfn_glDisable fp_glDisable; pfn_glLogicOp fp_glLogicOp; pfn_glEvalPoint2 fp_glEvalPoint2; pfn_glPixelTransferf fp_glPixelTransferf; pfn_glSecondaryColor3i fp_glSecondaryColor3i; pfn_glProgramUniform4uiv fp_glProgramUniform4uiv; pfn_glUniform4ui fp_glUniform4ui; pfn_glColor3f fp_glColor3f; pfn_glNamedFramebufferReadBuffer fp_glNamedFramebufferReadBuffer; pfn_glBindFramebuffer fp_glBindFramebuffer; pfn_glGetTexEnvfv fp_glGetTexEnvfv; pfn_glRectfv fp_glRectfv; pfn_glCullFace fp_glCullFace; pfn_glGetLightfv fp_glGetLightfv; pfn_glGetnUniformiv fp_glGetnUniformiv; pfn_glColor3d fp_glColor3d; pfn_glProgramUniform4i fp_glProgramUniform4i; pfn_glTexGend fp_glTexGend; pfn_glProgramUniform4f fp_glProgramUniform4f; pfn_glTexGeni fp_glTexGeni; pfn_glProgramUniform4d fp_glProgramUniform4d; pfn_glTextureParameterIiv fp_glTextureParameterIiv; pfn_glMultiTexCoord3s fp_glMultiTexCoord3s; pfn_glGetStringi fp_glGetStringi; pfn_glGetTextureParameterfv fp_glGetTextureParameterfv; pfn_glTextureSubImage2D fp_glTextureSubImage2D; pfn_glMultiTexCoord3i fp_glMultiTexCoord3i; pfn_glMultiTexCoord3f fp_glMultiTexCoord3f; pfn_glDrawTransformFeedbackStream fp_glDrawTransformFeedbackStream; pfn_glMultiTexCoord3d fp_glMultiTexCoord3d; pfn_glAttachShader fp_glAttachShader; pfn_glFogCoorddv fp_glFogCoorddv; pfn_glUniformMatrix2x3fv fp_glUniformMatrix2x3fv; pfn_glGetTexGenfv fp_glGetTexGenfv; pfn_glQueryCounter fp_glQueryCounter; pfn_glFogCoordPointer fp_glFogCoordPointer; pfn_glProgramUniformMatrix3dv fp_glProgramUniformMatrix3dv; pfn_glProvokingVertex fp_glProvokingVertex; pfn_glShaderBinary fp_glShaderBinary; pfn_glUnmapNamedBuffer fp_glUnmapNamedBuffer; pfn_glGetnColorTable fp_glGetnColorTable; pfn_glFramebufferTexture3D fp_glFramebufferTexture3D; pfn_glTexGeniv fp_glTexGeniv; pfn_glRasterPos2dv fp_glRasterPos2dv; pfn_glSecondaryColor3dv fp_glSecondaryColor3dv; pfn_glClientActiveTexture fp_glClientActiveTexture; pfn_glNamedRenderbufferStorageMultisample fp_glNamedRenderbufferStorageMultisample; pfn_glVertexAttribI4sv fp_glVertexAttribI4sv; pfn_glClearNamedBufferData fp_glClearNamedBufferData; pfn_glSecondaryColor3us fp_glSecondaryColor3us; pfn_glNormalP3ui fp_glNormalP3ui; pfn_glTexEnvfv fp_glTexEnvfv; pfn_glReadBuffer fp_glReadBuffer; pfn_glViewportArrayv fp_glViewportArrayv; pfn_glTexParameterIuiv fp_glTexParameterIuiv; pfn_glDrawArraysInstanced fp_glDrawArraysInstanced; pfn_glGenerateMipmap fp_glGenerateMipmap; pfn_glCompressedTextureSubImage2D fp_glCompressedTextureSubImage2D; pfn_glProgramUniformMatrix2fv fp_glProgramUniformMatrix2fv; pfn_glWindowPos3fv fp_glWindowPos3fv; pfn_glUniformMatrix3x4dv fp_glUniformMatrix3x4dv; pfn_glLightModelfv fp_glLightModelfv; pfn_glSamplerParameteriv fp_glSamplerParameteriv; pfn_glDeleteLists fp_glDeleteLists; pfn_glGetClipPlane fp_glGetClipPlane; pfn_glVertex4dv fp_glVertex4dv; pfn_glTexCoord2d fp_glTexCoord2d; pfn_glPopMatrix fp_glPopMatrix; pfn_glTexCoord2f fp_glTexCoord2f; pfn_glColor4iv fp_glColor4iv; pfn_glIndexubv fp_glIndexubv; pfn_glCheckNamedFramebufferStatus fp_glCheckNamedFramebufferStatus; pfn_glUnmapBuffer fp_glUnmapBuffer; pfn_glTexCoord2i fp_glTexCoord2i; pfn_glRasterPos4d fp_glRasterPos4d; pfn_glRasterPos4f fp_glRasterPos4f; pfn_glProgramUniform1iv fp_glProgramUniform1iv; pfn_glGetVertexArrayiv fp_glGetVertexArrayiv; pfn_glCopyTextureSubImage2D fp_glCopyTextureSubImage2D; pfn_glVertexAttrib3s fp_glVertexAttrib3s; pfn_glTexCoord2s fp_glTexCoord2s; pfn_glBindRenderbuffer fp_glBindRenderbuffer; pfn_glVertex3fv fp_glVertex3fv; pfn_glTexCoord4dv fp_glTexCoord4dv; pfn_glMaterialiv fp_glMaterialiv; pfn_glVertexAttribP4uiv fp_glVertexAttribP4uiv; pfn_glGetProgramStageiv fp_glGetProgramStageiv; pfn_glIsProgram fp_glIsProgram; pfn_glVertexAttrib4bv fp_glVertexAttrib4bv; pfn_glVertex4s fp_glVertex4s; pfn_glUniformMatrix3x2dv fp_glUniformMatrix3x2dv; pfn_glVertexAttrib4fv fp_glVertexAttrib4fv; pfn_glNormal3dv fp_glNormal3dv; pfn_glIsTransformFeedback fp_glIsTransformFeedback; pfn_glUniform4i fp_glUniform4i; pfn_glActiveTexture fp_glActiveTexture; pfn_glEnableVertexAttribArray fp_glEnableVertexAttribArray; pfn_glRotated fp_glRotated; pfn_glIsProgramPipeline fp_glIsProgramPipeline; pfn_glRotatef fp_glRotatef; pfn_glVertex4i fp_glVertex4i; pfn_glReadPixels fp_glReadPixels; pfn_glVertexAttribI3iv fp_glVertexAttribI3iv; pfn_glLoadName fp_glLoadName; pfn_glUniform4f fp_glUniform4f; pfn_glRenderbufferStorageMultisample fp_glRenderbufferStorageMultisample; pfn_glCreateProgramPipelines fp_glCreateProgramPipelines; pfn_glGenVertexArrays fp_glGenVertexArrays; pfn_glShadeModel fp_glShadeModel; pfn_glMapGrid1d fp_glMapGrid1d; pfn_glGetUniformfv fp_glGetUniformfv; pfn_glMapGrid1f fp_glMapGrid1f; pfn_glSamplerParameterfv fp_glSamplerParameterfv; pfn_glVertexAttribLPointer fp_glVertexAttribLPointer; pfn_glDisableClientState fp_glDisableClientState; pfn_glMultiTexCoord3sv fp_glMultiTexCoord3sv; pfn_glGetnUniformfv fp_glGetnUniformfv; pfn_glDrawElementsInstancedBaseVertex fp_glDrawElementsInstancedBaseVertex; pfn_glVertexAttribL2dv fp_glVertexAttribL2dv; pfn_glMultiDrawElementsIndirect fp_glMultiDrawElementsIndirect; pfn_glEnableVertexArrayAttrib fp_glEnableVertexArrayAttrib; pfn_glSecondaryColorPointer fp_glSecondaryColorPointer; pfn_glAlphaFunc fp_glAlphaFunc; pfn_glUniform1iv fp_glUniform1iv; pfn_glCreateShaderProgramv fp_glCreateShaderProgramv; pfn_glGetActiveSubroutineName fp_glGetActiveSubroutineName; pfn_glMultiTexCoord4iv fp_glMultiTexCoord4iv; pfn_glVertexAttribL2d fp_glVertexAttribL2d; pfn_glGetQueryObjectiv fp_glGetQueryObjectiv; pfn_glStencilFunc fp_glStencilFunc; pfn_glInvalidateNamedFramebufferData fp_glInvalidateNamedFramebufferData; pfn_glMultiTexCoord1fv fp_glMultiTexCoord1fv; pfn_glUniformBlockBinding fp_glUniformBlockBinding; pfn_glColor4uiv fp_glColor4uiv; pfn_glRectiv fp_glRectiv; pfn_glColorP4ui fp_glColorP4ui; pfn_glUseProgramStages fp_glUseProgramStages; pfn_glRasterPos3dv fp_glRasterPos3dv; pfn_glEvalMesh2 fp_glEvalMesh2; pfn_glEvalMesh1 fp_glEvalMesh1; pfn_glTexCoordPointer fp_glTexCoordPointer; pfn_glProgramUniform3f fp_glProgramUniform3f; pfn_glProgramUniform3d fp_glProgramUniform3d; pfn_glVertexAttrib4Nubv fp_glVertexAttrib4Nubv; pfn_glVertexAttribI4iv fp_glVertexAttribI4iv; pfn_glGetProgramPipelineiv fp_glGetProgramPipelineiv; pfn_glTexStorage3D fp_glTexStorage3D; pfn_glEvalCoord2fv fp_glEvalCoord2fv; pfn_glNamedFramebufferDrawBuffer fp_glNamedFramebufferDrawBuffer; pfn_glGetQueryIndexediv fp_glGetQueryIndexediv; pfn_glColor4ubv fp_glColor4ubv; pfn_glLoadTransposeMatrixd fp_glLoadTransposeMatrixd; pfn_glLoadTransposeMatrixf fp_glLoadTransposeMatrixf; pfn_glTextureParameteriv fp_glTextureParameteriv; pfn_glObjectLabel fp_glObjectLabel; pfn_glVertexAttribI4i fp_glVertexAttribI4i; pfn_glRasterPos2iv fp_glRasterPos2iv; pfn_glGetBufferSubData fp_glGetBufferSubData; pfn_glGetVertexAttribLdv fp_glGetVertexAttribLdv; pfn_glGetnUniformuiv fp_glGetnUniformuiv; pfn_glGetQueryBufferObjectiv fp_glGetQueryBufferObjectiv; pfn_glTexEnviv fp_glTexEnviv; pfn_glBlendEquationSeparate fp_glBlendEquationSeparate; pfn_glVertexAttribI1ui fp_glVertexAttribI1ui; pfn_glGenBuffers fp_glGenBuffers; pfn_glSelectBuffer fp_glSelectBuffer; pfn_glGetSubroutineIndex fp_glGetSubroutineIndex; pfn_glVertexAttrib2sv fp_glVertexAttrib2sv; pfn_glScissorIndexedv fp_glScissorIndexedv; pfn_glPushAttrib fp_glPushAttrib; pfn_glVertexAttribIPointer fp_glVertexAttribIPointer; pfn_glBlendFunc fp_glBlendFunc; pfn_glCreateProgram fp_glCreateProgram; pfn_glNamedBufferSubData fp_glNamedBufferSubData; pfn_glTexImage3D fp_glTexImage3D; pfn_glIsFramebuffer fp_glIsFramebuffer; pfn_glClearNamedFramebufferfv fp_glClearNamedFramebufferfv; pfn_glLightiv fp_glLightiv; pfn_glGetNamedBufferSubData fp_glGetNamedBufferSubData; pfn_glCompressedTextureSubImage3D fp_glCompressedTextureSubImage3D; pfn_glPrimitiveRestartIndex fp_glPrimitiveRestartIndex; pfn_glFlushMappedNamedBufferRange fp_glFlushMappedNamedBufferRange; pfn_glInvalidateTexSubImage fp_glInvalidateTexSubImage; pfn_glTexGenfv fp_glTexGenfv; pfn_glGetTextureParameterIuiv fp_glGetTextureParameterIuiv; pfn_glGetnConvolutionFilter fp_glGetnConvolutionFilter; pfn_glBindImageTextures fp_glBindImageTextures; pfn_glEnd fp_glEnd; pfn_glDeleteBuffers fp_glDeleteBuffers; pfn_glBindProgramPipeline fp_glBindProgramPipeline; pfn_glScissor fp_glScissor; pfn_glTexCoordP4uiv fp_glTexCoordP4uiv; pfn_glClipPlane fp_glClipPlane; pfn_glPushName fp_glPushName; pfn_glTexGendv fp_glTexGendv; pfn_glIndexub fp_glIndexub; pfn_glGetNamedFramebufferAttachmentParameteriv fp_glGetNamedFramebufferAttachmentParameteriv; pfn_glNamedFramebufferRenderbuffer fp_glNamedFramebufferRenderbuffer; pfn_glVertexP2uiv fp_glVertexP2uiv; pfn_glSecondaryColor3iv fp_glSecondaryColor3iv; pfn_glRasterPos4i fp_glRasterPos4i; pfn_glMultTransposeMatrixd fp_glMultTransposeMatrixd; pfn_glClearColor fp_glClearColor; pfn_glVertexAttrib4uiv fp_glVertexAttrib4uiv; pfn_glNormal3s fp_glNormal3s; pfn_glVertexAttrib4Niv fp_glVertexAttrib4Niv; pfn_glProgramUniformMatrix2x3fv fp_glProgramUniformMatrix2x3fv; pfn_glClearBufferiv fp_glClearBufferiv; pfn_glPointParameteri fp_glPointParameteri; pfn_glProgramUniform4dv fp_glProgramUniform4dv; pfn_glColorP4uiv fp_glColorP4uiv; pfn_glBlendColor fp_glBlendColor; pfn_glGetnPixelMapuiv fp_glGetnPixelMapuiv; pfn_glGetTextureLevelParameteriv fp_glGetTextureLevelParameteriv; pfn_glWindowPos3d fp_glWindowPos3d; pfn_glProgramUniform3fv fp_glProgramUniform3fv; pfn_glVertexAttribI2uiv fp_glVertexAttribI2uiv; pfn_glGetNamedFramebufferParameteriv fp_glGetNamedFramebufferParameteriv; pfn_glSamplerParameterIuiv fp_glSamplerParameterIuiv; pfn_glUniform3ui fp_glUniform3ui; pfn_glProgramUniform3uiv fp_glProgramUniform3uiv; pfn_glColor4dv fp_glColor4dv; pfn_glVertexAttribI4uiv fp_glVertexAttribI4uiv; pfn_glPointParameterfv fp_glPointParameterfv; pfn_glResumeTransformFeedback fp_glResumeTransformFeedback; pfn_glUniform2fv fp_glUniform2fv; pfn_glGetActiveSubroutineUniformName fp_glGetActiveSubroutineUniformName; pfn_glGetProgramResourceIndex fp_glGetProgramResourceIndex; pfn_glSecondaryColor3ub fp_glSecondaryColor3ub; pfn_glDrawElementsIndirect fp_glDrawElementsIndirect; pfn_glGetTextureLevelParameterfv fp_glGetTextureLevelParameterfv; pfn_glSecondaryColor3ui fp_glSecondaryColor3ui; pfn_glTexCoord3dv fp_glTexCoord3dv; pfn_glGetNamedBufferPointerv fp_glGetNamedBufferPointerv; pfn_glDispatchComputeIndirect fp_glDispatchComputeIndirect; pfn_glInvalidateNamedFramebufferSubData fp_glInvalidateNamedFramebufferSubData; pfn_glGetSamplerParameterIuiv fp_glGetSamplerParameterIuiv; pfn_glBindBufferRange fp_glBindBufferRange; pfn_glNormal3iv fp_glNormal3iv; pfn_glTextureSubImage1D fp_glTextureSubImage1D; pfn_glVertexAttribL3dv fp_glVertexAttribL3dv; pfn_glGetUniformdv fp_glGetUniformdv; pfn_glWindowPos3s fp_glWindowPos3s; pfn_glPointParameterf fp_glPointParameterf; pfn_glClearDepthf fp_glClearDepthf; pfn_glGetVertexAttribIuiv fp_glGetVertexAttribIuiv; pfn_glWindowPos3i fp_glWindowPos3i; pfn_glMultiTexCoord4s fp_glMultiTexCoord4s; pfn_glGetTextureSubImage fp_glGetTextureSubImage; pfn_glWindowPos3f fp_glWindowPos3f; pfn_glGenTransformFeedbacks fp_glGenTransformFeedbacks; pfn_glColor3us fp_glColor3us; pfn_glColor3uiv fp_glColor3uiv; pfn_glVertexAttrib4Nusv fp_glVertexAttrib4Nusv; pfn_glGetLightiv fp_glGetLightiv; pfn_glDepthFunc fp_glDepthFunc; pfn_glCompressedTexSubImage2D fp_glCompressedTexSubImage2D; pfn_glListBase fp_glListBase; pfn_glMultiTexCoord4f fp_glMultiTexCoord4f; pfn_glColor3ub fp_glColor3ub; pfn_glMultiTexCoord4d fp_glMultiTexCoord4d; pfn_glVertexAttribI4bv fp_glVertexAttribI4bv; pfn_glBlendEquationSeparatei fp_glBlendEquationSeparatei; pfn_glGetTexParameterfv fp_glGetTexParameterfv; pfn_glColor3ui fp_glColor3ui; pfn_glGetProgramResourceLocationIndex fp_glGetProgramResourceLocationIndex; pfn_glMultiTexCoord4i fp_glMultiTexCoord4i; pfn_glBufferStorage fp_glBufferStorage; pfn_glGetPolygonStipple fp_glGetPolygonStipple; pfn_glClientWaitSync fp_glClientWaitSync; pfn_glVertexAttribI4ui fp_glVertexAttribI4ui; pfn_glGetFloati_v fp_glGetFloati_v; pfn_glMultiTexCoord4dv fp_glMultiTexCoord4dv; pfn_glColorMask fp_glColorMask; pfn_glTextureBuffer fp_glTextureBuffer; pfn_glTexParameterIiv fp_glTexParameterIiv; pfn_glBlendEquation fp_glBlendEquation; pfn_glGetUniformLocation fp_glGetUniformLocation; pfn_glGetSamplerParameteriv fp_glGetSamplerParameteriv; pfn_glVertexArrayAttribFormat fp_glVertexArrayAttribFormat; pfn_glReadnPixels fp_glReadnPixels; pfn_glRasterPos4s fp_glRasterPos4s; pfn_glEndTransformFeedback fp_glEndTransformFeedback; pfn_glVertexAttrib4usv fp_glVertexAttrib4usv; pfn_glGetUniformSubroutineuiv fp_glGetUniformSubroutineuiv; pfn_glMultiTexCoord3dv fp_glMultiTexCoord3dv; pfn_glBindVertexBuffer fp_glBindVertexBuffer; pfn_glColor4sv fp_glColor4sv; pfn_glDebugMessageInsert fp_glDebugMessageInsert; pfn_glCreateSamplers fp_glCreateSamplers; pfn_glPopClientAttrib fp_glPopClientAttrib; pfn_glClearBufferData fp_glClearBufferData; pfn_glBeginTransformFeedback fp_glBeginTransformFeedback; pfn_glFogf fp_glFogf; pfn_glVertexAttribI1iv fp_glVertexAttribI1iv; pfn_glProgramBinary fp_glProgramBinary; pfn_glIsSampler fp_glIsSampler; pfn_glVertexP3ui fp_glVertexP3ui; pfn_glVertexAttribDivisor fp_glVertexAttribDivisor; pfn_glBindSamplers fp_glBindSamplers; pfn_glColor3iv fp_glColor3iv; pfn_glCompressedTexImage1D fp_glCompressedTexImage1D; pfn_glDeleteTransformFeedbacks fp_glDeleteTransformFeedbacks; pfn_glCopyTexSubImage1D fp_glCopyTexSubImage1D; pfn_glTexCoord1i fp_glTexCoord1i; pfn_glCheckFramebufferStatus fp_glCheckFramebufferStatus; pfn_glTexCoord1d fp_glTexCoord1d; pfn_glTexCoord1f fp_glTexCoord1f; pfn_glTextureStorage3D fp_glTextureStorage3D; pfn_glEndConditionalRender fp_glEndConditionalRender; pfn_glEnableClientState fp_glEnableClientState; pfn_glBindAttribLocation fp_glBindAttribLocation; pfn_glUniformMatrix4x2fv fp_glUniformMatrix4x2fv; pfn_glUniformMatrix2dv fp_glUniformMatrix2dv; pfn_glBlendFunci fp_glBlendFunci; pfn_glMultiTexCoord2sv fp_glMultiTexCoord2sv; pfn_glVertexAttrib1dv fp_glVertexAttrib1dv; pfn_glDrawRangeElements fp_glDrawRangeElements; pfn_glTexCoord1s fp_glTexCoord1s; pfn_glBindBufferBase fp_glBindBufferBase; pfn_glBufferSubData fp_glBufferSubData; pfn_glVertexAttrib4iv fp_glVertexAttrib4iv; pfn_glGenLists fp_glGenLists; pfn_glColor3bv fp_glColor3bv; pfn_glMapBufferRange fp_glMapBufferRange; pfn_glFramebufferTexture fp_glFramebufferTexture; pfn_glBlendFuncSeparatei fp_glBlendFuncSeparatei; pfn_glProgramUniformMatrix4x2fv fp_glProgramUniformMatrix4x2fv; pfn_glVertexAttribL1d fp_glVertexAttribL1d; pfn_glGetTexGendv fp_glGetTexGendv; pfn_glClearNamedFramebufferiv fp_glClearNamedFramebufferiv; pfn_glMultiDrawArrays fp_glMultiDrawArrays; pfn_glEndList fp_glEndList; pfn_glScissorIndexed fp_glScissorIndexed; pfn_glVertexP4uiv fp_glVertexP4uiv; pfn_glUniform2ui fp_glUniform2ui; pfn_glVertexAttribI2iv fp_glVertexAttribI2iv; pfn_glGetnMapdv fp_glGetnMapdv; pfn_glColor3usv fp_glColor3usv; pfn_glWindowPos2fv fp_glWindowPos2fv; pfn_glTextureView fp_glTextureView; pfn_glDisablei fp_glDisablei; pfn_glProgramUniformMatrix2x4fv fp_glProgramUniformMatrix2x4fv; pfn_glCreateRenderbuffers fp_glCreateRenderbuffers; pfn_glIndexMask fp_glIndexMask; pfn_glPushClientAttrib fp_glPushClientAttrib; pfn_glShaderSource fp_glShaderSource; pfn_glGetnSeparableFilter fp_glGetnSeparableFilter; pfn_glGetActiveUniformBlockName fp_glGetActiveUniformBlockName; pfn_glVertexAttribI3uiv fp_glVertexAttribI3uiv; pfn_glReleaseShaderCompiler fp_glReleaseShaderCompiler; pfn_glVertexAttribIFormat fp_glVertexAttribIFormat; pfn_glCreateFramebuffers fp_glCreateFramebuffers; pfn_glClearAccum fp_glClearAccum; pfn_glGetSynciv fp_glGetSynciv; pfn_glProgramUniform2uiv fp_glProgramUniform2uiv; pfn_glGetnPixelMapfv fp_glGetnPixelMapfv; pfn_glTexCoordP2uiv fp_glTexCoordP2uiv; pfn_glPatchParameteri fp_glPatchParameteri; pfn_glProgramUniform2i fp_glProgramUniform2i; pfn_glUniform2f fp_glUniform2f; pfn_glGetNamedBufferParameteri64v fp_glGetNamedBufferParameteri64v; pfn_glBeginQuery fp_glBeginQuery; pfn_glGetUniformBlockIndex fp_glGetUniformBlockIndex; pfn_glBindBuffer fp_glBindBuffer; pfn_glMap2d fp_glMap2d; pfn_glMap2f fp_glMap2f; pfn_glTexStorage2DMultisample fp_glTexStorage2DMultisample; pfn_glUniform2d fp_glUniform2d; pfn_glVertex4d fp_glVertex4d; pfn_glUniformMatrix2fv fp_glUniformMatrix2fv; pfn_glTexCoord1sv fp_glTexCoord1sv; pfn_glBufferData fp_glBufferData; pfn_glEvalPoint1 fp_glEvalPoint1; pfn_glGetTexParameterIiv fp_glGetTexParameterIiv; pfn_glGetQueryBufferObjectui64v fp_glGetQueryBufferObjectui64v; pfn_glTexCoord1dv fp_glTexCoord1dv; pfn_glTexCoordP1ui fp_glTexCoordP1ui; pfn_glGetError fp_glGetError; pfn_glGetTexEnviv fp_glGetTexEnviv; pfn_glGetProgramiv fp_glGetProgramiv; pfn_glVertexAttribP2ui fp_glVertexAttribP2ui; pfn_glGetFloatv fp_glGetFloatv; pfn_glTexSubImage1D fp_glTexSubImage1D; pfn_glMultiTexCoord2fv fp_glMultiTexCoord2fv; pfn_glUniformMatrix2x4dv fp_glUniformMatrix2x4dv; pfn_glVertexAttrib2fv fp_glVertexAttrib2fv; pfn_glEvalCoord1d fp_glEvalCoord1d; pfn_glGetTexLevelParameterfv fp_glGetTexLevelParameterfv; pfn_glEvalCoord1f fp_glEvalCoord1f; pfn_glPixelMapfv fp_glPixelMapfv; pfn_glVertexAttribP3uiv fp_glVertexAttribP3uiv; pfn_glGetPixelMapusv fp_glGetPixelMapusv; pfn_glSecondaryColorP3uiv fp_glSecondaryColorP3uiv; pfn_glGetIntegerv fp_glGetIntegerv; pfn_glAccum fp_glAccum; pfn_glGetVertexArrayIndexed64iv fp_glGetVertexArrayIndexed64iv; pfn_glGetBufferPointerv fp_glGetBufferPointerv; pfn_glGetVertexAttribIiv fp_glGetVertexAttribIiv; pfn_glRasterPos4dv fp_glRasterPos4dv; pfn_glProgramUniform4fv fp_glProgramUniform4fv; pfn_glTexCoord2iv fp_glTexCoord2iv; pfn_glTextureBarrier fp_glTextureBarrier; pfn_glIsQuery fp_glIsQuery; pfn_glBlendBarrier fp_glBlendBarrier; pfn_glProgramUniform2ui fp_glProgramUniform2ui; pfn_glProgramUniform4ui fp_glProgramUniform4ui; pfn_glVertexAttrib4sv fp_glVertexAttrib4sv; pfn_glWindowPos3dv fp_glWindowPos3dv; pfn_glTexImage2D fp_glTexImage2D; pfn_glStencilMask fp_glStencilMask; pfn_glDrawPixels fp_glDrawPixels; pfn_glMultMatrixd fp_glMultMatrixd; pfn_glMultMatrixf fp_glMultMatrixf; pfn_glIsTexture fp_glIsTexture; pfn_glGetMaterialiv fp_glGetMaterialiv; pfn_glNamedBufferData fp_glNamedBufferData; pfn_glUniform1fv fp_glUniform1fv; pfn_glLoadMatrixf fp_glLoadMatrixf; pfn_glTexStorage2D fp_glTexStorage2D; pfn_glLoadMatrixd fp_glLoadMatrixd; pfn_glClearNamedBufferSubData fp_glClearNamedBufferSubData; pfn_glMapNamedBufferRange fp_glMapNamedBufferRange; pfn_glNamedFramebufferTextureLayer fp_glNamedFramebufferTextureLayer; pfn_glTexParameterfv fp_glTexParameterfv; pfn_glUniformMatrix3fv fp_glUniformMatrix3fv; pfn_glVertex4f fp_glVertex4f; pfn_glRectsv fp_glRectsv; pfn_glColor4usv fp_glColor4usv; pfn_glUniform3dv fp_glUniform3dv; pfn_glProgramUniformMatrix4x3fv fp_glProgramUniformMatrix4x3fv; pfn_glPolygonStipple fp_glPolygonStipple; pfn_glBindBuffersBase fp_glBindBuffersBase; pfn_glInterleavedArrays fp_glInterleavedArrays; pfn_glGetSubroutineUniformLocation fp_glGetSubroutineUniformLocation; pfn_glNormal3i fp_glNormal3i; pfn_glNormal3f fp_glNormal3f; pfn_glNormal3d fp_glNormal3d; pfn_glNormal3b fp_glNormal3b; pfn_glGetFramebufferParameteriv fp_glGetFramebufferParameteriv; pfn_glPixelMapusv fp_glPixelMapusv; pfn_glGetTexGeniv fp_glGetTexGeniv; pfn_glArrayElement fp_glArrayElement; pfn_glGetCompressedTextureSubImage fp_glGetCompressedTextureSubImage; pfn_glCopyBufferSubData fp_glCopyBufferSubData; pfn_glVertexAttribI1uiv fp_glVertexAttribI1uiv; pfn_glVertexAttrib2d fp_glVertexAttrib2d; pfn_glBindTransformFeedback fp_glBindTransformFeedback; pfn_glVertexAttrib2f fp_glVertexAttrib2f; pfn_glVertexAttrib3dv fp_glVertexAttrib3dv; pfn_glGetQueryObjectui64v fp_glGetQueryObjectui64v; pfn_glDepthMask fp_glDepthMask; pfn_glVertexAttrib2s fp_glVertexAttrib2s; pfn_glColor3fv fp_glColor3fv; pfn_glTexImage3DMultisample fp_glTexImage3DMultisample; pfn_glProgramUniform1fv fp_glProgramUniform1fv; pfn_glUniformMatrix4fv fp_glUniformMatrix4fv; pfn_glUniform4fv fp_glUniform4fv; pfn_glGetActiveUniform fp_glGetActiveUniform; pfn_glColorPointer fp_glColorPointer; pfn_glFrontFace fp_glFrontFace; pfn_glTexBufferRange fp_glTexBufferRange; pfn_glCreateBuffers fp_glCreateBuffers; pfn_glNamedFramebufferParameteri fp_glNamedFramebufferParameteri; pfn_glDrawArraysInstancedBaseInstance fp_glDrawArraysInstancedBaseInstance; pfn_glGetBooleani_v fp_glGetBooleani_v; pfn_glVertexAttribL3d fp_glVertexAttribL3d; pfn_glDeleteProgramPipelines fp_glDeleteProgramPipelines; pfn_glClearBufferuiv fp_glClearBufferuiv; pfn_glClipControl fp_glClipControl; pfn_glGetProgramResourceiv fp_glGetProgramResourceiv; pfn_glBlendBarrierKHR fp_glBlendBarrierKHR; pfn_glDebugMessageControlKHR fp_glDebugMessageControlKHR; pfn_glDebugMessageInsertKHR fp_glDebugMessageInsertKHR; pfn_glDebugMessageCallbackKHR fp_glDebugMessageCallbackKHR; pfn_glGetDebugMessageLogKHR fp_glGetDebugMessageLogKHR; pfn_glPushDebugGroupKHR fp_glPushDebugGroupKHR; pfn_glPopDebugGroupKHR fp_glPopDebugGroupKHR; pfn_glObjectLabelKHR fp_glObjectLabelKHR; pfn_glGetObjectLabelKHR fp_glGetObjectLabelKHR; pfn_glObjectPtrLabelKHR fp_glObjectPtrLabelKHR; pfn_glGetObjectPtrLabelKHR fp_glGetObjectPtrLabelKHR; pfn_glGetPointervKHR fp_glGetPointervKHR; pfn_glGetGraphicsResetStatusKHR fp_glGetGraphicsResetStatusKHR; pfn_glReadnPixelsKHR fp_glReadnPixelsKHR; pfn_glGetnUniformfvKHR fp_glGetnUniformfvKHR; pfn_glGetnUniformivKHR fp_glGetnUniformivKHR; pfn_glGetnUniformuivKHR fp_glGetnUniformuivKHR; pfn_glGetTextureHandleARB fp_glGetTextureHandleARB; pfn_glGetTextureSamplerHandleARB fp_glGetTextureSamplerHandleARB; pfn_glMakeTextureHandleResidentARB fp_glMakeTextureHandleResidentARB; pfn_glMakeTextureHandleNonResidentARB fp_glMakeTextureHandleNonResidentARB; pfn_glGetImageHandleARB fp_glGetImageHandleARB; pfn_glMakeImageHandleResidentARB fp_glMakeImageHandleResidentARB; pfn_glMakeImageHandleNonResidentARB fp_glMakeImageHandleNonResidentARB; pfn_glUniformHandleui64ARB fp_glUniformHandleui64ARB; pfn_glUniformHandleui64vARB fp_glUniformHandleui64vARB; pfn_glProgramUniformHandleui64ARB fp_glProgramUniformHandleui64ARB; pfn_glProgramUniformHandleui64vARB fp_glProgramUniformHandleui64vARB; pfn_glIsTextureHandleResidentARB fp_glIsTextureHandleResidentARB; pfn_glIsImageHandleResidentARB fp_glIsImageHandleResidentARB; pfn_glVertexAttribL1ui64ARB fp_glVertexAttribL1ui64ARB; pfn_glVertexAttribL1ui64vARB fp_glVertexAttribL1ui64vARB; pfn_glGetVertexAttribLui64vARB fp_glGetVertexAttribLui64vARB; pfn_glCreateSyncFromCLeventARB fp_glCreateSyncFromCLeventARB; pfn_glClampColorARB fp_glClampColorARB; pfn_glDispatchComputeGroupSizeARB fp_glDispatchComputeGroupSizeARB; pfn_glDebugMessageControlARB fp_glDebugMessageControlARB; pfn_glDebugMessageInsertARB fp_glDebugMessageInsertARB; pfn_glDebugMessageCallbackARB fp_glDebugMessageCallbackARB; pfn_glGetDebugMessageLogARB fp_glGetDebugMessageLogARB; pfn_glBlendEquationiARB fp_glBlendEquationiARB; pfn_glBlendEquationSeparateiARB fp_glBlendEquationSeparateiARB; pfn_glBlendFunciARB fp_glBlendFunciARB; pfn_glBlendFuncSeparateiARB fp_glBlendFuncSeparateiARB; pfn_glDrawArraysInstancedARB fp_glDrawArraysInstancedARB; pfn_glDrawElementsInstancedARB fp_glDrawElementsInstancedARB; pfn_glPrimitiveBoundingBoxARB fp_glPrimitiveBoundingBoxARB; pfn_glProgramParameteriARB fp_glProgramParameteriARB; pfn_glFramebufferTextureARB fp_glFramebufferTextureARB; pfn_glFramebufferTextureLayerARB fp_glFramebufferTextureLayerARB; pfn_glFramebufferTextureFaceARB fp_glFramebufferTextureFaceARB; pfn_glUniform1i64ARB fp_glUniform1i64ARB; pfn_glUniform2i64ARB fp_glUniform2i64ARB; pfn_glUniform3i64ARB fp_glUniform3i64ARB; pfn_glUniform4i64ARB fp_glUniform4i64ARB; pfn_glUniform1i64vARB fp_glUniform1i64vARB; pfn_glUniform2i64vARB fp_glUniform2i64vARB; pfn_glUniform3i64vARB fp_glUniform3i64vARB; pfn_glUniform4i64vARB fp_glUniform4i64vARB; pfn_glUniform1ui64ARB fp_glUniform1ui64ARB; pfn_glUniform2ui64ARB fp_glUniform2ui64ARB; pfn_glUniform3ui64ARB fp_glUniform3ui64ARB; pfn_glUniform4ui64ARB fp_glUniform4ui64ARB; pfn_glUniform1ui64vARB fp_glUniform1ui64vARB; pfn_glUniform2ui64vARB fp_glUniform2ui64vARB; pfn_glUniform3ui64vARB fp_glUniform3ui64vARB; pfn_glUniform4ui64vARB fp_glUniform4ui64vARB; pfn_glGetUniformi64vARB fp_glGetUniformi64vARB; pfn_glGetUniformui64vARB fp_glGetUniformui64vARB; pfn_glGetnUniformi64vARB fp_glGetnUniformi64vARB; pfn_glGetnUniformui64vARB fp_glGetnUniformui64vARB; pfn_glProgramUniform1i64ARB fp_glProgramUniform1i64ARB; pfn_glProgramUniform2i64ARB fp_glProgramUniform2i64ARB; pfn_glProgramUniform3i64ARB fp_glProgramUniform3i64ARB; pfn_glProgramUniform4i64ARB fp_glProgramUniform4i64ARB; pfn_glProgramUniform1i64vARB fp_glProgramUniform1i64vARB; pfn_glProgramUniform2i64vARB fp_glProgramUniform2i64vARB; pfn_glProgramUniform3i64vARB fp_glProgramUniform3i64vARB; pfn_glProgramUniform4i64vARB fp_glProgramUniform4i64vARB; pfn_glProgramUniform1ui64ARB fp_glProgramUniform1ui64ARB; pfn_glProgramUniform2ui64ARB fp_glProgramUniform2ui64ARB; pfn_glProgramUniform3ui64ARB fp_glProgramUniform3ui64ARB; pfn_glProgramUniform4ui64ARB fp_glProgramUniform4ui64ARB; pfn_glProgramUniform1ui64vARB fp_glProgramUniform1ui64vARB; pfn_glProgramUniform2ui64vARB fp_glProgramUniform2ui64vARB; pfn_glProgramUniform3ui64vARB fp_glProgramUniform3ui64vARB; pfn_glProgramUniform4ui64vARB fp_glProgramUniform4ui64vARB; pfn_glMultiDrawArraysIndirectCountARB fp_glMultiDrawArraysIndirectCountARB; pfn_glMultiDrawElementsIndirectCountARB fp_glMultiDrawElementsIndirectCountARB; pfn_glVertexAttribDivisorARB fp_glVertexAttribDivisorARB; pfn_glMaxShaderCompilerThreadsARB fp_glMaxShaderCompilerThreadsARB; pfn_glGetGraphicsResetStatusARB fp_glGetGraphicsResetStatusARB; pfn_glGetnTexImageARB fp_glGetnTexImageARB; pfn_glReadnPixelsARB fp_glReadnPixelsARB; pfn_glGetnCompressedTexImageARB fp_glGetnCompressedTexImageARB; pfn_glGetnUniformfvARB fp_glGetnUniformfvARB; pfn_glGetnUniformivARB fp_glGetnUniformivARB; pfn_glGetnUniformuivARB fp_glGetnUniformuivARB; pfn_glGetnUniformdvARB fp_glGetnUniformdvARB; pfn_glGetnMapdvARB fp_glGetnMapdvARB; pfn_glGetnMapfvARB fp_glGetnMapfvARB; pfn_glGetnMapivARB fp_glGetnMapivARB; pfn_glGetnPixelMapfvARB fp_glGetnPixelMapfvARB; pfn_glGetnPixelMapuivARB fp_glGetnPixelMapuivARB; pfn_glGetnPixelMapusvARB fp_glGetnPixelMapusvARB; pfn_glGetnPolygonStippleARB fp_glGetnPolygonStippleARB; pfn_glGetnColorTableARB fp_glGetnColorTableARB; pfn_glGetnConvolutionFilterARB fp_glGetnConvolutionFilterARB; pfn_glGetnSeparableFilterARB fp_glGetnSeparableFilterARB; pfn_glGetnHistogramARB fp_glGetnHistogramARB; pfn_glGetnMinmaxARB fp_glGetnMinmaxARB; pfn_glFramebufferSampleLocationsfvARB fp_glFramebufferSampleLocationsfvARB; pfn_glNamedFramebufferSampleLocationsfvARB fp_glNamedFramebufferSampleLocationsfvARB; pfn_glEvaluateDepthValuesARB fp_glEvaluateDepthValuesARB; pfn_glMinSampleShadingARB fp_glMinSampleShadingARB; pfn_glNamedStringARB fp_glNamedStringARB; pfn_glDeleteNamedStringARB fp_glDeleteNamedStringARB; pfn_glCompileShaderIncludeARB fp_glCompileShaderIncludeARB; pfn_glIsNamedStringARB fp_glIsNamedStringARB; pfn_glGetNamedStringARB fp_glGetNamedStringARB; pfn_glGetNamedStringivARB fp_glGetNamedStringivARB; pfn_glBufferPageCommitmentARB fp_glBufferPageCommitmentARB; pfn_glNamedBufferPageCommitmentEXT fp_glNamedBufferPageCommitmentEXT; pfn_glNamedBufferPageCommitmentARB fp_glNamedBufferPageCommitmentARB; pfn_glTexPageCommitmentARB fp_glTexPageCommitmentARB; pfn_glTexBufferARB fp_glTexBufferARB; pfn_glDrawArraysInstancedBaseInstanceEXT fp_glDrawArraysInstancedBaseInstanceEXT; pfn_glDrawElementsInstancedBaseInstanceEXT fp_glDrawElementsInstancedBaseInstanceEXT; pfn_glDrawElementsInstancedBaseVertexBaseInstanceEXT fp_glDrawElementsInstancedBaseVertexBaseInstanceEXT; pfn_glUniformBufferEXT fp_glUniformBufferEXT; pfn_glGetUniformBufferSizeEXT fp_glGetUniformBufferSizeEXT; pfn_glGetUniformOffsetEXT fp_glGetUniformOffsetEXT; pfn_glBindFragDataLocationIndexedEXT fp_glBindFragDataLocationIndexedEXT; pfn_glBindFragDataLocationEXT fp_glBindFragDataLocationEXT; pfn_glGetProgramResourceLocationIndexEXT fp_glGetProgramResourceLocationIndexEXT; pfn_glGetFragDataIndexEXT fp_glGetFragDataIndexEXT; pfn_glBlendEquationEXT fp_glBlendEquationEXT; pfn_glBufferStorageEXT fp_glBufferStorageEXT; pfn_glCopyImageSubDataEXT fp_glCopyImageSubDataEXT; pfn_glLabelObjectEXT fp_glLabelObjectEXT; pfn_glGetObjectLabelEXT fp_glGetObjectLabelEXT; pfn_glInsertEventMarkerEXT fp_glInsertEventMarkerEXT; pfn_glPushGroupMarkerEXT fp_glPushGroupMarkerEXT; pfn_glPopGroupMarkerEXT fp_glPopGroupMarkerEXT; pfn_glMatrixLoadfEXT fp_glMatrixLoadfEXT; pfn_glMatrixLoaddEXT fp_glMatrixLoaddEXT; pfn_glMatrixMultfEXT fp_glMatrixMultfEXT; pfn_glMatrixMultdEXT fp_glMatrixMultdEXT; pfn_glMatrixLoadIdentityEXT fp_glMatrixLoadIdentityEXT; pfn_glMatrixRotatefEXT fp_glMatrixRotatefEXT; pfn_glMatrixRotatedEXT fp_glMatrixRotatedEXT; pfn_glMatrixScalefEXT fp_glMatrixScalefEXT; pfn_glMatrixScaledEXT fp_glMatrixScaledEXT; pfn_glMatrixTranslatefEXT fp_glMatrixTranslatefEXT; pfn_glMatrixTranslatedEXT fp_glMatrixTranslatedEXT; pfn_glMatrixFrustumEXT fp_glMatrixFrustumEXT; pfn_glMatrixOrthoEXT fp_glMatrixOrthoEXT; pfn_glMatrixPopEXT fp_glMatrixPopEXT; pfn_glMatrixPushEXT fp_glMatrixPushEXT; pfn_glClientAttribDefaultEXT fp_glClientAttribDefaultEXT; pfn_glPushClientAttribDefaultEXT fp_glPushClientAttribDefaultEXT; pfn_glTextureParameterfEXT fp_glTextureParameterfEXT; pfn_glTextureParameterfvEXT fp_glTextureParameterfvEXT; pfn_glTextureParameteriEXT fp_glTextureParameteriEXT; pfn_glTextureParameterivEXT fp_glTextureParameterivEXT; pfn_glTextureImage1DEXT fp_glTextureImage1DEXT; pfn_glTextureImage2DEXT fp_glTextureImage2DEXT; pfn_glTextureSubImage1DEXT fp_glTextureSubImage1DEXT; pfn_glTextureSubImage2DEXT fp_glTextureSubImage2DEXT; pfn_glCopyTextureImage1DEXT fp_glCopyTextureImage1DEXT; pfn_glCopyTextureImage2DEXT fp_glCopyTextureImage2DEXT; pfn_glCopyTextureSubImage1DEXT fp_glCopyTextureSubImage1DEXT; pfn_glCopyTextureSubImage2DEXT fp_glCopyTextureSubImage2DEXT; pfn_glGetTextureImageEXT fp_glGetTextureImageEXT; pfn_glGetTextureParameterfvEXT fp_glGetTextureParameterfvEXT; pfn_glGetTextureParameterivEXT fp_glGetTextureParameterivEXT; pfn_glGetTextureLevelParameterfvEXT fp_glGetTextureLevelParameterfvEXT; pfn_glGetTextureLevelParameterivEXT fp_glGetTextureLevelParameterivEXT; pfn_glTextureImage3DEXT fp_glTextureImage3DEXT; pfn_glTextureSubImage3DEXT fp_glTextureSubImage3DEXT; pfn_glCopyTextureSubImage3DEXT fp_glCopyTextureSubImage3DEXT; pfn_glBindMultiTextureEXT fp_glBindMultiTextureEXT; pfn_glMultiTexCoordPointerEXT fp_glMultiTexCoordPointerEXT; pfn_glMultiTexEnvfEXT fp_glMultiTexEnvfEXT; pfn_glMultiTexEnvfvEXT fp_glMultiTexEnvfvEXT; pfn_glMultiTexEnviEXT fp_glMultiTexEnviEXT; pfn_glMultiTexEnvivEXT fp_glMultiTexEnvivEXT; pfn_glMultiTexGendEXT fp_glMultiTexGendEXT; pfn_glMultiTexGendvEXT fp_glMultiTexGendvEXT; pfn_glMultiTexGenfEXT fp_glMultiTexGenfEXT; pfn_glMultiTexGenfvEXT fp_glMultiTexGenfvEXT; pfn_glMultiTexGeniEXT fp_glMultiTexGeniEXT; pfn_glMultiTexGenivEXT fp_glMultiTexGenivEXT; pfn_glGetMultiTexEnvfvEXT fp_glGetMultiTexEnvfvEXT; pfn_glGetMultiTexEnvivEXT fp_glGetMultiTexEnvivEXT; pfn_glGetMultiTexGendvEXT fp_glGetMultiTexGendvEXT; pfn_glGetMultiTexGenfvEXT fp_glGetMultiTexGenfvEXT; pfn_glGetMultiTexGenivEXT fp_glGetMultiTexGenivEXT; pfn_glMultiTexParameteriEXT fp_glMultiTexParameteriEXT; pfn_glMultiTexParameterivEXT fp_glMultiTexParameterivEXT; pfn_glMultiTexParameterfEXT fp_glMultiTexParameterfEXT; pfn_glMultiTexParameterfvEXT fp_glMultiTexParameterfvEXT; pfn_glMultiTexImage1DEXT fp_glMultiTexImage1DEXT; pfn_glMultiTexImage2DEXT fp_glMultiTexImage2DEXT; pfn_glMultiTexSubImage1DEXT fp_glMultiTexSubImage1DEXT; pfn_glMultiTexSubImage2DEXT fp_glMultiTexSubImage2DEXT; pfn_glCopyMultiTexImage1DEXT fp_glCopyMultiTexImage1DEXT; pfn_glCopyMultiTexImage2DEXT fp_glCopyMultiTexImage2DEXT; pfn_glCopyMultiTexSubImage1DEXT fp_glCopyMultiTexSubImage1DEXT; pfn_glCopyMultiTexSubImage2DEXT fp_glCopyMultiTexSubImage2DEXT; pfn_glGetMultiTexImageEXT fp_glGetMultiTexImageEXT; pfn_glGetMultiTexParameterfvEXT fp_glGetMultiTexParameterfvEXT; pfn_glGetMultiTexParameterivEXT fp_glGetMultiTexParameterivEXT; pfn_glGetMultiTexLevelParameterfvEXT fp_glGetMultiTexLevelParameterfvEXT; pfn_glGetMultiTexLevelParameterivEXT fp_glGetMultiTexLevelParameterivEXT; pfn_glMultiTexImage3DEXT fp_glMultiTexImage3DEXT; pfn_glMultiTexSubImage3DEXT fp_glMultiTexSubImage3DEXT; pfn_glCopyMultiTexSubImage3DEXT fp_glCopyMultiTexSubImage3DEXT; pfn_glEnableClientStateIndexedEXT fp_glEnableClientStateIndexedEXT; pfn_glDisableClientStateIndexedEXT fp_glDisableClientStateIndexedEXT; pfn_glGetFloatIndexedvEXT fp_glGetFloatIndexedvEXT; pfn_glGetDoubleIndexedvEXT fp_glGetDoubleIndexedvEXT; pfn_glGetPointerIndexedvEXT fp_glGetPointerIndexedvEXT; pfn_glEnableIndexedEXT fp_glEnableIndexedEXT; pfn_glDisableIndexedEXT fp_glDisableIndexedEXT; pfn_glIsEnabledIndexedEXT fp_glIsEnabledIndexedEXT; pfn_glGetIntegerIndexedvEXT fp_glGetIntegerIndexedvEXT; pfn_glGetBooleanIndexedvEXT fp_glGetBooleanIndexedvEXT; pfn_glCompressedTextureImage3DEXT fp_glCompressedTextureImage3DEXT; pfn_glCompressedTextureImage2DEXT fp_glCompressedTextureImage2DEXT; pfn_glCompressedTextureImage1DEXT fp_glCompressedTextureImage1DEXT; pfn_glCompressedTextureSubImage3DEXT fp_glCompressedTextureSubImage3DEXT; pfn_glCompressedTextureSubImage2DEXT fp_glCompressedTextureSubImage2DEXT; pfn_glCompressedTextureSubImage1DEXT fp_glCompressedTextureSubImage1DEXT; pfn_glGetCompressedTextureImageEXT fp_glGetCompressedTextureImageEXT; pfn_glCompressedMultiTexImage3DEXT fp_glCompressedMultiTexImage3DEXT; pfn_glCompressedMultiTexImage2DEXT fp_glCompressedMultiTexImage2DEXT; pfn_glCompressedMultiTexImage1DEXT fp_glCompressedMultiTexImage1DEXT; pfn_glCompressedMultiTexSubImage3DEXT fp_glCompressedMultiTexSubImage3DEXT; pfn_glCompressedMultiTexSubImage2DEXT fp_glCompressedMultiTexSubImage2DEXT; pfn_glCompressedMultiTexSubImage1DEXT fp_glCompressedMultiTexSubImage1DEXT; pfn_glGetCompressedMultiTexImageEXT fp_glGetCompressedMultiTexImageEXT; pfn_glMatrixLoadTransposefEXT fp_glMatrixLoadTransposefEXT; pfn_glMatrixLoadTransposedEXT fp_glMatrixLoadTransposedEXT; pfn_glMatrixMultTransposefEXT fp_glMatrixMultTransposefEXT; pfn_glMatrixMultTransposedEXT fp_glMatrixMultTransposedEXT; pfn_glNamedBufferDataEXT fp_glNamedBufferDataEXT; pfn_glNamedBufferSubDataEXT fp_glNamedBufferSubDataEXT; pfn_glMapNamedBufferEXT fp_glMapNamedBufferEXT; pfn_glUnmapNamedBufferEXT fp_glUnmapNamedBufferEXT; pfn_glGetNamedBufferParameterivEXT fp_glGetNamedBufferParameterivEXT; pfn_glGetNamedBufferPointervEXT fp_glGetNamedBufferPointervEXT; pfn_glGetNamedBufferSubDataEXT fp_glGetNamedBufferSubDataEXT; pfn_glProgramUniform1fEXT fp_glProgramUniform1fEXT; pfn_glProgramUniform2fEXT fp_glProgramUniform2fEXT; pfn_glProgramUniform3fEXT fp_glProgramUniform3fEXT; pfn_glProgramUniform4fEXT fp_glProgramUniform4fEXT; pfn_glProgramUniform1iEXT fp_glProgramUniform1iEXT; pfn_glProgramUniform2iEXT fp_glProgramUniform2iEXT; pfn_glProgramUniform3iEXT fp_glProgramUniform3iEXT; pfn_glProgramUniform4iEXT fp_glProgramUniform4iEXT; pfn_glProgramUniform1fvEXT fp_glProgramUniform1fvEXT; pfn_glProgramUniform2fvEXT fp_glProgramUniform2fvEXT; pfn_glProgramUniform3fvEXT fp_glProgramUniform3fvEXT; pfn_glProgramUniform4fvEXT fp_glProgramUniform4fvEXT; pfn_glProgramUniform1ivEXT fp_glProgramUniform1ivEXT; pfn_glProgramUniform2ivEXT fp_glProgramUniform2ivEXT; pfn_glProgramUniform3ivEXT fp_glProgramUniform3ivEXT; pfn_glProgramUniform4ivEXT fp_glProgramUniform4ivEXT; pfn_glProgramUniformMatrix2fvEXT fp_glProgramUniformMatrix2fvEXT; pfn_glProgramUniformMatrix3fvEXT fp_glProgramUniformMatrix3fvEXT; pfn_glProgramUniformMatrix4fvEXT fp_glProgramUniformMatrix4fvEXT; pfn_glProgramUniformMatrix2x3fvEXT fp_glProgramUniformMatrix2x3fvEXT; pfn_glProgramUniformMatrix3x2fvEXT fp_glProgramUniformMatrix3x2fvEXT; pfn_glProgramUniformMatrix2x4fvEXT fp_glProgramUniformMatrix2x4fvEXT; pfn_glProgramUniformMatrix4x2fvEXT fp_glProgramUniformMatrix4x2fvEXT; pfn_glProgramUniformMatrix3x4fvEXT fp_glProgramUniformMatrix3x4fvEXT; pfn_glProgramUniformMatrix4x3fvEXT fp_glProgramUniformMatrix4x3fvEXT; pfn_glTextureBufferEXT fp_glTextureBufferEXT; pfn_glMultiTexBufferEXT fp_glMultiTexBufferEXT; pfn_glTextureParameterIivEXT fp_glTextureParameterIivEXT; pfn_glTextureParameterIuivEXT fp_glTextureParameterIuivEXT; pfn_glGetTextureParameterIivEXT fp_glGetTextureParameterIivEXT; pfn_glGetTextureParameterIuivEXT fp_glGetTextureParameterIuivEXT; pfn_glMultiTexParameterIivEXT fp_glMultiTexParameterIivEXT; pfn_glMultiTexParameterIuivEXT fp_glMultiTexParameterIuivEXT; pfn_glGetMultiTexParameterIivEXT fp_glGetMultiTexParameterIivEXT; pfn_glGetMultiTexParameterIuivEXT fp_glGetMultiTexParameterIuivEXT; pfn_glProgramUniform1uiEXT fp_glProgramUniform1uiEXT; pfn_glProgramUniform2uiEXT fp_glProgramUniform2uiEXT; pfn_glProgramUniform3uiEXT fp_glProgramUniform3uiEXT; pfn_glProgramUniform4uiEXT fp_glProgramUniform4uiEXT; pfn_glProgramUniform1uivEXT fp_glProgramUniform1uivEXT; pfn_glProgramUniform2uivEXT fp_glProgramUniform2uivEXT; pfn_glProgramUniform3uivEXT fp_glProgramUniform3uivEXT; pfn_glProgramUniform4uivEXT fp_glProgramUniform4uivEXT; pfn_glNamedProgramLocalParameters4fvEXT fp_glNamedProgramLocalParameters4fvEXT; pfn_glNamedProgramLocalParameterI4iEXT fp_glNamedProgramLocalParameterI4iEXT; pfn_glNamedProgramLocalParameterI4ivEXT fp_glNamedProgramLocalParameterI4ivEXT; pfn_glNamedProgramLocalParametersI4ivEXT fp_glNamedProgramLocalParametersI4ivEXT; pfn_glNamedProgramLocalParameterI4uiEXT fp_glNamedProgramLocalParameterI4uiEXT; pfn_glNamedProgramLocalParameterI4uivEXT fp_glNamedProgramLocalParameterI4uivEXT; pfn_glNamedProgramLocalParametersI4uivEXT fp_glNamedProgramLocalParametersI4uivEXT; pfn_glGetNamedProgramLocalParameterIivEXT fp_glGetNamedProgramLocalParameterIivEXT; pfn_glGetNamedProgramLocalParameterIuivEXT fp_glGetNamedProgramLocalParameterIuivEXT; pfn_glEnableClientStateiEXT fp_glEnableClientStateiEXT; pfn_glDisableClientStateiEXT fp_glDisableClientStateiEXT; pfn_glGetFloati_vEXT fp_glGetFloati_vEXT; pfn_glGetDoublei_vEXT fp_glGetDoublei_vEXT; pfn_glGetPointeri_vEXT fp_glGetPointeri_vEXT; pfn_glNamedProgramStringEXT fp_glNamedProgramStringEXT; pfn_glNamedProgramLocalParameter4dEXT fp_glNamedProgramLocalParameter4dEXT; pfn_glNamedProgramLocalParameter4dvEXT fp_glNamedProgramLocalParameter4dvEXT; pfn_glNamedProgramLocalParameter4fEXT fp_glNamedProgramLocalParameter4fEXT; pfn_glNamedProgramLocalParameter4fvEXT fp_glNamedProgramLocalParameter4fvEXT; pfn_glGetNamedProgramLocalParameterdvEXT fp_glGetNamedProgramLocalParameterdvEXT; pfn_glGetNamedProgramLocalParameterfvEXT fp_glGetNamedProgramLocalParameterfvEXT; pfn_glGetNamedProgramivEXT fp_glGetNamedProgramivEXT; pfn_glGetNamedProgramStringEXT fp_glGetNamedProgramStringEXT; pfn_glNamedRenderbufferStorageEXT fp_glNamedRenderbufferStorageEXT; pfn_glGetNamedRenderbufferParameterivEXT fp_glGetNamedRenderbufferParameterivEXT; pfn_glNamedRenderbufferStorageMultisampleEXT fp_glNamedRenderbufferStorageMultisampleEXT; pfn_glNamedRenderbufferStorageMultisampleCoverageEXT fp_glNamedRenderbufferStorageMultisampleCoverageEXT; pfn_glCheckNamedFramebufferStatusEXT fp_glCheckNamedFramebufferStatusEXT; pfn_glNamedFramebufferTexture1DEXT fp_glNamedFramebufferTexture1DEXT; pfn_glNamedFramebufferTexture2DEXT fp_glNamedFramebufferTexture2DEXT; pfn_glNamedFramebufferTexture3DEXT fp_glNamedFramebufferTexture3DEXT; pfn_glNamedFramebufferRenderbufferEXT fp_glNamedFramebufferRenderbufferEXT; pfn_glGetNamedFramebufferAttachmentParameterivEXT fp_glGetNamedFramebufferAttachmentParameterivEXT; pfn_glGenerateTextureMipmapEXT fp_glGenerateTextureMipmapEXT; pfn_glGenerateMultiTexMipmapEXT fp_glGenerateMultiTexMipmapEXT; pfn_glFramebufferDrawBufferEXT fp_glFramebufferDrawBufferEXT; pfn_glFramebufferDrawBuffersEXT fp_glFramebufferDrawBuffersEXT; pfn_glFramebufferReadBufferEXT fp_glFramebufferReadBufferEXT; pfn_glGetFramebufferParameterivEXT fp_glGetFramebufferParameterivEXT; pfn_glNamedCopyBufferSubDataEXT fp_glNamedCopyBufferSubDataEXT; pfn_glNamedFramebufferTextureEXT fp_glNamedFramebufferTextureEXT; pfn_glNamedFramebufferTextureLayerEXT fp_glNamedFramebufferTextureLayerEXT; pfn_glNamedFramebufferTextureFaceEXT fp_glNamedFramebufferTextureFaceEXT; pfn_glTextureRenderbufferEXT fp_glTextureRenderbufferEXT; pfn_glMultiTexRenderbufferEXT fp_glMultiTexRenderbufferEXT; pfn_glVertexArrayVertexOffsetEXT fp_glVertexArrayVertexOffsetEXT; pfn_glVertexArrayColorOffsetEXT fp_glVertexArrayColorOffsetEXT; pfn_glVertexArrayEdgeFlagOffsetEXT fp_glVertexArrayEdgeFlagOffsetEXT; pfn_glVertexArrayIndexOffsetEXT fp_glVertexArrayIndexOffsetEXT; pfn_glVertexArrayNormalOffsetEXT fp_glVertexArrayNormalOffsetEXT; pfn_glVertexArrayTexCoordOffsetEXT fp_glVertexArrayTexCoordOffsetEXT; pfn_glVertexArrayMultiTexCoordOffsetEXT fp_glVertexArrayMultiTexCoordOffsetEXT; pfn_glVertexArrayFogCoordOffsetEXT fp_glVertexArrayFogCoordOffsetEXT; pfn_glVertexArraySecondaryColorOffsetEXT fp_glVertexArraySecondaryColorOffsetEXT; pfn_glVertexArrayVertexAttribOffsetEXT fp_glVertexArrayVertexAttribOffsetEXT; pfn_glVertexArrayVertexAttribIOffsetEXT fp_glVertexArrayVertexAttribIOffsetEXT; pfn_glEnableVertexArrayEXT fp_glEnableVertexArrayEXT; pfn_glDisableVertexArrayEXT fp_glDisableVertexArrayEXT; pfn_glEnableVertexArrayAttribEXT fp_glEnableVertexArrayAttribEXT; pfn_glDisableVertexArrayAttribEXT fp_glDisableVertexArrayAttribEXT; pfn_glGetVertexArrayIntegervEXT fp_glGetVertexArrayIntegervEXT; pfn_glGetVertexArrayPointervEXT fp_glGetVertexArrayPointervEXT; pfn_glGetVertexArrayIntegeri_vEXT fp_glGetVertexArrayIntegeri_vEXT; pfn_glGetVertexArrayPointeri_vEXT fp_glGetVertexArrayPointeri_vEXT; pfn_glMapNamedBufferRangeEXT fp_glMapNamedBufferRangeEXT; pfn_glFlushMappedNamedBufferRangeEXT fp_glFlushMappedNamedBufferRangeEXT; pfn_glNamedBufferStorageEXT fp_glNamedBufferStorageEXT; pfn_glClearNamedBufferDataEXT fp_glClearNamedBufferDataEXT; pfn_glClearNamedBufferSubDataEXT fp_glClearNamedBufferSubDataEXT; pfn_glNamedFramebufferParameteriEXT fp_glNamedFramebufferParameteriEXT; pfn_glGetNamedFramebufferParameterivEXT fp_glGetNamedFramebufferParameterivEXT; pfn_glProgramUniform1dEXT fp_glProgramUniform1dEXT; pfn_glProgramUniform2dEXT fp_glProgramUniform2dEXT; pfn_glProgramUniform3dEXT fp_glProgramUniform3dEXT; pfn_glProgramUniform4dEXT fp_glProgramUniform4dEXT; pfn_glProgramUniform1dvEXT fp_glProgramUniform1dvEXT; pfn_glProgramUniform2dvEXT fp_glProgramUniform2dvEXT; pfn_glProgramUniform3dvEXT fp_glProgramUniform3dvEXT; pfn_glProgramUniform4dvEXT fp_glProgramUniform4dvEXT; pfn_glProgramUniformMatrix2dvEXT fp_glProgramUniformMatrix2dvEXT; pfn_glProgramUniformMatrix3dvEXT fp_glProgramUniformMatrix3dvEXT; pfn_glProgramUniformMatrix4dvEXT fp_glProgramUniformMatrix4dvEXT; pfn_glProgramUniformMatrix2x3dvEXT fp_glProgramUniformMatrix2x3dvEXT; pfn_glProgramUniformMatrix2x4dvEXT fp_glProgramUniformMatrix2x4dvEXT; pfn_glProgramUniformMatrix3x2dvEXT fp_glProgramUniformMatrix3x2dvEXT; pfn_glProgramUniformMatrix3x4dvEXT fp_glProgramUniformMatrix3x4dvEXT; pfn_glProgramUniformMatrix4x2dvEXT fp_glProgramUniformMatrix4x2dvEXT; pfn_glProgramUniformMatrix4x3dvEXT fp_glProgramUniformMatrix4x3dvEXT; pfn_glTextureBufferRangeEXT fp_glTextureBufferRangeEXT; pfn_glTextureStorage1DEXT fp_glTextureStorage1DEXT; pfn_glTextureStorage2DEXT fp_glTextureStorage2DEXT; pfn_glTextureStorage3DEXT fp_glTextureStorage3DEXT; pfn_glTextureStorage2DMultisampleEXT fp_glTextureStorage2DMultisampleEXT; pfn_glTextureStorage3DMultisampleEXT fp_glTextureStorage3DMultisampleEXT; pfn_glVertexArrayBindVertexBufferEXT fp_glVertexArrayBindVertexBufferEXT; pfn_glVertexArrayVertexAttribFormatEXT fp_glVertexArrayVertexAttribFormatEXT; pfn_glVertexArrayVertexAttribIFormatEXT fp_glVertexArrayVertexAttribIFormatEXT; pfn_glVertexArrayVertexAttribLFormatEXT fp_glVertexArrayVertexAttribLFormatEXT; pfn_glVertexArrayVertexAttribBindingEXT fp_glVertexArrayVertexAttribBindingEXT; pfn_glVertexArrayVertexBindingDivisorEXT fp_glVertexArrayVertexBindingDivisorEXT; pfn_glVertexArrayVertexAttribLOffsetEXT fp_glVertexArrayVertexAttribLOffsetEXT; pfn_glTexturePageCommitmentEXT fp_glTexturePageCommitmentEXT; pfn_glVertexArrayVertexAttribDivisorEXT fp_glVertexArrayVertexAttribDivisorEXT; pfn_glDiscardFramebufferEXT fp_glDiscardFramebufferEXT; pfn_glGenQueriesEXT fp_glGenQueriesEXT; pfn_glDeleteQueriesEXT fp_glDeleteQueriesEXT; pfn_glIsQueryEXT fp_glIsQueryEXT; pfn_glBeginQueryEXT fp_glBeginQueryEXT; pfn_glEndQueryEXT fp_glEndQueryEXT; pfn_glQueryCounterEXT fp_glQueryCounterEXT; pfn_glGetQueryivEXT fp_glGetQueryivEXT; pfn_glGetQueryObjectivEXT fp_glGetQueryObjectivEXT; pfn_glGetQueryObjectuivEXT fp_glGetQueryObjectuivEXT; pfn_glGetQueryObjecti64vEXT fp_glGetQueryObjecti64vEXT; pfn_glGetQueryObjectui64vEXT fp_glGetQueryObjectui64vEXT; pfn_glDrawBuffersEXT fp_glDrawBuffersEXT; pfn_glColorMaskIndexedEXT fp_glColorMaskIndexedEXT; pfn_glEnableiEXT fp_glEnableiEXT; pfn_glDisableiEXT fp_glDisableiEXT; pfn_glBlendEquationiEXT fp_glBlendEquationiEXT; pfn_glBlendEquationSeparateiEXT fp_glBlendEquationSeparateiEXT; pfn_glBlendFunciEXT fp_glBlendFunciEXT; pfn_glBlendFuncSeparateiEXT fp_glBlendFuncSeparateiEXT; pfn_glColorMaskiEXT fp_glColorMaskiEXT; pfn_glIsEnablediEXT fp_glIsEnablediEXT; pfn_glDrawElementsBaseVertexEXT fp_glDrawElementsBaseVertexEXT; pfn_glDrawRangeElementsBaseVertexEXT fp_glDrawRangeElementsBaseVertexEXT; pfn_glDrawElementsInstancedBaseVertexEXT fp_glDrawElementsInstancedBaseVertexEXT; pfn_glMultiDrawElementsBaseVertexEXT fp_glMultiDrawElementsBaseVertexEXT; pfn_glDrawArraysInstancedEXT fp_glDrawArraysInstancedEXT; pfn_glDrawElementsInstancedEXT fp_glDrawElementsInstancedEXT; pfn_glBlitFramebufferEXT fp_glBlitFramebufferEXT; pfn_glRenderbufferStorageMultisampleEXT fp_glRenderbufferStorageMultisampleEXT; pfn_glIsRenderbufferEXT fp_glIsRenderbufferEXT; pfn_glBindRenderbufferEXT fp_glBindRenderbufferEXT; pfn_glDeleteRenderbuffersEXT fp_glDeleteRenderbuffersEXT; pfn_glGenRenderbuffersEXT fp_glGenRenderbuffersEXT; pfn_glRenderbufferStorageEXT fp_glRenderbufferStorageEXT; pfn_glGetRenderbufferParameterivEXT fp_glGetRenderbufferParameterivEXT; pfn_glIsFramebufferEXT fp_glIsFramebufferEXT; pfn_glBindFramebufferEXT fp_glBindFramebufferEXT; pfn_glDeleteFramebuffersEXT fp_glDeleteFramebuffersEXT; pfn_glGenFramebuffersEXT fp_glGenFramebuffersEXT; pfn_glCheckFramebufferStatusEXT fp_glCheckFramebufferStatusEXT; pfn_glFramebufferTexture1DEXT fp_glFramebufferTexture1DEXT; pfn_glFramebufferTexture2DEXT fp_glFramebufferTexture2DEXT; pfn_glFramebufferTexture3DEXT fp_glFramebufferTexture3DEXT; pfn_glFramebufferRenderbufferEXT fp_glFramebufferRenderbufferEXT; pfn_glGetFramebufferAttachmentParameterivEXT fp_glGetFramebufferAttachmentParameterivEXT; pfn_glGenerateMipmapEXT fp_glGenerateMipmapEXT; pfn_glFramebufferTextureEXT fp_glFramebufferTextureEXT; pfn_glProgramParameteriEXT fp_glProgramParameteriEXT; pfn_glProgramEnvParameters4fvEXT fp_glProgramEnvParameters4fvEXT; pfn_glProgramLocalParameters4fvEXT fp_glProgramLocalParameters4fvEXT; pfn_glGetUniformuivEXT fp_glGetUniformuivEXT; pfn_glGetFragDataLocationEXT fp_glGetFragDataLocationEXT; pfn_glUniform1uiEXT fp_glUniform1uiEXT; pfn_glUniform2uiEXT fp_glUniform2uiEXT; pfn_glUniform3uiEXT fp_glUniform3uiEXT; pfn_glUniform4uiEXT fp_glUniform4uiEXT; pfn_glUniform1uivEXT fp_glUniform1uivEXT; pfn_glUniform2uivEXT fp_glUniform2uivEXT; pfn_glUniform3uivEXT fp_glUniform3uivEXT; pfn_glUniform4uivEXT fp_glUniform4uivEXT; pfn_glVertexAttribDivisorEXT fp_glVertexAttribDivisorEXT; pfn_glMapBufferRangeEXT fp_glMapBufferRangeEXT; pfn_glFlushMappedBufferRangeEXT fp_glFlushMappedBufferRangeEXT; pfn_glMultiDrawArraysIndirectEXT fp_glMultiDrawArraysIndirectEXT; pfn_glMultiDrawElementsIndirectEXT fp_glMultiDrawElementsIndirectEXT; pfn_glFramebufferTexture2DMultisampleEXT fp_glFramebufferTexture2DMultisampleEXT; pfn_glReadBufferIndexedEXT fp_glReadBufferIndexedEXT; pfn_glDrawBuffersIndexedEXT fp_glDrawBuffersIndexedEXT; pfn_glGetIntegeri_vEXT fp_glGetIntegeri_vEXT; pfn_glPolygonOffsetClampEXT fp_glPolygonOffsetClampEXT; pfn_glPrimitiveBoundingBoxEXT fp_glPrimitiveBoundingBoxEXT; pfn_glProvokingVertexEXT fp_glProvokingVertexEXT; pfn_glRasterSamplesEXT fp_glRasterSamplesEXT; pfn_glGetGraphicsResetStatusEXT fp_glGetGraphicsResetStatusEXT; pfn_glReadnPixelsEXT fp_glReadnPixelsEXT; pfn_glGetnUniformfvEXT fp_glGetnUniformfvEXT; pfn_glGetnUniformivEXT fp_glGetnUniformivEXT; pfn_glUseShaderProgramEXT fp_glUseShaderProgramEXT; pfn_glActiveProgramEXT fp_glActiveProgramEXT; pfn_glCreateShaderProgramEXT fp_glCreateShaderProgramEXT; pfn_glActiveShaderProgramEXT fp_glActiveShaderProgramEXT; pfn_glBindProgramPipelineEXT fp_glBindProgramPipelineEXT; pfn_glCreateShaderProgramvEXT fp_glCreateShaderProgramvEXT; pfn_glDeleteProgramPipelinesEXT fp_glDeleteProgramPipelinesEXT; pfn_glGenProgramPipelinesEXT fp_glGenProgramPipelinesEXT; pfn_glGetProgramPipelineInfoLogEXT fp_glGetProgramPipelineInfoLogEXT; pfn_glGetProgramPipelineivEXT fp_glGetProgramPipelineivEXT; pfn_glIsProgramPipelineEXT fp_glIsProgramPipelineEXT; pfn_glUseProgramStagesEXT fp_glUseProgramStagesEXT; pfn_glValidateProgramPipelineEXT fp_glValidateProgramPipelineEXT; pfn_glBindImageTextureEXT fp_glBindImageTextureEXT; pfn_glMemoryBarrierEXT fp_glMemoryBarrierEXT; pfn_glTexPageCommitmentEXT fp_glTexPageCommitmentEXT; pfn_glStencilClearTagEXT fp_glStencilClearTagEXT; pfn_glPatchParameteriEXT fp_glPatchParameteriEXT; pfn_glFramebufferTextureLayerEXT fp_glFramebufferTextureLayerEXT; pfn_glTexParameterIivEXT fp_glTexParameterIivEXT; pfn_glTexParameterIuivEXT fp_glTexParameterIuivEXT; pfn_glGetTexParameterIivEXT fp_glGetTexParameterIivEXT; pfn_glGetTexParameterIuivEXT fp_glGetTexParameterIuivEXT; pfn_glSamplerParameterIivEXT fp_glSamplerParameterIivEXT; pfn_glSamplerParameterIuivEXT fp_glSamplerParameterIuivEXT; pfn_glGetSamplerParameterIivEXT fp_glGetSamplerParameterIivEXT; pfn_glGetSamplerParameterIuivEXT fp_glGetSamplerParameterIuivEXT; pfn_glTexBufferEXT fp_glTexBufferEXT; pfn_glTexBufferRangeEXT fp_glTexBufferRangeEXT; pfn_glClearColorIiEXT fp_glClearColorIiEXT; pfn_glClearColorIuiEXT fp_glClearColorIuiEXT; pfn_glTexStorage1DEXT fp_glTexStorage1DEXT; pfn_glTexStorage2DEXT fp_glTexStorage2DEXT; pfn_glTexStorage3DEXT fp_glTexStorage3DEXT; pfn_glTextureViewEXT fp_glTextureViewEXT; pfn_glBeginTransformFeedbackEXT fp_glBeginTransformFeedbackEXT; pfn_glEndTransformFeedbackEXT fp_glEndTransformFeedbackEXT; pfn_glBindBufferRangeEXT fp_glBindBufferRangeEXT; pfn_glBindBufferOffsetEXT fp_glBindBufferOffsetEXT; pfn_glBindBufferBaseEXT fp_glBindBufferBaseEXT; pfn_glTransformFeedbackVaryingsEXT fp_glTransformFeedbackVaryingsEXT; pfn_glGetTransformFeedbackVaryingEXT fp_glGetTransformFeedbackVaryingEXT; pfn_glVertexAttribL1dEXT fp_glVertexAttribL1dEXT; pfn_glVertexAttribL2dEXT fp_glVertexAttribL2dEXT; pfn_glVertexAttribL3dEXT fp_glVertexAttribL3dEXT; pfn_glVertexAttribL4dEXT fp_glVertexAttribL4dEXT; pfn_glVertexAttribL1dvEXT fp_glVertexAttribL1dvEXT; pfn_glVertexAttribL2dvEXT fp_glVertexAttribL2dvEXT; pfn_glVertexAttribL3dvEXT fp_glVertexAttribL3dvEXT; pfn_glVertexAttribL4dvEXT fp_glVertexAttribL4dvEXT; pfn_glVertexAttribLPointerEXT fp_glVertexAttribLPointerEXT; pfn_glGetVertexAttribLdvEXT fp_glGetVertexAttribLdvEXT; pfn_glImportSyncEXT fp_glImportSyncEXT; pfn_glCopyImageSubDataOES fp_glCopyImageSubDataOES; pfn_glEnableiOES fp_glEnableiOES; pfn_glDisableiOES fp_glDisableiOES; pfn_glBlendEquationiOES fp_glBlendEquationiOES; pfn_glBlendEquationSeparateiOES fp_glBlendEquationSeparateiOES; pfn_glBlendFunciOES fp_glBlendFunciOES; pfn_glBlendFuncSeparateiOES fp_glBlendFuncSeparateiOES; pfn_glColorMaskiOES fp_glColorMaskiOES; pfn_glIsEnablediOES fp_glIsEnablediOES; pfn_glDrawElementsBaseVertexOES fp_glDrawElementsBaseVertexOES; pfn_glDrawRangeElementsBaseVertexOES fp_glDrawRangeElementsBaseVertexOES; pfn_glDrawElementsInstancedBaseVertexOES fp_glDrawElementsInstancedBaseVertexOES; pfn_glMultiDrawElementsBaseVertexOES fp_glMultiDrawElementsBaseVertexOES; pfn_glEGLImageTargetTexture2DOES fp_glEGLImageTargetTexture2DOES; pfn_glEGLImageTargetRenderbufferStorageOES fp_glEGLImageTargetRenderbufferStorageOES; pfn_glFramebufferTextureOES fp_glFramebufferTextureOES; pfn_glGetProgramBinaryOES fp_glGetProgramBinaryOES; pfn_glProgramBinaryOES fp_glProgramBinaryOES; pfn_glMapBufferOES fp_glMapBufferOES; pfn_glUnmapBufferOES fp_glUnmapBufferOES; pfn_glGetBufferPointervOES fp_glGetBufferPointervOES; pfn_glPrimitiveBoundingBoxOES fp_glPrimitiveBoundingBoxOES; pfn_glMinSampleShadingOES fp_glMinSampleShadingOES; pfn_glPatchParameteriOES fp_glPatchParameteriOES; pfn_glTexImage3DOES fp_glTexImage3DOES; pfn_glTexSubImage3DOES fp_glTexSubImage3DOES; pfn_glCopyTexSubImage3DOES fp_glCopyTexSubImage3DOES; pfn_glCompressedTexImage3DOES fp_glCompressedTexImage3DOES; pfn_glCompressedTexSubImage3DOES fp_glCompressedTexSubImage3DOES; pfn_glFramebufferTexture3DOES fp_glFramebufferTexture3DOES; pfn_glTexParameterIivOES fp_glTexParameterIivOES; pfn_glTexParameterIuivOES fp_glTexParameterIuivOES; pfn_glGetTexParameterIivOES fp_glGetTexParameterIivOES; pfn_glGetTexParameterIuivOES fp_glGetTexParameterIuivOES; pfn_glSamplerParameterIivOES fp_glSamplerParameterIivOES; pfn_glSamplerParameterIuivOES fp_glSamplerParameterIuivOES; pfn_glGetSamplerParameterIivOES fp_glGetSamplerParameterIivOES; pfn_glGetSamplerParameterIuivOES fp_glGetSamplerParameterIuivOES; pfn_glTexBufferOES fp_glTexBufferOES; pfn_glTexBufferRangeOES fp_glTexBufferRangeOES; pfn_glTexStorage3DMultisampleOES fp_glTexStorage3DMultisampleOES; pfn_glTextureViewOES fp_glTextureViewOES; pfn_glBindVertexArrayOES fp_glBindVertexArrayOES; pfn_glDeleteVertexArraysOES fp_glDeleteVertexArraysOES; pfn_glGenVertexArraysOES fp_glGenVertexArraysOES; pfn_glIsVertexArrayOES fp_glIsVertexArrayOES; pfn_glDebugMessageEnableAMD fp_glDebugMessageEnableAMD; pfn_glDebugMessageInsertAMD fp_glDebugMessageInsertAMD; pfn_glDebugMessageCallbackAMD fp_glDebugMessageCallbackAMD; pfn_glGetDebugMessageLogAMD fp_glGetDebugMessageLogAMD; pfn_glBlendFuncIndexedAMD fp_glBlendFuncIndexedAMD; pfn_glBlendFuncSeparateIndexedAMD fp_glBlendFuncSeparateIndexedAMD; pfn_glBlendEquationIndexedAMD fp_glBlendEquationIndexedAMD; pfn_glBlendEquationSeparateIndexedAMD fp_glBlendEquationSeparateIndexedAMD; pfn_glUniform1i64NV fp_glUniform1i64NV; pfn_glUniform2i64NV fp_glUniform2i64NV; pfn_glUniform3i64NV fp_glUniform3i64NV; pfn_glUniform4i64NV fp_glUniform4i64NV; pfn_glUniform1i64vNV fp_glUniform1i64vNV; pfn_glUniform2i64vNV fp_glUniform2i64vNV; pfn_glUniform3i64vNV fp_glUniform3i64vNV; pfn_glUniform4i64vNV fp_glUniform4i64vNV; pfn_glUniform1ui64NV fp_glUniform1ui64NV; pfn_glUniform2ui64NV fp_glUniform2ui64NV; pfn_glUniform3ui64NV fp_glUniform3ui64NV; pfn_glUniform4ui64NV fp_glUniform4ui64NV; pfn_glUniform1ui64vNV fp_glUniform1ui64vNV; pfn_glUniform2ui64vNV fp_glUniform2ui64vNV; pfn_glUniform3ui64vNV fp_glUniform3ui64vNV; pfn_glUniform4ui64vNV fp_glUniform4ui64vNV; pfn_glGetUniformi64vNV fp_glGetUniformi64vNV; pfn_glGetUniformui64vNV fp_glGetUniformui64vNV; pfn_glProgramUniform1i64NV fp_glProgramUniform1i64NV; pfn_glProgramUniform2i64NV fp_glProgramUniform2i64NV; pfn_glProgramUniform3i64NV fp_glProgramUniform3i64NV; pfn_glProgramUniform4i64NV fp_glProgramUniform4i64NV; pfn_glProgramUniform1i64vNV fp_glProgramUniform1i64vNV; pfn_glProgramUniform2i64vNV fp_glProgramUniform2i64vNV; pfn_glProgramUniform3i64vNV fp_glProgramUniform3i64vNV; pfn_glProgramUniform4i64vNV fp_glProgramUniform4i64vNV; pfn_glProgramUniform1ui64NV fp_glProgramUniform1ui64NV; pfn_glProgramUniform2ui64NV fp_glProgramUniform2ui64NV; pfn_glProgramUniform3ui64NV fp_glProgramUniform3ui64NV; pfn_glProgramUniform4ui64NV fp_glProgramUniform4ui64NV; pfn_glProgramUniform1ui64vNV fp_glProgramUniform1ui64vNV; pfn_glProgramUniform2ui64vNV fp_glProgramUniform2ui64vNV; pfn_glProgramUniform3ui64vNV fp_glProgramUniform3ui64vNV; pfn_glProgramUniform4ui64vNV fp_glProgramUniform4ui64vNV; pfn_glVertexAttribParameteriAMD fp_glVertexAttribParameteriAMD; pfn_glMultiDrawArraysIndirectAMD fp_glMultiDrawArraysIndirectAMD; pfn_glMultiDrawElementsIndirectAMD fp_glMultiDrawElementsIndirectAMD; pfn_glGenNamesAMD fp_glGenNamesAMD; pfn_glDeleteNamesAMD fp_glDeleteNamesAMD; pfn_glIsNameAMD fp_glIsNameAMD; pfn_glQueryObjectParameteruiAMD fp_glQueryObjectParameteruiAMD; pfn_glGetPerfMonitorGroupsAMD fp_glGetPerfMonitorGroupsAMD; pfn_glGetPerfMonitorCountersAMD fp_glGetPerfMonitorCountersAMD; pfn_glGetPerfMonitorGroupStringAMD fp_glGetPerfMonitorGroupStringAMD; pfn_glGetPerfMonitorCounterStringAMD fp_glGetPerfMonitorCounterStringAMD; pfn_glGetPerfMonitorCounterInfoAMD fp_glGetPerfMonitorCounterInfoAMD; pfn_glGenPerfMonitorsAMD fp_glGenPerfMonitorsAMD; pfn_glDeletePerfMonitorsAMD fp_glDeletePerfMonitorsAMD; pfn_glSelectPerfMonitorCountersAMD fp_glSelectPerfMonitorCountersAMD; pfn_glBeginPerfMonitorAMD fp_glBeginPerfMonitorAMD; pfn_glEndPerfMonitorAMD fp_glEndPerfMonitorAMD; pfn_glGetPerfMonitorCounterDataAMD fp_glGetPerfMonitorCounterDataAMD; pfn_glSetMultisamplefvAMD fp_glSetMultisamplefvAMD; pfn_glTexStorageSparseAMD fp_glTexStorageSparseAMD; pfn_glTextureStorageSparseAMD fp_glTextureStorageSparseAMD; pfn_glStencilOpValueAMD fp_glStencilOpValueAMD; pfn_glTessellationFactorAMD fp_glTessellationFactorAMD; pfn_glTessellationModeAMD fp_glTessellationModeAMD; pfn_glBlitFramebufferANGLE fp_glBlitFramebufferANGLE; pfn_glRenderbufferStorageMultisampleANGLE fp_glRenderbufferStorageMultisampleANGLE; pfn_glDrawArraysInstancedANGLE fp_glDrawArraysInstancedANGLE; pfn_glDrawElementsInstancedANGLE fp_glDrawElementsInstancedANGLE; pfn_glVertexAttribDivisorANGLE fp_glVertexAttribDivisorANGLE; pfn_glGetTranslatedShaderSourceANGLE fp_glGetTranslatedShaderSourceANGLE; pfn_glCopyTextureLevelsAPPLE fp_glCopyTextureLevelsAPPLE; pfn_glElementPointerAPPLE fp_glElementPointerAPPLE; pfn_glDrawElementArrayAPPLE fp_glDrawElementArrayAPPLE; pfn_glDrawRangeElementArrayAPPLE fp_glDrawRangeElementArrayAPPLE; pfn_glMultiDrawElementArrayAPPLE fp_glMultiDrawElementArrayAPPLE; pfn_glMultiDrawRangeElementArrayAPPLE fp_glMultiDrawRangeElementArrayAPPLE; pfn_glGenFencesAPPLE fp_glGenFencesAPPLE; pfn_glDeleteFencesAPPLE fp_glDeleteFencesAPPLE; pfn_glSetFenceAPPLE fp_glSetFenceAPPLE; pfn_glIsFenceAPPLE fp_glIsFenceAPPLE; pfn_glTestFenceAPPLE fp_glTestFenceAPPLE; pfn_glFinishFenceAPPLE fp_glFinishFenceAPPLE; pfn_glTestObjectAPPLE fp_glTestObjectAPPLE; pfn_glFinishObjectAPPLE fp_glFinishObjectAPPLE; pfn_glBufferParameteriAPPLE fp_glBufferParameteriAPPLE; pfn_glFlushMappedBufferRangeAPPLE fp_glFlushMappedBufferRangeAPPLE; pfn_glRenderbufferStorageMultisampleAPPLE fp_glRenderbufferStorageMultisampleAPPLE; pfn_glResolveMultisampleFramebufferAPPLE fp_glResolveMultisampleFramebufferAPPLE; pfn_glObjectPurgeableAPPLE fp_glObjectPurgeableAPPLE; pfn_glObjectUnpurgeableAPPLE fp_glObjectUnpurgeableAPPLE; pfn_glGetObjectParameterivAPPLE fp_glGetObjectParameterivAPPLE; pfn_glFenceSyncAPPLE fp_glFenceSyncAPPLE; pfn_glIsSyncAPPLE fp_glIsSyncAPPLE; pfn_glDeleteSyncAPPLE fp_glDeleteSyncAPPLE; pfn_glClientWaitSyncAPPLE fp_glClientWaitSyncAPPLE; pfn_glWaitSyncAPPLE fp_glWaitSyncAPPLE; pfn_glGetInteger64vAPPLE fp_glGetInteger64vAPPLE; pfn_glGetSyncivAPPLE fp_glGetSyncivAPPLE; pfn_glTextureRangeAPPLE fp_glTextureRangeAPPLE; pfn_glGetTexParameterPointervAPPLE fp_glGetTexParameterPointervAPPLE; pfn_glBindVertexArrayAPPLE fp_glBindVertexArrayAPPLE; pfn_glDeleteVertexArraysAPPLE fp_glDeleteVertexArraysAPPLE; pfn_glGenVertexArraysAPPLE fp_glGenVertexArraysAPPLE; pfn_glIsVertexArrayAPPLE fp_glIsVertexArrayAPPLE; pfn_glVertexArrayRangeAPPLE fp_glVertexArrayRangeAPPLE; pfn_glFlushVertexArrayRangeAPPLE fp_glFlushVertexArrayRangeAPPLE; pfn_glVertexArrayParameteriAPPLE fp_glVertexArrayParameteriAPPLE; pfn_glEnableVertexAttribAPPLE fp_glEnableVertexAttribAPPLE; pfn_glDisableVertexAttribAPPLE fp_glDisableVertexAttribAPPLE; pfn_glIsVertexAttribEnabledAPPLE fp_glIsVertexAttribEnabledAPPLE; pfn_glMapVertexAttrib1dAPPLE fp_glMapVertexAttrib1dAPPLE; pfn_glMapVertexAttrib1fAPPLE fp_glMapVertexAttrib1fAPPLE; pfn_glMapVertexAttrib2dAPPLE fp_glMapVertexAttrib2dAPPLE; pfn_glMapVertexAttrib2fAPPLE fp_glMapVertexAttrib2fAPPLE; pfn_glFrameTerminatorGREMEDY fp_glFrameTerminatorGREMEDY; pfn_glStringMarkerGREMEDY fp_glStringMarkerGREMEDY; pfn_glRenderbufferStorageMultisampleIMG fp_glRenderbufferStorageMultisampleIMG; pfn_glFramebufferTexture2DMultisampleIMG fp_glFramebufferTexture2DMultisampleIMG; pfn_glBlendFuncSeparateINGR fp_glBlendFuncSeparateINGR; pfn_glApplyFramebufferAttachmentCMAAINTEL fp_glApplyFramebufferAttachmentCMAAINTEL; pfn_glSyncTextureINTEL fp_glSyncTextureINTEL; pfn_glUnmapTexture2DINTEL fp_glUnmapTexture2DINTEL; pfn_glMapTexture2DINTEL fp_glMapTexture2DINTEL; pfn_glBeginPerfQueryINTEL fp_glBeginPerfQueryINTEL; pfn_glCreatePerfQueryINTEL fp_glCreatePerfQueryINTEL; pfn_glDeletePerfQueryINTEL fp_glDeletePerfQueryINTEL; pfn_glEndPerfQueryINTEL fp_glEndPerfQueryINTEL; pfn_glGetFirstPerfQueryIdINTEL fp_glGetFirstPerfQueryIdINTEL; pfn_glGetNextPerfQueryIdINTEL fp_glGetNextPerfQueryIdINTEL; pfn_glGetPerfCounterInfoINTEL fp_glGetPerfCounterInfoINTEL; pfn_glGetPerfQueryDataINTEL fp_glGetPerfQueryDataINTEL; pfn_glGetPerfQueryIdByNameINTEL fp_glGetPerfQueryIdByNameINTEL; pfn_glGetPerfQueryInfoINTEL fp_glGetPerfQueryInfoINTEL; pfn_glMultiDrawArraysIndirectBindlessNV fp_glMultiDrawArraysIndirectBindlessNV; pfn_glMultiDrawElementsIndirectBindlessNV fp_glMultiDrawElementsIndirectBindlessNV; pfn_glMultiDrawArraysIndirectBindlessCountNV fp_glMultiDrawArraysIndirectBindlessCountNV; pfn_glMultiDrawElementsIndirectBindlessCountNV fp_glMultiDrawElementsIndirectBindlessCountNV; pfn_glGetTextureHandleNV fp_glGetTextureHandleNV; pfn_glGetTextureSamplerHandleNV fp_glGetTextureSamplerHandleNV; pfn_glMakeTextureHandleResidentNV fp_glMakeTextureHandleResidentNV; pfn_glMakeTextureHandleNonResidentNV fp_glMakeTextureHandleNonResidentNV; pfn_glGetImageHandleNV fp_glGetImageHandleNV; pfn_glMakeImageHandleResidentNV fp_glMakeImageHandleResidentNV; pfn_glMakeImageHandleNonResidentNV fp_glMakeImageHandleNonResidentNV; pfn_glUniformHandleui64NV fp_glUniformHandleui64NV; pfn_glUniformHandleui64vNV fp_glUniformHandleui64vNV; pfn_glProgramUniformHandleui64NV fp_glProgramUniformHandleui64NV; pfn_glProgramUniformHandleui64vNV fp_glProgramUniformHandleui64vNV; pfn_glIsTextureHandleResidentNV fp_glIsTextureHandleResidentNV; pfn_glIsImageHandleResidentNV fp_glIsImageHandleResidentNV; pfn_glBlendParameteriNV fp_glBlendParameteriNV; pfn_glBlendBarrierNV fp_glBlendBarrierNV; pfn_glCreateStatesNV fp_glCreateStatesNV; pfn_glDeleteStatesNV fp_glDeleteStatesNV; pfn_glIsStateNV fp_glIsStateNV; pfn_glStateCaptureNV fp_glStateCaptureNV; pfn_glGetCommandHeaderNV fp_glGetCommandHeaderNV; pfn_glGetStageIndexNV fp_glGetStageIndexNV; pfn_glDrawCommandsNV fp_glDrawCommandsNV; pfn_glDrawCommandsAddressNV fp_glDrawCommandsAddressNV; pfn_glDrawCommandsStatesNV fp_glDrawCommandsStatesNV; pfn_glDrawCommandsStatesAddressNV fp_glDrawCommandsStatesAddressNV; pfn_glCreateCommandListsNV fp_glCreateCommandListsNV; pfn_glDeleteCommandListsNV fp_glDeleteCommandListsNV; pfn_glIsCommandListNV fp_glIsCommandListNV; pfn_glListDrawCommandsStatesClientNV fp_glListDrawCommandsStatesClientNV; pfn_glCommandListSegmentsNV fp_glCommandListSegmentsNV; pfn_glCompileCommandListNV fp_glCompileCommandListNV; pfn_glCallCommandListNV fp_glCallCommandListNV; pfn_glBeginConditionalRenderNV fp_glBeginConditionalRenderNV; pfn_glEndConditionalRenderNV fp_glEndConditionalRenderNV; pfn_glSubpixelPrecisionBiasNV fp_glSubpixelPrecisionBiasNV; pfn_glConservativeRasterParameterfNV fp_glConservativeRasterParameterfNV; pfn_glCopyBufferSubDataNV fp_glCopyBufferSubDataNV; pfn_glCopyImageSubDataNV fp_glCopyImageSubDataNV; pfn_glCoverageMaskNV fp_glCoverageMaskNV; pfn_glCoverageOperationNV fp_glCoverageOperationNV; pfn_glDepthRangedNV fp_glDepthRangedNV; pfn_glClearDepthdNV fp_glClearDepthdNV; pfn_glDepthBoundsdNV fp_glDepthBoundsdNV; pfn_glDrawBuffersNV fp_glDrawBuffersNV; pfn_glDrawArraysInstancedNV fp_glDrawArraysInstancedNV; pfn_glDrawElementsInstancedNV fp_glDrawElementsInstancedNV; pfn_glDrawTextureNV fp_glDrawTextureNV; pfn_glGetMultisamplefvNV fp_glGetMultisamplefvNV; pfn_glSampleMaskIndexedNV fp_glSampleMaskIndexedNV; pfn_glTexRenderbufferNV fp_glTexRenderbufferNV; pfn_glDeleteFencesNV fp_glDeleteFencesNV; pfn_glGenFencesNV fp_glGenFencesNV; pfn_glIsFenceNV fp_glIsFenceNV; pfn_glTestFenceNV fp_glTestFenceNV; pfn_glGetFenceivNV fp_glGetFenceivNV; pfn_glFinishFenceNV fp_glFinishFenceNV; pfn_glSetFenceNV fp_glSetFenceNV; pfn_glFragmentCoverageColorNV fp_glFragmentCoverageColorNV; pfn_glBlitFramebufferNV fp_glBlitFramebufferNV; pfn_glCoverageModulationTableNV fp_glCoverageModulationTableNV; pfn_glGetCoverageModulationTableNV fp_glGetCoverageModulationTableNV; pfn_glCoverageModulationNV fp_glCoverageModulationNV; pfn_glRenderbufferStorageMultisampleNV fp_glRenderbufferStorageMultisampleNV; pfn_glRenderbufferStorageMultisampleCoverageNV fp_glRenderbufferStorageMultisampleCoverageNV; pfn_glProgramVertexLimitNV fp_glProgramVertexLimitNV; pfn_glFramebufferTextureFaceEXT fp_glFramebufferTextureFaceEXT; pfn_glProgramLocalParameterI4iNV fp_glProgramLocalParameterI4iNV; pfn_glProgramLocalParameterI4ivNV fp_glProgramLocalParameterI4ivNV; pfn_glProgramLocalParametersI4ivNV fp_glProgramLocalParametersI4ivNV; pfn_glProgramLocalParameterI4uiNV fp_glProgramLocalParameterI4uiNV; pfn_glProgramLocalParameterI4uivNV fp_glProgramLocalParameterI4uivNV; pfn_glProgramLocalParametersI4uivNV fp_glProgramLocalParametersI4uivNV; pfn_glProgramEnvParameterI4iNV fp_glProgramEnvParameterI4iNV; pfn_glProgramEnvParameterI4ivNV fp_glProgramEnvParameterI4ivNV; pfn_glProgramEnvParametersI4ivNV fp_glProgramEnvParametersI4ivNV; pfn_glProgramEnvParameterI4uiNV fp_glProgramEnvParameterI4uiNV; pfn_glProgramEnvParameterI4uivNV fp_glProgramEnvParameterI4uivNV; pfn_glProgramEnvParametersI4uivNV fp_glProgramEnvParametersI4uivNV; pfn_glGetProgramLocalParameterIivNV fp_glGetProgramLocalParameterIivNV; pfn_glGetProgramLocalParameterIuivNV fp_glGetProgramLocalParameterIuivNV; pfn_glGetProgramEnvParameterIivNV fp_glGetProgramEnvParameterIivNV; pfn_glGetProgramEnvParameterIuivNV fp_glGetProgramEnvParameterIuivNV; pfn_glProgramSubroutineParametersuivNV fp_glProgramSubroutineParametersuivNV; pfn_glGetProgramSubroutineParameteruivNV fp_glGetProgramSubroutineParameteruivNV; pfn_glVertex2hNV fp_glVertex2hNV; pfn_glVertex2hvNV fp_glVertex2hvNV; pfn_glVertex3hNV fp_glVertex3hNV; pfn_glVertex3hvNV fp_glVertex3hvNV; pfn_glVertex4hNV fp_glVertex4hNV; pfn_glVertex4hvNV fp_glVertex4hvNV; pfn_glNormal3hNV fp_glNormal3hNV; pfn_glNormal3hvNV fp_glNormal3hvNV; pfn_glColor3hNV fp_glColor3hNV; pfn_glColor3hvNV fp_glColor3hvNV; pfn_glColor4hNV fp_glColor4hNV; pfn_glColor4hvNV fp_glColor4hvNV; pfn_glTexCoord1hNV fp_glTexCoord1hNV; pfn_glTexCoord1hvNV fp_glTexCoord1hvNV; pfn_glTexCoord2hNV fp_glTexCoord2hNV; pfn_glTexCoord2hvNV fp_glTexCoord2hvNV; pfn_glTexCoord3hNV fp_glTexCoord3hNV; pfn_glTexCoord3hvNV fp_glTexCoord3hvNV; pfn_glTexCoord4hNV fp_glTexCoord4hNV; pfn_glTexCoord4hvNV fp_glTexCoord4hvNV; pfn_glMultiTexCoord1hNV fp_glMultiTexCoord1hNV; pfn_glMultiTexCoord1hvNV fp_glMultiTexCoord1hvNV; pfn_glMultiTexCoord2hNV fp_glMultiTexCoord2hNV; pfn_glMultiTexCoord2hvNV fp_glMultiTexCoord2hvNV; pfn_glMultiTexCoord3hNV fp_glMultiTexCoord3hNV; pfn_glMultiTexCoord3hvNV fp_glMultiTexCoord3hvNV; pfn_glMultiTexCoord4hNV fp_glMultiTexCoord4hNV; pfn_glMultiTexCoord4hvNV fp_glMultiTexCoord4hvNV; pfn_glFogCoordhNV fp_glFogCoordhNV; pfn_glFogCoordhvNV fp_glFogCoordhvNV; pfn_glSecondaryColor3hNV fp_glSecondaryColor3hNV; pfn_glSecondaryColor3hvNV fp_glSecondaryColor3hvNV; pfn_glVertexWeighthNV fp_glVertexWeighthNV; pfn_glVertexWeighthvNV fp_glVertexWeighthvNV; pfn_glVertexAttrib1hNV fp_glVertexAttrib1hNV; pfn_glVertexAttrib1hvNV fp_glVertexAttrib1hvNV; pfn_glVertexAttrib2hNV fp_glVertexAttrib2hNV; pfn_glVertexAttrib2hvNV fp_glVertexAttrib2hvNV; pfn_glVertexAttrib3hNV fp_glVertexAttrib3hNV; pfn_glVertexAttrib3hvNV fp_glVertexAttrib3hvNV; pfn_glVertexAttrib4hNV fp_glVertexAttrib4hNV; pfn_glVertexAttrib4hvNV fp_glVertexAttrib4hvNV; pfn_glVertexAttribs1hvNV fp_glVertexAttribs1hvNV; pfn_glVertexAttribs2hvNV fp_glVertexAttribs2hvNV; pfn_glVertexAttribs3hvNV fp_glVertexAttribs3hvNV; pfn_glVertexAttribs4hvNV fp_glVertexAttribs4hvNV; pfn_glVertexAttribDivisorNV fp_glVertexAttribDivisorNV; pfn_glGetInternalformatSampleivNV fp_glGetInternalformatSampleivNV; pfn_glUniformMatrix2x3fvNV fp_glUniformMatrix2x3fvNV; pfn_glUniformMatrix3x2fvNV fp_glUniformMatrix3x2fvNV; pfn_glUniformMatrix2x4fvNV fp_glUniformMatrix2x4fvNV; pfn_glUniformMatrix4x2fvNV fp_glUniformMatrix4x2fvNV; pfn_glUniformMatrix3x4fvNV fp_glUniformMatrix3x4fvNV; pfn_glUniformMatrix4x3fvNV fp_glUniformMatrix4x3fvNV; pfn_glGenOcclusionQueriesNV fp_glGenOcclusionQueriesNV; pfn_glDeleteOcclusionQueriesNV fp_glDeleteOcclusionQueriesNV; pfn_glIsOcclusionQueryNV fp_glIsOcclusionQueryNV; pfn_glBeginOcclusionQueryNV fp_glBeginOcclusionQueryNV; pfn_glEndOcclusionQueryNV fp_glEndOcclusionQueryNV; pfn_glGetOcclusionQueryivNV fp_glGetOcclusionQueryivNV; pfn_glGetOcclusionQueryuivNV fp_glGetOcclusionQueryuivNV; pfn_glProgramBufferParametersfvNV fp_glProgramBufferParametersfvNV; pfn_glProgramBufferParametersIivNV fp_glProgramBufferParametersIivNV; pfn_glProgramBufferParametersIuivNV fp_glProgramBufferParametersIuivNV; pfn_glGenPathsNV fp_glGenPathsNV; pfn_glDeletePathsNV fp_glDeletePathsNV; pfn_glIsPathNV fp_glIsPathNV; pfn_glPathCommandsNV fp_glPathCommandsNV; pfn_glPathCoordsNV fp_glPathCoordsNV; pfn_glPathSubCommandsNV fp_glPathSubCommandsNV; pfn_glPathSubCoordsNV fp_glPathSubCoordsNV; pfn_glPathStringNV fp_glPathStringNV; pfn_glPathGlyphsNV fp_glPathGlyphsNV; pfn_glPathGlyphRangeNV fp_glPathGlyphRangeNV; pfn_glWeightPathsNV fp_glWeightPathsNV; pfn_glCopyPathNV fp_glCopyPathNV; pfn_glInterpolatePathsNV fp_glInterpolatePathsNV; pfn_glTransformPathNV fp_glTransformPathNV; pfn_glPathParameterivNV fp_glPathParameterivNV; pfn_glPathParameteriNV fp_glPathParameteriNV; pfn_glPathParameterfvNV fp_glPathParameterfvNV; pfn_glPathParameterfNV fp_glPathParameterfNV; pfn_glPathDashArrayNV fp_glPathDashArrayNV; pfn_glPathStencilFuncNV fp_glPathStencilFuncNV; pfn_glPathStencilDepthOffsetNV fp_glPathStencilDepthOffsetNV; pfn_glStencilFillPathNV fp_glStencilFillPathNV; pfn_glStencilStrokePathNV fp_glStencilStrokePathNV; pfn_glStencilFillPathInstancedNV fp_glStencilFillPathInstancedNV; pfn_glStencilStrokePathInstancedNV fp_glStencilStrokePathInstancedNV; pfn_glPathCoverDepthFuncNV fp_glPathCoverDepthFuncNV; pfn_glCoverFillPathNV fp_glCoverFillPathNV; pfn_glCoverStrokePathNV fp_glCoverStrokePathNV; pfn_glCoverFillPathInstancedNV fp_glCoverFillPathInstancedNV; pfn_glCoverStrokePathInstancedNV fp_glCoverStrokePathInstancedNV; pfn_glGetPathParameterivNV fp_glGetPathParameterivNV; pfn_glGetPathParameterfvNV fp_glGetPathParameterfvNV; pfn_glGetPathCommandsNV fp_glGetPathCommandsNV; pfn_glGetPathCoordsNV fp_glGetPathCoordsNV; pfn_glGetPathDashArrayNV fp_glGetPathDashArrayNV; pfn_glGetPathMetricsNV fp_glGetPathMetricsNV; pfn_glGetPathMetricRangeNV fp_glGetPathMetricRangeNV; pfn_glGetPathSpacingNV fp_glGetPathSpacingNV; pfn_glIsPointInFillPathNV fp_glIsPointInFillPathNV; pfn_glIsPointInStrokePathNV fp_glIsPointInStrokePathNV; pfn_glGetPathLengthNV fp_glGetPathLengthNV; pfn_glPointAlongPathNV fp_glPointAlongPathNV; pfn_glMatrixLoad3x2fNV fp_glMatrixLoad3x2fNV; pfn_glMatrixLoad3x3fNV fp_glMatrixLoad3x3fNV; pfn_glMatrixLoadTranspose3x3fNV fp_glMatrixLoadTranspose3x3fNV; pfn_glMatrixMult3x2fNV fp_glMatrixMult3x2fNV; pfn_glMatrixMult3x3fNV fp_glMatrixMult3x3fNV; pfn_glMatrixMultTranspose3x3fNV fp_glMatrixMultTranspose3x3fNV; pfn_glStencilThenCoverFillPathNV fp_glStencilThenCoverFillPathNV; pfn_glStencilThenCoverStrokePathNV fp_glStencilThenCoverStrokePathNV; pfn_glStencilThenCoverFillPathInstancedNV fp_glStencilThenCoverFillPathInstancedNV; pfn_glStencilThenCoverStrokePathInstancedNV fp_glStencilThenCoverStrokePathInstancedNV; pfn_glPathGlyphIndexRangeNV fp_glPathGlyphIndexRangeNV; pfn_glPathGlyphIndexArrayNV fp_glPathGlyphIndexArrayNV; pfn_glPathMemoryGlyphIndexArrayNV fp_glPathMemoryGlyphIndexArrayNV; pfn_glProgramPathFragmentInputGenNV fp_glProgramPathFragmentInputGenNV; pfn_glGetProgramResourcefvNV fp_glGetProgramResourcefvNV; pfn_glPathColorGenNV fp_glPathColorGenNV; pfn_glPathTexGenNV fp_glPathTexGenNV; pfn_glPathFogGenNV fp_glPathFogGenNV; pfn_glGetPathColorGenivNV fp_glGetPathColorGenivNV; pfn_glGetPathColorGenfvNV fp_glGetPathColorGenfvNV; pfn_glGetPathTexGenivNV fp_glGetPathTexGenivNV; pfn_glGetPathTexGenfvNV fp_glGetPathTexGenfvNV; pfn_glPolygonModeNV fp_glPolygonModeNV; pfn_glPresentFrameKeyedNV fp_glPresentFrameKeyedNV; pfn_glPresentFrameDualFillNV fp_glPresentFrameDualFillNV; pfn_glGetVideoivNV fp_glGetVideoivNV; pfn_glGetVideouivNV fp_glGetVideouivNV; pfn_glGetVideoi64vNV fp_glGetVideoi64vNV; pfn_glGetVideoui64vNV fp_glGetVideoui64vNV; pfn_glPrimitiveRestartNV fp_glPrimitiveRestartNV; pfn_glPrimitiveRestartIndexNV fp_glPrimitiveRestartIndexNV; pfn_glReadBufferNV fp_glReadBufferNV; pfn_glFramebufferSampleLocationsfvNV fp_glFramebufferSampleLocationsfvNV; pfn_glNamedFramebufferSampleLocationsfvNV fp_glNamedFramebufferSampleLocationsfvNV; pfn_glResolveDepthValuesNV fp_glResolveDepthValuesNV; pfn_glMakeBufferResidentNV fp_glMakeBufferResidentNV; pfn_glMakeBufferNonResidentNV fp_glMakeBufferNonResidentNV; pfn_glIsBufferResidentNV fp_glIsBufferResidentNV; pfn_glMakeNamedBufferResidentNV fp_glMakeNamedBufferResidentNV; pfn_glMakeNamedBufferNonResidentNV fp_glMakeNamedBufferNonResidentNV; pfn_glIsNamedBufferResidentNV fp_glIsNamedBufferResidentNV; pfn_glGetBufferParameterui64vNV fp_glGetBufferParameterui64vNV; pfn_glGetNamedBufferParameterui64vNV fp_glGetNamedBufferParameterui64vNV; pfn_glGetIntegerui64vNV fp_glGetIntegerui64vNV; pfn_glUniformui64NV fp_glUniformui64NV; pfn_glUniformui64vNV fp_glUniformui64vNV; pfn_glProgramUniformui64NV fp_glProgramUniformui64NV; pfn_glProgramUniformui64vNV fp_glProgramUniformui64vNV; pfn_glTextureBarrierNV fp_glTextureBarrierNV; pfn_glTexImage2DMultisampleCoverageNV fp_glTexImage2DMultisampleCoverageNV; pfn_glTexImage3DMultisampleCoverageNV fp_glTexImage3DMultisampleCoverageNV; pfn_glTextureImage2DMultisampleNV fp_glTextureImage2DMultisampleNV; pfn_glTextureImage3DMultisampleNV fp_glTextureImage3DMultisampleNV; pfn_glTextureImage2DMultisampleCoverageNV fp_glTextureImage2DMultisampleCoverageNV; pfn_glTextureImage3DMultisampleCoverageNV fp_glTextureImage3DMultisampleCoverageNV; pfn_glBeginTransformFeedbackNV fp_glBeginTransformFeedbackNV; pfn_glEndTransformFeedbackNV fp_glEndTransformFeedbackNV; pfn_glTransformFeedbackAttribsNV fp_glTransformFeedbackAttribsNV; pfn_glBindBufferRangeNV fp_glBindBufferRangeNV; pfn_glBindBufferOffsetNV fp_glBindBufferOffsetNV; pfn_glBindBufferBaseNV fp_glBindBufferBaseNV; pfn_glTransformFeedbackVaryingsNV fp_glTransformFeedbackVaryingsNV; pfn_glActiveVaryingNV fp_glActiveVaryingNV; pfn_glGetVaryingLocationNV fp_glGetVaryingLocationNV; pfn_glGetActiveVaryingNV fp_glGetActiveVaryingNV; pfn_glGetTransformFeedbackVaryingNV fp_glGetTransformFeedbackVaryingNV; pfn_glTransformFeedbackStreamAttribsNV fp_glTransformFeedbackStreamAttribsNV; pfn_glBindTransformFeedbackNV fp_glBindTransformFeedbackNV; pfn_glDeleteTransformFeedbacksNV fp_glDeleteTransformFeedbacksNV; pfn_glGenTransformFeedbacksNV fp_glGenTransformFeedbacksNV; pfn_glIsTransformFeedbackNV fp_glIsTransformFeedbackNV; pfn_glPauseTransformFeedbackNV fp_glPauseTransformFeedbackNV; pfn_glResumeTransformFeedbackNV fp_glResumeTransformFeedbackNV; pfn_glDrawTransformFeedbackNV fp_glDrawTransformFeedbackNV; pfn_glVDPAUInitNV fp_glVDPAUInitNV; pfn_glVDPAUFiniNV fp_glVDPAUFiniNV; pfn_glVDPAURegisterVideoSurfaceNV fp_glVDPAURegisterVideoSurfaceNV; pfn_glVDPAURegisterOutputSurfaceNV fp_glVDPAURegisterOutputSurfaceNV; pfn_glVDPAUIsSurfaceNV fp_glVDPAUIsSurfaceNV; pfn_glVDPAUUnregisterSurfaceNV fp_glVDPAUUnregisterSurfaceNV; pfn_glVDPAUGetSurfaceivNV fp_glVDPAUGetSurfaceivNV; pfn_glVDPAUSurfaceAccessNV fp_glVDPAUSurfaceAccessNV; pfn_glVDPAUMapSurfacesNV fp_glVDPAUMapSurfacesNV; pfn_glVDPAUUnmapSurfacesNV fp_glVDPAUUnmapSurfacesNV; pfn_glVertexAttribL1i64NV fp_glVertexAttribL1i64NV; pfn_glVertexAttribL2i64NV fp_glVertexAttribL2i64NV; pfn_glVertexAttribL3i64NV fp_glVertexAttribL3i64NV; pfn_glVertexAttribL4i64NV fp_glVertexAttribL4i64NV; pfn_glVertexAttribL1i64vNV fp_glVertexAttribL1i64vNV; pfn_glVertexAttribL2i64vNV fp_glVertexAttribL2i64vNV; pfn_glVertexAttribL3i64vNV fp_glVertexAttribL3i64vNV; pfn_glVertexAttribL4i64vNV fp_glVertexAttribL4i64vNV; pfn_glVertexAttribL1ui64NV fp_glVertexAttribL1ui64NV; pfn_glVertexAttribL2ui64NV fp_glVertexAttribL2ui64NV; pfn_glVertexAttribL3ui64NV fp_glVertexAttribL3ui64NV; pfn_glVertexAttribL4ui64NV fp_glVertexAttribL4ui64NV; pfn_glVertexAttribL1ui64vNV fp_glVertexAttribL1ui64vNV; pfn_glVertexAttribL2ui64vNV fp_glVertexAttribL2ui64vNV; pfn_glVertexAttribL3ui64vNV fp_glVertexAttribL3ui64vNV; pfn_glVertexAttribL4ui64vNV fp_glVertexAttribL4ui64vNV; pfn_glGetVertexAttribLi64vNV fp_glGetVertexAttribLi64vNV; pfn_glGetVertexAttribLui64vNV fp_glGetVertexAttribLui64vNV; pfn_glVertexAttribLFormatNV fp_glVertexAttribLFormatNV; pfn_glBufferAddressRangeNV fp_glBufferAddressRangeNV; pfn_glVertexFormatNV fp_glVertexFormatNV; pfn_glNormalFormatNV fp_glNormalFormatNV; pfn_glColorFormatNV fp_glColorFormatNV; pfn_glIndexFormatNV fp_glIndexFormatNV; pfn_glTexCoordFormatNV fp_glTexCoordFormatNV; pfn_glEdgeFlagFormatNV fp_glEdgeFlagFormatNV; pfn_glSecondaryColorFormatNV fp_glSecondaryColorFormatNV; pfn_glFogCoordFormatNV fp_glFogCoordFormatNV; pfn_glVertexAttribFormatNV fp_glVertexAttribFormatNV; pfn_glVertexAttribIFormatNV fp_glVertexAttribIFormatNV; pfn_glGetIntegerui64i_vNV fp_glGetIntegerui64i_vNV; pfn_glVertexAttribI1iEXT fp_glVertexAttribI1iEXT; pfn_glVertexAttribI2iEXT fp_glVertexAttribI2iEXT; pfn_glVertexAttribI3iEXT fp_glVertexAttribI3iEXT; pfn_glVertexAttribI4iEXT fp_glVertexAttribI4iEXT; pfn_glVertexAttribI1uiEXT fp_glVertexAttribI1uiEXT; pfn_glVertexAttribI2uiEXT fp_glVertexAttribI2uiEXT; pfn_glVertexAttribI3uiEXT fp_glVertexAttribI3uiEXT; pfn_glVertexAttribI4uiEXT fp_glVertexAttribI4uiEXT; pfn_glVertexAttribI1ivEXT fp_glVertexAttribI1ivEXT; pfn_glVertexAttribI2ivEXT fp_glVertexAttribI2ivEXT; pfn_glVertexAttribI3ivEXT fp_glVertexAttribI3ivEXT; pfn_glVertexAttribI4ivEXT fp_glVertexAttribI4ivEXT; pfn_glVertexAttribI1uivEXT fp_glVertexAttribI1uivEXT; pfn_glVertexAttribI2uivEXT fp_glVertexAttribI2uivEXT; pfn_glVertexAttribI3uivEXT fp_glVertexAttribI3uivEXT; pfn_glVertexAttribI4uivEXT fp_glVertexAttribI4uivEXT; pfn_glVertexAttribI4bvEXT fp_glVertexAttribI4bvEXT; pfn_glVertexAttribI4svEXT fp_glVertexAttribI4svEXT; pfn_glVertexAttribI4ubvEXT fp_glVertexAttribI4ubvEXT; pfn_glVertexAttribI4usvEXT fp_glVertexAttribI4usvEXT; pfn_glVertexAttribIPointerEXT fp_glVertexAttribIPointerEXT; pfn_glGetVertexAttribIivEXT fp_glGetVertexAttribIivEXT; pfn_glGetVertexAttribIuivEXT fp_glGetVertexAttribIuivEXT; pfn_glBeginVideoCaptureNV fp_glBeginVideoCaptureNV; pfn_glBindVideoCaptureStreamBufferNV fp_glBindVideoCaptureStreamBufferNV; pfn_glBindVideoCaptureStreamTextureNV fp_glBindVideoCaptureStreamTextureNV; pfn_glEndVideoCaptureNV fp_glEndVideoCaptureNV; pfn_glGetVideoCaptureivNV fp_glGetVideoCaptureivNV; pfn_glGetVideoCaptureStreamivNV fp_glGetVideoCaptureStreamivNV; pfn_glGetVideoCaptureStreamfvNV fp_glGetVideoCaptureStreamfvNV; pfn_glGetVideoCaptureStreamdvNV fp_glGetVideoCaptureStreamdvNV; pfn_glVideoCaptureNV fp_glVideoCaptureNV; pfn_glVideoCaptureStreamParameterivNV fp_glVideoCaptureStreamParameterivNV; pfn_glVideoCaptureStreamParameterfvNV fp_glVideoCaptureStreamParameterfvNV; pfn_glVideoCaptureStreamParameterdvNV fp_glVideoCaptureStreamParameterdvNV; pfn_glViewportArrayvNV fp_glViewportArrayvNV; pfn_glViewportIndexedfNV fp_glViewportIndexedfNV; pfn_glViewportIndexedfvNV fp_glViewportIndexedfvNV; pfn_glScissorArrayvNV fp_glScissorArrayvNV; pfn_glScissorIndexedNV fp_glScissorIndexedNV; pfn_glScissorIndexedvNV fp_glScissorIndexedvNV; pfn_glDepthRangeArrayfvNV fp_glDepthRangeArrayfvNV; pfn_glDepthRangeIndexedfNV fp_glDepthRangeIndexedfNV; pfn_glGetFloati_vNV fp_glGetFloati_vNV; pfn_glEnableiNV fp_glEnableiNV; pfn_glDisableiNV fp_glDisableiNV; pfn_glIsEnablediNV fp_glIsEnablediNV; pfn_glBeginConditionalRenderNVX fp_glBeginConditionalRenderNVX; pfn_glEndConditionalRenderNVX fp_glEndConditionalRenderNVX; pfn_glFramebufferTextureMultiviewOVR fp_glFramebufferTextureMultiviewOVR; pfn_glFramebufferTextureMultisampleMultiviewOVR fp_glFramebufferTextureMultisampleMultiviewOVR; pfn_glAlphaFuncQCOM fp_glAlphaFuncQCOM; pfn_glGetDriverControlsQCOM fp_glGetDriverControlsQCOM; pfn_glGetDriverControlStringQCOM fp_glGetDriverControlStringQCOM; pfn_glEnableDriverControlQCOM fp_glEnableDriverControlQCOM; pfn_glDisableDriverControlQCOM fp_glDisableDriverControlQCOM; pfn_glExtGetTexturesQCOM fp_glExtGetTexturesQCOM; pfn_glExtGetBuffersQCOM fp_glExtGetBuffersQCOM; pfn_glExtGetRenderbuffersQCOM fp_glExtGetRenderbuffersQCOM; pfn_glExtGetFramebuffersQCOM fp_glExtGetFramebuffersQCOM; pfn_glExtGetTexLevelParameterivQCOM fp_glExtGetTexLevelParameterivQCOM; pfn_glExtTexObjectStateOverrideiQCOM fp_glExtTexObjectStateOverrideiQCOM; pfn_glExtGetTexSubImageQCOM fp_glExtGetTexSubImageQCOM; pfn_glExtGetBufferPointervQCOM fp_glExtGetBufferPointervQCOM; pfn_glExtGetShadersQCOM fp_glExtGetShadersQCOM; pfn_glExtGetProgramsQCOM fp_glExtGetProgramsQCOM; pfn_glExtIsProgramBinaryQCOM fp_glExtIsProgramBinaryQCOM; pfn_glExtGetProgramBinarySourceQCOM fp_glExtGetProgramBinarySourceQCOM; pfn_glStartTilingQCOM fp_glStartTilingQCOM; pfn_glEndTilingQCOM fp_glEndTilingQCOM; GLboolean GLAD_VERSION_1_0 = GL_FALSE; static void load_GL_VERSION_1_0(LOADER load) { if(!GLAD_VERSION_1_0) return; fp_glCullFace = (pfn_glCullFace)load("glCullFace"); fp_glFrontFace = (pfn_glFrontFace)load("glFrontFace"); fp_glHint = (pfn_glHint)load("glHint"); fp_glLineWidth = (pfn_glLineWidth)load("glLineWidth"); fp_glPointSize = (pfn_glPointSize)load("glPointSize"); fp_glPolygonMode = (pfn_glPolygonMode)load("glPolygonMode"); fp_glScissor = (pfn_glScissor)load("glScissor"); fp_glTexParameterf = (pfn_glTexParameterf)load("glTexParameterf"); fp_glTexParameterfv = (pfn_glTexParameterfv)load("glTexParameterfv"); fp_glTexParameteri = (pfn_glTexParameteri)load("glTexParameteri"); fp_glTexParameteriv = (pfn_glTexParameteriv)load("glTexParameteriv"); fp_glTexImage1D = (pfn_glTexImage1D)load("glTexImage1D"); fp_glTexImage2D = (pfn_glTexImage2D)load("glTexImage2D"); fp_glDrawBuffer = (pfn_glDrawBuffer)load("glDrawBuffer"); fp_glClear = (pfn_glClear)load("glClear"); fp_glClearColor = (pfn_glClearColor)load("glClearColor"); fp_glClearStencil = (pfn_glClearStencil)load("glClearStencil"); fp_glClearDepth = (pfn_glClearDepth)load("glClearDepth"); fp_glStencilMask = (pfn_glStencilMask)load("glStencilMask"); fp_glColorMask = (pfn_glColorMask)load("glColorMask"); fp_glDepthMask = (pfn_glDepthMask)load("glDepthMask"); fp_glDisable = (pfn_glDisable)load("glDisable"); fp_glEnable = (pfn_glEnable)load("glEnable"); fp_glFinish = (pfn_glFinish)load("glFinish"); fp_glFlush = (pfn_glFlush)load("glFlush"); fp_glBlendFunc = (pfn_glBlendFunc)load("glBlendFunc"); fp_glLogicOp = (pfn_glLogicOp)load("glLogicOp"); fp_glStencilFunc = (pfn_glStencilFunc)load("glStencilFunc"); fp_glStencilOp = (pfn_glStencilOp)load("glStencilOp"); fp_glDepthFunc = (pfn_glDepthFunc)load("glDepthFunc"); fp_glPixelStoref = (pfn_glPixelStoref)load("glPixelStoref"); fp_glPixelStorei = (pfn_glPixelStorei)load("glPixelStorei"); fp_glReadBuffer = (pfn_glReadBuffer)load("glReadBuffer"); fp_glReadPixels = (pfn_glReadPixels)load("glReadPixels"); fp_glGetBooleanv = (pfn_glGetBooleanv)load("glGetBooleanv"); fp_glGetDoublev = (pfn_glGetDoublev)load("glGetDoublev"); fp_glGetError = (pfn_glGetError)load("glGetError"); fp_glGetFloatv = (pfn_glGetFloatv)load("glGetFloatv"); fp_glGetIntegerv = (pfn_glGetIntegerv)load("glGetIntegerv"); fp_glGetString = (pfn_glGetString)load("glGetString"); fp_glGetTexImage = (pfn_glGetTexImage)load("glGetTexImage"); fp_glGetTexParameterfv = (pfn_glGetTexParameterfv)load("glGetTexParameterfv"); fp_glGetTexParameteriv = (pfn_glGetTexParameteriv)load("glGetTexParameteriv"); fp_glGetTexLevelParameterfv = (pfn_glGetTexLevelParameterfv)load("glGetTexLevelParameterfv"); fp_glGetTexLevelParameteriv = (pfn_glGetTexLevelParameteriv)load("glGetTexLevelParameteriv"); fp_glIsEnabled = (pfn_glIsEnabled)load("glIsEnabled"); fp_glDepthRange = (pfn_glDepthRange)load("glDepthRange"); fp_glViewport = (pfn_glViewport)load("glViewport"); fp_glNewList = (pfn_glNewList)load("glNewList"); fp_glEndList = (pfn_glEndList)load("glEndList"); fp_glCallList = (pfn_glCallList)load("glCallList"); fp_glCallLists = (pfn_glCallLists)load("glCallLists"); fp_glDeleteLists = (pfn_glDeleteLists)load("glDeleteLists"); fp_glGenLists = (pfn_glGenLists)load("glGenLists"); fp_glListBase = (pfn_glListBase)load("glListBase"); fp_glBegin = (pfn_glBegin)load("glBegin"); fp_glBitmap = (pfn_glBitmap)load("glBitmap"); fp_glColor3b = (pfn_glColor3b)load("glColor3b"); fp_glColor3bv = (pfn_glColor3bv)load("glColor3bv"); fp_glColor3d = (pfn_glColor3d)load("glColor3d"); fp_glColor3dv = (pfn_glColor3dv)load("glColor3dv"); fp_glColor3f = (pfn_glColor3f)load("glColor3f"); fp_glColor3fv = (pfn_glColor3fv)load("glColor3fv"); fp_glColor3i = (pfn_glColor3i)load("glColor3i"); fp_glColor3iv = (pfn_glColor3iv)load("glColor3iv"); fp_glColor3s = (pfn_glColor3s)load("glColor3s"); fp_glColor3sv = (pfn_glColor3sv)load("glColor3sv"); fp_glColor3ub = (pfn_glColor3ub)load("glColor3ub"); fp_glColor3ubv = (pfn_glColor3ubv)load("glColor3ubv"); fp_glColor3ui = (pfn_glColor3ui)load("glColor3ui"); fp_glColor3uiv = (pfn_glColor3uiv)load("glColor3uiv"); fp_glColor3us = (pfn_glColor3us)load("glColor3us"); fp_glColor3usv = (pfn_glColor3usv)load("glColor3usv"); fp_glColor4b = (pfn_glColor4b)load("glColor4b"); fp_glColor4bv = (pfn_glColor4bv)load("glColor4bv"); fp_glColor4d = (pfn_glColor4d)load("glColor4d"); fp_glColor4dv = (pfn_glColor4dv)load("glColor4dv"); fp_glColor4f = (pfn_glColor4f)load("glColor4f"); fp_glColor4fv = (pfn_glColor4fv)load("glColor4fv"); fp_glColor4i = (pfn_glColor4i)load("glColor4i"); fp_glColor4iv = (pfn_glColor4iv)load("glColor4iv"); fp_glColor4s = (pfn_glColor4s)load("glColor4s"); fp_glColor4sv = (pfn_glColor4sv)load("glColor4sv"); fp_glColor4ub = (pfn_glColor4ub)load("glColor4ub"); fp_glColor4ubv = (pfn_glColor4ubv)load("glColor4ubv"); fp_glColor4ui = (pfn_glColor4ui)load("glColor4ui"); fp_glColor4uiv = (pfn_glColor4uiv)load("glColor4uiv"); fp_glColor4us = (pfn_glColor4us)load("glColor4us"); fp_glColor4usv = (pfn_glColor4usv)load("glColor4usv"); fp_glEdgeFlag = (pfn_glEdgeFlag)load("glEdgeFlag"); fp_glEdgeFlagv = (pfn_glEdgeFlagv)load("glEdgeFlagv"); fp_glEnd = (pfn_glEnd)load("glEnd"); fp_glIndexd = (pfn_glIndexd)load("glIndexd"); fp_glIndexdv = (pfn_glIndexdv)load("glIndexdv"); fp_glIndexf = (pfn_glIndexf)load("glIndexf"); fp_glIndexfv = (pfn_glIndexfv)load("glIndexfv"); fp_glIndexi = (pfn_glIndexi)load("glIndexi"); fp_glIndexiv = (pfn_glIndexiv)load("glIndexiv"); fp_glIndexs = (pfn_glIndexs)load("glIndexs"); fp_glIndexsv = (pfn_glIndexsv)load("glIndexsv"); fp_glNormal3b = (pfn_glNormal3b)load("glNormal3b"); fp_glNormal3bv = (pfn_glNormal3bv)load("glNormal3bv"); fp_glNormal3d = (pfn_glNormal3d)load("glNormal3d"); fp_glNormal3dv = (pfn_glNormal3dv)load("glNormal3dv"); fp_glNormal3f = (pfn_glNormal3f)load("glNormal3f"); fp_glNormal3fv = (pfn_glNormal3fv)load("glNormal3fv"); fp_glNormal3i = (pfn_glNormal3i)load("glNormal3i"); fp_glNormal3iv = (pfn_glNormal3iv)load("glNormal3iv"); fp_glNormal3s = (pfn_glNormal3s)load("glNormal3s"); fp_glNormal3sv = (pfn_glNormal3sv)load("glNormal3sv"); fp_glRasterPos2d = (pfn_glRasterPos2d)load("glRasterPos2d"); fp_glRasterPos2dv = (pfn_glRasterPos2dv)load("glRasterPos2dv"); fp_glRasterPos2f = (pfn_glRasterPos2f)load("glRasterPos2f"); fp_glRasterPos2fv = (pfn_glRasterPos2fv)load("glRasterPos2fv"); fp_glRasterPos2i = (pfn_glRasterPos2i)load("glRasterPos2i"); fp_glRasterPos2iv = (pfn_glRasterPos2iv)load("glRasterPos2iv"); fp_glRasterPos2s = (pfn_glRasterPos2s)load("glRasterPos2s"); fp_glRasterPos2sv = (pfn_glRasterPos2sv)load("glRasterPos2sv"); fp_glRasterPos3d = (pfn_glRasterPos3d)load("glRasterPos3d"); fp_glRasterPos3dv = (pfn_glRasterPos3dv)load("glRasterPos3dv"); fp_glRasterPos3f = (pfn_glRasterPos3f)load("glRasterPos3f"); fp_glRasterPos3fv = (pfn_glRasterPos3fv)load("glRasterPos3fv"); fp_glRasterPos3i = (pfn_glRasterPos3i)load("glRasterPos3i"); fp_glRasterPos3iv = (pfn_glRasterPos3iv)load("glRasterPos3iv"); fp_glRasterPos3s = (pfn_glRasterPos3s)load("glRasterPos3s"); fp_glRasterPos3sv = (pfn_glRasterPos3sv)load("glRasterPos3sv"); fp_glRasterPos4d = (pfn_glRasterPos4d)load("glRasterPos4d"); fp_glRasterPos4dv = (pfn_glRasterPos4dv)load("glRasterPos4dv"); fp_glRasterPos4f = (pfn_glRasterPos4f)load("glRasterPos4f"); fp_glRasterPos4fv = (pfn_glRasterPos4fv)load("glRasterPos4fv"); fp_glRasterPos4i = (pfn_glRasterPos4i)load("glRasterPos4i"); fp_glRasterPos4iv = (pfn_glRasterPos4iv)load("glRasterPos4iv"); fp_glRasterPos4s = (pfn_glRasterPos4s)load("glRasterPos4s"); fp_glRasterPos4sv = (pfn_glRasterPos4sv)load("glRasterPos4sv"); fp_glRectd = (pfn_glRectd)load("glRectd"); fp_glRectdv = (pfn_glRectdv)load("glRectdv"); fp_glRectf = (pfn_glRectf)load("glRectf"); fp_glRectfv = (pfn_glRectfv)load("glRectfv"); fp_glRecti = (pfn_glRecti)load("glRecti"); fp_glRectiv = (pfn_glRectiv)load("glRectiv"); fp_glRects = (pfn_glRects)load("glRects"); fp_glRectsv = (pfn_glRectsv)load("glRectsv"); fp_glTexCoord1d = (pfn_glTexCoord1d)load("glTexCoord1d"); fp_glTexCoord1dv = (pfn_glTexCoord1dv)load("glTexCoord1dv"); fp_glTexCoord1f = (pfn_glTexCoord1f)load("glTexCoord1f"); fp_glTexCoord1fv = (pfn_glTexCoord1fv)load("glTexCoord1fv"); fp_glTexCoord1i = (pfn_glTexCoord1i)load("glTexCoord1i"); fp_glTexCoord1iv = (pfn_glTexCoord1iv)load("glTexCoord1iv"); fp_glTexCoord1s = (pfn_glTexCoord1s)load("glTexCoord1s"); fp_glTexCoord1sv = (pfn_glTexCoord1sv)load("glTexCoord1sv"); fp_glTexCoord2d = (pfn_glTexCoord2d)load("glTexCoord2d"); fp_glTexCoord2dv = (pfn_glTexCoord2dv)load("glTexCoord2dv"); fp_glTexCoord2f = (pfn_glTexCoord2f)load("glTexCoord2f"); fp_glTexCoord2fv = (pfn_glTexCoord2fv)load("glTexCoord2fv"); fp_glTexCoord2i = (pfn_glTexCoord2i)load("glTexCoord2i"); fp_glTexCoord2iv = (pfn_glTexCoord2iv)load("glTexCoord2iv"); fp_glTexCoord2s = (pfn_glTexCoord2s)load("glTexCoord2s"); fp_glTexCoord2sv = (pfn_glTexCoord2sv)load("glTexCoord2sv"); fp_glTexCoord3d = (pfn_glTexCoord3d)load("glTexCoord3d"); fp_glTexCoord3dv = (pfn_glTexCoord3dv)load("glTexCoord3dv"); fp_glTexCoord3f = (pfn_glTexCoord3f)load("glTexCoord3f"); fp_glTexCoord3fv = (pfn_glTexCoord3fv)load("glTexCoord3fv"); fp_glTexCoord3i = (pfn_glTexCoord3i)load("glTexCoord3i"); fp_glTexCoord3iv = (pfn_glTexCoord3iv)load("glTexCoord3iv"); fp_glTexCoord3s = (pfn_glTexCoord3s)load("glTexCoord3s"); fp_glTexCoord3sv = (pfn_glTexCoord3sv)load("glTexCoord3sv"); fp_glTexCoord4d = (pfn_glTexCoord4d)load("glTexCoord4d"); fp_glTexCoord4dv = (pfn_glTexCoord4dv)load("glTexCoord4dv"); fp_glTexCoord4f = (pfn_glTexCoord4f)load("glTexCoord4f"); fp_glTexCoord4fv = (pfn_glTexCoord4fv)load("glTexCoord4fv"); fp_glTexCoord4i = (pfn_glTexCoord4i)load("glTexCoord4i"); fp_glTexCoord4iv = (pfn_glTexCoord4iv)load("glTexCoord4iv"); fp_glTexCoord4s = (pfn_glTexCoord4s)load("glTexCoord4s"); fp_glTexCoord4sv = (pfn_glTexCoord4sv)load("glTexCoord4sv"); fp_glVertex2d = (pfn_glVertex2d)load("glVertex2d"); fp_glVertex2dv = (pfn_glVertex2dv)load("glVertex2dv"); fp_glVertex2f = (pfn_glVertex2f)load("glVertex2f"); fp_glVertex2fv = (pfn_glVertex2fv)load("glVertex2fv"); fp_glVertex2i = (pfn_glVertex2i)load("glVertex2i"); fp_glVertex2iv = (pfn_glVertex2iv)load("glVertex2iv"); fp_glVertex2s = (pfn_glVertex2s)load("glVertex2s"); fp_glVertex2sv = (pfn_glVertex2sv)load("glVertex2sv"); fp_glVertex3d = (pfn_glVertex3d)load("glVertex3d"); fp_glVertex3dv = (pfn_glVertex3dv)load("glVertex3dv"); fp_glVertex3f = (pfn_glVertex3f)load("glVertex3f"); fp_glVertex3fv = (pfn_glVertex3fv)load("glVertex3fv"); fp_glVertex3i = (pfn_glVertex3i)load("glVertex3i"); fp_glVertex3iv = (pfn_glVertex3iv)load("glVertex3iv"); fp_glVertex3s = (pfn_glVertex3s)load("glVertex3s"); fp_glVertex3sv = (pfn_glVertex3sv)load("glVertex3sv"); fp_glVertex4d = (pfn_glVertex4d)load("glVertex4d"); fp_glVertex4dv = (pfn_glVertex4dv)load("glVertex4dv"); fp_glVertex4f = (pfn_glVertex4f)load("glVertex4f"); fp_glVertex4fv = (pfn_glVertex4fv)load("glVertex4fv"); fp_glVertex4i = (pfn_glVertex4i)load("glVertex4i"); fp_glVertex4iv = (pfn_glVertex4iv)load("glVertex4iv"); fp_glVertex4s = (pfn_glVertex4s)load("glVertex4s"); fp_glVertex4sv = (pfn_glVertex4sv)load("glVertex4sv"); fp_glClipPlane = (pfn_glClipPlane)load("glClipPlane"); fp_glColorMaterial = (pfn_glColorMaterial)load("glColorMaterial"); fp_glFogf = (pfn_glFogf)load("glFogf"); fp_glFogfv = (pfn_glFogfv)load("glFogfv"); fp_glFogi = (pfn_glFogi)load("glFogi"); fp_glFogiv = (pfn_glFogiv)load("glFogiv"); fp_glLightf = (pfn_glLightf)load("glLightf"); fp_glLightfv = (pfn_glLightfv)load("glLightfv"); fp_glLighti = (pfn_glLighti)load("glLighti"); fp_glLightiv = (pfn_glLightiv)load("glLightiv"); fp_glLightModelf = (pfn_glLightModelf)load("glLightModelf"); fp_glLightModelfv = (pfn_glLightModelfv)load("glLightModelfv"); fp_glLightModeli = (pfn_glLightModeli)load("glLightModeli"); fp_glLightModeliv = (pfn_glLightModeliv)load("glLightModeliv"); fp_glLineStipple = (pfn_glLineStipple)load("glLineStipple"); fp_glMaterialf = (pfn_glMaterialf)load("glMaterialf"); fp_glMaterialfv = (pfn_glMaterialfv)load("glMaterialfv"); fp_glMateriali = (pfn_glMateriali)load("glMateriali"); fp_glMaterialiv = (pfn_glMaterialiv)load("glMaterialiv"); fp_glPolygonStipple = (pfn_glPolygonStipple)load("glPolygonStipple"); fp_glShadeModel = (pfn_glShadeModel)load("glShadeModel"); fp_glTexEnvf = (pfn_glTexEnvf)load("glTexEnvf"); fp_glTexEnvfv = (pfn_glTexEnvfv)load("glTexEnvfv"); fp_glTexEnvi = (pfn_glTexEnvi)load("glTexEnvi"); fp_glTexEnviv = (pfn_glTexEnviv)load("glTexEnviv"); fp_glTexGend = (pfn_glTexGend)load("glTexGend"); fp_glTexGendv = (pfn_glTexGendv)load("glTexGendv"); fp_glTexGenf = (pfn_glTexGenf)load("glTexGenf"); fp_glTexGenfv = (pfn_glTexGenfv)load("glTexGenfv"); fp_glTexGeni = (pfn_glTexGeni)load("glTexGeni"); fp_glTexGeniv = (pfn_glTexGeniv)load("glTexGeniv"); fp_glFeedbackBuffer = (pfn_glFeedbackBuffer)load("glFeedbackBuffer"); fp_glSelectBuffer = (pfn_glSelectBuffer)load("glSelectBuffer"); fp_glRenderMode = (pfn_glRenderMode)load("glRenderMode"); fp_glInitNames = (pfn_glInitNames)load("glInitNames"); fp_glLoadName = (pfn_glLoadName)load("glLoadName"); fp_glPassThrough = (pfn_glPassThrough)load("glPassThrough"); fp_glPopName = (pfn_glPopName)load("glPopName"); fp_glPushName = (pfn_glPushName)load("glPushName"); fp_glClearAccum = (pfn_glClearAccum)load("glClearAccum"); fp_glClearIndex = (pfn_glClearIndex)load("glClearIndex"); fp_glIndexMask = (pfn_glIndexMask)load("glIndexMask"); fp_glAccum = (pfn_glAccum)load("glAccum"); fp_glPopAttrib = (pfn_glPopAttrib)load("glPopAttrib"); fp_glPushAttrib = (pfn_glPushAttrib)load("glPushAttrib"); fp_glMap1d = (pfn_glMap1d)load("glMap1d"); fp_glMap1f = (pfn_glMap1f)load("glMap1f"); fp_glMap2d = (pfn_glMap2d)load("glMap2d"); fp_glMap2f = (pfn_glMap2f)load("glMap2f"); fp_glMapGrid1d = (pfn_glMapGrid1d)load("glMapGrid1d"); fp_glMapGrid1f = (pfn_glMapGrid1f)load("glMapGrid1f"); fp_glMapGrid2d = (pfn_glMapGrid2d)load("glMapGrid2d"); fp_glMapGrid2f = (pfn_glMapGrid2f)load("glMapGrid2f"); fp_glEvalCoord1d = (pfn_glEvalCoord1d)load("glEvalCoord1d"); fp_glEvalCoord1dv = (pfn_glEvalCoord1dv)load("glEvalCoord1dv"); fp_glEvalCoord1f = (pfn_glEvalCoord1f)load("glEvalCoord1f"); fp_glEvalCoord1fv = (pfn_glEvalCoord1fv)load("glEvalCoord1fv"); fp_glEvalCoord2d = (pfn_glEvalCoord2d)load("glEvalCoord2d"); fp_glEvalCoord2dv = (pfn_glEvalCoord2dv)load("glEvalCoord2dv"); fp_glEvalCoord2f = (pfn_glEvalCoord2f)load("glEvalCoord2f"); fp_glEvalCoord2fv = (pfn_glEvalCoord2fv)load("glEvalCoord2fv"); fp_glEvalMesh1 = (pfn_glEvalMesh1)load("glEvalMesh1"); fp_glEvalPoint1 = (pfn_glEvalPoint1)load("glEvalPoint1"); fp_glEvalMesh2 = (pfn_glEvalMesh2)load("glEvalMesh2"); fp_glEvalPoint2 = (pfn_glEvalPoint2)load("glEvalPoint2"); fp_glAlphaFunc = (pfn_glAlphaFunc)load("glAlphaFunc"); fp_glPixelZoom = (pfn_glPixelZoom)load("glPixelZoom"); fp_glPixelTransferf = (pfn_glPixelTransferf)load("glPixelTransferf"); fp_glPixelTransferi = (pfn_glPixelTransferi)load("glPixelTransferi"); fp_glPixelMapfv = (pfn_glPixelMapfv)load("glPixelMapfv"); fp_glPixelMapuiv = (pfn_glPixelMapuiv)load("glPixelMapuiv"); fp_glPixelMapusv = (pfn_glPixelMapusv)load("glPixelMapusv"); fp_glCopyPixels = (pfn_glCopyPixels)load("glCopyPixels"); fp_glDrawPixels = (pfn_glDrawPixels)load("glDrawPixels"); fp_glGetClipPlane = (pfn_glGetClipPlane)load("glGetClipPlane"); fp_glGetLightfv = (pfn_glGetLightfv)load("glGetLightfv"); fp_glGetLightiv = (pfn_glGetLightiv)load("glGetLightiv"); fp_glGetMapdv = (pfn_glGetMapdv)load("glGetMapdv"); fp_glGetMapfv = (pfn_glGetMapfv)load("glGetMapfv"); fp_glGetMapiv = (pfn_glGetMapiv)load("glGetMapiv"); fp_glGetMaterialfv = (pfn_glGetMaterialfv)load("glGetMaterialfv"); fp_glGetMaterialiv = (pfn_glGetMaterialiv)load("glGetMaterialiv"); fp_glGetPixelMapfv = (pfn_glGetPixelMapfv)load("glGetPixelMapfv"); fp_glGetPixelMapuiv = (pfn_glGetPixelMapuiv)load("glGetPixelMapuiv"); fp_glGetPixelMapusv = (pfn_glGetPixelMapusv)load("glGetPixelMapusv"); fp_glGetPolygonStipple = (pfn_glGetPolygonStipple)load("glGetPolygonStipple"); fp_glGetTexEnvfv = (pfn_glGetTexEnvfv)load("glGetTexEnvfv"); fp_glGetTexEnviv = (pfn_glGetTexEnviv)load("glGetTexEnviv"); fp_glGetTexGendv = (pfn_glGetTexGendv)load("glGetTexGendv"); fp_glGetTexGenfv = (pfn_glGetTexGenfv)load("glGetTexGenfv"); fp_glGetTexGeniv = (pfn_glGetTexGeniv)load("glGetTexGeniv"); fp_glIsList = (pfn_glIsList)load("glIsList"); fp_glFrustum = (pfn_glFrustum)load("glFrustum"); fp_glLoadIdentity = (pfn_glLoadIdentity)load("glLoadIdentity"); fp_glLoadMatrixf = (pfn_glLoadMatrixf)load("glLoadMatrixf"); fp_glLoadMatrixd = (pfn_glLoadMatrixd)load("glLoadMatrixd"); fp_glMatrixMode = (pfn_glMatrixMode)load("glMatrixMode"); fp_glMultMatrixf = (pfn_glMultMatrixf)load("glMultMatrixf"); fp_glMultMatrixd = (pfn_glMultMatrixd)load("glMultMatrixd"); fp_glOrtho = (pfn_glOrtho)load("glOrtho"); fp_glPopMatrix = (pfn_glPopMatrix)load("glPopMatrix"); fp_glPushMatrix = (pfn_glPushMatrix)load("glPushMatrix"); fp_glRotated = (pfn_glRotated)load("glRotated"); fp_glRotatef = (pfn_glRotatef)load("glRotatef"); fp_glScaled = (pfn_glScaled)load("glScaled"); fp_glScalef = (pfn_glScalef)load("glScalef"); fp_glTranslated = (pfn_glTranslated)load("glTranslated"); fp_glTranslatef = (pfn_glTranslatef)load("glTranslatef"); } GLboolean GLAD_VERSION_1_1 = GL_FALSE; static void load_GL_VERSION_1_1(LOADER load) { if(!GLAD_VERSION_1_1) return; fp_glDrawArrays = (pfn_glDrawArrays)load("glDrawArrays"); fp_glDrawElements = (pfn_glDrawElements)load("glDrawElements"); fp_glGetPointerv = (pfn_glGetPointerv)load("glGetPointerv"); fp_glPolygonOffset = (pfn_glPolygonOffset)load("glPolygonOffset"); fp_glCopyTexImage1D = (pfn_glCopyTexImage1D)load("glCopyTexImage1D"); fp_glCopyTexImage2D = (pfn_glCopyTexImage2D)load("glCopyTexImage2D"); fp_glCopyTexSubImage1D = (pfn_glCopyTexSubImage1D)load("glCopyTexSubImage1D"); fp_glCopyTexSubImage2D = (pfn_glCopyTexSubImage2D)load("glCopyTexSubImage2D"); fp_glTexSubImage1D = (pfn_glTexSubImage1D)load("glTexSubImage1D"); fp_glTexSubImage2D = (pfn_glTexSubImage2D)load("glTexSubImage2D"); fp_glBindTexture = (pfn_glBindTexture)load("glBindTexture"); fp_glDeleteTextures = (pfn_glDeleteTextures)load("glDeleteTextures"); fp_glGenTextures = (pfn_glGenTextures)load("glGenTextures"); fp_glIsTexture = (pfn_glIsTexture)load("glIsTexture"); fp_glArrayElement = (pfn_glArrayElement)load("glArrayElement"); fp_glColorPointer = (pfn_glColorPointer)load("glColorPointer"); fp_glDisableClientState = (pfn_glDisableClientState)load("glDisableClientState"); fp_glEdgeFlagPointer = (pfn_glEdgeFlagPointer)load("glEdgeFlagPointer"); fp_glEnableClientState = (pfn_glEnableClientState)load("glEnableClientState"); fp_glIndexPointer = (pfn_glIndexPointer)load("glIndexPointer"); fp_glInterleavedArrays = (pfn_glInterleavedArrays)load("glInterleavedArrays"); fp_glNormalPointer = (pfn_glNormalPointer)load("glNormalPointer"); fp_glTexCoordPointer = (pfn_glTexCoordPointer)load("glTexCoordPointer"); fp_glVertexPointer = (pfn_glVertexPointer)load("glVertexPointer"); fp_glAreTexturesResident = (pfn_glAreTexturesResident)load("glAreTexturesResident"); fp_glPrioritizeTextures = (pfn_glPrioritizeTextures)load("glPrioritizeTextures"); fp_glIndexub = (pfn_glIndexub)load("glIndexub"); fp_glIndexubv = (pfn_glIndexubv)load("glIndexubv"); fp_glPopClientAttrib = (pfn_glPopClientAttrib)load("glPopClientAttrib"); fp_glPushClientAttrib = (pfn_glPushClientAttrib)load("glPushClientAttrib"); } GLboolean GLAD_VERSION_1_2 = GL_FALSE; static void load_GL_VERSION_1_2(LOADER load) { if(!GLAD_VERSION_1_2) return; fp_glDrawRangeElements = (pfn_glDrawRangeElements)load("glDrawRangeElements"); fp_glTexImage3D = (pfn_glTexImage3D)load("glTexImage3D"); fp_glTexSubImage3D = (pfn_glTexSubImage3D)load("glTexSubImage3D"); fp_glCopyTexSubImage3D = (pfn_glCopyTexSubImage3D)load("glCopyTexSubImage3D"); } GLboolean GLAD_VERSION_1_3 = GL_FALSE; static void load_GL_VERSION_1_3(LOADER load) { if(!GLAD_VERSION_1_3) return; fp_glActiveTexture = (pfn_glActiveTexture)load("glActiveTexture"); fp_glSampleCoverage = (pfn_glSampleCoverage)load("glSampleCoverage"); fp_glCompressedTexImage3D = (pfn_glCompressedTexImage3D)load("glCompressedTexImage3D"); fp_glCompressedTexImage2D = (pfn_glCompressedTexImage2D)load("glCompressedTexImage2D"); fp_glCompressedTexImage1D = (pfn_glCompressedTexImage1D)load("glCompressedTexImage1D"); fp_glCompressedTexSubImage3D = (pfn_glCompressedTexSubImage3D)load("glCompressedTexSubImage3D"); fp_glCompressedTexSubImage2D = (pfn_glCompressedTexSubImage2D)load("glCompressedTexSubImage2D"); fp_glCompressedTexSubImage1D = (pfn_glCompressedTexSubImage1D)load("glCompressedTexSubImage1D"); fp_glGetCompressedTexImage = (pfn_glGetCompressedTexImage)load("glGetCompressedTexImage"); fp_glClientActiveTexture = (pfn_glClientActiveTexture)load("glClientActiveTexture"); fp_glMultiTexCoord1d = (pfn_glMultiTexCoord1d)load("glMultiTexCoord1d"); fp_glMultiTexCoord1dv = (pfn_glMultiTexCoord1dv)load("glMultiTexCoord1dv"); fp_glMultiTexCoord1f = (pfn_glMultiTexCoord1f)load("glMultiTexCoord1f"); fp_glMultiTexCoord1fv = (pfn_glMultiTexCoord1fv)load("glMultiTexCoord1fv"); fp_glMultiTexCoord1i = (pfn_glMultiTexCoord1i)load("glMultiTexCoord1i"); fp_glMultiTexCoord1iv = (pfn_glMultiTexCoord1iv)load("glMultiTexCoord1iv"); fp_glMultiTexCoord1s = (pfn_glMultiTexCoord1s)load("glMultiTexCoord1s"); fp_glMultiTexCoord1sv = (pfn_glMultiTexCoord1sv)load("glMultiTexCoord1sv"); fp_glMultiTexCoord2d = (pfn_glMultiTexCoord2d)load("glMultiTexCoord2d"); fp_glMultiTexCoord2dv = (pfn_glMultiTexCoord2dv)load("glMultiTexCoord2dv"); fp_glMultiTexCoord2f = (pfn_glMultiTexCoord2f)load("glMultiTexCoord2f"); fp_glMultiTexCoord2fv = (pfn_glMultiTexCoord2fv)load("glMultiTexCoord2fv"); fp_glMultiTexCoord2i = (pfn_glMultiTexCoord2i)load("glMultiTexCoord2i"); fp_glMultiTexCoord2iv = (pfn_glMultiTexCoord2iv)load("glMultiTexCoord2iv"); fp_glMultiTexCoord2s = (pfn_glMultiTexCoord2s)load("glMultiTexCoord2s"); fp_glMultiTexCoord2sv = (pfn_glMultiTexCoord2sv)load("glMultiTexCoord2sv"); fp_glMultiTexCoord3d = (pfn_glMultiTexCoord3d)load("glMultiTexCoord3d"); fp_glMultiTexCoord3dv = (pfn_glMultiTexCoord3dv)load("glMultiTexCoord3dv"); fp_glMultiTexCoord3f = (pfn_glMultiTexCoord3f)load("glMultiTexCoord3f"); fp_glMultiTexCoord3fv = (pfn_glMultiTexCoord3fv)load("glMultiTexCoord3fv"); fp_glMultiTexCoord3i = (pfn_glMultiTexCoord3i)load("glMultiTexCoord3i"); fp_glMultiTexCoord3iv = (pfn_glMultiTexCoord3iv)load("glMultiTexCoord3iv"); fp_glMultiTexCoord3s = (pfn_glMultiTexCoord3s)load("glMultiTexCoord3s"); fp_glMultiTexCoord3sv = (pfn_glMultiTexCoord3sv)load("glMultiTexCoord3sv"); fp_glMultiTexCoord4d = (pfn_glMultiTexCoord4d)load("glMultiTexCoord4d"); fp_glMultiTexCoord4dv = (pfn_glMultiTexCoord4dv)load("glMultiTexCoord4dv"); fp_glMultiTexCoord4f = (pfn_glMultiTexCoord4f)load("glMultiTexCoord4f"); fp_glMultiTexCoord4fv = (pfn_glMultiTexCoord4fv)load("glMultiTexCoord4fv"); fp_glMultiTexCoord4i = (pfn_glMultiTexCoord4i)load("glMultiTexCoord4i"); fp_glMultiTexCoord4iv = (pfn_glMultiTexCoord4iv)load("glMultiTexCoord4iv"); fp_glMultiTexCoord4s = (pfn_glMultiTexCoord4s)load("glMultiTexCoord4s"); fp_glMultiTexCoord4sv = (pfn_glMultiTexCoord4sv)load("glMultiTexCoord4sv"); fp_glLoadTransposeMatrixf = (pfn_glLoadTransposeMatrixf)load("glLoadTransposeMatrixf"); fp_glLoadTransposeMatrixd = (pfn_glLoadTransposeMatrixd)load("glLoadTransposeMatrixd"); fp_glMultTransposeMatrixf = (pfn_glMultTransposeMatrixf)load("glMultTransposeMatrixf"); fp_glMultTransposeMatrixd = (pfn_glMultTransposeMatrixd)load("glMultTransposeMatrixd"); } GLboolean GLAD_VERSION_1_4 = GL_FALSE; static void load_GL_VERSION_1_4(LOADER load) { if(!GLAD_VERSION_1_4) return; fp_glBlendFuncSeparate = (pfn_glBlendFuncSeparate)load("glBlendFuncSeparate"); fp_glMultiDrawArrays = (pfn_glMultiDrawArrays)load("glMultiDrawArrays"); fp_glMultiDrawElements = (pfn_glMultiDrawElements)load("glMultiDrawElements"); fp_glPointParameterf = (pfn_glPointParameterf)load("glPointParameterf"); fp_glPointParameterfv = (pfn_glPointParameterfv)load("glPointParameterfv"); fp_glPointParameteri = (pfn_glPointParameteri)load("glPointParameteri"); fp_glPointParameteriv = (pfn_glPointParameteriv)load("glPointParameteriv"); fp_glFogCoordf = (pfn_glFogCoordf)load("glFogCoordf"); fp_glFogCoordfv = (pfn_glFogCoordfv)load("glFogCoordfv"); fp_glFogCoordd = (pfn_glFogCoordd)load("glFogCoordd"); fp_glFogCoorddv = (pfn_glFogCoorddv)load("glFogCoorddv"); fp_glFogCoordPointer = (pfn_glFogCoordPointer)load("glFogCoordPointer"); fp_glSecondaryColor3b = (pfn_glSecondaryColor3b)load("glSecondaryColor3b"); fp_glSecondaryColor3bv = (pfn_glSecondaryColor3bv)load("glSecondaryColor3bv"); fp_glSecondaryColor3d = (pfn_glSecondaryColor3d)load("glSecondaryColor3d"); fp_glSecondaryColor3dv = (pfn_glSecondaryColor3dv)load("glSecondaryColor3dv"); fp_glSecondaryColor3f = (pfn_glSecondaryColor3f)load("glSecondaryColor3f"); fp_glSecondaryColor3fv = (pfn_glSecondaryColor3fv)load("glSecondaryColor3fv"); fp_glSecondaryColor3i = (pfn_glSecondaryColor3i)load("glSecondaryColor3i"); fp_glSecondaryColor3iv = (pfn_glSecondaryColor3iv)load("glSecondaryColor3iv"); fp_glSecondaryColor3s = (pfn_glSecondaryColor3s)load("glSecondaryColor3s"); fp_glSecondaryColor3sv = (pfn_glSecondaryColor3sv)load("glSecondaryColor3sv"); fp_glSecondaryColor3ub = (pfn_glSecondaryColor3ub)load("glSecondaryColor3ub"); fp_glSecondaryColor3ubv = (pfn_glSecondaryColor3ubv)load("glSecondaryColor3ubv"); fp_glSecondaryColor3ui = (pfn_glSecondaryColor3ui)load("glSecondaryColor3ui"); fp_glSecondaryColor3uiv = (pfn_glSecondaryColor3uiv)load("glSecondaryColor3uiv"); fp_glSecondaryColor3us = (pfn_glSecondaryColor3us)load("glSecondaryColor3us"); fp_glSecondaryColor3usv = (pfn_glSecondaryColor3usv)load("glSecondaryColor3usv"); fp_glSecondaryColorPointer = (pfn_glSecondaryColorPointer)load("glSecondaryColorPointer"); fp_glWindowPos2d = (pfn_glWindowPos2d)load("glWindowPos2d"); fp_glWindowPos2dv = (pfn_glWindowPos2dv)load("glWindowPos2dv"); fp_glWindowPos2f = (pfn_glWindowPos2f)load("glWindowPos2f"); fp_glWindowPos2fv = (pfn_glWindowPos2fv)load("glWindowPos2fv"); fp_glWindowPos2i = (pfn_glWindowPos2i)load("glWindowPos2i"); fp_glWindowPos2iv = (pfn_glWindowPos2iv)load("glWindowPos2iv"); fp_glWindowPos2s = (pfn_glWindowPos2s)load("glWindowPos2s"); fp_glWindowPos2sv = (pfn_glWindowPos2sv)load("glWindowPos2sv"); fp_glWindowPos3d = (pfn_glWindowPos3d)load("glWindowPos3d"); fp_glWindowPos3dv = (pfn_glWindowPos3dv)load("glWindowPos3dv"); fp_glWindowPos3f = (pfn_glWindowPos3f)load("glWindowPos3f"); fp_glWindowPos3fv = (pfn_glWindowPos3fv)load("glWindowPos3fv"); fp_glWindowPos3i = (pfn_glWindowPos3i)load("glWindowPos3i"); fp_glWindowPos3iv = (pfn_glWindowPos3iv)load("glWindowPos3iv"); fp_glWindowPos3s = (pfn_glWindowPos3s)load("glWindowPos3s"); fp_glWindowPos3sv = (pfn_glWindowPos3sv)load("glWindowPos3sv"); fp_glBlendColor = (pfn_glBlendColor)load("glBlendColor"); fp_glBlendEquation = (pfn_glBlendEquation)load("glBlendEquation"); } GLboolean GLAD_VERSION_1_5 = GL_FALSE; static void load_GL_VERSION_1_5(LOADER load) { if(!GLAD_VERSION_1_5) return; fp_glGenQueries = (pfn_glGenQueries)load("glGenQueries"); fp_glDeleteQueries = (pfn_glDeleteQueries)load("glDeleteQueries"); fp_glIsQuery = (pfn_glIsQuery)load("glIsQuery"); fp_glBeginQuery = (pfn_glBeginQuery)load("glBeginQuery"); fp_glEndQuery = (pfn_glEndQuery)load("glEndQuery"); fp_glGetQueryiv = (pfn_glGetQueryiv)load("glGetQueryiv"); fp_glGetQueryObjectiv = (pfn_glGetQueryObjectiv)load("glGetQueryObjectiv"); fp_glGetQueryObjectuiv = (pfn_glGetQueryObjectuiv)load("glGetQueryObjectuiv"); fp_glBindBuffer = (pfn_glBindBuffer)load("glBindBuffer"); fp_glDeleteBuffers = (pfn_glDeleteBuffers)load("glDeleteBuffers"); fp_glGenBuffers = (pfn_glGenBuffers)load("glGenBuffers"); fp_glIsBuffer = (pfn_glIsBuffer)load("glIsBuffer"); fp_glBufferData = (pfn_glBufferData)load("glBufferData"); fp_glBufferSubData = (pfn_glBufferSubData)load("glBufferSubData"); fp_glGetBufferSubData = (pfn_glGetBufferSubData)load("glGetBufferSubData"); fp_glMapBuffer = (pfn_glMapBuffer)load("glMapBuffer"); fp_glUnmapBuffer = (pfn_glUnmapBuffer)load("glUnmapBuffer"); fp_glGetBufferParameteriv = (pfn_glGetBufferParameteriv)load("glGetBufferParameteriv"); fp_glGetBufferPointerv = (pfn_glGetBufferPointerv)load("glGetBufferPointerv"); } GLboolean GLAD_VERSION_2_0 = GL_FALSE; static void load_GL_VERSION_2_0(LOADER load) { if(!GLAD_VERSION_2_0) return; fp_glBlendEquationSeparate = (pfn_glBlendEquationSeparate)load("glBlendEquationSeparate"); fp_glDrawBuffers = (pfn_glDrawBuffers)load("glDrawBuffers"); fp_glStencilOpSeparate = (pfn_glStencilOpSeparate)load("glStencilOpSeparate"); fp_glStencilFuncSeparate = (pfn_glStencilFuncSeparate)load("glStencilFuncSeparate"); fp_glStencilMaskSeparate = (pfn_glStencilMaskSeparate)load("glStencilMaskSeparate"); fp_glAttachShader = (pfn_glAttachShader)load("glAttachShader"); fp_glBindAttribLocation = (pfn_glBindAttribLocation)load("glBindAttribLocation"); fp_glCompileShader = (pfn_glCompileShader)load("glCompileShader"); fp_glCreateProgram = (pfn_glCreateProgram)load("glCreateProgram"); fp_glCreateShader = (pfn_glCreateShader)load("glCreateShader"); fp_glDeleteProgram = (pfn_glDeleteProgram)load("glDeleteProgram"); fp_glDeleteShader = (pfn_glDeleteShader)load("glDeleteShader"); fp_glDetachShader = (pfn_glDetachShader)load("glDetachShader"); fp_glDisableVertexAttribArray = (pfn_glDisableVertexAttribArray)load("glDisableVertexAttribArray"); fp_glEnableVertexAttribArray = (pfn_glEnableVertexAttribArray)load("glEnableVertexAttribArray"); fp_glGetActiveAttrib = (pfn_glGetActiveAttrib)load("glGetActiveAttrib"); fp_glGetActiveUniform = (pfn_glGetActiveUniform)load("glGetActiveUniform"); fp_glGetAttachedShaders = (pfn_glGetAttachedShaders)load("glGetAttachedShaders"); fp_glGetAttribLocation = (pfn_glGetAttribLocation)load("glGetAttribLocation"); fp_glGetProgramiv = (pfn_glGetProgramiv)load("glGetProgramiv"); fp_glGetProgramInfoLog = (pfn_glGetProgramInfoLog)load("glGetProgramInfoLog"); fp_glGetShaderiv = (pfn_glGetShaderiv)load("glGetShaderiv"); fp_glGetShaderInfoLog = (pfn_glGetShaderInfoLog)load("glGetShaderInfoLog"); fp_glGetShaderSource = (pfn_glGetShaderSource)load("glGetShaderSource"); fp_glGetUniformLocation = (pfn_glGetUniformLocation)load("glGetUniformLocation"); fp_glGetUniformfv = (pfn_glGetUniformfv)load("glGetUniformfv"); fp_glGetUniformiv = (pfn_glGetUniformiv)load("glGetUniformiv"); fp_glGetVertexAttribdv = (pfn_glGetVertexAttribdv)load("glGetVertexAttribdv"); fp_glGetVertexAttribfv = (pfn_glGetVertexAttribfv)load("glGetVertexAttribfv"); fp_glGetVertexAttribiv = (pfn_glGetVertexAttribiv)load("glGetVertexAttribiv"); fp_glGetVertexAttribPointerv = (pfn_glGetVertexAttribPointerv)load("glGetVertexAttribPointerv"); fp_glIsProgram = (pfn_glIsProgram)load("glIsProgram"); fp_glIsShader = (pfn_glIsShader)load("glIsShader"); fp_glLinkProgram = (pfn_glLinkProgram)load("glLinkProgram"); fp_glShaderSource = (pfn_glShaderSource)load("glShaderSource"); fp_glUseProgram = (pfn_glUseProgram)load("glUseProgram"); fp_glUniform1f = (pfn_glUniform1f)load("glUniform1f"); fp_glUniform2f = (pfn_glUniform2f)load("glUniform2f"); fp_glUniform3f = (pfn_glUniform3f)load("glUniform3f"); fp_glUniform4f = (pfn_glUniform4f)load("glUniform4f"); fp_glUniform1i = (pfn_glUniform1i)load("glUniform1i"); fp_glUniform2i = (pfn_glUniform2i)load("glUniform2i"); fp_glUniform3i = (pfn_glUniform3i)load("glUniform3i"); fp_glUniform4i = (pfn_glUniform4i)load("glUniform4i"); fp_glUniform1fv = (pfn_glUniform1fv)load("glUniform1fv"); fp_glUniform2fv = (pfn_glUniform2fv)load("glUniform2fv"); fp_glUniform3fv = (pfn_glUniform3fv)load("glUniform3fv"); fp_glUniform4fv = (pfn_glUniform4fv)load("glUniform4fv"); fp_glUniform1iv = (pfn_glUniform1iv)load("glUniform1iv"); fp_glUniform2iv = (pfn_glUniform2iv)load("glUniform2iv"); fp_glUniform3iv = (pfn_glUniform3iv)load("glUniform3iv"); fp_glUniform4iv = (pfn_glUniform4iv)load("glUniform4iv"); fp_glUniformMatrix2fv = (pfn_glUniformMatrix2fv)load("glUniformMatrix2fv"); fp_glUniformMatrix3fv = (pfn_glUniformMatrix3fv)load("glUniformMatrix3fv"); fp_glUniformMatrix4fv = (pfn_glUniformMatrix4fv)load("glUniformMatrix4fv"); fp_glValidateProgram = (pfn_glValidateProgram)load("glValidateProgram"); fp_glVertexAttrib1d = (pfn_glVertexAttrib1d)load("glVertexAttrib1d"); fp_glVertexAttrib1dv = (pfn_glVertexAttrib1dv)load("glVertexAttrib1dv"); fp_glVertexAttrib1f = (pfn_glVertexAttrib1f)load("glVertexAttrib1f"); fp_glVertexAttrib1fv = (pfn_glVertexAttrib1fv)load("glVertexAttrib1fv"); fp_glVertexAttrib1s = (pfn_glVertexAttrib1s)load("glVertexAttrib1s"); fp_glVertexAttrib1sv = (pfn_glVertexAttrib1sv)load("glVertexAttrib1sv"); fp_glVertexAttrib2d = (pfn_glVertexAttrib2d)load("glVertexAttrib2d"); fp_glVertexAttrib2dv = (pfn_glVertexAttrib2dv)load("glVertexAttrib2dv"); fp_glVertexAttrib2f = (pfn_glVertexAttrib2f)load("glVertexAttrib2f"); fp_glVertexAttrib2fv = (pfn_glVertexAttrib2fv)load("glVertexAttrib2fv"); fp_glVertexAttrib2s = (pfn_glVertexAttrib2s)load("glVertexAttrib2s"); fp_glVertexAttrib2sv = (pfn_glVertexAttrib2sv)load("glVertexAttrib2sv"); fp_glVertexAttrib3d = (pfn_glVertexAttrib3d)load("glVertexAttrib3d"); fp_glVertexAttrib3dv = (pfn_glVertexAttrib3dv)load("glVertexAttrib3dv"); fp_glVertexAttrib3f = (pfn_glVertexAttrib3f)load("glVertexAttrib3f"); fp_glVertexAttrib3fv = (pfn_glVertexAttrib3fv)load("glVertexAttrib3fv"); fp_glVertexAttrib3s = (pfn_glVertexAttrib3s)load("glVertexAttrib3s"); fp_glVertexAttrib3sv = (pfn_glVertexAttrib3sv)load("glVertexAttrib3sv"); fp_glVertexAttrib4Nbv = (pfn_glVertexAttrib4Nbv)load("glVertexAttrib4Nbv"); fp_glVertexAttrib4Niv = (pfn_glVertexAttrib4Niv)load("glVertexAttrib4Niv"); fp_glVertexAttrib4Nsv = (pfn_glVertexAttrib4Nsv)load("glVertexAttrib4Nsv"); fp_glVertexAttrib4Nub = (pfn_glVertexAttrib4Nub)load("glVertexAttrib4Nub"); fp_glVertexAttrib4Nubv = (pfn_glVertexAttrib4Nubv)load("glVertexAttrib4Nubv"); fp_glVertexAttrib4Nuiv = (pfn_glVertexAttrib4Nuiv)load("glVertexAttrib4Nuiv"); fp_glVertexAttrib4Nusv = (pfn_glVertexAttrib4Nusv)load("glVertexAttrib4Nusv"); fp_glVertexAttrib4bv = (pfn_glVertexAttrib4bv)load("glVertexAttrib4bv"); fp_glVertexAttrib4d = (pfn_glVertexAttrib4d)load("glVertexAttrib4d"); fp_glVertexAttrib4dv = (pfn_glVertexAttrib4dv)load("glVertexAttrib4dv"); fp_glVertexAttrib4f = (pfn_glVertexAttrib4f)load("glVertexAttrib4f"); fp_glVertexAttrib4fv = (pfn_glVertexAttrib4fv)load("glVertexAttrib4fv"); fp_glVertexAttrib4iv = (pfn_glVertexAttrib4iv)load("glVertexAttrib4iv"); fp_glVertexAttrib4s = (pfn_glVertexAttrib4s)load("glVertexAttrib4s"); fp_glVertexAttrib4sv = (pfn_glVertexAttrib4sv)load("glVertexAttrib4sv"); fp_glVertexAttrib4ubv = (pfn_glVertexAttrib4ubv)load("glVertexAttrib4ubv"); fp_glVertexAttrib4uiv = (pfn_glVertexAttrib4uiv)load("glVertexAttrib4uiv"); fp_glVertexAttrib4usv = (pfn_glVertexAttrib4usv)load("glVertexAttrib4usv"); fp_glVertexAttribPointer = (pfn_glVertexAttribPointer)load("glVertexAttribPointer"); } GLboolean GLAD_VERSION_2_1 = GL_FALSE; static void load_GL_VERSION_2_1(LOADER load) { if(!GLAD_VERSION_2_1) return; fp_glUniformMatrix2x3fv = (pfn_glUniformMatrix2x3fv)load("glUniformMatrix2x3fv"); fp_glUniformMatrix3x2fv = (pfn_glUniformMatrix3x2fv)load("glUniformMatrix3x2fv"); fp_glUniformMatrix2x4fv = (pfn_glUniformMatrix2x4fv)load("glUniformMatrix2x4fv"); fp_glUniformMatrix4x2fv = (pfn_glUniformMatrix4x2fv)load("glUniformMatrix4x2fv"); fp_glUniformMatrix3x4fv = (pfn_glUniformMatrix3x4fv)load("glUniformMatrix3x4fv"); fp_glUniformMatrix4x3fv = (pfn_glUniformMatrix4x3fv)load("glUniformMatrix4x3fv"); } GLboolean GLAD_VERSION_3_0 = GL_FALSE; static void load_GL_VERSION_3_0(LOADER load) { if(!GLAD_VERSION_3_0) return; fp_glColorMaski = (pfn_glColorMaski)load("glColorMaski"); fp_glGetBooleani_v = (pfn_glGetBooleani_v)load("glGetBooleani_v"); fp_glGetIntegeri_v = (pfn_glGetIntegeri_v)load("glGetIntegeri_v"); fp_glEnablei = (pfn_glEnablei)load("glEnablei"); fp_glDisablei = (pfn_glDisablei)load("glDisablei"); fp_glIsEnabledi = (pfn_glIsEnabledi)load("glIsEnabledi"); fp_glBeginTransformFeedback = (pfn_glBeginTransformFeedback)load("glBeginTransformFeedback"); fp_glEndTransformFeedback = (pfn_glEndTransformFeedback)load("glEndTransformFeedback"); fp_glBindBufferRange = (pfn_glBindBufferRange)load("glBindBufferRange"); fp_glBindBufferBase = (pfn_glBindBufferBase)load("glBindBufferBase"); fp_glTransformFeedbackVaryings = (pfn_glTransformFeedbackVaryings)load("glTransformFeedbackVaryings"); fp_glGetTransformFeedbackVarying = (pfn_glGetTransformFeedbackVarying)load("glGetTransformFeedbackVarying"); fp_glClampColor = (pfn_glClampColor)load("glClampColor"); fp_glBeginConditionalRender = (pfn_glBeginConditionalRender)load("glBeginConditionalRender"); fp_glEndConditionalRender = (pfn_glEndConditionalRender)load("glEndConditionalRender"); fp_glVertexAttribIPointer = (pfn_glVertexAttribIPointer)load("glVertexAttribIPointer"); fp_glGetVertexAttribIiv = (pfn_glGetVertexAttribIiv)load("glGetVertexAttribIiv"); fp_glGetVertexAttribIuiv = (pfn_glGetVertexAttribIuiv)load("glGetVertexAttribIuiv"); fp_glVertexAttribI1i = (pfn_glVertexAttribI1i)load("glVertexAttribI1i"); fp_glVertexAttribI2i = (pfn_glVertexAttribI2i)load("glVertexAttribI2i"); fp_glVertexAttribI3i = (pfn_glVertexAttribI3i)load("glVertexAttribI3i"); fp_glVertexAttribI4i = (pfn_glVertexAttribI4i)load("glVertexAttribI4i"); fp_glVertexAttribI1ui = (pfn_glVertexAttribI1ui)load("glVertexAttribI1ui"); fp_glVertexAttribI2ui = (pfn_glVertexAttribI2ui)load("glVertexAttribI2ui"); fp_glVertexAttribI3ui = (pfn_glVertexAttribI3ui)load("glVertexAttribI3ui"); fp_glVertexAttribI4ui = (pfn_glVertexAttribI4ui)load("glVertexAttribI4ui"); fp_glVertexAttribI1iv = (pfn_glVertexAttribI1iv)load("glVertexAttribI1iv"); fp_glVertexAttribI2iv = (pfn_glVertexAttribI2iv)load("glVertexAttribI2iv"); fp_glVertexAttribI3iv = (pfn_glVertexAttribI3iv)load("glVertexAttribI3iv"); fp_glVertexAttribI4iv = (pfn_glVertexAttribI4iv)load("glVertexAttribI4iv"); fp_glVertexAttribI1uiv = (pfn_glVertexAttribI1uiv)load("glVertexAttribI1uiv"); fp_glVertexAttribI2uiv = (pfn_glVertexAttribI2uiv)load("glVertexAttribI2uiv"); fp_glVertexAttribI3uiv = (pfn_glVertexAttribI3uiv)load("glVertexAttribI3uiv"); fp_glVertexAttribI4uiv = (pfn_glVertexAttribI4uiv)load("glVertexAttribI4uiv"); fp_glVertexAttribI4bv = (pfn_glVertexAttribI4bv)load("glVertexAttribI4bv"); fp_glVertexAttribI4sv = (pfn_glVertexAttribI4sv)load("glVertexAttribI4sv"); fp_glVertexAttribI4ubv = (pfn_glVertexAttribI4ubv)load("glVertexAttribI4ubv"); fp_glVertexAttribI4usv = (pfn_glVertexAttribI4usv)load("glVertexAttribI4usv"); fp_glGetUniformuiv = (pfn_glGetUniformuiv)load("glGetUniformuiv"); fp_glBindFragDataLocation = (pfn_glBindFragDataLocation)load("glBindFragDataLocation"); fp_glGetFragDataLocation = (pfn_glGetFragDataLocation)load("glGetFragDataLocation"); fp_glUniform1ui = (pfn_glUniform1ui)load("glUniform1ui"); fp_glUniform2ui = (pfn_glUniform2ui)load("glUniform2ui"); fp_glUniform3ui = (pfn_glUniform3ui)load("glUniform3ui"); fp_glUniform4ui = (pfn_glUniform4ui)load("glUniform4ui"); fp_glUniform1uiv = (pfn_glUniform1uiv)load("glUniform1uiv"); fp_glUniform2uiv = (pfn_glUniform2uiv)load("glUniform2uiv"); fp_glUniform3uiv = (pfn_glUniform3uiv)load("glUniform3uiv"); fp_glUniform4uiv = (pfn_glUniform4uiv)load("glUniform4uiv"); fp_glTexParameterIiv = (pfn_glTexParameterIiv)load("glTexParameterIiv"); fp_glTexParameterIuiv = (pfn_glTexParameterIuiv)load("glTexParameterIuiv"); fp_glGetTexParameterIiv = (pfn_glGetTexParameterIiv)load("glGetTexParameterIiv"); fp_glGetTexParameterIuiv = (pfn_glGetTexParameterIuiv)load("glGetTexParameterIuiv"); fp_glClearBufferiv = (pfn_glClearBufferiv)load("glClearBufferiv"); fp_glClearBufferuiv = (pfn_glClearBufferuiv)load("glClearBufferuiv"); fp_glClearBufferfv = (pfn_glClearBufferfv)load("glClearBufferfv"); fp_glClearBufferfi = (pfn_glClearBufferfi)load("glClearBufferfi"); fp_glGetStringi = (pfn_glGetStringi)load("glGetStringi"); fp_glIsRenderbuffer = (pfn_glIsRenderbuffer)load("glIsRenderbuffer"); fp_glBindRenderbuffer = (pfn_glBindRenderbuffer)load("glBindRenderbuffer"); fp_glDeleteRenderbuffers = (pfn_glDeleteRenderbuffers)load("glDeleteRenderbuffers"); fp_glGenRenderbuffers = (pfn_glGenRenderbuffers)load("glGenRenderbuffers"); fp_glRenderbufferStorage = (pfn_glRenderbufferStorage)load("glRenderbufferStorage"); fp_glGetRenderbufferParameteriv = (pfn_glGetRenderbufferParameteriv)load("glGetRenderbufferParameteriv"); fp_glIsFramebuffer = (pfn_glIsFramebuffer)load("glIsFramebuffer"); fp_glBindFramebuffer = (pfn_glBindFramebuffer)load("glBindFramebuffer"); fp_glDeleteFramebuffers = (pfn_glDeleteFramebuffers)load("glDeleteFramebuffers"); fp_glGenFramebuffers = (pfn_glGenFramebuffers)load("glGenFramebuffers"); fp_glCheckFramebufferStatus = (pfn_glCheckFramebufferStatus)load("glCheckFramebufferStatus"); fp_glFramebufferTexture1D = (pfn_glFramebufferTexture1D)load("glFramebufferTexture1D"); fp_glFramebufferTexture2D = (pfn_glFramebufferTexture2D)load("glFramebufferTexture2D"); fp_glFramebufferTexture3D = (pfn_glFramebufferTexture3D)load("glFramebufferTexture3D"); fp_glFramebufferRenderbuffer = (pfn_glFramebufferRenderbuffer)load("glFramebufferRenderbuffer"); fp_glGetFramebufferAttachmentParameteriv = (pfn_glGetFramebufferAttachmentParameteriv)load("glGetFramebufferAttachmentParameteriv"); fp_glGenerateMipmap = (pfn_glGenerateMipmap)load("glGenerateMipmap"); fp_glBlitFramebuffer = (pfn_glBlitFramebuffer)load("glBlitFramebuffer"); fp_glRenderbufferStorageMultisample = (pfn_glRenderbufferStorageMultisample)load("glRenderbufferStorageMultisample"); fp_glFramebufferTextureLayer = (pfn_glFramebufferTextureLayer)load("glFramebufferTextureLayer"); fp_glMapBufferRange = (pfn_glMapBufferRange)load("glMapBufferRange"); fp_glFlushMappedBufferRange = (pfn_glFlushMappedBufferRange)load("glFlushMappedBufferRange"); fp_glBindVertexArray = (pfn_glBindVertexArray)load("glBindVertexArray"); fp_glDeleteVertexArrays = (pfn_glDeleteVertexArrays)load("glDeleteVertexArrays"); fp_glGenVertexArrays = (pfn_glGenVertexArrays)load("glGenVertexArrays"); fp_glIsVertexArray = (pfn_glIsVertexArray)load("glIsVertexArray"); } GLboolean GLAD_VERSION_3_1 = GL_FALSE; static void load_GL_VERSION_3_1(LOADER load) { if(!GLAD_VERSION_3_1) return; fp_glDrawArraysInstanced = (pfn_glDrawArraysInstanced)load("glDrawArraysInstanced"); fp_glDrawElementsInstanced = (pfn_glDrawElementsInstanced)load("glDrawElementsInstanced"); fp_glTexBuffer = (pfn_glTexBuffer)load("glTexBuffer"); fp_glPrimitiveRestartIndex = (pfn_glPrimitiveRestartIndex)load("glPrimitiveRestartIndex"); fp_glCopyBufferSubData = (pfn_glCopyBufferSubData)load("glCopyBufferSubData"); fp_glGetUniformIndices = (pfn_glGetUniformIndices)load("glGetUniformIndices"); fp_glGetActiveUniformsiv = (pfn_glGetActiveUniformsiv)load("glGetActiveUniformsiv"); fp_glGetActiveUniformName = (pfn_glGetActiveUniformName)load("glGetActiveUniformName"); fp_glGetUniformBlockIndex = (pfn_glGetUniformBlockIndex)load("glGetUniformBlockIndex"); fp_glGetActiveUniformBlockiv = (pfn_glGetActiveUniformBlockiv)load("glGetActiveUniformBlockiv"); fp_glGetActiveUniformBlockName = (pfn_glGetActiveUniformBlockName)load("glGetActiveUniformBlockName"); fp_glUniformBlockBinding = (pfn_glUniformBlockBinding)load("glUniformBlockBinding"); fp_glBindBufferRange = (pfn_glBindBufferRange)load("glBindBufferRange"); fp_glBindBufferBase = (pfn_glBindBufferBase)load("glBindBufferBase"); fp_glGetIntegeri_v = (pfn_glGetIntegeri_v)load("glGetIntegeri_v"); } GLboolean GLAD_VERSION_3_2 = GL_FALSE; static void load_GL_VERSION_3_2(LOADER load) { if(!GLAD_VERSION_3_2) return; fp_glDrawElementsBaseVertex = (pfn_glDrawElementsBaseVertex)load("glDrawElementsBaseVertex"); fp_glDrawRangeElementsBaseVertex = (pfn_glDrawRangeElementsBaseVertex)load("glDrawRangeElementsBaseVertex"); fp_glDrawElementsInstancedBaseVertex = (pfn_glDrawElementsInstancedBaseVertex)load("glDrawElementsInstancedBaseVertex"); fp_glMultiDrawElementsBaseVertex = (pfn_glMultiDrawElementsBaseVertex)load("glMultiDrawElementsBaseVertex"); fp_glProvokingVertex = (pfn_glProvokingVertex)load("glProvokingVertex"); fp_glFenceSync = (pfn_glFenceSync)load("glFenceSync"); fp_glIsSync = (pfn_glIsSync)load("glIsSync"); fp_glDeleteSync = (pfn_glDeleteSync)load("glDeleteSync"); fp_glClientWaitSync = (pfn_glClientWaitSync)load("glClientWaitSync"); fp_glWaitSync = (pfn_glWaitSync)load("glWaitSync"); fp_glGetInteger64v = (pfn_glGetInteger64v)load("glGetInteger64v"); fp_glGetSynciv = (pfn_glGetSynciv)load("glGetSynciv"); fp_glGetInteger64i_v = (pfn_glGetInteger64i_v)load("glGetInteger64i_v"); fp_glGetBufferParameteri64v = (pfn_glGetBufferParameteri64v)load("glGetBufferParameteri64v"); fp_glFramebufferTexture = (pfn_glFramebufferTexture)load("glFramebufferTexture"); fp_glTexImage2DMultisample = (pfn_glTexImage2DMultisample)load("glTexImage2DMultisample"); fp_glTexImage3DMultisample = (pfn_glTexImage3DMultisample)load("glTexImage3DMultisample"); fp_glGetMultisamplefv = (pfn_glGetMultisamplefv)load("glGetMultisamplefv"); fp_glSampleMaski = (pfn_glSampleMaski)load("glSampleMaski"); } GLboolean GLAD_VERSION_3_3 = GL_FALSE; static void load_GL_VERSION_3_3(LOADER load) { if(!GLAD_VERSION_3_3) return; fp_glBindFragDataLocationIndexed = (pfn_glBindFragDataLocationIndexed)load("glBindFragDataLocationIndexed"); fp_glGetFragDataIndex = (pfn_glGetFragDataIndex)load("glGetFragDataIndex"); fp_glGenSamplers = (pfn_glGenSamplers)load("glGenSamplers"); fp_glDeleteSamplers = (pfn_glDeleteSamplers)load("glDeleteSamplers"); fp_glIsSampler = (pfn_glIsSampler)load("glIsSampler"); fp_glBindSampler = (pfn_glBindSampler)load("glBindSampler"); fp_glSamplerParameteri = (pfn_glSamplerParameteri)load("glSamplerParameteri"); fp_glSamplerParameteriv = (pfn_glSamplerParameteriv)load("glSamplerParameteriv"); fp_glSamplerParameterf = (pfn_glSamplerParameterf)load("glSamplerParameterf"); fp_glSamplerParameterfv = (pfn_glSamplerParameterfv)load("glSamplerParameterfv"); fp_glSamplerParameterIiv = (pfn_glSamplerParameterIiv)load("glSamplerParameterIiv"); fp_glSamplerParameterIuiv = (pfn_glSamplerParameterIuiv)load("glSamplerParameterIuiv"); fp_glGetSamplerParameteriv = (pfn_glGetSamplerParameteriv)load("glGetSamplerParameteriv"); fp_glGetSamplerParameterIiv = (pfn_glGetSamplerParameterIiv)load("glGetSamplerParameterIiv"); fp_glGetSamplerParameterfv = (pfn_glGetSamplerParameterfv)load("glGetSamplerParameterfv"); fp_glGetSamplerParameterIuiv = (pfn_glGetSamplerParameterIuiv)load("glGetSamplerParameterIuiv"); fp_glQueryCounter = (pfn_glQueryCounter)load("glQueryCounter"); fp_glGetQueryObjecti64v = (pfn_glGetQueryObjecti64v)load("glGetQueryObjecti64v"); fp_glGetQueryObjectui64v = (pfn_glGetQueryObjectui64v)load("glGetQueryObjectui64v"); fp_glVertexAttribDivisor = (pfn_glVertexAttribDivisor)load("glVertexAttribDivisor"); fp_glVertexAttribP1ui = (pfn_glVertexAttribP1ui)load("glVertexAttribP1ui"); fp_glVertexAttribP1uiv = (pfn_glVertexAttribP1uiv)load("glVertexAttribP1uiv"); fp_glVertexAttribP2ui = (pfn_glVertexAttribP2ui)load("glVertexAttribP2ui"); fp_glVertexAttribP2uiv = (pfn_glVertexAttribP2uiv)load("glVertexAttribP2uiv"); fp_glVertexAttribP3ui = (pfn_glVertexAttribP3ui)load("glVertexAttribP3ui"); fp_glVertexAttribP3uiv = (pfn_glVertexAttribP3uiv)load("glVertexAttribP3uiv"); fp_glVertexAttribP4ui = (pfn_glVertexAttribP4ui)load("glVertexAttribP4ui"); fp_glVertexAttribP4uiv = (pfn_glVertexAttribP4uiv)load("glVertexAttribP4uiv"); fp_glVertexP2ui = (pfn_glVertexP2ui)load("glVertexP2ui"); fp_glVertexP2uiv = (pfn_glVertexP2uiv)load("glVertexP2uiv"); fp_glVertexP3ui = (pfn_glVertexP3ui)load("glVertexP3ui"); fp_glVertexP3uiv = (pfn_glVertexP3uiv)load("glVertexP3uiv"); fp_glVertexP4ui = (pfn_glVertexP4ui)load("glVertexP4ui"); fp_glVertexP4uiv = (pfn_glVertexP4uiv)load("glVertexP4uiv"); fp_glTexCoordP1ui = (pfn_glTexCoordP1ui)load("glTexCoordP1ui"); fp_glTexCoordP1uiv = (pfn_glTexCoordP1uiv)load("glTexCoordP1uiv"); fp_glTexCoordP2ui = (pfn_glTexCoordP2ui)load("glTexCoordP2ui"); fp_glTexCoordP2uiv = (pfn_glTexCoordP2uiv)load("glTexCoordP2uiv"); fp_glTexCoordP3ui = (pfn_glTexCoordP3ui)load("glTexCoordP3ui"); fp_glTexCoordP3uiv = (pfn_glTexCoordP3uiv)load("glTexCoordP3uiv"); fp_glTexCoordP4ui = (pfn_glTexCoordP4ui)load("glTexCoordP4ui"); fp_glTexCoordP4uiv = (pfn_glTexCoordP4uiv)load("glTexCoordP4uiv"); fp_glMultiTexCoordP1ui = (pfn_glMultiTexCoordP1ui)load("glMultiTexCoordP1ui"); fp_glMultiTexCoordP1uiv = (pfn_glMultiTexCoordP1uiv)load("glMultiTexCoordP1uiv"); fp_glMultiTexCoordP2ui = (pfn_glMultiTexCoordP2ui)load("glMultiTexCoordP2ui"); fp_glMultiTexCoordP2uiv = (pfn_glMultiTexCoordP2uiv)load("glMultiTexCoordP2uiv"); fp_glMultiTexCoordP3ui = (pfn_glMultiTexCoordP3ui)load("glMultiTexCoordP3ui"); fp_glMultiTexCoordP3uiv = (pfn_glMultiTexCoordP3uiv)load("glMultiTexCoordP3uiv"); fp_glMultiTexCoordP4ui = (pfn_glMultiTexCoordP4ui)load("glMultiTexCoordP4ui"); fp_glMultiTexCoordP4uiv = (pfn_glMultiTexCoordP4uiv)load("glMultiTexCoordP4uiv"); fp_glNormalP3ui = (pfn_glNormalP3ui)load("glNormalP3ui"); fp_glNormalP3uiv = (pfn_glNormalP3uiv)load("glNormalP3uiv"); fp_glColorP3ui = (pfn_glColorP3ui)load("glColorP3ui"); fp_glColorP3uiv = (pfn_glColorP3uiv)load("glColorP3uiv"); fp_glColorP4ui = (pfn_glColorP4ui)load("glColorP4ui"); fp_glColorP4uiv = (pfn_glColorP4uiv)load("glColorP4uiv"); fp_glSecondaryColorP3ui = (pfn_glSecondaryColorP3ui)load("glSecondaryColorP3ui"); fp_glSecondaryColorP3uiv = (pfn_glSecondaryColorP3uiv)load("glSecondaryColorP3uiv"); } GLboolean GLAD_VERSION_4_0 = GL_FALSE; static void load_GL_VERSION_4_0(LOADER load) { if(!GLAD_VERSION_4_0) return; fp_glMinSampleShading = (pfn_glMinSampleShading)load("glMinSampleShading"); fp_glBlendEquationi = (pfn_glBlendEquationi)load("glBlendEquationi"); fp_glBlendEquationSeparatei = (pfn_glBlendEquationSeparatei)load("glBlendEquationSeparatei"); fp_glBlendFunci = (pfn_glBlendFunci)load("glBlendFunci"); fp_glBlendFuncSeparatei = (pfn_glBlendFuncSeparatei)load("glBlendFuncSeparatei"); fp_glDrawArraysIndirect = (pfn_glDrawArraysIndirect)load("glDrawArraysIndirect"); fp_glDrawElementsIndirect = (pfn_glDrawElementsIndirect)load("glDrawElementsIndirect"); fp_glUniform1d = (pfn_glUniform1d)load("glUniform1d"); fp_glUniform2d = (pfn_glUniform2d)load("glUniform2d"); fp_glUniform3d = (pfn_glUniform3d)load("glUniform3d"); fp_glUniform4d = (pfn_glUniform4d)load("glUniform4d"); fp_glUniform1dv = (pfn_glUniform1dv)load("glUniform1dv"); fp_glUniform2dv = (pfn_glUniform2dv)load("glUniform2dv"); fp_glUniform3dv = (pfn_glUniform3dv)load("glUniform3dv"); fp_glUniform4dv = (pfn_glUniform4dv)load("glUniform4dv"); fp_glUniformMatrix2dv = (pfn_glUniformMatrix2dv)load("glUniformMatrix2dv"); fp_glUniformMatrix3dv = (pfn_glUniformMatrix3dv)load("glUniformMatrix3dv"); fp_glUniformMatrix4dv = (pfn_glUniformMatrix4dv)load("glUniformMatrix4dv"); fp_glUniformMatrix2x3dv = (pfn_glUniformMatrix2x3dv)load("glUniformMatrix2x3dv"); fp_glUniformMatrix2x4dv = (pfn_glUniformMatrix2x4dv)load("glUniformMatrix2x4dv"); fp_glUniformMatrix3x2dv = (pfn_glUniformMatrix3x2dv)load("glUniformMatrix3x2dv"); fp_glUniformMatrix3x4dv = (pfn_glUniformMatrix3x4dv)load("glUniformMatrix3x4dv"); fp_glUniformMatrix4x2dv = (pfn_glUniformMatrix4x2dv)load("glUniformMatrix4x2dv"); fp_glUniformMatrix4x3dv = (pfn_glUniformMatrix4x3dv)load("glUniformMatrix4x3dv"); fp_glGetUniformdv = (pfn_glGetUniformdv)load("glGetUniformdv"); fp_glGetSubroutineUniformLocation = (pfn_glGetSubroutineUniformLocation)load("glGetSubroutineUniformLocation"); fp_glGetSubroutineIndex = (pfn_glGetSubroutineIndex)load("glGetSubroutineIndex"); fp_glGetActiveSubroutineUniformiv = (pfn_glGetActiveSubroutineUniformiv)load("glGetActiveSubroutineUniformiv"); fp_glGetActiveSubroutineUniformName = (pfn_glGetActiveSubroutineUniformName)load("glGetActiveSubroutineUniformName"); fp_glGetActiveSubroutineName = (pfn_glGetActiveSubroutineName)load("glGetActiveSubroutineName"); fp_glUniformSubroutinesuiv = (pfn_glUniformSubroutinesuiv)load("glUniformSubroutinesuiv"); fp_glGetUniformSubroutineuiv = (pfn_glGetUniformSubroutineuiv)load("glGetUniformSubroutineuiv"); fp_glGetProgramStageiv = (pfn_glGetProgramStageiv)load("glGetProgramStageiv"); fp_glPatchParameteri = (pfn_glPatchParameteri)load("glPatchParameteri"); fp_glPatchParameterfv = (pfn_glPatchParameterfv)load("glPatchParameterfv"); fp_glBindTransformFeedback = (pfn_glBindTransformFeedback)load("glBindTransformFeedback"); fp_glDeleteTransformFeedbacks = (pfn_glDeleteTransformFeedbacks)load("glDeleteTransformFeedbacks"); fp_glGenTransformFeedbacks = (pfn_glGenTransformFeedbacks)load("glGenTransformFeedbacks"); fp_glIsTransformFeedback = (pfn_glIsTransformFeedback)load("glIsTransformFeedback"); fp_glPauseTransformFeedback = (pfn_glPauseTransformFeedback)load("glPauseTransformFeedback"); fp_glResumeTransformFeedback = (pfn_glResumeTransformFeedback)load("glResumeTransformFeedback"); fp_glDrawTransformFeedback = (pfn_glDrawTransformFeedback)load("glDrawTransformFeedback"); fp_glDrawTransformFeedbackStream = (pfn_glDrawTransformFeedbackStream)load("glDrawTransformFeedbackStream"); fp_glBeginQueryIndexed = (pfn_glBeginQueryIndexed)load("glBeginQueryIndexed"); fp_glEndQueryIndexed = (pfn_glEndQueryIndexed)load("glEndQueryIndexed"); fp_glGetQueryIndexediv = (pfn_glGetQueryIndexediv)load("glGetQueryIndexediv"); } GLboolean GLAD_VERSION_4_1 = GL_FALSE; static void load_GL_VERSION_4_1(LOADER load) { if(!GLAD_VERSION_4_1) return; fp_glReleaseShaderCompiler = (pfn_glReleaseShaderCompiler)load("glReleaseShaderCompiler"); fp_glShaderBinary = (pfn_glShaderBinary)load("glShaderBinary"); fp_glGetShaderPrecisionFormat = (pfn_glGetShaderPrecisionFormat)load("glGetShaderPrecisionFormat"); fp_glDepthRangef = (pfn_glDepthRangef)load("glDepthRangef"); fp_glClearDepthf = (pfn_glClearDepthf)load("glClearDepthf"); fp_glGetProgramBinary = (pfn_glGetProgramBinary)load("glGetProgramBinary"); fp_glProgramBinary = (pfn_glProgramBinary)load("glProgramBinary"); fp_glProgramParameteri = (pfn_glProgramParameteri)load("glProgramParameteri"); fp_glUseProgramStages = (pfn_glUseProgramStages)load("glUseProgramStages"); fp_glActiveShaderProgram = (pfn_glActiveShaderProgram)load("glActiveShaderProgram"); fp_glCreateShaderProgramv = (pfn_glCreateShaderProgramv)load("glCreateShaderProgramv"); fp_glBindProgramPipeline = (pfn_glBindProgramPipeline)load("glBindProgramPipeline"); fp_glDeleteProgramPipelines = (pfn_glDeleteProgramPipelines)load("glDeleteProgramPipelines"); fp_glGenProgramPipelines = (pfn_glGenProgramPipelines)load("glGenProgramPipelines"); fp_glIsProgramPipeline = (pfn_glIsProgramPipeline)load("glIsProgramPipeline"); fp_glGetProgramPipelineiv = (pfn_glGetProgramPipelineiv)load("glGetProgramPipelineiv"); fp_glProgramUniform1i = (pfn_glProgramUniform1i)load("glProgramUniform1i"); fp_glProgramUniform1iv = (pfn_glProgramUniform1iv)load("glProgramUniform1iv"); fp_glProgramUniform1f = (pfn_glProgramUniform1f)load("glProgramUniform1f"); fp_glProgramUniform1fv = (pfn_glProgramUniform1fv)load("glProgramUniform1fv"); fp_glProgramUniform1d = (pfn_glProgramUniform1d)load("glProgramUniform1d"); fp_glProgramUniform1dv = (pfn_glProgramUniform1dv)load("glProgramUniform1dv"); fp_glProgramUniform1ui = (pfn_glProgramUniform1ui)load("glProgramUniform1ui"); fp_glProgramUniform1uiv = (pfn_glProgramUniform1uiv)load("glProgramUniform1uiv"); fp_glProgramUniform2i = (pfn_glProgramUniform2i)load("glProgramUniform2i"); fp_glProgramUniform2iv = (pfn_glProgramUniform2iv)load("glProgramUniform2iv"); fp_glProgramUniform2f = (pfn_glProgramUniform2f)load("glProgramUniform2f"); fp_glProgramUniform2fv = (pfn_glProgramUniform2fv)load("glProgramUniform2fv"); fp_glProgramUniform2d = (pfn_glProgramUniform2d)load("glProgramUniform2d"); fp_glProgramUniform2dv = (pfn_glProgramUniform2dv)load("glProgramUniform2dv"); fp_glProgramUniform2ui = (pfn_glProgramUniform2ui)load("glProgramUniform2ui"); fp_glProgramUniform2uiv = (pfn_glProgramUniform2uiv)load("glProgramUniform2uiv"); fp_glProgramUniform3i = (pfn_glProgramUniform3i)load("glProgramUniform3i"); fp_glProgramUniform3iv = (pfn_glProgramUniform3iv)load("glProgramUniform3iv"); fp_glProgramUniform3f = (pfn_glProgramUniform3f)load("glProgramUniform3f"); fp_glProgramUniform3fv = (pfn_glProgramUniform3fv)load("glProgramUniform3fv"); fp_glProgramUniform3d = (pfn_glProgramUniform3d)load("glProgramUniform3d"); fp_glProgramUniform3dv = (pfn_glProgramUniform3dv)load("glProgramUniform3dv"); fp_glProgramUniform3ui = (pfn_glProgramUniform3ui)load("glProgramUniform3ui"); fp_glProgramUniform3uiv = (pfn_glProgramUniform3uiv)load("glProgramUniform3uiv"); fp_glProgramUniform4i = (pfn_glProgramUniform4i)load("glProgramUniform4i"); fp_glProgramUniform4iv = (pfn_glProgramUniform4iv)load("glProgramUniform4iv"); fp_glProgramUniform4f = (pfn_glProgramUniform4f)load("glProgramUniform4f"); fp_glProgramUniform4fv = (pfn_glProgramUniform4fv)load("glProgramUniform4fv"); fp_glProgramUniform4d = (pfn_glProgramUniform4d)load("glProgramUniform4d"); fp_glProgramUniform4dv = (pfn_glProgramUniform4dv)load("glProgramUniform4dv"); fp_glProgramUniform4ui = (pfn_glProgramUniform4ui)load("glProgramUniform4ui"); fp_glProgramUniform4uiv = (pfn_glProgramUniform4uiv)load("glProgramUniform4uiv"); fp_glProgramUniformMatrix2fv = (pfn_glProgramUniformMatrix2fv)load("glProgramUniformMatrix2fv"); fp_glProgramUniformMatrix3fv = (pfn_glProgramUniformMatrix3fv)load("glProgramUniformMatrix3fv"); fp_glProgramUniformMatrix4fv = (pfn_glProgramUniformMatrix4fv)load("glProgramUniformMatrix4fv"); fp_glProgramUniformMatrix2dv = (pfn_glProgramUniformMatrix2dv)load("glProgramUniformMatrix2dv"); fp_glProgramUniformMatrix3dv = (pfn_glProgramUniformMatrix3dv)load("glProgramUniformMatrix3dv"); fp_glProgramUniformMatrix4dv = (pfn_glProgramUniformMatrix4dv)load("glProgramUniformMatrix4dv"); fp_glProgramUniformMatrix2x3fv = (pfn_glProgramUniformMatrix2x3fv)load("glProgramUniformMatrix2x3fv"); fp_glProgramUniformMatrix3x2fv = (pfn_glProgramUniformMatrix3x2fv)load("glProgramUniformMatrix3x2fv"); fp_glProgramUniformMatrix2x4fv = (pfn_glProgramUniformMatrix2x4fv)load("glProgramUniformMatrix2x4fv"); fp_glProgramUniformMatrix4x2fv = (pfn_glProgramUniformMatrix4x2fv)load("glProgramUniformMatrix4x2fv"); fp_glProgramUniformMatrix3x4fv = (pfn_glProgramUniformMatrix3x4fv)load("glProgramUniformMatrix3x4fv"); fp_glProgramUniformMatrix4x3fv = (pfn_glProgramUniformMatrix4x3fv)load("glProgramUniformMatrix4x3fv"); fp_glProgramUniformMatrix2x3dv = (pfn_glProgramUniformMatrix2x3dv)load("glProgramUniformMatrix2x3dv"); fp_glProgramUniformMatrix3x2dv = (pfn_glProgramUniformMatrix3x2dv)load("glProgramUniformMatrix3x2dv"); fp_glProgramUniformMatrix2x4dv = (pfn_glProgramUniformMatrix2x4dv)load("glProgramUniformMatrix2x4dv"); fp_glProgramUniformMatrix4x2dv = (pfn_glProgramUniformMatrix4x2dv)load("glProgramUniformMatrix4x2dv"); fp_glProgramUniformMatrix3x4dv = (pfn_glProgramUniformMatrix3x4dv)load("glProgramUniformMatrix3x4dv"); fp_glProgramUniformMatrix4x3dv = (pfn_glProgramUniformMatrix4x3dv)load("glProgramUniformMatrix4x3dv"); fp_glValidateProgramPipeline = (pfn_glValidateProgramPipeline)load("glValidateProgramPipeline"); fp_glGetProgramPipelineInfoLog = (pfn_glGetProgramPipelineInfoLog)load("glGetProgramPipelineInfoLog"); fp_glVertexAttribL1d = (pfn_glVertexAttribL1d)load("glVertexAttribL1d"); fp_glVertexAttribL2d = (pfn_glVertexAttribL2d)load("glVertexAttribL2d"); fp_glVertexAttribL3d = (pfn_glVertexAttribL3d)load("glVertexAttribL3d"); fp_glVertexAttribL4d = (pfn_glVertexAttribL4d)load("glVertexAttribL4d"); fp_glVertexAttribL1dv = (pfn_glVertexAttribL1dv)load("glVertexAttribL1dv"); fp_glVertexAttribL2dv = (pfn_glVertexAttribL2dv)load("glVertexAttribL2dv"); fp_glVertexAttribL3dv = (pfn_glVertexAttribL3dv)load("glVertexAttribL3dv"); fp_glVertexAttribL4dv = (pfn_glVertexAttribL4dv)load("glVertexAttribL4dv"); fp_glVertexAttribLPointer = (pfn_glVertexAttribLPointer)load("glVertexAttribLPointer"); fp_glGetVertexAttribLdv = (pfn_glGetVertexAttribLdv)load("glGetVertexAttribLdv"); fp_glViewportArrayv = (pfn_glViewportArrayv)load("glViewportArrayv"); fp_glViewportIndexedf = (pfn_glViewportIndexedf)load("glViewportIndexedf"); fp_glViewportIndexedfv = (pfn_glViewportIndexedfv)load("glViewportIndexedfv"); fp_glScissorArrayv = (pfn_glScissorArrayv)load("glScissorArrayv"); fp_glScissorIndexed = (pfn_glScissorIndexed)load("glScissorIndexed"); fp_glScissorIndexedv = (pfn_glScissorIndexedv)load("glScissorIndexedv"); fp_glDepthRangeArrayv = (pfn_glDepthRangeArrayv)load("glDepthRangeArrayv"); fp_glDepthRangeIndexed = (pfn_glDepthRangeIndexed)load("glDepthRangeIndexed"); fp_glGetFloati_v = (pfn_glGetFloati_v)load("glGetFloati_v"); fp_glGetDoublei_v = (pfn_glGetDoublei_v)load("glGetDoublei_v"); } GLboolean GLAD_VERSION_4_2 = GL_FALSE; static void load_GL_VERSION_4_2(LOADER load) { if(!GLAD_VERSION_4_2) return; fp_glDrawArraysInstancedBaseInstance = (pfn_glDrawArraysInstancedBaseInstance)load("glDrawArraysInstancedBaseInstance"); fp_glDrawElementsInstancedBaseInstance = (pfn_glDrawElementsInstancedBaseInstance)load("glDrawElementsInstancedBaseInstance"); fp_glDrawElementsInstancedBaseVertexBaseInstance = (pfn_glDrawElementsInstancedBaseVertexBaseInstance)load("glDrawElementsInstancedBaseVertexBaseInstance"); fp_glGetInternalformativ = (pfn_glGetInternalformativ)load("glGetInternalformativ"); fp_glGetActiveAtomicCounterBufferiv = (pfn_glGetActiveAtomicCounterBufferiv)load("glGetActiveAtomicCounterBufferiv"); fp_glBindImageTexture = (pfn_glBindImageTexture)load("glBindImageTexture"); fp_glMemoryBarrier = (pfn_glMemoryBarrier)load("glMemoryBarrier"); fp_glTexStorage1D = (pfn_glTexStorage1D)load("glTexStorage1D"); fp_glTexStorage2D = (pfn_glTexStorage2D)load("glTexStorage2D"); fp_glTexStorage3D = (pfn_glTexStorage3D)load("glTexStorage3D"); fp_glDrawTransformFeedbackInstanced = (pfn_glDrawTransformFeedbackInstanced)load("glDrawTransformFeedbackInstanced"); fp_glDrawTransformFeedbackStreamInstanced = (pfn_glDrawTransformFeedbackStreamInstanced)load("glDrawTransformFeedbackStreamInstanced"); } GLboolean GLAD_VERSION_4_3 = GL_FALSE; static void load_GL_VERSION_4_3(LOADER load) { if(!GLAD_VERSION_4_3) return; fp_glClearBufferData = (pfn_glClearBufferData)load("glClearBufferData"); fp_glClearBufferSubData = (pfn_glClearBufferSubData)load("glClearBufferSubData"); fp_glDispatchCompute = (pfn_glDispatchCompute)load("glDispatchCompute"); fp_glDispatchComputeIndirect = (pfn_glDispatchComputeIndirect)load("glDispatchComputeIndirect"); fp_glCopyImageSubData = (pfn_glCopyImageSubData)load("glCopyImageSubData"); fp_glFramebufferParameteri = (pfn_glFramebufferParameteri)load("glFramebufferParameteri"); fp_glGetFramebufferParameteriv = (pfn_glGetFramebufferParameteriv)load("glGetFramebufferParameteriv"); fp_glGetInternalformati64v = (pfn_glGetInternalformati64v)load("glGetInternalformati64v"); fp_glInvalidateTexSubImage = (pfn_glInvalidateTexSubImage)load("glInvalidateTexSubImage"); fp_glInvalidateTexImage = (pfn_glInvalidateTexImage)load("glInvalidateTexImage"); fp_glInvalidateBufferSubData = (pfn_glInvalidateBufferSubData)load("glInvalidateBufferSubData"); fp_glInvalidateBufferData = (pfn_glInvalidateBufferData)load("glInvalidateBufferData"); fp_glInvalidateFramebuffer = (pfn_glInvalidateFramebuffer)load("glInvalidateFramebuffer"); fp_glInvalidateSubFramebuffer = (pfn_glInvalidateSubFramebuffer)load("glInvalidateSubFramebuffer"); fp_glMultiDrawArraysIndirect = (pfn_glMultiDrawArraysIndirect)load("glMultiDrawArraysIndirect"); fp_glMultiDrawElementsIndirect = (pfn_glMultiDrawElementsIndirect)load("glMultiDrawElementsIndirect"); fp_glGetProgramInterfaceiv = (pfn_glGetProgramInterfaceiv)load("glGetProgramInterfaceiv"); fp_glGetProgramResourceIndex = (pfn_glGetProgramResourceIndex)load("glGetProgramResourceIndex"); fp_glGetProgramResourceName = (pfn_glGetProgramResourceName)load("glGetProgramResourceName"); fp_glGetProgramResourceiv = (pfn_glGetProgramResourceiv)load("glGetProgramResourceiv"); fp_glGetProgramResourceLocation = (pfn_glGetProgramResourceLocation)load("glGetProgramResourceLocation"); fp_glGetProgramResourceLocationIndex = (pfn_glGetProgramResourceLocationIndex)load("glGetProgramResourceLocationIndex"); fp_glShaderStorageBlockBinding = (pfn_glShaderStorageBlockBinding)load("glShaderStorageBlockBinding"); fp_glTexBufferRange = (pfn_glTexBufferRange)load("glTexBufferRange"); fp_glTexStorage2DMultisample = (pfn_glTexStorage2DMultisample)load("glTexStorage2DMultisample"); fp_glTexStorage3DMultisample = (pfn_glTexStorage3DMultisample)load("glTexStorage3DMultisample"); fp_glTextureView = (pfn_glTextureView)load("glTextureView"); fp_glBindVertexBuffer = (pfn_glBindVertexBuffer)load("glBindVertexBuffer"); fp_glVertexAttribFormat = (pfn_glVertexAttribFormat)load("glVertexAttribFormat"); fp_glVertexAttribIFormat = (pfn_glVertexAttribIFormat)load("glVertexAttribIFormat"); fp_glVertexAttribLFormat = (pfn_glVertexAttribLFormat)load("glVertexAttribLFormat"); fp_glVertexAttribBinding = (pfn_glVertexAttribBinding)load("glVertexAttribBinding"); fp_glVertexBindingDivisor = (pfn_glVertexBindingDivisor)load("glVertexBindingDivisor"); fp_glDebugMessageControl = (pfn_glDebugMessageControl)load("glDebugMessageControl"); fp_glDebugMessageInsert = (pfn_glDebugMessageInsert)load("glDebugMessageInsert"); fp_glDebugMessageCallback = (pfn_glDebugMessageCallback)load("glDebugMessageCallback"); fp_glGetDebugMessageLog = (pfn_glGetDebugMessageLog)load("glGetDebugMessageLog"); fp_glPushDebugGroup = (pfn_glPushDebugGroup)load("glPushDebugGroup"); fp_glPopDebugGroup = (pfn_glPopDebugGroup)load("glPopDebugGroup"); fp_glObjectLabel = (pfn_glObjectLabel)load("glObjectLabel"); fp_glGetObjectLabel = (pfn_glGetObjectLabel)load("glGetObjectLabel"); fp_glObjectPtrLabel = (pfn_glObjectPtrLabel)load("glObjectPtrLabel"); fp_glGetObjectPtrLabel = (pfn_glGetObjectPtrLabel)load("glGetObjectPtrLabel"); fp_glGetPointerv = (pfn_glGetPointerv)load("glGetPointerv"); fp_glGetPointerv = (pfn_glGetPointerv)load("glGetPointerv"); } GLboolean GLAD_VERSION_4_4 = GL_FALSE; static void load_GL_VERSION_4_4(LOADER load) { if(!GLAD_VERSION_4_4) return; fp_glBufferStorage = (pfn_glBufferStorage)load("glBufferStorage"); fp_glClearTexImage = (pfn_glClearTexImage)load("glClearTexImage"); fp_glClearTexSubImage = (pfn_glClearTexSubImage)load("glClearTexSubImage"); fp_glBindBuffersBase = (pfn_glBindBuffersBase)load("glBindBuffersBase"); fp_glBindBuffersRange = (pfn_glBindBuffersRange)load("glBindBuffersRange"); fp_glBindTextures = (pfn_glBindTextures)load("glBindTextures"); fp_glBindSamplers = (pfn_glBindSamplers)load("glBindSamplers"); fp_glBindImageTextures = (pfn_glBindImageTextures)load("glBindImageTextures"); fp_glBindVertexBuffers = (pfn_glBindVertexBuffers)load("glBindVertexBuffers"); } GLboolean GLAD_VERSION_4_5 = GL_FALSE; static void load_GL_VERSION_4_5(LOADER load) { if(!GLAD_VERSION_4_5) return; fp_glClipControl = (pfn_glClipControl)load("glClipControl"); fp_glCreateTransformFeedbacks = (pfn_glCreateTransformFeedbacks)load("glCreateTransformFeedbacks"); fp_glTransformFeedbackBufferBase = (pfn_glTransformFeedbackBufferBase)load("glTransformFeedbackBufferBase"); fp_glTransformFeedbackBufferRange = (pfn_glTransformFeedbackBufferRange)load("glTransformFeedbackBufferRange"); fp_glGetTransformFeedbackiv = (pfn_glGetTransformFeedbackiv)load("glGetTransformFeedbackiv"); fp_glGetTransformFeedbacki_v = (pfn_glGetTransformFeedbacki_v)load("glGetTransformFeedbacki_v"); fp_glGetTransformFeedbacki64_v = (pfn_glGetTransformFeedbacki64_v)load("glGetTransformFeedbacki64_v"); fp_glCreateBuffers = (pfn_glCreateBuffers)load("glCreateBuffers"); fp_glNamedBufferStorage = (pfn_glNamedBufferStorage)load("glNamedBufferStorage"); fp_glNamedBufferData = (pfn_glNamedBufferData)load("glNamedBufferData"); fp_glNamedBufferSubData = (pfn_glNamedBufferSubData)load("glNamedBufferSubData"); fp_glCopyNamedBufferSubData = (pfn_glCopyNamedBufferSubData)load("glCopyNamedBufferSubData"); fp_glClearNamedBufferData = (pfn_glClearNamedBufferData)load("glClearNamedBufferData"); fp_glClearNamedBufferSubData = (pfn_glClearNamedBufferSubData)load("glClearNamedBufferSubData"); fp_glMapNamedBuffer = (pfn_glMapNamedBuffer)load("glMapNamedBuffer"); fp_glMapNamedBufferRange = (pfn_glMapNamedBufferRange)load("glMapNamedBufferRange"); fp_glUnmapNamedBuffer = (pfn_glUnmapNamedBuffer)load("glUnmapNamedBuffer"); fp_glFlushMappedNamedBufferRange = (pfn_glFlushMappedNamedBufferRange)load("glFlushMappedNamedBufferRange"); fp_glGetNamedBufferParameteriv = (pfn_glGetNamedBufferParameteriv)load("glGetNamedBufferParameteriv"); fp_glGetNamedBufferParameteri64v = (pfn_glGetNamedBufferParameteri64v)load("glGetNamedBufferParameteri64v"); fp_glGetNamedBufferPointerv = (pfn_glGetNamedBufferPointerv)load("glGetNamedBufferPointerv"); fp_glGetNamedBufferSubData = (pfn_glGetNamedBufferSubData)load("glGetNamedBufferSubData"); fp_glCreateFramebuffers = (pfn_glCreateFramebuffers)load("glCreateFramebuffers"); fp_glNamedFramebufferRenderbuffer = (pfn_glNamedFramebufferRenderbuffer)load("glNamedFramebufferRenderbuffer"); fp_glNamedFramebufferParameteri = (pfn_glNamedFramebufferParameteri)load("glNamedFramebufferParameteri"); fp_glNamedFramebufferTexture = (pfn_glNamedFramebufferTexture)load("glNamedFramebufferTexture"); fp_glNamedFramebufferTextureLayer = (pfn_glNamedFramebufferTextureLayer)load("glNamedFramebufferTextureLayer"); fp_glNamedFramebufferDrawBuffer = (pfn_glNamedFramebufferDrawBuffer)load("glNamedFramebufferDrawBuffer"); fp_glNamedFramebufferDrawBuffers = (pfn_glNamedFramebufferDrawBuffers)load("glNamedFramebufferDrawBuffers"); fp_glNamedFramebufferReadBuffer = (pfn_glNamedFramebufferReadBuffer)load("glNamedFramebufferReadBuffer"); fp_glInvalidateNamedFramebufferData = (pfn_glInvalidateNamedFramebufferData)load("glInvalidateNamedFramebufferData"); fp_glInvalidateNamedFramebufferSubData = (pfn_glInvalidateNamedFramebufferSubData)load("glInvalidateNamedFramebufferSubData"); fp_glClearNamedFramebufferiv = (pfn_glClearNamedFramebufferiv)load("glClearNamedFramebufferiv"); fp_glClearNamedFramebufferuiv = (pfn_glClearNamedFramebufferuiv)load("glClearNamedFramebufferuiv"); fp_glClearNamedFramebufferfv = (pfn_glClearNamedFramebufferfv)load("glClearNamedFramebufferfv"); fp_glClearNamedFramebufferfi = (pfn_glClearNamedFramebufferfi)load("glClearNamedFramebufferfi"); fp_glBlitNamedFramebuffer = (pfn_glBlitNamedFramebuffer)load("glBlitNamedFramebuffer"); fp_glCheckNamedFramebufferStatus = (pfn_glCheckNamedFramebufferStatus)load("glCheckNamedFramebufferStatus"); fp_glGetNamedFramebufferParameteriv = (pfn_glGetNamedFramebufferParameteriv)load("glGetNamedFramebufferParameteriv"); fp_glGetNamedFramebufferAttachmentParameteriv = (pfn_glGetNamedFramebufferAttachmentParameteriv)load("glGetNamedFramebufferAttachmentParameteriv"); fp_glCreateRenderbuffers = (pfn_glCreateRenderbuffers)load("glCreateRenderbuffers"); fp_glNamedRenderbufferStorage = (pfn_glNamedRenderbufferStorage)load("glNamedRenderbufferStorage"); fp_glNamedRenderbufferStorageMultisample = (pfn_glNamedRenderbufferStorageMultisample)load("glNamedRenderbufferStorageMultisample"); fp_glGetNamedRenderbufferParameteriv = (pfn_glGetNamedRenderbufferParameteriv)load("glGetNamedRenderbufferParameteriv"); fp_glCreateTextures = (pfn_glCreateTextures)load("glCreateTextures"); fp_glTextureBuffer = (pfn_glTextureBuffer)load("glTextureBuffer"); fp_glTextureBufferRange = (pfn_glTextureBufferRange)load("glTextureBufferRange"); fp_glTextureStorage1D = (pfn_glTextureStorage1D)load("glTextureStorage1D"); fp_glTextureStorage2D = (pfn_glTextureStorage2D)load("glTextureStorage2D"); fp_glTextureStorage3D = (pfn_glTextureStorage3D)load("glTextureStorage3D"); fp_glTextureStorage2DMultisample = (pfn_glTextureStorage2DMultisample)load("glTextureStorage2DMultisample"); fp_glTextureStorage3DMultisample = (pfn_glTextureStorage3DMultisample)load("glTextureStorage3DMultisample"); fp_glTextureSubImage1D = (pfn_glTextureSubImage1D)load("glTextureSubImage1D"); fp_glTextureSubImage2D = (pfn_glTextureSubImage2D)load("glTextureSubImage2D"); fp_glTextureSubImage3D = (pfn_glTextureSubImage3D)load("glTextureSubImage3D"); fp_glCompressedTextureSubImage1D = (pfn_glCompressedTextureSubImage1D)load("glCompressedTextureSubImage1D"); fp_glCompressedTextureSubImage2D = (pfn_glCompressedTextureSubImage2D)load("glCompressedTextureSubImage2D"); fp_glCompressedTextureSubImage3D = (pfn_glCompressedTextureSubImage3D)load("glCompressedTextureSubImage3D"); fp_glCopyTextureSubImage1D = (pfn_glCopyTextureSubImage1D)load("glCopyTextureSubImage1D"); fp_glCopyTextureSubImage2D = (pfn_glCopyTextureSubImage2D)load("glCopyTextureSubImage2D"); fp_glCopyTextureSubImage3D = (pfn_glCopyTextureSubImage3D)load("glCopyTextureSubImage3D"); fp_glTextureParameterf = (pfn_glTextureParameterf)load("glTextureParameterf"); fp_glTextureParameterfv = (pfn_glTextureParameterfv)load("glTextureParameterfv"); fp_glTextureParameteri = (pfn_glTextureParameteri)load("glTextureParameteri"); fp_glTextureParameterIiv = (pfn_glTextureParameterIiv)load("glTextureParameterIiv"); fp_glTextureParameterIuiv = (pfn_glTextureParameterIuiv)load("glTextureParameterIuiv"); fp_glTextureParameteriv = (pfn_glTextureParameteriv)load("glTextureParameteriv"); fp_glGenerateTextureMipmap = (pfn_glGenerateTextureMipmap)load("glGenerateTextureMipmap"); fp_glBindTextureUnit = (pfn_glBindTextureUnit)load("glBindTextureUnit"); fp_glGetTextureImage = (pfn_glGetTextureImage)load("glGetTextureImage"); fp_glGetCompressedTextureImage = (pfn_glGetCompressedTextureImage)load("glGetCompressedTextureImage"); fp_glGetTextureLevelParameterfv = (pfn_glGetTextureLevelParameterfv)load("glGetTextureLevelParameterfv"); fp_glGetTextureLevelParameteriv = (pfn_glGetTextureLevelParameteriv)load("glGetTextureLevelParameteriv"); fp_glGetTextureParameterfv = (pfn_glGetTextureParameterfv)load("glGetTextureParameterfv"); fp_glGetTextureParameterIiv = (pfn_glGetTextureParameterIiv)load("glGetTextureParameterIiv"); fp_glGetTextureParameterIuiv = (pfn_glGetTextureParameterIuiv)load("glGetTextureParameterIuiv"); fp_glGetTextureParameteriv = (pfn_glGetTextureParameteriv)load("glGetTextureParameteriv"); fp_glCreateVertexArrays = (pfn_glCreateVertexArrays)load("glCreateVertexArrays"); fp_glDisableVertexArrayAttrib = (pfn_glDisableVertexArrayAttrib)load("glDisableVertexArrayAttrib"); fp_glEnableVertexArrayAttrib = (pfn_glEnableVertexArrayAttrib)load("glEnableVertexArrayAttrib"); fp_glVertexArrayElementBuffer = (pfn_glVertexArrayElementBuffer)load("glVertexArrayElementBuffer"); fp_glVertexArrayVertexBuffer = (pfn_glVertexArrayVertexBuffer)load("glVertexArrayVertexBuffer"); fp_glVertexArrayVertexBuffers = (pfn_glVertexArrayVertexBuffers)load("glVertexArrayVertexBuffers"); fp_glVertexArrayAttribBinding = (pfn_glVertexArrayAttribBinding)load("glVertexArrayAttribBinding"); fp_glVertexArrayAttribFormat = (pfn_glVertexArrayAttribFormat)load("glVertexArrayAttribFormat"); fp_glVertexArrayAttribIFormat = (pfn_glVertexArrayAttribIFormat)load("glVertexArrayAttribIFormat"); fp_glVertexArrayAttribLFormat = (pfn_glVertexArrayAttribLFormat)load("glVertexArrayAttribLFormat"); fp_glVertexArrayBindingDivisor = (pfn_glVertexArrayBindingDivisor)load("glVertexArrayBindingDivisor"); fp_glGetVertexArrayiv = (pfn_glGetVertexArrayiv)load("glGetVertexArrayiv"); fp_glGetVertexArrayIndexediv = (pfn_glGetVertexArrayIndexediv)load("glGetVertexArrayIndexediv"); fp_glGetVertexArrayIndexed64iv = (pfn_glGetVertexArrayIndexed64iv)load("glGetVertexArrayIndexed64iv"); fp_glCreateSamplers = (pfn_glCreateSamplers)load("glCreateSamplers"); fp_glCreateProgramPipelines = (pfn_glCreateProgramPipelines)load("glCreateProgramPipelines"); fp_glCreateQueries = (pfn_glCreateQueries)load("glCreateQueries"); fp_glGetQueryBufferObjecti64v = (pfn_glGetQueryBufferObjecti64v)load("glGetQueryBufferObjecti64v"); fp_glGetQueryBufferObjectiv = (pfn_glGetQueryBufferObjectiv)load("glGetQueryBufferObjectiv"); fp_glGetQueryBufferObjectui64v = (pfn_glGetQueryBufferObjectui64v)load("glGetQueryBufferObjectui64v"); fp_glGetQueryBufferObjectuiv = (pfn_glGetQueryBufferObjectuiv)load("glGetQueryBufferObjectuiv"); fp_glMemoryBarrierByRegion = (pfn_glMemoryBarrierByRegion)load("glMemoryBarrierByRegion"); fp_glGetTextureSubImage = (pfn_glGetTextureSubImage)load("glGetTextureSubImage"); fp_glGetCompressedTextureSubImage = (pfn_glGetCompressedTextureSubImage)load("glGetCompressedTextureSubImage"); fp_glGetGraphicsResetStatus = (pfn_glGetGraphicsResetStatus)load("glGetGraphicsResetStatus"); fp_glGetnCompressedTexImage = (pfn_glGetnCompressedTexImage)load("glGetnCompressedTexImage"); fp_glGetnTexImage = (pfn_glGetnTexImage)load("glGetnTexImage"); fp_glGetnUniformdv = (pfn_glGetnUniformdv)load("glGetnUniformdv"); fp_glGetnUniformfv = (pfn_glGetnUniformfv)load("glGetnUniformfv"); fp_glGetnUniformiv = (pfn_glGetnUniformiv)load("glGetnUniformiv"); fp_glGetnUniformuiv = (pfn_glGetnUniformuiv)load("glGetnUniformuiv"); fp_glReadnPixels = (pfn_glReadnPixels)load("glReadnPixels"); fp_glGetnMapdv = (pfn_glGetnMapdv)load("glGetnMapdv"); fp_glGetnMapfv = (pfn_glGetnMapfv)load("glGetnMapfv"); fp_glGetnMapiv = (pfn_glGetnMapiv)load("glGetnMapiv"); fp_glGetnPixelMapfv = (pfn_glGetnPixelMapfv)load("glGetnPixelMapfv"); fp_glGetnPixelMapuiv = (pfn_glGetnPixelMapuiv)load("glGetnPixelMapuiv"); fp_glGetnPixelMapusv = (pfn_glGetnPixelMapusv)load("glGetnPixelMapusv"); fp_glGetnPolygonStipple = (pfn_glGetnPolygonStipple)load("glGetnPolygonStipple"); fp_glGetnColorTable = (pfn_glGetnColorTable)load("glGetnColorTable"); fp_glGetnConvolutionFilter = (pfn_glGetnConvolutionFilter)load("glGetnConvolutionFilter"); fp_glGetnSeparableFilter = (pfn_glGetnSeparableFilter)load("glGetnSeparableFilter"); fp_glGetnHistogram = (pfn_glGetnHistogram)load("glGetnHistogram"); fp_glGetnMinmax = (pfn_glGetnMinmax)load("glGetnMinmax"); fp_glTextureBarrier = (pfn_glTextureBarrier)load("glTextureBarrier"); } GLboolean GLAD_ES_VERSION_2_0 = GL_FALSE; static void load_GL_ES_VERSION_2_0(LOADER load) { if(!GLAD_ES_VERSION_2_0) return; fp_glActiveTexture = (pfn_glActiveTexture)load("glActiveTexture"); fp_glAttachShader = (pfn_glAttachShader)load("glAttachShader"); fp_glBindAttribLocation = (pfn_glBindAttribLocation)load("glBindAttribLocation"); fp_glBindBuffer = (pfn_glBindBuffer)load("glBindBuffer"); fp_glBindFramebuffer = (pfn_glBindFramebuffer)load("glBindFramebuffer"); fp_glBindRenderbuffer = (pfn_glBindRenderbuffer)load("glBindRenderbuffer"); fp_glBindTexture = (pfn_glBindTexture)load("glBindTexture"); fp_glBlendColor = (pfn_glBlendColor)load("glBlendColor"); fp_glBlendEquation = (pfn_glBlendEquation)load("glBlendEquation"); fp_glBlendEquationSeparate = (pfn_glBlendEquationSeparate)load("glBlendEquationSeparate"); fp_glBlendFunc = (pfn_glBlendFunc)load("glBlendFunc"); fp_glBlendFuncSeparate = (pfn_glBlendFuncSeparate)load("glBlendFuncSeparate"); fp_glBufferData = (pfn_glBufferData)load("glBufferData"); fp_glBufferSubData = (pfn_glBufferSubData)load("glBufferSubData"); fp_glCheckFramebufferStatus = (pfn_glCheckFramebufferStatus)load("glCheckFramebufferStatus"); fp_glClear = (pfn_glClear)load("glClear"); fp_glClearColor = (pfn_glClearColor)load("glClearColor"); fp_glClearDepthf = (pfn_glClearDepthf)load("glClearDepthf"); fp_glClearStencil = (pfn_glClearStencil)load("glClearStencil"); fp_glColorMask = (pfn_glColorMask)load("glColorMask"); fp_glCompileShader = (pfn_glCompileShader)load("glCompileShader"); fp_glCompressedTexImage2D = (pfn_glCompressedTexImage2D)load("glCompressedTexImage2D"); fp_glCompressedTexSubImage2D = (pfn_glCompressedTexSubImage2D)load("glCompressedTexSubImage2D"); fp_glCopyTexImage2D = (pfn_glCopyTexImage2D)load("glCopyTexImage2D"); fp_glCopyTexSubImage2D = (pfn_glCopyTexSubImage2D)load("glCopyTexSubImage2D"); fp_glCreateProgram = (pfn_glCreateProgram)load("glCreateProgram"); fp_glCreateShader = (pfn_glCreateShader)load("glCreateShader"); fp_glCullFace = (pfn_glCullFace)load("glCullFace"); fp_glDeleteBuffers = (pfn_glDeleteBuffers)load("glDeleteBuffers"); fp_glDeleteFramebuffers = (pfn_glDeleteFramebuffers)load("glDeleteFramebuffers"); fp_glDeleteProgram = (pfn_glDeleteProgram)load("glDeleteProgram"); fp_glDeleteRenderbuffers = (pfn_glDeleteRenderbuffers)load("glDeleteRenderbuffers"); fp_glDeleteShader = (pfn_glDeleteShader)load("glDeleteShader"); fp_glDeleteTextures = (pfn_glDeleteTextures)load("glDeleteTextures"); fp_glDepthFunc = (pfn_glDepthFunc)load("glDepthFunc"); fp_glDepthMask = (pfn_glDepthMask)load("glDepthMask"); fp_glDepthRangef = (pfn_glDepthRangef)load("glDepthRangef"); fp_glDetachShader = (pfn_glDetachShader)load("glDetachShader"); fp_glDisable = (pfn_glDisable)load("glDisable"); fp_glDisableVertexAttribArray = (pfn_glDisableVertexAttribArray)load("glDisableVertexAttribArray"); fp_glDrawArrays = (pfn_glDrawArrays)load("glDrawArrays"); fp_glDrawElements = (pfn_glDrawElements)load("glDrawElements"); fp_glEnable = (pfn_glEnable)load("glEnable"); fp_glEnableVertexAttribArray = (pfn_glEnableVertexAttribArray)load("glEnableVertexAttribArray"); fp_glFinish = (pfn_glFinish)load("glFinish"); fp_glFlush = (pfn_glFlush)load("glFlush"); fp_glFramebufferRenderbuffer = (pfn_glFramebufferRenderbuffer)load("glFramebufferRenderbuffer"); fp_glFramebufferTexture2D = (pfn_glFramebufferTexture2D)load("glFramebufferTexture2D"); fp_glFrontFace = (pfn_glFrontFace)load("glFrontFace"); fp_glGenBuffers = (pfn_glGenBuffers)load("glGenBuffers"); fp_glGenerateMipmap = (pfn_glGenerateMipmap)load("glGenerateMipmap"); fp_glGenFramebuffers = (pfn_glGenFramebuffers)load("glGenFramebuffers"); fp_glGenRenderbuffers = (pfn_glGenRenderbuffers)load("glGenRenderbuffers"); fp_glGenTextures = (pfn_glGenTextures)load("glGenTextures"); fp_glGetActiveAttrib = (pfn_glGetActiveAttrib)load("glGetActiveAttrib"); fp_glGetActiveUniform = (pfn_glGetActiveUniform)load("glGetActiveUniform"); fp_glGetAttachedShaders = (pfn_glGetAttachedShaders)load("glGetAttachedShaders"); fp_glGetAttribLocation = (pfn_glGetAttribLocation)load("glGetAttribLocation"); fp_glGetBooleanv = (pfn_glGetBooleanv)load("glGetBooleanv"); fp_glGetBufferParameteriv = (pfn_glGetBufferParameteriv)load("glGetBufferParameteriv"); fp_glGetError = (pfn_glGetError)load("glGetError"); fp_glGetFloatv = (pfn_glGetFloatv)load("glGetFloatv"); fp_glGetFramebufferAttachmentParameteriv = (pfn_glGetFramebufferAttachmentParameteriv)load("glGetFramebufferAttachmentParameteriv"); fp_glGetIntegerv = (pfn_glGetIntegerv)load("glGetIntegerv"); fp_glGetProgramiv = (pfn_glGetProgramiv)load("glGetProgramiv"); fp_glGetProgramInfoLog = (pfn_glGetProgramInfoLog)load("glGetProgramInfoLog"); fp_glGetRenderbufferParameteriv = (pfn_glGetRenderbufferParameteriv)load("glGetRenderbufferParameteriv"); fp_glGetShaderiv = (pfn_glGetShaderiv)load("glGetShaderiv"); fp_glGetShaderInfoLog = (pfn_glGetShaderInfoLog)load("glGetShaderInfoLog"); fp_glGetShaderPrecisionFormat = (pfn_glGetShaderPrecisionFormat)load("glGetShaderPrecisionFormat"); fp_glGetShaderSource = (pfn_glGetShaderSource)load("glGetShaderSource"); fp_glGetString = (pfn_glGetString)load("glGetString"); fp_glGetTexParameterfv = (pfn_glGetTexParameterfv)load("glGetTexParameterfv"); fp_glGetTexParameteriv = (pfn_glGetTexParameteriv)load("glGetTexParameteriv"); fp_glGetUniformfv = (pfn_glGetUniformfv)load("glGetUniformfv"); fp_glGetUniformiv = (pfn_glGetUniformiv)load("glGetUniformiv"); fp_glGetUniformLocation = (pfn_glGetUniformLocation)load("glGetUniformLocation"); fp_glGetVertexAttribfv = (pfn_glGetVertexAttribfv)load("glGetVertexAttribfv"); fp_glGetVertexAttribiv = (pfn_glGetVertexAttribiv)load("glGetVertexAttribiv"); fp_glGetVertexAttribPointerv = (pfn_glGetVertexAttribPointerv)load("glGetVertexAttribPointerv"); fp_glHint = (pfn_glHint)load("glHint"); fp_glIsBuffer = (pfn_glIsBuffer)load("glIsBuffer"); fp_glIsEnabled = (pfn_glIsEnabled)load("glIsEnabled"); fp_glIsFramebuffer = (pfn_glIsFramebuffer)load("glIsFramebuffer"); fp_glIsProgram = (pfn_glIsProgram)load("glIsProgram"); fp_glIsRenderbuffer = (pfn_glIsRenderbuffer)load("glIsRenderbuffer"); fp_glIsShader = (pfn_glIsShader)load("glIsShader"); fp_glIsTexture = (pfn_glIsTexture)load("glIsTexture"); fp_glLineWidth = (pfn_glLineWidth)load("glLineWidth"); fp_glLinkProgram = (pfn_glLinkProgram)load("glLinkProgram"); fp_glPixelStorei = (pfn_glPixelStorei)load("glPixelStorei"); fp_glPolygonOffset = (pfn_glPolygonOffset)load("glPolygonOffset"); fp_glReadPixels = (pfn_glReadPixels)load("glReadPixels"); fp_glReleaseShaderCompiler = (pfn_glReleaseShaderCompiler)load("glReleaseShaderCompiler"); fp_glRenderbufferStorage = (pfn_glRenderbufferStorage)load("glRenderbufferStorage"); fp_glSampleCoverage = (pfn_glSampleCoverage)load("glSampleCoverage"); fp_glScissor = (pfn_glScissor)load("glScissor"); fp_glShaderBinary = (pfn_glShaderBinary)load("glShaderBinary"); fp_glShaderSource = (pfn_glShaderSource)load("glShaderSource"); fp_glStencilFunc = (pfn_glStencilFunc)load("glStencilFunc"); fp_glStencilFuncSeparate = (pfn_glStencilFuncSeparate)load("glStencilFuncSeparate"); fp_glStencilMask = (pfn_glStencilMask)load("glStencilMask"); fp_glStencilMaskSeparate = (pfn_glStencilMaskSeparate)load("glStencilMaskSeparate"); fp_glStencilOp = (pfn_glStencilOp)load("glStencilOp"); fp_glStencilOpSeparate = (pfn_glStencilOpSeparate)load("glStencilOpSeparate"); fp_glTexImage2D = (pfn_glTexImage2D)load("glTexImage2D"); fp_glTexParameterf = (pfn_glTexParameterf)load("glTexParameterf"); fp_glTexParameterfv = (pfn_glTexParameterfv)load("glTexParameterfv"); fp_glTexParameteri = (pfn_glTexParameteri)load("glTexParameteri"); fp_glTexParameteriv = (pfn_glTexParameteriv)load("glTexParameteriv"); fp_glTexSubImage2D = (pfn_glTexSubImage2D)load("glTexSubImage2D"); fp_glUniform1f = (pfn_glUniform1f)load("glUniform1f"); fp_glUniform1fv = (pfn_glUniform1fv)load("glUniform1fv"); fp_glUniform1i = (pfn_glUniform1i)load("glUniform1i"); fp_glUniform1iv = (pfn_glUniform1iv)load("glUniform1iv"); fp_glUniform2f = (pfn_glUniform2f)load("glUniform2f"); fp_glUniform2fv = (pfn_glUniform2fv)load("glUniform2fv"); fp_glUniform2i = (pfn_glUniform2i)load("glUniform2i"); fp_glUniform2iv = (pfn_glUniform2iv)load("glUniform2iv"); fp_glUniform3f = (pfn_glUniform3f)load("glUniform3f"); fp_glUniform3fv = (pfn_glUniform3fv)load("glUniform3fv"); fp_glUniform3i = (pfn_glUniform3i)load("glUniform3i"); fp_glUniform3iv = (pfn_glUniform3iv)load("glUniform3iv"); fp_glUniform4f = (pfn_glUniform4f)load("glUniform4f"); fp_glUniform4fv = (pfn_glUniform4fv)load("glUniform4fv"); fp_glUniform4i = (pfn_glUniform4i)load("glUniform4i"); fp_glUniform4iv = (pfn_glUniform4iv)load("glUniform4iv"); fp_glUniformMatrix2fv = (pfn_glUniformMatrix2fv)load("glUniformMatrix2fv"); fp_glUniformMatrix3fv = (pfn_glUniformMatrix3fv)load("glUniformMatrix3fv"); fp_glUniformMatrix4fv = (pfn_glUniformMatrix4fv)load("glUniformMatrix4fv"); fp_glUseProgram = (pfn_glUseProgram)load("glUseProgram"); fp_glValidateProgram = (pfn_glValidateProgram)load("glValidateProgram"); fp_glVertexAttrib1f = (pfn_glVertexAttrib1f)load("glVertexAttrib1f"); fp_glVertexAttrib1fv = (pfn_glVertexAttrib1fv)load("glVertexAttrib1fv"); fp_glVertexAttrib2f = (pfn_glVertexAttrib2f)load("glVertexAttrib2f"); fp_glVertexAttrib2fv = (pfn_glVertexAttrib2fv)load("glVertexAttrib2fv"); fp_glVertexAttrib3f = (pfn_glVertexAttrib3f)load("glVertexAttrib3f"); fp_glVertexAttrib3fv = (pfn_glVertexAttrib3fv)load("glVertexAttrib3fv"); fp_glVertexAttrib4f = (pfn_glVertexAttrib4f)load("glVertexAttrib4f"); fp_glVertexAttrib4fv = (pfn_glVertexAttrib4fv)load("glVertexAttrib4fv"); fp_glVertexAttribPointer = (pfn_glVertexAttribPointer)load("glVertexAttribPointer"); fp_glViewport = (pfn_glViewport)load("glViewport"); } GLboolean GLAD_ES_VERSION_3_0 = GL_FALSE; static void load_GL_ES_VERSION_3_0(LOADER load) { if(!GLAD_ES_VERSION_3_0) return; fp_glReadBuffer = (pfn_glReadBuffer)load("glReadBuffer"); fp_glDrawRangeElements = (pfn_glDrawRangeElements)load("glDrawRangeElements"); fp_glTexImage3D = (pfn_glTexImage3D)load("glTexImage3D"); fp_glTexSubImage3D = (pfn_glTexSubImage3D)load("glTexSubImage3D"); fp_glCopyTexSubImage3D = (pfn_glCopyTexSubImage3D)load("glCopyTexSubImage3D"); fp_glCompressedTexImage3D = (pfn_glCompressedTexImage3D)load("glCompressedTexImage3D"); fp_glCompressedTexSubImage3D = (pfn_glCompressedTexSubImage3D)load("glCompressedTexSubImage3D"); fp_glGenQueries = (pfn_glGenQueries)load("glGenQueries"); fp_glDeleteQueries = (pfn_glDeleteQueries)load("glDeleteQueries"); fp_glIsQuery = (pfn_glIsQuery)load("glIsQuery"); fp_glBeginQuery = (pfn_glBeginQuery)load("glBeginQuery"); fp_glEndQuery = (pfn_glEndQuery)load("glEndQuery"); fp_glGetQueryiv = (pfn_glGetQueryiv)load("glGetQueryiv"); fp_glGetQueryObjectuiv = (pfn_glGetQueryObjectuiv)load("glGetQueryObjectuiv"); fp_glUnmapBuffer = (pfn_glUnmapBuffer)load("glUnmapBuffer"); fp_glGetBufferPointerv = (pfn_glGetBufferPointerv)load("glGetBufferPointerv"); fp_glDrawBuffers = (pfn_glDrawBuffers)load("glDrawBuffers"); fp_glUniformMatrix2x3fv = (pfn_glUniformMatrix2x3fv)load("glUniformMatrix2x3fv"); fp_glUniformMatrix3x2fv = (pfn_glUniformMatrix3x2fv)load("glUniformMatrix3x2fv"); fp_glUniformMatrix2x4fv = (pfn_glUniformMatrix2x4fv)load("glUniformMatrix2x4fv"); fp_glUniformMatrix4x2fv = (pfn_glUniformMatrix4x2fv)load("glUniformMatrix4x2fv"); fp_glUniformMatrix3x4fv = (pfn_glUniformMatrix3x4fv)load("glUniformMatrix3x4fv"); fp_glUniformMatrix4x3fv = (pfn_glUniformMatrix4x3fv)load("glUniformMatrix4x3fv"); fp_glBlitFramebuffer = (pfn_glBlitFramebuffer)load("glBlitFramebuffer"); fp_glRenderbufferStorageMultisample = (pfn_glRenderbufferStorageMultisample)load("glRenderbufferStorageMultisample"); fp_glFramebufferTextureLayer = (pfn_glFramebufferTextureLayer)load("glFramebufferTextureLayer"); fp_glMapBufferRange = (pfn_glMapBufferRange)load("glMapBufferRange"); fp_glFlushMappedBufferRange = (pfn_glFlushMappedBufferRange)load("glFlushMappedBufferRange"); fp_glBindVertexArray = (pfn_glBindVertexArray)load("glBindVertexArray"); fp_glDeleteVertexArrays = (pfn_glDeleteVertexArrays)load("glDeleteVertexArrays"); fp_glGenVertexArrays = (pfn_glGenVertexArrays)load("glGenVertexArrays"); fp_glIsVertexArray = (pfn_glIsVertexArray)load("glIsVertexArray"); fp_glGetIntegeri_v = (pfn_glGetIntegeri_v)load("glGetIntegeri_v"); fp_glBeginTransformFeedback = (pfn_glBeginTransformFeedback)load("glBeginTransformFeedback"); fp_glEndTransformFeedback = (pfn_glEndTransformFeedback)load("glEndTransformFeedback"); fp_glBindBufferRange = (pfn_glBindBufferRange)load("glBindBufferRange"); fp_glBindBufferBase = (pfn_glBindBufferBase)load("glBindBufferBase"); fp_glTransformFeedbackVaryings = (pfn_glTransformFeedbackVaryings)load("glTransformFeedbackVaryings"); fp_glGetTransformFeedbackVarying = (pfn_glGetTransformFeedbackVarying)load("glGetTransformFeedbackVarying"); fp_glVertexAttribIPointer = (pfn_glVertexAttribIPointer)load("glVertexAttribIPointer"); fp_glGetVertexAttribIiv = (pfn_glGetVertexAttribIiv)load("glGetVertexAttribIiv"); fp_glGetVertexAttribIuiv = (pfn_glGetVertexAttribIuiv)load("glGetVertexAttribIuiv"); fp_glVertexAttribI4i = (pfn_glVertexAttribI4i)load("glVertexAttribI4i"); fp_glVertexAttribI4ui = (pfn_glVertexAttribI4ui)load("glVertexAttribI4ui"); fp_glVertexAttribI4iv = (pfn_glVertexAttribI4iv)load("glVertexAttribI4iv"); fp_glVertexAttribI4uiv = (pfn_glVertexAttribI4uiv)load("glVertexAttribI4uiv"); fp_glGetUniformuiv = (pfn_glGetUniformuiv)load("glGetUniformuiv"); fp_glGetFragDataLocation = (pfn_glGetFragDataLocation)load("glGetFragDataLocation"); fp_glUniform1ui = (pfn_glUniform1ui)load("glUniform1ui"); fp_glUniform2ui = (pfn_glUniform2ui)load("glUniform2ui"); fp_glUniform3ui = (pfn_glUniform3ui)load("glUniform3ui"); fp_glUniform4ui = (pfn_glUniform4ui)load("glUniform4ui"); fp_glUniform1uiv = (pfn_glUniform1uiv)load("glUniform1uiv"); fp_glUniform2uiv = (pfn_glUniform2uiv)load("glUniform2uiv"); fp_glUniform3uiv = (pfn_glUniform3uiv)load("glUniform3uiv"); fp_glUniform4uiv = (pfn_glUniform4uiv)load("glUniform4uiv"); fp_glClearBufferiv = (pfn_glClearBufferiv)load("glClearBufferiv"); fp_glClearBufferuiv = (pfn_glClearBufferuiv)load("glClearBufferuiv"); fp_glClearBufferfv = (pfn_glClearBufferfv)load("glClearBufferfv"); fp_glClearBufferfi = (pfn_glClearBufferfi)load("glClearBufferfi"); fp_glGetStringi = (pfn_glGetStringi)load("glGetStringi"); fp_glCopyBufferSubData = (pfn_glCopyBufferSubData)load("glCopyBufferSubData"); fp_glGetUniformIndices = (pfn_glGetUniformIndices)load("glGetUniformIndices"); fp_glGetActiveUniformsiv = (pfn_glGetActiveUniformsiv)load("glGetActiveUniformsiv"); fp_glGetUniformBlockIndex = (pfn_glGetUniformBlockIndex)load("glGetUniformBlockIndex"); fp_glGetActiveUniformBlockiv = (pfn_glGetActiveUniformBlockiv)load("glGetActiveUniformBlockiv"); fp_glGetActiveUniformBlockName = (pfn_glGetActiveUniformBlockName)load("glGetActiveUniformBlockName"); fp_glUniformBlockBinding = (pfn_glUniformBlockBinding)load("glUniformBlockBinding"); fp_glDrawArraysInstanced = (pfn_glDrawArraysInstanced)load("glDrawArraysInstanced"); fp_glDrawElementsInstanced = (pfn_glDrawElementsInstanced)load("glDrawElementsInstanced"); fp_glFenceSync = (pfn_glFenceSync)load("glFenceSync"); fp_glIsSync = (pfn_glIsSync)load("glIsSync"); fp_glDeleteSync = (pfn_glDeleteSync)load("glDeleteSync"); fp_glClientWaitSync = (pfn_glClientWaitSync)load("glClientWaitSync"); fp_glWaitSync = (pfn_glWaitSync)load("glWaitSync"); fp_glGetInteger64v = (pfn_glGetInteger64v)load("glGetInteger64v"); fp_glGetSynciv = (pfn_glGetSynciv)load("glGetSynciv"); fp_glGetInteger64i_v = (pfn_glGetInteger64i_v)load("glGetInteger64i_v"); fp_glGetBufferParameteri64v = (pfn_glGetBufferParameteri64v)load("glGetBufferParameteri64v"); fp_glGenSamplers = (pfn_glGenSamplers)load("glGenSamplers"); fp_glDeleteSamplers = (pfn_glDeleteSamplers)load("glDeleteSamplers"); fp_glIsSampler = (pfn_glIsSampler)load("glIsSampler"); fp_glBindSampler = (pfn_glBindSampler)load("glBindSampler"); fp_glSamplerParameteri = (pfn_glSamplerParameteri)load("glSamplerParameteri"); fp_glSamplerParameteriv = (pfn_glSamplerParameteriv)load("glSamplerParameteriv"); fp_glSamplerParameterf = (pfn_glSamplerParameterf)load("glSamplerParameterf"); fp_glSamplerParameterfv = (pfn_glSamplerParameterfv)load("glSamplerParameterfv"); fp_glGetSamplerParameteriv = (pfn_glGetSamplerParameteriv)load("glGetSamplerParameteriv"); fp_glGetSamplerParameterfv = (pfn_glGetSamplerParameterfv)load("glGetSamplerParameterfv"); fp_glVertexAttribDivisor = (pfn_glVertexAttribDivisor)load("glVertexAttribDivisor"); fp_glBindTransformFeedback = (pfn_glBindTransformFeedback)load("glBindTransformFeedback"); fp_glDeleteTransformFeedbacks = (pfn_glDeleteTransformFeedbacks)load("glDeleteTransformFeedbacks"); fp_glGenTransformFeedbacks = (pfn_glGenTransformFeedbacks)load("glGenTransformFeedbacks"); fp_glIsTransformFeedback = (pfn_glIsTransformFeedback)load("glIsTransformFeedback"); fp_glPauseTransformFeedback = (pfn_glPauseTransformFeedback)load("glPauseTransformFeedback"); fp_glResumeTransformFeedback = (pfn_glResumeTransformFeedback)load("glResumeTransformFeedback"); fp_glGetProgramBinary = (pfn_glGetProgramBinary)load("glGetProgramBinary"); fp_glProgramBinary = (pfn_glProgramBinary)load("glProgramBinary"); fp_glProgramParameteri = (pfn_glProgramParameteri)load("glProgramParameteri"); fp_glInvalidateFramebuffer = (pfn_glInvalidateFramebuffer)load("glInvalidateFramebuffer"); fp_glInvalidateSubFramebuffer = (pfn_glInvalidateSubFramebuffer)load("glInvalidateSubFramebuffer"); fp_glTexStorage2D = (pfn_glTexStorage2D)load("glTexStorage2D"); fp_glTexStorage3D = (pfn_glTexStorage3D)load("glTexStorage3D"); fp_glGetInternalformativ = (pfn_glGetInternalformativ)load("glGetInternalformativ"); } GLboolean GLAD_ES_VERSION_3_1 = GL_FALSE; static void load_GL_ES_VERSION_3_1(LOADER load) { if(!GLAD_ES_VERSION_3_1) return; fp_glDispatchCompute = (pfn_glDispatchCompute)load("glDispatchCompute"); fp_glDispatchComputeIndirect = (pfn_glDispatchComputeIndirect)load("glDispatchComputeIndirect"); fp_glDrawArraysIndirect = (pfn_glDrawArraysIndirect)load("glDrawArraysIndirect"); fp_glDrawElementsIndirect = (pfn_glDrawElementsIndirect)load("glDrawElementsIndirect"); fp_glFramebufferParameteri = (pfn_glFramebufferParameteri)load("glFramebufferParameteri"); fp_glGetFramebufferParameteriv = (pfn_glGetFramebufferParameteriv)load("glGetFramebufferParameteriv"); fp_glGetProgramInterfaceiv = (pfn_glGetProgramInterfaceiv)load("glGetProgramInterfaceiv"); fp_glGetProgramResourceIndex = (pfn_glGetProgramResourceIndex)load("glGetProgramResourceIndex"); fp_glGetProgramResourceName = (pfn_glGetProgramResourceName)load("glGetProgramResourceName"); fp_glGetProgramResourceiv = (pfn_glGetProgramResourceiv)load("glGetProgramResourceiv"); fp_glGetProgramResourceLocation = (pfn_glGetProgramResourceLocation)load("glGetProgramResourceLocation"); fp_glUseProgramStages = (pfn_glUseProgramStages)load("glUseProgramStages"); fp_glActiveShaderProgram = (pfn_glActiveShaderProgram)load("glActiveShaderProgram"); fp_glCreateShaderProgramv = (pfn_glCreateShaderProgramv)load("glCreateShaderProgramv"); fp_glBindProgramPipeline = (pfn_glBindProgramPipeline)load("glBindProgramPipeline"); fp_glDeleteProgramPipelines = (pfn_glDeleteProgramPipelines)load("glDeleteProgramPipelines"); fp_glGenProgramPipelines = (pfn_glGenProgramPipelines)load("glGenProgramPipelines"); fp_glIsProgramPipeline = (pfn_glIsProgramPipeline)load("glIsProgramPipeline"); fp_glGetProgramPipelineiv = (pfn_glGetProgramPipelineiv)load("glGetProgramPipelineiv"); fp_glProgramUniform1i = (pfn_glProgramUniform1i)load("glProgramUniform1i"); fp_glProgramUniform2i = (pfn_glProgramUniform2i)load("glProgramUniform2i"); fp_glProgramUniform3i = (pfn_glProgramUniform3i)load("glProgramUniform3i"); fp_glProgramUniform4i = (pfn_glProgramUniform4i)load("glProgramUniform4i"); fp_glProgramUniform1ui = (pfn_glProgramUniform1ui)load("glProgramUniform1ui"); fp_glProgramUniform2ui = (pfn_glProgramUniform2ui)load("glProgramUniform2ui"); fp_glProgramUniform3ui = (pfn_glProgramUniform3ui)load("glProgramUniform3ui"); fp_glProgramUniform4ui = (pfn_glProgramUniform4ui)load("glProgramUniform4ui"); fp_glProgramUniform1f = (pfn_glProgramUniform1f)load("glProgramUniform1f"); fp_glProgramUniform2f = (pfn_glProgramUniform2f)load("glProgramUniform2f"); fp_glProgramUniform3f = (pfn_glProgramUniform3f)load("glProgramUniform3f"); fp_glProgramUniform4f = (pfn_glProgramUniform4f)load("glProgramUniform4f"); fp_glProgramUniform1iv = (pfn_glProgramUniform1iv)load("glProgramUniform1iv"); fp_glProgramUniform2iv = (pfn_glProgramUniform2iv)load("glProgramUniform2iv"); fp_glProgramUniform3iv = (pfn_glProgramUniform3iv)load("glProgramUniform3iv"); fp_glProgramUniform4iv = (pfn_glProgramUniform4iv)load("glProgramUniform4iv"); fp_glProgramUniform1uiv = (pfn_glProgramUniform1uiv)load("glProgramUniform1uiv"); fp_glProgramUniform2uiv = (pfn_glProgramUniform2uiv)load("glProgramUniform2uiv"); fp_glProgramUniform3uiv = (pfn_glProgramUniform3uiv)load("glProgramUniform3uiv"); fp_glProgramUniform4uiv = (pfn_glProgramUniform4uiv)load("glProgramUniform4uiv"); fp_glProgramUniform1fv = (pfn_glProgramUniform1fv)load("glProgramUniform1fv"); fp_glProgramUniform2fv = (pfn_glProgramUniform2fv)load("glProgramUniform2fv"); fp_glProgramUniform3fv = (pfn_glProgramUniform3fv)load("glProgramUniform3fv"); fp_glProgramUniform4fv = (pfn_glProgramUniform4fv)load("glProgramUniform4fv"); fp_glProgramUniformMatrix2fv = (pfn_glProgramUniformMatrix2fv)load("glProgramUniformMatrix2fv"); fp_glProgramUniformMatrix3fv = (pfn_glProgramUniformMatrix3fv)load("glProgramUniformMatrix3fv"); fp_glProgramUniformMatrix4fv = (pfn_glProgramUniformMatrix4fv)load("glProgramUniformMatrix4fv"); fp_glProgramUniformMatrix2x3fv = (pfn_glProgramUniformMatrix2x3fv)load("glProgramUniformMatrix2x3fv"); fp_glProgramUniformMatrix3x2fv = (pfn_glProgramUniformMatrix3x2fv)load("glProgramUniformMatrix3x2fv"); fp_glProgramUniformMatrix2x4fv = (pfn_glProgramUniformMatrix2x4fv)load("glProgramUniformMatrix2x4fv"); fp_glProgramUniformMatrix4x2fv = (pfn_glProgramUniformMatrix4x2fv)load("glProgramUniformMatrix4x2fv"); fp_glProgramUniformMatrix3x4fv = (pfn_glProgramUniformMatrix3x4fv)load("glProgramUniformMatrix3x4fv"); fp_glProgramUniformMatrix4x3fv = (pfn_glProgramUniformMatrix4x3fv)load("glProgramUniformMatrix4x3fv"); fp_glValidateProgramPipeline = (pfn_glValidateProgramPipeline)load("glValidateProgramPipeline"); fp_glGetProgramPipelineInfoLog = (pfn_glGetProgramPipelineInfoLog)load("glGetProgramPipelineInfoLog"); fp_glBindImageTexture = (pfn_glBindImageTexture)load("glBindImageTexture"); fp_glGetBooleani_v = (pfn_glGetBooleani_v)load("glGetBooleani_v"); fp_glMemoryBarrier = (pfn_glMemoryBarrier)load("glMemoryBarrier"); fp_glMemoryBarrierByRegion = (pfn_glMemoryBarrierByRegion)load("glMemoryBarrierByRegion"); fp_glTexStorage2DMultisample = (pfn_glTexStorage2DMultisample)load("glTexStorage2DMultisample"); fp_glGetMultisamplefv = (pfn_glGetMultisamplefv)load("glGetMultisamplefv"); fp_glSampleMaski = (pfn_glSampleMaski)load("glSampleMaski"); fp_glGetTexLevelParameteriv = (pfn_glGetTexLevelParameteriv)load("glGetTexLevelParameteriv"); fp_glGetTexLevelParameterfv = (pfn_glGetTexLevelParameterfv)load("glGetTexLevelParameterfv"); fp_glBindVertexBuffer = (pfn_glBindVertexBuffer)load("glBindVertexBuffer"); fp_glVertexAttribFormat = (pfn_glVertexAttribFormat)load("glVertexAttribFormat"); fp_glVertexAttribIFormat = (pfn_glVertexAttribIFormat)load("glVertexAttribIFormat"); fp_glVertexAttribBinding = (pfn_glVertexAttribBinding)load("glVertexAttribBinding"); fp_glVertexBindingDivisor = (pfn_glVertexBindingDivisor)load("glVertexBindingDivisor"); } GLboolean GLAD_ES_VERSION_3_2 = GL_FALSE; static void load_GL_ES_VERSION_3_2(LOADER load) { if(!GLAD_ES_VERSION_3_2) return; fp_glBlendBarrier = (pfn_glBlendBarrier)load("glBlendBarrier"); fp_glCopyImageSubData = (pfn_glCopyImageSubData)load("glCopyImageSubData"); fp_glDebugMessageControl = (pfn_glDebugMessageControl)load("glDebugMessageControl"); fp_glDebugMessageInsert = (pfn_glDebugMessageInsert)load("glDebugMessageInsert"); fp_glDebugMessageCallback = (pfn_glDebugMessageCallback)load("glDebugMessageCallback"); fp_glGetDebugMessageLog = (pfn_glGetDebugMessageLog)load("glGetDebugMessageLog"); fp_glPushDebugGroup = (pfn_glPushDebugGroup)load("glPushDebugGroup"); fp_glPopDebugGroup = (pfn_glPopDebugGroup)load("glPopDebugGroup"); fp_glObjectLabel = (pfn_glObjectLabel)load("glObjectLabel"); fp_glGetObjectLabel = (pfn_glGetObjectLabel)load("glGetObjectLabel"); fp_glObjectPtrLabel = (pfn_glObjectPtrLabel)load("glObjectPtrLabel"); fp_glGetObjectPtrLabel = (pfn_glGetObjectPtrLabel)load("glGetObjectPtrLabel"); fp_glGetPointerv = (pfn_glGetPointerv)load("glGetPointerv"); fp_glEnablei = (pfn_glEnablei)load("glEnablei"); fp_glDisablei = (pfn_glDisablei)load("glDisablei"); fp_glBlendEquationi = (pfn_glBlendEquationi)load("glBlendEquationi"); fp_glBlendEquationSeparatei = (pfn_glBlendEquationSeparatei)load("glBlendEquationSeparatei"); fp_glBlendFunci = (pfn_glBlendFunci)load("glBlendFunci"); fp_glBlendFuncSeparatei = (pfn_glBlendFuncSeparatei)load("glBlendFuncSeparatei"); fp_glColorMaski = (pfn_glColorMaski)load("glColorMaski"); fp_glIsEnabledi = (pfn_glIsEnabledi)load("glIsEnabledi"); fp_glDrawElementsBaseVertex = (pfn_glDrawElementsBaseVertex)load("glDrawElementsBaseVertex"); fp_glDrawRangeElementsBaseVertex = (pfn_glDrawRangeElementsBaseVertex)load("glDrawRangeElementsBaseVertex"); fp_glDrawElementsInstancedBaseVertex = (pfn_glDrawElementsInstancedBaseVertex)load("glDrawElementsInstancedBaseVertex"); fp_glFramebufferTexture = (pfn_glFramebufferTexture)load("glFramebufferTexture"); fp_glPrimitiveBoundingBox = (pfn_glPrimitiveBoundingBox)load("glPrimitiveBoundingBox"); fp_glGetGraphicsResetStatus = (pfn_glGetGraphicsResetStatus)load("glGetGraphicsResetStatus"); fp_glReadnPixels = (pfn_glReadnPixels)load("glReadnPixels"); fp_glGetnUniformfv = (pfn_glGetnUniformfv)load("glGetnUniformfv"); fp_glGetnUniformiv = (pfn_glGetnUniformiv)load("glGetnUniformiv"); fp_glGetnUniformuiv = (pfn_glGetnUniformuiv)load("glGetnUniformuiv"); fp_glMinSampleShading = (pfn_glMinSampleShading)load("glMinSampleShading"); fp_glPatchParameteri = (pfn_glPatchParameteri)load("glPatchParameteri"); fp_glTexParameterIiv = (pfn_glTexParameterIiv)load("glTexParameterIiv"); fp_glTexParameterIuiv = (pfn_glTexParameterIuiv)load("glTexParameterIuiv"); fp_glGetTexParameterIiv = (pfn_glGetTexParameterIiv)load("glGetTexParameterIiv"); fp_glGetTexParameterIuiv = (pfn_glGetTexParameterIuiv)load("glGetTexParameterIuiv"); fp_glSamplerParameterIiv = (pfn_glSamplerParameterIiv)load("glSamplerParameterIiv"); fp_glSamplerParameterIuiv = (pfn_glSamplerParameterIuiv)load("glSamplerParameterIuiv"); fp_glGetSamplerParameterIiv = (pfn_glGetSamplerParameterIiv)load("glGetSamplerParameterIiv"); fp_glGetSamplerParameterIuiv = (pfn_glGetSamplerParameterIuiv)load("glGetSamplerParameterIuiv"); fp_glTexBuffer = (pfn_glTexBuffer)load("glTexBuffer"); fp_glTexBufferRange = (pfn_glTexBufferRange)load("glTexBufferRange"); fp_glTexStorage3DMultisample = (pfn_glTexStorage3DMultisample)load("glTexStorage3DMultisample"); } GLboolean GLAD_KHR_blend_equation_advanced = GL_FALSE; static void load_GL_KHR_blend_equation_advanced(LOADER load) { if(!GLAD_KHR_blend_equation_advanced) return; fp_glBlendBarrierKHR = (pfn_glBlendBarrierKHR)load("glBlendBarrierKHR"); } GLboolean GLAD_KHR_blend_equation_advanced_coherent = GL_FALSE; GLboolean GLAD_KHR_context_flush_control = GL_FALSE; GLboolean GLAD_KHR_debug = GL_FALSE; static void load_GL_KHR_debug(LOADER load) { if(!GLAD_KHR_debug) return; fp_glDebugMessageControl = (pfn_glDebugMessageControl)load("glDebugMessageControl"); fp_glDebugMessageInsert = (pfn_glDebugMessageInsert)load("glDebugMessageInsert"); fp_glDebugMessageCallback = (pfn_glDebugMessageCallback)load("glDebugMessageCallback"); fp_glGetDebugMessageLog = (pfn_glGetDebugMessageLog)load("glGetDebugMessageLog"); fp_glPushDebugGroup = (pfn_glPushDebugGroup)load("glPushDebugGroup"); fp_glPopDebugGroup = (pfn_glPopDebugGroup)load("glPopDebugGroup"); fp_glObjectLabel = (pfn_glObjectLabel)load("glObjectLabel"); fp_glGetObjectLabel = (pfn_glGetObjectLabel)load("glGetObjectLabel"); fp_glObjectPtrLabel = (pfn_glObjectPtrLabel)load("glObjectPtrLabel"); fp_glGetObjectPtrLabel = (pfn_glGetObjectPtrLabel)load("glGetObjectPtrLabel"); fp_glGetPointerv = (pfn_glGetPointerv)load("glGetPointerv"); fp_glDebugMessageControlKHR = (pfn_glDebugMessageControlKHR)load("glDebugMessageControlKHR"); fp_glDebugMessageInsertKHR = (pfn_glDebugMessageInsertKHR)load("glDebugMessageInsertKHR"); fp_glDebugMessageCallbackKHR = (pfn_glDebugMessageCallbackKHR)load("glDebugMessageCallbackKHR"); fp_glGetDebugMessageLogKHR = (pfn_glGetDebugMessageLogKHR)load("glGetDebugMessageLogKHR"); fp_glPushDebugGroupKHR = (pfn_glPushDebugGroupKHR)load("glPushDebugGroupKHR"); fp_glPopDebugGroupKHR = (pfn_glPopDebugGroupKHR)load("glPopDebugGroupKHR"); fp_glObjectLabelKHR = (pfn_glObjectLabelKHR)load("glObjectLabelKHR"); fp_glGetObjectLabelKHR = (pfn_glGetObjectLabelKHR)load("glGetObjectLabelKHR"); fp_glObjectPtrLabelKHR = (pfn_glObjectPtrLabelKHR)load("glObjectPtrLabelKHR"); fp_glGetObjectPtrLabelKHR = (pfn_glGetObjectPtrLabelKHR)load("glGetObjectPtrLabelKHR"); fp_glGetPointervKHR = (pfn_glGetPointervKHR)load("glGetPointervKHR"); } GLboolean GLAD_KHR_no_error = GL_FALSE; GLboolean GLAD_KHR_robust_buffer_access_behavior = GL_FALSE; GLboolean GLAD_KHR_robustness = GL_FALSE; static void load_GL_KHR_robustness(LOADER load) { if(!GLAD_KHR_robustness) return; fp_glGetGraphicsResetStatus = (pfn_glGetGraphicsResetStatus)load("glGetGraphicsResetStatus"); fp_glReadnPixels = (pfn_glReadnPixels)load("glReadnPixels"); fp_glGetnUniformfv = (pfn_glGetnUniformfv)load("glGetnUniformfv"); fp_glGetnUniformiv = (pfn_glGetnUniformiv)load("glGetnUniformiv"); fp_glGetnUniformuiv = (pfn_glGetnUniformuiv)load("glGetnUniformuiv"); fp_glGetGraphicsResetStatusKHR = (pfn_glGetGraphicsResetStatusKHR)load("glGetGraphicsResetStatusKHR"); fp_glReadnPixelsKHR = (pfn_glReadnPixelsKHR)load("glReadnPixelsKHR"); fp_glGetnUniformfvKHR = (pfn_glGetnUniformfvKHR)load("glGetnUniformfvKHR"); fp_glGetnUniformivKHR = (pfn_glGetnUniformivKHR)load("glGetnUniformivKHR"); fp_glGetnUniformuivKHR = (pfn_glGetnUniformuivKHR)load("glGetnUniformuivKHR"); } GLboolean GLAD_KHR_texture_compression_astc_hdr = GL_FALSE; GLboolean GLAD_KHR_texture_compression_astc_ldr = GL_FALSE; GLboolean GLAD_KHR_texture_compression_astc_sliced_3d = GL_FALSE; GLboolean GLAD_ARB_arrays_of_arrays = GL_FALSE; GLboolean GLAD_ARB_base_instance = GL_FALSE; static void load_GL_ARB_base_instance(LOADER load) { if(!GLAD_ARB_base_instance) return; fp_glDrawArraysInstancedBaseInstance = (pfn_glDrawArraysInstancedBaseInstance)load("glDrawArraysInstancedBaseInstance"); fp_glDrawElementsInstancedBaseInstance = (pfn_glDrawElementsInstancedBaseInstance)load("glDrawElementsInstancedBaseInstance"); fp_glDrawElementsInstancedBaseVertexBaseInstance = (pfn_glDrawElementsInstancedBaseVertexBaseInstance)load("glDrawElementsInstancedBaseVertexBaseInstance"); } GLboolean GLAD_ARB_bindless_texture = GL_FALSE; static void load_GL_ARB_bindless_texture(LOADER load) { if(!GLAD_ARB_bindless_texture) return; fp_glGetTextureHandleARB = (pfn_glGetTextureHandleARB)load("glGetTextureHandleARB"); fp_glGetTextureSamplerHandleARB = (pfn_glGetTextureSamplerHandleARB)load("glGetTextureSamplerHandleARB"); fp_glMakeTextureHandleResidentARB = (pfn_glMakeTextureHandleResidentARB)load("glMakeTextureHandleResidentARB"); fp_glMakeTextureHandleNonResidentARB = (pfn_glMakeTextureHandleNonResidentARB)load("glMakeTextureHandleNonResidentARB"); fp_glGetImageHandleARB = (pfn_glGetImageHandleARB)load("glGetImageHandleARB"); fp_glMakeImageHandleResidentARB = (pfn_glMakeImageHandleResidentARB)load("glMakeImageHandleResidentARB"); fp_glMakeImageHandleNonResidentARB = (pfn_glMakeImageHandleNonResidentARB)load("glMakeImageHandleNonResidentARB"); fp_glUniformHandleui64ARB = (pfn_glUniformHandleui64ARB)load("glUniformHandleui64ARB"); fp_glUniformHandleui64vARB = (pfn_glUniformHandleui64vARB)load("glUniformHandleui64vARB"); fp_glProgramUniformHandleui64ARB = (pfn_glProgramUniformHandleui64ARB)load("glProgramUniformHandleui64ARB"); fp_glProgramUniformHandleui64vARB = (pfn_glProgramUniformHandleui64vARB)load("glProgramUniformHandleui64vARB"); fp_glIsTextureHandleResidentARB = (pfn_glIsTextureHandleResidentARB)load("glIsTextureHandleResidentARB"); fp_glIsImageHandleResidentARB = (pfn_glIsImageHandleResidentARB)load("glIsImageHandleResidentARB"); fp_glVertexAttribL1ui64ARB = (pfn_glVertexAttribL1ui64ARB)load("glVertexAttribL1ui64ARB"); fp_glVertexAttribL1ui64vARB = (pfn_glVertexAttribL1ui64vARB)load("glVertexAttribL1ui64vARB"); fp_glGetVertexAttribLui64vARB = (pfn_glGetVertexAttribLui64vARB)load("glGetVertexAttribLui64vARB"); } GLboolean GLAD_ARB_blend_func_extended = GL_FALSE; static void load_GL_ARB_blend_func_extended(LOADER load) { if(!GLAD_ARB_blend_func_extended) return; fp_glBindFragDataLocationIndexed = (pfn_glBindFragDataLocationIndexed)load("glBindFragDataLocationIndexed"); fp_glGetFragDataIndex = (pfn_glGetFragDataIndex)load("glGetFragDataIndex"); } GLboolean GLAD_ARB_buffer_storage = GL_FALSE; static void load_GL_ARB_buffer_storage(LOADER load) { if(!GLAD_ARB_buffer_storage) return; fp_glBufferStorage = (pfn_glBufferStorage)load("glBufferStorage"); } GLboolean GLAD_ARB_cl_event = GL_FALSE; static void load_GL_ARB_cl_event(LOADER load) { if(!GLAD_ARB_cl_event) return; fp_glCreateSyncFromCLeventARB = (pfn_glCreateSyncFromCLeventARB)load("glCreateSyncFromCLeventARB"); } GLboolean GLAD_ARB_clear_buffer_object = GL_FALSE; static void load_GL_ARB_clear_buffer_object(LOADER load) { if(!GLAD_ARB_clear_buffer_object) return; fp_glClearBufferData = (pfn_glClearBufferData)load("glClearBufferData"); fp_glClearBufferSubData = (pfn_glClearBufferSubData)load("glClearBufferSubData"); } GLboolean GLAD_ARB_clear_texture = GL_FALSE; static void load_GL_ARB_clear_texture(LOADER load) { if(!GLAD_ARB_clear_texture) return; fp_glClearTexImage = (pfn_glClearTexImage)load("glClearTexImage"); fp_glClearTexSubImage = (pfn_glClearTexSubImage)load("glClearTexSubImage"); } GLboolean GLAD_ARB_clip_control = GL_FALSE; static void load_GL_ARB_clip_control(LOADER load) { if(!GLAD_ARB_clip_control) return; fp_glClipControl = (pfn_glClipControl)load("glClipControl"); } GLboolean GLAD_ARB_color_buffer_float = GL_FALSE; static void load_GL_ARB_color_buffer_float(LOADER load) { if(!GLAD_ARB_color_buffer_float) return; fp_glClampColorARB = (pfn_glClampColorARB)load("glClampColorARB"); } GLboolean GLAD_ARB_compatibility = GL_FALSE; GLboolean GLAD_ARB_compressed_texture_pixel_storage = GL_FALSE; GLboolean GLAD_ARB_compute_shader = GL_FALSE; static void load_GL_ARB_compute_shader(LOADER load) { if(!GLAD_ARB_compute_shader) return; fp_glDispatchCompute = (pfn_glDispatchCompute)load("glDispatchCompute"); fp_glDispatchComputeIndirect = (pfn_glDispatchComputeIndirect)load("glDispatchComputeIndirect"); } GLboolean GLAD_ARB_compute_variable_group_size = GL_FALSE; static void load_GL_ARB_compute_variable_group_size(LOADER load) { if(!GLAD_ARB_compute_variable_group_size) return; fp_glDispatchComputeGroupSizeARB = (pfn_glDispatchComputeGroupSizeARB)load("glDispatchComputeGroupSizeARB"); } GLboolean GLAD_ARB_conditional_render_inverted = GL_FALSE; GLboolean GLAD_ARB_conservative_depth = GL_FALSE; GLboolean GLAD_ARB_copy_buffer = GL_FALSE; static void load_GL_ARB_copy_buffer(LOADER load) { if(!GLAD_ARB_copy_buffer) return; fp_glCopyBufferSubData = (pfn_glCopyBufferSubData)load("glCopyBufferSubData"); } GLboolean GLAD_ARB_copy_image = GL_FALSE; static void load_GL_ARB_copy_image(LOADER load) { if(!GLAD_ARB_copy_image) return; fp_glCopyImageSubData = (pfn_glCopyImageSubData)load("glCopyImageSubData"); } GLboolean GLAD_ARB_cull_distance = GL_FALSE; GLboolean GLAD_ARB_debug_output = GL_FALSE; static void load_GL_ARB_debug_output(LOADER load) { if(!GLAD_ARB_debug_output) return; fp_glDebugMessageControlARB = (pfn_glDebugMessageControlARB)load("glDebugMessageControlARB"); fp_glDebugMessageInsertARB = (pfn_glDebugMessageInsertARB)load("glDebugMessageInsertARB"); fp_glDebugMessageCallbackARB = (pfn_glDebugMessageCallbackARB)load("glDebugMessageCallbackARB"); fp_glGetDebugMessageLogARB = (pfn_glGetDebugMessageLogARB)load("glGetDebugMessageLogARB"); } GLboolean GLAD_ARB_depth_buffer_float = GL_FALSE; GLboolean GLAD_ARB_depth_clamp = GL_FALSE; GLboolean GLAD_ARB_derivative_control = GL_FALSE; GLboolean GLAD_ARB_direct_state_access = GL_FALSE; static void load_GL_ARB_direct_state_access(LOADER load) { if(!GLAD_ARB_direct_state_access) return; fp_glCreateTransformFeedbacks = (pfn_glCreateTransformFeedbacks)load("glCreateTransformFeedbacks"); fp_glTransformFeedbackBufferBase = (pfn_glTransformFeedbackBufferBase)load("glTransformFeedbackBufferBase"); fp_glTransformFeedbackBufferRange = (pfn_glTransformFeedbackBufferRange)load("glTransformFeedbackBufferRange"); fp_glGetTransformFeedbackiv = (pfn_glGetTransformFeedbackiv)load("glGetTransformFeedbackiv"); fp_glGetTransformFeedbacki_v = (pfn_glGetTransformFeedbacki_v)load("glGetTransformFeedbacki_v"); fp_glGetTransformFeedbacki64_v = (pfn_glGetTransformFeedbacki64_v)load("glGetTransformFeedbacki64_v"); fp_glCreateBuffers = (pfn_glCreateBuffers)load("glCreateBuffers"); fp_glNamedBufferStorage = (pfn_glNamedBufferStorage)load("glNamedBufferStorage"); fp_glNamedBufferData = (pfn_glNamedBufferData)load("glNamedBufferData"); fp_glNamedBufferSubData = (pfn_glNamedBufferSubData)load("glNamedBufferSubData"); fp_glCopyNamedBufferSubData = (pfn_glCopyNamedBufferSubData)load("glCopyNamedBufferSubData"); fp_glClearNamedBufferData = (pfn_glClearNamedBufferData)load("glClearNamedBufferData"); fp_glClearNamedBufferSubData = (pfn_glClearNamedBufferSubData)load("glClearNamedBufferSubData"); fp_glMapNamedBuffer = (pfn_glMapNamedBuffer)load("glMapNamedBuffer"); fp_glMapNamedBufferRange = (pfn_glMapNamedBufferRange)load("glMapNamedBufferRange"); fp_glUnmapNamedBuffer = (pfn_glUnmapNamedBuffer)load("glUnmapNamedBuffer"); fp_glFlushMappedNamedBufferRange = (pfn_glFlushMappedNamedBufferRange)load("glFlushMappedNamedBufferRange"); fp_glGetNamedBufferParameteriv = (pfn_glGetNamedBufferParameteriv)load("glGetNamedBufferParameteriv"); fp_glGetNamedBufferParameteri64v = (pfn_glGetNamedBufferParameteri64v)load("glGetNamedBufferParameteri64v"); fp_glGetNamedBufferPointerv = (pfn_glGetNamedBufferPointerv)load("glGetNamedBufferPointerv"); fp_glGetNamedBufferSubData = (pfn_glGetNamedBufferSubData)load("glGetNamedBufferSubData"); fp_glCreateFramebuffers = (pfn_glCreateFramebuffers)load("glCreateFramebuffers"); fp_glNamedFramebufferRenderbuffer = (pfn_glNamedFramebufferRenderbuffer)load("glNamedFramebufferRenderbuffer"); fp_glNamedFramebufferParameteri = (pfn_glNamedFramebufferParameteri)load("glNamedFramebufferParameteri"); fp_glNamedFramebufferTexture = (pfn_glNamedFramebufferTexture)load("glNamedFramebufferTexture"); fp_glNamedFramebufferTextureLayer = (pfn_glNamedFramebufferTextureLayer)load("glNamedFramebufferTextureLayer"); fp_glNamedFramebufferDrawBuffer = (pfn_glNamedFramebufferDrawBuffer)load("glNamedFramebufferDrawBuffer"); fp_glNamedFramebufferDrawBuffers = (pfn_glNamedFramebufferDrawBuffers)load("glNamedFramebufferDrawBuffers"); fp_glNamedFramebufferReadBuffer = (pfn_glNamedFramebufferReadBuffer)load("glNamedFramebufferReadBuffer"); fp_glInvalidateNamedFramebufferData = (pfn_glInvalidateNamedFramebufferData)load("glInvalidateNamedFramebufferData"); fp_glInvalidateNamedFramebufferSubData = (pfn_glInvalidateNamedFramebufferSubData)load("glInvalidateNamedFramebufferSubData"); fp_glClearNamedFramebufferiv = (pfn_glClearNamedFramebufferiv)load("glClearNamedFramebufferiv"); fp_glClearNamedFramebufferuiv = (pfn_glClearNamedFramebufferuiv)load("glClearNamedFramebufferuiv"); fp_glClearNamedFramebufferfv = (pfn_glClearNamedFramebufferfv)load("glClearNamedFramebufferfv"); fp_glClearNamedFramebufferfi = (pfn_glClearNamedFramebufferfi)load("glClearNamedFramebufferfi"); fp_glBlitNamedFramebuffer = (pfn_glBlitNamedFramebuffer)load("glBlitNamedFramebuffer"); fp_glCheckNamedFramebufferStatus = (pfn_glCheckNamedFramebufferStatus)load("glCheckNamedFramebufferStatus"); fp_glGetNamedFramebufferParameteriv = (pfn_glGetNamedFramebufferParameteriv)load("glGetNamedFramebufferParameteriv"); fp_glGetNamedFramebufferAttachmentParameteriv = (pfn_glGetNamedFramebufferAttachmentParameteriv)load("glGetNamedFramebufferAttachmentParameteriv"); fp_glCreateRenderbuffers = (pfn_glCreateRenderbuffers)load("glCreateRenderbuffers"); fp_glNamedRenderbufferStorage = (pfn_glNamedRenderbufferStorage)load("glNamedRenderbufferStorage"); fp_glNamedRenderbufferStorageMultisample = (pfn_glNamedRenderbufferStorageMultisample)load("glNamedRenderbufferStorageMultisample"); fp_glGetNamedRenderbufferParameteriv = (pfn_glGetNamedRenderbufferParameteriv)load("glGetNamedRenderbufferParameteriv"); fp_glCreateTextures = (pfn_glCreateTextures)load("glCreateTextures"); fp_glTextureBuffer = (pfn_glTextureBuffer)load("glTextureBuffer"); fp_glTextureBufferRange = (pfn_glTextureBufferRange)load("glTextureBufferRange"); fp_glTextureStorage1D = (pfn_glTextureStorage1D)load("glTextureStorage1D"); fp_glTextureStorage2D = (pfn_glTextureStorage2D)load("glTextureStorage2D"); fp_glTextureStorage3D = (pfn_glTextureStorage3D)load("glTextureStorage3D"); fp_glTextureStorage2DMultisample = (pfn_glTextureStorage2DMultisample)load("glTextureStorage2DMultisample"); fp_glTextureStorage3DMultisample = (pfn_glTextureStorage3DMultisample)load("glTextureStorage3DMultisample"); fp_glTextureSubImage1D = (pfn_glTextureSubImage1D)load("glTextureSubImage1D"); fp_glTextureSubImage2D = (pfn_glTextureSubImage2D)load("glTextureSubImage2D"); fp_glTextureSubImage3D = (pfn_glTextureSubImage3D)load("glTextureSubImage3D"); fp_glCompressedTextureSubImage1D = (pfn_glCompressedTextureSubImage1D)load("glCompressedTextureSubImage1D"); fp_glCompressedTextureSubImage2D = (pfn_glCompressedTextureSubImage2D)load("glCompressedTextureSubImage2D"); fp_glCompressedTextureSubImage3D = (pfn_glCompressedTextureSubImage3D)load("glCompressedTextureSubImage3D"); fp_glCopyTextureSubImage1D = (pfn_glCopyTextureSubImage1D)load("glCopyTextureSubImage1D"); fp_glCopyTextureSubImage2D = (pfn_glCopyTextureSubImage2D)load("glCopyTextureSubImage2D"); fp_glCopyTextureSubImage3D = (pfn_glCopyTextureSubImage3D)load("glCopyTextureSubImage3D"); fp_glTextureParameterf = (pfn_glTextureParameterf)load("glTextureParameterf"); fp_glTextureParameterfv = (pfn_glTextureParameterfv)load("glTextureParameterfv"); fp_glTextureParameteri = (pfn_glTextureParameteri)load("glTextureParameteri"); fp_glTextureParameterIiv = (pfn_glTextureParameterIiv)load("glTextureParameterIiv"); fp_glTextureParameterIuiv = (pfn_glTextureParameterIuiv)load("glTextureParameterIuiv"); fp_glTextureParameteriv = (pfn_glTextureParameteriv)load("glTextureParameteriv"); fp_glGenerateTextureMipmap = (pfn_glGenerateTextureMipmap)load("glGenerateTextureMipmap"); fp_glBindTextureUnit = (pfn_glBindTextureUnit)load("glBindTextureUnit"); fp_glGetTextureImage = (pfn_glGetTextureImage)load("glGetTextureImage"); fp_glGetCompressedTextureImage = (pfn_glGetCompressedTextureImage)load("glGetCompressedTextureImage"); fp_glGetTextureLevelParameterfv = (pfn_glGetTextureLevelParameterfv)load("glGetTextureLevelParameterfv"); fp_glGetTextureLevelParameteriv = (pfn_glGetTextureLevelParameteriv)load("glGetTextureLevelParameteriv"); fp_glGetTextureParameterfv = (pfn_glGetTextureParameterfv)load("glGetTextureParameterfv"); fp_glGetTextureParameterIiv = (pfn_glGetTextureParameterIiv)load("glGetTextureParameterIiv"); fp_glGetTextureParameterIuiv = (pfn_glGetTextureParameterIuiv)load("glGetTextureParameterIuiv"); fp_glGetTextureParameteriv = (pfn_glGetTextureParameteriv)load("glGetTextureParameteriv"); fp_glCreateVertexArrays = (pfn_glCreateVertexArrays)load("glCreateVertexArrays"); fp_glDisableVertexArrayAttrib = (pfn_glDisableVertexArrayAttrib)load("glDisableVertexArrayAttrib"); fp_glEnableVertexArrayAttrib = (pfn_glEnableVertexArrayAttrib)load("glEnableVertexArrayAttrib"); fp_glVertexArrayElementBuffer = (pfn_glVertexArrayElementBuffer)load("glVertexArrayElementBuffer"); fp_glVertexArrayVertexBuffer = (pfn_glVertexArrayVertexBuffer)load("glVertexArrayVertexBuffer"); fp_glVertexArrayVertexBuffers = (pfn_glVertexArrayVertexBuffers)load("glVertexArrayVertexBuffers"); fp_glVertexArrayAttribBinding = (pfn_glVertexArrayAttribBinding)load("glVertexArrayAttribBinding"); fp_glVertexArrayAttribFormat = (pfn_glVertexArrayAttribFormat)load("glVertexArrayAttribFormat"); fp_glVertexArrayAttribIFormat = (pfn_glVertexArrayAttribIFormat)load("glVertexArrayAttribIFormat"); fp_glVertexArrayAttribLFormat = (pfn_glVertexArrayAttribLFormat)load("glVertexArrayAttribLFormat"); fp_glVertexArrayBindingDivisor = (pfn_glVertexArrayBindingDivisor)load("glVertexArrayBindingDivisor"); fp_glGetVertexArrayiv = (pfn_glGetVertexArrayiv)load("glGetVertexArrayiv"); fp_glGetVertexArrayIndexediv = (pfn_glGetVertexArrayIndexediv)load("glGetVertexArrayIndexediv"); fp_glGetVertexArrayIndexed64iv = (pfn_glGetVertexArrayIndexed64iv)load("glGetVertexArrayIndexed64iv"); fp_glCreateSamplers = (pfn_glCreateSamplers)load("glCreateSamplers"); fp_glCreateProgramPipelines = (pfn_glCreateProgramPipelines)load("glCreateProgramPipelines"); fp_glCreateQueries = (pfn_glCreateQueries)load("glCreateQueries"); fp_glGetQueryBufferObjecti64v = (pfn_glGetQueryBufferObjecti64v)load("glGetQueryBufferObjecti64v"); fp_glGetQueryBufferObjectiv = (pfn_glGetQueryBufferObjectiv)load("glGetQueryBufferObjectiv"); fp_glGetQueryBufferObjectui64v = (pfn_glGetQueryBufferObjectui64v)load("glGetQueryBufferObjectui64v"); fp_glGetQueryBufferObjectuiv = (pfn_glGetQueryBufferObjectuiv)load("glGetQueryBufferObjectuiv"); } GLboolean GLAD_ARB_draw_buffers_blend = GL_FALSE; static void load_GL_ARB_draw_buffers_blend(LOADER load) { if(!GLAD_ARB_draw_buffers_blend) return; fp_glBlendEquationiARB = (pfn_glBlendEquationiARB)load("glBlendEquationiARB"); fp_glBlendEquationSeparateiARB = (pfn_glBlendEquationSeparateiARB)load("glBlendEquationSeparateiARB"); fp_glBlendFunciARB = (pfn_glBlendFunciARB)load("glBlendFunciARB"); fp_glBlendFuncSeparateiARB = (pfn_glBlendFuncSeparateiARB)load("glBlendFuncSeparateiARB"); } GLboolean GLAD_ARB_draw_elements_base_vertex = GL_FALSE; static void load_GL_ARB_draw_elements_base_vertex(LOADER load) { if(!GLAD_ARB_draw_elements_base_vertex) return; fp_glDrawElementsBaseVertex = (pfn_glDrawElementsBaseVertex)load("glDrawElementsBaseVertex"); fp_glDrawRangeElementsBaseVertex = (pfn_glDrawRangeElementsBaseVertex)load("glDrawRangeElementsBaseVertex"); fp_glDrawElementsInstancedBaseVertex = (pfn_glDrawElementsInstancedBaseVertex)load("glDrawElementsInstancedBaseVertex"); fp_glMultiDrawElementsBaseVertex = (pfn_glMultiDrawElementsBaseVertex)load("glMultiDrawElementsBaseVertex"); } GLboolean GLAD_ARB_draw_indirect = GL_FALSE; static void load_GL_ARB_draw_indirect(LOADER load) { if(!GLAD_ARB_draw_indirect) return; fp_glDrawArraysIndirect = (pfn_glDrawArraysIndirect)load("glDrawArraysIndirect"); fp_glDrawElementsIndirect = (pfn_glDrawElementsIndirect)load("glDrawElementsIndirect"); } GLboolean GLAD_ARB_draw_instanced = GL_FALSE; static void load_GL_ARB_draw_instanced(LOADER load) { if(!GLAD_ARB_draw_instanced) return; fp_glDrawArraysInstancedARB = (pfn_glDrawArraysInstancedARB)load("glDrawArraysInstancedARB"); fp_glDrawElementsInstancedARB = (pfn_glDrawElementsInstancedARB)load("glDrawElementsInstancedARB"); } GLboolean GLAD_ARB_enhanced_layouts = GL_FALSE; GLboolean GLAD_ARB_ES2_compatibility = GL_FALSE; static void load_GL_ARB_ES2_compatibility(LOADER load) { if(!GLAD_ARB_ES2_compatibility) return; fp_glReleaseShaderCompiler = (pfn_glReleaseShaderCompiler)load("glReleaseShaderCompiler"); fp_glShaderBinary = (pfn_glShaderBinary)load("glShaderBinary"); fp_glGetShaderPrecisionFormat = (pfn_glGetShaderPrecisionFormat)load("glGetShaderPrecisionFormat"); fp_glDepthRangef = (pfn_glDepthRangef)load("glDepthRangef"); fp_glClearDepthf = (pfn_glClearDepthf)load("glClearDepthf"); } GLboolean GLAD_ARB_ES3_1_compatibility = GL_FALSE; static void load_GL_ARB_ES3_1_compatibility(LOADER load) { if(!GLAD_ARB_ES3_1_compatibility) return; fp_glMemoryBarrierByRegion = (pfn_glMemoryBarrierByRegion)load("glMemoryBarrierByRegion"); } GLboolean GLAD_ARB_ES3_2_compatibility = GL_FALSE; static void load_GL_ARB_ES3_2_compatibility(LOADER load) { if(!GLAD_ARB_ES3_2_compatibility) return; fp_glPrimitiveBoundingBoxARB = (pfn_glPrimitiveBoundingBoxARB)load("glPrimitiveBoundingBoxARB"); } GLboolean GLAD_ARB_ES3_compatibility = GL_FALSE; GLboolean GLAD_ARB_explicit_attrib_location = GL_FALSE; GLboolean GLAD_ARB_explicit_uniform_location = GL_FALSE; GLboolean GLAD_ARB_fragment_coord_conventions = GL_FALSE; GLboolean GLAD_ARB_fragment_layer_viewport = GL_FALSE; GLboolean GLAD_ARB_fragment_shader_interlock = GL_FALSE; GLboolean GLAD_ARB_framebuffer_no_attachments = GL_FALSE; static void load_GL_ARB_framebuffer_no_attachments(LOADER load) { if(!GLAD_ARB_framebuffer_no_attachments) return; fp_glFramebufferParameteri = (pfn_glFramebufferParameteri)load("glFramebufferParameteri"); fp_glGetFramebufferParameteriv = (pfn_glGetFramebufferParameteriv)load("glGetFramebufferParameteriv"); } GLboolean GLAD_ARB_framebuffer_object = GL_FALSE; static void load_GL_ARB_framebuffer_object(LOADER load) { if(!GLAD_ARB_framebuffer_object) return; fp_glIsRenderbuffer = (pfn_glIsRenderbuffer)load("glIsRenderbuffer"); fp_glBindRenderbuffer = (pfn_glBindRenderbuffer)load("glBindRenderbuffer"); fp_glDeleteRenderbuffers = (pfn_glDeleteRenderbuffers)load("glDeleteRenderbuffers"); fp_glGenRenderbuffers = (pfn_glGenRenderbuffers)load("glGenRenderbuffers"); fp_glRenderbufferStorage = (pfn_glRenderbufferStorage)load("glRenderbufferStorage"); fp_glGetRenderbufferParameteriv = (pfn_glGetRenderbufferParameteriv)load("glGetRenderbufferParameteriv"); fp_glIsFramebuffer = (pfn_glIsFramebuffer)load("glIsFramebuffer"); fp_glBindFramebuffer = (pfn_glBindFramebuffer)load("glBindFramebuffer"); fp_glDeleteFramebuffers = (pfn_glDeleteFramebuffers)load("glDeleteFramebuffers"); fp_glGenFramebuffers = (pfn_glGenFramebuffers)load("glGenFramebuffers"); fp_glCheckFramebufferStatus = (pfn_glCheckFramebufferStatus)load("glCheckFramebufferStatus"); fp_glFramebufferTexture1D = (pfn_glFramebufferTexture1D)load("glFramebufferTexture1D"); fp_glFramebufferTexture2D = (pfn_glFramebufferTexture2D)load("glFramebufferTexture2D"); fp_glFramebufferTexture3D = (pfn_glFramebufferTexture3D)load("glFramebufferTexture3D"); fp_glFramebufferRenderbuffer = (pfn_glFramebufferRenderbuffer)load("glFramebufferRenderbuffer"); fp_glGetFramebufferAttachmentParameteriv = (pfn_glGetFramebufferAttachmentParameteriv)load("glGetFramebufferAttachmentParameteriv"); fp_glGenerateMipmap = (pfn_glGenerateMipmap)load("glGenerateMipmap"); fp_glBlitFramebuffer = (pfn_glBlitFramebuffer)load("glBlitFramebuffer"); fp_glRenderbufferStorageMultisample = (pfn_glRenderbufferStorageMultisample)load("glRenderbufferStorageMultisample"); fp_glFramebufferTextureLayer = (pfn_glFramebufferTextureLayer)load("glFramebufferTextureLayer"); } GLboolean GLAD_ARB_framebuffer_sRGB = GL_FALSE; GLboolean GLAD_ARB_geometry_shader4 = GL_FALSE; static void load_GL_ARB_geometry_shader4(LOADER load) { if(!GLAD_ARB_geometry_shader4) return; fp_glProgramParameteriARB = (pfn_glProgramParameteriARB)load("glProgramParameteriARB"); fp_glFramebufferTextureARB = (pfn_glFramebufferTextureARB)load("glFramebufferTextureARB"); fp_glFramebufferTextureLayerARB = (pfn_glFramebufferTextureLayerARB)load("glFramebufferTextureLayerARB"); fp_glFramebufferTextureFaceARB = (pfn_glFramebufferTextureFaceARB)load("glFramebufferTextureFaceARB"); } GLboolean GLAD_ARB_get_program_binary = GL_FALSE; static void load_GL_ARB_get_program_binary(LOADER load) { if(!GLAD_ARB_get_program_binary) return; fp_glGetProgramBinary = (pfn_glGetProgramBinary)load("glGetProgramBinary"); fp_glProgramBinary = (pfn_glProgramBinary)load("glProgramBinary"); fp_glProgramParameteri = (pfn_glProgramParameteri)load("glProgramParameteri"); } GLboolean GLAD_ARB_get_texture_sub_image = GL_FALSE; static void load_GL_ARB_get_texture_sub_image(LOADER load) { if(!GLAD_ARB_get_texture_sub_image) return; fp_glGetTextureSubImage = (pfn_glGetTextureSubImage)load("glGetTextureSubImage"); fp_glGetCompressedTextureSubImage = (pfn_glGetCompressedTextureSubImage)load("glGetCompressedTextureSubImage"); } GLboolean GLAD_ARB_gpu_shader5 = GL_FALSE; GLboolean GLAD_ARB_gpu_shader_fp64 = GL_FALSE; static void load_GL_ARB_gpu_shader_fp64(LOADER load) { if(!GLAD_ARB_gpu_shader_fp64) return; fp_glUniform1d = (pfn_glUniform1d)load("glUniform1d"); fp_glUniform2d = (pfn_glUniform2d)load("glUniform2d"); fp_glUniform3d = (pfn_glUniform3d)load("glUniform3d"); fp_glUniform4d = (pfn_glUniform4d)load("glUniform4d"); fp_glUniform1dv = (pfn_glUniform1dv)load("glUniform1dv"); fp_glUniform2dv = (pfn_glUniform2dv)load("glUniform2dv"); fp_glUniform3dv = (pfn_glUniform3dv)load("glUniform3dv"); fp_glUniform4dv = (pfn_glUniform4dv)load("glUniform4dv"); fp_glUniformMatrix2dv = (pfn_glUniformMatrix2dv)load("glUniformMatrix2dv"); fp_glUniformMatrix3dv = (pfn_glUniformMatrix3dv)load("glUniformMatrix3dv"); fp_glUniformMatrix4dv = (pfn_glUniformMatrix4dv)load("glUniformMatrix4dv"); fp_glUniformMatrix2x3dv = (pfn_glUniformMatrix2x3dv)load("glUniformMatrix2x3dv"); fp_glUniformMatrix2x4dv = (pfn_glUniformMatrix2x4dv)load("glUniformMatrix2x4dv"); fp_glUniformMatrix3x2dv = (pfn_glUniformMatrix3x2dv)load("glUniformMatrix3x2dv"); fp_glUniformMatrix3x4dv = (pfn_glUniformMatrix3x4dv)load("glUniformMatrix3x4dv"); fp_glUniformMatrix4x2dv = (pfn_glUniformMatrix4x2dv)load("glUniformMatrix4x2dv"); fp_glUniformMatrix4x3dv = (pfn_glUniformMatrix4x3dv)load("glUniformMatrix4x3dv"); fp_glGetUniformdv = (pfn_glGetUniformdv)load("glGetUniformdv"); } GLboolean GLAD_ARB_gpu_shader_int64 = GL_FALSE; static void load_GL_ARB_gpu_shader_int64(LOADER load) { if(!GLAD_ARB_gpu_shader_int64) return; fp_glUniform1i64ARB = (pfn_glUniform1i64ARB)load("glUniform1i64ARB"); fp_glUniform2i64ARB = (pfn_glUniform2i64ARB)load("glUniform2i64ARB"); fp_glUniform3i64ARB = (pfn_glUniform3i64ARB)load("glUniform3i64ARB"); fp_glUniform4i64ARB = (pfn_glUniform4i64ARB)load("glUniform4i64ARB"); fp_glUniform1i64vARB = (pfn_glUniform1i64vARB)load("glUniform1i64vARB"); fp_glUniform2i64vARB = (pfn_glUniform2i64vARB)load("glUniform2i64vARB"); fp_glUniform3i64vARB = (pfn_glUniform3i64vARB)load("glUniform3i64vARB"); fp_glUniform4i64vARB = (pfn_glUniform4i64vARB)load("glUniform4i64vARB"); fp_glUniform1ui64ARB = (pfn_glUniform1ui64ARB)load("glUniform1ui64ARB"); fp_glUniform2ui64ARB = (pfn_glUniform2ui64ARB)load("glUniform2ui64ARB"); fp_glUniform3ui64ARB = (pfn_glUniform3ui64ARB)load("glUniform3ui64ARB"); fp_glUniform4ui64ARB = (pfn_glUniform4ui64ARB)load("glUniform4ui64ARB"); fp_glUniform1ui64vARB = (pfn_glUniform1ui64vARB)load("glUniform1ui64vARB"); fp_glUniform2ui64vARB = (pfn_glUniform2ui64vARB)load("glUniform2ui64vARB"); fp_glUniform3ui64vARB = (pfn_glUniform3ui64vARB)load("glUniform3ui64vARB"); fp_glUniform4ui64vARB = (pfn_glUniform4ui64vARB)load("glUniform4ui64vARB"); fp_glGetUniformi64vARB = (pfn_glGetUniformi64vARB)load("glGetUniformi64vARB"); fp_glGetUniformui64vARB = (pfn_glGetUniformui64vARB)load("glGetUniformui64vARB"); fp_glGetnUniformi64vARB = (pfn_glGetnUniformi64vARB)load("glGetnUniformi64vARB"); fp_glGetnUniformui64vARB = (pfn_glGetnUniformui64vARB)load("glGetnUniformui64vARB"); fp_glProgramUniform1i64ARB = (pfn_glProgramUniform1i64ARB)load("glProgramUniform1i64ARB"); fp_glProgramUniform2i64ARB = (pfn_glProgramUniform2i64ARB)load("glProgramUniform2i64ARB"); fp_glProgramUniform3i64ARB = (pfn_glProgramUniform3i64ARB)load("glProgramUniform3i64ARB"); fp_glProgramUniform4i64ARB = (pfn_glProgramUniform4i64ARB)load("glProgramUniform4i64ARB"); fp_glProgramUniform1i64vARB = (pfn_glProgramUniform1i64vARB)load("glProgramUniform1i64vARB"); fp_glProgramUniform2i64vARB = (pfn_glProgramUniform2i64vARB)load("glProgramUniform2i64vARB"); fp_glProgramUniform3i64vARB = (pfn_glProgramUniform3i64vARB)load("glProgramUniform3i64vARB"); fp_glProgramUniform4i64vARB = (pfn_glProgramUniform4i64vARB)load("glProgramUniform4i64vARB"); fp_glProgramUniform1ui64ARB = (pfn_glProgramUniform1ui64ARB)load("glProgramUniform1ui64ARB"); fp_glProgramUniform2ui64ARB = (pfn_glProgramUniform2ui64ARB)load("glProgramUniform2ui64ARB"); fp_glProgramUniform3ui64ARB = (pfn_glProgramUniform3ui64ARB)load("glProgramUniform3ui64ARB"); fp_glProgramUniform4ui64ARB = (pfn_glProgramUniform4ui64ARB)load("glProgramUniform4ui64ARB"); fp_glProgramUniform1ui64vARB = (pfn_glProgramUniform1ui64vARB)load("glProgramUniform1ui64vARB"); fp_glProgramUniform2ui64vARB = (pfn_glProgramUniform2ui64vARB)load("glProgramUniform2ui64vARB"); fp_glProgramUniform3ui64vARB = (pfn_glProgramUniform3ui64vARB)load("glProgramUniform3ui64vARB"); fp_glProgramUniform4ui64vARB = (pfn_glProgramUniform4ui64vARB)load("glProgramUniform4ui64vARB"); } GLboolean GLAD_ARB_half_float_pixel = GL_FALSE; GLboolean GLAD_ARB_half_float_vertex = GL_FALSE; GLboolean GLAD_ARB_indirect_parameters = GL_FALSE; static void load_GL_ARB_indirect_parameters(LOADER load) { if(!GLAD_ARB_indirect_parameters) return; fp_glMultiDrawArraysIndirectCountARB = (pfn_glMultiDrawArraysIndirectCountARB)load("glMultiDrawArraysIndirectCountARB"); fp_glMultiDrawElementsIndirectCountARB = (pfn_glMultiDrawElementsIndirectCountARB)load("glMultiDrawElementsIndirectCountARB"); } GLboolean GLAD_ARB_instanced_arrays = GL_FALSE; static void load_GL_ARB_instanced_arrays(LOADER load) { if(!GLAD_ARB_instanced_arrays) return; fp_glVertexAttribDivisorARB = (pfn_glVertexAttribDivisorARB)load("glVertexAttribDivisorARB"); } GLboolean GLAD_ARB_internalformat_query = GL_FALSE; static void load_GL_ARB_internalformat_query(LOADER load) { if(!GLAD_ARB_internalformat_query) return; fp_glGetInternalformativ = (pfn_glGetInternalformativ)load("glGetInternalformativ"); } GLboolean GLAD_ARB_internalformat_query2 = GL_FALSE; static void load_GL_ARB_internalformat_query2(LOADER load) { if(!GLAD_ARB_internalformat_query2) return; fp_glGetInternalformati64v = (pfn_glGetInternalformati64v)load("glGetInternalformati64v"); } GLboolean GLAD_ARB_invalidate_subdata = GL_FALSE; static void load_GL_ARB_invalidate_subdata(LOADER load) { if(!GLAD_ARB_invalidate_subdata) return; fp_glInvalidateTexSubImage = (pfn_glInvalidateTexSubImage)load("glInvalidateTexSubImage"); fp_glInvalidateTexImage = (pfn_glInvalidateTexImage)load("glInvalidateTexImage"); fp_glInvalidateBufferSubData = (pfn_glInvalidateBufferSubData)load("glInvalidateBufferSubData"); fp_glInvalidateBufferData = (pfn_glInvalidateBufferData)load("glInvalidateBufferData"); fp_glInvalidateFramebuffer = (pfn_glInvalidateFramebuffer)load("glInvalidateFramebuffer"); fp_glInvalidateSubFramebuffer = (pfn_glInvalidateSubFramebuffer)load("glInvalidateSubFramebuffer"); } GLboolean GLAD_ARB_map_buffer_alignment = GL_FALSE; GLboolean GLAD_ARB_map_buffer_range = GL_FALSE; static void load_GL_ARB_map_buffer_range(LOADER load) { if(!GLAD_ARB_map_buffer_range) return; fp_glMapBufferRange = (pfn_glMapBufferRange)load("glMapBufferRange"); fp_glFlushMappedBufferRange = (pfn_glFlushMappedBufferRange)load("glFlushMappedBufferRange"); } GLboolean GLAD_ARB_multi_bind = GL_FALSE; static void load_GL_ARB_multi_bind(LOADER load) { if(!GLAD_ARB_multi_bind) return; fp_glBindBuffersBase = (pfn_glBindBuffersBase)load("glBindBuffersBase"); fp_glBindBuffersRange = (pfn_glBindBuffersRange)load("glBindBuffersRange"); fp_glBindTextures = (pfn_glBindTextures)load("glBindTextures"); fp_glBindSamplers = (pfn_glBindSamplers)load("glBindSamplers"); fp_glBindImageTextures = (pfn_glBindImageTextures)load("glBindImageTextures"); fp_glBindVertexBuffers = (pfn_glBindVertexBuffers)load("glBindVertexBuffers"); } GLboolean GLAD_ARB_multi_draw_indirect = GL_FALSE; static void load_GL_ARB_multi_draw_indirect(LOADER load) { if(!GLAD_ARB_multi_draw_indirect) return; fp_glMultiDrawArraysIndirect = (pfn_glMultiDrawArraysIndirect)load("glMultiDrawArraysIndirect"); fp_glMultiDrawElementsIndirect = (pfn_glMultiDrawElementsIndirect)load("glMultiDrawElementsIndirect"); } GLboolean GLAD_ARB_occlusion_query2 = GL_FALSE; GLboolean GLAD_ARB_parallel_shader_compile = GL_FALSE; static void load_GL_ARB_parallel_shader_compile(LOADER load) { if(!GLAD_ARB_parallel_shader_compile) return; fp_glMaxShaderCompilerThreadsARB = (pfn_glMaxShaderCompilerThreadsARB)load("glMaxShaderCompilerThreadsARB"); } GLboolean GLAD_ARB_pipeline_statistics_query = GL_FALSE; GLboolean GLAD_ARB_pixel_buffer_object = GL_FALSE; GLboolean GLAD_ARB_post_depth_coverage = GL_FALSE; GLboolean GLAD_ARB_program_interface_query = GL_FALSE; static void load_GL_ARB_program_interface_query(LOADER load) { if(!GLAD_ARB_program_interface_query) return; fp_glGetProgramInterfaceiv = (pfn_glGetProgramInterfaceiv)load("glGetProgramInterfaceiv"); fp_glGetProgramResourceIndex = (pfn_glGetProgramResourceIndex)load("glGetProgramResourceIndex"); fp_glGetProgramResourceName = (pfn_glGetProgramResourceName)load("glGetProgramResourceName"); fp_glGetProgramResourceiv = (pfn_glGetProgramResourceiv)load("glGetProgramResourceiv"); fp_glGetProgramResourceLocation = (pfn_glGetProgramResourceLocation)load("glGetProgramResourceLocation"); fp_glGetProgramResourceLocationIndex = (pfn_glGetProgramResourceLocationIndex)load("glGetProgramResourceLocationIndex"); } GLboolean GLAD_ARB_provoking_vertex = GL_FALSE; static void load_GL_ARB_provoking_vertex(LOADER load) { if(!GLAD_ARB_provoking_vertex) return; fp_glProvokingVertex = (pfn_glProvokingVertex)load("glProvokingVertex"); } GLboolean GLAD_ARB_query_buffer_object = GL_FALSE; GLboolean GLAD_ARB_robust_buffer_access_behavior = GL_FALSE; GLboolean GLAD_ARB_robustness = GL_FALSE; static void load_GL_ARB_robustness(LOADER load) { if(!GLAD_ARB_robustness) return; fp_glGetGraphicsResetStatusARB = (pfn_glGetGraphicsResetStatusARB)load("glGetGraphicsResetStatusARB"); fp_glGetnTexImageARB = (pfn_glGetnTexImageARB)load("glGetnTexImageARB"); fp_glReadnPixelsARB = (pfn_glReadnPixelsARB)load("glReadnPixelsARB"); fp_glGetnCompressedTexImageARB = (pfn_glGetnCompressedTexImageARB)load("glGetnCompressedTexImageARB"); fp_glGetnUniformfvARB = (pfn_glGetnUniformfvARB)load("glGetnUniformfvARB"); fp_glGetnUniformivARB = (pfn_glGetnUniformivARB)load("glGetnUniformivARB"); fp_glGetnUniformuivARB = (pfn_glGetnUniformuivARB)load("glGetnUniformuivARB"); fp_glGetnUniformdvARB = (pfn_glGetnUniformdvARB)load("glGetnUniformdvARB"); fp_glGetnMapdvARB = (pfn_glGetnMapdvARB)load("glGetnMapdvARB"); fp_glGetnMapfvARB = (pfn_glGetnMapfvARB)load("glGetnMapfvARB"); fp_glGetnMapivARB = (pfn_glGetnMapivARB)load("glGetnMapivARB"); fp_glGetnPixelMapfvARB = (pfn_glGetnPixelMapfvARB)load("glGetnPixelMapfvARB"); fp_glGetnPixelMapuivARB = (pfn_glGetnPixelMapuivARB)load("glGetnPixelMapuivARB"); fp_glGetnPixelMapusvARB = (pfn_glGetnPixelMapusvARB)load("glGetnPixelMapusvARB"); fp_glGetnPolygonStippleARB = (pfn_glGetnPolygonStippleARB)load("glGetnPolygonStippleARB"); fp_glGetnColorTableARB = (pfn_glGetnColorTableARB)load("glGetnColorTableARB"); fp_glGetnConvolutionFilterARB = (pfn_glGetnConvolutionFilterARB)load("glGetnConvolutionFilterARB"); fp_glGetnSeparableFilterARB = (pfn_glGetnSeparableFilterARB)load("glGetnSeparableFilterARB"); fp_glGetnHistogramARB = (pfn_glGetnHistogramARB)load("glGetnHistogramARB"); fp_glGetnMinmaxARB = (pfn_glGetnMinmaxARB)load("glGetnMinmaxARB"); } GLboolean GLAD_ARB_robustness_isolation = GL_FALSE; GLboolean GLAD_ARB_sample_locations = GL_FALSE; static void load_GL_ARB_sample_locations(LOADER load) { if(!GLAD_ARB_sample_locations) return; fp_glFramebufferSampleLocationsfvARB = (pfn_glFramebufferSampleLocationsfvARB)load("glFramebufferSampleLocationsfvARB"); fp_glNamedFramebufferSampleLocationsfvARB = (pfn_glNamedFramebufferSampleLocationsfvARB)load("glNamedFramebufferSampleLocationsfvARB"); fp_glEvaluateDepthValuesARB = (pfn_glEvaluateDepthValuesARB)load("glEvaluateDepthValuesARB"); } GLboolean GLAD_ARB_sample_shading = GL_FALSE; static void load_GL_ARB_sample_shading(LOADER load) { if(!GLAD_ARB_sample_shading) return; fp_glMinSampleShadingARB = (pfn_glMinSampleShadingARB)load("glMinSampleShadingARB"); } GLboolean GLAD_ARB_sampler_objects = GL_FALSE; static void load_GL_ARB_sampler_objects(LOADER load) { if(!GLAD_ARB_sampler_objects) return; fp_glGenSamplers = (pfn_glGenSamplers)load("glGenSamplers"); fp_glDeleteSamplers = (pfn_glDeleteSamplers)load("glDeleteSamplers"); fp_glIsSampler = (pfn_glIsSampler)load("glIsSampler"); fp_glBindSampler = (pfn_glBindSampler)load("glBindSampler"); fp_glSamplerParameteri = (pfn_glSamplerParameteri)load("glSamplerParameteri"); fp_glSamplerParameteriv = (pfn_glSamplerParameteriv)load("glSamplerParameteriv"); fp_glSamplerParameterf = (pfn_glSamplerParameterf)load("glSamplerParameterf"); fp_glSamplerParameterfv = (pfn_glSamplerParameterfv)load("glSamplerParameterfv"); fp_glSamplerParameterIiv = (pfn_glSamplerParameterIiv)load("glSamplerParameterIiv"); fp_glSamplerParameterIuiv = (pfn_glSamplerParameterIuiv)load("glSamplerParameterIuiv"); fp_glGetSamplerParameteriv = (pfn_glGetSamplerParameteriv)load("glGetSamplerParameteriv"); fp_glGetSamplerParameterIiv = (pfn_glGetSamplerParameterIiv)load("glGetSamplerParameterIiv"); fp_glGetSamplerParameterfv = (pfn_glGetSamplerParameterfv)load("glGetSamplerParameterfv"); fp_glGetSamplerParameterIuiv = (pfn_glGetSamplerParameterIuiv)load("glGetSamplerParameterIuiv"); } GLboolean GLAD_ARB_seamless_cube_map = GL_FALSE; GLboolean GLAD_ARB_seamless_cubemap_per_texture = GL_FALSE; GLboolean GLAD_ARB_separate_shader_objects = GL_FALSE; static void load_GL_ARB_separate_shader_objects(LOADER load) { if(!GLAD_ARB_separate_shader_objects) return; fp_glUseProgramStages = (pfn_glUseProgramStages)load("glUseProgramStages"); fp_glActiveShaderProgram = (pfn_glActiveShaderProgram)load("glActiveShaderProgram"); fp_glCreateShaderProgramv = (pfn_glCreateShaderProgramv)load("glCreateShaderProgramv"); fp_glBindProgramPipeline = (pfn_glBindProgramPipeline)load("glBindProgramPipeline"); fp_glDeleteProgramPipelines = (pfn_glDeleteProgramPipelines)load("glDeleteProgramPipelines"); fp_glGenProgramPipelines = (pfn_glGenProgramPipelines)load("glGenProgramPipelines"); fp_glIsProgramPipeline = (pfn_glIsProgramPipeline)load("glIsProgramPipeline"); fp_glGetProgramPipelineiv = (pfn_glGetProgramPipelineiv)load("glGetProgramPipelineiv"); fp_glProgramUniform1i = (pfn_glProgramUniform1i)load("glProgramUniform1i"); fp_glProgramUniform1iv = (pfn_glProgramUniform1iv)load("glProgramUniform1iv"); fp_glProgramUniform1f = (pfn_glProgramUniform1f)load("glProgramUniform1f"); fp_glProgramUniform1fv = (pfn_glProgramUniform1fv)load("glProgramUniform1fv"); fp_glProgramUniform1d = (pfn_glProgramUniform1d)load("glProgramUniform1d"); fp_glProgramUniform1dv = (pfn_glProgramUniform1dv)load("glProgramUniform1dv"); fp_glProgramUniform1ui = (pfn_glProgramUniform1ui)load("glProgramUniform1ui"); fp_glProgramUniform1uiv = (pfn_glProgramUniform1uiv)load("glProgramUniform1uiv"); fp_glProgramUniform2i = (pfn_glProgramUniform2i)load("glProgramUniform2i"); fp_glProgramUniform2iv = (pfn_glProgramUniform2iv)load("glProgramUniform2iv"); fp_glProgramUniform2f = (pfn_glProgramUniform2f)load("glProgramUniform2f"); fp_glProgramUniform2fv = (pfn_glProgramUniform2fv)load("glProgramUniform2fv"); fp_glProgramUniform2d = (pfn_glProgramUniform2d)load("glProgramUniform2d"); fp_glProgramUniform2dv = (pfn_glProgramUniform2dv)load("glProgramUniform2dv"); fp_glProgramUniform2ui = (pfn_glProgramUniform2ui)load("glProgramUniform2ui"); fp_glProgramUniform2uiv = (pfn_glProgramUniform2uiv)load("glProgramUniform2uiv"); fp_glProgramUniform3i = (pfn_glProgramUniform3i)load("glProgramUniform3i"); fp_glProgramUniform3iv = (pfn_glProgramUniform3iv)load("glProgramUniform3iv"); fp_glProgramUniform3f = (pfn_glProgramUniform3f)load("glProgramUniform3f"); fp_glProgramUniform3fv = (pfn_glProgramUniform3fv)load("glProgramUniform3fv"); fp_glProgramUniform3d = (pfn_glProgramUniform3d)load("glProgramUniform3d"); fp_glProgramUniform3dv = (pfn_glProgramUniform3dv)load("glProgramUniform3dv"); fp_glProgramUniform3ui = (pfn_glProgramUniform3ui)load("glProgramUniform3ui"); fp_glProgramUniform3uiv = (pfn_glProgramUniform3uiv)load("glProgramUniform3uiv"); fp_glProgramUniform4i = (pfn_glProgramUniform4i)load("glProgramUniform4i"); fp_glProgramUniform4iv = (pfn_glProgramUniform4iv)load("glProgramUniform4iv"); fp_glProgramUniform4f = (pfn_glProgramUniform4f)load("glProgramUniform4f"); fp_glProgramUniform4fv = (pfn_glProgramUniform4fv)load("glProgramUniform4fv"); fp_glProgramUniform4d = (pfn_glProgramUniform4d)load("glProgramUniform4d"); fp_glProgramUniform4dv = (pfn_glProgramUniform4dv)load("glProgramUniform4dv"); fp_glProgramUniform4ui = (pfn_glProgramUniform4ui)load("glProgramUniform4ui"); fp_glProgramUniform4uiv = (pfn_glProgramUniform4uiv)load("glProgramUniform4uiv"); fp_glProgramUniformMatrix2fv = (pfn_glProgramUniformMatrix2fv)load("glProgramUniformMatrix2fv"); fp_glProgramUniformMatrix3fv = (pfn_glProgramUniformMatrix3fv)load("glProgramUniformMatrix3fv"); fp_glProgramUniformMatrix4fv = (pfn_glProgramUniformMatrix4fv)load("glProgramUniformMatrix4fv"); fp_glProgramUniformMatrix2dv = (pfn_glProgramUniformMatrix2dv)load("glProgramUniformMatrix2dv"); fp_glProgramUniformMatrix3dv = (pfn_glProgramUniformMatrix3dv)load("glProgramUniformMatrix3dv"); fp_glProgramUniformMatrix4dv = (pfn_glProgramUniformMatrix4dv)load("glProgramUniformMatrix4dv"); fp_glProgramUniformMatrix2x3fv = (pfn_glProgramUniformMatrix2x3fv)load("glProgramUniformMatrix2x3fv"); fp_glProgramUniformMatrix3x2fv = (pfn_glProgramUniformMatrix3x2fv)load("glProgramUniformMatrix3x2fv"); fp_glProgramUniformMatrix2x4fv = (pfn_glProgramUniformMatrix2x4fv)load("glProgramUniformMatrix2x4fv"); fp_glProgramUniformMatrix4x2fv = (pfn_glProgramUniformMatrix4x2fv)load("glProgramUniformMatrix4x2fv"); fp_glProgramUniformMatrix3x4fv = (pfn_glProgramUniformMatrix3x4fv)load("glProgramUniformMatrix3x4fv"); fp_glProgramUniformMatrix4x3fv = (pfn_glProgramUniformMatrix4x3fv)load("glProgramUniformMatrix4x3fv"); fp_glProgramUniformMatrix2x3dv = (pfn_glProgramUniformMatrix2x3dv)load("glProgramUniformMatrix2x3dv"); fp_glProgramUniformMatrix3x2dv = (pfn_glProgramUniformMatrix3x2dv)load("glProgramUniformMatrix3x2dv"); fp_glProgramUniformMatrix2x4dv = (pfn_glProgramUniformMatrix2x4dv)load("glProgramUniformMatrix2x4dv"); fp_glProgramUniformMatrix4x2dv = (pfn_glProgramUniformMatrix4x2dv)load("glProgramUniformMatrix4x2dv"); fp_glProgramUniformMatrix3x4dv = (pfn_glProgramUniformMatrix3x4dv)load("glProgramUniformMatrix3x4dv"); fp_glProgramUniformMatrix4x3dv = (pfn_glProgramUniformMatrix4x3dv)load("glProgramUniformMatrix4x3dv"); fp_glValidateProgramPipeline = (pfn_glValidateProgramPipeline)load("glValidateProgramPipeline"); fp_glGetProgramPipelineInfoLog = (pfn_glGetProgramPipelineInfoLog)load("glGetProgramPipelineInfoLog"); } GLboolean GLAD_ARB_shader_atomic_counter_ops = GL_FALSE; GLboolean GLAD_ARB_shader_atomic_counters = GL_FALSE; static void load_GL_ARB_shader_atomic_counters(LOADER load) { if(!GLAD_ARB_shader_atomic_counters) return; fp_glGetActiveAtomicCounterBufferiv = (pfn_glGetActiveAtomicCounterBufferiv)load("glGetActiveAtomicCounterBufferiv"); } GLboolean GLAD_ARB_shader_ballot = GL_FALSE; GLboolean GLAD_ARB_shader_bit_encoding = GL_FALSE; GLboolean GLAD_ARB_shader_clock = GL_FALSE; GLboolean GLAD_ARB_shader_draw_parameters = GL_FALSE; GLboolean GLAD_ARB_shader_group_vote = GL_FALSE; GLboolean GLAD_ARB_shader_image_load_store = GL_FALSE; static void load_GL_ARB_shader_image_load_store(LOADER load) { if(!GLAD_ARB_shader_image_load_store) return; fp_glBindImageTexture = (pfn_glBindImageTexture)load("glBindImageTexture"); fp_glMemoryBarrier = (pfn_glMemoryBarrier)load("glMemoryBarrier"); } GLboolean GLAD_ARB_shader_image_size = GL_FALSE; GLboolean GLAD_ARB_shader_precision = GL_FALSE; GLboolean GLAD_ARB_shader_stencil_export = GL_FALSE; GLboolean GLAD_ARB_shader_storage_buffer_object = GL_FALSE; static void load_GL_ARB_shader_storage_buffer_object(LOADER load) { if(!GLAD_ARB_shader_storage_buffer_object) return; fp_glShaderStorageBlockBinding = (pfn_glShaderStorageBlockBinding)load("glShaderStorageBlockBinding"); } GLboolean GLAD_ARB_shader_subroutine = GL_FALSE; static void load_GL_ARB_shader_subroutine(LOADER load) { if(!GLAD_ARB_shader_subroutine) return; fp_glGetSubroutineUniformLocation = (pfn_glGetSubroutineUniformLocation)load("glGetSubroutineUniformLocation"); fp_glGetSubroutineIndex = (pfn_glGetSubroutineIndex)load("glGetSubroutineIndex"); fp_glGetActiveSubroutineUniformiv = (pfn_glGetActiveSubroutineUniformiv)load("glGetActiveSubroutineUniformiv"); fp_glGetActiveSubroutineUniformName = (pfn_glGetActiveSubroutineUniformName)load("glGetActiveSubroutineUniformName"); fp_glGetActiveSubroutineName = (pfn_glGetActiveSubroutineName)load("glGetActiveSubroutineName"); fp_glUniformSubroutinesuiv = (pfn_glUniformSubroutinesuiv)load("glUniformSubroutinesuiv"); fp_glGetUniformSubroutineuiv = (pfn_glGetUniformSubroutineuiv)load("glGetUniformSubroutineuiv"); fp_glGetProgramStageiv = (pfn_glGetProgramStageiv)load("glGetProgramStageiv"); } GLboolean GLAD_ARB_shader_texture_image_samples = GL_FALSE; GLboolean GLAD_ARB_shader_texture_lod = GL_FALSE; GLboolean GLAD_ARB_shader_viewport_layer_array = GL_FALSE; GLboolean GLAD_ARB_shading_language_420pack = GL_FALSE; GLboolean GLAD_ARB_shading_language_include = GL_FALSE; static void load_GL_ARB_shading_language_include(LOADER load) { if(!GLAD_ARB_shading_language_include) return; fp_glNamedStringARB = (pfn_glNamedStringARB)load("glNamedStringARB"); fp_glDeleteNamedStringARB = (pfn_glDeleteNamedStringARB)load("glDeleteNamedStringARB"); fp_glCompileShaderIncludeARB = (pfn_glCompileShaderIncludeARB)load("glCompileShaderIncludeARB"); fp_glIsNamedStringARB = (pfn_glIsNamedStringARB)load("glIsNamedStringARB"); fp_glGetNamedStringARB = (pfn_glGetNamedStringARB)load("glGetNamedStringARB"); fp_glGetNamedStringivARB = (pfn_glGetNamedStringivARB)load("glGetNamedStringivARB"); } GLboolean GLAD_ARB_shading_language_packing = GL_FALSE; GLboolean GLAD_ARB_sparse_buffer = GL_FALSE; static void load_GL_ARB_sparse_buffer(LOADER load) { if(!GLAD_ARB_sparse_buffer) return; fp_glBufferPageCommitmentARB = (pfn_glBufferPageCommitmentARB)load("glBufferPageCommitmentARB"); fp_glNamedBufferPageCommitmentEXT = (pfn_glNamedBufferPageCommitmentEXT)load("glNamedBufferPageCommitmentEXT"); fp_glNamedBufferPageCommitmentARB = (pfn_glNamedBufferPageCommitmentARB)load("glNamedBufferPageCommitmentARB"); } GLboolean GLAD_ARB_sparse_texture = GL_FALSE; static void load_GL_ARB_sparse_texture(LOADER load) { if(!GLAD_ARB_sparse_texture) return; fp_glTexPageCommitmentARB = (pfn_glTexPageCommitmentARB)load("glTexPageCommitmentARB"); } GLboolean GLAD_ARB_sparse_texture2 = GL_FALSE; GLboolean GLAD_ARB_sparse_texture_clamp = GL_FALSE; GLboolean GLAD_ARB_stencil_texturing = GL_FALSE; GLboolean GLAD_ARB_sync = GL_FALSE; static void load_GL_ARB_sync(LOADER load) { if(!GLAD_ARB_sync) return; fp_glFenceSync = (pfn_glFenceSync)load("glFenceSync"); fp_glIsSync = (pfn_glIsSync)load("glIsSync"); fp_glDeleteSync = (pfn_glDeleteSync)load("glDeleteSync"); fp_glClientWaitSync = (pfn_glClientWaitSync)load("glClientWaitSync"); fp_glWaitSync = (pfn_glWaitSync)load("glWaitSync"); fp_glGetInteger64v = (pfn_glGetInteger64v)load("glGetInteger64v"); fp_glGetSynciv = (pfn_glGetSynciv)load("glGetSynciv"); } GLboolean GLAD_ARB_tessellation_shader = GL_FALSE; static void load_GL_ARB_tessellation_shader(LOADER load) { if(!GLAD_ARB_tessellation_shader) return; fp_glPatchParameteri = (pfn_glPatchParameteri)load("glPatchParameteri"); fp_glPatchParameterfv = (pfn_glPatchParameterfv)load("glPatchParameterfv"); } GLboolean GLAD_ARB_texture_barrier = GL_FALSE; static void load_GL_ARB_texture_barrier(LOADER load) { if(!GLAD_ARB_texture_barrier) return; fp_glTextureBarrier = (pfn_glTextureBarrier)load("glTextureBarrier"); } GLboolean GLAD_ARB_texture_buffer_object = GL_FALSE; static void load_GL_ARB_texture_buffer_object(LOADER load) { if(!GLAD_ARB_texture_buffer_object) return; fp_glTexBufferARB = (pfn_glTexBufferARB)load("glTexBufferARB"); } GLboolean GLAD_ARB_texture_buffer_object_rgb32 = GL_FALSE; GLboolean GLAD_ARB_texture_buffer_range = GL_FALSE; static void load_GL_ARB_texture_buffer_range(LOADER load) { if(!GLAD_ARB_texture_buffer_range) return; fp_glTexBufferRange = (pfn_glTexBufferRange)load("glTexBufferRange"); } GLboolean GLAD_ARB_texture_compression_bptc = GL_FALSE; GLboolean GLAD_ARB_texture_compression_rgtc = GL_FALSE; GLboolean GLAD_ARB_texture_cube_map_array = GL_FALSE; GLboolean GLAD_ARB_texture_filter_minmax = GL_FALSE; GLboolean GLAD_ARB_texture_float = GL_FALSE; GLboolean GLAD_ARB_texture_gather = GL_FALSE; GLboolean GLAD_ARB_texture_mirror_clamp_to_edge = GL_FALSE; GLboolean GLAD_ARB_texture_multisample = GL_FALSE; static void load_GL_ARB_texture_multisample(LOADER load) { if(!GLAD_ARB_texture_multisample) return; fp_glTexImage2DMultisample = (pfn_glTexImage2DMultisample)load("glTexImage2DMultisample"); fp_glTexImage3DMultisample = (pfn_glTexImage3DMultisample)load("glTexImage3DMultisample"); fp_glGetMultisamplefv = (pfn_glGetMultisamplefv)load("glGetMultisamplefv"); fp_glSampleMaski = (pfn_glSampleMaski)load("glSampleMaski"); } GLboolean GLAD_ARB_texture_query_levels = GL_FALSE; GLboolean GLAD_ARB_texture_query_lod = GL_FALSE; GLboolean GLAD_ARB_texture_rectangle = GL_FALSE; GLboolean GLAD_ARB_texture_rg = GL_FALSE; GLboolean GLAD_ARB_texture_rgb10_a2ui = GL_FALSE; GLboolean GLAD_ARB_texture_stencil8 = GL_FALSE; GLboolean GLAD_ARB_texture_storage = GL_FALSE; static void load_GL_ARB_texture_storage(LOADER load) { if(!GLAD_ARB_texture_storage) return; fp_glTexStorage1D = (pfn_glTexStorage1D)load("glTexStorage1D"); fp_glTexStorage2D = (pfn_glTexStorage2D)load("glTexStorage2D"); fp_glTexStorage3D = (pfn_glTexStorage3D)load("glTexStorage3D"); } GLboolean GLAD_ARB_texture_storage_multisample = GL_FALSE; static void load_GL_ARB_texture_storage_multisample(LOADER load) { if(!GLAD_ARB_texture_storage_multisample) return; fp_glTexStorage2DMultisample = (pfn_glTexStorage2DMultisample)load("glTexStorage2DMultisample"); fp_glTexStorage3DMultisample = (pfn_glTexStorage3DMultisample)load("glTexStorage3DMultisample"); } GLboolean GLAD_ARB_texture_swizzle = GL_FALSE; GLboolean GLAD_ARB_texture_view = GL_FALSE; static void load_GL_ARB_texture_view(LOADER load) { if(!GLAD_ARB_texture_view) return; fp_glTextureView = (pfn_glTextureView)load("glTextureView"); } GLboolean GLAD_ARB_timer_query = GL_FALSE; static void load_GL_ARB_timer_query(LOADER load) { if(!GLAD_ARB_timer_query) return; fp_glQueryCounter = (pfn_glQueryCounter)load("glQueryCounter"); fp_glGetQueryObjecti64v = (pfn_glGetQueryObjecti64v)load("glGetQueryObjecti64v"); fp_glGetQueryObjectui64v = (pfn_glGetQueryObjectui64v)load("glGetQueryObjectui64v"); } GLboolean GLAD_ARB_transform_feedback2 = GL_FALSE; static void load_GL_ARB_transform_feedback2(LOADER load) { if(!GLAD_ARB_transform_feedback2) return; fp_glBindTransformFeedback = (pfn_glBindTransformFeedback)load("glBindTransformFeedback"); fp_glDeleteTransformFeedbacks = (pfn_glDeleteTransformFeedbacks)load("glDeleteTransformFeedbacks"); fp_glGenTransformFeedbacks = (pfn_glGenTransformFeedbacks)load("glGenTransformFeedbacks"); fp_glIsTransformFeedback = (pfn_glIsTransformFeedback)load("glIsTransformFeedback"); fp_glPauseTransformFeedback = (pfn_glPauseTransformFeedback)load("glPauseTransformFeedback"); fp_glResumeTransformFeedback = (pfn_glResumeTransformFeedback)load("glResumeTransformFeedback"); fp_glDrawTransformFeedback = (pfn_glDrawTransformFeedback)load("glDrawTransformFeedback"); } GLboolean GLAD_ARB_transform_feedback3 = GL_FALSE; static void load_GL_ARB_transform_feedback3(LOADER load) { if(!GLAD_ARB_transform_feedback3) return; fp_glDrawTransformFeedbackStream = (pfn_glDrawTransformFeedbackStream)load("glDrawTransformFeedbackStream"); fp_glBeginQueryIndexed = (pfn_glBeginQueryIndexed)load("glBeginQueryIndexed"); fp_glEndQueryIndexed = (pfn_glEndQueryIndexed)load("glEndQueryIndexed"); fp_glGetQueryIndexediv = (pfn_glGetQueryIndexediv)load("glGetQueryIndexediv"); } GLboolean GLAD_ARB_transform_feedback_instanced = GL_FALSE; static void load_GL_ARB_transform_feedback_instanced(LOADER load) { if(!GLAD_ARB_transform_feedback_instanced) return; fp_glDrawTransformFeedbackInstanced = (pfn_glDrawTransformFeedbackInstanced)load("glDrawTransformFeedbackInstanced"); fp_glDrawTransformFeedbackStreamInstanced = (pfn_glDrawTransformFeedbackStreamInstanced)load("glDrawTransformFeedbackStreamInstanced"); } GLboolean GLAD_ARB_transform_feedback_overflow_query = GL_FALSE; GLboolean GLAD_ARB_uniform_buffer_object = GL_FALSE; static void load_GL_ARB_uniform_buffer_object(LOADER load) { if(!GLAD_ARB_uniform_buffer_object) return; fp_glGetUniformIndices = (pfn_glGetUniformIndices)load("glGetUniformIndices"); fp_glGetActiveUniformsiv = (pfn_glGetActiveUniformsiv)load("glGetActiveUniformsiv"); fp_glGetActiveUniformName = (pfn_glGetActiveUniformName)load("glGetActiveUniformName"); fp_glGetUniformBlockIndex = (pfn_glGetUniformBlockIndex)load("glGetUniformBlockIndex"); fp_glGetActiveUniformBlockiv = (pfn_glGetActiveUniformBlockiv)load("glGetActiveUniformBlockiv"); fp_glGetActiveUniformBlockName = (pfn_glGetActiveUniformBlockName)load("glGetActiveUniformBlockName"); fp_glUniformBlockBinding = (pfn_glUniformBlockBinding)load("glUniformBlockBinding"); fp_glBindBufferRange = (pfn_glBindBufferRange)load("glBindBufferRange"); fp_glBindBufferBase = (pfn_glBindBufferBase)load("glBindBufferBase"); fp_glGetIntegeri_v = (pfn_glGetIntegeri_v)load("glGetIntegeri_v"); } GLboolean GLAD_ARB_vertex_array_bgra = GL_FALSE; GLboolean GLAD_ARB_vertex_array_object = GL_FALSE; static void load_GL_ARB_vertex_array_object(LOADER load) { if(!GLAD_ARB_vertex_array_object) return; fp_glBindVertexArray = (pfn_glBindVertexArray)load("glBindVertexArray"); fp_glDeleteVertexArrays = (pfn_glDeleteVertexArrays)load("glDeleteVertexArrays"); fp_glGenVertexArrays = (pfn_glGenVertexArrays)load("glGenVertexArrays"); fp_glIsVertexArray = (pfn_glIsVertexArray)load("glIsVertexArray"); } GLboolean GLAD_ARB_vertex_attrib_64bit = GL_FALSE; static void load_GL_ARB_vertex_attrib_64bit(LOADER load) { if(!GLAD_ARB_vertex_attrib_64bit) return; fp_glVertexAttribL1d = (pfn_glVertexAttribL1d)load("glVertexAttribL1d"); fp_glVertexAttribL2d = (pfn_glVertexAttribL2d)load("glVertexAttribL2d"); fp_glVertexAttribL3d = (pfn_glVertexAttribL3d)load("glVertexAttribL3d"); fp_glVertexAttribL4d = (pfn_glVertexAttribL4d)load("glVertexAttribL4d"); fp_glVertexAttribL1dv = (pfn_glVertexAttribL1dv)load("glVertexAttribL1dv"); fp_glVertexAttribL2dv = (pfn_glVertexAttribL2dv)load("glVertexAttribL2dv"); fp_glVertexAttribL3dv = (pfn_glVertexAttribL3dv)load("glVertexAttribL3dv"); fp_glVertexAttribL4dv = (pfn_glVertexAttribL4dv)load("glVertexAttribL4dv"); fp_glVertexAttribLPointer = (pfn_glVertexAttribLPointer)load("glVertexAttribLPointer"); fp_glGetVertexAttribLdv = (pfn_glGetVertexAttribLdv)load("glGetVertexAttribLdv"); } GLboolean GLAD_ARB_vertex_attrib_binding = GL_FALSE; static void load_GL_ARB_vertex_attrib_binding(LOADER load) { if(!GLAD_ARB_vertex_attrib_binding) return; fp_glBindVertexBuffer = (pfn_glBindVertexBuffer)load("glBindVertexBuffer"); fp_glVertexAttribFormat = (pfn_glVertexAttribFormat)load("glVertexAttribFormat"); fp_glVertexAttribIFormat = (pfn_glVertexAttribIFormat)load("glVertexAttribIFormat"); fp_glVertexAttribLFormat = (pfn_glVertexAttribLFormat)load("glVertexAttribLFormat"); fp_glVertexAttribBinding = (pfn_glVertexAttribBinding)load("glVertexAttribBinding"); fp_glVertexBindingDivisor = (pfn_glVertexBindingDivisor)load("glVertexBindingDivisor"); } GLboolean GLAD_ARB_vertex_type_10f_11f_11f_rev = GL_FALSE; GLboolean GLAD_ARB_vertex_type_2_10_10_10_rev = GL_FALSE; static void load_GL_ARB_vertex_type_2_10_10_10_rev(LOADER load) { if(!GLAD_ARB_vertex_type_2_10_10_10_rev) return; fp_glVertexAttribP1ui = (pfn_glVertexAttribP1ui)load("glVertexAttribP1ui"); fp_glVertexAttribP1uiv = (pfn_glVertexAttribP1uiv)load("glVertexAttribP1uiv"); fp_glVertexAttribP2ui = (pfn_glVertexAttribP2ui)load("glVertexAttribP2ui"); fp_glVertexAttribP2uiv = (pfn_glVertexAttribP2uiv)load("glVertexAttribP2uiv"); fp_glVertexAttribP3ui = (pfn_glVertexAttribP3ui)load("glVertexAttribP3ui"); fp_glVertexAttribP3uiv = (pfn_glVertexAttribP3uiv)load("glVertexAttribP3uiv"); fp_glVertexAttribP4ui = (pfn_glVertexAttribP4ui)load("glVertexAttribP4ui"); fp_glVertexAttribP4uiv = (pfn_glVertexAttribP4uiv)load("glVertexAttribP4uiv"); fp_glVertexP2ui = (pfn_glVertexP2ui)load("glVertexP2ui"); fp_glVertexP2uiv = (pfn_glVertexP2uiv)load("glVertexP2uiv"); fp_glVertexP3ui = (pfn_glVertexP3ui)load("glVertexP3ui"); fp_glVertexP3uiv = (pfn_glVertexP3uiv)load("glVertexP3uiv"); fp_glVertexP4ui = (pfn_glVertexP4ui)load("glVertexP4ui"); fp_glVertexP4uiv = (pfn_glVertexP4uiv)load("glVertexP4uiv"); fp_glTexCoordP1ui = (pfn_glTexCoordP1ui)load("glTexCoordP1ui"); fp_glTexCoordP1uiv = (pfn_glTexCoordP1uiv)load("glTexCoordP1uiv"); fp_glTexCoordP2ui = (pfn_glTexCoordP2ui)load("glTexCoordP2ui"); fp_glTexCoordP2uiv = (pfn_glTexCoordP2uiv)load("glTexCoordP2uiv"); fp_glTexCoordP3ui = (pfn_glTexCoordP3ui)load("glTexCoordP3ui"); fp_glTexCoordP3uiv = (pfn_glTexCoordP3uiv)load("glTexCoordP3uiv"); fp_glTexCoordP4ui = (pfn_glTexCoordP4ui)load("glTexCoordP4ui"); fp_glTexCoordP4uiv = (pfn_glTexCoordP4uiv)load("glTexCoordP4uiv"); fp_glMultiTexCoordP1ui = (pfn_glMultiTexCoordP1ui)load("glMultiTexCoordP1ui"); fp_glMultiTexCoordP1uiv = (pfn_glMultiTexCoordP1uiv)load("glMultiTexCoordP1uiv"); fp_glMultiTexCoordP2ui = (pfn_glMultiTexCoordP2ui)load("glMultiTexCoordP2ui"); fp_glMultiTexCoordP2uiv = (pfn_glMultiTexCoordP2uiv)load("glMultiTexCoordP2uiv"); fp_glMultiTexCoordP3ui = (pfn_glMultiTexCoordP3ui)load("glMultiTexCoordP3ui"); fp_glMultiTexCoordP3uiv = (pfn_glMultiTexCoordP3uiv)load("glMultiTexCoordP3uiv"); fp_glMultiTexCoordP4ui = (pfn_glMultiTexCoordP4ui)load("glMultiTexCoordP4ui"); fp_glMultiTexCoordP4uiv = (pfn_glMultiTexCoordP4uiv)load("glMultiTexCoordP4uiv"); fp_glNormalP3ui = (pfn_glNormalP3ui)load("glNormalP3ui"); fp_glNormalP3uiv = (pfn_glNormalP3uiv)load("glNormalP3uiv"); fp_glColorP3ui = (pfn_glColorP3ui)load("glColorP3ui"); fp_glColorP3uiv = (pfn_glColorP3uiv)load("glColorP3uiv"); fp_glColorP4ui = (pfn_glColorP4ui)load("glColorP4ui"); fp_glColorP4uiv = (pfn_glColorP4uiv)load("glColorP4uiv"); fp_glSecondaryColorP3ui = (pfn_glSecondaryColorP3ui)load("glSecondaryColorP3ui"); fp_glSecondaryColorP3uiv = (pfn_glSecondaryColorP3uiv)load("glSecondaryColorP3uiv"); } GLboolean GLAD_ARB_viewport_array = GL_FALSE; static void load_GL_ARB_viewport_array(LOADER load) { if(!GLAD_ARB_viewport_array) return; fp_glViewportArrayv = (pfn_glViewportArrayv)load("glViewportArrayv"); fp_glViewportIndexedf = (pfn_glViewportIndexedf)load("glViewportIndexedf"); fp_glViewportIndexedfv = (pfn_glViewportIndexedfv)load("glViewportIndexedfv"); fp_glScissorArrayv = (pfn_glScissorArrayv)load("glScissorArrayv"); fp_glScissorIndexed = (pfn_glScissorIndexed)load("glScissorIndexed"); fp_glScissorIndexedv = (pfn_glScissorIndexedv)load("glScissorIndexedv"); fp_glDepthRangeArrayv = (pfn_glDepthRangeArrayv)load("glDepthRangeArrayv"); fp_glDepthRangeIndexed = (pfn_glDepthRangeIndexed)load("glDepthRangeIndexed"); fp_glGetFloati_v = (pfn_glGetFloati_v)load("glGetFloati_v"); fp_glGetDoublei_v = (pfn_glGetDoublei_v)load("glGetDoublei_v"); } GLboolean GLAD_EXT_base_instance = GL_FALSE; static void load_GL_EXT_base_instance(LOADER load) { if(!GLAD_EXT_base_instance) return; fp_glDrawArraysInstancedBaseInstanceEXT = (pfn_glDrawArraysInstancedBaseInstanceEXT)load("glDrawArraysInstancedBaseInstanceEXT"); fp_glDrawElementsInstancedBaseInstanceEXT = (pfn_glDrawElementsInstancedBaseInstanceEXT)load("glDrawElementsInstancedBaseInstanceEXT"); fp_glDrawElementsInstancedBaseVertexBaseInstanceEXT = (pfn_glDrawElementsInstancedBaseVertexBaseInstanceEXT)load("glDrawElementsInstancedBaseVertexBaseInstanceEXT"); } GLboolean GLAD_EXT_bgra = GL_FALSE; GLboolean GLAD_EXT_bindable_uniform = GL_FALSE; static void load_GL_EXT_bindable_uniform(LOADER load) { if(!GLAD_EXT_bindable_uniform) return; fp_glUniformBufferEXT = (pfn_glUniformBufferEXT)load("glUniformBufferEXT"); fp_glGetUniformBufferSizeEXT = (pfn_glGetUniformBufferSizeEXT)load("glGetUniformBufferSizeEXT"); fp_glGetUniformOffsetEXT = (pfn_glGetUniformOffsetEXT)load("glGetUniformOffsetEXT"); } GLboolean GLAD_EXT_blend_func_extended = GL_FALSE; static void load_GL_EXT_blend_func_extended(LOADER load) { if(!GLAD_EXT_blend_func_extended) return; fp_glBindFragDataLocationIndexedEXT = (pfn_glBindFragDataLocationIndexedEXT)load("glBindFragDataLocationIndexedEXT"); fp_glBindFragDataLocationEXT = (pfn_glBindFragDataLocationEXT)load("glBindFragDataLocationEXT"); fp_glGetProgramResourceLocationIndexEXT = (pfn_glGetProgramResourceLocationIndexEXT)load("glGetProgramResourceLocationIndexEXT"); fp_glGetFragDataIndexEXT = (pfn_glGetFragDataIndexEXT)load("glGetFragDataIndexEXT"); } GLboolean GLAD_EXT_blend_minmax = GL_FALSE; static void load_GL_EXT_blend_minmax(LOADER load) { if(!GLAD_EXT_blend_minmax) return; fp_glBlendEquationEXT = (pfn_glBlendEquationEXT)load("glBlendEquationEXT"); } GLboolean GLAD_EXT_buffer_storage = GL_FALSE; static void load_GL_EXT_buffer_storage(LOADER load) { if(!GLAD_EXT_buffer_storage) return; fp_glBufferStorageEXT = (pfn_glBufferStorageEXT)load("glBufferStorageEXT"); } GLboolean GLAD_EXT_color_buffer_float = GL_FALSE; GLboolean GLAD_EXT_color_buffer_half_float = GL_FALSE; GLboolean GLAD_EXT_copy_image = GL_FALSE; static void load_GL_EXT_copy_image(LOADER load) { if(!GLAD_EXT_copy_image) return; fp_glCopyImageSubDataEXT = (pfn_glCopyImageSubDataEXT)load("glCopyImageSubDataEXT"); } GLboolean GLAD_EXT_debug_label = GL_FALSE; static void load_GL_EXT_debug_label(LOADER load) { if(!GLAD_EXT_debug_label) return; fp_glLabelObjectEXT = (pfn_glLabelObjectEXT)load("glLabelObjectEXT"); fp_glGetObjectLabelEXT = (pfn_glGetObjectLabelEXT)load("glGetObjectLabelEXT"); } GLboolean GLAD_EXT_debug_marker = GL_FALSE; static void load_GL_EXT_debug_marker(LOADER load) { if(!GLAD_EXT_debug_marker) return; fp_glInsertEventMarkerEXT = (pfn_glInsertEventMarkerEXT)load("glInsertEventMarkerEXT"); fp_glPushGroupMarkerEXT = (pfn_glPushGroupMarkerEXT)load("glPushGroupMarkerEXT"); fp_glPopGroupMarkerEXT = (pfn_glPopGroupMarkerEXT)load("glPopGroupMarkerEXT"); } GLboolean GLAD_EXT_direct_state_access = GL_FALSE; static void load_GL_EXT_direct_state_access(LOADER load) { if(!GLAD_EXT_direct_state_access) return; fp_glMatrixLoadfEXT = (pfn_glMatrixLoadfEXT)load("glMatrixLoadfEXT"); fp_glMatrixLoaddEXT = (pfn_glMatrixLoaddEXT)load("glMatrixLoaddEXT"); fp_glMatrixMultfEXT = (pfn_glMatrixMultfEXT)load("glMatrixMultfEXT"); fp_glMatrixMultdEXT = (pfn_glMatrixMultdEXT)load("glMatrixMultdEXT"); fp_glMatrixLoadIdentityEXT = (pfn_glMatrixLoadIdentityEXT)load("glMatrixLoadIdentityEXT"); fp_glMatrixRotatefEXT = (pfn_glMatrixRotatefEXT)load("glMatrixRotatefEXT"); fp_glMatrixRotatedEXT = (pfn_glMatrixRotatedEXT)load("glMatrixRotatedEXT"); fp_glMatrixScalefEXT = (pfn_glMatrixScalefEXT)load("glMatrixScalefEXT"); fp_glMatrixScaledEXT = (pfn_glMatrixScaledEXT)load("glMatrixScaledEXT"); fp_glMatrixTranslatefEXT = (pfn_glMatrixTranslatefEXT)load("glMatrixTranslatefEXT"); fp_glMatrixTranslatedEXT = (pfn_glMatrixTranslatedEXT)load("glMatrixTranslatedEXT"); fp_glMatrixFrustumEXT = (pfn_glMatrixFrustumEXT)load("glMatrixFrustumEXT"); fp_glMatrixOrthoEXT = (pfn_glMatrixOrthoEXT)load("glMatrixOrthoEXT"); fp_glMatrixPopEXT = (pfn_glMatrixPopEXT)load("glMatrixPopEXT"); fp_glMatrixPushEXT = (pfn_glMatrixPushEXT)load("glMatrixPushEXT"); fp_glClientAttribDefaultEXT = (pfn_glClientAttribDefaultEXT)load("glClientAttribDefaultEXT"); fp_glPushClientAttribDefaultEXT = (pfn_glPushClientAttribDefaultEXT)load("glPushClientAttribDefaultEXT"); fp_glTextureParameterfEXT = (pfn_glTextureParameterfEXT)load("glTextureParameterfEXT"); fp_glTextureParameterfvEXT = (pfn_glTextureParameterfvEXT)load("glTextureParameterfvEXT"); fp_glTextureParameteriEXT = (pfn_glTextureParameteriEXT)load("glTextureParameteriEXT"); fp_glTextureParameterivEXT = (pfn_glTextureParameterivEXT)load("glTextureParameterivEXT"); fp_glTextureImage1DEXT = (pfn_glTextureImage1DEXT)load("glTextureImage1DEXT"); fp_glTextureImage2DEXT = (pfn_glTextureImage2DEXT)load("glTextureImage2DEXT"); fp_glTextureSubImage1DEXT = (pfn_glTextureSubImage1DEXT)load("glTextureSubImage1DEXT"); fp_glTextureSubImage2DEXT = (pfn_glTextureSubImage2DEXT)load("glTextureSubImage2DEXT"); fp_glCopyTextureImage1DEXT = (pfn_glCopyTextureImage1DEXT)load("glCopyTextureImage1DEXT"); fp_glCopyTextureImage2DEXT = (pfn_glCopyTextureImage2DEXT)load("glCopyTextureImage2DEXT"); fp_glCopyTextureSubImage1DEXT = (pfn_glCopyTextureSubImage1DEXT)load("glCopyTextureSubImage1DEXT"); fp_glCopyTextureSubImage2DEXT = (pfn_glCopyTextureSubImage2DEXT)load("glCopyTextureSubImage2DEXT"); fp_glGetTextureImageEXT = (pfn_glGetTextureImageEXT)load("glGetTextureImageEXT"); fp_glGetTextureParameterfvEXT = (pfn_glGetTextureParameterfvEXT)load("glGetTextureParameterfvEXT"); fp_glGetTextureParameterivEXT = (pfn_glGetTextureParameterivEXT)load("glGetTextureParameterivEXT"); fp_glGetTextureLevelParameterfvEXT = (pfn_glGetTextureLevelParameterfvEXT)load("glGetTextureLevelParameterfvEXT"); fp_glGetTextureLevelParameterivEXT = (pfn_glGetTextureLevelParameterivEXT)load("glGetTextureLevelParameterivEXT"); fp_glTextureImage3DEXT = (pfn_glTextureImage3DEXT)load("glTextureImage3DEXT"); fp_glTextureSubImage3DEXT = (pfn_glTextureSubImage3DEXT)load("glTextureSubImage3DEXT"); fp_glCopyTextureSubImage3DEXT = (pfn_glCopyTextureSubImage3DEXT)load("glCopyTextureSubImage3DEXT"); fp_glBindMultiTextureEXT = (pfn_glBindMultiTextureEXT)load("glBindMultiTextureEXT"); fp_glMultiTexCoordPointerEXT = (pfn_glMultiTexCoordPointerEXT)load("glMultiTexCoordPointerEXT"); fp_glMultiTexEnvfEXT = (pfn_glMultiTexEnvfEXT)load("glMultiTexEnvfEXT"); fp_glMultiTexEnvfvEXT = (pfn_glMultiTexEnvfvEXT)load("glMultiTexEnvfvEXT"); fp_glMultiTexEnviEXT = (pfn_glMultiTexEnviEXT)load("glMultiTexEnviEXT"); fp_glMultiTexEnvivEXT = (pfn_glMultiTexEnvivEXT)load("glMultiTexEnvivEXT"); fp_glMultiTexGendEXT = (pfn_glMultiTexGendEXT)load("glMultiTexGendEXT"); fp_glMultiTexGendvEXT = (pfn_glMultiTexGendvEXT)load("glMultiTexGendvEXT"); fp_glMultiTexGenfEXT = (pfn_glMultiTexGenfEXT)load("glMultiTexGenfEXT"); fp_glMultiTexGenfvEXT = (pfn_glMultiTexGenfvEXT)load("glMultiTexGenfvEXT"); fp_glMultiTexGeniEXT = (pfn_glMultiTexGeniEXT)load("glMultiTexGeniEXT"); fp_glMultiTexGenivEXT = (pfn_glMultiTexGenivEXT)load("glMultiTexGenivEXT"); fp_glGetMultiTexEnvfvEXT = (pfn_glGetMultiTexEnvfvEXT)load("glGetMultiTexEnvfvEXT"); fp_glGetMultiTexEnvivEXT = (pfn_glGetMultiTexEnvivEXT)load("glGetMultiTexEnvivEXT"); fp_glGetMultiTexGendvEXT = (pfn_glGetMultiTexGendvEXT)load("glGetMultiTexGendvEXT"); fp_glGetMultiTexGenfvEXT = (pfn_glGetMultiTexGenfvEXT)load("glGetMultiTexGenfvEXT"); fp_glGetMultiTexGenivEXT = (pfn_glGetMultiTexGenivEXT)load("glGetMultiTexGenivEXT"); fp_glMultiTexParameteriEXT = (pfn_glMultiTexParameteriEXT)load("glMultiTexParameteriEXT"); fp_glMultiTexParameterivEXT = (pfn_glMultiTexParameterivEXT)load("glMultiTexParameterivEXT"); fp_glMultiTexParameterfEXT = (pfn_glMultiTexParameterfEXT)load("glMultiTexParameterfEXT"); fp_glMultiTexParameterfvEXT = (pfn_glMultiTexParameterfvEXT)load("glMultiTexParameterfvEXT"); fp_glMultiTexImage1DEXT = (pfn_glMultiTexImage1DEXT)load("glMultiTexImage1DEXT"); fp_glMultiTexImage2DEXT = (pfn_glMultiTexImage2DEXT)load("glMultiTexImage2DEXT"); fp_glMultiTexSubImage1DEXT = (pfn_glMultiTexSubImage1DEXT)load("glMultiTexSubImage1DEXT"); fp_glMultiTexSubImage2DEXT = (pfn_glMultiTexSubImage2DEXT)load("glMultiTexSubImage2DEXT"); fp_glCopyMultiTexImage1DEXT = (pfn_glCopyMultiTexImage1DEXT)load("glCopyMultiTexImage1DEXT"); fp_glCopyMultiTexImage2DEXT = (pfn_glCopyMultiTexImage2DEXT)load("glCopyMultiTexImage2DEXT"); fp_glCopyMultiTexSubImage1DEXT = (pfn_glCopyMultiTexSubImage1DEXT)load("glCopyMultiTexSubImage1DEXT"); fp_glCopyMultiTexSubImage2DEXT = (pfn_glCopyMultiTexSubImage2DEXT)load("glCopyMultiTexSubImage2DEXT"); fp_glGetMultiTexImageEXT = (pfn_glGetMultiTexImageEXT)load("glGetMultiTexImageEXT"); fp_glGetMultiTexParameterfvEXT = (pfn_glGetMultiTexParameterfvEXT)load("glGetMultiTexParameterfvEXT"); fp_glGetMultiTexParameterivEXT = (pfn_glGetMultiTexParameterivEXT)load("glGetMultiTexParameterivEXT"); fp_glGetMultiTexLevelParameterfvEXT = (pfn_glGetMultiTexLevelParameterfvEXT)load("glGetMultiTexLevelParameterfvEXT"); fp_glGetMultiTexLevelParameterivEXT = (pfn_glGetMultiTexLevelParameterivEXT)load("glGetMultiTexLevelParameterivEXT"); fp_glMultiTexImage3DEXT = (pfn_glMultiTexImage3DEXT)load("glMultiTexImage3DEXT"); fp_glMultiTexSubImage3DEXT = (pfn_glMultiTexSubImage3DEXT)load("glMultiTexSubImage3DEXT"); fp_glCopyMultiTexSubImage3DEXT = (pfn_glCopyMultiTexSubImage3DEXT)load("glCopyMultiTexSubImage3DEXT"); fp_glEnableClientStateIndexedEXT = (pfn_glEnableClientStateIndexedEXT)load("glEnableClientStateIndexedEXT"); fp_glDisableClientStateIndexedEXT = (pfn_glDisableClientStateIndexedEXT)load("glDisableClientStateIndexedEXT"); fp_glGetFloatIndexedvEXT = (pfn_glGetFloatIndexedvEXT)load("glGetFloatIndexedvEXT"); fp_glGetDoubleIndexedvEXT = (pfn_glGetDoubleIndexedvEXT)load("glGetDoubleIndexedvEXT"); fp_glGetPointerIndexedvEXT = (pfn_glGetPointerIndexedvEXT)load("glGetPointerIndexedvEXT"); fp_glEnableIndexedEXT = (pfn_glEnableIndexedEXT)load("glEnableIndexedEXT"); fp_glDisableIndexedEXT = (pfn_glDisableIndexedEXT)load("glDisableIndexedEXT"); fp_glIsEnabledIndexedEXT = (pfn_glIsEnabledIndexedEXT)load("glIsEnabledIndexedEXT"); fp_glGetIntegerIndexedvEXT = (pfn_glGetIntegerIndexedvEXT)load("glGetIntegerIndexedvEXT"); fp_glGetBooleanIndexedvEXT = (pfn_glGetBooleanIndexedvEXT)load("glGetBooleanIndexedvEXT"); fp_glCompressedTextureImage3DEXT = (pfn_glCompressedTextureImage3DEXT)load("glCompressedTextureImage3DEXT"); fp_glCompressedTextureImage2DEXT = (pfn_glCompressedTextureImage2DEXT)load("glCompressedTextureImage2DEXT"); fp_glCompressedTextureImage1DEXT = (pfn_glCompressedTextureImage1DEXT)load("glCompressedTextureImage1DEXT"); fp_glCompressedTextureSubImage3DEXT = (pfn_glCompressedTextureSubImage3DEXT)load("glCompressedTextureSubImage3DEXT"); fp_glCompressedTextureSubImage2DEXT = (pfn_glCompressedTextureSubImage2DEXT)load("glCompressedTextureSubImage2DEXT"); fp_glCompressedTextureSubImage1DEXT = (pfn_glCompressedTextureSubImage1DEXT)load("glCompressedTextureSubImage1DEXT"); fp_glGetCompressedTextureImageEXT = (pfn_glGetCompressedTextureImageEXT)load("glGetCompressedTextureImageEXT"); fp_glCompressedMultiTexImage3DEXT = (pfn_glCompressedMultiTexImage3DEXT)load("glCompressedMultiTexImage3DEXT"); fp_glCompressedMultiTexImage2DEXT = (pfn_glCompressedMultiTexImage2DEXT)load("glCompressedMultiTexImage2DEXT"); fp_glCompressedMultiTexImage1DEXT = (pfn_glCompressedMultiTexImage1DEXT)load("glCompressedMultiTexImage1DEXT"); fp_glCompressedMultiTexSubImage3DEXT = (pfn_glCompressedMultiTexSubImage3DEXT)load("glCompressedMultiTexSubImage3DEXT"); fp_glCompressedMultiTexSubImage2DEXT = (pfn_glCompressedMultiTexSubImage2DEXT)load("glCompressedMultiTexSubImage2DEXT"); fp_glCompressedMultiTexSubImage1DEXT = (pfn_glCompressedMultiTexSubImage1DEXT)load("glCompressedMultiTexSubImage1DEXT"); fp_glGetCompressedMultiTexImageEXT = (pfn_glGetCompressedMultiTexImageEXT)load("glGetCompressedMultiTexImageEXT"); fp_glMatrixLoadTransposefEXT = (pfn_glMatrixLoadTransposefEXT)load("glMatrixLoadTransposefEXT"); fp_glMatrixLoadTransposedEXT = (pfn_glMatrixLoadTransposedEXT)load("glMatrixLoadTransposedEXT"); fp_glMatrixMultTransposefEXT = (pfn_glMatrixMultTransposefEXT)load("glMatrixMultTransposefEXT"); fp_glMatrixMultTransposedEXT = (pfn_glMatrixMultTransposedEXT)load("glMatrixMultTransposedEXT"); fp_glNamedBufferDataEXT = (pfn_glNamedBufferDataEXT)load("glNamedBufferDataEXT"); fp_glNamedBufferSubDataEXT = (pfn_glNamedBufferSubDataEXT)load("glNamedBufferSubDataEXT"); fp_glMapNamedBufferEXT = (pfn_glMapNamedBufferEXT)load("glMapNamedBufferEXT"); fp_glUnmapNamedBufferEXT = (pfn_glUnmapNamedBufferEXT)load("glUnmapNamedBufferEXT"); fp_glGetNamedBufferParameterivEXT = (pfn_glGetNamedBufferParameterivEXT)load("glGetNamedBufferParameterivEXT"); fp_glGetNamedBufferPointervEXT = (pfn_glGetNamedBufferPointervEXT)load("glGetNamedBufferPointervEXT"); fp_glGetNamedBufferSubDataEXT = (pfn_glGetNamedBufferSubDataEXT)load("glGetNamedBufferSubDataEXT"); fp_glProgramUniform1fEXT = (pfn_glProgramUniform1fEXT)load("glProgramUniform1fEXT"); fp_glProgramUniform2fEXT = (pfn_glProgramUniform2fEXT)load("glProgramUniform2fEXT"); fp_glProgramUniform3fEXT = (pfn_glProgramUniform3fEXT)load("glProgramUniform3fEXT"); fp_glProgramUniform4fEXT = (pfn_glProgramUniform4fEXT)load("glProgramUniform4fEXT"); fp_glProgramUniform1iEXT = (pfn_glProgramUniform1iEXT)load("glProgramUniform1iEXT"); fp_glProgramUniform2iEXT = (pfn_glProgramUniform2iEXT)load("glProgramUniform2iEXT"); fp_glProgramUniform3iEXT = (pfn_glProgramUniform3iEXT)load("glProgramUniform3iEXT"); fp_glProgramUniform4iEXT = (pfn_glProgramUniform4iEXT)load("glProgramUniform4iEXT"); fp_glProgramUniform1fvEXT = (pfn_glProgramUniform1fvEXT)load("glProgramUniform1fvEXT"); fp_glProgramUniform2fvEXT = (pfn_glProgramUniform2fvEXT)load("glProgramUniform2fvEXT"); fp_glProgramUniform3fvEXT = (pfn_glProgramUniform3fvEXT)load("glProgramUniform3fvEXT"); fp_glProgramUniform4fvEXT = (pfn_glProgramUniform4fvEXT)load("glProgramUniform4fvEXT"); fp_glProgramUniform1ivEXT = (pfn_glProgramUniform1ivEXT)load("glProgramUniform1ivEXT"); fp_glProgramUniform2ivEXT = (pfn_glProgramUniform2ivEXT)load("glProgramUniform2ivEXT"); fp_glProgramUniform3ivEXT = (pfn_glProgramUniform3ivEXT)load("glProgramUniform3ivEXT"); fp_glProgramUniform4ivEXT = (pfn_glProgramUniform4ivEXT)load("glProgramUniform4ivEXT"); fp_glProgramUniformMatrix2fvEXT = (pfn_glProgramUniformMatrix2fvEXT)load("glProgramUniformMatrix2fvEXT"); fp_glProgramUniformMatrix3fvEXT = (pfn_glProgramUniformMatrix3fvEXT)load("glProgramUniformMatrix3fvEXT"); fp_glProgramUniformMatrix4fvEXT = (pfn_glProgramUniformMatrix4fvEXT)load("glProgramUniformMatrix4fvEXT"); fp_glProgramUniformMatrix2x3fvEXT = (pfn_glProgramUniformMatrix2x3fvEXT)load("glProgramUniformMatrix2x3fvEXT"); fp_glProgramUniformMatrix3x2fvEXT = (pfn_glProgramUniformMatrix3x2fvEXT)load("glProgramUniformMatrix3x2fvEXT"); fp_glProgramUniformMatrix2x4fvEXT = (pfn_glProgramUniformMatrix2x4fvEXT)load("glProgramUniformMatrix2x4fvEXT"); fp_glProgramUniformMatrix4x2fvEXT = (pfn_glProgramUniformMatrix4x2fvEXT)load("glProgramUniformMatrix4x2fvEXT"); fp_glProgramUniformMatrix3x4fvEXT = (pfn_glProgramUniformMatrix3x4fvEXT)load("glProgramUniformMatrix3x4fvEXT"); fp_glProgramUniformMatrix4x3fvEXT = (pfn_glProgramUniformMatrix4x3fvEXT)load("glProgramUniformMatrix4x3fvEXT"); fp_glTextureBufferEXT = (pfn_glTextureBufferEXT)load("glTextureBufferEXT"); fp_glMultiTexBufferEXT = (pfn_glMultiTexBufferEXT)load("glMultiTexBufferEXT"); fp_glTextureParameterIivEXT = (pfn_glTextureParameterIivEXT)load("glTextureParameterIivEXT"); fp_glTextureParameterIuivEXT = (pfn_glTextureParameterIuivEXT)load("glTextureParameterIuivEXT"); fp_glGetTextureParameterIivEXT = (pfn_glGetTextureParameterIivEXT)load("glGetTextureParameterIivEXT"); fp_glGetTextureParameterIuivEXT = (pfn_glGetTextureParameterIuivEXT)load("glGetTextureParameterIuivEXT"); fp_glMultiTexParameterIivEXT = (pfn_glMultiTexParameterIivEXT)load("glMultiTexParameterIivEXT"); fp_glMultiTexParameterIuivEXT = (pfn_glMultiTexParameterIuivEXT)load("glMultiTexParameterIuivEXT"); fp_glGetMultiTexParameterIivEXT = (pfn_glGetMultiTexParameterIivEXT)load("glGetMultiTexParameterIivEXT"); fp_glGetMultiTexParameterIuivEXT = (pfn_glGetMultiTexParameterIuivEXT)load("glGetMultiTexParameterIuivEXT"); fp_glProgramUniform1uiEXT = (pfn_glProgramUniform1uiEXT)load("glProgramUniform1uiEXT"); fp_glProgramUniform2uiEXT = (pfn_glProgramUniform2uiEXT)load("glProgramUniform2uiEXT"); fp_glProgramUniform3uiEXT = (pfn_glProgramUniform3uiEXT)load("glProgramUniform3uiEXT"); fp_glProgramUniform4uiEXT = (pfn_glProgramUniform4uiEXT)load("glProgramUniform4uiEXT"); fp_glProgramUniform1uivEXT = (pfn_glProgramUniform1uivEXT)load("glProgramUniform1uivEXT"); fp_glProgramUniform2uivEXT = (pfn_glProgramUniform2uivEXT)load("glProgramUniform2uivEXT"); fp_glProgramUniform3uivEXT = (pfn_glProgramUniform3uivEXT)load("glProgramUniform3uivEXT"); fp_glProgramUniform4uivEXT = (pfn_glProgramUniform4uivEXT)load("glProgramUniform4uivEXT"); fp_glNamedProgramLocalParameters4fvEXT = (pfn_glNamedProgramLocalParameters4fvEXT)load("glNamedProgramLocalParameters4fvEXT"); fp_glNamedProgramLocalParameterI4iEXT = (pfn_glNamedProgramLocalParameterI4iEXT)load("glNamedProgramLocalParameterI4iEXT"); fp_glNamedProgramLocalParameterI4ivEXT = (pfn_glNamedProgramLocalParameterI4ivEXT)load("glNamedProgramLocalParameterI4ivEXT"); fp_glNamedProgramLocalParametersI4ivEXT = (pfn_glNamedProgramLocalParametersI4ivEXT)load("glNamedProgramLocalParametersI4ivEXT"); fp_glNamedProgramLocalParameterI4uiEXT = (pfn_glNamedProgramLocalParameterI4uiEXT)load("glNamedProgramLocalParameterI4uiEXT"); fp_glNamedProgramLocalParameterI4uivEXT = (pfn_glNamedProgramLocalParameterI4uivEXT)load("glNamedProgramLocalParameterI4uivEXT"); fp_glNamedProgramLocalParametersI4uivEXT = (pfn_glNamedProgramLocalParametersI4uivEXT)load("glNamedProgramLocalParametersI4uivEXT"); fp_glGetNamedProgramLocalParameterIivEXT = (pfn_glGetNamedProgramLocalParameterIivEXT)load("glGetNamedProgramLocalParameterIivEXT"); fp_glGetNamedProgramLocalParameterIuivEXT = (pfn_glGetNamedProgramLocalParameterIuivEXT)load("glGetNamedProgramLocalParameterIuivEXT"); fp_glEnableClientStateiEXT = (pfn_glEnableClientStateiEXT)load("glEnableClientStateiEXT"); fp_glDisableClientStateiEXT = (pfn_glDisableClientStateiEXT)load("glDisableClientStateiEXT"); fp_glGetFloati_vEXT = (pfn_glGetFloati_vEXT)load("glGetFloati_vEXT"); fp_glGetDoublei_vEXT = (pfn_glGetDoublei_vEXT)load("glGetDoublei_vEXT"); fp_glGetPointeri_vEXT = (pfn_glGetPointeri_vEXT)load("glGetPointeri_vEXT"); fp_glNamedProgramStringEXT = (pfn_glNamedProgramStringEXT)load("glNamedProgramStringEXT"); fp_glNamedProgramLocalParameter4dEXT = (pfn_glNamedProgramLocalParameter4dEXT)load("glNamedProgramLocalParameter4dEXT"); fp_glNamedProgramLocalParameter4dvEXT = (pfn_glNamedProgramLocalParameter4dvEXT)load("glNamedProgramLocalParameter4dvEXT"); fp_glNamedProgramLocalParameter4fEXT = (pfn_glNamedProgramLocalParameter4fEXT)load("glNamedProgramLocalParameter4fEXT"); fp_glNamedProgramLocalParameter4fvEXT = (pfn_glNamedProgramLocalParameter4fvEXT)load("glNamedProgramLocalParameter4fvEXT"); fp_glGetNamedProgramLocalParameterdvEXT = (pfn_glGetNamedProgramLocalParameterdvEXT)load("glGetNamedProgramLocalParameterdvEXT"); fp_glGetNamedProgramLocalParameterfvEXT = (pfn_glGetNamedProgramLocalParameterfvEXT)load("glGetNamedProgramLocalParameterfvEXT"); fp_glGetNamedProgramivEXT = (pfn_glGetNamedProgramivEXT)load("glGetNamedProgramivEXT"); fp_glGetNamedProgramStringEXT = (pfn_glGetNamedProgramStringEXT)load("glGetNamedProgramStringEXT"); fp_glNamedRenderbufferStorageEXT = (pfn_glNamedRenderbufferStorageEXT)load("glNamedRenderbufferStorageEXT"); fp_glGetNamedRenderbufferParameterivEXT = (pfn_glGetNamedRenderbufferParameterivEXT)load("glGetNamedRenderbufferParameterivEXT"); fp_glNamedRenderbufferStorageMultisampleEXT = (pfn_glNamedRenderbufferStorageMultisampleEXT)load("glNamedRenderbufferStorageMultisampleEXT"); fp_glNamedRenderbufferStorageMultisampleCoverageEXT = (pfn_glNamedRenderbufferStorageMultisampleCoverageEXT)load("glNamedRenderbufferStorageMultisampleCoverageEXT"); fp_glCheckNamedFramebufferStatusEXT = (pfn_glCheckNamedFramebufferStatusEXT)load("glCheckNamedFramebufferStatusEXT"); fp_glNamedFramebufferTexture1DEXT = (pfn_glNamedFramebufferTexture1DEXT)load("glNamedFramebufferTexture1DEXT"); fp_glNamedFramebufferTexture2DEXT = (pfn_glNamedFramebufferTexture2DEXT)load("glNamedFramebufferTexture2DEXT"); fp_glNamedFramebufferTexture3DEXT = (pfn_glNamedFramebufferTexture3DEXT)load("glNamedFramebufferTexture3DEXT"); fp_glNamedFramebufferRenderbufferEXT = (pfn_glNamedFramebufferRenderbufferEXT)load("glNamedFramebufferRenderbufferEXT"); fp_glGetNamedFramebufferAttachmentParameterivEXT = (pfn_glGetNamedFramebufferAttachmentParameterivEXT)load("glGetNamedFramebufferAttachmentParameterivEXT"); fp_glGenerateTextureMipmapEXT = (pfn_glGenerateTextureMipmapEXT)load("glGenerateTextureMipmapEXT"); fp_glGenerateMultiTexMipmapEXT = (pfn_glGenerateMultiTexMipmapEXT)load("glGenerateMultiTexMipmapEXT"); fp_glFramebufferDrawBufferEXT = (pfn_glFramebufferDrawBufferEXT)load("glFramebufferDrawBufferEXT"); fp_glFramebufferDrawBuffersEXT = (pfn_glFramebufferDrawBuffersEXT)load("glFramebufferDrawBuffersEXT"); fp_glFramebufferReadBufferEXT = (pfn_glFramebufferReadBufferEXT)load("glFramebufferReadBufferEXT"); fp_glGetFramebufferParameterivEXT = (pfn_glGetFramebufferParameterivEXT)load("glGetFramebufferParameterivEXT"); fp_glNamedCopyBufferSubDataEXT = (pfn_glNamedCopyBufferSubDataEXT)load("glNamedCopyBufferSubDataEXT"); fp_glNamedFramebufferTextureEXT = (pfn_glNamedFramebufferTextureEXT)load("glNamedFramebufferTextureEXT"); fp_glNamedFramebufferTextureLayerEXT = (pfn_glNamedFramebufferTextureLayerEXT)load("glNamedFramebufferTextureLayerEXT"); fp_glNamedFramebufferTextureFaceEXT = (pfn_glNamedFramebufferTextureFaceEXT)load("glNamedFramebufferTextureFaceEXT"); fp_glTextureRenderbufferEXT = (pfn_glTextureRenderbufferEXT)load("glTextureRenderbufferEXT"); fp_glMultiTexRenderbufferEXT = (pfn_glMultiTexRenderbufferEXT)load("glMultiTexRenderbufferEXT"); fp_glVertexArrayVertexOffsetEXT = (pfn_glVertexArrayVertexOffsetEXT)load("glVertexArrayVertexOffsetEXT"); fp_glVertexArrayColorOffsetEXT = (pfn_glVertexArrayColorOffsetEXT)load("glVertexArrayColorOffsetEXT"); fp_glVertexArrayEdgeFlagOffsetEXT = (pfn_glVertexArrayEdgeFlagOffsetEXT)load("glVertexArrayEdgeFlagOffsetEXT"); fp_glVertexArrayIndexOffsetEXT = (pfn_glVertexArrayIndexOffsetEXT)load("glVertexArrayIndexOffsetEXT"); fp_glVertexArrayNormalOffsetEXT = (pfn_glVertexArrayNormalOffsetEXT)load("glVertexArrayNormalOffsetEXT"); fp_glVertexArrayTexCoordOffsetEXT = (pfn_glVertexArrayTexCoordOffsetEXT)load("glVertexArrayTexCoordOffsetEXT"); fp_glVertexArrayMultiTexCoordOffsetEXT = (pfn_glVertexArrayMultiTexCoordOffsetEXT)load("glVertexArrayMultiTexCoordOffsetEXT"); fp_glVertexArrayFogCoordOffsetEXT = (pfn_glVertexArrayFogCoordOffsetEXT)load("glVertexArrayFogCoordOffsetEXT"); fp_glVertexArraySecondaryColorOffsetEXT = (pfn_glVertexArraySecondaryColorOffsetEXT)load("glVertexArraySecondaryColorOffsetEXT"); fp_glVertexArrayVertexAttribOffsetEXT = (pfn_glVertexArrayVertexAttribOffsetEXT)load("glVertexArrayVertexAttribOffsetEXT"); fp_glVertexArrayVertexAttribIOffsetEXT = (pfn_glVertexArrayVertexAttribIOffsetEXT)load("glVertexArrayVertexAttribIOffsetEXT"); fp_glEnableVertexArrayEXT = (pfn_glEnableVertexArrayEXT)load("glEnableVertexArrayEXT"); fp_glDisableVertexArrayEXT = (pfn_glDisableVertexArrayEXT)load("glDisableVertexArrayEXT"); fp_glEnableVertexArrayAttribEXT = (pfn_glEnableVertexArrayAttribEXT)load("glEnableVertexArrayAttribEXT"); fp_glDisableVertexArrayAttribEXT = (pfn_glDisableVertexArrayAttribEXT)load("glDisableVertexArrayAttribEXT"); fp_glGetVertexArrayIntegervEXT = (pfn_glGetVertexArrayIntegervEXT)load("glGetVertexArrayIntegervEXT"); fp_glGetVertexArrayPointervEXT = (pfn_glGetVertexArrayPointervEXT)load("glGetVertexArrayPointervEXT"); fp_glGetVertexArrayIntegeri_vEXT = (pfn_glGetVertexArrayIntegeri_vEXT)load("glGetVertexArrayIntegeri_vEXT"); fp_glGetVertexArrayPointeri_vEXT = (pfn_glGetVertexArrayPointeri_vEXT)load("glGetVertexArrayPointeri_vEXT"); fp_glMapNamedBufferRangeEXT = (pfn_glMapNamedBufferRangeEXT)load("glMapNamedBufferRangeEXT"); fp_glFlushMappedNamedBufferRangeEXT = (pfn_glFlushMappedNamedBufferRangeEXT)load("glFlushMappedNamedBufferRangeEXT"); fp_glNamedBufferStorageEXT = (pfn_glNamedBufferStorageEXT)load("glNamedBufferStorageEXT"); fp_glClearNamedBufferDataEXT = (pfn_glClearNamedBufferDataEXT)load("glClearNamedBufferDataEXT"); fp_glClearNamedBufferSubDataEXT = (pfn_glClearNamedBufferSubDataEXT)load("glClearNamedBufferSubDataEXT"); fp_glNamedFramebufferParameteriEXT = (pfn_glNamedFramebufferParameteriEXT)load("glNamedFramebufferParameteriEXT"); fp_glGetNamedFramebufferParameterivEXT = (pfn_glGetNamedFramebufferParameterivEXT)load("glGetNamedFramebufferParameterivEXT"); fp_glProgramUniform1dEXT = (pfn_glProgramUniform1dEXT)load("glProgramUniform1dEXT"); fp_glProgramUniform2dEXT = (pfn_glProgramUniform2dEXT)load("glProgramUniform2dEXT"); fp_glProgramUniform3dEXT = (pfn_glProgramUniform3dEXT)load("glProgramUniform3dEXT"); fp_glProgramUniform4dEXT = (pfn_glProgramUniform4dEXT)load("glProgramUniform4dEXT"); fp_glProgramUniform1dvEXT = (pfn_glProgramUniform1dvEXT)load("glProgramUniform1dvEXT"); fp_glProgramUniform2dvEXT = (pfn_glProgramUniform2dvEXT)load("glProgramUniform2dvEXT"); fp_glProgramUniform3dvEXT = (pfn_glProgramUniform3dvEXT)load("glProgramUniform3dvEXT"); fp_glProgramUniform4dvEXT = (pfn_glProgramUniform4dvEXT)load("glProgramUniform4dvEXT"); fp_glProgramUniformMatrix2dvEXT = (pfn_glProgramUniformMatrix2dvEXT)load("glProgramUniformMatrix2dvEXT"); fp_glProgramUniformMatrix3dvEXT = (pfn_glProgramUniformMatrix3dvEXT)load("glProgramUniformMatrix3dvEXT"); fp_glProgramUniformMatrix4dvEXT = (pfn_glProgramUniformMatrix4dvEXT)load("glProgramUniformMatrix4dvEXT"); fp_glProgramUniformMatrix2x3dvEXT = (pfn_glProgramUniformMatrix2x3dvEXT)load("glProgramUniformMatrix2x3dvEXT"); fp_glProgramUniformMatrix2x4dvEXT = (pfn_glProgramUniformMatrix2x4dvEXT)load("glProgramUniformMatrix2x4dvEXT"); fp_glProgramUniformMatrix3x2dvEXT = (pfn_glProgramUniformMatrix3x2dvEXT)load("glProgramUniformMatrix3x2dvEXT"); fp_glProgramUniformMatrix3x4dvEXT = (pfn_glProgramUniformMatrix3x4dvEXT)load("glProgramUniformMatrix3x4dvEXT"); fp_glProgramUniformMatrix4x2dvEXT = (pfn_glProgramUniformMatrix4x2dvEXT)load("glProgramUniformMatrix4x2dvEXT"); fp_glProgramUniformMatrix4x3dvEXT = (pfn_glProgramUniformMatrix4x3dvEXT)load("glProgramUniformMatrix4x3dvEXT"); fp_glTextureBufferRangeEXT = (pfn_glTextureBufferRangeEXT)load("glTextureBufferRangeEXT"); fp_glTextureStorage1DEXT = (pfn_glTextureStorage1DEXT)load("glTextureStorage1DEXT"); fp_glTextureStorage2DEXT = (pfn_glTextureStorage2DEXT)load("glTextureStorage2DEXT"); fp_glTextureStorage3DEXT = (pfn_glTextureStorage3DEXT)load("glTextureStorage3DEXT"); fp_glTextureStorage2DMultisampleEXT = (pfn_glTextureStorage2DMultisampleEXT)load("glTextureStorage2DMultisampleEXT"); fp_glTextureStorage3DMultisampleEXT = (pfn_glTextureStorage3DMultisampleEXT)load("glTextureStorage3DMultisampleEXT"); fp_glVertexArrayBindVertexBufferEXT = (pfn_glVertexArrayBindVertexBufferEXT)load("glVertexArrayBindVertexBufferEXT"); fp_glVertexArrayVertexAttribFormatEXT = (pfn_glVertexArrayVertexAttribFormatEXT)load("glVertexArrayVertexAttribFormatEXT"); fp_glVertexArrayVertexAttribIFormatEXT = (pfn_glVertexArrayVertexAttribIFormatEXT)load("glVertexArrayVertexAttribIFormatEXT"); fp_glVertexArrayVertexAttribLFormatEXT = (pfn_glVertexArrayVertexAttribLFormatEXT)load("glVertexArrayVertexAttribLFormatEXT"); fp_glVertexArrayVertexAttribBindingEXT = (pfn_glVertexArrayVertexAttribBindingEXT)load("glVertexArrayVertexAttribBindingEXT"); fp_glVertexArrayVertexBindingDivisorEXT = (pfn_glVertexArrayVertexBindingDivisorEXT)load("glVertexArrayVertexBindingDivisorEXT"); fp_glVertexArrayVertexAttribLOffsetEXT = (pfn_glVertexArrayVertexAttribLOffsetEXT)load("glVertexArrayVertexAttribLOffsetEXT"); fp_glTexturePageCommitmentEXT = (pfn_glTexturePageCommitmentEXT)load("glTexturePageCommitmentEXT"); fp_glVertexArrayVertexAttribDivisorEXT = (pfn_glVertexArrayVertexAttribDivisorEXT)load("glVertexArrayVertexAttribDivisorEXT"); } GLboolean GLAD_EXT_discard_framebuffer = GL_FALSE; static void load_GL_EXT_discard_framebuffer(LOADER load) { if(!GLAD_EXT_discard_framebuffer) return; fp_glDiscardFramebufferEXT = (pfn_glDiscardFramebufferEXT)load("glDiscardFramebufferEXT"); } GLboolean GLAD_EXT_disjoint_timer_query = GL_FALSE; static void load_GL_EXT_disjoint_timer_query(LOADER load) { if(!GLAD_EXT_disjoint_timer_query) return; fp_glGenQueriesEXT = (pfn_glGenQueriesEXT)load("glGenQueriesEXT"); fp_glDeleteQueriesEXT = (pfn_glDeleteQueriesEXT)load("glDeleteQueriesEXT"); fp_glIsQueryEXT = (pfn_glIsQueryEXT)load("glIsQueryEXT"); fp_glBeginQueryEXT = (pfn_glBeginQueryEXT)load("glBeginQueryEXT"); fp_glEndQueryEXT = (pfn_glEndQueryEXT)load("glEndQueryEXT"); fp_glQueryCounterEXT = (pfn_glQueryCounterEXT)load("glQueryCounterEXT"); fp_glGetQueryivEXT = (pfn_glGetQueryivEXT)load("glGetQueryivEXT"); fp_glGetQueryObjectivEXT = (pfn_glGetQueryObjectivEXT)load("glGetQueryObjectivEXT"); fp_glGetQueryObjectuivEXT = (pfn_glGetQueryObjectuivEXT)load("glGetQueryObjectuivEXT"); fp_glGetQueryObjecti64vEXT = (pfn_glGetQueryObjecti64vEXT)load("glGetQueryObjecti64vEXT"); fp_glGetQueryObjectui64vEXT = (pfn_glGetQueryObjectui64vEXT)load("glGetQueryObjectui64vEXT"); } GLboolean GLAD_EXT_draw_buffers = GL_FALSE; static void load_GL_EXT_draw_buffers(LOADER load) { if(!GLAD_EXT_draw_buffers) return; fp_glDrawBuffersEXT = (pfn_glDrawBuffersEXT)load("glDrawBuffersEXT"); } GLboolean GLAD_EXT_draw_buffers2 = GL_FALSE; static void load_GL_EXT_draw_buffers2(LOADER load) { if(!GLAD_EXT_draw_buffers2) return; fp_glColorMaskIndexedEXT = (pfn_glColorMaskIndexedEXT)load("glColorMaskIndexedEXT"); fp_glGetBooleanIndexedvEXT = (pfn_glGetBooleanIndexedvEXT)load("glGetBooleanIndexedvEXT"); fp_glGetIntegerIndexedvEXT = (pfn_glGetIntegerIndexedvEXT)load("glGetIntegerIndexedvEXT"); fp_glEnableIndexedEXT = (pfn_glEnableIndexedEXT)load("glEnableIndexedEXT"); fp_glDisableIndexedEXT = (pfn_glDisableIndexedEXT)load("glDisableIndexedEXT"); fp_glIsEnabledIndexedEXT = (pfn_glIsEnabledIndexedEXT)load("glIsEnabledIndexedEXT"); } GLboolean GLAD_EXT_draw_buffers_indexed = GL_FALSE; static void load_GL_EXT_draw_buffers_indexed(LOADER load) { if(!GLAD_EXT_draw_buffers_indexed) return; fp_glEnableiEXT = (pfn_glEnableiEXT)load("glEnableiEXT"); fp_glDisableiEXT = (pfn_glDisableiEXT)load("glDisableiEXT"); fp_glBlendEquationiEXT = (pfn_glBlendEquationiEXT)load("glBlendEquationiEXT"); fp_glBlendEquationSeparateiEXT = (pfn_glBlendEquationSeparateiEXT)load("glBlendEquationSeparateiEXT"); fp_glBlendFunciEXT = (pfn_glBlendFunciEXT)load("glBlendFunciEXT"); fp_glBlendFuncSeparateiEXT = (pfn_glBlendFuncSeparateiEXT)load("glBlendFuncSeparateiEXT"); fp_glColorMaskiEXT = (pfn_glColorMaskiEXT)load("glColorMaskiEXT"); fp_glIsEnablediEXT = (pfn_glIsEnablediEXT)load("glIsEnablediEXT"); } GLboolean GLAD_EXT_draw_elements_base_vertex = GL_FALSE; static void load_GL_EXT_draw_elements_base_vertex(LOADER load) { if(!GLAD_EXT_draw_elements_base_vertex) return; fp_glDrawElementsBaseVertexEXT = (pfn_glDrawElementsBaseVertexEXT)load("glDrawElementsBaseVertexEXT"); fp_glDrawRangeElementsBaseVertexEXT = (pfn_glDrawRangeElementsBaseVertexEXT)load("glDrawRangeElementsBaseVertexEXT"); fp_glDrawElementsInstancedBaseVertexEXT = (pfn_glDrawElementsInstancedBaseVertexEXT)load("glDrawElementsInstancedBaseVertexEXT"); fp_glMultiDrawElementsBaseVertexEXT = (pfn_glMultiDrawElementsBaseVertexEXT)load("glMultiDrawElementsBaseVertexEXT"); } GLboolean GLAD_EXT_draw_instanced = GL_FALSE; static void load_GL_EXT_draw_instanced(LOADER load) { if(!GLAD_EXT_draw_instanced) return; fp_glDrawArraysInstancedEXT = (pfn_glDrawArraysInstancedEXT)load("glDrawArraysInstancedEXT"); fp_glDrawElementsInstancedEXT = (pfn_glDrawElementsInstancedEXT)load("glDrawElementsInstancedEXT"); } GLboolean GLAD_EXT_float_blend = GL_FALSE; GLboolean GLAD_EXT_framebuffer_blit = GL_FALSE; static void load_GL_EXT_framebuffer_blit(LOADER load) { if(!GLAD_EXT_framebuffer_blit) return; fp_glBlitFramebufferEXT = (pfn_glBlitFramebufferEXT)load("glBlitFramebufferEXT"); } GLboolean GLAD_EXT_framebuffer_multisample = GL_FALSE; static void load_GL_EXT_framebuffer_multisample(LOADER load) { if(!GLAD_EXT_framebuffer_multisample) return; fp_glRenderbufferStorageMultisampleEXT = (pfn_glRenderbufferStorageMultisampleEXT)load("glRenderbufferStorageMultisampleEXT"); } GLboolean GLAD_EXT_framebuffer_multisample_blit_scaled = GL_FALSE; GLboolean GLAD_EXT_framebuffer_object = GL_FALSE; static void load_GL_EXT_framebuffer_object(LOADER load) { if(!GLAD_EXT_framebuffer_object) return; fp_glIsRenderbufferEXT = (pfn_glIsRenderbufferEXT)load("glIsRenderbufferEXT"); fp_glBindRenderbufferEXT = (pfn_glBindRenderbufferEXT)load("glBindRenderbufferEXT"); fp_glDeleteRenderbuffersEXT = (pfn_glDeleteRenderbuffersEXT)load("glDeleteRenderbuffersEXT"); fp_glGenRenderbuffersEXT = (pfn_glGenRenderbuffersEXT)load("glGenRenderbuffersEXT"); fp_glRenderbufferStorageEXT = (pfn_glRenderbufferStorageEXT)load("glRenderbufferStorageEXT"); fp_glGetRenderbufferParameterivEXT = (pfn_glGetRenderbufferParameterivEXT)load("glGetRenderbufferParameterivEXT"); fp_glIsFramebufferEXT = (pfn_glIsFramebufferEXT)load("glIsFramebufferEXT"); fp_glBindFramebufferEXT = (pfn_glBindFramebufferEXT)load("glBindFramebufferEXT"); fp_glDeleteFramebuffersEXT = (pfn_glDeleteFramebuffersEXT)load("glDeleteFramebuffersEXT"); fp_glGenFramebuffersEXT = (pfn_glGenFramebuffersEXT)load("glGenFramebuffersEXT"); fp_glCheckFramebufferStatusEXT = (pfn_glCheckFramebufferStatusEXT)load("glCheckFramebufferStatusEXT"); fp_glFramebufferTexture1DEXT = (pfn_glFramebufferTexture1DEXT)load("glFramebufferTexture1DEXT"); fp_glFramebufferTexture2DEXT = (pfn_glFramebufferTexture2DEXT)load("glFramebufferTexture2DEXT"); fp_glFramebufferTexture3DEXT = (pfn_glFramebufferTexture3DEXT)load("glFramebufferTexture3DEXT"); fp_glFramebufferRenderbufferEXT = (pfn_glFramebufferRenderbufferEXT)load("glFramebufferRenderbufferEXT"); fp_glGetFramebufferAttachmentParameterivEXT = (pfn_glGetFramebufferAttachmentParameterivEXT)load("glGetFramebufferAttachmentParameterivEXT"); fp_glGenerateMipmapEXT = (pfn_glGenerateMipmapEXT)load("glGenerateMipmapEXT"); } GLboolean GLAD_EXT_framebuffer_sRGB = GL_FALSE; GLboolean GLAD_EXT_geometry_point_size = GL_FALSE; GLboolean GLAD_EXT_geometry_shader = GL_FALSE; static void load_GL_EXT_geometry_shader(LOADER load) { if(!GLAD_EXT_geometry_shader) return; fp_glFramebufferTextureEXT = (pfn_glFramebufferTextureEXT)load("glFramebufferTextureEXT"); } GLboolean GLAD_EXT_geometry_shader4 = GL_FALSE; static void load_GL_EXT_geometry_shader4(LOADER load) { if(!GLAD_EXT_geometry_shader4) return; fp_glProgramParameteriEXT = (pfn_glProgramParameteriEXT)load("glProgramParameteriEXT"); } GLboolean GLAD_EXT_gpu_program_parameters = GL_FALSE; static void load_GL_EXT_gpu_program_parameters(LOADER load) { if(!GLAD_EXT_gpu_program_parameters) return; fp_glProgramEnvParameters4fvEXT = (pfn_glProgramEnvParameters4fvEXT)load("glProgramEnvParameters4fvEXT"); fp_glProgramLocalParameters4fvEXT = (pfn_glProgramLocalParameters4fvEXT)load("glProgramLocalParameters4fvEXT"); } GLboolean GLAD_EXT_gpu_shader4 = GL_FALSE; static void load_GL_EXT_gpu_shader4(LOADER load) { if(!GLAD_EXT_gpu_shader4) return; fp_glGetUniformuivEXT = (pfn_glGetUniformuivEXT)load("glGetUniformuivEXT"); fp_glBindFragDataLocationEXT = (pfn_glBindFragDataLocationEXT)load("glBindFragDataLocationEXT"); fp_glGetFragDataLocationEXT = (pfn_glGetFragDataLocationEXT)load("glGetFragDataLocationEXT"); fp_glUniform1uiEXT = (pfn_glUniform1uiEXT)load("glUniform1uiEXT"); fp_glUniform2uiEXT = (pfn_glUniform2uiEXT)load("glUniform2uiEXT"); fp_glUniform3uiEXT = (pfn_glUniform3uiEXT)load("glUniform3uiEXT"); fp_glUniform4uiEXT = (pfn_glUniform4uiEXT)load("glUniform4uiEXT"); fp_glUniform1uivEXT = (pfn_glUniform1uivEXT)load("glUniform1uivEXT"); fp_glUniform2uivEXT = (pfn_glUniform2uivEXT)load("glUniform2uivEXT"); fp_glUniform3uivEXT = (pfn_glUniform3uivEXT)load("glUniform3uivEXT"); fp_glUniform4uivEXT = (pfn_glUniform4uivEXT)load("glUniform4uivEXT"); } GLboolean GLAD_EXT_gpu_shader5 = GL_FALSE; GLboolean GLAD_EXT_instanced_arrays = GL_FALSE; static void load_GL_EXT_instanced_arrays(LOADER load) { if(!GLAD_EXT_instanced_arrays) return; fp_glDrawArraysInstancedEXT = (pfn_glDrawArraysInstancedEXT)load("glDrawArraysInstancedEXT"); fp_glDrawElementsInstancedEXT = (pfn_glDrawElementsInstancedEXT)load("glDrawElementsInstancedEXT"); fp_glVertexAttribDivisorEXT = (pfn_glVertexAttribDivisorEXT)load("glVertexAttribDivisorEXT"); } GLboolean GLAD_EXT_map_buffer_range = GL_FALSE; static void load_GL_EXT_map_buffer_range(LOADER load) { if(!GLAD_EXT_map_buffer_range) return; fp_glMapBufferRangeEXT = (pfn_glMapBufferRangeEXT)load("glMapBufferRangeEXT"); fp_glFlushMappedBufferRangeEXT = (pfn_glFlushMappedBufferRangeEXT)load("glFlushMappedBufferRangeEXT"); } GLboolean GLAD_EXT_multi_draw_indirect = GL_FALSE; static void load_GL_EXT_multi_draw_indirect(LOADER load) { if(!GLAD_EXT_multi_draw_indirect) return; fp_glMultiDrawArraysIndirectEXT = (pfn_glMultiDrawArraysIndirectEXT)load("glMultiDrawArraysIndirectEXT"); fp_glMultiDrawElementsIndirectEXT = (pfn_glMultiDrawElementsIndirectEXT)load("glMultiDrawElementsIndirectEXT"); } GLboolean GLAD_EXT_multisampled_compatibility = GL_FALSE; GLboolean GLAD_EXT_multisampled_render_to_texture = GL_FALSE; static void load_GL_EXT_multisampled_render_to_texture(LOADER load) { if(!GLAD_EXT_multisampled_render_to_texture) return; fp_glRenderbufferStorageMultisampleEXT = (pfn_glRenderbufferStorageMultisampleEXT)load("glRenderbufferStorageMultisampleEXT"); fp_glFramebufferTexture2DMultisampleEXT = (pfn_glFramebufferTexture2DMultisampleEXT)load("glFramebufferTexture2DMultisampleEXT"); } GLboolean GLAD_EXT_multiview_draw_buffers = GL_FALSE; static void load_GL_EXT_multiview_draw_buffers(LOADER load) { if(!GLAD_EXT_multiview_draw_buffers) return; fp_glReadBufferIndexedEXT = (pfn_glReadBufferIndexedEXT)load("glReadBufferIndexedEXT"); fp_glDrawBuffersIndexedEXT = (pfn_glDrawBuffersIndexedEXT)load("glDrawBuffersIndexedEXT"); fp_glGetIntegeri_vEXT = (pfn_glGetIntegeri_vEXT)load("glGetIntegeri_vEXT"); } GLboolean GLAD_EXT_occlusion_query_boolean = GL_FALSE; static void load_GL_EXT_occlusion_query_boolean(LOADER load) { if(!GLAD_EXT_occlusion_query_boolean) return; fp_glGenQueriesEXT = (pfn_glGenQueriesEXT)load("glGenQueriesEXT"); fp_glDeleteQueriesEXT = (pfn_glDeleteQueriesEXT)load("glDeleteQueriesEXT"); fp_glIsQueryEXT = (pfn_glIsQueryEXT)load("glIsQueryEXT"); fp_glBeginQueryEXT = (pfn_glBeginQueryEXT)load("glBeginQueryEXT"); fp_glEndQueryEXT = (pfn_glEndQueryEXT)load("glEndQueryEXT"); fp_glGetQueryivEXT = (pfn_glGetQueryivEXT)load("glGetQueryivEXT"); fp_glGetQueryObjectuivEXT = (pfn_glGetQueryObjectuivEXT)load("glGetQueryObjectuivEXT"); } GLboolean GLAD_EXT_packed_depth_stencil = GL_FALSE; GLboolean GLAD_EXT_packed_float = GL_FALSE; GLboolean GLAD_EXT_pixel_buffer_object = GL_FALSE; GLboolean GLAD_EXT_polygon_offset_clamp = GL_FALSE; static void load_GL_EXT_polygon_offset_clamp(LOADER load) { if(!GLAD_EXT_polygon_offset_clamp) return; fp_glPolygonOffsetClampEXT = (pfn_glPolygonOffsetClampEXT)load("glPolygonOffsetClampEXT"); } GLboolean GLAD_EXT_post_depth_coverage = GL_FALSE; GLboolean GLAD_EXT_primitive_bounding_box = GL_FALSE; static void load_GL_EXT_primitive_bounding_box(LOADER load) { if(!GLAD_EXT_primitive_bounding_box) return; fp_glPrimitiveBoundingBoxEXT = (pfn_glPrimitiveBoundingBoxEXT)load("glPrimitiveBoundingBoxEXT"); } GLboolean GLAD_EXT_provoking_vertex = GL_FALSE; static void load_GL_EXT_provoking_vertex(LOADER load) { if(!GLAD_EXT_provoking_vertex) return; fp_glProvokingVertexEXT = (pfn_glProvokingVertexEXT)load("glProvokingVertexEXT"); } GLboolean GLAD_EXT_pvrtc_sRGB = GL_FALSE; GLboolean GLAD_EXT_raster_multisample = GL_FALSE; static void load_GL_EXT_raster_multisample(LOADER load) { if(!GLAD_EXT_raster_multisample) return; fp_glRasterSamplesEXT = (pfn_glRasterSamplesEXT)load("glRasterSamplesEXT"); } GLboolean GLAD_EXT_read_format_bgra = GL_FALSE; GLboolean GLAD_EXT_render_snorm = GL_FALSE; GLboolean GLAD_EXT_robustness = GL_FALSE; static void load_GL_EXT_robustness(LOADER load) { if(!GLAD_EXT_robustness) return; fp_glGetGraphicsResetStatusEXT = (pfn_glGetGraphicsResetStatusEXT)load("glGetGraphicsResetStatusEXT"); fp_glReadnPixelsEXT = (pfn_glReadnPixelsEXT)load("glReadnPixelsEXT"); fp_glGetnUniformfvEXT = (pfn_glGetnUniformfvEXT)load("glGetnUniformfvEXT"); fp_glGetnUniformivEXT = (pfn_glGetnUniformivEXT)load("glGetnUniformivEXT"); } GLboolean GLAD_EXT_separate_shader_objects = GL_FALSE; static void load_GL_EXT_separate_shader_objects(LOADER load) { if(!GLAD_EXT_separate_shader_objects) return; fp_glUseShaderProgramEXT = (pfn_glUseShaderProgramEXT)load("glUseShaderProgramEXT"); fp_glActiveProgramEXT = (pfn_glActiveProgramEXT)load("glActiveProgramEXT"); fp_glCreateShaderProgramEXT = (pfn_glCreateShaderProgramEXT)load("glCreateShaderProgramEXT"); fp_glActiveShaderProgramEXT = (pfn_glActiveShaderProgramEXT)load("glActiveShaderProgramEXT"); fp_glBindProgramPipelineEXT = (pfn_glBindProgramPipelineEXT)load("glBindProgramPipelineEXT"); fp_glCreateShaderProgramvEXT = (pfn_glCreateShaderProgramvEXT)load("glCreateShaderProgramvEXT"); fp_glDeleteProgramPipelinesEXT = (pfn_glDeleteProgramPipelinesEXT)load("glDeleteProgramPipelinesEXT"); fp_glGenProgramPipelinesEXT = (pfn_glGenProgramPipelinesEXT)load("glGenProgramPipelinesEXT"); fp_glGetProgramPipelineInfoLogEXT = (pfn_glGetProgramPipelineInfoLogEXT)load("glGetProgramPipelineInfoLogEXT"); fp_glGetProgramPipelineivEXT = (pfn_glGetProgramPipelineivEXT)load("glGetProgramPipelineivEXT"); fp_glIsProgramPipelineEXT = (pfn_glIsProgramPipelineEXT)load("glIsProgramPipelineEXT"); fp_glProgramParameteriEXT = (pfn_glProgramParameteriEXT)load("glProgramParameteriEXT"); fp_glProgramUniform1fEXT = (pfn_glProgramUniform1fEXT)load("glProgramUniform1fEXT"); fp_glProgramUniform1fvEXT = (pfn_glProgramUniform1fvEXT)load("glProgramUniform1fvEXT"); fp_glProgramUniform1iEXT = (pfn_glProgramUniform1iEXT)load("glProgramUniform1iEXT"); fp_glProgramUniform1ivEXT = (pfn_glProgramUniform1ivEXT)load("glProgramUniform1ivEXT"); fp_glProgramUniform2fEXT = (pfn_glProgramUniform2fEXT)load("glProgramUniform2fEXT"); fp_glProgramUniform2fvEXT = (pfn_glProgramUniform2fvEXT)load("glProgramUniform2fvEXT"); fp_glProgramUniform2iEXT = (pfn_glProgramUniform2iEXT)load("glProgramUniform2iEXT"); fp_glProgramUniform2ivEXT = (pfn_glProgramUniform2ivEXT)load("glProgramUniform2ivEXT"); fp_glProgramUniform3fEXT = (pfn_glProgramUniform3fEXT)load("glProgramUniform3fEXT"); fp_glProgramUniform3fvEXT = (pfn_glProgramUniform3fvEXT)load("glProgramUniform3fvEXT"); fp_glProgramUniform3iEXT = (pfn_glProgramUniform3iEXT)load("glProgramUniform3iEXT"); fp_glProgramUniform3ivEXT = (pfn_glProgramUniform3ivEXT)load("glProgramUniform3ivEXT"); fp_glProgramUniform4fEXT = (pfn_glProgramUniform4fEXT)load("glProgramUniform4fEXT"); fp_glProgramUniform4fvEXT = (pfn_glProgramUniform4fvEXT)load("glProgramUniform4fvEXT"); fp_glProgramUniform4iEXT = (pfn_glProgramUniform4iEXT)load("glProgramUniform4iEXT"); fp_glProgramUniform4ivEXT = (pfn_glProgramUniform4ivEXT)load("glProgramUniform4ivEXT"); fp_glProgramUniformMatrix2fvEXT = (pfn_glProgramUniformMatrix2fvEXT)load("glProgramUniformMatrix2fvEXT"); fp_glProgramUniformMatrix3fvEXT = (pfn_glProgramUniformMatrix3fvEXT)load("glProgramUniformMatrix3fvEXT"); fp_glProgramUniformMatrix4fvEXT = (pfn_glProgramUniformMatrix4fvEXT)load("glProgramUniformMatrix4fvEXT"); fp_glUseProgramStagesEXT = (pfn_glUseProgramStagesEXT)load("glUseProgramStagesEXT"); fp_glValidateProgramPipelineEXT = (pfn_glValidateProgramPipelineEXT)load("glValidateProgramPipelineEXT"); fp_glProgramUniform1uiEXT = (pfn_glProgramUniform1uiEXT)load("glProgramUniform1uiEXT"); fp_glProgramUniform2uiEXT = (pfn_glProgramUniform2uiEXT)load("glProgramUniform2uiEXT"); fp_glProgramUniform3uiEXT = (pfn_glProgramUniform3uiEXT)load("glProgramUniform3uiEXT"); fp_glProgramUniform4uiEXT = (pfn_glProgramUniform4uiEXT)load("glProgramUniform4uiEXT"); fp_glProgramUniform1uivEXT = (pfn_glProgramUniform1uivEXT)load("glProgramUniform1uivEXT"); fp_glProgramUniform2uivEXT = (pfn_glProgramUniform2uivEXT)load("glProgramUniform2uivEXT"); fp_glProgramUniform3uivEXT = (pfn_glProgramUniform3uivEXT)load("glProgramUniform3uivEXT"); fp_glProgramUniform4uivEXT = (pfn_glProgramUniform4uivEXT)load("glProgramUniform4uivEXT"); fp_glProgramUniformMatrix4fvEXT = (pfn_glProgramUniformMatrix4fvEXT)load("glProgramUniformMatrix4fvEXT"); fp_glProgramUniformMatrix2x3fvEXT = (pfn_glProgramUniformMatrix2x3fvEXT)load("glProgramUniformMatrix2x3fvEXT"); fp_glProgramUniformMatrix3x2fvEXT = (pfn_glProgramUniformMatrix3x2fvEXT)load("glProgramUniformMatrix3x2fvEXT"); fp_glProgramUniformMatrix2x4fvEXT = (pfn_glProgramUniformMatrix2x4fvEXT)load("glProgramUniformMatrix2x4fvEXT"); fp_glProgramUniformMatrix4x2fvEXT = (pfn_glProgramUniformMatrix4x2fvEXT)load("glProgramUniformMatrix4x2fvEXT"); fp_glProgramUniformMatrix3x4fvEXT = (pfn_glProgramUniformMatrix3x4fvEXT)load("glProgramUniformMatrix3x4fvEXT"); fp_glProgramUniformMatrix4x3fvEXT = (pfn_glProgramUniformMatrix4x3fvEXT)load("glProgramUniformMatrix4x3fvEXT"); } GLboolean GLAD_EXT_shader_framebuffer_fetch = GL_FALSE; GLboolean GLAD_EXT_shader_image_load_formatted = GL_FALSE; GLboolean GLAD_EXT_shader_image_load_store = GL_FALSE; static void load_GL_EXT_shader_image_load_store(LOADER load) { if(!GLAD_EXT_shader_image_load_store) return; fp_glBindImageTextureEXT = (pfn_glBindImageTextureEXT)load("glBindImageTextureEXT"); fp_glMemoryBarrierEXT = (pfn_glMemoryBarrierEXT)load("glMemoryBarrierEXT"); } GLboolean GLAD_EXT_shader_implicit_conversions = GL_FALSE; GLboolean GLAD_EXT_shader_integer_mix = GL_FALSE; GLboolean GLAD_EXT_shader_io_blocks = GL_FALSE; GLboolean GLAD_EXT_shader_pixel_local_storage = GL_FALSE; GLboolean GLAD_EXT_shader_texture_lod = GL_FALSE; GLboolean GLAD_EXT_shadow_samplers = GL_FALSE; GLboolean GLAD_EXT_sparse_texture = GL_FALSE; static void load_GL_EXT_sparse_texture(LOADER load) { if(!GLAD_EXT_sparse_texture) return; fp_glTexPageCommitmentEXT = (pfn_glTexPageCommitmentEXT)load("glTexPageCommitmentEXT"); } GLboolean GLAD_EXT_sparse_texture2 = GL_FALSE; GLboolean GLAD_EXT_sRGB = GL_FALSE; GLboolean GLAD_EXT_sRGB_write_control = GL_FALSE; GLboolean GLAD_EXT_stencil_clear_tag = GL_FALSE; static void load_GL_EXT_stencil_clear_tag(LOADER load) { if(!GLAD_EXT_stencil_clear_tag) return; fp_glStencilClearTagEXT = (pfn_glStencilClearTagEXT)load("glStencilClearTagEXT"); } GLboolean GLAD_EXT_tessellation_point_size = GL_FALSE; GLboolean GLAD_EXT_tessellation_shader = GL_FALSE; static void load_GL_EXT_tessellation_shader(LOADER load) { if(!GLAD_EXT_tessellation_shader) return; fp_glPatchParameteriEXT = (pfn_glPatchParameteriEXT)load("glPatchParameteriEXT"); } GLboolean GLAD_EXT_texture_array = GL_FALSE; static void load_GL_EXT_texture_array(LOADER load) { if(!GLAD_EXT_texture_array) return; fp_glFramebufferTextureLayerEXT = (pfn_glFramebufferTextureLayerEXT)load("glFramebufferTextureLayerEXT"); } GLboolean GLAD_EXT_texture_border_clamp = GL_FALSE; static void load_GL_EXT_texture_border_clamp(LOADER load) { if(!GLAD_EXT_texture_border_clamp) return; fp_glTexParameterIivEXT = (pfn_glTexParameterIivEXT)load("glTexParameterIivEXT"); fp_glTexParameterIuivEXT = (pfn_glTexParameterIuivEXT)load("glTexParameterIuivEXT"); fp_glGetTexParameterIivEXT = (pfn_glGetTexParameterIivEXT)load("glGetTexParameterIivEXT"); fp_glGetTexParameterIuivEXT = (pfn_glGetTexParameterIuivEXT)load("glGetTexParameterIuivEXT"); fp_glSamplerParameterIivEXT = (pfn_glSamplerParameterIivEXT)load("glSamplerParameterIivEXT"); fp_glSamplerParameterIuivEXT = (pfn_glSamplerParameterIuivEXT)load("glSamplerParameterIuivEXT"); fp_glGetSamplerParameterIivEXT = (pfn_glGetSamplerParameterIivEXT)load("glGetSamplerParameterIivEXT"); fp_glGetSamplerParameterIuivEXT = (pfn_glGetSamplerParameterIuivEXT)load("glGetSamplerParameterIuivEXT"); } GLboolean GLAD_EXT_texture_buffer = GL_FALSE; static void load_GL_EXT_texture_buffer(LOADER load) { if(!GLAD_EXT_texture_buffer) return; fp_glTexBufferEXT = (pfn_glTexBufferEXT)load("glTexBufferEXT"); fp_glTexBufferRangeEXT = (pfn_glTexBufferRangeEXT)load("glTexBufferRangeEXT"); } GLboolean GLAD_EXT_texture_buffer_object = GL_FALSE; static void load_GL_EXT_texture_buffer_object(LOADER load) { if(!GLAD_EXT_texture_buffer_object) return; fp_glTexBufferEXT = (pfn_glTexBufferEXT)load("glTexBufferEXT"); } GLboolean GLAD_EXT_texture_compression_dxt1 = GL_FALSE; GLboolean GLAD_EXT_texture_compression_latc = GL_FALSE; GLboolean GLAD_EXT_texture_compression_rgtc = GL_FALSE; GLboolean GLAD_EXT_texture_compression_s3tc = GL_FALSE; GLboolean GLAD_EXT_texture_cube_map = GL_FALSE; GLboolean GLAD_EXT_texture_cube_map_array = GL_FALSE; GLboolean GLAD_EXT_texture_filter_anisotropic = GL_FALSE; GLboolean GLAD_EXT_texture_filter_minmax = GL_FALSE; static void load_GL_EXT_texture_filter_minmax(LOADER load) { if(!GLAD_EXT_texture_filter_minmax) return; fp_glRasterSamplesEXT = (pfn_glRasterSamplesEXT)load("glRasterSamplesEXT"); } GLboolean GLAD_EXT_texture_format_BGRA8888 = GL_FALSE; GLboolean GLAD_EXT_texture_integer = GL_FALSE; static void load_GL_EXT_texture_integer(LOADER load) { if(!GLAD_EXT_texture_integer) return; fp_glTexParameterIivEXT = (pfn_glTexParameterIivEXT)load("glTexParameterIivEXT"); fp_glTexParameterIuivEXT = (pfn_glTexParameterIuivEXT)load("glTexParameterIuivEXT"); fp_glGetTexParameterIivEXT = (pfn_glGetTexParameterIivEXT)load("glGetTexParameterIivEXT"); fp_glGetTexParameterIuivEXT = (pfn_glGetTexParameterIuivEXT)load("glGetTexParameterIuivEXT"); fp_glClearColorIiEXT = (pfn_glClearColorIiEXT)load("glClearColorIiEXT"); fp_glClearColorIuiEXT = (pfn_glClearColorIuiEXT)load("glClearColorIuiEXT"); } GLboolean GLAD_EXT_texture_norm16 = GL_FALSE; GLboolean GLAD_EXT_texture_rg = GL_FALSE; GLboolean GLAD_EXT_texture_shared_exponent = GL_FALSE; GLboolean GLAD_EXT_texture_snorm = GL_FALSE; GLboolean GLAD_EXT_texture_sRGB = GL_FALSE; GLboolean GLAD_EXT_texture_sRGB_decode = GL_FALSE; GLboolean GLAD_EXT_texture_sRGB_R8 = GL_FALSE; GLboolean GLAD_EXT_texture_sRGB_RG8 = GL_FALSE; GLboolean GLAD_EXT_texture_storage = GL_FALSE; static void load_GL_EXT_texture_storage(LOADER load) { if(!GLAD_EXT_texture_storage) return; fp_glTexStorage1DEXT = (pfn_glTexStorage1DEXT)load("glTexStorage1DEXT"); fp_glTexStorage2DEXT = (pfn_glTexStorage2DEXT)load("glTexStorage2DEXT"); fp_glTexStorage3DEXT = (pfn_glTexStorage3DEXT)load("glTexStorage3DEXT"); fp_glTextureStorage1DEXT = (pfn_glTextureStorage1DEXT)load("glTextureStorage1DEXT"); fp_glTextureStorage2DEXT = (pfn_glTextureStorage2DEXT)load("glTextureStorage2DEXT"); fp_glTextureStorage3DEXT = (pfn_glTextureStorage3DEXT)load("glTextureStorage3DEXT"); } GLboolean GLAD_EXT_texture_swizzle = GL_FALSE; GLboolean GLAD_EXT_texture_type_2_10_10_10_REV = GL_FALSE; GLboolean GLAD_EXT_texture_view = GL_FALSE; static void load_GL_EXT_texture_view(LOADER load) { if(!GLAD_EXT_texture_view) return; fp_glTextureViewEXT = (pfn_glTextureViewEXT)load("glTextureViewEXT"); } GLboolean GLAD_EXT_timer_query = GL_FALSE; static void load_GL_EXT_timer_query(LOADER load) { if(!GLAD_EXT_timer_query) return; fp_glGetQueryObjecti64vEXT = (pfn_glGetQueryObjecti64vEXT)load("glGetQueryObjecti64vEXT"); fp_glGetQueryObjectui64vEXT = (pfn_glGetQueryObjectui64vEXT)load("glGetQueryObjectui64vEXT"); } GLboolean GLAD_EXT_transform_feedback = GL_FALSE; static void load_GL_EXT_transform_feedback(LOADER load) { if(!GLAD_EXT_transform_feedback) return; fp_glBeginTransformFeedbackEXT = (pfn_glBeginTransformFeedbackEXT)load("glBeginTransformFeedbackEXT"); fp_glEndTransformFeedbackEXT = (pfn_glEndTransformFeedbackEXT)load("glEndTransformFeedbackEXT"); fp_glBindBufferRangeEXT = (pfn_glBindBufferRangeEXT)load("glBindBufferRangeEXT"); fp_glBindBufferOffsetEXT = (pfn_glBindBufferOffsetEXT)load("glBindBufferOffsetEXT"); fp_glBindBufferBaseEXT = (pfn_glBindBufferBaseEXT)load("glBindBufferBaseEXT"); fp_glTransformFeedbackVaryingsEXT = (pfn_glTransformFeedbackVaryingsEXT)load("glTransformFeedbackVaryingsEXT"); fp_glGetTransformFeedbackVaryingEXT = (pfn_glGetTransformFeedbackVaryingEXT)load("glGetTransformFeedbackVaryingEXT"); } GLboolean GLAD_EXT_unpack_subimage = GL_FALSE; GLboolean GLAD_EXT_vertex_array_bgra = GL_FALSE; GLboolean GLAD_EXT_vertex_attrib_64bit = GL_FALSE; static void load_GL_EXT_vertex_attrib_64bit(LOADER load) { if(!GLAD_EXT_vertex_attrib_64bit) return; fp_glVertexAttribL1dEXT = (pfn_glVertexAttribL1dEXT)load("glVertexAttribL1dEXT"); fp_glVertexAttribL2dEXT = (pfn_glVertexAttribL2dEXT)load("glVertexAttribL2dEXT"); fp_glVertexAttribL3dEXT = (pfn_glVertexAttribL3dEXT)load("glVertexAttribL3dEXT"); fp_glVertexAttribL4dEXT = (pfn_glVertexAttribL4dEXT)load("glVertexAttribL4dEXT"); fp_glVertexAttribL1dvEXT = (pfn_glVertexAttribL1dvEXT)load("glVertexAttribL1dvEXT"); fp_glVertexAttribL2dvEXT = (pfn_glVertexAttribL2dvEXT)load("glVertexAttribL2dvEXT"); fp_glVertexAttribL3dvEXT = (pfn_glVertexAttribL3dvEXT)load("glVertexAttribL3dvEXT"); fp_glVertexAttribL4dvEXT = (pfn_glVertexAttribL4dvEXT)load("glVertexAttribL4dvEXT"); fp_glVertexAttribLPointerEXT = (pfn_glVertexAttribLPointerEXT)load("glVertexAttribLPointerEXT"); fp_glGetVertexAttribLdvEXT = (pfn_glGetVertexAttribLdvEXT)load("glGetVertexAttribLdvEXT"); } GLboolean GLAD_EXT_x11_sync_object = GL_FALSE; static void load_GL_EXT_x11_sync_object(LOADER load) { if(!GLAD_EXT_x11_sync_object) return; fp_glImportSyncEXT = (pfn_glImportSyncEXT)load("glImportSyncEXT"); } GLboolean GLAD_EXT_YUV_target = GL_FALSE; GLboolean GLAD_OES_compressed_ETC1_RGB8_sub_texture = GL_FALSE; GLboolean GLAD_OES_compressed_ETC1_RGB8_texture = GL_FALSE; GLboolean GLAD_OES_copy_image = GL_FALSE; static void load_GL_OES_copy_image(LOADER load) { if(!GLAD_OES_copy_image) return; fp_glCopyImageSubDataOES = (pfn_glCopyImageSubDataOES)load("glCopyImageSubDataOES"); } GLboolean GLAD_OES_depth24 = GL_FALSE; GLboolean GLAD_OES_depth32 = GL_FALSE; GLboolean GLAD_OES_depth_texture = GL_FALSE; GLboolean GLAD_OES_draw_buffers_indexed = GL_FALSE; static void load_GL_OES_draw_buffers_indexed(LOADER load) { if(!GLAD_OES_draw_buffers_indexed) return; fp_glEnableiOES = (pfn_glEnableiOES)load("glEnableiOES"); fp_glDisableiOES = (pfn_glDisableiOES)load("glDisableiOES"); fp_glBlendEquationiOES = (pfn_glBlendEquationiOES)load("glBlendEquationiOES"); fp_glBlendEquationSeparateiOES = (pfn_glBlendEquationSeparateiOES)load("glBlendEquationSeparateiOES"); fp_glBlendFunciOES = (pfn_glBlendFunciOES)load("glBlendFunciOES"); fp_glBlendFuncSeparateiOES = (pfn_glBlendFuncSeparateiOES)load("glBlendFuncSeparateiOES"); fp_glColorMaskiOES = (pfn_glColorMaskiOES)load("glColorMaskiOES"); fp_glIsEnablediOES = (pfn_glIsEnablediOES)load("glIsEnablediOES"); } GLboolean GLAD_OES_draw_elements_base_vertex = GL_FALSE; static void load_GL_OES_draw_elements_base_vertex(LOADER load) { if(!GLAD_OES_draw_elements_base_vertex) return; fp_glDrawElementsBaseVertexOES = (pfn_glDrawElementsBaseVertexOES)load("glDrawElementsBaseVertexOES"); fp_glDrawRangeElementsBaseVertexOES = (pfn_glDrawRangeElementsBaseVertexOES)load("glDrawRangeElementsBaseVertexOES"); fp_glDrawElementsInstancedBaseVertexOES = (pfn_glDrawElementsInstancedBaseVertexOES)load("glDrawElementsInstancedBaseVertexOES"); fp_glMultiDrawElementsBaseVertexOES = (pfn_glMultiDrawElementsBaseVertexOES)load("glMultiDrawElementsBaseVertexOES"); } GLboolean GLAD_OES_EGL_image = GL_FALSE; static void load_GL_OES_EGL_image(LOADER load) { if(!GLAD_OES_EGL_image) return; fp_glEGLImageTargetTexture2DOES = (pfn_glEGLImageTargetTexture2DOES)load("glEGLImageTargetTexture2DOES"); fp_glEGLImageTargetRenderbufferStorageOES = (pfn_glEGLImageTargetRenderbufferStorageOES)load("glEGLImageTargetRenderbufferStorageOES"); } GLboolean GLAD_OES_EGL_image_external = GL_FALSE; GLboolean GLAD_OES_EGL_image_external_essl3 = GL_FALSE; GLboolean GLAD_OES_element_index_uint = GL_FALSE; GLboolean GLAD_OES_fbo_render_mipmap = GL_FALSE; GLboolean GLAD_OES_fragment_precision_high = GL_FALSE; GLboolean GLAD_OES_geometry_point_size = GL_FALSE; GLboolean GLAD_OES_geometry_shader = GL_FALSE; static void load_GL_OES_geometry_shader(LOADER load) { if(!GLAD_OES_geometry_shader) return; fp_glFramebufferTextureOES = (pfn_glFramebufferTextureOES)load("glFramebufferTextureOES"); } GLboolean GLAD_OES_get_program_binary = GL_FALSE; static void load_GL_OES_get_program_binary(LOADER load) { if(!GLAD_OES_get_program_binary) return; fp_glGetProgramBinaryOES = (pfn_glGetProgramBinaryOES)load("glGetProgramBinaryOES"); fp_glProgramBinaryOES = (pfn_glProgramBinaryOES)load("glProgramBinaryOES"); } GLboolean GLAD_OES_gpu_shader5 = GL_FALSE; GLboolean GLAD_OES_mapbuffer = GL_FALSE; static void load_GL_OES_mapbuffer(LOADER load) { if(!GLAD_OES_mapbuffer) return; fp_glMapBufferOES = (pfn_glMapBufferOES)load("glMapBufferOES"); fp_glUnmapBufferOES = (pfn_glUnmapBufferOES)load("glUnmapBufferOES"); fp_glGetBufferPointervOES = (pfn_glGetBufferPointervOES)load("glGetBufferPointervOES"); } GLboolean GLAD_OES_packed_depth_stencil = GL_FALSE; GLboolean GLAD_OES_primitive_bounding_box = GL_FALSE; static void load_GL_OES_primitive_bounding_box(LOADER load) { if(!GLAD_OES_primitive_bounding_box) return; fp_glPrimitiveBoundingBoxOES = (pfn_glPrimitiveBoundingBoxOES)load("glPrimitiveBoundingBoxOES"); } GLboolean GLAD_OES_required_internalformat = GL_FALSE; GLboolean GLAD_OES_rgb8_rgba8 = GL_FALSE; GLboolean GLAD_OES_sample_shading = GL_FALSE; static void load_GL_OES_sample_shading(LOADER load) { if(!GLAD_OES_sample_shading) return; fp_glMinSampleShadingOES = (pfn_glMinSampleShadingOES)load("glMinSampleShadingOES"); } GLboolean GLAD_OES_sample_variables = GL_FALSE; GLboolean GLAD_OES_shader_image_atomic = GL_FALSE; GLboolean GLAD_OES_shader_io_blocks = GL_FALSE; GLboolean GLAD_OES_shader_multisample_interpolation = GL_FALSE; GLboolean GLAD_OES_standard_derivatives = GL_FALSE; GLboolean GLAD_OES_stencil1 = GL_FALSE; GLboolean GLAD_OES_stencil4 = GL_FALSE; GLboolean GLAD_OES_surfaceless_context = GL_FALSE; GLboolean GLAD_OES_tessellation_point_size = GL_FALSE; GLboolean GLAD_OES_tessellation_shader = GL_FALSE; static void load_GL_OES_tessellation_shader(LOADER load) { if(!GLAD_OES_tessellation_shader) return; fp_glPatchParameteriOES = (pfn_glPatchParameteriOES)load("glPatchParameteriOES"); } GLboolean GLAD_OES_texture_3D = GL_FALSE; static void load_GL_OES_texture_3D(LOADER load) { if(!GLAD_OES_texture_3D) return; fp_glTexImage3DOES = (pfn_glTexImage3DOES)load("glTexImage3DOES"); fp_glTexSubImage3DOES = (pfn_glTexSubImage3DOES)load("glTexSubImage3DOES"); fp_glCopyTexSubImage3DOES = (pfn_glCopyTexSubImage3DOES)load("glCopyTexSubImage3DOES"); fp_glCompressedTexImage3DOES = (pfn_glCompressedTexImage3DOES)load("glCompressedTexImage3DOES"); fp_glCompressedTexSubImage3DOES = (pfn_glCompressedTexSubImage3DOES)load("glCompressedTexSubImage3DOES"); fp_glFramebufferTexture3DOES = (pfn_glFramebufferTexture3DOES)load("glFramebufferTexture3DOES"); } GLboolean GLAD_OES_texture_border_clamp = GL_FALSE; static void load_GL_OES_texture_border_clamp(LOADER load) { if(!GLAD_OES_texture_border_clamp) return; fp_glTexParameterIivOES = (pfn_glTexParameterIivOES)load("glTexParameterIivOES"); fp_glTexParameterIuivOES = (pfn_glTexParameterIuivOES)load("glTexParameterIuivOES"); fp_glGetTexParameterIivOES = (pfn_glGetTexParameterIivOES)load("glGetTexParameterIivOES"); fp_glGetTexParameterIuivOES = (pfn_glGetTexParameterIuivOES)load("glGetTexParameterIuivOES"); fp_glSamplerParameterIivOES = (pfn_glSamplerParameterIivOES)load("glSamplerParameterIivOES"); fp_glSamplerParameterIuivOES = (pfn_glSamplerParameterIuivOES)load("glSamplerParameterIuivOES"); fp_glGetSamplerParameterIivOES = (pfn_glGetSamplerParameterIivOES)load("glGetSamplerParameterIivOES"); fp_glGetSamplerParameterIuivOES = (pfn_glGetSamplerParameterIuivOES)load("glGetSamplerParameterIuivOES"); } GLboolean GLAD_OES_texture_buffer = GL_FALSE; static void load_GL_OES_texture_buffer(LOADER load) { if(!GLAD_OES_texture_buffer) return; fp_glTexBufferOES = (pfn_glTexBufferOES)load("glTexBufferOES"); fp_glTexBufferRangeOES = (pfn_glTexBufferRangeOES)load("glTexBufferRangeOES"); } GLboolean GLAD_OES_texture_compression_astc = GL_FALSE; GLboolean GLAD_OES_texture_cube_map_array = GL_FALSE; GLboolean GLAD_OES_texture_float = GL_FALSE; GLboolean GLAD_OES_texture_float_linear = GL_FALSE; GLboolean GLAD_OES_texture_half_float = GL_FALSE; GLboolean GLAD_OES_texture_half_float_linear = GL_FALSE; GLboolean GLAD_OES_texture_npot = GL_FALSE; GLboolean GLAD_OES_texture_stencil8 = GL_FALSE; GLboolean GLAD_OES_texture_storage_multisample_2d_array = GL_FALSE; static void load_GL_OES_texture_storage_multisample_2d_array(LOADER load) { if(!GLAD_OES_texture_storage_multisample_2d_array) return; fp_glTexStorage3DMultisampleOES = (pfn_glTexStorage3DMultisampleOES)load("glTexStorage3DMultisampleOES"); } GLboolean GLAD_OES_texture_view = GL_FALSE; static void load_GL_OES_texture_view(LOADER load) { if(!GLAD_OES_texture_view) return; fp_glTextureViewOES = (pfn_glTextureViewOES)load("glTextureViewOES"); } GLboolean GLAD_OES_vertex_array_object = GL_FALSE; static void load_GL_OES_vertex_array_object(LOADER load) { if(!GLAD_OES_vertex_array_object) return; fp_glBindVertexArrayOES = (pfn_glBindVertexArrayOES)load("glBindVertexArrayOES"); fp_glDeleteVertexArraysOES = (pfn_glDeleteVertexArraysOES)load("glDeleteVertexArraysOES"); fp_glGenVertexArraysOES = (pfn_glGenVertexArraysOES)load("glGenVertexArraysOES"); fp_glIsVertexArrayOES = (pfn_glIsVertexArrayOES)load("glIsVertexArrayOES"); } GLboolean GLAD_OES_vertex_half_float = GL_FALSE; GLboolean GLAD_OES_vertex_type_10_10_10_2 = GL_FALSE; GLboolean GLAD_AMD_blend_minmax_factor = GL_FALSE; GLboolean GLAD_AMD_compressed_3DC_texture = GL_FALSE; GLboolean GLAD_AMD_compressed_ATC_texture = GL_FALSE; GLboolean GLAD_AMD_conservative_depth = GL_FALSE; GLboolean GLAD_AMD_debug_output = GL_FALSE; static void load_GL_AMD_debug_output(LOADER load) { if(!GLAD_AMD_debug_output) return; fp_glDebugMessageEnableAMD = (pfn_glDebugMessageEnableAMD)load("glDebugMessageEnableAMD"); fp_glDebugMessageInsertAMD = (pfn_glDebugMessageInsertAMD)load("glDebugMessageInsertAMD"); fp_glDebugMessageCallbackAMD = (pfn_glDebugMessageCallbackAMD)load("glDebugMessageCallbackAMD"); fp_glGetDebugMessageLogAMD = (pfn_glGetDebugMessageLogAMD)load("glGetDebugMessageLogAMD"); } GLboolean GLAD_AMD_depth_clamp_separate = GL_FALSE; GLboolean GLAD_AMD_draw_buffers_blend = GL_FALSE; static void load_GL_AMD_draw_buffers_blend(LOADER load) { if(!GLAD_AMD_draw_buffers_blend) return; fp_glBlendFuncIndexedAMD = (pfn_glBlendFuncIndexedAMD)load("glBlendFuncIndexedAMD"); fp_glBlendFuncSeparateIndexedAMD = (pfn_glBlendFuncSeparateIndexedAMD)load("glBlendFuncSeparateIndexedAMD"); fp_glBlendEquationIndexedAMD = (pfn_glBlendEquationIndexedAMD)load("glBlendEquationIndexedAMD"); fp_glBlendEquationSeparateIndexedAMD = (pfn_glBlendEquationSeparateIndexedAMD)load("glBlendEquationSeparateIndexedAMD"); } GLboolean GLAD_AMD_gcn_shader = GL_FALSE; GLboolean GLAD_AMD_gpu_shader_int64 = GL_FALSE; static void load_GL_AMD_gpu_shader_int64(LOADER load) { if(!GLAD_AMD_gpu_shader_int64) return; fp_glUniform1i64NV = (pfn_glUniform1i64NV)load("glUniform1i64NV"); fp_glUniform2i64NV = (pfn_glUniform2i64NV)load("glUniform2i64NV"); fp_glUniform3i64NV = (pfn_glUniform3i64NV)load("glUniform3i64NV"); fp_glUniform4i64NV = (pfn_glUniform4i64NV)load("glUniform4i64NV"); fp_glUniform1i64vNV = (pfn_glUniform1i64vNV)load("glUniform1i64vNV"); fp_glUniform2i64vNV = (pfn_glUniform2i64vNV)load("glUniform2i64vNV"); fp_glUniform3i64vNV = (pfn_glUniform3i64vNV)load("glUniform3i64vNV"); fp_glUniform4i64vNV = (pfn_glUniform4i64vNV)load("glUniform4i64vNV"); fp_glUniform1ui64NV = (pfn_glUniform1ui64NV)load("glUniform1ui64NV"); fp_glUniform2ui64NV = (pfn_glUniform2ui64NV)load("glUniform2ui64NV"); fp_glUniform3ui64NV = (pfn_glUniform3ui64NV)load("glUniform3ui64NV"); fp_glUniform4ui64NV = (pfn_glUniform4ui64NV)load("glUniform4ui64NV"); fp_glUniform1ui64vNV = (pfn_glUniform1ui64vNV)load("glUniform1ui64vNV"); fp_glUniform2ui64vNV = (pfn_glUniform2ui64vNV)load("glUniform2ui64vNV"); fp_glUniform3ui64vNV = (pfn_glUniform3ui64vNV)load("glUniform3ui64vNV"); fp_glUniform4ui64vNV = (pfn_glUniform4ui64vNV)load("glUniform4ui64vNV"); fp_glGetUniformi64vNV = (pfn_glGetUniformi64vNV)load("glGetUniformi64vNV"); fp_glGetUniformui64vNV = (pfn_glGetUniformui64vNV)load("glGetUniformui64vNV"); fp_glProgramUniform1i64NV = (pfn_glProgramUniform1i64NV)load("glProgramUniform1i64NV"); fp_glProgramUniform2i64NV = (pfn_glProgramUniform2i64NV)load("glProgramUniform2i64NV"); fp_glProgramUniform3i64NV = (pfn_glProgramUniform3i64NV)load("glProgramUniform3i64NV"); fp_glProgramUniform4i64NV = (pfn_glProgramUniform4i64NV)load("glProgramUniform4i64NV"); fp_glProgramUniform1i64vNV = (pfn_glProgramUniform1i64vNV)load("glProgramUniform1i64vNV"); fp_glProgramUniform2i64vNV = (pfn_glProgramUniform2i64vNV)load("glProgramUniform2i64vNV"); fp_glProgramUniform3i64vNV = (pfn_glProgramUniform3i64vNV)load("glProgramUniform3i64vNV"); fp_glProgramUniform4i64vNV = (pfn_glProgramUniform4i64vNV)load("glProgramUniform4i64vNV"); fp_glProgramUniform1ui64NV = (pfn_glProgramUniform1ui64NV)load("glProgramUniform1ui64NV"); fp_glProgramUniform2ui64NV = (pfn_glProgramUniform2ui64NV)load("glProgramUniform2ui64NV"); fp_glProgramUniform3ui64NV = (pfn_glProgramUniform3ui64NV)load("glProgramUniform3ui64NV"); fp_glProgramUniform4ui64NV = (pfn_glProgramUniform4ui64NV)load("glProgramUniform4ui64NV"); fp_glProgramUniform1ui64vNV = (pfn_glProgramUniform1ui64vNV)load("glProgramUniform1ui64vNV"); fp_glProgramUniform2ui64vNV = (pfn_glProgramUniform2ui64vNV)load("glProgramUniform2ui64vNV"); fp_glProgramUniform3ui64vNV = (pfn_glProgramUniform3ui64vNV)load("glProgramUniform3ui64vNV"); fp_glProgramUniform4ui64vNV = (pfn_glProgramUniform4ui64vNV)load("glProgramUniform4ui64vNV"); } GLboolean GLAD_AMD_interleaved_elements = GL_FALSE; static void load_GL_AMD_interleaved_elements(LOADER load) { if(!GLAD_AMD_interleaved_elements) return; fp_glVertexAttribParameteriAMD = (pfn_glVertexAttribParameteriAMD)load("glVertexAttribParameteriAMD"); } GLboolean GLAD_AMD_multi_draw_indirect = GL_FALSE; static void load_GL_AMD_multi_draw_indirect(LOADER load) { if(!GLAD_AMD_multi_draw_indirect) return; fp_glMultiDrawArraysIndirectAMD = (pfn_glMultiDrawArraysIndirectAMD)load("glMultiDrawArraysIndirectAMD"); fp_glMultiDrawElementsIndirectAMD = (pfn_glMultiDrawElementsIndirectAMD)load("glMultiDrawElementsIndirectAMD"); } GLboolean GLAD_AMD_name_gen_delete = GL_FALSE; static void load_GL_AMD_name_gen_delete(LOADER load) { if(!GLAD_AMD_name_gen_delete) return; fp_glGenNamesAMD = (pfn_glGenNamesAMD)load("glGenNamesAMD"); fp_glDeleteNamesAMD = (pfn_glDeleteNamesAMD)load("glDeleteNamesAMD"); fp_glIsNameAMD = (pfn_glIsNameAMD)load("glIsNameAMD"); } GLboolean GLAD_AMD_occlusion_query_event = GL_FALSE; static void load_GL_AMD_occlusion_query_event(LOADER load) { if(!GLAD_AMD_occlusion_query_event) return; fp_glQueryObjectParameteruiAMD = (pfn_glQueryObjectParameteruiAMD)load("glQueryObjectParameteruiAMD"); } GLboolean GLAD_AMD_performance_monitor = GL_FALSE; static void load_GL_AMD_performance_monitor(LOADER load) { if(!GLAD_AMD_performance_monitor) return; fp_glGetPerfMonitorGroupsAMD = (pfn_glGetPerfMonitorGroupsAMD)load("glGetPerfMonitorGroupsAMD"); fp_glGetPerfMonitorCountersAMD = (pfn_glGetPerfMonitorCountersAMD)load("glGetPerfMonitorCountersAMD"); fp_glGetPerfMonitorGroupStringAMD = (pfn_glGetPerfMonitorGroupStringAMD)load("glGetPerfMonitorGroupStringAMD"); fp_glGetPerfMonitorCounterStringAMD = (pfn_glGetPerfMonitorCounterStringAMD)load("glGetPerfMonitorCounterStringAMD"); fp_glGetPerfMonitorCounterInfoAMD = (pfn_glGetPerfMonitorCounterInfoAMD)load("glGetPerfMonitorCounterInfoAMD"); fp_glGenPerfMonitorsAMD = (pfn_glGenPerfMonitorsAMD)load("glGenPerfMonitorsAMD"); fp_glDeletePerfMonitorsAMD = (pfn_glDeletePerfMonitorsAMD)load("glDeletePerfMonitorsAMD"); fp_glSelectPerfMonitorCountersAMD = (pfn_glSelectPerfMonitorCountersAMD)load("glSelectPerfMonitorCountersAMD"); fp_glBeginPerfMonitorAMD = (pfn_glBeginPerfMonitorAMD)load("glBeginPerfMonitorAMD"); fp_glEndPerfMonitorAMD = (pfn_glEndPerfMonitorAMD)load("glEndPerfMonitorAMD"); fp_glGetPerfMonitorCounterDataAMD = (pfn_glGetPerfMonitorCounterDataAMD)load("glGetPerfMonitorCounterDataAMD"); } GLboolean GLAD_AMD_pinned_memory = GL_FALSE; GLboolean GLAD_AMD_program_binary_Z400 = GL_FALSE; GLboolean GLAD_AMD_query_buffer_object = GL_FALSE; GLboolean GLAD_AMD_sample_positions = GL_FALSE; static void load_GL_AMD_sample_positions(LOADER load) { if(!GLAD_AMD_sample_positions) return; fp_glSetMultisamplefvAMD = (pfn_glSetMultisamplefvAMD)load("glSetMultisamplefvAMD"); } GLboolean GLAD_AMD_seamless_cubemap_per_texture = GL_FALSE; GLboolean GLAD_AMD_shader_atomic_counter_ops = GL_FALSE; GLboolean GLAD_AMD_shader_stencil_export = GL_FALSE; GLboolean GLAD_AMD_shader_trinary_minmax = GL_FALSE; GLboolean GLAD_AMD_sparse_texture = GL_FALSE; static void load_GL_AMD_sparse_texture(LOADER load) { if(!GLAD_AMD_sparse_texture) return; fp_glTexStorageSparseAMD = (pfn_glTexStorageSparseAMD)load("glTexStorageSparseAMD"); fp_glTextureStorageSparseAMD = (pfn_glTextureStorageSparseAMD)load("glTextureStorageSparseAMD"); } GLboolean GLAD_AMD_stencil_operation_extended = GL_FALSE; static void load_GL_AMD_stencil_operation_extended(LOADER load) { if(!GLAD_AMD_stencil_operation_extended) return; fp_glStencilOpValueAMD = (pfn_glStencilOpValueAMD)load("glStencilOpValueAMD"); } GLboolean GLAD_AMD_texture_texture4 = GL_FALSE; GLboolean GLAD_AMD_transform_feedback3_lines_triangles = GL_FALSE; GLboolean GLAD_AMD_transform_feedback4 = GL_FALSE; GLboolean GLAD_AMD_vertex_shader_layer = GL_FALSE; GLboolean GLAD_AMD_vertex_shader_tessellator = GL_FALSE; static void load_GL_AMD_vertex_shader_tessellator(LOADER load) { if(!GLAD_AMD_vertex_shader_tessellator) return; fp_glTessellationFactorAMD = (pfn_glTessellationFactorAMD)load("glTessellationFactorAMD"); fp_glTessellationModeAMD = (pfn_glTessellationModeAMD)load("glTessellationModeAMD"); } GLboolean GLAD_AMD_vertex_shader_viewport_index = GL_FALSE; GLboolean GLAD_ANDROID_extension_pack_es31a = GL_FALSE; GLboolean GLAD_ANGLE_depth_texture = GL_FALSE; GLboolean GLAD_ANGLE_framebuffer_blit = GL_FALSE; static void load_GL_ANGLE_framebuffer_blit(LOADER load) { if(!GLAD_ANGLE_framebuffer_blit) return; fp_glBlitFramebufferANGLE = (pfn_glBlitFramebufferANGLE)load("glBlitFramebufferANGLE"); } GLboolean GLAD_ANGLE_framebuffer_multisample = GL_FALSE; static void load_GL_ANGLE_framebuffer_multisample(LOADER load) { if(!GLAD_ANGLE_framebuffer_multisample) return; fp_glRenderbufferStorageMultisampleANGLE = (pfn_glRenderbufferStorageMultisampleANGLE)load("glRenderbufferStorageMultisampleANGLE"); } GLboolean GLAD_ANGLE_instanced_arrays = GL_FALSE; static void load_GL_ANGLE_instanced_arrays(LOADER load) { if(!GLAD_ANGLE_instanced_arrays) return; fp_glDrawArraysInstancedANGLE = (pfn_glDrawArraysInstancedANGLE)load("glDrawArraysInstancedANGLE"); fp_glDrawElementsInstancedANGLE = (pfn_glDrawElementsInstancedANGLE)load("glDrawElementsInstancedANGLE"); fp_glVertexAttribDivisorANGLE = (pfn_glVertexAttribDivisorANGLE)load("glVertexAttribDivisorANGLE"); } GLboolean GLAD_ANGLE_pack_reverse_row_order = GL_FALSE; GLboolean GLAD_ANGLE_program_binary = GL_FALSE; GLboolean GLAD_ANGLE_texture_compression_dxt3 = GL_FALSE; GLboolean GLAD_ANGLE_texture_compression_dxt5 = GL_FALSE; GLboolean GLAD_ANGLE_texture_usage = GL_FALSE; GLboolean GLAD_ANGLE_translated_shader_source = GL_FALSE; static void load_GL_ANGLE_translated_shader_source(LOADER load) { if(!GLAD_ANGLE_translated_shader_source) return; fp_glGetTranslatedShaderSourceANGLE = (pfn_glGetTranslatedShaderSourceANGLE)load("glGetTranslatedShaderSourceANGLE"); } GLboolean GLAD_APPLE_aux_depth_stencil = GL_FALSE; GLboolean GLAD_APPLE_client_storage = GL_FALSE; GLboolean GLAD_APPLE_clip_distance = GL_FALSE; GLboolean GLAD_APPLE_color_buffer_packed_float = GL_FALSE; GLboolean GLAD_APPLE_copy_texture_levels = GL_FALSE; static void load_GL_APPLE_copy_texture_levels(LOADER load) { if(!GLAD_APPLE_copy_texture_levels) return; fp_glCopyTextureLevelsAPPLE = (pfn_glCopyTextureLevelsAPPLE)load("glCopyTextureLevelsAPPLE"); } GLboolean GLAD_APPLE_element_array = GL_FALSE; static void load_GL_APPLE_element_array(LOADER load) { if(!GLAD_APPLE_element_array) return; fp_glElementPointerAPPLE = (pfn_glElementPointerAPPLE)load("glElementPointerAPPLE"); fp_glDrawElementArrayAPPLE = (pfn_glDrawElementArrayAPPLE)load("glDrawElementArrayAPPLE"); fp_glDrawRangeElementArrayAPPLE = (pfn_glDrawRangeElementArrayAPPLE)load("glDrawRangeElementArrayAPPLE"); fp_glMultiDrawElementArrayAPPLE = (pfn_glMultiDrawElementArrayAPPLE)load("glMultiDrawElementArrayAPPLE"); fp_glMultiDrawRangeElementArrayAPPLE = (pfn_glMultiDrawRangeElementArrayAPPLE)load("glMultiDrawRangeElementArrayAPPLE"); } GLboolean GLAD_APPLE_fence = GL_FALSE; static void load_GL_APPLE_fence(LOADER load) { if(!GLAD_APPLE_fence) return; fp_glGenFencesAPPLE = (pfn_glGenFencesAPPLE)load("glGenFencesAPPLE"); fp_glDeleteFencesAPPLE = (pfn_glDeleteFencesAPPLE)load("glDeleteFencesAPPLE"); fp_glSetFenceAPPLE = (pfn_glSetFenceAPPLE)load("glSetFenceAPPLE"); fp_glIsFenceAPPLE = (pfn_glIsFenceAPPLE)load("glIsFenceAPPLE"); fp_glTestFenceAPPLE = (pfn_glTestFenceAPPLE)load("glTestFenceAPPLE"); fp_glFinishFenceAPPLE = (pfn_glFinishFenceAPPLE)load("glFinishFenceAPPLE"); fp_glTestObjectAPPLE = (pfn_glTestObjectAPPLE)load("glTestObjectAPPLE"); fp_glFinishObjectAPPLE = (pfn_glFinishObjectAPPLE)load("glFinishObjectAPPLE"); } GLboolean GLAD_APPLE_float_pixels = GL_FALSE; GLboolean GLAD_APPLE_flush_buffer_range = GL_FALSE; static void load_GL_APPLE_flush_buffer_range(LOADER load) { if(!GLAD_APPLE_flush_buffer_range) return; fp_glBufferParameteriAPPLE = (pfn_glBufferParameteriAPPLE)load("glBufferParameteriAPPLE"); fp_glFlushMappedBufferRangeAPPLE = (pfn_glFlushMappedBufferRangeAPPLE)load("glFlushMappedBufferRangeAPPLE"); } GLboolean GLAD_APPLE_framebuffer_multisample = GL_FALSE; static void load_GL_APPLE_framebuffer_multisample(LOADER load) { if(!GLAD_APPLE_framebuffer_multisample) return; fp_glRenderbufferStorageMultisampleAPPLE = (pfn_glRenderbufferStorageMultisampleAPPLE)load("glRenderbufferStorageMultisampleAPPLE"); fp_glResolveMultisampleFramebufferAPPLE = (pfn_glResolveMultisampleFramebufferAPPLE)load("glResolveMultisampleFramebufferAPPLE"); } GLboolean GLAD_APPLE_object_purgeable = GL_FALSE; static void load_GL_APPLE_object_purgeable(LOADER load) { if(!GLAD_APPLE_object_purgeable) return; fp_glObjectPurgeableAPPLE = (pfn_glObjectPurgeableAPPLE)load("glObjectPurgeableAPPLE"); fp_glObjectUnpurgeableAPPLE = (pfn_glObjectUnpurgeableAPPLE)load("glObjectUnpurgeableAPPLE"); fp_glGetObjectParameterivAPPLE = (pfn_glGetObjectParameterivAPPLE)load("glGetObjectParameterivAPPLE"); } GLboolean GLAD_APPLE_rgb_422 = GL_FALSE; GLboolean GLAD_APPLE_row_bytes = GL_FALSE; GLboolean GLAD_APPLE_sync = GL_FALSE; static void load_GL_APPLE_sync(LOADER load) { if(!GLAD_APPLE_sync) return; fp_glFenceSyncAPPLE = (pfn_glFenceSyncAPPLE)load("glFenceSyncAPPLE"); fp_glIsSyncAPPLE = (pfn_glIsSyncAPPLE)load("glIsSyncAPPLE"); fp_glDeleteSyncAPPLE = (pfn_glDeleteSyncAPPLE)load("glDeleteSyncAPPLE"); fp_glClientWaitSyncAPPLE = (pfn_glClientWaitSyncAPPLE)load("glClientWaitSyncAPPLE"); fp_glWaitSyncAPPLE = (pfn_glWaitSyncAPPLE)load("glWaitSyncAPPLE"); fp_glGetInteger64vAPPLE = (pfn_glGetInteger64vAPPLE)load("glGetInteger64vAPPLE"); fp_glGetSyncivAPPLE = (pfn_glGetSyncivAPPLE)load("glGetSyncivAPPLE"); } GLboolean GLAD_APPLE_texture_format_BGRA8888 = GL_FALSE; GLboolean GLAD_APPLE_texture_max_level = GL_FALSE; GLboolean GLAD_APPLE_texture_packed_float = GL_FALSE; GLboolean GLAD_APPLE_texture_range = GL_FALSE; static void load_GL_APPLE_texture_range(LOADER load) { if(!GLAD_APPLE_texture_range) return; fp_glTextureRangeAPPLE = (pfn_glTextureRangeAPPLE)load("glTextureRangeAPPLE"); fp_glGetTexParameterPointervAPPLE = (pfn_glGetTexParameterPointervAPPLE)load("glGetTexParameterPointervAPPLE"); } GLboolean GLAD_APPLE_vertex_array_object = GL_FALSE; static void load_GL_APPLE_vertex_array_object(LOADER load) { if(!GLAD_APPLE_vertex_array_object) return; fp_glBindVertexArrayAPPLE = (pfn_glBindVertexArrayAPPLE)load("glBindVertexArrayAPPLE"); fp_glDeleteVertexArraysAPPLE = (pfn_glDeleteVertexArraysAPPLE)load("glDeleteVertexArraysAPPLE"); fp_glGenVertexArraysAPPLE = (pfn_glGenVertexArraysAPPLE)load("glGenVertexArraysAPPLE"); fp_glIsVertexArrayAPPLE = (pfn_glIsVertexArrayAPPLE)load("glIsVertexArrayAPPLE"); } GLboolean GLAD_APPLE_vertex_array_range = GL_FALSE; static void load_GL_APPLE_vertex_array_range(LOADER load) { if(!GLAD_APPLE_vertex_array_range) return; fp_glVertexArrayRangeAPPLE = (pfn_glVertexArrayRangeAPPLE)load("glVertexArrayRangeAPPLE"); fp_glFlushVertexArrayRangeAPPLE = (pfn_glFlushVertexArrayRangeAPPLE)load("glFlushVertexArrayRangeAPPLE"); fp_glVertexArrayParameteriAPPLE = (pfn_glVertexArrayParameteriAPPLE)load("glVertexArrayParameteriAPPLE"); } GLboolean GLAD_APPLE_vertex_program_evaluators = GL_FALSE; static void load_GL_APPLE_vertex_program_evaluators(LOADER load) { if(!GLAD_APPLE_vertex_program_evaluators) return; fp_glEnableVertexAttribAPPLE = (pfn_glEnableVertexAttribAPPLE)load("glEnableVertexAttribAPPLE"); fp_glDisableVertexAttribAPPLE = (pfn_glDisableVertexAttribAPPLE)load("glDisableVertexAttribAPPLE"); fp_glIsVertexAttribEnabledAPPLE = (pfn_glIsVertexAttribEnabledAPPLE)load("glIsVertexAttribEnabledAPPLE"); fp_glMapVertexAttrib1dAPPLE = (pfn_glMapVertexAttrib1dAPPLE)load("glMapVertexAttrib1dAPPLE"); fp_glMapVertexAttrib1fAPPLE = (pfn_glMapVertexAttrib1fAPPLE)load("glMapVertexAttrib1fAPPLE"); fp_glMapVertexAttrib2dAPPLE = (pfn_glMapVertexAttrib2dAPPLE)load("glMapVertexAttrib2dAPPLE"); fp_glMapVertexAttrib2fAPPLE = (pfn_glMapVertexAttrib2fAPPLE)load("glMapVertexAttrib2fAPPLE"); } GLboolean GLAD_APPLE_ycbcr_422 = GL_FALSE; GLboolean GLAD_ARM_mali_program_binary = GL_FALSE; GLboolean GLAD_ARM_mali_shader_binary = GL_FALSE; GLboolean GLAD_ARM_rgba8 = GL_FALSE; GLboolean GLAD_ARM_shader_framebuffer_fetch = GL_FALSE; GLboolean GLAD_ARM_shader_framebuffer_fetch_depth_stencil = GL_FALSE; GLboolean GLAD_ATI_meminfo = GL_FALSE; GLboolean GLAD_ATI_pixel_format_float = GL_FALSE; GLboolean GLAD_DMP_program_binary = GL_FALSE; GLboolean GLAD_DMP_shader_binary = GL_FALSE; GLboolean GLAD_FJ_shader_binary_GCCSO = GL_FALSE; GLboolean GLAD_GREMEDY_frame_terminator = GL_FALSE; static void load_GL_GREMEDY_frame_terminator(LOADER load) { if(!GLAD_GREMEDY_frame_terminator) return; fp_glFrameTerminatorGREMEDY = (pfn_glFrameTerminatorGREMEDY)load("glFrameTerminatorGREMEDY"); } GLboolean GLAD_GREMEDY_string_marker = GL_FALSE; static void load_GL_GREMEDY_string_marker(LOADER load) { if(!GLAD_GREMEDY_string_marker) return; fp_glStringMarkerGREMEDY = (pfn_glStringMarkerGREMEDY)load("glStringMarkerGREMEDY"); } GLboolean GLAD_IMG_multisampled_render_to_texture = GL_FALSE; static void load_GL_IMG_multisampled_render_to_texture(LOADER load) { if(!GLAD_IMG_multisampled_render_to_texture) return; fp_glRenderbufferStorageMultisampleIMG = (pfn_glRenderbufferStorageMultisampleIMG)load("glRenderbufferStorageMultisampleIMG"); fp_glFramebufferTexture2DMultisampleIMG = (pfn_glFramebufferTexture2DMultisampleIMG)load("glFramebufferTexture2DMultisampleIMG"); } GLboolean GLAD_IMG_program_binary = GL_FALSE; GLboolean GLAD_IMG_read_format = GL_FALSE; GLboolean GLAD_IMG_shader_binary = GL_FALSE; GLboolean GLAD_IMG_texture_compression_pvrtc = GL_FALSE; GLboolean GLAD_IMG_texture_compression_pvrtc2 = GL_FALSE; GLboolean GLAD_IMG_texture_filter_cubic = GL_FALSE; GLboolean GLAD_INGR_blend_func_separate = GL_FALSE; static void load_GL_INGR_blend_func_separate(LOADER load) { if(!GLAD_INGR_blend_func_separate) return; fp_glBlendFuncSeparateINGR = (pfn_glBlendFuncSeparateINGR)load("glBlendFuncSeparateINGR"); } GLboolean GLAD_INTEL_fragment_shader_ordering = GL_FALSE; GLboolean GLAD_INTEL_framebuffer_CMAA = GL_FALSE; static void load_GL_INTEL_framebuffer_CMAA(LOADER load) { if(!GLAD_INTEL_framebuffer_CMAA) return; fp_glApplyFramebufferAttachmentCMAAINTEL = (pfn_glApplyFramebufferAttachmentCMAAINTEL)load("glApplyFramebufferAttachmentCMAAINTEL"); } GLboolean GLAD_INTEL_map_texture = GL_FALSE; static void load_GL_INTEL_map_texture(LOADER load) { if(!GLAD_INTEL_map_texture) return; fp_glSyncTextureINTEL = (pfn_glSyncTextureINTEL)load("glSyncTextureINTEL"); fp_glUnmapTexture2DINTEL = (pfn_glUnmapTexture2DINTEL)load("glUnmapTexture2DINTEL"); fp_glMapTexture2DINTEL = (pfn_glMapTexture2DINTEL)load("glMapTexture2DINTEL"); } GLboolean GLAD_INTEL_performance_query = GL_FALSE; static void load_GL_INTEL_performance_query(LOADER load) { if(!GLAD_INTEL_performance_query) return; fp_glBeginPerfQueryINTEL = (pfn_glBeginPerfQueryINTEL)load("glBeginPerfQueryINTEL"); fp_glCreatePerfQueryINTEL = (pfn_glCreatePerfQueryINTEL)load("glCreatePerfQueryINTEL"); fp_glDeletePerfQueryINTEL = (pfn_glDeletePerfQueryINTEL)load("glDeletePerfQueryINTEL"); fp_glEndPerfQueryINTEL = (pfn_glEndPerfQueryINTEL)load("glEndPerfQueryINTEL"); fp_glGetFirstPerfQueryIdINTEL = (pfn_glGetFirstPerfQueryIdINTEL)load("glGetFirstPerfQueryIdINTEL"); fp_glGetNextPerfQueryIdINTEL = (pfn_glGetNextPerfQueryIdINTEL)load("glGetNextPerfQueryIdINTEL"); fp_glGetPerfCounterInfoINTEL = (pfn_glGetPerfCounterInfoINTEL)load("glGetPerfCounterInfoINTEL"); fp_glGetPerfQueryDataINTEL = (pfn_glGetPerfQueryDataINTEL)load("glGetPerfQueryDataINTEL"); fp_glGetPerfQueryIdByNameINTEL = (pfn_glGetPerfQueryIdByNameINTEL)load("glGetPerfQueryIdByNameINTEL"); fp_glGetPerfQueryInfoINTEL = (pfn_glGetPerfQueryInfoINTEL)load("glGetPerfQueryInfoINTEL"); } GLboolean GLAD_MESA_pack_invert = GL_FALSE; GLboolean GLAD_MESA_ycbcr_texture = GL_FALSE; GLboolean GLAD_MESAX_texture_stack = GL_FALSE; GLboolean GLAD_NV_bindless_multi_draw_indirect = GL_FALSE; static void load_GL_NV_bindless_multi_draw_indirect(LOADER load) { if(!GLAD_NV_bindless_multi_draw_indirect) return; fp_glMultiDrawArraysIndirectBindlessNV = (pfn_glMultiDrawArraysIndirectBindlessNV)load("glMultiDrawArraysIndirectBindlessNV"); fp_glMultiDrawElementsIndirectBindlessNV = (pfn_glMultiDrawElementsIndirectBindlessNV)load("glMultiDrawElementsIndirectBindlessNV"); } GLboolean GLAD_NV_bindless_multi_draw_indirect_count = GL_FALSE; static void load_GL_NV_bindless_multi_draw_indirect_count(LOADER load) { if(!GLAD_NV_bindless_multi_draw_indirect_count) return; fp_glMultiDrawArraysIndirectBindlessCountNV = (pfn_glMultiDrawArraysIndirectBindlessCountNV)load("glMultiDrawArraysIndirectBindlessCountNV"); fp_glMultiDrawElementsIndirectBindlessCountNV = (pfn_glMultiDrawElementsIndirectBindlessCountNV)load("glMultiDrawElementsIndirectBindlessCountNV"); } GLboolean GLAD_NV_bindless_texture = GL_FALSE; static void load_GL_NV_bindless_texture(LOADER load) { if(!GLAD_NV_bindless_texture) return; fp_glGetTextureHandleNV = (pfn_glGetTextureHandleNV)load("glGetTextureHandleNV"); fp_glGetTextureSamplerHandleNV = (pfn_glGetTextureSamplerHandleNV)load("glGetTextureSamplerHandleNV"); fp_glMakeTextureHandleResidentNV = (pfn_glMakeTextureHandleResidentNV)load("glMakeTextureHandleResidentNV"); fp_glMakeTextureHandleNonResidentNV = (pfn_glMakeTextureHandleNonResidentNV)load("glMakeTextureHandleNonResidentNV"); fp_glGetImageHandleNV = (pfn_glGetImageHandleNV)load("glGetImageHandleNV"); fp_glMakeImageHandleResidentNV = (pfn_glMakeImageHandleResidentNV)load("glMakeImageHandleResidentNV"); fp_glMakeImageHandleNonResidentNV = (pfn_glMakeImageHandleNonResidentNV)load("glMakeImageHandleNonResidentNV"); fp_glUniformHandleui64NV = (pfn_glUniformHandleui64NV)load("glUniformHandleui64NV"); fp_glUniformHandleui64vNV = (pfn_glUniformHandleui64vNV)load("glUniformHandleui64vNV"); fp_glProgramUniformHandleui64NV = (pfn_glProgramUniformHandleui64NV)load("glProgramUniformHandleui64NV"); fp_glProgramUniformHandleui64vNV = (pfn_glProgramUniformHandleui64vNV)load("glProgramUniformHandleui64vNV"); fp_glIsTextureHandleResidentNV = (pfn_glIsTextureHandleResidentNV)load("glIsTextureHandleResidentNV"); fp_glIsImageHandleResidentNV = (pfn_glIsImageHandleResidentNV)load("glIsImageHandleResidentNV"); } GLboolean GLAD_NV_blend_equation_advanced = GL_FALSE; static void load_GL_NV_blend_equation_advanced(LOADER load) { if(!GLAD_NV_blend_equation_advanced) return; fp_glBlendParameteriNV = (pfn_glBlendParameteriNV)load("glBlendParameteriNV"); fp_glBlendBarrierNV = (pfn_glBlendBarrierNV)load("glBlendBarrierNV"); } GLboolean GLAD_NV_blend_equation_advanced_coherent = GL_FALSE; GLboolean GLAD_NV_command_list = GL_FALSE; static void load_GL_NV_command_list(LOADER load) { if(!GLAD_NV_command_list) return; fp_glCreateStatesNV = (pfn_glCreateStatesNV)load("glCreateStatesNV"); fp_glDeleteStatesNV = (pfn_glDeleteStatesNV)load("glDeleteStatesNV"); fp_glIsStateNV = (pfn_glIsStateNV)load("glIsStateNV"); fp_glStateCaptureNV = (pfn_glStateCaptureNV)load("glStateCaptureNV"); fp_glGetCommandHeaderNV = (pfn_glGetCommandHeaderNV)load("glGetCommandHeaderNV"); fp_glGetStageIndexNV = (pfn_glGetStageIndexNV)load("glGetStageIndexNV"); fp_glDrawCommandsNV = (pfn_glDrawCommandsNV)load("glDrawCommandsNV"); fp_glDrawCommandsAddressNV = (pfn_glDrawCommandsAddressNV)load("glDrawCommandsAddressNV"); fp_glDrawCommandsStatesNV = (pfn_glDrawCommandsStatesNV)load("glDrawCommandsStatesNV"); fp_glDrawCommandsStatesAddressNV = (pfn_glDrawCommandsStatesAddressNV)load("glDrawCommandsStatesAddressNV"); fp_glCreateCommandListsNV = (pfn_glCreateCommandListsNV)load("glCreateCommandListsNV"); fp_glDeleteCommandListsNV = (pfn_glDeleteCommandListsNV)load("glDeleteCommandListsNV"); fp_glIsCommandListNV = (pfn_glIsCommandListNV)load("glIsCommandListNV"); fp_glListDrawCommandsStatesClientNV = (pfn_glListDrawCommandsStatesClientNV)load("glListDrawCommandsStatesClientNV"); fp_glCommandListSegmentsNV = (pfn_glCommandListSegmentsNV)load("glCommandListSegmentsNV"); fp_glCompileCommandListNV = (pfn_glCompileCommandListNV)load("glCompileCommandListNV"); fp_glCallCommandListNV = (pfn_glCallCommandListNV)load("glCallCommandListNV"); } GLboolean GLAD_NV_compute_program5 = GL_FALSE; GLboolean GLAD_NV_conditional_render = GL_FALSE; static void load_GL_NV_conditional_render(LOADER load) { if(!GLAD_NV_conditional_render) return; fp_glBeginConditionalRenderNV = (pfn_glBeginConditionalRenderNV)load("glBeginConditionalRenderNV"); fp_glEndConditionalRenderNV = (pfn_glEndConditionalRenderNV)load("glEndConditionalRenderNV"); } GLboolean GLAD_NV_conservative_raster = GL_FALSE; static void load_GL_NV_conservative_raster(LOADER load) { if(!GLAD_NV_conservative_raster) return; fp_glSubpixelPrecisionBiasNV = (pfn_glSubpixelPrecisionBiasNV)load("glSubpixelPrecisionBiasNV"); } GLboolean GLAD_NV_conservative_raster_dilate = GL_FALSE; static void load_GL_NV_conservative_raster_dilate(LOADER load) { if(!GLAD_NV_conservative_raster_dilate) return; fp_glConservativeRasterParameterfNV = (pfn_glConservativeRasterParameterfNV)load("glConservativeRasterParameterfNV"); } GLboolean GLAD_NV_copy_buffer = GL_FALSE; static void load_GL_NV_copy_buffer(LOADER load) { if(!GLAD_NV_copy_buffer) return; fp_glCopyBufferSubDataNV = (pfn_glCopyBufferSubDataNV)load("glCopyBufferSubDataNV"); } GLboolean GLAD_NV_copy_image = GL_FALSE; static void load_GL_NV_copy_image(LOADER load) { if(!GLAD_NV_copy_image) return; fp_glCopyImageSubDataNV = (pfn_glCopyImageSubDataNV)load("glCopyImageSubDataNV"); } GLboolean GLAD_NV_coverage_sample = GL_FALSE; static void load_GL_NV_coverage_sample(LOADER load) { if(!GLAD_NV_coverage_sample) return; fp_glCoverageMaskNV = (pfn_glCoverageMaskNV)load("glCoverageMaskNV"); fp_glCoverageOperationNV = (pfn_glCoverageOperationNV)load("glCoverageOperationNV"); } GLboolean GLAD_NV_deep_texture3D = GL_FALSE; GLboolean GLAD_NV_depth_buffer_float = GL_FALSE; static void load_GL_NV_depth_buffer_float(LOADER load) { if(!GLAD_NV_depth_buffer_float) return; fp_glDepthRangedNV = (pfn_glDepthRangedNV)load("glDepthRangedNV"); fp_glClearDepthdNV = (pfn_glClearDepthdNV)load("glClearDepthdNV"); fp_glDepthBoundsdNV = (pfn_glDepthBoundsdNV)load("glDepthBoundsdNV"); } GLboolean GLAD_NV_depth_clamp = GL_FALSE; GLboolean GLAD_NV_depth_nonlinear = GL_FALSE; GLboolean GLAD_NV_draw_buffers = GL_FALSE; static void load_GL_NV_draw_buffers(LOADER load) { if(!GLAD_NV_draw_buffers) return; fp_glDrawBuffersNV = (pfn_glDrawBuffersNV)load("glDrawBuffersNV"); } GLboolean GLAD_NV_draw_instanced = GL_FALSE; static void load_GL_NV_draw_instanced(LOADER load) { if(!GLAD_NV_draw_instanced) return; fp_glDrawArraysInstancedNV = (pfn_glDrawArraysInstancedNV)load("glDrawArraysInstancedNV"); fp_glDrawElementsInstancedNV = (pfn_glDrawElementsInstancedNV)load("glDrawElementsInstancedNV"); } GLboolean GLAD_NV_draw_texture = GL_FALSE; static void load_GL_NV_draw_texture(LOADER load) { if(!GLAD_NV_draw_texture) return; fp_glDrawTextureNV = (pfn_glDrawTextureNV)load("glDrawTextureNV"); } GLboolean GLAD_NV_explicit_attrib_location = GL_FALSE; GLboolean GLAD_NV_explicit_multisample = GL_FALSE; static void load_GL_NV_explicit_multisample(LOADER load) { if(!GLAD_NV_explicit_multisample) return; fp_glGetMultisamplefvNV = (pfn_glGetMultisamplefvNV)load("glGetMultisamplefvNV"); fp_glSampleMaskIndexedNV = (pfn_glSampleMaskIndexedNV)load("glSampleMaskIndexedNV"); fp_glTexRenderbufferNV = (pfn_glTexRenderbufferNV)load("glTexRenderbufferNV"); } GLboolean GLAD_NV_fbo_color_attachments = GL_FALSE; GLboolean GLAD_NV_fence = GL_FALSE; static void load_GL_NV_fence(LOADER load) { if(!GLAD_NV_fence) return; fp_glDeleteFencesNV = (pfn_glDeleteFencesNV)load("glDeleteFencesNV"); fp_glGenFencesNV = (pfn_glGenFencesNV)load("glGenFencesNV"); fp_glIsFenceNV = (pfn_glIsFenceNV)load("glIsFenceNV"); fp_glTestFenceNV = (pfn_glTestFenceNV)load("glTestFenceNV"); fp_glGetFenceivNV = (pfn_glGetFenceivNV)load("glGetFenceivNV"); fp_glFinishFenceNV = (pfn_glFinishFenceNV)load("glFinishFenceNV"); fp_glSetFenceNV = (pfn_glSetFenceNV)load("glSetFenceNV"); } GLboolean GLAD_NV_fill_rectangle = GL_FALSE; GLboolean GLAD_NV_float_buffer = GL_FALSE; GLboolean GLAD_NV_fragment_coverage_to_color = GL_FALSE; static void load_GL_NV_fragment_coverage_to_color(LOADER load) { if(!GLAD_NV_fragment_coverage_to_color) return; fp_glFragmentCoverageColorNV = (pfn_glFragmentCoverageColorNV)load("glFragmentCoverageColorNV"); } GLboolean GLAD_NV_fragment_program4 = GL_FALSE; GLboolean GLAD_NV_fragment_shader_interlock = GL_FALSE; GLboolean GLAD_NV_framebuffer_blit = GL_FALSE; static void load_GL_NV_framebuffer_blit(LOADER load) { if(!GLAD_NV_framebuffer_blit) return; fp_glBlitFramebufferNV = (pfn_glBlitFramebufferNV)load("glBlitFramebufferNV"); } GLboolean GLAD_NV_framebuffer_mixed_samples = GL_FALSE; static void load_GL_NV_framebuffer_mixed_samples(LOADER load) { if(!GLAD_NV_framebuffer_mixed_samples) return; fp_glRasterSamplesEXT = (pfn_glRasterSamplesEXT)load("glRasterSamplesEXT"); fp_glCoverageModulationTableNV = (pfn_glCoverageModulationTableNV)load("glCoverageModulationTableNV"); fp_glGetCoverageModulationTableNV = (pfn_glGetCoverageModulationTableNV)load("glGetCoverageModulationTableNV"); fp_glCoverageModulationNV = (pfn_glCoverageModulationNV)load("glCoverageModulationNV"); } GLboolean GLAD_NV_framebuffer_multisample = GL_FALSE; static void load_GL_NV_framebuffer_multisample(LOADER load) { if(!GLAD_NV_framebuffer_multisample) return; fp_glRenderbufferStorageMultisampleNV = (pfn_glRenderbufferStorageMultisampleNV)load("glRenderbufferStorageMultisampleNV"); } GLboolean GLAD_NV_framebuffer_multisample_coverage = GL_FALSE; static void load_GL_NV_framebuffer_multisample_coverage(LOADER load) { if(!GLAD_NV_framebuffer_multisample_coverage) return; fp_glRenderbufferStorageMultisampleCoverageNV = (pfn_glRenderbufferStorageMultisampleCoverageNV)load("glRenderbufferStorageMultisampleCoverageNV"); } GLboolean GLAD_NV_generate_mipmap_sRGB = GL_FALSE; GLboolean GLAD_NV_geometry_program4 = GL_FALSE; static void load_GL_NV_geometry_program4(LOADER load) { if(!GLAD_NV_geometry_program4) return; fp_glProgramVertexLimitNV = (pfn_glProgramVertexLimitNV)load("glProgramVertexLimitNV"); fp_glFramebufferTextureEXT = (pfn_glFramebufferTextureEXT)load("glFramebufferTextureEXT"); fp_glFramebufferTextureLayerEXT = (pfn_glFramebufferTextureLayerEXT)load("glFramebufferTextureLayerEXT"); fp_glFramebufferTextureFaceEXT = (pfn_glFramebufferTextureFaceEXT)load("glFramebufferTextureFaceEXT"); } GLboolean GLAD_NV_geometry_shader4 = GL_FALSE; GLboolean GLAD_NV_geometry_shader_passthrough = GL_FALSE; GLboolean GLAD_NV_gpu_program4 = GL_FALSE; static void load_GL_NV_gpu_program4(LOADER load) { if(!GLAD_NV_gpu_program4) return; fp_glProgramLocalParameterI4iNV = (pfn_glProgramLocalParameterI4iNV)load("glProgramLocalParameterI4iNV"); fp_glProgramLocalParameterI4ivNV = (pfn_glProgramLocalParameterI4ivNV)load("glProgramLocalParameterI4ivNV"); fp_glProgramLocalParametersI4ivNV = (pfn_glProgramLocalParametersI4ivNV)load("glProgramLocalParametersI4ivNV"); fp_glProgramLocalParameterI4uiNV = (pfn_glProgramLocalParameterI4uiNV)load("glProgramLocalParameterI4uiNV"); fp_glProgramLocalParameterI4uivNV = (pfn_glProgramLocalParameterI4uivNV)load("glProgramLocalParameterI4uivNV"); fp_glProgramLocalParametersI4uivNV = (pfn_glProgramLocalParametersI4uivNV)load("glProgramLocalParametersI4uivNV"); fp_glProgramEnvParameterI4iNV = (pfn_glProgramEnvParameterI4iNV)load("glProgramEnvParameterI4iNV"); fp_glProgramEnvParameterI4ivNV = (pfn_glProgramEnvParameterI4ivNV)load("glProgramEnvParameterI4ivNV"); fp_glProgramEnvParametersI4ivNV = (pfn_glProgramEnvParametersI4ivNV)load("glProgramEnvParametersI4ivNV"); fp_glProgramEnvParameterI4uiNV = (pfn_glProgramEnvParameterI4uiNV)load("glProgramEnvParameterI4uiNV"); fp_glProgramEnvParameterI4uivNV = (pfn_glProgramEnvParameterI4uivNV)load("glProgramEnvParameterI4uivNV"); fp_glProgramEnvParametersI4uivNV = (pfn_glProgramEnvParametersI4uivNV)load("glProgramEnvParametersI4uivNV"); fp_glGetProgramLocalParameterIivNV = (pfn_glGetProgramLocalParameterIivNV)load("glGetProgramLocalParameterIivNV"); fp_glGetProgramLocalParameterIuivNV = (pfn_glGetProgramLocalParameterIuivNV)load("glGetProgramLocalParameterIuivNV"); fp_glGetProgramEnvParameterIivNV = (pfn_glGetProgramEnvParameterIivNV)load("glGetProgramEnvParameterIivNV"); fp_glGetProgramEnvParameterIuivNV = (pfn_glGetProgramEnvParameterIuivNV)load("glGetProgramEnvParameterIuivNV"); } GLboolean GLAD_NV_gpu_program5 = GL_FALSE; static void load_GL_NV_gpu_program5(LOADER load) { if(!GLAD_NV_gpu_program5) return; fp_glProgramSubroutineParametersuivNV = (pfn_glProgramSubroutineParametersuivNV)load("glProgramSubroutineParametersuivNV"); fp_glGetProgramSubroutineParameteruivNV = (pfn_glGetProgramSubroutineParameteruivNV)load("glGetProgramSubroutineParameteruivNV"); } GLboolean GLAD_NV_gpu_program5_mem_extended = GL_FALSE; GLboolean GLAD_NV_gpu_shader5 = GL_FALSE; static void load_GL_NV_gpu_shader5(LOADER load) { if(!GLAD_NV_gpu_shader5) return; fp_glUniform1i64NV = (pfn_glUniform1i64NV)load("glUniform1i64NV"); fp_glUniform2i64NV = (pfn_glUniform2i64NV)load("glUniform2i64NV"); fp_glUniform3i64NV = (pfn_glUniform3i64NV)load("glUniform3i64NV"); fp_glUniform4i64NV = (pfn_glUniform4i64NV)load("glUniform4i64NV"); fp_glUniform1i64vNV = (pfn_glUniform1i64vNV)load("glUniform1i64vNV"); fp_glUniform2i64vNV = (pfn_glUniform2i64vNV)load("glUniform2i64vNV"); fp_glUniform3i64vNV = (pfn_glUniform3i64vNV)load("glUniform3i64vNV"); fp_glUniform4i64vNV = (pfn_glUniform4i64vNV)load("glUniform4i64vNV"); fp_glUniform1ui64NV = (pfn_glUniform1ui64NV)load("glUniform1ui64NV"); fp_glUniform2ui64NV = (pfn_glUniform2ui64NV)load("glUniform2ui64NV"); fp_glUniform3ui64NV = (pfn_glUniform3ui64NV)load("glUniform3ui64NV"); fp_glUniform4ui64NV = (pfn_glUniform4ui64NV)load("glUniform4ui64NV"); fp_glUniform1ui64vNV = (pfn_glUniform1ui64vNV)load("glUniform1ui64vNV"); fp_glUniform2ui64vNV = (pfn_glUniform2ui64vNV)load("glUniform2ui64vNV"); fp_glUniform3ui64vNV = (pfn_glUniform3ui64vNV)load("glUniform3ui64vNV"); fp_glUniform4ui64vNV = (pfn_glUniform4ui64vNV)load("glUniform4ui64vNV"); fp_glGetUniformi64vNV = (pfn_glGetUniformi64vNV)load("glGetUniformi64vNV"); fp_glProgramUniform1i64NV = (pfn_glProgramUniform1i64NV)load("glProgramUniform1i64NV"); fp_glProgramUniform2i64NV = (pfn_glProgramUniform2i64NV)load("glProgramUniform2i64NV"); fp_glProgramUniform3i64NV = (pfn_glProgramUniform3i64NV)load("glProgramUniform3i64NV"); fp_glProgramUniform4i64NV = (pfn_glProgramUniform4i64NV)load("glProgramUniform4i64NV"); fp_glProgramUniform1i64vNV = (pfn_glProgramUniform1i64vNV)load("glProgramUniform1i64vNV"); fp_glProgramUniform2i64vNV = (pfn_glProgramUniform2i64vNV)load("glProgramUniform2i64vNV"); fp_glProgramUniform3i64vNV = (pfn_glProgramUniform3i64vNV)load("glProgramUniform3i64vNV"); fp_glProgramUniform4i64vNV = (pfn_glProgramUniform4i64vNV)load("glProgramUniform4i64vNV"); fp_glProgramUniform1ui64NV = (pfn_glProgramUniform1ui64NV)load("glProgramUniform1ui64NV"); fp_glProgramUniform2ui64NV = (pfn_glProgramUniform2ui64NV)load("glProgramUniform2ui64NV"); fp_glProgramUniform3ui64NV = (pfn_glProgramUniform3ui64NV)load("glProgramUniform3ui64NV"); fp_glProgramUniform4ui64NV = (pfn_glProgramUniform4ui64NV)load("glProgramUniform4ui64NV"); fp_glProgramUniform1ui64vNV = (pfn_glProgramUniform1ui64vNV)load("glProgramUniform1ui64vNV"); fp_glProgramUniform2ui64vNV = (pfn_glProgramUniform2ui64vNV)load("glProgramUniform2ui64vNV"); fp_glProgramUniform3ui64vNV = (pfn_glProgramUniform3ui64vNV)load("glProgramUniform3ui64vNV"); fp_glProgramUniform4ui64vNV = (pfn_glProgramUniform4ui64vNV)load("glProgramUniform4ui64vNV"); } GLboolean GLAD_NV_half_float = GL_FALSE; static void load_GL_NV_half_float(LOADER load) { if(!GLAD_NV_half_float) return; fp_glVertex2hNV = (pfn_glVertex2hNV)load("glVertex2hNV"); fp_glVertex2hvNV = (pfn_glVertex2hvNV)load("glVertex2hvNV"); fp_glVertex3hNV = (pfn_glVertex3hNV)load("glVertex3hNV"); fp_glVertex3hvNV = (pfn_glVertex3hvNV)load("glVertex3hvNV"); fp_glVertex4hNV = (pfn_glVertex4hNV)load("glVertex4hNV"); fp_glVertex4hvNV = (pfn_glVertex4hvNV)load("glVertex4hvNV"); fp_glNormal3hNV = (pfn_glNormal3hNV)load("glNormal3hNV"); fp_glNormal3hvNV = (pfn_glNormal3hvNV)load("glNormal3hvNV"); fp_glColor3hNV = (pfn_glColor3hNV)load("glColor3hNV"); fp_glColor3hvNV = (pfn_glColor3hvNV)load("glColor3hvNV"); fp_glColor4hNV = (pfn_glColor4hNV)load("glColor4hNV"); fp_glColor4hvNV = (pfn_glColor4hvNV)load("glColor4hvNV"); fp_glTexCoord1hNV = (pfn_glTexCoord1hNV)load("glTexCoord1hNV"); fp_glTexCoord1hvNV = (pfn_glTexCoord1hvNV)load("glTexCoord1hvNV"); fp_glTexCoord2hNV = (pfn_glTexCoord2hNV)load("glTexCoord2hNV"); fp_glTexCoord2hvNV = (pfn_glTexCoord2hvNV)load("glTexCoord2hvNV"); fp_glTexCoord3hNV = (pfn_glTexCoord3hNV)load("glTexCoord3hNV"); fp_glTexCoord3hvNV = (pfn_glTexCoord3hvNV)load("glTexCoord3hvNV"); fp_glTexCoord4hNV = (pfn_glTexCoord4hNV)load("glTexCoord4hNV"); fp_glTexCoord4hvNV = (pfn_glTexCoord4hvNV)load("glTexCoord4hvNV"); fp_glMultiTexCoord1hNV = (pfn_glMultiTexCoord1hNV)load("glMultiTexCoord1hNV"); fp_glMultiTexCoord1hvNV = (pfn_glMultiTexCoord1hvNV)load("glMultiTexCoord1hvNV"); fp_glMultiTexCoord2hNV = (pfn_glMultiTexCoord2hNV)load("glMultiTexCoord2hNV"); fp_glMultiTexCoord2hvNV = (pfn_glMultiTexCoord2hvNV)load("glMultiTexCoord2hvNV"); fp_glMultiTexCoord3hNV = (pfn_glMultiTexCoord3hNV)load("glMultiTexCoord3hNV"); fp_glMultiTexCoord3hvNV = (pfn_glMultiTexCoord3hvNV)load("glMultiTexCoord3hvNV"); fp_glMultiTexCoord4hNV = (pfn_glMultiTexCoord4hNV)load("glMultiTexCoord4hNV"); fp_glMultiTexCoord4hvNV = (pfn_glMultiTexCoord4hvNV)load("glMultiTexCoord4hvNV"); fp_glFogCoordhNV = (pfn_glFogCoordhNV)load("glFogCoordhNV"); fp_glFogCoordhvNV = (pfn_glFogCoordhvNV)load("glFogCoordhvNV"); fp_glSecondaryColor3hNV = (pfn_glSecondaryColor3hNV)load("glSecondaryColor3hNV"); fp_glSecondaryColor3hvNV = (pfn_glSecondaryColor3hvNV)load("glSecondaryColor3hvNV"); fp_glVertexWeighthNV = (pfn_glVertexWeighthNV)load("glVertexWeighthNV"); fp_glVertexWeighthvNV = (pfn_glVertexWeighthvNV)load("glVertexWeighthvNV"); fp_glVertexAttrib1hNV = (pfn_glVertexAttrib1hNV)load("glVertexAttrib1hNV"); fp_glVertexAttrib1hvNV = (pfn_glVertexAttrib1hvNV)load("glVertexAttrib1hvNV"); fp_glVertexAttrib2hNV = (pfn_glVertexAttrib2hNV)load("glVertexAttrib2hNV"); fp_glVertexAttrib2hvNV = (pfn_glVertexAttrib2hvNV)load("glVertexAttrib2hvNV"); fp_glVertexAttrib3hNV = (pfn_glVertexAttrib3hNV)load("glVertexAttrib3hNV"); fp_glVertexAttrib3hvNV = (pfn_glVertexAttrib3hvNV)load("glVertexAttrib3hvNV"); fp_glVertexAttrib4hNV = (pfn_glVertexAttrib4hNV)load("glVertexAttrib4hNV"); fp_glVertexAttrib4hvNV = (pfn_glVertexAttrib4hvNV)load("glVertexAttrib4hvNV"); fp_glVertexAttribs1hvNV = (pfn_glVertexAttribs1hvNV)load("glVertexAttribs1hvNV"); fp_glVertexAttribs2hvNV = (pfn_glVertexAttribs2hvNV)load("glVertexAttribs2hvNV"); fp_glVertexAttribs3hvNV = (pfn_glVertexAttribs3hvNV)load("glVertexAttribs3hvNV"); fp_glVertexAttribs4hvNV = (pfn_glVertexAttribs4hvNV)load("glVertexAttribs4hvNV"); } GLboolean GLAD_NV_image_formats = GL_FALSE; GLboolean GLAD_NV_instanced_arrays = GL_FALSE; static void load_GL_NV_instanced_arrays(LOADER load) { if(!GLAD_NV_instanced_arrays) return; fp_glVertexAttribDivisorNV = (pfn_glVertexAttribDivisorNV)load("glVertexAttribDivisorNV"); } GLboolean GLAD_NV_internalformat_sample_query = GL_FALSE; static void load_GL_NV_internalformat_sample_query(LOADER load) { if(!GLAD_NV_internalformat_sample_query) return; fp_glGetInternalformatSampleivNV = (pfn_glGetInternalformatSampleivNV)load("glGetInternalformatSampleivNV"); } GLboolean GLAD_NV_multisample_coverage = GL_FALSE; GLboolean GLAD_NV_non_square_matrices = GL_FALSE; static void load_GL_NV_non_square_matrices(LOADER load) { if(!GLAD_NV_non_square_matrices) return; fp_glUniformMatrix2x3fvNV = (pfn_glUniformMatrix2x3fvNV)load("glUniformMatrix2x3fvNV"); fp_glUniformMatrix3x2fvNV = (pfn_glUniformMatrix3x2fvNV)load("glUniformMatrix3x2fvNV"); fp_glUniformMatrix2x4fvNV = (pfn_glUniformMatrix2x4fvNV)load("glUniformMatrix2x4fvNV"); fp_glUniformMatrix4x2fvNV = (pfn_glUniformMatrix4x2fvNV)load("glUniformMatrix4x2fvNV"); fp_glUniformMatrix3x4fvNV = (pfn_glUniformMatrix3x4fvNV)load("glUniformMatrix3x4fvNV"); fp_glUniformMatrix4x3fvNV = (pfn_glUniformMatrix4x3fvNV)load("glUniformMatrix4x3fvNV"); } GLboolean GLAD_NV_occlusion_query = GL_FALSE; static void load_GL_NV_occlusion_query(LOADER load) { if(!GLAD_NV_occlusion_query) return; fp_glGenOcclusionQueriesNV = (pfn_glGenOcclusionQueriesNV)load("glGenOcclusionQueriesNV"); fp_glDeleteOcclusionQueriesNV = (pfn_glDeleteOcclusionQueriesNV)load("glDeleteOcclusionQueriesNV"); fp_glIsOcclusionQueryNV = (pfn_glIsOcclusionQueryNV)load("glIsOcclusionQueryNV"); fp_glBeginOcclusionQueryNV = (pfn_glBeginOcclusionQueryNV)load("glBeginOcclusionQueryNV"); fp_glEndOcclusionQueryNV = (pfn_glEndOcclusionQueryNV)load("glEndOcclusionQueryNV"); fp_glGetOcclusionQueryivNV = (pfn_glGetOcclusionQueryivNV)load("glGetOcclusionQueryivNV"); fp_glGetOcclusionQueryuivNV = (pfn_glGetOcclusionQueryuivNV)load("glGetOcclusionQueryuivNV"); } GLboolean GLAD_NV_parameter_buffer_object = GL_FALSE; static void load_GL_NV_parameter_buffer_object(LOADER load) { if(!GLAD_NV_parameter_buffer_object) return; fp_glProgramBufferParametersfvNV = (pfn_glProgramBufferParametersfvNV)load("glProgramBufferParametersfvNV"); fp_glProgramBufferParametersIivNV = (pfn_glProgramBufferParametersIivNV)load("glProgramBufferParametersIivNV"); fp_glProgramBufferParametersIuivNV = (pfn_glProgramBufferParametersIuivNV)load("glProgramBufferParametersIuivNV"); } GLboolean GLAD_NV_parameter_buffer_object2 = GL_FALSE; GLboolean GLAD_NV_path_rendering = GL_FALSE; static void load_GL_NV_path_rendering(LOADER load) { if(!GLAD_NV_path_rendering) return; fp_glGenPathsNV = (pfn_glGenPathsNV)load("glGenPathsNV"); fp_glDeletePathsNV = (pfn_glDeletePathsNV)load("glDeletePathsNV"); fp_glIsPathNV = (pfn_glIsPathNV)load("glIsPathNV"); fp_glPathCommandsNV = (pfn_glPathCommandsNV)load("glPathCommandsNV"); fp_glPathCoordsNV = (pfn_glPathCoordsNV)load("glPathCoordsNV"); fp_glPathSubCommandsNV = (pfn_glPathSubCommandsNV)load("glPathSubCommandsNV"); fp_glPathSubCoordsNV = (pfn_glPathSubCoordsNV)load("glPathSubCoordsNV"); fp_glPathStringNV = (pfn_glPathStringNV)load("glPathStringNV"); fp_glPathGlyphsNV = (pfn_glPathGlyphsNV)load("glPathGlyphsNV"); fp_glPathGlyphRangeNV = (pfn_glPathGlyphRangeNV)load("glPathGlyphRangeNV"); fp_glWeightPathsNV = (pfn_glWeightPathsNV)load("glWeightPathsNV"); fp_glCopyPathNV = (pfn_glCopyPathNV)load("glCopyPathNV"); fp_glInterpolatePathsNV = (pfn_glInterpolatePathsNV)load("glInterpolatePathsNV"); fp_glTransformPathNV = (pfn_glTransformPathNV)load("glTransformPathNV"); fp_glPathParameterivNV = (pfn_glPathParameterivNV)load("glPathParameterivNV"); fp_glPathParameteriNV = (pfn_glPathParameteriNV)load("glPathParameteriNV"); fp_glPathParameterfvNV = (pfn_glPathParameterfvNV)load("glPathParameterfvNV"); fp_glPathParameterfNV = (pfn_glPathParameterfNV)load("glPathParameterfNV"); fp_glPathDashArrayNV = (pfn_glPathDashArrayNV)load("glPathDashArrayNV"); fp_glPathStencilFuncNV = (pfn_glPathStencilFuncNV)load("glPathStencilFuncNV"); fp_glPathStencilDepthOffsetNV = (pfn_glPathStencilDepthOffsetNV)load("glPathStencilDepthOffsetNV"); fp_glStencilFillPathNV = (pfn_glStencilFillPathNV)load("glStencilFillPathNV"); fp_glStencilStrokePathNV = (pfn_glStencilStrokePathNV)load("glStencilStrokePathNV"); fp_glStencilFillPathInstancedNV = (pfn_glStencilFillPathInstancedNV)load("glStencilFillPathInstancedNV"); fp_glStencilStrokePathInstancedNV = (pfn_glStencilStrokePathInstancedNV)load("glStencilStrokePathInstancedNV"); fp_glPathCoverDepthFuncNV = (pfn_glPathCoverDepthFuncNV)load("glPathCoverDepthFuncNV"); fp_glCoverFillPathNV = (pfn_glCoverFillPathNV)load("glCoverFillPathNV"); fp_glCoverStrokePathNV = (pfn_glCoverStrokePathNV)load("glCoverStrokePathNV"); fp_glCoverFillPathInstancedNV = (pfn_glCoverFillPathInstancedNV)load("glCoverFillPathInstancedNV"); fp_glCoverStrokePathInstancedNV = (pfn_glCoverStrokePathInstancedNV)load("glCoverStrokePathInstancedNV"); fp_glGetPathParameterivNV = (pfn_glGetPathParameterivNV)load("glGetPathParameterivNV"); fp_glGetPathParameterfvNV = (pfn_glGetPathParameterfvNV)load("glGetPathParameterfvNV"); fp_glGetPathCommandsNV = (pfn_glGetPathCommandsNV)load("glGetPathCommandsNV"); fp_glGetPathCoordsNV = (pfn_glGetPathCoordsNV)load("glGetPathCoordsNV"); fp_glGetPathDashArrayNV = (pfn_glGetPathDashArrayNV)load("glGetPathDashArrayNV"); fp_glGetPathMetricsNV = (pfn_glGetPathMetricsNV)load("glGetPathMetricsNV"); fp_glGetPathMetricRangeNV = (pfn_glGetPathMetricRangeNV)load("glGetPathMetricRangeNV"); fp_glGetPathSpacingNV = (pfn_glGetPathSpacingNV)load("glGetPathSpacingNV"); fp_glIsPointInFillPathNV = (pfn_glIsPointInFillPathNV)load("glIsPointInFillPathNV"); fp_glIsPointInStrokePathNV = (pfn_glIsPointInStrokePathNV)load("glIsPointInStrokePathNV"); fp_glGetPathLengthNV = (pfn_glGetPathLengthNV)load("glGetPathLengthNV"); fp_glPointAlongPathNV = (pfn_glPointAlongPathNV)load("glPointAlongPathNV"); fp_glMatrixLoad3x2fNV = (pfn_glMatrixLoad3x2fNV)load("glMatrixLoad3x2fNV"); fp_glMatrixLoad3x3fNV = (pfn_glMatrixLoad3x3fNV)load("glMatrixLoad3x3fNV"); fp_glMatrixLoadTranspose3x3fNV = (pfn_glMatrixLoadTranspose3x3fNV)load("glMatrixLoadTranspose3x3fNV"); fp_glMatrixMult3x2fNV = (pfn_glMatrixMult3x2fNV)load("glMatrixMult3x2fNV"); fp_glMatrixMult3x3fNV = (pfn_glMatrixMult3x3fNV)load("glMatrixMult3x3fNV"); fp_glMatrixMultTranspose3x3fNV = (pfn_glMatrixMultTranspose3x3fNV)load("glMatrixMultTranspose3x3fNV"); fp_glStencilThenCoverFillPathNV = (pfn_glStencilThenCoverFillPathNV)load("glStencilThenCoverFillPathNV"); fp_glStencilThenCoverStrokePathNV = (pfn_glStencilThenCoverStrokePathNV)load("glStencilThenCoverStrokePathNV"); fp_glStencilThenCoverFillPathInstancedNV = (pfn_glStencilThenCoverFillPathInstancedNV)load("glStencilThenCoverFillPathInstancedNV"); fp_glStencilThenCoverStrokePathInstancedNV = (pfn_glStencilThenCoverStrokePathInstancedNV)load("glStencilThenCoverStrokePathInstancedNV"); fp_glPathGlyphIndexRangeNV = (pfn_glPathGlyphIndexRangeNV)load("glPathGlyphIndexRangeNV"); fp_glPathGlyphIndexArrayNV = (pfn_glPathGlyphIndexArrayNV)load("glPathGlyphIndexArrayNV"); fp_glPathMemoryGlyphIndexArrayNV = (pfn_glPathMemoryGlyphIndexArrayNV)load("glPathMemoryGlyphIndexArrayNV"); fp_glProgramPathFragmentInputGenNV = (pfn_glProgramPathFragmentInputGenNV)load("glProgramPathFragmentInputGenNV"); fp_glGetProgramResourcefvNV = (pfn_glGetProgramResourcefvNV)load("glGetProgramResourcefvNV"); fp_glPathColorGenNV = (pfn_glPathColorGenNV)load("glPathColorGenNV"); fp_glPathTexGenNV = (pfn_glPathTexGenNV)load("glPathTexGenNV"); fp_glPathFogGenNV = (pfn_glPathFogGenNV)load("glPathFogGenNV"); fp_glGetPathColorGenivNV = (pfn_glGetPathColorGenivNV)load("glGetPathColorGenivNV"); fp_glGetPathColorGenfvNV = (pfn_glGetPathColorGenfvNV)load("glGetPathColorGenfvNV"); fp_glGetPathTexGenivNV = (pfn_glGetPathTexGenivNV)load("glGetPathTexGenivNV"); fp_glGetPathTexGenfvNV = (pfn_glGetPathTexGenfvNV)load("glGetPathTexGenfvNV"); } GLboolean GLAD_NV_path_rendering_shared_edge = GL_FALSE; GLboolean GLAD_NV_polygon_mode = GL_FALSE; static void load_GL_NV_polygon_mode(LOADER load) { if(!GLAD_NV_polygon_mode) return; fp_glPolygonModeNV = (pfn_glPolygonModeNV)load("glPolygonModeNV"); } GLboolean GLAD_NV_present_video = GL_FALSE; static void load_GL_NV_present_video(LOADER load) { if(!GLAD_NV_present_video) return; fp_glPresentFrameKeyedNV = (pfn_glPresentFrameKeyedNV)load("glPresentFrameKeyedNV"); fp_glPresentFrameDualFillNV = (pfn_glPresentFrameDualFillNV)load("glPresentFrameDualFillNV"); fp_glGetVideoivNV = (pfn_glGetVideoivNV)load("glGetVideoivNV"); fp_glGetVideouivNV = (pfn_glGetVideouivNV)load("glGetVideouivNV"); fp_glGetVideoi64vNV = (pfn_glGetVideoi64vNV)load("glGetVideoi64vNV"); fp_glGetVideoui64vNV = (pfn_glGetVideoui64vNV)load("glGetVideoui64vNV"); } GLboolean GLAD_NV_primitive_restart = GL_FALSE; static void load_GL_NV_primitive_restart(LOADER load) { if(!GLAD_NV_primitive_restart) return; fp_glPrimitiveRestartNV = (pfn_glPrimitiveRestartNV)load("glPrimitiveRestartNV"); fp_glPrimitiveRestartIndexNV = (pfn_glPrimitiveRestartIndexNV)load("glPrimitiveRestartIndexNV"); } GLboolean GLAD_NV_read_buffer = GL_FALSE; static void load_GL_NV_read_buffer(LOADER load) { if(!GLAD_NV_read_buffer) return; fp_glReadBufferNV = (pfn_glReadBufferNV)load("glReadBufferNV"); } GLboolean GLAD_NV_read_buffer_front = GL_FALSE; GLboolean GLAD_NV_read_depth = GL_FALSE; GLboolean GLAD_NV_read_depth_stencil = GL_FALSE; GLboolean GLAD_NV_read_stencil = GL_FALSE; GLboolean GLAD_NV_sample_locations = GL_FALSE; static void load_GL_NV_sample_locations(LOADER load) { if(!GLAD_NV_sample_locations) return; fp_glFramebufferSampleLocationsfvNV = (pfn_glFramebufferSampleLocationsfvNV)load("glFramebufferSampleLocationsfvNV"); fp_glNamedFramebufferSampleLocationsfvNV = (pfn_glNamedFramebufferSampleLocationsfvNV)load("glNamedFramebufferSampleLocationsfvNV"); fp_glResolveDepthValuesNV = (pfn_glResolveDepthValuesNV)load("glResolveDepthValuesNV"); } GLboolean GLAD_NV_sample_mask_override_coverage = GL_FALSE; GLboolean GLAD_NV_shader_atomic_counters = GL_FALSE; GLboolean GLAD_NV_shader_atomic_float = GL_FALSE; GLboolean GLAD_NV_shader_atomic_fp16_vector = GL_FALSE; GLboolean GLAD_NV_shader_atomic_int64 = GL_FALSE; GLboolean GLAD_NV_shader_buffer_load = GL_FALSE; static void load_GL_NV_shader_buffer_load(LOADER load) { if(!GLAD_NV_shader_buffer_load) return; fp_glMakeBufferResidentNV = (pfn_glMakeBufferResidentNV)load("glMakeBufferResidentNV"); fp_glMakeBufferNonResidentNV = (pfn_glMakeBufferNonResidentNV)load("glMakeBufferNonResidentNV"); fp_glIsBufferResidentNV = (pfn_glIsBufferResidentNV)load("glIsBufferResidentNV"); fp_glMakeNamedBufferResidentNV = (pfn_glMakeNamedBufferResidentNV)load("glMakeNamedBufferResidentNV"); fp_glMakeNamedBufferNonResidentNV = (pfn_glMakeNamedBufferNonResidentNV)load("glMakeNamedBufferNonResidentNV"); fp_glIsNamedBufferResidentNV = (pfn_glIsNamedBufferResidentNV)load("glIsNamedBufferResidentNV"); fp_glGetBufferParameterui64vNV = (pfn_glGetBufferParameterui64vNV)load("glGetBufferParameterui64vNV"); fp_glGetNamedBufferParameterui64vNV = (pfn_glGetNamedBufferParameterui64vNV)load("glGetNamedBufferParameterui64vNV"); fp_glGetIntegerui64vNV = (pfn_glGetIntegerui64vNV)load("glGetIntegerui64vNV"); fp_glUniformui64NV = (pfn_glUniformui64NV)load("glUniformui64NV"); fp_glUniformui64vNV = (pfn_glUniformui64vNV)load("glUniformui64vNV"); fp_glGetUniformui64vNV = (pfn_glGetUniformui64vNV)load("glGetUniformui64vNV"); fp_glProgramUniformui64NV = (pfn_glProgramUniformui64NV)load("glProgramUniformui64NV"); fp_glProgramUniformui64vNV = (pfn_glProgramUniformui64vNV)load("glProgramUniformui64vNV"); } GLboolean GLAD_NV_shader_buffer_store = GL_FALSE; GLboolean GLAD_NV_shader_noperspective_interpolation = GL_FALSE; GLboolean GLAD_NV_shader_storage_buffer_object = GL_FALSE; GLboolean GLAD_NV_shader_thread_group = GL_FALSE; GLboolean GLAD_NV_shader_thread_shuffle = GL_FALSE; GLboolean GLAD_NV_shadow_samplers_array = GL_FALSE; GLboolean GLAD_NV_shadow_samplers_cube = GL_FALSE; GLboolean GLAD_NV_sRGB_formats = GL_FALSE; GLboolean GLAD_NV_tessellation_program5 = GL_FALSE; GLboolean GLAD_NV_texture_barrier = GL_FALSE; static void load_GL_NV_texture_barrier(LOADER load) { if(!GLAD_NV_texture_barrier) return; fp_glTextureBarrierNV = (pfn_glTextureBarrierNV)load("glTextureBarrierNV"); } GLboolean GLAD_NV_texture_border_clamp = GL_FALSE; GLboolean GLAD_NV_texture_compression_s3tc_update = GL_FALSE; GLboolean GLAD_NV_texture_multisample = GL_FALSE; static void load_GL_NV_texture_multisample(LOADER load) { if(!GLAD_NV_texture_multisample) return; fp_glTexImage2DMultisampleCoverageNV = (pfn_glTexImage2DMultisampleCoverageNV)load("glTexImage2DMultisampleCoverageNV"); fp_glTexImage3DMultisampleCoverageNV = (pfn_glTexImage3DMultisampleCoverageNV)load("glTexImage3DMultisampleCoverageNV"); fp_glTextureImage2DMultisampleNV = (pfn_glTextureImage2DMultisampleNV)load("glTextureImage2DMultisampleNV"); fp_glTextureImage3DMultisampleNV = (pfn_glTextureImage3DMultisampleNV)load("glTextureImage3DMultisampleNV"); fp_glTextureImage2DMultisampleCoverageNV = (pfn_glTextureImage2DMultisampleCoverageNV)load("glTextureImage2DMultisampleCoverageNV"); fp_glTextureImage3DMultisampleCoverageNV = (pfn_glTextureImage3DMultisampleCoverageNV)load("glTextureImage3DMultisampleCoverageNV"); } GLboolean GLAD_NV_texture_npot_2D_mipmap = GL_FALSE; GLboolean GLAD_NV_transform_feedback = GL_FALSE; static void load_GL_NV_transform_feedback(LOADER load) { if(!GLAD_NV_transform_feedback) return; fp_glBeginTransformFeedbackNV = (pfn_glBeginTransformFeedbackNV)load("glBeginTransformFeedbackNV"); fp_glEndTransformFeedbackNV = (pfn_glEndTransformFeedbackNV)load("glEndTransformFeedbackNV"); fp_glTransformFeedbackAttribsNV = (pfn_glTransformFeedbackAttribsNV)load("glTransformFeedbackAttribsNV"); fp_glBindBufferRangeNV = (pfn_glBindBufferRangeNV)load("glBindBufferRangeNV"); fp_glBindBufferOffsetNV = (pfn_glBindBufferOffsetNV)load("glBindBufferOffsetNV"); fp_glBindBufferBaseNV = (pfn_glBindBufferBaseNV)load("glBindBufferBaseNV"); fp_glTransformFeedbackVaryingsNV = (pfn_glTransformFeedbackVaryingsNV)load("glTransformFeedbackVaryingsNV"); fp_glActiveVaryingNV = (pfn_glActiveVaryingNV)load("glActiveVaryingNV"); fp_glGetVaryingLocationNV = (pfn_glGetVaryingLocationNV)load("glGetVaryingLocationNV"); fp_glGetActiveVaryingNV = (pfn_glGetActiveVaryingNV)load("glGetActiveVaryingNV"); fp_glGetTransformFeedbackVaryingNV = (pfn_glGetTransformFeedbackVaryingNV)load("glGetTransformFeedbackVaryingNV"); fp_glTransformFeedbackStreamAttribsNV = (pfn_glTransformFeedbackStreamAttribsNV)load("glTransformFeedbackStreamAttribsNV"); } GLboolean GLAD_NV_transform_feedback2 = GL_FALSE; static void load_GL_NV_transform_feedback2(LOADER load) { if(!GLAD_NV_transform_feedback2) return; fp_glBindTransformFeedbackNV = (pfn_glBindTransformFeedbackNV)load("glBindTransformFeedbackNV"); fp_glDeleteTransformFeedbacksNV = (pfn_glDeleteTransformFeedbacksNV)load("glDeleteTransformFeedbacksNV"); fp_glGenTransformFeedbacksNV = (pfn_glGenTransformFeedbacksNV)load("glGenTransformFeedbacksNV"); fp_glIsTransformFeedbackNV = (pfn_glIsTransformFeedbackNV)load("glIsTransformFeedbackNV"); fp_glPauseTransformFeedbackNV = (pfn_glPauseTransformFeedbackNV)load("glPauseTransformFeedbackNV"); fp_glResumeTransformFeedbackNV = (pfn_glResumeTransformFeedbackNV)load("glResumeTransformFeedbackNV"); fp_glDrawTransformFeedbackNV = (pfn_glDrawTransformFeedbackNV)load("glDrawTransformFeedbackNV"); } GLboolean GLAD_NV_uniform_buffer_unified_memory = GL_FALSE; GLboolean GLAD_NV_vdpau_interop = GL_FALSE; static void load_GL_NV_vdpau_interop(LOADER load) { if(!GLAD_NV_vdpau_interop) return; fp_glVDPAUInitNV = (pfn_glVDPAUInitNV)load("glVDPAUInitNV"); fp_glVDPAUFiniNV = (pfn_glVDPAUFiniNV)load("glVDPAUFiniNV"); fp_glVDPAURegisterVideoSurfaceNV = (pfn_glVDPAURegisterVideoSurfaceNV)load("glVDPAURegisterVideoSurfaceNV"); fp_glVDPAURegisterOutputSurfaceNV = (pfn_glVDPAURegisterOutputSurfaceNV)load("glVDPAURegisterOutputSurfaceNV"); fp_glVDPAUIsSurfaceNV = (pfn_glVDPAUIsSurfaceNV)load("glVDPAUIsSurfaceNV"); fp_glVDPAUUnregisterSurfaceNV = (pfn_glVDPAUUnregisterSurfaceNV)load("glVDPAUUnregisterSurfaceNV"); fp_glVDPAUGetSurfaceivNV = (pfn_glVDPAUGetSurfaceivNV)load("glVDPAUGetSurfaceivNV"); fp_glVDPAUSurfaceAccessNV = (pfn_glVDPAUSurfaceAccessNV)load("glVDPAUSurfaceAccessNV"); fp_glVDPAUMapSurfacesNV = (pfn_glVDPAUMapSurfacesNV)load("glVDPAUMapSurfacesNV"); fp_glVDPAUUnmapSurfacesNV = (pfn_glVDPAUUnmapSurfacesNV)load("glVDPAUUnmapSurfacesNV"); } GLboolean GLAD_NV_vertex_attrib_integer_64bit = GL_FALSE; static void load_GL_NV_vertex_attrib_integer_64bit(LOADER load) { if(!GLAD_NV_vertex_attrib_integer_64bit) return; fp_glVertexAttribL1i64NV = (pfn_glVertexAttribL1i64NV)load("glVertexAttribL1i64NV"); fp_glVertexAttribL2i64NV = (pfn_glVertexAttribL2i64NV)load("glVertexAttribL2i64NV"); fp_glVertexAttribL3i64NV = (pfn_glVertexAttribL3i64NV)load("glVertexAttribL3i64NV"); fp_glVertexAttribL4i64NV = (pfn_glVertexAttribL4i64NV)load("glVertexAttribL4i64NV"); fp_glVertexAttribL1i64vNV = (pfn_glVertexAttribL1i64vNV)load("glVertexAttribL1i64vNV"); fp_glVertexAttribL2i64vNV = (pfn_glVertexAttribL2i64vNV)load("glVertexAttribL2i64vNV"); fp_glVertexAttribL3i64vNV = (pfn_glVertexAttribL3i64vNV)load("glVertexAttribL3i64vNV"); fp_glVertexAttribL4i64vNV = (pfn_glVertexAttribL4i64vNV)load("glVertexAttribL4i64vNV"); fp_glVertexAttribL1ui64NV = (pfn_glVertexAttribL1ui64NV)load("glVertexAttribL1ui64NV"); fp_glVertexAttribL2ui64NV = (pfn_glVertexAttribL2ui64NV)load("glVertexAttribL2ui64NV"); fp_glVertexAttribL3ui64NV = (pfn_glVertexAttribL3ui64NV)load("glVertexAttribL3ui64NV"); fp_glVertexAttribL4ui64NV = (pfn_glVertexAttribL4ui64NV)load("glVertexAttribL4ui64NV"); fp_glVertexAttribL1ui64vNV = (pfn_glVertexAttribL1ui64vNV)load("glVertexAttribL1ui64vNV"); fp_glVertexAttribL2ui64vNV = (pfn_glVertexAttribL2ui64vNV)load("glVertexAttribL2ui64vNV"); fp_glVertexAttribL3ui64vNV = (pfn_glVertexAttribL3ui64vNV)load("glVertexAttribL3ui64vNV"); fp_glVertexAttribL4ui64vNV = (pfn_glVertexAttribL4ui64vNV)load("glVertexAttribL4ui64vNV"); fp_glGetVertexAttribLi64vNV = (pfn_glGetVertexAttribLi64vNV)load("glGetVertexAttribLi64vNV"); fp_glGetVertexAttribLui64vNV = (pfn_glGetVertexAttribLui64vNV)load("glGetVertexAttribLui64vNV"); fp_glVertexAttribLFormatNV = (pfn_glVertexAttribLFormatNV)load("glVertexAttribLFormatNV"); } GLboolean GLAD_NV_vertex_buffer_unified_memory = GL_FALSE; static void load_GL_NV_vertex_buffer_unified_memory(LOADER load) { if(!GLAD_NV_vertex_buffer_unified_memory) return; fp_glBufferAddressRangeNV = (pfn_glBufferAddressRangeNV)load("glBufferAddressRangeNV"); fp_glVertexFormatNV = (pfn_glVertexFormatNV)load("glVertexFormatNV"); fp_glNormalFormatNV = (pfn_glNormalFormatNV)load("glNormalFormatNV"); fp_glColorFormatNV = (pfn_glColorFormatNV)load("glColorFormatNV"); fp_glIndexFormatNV = (pfn_glIndexFormatNV)load("glIndexFormatNV"); fp_glTexCoordFormatNV = (pfn_glTexCoordFormatNV)load("glTexCoordFormatNV"); fp_glEdgeFlagFormatNV = (pfn_glEdgeFlagFormatNV)load("glEdgeFlagFormatNV"); fp_glSecondaryColorFormatNV = (pfn_glSecondaryColorFormatNV)load("glSecondaryColorFormatNV"); fp_glFogCoordFormatNV = (pfn_glFogCoordFormatNV)load("glFogCoordFormatNV"); fp_glVertexAttribFormatNV = (pfn_glVertexAttribFormatNV)load("glVertexAttribFormatNV"); fp_glVertexAttribIFormatNV = (pfn_glVertexAttribIFormatNV)load("glVertexAttribIFormatNV"); fp_glGetIntegerui64i_vNV = (pfn_glGetIntegerui64i_vNV)load("glGetIntegerui64i_vNV"); } GLboolean GLAD_NV_vertex_program4 = GL_FALSE; static void load_GL_NV_vertex_program4(LOADER load) { if(!GLAD_NV_vertex_program4) return; fp_glVertexAttribI1iEXT = (pfn_glVertexAttribI1iEXT)load("glVertexAttribI1iEXT"); fp_glVertexAttribI2iEXT = (pfn_glVertexAttribI2iEXT)load("glVertexAttribI2iEXT"); fp_glVertexAttribI3iEXT = (pfn_glVertexAttribI3iEXT)load("glVertexAttribI3iEXT"); fp_glVertexAttribI4iEXT = (pfn_glVertexAttribI4iEXT)load("glVertexAttribI4iEXT"); fp_glVertexAttribI1uiEXT = (pfn_glVertexAttribI1uiEXT)load("glVertexAttribI1uiEXT"); fp_glVertexAttribI2uiEXT = (pfn_glVertexAttribI2uiEXT)load("glVertexAttribI2uiEXT"); fp_glVertexAttribI3uiEXT = (pfn_glVertexAttribI3uiEXT)load("glVertexAttribI3uiEXT"); fp_glVertexAttribI4uiEXT = (pfn_glVertexAttribI4uiEXT)load("glVertexAttribI4uiEXT"); fp_glVertexAttribI1ivEXT = (pfn_glVertexAttribI1ivEXT)load("glVertexAttribI1ivEXT"); fp_glVertexAttribI2ivEXT = (pfn_glVertexAttribI2ivEXT)load("glVertexAttribI2ivEXT"); fp_glVertexAttribI3ivEXT = (pfn_glVertexAttribI3ivEXT)load("glVertexAttribI3ivEXT"); fp_glVertexAttribI4ivEXT = (pfn_glVertexAttribI4ivEXT)load("glVertexAttribI4ivEXT"); fp_glVertexAttribI1uivEXT = (pfn_glVertexAttribI1uivEXT)load("glVertexAttribI1uivEXT"); fp_glVertexAttribI2uivEXT = (pfn_glVertexAttribI2uivEXT)load("glVertexAttribI2uivEXT"); fp_glVertexAttribI3uivEXT = (pfn_glVertexAttribI3uivEXT)load("glVertexAttribI3uivEXT"); fp_glVertexAttribI4uivEXT = (pfn_glVertexAttribI4uivEXT)load("glVertexAttribI4uivEXT"); fp_glVertexAttribI4bvEXT = (pfn_glVertexAttribI4bvEXT)load("glVertexAttribI4bvEXT"); fp_glVertexAttribI4svEXT = (pfn_glVertexAttribI4svEXT)load("glVertexAttribI4svEXT"); fp_glVertexAttribI4ubvEXT = (pfn_glVertexAttribI4ubvEXT)load("glVertexAttribI4ubvEXT"); fp_glVertexAttribI4usvEXT = (pfn_glVertexAttribI4usvEXT)load("glVertexAttribI4usvEXT"); fp_glVertexAttribIPointerEXT = (pfn_glVertexAttribIPointerEXT)load("glVertexAttribIPointerEXT"); fp_glGetVertexAttribIivEXT = (pfn_glGetVertexAttribIivEXT)load("glGetVertexAttribIivEXT"); fp_glGetVertexAttribIuivEXT = (pfn_glGetVertexAttribIuivEXT)load("glGetVertexAttribIuivEXT"); } GLboolean GLAD_NV_video_capture = GL_FALSE; static void load_GL_NV_video_capture(LOADER load) { if(!GLAD_NV_video_capture) return; fp_glBeginVideoCaptureNV = (pfn_glBeginVideoCaptureNV)load("glBeginVideoCaptureNV"); fp_glBindVideoCaptureStreamBufferNV = (pfn_glBindVideoCaptureStreamBufferNV)load("glBindVideoCaptureStreamBufferNV"); fp_glBindVideoCaptureStreamTextureNV = (pfn_glBindVideoCaptureStreamTextureNV)load("glBindVideoCaptureStreamTextureNV"); fp_glEndVideoCaptureNV = (pfn_glEndVideoCaptureNV)load("glEndVideoCaptureNV"); fp_glGetVideoCaptureivNV = (pfn_glGetVideoCaptureivNV)load("glGetVideoCaptureivNV"); fp_glGetVideoCaptureStreamivNV = (pfn_glGetVideoCaptureStreamivNV)load("glGetVideoCaptureStreamivNV"); fp_glGetVideoCaptureStreamfvNV = (pfn_glGetVideoCaptureStreamfvNV)load("glGetVideoCaptureStreamfvNV"); fp_glGetVideoCaptureStreamdvNV = (pfn_glGetVideoCaptureStreamdvNV)load("glGetVideoCaptureStreamdvNV"); fp_glVideoCaptureNV = (pfn_glVideoCaptureNV)load("glVideoCaptureNV"); fp_glVideoCaptureStreamParameterivNV = (pfn_glVideoCaptureStreamParameterivNV)load("glVideoCaptureStreamParameterivNV"); fp_glVideoCaptureStreamParameterfvNV = (pfn_glVideoCaptureStreamParameterfvNV)load("glVideoCaptureStreamParameterfvNV"); fp_glVideoCaptureStreamParameterdvNV = (pfn_glVideoCaptureStreamParameterdvNV)load("glVideoCaptureStreamParameterdvNV"); } GLboolean GLAD_NV_viewport_array = GL_FALSE; static void load_GL_NV_viewport_array(LOADER load) { if(!GLAD_NV_viewport_array) return; fp_glViewportArrayvNV = (pfn_glViewportArrayvNV)load("glViewportArrayvNV"); fp_glViewportIndexedfNV = (pfn_glViewportIndexedfNV)load("glViewportIndexedfNV"); fp_glViewportIndexedfvNV = (pfn_glViewportIndexedfvNV)load("glViewportIndexedfvNV"); fp_glScissorArrayvNV = (pfn_glScissorArrayvNV)load("glScissorArrayvNV"); fp_glScissorIndexedNV = (pfn_glScissorIndexedNV)load("glScissorIndexedNV"); fp_glScissorIndexedvNV = (pfn_glScissorIndexedvNV)load("glScissorIndexedvNV"); fp_glDepthRangeArrayfvNV = (pfn_glDepthRangeArrayfvNV)load("glDepthRangeArrayfvNV"); fp_glDepthRangeIndexedfNV = (pfn_glDepthRangeIndexedfNV)load("glDepthRangeIndexedfNV"); fp_glGetFloati_vNV = (pfn_glGetFloati_vNV)load("glGetFloati_vNV"); fp_glEnableiNV = (pfn_glEnableiNV)load("glEnableiNV"); fp_glDisableiNV = (pfn_glDisableiNV)load("glDisableiNV"); fp_glIsEnablediNV = (pfn_glIsEnablediNV)load("glIsEnablediNV"); } GLboolean GLAD_NV_viewport_array2 = GL_FALSE; GLboolean GLAD_NVX_conditional_render = GL_FALSE; static void load_GL_NVX_conditional_render(LOADER load) { if(!GLAD_NVX_conditional_render) return; fp_glBeginConditionalRenderNVX = (pfn_glBeginConditionalRenderNVX)load("glBeginConditionalRenderNVX"); fp_glEndConditionalRenderNVX = (pfn_glEndConditionalRenderNVX)load("glEndConditionalRenderNVX"); } GLboolean GLAD_NVX_gpu_memory_info = GL_FALSE; GLboolean GLAD_OVR_multiview = GL_FALSE; static void load_GL_OVR_multiview(LOADER load) { if(!GLAD_OVR_multiview) return; fp_glFramebufferTextureMultiviewOVR = (pfn_glFramebufferTextureMultiviewOVR)load("glFramebufferTextureMultiviewOVR"); } GLboolean GLAD_OVR_multiview2 = GL_FALSE; GLboolean GLAD_OVR_multiview_multisampled_render_to_texture = GL_FALSE; static void load_GL_OVR_multiview_multisampled_render_to_texture(LOADER load) { if(!GLAD_OVR_multiview_multisampled_render_to_texture) return; fp_glFramebufferTextureMultisampleMultiviewOVR = (pfn_glFramebufferTextureMultisampleMultiviewOVR)load("glFramebufferTextureMultisampleMultiviewOVR"); } GLboolean GLAD_QCOM_alpha_test = GL_FALSE; static void load_GL_QCOM_alpha_test(LOADER load) { if(!GLAD_QCOM_alpha_test) return; fp_glAlphaFuncQCOM = (pfn_glAlphaFuncQCOM)load("glAlphaFuncQCOM"); } GLboolean GLAD_QCOM_binning_control = GL_FALSE; GLboolean GLAD_QCOM_driver_control = GL_FALSE; static void load_GL_QCOM_driver_control(LOADER load) { if(!GLAD_QCOM_driver_control) return; fp_glGetDriverControlsQCOM = (pfn_glGetDriverControlsQCOM)load("glGetDriverControlsQCOM"); fp_glGetDriverControlStringQCOM = (pfn_glGetDriverControlStringQCOM)load("glGetDriverControlStringQCOM"); fp_glEnableDriverControlQCOM = (pfn_glEnableDriverControlQCOM)load("glEnableDriverControlQCOM"); fp_glDisableDriverControlQCOM = (pfn_glDisableDriverControlQCOM)load("glDisableDriverControlQCOM"); } GLboolean GLAD_QCOM_extended_get = GL_FALSE; static void load_GL_QCOM_extended_get(LOADER load) { if(!GLAD_QCOM_extended_get) return; fp_glExtGetTexturesQCOM = (pfn_glExtGetTexturesQCOM)load("glExtGetTexturesQCOM"); fp_glExtGetBuffersQCOM = (pfn_glExtGetBuffersQCOM)load("glExtGetBuffersQCOM"); fp_glExtGetRenderbuffersQCOM = (pfn_glExtGetRenderbuffersQCOM)load("glExtGetRenderbuffersQCOM"); fp_glExtGetFramebuffersQCOM = (pfn_glExtGetFramebuffersQCOM)load("glExtGetFramebuffersQCOM"); fp_glExtGetTexLevelParameterivQCOM = (pfn_glExtGetTexLevelParameterivQCOM)load("glExtGetTexLevelParameterivQCOM"); fp_glExtTexObjectStateOverrideiQCOM = (pfn_glExtTexObjectStateOverrideiQCOM)load("glExtTexObjectStateOverrideiQCOM"); fp_glExtGetTexSubImageQCOM = (pfn_glExtGetTexSubImageQCOM)load("glExtGetTexSubImageQCOM"); fp_glExtGetBufferPointervQCOM = (pfn_glExtGetBufferPointervQCOM)load("glExtGetBufferPointervQCOM"); } GLboolean GLAD_QCOM_extended_get2 = GL_FALSE; static void load_GL_QCOM_extended_get2(LOADER load) { if(!GLAD_QCOM_extended_get2) return; fp_glExtGetShadersQCOM = (pfn_glExtGetShadersQCOM)load("glExtGetShadersQCOM"); fp_glExtGetProgramsQCOM = (pfn_glExtGetProgramsQCOM)load("glExtGetProgramsQCOM"); fp_glExtIsProgramBinaryQCOM = (pfn_glExtIsProgramBinaryQCOM)load("glExtIsProgramBinaryQCOM"); fp_glExtGetProgramBinarySourceQCOM = (pfn_glExtGetProgramBinarySourceQCOM)load("glExtGetProgramBinarySourceQCOM"); } GLboolean GLAD_QCOM_perfmon_global_mode = GL_FALSE; GLboolean GLAD_QCOM_tiled_rendering = GL_FALSE; static void load_GL_QCOM_tiled_rendering(LOADER load) { if(!GLAD_QCOM_tiled_rendering) return; fp_glStartTilingQCOM = (pfn_glStartTilingQCOM)load("glStartTilingQCOM"); fp_glEndTilingQCOM = (pfn_glEndTilingQCOM)load("glEndTilingQCOM"); } GLboolean GLAD_QCOM_writeonly_rendering = GL_FALSE; GLboolean GLAD_VIV_shader_binary = GL_FALSE; static void find_extensions(void) { GLAD_KHR_blend_equation_advanced = has_ext("GL_KHR_blend_equation_advanced"); GLAD_KHR_blend_equation_advanced_coherent = has_ext("GL_KHR_blend_equation_advanced_coherent"); GLAD_KHR_context_flush_control = has_ext("GL_KHR_context_flush_control"); GLAD_KHR_debug = has_ext("GL_KHR_debug"); GLAD_KHR_no_error = has_ext("GL_KHR_no_error"); GLAD_KHR_robust_buffer_access_behavior = has_ext("GL_KHR_robust_buffer_access_behavior"); GLAD_KHR_robustness = has_ext("GL_KHR_robustness"); GLAD_KHR_texture_compression_astc_hdr = has_ext("GL_KHR_texture_compression_astc_hdr"); GLAD_KHR_texture_compression_astc_ldr = has_ext("GL_KHR_texture_compression_astc_ldr"); GLAD_KHR_texture_compression_astc_sliced_3d = has_ext("GL_KHR_texture_compression_astc_sliced_3d"); GLAD_ARB_arrays_of_arrays = has_ext("GL_ARB_arrays_of_arrays"); GLAD_ARB_base_instance = has_ext("GL_ARB_base_instance"); GLAD_ARB_bindless_texture = has_ext("GL_ARB_bindless_texture"); GLAD_ARB_blend_func_extended = has_ext("GL_ARB_blend_func_extended"); GLAD_ARB_buffer_storage = has_ext("GL_ARB_buffer_storage"); GLAD_ARB_cl_event = has_ext("GL_ARB_cl_event"); GLAD_ARB_clear_buffer_object = has_ext("GL_ARB_clear_buffer_object"); GLAD_ARB_clear_texture = has_ext("GL_ARB_clear_texture"); GLAD_ARB_clip_control = has_ext("GL_ARB_clip_control"); GLAD_ARB_color_buffer_float = has_ext("GL_ARB_color_buffer_float"); GLAD_ARB_compatibility = has_ext("GL_ARB_compatibility"); GLAD_ARB_compressed_texture_pixel_storage = has_ext("GL_ARB_compressed_texture_pixel_storage"); GLAD_ARB_compute_shader = has_ext("GL_ARB_compute_shader"); GLAD_ARB_compute_variable_group_size = has_ext("GL_ARB_compute_variable_group_size"); GLAD_ARB_conditional_render_inverted = has_ext("GL_ARB_conditional_render_inverted"); GLAD_ARB_conservative_depth = has_ext("GL_ARB_conservative_depth"); GLAD_ARB_copy_buffer = has_ext("GL_ARB_copy_buffer"); GLAD_ARB_copy_image = has_ext("GL_ARB_copy_image"); GLAD_ARB_cull_distance = has_ext("GL_ARB_cull_distance"); GLAD_ARB_debug_output = has_ext("GL_ARB_debug_output"); GLAD_ARB_depth_buffer_float = has_ext("GL_ARB_depth_buffer_float"); GLAD_ARB_depth_clamp = has_ext("GL_ARB_depth_clamp"); GLAD_ARB_derivative_control = has_ext("GL_ARB_derivative_control"); GLAD_ARB_direct_state_access = has_ext("GL_ARB_direct_state_access"); GLAD_ARB_draw_buffers_blend = has_ext("GL_ARB_draw_buffers_blend"); GLAD_ARB_draw_elements_base_vertex = has_ext("GL_ARB_draw_elements_base_vertex"); GLAD_ARB_draw_indirect = has_ext("GL_ARB_draw_indirect"); GLAD_ARB_draw_instanced = has_ext("GL_ARB_draw_instanced"); GLAD_ARB_enhanced_layouts = has_ext("GL_ARB_enhanced_layouts"); GLAD_ARB_ES2_compatibility = has_ext("GL_ARB_ES2_compatibility"); GLAD_ARB_ES3_1_compatibility = has_ext("GL_ARB_ES3_1_compatibility"); GLAD_ARB_ES3_2_compatibility = has_ext("GL_ARB_ES3_2_compatibility"); GLAD_ARB_ES3_compatibility = has_ext("GL_ARB_ES3_compatibility"); GLAD_ARB_explicit_attrib_location = has_ext("GL_ARB_explicit_attrib_location"); GLAD_ARB_explicit_uniform_location = has_ext("GL_ARB_explicit_uniform_location"); GLAD_ARB_fragment_coord_conventions = has_ext("GL_ARB_fragment_coord_conventions"); GLAD_ARB_fragment_layer_viewport = has_ext("GL_ARB_fragment_layer_viewport"); GLAD_ARB_fragment_shader_interlock = has_ext("GL_ARB_fragment_shader_interlock"); GLAD_ARB_framebuffer_no_attachments = has_ext("GL_ARB_framebuffer_no_attachments"); GLAD_ARB_framebuffer_object = has_ext("GL_ARB_framebuffer_object"); GLAD_ARB_framebuffer_sRGB = has_ext("GL_ARB_framebuffer_sRGB"); GLAD_ARB_geometry_shader4 = has_ext("GL_ARB_geometry_shader4"); GLAD_ARB_get_program_binary = has_ext("GL_ARB_get_program_binary"); GLAD_ARB_get_texture_sub_image = has_ext("GL_ARB_get_texture_sub_image"); GLAD_ARB_gpu_shader5 = has_ext("GL_ARB_gpu_shader5"); GLAD_ARB_gpu_shader_fp64 = has_ext("GL_ARB_gpu_shader_fp64"); GLAD_ARB_gpu_shader_int64 = has_ext("GL_ARB_gpu_shader_int64"); GLAD_ARB_half_float_pixel = has_ext("GL_ARB_half_float_pixel"); GLAD_ARB_half_float_vertex = has_ext("GL_ARB_half_float_vertex"); GLAD_ARB_indirect_parameters = has_ext("GL_ARB_indirect_parameters"); GLAD_ARB_instanced_arrays = has_ext("GL_ARB_instanced_arrays"); GLAD_ARB_internalformat_query = has_ext("GL_ARB_internalformat_query"); GLAD_ARB_internalformat_query2 = has_ext("GL_ARB_internalformat_query2"); GLAD_ARB_invalidate_subdata = has_ext("GL_ARB_invalidate_subdata"); GLAD_ARB_map_buffer_alignment = has_ext("GL_ARB_map_buffer_alignment"); GLAD_ARB_map_buffer_range = has_ext("GL_ARB_map_buffer_range"); GLAD_ARB_multi_bind = has_ext("GL_ARB_multi_bind"); GLAD_ARB_multi_draw_indirect = has_ext("GL_ARB_multi_draw_indirect"); GLAD_ARB_occlusion_query2 = has_ext("GL_ARB_occlusion_query2"); GLAD_ARB_parallel_shader_compile = has_ext("GL_ARB_parallel_shader_compile"); GLAD_ARB_pipeline_statistics_query = has_ext("GL_ARB_pipeline_statistics_query"); GLAD_ARB_pixel_buffer_object = has_ext("GL_ARB_pixel_buffer_object"); GLAD_ARB_post_depth_coverage = has_ext("GL_ARB_post_depth_coverage"); GLAD_ARB_program_interface_query = has_ext("GL_ARB_program_interface_query"); GLAD_ARB_provoking_vertex = has_ext("GL_ARB_provoking_vertex"); GLAD_ARB_query_buffer_object = has_ext("GL_ARB_query_buffer_object"); GLAD_ARB_robust_buffer_access_behavior = has_ext("GL_ARB_robust_buffer_access_behavior"); GLAD_ARB_robustness = has_ext("GL_ARB_robustness"); GLAD_ARB_robustness_isolation = has_ext("GL_ARB_robustness_isolation"); GLAD_ARB_sample_locations = has_ext("GL_ARB_sample_locations"); GLAD_ARB_sample_shading = has_ext("GL_ARB_sample_shading"); GLAD_ARB_sampler_objects = has_ext("GL_ARB_sampler_objects"); GLAD_ARB_seamless_cube_map = has_ext("GL_ARB_seamless_cube_map"); GLAD_ARB_seamless_cubemap_per_texture = has_ext("GL_ARB_seamless_cubemap_per_texture"); GLAD_ARB_separate_shader_objects = has_ext("GL_ARB_separate_shader_objects"); GLAD_ARB_shader_atomic_counter_ops = has_ext("GL_ARB_shader_atomic_counter_ops"); GLAD_ARB_shader_atomic_counters = has_ext("GL_ARB_shader_atomic_counters"); GLAD_ARB_shader_ballot = has_ext("GL_ARB_shader_ballot"); GLAD_ARB_shader_bit_encoding = has_ext("GL_ARB_shader_bit_encoding"); GLAD_ARB_shader_clock = has_ext("GL_ARB_shader_clock"); GLAD_ARB_shader_draw_parameters = has_ext("GL_ARB_shader_draw_parameters"); GLAD_ARB_shader_group_vote = has_ext("GL_ARB_shader_group_vote"); GLAD_ARB_shader_image_load_store = has_ext("GL_ARB_shader_image_load_store"); GLAD_ARB_shader_image_size = has_ext("GL_ARB_shader_image_size"); GLAD_ARB_shader_precision = has_ext("GL_ARB_shader_precision"); GLAD_ARB_shader_stencil_export = has_ext("GL_ARB_shader_stencil_export"); GLAD_ARB_shader_storage_buffer_object = has_ext("GL_ARB_shader_storage_buffer_object"); GLAD_ARB_shader_subroutine = has_ext("GL_ARB_shader_subroutine"); GLAD_ARB_shader_texture_image_samples = has_ext("GL_ARB_shader_texture_image_samples"); GLAD_ARB_shader_texture_lod = has_ext("GL_ARB_shader_texture_lod"); GLAD_ARB_shader_viewport_layer_array = has_ext("GL_ARB_shader_viewport_layer_array"); GLAD_ARB_shading_language_420pack = has_ext("GL_ARB_shading_language_420pack"); GLAD_ARB_shading_language_include = has_ext("GL_ARB_shading_language_include"); GLAD_ARB_shading_language_packing = has_ext("GL_ARB_shading_language_packing"); GLAD_ARB_sparse_buffer = has_ext("GL_ARB_sparse_buffer"); GLAD_ARB_sparse_texture = has_ext("GL_ARB_sparse_texture"); GLAD_ARB_sparse_texture2 = has_ext("GL_ARB_sparse_texture2"); GLAD_ARB_sparse_texture_clamp = has_ext("GL_ARB_sparse_texture_clamp"); GLAD_ARB_stencil_texturing = has_ext("GL_ARB_stencil_texturing"); GLAD_ARB_sync = has_ext("GL_ARB_sync"); GLAD_ARB_tessellation_shader = has_ext("GL_ARB_tessellation_shader"); GLAD_ARB_texture_barrier = has_ext("GL_ARB_texture_barrier"); GLAD_ARB_texture_buffer_object = has_ext("GL_ARB_texture_buffer_object"); GLAD_ARB_texture_buffer_object_rgb32 = has_ext("GL_ARB_texture_buffer_object_rgb32"); GLAD_ARB_texture_buffer_range = has_ext("GL_ARB_texture_buffer_range"); GLAD_ARB_texture_compression_bptc = has_ext("GL_ARB_texture_compression_bptc"); GLAD_ARB_texture_compression_rgtc = has_ext("GL_ARB_texture_compression_rgtc"); GLAD_ARB_texture_cube_map_array = has_ext("GL_ARB_texture_cube_map_array"); GLAD_ARB_texture_filter_minmax = has_ext("GL_ARB_texture_filter_minmax"); GLAD_ARB_texture_float = has_ext("GL_ARB_texture_float"); GLAD_ARB_texture_gather = has_ext("GL_ARB_texture_gather"); GLAD_ARB_texture_mirror_clamp_to_edge = has_ext("GL_ARB_texture_mirror_clamp_to_edge"); GLAD_ARB_texture_multisample = has_ext("GL_ARB_texture_multisample"); GLAD_ARB_texture_query_levels = has_ext("GL_ARB_texture_query_levels"); GLAD_ARB_texture_query_lod = has_ext("GL_ARB_texture_query_lod"); GLAD_ARB_texture_rectangle = has_ext("GL_ARB_texture_rectangle"); GLAD_ARB_texture_rg = has_ext("GL_ARB_texture_rg"); GLAD_ARB_texture_rgb10_a2ui = has_ext("GL_ARB_texture_rgb10_a2ui"); GLAD_ARB_texture_stencil8 = has_ext("GL_ARB_texture_stencil8"); GLAD_ARB_texture_storage = has_ext("GL_ARB_texture_storage"); GLAD_ARB_texture_storage_multisample = has_ext("GL_ARB_texture_storage_multisample"); GLAD_ARB_texture_swizzle = has_ext("GL_ARB_texture_swizzle"); GLAD_ARB_texture_view = has_ext("GL_ARB_texture_view"); GLAD_ARB_timer_query = has_ext("GL_ARB_timer_query"); GLAD_ARB_transform_feedback2 = has_ext("GL_ARB_transform_feedback2"); GLAD_ARB_transform_feedback3 = has_ext("GL_ARB_transform_feedback3"); GLAD_ARB_transform_feedback_instanced = has_ext("GL_ARB_transform_feedback_instanced"); GLAD_ARB_transform_feedback_overflow_query = has_ext("GL_ARB_transform_feedback_overflow_query"); GLAD_ARB_uniform_buffer_object = has_ext("GL_ARB_uniform_buffer_object"); GLAD_ARB_vertex_array_bgra = has_ext("GL_ARB_vertex_array_bgra"); GLAD_ARB_vertex_array_object = has_ext("GL_ARB_vertex_array_object"); GLAD_ARB_vertex_attrib_64bit = has_ext("GL_ARB_vertex_attrib_64bit"); GLAD_ARB_vertex_attrib_binding = has_ext("GL_ARB_vertex_attrib_binding"); GLAD_ARB_vertex_type_10f_11f_11f_rev = has_ext("GL_ARB_vertex_type_10f_11f_11f_rev"); GLAD_ARB_vertex_type_2_10_10_10_rev = has_ext("GL_ARB_vertex_type_2_10_10_10_rev"); GLAD_ARB_viewport_array = has_ext("GL_ARB_viewport_array"); GLAD_EXT_base_instance = has_ext("GL_EXT_base_instance"); GLAD_EXT_bgra = has_ext("GL_EXT_bgra"); GLAD_EXT_bindable_uniform = has_ext("GL_EXT_bindable_uniform"); GLAD_EXT_blend_func_extended = has_ext("GL_EXT_blend_func_extended"); GLAD_EXT_blend_minmax = has_ext("GL_EXT_blend_minmax"); GLAD_EXT_buffer_storage = has_ext("GL_EXT_buffer_storage"); GLAD_EXT_color_buffer_float = has_ext("GL_EXT_color_buffer_float"); GLAD_EXT_color_buffer_half_float = has_ext("GL_EXT_color_buffer_half_float"); GLAD_EXT_copy_image = has_ext("GL_EXT_copy_image"); GLAD_EXT_debug_label = has_ext("GL_EXT_debug_label"); GLAD_EXT_debug_marker = has_ext("GL_EXT_debug_marker"); GLAD_EXT_direct_state_access = has_ext("GL_EXT_direct_state_access"); GLAD_EXT_discard_framebuffer = has_ext("GL_EXT_discard_framebuffer"); GLAD_EXT_disjoint_timer_query = has_ext("GL_EXT_disjoint_timer_query"); GLAD_EXT_draw_buffers = has_ext("GL_EXT_draw_buffers"); GLAD_EXT_draw_buffers2 = has_ext("GL_EXT_draw_buffers2"); GLAD_EXT_draw_buffers_indexed = has_ext("GL_EXT_draw_buffers_indexed"); GLAD_EXT_draw_elements_base_vertex = has_ext("GL_EXT_draw_elements_base_vertex"); GLAD_EXT_draw_instanced = has_ext("GL_EXT_draw_instanced"); GLAD_EXT_float_blend = has_ext("GL_EXT_float_blend"); GLAD_EXT_framebuffer_blit = has_ext("GL_EXT_framebuffer_blit"); GLAD_EXT_framebuffer_multisample = has_ext("GL_EXT_framebuffer_multisample"); GLAD_EXT_framebuffer_multisample_blit_scaled = has_ext("GL_EXT_framebuffer_multisample_blit_scaled"); GLAD_EXT_framebuffer_object = has_ext("GL_EXT_framebuffer_object"); GLAD_EXT_framebuffer_sRGB = has_ext("GL_EXT_framebuffer_sRGB"); GLAD_EXT_geometry_point_size = has_ext("GL_EXT_geometry_point_size"); GLAD_EXT_geometry_shader = has_ext("GL_EXT_geometry_shader"); GLAD_EXT_geometry_shader4 = has_ext("GL_EXT_geometry_shader4"); GLAD_EXT_gpu_program_parameters = has_ext("GL_EXT_gpu_program_parameters"); GLAD_EXT_gpu_shader4 = has_ext("GL_EXT_gpu_shader4"); GLAD_EXT_gpu_shader5 = has_ext("GL_EXT_gpu_shader5"); GLAD_EXT_instanced_arrays = has_ext("GL_EXT_instanced_arrays"); GLAD_EXT_map_buffer_range = has_ext("GL_EXT_map_buffer_range"); GLAD_EXT_multi_draw_indirect = has_ext("GL_EXT_multi_draw_indirect"); GLAD_EXT_multisampled_compatibility = has_ext("GL_EXT_multisampled_compatibility"); GLAD_EXT_multisampled_render_to_texture = has_ext("GL_EXT_multisampled_render_to_texture"); GLAD_EXT_multiview_draw_buffers = has_ext("GL_EXT_multiview_draw_buffers"); GLAD_EXT_occlusion_query_boolean = has_ext("GL_EXT_occlusion_query_boolean"); GLAD_EXT_packed_depth_stencil = has_ext("GL_EXT_packed_depth_stencil"); GLAD_EXT_packed_float = has_ext("GL_EXT_packed_float"); GLAD_EXT_pixel_buffer_object = has_ext("GL_EXT_pixel_buffer_object"); GLAD_EXT_polygon_offset_clamp = has_ext("GL_EXT_polygon_offset_clamp"); GLAD_EXT_post_depth_coverage = has_ext("GL_EXT_post_depth_coverage"); GLAD_EXT_primitive_bounding_box = has_ext("GL_EXT_primitive_bounding_box"); GLAD_EXT_provoking_vertex = has_ext("GL_EXT_provoking_vertex"); GLAD_EXT_pvrtc_sRGB = has_ext("GL_EXT_pvrtc_sRGB"); GLAD_EXT_raster_multisample = has_ext("GL_EXT_raster_multisample"); GLAD_EXT_read_format_bgra = has_ext("GL_EXT_read_format_bgra"); GLAD_EXT_render_snorm = has_ext("GL_EXT_render_snorm"); GLAD_EXT_robustness = has_ext("GL_EXT_robustness"); GLAD_EXT_separate_shader_objects = has_ext("GL_EXT_separate_shader_objects"); GLAD_EXT_shader_framebuffer_fetch = has_ext("GL_EXT_shader_framebuffer_fetch"); GLAD_EXT_shader_image_load_formatted = has_ext("GL_EXT_shader_image_load_formatted"); GLAD_EXT_shader_image_load_store = has_ext("GL_EXT_shader_image_load_store"); GLAD_EXT_shader_implicit_conversions = has_ext("GL_EXT_shader_implicit_conversions"); GLAD_EXT_shader_integer_mix = has_ext("GL_EXT_shader_integer_mix"); GLAD_EXT_shader_io_blocks = has_ext("GL_EXT_shader_io_blocks"); GLAD_EXT_shader_pixel_local_storage = has_ext("GL_EXT_shader_pixel_local_storage"); GLAD_EXT_shader_texture_lod = has_ext("GL_EXT_shader_texture_lod"); GLAD_EXT_shadow_samplers = has_ext("GL_EXT_shadow_samplers"); GLAD_EXT_sparse_texture = has_ext("GL_EXT_sparse_texture"); GLAD_EXT_sparse_texture2 = has_ext("GL_EXT_sparse_texture2"); GLAD_EXT_sRGB = has_ext("GL_EXT_sRGB"); GLAD_EXT_sRGB_write_control = has_ext("GL_EXT_sRGB_write_control"); GLAD_EXT_stencil_clear_tag = has_ext("GL_EXT_stencil_clear_tag"); GLAD_EXT_tessellation_point_size = has_ext("GL_EXT_tessellation_point_size"); GLAD_EXT_tessellation_shader = has_ext("GL_EXT_tessellation_shader"); GLAD_EXT_texture_array = has_ext("GL_EXT_texture_array"); GLAD_EXT_texture_border_clamp = has_ext("GL_EXT_texture_border_clamp"); GLAD_EXT_texture_buffer = has_ext("GL_EXT_texture_buffer"); GLAD_EXT_texture_buffer_object = has_ext("GL_EXT_texture_buffer_object"); GLAD_EXT_texture_compression_dxt1 = has_ext("GL_EXT_texture_compression_dxt1"); GLAD_EXT_texture_compression_latc = has_ext("GL_EXT_texture_compression_latc"); GLAD_EXT_texture_compression_rgtc = has_ext("GL_EXT_texture_compression_rgtc"); GLAD_EXT_texture_compression_s3tc = has_ext("GL_EXT_texture_compression_s3tc"); GLAD_EXT_texture_cube_map = has_ext("GL_EXT_texture_cube_map"); GLAD_EXT_texture_cube_map_array = has_ext("GL_EXT_texture_cube_map_array"); GLAD_EXT_texture_filter_anisotropic = has_ext("GL_EXT_texture_filter_anisotropic"); GLAD_EXT_texture_filter_minmax = has_ext("GL_EXT_texture_filter_minmax"); GLAD_EXT_texture_format_BGRA8888 = has_ext("GL_EXT_texture_format_BGRA8888"); GLAD_EXT_texture_integer = has_ext("GL_EXT_texture_integer"); GLAD_EXT_texture_norm16 = has_ext("GL_EXT_texture_norm16"); GLAD_EXT_texture_rg = has_ext("GL_EXT_texture_rg"); GLAD_EXT_texture_shared_exponent = has_ext("GL_EXT_texture_shared_exponent"); GLAD_EXT_texture_snorm = has_ext("GL_EXT_texture_snorm"); GLAD_EXT_texture_sRGB = has_ext("GL_EXT_texture_sRGB"); GLAD_EXT_texture_sRGB_decode = has_ext("GL_EXT_texture_sRGB_decode"); GLAD_EXT_texture_sRGB_R8 = has_ext("GL_EXT_texture_sRGB_R8"); GLAD_EXT_texture_sRGB_RG8 = has_ext("GL_EXT_texture_sRGB_RG8"); GLAD_EXT_texture_storage = has_ext("GL_EXT_texture_storage"); GLAD_EXT_texture_swizzle = has_ext("GL_EXT_texture_swizzle"); GLAD_EXT_texture_type_2_10_10_10_REV = has_ext("GL_EXT_texture_type_2_10_10_10_REV"); GLAD_EXT_texture_view = has_ext("GL_EXT_texture_view"); GLAD_EXT_timer_query = has_ext("GL_EXT_timer_query"); GLAD_EXT_transform_feedback = has_ext("GL_EXT_transform_feedback"); GLAD_EXT_unpack_subimage = has_ext("GL_EXT_unpack_subimage"); GLAD_EXT_vertex_array_bgra = has_ext("GL_EXT_vertex_array_bgra"); GLAD_EXT_vertex_attrib_64bit = has_ext("GL_EXT_vertex_attrib_64bit"); GLAD_EXT_x11_sync_object = has_ext("GL_EXT_x11_sync_object"); GLAD_EXT_YUV_target = has_ext("GL_EXT_YUV_target"); GLAD_OES_compressed_ETC1_RGB8_sub_texture = has_ext("GL_OES_compressed_ETC1_RGB8_sub_texture"); GLAD_OES_compressed_ETC1_RGB8_texture = has_ext("GL_OES_compressed_ETC1_RGB8_texture"); GLAD_OES_copy_image = has_ext("GL_OES_copy_image"); GLAD_OES_depth24 = has_ext("GL_OES_depth24"); GLAD_OES_depth32 = has_ext("GL_OES_depth32"); GLAD_OES_depth_texture = has_ext("GL_OES_depth_texture"); GLAD_OES_draw_buffers_indexed = has_ext("GL_OES_draw_buffers_indexed"); GLAD_OES_draw_elements_base_vertex = has_ext("GL_OES_draw_elements_base_vertex"); GLAD_OES_EGL_image = has_ext("GL_OES_EGL_image"); GLAD_OES_EGL_image_external = has_ext("GL_OES_EGL_image_external"); GLAD_OES_EGL_image_external_essl3 = has_ext("GL_OES_EGL_image_external_essl3"); GLAD_OES_element_index_uint = has_ext("GL_OES_element_index_uint"); GLAD_OES_fbo_render_mipmap = has_ext("GL_OES_fbo_render_mipmap"); GLAD_OES_fragment_precision_high = has_ext("GL_OES_fragment_precision_high"); GLAD_OES_geometry_point_size = has_ext("GL_OES_geometry_point_size"); GLAD_OES_geometry_shader = has_ext("GL_OES_geometry_shader"); GLAD_OES_get_program_binary = has_ext("GL_OES_get_program_binary"); GLAD_OES_gpu_shader5 = has_ext("GL_OES_gpu_shader5"); GLAD_OES_mapbuffer = has_ext("GL_OES_mapbuffer"); GLAD_OES_packed_depth_stencil = has_ext("GL_OES_packed_depth_stencil"); GLAD_OES_primitive_bounding_box = has_ext("GL_OES_primitive_bounding_box"); GLAD_OES_required_internalformat = has_ext("GL_OES_required_internalformat"); GLAD_OES_rgb8_rgba8 = has_ext("GL_OES_rgb8_rgba8"); GLAD_OES_sample_shading = has_ext("GL_OES_sample_shading"); GLAD_OES_sample_variables = has_ext("GL_OES_sample_variables"); GLAD_OES_shader_image_atomic = has_ext("GL_OES_shader_image_atomic"); GLAD_OES_shader_io_blocks = has_ext("GL_OES_shader_io_blocks"); GLAD_OES_shader_multisample_interpolation = has_ext("GL_OES_shader_multisample_interpolation"); GLAD_OES_standard_derivatives = has_ext("GL_OES_standard_derivatives"); GLAD_OES_stencil1 = has_ext("GL_OES_stencil1"); GLAD_OES_stencil4 = has_ext("GL_OES_stencil4"); GLAD_OES_surfaceless_context = has_ext("GL_OES_surfaceless_context"); GLAD_OES_tessellation_point_size = has_ext("GL_OES_tessellation_point_size"); GLAD_OES_tessellation_shader = has_ext("GL_OES_tessellation_shader"); GLAD_OES_texture_3D = has_ext("GL_OES_texture_3D"); GLAD_OES_texture_border_clamp = has_ext("GL_OES_texture_border_clamp"); GLAD_OES_texture_buffer = has_ext("GL_OES_texture_buffer"); GLAD_OES_texture_compression_astc = has_ext("GL_OES_texture_compression_astc"); GLAD_OES_texture_cube_map_array = has_ext("GL_OES_texture_cube_map_array"); GLAD_OES_texture_float = has_ext("GL_OES_texture_float"); GLAD_OES_texture_float_linear = has_ext("GL_OES_texture_float_linear"); GLAD_OES_texture_half_float = has_ext("GL_OES_texture_half_float"); GLAD_OES_texture_half_float_linear = has_ext("GL_OES_texture_half_float_linear"); GLAD_OES_texture_npot = has_ext("GL_OES_texture_npot"); GLAD_OES_texture_stencil8 = has_ext("GL_OES_texture_stencil8"); GLAD_OES_texture_storage_multisample_2d_array = has_ext("GL_OES_texture_storage_multisample_2d_array"); GLAD_OES_texture_view = has_ext("GL_OES_texture_view"); GLAD_OES_vertex_array_object = has_ext("GL_OES_vertex_array_object"); GLAD_OES_vertex_half_float = has_ext("GL_OES_vertex_half_float"); GLAD_OES_vertex_type_10_10_10_2 = has_ext("GL_OES_vertex_type_10_10_10_2"); GLAD_AMD_blend_minmax_factor = has_ext("GL_AMD_blend_minmax_factor"); GLAD_AMD_compressed_3DC_texture = has_ext("GL_AMD_compressed_3DC_texture"); GLAD_AMD_compressed_ATC_texture = has_ext("GL_AMD_compressed_ATC_texture"); GLAD_AMD_conservative_depth = has_ext("GL_AMD_conservative_depth"); GLAD_AMD_debug_output = has_ext("GL_AMD_debug_output"); GLAD_AMD_depth_clamp_separate = has_ext("GL_AMD_depth_clamp_separate"); GLAD_AMD_draw_buffers_blend = has_ext("GL_AMD_draw_buffers_blend"); GLAD_AMD_gcn_shader = has_ext("GL_AMD_gcn_shader"); GLAD_AMD_gpu_shader_int64 = has_ext("GL_AMD_gpu_shader_int64"); GLAD_AMD_interleaved_elements = has_ext("GL_AMD_interleaved_elements"); GLAD_AMD_multi_draw_indirect = has_ext("GL_AMD_multi_draw_indirect"); GLAD_AMD_name_gen_delete = has_ext("GL_AMD_name_gen_delete"); GLAD_AMD_occlusion_query_event = has_ext("GL_AMD_occlusion_query_event"); GLAD_AMD_performance_monitor = has_ext("GL_AMD_performance_monitor"); GLAD_AMD_pinned_memory = has_ext("GL_AMD_pinned_memory"); GLAD_AMD_program_binary_Z400 = has_ext("GL_AMD_program_binary_Z400"); GLAD_AMD_query_buffer_object = has_ext("GL_AMD_query_buffer_object"); GLAD_AMD_sample_positions = has_ext("GL_AMD_sample_positions"); GLAD_AMD_seamless_cubemap_per_texture = has_ext("GL_AMD_seamless_cubemap_per_texture"); GLAD_AMD_shader_atomic_counter_ops = has_ext("GL_AMD_shader_atomic_counter_ops"); GLAD_AMD_shader_stencil_export = has_ext("GL_AMD_shader_stencil_export"); GLAD_AMD_shader_trinary_minmax = has_ext("GL_AMD_shader_trinary_minmax"); GLAD_AMD_sparse_texture = has_ext("GL_AMD_sparse_texture"); GLAD_AMD_stencil_operation_extended = has_ext("GL_AMD_stencil_operation_extended"); GLAD_AMD_texture_texture4 = has_ext("GL_AMD_texture_texture4"); GLAD_AMD_transform_feedback3_lines_triangles = has_ext("GL_AMD_transform_feedback3_lines_triangles"); GLAD_AMD_transform_feedback4 = has_ext("GL_AMD_transform_feedback4"); GLAD_AMD_vertex_shader_layer = has_ext("GL_AMD_vertex_shader_layer"); GLAD_AMD_vertex_shader_tessellator = has_ext("GL_AMD_vertex_shader_tessellator"); GLAD_AMD_vertex_shader_viewport_index = has_ext("GL_AMD_vertex_shader_viewport_index"); GLAD_ANDROID_extension_pack_es31a = has_ext("GL_ANDROID_extension_pack_es31a"); GLAD_ANGLE_depth_texture = has_ext("GL_ANGLE_depth_texture"); GLAD_ANGLE_framebuffer_blit = has_ext("GL_ANGLE_framebuffer_blit"); GLAD_ANGLE_framebuffer_multisample = has_ext("GL_ANGLE_framebuffer_multisample"); GLAD_ANGLE_instanced_arrays = has_ext("GL_ANGLE_instanced_arrays"); GLAD_ANGLE_pack_reverse_row_order = has_ext("GL_ANGLE_pack_reverse_row_order"); GLAD_ANGLE_program_binary = has_ext("GL_ANGLE_program_binary"); GLAD_ANGLE_texture_compression_dxt3 = has_ext("GL_ANGLE_texture_compression_dxt3"); GLAD_ANGLE_texture_compression_dxt5 = has_ext("GL_ANGLE_texture_compression_dxt5"); GLAD_ANGLE_texture_usage = has_ext("GL_ANGLE_texture_usage"); GLAD_ANGLE_translated_shader_source = has_ext("GL_ANGLE_translated_shader_source"); GLAD_APPLE_aux_depth_stencil = has_ext("GL_APPLE_aux_depth_stencil"); GLAD_APPLE_client_storage = has_ext("GL_APPLE_client_storage"); GLAD_APPLE_clip_distance = has_ext("GL_APPLE_clip_distance"); GLAD_APPLE_color_buffer_packed_float = has_ext("GL_APPLE_color_buffer_packed_float"); GLAD_APPLE_copy_texture_levels = has_ext("GL_APPLE_copy_texture_levels"); GLAD_APPLE_element_array = has_ext("GL_APPLE_element_array"); GLAD_APPLE_fence = has_ext("GL_APPLE_fence"); GLAD_APPLE_float_pixels = has_ext("GL_APPLE_float_pixels"); GLAD_APPLE_flush_buffer_range = has_ext("GL_APPLE_flush_buffer_range"); GLAD_APPLE_framebuffer_multisample = has_ext("GL_APPLE_framebuffer_multisample"); GLAD_APPLE_object_purgeable = has_ext("GL_APPLE_object_purgeable"); GLAD_APPLE_rgb_422 = has_ext("GL_APPLE_rgb_422"); GLAD_APPLE_row_bytes = has_ext("GL_APPLE_row_bytes"); GLAD_APPLE_sync = has_ext("GL_APPLE_sync"); GLAD_APPLE_texture_format_BGRA8888 = has_ext("GL_APPLE_texture_format_BGRA8888"); GLAD_APPLE_texture_max_level = has_ext("GL_APPLE_texture_max_level"); GLAD_APPLE_texture_packed_float = has_ext("GL_APPLE_texture_packed_float"); GLAD_APPLE_texture_range = has_ext("GL_APPLE_texture_range"); GLAD_APPLE_vertex_array_object = has_ext("GL_APPLE_vertex_array_object"); GLAD_APPLE_vertex_array_range = has_ext("GL_APPLE_vertex_array_range"); GLAD_APPLE_vertex_program_evaluators = has_ext("GL_APPLE_vertex_program_evaluators"); GLAD_APPLE_ycbcr_422 = has_ext("GL_APPLE_ycbcr_422"); GLAD_ARM_mali_program_binary = has_ext("GL_ARM_mali_program_binary"); GLAD_ARM_mali_shader_binary = has_ext("GL_ARM_mali_shader_binary"); GLAD_ARM_rgba8 = has_ext("GL_ARM_rgba8"); GLAD_ARM_shader_framebuffer_fetch = has_ext("GL_ARM_shader_framebuffer_fetch"); GLAD_ARM_shader_framebuffer_fetch_depth_stencil = has_ext("GL_ARM_shader_framebuffer_fetch_depth_stencil"); GLAD_ATI_meminfo = has_ext("GL_ATI_meminfo"); GLAD_ATI_pixel_format_float = has_ext("GL_ATI_pixel_format_float"); GLAD_DMP_program_binary = has_ext("GL_DMP_program_binary"); GLAD_DMP_shader_binary = has_ext("GL_DMP_shader_binary"); GLAD_FJ_shader_binary_GCCSO = has_ext("GL_FJ_shader_binary_GCCSO"); GLAD_GREMEDY_frame_terminator = has_ext("GL_GREMEDY_frame_terminator"); GLAD_GREMEDY_string_marker = has_ext("GL_GREMEDY_string_marker"); GLAD_IMG_multisampled_render_to_texture = has_ext("GL_IMG_multisampled_render_to_texture"); GLAD_IMG_program_binary = has_ext("GL_IMG_program_binary"); GLAD_IMG_read_format = has_ext("GL_IMG_read_format"); GLAD_IMG_shader_binary = has_ext("GL_IMG_shader_binary"); GLAD_IMG_texture_compression_pvrtc = has_ext("GL_IMG_texture_compression_pvrtc"); GLAD_IMG_texture_compression_pvrtc2 = has_ext("GL_IMG_texture_compression_pvrtc2"); GLAD_IMG_texture_filter_cubic = has_ext("GL_IMG_texture_filter_cubic"); GLAD_INGR_blend_func_separate = has_ext("GL_INGR_blend_func_separate"); GLAD_INTEL_fragment_shader_ordering = has_ext("GL_INTEL_fragment_shader_ordering"); GLAD_INTEL_framebuffer_CMAA = has_ext("GL_INTEL_framebuffer_CMAA"); GLAD_INTEL_map_texture = has_ext("GL_INTEL_map_texture"); GLAD_INTEL_performance_query = has_ext("GL_INTEL_performance_query"); GLAD_MESA_pack_invert = has_ext("GL_MESA_pack_invert"); GLAD_MESA_ycbcr_texture = has_ext("GL_MESA_ycbcr_texture"); GLAD_MESAX_texture_stack = has_ext("GL_MESAX_texture_stack"); GLAD_NV_bindless_multi_draw_indirect = has_ext("GL_NV_bindless_multi_draw_indirect"); GLAD_NV_bindless_multi_draw_indirect_count = has_ext("GL_NV_bindless_multi_draw_indirect_count"); GLAD_NV_bindless_texture = has_ext("GL_NV_bindless_texture"); GLAD_NV_blend_equation_advanced = has_ext("GL_NV_blend_equation_advanced"); GLAD_NV_blend_equation_advanced_coherent = has_ext("GL_NV_blend_equation_advanced_coherent"); GLAD_NV_command_list = has_ext("GL_NV_command_list"); GLAD_NV_compute_program5 = has_ext("GL_NV_compute_program5"); GLAD_NV_conditional_render = has_ext("GL_NV_conditional_render"); GLAD_NV_conservative_raster = has_ext("GL_NV_conservative_raster"); GLAD_NV_conservative_raster_dilate = has_ext("GL_NV_conservative_raster_dilate"); GLAD_NV_copy_buffer = has_ext("GL_NV_copy_buffer"); GLAD_NV_copy_image = has_ext("GL_NV_copy_image"); GLAD_NV_coverage_sample = has_ext("GL_NV_coverage_sample"); GLAD_NV_deep_texture3D = has_ext("GL_NV_deep_texture3D"); GLAD_NV_depth_buffer_float = has_ext("GL_NV_depth_buffer_float"); GLAD_NV_depth_clamp = has_ext("GL_NV_depth_clamp"); GLAD_NV_depth_nonlinear = has_ext("GL_NV_depth_nonlinear"); GLAD_NV_draw_buffers = has_ext("GL_NV_draw_buffers"); GLAD_NV_draw_instanced = has_ext("GL_NV_draw_instanced"); GLAD_NV_draw_texture = has_ext("GL_NV_draw_texture"); GLAD_NV_explicit_attrib_location = has_ext("GL_NV_explicit_attrib_location"); GLAD_NV_explicit_multisample = has_ext("GL_NV_explicit_multisample"); GLAD_NV_fbo_color_attachments = has_ext("GL_NV_fbo_color_attachments"); GLAD_NV_fence = has_ext("GL_NV_fence"); GLAD_NV_fill_rectangle = has_ext("GL_NV_fill_rectangle"); GLAD_NV_float_buffer = has_ext("GL_NV_float_buffer"); GLAD_NV_fragment_coverage_to_color = has_ext("GL_NV_fragment_coverage_to_color"); GLAD_NV_fragment_program4 = has_ext("GL_NV_fragment_program4"); GLAD_NV_fragment_shader_interlock = has_ext("GL_NV_fragment_shader_interlock"); GLAD_NV_framebuffer_blit = has_ext("GL_NV_framebuffer_blit"); GLAD_NV_framebuffer_mixed_samples = has_ext("GL_NV_framebuffer_mixed_samples"); GLAD_NV_framebuffer_multisample = has_ext("GL_NV_framebuffer_multisample"); GLAD_NV_framebuffer_multisample_coverage = has_ext("GL_NV_framebuffer_multisample_coverage"); GLAD_NV_generate_mipmap_sRGB = has_ext("GL_NV_generate_mipmap_sRGB"); GLAD_NV_geometry_program4 = has_ext("GL_NV_geometry_program4"); GLAD_NV_geometry_shader4 = has_ext("GL_NV_geometry_shader4"); GLAD_NV_geometry_shader_passthrough = has_ext("GL_NV_geometry_shader_passthrough"); GLAD_NV_gpu_program4 = has_ext("GL_NV_gpu_program4"); GLAD_NV_gpu_program5 = has_ext("GL_NV_gpu_program5"); GLAD_NV_gpu_program5_mem_extended = has_ext("GL_NV_gpu_program5_mem_extended"); GLAD_NV_gpu_shader5 = has_ext("GL_NV_gpu_shader5"); GLAD_NV_half_float = has_ext("GL_NV_half_float"); GLAD_NV_image_formats = has_ext("GL_NV_image_formats"); GLAD_NV_instanced_arrays = has_ext("GL_NV_instanced_arrays"); GLAD_NV_internalformat_sample_query = has_ext("GL_NV_internalformat_sample_query"); GLAD_NV_multisample_coverage = has_ext("GL_NV_multisample_coverage"); GLAD_NV_non_square_matrices = has_ext("GL_NV_non_square_matrices"); GLAD_NV_occlusion_query = has_ext("GL_NV_occlusion_query"); GLAD_NV_parameter_buffer_object = has_ext("GL_NV_parameter_buffer_object"); GLAD_NV_parameter_buffer_object2 = has_ext("GL_NV_parameter_buffer_object2"); GLAD_NV_path_rendering = has_ext("GL_NV_path_rendering"); GLAD_NV_path_rendering_shared_edge = has_ext("GL_NV_path_rendering_shared_edge"); GLAD_NV_polygon_mode = has_ext("GL_NV_polygon_mode"); GLAD_NV_present_video = has_ext("GL_NV_present_video"); GLAD_NV_primitive_restart = has_ext("GL_NV_primitive_restart"); GLAD_NV_read_buffer = has_ext("GL_NV_read_buffer"); GLAD_NV_read_buffer_front = has_ext("GL_NV_read_buffer_front"); GLAD_NV_read_depth = has_ext("GL_NV_read_depth"); GLAD_NV_read_depth_stencil = has_ext("GL_NV_read_depth_stencil"); GLAD_NV_read_stencil = has_ext("GL_NV_read_stencil"); GLAD_NV_sample_locations = has_ext("GL_NV_sample_locations"); GLAD_NV_sample_mask_override_coverage = has_ext("GL_NV_sample_mask_override_coverage"); GLAD_NV_shader_atomic_counters = has_ext("GL_NV_shader_atomic_counters"); GLAD_NV_shader_atomic_float = has_ext("GL_NV_shader_atomic_float"); GLAD_NV_shader_atomic_fp16_vector = has_ext("GL_NV_shader_atomic_fp16_vector"); GLAD_NV_shader_atomic_int64 = has_ext("GL_NV_shader_atomic_int64"); GLAD_NV_shader_buffer_load = has_ext("GL_NV_shader_buffer_load"); GLAD_NV_shader_buffer_store = has_ext("GL_NV_shader_buffer_store"); GLAD_NV_shader_noperspective_interpolation = has_ext("GL_NV_shader_noperspective_interpolation"); GLAD_NV_shader_storage_buffer_object = has_ext("GL_NV_shader_storage_buffer_object"); GLAD_NV_shader_thread_group = has_ext("GL_NV_shader_thread_group"); GLAD_NV_shader_thread_shuffle = has_ext("GL_NV_shader_thread_shuffle"); GLAD_NV_shadow_samplers_array = has_ext("GL_NV_shadow_samplers_array"); GLAD_NV_shadow_samplers_cube = has_ext("GL_NV_shadow_samplers_cube"); GLAD_NV_sRGB_formats = has_ext("GL_NV_sRGB_formats"); GLAD_NV_tessellation_program5 = has_ext("GL_NV_tessellation_program5"); GLAD_NV_texture_barrier = has_ext("GL_NV_texture_barrier"); GLAD_NV_texture_border_clamp = has_ext("GL_NV_texture_border_clamp"); GLAD_NV_texture_compression_s3tc_update = has_ext("GL_NV_texture_compression_s3tc_update"); GLAD_NV_texture_multisample = has_ext("GL_NV_texture_multisample"); GLAD_NV_texture_npot_2D_mipmap = has_ext("GL_NV_texture_npot_2D_mipmap"); GLAD_NV_transform_feedback = has_ext("GL_NV_transform_feedback"); GLAD_NV_transform_feedback2 = has_ext("GL_NV_transform_feedback2"); GLAD_NV_uniform_buffer_unified_memory = has_ext("GL_NV_uniform_buffer_unified_memory"); GLAD_NV_vdpau_interop = has_ext("GL_NV_vdpau_interop"); GLAD_NV_vertex_attrib_integer_64bit = has_ext("GL_NV_vertex_attrib_integer_64bit"); GLAD_NV_vertex_buffer_unified_memory = has_ext("GL_NV_vertex_buffer_unified_memory"); GLAD_NV_vertex_program4 = has_ext("GL_NV_vertex_program4"); GLAD_NV_video_capture = has_ext("GL_NV_video_capture"); GLAD_NV_viewport_array = has_ext("GL_NV_viewport_array"); GLAD_NV_viewport_array2 = has_ext("GL_NV_viewport_array2"); GLAD_NVX_conditional_render = has_ext("GL_NVX_conditional_render"); GLAD_NVX_gpu_memory_info = has_ext("GL_NVX_gpu_memory_info"); GLAD_OVR_multiview = has_ext("GL_OVR_multiview"); GLAD_OVR_multiview2 = has_ext("GL_OVR_multiview2"); GLAD_OVR_multiview_multisampled_render_to_texture = has_ext("GL_OVR_multiview_multisampled_render_to_texture"); GLAD_QCOM_alpha_test = has_ext("GL_QCOM_alpha_test"); GLAD_QCOM_binning_control = has_ext("GL_QCOM_binning_control"); GLAD_QCOM_driver_control = has_ext("GL_QCOM_driver_control"); GLAD_QCOM_extended_get = has_ext("GL_QCOM_extended_get"); GLAD_QCOM_extended_get2 = has_ext("GL_QCOM_extended_get2"); GLAD_QCOM_perfmon_global_mode = has_ext("GL_QCOM_perfmon_global_mode"); GLAD_QCOM_tiled_rendering = has_ext("GL_QCOM_tiled_rendering"); GLAD_QCOM_writeonly_rendering = has_ext("GL_QCOM_writeonly_rendering"); GLAD_VIV_shader_binary = has_ext("GL_VIV_shader_binary"); } static void find_core(void) { const char *v = (const char *)fp_glGetString(GL_VERSION); int major = v[0] - '0', minor = v[2] - '0', gles = false; GLVersion.gles = false; if (strstr(v, "OpenGL ES ") == v) { major = v[10] - '0'; minor = v[12] - '0'; gles = true; } GLVersion.major = major; GLVersion.minor = minor; GLVersion.gles = gles; GLAD_VERSION_1_0 = gles == 0 && ((major == 1 && minor >= 0) || major > 1); GLAD_VERSION_1_1 = gles == 0 && ((major == 1 && minor >= 1) || major > 1); GLAD_VERSION_1_2 = gles == 0 && ((major == 1 && minor >= 2) || major > 1); GLAD_VERSION_1_3 = gles == 0 && ((major == 1 && minor >= 3) || major > 1); GLAD_VERSION_1_4 = gles == 0 && ((major == 1 && minor >= 4) || major > 1); GLAD_VERSION_1_5 = gles == 0 && ((major == 1 && minor >= 5) || major > 1); GLAD_VERSION_2_0 = gles == 0 && ((major == 2 && minor >= 0) || major > 2); GLAD_VERSION_2_1 = gles == 0 && ((major == 2 && minor >= 1) || major > 2); GLAD_VERSION_3_0 = gles == 0 && ((major == 3 && minor >= 0) || major > 3); GLAD_VERSION_3_1 = gles == 0 && ((major == 3 && minor >= 1) || major > 3); GLAD_VERSION_3_2 = gles == 0 && ((major == 3 && minor >= 2) || major > 3); GLAD_VERSION_3_3 = gles == 0 && ((major == 3 && minor >= 3) || major > 3); GLAD_VERSION_4_0 = gles == 0 && ((major == 4 && minor >= 0) || major > 4); GLAD_VERSION_4_1 = gles == 0 && ((major == 4 && minor >= 1) || major > 4); GLAD_VERSION_4_2 = gles == 0 && ((major == 4 && minor >= 2) || major > 4); GLAD_VERSION_4_3 = gles == 0 && ((major == 4 && minor >= 3) || major > 4); GLAD_VERSION_4_4 = gles == 0 && ((major == 4 && minor >= 4) || major > 4); GLAD_VERSION_4_5 = gles == 0 && ((major == 4 && minor >= 5) || major > 4); GLAD_ES_VERSION_2_0 = gles == 1 && ((major == 2 && minor >= 0) || major > 2); GLAD_ES_VERSION_3_0 = gles == 1 && ((major == 3 && minor >= 0) || major > 3); GLAD_ES_VERSION_3_1 = gles == 1 && ((major == 3 && minor >= 1) || major > 3); GLAD_ES_VERSION_3_2 = gles == 1 && ((major == 3 && minor >= 2) || major > 3); } bool gladLoadGLLoader(LOADER load) { GLVersion.major = 0; GLVersion.minor = 0; GLVersion.gles = 0; fp_glGetString = (pfn_glGetString)load("glGetString"); if(fp_glGetString == NULL) return false; find_core(); load_GL_VERSION_1_0(load); load_GL_VERSION_1_1(load); load_GL_VERSION_1_2(load); load_GL_VERSION_1_3(load); load_GL_VERSION_1_4(load); load_GL_VERSION_1_5(load); load_GL_VERSION_2_0(load); load_GL_VERSION_2_1(load); load_GL_VERSION_3_0(load); load_GL_VERSION_3_1(load); load_GL_VERSION_3_2(load); load_GL_VERSION_3_3(load); load_GL_VERSION_4_0(load); load_GL_VERSION_4_1(load); load_GL_VERSION_4_2(load); load_GL_VERSION_4_3(load); load_GL_VERSION_4_4(load); load_GL_VERSION_4_5(load); load_GL_ES_VERSION_2_0(load); load_GL_ES_VERSION_3_0(load); load_GL_ES_VERSION_3_1(load); load_GL_ES_VERSION_3_2(load); find_extensions(); load_GL_KHR_blend_equation_advanced(load); load_GL_KHR_debug(load); load_GL_KHR_robustness(load); load_GL_ARB_base_instance(load); load_GL_ARB_bindless_texture(load); load_GL_ARB_blend_func_extended(load); load_GL_ARB_buffer_storage(load); load_GL_ARB_cl_event(load); load_GL_ARB_clear_buffer_object(load); load_GL_ARB_clear_texture(load); load_GL_ARB_clip_control(load); load_GL_ARB_color_buffer_float(load); load_GL_ARB_compute_shader(load); load_GL_ARB_compute_variable_group_size(load); load_GL_ARB_copy_buffer(load); load_GL_ARB_copy_image(load); load_GL_ARB_debug_output(load); load_GL_ARB_direct_state_access(load); load_GL_ARB_draw_buffers_blend(load); load_GL_ARB_draw_elements_base_vertex(load); load_GL_ARB_draw_indirect(load); load_GL_ARB_draw_instanced(load); load_GL_ARB_ES2_compatibility(load); load_GL_ARB_ES3_1_compatibility(load); load_GL_ARB_ES3_2_compatibility(load); load_GL_ARB_framebuffer_no_attachments(load); load_GL_ARB_framebuffer_object(load); load_GL_ARB_geometry_shader4(load); load_GL_ARB_get_program_binary(load); load_GL_ARB_get_texture_sub_image(load); load_GL_ARB_gpu_shader_fp64(load); load_GL_ARB_gpu_shader_int64(load); load_GL_ARB_indirect_parameters(load); load_GL_ARB_instanced_arrays(load); load_GL_ARB_internalformat_query(load); load_GL_ARB_internalformat_query2(load); load_GL_ARB_invalidate_subdata(load); load_GL_ARB_map_buffer_range(load); load_GL_ARB_multi_bind(load); load_GL_ARB_multi_draw_indirect(load); load_GL_ARB_parallel_shader_compile(load); load_GL_ARB_program_interface_query(load); load_GL_ARB_provoking_vertex(load); load_GL_ARB_robustness(load); load_GL_ARB_sample_locations(load); load_GL_ARB_sample_shading(load); load_GL_ARB_sampler_objects(load); load_GL_ARB_separate_shader_objects(load); load_GL_ARB_shader_atomic_counters(load); load_GL_ARB_shader_image_load_store(load); load_GL_ARB_shader_storage_buffer_object(load); load_GL_ARB_shader_subroutine(load); load_GL_ARB_shading_language_include(load); load_GL_ARB_sparse_buffer(load); load_GL_ARB_sparse_texture(load); load_GL_ARB_sync(load); load_GL_ARB_tessellation_shader(load); load_GL_ARB_texture_barrier(load); load_GL_ARB_texture_buffer_object(load); load_GL_ARB_texture_buffer_range(load); load_GL_ARB_texture_multisample(load); load_GL_ARB_texture_storage(load); load_GL_ARB_texture_storage_multisample(load); load_GL_ARB_texture_view(load); load_GL_ARB_timer_query(load); load_GL_ARB_transform_feedback2(load); load_GL_ARB_transform_feedback3(load); load_GL_ARB_transform_feedback_instanced(load); load_GL_ARB_uniform_buffer_object(load); load_GL_ARB_vertex_array_object(load); load_GL_ARB_vertex_attrib_64bit(load); load_GL_ARB_vertex_attrib_binding(load); load_GL_ARB_vertex_type_2_10_10_10_rev(load); load_GL_ARB_viewport_array(load); load_GL_EXT_base_instance(load); load_GL_EXT_bindable_uniform(load); load_GL_EXT_blend_func_extended(load); load_GL_EXT_blend_minmax(load); load_GL_EXT_buffer_storage(load); load_GL_EXT_copy_image(load); load_GL_EXT_debug_label(load); load_GL_EXT_debug_marker(load); load_GL_EXT_direct_state_access(load); load_GL_EXT_discard_framebuffer(load); load_GL_EXT_disjoint_timer_query(load); load_GL_EXT_draw_buffers(load); load_GL_EXT_draw_buffers2(load); load_GL_EXT_draw_buffers_indexed(load); load_GL_EXT_draw_elements_base_vertex(load); load_GL_EXT_draw_instanced(load); load_GL_EXT_framebuffer_blit(load); load_GL_EXT_framebuffer_multisample(load); load_GL_EXT_framebuffer_object(load); load_GL_EXT_geometry_shader(load); load_GL_EXT_geometry_shader4(load); load_GL_EXT_gpu_program_parameters(load); load_GL_EXT_gpu_shader4(load); load_GL_EXT_instanced_arrays(load); load_GL_EXT_map_buffer_range(load); load_GL_EXT_multi_draw_indirect(load); load_GL_EXT_multisampled_render_to_texture(load); load_GL_EXT_multiview_draw_buffers(load); load_GL_EXT_occlusion_query_boolean(load); load_GL_EXT_polygon_offset_clamp(load); load_GL_EXT_primitive_bounding_box(load); load_GL_EXT_provoking_vertex(load); load_GL_EXT_raster_multisample(load); load_GL_EXT_robustness(load); load_GL_EXT_separate_shader_objects(load); load_GL_EXT_shader_image_load_store(load); load_GL_EXT_sparse_texture(load); load_GL_EXT_stencil_clear_tag(load); load_GL_EXT_tessellation_shader(load); load_GL_EXT_texture_array(load); load_GL_EXT_texture_border_clamp(load); load_GL_EXT_texture_buffer(load); load_GL_EXT_texture_buffer_object(load); load_GL_EXT_texture_filter_minmax(load); load_GL_EXT_texture_integer(load); load_GL_EXT_texture_storage(load); load_GL_EXT_texture_view(load); load_GL_EXT_timer_query(load); load_GL_EXT_transform_feedback(load); load_GL_EXT_vertex_attrib_64bit(load); load_GL_EXT_x11_sync_object(load); load_GL_OES_copy_image(load); load_GL_OES_draw_buffers_indexed(load); load_GL_OES_draw_elements_base_vertex(load); load_GL_OES_EGL_image(load); load_GL_OES_geometry_shader(load); load_GL_OES_get_program_binary(load); load_GL_OES_mapbuffer(load); load_GL_OES_primitive_bounding_box(load); load_GL_OES_sample_shading(load); load_GL_OES_tessellation_shader(load); load_GL_OES_texture_3D(load); load_GL_OES_texture_border_clamp(load); load_GL_OES_texture_buffer(load); load_GL_OES_texture_storage_multisample_2d_array(load); load_GL_OES_texture_view(load); load_GL_OES_vertex_array_object(load); load_GL_AMD_debug_output(load); load_GL_AMD_draw_buffers_blend(load); load_GL_AMD_gpu_shader_int64(load); load_GL_AMD_interleaved_elements(load); load_GL_AMD_multi_draw_indirect(load); load_GL_AMD_name_gen_delete(load); load_GL_AMD_occlusion_query_event(load); load_GL_AMD_performance_monitor(load); load_GL_AMD_sample_positions(load); load_GL_AMD_sparse_texture(load); load_GL_AMD_stencil_operation_extended(load); load_GL_AMD_vertex_shader_tessellator(load); load_GL_ANGLE_framebuffer_blit(load); load_GL_ANGLE_framebuffer_multisample(load); load_GL_ANGLE_instanced_arrays(load); load_GL_ANGLE_translated_shader_source(load); load_GL_APPLE_copy_texture_levels(load); load_GL_APPLE_element_array(load); load_GL_APPLE_fence(load); load_GL_APPLE_flush_buffer_range(load); load_GL_APPLE_framebuffer_multisample(load); load_GL_APPLE_object_purgeable(load); load_GL_APPLE_sync(load); load_GL_APPLE_texture_range(load); load_GL_APPLE_vertex_array_object(load); load_GL_APPLE_vertex_array_range(load); load_GL_APPLE_vertex_program_evaluators(load); load_GL_GREMEDY_frame_terminator(load); load_GL_GREMEDY_string_marker(load); load_GL_IMG_multisampled_render_to_texture(load); load_GL_INGR_blend_func_separate(load); load_GL_INTEL_framebuffer_CMAA(load); load_GL_INTEL_map_texture(load); load_GL_INTEL_performance_query(load); load_GL_NV_bindless_multi_draw_indirect(load); load_GL_NV_bindless_multi_draw_indirect_count(load); load_GL_NV_bindless_texture(load); load_GL_NV_blend_equation_advanced(load); load_GL_NV_command_list(load); load_GL_NV_conditional_render(load); load_GL_NV_conservative_raster(load); load_GL_NV_conservative_raster_dilate(load); load_GL_NV_copy_buffer(load); load_GL_NV_copy_image(load); load_GL_NV_coverage_sample(load); load_GL_NV_depth_buffer_float(load); load_GL_NV_draw_buffers(load); load_GL_NV_draw_instanced(load); load_GL_NV_draw_texture(load); load_GL_NV_explicit_multisample(load); load_GL_NV_fence(load); load_GL_NV_fragment_coverage_to_color(load); load_GL_NV_framebuffer_blit(load); load_GL_NV_framebuffer_mixed_samples(load); load_GL_NV_framebuffer_multisample(load); load_GL_NV_framebuffer_multisample_coverage(load); load_GL_NV_geometry_program4(load); load_GL_NV_gpu_program4(load); load_GL_NV_gpu_program5(load); load_GL_NV_gpu_shader5(load); load_GL_NV_half_float(load); load_GL_NV_instanced_arrays(load); load_GL_NV_internalformat_sample_query(load); load_GL_NV_non_square_matrices(load); load_GL_NV_occlusion_query(load); load_GL_NV_parameter_buffer_object(load); load_GL_NV_path_rendering(load); load_GL_NV_polygon_mode(load); load_GL_NV_present_video(load); load_GL_NV_primitive_restart(load); load_GL_NV_read_buffer(load); load_GL_NV_sample_locations(load); load_GL_NV_shader_buffer_load(load); load_GL_NV_texture_barrier(load); load_GL_NV_texture_multisample(load); load_GL_NV_transform_feedback(load); load_GL_NV_transform_feedback2(load); load_GL_NV_vdpau_interop(load); load_GL_NV_vertex_attrib_integer_64bit(load); load_GL_NV_vertex_buffer_unified_memory(load); load_GL_NV_vertex_program4(load); load_GL_NV_video_capture(load); load_GL_NV_viewport_array(load); load_GL_NVX_conditional_render(load); load_GL_OVR_multiview(load); load_GL_OVR_multiview_multisampled_render_to_texture(load); load_GL_QCOM_alpha_test(load); load_GL_QCOM_driver_control(load); load_GL_QCOM_extended_get(load); load_GL_QCOM_extended_get2(load); load_GL_QCOM_tiled_rendering(load); return true; } } /* namespace glad */ ================================================ FILE: src/libraries/glad/glad.hpp ================================================ /** * The MIT License (MIT) * * Copyright (c) 2013 David Herberth, modified by Sasha Szpakowski * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in * the Software without restriction, including without limitation the rights to * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of * the Software, and to permit persons to whom the Software is furnished to do so, * subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **/ #ifndef __glad_hpp_ #if defined(__gl_h_) || defined(__glext_h_) || defined(__glcorearb_h_) \ || defined(__gl3_h) || defined(__gl3_ext_h) #error OpenGL header already included, remove this include, glad already provides it #endif #define __glad_hpp_ #define __gl_h_ #if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) #ifndef WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN 1 #endif #include #ifdef near #undef near #endif #ifdef far #undef far #endif #endif #ifndef APIENTRY #define APIENTRY #endif #ifndef APIENTRYP #define APIENTRYP APIENTRY * #endif #ifndef GLAPI #define GLAPI extern #endif #include #ifndef GLEXT_64_TYPES_DEFINED /* This code block is duplicated in glxext.h, so must be protected */ #define GLEXT_64_TYPES_DEFINED /* Define int32_t, int64_t, and uint64_t types for UST/MSC */ /* (as used in the GL_EXT_timer_query extension). */ #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #include #elif defined(__sun__) || defined(__digital__) #include #if defined(__STDC__) #if defined(__arch64__) || defined(_LP64) typedef long int int64_t; typedef unsigned long int uint64_t; #else typedef long long int int64_t; typedef unsigned long long int uint64_t; #endif /* __arch64__ */ #endif /* __STDC__ */ #elif defined( __VMS ) || defined(__sgi) #include #elif defined(__SCO__) || defined(__USLC__) #include #elif defined(__UNIXOS2__) || defined(__SOL64__) typedef long int int32_t; typedef long long int int64_t; typedef unsigned long long int uint64_t; #elif defined(_WIN32) && defined(__GNUC__) #include #elif defined(_WIN32) typedef __int32 int32_t; typedef __int64 int64_t; typedef unsigned __int64 uint64_t; #else /* Fallback if nothing above works */ #include #endif #endif namespace glad { bool gladLoadGL(void); typedef void* (* LOADER)(const char *name); bool gladLoadGLLoader(LOADER); typedef unsigned int GLenum; typedef unsigned char GLboolean; typedef unsigned int GLbitfield; typedef void GLvoid; typedef signed char GLbyte; typedef short GLshort; typedef int GLint; typedef int GLclampx; typedef unsigned char GLubyte; typedef unsigned short GLushort; typedef unsigned int GLuint; typedef int GLsizei; typedef float GLfloat; typedef float GLclampf; typedef double GLdouble; typedef double GLclampd; typedef void *GLeglImageOES; typedef char GLchar; typedef char GLcharARB; #ifdef __APPLE__ typedef void *GLhandleARB; #else typedef unsigned int GLhandleARB; #endif typedef unsigned short GLhalfARB; typedef unsigned short GLhalf; typedef GLint GLfixed; typedef ptrdiff_t GLintptr; typedef ptrdiff_t GLsizeiptr; typedef int64_t GLint64; typedef uint64_t GLuint64; typedef ptrdiff_t GLintptrARB; typedef ptrdiff_t GLsizeiptrARB; typedef int64_t GLint64EXT; typedef uint64_t GLuint64EXT; typedef struct __GLsync *GLsync; struct _cl_context; struct _cl_event; typedef void (APIENTRY *GLDEBUGPROC)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam); typedef void (APIENTRY *GLDEBUGPROCARB)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam); typedef void (APIENTRY *GLDEBUGPROCKHR)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam); typedef void (APIENTRY *GLDEBUGPROCAMD)(GLuint id,GLenum category,GLenum severity,GLsizei length,const GLchar *message,void *userParam); typedef unsigned short GLhalfNV; typedef GLintptr GLvdpauSurfaceNV; /* GL_VERSION_1_0 */ extern GLboolean GLAD_VERSION_1_0; typedef void (APIENTRYP pfn_glCullFace) (GLenum); extern pfn_glCullFace fp_glCullFace; typedef void (APIENTRYP pfn_glFrontFace) (GLenum); extern pfn_glFrontFace fp_glFrontFace; typedef void (APIENTRYP pfn_glHint) (GLenum, GLenum); extern pfn_glHint fp_glHint; typedef void (APIENTRYP pfn_glLineWidth) (GLfloat); extern pfn_glLineWidth fp_glLineWidth; typedef void (APIENTRYP pfn_glPointSize) (GLfloat); extern pfn_glPointSize fp_glPointSize; typedef void (APIENTRYP pfn_glPolygonMode) (GLenum, GLenum); extern pfn_glPolygonMode fp_glPolygonMode; typedef void (APIENTRYP pfn_glScissor) (GLint, GLint, GLsizei, GLsizei); extern pfn_glScissor fp_glScissor; typedef void (APIENTRYP pfn_glTexParameterf) (GLenum, GLenum, GLfloat); extern pfn_glTexParameterf fp_glTexParameterf; typedef void (APIENTRYP pfn_glTexParameterfv) (GLenum, GLenum, const GLfloat*); extern pfn_glTexParameterfv fp_glTexParameterfv; typedef void (APIENTRYP pfn_glTexParameteri) (GLenum, GLenum, GLint); extern pfn_glTexParameteri fp_glTexParameteri; typedef void (APIENTRYP pfn_glTexParameteriv) (GLenum, GLenum, const GLint*); extern pfn_glTexParameteriv fp_glTexParameteriv; typedef void (APIENTRYP pfn_glTexImage1D) (GLenum, GLint, GLint, GLsizei, GLint, GLenum, GLenum, const void*); extern pfn_glTexImage1D fp_glTexImage1D; typedef void (APIENTRYP pfn_glTexImage2D) (GLenum, GLint, GLint, GLsizei, GLsizei, GLint, GLenum, GLenum, const void*); extern pfn_glTexImage2D fp_glTexImage2D; typedef void (APIENTRYP pfn_glDrawBuffer) (GLenum); extern pfn_glDrawBuffer fp_glDrawBuffer; typedef void (APIENTRYP pfn_glClear) (GLbitfield); extern pfn_glClear fp_glClear; typedef void (APIENTRYP pfn_glClearColor) (GLfloat, GLfloat, GLfloat, GLfloat); extern pfn_glClearColor fp_glClearColor; typedef void (APIENTRYP pfn_glClearStencil) (GLint); extern pfn_glClearStencil fp_glClearStencil; typedef void (APIENTRYP pfn_glClearDepth) (GLdouble); extern pfn_glClearDepth fp_glClearDepth; typedef void (APIENTRYP pfn_glStencilMask) (GLuint); extern pfn_glStencilMask fp_glStencilMask; typedef void (APIENTRYP pfn_glColorMask) (GLboolean, GLboolean, GLboolean, GLboolean); extern pfn_glColorMask fp_glColorMask; typedef void (APIENTRYP pfn_glDepthMask) (GLboolean); extern pfn_glDepthMask fp_glDepthMask; typedef void (APIENTRYP pfn_glDisable) (GLenum); extern pfn_glDisable fp_glDisable; typedef void (APIENTRYP pfn_glEnable) (GLenum); extern pfn_glEnable fp_glEnable; typedef void (APIENTRYP pfn_glFinish) (); extern pfn_glFinish fp_glFinish; typedef void (APIENTRYP pfn_glFlush) (); extern pfn_glFlush fp_glFlush; typedef void (APIENTRYP pfn_glBlendFunc) (GLenum, GLenum); extern pfn_glBlendFunc fp_glBlendFunc; typedef void (APIENTRYP pfn_glLogicOp) (GLenum); extern pfn_glLogicOp fp_glLogicOp; typedef void (APIENTRYP pfn_glStencilFunc) (GLenum, GLint, GLuint); extern pfn_glStencilFunc fp_glStencilFunc; typedef void (APIENTRYP pfn_glStencilOp) (GLenum, GLenum, GLenum); extern pfn_glStencilOp fp_glStencilOp; typedef void (APIENTRYP pfn_glDepthFunc) (GLenum); extern pfn_glDepthFunc fp_glDepthFunc; typedef void (APIENTRYP pfn_glPixelStoref) (GLenum, GLfloat); extern pfn_glPixelStoref fp_glPixelStoref; typedef void (APIENTRYP pfn_glPixelStorei) (GLenum, GLint); extern pfn_glPixelStorei fp_glPixelStorei; typedef void (APIENTRYP pfn_glReadBuffer) (GLenum); extern pfn_glReadBuffer fp_glReadBuffer; typedef void (APIENTRYP pfn_glReadPixels) (GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, void*); extern pfn_glReadPixels fp_glReadPixels; typedef void (APIENTRYP pfn_glGetBooleanv) (GLenum, GLboolean*); extern pfn_glGetBooleanv fp_glGetBooleanv; typedef void (APIENTRYP pfn_glGetDoublev) (GLenum, GLdouble*); extern pfn_glGetDoublev fp_glGetDoublev; typedef GLenum (APIENTRYP pfn_glGetError) (); extern pfn_glGetError fp_glGetError; typedef void (APIENTRYP pfn_glGetFloatv) (GLenum, GLfloat*); extern pfn_glGetFloatv fp_glGetFloatv; typedef void (APIENTRYP pfn_glGetIntegerv) (GLenum, GLint*); extern pfn_glGetIntegerv fp_glGetIntegerv; typedef const GLubyte* (APIENTRYP pfn_glGetString) (GLenum); extern pfn_glGetString fp_glGetString; typedef void (APIENTRYP pfn_glGetTexImage) (GLenum, GLint, GLenum, GLenum, void*); extern pfn_glGetTexImage fp_glGetTexImage; typedef void (APIENTRYP pfn_glGetTexParameterfv) (GLenum, GLenum, GLfloat*); extern pfn_glGetTexParameterfv fp_glGetTexParameterfv; typedef void (APIENTRYP pfn_glGetTexParameteriv) (GLenum, GLenum, GLint*); extern pfn_glGetTexParameteriv fp_glGetTexParameteriv; typedef void (APIENTRYP pfn_glGetTexLevelParameterfv) (GLenum, GLint, GLenum, GLfloat*); extern pfn_glGetTexLevelParameterfv fp_glGetTexLevelParameterfv; typedef void (APIENTRYP pfn_glGetTexLevelParameteriv) (GLenum, GLint, GLenum, GLint*); extern pfn_glGetTexLevelParameteriv fp_glGetTexLevelParameteriv; typedef GLboolean (APIENTRYP pfn_glIsEnabled) (GLenum); extern pfn_glIsEnabled fp_glIsEnabled; typedef void (APIENTRYP pfn_glDepthRange) (GLdouble, GLdouble); extern pfn_glDepthRange fp_glDepthRange; typedef void (APIENTRYP pfn_glViewport) (GLint, GLint, GLsizei, GLsizei); extern pfn_glViewport fp_glViewport; typedef void (APIENTRYP pfn_glNewList) (GLuint, GLenum); extern pfn_glNewList fp_glNewList; typedef void (APIENTRYP pfn_glEndList) (); extern pfn_glEndList fp_glEndList; typedef void (APIENTRYP pfn_glCallList) (GLuint); extern pfn_glCallList fp_glCallList; typedef void (APIENTRYP pfn_glCallLists) (GLsizei, GLenum, const void*); extern pfn_glCallLists fp_glCallLists; typedef void (APIENTRYP pfn_glDeleteLists) (GLuint, GLsizei); extern pfn_glDeleteLists fp_glDeleteLists; typedef GLuint (APIENTRYP pfn_glGenLists) (GLsizei); extern pfn_glGenLists fp_glGenLists; typedef void (APIENTRYP pfn_glListBase) (GLuint); extern pfn_glListBase fp_glListBase; typedef void (APIENTRYP pfn_glBegin) (GLenum); extern pfn_glBegin fp_glBegin; typedef void (APIENTRYP pfn_glBitmap) (GLsizei, GLsizei, GLfloat, GLfloat, GLfloat, GLfloat, const GLubyte*); extern pfn_glBitmap fp_glBitmap; typedef void (APIENTRYP pfn_glColor3b) (GLbyte, GLbyte, GLbyte); extern pfn_glColor3b fp_glColor3b; typedef void (APIENTRYP pfn_glColor3bv) (const GLbyte*); extern pfn_glColor3bv fp_glColor3bv; typedef void (APIENTRYP pfn_glColor3d) (GLdouble, GLdouble, GLdouble); extern pfn_glColor3d fp_glColor3d; typedef void (APIENTRYP pfn_glColor3dv) (const GLdouble*); extern pfn_glColor3dv fp_glColor3dv; typedef void (APIENTRYP pfn_glColor3f) (GLfloat, GLfloat, GLfloat); extern pfn_glColor3f fp_glColor3f; typedef void (APIENTRYP pfn_glColor3fv) (const GLfloat*); extern pfn_glColor3fv fp_glColor3fv; typedef void (APIENTRYP pfn_glColor3i) (GLint, GLint, GLint); extern pfn_glColor3i fp_glColor3i; typedef void (APIENTRYP pfn_glColor3iv) (const GLint*); extern pfn_glColor3iv fp_glColor3iv; typedef void (APIENTRYP pfn_glColor3s) (GLshort, GLshort, GLshort); extern pfn_glColor3s fp_glColor3s; typedef void (APIENTRYP pfn_glColor3sv) (const GLshort*); extern pfn_glColor3sv fp_glColor3sv; typedef void (APIENTRYP pfn_glColor3ub) (GLubyte, GLubyte, GLubyte); extern pfn_glColor3ub fp_glColor3ub; typedef void (APIENTRYP pfn_glColor3ubv) (const GLubyte*); extern pfn_glColor3ubv fp_glColor3ubv; typedef void (APIENTRYP pfn_glColor3ui) (GLuint, GLuint, GLuint); extern pfn_glColor3ui fp_glColor3ui; typedef void (APIENTRYP pfn_glColor3uiv) (const GLuint*); extern pfn_glColor3uiv fp_glColor3uiv; typedef void (APIENTRYP pfn_glColor3us) (GLushort, GLushort, GLushort); extern pfn_glColor3us fp_glColor3us; typedef void (APIENTRYP pfn_glColor3usv) (const GLushort*); extern pfn_glColor3usv fp_glColor3usv; typedef void (APIENTRYP pfn_glColor4b) (GLbyte, GLbyte, GLbyte, GLbyte); extern pfn_glColor4b fp_glColor4b; typedef void (APIENTRYP pfn_glColor4bv) (const GLbyte*); extern pfn_glColor4bv fp_glColor4bv; typedef void (APIENTRYP pfn_glColor4d) (GLdouble, GLdouble, GLdouble, GLdouble); extern pfn_glColor4d fp_glColor4d; typedef void (APIENTRYP pfn_glColor4dv) (const GLdouble*); extern pfn_glColor4dv fp_glColor4dv; typedef void (APIENTRYP pfn_glColor4f) (GLfloat, GLfloat, GLfloat, GLfloat); extern pfn_glColor4f fp_glColor4f; typedef void (APIENTRYP pfn_glColor4fv) (const GLfloat*); extern pfn_glColor4fv fp_glColor4fv; typedef void (APIENTRYP pfn_glColor4i) (GLint, GLint, GLint, GLint); extern pfn_glColor4i fp_glColor4i; typedef void (APIENTRYP pfn_glColor4iv) (const GLint*); extern pfn_glColor4iv fp_glColor4iv; typedef void (APIENTRYP pfn_glColor4s) (GLshort, GLshort, GLshort, GLshort); extern pfn_glColor4s fp_glColor4s; typedef void (APIENTRYP pfn_glColor4sv) (const GLshort*); extern pfn_glColor4sv fp_glColor4sv; typedef void (APIENTRYP pfn_glColor4ub) (GLubyte, GLubyte, GLubyte, GLubyte); extern pfn_glColor4ub fp_glColor4ub; typedef void (APIENTRYP pfn_glColor4ubv) (const GLubyte*); extern pfn_glColor4ubv fp_glColor4ubv; typedef void (APIENTRYP pfn_glColor4ui) (GLuint, GLuint, GLuint, GLuint); extern pfn_glColor4ui fp_glColor4ui; typedef void (APIENTRYP pfn_glColor4uiv) (const GLuint*); extern pfn_glColor4uiv fp_glColor4uiv; typedef void (APIENTRYP pfn_glColor4us) (GLushort, GLushort, GLushort, GLushort); extern pfn_glColor4us fp_glColor4us; typedef void (APIENTRYP pfn_glColor4usv) (const GLushort*); extern pfn_glColor4usv fp_glColor4usv; typedef void (APIENTRYP pfn_glEdgeFlag) (GLboolean); extern pfn_glEdgeFlag fp_glEdgeFlag; typedef void (APIENTRYP pfn_glEdgeFlagv) (const GLboolean*); extern pfn_glEdgeFlagv fp_glEdgeFlagv; typedef void (APIENTRYP pfn_glEnd) (); extern pfn_glEnd fp_glEnd; typedef void (APIENTRYP pfn_glIndexd) (GLdouble); extern pfn_glIndexd fp_glIndexd; typedef void (APIENTRYP pfn_glIndexdv) (const GLdouble*); extern pfn_glIndexdv fp_glIndexdv; typedef void (APIENTRYP pfn_glIndexf) (GLfloat); extern pfn_glIndexf fp_glIndexf; typedef void (APIENTRYP pfn_glIndexfv) (const GLfloat*); extern pfn_glIndexfv fp_glIndexfv; typedef void (APIENTRYP pfn_glIndexi) (GLint); extern pfn_glIndexi fp_glIndexi; typedef void (APIENTRYP pfn_glIndexiv) (const GLint*); extern pfn_glIndexiv fp_glIndexiv; typedef void (APIENTRYP pfn_glIndexs) (GLshort); extern pfn_glIndexs fp_glIndexs; typedef void (APIENTRYP pfn_glIndexsv) (const GLshort*); extern pfn_glIndexsv fp_glIndexsv; typedef void (APIENTRYP pfn_glNormal3b) (GLbyte, GLbyte, GLbyte); extern pfn_glNormal3b fp_glNormal3b; typedef void (APIENTRYP pfn_glNormal3bv) (const GLbyte*); extern pfn_glNormal3bv fp_glNormal3bv; typedef void (APIENTRYP pfn_glNormal3d) (GLdouble, GLdouble, GLdouble); extern pfn_glNormal3d fp_glNormal3d; typedef void (APIENTRYP pfn_glNormal3dv) (const GLdouble*); extern pfn_glNormal3dv fp_glNormal3dv; typedef void (APIENTRYP pfn_glNormal3f) (GLfloat, GLfloat, GLfloat); extern pfn_glNormal3f fp_glNormal3f; typedef void (APIENTRYP pfn_glNormal3fv) (const GLfloat*); extern pfn_glNormal3fv fp_glNormal3fv; typedef void (APIENTRYP pfn_glNormal3i) (GLint, GLint, GLint); extern pfn_glNormal3i fp_glNormal3i; typedef void (APIENTRYP pfn_glNormal3iv) (const GLint*); extern pfn_glNormal3iv fp_glNormal3iv; typedef void (APIENTRYP pfn_glNormal3s) (GLshort, GLshort, GLshort); extern pfn_glNormal3s fp_glNormal3s; typedef void (APIENTRYP pfn_glNormal3sv) (const GLshort*); extern pfn_glNormal3sv fp_glNormal3sv; typedef void (APIENTRYP pfn_glRasterPos2d) (GLdouble, GLdouble); extern pfn_glRasterPos2d fp_glRasterPos2d; typedef void (APIENTRYP pfn_glRasterPos2dv) (const GLdouble*); extern pfn_glRasterPos2dv fp_glRasterPos2dv; typedef void (APIENTRYP pfn_glRasterPos2f) (GLfloat, GLfloat); extern pfn_glRasterPos2f fp_glRasterPos2f; typedef void (APIENTRYP pfn_glRasterPos2fv) (const GLfloat*); extern pfn_glRasterPos2fv fp_glRasterPos2fv; typedef void (APIENTRYP pfn_glRasterPos2i) (GLint, GLint); extern pfn_glRasterPos2i fp_glRasterPos2i; typedef void (APIENTRYP pfn_glRasterPos2iv) (const GLint*); extern pfn_glRasterPos2iv fp_glRasterPos2iv; typedef void (APIENTRYP pfn_glRasterPos2s) (GLshort, GLshort); extern pfn_glRasterPos2s fp_glRasterPos2s; typedef void (APIENTRYP pfn_glRasterPos2sv) (const GLshort*); extern pfn_glRasterPos2sv fp_glRasterPos2sv; typedef void (APIENTRYP pfn_glRasterPos3d) (GLdouble, GLdouble, GLdouble); extern pfn_glRasterPos3d fp_glRasterPos3d; typedef void (APIENTRYP pfn_glRasterPos3dv) (const GLdouble*); extern pfn_glRasterPos3dv fp_glRasterPos3dv; typedef void (APIENTRYP pfn_glRasterPos3f) (GLfloat, GLfloat, GLfloat); extern pfn_glRasterPos3f fp_glRasterPos3f; typedef void (APIENTRYP pfn_glRasterPos3fv) (const GLfloat*); extern pfn_glRasterPos3fv fp_glRasterPos3fv; typedef void (APIENTRYP pfn_glRasterPos3i) (GLint, GLint, GLint); extern pfn_glRasterPos3i fp_glRasterPos3i; typedef void (APIENTRYP pfn_glRasterPos3iv) (const GLint*); extern pfn_glRasterPos3iv fp_glRasterPos3iv; typedef void (APIENTRYP pfn_glRasterPos3s) (GLshort, GLshort, GLshort); extern pfn_glRasterPos3s fp_glRasterPos3s; typedef void (APIENTRYP pfn_glRasterPos3sv) (const GLshort*); extern pfn_glRasterPos3sv fp_glRasterPos3sv; typedef void (APIENTRYP pfn_glRasterPos4d) (GLdouble, GLdouble, GLdouble, GLdouble); extern pfn_glRasterPos4d fp_glRasterPos4d; typedef void (APIENTRYP pfn_glRasterPos4dv) (const GLdouble*); extern pfn_glRasterPos4dv fp_glRasterPos4dv; typedef void (APIENTRYP pfn_glRasterPos4f) (GLfloat, GLfloat, GLfloat, GLfloat); extern pfn_glRasterPos4f fp_glRasterPos4f; typedef void (APIENTRYP pfn_glRasterPos4fv) (const GLfloat*); extern pfn_glRasterPos4fv fp_glRasterPos4fv; typedef void (APIENTRYP pfn_glRasterPos4i) (GLint, GLint, GLint, GLint); extern pfn_glRasterPos4i fp_glRasterPos4i; typedef void (APIENTRYP pfn_glRasterPos4iv) (const GLint*); extern pfn_glRasterPos4iv fp_glRasterPos4iv; typedef void (APIENTRYP pfn_glRasterPos4s) (GLshort, GLshort, GLshort, GLshort); extern pfn_glRasterPos4s fp_glRasterPos4s; typedef void (APIENTRYP pfn_glRasterPos4sv) (const GLshort*); extern pfn_glRasterPos4sv fp_glRasterPos4sv; typedef void (APIENTRYP pfn_glRectd) (GLdouble, GLdouble, GLdouble, GLdouble); extern pfn_glRectd fp_glRectd; typedef void (APIENTRYP pfn_glRectdv) (const GLdouble*, const GLdouble*); extern pfn_glRectdv fp_glRectdv; typedef void (APIENTRYP pfn_glRectf) (GLfloat, GLfloat, GLfloat, GLfloat); extern pfn_glRectf fp_glRectf; typedef void (APIENTRYP pfn_glRectfv) (const GLfloat*, const GLfloat*); extern pfn_glRectfv fp_glRectfv; typedef void (APIENTRYP pfn_glRecti) (GLint, GLint, GLint, GLint); extern pfn_glRecti fp_glRecti; typedef void (APIENTRYP pfn_glRectiv) (const GLint*, const GLint*); extern pfn_glRectiv fp_glRectiv; typedef void (APIENTRYP pfn_glRects) (GLshort, GLshort, GLshort, GLshort); extern pfn_glRects fp_glRects; typedef void (APIENTRYP pfn_glRectsv) (const GLshort*, const GLshort*); extern pfn_glRectsv fp_glRectsv; typedef void (APIENTRYP pfn_glTexCoord1d) (GLdouble); extern pfn_glTexCoord1d fp_glTexCoord1d; typedef void (APIENTRYP pfn_glTexCoord1dv) (const GLdouble*); extern pfn_glTexCoord1dv fp_glTexCoord1dv; typedef void (APIENTRYP pfn_glTexCoord1f) (GLfloat); extern pfn_glTexCoord1f fp_glTexCoord1f; typedef void (APIENTRYP pfn_glTexCoord1fv) (const GLfloat*); extern pfn_glTexCoord1fv fp_glTexCoord1fv; typedef void (APIENTRYP pfn_glTexCoord1i) (GLint); extern pfn_glTexCoord1i fp_glTexCoord1i; typedef void (APIENTRYP pfn_glTexCoord1iv) (const GLint*); extern pfn_glTexCoord1iv fp_glTexCoord1iv; typedef void (APIENTRYP pfn_glTexCoord1s) (GLshort); extern pfn_glTexCoord1s fp_glTexCoord1s; typedef void (APIENTRYP pfn_glTexCoord1sv) (const GLshort*); extern pfn_glTexCoord1sv fp_glTexCoord1sv; typedef void (APIENTRYP pfn_glTexCoord2d) (GLdouble, GLdouble); extern pfn_glTexCoord2d fp_glTexCoord2d; typedef void (APIENTRYP pfn_glTexCoord2dv) (const GLdouble*); extern pfn_glTexCoord2dv fp_glTexCoord2dv; typedef void (APIENTRYP pfn_glTexCoord2f) (GLfloat, GLfloat); extern pfn_glTexCoord2f fp_glTexCoord2f; typedef void (APIENTRYP pfn_glTexCoord2fv) (const GLfloat*); extern pfn_glTexCoord2fv fp_glTexCoord2fv; typedef void (APIENTRYP pfn_glTexCoord2i) (GLint, GLint); extern pfn_glTexCoord2i fp_glTexCoord2i; typedef void (APIENTRYP pfn_glTexCoord2iv) (const GLint*); extern pfn_glTexCoord2iv fp_glTexCoord2iv; typedef void (APIENTRYP pfn_glTexCoord2s) (GLshort, GLshort); extern pfn_glTexCoord2s fp_glTexCoord2s; typedef void (APIENTRYP pfn_glTexCoord2sv) (const GLshort*); extern pfn_glTexCoord2sv fp_glTexCoord2sv; typedef void (APIENTRYP pfn_glTexCoord3d) (GLdouble, GLdouble, GLdouble); extern pfn_glTexCoord3d fp_glTexCoord3d; typedef void (APIENTRYP pfn_glTexCoord3dv) (const GLdouble*); extern pfn_glTexCoord3dv fp_glTexCoord3dv; typedef void (APIENTRYP pfn_glTexCoord3f) (GLfloat, GLfloat, GLfloat); extern pfn_glTexCoord3f fp_glTexCoord3f; typedef void (APIENTRYP pfn_glTexCoord3fv) (const GLfloat*); extern pfn_glTexCoord3fv fp_glTexCoord3fv; typedef void (APIENTRYP pfn_glTexCoord3i) (GLint, GLint, GLint); extern pfn_glTexCoord3i fp_glTexCoord3i; typedef void (APIENTRYP pfn_glTexCoord3iv) (const GLint*); extern pfn_glTexCoord3iv fp_glTexCoord3iv; typedef void (APIENTRYP pfn_glTexCoord3s) (GLshort, GLshort, GLshort); extern pfn_glTexCoord3s fp_glTexCoord3s; typedef void (APIENTRYP pfn_glTexCoord3sv) (const GLshort*); extern pfn_glTexCoord3sv fp_glTexCoord3sv; typedef void (APIENTRYP pfn_glTexCoord4d) (GLdouble, GLdouble, GLdouble, GLdouble); extern pfn_glTexCoord4d fp_glTexCoord4d; typedef void (APIENTRYP pfn_glTexCoord4dv) (const GLdouble*); extern pfn_glTexCoord4dv fp_glTexCoord4dv; typedef void (APIENTRYP pfn_glTexCoord4f) (GLfloat, GLfloat, GLfloat, GLfloat); extern pfn_glTexCoord4f fp_glTexCoord4f; typedef void (APIENTRYP pfn_glTexCoord4fv) (const GLfloat*); extern pfn_glTexCoord4fv fp_glTexCoord4fv; typedef void (APIENTRYP pfn_glTexCoord4i) (GLint, GLint, GLint, GLint); extern pfn_glTexCoord4i fp_glTexCoord4i; typedef void (APIENTRYP pfn_glTexCoord4iv) (const GLint*); extern pfn_glTexCoord4iv fp_glTexCoord4iv; typedef void (APIENTRYP pfn_glTexCoord4s) (GLshort, GLshort, GLshort, GLshort); extern pfn_glTexCoord4s fp_glTexCoord4s; typedef void (APIENTRYP pfn_glTexCoord4sv) (const GLshort*); extern pfn_glTexCoord4sv fp_glTexCoord4sv; typedef void (APIENTRYP pfn_glVertex2d) (GLdouble, GLdouble); extern pfn_glVertex2d fp_glVertex2d; typedef void (APIENTRYP pfn_glVertex2dv) (const GLdouble*); extern pfn_glVertex2dv fp_glVertex2dv; typedef void (APIENTRYP pfn_glVertex2f) (GLfloat, GLfloat); extern pfn_glVertex2f fp_glVertex2f; typedef void (APIENTRYP pfn_glVertex2fv) (const GLfloat*); extern pfn_glVertex2fv fp_glVertex2fv; typedef void (APIENTRYP pfn_glVertex2i) (GLint, GLint); extern pfn_glVertex2i fp_glVertex2i; typedef void (APIENTRYP pfn_glVertex2iv) (const GLint*); extern pfn_glVertex2iv fp_glVertex2iv; typedef void (APIENTRYP pfn_glVertex2s) (GLshort, GLshort); extern pfn_glVertex2s fp_glVertex2s; typedef void (APIENTRYP pfn_glVertex2sv) (const GLshort*); extern pfn_glVertex2sv fp_glVertex2sv; typedef void (APIENTRYP pfn_glVertex3d) (GLdouble, GLdouble, GLdouble); extern pfn_glVertex3d fp_glVertex3d; typedef void (APIENTRYP pfn_glVertex3dv) (const GLdouble*); extern pfn_glVertex3dv fp_glVertex3dv; typedef void (APIENTRYP pfn_glVertex3f) (GLfloat, GLfloat, GLfloat); extern pfn_glVertex3f fp_glVertex3f; typedef void (APIENTRYP pfn_glVertex3fv) (const GLfloat*); extern pfn_glVertex3fv fp_glVertex3fv; typedef void (APIENTRYP pfn_glVertex3i) (GLint, GLint, GLint); extern pfn_glVertex3i fp_glVertex3i; typedef void (APIENTRYP pfn_glVertex3iv) (const GLint*); extern pfn_glVertex3iv fp_glVertex3iv; typedef void (APIENTRYP pfn_glVertex3s) (GLshort, GLshort, GLshort); extern pfn_glVertex3s fp_glVertex3s; typedef void (APIENTRYP pfn_glVertex3sv) (const GLshort*); extern pfn_glVertex3sv fp_glVertex3sv; typedef void (APIENTRYP pfn_glVertex4d) (GLdouble, GLdouble, GLdouble, GLdouble); extern pfn_glVertex4d fp_glVertex4d; typedef void (APIENTRYP pfn_glVertex4dv) (const GLdouble*); extern pfn_glVertex4dv fp_glVertex4dv; typedef void (APIENTRYP pfn_glVertex4f) (GLfloat, GLfloat, GLfloat, GLfloat); extern pfn_glVertex4f fp_glVertex4f; typedef void (APIENTRYP pfn_glVertex4fv) (const GLfloat*); extern pfn_glVertex4fv fp_glVertex4fv; typedef void (APIENTRYP pfn_glVertex4i) (GLint, GLint, GLint, GLint); extern pfn_glVertex4i fp_glVertex4i; typedef void (APIENTRYP pfn_glVertex4iv) (const GLint*); extern pfn_glVertex4iv fp_glVertex4iv; typedef void (APIENTRYP pfn_glVertex4s) (GLshort, GLshort, GLshort, GLshort); extern pfn_glVertex4s fp_glVertex4s; typedef void (APIENTRYP pfn_glVertex4sv) (const GLshort*); extern pfn_glVertex4sv fp_glVertex4sv; typedef void (APIENTRYP pfn_glClipPlane) (GLenum, const GLdouble*); extern pfn_glClipPlane fp_glClipPlane; typedef void (APIENTRYP pfn_glColorMaterial) (GLenum, GLenum); extern pfn_glColorMaterial fp_glColorMaterial; typedef void (APIENTRYP pfn_glFogf) (GLenum, GLfloat); extern pfn_glFogf fp_glFogf; typedef void (APIENTRYP pfn_glFogfv) (GLenum, const GLfloat*); extern pfn_glFogfv fp_glFogfv; typedef void (APIENTRYP pfn_glFogi) (GLenum, GLint); extern pfn_glFogi fp_glFogi; typedef void (APIENTRYP pfn_glFogiv) (GLenum, const GLint*); extern pfn_glFogiv fp_glFogiv; typedef void (APIENTRYP pfn_glLightf) (GLenum, GLenum, GLfloat); extern pfn_glLightf fp_glLightf; typedef void (APIENTRYP pfn_glLightfv) (GLenum, GLenum, const GLfloat*); extern pfn_glLightfv fp_glLightfv; typedef void (APIENTRYP pfn_glLighti) (GLenum, GLenum, GLint); extern pfn_glLighti fp_glLighti; typedef void (APIENTRYP pfn_glLightiv) (GLenum, GLenum, const GLint*); extern pfn_glLightiv fp_glLightiv; typedef void (APIENTRYP pfn_glLightModelf) (GLenum, GLfloat); extern pfn_glLightModelf fp_glLightModelf; typedef void (APIENTRYP pfn_glLightModelfv) (GLenum, const GLfloat*); extern pfn_glLightModelfv fp_glLightModelfv; typedef void (APIENTRYP pfn_glLightModeli) (GLenum, GLint); extern pfn_glLightModeli fp_glLightModeli; typedef void (APIENTRYP pfn_glLightModeliv) (GLenum, const GLint*); extern pfn_glLightModeliv fp_glLightModeliv; typedef void (APIENTRYP pfn_glLineStipple) (GLint, GLushort); extern pfn_glLineStipple fp_glLineStipple; typedef void (APIENTRYP pfn_glMaterialf) (GLenum, GLenum, GLfloat); extern pfn_glMaterialf fp_glMaterialf; typedef void (APIENTRYP pfn_glMaterialfv) (GLenum, GLenum, const GLfloat*); extern pfn_glMaterialfv fp_glMaterialfv; typedef void (APIENTRYP pfn_glMateriali) (GLenum, GLenum, GLint); extern pfn_glMateriali fp_glMateriali; typedef void (APIENTRYP pfn_glMaterialiv) (GLenum, GLenum, const GLint*); extern pfn_glMaterialiv fp_glMaterialiv; typedef void (APIENTRYP pfn_glPolygonStipple) (const GLubyte*); extern pfn_glPolygonStipple fp_glPolygonStipple; typedef void (APIENTRYP pfn_glShadeModel) (GLenum); extern pfn_glShadeModel fp_glShadeModel; typedef void (APIENTRYP pfn_glTexEnvf) (GLenum, GLenum, GLfloat); extern pfn_glTexEnvf fp_glTexEnvf; typedef void (APIENTRYP pfn_glTexEnvfv) (GLenum, GLenum, const GLfloat*); extern pfn_glTexEnvfv fp_glTexEnvfv; typedef void (APIENTRYP pfn_glTexEnvi) (GLenum, GLenum, GLint); extern pfn_glTexEnvi fp_glTexEnvi; typedef void (APIENTRYP pfn_glTexEnviv) (GLenum, GLenum, const GLint*); extern pfn_glTexEnviv fp_glTexEnviv; typedef void (APIENTRYP pfn_glTexGend) (GLenum, GLenum, GLdouble); extern pfn_glTexGend fp_glTexGend; typedef void (APIENTRYP pfn_glTexGendv) (GLenum, GLenum, const GLdouble*); extern pfn_glTexGendv fp_glTexGendv; typedef void (APIENTRYP pfn_glTexGenf) (GLenum, GLenum, GLfloat); extern pfn_glTexGenf fp_glTexGenf; typedef void (APIENTRYP pfn_glTexGenfv) (GLenum, GLenum, const GLfloat*); extern pfn_glTexGenfv fp_glTexGenfv; typedef void (APIENTRYP pfn_glTexGeni) (GLenum, GLenum, GLint); extern pfn_glTexGeni fp_glTexGeni; typedef void (APIENTRYP pfn_glTexGeniv) (GLenum, GLenum, const GLint*); extern pfn_glTexGeniv fp_glTexGeniv; typedef void (APIENTRYP pfn_glFeedbackBuffer) (GLsizei, GLenum, GLfloat*); extern pfn_glFeedbackBuffer fp_glFeedbackBuffer; typedef void (APIENTRYP pfn_glSelectBuffer) (GLsizei, GLuint*); extern pfn_glSelectBuffer fp_glSelectBuffer; typedef GLint (APIENTRYP pfn_glRenderMode) (GLenum); extern pfn_glRenderMode fp_glRenderMode; typedef void (APIENTRYP pfn_glInitNames) (); extern pfn_glInitNames fp_glInitNames; typedef void (APIENTRYP pfn_glLoadName) (GLuint); extern pfn_glLoadName fp_glLoadName; typedef void (APIENTRYP pfn_glPassThrough) (GLfloat); extern pfn_glPassThrough fp_glPassThrough; typedef void (APIENTRYP pfn_glPopName) (); extern pfn_glPopName fp_glPopName; typedef void (APIENTRYP pfn_glPushName) (GLuint); extern pfn_glPushName fp_glPushName; typedef void (APIENTRYP pfn_glClearAccum) (GLfloat, GLfloat, GLfloat, GLfloat); extern pfn_glClearAccum fp_glClearAccum; typedef void (APIENTRYP pfn_glClearIndex) (GLfloat); extern pfn_glClearIndex fp_glClearIndex; typedef void (APIENTRYP pfn_glIndexMask) (GLuint); extern pfn_glIndexMask fp_glIndexMask; typedef void (APIENTRYP pfn_glAccum) (GLenum, GLfloat); extern pfn_glAccum fp_glAccum; typedef void (APIENTRYP pfn_glPopAttrib) (); extern pfn_glPopAttrib fp_glPopAttrib; typedef void (APIENTRYP pfn_glPushAttrib) (GLbitfield); extern pfn_glPushAttrib fp_glPushAttrib; typedef void (APIENTRYP pfn_glMap1d) (GLenum, GLdouble, GLdouble, GLint, GLint, const GLdouble*); extern pfn_glMap1d fp_glMap1d; typedef void (APIENTRYP pfn_glMap1f) (GLenum, GLfloat, GLfloat, GLint, GLint, const GLfloat*); extern pfn_glMap1f fp_glMap1f; typedef void (APIENTRYP pfn_glMap2d) (GLenum, GLdouble, GLdouble, GLint, GLint, GLdouble, GLdouble, GLint, GLint, const GLdouble*); extern pfn_glMap2d fp_glMap2d; typedef void (APIENTRYP pfn_glMap2f) (GLenum, GLfloat, GLfloat, GLint, GLint, GLfloat, GLfloat, GLint, GLint, const GLfloat*); extern pfn_glMap2f fp_glMap2f; typedef void (APIENTRYP pfn_glMapGrid1d) (GLint, GLdouble, GLdouble); extern pfn_glMapGrid1d fp_glMapGrid1d; typedef void (APIENTRYP pfn_glMapGrid1f) (GLint, GLfloat, GLfloat); extern pfn_glMapGrid1f fp_glMapGrid1f; typedef void (APIENTRYP pfn_glMapGrid2d) (GLint, GLdouble, GLdouble, GLint, GLdouble, GLdouble); extern pfn_glMapGrid2d fp_glMapGrid2d; typedef void (APIENTRYP pfn_glMapGrid2f) (GLint, GLfloat, GLfloat, GLint, GLfloat, GLfloat); extern pfn_glMapGrid2f fp_glMapGrid2f; typedef void (APIENTRYP pfn_glEvalCoord1d) (GLdouble); extern pfn_glEvalCoord1d fp_glEvalCoord1d; typedef void (APIENTRYP pfn_glEvalCoord1dv) (const GLdouble*); extern pfn_glEvalCoord1dv fp_glEvalCoord1dv; typedef void (APIENTRYP pfn_glEvalCoord1f) (GLfloat); extern pfn_glEvalCoord1f fp_glEvalCoord1f; typedef void (APIENTRYP pfn_glEvalCoord1fv) (const GLfloat*); extern pfn_glEvalCoord1fv fp_glEvalCoord1fv; typedef void (APIENTRYP pfn_glEvalCoord2d) (GLdouble, GLdouble); extern pfn_glEvalCoord2d fp_glEvalCoord2d; typedef void (APIENTRYP pfn_glEvalCoord2dv) (const GLdouble*); extern pfn_glEvalCoord2dv fp_glEvalCoord2dv; typedef void (APIENTRYP pfn_glEvalCoord2f) (GLfloat, GLfloat); extern pfn_glEvalCoord2f fp_glEvalCoord2f; typedef void (APIENTRYP pfn_glEvalCoord2fv) (const GLfloat*); extern pfn_glEvalCoord2fv fp_glEvalCoord2fv; typedef void (APIENTRYP pfn_glEvalMesh1) (GLenum, GLint, GLint); extern pfn_glEvalMesh1 fp_glEvalMesh1; typedef void (APIENTRYP pfn_glEvalPoint1) (GLint); extern pfn_glEvalPoint1 fp_glEvalPoint1; typedef void (APIENTRYP pfn_glEvalMesh2) (GLenum, GLint, GLint, GLint, GLint); extern pfn_glEvalMesh2 fp_glEvalMesh2; typedef void (APIENTRYP pfn_glEvalPoint2) (GLint, GLint); extern pfn_glEvalPoint2 fp_glEvalPoint2; typedef void (APIENTRYP pfn_glAlphaFunc) (GLenum, GLfloat); extern pfn_glAlphaFunc fp_glAlphaFunc; typedef void (APIENTRYP pfn_glPixelZoom) (GLfloat, GLfloat); extern pfn_glPixelZoom fp_glPixelZoom; typedef void (APIENTRYP pfn_glPixelTransferf) (GLenum, GLfloat); extern pfn_glPixelTransferf fp_glPixelTransferf; typedef void (APIENTRYP pfn_glPixelTransferi) (GLenum, GLint); extern pfn_glPixelTransferi fp_glPixelTransferi; typedef void (APIENTRYP pfn_glPixelMapfv) (GLenum, GLsizei, const GLfloat*); extern pfn_glPixelMapfv fp_glPixelMapfv; typedef void (APIENTRYP pfn_glPixelMapuiv) (GLenum, GLsizei, const GLuint*); extern pfn_glPixelMapuiv fp_glPixelMapuiv; typedef void (APIENTRYP pfn_glPixelMapusv) (GLenum, GLsizei, const GLushort*); extern pfn_glPixelMapusv fp_glPixelMapusv; typedef void (APIENTRYP pfn_glCopyPixels) (GLint, GLint, GLsizei, GLsizei, GLenum); extern pfn_glCopyPixels fp_glCopyPixels; typedef void (APIENTRYP pfn_glDrawPixels) (GLsizei, GLsizei, GLenum, GLenum, const void*); extern pfn_glDrawPixels fp_glDrawPixels; typedef void (APIENTRYP pfn_glGetClipPlane) (GLenum, GLdouble*); extern pfn_glGetClipPlane fp_glGetClipPlane; typedef void (APIENTRYP pfn_glGetLightfv) (GLenum, GLenum, GLfloat*); extern pfn_glGetLightfv fp_glGetLightfv; typedef void (APIENTRYP pfn_glGetLightiv) (GLenum, GLenum, GLint*); extern pfn_glGetLightiv fp_glGetLightiv; typedef void (APIENTRYP pfn_glGetMapdv) (GLenum, GLenum, GLdouble*); extern pfn_glGetMapdv fp_glGetMapdv; typedef void (APIENTRYP pfn_glGetMapfv) (GLenum, GLenum, GLfloat*); extern pfn_glGetMapfv fp_glGetMapfv; typedef void (APIENTRYP pfn_glGetMapiv) (GLenum, GLenum, GLint*); extern pfn_glGetMapiv fp_glGetMapiv; typedef void (APIENTRYP pfn_glGetMaterialfv) (GLenum, GLenum, GLfloat*); extern pfn_glGetMaterialfv fp_glGetMaterialfv; typedef void (APIENTRYP pfn_glGetMaterialiv) (GLenum, GLenum, GLint*); extern pfn_glGetMaterialiv fp_glGetMaterialiv; typedef void (APIENTRYP pfn_glGetPixelMapfv) (GLenum, GLfloat*); extern pfn_glGetPixelMapfv fp_glGetPixelMapfv; typedef void (APIENTRYP pfn_glGetPixelMapuiv) (GLenum, GLuint*); extern pfn_glGetPixelMapuiv fp_glGetPixelMapuiv; typedef void (APIENTRYP pfn_glGetPixelMapusv) (GLenum, GLushort*); extern pfn_glGetPixelMapusv fp_glGetPixelMapusv; typedef void (APIENTRYP pfn_glGetPolygonStipple) (GLubyte*); extern pfn_glGetPolygonStipple fp_glGetPolygonStipple; typedef void (APIENTRYP pfn_glGetTexEnvfv) (GLenum, GLenum, GLfloat*); extern pfn_glGetTexEnvfv fp_glGetTexEnvfv; typedef void (APIENTRYP pfn_glGetTexEnviv) (GLenum, GLenum, GLint*); extern pfn_glGetTexEnviv fp_glGetTexEnviv; typedef void (APIENTRYP pfn_glGetTexGendv) (GLenum, GLenum, GLdouble*); extern pfn_glGetTexGendv fp_glGetTexGendv; typedef void (APIENTRYP pfn_glGetTexGenfv) (GLenum, GLenum, GLfloat*); extern pfn_glGetTexGenfv fp_glGetTexGenfv; typedef void (APIENTRYP pfn_glGetTexGeniv) (GLenum, GLenum, GLint*); extern pfn_glGetTexGeniv fp_glGetTexGeniv; typedef GLboolean (APIENTRYP pfn_glIsList) (GLuint); extern pfn_glIsList fp_glIsList; typedef void (APIENTRYP pfn_glFrustum) (GLdouble, GLdouble, GLdouble, GLdouble, GLdouble, GLdouble); extern pfn_glFrustum fp_glFrustum; typedef void (APIENTRYP pfn_glLoadIdentity) (); extern pfn_glLoadIdentity fp_glLoadIdentity; typedef void (APIENTRYP pfn_glLoadMatrixf) (const GLfloat*); extern pfn_glLoadMatrixf fp_glLoadMatrixf; typedef void (APIENTRYP pfn_glLoadMatrixd) (const GLdouble*); extern pfn_glLoadMatrixd fp_glLoadMatrixd; typedef void (APIENTRYP pfn_glMatrixMode) (GLenum); extern pfn_glMatrixMode fp_glMatrixMode; typedef void (APIENTRYP pfn_glMultMatrixf) (const GLfloat*); extern pfn_glMultMatrixf fp_glMultMatrixf; typedef void (APIENTRYP pfn_glMultMatrixd) (const GLdouble*); extern pfn_glMultMatrixd fp_glMultMatrixd; typedef void (APIENTRYP pfn_glOrtho) (GLdouble, GLdouble, GLdouble, GLdouble, GLdouble, GLdouble); extern pfn_glOrtho fp_glOrtho; typedef void (APIENTRYP pfn_glPopMatrix) (); extern pfn_glPopMatrix fp_glPopMatrix; typedef void (APIENTRYP pfn_glPushMatrix) (); extern pfn_glPushMatrix fp_glPushMatrix; typedef void (APIENTRYP pfn_glRotated) (GLdouble, GLdouble, GLdouble, GLdouble); extern pfn_glRotated fp_glRotated; typedef void (APIENTRYP pfn_glRotatef) (GLfloat, GLfloat, GLfloat, GLfloat); extern pfn_glRotatef fp_glRotatef; typedef void (APIENTRYP pfn_glScaled) (GLdouble, GLdouble, GLdouble); extern pfn_glScaled fp_glScaled; typedef void (APIENTRYP pfn_glScalef) (GLfloat, GLfloat, GLfloat); extern pfn_glScalef fp_glScalef; typedef void (APIENTRYP pfn_glTranslated) (GLdouble, GLdouble, GLdouble); extern pfn_glTranslated fp_glTranslated; typedef void (APIENTRYP pfn_glTranslatef) (GLfloat, GLfloat, GLfloat); extern pfn_glTranslatef fp_glTranslatef; /* GL_VERSION_1_1 */ extern GLboolean GLAD_VERSION_1_1; #define GL_DEPTH_BUFFER_BIT 0x00000100 #define GL_STENCIL_BUFFER_BIT 0x00000400 #define GL_COLOR_BUFFER_BIT 0x00004000 #define GL_FALSE 0 #define GL_TRUE 1 #define GL_POINTS 0x0000 #define GL_LINES 0x0001 #define GL_LINE_LOOP 0x0002 #define GL_LINE_STRIP 0x0003 #define GL_TRIANGLES 0x0004 #define GL_TRIANGLE_STRIP 0x0005 #define GL_TRIANGLE_FAN 0x0006 #define GL_QUADS 0x0007 #define GL_NEVER 0x0200 #define GL_LESS 0x0201 #define GL_EQUAL 0x0202 #define GL_LEQUAL 0x0203 #define GL_GREATER 0x0204 #define GL_NOTEQUAL 0x0205 #define GL_GEQUAL 0x0206 #define GL_ALWAYS 0x0207 #define GL_ZERO 0 #define GL_ONE 1 #define GL_SRC_COLOR 0x0300 #define GL_ONE_MINUS_SRC_COLOR 0x0301 #define GL_SRC_ALPHA 0x0302 #define GL_ONE_MINUS_SRC_ALPHA 0x0303 #define GL_DST_ALPHA 0x0304 #define GL_ONE_MINUS_DST_ALPHA 0x0305 #define GL_DST_COLOR 0x0306 #define GL_ONE_MINUS_DST_COLOR 0x0307 #define GL_SRC_ALPHA_SATURATE 0x0308 #define GL_NONE 0 #define GL_FRONT_LEFT 0x0400 #define GL_FRONT_RIGHT 0x0401 #define GL_BACK_LEFT 0x0402 #define GL_BACK_RIGHT 0x0403 #define GL_FRONT 0x0404 #define GL_BACK 0x0405 #define GL_LEFT 0x0406 #define GL_RIGHT 0x0407 #define GL_FRONT_AND_BACK 0x0408 #define GL_NO_ERROR 0 #define GL_INVALID_ENUM 0x0500 #define GL_INVALID_VALUE 0x0501 #define GL_INVALID_OPERATION 0x0502 #define GL_OUT_OF_MEMORY 0x0505 #define GL_CW 0x0900 #define GL_CCW 0x0901 #define GL_POINT_SIZE 0x0B11 #define GL_POINT_SIZE_RANGE 0x0B12 #define GL_POINT_SIZE_GRANULARITY 0x0B13 #define GL_LINE_SMOOTH 0x0B20 #define GL_LINE_WIDTH 0x0B21 #define GL_LINE_WIDTH_RANGE 0x0B22 #define GL_LINE_WIDTH_GRANULARITY 0x0B23 #define GL_POLYGON_MODE 0x0B40 #define GL_POLYGON_SMOOTH 0x0B41 #define GL_CULL_FACE 0x0B44 #define GL_CULL_FACE_MODE 0x0B45 #define GL_FRONT_FACE 0x0B46 #define GL_DEPTH_RANGE 0x0B70 #define GL_DEPTH_TEST 0x0B71 #define GL_DEPTH_WRITEMASK 0x0B72 #define GL_DEPTH_CLEAR_VALUE 0x0B73 #define GL_DEPTH_FUNC 0x0B74 #define GL_STENCIL_TEST 0x0B90 #define GL_STENCIL_CLEAR_VALUE 0x0B91 #define GL_STENCIL_FUNC 0x0B92 #define GL_STENCIL_VALUE_MASK 0x0B93 #define GL_STENCIL_FAIL 0x0B94 #define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95 #define GL_STENCIL_PASS_DEPTH_PASS 0x0B96 #define GL_STENCIL_REF 0x0B97 #define GL_STENCIL_WRITEMASK 0x0B98 #define GL_VIEWPORT 0x0BA2 #define GL_DITHER 0x0BD0 #define GL_BLEND_DST 0x0BE0 #define GL_BLEND_SRC 0x0BE1 #define GL_BLEND 0x0BE2 #define GL_LOGIC_OP_MODE 0x0BF0 #define GL_COLOR_LOGIC_OP 0x0BF2 #define GL_DRAW_BUFFER 0x0C01 #define GL_READ_BUFFER 0x0C02 #define GL_SCISSOR_BOX 0x0C10 #define GL_SCISSOR_TEST 0x0C11 #define GL_COLOR_CLEAR_VALUE 0x0C22 #define GL_COLOR_WRITEMASK 0x0C23 #define GL_DOUBLEBUFFER 0x0C32 #define GL_STEREO 0x0C33 #define GL_LINE_SMOOTH_HINT 0x0C52 #define GL_POLYGON_SMOOTH_HINT 0x0C53 #define GL_UNPACK_SWAP_BYTES 0x0CF0 #define GL_UNPACK_LSB_FIRST 0x0CF1 #define GL_UNPACK_ROW_LENGTH 0x0CF2 #define GL_UNPACK_SKIP_ROWS 0x0CF3 #define GL_UNPACK_SKIP_PIXELS 0x0CF4 #define GL_UNPACK_ALIGNMENT 0x0CF5 #define GL_PACK_SWAP_BYTES 0x0D00 #define GL_PACK_LSB_FIRST 0x0D01 #define GL_PACK_ROW_LENGTH 0x0D02 #define GL_PACK_SKIP_ROWS 0x0D03 #define GL_PACK_SKIP_PIXELS 0x0D04 #define GL_PACK_ALIGNMENT 0x0D05 #define GL_MAX_TEXTURE_SIZE 0x0D33 #define GL_MAX_VIEWPORT_DIMS 0x0D3A #define GL_SUBPIXEL_BITS 0x0D50 #define GL_TEXTURE_1D 0x0DE0 #define GL_TEXTURE_2D 0x0DE1 #define GL_POLYGON_OFFSET_UNITS 0x2A00 #define GL_POLYGON_OFFSET_POINT 0x2A01 #define GL_POLYGON_OFFSET_LINE 0x2A02 #define GL_POLYGON_OFFSET_FILL 0x8037 #define GL_POLYGON_OFFSET_FACTOR 0x8038 #define GL_TEXTURE_BINDING_1D 0x8068 #define GL_TEXTURE_BINDING_2D 0x8069 #define GL_TEXTURE_WIDTH 0x1000 #define GL_TEXTURE_HEIGHT 0x1001 #define GL_TEXTURE_INTERNAL_FORMAT 0x1003 #define GL_TEXTURE_BORDER_COLOR 0x1004 #define GL_TEXTURE_RED_SIZE 0x805C #define GL_TEXTURE_GREEN_SIZE 0x805D #define GL_TEXTURE_BLUE_SIZE 0x805E #define GL_TEXTURE_ALPHA_SIZE 0x805F #define GL_DONT_CARE 0x1100 #define GL_FASTEST 0x1101 #define GL_NICEST 0x1102 #define GL_BYTE 0x1400 #define GL_UNSIGNED_BYTE 0x1401 #define GL_SHORT 0x1402 #define GL_UNSIGNED_SHORT 0x1403 #define GL_INT 0x1404 #define GL_UNSIGNED_INT 0x1405 #define GL_FLOAT 0x1406 #define GL_DOUBLE 0x140A #define GL_STACK_OVERFLOW 0x0503 #define GL_STACK_UNDERFLOW 0x0504 #define GL_CLEAR 0x1500 #define GL_AND 0x1501 #define GL_AND_REVERSE 0x1502 #define GL_COPY 0x1503 #define GL_AND_INVERTED 0x1504 #define GL_NOOP 0x1505 #define GL_XOR 0x1506 #define GL_OR 0x1507 #define GL_NOR 0x1508 #define GL_EQUIV 0x1509 #define GL_INVERT 0x150A #define GL_OR_REVERSE 0x150B #define GL_COPY_INVERTED 0x150C #define GL_OR_INVERTED 0x150D #define GL_NAND 0x150E #define GL_SET 0x150F #define GL_TEXTURE 0x1702 #define GL_COLOR 0x1800 #define GL_DEPTH 0x1801 #define GL_STENCIL 0x1802 #define GL_STENCIL_INDEX 0x1901 #define GL_DEPTH_COMPONENT 0x1902 #define GL_RED 0x1903 #define GL_GREEN 0x1904 #define GL_BLUE 0x1905 #define GL_ALPHA 0x1906 #define GL_RGB 0x1907 #define GL_RGBA 0x1908 #define GL_POINT 0x1B00 #define GL_LINE 0x1B01 #define GL_FILL 0x1B02 #define GL_KEEP 0x1E00 #define GL_REPLACE 0x1E01 #define GL_INCR 0x1E02 #define GL_DECR 0x1E03 #define GL_VENDOR 0x1F00 #define GL_RENDERER 0x1F01 #define GL_VERSION 0x1F02 #define GL_EXTENSIONS 0x1F03 #define GL_NEAREST 0x2600 #define GL_LINEAR 0x2601 #define GL_NEAREST_MIPMAP_NEAREST 0x2700 #define GL_LINEAR_MIPMAP_NEAREST 0x2701 #define GL_NEAREST_MIPMAP_LINEAR 0x2702 #define GL_LINEAR_MIPMAP_LINEAR 0x2703 #define GL_TEXTURE_MAG_FILTER 0x2800 #define GL_TEXTURE_MIN_FILTER 0x2801 #define GL_TEXTURE_WRAP_S 0x2802 #define GL_TEXTURE_WRAP_T 0x2803 #define GL_PROXY_TEXTURE_1D 0x8063 #define GL_PROXY_TEXTURE_2D 0x8064 #define GL_REPEAT 0x2901 #define GL_R3_G3_B2 0x2A10 #define GL_RGB4 0x804F #define GL_RGB5 0x8050 #define GL_RGB8 0x8051 #define GL_RGB10 0x8052 #define GL_RGB12 0x8053 #define GL_RGB16 0x8054 #define GL_RGBA2 0x8055 #define GL_RGBA4 0x8056 #define GL_RGB5_A1 0x8057 #define GL_RGBA8 0x8058 #define GL_RGB10_A2 0x8059 #define GL_RGBA12 0x805A #define GL_RGBA16 0x805B #define GL_CURRENT_BIT 0x00000001 #define GL_POINT_BIT 0x00000002 #define GL_LINE_BIT 0x00000004 #define GL_POLYGON_BIT 0x00000008 #define GL_POLYGON_STIPPLE_BIT 0x00000010 #define GL_PIXEL_MODE_BIT 0x00000020 #define GL_LIGHTING_BIT 0x00000040 #define GL_FOG_BIT 0x00000080 #define GL_ACCUM_BUFFER_BIT 0x00000200 #define GL_VIEWPORT_BIT 0x00000800 #define GL_TRANSFORM_BIT 0x00001000 #define GL_ENABLE_BIT 0x00002000 #define GL_HINT_BIT 0x00008000 #define GL_EVAL_BIT 0x00010000 #define GL_LIST_BIT 0x00020000 #define GL_TEXTURE_BIT 0x00040000 #define GL_SCISSOR_BIT 0x00080000 #define GL_ALL_ATTRIB_BITS 0xFFFFFFFF #define GL_CLIENT_PIXEL_STORE_BIT 0x00000001 #define GL_CLIENT_VERTEX_ARRAY_BIT 0x00000002 #define GL_CLIENT_ALL_ATTRIB_BITS 0xFFFFFFFF #define GL_QUAD_STRIP 0x0008 #define GL_POLYGON 0x0009 #define GL_ACCUM 0x0100 #define GL_LOAD 0x0101 #define GL_RETURN 0x0102 #define GL_MULT 0x0103 #define GL_ADD 0x0104 #define GL_AUX0 0x0409 #define GL_AUX1 0x040A #define GL_AUX2 0x040B #define GL_AUX3 0x040C #define GL_2D 0x0600 #define GL_3D 0x0601 #define GL_3D_COLOR 0x0602 #define GL_3D_COLOR_TEXTURE 0x0603 #define GL_4D_COLOR_TEXTURE 0x0604 #define GL_PASS_THROUGH_TOKEN 0x0700 #define GL_POINT_TOKEN 0x0701 #define GL_LINE_TOKEN 0x0702 #define GL_POLYGON_TOKEN 0x0703 #define GL_BITMAP_TOKEN 0x0704 #define GL_DRAW_PIXEL_TOKEN 0x0705 #define GL_COPY_PIXEL_TOKEN 0x0706 #define GL_LINE_RESET_TOKEN 0x0707 #define GL_EXP 0x0800 #define GL_EXP2 0x0801 #define GL_COEFF 0x0A00 #define GL_ORDER 0x0A01 #define GL_DOMAIN 0x0A02 #define GL_PIXEL_MAP_I_TO_I 0x0C70 #define GL_PIXEL_MAP_S_TO_S 0x0C71 #define GL_PIXEL_MAP_I_TO_R 0x0C72 #define GL_PIXEL_MAP_I_TO_G 0x0C73 #define GL_PIXEL_MAP_I_TO_B 0x0C74 #define GL_PIXEL_MAP_I_TO_A 0x0C75 #define GL_PIXEL_MAP_R_TO_R 0x0C76 #define GL_PIXEL_MAP_G_TO_G 0x0C77 #define GL_PIXEL_MAP_B_TO_B 0x0C78 #define GL_PIXEL_MAP_A_TO_A 0x0C79 #define GL_VERTEX_ARRAY_POINTER 0x808E #define GL_NORMAL_ARRAY_POINTER 0x808F #define GL_COLOR_ARRAY_POINTER 0x8090 #define GL_INDEX_ARRAY_POINTER 0x8091 #define GL_TEXTURE_COORD_ARRAY_POINTER 0x8092 #define GL_EDGE_FLAG_ARRAY_POINTER 0x8093 #define GL_FEEDBACK_BUFFER_POINTER 0x0DF0 #define GL_SELECTION_BUFFER_POINTER 0x0DF3 #define GL_CURRENT_COLOR 0x0B00 #define GL_CURRENT_INDEX 0x0B01 #define GL_CURRENT_NORMAL 0x0B02 #define GL_CURRENT_TEXTURE_COORDS 0x0B03 #define GL_CURRENT_RASTER_COLOR 0x0B04 #define GL_CURRENT_RASTER_INDEX 0x0B05 #define GL_CURRENT_RASTER_TEXTURE_COORDS 0x0B06 #define GL_CURRENT_RASTER_POSITION 0x0B07 #define GL_CURRENT_RASTER_POSITION_VALID 0x0B08 #define GL_CURRENT_RASTER_DISTANCE 0x0B09 #define GL_POINT_SMOOTH 0x0B10 #define GL_LINE_STIPPLE 0x0B24 #define GL_LINE_STIPPLE_PATTERN 0x0B25 #define GL_LINE_STIPPLE_REPEAT 0x0B26 #define GL_LIST_MODE 0x0B30 #define GL_MAX_LIST_NESTING 0x0B31 #define GL_LIST_BASE 0x0B32 #define GL_LIST_INDEX 0x0B33 #define GL_POLYGON_STIPPLE 0x0B42 #define GL_EDGE_FLAG 0x0B43 #define GL_LIGHTING 0x0B50 #define GL_LIGHT_MODEL_LOCAL_VIEWER 0x0B51 #define GL_LIGHT_MODEL_TWO_SIDE 0x0B52 #define GL_LIGHT_MODEL_AMBIENT 0x0B53 #define GL_SHADE_MODEL 0x0B54 #define GL_COLOR_MATERIAL_FACE 0x0B55 #define GL_COLOR_MATERIAL_PARAMETER 0x0B56 #define GL_COLOR_MATERIAL 0x0B57 #define GL_FOG 0x0B60 #define GL_FOG_INDEX 0x0B61 #define GL_FOG_DENSITY 0x0B62 #define GL_FOG_START 0x0B63 #define GL_FOG_END 0x0B64 #define GL_FOG_MODE 0x0B65 #define GL_FOG_COLOR 0x0B66 #define GL_ACCUM_CLEAR_VALUE 0x0B80 #define GL_MATRIX_MODE 0x0BA0 #define GL_NORMALIZE 0x0BA1 #define GL_MODELVIEW_STACK_DEPTH 0x0BA3 #define GL_PROJECTION_STACK_DEPTH 0x0BA4 #define GL_TEXTURE_STACK_DEPTH 0x0BA5 #define GL_MODELVIEW_MATRIX 0x0BA6 #define GL_PROJECTION_MATRIX 0x0BA7 #define GL_TEXTURE_MATRIX 0x0BA8 #define GL_ATTRIB_STACK_DEPTH 0x0BB0 #define GL_CLIENT_ATTRIB_STACK_DEPTH 0x0BB1 #define GL_ALPHA_TEST 0x0BC0 #define GL_ALPHA_TEST_FUNC 0x0BC1 #define GL_ALPHA_TEST_REF 0x0BC2 #define GL_INDEX_LOGIC_OP 0x0BF1 #define GL_LOGIC_OP 0x0BF1 #define GL_AUX_BUFFERS 0x0C00 #define GL_INDEX_CLEAR_VALUE 0x0C20 #define GL_INDEX_WRITEMASK 0x0C21 #define GL_INDEX_MODE 0x0C30 #define GL_RGBA_MODE 0x0C31 #define GL_RENDER_MODE 0x0C40 #define GL_PERSPECTIVE_CORRECTION_HINT 0x0C50 #define GL_POINT_SMOOTH_HINT 0x0C51 #define GL_FOG_HINT 0x0C54 #define GL_TEXTURE_GEN_S 0x0C60 #define GL_TEXTURE_GEN_T 0x0C61 #define GL_TEXTURE_GEN_R 0x0C62 #define GL_TEXTURE_GEN_Q 0x0C63 #define GL_PIXEL_MAP_I_TO_I_SIZE 0x0CB0 #define GL_PIXEL_MAP_S_TO_S_SIZE 0x0CB1 #define GL_PIXEL_MAP_I_TO_R_SIZE 0x0CB2 #define GL_PIXEL_MAP_I_TO_G_SIZE 0x0CB3 #define GL_PIXEL_MAP_I_TO_B_SIZE 0x0CB4 #define GL_PIXEL_MAP_I_TO_A_SIZE 0x0CB5 #define GL_PIXEL_MAP_R_TO_R_SIZE 0x0CB6 #define GL_PIXEL_MAP_G_TO_G_SIZE 0x0CB7 #define GL_PIXEL_MAP_B_TO_B_SIZE 0x0CB8 #define GL_PIXEL_MAP_A_TO_A_SIZE 0x0CB9 #define GL_MAP_COLOR 0x0D10 #define GL_MAP_STENCIL 0x0D11 #define GL_INDEX_SHIFT 0x0D12 #define GL_INDEX_OFFSET 0x0D13 #define GL_RED_SCALE 0x0D14 #define GL_RED_BIAS 0x0D15 #define GL_ZOOM_X 0x0D16 #define GL_ZOOM_Y 0x0D17 #define GL_GREEN_SCALE 0x0D18 #define GL_GREEN_BIAS 0x0D19 #define GL_BLUE_SCALE 0x0D1A #define GL_BLUE_BIAS 0x0D1B #define GL_ALPHA_SCALE 0x0D1C #define GL_ALPHA_BIAS 0x0D1D #define GL_DEPTH_SCALE 0x0D1E #define GL_DEPTH_BIAS 0x0D1F #define GL_MAX_EVAL_ORDER 0x0D30 #define GL_MAX_LIGHTS 0x0D31 #define GL_MAX_CLIP_PLANES 0x0D32 #define GL_MAX_PIXEL_MAP_TABLE 0x0D34 #define GL_MAX_ATTRIB_STACK_DEPTH 0x0D35 #define GL_MAX_MODELVIEW_STACK_DEPTH 0x0D36 #define GL_MAX_NAME_STACK_DEPTH 0x0D37 #define GL_MAX_PROJECTION_STACK_DEPTH 0x0D38 #define GL_MAX_TEXTURE_STACK_DEPTH 0x0D39 #define GL_MAX_CLIENT_ATTRIB_STACK_DEPTH 0x0D3B #define GL_INDEX_BITS 0x0D51 #define GL_RED_BITS 0x0D52 #define GL_GREEN_BITS 0x0D53 #define GL_BLUE_BITS 0x0D54 #define GL_ALPHA_BITS 0x0D55 #define GL_DEPTH_BITS 0x0D56 #define GL_STENCIL_BITS 0x0D57 #define GL_ACCUM_RED_BITS 0x0D58 #define GL_ACCUM_GREEN_BITS 0x0D59 #define GL_ACCUM_BLUE_BITS 0x0D5A #define GL_ACCUM_ALPHA_BITS 0x0D5B #define GL_NAME_STACK_DEPTH 0x0D70 #define GL_AUTO_NORMAL 0x0D80 #define GL_MAP1_COLOR_4 0x0D90 #define GL_MAP1_INDEX 0x0D91 #define GL_MAP1_NORMAL 0x0D92 #define GL_MAP1_TEXTURE_COORD_1 0x0D93 #define GL_MAP1_TEXTURE_COORD_2 0x0D94 #define GL_MAP1_TEXTURE_COORD_3 0x0D95 #define GL_MAP1_TEXTURE_COORD_4 0x0D96 #define GL_MAP1_VERTEX_3 0x0D97 #define GL_MAP1_VERTEX_4 0x0D98 #define GL_MAP2_COLOR_4 0x0DB0 #define GL_MAP2_INDEX 0x0DB1 #define GL_MAP2_NORMAL 0x0DB2 #define GL_MAP2_TEXTURE_COORD_1 0x0DB3 #define GL_MAP2_TEXTURE_COORD_2 0x0DB4 #define GL_MAP2_TEXTURE_COORD_3 0x0DB5 #define GL_MAP2_TEXTURE_COORD_4 0x0DB6 #define GL_MAP2_VERTEX_3 0x0DB7 #define GL_MAP2_VERTEX_4 0x0DB8 #define GL_MAP1_GRID_DOMAIN 0x0DD0 #define GL_MAP1_GRID_SEGMENTS 0x0DD1 #define GL_MAP2_GRID_DOMAIN 0x0DD2 #define GL_MAP2_GRID_SEGMENTS 0x0DD3 #define GL_FEEDBACK_BUFFER_SIZE 0x0DF1 #define GL_FEEDBACK_BUFFER_TYPE 0x0DF2 #define GL_SELECTION_BUFFER_SIZE 0x0DF4 #define GL_VERTEX_ARRAY 0x8074 #define GL_NORMAL_ARRAY 0x8075 #define GL_COLOR_ARRAY 0x8076 #define GL_INDEX_ARRAY 0x8077 #define GL_TEXTURE_COORD_ARRAY 0x8078 #define GL_EDGE_FLAG_ARRAY 0x8079 #define GL_VERTEX_ARRAY_SIZE 0x807A #define GL_VERTEX_ARRAY_TYPE 0x807B #define GL_VERTEX_ARRAY_STRIDE 0x807C #define GL_NORMAL_ARRAY_TYPE 0x807E #define GL_NORMAL_ARRAY_STRIDE 0x807F #define GL_COLOR_ARRAY_SIZE 0x8081 #define GL_COLOR_ARRAY_TYPE 0x8082 #define GL_COLOR_ARRAY_STRIDE 0x8083 #define GL_INDEX_ARRAY_TYPE 0x8085 #define GL_INDEX_ARRAY_STRIDE 0x8086 #define GL_TEXTURE_COORD_ARRAY_SIZE 0x8088 #define GL_TEXTURE_COORD_ARRAY_TYPE 0x8089 #define GL_TEXTURE_COORD_ARRAY_STRIDE 0x808A #define GL_EDGE_FLAG_ARRAY_STRIDE 0x808C #define GL_TEXTURE_COMPONENTS 0x1003 #define GL_TEXTURE_BORDER 0x1005 #define GL_TEXTURE_LUMINANCE_SIZE 0x8060 #define GL_TEXTURE_INTENSITY_SIZE 0x8061 #define GL_TEXTURE_PRIORITY 0x8066 #define GL_TEXTURE_RESIDENT 0x8067 #define GL_AMBIENT 0x1200 #define GL_DIFFUSE 0x1201 #define GL_SPECULAR 0x1202 #define GL_POSITION 0x1203 #define GL_SPOT_DIRECTION 0x1204 #define GL_SPOT_EXPONENT 0x1205 #define GL_SPOT_CUTOFF 0x1206 #define GL_CONSTANT_ATTENUATION 0x1207 #define GL_LINEAR_ATTENUATION 0x1208 #define GL_QUADRATIC_ATTENUATION 0x1209 #define GL_COMPILE 0x1300 #define GL_COMPILE_AND_EXECUTE 0x1301 #define GL_2_BYTES 0x1407 #define GL_3_BYTES 0x1408 #define GL_4_BYTES 0x1409 #define GL_EMISSION 0x1600 #define GL_SHININESS 0x1601 #define GL_AMBIENT_AND_DIFFUSE 0x1602 #define GL_COLOR_INDEXES 0x1603 #define GL_MODELVIEW 0x1700 #define GL_PROJECTION 0x1701 #define GL_COLOR_INDEX 0x1900 #define GL_LUMINANCE 0x1909 #define GL_LUMINANCE_ALPHA 0x190A #define GL_BITMAP 0x1A00 #define GL_RENDER 0x1C00 #define GL_FEEDBACK 0x1C01 #define GL_SELECT 0x1C02 #define GL_FLAT 0x1D00 #define GL_SMOOTH 0x1D01 #define GL_S 0x2000 #define GL_T 0x2001 #define GL_R 0x2002 #define GL_Q 0x2003 #define GL_MODULATE 0x2100 #define GL_DECAL 0x2101 #define GL_TEXTURE_ENV_MODE 0x2200 #define GL_TEXTURE_ENV_COLOR 0x2201 #define GL_TEXTURE_ENV 0x2300 #define GL_EYE_LINEAR 0x2400 #define GL_OBJECT_LINEAR 0x2401 #define GL_SPHERE_MAP 0x2402 #define GL_TEXTURE_GEN_MODE 0x2500 #define GL_OBJECT_PLANE 0x2501 #define GL_EYE_PLANE 0x2502 #define GL_CLAMP 0x2900 #define GL_ALPHA4 0x803B #define GL_ALPHA8 0x803C #define GL_ALPHA12 0x803D #define GL_ALPHA16 0x803E #define GL_LUMINANCE4 0x803F #define GL_LUMINANCE8 0x8040 #define GL_LUMINANCE12 0x8041 #define GL_LUMINANCE16 0x8042 #define GL_LUMINANCE4_ALPHA4 0x8043 #define GL_LUMINANCE6_ALPHA2 0x8044 #define GL_LUMINANCE8_ALPHA8 0x8045 #define GL_LUMINANCE12_ALPHA4 0x8046 #define GL_LUMINANCE12_ALPHA12 0x8047 #define GL_LUMINANCE16_ALPHA16 0x8048 #define GL_INTENSITY 0x8049 #define GL_INTENSITY4 0x804A #define GL_INTENSITY8 0x804B #define GL_INTENSITY12 0x804C #define GL_INTENSITY16 0x804D #define GL_V2F 0x2A20 #define GL_V3F 0x2A21 #define GL_C4UB_V2F 0x2A22 #define GL_C4UB_V3F 0x2A23 #define GL_C3F_V3F 0x2A24 #define GL_N3F_V3F 0x2A25 #define GL_C4F_N3F_V3F 0x2A26 #define GL_T2F_V3F 0x2A27 #define GL_T4F_V4F 0x2A28 #define GL_T2F_C4UB_V3F 0x2A29 #define GL_T2F_C3F_V3F 0x2A2A #define GL_T2F_N3F_V3F 0x2A2B #define GL_T2F_C4F_N3F_V3F 0x2A2C #define GL_T4F_C4F_N3F_V4F 0x2A2D #define GL_CLIP_PLANE0 0x3000 #define GL_CLIP_PLANE1 0x3001 #define GL_CLIP_PLANE2 0x3002 #define GL_CLIP_PLANE3 0x3003 #define GL_CLIP_PLANE4 0x3004 #define GL_CLIP_PLANE5 0x3005 #define GL_LIGHT0 0x4000 #define GL_LIGHT1 0x4001 #define GL_LIGHT2 0x4002 #define GL_LIGHT3 0x4003 #define GL_LIGHT4 0x4004 #define GL_LIGHT5 0x4005 #define GL_LIGHT6 0x4006 #define GL_LIGHT7 0x4007 typedef void (APIENTRYP pfn_glDrawArrays) (GLenum, GLint, GLsizei); extern pfn_glDrawArrays fp_glDrawArrays; typedef void (APIENTRYP pfn_glDrawElements) (GLenum, GLsizei, GLenum, const void*); extern pfn_glDrawElements fp_glDrawElements; typedef void (APIENTRYP pfn_glGetPointerv) (GLenum, void**); extern pfn_glGetPointerv fp_glGetPointerv; typedef void (APIENTRYP pfn_glPolygonOffset) (GLfloat, GLfloat); extern pfn_glPolygonOffset fp_glPolygonOffset; typedef void (APIENTRYP pfn_glCopyTexImage1D) (GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLint); extern pfn_glCopyTexImage1D fp_glCopyTexImage1D; typedef void (APIENTRYP pfn_glCopyTexImage2D) (GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLsizei, GLint); extern pfn_glCopyTexImage2D fp_glCopyTexImage2D; typedef void (APIENTRYP pfn_glCopyTexSubImage1D) (GLenum, GLint, GLint, GLint, GLint, GLsizei); extern pfn_glCopyTexSubImage1D fp_glCopyTexSubImage1D; typedef void (APIENTRYP pfn_glCopyTexSubImage2D) (GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei); extern pfn_glCopyTexSubImage2D fp_glCopyTexSubImage2D; typedef void (APIENTRYP pfn_glTexSubImage1D) (GLenum, GLint, GLint, GLsizei, GLenum, GLenum, const void*); extern pfn_glTexSubImage1D fp_glTexSubImage1D; typedef void (APIENTRYP pfn_glTexSubImage2D) (GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, const void*); extern pfn_glTexSubImage2D fp_glTexSubImage2D; typedef void (APIENTRYP pfn_glBindTexture) (GLenum, GLuint); extern pfn_glBindTexture fp_glBindTexture; typedef void (APIENTRYP pfn_glDeleteTextures) (GLsizei, const GLuint*); extern pfn_glDeleteTextures fp_glDeleteTextures; typedef void (APIENTRYP pfn_glGenTextures) (GLsizei, GLuint*); extern pfn_glGenTextures fp_glGenTextures; typedef GLboolean (APIENTRYP pfn_glIsTexture) (GLuint); extern pfn_glIsTexture fp_glIsTexture; typedef void (APIENTRYP pfn_glArrayElement) (GLint); extern pfn_glArrayElement fp_glArrayElement; typedef void (APIENTRYP pfn_glColorPointer) (GLint, GLenum, GLsizei, const void*); extern pfn_glColorPointer fp_glColorPointer; typedef void (APIENTRYP pfn_glDisableClientState) (GLenum); extern pfn_glDisableClientState fp_glDisableClientState; typedef void (APIENTRYP pfn_glEdgeFlagPointer) (GLsizei, const void*); extern pfn_glEdgeFlagPointer fp_glEdgeFlagPointer; typedef void (APIENTRYP pfn_glEnableClientState) (GLenum); extern pfn_glEnableClientState fp_glEnableClientState; typedef void (APIENTRYP pfn_glIndexPointer) (GLenum, GLsizei, const void*); extern pfn_glIndexPointer fp_glIndexPointer; typedef void (APIENTRYP pfn_glInterleavedArrays) (GLenum, GLsizei, const void*); extern pfn_glInterleavedArrays fp_glInterleavedArrays; typedef void (APIENTRYP pfn_glNormalPointer) (GLenum, GLsizei, const void*); extern pfn_glNormalPointer fp_glNormalPointer; typedef void (APIENTRYP pfn_glTexCoordPointer) (GLint, GLenum, GLsizei, const void*); extern pfn_glTexCoordPointer fp_glTexCoordPointer; typedef void (APIENTRYP pfn_glVertexPointer) (GLint, GLenum, GLsizei, const void*); extern pfn_glVertexPointer fp_glVertexPointer; typedef GLboolean (APIENTRYP pfn_glAreTexturesResident) (GLsizei, const GLuint*, GLboolean*); extern pfn_glAreTexturesResident fp_glAreTexturesResident; typedef void (APIENTRYP pfn_glPrioritizeTextures) (GLsizei, const GLuint*, const GLfloat*); extern pfn_glPrioritizeTextures fp_glPrioritizeTextures; typedef void (APIENTRYP pfn_glIndexub) (GLubyte); extern pfn_glIndexub fp_glIndexub; typedef void (APIENTRYP pfn_glIndexubv) (const GLubyte*); extern pfn_glIndexubv fp_glIndexubv; typedef void (APIENTRYP pfn_glPopClientAttrib) (); extern pfn_glPopClientAttrib fp_glPopClientAttrib; typedef void (APIENTRYP pfn_glPushClientAttrib) (GLbitfield); extern pfn_glPushClientAttrib fp_glPushClientAttrib; /* GL_VERSION_1_2 */ extern GLboolean GLAD_VERSION_1_2; #define GL_UNSIGNED_BYTE_3_3_2 0x8032 #define GL_UNSIGNED_SHORT_4_4_4_4 0x8033 #define GL_UNSIGNED_SHORT_5_5_5_1 0x8034 #define GL_UNSIGNED_INT_8_8_8_8 0x8035 #define GL_UNSIGNED_INT_10_10_10_2 0x8036 #define GL_TEXTURE_BINDING_3D 0x806A #define GL_PACK_SKIP_IMAGES 0x806B #define GL_PACK_IMAGE_HEIGHT 0x806C #define GL_UNPACK_SKIP_IMAGES 0x806D #define GL_UNPACK_IMAGE_HEIGHT 0x806E #define GL_TEXTURE_3D 0x806F #define GL_PROXY_TEXTURE_3D 0x8070 #define GL_TEXTURE_DEPTH 0x8071 #define GL_TEXTURE_WRAP_R 0x8072 #define GL_MAX_3D_TEXTURE_SIZE 0x8073 #define GL_UNSIGNED_BYTE_2_3_3_REV 0x8362 #define GL_UNSIGNED_SHORT_5_6_5 0x8363 #define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364 #define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365 #define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366 #define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367 #define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368 #define GL_BGR 0x80E0 #define GL_BGRA 0x80E1 #define GL_MAX_ELEMENTS_VERTICES 0x80E8 #define GL_MAX_ELEMENTS_INDICES 0x80E9 #define GL_CLAMP_TO_EDGE 0x812F #define GL_TEXTURE_MIN_LOD 0x813A #define GL_TEXTURE_MAX_LOD 0x813B #define GL_TEXTURE_BASE_LEVEL 0x813C #define GL_TEXTURE_MAX_LEVEL 0x813D #define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12 #define GL_SMOOTH_POINT_SIZE_GRANULARITY 0x0B13 #define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22 #define GL_SMOOTH_LINE_WIDTH_GRANULARITY 0x0B23 #define GL_ALIASED_LINE_WIDTH_RANGE 0x846E #define GL_RESCALE_NORMAL 0x803A #define GL_LIGHT_MODEL_COLOR_CONTROL 0x81F8 #define GL_SINGLE_COLOR 0x81F9 #define GL_SEPARATE_SPECULAR_COLOR 0x81FA #define GL_ALIASED_POINT_SIZE_RANGE 0x846D typedef void (APIENTRYP pfn_glDrawRangeElements) (GLenum, GLuint, GLuint, GLsizei, GLenum, const void*); extern pfn_glDrawRangeElements fp_glDrawRangeElements; typedef void (APIENTRYP pfn_glTexImage3D) (GLenum, GLint, GLint, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const void*); extern pfn_glTexImage3D fp_glTexImage3D; typedef void (APIENTRYP pfn_glTexSubImage3D) (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const void*); extern pfn_glTexSubImage3D fp_glTexSubImage3D; typedef void (APIENTRYP pfn_glCopyTexSubImage3D) (GLenum, GLint, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei); extern pfn_glCopyTexSubImage3D fp_glCopyTexSubImage3D; /* GL_VERSION_1_3 */ extern GLboolean GLAD_VERSION_1_3; #define GL_TEXTURE0 0x84C0 #define GL_TEXTURE1 0x84C1 #define GL_TEXTURE2 0x84C2 #define GL_TEXTURE3 0x84C3 #define GL_TEXTURE4 0x84C4 #define GL_TEXTURE5 0x84C5 #define GL_TEXTURE6 0x84C6 #define GL_TEXTURE7 0x84C7 #define GL_TEXTURE8 0x84C8 #define GL_TEXTURE9 0x84C9 #define GL_TEXTURE10 0x84CA #define GL_TEXTURE11 0x84CB #define GL_TEXTURE12 0x84CC #define GL_TEXTURE13 0x84CD #define GL_TEXTURE14 0x84CE #define GL_TEXTURE15 0x84CF #define GL_TEXTURE16 0x84D0 #define GL_TEXTURE17 0x84D1 #define GL_TEXTURE18 0x84D2 #define GL_TEXTURE19 0x84D3 #define GL_TEXTURE20 0x84D4 #define GL_TEXTURE21 0x84D5 #define GL_TEXTURE22 0x84D6 #define GL_TEXTURE23 0x84D7 #define GL_TEXTURE24 0x84D8 #define GL_TEXTURE25 0x84D9 #define GL_TEXTURE26 0x84DA #define GL_TEXTURE27 0x84DB #define GL_TEXTURE28 0x84DC #define GL_TEXTURE29 0x84DD #define GL_TEXTURE30 0x84DE #define GL_TEXTURE31 0x84DF #define GL_ACTIVE_TEXTURE 0x84E0 #define GL_MULTISAMPLE 0x809D #define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E #define GL_SAMPLE_ALPHA_TO_ONE 0x809F #define GL_SAMPLE_COVERAGE 0x80A0 #define GL_SAMPLE_BUFFERS 0x80A8 #define GL_SAMPLES 0x80A9 #define GL_SAMPLE_COVERAGE_VALUE 0x80AA #define GL_SAMPLE_COVERAGE_INVERT 0x80AB #define GL_TEXTURE_CUBE_MAP 0x8513 #define GL_TEXTURE_BINDING_CUBE_MAP 0x8514 #define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516 #define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518 #define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A #define GL_PROXY_TEXTURE_CUBE_MAP 0x851B #define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C #define GL_COMPRESSED_RGB 0x84ED #define GL_COMPRESSED_RGBA 0x84EE #define GL_TEXTURE_COMPRESSION_HINT 0x84EF #define GL_TEXTURE_COMPRESSED_IMAGE_SIZE 0x86A0 #define GL_TEXTURE_COMPRESSED 0x86A1 #define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2 #define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3 #define GL_CLAMP_TO_BORDER 0x812D #define GL_CLIENT_ACTIVE_TEXTURE 0x84E1 #define GL_MAX_TEXTURE_UNITS 0x84E2 #define GL_TRANSPOSE_MODELVIEW_MATRIX 0x84E3 #define GL_TRANSPOSE_PROJECTION_MATRIX 0x84E4 #define GL_TRANSPOSE_TEXTURE_MATRIX 0x84E5 #define GL_TRANSPOSE_COLOR_MATRIX 0x84E6 #define GL_MULTISAMPLE_BIT 0x20000000 #define GL_NORMAL_MAP 0x8511 #define GL_REFLECTION_MAP 0x8512 #define GL_COMPRESSED_ALPHA 0x84E9 #define GL_COMPRESSED_LUMINANCE 0x84EA #define GL_COMPRESSED_LUMINANCE_ALPHA 0x84EB #define GL_COMPRESSED_INTENSITY 0x84EC #define GL_COMBINE 0x8570 #define GL_COMBINE_RGB 0x8571 #define GL_COMBINE_ALPHA 0x8572 #define GL_SOURCE0_RGB 0x8580 #define GL_SOURCE1_RGB 0x8581 #define GL_SOURCE2_RGB 0x8582 #define GL_SOURCE0_ALPHA 0x8588 #define GL_SOURCE1_ALPHA 0x8589 #define GL_SOURCE2_ALPHA 0x858A #define GL_OPERAND0_RGB 0x8590 #define GL_OPERAND1_RGB 0x8591 #define GL_OPERAND2_RGB 0x8592 #define GL_OPERAND0_ALPHA 0x8598 #define GL_OPERAND1_ALPHA 0x8599 #define GL_OPERAND2_ALPHA 0x859A #define GL_RGB_SCALE 0x8573 #define GL_ADD_SIGNED 0x8574 #define GL_INTERPOLATE 0x8575 #define GL_SUBTRACT 0x84E7 #define GL_CONSTANT 0x8576 #define GL_PRIMARY_COLOR 0x8577 #define GL_PREVIOUS 0x8578 #define GL_DOT3_RGB 0x86AE #define GL_DOT3_RGBA 0x86AF typedef void (APIENTRYP pfn_glActiveTexture) (GLenum); extern pfn_glActiveTexture fp_glActiveTexture; typedef void (APIENTRYP pfn_glSampleCoverage) (GLfloat, GLboolean); extern pfn_glSampleCoverage fp_glSampleCoverage; typedef void (APIENTRYP pfn_glCompressedTexImage3D) (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, const void*); extern pfn_glCompressedTexImage3D fp_glCompressedTexImage3D; typedef void (APIENTRYP pfn_glCompressedTexImage2D) (GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const void*); extern pfn_glCompressedTexImage2D fp_glCompressedTexImage2D; typedef void (APIENTRYP pfn_glCompressedTexImage1D) (GLenum, GLint, GLenum, GLsizei, GLint, GLsizei, const void*); extern pfn_glCompressedTexImage1D fp_glCompressedTexImage1D; typedef void (APIENTRYP pfn_glCompressedTexSubImage3D) (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, const void*); extern pfn_glCompressedTexSubImage3D fp_glCompressedTexSubImage3D; typedef void (APIENTRYP pfn_glCompressedTexSubImage2D) (GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const void*); extern pfn_glCompressedTexSubImage2D fp_glCompressedTexSubImage2D; typedef void (APIENTRYP pfn_glCompressedTexSubImage1D) (GLenum, GLint, GLint, GLsizei, GLenum, GLsizei, const void*); extern pfn_glCompressedTexSubImage1D fp_glCompressedTexSubImage1D; typedef void (APIENTRYP pfn_glGetCompressedTexImage) (GLenum, GLint, void*); extern pfn_glGetCompressedTexImage fp_glGetCompressedTexImage; typedef void (APIENTRYP pfn_glClientActiveTexture) (GLenum); extern pfn_glClientActiveTexture fp_glClientActiveTexture; typedef void (APIENTRYP pfn_glMultiTexCoord1d) (GLenum, GLdouble); extern pfn_glMultiTexCoord1d fp_glMultiTexCoord1d; typedef void (APIENTRYP pfn_glMultiTexCoord1dv) (GLenum, const GLdouble*); extern pfn_glMultiTexCoord1dv fp_glMultiTexCoord1dv; typedef void (APIENTRYP pfn_glMultiTexCoord1f) (GLenum, GLfloat); extern pfn_glMultiTexCoord1f fp_glMultiTexCoord1f; typedef void (APIENTRYP pfn_glMultiTexCoord1fv) (GLenum, const GLfloat*); extern pfn_glMultiTexCoord1fv fp_glMultiTexCoord1fv; typedef void (APIENTRYP pfn_glMultiTexCoord1i) (GLenum, GLint); extern pfn_glMultiTexCoord1i fp_glMultiTexCoord1i; typedef void (APIENTRYP pfn_glMultiTexCoord1iv) (GLenum, const GLint*); extern pfn_glMultiTexCoord1iv fp_glMultiTexCoord1iv; typedef void (APIENTRYP pfn_glMultiTexCoord1s) (GLenum, GLshort); extern pfn_glMultiTexCoord1s fp_glMultiTexCoord1s; typedef void (APIENTRYP pfn_glMultiTexCoord1sv) (GLenum, const GLshort*); extern pfn_glMultiTexCoord1sv fp_glMultiTexCoord1sv; typedef void (APIENTRYP pfn_glMultiTexCoord2d) (GLenum, GLdouble, GLdouble); extern pfn_glMultiTexCoord2d fp_glMultiTexCoord2d; typedef void (APIENTRYP pfn_glMultiTexCoord2dv) (GLenum, const GLdouble*); extern pfn_glMultiTexCoord2dv fp_glMultiTexCoord2dv; typedef void (APIENTRYP pfn_glMultiTexCoord2f) (GLenum, GLfloat, GLfloat); extern pfn_glMultiTexCoord2f fp_glMultiTexCoord2f; typedef void (APIENTRYP pfn_glMultiTexCoord2fv) (GLenum, const GLfloat*); extern pfn_glMultiTexCoord2fv fp_glMultiTexCoord2fv; typedef void (APIENTRYP pfn_glMultiTexCoord2i) (GLenum, GLint, GLint); extern pfn_glMultiTexCoord2i fp_glMultiTexCoord2i; typedef void (APIENTRYP pfn_glMultiTexCoord2iv) (GLenum, const GLint*); extern pfn_glMultiTexCoord2iv fp_glMultiTexCoord2iv; typedef void (APIENTRYP pfn_glMultiTexCoord2s) (GLenum, GLshort, GLshort); extern pfn_glMultiTexCoord2s fp_glMultiTexCoord2s; typedef void (APIENTRYP pfn_glMultiTexCoord2sv) (GLenum, const GLshort*); extern pfn_glMultiTexCoord2sv fp_glMultiTexCoord2sv; typedef void (APIENTRYP pfn_glMultiTexCoord3d) (GLenum, GLdouble, GLdouble, GLdouble); extern pfn_glMultiTexCoord3d fp_glMultiTexCoord3d; typedef void (APIENTRYP pfn_glMultiTexCoord3dv) (GLenum, const GLdouble*); extern pfn_glMultiTexCoord3dv fp_glMultiTexCoord3dv; typedef void (APIENTRYP pfn_glMultiTexCoord3f) (GLenum, GLfloat, GLfloat, GLfloat); extern pfn_glMultiTexCoord3f fp_glMultiTexCoord3f; typedef void (APIENTRYP pfn_glMultiTexCoord3fv) (GLenum, const GLfloat*); extern pfn_glMultiTexCoord3fv fp_glMultiTexCoord3fv; typedef void (APIENTRYP pfn_glMultiTexCoord3i) (GLenum, GLint, GLint, GLint); extern pfn_glMultiTexCoord3i fp_glMultiTexCoord3i; typedef void (APIENTRYP pfn_glMultiTexCoord3iv) (GLenum, const GLint*); extern pfn_glMultiTexCoord3iv fp_glMultiTexCoord3iv; typedef void (APIENTRYP pfn_glMultiTexCoord3s) (GLenum, GLshort, GLshort, GLshort); extern pfn_glMultiTexCoord3s fp_glMultiTexCoord3s; typedef void (APIENTRYP pfn_glMultiTexCoord3sv) (GLenum, const GLshort*); extern pfn_glMultiTexCoord3sv fp_glMultiTexCoord3sv; typedef void (APIENTRYP pfn_glMultiTexCoord4d) (GLenum, GLdouble, GLdouble, GLdouble, GLdouble); extern pfn_glMultiTexCoord4d fp_glMultiTexCoord4d; typedef void (APIENTRYP pfn_glMultiTexCoord4dv) (GLenum, const GLdouble*); extern pfn_glMultiTexCoord4dv fp_glMultiTexCoord4dv; typedef void (APIENTRYP pfn_glMultiTexCoord4f) (GLenum, GLfloat, GLfloat, GLfloat, GLfloat); extern pfn_glMultiTexCoord4f fp_glMultiTexCoord4f; typedef void (APIENTRYP pfn_glMultiTexCoord4fv) (GLenum, const GLfloat*); extern pfn_glMultiTexCoord4fv fp_glMultiTexCoord4fv; typedef void (APIENTRYP pfn_glMultiTexCoord4i) (GLenum, GLint, GLint, GLint, GLint); extern pfn_glMultiTexCoord4i fp_glMultiTexCoord4i; typedef void (APIENTRYP pfn_glMultiTexCoord4iv) (GLenum, const GLint*); extern pfn_glMultiTexCoord4iv fp_glMultiTexCoord4iv; typedef void (APIENTRYP pfn_glMultiTexCoord4s) (GLenum, GLshort, GLshort, GLshort, GLshort); extern pfn_glMultiTexCoord4s fp_glMultiTexCoord4s; typedef void (APIENTRYP pfn_glMultiTexCoord4sv) (GLenum, const GLshort*); extern pfn_glMultiTexCoord4sv fp_glMultiTexCoord4sv; typedef void (APIENTRYP pfn_glLoadTransposeMatrixf) (const GLfloat*); extern pfn_glLoadTransposeMatrixf fp_glLoadTransposeMatrixf; typedef void (APIENTRYP pfn_glLoadTransposeMatrixd) (const GLdouble*); extern pfn_glLoadTransposeMatrixd fp_glLoadTransposeMatrixd; typedef void (APIENTRYP pfn_glMultTransposeMatrixf) (const GLfloat*); extern pfn_glMultTransposeMatrixf fp_glMultTransposeMatrixf; typedef void (APIENTRYP pfn_glMultTransposeMatrixd) (const GLdouble*); extern pfn_glMultTransposeMatrixd fp_glMultTransposeMatrixd; /* GL_VERSION_1_4 */ extern GLboolean GLAD_VERSION_1_4; #define GL_BLEND_DST_RGB 0x80C8 #define GL_BLEND_SRC_RGB 0x80C9 #define GL_BLEND_DST_ALPHA 0x80CA #define GL_BLEND_SRC_ALPHA 0x80CB #define GL_POINT_FADE_THRESHOLD_SIZE 0x8128 #define GL_DEPTH_COMPONENT16 0x81A5 #define GL_DEPTH_COMPONENT24 0x81A6 #define GL_DEPTH_COMPONENT32 0x81A7 #define GL_MIRRORED_REPEAT 0x8370 #define GL_MAX_TEXTURE_LOD_BIAS 0x84FD #define GL_TEXTURE_LOD_BIAS 0x8501 #define GL_INCR_WRAP 0x8507 #define GL_DECR_WRAP 0x8508 #define GL_TEXTURE_DEPTH_SIZE 0x884A #define GL_TEXTURE_COMPARE_MODE 0x884C #define GL_TEXTURE_COMPARE_FUNC 0x884D #define GL_POINT_SIZE_MIN 0x8126 #define GL_POINT_SIZE_MAX 0x8127 #define GL_POINT_DISTANCE_ATTENUATION 0x8129 #define GL_GENERATE_MIPMAP 0x8191 #define GL_GENERATE_MIPMAP_HINT 0x8192 #define GL_FOG_COORDINATE_SOURCE 0x8450 #define GL_FOG_COORDINATE 0x8451 #define GL_FRAGMENT_DEPTH 0x8452 #define GL_CURRENT_FOG_COORDINATE 0x8453 #define GL_FOG_COORDINATE_ARRAY_TYPE 0x8454 #define GL_FOG_COORDINATE_ARRAY_STRIDE 0x8455 #define GL_FOG_COORDINATE_ARRAY_POINTER 0x8456 #define GL_FOG_COORDINATE_ARRAY 0x8457 #define GL_COLOR_SUM 0x8458 #define GL_CURRENT_SECONDARY_COLOR 0x8459 #define GL_SECONDARY_COLOR_ARRAY_SIZE 0x845A #define GL_SECONDARY_COLOR_ARRAY_TYPE 0x845B #define GL_SECONDARY_COLOR_ARRAY_STRIDE 0x845C #define GL_SECONDARY_COLOR_ARRAY_POINTER 0x845D #define GL_SECONDARY_COLOR_ARRAY 0x845E #define GL_TEXTURE_FILTER_CONTROL 0x8500 #define GL_DEPTH_TEXTURE_MODE 0x884B #define GL_COMPARE_R_TO_TEXTURE 0x884E #define GL_FUNC_ADD 0x8006 #define GL_FUNC_SUBTRACT 0x800A #define GL_FUNC_REVERSE_SUBTRACT 0x800B #define GL_MIN 0x8007 #define GL_MAX 0x8008 #define GL_CONSTANT_COLOR 0x8001 #define GL_ONE_MINUS_CONSTANT_COLOR 0x8002 #define GL_CONSTANT_ALPHA 0x8003 #define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004 typedef void (APIENTRYP pfn_glBlendFuncSeparate) (GLenum, GLenum, GLenum, GLenum); extern pfn_glBlendFuncSeparate fp_glBlendFuncSeparate; typedef void (APIENTRYP pfn_glMultiDrawArrays) (GLenum, const GLint*, const GLsizei*, GLsizei); extern pfn_glMultiDrawArrays fp_glMultiDrawArrays; typedef void (APIENTRYP pfn_glMultiDrawElements) (GLenum, const GLsizei*, GLenum, const void**, GLsizei); extern pfn_glMultiDrawElements fp_glMultiDrawElements; typedef void (APIENTRYP pfn_glPointParameterf) (GLenum, GLfloat); extern pfn_glPointParameterf fp_glPointParameterf; typedef void (APIENTRYP pfn_glPointParameterfv) (GLenum, const GLfloat*); extern pfn_glPointParameterfv fp_glPointParameterfv; typedef void (APIENTRYP pfn_glPointParameteri) (GLenum, GLint); extern pfn_glPointParameteri fp_glPointParameteri; typedef void (APIENTRYP pfn_glPointParameteriv) (GLenum, const GLint*); extern pfn_glPointParameteriv fp_glPointParameteriv; typedef void (APIENTRYP pfn_glFogCoordf) (GLfloat); extern pfn_glFogCoordf fp_glFogCoordf; typedef void (APIENTRYP pfn_glFogCoordfv) (const GLfloat*); extern pfn_glFogCoordfv fp_glFogCoordfv; typedef void (APIENTRYP pfn_glFogCoordd) (GLdouble); extern pfn_glFogCoordd fp_glFogCoordd; typedef void (APIENTRYP pfn_glFogCoorddv) (const GLdouble*); extern pfn_glFogCoorddv fp_glFogCoorddv; typedef void (APIENTRYP pfn_glFogCoordPointer) (GLenum, GLsizei, const void*); extern pfn_glFogCoordPointer fp_glFogCoordPointer; typedef void (APIENTRYP pfn_glSecondaryColor3b) (GLbyte, GLbyte, GLbyte); extern pfn_glSecondaryColor3b fp_glSecondaryColor3b; typedef void (APIENTRYP pfn_glSecondaryColor3bv) (const GLbyte*); extern pfn_glSecondaryColor3bv fp_glSecondaryColor3bv; typedef void (APIENTRYP pfn_glSecondaryColor3d) (GLdouble, GLdouble, GLdouble); extern pfn_glSecondaryColor3d fp_glSecondaryColor3d; typedef void (APIENTRYP pfn_glSecondaryColor3dv) (const GLdouble*); extern pfn_glSecondaryColor3dv fp_glSecondaryColor3dv; typedef void (APIENTRYP pfn_glSecondaryColor3f) (GLfloat, GLfloat, GLfloat); extern pfn_glSecondaryColor3f fp_glSecondaryColor3f; typedef void (APIENTRYP pfn_glSecondaryColor3fv) (const GLfloat*); extern pfn_glSecondaryColor3fv fp_glSecondaryColor3fv; typedef void (APIENTRYP pfn_glSecondaryColor3i) (GLint, GLint, GLint); extern pfn_glSecondaryColor3i fp_glSecondaryColor3i; typedef void (APIENTRYP pfn_glSecondaryColor3iv) (const GLint*); extern pfn_glSecondaryColor3iv fp_glSecondaryColor3iv; typedef void (APIENTRYP pfn_glSecondaryColor3s) (GLshort, GLshort, GLshort); extern pfn_glSecondaryColor3s fp_glSecondaryColor3s; typedef void (APIENTRYP pfn_glSecondaryColor3sv) (const GLshort*); extern pfn_glSecondaryColor3sv fp_glSecondaryColor3sv; typedef void (APIENTRYP pfn_glSecondaryColor3ub) (GLubyte, GLubyte, GLubyte); extern pfn_glSecondaryColor3ub fp_glSecondaryColor3ub; typedef void (APIENTRYP pfn_glSecondaryColor3ubv) (const GLubyte*); extern pfn_glSecondaryColor3ubv fp_glSecondaryColor3ubv; typedef void (APIENTRYP pfn_glSecondaryColor3ui) (GLuint, GLuint, GLuint); extern pfn_glSecondaryColor3ui fp_glSecondaryColor3ui; typedef void (APIENTRYP pfn_glSecondaryColor3uiv) (const GLuint*); extern pfn_glSecondaryColor3uiv fp_glSecondaryColor3uiv; typedef void (APIENTRYP pfn_glSecondaryColor3us) (GLushort, GLushort, GLushort); extern pfn_glSecondaryColor3us fp_glSecondaryColor3us; typedef void (APIENTRYP pfn_glSecondaryColor3usv) (const GLushort*); extern pfn_glSecondaryColor3usv fp_glSecondaryColor3usv; typedef void (APIENTRYP pfn_glSecondaryColorPointer) (GLint, GLenum, GLsizei, const void*); extern pfn_glSecondaryColorPointer fp_glSecondaryColorPointer; typedef void (APIENTRYP pfn_glWindowPos2d) (GLdouble, GLdouble); extern pfn_glWindowPos2d fp_glWindowPos2d; typedef void (APIENTRYP pfn_glWindowPos2dv) (const GLdouble*); extern pfn_glWindowPos2dv fp_glWindowPos2dv; typedef void (APIENTRYP pfn_glWindowPos2f) (GLfloat, GLfloat); extern pfn_glWindowPos2f fp_glWindowPos2f; typedef void (APIENTRYP pfn_glWindowPos2fv) (const GLfloat*); extern pfn_glWindowPos2fv fp_glWindowPos2fv; typedef void (APIENTRYP pfn_glWindowPos2i) (GLint, GLint); extern pfn_glWindowPos2i fp_glWindowPos2i; typedef void (APIENTRYP pfn_glWindowPos2iv) (const GLint*); extern pfn_glWindowPos2iv fp_glWindowPos2iv; typedef void (APIENTRYP pfn_glWindowPos2s) (GLshort, GLshort); extern pfn_glWindowPos2s fp_glWindowPos2s; typedef void (APIENTRYP pfn_glWindowPos2sv) (const GLshort*); extern pfn_glWindowPos2sv fp_glWindowPos2sv; typedef void (APIENTRYP pfn_glWindowPos3d) (GLdouble, GLdouble, GLdouble); extern pfn_glWindowPos3d fp_glWindowPos3d; typedef void (APIENTRYP pfn_glWindowPos3dv) (const GLdouble*); extern pfn_glWindowPos3dv fp_glWindowPos3dv; typedef void (APIENTRYP pfn_glWindowPos3f) (GLfloat, GLfloat, GLfloat); extern pfn_glWindowPos3f fp_glWindowPos3f; typedef void (APIENTRYP pfn_glWindowPos3fv) (const GLfloat*); extern pfn_glWindowPos3fv fp_glWindowPos3fv; typedef void (APIENTRYP pfn_glWindowPos3i) (GLint, GLint, GLint); extern pfn_glWindowPos3i fp_glWindowPos3i; typedef void (APIENTRYP pfn_glWindowPos3iv) (const GLint*); extern pfn_glWindowPos3iv fp_glWindowPos3iv; typedef void (APIENTRYP pfn_glWindowPos3s) (GLshort, GLshort, GLshort); extern pfn_glWindowPos3s fp_glWindowPos3s; typedef void (APIENTRYP pfn_glWindowPos3sv) (const GLshort*); extern pfn_glWindowPos3sv fp_glWindowPos3sv; typedef void (APIENTRYP pfn_glBlendColor) (GLfloat, GLfloat, GLfloat, GLfloat); extern pfn_glBlendColor fp_glBlendColor; typedef void (APIENTRYP pfn_glBlendEquation) (GLenum); extern pfn_glBlendEquation fp_glBlendEquation; /* GL_VERSION_1_5 */ extern GLboolean GLAD_VERSION_1_5; #define GL_BUFFER_SIZE 0x8764 #define GL_BUFFER_USAGE 0x8765 #define GL_QUERY_COUNTER_BITS 0x8864 #define GL_CURRENT_QUERY 0x8865 #define GL_QUERY_RESULT 0x8866 #define GL_QUERY_RESULT_AVAILABLE 0x8867 #define GL_ARRAY_BUFFER 0x8892 #define GL_ELEMENT_ARRAY_BUFFER 0x8893 #define GL_ARRAY_BUFFER_BINDING 0x8894 #define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895 #define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F #define GL_READ_ONLY 0x88B8 #define GL_WRITE_ONLY 0x88B9 #define GL_READ_WRITE 0x88BA #define GL_BUFFER_ACCESS 0x88BB #define GL_BUFFER_MAPPED 0x88BC #define GL_BUFFER_MAP_POINTER 0x88BD #define GL_STREAM_DRAW 0x88E0 #define GL_STREAM_READ 0x88E1 #define GL_STREAM_COPY 0x88E2 #define GL_STATIC_DRAW 0x88E4 #define GL_STATIC_READ 0x88E5 #define GL_STATIC_COPY 0x88E6 #define GL_DYNAMIC_DRAW 0x88E8 #define GL_DYNAMIC_READ 0x88E9 #define GL_DYNAMIC_COPY 0x88EA #define GL_SAMPLES_PASSED 0x8914 #define GL_SRC1_ALPHA 0x8589 #define GL_VERTEX_ARRAY_BUFFER_BINDING 0x8896 #define GL_NORMAL_ARRAY_BUFFER_BINDING 0x8897 #define GL_COLOR_ARRAY_BUFFER_BINDING 0x8898 #define GL_INDEX_ARRAY_BUFFER_BINDING 0x8899 #define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING 0x889A #define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING 0x889B #define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING 0x889C #define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING 0x889D #define GL_WEIGHT_ARRAY_BUFFER_BINDING 0x889E #define GL_FOG_COORD_SRC 0x8450 #define GL_FOG_COORD 0x8451 #define GL_CURRENT_FOG_COORD 0x8453 #define GL_FOG_COORD_ARRAY_TYPE 0x8454 #define GL_FOG_COORD_ARRAY_STRIDE 0x8455 #define GL_FOG_COORD_ARRAY_POINTER 0x8456 #define GL_FOG_COORD_ARRAY 0x8457 #define GL_FOG_COORD_ARRAY_BUFFER_BINDING 0x889D #define GL_SRC0_RGB 0x8580 #define GL_SRC1_RGB 0x8581 #define GL_SRC2_RGB 0x8582 #define GL_SRC0_ALPHA 0x8588 #define GL_SRC2_ALPHA 0x858A typedef void (APIENTRYP pfn_glGenQueries) (GLsizei, GLuint*); extern pfn_glGenQueries fp_glGenQueries; typedef void (APIENTRYP pfn_glDeleteQueries) (GLsizei, const GLuint*); extern pfn_glDeleteQueries fp_glDeleteQueries; typedef GLboolean (APIENTRYP pfn_glIsQuery) (GLuint); extern pfn_glIsQuery fp_glIsQuery; typedef void (APIENTRYP pfn_glBeginQuery) (GLenum, GLuint); extern pfn_glBeginQuery fp_glBeginQuery; typedef void (APIENTRYP pfn_glEndQuery) (GLenum); extern pfn_glEndQuery fp_glEndQuery; typedef void (APIENTRYP pfn_glGetQueryiv) (GLenum, GLenum, GLint*); extern pfn_glGetQueryiv fp_glGetQueryiv; typedef void (APIENTRYP pfn_glGetQueryObjectiv) (GLuint, GLenum, GLint*); extern pfn_glGetQueryObjectiv fp_glGetQueryObjectiv; typedef void (APIENTRYP pfn_glGetQueryObjectuiv) (GLuint, GLenum, GLuint*); extern pfn_glGetQueryObjectuiv fp_glGetQueryObjectuiv; typedef void (APIENTRYP pfn_glBindBuffer) (GLenum, GLuint); extern pfn_glBindBuffer fp_glBindBuffer; typedef void (APIENTRYP pfn_glDeleteBuffers) (GLsizei, const GLuint*); extern pfn_glDeleteBuffers fp_glDeleteBuffers; typedef void (APIENTRYP pfn_glGenBuffers) (GLsizei, GLuint*); extern pfn_glGenBuffers fp_glGenBuffers; typedef GLboolean (APIENTRYP pfn_glIsBuffer) (GLuint); extern pfn_glIsBuffer fp_glIsBuffer; typedef void (APIENTRYP pfn_glBufferData) (GLenum, GLsizeiptr, const void*, GLenum); extern pfn_glBufferData fp_glBufferData; typedef void (APIENTRYP pfn_glBufferSubData) (GLenum, GLintptr, GLsizeiptr, const void*); extern pfn_glBufferSubData fp_glBufferSubData; typedef void (APIENTRYP pfn_glGetBufferSubData) (GLenum, GLintptr, GLsizeiptr, void*); extern pfn_glGetBufferSubData fp_glGetBufferSubData; typedef void* (APIENTRYP pfn_glMapBuffer) (GLenum, GLenum); extern pfn_glMapBuffer fp_glMapBuffer; typedef GLboolean (APIENTRYP pfn_glUnmapBuffer) (GLenum); extern pfn_glUnmapBuffer fp_glUnmapBuffer; typedef void (APIENTRYP pfn_glGetBufferParameteriv) (GLenum, GLenum, GLint*); extern pfn_glGetBufferParameteriv fp_glGetBufferParameteriv; typedef void (APIENTRYP pfn_glGetBufferPointerv) (GLenum, GLenum, void**); extern pfn_glGetBufferPointerv fp_glGetBufferPointerv; /* GL_VERSION_2_0 */ extern GLboolean GLAD_VERSION_2_0; #define GL_BLEND_EQUATION_RGB 0x8009 #define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622 #define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623 #define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624 #define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625 #define GL_CURRENT_VERTEX_ATTRIB 0x8626 #define GL_VERTEX_PROGRAM_POINT_SIZE 0x8642 #define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645 #define GL_STENCIL_BACK_FUNC 0x8800 #define GL_STENCIL_BACK_FAIL 0x8801 #define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802 #define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803 #define GL_MAX_DRAW_BUFFERS 0x8824 #define GL_DRAW_BUFFER0 0x8825 #define GL_DRAW_BUFFER1 0x8826 #define GL_DRAW_BUFFER2 0x8827 #define GL_DRAW_BUFFER3 0x8828 #define GL_DRAW_BUFFER4 0x8829 #define GL_DRAW_BUFFER5 0x882A #define GL_DRAW_BUFFER6 0x882B #define GL_DRAW_BUFFER7 0x882C #define GL_DRAW_BUFFER8 0x882D #define GL_DRAW_BUFFER9 0x882E #define GL_DRAW_BUFFER10 0x882F #define GL_DRAW_BUFFER11 0x8830 #define GL_DRAW_BUFFER12 0x8831 #define GL_DRAW_BUFFER13 0x8832 #define GL_DRAW_BUFFER14 0x8833 #define GL_DRAW_BUFFER15 0x8834 #define GL_BLEND_EQUATION_ALPHA 0x883D #define GL_MAX_VERTEX_ATTRIBS 0x8869 #define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A #define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872 #define GL_FRAGMENT_SHADER 0x8B30 #define GL_VERTEX_SHADER 0x8B31 #define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS 0x8B49 #define GL_MAX_VERTEX_UNIFORM_COMPONENTS 0x8B4A #define GL_MAX_VARYING_FLOATS 0x8B4B #define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C #define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D #define GL_SHADER_TYPE 0x8B4F #define GL_FLOAT_VEC2 0x8B50 #define GL_FLOAT_VEC3 0x8B51 #define GL_FLOAT_VEC4 0x8B52 #define GL_INT_VEC2 0x8B53 #define GL_INT_VEC3 0x8B54 #define GL_INT_VEC4 0x8B55 #define GL_BOOL 0x8B56 #define GL_BOOL_VEC2 0x8B57 #define GL_BOOL_VEC3 0x8B58 #define GL_BOOL_VEC4 0x8B59 #define GL_FLOAT_MAT2 0x8B5A #define GL_FLOAT_MAT3 0x8B5B #define GL_FLOAT_MAT4 0x8B5C #define GL_SAMPLER_1D 0x8B5D #define GL_SAMPLER_2D 0x8B5E #define GL_SAMPLER_3D 0x8B5F #define GL_SAMPLER_CUBE 0x8B60 #define GL_SAMPLER_1D_SHADOW 0x8B61 #define GL_SAMPLER_2D_SHADOW 0x8B62 #define GL_DELETE_STATUS 0x8B80 #define GL_COMPILE_STATUS 0x8B81 #define GL_LINK_STATUS 0x8B82 #define GL_VALIDATE_STATUS 0x8B83 #define GL_INFO_LOG_LENGTH 0x8B84 #define GL_ATTACHED_SHADERS 0x8B85 #define GL_ACTIVE_UNIFORMS 0x8B86 #define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87 #define GL_SHADER_SOURCE_LENGTH 0x8B88 #define GL_ACTIVE_ATTRIBUTES 0x8B89 #define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A #define GL_FRAGMENT_SHADER_DERIVATIVE_HINT 0x8B8B #define GL_SHADING_LANGUAGE_VERSION 0x8B8C #define GL_CURRENT_PROGRAM 0x8B8D #define GL_POINT_SPRITE_COORD_ORIGIN 0x8CA0 #define GL_LOWER_LEFT 0x8CA1 #define GL_UPPER_LEFT 0x8CA2 #define GL_STENCIL_BACK_REF 0x8CA3 #define GL_STENCIL_BACK_VALUE_MASK 0x8CA4 #define GL_STENCIL_BACK_WRITEMASK 0x8CA5 #define GL_VERTEX_PROGRAM_TWO_SIDE 0x8643 #define GL_POINT_SPRITE 0x8861 #define GL_COORD_REPLACE 0x8862 #define GL_MAX_TEXTURE_COORDS 0x8871 typedef void (APIENTRYP pfn_glBlendEquationSeparate) (GLenum, GLenum); extern pfn_glBlendEquationSeparate fp_glBlendEquationSeparate; typedef void (APIENTRYP pfn_glDrawBuffers) (GLsizei, const GLenum*); extern pfn_glDrawBuffers fp_glDrawBuffers; typedef void (APIENTRYP pfn_glStencilOpSeparate) (GLenum, GLenum, GLenum, GLenum); extern pfn_glStencilOpSeparate fp_glStencilOpSeparate; typedef void (APIENTRYP pfn_glStencilFuncSeparate) (GLenum, GLenum, GLint, GLuint); extern pfn_glStencilFuncSeparate fp_glStencilFuncSeparate; typedef void (APIENTRYP pfn_glStencilMaskSeparate) (GLenum, GLuint); extern pfn_glStencilMaskSeparate fp_glStencilMaskSeparate; typedef void (APIENTRYP pfn_glAttachShader) (GLuint, GLuint); extern pfn_glAttachShader fp_glAttachShader; typedef void (APIENTRYP pfn_glBindAttribLocation) (GLuint, GLuint, const GLchar*); extern pfn_glBindAttribLocation fp_glBindAttribLocation; typedef void (APIENTRYP pfn_glCompileShader) (GLuint); extern pfn_glCompileShader fp_glCompileShader; typedef GLuint (APIENTRYP pfn_glCreateProgram) (); extern pfn_glCreateProgram fp_glCreateProgram; typedef GLuint (APIENTRYP pfn_glCreateShader) (GLenum); extern pfn_glCreateShader fp_glCreateShader; typedef void (APIENTRYP pfn_glDeleteProgram) (GLuint); extern pfn_glDeleteProgram fp_glDeleteProgram; typedef void (APIENTRYP pfn_glDeleteShader) (GLuint); extern pfn_glDeleteShader fp_glDeleteShader; typedef void (APIENTRYP pfn_glDetachShader) (GLuint, GLuint); extern pfn_glDetachShader fp_glDetachShader; typedef void (APIENTRYP pfn_glDisableVertexAttribArray) (GLuint); extern pfn_glDisableVertexAttribArray fp_glDisableVertexAttribArray; typedef void (APIENTRYP pfn_glEnableVertexAttribArray) (GLuint); extern pfn_glEnableVertexAttribArray fp_glEnableVertexAttribArray; typedef void (APIENTRYP pfn_glGetActiveAttrib) (GLuint, GLuint, GLsizei, GLsizei*, GLint*, GLenum*, GLchar*); extern pfn_glGetActiveAttrib fp_glGetActiveAttrib; typedef void (APIENTRYP pfn_glGetActiveUniform) (GLuint, GLuint, GLsizei, GLsizei*, GLint*, GLenum*, GLchar*); extern pfn_glGetActiveUniform fp_glGetActiveUniform; typedef void (APIENTRYP pfn_glGetAttachedShaders) (GLuint, GLsizei, GLsizei*, GLuint*); extern pfn_glGetAttachedShaders fp_glGetAttachedShaders; typedef GLint (APIENTRYP pfn_glGetAttribLocation) (GLuint, const GLchar*); extern pfn_glGetAttribLocation fp_glGetAttribLocation; typedef void (APIENTRYP pfn_glGetProgramiv) (GLuint, GLenum, GLint*); extern pfn_glGetProgramiv fp_glGetProgramiv; typedef void (APIENTRYP pfn_glGetProgramInfoLog) (GLuint, GLsizei, GLsizei*, GLchar*); extern pfn_glGetProgramInfoLog fp_glGetProgramInfoLog; typedef void (APIENTRYP pfn_glGetShaderiv) (GLuint, GLenum, GLint*); extern pfn_glGetShaderiv fp_glGetShaderiv; typedef void (APIENTRYP pfn_glGetShaderInfoLog) (GLuint, GLsizei, GLsizei*, GLchar*); extern pfn_glGetShaderInfoLog fp_glGetShaderInfoLog; typedef void (APIENTRYP pfn_glGetShaderSource) (GLuint, GLsizei, GLsizei*, GLchar*); extern pfn_glGetShaderSource fp_glGetShaderSource; typedef GLint (APIENTRYP pfn_glGetUniformLocation) (GLuint, const GLchar*); extern pfn_glGetUniformLocation fp_glGetUniformLocation; typedef void (APIENTRYP pfn_glGetUniformfv) (GLuint, GLint, GLfloat*); extern pfn_glGetUniformfv fp_glGetUniformfv; typedef void (APIENTRYP pfn_glGetUniformiv) (GLuint, GLint, GLint*); extern pfn_glGetUniformiv fp_glGetUniformiv; typedef void (APIENTRYP pfn_glGetVertexAttribdv) (GLuint, GLenum, GLdouble*); extern pfn_glGetVertexAttribdv fp_glGetVertexAttribdv; typedef void (APIENTRYP pfn_glGetVertexAttribfv) (GLuint, GLenum, GLfloat*); extern pfn_glGetVertexAttribfv fp_glGetVertexAttribfv; typedef void (APIENTRYP pfn_glGetVertexAttribiv) (GLuint, GLenum, GLint*); extern pfn_glGetVertexAttribiv fp_glGetVertexAttribiv; typedef void (APIENTRYP pfn_glGetVertexAttribPointerv) (GLuint, GLenum, void**); extern pfn_glGetVertexAttribPointerv fp_glGetVertexAttribPointerv; typedef GLboolean (APIENTRYP pfn_glIsProgram) (GLuint); extern pfn_glIsProgram fp_glIsProgram; typedef GLboolean (APIENTRYP pfn_glIsShader) (GLuint); extern pfn_glIsShader fp_glIsShader; typedef void (APIENTRYP pfn_glLinkProgram) (GLuint); extern pfn_glLinkProgram fp_glLinkProgram; typedef void (APIENTRYP pfn_glShaderSource) (GLuint, GLsizei, const GLchar**, const GLint*); extern pfn_glShaderSource fp_glShaderSource; typedef void (APIENTRYP pfn_glUseProgram) (GLuint); extern pfn_glUseProgram fp_glUseProgram; typedef void (APIENTRYP pfn_glUniform1f) (GLint, GLfloat); extern pfn_glUniform1f fp_glUniform1f; typedef void (APIENTRYP pfn_glUniform2f) (GLint, GLfloat, GLfloat); extern pfn_glUniform2f fp_glUniform2f; typedef void (APIENTRYP pfn_glUniform3f) (GLint, GLfloat, GLfloat, GLfloat); extern pfn_glUniform3f fp_glUniform3f; typedef void (APIENTRYP pfn_glUniform4f) (GLint, GLfloat, GLfloat, GLfloat, GLfloat); extern pfn_glUniform4f fp_glUniform4f; typedef void (APIENTRYP pfn_glUniform1i) (GLint, GLint); extern pfn_glUniform1i fp_glUniform1i; typedef void (APIENTRYP pfn_glUniform2i) (GLint, GLint, GLint); extern pfn_glUniform2i fp_glUniform2i; typedef void (APIENTRYP pfn_glUniform3i) (GLint, GLint, GLint, GLint); extern pfn_glUniform3i fp_glUniform3i; typedef void (APIENTRYP pfn_glUniform4i) (GLint, GLint, GLint, GLint, GLint); extern pfn_glUniform4i fp_glUniform4i; typedef void (APIENTRYP pfn_glUniform1fv) (GLint, GLsizei, const GLfloat*); extern pfn_glUniform1fv fp_glUniform1fv; typedef void (APIENTRYP pfn_glUniform2fv) (GLint, GLsizei, const GLfloat*); extern pfn_glUniform2fv fp_glUniform2fv; typedef void (APIENTRYP pfn_glUniform3fv) (GLint, GLsizei, const GLfloat*); extern pfn_glUniform3fv fp_glUniform3fv; typedef void (APIENTRYP pfn_glUniform4fv) (GLint, GLsizei, const GLfloat*); extern pfn_glUniform4fv fp_glUniform4fv; typedef void (APIENTRYP pfn_glUniform1iv) (GLint, GLsizei, const GLint*); extern pfn_glUniform1iv fp_glUniform1iv; typedef void (APIENTRYP pfn_glUniform2iv) (GLint, GLsizei, const GLint*); extern pfn_glUniform2iv fp_glUniform2iv; typedef void (APIENTRYP pfn_glUniform3iv) (GLint, GLsizei, const GLint*); extern pfn_glUniform3iv fp_glUniform3iv; typedef void (APIENTRYP pfn_glUniform4iv) (GLint, GLsizei, const GLint*); extern pfn_glUniform4iv fp_glUniform4iv; typedef void (APIENTRYP pfn_glUniformMatrix2fv) (GLint, GLsizei, GLboolean, const GLfloat*); extern pfn_glUniformMatrix2fv fp_glUniformMatrix2fv; typedef void (APIENTRYP pfn_glUniformMatrix3fv) (GLint, GLsizei, GLboolean, const GLfloat*); extern pfn_glUniformMatrix3fv fp_glUniformMatrix3fv; typedef void (APIENTRYP pfn_glUniformMatrix4fv) (GLint, GLsizei, GLboolean, const GLfloat*); extern pfn_glUniformMatrix4fv fp_glUniformMatrix4fv; typedef void (APIENTRYP pfn_glValidateProgram) (GLuint); extern pfn_glValidateProgram fp_glValidateProgram; typedef void (APIENTRYP pfn_glVertexAttrib1d) (GLuint, GLdouble); extern pfn_glVertexAttrib1d fp_glVertexAttrib1d; typedef void (APIENTRYP pfn_glVertexAttrib1dv) (GLuint, const GLdouble*); extern pfn_glVertexAttrib1dv fp_glVertexAttrib1dv; typedef void (APIENTRYP pfn_glVertexAttrib1f) (GLuint, GLfloat); extern pfn_glVertexAttrib1f fp_glVertexAttrib1f; typedef void (APIENTRYP pfn_glVertexAttrib1fv) (GLuint, const GLfloat*); extern pfn_glVertexAttrib1fv fp_glVertexAttrib1fv; typedef void (APIENTRYP pfn_glVertexAttrib1s) (GLuint, GLshort); extern pfn_glVertexAttrib1s fp_glVertexAttrib1s; typedef void (APIENTRYP pfn_glVertexAttrib1sv) (GLuint, const GLshort*); extern pfn_glVertexAttrib1sv fp_glVertexAttrib1sv; typedef void (APIENTRYP pfn_glVertexAttrib2d) (GLuint, GLdouble, GLdouble); extern pfn_glVertexAttrib2d fp_glVertexAttrib2d; typedef void (APIENTRYP pfn_glVertexAttrib2dv) (GLuint, const GLdouble*); extern pfn_glVertexAttrib2dv fp_glVertexAttrib2dv; typedef void (APIENTRYP pfn_glVertexAttrib2f) (GLuint, GLfloat, GLfloat); extern pfn_glVertexAttrib2f fp_glVertexAttrib2f; typedef void (APIENTRYP pfn_glVertexAttrib2fv) (GLuint, const GLfloat*); extern pfn_glVertexAttrib2fv fp_glVertexAttrib2fv; typedef void (APIENTRYP pfn_glVertexAttrib2s) (GLuint, GLshort, GLshort); extern pfn_glVertexAttrib2s fp_glVertexAttrib2s; typedef void (APIENTRYP pfn_glVertexAttrib2sv) (GLuint, const GLshort*); extern pfn_glVertexAttrib2sv fp_glVertexAttrib2sv; typedef void (APIENTRYP pfn_glVertexAttrib3d) (GLuint, GLdouble, GLdouble, GLdouble); extern pfn_glVertexAttrib3d fp_glVertexAttrib3d; typedef void (APIENTRYP pfn_glVertexAttrib3dv) (GLuint, const GLdouble*); extern pfn_glVertexAttrib3dv fp_glVertexAttrib3dv; typedef void (APIENTRYP pfn_glVertexAttrib3f) (GLuint, GLfloat, GLfloat, GLfloat); extern pfn_glVertexAttrib3f fp_glVertexAttrib3f; typedef void (APIENTRYP pfn_glVertexAttrib3fv) (GLuint, const GLfloat*); extern pfn_glVertexAttrib3fv fp_glVertexAttrib3fv; typedef void (APIENTRYP pfn_glVertexAttrib3s) (GLuint, GLshort, GLshort, GLshort); extern pfn_glVertexAttrib3s fp_glVertexAttrib3s; typedef void (APIENTRYP pfn_glVertexAttrib3sv) (GLuint, const GLshort*); extern pfn_glVertexAttrib3sv fp_glVertexAttrib3sv; typedef void (APIENTRYP pfn_glVertexAttrib4Nbv) (GLuint, const GLbyte*); extern pfn_glVertexAttrib4Nbv fp_glVertexAttrib4Nbv; typedef void (APIENTRYP pfn_glVertexAttrib4Niv) (GLuint, const GLint*); extern pfn_glVertexAttrib4Niv fp_glVertexAttrib4Niv; typedef void (APIENTRYP pfn_glVertexAttrib4Nsv) (GLuint, const GLshort*); extern pfn_glVertexAttrib4Nsv fp_glVertexAttrib4Nsv; typedef void (APIENTRYP pfn_glVertexAttrib4Nub) (GLuint, GLubyte, GLubyte, GLubyte, GLubyte); extern pfn_glVertexAttrib4Nub fp_glVertexAttrib4Nub; typedef void (APIENTRYP pfn_glVertexAttrib4Nubv) (GLuint, const GLubyte*); extern pfn_glVertexAttrib4Nubv fp_glVertexAttrib4Nubv; typedef void (APIENTRYP pfn_glVertexAttrib4Nuiv) (GLuint, const GLuint*); extern pfn_glVertexAttrib4Nuiv fp_glVertexAttrib4Nuiv; typedef void (APIENTRYP pfn_glVertexAttrib4Nusv) (GLuint, const GLushort*); extern pfn_glVertexAttrib4Nusv fp_glVertexAttrib4Nusv; typedef void (APIENTRYP pfn_glVertexAttrib4bv) (GLuint, const GLbyte*); extern pfn_glVertexAttrib4bv fp_glVertexAttrib4bv; typedef void (APIENTRYP pfn_glVertexAttrib4d) (GLuint, GLdouble, GLdouble, GLdouble, GLdouble); extern pfn_glVertexAttrib4d fp_glVertexAttrib4d; typedef void (APIENTRYP pfn_glVertexAttrib4dv) (GLuint, const GLdouble*); extern pfn_glVertexAttrib4dv fp_glVertexAttrib4dv; typedef void (APIENTRYP pfn_glVertexAttrib4f) (GLuint, GLfloat, GLfloat, GLfloat, GLfloat); extern pfn_glVertexAttrib4f fp_glVertexAttrib4f; typedef void (APIENTRYP pfn_glVertexAttrib4fv) (GLuint, const GLfloat*); extern pfn_glVertexAttrib4fv fp_glVertexAttrib4fv; typedef void (APIENTRYP pfn_glVertexAttrib4iv) (GLuint, const GLint*); extern pfn_glVertexAttrib4iv fp_glVertexAttrib4iv; typedef void (APIENTRYP pfn_glVertexAttrib4s) (GLuint, GLshort, GLshort, GLshort, GLshort); extern pfn_glVertexAttrib4s fp_glVertexAttrib4s; typedef void (APIENTRYP pfn_glVertexAttrib4sv) (GLuint, const GLshort*); extern pfn_glVertexAttrib4sv fp_glVertexAttrib4sv; typedef void (APIENTRYP pfn_glVertexAttrib4ubv) (GLuint, const GLubyte*); extern pfn_glVertexAttrib4ubv fp_glVertexAttrib4ubv; typedef void (APIENTRYP pfn_glVertexAttrib4uiv) (GLuint, const GLuint*); extern pfn_glVertexAttrib4uiv fp_glVertexAttrib4uiv; typedef void (APIENTRYP pfn_glVertexAttrib4usv) (GLuint, const GLushort*); extern pfn_glVertexAttrib4usv fp_glVertexAttrib4usv; typedef void (APIENTRYP pfn_glVertexAttribPointer) (GLuint, GLint, GLenum, GLboolean, GLsizei, const void*); extern pfn_glVertexAttribPointer fp_glVertexAttribPointer; /* GL_VERSION_2_1 */ extern GLboolean GLAD_VERSION_2_1; #define GL_PIXEL_PACK_BUFFER 0x88EB #define GL_PIXEL_UNPACK_BUFFER 0x88EC #define GL_PIXEL_PACK_BUFFER_BINDING 0x88ED #define GL_PIXEL_UNPACK_BUFFER_BINDING 0x88EF #define GL_FLOAT_MAT2x3 0x8B65 #define GL_FLOAT_MAT2x4 0x8B66 #define GL_FLOAT_MAT3x2 0x8B67 #define GL_FLOAT_MAT3x4 0x8B68 #define GL_FLOAT_MAT4x2 0x8B69 #define GL_FLOAT_MAT4x3 0x8B6A #define GL_SRGB 0x8C40 #define GL_SRGB8 0x8C41 #define GL_SRGB_ALPHA 0x8C42 #define GL_SRGB8_ALPHA8 0x8C43 #define GL_COMPRESSED_SRGB 0x8C48 #define GL_COMPRESSED_SRGB_ALPHA 0x8C49 #define GL_CURRENT_RASTER_SECONDARY_COLOR 0x845F #define GL_SLUMINANCE_ALPHA 0x8C44 #define GL_SLUMINANCE8_ALPHA8 0x8C45 #define GL_SLUMINANCE 0x8C46 #define GL_SLUMINANCE8 0x8C47 #define GL_COMPRESSED_SLUMINANCE 0x8C4A #define GL_COMPRESSED_SLUMINANCE_ALPHA 0x8C4B typedef void (APIENTRYP pfn_glUniformMatrix2x3fv) (GLint, GLsizei, GLboolean, const GLfloat*); extern pfn_glUniformMatrix2x3fv fp_glUniformMatrix2x3fv; typedef void (APIENTRYP pfn_glUniformMatrix3x2fv) (GLint, GLsizei, GLboolean, const GLfloat*); extern pfn_glUniformMatrix3x2fv fp_glUniformMatrix3x2fv; typedef void (APIENTRYP pfn_glUniformMatrix2x4fv) (GLint, GLsizei, GLboolean, const GLfloat*); extern pfn_glUniformMatrix2x4fv fp_glUniformMatrix2x4fv; typedef void (APIENTRYP pfn_glUniformMatrix4x2fv) (GLint, GLsizei, GLboolean, const GLfloat*); extern pfn_glUniformMatrix4x2fv fp_glUniformMatrix4x2fv; typedef void (APIENTRYP pfn_glUniformMatrix3x4fv) (GLint, GLsizei, GLboolean, const GLfloat*); extern pfn_glUniformMatrix3x4fv fp_glUniformMatrix3x4fv; typedef void (APIENTRYP pfn_glUniformMatrix4x3fv) (GLint, GLsizei, GLboolean, const GLfloat*); extern pfn_glUniformMatrix4x3fv fp_glUniformMatrix4x3fv; /* GL_VERSION_3_0 */ extern GLboolean GLAD_VERSION_3_0; #define GL_COMPARE_REF_TO_TEXTURE 0x884E #define GL_CLIP_DISTANCE0 0x3000 #define GL_CLIP_DISTANCE1 0x3001 #define GL_CLIP_DISTANCE2 0x3002 #define GL_CLIP_DISTANCE3 0x3003 #define GL_CLIP_DISTANCE4 0x3004 #define GL_CLIP_DISTANCE5 0x3005 #define GL_CLIP_DISTANCE6 0x3006 #define GL_CLIP_DISTANCE7 0x3007 #define GL_MAX_CLIP_DISTANCES 0x0D32 #define GL_MAJOR_VERSION 0x821B #define GL_MINOR_VERSION 0x821C #define GL_NUM_EXTENSIONS 0x821D #define GL_CONTEXT_FLAGS 0x821E #define GL_COMPRESSED_RED 0x8225 #define GL_COMPRESSED_RG 0x8226 #define GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT 0x00000001 #define GL_RGBA32F 0x8814 #define GL_RGB32F 0x8815 #define GL_RGBA16F 0x881A #define GL_RGB16F 0x881B #define GL_VERTEX_ATTRIB_ARRAY_INTEGER 0x88FD #define GL_MAX_ARRAY_TEXTURE_LAYERS 0x88FF #define GL_MIN_PROGRAM_TEXEL_OFFSET 0x8904 #define GL_MAX_PROGRAM_TEXEL_OFFSET 0x8905 #define GL_CLAMP_READ_COLOR 0x891C #define GL_FIXED_ONLY 0x891D #define GL_MAX_VARYING_COMPONENTS 0x8B4B #define GL_TEXTURE_1D_ARRAY 0x8C18 #define GL_PROXY_TEXTURE_1D_ARRAY 0x8C19 #define GL_TEXTURE_2D_ARRAY 0x8C1A #define GL_PROXY_TEXTURE_2D_ARRAY 0x8C1B #define GL_TEXTURE_BINDING_1D_ARRAY 0x8C1C #define GL_TEXTURE_BINDING_2D_ARRAY 0x8C1D #define GL_R11F_G11F_B10F 0x8C3A #define GL_UNSIGNED_INT_10F_11F_11F_REV 0x8C3B #define GL_RGB9_E5 0x8C3D #define GL_UNSIGNED_INT_5_9_9_9_REV 0x8C3E #define GL_TEXTURE_SHARED_SIZE 0x8C3F #define GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH 0x8C76 #define GL_TRANSFORM_FEEDBACK_BUFFER_MODE 0x8C7F #define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS 0x8C80 #define GL_TRANSFORM_FEEDBACK_VARYINGS 0x8C83 #define GL_TRANSFORM_FEEDBACK_BUFFER_START 0x8C84 #define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE 0x8C85 #define GL_PRIMITIVES_GENERATED 0x8C87 #define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN 0x8C88 #define GL_RASTERIZER_DISCARD 0x8C89 #define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS 0x8C8A #define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS 0x8C8B #define GL_INTERLEAVED_ATTRIBS 0x8C8C #define GL_SEPARATE_ATTRIBS 0x8C8D #define GL_TRANSFORM_FEEDBACK_BUFFER 0x8C8E #define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING 0x8C8F #define GL_RGBA32UI 0x8D70 #define GL_RGB32UI 0x8D71 #define GL_RGBA16UI 0x8D76 #define GL_RGB16UI 0x8D77 #define GL_RGBA8UI 0x8D7C #define GL_RGB8UI 0x8D7D #define GL_RGBA32I 0x8D82 #define GL_RGB32I 0x8D83 #define GL_RGBA16I 0x8D88 #define GL_RGB16I 0x8D89 #define GL_RGBA8I 0x8D8E #define GL_RGB8I 0x8D8F #define GL_RED_INTEGER 0x8D94 #define GL_GREEN_INTEGER 0x8D95 #define GL_BLUE_INTEGER 0x8D96 #define GL_RGB_INTEGER 0x8D98 #define GL_RGBA_INTEGER 0x8D99 #define GL_BGR_INTEGER 0x8D9A #define GL_BGRA_INTEGER 0x8D9B #define GL_SAMPLER_1D_ARRAY 0x8DC0 #define GL_SAMPLER_2D_ARRAY 0x8DC1 #define GL_SAMPLER_1D_ARRAY_SHADOW 0x8DC3 #define GL_SAMPLER_2D_ARRAY_SHADOW 0x8DC4 #define GL_SAMPLER_CUBE_SHADOW 0x8DC5 #define GL_UNSIGNED_INT_VEC2 0x8DC6 #define GL_UNSIGNED_INT_VEC3 0x8DC7 #define GL_UNSIGNED_INT_VEC4 0x8DC8 #define GL_INT_SAMPLER_1D 0x8DC9 #define GL_INT_SAMPLER_2D 0x8DCA #define GL_INT_SAMPLER_3D 0x8DCB #define GL_INT_SAMPLER_CUBE 0x8DCC #define GL_INT_SAMPLER_1D_ARRAY 0x8DCE #define GL_INT_SAMPLER_2D_ARRAY 0x8DCF #define GL_UNSIGNED_INT_SAMPLER_1D 0x8DD1 #define GL_UNSIGNED_INT_SAMPLER_2D 0x8DD2 #define GL_UNSIGNED_INT_SAMPLER_3D 0x8DD3 #define GL_UNSIGNED_INT_SAMPLER_CUBE 0x8DD4 #define GL_UNSIGNED_INT_SAMPLER_1D_ARRAY 0x8DD6 #define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY 0x8DD7 #define GL_QUERY_WAIT 0x8E13 #define GL_QUERY_NO_WAIT 0x8E14 #define GL_QUERY_BY_REGION_WAIT 0x8E15 #define GL_QUERY_BY_REGION_NO_WAIT 0x8E16 #define GL_BUFFER_ACCESS_FLAGS 0x911F #define GL_BUFFER_MAP_LENGTH 0x9120 #define GL_BUFFER_MAP_OFFSET 0x9121 #define GL_DEPTH_COMPONENT32F 0x8CAC #define GL_DEPTH32F_STENCIL8 0x8CAD #define GL_FLOAT_32_UNSIGNED_INT_24_8_REV 0x8DAD #define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506 #define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING 0x8210 #define GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE 0x8211 #define GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE 0x8212 #define GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE 0x8213 #define GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE 0x8214 #define GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE 0x8215 #define GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE 0x8216 #define GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE 0x8217 #define GL_FRAMEBUFFER_DEFAULT 0x8218 #define GL_FRAMEBUFFER_UNDEFINED 0x8219 #define GL_DEPTH_STENCIL_ATTACHMENT 0x821A #define GL_MAX_RENDERBUFFER_SIZE 0x84E8 #define GL_DEPTH_STENCIL 0x84F9 #define GL_UNSIGNED_INT_24_8 0x84FA #define GL_DEPTH24_STENCIL8 0x88F0 #define GL_TEXTURE_STENCIL_SIZE 0x88F1 #define GL_TEXTURE_RED_TYPE 0x8C10 #define GL_TEXTURE_GREEN_TYPE 0x8C11 #define GL_TEXTURE_BLUE_TYPE 0x8C12 #define GL_TEXTURE_ALPHA_TYPE 0x8C13 #define GL_TEXTURE_DEPTH_TYPE 0x8C16 #define GL_UNSIGNED_NORMALIZED 0x8C17 #define GL_FRAMEBUFFER_BINDING 0x8CA6 #define GL_DRAW_FRAMEBUFFER_BINDING 0x8CA6 #define GL_RENDERBUFFER_BINDING 0x8CA7 #define GL_READ_FRAMEBUFFER 0x8CA8 #define GL_DRAW_FRAMEBUFFER 0x8CA9 #define GL_READ_FRAMEBUFFER_BINDING 0x8CAA #define GL_RENDERBUFFER_SAMPLES 0x8CAB #define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0 #define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1 #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2 #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3 #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER 0x8CD4 #define GL_FRAMEBUFFER_COMPLETE 0x8CD5 #define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6 #define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7 #define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER 0x8CDB #define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER 0x8CDC #define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD #define GL_MAX_COLOR_ATTACHMENTS 0x8CDF #define GL_COLOR_ATTACHMENT0 0x8CE0 #define GL_COLOR_ATTACHMENT1 0x8CE1 #define GL_COLOR_ATTACHMENT2 0x8CE2 #define GL_COLOR_ATTACHMENT3 0x8CE3 #define GL_COLOR_ATTACHMENT4 0x8CE4 #define GL_COLOR_ATTACHMENT5 0x8CE5 #define GL_COLOR_ATTACHMENT6 0x8CE6 #define GL_COLOR_ATTACHMENT7 0x8CE7 #define GL_COLOR_ATTACHMENT8 0x8CE8 #define GL_COLOR_ATTACHMENT9 0x8CE9 #define GL_COLOR_ATTACHMENT10 0x8CEA #define GL_COLOR_ATTACHMENT11 0x8CEB #define GL_COLOR_ATTACHMENT12 0x8CEC #define GL_COLOR_ATTACHMENT13 0x8CED #define GL_COLOR_ATTACHMENT14 0x8CEE #define GL_COLOR_ATTACHMENT15 0x8CEF #define GL_COLOR_ATTACHMENT16 0x8CF0 #define GL_COLOR_ATTACHMENT17 0x8CF1 #define GL_COLOR_ATTACHMENT18 0x8CF2 #define GL_COLOR_ATTACHMENT19 0x8CF3 #define GL_COLOR_ATTACHMENT20 0x8CF4 #define GL_COLOR_ATTACHMENT21 0x8CF5 #define GL_COLOR_ATTACHMENT22 0x8CF6 #define GL_COLOR_ATTACHMENT23 0x8CF7 #define GL_COLOR_ATTACHMENT24 0x8CF8 #define GL_COLOR_ATTACHMENT25 0x8CF9 #define GL_COLOR_ATTACHMENT26 0x8CFA #define GL_COLOR_ATTACHMENT27 0x8CFB #define GL_COLOR_ATTACHMENT28 0x8CFC #define GL_COLOR_ATTACHMENT29 0x8CFD #define GL_COLOR_ATTACHMENT30 0x8CFE #define GL_COLOR_ATTACHMENT31 0x8CFF #define GL_DEPTH_ATTACHMENT 0x8D00 #define GL_STENCIL_ATTACHMENT 0x8D20 #define GL_FRAMEBUFFER 0x8D40 #define GL_RENDERBUFFER 0x8D41 #define GL_RENDERBUFFER_WIDTH 0x8D42 #define GL_RENDERBUFFER_HEIGHT 0x8D43 #define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44 #define GL_STENCIL_INDEX1 0x8D46 #define GL_STENCIL_INDEX4 0x8D47 #define GL_STENCIL_INDEX8 0x8D48 #define GL_STENCIL_INDEX16 0x8D49 #define GL_RENDERBUFFER_RED_SIZE 0x8D50 #define GL_RENDERBUFFER_GREEN_SIZE 0x8D51 #define GL_RENDERBUFFER_BLUE_SIZE 0x8D52 #define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53 #define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54 #define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55 #define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE 0x8D56 #define GL_MAX_SAMPLES 0x8D57 #define GL_INDEX 0x8222 #define GL_TEXTURE_LUMINANCE_TYPE 0x8C14 #define GL_TEXTURE_INTENSITY_TYPE 0x8C15 #define GL_FRAMEBUFFER_SRGB 0x8DB9 #define GL_HALF_FLOAT 0x140B #define GL_MAP_READ_BIT 0x0001 #define GL_MAP_WRITE_BIT 0x0002 #define GL_MAP_INVALIDATE_RANGE_BIT 0x0004 #define GL_MAP_INVALIDATE_BUFFER_BIT 0x0008 #define GL_MAP_FLUSH_EXPLICIT_BIT 0x0010 #define GL_MAP_UNSYNCHRONIZED_BIT 0x0020 #define GL_COMPRESSED_RED_RGTC1 0x8DBB #define GL_COMPRESSED_SIGNED_RED_RGTC1 0x8DBC #define GL_COMPRESSED_RG_RGTC2 0x8DBD #define GL_COMPRESSED_SIGNED_RG_RGTC2 0x8DBE #define GL_RG 0x8227 #define GL_RG_INTEGER 0x8228 #define GL_R8 0x8229 #define GL_R16 0x822A #define GL_RG8 0x822B #define GL_RG16 0x822C #define GL_R16F 0x822D #define GL_R32F 0x822E #define GL_RG16F 0x822F #define GL_RG32F 0x8230 #define GL_R8I 0x8231 #define GL_R8UI 0x8232 #define GL_R16I 0x8233 #define GL_R16UI 0x8234 #define GL_R32I 0x8235 #define GL_R32UI 0x8236 #define GL_RG8I 0x8237 #define GL_RG8UI 0x8238 #define GL_RG16I 0x8239 #define GL_RG16UI 0x823A #define GL_RG32I 0x823B #define GL_RG32UI 0x823C #define GL_VERTEX_ARRAY_BINDING 0x85B5 #define GL_CLAMP_VERTEX_COLOR 0x891A #define GL_CLAMP_FRAGMENT_COLOR 0x891B #define GL_ALPHA_INTEGER 0x8D97 typedef void (APIENTRYP pfn_glColorMaski) (GLuint, GLboolean, GLboolean, GLboolean, GLboolean); extern pfn_glColorMaski fp_glColorMaski; typedef void (APIENTRYP pfn_glGetBooleani_v) (GLenum, GLuint, GLboolean*); extern pfn_glGetBooleani_v fp_glGetBooleani_v; typedef void (APIENTRYP pfn_glGetIntegeri_v) (GLenum, GLuint, GLint*); extern pfn_glGetIntegeri_v fp_glGetIntegeri_v; typedef void (APIENTRYP pfn_glEnablei) (GLenum, GLuint); extern pfn_glEnablei fp_glEnablei; typedef void (APIENTRYP pfn_glDisablei) (GLenum, GLuint); extern pfn_glDisablei fp_glDisablei; typedef GLboolean (APIENTRYP pfn_glIsEnabledi) (GLenum, GLuint); extern pfn_glIsEnabledi fp_glIsEnabledi; typedef void (APIENTRYP pfn_glBeginTransformFeedback) (GLenum); extern pfn_glBeginTransformFeedback fp_glBeginTransformFeedback; typedef void (APIENTRYP pfn_glEndTransformFeedback) (); extern pfn_glEndTransformFeedback fp_glEndTransformFeedback; typedef void (APIENTRYP pfn_glBindBufferRange) (GLenum, GLuint, GLuint, GLintptr, GLsizeiptr); extern pfn_glBindBufferRange fp_glBindBufferRange; typedef void (APIENTRYP pfn_glBindBufferBase) (GLenum, GLuint, GLuint); extern pfn_glBindBufferBase fp_glBindBufferBase; typedef void (APIENTRYP pfn_glTransformFeedbackVaryings) (GLuint, GLsizei, const GLchar**, GLenum); extern pfn_glTransformFeedbackVaryings fp_glTransformFeedbackVaryings; typedef void (APIENTRYP pfn_glGetTransformFeedbackVarying) (GLuint, GLuint, GLsizei, GLsizei*, GLsizei*, GLenum*, GLchar*); extern pfn_glGetTransformFeedbackVarying fp_glGetTransformFeedbackVarying; typedef void (APIENTRYP pfn_glClampColor) (GLenum, GLenum); extern pfn_glClampColor fp_glClampColor; typedef void (APIENTRYP pfn_glBeginConditionalRender) (GLuint, GLenum); extern pfn_glBeginConditionalRender fp_glBeginConditionalRender; typedef void (APIENTRYP pfn_glEndConditionalRender) (); extern pfn_glEndConditionalRender fp_glEndConditionalRender; typedef void (APIENTRYP pfn_glVertexAttribIPointer) (GLuint, GLint, GLenum, GLsizei, const void*); extern pfn_glVertexAttribIPointer fp_glVertexAttribIPointer; typedef void (APIENTRYP pfn_glGetVertexAttribIiv) (GLuint, GLenum, GLint*); extern pfn_glGetVertexAttribIiv fp_glGetVertexAttribIiv; typedef void (APIENTRYP pfn_glGetVertexAttribIuiv) (GLuint, GLenum, GLuint*); extern pfn_glGetVertexAttribIuiv fp_glGetVertexAttribIuiv; typedef void (APIENTRYP pfn_glVertexAttribI1i) (GLuint, GLint); extern pfn_glVertexAttribI1i fp_glVertexAttribI1i; typedef void (APIENTRYP pfn_glVertexAttribI2i) (GLuint, GLint, GLint); extern pfn_glVertexAttribI2i fp_glVertexAttribI2i; typedef void (APIENTRYP pfn_glVertexAttribI3i) (GLuint, GLint, GLint, GLint); extern pfn_glVertexAttribI3i fp_glVertexAttribI3i; typedef void (APIENTRYP pfn_glVertexAttribI4i) (GLuint, GLint, GLint, GLint, GLint); extern pfn_glVertexAttribI4i fp_glVertexAttribI4i; typedef void (APIENTRYP pfn_glVertexAttribI1ui) (GLuint, GLuint); extern pfn_glVertexAttribI1ui fp_glVertexAttribI1ui; typedef void (APIENTRYP pfn_glVertexAttribI2ui) (GLuint, GLuint, GLuint); extern pfn_glVertexAttribI2ui fp_glVertexAttribI2ui; typedef void (APIENTRYP pfn_glVertexAttribI3ui) (GLuint, GLuint, GLuint, GLuint); extern pfn_glVertexAttribI3ui fp_glVertexAttribI3ui; typedef void (APIENTRYP pfn_glVertexAttribI4ui) (GLuint, GLuint, GLuint, GLuint, GLuint); extern pfn_glVertexAttribI4ui fp_glVertexAttribI4ui; typedef void (APIENTRYP pfn_glVertexAttribI1iv) (GLuint, const GLint*); extern pfn_glVertexAttribI1iv fp_glVertexAttribI1iv; typedef void (APIENTRYP pfn_glVertexAttribI2iv) (GLuint, const GLint*); extern pfn_glVertexAttribI2iv fp_glVertexAttribI2iv; typedef void (APIENTRYP pfn_glVertexAttribI3iv) (GLuint, const GLint*); extern pfn_glVertexAttribI3iv fp_glVertexAttribI3iv; typedef void (APIENTRYP pfn_glVertexAttribI4iv) (GLuint, const GLint*); extern pfn_glVertexAttribI4iv fp_glVertexAttribI4iv; typedef void (APIENTRYP pfn_glVertexAttribI1uiv) (GLuint, const GLuint*); extern pfn_glVertexAttribI1uiv fp_glVertexAttribI1uiv; typedef void (APIENTRYP pfn_glVertexAttribI2uiv) (GLuint, const GLuint*); extern pfn_glVertexAttribI2uiv fp_glVertexAttribI2uiv; typedef void (APIENTRYP pfn_glVertexAttribI3uiv) (GLuint, const GLuint*); extern pfn_glVertexAttribI3uiv fp_glVertexAttribI3uiv; typedef void (APIENTRYP pfn_glVertexAttribI4uiv) (GLuint, const GLuint*); extern pfn_glVertexAttribI4uiv fp_glVertexAttribI4uiv; typedef void (APIENTRYP pfn_glVertexAttribI4bv) (GLuint, const GLbyte*); extern pfn_glVertexAttribI4bv fp_glVertexAttribI4bv; typedef void (APIENTRYP pfn_glVertexAttribI4sv) (GLuint, const GLshort*); extern pfn_glVertexAttribI4sv fp_glVertexAttribI4sv; typedef void (APIENTRYP pfn_glVertexAttribI4ubv) (GLuint, const GLubyte*); extern pfn_glVertexAttribI4ubv fp_glVertexAttribI4ubv; typedef void (APIENTRYP pfn_glVertexAttribI4usv) (GLuint, const GLushort*); extern pfn_glVertexAttribI4usv fp_glVertexAttribI4usv; typedef void (APIENTRYP pfn_glGetUniformuiv) (GLuint, GLint, GLuint*); extern pfn_glGetUniformuiv fp_glGetUniformuiv; typedef void (APIENTRYP pfn_glBindFragDataLocation) (GLuint, GLuint, const GLchar*); extern pfn_glBindFragDataLocation fp_glBindFragDataLocation; typedef GLint (APIENTRYP pfn_glGetFragDataLocation) (GLuint, const GLchar*); extern pfn_glGetFragDataLocation fp_glGetFragDataLocation; typedef void (APIENTRYP pfn_glUniform1ui) (GLint, GLuint); extern pfn_glUniform1ui fp_glUniform1ui; typedef void (APIENTRYP pfn_glUniform2ui) (GLint, GLuint, GLuint); extern pfn_glUniform2ui fp_glUniform2ui; typedef void (APIENTRYP pfn_glUniform3ui) (GLint, GLuint, GLuint, GLuint); extern pfn_glUniform3ui fp_glUniform3ui; typedef void (APIENTRYP pfn_glUniform4ui) (GLint, GLuint, GLuint, GLuint, GLuint); extern pfn_glUniform4ui fp_glUniform4ui; typedef void (APIENTRYP pfn_glUniform1uiv) (GLint, GLsizei, const GLuint*); extern pfn_glUniform1uiv fp_glUniform1uiv; typedef void (APIENTRYP pfn_glUniform2uiv) (GLint, GLsizei, const GLuint*); extern pfn_glUniform2uiv fp_glUniform2uiv; typedef void (APIENTRYP pfn_glUniform3uiv) (GLint, GLsizei, const GLuint*); extern pfn_glUniform3uiv fp_glUniform3uiv; typedef void (APIENTRYP pfn_glUniform4uiv) (GLint, GLsizei, const GLuint*); extern pfn_glUniform4uiv fp_glUniform4uiv; typedef void (APIENTRYP pfn_glTexParameterIiv) (GLenum, GLenum, const GLint*); extern pfn_glTexParameterIiv fp_glTexParameterIiv; typedef void (APIENTRYP pfn_glTexParameterIuiv) (GLenum, GLenum, const GLuint*); extern pfn_glTexParameterIuiv fp_glTexParameterIuiv; typedef void (APIENTRYP pfn_glGetTexParameterIiv) (GLenum, GLenum, GLint*); extern pfn_glGetTexParameterIiv fp_glGetTexParameterIiv; typedef void (APIENTRYP pfn_glGetTexParameterIuiv) (GLenum, GLenum, GLuint*); extern pfn_glGetTexParameterIuiv fp_glGetTexParameterIuiv; typedef void (APIENTRYP pfn_glClearBufferiv) (GLenum, GLint, const GLint*); extern pfn_glClearBufferiv fp_glClearBufferiv; typedef void (APIENTRYP pfn_glClearBufferuiv) (GLenum, GLint, const GLuint*); extern pfn_glClearBufferuiv fp_glClearBufferuiv; typedef void (APIENTRYP pfn_glClearBufferfv) (GLenum, GLint, const GLfloat*); extern pfn_glClearBufferfv fp_glClearBufferfv; typedef void (APIENTRYP pfn_glClearBufferfi) (GLenum, GLint, GLfloat, GLint); extern pfn_glClearBufferfi fp_glClearBufferfi; typedef const GLubyte* (APIENTRYP pfn_glGetStringi) (GLenum, GLuint); extern pfn_glGetStringi fp_glGetStringi; typedef GLboolean (APIENTRYP pfn_glIsRenderbuffer) (GLuint); extern pfn_glIsRenderbuffer fp_glIsRenderbuffer; typedef void (APIENTRYP pfn_glBindRenderbuffer) (GLenum, GLuint); extern pfn_glBindRenderbuffer fp_glBindRenderbuffer; typedef void (APIENTRYP pfn_glDeleteRenderbuffers) (GLsizei, const GLuint*); extern pfn_glDeleteRenderbuffers fp_glDeleteRenderbuffers; typedef void (APIENTRYP pfn_glGenRenderbuffers) (GLsizei, GLuint*); extern pfn_glGenRenderbuffers fp_glGenRenderbuffers; typedef void (APIENTRYP pfn_glRenderbufferStorage) (GLenum, GLenum, GLsizei, GLsizei); extern pfn_glRenderbufferStorage fp_glRenderbufferStorage; typedef void (APIENTRYP pfn_glGetRenderbufferParameteriv) (GLenum, GLenum, GLint*); extern pfn_glGetRenderbufferParameteriv fp_glGetRenderbufferParameteriv; typedef GLboolean (APIENTRYP pfn_glIsFramebuffer) (GLuint); extern pfn_glIsFramebuffer fp_glIsFramebuffer; typedef void (APIENTRYP pfn_glBindFramebuffer) (GLenum, GLuint); extern pfn_glBindFramebuffer fp_glBindFramebuffer; typedef void (APIENTRYP pfn_glDeleteFramebuffers) (GLsizei, const GLuint*); extern pfn_glDeleteFramebuffers fp_glDeleteFramebuffers; typedef void (APIENTRYP pfn_glGenFramebuffers) (GLsizei, GLuint*); extern pfn_glGenFramebuffers fp_glGenFramebuffers; typedef GLenum (APIENTRYP pfn_glCheckFramebufferStatus) (GLenum); extern pfn_glCheckFramebufferStatus fp_glCheckFramebufferStatus; typedef void (APIENTRYP pfn_glFramebufferTexture1D) (GLenum, GLenum, GLenum, GLuint, GLint); extern pfn_glFramebufferTexture1D fp_glFramebufferTexture1D; typedef void (APIENTRYP pfn_glFramebufferTexture2D) (GLenum, GLenum, GLenum, GLuint, GLint); extern pfn_glFramebufferTexture2D fp_glFramebufferTexture2D; typedef void (APIENTRYP pfn_glFramebufferTexture3D) (GLenum, GLenum, GLenum, GLuint, GLint, GLint); extern pfn_glFramebufferTexture3D fp_glFramebufferTexture3D; typedef void (APIENTRYP pfn_glFramebufferRenderbuffer) (GLenum, GLenum, GLenum, GLuint); extern pfn_glFramebufferRenderbuffer fp_glFramebufferRenderbuffer; typedef void (APIENTRYP pfn_glGetFramebufferAttachmentParameteriv) (GLenum, GLenum, GLenum, GLint*); extern pfn_glGetFramebufferAttachmentParameteriv fp_glGetFramebufferAttachmentParameteriv; typedef void (APIENTRYP pfn_glGenerateMipmap) (GLenum); extern pfn_glGenerateMipmap fp_glGenerateMipmap; typedef void (APIENTRYP pfn_glBlitFramebuffer) (GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLbitfield, GLenum); extern pfn_glBlitFramebuffer fp_glBlitFramebuffer; typedef void (APIENTRYP pfn_glRenderbufferStorageMultisample) (GLenum, GLsizei, GLenum, GLsizei, GLsizei); extern pfn_glRenderbufferStorageMultisample fp_glRenderbufferStorageMultisample; typedef void (APIENTRYP pfn_glFramebufferTextureLayer) (GLenum, GLenum, GLuint, GLint, GLint); extern pfn_glFramebufferTextureLayer fp_glFramebufferTextureLayer; typedef void* (APIENTRYP pfn_glMapBufferRange) (GLenum, GLintptr, GLsizeiptr, GLbitfield); extern pfn_glMapBufferRange fp_glMapBufferRange; typedef void (APIENTRYP pfn_glFlushMappedBufferRange) (GLenum, GLintptr, GLsizeiptr); extern pfn_glFlushMappedBufferRange fp_glFlushMappedBufferRange; typedef void (APIENTRYP pfn_glBindVertexArray) (GLuint); extern pfn_glBindVertexArray fp_glBindVertexArray; typedef void (APIENTRYP pfn_glDeleteVertexArrays) (GLsizei, const GLuint*); extern pfn_glDeleteVertexArrays fp_glDeleteVertexArrays; typedef void (APIENTRYP pfn_glGenVertexArrays) (GLsizei, GLuint*); extern pfn_glGenVertexArrays fp_glGenVertexArrays; typedef GLboolean (APIENTRYP pfn_glIsVertexArray) (GLuint); extern pfn_glIsVertexArray fp_glIsVertexArray; /* GL_VERSION_3_1 */ extern GLboolean GLAD_VERSION_3_1; #define GL_SAMPLER_2D_RECT 0x8B63 #define GL_SAMPLER_2D_RECT_SHADOW 0x8B64 #define GL_SAMPLER_BUFFER 0x8DC2 #define GL_INT_SAMPLER_2D_RECT 0x8DCD #define GL_INT_SAMPLER_BUFFER 0x8DD0 #define GL_UNSIGNED_INT_SAMPLER_2D_RECT 0x8DD5 #define GL_UNSIGNED_INT_SAMPLER_BUFFER 0x8DD8 #define GL_TEXTURE_BUFFER 0x8C2A #define GL_MAX_TEXTURE_BUFFER_SIZE 0x8C2B #define GL_TEXTURE_BINDING_BUFFER 0x8C2C #define GL_TEXTURE_BUFFER_DATA_STORE_BINDING 0x8C2D #define GL_TEXTURE_RECTANGLE 0x84F5 #define GL_TEXTURE_BINDING_RECTANGLE 0x84F6 #define GL_PROXY_TEXTURE_RECTANGLE 0x84F7 #define GL_MAX_RECTANGLE_TEXTURE_SIZE 0x84F8 #define GL_R8_SNORM 0x8F94 #define GL_RG8_SNORM 0x8F95 #define GL_RGB8_SNORM 0x8F96 #define GL_RGBA8_SNORM 0x8F97 #define GL_R16_SNORM 0x8F98 #define GL_RG16_SNORM 0x8F99 #define GL_RGB16_SNORM 0x8F9A #define GL_RGBA16_SNORM 0x8F9B #define GL_SIGNED_NORMALIZED 0x8F9C #define GL_PRIMITIVE_RESTART 0x8F9D #define GL_PRIMITIVE_RESTART_INDEX 0x8F9E #define GL_COPY_READ_BUFFER 0x8F36 #define GL_COPY_WRITE_BUFFER 0x8F37 #define GL_UNIFORM_BUFFER 0x8A11 #define GL_UNIFORM_BUFFER_BINDING 0x8A28 #define GL_UNIFORM_BUFFER_START 0x8A29 #define GL_UNIFORM_BUFFER_SIZE 0x8A2A #define GL_MAX_VERTEX_UNIFORM_BLOCKS 0x8A2B #define GL_MAX_GEOMETRY_UNIFORM_BLOCKS 0x8A2C #define GL_MAX_FRAGMENT_UNIFORM_BLOCKS 0x8A2D #define GL_MAX_COMBINED_UNIFORM_BLOCKS 0x8A2E #define GL_MAX_UNIFORM_BUFFER_BINDINGS 0x8A2F #define GL_MAX_UNIFORM_BLOCK_SIZE 0x8A30 #define GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS 0x8A31 #define GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS 0x8A32 #define GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS 0x8A33 #define GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT 0x8A34 #define GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH 0x8A35 #define GL_ACTIVE_UNIFORM_BLOCKS 0x8A36 #define GL_UNIFORM_TYPE 0x8A37 #define GL_UNIFORM_SIZE 0x8A38 #define GL_UNIFORM_NAME_LENGTH 0x8A39 #define GL_UNIFORM_BLOCK_INDEX 0x8A3A #define GL_UNIFORM_OFFSET 0x8A3B #define GL_UNIFORM_ARRAY_STRIDE 0x8A3C #define GL_UNIFORM_MATRIX_STRIDE 0x8A3D #define GL_UNIFORM_IS_ROW_MAJOR 0x8A3E #define GL_UNIFORM_BLOCK_BINDING 0x8A3F #define GL_UNIFORM_BLOCK_DATA_SIZE 0x8A40 #define GL_UNIFORM_BLOCK_NAME_LENGTH 0x8A41 #define GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS 0x8A42 #define GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES 0x8A43 #define GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER 0x8A44 #define GL_UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER 0x8A45 #define GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER 0x8A46 #define GL_INVALID_INDEX 0xFFFFFFFF typedef void (APIENTRYP pfn_glDrawArraysInstanced) (GLenum, GLint, GLsizei, GLsizei); extern pfn_glDrawArraysInstanced fp_glDrawArraysInstanced; typedef void (APIENTRYP pfn_glDrawElementsInstanced) (GLenum, GLsizei, GLenum, const void*, GLsizei); extern pfn_glDrawElementsInstanced fp_glDrawElementsInstanced; typedef void (APIENTRYP pfn_glTexBuffer) (GLenum, GLenum, GLuint); extern pfn_glTexBuffer fp_glTexBuffer; typedef void (APIENTRYP pfn_glPrimitiveRestartIndex) (GLuint); extern pfn_glPrimitiveRestartIndex fp_glPrimitiveRestartIndex; typedef void (APIENTRYP pfn_glCopyBufferSubData) (GLenum, GLenum, GLintptr, GLintptr, GLsizeiptr); extern pfn_glCopyBufferSubData fp_glCopyBufferSubData; typedef void (APIENTRYP pfn_glGetUniformIndices) (GLuint, GLsizei, const GLchar**, GLuint*); extern pfn_glGetUniformIndices fp_glGetUniformIndices; typedef void (APIENTRYP pfn_glGetActiveUniformsiv) (GLuint, GLsizei, const GLuint*, GLenum, GLint*); extern pfn_glGetActiveUniformsiv fp_glGetActiveUniformsiv; typedef void (APIENTRYP pfn_glGetActiveUniformName) (GLuint, GLuint, GLsizei, GLsizei*, GLchar*); extern pfn_glGetActiveUniformName fp_glGetActiveUniformName; typedef GLuint (APIENTRYP pfn_glGetUniformBlockIndex) (GLuint, const GLchar*); extern pfn_glGetUniformBlockIndex fp_glGetUniformBlockIndex; typedef void (APIENTRYP pfn_glGetActiveUniformBlockiv) (GLuint, GLuint, GLenum, GLint*); extern pfn_glGetActiveUniformBlockiv fp_glGetActiveUniformBlockiv; typedef void (APIENTRYP pfn_glGetActiveUniformBlockName) (GLuint, GLuint, GLsizei, GLsizei*, GLchar*); extern pfn_glGetActiveUniformBlockName fp_glGetActiveUniformBlockName; typedef void (APIENTRYP pfn_glUniformBlockBinding) (GLuint, GLuint, GLuint); extern pfn_glUniformBlockBinding fp_glUniformBlockBinding; /* GL_VERSION_3_2 */ extern GLboolean GLAD_VERSION_3_2; #define GL_CONTEXT_CORE_PROFILE_BIT 0x00000001 #define GL_CONTEXT_COMPATIBILITY_PROFILE_BIT 0x00000002 #define GL_LINES_ADJACENCY 0x000A #define GL_LINE_STRIP_ADJACENCY 0x000B #define GL_TRIANGLES_ADJACENCY 0x000C #define GL_TRIANGLE_STRIP_ADJACENCY 0x000D #define GL_PROGRAM_POINT_SIZE 0x8642 #define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS 0x8C29 #define GL_FRAMEBUFFER_ATTACHMENT_LAYERED 0x8DA7 #define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS 0x8DA8 #define GL_GEOMETRY_SHADER 0x8DD9 #define GL_GEOMETRY_VERTICES_OUT 0x8916 #define GL_GEOMETRY_INPUT_TYPE 0x8917 #define GL_GEOMETRY_OUTPUT_TYPE 0x8918 #define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS 0x8DDF #define GL_MAX_GEOMETRY_OUTPUT_VERTICES 0x8DE0 #define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS 0x8DE1 #define GL_MAX_VERTEX_OUTPUT_COMPONENTS 0x9122 #define GL_MAX_GEOMETRY_INPUT_COMPONENTS 0x9123 #define GL_MAX_GEOMETRY_OUTPUT_COMPONENTS 0x9124 #define GL_MAX_FRAGMENT_INPUT_COMPONENTS 0x9125 #define GL_CONTEXT_PROFILE_MASK 0x9126 #define GL_DEPTH_CLAMP 0x864F #define GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION 0x8E4C #define GL_FIRST_VERTEX_CONVENTION 0x8E4D #define GL_LAST_VERTEX_CONVENTION 0x8E4E #define GL_PROVOKING_VERTEX 0x8E4F #define GL_TEXTURE_CUBE_MAP_SEAMLESS 0x884F #define GL_MAX_SERVER_WAIT_TIMEOUT 0x9111 #define GL_OBJECT_TYPE 0x9112 #define GL_SYNC_CONDITION 0x9113 #define GL_SYNC_STATUS 0x9114 #define GL_SYNC_FLAGS 0x9115 #define GL_SYNC_FENCE 0x9116 #define GL_SYNC_GPU_COMMANDS_COMPLETE 0x9117 #define GL_UNSIGNALED 0x9118 #define GL_SIGNALED 0x9119 #define GL_ALREADY_SIGNALED 0x911A #define GL_TIMEOUT_EXPIRED 0x911B #define GL_CONDITION_SATISFIED 0x911C #define GL_WAIT_FAILED 0x911D #define GL_TIMEOUT_IGNORED 0xFFFFFFFFFFFFFFFF #define GL_SYNC_FLUSH_COMMANDS_BIT 0x00000001 #define GL_SAMPLE_POSITION 0x8E50 #define GL_SAMPLE_MASK 0x8E51 #define GL_SAMPLE_MASK_VALUE 0x8E52 #define GL_MAX_SAMPLE_MASK_WORDS 0x8E59 #define GL_TEXTURE_2D_MULTISAMPLE 0x9100 #define GL_PROXY_TEXTURE_2D_MULTISAMPLE 0x9101 #define GL_TEXTURE_2D_MULTISAMPLE_ARRAY 0x9102 #define GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY 0x9103 #define GL_TEXTURE_BINDING_2D_MULTISAMPLE 0x9104 #define GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY 0x9105 #define GL_TEXTURE_SAMPLES 0x9106 #define GL_TEXTURE_FIXED_SAMPLE_LOCATIONS 0x9107 #define GL_SAMPLER_2D_MULTISAMPLE 0x9108 #define GL_INT_SAMPLER_2D_MULTISAMPLE 0x9109 #define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE 0x910A #define GL_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910B #define GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910C #define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910D #define GL_MAX_COLOR_TEXTURE_SAMPLES 0x910E #define GL_MAX_DEPTH_TEXTURE_SAMPLES 0x910F #define GL_MAX_INTEGER_SAMPLES 0x9110 typedef void (APIENTRYP pfn_glDrawElementsBaseVertex) (GLenum, GLsizei, GLenum, const void*, GLint); extern pfn_glDrawElementsBaseVertex fp_glDrawElementsBaseVertex; typedef void (APIENTRYP pfn_glDrawRangeElementsBaseVertex) (GLenum, GLuint, GLuint, GLsizei, GLenum, const void*, GLint); extern pfn_glDrawRangeElementsBaseVertex fp_glDrawRangeElementsBaseVertex; typedef void (APIENTRYP pfn_glDrawElementsInstancedBaseVertex) (GLenum, GLsizei, GLenum, const void*, GLsizei, GLint); extern pfn_glDrawElementsInstancedBaseVertex fp_glDrawElementsInstancedBaseVertex; typedef void (APIENTRYP pfn_glMultiDrawElementsBaseVertex) (GLenum, const GLsizei*, GLenum, const void**, GLsizei, const GLint*); extern pfn_glMultiDrawElementsBaseVertex fp_glMultiDrawElementsBaseVertex; typedef void (APIENTRYP pfn_glProvokingVertex) (GLenum); extern pfn_glProvokingVertex fp_glProvokingVertex; typedef GLsync (APIENTRYP pfn_glFenceSync) (GLenum, GLbitfield); extern pfn_glFenceSync fp_glFenceSync; typedef GLboolean (APIENTRYP pfn_glIsSync) (GLsync); extern pfn_glIsSync fp_glIsSync; typedef void (APIENTRYP pfn_glDeleteSync) (GLsync); extern pfn_glDeleteSync fp_glDeleteSync; typedef GLenum (APIENTRYP pfn_glClientWaitSync) (GLsync, GLbitfield, GLuint64); extern pfn_glClientWaitSync fp_glClientWaitSync; typedef void (APIENTRYP pfn_glWaitSync) (GLsync, GLbitfield, GLuint64); extern pfn_glWaitSync fp_glWaitSync; typedef void (APIENTRYP pfn_glGetInteger64v) (GLenum, GLint64*); extern pfn_glGetInteger64v fp_glGetInteger64v; typedef void (APIENTRYP pfn_glGetSynciv) (GLsync, GLenum, GLsizei, GLsizei*, GLint*); extern pfn_glGetSynciv fp_glGetSynciv; typedef void (APIENTRYP pfn_glGetInteger64i_v) (GLenum, GLuint, GLint64*); extern pfn_glGetInteger64i_v fp_glGetInteger64i_v; typedef void (APIENTRYP pfn_glGetBufferParameteri64v) (GLenum, GLenum, GLint64*); extern pfn_glGetBufferParameteri64v fp_glGetBufferParameteri64v; typedef void (APIENTRYP pfn_glFramebufferTexture) (GLenum, GLenum, GLuint, GLint); extern pfn_glFramebufferTexture fp_glFramebufferTexture; typedef void (APIENTRYP pfn_glTexImage2DMultisample) (GLenum, GLsizei, GLenum, GLsizei, GLsizei, GLboolean); extern pfn_glTexImage2DMultisample fp_glTexImage2DMultisample; typedef void (APIENTRYP pfn_glTexImage3DMultisample) (GLenum, GLsizei, GLenum, GLsizei, GLsizei, GLsizei, GLboolean); extern pfn_glTexImage3DMultisample fp_glTexImage3DMultisample; typedef void (APIENTRYP pfn_glGetMultisamplefv) (GLenum, GLuint, GLfloat*); extern pfn_glGetMultisamplefv fp_glGetMultisamplefv; typedef void (APIENTRYP pfn_glSampleMaski) (GLuint, GLbitfield); extern pfn_glSampleMaski fp_glSampleMaski; /* GL_VERSION_3_3 */ extern GLboolean GLAD_VERSION_3_3; #define GL_VERTEX_ATTRIB_ARRAY_DIVISOR 0x88FE #define GL_SRC1_COLOR 0x88F9 #define GL_ONE_MINUS_SRC1_COLOR 0x88FA #define GL_ONE_MINUS_SRC1_ALPHA 0x88FB #define GL_MAX_DUAL_SOURCE_DRAW_BUFFERS 0x88FC #define GL_ANY_SAMPLES_PASSED 0x8C2F #define GL_SAMPLER_BINDING 0x8919 #define GL_RGB10_A2UI 0x906F #define GL_TEXTURE_SWIZZLE_R 0x8E42 #define GL_TEXTURE_SWIZZLE_G 0x8E43 #define GL_TEXTURE_SWIZZLE_B 0x8E44 #define GL_TEXTURE_SWIZZLE_A 0x8E45 #define GL_TEXTURE_SWIZZLE_RGBA 0x8E46 #define GL_TIME_ELAPSED 0x88BF #define GL_TIMESTAMP 0x8E28 #define GL_INT_2_10_10_10_REV 0x8D9F typedef void (APIENTRYP pfn_glBindFragDataLocationIndexed) (GLuint, GLuint, GLuint, const GLchar*); extern pfn_glBindFragDataLocationIndexed fp_glBindFragDataLocationIndexed; typedef GLint (APIENTRYP pfn_glGetFragDataIndex) (GLuint, const GLchar*); extern pfn_glGetFragDataIndex fp_glGetFragDataIndex; typedef void (APIENTRYP pfn_glGenSamplers) (GLsizei, GLuint*); extern pfn_glGenSamplers fp_glGenSamplers; typedef void (APIENTRYP pfn_glDeleteSamplers) (GLsizei, const GLuint*); extern pfn_glDeleteSamplers fp_glDeleteSamplers; typedef GLboolean (APIENTRYP pfn_glIsSampler) (GLuint); extern pfn_glIsSampler fp_glIsSampler; typedef void (APIENTRYP pfn_glBindSampler) (GLuint, GLuint); extern pfn_glBindSampler fp_glBindSampler; typedef void (APIENTRYP pfn_glSamplerParameteri) (GLuint, GLenum, GLint); extern pfn_glSamplerParameteri fp_glSamplerParameteri; typedef void (APIENTRYP pfn_glSamplerParameteriv) (GLuint, GLenum, const GLint*); extern pfn_glSamplerParameteriv fp_glSamplerParameteriv; typedef void (APIENTRYP pfn_glSamplerParameterf) (GLuint, GLenum, GLfloat); extern pfn_glSamplerParameterf fp_glSamplerParameterf; typedef void (APIENTRYP pfn_glSamplerParameterfv) (GLuint, GLenum, const GLfloat*); extern pfn_glSamplerParameterfv fp_glSamplerParameterfv; typedef void (APIENTRYP pfn_glSamplerParameterIiv) (GLuint, GLenum, const GLint*); extern pfn_glSamplerParameterIiv fp_glSamplerParameterIiv; typedef void (APIENTRYP pfn_glSamplerParameterIuiv) (GLuint, GLenum, const GLuint*); extern pfn_glSamplerParameterIuiv fp_glSamplerParameterIuiv; typedef void (APIENTRYP pfn_glGetSamplerParameteriv) (GLuint, GLenum, GLint*); extern pfn_glGetSamplerParameteriv fp_glGetSamplerParameteriv; typedef void (APIENTRYP pfn_glGetSamplerParameterIiv) (GLuint, GLenum, GLint*); extern pfn_glGetSamplerParameterIiv fp_glGetSamplerParameterIiv; typedef void (APIENTRYP pfn_glGetSamplerParameterfv) (GLuint, GLenum, GLfloat*); extern pfn_glGetSamplerParameterfv fp_glGetSamplerParameterfv; typedef void (APIENTRYP pfn_glGetSamplerParameterIuiv) (GLuint, GLenum, GLuint*); extern pfn_glGetSamplerParameterIuiv fp_glGetSamplerParameterIuiv; typedef void (APIENTRYP pfn_glQueryCounter) (GLuint, GLenum); extern pfn_glQueryCounter fp_glQueryCounter; typedef void (APIENTRYP pfn_glGetQueryObjecti64v) (GLuint, GLenum, GLint64*); extern pfn_glGetQueryObjecti64v fp_glGetQueryObjecti64v; typedef void (APIENTRYP pfn_glGetQueryObjectui64v) (GLuint, GLenum, GLuint64*); extern pfn_glGetQueryObjectui64v fp_glGetQueryObjectui64v; typedef void (APIENTRYP pfn_glVertexAttribDivisor) (GLuint, GLuint); extern pfn_glVertexAttribDivisor fp_glVertexAttribDivisor; typedef void (APIENTRYP pfn_glVertexAttribP1ui) (GLuint, GLenum, GLboolean, GLuint); extern pfn_glVertexAttribP1ui fp_glVertexAttribP1ui; typedef void (APIENTRYP pfn_glVertexAttribP1uiv) (GLuint, GLenum, GLboolean, const GLuint*); extern pfn_glVertexAttribP1uiv fp_glVertexAttribP1uiv; typedef void (APIENTRYP pfn_glVertexAttribP2ui) (GLuint, GLenum, GLboolean, GLuint); extern pfn_glVertexAttribP2ui fp_glVertexAttribP2ui; typedef void (APIENTRYP pfn_glVertexAttribP2uiv) (GLuint, GLenum, GLboolean, const GLuint*); extern pfn_glVertexAttribP2uiv fp_glVertexAttribP2uiv; typedef void (APIENTRYP pfn_glVertexAttribP3ui) (GLuint, GLenum, GLboolean, GLuint); extern pfn_glVertexAttribP3ui fp_glVertexAttribP3ui; typedef void (APIENTRYP pfn_glVertexAttribP3uiv) (GLuint, GLenum, GLboolean, const GLuint*); extern pfn_glVertexAttribP3uiv fp_glVertexAttribP3uiv; typedef void (APIENTRYP pfn_glVertexAttribP4ui) (GLuint, GLenum, GLboolean, GLuint); extern pfn_glVertexAttribP4ui fp_glVertexAttribP4ui; typedef void (APIENTRYP pfn_glVertexAttribP4uiv) (GLuint, GLenum, GLboolean, const GLuint*); extern pfn_glVertexAttribP4uiv fp_glVertexAttribP4uiv; typedef void (APIENTRYP pfn_glVertexP2ui) (GLenum, GLuint); extern pfn_glVertexP2ui fp_glVertexP2ui; typedef void (APIENTRYP pfn_glVertexP2uiv) (GLenum, const GLuint*); extern pfn_glVertexP2uiv fp_glVertexP2uiv; typedef void (APIENTRYP pfn_glVertexP3ui) (GLenum, GLuint); extern pfn_glVertexP3ui fp_glVertexP3ui; typedef void (APIENTRYP pfn_glVertexP3uiv) (GLenum, const GLuint*); extern pfn_glVertexP3uiv fp_glVertexP3uiv; typedef void (APIENTRYP pfn_glVertexP4ui) (GLenum, GLuint); extern pfn_glVertexP4ui fp_glVertexP4ui; typedef void (APIENTRYP pfn_glVertexP4uiv) (GLenum, const GLuint*); extern pfn_glVertexP4uiv fp_glVertexP4uiv; typedef void (APIENTRYP pfn_glTexCoordP1ui) (GLenum, GLuint); extern pfn_glTexCoordP1ui fp_glTexCoordP1ui; typedef void (APIENTRYP pfn_glTexCoordP1uiv) (GLenum, const GLuint*); extern pfn_glTexCoordP1uiv fp_glTexCoordP1uiv; typedef void (APIENTRYP pfn_glTexCoordP2ui) (GLenum, GLuint); extern pfn_glTexCoordP2ui fp_glTexCoordP2ui; typedef void (APIENTRYP pfn_glTexCoordP2uiv) (GLenum, const GLuint*); extern pfn_glTexCoordP2uiv fp_glTexCoordP2uiv; typedef void (APIENTRYP pfn_glTexCoordP3ui) (GLenum, GLuint); extern pfn_glTexCoordP3ui fp_glTexCoordP3ui; typedef void (APIENTRYP pfn_glTexCoordP3uiv) (GLenum, const GLuint*); extern pfn_glTexCoordP3uiv fp_glTexCoordP3uiv; typedef void (APIENTRYP pfn_glTexCoordP4ui) (GLenum, GLuint); extern pfn_glTexCoordP4ui fp_glTexCoordP4ui; typedef void (APIENTRYP pfn_glTexCoordP4uiv) (GLenum, const GLuint*); extern pfn_glTexCoordP4uiv fp_glTexCoordP4uiv; typedef void (APIENTRYP pfn_glMultiTexCoordP1ui) (GLenum, GLenum, GLuint); extern pfn_glMultiTexCoordP1ui fp_glMultiTexCoordP1ui; typedef void (APIENTRYP pfn_glMultiTexCoordP1uiv) (GLenum, GLenum, const GLuint*); extern pfn_glMultiTexCoordP1uiv fp_glMultiTexCoordP1uiv; typedef void (APIENTRYP pfn_glMultiTexCoordP2ui) (GLenum, GLenum, GLuint); extern pfn_glMultiTexCoordP2ui fp_glMultiTexCoordP2ui; typedef void (APIENTRYP pfn_glMultiTexCoordP2uiv) (GLenum, GLenum, const GLuint*); extern pfn_glMultiTexCoordP2uiv fp_glMultiTexCoordP2uiv; typedef void (APIENTRYP pfn_glMultiTexCoordP3ui) (GLenum, GLenum, GLuint); extern pfn_glMultiTexCoordP3ui fp_glMultiTexCoordP3ui; typedef void (APIENTRYP pfn_glMultiTexCoordP3uiv) (GLenum, GLenum, const GLuint*); extern pfn_glMultiTexCoordP3uiv fp_glMultiTexCoordP3uiv; typedef void (APIENTRYP pfn_glMultiTexCoordP4ui) (GLenum, GLenum, GLuint); extern pfn_glMultiTexCoordP4ui fp_glMultiTexCoordP4ui; typedef void (APIENTRYP pfn_glMultiTexCoordP4uiv) (GLenum, GLenum, const GLuint*); extern pfn_glMultiTexCoordP4uiv fp_glMultiTexCoordP4uiv; typedef void (APIENTRYP pfn_glNormalP3ui) (GLenum, GLuint); extern pfn_glNormalP3ui fp_glNormalP3ui; typedef void (APIENTRYP pfn_glNormalP3uiv) (GLenum, const GLuint*); extern pfn_glNormalP3uiv fp_glNormalP3uiv; typedef void (APIENTRYP pfn_glColorP3ui) (GLenum, GLuint); extern pfn_glColorP3ui fp_glColorP3ui; typedef void (APIENTRYP pfn_glColorP3uiv) (GLenum, const GLuint*); extern pfn_glColorP3uiv fp_glColorP3uiv; typedef void (APIENTRYP pfn_glColorP4ui) (GLenum, GLuint); extern pfn_glColorP4ui fp_glColorP4ui; typedef void (APIENTRYP pfn_glColorP4uiv) (GLenum, const GLuint*); extern pfn_glColorP4uiv fp_glColorP4uiv; typedef void (APIENTRYP pfn_glSecondaryColorP3ui) (GLenum, GLuint); extern pfn_glSecondaryColorP3ui fp_glSecondaryColorP3ui; typedef void (APIENTRYP pfn_glSecondaryColorP3uiv) (GLenum, const GLuint*); extern pfn_glSecondaryColorP3uiv fp_glSecondaryColorP3uiv; /* GL_VERSION_4_0 */ extern GLboolean GLAD_VERSION_4_0; #define GL_SAMPLE_SHADING 0x8C36 #define GL_MIN_SAMPLE_SHADING_VALUE 0x8C37 #define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5E #define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5F #define GL_TEXTURE_CUBE_MAP_ARRAY 0x9009 #define GL_TEXTURE_BINDING_CUBE_MAP_ARRAY 0x900A #define GL_PROXY_TEXTURE_CUBE_MAP_ARRAY 0x900B #define GL_SAMPLER_CUBE_MAP_ARRAY 0x900C #define GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW 0x900D #define GL_INT_SAMPLER_CUBE_MAP_ARRAY 0x900E #define GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY 0x900F #define GL_DRAW_INDIRECT_BUFFER 0x8F3F #define GL_DRAW_INDIRECT_BUFFER_BINDING 0x8F43 #define GL_GEOMETRY_SHADER_INVOCATIONS 0x887F #define GL_MAX_GEOMETRY_SHADER_INVOCATIONS 0x8E5A #define GL_MIN_FRAGMENT_INTERPOLATION_OFFSET 0x8E5B #define GL_MAX_FRAGMENT_INTERPOLATION_OFFSET 0x8E5C #define GL_FRAGMENT_INTERPOLATION_OFFSET_BITS 0x8E5D #define GL_MAX_VERTEX_STREAMS 0x8E71 #define GL_DOUBLE_VEC2 0x8FFC #define GL_DOUBLE_VEC3 0x8FFD #define GL_DOUBLE_VEC4 0x8FFE #define GL_DOUBLE_MAT2 0x8F46 #define GL_DOUBLE_MAT3 0x8F47 #define GL_DOUBLE_MAT4 0x8F48 #define GL_DOUBLE_MAT2x3 0x8F49 #define GL_DOUBLE_MAT2x4 0x8F4A #define GL_DOUBLE_MAT3x2 0x8F4B #define GL_DOUBLE_MAT3x4 0x8F4C #define GL_DOUBLE_MAT4x2 0x8F4D #define GL_DOUBLE_MAT4x3 0x8F4E #define GL_ACTIVE_SUBROUTINES 0x8DE5 #define GL_ACTIVE_SUBROUTINE_UNIFORMS 0x8DE6 #define GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS 0x8E47 #define GL_ACTIVE_SUBROUTINE_MAX_LENGTH 0x8E48 #define GL_ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH 0x8E49 #define GL_MAX_SUBROUTINES 0x8DE7 #define GL_MAX_SUBROUTINE_UNIFORM_LOCATIONS 0x8DE8 #define GL_NUM_COMPATIBLE_SUBROUTINES 0x8E4A #define GL_COMPATIBLE_SUBROUTINES 0x8E4B #define GL_PATCHES 0x000E #define GL_PATCH_VERTICES 0x8E72 #define GL_PATCH_DEFAULT_INNER_LEVEL 0x8E73 #define GL_PATCH_DEFAULT_OUTER_LEVEL 0x8E74 #define GL_TESS_CONTROL_OUTPUT_VERTICES 0x8E75 #define GL_TESS_GEN_MODE 0x8E76 #define GL_TESS_GEN_SPACING 0x8E77 #define GL_TESS_GEN_VERTEX_ORDER 0x8E78 #define GL_TESS_GEN_POINT_MODE 0x8E79 #define GL_ISOLINES 0x8E7A #define GL_FRACTIONAL_ODD 0x8E7B #define GL_FRACTIONAL_EVEN 0x8E7C #define GL_MAX_PATCH_VERTICES 0x8E7D #define GL_MAX_TESS_GEN_LEVEL 0x8E7E #define GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS 0x8E7F #define GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS 0x8E80 #define GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS 0x8E81 #define GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS 0x8E82 #define GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS 0x8E83 #define GL_MAX_TESS_PATCH_COMPONENTS 0x8E84 #define GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS 0x8E85 #define GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS 0x8E86 #define GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS 0x8E89 #define GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS 0x8E8A #define GL_MAX_TESS_CONTROL_INPUT_COMPONENTS 0x886C #define GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS 0x886D #define GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS 0x8E1E #define GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS 0x8E1F #define GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_CONTROL_SHADER 0x84F0 #define GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_EVALUATION_SHADER 0x84F1 #define GL_TESS_EVALUATION_SHADER 0x8E87 #define GL_TESS_CONTROL_SHADER 0x8E88 #define GL_TRANSFORM_FEEDBACK 0x8E22 #define GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED 0x8E23 #define GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE 0x8E24 #define GL_TRANSFORM_FEEDBACK_BINDING 0x8E25 #define GL_MAX_TRANSFORM_FEEDBACK_BUFFERS 0x8E70 typedef void (APIENTRYP pfn_glMinSampleShading) (GLfloat); extern pfn_glMinSampleShading fp_glMinSampleShading; typedef void (APIENTRYP pfn_glBlendEquationi) (GLuint, GLenum); extern pfn_glBlendEquationi fp_glBlendEquationi; typedef void (APIENTRYP pfn_glBlendEquationSeparatei) (GLuint, GLenum, GLenum); extern pfn_glBlendEquationSeparatei fp_glBlendEquationSeparatei; typedef void (APIENTRYP pfn_glBlendFunci) (GLuint, GLenum, GLenum); extern pfn_glBlendFunci fp_glBlendFunci; typedef void (APIENTRYP pfn_glBlendFuncSeparatei) (GLuint, GLenum, GLenum, GLenum, GLenum); extern pfn_glBlendFuncSeparatei fp_glBlendFuncSeparatei; typedef void (APIENTRYP pfn_glDrawArraysIndirect) (GLenum, const void*); extern pfn_glDrawArraysIndirect fp_glDrawArraysIndirect; typedef void (APIENTRYP pfn_glDrawElementsIndirect) (GLenum, GLenum, const void*); extern pfn_glDrawElementsIndirect fp_glDrawElementsIndirect; typedef void (APIENTRYP pfn_glUniform1d) (GLint, GLdouble); extern pfn_glUniform1d fp_glUniform1d; typedef void (APIENTRYP pfn_glUniform2d) (GLint, GLdouble, GLdouble); extern pfn_glUniform2d fp_glUniform2d; typedef void (APIENTRYP pfn_glUniform3d) (GLint, GLdouble, GLdouble, GLdouble); extern pfn_glUniform3d fp_glUniform3d; typedef void (APIENTRYP pfn_glUniform4d) (GLint, GLdouble, GLdouble, GLdouble, GLdouble); extern pfn_glUniform4d fp_glUniform4d; typedef void (APIENTRYP pfn_glUniform1dv) (GLint, GLsizei, const GLdouble*); extern pfn_glUniform1dv fp_glUniform1dv; typedef void (APIENTRYP pfn_glUniform2dv) (GLint, GLsizei, const GLdouble*); extern pfn_glUniform2dv fp_glUniform2dv; typedef void (APIENTRYP pfn_glUniform3dv) (GLint, GLsizei, const GLdouble*); extern pfn_glUniform3dv fp_glUniform3dv; typedef void (APIENTRYP pfn_glUniform4dv) (GLint, GLsizei, const GLdouble*); extern pfn_glUniform4dv fp_glUniform4dv; typedef void (APIENTRYP pfn_glUniformMatrix2dv) (GLint, GLsizei, GLboolean, const GLdouble*); extern pfn_glUniformMatrix2dv fp_glUniformMatrix2dv; typedef void (APIENTRYP pfn_glUniformMatrix3dv) (GLint, GLsizei, GLboolean, const GLdouble*); extern pfn_glUniformMatrix3dv fp_glUniformMatrix3dv; typedef void (APIENTRYP pfn_glUniformMatrix4dv) (GLint, GLsizei, GLboolean, const GLdouble*); extern pfn_glUniformMatrix4dv fp_glUniformMatrix4dv; typedef void (APIENTRYP pfn_glUniformMatrix2x3dv) (GLint, GLsizei, GLboolean, const GLdouble*); extern pfn_glUniformMatrix2x3dv fp_glUniformMatrix2x3dv; typedef void (APIENTRYP pfn_glUniformMatrix2x4dv) (GLint, GLsizei, GLboolean, const GLdouble*); extern pfn_glUniformMatrix2x4dv fp_glUniformMatrix2x4dv; typedef void (APIENTRYP pfn_glUniformMatrix3x2dv) (GLint, GLsizei, GLboolean, const GLdouble*); extern pfn_glUniformMatrix3x2dv fp_glUniformMatrix3x2dv; typedef void (APIENTRYP pfn_glUniformMatrix3x4dv) (GLint, GLsizei, GLboolean, const GLdouble*); extern pfn_glUniformMatrix3x4dv fp_glUniformMatrix3x4dv; typedef void (APIENTRYP pfn_glUniformMatrix4x2dv) (GLint, GLsizei, GLboolean, const GLdouble*); extern pfn_glUniformMatrix4x2dv fp_glUniformMatrix4x2dv; typedef void (APIENTRYP pfn_glUniformMatrix4x3dv) (GLint, GLsizei, GLboolean, const GLdouble*); extern pfn_glUniformMatrix4x3dv fp_glUniformMatrix4x3dv; typedef void (APIENTRYP pfn_glGetUniformdv) (GLuint, GLint, GLdouble*); extern pfn_glGetUniformdv fp_glGetUniformdv; typedef GLint (APIENTRYP pfn_glGetSubroutineUniformLocation) (GLuint, GLenum, const GLchar*); extern pfn_glGetSubroutineUniformLocation fp_glGetSubroutineUniformLocation; typedef GLuint (APIENTRYP pfn_glGetSubroutineIndex) (GLuint, GLenum, const GLchar*); extern pfn_glGetSubroutineIndex fp_glGetSubroutineIndex; typedef void (APIENTRYP pfn_glGetActiveSubroutineUniformiv) (GLuint, GLenum, GLuint, GLenum, GLint*); extern pfn_glGetActiveSubroutineUniformiv fp_glGetActiveSubroutineUniformiv; typedef void (APIENTRYP pfn_glGetActiveSubroutineUniformName) (GLuint, GLenum, GLuint, GLsizei, GLsizei*, GLchar*); extern pfn_glGetActiveSubroutineUniformName fp_glGetActiveSubroutineUniformName; typedef void (APIENTRYP pfn_glGetActiveSubroutineName) (GLuint, GLenum, GLuint, GLsizei, GLsizei*, GLchar*); extern pfn_glGetActiveSubroutineName fp_glGetActiveSubroutineName; typedef void (APIENTRYP pfn_glUniformSubroutinesuiv) (GLenum, GLsizei, const GLuint*); extern pfn_glUniformSubroutinesuiv fp_glUniformSubroutinesuiv; typedef void (APIENTRYP pfn_glGetUniformSubroutineuiv) (GLenum, GLint, GLuint*); extern pfn_glGetUniformSubroutineuiv fp_glGetUniformSubroutineuiv; typedef void (APIENTRYP pfn_glGetProgramStageiv) (GLuint, GLenum, GLenum, GLint*); extern pfn_glGetProgramStageiv fp_glGetProgramStageiv; typedef void (APIENTRYP pfn_glPatchParameteri) (GLenum, GLint); extern pfn_glPatchParameteri fp_glPatchParameteri; typedef void (APIENTRYP pfn_glPatchParameterfv) (GLenum, const GLfloat*); extern pfn_glPatchParameterfv fp_glPatchParameterfv; typedef void (APIENTRYP pfn_glBindTransformFeedback) (GLenum, GLuint); extern pfn_glBindTransformFeedback fp_glBindTransformFeedback; typedef void (APIENTRYP pfn_glDeleteTransformFeedbacks) (GLsizei, const GLuint*); extern pfn_glDeleteTransformFeedbacks fp_glDeleteTransformFeedbacks; typedef void (APIENTRYP pfn_glGenTransformFeedbacks) (GLsizei, GLuint*); extern pfn_glGenTransformFeedbacks fp_glGenTransformFeedbacks; typedef GLboolean (APIENTRYP pfn_glIsTransformFeedback) (GLuint); extern pfn_glIsTransformFeedback fp_glIsTransformFeedback; typedef void (APIENTRYP pfn_glPauseTransformFeedback) (); extern pfn_glPauseTransformFeedback fp_glPauseTransformFeedback; typedef void (APIENTRYP pfn_glResumeTransformFeedback) (); extern pfn_glResumeTransformFeedback fp_glResumeTransformFeedback; typedef void (APIENTRYP pfn_glDrawTransformFeedback) (GLenum, GLuint); extern pfn_glDrawTransformFeedback fp_glDrawTransformFeedback; typedef void (APIENTRYP pfn_glDrawTransformFeedbackStream) (GLenum, GLuint, GLuint); extern pfn_glDrawTransformFeedbackStream fp_glDrawTransformFeedbackStream; typedef void (APIENTRYP pfn_glBeginQueryIndexed) (GLenum, GLuint, GLuint); extern pfn_glBeginQueryIndexed fp_glBeginQueryIndexed; typedef void (APIENTRYP pfn_glEndQueryIndexed) (GLenum, GLuint); extern pfn_glEndQueryIndexed fp_glEndQueryIndexed; typedef void (APIENTRYP pfn_glGetQueryIndexediv) (GLenum, GLuint, GLenum, GLint*); extern pfn_glGetQueryIndexediv fp_glGetQueryIndexediv; /* GL_VERSION_4_1 */ extern GLboolean GLAD_VERSION_4_1; #define GL_FIXED 0x140C #define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A #define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B #define GL_LOW_FLOAT 0x8DF0 #define GL_MEDIUM_FLOAT 0x8DF1 #define GL_HIGH_FLOAT 0x8DF2 #define GL_LOW_INT 0x8DF3 #define GL_MEDIUM_INT 0x8DF4 #define GL_HIGH_INT 0x8DF5 #define GL_SHADER_COMPILER 0x8DFA #define GL_SHADER_BINARY_FORMATS 0x8DF8 #define GL_NUM_SHADER_BINARY_FORMATS 0x8DF9 #define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB #define GL_MAX_VARYING_VECTORS 0x8DFC #define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD #define GL_RGB565 0x8D62 #define GL_PROGRAM_BINARY_RETRIEVABLE_HINT 0x8257 #define GL_PROGRAM_BINARY_LENGTH 0x8741 #define GL_NUM_PROGRAM_BINARY_FORMATS 0x87FE #define GL_PROGRAM_BINARY_FORMATS 0x87FF #define GL_VERTEX_SHADER_BIT 0x00000001 #define GL_FRAGMENT_SHADER_BIT 0x00000002 #define GL_GEOMETRY_SHADER_BIT 0x00000004 #define GL_TESS_CONTROL_SHADER_BIT 0x00000008 #define GL_TESS_EVALUATION_SHADER_BIT 0x00000010 #define GL_ALL_SHADER_BITS 0xFFFFFFFF #define GL_PROGRAM_SEPARABLE 0x8258 #define GL_ACTIVE_PROGRAM 0x8259 #define GL_PROGRAM_PIPELINE_BINDING 0x825A #define GL_MAX_VIEWPORTS 0x825B #define GL_VIEWPORT_SUBPIXEL_BITS 0x825C #define GL_VIEWPORT_BOUNDS_RANGE 0x825D #define GL_LAYER_PROVOKING_VERTEX 0x825E #define GL_VIEWPORT_INDEX_PROVOKING_VERTEX 0x825F #define GL_UNDEFINED_VERTEX 0x8260 typedef void (APIENTRYP pfn_glReleaseShaderCompiler) (); extern pfn_glReleaseShaderCompiler fp_glReleaseShaderCompiler; typedef void (APIENTRYP pfn_glShaderBinary) (GLsizei, const GLuint*, GLenum, const void*, GLsizei); extern pfn_glShaderBinary fp_glShaderBinary; typedef void (APIENTRYP pfn_glGetShaderPrecisionFormat) (GLenum, GLenum, GLint*, GLint*); extern pfn_glGetShaderPrecisionFormat fp_glGetShaderPrecisionFormat; typedef void (APIENTRYP pfn_glDepthRangef) (GLfloat, GLfloat); extern pfn_glDepthRangef fp_glDepthRangef; typedef void (APIENTRYP pfn_glClearDepthf) (GLfloat); extern pfn_glClearDepthf fp_glClearDepthf; typedef void (APIENTRYP pfn_glGetProgramBinary) (GLuint, GLsizei, GLsizei*, GLenum*, void*); extern pfn_glGetProgramBinary fp_glGetProgramBinary; typedef void (APIENTRYP pfn_glProgramBinary) (GLuint, GLenum, const void*, GLsizei); extern pfn_glProgramBinary fp_glProgramBinary; typedef void (APIENTRYP pfn_glProgramParameteri) (GLuint, GLenum, GLint); extern pfn_glProgramParameteri fp_glProgramParameteri; typedef void (APIENTRYP pfn_glUseProgramStages) (GLuint, GLbitfield, GLuint); extern pfn_glUseProgramStages fp_glUseProgramStages; typedef void (APIENTRYP pfn_glActiveShaderProgram) (GLuint, GLuint); extern pfn_glActiveShaderProgram fp_glActiveShaderProgram; typedef GLuint (APIENTRYP pfn_glCreateShaderProgramv) (GLenum, GLsizei, const GLchar**); extern pfn_glCreateShaderProgramv fp_glCreateShaderProgramv; typedef void (APIENTRYP pfn_glBindProgramPipeline) (GLuint); extern pfn_glBindProgramPipeline fp_glBindProgramPipeline; typedef void (APIENTRYP pfn_glDeleteProgramPipelines) (GLsizei, const GLuint*); extern pfn_glDeleteProgramPipelines fp_glDeleteProgramPipelines; typedef void (APIENTRYP pfn_glGenProgramPipelines) (GLsizei, GLuint*); extern pfn_glGenProgramPipelines fp_glGenProgramPipelines; typedef GLboolean (APIENTRYP pfn_glIsProgramPipeline) (GLuint); extern pfn_glIsProgramPipeline fp_glIsProgramPipeline; typedef void (APIENTRYP pfn_glGetProgramPipelineiv) (GLuint, GLenum, GLint*); extern pfn_glGetProgramPipelineiv fp_glGetProgramPipelineiv; typedef void (APIENTRYP pfn_glProgramUniform1i) (GLuint, GLint, GLint); extern pfn_glProgramUniform1i fp_glProgramUniform1i; typedef void (APIENTRYP pfn_glProgramUniform1iv) (GLuint, GLint, GLsizei, const GLint*); extern pfn_glProgramUniform1iv fp_glProgramUniform1iv; typedef void (APIENTRYP pfn_glProgramUniform1f) (GLuint, GLint, GLfloat); extern pfn_glProgramUniform1f fp_glProgramUniform1f; typedef void (APIENTRYP pfn_glProgramUniform1fv) (GLuint, GLint, GLsizei, const GLfloat*); extern pfn_glProgramUniform1fv fp_glProgramUniform1fv; typedef void (APIENTRYP pfn_glProgramUniform1d) (GLuint, GLint, GLdouble); extern pfn_glProgramUniform1d fp_glProgramUniform1d; typedef void (APIENTRYP pfn_glProgramUniform1dv) (GLuint, GLint, GLsizei, const GLdouble*); extern pfn_glProgramUniform1dv fp_glProgramUniform1dv; typedef void (APIENTRYP pfn_glProgramUniform1ui) (GLuint, GLint, GLuint); extern pfn_glProgramUniform1ui fp_glProgramUniform1ui; typedef void (APIENTRYP pfn_glProgramUniform1uiv) (GLuint, GLint, GLsizei, const GLuint*); extern pfn_glProgramUniform1uiv fp_glProgramUniform1uiv; typedef void (APIENTRYP pfn_glProgramUniform2i) (GLuint, GLint, GLint, GLint); extern pfn_glProgramUniform2i fp_glProgramUniform2i; typedef void (APIENTRYP pfn_glProgramUniform2iv) (GLuint, GLint, GLsizei, const GLint*); extern pfn_glProgramUniform2iv fp_glProgramUniform2iv; typedef void (APIENTRYP pfn_glProgramUniform2f) (GLuint, GLint, GLfloat, GLfloat); extern pfn_glProgramUniform2f fp_glProgramUniform2f; typedef void (APIENTRYP pfn_glProgramUniform2fv) (GLuint, GLint, GLsizei, const GLfloat*); extern pfn_glProgramUniform2fv fp_glProgramUniform2fv; typedef void (APIENTRYP pfn_glProgramUniform2d) (GLuint, GLint, GLdouble, GLdouble); extern pfn_glProgramUniform2d fp_glProgramUniform2d; typedef void (APIENTRYP pfn_glProgramUniform2dv) (GLuint, GLint, GLsizei, const GLdouble*); extern pfn_glProgramUniform2dv fp_glProgramUniform2dv; typedef void (APIENTRYP pfn_glProgramUniform2ui) (GLuint, GLint, GLuint, GLuint); extern pfn_glProgramUniform2ui fp_glProgramUniform2ui; typedef void (APIENTRYP pfn_glProgramUniform2uiv) (GLuint, GLint, GLsizei, const GLuint*); extern pfn_glProgramUniform2uiv fp_glProgramUniform2uiv; typedef void (APIENTRYP pfn_glProgramUniform3i) (GLuint, GLint, GLint, GLint, GLint); extern pfn_glProgramUniform3i fp_glProgramUniform3i; typedef void (APIENTRYP pfn_glProgramUniform3iv) (GLuint, GLint, GLsizei, const GLint*); extern pfn_glProgramUniform3iv fp_glProgramUniform3iv; typedef void (APIENTRYP pfn_glProgramUniform3f) (GLuint, GLint, GLfloat, GLfloat, GLfloat); extern pfn_glProgramUniform3f fp_glProgramUniform3f; typedef void (APIENTRYP pfn_glProgramUniform3fv) (GLuint, GLint, GLsizei, const GLfloat*); extern pfn_glProgramUniform3fv fp_glProgramUniform3fv; typedef void (APIENTRYP pfn_glProgramUniform3d) (GLuint, GLint, GLdouble, GLdouble, GLdouble); extern pfn_glProgramUniform3d fp_glProgramUniform3d; typedef void (APIENTRYP pfn_glProgramUniform3dv) (GLuint, GLint, GLsizei, const GLdouble*); extern pfn_glProgramUniform3dv fp_glProgramUniform3dv; typedef void (APIENTRYP pfn_glProgramUniform3ui) (GLuint, GLint, GLuint, GLuint, GLuint); extern pfn_glProgramUniform3ui fp_glProgramUniform3ui; typedef void (APIENTRYP pfn_glProgramUniform3uiv) (GLuint, GLint, GLsizei, const GLuint*); extern pfn_glProgramUniform3uiv fp_glProgramUniform3uiv; typedef void (APIENTRYP pfn_glProgramUniform4i) (GLuint, GLint, GLint, GLint, GLint, GLint); extern pfn_glProgramUniform4i fp_glProgramUniform4i; typedef void (APIENTRYP pfn_glProgramUniform4iv) (GLuint, GLint, GLsizei, const GLint*); extern pfn_glProgramUniform4iv fp_glProgramUniform4iv; typedef void (APIENTRYP pfn_glProgramUniform4f) (GLuint, GLint, GLfloat, GLfloat, GLfloat, GLfloat); extern pfn_glProgramUniform4f fp_glProgramUniform4f; typedef void (APIENTRYP pfn_glProgramUniform4fv) (GLuint, GLint, GLsizei, const GLfloat*); extern pfn_glProgramUniform4fv fp_glProgramUniform4fv; typedef void (APIENTRYP pfn_glProgramUniform4d) (GLuint, GLint, GLdouble, GLdouble, GLdouble, GLdouble); extern pfn_glProgramUniform4d fp_glProgramUniform4d; typedef void (APIENTRYP pfn_glProgramUniform4dv) (GLuint, GLint, GLsizei, const GLdouble*); extern pfn_glProgramUniform4dv fp_glProgramUniform4dv; typedef void (APIENTRYP pfn_glProgramUniform4ui) (GLuint, GLint, GLuint, GLuint, GLuint, GLuint); extern pfn_glProgramUniform4ui fp_glProgramUniform4ui; typedef void (APIENTRYP pfn_glProgramUniform4uiv) (GLuint, GLint, GLsizei, const GLuint*); extern pfn_glProgramUniform4uiv fp_glProgramUniform4uiv; typedef void (APIENTRYP pfn_glProgramUniformMatrix2fv) (GLuint, GLint, GLsizei, GLboolean, const GLfloat*); extern pfn_glProgramUniformMatrix2fv fp_glProgramUniformMatrix2fv; typedef void (APIENTRYP pfn_glProgramUniformMatrix3fv) (GLuint, GLint, GLsizei, GLboolean, const GLfloat*); extern pfn_glProgramUniformMatrix3fv fp_glProgramUniformMatrix3fv; typedef void (APIENTRYP pfn_glProgramUniformMatrix4fv) (GLuint, GLint, GLsizei, GLboolean, const GLfloat*); extern pfn_glProgramUniformMatrix4fv fp_glProgramUniformMatrix4fv; typedef void (APIENTRYP pfn_glProgramUniformMatrix2dv) (GLuint, GLint, GLsizei, GLboolean, const GLdouble*); extern pfn_glProgramUniformMatrix2dv fp_glProgramUniformMatrix2dv; typedef void (APIENTRYP pfn_glProgramUniformMatrix3dv) (GLuint, GLint, GLsizei, GLboolean, const GLdouble*); extern pfn_glProgramUniformMatrix3dv fp_glProgramUniformMatrix3dv; typedef void (APIENTRYP pfn_glProgramUniformMatrix4dv) (GLuint, GLint, GLsizei, GLboolean, const GLdouble*); extern pfn_glProgramUniformMatrix4dv fp_glProgramUniformMatrix4dv; typedef void (APIENTRYP pfn_glProgramUniformMatrix2x3fv) (GLuint, GLint, GLsizei, GLboolean, const GLfloat*); extern pfn_glProgramUniformMatrix2x3fv fp_glProgramUniformMatrix2x3fv; typedef void (APIENTRYP pfn_glProgramUniformMatrix3x2fv) (GLuint, GLint, GLsizei, GLboolean, const GLfloat*); extern pfn_glProgramUniformMatrix3x2fv fp_glProgramUniformMatrix3x2fv; typedef void (APIENTRYP pfn_glProgramUniformMatrix2x4fv) (GLuint, GLint, GLsizei, GLboolean, const GLfloat*); extern pfn_glProgramUniformMatrix2x4fv fp_glProgramUniformMatrix2x4fv; typedef void (APIENTRYP pfn_glProgramUniformMatrix4x2fv) (GLuint, GLint, GLsizei, GLboolean, const GLfloat*); extern pfn_glProgramUniformMatrix4x2fv fp_glProgramUniformMatrix4x2fv; typedef void (APIENTRYP pfn_glProgramUniformMatrix3x4fv) (GLuint, GLint, GLsizei, GLboolean, const GLfloat*); extern pfn_glProgramUniformMatrix3x4fv fp_glProgramUniformMatrix3x4fv; typedef void (APIENTRYP pfn_glProgramUniformMatrix4x3fv) (GLuint, GLint, GLsizei, GLboolean, const GLfloat*); extern pfn_glProgramUniformMatrix4x3fv fp_glProgramUniformMatrix4x3fv; typedef void (APIENTRYP pfn_glProgramUniformMatrix2x3dv) (GLuint, GLint, GLsizei, GLboolean, const GLdouble*); extern pfn_glProgramUniformMatrix2x3dv fp_glProgramUniformMatrix2x3dv; typedef void (APIENTRYP pfn_glProgramUniformMatrix3x2dv) (GLuint, GLint, GLsizei, GLboolean, const GLdouble*); extern pfn_glProgramUniformMatrix3x2dv fp_glProgramUniformMatrix3x2dv; typedef void (APIENTRYP pfn_glProgramUniformMatrix2x4dv) (GLuint, GLint, GLsizei, GLboolean, const GLdouble*); extern pfn_glProgramUniformMatrix2x4dv fp_glProgramUniformMatrix2x4dv; typedef void (APIENTRYP pfn_glProgramUniformMatrix4x2dv) (GLuint, GLint, GLsizei, GLboolean, const GLdouble*); extern pfn_glProgramUniformMatrix4x2dv fp_glProgramUniformMatrix4x2dv; typedef void (APIENTRYP pfn_glProgramUniformMatrix3x4dv) (GLuint, GLint, GLsizei, GLboolean, const GLdouble*); extern pfn_glProgramUniformMatrix3x4dv fp_glProgramUniformMatrix3x4dv; typedef void (APIENTRYP pfn_glProgramUniformMatrix4x3dv) (GLuint, GLint, GLsizei, GLboolean, const GLdouble*); extern pfn_glProgramUniformMatrix4x3dv fp_glProgramUniformMatrix4x3dv; typedef void (APIENTRYP pfn_glValidateProgramPipeline) (GLuint); extern pfn_glValidateProgramPipeline fp_glValidateProgramPipeline; typedef void (APIENTRYP pfn_glGetProgramPipelineInfoLog) (GLuint, GLsizei, GLsizei*, GLchar*); extern pfn_glGetProgramPipelineInfoLog fp_glGetProgramPipelineInfoLog; typedef void (APIENTRYP pfn_glVertexAttribL1d) (GLuint, GLdouble); extern pfn_glVertexAttribL1d fp_glVertexAttribL1d; typedef void (APIENTRYP pfn_glVertexAttribL2d) (GLuint, GLdouble, GLdouble); extern pfn_glVertexAttribL2d fp_glVertexAttribL2d; typedef void (APIENTRYP pfn_glVertexAttribL3d) (GLuint, GLdouble, GLdouble, GLdouble); extern pfn_glVertexAttribL3d fp_glVertexAttribL3d; typedef void (APIENTRYP pfn_glVertexAttribL4d) (GLuint, GLdouble, GLdouble, GLdouble, GLdouble); extern pfn_glVertexAttribL4d fp_glVertexAttribL4d; typedef void (APIENTRYP pfn_glVertexAttribL1dv) (GLuint, const GLdouble*); extern pfn_glVertexAttribL1dv fp_glVertexAttribL1dv; typedef void (APIENTRYP pfn_glVertexAttribL2dv) (GLuint, const GLdouble*); extern pfn_glVertexAttribL2dv fp_glVertexAttribL2dv; typedef void (APIENTRYP pfn_glVertexAttribL3dv) (GLuint, const GLdouble*); extern pfn_glVertexAttribL3dv fp_glVertexAttribL3dv; typedef void (APIENTRYP pfn_glVertexAttribL4dv) (GLuint, const GLdouble*); extern pfn_glVertexAttribL4dv fp_glVertexAttribL4dv; typedef void (APIENTRYP pfn_glVertexAttribLPointer) (GLuint, GLint, GLenum, GLsizei, const void*); extern pfn_glVertexAttribLPointer fp_glVertexAttribLPointer; typedef void (APIENTRYP pfn_glGetVertexAttribLdv) (GLuint, GLenum, GLdouble*); extern pfn_glGetVertexAttribLdv fp_glGetVertexAttribLdv; typedef void (APIENTRYP pfn_glViewportArrayv) (GLuint, GLsizei, const GLfloat*); extern pfn_glViewportArrayv fp_glViewportArrayv; typedef void (APIENTRYP pfn_glViewportIndexedf) (GLuint, GLfloat, GLfloat, GLfloat, GLfloat); extern pfn_glViewportIndexedf fp_glViewportIndexedf; typedef void (APIENTRYP pfn_glViewportIndexedfv) (GLuint, const GLfloat*); extern pfn_glViewportIndexedfv fp_glViewportIndexedfv; typedef void (APIENTRYP pfn_glScissorArrayv) (GLuint, GLsizei, const GLint*); extern pfn_glScissorArrayv fp_glScissorArrayv; typedef void (APIENTRYP pfn_glScissorIndexed) (GLuint, GLint, GLint, GLsizei, GLsizei); extern pfn_glScissorIndexed fp_glScissorIndexed; typedef void (APIENTRYP pfn_glScissorIndexedv) (GLuint, const GLint*); extern pfn_glScissorIndexedv fp_glScissorIndexedv; typedef void (APIENTRYP pfn_glDepthRangeArrayv) (GLuint, GLsizei, const GLdouble*); extern pfn_glDepthRangeArrayv fp_glDepthRangeArrayv; typedef void (APIENTRYP pfn_glDepthRangeIndexed) (GLuint, GLdouble, GLdouble); extern pfn_glDepthRangeIndexed fp_glDepthRangeIndexed; typedef void (APIENTRYP pfn_glGetFloati_v) (GLenum, GLuint, GLfloat*); extern pfn_glGetFloati_v fp_glGetFloati_v; typedef void (APIENTRYP pfn_glGetDoublei_v) (GLenum, GLuint, GLdouble*); extern pfn_glGetDoublei_v fp_glGetDoublei_v; /* GL_VERSION_4_2 */ extern GLboolean GLAD_VERSION_4_2; #define GL_COPY_READ_BUFFER_BINDING 0x8F36 #define GL_COPY_WRITE_BUFFER_BINDING 0x8F37 #define GL_TRANSFORM_FEEDBACK_ACTIVE 0x8E24 #define GL_TRANSFORM_FEEDBACK_PAUSED 0x8E23 #define GL_UNPACK_COMPRESSED_BLOCK_WIDTH 0x9127 #define GL_UNPACK_COMPRESSED_BLOCK_HEIGHT 0x9128 #define GL_UNPACK_COMPRESSED_BLOCK_DEPTH 0x9129 #define GL_UNPACK_COMPRESSED_BLOCK_SIZE 0x912A #define GL_PACK_COMPRESSED_BLOCK_WIDTH 0x912B #define GL_PACK_COMPRESSED_BLOCK_HEIGHT 0x912C #define GL_PACK_COMPRESSED_BLOCK_DEPTH 0x912D #define GL_PACK_COMPRESSED_BLOCK_SIZE 0x912E #define GL_NUM_SAMPLE_COUNTS 0x9380 #define GL_MIN_MAP_BUFFER_ALIGNMENT 0x90BC #define GL_ATOMIC_COUNTER_BUFFER 0x92C0 #define GL_ATOMIC_COUNTER_BUFFER_BINDING 0x92C1 #define GL_ATOMIC_COUNTER_BUFFER_START 0x92C2 #define GL_ATOMIC_COUNTER_BUFFER_SIZE 0x92C3 #define GL_ATOMIC_COUNTER_BUFFER_DATA_SIZE 0x92C4 #define GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS 0x92C5 #define GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTER_INDICES 0x92C6 #define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_VERTEX_SHADER 0x92C7 #define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_CONTROL_SHADER 0x92C8 #define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_EVALUATION_SHADER 0x92C9 #define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_GEOMETRY_SHADER 0x92CA #define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_FRAGMENT_SHADER 0x92CB #define GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS 0x92CC #define GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS 0x92CD #define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS 0x92CE #define GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS 0x92CF #define GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS 0x92D0 #define GL_MAX_COMBINED_ATOMIC_COUNTER_BUFFERS 0x92D1 #define GL_MAX_VERTEX_ATOMIC_COUNTERS 0x92D2 #define GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS 0x92D3 #define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS 0x92D4 #define GL_MAX_GEOMETRY_ATOMIC_COUNTERS 0x92D5 #define GL_MAX_FRAGMENT_ATOMIC_COUNTERS 0x92D6 #define GL_MAX_COMBINED_ATOMIC_COUNTERS 0x92D7 #define GL_MAX_ATOMIC_COUNTER_BUFFER_SIZE 0x92D8 #define GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS 0x92DC #define GL_ACTIVE_ATOMIC_COUNTER_BUFFERS 0x92D9 #define GL_UNIFORM_ATOMIC_COUNTER_BUFFER_INDEX 0x92DA #define GL_UNSIGNED_INT_ATOMIC_COUNTER 0x92DB #define GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT 0x00000001 #define GL_ELEMENT_ARRAY_BARRIER_BIT 0x00000002 #define GL_UNIFORM_BARRIER_BIT 0x00000004 #define GL_TEXTURE_FETCH_BARRIER_BIT 0x00000008 #define GL_SHADER_IMAGE_ACCESS_BARRIER_BIT 0x00000020 #define GL_COMMAND_BARRIER_BIT 0x00000040 #define GL_PIXEL_BUFFER_BARRIER_BIT 0x00000080 #define GL_TEXTURE_UPDATE_BARRIER_BIT 0x00000100 #define GL_BUFFER_UPDATE_BARRIER_BIT 0x00000200 #define GL_FRAMEBUFFER_BARRIER_BIT 0x00000400 #define GL_TRANSFORM_FEEDBACK_BARRIER_BIT 0x00000800 #define GL_ATOMIC_COUNTER_BARRIER_BIT 0x00001000 #define GL_ALL_BARRIER_BITS 0xFFFFFFFF #define GL_MAX_IMAGE_UNITS 0x8F38 #define GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS 0x8F39 #define GL_IMAGE_BINDING_NAME 0x8F3A #define GL_IMAGE_BINDING_LEVEL 0x8F3B #define GL_IMAGE_BINDING_LAYERED 0x8F3C #define GL_IMAGE_BINDING_LAYER 0x8F3D #define GL_IMAGE_BINDING_ACCESS 0x8F3E #define GL_IMAGE_1D 0x904C #define GL_IMAGE_2D 0x904D #define GL_IMAGE_3D 0x904E #define GL_IMAGE_2D_RECT 0x904F #define GL_IMAGE_CUBE 0x9050 #define GL_IMAGE_BUFFER 0x9051 #define GL_IMAGE_1D_ARRAY 0x9052 #define GL_IMAGE_2D_ARRAY 0x9053 #define GL_IMAGE_CUBE_MAP_ARRAY 0x9054 #define GL_IMAGE_2D_MULTISAMPLE 0x9055 #define GL_IMAGE_2D_MULTISAMPLE_ARRAY 0x9056 #define GL_INT_IMAGE_1D 0x9057 #define GL_INT_IMAGE_2D 0x9058 #define GL_INT_IMAGE_3D 0x9059 #define GL_INT_IMAGE_2D_RECT 0x905A #define GL_INT_IMAGE_CUBE 0x905B #define GL_INT_IMAGE_BUFFER 0x905C #define GL_INT_IMAGE_1D_ARRAY 0x905D #define GL_INT_IMAGE_2D_ARRAY 0x905E #define GL_INT_IMAGE_CUBE_MAP_ARRAY 0x905F #define GL_INT_IMAGE_2D_MULTISAMPLE 0x9060 #define GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY 0x9061 #define GL_UNSIGNED_INT_IMAGE_1D 0x9062 #define GL_UNSIGNED_INT_IMAGE_2D 0x9063 #define GL_UNSIGNED_INT_IMAGE_3D 0x9064 #define GL_UNSIGNED_INT_IMAGE_2D_RECT 0x9065 #define GL_UNSIGNED_INT_IMAGE_CUBE 0x9066 #define GL_UNSIGNED_INT_IMAGE_BUFFER 0x9067 #define GL_UNSIGNED_INT_IMAGE_1D_ARRAY 0x9068 #define GL_UNSIGNED_INT_IMAGE_2D_ARRAY 0x9069 #define GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY 0x906A #define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE 0x906B #define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY 0x906C #define GL_MAX_IMAGE_SAMPLES 0x906D #define GL_IMAGE_BINDING_FORMAT 0x906E #define GL_IMAGE_FORMAT_COMPATIBILITY_TYPE 0x90C7 #define GL_IMAGE_FORMAT_COMPATIBILITY_BY_SIZE 0x90C8 #define GL_IMAGE_FORMAT_COMPATIBILITY_BY_CLASS 0x90C9 #define GL_MAX_VERTEX_IMAGE_UNIFORMS 0x90CA #define GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS 0x90CB #define GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS 0x90CC #define GL_MAX_GEOMETRY_IMAGE_UNIFORMS 0x90CD #define GL_MAX_FRAGMENT_IMAGE_UNIFORMS 0x90CE #define GL_MAX_COMBINED_IMAGE_UNIFORMS 0x90CF #define GL_COMPRESSED_RGBA_BPTC_UNORM 0x8E8C #define GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM 0x8E8D #define GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT 0x8E8E #define GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT 0x8E8F #define GL_TEXTURE_IMMUTABLE_FORMAT 0x912F typedef void (APIENTRYP pfn_glDrawArraysInstancedBaseInstance) (GLenum, GLint, GLsizei, GLsizei, GLuint); extern pfn_glDrawArraysInstancedBaseInstance fp_glDrawArraysInstancedBaseInstance; typedef void (APIENTRYP pfn_glDrawElementsInstancedBaseInstance) (GLenum, GLsizei, GLenum, const void*, GLsizei, GLuint); extern pfn_glDrawElementsInstancedBaseInstance fp_glDrawElementsInstancedBaseInstance; typedef void (APIENTRYP pfn_glDrawElementsInstancedBaseVertexBaseInstance) (GLenum, GLsizei, GLenum, const void*, GLsizei, GLint, GLuint); extern pfn_glDrawElementsInstancedBaseVertexBaseInstance fp_glDrawElementsInstancedBaseVertexBaseInstance; typedef void (APIENTRYP pfn_glGetInternalformativ) (GLenum, GLenum, GLenum, GLsizei, GLint*); extern pfn_glGetInternalformativ fp_glGetInternalformativ; typedef void (APIENTRYP pfn_glGetActiveAtomicCounterBufferiv) (GLuint, GLuint, GLenum, GLint*); extern pfn_glGetActiveAtomicCounterBufferiv fp_glGetActiveAtomicCounterBufferiv; typedef void (APIENTRYP pfn_glBindImageTexture) (GLuint, GLuint, GLint, GLboolean, GLint, GLenum, GLenum); extern pfn_glBindImageTexture fp_glBindImageTexture; typedef void (APIENTRYP pfn_glMemoryBarrier) (GLbitfield); extern pfn_glMemoryBarrier fp_glMemoryBarrier; typedef void (APIENTRYP pfn_glTexStorage1D) (GLenum, GLsizei, GLenum, GLsizei); extern pfn_glTexStorage1D fp_glTexStorage1D; typedef void (APIENTRYP pfn_glTexStorage2D) (GLenum, GLsizei, GLenum, GLsizei, GLsizei); extern pfn_glTexStorage2D fp_glTexStorage2D; typedef void (APIENTRYP pfn_glTexStorage3D) (GLenum, GLsizei, GLenum, GLsizei, GLsizei, GLsizei); extern pfn_glTexStorage3D fp_glTexStorage3D; typedef void (APIENTRYP pfn_glDrawTransformFeedbackInstanced) (GLenum, GLuint, GLsizei); extern pfn_glDrawTransformFeedbackInstanced fp_glDrawTransformFeedbackInstanced; typedef void (APIENTRYP pfn_glDrawTransformFeedbackStreamInstanced) (GLenum, GLuint, GLuint, GLsizei); extern pfn_glDrawTransformFeedbackStreamInstanced fp_glDrawTransformFeedbackStreamInstanced; /* GL_VERSION_4_3 */ extern GLboolean GLAD_VERSION_4_3; #define GL_NUM_SHADING_LANGUAGE_VERSIONS 0x82E9 #define GL_VERTEX_ATTRIB_ARRAY_LONG 0x874E #define GL_COMPRESSED_RGB8_ETC2 0x9274 #define GL_COMPRESSED_SRGB8_ETC2 0x9275 #define GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9276 #define GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9277 #define GL_COMPRESSED_RGBA8_ETC2_EAC 0x9278 #define GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC 0x9279 #define GL_COMPRESSED_R11_EAC 0x9270 #define GL_COMPRESSED_SIGNED_R11_EAC 0x9271 #define GL_COMPRESSED_RG11_EAC 0x9272 #define GL_COMPRESSED_SIGNED_RG11_EAC 0x9273 #define GL_PRIMITIVE_RESTART_FIXED_INDEX 0x8D69 #define GL_ANY_SAMPLES_PASSED_CONSERVATIVE 0x8D6A #define GL_MAX_ELEMENT_INDEX 0x8D6B #define GL_COMPUTE_SHADER 0x91B9 #define GL_MAX_COMPUTE_UNIFORM_BLOCKS 0x91BB #define GL_MAX_COMPUTE_TEXTURE_IMAGE_UNITS 0x91BC #define GL_MAX_COMPUTE_IMAGE_UNIFORMS 0x91BD #define GL_MAX_COMPUTE_SHARED_MEMORY_SIZE 0x8262 #define GL_MAX_COMPUTE_UNIFORM_COMPONENTS 0x8263 #define GL_MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS 0x8264 #define GL_MAX_COMPUTE_ATOMIC_COUNTERS 0x8265 #define GL_MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS 0x8266 #define GL_MAX_COMPUTE_WORK_GROUP_INVOCATIONS 0x90EB #define GL_MAX_COMPUTE_WORK_GROUP_COUNT 0x91BE #define GL_MAX_COMPUTE_WORK_GROUP_SIZE 0x91BF #define GL_COMPUTE_WORK_GROUP_SIZE 0x8267 #define GL_UNIFORM_BLOCK_REFERENCED_BY_COMPUTE_SHADER 0x90EC #define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_COMPUTE_SHADER 0x90ED #define GL_DISPATCH_INDIRECT_BUFFER 0x90EE #define GL_DISPATCH_INDIRECT_BUFFER_BINDING 0x90EF #define GL_COMPUTE_SHADER_BIT 0x00000020 #define GL_DEBUG_OUTPUT_SYNCHRONOUS 0x8242 #define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH 0x8243 #define GL_DEBUG_CALLBACK_FUNCTION 0x8244 #define GL_DEBUG_CALLBACK_USER_PARAM 0x8245 #define GL_DEBUG_SOURCE_API 0x8246 #define GL_DEBUG_SOURCE_WINDOW_SYSTEM 0x8247 #define GL_DEBUG_SOURCE_SHADER_COMPILER 0x8248 #define GL_DEBUG_SOURCE_THIRD_PARTY 0x8249 #define GL_DEBUG_SOURCE_APPLICATION 0x824A #define GL_DEBUG_SOURCE_OTHER 0x824B #define GL_DEBUG_TYPE_ERROR 0x824C #define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR 0x824D #define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR 0x824E #define GL_DEBUG_TYPE_PORTABILITY 0x824F #define GL_DEBUG_TYPE_PERFORMANCE 0x8250 #define GL_DEBUG_TYPE_OTHER 0x8251 #define GL_MAX_DEBUG_MESSAGE_LENGTH 0x9143 #define GL_MAX_DEBUG_LOGGED_MESSAGES 0x9144 #define GL_DEBUG_LOGGED_MESSAGES 0x9145 #define GL_DEBUG_SEVERITY_HIGH 0x9146 #define GL_DEBUG_SEVERITY_MEDIUM 0x9147 #define GL_DEBUG_SEVERITY_LOW 0x9148 #define GL_DEBUG_TYPE_MARKER 0x8268 #define GL_DEBUG_TYPE_PUSH_GROUP 0x8269 #define GL_DEBUG_TYPE_POP_GROUP 0x826A #define GL_DEBUG_SEVERITY_NOTIFICATION 0x826B #define GL_MAX_DEBUG_GROUP_STACK_DEPTH 0x826C #define GL_DEBUG_GROUP_STACK_DEPTH 0x826D #define GL_BUFFER 0x82E0 #define GL_SHADER 0x82E1 #define GL_PROGRAM 0x82E2 #define GL_QUERY 0x82E3 #define GL_PROGRAM_PIPELINE 0x82E4 #define GL_SAMPLER 0x82E6 #define GL_MAX_LABEL_LENGTH 0x82E8 #define GL_DEBUG_OUTPUT 0x92E0 #define GL_CONTEXT_FLAG_DEBUG_BIT 0x00000002 #define GL_MAX_UNIFORM_LOCATIONS 0x826E #define GL_FRAMEBUFFER_DEFAULT_WIDTH 0x9310 #define GL_FRAMEBUFFER_DEFAULT_HEIGHT 0x9311 #define GL_FRAMEBUFFER_DEFAULT_LAYERS 0x9312 #define GL_FRAMEBUFFER_DEFAULT_SAMPLES 0x9313 #define GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS 0x9314 #define GL_MAX_FRAMEBUFFER_WIDTH 0x9315 #define GL_MAX_FRAMEBUFFER_HEIGHT 0x9316 #define GL_MAX_FRAMEBUFFER_LAYERS 0x9317 #define GL_MAX_FRAMEBUFFER_SAMPLES 0x9318 #define GL_INTERNALFORMAT_SUPPORTED 0x826F #define GL_INTERNALFORMAT_PREFERRED 0x8270 #define GL_INTERNALFORMAT_RED_SIZE 0x8271 #define GL_INTERNALFORMAT_GREEN_SIZE 0x8272 #define GL_INTERNALFORMAT_BLUE_SIZE 0x8273 #define GL_INTERNALFORMAT_ALPHA_SIZE 0x8274 #define GL_INTERNALFORMAT_DEPTH_SIZE 0x8275 #define GL_INTERNALFORMAT_STENCIL_SIZE 0x8276 #define GL_INTERNALFORMAT_SHARED_SIZE 0x8277 #define GL_INTERNALFORMAT_RED_TYPE 0x8278 #define GL_INTERNALFORMAT_GREEN_TYPE 0x8279 #define GL_INTERNALFORMAT_BLUE_TYPE 0x827A #define GL_INTERNALFORMAT_ALPHA_TYPE 0x827B #define GL_INTERNALFORMAT_DEPTH_TYPE 0x827C #define GL_INTERNALFORMAT_STENCIL_TYPE 0x827D #define GL_MAX_WIDTH 0x827E #define GL_MAX_HEIGHT 0x827F #define GL_MAX_DEPTH 0x8280 #define GL_MAX_LAYERS 0x8281 #define GL_MAX_COMBINED_DIMENSIONS 0x8282 #define GL_COLOR_COMPONENTS 0x8283 #define GL_DEPTH_COMPONENTS 0x8284 #define GL_STENCIL_COMPONENTS 0x8285 #define GL_COLOR_RENDERABLE 0x8286 #define GL_DEPTH_RENDERABLE 0x8287 #define GL_STENCIL_RENDERABLE 0x8288 #define GL_FRAMEBUFFER_RENDERABLE 0x8289 #define GL_FRAMEBUFFER_RENDERABLE_LAYERED 0x828A #define GL_FRAMEBUFFER_BLEND 0x828B #define GL_READ_PIXELS 0x828C #define GL_READ_PIXELS_FORMAT 0x828D #define GL_READ_PIXELS_TYPE 0x828E #define GL_TEXTURE_IMAGE_FORMAT 0x828F #define GL_TEXTURE_IMAGE_TYPE 0x8290 #define GL_GET_TEXTURE_IMAGE_FORMAT 0x8291 #define GL_GET_TEXTURE_IMAGE_TYPE 0x8292 #define GL_MIPMAP 0x8293 #define GL_MANUAL_GENERATE_MIPMAP 0x8294 #define GL_AUTO_GENERATE_MIPMAP 0x8295 #define GL_COLOR_ENCODING 0x8296 #define GL_SRGB_READ 0x8297 #define GL_SRGB_WRITE 0x8298 #define GL_FILTER 0x829A #define GL_VERTEX_TEXTURE 0x829B #define GL_TESS_CONTROL_TEXTURE 0x829C #define GL_TESS_EVALUATION_TEXTURE 0x829D #define GL_GEOMETRY_TEXTURE 0x829E #define GL_FRAGMENT_TEXTURE 0x829F #define GL_COMPUTE_TEXTURE 0x82A0 #define GL_TEXTURE_SHADOW 0x82A1 #define GL_TEXTURE_GATHER 0x82A2 #define GL_TEXTURE_GATHER_SHADOW 0x82A3 #define GL_SHADER_IMAGE_LOAD 0x82A4 #define GL_SHADER_IMAGE_STORE 0x82A5 #define GL_SHADER_IMAGE_ATOMIC 0x82A6 #define GL_IMAGE_TEXEL_SIZE 0x82A7 #define GL_IMAGE_COMPATIBILITY_CLASS 0x82A8 #define GL_IMAGE_PIXEL_FORMAT 0x82A9 #define GL_IMAGE_PIXEL_TYPE 0x82AA #define GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_TEST 0x82AC #define GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_TEST 0x82AD #define GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_WRITE 0x82AE #define GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_WRITE 0x82AF #define GL_TEXTURE_COMPRESSED_BLOCK_WIDTH 0x82B1 #define GL_TEXTURE_COMPRESSED_BLOCK_HEIGHT 0x82B2 #define GL_TEXTURE_COMPRESSED_BLOCK_SIZE 0x82B3 #define GL_CLEAR_BUFFER 0x82B4 #define GL_TEXTURE_VIEW 0x82B5 #define GL_VIEW_COMPATIBILITY_CLASS 0x82B6 #define GL_FULL_SUPPORT 0x82B7 #define GL_CAVEAT_SUPPORT 0x82B8 #define GL_IMAGE_CLASS_4_X_32 0x82B9 #define GL_IMAGE_CLASS_2_X_32 0x82BA #define GL_IMAGE_CLASS_1_X_32 0x82BB #define GL_IMAGE_CLASS_4_X_16 0x82BC #define GL_IMAGE_CLASS_2_X_16 0x82BD #define GL_IMAGE_CLASS_1_X_16 0x82BE #define GL_IMAGE_CLASS_4_X_8 0x82BF #define GL_IMAGE_CLASS_2_X_8 0x82C0 #define GL_IMAGE_CLASS_1_X_8 0x82C1 #define GL_IMAGE_CLASS_11_11_10 0x82C2 #define GL_IMAGE_CLASS_10_10_10_2 0x82C3 #define GL_VIEW_CLASS_128_BITS 0x82C4 #define GL_VIEW_CLASS_96_BITS 0x82C5 #define GL_VIEW_CLASS_64_BITS 0x82C6 #define GL_VIEW_CLASS_48_BITS 0x82C7 #define GL_VIEW_CLASS_32_BITS 0x82C8 #define GL_VIEW_CLASS_24_BITS 0x82C9 #define GL_VIEW_CLASS_16_BITS 0x82CA #define GL_VIEW_CLASS_8_BITS 0x82CB #define GL_VIEW_CLASS_S3TC_DXT1_RGB 0x82CC #define GL_VIEW_CLASS_S3TC_DXT1_RGBA 0x82CD #define GL_VIEW_CLASS_S3TC_DXT3_RGBA 0x82CE #define GL_VIEW_CLASS_S3TC_DXT5_RGBA 0x82CF #define GL_VIEW_CLASS_RGTC1_RED 0x82D0 #define GL_VIEW_CLASS_RGTC2_RG 0x82D1 #define GL_VIEW_CLASS_BPTC_UNORM 0x82D2 #define GL_VIEW_CLASS_BPTC_FLOAT 0x82D3 #define GL_UNIFORM 0x92E1 #define GL_UNIFORM_BLOCK 0x92E2 #define GL_PROGRAM_INPUT 0x92E3 #define GL_PROGRAM_OUTPUT 0x92E4 #define GL_BUFFER_VARIABLE 0x92E5 #define GL_SHADER_STORAGE_BLOCK 0x92E6 #define GL_VERTEX_SUBROUTINE 0x92E8 #define GL_TESS_CONTROL_SUBROUTINE 0x92E9 #define GL_TESS_EVALUATION_SUBROUTINE 0x92EA #define GL_GEOMETRY_SUBROUTINE 0x92EB #define GL_FRAGMENT_SUBROUTINE 0x92EC #define GL_COMPUTE_SUBROUTINE 0x92ED #define GL_VERTEX_SUBROUTINE_UNIFORM 0x92EE #define GL_TESS_CONTROL_SUBROUTINE_UNIFORM 0x92EF #define GL_TESS_EVALUATION_SUBROUTINE_UNIFORM 0x92F0 #define GL_GEOMETRY_SUBROUTINE_UNIFORM 0x92F1 #define GL_FRAGMENT_SUBROUTINE_UNIFORM 0x92F2 #define GL_COMPUTE_SUBROUTINE_UNIFORM 0x92F3 #define GL_TRANSFORM_FEEDBACK_VARYING 0x92F4 #define GL_ACTIVE_RESOURCES 0x92F5 #define GL_MAX_NAME_LENGTH 0x92F6 #define GL_MAX_NUM_ACTIVE_VARIABLES 0x92F7 #define GL_MAX_NUM_COMPATIBLE_SUBROUTINES 0x92F8 #define GL_NAME_LENGTH 0x92F9 #define GL_TYPE 0x92FA #define GL_ARRAY_SIZE 0x92FB #define GL_OFFSET 0x92FC #define GL_BLOCK_INDEX 0x92FD #define GL_ARRAY_STRIDE 0x92FE #define GL_MATRIX_STRIDE 0x92FF #define GL_IS_ROW_MAJOR 0x9300 #define GL_ATOMIC_COUNTER_BUFFER_INDEX 0x9301 #define GL_BUFFER_BINDING 0x9302 #define GL_BUFFER_DATA_SIZE 0x9303 #define GL_NUM_ACTIVE_VARIABLES 0x9304 #define GL_ACTIVE_VARIABLES 0x9305 #define GL_REFERENCED_BY_VERTEX_SHADER 0x9306 #define GL_REFERENCED_BY_TESS_CONTROL_SHADER 0x9307 #define GL_REFERENCED_BY_TESS_EVALUATION_SHADER 0x9308 #define GL_REFERENCED_BY_GEOMETRY_SHADER 0x9309 #define GL_REFERENCED_BY_FRAGMENT_SHADER 0x930A #define GL_REFERENCED_BY_COMPUTE_SHADER 0x930B #define GL_TOP_LEVEL_ARRAY_SIZE 0x930C #define GL_TOP_LEVEL_ARRAY_STRIDE 0x930D #define GL_LOCATION 0x930E #define GL_LOCATION_INDEX 0x930F #define GL_IS_PER_PATCH 0x92E7 #define GL_SHADER_STORAGE_BUFFER 0x90D2 #define GL_SHADER_STORAGE_BUFFER_BINDING 0x90D3 #define GL_SHADER_STORAGE_BUFFER_START 0x90D4 #define GL_SHADER_STORAGE_BUFFER_SIZE 0x90D5 #define GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS 0x90D6 #define GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS 0x90D7 #define GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS 0x90D8 #define GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS 0x90D9 #define GL_MAX_FRAGMENT_SHADER_STORAGE_BLOCKS 0x90DA #define GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS 0x90DB #define GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS 0x90DC #define GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS 0x90DD #define GL_MAX_SHADER_STORAGE_BLOCK_SIZE 0x90DE #define GL_SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT 0x90DF #define GL_SHADER_STORAGE_BARRIER_BIT 0x00002000 #define GL_MAX_COMBINED_SHADER_OUTPUT_RESOURCES 0x8F39 #define GL_DEPTH_STENCIL_TEXTURE_MODE 0x90EA #define GL_TEXTURE_BUFFER_OFFSET 0x919D #define GL_TEXTURE_BUFFER_SIZE 0x919E #define GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT 0x919F #define GL_TEXTURE_VIEW_MIN_LEVEL 0x82DB #define GL_TEXTURE_VIEW_NUM_LEVELS 0x82DC #define GL_TEXTURE_VIEW_MIN_LAYER 0x82DD #define GL_TEXTURE_VIEW_NUM_LAYERS 0x82DE #define GL_TEXTURE_IMMUTABLE_LEVELS 0x82DF #define GL_VERTEX_ATTRIB_BINDING 0x82D4 #define GL_VERTEX_ATTRIB_RELATIVE_OFFSET 0x82D5 #define GL_VERTEX_BINDING_DIVISOR 0x82D6 #define GL_VERTEX_BINDING_OFFSET 0x82D7 #define GL_VERTEX_BINDING_STRIDE 0x82D8 #define GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET 0x82D9 #define GL_MAX_VERTEX_ATTRIB_BINDINGS 0x82DA #define GL_VERTEX_BINDING_BUFFER 0x8F4F #define GL_DISPLAY_LIST 0x82E7 typedef void (APIENTRYP pfn_glClearBufferData) (GLenum, GLenum, GLenum, GLenum, const void*); extern pfn_glClearBufferData fp_glClearBufferData; typedef void (APIENTRYP pfn_glClearBufferSubData) (GLenum, GLenum, GLintptr, GLsizeiptr, GLenum, GLenum, const void*); extern pfn_glClearBufferSubData fp_glClearBufferSubData; typedef void (APIENTRYP pfn_glDispatchCompute) (GLuint, GLuint, GLuint); extern pfn_glDispatchCompute fp_glDispatchCompute; typedef void (APIENTRYP pfn_glDispatchComputeIndirect) (GLintptr); extern pfn_glDispatchComputeIndirect fp_glDispatchComputeIndirect; typedef void (APIENTRYP pfn_glCopyImageSubData) (GLuint, GLenum, GLint, GLint, GLint, GLint, GLuint, GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei); extern pfn_glCopyImageSubData fp_glCopyImageSubData; typedef void (APIENTRYP pfn_glFramebufferParameteri) (GLenum, GLenum, GLint); extern pfn_glFramebufferParameteri fp_glFramebufferParameteri; typedef void (APIENTRYP pfn_glGetFramebufferParameteriv) (GLenum, GLenum, GLint*); extern pfn_glGetFramebufferParameteriv fp_glGetFramebufferParameteriv; typedef void (APIENTRYP pfn_glGetInternalformati64v) (GLenum, GLenum, GLenum, GLsizei, GLint64*); extern pfn_glGetInternalformati64v fp_glGetInternalformati64v; typedef void (APIENTRYP pfn_glInvalidateTexSubImage) (GLuint, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei); extern pfn_glInvalidateTexSubImage fp_glInvalidateTexSubImage; typedef void (APIENTRYP pfn_glInvalidateTexImage) (GLuint, GLint); extern pfn_glInvalidateTexImage fp_glInvalidateTexImage; typedef void (APIENTRYP pfn_glInvalidateBufferSubData) (GLuint, GLintptr, GLsizeiptr); extern pfn_glInvalidateBufferSubData fp_glInvalidateBufferSubData; typedef void (APIENTRYP pfn_glInvalidateBufferData) (GLuint); extern pfn_glInvalidateBufferData fp_glInvalidateBufferData; typedef void (APIENTRYP pfn_glInvalidateFramebuffer) (GLenum, GLsizei, const GLenum*); extern pfn_glInvalidateFramebuffer fp_glInvalidateFramebuffer; typedef void (APIENTRYP pfn_glInvalidateSubFramebuffer) (GLenum, GLsizei, const GLenum*, GLint, GLint, GLsizei, GLsizei); extern pfn_glInvalidateSubFramebuffer fp_glInvalidateSubFramebuffer; typedef void (APIENTRYP pfn_glMultiDrawArraysIndirect) (GLenum, const void*, GLsizei, GLsizei); extern pfn_glMultiDrawArraysIndirect fp_glMultiDrawArraysIndirect; typedef void (APIENTRYP pfn_glMultiDrawElementsIndirect) (GLenum, GLenum, const void*, GLsizei, GLsizei); extern pfn_glMultiDrawElementsIndirect fp_glMultiDrawElementsIndirect; typedef void (APIENTRYP pfn_glGetProgramInterfaceiv) (GLuint, GLenum, GLenum, GLint*); extern pfn_glGetProgramInterfaceiv fp_glGetProgramInterfaceiv; typedef GLuint (APIENTRYP pfn_glGetProgramResourceIndex) (GLuint, GLenum, const GLchar*); extern pfn_glGetProgramResourceIndex fp_glGetProgramResourceIndex; typedef void (APIENTRYP pfn_glGetProgramResourceName) (GLuint, GLenum, GLuint, GLsizei, GLsizei*, GLchar*); extern pfn_glGetProgramResourceName fp_glGetProgramResourceName; typedef void (APIENTRYP pfn_glGetProgramResourceiv) (GLuint, GLenum, GLuint, GLsizei, const GLenum*, GLsizei, GLsizei*, GLint*); extern pfn_glGetProgramResourceiv fp_glGetProgramResourceiv; typedef GLint (APIENTRYP pfn_glGetProgramResourceLocation) (GLuint, GLenum, const GLchar*); extern pfn_glGetProgramResourceLocation fp_glGetProgramResourceLocation; typedef GLint (APIENTRYP pfn_glGetProgramResourceLocationIndex) (GLuint, GLenum, const GLchar*); extern pfn_glGetProgramResourceLocationIndex fp_glGetProgramResourceLocationIndex; typedef void (APIENTRYP pfn_glShaderStorageBlockBinding) (GLuint, GLuint, GLuint); extern pfn_glShaderStorageBlockBinding fp_glShaderStorageBlockBinding; typedef void (APIENTRYP pfn_glTexBufferRange) (GLenum, GLenum, GLuint, GLintptr, GLsizeiptr); extern pfn_glTexBufferRange fp_glTexBufferRange; typedef void (APIENTRYP pfn_glTexStorage2DMultisample) (GLenum, GLsizei, GLenum, GLsizei, GLsizei, GLboolean); extern pfn_glTexStorage2DMultisample fp_glTexStorage2DMultisample; typedef void (APIENTRYP pfn_glTexStorage3DMultisample) (GLenum, GLsizei, GLenum, GLsizei, GLsizei, GLsizei, GLboolean); extern pfn_glTexStorage3DMultisample fp_glTexStorage3DMultisample; typedef void (APIENTRYP pfn_glTextureView) (GLuint, GLenum, GLuint, GLenum, GLuint, GLuint, GLuint, GLuint); extern pfn_glTextureView fp_glTextureView; typedef void (APIENTRYP pfn_glBindVertexBuffer) (GLuint, GLuint, GLintptr, GLsizei); extern pfn_glBindVertexBuffer fp_glBindVertexBuffer; typedef void (APIENTRYP pfn_glVertexAttribFormat) (GLuint, GLint, GLenum, GLboolean, GLuint); extern pfn_glVertexAttribFormat fp_glVertexAttribFormat; typedef void (APIENTRYP pfn_glVertexAttribIFormat) (GLuint, GLint, GLenum, GLuint); extern pfn_glVertexAttribIFormat fp_glVertexAttribIFormat; typedef void (APIENTRYP pfn_glVertexAttribLFormat) (GLuint, GLint, GLenum, GLuint); extern pfn_glVertexAttribLFormat fp_glVertexAttribLFormat; typedef void (APIENTRYP pfn_glVertexAttribBinding) (GLuint, GLuint); extern pfn_glVertexAttribBinding fp_glVertexAttribBinding; typedef void (APIENTRYP pfn_glVertexBindingDivisor) (GLuint, GLuint); extern pfn_glVertexBindingDivisor fp_glVertexBindingDivisor; typedef void (APIENTRYP pfn_glDebugMessageControl) (GLenum, GLenum, GLenum, GLsizei, const GLuint*, GLboolean); extern pfn_glDebugMessageControl fp_glDebugMessageControl; typedef void (APIENTRYP pfn_glDebugMessageInsert) (GLenum, GLenum, GLuint, GLenum, GLsizei, const GLchar*); extern pfn_glDebugMessageInsert fp_glDebugMessageInsert; typedef void (APIENTRYP pfn_glDebugMessageCallback) (GLDEBUGPROC, const void*); extern pfn_glDebugMessageCallback fp_glDebugMessageCallback; typedef GLuint (APIENTRYP pfn_glGetDebugMessageLog) (GLuint, GLsizei, GLenum*, GLenum*, GLuint*, GLenum*, GLsizei*, GLchar*); extern pfn_glGetDebugMessageLog fp_glGetDebugMessageLog; typedef void (APIENTRYP pfn_glPushDebugGroup) (GLenum, GLuint, GLsizei, const GLchar*); extern pfn_glPushDebugGroup fp_glPushDebugGroup; typedef void (APIENTRYP pfn_glPopDebugGroup) (); extern pfn_glPopDebugGroup fp_glPopDebugGroup; typedef void (APIENTRYP pfn_glObjectLabel) (GLenum, GLuint, GLsizei, const GLchar*); extern pfn_glObjectLabel fp_glObjectLabel; typedef void (APIENTRYP pfn_glGetObjectLabel) (GLenum, GLuint, GLsizei, GLsizei*, GLchar*); extern pfn_glGetObjectLabel fp_glGetObjectLabel; typedef void (APIENTRYP pfn_glObjectPtrLabel) (const void*, GLsizei, const GLchar*); extern pfn_glObjectPtrLabel fp_glObjectPtrLabel; typedef void (APIENTRYP pfn_glGetObjectPtrLabel) (const void*, GLsizei, GLsizei*, GLchar*); extern pfn_glGetObjectPtrLabel fp_glGetObjectPtrLabel; /* GL_VERSION_4_4 */ extern GLboolean GLAD_VERSION_4_4; #define GL_MAX_VERTEX_ATTRIB_STRIDE 0x82E5 #define GL_PRIMITIVE_RESTART_FOR_PATCHES_SUPPORTED 0x8221 #define GL_TEXTURE_BUFFER_BINDING 0x8C2A #define GL_MAP_PERSISTENT_BIT 0x0040 #define GL_MAP_COHERENT_BIT 0x0080 #define GL_DYNAMIC_STORAGE_BIT 0x0100 #define GL_CLIENT_STORAGE_BIT 0x0200 #define GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT 0x00004000 #define GL_BUFFER_IMMUTABLE_STORAGE 0x821F #define GL_BUFFER_STORAGE_FLAGS 0x8220 #define GL_CLEAR_TEXTURE 0x9365 #define GL_LOCATION_COMPONENT 0x934A #define GL_TRANSFORM_FEEDBACK_BUFFER_INDEX 0x934B #define GL_TRANSFORM_FEEDBACK_BUFFER_STRIDE 0x934C #define GL_QUERY_BUFFER 0x9192 #define GL_QUERY_BUFFER_BARRIER_BIT 0x00008000 #define GL_QUERY_BUFFER_BINDING 0x9193 #define GL_QUERY_RESULT_NO_WAIT 0x9194 #define GL_MIRROR_CLAMP_TO_EDGE 0x8743 typedef void (APIENTRYP pfn_glBufferStorage) (GLenum, GLsizeiptr, const void*, GLbitfield); extern pfn_glBufferStorage fp_glBufferStorage; typedef void (APIENTRYP pfn_glClearTexImage) (GLuint, GLint, GLenum, GLenum, const void*); extern pfn_glClearTexImage fp_glClearTexImage; typedef void (APIENTRYP pfn_glClearTexSubImage) (GLuint, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const void*); extern pfn_glClearTexSubImage fp_glClearTexSubImage; typedef void (APIENTRYP pfn_glBindBuffersBase) (GLenum, GLuint, GLsizei, const GLuint*); extern pfn_glBindBuffersBase fp_glBindBuffersBase; typedef void (APIENTRYP pfn_glBindBuffersRange) (GLenum, GLuint, GLsizei, const GLuint*, const GLintptr*, const GLsizeiptr*); extern pfn_glBindBuffersRange fp_glBindBuffersRange; typedef void (APIENTRYP pfn_glBindTextures) (GLuint, GLsizei, const GLuint*); extern pfn_glBindTextures fp_glBindTextures; typedef void (APIENTRYP pfn_glBindSamplers) (GLuint, GLsizei, const GLuint*); extern pfn_glBindSamplers fp_glBindSamplers; typedef void (APIENTRYP pfn_glBindImageTextures) (GLuint, GLsizei, const GLuint*); extern pfn_glBindImageTextures fp_glBindImageTextures; typedef void (APIENTRYP pfn_glBindVertexBuffers) (GLuint, GLsizei, const GLuint*, const GLintptr*, const GLsizei*); extern pfn_glBindVertexBuffers fp_glBindVertexBuffers; /* GL_VERSION_4_5 */ extern GLboolean GLAD_VERSION_4_5; #define GL_CONTEXT_LOST 0x0507 #define GL_NEGATIVE_ONE_TO_ONE 0x935E #define GL_ZERO_TO_ONE 0x935F #define GL_CLIP_ORIGIN 0x935C #define GL_CLIP_DEPTH_MODE 0x935D #define GL_QUERY_WAIT_INVERTED 0x8E17 #define GL_QUERY_NO_WAIT_INVERTED 0x8E18 #define GL_QUERY_BY_REGION_WAIT_INVERTED 0x8E19 #define GL_QUERY_BY_REGION_NO_WAIT_INVERTED 0x8E1A #define GL_MAX_CULL_DISTANCES 0x82F9 #define GL_MAX_COMBINED_CLIP_AND_CULL_DISTANCES 0x82FA #define GL_TEXTURE_TARGET 0x1006 #define GL_QUERY_TARGET 0x82EA #define GL_GUILTY_CONTEXT_RESET 0x8253 #define GL_INNOCENT_CONTEXT_RESET 0x8254 #define GL_UNKNOWN_CONTEXT_RESET 0x8255 #define GL_RESET_NOTIFICATION_STRATEGY 0x8256 #define GL_LOSE_CONTEXT_ON_RESET 0x8252 #define GL_NO_RESET_NOTIFICATION 0x8261 #define GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT 0x00000004 #define GL_CONTEXT_RELEASE_BEHAVIOR 0x82FB #define GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH 0x82FC typedef void (APIENTRYP pfn_glClipControl) (GLenum, GLenum); extern pfn_glClipControl fp_glClipControl; typedef void (APIENTRYP pfn_glCreateTransformFeedbacks) (GLsizei, GLuint*); extern pfn_glCreateTransformFeedbacks fp_glCreateTransformFeedbacks; typedef void (APIENTRYP pfn_glTransformFeedbackBufferBase) (GLuint, GLuint, GLuint); extern pfn_glTransformFeedbackBufferBase fp_glTransformFeedbackBufferBase; typedef void (APIENTRYP pfn_glTransformFeedbackBufferRange) (GLuint, GLuint, GLuint, GLintptr, GLsizeiptr); extern pfn_glTransformFeedbackBufferRange fp_glTransformFeedbackBufferRange; typedef void (APIENTRYP pfn_glGetTransformFeedbackiv) (GLuint, GLenum, GLint*); extern pfn_glGetTransformFeedbackiv fp_glGetTransformFeedbackiv; typedef void (APIENTRYP pfn_glGetTransformFeedbacki_v) (GLuint, GLenum, GLuint, GLint*); extern pfn_glGetTransformFeedbacki_v fp_glGetTransformFeedbacki_v; typedef void (APIENTRYP pfn_glGetTransformFeedbacki64_v) (GLuint, GLenum, GLuint, GLint64*); extern pfn_glGetTransformFeedbacki64_v fp_glGetTransformFeedbacki64_v; typedef void (APIENTRYP pfn_glCreateBuffers) (GLsizei, GLuint*); extern pfn_glCreateBuffers fp_glCreateBuffers; typedef void (APIENTRYP pfn_glNamedBufferStorage) (GLuint, GLsizeiptr, const void*, GLbitfield); extern pfn_glNamedBufferStorage fp_glNamedBufferStorage; typedef void (APIENTRYP pfn_glNamedBufferData) (GLuint, GLsizeiptr, const void*, GLenum); extern pfn_glNamedBufferData fp_glNamedBufferData; typedef void (APIENTRYP pfn_glNamedBufferSubData) (GLuint, GLintptr, GLsizeiptr, const void*); extern pfn_glNamedBufferSubData fp_glNamedBufferSubData; typedef void (APIENTRYP pfn_glCopyNamedBufferSubData) (GLuint, GLuint, GLintptr, GLintptr, GLsizeiptr); extern pfn_glCopyNamedBufferSubData fp_glCopyNamedBufferSubData; typedef void (APIENTRYP pfn_glClearNamedBufferData) (GLuint, GLenum, GLenum, GLenum, const void*); extern pfn_glClearNamedBufferData fp_glClearNamedBufferData; typedef void (APIENTRYP pfn_glClearNamedBufferSubData) (GLuint, GLenum, GLintptr, GLsizeiptr, GLenum, GLenum, const void*); extern pfn_glClearNamedBufferSubData fp_glClearNamedBufferSubData; typedef void* (APIENTRYP pfn_glMapNamedBuffer) (GLuint, GLenum); extern pfn_glMapNamedBuffer fp_glMapNamedBuffer; typedef void* (APIENTRYP pfn_glMapNamedBufferRange) (GLuint, GLintptr, GLsizeiptr, GLbitfield); extern pfn_glMapNamedBufferRange fp_glMapNamedBufferRange; typedef GLboolean (APIENTRYP pfn_glUnmapNamedBuffer) (GLuint); extern pfn_glUnmapNamedBuffer fp_glUnmapNamedBuffer; typedef void (APIENTRYP pfn_glFlushMappedNamedBufferRange) (GLuint, GLintptr, GLsizeiptr); extern pfn_glFlushMappedNamedBufferRange fp_glFlushMappedNamedBufferRange; typedef void (APIENTRYP pfn_glGetNamedBufferParameteriv) (GLuint, GLenum, GLint*); extern pfn_glGetNamedBufferParameteriv fp_glGetNamedBufferParameteriv; typedef void (APIENTRYP pfn_glGetNamedBufferParameteri64v) (GLuint, GLenum, GLint64*); extern pfn_glGetNamedBufferParameteri64v fp_glGetNamedBufferParameteri64v; typedef void (APIENTRYP pfn_glGetNamedBufferPointerv) (GLuint, GLenum, void**); extern pfn_glGetNamedBufferPointerv fp_glGetNamedBufferPointerv; typedef void (APIENTRYP pfn_glGetNamedBufferSubData) (GLuint, GLintptr, GLsizeiptr, void*); extern pfn_glGetNamedBufferSubData fp_glGetNamedBufferSubData; typedef void (APIENTRYP pfn_glCreateFramebuffers) (GLsizei, GLuint*); extern pfn_glCreateFramebuffers fp_glCreateFramebuffers; typedef void (APIENTRYP pfn_glNamedFramebufferRenderbuffer) (GLuint, GLenum, GLenum, GLuint); extern pfn_glNamedFramebufferRenderbuffer fp_glNamedFramebufferRenderbuffer; typedef void (APIENTRYP pfn_glNamedFramebufferParameteri) (GLuint, GLenum, GLint); extern pfn_glNamedFramebufferParameteri fp_glNamedFramebufferParameteri; typedef void (APIENTRYP pfn_glNamedFramebufferTexture) (GLuint, GLenum, GLuint, GLint); extern pfn_glNamedFramebufferTexture fp_glNamedFramebufferTexture; typedef void (APIENTRYP pfn_glNamedFramebufferTextureLayer) (GLuint, GLenum, GLuint, GLint, GLint); extern pfn_glNamedFramebufferTextureLayer fp_glNamedFramebufferTextureLayer; typedef void (APIENTRYP pfn_glNamedFramebufferDrawBuffer) (GLuint, GLenum); extern pfn_glNamedFramebufferDrawBuffer fp_glNamedFramebufferDrawBuffer; typedef void (APIENTRYP pfn_glNamedFramebufferDrawBuffers) (GLuint, GLsizei, const GLenum*); extern pfn_glNamedFramebufferDrawBuffers fp_glNamedFramebufferDrawBuffers; typedef void (APIENTRYP pfn_glNamedFramebufferReadBuffer) (GLuint, GLenum); extern pfn_glNamedFramebufferReadBuffer fp_glNamedFramebufferReadBuffer; typedef void (APIENTRYP pfn_glInvalidateNamedFramebufferData) (GLuint, GLsizei, const GLenum*); extern pfn_glInvalidateNamedFramebufferData fp_glInvalidateNamedFramebufferData; typedef void (APIENTRYP pfn_glInvalidateNamedFramebufferSubData) (GLuint, GLsizei, const GLenum*, GLint, GLint, GLsizei, GLsizei); extern pfn_glInvalidateNamedFramebufferSubData fp_glInvalidateNamedFramebufferSubData; typedef void (APIENTRYP pfn_glClearNamedFramebufferiv) (GLuint, GLenum, GLint, const GLint*); extern pfn_glClearNamedFramebufferiv fp_glClearNamedFramebufferiv; typedef void (APIENTRYP pfn_glClearNamedFramebufferuiv) (GLuint, GLenum, GLint, const GLuint*); extern pfn_glClearNamedFramebufferuiv fp_glClearNamedFramebufferuiv; typedef void (APIENTRYP pfn_glClearNamedFramebufferfv) (GLuint, GLenum, GLint, const GLfloat*); extern pfn_glClearNamedFramebufferfv fp_glClearNamedFramebufferfv; typedef void (APIENTRYP pfn_glClearNamedFramebufferfi) (GLuint, GLenum, GLint, GLfloat, GLint); extern pfn_glClearNamedFramebufferfi fp_glClearNamedFramebufferfi; typedef void (APIENTRYP pfn_glBlitNamedFramebuffer) (GLuint, GLuint, GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLbitfield, GLenum); extern pfn_glBlitNamedFramebuffer fp_glBlitNamedFramebuffer; typedef GLenum (APIENTRYP pfn_glCheckNamedFramebufferStatus) (GLuint, GLenum); extern pfn_glCheckNamedFramebufferStatus fp_glCheckNamedFramebufferStatus; typedef void (APIENTRYP pfn_glGetNamedFramebufferParameteriv) (GLuint, GLenum, GLint*); extern pfn_glGetNamedFramebufferParameteriv fp_glGetNamedFramebufferParameteriv; typedef void (APIENTRYP pfn_glGetNamedFramebufferAttachmentParameteriv) (GLuint, GLenum, GLenum, GLint*); extern pfn_glGetNamedFramebufferAttachmentParameteriv fp_glGetNamedFramebufferAttachmentParameteriv; typedef void (APIENTRYP pfn_glCreateRenderbuffers) (GLsizei, GLuint*); extern pfn_glCreateRenderbuffers fp_glCreateRenderbuffers; typedef void (APIENTRYP pfn_glNamedRenderbufferStorage) (GLuint, GLenum, GLsizei, GLsizei); extern pfn_glNamedRenderbufferStorage fp_glNamedRenderbufferStorage; typedef void (APIENTRYP pfn_glNamedRenderbufferStorageMultisample) (GLuint, GLsizei, GLenum, GLsizei, GLsizei); extern pfn_glNamedRenderbufferStorageMultisample fp_glNamedRenderbufferStorageMultisample; typedef void (APIENTRYP pfn_glGetNamedRenderbufferParameteriv) (GLuint, GLenum, GLint*); extern pfn_glGetNamedRenderbufferParameteriv fp_glGetNamedRenderbufferParameteriv; typedef void (APIENTRYP pfn_glCreateTextures) (GLenum, GLsizei, GLuint*); extern pfn_glCreateTextures fp_glCreateTextures; typedef void (APIENTRYP pfn_glTextureBuffer) (GLuint, GLenum, GLuint); extern pfn_glTextureBuffer fp_glTextureBuffer; typedef void (APIENTRYP pfn_glTextureBufferRange) (GLuint, GLenum, GLuint, GLintptr, GLsizeiptr); extern pfn_glTextureBufferRange fp_glTextureBufferRange; typedef void (APIENTRYP pfn_glTextureStorage1D) (GLuint, GLsizei, GLenum, GLsizei); extern pfn_glTextureStorage1D fp_glTextureStorage1D; typedef void (APIENTRYP pfn_glTextureStorage2D) (GLuint, GLsizei, GLenum, GLsizei, GLsizei); extern pfn_glTextureStorage2D fp_glTextureStorage2D; typedef void (APIENTRYP pfn_glTextureStorage3D) (GLuint, GLsizei, GLenum, GLsizei, GLsizei, GLsizei); extern pfn_glTextureStorage3D fp_glTextureStorage3D; typedef void (APIENTRYP pfn_glTextureStorage2DMultisample) (GLuint, GLsizei, GLenum, GLsizei, GLsizei, GLboolean); extern pfn_glTextureStorage2DMultisample fp_glTextureStorage2DMultisample; typedef void (APIENTRYP pfn_glTextureStorage3DMultisample) (GLuint, GLsizei, GLenum, GLsizei, GLsizei, GLsizei, GLboolean); extern pfn_glTextureStorage3DMultisample fp_glTextureStorage3DMultisample; typedef void (APIENTRYP pfn_glTextureSubImage1D) (GLuint, GLint, GLint, GLsizei, GLenum, GLenum, const void*); extern pfn_glTextureSubImage1D fp_glTextureSubImage1D; typedef void (APIENTRYP pfn_glTextureSubImage2D) (GLuint, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, const void*); extern pfn_glTextureSubImage2D fp_glTextureSubImage2D; typedef void (APIENTRYP pfn_glTextureSubImage3D) (GLuint, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const void*); extern pfn_glTextureSubImage3D fp_glTextureSubImage3D; typedef void (APIENTRYP pfn_glCompressedTextureSubImage1D) (GLuint, GLint, GLint, GLsizei, GLenum, GLsizei, const void*); extern pfn_glCompressedTextureSubImage1D fp_glCompressedTextureSubImage1D; typedef void (APIENTRYP pfn_glCompressedTextureSubImage2D) (GLuint, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const void*); extern pfn_glCompressedTextureSubImage2D fp_glCompressedTextureSubImage2D; typedef void (APIENTRYP pfn_glCompressedTextureSubImage3D) (GLuint, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, const void*); extern pfn_glCompressedTextureSubImage3D fp_glCompressedTextureSubImage3D; typedef void (APIENTRYP pfn_glCopyTextureSubImage1D) (GLuint, GLint, GLint, GLint, GLint, GLsizei); extern pfn_glCopyTextureSubImage1D fp_glCopyTextureSubImage1D; typedef void (APIENTRYP pfn_glCopyTextureSubImage2D) (GLuint, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei); extern pfn_glCopyTextureSubImage2D fp_glCopyTextureSubImage2D; typedef void (APIENTRYP pfn_glCopyTextureSubImage3D) (GLuint, GLint, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei); extern pfn_glCopyTextureSubImage3D fp_glCopyTextureSubImage3D; typedef void (APIENTRYP pfn_glTextureParameterf) (GLuint, GLenum, GLfloat); extern pfn_glTextureParameterf fp_glTextureParameterf; typedef void (APIENTRYP pfn_glTextureParameterfv) (GLuint, GLenum, const GLfloat*); extern pfn_glTextureParameterfv fp_glTextureParameterfv; typedef void (APIENTRYP pfn_glTextureParameteri) (GLuint, GLenum, GLint); extern pfn_glTextureParameteri fp_glTextureParameteri; typedef void (APIENTRYP pfn_glTextureParameterIiv) (GLuint, GLenum, const GLint*); extern pfn_glTextureParameterIiv fp_glTextureParameterIiv; typedef void (APIENTRYP pfn_glTextureParameterIuiv) (GLuint, GLenum, const GLuint*); extern pfn_glTextureParameterIuiv fp_glTextureParameterIuiv; typedef void (APIENTRYP pfn_glTextureParameteriv) (GLuint, GLenum, const GLint*); extern pfn_glTextureParameteriv fp_glTextureParameteriv; typedef void (APIENTRYP pfn_glGenerateTextureMipmap) (GLuint); extern pfn_glGenerateTextureMipmap fp_glGenerateTextureMipmap; typedef void (APIENTRYP pfn_glBindTextureUnit) (GLuint, GLuint); extern pfn_glBindTextureUnit fp_glBindTextureUnit; typedef void (APIENTRYP pfn_glGetTextureImage) (GLuint, GLint, GLenum, GLenum, GLsizei, void*); extern pfn_glGetTextureImage fp_glGetTextureImage; typedef void (APIENTRYP pfn_glGetCompressedTextureImage) (GLuint, GLint, GLsizei, void*); extern pfn_glGetCompressedTextureImage fp_glGetCompressedTextureImage; typedef void (APIENTRYP pfn_glGetTextureLevelParameterfv) (GLuint, GLint, GLenum, GLfloat*); extern pfn_glGetTextureLevelParameterfv fp_glGetTextureLevelParameterfv; typedef void (APIENTRYP pfn_glGetTextureLevelParameteriv) (GLuint, GLint, GLenum, GLint*); extern pfn_glGetTextureLevelParameteriv fp_glGetTextureLevelParameteriv; typedef void (APIENTRYP pfn_glGetTextureParameterfv) (GLuint, GLenum, GLfloat*); extern pfn_glGetTextureParameterfv fp_glGetTextureParameterfv; typedef void (APIENTRYP pfn_glGetTextureParameterIiv) (GLuint, GLenum, GLint*); extern pfn_glGetTextureParameterIiv fp_glGetTextureParameterIiv; typedef void (APIENTRYP pfn_glGetTextureParameterIuiv) (GLuint, GLenum, GLuint*); extern pfn_glGetTextureParameterIuiv fp_glGetTextureParameterIuiv; typedef void (APIENTRYP pfn_glGetTextureParameteriv) (GLuint, GLenum, GLint*); extern pfn_glGetTextureParameteriv fp_glGetTextureParameteriv; typedef void (APIENTRYP pfn_glCreateVertexArrays) (GLsizei, GLuint*); extern pfn_glCreateVertexArrays fp_glCreateVertexArrays; typedef void (APIENTRYP pfn_glDisableVertexArrayAttrib) (GLuint, GLuint); extern pfn_glDisableVertexArrayAttrib fp_glDisableVertexArrayAttrib; typedef void (APIENTRYP pfn_glEnableVertexArrayAttrib) (GLuint, GLuint); extern pfn_glEnableVertexArrayAttrib fp_glEnableVertexArrayAttrib; typedef void (APIENTRYP pfn_glVertexArrayElementBuffer) (GLuint, GLuint); extern pfn_glVertexArrayElementBuffer fp_glVertexArrayElementBuffer; typedef void (APIENTRYP pfn_glVertexArrayVertexBuffer) (GLuint, GLuint, GLuint, GLintptr, GLsizei); extern pfn_glVertexArrayVertexBuffer fp_glVertexArrayVertexBuffer; typedef void (APIENTRYP pfn_glVertexArrayVertexBuffers) (GLuint, GLuint, GLsizei, const GLuint*, const GLintptr*, const GLsizei*); extern pfn_glVertexArrayVertexBuffers fp_glVertexArrayVertexBuffers; typedef void (APIENTRYP pfn_glVertexArrayAttribBinding) (GLuint, GLuint, GLuint); extern pfn_glVertexArrayAttribBinding fp_glVertexArrayAttribBinding; typedef void (APIENTRYP pfn_glVertexArrayAttribFormat) (GLuint, GLuint, GLint, GLenum, GLboolean, GLuint); extern pfn_glVertexArrayAttribFormat fp_glVertexArrayAttribFormat; typedef void (APIENTRYP pfn_glVertexArrayAttribIFormat) (GLuint, GLuint, GLint, GLenum, GLuint); extern pfn_glVertexArrayAttribIFormat fp_glVertexArrayAttribIFormat; typedef void (APIENTRYP pfn_glVertexArrayAttribLFormat) (GLuint, GLuint, GLint, GLenum, GLuint); extern pfn_glVertexArrayAttribLFormat fp_glVertexArrayAttribLFormat; typedef void (APIENTRYP pfn_glVertexArrayBindingDivisor) (GLuint, GLuint, GLuint); extern pfn_glVertexArrayBindingDivisor fp_glVertexArrayBindingDivisor; typedef void (APIENTRYP pfn_glGetVertexArrayiv) (GLuint, GLenum, GLint*); extern pfn_glGetVertexArrayiv fp_glGetVertexArrayiv; typedef void (APIENTRYP pfn_glGetVertexArrayIndexediv) (GLuint, GLuint, GLenum, GLint*); extern pfn_glGetVertexArrayIndexediv fp_glGetVertexArrayIndexediv; typedef void (APIENTRYP pfn_glGetVertexArrayIndexed64iv) (GLuint, GLuint, GLenum, GLint64*); extern pfn_glGetVertexArrayIndexed64iv fp_glGetVertexArrayIndexed64iv; typedef void (APIENTRYP pfn_glCreateSamplers) (GLsizei, GLuint*); extern pfn_glCreateSamplers fp_glCreateSamplers; typedef void (APIENTRYP pfn_glCreateProgramPipelines) (GLsizei, GLuint*); extern pfn_glCreateProgramPipelines fp_glCreateProgramPipelines; typedef void (APIENTRYP pfn_glCreateQueries) (GLenum, GLsizei, GLuint*); extern pfn_glCreateQueries fp_glCreateQueries; typedef void (APIENTRYP pfn_glGetQueryBufferObjecti64v) (GLuint, GLuint, GLenum, GLintptr); extern pfn_glGetQueryBufferObjecti64v fp_glGetQueryBufferObjecti64v; typedef void (APIENTRYP pfn_glGetQueryBufferObjectiv) (GLuint, GLuint, GLenum, GLintptr); extern pfn_glGetQueryBufferObjectiv fp_glGetQueryBufferObjectiv; typedef void (APIENTRYP pfn_glGetQueryBufferObjectui64v) (GLuint, GLuint, GLenum, GLintptr); extern pfn_glGetQueryBufferObjectui64v fp_glGetQueryBufferObjectui64v; typedef void (APIENTRYP pfn_glGetQueryBufferObjectuiv) (GLuint, GLuint, GLenum, GLintptr); extern pfn_glGetQueryBufferObjectuiv fp_glGetQueryBufferObjectuiv; typedef void (APIENTRYP pfn_glMemoryBarrierByRegion) (GLbitfield); extern pfn_glMemoryBarrierByRegion fp_glMemoryBarrierByRegion; typedef void (APIENTRYP pfn_glGetTextureSubImage) (GLuint, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, GLsizei, void*); extern pfn_glGetTextureSubImage fp_glGetTextureSubImage; typedef void (APIENTRYP pfn_glGetCompressedTextureSubImage) (GLuint, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLsizei, void*); extern pfn_glGetCompressedTextureSubImage fp_glGetCompressedTextureSubImage; typedef GLenum (APIENTRYP pfn_glGetGraphicsResetStatus) (); extern pfn_glGetGraphicsResetStatus fp_glGetGraphicsResetStatus; typedef void (APIENTRYP pfn_glGetnCompressedTexImage) (GLenum, GLint, GLsizei, void*); extern pfn_glGetnCompressedTexImage fp_glGetnCompressedTexImage; typedef void (APIENTRYP pfn_glGetnTexImage) (GLenum, GLint, GLenum, GLenum, GLsizei, void*); extern pfn_glGetnTexImage fp_glGetnTexImage; typedef void (APIENTRYP pfn_glGetnUniformdv) (GLuint, GLint, GLsizei, GLdouble*); extern pfn_glGetnUniformdv fp_glGetnUniformdv; typedef void (APIENTRYP pfn_glGetnUniformfv) (GLuint, GLint, GLsizei, GLfloat*); extern pfn_glGetnUniformfv fp_glGetnUniformfv; typedef void (APIENTRYP pfn_glGetnUniformiv) (GLuint, GLint, GLsizei, GLint*); extern pfn_glGetnUniformiv fp_glGetnUniformiv; typedef void (APIENTRYP pfn_glGetnUniformuiv) (GLuint, GLint, GLsizei, GLuint*); extern pfn_glGetnUniformuiv fp_glGetnUniformuiv; typedef void (APIENTRYP pfn_glReadnPixels) (GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, GLsizei, void*); extern pfn_glReadnPixels fp_glReadnPixels; typedef void (APIENTRYP pfn_glGetnMapdv) (GLenum, GLenum, GLsizei, GLdouble*); extern pfn_glGetnMapdv fp_glGetnMapdv; typedef void (APIENTRYP pfn_glGetnMapfv) (GLenum, GLenum, GLsizei, GLfloat*); extern pfn_glGetnMapfv fp_glGetnMapfv; typedef void (APIENTRYP pfn_glGetnMapiv) (GLenum, GLenum, GLsizei, GLint*); extern pfn_glGetnMapiv fp_glGetnMapiv; typedef void (APIENTRYP pfn_glGetnPixelMapfv) (GLenum, GLsizei, GLfloat*); extern pfn_glGetnPixelMapfv fp_glGetnPixelMapfv; typedef void (APIENTRYP pfn_glGetnPixelMapuiv) (GLenum, GLsizei, GLuint*); extern pfn_glGetnPixelMapuiv fp_glGetnPixelMapuiv; typedef void (APIENTRYP pfn_glGetnPixelMapusv) (GLenum, GLsizei, GLushort*); extern pfn_glGetnPixelMapusv fp_glGetnPixelMapusv; typedef void (APIENTRYP pfn_glGetnPolygonStipple) (GLsizei, GLubyte*); extern pfn_glGetnPolygonStipple fp_glGetnPolygonStipple; typedef void (APIENTRYP pfn_glGetnColorTable) (GLenum, GLenum, GLenum, GLsizei, void*); extern pfn_glGetnColorTable fp_glGetnColorTable; typedef void (APIENTRYP pfn_glGetnConvolutionFilter) (GLenum, GLenum, GLenum, GLsizei, void*); extern pfn_glGetnConvolutionFilter fp_glGetnConvolutionFilter; typedef void (APIENTRYP pfn_glGetnSeparableFilter) (GLenum, GLenum, GLenum, GLsizei, void*, GLsizei, void*, void*); extern pfn_glGetnSeparableFilter fp_glGetnSeparableFilter; typedef void (APIENTRYP pfn_glGetnHistogram) (GLenum, GLboolean, GLenum, GLenum, GLsizei, void*); extern pfn_glGetnHistogram fp_glGetnHistogram; typedef void (APIENTRYP pfn_glGetnMinmax) (GLenum, GLboolean, GLenum, GLenum, GLsizei, void*); extern pfn_glGetnMinmax fp_glGetnMinmax; typedef void (APIENTRYP pfn_glTextureBarrier) (); extern pfn_glTextureBarrier fp_glTextureBarrier; /* GL_ES_VERSION_2_0 */ extern GLboolean GLAD_ES_VERSION_2_0; #define GL_BLEND_EQUATION 0x8009 #define GL_BLEND_COLOR 0x8005 #define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS 0x8CD9 /* GL_ES_VERSION_3_0 */ extern GLboolean GLAD_ES_VERSION_3_0; /* GL_ES_VERSION_3_1 */ extern GLboolean GLAD_ES_VERSION_3_1; /* GL_ES_VERSION_3_2 */ extern GLboolean GLAD_ES_VERSION_3_2; #define GL_MULTISAMPLE_LINE_WIDTH_RANGE 0x9381 #define GL_MULTISAMPLE_LINE_WIDTH_GRANULARITY 0x9382 #define GL_MULTIPLY 0x9294 #define GL_SCREEN 0x9295 #define GL_OVERLAY 0x9296 #define GL_DARKEN 0x9297 #define GL_LIGHTEN 0x9298 #define GL_COLORDODGE 0x9299 #define GL_COLORBURN 0x929A #define GL_HARDLIGHT 0x929B #define GL_SOFTLIGHT 0x929C #define GL_DIFFERENCE 0x929E #define GL_EXCLUSION 0x92A0 #define GL_HSL_HUE 0x92AD #define GL_HSL_SATURATION 0x92AE #define GL_HSL_COLOR 0x92AF #define GL_HSL_LUMINOSITY 0x92B0 #define GL_PRIMITIVE_BOUNDING_BOX 0x92BE #define GL_COMPRESSED_RGBA_ASTC_4x4 0x93B0 #define GL_COMPRESSED_RGBA_ASTC_5x4 0x93B1 #define GL_COMPRESSED_RGBA_ASTC_5x5 0x93B2 #define GL_COMPRESSED_RGBA_ASTC_6x5 0x93B3 #define GL_COMPRESSED_RGBA_ASTC_6x6 0x93B4 #define GL_COMPRESSED_RGBA_ASTC_8x5 0x93B5 #define GL_COMPRESSED_RGBA_ASTC_8x6 0x93B6 #define GL_COMPRESSED_RGBA_ASTC_8x8 0x93B7 #define GL_COMPRESSED_RGBA_ASTC_10x5 0x93B8 #define GL_COMPRESSED_RGBA_ASTC_10x6 0x93B9 #define GL_COMPRESSED_RGBA_ASTC_10x8 0x93BA #define GL_COMPRESSED_RGBA_ASTC_10x10 0x93BB #define GL_COMPRESSED_RGBA_ASTC_12x10 0x93BC #define GL_COMPRESSED_RGBA_ASTC_12x12 0x93BD #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4 0x93D0 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4 0x93D1 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5 0x93D2 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5 0x93D3 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6 0x93D4 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5 0x93D5 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6 0x93D6 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8 0x93D7 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5 0x93D8 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6 0x93D9 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8 0x93DA #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10 0x93DB #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10 0x93DC #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12 0x93DD typedef void (APIENTRYP pfn_glBlendBarrier) (); extern pfn_glBlendBarrier fp_glBlendBarrier; typedef void (APIENTRYP pfn_glPrimitiveBoundingBox) (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat); extern pfn_glPrimitiveBoundingBox fp_glPrimitiveBoundingBox; /* GL_KHR_blend_equation_advanced */ extern GLboolean GLAD_KHR_blend_equation_advanced; #define GL_MULTIPLY_KHR 0x9294 #define GL_SCREEN_KHR 0x9295 #define GL_OVERLAY_KHR 0x9296 #define GL_DARKEN_KHR 0x9297 #define GL_LIGHTEN_KHR 0x9298 #define GL_COLORDODGE_KHR 0x9299 #define GL_COLORBURN_KHR 0x929A #define GL_HARDLIGHT_KHR 0x929B #define GL_SOFTLIGHT_KHR 0x929C #define GL_DIFFERENCE_KHR 0x929E #define GL_EXCLUSION_KHR 0x92A0 #define GL_HSL_HUE_KHR 0x92AD #define GL_HSL_SATURATION_KHR 0x92AE #define GL_HSL_COLOR_KHR 0x92AF #define GL_HSL_LUMINOSITY_KHR 0x92B0 typedef void (APIENTRYP pfn_glBlendBarrierKHR) (); extern pfn_glBlendBarrierKHR fp_glBlendBarrierKHR; /* GL_KHR_blend_equation_advanced_coherent */ extern GLboolean GLAD_KHR_blend_equation_advanced_coherent; #define GL_BLEND_ADVANCED_COHERENT_KHR 0x9285 /* GL_KHR_context_flush_control */ extern GLboolean GLAD_KHR_context_flush_control; #define GL_CONTEXT_RELEASE_BEHAVIOR_KHR 0x82FB #define GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH_KHR 0x82FC /* GL_KHR_debug */ extern GLboolean GLAD_KHR_debug; #define GL_DEBUG_OUTPUT_SYNCHRONOUS_KHR 0x8242 #define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_KHR 0x8243 #define GL_DEBUG_CALLBACK_FUNCTION_KHR 0x8244 #define GL_DEBUG_CALLBACK_USER_PARAM_KHR 0x8245 #define GL_DEBUG_SOURCE_API_KHR 0x8246 #define GL_DEBUG_SOURCE_WINDOW_SYSTEM_KHR 0x8247 #define GL_DEBUG_SOURCE_SHADER_COMPILER_KHR 0x8248 #define GL_DEBUG_SOURCE_THIRD_PARTY_KHR 0x8249 #define GL_DEBUG_SOURCE_APPLICATION_KHR 0x824A #define GL_DEBUG_SOURCE_OTHER_KHR 0x824B #define GL_DEBUG_TYPE_ERROR_KHR 0x824C #define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_KHR 0x824D #define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_KHR 0x824E #define GL_DEBUG_TYPE_PORTABILITY_KHR 0x824F #define GL_DEBUG_TYPE_PERFORMANCE_KHR 0x8250 #define GL_DEBUG_TYPE_OTHER_KHR 0x8251 #define GL_DEBUG_TYPE_MARKER_KHR 0x8268 #define GL_DEBUG_TYPE_PUSH_GROUP_KHR 0x8269 #define GL_DEBUG_TYPE_POP_GROUP_KHR 0x826A #define GL_DEBUG_SEVERITY_NOTIFICATION_KHR 0x826B #define GL_MAX_DEBUG_GROUP_STACK_DEPTH_KHR 0x826C #define GL_DEBUG_GROUP_STACK_DEPTH_KHR 0x826D #define GL_BUFFER_KHR 0x82E0 #define GL_SHADER_KHR 0x82E1 #define GL_PROGRAM_KHR 0x82E2 #define GL_VERTEX_ARRAY_KHR 0x8074 #define GL_QUERY_KHR 0x82E3 #define GL_PROGRAM_PIPELINE_KHR 0x82E4 #define GL_SAMPLER_KHR 0x82E6 #define GL_MAX_LABEL_LENGTH_KHR 0x82E8 #define GL_MAX_DEBUG_MESSAGE_LENGTH_KHR 0x9143 #define GL_MAX_DEBUG_LOGGED_MESSAGES_KHR 0x9144 #define GL_DEBUG_LOGGED_MESSAGES_KHR 0x9145 #define GL_DEBUG_SEVERITY_HIGH_KHR 0x9146 #define GL_DEBUG_SEVERITY_MEDIUM_KHR 0x9147 #define GL_DEBUG_SEVERITY_LOW_KHR 0x9148 #define GL_DEBUG_OUTPUT_KHR 0x92E0 #define GL_CONTEXT_FLAG_DEBUG_BIT_KHR 0x00000002 #define GL_STACK_OVERFLOW_KHR 0x0503 #define GL_STACK_UNDERFLOW_KHR 0x0504 typedef void (APIENTRYP pfn_glDebugMessageControlKHR) (GLenum, GLenum, GLenum, GLsizei, const GLuint*, GLboolean); extern pfn_glDebugMessageControlKHR fp_glDebugMessageControlKHR; typedef void (APIENTRYP pfn_glDebugMessageInsertKHR) (GLenum, GLenum, GLuint, GLenum, GLsizei, const GLchar*); extern pfn_glDebugMessageInsertKHR fp_glDebugMessageInsertKHR; typedef void (APIENTRYP pfn_glDebugMessageCallbackKHR) (GLDEBUGPROCKHR, const void*); extern pfn_glDebugMessageCallbackKHR fp_glDebugMessageCallbackKHR; typedef GLuint (APIENTRYP pfn_glGetDebugMessageLogKHR) (GLuint, GLsizei, GLenum*, GLenum*, GLuint*, GLenum*, GLsizei*, GLchar*); extern pfn_glGetDebugMessageLogKHR fp_glGetDebugMessageLogKHR; typedef void (APIENTRYP pfn_glPushDebugGroupKHR) (GLenum, GLuint, GLsizei, const GLchar*); extern pfn_glPushDebugGroupKHR fp_glPushDebugGroupKHR; typedef void (APIENTRYP pfn_glPopDebugGroupKHR) (); extern pfn_glPopDebugGroupKHR fp_glPopDebugGroupKHR; typedef void (APIENTRYP pfn_glObjectLabelKHR) (GLenum, GLuint, GLsizei, const GLchar*); extern pfn_glObjectLabelKHR fp_glObjectLabelKHR; typedef void (APIENTRYP pfn_glGetObjectLabelKHR) (GLenum, GLuint, GLsizei, GLsizei*, GLchar*); extern pfn_glGetObjectLabelKHR fp_glGetObjectLabelKHR; typedef void (APIENTRYP pfn_glObjectPtrLabelKHR) (const void*, GLsizei, const GLchar*); extern pfn_glObjectPtrLabelKHR fp_glObjectPtrLabelKHR; typedef void (APIENTRYP pfn_glGetObjectPtrLabelKHR) (const void*, GLsizei, GLsizei*, GLchar*); extern pfn_glGetObjectPtrLabelKHR fp_glGetObjectPtrLabelKHR; typedef void (APIENTRYP pfn_glGetPointervKHR) (GLenum, void**); extern pfn_glGetPointervKHR fp_glGetPointervKHR; /* GL_KHR_no_error */ extern GLboolean GLAD_KHR_no_error; #define GL_CONTEXT_FLAG_NO_ERROR_BIT_KHR 0x00000008 /* GL_KHR_robust_buffer_access_behavior */ extern GLboolean GLAD_KHR_robust_buffer_access_behavior; /* GL_KHR_robustness */ extern GLboolean GLAD_KHR_robustness; #define GL_CONTEXT_ROBUST_ACCESS 0x90F3 #define GL_CONTEXT_ROBUST_ACCESS_KHR 0x90F3 #define GL_LOSE_CONTEXT_ON_RESET_KHR 0x8252 #define GL_GUILTY_CONTEXT_RESET_KHR 0x8253 #define GL_INNOCENT_CONTEXT_RESET_KHR 0x8254 #define GL_UNKNOWN_CONTEXT_RESET_KHR 0x8255 #define GL_RESET_NOTIFICATION_STRATEGY_KHR 0x8256 #define GL_NO_RESET_NOTIFICATION_KHR 0x8261 #define GL_CONTEXT_LOST_KHR 0x0507 typedef GLenum (APIENTRYP pfn_glGetGraphicsResetStatusKHR) (); extern pfn_glGetGraphicsResetStatusKHR fp_glGetGraphicsResetStatusKHR; typedef void (APIENTRYP pfn_glReadnPixelsKHR) (GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, GLsizei, void*); extern pfn_glReadnPixelsKHR fp_glReadnPixelsKHR; typedef void (APIENTRYP pfn_glGetnUniformfvKHR) (GLuint, GLint, GLsizei, GLfloat*); extern pfn_glGetnUniformfvKHR fp_glGetnUniformfvKHR; typedef void (APIENTRYP pfn_glGetnUniformivKHR) (GLuint, GLint, GLsizei, GLint*); extern pfn_glGetnUniformivKHR fp_glGetnUniformivKHR; typedef void (APIENTRYP pfn_glGetnUniformuivKHR) (GLuint, GLint, GLsizei, GLuint*); extern pfn_glGetnUniformuivKHR fp_glGetnUniformuivKHR; /* GL_KHR_texture_compression_astc_hdr */ extern GLboolean GLAD_KHR_texture_compression_astc_hdr; #define GL_COMPRESSED_RGBA_ASTC_4x4_KHR 0x93B0 #define GL_COMPRESSED_RGBA_ASTC_5x4_KHR 0x93B1 #define GL_COMPRESSED_RGBA_ASTC_5x5_KHR 0x93B2 #define GL_COMPRESSED_RGBA_ASTC_6x5_KHR 0x93B3 #define GL_COMPRESSED_RGBA_ASTC_6x6_KHR 0x93B4 #define GL_COMPRESSED_RGBA_ASTC_8x5_KHR 0x93B5 #define GL_COMPRESSED_RGBA_ASTC_8x6_KHR 0x93B6 #define GL_COMPRESSED_RGBA_ASTC_8x8_KHR 0x93B7 #define GL_COMPRESSED_RGBA_ASTC_10x5_KHR 0x93B8 #define GL_COMPRESSED_RGBA_ASTC_10x6_KHR 0x93B9 #define GL_COMPRESSED_RGBA_ASTC_10x8_KHR 0x93BA #define GL_COMPRESSED_RGBA_ASTC_10x10_KHR 0x93BB #define GL_COMPRESSED_RGBA_ASTC_12x10_KHR 0x93BC #define GL_COMPRESSED_RGBA_ASTC_12x12_KHR 0x93BD #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR 0x93D0 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR 0x93D1 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR 0x93D2 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR 0x93D3 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR 0x93D4 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR 0x93D5 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR 0x93D6 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR 0x93D7 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR 0x93D8 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR 0x93D9 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR 0x93DA #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR 0x93DB #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR 0x93DC #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR 0x93DD /* GL_KHR_texture_compression_astc_ldr */ extern GLboolean GLAD_KHR_texture_compression_astc_ldr; /* GL_KHR_texture_compression_astc_sliced_3d */ extern GLboolean GLAD_KHR_texture_compression_astc_sliced_3d; /* GL_ARB_arrays_of_arrays */ extern GLboolean GLAD_ARB_arrays_of_arrays; /* GL_ARB_base_instance */ extern GLboolean GLAD_ARB_base_instance; /* GL_ARB_bindless_texture */ extern GLboolean GLAD_ARB_bindless_texture; #define GL_UNSIGNED_INT64_ARB 0x140F typedef GLuint64 (APIENTRYP pfn_glGetTextureHandleARB) (GLuint); extern pfn_glGetTextureHandleARB fp_glGetTextureHandleARB; typedef GLuint64 (APIENTRYP pfn_glGetTextureSamplerHandleARB) (GLuint, GLuint); extern pfn_glGetTextureSamplerHandleARB fp_glGetTextureSamplerHandleARB; typedef void (APIENTRYP pfn_glMakeTextureHandleResidentARB) (GLuint64); extern pfn_glMakeTextureHandleResidentARB fp_glMakeTextureHandleResidentARB; typedef void (APIENTRYP pfn_glMakeTextureHandleNonResidentARB) (GLuint64); extern pfn_glMakeTextureHandleNonResidentARB fp_glMakeTextureHandleNonResidentARB; typedef GLuint64 (APIENTRYP pfn_glGetImageHandleARB) (GLuint, GLint, GLboolean, GLint, GLenum); extern pfn_glGetImageHandleARB fp_glGetImageHandleARB; typedef void (APIENTRYP pfn_glMakeImageHandleResidentARB) (GLuint64, GLenum); extern pfn_glMakeImageHandleResidentARB fp_glMakeImageHandleResidentARB; typedef void (APIENTRYP pfn_glMakeImageHandleNonResidentARB) (GLuint64); extern pfn_glMakeImageHandleNonResidentARB fp_glMakeImageHandleNonResidentARB; typedef void (APIENTRYP pfn_glUniformHandleui64ARB) (GLint, GLuint64); extern pfn_glUniformHandleui64ARB fp_glUniformHandleui64ARB; typedef void (APIENTRYP pfn_glUniformHandleui64vARB) (GLint, GLsizei, const GLuint64*); extern pfn_glUniformHandleui64vARB fp_glUniformHandleui64vARB; typedef void (APIENTRYP pfn_glProgramUniformHandleui64ARB) (GLuint, GLint, GLuint64); extern pfn_glProgramUniformHandleui64ARB fp_glProgramUniformHandleui64ARB; typedef void (APIENTRYP pfn_glProgramUniformHandleui64vARB) (GLuint, GLint, GLsizei, const GLuint64*); extern pfn_glProgramUniformHandleui64vARB fp_glProgramUniformHandleui64vARB; typedef GLboolean (APIENTRYP pfn_glIsTextureHandleResidentARB) (GLuint64); extern pfn_glIsTextureHandleResidentARB fp_glIsTextureHandleResidentARB; typedef GLboolean (APIENTRYP pfn_glIsImageHandleResidentARB) (GLuint64); extern pfn_glIsImageHandleResidentARB fp_glIsImageHandleResidentARB; typedef void (APIENTRYP pfn_glVertexAttribL1ui64ARB) (GLuint, GLuint64EXT); extern pfn_glVertexAttribL1ui64ARB fp_glVertexAttribL1ui64ARB; typedef void (APIENTRYP pfn_glVertexAttribL1ui64vARB) (GLuint, const GLuint64EXT*); extern pfn_glVertexAttribL1ui64vARB fp_glVertexAttribL1ui64vARB; typedef void (APIENTRYP pfn_glGetVertexAttribLui64vARB) (GLuint, GLenum, GLuint64EXT*); extern pfn_glGetVertexAttribLui64vARB fp_glGetVertexAttribLui64vARB; /* GL_ARB_blend_func_extended */ extern GLboolean GLAD_ARB_blend_func_extended; /* GL_ARB_buffer_storage */ extern GLboolean GLAD_ARB_buffer_storage; /* GL_ARB_cl_event */ extern GLboolean GLAD_ARB_cl_event; #define GL_SYNC_CL_EVENT_ARB 0x8240 #define GL_SYNC_CL_EVENT_COMPLETE_ARB 0x8241 typedef GLsync (APIENTRYP pfn_glCreateSyncFromCLeventARB) (struct _cl_context*, struct _cl_event*, GLbitfield); extern pfn_glCreateSyncFromCLeventARB fp_glCreateSyncFromCLeventARB; /* GL_ARB_clear_buffer_object */ extern GLboolean GLAD_ARB_clear_buffer_object; /* GL_ARB_clear_texture */ extern GLboolean GLAD_ARB_clear_texture; /* GL_ARB_clip_control */ extern GLboolean GLAD_ARB_clip_control; /* GL_ARB_color_buffer_float */ extern GLboolean GLAD_ARB_color_buffer_float; #define GL_RGBA_FLOAT_MODE_ARB 0x8820 #define GL_CLAMP_VERTEX_COLOR_ARB 0x891A #define GL_CLAMP_FRAGMENT_COLOR_ARB 0x891B #define GL_CLAMP_READ_COLOR_ARB 0x891C #define GL_FIXED_ONLY_ARB 0x891D typedef void (APIENTRYP pfn_glClampColorARB) (GLenum, GLenum); extern pfn_glClampColorARB fp_glClampColorARB; /* GL_ARB_compatibility */ extern GLboolean GLAD_ARB_compatibility; /* GL_ARB_compressed_texture_pixel_storage */ extern GLboolean GLAD_ARB_compressed_texture_pixel_storage; /* GL_ARB_compute_shader */ extern GLboolean GLAD_ARB_compute_shader; /* GL_ARB_compute_variable_group_size */ extern GLboolean GLAD_ARB_compute_variable_group_size; #define GL_MAX_COMPUTE_VARIABLE_GROUP_INVOCATIONS_ARB 0x9344 #define GL_MAX_COMPUTE_FIXED_GROUP_INVOCATIONS_ARB 0x90EB #define GL_MAX_COMPUTE_VARIABLE_GROUP_SIZE_ARB 0x9345 #define GL_MAX_COMPUTE_FIXED_GROUP_SIZE_ARB 0x91BF typedef void (APIENTRYP pfn_glDispatchComputeGroupSizeARB) (GLuint, GLuint, GLuint, GLuint, GLuint, GLuint); extern pfn_glDispatchComputeGroupSizeARB fp_glDispatchComputeGroupSizeARB; /* GL_ARB_conditional_render_inverted */ extern GLboolean GLAD_ARB_conditional_render_inverted; /* GL_ARB_conservative_depth */ extern GLboolean GLAD_ARB_conservative_depth; /* GL_ARB_copy_buffer */ extern GLboolean GLAD_ARB_copy_buffer; /* GL_ARB_copy_image */ extern GLboolean GLAD_ARB_copy_image; /* GL_ARB_cull_distance */ extern GLboolean GLAD_ARB_cull_distance; /* GL_ARB_debug_output */ extern GLboolean GLAD_ARB_debug_output; #define GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB 0x8242 #define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_ARB 0x8243 #define GL_DEBUG_CALLBACK_FUNCTION_ARB 0x8244 #define GL_DEBUG_CALLBACK_USER_PARAM_ARB 0x8245 #define GL_DEBUG_SOURCE_API_ARB 0x8246 #define GL_DEBUG_SOURCE_WINDOW_SYSTEM_ARB 0x8247 #define GL_DEBUG_SOURCE_SHADER_COMPILER_ARB 0x8248 #define GL_DEBUG_SOURCE_THIRD_PARTY_ARB 0x8249 #define GL_DEBUG_SOURCE_APPLICATION_ARB 0x824A #define GL_DEBUG_SOURCE_OTHER_ARB 0x824B #define GL_DEBUG_TYPE_ERROR_ARB 0x824C #define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_ARB 0x824D #define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_ARB 0x824E #define GL_DEBUG_TYPE_PORTABILITY_ARB 0x824F #define GL_DEBUG_TYPE_PERFORMANCE_ARB 0x8250 #define GL_DEBUG_TYPE_OTHER_ARB 0x8251 #define GL_MAX_DEBUG_MESSAGE_LENGTH_ARB 0x9143 #define GL_MAX_DEBUG_LOGGED_MESSAGES_ARB 0x9144 #define GL_DEBUG_LOGGED_MESSAGES_ARB 0x9145 #define GL_DEBUG_SEVERITY_HIGH_ARB 0x9146 #define GL_DEBUG_SEVERITY_MEDIUM_ARB 0x9147 #define GL_DEBUG_SEVERITY_LOW_ARB 0x9148 typedef void (APIENTRYP pfn_glDebugMessageControlARB) (GLenum, GLenum, GLenum, GLsizei, const GLuint*, GLboolean); extern pfn_glDebugMessageControlARB fp_glDebugMessageControlARB; typedef void (APIENTRYP pfn_glDebugMessageInsertARB) (GLenum, GLenum, GLuint, GLenum, GLsizei, const GLchar*); extern pfn_glDebugMessageInsertARB fp_glDebugMessageInsertARB; typedef void (APIENTRYP pfn_glDebugMessageCallbackARB) (GLDEBUGPROCARB, const void*); extern pfn_glDebugMessageCallbackARB fp_glDebugMessageCallbackARB; typedef GLuint (APIENTRYP pfn_glGetDebugMessageLogARB) (GLuint, GLsizei, GLenum*, GLenum*, GLuint*, GLenum*, GLsizei*, GLchar*); extern pfn_glGetDebugMessageLogARB fp_glGetDebugMessageLogARB; /* GL_ARB_depth_buffer_float */ extern GLboolean GLAD_ARB_depth_buffer_float; /* GL_ARB_depth_clamp */ extern GLboolean GLAD_ARB_depth_clamp; /* GL_ARB_derivative_control */ extern GLboolean GLAD_ARB_derivative_control; /* GL_ARB_direct_state_access */ extern GLboolean GLAD_ARB_direct_state_access; /* GL_ARB_draw_buffers_blend */ extern GLboolean GLAD_ARB_draw_buffers_blend; typedef void (APIENTRYP pfn_glBlendEquationiARB) (GLuint, GLenum); extern pfn_glBlendEquationiARB fp_glBlendEquationiARB; typedef void (APIENTRYP pfn_glBlendEquationSeparateiARB) (GLuint, GLenum, GLenum); extern pfn_glBlendEquationSeparateiARB fp_glBlendEquationSeparateiARB; typedef void (APIENTRYP pfn_glBlendFunciARB) (GLuint, GLenum, GLenum); extern pfn_glBlendFunciARB fp_glBlendFunciARB; typedef void (APIENTRYP pfn_glBlendFuncSeparateiARB) (GLuint, GLenum, GLenum, GLenum, GLenum); extern pfn_glBlendFuncSeparateiARB fp_glBlendFuncSeparateiARB; /* GL_ARB_draw_elements_base_vertex */ extern GLboolean GLAD_ARB_draw_elements_base_vertex; /* GL_ARB_draw_indirect */ extern GLboolean GLAD_ARB_draw_indirect; /* GL_ARB_draw_instanced */ extern GLboolean GLAD_ARB_draw_instanced; typedef void (APIENTRYP pfn_glDrawArraysInstancedARB) (GLenum, GLint, GLsizei, GLsizei); extern pfn_glDrawArraysInstancedARB fp_glDrawArraysInstancedARB; typedef void (APIENTRYP pfn_glDrawElementsInstancedARB) (GLenum, GLsizei, GLenum, const void*, GLsizei); extern pfn_glDrawElementsInstancedARB fp_glDrawElementsInstancedARB; /* GL_ARB_enhanced_layouts */ extern GLboolean GLAD_ARB_enhanced_layouts; /* GL_ARB_ES2_compatibility */ extern GLboolean GLAD_ARB_ES2_compatibility; /* GL_ARB_ES3_1_compatibility */ extern GLboolean GLAD_ARB_ES3_1_compatibility; /* GL_ARB_ES3_2_compatibility */ extern GLboolean GLAD_ARB_ES3_2_compatibility; #define GL_PRIMITIVE_BOUNDING_BOX_ARB 0x92BE #define GL_MULTISAMPLE_LINE_WIDTH_RANGE_ARB 0x9381 #define GL_MULTISAMPLE_LINE_WIDTH_GRANULARITY_ARB 0x9382 typedef void (APIENTRYP pfn_glPrimitiveBoundingBoxARB) (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat); extern pfn_glPrimitiveBoundingBoxARB fp_glPrimitiveBoundingBoxARB; /* GL_ARB_ES3_compatibility */ extern GLboolean GLAD_ARB_ES3_compatibility; /* GL_ARB_explicit_attrib_location */ extern GLboolean GLAD_ARB_explicit_attrib_location; /* GL_ARB_explicit_uniform_location */ extern GLboolean GLAD_ARB_explicit_uniform_location; /* GL_ARB_fragment_coord_conventions */ extern GLboolean GLAD_ARB_fragment_coord_conventions; /* GL_ARB_fragment_layer_viewport */ extern GLboolean GLAD_ARB_fragment_layer_viewport; /* GL_ARB_fragment_shader_interlock */ extern GLboolean GLAD_ARB_fragment_shader_interlock; /* GL_ARB_framebuffer_no_attachments */ extern GLboolean GLAD_ARB_framebuffer_no_attachments; /* GL_ARB_framebuffer_object */ extern GLboolean GLAD_ARB_framebuffer_object; /* GL_ARB_framebuffer_sRGB */ extern GLboolean GLAD_ARB_framebuffer_sRGB; /* GL_ARB_geometry_shader4 */ extern GLboolean GLAD_ARB_geometry_shader4; #define GL_LINES_ADJACENCY_ARB 0x000A #define GL_LINE_STRIP_ADJACENCY_ARB 0x000B #define GL_TRIANGLES_ADJACENCY_ARB 0x000C #define GL_TRIANGLE_STRIP_ADJACENCY_ARB 0x000D #define GL_PROGRAM_POINT_SIZE_ARB 0x8642 #define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_ARB 0x8C29 #define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_ARB 0x8DA7 #define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_ARB 0x8DA8 #define GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_ARB 0x8DA9 #define GL_GEOMETRY_SHADER_ARB 0x8DD9 #define GL_GEOMETRY_VERTICES_OUT_ARB 0x8DDA #define GL_GEOMETRY_INPUT_TYPE_ARB 0x8DDB #define GL_GEOMETRY_OUTPUT_TYPE_ARB 0x8DDC #define GL_MAX_GEOMETRY_VARYING_COMPONENTS_ARB 0x8DDD #define GL_MAX_VERTEX_VARYING_COMPONENTS_ARB 0x8DDE #define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_ARB 0x8DDF #define GL_MAX_GEOMETRY_OUTPUT_VERTICES_ARB 0x8DE0 #define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_ARB 0x8DE1 typedef void (APIENTRYP pfn_glProgramParameteriARB) (GLuint, GLenum, GLint); extern pfn_glProgramParameteriARB fp_glProgramParameteriARB; typedef void (APIENTRYP pfn_glFramebufferTextureARB) (GLenum, GLenum, GLuint, GLint); extern pfn_glFramebufferTextureARB fp_glFramebufferTextureARB; typedef void (APIENTRYP pfn_glFramebufferTextureLayerARB) (GLenum, GLenum, GLuint, GLint, GLint); extern pfn_glFramebufferTextureLayerARB fp_glFramebufferTextureLayerARB; typedef void (APIENTRYP pfn_glFramebufferTextureFaceARB) (GLenum, GLenum, GLuint, GLint, GLenum); extern pfn_glFramebufferTextureFaceARB fp_glFramebufferTextureFaceARB; /* GL_ARB_get_program_binary */ extern GLboolean GLAD_ARB_get_program_binary; /* GL_ARB_get_texture_sub_image */ extern GLboolean GLAD_ARB_get_texture_sub_image; /* GL_ARB_gpu_shader5 */ extern GLboolean GLAD_ARB_gpu_shader5; /* GL_ARB_gpu_shader_fp64 */ extern GLboolean GLAD_ARB_gpu_shader_fp64; /* GL_ARB_gpu_shader_int64 */ extern GLboolean GLAD_ARB_gpu_shader_int64; #define GL_INT64_ARB 0x140E #define GL_INT64_VEC2_ARB 0x8FE9 #define GL_INT64_VEC3_ARB 0x8FEA #define GL_INT64_VEC4_ARB 0x8FEB #define GL_UNSIGNED_INT64_VEC2_ARB 0x8FF5 #define GL_UNSIGNED_INT64_VEC3_ARB 0x8FF6 #define GL_UNSIGNED_INT64_VEC4_ARB 0x8FF7 typedef void (APIENTRYP pfn_glUniform1i64ARB) (GLint, GLint64); extern pfn_glUniform1i64ARB fp_glUniform1i64ARB; typedef void (APIENTRYP pfn_glUniform2i64ARB) (GLint, GLint64, GLint64); extern pfn_glUniform2i64ARB fp_glUniform2i64ARB; typedef void (APIENTRYP pfn_glUniform3i64ARB) (GLint, GLint64, GLint64, GLint64); extern pfn_glUniform3i64ARB fp_glUniform3i64ARB; typedef void (APIENTRYP pfn_glUniform4i64ARB) (GLint, GLint64, GLint64, GLint64, GLint64); extern pfn_glUniform4i64ARB fp_glUniform4i64ARB; typedef void (APIENTRYP pfn_glUniform1i64vARB) (GLint, GLsizei, const GLint64*); extern pfn_glUniform1i64vARB fp_glUniform1i64vARB; typedef void (APIENTRYP pfn_glUniform2i64vARB) (GLint, GLsizei, const GLint64*); extern pfn_glUniform2i64vARB fp_glUniform2i64vARB; typedef void (APIENTRYP pfn_glUniform3i64vARB) (GLint, GLsizei, const GLint64*); extern pfn_glUniform3i64vARB fp_glUniform3i64vARB; typedef void (APIENTRYP pfn_glUniform4i64vARB) (GLint, GLsizei, const GLint64*); extern pfn_glUniform4i64vARB fp_glUniform4i64vARB; typedef void (APIENTRYP pfn_glUniform1ui64ARB) (GLint, GLuint64); extern pfn_glUniform1ui64ARB fp_glUniform1ui64ARB; typedef void (APIENTRYP pfn_glUniform2ui64ARB) (GLint, GLuint64, GLuint64); extern pfn_glUniform2ui64ARB fp_glUniform2ui64ARB; typedef void (APIENTRYP pfn_glUniform3ui64ARB) (GLint, GLuint64, GLuint64, GLuint64); extern pfn_glUniform3ui64ARB fp_glUniform3ui64ARB; typedef void (APIENTRYP pfn_glUniform4ui64ARB) (GLint, GLuint64, GLuint64, GLuint64, GLuint64); extern pfn_glUniform4ui64ARB fp_glUniform4ui64ARB; typedef void (APIENTRYP pfn_glUniform1ui64vARB) (GLint, GLsizei, const GLuint64*); extern pfn_glUniform1ui64vARB fp_glUniform1ui64vARB; typedef void (APIENTRYP pfn_glUniform2ui64vARB) (GLint, GLsizei, const GLuint64*); extern pfn_glUniform2ui64vARB fp_glUniform2ui64vARB; typedef void (APIENTRYP pfn_glUniform3ui64vARB) (GLint, GLsizei, const GLuint64*); extern pfn_glUniform3ui64vARB fp_glUniform3ui64vARB; typedef void (APIENTRYP pfn_glUniform4ui64vARB) (GLint, GLsizei, const GLuint64*); extern pfn_glUniform4ui64vARB fp_glUniform4ui64vARB; typedef void (APIENTRYP pfn_glGetUniformi64vARB) (GLuint, GLint, GLint64*); extern pfn_glGetUniformi64vARB fp_glGetUniformi64vARB; typedef void (APIENTRYP pfn_glGetUniformui64vARB) (GLuint, GLint, GLuint64*); extern pfn_glGetUniformui64vARB fp_glGetUniformui64vARB; typedef void (APIENTRYP pfn_glGetnUniformi64vARB) (GLuint, GLint, GLsizei, GLint64*); extern pfn_glGetnUniformi64vARB fp_glGetnUniformi64vARB; typedef void (APIENTRYP pfn_glGetnUniformui64vARB) (GLuint, GLint, GLsizei, GLuint64*); extern pfn_glGetnUniformui64vARB fp_glGetnUniformui64vARB; typedef void (APIENTRYP pfn_glProgramUniform1i64ARB) (GLuint, GLint, GLint64); extern pfn_glProgramUniform1i64ARB fp_glProgramUniform1i64ARB; typedef void (APIENTRYP pfn_glProgramUniform2i64ARB) (GLuint, GLint, GLint64, GLint64); extern pfn_glProgramUniform2i64ARB fp_glProgramUniform2i64ARB; typedef void (APIENTRYP pfn_glProgramUniform3i64ARB) (GLuint, GLint, GLint64, GLint64, GLint64); extern pfn_glProgramUniform3i64ARB fp_glProgramUniform3i64ARB; typedef void (APIENTRYP pfn_glProgramUniform4i64ARB) (GLuint, GLint, GLint64, GLint64, GLint64, GLint64); extern pfn_glProgramUniform4i64ARB fp_glProgramUniform4i64ARB; typedef void (APIENTRYP pfn_glProgramUniform1i64vARB) (GLuint, GLint, GLsizei, const GLint64*); extern pfn_glProgramUniform1i64vARB fp_glProgramUniform1i64vARB; typedef void (APIENTRYP pfn_glProgramUniform2i64vARB) (GLuint, GLint, GLsizei, const GLint64*); extern pfn_glProgramUniform2i64vARB fp_glProgramUniform2i64vARB; typedef void (APIENTRYP pfn_glProgramUniform3i64vARB) (GLuint, GLint, GLsizei, const GLint64*); extern pfn_glProgramUniform3i64vARB fp_glProgramUniform3i64vARB; typedef void (APIENTRYP pfn_glProgramUniform4i64vARB) (GLuint, GLint, GLsizei, const GLint64*); extern pfn_glProgramUniform4i64vARB fp_glProgramUniform4i64vARB; typedef void (APIENTRYP pfn_glProgramUniform1ui64ARB) (GLuint, GLint, GLuint64); extern pfn_glProgramUniform1ui64ARB fp_glProgramUniform1ui64ARB; typedef void (APIENTRYP pfn_glProgramUniform2ui64ARB) (GLuint, GLint, GLuint64, GLuint64); extern pfn_glProgramUniform2ui64ARB fp_glProgramUniform2ui64ARB; typedef void (APIENTRYP pfn_glProgramUniform3ui64ARB) (GLuint, GLint, GLuint64, GLuint64, GLuint64); extern pfn_glProgramUniform3ui64ARB fp_glProgramUniform3ui64ARB; typedef void (APIENTRYP pfn_glProgramUniform4ui64ARB) (GLuint, GLint, GLuint64, GLuint64, GLuint64, GLuint64); extern pfn_glProgramUniform4ui64ARB fp_glProgramUniform4ui64ARB; typedef void (APIENTRYP pfn_glProgramUniform1ui64vARB) (GLuint, GLint, GLsizei, const GLuint64*); extern pfn_glProgramUniform1ui64vARB fp_glProgramUniform1ui64vARB; typedef void (APIENTRYP pfn_glProgramUniform2ui64vARB) (GLuint, GLint, GLsizei, const GLuint64*); extern pfn_glProgramUniform2ui64vARB fp_glProgramUniform2ui64vARB; typedef void (APIENTRYP pfn_glProgramUniform3ui64vARB) (GLuint, GLint, GLsizei, const GLuint64*); extern pfn_glProgramUniform3ui64vARB fp_glProgramUniform3ui64vARB; typedef void (APIENTRYP pfn_glProgramUniform4ui64vARB) (GLuint, GLint, GLsizei, const GLuint64*); extern pfn_glProgramUniform4ui64vARB fp_glProgramUniform4ui64vARB; /* GL_ARB_half_float_pixel */ extern GLboolean GLAD_ARB_half_float_pixel; #define GL_HALF_FLOAT_ARB 0x140B /* GL_ARB_half_float_vertex */ extern GLboolean GLAD_ARB_half_float_vertex; /* GL_ARB_indirect_parameters */ extern GLboolean GLAD_ARB_indirect_parameters; #define GL_PARAMETER_BUFFER_ARB 0x80EE #define GL_PARAMETER_BUFFER_BINDING_ARB 0x80EF typedef void (APIENTRYP pfn_glMultiDrawArraysIndirectCountARB) (GLenum, GLintptr, GLintptr, GLsizei, GLsizei); extern pfn_glMultiDrawArraysIndirectCountARB fp_glMultiDrawArraysIndirectCountARB; typedef void (APIENTRYP pfn_glMultiDrawElementsIndirectCountARB) (GLenum, GLenum, GLintptr, GLintptr, GLsizei, GLsizei); extern pfn_glMultiDrawElementsIndirectCountARB fp_glMultiDrawElementsIndirectCountARB; /* GL_ARB_instanced_arrays */ extern GLboolean GLAD_ARB_instanced_arrays; #define GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ARB 0x88FE typedef void (APIENTRYP pfn_glVertexAttribDivisorARB) (GLuint, GLuint); extern pfn_glVertexAttribDivisorARB fp_glVertexAttribDivisorARB; /* GL_ARB_internalformat_query */ extern GLboolean GLAD_ARB_internalformat_query; /* GL_ARB_internalformat_query2 */ extern GLboolean GLAD_ARB_internalformat_query2; #define GL_SRGB_DECODE_ARB 0x8299 /* GL_ARB_invalidate_subdata */ extern GLboolean GLAD_ARB_invalidate_subdata; /* GL_ARB_map_buffer_alignment */ extern GLboolean GLAD_ARB_map_buffer_alignment; /* GL_ARB_map_buffer_range */ extern GLboolean GLAD_ARB_map_buffer_range; /* GL_ARB_multi_bind */ extern GLboolean GLAD_ARB_multi_bind; /* GL_ARB_multi_draw_indirect */ extern GLboolean GLAD_ARB_multi_draw_indirect; /* GL_ARB_occlusion_query2 */ extern GLboolean GLAD_ARB_occlusion_query2; /* GL_ARB_parallel_shader_compile */ extern GLboolean GLAD_ARB_parallel_shader_compile; #define GL_MAX_SHADER_COMPILER_THREADS_ARB 0x91B0 #define GL_COMPLETION_STATUS_ARB 0x91B1 typedef void (APIENTRYP pfn_glMaxShaderCompilerThreadsARB) (GLuint); extern pfn_glMaxShaderCompilerThreadsARB fp_glMaxShaderCompilerThreadsARB; /* GL_ARB_pipeline_statistics_query */ extern GLboolean GLAD_ARB_pipeline_statistics_query; #define GL_VERTICES_SUBMITTED_ARB 0x82EE #define GL_PRIMITIVES_SUBMITTED_ARB 0x82EF #define GL_VERTEX_SHADER_INVOCATIONS_ARB 0x82F0 #define GL_TESS_CONTROL_SHADER_PATCHES_ARB 0x82F1 #define GL_TESS_EVALUATION_SHADER_INVOCATIONS_ARB 0x82F2 #define GL_GEOMETRY_SHADER_PRIMITIVES_EMITTED_ARB 0x82F3 #define GL_FRAGMENT_SHADER_INVOCATIONS_ARB 0x82F4 #define GL_COMPUTE_SHADER_INVOCATIONS_ARB 0x82F5 #define GL_CLIPPING_INPUT_PRIMITIVES_ARB 0x82F6 #define GL_CLIPPING_OUTPUT_PRIMITIVES_ARB 0x82F7 /* GL_ARB_pixel_buffer_object */ extern GLboolean GLAD_ARB_pixel_buffer_object; #define GL_PIXEL_PACK_BUFFER_ARB 0x88EB #define GL_PIXEL_UNPACK_BUFFER_ARB 0x88EC #define GL_PIXEL_PACK_BUFFER_BINDING_ARB 0x88ED #define GL_PIXEL_UNPACK_BUFFER_BINDING_ARB 0x88EF /* GL_ARB_post_depth_coverage */ extern GLboolean GLAD_ARB_post_depth_coverage; /* GL_ARB_program_interface_query */ extern GLboolean GLAD_ARB_program_interface_query; /* GL_ARB_provoking_vertex */ extern GLboolean GLAD_ARB_provoking_vertex; /* GL_ARB_query_buffer_object */ extern GLboolean GLAD_ARB_query_buffer_object; /* GL_ARB_robust_buffer_access_behavior */ extern GLboolean GLAD_ARB_robust_buffer_access_behavior; /* GL_ARB_robustness */ extern GLboolean GLAD_ARB_robustness; #define GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT_ARB 0x00000004 #define GL_LOSE_CONTEXT_ON_RESET_ARB 0x8252 #define GL_GUILTY_CONTEXT_RESET_ARB 0x8253 #define GL_INNOCENT_CONTEXT_RESET_ARB 0x8254 #define GL_UNKNOWN_CONTEXT_RESET_ARB 0x8255 #define GL_RESET_NOTIFICATION_STRATEGY_ARB 0x8256 #define GL_NO_RESET_NOTIFICATION_ARB 0x8261 typedef GLenum (APIENTRYP pfn_glGetGraphicsResetStatusARB) (); extern pfn_glGetGraphicsResetStatusARB fp_glGetGraphicsResetStatusARB; typedef void (APIENTRYP pfn_glGetnTexImageARB) (GLenum, GLint, GLenum, GLenum, GLsizei, void*); extern pfn_glGetnTexImageARB fp_glGetnTexImageARB; typedef void (APIENTRYP pfn_glReadnPixelsARB) (GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, GLsizei, void*); extern pfn_glReadnPixelsARB fp_glReadnPixelsARB; typedef void (APIENTRYP pfn_glGetnCompressedTexImageARB) (GLenum, GLint, GLsizei, void*); extern pfn_glGetnCompressedTexImageARB fp_glGetnCompressedTexImageARB; typedef void (APIENTRYP pfn_glGetnUniformfvARB) (GLuint, GLint, GLsizei, GLfloat*); extern pfn_glGetnUniformfvARB fp_glGetnUniformfvARB; typedef void (APIENTRYP pfn_glGetnUniformivARB) (GLuint, GLint, GLsizei, GLint*); extern pfn_glGetnUniformivARB fp_glGetnUniformivARB; typedef void (APIENTRYP pfn_glGetnUniformuivARB) (GLuint, GLint, GLsizei, GLuint*); extern pfn_glGetnUniformuivARB fp_glGetnUniformuivARB; typedef void (APIENTRYP pfn_glGetnUniformdvARB) (GLuint, GLint, GLsizei, GLdouble*); extern pfn_glGetnUniformdvARB fp_glGetnUniformdvARB; typedef void (APIENTRYP pfn_glGetnMapdvARB) (GLenum, GLenum, GLsizei, GLdouble*); extern pfn_glGetnMapdvARB fp_glGetnMapdvARB; typedef void (APIENTRYP pfn_glGetnMapfvARB) (GLenum, GLenum, GLsizei, GLfloat*); extern pfn_glGetnMapfvARB fp_glGetnMapfvARB; typedef void (APIENTRYP pfn_glGetnMapivARB) (GLenum, GLenum, GLsizei, GLint*); extern pfn_glGetnMapivARB fp_glGetnMapivARB; typedef void (APIENTRYP pfn_glGetnPixelMapfvARB) (GLenum, GLsizei, GLfloat*); extern pfn_glGetnPixelMapfvARB fp_glGetnPixelMapfvARB; typedef void (APIENTRYP pfn_glGetnPixelMapuivARB) (GLenum, GLsizei, GLuint*); extern pfn_glGetnPixelMapuivARB fp_glGetnPixelMapuivARB; typedef void (APIENTRYP pfn_glGetnPixelMapusvARB) (GLenum, GLsizei, GLushort*); extern pfn_glGetnPixelMapusvARB fp_glGetnPixelMapusvARB; typedef void (APIENTRYP pfn_glGetnPolygonStippleARB) (GLsizei, GLubyte*); extern pfn_glGetnPolygonStippleARB fp_glGetnPolygonStippleARB; typedef void (APIENTRYP pfn_glGetnColorTableARB) (GLenum, GLenum, GLenum, GLsizei, void*); extern pfn_glGetnColorTableARB fp_glGetnColorTableARB; typedef void (APIENTRYP pfn_glGetnConvolutionFilterARB) (GLenum, GLenum, GLenum, GLsizei, void*); extern pfn_glGetnConvolutionFilterARB fp_glGetnConvolutionFilterARB; typedef void (APIENTRYP pfn_glGetnSeparableFilterARB) (GLenum, GLenum, GLenum, GLsizei, void*, GLsizei, void*, void*); extern pfn_glGetnSeparableFilterARB fp_glGetnSeparableFilterARB; typedef void (APIENTRYP pfn_glGetnHistogramARB) (GLenum, GLboolean, GLenum, GLenum, GLsizei, void*); extern pfn_glGetnHistogramARB fp_glGetnHistogramARB; typedef void (APIENTRYP pfn_glGetnMinmaxARB) (GLenum, GLboolean, GLenum, GLenum, GLsizei, void*); extern pfn_glGetnMinmaxARB fp_glGetnMinmaxARB; /* GL_ARB_robustness_isolation */ extern GLboolean GLAD_ARB_robustness_isolation; /* GL_ARB_sample_locations */ extern GLboolean GLAD_ARB_sample_locations; #define GL_SAMPLE_LOCATION_SUBPIXEL_BITS_ARB 0x933D #define GL_SAMPLE_LOCATION_PIXEL_GRID_WIDTH_ARB 0x933E #define GL_SAMPLE_LOCATION_PIXEL_GRID_HEIGHT_ARB 0x933F #define GL_PROGRAMMABLE_SAMPLE_LOCATION_TABLE_SIZE_ARB 0x9340 #define GL_SAMPLE_LOCATION_ARB 0x8E50 #define GL_PROGRAMMABLE_SAMPLE_LOCATION_ARB 0x9341 #define GL_FRAMEBUFFER_PROGRAMMABLE_SAMPLE_LOCATIONS_ARB 0x9342 #define GL_FRAMEBUFFER_SAMPLE_LOCATION_PIXEL_GRID_ARB 0x9343 typedef void (APIENTRYP pfn_glFramebufferSampleLocationsfvARB) (GLenum, GLuint, GLsizei, const GLfloat*); extern pfn_glFramebufferSampleLocationsfvARB fp_glFramebufferSampleLocationsfvARB; typedef void (APIENTRYP pfn_glNamedFramebufferSampleLocationsfvARB) (GLuint, GLuint, GLsizei, const GLfloat*); extern pfn_glNamedFramebufferSampleLocationsfvARB fp_glNamedFramebufferSampleLocationsfvARB; typedef void (APIENTRYP pfn_glEvaluateDepthValuesARB) (); extern pfn_glEvaluateDepthValuesARB fp_glEvaluateDepthValuesARB; /* GL_ARB_sample_shading */ extern GLboolean GLAD_ARB_sample_shading; #define GL_SAMPLE_SHADING_ARB 0x8C36 #define GL_MIN_SAMPLE_SHADING_VALUE_ARB 0x8C37 typedef void (APIENTRYP pfn_glMinSampleShadingARB) (GLfloat); extern pfn_glMinSampleShadingARB fp_glMinSampleShadingARB; /* GL_ARB_sampler_objects */ extern GLboolean GLAD_ARB_sampler_objects; /* GL_ARB_seamless_cube_map */ extern GLboolean GLAD_ARB_seamless_cube_map; /* GL_ARB_seamless_cubemap_per_texture */ extern GLboolean GLAD_ARB_seamless_cubemap_per_texture; /* GL_ARB_separate_shader_objects */ extern GLboolean GLAD_ARB_separate_shader_objects; /* GL_ARB_shader_atomic_counter_ops */ extern GLboolean GLAD_ARB_shader_atomic_counter_ops; /* GL_ARB_shader_atomic_counters */ extern GLboolean GLAD_ARB_shader_atomic_counters; /* GL_ARB_shader_ballot */ extern GLboolean GLAD_ARB_shader_ballot; /* GL_ARB_shader_bit_encoding */ extern GLboolean GLAD_ARB_shader_bit_encoding; /* GL_ARB_shader_clock */ extern GLboolean GLAD_ARB_shader_clock; /* GL_ARB_shader_draw_parameters */ extern GLboolean GLAD_ARB_shader_draw_parameters; /* GL_ARB_shader_group_vote */ extern GLboolean GLAD_ARB_shader_group_vote; /* GL_ARB_shader_image_load_store */ extern GLboolean GLAD_ARB_shader_image_load_store; /* GL_ARB_shader_image_size */ extern GLboolean GLAD_ARB_shader_image_size; /* GL_ARB_shader_precision */ extern GLboolean GLAD_ARB_shader_precision; /* GL_ARB_shader_stencil_export */ extern GLboolean GLAD_ARB_shader_stencil_export; /* GL_ARB_shader_storage_buffer_object */ extern GLboolean GLAD_ARB_shader_storage_buffer_object; /* GL_ARB_shader_subroutine */ extern GLboolean GLAD_ARB_shader_subroutine; /* GL_ARB_shader_texture_image_samples */ extern GLboolean GLAD_ARB_shader_texture_image_samples; /* GL_ARB_shader_texture_lod */ extern GLboolean GLAD_ARB_shader_texture_lod; /* GL_ARB_shader_viewport_layer_array */ extern GLboolean GLAD_ARB_shader_viewport_layer_array; /* GL_ARB_shading_language_420pack */ extern GLboolean GLAD_ARB_shading_language_420pack; /* GL_ARB_shading_language_include */ extern GLboolean GLAD_ARB_shading_language_include; #define GL_SHADER_INCLUDE_ARB 0x8DAE #define GL_NAMED_STRING_LENGTH_ARB 0x8DE9 #define GL_NAMED_STRING_TYPE_ARB 0x8DEA typedef void (APIENTRYP pfn_glNamedStringARB) (GLenum, GLint, const GLchar*, GLint, const GLchar*); extern pfn_glNamedStringARB fp_glNamedStringARB; typedef void (APIENTRYP pfn_glDeleteNamedStringARB) (GLint, const GLchar*); extern pfn_glDeleteNamedStringARB fp_glDeleteNamedStringARB; typedef void (APIENTRYP pfn_glCompileShaderIncludeARB) (GLuint, GLsizei, const GLchar**, const GLint*); extern pfn_glCompileShaderIncludeARB fp_glCompileShaderIncludeARB; typedef GLboolean (APIENTRYP pfn_glIsNamedStringARB) (GLint, const GLchar*); extern pfn_glIsNamedStringARB fp_glIsNamedStringARB; typedef void (APIENTRYP pfn_glGetNamedStringARB) (GLint, const GLchar*, GLsizei, GLint*, GLchar*); extern pfn_glGetNamedStringARB fp_glGetNamedStringARB; typedef void (APIENTRYP pfn_glGetNamedStringivARB) (GLint, const GLchar*, GLenum, GLint*); extern pfn_glGetNamedStringivARB fp_glGetNamedStringivARB; /* GL_ARB_shading_language_packing */ extern GLboolean GLAD_ARB_shading_language_packing; /* GL_ARB_sparse_buffer */ extern GLboolean GLAD_ARB_sparse_buffer; #define GL_SPARSE_STORAGE_BIT_ARB 0x0400 #define GL_SPARSE_BUFFER_PAGE_SIZE_ARB 0x82F8 typedef void (APIENTRYP pfn_glBufferPageCommitmentARB) (GLenum, GLintptr, GLsizeiptr, GLboolean); extern pfn_glBufferPageCommitmentARB fp_glBufferPageCommitmentARB; typedef void (APIENTRYP pfn_glNamedBufferPageCommitmentEXT) (GLuint, GLintptr, GLsizeiptr, GLboolean); extern pfn_glNamedBufferPageCommitmentEXT fp_glNamedBufferPageCommitmentEXT; typedef void (APIENTRYP pfn_glNamedBufferPageCommitmentARB) (GLuint, GLintptr, GLsizeiptr, GLboolean); extern pfn_glNamedBufferPageCommitmentARB fp_glNamedBufferPageCommitmentARB; /* GL_ARB_sparse_texture */ extern GLboolean GLAD_ARB_sparse_texture; #define GL_TEXTURE_SPARSE_ARB 0x91A6 #define GL_VIRTUAL_PAGE_SIZE_INDEX_ARB 0x91A7 #define GL_NUM_SPARSE_LEVELS_ARB 0x91AA #define GL_NUM_VIRTUAL_PAGE_SIZES_ARB 0x91A8 #define GL_VIRTUAL_PAGE_SIZE_X_ARB 0x9195 #define GL_VIRTUAL_PAGE_SIZE_Y_ARB 0x9196 #define GL_VIRTUAL_PAGE_SIZE_Z_ARB 0x9197 #define GL_MAX_SPARSE_TEXTURE_SIZE_ARB 0x9198 #define GL_MAX_SPARSE_3D_TEXTURE_SIZE_ARB 0x9199 #define GL_MAX_SPARSE_ARRAY_TEXTURE_LAYERS_ARB 0x919A #define GL_SPARSE_TEXTURE_FULL_ARRAY_CUBE_MIPMAPS_ARB 0x91A9 typedef void (APIENTRYP pfn_glTexPageCommitmentARB) (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLboolean); extern pfn_glTexPageCommitmentARB fp_glTexPageCommitmentARB; /* GL_ARB_sparse_texture2 */ extern GLboolean GLAD_ARB_sparse_texture2; /* GL_ARB_sparse_texture_clamp */ extern GLboolean GLAD_ARB_sparse_texture_clamp; /* GL_ARB_stencil_texturing */ extern GLboolean GLAD_ARB_stencil_texturing; /* GL_ARB_sync */ extern GLboolean GLAD_ARB_sync; /* GL_ARB_tessellation_shader */ extern GLboolean GLAD_ARB_tessellation_shader; /* GL_ARB_texture_barrier */ extern GLboolean GLAD_ARB_texture_barrier; /* GL_ARB_texture_buffer_object */ extern GLboolean GLAD_ARB_texture_buffer_object; #define GL_TEXTURE_BUFFER_ARB 0x8C2A #define GL_MAX_TEXTURE_BUFFER_SIZE_ARB 0x8C2B #define GL_TEXTURE_BINDING_BUFFER_ARB 0x8C2C #define GL_TEXTURE_BUFFER_DATA_STORE_BINDING_ARB 0x8C2D #define GL_TEXTURE_BUFFER_FORMAT_ARB 0x8C2E typedef void (APIENTRYP pfn_glTexBufferARB) (GLenum, GLenum, GLuint); extern pfn_glTexBufferARB fp_glTexBufferARB; /* GL_ARB_texture_buffer_object_rgb32 */ extern GLboolean GLAD_ARB_texture_buffer_object_rgb32; /* GL_ARB_texture_buffer_range */ extern GLboolean GLAD_ARB_texture_buffer_range; /* GL_ARB_texture_compression_bptc */ extern GLboolean GLAD_ARB_texture_compression_bptc; #define GL_COMPRESSED_RGBA_BPTC_UNORM_ARB 0x8E8C #define GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM_ARB 0x8E8D #define GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_ARB 0x8E8E #define GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_ARB 0x8E8F /* GL_ARB_texture_compression_rgtc */ extern GLboolean GLAD_ARB_texture_compression_rgtc; /* GL_ARB_texture_cube_map_array */ extern GLboolean GLAD_ARB_texture_cube_map_array; #define GL_TEXTURE_CUBE_MAP_ARRAY_ARB 0x9009 #define GL_TEXTURE_BINDING_CUBE_MAP_ARRAY_ARB 0x900A #define GL_PROXY_TEXTURE_CUBE_MAP_ARRAY_ARB 0x900B #define GL_SAMPLER_CUBE_MAP_ARRAY_ARB 0x900C #define GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW_ARB 0x900D #define GL_INT_SAMPLER_CUBE_MAP_ARRAY_ARB 0x900E #define GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY_ARB 0x900F /* GL_ARB_texture_filter_minmax */ extern GLboolean GLAD_ARB_texture_filter_minmax; #define GL_TEXTURE_REDUCTION_MODE_ARB 0x9366 #define GL_WEIGHTED_AVERAGE_ARB 0x9367 /* GL_ARB_texture_float */ extern GLboolean GLAD_ARB_texture_float; #define GL_TEXTURE_RED_TYPE_ARB 0x8C10 #define GL_TEXTURE_GREEN_TYPE_ARB 0x8C11 #define GL_TEXTURE_BLUE_TYPE_ARB 0x8C12 #define GL_TEXTURE_ALPHA_TYPE_ARB 0x8C13 #define GL_TEXTURE_LUMINANCE_TYPE_ARB 0x8C14 #define GL_TEXTURE_INTENSITY_TYPE_ARB 0x8C15 #define GL_TEXTURE_DEPTH_TYPE_ARB 0x8C16 #define GL_UNSIGNED_NORMALIZED_ARB 0x8C17 #define GL_RGBA32F_ARB 0x8814 #define GL_RGB32F_ARB 0x8815 #define GL_ALPHA32F_ARB 0x8816 #define GL_INTENSITY32F_ARB 0x8817 #define GL_LUMINANCE32F_ARB 0x8818 #define GL_LUMINANCE_ALPHA32F_ARB 0x8819 #define GL_RGBA16F_ARB 0x881A #define GL_RGB16F_ARB 0x881B #define GL_ALPHA16F_ARB 0x881C #define GL_INTENSITY16F_ARB 0x881D #define GL_LUMINANCE16F_ARB 0x881E #define GL_LUMINANCE_ALPHA16F_ARB 0x881F /* GL_ARB_texture_gather */ extern GLboolean GLAD_ARB_texture_gather; #define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET_ARB 0x8E5E #define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET_ARB 0x8E5F #define GL_MAX_PROGRAM_TEXTURE_GATHER_COMPONENTS_ARB 0x8F9F /* GL_ARB_texture_mirror_clamp_to_edge */ extern GLboolean GLAD_ARB_texture_mirror_clamp_to_edge; /* GL_ARB_texture_multisample */ extern GLboolean GLAD_ARB_texture_multisample; /* GL_ARB_texture_query_levels */ extern GLboolean GLAD_ARB_texture_query_levels; /* GL_ARB_texture_query_lod */ extern GLboolean GLAD_ARB_texture_query_lod; /* GL_ARB_texture_rectangle */ extern GLboolean GLAD_ARB_texture_rectangle; #define GL_TEXTURE_RECTANGLE_ARB 0x84F5 #define GL_TEXTURE_BINDING_RECTANGLE_ARB 0x84F6 #define GL_PROXY_TEXTURE_RECTANGLE_ARB 0x84F7 #define GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB 0x84F8 /* GL_ARB_texture_rg */ extern GLboolean GLAD_ARB_texture_rg; /* GL_ARB_texture_rgb10_a2ui */ extern GLboolean GLAD_ARB_texture_rgb10_a2ui; /* GL_ARB_texture_stencil8 */ extern GLboolean GLAD_ARB_texture_stencil8; /* GL_ARB_texture_storage */ extern GLboolean GLAD_ARB_texture_storage; /* GL_ARB_texture_storage_multisample */ extern GLboolean GLAD_ARB_texture_storage_multisample; /* GL_ARB_texture_swizzle */ extern GLboolean GLAD_ARB_texture_swizzle; /* GL_ARB_texture_view */ extern GLboolean GLAD_ARB_texture_view; /* GL_ARB_timer_query */ extern GLboolean GLAD_ARB_timer_query; /* GL_ARB_transform_feedback2 */ extern GLboolean GLAD_ARB_transform_feedback2; /* GL_ARB_transform_feedback3 */ extern GLboolean GLAD_ARB_transform_feedback3; /* GL_ARB_transform_feedback_instanced */ extern GLboolean GLAD_ARB_transform_feedback_instanced; /* GL_ARB_transform_feedback_overflow_query */ extern GLboolean GLAD_ARB_transform_feedback_overflow_query; #define GL_TRANSFORM_FEEDBACK_OVERFLOW_ARB 0x82EC #define GL_TRANSFORM_FEEDBACK_STREAM_OVERFLOW_ARB 0x82ED /* GL_ARB_uniform_buffer_object */ extern GLboolean GLAD_ARB_uniform_buffer_object; /* GL_ARB_vertex_array_bgra */ extern GLboolean GLAD_ARB_vertex_array_bgra; /* GL_ARB_vertex_array_object */ extern GLboolean GLAD_ARB_vertex_array_object; /* GL_ARB_vertex_attrib_64bit */ extern GLboolean GLAD_ARB_vertex_attrib_64bit; /* GL_ARB_vertex_attrib_binding */ extern GLboolean GLAD_ARB_vertex_attrib_binding; /* GL_ARB_vertex_type_10f_11f_11f_rev */ extern GLboolean GLAD_ARB_vertex_type_10f_11f_11f_rev; /* GL_ARB_vertex_type_2_10_10_10_rev */ extern GLboolean GLAD_ARB_vertex_type_2_10_10_10_rev; /* GL_ARB_viewport_array */ extern GLboolean GLAD_ARB_viewport_array; /* GL_EXT_base_instance */ extern GLboolean GLAD_EXT_base_instance; typedef void (APIENTRYP pfn_glDrawArraysInstancedBaseInstanceEXT) (GLenum, GLint, GLsizei, GLsizei, GLuint); extern pfn_glDrawArraysInstancedBaseInstanceEXT fp_glDrawArraysInstancedBaseInstanceEXT; typedef void (APIENTRYP pfn_glDrawElementsInstancedBaseInstanceEXT) (GLenum, GLsizei, GLenum, const void*, GLsizei, GLuint); extern pfn_glDrawElementsInstancedBaseInstanceEXT fp_glDrawElementsInstancedBaseInstanceEXT; typedef void (APIENTRYP pfn_glDrawElementsInstancedBaseVertexBaseInstanceEXT) (GLenum, GLsizei, GLenum, const void*, GLsizei, GLint, GLuint); extern pfn_glDrawElementsInstancedBaseVertexBaseInstanceEXT fp_glDrawElementsInstancedBaseVertexBaseInstanceEXT; /* GL_EXT_bgra */ extern GLboolean GLAD_EXT_bgra; #define GL_BGR_EXT 0x80E0 #define GL_BGRA_EXT 0x80E1 /* GL_EXT_bindable_uniform */ extern GLboolean GLAD_EXT_bindable_uniform; #define GL_MAX_VERTEX_BINDABLE_UNIFORMS_EXT 0x8DE2 #define GL_MAX_FRAGMENT_BINDABLE_UNIFORMS_EXT 0x8DE3 #define GL_MAX_GEOMETRY_BINDABLE_UNIFORMS_EXT 0x8DE4 #define GL_MAX_BINDABLE_UNIFORM_SIZE_EXT 0x8DED #define GL_UNIFORM_BUFFER_EXT 0x8DEE #define GL_UNIFORM_BUFFER_BINDING_EXT 0x8DEF typedef void (APIENTRYP pfn_glUniformBufferEXT) (GLuint, GLint, GLuint); extern pfn_glUniformBufferEXT fp_glUniformBufferEXT; typedef GLint (APIENTRYP pfn_glGetUniformBufferSizeEXT) (GLuint, GLint); extern pfn_glGetUniformBufferSizeEXT fp_glGetUniformBufferSizeEXT; typedef GLintptr (APIENTRYP pfn_glGetUniformOffsetEXT) (GLuint, GLint); extern pfn_glGetUniformOffsetEXT fp_glGetUniformOffsetEXT; /* GL_EXT_blend_func_extended */ extern GLboolean GLAD_EXT_blend_func_extended; #define GL_SRC1_COLOR_EXT 0x88F9 #define GL_SRC1_ALPHA_EXT 0x8589 #define GL_ONE_MINUS_SRC1_COLOR_EXT 0x88FA #define GL_ONE_MINUS_SRC1_ALPHA_EXT 0x88FB #define GL_SRC_ALPHA_SATURATE_EXT 0x0308 #define GL_LOCATION_INDEX_EXT 0x930F #define GL_MAX_DUAL_SOURCE_DRAW_BUFFERS_EXT 0x88FC typedef void (APIENTRYP pfn_glBindFragDataLocationIndexedEXT) (GLuint, GLuint, GLuint, const GLchar*); extern pfn_glBindFragDataLocationIndexedEXT fp_glBindFragDataLocationIndexedEXT; typedef void (APIENTRYP pfn_glBindFragDataLocationEXT) (GLuint, GLuint, const GLchar*); extern pfn_glBindFragDataLocationEXT fp_glBindFragDataLocationEXT; typedef GLint (APIENTRYP pfn_glGetProgramResourceLocationIndexEXT) (GLuint, GLenum, const GLchar*); extern pfn_glGetProgramResourceLocationIndexEXT fp_glGetProgramResourceLocationIndexEXT; typedef GLint (APIENTRYP pfn_glGetFragDataIndexEXT) (GLuint, const GLchar*); extern pfn_glGetFragDataIndexEXT fp_glGetFragDataIndexEXT; /* GL_EXT_blend_minmax */ extern GLboolean GLAD_EXT_blend_minmax; #define GL_MIN_EXT 0x8007 #define GL_MAX_EXT 0x8008 #define GL_FUNC_ADD_EXT 0x8006 #define GL_BLEND_EQUATION_EXT 0x8009 typedef void (APIENTRYP pfn_glBlendEquationEXT) (GLenum); extern pfn_glBlendEquationEXT fp_glBlendEquationEXT; /* GL_EXT_buffer_storage */ extern GLboolean GLAD_EXT_buffer_storage; #define GL_MAP_PERSISTENT_BIT_EXT 0x0040 #define GL_MAP_COHERENT_BIT_EXT 0x0080 #define GL_DYNAMIC_STORAGE_BIT_EXT 0x0100 #define GL_CLIENT_STORAGE_BIT_EXT 0x0200 #define GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT_EXT 0x00004000 #define GL_BUFFER_IMMUTABLE_STORAGE_EXT 0x821F #define GL_BUFFER_STORAGE_FLAGS_EXT 0x8220 typedef void (APIENTRYP pfn_glBufferStorageEXT) (GLenum, GLsizeiptr, const void*, GLbitfield); extern pfn_glBufferStorageEXT fp_glBufferStorageEXT; /* GL_EXT_color_buffer_float */ extern GLboolean GLAD_EXT_color_buffer_float; /* GL_EXT_color_buffer_half_float */ extern GLboolean GLAD_EXT_color_buffer_half_float; #define GL_RGBA16F_EXT 0x881A #define GL_RGB16F_EXT 0x881B #define GL_RG16F_EXT 0x822F #define GL_R16F_EXT 0x822D #define GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT 0x8211 #define GL_UNSIGNED_NORMALIZED_EXT 0x8C17 /* GL_EXT_copy_image */ extern GLboolean GLAD_EXT_copy_image; typedef void (APIENTRYP pfn_glCopyImageSubDataEXT) (GLuint, GLenum, GLint, GLint, GLint, GLint, GLuint, GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei); extern pfn_glCopyImageSubDataEXT fp_glCopyImageSubDataEXT; /* GL_EXT_debug_label */ extern GLboolean GLAD_EXT_debug_label; #define GL_PROGRAM_PIPELINE_OBJECT_EXT 0x8A4F #define GL_PROGRAM_OBJECT_EXT 0x8B40 #define GL_SHADER_OBJECT_EXT 0x8B48 #define GL_BUFFER_OBJECT_EXT 0x9151 #define GL_QUERY_OBJECT_EXT 0x9153 #define GL_VERTEX_ARRAY_OBJECT_EXT 0x9154 typedef void (APIENTRYP pfn_glLabelObjectEXT) (GLenum, GLuint, GLsizei, const GLchar*); extern pfn_glLabelObjectEXT fp_glLabelObjectEXT; typedef void (APIENTRYP pfn_glGetObjectLabelEXT) (GLenum, GLuint, GLsizei, GLsizei*, GLchar*); extern pfn_glGetObjectLabelEXT fp_glGetObjectLabelEXT; /* GL_EXT_debug_marker */ extern GLboolean GLAD_EXT_debug_marker; typedef void (APIENTRYP pfn_glInsertEventMarkerEXT) (GLsizei, const GLchar*); extern pfn_glInsertEventMarkerEXT fp_glInsertEventMarkerEXT; typedef void (APIENTRYP pfn_glPushGroupMarkerEXT) (GLsizei, const GLchar*); extern pfn_glPushGroupMarkerEXT fp_glPushGroupMarkerEXT; typedef void (APIENTRYP pfn_glPopGroupMarkerEXT) (); extern pfn_glPopGroupMarkerEXT fp_glPopGroupMarkerEXT; /* GL_EXT_direct_state_access */ extern GLboolean GLAD_EXT_direct_state_access; #define GL_PROGRAM_MATRIX_EXT 0x8E2D #define GL_TRANSPOSE_PROGRAM_MATRIX_EXT 0x8E2E #define GL_PROGRAM_MATRIX_STACK_DEPTH_EXT 0x8E2F typedef void (APIENTRYP pfn_glMatrixLoadfEXT) (GLenum, const GLfloat*); extern pfn_glMatrixLoadfEXT fp_glMatrixLoadfEXT; typedef void (APIENTRYP pfn_glMatrixLoaddEXT) (GLenum, const GLdouble*); extern pfn_glMatrixLoaddEXT fp_glMatrixLoaddEXT; typedef void (APIENTRYP pfn_glMatrixMultfEXT) (GLenum, const GLfloat*); extern pfn_glMatrixMultfEXT fp_glMatrixMultfEXT; typedef void (APIENTRYP pfn_glMatrixMultdEXT) (GLenum, const GLdouble*); extern pfn_glMatrixMultdEXT fp_glMatrixMultdEXT; typedef void (APIENTRYP pfn_glMatrixLoadIdentityEXT) (GLenum); extern pfn_glMatrixLoadIdentityEXT fp_glMatrixLoadIdentityEXT; typedef void (APIENTRYP pfn_glMatrixRotatefEXT) (GLenum, GLfloat, GLfloat, GLfloat, GLfloat); extern pfn_glMatrixRotatefEXT fp_glMatrixRotatefEXT; typedef void (APIENTRYP pfn_glMatrixRotatedEXT) (GLenum, GLdouble, GLdouble, GLdouble, GLdouble); extern pfn_glMatrixRotatedEXT fp_glMatrixRotatedEXT; typedef void (APIENTRYP pfn_glMatrixScalefEXT) (GLenum, GLfloat, GLfloat, GLfloat); extern pfn_glMatrixScalefEXT fp_glMatrixScalefEXT; typedef void (APIENTRYP pfn_glMatrixScaledEXT) (GLenum, GLdouble, GLdouble, GLdouble); extern pfn_glMatrixScaledEXT fp_glMatrixScaledEXT; typedef void (APIENTRYP pfn_glMatrixTranslatefEXT) (GLenum, GLfloat, GLfloat, GLfloat); extern pfn_glMatrixTranslatefEXT fp_glMatrixTranslatefEXT; typedef void (APIENTRYP pfn_glMatrixTranslatedEXT) (GLenum, GLdouble, GLdouble, GLdouble); extern pfn_glMatrixTranslatedEXT fp_glMatrixTranslatedEXT; typedef void (APIENTRYP pfn_glMatrixFrustumEXT) (GLenum, GLdouble, GLdouble, GLdouble, GLdouble, GLdouble, GLdouble); extern pfn_glMatrixFrustumEXT fp_glMatrixFrustumEXT; typedef void (APIENTRYP pfn_glMatrixOrthoEXT) (GLenum, GLdouble, GLdouble, GLdouble, GLdouble, GLdouble, GLdouble); extern pfn_glMatrixOrthoEXT fp_glMatrixOrthoEXT; typedef void (APIENTRYP pfn_glMatrixPopEXT) (GLenum); extern pfn_glMatrixPopEXT fp_glMatrixPopEXT; typedef void (APIENTRYP pfn_glMatrixPushEXT) (GLenum); extern pfn_glMatrixPushEXT fp_glMatrixPushEXT; typedef void (APIENTRYP pfn_glClientAttribDefaultEXT) (GLbitfield); extern pfn_glClientAttribDefaultEXT fp_glClientAttribDefaultEXT; typedef void (APIENTRYP pfn_glPushClientAttribDefaultEXT) (GLbitfield); extern pfn_glPushClientAttribDefaultEXT fp_glPushClientAttribDefaultEXT; typedef void (APIENTRYP pfn_glTextureParameterfEXT) (GLuint, GLenum, GLenum, GLfloat); extern pfn_glTextureParameterfEXT fp_glTextureParameterfEXT; typedef void (APIENTRYP pfn_glTextureParameterfvEXT) (GLuint, GLenum, GLenum, const GLfloat*); extern pfn_glTextureParameterfvEXT fp_glTextureParameterfvEXT; typedef void (APIENTRYP pfn_glTextureParameteriEXT) (GLuint, GLenum, GLenum, GLint); extern pfn_glTextureParameteriEXT fp_glTextureParameteriEXT; typedef void (APIENTRYP pfn_glTextureParameterivEXT) (GLuint, GLenum, GLenum, const GLint*); extern pfn_glTextureParameterivEXT fp_glTextureParameterivEXT; typedef void (APIENTRYP pfn_glTextureImage1DEXT) (GLuint, GLenum, GLint, GLint, GLsizei, GLint, GLenum, GLenum, const void*); extern pfn_glTextureImage1DEXT fp_glTextureImage1DEXT; typedef void (APIENTRYP pfn_glTextureImage2DEXT) (GLuint, GLenum, GLint, GLint, GLsizei, GLsizei, GLint, GLenum, GLenum, const void*); extern pfn_glTextureImage2DEXT fp_glTextureImage2DEXT; typedef void (APIENTRYP pfn_glTextureSubImage1DEXT) (GLuint, GLenum, GLint, GLint, GLsizei, GLenum, GLenum, const void*); extern pfn_glTextureSubImage1DEXT fp_glTextureSubImage1DEXT; typedef void (APIENTRYP pfn_glTextureSubImage2DEXT) (GLuint, GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, const void*); extern pfn_glTextureSubImage2DEXT fp_glTextureSubImage2DEXT; typedef void (APIENTRYP pfn_glCopyTextureImage1DEXT) (GLuint, GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLint); extern pfn_glCopyTextureImage1DEXT fp_glCopyTextureImage1DEXT; typedef void (APIENTRYP pfn_glCopyTextureImage2DEXT) (GLuint, GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLsizei, GLint); extern pfn_glCopyTextureImage2DEXT fp_glCopyTextureImage2DEXT; typedef void (APIENTRYP pfn_glCopyTextureSubImage1DEXT) (GLuint, GLenum, GLint, GLint, GLint, GLint, GLsizei); extern pfn_glCopyTextureSubImage1DEXT fp_glCopyTextureSubImage1DEXT; typedef void (APIENTRYP pfn_glCopyTextureSubImage2DEXT) (GLuint, GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei); extern pfn_glCopyTextureSubImage2DEXT fp_glCopyTextureSubImage2DEXT; typedef void (APIENTRYP pfn_glGetTextureImageEXT) (GLuint, GLenum, GLint, GLenum, GLenum, void*); extern pfn_glGetTextureImageEXT fp_glGetTextureImageEXT; typedef void (APIENTRYP pfn_glGetTextureParameterfvEXT) (GLuint, GLenum, GLenum, GLfloat*); extern pfn_glGetTextureParameterfvEXT fp_glGetTextureParameterfvEXT; typedef void (APIENTRYP pfn_glGetTextureParameterivEXT) (GLuint, GLenum, GLenum, GLint*); extern pfn_glGetTextureParameterivEXT fp_glGetTextureParameterivEXT; typedef void (APIENTRYP pfn_glGetTextureLevelParameterfvEXT) (GLuint, GLenum, GLint, GLenum, GLfloat*); extern pfn_glGetTextureLevelParameterfvEXT fp_glGetTextureLevelParameterfvEXT; typedef void (APIENTRYP pfn_glGetTextureLevelParameterivEXT) (GLuint, GLenum, GLint, GLenum, GLint*); extern pfn_glGetTextureLevelParameterivEXT fp_glGetTextureLevelParameterivEXT; typedef void (APIENTRYP pfn_glTextureImage3DEXT) (GLuint, GLenum, GLint, GLint, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const void*); extern pfn_glTextureImage3DEXT fp_glTextureImage3DEXT; typedef void (APIENTRYP pfn_glTextureSubImage3DEXT) (GLuint, GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const void*); extern pfn_glTextureSubImage3DEXT fp_glTextureSubImage3DEXT; typedef void (APIENTRYP pfn_glCopyTextureSubImage3DEXT) (GLuint, GLenum, GLint, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei); extern pfn_glCopyTextureSubImage3DEXT fp_glCopyTextureSubImage3DEXT; typedef void (APIENTRYP pfn_glBindMultiTextureEXT) (GLenum, GLenum, GLuint); extern pfn_glBindMultiTextureEXT fp_glBindMultiTextureEXT; typedef void (APIENTRYP pfn_glMultiTexCoordPointerEXT) (GLenum, GLint, GLenum, GLsizei, const void*); extern pfn_glMultiTexCoordPointerEXT fp_glMultiTexCoordPointerEXT; typedef void (APIENTRYP pfn_glMultiTexEnvfEXT) (GLenum, GLenum, GLenum, GLfloat); extern pfn_glMultiTexEnvfEXT fp_glMultiTexEnvfEXT; typedef void (APIENTRYP pfn_glMultiTexEnvfvEXT) (GLenum, GLenum, GLenum, const GLfloat*); extern pfn_glMultiTexEnvfvEXT fp_glMultiTexEnvfvEXT; typedef void (APIENTRYP pfn_glMultiTexEnviEXT) (GLenum, GLenum, GLenum, GLint); extern pfn_glMultiTexEnviEXT fp_glMultiTexEnviEXT; typedef void (APIENTRYP pfn_glMultiTexEnvivEXT) (GLenum, GLenum, GLenum, const GLint*); extern pfn_glMultiTexEnvivEXT fp_glMultiTexEnvivEXT; typedef void (APIENTRYP pfn_glMultiTexGendEXT) (GLenum, GLenum, GLenum, GLdouble); extern pfn_glMultiTexGendEXT fp_glMultiTexGendEXT; typedef void (APIENTRYP pfn_glMultiTexGendvEXT) (GLenum, GLenum, GLenum, const GLdouble*); extern pfn_glMultiTexGendvEXT fp_glMultiTexGendvEXT; typedef void (APIENTRYP pfn_glMultiTexGenfEXT) (GLenum, GLenum, GLenum, GLfloat); extern pfn_glMultiTexGenfEXT fp_glMultiTexGenfEXT; typedef void (APIENTRYP pfn_glMultiTexGenfvEXT) (GLenum, GLenum, GLenum, const GLfloat*); extern pfn_glMultiTexGenfvEXT fp_glMultiTexGenfvEXT; typedef void (APIENTRYP pfn_glMultiTexGeniEXT) (GLenum, GLenum, GLenum, GLint); extern pfn_glMultiTexGeniEXT fp_glMultiTexGeniEXT; typedef void (APIENTRYP pfn_glMultiTexGenivEXT) (GLenum, GLenum, GLenum, const GLint*); extern pfn_glMultiTexGenivEXT fp_glMultiTexGenivEXT; typedef void (APIENTRYP pfn_glGetMultiTexEnvfvEXT) (GLenum, GLenum, GLenum, GLfloat*); extern pfn_glGetMultiTexEnvfvEXT fp_glGetMultiTexEnvfvEXT; typedef void (APIENTRYP pfn_glGetMultiTexEnvivEXT) (GLenum, GLenum, GLenum, GLint*); extern pfn_glGetMultiTexEnvivEXT fp_glGetMultiTexEnvivEXT; typedef void (APIENTRYP pfn_glGetMultiTexGendvEXT) (GLenum, GLenum, GLenum, GLdouble*); extern pfn_glGetMultiTexGendvEXT fp_glGetMultiTexGendvEXT; typedef void (APIENTRYP pfn_glGetMultiTexGenfvEXT) (GLenum, GLenum, GLenum, GLfloat*); extern pfn_glGetMultiTexGenfvEXT fp_glGetMultiTexGenfvEXT; typedef void (APIENTRYP pfn_glGetMultiTexGenivEXT) (GLenum, GLenum, GLenum, GLint*); extern pfn_glGetMultiTexGenivEXT fp_glGetMultiTexGenivEXT; typedef void (APIENTRYP pfn_glMultiTexParameteriEXT) (GLenum, GLenum, GLenum, GLint); extern pfn_glMultiTexParameteriEXT fp_glMultiTexParameteriEXT; typedef void (APIENTRYP pfn_glMultiTexParameterivEXT) (GLenum, GLenum, GLenum, const GLint*); extern pfn_glMultiTexParameterivEXT fp_glMultiTexParameterivEXT; typedef void (APIENTRYP pfn_glMultiTexParameterfEXT) (GLenum, GLenum, GLenum, GLfloat); extern pfn_glMultiTexParameterfEXT fp_glMultiTexParameterfEXT; typedef void (APIENTRYP pfn_glMultiTexParameterfvEXT) (GLenum, GLenum, GLenum, const GLfloat*); extern pfn_glMultiTexParameterfvEXT fp_glMultiTexParameterfvEXT; typedef void (APIENTRYP pfn_glMultiTexImage1DEXT) (GLenum, GLenum, GLint, GLint, GLsizei, GLint, GLenum, GLenum, const void*); extern pfn_glMultiTexImage1DEXT fp_glMultiTexImage1DEXT; typedef void (APIENTRYP pfn_glMultiTexImage2DEXT) (GLenum, GLenum, GLint, GLint, GLsizei, GLsizei, GLint, GLenum, GLenum, const void*); extern pfn_glMultiTexImage2DEXT fp_glMultiTexImage2DEXT; typedef void (APIENTRYP pfn_glMultiTexSubImage1DEXT) (GLenum, GLenum, GLint, GLint, GLsizei, GLenum, GLenum, const void*); extern pfn_glMultiTexSubImage1DEXT fp_glMultiTexSubImage1DEXT; typedef void (APIENTRYP pfn_glMultiTexSubImage2DEXT) (GLenum, GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, const void*); extern pfn_glMultiTexSubImage2DEXT fp_glMultiTexSubImage2DEXT; typedef void (APIENTRYP pfn_glCopyMultiTexImage1DEXT) (GLenum, GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLint); extern pfn_glCopyMultiTexImage1DEXT fp_glCopyMultiTexImage1DEXT; typedef void (APIENTRYP pfn_glCopyMultiTexImage2DEXT) (GLenum, GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLsizei, GLint); extern pfn_glCopyMultiTexImage2DEXT fp_glCopyMultiTexImage2DEXT; typedef void (APIENTRYP pfn_glCopyMultiTexSubImage1DEXT) (GLenum, GLenum, GLint, GLint, GLint, GLint, GLsizei); extern pfn_glCopyMultiTexSubImage1DEXT fp_glCopyMultiTexSubImage1DEXT; typedef void (APIENTRYP pfn_glCopyMultiTexSubImage2DEXT) (GLenum, GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei); extern pfn_glCopyMultiTexSubImage2DEXT fp_glCopyMultiTexSubImage2DEXT; typedef void (APIENTRYP pfn_glGetMultiTexImageEXT) (GLenum, GLenum, GLint, GLenum, GLenum, void*); extern pfn_glGetMultiTexImageEXT fp_glGetMultiTexImageEXT; typedef void (APIENTRYP pfn_glGetMultiTexParameterfvEXT) (GLenum, GLenum, GLenum, GLfloat*); extern pfn_glGetMultiTexParameterfvEXT fp_glGetMultiTexParameterfvEXT; typedef void (APIENTRYP pfn_glGetMultiTexParameterivEXT) (GLenum, GLenum, GLenum, GLint*); extern pfn_glGetMultiTexParameterivEXT fp_glGetMultiTexParameterivEXT; typedef void (APIENTRYP pfn_glGetMultiTexLevelParameterfvEXT) (GLenum, GLenum, GLint, GLenum, GLfloat*); extern pfn_glGetMultiTexLevelParameterfvEXT fp_glGetMultiTexLevelParameterfvEXT; typedef void (APIENTRYP pfn_glGetMultiTexLevelParameterivEXT) (GLenum, GLenum, GLint, GLenum, GLint*); extern pfn_glGetMultiTexLevelParameterivEXT fp_glGetMultiTexLevelParameterivEXT; typedef void (APIENTRYP pfn_glMultiTexImage3DEXT) (GLenum, GLenum, GLint, GLint, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const void*); extern pfn_glMultiTexImage3DEXT fp_glMultiTexImage3DEXT; typedef void (APIENTRYP pfn_glMultiTexSubImage3DEXT) (GLenum, GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const void*); extern pfn_glMultiTexSubImage3DEXT fp_glMultiTexSubImage3DEXT; typedef void (APIENTRYP pfn_glCopyMultiTexSubImage3DEXT) (GLenum, GLenum, GLint, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei); extern pfn_glCopyMultiTexSubImage3DEXT fp_glCopyMultiTexSubImage3DEXT; typedef void (APIENTRYP pfn_glEnableClientStateIndexedEXT) (GLenum, GLuint); extern pfn_glEnableClientStateIndexedEXT fp_glEnableClientStateIndexedEXT; typedef void (APIENTRYP pfn_glDisableClientStateIndexedEXT) (GLenum, GLuint); extern pfn_glDisableClientStateIndexedEXT fp_glDisableClientStateIndexedEXT; typedef void (APIENTRYP pfn_glGetFloatIndexedvEXT) (GLenum, GLuint, GLfloat*); extern pfn_glGetFloatIndexedvEXT fp_glGetFloatIndexedvEXT; typedef void (APIENTRYP pfn_glGetDoubleIndexedvEXT) (GLenum, GLuint, GLdouble*); extern pfn_glGetDoubleIndexedvEXT fp_glGetDoubleIndexedvEXT; typedef void (APIENTRYP pfn_glGetPointerIndexedvEXT) (GLenum, GLuint, void**); extern pfn_glGetPointerIndexedvEXT fp_glGetPointerIndexedvEXT; typedef void (APIENTRYP pfn_glEnableIndexedEXT) (GLenum, GLuint); extern pfn_glEnableIndexedEXT fp_glEnableIndexedEXT; typedef void (APIENTRYP pfn_glDisableIndexedEXT) (GLenum, GLuint); extern pfn_glDisableIndexedEXT fp_glDisableIndexedEXT; typedef GLboolean (APIENTRYP pfn_glIsEnabledIndexedEXT) (GLenum, GLuint); extern pfn_glIsEnabledIndexedEXT fp_glIsEnabledIndexedEXT; typedef void (APIENTRYP pfn_glGetIntegerIndexedvEXT) (GLenum, GLuint, GLint*); extern pfn_glGetIntegerIndexedvEXT fp_glGetIntegerIndexedvEXT; typedef void (APIENTRYP pfn_glGetBooleanIndexedvEXT) (GLenum, GLuint, GLboolean*); extern pfn_glGetBooleanIndexedvEXT fp_glGetBooleanIndexedvEXT; typedef void (APIENTRYP pfn_glCompressedTextureImage3DEXT) (GLuint, GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, const void*); extern pfn_glCompressedTextureImage3DEXT fp_glCompressedTextureImage3DEXT; typedef void (APIENTRYP pfn_glCompressedTextureImage2DEXT) (GLuint, GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const void*); extern pfn_glCompressedTextureImage2DEXT fp_glCompressedTextureImage2DEXT; typedef void (APIENTRYP pfn_glCompressedTextureImage1DEXT) (GLuint, GLenum, GLint, GLenum, GLsizei, GLint, GLsizei, const void*); extern pfn_glCompressedTextureImage1DEXT fp_glCompressedTextureImage1DEXT; typedef void (APIENTRYP pfn_glCompressedTextureSubImage3DEXT) (GLuint, GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, const void*); extern pfn_glCompressedTextureSubImage3DEXT fp_glCompressedTextureSubImage3DEXT; typedef void (APIENTRYP pfn_glCompressedTextureSubImage2DEXT) (GLuint, GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const void*); extern pfn_glCompressedTextureSubImage2DEXT fp_glCompressedTextureSubImage2DEXT; typedef void (APIENTRYP pfn_glCompressedTextureSubImage1DEXT) (GLuint, GLenum, GLint, GLint, GLsizei, GLenum, GLsizei, const void*); extern pfn_glCompressedTextureSubImage1DEXT fp_glCompressedTextureSubImage1DEXT; typedef void (APIENTRYP pfn_glGetCompressedTextureImageEXT) (GLuint, GLenum, GLint, void*); extern pfn_glGetCompressedTextureImageEXT fp_glGetCompressedTextureImageEXT; typedef void (APIENTRYP pfn_glCompressedMultiTexImage3DEXT) (GLenum, GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, const void*); extern pfn_glCompressedMultiTexImage3DEXT fp_glCompressedMultiTexImage3DEXT; typedef void (APIENTRYP pfn_glCompressedMultiTexImage2DEXT) (GLenum, GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const void*); extern pfn_glCompressedMultiTexImage2DEXT fp_glCompressedMultiTexImage2DEXT; typedef void (APIENTRYP pfn_glCompressedMultiTexImage1DEXT) (GLenum, GLenum, GLint, GLenum, GLsizei, GLint, GLsizei, const void*); extern pfn_glCompressedMultiTexImage1DEXT fp_glCompressedMultiTexImage1DEXT; typedef void (APIENTRYP pfn_glCompressedMultiTexSubImage3DEXT) (GLenum, GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, const void*); extern pfn_glCompressedMultiTexSubImage3DEXT fp_glCompressedMultiTexSubImage3DEXT; typedef void (APIENTRYP pfn_glCompressedMultiTexSubImage2DEXT) (GLenum, GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const void*); extern pfn_glCompressedMultiTexSubImage2DEXT fp_glCompressedMultiTexSubImage2DEXT; typedef void (APIENTRYP pfn_glCompressedMultiTexSubImage1DEXT) (GLenum, GLenum, GLint, GLint, GLsizei, GLenum, GLsizei, const void*); extern pfn_glCompressedMultiTexSubImage1DEXT fp_glCompressedMultiTexSubImage1DEXT; typedef void (APIENTRYP pfn_glGetCompressedMultiTexImageEXT) (GLenum, GLenum, GLint, void*); extern pfn_glGetCompressedMultiTexImageEXT fp_glGetCompressedMultiTexImageEXT; typedef void (APIENTRYP pfn_glMatrixLoadTransposefEXT) (GLenum, const GLfloat*); extern pfn_glMatrixLoadTransposefEXT fp_glMatrixLoadTransposefEXT; typedef void (APIENTRYP pfn_glMatrixLoadTransposedEXT) (GLenum, const GLdouble*); extern pfn_glMatrixLoadTransposedEXT fp_glMatrixLoadTransposedEXT; typedef void (APIENTRYP pfn_glMatrixMultTransposefEXT) (GLenum, const GLfloat*); extern pfn_glMatrixMultTransposefEXT fp_glMatrixMultTransposefEXT; typedef void (APIENTRYP pfn_glMatrixMultTransposedEXT) (GLenum, const GLdouble*); extern pfn_glMatrixMultTransposedEXT fp_glMatrixMultTransposedEXT; typedef void (APIENTRYP pfn_glNamedBufferDataEXT) (GLuint, GLsizeiptr, const void*, GLenum); extern pfn_glNamedBufferDataEXT fp_glNamedBufferDataEXT; typedef void (APIENTRYP pfn_glNamedBufferSubDataEXT) (GLuint, GLintptr, GLsizeiptr, const void*); extern pfn_glNamedBufferSubDataEXT fp_glNamedBufferSubDataEXT; typedef void* (APIENTRYP pfn_glMapNamedBufferEXT) (GLuint, GLenum); extern pfn_glMapNamedBufferEXT fp_glMapNamedBufferEXT; typedef GLboolean (APIENTRYP pfn_glUnmapNamedBufferEXT) (GLuint); extern pfn_glUnmapNamedBufferEXT fp_glUnmapNamedBufferEXT; typedef void (APIENTRYP pfn_glGetNamedBufferParameterivEXT) (GLuint, GLenum, GLint*); extern pfn_glGetNamedBufferParameterivEXT fp_glGetNamedBufferParameterivEXT; typedef void (APIENTRYP pfn_glGetNamedBufferPointervEXT) (GLuint, GLenum, void**); extern pfn_glGetNamedBufferPointervEXT fp_glGetNamedBufferPointervEXT; typedef void (APIENTRYP pfn_glGetNamedBufferSubDataEXT) (GLuint, GLintptr, GLsizeiptr, void*); extern pfn_glGetNamedBufferSubDataEXT fp_glGetNamedBufferSubDataEXT; typedef void (APIENTRYP pfn_glProgramUniform1fEXT) (GLuint, GLint, GLfloat); extern pfn_glProgramUniform1fEXT fp_glProgramUniform1fEXT; typedef void (APIENTRYP pfn_glProgramUniform2fEXT) (GLuint, GLint, GLfloat, GLfloat); extern pfn_glProgramUniform2fEXT fp_glProgramUniform2fEXT; typedef void (APIENTRYP pfn_glProgramUniform3fEXT) (GLuint, GLint, GLfloat, GLfloat, GLfloat); extern pfn_glProgramUniform3fEXT fp_glProgramUniform3fEXT; typedef void (APIENTRYP pfn_glProgramUniform4fEXT) (GLuint, GLint, GLfloat, GLfloat, GLfloat, GLfloat); extern pfn_glProgramUniform4fEXT fp_glProgramUniform4fEXT; typedef void (APIENTRYP pfn_glProgramUniform1iEXT) (GLuint, GLint, GLint); extern pfn_glProgramUniform1iEXT fp_glProgramUniform1iEXT; typedef void (APIENTRYP pfn_glProgramUniform2iEXT) (GLuint, GLint, GLint, GLint); extern pfn_glProgramUniform2iEXT fp_glProgramUniform2iEXT; typedef void (APIENTRYP pfn_glProgramUniform3iEXT) (GLuint, GLint, GLint, GLint, GLint); extern pfn_glProgramUniform3iEXT fp_glProgramUniform3iEXT; typedef void (APIENTRYP pfn_glProgramUniform4iEXT) (GLuint, GLint, GLint, GLint, GLint, GLint); extern pfn_glProgramUniform4iEXT fp_glProgramUniform4iEXT; typedef void (APIENTRYP pfn_glProgramUniform1fvEXT) (GLuint, GLint, GLsizei, const GLfloat*); extern pfn_glProgramUniform1fvEXT fp_glProgramUniform1fvEXT; typedef void (APIENTRYP pfn_glProgramUniform2fvEXT) (GLuint, GLint, GLsizei, const GLfloat*); extern pfn_glProgramUniform2fvEXT fp_glProgramUniform2fvEXT; typedef void (APIENTRYP pfn_glProgramUniform3fvEXT) (GLuint, GLint, GLsizei, const GLfloat*); extern pfn_glProgramUniform3fvEXT fp_glProgramUniform3fvEXT; typedef void (APIENTRYP pfn_glProgramUniform4fvEXT) (GLuint, GLint, GLsizei, const GLfloat*); extern pfn_glProgramUniform4fvEXT fp_glProgramUniform4fvEXT; typedef void (APIENTRYP pfn_glProgramUniform1ivEXT) (GLuint, GLint, GLsizei, const GLint*); extern pfn_glProgramUniform1ivEXT fp_glProgramUniform1ivEXT; typedef void (APIENTRYP pfn_glProgramUniform2ivEXT) (GLuint, GLint, GLsizei, const GLint*); extern pfn_glProgramUniform2ivEXT fp_glProgramUniform2ivEXT; typedef void (APIENTRYP pfn_glProgramUniform3ivEXT) (GLuint, GLint, GLsizei, const GLint*); extern pfn_glProgramUniform3ivEXT fp_glProgramUniform3ivEXT; typedef void (APIENTRYP pfn_glProgramUniform4ivEXT) (GLuint, GLint, GLsizei, const GLint*); extern pfn_glProgramUniform4ivEXT fp_glProgramUniform4ivEXT; typedef void (APIENTRYP pfn_glProgramUniformMatrix2fvEXT) (GLuint, GLint, GLsizei, GLboolean, const GLfloat*); extern pfn_glProgramUniformMatrix2fvEXT fp_glProgramUniformMatrix2fvEXT; typedef void (APIENTRYP pfn_glProgramUniformMatrix3fvEXT) (GLuint, GLint, GLsizei, GLboolean, const GLfloat*); extern pfn_glProgramUniformMatrix3fvEXT fp_glProgramUniformMatrix3fvEXT; typedef void (APIENTRYP pfn_glProgramUniformMatrix4fvEXT) (GLuint, GLint, GLsizei, GLboolean, const GLfloat*); extern pfn_glProgramUniformMatrix4fvEXT fp_glProgramUniformMatrix4fvEXT; typedef void (APIENTRYP pfn_glProgramUniformMatrix2x3fvEXT) (GLuint, GLint, GLsizei, GLboolean, const GLfloat*); extern pfn_glProgramUniformMatrix2x3fvEXT fp_glProgramUniformMatrix2x3fvEXT; typedef void (APIENTRYP pfn_glProgramUniformMatrix3x2fvEXT) (GLuint, GLint, GLsizei, GLboolean, const GLfloat*); extern pfn_glProgramUniformMatrix3x2fvEXT fp_glProgramUniformMatrix3x2fvEXT; typedef void (APIENTRYP pfn_glProgramUniformMatrix2x4fvEXT) (GLuint, GLint, GLsizei, GLboolean, const GLfloat*); extern pfn_glProgramUniformMatrix2x4fvEXT fp_glProgramUniformMatrix2x4fvEXT; typedef void (APIENTRYP pfn_glProgramUniformMatrix4x2fvEXT) (GLuint, GLint, GLsizei, GLboolean, const GLfloat*); extern pfn_glProgramUniformMatrix4x2fvEXT fp_glProgramUniformMatrix4x2fvEXT; typedef void (APIENTRYP pfn_glProgramUniformMatrix3x4fvEXT) (GLuint, GLint, GLsizei, GLboolean, const GLfloat*); extern pfn_glProgramUniformMatrix3x4fvEXT fp_glProgramUniformMatrix3x4fvEXT; typedef void (APIENTRYP pfn_glProgramUniformMatrix4x3fvEXT) (GLuint, GLint, GLsizei, GLboolean, const GLfloat*); extern pfn_glProgramUniformMatrix4x3fvEXT fp_glProgramUniformMatrix4x3fvEXT; typedef void (APIENTRYP pfn_glTextureBufferEXT) (GLuint, GLenum, GLenum, GLuint); extern pfn_glTextureBufferEXT fp_glTextureBufferEXT; typedef void (APIENTRYP pfn_glMultiTexBufferEXT) (GLenum, GLenum, GLenum, GLuint); extern pfn_glMultiTexBufferEXT fp_glMultiTexBufferEXT; typedef void (APIENTRYP pfn_glTextureParameterIivEXT) (GLuint, GLenum, GLenum, const GLint*); extern pfn_glTextureParameterIivEXT fp_glTextureParameterIivEXT; typedef void (APIENTRYP pfn_glTextureParameterIuivEXT) (GLuint, GLenum, GLenum, const GLuint*); extern pfn_glTextureParameterIuivEXT fp_glTextureParameterIuivEXT; typedef void (APIENTRYP pfn_glGetTextureParameterIivEXT) (GLuint, GLenum, GLenum, GLint*); extern pfn_glGetTextureParameterIivEXT fp_glGetTextureParameterIivEXT; typedef void (APIENTRYP pfn_glGetTextureParameterIuivEXT) (GLuint, GLenum, GLenum, GLuint*); extern pfn_glGetTextureParameterIuivEXT fp_glGetTextureParameterIuivEXT; typedef void (APIENTRYP pfn_glMultiTexParameterIivEXT) (GLenum, GLenum, GLenum, const GLint*); extern pfn_glMultiTexParameterIivEXT fp_glMultiTexParameterIivEXT; typedef void (APIENTRYP pfn_glMultiTexParameterIuivEXT) (GLenum, GLenum, GLenum, const GLuint*); extern pfn_glMultiTexParameterIuivEXT fp_glMultiTexParameterIuivEXT; typedef void (APIENTRYP pfn_glGetMultiTexParameterIivEXT) (GLenum, GLenum, GLenum, GLint*); extern pfn_glGetMultiTexParameterIivEXT fp_glGetMultiTexParameterIivEXT; typedef void (APIENTRYP pfn_glGetMultiTexParameterIuivEXT) (GLenum, GLenum, GLenum, GLuint*); extern pfn_glGetMultiTexParameterIuivEXT fp_glGetMultiTexParameterIuivEXT; typedef void (APIENTRYP pfn_glProgramUniform1uiEXT) (GLuint, GLint, GLuint); extern pfn_glProgramUniform1uiEXT fp_glProgramUniform1uiEXT; typedef void (APIENTRYP pfn_glProgramUniform2uiEXT) (GLuint, GLint, GLuint, GLuint); extern pfn_glProgramUniform2uiEXT fp_glProgramUniform2uiEXT; typedef void (APIENTRYP pfn_glProgramUniform3uiEXT) (GLuint, GLint, GLuint, GLuint, GLuint); extern pfn_glProgramUniform3uiEXT fp_glProgramUniform3uiEXT; typedef void (APIENTRYP pfn_glProgramUniform4uiEXT) (GLuint, GLint, GLuint, GLuint, GLuint, GLuint); extern pfn_glProgramUniform4uiEXT fp_glProgramUniform4uiEXT; typedef void (APIENTRYP pfn_glProgramUniform1uivEXT) (GLuint, GLint, GLsizei, const GLuint*); extern pfn_glProgramUniform1uivEXT fp_glProgramUniform1uivEXT; typedef void (APIENTRYP pfn_glProgramUniform2uivEXT) (GLuint, GLint, GLsizei, const GLuint*); extern pfn_glProgramUniform2uivEXT fp_glProgramUniform2uivEXT; typedef void (APIENTRYP pfn_glProgramUniform3uivEXT) (GLuint, GLint, GLsizei, const GLuint*); extern pfn_glProgramUniform3uivEXT fp_glProgramUniform3uivEXT; typedef void (APIENTRYP pfn_glProgramUniform4uivEXT) (GLuint, GLint, GLsizei, const GLuint*); extern pfn_glProgramUniform4uivEXT fp_glProgramUniform4uivEXT; typedef void (APIENTRYP pfn_glNamedProgramLocalParameters4fvEXT) (GLuint, GLenum, GLuint, GLsizei, const GLfloat*); extern pfn_glNamedProgramLocalParameters4fvEXT fp_glNamedProgramLocalParameters4fvEXT; typedef void (APIENTRYP pfn_glNamedProgramLocalParameterI4iEXT) (GLuint, GLenum, GLuint, GLint, GLint, GLint, GLint); extern pfn_glNamedProgramLocalParameterI4iEXT fp_glNamedProgramLocalParameterI4iEXT; typedef void (APIENTRYP pfn_glNamedProgramLocalParameterI4ivEXT) (GLuint, GLenum, GLuint, const GLint*); extern pfn_glNamedProgramLocalParameterI4ivEXT fp_glNamedProgramLocalParameterI4ivEXT; typedef void (APIENTRYP pfn_glNamedProgramLocalParametersI4ivEXT) (GLuint, GLenum, GLuint, GLsizei, const GLint*); extern pfn_glNamedProgramLocalParametersI4ivEXT fp_glNamedProgramLocalParametersI4ivEXT; typedef void (APIENTRYP pfn_glNamedProgramLocalParameterI4uiEXT) (GLuint, GLenum, GLuint, GLuint, GLuint, GLuint, GLuint); extern pfn_glNamedProgramLocalParameterI4uiEXT fp_glNamedProgramLocalParameterI4uiEXT; typedef void (APIENTRYP pfn_glNamedProgramLocalParameterI4uivEXT) (GLuint, GLenum, GLuint, const GLuint*); extern pfn_glNamedProgramLocalParameterI4uivEXT fp_glNamedProgramLocalParameterI4uivEXT; typedef void (APIENTRYP pfn_glNamedProgramLocalParametersI4uivEXT) (GLuint, GLenum, GLuint, GLsizei, const GLuint*); extern pfn_glNamedProgramLocalParametersI4uivEXT fp_glNamedProgramLocalParametersI4uivEXT; typedef void (APIENTRYP pfn_glGetNamedProgramLocalParameterIivEXT) (GLuint, GLenum, GLuint, GLint*); extern pfn_glGetNamedProgramLocalParameterIivEXT fp_glGetNamedProgramLocalParameterIivEXT; typedef void (APIENTRYP pfn_glGetNamedProgramLocalParameterIuivEXT) (GLuint, GLenum, GLuint, GLuint*); extern pfn_glGetNamedProgramLocalParameterIuivEXT fp_glGetNamedProgramLocalParameterIuivEXT; typedef void (APIENTRYP pfn_glEnableClientStateiEXT) (GLenum, GLuint); extern pfn_glEnableClientStateiEXT fp_glEnableClientStateiEXT; typedef void (APIENTRYP pfn_glDisableClientStateiEXT) (GLenum, GLuint); extern pfn_glDisableClientStateiEXT fp_glDisableClientStateiEXT; typedef void (APIENTRYP pfn_glGetFloati_vEXT) (GLenum, GLuint, GLfloat*); extern pfn_glGetFloati_vEXT fp_glGetFloati_vEXT; typedef void (APIENTRYP pfn_glGetDoublei_vEXT) (GLenum, GLuint, GLdouble*); extern pfn_glGetDoublei_vEXT fp_glGetDoublei_vEXT; typedef void (APIENTRYP pfn_glGetPointeri_vEXT) (GLenum, GLuint, void**); extern pfn_glGetPointeri_vEXT fp_glGetPointeri_vEXT; typedef void (APIENTRYP pfn_glNamedProgramStringEXT) (GLuint, GLenum, GLenum, GLsizei, const void*); extern pfn_glNamedProgramStringEXT fp_glNamedProgramStringEXT; typedef void (APIENTRYP pfn_glNamedProgramLocalParameter4dEXT) (GLuint, GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble); extern pfn_glNamedProgramLocalParameter4dEXT fp_glNamedProgramLocalParameter4dEXT; typedef void (APIENTRYP pfn_glNamedProgramLocalParameter4dvEXT) (GLuint, GLenum, GLuint, const GLdouble*); extern pfn_glNamedProgramLocalParameter4dvEXT fp_glNamedProgramLocalParameter4dvEXT; typedef void (APIENTRYP pfn_glNamedProgramLocalParameter4fEXT) (GLuint, GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat); extern pfn_glNamedProgramLocalParameter4fEXT fp_glNamedProgramLocalParameter4fEXT; typedef void (APIENTRYP pfn_glNamedProgramLocalParameter4fvEXT) (GLuint, GLenum, GLuint, const GLfloat*); extern pfn_glNamedProgramLocalParameter4fvEXT fp_glNamedProgramLocalParameter4fvEXT; typedef void (APIENTRYP pfn_glGetNamedProgramLocalParameterdvEXT) (GLuint, GLenum, GLuint, GLdouble*); extern pfn_glGetNamedProgramLocalParameterdvEXT fp_glGetNamedProgramLocalParameterdvEXT; typedef void (APIENTRYP pfn_glGetNamedProgramLocalParameterfvEXT) (GLuint, GLenum, GLuint, GLfloat*); extern pfn_glGetNamedProgramLocalParameterfvEXT fp_glGetNamedProgramLocalParameterfvEXT; typedef void (APIENTRYP pfn_glGetNamedProgramivEXT) (GLuint, GLenum, GLenum, GLint*); extern pfn_glGetNamedProgramivEXT fp_glGetNamedProgramivEXT; typedef void (APIENTRYP pfn_glGetNamedProgramStringEXT) (GLuint, GLenum, GLenum, void*); extern pfn_glGetNamedProgramStringEXT fp_glGetNamedProgramStringEXT; typedef void (APIENTRYP pfn_glNamedRenderbufferStorageEXT) (GLuint, GLenum, GLsizei, GLsizei); extern pfn_glNamedRenderbufferStorageEXT fp_glNamedRenderbufferStorageEXT; typedef void (APIENTRYP pfn_glGetNamedRenderbufferParameterivEXT) (GLuint, GLenum, GLint*); extern pfn_glGetNamedRenderbufferParameterivEXT fp_glGetNamedRenderbufferParameterivEXT; typedef void (APIENTRYP pfn_glNamedRenderbufferStorageMultisampleEXT) (GLuint, GLsizei, GLenum, GLsizei, GLsizei); extern pfn_glNamedRenderbufferStorageMultisampleEXT fp_glNamedRenderbufferStorageMultisampleEXT; typedef void (APIENTRYP pfn_glNamedRenderbufferStorageMultisampleCoverageEXT) (GLuint, GLsizei, GLsizei, GLenum, GLsizei, GLsizei); extern pfn_glNamedRenderbufferStorageMultisampleCoverageEXT fp_glNamedRenderbufferStorageMultisampleCoverageEXT; typedef GLenum (APIENTRYP pfn_glCheckNamedFramebufferStatusEXT) (GLuint, GLenum); extern pfn_glCheckNamedFramebufferStatusEXT fp_glCheckNamedFramebufferStatusEXT; typedef void (APIENTRYP pfn_glNamedFramebufferTexture1DEXT) (GLuint, GLenum, GLenum, GLuint, GLint); extern pfn_glNamedFramebufferTexture1DEXT fp_glNamedFramebufferTexture1DEXT; typedef void (APIENTRYP pfn_glNamedFramebufferTexture2DEXT) (GLuint, GLenum, GLenum, GLuint, GLint); extern pfn_glNamedFramebufferTexture2DEXT fp_glNamedFramebufferTexture2DEXT; typedef void (APIENTRYP pfn_glNamedFramebufferTexture3DEXT) (GLuint, GLenum, GLenum, GLuint, GLint, GLint); extern pfn_glNamedFramebufferTexture3DEXT fp_glNamedFramebufferTexture3DEXT; typedef void (APIENTRYP pfn_glNamedFramebufferRenderbufferEXT) (GLuint, GLenum, GLenum, GLuint); extern pfn_glNamedFramebufferRenderbufferEXT fp_glNamedFramebufferRenderbufferEXT; typedef void (APIENTRYP pfn_glGetNamedFramebufferAttachmentParameterivEXT) (GLuint, GLenum, GLenum, GLint*); extern pfn_glGetNamedFramebufferAttachmentParameterivEXT fp_glGetNamedFramebufferAttachmentParameterivEXT; typedef void (APIENTRYP pfn_glGenerateTextureMipmapEXT) (GLuint, GLenum); extern pfn_glGenerateTextureMipmapEXT fp_glGenerateTextureMipmapEXT; typedef void (APIENTRYP pfn_glGenerateMultiTexMipmapEXT) (GLenum, GLenum); extern pfn_glGenerateMultiTexMipmapEXT fp_glGenerateMultiTexMipmapEXT; typedef void (APIENTRYP pfn_glFramebufferDrawBufferEXT) (GLuint, GLenum); extern pfn_glFramebufferDrawBufferEXT fp_glFramebufferDrawBufferEXT; typedef void (APIENTRYP pfn_glFramebufferDrawBuffersEXT) (GLuint, GLsizei, const GLenum*); extern pfn_glFramebufferDrawBuffersEXT fp_glFramebufferDrawBuffersEXT; typedef void (APIENTRYP pfn_glFramebufferReadBufferEXT) (GLuint, GLenum); extern pfn_glFramebufferReadBufferEXT fp_glFramebufferReadBufferEXT; typedef void (APIENTRYP pfn_glGetFramebufferParameterivEXT) (GLuint, GLenum, GLint*); extern pfn_glGetFramebufferParameterivEXT fp_glGetFramebufferParameterivEXT; typedef void (APIENTRYP pfn_glNamedCopyBufferSubDataEXT) (GLuint, GLuint, GLintptr, GLintptr, GLsizeiptr); extern pfn_glNamedCopyBufferSubDataEXT fp_glNamedCopyBufferSubDataEXT; typedef void (APIENTRYP pfn_glNamedFramebufferTextureEXT) (GLuint, GLenum, GLuint, GLint); extern pfn_glNamedFramebufferTextureEXT fp_glNamedFramebufferTextureEXT; typedef void (APIENTRYP pfn_glNamedFramebufferTextureLayerEXT) (GLuint, GLenum, GLuint, GLint, GLint); extern pfn_glNamedFramebufferTextureLayerEXT fp_glNamedFramebufferTextureLayerEXT; typedef void (APIENTRYP pfn_glNamedFramebufferTextureFaceEXT) (GLuint, GLenum, GLuint, GLint, GLenum); extern pfn_glNamedFramebufferTextureFaceEXT fp_glNamedFramebufferTextureFaceEXT; typedef void (APIENTRYP pfn_glTextureRenderbufferEXT) (GLuint, GLenum, GLuint); extern pfn_glTextureRenderbufferEXT fp_glTextureRenderbufferEXT; typedef void (APIENTRYP pfn_glMultiTexRenderbufferEXT) (GLenum, GLenum, GLuint); extern pfn_glMultiTexRenderbufferEXT fp_glMultiTexRenderbufferEXT; typedef void (APIENTRYP pfn_glVertexArrayVertexOffsetEXT) (GLuint, GLuint, GLint, GLenum, GLsizei, GLintptr); extern pfn_glVertexArrayVertexOffsetEXT fp_glVertexArrayVertexOffsetEXT; typedef void (APIENTRYP pfn_glVertexArrayColorOffsetEXT) (GLuint, GLuint, GLint, GLenum, GLsizei, GLintptr); extern pfn_glVertexArrayColorOffsetEXT fp_glVertexArrayColorOffsetEXT; typedef void (APIENTRYP pfn_glVertexArrayEdgeFlagOffsetEXT) (GLuint, GLuint, GLsizei, GLintptr); extern pfn_glVertexArrayEdgeFlagOffsetEXT fp_glVertexArrayEdgeFlagOffsetEXT; typedef void (APIENTRYP pfn_glVertexArrayIndexOffsetEXT) (GLuint, GLuint, GLenum, GLsizei, GLintptr); extern pfn_glVertexArrayIndexOffsetEXT fp_glVertexArrayIndexOffsetEXT; typedef void (APIENTRYP pfn_glVertexArrayNormalOffsetEXT) (GLuint, GLuint, GLenum, GLsizei, GLintptr); extern pfn_glVertexArrayNormalOffsetEXT fp_glVertexArrayNormalOffsetEXT; typedef void (APIENTRYP pfn_glVertexArrayTexCoordOffsetEXT) (GLuint, GLuint, GLint, GLenum, GLsizei, GLintptr); extern pfn_glVertexArrayTexCoordOffsetEXT fp_glVertexArrayTexCoordOffsetEXT; typedef void (APIENTRYP pfn_glVertexArrayMultiTexCoordOffsetEXT) (GLuint, GLuint, GLenum, GLint, GLenum, GLsizei, GLintptr); extern pfn_glVertexArrayMultiTexCoordOffsetEXT fp_glVertexArrayMultiTexCoordOffsetEXT; typedef void (APIENTRYP pfn_glVertexArrayFogCoordOffsetEXT) (GLuint, GLuint, GLenum, GLsizei, GLintptr); extern pfn_glVertexArrayFogCoordOffsetEXT fp_glVertexArrayFogCoordOffsetEXT; typedef void (APIENTRYP pfn_glVertexArraySecondaryColorOffsetEXT) (GLuint, GLuint, GLint, GLenum, GLsizei, GLintptr); extern pfn_glVertexArraySecondaryColorOffsetEXT fp_glVertexArraySecondaryColorOffsetEXT; typedef void (APIENTRYP pfn_glVertexArrayVertexAttribOffsetEXT) (GLuint, GLuint, GLuint, GLint, GLenum, GLboolean, GLsizei, GLintptr); extern pfn_glVertexArrayVertexAttribOffsetEXT fp_glVertexArrayVertexAttribOffsetEXT; typedef void (APIENTRYP pfn_glVertexArrayVertexAttribIOffsetEXT) (GLuint, GLuint, GLuint, GLint, GLenum, GLsizei, GLintptr); extern pfn_glVertexArrayVertexAttribIOffsetEXT fp_glVertexArrayVertexAttribIOffsetEXT; typedef void (APIENTRYP pfn_glEnableVertexArrayEXT) (GLuint, GLenum); extern pfn_glEnableVertexArrayEXT fp_glEnableVertexArrayEXT; typedef void (APIENTRYP pfn_glDisableVertexArrayEXT) (GLuint, GLenum); extern pfn_glDisableVertexArrayEXT fp_glDisableVertexArrayEXT; typedef void (APIENTRYP pfn_glEnableVertexArrayAttribEXT) (GLuint, GLuint); extern pfn_glEnableVertexArrayAttribEXT fp_glEnableVertexArrayAttribEXT; typedef void (APIENTRYP pfn_glDisableVertexArrayAttribEXT) (GLuint, GLuint); extern pfn_glDisableVertexArrayAttribEXT fp_glDisableVertexArrayAttribEXT; typedef void (APIENTRYP pfn_glGetVertexArrayIntegervEXT) (GLuint, GLenum, GLint*); extern pfn_glGetVertexArrayIntegervEXT fp_glGetVertexArrayIntegervEXT; typedef void (APIENTRYP pfn_glGetVertexArrayPointervEXT) (GLuint, GLenum, void**); extern pfn_glGetVertexArrayPointervEXT fp_glGetVertexArrayPointervEXT; typedef void (APIENTRYP pfn_glGetVertexArrayIntegeri_vEXT) (GLuint, GLuint, GLenum, GLint*); extern pfn_glGetVertexArrayIntegeri_vEXT fp_glGetVertexArrayIntegeri_vEXT; typedef void (APIENTRYP pfn_glGetVertexArrayPointeri_vEXT) (GLuint, GLuint, GLenum, void**); extern pfn_glGetVertexArrayPointeri_vEXT fp_glGetVertexArrayPointeri_vEXT; typedef void* (APIENTRYP pfn_glMapNamedBufferRangeEXT) (GLuint, GLintptr, GLsizeiptr, GLbitfield); extern pfn_glMapNamedBufferRangeEXT fp_glMapNamedBufferRangeEXT; typedef void (APIENTRYP pfn_glFlushMappedNamedBufferRangeEXT) (GLuint, GLintptr, GLsizeiptr); extern pfn_glFlushMappedNamedBufferRangeEXT fp_glFlushMappedNamedBufferRangeEXT; typedef void (APIENTRYP pfn_glNamedBufferStorageEXT) (GLuint, GLsizeiptr, const void*, GLbitfield); extern pfn_glNamedBufferStorageEXT fp_glNamedBufferStorageEXT; typedef void (APIENTRYP pfn_glClearNamedBufferDataEXT) (GLuint, GLenum, GLenum, GLenum, const void*); extern pfn_glClearNamedBufferDataEXT fp_glClearNamedBufferDataEXT; typedef void (APIENTRYP pfn_glClearNamedBufferSubDataEXT) (GLuint, GLenum, GLsizeiptr, GLsizeiptr, GLenum, GLenum, const void*); extern pfn_glClearNamedBufferSubDataEXT fp_glClearNamedBufferSubDataEXT; typedef void (APIENTRYP pfn_glNamedFramebufferParameteriEXT) (GLuint, GLenum, GLint); extern pfn_glNamedFramebufferParameteriEXT fp_glNamedFramebufferParameteriEXT; typedef void (APIENTRYP pfn_glGetNamedFramebufferParameterivEXT) (GLuint, GLenum, GLint*); extern pfn_glGetNamedFramebufferParameterivEXT fp_glGetNamedFramebufferParameterivEXT; typedef void (APIENTRYP pfn_glProgramUniform1dEXT) (GLuint, GLint, GLdouble); extern pfn_glProgramUniform1dEXT fp_glProgramUniform1dEXT; typedef void (APIENTRYP pfn_glProgramUniform2dEXT) (GLuint, GLint, GLdouble, GLdouble); extern pfn_glProgramUniform2dEXT fp_glProgramUniform2dEXT; typedef void (APIENTRYP pfn_glProgramUniform3dEXT) (GLuint, GLint, GLdouble, GLdouble, GLdouble); extern pfn_glProgramUniform3dEXT fp_glProgramUniform3dEXT; typedef void (APIENTRYP pfn_glProgramUniform4dEXT) (GLuint, GLint, GLdouble, GLdouble, GLdouble, GLdouble); extern pfn_glProgramUniform4dEXT fp_glProgramUniform4dEXT; typedef void (APIENTRYP pfn_glProgramUniform1dvEXT) (GLuint, GLint, GLsizei, const GLdouble*); extern pfn_glProgramUniform1dvEXT fp_glProgramUniform1dvEXT; typedef void (APIENTRYP pfn_glProgramUniform2dvEXT) (GLuint, GLint, GLsizei, const GLdouble*); extern pfn_glProgramUniform2dvEXT fp_glProgramUniform2dvEXT; typedef void (APIENTRYP pfn_glProgramUniform3dvEXT) (GLuint, GLint, GLsizei, const GLdouble*); extern pfn_glProgramUniform3dvEXT fp_glProgramUniform3dvEXT; typedef void (APIENTRYP pfn_glProgramUniform4dvEXT) (GLuint, GLint, GLsizei, const GLdouble*); extern pfn_glProgramUniform4dvEXT fp_glProgramUniform4dvEXT; typedef void (APIENTRYP pfn_glProgramUniformMatrix2dvEXT) (GLuint, GLint, GLsizei, GLboolean, const GLdouble*); extern pfn_glProgramUniformMatrix2dvEXT fp_glProgramUniformMatrix2dvEXT; typedef void (APIENTRYP pfn_glProgramUniformMatrix3dvEXT) (GLuint, GLint, GLsizei, GLboolean, const GLdouble*); extern pfn_glProgramUniformMatrix3dvEXT fp_glProgramUniformMatrix3dvEXT; typedef void (APIENTRYP pfn_glProgramUniformMatrix4dvEXT) (GLuint, GLint, GLsizei, GLboolean, const GLdouble*); extern pfn_glProgramUniformMatrix4dvEXT fp_glProgramUniformMatrix4dvEXT; typedef void (APIENTRYP pfn_glProgramUniformMatrix2x3dvEXT) (GLuint, GLint, GLsizei, GLboolean, const GLdouble*); extern pfn_glProgramUniformMatrix2x3dvEXT fp_glProgramUniformMatrix2x3dvEXT; typedef void (APIENTRYP pfn_glProgramUniformMatrix2x4dvEXT) (GLuint, GLint, GLsizei, GLboolean, const GLdouble*); extern pfn_glProgramUniformMatrix2x4dvEXT fp_glProgramUniformMatrix2x4dvEXT; typedef void (APIENTRYP pfn_glProgramUniformMatrix3x2dvEXT) (GLuint, GLint, GLsizei, GLboolean, const GLdouble*); extern pfn_glProgramUniformMatrix3x2dvEXT fp_glProgramUniformMatrix3x2dvEXT; typedef void (APIENTRYP pfn_glProgramUniformMatrix3x4dvEXT) (GLuint, GLint, GLsizei, GLboolean, const GLdouble*); extern pfn_glProgramUniformMatrix3x4dvEXT fp_glProgramUniformMatrix3x4dvEXT; typedef void (APIENTRYP pfn_glProgramUniformMatrix4x2dvEXT) (GLuint, GLint, GLsizei, GLboolean, const GLdouble*); extern pfn_glProgramUniformMatrix4x2dvEXT fp_glProgramUniformMatrix4x2dvEXT; typedef void (APIENTRYP pfn_glProgramUniformMatrix4x3dvEXT) (GLuint, GLint, GLsizei, GLboolean, const GLdouble*); extern pfn_glProgramUniformMatrix4x3dvEXT fp_glProgramUniformMatrix4x3dvEXT; typedef void (APIENTRYP pfn_glTextureBufferRangeEXT) (GLuint, GLenum, GLenum, GLuint, GLintptr, GLsizeiptr); extern pfn_glTextureBufferRangeEXT fp_glTextureBufferRangeEXT; typedef void (APIENTRYP pfn_glTextureStorage1DEXT) (GLuint, GLenum, GLsizei, GLenum, GLsizei); extern pfn_glTextureStorage1DEXT fp_glTextureStorage1DEXT; typedef void (APIENTRYP pfn_glTextureStorage2DEXT) (GLuint, GLenum, GLsizei, GLenum, GLsizei, GLsizei); extern pfn_glTextureStorage2DEXT fp_glTextureStorage2DEXT; typedef void (APIENTRYP pfn_glTextureStorage3DEXT) (GLuint, GLenum, GLsizei, GLenum, GLsizei, GLsizei, GLsizei); extern pfn_glTextureStorage3DEXT fp_glTextureStorage3DEXT; typedef void (APIENTRYP pfn_glTextureStorage2DMultisampleEXT) (GLuint, GLenum, GLsizei, GLenum, GLsizei, GLsizei, GLboolean); extern pfn_glTextureStorage2DMultisampleEXT fp_glTextureStorage2DMultisampleEXT; typedef void (APIENTRYP pfn_glTextureStorage3DMultisampleEXT) (GLuint, GLenum, GLsizei, GLenum, GLsizei, GLsizei, GLsizei, GLboolean); extern pfn_glTextureStorage3DMultisampleEXT fp_glTextureStorage3DMultisampleEXT; typedef void (APIENTRYP pfn_glVertexArrayBindVertexBufferEXT) (GLuint, GLuint, GLuint, GLintptr, GLsizei); extern pfn_glVertexArrayBindVertexBufferEXT fp_glVertexArrayBindVertexBufferEXT; typedef void (APIENTRYP pfn_glVertexArrayVertexAttribFormatEXT) (GLuint, GLuint, GLint, GLenum, GLboolean, GLuint); extern pfn_glVertexArrayVertexAttribFormatEXT fp_glVertexArrayVertexAttribFormatEXT; typedef void (APIENTRYP pfn_glVertexArrayVertexAttribIFormatEXT) (GLuint, GLuint, GLint, GLenum, GLuint); extern pfn_glVertexArrayVertexAttribIFormatEXT fp_glVertexArrayVertexAttribIFormatEXT; typedef void (APIENTRYP pfn_glVertexArrayVertexAttribLFormatEXT) (GLuint, GLuint, GLint, GLenum, GLuint); extern pfn_glVertexArrayVertexAttribLFormatEXT fp_glVertexArrayVertexAttribLFormatEXT; typedef void (APIENTRYP pfn_glVertexArrayVertexAttribBindingEXT) (GLuint, GLuint, GLuint); extern pfn_glVertexArrayVertexAttribBindingEXT fp_glVertexArrayVertexAttribBindingEXT; typedef void (APIENTRYP pfn_glVertexArrayVertexBindingDivisorEXT) (GLuint, GLuint, GLuint); extern pfn_glVertexArrayVertexBindingDivisorEXT fp_glVertexArrayVertexBindingDivisorEXT; typedef void (APIENTRYP pfn_glVertexArrayVertexAttribLOffsetEXT) (GLuint, GLuint, GLuint, GLint, GLenum, GLsizei, GLintptr); extern pfn_glVertexArrayVertexAttribLOffsetEXT fp_glVertexArrayVertexAttribLOffsetEXT; typedef void (APIENTRYP pfn_glTexturePageCommitmentEXT) (GLuint, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLboolean); extern pfn_glTexturePageCommitmentEXT fp_glTexturePageCommitmentEXT; typedef void (APIENTRYP pfn_glVertexArrayVertexAttribDivisorEXT) (GLuint, GLuint, GLuint); extern pfn_glVertexArrayVertexAttribDivisorEXT fp_glVertexArrayVertexAttribDivisorEXT; /* GL_EXT_discard_framebuffer */ extern GLboolean GLAD_EXT_discard_framebuffer; #define GL_COLOR_EXT 0x1800 #define GL_DEPTH_EXT 0x1801 #define GL_STENCIL_EXT 0x1802 typedef void (APIENTRYP pfn_glDiscardFramebufferEXT) (GLenum, GLsizei, const GLenum*); extern pfn_glDiscardFramebufferEXT fp_glDiscardFramebufferEXT; /* GL_EXT_disjoint_timer_query */ extern GLboolean GLAD_EXT_disjoint_timer_query; #define GL_QUERY_COUNTER_BITS_EXT 0x8864 #define GL_CURRENT_QUERY_EXT 0x8865 #define GL_QUERY_RESULT_EXT 0x8866 #define GL_QUERY_RESULT_AVAILABLE_EXT 0x8867 #define GL_TIME_ELAPSED_EXT 0x88BF #define GL_TIMESTAMP_EXT 0x8E28 #define GL_GPU_DISJOINT_EXT 0x8FBB typedef void (APIENTRYP pfn_glGenQueriesEXT) (GLsizei, GLuint*); extern pfn_glGenQueriesEXT fp_glGenQueriesEXT; typedef void (APIENTRYP pfn_glDeleteQueriesEXT) (GLsizei, const GLuint*); extern pfn_glDeleteQueriesEXT fp_glDeleteQueriesEXT; typedef GLboolean (APIENTRYP pfn_glIsQueryEXT) (GLuint); extern pfn_glIsQueryEXT fp_glIsQueryEXT; typedef void (APIENTRYP pfn_glBeginQueryEXT) (GLenum, GLuint); extern pfn_glBeginQueryEXT fp_glBeginQueryEXT; typedef void (APIENTRYP pfn_glEndQueryEXT) (GLenum); extern pfn_glEndQueryEXT fp_glEndQueryEXT; typedef void (APIENTRYP pfn_glQueryCounterEXT) (GLuint, GLenum); extern pfn_glQueryCounterEXT fp_glQueryCounterEXT; typedef void (APIENTRYP pfn_glGetQueryivEXT) (GLenum, GLenum, GLint*); extern pfn_glGetQueryivEXT fp_glGetQueryivEXT; typedef void (APIENTRYP pfn_glGetQueryObjectivEXT) (GLuint, GLenum, GLint*); extern pfn_glGetQueryObjectivEXT fp_glGetQueryObjectivEXT; typedef void (APIENTRYP pfn_glGetQueryObjectuivEXT) (GLuint, GLenum, GLuint*); extern pfn_glGetQueryObjectuivEXT fp_glGetQueryObjectuivEXT; typedef void (APIENTRYP pfn_glGetQueryObjecti64vEXT) (GLuint, GLenum, GLint64*); extern pfn_glGetQueryObjecti64vEXT fp_glGetQueryObjecti64vEXT; typedef void (APIENTRYP pfn_glGetQueryObjectui64vEXT) (GLuint, GLenum, GLuint64*); extern pfn_glGetQueryObjectui64vEXT fp_glGetQueryObjectui64vEXT; /* GL_EXT_draw_buffers */ extern GLboolean GLAD_EXT_draw_buffers; #define GL_MAX_COLOR_ATTACHMENTS_EXT 0x8CDF #define GL_MAX_DRAW_BUFFERS_EXT 0x8824 #define GL_DRAW_BUFFER0_EXT 0x8825 #define GL_DRAW_BUFFER1_EXT 0x8826 #define GL_DRAW_BUFFER2_EXT 0x8827 #define GL_DRAW_BUFFER3_EXT 0x8828 #define GL_DRAW_BUFFER4_EXT 0x8829 #define GL_DRAW_BUFFER5_EXT 0x882A #define GL_DRAW_BUFFER6_EXT 0x882B #define GL_DRAW_BUFFER7_EXT 0x882C #define GL_DRAW_BUFFER8_EXT 0x882D #define GL_DRAW_BUFFER9_EXT 0x882E #define GL_DRAW_BUFFER10_EXT 0x882F #define GL_DRAW_BUFFER11_EXT 0x8830 #define GL_DRAW_BUFFER12_EXT 0x8831 #define GL_DRAW_BUFFER13_EXT 0x8832 #define GL_DRAW_BUFFER14_EXT 0x8833 #define GL_DRAW_BUFFER15_EXT 0x8834 #define GL_COLOR_ATTACHMENT0_EXT 0x8CE0 #define GL_COLOR_ATTACHMENT1_EXT 0x8CE1 #define GL_COLOR_ATTACHMENT2_EXT 0x8CE2 #define GL_COLOR_ATTACHMENT3_EXT 0x8CE3 #define GL_COLOR_ATTACHMENT4_EXT 0x8CE4 #define GL_COLOR_ATTACHMENT5_EXT 0x8CE5 #define GL_COLOR_ATTACHMENT6_EXT 0x8CE6 #define GL_COLOR_ATTACHMENT7_EXT 0x8CE7 #define GL_COLOR_ATTACHMENT8_EXT 0x8CE8 #define GL_COLOR_ATTACHMENT9_EXT 0x8CE9 #define GL_COLOR_ATTACHMENT10_EXT 0x8CEA #define GL_COLOR_ATTACHMENT11_EXT 0x8CEB #define GL_COLOR_ATTACHMENT12_EXT 0x8CEC #define GL_COLOR_ATTACHMENT13_EXT 0x8CED #define GL_COLOR_ATTACHMENT14_EXT 0x8CEE #define GL_COLOR_ATTACHMENT15_EXT 0x8CEF typedef void (APIENTRYP pfn_glDrawBuffersEXT) (GLsizei, const GLenum*); extern pfn_glDrawBuffersEXT fp_glDrawBuffersEXT; /* GL_EXT_draw_buffers2 */ extern GLboolean GLAD_EXT_draw_buffers2; typedef void (APIENTRYP pfn_glColorMaskIndexedEXT) (GLuint, GLboolean, GLboolean, GLboolean, GLboolean); extern pfn_glColorMaskIndexedEXT fp_glColorMaskIndexedEXT; /* GL_EXT_draw_buffers_indexed */ extern GLboolean GLAD_EXT_draw_buffers_indexed; typedef void (APIENTRYP pfn_glEnableiEXT) (GLenum, GLuint); extern pfn_glEnableiEXT fp_glEnableiEXT; typedef void (APIENTRYP pfn_glDisableiEXT) (GLenum, GLuint); extern pfn_glDisableiEXT fp_glDisableiEXT; typedef void (APIENTRYP pfn_glBlendEquationiEXT) (GLuint, GLenum); extern pfn_glBlendEquationiEXT fp_glBlendEquationiEXT; typedef void (APIENTRYP pfn_glBlendEquationSeparateiEXT) (GLuint, GLenum, GLenum); extern pfn_glBlendEquationSeparateiEXT fp_glBlendEquationSeparateiEXT; typedef void (APIENTRYP pfn_glBlendFunciEXT) (GLuint, GLenum, GLenum); extern pfn_glBlendFunciEXT fp_glBlendFunciEXT; typedef void (APIENTRYP pfn_glBlendFuncSeparateiEXT) (GLuint, GLenum, GLenum, GLenum, GLenum); extern pfn_glBlendFuncSeparateiEXT fp_glBlendFuncSeparateiEXT; typedef void (APIENTRYP pfn_glColorMaskiEXT) (GLuint, GLboolean, GLboolean, GLboolean, GLboolean); extern pfn_glColorMaskiEXT fp_glColorMaskiEXT; typedef GLboolean (APIENTRYP pfn_glIsEnablediEXT) (GLenum, GLuint); extern pfn_glIsEnablediEXT fp_glIsEnablediEXT; /* GL_EXT_draw_elements_base_vertex */ extern GLboolean GLAD_EXT_draw_elements_base_vertex; typedef void (APIENTRYP pfn_glDrawElementsBaseVertexEXT) (GLenum, GLsizei, GLenum, const void*, GLint); extern pfn_glDrawElementsBaseVertexEXT fp_glDrawElementsBaseVertexEXT; typedef void (APIENTRYP pfn_glDrawRangeElementsBaseVertexEXT) (GLenum, GLuint, GLuint, GLsizei, GLenum, const void*, GLint); extern pfn_glDrawRangeElementsBaseVertexEXT fp_glDrawRangeElementsBaseVertexEXT; typedef void (APIENTRYP pfn_glDrawElementsInstancedBaseVertexEXT) (GLenum, GLsizei, GLenum, const void*, GLsizei, GLint); extern pfn_glDrawElementsInstancedBaseVertexEXT fp_glDrawElementsInstancedBaseVertexEXT; typedef void (APIENTRYP pfn_glMultiDrawElementsBaseVertexEXT) (GLenum, const GLsizei*, GLenum, const void**, GLsizei, const GLint*); extern pfn_glMultiDrawElementsBaseVertexEXT fp_glMultiDrawElementsBaseVertexEXT; /* GL_EXT_draw_instanced */ extern GLboolean GLAD_EXT_draw_instanced; typedef void (APIENTRYP pfn_glDrawArraysInstancedEXT) (GLenum, GLint, GLsizei, GLsizei); extern pfn_glDrawArraysInstancedEXT fp_glDrawArraysInstancedEXT; typedef void (APIENTRYP pfn_glDrawElementsInstancedEXT) (GLenum, GLsizei, GLenum, const void*, GLsizei); extern pfn_glDrawElementsInstancedEXT fp_glDrawElementsInstancedEXT; /* GL_EXT_float_blend */ extern GLboolean GLAD_EXT_float_blend; /* GL_EXT_framebuffer_blit */ extern GLboolean GLAD_EXT_framebuffer_blit; #define GL_READ_FRAMEBUFFER_EXT 0x8CA8 #define GL_DRAW_FRAMEBUFFER_EXT 0x8CA9 #define GL_DRAW_FRAMEBUFFER_BINDING_EXT 0x8CA6 #define GL_READ_FRAMEBUFFER_BINDING_EXT 0x8CAA typedef void (APIENTRYP pfn_glBlitFramebufferEXT) (GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLbitfield, GLenum); extern pfn_glBlitFramebufferEXT fp_glBlitFramebufferEXT; /* GL_EXT_framebuffer_multisample */ extern GLboolean GLAD_EXT_framebuffer_multisample; #define GL_RENDERBUFFER_SAMPLES_EXT 0x8CAB #define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT 0x8D56 #define GL_MAX_SAMPLES_EXT 0x8D57 typedef void (APIENTRYP pfn_glRenderbufferStorageMultisampleEXT) (GLenum, GLsizei, GLenum, GLsizei, GLsizei); extern pfn_glRenderbufferStorageMultisampleEXT fp_glRenderbufferStorageMultisampleEXT; /* GL_EXT_framebuffer_multisample_blit_scaled */ extern GLboolean GLAD_EXT_framebuffer_multisample_blit_scaled; #define GL_SCALED_RESOLVE_FASTEST_EXT 0x90BA #define GL_SCALED_RESOLVE_NICEST_EXT 0x90BB /* GL_EXT_framebuffer_object */ extern GLboolean GLAD_EXT_framebuffer_object; #define GL_INVALID_FRAMEBUFFER_OPERATION_EXT 0x0506 #define GL_MAX_RENDERBUFFER_SIZE_EXT 0x84E8 #define GL_FRAMEBUFFER_BINDING_EXT 0x8CA6 #define GL_RENDERBUFFER_BINDING_EXT 0x8CA7 #define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT 0x8CD0 #define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT 0x8CD1 #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT 0x8CD2 #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT 0x8CD3 #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT 0x8CD4 #define GL_FRAMEBUFFER_COMPLETE_EXT 0x8CD5 #define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT 0x8CD6 #define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT 0x8CD7 #define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT 0x8CD9 #define GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT 0x8CDA #define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT 0x8CDB #define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT 0x8CDC #define GL_FRAMEBUFFER_UNSUPPORTED_EXT 0x8CDD #define GL_DEPTH_ATTACHMENT_EXT 0x8D00 #define GL_STENCIL_ATTACHMENT_EXT 0x8D20 #define GL_FRAMEBUFFER_EXT 0x8D40 #define GL_RENDERBUFFER_EXT 0x8D41 #define GL_RENDERBUFFER_WIDTH_EXT 0x8D42 #define GL_RENDERBUFFER_HEIGHT_EXT 0x8D43 #define GL_RENDERBUFFER_INTERNAL_FORMAT_EXT 0x8D44 #define GL_STENCIL_INDEX1_EXT 0x8D46 #define GL_STENCIL_INDEX4_EXT 0x8D47 #define GL_STENCIL_INDEX8_EXT 0x8D48 #define GL_STENCIL_INDEX16_EXT 0x8D49 #define GL_RENDERBUFFER_RED_SIZE_EXT 0x8D50 #define GL_RENDERBUFFER_GREEN_SIZE_EXT 0x8D51 #define GL_RENDERBUFFER_BLUE_SIZE_EXT 0x8D52 #define GL_RENDERBUFFER_ALPHA_SIZE_EXT 0x8D53 #define GL_RENDERBUFFER_DEPTH_SIZE_EXT 0x8D54 #define GL_RENDERBUFFER_STENCIL_SIZE_EXT 0x8D55 typedef GLboolean (APIENTRYP pfn_glIsRenderbufferEXT) (GLuint); extern pfn_glIsRenderbufferEXT fp_glIsRenderbufferEXT; typedef void (APIENTRYP pfn_glBindRenderbufferEXT) (GLenum, GLuint); extern pfn_glBindRenderbufferEXT fp_glBindRenderbufferEXT; typedef void (APIENTRYP pfn_glDeleteRenderbuffersEXT) (GLsizei, const GLuint*); extern pfn_glDeleteRenderbuffersEXT fp_glDeleteRenderbuffersEXT; typedef void (APIENTRYP pfn_glGenRenderbuffersEXT) (GLsizei, GLuint*); extern pfn_glGenRenderbuffersEXT fp_glGenRenderbuffersEXT; typedef void (APIENTRYP pfn_glRenderbufferStorageEXT) (GLenum, GLenum, GLsizei, GLsizei); extern pfn_glRenderbufferStorageEXT fp_glRenderbufferStorageEXT; typedef void (APIENTRYP pfn_glGetRenderbufferParameterivEXT) (GLenum, GLenum, GLint*); extern pfn_glGetRenderbufferParameterivEXT fp_glGetRenderbufferParameterivEXT; typedef GLboolean (APIENTRYP pfn_glIsFramebufferEXT) (GLuint); extern pfn_glIsFramebufferEXT fp_glIsFramebufferEXT; typedef void (APIENTRYP pfn_glBindFramebufferEXT) (GLenum, GLuint); extern pfn_glBindFramebufferEXT fp_glBindFramebufferEXT; typedef void (APIENTRYP pfn_glDeleteFramebuffersEXT) (GLsizei, const GLuint*); extern pfn_glDeleteFramebuffersEXT fp_glDeleteFramebuffersEXT; typedef void (APIENTRYP pfn_glGenFramebuffersEXT) (GLsizei, GLuint*); extern pfn_glGenFramebuffersEXT fp_glGenFramebuffersEXT; typedef GLenum (APIENTRYP pfn_glCheckFramebufferStatusEXT) (GLenum); extern pfn_glCheckFramebufferStatusEXT fp_glCheckFramebufferStatusEXT; typedef void (APIENTRYP pfn_glFramebufferTexture1DEXT) (GLenum, GLenum, GLenum, GLuint, GLint); extern pfn_glFramebufferTexture1DEXT fp_glFramebufferTexture1DEXT; typedef void (APIENTRYP pfn_glFramebufferTexture2DEXT) (GLenum, GLenum, GLenum, GLuint, GLint); extern pfn_glFramebufferTexture2DEXT fp_glFramebufferTexture2DEXT; typedef void (APIENTRYP pfn_glFramebufferTexture3DEXT) (GLenum, GLenum, GLenum, GLuint, GLint, GLint); extern pfn_glFramebufferTexture3DEXT fp_glFramebufferTexture3DEXT; typedef void (APIENTRYP pfn_glFramebufferRenderbufferEXT) (GLenum, GLenum, GLenum, GLuint); extern pfn_glFramebufferRenderbufferEXT fp_glFramebufferRenderbufferEXT; typedef void (APIENTRYP pfn_glGetFramebufferAttachmentParameterivEXT) (GLenum, GLenum, GLenum, GLint*); extern pfn_glGetFramebufferAttachmentParameterivEXT fp_glGetFramebufferAttachmentParameterivEXT; typedef void (APIENTRYP pfn_glGenerateMipmapEXT) (GLenum); extern pfn_glGenerateMipmapEXT fp_glGenerateMipmapEXT; /* GL_EXT_framebuffer_sRGB */ extern GLboolean GLAD_EXT_framebuffer_sRGB; #define GL_FRAMEBUFFER_SRGB_EXT 0x8DB9 #define GL_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x8DBA /* GL_EXT_geometry_point_size */ extern GLboolean GLAD_EXT_geometry_point_size; /* GL_EXT_geometry_shader */ extern GLboolean GLAD_EXT_geometry_shader; #define GL_GEOMETRY_SHADER_EXT 0x8DD9 #define GL_GEOMETRY_SHADER_BIT_EXT 0x00000004 #define GL_GEOMETRY_LINKED_VERTICES_OUT_EXT 0x8916 #define GL_GEOMETRY_LINKED_INPUT_TYPE_EXT 0x8917 #define GL_GEOMETRY_LINKED_OUTPUT_TYPE_EXT 0x8918 #define GL_GEOMETRY_SHADER_INVOCATIONS_EXT 0x887F #define GL_LAYER_PROVOKING_VERTEX_EXT 0x825E #define GL_LINES_ADJACENCY_EXT 0x000A #define GL_LINE_STRIP_ADJACENCY_EXT 0x000B #define GL_TRIANGLES_ADJACENCY_EXT 0x000C #define GL_TRIANGLE_STRIP_ADJACENCY_EXT 0x000D #define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_EXT 0x8DDF #define GL_MAX_GEOMETRY_UNIFORM_BLOCKS_EXT 0x8A2C #define GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS_EXT 0x8A32 #define GL_MAX_GEOMETRY_INPUT_COMPONENTS_EXT 0x9123 #define GL_MAX_GEOMETRY_OUTPUT_COMPONENTS_EXT 0x9124 #define GL_MAX_GEOMETRY_OUTPUT_VERTICES_EXT 0x8DE0 #define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_EXT 0x8DE1 #define GL_MAX_GEOMETRY_SHADER_INVOCATIONS_EXT 0x8E5A #define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT 0x8C29 #define GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS_EXT 0x92CF #define GL_MAX_GEOMETRY_ATOMIC_COUNTERS_EXT 0x92D5 #define GL_MAX_GEOMETRY_IMAGE_UNIFORMS_EXT 0x90CD #define GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS_EXT 0x90D7 #define GL_FIRST_VERTEX_CONVENTION_EXT 0x8E4D #define GL_LAST_VERTEX_CONVENTION_EXT 0x8E4E #define GL_UNDEFINED_VERTEX_EXT 0x8260 #define GL_PRIMITIVES_GENERATED_EXT 0x8C87 #define GL_FRAMEBUFFER_DEFAULT_LAYERS_EXT 0x9312 #define GL_MAX_FRAMEBUFFER_LAYERS_EXT 0x9317 #define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT 0x8DA8 #define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT 0x8DA7 #define GL_REFERENCED_BY_GEOMETRY_SHADER_EXT 0x9309 typedef void (APIENTRYP pfn_glFramebufferTextureEXT) (GLenum, GLenum, GLuint, GLint); extern pfn_glFramebufferTextureEXT fp_glFramebufferTextureEXT; /* GL_EXT_geometry_shader4 */ extern GLboolean GLAD_EXT_geometry_shader4; #define GL_GEOMETRY_VERTICES_OUT_EXT 0x8DDA #define GL_GEOMETRY_INPUT_TYPE_EXT 0x8DDB #define GL_GEOMETRY_OUTPUT_TYPE_EXT 0x8DDC #define GL_MAX_GEOMETRY_VARYING_COMPONENTS_EXT 0x8DDD #define GL_MAX_VERTEX_VARYING_COMPONENTS_EXT 0x8DDE #define GL_MAX_VARYING_COMPONENTS_EXT 0x8B4B #define GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT 0x8DA9 #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT 0x8CD4 #define GL_PROGRAM_POINT_SIZE_EXT 0x8642 typedef void (APIENTRYP pfn_glProgramParameteriEXT) (GLuint, GLenum, GLint); extern pfn_glProgramParameteriEXT fp_glProgramParameteriEXT; /* GL_EXT_gpu_program_parameters */ extern GLboolean GLAD_EXT_gpu_program_parameters; typedef void (APIENTRYP pfn_glProgramEnvParameters4fvEXT) (GLenum, GLuint, GLsizei, const GLfloat*); extern pfn_glProgramEnvParameters4fvEXT fp_glProgramEnvParameters4fvEXT; typedef void (APIENTRYP pfn_glProgramLocalParameters4fvEXT) (GLenum, GLuint, GLsizei, const GLfloat*); extern pfn_glProgramLocalParameters4fvEXT fp_glProgramLocalParameters4fvEXT; /* GL_EXT_gpu_shader4 */ extern GLboolean GLAD_EXT_gpu_shader4; #define GL_VERTEX_ATTRIB_ARRAY_INTEGER_EXT 0x88FD #define GL_SAMPLER_1D_ARRAY_EXT 0x8DC0 #define GL_SAMPLER_2D_ARRAY_EXT 0x8DC1 #define GL_SAMPLER_BUFFER_EXT 0x8DC2 #define GL_SAMPLER_1D_ARRAY_SHADOW_EXT 0x8DC3 #define GL_SAMPLER_2D_ARRAY_SHADOW_EXT 0x8DC4 #define GL_SAMPLER_CUBE_SHADOW_EXT 0x8DC5 #define GL_UNSIGNED_INT_VEC2_EXT 0x8DC6 #define GL_UNSIGNED_INT_VEC3_EXT 0x8DC7 #define GL_UNSIGNED_INT_VEC4_EXT 0x8DC8 #define GL_INT_SAMPLER_1D_EXT 0x8DC9 #define GL_INT_SAMPLER_2D_EXT 0x8DCA #define GL_INT_SAMPLER_3D_EXT 0x8DCB #define GL_INT_SAMPLER_CUBE_EXT 0x8DCC #define GL_INT_SAMPLER_2D_RECT_EXT 0x8DCD #define GL_INT_SAMPLER_1D_ARRAY_EXT 0x8DCE #define GL_INT_SAMPLER_2D_ARRAY_EXT 0x8DCF #define GL_INT_SAMPLER_BUFFER_EXT 0x8DD0 #define GL_UNSIGNED_INT_SAMPLER_1D_EXT 0x8DD1 #define GL_UNSIGNED_INT_SAMPLER_2D_EXT 0x8DD2 #define GL_UNSIGNED_INT_SAMPLER_3D_EXT 0x8DD3 #define GL_UNSIGNED_INT_SAMPLER_CUBE_EXT 0x8DD4 #define GL_UNSIGNED_INT_SAMPLER_2D_RECT_EXT 0x8DD5 #define GL_UNSIGNED_INT_SAMPLER_1D_ARRAY_EXT 0x8DD6 #define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY_EXT 0x8DD7 #define GL_UNSIGNED_INT_SAMPLER_BUFFER_EXT 0x8DD8 #define GL_MIN_PROGRAM_TEXEL_OFFSET_EXT 0x8904 #define GL_MAX_PROGRAM_TEXEL_OFFSET_EXT 0x8905 typedef void (APIENTRYP pfn_glGetUniformuivEXT) (GLuint, GLint, GLuint*); extern pfn_glGetUniformuivEXT fp_glGetUniformuivEXT; typedef GLint (APIENTRYP pfn_glGetFragDataLocationEXT) (GLuint, const GLchar*); extern pfn_glGetFragDataLocationEXT fp_glGetFragDataLocationEXT; typedef void (APIENTRYP pfn_glUniform1uiEXT) (GLint, GLuint); extern pfn_glUniform1uiEXT fp_glUniform1uiEXT; typedef void (APIENTRYP pfn_glUniform2uiEXT) (GLint, GLuint, GLuint); extern pfn_glUniform2uiEXT fp_glUniform2uiEXT; typedef void (APIENTRYP pfn_glUniform3uiEXT) (GLint, GLuint, GLuint, GLuint); extern pfn_glUniform3uiEXT fp_glUniform3uiEXT; typedef void (APIENTRYP pfn_glUniform4uiEXT) (GLint, GLuint, GLuint, GLuint, GLuint); extern pfn_glUniform4uiEXT fp_glUniform4uiEXT; typedef void (APIENTRYP pfn_glUniform1uivEXT) (GLint, GLsizei, const GLuint*); extern pfn_glUniform1uivEXT fp_glUniform1uivEXT; typedef void (APIENTRYP pfn_glUniform2uivEXT) (GLint, GLsizei, const GLuint*); extern pfn_glUniform2uivEXT fp_glUniform2uivEXT; typedef void (APIENTRYP pfn_glUniform3uivEXT) (GLint, GLsizei, const GLuint*); extern pfn_glUniform3uivEXT fp_glUniform3uivEXT; typedef void (APIENTRYP pfn_glUniform4uivEXT) (GLint, GLsizei, const GLuint*); extern pfn_glUniform4uivEXT fp_glUniform4uivEXT; /* GL_EXT_gpu_shader5 */ extern GLboolean GLAD_EXT_gpu_shader5; /* GL_EXT_instanced_arrays */ extern GLboolean GLAD_EXT_instanced_arrays; #define GL_VERTEX_ATTRIB_ARRAY_DIVISOR_EXT 0x88FE typedef void (APIENTRYP pfn_glVertexAttribDivisorEXT) (GLuint, GLuint); extern pfn_glVertexAttribDivisorEXT fp_glVertexAttribDivisorEXT; /* GL_EXT_map_buffer_range */ extern GLboolean GLAD_EXT_map_buffer_range; #define GL_MAP_READ_BIT_EXT 0x0001 #define GL_MAP_WRITE_BIT_EXT 0x0002 #define GL_MAP_INVALIDATE_RANGE_BIT_EXT 0x0004 #define GL_MAP_INVALIDATE_BUFFER_BIT_EXT 0x0008 #define GL_MAP_FLUSH_EXPLICIT_BIT_EXT 0x0010 #define GL_MAP_UNSYNCHRONIZED_BIT_EXT 0x0020 typedef void* (APIENTRYP pfn_glMapBufferRangeEXT) (GLenum, GLintptr, GLsizeiptr, GLbitfield); extern pfn_glMapBufferRangeEXT fp_glMapBufferRangeEXT; typedef void (APIENTRYP pfn_glFlushMappedBufferRangeEXT) (GLenum, GLintptr, GLsizeiptr); extern pfn_glFlushMappedBufferRangeEXT fp_glFlushMappedBufferRangeEXT; /* GL_EXT_multi_draw_indirect */ extern GLboolean GLAD_EXT_multi_draw_indirect; typedef void (APIENTRYP pfn_glMultiDrawArraysIndirectEXT) (GLenum, const void*, GLsizei, GLsizei); extern pfn_glMultiDrawArraysIndirectEXT fp_glMultiDrawArraysIndirectEXT; typedef void (APIENTRYP pfn_glMultiDrawElementsIndirectEXT) (GLenum, GLenum, const void*, GLsizei, GLsizei); extern pfn_glMultiDrawElementsIndirectEXT fp_glMultiDrawElementsIndirectEXT; /* GL_EXT_multisampled_compatibility */ extern GLboolean GLAD_EXT_multisampled_compatibility; #define GL_MULTISAMPLE_EXT 0x809D #define GL_SAMPLE_ALPHA_TO_ONE_EXT 0x809F /* GL_EXT_multisampled_render_to_texture */ extern GLboolean GLAD_EXT_multisampled_render_to_texture; #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_SAMPLES_EXT 0x8D6C typedef void (APIENTRYP pfn_glFramebufferTexture2DMultisampleEXT) (GLenum, GLenum, GLenum, GLuint, GLint, GLsizei); extern pfn_glFramebufferTexture2DMultisampleEXT fp_glFramebufferTexture2DMultisampleEXT; /* GL_EXT_multiview_draw_buffers */ extern GLboolean GLAD_EXT_multiview_draw_buffers; #define GL_COLOR_ATTACHMENT_EXT 0x90F0 #define GL_MULTIVIEW_EXT 0x90F1 #define GL_DRAW_BUFFER_EXT 0x0C01 #define GL_READ_BUFFER_EXT 0x0C02 #define GL_MAX_MULTIVIEW_BUFFERS_EXT 0x90F2 typedef void (APIENTRYP pfn_glReadBufferIndexedEXT) (GLenum, GLint); extern pfn_glReadBufferIndexedEXT fp_glReadBufferIndexedEXT; typedef void (APIENTRYP pfn_glDrawBuffersIndexedEXT) (GLint, const GLenum*, const GLint*); extern pfn_glDrawBuffersIndexedEXT fp_glDrawBuffersIndexedEXT; typedef void (APIENTRYP pfn_glGetIntegeri_vEXT) (GLenum, GLuint, GLint*); extern pfn_glGetIntegeri_vEXT fp_glGetIntegeri_vEXT; /* GL_EXT_occlusion_query_boolean */ extern GLboolean GLAD_EXT_occlusion_query_boolean; #define GL_ANY_SAMPLES_PASSED_EXT 0x8C2F #define GL_ANY_SAMPLES_PASSED_CONSERVATIVE_EXT 0x8D6A /* GL_EXT_packed_depth_stencil */ extern GLboolean GLAD_EXT_packed_depth_stencil; #define GL_DEPTH_STENCIL_EXT 0x84F9 #define GL_UNSIGNED_INT_24_8_EXT 0x84FA #define GL_DEPTH24_STENCIL8_EXT 0x88F0 #define GL_TEXTURE_STENCIL_SIZE_EXT 0x88F1 /* GL_EXT_packed_float */ extern GLboolean GLAD_EXT_packed_float; #define GL_R11F_G11F_B10F_EXT 0x8C3A #define GL_UNSIGNED_INT_10F_11F_11F_REV_EXT 0x8C3B #define GL_RGBA_SIGNED_COMPONENTS_EXT 0x8C3C /* GL_EXT_pixel_buffer_object */ extern GLboolean GLAD_EXT_pixel_buffer_object; #define GL_PIXEL_PACK_BUFFER_EXT 0x88EB #define GL_PIXEL_UNPACK_BUFFER_EXT 0x88EC #define GL_PIXEL_PACK_BUFFER_BINDING_EXT 0x88ED #define GL_PIXEL_UNPACK_BUFFER_BINDING_EXT 0x88EF /* GL_EXT_polygon_offset_clamp */ extern GLboolean GLAD_EXT_polygon_offset_clamp; #define GL_POLYGON_OFFSET_CLAMP_EXT 0x8E1B typedef void (APIENTRYP pfn_glPolygonOffsetClampEXT) (GLfloat, GLfloat, GLfloat); extern pfn_glPolygonOffsetClampEXT fp_glPolygonOffsetClampEXT; /* GL_EXT_post_depth_coverage */ extern GLboolean GLAD_EXT_post_depth_coverage; /* GL_EXT_primitive_bounding_box */ extern GLboolean GLAD_EXT_primitive_bounding_box; #define GL_PRIMITIVE_BOUNDING_BOX_EXT 0x92BE typedef void (APIENTRYP pfn_glPrimitiveBoundingBoxEXT) (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat); extern pfn_glPrimitiveBoundingBoxEXT fp_glPrimitiveBoundingBoxEXT; /* GL_EXT_provoking_vertex */ extern GLboolean GLAD_EXT_provoking_vertex; #define GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION_EXT 0x8E4C #define GL_PROVOKING_VERTEX_EXT 0x8E4F typedef void (APIENTRYP pfn_glProvokingVertexEXT) (GLenum); extern pfn_glProvokingVertexEXT fp_glProvokingVertexEXT; /* GL_EXT_pvrtc_sRGB */ extern GLboolean GLAD_EXT_pvrtc_sRGB; #define GL_COMPRESSED_SRGB_PVRTC_2BPPV1_EXT 0x8A54 #define GL_COMPRESSED_SRGB_PVRTC_4BPPV1_EXT 0x8A55 #define GL_COMPRESSED_SRGB_ALPHA_PVRTC_2BPPV1_EXT 0x8A56 #define GL_COMPRESSED_SRGB_ALPHA_PVRTC_4BPPV1_EXT 0x8A57 #define GL_COMPRESSED_SRGB_ALPHA_PVRTC_2BPPV2_IMG 0x93F0 #define GL_COMPRESSED_SRGB_ALPHA_PVRTC_4BPPV2_IMG 0x93F1 /* GL_EXT_raster_multisample */ extern GLboolean GLAD_EXT_raster_multisample; #define GL_RASTER_MULTISAMPLE_EXT 0x9327 #define GL_RASTER_SAMPLES_EXT 0x9328 #define GL_MAX_RASTER_SAMPLES_EXT 0x9329 #define GL_RASTER_FIXED_SAMPLE_LOCATIONS_EXT 0x932A #define GL_MULTISAMPLE_RASTERIZATION_ALLOWED_EXT 0x932B #define GL_EFFECTIVE_RASTER_SAMPLES_EXT 0x932C typedef void (APIENTRYP pfn_glRasterSamplesEXT) (GLuint, GLboolean); extern pfn_glRasterSamplesEXT fp_glRasterSamplesEXT; /* GL_EXT_read_format_bgra */ extern GLboolean GLAD_EXT_read_format_bgra; #define GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT 0x8365 #define GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT 0x8366 /* GL_EXT_render_snorm */ extern GLboolean GLAD_EXT_render_snorm; #define GL_R16_SNORM_EXT 0x8F98 #define GL_RG16_SNORM_EXT 0x8F99 #define GL_RGBA16_SNORM_EXT 0x8F9B /* GL_EXT_robustness */ extern GLboolean GLAD_EXT_robustness; #define GL_GUILTY_CONTEXT_RESET_EXT 0x8253 #define GL_INNOCENT_CONTEXT_RESET_EXT 0x8254 #define GL_UNKNOWN_CONTEXT_RESET_EXT 0x8255 #define GL_CONTEXT_ROBUST_ACCESS_EXT 0x90F3 #define GL_RESET_NOTIFICATION_STRATEGY_EXT 0x8256 #define GL_LOSE_CONTEXT_ON_RESET_EXT 0x8252 #define GL_NO_RESET_NOTIFICATION_EXT 0x8261 typedef GLenum (APIENTRYP pfn_glGetGraphicsResetStatusEXT) (); extern pfn_glGetGraphicsResetStatusEXT fp_glGetGraphicsResetStatusEXT; typedef void (APIENTRYP pfn_glReadnPixelsEXT) (GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, GLsizei, void*); extern pfn_glReadnPixelsEXT fp_glReadnPixelsEXT; typedef void (APIENTRYP pfn_glGetnUniformfvEXT) (GLuint, GLint, GLsizei, GLfloat*); extern pfn_glGetnUniformfvEXT fp_glGetnUniformfvEXT; typedef void (APIENTRYP pfn_glGetnUniformivEXT) (GLuint, GLint, GLsizei, GLint*); extern pfn_glGetnUniformivEXT fp_glGetnUniformivEXT; /* GL_EXT_separate_shader_objects */ extern GLboolean GLAD_EXT_separate_shader_objects; #define GL_ACTIVE_PROGRAM_EXT 0x8B8D #define GL_VERTEX_SHADER_BIT_EXT 0x00000001 #define GL_FRAGMENT_SHADER_BIT_EXT 0x00000002 #define GL_ALL_SHADER_BITS_EXT 0xFFFFFFFF #define GL_PROGRAM_SEPARABLE_EXT 0x8258 #define GL_PROGRAM_PIPELINE_BINDING_EXT 0x825A typedef void (APIENTRYP pfn_glUseShaderProgramEXT) (GLenum, GLuint); extern pfn_glUseShaderProgramEXT fp_glUseShaderProgramEXT; typedef void (APIENTRYP pfn_glActiveProgramEXT) (GLuint); extern pfn_glActiveProgramEXT fp_glActiveProgramEXT; typedef GLuint (APIENTRYP pfn_glCreateShaderProgramEXT) (GLenum, const GLchar*); extern pfn_glCreateShaderProgramEXT fp_glCreateShaderProgramEXT; typedef void (APIENTRYP pfn_glActiveShaderProgramEXT) (GLuint, GLuint); extern pfn_glActiveShaderProgramEXT fp_glActiveShaderProgramEXT; typedef void (APIENTRYP pfn_glBindProgramPipelineEXT) (GLuint); extern pfn_glBindProgramPipelineEXT fp_glBindProgramPipelineEXT; typedef GLuint (APIENTRYP pfn_glCreateShaderProgramvEXT) (GLenum, GLsizei, const GLchar**); extern pfn_glCreateShaderProgramvEXT fp_glCreateShaderProgramvEXT; typedef void (APIENTRYP pfn_glDeleteProgramPipelinesEXT) (GLsizei, const GLuint*); extern pfn_glDeleteProgramPipelinesEXT fp_glDeleteProgramPipelinesEXT; typedef void (APIENTRYP pfn_glGenProgramPipelinesEXT) (GLsizei, GLuint*); extern pfn_glGenProgramPipelinesEXT fp_glGenProgramPipelinesEXT; typedef void (APIENTRYP pfn_glGetProgramPipelineInfoLogEXT) (GLuint, GLsizei, GLsizei*, GLchar*); extern pfn_glGetProgramPipelineInfoLogEXT fp_glGetProgramPipelineInfoLogEXT; typedef void (APIENTRYP pfn_glGetProgramPipelineivEXT) (GLuint, GLenum, GLint*); extern pfn_glGetProgramPipelineivEXT fp_glGetProgramPipelineivEXT; typedef GLboolean (APIENTRYP pfn_glIsProgramPipelineEXT) (GLuint); extern pfn_glIsProgramPipelineEXT fp_glIsProgramPipelineEXT; typedef void (APIENTRYP pfn_glUseProgramStagesEXT) (GLuint, GLbitfield, GLuint); extern pfn_glUseProgramStagesEXT fp_glUseProgramStagesEXT; typedef void (APIENTRYP pfn_glValidateProgramPipelineEXT) (GLuint); extern pfn_glValidateProgramPipelineEXT fp_glValidateProgramPipelineEXT; /* GL_EXT_shader_framebuffer_fetch */ extern GLboolean GLAD_EXT_shader_framebuffer_fetch; #define GL_FRAGMENT_SHADER_DISCARDS_SAMPLES_EXT 0x8A52 /* GL_EXT_shader_image_load_formatted */ extern GLboolean GLAD_EXT_shader_image_load_formatted; /* GL_EXT_shader_image_load_store */ extern GLboolean GLAD_EXT_shader_image_load_store; #define GL_MAX_IMAGE_UNITS_EXT 0x8F38 #define GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS_EXT 0x8F39 #define GL_IMAGE_BINDING_NAME_EXT 0x8F3A #define GL_IMAGE_BINDING_LEVEL_EXT 0x8F3B #define GL_IMAGE_BINDING_LAYERED_EXT 0x8F3C #define GL_IMAGE_BINDING_LAYER_EXT 0x8F3D #define GL_IMAGE_BINDING_ACCESS_EXT 0x8F3E #define GL_IMAGE_1D_EXT 0x904C #define GL_IMAGE_2D_EXT 0x904D #define GL_IMAGE_3D_EXT 0x904E #define GL_IMAGE_2D_RECT_EXT 0x904F #define GL_IMAGE_CUBE_EXT 0x9050 #define GL_IMAGE_BUFFER_EXT 0x9051 #define GL_IMAGE_1D_ARRAY_EXT 0x9052 #define GL_IMAGE_2D_ARRAY_EXT 0x9053 #define GL_IMAGE_CUBE_MAP_ARRAY_EXT 0x9054 #define GL_IMAGE_2D_MULTISAMPLE_EXT 0x9055 #define GL_IMAGE_2D_MULTISAMPLE_ARRAY_EXT 0x9056 #define GL_INT_IMAGE_1D_EXT 0x9057 #define GL_INT_IMAGE_2D_EXT 0x9058 #define GL_INT_IMAGE_3D_EXT 0x9059 #define GL_INT_IMAGE_2D_RECT_EXT 0x905A #define GL_INT_IMAGE_CUBE_EXT 0x905B #define GL_INT_IMAGE_BUFFER_EXT 0x905C #define GL_INT_IMAGE_1D_ARRAY_EXT 0x905D #define GL_INT_IMAGE_2D_ARRAY_EXT 0x905E #define GL_INT_IMAGE_CUBE_MAP_ARRAY_EXT 0x905F #define GL_INT_IMAGE_2D_MULTISAMPLE_EXT 0x9060 #define GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY_EXT 0x9061 #define GL_UNSIGNED_INT_IMAGE_1D_EXT 0x9062 #define GL_UNSIGNED_INT_IMAGE_2D_EXT 0x9063 #define GL_UNSIGNED_INT_IMAGE_3D_EXT 0x9064 #define GL_UNSIGNED_INT_IMAGE_2D_RECT_EXT 0x9065 #define GL_UNSIGNED_INT_IMAGE_CUBE_EXT 0x9066 #define GL_UNSIGNED_INT_IMAGE_BUFFER_EXT 0x9067 #define GL_UNSIGNED_INT_IMAGE_1D_ARRAY_EXT 0x9068 #define GL_UNSIGNED_INT_IMAGE_2D_ARRAY_EXT 0x9069 #define GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY_EXT 0x906A #define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_EXT 0x906B #define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY_EXT 0x906C #define GL_MAX_IMAGE_SAMPLES_EXT 0x906D #define GL_IMAGE_BINDING_FORMAT_EXT 0x906E #define GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT_EXT 0x00000001 #define GL_ELEMENT_ARRAY_BARRIER_BIT_EXT 0x00000002 #define GL_UNIFORM_BARRIER_BIT_EXT 0x00000004 #define GL_TEXTURE_FETCH_BARRIER_BIT_EXT 0x00000008 #define GL_SHADER_IMAGE_ACCESS_BARRIER_BIT_EXT 0x00000020 #define GL_COMMAND_BARRIER_BIT_EXT 0x00000040 #define GL_PIXEL_BUFFER_BARRIER_BIT_EXT 0x00000080 #define GL_TEXTURE_UPDATE_BARRIER_BIT_EXT 0x00000100 #define GL_BUFFER_UPDATE_BARRIER_BIT_EXT 0x00000200 #define GL_FRAMEBUFFER_BARRIER_BIT_EXT 0x00000400 #define GL_TRANSFORM_FEEDBACK_BARRIER_BIT_EXT 0x00000800 #define GL_ATOMIC_COUNTER_BARRIER_BIT_EXT 0x00001000 #define GL_ALL_BARRIER_BITS_EXT 0xFFFFFFFF typedef void (APIENTRYP pfn_glBindImageTextureEXT) (GLuint, GLuint, GLint, GLboolean, GLint, GLenum, GLint); extern pfn_glBindImageTextureEXT fp_glBindImageTextureEXT; typedef void (APIENTRYP pfn_glMemoryBarrierEXT) (GLbitfield); extern pfn_glMemoryBarrierEXT fp_glMemoryBarrierEXT; /* GL_EXT_shader_implicit_conversions */ extern GLboolean GLAD_EXT_shader_implicit_conversions; /* GL_EXT_shader_integer_mix */ extern GLboolean GLAD_EXT_shader_integer_mix; /* GL_EXT_shader_io_blocks */ extern GLboolean GLAD_EXT_shader_io_blocks; /* GL_EXT_shader_pixel_local_storage */ extern GLboolean GLAD_EXT_shader_pixel_local_storage; #define GL_MAX_SHADER_PIXEL_LOCAL_STORAGE_FAST_SIZE_EXT 0x8F63 #define GL_MAX_SHADER_PIXEL_LOCAL_STORAGE_SIZE_EXT 0x8F67 #define GL_SHADER_PIXEL_LOCAL_STORAGE_EXT 0x8F64 /* GL_EXT_shader_texture_lod */ extern GLboolean GLAD_EXT_shader_texture_lod; /* GL_EXT_shadow_samplers */ extern GLboolean GLAD_EXT_shadow_samplers; #define GL_TEXTURE_COMPARE_MODE_EXT 0x884C #define GL_TEXTURE_COMPARE_FUNC_EXT 0x884D #define GL_COMPARE_REF_TO_TEXTURE_EXT 0x884E #define GL_SAMPLER_2D_SHADOW_EXT 0x8B62 /* GL_EXT_sparse_texture */ extern GLboolean GLAD_EXT_sparse_texture; #define GL_TEXTURE_SPARSE_EXT 0x91A6 #define GL_VIRTUAL_PAGE_SIZE_INDEX_EXT 0x91A7 #define GL_NUM_SPARSE_LEVELS_EXT 0x91AA #define GL_NUM_VIRTUAL_PAGE_SIZES_EXT 0x91A8 #define GL_VIRTUAL_PAGE_SIZE_X_EXT 0x9195 #define GL_VIRTUAL_PAGE_SIZE_Y_EXT 0x9196 #define GL_VIRTUAL_PAGE_SIZE_Z_EXT 0x9197 #define GL_TEXTURE_CUBE_MAP_ARRAY_OES 0x9009 #define GL_MAX_SPARSE_TEXTURE_SIZE_EXT 0x9198 #define GL_MAX_SPARSE_3D_TEXTURE_SIZE_EXT 0x9199 #define GL_MAX_SPARSE_ARRAY_TEXTURE_LAYERS_EXT 0x919A #define GL_SPARSE_TEXTURE_FULL_ARRAY_CUBE_MIPMAPS_EXT 0x91A9 typedef void (APIENTRYP pfn_glTexPageCommitmentEXT) (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLboolean); extern pfn_glTexPageCommitmentEXT fp_glTexPageCommitmentEXT; /* GL_EXT_sparse_texture2 */ extern GLboolean GLAD_EXT_sparse_texture2; /* GL_EXT_sRGB */ extern GLboolean GLAD_EXT_sRGB; #define GL_SRGB_EXT 0x8C40 #define GL_SRGB_ALPHA_EXT 0x8C42 #define GL_SRGB8_ALPHA8_EXT 0x8C43 #define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT 0x8210 /* GL_EXT_sRGB_write_control */ extern GLboolean GLAD_EXT_sRGB_write_control; /* GL_EXT_stencil_clear_tag */ extern GLboolean GLAD_EXT_stencil_clear_tag; #define GL_STENCIL_TAG_BITS_EXT 0x88F2 #define GL_STENCIL_CLEAR_TAG_VALUE_EXT 0x88F3 typedef void (APIENTRYP pfn_glStencilClearTagEXT) (GLsizei, GLuint); extern pfn_glStencilClearTagEXT fp_glStencilClearTagEXT; /* GL_EXT_tessellation_point_size */ extern GLboolean GLAD_EXT_tessellation_point_size; /* GL_EXT_tessellation_shader */ extern GLboolean GLAD_EXT_tessellation_shader; #define GL_PATCHES_EXT 0x000E #define GL_PATCH_VERTICES_EXT 0x8E72 #define GL_TESS_CONTROL_OUTPUT_VERTICES_EXT 0x8E75 #define GL_TESS_GEN_MODE_EXT 0x8E76 #define GL_TESS_GEN_SPACING_EXT 0x8E77 #define GL_TESS_GEN_VERTEX_ORDER_EXT 0x8E78 #define GL_TESS_GEN_POINT_MODE_EXT 0x8E79 #define GL_ISOLINES_EXT 0x8E7A #define GL_QUADS_EXT 0x0007 #define GL_FRACTIONAL_ODD_EXT 0x8E7B #define GL_FRACTIONAL_EVEN_EXT 0x8E7C #define GL_MAX_PATCH_VERTICES_EXT 0x8E7D #define GL_MAX_TESS_GEN_LEVEL_EXT 0x8E7E #define GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS_EXT 0x8E7F #define GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS_EXT 0x8E80 #define GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS_EXT 0x8E81 #define GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS_EXT 0x8E82 #define GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS_EXT 0x8E83 #define GL_MAX_TESS_PATCH_COMPONENTS_EXT 0x8E84 #define GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS_EXT 0x8E85 #define GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS_EXT 0x8E86 #define GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS_EXT 0x8E89 #define GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS_EXT 0x8E8A #define GL_MAX_TESS_CONTROL_INPUT_COMPONENTS_EXT 0x886C #define GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS_EXT 0x886D #define GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS_EXT 0x8E1E #define GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS_EXT 0x8E1F #define GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS_EXT 0x92CD #define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS_EXT 0x92CE #define GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS_EXT 0x92D3 #define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS_EXT 0x92D4 #define GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS_EXT 0x90CB #define GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS_EXT 0x90CC #define GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS_EXT 0x90D8 #define GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS_EXT 0x90D9 #define GL_IS_PER_PATCH_EXT 0x92E7 #define GL_REFERENCED_BY_TESS_CONTROL_SHADER_EXT 0x9307 #define GL_REFERENCED_BY_TESS_EVALUATION_SHADER_EXT 0x9308 #define GL_TESS_CONTROL_SHADER_EXT 0x8E88 #define GL_TESS_EVALUATION_SHADER_EXT 0x8E87 #define GL_TESS_CONTROL_SHADER_BIT_EXT 0x00000008 #define GL_TESS_EVALUATION_SHADER_BIT_EXT 0x00000010 typedef void (APIENTRYP pfn_glPatchParameteriEXT) (GLenum, GLint); extern pfn_glPatchParameteriEXT fp_glPatchParameteriEXT; /* GL_EXT_texture_array */ extern GLboolean GLAD_EXT_texture_array; #define GL_TEXTURE_1D_ARRAY_EXT 0x8C18 #define GL_PROXY_TEXTURE_1D_ARRAY_EXT 0x8C19 #define GL_TEXTURE_2D_ARRAY_EXT 0x8C1A #define GL_PROXY_TEXTURE_2D_ARRAY_EXT 0x8C1B #define GL_TEXTURE_BINDING_1D_ARRAY_EXT 0x8C1C #define GL_TEXTURE_BINDING_2D_ARRAY_EXT 0x8C1D #define GL_MAX_ARRAY_TEXTURE_LAYERS_EXT 0x88FF #define GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT 0x884E typedef void (APIENTRYP pfn_glFramebufferTextureLayerEXT) (GLenum, GLenum, GLuint, GLint, GLint); extern pfn_glFramebufferTextureLayerEXT fp_glFramebufferTextureLayerEXT; /* GL_EXT_texture_border_clamp */ extern GLboolean GLAD_EXT_texture_border_clamp; #define GL_TEXTURE_BORDER_COLOR_EXT 0x1004 #define GL_CLAMP_TO_BORDER_EXT 0x812D typedef void (APIENTRYP pfn_glTexParameterIivEXT) (GLenum, GLenum, const GLint*); extern pfn_glTexParameterIivEXT fp_glTexParameterIivEXT; typedef void (APIENTRYP pfn_glTexParameterIuivEXT) (GLenum, GLenum, const GLuint*); extern pfn_glTexParameterIuivEXT fp_glTexParameterIuivEXT; typedef void (APIENTRYP pfn_glGetTexParameterIivEXT) (GLenum, GLenum, GLint*); extern pfn_glGetTexParameterIivEXT fp_glGetTexParameterIivEXT; typedef void (APIENTRYP pfn_glGetTexParameterIuivEXT) (GLenum, GLenum, GLuint*); extern pfn_glGetTexParameterIuivEXT fp_glGetTexParameterIuivEXT; typedef void (APIENTRYP pfn_glSamplerParameterIivEXT) (GLuint, GLenum, const GLint*); extern pfn_glSamplerParameterIivEXT fp_glSamplerParameterIivEXT; typedef void (APIENTRYP pfn_glSamplerParameterIuivEXT) (GLuint, GLenum, const GLuint*); extern pfn_glSamplerParameterIuivEXT fp_glSamplerParameterIuivEXT; typedef void (APIENTRYP pfn_glGetSamplerParameterIivEXT) (GLuint, GLenum, GLint*); extern pfn_glGetSamplerParameterIivEXT fp_glGetSamplerParameterIivEXT; typedef void (APIENTRYP pfn_glGetSamplerParameterIuivEXT) (GLuint, GLenum, GLuint*); extern pfn_glGetSamplerParameterIuivEXT fp_glGetSamplerParameterIuivEXT; /* GL_EXT_texture_buffer */ extern GLboolean GLAD_EXT_texture_buffer; #define GL_TEXTURE_BUFFER_EXT 0x8C2A #define GL_TEXTURE_BUFFER_BINDING_EXT 0x8C2A #define GL_MAX_TEXTURE_BUFFER_SIZE_EXT 0x8C2B #define GL_TEXTURE_BINDING_BUFFER_EXT 0x8C2C #define GL_TEXTURE_BUFFER_DATA_STORE_BINDING_EXT 0x8C2D #define GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT_EXT 0x919F #define GL_TEXTURE_BUFFER_OFFSET_EXT 0x919D #define GL_TEXTURE_BUFFER_SIZE_EXT 0x919E typedef void (APIENTRYP pfn_glTexBufferEXT) (GLenum, GLenum, GLuint); extern pfn_glTexBufferEXT fp_glTexBufferEXT; typedef void (APIENTRYP pfn_glTexBufferRangeEXT) (GLenum, GLenum, GLuint, GLintptr, GLsizeiptr); extern pfn_glTexBufferRangeEXT fp_glTexBufferRangeEXT; /* GL_EXT_texture_buffer_object */ extern GLboolean GLAD_EXT_texture_buffer_object; #define GL_TEXTURE_BUFFER_FORMAT_EXT 0x8C2E /* GL_EXT_texture_compression_dxt1 */ extern GLboolean GLAD_EXT_texture_compression_dxt1; #define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0 #define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1 /* GL_EXT_texture_compression_latc */ extern GLboolean GLAD_EXT_texture_compression_latc; #define GL_COMPRESSED_LUMINANCE_LATC1_EXT 0x8C70 #define GL_COMPRESSED_SIGNED_LUMINANCE_LATC1_EXT 0x8C71 #define GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT 0x8C72 #define GL_COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2_EXT 0x8C73 /* GL_EXT_texture_compression_rgtc */ extern GLboolean GLAD_EXT_texture_compression_rgtc; #define GL_COMPRESSED_RED_RGTC1_EXT 0x8DBB #define GL_COMPRESSED_SIGNED_RED_RGTC1_EXT 0x8DBC #define GL_COMPRESSED_RED_GREEN_RGTC2_EXT 0x8DBD #define GL_COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT 0x8DBE /* GL_EXT_texture_compression_s3tc */ extern GLboolean GLAD_EXT_texture_compression_s3tc; #define GL_COMPRESSED_RGBA_S3TC_DXT3_EXT 0x83F2 #define GL_COMPRESSED_RGBA_S3TC_DXT5_EXT 0x83F3 /* GL_EXT_texture_cube_map */ extern GLboolean GLAD_EXT_texture_cube_map; #define GL_NORMAL_MAP_EXT 0x8511 #define GL_REFLECTION_MAP_EXT 0x8512 #define GL_TEXTURE_CUBE_MAP_EXT 0x8513 #define GL_TEXTURE_BINDING_CUBE_MAP_EXT 0x8514 #define GL_TEXTURE_CUBE_MAP_POSITIVE_X_EXT 0x8515 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_EXT 0x8516 #define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_EXT 0x8517 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_EXT 0x8518 #define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_EXT 0x8519 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_EXT 0x851A #define GL_PROXY_TEXTURE_CUBE_MAP_EXT 0x851B #define GL_MAX_CUBE_MAP_TEXTURE_SIZE_EXT 0x851C /* GL_EXT_texture_cube_map_array */ extern GLboolean GLAD_EXT_texture_cube_map_array; #define GL_TEXTURE_CUBE_MAP_ARRAY_EXT 0x9009 #define GL_TEXTURE_BINDING_CUBE_MAP_ARRAY_EXT 0x900A #define GL_SAMPLER_CUBE_MAP_ARRAY_EXT 0x900C #define GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW_EXT 0x900D #define GL_INT_SAMPLER_CUBE_MAP_ARRAY_EXT 0x900E #define GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY_EXT 0x900F /* GL_EXT_texture_filter_anisotropic */ extern GLboolean GLAD_EXT_texture_filter_anisotropic; #define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE #define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF /* GL_EXT_texture_filter_minmax */ extern GLboolean GLAD_EXT_texture_filter_minmax; /* GL_EXT_texture_format_BGRA8888 */ extern GLboolean GLAD_EXT_texture_format_BGRA8888; /* GL_EXT_texture_integer */ extern GLboolean GLAD_EXT_texture_integer; #define GL_RGBA32UI_EXT 0x8D70 #define GL_RGB32UI_EXT 0x8D71 #define GL_ALPHA32UI_EXT 0x8D72 #define GL_INTENSITY32UI_EXT 0x8D73 #define GL_LUMINANCE32UI_EXT 0x8D74 #define GL_LUMINANCE_ALPHA32UI_EXT 0x8D75 #define GL_RGBA16UI_EXT 0x8D76 #define GL_RGB16UI_EXT 0x8D77 #define GL_ALPHA16UI_EXT 0x8D78 #define GL_INTENSITY16UI_EXT 0x8D79 #define GL_LUMINANCE16UI_EXT 0x8D7A #define GL_LUMINANCE_ALPHA16UI_EXT 0x8D7B #define GL_RGBA8UI_EXT 0x8D7C #define GL_RGB8UI_EXT 0x8D7D #define GL_ALPHA8UI_EXT 0x8D7E #define GL_INTENSITY8UI_EXT 0x8D7F #define GL_LUMINANCE8UI_EXT 0x8D80 #define GL_LUMINANCE_ALPHA8UI_EXT 0x8D81 #define GL_RGBA32I_EXT 0x8D82 #define GL_RGB32I_EXT 0x8D83 #define GL_ALPHA32I_EXT 0x8D84 #define GL_INTENSITY32I_EXT 0x8D85 #define GL_LUMINANCE32I_EXT 0x8D86 #define GL_LUMINANCE_ALPHA32I_EXT 0x8D87 #define GL_RGBA16I_EXT 0x8D88 #define GL_RGB16I_EXT 0x8D89 #define GL_ALPHA16I_EXT 0x8D8A #define GL_INTENSITY16I_EXT 0x8D8B #define GL_LUMINANCE16I_EXT 0x8D8C #define GL_LUMINANCE_ALPHA16I_EXT 0x8D8D #define GL_RGBA8I_EXT 0x8D8E #define GL_RGB8I_EXT 0x8D8F #define GL_ALPHA8I_EXT 0x8D90 #define GL_INTENSITY8I_EXT 0x8D91 #define GL_LUMINANCE8I_EXT 0x8D92 #define GL_LUMINANCE_ALPHA8I_EXT 0x8D93 #define GL_RED_INTEGER_EXT 0x8D94 #define GL_GREEN_INTEGER_EXT 0x8D95 #define GL_BLUE_INTEGER_EXT 0x8D96 #define GL_ALPHA_INTEGER_EXT 0x8D97 #define GL_RGB_INTEGER_EXT 0x8D98 #define GL_RGBA_INTEGER_EXT 0x8D99 #define GL_BGR_INTEGER_EXT 0x8D9A #define GL_BGRA_INTEGER_EXT 0x8D9B #define GL_LUMINANCE_INTEGER_EXT 0x8D9C #define GL_LUMINANCE_ALPHA_INTEGER_EXT 0x8D9D #define GL_RGBA_INTEGER_MODE_EXT 0x8D9E typedef void (APIENTRYP pfn_glClearColorIiEXT) (GLint, GLint, GLint, GLint); extern pfn_glClearColorIiEXT fp_glClearColorIiEXT; typedef void (APIENTRYP pfn_glClearColorIuiEXT) (GLuint, GLuint, GLuint, GLuint); extern pfn_glClearColorIuiEXT fp_glClearColorIuiEXT; /* GL_EXT_texture_norm16 */ extern GLboolean GLAD_EXT_texture_norm16; #define GL_R16_EXT 0x822A #define GL_RG16_EXT 0x822C #define GL_RGBA16_EXT 0x805B #define GL_RGB16_EXT 0x8054 #define GL_RGB16_SNORM_EXT 0x8F9A /* GL_EXT_texture_rg */ extern GLboolean GLAD_EXT_texture_rg; #define GL_RED_EXT 0x1903 #define GL_RG_EXT 0x8227 #define GL_R8_EXT 0x8229 #define GL_RG8_EXT 0x822B /* GL_EXT_texture_shared_exponent */ extern GLboolean GLAD_EXT_texture_shared_exponent; #define GL_RGB9_E5_EXT 0x8C3D #define GL_UNSIGNED_INT_5_9_9_9_REV_EXT 0x8C3E #define GL_TEXTURE_SHARED_SIZE_EXT 0x8C3F /* GL_EXT_texture_snorm */ extern GLboolean GLAD_EXT_texture_snorm; #define GL_ALPHA_SNORM 0x9010 #define GL_LUMINANCE_SNORM 0x9011 #define GL_LUMINANCE_ALPHA_SNORM 0x9012 #define GL_INTENSITY_SNORM 0x9013 #define GL_ALPHA8_SNORM 0x9014 #define GL_LUMINANCE8_SNORM 0x9015 #define GL_LUMINANCE8_ALPHA8_SNORM 0x9016 #define GL_INTENSITY8_SNORM 0x9017 #define GL_ALPHA16_SNORM 0x9018 #define GL_LUMINANCE16_SNORM 0x9019 #define GL_LUMINANCE16_ALPHA16_SNORM 0x901A #define GL_INTENSITY16_SNORM 0x901B #define GL_RED_SNORM 0x8F90 #define GL_RG_SNORM 0x8F91 #define GL_RGB_SNORM 0x8F92 #define GL_RGBA_SNORM 0x8F93 /* GL_EXT_texture_sRGB */ extern GLboolean GLAD_EXT_texture_sRGB; #define GL_SRGB8_EXT 0x8C41 #define GL_SLUMINANCE_ALPHA_EXT 0x8C44 #define GL_SLUMINANCE8_ALPHA8_EXT 0x8C45 #define GL_SLUMINANCE_EXT 0x8C46 #define GL_SLUMINANCE8_EXT 0x8C47 #define GL_COMPRESSED_SRGB_EXT 0x8C48 #define GL_COMPRESSED_SRGB_ALPHA_EXT 0x8C49 #define GL_COMPRESSED_SLUMINANCE_EXT 0x8C4A #define GL_COMPRESSED_SLUMINANCE_ALPHA_EXT 0x8C4B #define GL_COMPRESSED_SRGB_S3TC_DXT1_EXT 0x8C4C #define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT 0x8C4D #define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT 0x8C4E #define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT 0x8C4F /* GL_EXT_texture_sRGB_decode */ extern GLboolean GLAD_EXT_texture_sRGB_decode; #define GL_TEXTURE_SRGB_DECODE_EXT 0x8A48 #define GL_DECODE_EXT 0x8A49 #define GL_SKIP_DECODE_EXT 0x8A4A /* GL_EXT_texture_sRGB_R8 */ extern GLboolean GLAD_EXT_texture_sRGB_R8; #define GL_SR8_EXT 0x8FBD /* GL_EXT_texture_sRGB_RG8 */ extern GLboolean GLAD_EXT_texture_sRGB_RG8; #define GL_SRG8_EXT 0x8FBE /* GL_EXT_texture_storage */ extern GLboolean GLAD_EXT_texture_storage; #define GL_TEXTURE_IMMUTABLE_FORMAT_EXT 0x912F #define GL_ALPHA8_EXT 0x803C #define GL_LUMINANCE8_EXT 0x8040 #define GL_LUMINANCE8_ALPHA8_EXT 0x8045 #define GL_RGBA32F_EXT 0x8814 #define GL_RGB32F_EXT 0x8815 #define GL_ALPHA32F_EXT 0x8816 #define GL_LUMINANCE32F_EXT 0x8818 #define GL_LUMINANCE_ALPHA32F_EXT 0x8819 #define GL_ALPHA16F_EXT 0x881C #define GL_LUMINANCE16F_EXT 0x881E #define GL_LUMINANCE_ALPHA16F_EXT 0x881F #define GL_RGB10_A2_EXT 0x8059 #define GL_RGB10_EXT 0x8052 #define GL_BGRA8_EXT 0x93A1 #define GL_R32F_EXT 0x822E #define GL_RG32F_EXT 0x8230 typedef void (APIENTRYP pfn_glTexStorage1DEXT) (GLenum, GLsizei, GLenum, GLsizei); extern pfn_glTexStorage1DEXT fp_glTexStorage1DEXT; typedef void (APIENTRYP pfn_glTexStorage2DEXT) (GLenum, GLsizei, GLenum, GLsizei, GLsizei); extern pfn_glTexStorage2DEXT fp_glTexStorage2DEXT; typedef void (APIENTRYP pfn_glTexStorage3DEXT) (GLenum, GLsizei, GLenum, GLsizei, GLsizei, GLsizei); extern pfn_glTexStorage3DEXT fp_glTexStorage3DEXT; /* GL_EXT_texture_swizzle */ extern GLboolean GLAD_EXT_texture_swizzle; #define GL_TEXTURE_SWIZZLE_R_EXT 0x8E42 #define GL_TEXTURE_SWIZZLE_G_EXT 0x8E43 #define GL_TEXTURE_SWIZZLE_B_EXT 0x8E44 #define GL_TEXTURE_SWIZZLE_A_EXT 0x8E45 #define GL_TEXTURE_SWIZZLE_RGBA_EXT 0x8E46 /* GL_EXT_texture_type_2_10_10_10_REV */ extern GLboolean GLAD_EXT_texture_type_2_10_10_10_REV; #define GL_UNSIGNED_INT_2_10_10_10_REV_EXT 0x8368 /* GL_EXT_texture_view */ extern GLboolean GLAD_EXT_texture_view; #define GL_TEXTURE_VIEW_MIN_LEVEL_EXT 0x82DB #define GL_TEXTURE_VIEW_NUM_LEVELS_EXT 0x82DC #define GL_TEXTURE_VIEW_MIN_LAYER_EXT 0x82DD #define GL_TEXTURE_VIEW_NUM_LAYERS_EXT 0x82DE typedef void (APIENTRYP pfn_glTextureViewEXT) (GLuint, GLenum, GLuint, GLenum, GLuint, GLuint, GLuint, GLuint); extern pfn_glTextureViewEXT fp_glTextureViewEXT; /* GL_EXT_timer_query */ extern GLboolean GLAD_EXT_timer_query; /* GL_EXT_transform_feedback */ extern GLboolean GLAD_EXT_transform_feedback; #define GL_TRANSFORM_FEEDBACK_BUFFER_EXT 0x8C8E #define GL_TRANSFORM_FEEDBACK_BUFFER_START_EXT 0x8C84 #define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_EXT 0x8C85 #define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_EXT 0x8C8F #define GL_INTERLEAVED_ATTRIBS_EXT 0x8C8C #define GL_SEPARATE_ATTRIBS_EXT 0x8C8D #define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_EXT 0x8C88 #define GL_RASTERIZER_DISCARD_EXT 0x8C89 #define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_EXT 0x8C8A #define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_EXT 0x8C8B #define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_EXT 0x8C80 #define GL_TRANSFORM_FEEDBACK_VARYINGS_EXT 0x8C83 #define GL_TRANSFORM_FEEDBACK_BUFFER_MODE_EXT 0x8C7F #define GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH_EXT 0x8C76 typedef void (APIENTRYP pfn_glBeginTransformFeedbackEXT) (GLenum); extern pfn_glBeginTransformFeedbackEXT fp_glBeginTransformFeedbackEXT; typedef void (APIENTRYP pfn_glEndTransformFeedbackEXT) (); extern pfn_glEndTransformFeedbackEXT fp_glEndTransformFeedbackEXT; typedef void (APIENTRYP pfn_glBindBufferRangeEXT) (GLenum, GLuint, GLuint, GLintptr, GLsizeiptr); extern pfn_glBindBufferRangeEXT fp_glBindBufferRangeEXT; typedef void (APIENTRYP pfn_glBindBufferOffsetEXT) (GLenum, GLuint, GLuint, GLintptr); extern pfn_glBindBufferOffsetEXT fp_glBindBufferOffsetEXT; typedef void (APIENTRYP pfn_glBindBufferBaseEXT) (GLenum, GLuint, GLuint); extern pfn_glBindBufferBaseEXT fp_glBindBufferBaseEXT; typedef void (APIENTRYP pfn_glTransformFeedbackVaryingsEXT) (GLuint, GLsizei, const GLchar**, GLenum); extern pfn_glTransformFeedbackVaryingsEXT fp_glTransformFeedbackVaryingsEXT; typedef void (APIENTRYP pfn_glGetTransformFeedbackVaryingEXT) (GLuint, GLuint, GLsizei, GLsizei*, GLsizei*, GLenum*, GLchar*); extern pfn_glGetTransformFeedbackVaryingEXT fp_glGetTransformFeedbackVaryingEXT; /* GL_EXT_unpack_subimage */ extern GLboolean GLAD_EXT_unpack_subimage; #define GL_UNPACK_ROW_LENGTH_EXT 0x0CF2 #define GL_UNPACK_SKIP_ROWS_EXT 0x0CF3 #define GL_UNPACK_SKIP_PIXELS_EXT 0x0CF4 /* GL_EXT_vertex_array_bgra */ extern GLboolean GLAD_EXT_vertex_array_bgra; /* GL_EXT_vertex_attrib_64bit */ extern GLboolean GLAD_EXT_vertex_attrib_64bit; #define GL_DOUBLE_VEC2_EXT 0x8FFC #define GL_DOUBLE_VEC3_EXT 0x8FFD #define GL_DOUBLE_VEC4_EXT 0x8FFE #define GL_DOUBLE_MAT2_EXT 0x8F46 #define GL_DOUBLE_MAT3_EXT 0x8F47 #define GL_DOUBLE_MAT4_EXT 0x8F48 #define GL_DOUBLE_MAT2x3_EXT 0x8F49 #define GL_DOUBLE_MAT2x4_EXT 0x8F4A #define GL_DOUBLE_MAT3x2_EXT 0x8F4B #define GL_DOUBLE_MAT3x4_EXT 0x8F4C #define GL_DOUBLE_MAT4x2_EXT 0x8F4D #define GL_DOUBLE_MAT4x3_EXT 0x8F4E typedef void (APIENTRYP pfn_glVertexAttribL1dEXT) (GLuint, GLdouble); extern pfn_glVertexAttribL1dEXT fp_glVertexAttribL1dEXT; typedef void (APIENTRYP pfn_glVertexAttribL2dEXT) (GLuint, GLdouble, GLdouble); extern pfn_glVertexAttribL2dEXT fp_glVertexAttribL2dEXT; typedef void (APIENTRYP pfn_glVertexAttribL3dEXT) (GLuint, GLdouble, GLdouble, GLdouble); extern pfn_glVertexAttribL3dEXT fp_glVertexAttribL3dEXT; typedef void (APIENTRYP pfn_glVertexAttribL4dEXT) (GLuint, GLdouble, GLdouble, GLdouble, GLdouble); extern pfn_glVertexAttribL4dEXT fp_glVertexAttribL4dEXT; typedef void (APIENTRYP pfn_glVertexAttribL1dvEXT) (GLuint, const GLdouble*); extern pfn_glVertexAttribL1dvEXT fp_glVertexAttribL1dvEXT; typedef void (APIENTRYP pfn_glVertexAttribL2dvEXT) (GLuint, const GLdouble*); extern pfn_glVertexAttribL2dvEXT fp_glVertexAttribL2dvEXT; typedef void (APIENTRYP pfn_glVertexAttribL3dvEXT) (GLuint, const GLdouble*); extern pfn_glVertexAttribL3dvEXT fp_glVertexAttribL3dvEXT; typedef void (APIENTRYP pfn_glVertexAttribL4dvEXT) (GLuint, const GLdouble*); extern pfn_glVertexAttribL4dvEXT fp_glVertexAttribL4dvEXT; typedef void (APIENTRYP pfn_glVertexAttribLPointerEXT) (GLuint, GLint, GLenum, GLsizei, const void*); extern pfn_glVertexAttribLPointerEXT fp_glVertexAttribLPointerEXT; typedef void (APIENTRYP pfn_glGetVertexAttribLdvEXT) (GLuint, GLenum, GLdouble*); extern pfn_glGetVertexAttribLdvEXT fp_glGetVertexAttribLdvEXT; /* GL_EXT_x11_sync_object */ extern GLboolean GLAD_EXT_x11_sync_object; #define GL_SYNC_X11_FENCE_EXT 0x90E1 typedef GLsync (APIENTRYP pfn_glImportSyncEXT) (GLenum, GLintptr, GLbitfield); extern pfn_glImportSyncEXT fp_glImportSyncEXT; /* GL_EXT_YUV_target */ extern GLboolean GLAD_EXT_YUV_target; #define GL_SAMPLER_EXTERNAL_2D_Y2Y_EXT 0x8BE7 #define GL_TEXTURE_EXTERNAL_OES 0x8D65 #define GL_TEXTURE_BINDING_EXTERNAL_OES 0x8D67 #define GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES 0x8D68 /* GL_OES_compressed_ETC1_RGB8_sub_texture */ extern GLboolean GLAD_OES_compressed_ETC1_RGB8_sub_texture; /* GL_OES_compressed_ETC1_RGB8_texture */ extern GLboolean GLAD_OES_compressed_ETC1_RGB8_texture; #define GL_ETC1_RGB8_OES 0x8D64 /* GL_OES_copy_image */ extern GLboolean GLAD_OES_copy_image; typedef void (APIENTRYP pfn_glCopyImageSubDataOES) (GLuint, GLenum, GLint, GLint, GLint, GLint, GLuint, GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei); extern pfn_glCopyImageSubDataOES fp_glCopyImageSubDataOES; /* GL_OES_depth24 */ extern GLboolean GLAD_OES_depth24; #define GL_DEPTH_COMPONENT24_OES 0x81A6 /* GL_OES_depth32 */ extern GLboolean GLAD_OES_depth32; #define GL_DEPTH_COMPONENT32_OES 0x81A7 /* GL_OES_depth_texture */ extern GLboolean GLAD_OES_depth_texture; /* GL_OES_draw_buffers_indexed */ extern GLboolean GLAD_OES_draw_buffers_indexed; typedef void (APIENTRYP pfn_glEnableiOES) (GLenum, GLuint); extern pfn_glEnableiOES fp_glEnableiOES; typedef void (APIENTRYP pfn_glDisableiOES) (GLenum, GLuint); extern pfn_glDisableiOES fp_glDisableiOES; typedef void (APIENTRYP pfn_glBlendEquationiOES) (GLuint, GLenum); extern pfn_glBlendEquationiOES fp_glBlendEquationiOES; typedef void (APIENTRYP pfn_glBlendEquationSeparateiOES) (GLuint, GLenum, GLenum); extern pfn_glBlendEquationSeparateiOES fp_glBlendEquationSeparateiOES; typedef void (APIENTRYP pfn_glBlendFunciOES) (GLuint, GLenum, GLenum); extern pfn_glBlendFunciOES fp_glBlendFunciOES; typedef void (APIENTRYP pfn_glBlendFuncSeparateiOES) (GLuint, GLenum, GLenum, GLenum, GLenum); extern pfn_glBlendFuncSeparateiOES fp_glBlendFuncSeparateiOES; typedef void (APIENTRYP pfn_glColorMaskiOES) (GLuint, GLboolean, GLboolean, GLboolean, GLboolean); extern pfn_glColorMaskiOES fp_glColorMaskiOES; typedef GLboolean (APIENTRYP pfn_glIsEnablediOES) (GLenum, GLuint); extern pfn_glIsEnablediOES fp_glIsEnablediOES; /* GL_OES_draw_elements_base_vertex */ extern GLboolean GLAD_OES_draw_elements_base_vertex; typedef void (APIENTRYP pfn_glDrawElementsBaseVertexOES) (GLenum, GLsizei, GLenum, const void*, GLint); extern pfn_glDrawElementsBaseVertexOES fp_glDrawElementsBaseVertexOES; typedef void (APIENTRYP pfn_glDrawRangeElementsBaseVertexOES) (GLenum, GLuint, GLuint, GLsizei, GLenum, const void*, GLint); extern pfn_glDrawRangeElementsBaseVertexOES fp_glDrawRangeElementsBaseVertexOES; typedef void (APIENTRYP pfn_glDrawElementsInstancedBaseVertexOES) (GLenum, GLsizei, GLenum, const void*, GLsizei, GLint); extern pfn_glDrawElementsInstancedBaseVertexOES fp_glDrawElementsInstancedBaseVertexOES; typedef void (APIENTRYP pfn_glMultiDrawElementsBaseVertexOES) (GLenum, const GLsizei*, GLenum, const void**, GLsizei, const GLint*); extern pfn_glMultiDrawElementsBaseVertexOES fp_glMultiDrawElementsBaseVertexOES; /* GL_OES_EGL_image */ extern GLboolean GLAD_OES_EGL_image; typedef void (APIENTRYP pfn_glEGLImageTargetTexture2DOES) (GLenum, GLeglImageOES); extern pfn_glEGLImageTargetTexture2DOES fp_glEGLImageTargetTexture2DOES; typedef void (APIENTRYP pfn_glEGLImageTargetRenderbufferStorageOES) (GLenum, GLeglImageOES); extern pfn_glEGLImageTargetRenderbufferStorageOES fp_glEGLImageTargetRenderbufferStorageOES; /* GL_OES_EGL_image_external */ extern GLboolean GLAD_OES_EGL_image_external; #define GL_SAMPLER_EXTERNAL_OES 0x8D66 /* GL_OES_EGL_image_external_essl3 */ extern GLboolean GLAD_OES_EGL_image_external_essl3; /* GL_OES_element_index_uint */ extern GLboolean GLAD_OES_element_index_uint; /* GL_OES_fbo_render_mipmap */ extern GLboolean GLAD_OES_fbo_render_mipmap; /* GL_OES_fragment_precision_high */ extern GLboolean GLAD_OES_fragment_precision_high; /* GL_OES_geometry_point_size */ extern GLboolean GLAD_OES_geometry_point_size; /* GL_OES_geometry_shader */ extern GLboolean GLAD_OES_geometry_shader; #define GL_GEOMETRY_SHADER_OES 0x8DD9 #define GL_GEOMETRY_SHADER_BIT_OES 0x00000004 #define GL_GEOMETRY_LINKED_VERTICES_OUT_OES 0x8916 #define GL_GEOMETRY_LINKED_INPUT_TYPE_OES 0x8917 #define GL_GEOMETRY_LINKED_OUTPUT_TYPE_OES 0x8918 #define GL_GEOMETRY_SHADER_INVOCATIONS_OES 0x887F #define GL_LAYER_PROVOKING_VERTEX_OES 0x825E #define GL_LINES_ADJACENCY_OES 0x000A #define GL_LINE_STRIP_ADJACENCY_OES 0x000B #define GL_TRIANGLES_ADJACENCY_OES 0x000C #define GL_TRIANGLE_STRIP_ADJACENCY_OES 0x000D #define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_OES 0x8DDF #define GL_MAX_GEOMETRY_UNIFORM_BLOCKS_OES 0x8A2C #define GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS_OES 0x8A32 #define GL_MAX_GEOMETRY_INPUT_COMPONENTS_OES 0x9123 #define GL_MAX_GEOMETRY_OUTPUT_COMPONENTS_OES 0x9124 #define GL_MAX_GEOMETRY_OUTPUT_VERTICES_OES 0x8DE0 #define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_OES 0x8DE1 #define GL_MAX_GEOMETRY_SHADER_INVOCATIONS_OES 0x8E5A #define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_OES 0x8C29 #define GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS_OES 0x92CF #define GL_MAX_GEOMETRY_ATOMIC_COUNTERS_OES 0x92D5 #define GL_MAX_GEOMETRY_IMAGE_UNIFORMS_OES 0x90CD #define GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS_OES 0x90D7 #define GL_FIRST_VERTEX_CONVENTION_OES 0x8E4D #define GL_LAST_VERTEX_CONVENTION_OES 0x8E4E #define GL_UNDEFINED_VERTEX_OES 0x8260 #define GL_PRIMITIVES_GENERATED_OES 0x8C87 #define GL_FRAMEBUFFER_DEFAULT_LAYERS_OES 0x9312 #define GL_MAX_FRAMEBUFFER_LAYERS_OES 0x9317 #define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_OES 0x8DA8 #define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_OES 0x8DA7 #define GL_REFERENCED_BY_GEOMETRY_SHADER_OES 0x9309 typedef void (APIENTRYP pfn_glFramebufferTextureOES) (GLenum, GLenum, GLuint, GLint); extern pfn_glFramebufferTextureOES fp_glFramebufferTextureOES; /* GL_OES_get_program_binary */ extern GLboolean GLAD_OES_get_program_binary; #define GL_PROGRAM_BINARY_LENGTH_OES 0x8741 #define GL_NUM_PROGRAM_BINARY_FORMATS_OES 0x87FE #define GL_PROGRAM_BINARY_FORMATS_OES 0x87FF typedef void (APIENTRYP pfn_glGetProgramBinaryOES) (GLuint, GLsizei, GLsizei*, GLenum*, void*); extern pfn_glGetProgramBinaryOES fp_glGetProgramBinaryOES; typedef void (APIENTRYP pfn_glProgramBinaryOES) (GLuint, GLenum, const void*, GLint); extern pfn_glProgramBinaryOES fp_glProgramBinaryOES; /* GL_OES_gpu_shader5 */ extern GLboolean GLAD_OES_gpu_shader5; /* GL_OES_mapbuffer */ extern GLboolean GLAD_OES_mapbuffer; #define GL_WRITE_ONLY_OES 0x88B9 #define GL_BUFFER_ACCESS_OES 0x88BB #define GL_BUFFER_MAPPED_OES 0x88BC #define GL_BUFFER_MAP_POINTER_OES 0x88BD typedef void* (APIENTRYP pfn_glMapBufferOES) (GLenum, GLenum); extern pfn_glMapBufferOES fp_glMapBufferOES; typedef GLboolean (APIENTRYP pfn_glUnmapBufferOES) (GLenum); extern pfn_glUnmapBufferOES fp_glUnmapBufferOES; typedef void (APIENTRYP pfn_glGetBufferPointervOES) (GLenum, GLenum, void**); extern pfn_glGetBufferPointervOES fp_glGetBufferPointervOES; /* GL_OES_packed_depth_stencil */ extern GLboolean GLAD_OES_packed_depth_stencil; #define GL_DEPTH_STENCIL_OES 0x84F9 #define GL_UNSIGNED_INT_24_8_OES 0x84FA #define GL_DEPTH24_STENCIL8_OES 0x88F0 /* GL_OES_primitive_bounding_box */ extern GLboolean GLAD_OES_primitive_bounding_box; #define GL_PRIMITIVE_BOUNDING_BOX_OES 0x92BE typedef void (APIENTRYP pfn_glPrimitiveBoundingBoxOES) (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat); extern pfn_glPrimitiveBoundingBoxOES fp_glPrimitiveBoundingBoxOES; /* GL_OES_required_internalformat */ extern GLboolean GLAD_OES_required_internalformat; #define GL_ALPHA8_OES 0x803C #define GL_DEPTH_COMPONENT16_OES 0x81A5 #define GL_LUMINANCE4_ALPHA4_OES 0x8043 #define GL_LUMINANCE8_ALPHA8_OES 0x8045 #define GL_LUMINANCE8_OES 0x8040 #define GL_RGBA4_OES 0x8056 #define GL_RGB5_A1_OES 0x8057 #define GL_RGB565_OES 0x8D62 #define GL_RGB8_OES 0x8051 #define GL_RGBA8_OES 0x8058 /* GL_OES_rgb8_rgba8 */ extern GLboolean GLAD_OES_rgb8_rgba8; /* GL_OES_sample_shading */ extern GLboolean GLAD_OES_sample_shading; #define GL_SAMPLE_SHADING_OES 0x8C36 #define GL_MIN_SAMPLE_SHADING_VALUE_OES 0x8C37 typedef void (APIENTRYP pfn_glMinSampleShadingOES) (GLfloat); extern pfn_glMinSampleShadingOES fp_glMinSampleShadingOES; /* GL_OES_sample_variables */ extern GLboolean GLAD_OES_sample_variables; /* GL_OES_shader_image_atomic */ extern GLboolean GLAD_OES_shader_image_atomic; /* GL_OES_shader_io_blocks */ extern GLboolean GLAD_OES_shader_io_blocks; /* GL_OES_shader_multisample_interpolation */ extern GLboolean GLAD_OES_shader_multisample_interpolation; #define GL_MIN_FRAGMENT_INTERPOLATION_OFFSET_OES 0x8E5B #define GL_MAX_FRAGMENT_INTERPOLATION_OFFSET_OES 0x8E5C #define GL_FRAGMENT_INTERPOLATION_OFFSET_BITS_OES 0x8E5D /* GL_OES_standard_derivatives */ extern GLboolean GLAD_OES_standard_derivatives; #define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES 0x8B8B /* GL_OES_stencil1 */ extern GLboolean GLAD_OES_stencil1; #define GL_STENCIL_INDEX1_OES 0x8D46 /* GL_OES_stencil4 */ extern GLboolean GLAD_OES_stencil4; #define GL_STENCIL_INDEX4_OES 0x8D47 /* GL_OES_surfaceless_context */ extern GLboolean GLAD_OES_surfaceless_context; #define GL_FRAMEBUFFER_UNDEFINED_OES 0x8219 /* GL_OES_tessellation_point_size */ extern GLboolean GLAD_OES_tessellation_point_size; /* GL_OES_tessellation_shader */ extern GLboolean GLAD_OES_tessellation_shader; #define GL_PATCHES_OES 0x000E #define GL_PATCH_VERTICES_OES 0x8E72 #define GL_TESS_CONTROL_OUTPUT_VERTICES_OES 0x8E75 #define GL_TESS_GEN_MODE_OES 0x8E76 #define GL_TESS_GEN_SPACING_OES 0x8E77 #define GL_TESS_GEN_VERTEX_ORDER_OES 0x8E78 #define GL_TESS_GEN_POINT_MODE_OES 0x8E79 #define GL_ISOLINES_OES 0x8E7A #define GL_QUADS_OES 0x0007 #define GL_FRACTIONAL_ODD_OES 0x8E7B #define GL_FRACTIONAL_EVEN_OES 0x8E7C #define GL_MAX_PATCH_VERTICES_OES 0x8E7D #define GL_MAX_TESS_GEN_LEVEL_OES 0x8E7E #define GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS_OES 0x8E7F #define GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS_OES 0x8E80 #define GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS_OES 0x8E81 #define GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS_OES 0x8E82 #define GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS_OES 0x8E83 #define GL_MAX_TESS_PATCH_COMPONENTS_OES 0x8E84 #define GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS_OES 0x8E85 #define GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS_OES 0x8E86 #define GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS_OES 0x8E89 #define GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS_OES 0x8E8A #define GL_MAX_TESS_CONTROL_INPUT_COMPONENTS_OES 0x886C #define GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS_OES 0x886D #define GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS_OES 0x8E1E #define GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS_OES 0x8E1F #define GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS_OES 0x92CD #define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS_OES 0x92CE #define GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS_OES 0x92D3 #define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS_OES 0x92D4 #define GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS_OES 0x90CB #define GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS_OES 0x90CC #define GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS_OES 0x90D8 #define GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS_OES 0x90D9 #define GL_PRIMITIVE_RESTART_FOR_PATCHES_SUPPORTED_OES 0x8221 #define GL_IS_PER_PATCH_OES 0x92E7 #define GL_REFERENCED_BY_TESS_CONTROL_SHADER_OES 0x9307 #define GL_REFERENCED_BY_TESS_EVALUATION_SHADER_OES 0x9308 #define GL_TESS_CONTROL_SHADER_OES 0x8E88 #define GL_TESS_EVALUATION_SHADER_OES 0x8E87 #define GL_TESS_CONTROL_SHADER_BIT_OES 0x00000008 #define GL_TESS_EVALUATION_SHADER_BIT_OES 0x00000010 typedef void (APIENTRYP pfn_glPatchParameteriOES) (GLenum, GLint); extern pfn_glPatchParameteriOES fp_glPatchParameteriOES; /* GL_OES_texture_3D */ extern GLboolean GLAD_OES_texture_3D; #define GL_TEXTURE_WRAP_R_OES 0x8072 #define GL_TEXTURE_3D_OES 0x806F #define GL_TEXTURE_BINDING_3D_OES 0x806A #define GL_MAX_3D_TEXTURE_SIZE_OES 0x8073 #define GL_SAMPLER_3D_OES 0x8B5F #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_OES 0x8CD4 typedef void (APIENTRYP pfn_glTexImage3DOES) (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const void*); extern pfn_glTexImage3DOES fp_glTexImage3DOES; typedef void (APIENTRYP pfn_glTexSubImage3DOES) (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const void*); extern pfn_glTexSubImage3DOES fp_glTexSubImage3DOES; typedef void (APIENTRYP pfn_glCopyTexSubImage3DOES) (GLenum, GLint, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei); extern pfn_glCopyTexSubImage3DOES fp_glCopyTexSubImage3DOES; typedef void (APIENTRYP pfn_glCompressedTexImage3DOES) (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, const void*); extern pfn_glCompressedTexImage3DOES fp_glCompressedTexImage3DOES; typedef void (APIENTRYP pfn_glCompressedTexSubImage3DOES) (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, const void*); extern pfn_glCompressedTexSubImage3DOES fp_glCompressedTexSubImage3DOES; typedef void (APIENTRYP pfn_glFramebufferTexture3DOES) (GLenum, GLenum, GLenum, GLuint, GLint, GLint); extern pfn_glFramebufferTexture3DOES fp_glFramebufferTexture3DOES; /* GL_OES_texture_border_clamp */ extern GLboolean GLAD_OES_texture_border_clamp; #define GL_TEXTURE_BORDER_COLOR_OES 0x1004 #define GL_CLAMP_TO_BORDER_OES 0x812D typedef void (APIENTRYP pfn_glTexParameterIivOES) (GLenum, GLenum, const GLint*); extern pfn_glTexParameterIivOES fp_glTexParameterIivOES; typedef void (APIENTRYP pfn_glTexParameterIuivOES) (GLenum, GLenum, const GLuint*); extern pfn_glTexParameterIuivOES fp_glTexParameterIuivOES; typedef void (APIENTRYP pfn_glGetTexParameterIivOES) (GLenum, GLenum, GLint*); extern pfn_glGetTexParameterIivOES fp_glGetTexParameterIivOES; typedef void (APIENTRYP pfn_glGetTexParameterIuivOES) (GLenum, GLenum, GLuint*); extern pfn_glGetTexParameterIuivOES fp_glGetTexParameterIuivOES; typedef void (APIENTRYP pfn_glSamplerParameterIivOES) (GLuint, GLenum, const GLint*); extern pfn_glSamplerParameterIivOES fp_glSamplerParameterIivOES; typedef void (APIENTRYP pfn_glSamplerParameterIuivOES) (GLuint, GLenum, const GLuint*); extern pfn_glSamplerParameterIuivOES fp_glSamplerParameterIuivOES; typedef void (APIENTRYP pfn_glGetSamplerParameterIivOES) (GLuint, GLenum, GLint*); extern pfn_glGetSamplerParameterIivOES fp_glGetSamplerParameterIivOES; typedef void (APIENTRYP pfn_glGetSamplerParameterIuivOES) (GLuint, GLenum, GLuint*); extern pfn_glGetSamplerParameterIuivOES fp_glGetSamplerParameterIuivOES; /* GL_OES_texture_buffer */ extern GLboolean GLAD_OES_texture_buffer; #define GL_TEXTURE_BUFFER_OES 0x8C2A #define GL_TEXTURE_BUFFER_BINDING_OES 0x8C2A #define GL_MAX_TEXTURE_BUFFER_SIZE_OES 0x8C2B #define GL_TEXTURE_BINDING_BUFFER_OES 0x8C2C #define GL_TEXTURE_BUFFER_DATA_STORE_BINDING_OES 0x8C2D #define GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT_OES 0x919F #define GL_SAMPLER_BUFFER_OES 0x8DC2 #define GL_INT_SAMPLER_BUFFER_OES 0x8DD0 #define GL_UNSIGNED_INT_SAMPLER_BUFFER_OES 0x8DD8 #define GL_IMAGE_BUFFER_OES 0x9051 #define GL_INT_IMAGE_BUFFER_OES 0x905C #define GL_UNSIGNED_INT_IMAGE_BUFFER_OES 0x9067 #define GL_TEXTURE_BUFFER_OFFSET_OES 0x919D #define GL_TEXTURE_BUFFER_SIZE_OES 0x919E typedef void (APIENTRYP pfn_glTexBufferOES) (GLenum, GLenum, GLuint); extern pfn_glTexBufferOES fp_glTexBufferOES; typedef void (APIENTRYP pfn_glTexBufferRangeOES) (GLenum, GLenum, GLuint, GLintptr, GLsizeiptr); extern pfn_glTexBufferRangeOES fp_glTexBufferRangeOES; /* GL_OES_texture_compression_astc */ extern GLboolean GLAD_OES_texture_compression_astc; #define GL_COMPRESSED_RGBA_ASTC_3x3x3_OES 0x93C0 #define GL_COMPRESSED_RGBA_ASTC_4x3x3_OES 0x93C1 #define GL_COMPRESSED_RGBA_ASTC_4x4x3_OES 0x93C2 #define GL_COMPRESSED_RGBA_ASTC_4x4x4_OES 0x93C3 #define GL_COMPRESSED_RGBA_ASTC_5x4x4_OES 0x93C4 #define GL_COMPRESSED_RGBA_ASTC_5x5x4_OES 0x93C5 #define GL_COMPRESSED_RGBA_ASTC_5x5x5_OES 0x93C6 #define GL_COMPRESSED_RGBA_ASTC_6x5x5_OES 0x93C7 #define GL_COMPRESSED_RGBA_ASTC_6x6x5_OES 0x93C8 #define GL_COMPRESSED_RGBA_ASTC_6x6x6_OES 0x93C9 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_3x3x3_OES 0x93E0 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x3x3_OES 0x93E1 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4x3_OES 0x93E2 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4x4_OES 0x93E3 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4x4_OES 0x93E4 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5x4_OES 0x93E5 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5x5_OES 0x93E6 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5x5_OES 0x93E7 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6x5_OES 0x93E8 #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6x6_OES 0x93E9 /* GL_OES_texture_cube_map_array */ extern GLboolean GLAD_OES_texture_cube_map_array; #define GL_TEXTURE_BINDING_CUBE_MAP_ARRAY_OES 0x900A #define GL_SAMPLER_CUBE_MAP_ARRAY_OES 0x900C #define GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW_OES 0x900D #define GL_INT_SAMPLER_CUBE_MAP_ARRAY_OES 0x900E #define GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY_OES 0x900F #define GL_IMAGE_CUBE_MAP_ARRAY_OES 0x9054 #define GL_INT_IMAGE_CUBE_MAP_ARRAY_OES 0x905F #define GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY_OES 0x906A /* GL_OES_texture_float */ extern GLboolean GLAD_OES_texture_float; /* GL_OES_texture_float_linear */ extern GLboolean GLAD_OES_texture_float_linear; /* GL_OES_texture_half_float */ extern GLboolean GLAD_OES_texture_half_float; #define GL_HALF_FLOAT_OES 0x8D61 /* GL_OES_texture_half_float_linear */ extern GLboolean GLAD_OES_texture_half_float_linear; /* GL_OES_texture_npot */ extern GLboolean GLAD_OES_texture_npot; /* GL_OES_texture_stencil8 */ extern GLboolean GLAD_OES_texture_stencil8; #define GL_STENCIL_INDEX_OES 0x1901 #define GL_STENCIL_INDEX8_OES 0x8D48 /* GL_OES_texture_storage_multisample_2d_array */ extern GLboolean GLAD_OES_texture_storage_multisample_2d_array; #define GL_TEXTURE_2D_MULTISAMPLE_ARRAY_OES 0x9102 #define GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY_OES 0x9105 #define GL_SAMPLER_2D_MULTISAMPLE_ARRAY_OES 0x910B #define GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY_OES 0x910C #define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY_OES 0x910D typedef void (APIENTRYP pfn_glTexStorage3DMultisampleOES) (GLenum, GLsizei, GLenum, GLsizei, GLsizei, GLsizei, GLboolean); extern pfn_glTexStorage3DMultisampleOES fp_glTexStorage3DMultisampleOES; /* GL_OES_texture_view */ extern GLboolean GLAD_OES_texture_view; #define GL_TEXTURE_VIEW_MIN_LEVEL_OES 0x82DB #define GL_TEXTURE_VIEW_NUM_LEVELS_OES 0x82DC #define GL_TEXTURE_VIEW_MIN_LAYER_OES 0x82DD #define GL_TEXTURE_VIEW_NUM_LAYERS_OES 0x82DE typedef void (APIENTRYP pfn_glTextureViewOES) (GLuint, GLenum, GLuint, GLenum, GLuint, GLuint, GLuint, GLuint); extern pfn_glTextureViewOES fp_glTextureViewOES; /* GL_OES_vertex_array_object */ extern GLboolean GLAD_OES_vertex_array_object; #define GL_VERTEX_ARRAY_BINDING_OES 0x85B5 typedef void (APIENTRYP pfn_glBindVertexArrayOES) (GLuint); extern pfn_glBindVertexArrayOES fp_glBindVertexArrayOES; typedef void (APIENTRYP pfn_glDeleteVertexArraysOES) (GLsizei, const GLuint*); extern pfn_glDeleteVertexArraysOES fp_glDeleteVertexArraysOES; typedef void (APIENTRYP pfn_glGenVertexArraysOES) (GLsizei, GLuint*); extern pfn_glGenVertexArraysOES fp_glGenVertexArraysOES; typedef GLboolean (APIENTRYP pfn_glIsVertexArrayOES) (GLuint); extern pfn_glIsVertexArrayOES fp_glIsVertexArrayOES; /* GL_OES_vertex_half_float */ extern GLboolean GLAD_OES_vertex_half_float; /* GL_OES_vertex_type_10_10_10_2 */ extern GLboolean GLAD_OES_vertex_type_10_10_10_2; #define GL_UNSIGNED_INT_10_10_10_2_OES 0x8DF6 #define GL_INT_10_10_10_2_OES 0x8DF7 /* GL_AMD_blend_minmax_factor */ extern GLboolean GLAD_AMD_blend_minmax_factor; #define GL_FACTOR_MIN_AMD 0x901C #define GL_FACTOR_MAX_AMD 0x901D /* GL_AMD_compressed_3DC_texture */ extern GLboolean GLAD_AMD_compressed_3DC_texture; #define GL_3DC_X_AMD 0x87F9 #define GL_3DC_XY_AMD 0x87FA /* GL_AMD_compressed_ATC_texture */ extern GLboolean GLAD_AMD_compressed_ATC_texture; #define GL_ATC_RGB_AMD 0x8C92 #define GL_ATC_RGBA_EXPLICIT_ALPHA_AMD 0x8C93 #define GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD 0x87EE /* GL_AMD_conservative_depth */ extern GLboolean GLAD_AMD_conservative_depth; /* GL_AMD_debug_output */ extern GLboolean GLAD_AMD_debug_output; #define GL_MAX_DEBUG_MESSAGE_LENGTH_AMD 0x9143 #define GL_MAX_DEBUG_LOGGED_MESSAGES_AMD 0x9144 #define GL_DEBUG_LOGGED_MESSAGES_AMD 0x9145 #define GL_DEBUG_SEVERITY_HIGH_AMD 0x9146 #define GL_DEBUG_SEVERITY_MEDIUM_AMD 0x9147 #define GL_DEBUG_SEVERITY_LOW_AMD 0x9148 #define GL_DEBUG_CATEGORY_API_ERROR_AMD 0x9149 #define GL_DEBUG_CATEGORY_WINDOW_SYSTEM_AMD 0x914A #define GL_DEBUG_CATEGORY_DEPRECATION_AMD 0x914B #define GL_DEBUG_CATEGORY_UNDEFINED_BEHAVIOR_AMD 0x914C #define GL_DEBUG_CATEGORY_PERFORMANCE_AMD 0x914D #define GL_DEBUG_CATEGORY_SHADER_COMPILER_AMD 0x914E #define GL_DEBUG_CATEGORY_APPLICATION_AMD 0x914F #define GL_DEBUG_CATEGORY_OTHER_AMD 0x9150 typedef void (APIENTRYP pfn_glDebugMessageEnableAMD) (GLenum, GLenum, GLsizei, const GLuint*, GLboolean); extern pfn_glDebugMessageEnableAMD fp_glDebugMessageEnableAMD; typedef void (APIENTRYP pfn_glDebugMessageInsertAMD) (GLenum, GLenum, GLuint, GLsizei, const GLchar*); extern pfn_glDebugMessageInsertAMD fp_glDebugMessageInsertAMD; typedef void (APIENTRYP pfn_glDebugMessageCallbackAMD) (GLDEBUGPROCAMD, void*); extern pfn_glDebugMessageCallbackAMD fp_glDebugMessageCallbackAMD; typedef GLuint (APIENTRYP pfn_glGetDebugMessageLogAMD) (GLuint, GLsizei, GLenum*, GLuint*, GLuint*, GLsizei*, GLchar*); extern pfn_glGetDebugMessageLogAMD fp_glGetDebugMessageLogAMD; /* GL_AMD_depth_clamp_separate */ extern GLboolean GLAD_AMD_depth_clamp_separate; #define GL_DEPTH_CLAMP_NEAR_AMD 0x901E #define GL_DEPTH_CLAMP_FAR_AMD 0x901F /* GL_AMD_draw_buffers_blend */ extern GLboolean GLAD_AMD_draw_buffers_blend; typedef void (APIENTRYP pfn_glBlendFuncIndexedAMD) (GLuint, GLenum, GLenum); extern pfn_glBlendFuncIndexedAMD fp_glBlendFuncIndexedAMD; typedef void (APIENTRYP pfn_glBlendFuncSeparateIndexedAMD) (GLuint, GLenum, GLenum, GLenum, GLenum); extern pfn_glBlendFuncSeparateIndexedAMD fp_glBlendFuncSeparateIndexedAMD; typedef void (APIENTRYP pfn_glBlendEquationIndexedAMD) (GLuint, GLenum); extern pfn_glBlendEquationIndexedAMD fp_glBlendEquationIndexedAMD; typedef void (APIENTRYP pfn_glBlendEquationSeparateIndexedAMD) (GLuint, GLenum, GLenum); extern pfn_glBlendEquationSeparateIndexedAMD fp_glBlendEquationSeparateIndexedAMD; /* GL_AMD_gcn_shader */ extern GLboolean GLAD_AMD_gcn_shader; /* GL_AMD_gpu_shader_int64 */ extern GLboolean GLAD_AMD_gpu_shader_int64; #define GL_INT64_NV 0x140E #define GL_UNSIGNED_INT64_NV 0x140F #define GL_INT8_NV 0x8FE0 #define GL_INT8_VEC2_NV 0x8FE1 #define GL_INT8_VEC3_NV 0x8FE2 #define GL_INT8_VEC4_NV 0x8FE3 #define GL_INT16_NV 0x8FE4 #define GL_INT16_VEC2_NV 0x8FE5 #define GL_INT16_VEC3_NV 0x8FE6 #define GL_INT16_VEC4_NV 0x8FE7 #define GL_INT64_VEC2_NV 0x8FE9 #define GL_INT64_VEC3_NV 0x8FEA #define GL_INT64_VEC4_NV 0x8FEB #define GL_UNSIGNED_INT8_NV 0x8FEC #define GL_UNSIGNED_INT8_VEC2_NV 0x8FED #define GL_UNSIGNED_INT8_VEC3_NV 0x8FEE #define GL_UNSIGNED_INT8_VEC4_NV 0x8FEF #define GL_UNSIGNED_INT16_NV 0x8FF0 #define GL_UNSIGNED_INT16_VEC2_NV 0x8FF1 #define GL_UNSIGNED_INT16_VEC3_NV 0x8FF2 #define GL_UNSIGNED_INT16_VEC4_NV 0x8FF3 #define GL_UNSIGNED_INT64_VEC2_NV 0x8FF5 #define GL_UNSIGNED_INT64_VEC3_NV 0x8FF6 #define GL_UNSIGNED_INT64_VEC4_NV 0x8FF7 #define GL_FLOAT16_NV 0x8FF8 #define GL_FLOAT16_VEC2_NV 0x8FF9 #define GL_FLOAT16_VEC3_NV 0x8FFA #define GL_FLOAT16_VEC4_NV 0x8FFB typedef void (APIENTRYP pfn_glUniform1i64NV) (GLint, GLint64EXT); extern pfn_glUniform1i64NV fp_glUniform1i64NV; typedef void (APIENTRYP pfn_glUniform2i64NV) (GLint, GLint64EXT, GLint64EXT); extern pfn_glUniform2i64NV fp_glUniform2i64NV; typedef void (APIENTRYP pfn_glUniform3i64NV) (GLint, GLint64EXT, GLint64EXT, GLint64EXT); extern pfn_glUniform3i64NV fp_glUniform3i64NV; typedef void (APIENTRYP pfn_glUniform4i64NV) (GLint, GLint64EXT, GLint64EXT, GLint64EXT, GLint64EXT); extern pfn_glUniform4i64NV fp_glUniform4i64NV; typedef void (APIENTRYP pfn_glUniform1i64vNV) (GLint, GLsizei, const GLint64EXT*); extern pfn_glUniform1i64vNV fp_glUniform1i64vNV; typedef void (APIENTRYP pfn_glUniform2i64vNV) (GLint, GLsizei, const GLint64EXT*); extern pfn_glUniform2i64vNV fp_glUniform2i64vNV; typedef void (APIENTRYP pfn_glUniform3i64vNV) (GLint, GLsizei, const GLint64EXT*); extern pfn_glUniform3i64vNV fp_glUniform3i64vNV; typedef void (APIENTRYP pfn_glUniform4i64vNV) (GLint, GLsizei, const GLint64EXT*); extern pfn_glUniform4i64vNV fp_glUniform4i64vNV; typedef void (APIENTRYP pfn_glUniform1ui64NV) (GLint, GLuint64EXT); extern pfn_glUniform1ui64NV fp_glUniform1ui64NV; typedef void (APIENTRYP pfn_glUniform2ui64NV) (GLint, GLuint64EXT, GLuint64EXT); extern pfn_glUniform2ui64NV fp_glUniform2ui64NV; typedef void (APIENTRYP pfn_glUniform3ui64NV) (GLint, GLuint64EXT, GLuint64EXT, GLuint64EXT); extern pfn_glUniform3ui64NV fp_glUniform3ui64NV; typedef void (APIENTRYP pfn_glUniform4ui64NV) (GLint, GLuint64EXT, GLuint64EXT, GLuint64EXT, GLuint64EXT); extern pfn_glUniform4ui64NV fp_glUniform4ui64NV; typedef void (APIENTRYP pfn_glUniform1ui64vNV) (GLint, GLsizei, const GLuint64EXT*); extern pfn_glUniform1ui64vNV fp_glUniform1ui64vNV; typedef void (APIENTRYP pfn_glUniform2ui64vNV) (GLint, GLsizei, const GLuint64EXT*); extern pfn_glUniform2ui64vNV fp_glUniform2ui64vNV; typedef void (APIENTRYP pfn_glUniform3ui64vNV) (GLint, GLsizei, const GLuint64EXT*); extern pfn_glUniform3ui64vNV fp_glUniform3ui64vNV; typedef void (APIENTRYP pfn_glUniform4ui64vNV) (GLint, GLsizei, const GLuint64EXT*); extern pfn_glUniform4ui64vNV fp_glUniform4ui64vNV; typedef void (APIENTRYP pfn_glGetUniformi64vNV) (GLuint, GLint, GLint64EXT*); extern pfn_glGetUniformi64vNV fp_glGetUniformi64vNV; typedef void (APIENTRYP pfn_glGetUniformui64vNV) (GLuint, GLint, GLuint64EXT*); extern pfn_glGetUniformui64vNV fp_glGetUniformui64vNV; typedef void (APIENTRYP pfn_glProgramUniform1i64NV) (GLuint, GLint, GLint64EXT); extern pfn_glProgramUniform1i64NV fp_glProgramUniform1i64NV; typedef void (APIENTRYP pfn_glProgramUniform2i64NV) (GLuint, GLint, GLint64EXT, GLint64EXT); extern pfn_glProgramUniform2i64NV fp_glProgramUniform2i64NV; typedef void (APIENTRYP pfn_glProgramUniform3i64NV) (GLuint, GLint, GLint64EXT, GLint64EXT, GLint64EXT); extern pfn_glProgramUniform3i64NV fp_glProgramUniform3i64NV; typedef void (APIENTRYP pfn_glProgramUniform4i64NV) (GLuint, GLint, GLint64EXT, GLint64EXT, GLint64EXT, GLint64EXT); extern pfn_glProgramUniform4i64NV fp_glProgramUniform4i64NV; typedef void (APIENTRYP pfn_glProgramUniform1i64vNV) (GLuint, GLint, GLsizei, const GLint64EXT*); extern pfn_glProgramUniform1i64vNV fp_glProgramUniform1i64vNV; typedef void (APIENTRYP pfn_glProgramUniform2i64vNV) (GLuint, GLint, GLsizei, const GLint64EXT*); extern pfn_glProgramUniform2i64vNV fp_glProgramUniform2i64vNV; typedef void (APIENTRYP pfn_glProgramUniform3i64vNV) (GLuint, GLint, GLsizei, const GLint64EXT*); extern pfn_glProgramUniform3i64vNV fp_glProgramUniform3i64vNV; typedef void (APIENTRYP pfn_glProgramUniform4i64vNV) (GLuint, GLint, GLsizei, const GLint64EXT*); extern pfn_glProgramUniform4i64vNV fp_glProgramUniform4i64vNV; typedef void (APIENTRYP pfn_glProgramUniform1ui64NV) (GLuint, GLint, GLuint64EXT); extern pfn_glProgramUniform1ui64NV fp_glProgramUniform1ui64NV; typedef void (APIENTRYP pfn_glProgramUniform2ui64NV) (GLuint, GLint, GLuint64EXT, GLuint64EXT); extern pfn_glProgramUniform2ui64NV fp_glProgramUniform2ui64NV; typedef void (APIENTRYP pfn_glProgramUniform3ui64NV) (GLuint, GLint, GLuint64EXT, GLuint64EXT, GLuint64EXT); extern pfn_glProgramUniform3ui64NV fp_glProgramUniform3ui64NV; typedef void (APIENTRYP pfn_glProgramUniform4ui64NV) (GLuint, GLint, GLuint64EXT, GLuint64EXT, GLuint64EXT, GLuint64EXT); extern pfn_glProgramUniform4ui64NV fp_glProgramUniform4ui64NV; typedef void (APIENTRYP pfn_glProgramUniform1ui64vNV) (GLuint, GLint, GLsizei, const GLuint64EXT*); extern pfn_glProgramUniform1ui64vNV fp_glProgramUniform1ui64vNV; typedef void (APIENTRYP pfn_glProgramUniform2ui64vNV) (GLuint, GLint, GLsizei, const GLuint64EXT*); extern pfn_glProgramUniform2ui64vNV fp_glProgramUniform2ui64vNV; typedef void (APIENTRYP pfn_glProgramUniform3ui64vNV) (GLuint, GLint, GLsizei, const GLuint64EXT*); extern pfn_glProgramUniform3ui64vNV fp_glProgramUniform3ui64vNV; typedef void (APIENTRYP pfn_glProgramUniform4ui64vNV) (GLuint, GLint, GLsizei, const GLuint64EXT*); extern pfn_glProgramUniform4ui64vNV fp_glProgramUniform4ui64vNV; /* GL_AMD_interleaved_elements */ extern GLboolean GLAD_AMD_interleaved_elements; #define GL_VERTEX_ELEMENT_SWIZZLE_AMD 0x91A4 #define GL_VERTEX_ID_SWIZZLE_AMD 0x91A5 typedef void (APIENTRYP pfn_glVertexAttribParameteriAMD) (GLuint, GLenum, GLint); extern pfn_glVertexAttribParameteriAMD fp_glVertexAttribParameteriAMD; /* GL_AMD_multi_draw_indirect */ extern GLboolean GLAD_AMD_multi_draw_indirect; typedef void (APIENTRYP pfn_glMultiDrawArraysIndirectAMD) (GLenum, const void*, GLsizei, GLsizei); extern pfn_glMultiDrawArraysIndirectAMD fp_glMultiDrawArraysIndirectAMD; typedef void (APIENTRYP pfn_glMultiDrawElementsIndirectAMD) (GLenum, GLenum, const void*, GLsizei, GLsizei); extern pfn_glMultiDrawElementsIndirectAMD fp_glMultiDrawElementsIndirectAMD; /* GL_AMD_name_gen_delete */ extern GLboolean GLAD_AMD_name_gen_delete; #define GL_DATA_BUFFER_AMD 0x9151 #define GL_PERFORMANCE_MONITOR_AMD 0x9152 #define GL_QUERY_OBJECT_AMD 0x9153 #define GL_VERTEX_ARRAY_OBJECT_AMD 0x9154 #define GL_SAMPLER_OBJECT_AMD 0x9155 typedef void (APIENTRYP pfn_glGenNamesAMD) (GLenum, GLuint, GLuint*); extern pfn_glGenNamesAMD fp_glGenNamesAMD; typedef void (APIENTRYP pfn_glDeleteNamesAMD) (GLenum, GLuint, const GLuint*); extern pfn_glDeleteNamesAMD fp_glDeleteNamesAMD; typedef GLboolean (APIENTRYP pfn_glIsNameAMD) (GLenum, GLuint); extern pfn_glIsNameAMD fp_glIsNameAMD; /* GL_AMD_occlusion_query_event */ extern GLboolean GLAD_AMD_occlusion_query_event; #define GL_OCCLUSION_QUERY_EVENT_MASK_AMD 0x874F #define GL_QUERY_DEPTH_PASS_EVENT_BIT_AMD 0x00000001 #define GL_QUERY_DEPTH_FAIL_EVENT_BIT_AMD 0x00000002 #define GL_QUERY_STENCIL_FAIL_EVENT_BIT_AMD 0x00000004 #define GL_QUERY_DEPTH_BOUNDS_FAIL_EVENT_BIT_AMD 0x00000008 #define GL_QUERY_ALL_EVENT_BITS_AMD 0xFFFFFFFF typedef void (APIENTRYP pfn_glQueryObjectParameteruiAMD) (GLenum, GLuint, GLenum, GLuint); extern pfn_glQueryObjectParameteruiAMD fp_glQueryObjectParameteruiAMD; /* GL_AMD_performance_monitor */ extern GLboolean GLAD_AMD_performance_monitor; #define GL_COUNTER_TYPE_AMD 0x8BC0 #define GL_COUNTER_RANGE_AMD 0x8BC1 #define GL_UNSIGNED_INT64_AMD 0x8BC2 #define GL_PERCENTAGE_AMD 0x8BC3 #define GL_PERFMON_RESULT_AVAILABLE_AMD 0x8BC4 #define GL_PERFMON_RESULT_SIZE_AMD 0x8BC5 #define GL_PERFMON_RESULT_AMD 0x8BC6 typedef void (APIENTRYP pfn_glGetPerfMonitorGroupsAMD) (GLint*, GLsizei, GLuint*); extern pfn_glGetPerfMonitorGroupsAMD fp_glGetPerfMonitorGroupsAMD; typedef void (APIENTRYP pfn_glGetPerfMonitorCountersAMD) (GLuint, GLint*, GLint*, GLsizei, GLuint*); extern pfn_glGetPerfMonitorCountersAMD fp_glGetPerfMonitorCountersAMD; typedef void (APIENTRYP pfn_glGetPerfMonitorGroupStringAMD) (GLuint, GLsizei, GLsizei*, GLchar*); extern pfn_glGetPerfMonitorGroupStringAMD fp_glGetPerfMonitorGroupStringAMD; typedef void (APIENTRYP pfn_glGetPerfMonitorCounterStringAMD) (GLuint, GLuint, GLsizei, GLsizei*, GLchar*); extern pfn_glGetPerfMonitorCounterStringAMD fp_glGetPerfMonitorCounterStringAMD; typedef void (APIENTRYP pfn_glGetPerfMonitorCounterInfoAMD) (GLuint, GLuint, GLenum, void*); extern pfn_glGetPerfMonitorCounterInfoAMD fp_glGetPerfMonitorCounterInfoAMD; typedef void (APIENTRYP pfn_glGenPerfMonitorsAMD) (GLsizei, GLuint*); extern pfn_glGenPerfMonitorsAMD fp_glGenPerfMonitorsAMD; typedef void (APIENTRYP pfn_glDeletePerfMonitorsAMD) (GLsizei, GLuint*); extern pfn_glDeletePerfMonitorsAMD fp_glDeletePerfMonitorsAMD; typedef void (APIENTRYP pfn_glSelectPerfMonitorCountersAMD) (GLuint, GLboolean, GLuint, GLint, GLuint*); extern pfn_glSelectPerfMonitorCountersAMD fp_glSelectPerfMonitorCountersAMD; typedef void (APIENTRYP pfn_glBeginPerfMonitorAMD) (GLuint); extern pfn_glBeginPerfMonitorAMD fp_glBeginPerfMonitorAMD; typedef void (APIENTRYP pfn_glEndPerfMonitorAMD) (GLuint); extern pfn_glEndPerfMonitorAMD fp_glEndPerfMonitorAMD; typedef void (APIENTRYP pfn_glGetPerfMonitorCounterDataAMD) (GLuint, GLenum, GLsizei, GLuint*, GLint*); extern pfn_glGetPerfMonitorCounterDataAMD fp_glGetPerfMonitorCounterDataAMD; /* GL_AMD_pinned_memory */ extern GLboolean GLAD_AMD_pinned_memory; #define GL_EXTERNAL_VIRTUAL_MEMORY_BUFFER_AMD 0x9160 /* GL_AMD_program_binary_Z400 */ extern GLboolean GLAD_AMD_program_binary_Z400; #define GL_Z400_BINARY_AMD 0x8740 /* GL_AMD_query_buffer_object */ extern GLboolean GLAD_AMD_query_buffer_object; #define GL_QUERY_BUFFER_AMD 0x9192 #define GL_QUERY_BUFFER_BINDING_AMD 0x9193 #define GL_QUERY_RESULT_NO_WAIT_AMD 0x9194 /* GL_AMD_sample_positions */ extern GLboolean GLAD_AMD_sample_positions; #define GL_SUBSAMPLE_DISTANCE_AMD 0x883F typedef void (APIENTRYP pfn_glSetMultisamplefvAMD) (GLenum, GLuint, const GLfloat*); extern pfn_glSetMultisamplefvAMD fp_glSetMultisamplefvAMD; /* GL_AMD_seamless_cubemap_per_texture */ extern GLboolean GLAD_AMD_seamless_cubemap_per_texture; /* GL_AMD_shader_atomic_counter_ops */ extern GLboolean GLAD_AMD_shader_atomic_counter_ops; /* GL_AMD_shader_stencil_export */ extern GLboolean GLAD_AMD_shader_stencil_export; /* GL_AMD_shader_trinary_minmax */ extern GLboolean GLAD_AMD_shader_trinary_minmax; /* GL_AMD_sparse_texture */ extern GLboolean GLAD_AMD_sparse_texture; #define GL_VIRTUAL_PAGE_SIZE_X_AMD 0x9195 #define GL_VIRTUAL_PAGE_SIZE_Y_AMD 0x9196 #define GL_VIRTUAL_PAGE_SIZE_Z_AMD 0x9197 #define GL_MAX_SPARSE_TEXTURE_SIZE_AMD 0x9198 #define GL_MAX_SPARSE_3D_TEXTURE_SIZE_AMD 0x9199 #define GL_MAX_SPARSE_ARRAY_TEXTURE_LAYERS 0x919A #define GL_MIN_SPARSE_LEVEL_AMD 0x919B #define GL_MIN_LOD_WARNING_AMD 0x919C #define GL_TEXTURE_STORAGE_SPARSE_BIT_AMD 0x00000001 typedef void (APIENTRYP pfn_glTexStorageSparseAMD) (GLenum, GLenum, GLsizei, GLsizei, GLsizei, GLsizei, GLbitfield); extern pfn_glTexStorageSparseAMD fp_glTexStorageSparseAMD; typedef void (APIENTRYP pfn_glTextureStorageSparseAMD) (GLuint, GLenum, GLenum, GLsizei, GLsizei, GLsizei, GLsizei, GLbitfield); extern pfn_glTextureStorageSparseAMD fp_glTextureStorageSparseAMD; /* GL_AMD_stencil_operation_extended */ extern GLboolean GLAD_AMD_stencil_operation_extended; #define GL_SET_AMD 0x874A #define GL_REPLACE_VALUE_AMD 0x874B #define GL_STENCIL_OP_VALUE_AMD 0x874C #define GL_STENCIL_BACK_OP_VALUE_AMD 0x874D typedef void (APIENTRYP pfn_glStencilOpValueAMD) (GLenum, GLuint); extern pfn_glStencilOpValueAMD fp_glStencilOpValueAMD; /* GL_AMD_texture_texture4 */ extern GLboolean GLAD_AMD_texture_texture4; /* GL_AMD_transform_feedback3_lines_triangles */ extern GLboolean GLAD_AMD_transform_feedback3_lines_triangles; /* GL_AMD_transform_feedback4 */ extern GLboolean GLAD_AMD_transform_feedback4; #define GL_STREAM_RASTERIZATION_AMD 0x91A0 /* GL_AMD_vertex_shader_layer */ extern GLboolean GLAD_AMD_vertex_shader_layer; /* GL_AMD_vertex_shader_tessellator */ extern GLboolean GLAD_AMD_vertex_shader_tessellator; #define GL_SAMPLER_BUFFER_AMD 0x9001 #define GL_INT_SAMPLER_BUFFER_AMD 0x9002 #define GL_UNSIGNED_INT_SAMPLER_BUFFER_AMD 0x9003 #define GL_TESSELLATION_MODE_AMD 0x9004 #define GL_TESSELLATION_FACTOR_AMD 0x9005 #define GL_DISCRETE_AMD 0x9006 #define GL_CONTINUOUS_AMD 0x9007 typedef void (APIENTRYP pfn_glTessellationFactorAMD) (GLfloat); extern pfn_glTessellationFactorAMD fp_glTessellationFactorAMD; typedef void (APIENTRYP pfn_glTessellationModeAMD) (GLenum); extern pfn_glTessellationModeAMD fp_glTessellationModeAMD; /* GL_AMD_vertex_shader_viewport_index */ extern GLboolean GLAD_AMD_vertex_shader_viewport_index; /* GL_ANDROID_extension_pack_es31a */ extern GLboolean GLAD_ANDROID_extension_pack_es31a; /* GL_ANGLE_depth_texture */ extern GLboolean GLAD_ANGLE_depth_texture; /* GL_ANGLE_framebuffer_blit */ extern GLboolean GLAD_ANGLE_framebuffer_blit; #define GL_READ_FRAMEBUFFER_ANGLE 0x8CA8 #define GL_DRAW_FRAMEBUFFER_ANGLE 0x8CA9 #define GL_DRAW_FRAMEBUFFER_BINDING_ANGLE 0x8CA6 #define GL_READ_FRAMEBUFFER_BINDING_ANGLE 0x8CAA typedef void (APIENTRYP pfn_glBlitFramebufferANGLE) (GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLbitfield, GLenum); extern pfn_glBlitFramebufferANGLE fp_glBlitFramebufferANGLE; /* GL_ANGLE_framebuffer_multisample */ extern GLboolean GLAD_ANGLE_framebuffer_multisample; #define GL_RENDERBUFFER_SAMPLES_ANGLE 0x8CAB #define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_ANGLE 0x8D56 #define GL_MAX_SAMPLES_ANGLE 0x8D57 typedef void (APIENTRYP pfn_glRenderbufferStorageMultisampleANGLE) (GLenum, GLsizei, GLenum, GLsizei, GLsizei); extern pfn_glRenderbufferStorageMultisampleANGLE fp_glRenderbufferStorageMultisampleANGLE; /* GL_ANGLE_instanced_arrays */ extern GLboolean GLAD_ANGLE_instanced_arrays; #define GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE 0x88FE typedef void (APIENTRYP pfn_glDrawArraysInstancedANGLE) (GLenum, GLint, GLsizei, GLsizei); extern pfn_glDrawArraysInstancedANGLE fp_glDrawArraysInstancedANGLE; typedef void (APIENTRYP pfn_glDrawElementsInstancedANGLE) (GLenum, GLsizei, GLenum, const void*, GLsizei); extern pfn_glDrawElementsInstancedANGLE fp_glDrawElementsInstancedANGLE; typedef void (APIENTRYP pfn_glVertexAttribDivisorANGLE) (GLuint, GLuint); extern pfn_glVertexAttribDivisorANGLE fp_glVertexAttribDivisorANGLE; /* GL_ANGLE_pack_reverse_row_order */ extern GLboolean GLAD_ANGLE_pack_reverse_row_order; #define GL_PACK_REVERSE_ROW_ORDER_ANGLE 0x93A4 /* GL_ANGLE_program_binary */ extern GLboolean GLAD_ANGLE_program_binary; #define GL_PROGRAM_BINARY_ANGLE 0x93A6 /* GL_ANGLE_texture_compression_dxt3 */ extern GLboolean GLAD_ANGLE_texture_compression_dxt3; #define GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE 0x83F2 /* GL_ANGLE_texture_compression_dxt5 */ extern GLboolean GLAD_ANGLE_texture_compression_dxt5; #define GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE 0x83F3 /* GL_ANGLE_texture_usage */ extern GLboolean GLAD_ANGLE_texture_usage; #define GL_TEXTURE_USAGE_ANGLE 0x93A2 #define GL_FRAMEBUFFER_ATTACHMENT_ANGLE 0x93A3 /* GL_ANGLE_translated_shader_source */ extern GLboolean GLAD_ANGLE_translated_shader_source; #define GL_TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE 0x93A0 typedef void (APIENTRYP pfn_glGetTranslatedShaderSourceANGLE) (GLuint, GLsizei, GLsizei*, GLchar*); extern pfn_glGetTranslatedShaderSourceANGLE fp_glGetTranslatedShaderSourceANGLE; /* GL_APPLE_aux_depth_stencil */ extern GLboolean GLAD_APPLE_aux_depth_stencil; #define GL_AUX_DEPTH_STENCIL_APPLE 0x8A14 /* GL_APPLE_client_storage */ extern GLboolean GLAD_APPLE_client_storage; #define GL_UNPACK_CLIENT_STORAGE_APPLE 0x85B2 /* GL_APPLE_clip_distance */ extern GLboolean GLAD_APPLE_clip_distance; #define GL_MAX_CLIP_DISTANCES_APPLE 0x0D32 #define GL_CLIP_DISTANCE0_APPLE 0x3000 #define GL_CLIP_DISTANCE1_APPLE 0x3001 #define GL_CLIP_DISTANCE2_APPLE 0x3002 #define GL_CLIP_DISTANCE3_APPLE 0x3003 #define GL_CLIP_DISTANCE4_APPLE 0x3004 #define GL_CLIP_DISTANCE5_APPLE 0x3005 #define GL_CLIP_DISTANCE6_APPLE 0x3006 #define GL_CLIP_DISTANCE7_APPLE 0x3007 /* GL_APPLE_color_buffer_packed_float */ extern GLboolean GLAD_APPLE_color_buffer_packed_float; /* GL_APPLE_copy_texture_levels */ extern GLboolean GLAD_APPLE_copy_texture_levels; typedef void (APIENTRYP pfn_glCopyTextureLevelsAPPLE) (GLuint, GLuint, GLint, GLsizei); extern pfn_glCopyTextureLevelsAPPLE fp_glCopyTextureLevelsAPPLE; /* GL_APPLE_element_array */ extern GLboolean GLAD_APPLE_element_array; #define GL_ELEMENT_ARRAY_APPLE 0x8A0C #define GL_ELEMENT_ARRAY_TYPE_APPLE 0x8A0D #define GL_ELEMENT_ARRAY_POINTER_APPLE 0x8A0E typedef void (APIENTRYP pfn_glElementPointerAPPLE) (GLenum, const void*); extern pfn_glElementPointerAPPLE fp_glElementPointerAPPLE; typedef void (APIENTRYP pfn_glDrawElementArrayAPPLE) (GLenum, GLint, GLsizei); extern pfn_glDrawElementArrayAPPLE fp_glDrawElementArrayAPPLE; typedef void (APIENTRYP pfn_glDrawRangeElementArrayAPPLE) (GLenum, GLuint, GLuint, GLint, GLsizei); extern pfn_glDrawRangeElementArrayAPPLE fp_glDrawRangeElementArrayAPPLE; typedef void (APIENTRYP pfn_glMultiDrawElementArrayAPPLE) (GLenum, const GLint*, const GLsizei*, GLsizei); extern pfn_glMultiDrawElementArrayAPPLE fp_glMultiDrawElementArrayAPPLE; typedef void (APIENTRYP pfn_glMultiDrawRangeElementArrayAPPLE) (GLenum, GLuint, GLuint, const GLint*, const GLsizei*, GLsizei); extern pfn_glMultiDrawRangeElementArrayAPPLE fp_glMultiDrawRangeElementArrayAPPLE; /* GL_APPLE_fence */ extern GLboolean GLAD_APPLE_fence; #define GL_DRAW_PIXELS_APPLE 0x8A0A #define GL_FENCE_APPLE 0x8A0B typedef void (APIENTRYP pfn_glGenFencesAPPLE) (GLsizei, GLuint*); extern pfn_glGenFencesAPPLE fp_glGenFencesAPPLE; typedef void (APIENTRYP pfn_glDeleteFencesAPPLE) (GLsizei, const GLuint*); extern pfn_glDeleteFencesAPPLE fp_glDeleteFencesAPPLE; typedef void (APIENTRYP pfn_glSetFenceAPPLE) (GLuint); extern pfn_glSetFenceAPPLE fp_glSetFenceAPPLE; typedef GLboolean (APIENTRYP pfn_glIsFenceAPPLE) (GLuint); extern pfn_glIsFenceAPPLE fp_glIsFenceAPPLE; typedef GLboolean (APIENTRYP pfn_glTestFenceAPPLE) (GLuint); extern pfn_glTestFenceAPPLE fp_glTestFenceAPPLE; typedef void (APIENTRYP pfn_glFinishFenceAPPLE) (GLuint); extern pfn_glFinishFenceAPPLE fp_glFinishFenceAPPLE; typedef GLboolean (APIENTRYP pfn_glTestObjectAPPLE) (GLenum, GLuint); extern pfn_glTestObjectAPPLE fp_glTestObjectAPPLE; typedef void (APIENTRYP pfn_glFinishObjectAPPLE) (GLenum, GLint); extern pfn_glFinishObjectAPPLE fp_glFinishObjectAPPLE; /* GL_APPLE_float_pixels */ extern GLboolean GLAD_APPLE_float_pixels; #define GL_HALF_APPLE 0x140B #define GL_RGBA_FLOAT32_APPLE 0x8814 #define GL_RGB_FLOAT32_APPLE 0x8815 #define GL_ALPHA_FLOAT32_APPLE 0x8816 #define GL_INTENSITY_FLOAT32_APPLE 0x8817 #define GL_LUMINANCE_FLOAT32_APPLE 0x8818 #define GL_LUMINANCE_ALPHA_FLOAT32_APPLE 0x8819 #define GL_RGBA_FLOAT16_APPLE 0x881A #define GL_RGB_FLOAT16_APPLE 0x881B #define GL_ALPHA_FLOAT16_APPLE 0x881C #define GL_INTENSITY_FLOAT16_APPLE 0x881D #define GL_LUMINANCE_FLOAT16_APPLE 0x881E #define GL_LUMINANCE_ALPHA_FLOAT16_APPLE 0x881F #define GL_COLOR_FLOAT_APPLE 0x8A0F /* GL_APPLE_flush_buffer_range */ extern GLboolean GLAD_APPLE_flush_buffer_range; #define GL_BUFFER_SERIALIZED_MODIFY_APPLE 0x8A12 #define GL_BUFFER_FLUSHING_UNMAP_APPLE 0x8A13 typedef void (APIENTRYP pfn_glBufferParameteriAPPLE) (GLenum, GLenum, GLint); extern pfn_glBufferParameteriAPPLE fp_glBufferParameteriAPPLE; typedef void (APIENTRYP pfn_glFlushMappedBufferRangeAPPLE) (GLenum, GLintptr, GLsizeiptr); extern pfn_glFlushMappedBufferRangeAPPLE fp_glFlushMappedBufferRangeAPPLE; /* GL_APPLE_framebuffer_multisample */ extern GLboolean GLAD_APPLE_framebuffer_multisample; #define GL_RENDERBUFFER_SAMPLES_APPLE 0x8CAB #define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_APPLE 0x8D56 #define GL_MAX_SAMPLES_APPLE 0x8D57 #define GL_READ_FRAMEBUFFER_APPLE 0x8CA8 #define GL_DRAW_FRAMEBUFFER_APPLE 0x8CA9 #define GL_DRAW_FRAMEBUFFER_BINDING_APPLE 0x8CA6 #define GL_READ_FRAMEBUFFER_BINDING_APPLE 0x8CAA typedef void (APIENTRYP pfn_glRenderbufferStorageMultisampleAPPLE) (GLenum, GLsizei, GLenum, GLsizei, GLsizei); extern pfn_glRenderbufferStorageMultisampleAPPLE fp_glRenderbufferStorageMultisampleAPPLE; typedef void (APIENTRYP pfn_glResolveMultisampleFramebufferAPPLE) (); extern pfn_glResolveMultisampleFramebufferAPPLE fp_glResolveMultisampleFramebufferAPPLE; /* GL_APPLE_object_purgeable */ extern GLboolean GLAD_APPLE_object_purgeable; #define GL_BUFFER_OBJECT_APPLE 0x85B3 #define GL_RELEASED_APPLE 0x8A19 #define GL_VOLATILE_APPLE 0x8A1A #define GL_RETAINED_APPLE 0x8A1B #define GL_UNDEFINED_APPLE 0x8A1C #define GL_PURGEABLE_APPLE 0x8A1D typedef GLenum (APIENTRYP pfn_glObjectPurgeableAPPLE) (GLenum, GLuint, GLenum); extern pfn_glObjectPurgeableAPPLE fp_glObjectPurgeableAPPLE; typedef GLenum (APIENTRYP pfn_glObjectUnpurgeableAPPLE) (GLenum, GLuint, GLenum); extern pfn_glObjectUnpurgeableAPPLE fp_glObjectUnpurgeableAPPLE; typedef void (APIENTRYP pfn_glGetObjectParameterivAPPLE) (GLenum, GLuint, GLenum, GLint*); extern pfn_glGetObjectParameterivAPPLE fp_glGetObjectParameterivAPPLE; /* GL_APPLE_rgb_422 */ extern GLboolean GLAD_APPLE_rgb_422; #define GL_RGB_422_APPLE 0x8A1F #define GL_UNSIGNED_SHORT_8_8_APPLE 0x85BA #define GL_UNSIGNED_SHORT_8_8_REV_APPLE 0x85BB #define GL_RGB_RAW_422_APPLE 0x8A51 /* GL_APPLE_row_bytes */ extern GLboolean GLAD_APPLE_row_bytes; #define GL_PACK_ROW_BYTES_APPLE 0x8A15 #define GL_UNPACK_ROW_BYTES_APPLE 0x8A16 /* GL_APPLE_sync */ extern GLboolean GLAD_APPLE_sync; #define GL_SYNC_OBJECT_APPLE 0x8A53 #define GL_MAX_SERVER_WAIT_TIMEOUT_APPLE 0x9111 #define GL_OBJECT_TYPE_APPLE 0x9112 #define GL_SYNC_CONDITION_APPLE 0x9113 #define GL_SYNC_STATUS_APPLE 0x9114 #define GL_SYNC_FLAGS_APPLE 0x9115 #define GL_SYNC_FENCE_APPLE 0x9116 #define GL_SYNC_GPU_COMMANDS_COMPLETE_APPLE 0x9117 #define GL_UNSIGNALED_APPLE 0x9118 #define GL_SIGNALED_APPLE 0x9119 #define GL_ALREADY_SIGNALED_APPLE 0x911A #define GL_TIMEOUT_EXPIRED_APPLE 0x911B #define GL_CONDITION_SATISFIED_APPLE 0x911C #define GL_WAIT_FAILED_APPLE 0x911D #define GL_SYNC_FLUSH_COMMANDS_BIT_APPLE 0x00000001 #define GL_TIMEOUT_IGNORED_APPLE 0xFFFFFFFFFFFFFFFF typedef GLsync (APIENTRYP pfn_glFenceSyncAPPLE) (GLenum, GLbitfield); extern pfn_glFenceSyncAPPLE fp_glFenceSyncAPPLE; typedef GLboolean (APIENTRYP pfn_glIsSyncAPPLE) (GLsync); extern pfn_glIsSyncAPPLE fp_glIsSyncAPPLE; typedef void (APIENTRYP pfn_glDeleteSyncAPPLE) (GLsync); extern pfn_glDeleteSyncAPPLE fp_glDeleteSyncAPPLE; typedef GLenum (APIENTRYP pfn_glClientWaitSyncAPPLE) (GLsync, GLbitfield, GLuint64); extern pfn_glClientWaitSyncAPPLE fp_glClientWaitSyncAPPLE; typedef void (APIENTRYP pfn_glWaitSyncAPPLE) (GLsync, GLbitfield, GLuint64); extern pfn_glWaitSyncAPPLE fp_glWaitSyncAPPLE; typedef void (APIENTRYP pfn_glGetInteger64vAPPLE) (GLenum, GLint64*); extern pfn_glGetInteger64vAPPLE fp_glGetInteger64vAPPLE; typedef void (APIENTRYP pfn_glGetSyncivAPPLE) (GLsync, GLenum, GLsizei, GLsizei*, GLint*); extern pfn_glGetSyncivAPPLE fp_glGetSyncivAPPLE; /* GL_APPLE_texture_format_BGRA8888 */ extern GLboolean GLAD_APPLE_texture_format_BGRA8888; /* GL_APPLE_texture_max_level */ extern GLboolean GLAD_APPLE_texture_max_level; #define GL_TEXTURE_MAX_LEVEL_APPLE 0x813D /* GL_APPLE_texture_packed_float */ extern GLboolean GLAD_APPLE_texture_packed_float; #define GL_UNSIGNED_INT_10F_11F_11F_REV_APPLE 0x8C3B #define GL_UNSIGNED_INT_5_9_9_9_REV_APPLE 0x8C3E #define GL_R11F_G11F_B10F_APPLE 0x8C3A #define GL_RGB9_E5_APPLE 0x8C3D /* GL_APPLE_texture_range */ extern GLboolean GLAD_APPLE_texture_range; #define GL_TEXTURE_RANGE_LENGTH_APPLE 0x85B7 #define GL_TEXTURE_RANGE_POINTER_APPLE 0x85B8 #define GL_TEXTURE_STORAGE_HINT_APPLE 0x85BC #define GL_STORAGE_PRIVATE_APPLE 0x85BD #define GL_STORAGE_CACHED_APPLE 0x85BE #define GL_STORAGE_SHARED_APPLE 0x85BF typedef void (APIENTRYP pfn_glTextureRangeAPPLE) (GLenum, GLsizei, const void*); extern pfn_glTextureRangeAPPLE fp_glTextureRangeAPPLE; typedef void (APIENTRYP pfn_glGetTexParameterPointervAPPLE) (GLenum, GLenum, void**); extern pfn_glGetTexParameterPointervAPPLE fp_glGetTexParameterPointervAPPLE; /* GL_APPLE_vertex_array_object */ extern GLboolean GLAD_APPLE_vertex_array_object; #define GL_VERTEX_ARRAY_BINDING_APPLE 0x85B5 typedef void (APIENTRYP pfn_glBindVertexArrayAPPLE) (GLuint); extern pfn_glBindVertexArrayAPPLE fp_glBindVertexArrayAPPLE; typedef void (APIENTRYP pfn_glDeleteVertexArraysAPPLE) (GLsizei, const GLuint*); extern pfn_glDeleteVertexArraysAPPLE fp_glDeleteVertexArraysAPPLE; typedef void (APIENTRYP pfn_glGenVertexArraysAPPLE) (GLsizei, GLuint*); extern pfn_glGenVertexArraysAPPLE fp_glGenVertexArraysAPPLE; typedef GLboolean (APIENTRYP pfn_glIsVertexArrayAPPLE) (GLuint); extern pfn_glIsVertexArrayAPPLE fp_glIsVertexArrayAPPLE; /* GL_APPLE_vertex_array_range */ extern GLboolean GLAD_APPLE_vertex_array_range; #define GL_VERTEX_ARRAY_RANGE_APPLE 0x851D #define GL_VERTEX_ARRAY_RANGE_LENGTH_APPLE 0x851E #define GL_VERTEX_ARRAY_STORAGE_HINT_APPLE 0x851F #define GL_VERTEX_ARRAY_RANGE_POINTER_APPLE 0x8521 #define GL_STORAGE_CLIENT_APPLE 0x85B4 typedef void (APIENTRYP pfn_glVertexArrayRangeAPPLE) (GLsizei, void*); extern pfn_glVertexArrayRangeAPPLE fp_glVertexArrayRangeAPPLE; typedef void (APIENTRYP pfn_glFlushVertexArrayRangeAPPLE) (GLsizei, void*); extern pfn_glFlushVertexArrayRangeAPPLE fp_glFlushVertexArrayRangeAPPLE; typedef void (APIENTRYP pfn_glVertexArrayParameteriAPPLE) (GLenum, GLint); extern pfn_glVertexArrayParameteriAPPLE fp_glVertexArrayParameteriAPPLE; /* GL_APPLE_vertex_program_evaluators */ extern GLboolean GLAD_APPLE_vertex_program_evaluators; #define GL_VERTEX_ATTRIB_MAP1_APPLE 0x8A00 #define GL_VERTEX_ATTRIB_MAP2_APPLE 0x8A01 #define GL_VERTEX_ATTRIB_MAP1_SIZE_APPLE 0x8A02 #define GL_VERTEX_ATTRIB_MAP1_COEFF_APPLE 0x8A03 #define GL_VERTEX_ATTRIB_MAP1_ORDER_APPLE 0x8A04 #define GL_VERTEX_ATTRIB_MAP1_DOMAIN_APPLE 0x8A05 #define GL_VERTEX_ATTRIB_MAP2_SIZE_APPLE 0x8A06 #define GL_VERTEX_ATTRIB_MAP2_COEFF_APPLE 0x8A07 #define GL_VERTEX_ATTRIB_MAP2_ORDER_APPLE 0x8A08 #define GL_VERTEX_ATTRIB_MAP2_DOMAIN_APPLE 0x8A09 typedef void (APIENTRYP pfn_glEnableVertexAttribAPPLE) (GLuint, GLenum); extern pfn_glEnableVertexAttribAPPLE fp_glEnableVertexAttribAPPLE; typedef void (APIENTRYP pfn_glDisableVertexAttribAPPLE) (GLuint, GLenum); extern pfn_glDisableVertexAttribAPPLE fp_glDisableVertexAttribAPPLE; typedef GLboolean (APIENTRYP pfn_glIsVertexAttribEnabledAPPLE) (GLuint, GLenum); extern pfn_glIsVertexAttribEnabledAPPLE fp_glIsVertexAttribEnabledAPPLE; typedef void (APIENTRYP pfn_glMapVertexAttrib1dAPPLE) (GLuint, GLuint, GLdouble, GLdouble, GLint, GLint, const GLdouble*); extern pfn_glMapVertexAttrib1dAPPLE fp_glMapVertexAttrib1dAPPLE; typedef void (APIENTRYP pfn_glMapVertexAttrib1fAPPLE) (GLuint, GLuint, GLfloat, GLfloat, GLint, GLint, const GLfloat*); extern pfn_glMapVertexAttrib1fAPPLE fp_glMapVertexAttrib1fAPPLE; typedef void (APIENTRYP pfn_glMapVertexAttrib2dAPPLE) (GLuint, GLuint, GLdouble, GLdouble, GLint, GLint, GLdouble, GLdouble, GLint, GLint, const GLdouble*); extern pfn_glMapVertexAttrib2dAPPLE fp_glMapVertexAttrib2dAPPLE; typedef void (APIENTRYP pfn_glMapVertexAttrib2fAPPLE) (GLuint, GLuint, GLfloat, GLfloat, GLint, GLint, GLfloat, GLfloat, GLint, GLint, const GLfloat*); extern pfn_glMapVertexAttrib2fAPPLE fp_glMapVertexAttrib2fAPPLE; /* GL_APPLE_ycbcr_422 */ extern GLboolean GLAD_APPLE_ycbcr_422; #define GL_YCBCR_422_APPLE 0x85B9 /* GL_ARM_mali_program_binary */ extern GLboolean GLAD_ARM_mali_program_binary; #define GL_MALI_PROGRAM_BINARY_ARM 0x8F61 /* GL_ARM_mali_shader_binary */ extern GLboolean GLAD_ARM_mali_shader_binary; #define GL_MALI_SHADER_BINARY_ARM 0x8F60 /* GL_ARM_rgba8 */ extern GLboolean GLAD_ARM_rgba8; /* GL_ARM_shader_framebuffer_fetch */ extern GLboolean GLAD_ARM_shader_framebuffer_fetch; #define GL_FETCH_PER_SAMPLE_ARM 0x8F65 #define GL_FRAGMENT_SHADER_FRAMEBUFFER_FETCH_MRT_ARM 0x8F66 /* GL_ARM_shader_framebuffer_fetch_depth_stencil */ extern GLboolean GLAD_ARM_shader_framebuffer_fetch_depth_stencil; /* GL_ATI_meminfo */ extern GLboolean GLAD_ATI_meminfo; #define GL_VBO_FREE_MEMORY_ATI 0x87FB #define GL_TEXTURE_FREE_MEMORY_ATI 0x87FC #define GL_RENDERBUFFER_FREE_MEMORY_ATI 0x87FD /* GL_ATI_pixel_format_float */ extern GLboolean GLAD_ATI_pixel_format_float; #define GL_RGBA_FLOAT_MODE_ATI 0x8820 #define GL_COLOR_CLEAR_UNCLAMPED_VALUE_ATI 0x8835 /* GL_DMP_program_binary */ extern GLboolean GLAD_DMP_program_binary; #define GL_SMAPHS30_PROGRAM_BINARY_DMP 0x9251 #define GL_SMAPHS_PROGRAM_BINARY_DMP 0x9252 #define GL_DMP_PROGRAM_BINARY_DMP 0x9253 /* GL_DMP_shader_binary */ extern GLboolean GLAD_DMP_shader_binary; #define GL_SHADER_BINARY_DMP 0x9250 /* GL_FJ_shader_binary_GCCSO */ extern GLboolean GLAD_FJ_shader_binary_GCCSO; #define GL_GCCSO_SHADER_BINARY_FJ 0x9260 /* GL_GREMEDY_frame_terminator */ extern GLboolean GLAD_GREMEDY_frame_terminator; typedef void (APIENTRYP pfn_glFrameTerminatorGREMEDY) (); extern pfn_glFrameTerminatorGREMEDY fp_glFrameTerminatorGREMEDY; /* GL_GREMEDY_string_marker */ extern GLboolean GLAD_GREMEDY_string_marker; typedef void (APIENTRYP pfn_glStringMarkerGREMEDY) (GLsizei, const void*); extern pfn_glStringMarkerGREMEDY fp_glStringMarkerGREMEDY; /* GL_IMG_multisampled_render_to_texture */ extern GLboolean GLAD_IMG_multisampled_render_to_texture; #define GL_RENDERBUFFER_SAMPLES_IMG 0x9133 #define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_IMG 0x9134 #define GL_MAX_SAMPLES_IMG 0x9135 #define GL_TEXTURE_SAMPLES_IMG 0x9136 typedef void (APIENTRYP pfn_glRenderbufferStorageMultisampleIMG) (GLenum, GLsizei, GLenum, GLsizei, GLsizei); extern pfn_glRenderbufferStorageMultisampleIMG fp_glRenderbufferStorageMultisampleIMG; typedef void (APIENTRYP pfn_glFramebufferTexture2DMultisampleIMG) (GLenum, GLenum, GLenum, GLuint, GLint, GLsizei); extern pfn_glFramebufferTexture2DMultisampleIMG fp_glFramebufferTexture2DMultisampleIMG; /* GL_IMG_program_binary */ extern GLboolean GLAD_IMG_program_binary; #define GL_SGX_PROGRAM_BINARY_IMG 0x9130 /* GL_IMG_read_format */ extern GLboolean GLAD_IMG_read_format; #define GL_BGRA_IMG 0x80E1 #define GL_UNSIGNED_SHORT_4_4_4_4_REV_IMG 0x8365 /* GL_IMG_shader_binary */ extern GLboolean GLAD_IMG_shader_binary; #define GL_SGX_BINARY_IMG 0x8C0A /* GL_IMG_texture_compression_pvrtc */ extern GLboolean GLAD_IMG_texture_compression_pvrtc; #define GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG 0x8C00 #define GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG 0x8C01 #define GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG 0x8C02 #define GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG 0x8C03 /* GL_IMG_texture_compression_pvrtc2 */ extern GLboolean GLAD_IMG_texture_compression_pvrtc2; #define GL_COMPRESSED_RGBA_PVRTC_2BPPV2_IMG 0x9137 #define GL_COMPRESSED_RGBA_PVRTC_4BPPV2_IMG 0x9138 /* GL_IMG_texture_filter_cubic */ extern GLboolean GLAD_IMG_texture_filter_cubic; #define GL_CUBIC_IMG 0x9139 #define GL_CUBIC_MIPMAP_NEAREST_IMG 0x913A #define GL_CUBIC_MIPMAP_LINEAR_IMG 0x913B /* GL_INGR_blend_func_separate */ extern GLboolean GLAD_INGR_blend_func_separate; typedef void (APIENTRYP pfn_glBlendFuncSeparateINGR) (GLenum, GLenum, GLenum, GLenum); extern pfn_glBlendFuncSeparateINGR fp_glBlendFuncSeparateINGR; /* GL_INTEL_fragment_shader_ordering */ extern GLboolean GLAD_INTEL_fragment_shader_ordering; /* GL_INTEL_framebuffer_CMAA */ extern GLboolean GLAD_INTEL_framebuffer_CMAA; typedef void (APIENTRYP pfn_glApplyFramebufferAttachmentCMAAINTEL) (); extern pfn_glApplyFramebufferAttachmentCMAAINTEL fp_glApplyFramebufferAttachmentCMAAINTEL; /* GL_INTEL_map_texture */ extern GLboolean GLAD_INTEL_map_texture; #define GL_TEXTURE_MEMORY_LAYOUT_INTEL 0x83FF #define GL_LAYOUT_DEFAULT_INTEL 0 #define GL_LAYOUT_LINEAR_INTEL 1 #define GL_LAYOUT_LINEAR_CPU_CACHED_INTEL 2 typedef void (APIENTRYP pfn_glSyncTextureINTEL) (GLuint); extern pfn_glSyncTextureINTEL fp_glSyncTextureINTEL; typedef void (APIENTRYP pfn_glUnmapTexture2DINTEL) (GLuint, GLint); extern pfn_glUnmapTexture2DINTEL fp_glUnmapTexture2DINTEL; typedef void* (APIENTRYP pfn_glMapTexture2DINTEL) (GLuint, GLint, GLbitfield, GLint*, GLenum*); extern pfn_glMapTexture2DINTEL fp_glMapTexture2DINTEL; /* GL_INTEL_performance_query */ extern GLboolean GLAD_INTEL_performance_query; #define GL_PERFQUERY_SINGLE_CONTEXT_INTEL 0x00000000 #define GL_PERFQUERY_GLOBAL_CONTEXT_INTEL 0x00000001 #define GL_PERFQUERY_WAIT_INTEL 0x83FB #define GL_PERFQUERY_FLUSH_INTEL 0x83FA #define GL_PERFQUERY_DONOT_FLUSH_INTEL 0x83F9 #define GL_PERFQUERY_COUNTER_EVENT_INTEL 0x94F0 #define GL_PERFQUERY_COUNTER_DURATION_NORM_INTEL 0x94F1 #define GL_PERFQUERY_COUNTER_DURATION_RAW_INTEL 0x94F2 #define GL_PERFQUERY_COUNTER_THROUGHPUT_INTEL 0x94F3 #define GL_PERFQUERY_COUNTER_RAW_INTEL 0x94F4 #define GL_PERFQUERY_COUNTER_TIMESTAMP_INTEL 0x94F5 #define GL_PERFQUERY_COUNTER_DATA_UINT32_INTEL 0x94F8 #define GL_PERFQUERY_COUNTER_DATA_UINT64_INTEL 0x94F9 #define GL_PERFQUERY_COUNTER_DATA_FLOAT_INTEL 0x94FA #define GL_PERFQUERY_COUNTER_DATA_DOUBLE_INTEL 0x94FB #define GL_PERFQUERY_COUNTER_DATA_BOOL32_INTEL 0x94FC #define GL_PERFQUERY_QUERY_NAME_LENGTH_MAX_INTEL 0x94FD #define GL_PERFQUERY_COUNTER_NAME_LENGTH_MAX_INTEL 0x94FE #define GL_PERFQUERY_COUNTER_DESC_LENGTH_MAX_INTEL 0x94FF #define GL_PERFQUERY_GPA_EXTENDED_COUNTERS_INTEL 0x9500 typedef void (APIENTRYP pfn_glBeginPerfQueryINTEL) (GLuint); extern pfn_glBeginPerfQueryINTEL fp_glBeginPerfQueryINTEL; typedef void (APIENTRYP pfn_glCreatePerfQueryINTEL) (GLuint, GLuint*); extern pfn_glCreatePerfQueryINTEL fp_glCreatePerfQueryINTEL; typedef void (APIENTRYP pfn_glDeletePerfQueryINTEL) (GLuint); extern pfn_glDeletePerfQueryINTEL fp_glDeletePerfQueryINTEL; typedef void (APIENTRYP pfn_glEndPerfQueryINTEL) (GLuint); extern pfn_glEndPerfQueryINTEL fp_glEndPerfQueryINTEL; typedef void (APIENTRYP pfn_glGetFirstPerfQueryIdINTEL) (GLuint*); extern pfn_glGetFirstPerfQueryIdINTEL fp_glGetFirstPerfQueryIdINTEL; typedef void (APIENTRYP pfn_glGetNextPerfQueryIdINTEL) (GLuint, GLuint*); extern pfn_glGetNextPerfQueryIdINTEL fp_glGetNextPerfQueryIdINTEL; typedef void (APIENTRYP pfn_glGetPerfCounterInfoINTEL) (GLuint, GLuint, GLuint, GLchar*, GLuint, GLchar*, GLuint*, GLuint*, GLuint*, GLuint*, GLuint64*); extern pfn_glGetPerfCounterInfoINTEL fp_glGetPerfCounterInfoINTEL; typedef void (APIENTRYP pfn_glGetPerfQueryDataINTEL) (GLuint, GLuint, GLsizei, GLvoid*, GLuint*); extern pfn_glGetPerfQueryDataINTEL fp_glGetPerfQueryDataINTEL; typedef void (APIENTRYP pfn_glGetPerfQueryIdByNameINTEL) (GLchar*, GLuint*); extern pfn_glGetPerfQueryIdByNameINTEL fp_glGetPerfQueryIdByNameINTEL; typedef void (APIENTRYP pfn_glGetPerfQueryInfoINTEL) (GLuint, GLuint, GLchar*, GLuint*, GLuint*, GLuint*, GLuint*); extern pfn_glGetPerfQueryInfoINTEL fp_glGetPerfQueryInfoINTEL; /* GL_MESA_pack_invert */ extern GLboolean GLAD_MESA_pack_invert; #define GL_PACK_INVERT_MESA 0x8758 /* GL_MESA_ycbcr_texture */ extern GLboolean GLAD_MESA_ycbcr_texture; #define GL_UNSIGNED_SHORT_8_8_MESA 0x85BA #define GL_UNSIGNED_SHORT_8_8_REV_MESA 0x85BB #define GL_YCBCR_MESA 0x8757 /* GL_MESAX_texture_stack */ extern GLboolean GLAD_MESAX_texture_stack; #define GL_TEXTURE_1D_STACK_MESAX 0x8759 #define GL_TEXTURE_2D_STACK_MESAX 0x875A #define GL_PROXY_TEXTURE_1D_STACK_MESAX 0x875B #define GL_PROXY_TEXTURE_2D_STACK_MESAX 0x875C #define GL_TEXTURE_1D_STACK_BINDING_MESAX 0x875D #define GL_TEXTURE_2D_STACK_BINDING_MESAX 0x875E /* GL_NV_bindless_multi_draw_indirect */ extern GLboolean GLAD_NV_bindless_multi_draw_indirect; typedef void (APIENTRYP pfn_glMultiDrawArraysIndirectBindlessNV) (GLenum, const void*, GLsizei, GLsizei, GLint); extern pfn_glMultiDrawArraysIndirectBindlessNV fp_glMultiDrawArraysIndirectBindlessNV; typedef void (APIENTRYP pfn_glMultiDrawElementsIndirectBindlessNV) (GLenum, GLenum, const void*, GLsizei, GLsizei, GLint); extern pfn_glMultiDrawElementsIndirectBindlessNV fp_glMultiDrawElementsIndirectBindlessNV; /* GL_NV_bindless_multi_draw_indirect_count */ extern GLboolean GLAD_NV_bindless_multi_draw_indirect_count; typedef void (APIENTRYP pfn_glMultiDrawArraysIndirectBindlessCountNV) (GLenum, const void*, GLsizei, GLsizei, GLsizei, GLint); extern pfn_glMultiDrawArraysIndirectBindlessCountNV fp_glMultiDrawArraysIndirectBindlessCountNV; typedef void (APIENTRYP pfn_glMultiDrawElementsIndirectBindlessCountNV) (GLenum, GLenum, const void*, GLsizei, GLsizei, GLsizei, GLint); extern pfn_glMultiDrawElementsIndirectBindlessCountNV fp_glMultiDrawElementsIndirectBindlessCountNV; /* GL_NV_bindless_texture */ extern GLboolean GLAD_NV_bindless_texture; typedef GLuint64 (APIENTRYP pfn_glGetTextureHandleNV) (GLuint); extern pfn_glGetTextureHandleNV fp_glGetTextureHandleNV; typedef GLuint64 (APIENTRYP pfn_glGetTextureSamplerHandleNV) (GLuint, GLuint); extern pfn_glGetTextureSamplerHandleNV fp_glGetTextureSamplerHandleNV; typedef void (APIENTRYP pfn_glMakeTextureHandleResidentNV) (GLuint64); extern pfn_glMakeTextureHandleResidentNV fp_glMakeTextureHandleResidentNV; typedef void (APIENTRYP pfn_glMakeTextureHandleNonResidentNV) (GLuint64); extern pfn_glMakeTextureHandleNonResidentNV fp_glMakeTextureHandleNonResidentNV; typedef GLuint64 (APIENTRYP pfn_glGetImageHandleNV) (GLuint, GLint, GLboolean, GLint, GLenum); extern pfn_glGetImageHandleNV fp_glGetImageHandleNV; typedef void (APIENTRYP pfn_glMakeImageHandleResidentNV) (GLuint64, GLenum); extern pfn_glMakeImageHandleResidentNV fp_glMakeImageHandleResidentNV; typedef void (APIENTRYP pfn_glMakeImageHandleNonResidentNV) (GLuint64); extern pfn_glMakeImageHandleNonResidentNV fp_glMakeImageHandleNonResidentNV; typedef void (APIENTRYP pfn_glUniformHandleui64NV) (GLint, GLuint64); extern pfn_glUniformHandleui64NV fp_glUniformHandleui64NV; typedef void (APIENTRYP pfn_glUniformHandleui64vNV) (GLint, GLsizei, const GLuint64*); extern pfn_glUniformHandleui64vNV fp_glUniformHandleui64vNV; typedef void (APIENTRYP pfn_glProgramUniformHandleui64NV) (GLuint, GLint, GLuint64); extern pfn_glProgramUniformHandleui64NV fp_glProgramUniformHandleui64NV; typedef void (APIENTRYP pfn_glProgramUniformHandleui64vNV) (GLuint, GLint, GLsizei, const GLuint64*); extern pfn_glProgramUniformHandleui64vNV fp_glProgramUniformHandleui64vNV; typedef GLboolean (APIENTRYP pfn_glIsTextureHandleResidentNV) (GLuint64); extern pfn_glIsTextureHandleResidentNV fp_glIsTextureHandleResidentNV; typedef GLboolean (APIENTRYP pfn_glIsImageHandleResidentNV) (GLuint64); extern pfn_glIsImageHandleResidentNV fp_glIsImageHandleResidentNV; /* GL_NV_blend_equation_advanced */ extern GLboolean GLAD_NV_blend_equation_advanced; #define GL_BLEND_OVERLAP_NV 0x9281 #define GL_BLEND_PREMULTIPLIED_SRC_NV 0x9280 #define GL_BLUE_NV 0x1905 #define GL_COLORBURN_NV 0x929A #define GL_COLORDODGE_NV 0x9299 #define GL_CONJOINT_NV 0x9284 #define GL_CONTRAST_NV 0x92A1 #define GL_DARKEN_NV 0x9297 #define GL_DIFFERENCE_NV 0x929E #define GL_DISJOINT_NV 0x9283 #define GL_DST_ATOP_NV 0x928F #define GL_DST_IN_NV 0x928B #define GL_DST_NV 0x9287 #define GL_DST_OUT_NV 0x928D #define GL_DST_OVER_NV 0x9289 #define GL_EXCLUSION_NV 0x92A0 #define GL_GREEN_NV 0x1904 #define GL_HARDLIGHT_NV 0x929B #define GL_HARDMIX_NV 0x92A9 #define GL_HSL_COLOR_NV 0x92AF #define GL_HSL_HUE_NV 0x92AD #define GL_HSL_LUMINOSITY_NV 0x92B0 #define GL_HSL_SATURATION_NV 0x92AE #define GL_INVERT_OVG_NV 0x92B4 #define GL_INVERT_RGB_NV 0x92A3 #define GL_LIGHTEN_NV 0x9298 #define GL_LINEARBURN_NV 0x92A5 #define GL_LINEARDODGE_NV 0x92A4 #define GL_LINEARLIGHT_NV 0x92A7 #define GL_MINUS_CLAMPED_NV 0x92B3 #define GL_MINUS_NV 0x929F #define GL_MULTIPLY_NV 0x9294 #define GL_OVERLAY_NV 0x9296 #define GL_PINLIGHT_NV 0x92A8 #define GL_PLUS_CLAMPED_ALPHA_NV 0x92B2 #define GL_PLUS_CLAMPED_NV 0x92B1 #define GL_PLUS_DARKER_NV 0x9292 #define GL_PLUS_NV 0x9291 #define GL_RED_NV 0x1903 #define GL_SCREEN_NV 0x9295 #define GL_SOFTLIGHT_NV 0x929C #define GL_SRC_ATOP_NV 0x928E #define GL_SRC_IN_NV 0x928A #define GL_SRC_NV 0x9286 #define GL_SRC_OUT_NV 0x928C #define GL_SRC_OVER_NV 0x9288 #define GL_UNCORRELATED_NV 0x9282 #define GL_VIVIDLIGHT_NV 0x92A6 #define GL_XOR_NV 0x1506 typedef void (APIENTRYP pfn_glBlendParameteriNV) (GLenum, GLint); extern pfn_glBlendParameteriNV fp_glBlendParameteriNV; typedef void (APIENTRYP pfn_glBlendBarrierNV) (); extern pfn_glBlendBarrierNV fp_glBlendBarrierNV; /* GL_NV_blend_equation_advanced_coherent */ extern GLboolean GLAD_NV_blend_equation_advanced_coherent; #define GL_BLEND_ADVANCED_COHERENT_NV 0x9285 /* GL_NV_command_list */ extern GLboolean GLAD_NV_command_list; #define GL_TERMINATE_SEQUENCE_COMMAND_NV 0x0000 #define GL_NOP_COMMAND_NV 0x0001 #define GL_DRAW_ELEMENTS_COMMAND_NV 0x0002 #define GL_DRAW_ARRAYS_COMMAND_NV 0x0003 #define GL_DRAW_ELEMENTS_STRIP_COMMAND_NV 0x0004 #define GL_DRAW_ARRAYS_STRIP_COMMAND_NV 0x0005 #define GL_DRAW_ELEMENTS_INSTANCED_COMMAND_NV 0x0006 #define GL_DRAW_ARRAYS_INSTANCED_COMMAND_NV 0x0007 #define GL_ELEMENT_ADDRESS_COMMAND_NV 0x0008 #define GL_ATTRIBUTE_ADDRESS_COMMAND_NV 0x0009 #define GL_UNIFORM_ADDRESS_COMMAND_NV 0x000A #define GL_BLEND_COLOR_COMMAND_NV 0x000B #define GL_STENCIL_REF_COMMAND_NV 0x000C #define GL_LINE_WIDTH_COMMAND_NV 0x000D #define GL_POLYGON_OFFSET_COMMAND_NV 0x000E #define GL_ALPHA_REF_COMMAND_NV 0x000F #define GL_VIEWPORT_COMMAND_NV 0x0010 #define GL_SCISSOR_COMMAND_NV 0x0011 #define GL_FRONT_FACE_COMMAND_NV 0x0012 typedef void (APIENTRYP pfn_glCreateStatesNV) (GLsizei, GLuint*); extern pfn_glCreateStatesNV fp_glCreateStatesNV; typedef void (APIENTRYP pfn_glDeleteStatesNV) (GLsizei, const GLuint*); extern pfn_glDeleteStatesNV fp_glDeleteStatesNV; typedef GLboolean (APIENTRYP pfn_glIsStateNV) (GLuint); extern pfn_glIsStateNV fp_glIsStateNV; typedef void (APIENTRYP pfn_glStateCaptureNV) (GLuint, GLenum); extern pfn_glStateCaptureNV fp_glStateCaptureNV; typedef GLuint (APIENTRYP pfn_glGetCommandHeaderNV) (GLenum, GLuint); extern pfn_glGetCommandHeaderNV fp_glGetCommandHeaderNV; typedef GLushort (APIENTRYP pfn_glGetStageIndexNV) (GLenum); extern pfn_glGetStageIndexNV fp_glGetStageIndexNV; typedef void (APIENTRYP pfn_glDrawCommandsNV) (GLenum, GLuint, const GLintptr*, const GLsizei*, GLuint); extern pfn_glDrawCommandsNV fp_glDrawCommandsNV; typedef void (APIENTRYP pfn_glDrawCommandsAddressNV) (GLenum, const GLuint64*, const GLsizei*, GLuint); extern pfn_glDrawCommandsAddressNV fp_glDrawCommandsAddressNV; typedef void (APIENTRYP pfn_glDrawCommandsStatesNV) (GLuint, const GLintptr*, const GLsizei*, const GLuint*, const GLuint*, GLuint); extern pfn_glDrawCommandsStatesNV fp_glDrawCommandsStatesNV; typedef void (APIENTRYP pfn_glDrawCommandsStatesAddressNV) (const GLuint64*, const GLsizei*, const GLuint*, const GLuint*, GLuint); extern pfn_glDrawCommandsStatesAddressNV fp_glDrawCommandsStatesAddressNV; typedef void (APIENTRYP pfn_glCreateCommandListsNV) (GLsizei, GLuint*); extern pfn_glCreateCommandListsNV fp_glCreateCommandListsNV; typedef void (APIENTRYP pfn_glDeleteCommandListsNV) (GLsizei, const GLuint*); extern pfn_glDeleteCommandListsNV fp_glDeleteCommandListsNV; typedef GLboolean (APIENTRYP pfn_glIsCommandListNV) (GLuint); extern pfn_glIsCommandListNV fp_glIsCommandListNV; typedef void (APIENTRYP pfn_glListDrawCommandsStatesClientNV) (GLuint, GLuint, const void**, const GLsizei*, const GLuint*, const GLuint*, GLuint); extern pfn_glListDrawCommandsStatesClientNV fp_glListDrawCommandsStatesClientNV; typedef void (APIENTRYP pfn_glCommandListSegmentsNV) (GLuint, GLuint); extern pfn_glCommandListSegmentsNV fp_glCommandListSegmentsNV; typedef void (APIENTRYP pfn_glCompileCommandListNV) (GLuint); extern pfn_glCompileCommandListNV fp_glCompileCommandListNV; typedef void (APIENTRYP pfn_glCallCommandListNV) (GLuint); extern pfn_glCallCommandListNV fp_glCallCommandListNV; /* GL_NV_compute_program5 */ extern GLboolean GLAD_NV_compute_program5; #define GL_COMPUTE_PROGRAM_NV 0x90FB #define GL_COMPUTE_PROGRAM_PARAMETER_BUFFER_NV 0x90FC /* GL_NV_conditional_render */ extern GLboolean GLAD_NV_conditional_render; #define GL_QUERY_WAIT_NV 0x8E13 #define GL_QUERY_NO_WAIT_NV 0x8E14 #define GL_QUERY_BY_REGION_WAIT_NV 0x8E15 #define GL_QUERY_BY_REGION_NO_WAIT_NV 0x8E16 typedef void (APIENTRYP pfn_glBeginConditionalRenderNV) (GLuint, GLenum); extern pfn_glBeginConditionalRenderNV fp_glBeginConditionalRenderNV; typedef void (APIENTRYP pfn_glEndConditionalRenderNV) (); extern pfn_glEndConditionalRenderNV fp_glEndConditionalRenderNV; /* GL_NV_conservative_raster */ extern GLboolean GLAD_NV_conservative_raster; #define GL_CONSERVATIVE_RASTERIZATION_NV 0x9346 #define GL_SUBPIXEL_PRECISION_BIAS_X_BITS_NV 0x9347 #define GL_SUBPIXEL_PRECISION_BIAS_Y_BITS_NV 0x9348 #define GL_MAX_SUBPIXEL_PRECISION_BIAS_BITS_NV 0x9349 typedef void (APIENTRYP pfn_glSubpixelPrecisionBiasNV) (GLuint, GLuint); extern pfn_glSubpixelPrecisionBiasNV fp_glSubpixelPrecisionBiasNV; /* GL_NV_conservative_raster_dilate */ extern GLboolean GLAD_NV_conservative_raster_dilate; #define GL_CONSERVATIVE_RASTER_DILATE_NV 0x9379 #define GL_CONSERVATIVE_RASTER_DILATE_RANGE_NV 0x937A #define GL_CONSERVATIVE_RASTER_DILATE_GRANULARITY_NV 0x937B typedef void (APIENTRYP pfn_glConservativeRasterParameterfNV) (GLenum, GLfloat); extern pfn_glConservativeRasterParameterfNV fp_glConservativeRasterParameterfNV; /* GL_NV_copy_buffer */ extern GLboolean GLAD_NV_copy_buffer; #define GL_COPY_READ_BUFFER_NV 0x8F36 #define GL_COPY_WRITE_BUFFER_NV 0x8F37 typedef void (APIENTRYP pfn_glCopyBufferSubDataNV) (GLenum, GLenum, GLintptr, GLintptr, GLsizeiptr); extern pfn_glCopyBufferSubDataNV fp_glCopyBufferSubDataNV; /* GL_NV_copy_image */ extern GLboolean GLAD_NV_copy_image; typedef void (APIENTRYP pfn_glCopyImageSubDataNV) (GLuint, GLenum, GLint, GLint, GLint, GLint, GLuint, GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei); extern pfn_glCopyImageSubDataNV fp_glCopyImageSubDataNV; /* GL_NV_coverage_sample */ extern GLboolean GLAD_NV_coverage_sample; #define GL_COVERAGE_COMPONENT_NV 0x8ED0 #define GL_COVERAGE_COMPONENT4_NV 0x8ED1 #define GL_COVERAGE_ATTACHMENT_NV 0x8ED2 #define GL_COVERAGE_BUFFERS_NV 0x8ED3 #define GL_COVERAGE_SAMPLES_NV 0x8ED4 #define GL_COVERAGE_ALL_FRAGMENTS_NV 0x8ED5 #define GL_COVERAGE_EDGE_FRAGMENTS_NV 0x8ED6 #define GL_COVERAGE_AUTOMATIC_NV 0x8ED7 #define GL_COVERAGE_BUFFER_BIT_NV 0x00008000 typedef void (APIENTRYP pfn_glCoverageMaskNV) (GLboolean); extern pfn_glCoverageMaskNV fp_glCoverageMaskNV; typedef void (APIENTRYP pfn_glCoverageOperationNV) (GLenum); extern pfn_glCoverageOperationNV fp_glCoverageOperationNV; /* GL_NV_deep_texture3D */ extern GLboolean GLAD_NV_deep_texture3D; #define GL_MAX_DEEP_3D_TEXTURE_WIDTH_HEIGHT_NV 0x90D0 #define GL_MAX_DEEP_3D_TEXTURE_DEPTH_NV 0x90D1 /* GL_NV_depth_buffer_float */ extern GLboolean GLAD_NV_depth_buffer_float; #define GL_DEPTH_COMPONENT32F_NV 0x8DAB #define GL_DEPTH32F_STENCIL8_NV 0x8DAC #define GL_FLOAT_32_UNSIGNED_INT_24_8_REV_NV 0x8DAD #define GL_DEPTH_BUFFER_FLOAT_MODE_NV 0x8DAF typedef void (APIENTRYP pfn_glDepthRangedNV) (GLdouble, GLdouble); extern pfn_glDepthRangedNV fp_glDepthRangedNV; typedef void (APIENTRYP pfn_glClearDepthdNV) (GLdouble); extern pfn_glClearDepthdNV fp_glClearDepthdNV; typedef void (APIENTRYP pfn_glDepthBoundsdNV) (GLdouble, GLdouble); extern pfn_glDepthBoundsdNV fp_glDepthBoundsdNV; /* GL_NV_depth_clamp */ extern GLboolean GLAD_NV_depth_clamp; #define GL_DEPTH_CLAMP_NV 0x864F /* GL_NV_depth_nonlinear */ extern GLboolean GLAD_NV_depth_nonlinear; #define GL_DEPTH_COMPONENT16_NONLINEAR_NV 0x8E2C /* GL_NV_draw_buffers */ extern GLboolean GLAD_NV_draw_buffers; #define GL_MAX_DRAW_BUFFERS_NV 0x8824 #define GL_DRAW_BUFFER0_NV 0x8825 #define GL_DRAW_BUFFER1_NV 0x8826 #define GL_DRAW_BUFFER2_NV 0x8827 #define GL_DRAW_BUFFER3_NV 0x8828 #define GL_DRAW_BUFFER4_NV 0x8829 #define GL_DRAW_BUFFER5_NV 0x882A #define GL_DRAW_BUFFER6_NV 0x882B #define GL_DRAW_BUFFER7_NV 0x882C #define GL_DRAW_BUFFER8_NV 0x882D #define GL_DRAW_BUFFER9_NV 0x882E #define GL_DRAW_BUFFER10_NV 0x882F #define GL_DRAW_BUFFER11_NV 0x8830 #define GL_DRAW_BUFFER12_NV 0x8831 #define GL_DRAW_BUFFER13_NV 0x8832 #define GL_DRAW_BUFFER14_NV 0x8833 #define GL_DRAW_BUFFER15_NV 0x8834 #define GL_COLOR_ATTACHMENT0_NV 0x8CE0 #define GL_COLOR_ATTACHMENT1_NV 0x8CE1 #define GL_COLOR_ATTACHMENT2_NV 0x8CE2 #define GL_COLOR_ATTACHMENT3_NV 0x8CE3 #define GL_COLOR_ATTACHMENT4_NV 0x8CE4 #define GL_COLOR_ATTACHMENT5_NV 0x8CE5 #define GL_COLOR_ATTACHMENT6_NV 0x8CE6 #define GL_COLOR_ATTACHMENT7_NV 0x8CE7 #define GL_COLOR_ATTACHMENT8_NV 0x8CE8 #define GL_COLOR_ATTACHMENT9_NV 0x8CE9 #define GL_COLOR_ATTACHMENT10_NV 0x8CEA #define GL_COLOR_ATTACHMENT11_NV 0x8CEB #define GL_COLOR_ATTACHMENT12_NV 0x8CEC #define GL_COLOR_ATTACHMENT13_NV 0x8CED #define GL_COLOR_ATTACHMENT14_NV 0x8CEE #define GL_COLOR_ATTACHMENT15_NV 0x8CEF typedef void (APIENTRYP pfn_glDrawBuffersNV) (GLsizei, const GLenum*); extern pfn_glDrawBuffersNV fp_glDrawBuffersNV; /* GL_NV_draw_instanced */ extern GLboolean GLAD_NV_draw_instanced; typedef void (APIENTRYP pfn_glDrawArraysInstancedNV) (GLenum, GLint, GLsizei, GLsizei); extern pfn_glDrawArraysInstancedNV fp_glDrawArraysInstancedNV; typedef void (APIENTRYP pfn_glDrawElementsInstancedNV) (GLenum, GLsizei, GLenum, const void*, GLsizei); extern pfn_glDrawElementsInstancedNV fp_glDrawElementsInstancedNV; /* GL_NV_draw_texture */ extern GLboolean GLAD_NV_draw_texture; typedef void (APIENTRYP pfn_glDrawTextureNV) (GLuint, GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat); extern pfn_glDrawTextureNV fp_glDrawTextureNV; /* GL_NV_explicit_attrib_location */ extern GLboolean GLAD_NV_explicit_attrib_location; /* GL_NV_explicit_multisample */ extern GLboolean GLAD_NV_explicit_multisample; #define GL_SAMPLE_POSITION_NV 0x8E50 #define GL_SAMPLE_MASK_NV 0x8E51 #define GL_SAMPLE_MASK_VALUE_NV 0x8E52 #define GL_TEXTURE_BINDING_RENDERBUFFER_NV 0x8E53 #define GL_TEXTURE_RENDERBUFFER_DATA_STORE_BINDING_NV 0x8E54 #define GL_TEXTURE_RENDERBUFFER_NV 0x8E55 #define GL_SAMPLER_RENDERBUFFER_NV 0x8E56 #define GL_INT_SAMPLER_RENDERBUFFER_NV 0x8E57 #define GL_UNSIGNED_INT_SAMPLER_RENDERBUFFER_NV 0x8E58 #define GL_MAX_SAMPLE_MASK_WORDS_NV 0x8E59 typedef void (APIENTRYP pfn_glGetMultisamplefvNV) (GLenum, GLuint, GLfloat*); extern pfn_glGetMultisamplefvNV fp_glGetMultisamplefvNV; typedef void (APIENTRYP pfn_glSampleMaskIndexedNV) (GLuint, GLbitfield); extern pfn_glSampleMaskIndexedNV fp_glSampleMaskIndexedNV; typedef void (APIENTRYP pfn_glTexRenderbufferNV) (GLenum, GLuint); extern pfn_glTexRenderbufferNV fp_glTexRenderbufferNV; /* GL_NV_fbo_color_attachments */ extern GLboolean GLAD_NV_fbo_color_attachments; #define GL_MAX_COLOR_ATTACHMENTS_NV 0x8CDF /* GL_NV_fence */ extern GLboolean GLAD_NV_fence; #define GL_ALL_COMPLETED_NV 0x84F2 #define GL_FENCE_STATUS_NV 0x84F3 #define GL_FENCE_CONDITION_NV 0x84F4 typedef void (APIENTRYP pfn_glDeleteFencesNV) (GLsizei, const GLuint*); extern pfn_glDeleteFencesNV fp_glDeleteFencesNV; typedef void (APIENTRYP pfn_glGenFencesNV) (GLsizei, GLuint*); extern pfn_glGenFencesNV fp_glGenFencesNV; typedef GLboolean (APIENTRYP pfn_glIsFenceNV) (GLuint); extern pfn_glIsFenceNV fp_glIsFenceNV; typedef GLboolean (APIENTRYP pfn_glTestFenceNV) (GLuint); extern pfn_glTestFenceNV fp_glTestFenceNV; typedef void (APIENTRYP pfn_glGetFenceivNV) (GLuint, GLenum, GLint*); extern pfn_glGetFenceivNV fp_glGetFenceivNV; typedef void (APIENTRYP pfn_glFinishFenceNV) (GLuint); extern pfn_glFinishFenceNV fp_glFinishFenceNV; typedef void (APIENTRYP pfn_glSetFenceNV) (GLuint, GLenum); extern pfn_glSetFenceNV fp_glSetFenceNV; /* GL_NV_fill_rectangle */ extern GLboolean GLAD_NV_fill_rectangle; #define GL_FILL_RECTANGLE_NV 0x933C /* GL_NV_float_buffer */ extern GLboolean GLAD_NV_float_buffer; #define GL_FLOAT_R_NV 0x8880 #define GL_FLOAT_RG_NV 0x8881 #define GL_FLOAT_RGB_NV 0x8882 #define GL_FLOAT_RGBA_NV 0x8883 #define GL_FLOAT_R16_NV 0x8884 #define GL_FLOAT_R32_NV 0x8885 #define GL_FLOAT_RG16_NV 0x8886 #define GL_FLOAT_RG32_NV 0x8887 #define GL_FLOAT_RGB16_NV 0x8888 #define GL_FLOAT_RGB32_NV 0x8889 #define GL_FLOAT_RGBA16_NV 0x888A #define GL_FLOAT_RGBA32_NV 0x888B #define GL_TEXTURE_FLOAT_COMPONENTS_NV 0x888C #define GL_FLOAT_CLEAR_COLOR_VALUE_NV 0x888D #define GL_FLOAT_RGBA_MODE_NV 0x888E /* GL_NV_fragment_coverage_to_color */ extern GLboolean GLAD_NV_fragment_coverage_to_color; #define GL_FRAGMENT_COVERAGE_TO_COLOR_NV 0x92DD #define GL_FRAGMENT_COVERAGE_COLOR_NV 0x92DE typedef void (APIENTRYP pfn_glFragmentCoverageColorNV) (GLuint); extern pfn_glFragmentCoverageColorNV fp_glFragmentCoverageColorNV; /* GL_NV_fragment_program4 */ extern GLboolean GLAD_NV_fragment_program4; /* GL_NV_fragment_shader_interlock */ extern GLboolean GLAD_NV_fragment_shader_interlock; /* GL_NV_framebuffer_blit */ extern GLboolean GLAD_NV_framebuffer_blit; #define GL_READ_FRAMEBUFFER_NV 0x8CA8 #define GL_DRAW_FRAMEBUFFER_NV 0x8CA9 #define GL_DRAW_FRAMEBUFFER_BINDING_NV 0x8CA6 #define GL_READ_FRAMEBUFFER_BINDING_NV 0x8CAA typedef void (APIENTRYP pfn_glBlitFramebufferNV) (GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLbitfield, GLenum); extern pfn_glBlitFramebufferNV fp_glBlitFramebufferNV; /* GL_NV_framebuffer_mixed_samples */ extern GLboolean GLAD_NV_framebuffer_mixed_samples; #define GL_COVERAGE_MODULATION_TABLE_NV 0x9331 #define GL_COLOR_SAMPLES_NV 0x8E20 #define GL_DEPTH_SAMPLES_NV 0x932D #define GL_STENCIL_SAMPLES_NV 0x932E #define GL_MIXED_DEPTH_SAMPLES_SUPPORTED_NV 0x932F #define GL_MIXED_STENCIL_SAMPLES_SUPPORTED_NV 0x9330 #define GL_COVERAGE_MODULATION_NV 0x9332 #define GL_COVERAGE_MODULATION_TABLE_SIZE_NV 0x9333 typedef void (APIENTRYP pfn_glCoverageModulationTableNV) (GLsizei, const GLfloat*); extern pfn_glCoverageModulationTableNV fp_glCoverageModulationTableNV; typedef void (APIENTRYP pfn_glGetCoverageModulationTableNV) (GLsizei, GLfloat*); extern pfn_glGetCoverageModulationTableNV fp_glGetCoverageModulationTableNV; typedef void (APIENTRYP pfn_glCoverageModulationNV) (GLenum); extern pfn_glCoverageModulationNV fp_glCoverageModulationNV; /* GL_NV_framebuffer_multisample */ extern GLboolean GLAD_NV_framebuffer_multisample; #define GL_RENDERBUFFER_SAMPLES_NV 0x8CAB #define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_NV 0x8D56 #define GL_MAX_SAMPLES_NV 0x8D57 typedef void (APIENTRYP pfn_glRenderbufferStorageMultisampleNV) (GLenum, GLsizei, GLenum, GLsizei, GLsizei); extern pfn_glRenderbufferStorageMultisampleNV fp_glRenderbufferStorageMultisampleNV; /* GL_NV_framebuffer_multisample_coverage */ extern GLboolean GLAD_NV_framebuffer_multisample_coverage; #define GL_RENDERBUFFER_COVERAGE_SAMPLES_NV 0x8CAB #define GL_RENDERBUFFER_COLOR_SAMPLES_NV 0x8E10 #define GL_MAX_MULTISAMPLE_COVERAGE_MODES_NV 0x8E11 #define GL_MULTISAMPLE_COVERAGE_MODES_NV 0x8E12 typedef void (APIENTRYP pfn_glRenderbufferStorageMultisampleCoverageNV) (GLenum, GLsizei, GLsizei, GLenum, GLsizei, GLsizei); extern pfn_glRenderbufferStorageMultisampleCoverageNV fp_glRenderbufferStorageMultisampleCoverageNV; /* GL_NV_generate_mipmap_sRGB */ extern GLboolean GLAD_NV_generate_mipmap_sRGB; /* GL_NV_geometry_program4 */ extern GLboolean GLAD_NV_geometry_program4; #define GL_GEOMETRY_PROGRAM_NV 0x8C26 #define GL_MAX_PROGRAM_OUTPUT_VERTICES_NV 0x8C27 #define GL_MAX_PROGRAM_TOTAL_OUTPUT_COMPONENTS_NV 0x8C28 typedef void (APIENTRYP pfn_glProgramVertexLimitNV) (GLenum, GLint); extern pfn_glProgramVertexLimitNV fp_glProgramVertexLimitNV; typedef void (APIENTRYP pfn_glFramebufferTextureFaceEXT) (GLenum, GLenum, GLuint, GLint, GLenum); extern pfn_glFramebufferTextureFaceEXT fp_glFramebufferTextureFaceEXT; /* GL_NV_geometry_shader4 */ extern GLboolean GLAD_NV_geometry_shader4; /* GL_NV_geometry_shader_passthrough */ extern GLboolean GLAD_NV_geometry_shader_passthrough; /* GL_NV_gpu_program4 */ extern GLboolean GLAD_NV_gpu_program4; #define GL_MIN_PROGRAM_TEXEL_OFFSET_NV 0x8904 #define GL_MAX_PROGRAM_TEXEL_OFFSET_NV 0x8905 #define GL_PROGRAM_ATTRIB_COMPONENTS_NV 0x8906 #define GL_PROGRAM_RESULT_COMPONENTS_NV 0x8907 #define GL_MAX_PROGRAM_ATTRIB_COMPONENTS_NV 0x8908 #define GL_MAX_PROGRAM_RESULT_COMPONENTS_NV 0x8909 #define GL_MAX_PROGRAM_GENERIC_ATTRIBS_NV 0x8DA5 #define GL_MAX_PROGRAM_GENERIC_RESULTS_NV 0x8DA6 typedef void (APIENTRYP pfn_glProgramLocalParameterI4iNV) (GLenum, GLuint, GLint, GLint, GLint, GLint); extern pfn_glProgramLocalParameterI4iNV fp_glProgramLocalParameterI4iNV; typedef void (APIENTRYP pfn_glProgramLocalParameterI4ivNV) (GLenum, GLuint, const GLint*); extern pfn_glProgramLocalParameterI4ivNV fp_glProgramLocalParameterI4ivNV; typedef void (APIENTRYP pfn_glProgramLocalParametersI4ivNV) (GLenum, GLuint, GLsizei, const GLint*); extern pfn_glProgramLocalParametersI4ivNV fp_glProgramLocalParametersI4ivNV; typedef void (APIENTRYP pfn_glProgramLocalParameterI4uiNV) (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint); extern pfn_glProgramLocalParameterI4uiNV fp_glProgramLocalParameterI4uiNV; typedef void (APIENTRYP pfn_glProgramLocalParameterI4uivNV) (GLenum, GLuint, const GLuint*); extern pfn_glProgramLocalParameterI4uivNV fp_glProgramLocalParameterI4uivNV; typedef void (APIENTRYP pfn_glProgramLocalParametersI4uivNV) (GLenum, GLuint, GLsizei, const GLuint*); extern pfn_glProgramLocalParametersI4uivNV fp_glProgramLocalParametersI4uivNV; typedef void (APIENTRYP pfn_glProgramEnvParameterI4iNV) (GLenum, GLuint, GLint, GLint, GLint, GLint); extern pfn_glProgramEnvParameterI4iNV fp_glProgramEnvParameterI4iNV; typedef void (APIENTRYP pfn_glProgramEnvParameterI4ivNV) (GLenum, GLuint, const GLint*); extern pfn_glProgramEnvParameterI4ivNV fp_glProgramEnvParameterI4ivNV; typedef void (APIENTRYP pfn_glProgramEnvParametersI4ivNV) (GLenum, GLuint, GLsizei, const GLint*); extern pfn_glProgramEnvParametersI4ivNV fp_glProgramEnvParametersI4ivNV; typedef void (APIENTRYP pfn_glProgramEnvParameterI4uiNV) (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint); extern pfn_glProgramEnvParameterI4uiNV fp_glProgramEnvParameterI4uiNV; typedef void (APIENTRYP pfn_glProgramEnvParameterI4uivNV) (GLenum, GLuint, const GLuint*); extern pfn_glProgramEnvParameterI4uivNV fp_glProgramEnvParameterI4uivNV; typedef void (APIENTRYP pfn_glProgramEnvParametersI4uivNV) (GLenum, GLuint, GLsizei, const GLuint*); extern pfn_glProgramEnvParametersI4uivNV fp_glProgramEnvParametersI4uivNV; typedef void (APIENTRYP pfn_glGetProgramLocalParameterIivNV) (GLenum, GLuint, GLint*); extern pfn_glGetProgramLocalParameterIivNV fp_glGetProgramLocalParameterIivNV; typedef void (APIENTRYP pfn_glGetProgramLocalParameterIuivNV) (GLenum, GLuint, GLuint*); extern pfn_glGetProgramLocalParameterIuivNV fp_glGetProgramLocalParameterIuivNV; typedef void (APIENTRYP pfn_glGetProgramEnvParameterIivNV) (GLenum, GLuint, GLint*); extern pfn_glGetProgramEnvParameterIivNV fp_glGetProgramEnvParameterIivNV; typedef void (APIENTRYP pfn_glGetProgramEnvParameterIuivNV) (GLenum, GLuint, GLuint*); extern pfn_glGetProgramEnvParameterIuivNV fp_glGetProgramEnvParameterIuivNV; /* GL_NV_gpu_program5 */ extern GLboolean GLAD_NV_gpu_program5; #define GL_MAX_GEOMETRY_PROGRAM_INVOCATIONS_NV 0x8E5A #define GL_MIN_FRAGMENT_INTERPOLATION_OFFSET_NV 0x8E5B #define GL_MAX_FRAGMENT_INTERPOLATION_OFFSET_NV 0x8E5C #define GL_FRAGMENT_PROGRAM_INTERPOLATION_OFFSET_BITS_NV 0x8E5D #define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET_NV 0x8E5E #define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET_NV 0x8E5F #define GL_MAX_PROGRAM_SUBROUTINE_PARAMETERS_NV 0x8F44 #define GL_MAX_PROGRAM_SUBROUTINE_NUM_NV 0x8F45 typedef void (APIENTRYP pfn_glProgramSubroutineParametersuivNV) (GLenum, GLsizei, const GLuint*); extern pfn_glProgramSubroutineParametersuivNV fp_glProgramSubroutineParametersuivNV; typedef void (APIENTRYP pfn_glGetProgramSubroutineParameteruivNV) (GLenum, GLuint, GLuint*); extern pfn_glGetProgramSubroutineParameteruivNV fp_glGetProgramSubroutineParameteruivNV; /* GL_NV_gpu_program5_mem_extended */ extern GLboolean GLAD_NV_gpu_program5_mem_extended; /* GL_NV_gpu_shader5 */ extern GLboolean GLAD_NV_gpu_shader5; /* GL_NV_half_float */ extern GLboolean GLAD_NV_half_float; #define GL_HALF_FLOAT_NV 0x140B typedef void (APIENTRYP pfn_glVertex2hNV) (GLhalfNV, GLhalfNV); extern pfn_glVertex2hNV fp_glVertex2hNV; typedef void (APIENTRYP pfn_glVertex2hvNV) (const GLhalfNV*); extern pfn_glVertex2hvNV fp_glVertex2hvNV; typedef void (APIENTRYP pfn_glVertex3hNV) (GLhalfNV, GLhalfNV, GLhalfNV); extern pfn_glVertex3hNV fp_glVertex3hNV; typedef void (APIENTRYP pfn_glVertex3hvNV) (const GLhalfNV*); extern pfn_glVertex3hvNV fp_glVertex3hvNV; typedef void (APIENTRYP pfn_glVertex4hNV) (GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV); extern pfn_glVertex4hNV fp_glVertex4hNV; typedef void (APIENTRYP pfn_glVertex4hvNV) (const GLhalfNV*); extern pfn_glVertex4hvNV fp_glVertex4hvNV; typedef void (APIENTRYP pfn_glNormal3hNV) (GLhalfNV, GLhalfNV, GLhalfNV); extern pfn_glNormal3hNV fp_glNormal3hNV; typedef void (APIENTRYP pfn_glNormal3hvNV) (const GLhalfNV*); extern pfn_glNormal3hvNV fp_glNormal3hvNV; typedef void (APIENTRYP pfn_glColor3hNV) (GLhalfNV, GLhalfNV, GLhalfNV); extern pfn_glColor3hNV fp_glColor3hNV; typedef void (APIENTRYP pfn_glColor3hvNV) (const GLhalfNV*); extern pfn_glColor3hvNV fp_glColor3hvNV; typedef void (APIENTRYP pfn_glColor4hNV) (GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV); extern pfn_glColor4hNV fp_glColor4hNV; typedef void (APIENTRYP pfn_glColor4hvNV) (const GLhalfNV*); extern pfn_glColor4hvNV fp_glColor4hvNV; typedef void (APIENTRYP pfn_glTexCoord1hNV) (GLhalfNV); extern pfn_glTexCoord1hNV fp_glTexCoord1hNV; typedef void (APIENTRYP pfn_glTexCoord1hvNV) (const GLhalfNV*); extern pfn_glTexCoord1hvNV fp_glTexCoord1hvNV; typedef void (APIENTRYP pfn_glTexCoord2hNV) (GLhalfNV, GLhalfNV); extern pfn_glTexCoord2hNV fp_glTexCoord2hNV; typedef void (APIENTRYP pfn_glTexCoord2hvNV) (const GLhalfNV*); extern pfn_glTexCoord2hvNV fp_glTexCoord2hvNV; typedef void (APIENTRYP pfn_glTexCoord3hNV) (GLhalfNV, GLhalfNV, GLhalfNV); extern pfn_glTexCoord3hNV fp_glTexCoord3hNV; typedef void (APIENTRYP pfn_glTexCoord3hvNV) (const GLhalfNV*); extern pfn_glTexCoord3hvNV fp_glTexCoord3hvNV; typedef void (APIENTRYP pfn_glTexCoord4hNV) (GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV); extern pfn_glTexCoord4hNV fp_glTexCoord4hNV; typedef void (APIENTRYP pfn_glTexCoord4hvNV) (const GLhalfNV*); extern pfn_glTexCoord4hvNV fp_glTexCoord4hvNV; typedef void (APIENTRYP pfn_glMultiTexCoord1hNV) (GLenum, GLhalfNV); extern pfn_glMultiTexCoord1hNV fp_glMultiTexCoord1hNV; typedef void (APIENTRYP pfn_glMultiTexCoord1hvNV) (GLenum, const GLhalfNV*); extern pfn_glMultiTexCoord1hvNV fp_glMultiTexCoord1hvNV; typedef void (APIENTRYP pfn_glMultiTexCoord2hNV) (GLenum, GLhalfNV, GLhalfNV); extern pfn_glMultiTexCoord2hNV fp_glMultiTexCoord2hNV; typedef void (APIENTRYP pfn_glMultiTexCoord2hvNV) (GLenum, const GLhalfNV*); extern pfn_glMultiTexCoord2hvNV fp_glMultiTexCoord2hvNV; typedef void (APIENTRYP pfn_glMultiTexCoord3hNV) (GLenum, GLhalfNV, GLhalfNV, GLhalfNV); extern pfn_glMultiTexCoord3hNV fp_glMultiTexCoord3hNV; typedef void (APIENTRYP pfn_glMultiTexCoord3hvNV) (GLenum, const GLhalfNV*); extern pfn_glMultiTexCoord3hvNV fp_glMultiTexCoord3hvNV; typedef void (APIENTRYP pfn_glMultiTexCoord4hNV) (GLenum, GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV); extern pfn_glMultiTexCoord4hNV fp_glMultiTexCoord4hNV; typedef void (APIENTRYP pfn_glMultiTexCoord4hvNV) (GLenum, const GLhalfNV*); extern pfn_glMultiTexCoord4hvNV fp_glMultiTexCoord4hvNV; typedef void (APIENTRYP pfn_glFogCoordhNV) (GLhalfNV); extern pfn_glFogCoordhNV fp_glFogCoordhNV; typedef void (APIENTRYP pfn_glFogCoordhvNV) (const GLhalfNV*); extern pfn_glFogCoordhvNV fp_glFogCoordhvNV; typedef void (APIENTRYP pfn_glSecondaryColor3hNV) (GLhalfNV, GLhalfNV, GLhalfNV); extern pfn_glSecondaryColor3hNV fp_glSecondaryColor3hNV; typedef void (APIENTRYP pfn_glSecondaryColor3hvNV) (const GLhalfNV*); extern pfn_glSecondaryColor3hvNV fp_glSecondaryColor3hvNV; typedef void (APIENTRYP pfn_glVertexWeighthNV) (GLhalfNV); extern pfn_glVertexWeighthNV fp_glVertexWeighthNV; typedef void (APIENTRYP pfn_glVertexWeighthvNV) (const GLhalfNV*); extern pfn_glVertexWeighthvNV fp_glVertexWeighthvNV; typedef void (APIENTRYP pfn_glVertexAttrib1hNV) (GLuint, GLhalfNV); extern pfn_glVertexAttrib1hNV fp_glVertexAttrib1hNV; typedef void (APIENTRYP pfn_glVertexAttrib1hvNV) (GLuint, const GLhalfNV*); extern pfn_glVertexAttrib1hvNV fp_glVertexAttrib1hvNV; typedef void (APIENTRYP pfn_glVertexAttrib2hNV) (GLuint, GLhalfNV, GLhalfNV); extern pfn_glVertexAttrib2hNV fp_glVertexAttrib2hNV; typedef void (APIENTRYP pfn_glVertexAttrib2hvNV) (GLuint, const GLhalfNV*); extern pfn_glVertexAttrib2hvNV fp_glVertexAttrib2hvNV; typedef void (APIENTRYP pfn_glVertexAttrib3hNV) (GLuint, GLhalfNV, GLhalfNV, GLhalfNV); extern pfn_glVertexAttrib3hNV fp_glVertexAttrib3hNV; typedef void (APIENTRYP pfn_glVertexAttrib3hvNV) (GLuint, const GLhalfNV*); extern pfn_glVertexAttrib3hvNV fp_glVertexAttrib3hvNV; typedef void (APIENTRYP pfn_glVertexAttrib4hNV) (GLuint, GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV); extern pfn_glVertexAttrib4hNV fp_glVertexAttrib4hNV; typedef void (APIENTRYP pfn_glVertexAttrib4hvNV) (GLuint, const GLhalfNV*); extern pfn_glVertexAttrib4hvNV fp_glVertexAttrib4hvNV; typedef void (APIENTRYP pfn_glVertexAttribs1hvNV) (GLuint, GLsizei, const GLhalfNV*); extern pfn_glVertexAttribs1hvNV fp_glVertexAttribs1hvNV; typedef void (APIENTRYP pfn_glVertexAttribs2hvNV) (GLuint, GLsizei, const GLhalfNV*); extern pfn_glVertexAttribs2hvNV fp_glVertexAttribs2hvNV; typedef void (APIENTRYP pfn_glVertexAttribs3hvNV) (GLuint, GLsizei, const GLhalfNV*); extern pfn_glVertexAttribs3hvNV fp_glVertexAttribs3hvNV; typedef void (APIENTRYP pfn_glVertexAttribs4hvNV) (GLuint, GLsizei, const GLhalfNV*); extern pfn_glVertexAttribs4hvNV fp_glVertexAttribs4hvNV; /* GL_NV_image_formats */ extern GLboolean GLAD_NV_image_formats; /* GL_NV_instanced_arrays */ extern GLboolean GLAD_NV_instanced_arrays; #define GL_VERTEX_ATTRIB_ARRAY_DIVISOR_NV 0x88FE typedef void (APIENTRYP pfn_glVertexAttribDivisorNV) (GLuint, GLuint); extern pfn_glVertexAttribDivisorNV fp_glVertexAttribDivisorNV; /* GL_NV_internalformat_sample_query */ extern GLboolean GLAD_NV_internalformat_sample_query; #define GL_MULTISAMPLES_NV 0x9371 #define GL_SUPERSAMPLE_SCALE_X_NV 0x9372 #define GL_SUPERSAMPLE_SCALE_Y_NV 0x9373 #define GL_CONFORMANT_NV 0x9374 typedef void (APIENTRYP pfn_glGetInternalformatSampleivNV) (GLenum, GLenum, GLsizei, GLenum, GLsizei, GLint*); extern pfn_glGetInternalformatSampleivNV fp_glGetInternalformatSampleivNV; /* GL_NV_multisample_coverage */ extern GLboolean GLAD_NV_multisample_coverage; #define GL_SAMPLES_ARB 0x80A9 /* GL_NV_non_square_matrices */ extern GLboolean GLAD_NV_non_square_matrices; #define GL_FLOAT_MAT2x3_NV 0x8B65 #define GL_FLOAT_MAT2x4_NV 0x8B66 #define GL_FLOAT_MAT3x2_NV 0x8B67 #define GL_FLOAT_MAT3x4_NV 0x8B68 #define GL_FLOAT_MAT4x2_NV 0x8B69 #define GL_FLOAT_MAT4x3_NV 0x8B6A typedef void (APIENTRYP pfn_glUniformMatrix2x3fvNV) (GLint, GLsizei, GLboolean, const GLfloat*); extern pfn_glUniformMatrix2x3fvNV fp_glUniformMatrix2x3fvNV; typedef void (APIENTRYP pfn_glUniformMatrix3x2fvNV) (GLint, GLsizei, GLboolean, const GLfloat*); extern pfn_glUniformMatrix3x2fvNV fp_glUniformMatrix3x2fvNV; typedef void (APIENTRYP pfn_glUniformMatrix2x4fvNV) (GLint, GLsizei, GLboolean, const GLfloat*); extern pfn_glUniformMatrix2x4fvNV fp_glUniformMatrix2x4fvNV; typedef void (APIENTRYP pfn_glUniformMatrix4x2fvNV) (GLint, GLsizei, GLboolean, const GLfloat*); extern pfn_glUniformMatrix4x2fvNV fp_glUniformMatrix4x2fvNV; typedef void (APIENTRYP pfn_glUniformMatrix3x4fvNV) (GLint, GLsizei, GLboolean, const GLfloat*); extern pfn_glUniformMatrix3x4fvNV fp_glUniformMatrix3x4fvNV; typedef void (APIENTRYP pfn_glUniformMatrix4x3fvNV) (GLint, GLsizei, GLboolean, const GLfloat*); extern pfn_glUniformMatrix4x3fvNV fp_glUniformMatrix4x3fvNV; /* GL_NV_occlusion_query */ extern GLboolean GLAD_NV_occlusion_query; #define GL_PIXEL_COUNTER_BITS_NV 0x8864 #define GL_CURRENT_OCCLUSION_QUERY_ID_NV 0x8865 #define GL_PIXEL_COUNT_NV 0x8866 #define GL_PIXEL_COUNT_AVAILABLE_NV 0x8867 typedef void (APIENTRYP pfn_glGenOcclusionQueriesNV) (GLsizei, GLuint*); extern pfn_glGenOcclusionQueriesNV fp_glGenOcclusionQueriesNV; typedef void (APIENTRYP pfn_glDeleteOcclusionQueriesNV) (GLsizei, const GLuint*); extern pfn_glDeleteOcclusionQueriesNV fp_glDeleteOcclusionQueriesNV; typedef GLboolean (APIENTRYP pfn_glIsOcclusionQueryNV) (GLuint); extern pfn_glIsOcclusionQueryNV fp_glIsOcclusionQueryNV; typedef void (APIENTRYP pfn_glBeginOcclusionQueryNV) (GLuint); extern pfn_glBeginOcclusionQueryNV fp_glBeginOcclusionQueryNV; typedef void (APIENTRYP pfn_glEndOcclusionQueryNV) (); extern pfn_glEndOcclusionQueryNV fp_glEndOcclusionQueryNV; typedef void (APIENTRYP pfn_glGetOcclusionQueryivNV) (GLuint, GLenum, GLint*); extern pfn_glGetOcclusionQueryivNV fp_glGetOcclusionQueryivNV; typedef void (APIENTRYP pfn_glGetOcclusionQueryuivNV) (GLuint, GLenum, GLuint*); extern pfn_glGetOcclusionQueryuivNV fp_glGetOcclusionQueryuivNV; /* GL_NV_parameter_buffer_object */ extern GLboolean GLAD_NV_parameter_buffer_object; #define GL_MAX_PROGRAM_PARAMETER_BUFFER_BINDINGS_NV 0x8DA0 #define GL_MAX_PROGRAM_PARAMETER_BUFFER_SIZE_NV 0x8DA1 #define GL_VERTEX_PROGRAM_PARAMETER_BUFFER_NV 0x8DA2 #define GL_GEOMETRY_PROGRAM_PARAMETER_BUFFER_NV 0x8DA3 #define GL_FRAGMENT_PROGRAM_PARAMETER_BUFFER_NV 0x8DA4 typedef void (APIENTRYP pfn_glProgramBufferParametersfvNV) (GLenum, GLuint, GLuint, GLsizei, const GLfloat*); extern pfn_glProgramBufferParametersfvNV fp_glProgramBufferParametersfvNV; typedef void (APIENTRYP pfn_glProgramBufferParametersIivNV) (GLenum, GLuint, GLuint, GLsizei, const GLint*); extern pfn_glProgramBufferParametersIivNV fp_glProgramBufferParametersIivNV; typedef void (APIENTRYP pfn_glProgramBufferParametersIuivNV) (GLenum, GLuint, GLuint, GLsizei, const GLuint*); extern pfn_glProgramBufferParametersIuivNV fp_glProgramBufferParametersIuivNV; /* GL_NV_parameter_buffer_object2 */ extern GLboolean GLAD_NV_parameter_buffer_object2; /* GL_NV_path_rendering */ extern GLboolean GLAD_NV_path_rendering; #define GL_PATH_FORMAT_SVG_NV 0x9070 #define GL_PATH_FORMAT_PS_NV 0x9071 #define GL_STANDARD_FONT_NAME_NV 0x9072 #define GL_SYSTEM_FONT_NAME_NV 0x9073 #define GL_FILE_NAME_NV 0x9074 #define GL_PATH_STROKE_WIDTH_NV 0x9075 #define GL_PATH_END_CAPS_NV 0x9076 #define GL_PATH_INITIAL_END_CAP_NV 0x9077 #define GL_PATH_TERMINAL_END_CAP_NV 0x9078 #define GL_PATH_JOIN_STYLE_NV 0x9079 #define GL_PATH_MITER_LIMIT_NV 0x907A #define GL_PATH_DASH_CAPS_NV 0x907B #define GL_PATH_INITIAL_DASH_CAP_NV 0x907C #define GL_PATH_TERMINAL_DASH_CAP_NV 0x907D #define GL_PATH_DASH_OFFSET_NV 0x907E #define GL_PATH_CLIENT_LENGTH_NV 0x907F #define GL_PATH_FILL_MODE_NV 0x9080 #define GL_PATH_FILL_MASK_NV 0x9081 #define GL_PATH_FILL_COVER_MODE_NV 0x9082 #define GL_PATH_STROKE_COVER_MODE_NV 0x9083 #define GL_PATH_STROKE_MASK_NV 0x9084 #define GL_COUNT_UP_NV 0x9088 #define GL_COUNT_DOWN_NV 0x9089 #define GL_PATH_OBJECT_BOUNDING_BOX_NV 0x908A #define GL_CONVEX_HULL_NV 0x908B #define GL_BOUNDING_BOX_NV 0x908D #define GL_TRANSLATE_X_NV 0x908E #define GL_TRANSLATE_Y_NV 0x908F #define GL_TRANSLATE_2D_NV 0x9090 #define GL_TRANSLATE_3D_NV 0x9091 #define GL_AFFINE_2D_NV 0x9092 #define GL_AFFINE_3D_NV 0x9094 #define GL_TRANSPOSE_AFFINE_2D_NV 0x9096 #define GL_TRANSPOSE_AFFINE_3D_NV 0x9098 #define GL_UTF8_NV 0x909A #define GL_UTF16_NV 0x909B #define GL_BOUNDING_BOX_OF_BOUNDING_BOXES_NV 0x909C #define GL_PATH_COMMAND_COUNT_NV 0x909D #define GL_PATH_COORD_COUNT_NV 0x909E #define GL_PATH_DASH_ARRAY_COUNT_NV 0x909F #define GL_PATH_COMPUTED_LENGTH_NV 0x90A0 #define GL_PATH_FILL_BOUNDING_BOX_NV 0x90A1 #define GL_PATH_STROKE_BOUNDING_BOX_NV 0x90A2 #define GL_SQUARE_NV 0x90A3 #define GL_ROUND_NV 0x90A4 #define GL_TRIANGULAR_NV 0x90A5 #define GL_BEVEL_NV 0x90A6 #define GL_MITER_REVERT_NV 0x90A7 #define GL_MITER_TRUNCATE_NV 0x90A8 #define GL_SKIP_MISSING_GLYPH_NV 0x90A9 #define GL_USE_MISSING_GLYPH_NV 0x90AA #define GL_PATH_ERROR_POSITION_NV 0x90AB #define GL_ACCUM_ADJACENT_PAIRS_NV 0x90AD #define GL_ADJACENT_PAIRS_NV 0x90AE #define GL_FIRST_TO_REST_NV 0x90AF #define GL_PATH_GEN_MODE_NV 0x90B0 #define GL_PATH_GEN_COEFF_NV 0x90B1 #define GL_PATH_GEN_COMPONENTS_NV 0x90B3 #define GL_PATH_STENCIL_FUNC_NV 0x90B7 #define GL_PATH_STENCIL_REF_NV 0x90B8 #define GL_PATH_STENCIL_VALUE_MASK_NV 0x90B9 #define GL_PATH_STENCIL_DEPTH_OFFSET_FACTOR_NV 0x90BD #define GL_PATH_STENCIL_DEPTH_OFFSET_UNITS_NV 0x90BE #define GL_PATH_COVER_DEPTH_FUNC_NV 0x90BF #define GL_PATH_DASH_OFFSET_RESET_NV 0x90B4 #define GL_MOVE_TO_RESETS_NV 0x90B5 #define GL_MOVE_TO_CONTINUES_NV 0x90B6 #define GL_CLOSE_PATH_NV 0x00 #define GL_MOVE_TO_NV 0x02 #define GL_RELATIVE_MOVE_TO_NV 0x03 #define GL_LINE_TO_NV 0x04 #define GL_RELATIVE_LINE_TO_NV 0x05 #define GL_HORIZONTAL_LINE_TO_NV 0x06 #define GL_RELATIVE_HORIZONTAL_LINE_TO_NV 0x07 #define GL_VERTICAL_LINE_TO_NV 0x08 #define GL_RELATIVE_VERTICAL_LINE_TO_NV 0x09 #define GL_QUADRATIC_CURVE_TO_NV 0x0A #define GL_RELATIVE_QUADRATIC_CURVE_TO_NV 0x0B #define GL_CUBIC_CURVE_TO_NV 0x0C #define GL_RELATIVE_CUBIC_CURVE_TO_NV 0x0D #define GL_SMOOTH_QUADRATIC_CURVE_TO_NV 0x0E #define GL_RELATIVE_SMOOTH_QUADRATIC_CURVE_TO_NV 0x0F #define GL_SMOOTH_CUBIC_CURVE_TO_NV 0x10 #define GL_RELATIVE_SMOOTH_CUBIC_CURVE_TO_NV 0x11 #define GL_SMALL_CCW_ARC_TO_NV 0x12 #define GL_RELATIVE_SMALL_CCW_ARC_TO_NV 0x13 #define GL_SMALL_CW_ARC_TO_NV 0x14 #define GL_RELATIVE_SMALL_CW_ARC_TO_NV 0x15 #define GL_LARGE_CCW_ARC_TO_NV 0x16 #define GL_RELATIVE_LARGE_CCW_ARC_TO_NV 0x17 #define GL_LARGE_CW_ARC_TO_NV 0x18 #define GL_RELATIVE_LARGE_CW_ARC_TO_NV 0x19 #define GL_RESTART_PATH_NV 0xF0 #define GL_DUP_FIRST_CUBIC_CURVE_TO_NV 0xF2 #define GL_DUP_LAST_CUBIC_CURVE_TO_NV 0xF4 #define GL_RECT_NV 0xF6 #define GL_CIRCULAR_CCW_ARC_TO_NV 0xF8 #define GL_CIRCULAR_CW_ARC_TO_NV 0xFA #define GL_CIRCULAR_TANGENT_ARC_TO_NV 0xFC #define GL_ARC_TO_NV 0xFE #define GL_RELATIVE_ARC_TO_NV 0xFF #define GL_BOLD_BIT_NV 0x01 #define GL_ITALIC_BIT_NV 0x02 #define GL_GLYPH_WIDTH_BIT_NV 0x01 #define GL_GLYPH_HEIGHT_BIT_NV 0x02 #define GL_GLYPH_HORIZONTAL_BEARING_X_BIT_NV 0x04 #define GL_GLYPH_HORIZONTAL_BEARING_Y_BIT_NV 0x08 #define GL_GLYPH_HORIZONTAL_BEARING_ADVANCE_BIT_NV 0x10 #define GL_GLYPH_VERTICAL_BEARING_X_BIT_NV 0x20 #define GL_GLYPH_VERTICAL_BEARING_Y_BIT_NV 0x40 #define GL_GLYPH_VERTICAL_BEARING_ADVANCE_BIT_NV 0x80 #define GL_GLYPH_HAS_KERNING_BIT_NV 0x100 #define GL_FONT_X_MIN_BOUNDS_BIT_NV 0x00010000 #define GL_FONT_Y_MIN_BOUNDS_BIT_NV 0x00020000 #define GL_FONT_X_MAX_BOUNDS_BIT_NV 0x00040000 #define GL_FONT_Y_MAX_BOUNDS_BIT_NV 0x00080000 #define GL_FONT_UNITS_PER_EM_BIT_NV 0x00100000 #define GL_FONT_ASCENDER_BIT_NV 0x00200000 #define GL_FONT_DESCENDER_BIT_NV 0x00400000 #define GL_FONT_HEIGHT_BIT_NV 0x00800000 #define GL_FONT_MAX_ADVANCE_WIDTH_BIT_NV 0x01000000 #define GL_FONT_MAX_ADVANCE_HEIGHT_BIT_NV 0x02000000 #define GL_FONT_UNDERLINE_POSITION_BIT_NV 0x04000000 #define GL_FONT_UNDERLINE_THICKNESS_BIT_NV 0x08000000 #define GL_FONT_HAS_KERNING_BIT_NV 0x10000000 #define GL_ROUNDED_RECT_NV 0xE8 #define GL_RELATIVE_ROUNDED_RECT_NV 0xE9 #define GL_ROUNDED_RECT2_NV 0xEA #define GL_RELATIVE_ROUNDED_RECT2_NV 0xEB #define GL_ROUNDED_RECT4_NV 0xEC #define GL_RELATIVE_ROUNDED_RECT4_NV 0xED #define GL_ROUNDED_RECT8_NV 0xEE #define GL_RELATIVE_ROUNDED_RECT8_NV 0xEF #define GL_RELATIVE_RECT_NV 0xF7 #define GL_FONT_GLYPHS_AVAILABLE_NV 0x9368 #define GL_FONT_TARGET_UNAVAILABLE_NV 0x9369 #define GL_FONT_UNAVAILABLE_NV 0x936A #define GL_FONT_UNINTELLIGIBLE_NV 0x936B #define GL_CONIC_CURVE_TO_NV 0x1A #define GL_RELATIVE_CONIC_CURVE_TO_NV 0x1B #define GL_FONT_NUM_GLYPH_INDICES_BIT_NV 0x20000000 #define GL_STANDARD_FONT_FORMAT_NV 0x936C #define GL_2_BYTES_NV 0x1407 #define GL_3_BYTES_NV 0x1408 #define GL_4_BYTES_NV 0x1409 #define GL_EYE_LINEAR_NV 0x2400 #define GL_OBJECT_LINEAR_NV 0x2401 #define GL_CONSTANT_NV 0x8576 #define GL_PATH_FOG_GEN_MODE_NV 0x90AC #define GL_PRIMARY_COLOR_NV 0x852C #define GL_SECONDARY_COLOR_NV 0x852D #define GL_PATH_GEN_COLOR_FORMAT_NV 0x90B2 #define GL_PATH_PROJECTION_NV 0x1701 #define GL_PATH_MODELVIEW_NV 0x1700 #define GL_PATH_MODELVIEW_STACK_DEPTH_NV 0x0BA3 #define GL_PATH_MODELVIEW_MATRIX_NV 0x0BA6 #define GL_PATH_MAX_MODELVIEW_STACK_DEPTH_NV 0x0D36 #define GL_PATH_TRANSPOSE_MODELVIEW_MATRIX_NV 0x84E3 #define GL_PATH_PROJECTION_STACK_DEPTH_NV 0x0BA4 #define GL_PATH_PROJECTION_MATRIX_NV 0x0BA7 #define GL_PATH_MAX_PROJECTION_STACK_DEPTH_NV 0x0D38 #define GL_PATH_TRANSPOSE_PROJECTION_MATRIX_NV 0x84E4 #define GL_FRAGMENT_INPUT_NV 0x936D typedef GLuint (APIENTRYP pfn_glGenPathsNV) (GLsizei); extern pfn_glGenPathsNV fp_glGenPathsNV; typedef void (APIENTRYP pfn_glDeletePathsNV) (GLuint, GLsizei); extern pfn_glDeletePathsNV fp_glDeletePathsNV; typedef GLboolean (APIENTRYP pfn_glIsPathNV) (GLuint); extern pfn_glIsPathNV fp_glIsPathNV; typedef void (APIENTRYP pfn_glPathCommandsNV) (GLuint, GLsizei, const GLubyte*, GLsizei, GLenum, const void*); extern pfn_glPathCommandsNV fp_glPathCommandsNV; typedef void (APIENTRYP pfn_glPathCoordsNV) (GLuint, GLsizei, GLenum, const void*); extern pfn_glPathCoordsNV fp_glPathCoordsNV; typedef void (APIENTRYP pfn_glPathSubCommandsNV) (GLuint, GLsizei, GLsizei, GLsizei, const GLubyte*, GLsizei, GLenum, const void*); extern pfn_glPathSubCommandsNV fp_glPathSubCommandsNV; typedef void (APIENTRYP pfn_glPathSubCoordsNV) (GLuint, GLsizei, GLsizei, GLenum, const void*); extern pfn_glPathSubCoordsNV fp_glPathSubCoordsNV; typedef void (APIENTRYP pfn_glPathStringNV) (GLuint, GLenum, GLsizei, const void*); extern pfn_glPathStringNV fp_glPathStringNV; typedef void (APIENTRYP pfn_glPathGlyphsNV) (GLuint, GLenum, const void*, GLbitfield, GLsizei, GLenum, const void*, GLenum, GLuint, GLfloat); extern pfn_glPathGlyphsNV fp_glPathGlyphsNV; typedef void (APIENTRYP pfn_glPathGlyphRangeNV) (GLuint, GLenum, const void*, GLbitfield, GLuint, GLsizei, GLenum, GLuint, GLfloat); extern pfn_glPathGlyphRangeNV fp_glPathGlyphRangeNV; typedef void (APIENTRYP pfn_glWeightPathsNV) (GLuint, GLsizei, const GLuint*, const GLfloat*); extern pfn_glWeightPathsNV fp_glWeightPathsNV; typedef void (APIENTRYP pfn_glCopyPathNV) (GLuint, GLuint); extern pfn_glCopyPathNV fp_glCopyPathNV; typedef void (APIENTRYP pfn_glInterpolatePathsNV) (GLuint, GLuint, GLuint, GLfloat); extern pfn_glInterpolatePathsNV fp_glInterpolatePathsNV; typedef void (APIENTRYP pfn_glTransformPathNV) (GLuint, GLuint, GLenum, const GLfloat*); extern pfn_glTransformPathNV fp_glTransformPathNV; typedef void (APIENTRYP pfn_glPathParameterivNV) (GLuint, GLenum, const GLint*); extern pfn_glPathParameterivNV fp_glPathParameterivNV; typedef void (APIENTRYP pfn_glPathParameteriNV) (GLuint, GLenum, GLint); extern pfn_glPathParameteriNV fp_glPathParameteriNV; typedef void (APIENTRYP pfn_glPathParameterfvNV) (GLuint, GLenum, const GLfloat*); extern pfn_glPathParameterfvNV fp_glPathParameterfvNV; typedef void (APIENTRYP pfn_glPathParameterfNV) (GLuint, GLenum, GLfloat); extern pfn_glPathParameterfNV fp_glPathParameterfNV; typedef void (APIENTRYP pfn_glPathDashArrayNV) (GLuint, GLsizei, const GLfloat*); extern pfn_glPathDashArrayNV fp_glPathDashArrayNV; typedef void (APIENTRYP pfn_glPathStencilFuncNV) (GLenum, GLint, GLuint); extern pfn_glPathStencilFuncNV fp_glPathStencilFuncNV; typedef void (APIENTRYP pfn_glPathStencilDepthOffsetNV) (GLfloat, GLfloat); extern pfn_glPathStencilDepthOffsetNV fp_glPathStencilDepthOffsetNV; typedef void (APIENTRYP pfn_glStencilFillPathNV) (GLuint, GLenum, GLuint); extern pfn_glStencilFillPathNV fp_glStencilFillPathNV; typedef void (APIENTRYP pfn_glStencilStrokePathNV) (GLuint, GLint, GLuint); extern pfn_glStencilStrokePathNV fp_glStencilStrokePathNV; typedef void (APIENTRYP pfn_glStencilFillPathInstancedNV) (GLsizei, GLenum, const void*, GLuint, GLenum, GLuint, GLenum, const GLfloat*); extern pfn_glStencilFillPathInstancedNV fp_glStencilFillPathInstancedNV; typedef void (APIENTRYP pfn_glStencilStrokePathInstancedNV) (GLsizei, GLenum, const void*, GLuint, GLint, GLuint, GLenum, const GLfloat*); extern pfn_glStencilStrokePathInstancedNV fp_glStencilStrokePathInstancedNV; typedef void (APIENTRYP pfn_glPathCoverDepthFuncNV) (GLenum); extern pfn_glPathCoverDepthFuncNV fp_glPathCoverDepthFuncNV; typedef void (APIENTRYP pfn_glCoverFillPathNV) (GLuint, GLenum); extern pfn_glCoverFillPathNV fp_glCoverFillPathNV; typedef void (APIENTRYP pfn_glCoverStrokePathNV) (GLuint, GLenum); extern pfn_glCoverStrokePathNV fp_glCoverStrokePathNV; typedef void (APIENTRYP pfn_glCoverFillPathInstancedNV) (GLsizei, GLenum, const void*, GLuint, GLenum, GLenum, const GLfloat*); extern pfn_glCoverFillPathInstancedNV fp_glCoverFillPathInstancedNV; typedef void (APIENTRYP pfn_glCoverStrokePathInstancedNV) (GLsizei, GLenum, const void*, GLuint, GLenum, GLenum, const GLfloat*); extern pfn_glCoverStrokePathInstancedNV fp_glCoverStrokePathInstancedNV; typedef void (APIENTRYP pfn_glGetPathParameterivNV) (GLuint, GLenum, GLint*); extern pfn_glGetPathParameterivNV fp_glGetPathParameterivNV; typedef void (APIENTRYP pfn_glGetPathParameterfvNV) (GLuint, GLenum, GLfloat*); extern pfn_glGetPathParameterfvNV fp_glGetPathParameterfvNV; typedef void (APIENTRYP pfn_glGetPathCommandsNV) (GLuint, GLubyte*); extern pfn_glGetPathCommandsNV fp_glGetPathCommandsNV; typedef void (APIENTRYP pfn_glGetPathCoordsNV) (GLuint, GLfloat*); extern pfn_glGetPathCoordsNV fp_glGetPathCoordsNV; typedef void (APIENTRYP pfn_glGetPathDashArrayNV) (GLuint, GLfloat*); extern pfn_glGetPathDashArrayNV fp_glGetPathDashArrayNV; typedef void (APIENTRYP pfn_glGetPathMetricsNV) (GLbitfield, GLsizei, GLenum, const void*, GLuint, GLsizei, GLfloat*); extern pfn_glGetPathMetricsNV fp_glGetPathMetricsNV; typedef void (APIENTRYP pfn_glGetPathMetricRangeNV) (GLbitfield, GLuint, GLsizei, GLsizei, GLfloat*); extern pfn_glGetPathMetricRangeNV fp_glGetPathMetricRangeNV; typedef void (APIENTRYP pfn_glGetPathSpacingNV) (GLenum, GLsizei, GLenum, const void*, GLuint, GLfloat, GLfloat, GLenum, GLfloat*); extern pfn_glGetPathSpacingNV fp_glGetPathSpacingNV; typedef GLboolean (APIENTRYP pfn_glIsPointInFillPathNV) (GLuint, GLuint, GLfloat, GLfloat); extern pfn_glIsPointInFillPathNV fp_glIsPointInFillPathNV; typedef GLboolean (APIENTRYP pfn_glIsPointInStrokePathNV) (GLuint, GLfloat, GLfloat); extern pfn_glIsPointInStrokePathNV fp_glIsPointInStrokePathNV; typedef GLfloat (APIENTRYP pfn_glGetPathLengthNV) (GLuint, GLsizei, GLsizei); extern pfn_glGetPathLengthNV fp_glGetPathLengthNV; typedef GLboolean (APIENTRYP pfn_glPointAlongPathNV) (GLuint, GLsizei, GLsizei, GLfloat, GLfloat*, GLfloat*, GLfloat*, GLfloat*); extern pfn_glPointAlongPathNV fp_glPointAlongPathNV; typedef void (APIENTRYP pfn_glMatrixLoad3x2fNV) (GLenum, const GLfloat*); extern pfn_glMatrixLoad3x2fNV fp_glMatrixLoad3x2fNV; typedef void (APIENTRYP pfn_glMatrixLoad3x3fNV) (GLenum, const GLfloat*); extern pfn_glMatrixLoad3x3fNV fp_glMatrixLoad3x3fNV; typedef void (APIENTRYP pfn_glMatrixLoadTranspose3x3fNV) (GLenum, const GLfloat*); extern pfn_glMatrixLoadTranspose3x3fNV fp_glMatrixLoadTranspose3x3fNV; typedef void (APIENTRYP pfn_glMatrixMult3x2fNV) (GLenum, const GLfloat*); extern pfn_glMatrixMult3x2fNV fp_glMatrixMult3x2fNV; typedef void (APIENTRYP pfn_glMatrixMult3x3fNV) (GLenum, const GLfloat*); extern pfn_glMatrixMult3x3fNV fp_glMatrixMult3x3fNV; typedef void (APIENTRYP pfn_glMatrixMultTranspose3x3fNV) (GLenum, const GLfloat*); extern pfn_glMatrixMultTranspose3x3fNV fp_glMatrixMultTranspose3x3fNV; typedef void (APIENTRYP pfn_glStencilThenCoverFillPathNV) (GLuint, GLenum, GLuint, GLenum); extern pfn_glStencilThenCoverFillPathNV fp_glStencilThenCoverFillPathNV; typedef void (APIENTRYP pfn_glStencilThenCoverStrokePathNV) (GLuint, GLint, GLuint, GLenum); extern pfn_glStencilThenCoverStrokePathNV fp_glStencilThenCoverStrokePathNV; typedef void (APIENTRYP pfn_glStencilThenCoverFillPathInstancedNV) (GLsizei, GLenum, const void*, GLuint, GLenum, GLuint, GLenum, GLenum, const GLfloat*); extern pfn_glStencilThenCoverFillPathInstancedNV fp_glStencilThenCoverFillPathInstancedNV; typedef void (APIENTRYP pfn_glStencilThenCoverStrokePathInstancedNV) (GLsizei, GLenum, const void*, GLuint, GLint, GLuint, GLenum, GLenum, const GLfloat*); extern pfn_glStencilThenCoverStrokePathInstancedNV fp_glStencilThenCoverStrokePathInstancedNV; typedef GLenum (APIENTRYP pfn_glPathGlyphIndexRangeNV) (GLenum, const void*, GLbitfield, GLuint, GLfloat, GLuint); extern pfn_glPathGlyphIndexRangeNV fp_glPathGlyphIndexRangeNV; typedef GLenum (APIENTRYP pfn_glPathGlyphIndexArrayNV) (GLuint, GLenum, const void*, GLbitfield, GLuint, GLsizei, GLuint, GLfloat); extern pfn_glPathGlyphIndexArrayNV fp_glPathGlyphIndexArrayNV; typedef GLenum (APIENTRYP pfn_glPathMemoryGlyphIndexArrayNV) (GLuint, GLenum, GLsizeiptr, const void*, GLsizei, GLuint, GLsizei, GLuint, GLfloat); extern pfn_glPathMemoryGlyphIndexArrayNV fp_glPathMemoryGlyphIndexArrayNV; typedef void (APIENTRYP pfn_glProgramPathFragmentInputGenNV) (GLuint, GLint, GLenum, GLint, const GLfloat*); extern pfn_glProgramPathFragmentInputGenNV fp_glProgramPathFragmentInputGenNV; typedef void (APIENTRYP pfn_glGetProgramResourcefvNV) (GLuint, GLenum, GLuint, GLsizei, const GLenum*, GLsizei, GLsizei*, GLfloat*); extern pfn_glGetProgramResourcefvNV fp_glGetProgramResourcefvNV; typedef void (APIENTRYP pfn_glPathColorGenNV) (GLenum, GLenum, GLenum, const GLfloat*); extern pfn_glPathColorGenNV fp_glPathColorGenNV; typedef void (APIENTRYP pfn_glPathTexGenNV) (GLenum, GLenum, GLint, const GLfloat*); extern pfn_glPathTexGenNV fp_glPathTexGenNV; typedef void (APIENTRYP pfn_glPathFogGenNV) (GLenum); extern pfn_glPathFogGenNV fp_glPathFogGenNV; typedef void (APIENTRYP pfn_glGetPathColorGenivNV) (GLenum, GLenum, GLint*); extern pfn_glGetPathColorGenivNV fp_glGetPathColorGenivNV; typedef void (APIENTRYP pfn_glGetPathColorGenfvNV) (GLenum, GLenum, GLfloat*); extern pfn_glGetPathColorGenfvNV fp_glGetPathColorGenfvNV; typedef void (APIENTRYP pfn_glGetPathTexGenivNV) (GLenum, GLenum, GLint*); extern pfn_glGetPathTexGenivNV fp_glGetPathTexGenivNV; typedef void (APIENTRYP pfn_glGetPathTexGenfvNV) (GLenum, GLenum, GLfloat*); extern pfn_glGetPathTexGenfvNV fp_glGetPathTexGenfvNV; /* GL_NV_path_rendering_shared_edge */ extern GLboolean GLAD_NV_path_rendering_shared_edge; #define GL_SHARED_EDGE_NV 0xC0 /* GL_NV_polygon_mode */ extern GLboolean GLAD_NV_polygon_mode; #define GL_POLYGON_MODE_NV 0x0B40 #define GL_POLYGON_OFFSET_POINT_NV 0x2A01 #define GL_POLYGON_OFFSET_LINE_NV 0x2A02 #define GL_POINT_NV 0x1B00 #define GL_LINE_NV 0x1B01 #define GL_FILL_NV 0x1B02 typedef void (APIENTRYP pfn_glPolygonModeNV) (GLenum, GLenum); extern pfn_glPolygonModeNV fp_glPolygonModeNV; /* GL_NV_present_video */ extern GLboolean GLAD_NV_present_video; #define GL_FRAME_NV 0x8E26 #define GL_FIELDS_NV 0x8E27 #define GL_CURRENT_TIME_NV 0x8E28 #define GL_NUM_FILL_STREAMS_NV 0x8E29 #define GL_PRESENT_TIME_NV 0x8E2A #define GL_PRESENT_DURATION_NV 0x8E2B typedef void (APIENTRYP pfn_glPresentFrameKeyedNV) (GLuint, GLuint64EXT, GLuint, GLuint, GLenum, GLenum, GLuint, GLuint, GLenum, GLuint, GLuint); extern pfn_glPresentFrameKeyedNV fp_glPresentFrameKeyedNV; typedef void (APIENTRYP pfn_glPresentFrameDualFillNV) (GLuint, GLuint64EXT, GLuint, GLuint, GLenum, GLenum, GLuint, GLenum, GLuint, GLenum, GLuint, GLenum, GLuint); extern pfn_glPresentFrameDualFillNV fp_glPresentFrameDualFillNV; typedef void (APIENTRYP pfn_glGetVideoivNV) (GLuint, GLenum, GLint*); extern pfn_glGetVideoivNV fp_glGetVideoivNV; typedef void (APIENTRYP pfn_glGetVideouivNV) (GLuint, GLenum, GLuint*); extern pfn_glGetVideouivNV fp_glGetVideouivNV; typedef void (APIENTRYP pfn_glGetVideoi64vNV) (GLuint, GLenum, GLint64EXT*); extern pfn_glGetVideoi64vNV fp_glGetVideoi64vNV; typedef void (APIENTRYP pfn_glGetVideoui64vNV) (GLuint, GLenum, GLuint64EXT*); extern pfn_glGetVideoui64vNV fp_glGetVideoui64vNV; /* GL_NV_primitive_restart */ extern GLboolean GLAD_NV_primitive_restart; #define GL_PRIMITIVE_RESTART_NV 0x8558 #define GL_PRIMITIVE_RESTART_INDEX_NV 0x8559 typedef void (APIENTRYP pfn_glPrimitiveRestartNV) (); extern pfn_glPrimitiveRestartNV fp_glPrimitiveRestartNV; typedef void (APIENTRYP pfn_glPrimitiveRestartIndexNV) (GLuint); extern pfn_glPrimitiveRestartIndexNV fp_glPrimitiveRestartIndexNV; /* GL_NV_read_buffer */ extern GLboolean GLAD_NV_read_buffer; #define GL_READ_BUFFER_NV 0x0C02 typedef void (APIENTRYP pfn_glReadBufferNV) (GLenum); extern pfn_glReadBufferNV fp_glReadBufferNV; /* GL_NV_read_buffer_front */ extern GLboolean GLAD_NV_read_buffer_front; /* GL_NV_read_depth */ extern GLboolean GLAD_NV_read_depth; /* GL_NV_read_depth_stencil */ extern GLboolean GLAD_NV_read_depth_stencil; /* GL_NV_read_stencil */ extern GLboolean GLAD_NV_read_stencil; /* GL_NV_sample_locations */ extern GLboolean GLAD_NV_sample_locations; #define GL_SAMPLE_LOCATION_SUBPIXEL_BITS_NV 0x933D #define GL_SAMPLE_LOCATION_PIXEL_GRID_WIDTH_NV 0x933E #define GL_SAMPLE_LOCATION_PIXEL_GRID_HEIGHT_NV 0x933F #define GL_PROGRAMMABLE_SAMPLE_LOCATION_TABLE_SIZE_NV 0x9340 #define GL_SAMPLE_LOCATION_NV 0x8E50 #define GL_PROGRAMMABLE_SAMPLE_LOCATION_NV 0x9341 #define GL_FRAMEBUFFER_PROGRAMMABLE_SAMPLE_LOCATIONS_NV 0x9342 #define GL_FRAMEBUFFER_SAMPLE_LOCATION_PIXEL_GRID_NV 0x9343 typedef void (APIENTRYP pfn_glFramebufferSampleLocationsfvNV) (GLenum, GLuint, GLsizei, const GLfloat*); extern pfn_glFramebufferSampleLocationsfvNV fp_glFramebufferSampleLocationsfvNV; typedef void (APIENTRYP pfn_glNamedFramebufferSampleLocationsfvNV) (GLuint, GLuint, GLsizei, const GLfloat*); extern pfn_glNamedFramebufferSampleLocationsfvNV fp_glNamedFramebufferSampleLocationsfvNV; typedef void (APIENTRYP pfn_glResolveDepthValuesNV) (); extern pfn_glResolveDepthValuesNV fp_glResolveDepthValuesNV; /* GL_NV_sample_mask_override_coverage */ extern GLboolean GLAD_NV_sample_mask_override_coverage; /* GL_NV_shader_atomic_counters */ extern GLboolean GLAD_NV_shader_atomic_counters; /* GL_NV_shader_atomic_float */ extern GLboolean GLAD_NV_shader_atomic_float; /* GL_NV_shader_atomic_fp16_vector */ extern GLboolean GLAD_NV_shader_atomic_fp16_vector; /* GL_NV_shader_atomic_int64 */ extern GLboolean GLAD_NV_shader_atomic_int64; /* GL_NV_shader_buffer_load */ extern GLboolean GLAD_NV_shader_buffer_load; #define GL_BUFFER_GPU_ADDRESS_NV 0x8F1D #define GL_GPU_ADDRESS_NV 0x8F34 #define GL_MAX_SHADER_BUFFER_ADDRESS_NV 0x8F35 typedef void (APIENTRYP pfn_glMakeBufferResidentNV) (GLenum, GLenum); extern pfn_glMakeBufferResidentNV fp_glMakeBufferResidentNV; typedef void (APIENTRYP pfn_glMakeBufferNonResidentNV) (GLenum); extern pfn_glMakeBufferNonResidentNV fp_glMakeBufferNonResidentNV; typedef GLboolean (APIENTRYP pfn_glIsBufferResidentNV) (GLenum); extern pfn_glIsBufferResidentNV fp_glIsBufferResidentNV; typedef void (APIENTRYP pfn_glMakeNamedBufferResidentNV) (GLuint, GLenum); extern pfn_glMakeNamedBufferResidentNV fp_glMakeNamedBufferResidentNV; typedef void (APIENTRYP pfn_glMakeNamedBufferNonResidentNV) (GLuint); extern pfn_glMakeNamedBufferNonResidentNV fp_glMakeNamedBufferNonResidentNV; typedef GLboolean (APIENTRYP pfn_glIsNamedBufferResidentNV) (GLuint); extern pfn_glIsNamedBufferResidentNV fp_glIsNamedBufferResidentNV; typedef void (APIENTRYP pfn_glGetBufferParameterui64vNV) (GLenum, GLenum, GLuint64EXT*); extern pfn_glGetBufferParameterui64vNV fp_glGetBufferParameterui64vNV; typedef void (APIENTRYP pfn_glGetNamedBufferParameterui64vNV) (GLuint, GLenum, GLuint64EXT*); extern pfn_glGetNamedBufferParameterui64vNV fp_glGetNamedBufferParameterui64vNV; typedef void (APIENTRYP pfn_glGetIntegerui64vNV) (GLenum, GLuint64EXT*); extern pfn_glGetIntegerui64vNV fp_glGetIntegerui64vNV; typedef void (APIENTRYP pfn_glUniformui64NV) (GLint, GLuint64EXT); extern pfn_glUniformui64NV fp_glUniformui64NV; typedef void (APIENTRYP pfn_glUniformui64vNV) (GLint, GLsizei, const GLuint64EXT*); extern pfn_glUniformui64vNV fp_glUniformui64vNV; typedef void (APIENTRYP pfn_glProgramUniformui64NV) (GLuint, GLint, GLuint64EXT); extern pfn_glProgramUniformui64NV fp_glProgramUniformui64NV; typedef void (APIENTRYP pfn_glProgramUniformui64vNV) (GLuint, GLint, GLsizei, const GLuint64EXT*); extern pfn_glProgramUniformui64vNV fp_glProgramUniformui64vNV; /* GL_NV_shader_buffer_store */ extern GLboolean GLAD_NV_shader_buffer_store; #define GL_SHADER_GLOBAL_ACCESS_BARRIER_BIT_NV 0x00000010 /* GL_NV_shader_noperspective_interpolation */ extern GLboolean GLAD_NV_shader_noperspective_interpolation; /* GL_NV_shader_storage_buffer_object */ extern GLboolean GLAD_NV_shader_storage_buffer_object; /* GL_NV_shader_thread_group */ extern GLboolean GLAD_NV_shader_thread_group; #define GL_WARP_SIZE_NV 0x9339 #define GL_WARPS_PER_SM_NV 0x933A #define GL_SM_COUNT_NV 0x933B /* GL_NV_shader_thread_shuffle */ extern GLboolean GLAD_NV_shader_thread_shuffle; /* GL_NV_shadow_samplers_array */ extern GLboolean GLAD_NV_shadow_samplers_array; #define GL_SAMPLER_2D_ARRAY_SHADOW_NV 0x8DC4 /* GL_NV_shadow_samplers_cube */ extern GLboolean GLAD_NV_shadow_samplers_cube; #define GL_SAMPLER_CUBE_SHADOW_NV 0x8DC5 /* GL_NV_sRGB_formats */ extern GLboolean GLAD_NV_sRGB_formats; #define GL_SLUMINANCE_NV 0x8C46 #define GL_SLUMINANCE_ALPHA_NV 0x8C44 #define GL_SRGB8_NV 0x8C41 #define GL_SLUMINANCE8_NV 0x8C47 #define GL_SLUMINANCE8_ALPHA8_NV 0x8C45 #define GL_COMPRESSED_SRGB_S3TC_DXT1_NV 0x8C4C #define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_NV 0x8C4D #define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_NV 0x8C4E #define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_NV 0x8C4F #define GL_ETC1_SRGB8_NV 0x88EE /* GL_NV_tessellation_program5 */ extern GLboolean GLAD_NV_tessellation_program5; #define GL_MAX_PROGRAM_PATCH_ATTRIBS_NV 0x86D8 #define GL_TESS_CONTROL_PROGRAM_NV 0x891E #define GL_TESS_EVALUATION_PROGRAM_NV 0x891F #define GL_TESS_CONTROL_PROGRAM_PARAMETER_BUFFER_NV 0x8C74 #define GL_TESS_EVALUATION_PROGRAM_PARAMETER_BUFFER_NV 0x8C75 /* GL_NV_texture_barrier */ extern GLboolean GLAD_NV_texture_barrier; typedef void (APIENTRYP pfn_glTextureBarrierNV) (); extern pfn_glTextureBarrierNV fp_glTextureBarrierNV; /* GL_NV_texture_border_clamp */ extern GLboolean GLAD_NV_texture_border_clamp; #define GL_TEXTURE_BORDER_COLOR_NV 0x1004 #define GL_CLAMP_TO_BORDER_NV 0x812D /* GL_NV_texture_compression_s3tc_update */ extern GLboolean GLAD_NV_texture_compression_s3tc_update; /* GL_NV_texture_multisample */ extern GLboolean GLAD_NV_texture_multisample; #define GL_TEXTURE_COVERAGE_SAMPLES_NV 0x9045 #define GL_TEXTURE_COLOR_SAMPLES_NV 0x9046 typedef void (APIENTRYP pfn_glTexImage2DMultisampleCoverageNV) (GLenum, GLsizei, GLsizei, GLint, GLsizei, GLsizei, GLboolean); extern pfn_glTexImage2DMultisampleCoverageNV fp_glTexImage2DMultisampleCoverageNV; typedef void (APIENTRYP pfn_glTexImage3DMultisampleCoverageNV) (GLenum, GLsizei, GLsizei, GLint, GLsizei, GLsizei, GLsizei, GLboolean); extern pfn_glTexImage3DMultisampleCoverageNV fp_glTexImage3DMultisampleCoverageNV; typedef void (APIENTRYP pfn_glTextureImage2DMultisampleNV) (GLuint, GLenum, GLsizei, GLint, GLsizei, GLsizei, GLboolean); extern pfn_glTextureImage2DMultisampleNV fp_glTextureImage2DMultisampleNV; typedef void (APIENTRYP pfn_glTextureImage3DMultisampleNV) (GLuint, GLenum, GLsizei, GLint, GLsizei, GLsizei, GLsizei, GLboolean); extern pfn_glTextureImage3DMultisampleNV fp_glTextureImage3DMultisampleNV; typedef void (APIENTRYP pfn_glTextureImage2DMultisampleCoverageNV) (GLuint, GLenum, GLsizei, GLsizei, GLint, GLsizei, GLsizei, GLboolean); extern pfn_glTextureImage2DMultisampleCoverageNV fp_glTextureImage2DMultisampleCoverageNV; typedef void (APIENTRYP pfn_glTextureImage3DMultisampleCoverageNV) (GLuint, GLenum, GLsizei, GLsizei, GLint, GLsizei, GLsizei, GLsizei, GLboolean); extern pfn_glTextureImage3DMultisampleCoverageNV fp_glTextureImage3DMultisampleCoverageNV; /* GL_NV_texture_npot_2D_mipmap */ extern GLboolean GLAD_NV_texture_npot_2D_mipmap; /* GL_NV_transform_feedback */ extern GLboolean GLAD_NV_transform_feedback; #define GL_BACK_PRIMARY_COLOR_NV 0x8C77 #define GL_BACK_SECONDARY_COLOR_NV 0x8C78 #define GL_TEXTURE_COORD_NV 0x8C79 #define GL_CLIP_DISTANCE_NV 0x8C7A #define GL_VERTEX_ID_NV 0x8C7B #define GL_PRIMITIVE_ID_NV 0x8C7C #define GL_GENERIC_ATTRIB_NV 0x8C7D #define GL_TRANSFORM_FEEDBACK_ATTRIBS_NV 0x8C7E #define GL_TRANSFORM_FEEDBACK_BUFFER_MODE_NV 0x8C7F #define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_NV 0x8C80 #define GL_ACTIVE_VARYINGS_NV 0x8C81 #define GL_ACTIVE_VARYING_MAX_LENGTH_NV 0x8C82 #define GL_TRANSFORM_FEEDBACK_VARYINGS_NV 0x8C83 #define GL_TRANSFORM_FEEDBACK_BUFFER_START_NV 0x8C84 #define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_NV 0x8C85 #define GL_TRANSFORM_FEEDBACK_RECORD_NV 0x8C86 #define GL_PRIMITIVES_GENERATED_NV 0x8C87 #define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_NV 0x8C88 #define GL_RASTERIZER_DISCARD_NV 0x8C89 #define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_NV 0x8C8A #define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_NV 0x8C8B #define GL_INTERLEAVED_ATTRIBS_NV 0x8C8C #define GL_SEPARATE_ATTRIBS_NV 0x8C8D #define GL_TRANSFORM_FEEDBACK_BUFFER_NV 0x8C8E #define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_NV 0x8C8F #define GL_LAYER_NV 0x8DAA #define GL_NEXT_BUFFER_NV -2 #define GL_SKIP_COMPONENTS4_NV -3 #define GL_SKIP_COMPONENTS3_NV -4 #define GL_SKIP_COMPONENTS2_NV -5 #define GL_SKIP_COMPONENTS1_NV -6 typedef void (APIENTRYP pfn_glBeginTransformFeedbackNV) (GLenum); extern pfn_glBeginTransformFeedbackNV fp_glBeginTransformFeedbackNV; typedef void (APIENTRYP pfn_glEndTransformFeedbackNV) (); extern pfn_glEndTransformFeedbackNV fp_glEndTransformFeedbackNV; typedef void (APIENTRYP pfn_glTransformFeedbackAttribsNV) (GLsizei, const GLint*, GLenum); extern pfn_glTransformFeedbackAttribsNV fp_glTransformFeedbackAttribsNV; typedef void (APIENTRYP pfn_glBindBufferRangeNV) (GLenum, GLuint, GLuint, GLintptr, GLsizeiptr); extern pfn_glBindBufferRangeNV fp_glBindBufferRangeNV; typedef void (APIENTRYP pfn_glBindBufferOffsetNV) (GLenum, GLuint, GLuint, GLintptr); extern pfn_glBindBufferOffsetNV fp_glBindBufferOffsetNV; typedef void (APIENTRYP pfn_glBindBufferBaseNV) (GLenum, GLuint, GLuint); extern pfn_glBindBufferBaseNV fp_glBindBufferBaseNV; typedef void (APIENTRYP pfn_glTransformFeedbackVaryingsNV) (GLuint, GLsizei, const GLint*, GLenum); extern pfn_glTransformFeedbackVaryingsNV fp_glTransformFeedbackVaryingsNV; typedef void (APIENTRYP pfn_glActiveVaryingNV) (GLuint, const GLchar*); extern pfn_glActiveVaryingNV fp_glActiveVaryingNV; typedef GLint (APIENTRYP pfn_glGetVaryingLocationNV) (GLuint, const GLchar*); extern pfn_glGetVaryingLocationNV fp_glGetVaryingLocationNV; typedef void (APIENTRYP pfn_glGetActiveVaryingNV) (GLuint, GLuint, GLsizei, GLsizei*, GLsizei*, GLenum*, GLchar*); extern pfn_glGetActiveVaryingNV fp_glGetActiveVaryingNV; typedef void (APIENTRYP pfn_glGetTransformFeedbackVaryingNV) (GLuint, GLuint, GLint*); extern pfn_glGetTransformFeedbackVaryingNV fp_glGetTransformFeedbackVaryingNV; typedef void (APIENTRYP pfn_glTransformFeedbackStreamAttribsNV) (GLsizei, const GLint*, GLsizei, const GLint*, GLenum); extern pfn_glTransformFeedbackStreamAttribsNV fp_glTransformFeedbackStreamAttribsNV; /* GL_NV_transform_feedback2 */ extern GLboolean GLAD_NV_transform_feedback2; #define GL_TRANSFORM_FEEDBACK_NV 0x8E22 #define GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED_NV 0x8E23 #define GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE_NV 0x8E24 #define GL_TRANSFORM_FEEDBACK_BINDING_NV 0x8E25 typedef void (APIENTRYP pfn_glBindTransformFeedbackNV) (GLenum, GLuint); extern pfn_glBindTransformFeedbackNV fp_glBindTransformFeedbackNV; typedef void (APIENTRYP pfn_glDeleteTransformFeedbacksNV) (GLsizei, const GLuint*); extern pfn_glDeleteTransformFeedbacksNV fp_glDeleteTransformFeedbacksNV; typedef void (APIENTRYP pfn_glGenTransformFeedbacksNV) (GLsizei, GLuint*); extern pfn_glGenTransformFeedbacksNV fp_glGenTransformFeedbacksNV; typedef GLboolean (APIENTRYP pfn_glIsTransformFeedbackNV) (GLuint); extern pfn_glIsTransformFeedbackNV fp_glIsTransformFeedbackNV; typedef void (APIENTRYP pfn_glPauseTransformFeedbackNV) (); extern pfn_glPauseTransformFeedbackNV fp_glPauseTransformFeedbackNV; typedef void (APIENTRYP pfn_glResumeTransformFeedbackNV) (); extern pfn_glResumeTransformFeedbackNV fp_glResumeTransformFeedbackNV; typedef void (APIENTRYP pfn_glDrawTransformFeedbackNV) (GLenum, GLuint); extern pfn_glDrawTransformFeedbackNV fp_glDrawTransformFeedbackNV; /* GL_NV_uniform_buffer_unified_memory */ extern GLboolean GLAD_NV_uniform_buffer_unified_memory; #define GL_UNIFORM_BUFFER_UNIFIED_NV 0x936E #define GL_UNIFORM_BUFFER_ADDRESS_NV 0x936F #define GL_UNIFORM_BUFFER_LENGTH_NV 0x9370 /* GL_NV_vdpau_interop */ extern GLboolean GLAD_NV_vdpau_interop; #define GL_SURFACE_STATE_NV 0x86EB #define GL_SURFACE_REGISTERED_NV 0x86FD #define GL_SURFACE_MAPPED_NV 0x8700 #define GL_WRITE_DISCARD_NV 0x88BE typedef void (APIENTRYP pfn_glVDPAUInitNV) (const void*, const void*); extern pfn_glVDPAUInitNV fp_glVDPAUInitNV; typedef void (APIENTRYP pfn_glVDPAUFiniNV) (); extern pfn_glVDPAUFiniNV fp_glVDPAUFiniNV; typedef GLvdpauSurfaceNV (APIENTRYP pfn_glVDPAURegisterVideoSurfaceNV) (const void*, GLenum, GLsizei, const GLuint*); extern pfn_glVDPAURegisterVideoSurfaceNV fp_glVDPAURegisterVideoSurfaceNV; typedef GLvdpauSurfaceNV (APIENTRYP pfn_glVDPAURegisterOutputSurfaceNV) (const void*, GLenum, GLsizei, const GLuint*); extern pfn_glVDPAURegisterOutputSurfaceNV fp_glVDPAURegisterOutputSurfaceNV; typedef GLboolean (APIENTRYP pfn_glVDPAUIsSurfaceNV) (GLvdpauSurfaceNV); extern pfn_glVDPAUIsSurfaceNV fp_glVDPAUIsSurfaceNV; typedef void (APIENTRYP pfn_glVDPAUUnregisterSurfaceNV) (GLvdpauSurfaceNV); extern pfn_glVDPAUUnregisterSurfaceNV fp_glVDPAUUnregisterSurfaceNV; typedef void (APIENTRYP pfn_glVDPAUGetSurfaceivNV) (GLvdpauSurfaceNV, GLenum, GLsizei, GLsizei*, GLint*); extern pfn_glVDPAUGetSurfaceivNV fp_glVDPAUGetSurfaceivNV; typedef void (APIENTRYP pfn_glVDPAUSurfaceAccessNV) (GLvdpauSurfaceNV, GLenum); extern pfn_glVDPAUSurfaceAccessNV fp_glVDPAUSurfaceAccessNV; typedef void (APIENTRYP pfn_glVDPAUMapSurfacesNV) (GLsizei, const GLvdpauSurfaceNV*); extern pfn_glVDPAUMapSurfacesNV fp_glVDPAUMapSurfacesNV; typedef void (APIENTRYP pfn_glVDPAUUnmapSurfacesNV) (GLsizei, const GLvdpauSurfaceNV*); extern pfn_glVDPAUUnmapSurfacesNV fp_glVDPAUUnmapSurfacesNV; /* GL_NV_vertex_attrib_integer_64bit */ extern GLboolean GLAD_NV_vertex_attrib_integer_64bit; typedef void (APIENTRYP pfn_glVertexAttribL1i64NV) (GLuint, GLint64EXT); extern pfn_glVertexAttribL1i64NV fp_glVertexAttribL1i64NV; typedef void (APIENTRYP pfn_glVertexAttribL2i64NV) (GLuint, GLint64EXT, GLint64EXT); extern pfn_glVertexAttribL2i64NV fp_glVertexAttribL2i64NV; typedef void (APIENTRYP pfn_glVertexAttribL3i64NV) (GLuint, GLint64EXT, GLint64EXT, GLint64EXT); extern pfn_glVertexAttribL3i64NV fp_glVertexAttribL3i64NV; typedef void (APIENTRYP pfn_glVertexAttribL4i64NV) (GLuint, GLint64EXT, GLint64EXT, GLint64EXT, GLint64EXT); extern pfn_glVertexAttribL4i64NV fp_glVertexAttribL4i64NV; typedef void (APIENTRYP pfn_glVertexAttribL1i64vNV) (GLuint, const GLint64EXT*); extern pfn_glVertexAttribL1i64vNV fp_glVertexAttribL1i64vNV; typedef void (APIENTRYP pfn_glVertexAttribL2i64vNV) (GLuint, const GLint64EXT*); extern pfn_glVertexAttribL2i64vNV fp_glVertexAttribL2i64vNV; typedef void (APIENTRYP pfn_glVertexAttribL3i64vNV) (GLuint, const GLint64EXT*); extern pfn_glVertexAttribL3i64vNV fp_glVertexAttribL3i64vNV; typedef void (APIENTRYP pfn_glVertexAttribL4i64vNV) (GLuint, const GLint64EXT*); extern pfn_glVertexAttribL4i64vNV fp_glVertexAttribL4i64vNV; typedef void (APIENTRYP pfn_glVertexAttribL1ui64NV) (GLuint, GLuint64EXT); extern pfn_glVertexAttribL1ui64NV fp_glVertexAttribL1ui64NV; typedef void (APIENTRYP pfn_glVertexAttribL2ui64NV) (GLuint, GLuint64EXT, GLuint64EXT); extern pfn_glVertexAttribL2ui64NV fp_glVertexAttribL2ui64NV; typedef void (APIENTRYP pfn_glVertexAttribL3ui64NV) (GLuint, GLuint64EXT, GLuint64EXT, GLuint64EXT); extern pfn_glVertexAttribL3ui64NV fp_glVertexAttribL3ui64NV; typedef void (APIENTRYP pfn_glVertexAttribL4ui64NV) (GLuint, GLuint64EXT, GLuint64EXT, GLuint64EXT, GLuint64EXT); extern pfn_glVertexAttribL4ui64NV fp_glVertexAttribL4ui64NV; typedef void (APIENTRYP pfn_glVertexAttribL1ui64vNV) (GLuint, const GLuint64EXT*); extern pfn_glVertexAttribL1ui64vNV fp_glVertexAttribL1ui64vNV; typedef void (APIENTRYP pfn_glVertexAttribL2ui64vNV) (GLuint, const GLuint64EXT*); extern pfn_glVertexAttribL2ui64vNV fp_glVertexAttribL2ui64vNV; typedef void (APIENTRYP pfn_glVertexAttribL3ui64vNV) (GLuint, const GLuint64EXT*); extern pfn_glVertexAttribL3ui64vNV fp_glVertexAttribL3ui64vNV; typedef void (APIENTRYP pfn_glVertexAttribL4ui64vNV) (GLuint, const GLuint64EXT*); extern pfn_glVertexAttribL4ui64vNV fp_glVertexAttribL4ui64vNV; typedef void (APIENTRYP pfn_glGetVertexAttribLi64vNV) (GLuint, GLenum, GLint64EXT*); extern pfn_glGetVertexAttribLi64vNV fp_glGetVertexAttribLi64vNV; typedef void (APIENTRYP pfn_glGetVertexAttribLui64vNV) (GLuint, GLenum, GLuint64EXT*); extern pfn_glGetVertexAttribLui64vNV fp_glGetVertexAttribLui64vNV; typedef void (APIENTRYP pfn_glVertexAttribLFormatNV) (GLuint, GLint, GLenum, GLsizei); extern pfn_glVertexAttribLFormatNV fp_glVertexAttribLFormatNV; /* GL_NV_vertex_buffer_unified_memory */ extern GLboolean GLAD_NV_vertex_buffer_unified_memory; #define GL_VERTEX_ATTRIB_ARRAY_UNIFIED_NV 0x8F1E #define GL_ELEMENT_ARRAY_UNIFIED_NV 0x8F1F #define GL_VERTEX_ATTRIB_ARRAY_ADDRESS_NV 0x8F20 #define GL_VERTEX_ARRAY_ADDRESS_NV 0x8F21 #define GL_NORMAL_ARRAY_ADDRESS_NV 0x8F22 #define GL_COLOR_ARRAY_ADDRESS_NV 0x8F23 #define GL_INDEX_ARRAY_ADDRESS_NV 0x8F24 #define GL_TEXTURE_COORD_ARRAY_ADDRESS_NV 0x8F25 #define GL_EDGE_FLAG_ARRAY_ADDRESS_NV 0x8F26 #define GL_SECONDARY_COLOR_ARRAY_ADDRESS_NV 0x8F27 #define GL_FOG_COORD_ARRAY_ADDRESS_NV 0x8F28 #define GL_ELEMENT_ARRAY_ADDRESS_NV 0x8F29 #define GL_VERTEX_ATTRIB_ARRAY_LENGTH_NV 0x8F2A #define GL_VERTEX_ARRAY_LENGTH_NV 0x8F2B #define GL_NORMAL_ARRAY_LENGTH_NV 0x8F2C #define GL_COLOR_ARRAY_LENGTH_NV 0x8F2D #define GL_INDEX_ARRAY_LENGTH_NV 0x8F2E #define GL_TEXTURE_COORD_ARRAY_LENGTH_NV 0x8F2F #define GL_EDGE_FLAG_ARRAY_LENGTH_NV 0x8F30 #define GL_SECONDARY_COLOR_ARRAY_LENGTH_NV 0x8F31 #define GL_FOG_COORD_ARRAY_LENGTH_NV 0x8F32 #define GL_ELEMENT_ARRAY_LENGTH_NV 0x8F33 #define GL_DRAW_INDIRECT_UNIFIED_NV 0x8F40 #define GL_DRAW_INDIRECT_ADDRESS_NV 0x8F41 #define GL_DRAW_INDIRECT_LENGTH_NV 0x8F42 typedef void (APIENTRYP pfn_glBufferAddressRangeNV) (GLenum, GLuint, GLuint64EXT, GLsizeiptr); extern pfn_glBufferAddressRangeNV fp_glBufferAddressRangeNV; typedef void (APIENTRYP pfn_glVertexFormatNV) (GLint, GLenum, GLsizei); extern pfn_glVertexFormatNV fp_glVertexFormatNV; typedef void (APIENTRYP pfn_glNormalFormatNV) (GLenum, GLsizei); extern pfn_glNormalFormatNV fp_glNormalFormatNV; typedef void (APIENTRYP pfn_glColorFormatNV) (GLint, GLenum, GLsizei); extern pfn_glColorFormatNV fp_glColorFormatNV; typedef void (APIENTRYP pfn_glIndexFormatNV) (GLenum, GLsizei); extern pfn_glIndexFormatNV fp_glIndexFormatNV; typedef void (APIENTRYP pfn_glTexCoordFormatNV) (GLint, GLenum, GLsizei); extern pfn_glTexCoordFormatNV fp_glTexCoordFormatNV; typedef void (APIENTRYP pfn_glEdgeFlagFormatNV) (GLsizei); extern pfn_glEdgeFlagFormatNV fp_glEdgeFlagFormatNV; typedef void (APIENTRYP pfn_glSecondaryColorFormatNV) (GLint, GLenum, GLsizei); extern pfn_glSecondaryColorFormatNV fp_glSecondaryColorFormatNV; typedef void (APIENTRYP pfn_glFogCoordFormatNV) (GLenum, GLsizei); extern pfn_glFogCoordFormatNV fp_glFogCoordFormatNV; typedef void (APIENTRYP pfn_glVertexAttribFormatNV) (GLuint, GLint, GLenum, GLboolean, GLsizei); extern pfn_glVertexAttribFormatNV fp_glVertexAttribFormatNV; typedef void (APIENTRYP pfn_glVertexAttribIFormatNV) (GLuint, GLint, GLenum, GLsizei); extern pfn_glVertexAttribIFormatNV fp_glVertexAttribIFormatNV; typedef void (APIENTRYP pfn_glGetIntegerui64i_vNV) (GLenum, GLuint, GLuint64EXT*); extern pfn_glGetIntegerui64i_vNV fp_glGetIntegerui64i_vNV; /* GL_NV_vertex_program4 */ extern GLboolean GLAD_NV_vertex_program4; #define GL_VERTEX_ATTRIB_ARRAY_INTEGER_NV 0x88FD typedef void (APIENTRYP pfn_glVertexAttribI1iEXT) (GLuint, GLint); extern pfn_glVertexAttribI1iEXT fp_glVertexAttribI1iEXT; typedef void (APIENTRYP pfn_glVertexAttribI2iEXT) (GLuint, GLint, GLint); extern pfn_glVertexAttribI2iEXT fp_glVertexAttribI2iEXT; typedef void (APIENTRYP pfn_glVertexAttribI3iEXT) (GLuint, GLint, GLint, GLint); extern pfn_glVertexAttribI3iEXT fp_glVertexAttribI3iEXT; typedef void (APIENTRYP pfn_glVertexAttribI4iEXT) (GLuint, GLint, GLint, GLint, GLint); extern pfn_glVertexAttribI4iEXT fp_glVertexAttribI4iEXT; typedef void (APIENTRYP pfn_glVertexAttribI1uiEXT) (GLuint, GLuint); extern pfn_glVertexAttribI1uiEXT fp_glVertexAttribI1uiEXT; typedef void (APIENTRYP pfn_glVertexAttribI2uiEXT) (GLuint, GLuint, GLuint); extern pfn_glVertexAttribI2uiEXT fp_glVertexAttribI2uiEXT; typedef void (APIENTRYP pfn_glVertexAttribI3uiEXT) (GLuint, GLuint, GLuint, GLuint); extern pfn_glVertexAttribI3uiEXT fp_glVertexAttribI3uiEXT; typedef void (APIENTRYP pfn_glVertexAttribI4uiEXT) (GLuint, GLuint, GLuint, GLuint, GLuint); extern pfn_glVertexAttribI4uiEXT fp_glVertexAttribI4uiEXT; typedef void (APIENTRYP pfn_glVertexAttribI1ivEXT) (GLuint, const GLint*); extern pfn_glVertexAttribI1ivEXT fp_glVertexAttribI1ivEXT; typedef void (APIENTRYP pfn_glVertexAttribI2ivEXT) (GLuint, const GLint*); extern pfn_glVertexAttribI2ivEXT fp_glVertexAttribI2ivEXT; typedef void (APIENTRYP pfn_glVertexAttribI3ivEXT) (GLuint, const GLint*); extern pfn_glVertexAttribI3ivEXT fp_glVertexAttribI3ivEXT; typedef void (APIENTRYP pfn_glVertexAttribI4ivEXT) (GLuint, const GLint*); extern pfn_glVertexAttribI4ivEXT fp_glVertexAttribI4ivEXT; typedef void (APIENTRYP pfn_glVertexAttribI1uivEXT) (GLuint, const GLuint*); extern pfn_glVertexAttribI1uivEXT fp_glVertexAttribI1uivEXT; typedef void (APIENTRYP pfn_glVertexAttribI2uivEXT) (GLuint, const GLuint*); extern pfn_glVertexAttribI2uivEXT fp_glVertexAttribI2uivEXT; typedef void (APIENTRYP pfn_glVertexAttribI3uivEXT) (GLuint, const GLuint*); extern pfn_glVertexAttribI3uivEXT fp_glVertexAttribI3uivEXT; typedef void (APIENTRYP pfn_glVertexAttribI4uivEXT) (GLuint, const GLuint*); extern pfn_glVertexAttribI4uivEXT fp_glVertexAttribI4uivEXT; typedef void (APIENTRYP pfn_glVertexAttribI4bvEXT) (GLuint, const GLbyte*); extern pfn_glVertexAttribI4bvEXT fp_glVertexAttribI4bvEXT; typedef void (APIENTRYP pfn_glVertexAttribI4svEXT) (GLuint, const GLshort*); extern pfn_glVertexAttribI4svEXT fp_glVertexAttribI4svEXT; typedef void (APIENTRYP pfn_glVertexAttribI4ubvEXT) (GLuint, const GLubyte*); extern pfn_glVertexAttribI4ubvEXT fp_glVertexAttribI4ubvEXT; typedef void (APIENTRYP pfn_glVertexAttribI4usvEXT) (GLuint, const GLushort*); extern pfn_glVertexAttribI4usvEXT fp_glVertexAttribI4usvEXT; typedef void (APIENTRYP pfn_glVertexAttribIPointerEXT) (GLuint, GLint, GLenum, GLsizei, const void*); extern pfn_glVertexAttribIPointerEXT fp_glVertexAttribIPointerEXT; typedef void (APIENTRYP pfn_glGetVertexAttribIivEXT) (GLuint, GLenum, GLint*); extern pfn_glGetVertexAttribIivEXT fp_glGetVertexAttribIivEXT; typedef void (APIENTRYP pfn_glGetVertexAttribIuivEXT) (GLuint, GLenum, GLuint*); extern pfn_glGetVertexAttribIuivEXT fp_glGetVertexAttribIuivEXT; /* GL_NV_video_capture */ extern GLboolean GLAD_NV_video_capture; #define GL_VIDEO_BUFFER_NV 0x9020 #define GL_VIDEO_BUFFER_BINDING_NV 0x9021 #define GL_FIELD_UPPER_NV 0x9022 #define GL_FIELD_LOWER_NV 0x9023 #define GL_NUM_VIDEO_CAPTURE_STREAMS_NV 0x9024 #define GL_NEXT_VIDEO_CAPTURE_BUFFER_STATUS_NV 0x9025 #define GL_VIDEO_CAPTURE_TO_422_SUPPORTED_NV 0x9026 #define GL_LAST_VIDEO_CAPTURE_STATUS_NV 0x9027 #define GL_VIDEO_BUFFER_PITCH_NV 0x9028 #define GL_VIDEO_COLOR_CONVERSION_MATRIX_NV 0x9029 #define GL_VIDEO_COLOR_CONVERSION_MAX_NV 0x902A #define GL_VIDEO_COLOR_CONVERSION_MIN_NV 0x902B #define GL_VIDEO_COLOR_CONVERSION_OFFSET_NV 0x902C #define GL_VIDEO_BUFFER_INTERNAL_FORMAT_NV 0x902D #define GL_PARTIAL_SUCCESS_NV 0x902E #define GL_SUCCESS_NV 0x902F #define GL_FAILURE_NV 0x9030 #define GL_YCBYCR8_422_NV 0x9031 #define GL_YCBAYCR8A_4224_NV 0x9032 #define GL_Z6Y10Z6CB10Z6Y10Z6CR10_422_NV 0x9033 #define GL_Z6Y10Z6CB10Z6A10Z6Y10Z6CR10Z6A10_4224_NV 0x9034 #define GL_Z4Y12Z4CB12Z4Y12Z4CR12_422_NV 0x9035 #define GL_Z4Y12Z4CB12Z4A12Z4Y12Z4CR12Z4A12_4224_NV 0x9036 #define GL_Z4Y12Z4CB12Z4CR12_444_NV 0x9037 #define GL_VIDEO_CAPTURE_FRAME_WIDTH_NV 0x9038 #define GL_VIDEO_CAPTURE_FRAME_HEIGHT_NV 0x9039 #define GL_VIDEO_CAPTURE_FIELD_UPPER_HEIGHT_NV 0x903A #define GL_VIDEO_CAPTURE_FIELD_LOWER_HEIGHT_NV 0x903B #define GL_VIDEO_CAPTURE_SURFACE_ORIGIN_NV 0x903C typedef void (APIENTRYP pfn_glBeginVideoCaptureNV) (GLuint); extern pfn_glBeginVideoCaptureNV fp_glBeginVideoCaptureNV; typedef void (APIENTRYP pfn_glBindVideoCaptureStreamBufferNV) (GLuint, GLuint, GLenum, GLintptrARB); extern pfn_glBindVideoCaptureStreamBufferNV fp_glBindVideoCaptureStreamBufferNV; typedef void (APIENTRYP pfn_glBindVideoCaptureStreamTextureNV) (GLuint, GLuint, GLenum, GLenum, GLuint); extern pfn_glBindVideoCaptureStreamTextureNV fp_glBindVideoCaptureStreamTextureNV; typedef void (APIENTRYP pfn_glEndVideoCaptureNV) (GLuint); extern pfn_glEndVideoCaptureNV fp_glEndVideoCaptureNV; typedef void (APIENTRYP pfn_glGetVideoCaptureivNV) (GLuint, GLenum, GLint*); extern pfn_glGetVideoCaptureivNV fp_glGetVideoCaptureivNV; typedef void (APIENTRYP pfn_glGetVideoCaptureStreamivNV) (GLuint, GLuint, GLenum, GLint*); extern pfn_glGetVideoCaptureStreamivNV fp_glGetVideoCaptureStreamivNV; typedef void (APIENTRYP pfn_glGetVideoCaptureStreamfvNV) (GLuint, GLuint, GLenum, GLfloat*); extern pfn_glGetVideoCaptureStreamfvNV fp_glGetVideoCaptureStreamfvNV; typedef void (APIENTRYP pfn_glGetVideoCaptureStreamdvNV) (GLuint, GLuint, GLenum, GLdouble*); extern pfn_glGetVideoCaptureStreamdvNV fp_glGetVideoCaptureStreamdvNV; typedef GLenum (APIENTRYP pfn_glVideoCaptureNV) (GLuint, GLuint*, GLuint64EXT*); extern pfn_glVideoCaptureNV fp_glVideoCaptureNV; typedef void (APIENTRYP pfn_glVideoCaptureStreamParameterivNV) (GLuint, GLuint, GLenum, const GLint*); extern pfn_glVideoCaptureStreamParameterivNV fp_glVideoCaptureStreamParameterivNV; typedef void (APIENTRYP pfn_glVideoCaptureStreamParameterfvNV) (GLuint, GLuint, GLenum, const GLfloat*); extern pfn_glVideoCaptureStreamParameterfvNV fp_glVideoCaptureStreamParameterfvNV; typedef void (APIENTRYP pfn_glVideoCaptureStreamParameterdvNV) (GLuint, GLuint, GLenum, const GLdouble*); extern pfn_glVideoCaptureStreamParameterdvNV fp_glVideoCaptureStreamParameterdvNV; /* GL_NV_viewport_array */ extern GLboolean GLAD_NV_viewport_array; #define GL_MAX_VIEWPORTS_NV 0x825B #define GL_VIEWPORT_SUBPIXEL_BITS_NV 0x825C #define GL_VIEWPORT_BOUNDS_RANGE_NV 0x825D #define GL_VIEWPORT_INDEX_PROVOKING_VERTEX_NV 0x825F typedef void (APIENTRYP pfn_glViewportArrayvNV) (GLuint, GLsizei, const GLfloat*); extern pfn_glViewportArrayvNV fp_glViewportArrayvNV; typedef void (APIENTRYP pfn_glViewportIndexedfNV) (GLuint, GLfloat, GLfloat, GLfloat, GLfloat); extern pfn_glViewportIndexedfNV fp_glViewportIndexedfNV; typedef void (APIENTRYP pfn_glViewportIndexedfvNV) (GLuint, const GLfloat*); extern pfn_glViewportIndexedfvNV fp_glViewportIndexedfvNV; typedef void (APIENTRYP pfn_glScissorArrayvNV) (GLuint, GLsizei, const GLint*); extern pfn_glScissorArrayvNV fp_glScissorArrayvNV; typedef void (APIENTRYP pfn_glScissorIndexedNV) (GLuint, GLint, GLint, GLsizei, GLsizei); extern pfn_glScissorIndexedNV fp_glScissorIndexedNV; typedef void (APIENTRYP pfn_glScissorIndexedvNV) (GLuint, const GLint*); extern pfn_glScissorIndexedvNV fp_glScissorIndexedvNV; typedef void (APIENTRYP pfn_glDepthRangeArrayfvNV) (GLuint, GLsizei, const GLfloat*); extern pfn_glDepthRangeArrayfvNV fp_glDepthRangeArrayfvNV; typedef void (APIENTRYP pfn_glDepthRangeIndexedfNV) (GLuint, GLfloat, GLfloat); extern pfn_glDepthRangeIndexedfNV fp_glDepthRangeIndexedfNV; typedef void (APIENTRYP pfn_glGetFloati_vNV) (GLenum, GLuint, GLfloat*); extern pfn_glGetFloati_vNV fp_glGetFloati_vNV; typedef void (APIENTRYP pfn_glEnableiNV) (GLenum, GLuint); extern pfn_glEnableiNV fp_glEnableiNV; typedef void (APIENTRYP pfn_glDisableiNV) (GLenum, GLuint); extern pfn_glDisableiNV fp_glDisableiNV; typedef GLboolean (APIENTRYP pfn_glIsEnablediNV) (GLenum, GLuint); extern pfn_glIsEnablediNV fp_glIsEnablediNV; /* GL_NV_viewport_array2 */ extern GLboolean GLAD_NV_viewport_array2; /* GL_NVX_conditional_render */ extern GLboolean GLAD_NVX_conditional_render; typedef void (APIENTRYP pfn_glBeginConditionalRenderNVX) (GLuint); extern pfn_glBeginConditionalRenderNVX fp_glBeginConditionalRenderNVX; typedef void (APIENTRYP pfn_glEndConditionalRenderNVX) (); extern pfn_glEndConditionalRenderNVX fp_glEndConditionalRenderNVX; /* GL_NVX_gpu_memory_info */ extern GLboolean GLAD_NVX_gpu_memory_info; #define GL_GPU_MEMORY_INFO_DEDICATED_VIDMEM_NVX 0x9047 #define GL_GPU_MEMORY_INFO_TOTAL_AVAILABLE_MEMORY_NVX 0x9048 #define GL_GPU_MEMORY_INFO_CURRENT_AVAILABLE_VIDMEM_NVX 0x9049 #define GL_GPU_MEMORY_INFO_EVICTION_COUNT_NVX 0x904A #define GL_GPU_MEMORY_INFO_EVICTED_MEMORY_NVX 0x904B /* GL_OVR_multiview */ extern GLboolean GLAD_OVR_multiview; #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_NUM_VIEWS_OVR 0x9630 #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_BASE_VIEW_INDEX_OVR 0x9632 #define GL_MAX_VIEWS_OVR 0x9631 typedef void (APIENTRYP pfn_glFramebufferTextureMultiviewOVR) (GLenum, GLenum, GLuint, GLint, GLint, GLsizei); extern pfn_glFramebufferTextureMultiviewOVR fp_glFramebufferTextureMultiviewOVR; /* GL_OVR_multiview2 */ extern GLboolean GLAD_OVR_multiview2; /* GL_OVR_multiview_multisampled_render_to_texture */ extern GLboolean GLAD_OVR_multiview_multisampled_render_to_texture; typedef void (APIENTRYP pfn_glFramebufferTextureMultisampleMultiviewOVR) (GLenum, GLenum, GLuint, GLint, GLsizei, GLint, GLsizei); extern pfn_glFramebufferTextureMultisampleMultiviewOVR fp_glFramebufferTextureMultisampleMultiviewOVR; /* GL_QCOM_alpha_test */ extern GLboolean GLAD_QCOM_alpha_test; #define GL_ALPHA_TEST_QCOM 0x0BC0 #define GL_ALPHA_TEST_FUNC_QCOM 0x0BC1 #define GL_ALPHA_TEST_REF_QCOM 0x0BC2 typedef void (APIENTRYP pfn_glAlphaFuncQCOM) (GLenum, GLclampf); extern pfn_glAlphaFuncQCOM fp_glAlphaFuncQCOM; /* GL_QCOM_binning_control */ extern GLboolean GLAD_QCOM_binning_control; #define GL_BINNING_CONTROL_HINT_QCOM 0x8FB0 #define GL_CPU_OPTIMIZED_QCOM 0x8FB1 #define GL_GPU_OPTIMIZED_QCOM 0x8FB2 #define GL_RENDER_DIRECT_TO_FRAMEBUFFER_QCOM 0x8FB3 /* GL_QCOM_driver_control */ extern GLboolean GLAD_QCOM_driver_control; typedef void (APIENTRYP pfn_glGetDriverControlsQCOM) (GLint*, GLsizei, GLuint*); extern pfn_glGetDriverControlsQCOM fp_glGetDriverControlsQCOM; typedef void (APIENTRYP pfn_glGetDriverControlStringQCOM) (GLuint, GLsizei, GLsizei*, GLchar*); extern pfn_glGetDriverControlStringQCOM fp_glGetDriverControlStringQCOM; typedef void (APIENTRYP pfn_glEnableDriverControlQCOM) (GLuint); extern pfn_glEnableDriverControlQCOM fp_glEnableDriverControlQCOM; typedef void (APIENTRYP pfn_glDisableDriverControlQCOM) (GLuint); extern pfn_glDisableDriverControlQCOM fp_glDisableDriverControlQCOM; /* GL_QCOM_extended_get */ extern GLboolean GLAD_QCOM_extended_get; #define GL_TEXTURE_WIDTH_QCOM 0x8BD2 #define GL_TEXTURE_HEIGHT_QCOM 0x8BD3 #define GL_TEXTURE_DEPTH_QCOM 0x8BD4 #define GL_TEXTURE_INTERNAL_FORMAT_QCOM 0x8BD5 #define GL_TEXTURE_FORMAT_QCOM 0x8BD6 #define GL_TEXTURE_TYPE_QCOM 0x8BD7 #define GL_TEXTURE_IMAGE_VALID_QCOM 0x8BD8 #define GL_TEXTURE_NUM_LEVELS_QCOM 0x8BD9 #define GL_TEXTURE_TARGET_QCOM 0x8BDA #define GL_TEXTURE_OBJECT_VALID_QCOM 0x8BDB #define GL_STATE_RESTORE 0x8BDC typedef void (APIENTRYP pfn_glExtGetTexturesQCOM) (GLuint*, GLint, GLint*); extern pfn_glExtGetTexturesQCOM fp_glExtGetTexturesQCOM; typedef void (APIENTRYP pfn_glExtGetBuffersQCOM) (GLuint*, GLint, GLint*); extern pfn_glExtGetBuffersQCOM fp_glExtGetBuffersQCOM; typedef void (APIENTRYP pfn_glExtGetRenderbuffersQCOM) (GLuint*, GLint, GLint*); extern pfn_glExtGetRenderbuffersQCOM fp_glExtGetRenderbuffersQCOM; typedef void (APIENTRYP pfn_glExtGetFramebuffersQCOM) (GLuint*, GLint, GLint*); extern pfn_glExtGetFramebuffersQCOM fp_glExtGetFramebuffersQCOM; typedef void (APIENTRYP pfn_glExtGetTexLevelParameterivQCOM) (GLuint, GLenum, GLint, GLenum, GLint*); extern pfn_glExtGetTexLevelParameterivQCOM fp_glExtGetTexLevelParameterivQCOM; typedef void (APIENTRYP pfn_glExtTexObjectStateOverrideiQCOM) (GLenum, GLenum, GLint); extern pfn_glExtTexObjectStateOverrideiQCOM fp_glExtTexObjectStateOverrideiQCOM; typedef void (APIENTRYP pfn_glExtGetTexSubImageQCOM) (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, void*); extern pfn_glExtGetTexSubImageQCOM fp_glExtGetTexSubImageQCOM; typedef void (APIENTRYP pfn_glExtGetBufferPointervQCOM) (GLenum, void**); extern pfn_glExtGetBufferPointervQCOM fp_glExtGetBufferPointervQCOM; /* GL_QCOM_extended_get2 */ extern GLboolean GLAD_QCOM_extended_get2; typedef void (APIENTRYP pfn_glExtGetShadersQCOM) (GLuint*, GLint, GLint*); extern pfn_glExtGetShadersQCOM fp_glExtGetShadersQCOM; typedef void (APIENTRYP pfn_glExtGetProgramsQCOM) (GLuint*, GLint, GLint*); extern pfn_glExtGetProgramsQCOM fp_glExtGetProgramsQCOM; typedef GLboolean (APIENTRYP pfn_glExtIsProgramBinaryQCOM) (GLuint); extern pfn_glExtIsProgramBinaryQCOM fp_glExtIsProgramBinaryQCOM; typedef void (APIENTRYP pfn_glExtGetProgramBinarySourceQCOM) (GLuint, GLenum, GLchar*, GLint*); extern pfn_glExtGetProgramBinarySourceQCOM fp_glExtGetProgramBinarySourceQCOM; /* GL_QCOM_perfmon_global_mode */ extern GLboolean GLAD_QCOM_perfmon_global_mode; #define GL_PERFMON_GLOBAL_MODE_QCOM 0x8FA0 /* GL_QCOM_tiled_rendering */ extern GLboolean GLAD_QCOM_tiled_rendering; #define GL_COLOR_BUFFER_BIT0_QCOM 0x00000001 #define GL_COLOR_BUFFER_BIT1_QCOM 0x00000002 #define GL_COLOR_BUFFER_BIT2_QCOM 0x00000004 #define GL_COLOR_BUFFER_BIT3_QCOM 0x00000008 #define GL_COLOR_BUFFER_BIT4_QCOM 0x00000010 #define GL_COLOR_BUFFER_BIT5_QCOM 0x00000020 #define GL_COLOR_BUFFER_BIT6_QCOM 0x00000040 #define GL_COLOR_BUFFER_BIT7_QCOM 0x00000080 #define GL_DEPTH_BUFFER_BIT0_QCOM 0x00000100 #define GL_DEPTH_BUFFER_BIT1_QCOM 0x00000200 #define GL_DEPTH_BUFFER_BIT2_QCOM 0x00000400 #define GL_DEPTH_BUFFER_BIT3_QCOM 0x00000800 #define GL_DEPTH_BUFFER_BIT4_QCOM 0x00001000 #define GL_DEPTH_BUFFER_BIT5_QCOM 0x00002000 #define GL_DEPTH_BUFFER_BIT6_QCOM 0x00004000 #define GL_DEPTH_BUFFER_BIT7_QCOM 0x00008000 #define GL_STENCIL_BUFFER_BIT0_QCOM 0x00010000 #define GL_STENCIL_BUFFER_BIT1_QCOM 0x00020000 #define GL_STENCIL_BUFFER_BIT2_QCOM 0x00040000 #define GL_STENCIL_BUFFER_BIT3_QCOM 0x00080000 #define GL_STENCIL_BUFFER_BIT4_QCOM 0x00100000 #define GL_STENCIL_BUFFER_BIT5_QCOM 0x00200000 #define GL_STENCIL_BUFFER_BIT6_QCOM 0x00400000 #define GL_STENCIL_BUFFER_BIT7_QCOM 0x00800000 #define GL_MULTISAMPLE_BUFFER_BIT0_QCOM 0x01000000 #define GL_MULTISAMPLE_BUFFER_BIT1_QCOM 0x02000000 #define GL_MULTISAMPLE_BUFFER_BIT2_QCOM 0x04000000 #define GL_MULTISAMPLE_BUFFER_BIT3_QCOM 0x08000000 #define GL_MULTISAMPLE_BUFFER_BIT4_QCOM 0x10000000 #define GL_MULTISAMPLE_BUFFER_BIT5_QCOM 0x20000000 #define GL_MULTISAMPLE_BUFFER_BIT6_QCOM 0x40000000 #define GL_MULTISAMPLE_BUFFER_BIT7_QCOM 0x80000000 typedef void (APIENTRYP pfn_glStartTilingQCOM) (GLuint, GLuint, GLuint, GLuint, GLbitfield); extern pfn_glStartTilingQCOM fp_glStartTilingQCOM; typedef void (APIENTRYP pfn_glEndTilingQCOM) (GLbitfield); extern pfn_glEndTilingQCOM fp_glEndTilingQCOM; /* GL_QCOM_writeonly_rendering */ extern GLboolean GLAD_QCOM_writeonly_rendering; #define GL_WRITEONLY_RENDERING_QCOM 0x8823 /* GL_VIV_shader_binary */ extern GLboolean GLAD_VIV_shader_binary; #define GL_SHADER_BINARY_VIV 0x8FC4 } /* namespace glad */ #endif /* __glad_hpp_ */ ================================================ FILE: src/libraries/glad/gladfuncs.hpp ================================================ /** * The MIT License (MIT) * * Copyright (c) 2013 David Herberth, modified by Sasha Szpakowski * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in * the Software without restriction, including without limitation the rights to * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of * the Software, and to permit persons to whom the Software is furnished to do so, * subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **/ #ifndef __glad_funcs_hpp_ #define __glad_funcs_hpp_ #include "glad.hpp" namespace glad { /* GL_VERSION_1_0 */ inline void glCullFace(GLenum mode) { fp_glCullFace(mode); } inline void glFrontFace(GLenum mode) { fp_glFrontFace(mode); } inline void glHint(GLenum target, GLenum mode) { fp_glHint(target, mode); } inline void glLineWidth(GLfloat width) { fp_glLineWidth(width); } inline void glPointSize(GLfloat size) { fp_glPointSize(size); } inline void glPolygonMode(GLenum face, GLenum mode) { fp_glPolygonMode(face, mode); } inline void glScissor(GLint x, GLint y, GLsizei width, GLsizei height) { fp_glScissor(x, y, width, height); } inline void glTexParameterf(GLenum target, GLenum pname, GLfloat param) { fp_glTexParameterf(target, pname, param); } inline void glTexParameterfv(GLenum target, GLenum pname, const GLfloat* params) { fp_glTexParameterfv(target, pname, params); } inline void glTexParameteri(GLenum target, GLenum pname, GLint param) { fp_glTexParameteri(target, pname, param); } inline void glTexParameteriv(GLenum target, GLenum pname, const GLint* params) { fp_glTexParameteriv(target, pname, params); } inline void glTexImage1D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void* pixels) { fp_glTexImage1D(target, level, internalformat, width, border, format, type, pixels); } inline void glTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void* pixels) { fp_glTexImage2D(target, level, internalformat, width, height, border, format, type, pixels); } inline void glDrawBuffer(GLenum buf) { fp_glDrawBuffer(buf); } inline void glClear(GLbitfield mask) { fp_glClear(mask); } inline void glClearColor(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) { fp_glClearColor(red, green, blue, alpha); } inline void glClearStencil(GLint s) { fp_glClearStencil(s); } inline void glClearDepth(GLdouble depth) { fp_glClearDepth(depth); } inline void glStencilMask(GLuint mask) { fp_glStencilMask(mask); } inline void glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) { fp_glColorMask(red, green, blue, alpha); } inline void glDepthMask(GLboolean flag) { fp_glDepthMask(flag); } inline void glDisable(GLenum cap) { fp_glDisable(cap); } inline void glEnable(GLenum cap) { fp_glEnable(cap); } inline void glFinish() { fp_glFinish(); } inline void glFlush() { fp_glFlush(); } inline void glBlendFunc(GLenum sfactor, GLenum dfactor) { fp_glBlendFunc(sfactor, dfactor); } inline void glLogicOp(GLenum opcode) { fp_glLogicOp(opcode); } inline void glStencilFunc(GLenum func, GLint ref, GLuint mask) { fp_glStencilFunc(func, ref, mask); } inline void glStencilOp(GLenum fail, GLenum zfail, GLenum zpass) { fp_glStencilOp(fail, zfail, zpass); } inline void glDepthFunc(GLenum func) { fp_glDepthFunc(func); } inline void glPixelStoref(GLenum pname, GLfloat param) { fp_glPixelStoref(pname, param); } inline void glPixelStorei(GLenum pname, GLint param) { fp_glPixelStorei(pname, param); } inline void glReadBuffer(GLenum src) { fp_glReadBuffer(src); } inline void glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void* pixels) { fp_glReadPixels(x, y, width, height, format, type, pixels); } inline void glGetBooleanv(GLenum pname, GLboolean* data) { fp_glGetBooleanv(pname, data); } inline void glGetDoublev(GLenum pname, GLdouble* data) { fp_glGetDoublev(pname, data); } inline GLenum glGetError() { return fp_glGetError(); } inline void glGetFloatv(GLenum pname, GLfloat* data) { fp_glGetFloatv(pname, data); } inline void glGetIntegerv(GLenum pname, GLint* data) { fp_glGetIntegerv(pname, data); } inline const GLubyte* glGetString(GLenum name) { return fp_glGetString(name); } inline void glGetTexImage(GLenum target, GLint level, GLenum format, GLenum type, void* pixels) { fp_glGetTexImage(target, level, format, type, pixels); } inline void glGetTexParameterfv(GLenum target, GLenum pname, GLfloat* params) { fp_glGetTexParameterfv(target, pname, params); } inline void glGetTexParameteriv(GLenum target, GLenum pname, GLint* params) { fp_glGetTexParameteriv(target, pname, params); } inline void glGetTexLevelParameterfv(GLenum target, GLint level, GLenum pname, GLfloat* params) { fp_glGetTexLevelParameterfv(target, level, pname, params); } inline void glGetTexLevelParameteriv(GLenum target, GLint level, GLenum pname, GLint* params) { fp_glGetTexLevelParameteriv(target, level, pname, params); } inline GLboolean glIsEnabled(GLenum cap) { return fp_glIsEnabled(cap); } inline void glDepthRange(GLdouble near, GLdouble far) { fp_glDepthRange(near, far); } inline void glViewport(GLint x, GLint y, GLsizei width, GLsizei height) { fp_glViewport(x, y, width, height); } inline void glNewList(GLuint list, GLenum mode) { fp_glNewList(list, mode); } inline void glEndList() { fp_glEndList(); } inline void glCallList(GLuint list) { fp_glCallList(list); } inline void glCallLists(GLsizei n, GLenum type, const void* lists) { fp_glCallLists(n, type, lists); } inline void glDeleteLists(GLuint list, GLsizei range) { fp_glDeleteLists(list, range); } inline GLuint glGenLists(GLsizei range) { return fp_glGenLists(range); } inline void glListBase(GLuint base) { fp_glListBase(base); } inline void glBegin(GLenum mode) { fp_glBegin(mode); } inline void glBitmap(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte* bitmap) { fp_glBitmap(width, height, xorig, yorig, xmove, ymove, bitmap); } inline void glColor3b(GLbyte red, GLbyte green, GLbyte blue) { fp_glColor3b(red, green, blue); } inline void glColor3bv(const GLbyte* v) { fp_glColor3bv(v); } inline void glColor3d(GLdouble red, GLdouble green, GLdouble blue) { fp_glColor3d(red, green, blue); } inline void glColor3dv(const GLdouble* v) { fp_glColor3dv(v); } inline void glColor3f(GLfloat red, GLfloat green, GLfloat blue) { fp_glColor3f(red, green, blue); } inline void glColor3fv(const GLfloat* v) { fp_glColor3fv(v); } inline void glColor3i(GLint red, GLint green, GLint blue) { fp_glColor3i(red, green, blue); } inline void glColor3iv(const GLint* v) { fp_glColor3iv(v); } inline void glColor3s(GLshort red, GLshort green, GLshort blue) { fp_glColor3s(red, green, blue); } inline void glColor3sv(const GLshort* v) { fp_glColor3sv(v); } inline void glColor3ub(GLubyte red, GLubyte green, GLubyte blue) { fp_glColor3ub(red, green, blue); } inline void glColor3ubv(const GLubyte* v) { fp_glColor3ubv(v); } inline void glColor3ui(GLuint red, GLuint green, GLuint blue) { fp_glColor3ui(red, green, blue); } inline void glColor3uiv(const GLuint* v) { fp_glColor3uiv(v); } inline void glColor3us(GLushort red, GLushort green, GLushort blue) { fp_glColor3us(red, green, blue); } inline void glColor3usv(const GLushort* v) { fp_glColor3usv(v); } inline void glColor4b(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha) { fp_glColor4b(red, green, blue, alpha); } inline void glColor4bv(const GLbyte* v) { fp_glColor4bv(v); } inline void glColor4d(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha) { fp_glColor4d(red, green, blue, alpha); } inline void glColor4dv(const GLdouble* v) { fp_glColor4dv(v); } inline void glColor4f(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) { fp_glColor4f(red, green, blue, alpha); } inline void glColor4fv(const GLfloat* v) { fp_glColor4fv(v); } inline void glColor4i(GLint red, GLint green, GLint blue, GLint alpha) { fp_glColor4i(red, green, blue, alpha); } inline void glColor4iv(const GLint* v) { fp_glColor4iv(v); } inline void glColor4s(GLshort red, GLshort green, GLshort blue, GLshort alpha) { fp_glColor4s(red, green, blue, alpha); } inline void glColor4sv(const GLshort* v) { fp_glColor4sv(v); } inline void glColor4ub(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha) { fp_glColor4ub(red, green, blue, alpha); } inline void glColor4ubv(const GLubyte* v) { fp_glColor4ubv(v); } inline void glColor4ui(GLuint red, GLuint green, GLuint blue, GLuint alpha) { fp_glColor4ui(red, green, blue, alpha); } inline void glColor4uiv(const GLuint* v) { fp_glColor4uiv(v); } inline void glColor4us(GLushort red, GLushort green, GLushort blue, GLushort alpha) { fp_glColor4us(red, green, blue, alpha); } inline void glColor4usv(const GLushort* v) { fp_glColor4usv(v); } inline void glEdgeFlag(GLboolean flag) { fp_glEdgeFlag(flag); } inline void glEdgeFlagv(const GLboolean* flag) { fp_glEdgeFlagv(flag); } inline void glEnd() { fp_glEnd(); } inline void glIndexd(GLdouble c) { fp_glIndexd(c); } inline void glIndexdv(const GLdouble* c) { fp_glIndexdv(c); } inline void glIndexf(GLfloat c) { fp_glIndexf(c); } inline void glIndexfv(const GLfloat* c) { fp_glIndexfv(c); } inline void glIndexi(GLint c) { fp_glIndexi(c); } inline void glIndexiv(const GLint* c) { fp_glIndexiv(c); } inline void glIndexs(GLshort c) { fp_glIndexs(c); } inline void glIndexsv(const GLshort* c) { fp_glIndexsv(c); } inline void glNormal3b(GLbyte nx, GLbyte ny, GLbyte nz) { fp_glNormal3b(nx, ny, nz); } inline void glNormal3bv(const GLbyte* v) { fp_glNormal3bv(v); } inline void glNormal3d(GLdouble nx, GLdouble ny, GLdouble nz) { fp_glNormal3d(nx, ny, nz); } inline void glNormal3dv(const GLdouble* v) { fp_glNormal3dv(v); } inline void glNormal3f(GLfloat nx, GLfloat ny, GLfloat nz) { fp_glNormal3f(nx, ny, nz); } inline void glNormal3fv(const GLfloat* v) { fp_glNormal3fv(v); } inline void glNormal3i(GLint nx, GLint ny, GLint nz) { fp_glNormal3i(nx, ny, nz); } inline void glNormal3iv(const GLint* v) { fp_glNormal3iv(v); } inline void glNormal3s(GLshort nx, GLshort ny, GLshort nz) { fp_glNormal3s(nx, ny, nz); } inline void glNormal3sv(const GLshort* v) { fp_glNormal3sv(v); } inline void glRasterPos2d(GLdouble x, GLdouble y) { fp_glRasterPos2d(x, y); } inline void glRasterPos2dv(const GLdouble* v) { fp_glRasterPos2dv(v); } inline void glRasterPos2f(GLfloat x, GLfloat y) { fp_glRasterPos2f(x, y); } inline void glRasterPos2fv(const GLfloat* v) { fp_glRasterPos2fv(v); } inline void glRasterPos2i(GLint x, GLint y) { fp_glRasterPos2i(x, y); } inline void glRasterPos2iv(const GLint* v) { fp_glRasterPos2iv(v); } inline void glRasterPos2s(GLshort x, GLshort y) { fp_glRasterPos2s(x, y); } inline void glRasterPos2sv(const GLshort* v) { fp_glRasterPos2sv(v); } inline void glRasterPos3d(GLdouble x, GLdouble y, GLdouble z) { fp_glRasterPos3d(x, y, z); } inline void glRasterPos3dv(const GLdouble* v) { fp_glRasterPos3dv(v); } inline void glRasterPos3f(GLfloat x, GLfloat y, GLfloat z) { fp_glRasterPos3f(x, y, z); } inline void glRasterPos3fv(const GLfloat* v) { fp_glRasterPos3fv(v); } inline void glRasterPos3i(GLint x, GLint y, GLint z) { fp_glRasterPos3i(x, y, z); } inline void glRasterPos3iv(const GLint* v) { fp_glRasterPos3iv(v); } inline void glRasterPos3s(GLshort x, GLshort y, GLshort z) { fp_glRasterPos3s(x, y, z); } inline void glRasterPos3sv(const GLshort* v) { fp_glRasterPos3sv(v); } inline void glRasterPos4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w) { fp_glRasterPos4d(x, y, z, w); } inline void glRasterPos4dv(const GLdouble* v) { fp_glRasterPos4dv(v); } inline void glRasterPos4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w) { fp_glRasterPos4f(x, y, z, w); } inline void glRasterPos4fv(const GLfloat* v) { fp_glRasterPos4fv(v); } inline void glRasterPos4i(GLint x, GLint y, GLint z, GLint w) { fp_glRasterPos4i(x, y, z, w); } inline void glRasterPos4iv(const GLint* v) { fp_glRasterPos4iv(v); } inline void glRasterPos4s(GLshort x, GLshort y, GLshort z, GLshort w) { fp_glRasterPos4s(x, y, z, w); } inline void glRasterPos4sv(const GLshort* v) { fp_glRasterPos4sv(v); } inline void glRectd(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2) { fp_glRectd(x1, y1, x2, y2); } inline void glRectdv(const GLdouble* v1, const GLdouble* v2) { fp_glRectdv(v1, v2); } inline void glRectf(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2) { fp_glRectf(x1, y1, x2, y2); } inline void glRectfv(const GLfloat* v1, const GLfloat* v2) { fp_glRectfv(v1, v2); } inline void glRecti(GLint x1, GLint y1, GLint x2, GLint y2) { fp_glRecti(x1, y1, x2, y2); } inline void glRectiv(const GLint* v1, const GLint* v2) { fp_glRectiv(v1, v2); } inline void glRects(GLshort x1, GLshort y1, GLshort x2, GLshort y2) { fp_glRects(x1, y1, x2, y2); } inline void glRectsv(const GLshort* v1, const GLshort* v2) { fp_glRectsv(v1, v2); } inline void glTexCoord1d(GLdouble s) { fp_glTexCoord1d(s); } inline void glTexCoord1dv(const GLdouble* v) { fp_glTexCoord1dv(v); } inline void glTexCoord1f(GLfloat s) { fp_glTexCoord1f(s); } inline void glTexCoord1fv(const GLfloat* v) { fp_glTexCoord1fv(v); } inline void glTexCoord1i(GLint s) { fp_glTexCoord1i(s); } inline void glTexCoord1iv(const GLint* v) { fp_glTexCoord1iv(v); } inline void glTexCoord1s(GLshort s) { fp_glTexCoord1s(s); } inline void glTexCoord1sv(const GLshort* v) { fp_glTexCoord1sv(v); } inline void glTexCoord2d(GLdouble s, GLdouble t) { fp_glTexCoord2d(s, t); } inline void glTexCoord2dv(const GLdouble* v) { fp_glTexCoord2dv(v); } inline void glTexCoord2f(GLfloat s, GLfloat t) { fp_glTexCoord2f(s, t); } inline void glTexCoord2fv(const GLfloat* v) { fp_glTexCoord2fv(v); } inline void glTexCoord2i(GLint s, GLint t) { fp_glTexCoord2i(s, t); } inline void glTexCoord2iv(const GLint* v) { fp_glTexCoord2iv(v); } inline void glTexCoord2s(GLshort s, GLshort t) { fp_glTexCoord2s(s, t); } inline void glTexCoord2sv(const GLshort* v) { fp_glTexCoord2sv(v); } inline void glTexCoord3d(GLdouble s, GLdouble t, GLdouble r) { fp_glTexCoord3d(s, t, r); } inline void glTexCoord3dv(const GLdouble* v) { fp_glTexCoord3dv(v); } inline void glTexCoord3f(GLfloat s, GLfloat t, GLfloat r) { fp_glTexCoord3f(s, t, r); } inline void glTexCoord3fv(const GLfloat* v) { fp_glTexCoord3fv(v); } inline void glTexCoord3i(GLint s, GLint t, GLint r) { fp_glTexCoord3i(s, t, r); } inline void glTexCoord3iv(const GLint* v) { fp_glTexCoord3iv(v); } inline void glTexCoord3s(GLshort s, GLshort t, GLshort r) { fp_glTexCoord3s(s, t, r); } inline void glTexCoord3sv(const GLshort* v) { fp_glTexCoord3sv(v); } inline void glTexCoord4d(GLdouble s, GLdouble t, GLdouble r, GLdouble q) { fp_glTexCoord4d(s, t, r, q); } inline void glTexCoord4dv(const GLdouble* v) { fp_glTexCoord4dv(v); } inline void glTexCoord4f(GLfloat s, GLfloat t, GLfloat r, GLfloat q) { fp_glTexCoord4f(s, t, r, q); } inline void glTexCoord4fv(const GLfloat* v) { fp_glTexCoord4fv(v); } inline void glTexCoord4i(GLint s, GLint t, GLint r, GLint q) { fp_glTexCoord4i(s, t, r, q); } inline void glTexCoord4iv(const GLint* v) { fp_glTexCoord4iv(v); } inline void glTexCoord4s(GLshort s, GLshort t, GLshort r, GLshort q) { fp_glTexCoord4s(s, t, r, q); } inline void glTexCoord4sv(const GLshort* v) { fp_glTexCoord4sv(v); } inline void glVertex2d(GLdouble x, GLdouble y) { fp_glVertex2d(x, y); } inline void glVertex2dv(const GLdouble* v) { fp_glVertex2dv(v); } inline void glVertex2f(GLfloat x, GLfloat y) { fp_glVertex2f(x, y); } inline void glVertex2fv(const GLfloat* v) { fp_glVertex2fv(v); } inline void glVertex2i(GLint x, GLint y) { fp_glVertex2i(x, y); } inline void glVertex2iv(const GLint* v) { fp_glVertex2iv(v); } inline void glVertex2s(GLshort x, GLshort y) { fp_glVertex2s(x, y); } inline void glVertex2sv(const GLshort* v) { fp_glVertex2sv(v); } inline void glVertex3d(GLdouble x, GLdouble y, GLdouble z) { fp_glVertex3d(x, y, z); } inline void glVertex3dv(const GLdouble* v) { fp_glVertex3dv(v); } inline void glVertex3f(GLfloat x, GLfloat y, GLfloat z) { fp_glVertex3f(x, y, z); } inline void glVertex3fv(const GLfloat* v) { fp_glVertex3fv(v); } inline void glVertex3i(GLint x, GLint y, GLint z) { fp_glVertex3i(x, y, z); } inline void glVertex3iv(const GLint* v) { fp_glVertex3iv(v); } inline void glVertex3s(GLshort x, GLshort y, GLshort z) { fp_glVertex3s(x, y, z); } inline void glVertex3sv(const GLshort* v) { fp_glVertex3sv(v); } inline void glVertex4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w) { fp_glVertex4d(x, y, z, w); } inline void glVertex4dv(const GLdouble* v) { fp_glVertex4dv(v); } inline void glVertex4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w) { fp_glVertex4f(x, y, z, w); } inline void glVertex4fv(const GLfloat* v) { fp_glVertex4fv(v); } inline void glVertex4i(GLint x, GLint y, GLint z, GLint w) { fp_glVertex4i(x, y, z, w); } inline void glVertex4iv(const GLint* v) { fp_glVertex4iv(v); } inline void glVertex4s(GLshort x, GLshort y, GLshort z, GLshort w) { fp_glVertex4s(x, y, z, w); } inline void glVertex4sv(const GLshort* v) { fp_glVertex4sv(v); } inline void glClipPlane(GLenum plane, const GLdouble* equation) { fp_glClipPlane(plane, equation); } inline void glColorMaterial(GLenum face, GLenum mode) { fp_glColorMaterial(face, mode); } inline void glFogf(GLenum pname, GLfloat param) { fp_glFogf(pname, param); } inline void glFogfv(GLenum pname, const GLfloat* params) { fp_glFogfv(pname, params); } inline void glFogi(GLenum pname, GLint param) { fp_glFogi(pname, param); } inline void glFogiv(GLenum pname, const GLint* params) { fp_glFogiv(pname, params); } inline void glLightf(GLenum light, GLenum pname, GLfloat param) { fp_glLightf(light, pname, param); } inline void glLightfv(GLenum light, GLenum pname, const GLfloat* params) { fp_glLightfv(light, pname, params); } inline void glLighti(GLenum light, GLenum pname, GLint param) { fp_glLighti(light, pname, param); } inline void glLightiv(GLenum light, GLenum pname, const GLint* params) { fp_glLightiv(light, pname, params); } inline void glLightModelf(GLenum pname, GLfloat param) { fp_glLightModelf(pname, param); } inline void glLightModelfv(GLenum pname, const GLfloat* params) { fp_glLightModelfv(pname, params); } inline void glLightModeli(GLenum pname, GLint param) { fp_glLightModeli(pname, param); } inline void glLightModeliv(GLenum pname, const GLint* params) { fp_glLightModeliv(pname, params); } inline void glLineStipple(GLint factor, GLushort pattern) { fp_glLineStipple(factor, pattern); } inline void glMaterialf(GLenum face, GLenum pname, GLfloat param) { fp_glMaterialf(face, pname, param); } inline void glMaterialfv(GLenum face, GLenum pname, const GLfloat* params) { fp_glMaterialfv(face, pname, params); } inline void glMateriali(GLenum face, GLenum pname, GLint param) { fp_glMateriali(face, pname, param); } inline void glMaterialiv(GLenum face, GLenum pname, const GLint* params) { fp_glMaterialiv(face, pname, params); } inline void glPolygonStipple(const GLubyte* mask) { fp_glPolygonStipple(mask); } inline void glShadeModel(GLenum mode) { fp_glShadeModel(mode); } inline void glTexEnvf(GLenum target, GLenum pname, GLfloat param) { fp_glTexEnvf(target, pname, param); } inline void glTexEnvfv(GLenum target, GLenum pname, const GLfloat* params) { fp_glTexEnvfv(target, pname, params); } inline void glTexEnvi(GLenum target, GLenum pname, GLint param) { fp_glTexEnvi(target, pname, param); } inline void glTexEnviv(GLenum target, GLenum pname, const GLint* params) { fp_glTexEnviv(target, pname, params); } inline void glTexGend(GLenum coord, GLenum pname, GLdouble param) { fp_glTexGend(coord, pname, param); } inline void glTexGendv(GLenum coord, GLenum pname, const GLdouble* params) { fp_glTexGendv(coord, pname, params); } inline void glTexGenf(GLenum coord, GLenum pname, GLfloat param) { fp_glTexGenf(coord, pname, param); } inline void glTexGenfv(GLenum coord, GLenum pname, const GLfloat* params) { fp_glTexGenfv(coord, pname, params); } inline void glTexGeni(GLenum coord, GLenum pname, GLint param) { fp_glTexGeni(coord, pname, param); } inline void glTexGeniv(GLenum coord, GLenum pname, const GLint* params) { fp_glTexGeniv(coord, pname, params); } inline void glFeedbackBuffer(GLsizei size, GLenum type, GLfloat* buffer) { fp_glFeedbackBuffer(size, type, buffer); } inline void glSelectBuffer(GLsizei size, GLuint* buffer) { fp_glSelectBuffer(size, buffer); } inline GLint glRenderMode(GLenum mode) { return fp_glRenderMode(mode); } inline void glInitNames() { fp_glInitNames(); } inline void glLoadName(GLuint name) { fp_glLoadName(name); } inline void glPassThrough(GLfloat token) { fp_glPassThrough(token); } inline void glPopName() { fp_glPopName(); } inline void glPushName(GLuint name) { fp_glPushName(name); } inline void glClearAccum(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) { fp_glClearAccum(red, green, blue, alpha); } inline void glClearIndex(GLfloat c) { fp_glClearIndex(c); } inline void glIndexMask(GLuint mask) { fp_glIndexMask(mask); } inline void glAccum(GLenum op, GLfloat value) { fp_glAccum(op, value); } inline void glPopAttrib() { fp_glPopAttrib(); } inline void glPushAttrib(GLbitfield mask) { fp_glPushAttrib(mask); } inline void glMap1d(GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble* points) { fp_glMap1d(target, u1, u2, stride, order, points); } inline void glMap1f(GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat* points) { fp_glMap1f(target, u1, u2, stride, order, points); } inline void glMap2d(GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble* points) { fp_glMap2d(target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points); } inline void glMap2f(GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat* points) { fp_glMap2f(target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points); } inline void glMapGrid1d(GLint un, GLdouble u1, GLdouble u2) { fp_glMapGrid1d(un, u1, u2); } inline void glMapGrid1f(GLint un, GLfloat u1, GLfloat u2) { fp_glMapGrid1f(un, u1, u2); } inline void glMapGrid2d(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2) { fp_glMapGrid2d(un, u1, u2, vn, v1, v2); } inline void glMapGrid2f(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2) { fp_glMapGrid2f(un, u1, u2, vn, v1, v2); } inline void glEvalCoord1d(GLdouble u) { fp_glEvalCoord1d(u); } inline void glEvalCoord1dv(const GLdouble* u) { fp_glEvalCoord1dv(u); } inline void glEvalCoord1f(GLfloat u) { fp_glEvalCoord1f(u); } inline void glEvalCoord1fv(const GLfloat* u) { fp_glEvalCoord1fv(u); } inline void glEvalCoord2d(GLdouble u, GLdouble v) { fp_glEvalCoord2d(u, v); } inline void glEvalCoord2dv(const GLdouble* u) { fp_glEvalCoord2dv(u); } inline void glEvalCoord2f(GLfloat u, GLfloat v) { fp_glEvalCoord2f(u, v); } inline void glEvalCoord2fv(const GLfloat* u) { fp_glEvalCoord2fv(u); } inline void glEvalMesh1(GLenum mode, GLint i1, GLint i2) { fp_glEvalMesh1(mode, i1, i2); } inline void glEvalPoint1(GLint i) { fp_glEvalPoint1(i); } inline void glEvalMesh2(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2) { fp_glEvalMesh2(mode, i1, i2, j1, j2); } inline void glEvalPoint2(GLint i, GLint j) { fp_glEvalPoint2(i, j); } inline void glAlphaFunc(GLenum func, GLfloat ref) { fp_glAlphaFunc(func, ref); } inline void glPixelZoom(GLfloat xfactor, GLfloat yfactor) { fp_glPixelZoom(xfactor, yfactor); } inline void glPixelTransferf(GLenum pname, GLfloat param) { fp_glPixelTransferf(pname, param); } inline void glPixelTransferi(GLenum pname, GLint param) { fp_glPixelTransferi(pname, param); } inline void glPixelMapfv(GLenum map, GLsizei mapsize, const GLfloat* values) { fp_glPixelMapfv(map, mapsize, values); } inline void glPixelMapuiv(GLenum map, GLsizei mapsize, const GLuint* values) { fp_glPixelMapuiv(map, mapsize, values); } inline void glPixelMapusv(GLenum map, GLsizei mapsize, const GLushort* values) { fp_glPixelMapusv(map, mapsize, values); } inline void glCopyPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type) { fp_glCopyPixels(x, y, width, height, type); } inline void glDrawPixels(GLsizei width, GLsizei height, GLenum format, GLenum type, const void* pixels) { fp_glDrawPixels(width, height, format, type, pixels); } inline void glGetClipPlane(GLenum plane, GLdouble* equation) { fp_glGetClipPlane(plane, equation); } inline void glGetLightfv(GLenum light, GLenum pname, GLfloat* params) { fp_glGetLightfv(light, pname, params); } inline void glGetLightiv(GLenum light, GLenum pname, GLint* params) { fp_glGetLightiv(light, pname, params); } inline void glGetMapdv(GLenum target, GLenum query, GLdouble* v) { fp_glGetMapdv(target, query, v); } inline void glGetMapfv(GLenum target, GLenum query, GLfloat* v) { fp_glGetMapfv(target, query, v); } inline void glGetMapiv(GLenum target, GLenum query, GLint* v) { fp_glGetMapiv(target, query, v); } inline void glGetMaterialfv(GLenum face, GLenum pname, GLfloat* params) { fp_glGetMaterialfv(face, pname, params); } inline void glGetMaterialiv(GLenum face, GLenum pname, GLint* params) { fp_glGetMaterialiv(face, pname, params); } inline void glGetPixelMapfv(GLenum map, GLfloat* values) { fp_glGetPixelMapfv(map, values); } inline void glGetPixelMapuiv(GLenum map, GLuint* values) { fp_glGetPixelMapuiv(map, values); } inline void glGetPixelMapusv(GLenum map, GLushort* values) { fp_glGetPixelMapusv(map, values); } inline void glGetPolygonStipple(GLubyte* mask) { fp_glGetPolygonStipple(mask); } inline void glGetTexEnvfv(GLenum target, GLenum pname, GLfloat* params) { fp_glGetTexEnvfv(target, pname, params); } inline void glGetTexEnviv(GLenum target, GLenum pname, GLint* params) { fp_glGetTexEnviv(target, pname, params); } inline void glGetTexGendv(GLenum coord, GLenum pname, GLdouble* params) { fp_glGetTexGendv(coord, pname, params); } inline void glGetTexGenfv(GLenum coord, GLenum pname, GLfloat* params) { fp_glGetTexGenfv(coord, pname, params); } inline void glGetTexGeniv(GLenum coord, GLenum pname, GLint* params) { fp_glGetTexGeniv(coord, pname, params); } inline GLboolean glIsList(GLuint list) { return fp_glIsList(list); } inline void glFrustum(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar) { fp_glFrustum(left, right, bottom, top, zNear, zFar); } inline void glLoadIdentity() { fp_glLoadIdentity(); } inline void glLoadMatrixf(const GLfloat* m) { fp_glLoadMatrixf(m); } inline void glLoadMatrixd(const GLdouble* m) { fp_glLoadMatrixd(m); } inline void glMatrixMode(GLenum mode) { fp_glMatrixMode(mode); } inline void glMultMatrixf(const GLfloat* m) { fp_glMultMatrixf(m); } inline void glMultMatrixd(const GLdouble* m) { fp_glMultMatrixd(m); } inline void glOrtho(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar) { fp_glOrtho(left, right, bottom, top, zNear, zFar); } inline void glPopMatrix() { fp_glPopMatrix(); } inline void glPushMatrix() { fp_glPushMatrix(); } inline void glRotated(GLdouble angle, GLdouble x, GLdouble y, GLdouble z) { fp_glRotated(angle, x, y, z); } inline void glRotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z) { fp_glRotatef(angle, x, y, z); } inline void glScaled(GLdouble x, GLdouble y, GLdouble z) { fp_glScaled(x, y, z); } inline void glScalef(GLfloat x, GLfloat y, GLfloat z) { fp_glScalef(x, y, z); } inline void glTranslated(GLdouble x, GLdouble y, GLdouble z) { fp_glTranslated(x, y, z); } inline void glTranslatef(GLfloat x, GLfloat y, GLfloat z) { fp_glTranslatef(x, y, z); } /* GL_VERSION_1_1 */ inline void glDrawArrays(GLenum mode, GLint first, GLsizei count) { fp_glDrawArrays(mode, first, count); } inline void glDrawElements(GLenum mode, GLsizei count, GLenum type, const void* indices) { fp_glDrawElements(mode, count, type, indices); } inline void glGetPointerv(GLenum pname, void** params) { fp_glGetPointerv(pname, params); } inline void glPolygonOffset(GLfloat factor, GLfloat units) { fp_glPolygonOffset(factor, units); } inline void glCopyTexImage1D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border) { fp_glCopyTexImage1D(target, level, internalformat, x, y, width, border); } inline void glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) { fp_glCopyTexImage2D(target, level, internalformat, x, y, width, height, border); } inline void glCopyTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width) { fp_glCopyTexSubImage1D(target, level, xoffset, x, y, width); } inline void glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) { fp_glCopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height); } inline void glTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void* pixels) { fp_glTexSubImage1D(target, level, xoffset, width, format, type, pixels); } inline void glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void* pixels) { fp_glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels); } inline void glBindTexture(GLenum target, GLuint texture) { fp_glBindTexture(target, texture); } inline void glDeleteTextures(GLsizei n, const GLuint* textures) { fp_glDeleteTextures(n, textures); } inline void glGenTextures(GLsizei n, GLuint* textures) { fp_glGenTextures(n, textures); } inline GLboolean glIsTexture(GLuint texture) { return fp_glIsTexture(texture); } inline void glArrayElement(GLint i) { fp_glArrayElement(i); } inline void glColorPointer(GLint size, GLenum type, GLsizei stride, const void* pointer) { fp_glColorPointer(size, type, stride, pointer); } inline void glDisableClientState(GLenum array) { fp_glDisableClientState(array); } inline void glEdgeFlagPointer(GLsizei stride, const void* pointer) { fp_glEdgeFlagPointer(stride, pointer); } inline void glEnableClientState(GLenum array) { fp_glEnableClientState(array); } inline void glIndexPointer(GLenum type, GLsizei stride, const void* pointer) { fp_glIndexPointer(type, stride, pointer); } inline void glInterleavedArrays(GLenum format, GLsizei stride, const void* pointer) { fp_glInterleavedArrays(format, stride, pointer); } inline void glNormalPointer(GLenum type, GLsizei stride, const void* pointer) { fp_glNormalPointer(type, stride, pointer); } inline void glTexCoordPointer(GLint size, GLenum type, GLsizei stride, const void* pointer) { fp_glTexCoordPointer(size, type, stride, pointer); } inline void glVertexPointer(GLint size, GLenum type, GLsizei stride, const void* pointer) { fp_glVertexPointer(size, type, stride, pointer); } inline GLboolean glAreTexturesResident(GLsizei n, const GLuint* textures, GLboolean* residences) { return fp_glAreTexturesResident(n, textures, residences); } inline void glPrioritizeTextures(GLsizei n, const GLuint* textures, const GLfloat* priorities) { fp_glPrioritizeTextures(n, textures, priorities); } inline void glIndexub(GLubyte c) { fp_glIndexub(c); } inline void glIndexubv(const GLubyte* c) { fp_glIndexubv(c); } inline void glPopClientAttrib() { fp_glPopClientAttrib(); } inline void glPushClientAttrib(GLbitfield mask) { fp_glPushClientAttrib(mask); } /* GL_VERSION_1_2 */ inline void glDrawRangeElements(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void* indices) { fp_glDrawRangeElements(mode, start, end, count, type, indices); } inline void glTexImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void* pixels) { fp_glTexImage3D(target, level, internalformat, width, height, depth, border, format, type, pixels); } inline void glTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void* pixels) { fp_glTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); } inline void glCopyTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height) { fp_glCopyTexSubImage3D(target, level, xoffset, yoffset, zoffset, x, y, width, height); } /* GL_VERSION_1_3 */ inline void glActiveTexture(GLenum texture) { fp_glActiveTexture(texture); } inline void glSampleCoverage(GLfloat value, GLboolean invert) { fp_glSampleCoverage(value, invert); } inline void glCompressedTexImage3D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void* data) { fp_glCompressedTexImage3D(target, level, internalformat, width, height, depth, border, imageSize, data); } inline void glCompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void* data) { fp_glCompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data); } inline void glCompressedTexImage1D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void* data) { fp_glCompressedTexImage1D(target, level, internalformat, width, border, imageSize, data); } inline void glCompressedTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void* data) { fp_glCompressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data); } inline void glCompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void* data) { fp_glCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data); } inline void glCompressedTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void* data) { fp_glCompressedTexSubImage1D(target, level, xoffset, width, format, imageSize, data); } inline void glGetCompressedTexImage(GLenum target, GLint level, void* img) { fp_glGetCompressedTexImage(target, level, img); } inline void glClientActiveTexture(GLenum texture) { fp_glClientActiveTexture(texture); } inline void glMultiTexCoord1d(GLenum target, GLdouble s) { fp_glMultiTexCoord1d(target, s); } inline void glMultiTexCoord1dv(GLenum target, const GLdouble* v) { fp_glMultiTexCoord1dv(target, v); } inline void glMultiTexCoord1f(GLenum target, GLfloat s) { fp_glMultiTexCoord1f(target, s); } inline void glMultiTexCoord1fv(GLenum target, const GLfloat* v) { fp_glMultiTexCoord1fv(target, v); } inline void glMultiTexCoord1i(GLenum target, GLint s) { fp_glMultiTexCoord1i(target, s); } inline void glMultiTexCoord1iv(GLenum target, const GLint* v) { fp_glMultiTexCoord1iv(target, v); } inline void glMultiTexCoord1s(GLenum target, GLshort s) { fp_glMultiTexCoord1s(target, s); } inline void glMultiTexCoord1sv(GLenum target, const GLshort* v) { fp_glMultiTexCoord1sv(target, v); } inline void glMultiTexCoord2d(GLenum target, GLdouble s, GLdouble t) { fp_glMultiTexCoord2d(target, s, t); } inline void glMultiTexCoord2dv(GLenum target, const GLdouble* v) { fp_glMultiTexCoord2dv(target, v); } inline void glMultiTexCoord2f(GLenum target, GLfloat s, GLfloat t) { fp_glMultiTexCoord2f(target, s, t); } inline void glMultiTexCoord2fv(GLenum target, const GLfloat* v) { fp_glMultiTexCoord2fv(target, v); } inline void glMultiTexCoord2i(GLenum target, GLint s, GLint t) { fp_glMultiTexCoord2i(target, s, t); } inline void glMultiTexCoord2iv(GLenum target, const GLint* v) { fp_glMultiTexCoord2iv(target, v); } inline void glMultiTexCoord2s(GLenum target, GLshort s, GLshort t) { fp_glMultiTexCoord2s(target, s, t); } inline void glMultiTexCoord2sv(GLenum target, const GLshort* v) { fp_glMultiTexCoord2sv(target, v); } inline void glMultiTexCoord3d(GLenum target, GLdouble s, GLdouble t, GLdouble r) { fp_glMultiTexCoord3d(target, s, t, r); } inline void glMultiTexCoord3dv(GLenum target, const GLdouble* v) { fp_glMultiTexCoord3dv(target, v); } inline void glMultiTexCoord3f(GLenum target, GLfloat s, GLfloat t, GLfloat r) { fp_glMultiTexCoord3f(target, s, t, r); } inline void glMultiTexCoord3fv(GLenum target, const GLfloat* v) { fp_glMultiTexCoord3fv(target, v); } inline void glMultiTexCoord3i(GLenum target, GLint s, GLint t, GLint r) { fp_glMultiTexCoord3i(target, s, t, r); } inline void glMultiTexCoord3iv(GLenum target, const GLint* v) { fp_glMultiTexCoord3iv(target, v); } inline void glMultiTexCoord3s(GLenum target, GLshort s, GLshort t, GLshort r) { fp_glMultiTexCoord3s(target, s, t, r); } inline void glMultiTexCoord3sv(GLenum target, const GLshort* v) { fp_glMultiTexCoord3sv(target, v); } inline void glMultiTexCoord4d(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q) { fp_glMultiTexCoord4d(target, s, t, r, q); } inline void glMultiTexCoord4dv(GLenum target, const GLdouble* v) { fp_glMultiTexCoord4dv(target, v); } inline void glMultiTexCoord4f(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q) { fp_glMultiTexCoord4f(target, s, t, r, q); } inline void glMultiTexCoord4fv(GLenum target, const GLfloat* v) { fp_glMultiTexCoord4fv(target, v); } inline void glMultiTexCoord4i(GLenum target, GLint s, GLint t, GLint r, GLint q) { fp_glMultiTexCoord4i(target, s, t, r, q); } inline void glMultiTexCoord4iv(GLenum target, const GLint* v) { fp_glMultiTexCoord4iv(target, v); } inline void glMultiTexCoord4s(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q) { fp_glMultiTexCoord4s(target, s, t, r, q); } inline void glMultiTexCoord4sv(GLenum target, const GLshort* v) { fp_glMultiTexCoord4sv(target, v); } inline void glLoadTransposeMatrixf(const GLfloat* m) { fp_glLoadTransposeMatrixf(m); } inline void glLoadTransposeMatrixd(const GLdouble* m) { fp_glLoadTransposeMatrixd(m); } inline void glMultTransposeMatrixf(const GLfloat* m) { fp_glMultTransposeMatrixf(m); } inline void glMultTransposeMatrixd(const GLdouble* m) { fp_glMultTransposeMatrixd(m); } /* GL_VERSION_1_4 */ inline void glBlendFuncSeparate(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha) { fp_glBlendFuncSeparate(sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha); } inline void glMultiDrawArrays(GLenum mode, const GLint* first, const GLsizei* count, GLsizei drawcount) { fp_glMultiDrawArrays(mode, first, count, drawcount); } inline void glMultiDrawElements(GLenum mode, const GLsizei* count, GLenum type, const void** indices, GLsizei drawcount) { fp_glMultiDrawElements(mode, count, type, indices, drawcount); } inline void glPointParameterf(GLenum pname, GLfloat param) { fp_glPointParameterf(pname, param); } inline void glPointParameterfv(GLenum pname, const GLfloat* params) { fp_glPointParameterfv(pname, params); } inline void glPointParameteri(GLenum pname, GLint param) { fp_glPointParameteri(pname, param); } inline void glPointParameteriv(GLenum pname, const GLint* params) { fp_glPointParameteriv(pname, params); } inline void glFogCoordf(GLfloat coord) { fp_glFogCoordf(coord); } inline void glFogCoordfv(const GLfloat* coord) { fp_glFogCoordfv(coord); } inline void glFogCoordd(GLdouble coord) { fp_glFogCoordd(coord); } inline void glFogCoorddv(const GLdouble* coord) { fp_glFogCoorddv(coord); } inline void glFogCoordPointer(GLenum type, GLsizei stride, const void* pointer) { fp_glFogCoordPointer(type, stride, pointer); } inline void glSecondaryColor3b(GLbyte red, GLbyte green, GLbyte blue) { fp_glSecondaryColor3b(red, green, blue); } inline void glSecondaryColor3bv(const GLbyte* v) { fp_glSecondaryColor3bv(v); } inline void glSecondaryColor3d(GLdouble red, GLdouble green, GLdouble blue) { fp_glSecondaryColor3d(red, green, blue); } inline void glSecondaryColor3dv(const GLdouble* v) { fp_glSecondaryColor3dv(v); } inline void glSecondaryColor3f(GLfloat red, GLfloat green, GLfloat blue) { fp_glSecondaryColor3f(red, green, blue); } inline void glSecondaryColor3fv(const GLfloat* v) { fp_glSecondaryColor3fv(v); } inline void glSecondaryColor3i(GLint red, GLint green, GLint blue) { fp_glSecondaryColor3i(red, green, blue); } inline void glSecondaryColor3iv(const GLint* v) { fp_glSecondaryColor3iv(v); } inline void glSecondaryColor3s(GLshort red, GLshort green, GLshort blue) { fp_glSecondaryColor3s(red, green, blue); } inline void glSecondaryColor3sv(const GLshort* v) { fp_glSecondaryColor3sv(v); } inline void glSecondaryColor3ub(GLubyte red, GLubyte green, GLubyte blue) { fp_glSecondaryColor3ub(red, green, blue); } inline void glSecondaryColor3ubv(const GLubyte* v) { fp_glSecondaryColor3ubv(v); } inline void glSecondaryColor3ui(GLuint red, GLuint green, GLuint blue) { fp_glSecondaryColor3ui(red, green, blue); } inline void glSecondaryColor3uiv(const GLuint* v) { fp_glSecondaryColor3uiv(v); } inline void glSecondaryColor3us(GLushort red, GLushort green, GLushort blue) { fp_glSecondaryColor3us(red, green, blue); } inline void glSecondaryColor3usv(const GLushort* v) { fp_glSecondaryColor3usv(v); } inline void glSecondaryColorPointer(GLint size, GLenum type, GLsizei stride, const void* pointer) { fp_glSecondaryColorPointer(size, type, stride, pointer); } inline void glWindowPos2d(GLdouble x, GLdouble y) { fp_glWindowPos2d(x, y); } inline void glWindowPos2dv(const GLdouble* v) { fp_glWindowPos2dv(v); } inline void glWindowPos2f(GLfloat x, GLfloat y) { fp_glWindowPos2f(x, y); } inline void glWindowPos2fv(const GLfloat* v) { fp_glWindowPos2fv(v); } inline void glWindowPos2i(GLint x, GLint y) { fp_glWindowPos2i(x, y); } inline void glWindowPos2iv(const GLint* v) { fp_glWindowPos2iv(v); } inline void glWindowPos2s(GLshort x, GLshort y) { fp_glWindowPos2s(x, y); } inline void glWindowPos2sv(const GLshort* v) { fp_glWindowPos2sv(v); } inline void glWindowPos3d(GLdouble x, GLdouble y, GLdouble z) { fp_glWindowPos3d(x, y, z); } inline void glWindowPos3dv(const GLdouble* v) { fp_glWindowPos3dv(v); } inline void glWindowPos3f(GLfloat x, GLfloat y, GLfloat z) { fp_glWindowPos3f(x, y, z); } inline void glWindowPos3fv(const GLfloat* v) { fp_glWindowPos3fv(v); } inline void glWindowPos3i(GLint x, GLint y, GLint z) { fp_glWindowPos3i(x, y, z); } inline void glWindowPos3iv(const GLint* v) { fp_glWindowPos3iv(v); } inline void glWindowPos3s(GLshort x, GLshort y, GLshort z) { fp_glWindowPos3s(x, y, z); } inline void glWindowPos3sv(const GLshort* v) { fp_glWindowPos3sv(v); } inline void glBlendColor(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) { fp_glBlendColor(red, green, blue, alpha); } inline void glBlendEquation(GLenum mode) { fp_glBlendEquation(mode); } /* GL_VERSION_1_5 */ inline void glGenQueries(GLsizei n, GLuint* ids) { fp_glGenQueries(n, ids); } inline void glDeleteQueries(GLsizei n, const GLuint* ids) { fp_glDeleteQueries(n, ids); } inline GLboolean glIsQuery(GLuint id) { return fp_glIsQuery(id); } inline void glBeginQuery(GLenum target, GLuint id) { fp_glBeginQuery(target, id); } inline void glEndQuery(GLenum target) { fp_glEndQuery(target); } inline void glGetQueryiv(GLenum target, GLenum pname, GLint* params) { fp_glGetQueryiv(target, pname, params); } inline void glGetQueryObjectiv(GLuint id, GLenum pname, GLint* params) { fp_glGetQueryObjectiv(id, pname, params); } inline void glGetQueryObjectuiv(GLuint id, GLenum pname, GLuint* params) { fp_glGetQueryObjectuiv(id, pname, params); } inline void glBindBuffer(GLenum target, GLuint buffer) { fp_glBindBuffer(target, buffer); } inline void glDeleteBuffers(GLsizei n, const GLuint* buffers) { fp_glDeleteBuffers(n, buffers); } inline void glGenBuffers(GLsizei n, GLuint* buffers) { fp_glGenBuffers(n, buffers); } inline GLboolean glIsBuffer(GLuint buffer) { return fp_glIsBuffer(buffer); } inline void glBufferData(GLenum target, GLsizeiptr size, const void* data, GLenum usage) { fp_glBufferData(target, size, data, usage); } inline void glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const void* data) { fp_glBufferSubData(target, offset, size, data); } inline void glGetBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, void* data) { fp_glGetBufferSubData(target, offset, size, data); } inline void* glMapBuffer(GLenum target, GLenum access) { return fp_glMapBuffer(target, access); } inline GLboolean glUnmapBuffer(GLenum target) { return fp_glUnmapBuffer(target); } inline void glGetBufferParameteriv(GLenum target, GLenum pname, GLint* params) { fp_glGetBufferParameteriv(target, pname, params); } inline void glGetBufferPointerv(GLenum target, GLenum pname, void** params) { fp_glGetBufferPointerv(target, pname, params); } /* GL_VERSION_2_0 */ inline void glBlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha) { fp_glBlendEquationSeparate(modeRGB, modeAlpha); } inline void glDrawBuffers(GLsizei n, const GLenum* bufs) { fp_glDrawBuffers(n, bufs); } inline void glStencilOpSeparate(GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass) { fp_glStencilOpSeparate(face, sfail, dpfail, dppass); } inline void glStencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask) { fp_glStencilFuncSeparate(face, func, ref, mask); } inline void glStencilMaskSeparate(GLenum face, GLuint mask) { fp_glStencilMaskSeparate(face, mask); } inline void glAttachShader(GLuint program, GLuint shader) { fp_glAttachShader(program, shader); } inline void glBindAttribLocation(GLuint program, GLuint index, const GLchar* name) { fp_glBindAttribLocation(program, index, name); } inline void glCompileShader(GLuint shader) { fp_glCompileShader(shader); } inline GLuint glCreateProgram() { return fp_glCreateProgram(); } inline GLuint glCreateShader(GLenum type) { return fp_glCreateShader(type); } inline void glDeleteProgram(GLuint program) { fp_glDeleteProgram(program); } inline void glDeleteShader(GLuint shader) { fp_glDeleteShader(shader); } inline void glDetachShader(GLuint program, GLuint shader) { fp_glDetachShader(program, shader); } inline void glDisableVertexAttribArray(GLuint index) { fp_glDisableVertexAttribArray(index); } inline void glEnableVertexAttribArray(GLuint index) { fp_glEnableVertexAttribArray(index); } inline void glGetActiveAttrib(GLuint program, GLuint index, GLsizei bufSize, GLsizei* length, GLint* size, GLenum* type, GLchar* name) { fp_glGetActiveAttrib(program, index, bufSize, length, size, type, name); } inline void glGetActiveUniform(GLuint program, GLuint index, GLsizei bufSize, GLsizei* length, GLint* size, GLenum* type, GLchar* name) { fp_glGetActiveUniform(program, index, bufSize, length, size, type, name); } inline void glGetAttachedShaders(GLuint program, GLsizei maxCount, GLsizei* count, GLuint* shaders) { fp_glGetAttachedShaders(program, maxCount, count, shaders); } inline GLint glGetAttribLocation(GLuint program, const GLchar* name) { return fp_glGetAttribLocation(program, name); } inline void glGetProgramiv(GLuint program, GLenum pname, GLint* params) { fp_glGetProgramiv(program, pname, params); } inline void glGetProgramInfoLog(GLuint program, GLsizei bufSize, GLsizei* length, GLchar* infoLog) { fp_glGetProgramInfoLog(program, bufSize, length, infoLog); } inline void glGetShaderiv(GLuint shader, GLenum pname, GLint* params) { fp_glGetShaderiv(shader, pname, params); } inline void glGetShaderInfoLog(GLuint shader, GLsizei bufSize, GLsizei* length, GLchar* infoLog) { fp_glGetShaderInfoLog(shader, bufSize, length, infoLog); } inline void glGetShaderSource(GLuint shader, GLsizei bufSize, GLsizei* length, GLchar* source) { fp_glGetShaderSource(shader, bufSize, length, source); } inline GLint glGetUniformLocation(GLuint program, const GLchar* name) { return fp_glGetUniformLocation(program, name); } inline void glGetUniformfv(GLuint program, GLint location, GLfloat* params) { fp_glGetUniformfv(program, location, params); } inline void glGetUniformiv(GLuint program, GLint location, GLint* params) { fp_glGetUniformiv(program, location, params); } inline void glGetVertexAttribdv(GLuint index, GLenum pname, GLdouble* params) { fp_glGetVertexAttribdv(index, pname, params); } inline void glGetVertexAttribfv(GLuint index, GLenum pname, GLfloat* params) { fp_glGetVertexAttribfv(index, pname, params); } inline void glGetVertexAttribiv(GLuint index, GLenum pname, GLint* params) { fp_glGetVertexAttribiv(index, pname, params); } inline void glGetVertexAttribPointerv(GLuint index, GLenum pname, void** pointer) { fp_glGetVertexAttribPointerv(index, pname, pointer); } inline GLboolean glIsProgram(GLuint program) { return fp_glIsProgram(program); } inline GLboolean glIsShader(GLuint shader) { return fp_glIsShader(shader); } inline void glLinkProgram(GLuint program) { fp_glLinkProgram(program); } inline void glShaderSource(GLuint shader, GLsizei count, const GLchar** string, const GLint* length) { fp_glShaderSource(shader, count, string, length); } inline void glUseProgram(GLuint program) { fp_glUseProgram(program); } inline void glUniform1f(GLint location, GLfloat v0) { fp_glUniform1f(location, v0); } inline void glUniform2f(GLint location, GLfloat v0, GLfloat v1) { fp_glUniform2f(location, v0, v1); } inline void glUniform3f(GLint location, GLfloat v0, GLfloat v1, GLfloat v2) { fp_glUniform3f(location, v0, v1, v2); } inline void glUniform4f(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3) { fp_glUniform4f(location, v0, v1, v2, v3); } inline void glUniform1i(GLint location, GLint v0) { fp_glUniform1i(location, v0); } inline void glUniform2i(GLint location, GLint v0, GLint v1) { fp_glUniform2i(location, v0, v1); } inline void glUniform3i(GLint location, GLint v0, GLint v1, GLint v2) { fp_glUniform3i(location, v0, v1, v2); } inline void glUniform4i(GLint location, GLint v0, GLint v1, GLint v2, GLint v3) { fp_glUniform4i(location, v0, v1, v2, v3); } inline void glUniform1fv(GLint location, GLsizei count, const GLfloat* value) { fp_glUniform1fv(location, count, value); } inline void glUniform2fv(GLint location, GLsizei count, const GLfloat* value) { fp_glUniform2fv(location, count, value); } inline void glUniform3fv(GLint location, GLsizei count, const GLfloat* value) { fp_glUniform3fv(location, count, value); } inline void glUniform4fv(GLint location, GLsizei count, const GLfloat* value) { fp_glUniform4fv(location, count, value); } inline void glUniform1iv(GLint location, GLsizei count, const GLint* value) { fp_glUniform1iv(location, count, value); } inline void glUniform2iv(GLint location, GLsizei count, const GLint* value) { fp_glUniform2iv(location, count, value); } inline void glUniform3iv(GLint location, GLsizei count, const GLint* value) { fp_glUniform3iv(location, count, value); } inline void glUniform4iv(GLint location, GLsizei count, const GLint* value) { fp_glUniform4iv(location, count, value); } inline void glUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { fp_glUniformMatrix2fv(location, count, transpose, value); } inline void glUniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { fp_glUniformMatrix3fv(location, count, transpose, value); } inline void glUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { fp_glUniformMatrix4fv(location, count, transpose, value); } inline void glValidateProgram(GLuint program) { fp_glValidateProgram(program); } inline void glVertexAttrib1d(GLuint index, GLdouble x) { fp_glVertexAttrib1d(index, x); } inline void glVertexAttrib1dv(GLuint index, const GLdouble* v) { fp_glVertexAttrib1dv(index, v); } inline void glVertexAttrib1f(GLuint index, GLfloat x) { fp_glVertexAttrib1f(index, x); } inline void glVertexAttrib1fv(GLuint index, const GLfloat* v) { fp_glVertexAttrib1fv(index, v); } inline void glVertexAttrib1s(GLuint index, GLshort x) { fp_glVertexAttrib1s(index, x); } inline void glVertexAttrib1sv(GLuint index, const GLshort* v) { fp_glVertexAttrib1sv(index, v); } inline void glVertexAttrib2d(GLuint index, GLdouble x, GLdouble y) { fp_glVertexAttrib2d(index, x, y); } inline void glVertexAttrib2dv(GLuint index, const GLdouble* v) { fp_glVertexAttrib2dv(index, v); } inline void glVertexAttrib2f(GLuint index, GLfloat x, GLfloat y) { fp_glVertexAttrib2f(index, x, y); } inline void glVertexAttrib2fv(GLuint index, const GLfloat* v) { fp_glVertexAttrib2fv(index, v); } inline void glVertexAttrib2s(GLuint index, GLshort x, GLshort y) { fp_glVertexAttrib2s(index, x, y); } inline void glVertexAttrib2sv(GLuint index, const GLshort* v) { fp_glVertexAttrib2sv(index, v); } inline void glVertexAttrib3d(GLuint index, GLdouble x, GLdouble y, GLdouble z) { fp_glVertexAttrib3d(index, x, y, z); } inline void glVertexAttrib3dv(GLuint index, const GLdouble* v) { fp_glVertexAttrib3dv(index, v); } inline void glVertexAttrib3f(GLuint index, GLfloat x, GLfloat y, GLfloat z) { fp_glVertexAttrib3f(index, x, y, z); } inline void glVertexAttrib3fv(GLuint index, const GLfloat* v) { fp_glVertexAttrib3fv(index, v); } inline void glVertexAttrib3s(GLuint index, GLshort x, GLshort y, GLshort z) { fp_glVertexAttrib3s(index, x, y, z); } inline void glVertexAttrib3sv(GLuint index, const GLshort* v) { fp_glVertexAttrib3sv(index, v); } inline void glVertexAttrib4Nbv(GLuint index, const GLbyte* v) { fp_glVertexAttrib4Nbv(index, v); } inline void glVertexAttrib4Niv(GLuint index, const GLint* v) { fp_glVertexAttrib4Niv(index, v); } inline void glVertexAttrib4Nsv(GLuint index, const GLshort* v) { fp_glVertexAttrib4Nsv(index, v); } inline void glVertexAttrib4Nub(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w) { fp_glVertexAttrib4Nub(index, x, y, z, w); } inline void glVertexAttrib4Nubv(GLuint index, const GLubyte* v) { fp_glVertexAttrib4Nubv(index, v); } inline void glVertexAttrib4Nuiv(GLuint index, const GLuint* v) { fp_glVertexAttrib4Nuiv(index, v); } inline void glVertexAttrib4Nusv(GLuint index, const GLushort* v) { fp_glVertexAttrib4Nusv(index, v); } inline void glVertexAttrib4bv(GLuint index, const GLbyte* v) { fp_glVertexAttrib4bv(index, v); } inline void glVertexAttrib4d(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w) { fp_glVertexAttrib4d(index, x, y, z, w); } inline void glVertexAttrib4dv(GLuint index, const GLdouble* v) { fp_glVertexAttrib4dv(index, v); } inline void glVertexAttrib4f(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w) { fp_glVertexAttrib4f(index, x, y, z, w); } inline void glVertexAttrib4fv(GLuint index, const GLfloat* v) { fp_glVertexAttrib4fv(index, v); } inline void glVertexAttrib4iv(GLuint index, const GLint* v) { fp_glVertexAttrib4iv(index, v); } inline void glVertexAttrib4s(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w) { fp_glVertexAttrib4s(index, x, y, z, w); } inline void glVertexAttrib4sv(GLuint index, const GLshort* v) { fp_glVertexAttrib4sv(index, v); } inline void glVertexAttrib4ubv(GLuint index, const GLubyte* v) { fp_glVertexAttrib4ubv(index, v); } inline void glVertexAttrib4uiv(GLuint index, const GLuint* v) { fp_glVertexAttrib4uiv(index, v); } inline void glVertexAttrib4usv(GLuint index, const GLushort* v) { fp_glVertexAttrib4usv(index, v); } inline void glVertexAttribPointer(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void* pointer) { fp_glVertexAttribPointer(index, size, type, normalized, stride, pointer); } /* GL_VERSION_2_1 */ inline void glUniformMatrix2x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { fp_glUniformMatrix2x3fv(location, count, transpose, value); } inline void glUniformMatrix3x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { fp_glUniformMatrix3x2fv(location, count, transpose, value); } inline void glUniformMatrix2x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { fp_glUniformMatrix2x4fv(location, count, transpose, value); } inline void glUniformMatrix4x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { fp_glUniformMatrix4x2fv(location, count, transpose, value); } inline void glUniformMatrix3x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { fp_glUniformMatrix3x4fv(location, count, transpose, value); } inline void glUniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { fp_glUniformMatrix4x3fv(location, count, transpose, value); } /* GL_VERSION_3_0 */ inline void glColorMaski(GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a) { fp_glColorMaski(index, r, g, b, a); } inline void glGetBooleani_v(GLenum target, GLuint index, GLboolean* data) { fp_glGetBooleani_v(target, index, data); } inline void glGetIntegeri_v(GLenum target, GLuint index, GLint* data) { fp_glGetIntegeri_v(target, index, data); } inline void glEnablei(GLenum target, GLuint index) { fp_glEnablei(target, index); } inline void glDisablei(GLenum target, GLuint index) { fp_glDisablei(target, index); } inline GLboolean glIsEnabledi(GLenum target, GLuint index) { return fp_glIsEnabledi(target, index); } inline void glBeginTransformFeedback(GLenum primitiveMode) { fp_glBeginTransformFeedback(primitiveMode); } inline void glEndTransformFeedback() { fp_glEndTransformFeedback(); } inline void glBindBufferRange(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size) { fp_glBindBufferRange(target, index, buffer, offset, size); } inline void glBindBufferBase(GLenum target, GLuint index, GLuint buffer) { fp_glBindBufferBase(target, index, buffer); } inline void glTransformFeedbackVaryings(GLuint program, GLsizei count, const GLchar** varyings, GLenum bufferMode) { fp_glTransformFeedbackVaryings(program, count, varyings, bufferMode); } inline void glGetTransformFeedbackVarying(GLuint program, GLuint index, GLsizei bufSize, GLsizei* length, GLsizei* size, GLenum* type, GLchar* name) { fp_glGetTransformFeedbackVarying(program, index, bufSize, length, size, type, name); } inline void glClampColor(GLenum target, GLenum clamp) { fp_glClampColor(target, clamp); } inline void glBeginConditionalRender(GLuint id, GLenum mode) { fp_glBeginConditionalRender(id, mode); } inline void glEndConditionalRender() { fp_glEndConditionalRender(); } inline void glVertexAttribIPointer(GLuint index, GLint size, GLenum type, GLsizei stride, const void* pointer) { fp_glVertexAttribIPointer(index, size, type, stride, pointer); } inline void glGetVertexAttribIiv(GLuint index, GLenum pname, GLint* params) { fp_glGetVertexAttribIiv(index, pname, params); } inline void glGetVertexAttribIuiv(GLuint index, GLenum pname, GLuint* params) { fp_glGetVertexAttribIuiv(index, pname, params); } inline void glVertexAttribI1i(GLuint index, GLint x) { fp_glVertexAttribI1i(index, x); } inline void glVertexAttribI2i(GLuint index, GLint x, GLint y) { fp_glVertexAttribI2i(index, x, y); } inline void glVertexAttribI3i(GLuint index, GLint x, GLint y, GLint z) { fp_glVertexAttribI3i(index, x, y, z); } inline void glVertexAttribI4i(GLuint index, GLint x, GLint y, GLint z, GLint w) { fp_glVertexAttribI4i(index, x, y, z, w); } inline void glVertexAttribI1ui(GLuint index, GLuint x) { fp_glVertexAttribI1ui(index, x); } inline void glVertexAttribI2ui(GLuint index, GLuint x, GLuint y) { fp_glVertexAttribI2ui(index, x, y); } inline void glVertexAttribI3ui(GLuint index, GLuint x, GLuint y, GLuint z) { fp_glVertexAttribI3ui(index, x, y, z); } inline void glVertexAttribI4ui(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w) { fp_glVertexAttribI4ui(index, x, y, z, w); } inline void glVertexAttribI1iv(GLuint index, const GLint* v) { fp_glVertexAttribI1iv(index, v); } inline void glVertexAttribI2iv(GLuint index, const GLint* v) { fp_glVertexAttribI2iv(index, v); } inline void glVertexAttribI3iv(GLuint index, const GLint* v) { fp_glVertexAttribI3iv(index, v); } inline void glVertexAttribI4iv(GLuint index, const GLint* v) { fp_glVertexAttribI4iv(index, v); } inline void glVertexAttribI1uiv(GLuint index, const GLuint* v) { fp_glVertexAttribI1uiv(index, v); } inline void glVertexAttribI2uiv(GLuint index, const GLuint* v) { fp_glVertexAttribI2uiv(index, v); } inline void glVertexAttribI3uiv(GLuint index, const GLuint* v) { fp_glVertexAttribI3uiv(index, v); } inline void glVertexAttribI4uiv(GLuint index, const GLuint* v) { fp_glVertexAttribI4uiv(index, v); } inline void glVertexAttribI4bv(GLuint index, const GLbyte* v) { fp_glVertexAttribI4bv(index, v); } inline void glVertexAttribI4sv(GLuint index, const GLshort* v) { fp_glVertexAttribI4sv(index, v); } inline void glVertexAttribI4ubv(GLuint index, const GLubyte* v) { fp_glVertexAttribI4ubv(index, v); } inline void glVertexAttribI4usv(GLuint index, const GLushort* v) { fp_glVertexAttribI4usv(index, v); } inline void glGetUniformuiv(GLuint program, GLint location, GLuint* params) { fp_glGetUniformuiv(program, location, params); } inline void glBindFragDataLocation(GLuint program, GLuint color, const GLchar* name) { fp_glBindFragDataLocation(program, color, name); } inline GLint glGetFragDataLocation(GLuint program, const GLchar* name) { return fp_glGetFragDataLocation(program, name); } inline void glUniform1ui(GLint location, GLuint v0) { fp_glUniform1ui(location, v0); } inline void glUniform2ui(GLint location, GLuint v0, GLuint v1) { fp_glUniform2ui(location, v0, v1); } inline void glUniform3ui(GLint location, GLuint v0, GLuint v1, GLuint v2) { fp_glUniform3ui(location, v0, v1, v2); } inline void glUniform4ui(GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3) { fp_glUniform4ui(location, v0, v1, v2, v3); } inline void glUniform1uiv(GLint location, GLsizei count, const GLuint* value) { fp_glUniform1uiv(location, count, value); } inline void glUniform2uiv(GLint location, GLsizei count, const GLuint* value) { fp_glUniform2uiv(location, count, value); } inline void glUniform3uiv(GLint location, GLsizei count, const GLuint* value) { fp_glUniform3uiv(location, count, value); } inline void glUniform4uiv(GLint location, GLsizei count, const GLuint* value) { fp_glUniform4uiv(location, count, value); } inline void glTexParameterIiv(GLenum target, GLenum pname, const GLint* params) { fp_glTexParameterIiv(target, pname, params); } inline void glTexParameterIuiv(GLenum target, GLenum pname, const GLuint* params) { fp_glTexParameterIuiv(target, pname, params); } inline void glGetTexParameterIiv(GLenum target, GLenum pname, GLint* params) { fp_glGetTexParameterIiv(target, pname, params); } inline void glGetTexParameterIuiv(GLenum target, GLenum pname, GLuint* params) { fp_glGetTexParameterIuiv(target, pname, params); } inline void glClearBufferiv(GLenum buffer, GLint drawbuffer, const GLint* value) { fp_glClearBufferiv(buffer, drawbuffer, value); } inline void glClearBufferuiv(GLenum buffer, GLint drawbuffer, const GLuint* value) { fp_glClearBufferuiv(buffer, drawbuffer, value); } inline void glClearBufferfv(GLenum buffer, GLint drawbuffer, const GLfloat* value) { fp_glClearBufferfv(buffer, drawbuffer, value); } inline void glClearBufferfi(GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil) { fp_glClearBufferfi(buffer, drawbuffer, depth, stencil); } inline const GLubyte* glGetStringi(GLenum name, GLuint index) { return fp_glGetStringi(name, index); } inline GLboolean glIsRenderbuffer(GLuint renderbuffer) { return fp_glIsRenderbuffer(renderbuffer); } inline void glBindRenderbuffer(GLenum target, GLuint renderbuffer) { fp_glBindRenderbuffer(target, renderbuffer); } inline void glDeleteRenderbuffers(GLsizei n, const GLuint* renderbuffers) { fp_glDeleteRenderbuffers(n, renderbuffers); } inline void glGenRenderbuffers(GLsizei n, GLuint* renderbuffers) { fp_glGenRenderbuffers(n, renderbuffers); } inline void glRenderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height) { fp_glRenderbufferStorage(target, internalformat, width, height); } inline void glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint* params) { fp_glGetRenderbufferParameteriv(target, pname, params); } inline GLboolean glIsFramebuffer(GLuint framebuffer) { return fp_glIsFramebuffer(framebuffer); } inline void glBindFramebuffer(GLenum target, GLuint framebuffer) { fp_glBindFramebuffer(target, framebuffer); } inline void glDeleteFramebuffers(GLsizei n, const GLuint* framebuffers) { fp_glDeleteFramebuffers(n, framebuffers); } inline void glGenFramebuffers(GLsizei n, GLuint* framebuffers) { fp_glGenFramebuffers(n, framebuffers); } inline GLenum glCheckFramebufferStatus(GLenum target) { return fp_glCheckFramebufferStatus(target); } inline void glFramebufferTexture1D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) { fp_glFramebufferTexture1D(target, attachment, textarget, texture, level); } inline void glFramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) { fp_glFramebufferTexture2D(target, attachment, textarget, texture, level); } inline void glFramebufferTexture3D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset) { fp_glFramebufferTexture3D(target, attachment, textarget, texture, level, zoffset); } inline void glFramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) { fp_glFramebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer); } inline void glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint* params) { fp_glGetFramebufferAttachmentParameteriv(target, attachment, pname, params); } inline void glGenerateMipmap(GLenum target) { fp_glGenerateMipmap(target); } inline void glBlitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter) { fp_glBlitFramebuffer(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter); } inline void glRenderbufferStorageMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) { fp_glRenderbufferStorageMultisample(target, samples, internalformat, width, height); } inline void glFramebufferTextureLayer(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer) { fp_glFramebufferTextureLayer(target, attachment, texture, level, layer); } inline void* glMapBufferRange(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access) { return fp_glMapBufferRange(target, offset, length, access); } inline void glFlushMappedBufferRange(GLenum target, GLintptr offset, GLsizeiptr length) { fp_glFlushMappedBufferRange(target, offset, length); } inline void glBindVertexArray(GLuint array) { fp_glBindVertexArray(array); } inline void glDeleteVertexArrays(GLsizei n, const GLuint* arrays) { fp_glDeleteVertexArrays(n, arrays); } inline void glGenVertexArrays(GLsizei n, GLuint* arrays) { fp_glGenVertexArrays(n, arrays); } inline GLboolean glIsVertexArray(GLuint array) { return fp_glIsVertexArray(array); } /* GL_VERSION_3_1 */ inline void glDrawArraysInstanced(GLenum mode, GLint first, GLsizei count, GLsizei instancecount) { fp_glDrawArraysInstanced(mode, first, count, instancecount); } inline void glDrawElementsInstanced(GLenum mode, GLsizei count, GLenum type, const void* indices, GLsizei instancecount) { fp_glDrawElementsInstanced(mode, count, type, indices, instancecount); } inline void glTexBuffer(GLenum target, GLenum internalformat, GLuint buffer) { fp_glTexBuffer(target, internalformat, buffer); } inline void glPrimitiveRestartIndex(GLuint index) { fp_glPrimitiveRestartIndex(index); } inline void glCopyBufferSubData(GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size) { fp_glCopyBufferSubData(readTarget, writeTarget, readOffset, writeOffset, size); } inline void glGetUniformIndices(GLuint program, GLsizei uniformCount, const GLchar** uniformNames, GLuint* uniformIndices) { fp_glGetUniformIndices(program, uniformCount, uniformNames, uniformIndices); } inline void glGetActiveUniformsiv(GLuint program, GLsizei uniformCount, const GLuint* uniformIndices, GLenum pname, GLint* params) { fp_glGetActiveUniformsiv(program, uniformCount, uniformIndices, pname, params); } inline void glGetActiveUniformName(GLuint program, GLuint uniformIndex, GLsizei bufSize, GLsizei* length, GLchar* uniformName) { fp_glGetActiveUniformName(program, uniformIndex, bufSize, length, uniformName); } inline GLuint glGetUniformBlockIndex(GLuint program, const GLchar* uniformBlockName) { return fp_glGetUniformBlockIndex(program, uniformBlockName); } inline void glGetActiveUniformBlockiv(GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint* params) { fp_glGetActiveUniformBlockiv(program, uniformBlockIndex, pname, params); } inline void glGetActiveUniformBlockName(GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei* length, GLchar* uniformBlockName) { fp_glGetActiveUniformBlockName(program, uniformBlockIndex, bufSize, length, uniformBlockName); } inline void glUniformBlockBinding(GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding) { fp_glUniformBlockBinding(program, uniformBlockIndex, uniformBlockBinding); } /* GL_VERSION_3_2 */ inline void glDrawElementsBaseVertex(GLenum mode, GLsizei count, GLenum type, const void* indices, GLint basevertex) { fp_glDrawElementsBaseVertex(mode, count, type, indices, basevertex); } inline void glDrawRangeElementsBaseVertex(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void* indices, GLint basevertex) { fp_glDrawRangeElementsBaseVertex(mode, start, end, count, type, indices, basevertex); } inline void glDrawElementsInstancedBaseVertex(GLenum mode, GLsizei count, GLenum type, const void* indices, GLsizei instancecount, GLint basevertex) { fp_glDrawElementsInstancedBaseVertex(mode, count, type, indices, instancecount, basevertex); } inline void glMultiDrawElementsBaseVertex(GLenum mode, const GLsizei* count, GLenum type, const void** indices, GLsizei drawcount, const GLint* basevertex) { fp_glMultiDrawElementsBaseVertex(mode, count, type, indices, drawcount, basevertex); } inline void glProvokingVertex(GLenum mode) { fp_glProvokingVertex(mode); } inline GLsync glFenceSync(GLenum condition, GLbitfield flags) { return fp_glFenceSync(condition, flags); } inline GLboolean glIsSync(GLsync sync) { return fp_glIsSync(sync); } inline void glDeleteSync(GLsync sync) { fp_glDeleteSync(sync); } inline GLenum glClientWaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout) { return fp_glClientWaitSync(sync, flags, timeout); } inline void glWaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout) { fp_glWaitSync(sync, flags, timeout); } inline void glGetInteger64v(GLenum pname, GLint64* data) { fp_glGetInteger64v(pname, data); } inline void glGetSynciv(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei* length, GLint* values) { fp_glGetSynciv(sync, pname, bufSize, length, values); } inline void glGetInteger64i_v(GLenum target, GLuint index, GLint64* data) { fp_glGetInteger64i_v(target, index, data); } inline void glGetBufferParameteri64v(GLenum target, GLenum pname, GLint64* params) { fp_glGetBufferParameteri64v(target, pname, params); } inline void glFramebufferTexture(GLenum target, GLenum attachment, GLuint texture, GLint level) { fp_glFramebufferTexture(target, attachment, texture, level); } inline void glTexImage2DMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations) { fp_glTexImage2DMultisample(target, samples, internalformat, width, height, fixedsamplelocations); } inline void glTexImage3DMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations) { fp_glTexImage3DMultisample(target, samples, internalformat, width, height, depth, fixedsamplelocations); } inline void glGetMultisamplefv(GLenum pname, GLuint index, GLfloat* val) { fp_glGetMultisamplefv(pname, index, val); } inline void glSampleMaski(GLuint maskNumber, GLbitfield mask) { fp_glSampleMaski(maskNumber, mask); } /* GL_VERSION_3_3 */ inline void glBindFragDataLocationIndexed(GLuint program, GLuint colorNumber, GLuint index, const GLchar* name) { fp_glBindFragDataLocationIndexed(program, colorNumber, index, name); } inline GLint glGetFragDataIndex(GLuint program, const GLchar* name) { return fp_glGetFragDataIndex(program, name); } inline void glGenSamplers(GLsizei count, GLuint* samplers) { fp_glGenSamplers(count, samplers); } inline void glDeleteSamplers(GLsizei count, const GLuint* samplers) { fp_glDeleteSamplers(count, samplers); } inline GLboolean glIsSampler(GLuint sampler) { return fp_glIsSampler(sampler); } inline void glBindSampler(GLuint unit, GLuint sampler) { fp_glBindSampler(unit, sampler); } inline void glSamplerParameteri(GLuint sampler, GLenum pname, GLint param) { fp_glSamplerParameteri(sampler, pname, param); } inline void glSamplerParameteriv(GLuint sampler, GLenum pname, const GLint* param) { fp_glSamplerParameteriv(sampler, pname, param); } inline void glSamplerParameterf(GLuint sampler, GLenum pname, GLfloat param) { fp_glSamplerParameterf(sampler, pname, param); } inline void glSamplerParameterfv(GLuint sampler, GLenum pname, const GLfloat* param) { fp_glSamplerParameterfv(sampler, pname, param); } inline void glSamplerParameterIiv(GLuint sampler, GLenum pname, const GLint* param) { fp_glSamplerParameterIiv(sampler, pname, param); } inline void glSamplerParameterIuiv(GLuint sampler, GLenum pname, const GLuint* param) { fp_glSamplerParameterIuiv(sampler, pname, param); } inline void glGetSamplerParameteriv(GLuint sampler, GLenum pname, GLint* params) { fp_glGetSamplerParameteriv(sampler, pname, params); } inline void glGetSamplerParameterIiv(GLuint sampler, GLenum pname, GLint* params) { fp_glGetSamplerParameterIiv(sampler, pname, params); } inline void glGetSamplerParameterfv(GLuint sampler, GLenum pname, GLfloat* params) { fp_glGetSamplerParameterfv(sampler, pname, params); } inline void glGetSamplerParameterIuiv(GLuint sampler, GLenum pname, GLuint* params) { fp_glGetSamplerParameterIuiv(sampler, pname, params); } inline void glQueryCounter(GLuint id, GLenum target) { fp_glQueryCounter(id, target); } inline void glGetQueryObjecti64v(GLuint id, GLenum pname, GLint64* params) { fp_glGetQueryObjecti64v(id, pname, params); } inline void glGetQueryObjectui64v(GLuint id, GLenum pname, GLuint64* params) { fp_glGetQueryObjectui64v(id, pname, params); } inline void glVertexAttribDivisor(GLuint index, GLuint divisor) { fp_glVertexAttribDivisor(index, divisor); } inline void glVertexAttribP1ui(GLuint index, GLenum type, GLboolean normalized, GLuint value) { fp_glVertexAttribP1ui(index, type, normalized, value); } inline void glVertexAttribP1uiv(GLuint index, GLenum type, GLboolean normalized, const GLuint* value) { fp_glVertexAttribP1uiv(index, type, normalized, value); } inline void glVertexAttribP2ui(GLuint index, GLenum type, GLboolean normalized, GLuint value) { fp_glVertexAttribP2ui(index, type, normalized, value); } inline void glVertexAttribP2uiv(GLuint index, GLenum type, GLboolean normalized, const GLuint* value) { fp_glVertexAttribP2uiv(index, type, normalized, value); } inline void glVertexAttribP3ui(GLuint index, GLenum type, GLboolean normalized, GLuint value) { fp_glVertexAttribP3ui(index, type, normalized, value); } inline void glVertexAttribP3uiv(GLuint index, GLenum type, GLboolean normalized, const GLuint* value) { fp_glVertexAttribP3uiv(index, type, normalized, value); } inline void glVertexAttribP4ui(GLuint index, GLenum type, GLboolean normalized, GLuint value) { fp_glVertexAttribP4ui(index, type, normalized, value); } inline void glVertexAttribP4uiv(GLuint index, GLenum type, GLboolean normalized, const GLuint* value) { fp_glVertexAttribP4uiv(index, type, normalized, value); } inline void glVertexP2ui(GLenum type, GLuint value) { fp_glVertexP2ui(type, value); } inline void glVertexP2uiv(GLenum type, const GLuint* value) { fp_glVertexP2uiv(type, value); } inline void glVertexP3ui(GLenum type, GLuint value) { fp_glVertexP3ui(type, value); } inline void glVertexP3uiv(GLenum type, const GLuint* value) { fp_glVertexP3uiv(type, value); } inline void glVertexP4ui(GLenum type, GLuint value) { fp_glVertexP4ui(type, value); } inline void glVertexP4uiv(GLenum type, const GLuint* value) { fp_glVertexP4uiv(type, value); } inline void glTexCoordP1ui(GLenum type, GLuint coords) { fp_glTexCoordP1ui(type, coords); } inline void glTexCoordP1uiv(GLenum type, const GLuint* coords) { fp_glTexCoordP1uiv(type, coords); } inline void glTexCoordP2ui(GLenum type, GLuint coords) { fp_glTexCoordP2ui(type, coords); } inline void glTexCoordP2uiv(GLenum type, const GLuint* coords) { fp_glTexCoordP2uiv(type, coords); } inline void glTexCoordP3ui(GLenum type, GLuint coords) { fp_glTexCoordP3ui(type, coords); } inline void glTexCoordP3uiv(GLenum type, const GLuint* coords) { fp_glTexCoordP3uiv(type, coords); } inline void glTexCoordP4ui(GLenum type, GLuint coords) { fp_glTexCoordP4ui(type, coords); } inline void glTexCoordP4uiv(GLenum type, const GLuint* coords) { fp_glTexCoordP4uiv(type, coords); } inline void glMultiTexCoordP1ui(GLenum texture, GLenum type, GLuint coords) { fp_glMultiTexCoordP1ui(texture, type, coords); } inline void glMultiTexCoordP1uiv(GLenum texture, GLenum type, const GLuint* coords) { fp_glMultiTexCoordP1uiv(texture, type, coords); } inline void glMultiTexCoordP2ui(GLenum texture, GLenum type, GLuint coords) { fp_glMultiTexCoordP2ui(texture, type, coords); } inline void glMultiTexCoordP2uiv(GLenum texture, GLenum type, const GLuint* coords) { fp_glMultiTexCoordP2uiv(texture, type, coords); } inline void glMultiTexCoordP3ui(GLenum texture, GLenum type, GLuint coords) { fp_glMultiTexCoordP3ui(texture, type, coords); } inline void glMultiTexCoordP3uiv(GLenum texture, GLenum type, const GLuint* coords) { fp_glMultiTexCoordP3uiv(texture, type, coords); } inline void glMultiTexCoordP4ui(GLenum texture, GLenum type, GLuint coords) { fp_glMultiTexCoordP4ui(texture, type, coords); } inline void glMultiTexCoordP4uiv(GLenum texture, GLenum type, const GLuint* coords) { fp_glMultiTexCoordP4uiv(texture, type, coords); } inline void glNormalP3ui(GLenum type, GLuint coords) { fp_glNormalP3ui(type, coords); } inline void glNormalP3uiv(GLenum type, const GLuint* coords) { fp_glNormalP3uiv(type, coords); } inline void glColorP3ui(GLenum type, GLuint color) { fp_glColorP3ui(type, color); } inline void glColorP3uiv(GLenum type, const GLuint* color) { fp_glColorP3uiv(type, color); } inline void glColorP4ui(GLenum type, GLuint color) { fp_glColorP4ui(type, color); } inline void glColorP4uiv(GLenum type, const GLuint* color) { fp_glColorP4uiv(type, color); } inline void glSecondaryColorP3ui(GLenum type, GLuint color) { fp_glSecondaryColorP3ui(type, color); } inline void glSecondaryColorP3uiv(GLenum type, const GLuint* color) { fp_glSecondaryColorP3uiv(type, color); } /* GL_VERSION_4_0 */ inline void glMinSampleShading(GLfloat value) { fp_glMinSampleShading(value); } inline void glBlendEquationi(GLuint buf, GLenum mode) { fp_glBlendEquationi(buf, mode); } inline void glBlendEquationSeparatei(GLuint buf, GLenum modeRGB, GLenum modeAlpha) { fp_glBlendEquationSeparatei(buf, modeRGB, modeAlpha); } inline void glBlendFunci(GLuint buf, GLenum src, GLenum dst) { fp_glBlendFunci(buf, src, dst); } inline void glBlendFuncSeparatei(GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) { fp_glBlendFuncSeparatei(buf, srcRGB, dstRGB, srcAlpha, dstAlpha); } inline void glDrawArraysIndirect(GLenum mode, const void* indirect) { fp_glDrawArraysIndirect(mode, indirect); } inline void glDrawElementsIndirect(GLenum mode, GLenum type, const void* indirect) { fp_glDrawElementsIndirect(mode, type, indirect); } inline void glUniform1d(GLint location, GLdouble x) { fp_glUniform1d(location, x); } inline void glUniform2d(GLint location, GLdouble x, GLdouble y) { fp_glUniform2d(location, x, y); } inline void glUniform3d(GLint location, GLdouble x, GLdouble y, GLdouble z) { fp_glUniform3d(location, x, y, z); } inline void glUniform4d(GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w) { fp_glUniform4d(location, x, y, z, w); } inline void glUniform1dv(GLint location, GLsizei count, const GLdouble* value) { fp_glUniform1dv(location, count, value); } inline void glUniform2dv(GLint location, GLsizei count, const GLdouble* value) { fp_glUniform2dv(location, count, value); } inline void glUniform3dv(GLint location, GLsizei count, const GLdouble* value) { fp_glUniform3dv(location, count, value); } inline void glUniform4dv(GLint location, GLsizei count, const GLdouble* value) { fp_glUniform4dv(location, count, value); } inline void glUniformMatrix2dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble* value) { fp_glUniformMatrix2dv(location, count, transpose, value); } inline void glUniformMatrix3dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble* value) { fp_glUniformMatrix3dv(location, count, transpose, value); } inline void glUniformMatrix4dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble* value) { fp_glUniformMatrix4dv(location, count, transpose, value); } inline void glUniformMatrix2x3dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble* value) { fp_glUniformMatrix2x3dv(location, count, transpose, value); } inline void glUniformMatrix2x4dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble* value) { fp_glUniformMatrix2x4dv(location, count, transpose, value); } inline void glUniformMatrix3x2dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble* value) { fp_glUniformMatrix3x2dv(location, count, transpose, value); } inline void glUniformMatrix3x4dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble* value) { fp_glUniformMatrix3x4dv(location, count, transpose, value); } inline void glUniformMatrix4x2dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble* value) { fp_glUniformMatrix4x2dv(location, count, transpose, value); } inline void glUniformMatrix4x3dv(GLint location, GLsizei count, GLboolean transpose, const GLdouble* value) { fp_glUniformMatrix4x3dv(location, count, transpose, value); } inline void glGetUniformdv(GLuint program, GLint location, GLdouble* params) { fp_glGetUniformdv(program, location, params); } inline GLint glGetSubroutineUniformLocation(GLuint program, GLenum shadertype, const GLchar* name) { return fp_glGetSubroutineUniformLocation(program, shadertype, name); } inline GLuint glGetSubroutineIndex(GLuint program, GLenum shadertype, const GLchar* name) { return fp_glGetSubroutineIndex(program, shadertype, name); } inline void glGetActiveSubroutineUniformiv(GLuint program, GLenum shadertype, GLuint index, GLenum pname, GLint* values) { fp_glGetActiveSubroutineUniformiv(program, shadertype, index, pname, values); } inline void glGetActiveSubroutineUniformName(GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei* length, GLchar* name) { fp_glGetActiveSubroutineUniformName(program, shadertype, index, bufsize, length, name); } inline void glGetActiveSubroutineName(GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei* length, GLchar* name) { fp_glGetActiveSubroutineName(program, shadertype, index, bufsize, length, name); } inline void glUniformSubroutinesuiv(GLenum shadertype, GLsizei count, const GLuint* indices) { fp_glUniformSubroutinesuiv(shadertype, count, indices); } inline void glGetUniformSubroutineuiv(GLenum shadertype, GLint location, GLuint* params) { fp_glGetUniformSubroutineuiv(shadertype, location, params); } inline void glGetProgramStageiv(GLuint program, GLenum shadertype, GLenum pname, GLint* values) { fp_glGetProgramStageiv(program, shadertype, pname, values); } inline void glPatchParameteri(GLenum pname, GLint value) { fp_glPatchParameteri(pname, value); } inline void glPatchParameterfv(GLenum pname, const GLfloat* values) { fp_glPatchParameterfv(pname, values); } inline void glBindTransformFeedback(GLenum target, GLuint id) { fp_glBindTransformFeedback(target, id); } inline void glDeleteTransformFeedbacks(GLsizei n, const GLuint* ids) { fp_glDeleteTransformFeedbacks(n, ids); } inline void glGenTransformFeedbacks(GLsizei n, GLuint* ids) { fp_glGenTransformFeedbacks(n, ids); } inline GLboolean glIsTransformFeedback(GLuint id) { return fp_glIsTransformFeedback(id); } inline void glPauseTransformFeedback() { fp_glPauseTransformFeedback(); } inline void glResumeTransformFeedback() { fp_glResumeTransformFeedback(); } inline void glDrawTransformFeedback(GLenum mode, GLuint id) { fp_glDrawTransformFeedback(mode, id); } inline void glDrawTransformFeedbackStream(GLenum mode, GLuint id, GLuint stream) { fp_glDrawTransformFeedbackStream(mode, id, stream); } inline void glBeginQueryIndexed(GLenum target, GLuint index, GLuint id) { fp_glBeginQueryIndexed(target, index, id); } inline void glEndQueryIndexed(GLenum target, GLuint index) { fp_glEndQueryIndexed(target, index); } inline void glGetQueryIndexediv(GLenum target, GLuint index, GLenum pname, GLint* params) { fp_glGetQueryIndexediv(target, index, pname, params); } /* GL_VERSION_4_1 */ inline void glReleaseShaderCompiler() { fp_glReleaseShaderCompiler(); } inline void glShaderBinary(GLsizei count, const GLuint* shaders, GLenum binaryformat, const void* binary, GLsizei length) { fp_glShaderBinary(count, shaders, binaryformat, binary, length); } inline void glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision) { fp_glGetShaderPrecisionFormat(shadertype, precisiontype, range, precision); } inline void glDepthRangef(GLfloat n, GLfloat f) { fp_glDepthRangef(n, f); } inline void glClearDepthf(GLfloat d) { fp_glClearDepthf(d); } inline void glGetProgramBinary(GLuint program, GLsizei bufSize, GLsizei* length, GLenum* binaryFormat, void* binary) { fp_glGetProgramBinary(program, bufSize, length, binaryFormat, binary); } inline void glProgramBinary(GLuint program, GLenum binaryFormat, const void* binary, GLsizei length) { fp_glProgramBinary(program, binaryFormat, binary, length); } inline void glProgramParameteri(GLuint program, GLenum pname, GLint value) { fp_glProgramParameteri(program, pname, value); } inline void glUseProgramStages(GLuint pipeline, GLbitfield stages, GLuint program) { fp_glUseProgramStages(pipeline, stages, program); } inline void glActiveShaderProgram(GLuint pipeline, GLuint program) { fp_glActiveShaderProgram(pipeline, program); } inline GLuint glCreateShaderProgramv(GLenum type, GLsizei count, const GLchar** strings) { return fp_glCreateShaderProgramv(type, count, strings); } inline void glBindProgramPipeline(GLuint pipeline) { fp_glBindProgramPipeline(pipeline); } inline void glDeleteProgramPipelines(GLsizei n, const GLuint* pipelines) { fp_glDeleteProgramPipelines(n, pipelines); } inline void glGenProgramPipelines(GLsizei n, GLuint* pipelines) { fp_glGenProgramPipelines(n, pipelines); } inline GLboolean glIsProgramPipeline(GLuint pipeline) { return fp_glIsProgramPipeline(pipeline); } inline void glGetProgramPipelineiv(GLuint pipeline, GLenum pname, GLint* params) { fp_glGetProgramPipelineiv(pipeline, pname, params); } inline void glProgramUniform1i(GLuint program, GLint location, GLint v0) { fp_glProgramUniform1i(program, location, v0); } inline void glProgramUniform1iv(GLuint program, GLint location, GLsizei count, const GLint* value) { fp_glProgramUniform1iv(program, location, count, value); } inline void glProgramUniform1f(GLuint program, GLint location, GLfloat v0) { fp_glProgramUniform1f(program, location, v0); } inline void glProgramUniform1fv(GLuint program, GLint location, GLsizei count, const GLfloat* value) { fp_glProgramUniform1fv(program, location, count, value); } inline void glProgramUniform1d(GLuint program, GLint location, GLdouble v0) { fp_glProgramUniform1d(program, location, v0); } inline void glProgramUniform1dv(GLuint program, GLint location, GLsizei count, const GLdouble* value) { fp_glProgramUniform1dv(program, location, count, value); } inline void glProgramUniform1ui(GLuint program, GLint location, GLuint v0) { fp_glProgramUniform1ui(program, location, v0); } inline void glProgramUniform1uiv(GLuint program, GLint location, GLsizei count, const GLuint* value) { fp_glProgramUniform1uiv(program, location, count, value); } inline void glProgramUniform2i(GLuint program, GLint location, GLint v0, GLint v1) { fp_glProgramUniform2i(program, location, v0, v1); } inline void glProgramUniform2iv(GLuint program, GLint location, GLsizei count, const GLint* value) { fp_glProgramUniform2iv(program, location, count, value); } inline void glProgramUniform2f(GLuint program, GLint location, GLfloat v0, GLfloat v1) { fp_glProgramUniform2f(program, location, v0, v1); } inline void glProgramUniform2fv(GLuint program, GLint location, GLsizei count, const GLfloat* value) { fp_glProgramUniform2fv(program, location, count, value); } inline void glProgramUniform2d(GLuint program, GLint location, GLdouble v0, GLdouble v1) { fp_glProgramUniform2d(program, location, v0, v1); } inline void glProgramUniform2dv(GLuint program, GLint location, GLsizei count, const GLdouble* value) { fp_glProgramUniform2dv(program, location, count, value); } inline void glProgramUniform2ui(GLuint program, GLint location, GLuint v0, GLuint v1) { fp_glProgramUniform2ui(program, location, v0, v1); } inline void glProgramUniform2uiv(GLuint program, GLint location, GLsizei count, const GLuint* value) { fp_glProgramUniform2uiv(program, location, count, value); } inline void glProgramUniform3i(GLuint program, GLint location, GLint v0, GLint v1, GLint v2) { fp_glProgramUniform3i(program, location, v0, v1, v2); } inline void glProgramUniform3iv(GLuint program, GLint location, GLsizei count, const GLint* value) { fp_glProgramUniform3iv(program, location, count, value); } inline void glProgramUniform3f(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2) { fp_glProgramUniform3f(program, location, v0, v1, v2); } inline void glProgramUniform3fv(GLuint program, GLint location, GLsizei count, const GLfloat* value) { fp_glProgramUniform3fv(program, location, count, value); } inline void glProgramUniform3d(GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2) { fp_glProgramUniform3d(program, location, v0, v1, v2); } inline void glProgramUniform3dv(GLuint program, GLint location, GLsizei count, const GLdouble* value) { fp_glProgramUniform3dv(program, location, count, value); } inline void glProgramUniform3ui(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2) { fp_glProgramUniform3ui(program, location, v0, v1, v2); } inline void glProgramUniform3uiv(GLuint program, GLint location, GLsizei count, const GLuint* value) { fp_glProgramUniform3uiv(program, location, count, value); } inline void glProgramUniform4i(GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3) { fp_glProgramUniform4i(program, location, v0, v1, v2, v3); } inline void glProgramUniform4iv(GLuint program, GLint location, GLsizei count, const GLint* value) { fp_glProgramUniform4iv(program, location, count, value); } inline void glProgramUniform4f(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3) { fp_glProgramUniform4f(program, location, v0, v1, v2, v3); } inline void glProgramUniform4fv(GLuint program, GLint location, GLsizei count, const GLfloat* value) { fp_glProgramUniform4fv(program, location, count, value); } inline void glProgramUniform4d(GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2, GLdouble v3) { fp_glProgramUniform4d(program, location, v0, v1, v2, v3); } inline void glProgramUniform4dv(GLuint program, GLint location, GLsizei count, const GLdouble* value) { fp_glProgramUniform4dv(program, location, count, value); } inline void glProgramUniform4ui(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3) { fp_glProgramUniform4ui(program, location, v0, v1, v2, v3); } inline void glProgramUniform4uiv(GLuint program, GLint location, GLsizei count, const GLuint* value) { fp_glProgramUniform4uiv(program, location, count, value); } inline void glProgramUniformMatrix2fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { fp_glProgramUniformMatrix2fv(program, location, count, transpose, value); } inline void glProgramUniformMatrix3fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { fp_glProgramUniformMatrix3fv(program, location, count, transpose, value); } inline void glProgramUniformMatrix4fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { fp_glProgramUniformMatrix4fv(program, location, count, transpose, value); } inline void glProgramUniformMatrix2dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble* value) { fp_glProgramUniformMatrix2dv(program, location, count, transpose, value); } inline void glProgramUniformMatrix3dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble* value) { fp_glProgramUniformMatrix3dv(program, location, count, transpose, value); } inline void glProgramUniformMatrix4dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble* value) { fp_glProgramUniformMatrix4dv(program, location, count, transpose, value); } inline void glProgramUniformMatrix2x3fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { fp_glProgramUniformMatrix2x3fv(program, location, count, transpose, value); } inline void glProgramUniformMatrix3x2fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { fp_glProgramUniformMatrix3x2fv(program, location, count, transpose, value); } inline void glProgramUniformMatrix2x4fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { fp_glProgramUniformMatrix2x4fv(program, location, count, transpose, value); } inline void glProgramUniformMatrix4x2fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { fp_glProgramUniformMatrix4x2fv(program, location, count, transpose, value); } inline void glProgramUniformMatrix3x4fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { fp_glProgramUniformMatrix3x4fv(program, location, count, transpose, value); } inline void glProgramUniformMatrix4x3fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { fp_glProgramUniformMatrix4x3fv(program, location, count, transpose, value); } inline void glProgramUniformMatrix2x3dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble* value) { fp_glProgramUniformMatrix2x3dv(program, location, count, transpose, value); } inline void glProgramUniformMatrix3x2dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble* value) { fp_glProgramUniformMatrix3x2dv(program, location, count, transpose, value); } inline void glProgramUniformMatrix2x4dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble* value) { fp_glProgramUniformMatrix2x4dv(program, location, count, transpose, value); } inline void glProgramUniformMatrix4x2dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble* value) { fp_glProgramUniformMatrix4x2dv(program, location, count, transpose, value); } inline void glProgramUniformMatrix3x4dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble* value) { fp_glProgramUniformMatrix3x4dv(program, location, count, transpose, value); } inline void glProgramUniformMatrix4x3dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble* value) { fp_glProgramUniformMatrix4x3dv(program, location, count, transpose, value); } inline void glValidateProgramPipeline(GLuint pipeline) { fp_glValidateProgramPipeline(pipeline); } inline void glGetProgramPipelineInfoLog(GLuint pipeline, GLsizei bufSize, GLsizei* length, GLchar* infoLog) { fp_glGetProgramPipelineInfoLog(pipeline, bufSize, length, infoLog); } inline void glVertexAttribL1d(GLuint index, GLdouble x) { fp_glVertexAttribL1d(index, x); } inline void glVertexAttribL2d(GLuint index, GLdouble x, GLdouble y) { fp_glVertexAttribL2d(index, x, y); } inline void glVertexAttribL3d(GLuint index, GLdouble x, GLdouble y, GLdouble z) { fp_glVertexAttribL3d(index, x, y, z); } inline void glVertexAttribL4d(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w) { fp_glVertexAttribL4d(index, x, y, z, w); } inline void glVertexAttribL1dv(GLuint index, const GLdouble* v) { fp_glVertexAttribL1dv(index, v); } inline void glVertexAttribL2dv(GLuint index, const GLdouble* v) { fp_glVertexAttribL2dv(index, v); } inline void glVertexAttribL3dv(GLuint index, const GLdouble* v) { fp_glVertexAttribL3dv(index, v); } inline void glVertexAttribL4dv(GLuint index, const GLdouble* v) { fp_glVertexAttribL4dv(index, v); } inline void glVertexAttribLPointer(GLuint index, GLint size, GLenum type, GLsizei stride, const void* pointer) { fp_glVertexAttribLPointer(index, size, type, stride, pointer); } inline void glGetVertexAttribLdv(GLuint index, GLenum pname, GLdouble* params) { fp_glGetVertexAttribLdv(index, pname, params); } inline void glViewportArrayv(GLuint first, GLsizei count, const GLfloat* v) { fp_glViewportArrayv(first, count, v); } inline void glViewportIndexedf(GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h) { fp_glViewportIndexedf(index, x, y, w, h); } inline void glViewportIndexedfv(GLuint index, const GLfloat* v) { fp_glViewportIndexedfv(index, v); } inline void glScissorArrayv(GLuint first, GLsizei count, const GLint* v) { fp_glScissorArrayv(first, count, v); } inline void glScissorIndexed(GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height) { fp_glScissorIndexed(index, left, bottom, width, height); } inline void glScissorIndexedv(GLuint index, const GLint* v) { fp_glScissorIndexedv(index, v); } inline void glDepthRangeArrayv(GLuint first, GLsizei count, const GLdouble* v) { fp_glDepthRangeArrayv(first, count, v); } inline void glDepthRangeIndexed(GLuint index, GLdouble n, GLdouble f) { fp_glDepthRangeIndexed(index, n, f); } inline void glGetFloati_v(GLenum target, GLuint index, GLfloat* data) { fp_glGetFloati_v(target, index, data); } inline void glGetDoublei_v(GLenum target, GLuint index, GLdouble* data) { fp_glGetDoublei_v(target, index, data); } /* GL_VERSION_4_2 */ inline void glDrawArraysInstancedBaseInstance(GLenum mode, GLint first, GLsizei count, GLsizei instancecount, GLuint baseinstance) { fp_glDrawArraysInstancedBaseInstance(mode, first, count, instancecount, baseinstance); } inline void glDrawElementsInstancedBaseInstance(GLenum mode, GLsizei count, GLenum type, const void* indices, GLsizei instancecount, GLuint baseinstance) { fp_glDrawElementsInstancedBaseInstance(mode, count, type, indices, instancecount, baseinstance); } inline void glDrawElementsInstancedBaseVertexBaseInstance(GLenum mode, GLsizei count, GLenum type, const void* indices, GLsizei instancecount, GLint basevertex, GLuint baseinstance) { fp_glDrawElementsInstancedBaseVertexBaseInstance(mode, count, type, indices, instancecount, basevertex, baseinstance); } inline void glGetInternalformativ(GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint* params) { fp_glGetInternalformativ(target, internalformat, pname, bufSize, params); } inline void glGetActiveAtomicCounterBufferiv(GLuint program, GLuint bufferIndex, GLenum pname, GLint* params) { fp_glGetActiveAtomicCounterBufferiv(program, bufferIndex, pname, params); } inline void glBindImageTexture(GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format) { fp_glBindImageTexture(unit, texture, level, layered, layer, access, format); } inline void glMemoryBarrier(GLbitfield barriers) { fp_glMemoryBarrier(barriers); } inline void glTexStorage1D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width) { fp_glTexStorage1D(target, levels, internalformat, width); } inline void glTexStorage2D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height) { fp_glTexStorage2D(target, levels, internalformat, width, height); } inline void glTexStorage3D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth) { fp_glTexStorage3D(target, levels, internalformat, width, height, depth); } inline void glDrawTransformFeedbackInstanced(GLenum mode, GLuint id, GLsizei instancecount) { fp_glDrawTransformFeedbackInstanced(mode, id, instancecount); } inline void glDrawTransformFeedbackStreamInstanced(GLenum mode, GLuint id, GLuint stream, GLsizei instancecount) { fp_glDrawTransformFeedbackStreamInstanced(mode, id, stream, instancecount); } /* GL_VERSION_4_3 */ inline void glClearBufferData(GLenum target, GLenum internalformat, GLenum format, GLenum type, const void* data) { fp_glClearBufferData(target, internalformat, format, type, data); } inline void glClearBufferSubData(GLenum target, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void* data) { fp_glClearBufferSubData(target, internalformat, offset, size, format, type, data); } inline void glDispatchCompute(GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z) { fp_glDispatchCompute(num_groups_x, num_groups_y, num_groups_z); } inline void glDispatchComputeIndirect(GLintptr indirect) { fp_glDispatchComputeIndirect(indirect); } inline void glCopyImageSubData(GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth) { fp_glCopyImageSubData(srcName, srcTarget, srcLevel, srcX, srcY, srcZ, dstName, dstTarget, dstLevel, dstX, dstY, dstZ, srcWidth, srcHeight, srcDepth); } inline void glFramebufferParameteri(GLenum target, GLenum pname, GLint param) { fp_glFramebufferParameteri(target, pname, param); } inline void glGetFramebufferParameteriv(GLenum target, GLenum pname, GLint* params) { fp_glGetFramebufferParameteriv(target, pname, params); } inline void glGetInternalformati64v(GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint64* params) { fp_glGetInternalformati64v(target, internalformat, pname, bufSize, params); } inline void glInvalidateTexSubImage(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth) { fp_glInvalidateTexSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth); } inline void glInvalidateTexImage(GLuint texture, GLint level) { fp_glInvalidateTexImage(texture, level); } inline void glInvalidateBufferSubData(GLuint buffer, GLintptr offset, GLsizeiptr length) { fp_glInvalidateBufferSubData(buffer, offset, length); } inline void glInvalidateBufferData(GLuint buffer) { fp_glInvalidateBufferData(buffer); } inline void glInvalidateFramebuffer(GLenum target, GLsizei numAttachments, const GLenum* attachments) { fp_glInvalidateFramebuffer(target, numAttachments, attachments); } inline void glInvalidateSubFramebuffer(GLenum target, GLsizei numAttachments, const GLenum* attachments, GLint x, GLint y, GLsizei width, GLsizei height) { fp_glInvalidateSubFramebuffer(target, numAttachments, attachments, x, y, width, height); } inline void glMultiDrawArraysIndirect(GLenum mode, const void* indirect, GLsizei drawcount, GLsizei stride) { fp_glMultiDrawArraysIndirect(mode, indirect, drawcount, stride); } inline void glMultiDrawElementsIndirect(GLenum mode, GLenum type, const void* indirect, GLsizei drawcount, GLsizei stride) { fp_glMultiDrawElementsIndirect(mode, type, indirect, drawcount, stride); } inline void glGetProgramInterfaceiv(GLuint program, GLenum programInterface, GLenum pname, GLint* params) { fp_glGetProgramInterfaceiv(program, programInterface, pname, params); } inline GLuint glGetProgramResourceIndex(GLuint program, GLenum programInterface, const GLchar* name) { return fp_glGetProgramResourceIndex(program, programInterface, name); } inline void glGetProgramResourceName(GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei* length, GLchar* name) { fp_glGetProgramResourceName(program, programInterface, index, bufSize, length, name); } inline void glGetProgramResourceiv(GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum* props, GLsizei bufSize, GLsizei* length, GLint* params) { fp_glGetProgramResourceiv(program, programInterface, index, propCount, props, bufSize, length, params); } inline GLint glGetProgramResourceLocation(GLuint program, GLenum programInterface, const GLchar* name) { return fp_glGetProgramResourceLocation(program, programInterface, name); } inline GLint glGetProgramResourceLocationIndex(GLuint program, GLenum programInterface, const GLchar* name) { return fp_glGetProgramResourceLocationIndex(program, programInterface, name); } inline void glShaderStorageBlockBinding(GLuint program, GLuint storageBlockIndex, GLuint storageBlockBinding) { fp_glShaderStorageBlockBinding(program, storageBlockIndex, storageBlockBinding); } inline void glTexBufferRange(GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size) { fp_glTexBufferRange(target, internalformat, buffer, offset, size); } inline void glTexStorage2DMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations) { fp_glTexStorage2DMultisample(target, samples, internalformat, width, height, fixedsamplelocations); } inline void glTexStorage3DMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations) { fp_glTexStorage3DMultisample(target, samples, internalformat, width, height, depth, fixedsamplelocations); } inline void glTextureView(GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers) { fp_glTextureView(texture, target, origtexture, internalformat, minlevel, numlevels, minlayer, numlayers); } inline void glBindVertexBuffer(GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride) { fp_glBindVertexBuffer(bindingindex, buffer, offset, stride); } inline void glVertexAttribFormat(GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset) { fp_glVertexAttribFormat(attribindex, size, type, normalized, relativeoffset); } inline void glVertexAttribIFormat(GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset) { fp_glVertexAttribIFormat(attribindex, size, type, relativeoffset); } inline void glVertexAttribLFormat(GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset) { fp_glVertexAttribLFormat(attribindex, size, type, relativeoffset); } inline void glVertexAttribBinding(GLuint attribindex, GLuint bindingindex) { fp_glVertexAttribBinding(attribindex, bindingindex); } inline void glVertexBindingDivisor(GLuint bindingindex, GLuint divisor) { fp_glVertexBindingDivisor(bindingindex, divisor); } inline void glDebugMessageControl(GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint* ids, GLboolean enabled) { fp_glDebugMessageControl(source, type, severity, count, ids, enabled); } inline void glDebugMessageInsert(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar* buf) { fp_glDebugMessageInsert(source, type, id, severity, length, buf); } inline void glDebugMessageCallback(GLDEBUGPROC callback, const void* userParam) { fp_glDebugMessageCallback(callback, userParam); } inline GLuint glGetDebugMessageLog(GLuint count, GLsizei bufSize, GLenum* sources, GLenum* types, GLuint* ids, GLenum* severities, GLsizei* lengths, GLchar* messageLog) { return fp_glGetDebugMessageLog(count, bufSize, sources, types, ids, severities, lengths, messageLog); } inline void glPushDebugGroup(GLenum source, GLuint id, GLsizei length, const GLchar* message) { fp_glPushDebugGroup(source, id, length, message); } inline void glPopDebugGroup() { fp_glPopDebugGroup(); } inline void glObjectLabel(GLenum identifier, GLuint name, GLsizei length, const GLchar* label) { fp_glObjectLabel(identifier, name, length, label); } inline void glGetObjectLabel(GLenum identifier, GLuint name, GLsizei bufSize, GLsizei* length, GLchar* label) { fp_glGetObjectLabel(identifier, name, bufSize, length, label); } inline void glObjectPtrLabel(const void* ptr, GLsizei length, const GLchar* label) { fp_glObjectPtrLabel(ptr, length, label); } inline void glGetObjectPtrLabel(const void* ptr, GLsizei bufSize, GLsizei* length, GLchar* label) { fp_glGetObjectPtrLabel(ptr, bufSize, length, label); } /* GL_VERSION_4_4 */ inline void glBufferStorage(GLenum target, GLsizeiptr size, const void* data, GLbitfield flags) { fp_glBufferStorage(target, size, data, flags); } inline void glClearTexImage(GLuint texture, GLint level, GLenum format, GLenum type, const void* data) { fp_glClearTexImage(texture, level, format, type, data); } inline void glClearTexSubImage(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void* data) { fp_glClearTexSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, data); } inline void glBindBuffersBase(GLenum target, GLuint first, GLsizei count, const GLuint* buffers) { fp_glBindBuffersBase(target, first, count, buffers); } inline void glBindBuffersRange(GLenum target, GLuint first, GLsizei count, const GLuint* buffers, const GLintptr* offsets, const GLsizeiptr* sizes) { fp_glBindBuffersRange(target, first, count, buffers, offsets, sizes); } inline void glBindTextures(GLuint first, GLsizei count, const GLuint* textures) { fp_glBindTextures(first, count, textures); } inline void glBindSamplers(GLuint first, GLsizei count, const GLuint* samplers) { fp_glBindSamplers(first, count, samplers); } inline void glBindImageTextures(GLuint first, GLsizei count, const GLuint* textures) { fp_glBindImageTextures(first, count, textures); } inline void glBindVertexBuffers(GLuint first, GLsizei count, const GLuint* buffers, const GLintptr* offsets, const GLsizei* strides) { fp_glBindVertexBuffers(first, count, buffers, offsets, strides); } /* GL_VERSION_4_5 */ inline void glClipControl(GLenum origin, GLenum depth) { fp_glClipControl(origin, depth); } inline void glCreateTransformFeedbacks(GLsizei n, GLuint* ids) { fp_glCreateTransformFeedbacks(n, ids); } inline void glTransformFeedbackBufferBase(GLuint xfb, GLuint index, GLuint buffer) { fp_glTransformFeedbackBufferBase(xfb, index, buffer); } inline void glTransformFeedbackBufferRange(GLuint xfb, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size) { fp_glTransformFeedbackBufferRange(xfb, index, buffer, offset, size); } inline void glGetTransformFeedbackiv(GLuint xfb, GLenum pname, GLint* param) { fp_glGetTransformFeedbackiv(xfb, pname, param); } inline void glGetTransformFeedbacki_v(GLuint xfb, GLenum pname, GLuint index, GLint* param) { fp_glGetTransformFeedbacki_v(xfb, pname, index, param); } inline void glGetTransformFeedbacki64_v(GLuint xfb, GLenum pname, GLuint index, GLint64* param) { fp_glGetTransformFeedbacki64_v(xfb, pname, index, param); } inline void glCreateBuffers(GLsizei n, GLuint* buffers) { fp_glCreateBuffers(n, buffers); } inline void glNamedBufferStorage(GLuint buffer, GLsizeiptr size, const void* data, GLbitfield flags) { fp_glNamedBufferStorage(buffer, size, data, flags); } inline void glNamedBufferData(GLuint buffer, GLsizeiptr size, const void* data, GLenum usage) { fp_glNamedBufferData(buffer, size, data, usage); } inline void glNamedBufferSubData(GLuint buffer, GLintptr offset, GLsizeiptr size, const void* data) { fp_glNamedBufferSubData(buffer, offset, size, data); } inline void glCopyNamedBufferSubData(GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size) { fp_glCopyNamedBufferSubData(readBuffer, writeBuffer, readOffset, writeOffset, size); } inline void glClearNamedBufferData(GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const void* data) { fp_glClearNamedBufferData(buffer, internalformat, format, type, data); } inline void glClearNamedBufferSubData(GLuint buffer, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void* data) { fp_glClearNamedBufferSubData(buffer, internalformat, offset, size, format, type, data); } inline void* glMapNamedBuffer(GLuint buffer, GLenum access) { return fp_glMapNamedBuffer(buffer, access); } inline void* glMapNamedBufferRange(GLuint buffer, GLintptr offset, GLsizeiptr length, GLbitfield access) { return fp_glMapNamedBufferRange(buffer, offset, length, access); } inline GLboolean glUnmapNamedBuffer(GLuint buffer) { return fp_glUnmapNamedBuffer(buffer); } inline void glFlushMappedNamedBufferRange(GLuint buffer, GLintptr offset, GLsizeiptr length) { fp_glFlushMappedNamedBufferRange(buffer, offset, length); } inline void glGetNamedBufferParameteriv(GLuint buffer, GLenum pname, GLint* params) { fp_glGetNamedBufferParameteriv(buffer, pname, params); } inline void glGetNamedBufferParameteri64v(GLuint buffer, GLenum pname, GLint64* params) { fp_glGetNamedBufferParameteri64v(buffer, pname, params); } inline void glGetNamedBufferPointerv(GLuint buffer, GLenum pname, void** params) { fp_glGetNamedBufferPointerv(buffer, pname, params); } inline void glGetNamedBufferSubData(GLuint buffer, GLintptr offset, GLsizeiptr size, void* data) { fp_glGetNamedBufferSubData(buffer, offset, size, data); } inline void glCreateFramebuffers(GLsizei n, GLuint* framebuffers) { fp_glCreateFramebuffers(n, framebuffers); } inline void glNamedFramebufferRenderbuffer(GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) { fp_glNamedFramebufferRenderbuffer(framebuffer, attachment, renderbuffertarget, renderbuffer); } inline void glNamedFramebufferParameteri(GLuint framebuffer, GLenum pname, GLint param) { fp_glNamedFramebufferParameteri(framebuffer, pname, param); } inline void glNamedFramebufferTexture(GLuint framebuffer, GLenum attachment, GLuint texture, GLint level) { fp_glNamedFramebufferTexture(framebuffer, attachment, texture, level); } inline void glNamedFramebufferTextureLayer(GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer) { fp_glNamedFramebufferTextureLayer(framebuffer, attachment, texture, level, layer); } inline void glNamedFramebufferDrawBuffer(GLuint framebuffer, GLenum buf) { fp_glNamedFramebufferDrawBuffer(framebuffer, buf); } inline void glNamedFramebufferDrawBuffers(GLuint framebuffer, GLsizei n, const GLenum* bufs) { fp_glNamedFramebufferDrawBuffers(framebuffer, n, bufs); } inline void glNamedFramebufferReadBuffer(GLuint framebuffer, GLenum src) { fp_glNamedFramebufferReadBuffer(framebuffer, src); } inline void glInvalidateNamedFramebufferData(GLuint framebuffer, GLsizei numAttachments, const GLenum* attachments) { fp_glInvalidateNamedFramebufferData(framebuffer, numAttachments, attachments); } inline void glInvalidateNamedFramebufferSubData(GLuint framebuffer, GLsizei numAttachments, const GLenum* attachments, GLint x, GLint y, GLsizei width, GLsizei height) { fp_glInvalidateNamedFramebufferSubData(framebuffer, numAttachments, attachments, x, y, width, height); } inline void glClearNamedFramebufferiv(GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLint* value) { fp_glClearNamedFramebufferiv(framebuffer, buffer, drawbuffer, value); } inline void glClearNamedFramebufferuiv(GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLuint* value) { fp_glClearNamedFramebufferuiv(framebuffer, buffer, drawbuffer, value); } inline void glClearNamedFramebufferfv(GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLfloat* value) { fp_glClearNamedFramebufferfv(framebuffer, buffer, drawbuffer, value); } inline void glClearNamedFramebufferfi(GLuint framebuffer, GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil) { fp_glClearNamedFramebufferfi(framebuffer, buffer, drawbuffer, depth, stencil); } inline void glBlitNamedFramebuffer(GLuint readFramebuffer, GLuint drawFramebuffer, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter) { fp_glBlitNamedFramebuffer(readFramebuffer, drawFramebuffer, srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter); } inline GLenum glCheckNamedFramebufferStatus(GLuint framebuffer, GLenum target) { return fp_glCheckNamedFramebufferStatus(framebuffer, target); } inline void glGetNamedFramebufferParameteriv(GLuint framebuffer, GLenum pname, GLint* param) { fp_glGetNamedFramebufferParameteriv(framebuffer, pname, param); } inline void glGetNamedFramebufferAttachmentParameteriv(GLuint framebuffer, GLenum attachment, GLenum pname, GLint* params) { fp_glGetNamedFramebufferAttachmentParameteriv(framebuffer, attachment, pname, params); } inline void glCreateRenderbuffers(GLsizei n, GLuint* renderbuffers) { fp_glCreateRenderbuffers(n, renderbuffers); } inline void glNamedRenderbufferStorage(GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height) { fp_glNamedRenderbufferStorage(renderbuffer, internalformat, width, height); } inline void glNamedRenderbufferStorageMultisample(GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) { fp_glNamedRenderbufferStorageMultisample(renderbuffer, samples, internalformat, width, height); } inline void glGetNamedRenderbufferParameteriv(GLuint renderbuffer, GLenum pname, GLint* params) { fp_glGetNamedRenderbufferParameteriv(renderbuffer, pname, params); } inline void glCreateTextures(GLenum target, GLsizei n, GLuint* textures) { fp_glCreateTextures(target, n, textures); } inline void glTextureBuffer(GLuint texture, GLenum internalformat, GLuint buffer) { fp_glTextureBuffer(texture, internalformat, buffer); } inline void glTextureBufferRange(GLuint texture, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size) { fp_glTextureBufferRange(texture, internalformat, buffer, offset, size); } inline void glTextureStorage1D(GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width) { fp_glTextureStorage1D(texture, levels, internalformat, width); } inline void glTextureStorage2D(GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height) { fp_glTextureStorage2D(texture, levels, internalformat, width, height); } inline void glTextureStorage3D(GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth) { fp_glTextureStorage3D(texture, levels, internalformat, width, height, depth); } inline void glTextureStorage2DMultisample(GLuint texture, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations) { fp_glTextureStorage2DMultisample(texture, samples, internalformat, width, height, fixedsamplelocations); } inline void glTextureStorage3DMultisample(GLuint texture, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations) { fp_glTextureStorage3DMultisample(texture, samples, internalformat, width, height, depth, fixedsamplelocations); } inline void glTextureSubImage1D(GLuint texture, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void* pixels) { fp_glTextureSubImage1D(texture, level, xoffset, width, format, type, pixels); } inline void glTextureSubImage2D(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void* pixels) { fp_glTextureSubImage2D(texture, level, xoffset, yoffset, width, height, format, type, pixels); } inline void glTextureSubImage3D(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void* pixels) { fp_glTextureSubImage3D(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); } inline void glCompressedTextureSubImage1D(GLuint texture, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void* data) { fp_glCompressedTextureSubImage1D(texture, level, xoffset, width, format, imageSize, data); } inline void glCompressedTextureSubImage2D(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void* data) { fp_glCompressedTextureSubImage2D(texture, level, xoffset, yoffset, width, height, format, imageSize, data); } inline void glCompressedTextureSubImage3D(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void* data) { fp_glCompressedTextureSubImage3D(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data); } inline void glCopyTextureSubImage1D(GLuint texture, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width) { fp_glCopyTextureSubImage1D(texture, level, xoffset, x, y, width); } inline void glCopyTextureSubImage2D(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) { fp_glCopyTextureSubImage2D(texture, level, xoffset, yoffset, x, y, width, height); } inline void glCopyTextureSubImage3D(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height) { fp_glCopyTextureSubImage3D(texture, level, xoffset, yoffset, zoffset, x, y, width, height); } inline void glTextureParameterf(GLuint texture, GLenum pname, GLfloat param) { fp_glTextureParameterf(texture, pname, param); } inline void glTextureParameterfv(GLuint texture, GLenum pname, const GLfloat* param) { fp_glTextureParameterfv(texture, pname, param); } inline void glTextureParameteri(GLuint texture, GLenum pname, GLint param) { fp_glTextureParameteri(texture, pname, param); } inline void glTextureParameterIiv(GLuint texture, GLenum pname, const GLint* params) { fp_glTextureParameterIiv(texture, pname, params); } inline void glTextureParameterIuiv(GLuint texture, GLenum pname, const GLuint* params) { fp_glTextureParameterIuiv(texture, pname, params); } inline void glTextureParameteriv(GLuint texture, GLenum pname, const GLint* param) { fp_glTextureParameteriv(texture, pname, param); } inline void glGenerateTextureMipmap(GLuint texture) { fp_glGenerateTextureMipmap(texture); } inline void glBindTextureUnit(GLuint unit, GLuint texture) { fp_glBindTextureUnit(unit, texture); } inline void glGetTextureImage(GLuint texture, GLint level, GLenum format, GLenum type, GLsizei bufSize, void* pixels) { fp_glGetTextureImage(texture, level, format, type, bufSize, pixels); } inline void glGetCompressedTextureImage(GLuint texture, GLint level, GLsizei bufSize, void* pixels) { fp_glGetCompressedTextureImage(texture, level, bufSize, pixels); } inline void glGetTextureLevelParameterfv(GLuint texture, GLint level, GLenum pname, GLfloat* params) { fp_glGetTextureLevelParameterfv(texture, level, pname, params); } inline void glGetTextureLevelParameteriv(GLuint texture, GLint level, GLenum pname, GLint* params) { fp_glGetTextureLevelParameteriv(texture, level, pname, params); } inline void glGetTextureParameterfv(GLuint texture, GLenum pname, GLfloat* params) { fp_glGetTextureParameterfv(texture, pname, params); } inline void glGetTextureParameterIiv(GLuint texture, GLenum pname, GLint* params) { fp_glGetTextureParameterIiv(texture, pname, params); } inline void glGetTextureParameterIuiv(GLuint texture, GLenum pname, GLuint* params) { fp_glGetTextureParameterIuiv(texture, pname, params); } inline void glGetTextureParameteriv(GLuint texture, GLenum pname, GLint* params) { fp_glGetTextureParameteriv(texture, pname, params); } inline void glCreateVertexArrays(GLsizei n, GLuint* arrays) { fp_glCreateVertexArrays(n, arrays); } inline void glDisableVertexArrayAttrib(GLuint vaobj, GLuint index) { fp_glDisableVertexArrayAttrib(vaobj, index); } inline void glEnableVertexArrayAttrib(GLuint vaobj, GLuint index) { fp_glEnableVertexArrayAttrib(vaobj, index); } inline void glVertexArrayElementBuffer(GLuint vaobj, GLuint buffer) { fp_glVertexArrayElementBuffer(vaobj, buffer); } inline void glVertexArrayVertexBuffer(GLuint vaobj, GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride) { fp_glVertexArrayVertexBuffer(vaobj, bindingindex, buffer, offset, stride); } inline void glVertexArrayVertexBuffers(GLuint vaobj, GLuint first, GLsizei count, const GLuint* buffers, const GLintptr* offsets, const GLsizei* strides) { fp_glVertexArrayVertexBuffers(vaobj, first, count, buffers, offsets, strides); } inline void glVertexArrayAttribBinding(GLuint vaobj, GLuint attribindex, GLuint bindingindex) { fp_glVertexArrayAttribBinding(vaobj, attribindex, bindingindex); } inline void glVertexArrayAttribFormat(GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset) { fp_glVertexArrayAttribFormat(vaobj, attribindex, size, type, normalized, relativeoffset); } inline void glVertexArrayAttribIFormat(GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset) { fp_glVertexArrayAttribIFormat(vaobj, attribindex, size, type, relativeoffset); } inline void glVertexArrayAttribLFormat(GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset) { fp_glVertexArrayAttribLFormat(vaobj, attribindex, size, type, relativeoffset); } inline void glVertexArrayBindingDivisor(GLuint vaobj, GLuint bindingindex, GLuint divisor) { fp_glVertexArrayBindingDivisor(vaobj, bindingindex, divisor); } inline void glGetVertexArrayiv(GLuint vaobj, GLenum pname, GLint* param) { fp_glGetVertexArrayiv(vaobj, pname, param); } inline void glGetVertexArrayIndexediv(GLuint vaobj, GLuint index, GLenum pname, GLint* param) { fp_glGetVertexArrayIndexediv(vaobj, index, pname, param); } inline void glGetVertexArrayIndexed64iv(GLuint vaobj, GLuint index, GLenum pname, GLint64* param) { fp_glGetVertexArrayIndexed64iv(vaobj, index, pname, param); } inline void glCreateSamplers(GLsizei n, GLuint* samplers) { fp_glCreateSamplers(n, samplers); } inline void glCreateProgramPipelines(GLsizei n, GLuint* pipelines) { fp_glCreateProgramPipelines(n, pipelines); } inline void glCreateQueries(GLenum target, GLsizei n, GLuint* ids) { fp_glCreateQueries(target, n, ids); } inline void glGetQueryBufferObjecti64v(GLuint id, GLuint buffer, GLenum pname, GLintptr offset) { fp_glGetQueryBufferObjecti64v(id, buffer, pname, offset); } inline void glGetQueryBufferObjectiv(GLuint id, GLuint buffer, GLenum pname, GLintptr offset) { fp_glGetQueryBufferObjectiv(id, buffer, pname, offset); } inline void glGetQueryBufferObjectui64v(GLuint id, GLuint buffer, GLenum pname, GLintptr offset) { fp_glGetQueryBufferObjectui64v(id, buffer, pname, offset); } inline void glGetQueryBufferObjectuiv(GLuint id, GLuint buffer, GLenum pname, GLintptr offset) { fp_glGetQueryBufferObjectuiv(id, buffer, pname, offset); } inline void glMemoryBarrierByRegion(GLbitfield barriers) { fp_glMemoryBarrierByRegion(barriers); } inline void glGetTextureSubImage(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLsizei bufSize, void* pixels) { fp_glGetTextureSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, bufSize, pixels); } inline void glGetCompressedTextureSubImage(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei bufSize, void* pixels) { fp_glGetCompressedTextureSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, bufSize, pixels); } inline GLenum glGetGraphicsResetStatus() { return fp_glGetGraphicsResetStatus(); } inline void glGetnCompressedTexImage(GLenum target, GLint lod, GLsizei bufSize, void* pixels) { fp_glGetnCompressedTexImage(target, lod, bufSize, pixels); } inline void glGetnTexImage(GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, void* pixels) { fp_glGetnTexImage(target, level, format, type, bufSize, pixels); } inline void glGetnUniformdv(GLuint program, GLint location, GLsizei bufSize, GLdouble* params) { fp_glGetnUniformdv(program, location, bufSize, params); } inline void glGetnUniformfv(GLuint program, GLint location, GLsizei bufSize, GLfloat* params) { fp_glGetnUniformfv(program, location, bufSize, params); } inline void glGetnUniformiv(GLuint program, GLint location, GLsizei bufSize, GLint* params) { fp_glGetnUniformiv(program, location, bufSize, params); } inline void glGetnUniformuiv(GLuint program, GLint location, GLsizei bufSize, GLuint* params) { fp_glGetnUniformuiv(program, location, bufSize, params); } inline void glReadnPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void* data) { fp_glReadnPixels(x, y, width, height, format, type, bufSize, data); } inline void glGetnMapdv(GLenum target, GLenum query, GLsizei bufSize, GLdouble* v) { fp_glGetnMapdv(target, query, bufSize, v); } inline void glGetnMapfv(GLenum target, GLenum query, GLsizei bufSize, GLfloat* v) { fp_glGetnMapfv(target, query, bufSize, v); } inline void glGetnMapiv(GLenum target, GLenum query, GLsizei bufSize, GLint* v) { fp_glGetnMapiv(target, query, bufSize, v); } inline void glGetnPixelMapfv(GLenum map, GLsizei bufSize, GLfloat* values) { fp_glGetnPixelMapfv(map, bufSize, values); } inline void glGetnPixelMapuiv(GLenum map, GLsizei bufSize, GLuint* values) { fp_glGetnPixelMapuiv(map, bufSize, values); } inline void glGetnPixelMapusv(GLenum map, GLsizei bufSize, GLushort* values) { fp_glGetnPixelMapusv(map, bufSize, values); } inline void glGetnPolygonStipple(GLsizei bufSize, GLubyte* pattern) { fp_glGetnPolygonStipple(bufSize, pattern); } inline void glGetnColorTable(GLenum target, GLenum format, GLenum type, GLsizei bufSize, void* table) { fp_glGetnColorTable(target, format, type, bufSize, table); } inline void glGetnConvolutionFilter(GLenum target, GLenum format, GLenum type, GLsizei bufSize, void* image) { fp_glGetnConvolutionFilter(target, format, type, bufSize, image); } inline void glGetnSeparableFilter(GLenum target, GLenum format, GLenum type, GLsizei rowBufSize, void* row, GLsizei columnBufSize, void* column, void* span) { fp_glGetnSeparableFilter(target, format, type, rowBufSize, row, columnBufSize, column, span); } inline void glGetnHistogram(GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, void* values) { fp_glGetnHistogram(target, reset, format, type, bufSize, values); } inline void glGetnMinmax(GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, void* values) { fp_glGetnMinmax(target, reset, format, type, bufSize, values); } inline void glTextureBarrier() { fp_glTextureBarrier(); } /* GL_ES_VERSION_3_2 */ inline void glBlendBarrier() { fp_glBlendBarrier(); } inline void glPrimitiveBoundingBox(GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW) { fp_glPrimitiveBoundingBox(minX, minY, minZ, minW, maxX, maxY, maxZ, maxW); } /* GL_KHR_blend_equation_advanced */ inline void glBlendBarrierKHR() { fp_glBlendBarrierKHR(); } /* GL_KHR_debug */ inline void glDebugMessageControlKHR(GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint* ids, GLboolean enabled) { fp_glDebugMessageControlKHR(source, type, severity, count, ids, enabled); } inline void glDebugMessageInsertKHR(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar* buf) { fp_glDebugMessageInsertKHR(source, type, id, severity, length, buf); } inline void glDebugMessageCallbackKHR(GLDEBUGPROCKHR callback, const void* userParam) { fp_glDebugMessageCallbackKHR(callback, userParam); } inline GLuint glGetDebugMessageLogKHR(GLuint count, GLsizei bufSize, GLenum* sources, GLenum* types, GLuint* ids, GLenum* severities, GLsizei* lengths, GLchar* messageLog) { return fp_glGetDebugMessageLogKHR(count, bufSize, sources, types, ids, severities, lengths, messageLog); } inline void glPushDebugGroupKHR(GLenum source, GLuint id, GLsizei length, const GLchar* message) { fp_glPushDebugGroupKHR(source, id, length, message); } inline void glPopDebugGroupKHR() { fp_glPopDebugGroupKHR(); } inline void glObjectLabelKHR(GLenum identifier, GLuint name, GLsizei length, const GLchar* label) { fp_glObjectLabelKHR(identifier, name, length, label); } inline void glGetObjectLabelKHR(GLenum identifier, GLuint name, GLsizei bufSize, GLsizei* length, GLchar* label) { fp_glGetObjectLabelKHR(identifier, name, bufSize, length, label); } inline void glObjectPtrLabelKHR(const void* ptr, GLsizei length, const GLchar* label) { fp_glObjectPtrLabelKHR(ptr, length, label); } inline void glGetObjectPtrLabelKHR(const void* ptr, GLsizei bufSize, GLsizei* length, GLchar* label) { fp_glGetObjectPtrLabelKHR(ptr, bufSize, length, label); } inline void glGetPointervKHR(GLenum pname, void** params) { fp_glGetPointervKHR(pname, params); } /* GL_KHR_robustness */ inline GLenum glGetGraphicsResetStatusKHR() { return fp_glGetGraphicsResetStatusKHR(); } inline void glReadnPixelsKHR(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void* data) { fp_glReadnPixelsKHR(x, y, width, height, format, type, bufSize, data); } inline void glGetnUniformfvKHR(GLuint program, GLint location, GLsizei bufSize, GLfloat* params) { fp_glGetnUniformfvKHR(program, location, bufSize, params); } inline void glGetnUniformivKHR(GLuint program, GLint location, GLsizei bufSize, GLint* params) { fp_glGetnUniformivKHR(program, location, bufSize, params); } inline void glGetnUniformuivKHR(GLuint program, GLint location, GLsizei bufSize, GLuint* params) { fp_glGetnUniformuivKHR(program, location, bufSize, params); } /* GL_ARB_bindless_texture */ inline GLuint64 glGetTextureHandleARB(GLuint texture) { return fp_glGetTextureHandleARB(texture); } inline GLuint64 glGetTextureSamplerHandleARB(GLuint texture, GLuint sampler) { return fp_glGetTextureSamplerHandleARB(texture, sampler); } inline void glMakeTextureHandleResidentARB(GLuint64 handle) { fp_glMakeTextureHandleResidentARB(handle); } inline void glMakeTextureHandleNonResidentARB(GLuint64 handle) { fp_glMakeTextureHandleNonResidentARB(handle); } inline GLuint64 glGetImageHandleARB(GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format) { return fp_glGetImageHandleARB(texture, level, layered, layer, format); } inline void glMakeImageHandleResidentARB(GLuint64 handle, GLenum access) { fp_glMakeImageHandleResidentARB(handle, access); } inline void glMakeImageHandleNonResidentARB(GLuint64 handle) { fp_glMakeImageHandleNonResidentARB(handle); } inline void glUniformHandleui64ARB(GLint location, GLuint64 value) { fp_glUniformHandleui64ARB(location, value); } inline void glUniformHandleui64vARB(GLint location, GLsizei count, const GLuint64* value) { fp_glUniformHandleui64vARB(location, count, value); } inline void glProgramUniformHandleui64ARB(GLuint program, GLint location, GLuint64 value) { fp_glProgramUniformHandleui64ARB(program, location, value); } inline void glProgramUniformHandleui64vARB(GLuint program, GLint location, GLsizei count, const GLuint64* values) { fp_glProgramUniformHandleui64vARB(program, location, count, values); } inline GLboolean glIsTextureHandleResidentARB(GLuint64 handle) { return fp_glIsTextureHandleResidentARB(handle); } inline GLboolean glIsImageHandleResidentARB(GLuint64 handle) { return fp_glIsImageHandleResidentARB(handle); } inline void glVertexAttribL1ui64ARB(GLuint index, GLuint64EXT x) { fp_glVertexAttribL1ui64ARB(index, x); } inline void glVertexAttribL1ui64vARB(GLuint index, const GLuint64EXT* v) { fp_glVertexAttribL1ui64vARB(index, v); } inline void glGetVertexAttribLui64vARB(GLuint index, GLenum pname, GLuint64EXT* params) { fp_glGetVertexAttribLui64vARB(index, pname, params); } /* GL_ARB_cl_event */ inline GLsync glCreateSyncFromCLeventARB(struct _cl_context* context, struct _cl_event* event, GLbitfield flags) { return fp_glCreateSyncFromCLeventARB(context, event, flags); } /* GL_ARB_color_buffer_float */ inline void glClampColorARB(GLenum target, GLenum clamp) { fp_glClampColorARB(target, clamp); } /* GL_ARB_compute_variable_group_size */ inline void glDispatchComputeGroupSizeARB(GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z, GLuint group_size_x, GLuint group_size_y, GLuint group_size_z) { fp_glDispatchComputeGroupSizeARB(num_groups_x, num_groups_y, num_groups_z, group_size_x, group_size_y, group_size_z); } /* GL_ARB_debug_output */ inline void glDebugMessageControlARB(GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint* ids, GLboolean enabled) { fp_glDebugMessageControlARB(source, type, severity, count, ids, enabled); } inline void glDebugMessageInsertARB(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar* buf) { fp_glDebugMessageInsertARB(source, type, id, severity, length, buf); } inline void glDebugMessageCallbackARB(GLDEBUGPROCARB callback, const void* userParam) { fp_glDebugMessageCallbackARB(callback, userParam); } inline GLuint glGetDebugMessageLogARB(GLuint count, GLsizei bufSize, GLenum* sources, GLenum* types, GLuint* ids, GLenum* severities, GLsizei* lengths, GLchar* messageLog) { return fp_glGetDebugMessageLogARB(count, bufSize, sources, types, ids, severities, lengths, messageLog); } /* GL_ARB_draw_buffers_blend */ inline void glBlendEquationiARB(GLuint buf, GLenum mode) { fp_glBlendEquationiARB(buf, mode); } inline void glBlendEquationSeparateiARB(GLuint buf, GLenum modeRGB, GLenum modeAlpha) { fp_glBlendEquationSeparateiARB(buf, modeRGB, modeAlpha); } inline void glBlendFunciARB(GLuint buf, GLenum src, GLenum dst) { fp_glBlendFunciARB(buf, src, dst); } inline void glBlendFuncSeparateiARB(GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) { fp_glBlendFuncSeparateiARB(buf, srcRGB, dstRGB, srcAlpha, dstAlpha); } /* GL_ARB_draw_instanced */ inline void glDrawArraysInstancedARB(GLenum mode, GLint first, GLsizei count, GLsizei primcount) { fp_glDrawArraysInstancedARB(mode, first, count, primcount); } inline void glDrawElementsInstancedARB(GLenum mode, GLsizei count, GLenum type, const void* indices, GLsizei primcount) { fp_glDrawElementsInstancedARB(mode, count, type, indices, primcount); } /* GL_ARB_ES3_2_compatibility */ inline void glPrimitiveBoundingBoxARB(GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW) { fp_glPrimitiveBoundingBoxARB(minX, minY, minZ, minW, maxX, maxY, maxZ, maxW); } /* GL_ARB_geometry_shader4 */ inline void glProgramParameteriARB(GLuint program, GLenum pname, GLint value) { fp_glProgramParameteriARB(program, pname, value); } inline void glFramebufferTextureARB(GLenum target, GLenum attachment, GLuint texture, GLint level) { fp_glFramebufferTextureARB(target, attachment, texture, level); } inline void glFramebufferTextureLayerARB(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer) { fp_glFramebufferTextureLayerARB(target, attachment, texture, level, layer); } inline void glFramebufferTextureFaceARB(GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face) { fp_glFramebufferTextureFaceARB(target, attachment, texture, level, face); } /* GL_ARB_gpu_shader_int64 */ inline void glUniform1i64ARB(GLint location, GLint64 x) { fp_glUniform1i64ARB(location, x); } inline void glUniform2i64ARB(GLint location, GLint64 x, GLint64 y) { fp_glUniform2i64ARB(location, x, y); } inline void glUniform3i64ARB(GLint location, GLint64 x, GLint64 y, GLint64 z) { fp_glUniform3i64ARB(location, x, y, z); } inline void glUniform4i64ARB(GLint location, GLint64 x, GLint64 y, GLint64 z, GLint64 w) { fp_glUniform4i64ARB(location, x, y, z, w); } inline void glUniform1i64vARB(GLint location, GLsizei count, const GLint64* value) { fp_glUniform1i64vARB(location, count, value); } inline void glUniform2i64vARB(GLint location, GLsizei count, const GLint64* value) { fp_glUniform2i64vARB(location, count, value); } inline void glUniform3i64vARB(GLint location, GLsizei count, const GLint64* value) { fp_glUniform3i64vARB(location, count, value); } inline void glUniform4i64vARB(GLint location, GLsizei count, const GLint64* value) { fp_glUniform4i64vARB(location, count, value); } inline void glUniform1ui64ARB(GLint location, GLuint64 x) { fp_glUniform1ui64ARB(location, x); } inline void glUniform2ui64ARB(GLint location, GLuint64 x, GLuint64 y) { fp_glUniform2ui64ARB(location, x, y); } inline void glUniform3ui64ARB(GLint location, GLuint64 x, GLuint64 y, GLuint64 z) { fp_glUniform3ui64ARB(location, x, y, z); } inline void glUniform4ui64ARB(GLint location, GLuint64 x, GLuint64 y, GLuint64 z, GLuint64 w) { fp_glUniform4ui64ARB(location, x, y, z, w); } inline void glUniform1ui64vARB(GLint location, GLsizei count, const GLuint64* value) { fp_glUniform1ui64vARB(location, count, value); } inline void glUniform2ui64vARB(GLint location, GLsizei count, const GLuint64* value) { fp_glUniform2ui64vARB(location, count, value); } inline void glUniform3ui64vARB(GLint location, GLsizei count, const GLuint64* value) { fp_glUniform3ui64vARB(location, count, value); } inline void glUniform4ui64vARB(GLint location, GLsizei count, const GLuint64* value) { fp_glUniform4ui64vARB(location, count, value); } inline void glGetUniformi64vARB(GLuint program, GLint location, GLint64* params) { fp_glGetUniformi64vARB(program, location, params); } inline void glGetUniformui64vARB(GLuint program, GLint location, GLuint64* params) { fp_glGetUniformui64vARB(program, location, params); } inline void glGetnUniformi64vARB(GLuint program, GLint location, GLsizei bufSize, GLint64* params) { fp_glGetnUniformi64vARB(program, location, bufSize, params); } inline void glGetnUniformui64vARB(GLuint program, GLint location, GLsizei bufSize, GLuint64* params) { fp_glGetnUniformui64vARB(program, location, bufSize, params); } inline void glProgramUniform1i64ARB(GLuint program, GLint location, GLint64 x) { fp_glProgramUniform1i64ARB(program, location, x); } inline void glProgramUniform2i64ARB(GLuint program, GLint location, GLint64 x, GLint64 y) { fp_glProgramUniform2i64ARB(program, location, x, y); } inline void glProgramUniform3i64ARB(GLuint program, GLint location, GLint64 x, GLint64 y, GLint64 z) { fp_glProgramUniform3i64ARB(program, location, x, y, z); } inline void glProgramUniform4i64ARB(GLuint program, GLint location, GLint64 x, GLint64 y, GLint64 z, GLint64 w) { fp_glProgramUniform4i64ARB(program, location, x, y, z, w); } inline void glProgramUniform1i64vARB(GLuint program, GLint location, GLsizei count, const GLint64* value) { fp_glProgramUniform1i64vARB(program, location, count, value); } inline void glProgramUniform2i64vARB(GLuint program, GLint location, GLsizei count, const GLint64* value) { fp_glProgramUniform2i64vARB(program, location, count, value); } inline void glProgramUniform3i64vARB(GLuint program, GLint location, GLsizei count, const GLint64* value) { fp_glProgramUniform3i64vARB(program, location, count, value); } inline void glProgramUniform4i64vARB(GLuint program, GLint location, GLsizei count, const GLint64* value) { fp_glProgramUniform4i64vARB(program, location, count, value); } inline void glProgramUniform1ui64ARB(GLuint program, GLint location, GLuint64 x) { fp_glProgramUniform1ui64ARB(program, location, x); } inline void glProgramUniform2ui64ARB(GLuint program, GLint location, GLuint64 x, GLuint64 y) { fp_glProgramUniform2ui64ARB(program, location, x, y); } inline void glProgramUniform3ui64ARB(GLuint program, GLint location, GLuint64 x, GLuint64 y, GLuint64 z) { fp_glProgramUniform3ui64ARB(program, location, x, y, z); } inline void glProgramUniform4ui64ARB(GLuint program, GLint location, GLuint64 x, GLuint64 y, GLuint64 z, GLuint64 w) { fp_glProgramUniform4ui64ARB(program, location, x, y, z, w); } inline void glProgramUniform1ui64vARB(GLuint program, GLint location, GLsizei count, const GLuint64* value) { fp_glProgramUniform1ui64vARB(program, location, count, value); } inline void glProgramUniform2ui64vARB(GLuint program, GLint location, GLsizei count, const GLuint64* value) { fp_glProgramUniform2ui64vARB(program, location, count, value); } inline void glProgramUniform3ui64vARB(GLuint program, GLint location, GLsizei count, const GLuint64* value) { fp_glProgramUniform3ui64vARB(program, location, count, value); } inline void glProgramUniform4ui64vARB(GLuint program, GLint location, GLsizei count, const GLuint64* value) { fp_glProgramUniform4ui64vARB(program, location, count, value); } /* GL_ARB_indirect_parameters */ inline void glMultiDrawArraysIndirectCountARB(GLenum mode, GLintptr indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride) { fp_glMultiDrawArraysIndirectCountARB(mode, indirect, drawcount, maxdrawcount, stride); } inline void glMultiDrawElementsIndirectCountARB(GLenum mode, GLenum type, GLintptr indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride) { fp_glMultiDrawElementsIndirectCountARB(mode, type, indirect, drawcount, maxdrawcount, stride); } /* GL_ARB_instanced_arrays */ inline void glVertexAttribDivisorARB(GLuint index, GLuint divisor) { fp_glVertexAttribDivisorARB(index, divisor); } /* GL_ARB_parallel_shader_compile */ inline void glMaxShaderCompilerThreadsARB(GLuint count) { fp_glMaxShaderCompilerThreadsARB(count); } /* GL_ARB_robustness */ inline GLenum glGetGraphicsResetStatusARB() { return fp_glGetGraphicsResetStatusARB(); } inline void glGetnTexImageARB(GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, void* img) { fp_glGetnTexImageARB(target, level, format, type, bufSize, img); } inline void glReadnPixelsARB(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void* data) { fp_glReadnPixelsARB(x, y, width, height, format, type, bufSize, data); } inline void glGetnCompressedTexImageARB(GLenum target, GLint lod, GLsizei bufSize, void* img) { fp_glGetnCompressedTexImageARB(target, lod, bufSize, img); } inline void glGetnUniformfvARB(GLuint program, GLint location, GLsizei bufSize, GLfloat* params) { fp_glGetnUniformfvARB(program, location, bufSize, params); } inline void glGetnUniformivARB(GLuint program, GLint location, GLsizei bufSize, GLint* params) { fp_glGetnUniformivARB(program, location, bufSize, params); } inline void glGetnUniformuivARB(GLuint program, GLint location, GLsizei bufSize, GLuint* params) { fp_glGetnUniformuivARB(program, location, bufSize, params); } inline void glGetnUniformdvARB(GLuint program, GLint location, GLsizei bufSize, GLdouble* params) { fp_glGetnUniformdvARB(program, location, bufSize, params); } inline void glGetnMapdvARB(GLenum target, GLenum query, GLsizei bufSize, GLdouble* v) { fp_glGetnMapdvARB(target, query, bufSize, v); } inline void glGetnMapfvARB(GLenum target, GLenum query, GLsizei bufSize, GLfloat* v) { fp_glGetnMapfvARB(target, query, bufSize, v); } inline void glGetnMapivARB(GLenum target, GLenum query, GLsizei bufSize, GLint* v) { fp_glGetnMapivARB(target, query, bufSize, v); } inline void glGetnPixelMapfvARB(GLenum map, GLsizei bufSize, GLfloat* values) { fp_glGetnPixelMapfvARB(map, bufSize, values); } inline void glGetnPixelMapuivARB(GLenum map, GLsizei bufSize, GLuint* values) { fp_glGetnPixelMapuivARB(map, bufSize, values); } inline void glGetnPixelMapusvARB(GLenum map, GLsizei bufSize, GLushort* values) { fp_glGetnPixelMapusvARB(map, bufSize, values); } inline void glGetnPolygonStippleARB(GLsizei bufSize, GLubyte* pattern) { fp_glGetnPolygonStippleARB(bufSize, pattern); } inline void glGetnColorTableARB(GLenum target, GLenum format, GLenum type, GLsizei bufSize, void* table) { fp_glGetnColorTableARB(target, format, type, bufSize, table); } inline void glGetnConvolutionFilterARB(GLenum target, GLenum format, GLenum type, GLsizei bufSize, void* image) { fp_glGetnConvolutionFilterARB(target, format, type, bufSize, image); } inline void glGetnSeparableFilterARB(GLenum target, GLenum format, GLenum type, GLsizei rowBufSize, void* row, GLsizei columnBufSize, void* column, void* span) { fp_glGetnSeparableFilterARB(target, format, type, rowBufSize, row, columnBufSize, column, span); } inline void glGetnHistogramARB(GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, void* values) { fp_glGetnHistogramARB(target, reset, format, type, bufSize, values); } inline void glGetnMinmaxARB(GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, void* values) { fp_glGetnMinmaxARB(target, reset, format, type, bufSize, values); } /* GL_ARB_sample_locations */ inline void glFramebufferSampleLocationsfvARB(GLenum target, GLuint start, GLsizei count, const GLfloat* v) { fp_glFramebufferSampleLocationsfvARB(target, start, count, v); } inline void glNamedFramebufferSampleLocationsfvARB(GLuint framebuffer, GLuint start, GLsizei count, const GLfloat* v) { fp_glNamedFramebufferSampleLocationsfvARB(framebuffer, start, count, v); } inline void glEvaluateDepthValuesARB() { fp_glEvaluateDepthValuesARB(); } /* GL_ARB_sample_shading */ inline void glMinSampleShadingARB(GLfloat value) { fp_glMinSampleShadingARB(value); } /* GL_ARB_shading_language_include */ inline void glNamedStringARB(GLenum type, GLint namelen, const GLchar* name, GLint stringlen, const GLchar* string) { fp_glNamedStringARB(type, namelen, name, stringlen, string); } inline void glDeleteNamedStringARB(GLint namelen, const GLchar* name) { fp_glDeleteNamedStringARB(namelen, name); } inline void glCompileShaderIncludeARB(GLuint shader, GLsizei count, const GLchar** path, const GLint* length) { fp_glCompileShaderIncludeARB(shader, count, path, length); } inline GLboolean glIsNamedStringARB(GLint namelen, const GLchar* name) { return fp_glIsNamedStringARB(namelen, name); } inline void glGetNamedStringARB(GLint namelen, const GLchar* name, GLsizei bufSize, GLint* stringlen, GLchar* string) { fp_glGetNamedStringARB(namelen, name, bufSize, stringlen, string); } inline void glGetNamedStringivARB(GLint namelen, const GLchar* name, GLenum pname, GLint* params) { fp_glGetNamedStringivARB(namelen, name, pname, params); } /* GL_ARB_sparse_buffer */ inline void glBufferPageCommitmentARB(GLenum target, GLintptr offset, GLsizeiptr size, GLboolean commit) { fp_glBufferPageCommitmentARB(target, offset, size, commit); } inline void glNamedBufferPageCommitmentEXT(GLuint buffer, GLintptr offset, GLsizeiptr size, GLboolean commit) { fp_glNamedBufferPageCommitmentEXT(buffer, offset, size, commit); } inline void glNamedBufferPageCommitmentARB(GLuint buffer, GLintptr offset, GLsizeiptr size, GLboolean commit) { fp_glNamedBufferPageCommitmentARB(buffer, offset, size, commit); } /* GL_ARB_sparse_texture */ inline void glTexPageCommitmentARB(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean commit) { fp_glTexPageCommitmentARB(target, level, xoffset, yoffset, zoffset, width, height, depth, commit); } /* GL_ARB_texture_buffer_object */ inline void glTexBufferARB(GLenum target, GLenum internalformat, GLuint buffer) { fp_glTexBufferARB(target, internalformat, buffer); } /* GL_EXT_base_instance */ inline void glDrawArraysInstancedBaseInstanceEXT(GLenum mode, GLint first, GLsizei count, GLsizei instancecount, GLuint baseinstance) { fp_glDrawArraysInstancedBaseInstanceEXT(mode, first, count, instancecount, baseinstance); } inline void glDrawElementsInstancedBaseInstanceEXT(GLenum mode, GLsizei count, GLenum type, const void* indices, GLsizei instancecount, GLuint baseinstance) { fp_glDrawElementsInstancedBaseInstanceEXT(mode, count, type, indices, instancecount, baseinstance); } inline void glDrawElementsInstancedBaseVertexBaseInstanceEXT(GLenum mode, GLsizei count, GLenum type, const void* indices, GLsizei instancecount, GLint basevertex, GLuint baseinstance) { fp_glDrawElementsInstancedBaseVertexBaseInstanceEXT(mode, count, type, indices, instancecount, basevertex, baseinstance); } /* GL_EXT_bindable_uniform */ inline void glUniformBufferEXT(GLuint program, GLint location, GLuint buffer) { fp_glUniformBufferEXT(program, location, buffer); } inline GLint glGetUniformBufferSizeEXT(GLuint program, GLint location) { return fp_glGetUniformBufferSizeEXT(program, location); } inline GLintptr glGetUniformOffsetEXT(GLuint program, GLint location) { return fp_glGetUniformOffsetEXT(program, location); } /* GL_EXT_blend_func_extended */ inline void glBindFragDataLocationIndexedEXT(GLuint program, GLuint colorNumber, GLuint index, const GLchar* name) { fp_glBindFragDataLocationIndexedEXT(program, colorNumber, index, name); } inline void glBindFragDataLocationEXT(GLuint program, GLuint color, const GLchar* name) { fp_glBindFragDataLocationEXT(program, color, name); } inline GLint glGetProgramResourceLocationIndexEXT(GLuint program, GLenum programInterface, const GLchar* name) { return fp_glGetProgramResourceLocationIndexEXT(program, programInterface, name); } inline GLint glGetFragDataIndexEXT(GLuint program, const GLchar* name) { return fp_glGetFragDataIndexEXT(program, name); } /* GL_EXT_blend_minmax */ inline void glBlendEquationEXT(GLenum mode) { fp_glBlendEquationEXT(mode); } /* GL_EXT_buffer_storage */ inline void glBufferStorageEXT(GLenum target, GLsizeiptr size, const void* data, GLbitfield flags) { fp_glBufferStorageEXT(target, size, data, flags); } /* GL_EXT_copy_image */ inline void glCopyImageSubDataEXT(GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth) { fp_glCopyImageSubDataEXT(srcName, srcTarget, srcLevel, srcX, srcY, srcZ, dstName, dstTarget, dstLevel, dstX, dstY, dstZ, srcWidth, srcHeight, srcDepth); } /* GL_EXT_debug_label */ inline void glLabelObjectEXT(GLenum type, GLuint object, GLsizei length, const GLchar* label) { fp_glLabelObjectEXT(type, object, length, label); } inline void glGetObjectLabelEXT(GLenum type, GLuint object, GLsizei bufSize, GLsizei* length, GLchar* label) { fp_glGetObjectLabelEXT(type, object, bufSize, length, label); } /* GL_EXT_debug_marker */ inline void glInsertEventMarkerEXT(GLsizei length, const GLchar* marker) { fp_glInsertEventMarkerEXT(length, marker); } inline void glPushGroupMarkerEXT(GLsizei length, const GLchar* marker) { fp_glPushGroupMarkerEXT(length, marker); } inline void glPopGroupMarkerEXT() { fp_glPopGroupMarkerEXT(); } /* GL_EXT_direct_state_access */ inline void glMatrixLoadfEXT(GLenum mode, const GLfloat* m) { fp_glMatrixLoadfEXT(mode, m); } inline void glMatrixLoaddEXT(GLenum mode, const GLdouble* m) { fp_glMatrixLoaddEXT(mode, m); } inline void glMatrixMultfEXT(GLenum mode, const GLfloat* m) { fp_glMatrixMultfEXT(mode, m); } inline void glMatrixMultdEXT(GLenum mode, const GLdouble* m) { fp_glMatrixMultdEXT(mode, m); } inline void glMatrixLoadIdentityEXT(GLenum mode) { fp_glMatrixLoadIdentityEXT(mode); } inline void glMatrixRotatefEXT(GLenum mode, GLfloat angle, GLfloat x, GLfloat y, GLfloat z) { fp_glMatrixRotatefEXT(mode, angle, x, y, z); } inline void glMatrixRotatedEXT(GLenum mode, GLdouble angle, GLdouble x, GLdouble y, GLdouble z) { fp_glMatrixRotatedEXT(mode, angle, x, y, z); } inline void glMatrixScalefEXT(GLenum mode, GLfloat x, GLfloat y, GLfloat z) { fp_glMatrixScalefEXT(mode, x, y, z); } inline void glMatrixScaledEXT(GLenum mode, GLdouble x, GLdouble y, GLdouble z) { fp_glMatrixScaledEXT(mode, x, y, z); } inline void glMatrixTranslatefEXT(GLenum mode, GLfloat x, GLfloat y, GLfloat z) { fp_glMatrixTranslatefEXT(mode, x, y, z); } inline void glMatrixTranslatedEXT(GLenum mode, GLdouble x, GLdouble y, GLdouble z) { fp_glMatrixTranslatedEXT(mode, x, y, z); } inline void glMatrixFrustumEXT(GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar) { fp_glMatrixFrustumEXT(mode, left, right, bottom, top, zNear, zFar); } inline void glMatrixOrthoEXT(GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar) { fp_glMatrixOrthoEXT(mode, left, right, bottom, top, zNear, zFar); } inline void glMatrixPopEXT(GLenum mode) { fp_glMatrixPopEXT(mode); } inline void glMatrixPushEXT(GLenum mode) { fp_glMatrixPushEXT(mode); } inline void glClientAttribDefaultEXT(GLbitfield mask) { fp_glClientAttribDefaultEXT(mask); } inline void glPushClientAttribDefaultEXT(GLbitfield mask) { fp_glPushClientAttribDefaultEXT(mask); } inline void glTextureParameterfEXT(GLuint texture, GLenum target, GLenum pname, GLfloat param) { fp_glTextureParameterfEXT(texture, target, pname, param); } inline void glTextureParameterfvEXT(GLuint texture, GLenum target, GLenum pname, const GLfloat* params) { fp_glTextureParameterfvEXT(texture, target, pname, params); } inline void glTextureParameteriEXT(GLuint texture, GLenum target, GLenum pname, GLint param) { fp_glTextureParameteriEXT(texture, target, pname, param); } inline void glTextureParameterivEXT(GLuint texture, GLenum target, GLenum pname, const GLint* params) { fp_glTextureParameterivEXT(texture, target, pname, params); } inline void glTextureImage1DEXT(GLuint texture, GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void* pixels) { fp_glTextureImage1DEXT(texture, target, level, internalformat, width, border, format, type, pixels); } inline void glTextureImage2DEXT(GLuint texture, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void* pixels) { fp_glTextureImage2DEXT(texture, target, level, internalformat, width, height, border, format, type, pixels); } inline void glTextureSubImage1DEXT(GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void* pixels) { fp_glTextureSubImage1DEXT(texture, target, level, xoffset, width, format, type, pixels); } inline void glTextureSubImage2DEXT(GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void* pixels) { fp_glTextureSubImage2DEXT(texture, target, level, xoffset, yoffset, width, height, format, type, pixels); } inline void glCopyTextureImage1DEXT(GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border) { fp_glCopyTextureImage1DEXT(texture, target, level, internalformat, x, y, width, border); } inline void glCopyTextureImage2DEXT(GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) { fp_glCopyTextureImage2DEXT(texture, target, level, internalformat, x, y, width, height, border); } inline void glCopyTextureSubImage1DEXT(GLuint texture, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width) { fp_glCopyTextureSubImage1DEXT(texture, target, level, xoffset, x, y, width); } inline void glCopyTextureSubImage2DEXT(GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) { fp_glCopyTextureSubImage2DEXT(texture, target, level, xoffset, yoffset, x, y, width, height); } inline void glGetTextureImageEXT(GLuint texture, GLenum target, GLint level, GLenum format, GLenum type, void* pixels) { fp_glGetTextureImageEXT(texture, target, level, format, type, pixels); } inline void glGetTextureParameterfvEXT(GLuint texture, GLenum target, GLenum pname, GLfloat* params) { fp_glGetTextureParameterfvEXT(texture, target, pname, params); } inline void glGetTextureParameterivEXT(GLuint texture, GLenum target, GLenum pname, GLint* params) { fp_glGetTextureParameterivEXT(texture, target, pname, params); } inline void glGetTextureLevelParameterfvEXT(GLuint texture, GLenum target, GLint level, GLenum pname, GLfloat* params) { fp_glGetTextureLevelParameterfvEXT(texture, target, level, pname, params); } inline void glGetTextureLevelParameterivEXT(GLuint texture, GLenum target, GLint level, GLenum pname, GLint* params) { fp_glGetTextureLevelParameterivEXT(texture, target, level, pname, params); } inline void glTextureImage3DEXT(GLuint texture, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void* pixels) { fp_glTextureImage3DEXT(texture, target, level, internalformat, width, height, depth, border, format, type, pixels); } inline void glTextureSubImage3DEXT(GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void* pixels) { fp_glTextureSubImage3DEXT(texture, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); } inline void glCopyTextureSubImage3DEXT(GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height) { fp_glCopyTextureSubImage3DEXT(texture, target, level, xoffset, yoffset, zoffset, x, y, width, height); } inline void glBindMultiTextureEXT(GLenum texunit, GLenum target, GLuint texture) { fp_glBindMultiTextureEXT(texunit, target, texture); } inline void glMultiTexCoordPointerEXT(GLenum texunit, GLint size, GLenum type, GLsizei stride, const void* pointer) { fp_glMultiTexCoordPointerEXT(texunit, size, type, stride, pointer); } inline void glMultiTexEnvfEXT(GLenum texunit, GLenum target, GLenum pname, GLfloat param) { fp_glMultiTexEnvfEXT(texunit, target, pname, param); } inline void glMultiTexEnvfvEXT(GLenum texunit, GLenum target, GLenum pname, const GLfloat* params) { fp_glMultiTexEnvfvEXT(texunit, target, pname, params); } inline void glMultiTexEnviEXT(GLenum texunit, GLenum target, GLenum pname, GLint param) { fp_glMultiTexEnviEXT(texunit, target, pname, param); } inline void glMultiTexEnvivEXT(GLenum texunit, GLenum target, GLenum pname, const GLint* params) { fp_glMultiTexEnvivEXT(texunit, target, pname, params); } inline void glMultiTexGendEXT(GLenum texunit, GLenum coord, GLenum pname, GLdouble param) { fp_glMultiTexGendEXT(texunit, coord, pname, param); } inline void glMultiTexGendvEXT(GLenum texunit, GLenum coord, GLenum pname, const GLdouble* params) { fp_glMultiTexGendvEXT(texunit, coord, pname, params); } inline void glMultiTexGenfEXT(GLenum texunit, GLenum coord, GLenum pname, GLfloat param) { fp_glMultiTexGenfEXT(texunit, coord, pname, param); } inline void glMultiTexGenfvEXT(GLenum texunit, GLenum coord, GLenum pname, const GLfloat* params) { fp_glMultiTexGenfvEXT(texunit, coord, pname, params); } inline void glMultiTexGeniEXT(GLenum texunit, GLenum coord, GLenum pname, GLint param) { fp_glMultiTexGeniEXT(texunit, coord, pname, param); } inline void glMultiTexGenivEXT(GLenum texunit, GLenum coord, GLenum pname, const GLint* params) { fp_glMultiTexGenivEXT(texunit, coord, pname, params); } inline void glGetMultiTexEnvfvEXT(GLenum texunit, GLenum target, GLenum pname, GLfloat* params) { fp_glGetMultiTexEnvfvEXT(texunit, target, pname, params); } inline void glGetMultiTexEnvivEXT(GLenum texunit, GLenum target, GLenum pname, GLint* params) { fp_glGetMultiTexEnvivEXT(texunit, target, pname, params); } inline void glGetMultiTexGendvEXT(GLenum texunit, GLenum coord, GLenum pname, GLdouble* params) { fp_glGetMultiTexGendvEXT(texunit, coord, pname, params); } inline void glGetMultiTexGenfvEXT(GLenum texunit, GLenum coord, GLenum pname, GLfloat* params) { fp_glGetMultiTexGenfvEXT(texunit, coord, pname, params); } inline void glGetMultiTexGenivEXT(GLenum texunit, GLenum coord, GLenum pname, GLint* params) { fp_glGetMultiTexGenivEXT(texunit, coord, pname, params); } inline void glMultiTexParameteriEXT(GLenum texunit, GLenum target, GLenum pname, GLint param) { fp_glMultiTexParameteriEXT(texunit, target, pname, param); } inline void glMultiTexParameterivEXT(GLenum texunit, GLenum target, GLenum pname, const GLint* params) { fp_glMultiTexParameterivEXT(texunit, target, pname, params); } inline void glMultiTexParameterfEXT(GLenum texunit, GLenum target, GLenum pname, GLfloat param) { fp_glMultiTexParameterfEXT(texunit, target, pname, param); } inline void glMultiTexParameterfvEXT(GLenum texunit, GLenum target, GLenum pname, const GLfloat* params) { fp_glMultiTexParameterfvEXT(texunit, target, pname, params); } inline void glMultiTexImage1DEXT(GLenum texunit, GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void* pixels) { fp_glMultiTexImage1DEXT(texunit, target, level, internalformat, width, border, format, type, pixels); } inline void glMultiTexImage2DEXT(GLenum texunit, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void* pixels) { fp_glMultiTexImage2DEXT(texunit, target, level, internalformat, width, height, border, format, type, pixels); } inline void glMultiTexSubImage1DEXT(GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void* pixels) { fp_glMultiTexSubImage1DEXT(texunit, target, level, xoffset, width, format, type, pixels); } inline void glMultiTexSubImage2DEXT(GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void* pixels) { fp_glMultiTexSubImage2DEXT(texunit, target, level, xoffset, yoffset, width, height, format, type, pixels); } inline void glCopyMultiTexImage1DEXT(GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border) { fp_glCopyMultiTexImage1DEXT(texunit, target, level, internalformat, x, y, width, border); } inline void glCopyMultiTexImage2DEXT(GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) { fp_glCopyMultiTexImage2DEXT(texunit, target, level, internalformat, x, y, width, height, border); } inline void glCopyMultiTexSubImage1DEXT(GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width) { fp_glCopyMultiTexSubImage1DEXT(texunit, target, level, xoffset, x, y, width); } inline void glCopyMultiTexSubImage2DEXT(GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) { fp_glCopyMultiTexSubImage2DEXT(texunit, target, level, xoffset, yoffset, x, y, width, height); } inline void glGetMultiTexImageEXT(GLenum texunit, GLenum target, GLint level, GLenum format, GLenum type, void* pixels) { fp_glGetMultiTexImageEXT(texunit, target, level, format, type, pixels); } inline void glGetMultiTexParameterfvEXT(GLenum texunit, GLenum target, GLenum pname, GLfloat* params) { fp_glGetMultiTexParameterfvEXT(texunit, target, pname, params); } inline void glGetMultiTexParameterivEXT(GLenum texunit, GLenum target, GLenum pname, GLint* params) { fp_glGetMultiTexParameterivEXT(texunit, target, pname, params); } inline void glGetMultiTexLevelParameterfvEXT(GLenum texunit, GLenum target, GLint level, GLenum pname, GLfloat* params) { fp_glGetMultiTexLevelParameterfvEXT(texunit, target, level, pname, params); } inline void glGetMultiTexLevelParameterivEXT(GLenum texunit, GLenum target, GLint level, GLenum pname, GLint* params) { fp_glGetMultiTexLevelParameterivEXT(texunit, target, level, pname, params); } inline void glMultiTexImage3DEXT(GLenum texunit, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void* pixels) { fp_glMultiTexImage3DEXT(texunit, target, level, internalformat, width, height, depth, border, format, type, pixels); } inline void glMultiTexSubImage3DEXT(GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void* pixels) { fp_glMultiTexSubImage3DEXT(texunit, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); } inline void glCopyMultiTexSubImage3DEXT(GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height) { fp_glCopyMultiTexSubImage3DEXT(texunit, target, level, xoffset, yoffset, zoffset, x, y, width, height); } inline void glEnableClientStateIndexedEXT(GLenum array, GLuint index) { fp_glEnableClientStateIndexedEXT(array, index); } inline void glDisableClientStateIndexedEXT(GLenum array, GLuint index) { fp_glDisableClientStateIndexedEXT(array, index); } inline void glGetFloatIndexedvEXT(GLenum target, GLuint index, GLfloat* data) { fp_glGetFloatIndexedvEXT(target, index, data); } inline void glGetDoubleIndexedvEXT(GLenum target, GLuint index, GLdouble* data) { fp_glGetDoubleIndexedvEXT(target, index, data); } inline void glGetPointerIndexedvEXT(GLenum target, GLuint index, void** data) { fp_glGetPointerIndexedvEXT(target, index, data); } inline void glEnableIndexedEXT(GLenum target, GLuint index) { fp_glEnableIndexedEXT(target, index); } inline void glDisableIndexedEXT(GLenum target, GLuint index) { fp_glDisableIndexedEXT(target, index); } inline GLboolean glIsEnabledIndexedEXT(GLenum target, GLuint index) { return fp_glIsEnabledIndexedEXT(target, index); } inline void glGetIntegerIndexedvEXT(GLenum target, GLuint index, GLint* data) { fp_glGetIntegerIndexedvEXT(target, index, data); } inline void glGetBooleanIndexedvEXT(GLenum target, GLuint index, GLboolean* data) { fp_glGetBooleanIndexedvEXT(target, index, data); } inline void glCompressedTextureImage3DEXT(GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void* bits) { fp_glCompressedTextureImage3DEXT(texture, target, level, internalformat, width, height, depth, border, imageSize, bits); } inline void glCompressedTextureImage2DEXT(GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void* bits) { fp_glCompressedTextureImage2DEXT(texture, target, level, internalformat, width, height, border, imageSize, bits); } inline void glCompressedTextureImage1DEXT(GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void* bits) { fp_glCompressedTextureImage1DEXT(texture, target, level, internalformat, width, border, imageSize, bits); } inline void glCompressedTextureSubImage3DEXT(GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void* bits) { fp_glCompressedTextureSubImage3DEXT(texture, target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, bits); } inline void glCompressedTextureSubImage2DEXT(GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void* bits) { fp_glCompressedTextureSubImage2DEXT(texture, target, level, xoffset, yoffset, width, height, format, imageSize, bits); } inline void glCompressedTextureSubImage1DEXT(GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void* bits) { fp_glCompressedTextureSubImage1DEXT(texture, target, level, xoffset, width, format, imageSize, bits); } inline void glGetCompressedTextureImageEXT(GLuint texture, GLenum target, GLint lod, void* img) { fp_glGetCompressedTextureImageEXT(texture, target, lod, img); } inline void glCompressedMultiTexImage3DEXT(GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void* bits) { fp_glCompressedMultiTexImage3DEXT(texunit, target, level, internalformat, width, height, depth, border, imageSize, bits); } inline void glCompressedMultiTexImage2DEXT(GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void* bits) { fp_glCompressedMultiTexImage2DEXT(texunit, target, level, internalformat, width, height, border, imageSize, bits); } inline void glCompressedMultiTexImage1DEXT(GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void* bits) { fp_glCompressedMultiTexImage1DEXT(texunit, target, level, internalformat, width, border, imageSize, bits); } inline void glCompressedMultiTexSubImage3DEXT(GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void* bits) { fp_glCompressedMultiTexSubImage3DEXT(texunit, target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, bits); } inline void glCompressedMultiTexSubImage2DEXT(GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void* bits) { fp_glCompressedMultiTexSubImage2DEXT(texunit, target, level, xoffset, yoffset, width, height, format, imageSize, bits); } inline void glCompressedMultiTexSubImage1DEXT(GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void* bits) { fp_glCompressedMultiTexSubImage1DEXT(texunit, target, level, xoffset, width, format, imageSize, bits); } inline void glGetCompressedMultiTexImageEXT(GLenum texunit, GLenum target, GLint lod, void* img) { fp_glGetCompressedMultiTexImageEXT(texunit, target, lod, img); } inline void glMatrixLoadTransposefEXT(GLenum mode, const GLfloat* m) { fp_glMatrixLoadTransposefEXT(mode, m); } inline void glMatrixLoadTransposedEXT(GLenum mode, const GLdouble* m) { fp_glMatrixLoadTransposedEXT(mode, m); } inline void glMatrixMultTransposefEXT(GLenum mode, const GLfloat* m) { fp_glMatrixMultTransposefEXT(mode, m); } inline void glMatrixMultTransposedEXT(GLenum mode, const GLdouble* m) { fp_glMatrixMultTransposedEXT(mode, m); } inline void glNamedBufferDataEXT(GLuint buffer, GLsizeiptr size, const void* data, GLenum usage) { fp_glNamedBufferDataEXT(buffer, size, data, usage); } inline void glNamedBufferSubDataEXT(GLuint buffer, GLintptr offset, GLsizeiptr size, const void* data) { fp_glNamedBufferSubDataEXT(buffer, offset, size, data); } inline void* glMapNamedBufferEXT(GLuint buffer, GLenum access) { return fp_glMapNamedBufferEXT(buffer, access); } inline GLboolean glUnmapNamedBufferEXT(GLuint buffer) { return fp_glUnmapNamedBufferEXT(buffer); } inline void glGetNamedBufferParameterivEXT(GLuint buffer, GLenum pname, GLint* params) { fp_glGetNamedBufferParameterivEXT(buffer, pname, params); } inline void glGetNamedBufferPointervEXT(GLuint buffer, GLenum pname, void** params) { fp_glGetNamedBufferPointervEXT(buffer, pname, params); } inline void glGetNamedBufferSubDataEXT(GLuint buffer, GLintptr offset, GLsizeiptr size, void* data) { fp_glGetNamedBufferSubDataEXT(buffer, offset, size, data); } inline void glProgramUniform1fEXT(GLuint program, GLint location, GLfloat v0) { fp_glProgramUniform1fEXT(program, location, v0); } inline void glProgramUniform2fEXT(GLuint program, GLint location, GLfloat v0, GLfloat v1) { fp_glProgramUniform2fEXT(program, location, v0, v1); } inline void glProgramUniform3fEXT(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2) { fp_glProgramUniform3fEXT(program, location, v0, v1, v2); } inline void glProgramUniform4fEXT(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3) { fp_glProgramUniform4fEXT(program, location, v0, v1, v2, v3); } inline void glProgramUniform1iEXT(GLuint program, GLint location, GLint v0) { fp_glProgramUniform1iEXT(program, location, v0); } inline void glProgramUniform2iEXT(GLuint program, GLint location, GLint v0, GLint v1) { fp_glProgramUniform2iEXT(program, location, v0, v1); } inline void glProgramUniform3iEXT(GLuint program, GLint location, GLint v0, GLint v1, GLint v2) { fp_glProgramUniform3iEXT(program, location, v0, v1, v2); } inline void glProgramUniform4iEXT(GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3) { fp_glProgramUniform4iEXT(program, location, v0, v1, v2, v3); } inline void glProgramUniform1fvEXT(GLuint program, GLint location, GLsizei count, const GLfloat* value) { fp_glProgramUniform1fvEXT(program, location, count, value); } inline void glProgramUniform2fvEXT(GLuint program, GLint location, GLsizei count, const GLfloat* value) { fp_glProgramUniform2fvEXT(program, location, count, value); } inline void glProgramUniform3fvEXT(GLuint program, GLint location, GLsizei count, const GLfloat* value) { fp_glProgramUniform3fvEXT(program, location, count, value); } inline void glProgramUniform4fvEXT(GLuint program, GLint location, GLsizei count, const GLfloat* value) { fp_glProgramUniform4fvEXT(program, location, count, value); } inline void glProgramUniform1ivEXT(GLuint program, GLint location, GLsizei count, const GLint* value) { fp_glProgramUniform1ivEXT(program, location, count, value); } inline void glProgramUniform2ivEXT(GLuint program, GLint location, GLsizei count, const GLint* value) { fp_glProgramUniform2ivEXT(program, location, count, value); } inline void glProgramUniform3ivEXT(GLuint program, GLint location, GLsizei count, const GLint* value) { fp_glProgramUniform3ivEXT(program, location, count, value); } inline void glProgramUniform4ivEXT(GLuint program, GLint location, GLsizei count, const GLint* value) { fp_glProgramUniform4ivEXT(program, location, count, value); } inline void glProgramUniformMatrix2fvEXT(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { fp_glProgramUniformMatrix2fvEXT(program, location, count, transpose, value); } inline void glProgramUniformMatrix3fvEXT(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { fp_glProgramUniformMatrix3fvEXT(program, location, count, transpose, value); } inline void glProgramUniformMatrix4fvEXT(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { fp_glProgramUniformMatrix4fvEXT(program, location, count, transpose, value); } inline void glProgramUniformMatrix2x3fvEXT(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { fp_glProgramUniformMatrix2x3fvEXT(program, location, count, transpose, value); } inline void glProgramUniformMatrix3x2fvEXT(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { fp_glProgramUniformMatrix3x2fvEXT(program, location, count, transpose, value); } inline void glProgramUniformMatrix2x4fvEXT(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { fp_glProgramUniformMatrix2x4fvEXT(program, location, count, transpose, value); } inline void glProgramUniformMatrix4x2fvEXT(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { fp_glProgramUniformMatrix4x2fvEXT(program, location, count, transpose, value); } inline void glProgramUniformMatrix3x4fvEXT(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { fp_glProgramUniformMatrix3x4fvEXT(program, location, count, transpose, value); } inline void glProgramUniformMatrix4x3fvEXT(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { fp_glProgramUniformMatrix4x3fvEXT(program, location, count, transpose, value); } inline void glTextureBufferEXT(GLuint texture, GLenum target, GLenum internalformat, GLuint buffer) { fp_glTextureBufferEXT(texture, target, internalformat, buffer); } inline void glMultiTexBufferEXT(GLenum texunit, GLenum target, GLenum internalformat, GLuint buffer) { fp_glMultiTexBufferEXT(texunit, target, internalformat, buffer); } inline void glTextureParameterIivEXT(GLuint texture, GLenum target, GLenum pname, const GLint* params) { fp_glTextureParameterIivEXT(texture, target, pname, params); } inline void glTextureParameterIuivEXT(GLuint texture, GLenum target, GLenum pname, const GLuint* params) { fp_glTextureParameterIuivEXT(texture, target, pname, params); } inline void glGetTextureParameterIivEXT(GLuint texture, GLenum target, GLenum pname, GLint* params) { fp_glGetTextureParameterIivEXT(texture, target, pname, params); } inline void glGetTextureParameterIuivEXT(GLuint texture, GLenum target, GLenum pname, GLuint* params) { fp_glGetTextureParameterIuivEXT(texture, target, pname, params); } inline void glMultiTexParameterIivEXT(GLenum texunit, GLenum target, GLenum pname, const GLint* params) { fp_glMultiTexParameterIivEXT(texunit, target, pname, params); } inline void glMultiTexParameterIuivEXT(GLenum texunit, GLenum target, GLenum pname, const GLuint* params) { fp_glMultiTexParameterIuivEXT(texunit, target, pname, params); } inline void glGetMultiTexParameterIivEXT(GLenum texunit, GLenum target, GLenum pname, GLint* params) { fp_glGetMultiTexParameterIivEXT(texunit, target, pname, params); } inline void glGetMultiTexParameterIuivEXT(GLenum texunit, GLenum target, GLenum pname, GLuint* params) { fp_glGetMultiTexParameterIuivEXT(texunit, target, pname, params); } inline void glProgramUniform1uiEXT(GLuint program, GLint location, GLuint v0) { fp_glProgramUniform1uiEXT(program, location, v0); } inline void glProgramUniform2uiEXT(GLuint program, GLint location, GLuint v0, GLuint v1) { fp_glProgramUniform2uiEXT(program, location, v0, v1); } inline void glProgramUniform3uiEXT(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2) { fp_glProgramUniform3uiEXT(program, location, v0, v1, v2); } inline void glProgramUniform4uiEXT(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3) { fp_glProgramUniform4uiEXT(program, location, v0, v1, v2, v3); } inline void glProgramUniform1uivEXT(GLuint program, GLint location, GLsizei count, const GLuint* value) { fp_glProgramUniform1uivEXT(program, location, count, value); } inline void glProgramUniform2uivEXT(GLuint program, GLint location, GLsizei count, const GLuint* value) { fp_glProgramUniform2uivEXT(program, location, count, value); } inline void glProgramUniform3uivEXT(GLuint program, GLint location, GLsizei count, const GLuint* value) { fp_glProgramUniform3uivEXT(program, location, count, value); } inline void glProgramUniform4uivEXT(GLuint program, GLint location, GLsizei count, const GLuint* value) { fp_glProgramUniform4uivEXT(program, location, count, value); } inline void glNamedProgramLocalParameters4fvEXT(GLuint program, GLenum target, GLuint index, GLsizei count, const GLfloat* params) { fp_glNamedProgramLocalParameters4fvEXT(program, target, index, count, params); } inline void glNamedProgramLocalParameterI4iEXT(GLuint program, GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w) { fp_glNamedProgramLocalParameterI4iEXT(program, target, index, x, y, z, w); } inline void glNamedProgramLocalParameterI4ivEXT(GLuint program, GLenum target, GLuint index, const GLint* params) { fp_glNamedProgramLocalParameterI4ivEXT(program, target, index, params); } inline void glNamedProgramLocalParametersI4ivEXT(GLuint program, GLenum target, GLuint index, GLsizei count, const GLint* params) { fp_glNamedProgramLocalParametersI4ivEXT(program, target, index, count, params); } inline void glNamedProgramLocalParameterI4uiEXT(GLuint program, GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w) { fp_glNamedProgramLocalParameterI4uiEXT(program, target, index, x, y, z, w); } inline void glNamedProgramLocalParameterI4uivEXT(GLuint program, GLenum target, GLuint index, const GLuint* params) { fp_glNamedProgramLocalParameterI4uivEXT(program, target, index, params); } inline void glNamedProgramLocalParametersI4uivEXT(GLuint program, GLenum target, GLuint index, GLsizei count, const GLuint* params) { fp_glNamedProgramLocalParametersI4uivEXT(program, target, index, count, params); } inline void glGetNamedProgramLocalParameterIivEXT(GLuint program, GLenum target, GLuint index, GLint* params) { fp_glGetNamedProgramLocalParameterIivEXT(program, target, index, params); } inline void glGetNamedProgramLocalParameterIuivEXT(GLuint program, GLenum target, GLuint index, GLuint* params) { fp_glGetNamedProgramLocalParameterIuivEXT(program, target, index, params); } inline void glEnableClientStateiEXT(GLenum array, GLuint index) { fp_glEnableClientStateiEXT(array, index); } inline void glDisableClientStateiEXT(GLenum array, GLuint index) { fp_glDisableClientStateiEXT(array, index); } inline void glGetFloati_vEXT(GLenum pname, GLuint index, GLfloat* params) { fp_glGetFloati_vEXT(pname, index, params); } inline void glGetDoublei_vEXT(GLenum pname, GLuint index, GLdouble* params) { fp_glGetDoublei_vEXT(pname, index, params); } inline void glGetPointeri_vEXT(GLenum pname, GLuint index, void** params) { fp_glGetPointeri_vEXT(pname, index, params); } inline void glNamedProgramStringEXT(GLuint program, GLenum target, GLenum format, GLsizei len, const void* string) { fp_glNamedProgramStringEXT(program, target, format, len, string); } inline void glNamedProgramLocalParameter4dEXT(GLuint program, GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w) { fp_glNamedProgramLocalParameter4dEXT(program, target, index, x, y, z, w); } inline void glNamedProgramLocalParameter4dvEXT(GLuint program, GLenum target, GLuint index, const GLdouble* params) { fp_glNamedProgramLocalParameter4dvEXT(program, target, index, params); } inline void glNamedProgramLocalParameter4fEXT(GLuint program, GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w) { fp_glNamedProgramLocalParameter4fEXT(program, target, index, x, y, z, w); } inline void glNamedProgramLocalParameter4fvEXT(GLuint program, GLenum target, GLuint index, const GLfloat* params) { fp_glNamedProgramLocalParameter4fvEXT(program, target, index, params); } inline void glGetNamedProgramLocalParameterdvEXT(GLuint program, GLenum target, GLuint index, GLdouble* params) { fp_glGetNamedProgramLocalParameterdvEXT(program, target, index, params); } inline void glGetNamedProgramLocalParameterfvEXT(GLuint program, GLenum target, GLuint index, GLfloat* params) { fp_glGetNamedProgramLocalParameterfvEXT(program, target, index, params); } inline void glGetNamedProgramivEXT(GLuint program, GLenum target, GLenum pname, GLint* params) { fp_glGetNamedProgramivEXT(program, target, pname, params); } inline void glGetNamedProgramStringEXT(GLuint program, GLenum target, GLenum pname, void* string) { fp_glGetNamedProgramStringEXT(program, target, pname, string); } inline void glNamedRenderbufferStorageEXT(GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height) { fp_glNamedRenderbufferStorageEXT(renderbuffer, internalformat, width, height); } inline void glGetNamedRenderbufferParameterivEXT(GLuint renderbuffer, GLenum pname, GLint* params) { fp_glGetNamedRenderbufferParameterivEXT(renderbuffer, pname, params); } inline void glNamedRenderbufferStorageMultisampleEXT(GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) { fp_glNamedRenderbufferStorageMultisampleEXT(renderbuffer, samples, internalformat, width, height); } inline void glNamedRenderbufferStorageMultisampleCoverageEXT(GLuint renderbuffer, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height) { fp_glNamedRenderbufferStorageMultisampleCoverageEXT(renderbuffer, coverageSamples, colorSamples, internalformat, width, height); } inline GLenum glCheckNamedFramebufferStatusEXT(GLuint framebuffer, GLenum target) { return fp_glCheckNamedFramebufferStatusEXT(framebuffer, target); } inline void glNamedFramebufferTexture1DEXT(GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level) { fp_glNamedFramebufferTexture1DEXT(framebuffer, attachment, textarget, texture, level); } inline void glNamedFramebufferTexture2DEXT(GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level) { fp_glNamedFramebufferTexture2DEXT(framebuffer, attachment, textarget, texture, level); } inline void glNamedFramebufferTexture3DEXT(GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset) { fp_glNamedFramebufferTexture3DEXT(framebuffer, attachment, textarget, texture, level, zoffset); } inline void glNamedFramebufferRenderbufferEXT(GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) { fp_glNamedFramebufferRenderbufferEXT(framebuffer, attachment, renderbuffertarget, renderbuffer); } inline void glGetNamedFramebufferAttachmentParameterivEXT(GLuint framebuffer, GLenum attachment, GLenum pname, GLint* params) { fp_glGetNamedFramebufferAttachmentParameterivEXT(framebuffer, attachment, pname, params); } inline void glGenerateTextureMipmapEXT(GLuint texture, GLenum target) { fp_glGenerateTextureMipmapEXT(texture, target); } inline void glGenerateMultiTexMipmapEXT(GLenum texunit, GLenum target) { fp_glGenerateMultiTexMipmapEXT(texunit, target); } inline void glFramebufferDrawBufferEXT(GLuint framebuffer, GLenum mode) { fp_glFramebufferDrawBufferEXT(framebuffer, mode); } inline void glFramebufferDrawBuffersEXT(GLuint framebuffer, GLsizei n, const GLenum* bufs) { fp_glFramebufferDrawBuffersEXT(framebuffer, n, bufs); } inline void glFramebufferReadBufferEXT(GLuint framebuffer, GLenum mode) { fp_glFramebufferReadBufferEXT(framebuffer, mode); } inline void glGetFramebufferParameterivEXT(GLuint framebuffer, GLenum pname, GLint* params) { fp_glGetFramebufferParameterivEXT(framebuffer, pname, params); } inline void glNamedCopyBufferSubDataEXT(GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size) { fp_glNamedCopyBufferSubDataEXT(readBuffer, writeBuffer, readOffset, writeOffset, size); } inline void glNamedFramebufferTextureEXT(GLuint framebuffer, GLenum attachment, GLuint texture, GLint level) { fp_glNamedFramebufferTextureEXT(framebuffer, attachment, texture, level); } inline void glNamedFramebufferTextureLayerEXT(GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer) { fp_glNamedFramebufferTextureLayerEXT(framebuffer, attachment, texture, level, layer); } inline void glNamedFramebufferTextureFaceEXT(GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLenum face) { fp_glNamedFramebufferTextureFaceEXT(framebuffer, attachment, texture, level, face); } inline void glTextureRenderbufferEXT(GLuint texture, GLenum target, GLuint renderbuffer) { fp_glTextureRenderbufferEXT(texture, target, renderbuffer); } inline void glMultiTexRenderbufferEXT(GLenum texunit, GLenum target, GLuint renderbuffer) { fp_glMultiTexRenderbufferEXT(texunit, target, renderbuffer); } inline void glVertexArrayVertexOffsetEXT(GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset) { fp_glVertexArrayVertexOffsetEXT(vaobj, buffer, size, type, stride, offset); } inline void glVertexArrayColorOffsetEXT(GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset) { fp_glVertexArrayColorOffsetEXT(vaobj, buffer, size, type, stride, offset); } inline void glVertexArrayEdgeFlagOffsetEXT(GLuint vaobj, GLuint buffer, GLsizei stride, GLintptr offset) { fp_glVertexArrayEdgeFlagOffsetEXT(vaobj, buffer, stride, offset); } inline void glVertexArrayIndexOffsetEXT(GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset) { fp_glVertexArrayIndexOffsetEXT(vaobj, buffer, type, stride, offset); } inline void glVertexArrayNormalOffsetEXT(GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset) { fp_glVertexArrayNormalOffsetEXT(vaobj, buffer, type, stride, offset); } inline void glVertexArrayTexCoordOffsetEXT(GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset) { fp_glVertexArrayTexCoordOffsetEXT(vaobj, buffer, size, type, stride, offset); } inline void glVertexArrayMultiTexCoordOffsetEXT(GLuint vaobj, GLuint buffer, GLenum texunit, GLint size, GLenum type, GLsizei stride, GLintptr offset) { fp_glVertexArrayMultiTexCoordOffsetEXT(vaobj, buffer, texunit, size, type, stride, offset); } inline void glVertexArrayFogCoordOffsetEXT(GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset) { fp_glVertexArrayFogCoordOffsetEXT(vaobj, buffer, type, stride, offset); } inline void glVertexArraySecondaryColorOffsetEXT(GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset) { fp_glVertexArraySecondaryColorOffsetEXT(vaobj, buffer, size, type, stride, offset); } inline void glVertexArrayVertexAttribOffsetEXT(GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLintptr offset) { fp_glVertexArrayVertexAttribOffsetEXT(vaobj, buffer, index, size, type, normalized, stride, offset); } inline void glVertexArrayVertexAttribIOffsetEXT(GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset) { fp_glVertexArrayVertexAttribIOffsetEXT(vaobj, buffer, index, size, type, stride, offset); } inline void glEnableVertexArrayEXT(GLuint vaobj, GLenum array) { fp_glEnableVertexArrayEXT(vaobj, array); } inline void glDisableVertexArrayEXT(GLuint vaobj, GLenum array) { fp_glDisableVertexArrayEXT(vaobj, array); } inline void glEnableVertexArrayAttribEXT(GLuint vaobj, GLuint index) { fp_glEnableVertexArrayAttribEXT(vaobj, index); } inline void glDisableVertexArrayAttribEXT(GLuint vaobj, GLuint index) { fp_glDisableVertexArrayAttribEXT(vaobj, index); } inline void glGetVertexArrayIntegervEXT(GLuint vaobj, GLenum pname, GLint* param) { fp_glGetVertexArrayIntegervEXT(vaobj, pname, param); } inline void glGetVertexArrayPointervEXT(GLuint vaobj, GLenum pname, void** param) { fp_glGetVertexArrayPointervEXT(vaobj, pname, param); } inline void glGetVertexArrayIntegeri_vEXT(GLuint vaobj, GLuint index, GLenum pname, GLint* param) { fp_glGetVertexArrayIntegeri_vEXT(vaobj, index, pname, param); } inline void glGetVertexArrayPointeri_vEXT(GLuint vaobj, GLuint index, GLenum pname, void** param) { fp_glGetVertexArrayPointeri_vEXT(vaobj, index, pname, param); } inline void* glMapNamedBufferRangeEXT(GLuint buffer, GLintptr offset, GLsizeiptr length, GLbitfield access) { return fp_glMapNamedBufferRangeEXT(buffer, offset, length, access); } inline void glFlushMappedNamedBufferRangeEXT(GLuint buffer, GLintptr offset, GLsizeiptr length) { fp_glFlushMappedNamedBufferRangeEXT(buffer, offset, length); } inline void glNamedBufferStorageEXT(GLuint buffer, GLsizeiptr size, const void* data, GLbitfield flags) { fp_glNamedBufferStorageEXT(buffer, size, data, flags); } inline void glClearNamedBufferDataEXT(GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const void* data) { fp_glClearNamedBufferDataEXT(buffer, internalformat, format, type, data); } inline void glClearNamedBufferSubDataEXT(GLuint buffer, GLenum internalformat, GLsizeiptr offset, GLsizeiptr size, GLenum format, GLenum type, const void* data) { fp_glClearNamedBufferSubDataEXT(buffer, internalformat, offset, size, format, type, data); } inline void glNamedFramebufferParameteriEXT(GLuint framebuffer, GLenum pname, GLint param) { fp_glNamedFramebufferParameteriEXT(framebuffer, pname, param); } inline void glGetNamedFramebufferParameterivEXT(GLuint framebuffer, GLenum pname, GLint* params) { fp_glGetNamedFramebufferParameterivEXT(framebuffer, pname, params); } inline void glProgramUniform1dEXT(GLuint program, GLint location, GLdouble x) { fp_glProgramUniform1dEXT(program, location, x); } inline void glProgramUniform2dEXT(GLuint program, GLint location, GLdouble x, GLdouble y) { fp_glProgramUniform2dEXT(program, location, x, y); } inline void glProgramUniform3dEXT(GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z) { fp_glProgramUniform3dEXT(program, location, x, y, z); } inline void glProgramUniform4dEXT(GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w) { fp_glProgramUniform4dEXT(program, location, x, y, z, w); } inline void glProgramUniform1dvEXT(GLuint program, GLint location, GLsizei count, const GLdouble* value) { fp_glProgramUniform1dvEXT(program, location, count, value); } inline void glProgramUniform2dvEXT(GLuint program, GLint location, GLsizei count, const GLdouble* value) { fp_glProgramUniform2dvEXT(program, location, count, value); } inline void glProgramUniform3dvEXT(GLuint program, GLint location, GLsizei count, const GLdouble* value) { fp_glProgramUniform3dvEXT(program, location, count, value); } inline void glProgramUniform4dvEXT(GLuint program, GLint location, GLsizei count, const GLdouble* value) { fp_glProgramUniform4dvEXT(program, location, count, value); } inline void glProgramUniformMatrix2dvEXT(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble* value) { fp_glProgramUniformMatrix2dvEXT(program, location, count, transpose, value); } inline void glProgramUniformMatrix3dvEXT(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble* value) { fp_glProgramUniformMatrix3dvEXT(program, location, count, transpose, value); } inline void glProgramUniformMatrix4dvEXT(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble* value) { fp_glProgramUniformMatrix4dvEXT(program, location, count, transpose, value); } inline void glProgramUniformMatrix2x3dvEXT(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble* value) { fp_glProgramUniformMatrix2x3dvEXT(program, location, count, transpose, value); } inline void glProgramUniformMatrix2x4dvEXT(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble* value) { fp_glProgramUniformMatrix2x4dvEXT(program, location, count, transpose, value); } inline void glProgramUniformMatrix3x2dvEXT(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble* value) { fp_glProgramUniformMatrix3x2dvEXT(program, location, count, transpose, value); } inline void glProgramUniformMatrix3x4dvEXT(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble* value) { fp_glProgramUniformMatrix3x4dvEXT(program, location, count, transpose, value); } inline void glProgramUniformMatrix4x2dvEXT(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble* value) { fp_glProgramUniformMatrix4x2dvEXT(program, location, count, transpose, value); } inline void glProgramUniformMatrix4x3dvEXT(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble* value) { fp_glProgramUniformMatrix4x3dvEXT(program, location, count, transpose, value); } inline void glTextureBufferRangeEXT(GLuint texture, GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size) { fp_glTextureBufferRangeEXT(texture, target, internalformat, buffer, offset, size); } inline void glTextureStorage1DEXT(GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width) { fp_glTextureStorage1DEXT(texture, target, levels, internalformat, width); } inline void glTextureStorage2DEXT(GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height) { fp_glTextureStorage2DEXT(texture, target, levels, internalformat, width, height); } inline void glTextureStorage3DEXT(GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth) { fp_glTextureStorage3DEXT(texture, target, levels, internalformat, width, height, depth); } inline void glTextureStorage2DMultisampleEXT(GLuint texture, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations) { fp_glTextureStorage2DMultisampleEXT(texture, target, samples, internalformat, width, height, fixedsamplelocations); } inline void glTextureStorage3DMultisampleEXT(GLuint texture, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations) { fp_glTextureStorage3DMultisampleEXT(texture, target, samples, internalformat, width, height, depth, fixedsamplelocations); } inline void glVertexArrayBindVertexBufferEXT(GLuint vaobj, GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride) { fp_glVertexArrayBindVertexBufferEXT(vaobj, bindingindex, buffer, offset, stride); } inline void glVertexArrayVertexAttribFormatEXT(GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset) { fp_glVertexArrayVertexAttribFormatEXT(vaobj, attribindex, size, type, normalized, relativeoffset); } inline void glVertexArrayVertexAttribIFormatEXT(GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset) { fp_glVertexArrayVertexAttribIFormatEXT(vaobj, attribindex, size, type, relativeoffset); } inline void glVertexArrayVertexAttribLFormatEXT(GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset) { fp_glVertexArrayVertexAttribLFormatEXT(vaobj, attribindex, size, type, relativeoffset); } inline void glVertexArrayVertexAttribBindingEXT(GLuint vaobj, GLuint attribindex, GLuint bindingindex) { fp_glVertexArrayVertexAttribBindingEXT(vaobj, attribindex, bindingindex); } inline void glVertexArrayVertexBindingDivisorEXT(GLuint vaobj, GLuint bindingindex, GLuint divisor) { fp_glVertexArrayVertexBindingDivisorEXT(vaobj, bindingindex, divisor); } inline void glVertexArrayVertexAttribLOffsetEXT(GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset) { fp_glVertexArrayVertexAttribLOffsetEXT(vaobj, buffer, index, size, type, stride, offset); } inline void glTexturePageCommitmentEXT(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean commit) { fp_glTexturePageCommitmentEXT(texture, level, xoffset, yoffset, zoffset, width, height, depth, commit); } inline void glVertexArrayVertexAttribDivisorEXT(GLuint vaobj, GLuint index, GLuint divisor) { fp_glVertexArrayVertexAttribDivisorEXT(vaobj, index, divisor); } /* GL_EXT_discard_framebuffer */ inline void glDiscardFramebufferEXT(GLenum target, GLsizei numAttachments, const GLenum* attachments) { fp_glDiscardFramebufferEXT(target, numAttachments, attachments); } /* GL_EXT_disjoint_timer_query */ inline void glGenQueriesEXT(GLsizei n, GLuint* ids) { fp_glGenQueriesEXT(n, ids); } inline void glDeleteQueriesEXT(GLsizei n, const GLuint* ids) { fp_glDeleteQueriesEXT(n, ids); } inline GLboolean glIsQueryEXT(GLuint id) { return fp_glIsQueryEXT(id); } inline void glBeginQueryEXT(GLenum target, GLuint id) { fp_glBeginQueryEXT(target, id); } inline void glEndQueryEXT(GLenum target) { fp_glEndQueryEXT(target); } inline void glQueryCounterEXT(GLuint id, GLenum target) { fp_glQueryCounterEXT(id, target); } inline void glGetQueryivEXT(GLenum target, GLenum pname, GLint* params) { fp_glGetQueryivEXT(target, pname, params); } inline void glGetQueryObjectivEXT(GLuint id, GLenum pname, GLint* params) { fp_glGetQueryObjectivEXT(id, pname, params); } inline void glGetQueryObjectuivEXT(GLuint id, GLenum pname, GLuint* params) { fp_glGetQueryObjectuivEXT(id, pname, params); } inline void glGetQueryObjecti64vEXT(GLuint id, GLenum pname, GLint64* params) { fp_glGetQueryObjecti64vEXT(id, pname, params); } inline void glGetQueryObjectui64vEXT(GLuint id, GLenum pname, GLuint64* params) { fp_glGetQueryObjectui64vEXT(id, pname, params); } /* GL_EXT_draw_buffers */ inline void glDrawBuffersEXT(GLsizei n, const GLenum* bufs) { fp_glDrawBuffersEXT(n, bufs); } /* GL_EXT_draw_buffers2 */ inline void glColorMaskIndexedEXT(GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a) { fp_glColorMaskIndexedEXT(index, r, g, b, a); } /* GL_EXT_draw_buffers_indexed */ inline void glEnableiEXT(GLenum target, GLuint index) { fp_glEnableiEXT(target, index); } inline void glDisableiEXT(GLenum target, GLuint index) { fp_glDisableiEXT(target, index); } inline void glBlendEquationiEXT(GLuint buf, GLenum mode) { fp_glBlendEquationiEXT(buf, mode); } inline void glBlendEquationSeparateiEXT(GLuint buf, GLenum modeRGB, GLenum modeAlpha) { fp_glBlendEquationSeparateiEXT(buf, modeRGB, modeAlpha); } inline void glBlendFunciEXT(GLuint buf, GLenum src, GLenum dst) { fp_glBlendFunciEXT(buf, src, dst); } inline void glBlendFuncSeparateiEXT(GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) { fp_glBlendFuncSeparateiEXT(buf, srcRGB, dstRGB, srcAlpha, dstAlpha); } inline void glColorMaskiEXT(GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a) { fp_glColorMaskiEXT(index, r, g, b, a); } inline GLboolean glIsEnablediEXT(GLenum target, GLuint index) { return fp_glIsEnablediEXT(target, index); } /* GL_EXT_draw_elements_base_vertex */ inline void glDrawElementsBaseVertexEXT(GLenum mode, GLsizei count, GLenum type, const void* indices, GLint basevertex) { fp_glDrawElementsBaseVertexEXT(mode, count, type, indices, basevertex); } inline void glDrawRangeElementsBaseVertexEXT(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void* indices, GLint basevertex) { fp_glDrawRangeElementsBaseVertexEXT(mode, start, end, count, type, indices, basevertex); } inline void glDrawElementsInstancedBaseVertexEXT(GLenum mode, GLsizei count, GLenum type, const void* indices, GLsizei instancecount, GLint basevertex) { fp_glDrawElementsInstancedBaseVertexEXT(mode, count, type, indices, instancecount, basevertex); } inline void glMultiDrawElementsBaseVertexEXT(GLenum mode, const GLsizei* count, GLenum type, const void** indices, GLsizei primcount, const GLint* basevertex) { fp_glMultiDrawElementsBaseVertexEXT(mode, count, type, indices, primcount, basevertex); } /* GL_EXT_draw_instanced */ inline void glDrawArraysInstancedEXT(GLenum mode, GLint start, GLsizei count, GLsizei primcount) { fp_glDrawArraysInstancedEXT(mode, start, count, primcount); } inline void glDrawElementsInstancedEXT(GLenum mode, GLsizei count, GLenum type, const void* indices, GLsizei primcount) { fp_glDrawElementsInstancedEXT(mode, count, type, indices, primcount); } /* GL_EXT_framebuffer_blit */ inline void glBlitFramebufferEXT(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter) { fp_glBlitFramebufferEXT(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter); } /* GL_EXT_framebuffer_multisample */ inline void glRenderbufferStorageMultisampleEXT(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) { fp_glRenderbufferStorageMultisampleEXT(target, samples, internalformat, width, height); } /* GL_EXT_framebuffer_object */ inline GLboolean glIsRenderbufferEXT(GLuint renderbuffer) { return fp_glIsRenderbufferEXT(renderbuffer); } inline void glBindRenderbufferEXT(GLenum target, GLuint renderbuffer) { fp_glBindRenderbufferEXT(target, renderbuffer); } inline void glDeleteRenderbuffersEXT(GLsizei n, const GLuint* renderbuffers) { fp_glDeleteRenderbuffersEXT(n, renderbuffers); } inline void glGenRenderbuffersEXT(GLsizei n, GLuint* renderbuffers) { fp_glGenRenderbuffersEXT(n, renderbuffers); } inline void glRenderbufferStorageEXT(GLenum target, GLenum internalformat, GLsizei width, GLsizei height) { fp_glRenderbufferStorageEXT(target, internalformat, width, height); } inline void glGetRenderbufferParameterivEXT(GLenum target, GLenum pname, GLint* params) { fp_glGetRenderbufferParameterivEXT(target, pname, params); } inline GLboolean glIsFramebufferEXT(GLuint framebuffer) { return fp_glIsFramebufferEXT(framebuffer); } inline void glBindFramebufferEXT(GLenum target, GLuint framebuffer) { fp_glBindFramebufferEXT(target, framebuffer); } inline void glDeleteFramebuffersEXT(GLsizei n, const GLuint* framebuffers) { fp_glDeleteFramebuffersEXT(n, framebuffers); } inline void glGenFramebuffersEXT(GLsizei n, GLuint* framebuffers) { fp_glGenFramebuffersEXT(n, framebuffers); } inline GLenum glCheckFramebufferStatusEXT(GLenum target) { return fp_glCheckFramebufferStatusEXT(target); } inline void glFramebufferTexture1DEXT(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) { fp_glFramebufferTexture1DEXT(target, attachment, textarget, texture, level); } inline void glFramebufferTexture2DEXT(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) { fp_glFramebufferTexture2DEXT(target, attachment, textarget, texture, level); } inline void glFramebufferTexture3DEXT(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset) { fp_glFramebufferTexture3DEXT(target, attachment, textarget, texture, level, zoffset); } inline void glFramebufferRenderbufferEXT(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) { fp_glFramebufferRenderbufferEXT(target, attachment, renderbuffertarget, renderbuffer); } inline void glGetFramebufferAttachmentParameterivEXT(GLenum target, GLenum attachment, GLenum pname, GLint* params) { fp_glGetFramebufferAttachmentParameterivEXT(target, attachment, pname, params); } inline void glGenerateMipmapEXT(GLenum target) { fp_glGenerateMipmapEXT(target); } /* GL_EXT_geometry_shader */ inline void glFramebufferTextureEXT(GLenum target, GLenum attachment, GLuint texture, GLint level) { fp_glFramebufferTextureEXT(target, attachment, texture, level); } /* GL_EXT_geometry_shader4 */ inline void glProgramParameteriEXT(GLuint program, GLenum pname, GLint value) { fp_glProgramParameteriEXT(program, pname, value); } /* GL_EXT_gpu_program_parameters */ inline void glProgramEnvParameters4fvEXT(GLenum target, GLuint index, GLsizei count, const GLfloat* params) { fp_glProgramEnvParameters4fvEXT(target, index, count, params); } inline void glProgramLocalParameters4fvEXT(GLenum target, GLuint index, GLsizei count, const GLfloat* params) { fp_glProgramLocalParameters4fvEXT(target, index, count, params); } /* GL_EXT_gpu_shader4 */ inline void glGetUniformuivEXT(GLuint program, GLint location, GLuint* params) { fp_glGetUniformuivEXT(program, location, params); } inline GLint glGetFragDataLocationEXT(GLuint program, const GLchar* name) { return fp_glGetFragDataLocationEXT(program, name); } inline void glUniform1uiEXT(GLint location, GLuint v0) { fp_glUniform1uiEXT(location, v0); } inline void glUniform2uiEXT(GLint location, GLuint v0, GLuint v1) { fp_glUniform2uiEXT(location, v0, v1); } inline void glUniform3uiEXT(GLint location, GLuint v0, GLuint v1, GLuint v2) { fp_glUniform3uiEXT(location, v0, v1, v2); } inline void glUniform4uiEXT(GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3) { fp_glUniform4uiEXT(location, v0, v1, v2, v3); } inline void glUniform1uivEXT(GLint location, GLsizei count, const GLuint* value) { fp_glUniform1uivEXT(location, count, value); } inline void glUniform2uivEXT(GLint location, GLsizei count, const GLuint* value) { fp_glUniform2uivEXT(location, count, value); } inline void glUniform3uivEXT(GLint location, GLsizei count, const GLuint* value) { fp_glUniform3uivEXT(location, count, value); } inline void glUniform4uivEXT(GLint location, GLsizei count, const GLuint* value) { fp_glUniform4uivEXT(location, count, value); } /* GL_EXT_instanced_arrays */ inline void glVertexAttribDivisorEXT(GLuint index, GLuint divisor) { fp_glVertexAttribDivisorEXT(index, divisor); } /* GL_EXT_map_buffer_range */ inline void* glMapBufferRangeEXT(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access) { return fp_glMapBufferRangeEXT(target, offset, length, access); } inline void glFlushMappedBufferRangeEXT(GLenum target, GLintptr offset, GLsizeiptr length) { fp_glFlushMappedBufferRangeEXT(target, offset, length); } /* GL_EXT_multi_draw_indirect */ inline void glMultiDrawArraysIndirectEXT(GLenum mode, const void* indirect, GLsizei drawcount, GLsizei stride) { fp_glMultiDrawArraysIndirectEXT(mode, indirect, drawcount, stride); } inline void glMultiDrawElementsIndirectEXT(GLenum mode, GLenum type, const void* indirect, GLsizei drawcount, GLsizei stride) { fp_glMultiDrawElementsIndirectEXT(mode, type, indirect, drawcount, stride); } /* GL_EXT_multisampled_render_to_texture */ inline void glFramebufferTexture2DMultisampleEXT(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples) { fp_glFramebufferTexture2DMultisampleEXT(target, attachment, textarget, texture, level, samples); } /* GL_EXT_multiview_draw_buffers */ inline void glReadBufferIndexedEXT(GLenum src, GLint index) { fp_glReadBufferIndexedEXT(src, index); } inline void glDrawBuffersIndexedEXT(GLint n, const GLenum* location, const GLint* indices) { fp_glDrawBuffersIndexedEXT(n, location, indices); } inline void glGetIntegeri_vEXT(GLenum target, GLuint index, GLint* data) { fp_glGetIntegeri_vEXT(target, index, data); } /* GL_EXT_polygon_offset_clamp */ inline void glPolygonOffsetClampEXT(GLfloat factor, GLfloat units, GLfloat clamp) { fp_glPolygonOffsetClampEXT(factor, units, clamp); } /* GL_EXT_primitive_bounding_box */ inline void glPrimitiveBoundingBoxEXT(GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW) { fp_glPrimitiveBoundingBoxEXT(minX, minY, minZ, minW, maxX, maxY, maxZ, maxW); } /* GL_EXT_provoking_vertex */ inline void glProvokingVertexEXT(GLenum mode) { fp_glProvokingVertexEXT(mode); } /* GL_EXT_raster_multisample */ inline void glRasterSamplesEXT(GLuint samples, GLboolean fixedsamplelocations) { fp_glRasterSamplesEXT(samples, fixedsamplelocations); } /* GL_EXT_robustness */ inline GLenum glGetGraphicsResetStatusEXT() { return fp_glGetGraphicsResetStatusEXT(); } inline void glReadnPixelsEXT(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void* data) { fp_glReadnPixelsEXT(x, y, width, height, format, type, bufSize, data); } inline void glGetnUniformfvEXT(GLuint program, GLint location, GLsizei bufSize, GLfloat* params) { fp_glGetnUniformfvEXT(program, location, bufSize, params); } inline void glGetnUniformivEXT(GLuint program, GLint location, GLsizei bufSize, GLint* params) { fp_glGetnUniformivEXT(program, location, bufSize, params); } /* GL_EXT_separate_shader_objects */ inline void glUseShaderProgramEXT(GLenum type, GLuint program) { fp_glUseShaderProgramEXT(type, program); } inline void glActiveProgramEXT(GLuint program) { fp_glActiveProgramEXT(program); } inline GLuint glCreateShaderProgramEXT(GLenum type, const GLchar* string) { return fp_glCreateShaderProgramEXT(type, string); } inline void glActiveShaderProgramEXT(GLuint pipeline, GLuint program) { fp_glActiveShaderProgramEXT(pipeline, program); } inline void glBindProgramPipelineEXT(GLuint pipeline) { fp_glBindProgramPipelineEXT(pipeline); } inline GLuint glCreateShaderProgramvEXT(GLenum type, GLsizei count, const GLchar** strings) { return fp_glCreateShaderProgramvEXT(type, count, strings); } inline void glDeleteProgramPipelinesEXT(GLsizei n, const GLuint* pipelines) { fp_glDeleteProgramPipelinesEXT(n, pipelines); } inline void glGenProgramPipelinesEXT(GLsizei n, GLuint* pipelines) { fp_glGenProgramPipelinesEXT(n, pipelines); } inline void glGetProgramPipelineInfoLogEXT(GLuint pipeline, GLsizei bufSize, GLsizei* length, GLchar* infoLog) { fp_glGetProgramPipelineInfoLogEXT(pipeline, bufSize, length, infoLog); } inline void glGetProgramPipelineivEXT(GLuint pipeline, GLenum pname, GLint* params) { fp_glGetProgramPipelineivEXT(pipeline, pname, params); } inline GLboolean glIsProgramPipelineEXT(GLuint pipeline) { return fp_glIsProgramPipelineEXT(pipeline); } inline void glUseProgramStagesEXT(GLuint pipeline, GLbitfield stages, GLuint program) { fp_glUseProgramStagesEXT(pipeline, stages, program); } inline void glValidateProgramPipelineEXT(GLuint pipeline) { fp_glValidateProgramPipelineEXT(pipeline); } /* GL_EXT_shader_image_load_store */ inline void glBindImageTextureEXT(GLuint index, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLint format) { fp_glBindImageTextureEXT(index, texture, level, layered, layer, access, format); } inline void glMemoryBarrierEXT(GLbitfield barriers) { fp_glMemoryBarrierEXT(barriers); } /* GL_EXT_sparse_texture */ inline void glTexPageCommitmentEXT(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean commit) { fp_glTexPageCommitmentEXT(target, level, xoffset, yoffset, zoffset, width, height, depth, commit); } /* GL_EXT_stencil_clear_tag */ inline void glStencilClearTagEXT(GLsizei stencilTagBits, GLuint stencilClearTag) { fp_glStencilClearTagEXT(stencilTagBits, stencilClearTag); } /* GL_EXT_tessellation_shader */ inline void glPatchParameteriEXT(GLenum pname, GLint value) { fp_glPatchParameteriEXT(pname, value); } /* GL_EXT_texture_array */ inline void glFramebufferTextureLayerEXT(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer) { fp_glFramebufferTextureLayerEXT(target, attachment, texture, level, layer); } /* GL_EXT_texture_border_clamp */ inline void glTexParameterIivEXT(GLenum target, GLenum pname, const GLint* params) { fp_glTexParameterIivEXT(target, pname, params); } inline void glTexParameterIuivEXT(GLenum target, GLenum pname, const GLuint* params) { fp_glTexParameterIuivEXT(target, pname, params); } inline void glGetTexParameterIivEXT(GLenum target, GLenum pname, GLint* params) { fp_glGetTexParameterIivEXT(target, pname, params); } inline void glGetTexParameterIuivEXT(GLenum target, GLenum pname, GLuint* params) { fp_glGetTexParameterIuivEXT(target, pname, params); } inline void glSamplerParameterIivEXT(GLuint sampler, GLenum pname, const GLint* param) { fp_glSamplerParameterIivEXT(sampler, pname, param); } inline void glSamplerParameterIuivEXT(GLuint sampler, GLenum pname, const GLuint* param) { fp_glSamplerParameterIuivEXT(sampler, pname, param); } inline void glGetSamplerParameterIivEXT(GLuint sampler, GLenum pname, GLint* params) { fp_glGetSamplerParameterIivEXT(sampler, pname, params); } inline void glGetSamplerParameterIuivEXT(GLuint sampler, GLenum pname, GLuint* params) { fp_glGetSamplerParameterIuivEXT(sampler, pname, params); } /* GL_EXT_texture_buffer */ inline void glTexBufferEXT(GLenum target, GLenum internalformat, GLuint buffer) { fp_glTexBufferEXT(target, internalformat, buffer); } inline void glTexBufferRangeEXT(GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size) { fp_glTexBufferRangeEXT(target, internalformat, buffer, offset, size); } /* GL_EXT_texture_integer */ inline void glClearColorIiEXT(GLint red, GLint green, GLint blue, GLint alpha) { fp_glClearColorIiEXT(red, green, blue, alpha); } inline void glClearColorIuiEXT(GLuint red, GLuint green, GLuint blue, GLuint alpha) { fp_glClearColorIuiEXT(red, green, blue, alpha); } /* GL_EXT_texture_storage */ inline void glTexStorage1DEXT(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width) { fp_glTexStorage1DEXT(target, levels, internalformat, width); } inline void glTexStorage2DEXT(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height) { fp_glTexStorage2DEXT(target, levels, internalformat, width, height); } inline void glTexStorage3DEXT(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth) { fp_glTexStorage3DEXT(target, levels, internalformat, width, height, depth); } /* GL_EXT_texture_view */ inline void glTextureViewEXT(GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers) { fp_glTextureViewEXT(texture, target, origtexture, internalformat, minlevel, numlevels, minlayer, numlayers); } /* GL_EXT_transform_feedback */ inline void glBeginTransformFeedbackEXT(GLenum primitiveMode) { fp_glBeginTransformFeedbackEXT(primitiveMode); } inline void glEndTransformFeedbackEXT() { fp_glEndTransformFeedbackEXT(); } inline void glBindBufferRangeEXT(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size) { fp_glBindBufferRangeEXT(target, index, buffer, offset, size); } inline void glBindBufferOffsetEXT(GLenum target, GLuint index, GLuint buffer, GLintptr offset) { fp_glBindBufferOffsetEXT(target, index, buffer, offset); } inline void glBindBufferBaseEXT(GLenum target, GLuint index, GLuint buffer) { fp_glBindBufferBaseEXT(target, index, buffer); } inline void glTransformFeedbackVaryingsEXT(GLuint program, GLsizei count, const GLchar** varyings, GLenum bufferMode) { fp_glTransformFeedbackVaryingsEXT(program, count, varyings, bufferMode); } inline void glGetTransformFeedbackVaryingEXT(GLuint program, GLuint index, GLsizei bufSize, GLsizei* length, GLsizei* size, GLenum* type, GLchar* name) { fp_glGetTransformFeedbackVaryingEXT(program, index, bufSize, length, size, type, name); } /* GL_EXT_vertex_attrib_64bit */ inline void glVertexAttribL1dEXT(GLuint index, GLdouble x) { fp_glVertexAttribL1dEXT(index, x); } inline void glVertexAttribL2dEXT(GLuint index, GLdouble x, GLdouble y) { fp_glVertexAttribL2dEXT(index, x, y); } inline void glVertexAttribL3dEXT(GLuint index, GLdouble x, GLdouble y, GLdouble z) { fp_glVertexAttribL3dEXT(index, x, y, z); } inline void glVertexAttribL4dEXT(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w) { fp_glVertexAttribL4dEXT(index, x, y, z, w); } inline void glVertexAttribL1dvEXT(GLuint index, const GLdouble* v) { fp_glVertexAttribL1dvEXT(index, v); } inline void glVertexAttribL2dvEXT(GLuint index, const GLdouble* v) { fp_glVertexAttribL2dvEXT(index, v); } inline void glVertexAttribL3dvEXT(GLuint index, const GLdouble* v) { fp_glVertexAttribL3dvEXT(index, v); } inline void glVertexAttribL4dvEXT(GLuint index, const GLdouble* v) { fp_glVertexAttribL4dvEXT(index, v); } inline void glVertexAttribLPointerEXT(GLuint index, GLint size, GLenum type, GLsizei stride, const void* pointer) { fp_glVertexAttribLPointerEXT(index, size, type, stride, pointer); } inline void glGetVertexAttribLdvEXT(GLuint index, GLenum pname, GLdouble* params) { fp_glGetVertexAttribLdvEXT(index, pname, params); } /* GL_EXT_x11_sync_object */ inline GLsync glImportSyncEXT(GLenum external_sync_type, GLintptr external_sync, GLbitfield flags) { return fp_glImportSyncEXT(external_sync_type, external_sync, flags); } /* GL_OES_copy_image */ inline void glCopyImageSubDataOES(GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth) { fp_glCopyImageSubDataOES(srcName, srcTarget, srcLevel, srcX, srcY, srcZ, dstName, dstTarget, dstLevel, dstX, dstY, dstZ, srcWidth, srcHeight, srcDepth); } /* GL_OES_draw_buffers_indexed */ inline void glEnableiOES(GLenum target, GLuint index) { fp_glEnableiOES(target, index); } inline void glDisableiOES(GLenum target, GLuint index) { fp_glDisableiOES(target, index); } inline void glBlendEquationiOES(GLuint buf, GLenum mode) { fp_glBlendEquationiOES(buf, mode); } inline void glBlendEquationSeparateiOES(GLuint buf, GLenum modeRGB, GLenum modeAlpha) { fp_glBlendEquationSeparateiOES(buf, modeRGB, modeAlpha); } inline void glBlendFunciOES(GLuint buf, GLenum src, GLenum dst) { fp_glBlendFunciOES(buf, src, dst); } inline void glBlendFuncSeparateiOES(GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) { fp_glBlendFuncSeparateiOES(buf, srcRGB, dstRGB, srcAlpha, dstAlpha); } inline void glColorMaskiOES(GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a) { fp_glColorMaskiOES(index, r, g, b, a); } inline GLboolean glIsEnablediOES(GLenum target, GLuint index) { return fp_glIsEnablediOES(target, index); } /* GL_OES_draw_elements_base_vertex */ inline void glDrawElementsBaseVertexOES(GLenum mode, GLsizei count, GLenum type, const void* indices, GLint basevertex) { fp_glDrawElementsBaseVertexOES(mode, count, type, indices, basevertex); } inline void glDrawRangeElementsBaseVertexOES(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void* indices, GLint basevertex) { fp_glDrawRangeElementsBaseVertexOES(mode, start, end, count, type, indices, basevertex); } inline void glDrawElementsInstancedBaseVertexOES(GLenum mode, GLsizei count, GLenum type, const void* indices, GLsizei instancecount, GLint basevertex) { fp_glDrawElementsInstancedBaseVertexOES(mode, count, type, indices, instancecount, basevertex); } inline void glMultiDrawElementsBaseVertexOES(GLenum mode, const GLsizei* count, GLenum type, const void** indices, GLsizei primcount, const GLint* basevertex) { fp_glMultiDrawElementsBaseVertexOES(mode, count, type, indices, primcount, basevertex); } /* GL_OES_EGL_image */ inline void glEGLImageTargetTexture2DOES(GLenum target, GLeglImageOES image) { fp_glEGLImageTargetTexture2DOES(target, image); } inline void glEGLImageTargetRenderbufferStorageOES(GLenum target, GLeglImageOES image) { fp_glEGLImageTargetRenderbufferStorageOES(target, image); } /* GL_OES_geometry_shader */ inline void glFramebufferTextureOES(GLenum target, GLenum attachment, GLuint texture, GLint level) { fp_glFramebufferTextureOES(target, attachment, texture, level); } /* GL_OES_get_program_binary */ inline void glGetProgramBinaryOES(GLuint program, GLsizei bufSize, GLsizei* length, GLenum* binaryFormat, void* binary) { fp_glGetProgramBinaryOES(program, bufSize, length, binaryFormat, binary); } inline void glProgramBinaryOES(GLuint program, GLenum binaryFormat, const void* binary, GLint length) { fp_glProgramBinaryOES(program, binaryFormat, binary, length); } /* GL_OES_mapbuffer */ inline void* glMapBufferOES(GLenum target, GLenum access) { return fp_glMapBufferOES(target, access); } inline GLboolean glUnmapBufferOES(GLenum target) { return fp_glUnmapBufferOES(target); } inline void glGetBufferPointervOES(GLenum target, GLenum pname, void** params) { fp_glGetBufferPointervOES(target, pname, params); } /* GL_OES_primitive_bounding_box */ inline void glPrimitiveBoundingBoxOES(GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW) { fp_glPrimitiveBoundingBoxOES(minX, minY, minZ, minW, maxX, maxY, maxZ, maxW); } /* GL_OES_sample_shading */ inline void glMinSampleShadingOES(GLfloat value) { fp_glMinSampleShadingOES(value); } /* GL_OES_tessellation_shader */ inline void glPatchParameteriOES(GLenum pname, GLint value) { fp_glPatchParameteriOES(pname, value); } /* GL_OES_texture_3D */ inline void glTexImage3DOES(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void* pixels) { fp_glTexImage3DOES(target, level, internalformat, width, height, depth, border, format, type, pixels); } inline void glTexSubImage3DOES(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void* pixels) { fp_glTexSubImage3DOES(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); } inline void glCopyTexSubImage3DOES(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height) { fp_glCopyTexSubImage3DOES(target, level, xoffset, yoffset, zoffset, x, y, width, height); } inline void glCompressedTexImage3DOES(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void* data) { fp_glCompressedTexImage3DOES(target, level, internalformat, width, height, depth, border, imageSize, data); } inline void glCompressedTexSubImage3DOES(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void* data) { fp_glCompressedTexSubImage3DOES(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data); } inline void glFramebufferTexture3DOES(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset) { fp_glFramebufferTexture3DOES(target, attachment, textarget, texture, level, zoffset); } /* GL_OES_texture_border_clamp */ inline void glTexParameterIivOES(GLenum target, GLenum pname, const GLint* params) { fp_glTexParameterIivOES(target, pname, params); } inline void glTexParameterIuivOES(GLenum target, GLenum pname, const GLuint* params) { fp_glTexParameterIuivOES(target, pname, params); } inline void glGetTexParameterIivOES(GLenum target, GLenum pname, GLint* params) { fp_glGetTexParameterIivOES(target, pname, params); } inline void glGetTexParameterIuivOES(GLenum target, GLenum pname, GLuint* params) { fp_glGetTexParameterIuivOES(target, pname, params); } inline void glSamplerParameterIivOES(GLuint sampler, GLenum pname, const GLint* param) { fp_glSamplerParameterIivOES(sampler, pname, param); } inline void glSamplerParameterIuivOES(GLuint sampler, GLenum pname, const GLuint* param) { fp_glSamplerParameterIuivOES(sampler, pname, param); } inline void glGetSamplerParameterIivOES(GLuint sampler, GLenum pname, GLint* params) { fp_glGetSamplerParameterIivOES(sampler, pname, params); } inline void glGetSamplerParameterIuivOES(GLuint sampler, GLenum pname, GLuint* params) { fp_glGetSamplerParameterIuivOES(sampler, pname, params); } /* GL_OES_texture_buffer */ inline void glTexBufferOES(GLenum target, GLenum internalformat, GLuint buffer) { fp_glTexBufferOES(target, internalformat, buffer); } inline void glTexBufferRangeOES(GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size) { fp_glTexBufferRangeOES(target, internalformat, buffer, offset, size); } /* GL_OES_texture_storage_multisample_2d_array */ inline void glTexStorage3DMultisampleOES(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations) { fp_glTexStorage3DMultisampleOES(target, samples, internalformat, width, height, depth, fixedsamplelocations); } /* GL_OES_texture_view */ inline void glTextureViewOES(GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers) { fp_glTextureViewOES(texture, target, origtexture, internalformat, minlevel, numlevels, minlayer, numlayers); } /* GL_OES_vertex_array_object */ inline void glBindVertexArrayOES(GLuint array) { fp_glBindVertexArrayOES(array); } inline void glDeleteVertexArraysOES(GLsizei n, const GLuint* arrays) { fp_glDeleteVertexArraysOES(n, arrays); } inline void glGenVertexArraysOES(GLsizei n, GLuint* arrays) { fp_glGenVertexArraysOES(n, arrays); } inline GLboolean glIsVertexArrayOES(GLuint array) { return fp_glIsVertexArrayOES(array); } /* GL_AMD_debug_output */ inline void glDebugMessageEnableAMD(GLenum category, GLenum severity, GLsizei count, const GLuint* ids, GLboolean enabled) { fp_glDebugMessageEnableAMD(category, severity, count, ids, enabled); } inline void glDebugMessageInsertAMD(GLenum category, GLenum severity, GLuint id, GLsizei length, const GLchar* buf) { fp_glDebugMessageInsertAMD(category, severity, id, length, buf); } inline void glDebugMessageCallbackAMD(GLDEBUGPROCAMD callback, void* userParam) { fp_glDebugMessageCallbackAMD(callback, userParam); } inline GLuint glGetDebugMessageLogAMD(GLuint count, GLsizei bufsize, GLenum* categories, GLuint* severities, GLuint* ids, GLsizei* lengths, GLchar* message) { return fp_glGetDebugMessageLogAMD(count, bufsize, categories, severities, ids, lengths, message); } /* GL_AMD_draw_buffers_blend */ inline void glBlendFuncIndexedAMD(GLuint buf, GLenum src, GLenum dst) { fp_glBlendFuncIndexedAMD(buf, src, dst); } inline void glBlendFuncSeparateIndexedAMD(GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) { fp_glBlendFuncSeparateIndexedAMD(buf, srcRGB, dstRGB, srcAlpha, dstAlpha); } inline void glBlendEquationIndexedAMD(GLuint buf, GLenum mode) { fp_glBlendEquationIndexedAMD(buf, mode); } inline void glBlendEquationSeparateIndexedAMD(GLuint buf, GLenum modeRGB, GLenum modeAlpha) { fp_glBlendEquationSeparateIndexedAMD(buf, modeRGB, modeAlpha); } /* GL_AMD_gpu_shader_int64 */ inline void glUniform1i64NV(GLint location, GLint64EXT x) { fp_glUniform1i64NV(location, x); } inline void glUniform2i64NV(GLint location, GLint64EXT x, GLint64EXT y) { fp_glUniform2i64NV(location, x, y); } inline void glUniform3i64NV(GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z) { fp_glUniform3i64NV(location, x, y, z); } inline void glUniform4i64NV(GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w) { fp_glUniform4i64NV(location, x, y, z, w); } inline void glUniform1i64vNV(GLint location, GLsizei count, const GLint64EXT* value) { fp_glUniform1i64vNV(location, count, value); } inline void glUniform2i64vNV(GLint location, GLsizei count, const GLint64EXT* value) { fp_glUniform2i64vNV(location, count, value); } inline void glUniform3i64vNV(GLint location, GLsizei count, const GLint64EXT* value) { fp_glUniform3i64vNV(location, count, value); } inline void glUniform4i64vNV(GLint location, GLsizei count, const GLint64EXT* value) { fp_glUniform4i64vNV(location, count, value); } inline void glUniform1ui64NV(GLint location, GLuint64EXT x) { fp_glUniform1ui64NV(location, x); } inline void glUniform2ui64NV(GLint location, GLuint64EXT x, GLuint64EXT y) { fp_glUniform2ui64NV(location, x, y); } inline void glUniform3ui64NV(GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z) { fp_glUniform3ui64NV(location, x, y, z); } inline void glUniform4ui64NV(GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w) { fp_glUniform4ui64NV(location, x, y, z, w); } inline void glUniform1ui64vNV(GLint location, GLsizei count, const GLuint64EXT* value) { fp_glUniform1ui64vNV(location, count, value); } inline void glUniform2ui64vNV(GLint location, GLsizei count, const GLuint64EXT* value) { fp_glUniform2ui64vNV(location, count, value); } inline void glUniform3ui64vNV(GLint location, GLsizei count, const GLuint64EXT* value) { fp_glUniform3ui64vNV(location, count, value); } inline void glUniform4ui64vNV(GLint location, GLsizei count, const GLuint64EXT* value) { fp_glUniform4ui64vNV(location, count, value); } inline void glGetUniformi64vNV(GLuint program, GLint location, GLint64EXT* params) { fp_glGetUniformi64vNV(program, location, params); } inline void glGetUniformui64vNV(GLuint program, GLint location, GLuint64EXT* params) { fp_glGetUniformui64vNV(program, location, params); } inline void glProgramUniform1i64NV(GLuint program, GLint location, GLint64EXT x) { fp_glProgramUniform1i64NV(program, location, x); } inline void glProgramUniform2i64NV(GLuint program, GLint location, GLint64EXT x, GLint64EXT y) { fp_glProgramUniform2i64NV(program, location, x, y); } inline void glProgramUniform3i64NV(GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z) { fp_glProgramUniform3i64NV(program, location, x, y, z); } inline void glProgramUniform4i64NV(GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w) { fp_glProgramUniform4i64NV(program, location, x, y, z, w); } inline void glProgramUniform1i64vNV(GLuint program, GLint location, GLsizei count, const GLint64EXT* value) { fp_glProgramUniform1i64vNV(program, location, count, value); } inline void glProgramUniform2i64vNV(GLuint program, GLint location, GLsizei count, const GLint64EXT* value) { fp_glProgramUniform2i64vNV(program, location, count, value); } inline void glProgramUniform3i64vNV(GLuint program, GLint location, GLsizei count, const GLint64EXT* value) { fp_glProgramUniform3i64vNV(program, location, count, value); } inline void glProgramUniform4i64vNV(GLuint program, GLint location, GLsizei count, const GLint64EXT* value) { fp_glProgramUniform4i64vNV(program, location, count, value); } inline void glProgramUniform1ui64NV(GLuint program, GLint location, GLuint64EXT x) { fp_glProgramUniform1ui64NV(program, location, x); } inline void glProgramUniform2ui64NV(GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y) { fp_glProgramUniform2ui64NV(program, location, x, y); } inline void glProgramUniform3ui64NV(GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z) { fp_glProgramUniform3ui64NV(program, location, x, y, z); } inline void glProgramUniform4ui64NV(GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w) { fp_glProgramUniform4ui64NV(program, location, x, y, z, w); } inline void glProgramUniform1ui64vNV(GLuint program, GLint location, GLsizei count, const GLuint64EXT* value) { fp_glProgramUniform1ui64vNV(program, location, count, value); } inline void glProgramUniform2ui64vNV(GLuint program, GLint location, GLsizei count, const GLuint64EXT* value) { fp_glProgramUniform2ui64vNV(program, location, count, value); } inline void glProgramUniform3ui64vNV(GLuint program, GLint location, GLsizei count, const GLuint64EXT* value) { fp_glProgramUniform3ui64vNV(program, location, count, value); } inline void glProgramUniform4ui64vNV(GLuint program, GLint location, GLsizei count, const GLuint64EXT* value) { fp_glProgramUniform4ui64vNV(program, location, count, value); } /* GL_AMD_interleaved_elements */ inline void glVertexAttribParameteriAMD(GLuint index, GLenum pname, GLint param) { fp_glVertexAttribParameteriAMD(index, pname, param); } /* GL_AMD_multi_draw_indirect */ inline void glMultiDrawArraysIndirectAMD(GLenum mode, const void* indirect, GLsizei primcount, GLsizei stride) { fp_glMultiDrawArraysIndirectAMD(mode, indirect, primcount, stride); } inline void glMultiDrawElementsIndirectAMD(GLenum mode, GLenum type, const void* indirect, GLsizei primcount, GLsizei stride) { fp_glMultiDrawElementsIndirectAMD(mode, type, indirect, primcount, stride); } /* GL_AMD_name_gen_delete */ inline void glGenNamesAMD(GLenum identifier, GLuint num, GLuint* names) { fp_glGenNamesAMD(identifier, num, names); } inline void glDeleteNamesAMD(GLenum identifier, GLuint num, const GLuint* names) { fp_glDeleteNamesAMD(identifier, num, names); } inline GLboolean glIsNameAMD(GLenum identifier, GLuint name) { return fp_glIsNameAMD(identifier, name); } /* GL_AMD_occlusion_query_event */ inline void glQueryObjectParameteruiAMD(GLenum target, GLuint id, GLenum pname, GLuint param) { fp_glQueryObjectParameteruiAMD(target, id, pname, param); } /* GL_AMD_performance_monitor */ inline void glGetPerfMonitorGroupsAMD(GLint* numGroups, GLsizei groupsSize, GLuint* groups) { fp_glGetPerfMonitorGroupsAMD(numGroups, groupsSize, groups); } inline void glGetPerfMonitorCountersAMD(GLuint group, GLint* numCounters, GLint* maxActiveCounters, GLsizei counterSize, GLuint* counters) { fp_glGetPerfMonitorCountersAMD(group, numCounters, maxActiveCounters, counterSize, counters); } inline void glGetPerfMonitorGroupStringAMD(GLuint group, GLsizei bufSize, GLsizei* length, GLchar* groupString) { fp_glGetPerfMonitorGroupStringAMD(group, bufSize, length, groupString); } inline void glGetPerfMonitorCounterStringAMD(GLuint group, GLuint counter, GLsizei bufSize, GLsizei* length, GLchar* counterString) { fp_glGetPerfMonitorCounterStringAMD(group, counter, bufSize, length, counterString); } inline void glGetPerfMonitorCounterInfoAMD(GLuint group, GLuint counter, GLenum pname, void* data) { fp_glGetPerfMonitorCounterInfoAMD(group, counter, pname, data); } inline void glGenPerfMonitorsAMD(GLsizei n, GLuint* monitors) { fp_glGenPerfMonitorsAMD(n, monitors); } inline void glDeletePerfMonitorsAMD(GLsizei n, GLuint* monitors) { fp_glDeletePerfMonitorsAMD(n, monitors); } inline void glSelectPerfMonitorCountersAMD(GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint* counterList) { fp_glSelectPerfMonitorCountersAMD(monitor, enable, group, numCounters, counterList); } inline void glBeginPerfMonitorAMD(GLuint monitor) { fp_glBeginPerfMonitorAMD(monitor); } inline void glEndPerfMonitorAMD(GLuint monitor) { fp_glEndPerfMonitorAMD(monitor); } inline void glGetPerfMonitorCounterDataAMD(GLuint monitor, GLenum pname, GLsizei dataSize, GLuint* data, GLint* bytesWritten) { fp_glGetPerfMonitorCounterDataAMD(monitor, pname, dataSize, data, bytesWritten); } /* GL_AMD_sample_positions */ inline void glSetMultisamplefvAMD(GLenum pname, GLuint index, const GLfloat* val) { fp_glSetMultisamplefvAMD(pname, index, val); } /* GL_AMD_sparse_texture */ inline void glTexStorageSparseAMD(GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLsizei layers, GLbitfield flags) { fp_glTexStorageSparseAMD(target, internalFormat, width, height, depth, layers, flags); } inline void glTextureStorageSparseAMD(GLuint texture, GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLsizei layers, GLbitfield flags) { fp_glTextureStorageSparseAMD(texture, target, internalFormat, width, height, depth, layers, flags); } /* GL_AMD_stencil_operation_extended */ inline void glStencilOpValueAMD(GLenum face, GLuint value) { fp_glStencilOpValueAMD(face, value); } /* GL_AMD_vertex_shader_tessellator */ inline void glTessellationFactorAMD(GLfloat factor) { fp_glTessellationFactorAMD(factor); } inline void glTessellationModeAMD(GLenum mode) { fp_glTessellationModeAMD(mode); } /* GL_ANGLE_framebuffer_blit */ inline void glBlitFramebufferANGLE(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter) { fp_glBlitFramebufferANGLE(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter); } /* GL_ANGLE_framebuffer_multisample */ inline void glRenderbufferStorageMultisampleANGLE(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) { fp_glRenderbufferStorageMultisampleANGLE(target, samples, internalformat, width, height); } /* GL_ANGLE_instanced_arrays */ inline void glDrawArraysInstancedANGLE(GLenum mode, GLint first, GLsizei count, GLsizei primcount) { fp_glDrawArraysInstancedANGLE(mode, first, count, primcount); } inline void glDrawElementsInstancedANGLE(GLenum mode, GLsizei count, GLenum type, const void* indices, GLsizei primcount) { fp_glDrawElementsInstancedANGLE(mode, count, type, indices, primcount); } inline void glVertexAttribDivisorANGLE(GLuint index, GLuint divisor) { fp_glVertexAttribDivisorANGLE(index, divisor); } /* GL_ANGLE_translated_shader_source */ inline void glGetTranslatedShaderSourceANGLE(GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source) { fp_glGetTranslatedShaderSourceANGLE(shader, bufsize, length, source); } /* GL_APPLE_copy_texture_levels */ inline void glCopyTextureLevelsAPPLE(GLuint destinationTexture, GLuint sourceTexture, GLint sourceBaseLevel, GLsizei sourceLevelCount) { fp_glCopyTextureLevelsAPPLE(destinationTexture, sourceTexture, sourceBaseLevel, sourceLevelCount); } /* GL_APPLE_element_array */ inline void glElementPointerAPPLE(GLenum type, const void* pointer) { fp_glElementPointerAPPLE(type, pointer); } inline void glDrawElementArrayAPPLE(GLenum mode, GLint first, GLsizei count) { fp_glDrawElementArrayAPPLE(mode, first, count); } inline void glDrawRangeElementArrayAPPLE(GLenum mode, GLuint start, GLuint end, GLint first, GLsizei count) { fp_glDrawRangeElementArrayAPPLE(mode, start, end, first, count); } inline void glMultiDrawElementArrayAPPLE(GLenum mode, const GLint* first, const GLsizei* count, GLsizei primcount) { fp_glMultiDrawElementArrayAPPLE(mode, first, count, primcount); } inline void glMultiDrawRangeElementArrayAPPLE(GLenum mode, GLuint start, GLuint end, const GLint* first, const GLsizei* count, GLsizei primcount) { fp_glMultiDrawRangeElementArrayAPPLE(mode, start, end, first, count, primcount); } /* GL_APPLE_fence */ inline void glGenFencesAPPLE(GLsizei n, GLuint* fences) { fp_glGenFencesAPPLE(n, fences); } inline void glDeleteFencesAPPLE(GLsizei n, const GLuint* fences) { fp_glDeleteFencesAPPLE(n, fences); } inline void glSetFenceAPPLE(GLuint fence) { fp_glSetFenceAPPLE(fence); } inline GLboolean glIsFenceAPPLE(GLuint fence) { return fp_glIsFenceAPPLE(fence); } inline GLboolean glTestFenceAPPLE(GLuint fence) { return fp_glTestFenceAPPLE(fence); } inline void glFinishFenceAPPLE(GLuint fence) { fp_glFinishFenceAPPLE(fence); } inline GLboolean glTestObjectAPPLE(GLenum object, GLuint name) { return fp_glTestObjectAPPLE(object, name); } inline void glFinishObjectAPPLE(GLenum object, GLint name) { fp_glFinishObjectAPPLE(object, name); } /* GL_APPLE_flush_buffer_range */ inline void glBufferParameteriAPPLE(GLenum target, GLenum pname, GLint param) { fp_glBufferParameteriAPPLE(target, pname, param); } inline void glFlushMappedBufferRangeAPPLE(GLenum target, GLintptr offset, GLsizeiptr size) { fp_glFlushMappedBufferRangeAPPLE(target, offset, size); } /* GL_APPLE_framebuffer_multisample */ inline void glRenderbufferStorageMultisampleAPPLE(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) { fp_glRenderbufferStorageMultisampleAPPLE(target, samples, internalformat, width, height); } inline void glResolveMultisampleFramebufferAPPLE() { fp_glResolveMultisampleFramebufferAPPLE(); } /* GL_APPLE_object_purgeable */ inline GLenum glObjectPurgeableAPPLE(GLenum objectType, GLuint name, GLenum option) { return fp_glObjectPurgeableAPPLE(objectType, name, option); } inline GLenum glObjectUnpurgeableAPPLE(GLenum objectType, GLuint name, GLenum option) { return fp_glObjectUnpurgeableAPPLE(objectType, name, option); } inline void glGetObjectParameterivAPPLE(GLenum objectType, GLuint name, GLenum pname, GLint* params) { fp_glGetObjectParameterivAPPLE(objectType, name, pname, params); } /* GL_APPLE_sync */ inline GLsync glFenceSyncAPPLE(GLenum condition, GLbitfield flags) { return fp_glFenceSyncAPPLE(condition, flags); } inline GLboolean glIsSyncAPPLE(GLsync sync) { return fp_glIsSyncAPPLE(sync); } inline void glDeleteSyncAPPLE(GLsync sync) { fp_glDeleteSyncAPPLE(sync); } inline GLenum glClientWaitSyncAPPLE(GLsync sync, GLbitfield flags, GLuint64 timeout) { return fp_glClientWaitSyncAPPLE(sync, flags, timeout); } inline void glWaitSyncAPPLE(GLsync sync, GLbitfield flags, GLuint64 timeout) { fp_glWaitSyncAPPLE(sync, flags, timeout); } inline void glGetInteger64vAPPLE(GLenum pname, GLint64* params) { fp_glGetInteger64vAPPLE(pname, params); } inline void glGetSyncivAPPLE(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei* length, GLint* values) { fp_glGetSyncivAPPLE(sync, pname, bufSize, length, values); } /* GL_APPLE_texture_range */ inline void glTextureRangeAPPLE(GLenum target, GLsizei length, const void* pointer) { fp_glTextureRangeAPPLE(target, length, pointer); } inline void glGetTexParameterPointervAPPLE(GLenum target, GLenum pname, void** params) { fp_glGetTexParameterPointervAPPLE(target, pname, params); } /* GL_APPLE_vertex_array_object */ inline void glBindVertexArrayAPPLE(GLuint array) { fp_glBindVertexArrayAPPLE(array); } inline void glDeleteVertexArraysAPPLE(GLsizei n, const GLuint* arrays) { fp_glDeleteVertexArraysAPPLE(n, arrays); } inline void glGenVertexArraysAPPLE(GLsizei n, GLuint* arrays) { fp_glGenVertexArraysAPPLE(n, arrays); } inline GLboolean glIsVertexArrayAPPLE(GLuint array) { return fp_glIsVertexArrayAPPLE(array); } /* GL_APPLE_vertex_array_range */ inline void glVertexArrayRangeAPPLE(GLsizei length, void* pointer) { fp_glVertexArrayRangeAPPLE(length, pointer); } inline void glFlushVertexArrayRangeAPPLE(GLsizei length, void* pointer) { fp_glFlushVertexArrayRangeAPPLE(length, pointer); } inline void glVertexArrayParameteriAPPLE(GLenum pname, GLint param) { fp_glVertexArrayParameteriAPPLE(pname, param); } /* GL_APPLE_vertex_program_evaluators */ inline void glEnableVertexAttribAPPLE(GLuint index, GLenum pname) { fp_glEnableVertexAttribAPPLE(index, pname); } inline void glDisableVertexAttribAPPLE(GLuint index, GLenum pname) { fp_glDisableVertexAttribAPPLE(index, pname); } inline GLboolean glIsVertexAttribEnabledAPPLE(GLuint index, GLenum pname) { return fp_glIsVertexAttribEnabledAPPLE(index, pname); } inline void glMapVertexAttrib1dAPPLE(GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble* points) { fp_glMapVertexAttrib1dAPPLE(index, size, u1, u2, stride, order, points); } inline void glMapVertexAttrib1fAPPLE(GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat* points) { fp_glMapVertexAttrib1fAPPLE(index, size, u1, u2, stride, order, points); } inline void glMapVertexAttrib2dAPPLE(GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble* points) { fp_glMapVertexAttrib2dAPPLE(index, size, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points); } inline void glMapVertexAttrib2fAPPLE(GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat* points) { fp_glMapVertexAttrib2fAPPLE(index, size, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points); } /* GL_GREMEDY_frame_terminator */ inline void glFrameTerminatorGREMEDY() { fp_glFrameTerminatorGREMEDY(); } /* GL_GREMEDY_string_marker */ inline void glStringMarkerGREMEDY(GLsizei len, const void* string) { fp_glStringMarkerGREMEDY(len, string); } /* GL_IMG_multisampled_render_to_texture */ inline void glRenderbufferStorageMultisampleIMG(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) { fp_glRenderbufferStorageMultisampleIMG(target, samples, internalformat, width, height); } inline void glFramebufferTexture2DMultisampleIMG(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples) { fp_glFramebufferTexture2DMultisampleIMG(target, attachment, textarget, texture, level, samples); } /* GL_INGR_blend_func_separate */ inline void glBlendFuncSeparateINGR(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha) { fp_glBlendFuncSeparateINGR(sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha); } /* GL_INTEL_framebuffer_CMAA */ inline void glApplyFramebufferAttachmentCMAAINTEL() { fp_glApplyFramebufferAttachmentCMAAINTEL(); } /* GL_INTEL_map_texture */ inline void glSyncTextureINTEL(GLuint texture) { fp_glSyncTextureINTEL(texture); } inline void glUnmapTexture2DINTEL(GLuint texture, GLint level) { fp_glUnmapTexture2DINTEL(texture, level); } inline void* glMapTexture2DINTEL(GLuint texture, GLint level, GLbitfield access, GLint* stride, GLenum* layout) { return fp_glMapTexture2DINTEL(texture, level, access, stride, layout); } /* GL_INTEL_performance_query */ inline void glBeginPerfQueryINTEL(GLuint queryHandle) { fp_glBeginPerfQueryINTEL(queryHandle); } inline void glCreatePerfQueryINTEL(GLuint queryId, GLuint* queryHandle) { fp_glCreatePerfQueryINTEL(queryId, queryHandle); } inline void glDeletePerfQueryINTEL(GLuint queryHandle) { fp_glDeletePerfQueryINTEL(queryHandle); } inline void glEndPerfQueryINTEL(GLuint queryHandle) { fp_glEndPerfQueryINTEL(queryHandle); } inline void glGetFirstPerfQueryIdINTEL(GLuint* queryId) { fp_glGetFirstPerfQueryIdINTEL(queryId); } inline void glGetNextPerfQueryIdINTEL(GLuint queryId, GLuint* nextQueryId) { fp_glGetNextPerfQueryIdINTEL(queryId, nextQueryId); } inline void glGetPerfCounterInfoINTEL(GLuint queryId, GLuint counterId, GLuint counterNameLength, GLchar* counterName, GLuint counterDescLength, GLchar* counterDesc, GLuint* counterOffset, GLuint* counterDataSize, GLuint* counterTypeEnum, GLuint* counterDataTypeEnum, GLuint64* rawCounterMaxValue) { fp_glGetPerfCounterInfoINTEL(queryId, counterId, counterNameLength, counterName, counterDescLength, counterDesc, counterOffset, counterDataSize, counterTypeEnum, counterDataTypeEnum, rawCounterMaxValue); } inline void glGetPerfQueryDataINTEL(GLuint queryHandle, GLuint flags, GLsizei dataSize, GLvoid* data, GLuint* bytesWritten) { fp_glGetPerfQueryDataINTEL(queryHandle, flags, dataSize, data, bytesWritten); } inline void glGetPerfQueryIdByNameINTEL(GLchar* queryName, GLuint* queryId) { fp_glGetPerfQueryIdByNameINTEL(queryName, queryId); } inline void glGetPerfQueryInfoINTEL(GLuint queryId, GLuint queryNameLength, GLchar* queryName, GLuint* dataSize, GLuint* noCounters, GLuint* noInstances, GLuint* capsMask) { fp_glGetPerfQueryInfoINTEL(queryId, queryNameLength, queryName, dataSize, noCounters, noInstances, capsMask); } /* GL_NV_bindless_multi_draw_indirect */ inline void glMultiDrawArraysIndirectBindlessNV(GLenum mode, const void* indirect, GLsizei drawCount, GLsizei stride, GLint vertexBufferCount) { fp_glMultiDrawArraysIndirectBindlessNV(mode, indirect, drawCount, stride, vertexBufferCount); } inline void glMultiDrawElementsIndirectBindlessNV(GLenum mode, GLenum type, const void* indirect, GLsizei drawCount, GLsizei stride, GLint vertexBufferCount) { fp_glMultiDrawElementsIndirectBindlessNV(mode, type, indirect, drawCount, stride, vertexBufferCount); } /* GL_NV_bindless_multi_draw_indirect_count */ inline void glMultiDrawArraysIndirectBindlessCountNV(GLenum mode, const void* indirect, GLsizei drawCount, GLsizei maxDrawCount, GLsizei stride, GLint vertexBufferCount) { fp_glMultiDrawArraysIndirectBindlessCountNV(mode, indirect, drawCount, maxDrawCount, stride, vertexBufferCount); } inline void glMultiDrawElementsIndirectBindlessCountNV(GLenum mode, GLenum type, const void* indirect, GLsizei drawCount, GLsizei maxDrawCount, GLsizei stride, GLint vertexBufferCount) { fp_glMultiDrawElementsIndirectBindlessCountNV(mode, type, indirect, drawCount, maxDrawCount, stride, vertexBufferCount); } /* GL_NV_bindless_texture */ inline GLuint64 glGetTextureHandleNV(GLuint texture) { return fp_glGetTextureHandleNV(texture); } inline GLuint64 glGetTextureSamplerHandleNV(GLuint texture, GLuint sampler) { return fp_glGetTextureSamplerHandleNV(texture, sampler); } inline void glMakeTextureHandleResidentNV(GLuint64 handle) { fp_glMakeTextureHandleResidentNV(handle); } inline void glMakeTextureHandleNonResidentNV(GLuint64 handle) { fp_glMakeTextureHandleNonResidentNV(handle); } inline GLuint64 glGetImageHandleNV(GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format) { return fp_glGetImageHandleNV(texture, level, layered, layer, format); } inline void glMakeImageHandleResidentNV(GLuint64 handle, GLenum access) { fp_glMakeImageHandleResidentNV(handle, access); } inline void glMakeImageHandleNonResidentNV(GLuint64 handle) { fp_glMakeImageHandleNonResidentNV(handle); } inline void glUniformHandleui64NV(GLint location, GLuint64 value) { fp_glUniformHandleui64NV(location, value); } inline void glUniformHandleui64vNV(GLint location, GLsizei count, const GLuint64* value) { fp_glUniformHandleui64vNV(location, count, value); } inline void glProgramUniformHandleui64NV(GLuint program, GLint location, GLuint64 value) { fp_glProgramUniformHandleui64NV(program, location, value); } inline void glProgramUniformHandleui64vNV(GLuint program, GLint location, GLsizei count, const GLuint64* values) { fp_glProgramUniformHandleui64vNV(program, location, count, values); } inline GLboolean glIsTextureHandleResidentNV(GLuint64 handle) { return fp_glIsTextureHandleResidentNV(handle); } inline GLboolean glIsImageHandleResidentNV(GLuint64 handle) { return fp_glIsImageHandleResidentNV(handle); } /* GL_NV_blend_equation_advanced */ inline void glBlendParameteriNV(GLenum pname, GLint value) { fp_glBlendParameteriNV(pname, value); } inline void glBlendBarrierNV() { fp_glBlendBarrierNV(); } /* GL_NV_command_list */ inline void glCreateStatesNV(GLsizei n, GLuint* states) { fp_glCreateStatesNV(n, states); } inline void glDeleteStatesNV(GLsizei n, const GLuint* states) { fp_glDeleteStatesNV(n, states); } inline GLboolean glIsStateNV(GLuint state) { return fp_glIsStateNV(state); } inline void glStateCaptureNV(GLuint state, GLenum mode) { fp_glStateCaptureNV(state, mode); } inline GLuint glGetCommandHeaderNV(GLenum tokenID, GLuint size) { return fp_glGetCommandHeaderNV(tokenID, size); } inline GLushort glGetStageIndexNV(GLenum shadertype) { return fp_glGetStageIndexNV(shadertype); } inline void glDrawCommandsNV(GLenum primitiveMode, GLuint buffer, const GLintptr* indirects, const GLsizei* sizes, GLuint count) { fp_glDrawCommandsNV(primitiveMode, buffer, indirects, sizes, count); } inline void glDrawCommandsAddressNV(GLenum primitiveMode, const GLuint64* indirects, const GLsizei* sizes, GLuint count) { fp_glDrawCommandsAddressNV(primitiveMode, indirects, sizes, count); } inline void glDrawCommandsStatesNV(GLuint buffer, const GLintptr* indirects, const GLsizei* sizes, const GLuint* states, const GLuint* fbos, GLuint count) { fp_glDrawCommandsStatesNV(buffer, indirects, sizes, states, fbos, count); } inline void glDrawCommandsStatesAddressNV(const GLuint64* indirects, const GLsizei* sizes, const GLuint* states, const GLuint* fbos, GLuint count) { fp_glDrawCommandsStatesAddressNV(indirects, sizes, states, fbos, count); } inline void glCreateCommandListsNV(GLsizei n, GLuint* lists) { fp_glCreateCommandListsNV(n, lists); } inline void glDeleteCommandListsNV(GLsizei n, const GLuint* lists) { fp_glDeleteCommandListsNV(n, lists); } inline GLboolean glIsCommandListNV(GLuint list) { return fp_glIsCommandListNV(list); } inline void glListDrawCommandsStatesClientNV(GLuint list, GLuint segment, const void** indirects, const GLsizei* sizes, const GLuint* states, const GLuint* fbos, GLuint count) { fp_glListDrawCommandsStatesClientNV(list, segment, indirects, sizes, states, fbos, count); } inline void glCommandListSegmentsNV(GLuint list, GLuint segments) { fp_glCommandListSegmentsNV(list, segments); } inline void glCompileCommandListNV(GLuint list) { fp_glCompileCommandListNV(list); } inline void glCallCommandListNV(GLuint list) { fp_glCallCommandListNV(list); } /* GL_NV_conditional_render */ inline void glBeginConditionalRenderNV(GLuint id, GLenum mode) { fp_glBeginConditionalRenderNV(id, mode); } inline void glEndConditionalRenderNV() { fp_glEndConditionalRenderNV(); } /* GL_NV_conservative_raster */ inline void glSubpixelPrecisionBiasNV(GLuint xbits, GLuint ybits) { fp_glSubpixelPrecisionBiasNV(xbits, ybits); } /* GL_NV_conservative_raster_dilate */ inline void glConservativeRasterParameterfNV(GLenum pname, GLfloat value) { fp_glConservativeRasterParameterfNV(pname, value); } /* GL_NV_copy_buffer */ inline void glCopyBufferSubDataNV(GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size) { fp_glCopyBufferSubDataNV(readTarget, writeTarget, readOffset, writeOffset, size); } /* GL_NV_copy_image */ inline void glCopyImageSubDataNV(GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth) { fp_glCopyImageSubDataNV(srcName, srcTarget, srcLevel, srcX, srcY, srcZ, dstName, dstTarget, dstLevel, dstX, dstY, dstZ, width, height, depth); } /* GL_NV_coverage_sample */ inline void glCoverageMaskNV(GLboolean mask) { fp_glCoverageMaskNV(mask); } inline void glCoverageOperationNV(GLenum operation) { fp_glCoverageOperationNV(operation); } /* GL_NV_depth_buffer_float */ inline void glDepthRangedNV(GLdouble zNear, GLdouble zFar) { fp_glDepthRangedNV(zNear, zFar); } inline void glClearDepthdNV(GLdouble depth) { fp_glClearDepthdNV(depth); } inline void glDepthBoundsdNV(GLdouble zmin, GLdouble zmax) { fp_glDepthBoundsdNV(zmin, zmax); } /* GL_NV_draw_buffers */ inline void glDrawBuffersNV(GLsizei n, const GLenum* bufs) { fp_glDrawBuffersNV(n, bufs); } /* GL_NV_draw_instanced */ inline void glDrawArraysInstancedNV(GLenum mode, GLint first, GLsizei count, GLsizei primcount) { fp_glDrawArraysInstancedNV(mode, first, count, primcount); } inline void glDrawElementsInstancedNV(GLenum mode, GLsizei count, GLenum type, const void* indices, GLsizei primcount) { fp_glDrawElementsInstancedNV(mode, count, type, indices, primcount); } /* GL_NV_draw_texture */ inline void glDrawTextureNV(GLuint texture, GLuint sampler, GLfloat x0, GLfloat y0, GLfloat x1, GLfloat y1, GLfloat z, GLfloat s0, GLfloat t0, GLfloat s1, GLfloat t1) { fp_glDrawTextureNV(texture, sampler, x0, y0, x1, y1, z, s0, t0, s1, t1); } /* GL_NV_explicit_multisample */ inline void glGetMultisamplefvNV(GLenum pname, GLuint index, GLfloat* val) { fp_glGetMultisamplefvNV(pname, index, val); } inline void glSampleMaskIndexedNV(GLuint index, GLbitfield mask) { fp_glSampleMaskIndexedNV(index, mask); } inline void glTexRenderbufferNV(GLenum target, GLuint renderbuffer) { fp_glTexRenderbufferNV(target, renderbuffer); } /* GL_NV_fence */ inline void glDeleteFencesNV(GLsizei n, const GLuint* fences) { fp_glDeleteFencesNV(n, fences); } inline void glGenFencesNV(GLsizei n, GLuint* fences) { fp_glGenFencesNV(n, fences); } inline GLboolean glIsFenceNV(GLuint fence) { return fp_glIsFenceNV(fence); } inline GLboolean glTestFenceNV(GLuint fence) { return fp_glTestFenceNV(fence); } inline void glGetFenceivNV(GLuint fence, GLenum pname, GLint* params) { fp_glGetFenceivNV(fence, pname, params); } inline void glFinishFenceNV(GLuint fence) { fp_glFinishFenceNV(fence); } inline void glSetFenceNV(GLuint fence, GLenum condition) { fp_glSetFenceNV(fence, condition); } /* GL_NV_fragment_coverage_to_color */ inline void glFragmentCoverageColorNV(GLuint color) { fp_glFragmentCoverageColorNV(color); } /* GL_NV_framebuffer_blit */ inline void glBlitFramebufferNV(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter) { fp_glBlitFramebufferNV(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter); } /* GL_NV_framebuffer_mixed_samples */ inline void glCoverageModulationTableNV(GLsizei n, const GLfloat* v) { fp_glCoverageModulationTableNV(n, v); } inline void glGetCoverageModulationTableNV(GLsizei bufsize, GLfloat* v) { fp_glGetCoverageModulationTableNV(bufsize, v); } inline void glCoverageModulationNV(GLenum components) { fp_glCoverageModulationNV(components); } /* GL_NV_framebuffer_multisample */ inline void glRenderbufferStorageMultisampleNV(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) { fp_glRenderbufferStorageMultisampleNV(target, samples, internalformat, width, height); } /* GL_NV_framebuffer_multisample_coverage */ inline void glRenderbufferStorageMultisampleCoverageNV(GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height) { fp_glRenderbufferStorageMultisampleCoverageNV(target, coverageSamples, colorSamples, internalformat, width, height); } /* GL_NV_geometry_program4 */ inline void glProgramVertexLimitNV(GLenum target, GLint limit) { fp_glProgramVertexLimitNV(target, limit); } inline void glFramebufferTextureFaceEXT(GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face) { fp_glFramebufferTextureFaceEXT(target, attachment, texture, level, face); } /* GL_NV_gpu_program4 */ inline void glProgramLocalParameterI4iNV(GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w) { fp_glProgramLocalParameterI4iNV(target, index, x, y, z, w); } inline void glProgramLocalParameterI4ivNV(GLenum target, GLuint index, const GLint* params) { fp_glProgramLocalParameterI4ivNV(target, index, params); } inline void glProgramLocalParametersI4ivNV(GLenum target, GLuint index, GLsizei count, const GLint* params) { fp_glProgramLocalParametersI4ivNV(target, index, count, params); } inline void glProgramLocalParameterI4uiNV(GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w) { fp_glProgramLocalParameterI4uiNV(target, index, x, y, z, w); } inline void glProgramLocalParameterI4uivNV(GLenum target, GLuint index, const GLuint* params) { fp_glProgramLocalParameterI4uivNV(target, index, params); } inline void glProgramLocalParametersI4uivNV(GLenum target, GLuint index, GLsizei count, const GLuint* params) { fp_glProgramLocalParametersI4uivNV(target, index, count, params); } inline void glProgramEnvParameterI4iNV(GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w) { fp_glProgramEnvParameterI4iNV(target, index, x, y, z, w); } inline void glProgramEnvParameterI4ivNV(GLenum target, GLuint index, const GLint* params) { fp_glProgramEnvParameterI4ivNV(target, index, params); } inline void glProgramEnvParametersI4ivNV(GLenum target, GLuint index, GLsizei count, const GLint* params) { fp_glProgramEnvParametersI4ivNV(target, index, count, params); } inline void glProgramEnvParameterI4uiNV(GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w) { fp_glProgramEnvParameterI4uiNV(target, index, x, y, z, w); } inline void glProgramEnvParameterI4uivNV(GLenum target, GLuint index, const GLuint* params) { fp_glProgramEnvParameterI4uivNV(target, index, params); } inline void glProgramEnvParametersI4uivNV(GLenum target, GLuint index, GLsizei count, const GLuint* params) { fp_glProgramEnvParametersI4uivNV(target, index, count, params); } inline void glGetProgramLocalParameterIivNV(GLenum target, GLuint index, GLint* params) { fp_glGetProgramLocalParameterIivNV(target, index, params); } inline void glGetProgramLocalParameterIuivNV(GLenum target, GLuint index, GLuint* params) { fp_glGetProgramLocalParameterIuivNV(target, index, params); } inline void glGetProgramEnvParameterIivNV(GLenum target, GLuint index, GLint* params) { fp_glGetProgramEnvParameterIivNV(target, index, params); } inline void glGetProgramEnvParameterIuivNV(GLenum target, GLuint index, GLuint* params) { fp_glGetProgramEnvParameterIuivNV(target, index, params); } /* GL_NV_gpu_program5 */ inline void glProgramSubroutineParametersuivNV(GLenum target, GLsizei count, const GLuint* params) { fp_glProgramSubroutineParametersuivNV(target, count, params); } inline void glGetProgramSubroutineParameteruivNV(GLenum target, GLuint index, GLuint* param) { fp_glGetProgramSubroutineParameteruivNV(target, index, param); } /* GL_NV_half_float */ inline void glVertex2hNV(GLhalfNV x, GLhalfNV y) { fp_glVertex2hNV(x, y); } inline void glVertex2hvNV(const GLhalfNV* v) { fp_glVertex2hvNV(v); } inline void glVertex3hNV(GLhalfNV x, GLhalfNV y, GLhalfNV z) { fp_glVertex3hNV(x, y, z); } inline void glVertex3hvNV(const GLhalfNV* v) { fp_glVertex3hvNV(v); } inline void glVertex4hNV(GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w) { fp_glVertex4hNV(x, y, z, w); } inline void glVertex4hvNV(const GLhalfNV* v) { fp_glVertex4hvNV(v); } inline void glNormal3hNV(GLhalfNV nx, GLhalfNV ny, GLhalfNV nz) { fp_glNormal3hNV(nx, ny, nz); } inline void glNormal3hvNV(const GLhalfNV* v) { fp_glNormal3hvNV(v); } inline void glColor3hNV(GLhalfNV red, GLhalfNV green, GLhalfNV blue) { fp_glColor3hNV(red, green, blue); } inline void glColor3hvNV(const GLhalfNV* v) { fp_glColor3hvNV(v); } inline void glColor4hNV(GLhalfNV red, GLhalfNV green, GLhalfNV blue, GLhalfNV alpha) { fp_glColor4hNV(red, green, blue, alpha); } inline void glColor4hvNV(const GLhalfNV* v) { fp_glColor4hvNV(v); } inline void glTexCoord1hNV(GLhalfNV s) { fp_glTexCoord1hNV(s); } inline void glTexCoord1hvNV(const GLhalfNV* v) { fp_glTexCoord1hvNV(v); } inline void glTexCoord2hNV(GLhalfNV s, GLhalfNV t) { fp_glTexCoord2hNV(s, t); } inline void glTexCoord2hvNV(const GLhalfNV* v) { fp_glTexCoord2hvNV(v); } inline void glTexCoord3hNV(GLhalfNV s, GLhalfNV t, GLhalfNV r) { fp_glTexCoord3hNV(s, t, r); } inline void glTexCoord3hvNV(const GLhalfNV* v) { fp_glTexCoord3hvNV(v); } inline void glTexCoord4hNV(GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q) { fp_glTexCoord4hNV(s, t, r, q); } inline void glTexCoord4hvNV(const GLhalfNV* v) { fp_glTexCoord4hvNV(v); } inline void glMultiTexCoord1hNV(GLenum target, GLhalfNV s) { fp_glMultiTexCoord1hNV(target, s); } inline void glMultiTexCoord1hvNV(GLenum target, const GLhalfNV* v) { fp_glMultiTexCoord1hvNV(target, v); } inline void glMultiTexCoord2hNV(GLenum target, GLhalfNV s, GLhalfNV t) { fp_glMultiTexCoord2hNV(target, s, t); } inline void glMultiTexCoord2hvNV(GLenum target, const GLhalfNV* v) { fp_glMultiTexCoord2hvNV(target, v); } inline void glMultiTexCoord3hNV(GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r) { fp_glMultiTexCoord3hNV(target, s, t, r); } inline void glMultiTexCoord3hvNV(GLenum target, const GLhalfNV* v) { fp_glMultiTexCoord3hvNV(target, v); } inline void glMultiTexCoord4hNV(GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q) { fp_glMultiTexCoord4hNV(target, s, t, r, q); } inline void glMultiTexCoord4hvNV(GLenum target, const GLhalfNV* v) { fp_glMultiTexCoord4hvNV(target, v); } inline void glFogCoordhNV(GLhalfNV fog) { fp_glFogCoordhNV(fog); } inline void glFogCoordhvNV(const GLhalfNV* fog) { fp_glFogCoordhvNV(fog); } inline void glSecondaryColor3hNV(GLhalfNV red, GLhalfNV green, GLhalfNV blue) { fp_glSecondaryColor3hNV(red, green, blue); } inline void glSecondaryColor3hvNV(const GLhalfNV* v) { fp_glSecondaryColor3hvNV(v); } inline void glVertexWeighthNV(GLhalfNV weight) { fp_glVertexWeighthNV(weight); } inline void glVertexWeighthvNV(const GLhalfNV* weight) { fp_glVertexWeighthvNV(weight); } inline void glVertexAttrib1hNV(GLuint index, GLhalfNV x) { fp_glVertexAttrib1hNV(index, x); } inline void glVertexAttrib1hvNV(GLuint index, const GLhalfNV* v) { fp_glVertexAttrib1hvNV(index, v); } inline void glVertexAttrib2hNV(GLuint index, GLhalfNV x, GLhalfNV y) { fp_glVertexAttrib2hNV(index, x, y); } inline void glVertexAttrib2hvNV(GLuint index, const GLhalfNV* v) { fp_glVertexAttrib2hvNV(index, v); } inline void glVertexAttrib3hNV(GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z) { fp_glVertexAttrib3hNV(index, x, y, z); } inline void glVertexAttrib3hvNV(GLuint index, const GLhalfNV* v) { fp_glVertexAttrib3hvNV(index, v); } inline void glVertexAttrib4hNV(GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w) { fp_glVertexAttrib4hNV(index, x, y, z, w); } inline void glVertexAttrib4hvNV(GLuint index, const GLhalfNV* v) { fp_glVertexAttrib4hvNV(index, v); } inline void glVertexAttribs1hvNV(GLuint index, GLsizei n, const GLhalfNV* v) { fp_glVertexAttribs1hvNV(index, n, v); } inline void glVertexAttribs2hvNV(GLuint index, GLsizei n, const GLhalfNV* v) { fp_glVertexAttribs2hvNV(index, n, v); } inline void glVertexAttribs3hvNV(GLuint index, GLsizei n, const GLhalfNV* v) { fp_glVertexAttribs3hvNV(index, n, v); } inline void glVertexAttribs4hvNV(GLuint index, GLsizei n, const GLhalfNV* v) { fp_glVertexAttribs4hvNV(index, n, v); } /* GL_NV_instanced_arrays */ inline void glVertexAttribDivisorNV(GLuint index, GLuint divisor) { fp_glVertexAttribDivisorNV(index, divisor); } /* GL_NV_internalformat_sample_query */ inline void glGetInternalformatSampleivNV(GLenum target, GLenum internalformat, GLsizei samples, GLenum pname, GLsizei bufSize, GLint* params) { fp_glGetInternalformatSampleivNV(target, internalformat, samples, pname, bufSize, params); } /* GL_NV_non_square_matrices */ inline void glUniformMatrix2x3fvNV(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { fp_glUniformMatrix2x3fvNV(location, count, transpose, value); } inline void glUniformMatrix3x2fvNV(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { fp_glUniformMatrix3x2fvNV(location, count, transpose, value); } inline void glUniformMatrix2x4fvNV(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { fp_glUniformMatrix2x4fvNV(location, count, transpose, value); } inline void glUniformMatrix4x2fvNV(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { fp_glUniformMatrix4x2fvNV(location, count, transpose, value); } inline void glUniformMatrix3x4fvNV(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { fp_glUniformMatrix3x4fvNV(location, count, transpose, value); } inline void glUniformMatrix4x3fvNV(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { fp_glUniformMatrix4x3fvNV(location, count, transpose, value); } /* GL_NV_occlusion_query */ inline void glGenOcclusionQueriesNV(GLsizei n, GLuint* ids) { fp_glGenOcclusionQueriesNV(n, ids); } inline void glDeleteOcclusionQueriesNV(GLsizei n, const GLuint* ids) { fp_glDeleteOcclusionQueriesNV(n, ids); } inline GLboolean glIsOcclusionQueryNV(GLuint id) { return fp_glIsOcclusionQueryNV(id); } inline void glBeginOcclusionQueryNV(GLuint id) { fp_glBeginOcclusionQueryNV(id); } inline void glEndOcclusionQueryNV() { fp_glEndOcclusionQueryNV(); } inline void glGetOcclusionQueryivNV(GLuint id, GLenum pname, GLint* params) { fp_glGetOcclusionQueryivNV(id, pname, params); } inline void glGetOcclusionQueryuivNV(GLuint id, GLenum pname, GLuint* params) { fp_glGetOcclusionQueryuivNV(id, pname, params); } /* GL_NV_parameter_buffer_object */ inline void glProgramBufferParametersfvNV(GLenum target, GLuint bindingIndex, GLuint wordIndex, GLsizei count, const GLfloat* params) { fp_glProgramBufferParametersfvNV(target, bindingIndex, wordIndex, count, params); } inline void glProgramBufferParametersIivNV(GLenum target, GLuint bindingIndex, GLuint wordIndex, GLsizei count, const GLint* params) { fp_glProgramBufferParametersIivNV(target, bindingIndex, wordIndex, count, params); } inline void glProgramBufferParametersIuivNV(GLenum target, GLuint bindingIndex, GLuint wordIndex, GLsizei count, const GLuint* params) { fp_glProgramBufferParametersIuivNV(target, bindingIndex, wordIndex, count, params); } /* GL_NV_path_rendering */ inline GLuint glGenPathsNV(GLsizei range) { return fp_glGenPathsNV(range); } inline void glDeletePathsNV(GLuint path, GLsizei range) { fp_glDeletePathsNV(path, range); } inline GLboolean glIsPathNV(GLuint path) { return fp_glIsPathNV(path); } inline void glPathCommandsNV(GLuint path, GLsizei numCommands, const GLubyte* commands, GLsizei numCoords, GLenum coordType, const void* coords) { fp_glPathCommandsNV(path, numCommands, commands, numCoords, coordType, coords); } inline void glPathCoordsNV(GLuint path, GLsizei numCoords, GLenum coordType, const void* coords) { fp_glPathCoordsNV(path, numCoords, coordType, coords); } inline void glPathSubCommandsNV(GLuint path, GLsizei commandStart, GLsizei commandsToDelete, GLsizei numCommands, const GLubyte* commands, GLsizei numCoords, GLenum coordType, const void* coords) { fp_glPathSubCommandsNV(path, commandStart, commandsToDelete, numCommands, commands, numCoords, coordType, coords); } inline void glPathSubCoordsNV(GLuint path, GLsizei coordStart, GLsizei numCoords, GLenum coordType, const void* coords) { fp_glPathSubCoordsNV(path, coordStart, numCoords, coordType, coords); } inline void glPathStringNV(GLuint path, GLenum format, GLsizei length, const void* pathString) { fp_glPathStringNV(path, format, length, pathString); } inline void glPathGlyphsNV(GLuint firstPathName, GLenum fontTarget, const void* fontName, GLbitfield fontStyle, GLsizei numGlyphs, GLenum type, const void* charcodes, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale) { fp_glPathGlyphsNV(firstPathName, fontTarget, fontName, fontStyle, numGlyphs, type, charcodes, handleMissingGlyphs, pathParameterTemplate, emScale); } inline void glPathGlyphRangeNV(GLuint firstPathName, GLenum fontTarget, const void* fontName, GLbitfield fontStyle, GLuint firstGlyph, GLsizei numGlyphs, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale) { fp_glPathGlyphRangeNV(firstPathName, fontTarget, fontName, fontStyle, firstGlyph, numGlyphs, handleMissingGlyphs, pathParameterTemplate, emScale); } inline void glWeightPathsNV(GLuint resultPath, GLsizei numPaths, const GLuint* paths, const GLfloat* weights) { fp_glWeightPathsNV(resultPath, numPaths, paths, weights); } inline void glCopyPathNV(GLuint resultPath, GLuint srcPath) { fp_glCopyPathNV(resultPath, srcPath); } inline void glInterpolatePathsNV(GLuint resultPath, GLuint pathA, GLuint pathB, GLfloat weight) { fp_glInterpolatePathsNV(resultPath, pathA, pathB, weight); } inline void glTransformPathNV(GLuint resultPath, GLuint srcPath, GLenum transformType, const GLfloat* transformValues) { fp_glTransformPathNV(resultPath, srcPath, transformType, transformValues); } inline void glPathParameterivNV(GLuint path, GLenum pname, const GLint* value) { fp_glPathParameterivNV(path, pname, value); } inline void glPathParameteriNV(GLuint path, GLenum pname, GLint value) { fp_glPathParameteriNV(path, pname, value); } inline void glPathParameterfvNV(GLuint path, GLenum pname, const GLfloat* value) { fp_glPathParameterfvNV(path, pname, value); } inline void glPathParameterfNV(GLuint path, GLenum pname, GLfloat value) { fp_glPathParameterfNV(path, pname, value); } inline void glPathDashArrayNV(GLuint path, GLsizei dashCount, const GLfloat* dashArray) { fp_glPathDashArrayNV(path, dashCount, dashArray); } inline void glPathStencilFuncNV(GLenum func, GLint ref, GLuint mask) { fp_glPathStencilFuncNV(func, ref, mask); } inline void glPathStencilDepthOffsetNV(GLfloat factor, GLfloat units) { fp_glPathStencilDepthOffsetNV(factor, units); } inline void glStencilFillPathNV(GLuint path, GLenum fillMode, GLuint mask) { fp_glStencilFillPathNV(path, fillMode, mask); } inline void glStencilStrokePathNV(GLuint path, GLint reference, GLuint mask) { fp_glStencilStrokePathNV(path, reference, mask); } inline void glStencilFillPathInstancedNV(GLsizei numPaths, GLenum pathNameType, const void* paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum transformType, const GLfloat* transformValues) { fp_glStencilFillPathInstancedNV(numPaths, pathNameType, paths, pathBase, fillMode, mask, transformType, transformValues); } inline void glStencilStrokePathInstancedNV(GLsizei numPaths, GLenum pathNameType, const void* paths, GLuint pathBase, GLint reference, GLuint mask, GLenum transformType, const GLfloat* transformValues) { fp_glStencilStrokePathInstancedNV(numPaths, pathNameType, paths, pathBase, reference, mask, transformType, transformValues); } inline void glPathCoverDepthFuncNV(GLenum func) { fp_glPathCoverDepthFuncNV(func); } inline void glCoverFillPathNV(GLuint path, GLenum coverMode) { fp_glCoverFillPathNV(path, coverMode); } inline void glCoverStrokePathNV(GLuint path, GLenum coverMode) { fp_glCoverStrokePathNV(path, coverMode); } inline void glCoverFillPathInstancedNV(GLsizei numPaths, GLenum pathNameType, const void* paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat* transformValues) { fp_glCoverFillPathInstancedNV(numPaths, pathNameType, paths, pathBase, coverMode, transformType, transformValues); } inline void glCoverStrokePathInstancedNV(GLsizei numPaths, GLenum pathNameType, const void* paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat* transformValues) { fp_glCoverStrokePathInstancedNV(numPaths, pathNameType, paths, pathBase, coverMode, transformType, transformValues); } inline void glGetPathParameterivNV(GLuint path, GLenum pname, GLint* value) { fp_glGetPathParameterivNV(path, pname, value); } inline void glGetPathParameterfvNV(GLuint path, GLenum pname, GLfloat* value) { fp_glGetPathParameterfvNV(path, pname, value); } inline void glGetPathCommandsNV(GLuint path, GLubyte* commands) { fp_glGetPathCommandsNV(path, commands); } inline void glGetPathCoordsNV(GLuint path, GLfloat* coords) { fp_glGetPathCoordsNV(path, coords); } inline void glGetPathDashArrayNV(GLuint path, GLfloat* dashArray) { fp_glGetPathDashArrayNV(path, dashArray); } inline void glGetPathMetricsNV(GLbitfield metricQueryMask, GLsizei numPaths, GLenum pathNameType, const void* paths, GLuint pathBase, GLsizei stride, GLfloat* metrics) { fp_glGetPathMetricsNV(metricQueryMask, numPaths, pathNameType, paths, pathBase, stride, metrics); } inline void glGetPathMetricRangeNV(GLbitfield metricQueryMask, GLuint firstPathName, GLsizei numPaths, GLsizei stride, GLfloat* metrics) { fp_glGetPathMetricRangeNV(metricQueryMask, firstPathName, numPaths, stride, metrics); } inline void glGetPathSpacingNV(GLenum pathListMode, GLsizei numPaths, GLenum pathNameType, const void* paths, GLuint pathBase, GLfloat advanceScale, GLfloat kerningScale, GLenum transformType, GLfloat* returnedSpacing) { fp_glGetPathSpacingNV(pathListMode, numPaths, pathNameType, paths, pathBase, advanceScale, kerningScale, transformType, returnedSpacing); } inline GLboolean glIsPointInFillPathNV(GLuint path, GLuint mask, GLfloat x, GLfloat y) { return fp_glIsPointInFillPathNV(path, mask, x, y); } inline GLboolean glIsPointInStrokePathNV(GLuint path, GLfloat x, GLfloat y) { return fp_glIsPointInStrokePathNV(path, x, y); } inline GLfloat glGetPathLengthNV(GLuint path, GLsizei startSegment, GLsizei numSegments) { return fp_glGetPathLengthNV(path, startSegment, numSegments); } inline GLboolean glPointAlongPathNV(GLuint path, GLsizei startSegment, GLsizei numSegments, GLfloat distance, GLfloat* x, GLfloat* y, GLfloat* tangentX, GLfloat* tangentY) { return fp_glPointAlongPathNV(path, startSegment, numSegments, distance, x, y, tangentX, tangentY); } inline void glMatrixLoad3x2fNV(GLenum matrixMode, const GLfloat* m) { fp_glMatrixLoad3x2fNV(matrixMode, m); } inline void glMatrixLoad3x3fNV(GLenum matrixMode, const GLfloat* m) { fp_glMatrixLoad3x3fNV(matrixMode, m); } inline void glMatrixLoadTranspose3x3fNV(GLenum matrixMode, const GLfloat* m) { fp_glMatrixLoadTranspose3x3fNV(matrixMode, m); } inline void glMatrixMult3x2fNV(GLenum matrixMode, const GLfloat* m) { fp_glMatrixMult3x2fNV(matrixMode, m); } inline void glMatrixMult3x3fNV(GLenum matrixMode, const GLfloat* m) { fp_glMatrixMult3x3fNV(matrixMode, m); } inline void glMatrixMultTranspose3x3fNV(GLenum matrixMode, const GLfloat* m) { fp_glMatrixMultTranspose3x3fNV(matrixMode, m); } inline void glStencilThenCoverFillPathNV(GLuint path, GLenum fillMode, GLuint mask, GLenum coverMode) { fp_glStencilThenCoverFillPathNV(path, fillMode, mask, coverMode); } inline void glStencilThenCoverStrokePathNV(GLuint path, GLint reference, GLuint mask, GLenum coverMode) { fp_glStencilThenCoverStrokePathNV(path, reference, mask, coverMode); } inline void glStencilThenCoverFillPathInstancedNV(GLsizei numPaths, GLenum pathNameType, const void* paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum coverMode, GLenum transformType, const GLfloat* transformValues) { fp_glStencilThenCoverFillPathInstancedNV(numPaths, pathNameType, paths, pathBase, fillMode, mask, coverMode, transformType, transformValues); } inline void glStencilThenCoverStrokePathInstancedNV(GLsizei numPaths, GLenum pathNameType, const void* paths, GLuint pathBase, GLint reference, GLuint mask, GLenum coverMode, GLenum transformType, const GLfloat* transformValues) { fp_glStencilThenCoverStrokePathInstancedNV(numPaths, pathNameType, paths, pathBase, reference, mask, coverMode, transformType, transformValues); } inline GLenum glPathGlyphIndexRangeNV(GLenum fontTarget, const void* fontName, GLbitfield fontStyle, GLuint pathParameterTemplate, GLfloat emScale, GLuint baseAndCount) { return fp_glPathGlyphIndexRangeNV(fontTarget, fontName, fontStyle, pathParameterTemplate, emScale, baseAndCount); } inline GLenum glPathGlyphIndexArrayNV(GLuint firstPathName, GLenum fontTarget, const void* fontName, GLbitfield fontStyle, GLuint firstGlyphIndex, GLsizei numGlyphs, GLuint pathParameterTemplate, GLfloat emScale) { return fp_glPathGlyphIndexArrayNV(firstPathName, fontTarget, fontName, fontStyle, firstGlyphIndex, numGlyphs, pathParameterTemplate, emScale); } inline GLenum glPathMemoryGlyphIndexArrayNV(GLuint firstPathName, GLenum fontTarget, GLsizeiptr fontSize, const void* fontData, GLsizei faceIndex, GLuint firstGlyphIndex, GLsizei numGlyphs, GLuint pathParameterTemplate, GLfloat emScale) { return fp_glPathMemoryGlyphIndexArrayNV(firstPathName, fontTarget, fontSize, fontData, faceIndex, firstGlyphIndex, numGlyphs, pathParameterTemplate, emScale); } inline void glProgramPathFragmentInputGenNV(GLuint program, GLint location, GLenum genMode, GLint components, const GLfloat* coeffs) { fp_glProgramPathFragmentInputGenNV(program, location, genMode, components, coeffs); } inline void glGetProgramResourcefvNV(GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum* props, GLsizei bufSize, GLsizei* length, GLfloat* params) { fp_glGetProgramResourcefvNV(program, programInterface, index, propCount, props, bufSize, length, params); } inline void glPathColorGenNV(GLenum color, GLenum genMode, GLenum colorFormat, const GLfloat* coeffs) { fp_glPathColorGenNV(color, genMode, colorFormat, coeffs); } inline void glPathTexGenNV(GLenum texCoordSet, GLenum genMode, GLint components, const GLfloat* coeffs) { fp_glPathTexGenNV(texCoordSet, genMode, components, coeffs); } inline void glPathFogGenNV(GLenum genMode) { fp_glPathFogGenNV(genMode); } inline void glGetPathColorGenivNV(GLenum color, GLenum pname, GLint* value) { fp_glGetPathColorGenivNV(color, pname, value); } inline void glGetPathColorGenfvNV(GLenum color, GLenum pname, GLfloat* value) { fp_glGetPathColorGenfvNV(color, pname, value); } inline void glGetPathTexGenivNV(GLenum texCoordSet, GLenum pname, GLint* value) { fp_glGetPathTexGenivNV(texCoordSet, pname, value); } inline void glGetPathTexGenfvNV(GLenum texCoordSet, GLenum pname, GLfloat* value) { fp_glGetPathTexGenfvNV(texCoordSet, pname, value); } /* GL_NV_polygon_mode */ inline void glPolygonModeNV(GLenum face, GLenum mode) { fp_glPolygonModeNV(face, mode); } /* GL_NV_present_video */ inline void glPresentFrameKeyedNV(GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLuint key0, GLenum target1, GLuint fill1, GLuint key1) { fp_glPresentFrameKeyedNV(video_slot, minPresentTime, beginPresentTimeId, presentDurationId, type, target0, fill0, key0, target1, fill1, key1); } inline void glPresentFrameDualFillNV(GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLenum target1, GLuint fill1, GLenum target2, GLuint fill2, GLenum target3, GLuint fill3) { fp_glPresentFrameDualFillNV(video_slot, minPresentTime, beginPresentTimeId, presentDurationId, type, target0, fill0, target1, fill1, target2, fill2, target3, fill3); } inline void glGetVideoivNV(GLuint video_slot, GLenum pname, GLint* params) { fp_glGetVideoivNV(video_slot, pname, params); } inline void glGetVideouivNV(GLuint video_slot, GLenum pname, GLuint* params) { fp_glGetVideouivNV(video_slot, pname, params); } inline void glGetVideoi64vNV(GLuint video_slot, GLenum pname, GLint64EXT* params) { fp_glGetVideoi64vNV(video_slot, pname, params); } inline void glGetVideoui64vNV(GLuint video_slot, GLenum pname, GLuint64EXT* params) { fp_glGetVideoui64vNV(video_slot, pname, params); } /* GL_NV_primitive_restart */ inline void glPrimitiveRestartNV() { fp_glPrimitiveRestartNV(); } inline void glPrimitiveRestartIndexNV(GLuint index) { fp_glPrimitiveRestartIndexNV(index); } /* GL_NV_read_buffer */ inline void glReadBufferNV(GLenum mode) { fp_glReadBufferNV(mode); } /* GL_NV_sample_locations */ inline void glFramebufferSampleLocationsfvNV(GLenum target, GLuint start, GLsizei count, const GLfloat* v) { fp_glFramebufferSampleLocationsfvNV(target, start, count, v); } inline void glNamedFramebufferSampleLocationsfvNV(GLuint framebuffer, GLuint start, GLsizei count, const GLfloat* v) { fp_glNamedFramebufferSampleLocationsfvNV(framebuffer, start, count, v); } inline void glResolveDepthValuesNV() { fp_glResolveDepthValuesNV(); } /* GL_NV_shader_buffer_load */ inline void glMakeBufferResidentNV(GLenum target, GLenum access) { fp_glMakeBufferResidentNV(target, access); } inline void glMakeBufferNonResidentNV(GLenum target) { fp_glMakeBufferNonResidentNV(target); } inline GLboolean glIsBufferResidentNV(GLenum target) { return fp_glIsBufferResidentNV(target); } inline void glMakeNamedBufferResidentNV(GLuint buffer, GLenum access) { fp_glMakeNamedBufferResidentNV(buffer, access); } inline void glMakeNamedBufferNonResidentNV(GLuint buffer) { fp_glMakeNamedBufferNonResidentNV(buffer); } inline GLboolean glIsNamedBufferResidentNV(GLuint buffer) { return fp_glIsNamedBufferResidentNV(buffer); } inline void glGetBufferParameterui64vNV(GLenum target, GLenum pname, GLuint64EXT* params) { fp_glGetBufferParameterui64vNV(target, pname, params); } inline void glGetNamedBufferParameterui64vNV(GLuint buffer, GLenum pname, GLuint64EXT* params) { fp_glGetNamedBufferParameterui64vNV(buffer, pname, params); } inline void glGetIntegerui64vNV(GLenum value, GLuint64EXT* result) { fp_glGetIntegerui64vNV(value, result); } inline void glUniformui64NV(GLint location, GLuint64EXT value) { fp_glUniformui64NV(location, value); } inline void glUniformui64vNV(GLint location, GLsizei count, const GLuint64EXT* value) { fp_glUniformui64vNV(location, count, value); } inline void glProgramUniformui64NV(GLuint program, GLint location, GLuint64EXT value) { fp_glProgramUniformui64NV(program, location, value); } inline void glProgramUniformui64vNV(GLuint program, GLint location, GLsizei count, const GLuint64EXT* value) { fp_glProgramUniformui64vNV(program, location, count, value); } /* GL_NV_texture_barrier */ inline void glTextureBarrierNV() { fp_glTextureBarrierNV(); } /* GL_NV_texture_multisample */ inline void glTexImage2DMultisampleCoverageNV(GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations) { fp_glTexImage2DMultisampleCoverageNV(target, coverageSamples, colorSamples, internalFormat, width, height, fixedSampleLocations); } inline void glTexImage3DMultisampleCoverageNV(GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations) { fp_glTexImage3DMultisampleCoverageNV(target, coverageSamples, colorSamples, internalFormat, width, height, depth, fixedSampleLocations); } inline void glTextureImage2DMultisampleNV(GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations) { fp_glTextureImage2DMultisampleNV(texture, target, samples, internalFormat, width, height, fixedSampleLocations); } inline void glTextureImage3DMultisampleNV(GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations) { fp_glTextureImage3DMultisampleNV(texture, target, samples, internalFormat, width, height, depth, fixedSampleLocations); } inline void glTextureImage2DMultisampleCoverageNV(GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations) { fp_glTextureImage2DMultisampleCoverageNV(texture, target, coverageSamples, colorSamples, internalFormat, width, height, fixedSampleLocations); } inline void glTextureImage3DMultisampleCoverageNV(GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations) { fp_glTextureImage3DMultisampleCoverageNV(texture, target, coverageSamples, colorSamples, internalFormat, width, height, depth, fixedSampleLocations); } /* GL_NV_transform_feedback */ inline void glBeginTransformFeedbackNV(GLenum primitiveMode) { fp_glBeginTransformFeedbackNV(primitiveMode); } inline void glEndTransformFeedbackNV() { fp_glEndTransformFeedbackNV(); } inline void glTransformFeedbackAttribsNV(GLsizei count, const GLint* attribs, GLenum bufferMode) { fp_glTransformFeedbackAttribsNV(count, attribs, bufferMode); } inline void glBindBufferRangeNV(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size) { fp_glBindBufferRangeNV(target, index, buffer, offset, size); } inline void glBindBufferOffsetNV(GLenum target, GLuint index, GLuint buffer, GLintptr offset) { fp_glBindBufferOffsetNV(target, index, buffer, offset); } inline void glBindBufferBaseNV(GLenum target, GLuint index, GLuint buffer) { fp_glBindBufferBaseNV(target, index, buffer); } inline void glTransformFeedbackVaryingsNV(GLuint program, GLsizei count, const GLint* locations, GLenum bufferMode) { fp_glTransformFeedbackVaryingsNV(program, count, locations, bufferMode); } inline void glActiveVaryingNV(GLuint program, const GLchar* name) { fp_glActiveVaryingNV(program, name); } inline GLint glGetVaryingLocationNV(GLuint program, const GLchar* name) { return fp_glGetVaryingLocationNV(program, name); } inline void glGetActiveVaryingNV(GLuint program, GLuint index, GLsizei bufSize, GLsizei* length, GLsizei* size, GLenum* type, GLchar* name) { fp_glGetActiveVaryingNV(program, index, bufSize, length, size, type, name); } inline void glGetTransformFeedbackVaryingNV(GLuint program, GLuint index, GLint* location) { fp_glGetTransformFeedbackVaryingNV(program, index, location); } inline void glTransformFeedbackStreamAttribsNV(GLsizei count, const GLint* attribs, GLsizei nbuffers, const GLint* bufstreams, GLenum bufferMode) { fp_glTransformFeedbackStreamAttribsNV(count, attribs, nbuffers, bufstreams, bufferMode); } /* GL_NV_transform_feedback2 */ inline void glBindTransformFeedbackNV(GLenum target, GLuint id) { fp_glBindTransformFeedbackNV(target, id); } inline void glDeleteTransformFeedbacksNV(GLsizei n, const GLuint* ids) { fp_glDeleteTransformFeedbacksNV(n, ids); } inline void glGenTransformFeedbacksNV(GLsizei n, GLuint* ids) { fp_glGenTransformFeedbacksNV(n, ids); } inline GLboolean glIsTransformFeedbackNV(GLuint id) { return fp_glIsTransformFeedbackNV(id); } inline void glPauseTransformFeedbackNV() { fp_glPauseTransformFeedbackNV(); } inline void glResumeTransformFeedbackNV() { fp_glResumeTransformFeedbackNV(); } inline void glDrawTransformFeedbackNV(GLenum mode, GLuint id) { fp_glDrawTransformFeedbackNV(mode, id); } /* GL_NV_vdpau_interop */ inline void glVDPAUInitNV(const void* vdpDevice, const void* getProcAddress) { fp_glVDPAUInitNV(vdpDevice, getProcAddress); } inline void glVDPAUFiniNV() { fp_glVDPAUFiniNV(); } inline GLvdpauSurfaceNV glVDPAURegisterVideoSurfaceNV(const void* vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint* textureNames) { return fp_glVDPAURegisterVideoSurfaceNV(vdpSurface, target, numTextureNames, textureNames); } inline GLvdpauSurfaceNV glVDPAURegisterOutputSurfaceNV(const void* vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint* textureNames) { return fp_glVDPAURegisterOutputSurfaceNV(vdpSurface, target, numTextureNames, textureNames); } inline GLboolean glVDPAUIsSurfaceNV(GLvdpauSurfaceNV surface) { return fp_glVDPAUIsSurfaceNV(surface); } inline void glVDPAUUnregisterSurfaceNV(GLvdpauSurfaceNV surface) { fp_glVDPAUUnregisterSurfaceNV(surface); } inline void glVDPAUGetSurfaceivNV(GLvdpauSurfaceNV surface, GLenum pname, GLsizei bufSize, GLsizei* length, GLint* values) { fp_glVDPAUGetSurfaceivNV(surface, pname, bufSize, length, values); } inline void glVDPAUSurfaceAccessNV(GLvdpauSurfaceNV surface, GLenum access) { fp_glVDPAUSurfaceAccessNV(surface, access); } inline void glVDPAUMapSurfacesNV(GLsizei numSurfaces, const GLvdpauSurfaceNV* surfaces) { fp_glVDPAUMapSurfacesNV(numSurfaces, surfaces); } inline void glVDPAUUnmapSurfacesNV(GLsizei numSurface, const GLvdpauSurfaceNV* surfaces) { fp_glVDPAUUnmapSurfacesNV(numSurface, surfaces); } /* GL_NV_vertex_attrib_integer_64bit */ inline void glVertexAttribL1i64NV(GLuint index, GLint64EXT x) { fp_glVertexAttribL1i64NV(index, x); } inline void glVertexAttribL2i64NV(GLuint index, GLint64EXT x, GLint64EXT y) { fp_glVertexAttribL2i64NV(index, x, y); } inline void glVertexAttribL3i64NV(GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z) { fp_glVertexAttribL3i64NV(index, x, y, z); } inline void glVertexAttribL4i64NV(GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w) { fp_glVertexAttribL4i64NV(index, x, y, z, w); } inline void glVertexAttribL1i64vNV(GLuint index, const GLint64EXT* v) { fp_glVertexAttribL1i64vNV(index, v); } inline void glVertexAttribL2i64vNV(GLuint index, const GLint64EXT* v) { fp_glVertexAttribL2i64vNV(index, v); } inline void glVertexAttribL3i64vNV(GLuint index, const GLint64EXT* v) { fp_glVertexAttribL3i64vNV(index, v); } inline void glVertexAttribL4i64vNV(GLuint index, const GLint64EXT* v) { fp_glVertexAttribL4i64vNV(index, v); } inline void glVertexAttribL1ui64NV(GLuint index, GLuint64EXT x) { fp_glVertexAttribL1ui64NV(index, x); } inline void glVertexAttribL2ui64NV(GLuint index, GLuint64EXT x, GLuint64EXT y) { fp_glVertexAttribL2ui64NV(index, x, y); } inline void glVertexAttribL3ui64NV(GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z) { fp_glVertexAttribL3ui64NV(index, x, y, z); } inline void glVertexAttribL4ui64NV(GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w) { fp_glVertexAttribL4ui64NV(index, x, y, z, w); } inline void glVertexAttribL1ui64vNV(GLuint index, const GLuint64EXT* v) { fp_glVertexAttribL1ui64vNV(index, v); } inline void glVertexAttribL2ui64vNV(GLuint index, const GLuint64EXT* v) { fp_glVertexAttribL2ui64vNV(index, v); } inline void glVertexAttribL3ui64vNV(GLuint index, const GLuint64EXT* v) { fp_glVertexAttribL3ui64vNV(index, v); } inline void glVertexAttribL4ui64vNV(GLuint index, const GLuint64EXT* v) { fp_glVertexAttribL4ui64vNV(index, v); } inline void glGetVertexAttribLi64vNV(GLuint index, GLenum pname, GLint64EXT* params) { fp_glGetVertexAttribLi64vNV(index, pname, params); } inline void glGetVertexAttribLui64vNV(GLuint index, GLenum pname, GLuint64EXT* params) { fp_glGetVertexAttribLui64vNV(index, pname, params); } inline void glVertexAttribLFormatNV(GLuint index, GLint size, GLenum type, GLsizei stride) { fp_glVertexAttribLFormatNV(index, size, type, stride); } /* GL_NV_vertex_buffer_unified_memory */ inline void glBufferAddressRangeNV(GLenum pname, GLuint index, GLuint64EXT address, GLsizeiptr length) { fp_glBufferAddressRangeNV(pname, index, address, length); } inline void glVertexFormatNV(GLint size, GLenum type, GLsizei stride) { fp_glVertexFormatNV(size, type, stride); } inline void glNormalFormatNV(GLenum type, GLsizei stride) { fp_glNormalFormatNV(type, stride); } inline void glColorFormatNV(GLint size, GLenum type, GLsizei stride) { fp_glColorFormatNV(size, type, stride); } inline void glIndexFormatNV(GLenum type, GLsizei stride) { fp_glIndexFormatNV(type, stride); } inline void glTexCoordFormatNV(GLint size, GLenum type, GLsizei stride) { fp_glTexCoordFormatNV(size, type, stride); } inline void glEdgeFlagFormatNV(GLsizei stride) { fp_glEdgeFlagFormatNV(stride); } inline void glSecondaryColorFormatNV(GLint size, GLenum type, GLsizei stride) { fp_glSecondaryColorFormatNV(size, type, stride); } inline void glFogCoordFormatNV(GLenum type, GLsizei stride) { fp_glFogCoordFormatNV(type, stride); } inline void glVertexAttribFormatNV(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride) { fp_glVertexAttribFormatNV(index, size, type, normalized, stride); } inline void glVertexAttribIFormatNV(GLuint index, GLint size, GLenum type, GLsizei stride) { fp_glVertexAttribIFormatNV(index, size, type, stride); } inline void glGetIntegerui64i_vNV(GLenum value, GLuint index, GLuint64EXT* result) { fp_glGetIntegerui64i_vNV(value, index, result); } /* GL_NV_vertex_program4 */ inline void glVertexAttribI1iEXT(GLuint index, GLint x) { fp_glVertexAttribI1iEXT(index, x); } inline void glVertexAttribI2iEXT(GLuint index, GLint x, GLint y) { fp_glVertexAttribI2iEXT(index, x, y); } inline void glVertexAttribI3iEXT(GLuint index, GLint x, GLint y, GLint z) { fp_glVertexAttribI3iEXT(index, x, y, z); } inline void glVertexAttribI4iEXT(GLuint index, GLint x, GLint y, GLint z, GLint w) { fp_glVertexAttribI4iEXT(index, x, y, z, w); } inline void glVertexAttribI1uiEXT(GLuint index, GLuint x) { fp_glVertexAttribI1uiEXT(index, x); } inline void glVertexAttribI2uiEXT(GLuint index, GLuint x, GLuint y) { fp_glVertexAttribI2uiEXT(index, x, y); } inline void glVertexAttribI3uiEXT(GLuint index, GLuint x, GLuint y, GLuint z) { fp_glVertexAttribI3uiEXT(index, x, y, z); } inline void glVertexAttribI4uiEXT(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w) { fp_glVertexAttribI4uiEXT(index, x, y, z, w); } inline void glVertexAttribI1ivEXT(GLuint index, const GLint* v) { fp_glVertexAttribI1ivEXT(index, v); } inline void glVertexAttribI2ivEXT(GLuint index, const GLint* v) { fp_glVertexAttribI2ivEXT(index, v); } inline void glVertexAttribI3ivEXT(GLuint index, const GLint* v) { fp_glVertexAttribI3ivEXT(index, v); } inline void glVertexAttribI4ivEXT(GLuint index, const GLint* v) { fp_glVertexAttribI4ivEXT(index, v); } inline void glVertexAttribI1uivEXT(GLuint index, const GLuint* v) { fp_glVertexAttribI1uivEXT(index, v); } inline void glVertexAttribI2uivEXT(GLuint index, const GLuint* v) { fp_glVertexAttribI2uivEXT(index, v); } inline void glVertexAttribI3uivEXT(GLuint index, const GLuint* v) { fp_glVertexAttribI3uivEXT(index, v); } inline void glVertexAttribI4uivEXT(GLuint index, const GLuint* v) { fp_glVertexAttribI4uivEXT(index, v); } inline void glVertexAttribI4bvEXT(GLuint index, const GLbyte* v) { fp_glVertexAttribI4bvEXT(index, v); } inline void glVertexAttribI4svEXT(GLuint index, const GLshort* v) { fp_glVertexAttribI4svEXT(index, v); } inline void glVertexAttribI4ubvEXT(GLuint index, const GLubyte* v) { fp_glVertexAttribI4ubvEXT(index, v); } inline void glVertexAttribI4usvEXT(GLuint index, const GLushort* v) { fp_glVertexAttribI4usvEXT(index, v); } inline void glVertexAttribIPointerEXT(GLuint index, GLint size, GLenum type, GLsizei stride, const void* pointer) { fp_glVertexAttribIPointerEXT(index, size, type, stride, pointer); } inline void glGetVertexAttribIivEXT(GLuint index, GLenum pname, GLint* params) { fp_glGetVertexAttribIivEXT(index, pname, params); } inline void glGetVertexAttribIuivEXT(GLuint index, GLenum pname, GLuint* params) { fp_glGetVertexAttribIuivEXT(index, pname, params); } /* GL_NV_video_capture */ inline void glBeginVideoCaptureNV(GLuint video_capture_slot) { fp_glBeginVideoCaptureNV(video_capture_slot); } inline void glBindVideoCaptureStreamBufferNV(GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLintptrARB offset) { fp_glBindVideoCaptureStreamBufferNV(video_capture_slot, stream, frame_region, offset); } inline void glBindVideoCaptureStreamTextureNV(GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLenum target, GLuint texture) { fp_glBindVideoCaptureStreamTextureNV(video_capture_slot, stream, frame_region, target, texture); } inline void glEndVideoCaptureNV(GLuint video_capture_slot) { fp_glEndVideoCaptureNV(video_capture_slot); } inline void glGetVideoCaptureivNV(GLuint video_capture_slot, GLenum pname, GLint* params) { fp_glGetVideoCaptureivNV(video_capture_slot, pname, params); } inline void glGetVideoCaptureStreamivNV(GLuint video_capture_slot, GLuint stream, GLenum pname, GLint* params) { fp_glGetVideoCaptureStreamivNV(video_capture_slot, stream, pname, params); } inline void glGetVideoCaptureStreamfvNV(GLuint video_capture_slot, GLuint stream, GLenum pname, GLfloat* params) { fp_glGetVideoCaptureStreamfvNV(video_capture_slot, stream, pname, params); } inline void glGetVideoCaptureStreamdvNV(GLuint video_capture_slot, GLuint stream, GLenum pname, GLdouble* params) { fp_glGetVideoCaptureStreamdvNV(video_capture_slot, stream, pname, params); } inline GLenum glVideoCaptureNV(GLuint video_capture_slot, GLuint* sequence_num, GLuint64EXT* capture_time) { return fp_glVideoCaptureNV(video_capture_slot, sequence_num, capture_time); } inline void glVideoCaptureStreamParameterivNV(GLuint video_capture_slot, GLuint stream, GLenum pname, const GLint* params) { fp_glVideoCaptureStreamParameterivNV(video_capture_slot, stream, pname, params); } inline void glVideoCaptureStreamParameterfvNV(GLuint video_capture_slot, GLuint stream, GLenum pname, const GLfloat* params) { fp_glVideoCaptureStreamParameterfvNV(video_capture_slot, stream, pname, params); } inline void glVideoCaptureStreamParameterdvNV(GLuint video_capture_slot, GLuint stream, GLenum pname, const GLdouble* params) { fp_glVideoCaptureStreamParameterdvNV(video_capture_slot, stream, pname, params); } /* GL_NV_viewport_array */ inline void glViewportArrayvNV(GLuint first, GLsizei count, const GLfloat* v) { fp_glViewportArrayvNV(first, count, v); } inline void glViewportIndexedfNV(GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h) { fp_glViewportIndexedfNV(index, x, y, w, h); } inline void glViewportIndexedfvNV(GLuint index, const GLfloat* v) { fp_glViewportIndexedfvNV(index, v); } inline void glScissorArrayvNV(GLuint first, GLsizei count, const GLint* v) { fp_glScissorArrayvNV(first, count, v); } inline void glScissorIndexedNV(GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height) { fp_glScissorIndexedNV(index, left, bottom, width, height); } inline void glScissorIndexedvNV(GLuint index, const GLint* v) { fp_glScissorIndexedvNV(index, v); } inline void glDepthRangeArrayfvNV(GLuint first, GLsizei count, const GLfloat* v) { fp_glDepthRangeArrayfvNV(first, count, v); } inline void glDepthRangeIndexedfNV(GLuint index, GLfloat n, GLfloat f) { fp_glDepthRangeIndexedfNV(index, n, f); } inline void glGetFloati_vNV(GLenum target, GLuint index, GLfloat* data) { fp_glGetFloati_vNV(target, index, data); } inline void glEnableiNV(GLenum target, GLuint index) { fp_glEnableiNV(target, index); } inline void glDisableiNV(GLenum target, GLuint index) { fp_glDisableiNV(target, index); } inline GLboolean glIsEnablediNV(GLenum target, GLuint index) { return fp_glIsEnablediNV(target, index); } /* GL_NVX_conditional_render */ inline void glBeginConditionalRenderNVX(GLuint id) { fp_glBeginConditionalRenderNVX(id); } inline void glEndConditionalRenderNVX() { fp_glEndConditionalRenderNVX(); } /* GL_OVR_multiview */ inline void glFramebufferTextureMultiviewOVR(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint baseViewIndex, GLsizei numViews) { fp_glFramebufferTextureMultiviewOVR(target, attachment, texture, level, baseViewIndex, numViews); } /* GL_OVR_multiview_multisampled_render_to_texture */ inline void glFramebufferTextureMultisampleMultiviewOVR(GLenum target, GLenum attachment, GLuint texture, GLint level, GLsizei samples, GLint baseViewIndex, GLsizei numViews) { fp_glFramebufferTextureMultisampleMultiviewOVR(target, attachment, texture, level, samples, baseViewIndex, numViews); } /* GL_QCOM_alpha_test */ inline void glAlphaFuncQCOM(GLenum func, GLclampf ref) { fp_glAlphaFuncQCOM(func, ref); } /* GL_QCOM_driver_control */ inline void glGetDriverControlsQCOM(GLint* num, GLsizei size, GLuint* driverControls) { fp_glGetDriverControlsQCOM(num, size, driverControls); } inline void glGetDriverControlStringQCOM(GLuint driverControl, GLsizei bufSize, GLsizei* length, GLchar* driverControlString) { fp_glGetDriverControlStringQCOM(driverControl, bufSize, length, driverControlString); } inline void glEnableDriverControlQCOM(GLuint driverControl) { fp_glEnableDriverControlQCOM(driverControl); } inline void glDisableDriverControlQCOM(GLuint driverControl) { fp_glDisableDriverControlQCOM(driverControl); } /* GL_QCOM_extended_get */ inline void glExtGetTexturesQCOM(GLuint* textures, GLint maxTextures, GLint* numTextures) { fp_glExtGetTexturesQCOM(textures, maxTextures, numTextures); } inline void glExtGetBuffersQCOM(GLuint* buffers, GLint maxBuffers, GLint* numBuffers) { fp_glExtGetBuffersQCOM(buffers, maxBuffers, numBuffers); } inline void glExtGetRenderbuffersQCOM(GLuint* renderbuffers, GLint maxRenderbuffers, GLint* numRenderbuffers) { fp_glExtGetRenderbuffersQCOM(renderbuffers, maxRenderbuffers, numRenderbuffers); } inline void glExtGetFramebuffersQCOM(GLuint* framebuffers, GLint maxFramebuffers, GLint* numFramebuffers) { fp_glExtGetFramebuffersQCOM(framebuffers, maxFramebuffers, numFramebuffers); } inline void glExtGetTexLevelParameterivQCOM(GLuint texture, GLenum face, GLint level, GLenum pname, GLint* params) { fp_glExtGetTexLevelParameterivQCOM(texture, face, level, pname, params); } inline void glExtTexObjectStateOverrideiQCOM(GLenum target, GLenum pname, GLint param) { fp_glExtTexObjectStateOverrideiQCOM(target, pname, param); } inline void glExtGetTexSubImageQCOM(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, void* texels) { fp_glExtGetTexSubImageQCOM(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, texels); } inline void glExtGetBufferPointervQCOM(GLenum target, void** params) { fp_glExtGetBufferPointervQCOM(target, params); } /* GL_QCOM_extended_get2 */ inline void glExtGetShadersQCOM(GLuint* shaders, GLint maxShaders, GLint* numShaders) { fp_glExtGetShadersQCOM(shaders, maxShaders, numShaders); } inline void glExtGetProgramsQCOM(GLuint* programs, GLint maxPrograms, GLint* numPrograms) { fp_glExtGetProgramsQCOM(programs, maxPrograms, numPrograms); } inline GLboolean glExtIsProgramBinaryQCOM(GLuint program) { return fp_glExtIsProgramBinaryQCOM(program); } inline void glExtGetProgramBinarySourceQCOM(GLuint program, GLenum shadertype, GLchar* source, GLint* length) { fp_glExtGetProgramBinarySourceQCOM(program, shadertype, source, length); } /* GL_QCOM_tiled_rendering */ inline void glStartTilingQCOM(GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask) { fp_glStartTilingQCOM(x, y, width, height, preserveMask); } inline void glEndTilingQCOM(GLbitfield preserveMask) { fp_glEndTilingQCOM(preserveMask); } } /* namespace glad */ #endif /* __glad_funcs_hpp_ */ ================================================ FILE: src/libraries/glslang/SPIRV/GLSL.ext.AMD.h ================================================ /* ** Copyright (c) 2014-2016 The Khronos Group Inc. ** ** Permission is hereby granted, free of charge, to any person obtaining a copy ** of this software and/or associated documentation files (the "Materials"), ** to deal in the Materials without restriction, including without limitation ** the rights to use, copy, modify, merge, publish, distribute, sublicense, ** and/or sell copies of the Materials, and to permit persons to whom the ** Materials are furnished to do so, subject to the following conditions: ** ** The above copyright notice and this permission notice shall be included in ** all copies or substantial portions of the Materials. ** ** MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS ** STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND ** HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/ ** ** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ** OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL ** THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ** LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING ** FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS ** IN THE MATERIALS. */ #ifndef GLSLextAMD_H #define GLSLextAMD_H static const int GLSLextAMDVersion = 100; static const int GLSLextAMDRevision = 7; // SPV_AMD_shader_ballot static const char* const E_SPV_AMD_shader_ballot = "SPV_AMD_shader_ballot"; enum ShaderBallotAMD { ShaderBallotBadAMD = 0, // Don't use SwizzleInvocationsAMD = 1, SwizzleInvocationsMaskedAMD = 2, WriteInvocationAMD = 3, MbcntAMD = 4, ShaderBallotCountAMD }; // SPV_AMD_shader_trinary_minmax static const char* const E_SPV_AMD_shader_trinary_minmax = "SPV_AMD_shader_trinary_minmax"; enum ShaderTrinaryMinMaxAMD { ShaderTrinaryMinMaxBadAMD = 0, // Don't use FMin3AMD = 1, UMin3AMD = 2, SMin3AMD = 3, FMax3AMD = 4, UMax3AMD = 5, SMax3AMD = 6, FMid3AMD = 7, UMid3AMD = 8, SMid3AMD = 9, ShaderTrinaryMinMaxCountAMD }; // SPV_AMD_shader_explicit_vertex_parameter static const char* const E_SPV_AMD_shader_explicit_vertex_parameter = "SPV_AMD_shader_explicit_vertex_parameter"; enum ShaderExplicitVertexParameterAMD { ShaderExplicitVertexParameterBadAMD = 0, // Don't use InterpolateAtVertexAMD = 1, ShaderExplicitVertexParameterCountAMD }; // SPV_AMD_gcn_shader static const char* const E_SPV_AMD_gcn_shader = "SPV_AMD_gcn_shader"; enum GcnShaderAMD { GcnShaderBadAMD = 0, // Don't use CubeFaceIndexAMD = 1, CubeFaceCoordAMD = 2, TimeAMD = 3, GcnShaderCountAMD }; // SPV_AMD_gpu_shader_half_float static const char* const E_SPV_AMD_gpu_shader_half_float = "SPV_AMD_gpu_shader_half_float"; // SPV_AMD_texture_gather_bias_lod static const char* const E_SPV_AMD_texture_gather_bias_lod = "SPV_AMD_texture_gather_bias_lod"; // SPV_AMD_gpu_shader_int16 static const char* const E_SPV_AMD_gpu_shader_int16 = "SPV_AMD_gpu_shader_int16"; // SPV_AMD_shader_image_load_store_lod static const char* const E_SPV_AMD_shader_image_load_store_lod = "SPV_AMD_shader_image_load_store_lod"; // SPV_AMD_shader_fragment_mask static const char* const E_SPV_AMD_shader_fragment_mask = "SPV_AMD_shader_fragment_mask"; // SPV_AMD_gpu_shader_half_float_fetch static const char* const E_SPV_AMD_gpu_shader_half_float_fetch = "SPV_AMD_gpu_shader_half_float_fetch"; #endif // #ifndef GLSLextAMD_H ================================================ FILE: src/libraries/glslang/SPIRV/GLSL.ext.ARM.h ================================================ /* ** Copyright (c) 2022 ARM Limited ** ** Permission is hereby granted, free of charge, to any person obtaining a copy ** of this software and/or associated documentation files (the "Materials"), ** to deal in the Materials without restriction, including without limitation ** the rights to use, copy, modify, merge, publish, distribute, sublicense, ** and/or sell copies of the Materials, and to permit persons to whom the ** Materials are furnished to do so, subject to the following conditions: ** ** The above copyright notice and this permission notice shall be included in ** all copies or substantial portions of the Materials. ** ** MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS ** STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND ** HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/ ** ** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ** OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL ** THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ** LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING ** FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS ** IN THE MATERIALS. */ #ifndef GLSLextARM_H #define GLSLextARM_H static const int GLSLextARMVersion = 100; static const int GLSLextARMRevision = 1; static const char * const E_SPV_ARM_core_builtins = "SPV_ARM_core_builtins"; #endif // #ifndef GLSLextARM_H ================================================ FILE: src/libraries/glslang/SPIRV/GLSL.ext.EXT.h ================================================ /* ** Copyright (c) 2014-2016 The Khronos Group Inc. ** ** Permission is hereby granted, free of charge, to any person obtaining a copy ** of this software and/or associated documentation files (the "Materials"), ** to deal in the Materials without restriction, including without limitation ** the rights to use, copy, modify, merge, publish, distribute, sublicense, ** and/or sell copies of the Materials, and to permit persons to whom the ** Materials are furnished to do so, subject to the following conditions: ** ** The above copyright notice and this permission notice shall be included in ** all copies or substantial portions of the Materials. ** ** MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS ** STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND ** HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/ ** ** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ** OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL ** THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ** LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING ** FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS ** IN THE MATERIALS. */ #ifndef GLSLextEXT_H #define GLSLextEXT_H static const int GLSLextEXTVersion = 100; static const int GLSLextEXTRevision = 2; static const char* const E_SPV_EXT_shader_stencil_export = "SPV_EXT_shader_stencil_export"; static const char* const E_SPV_EXT_shader_viewport_index_layer = "SPV_EXT_shader_viewport_index_layer"; static const char* const E_SPV_EXT_fragment_fully_covered = "SPV_EXT_fragment_fully_covered"; static const char* const E_SPV_EXT_fragment_invocation_density = "SPV_EXT_fragment_invocation_density"; static const char* const E_SPV_EXT_demote_to_helper_invocation = "SPV_EXT_demote_to_helper_invocation"; static const char* const E_SPV_EXT_shader_atomic_float_add = "SPV_EXT_shader_atomic_float_add"; static const char* const E_SPV_EXT_shader_atomic_float16_add = "SPV_EXT_shader_atomic_float16_add"; static const char* const E_SPV_EXT_shader_atomic_float_min_max = "SPV_EXT_shader_atomic_float_min_max"; static const char* const E_SPV_EXT_shader_image_int64 = "SPV_EXT_shader_image_int64"; static const char* const E_SPV_EXT_shader_tile_image = "SPV_EXT_shader_tile_image"; static const char* const E_SPV_EXT_mesh_shader = "SPV_EXT_mesh_shader"; static const char* const E_SPV_ARM_cooperative_matrix_layouts = "SPV_ARM_cooperative_matrix_layouts"; static const char* const E_SPV_EXT_float8 = "SPV_EXT_float8"; #endif // #ifndef GLSLextEXT_H ================================================ FILE: src/libraries/glslang/SPIRV/GLSL.ext.KHR.h ================================================ /* ** Copyright (c) 2014-2020 The Khronos Group Inc. ** Copyright (C) 2022-2024 Arm Limited. ** Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights reserved. ** ** Permission is hereby granted, free of charge, to any person obtaining a copy ** of this software and/or associated documentation files (the "Materials"), ** to deal in the Materials without restriction, including without limitation ** the rights to use, copy, modify, merge, publish, distribute, sublicense, ** and/or sell copies of the Materials, and to permit persons to whom the ** Materials are furnished to do so, subject to the following conditions: ** ** The above copyright notice and this permission notice shall be included in ** all copies or substantial portions of the Materials. ** ** MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS ** STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND ** HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/ ** ** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ** OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL ** THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ** LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING ** FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS ** IN THE MATERIALS. */ #ifndef GLSLextKHR_H #define GLSLextKHR_H static const int GLSLextKHRVersion = 100; static const int GLSLextKHRRevision = 3; static const char* const E_SPV_KHR_shader_ballot = "SPV_KHR_shader_ballot"; static const char* const E_SPV_KHR_subgroup_vote = "SPV_KHR_subgroup_vote"; static const char* const E_SPV_KHR_device_group = "SPV_KHR_device_group"; static const char* const E_SPV_KHR_multiview = "SPV_KHR_multiview"; static const char* const E_SPV_KHR_shader_draw_parameters = "SPV_KHR_shader_draw_parameters"; static const char* const E_SPV_KHR_16bit_storage = "SPV_KHR_16bit_storage"; static const char* const E_SPV_KHR_8bit_storage = "SPV_KHR_8bit_storage"; static const char* const E_SPV_KHR_storage_buffer_storage_class = "SPV_KHR_storage_buffer_storage_class"; static const char* const E_SPV_KHR_post_depth_coverage = "SPV_KHR_post_depth_coverage"; static const char* const E_SPV_KHR_vulkan_memory_model = "SPV_KHR_vulkan_memory_model"; static const char* const E_SPV_EXT_physical_storage_buffer = "SPV_EXT_physical_storage_buffer"; static const char* const E_SPV_KHR_physical_storage_buffer = "SPV_KHR_physical_storage_buffer"; static const char* const E_SPV_EXT_fragment_shader_interlock = "SPV_EXT_fragment_shader_interlock"; static const char* const E_SPV_KHR_shader_clock = "SPV_KHR_shader_clock"; static const char* const E_SPV_KHR_non_semantic_info = "SPV_KHR_non_semantic_info"; static const char* const E_SPV_KHR_ray_tracing = "SPV_KHR_ray_tracing"; static const char* const E_SPV_KHR_ray_query = "SPV_KHR_ray_query"; static const char* const E_SPV_KHR_fragment_shading_rate = "SPV_KHR_fragment_shading_rate"; static const char* const E_SPV_KHR_terminate_invocation = "SPV_KHR_terminate_invocation"; static const char* const E_SPV_KHR_workgroup_memory_explicit_layout = "SPV_KHR_workgroup_memory_explicit_layout"; static const char* const E_SPV_KHR_subgroup_uniform_control_flow = "SPV_KHR_subgroup_uniform_control_flow"; static const char* const E_SPV_KHR_fragment_shader_barycentric = "SPV_KHR_fragment_shader_barycentric"; static const char* const E_SPV_KHR_quad_control = "SPV_KHR_quad_control"; static const char* const E_SPV_AMD_shader_early_and_late_fragment_tests = "SPV_AMD_shader_early_and_late_fragment_tests"; static const char* const E_SPV_KHR_ray_tracing_position_fetch = "SPV_KHR_ray_tracing_position_fetch"; static const char* const E_SPV_KHR_cooperative_matrix = "SPV_KHR_cooperative_matrix"; static const char* const E_SPV_KHR_maximal_reconvergence = "SPV_KHR_maximal_reconvergence"; static const char* const E_SPV_KHR_subgroup_rotate = "SPV_KHR_subgroup_rotate"; static const char* const E_SPV_KHR_expect_assume = "SPV_KHR_expect_assume"; static const char* const E_SPV_EXT_replicated_composites = "SPV_EXT_replicated_composites"; static const char* const E_SPV_KHR_relaxed_extended_instruction = "SPV_KHR_relaxed_extended_instruction"; static const char* const E_SPV_KHR_integer_dot_product = "SPV_KHR_integer_dot_product"; static const char* const E_SPV_NV_cooperative_vector = "SPV_NV_cooperative_vector"; static const char* const E_SPV_KHR_bfloat16 = "SPV_KHR_bfloat16"; #endif // #ifndef GLSLextKHR_H ================================================ FILE: src/libraries/glslang/SPIRV/GLSL.ext.NV.h ================================================ /* ** Copyright (c) 2014-2017 The Khronos Group Inc. ** ** Permission is hereby granted, free of charge, to any person obtaining a copy ** of this software and/or associated documentation files (the "Materials"), ** to deal in the Materials without restriction, including without limitation ** the rights to use, copy, modify, merge, publish, distribute, sublicense, ** and/or sell copies of the Materials, and to permit persons to whom the ** Materials are furnished to do so, subject to the following conditions: ** ** The above copyright notice and this permission notice shall be included in ** all copies or substantial portions of the Materials. ** ** MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS ** STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND ** HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/ ** ** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ** OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL ** THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ** LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING ** FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS ** IN THE MATERIALS. */ #ifndef GLSLextNV_H #define GLSLextNV_H enum class BuiltIn : unsigned; enum class Decoration : unsigned; enum class Op : unsigned; enum class Capability : unsigned; static const int GLSLextNVVersion = 100; static const int GLSLextNVRevision = 11; //SPV_NV_sample_mask_override_coverage const char* const E_SPV_NV_sample_mask_override_coverage = "SPV_NV_sample_mask_override_coverage"; //SPV_NV_geometry_shader_passthrough const char* const E_SPV_NV_geometry_shader_passthrough = "SPV_NV_geometry_shader_passthrough"; //SPV_NV_viewport_array2 const char* const E_SPV_NV_viewport_array2 = "SPV_NV_viewport_array2"; const char* const E_ARB_shader_viewport_layer_array = "SPV_ARB_shader_viewport_layer_array"; //SPV_NV_stereo_view_rendering const char* const E_SPV_NV_stereo_view_rendering = "SPV_NV_stereo_view_rendering"; //SPV_NVX_multiview_per_view_attributes const char* const E_SPV_NVX_multiview_per_view_attributes = "SPV_NVX_multiview_per_view_attributes"; //SPV_NV_shader_subgroup_partitioned const char* const E_SPV_NV_shader_subgroup_partitioned = "SPV_NV_shader_subgroup_partitioned"; //SPV_NV_fragment_shader_barycentric const char* const E_SPV_NV_fragment_shader_barycentric = "SPV_NV_fragment_shader_barycentric"; //SPV_NV_compute_shader_derivatives const char* const E_SPV_NV_compute_shader_derivatives = "SPV_NV_compute_shader_derivatives"; //SPV_NV_shader_image_footprint const char* const E_SPV_NV_shader_image_footprint = "SPV_NV_shader_image_footprint"; //SPV_NV_mesh_shader const char* const E_SPV_NV_mesh_shader = "SPV_NV_mesh_shader"; //SPV_NV_raytracing const char* const E_SPV_NV_ray_tracing = "SPV_NV_ray_tracing"; //SPV_NV_ray_tracing_motion_blur const char* const E_SPV_NV_ray_tracing_motion_blur = "SPV_NV_ray_tracing_motion_blur"; //SPV_NV_shading_rate const char* const E_SPV_NV_shading_rate = "SPV_NV_shading_rate"; //SPV_NV_cooperative_matrix const char* const E_SPV_NV_cooperative_matrix = "SPV_NV_cooperative_matrix"; //SPV_NV_shader_sm_builtins const char* const E_SPV_NV_shader_sm_builtins = "SPV_NV_shader_sm_builtins"; //SPV_NV_shader_execution_reorder const char* const E_SPV_NV_shader_invocation_reorder = "SPV_NV_shader_invocation_reorder"; //SPV_NV_displacement_micromap const char* const E_SPV_NV_displacement_micromap = "SPV_NV_displacement_micromap"; //SPV_NV_shader_atomic_fp16_vector const char* const E_SPV_NV_shader_atomic_fp16_vector = "SPV_NV_shader_atomic_fp16_vector"; //SPV_NV_tensor_addressing const char* const E_SPV_NV_tensor_addressing = "SPV_NV_tensor_addressing"; //SPV_NV_cooperative_matrix2 const char* const E_SPV_NV_cooperative_matrix2 = "SPV_NV_cooperative_matrix2"; //SPV_NV_cluster_acceleration_structure const char* const E_SPV_NV_cluster_acceleration_structure = "SPV_NV_cluster_acceleration_structure"; //SPV_NV_linear_swept_spheres const char* const E_SPV_NV_linear_swept_spheres = "SPV_NV_linear_swept_spheres"; #endif // #ifndef GLSLextNV_H ================================================ FILE: src/libraries/glslang/SPIRV/GLSL.ext.QCOM.h ================================================ /* ** Copyright (c) 2021 The Khronos Group Inc. ** ** Permission is hereby granted, free of charge, to any person obtaining a copy ** of this software and/or associated documentation files (the "Materials"), ** to deal in the Materials without restriction, including without limitation ** the rights to use, copy, modify, merge, publish, distribute, sublicense, ** and/or sell copies of the Materials, and to permit persons to whom the ** Materials are furnished to do so, subject to the following conditions: ** ** The above copyright notice and this permission notice shall be included in ** all copies or substantial portions of the Materials. ** ** MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS ** STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND ** HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/ ** ** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ** OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL ** THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ** LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING ** FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS ** IN THE MATERIALS. */ #ifndef GLSLextQCOM_H #define GLSLextQCOM_H enum class BuiltIn : unsigned; enum class Decoration : unsigned; enum class Op : unsigned; enum class Capability : unsigned; static const int GLSLextQCOMVersion = 100; static const int GLSLextQCOMRevision = 1; //SPV_QCOM_image_processing const char* const E_SPV_QCOM_image_processing = "SPV_QCOM_image_processing"; //SPV_QCOM_image_processing2 const char* const E_SPV_QCOM_image_processing2 = "SPV_QCOM_image_processing2"; //SPV_QCOM_tile_shading const char* const E_SPV_QCOM_tile_shading = "SPV_QCOM_tile_shading"; #endif // #ifndef GLSLextQCOM_H ================================================ FILE: src/libraries/glslang/SPIRV/GLSL.std.450.h ================================================ /* ** Copyright (c) 2014-2016 The Khronos Group Inc. ** ** Permission is hereby granted, free of charge, to any person obtaining a copy ** of this software and/or associated documentation files (the "Materials"), ** to deal in the Materials without restriction, including without limitation ** the rights to use, copy, modify, merge, publish, distribute, sublicense, ** and/or sell copies of the Materials, and to permit persons to whom the ** Materials are furnished to do so, subject to the following conditions: ** ** The above copyright notice and this permission notice shall be included in ** all copies or substantial portions of the Materials. ** ** MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS ** STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND ** HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/ ** ** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ** OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL ** THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ** LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING ** FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS ** IN THE MATERIALS. */ #ifndef GLSLstd450_H #define GLSLstd450_H static const int GLSLstd450Version = 100; static const int GLSLstd450Revision = 1; enum GLSLstd450 { GLSLstd450Bad = 0, // Don't use GLSLstd450Round = 1, GLSLstd450RoundEven = 2, GLSLstd450Trunc = 3, GLSLstd450FAbs = 4, GLSLstd450SAbs = 5, GLSLstd450FSign = 6, GLSLstd450SSign = 7, GLSLstd450Floor = 8, GLSLstd450Ceil = 9, GLSLstd450Fract = 10, GLSLstd450Radians = 11, GLSLstd450Degrees = 12, GLSLstd450Sin = 13, GLSLstd450Cos = 14, GLSLstd450Tan = 15, GLSLstd450Asin = 16, GLSLstd450Acos = 17, GLSLstd450Atan = 18, GLSLstd450Sinh = 19, GLSLstd450Cosh = 20, GLSLstd450Tanh = 21, GLSLstd450Asinh = 22, GLSLstd450Acosh = 23, GLSLstd450Atanh = 24, GLSLstd450Atan2 = 25, GLSLstd450Pow = 26, GLSLstd450Exp = 27, GLSLstd450Log = 28, GLSLstd450Exp2 = 29, GLSLstd450Log2 = 30, GLSLstd450Sqrt = 31, GLSLstd450InverseSqrt = 32, GLSLstd450Determinant = 33, GLSLstd450MatrixInverse = 34, GLSLstd450Modf = 35, // second operand needs an OpVariable to write to GLSLstd450ModfStruct = 36, // no OpVariable operand GLSLstd450FMin = 37, GLSLstd450UMin = 38, GLSLstd450SMin = 39, GLSLstd450FMax = 40, GLSLstd450UMax = 41, GLSLstd450SMax = 42, GLSLstd450FClamp = 43, GLSLstd450UClamp = 44, GLSLstd450SClamp = 45, GLSLstd450FMix = 46, GLSLstd450IMix = 47, // Reserved GLSLstd450Step = 48, GLSLstd450SmoothStep = 49, GLSLstd450Fma = 50, GLSLstd450Frexp = 51, // second operand needs an OpVariable to write to GLSLstd450FrexpStruct = 52, // no OpVariable operand GLSLstd450Ldexp = 53, GLSLstd450PackSnorm4x8 = 54, GLSLstd450PackUnorm4x8 = 55, GLSLstd450PackSnorm2x16 = 56, GLSLstd450PackUnorm2x16 = 57, GLSLstd450PackHalf2x16 = 58, GLSLstd450PackDouble2x32 = 59, GLSLstd450UnpackSnorm2x16 = 60, GLSLstd450UnpackUnorm2x16 = 61, GLSLstd450UnpackHalf2x16 = 62, GLSLstd450UnpackSnorm4x8 = 63, GLSLstd450UnpackUnorm4x8 = 64, GLSLstd450UnpackDouble2x32 = 65, GLSLstd450Length = 66, GLSLstd450Distance = 67, GLSLstd450Cross = 68, GLSLstd450Normalize = 69, GLSLstd450FaceForward = 70, GLSLstd450Reflect = 71, GLSLstd450Refract = 72, GLSLstd450FindILsb = 73, GLSLstd450FindSMsb = 74, GLSLstd450FindUMsb = 75, GLSLstd450InterpolateAtCentroid = 76, GLSLstd450InterpolateAtSample = 77, GLSLstd450InterpolateAtOffset = 78, GLSLstd450NMin = 79, GLSLstd450NMax = 80, GLSLstd450NClamp = 81, GLSLstd450Count }; #endif // #ifndef GLSLstd450_H ================================================ FILE: src/libraries/glslang/SPIRV/GlslangToSpv.cpp ================================================ // // Copyright (C) 2014-2016 LunarG, Inc. // Copyright (C) 2015-2020 Google, Inc. // Copyright (C) 2017, 2022-2025 Arm Limited. // Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights reserved. // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following // disclaimer in the documentation and/or other materials provided // with the distribution. // // Neither the name of 3Dlabs Inc. Ltd. nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // // Visit the nodes in the glslang intermediate tree representation to // translate them to SPIR-V. // #include "spirv.hpp11" #include "GlslangToSpv.h" #include "SpvBuilder.h" #include "SpvTools.h" #include "spvUtil.h" namespace spv { #include "GLSL.std.450.h" #include "GLSL.ext.KHR.h" #include "GLSL.ext.EXT.h" #include "GLSL.ext.AMD.h" #include "GLSL.ext.NV.h" #include "GLSL.ext.ARM.h" #include "GLSL.ext.QCOM.h" #include "NonSemanticDebugPrintf.h" } // Glslang includes #include "../glslang/MachineIndependent/localintermediate.h" #include "../glslang/MachineIndependent/SymbolTable.h" #include "../glslang/Include/Common.h" // Build-time generated includes #include "../glslang/build_info.h" #include #include #include #include #include #include #include #include namespace { namespace { class SpecConstantOpModeGuard { public: SpecConstantOpModeGuard(spv::Builder* builder) : builder_(builder) { previous_flag_ = builder->isInSpecConstCodeGenMode(); } ~SpecConstantOpModeGuard() { previous_flag_ ? builder_->setToSpecConstCodeGenMode() : builder_->setToNormalCodeGenMode(); } void turnOnSpecConstantOpMode() { builder_->setToSpecConstCodeGenMode(); } private: spv::Builder* builder_; bool previous_flag_; }; struct OpDecorations { public: OpDecorations(spv::Decoration precision, spv::Decoration noContraction, spv::Decoration nonUniform) : precision(precision) , noContraction(noContraction), nonUniform(nonUniform) { } spv::Decoration precision; void addNoContraction(spv::Builder& builder, spv::Id t) { builder.addDecoration(t, noContraction); } void addNonUniform(spv::Builder& builder, spv::Id t) { builder.addDecoration(t, nonUniform); } protected: spv::Decoration noContraction; spv::Decoration nonUniform; }; } // namespace // // The main holder of information for translating glslang to SPIR-V. // // Derives from the AST walking base class. // class TGlslangToSpvTraverser : public glslang::TIntermTraverser { public: TGlslangToSpvTraverser(unsigned int spvVersion, const glslang::TIntermediate*, spv::SpvBuildLogger* logger, glslang::SpvOptions& options); virtual ~TGlslangToSpvTraverser() { } bool visitAggregate(glslang::TVisit, glslang::TIntermAggregate*); bool visitBinary(glslang::TVisit, glslang::TIntermBinary*); void visitConstantUnion(glslang::TIntermConstantUnion*); bool visitSelection(glslang::TVisit, glslang::TIntermSelection*); bool visitSwitch(glslang::TVisit, glslang::TIntermSwitch*); void visitSymbol(glslang::TIntermSymbol* symbol); bool visitUnary(glslang::TVisit, glslang::TIntermUnary*); bool visitLoop(glslang::TVisit, glslang::TIntermLoop*); bool visitBranch(glslang::TVisit visit, glslang::TIntermBranch*); void finishSpv(bool compileOnly); void dumpSpv(std::vector& out); protected: TGlslangToSpvTraverser(TGlslangToSpvTraverser&); TGlslangToSpvTraverser& operator=(TGlslangToSpvTraverser&); spv::Decoration TranslateInterpolationDecoration(const glslang::TQualifier& qualifier); spv::Decoration TranslateAuxiliaryStorageDecoration(const glslang::TQualifier& qualifier); spv::Decoration TranslateNonUniformDecoration(const glslang::TQualifier& qualifier); spv::Decoration TranslateNonUniformDecoration(const spv::Builder::AccessChain::CoherentFlags& coherentFlags); spv::Builder::AccessChain::CoherentFlags TranslateCoherent(const glslang::TType& type); spv::MemoryAccessMask TranslateMemoryAccess(const spv::Builder::AccessChain::CoherentFlags &coherentFlags); spv::ImageOperandsMask TranslateImageOperands(const spv::Builder::AccessChain::CoherentFlags &coherentFlags); spv::Scope TranslateMemoryScope(const spv::Builder::AccessChain::CoherentFlags &coherentFlags); spv::BuiltIn TranslateBuiltInDecoration(glslang::TBuiltInVariable, bool memberDeclaration); spv::ImageFormat TranslateImageFormat(const glslang::TType& type); spv::SelectionControlMask TranslateSelectionControl(const glslang::TIntermSelection&) const; spv::SelectionControlMask TranslateSwitchControl(const glslang::TIntermSwitch&) const; spv::LoopControlMask TranslateLoopControl(const glslang::TIntermLoop&, std::vector& operands) const; spv::StorageClass TranslateStorageClass(const glslang::TType&); void TranslateLiterals(const glslang::TVector&, std::vector&) const; void addIndirectionIndexCapabilities(const glslang::TType& baseType, const glslang::TType& indexType); spv::Id createSpvVariable(const glslang::TIntermSymbol*, spv::Id forcedType); spv::Id getSampledType(const glslang::TSampler&); spv::Id getInvertedSwizzleType(const glslang::TIntermTyped&); spv::Id createInvertedSwizzle(spv::Decoration precision, const glslang::TIntermTyped&, spv::Id parentResult); void convertSwizzle(const glslang::TIntermAggregate&, std::vector& swizzle); spv::Id convertGlslangToSpvType(const glslang::TType& type, bool forwardReferenceOnly = false); spv::Id convertGlslangToSpvType(const glslang::TType& type, glslang::TLayoutPacking, const glslang::TQualifier&, bool lastBufferBlockMember, bool forwardReferenceOnly = false); void applySpirvDecorate(const glslang::TType& type, spv::Id id, std::optional member); bool filterMember(const glslang::TType& member); spv::Id convertGlslangStructToSpvType(const glslang::TType&, const glslang::TTypeList* glslangStruct, glslang::TLayoutPacking, const glslang::TQualifier&); spv::LinkageType convertGlslangLinkageToSpv(glslang::TLinkType glslangLinkType); void decorateStructType(const glslang::TType&, const glslang::TTypeList* glslangStruct, glslang::TLayoutPacking, const glslang::TQualifier&, spv::Id, const std::vector& spvMembers); spv::Id makeArraySizeId(const glslang::TArraySizes&, int dim, bool allowZero = false, bool boolType = false); spv::Id accessChainLoad(const glslang::TType& type); void accessChainStore(const glslang::TType& type, spv::Id rvalue); void multiTypeStore(const glslang::TType&, spv::Id rValue); spv::Id convertLoadedBoolInUniformToUint(const glslang::TType& type, spv::Id nominalTypeId, spv::Id loadedId); glslang::TLayoutPacking getExplicitLayout(const glslang::TType& type) const; int getArrayStride(const glslang::TType& arrayType, glslang::TLayoutPacking, glslang::TLayoutMatrix); int getMatrixStride(const glslang::TType& matrixType, glslang::TLayoutPacking, glslang::TLayoutMatrix); void updateMemberOffset(const glslang::TType& structType, const glslang::TType& memberType, int& currentOffset, int& nextOffset, glslang::TLayoutPacking, glslang::TLayoutMatrix); void declareUseOfStructMember(const glslang::TTypeList& members, int glslangMember); bool isShaderEntryPoint(const glslang::TIntermAggregate* node); bool writableParam(glslang::TStorageQualifier) const; bool originalParam(glslang::TStorageQualifier, const glslang::TType&, bool implicitThisParam); void makeFunctions(const glslang::TIntermSequence&); void makeGlobalInitializers(const glslang::TIntermSequence&); void collectRayTracingLinkerObjects(); void visitFunctions(const glslang::TIntermSequence&); void handleFunctionEntry(const glslang::TIntermAggregate* node); void translateArguments(const glslang::TIntermAggregate& node, std::vector& arguments, spv::Builder::AccessChain::CoherentFlags &lvalueCoherentFlags); void translateArguments(glslang::TIntermUnary& node, std::vector& arguments); spv::Id createImageTextureFunctionCall(glslang::TIntermOperator* node); spv::Id handleUserFunctionCall(const glslang::TIntermAggregate*); spv::Id createBinaryOperation(glslang::TOperator op, OpDecorations&, spv::Id typeId, spv::Id left, spv::Id right, glslang::TBasicType typeProxy, bool reduceComparison = true); spv::Id createBinaryMatrixOperation(spv::Op, OpDecorations&, spv::Id typeId, spv::Id left, spv::Id right); spv::Id createUnaryOperation(glslang::TOperator op, OpDecorations&, spv::Id typeId, spv::Id operand, glslang::TBasicType typeProxy, const spv::Builder::AccessChain::CoherentFlags &lvalueCoherentFlags, const glslang::TType &opType); spv::Id createUnaryMatrixOperation(spv::Op op, OpDecorations&, spv::Id typeId, spv::Id operand, glslang::TBasicType typeProxy); spv::Id createConversion(glslang::TOperator op, OpDecorations&, spv::Id destTypeId, spv::Id operand, glslang::TBasicType resultBasicType, glslang::TBasicType operandBasicType); spv::Id createIntWidthConversion(spv::Id operand, int vectorSize, spv::Id destType, glslang::TBasicType resultBasicType, glslang::TBasicType operandBasicType); spv::Id makeSmearedConstant(spv::Id constant, int vectorSize); spv::Id createAtomicOperation(glslang::TOperator op, spv::Decoration precision, spv::Id typeId, std::vector& operands, glslang::TBasicType typeProxy, const spv::Builder::AccessChain::CoherentFlags &lvalueCoherentFlags, const glslang::TType &opType); spv::Id createInvocationsOperation(glslang::TOperator op, spv::Id typeId, std::vector& operands, glslang::TBasicType typeProxy); spv::Id CreateInvocationsVectorOperation(spv::Op op, spv::GroupOperation groupOperation, spv::Id typeId, std::vector& operands); spv::Id createSubgroupOperation(glslang::TOperator op, spv::Id typeId, std::vector& operands, glslang::TBasicType typeProxy); spv::Id createMiscOperation(glslang::TOperator op, spv::Decoration precision, spv::Id typeId, std::vector& operands, glslang::TBasicType typeProxy); spv::Id createNoArgOperation(glslang::TOperator op, spv::Decoration precision, spv::Id typeId); spv::Id getSymbolId(const glslang::TIntermSymbol* node); void addMeshNVDecoration(spv::Id id, int member, const glslang::TQualifier & qualifier); bool hasQCOMImageProceessingDecoration(spv::Id id, spv::Decoration decor); void addImageProcessingQCOMDecoration(spv::Id id, spv::Decoration decor); void addImageProcessing2QCOMDecoration(spv::Id id, bool isForGather); spv::Id createSpvConstant(const glslang::TIntermTyped&); spv::Id createSpvConstantFromConstUnionArray(const glslang::TType& type, const glslang::TConstUnionArray&, int& nextConst, bool specConstant); bool isTrivialLeaf(const glslang::TIntermTyped* node); bool isTrivial(const glslang::TIntermTyped* node); spv::Id createShortCircuit(glslang::TOperator, glslang::TIntermTyped& left, glslang::TIntermTyped& right); spv::Id getExtBuiltins(const char* name); std::pair getForcedType(glslang::TBuiltInVariable builtIn, const glslang::TType&); spv::Id translateForcedType(spv::Id object); spv::Id createCompositeConstruct(spv::Id typeId, std::vector constituents); glslang::SpvOptions& options; spv::Function* shaderEntry; spv::Function* currentFunction; spv::Instruction* entryPoint; int sequenceDepth; spv::SpvBuildLogger* logger; // There is a 1:1 mapping between a spv builder and a module; this is thread safe spv::Builder builder; bool inEntryPoint; bool entryPointTerminated; bool linkageOnly; // true when visiting the set of objects in the AST present only for // establishing interface, whether or not they were statically used std::set iOSet; // all input/output variables from either static use or declaration of interface const glslang::TIntermediate* glslangIntermediate; bool nanMinMaxClamp; // true if use NMin/NMax/NClamp instead of FMin/FMax/FClamp spv::Id stdBuiltins; spv::Id nonSemanticDebugPrintf; std::unordered_map extBuiltinMap; std::unordered_map symbolValues; std::unordered_map builtInVariableIds; std::unordered_set rValueParameters; // set of formal function parameters passed as rValues, // rather than a pointer std::unordered_map functionMap; std::unordered_map structMap[glslang::ElpCount][glslang::ElmCount]; // for mapping glslang block indices to spv indices (e.g., due to hidden members): std::unordered_map> memberRemapper; // for mapping glslang symbol struct to symbol Id std::unordered_map glslangTypeToIdMap; std::stack breakForLoop; // false means break for switch std::unordered_map counterOriginator; // Map pointee types for EbtReference to their forward pointers std::map forwardPointers; // Type forcing, for when SPIR-V wants a different type than the AST, // requiring local translation to and from SPIR-V type on every access. // Maps AST-required-type-id> std::unordered_map forceType; // Used by Task shader while generating opearnds for OpEmitMeshTasksEXT spv::Id taskPayloadID; // Used later for generating OpTraceKHR/OpExecuteCallableKHR/OpHitObjectRecordHit*/OpHitObjectGetShaderBindingTableData std::unordered_map locationToSymbol[4]; std::unordered_map > idToQCOMDecorations; }; // // Helper functions for translating glslang representations to SPIR-V enumerants. // // Translate glslang profile to SPIR-V source language. spv::SourceLanguage TranslateSourceLanguage(glslang::EShSource source, EProfile profile) { switch (source) { case glslang::EShSourceGlsl: switch (profile) { case ENoProfile: case ECoreProfile: case ECompatibilityProfile: return spv::SourceLanguage::GLSL; case EEsProfile: return spv::SourceLanguage::ESSL; default: return spv::SourceLanguage::Unknown; } case glslang::EShSourceHlsl: return spv::SourceLanguage::HLSL; default: return spv::SourceLanguage::Unknown; } } // Translate glslang language (stage) to SPIR-V execution model. spv::ExecutionModel TranslateExecutionModel(EShLanguage stage, bool isMeshShaderEXT = false) { switch (stage) { case EShLangVertex: return spv::ExecutionModel::Vertex; case EShLangFragment: return spv::ExecutionModel::Fragment; case EShLangCompute: return spv::ExecutionModel::GLCompute; case EShLangTessControl: return spv::ExecutionModel::TessellationControl; case EShLangTessEvaluation: return spv::ExecutionModel::TessellationEvaluation; case EShLangGeometry: return spv::ExecutionModel::Geometry; case EShLangRayGen: return spv::ExecutionModel::RayGenerationKHR; case EShLangIntersect: return spv::ExecutionModel::IntersectionKHR; case EShLangAnyHit: return spv::ExecutionModel::AnyHitKHR; case EShLangClosestHit: return spv::ExecutionModel::ClosestHitKHR; case EShLangMiss: return spv::ExecutionModel::MissKHR; case EShLangCallable: return spv::ExecutionModel::CallableKHR; case EShLangTask: return (isMeshShaderEXT)? spv::ExecutionModel::TaskEXT : spv::ExecutionModel::TaskNV; case EShLangMesh: return (isMeshShaderEXT)? spv::ExecutionModel::MeshEXT : spv::ExecutionModel::MeshNV; default: assert(0); return spv::ExecutionModel::Fragment; } } // Translate glslang sampler type to SPIR-V dimensionality. spv::Dim TranslateDimensionality(const glslang::TSampler& sampler) { switch (sampler.dim) { case glslang::Esd1D: return spv::Dim::Dim1D; case glslang::Esd2D: return spv::Dim::Dim2D; case glslang::Esd3D: return spv::Dim::Dim3D; case glslang::EsdCube: return spv::Dim::Cube; case glslang::EsdRect: return spv::Dim::Rect; case glslang::EsdBuffer: return spv::Dim::Buffer; case glslang::EsdSubpass: return spv::Dim::SubpassData; case glslang::EsdAttachmentEXT: return spv::Dim::TileImageDataEXT; default: assert(0); return spv::Dim::Dim2D; } } // Translate glslang precision to SPIR-V precision decorations. spv::Decoration TranslatePrecisionDecoration(glslang::TPrecisionQualifier glslangPrecision) { switch (glslangPrecision) { case glslang::EpqLow: return spv::Decoration::RelaxedPrecision; case glslang::EpqMedium: return spv::Decoration::RelaxedPrecision; default: return spv::NoPrecision; } } // Translate glslang type to SPIR-V precision decorations. spv::Decoration TranslatePrecisionDecoration(const glslang::TType& type) { return TranslatePrecisionDecoration(type.getQualifier().precision); } // Translate glslang type to SPIR-V block decorations. spv::Decoration TranslateBlockDecoration(const glslang::TStorageQualifier storage, bool useStorageBuffer) { switch (storage) { case glslang::EvqUniform: return spv::Decoration::Block; case glslang::EvqBuffer: return useStorageBuffer ? spv::Decoration::Block : spv::Decoration::BufferBlock; case glslang::EvqVaryingIn: return spv::Decoration::Block; case glslang::EvqVaryingOut: return spv::Decoration::Block; case glslang::EvqShared: return spv::Decoration::Block; case glslang::EvqPayload: return spv::Decoration::Block; case glslang::EvqPayloadIn: return spv::Decoration::Block; case glslang::EvqHitAttr: return spv::Decoration::Block; case glslang::EvqCallableData: return spv::Decoration::Block; case glslang::EvqCallableDataIn: return spv::Decoration::Block; case glslang::EvqHitObjectAttrNV: return spv::Decoration::Block; default: assert(0); break; } return spv::Decoration::Max; } // Translate glslang type to SPIR-V memory decorations. void TranslateMemoryDecoration(const glslang::TQualifier& qualifier, std::vector& memory, bool useVulkanMemoryModel) { if (!useVulkanMemoryModel) { if (qualifier.isVolatile()) { memory.push_back(spv::Decoration::Volatile); memory.push_back(spv::Decoration::Coherent); } else if (qualifier.isCoherent()) { memory.push_back(spv::Decoration::Coherent); } } if (qualifier.isRestrict()) memory.push_back(spv::Decoration::Restrict); if (qualifier.isReadOnly()) memory.push_back(spv::Decoration::NonWritable); if (qualifier.isWriteOnly()) memory.push_back(spv::Decoration::NonReadable); } // Translate glslang type to SPIR-V layout decorations. spv::Decoration TranslateLayoutDecoration(const glslang::TType& type, glslang::TLayoutMatrix matrixLayout) { if (type.isMatrix()) { switch (matrixLayout) { case glslang::ElmRowMajor: return spv::Decoration::RowMajor; case glslang::ElmColumnMajor: return spv::Decoration::ColMajor; default: // opaque layouts don't need a majorness return spv::Decoration::Max; } } else { switch (type.getBasicType()) { default: return spv::Decoration::Max; break; case glslang::EbtBlock: switch (type.getQualifier().storage) { case glslang::EvqShared: case glslang::EvqUniform: case glslang::EvqBuffer: switch (type.getQualifier().layoutPacking) { case glslang::ElpShared: return spv::Decoration::GLSLShared; case glslang::ElpPacked: return spv::Decoration::GLSLPacked; default: return spv::Decoration::Max; } case glslang::EvqVaryingIn: case glslang::EvqVaryingOut: if (type.getQualifier().isTaskMemory()) { switch (type.getQualifier().layoutPacking) { case glslang::ElpShared: return spv::Decoration::GLSLShared; case glslang::ElpPacked: return spv::Decoration::GLSLPacked; default: break; } } else { assert(type.getQualifier().layoutPacking == glslang::ElpNone); } return spv::Decoration::Max; case glslang::EvqPayload: case glslang::EvqPayloadIn: case glslang::EvqHitAttr: case glslang::EvqCallableData: case glslang::EvqCallableDataIn: case glslang::EvqHitObjectAttrNV: return spv::Decoration::Max; default: assert(0); return spv::Decoration::Max; } } } } // Translate glslang type to SPIR-V interpolation decorations. // Returns spv::Decoration::Max when no decoration // should be applied. spv::Decoration TGlslangToSpvTraverser::TranslateInterpolationDecoration(const glslang::TQualifier& qualifier) { if (qualifier.smooth) // Smooth decoration doesn't exist in SPIR-V 1.0 return spv::Decoration::Max; else if (qualifier.isNonPerspective()) return spv::Decoration::NoPerspective; else if (qualifier.flat) return spv::Decoration::Flat; else if (qualifier.isExplicitInterpolation()) { builder.addExtension(spv::E_SPV_AMD_shader_explicit_vertex_parameter); return spv::Decoration::ExplicitInterpAMD; } else return spv::Decoration::Max; } // Translate glslang type to SPIR-V auxiliary storage decorations. // Returns spv::Decoration::Max when no decoration // should be applied. spv::Decoration TGlslangToSpvTraverser::TranslateAuxiliaryStorageDecoration(const glslang::TQualifier& qualifier) { if (qualifier.centroid) return spv::Decoration::Centroid; else if (qualifier.patch) return spv::Decoration::Patch; else if (qualifier.sample) { builder.addCapability(spv::Capability::SampleRateShading); return spv::Decoration::Sample; } return spv::Decoration::Max; } // If glslang type is invariant, return SPIR-V invariant decoration. spv::Decoration TranslateInvariantDecoration(const glslang::TQualifier& qualifier) { if (qualifier.invariant) return spv::Decoration::Invariant; else return spv::Decoration::Max; } // If glslang type is noContraction, return SPIR-V NoContraction decoration. spv::Decoration TranslateNoContractionDecoration(const glslang::TQualifier& qualifier) { if (qualifier.isNoContraction()) return spv::Decoration::NoContraction; else return spv::Decoration::Max; } // If glslang type is nonUniform, return SPIR-V NonUniform decoration. spv::Decoration TGlslangToSpvTraverser::TranslateNonUniformDecoration(const glslang::TQualifier& qualifier) { if (qualifier.isNonUniform()) { builder.addIncorporatedExtension("SPV_EXT_descriptor_indexing", spv::Spv_1_5); builder.addCapability(spv::Capability::ShaderNonUniformEXT); return spv::Decoration::NonUniformEXT; } else return spv::Decoration::Max; } // If lvalue flags contains nonUniform, return SPIR-V NonUniform decoration. spv::Decoration TGlslangToSpvTraverser::TranslateNonUniformDecoration( const spv::Builder::AccessChain::CoherentFlags& coherentFlags) { if (coherentFlags.isNonUniform()) { builder.addIncorporatedExtension("SPV_EXT_descriptor_indexing", spv::Spv_1_5); builder.addCapability(spv::Capability::ShaderNonUniformEXT); return spv::Decoration::NonUniformEXT; } else return spv::Decoration::Max; } spv::MemoryAccessMask TGlslangToSpvTraverser::TranslateMemoryAccess( const spv::Builder::AccessChain::CoherentFlags &coherentFlags) { spv::MemoryAccessMask mask = spv::MemoryAccessMask::MaskNone; if (!glslangIntermediate->usingVulkanMemoryModel() || coherentFlags.isImage) return mask; if (coherentFlags.isVolatile() || coherentFlags.anyCoherent()) { mask = mask | spv::MemoryAccessMask::MakePointerAvailableKHR | spv::MemoryAccessMask::MakePointerVisibleKHR; } if (coherentFlags.nonprivate) { mask = mask | spv::MemoryAccessMask::NonPrivatePointerKHR; } if (coherentFlags.volatil) { mask = mask | spv::MemoryAccessMask::Volatile; } if (coherentFlags.nontemporal) { mask = mask | spv::MemoryAccessMask::Nontemporal; } if (mask != spv::MemoryAccessMask::MaskNone) { builder.addCapability(spv::Capability::VulkanMemoryModelKHR); } return mask; } spv::ImageOperandsMask TGlslangToSpvTraverser::TranslateImageOperands( const spv::Builder::AccessChain::CoherentFlags &coherentFlags) { spv::ImageOperandsMask mask = spv::ImageOperandsMask::MaskNone; if (!glslangIntermediate->usingVulkanMemoryModel()) return mask; if (coherentFlags.volatil || coherentFlags.anyCoherent()) { mask = mask | spv::ImageOperandsMask::MakeTexelAvailableKHR | spv::ImageOperandsMask::MakeTexelVisibleKHR; } if (coherentFlags.nonprivate) { mask = mask | spv::ImageOperandsMask::NonPrivateTexelKHR; } if (coherentFlags.volatil) { mask = mask | spv::ImageOperandsMask::VolatileTexelKHR; } if (coherentFlags.nontemporal && builder.getSpvVersion() >= spv::Spv_1_6) { mask = mask | spv::ImageOperandsMask::Nontemporal; } if (mask != spv::ImageOperandsMask::MaskNone) { builder.addCapability(spv::Capability::VulkanMemoryModelKHR); } return mask; } spv::Builder::AccessChain::CoherentFlags TGlslangToSpvTraverser::TranslateCoherent(const glslang::TType& type) { spv::Builder::AccessChain::CoherentFlags flags = {}; flags.coherent = type.getQualifier().coherent; flags.devicecoherent = type.getQualifier().devicecoherent; flags.queuefamilycoherent = type.getQualifier().queuefamilycoherent; // shared variables are implicitly workgroupcoherent in GLSL. flags.workgroupcoherent = type.getQualifier().workgroupcoherent || type.getQualifier().storage == glslang::EvqShared; flags.subgroupcoherent = type.getQualifier().subgroupcoherent; flags.shadercallcoherent = type.getQualifier().shadercallcoherent; flags.volatil = type.getQualifier().volatil; flags.nontemporal = type.getQualifier().nontemporal; // *coherent variables are implicitly nonprivate in GLSL flags.nonprivate = type.getQualifier().nonprivate || flags.anyCoherent() || flags.volatil; flags.isImage = type.getBasicType() == glslang::EbtSampler; flags.nonUniform = type.getQualifier().nonUniform; return flags; } spv::Scope TGlslangToSpvTraverser::TranslateMemoryScope( const spv::Builder::AccessChain::CoherentFlags &coherentFlags) { spv::Scope scope = spv::Scope::Max; if (coherentFlags.volatil || coherentFlags.coherent) { // coherent defaults to Device scope in the old model, QueueFamilyKHR scope in the new model scope = glslangIntermediate->usingVulkanMemoryModel() ? spv::Scope::QueueFamilyKHR : spv::Scope::Device; } else if (coherentFlags.devicecoherent) { scope = spv::Scope::Device; } else if (coherentFlags.queuefamilycoherent) { scope = spv::Scope::QueueFamilyKHR; } else if (coherentFlags.workgroupcoherent) { scope = spv::Scope::Workgroup; } else if (coherentFlags.subgroupcoherent) { scope = spv::Scope::Subgroup; } else if (coherentFlags.shadercallcoherent) { scope = spv::Scope::ShaderCallKHR; } if (glslangIntermediate->usingVulkanMemoryModel() && scope == spv::Scope::Device) { builder.addCapability(spv::Capability::VulkanMemoryModelDeviceScopeKHR); } return scope; } // Translate a glslang built-in variable to a SPIR-V built in decoration. Also generate // associated capabilities when required. For some built-in variables, a capability // is generated only when using the variable in an executable instruction, but not when // just declaring a struct member variable with it. This is true for PointSize, // ClipDistance, and CullDistance. spv::BuiltIn TGlslangToSpvTraverser::TranslateBuiltInDecoration(glslang::TBuiltInVariable builtIn, bool memberDeclaration) { switch (builtIn) { case glslang::EbvPointSize: // Defer adding the capability until the built-in is actually used. if (! memberDeclaration) { switch (glslangIntermediate->getStage()) { case EShLangGeometry: builder.addCapability(spv::Capability::GeometryPointSize); break; case EShLangTessControl: case EShLangTessEvaluation: builder.addCapability(spv::Capability::TessellationPointSize); break; default: break; } } return spv::BuiltIn::PointSize; case glslang::EbvPosition: return spv::BuiltIn::Position; case glslang::EbvVertexId: return spv::BuiltIn::VertexId; case glslang::EbvInstanceId: return spv::BuiltIn::InstanceId; case glslang::EbvVertexIndex: return spv::BuiltIn::VertexIndex; case glslang::EbvInstanceIndex: return spv::BuiltIn::InstanceIndex; case glslang::EbvFragCoord: return spv::BuiltIn::FragCoord; case glslang::EbvPointCoord: return spv::BuiltIn::PointCoord; case glslang::EbvFace: return spv::BuiltIn::FrontFacing; case glslang::EbvFragDepth: return spv::BuiltIn::FragDepth; case glslang::EbvNumWorkGroups: return spv::BuiltIn::NumWorkgroups; case glslang::EbvWorkGroupSize: return spv::BuiltIn::WorkgroupSize; case glslang::EbvWorkGroupId: return spv::BuiltIn::WorkgroupId; case glslang::EbvLocalInvocationId: return spv::BuiltIn::LocalInvocationId; case glslang::EbvLocalInvocationIndex: return spv::BuiltIn::LocalInvocationIndex; case glslang::EbvGlobalInvocationId: return spv::BuiltIn::GlobalInvocationId; // These *Distance capabilities logically belong here, but if the member is declared and // then never used, consumers of SPIR-V prefer the capability not be declared. // They are now generated when used, rather than here when declared. // Potentially, the specification should be more clear what the minimum // use needed is to trigger the capability. // case glslang::EbvClipDistance: if (!memberDeclaration) builder.addCapability(spv::Capability::ClipDistance); return spv::BuiltIn::ClipDistance; case glslang::EbvCullDistance: if (!memberDeclaration) builder.addCapability(spv::Capability::CullDistance); return spv::BuiltIn::CullDistance; case glslang::EbvViewportIndex: if (glslangIntermediate->getStage() == EShLangGeometry || glslangIntermediate->getStage() == EShLangFragment) { builder.addCapability(spv::Capability::MultiViewport); } if (glslangIntermediate->getStage() == EShLangVertex || glslangIntermediate->getStage() == EShLangTessControl || glslangIntermediate->getStage() == EShLangTessEvaluation) { if (builder.getSpvVersion() < spv::Spv_1_5) { builder.addIncorporatedExtension(spv::E_SPV_EXT_shader_viewport_index_layer, spv::Spv_1_5); builder.addCapability(spv::Capability::ShaderViewportIndexLayerEXT); } else builder.addCapability(spv::Capability::ShaderViewportIndex); } return spv::BuiltIn::ViewportIndex; case glslang::EbvSampleId: builder.addCapability(spv::Capability::SampleRateShading); return spv::BuiltIn::SampleId; case glslang::EbvSamplePosition: builder.addCapability(spv::Capability::SampleRateShading); return spv::BuiltIn::SamplePosition; case glslang::EbvSampleMask: return spv::BuiltIn::SampleMask; case glslang::EbvLayer: if (glslangIntermediate->getStage() == EShLangMesh) { return spv::BuiltIn::Layer; } if (glslangIntermediate->getStage() == EShLangGeometry || glslangIntermediate->getStage() == EShLangFragment) { builder.addCapability(spv::Capability::Geometry); } if (glslangIntermediate->getStage() == EShLangVertex || glslangIntermediate->getStage() == EShLangTessControl || glslangIntermediate->getStage() == EShLangTessEvaluation) { if (builder.getSpvVersion() < spv::Spv_1_5) { builder.addIncorporatedExtension(spv::E_SPV_EXT_shader_viewport_index_layer, spv::Spv_1_5); builder.addCapability(spv::Capability::ShaderViewportIndexLayerEXT); } else builder.addCapability(spv::Capability::ShaderLayer); } return spv::BuiltIn::Layer; case glslang::EbvBaseVertex: builder.addIncorporatedExtension(spv::E_SPV_KHR_shader_draw_parameters, spv::Spv_1_3); builder.addCapability(spv::Capability::DrawParameters); return spv::BuiltIn::BaseVertex; case glslang::EbvBaseInstance: builder.addIncorporatedExtension(spv::E_SPV_KHR_shader_draw_parameters, spv::Spv_1_3); builder.addCapability(spv::Capability::DrawParameters); return spv::BuiltIn::BaseInstance; case glslang::EbvDrawId: builder.addIncorporatedExtension(spv::E_SPV_KHR_shader_draw_parameters, spv::Spv_1_3); builder.addCapability(spv::Capability::DrawParameters); return spv::BuiltIn::DrawIndex; case glslang::EbvPrimitiveId: if (glslangIntermediate->getStage() == EShLangFragment) builder.addCapability(spv::Capability::Geometry); return spv::BuiltIn::PrimitiveId; case glslang::EbvFragStencilRef: builder.addExtension(spv::E_SPV_EXT_shader_stencil_export); builder.addCapability(spv::Capability::StencilExportEXT); return spv::BuiltIn::FragStencilRefEXT; case glslang::EbvShadingRateKHR: builder.addExtension(spv::E_SPV_KHR_fragment_shading_rate); builder.addCapability(spv::Capability::FragmentShadingRateKHR); return spv::BuiltIn::ShadingRateKHR; case glslang::EbvPrimitiveShadingRateKHR: builder.addExtension(spv::E_SPV_KHR_fragment_shading_rate); builder.addCapability(spv::Capability::FragmentShadingRateKHR); return spv::BuiltIn::PrimitiveShadingRateKHR; case glslang::EbvInvocationId: return spv::BuiltIn::InvocationId; case glslang::EbvTessLevelInner: return spv::BuiltIn::TessLevelInner; case glslang::EbvTessLevelOuter: return spv::BuiltIn::TessLevelOuter; case glslang::EbvTessCoord: return spv::BuiltIn::TessCoord; case glslang::EbvPatchVertices: return spv::BuiltIn::PatchVertices; case glslang::EbvHelperInvocation: return spv::BuiltIn::HelperInvocation; case glslang::EbvSubGroupSize: builder.addExtension(spv::E_SPV_KHR_shader_ballot); builder.addCapability(spv::Capability::SubgroupBallotKHR); return spv::BuiltIn::SubgroupSize; case glslang::EbvSubGroupInvocation: builder.addExtension(spv::E_SPV_KHR_shader_ballot); builder.addCapability(spv::Capability::SubgroupBallotKHR); return spv::BuiltIn::SubgroupLocalInvocationId; case glslang::EbvSubGroupEqMask: builder.addExtension(spv::E_SPV_KHR_shader_ballot); builder.addCapability(spv::Capability::SubgroupBallotKHR); return spv::BuiltIn::SubgroupEqMask; case glslang::EbvSubGroupGeMask: builder.addExtension(spv::E_SPV_KHR_shader_ballot); builder.addCapability(spv::Capability::SubgroupBallotKHR); return spv::BuiltIn::SubgroupGeMask; case glslang::EbvSubGroupGtMask: builder.addExtension(spv::E_SPV_KHR_shader_ballot); builder.addCapability(spv::Capability::SubgroupBallotKHR); return spv::BuiltIn::SubgroupGtMask; case glslang::EbvSubGroupLeMask: builder.addExtension(spv::E_SPV_KHR_shader_ballot); builder.addCapability(spv::Capability::SubgroupBallotKHR); return spv::BuiltIn::SubgroupLeMask; case glslang::EbvSubGroupLtMask: builder.addExtension(spv::E_SPV_KHR_shader_ballot); builder.addCapability(spv::Capability::SubgroupBallotKHR); return spv::BuiltIn::SubgroupLtMask; case glslang::EbvNumSubgroups: builder.addCapability(spv::Capability::GroupNonUniform); return spv::BuiltIn::NumSubgroups; case glslang::EbvSubgroupID: builder.addCapability(spv::Capability::GroupNonUniform); return spv::BuiltIn::SubgroupId; case glslang::EbvSubgroupSize2: builder.addCapability(spv::Capability::GroupNonUniform); return spv::BuiltIn::SubgroupSize; case glslang::EbvSubgroupInvocation2: builder.addCapability(spv::Capability::GroupNonUniform); return spv::BuiltIn::SubgroupLocalInvocationId; case glslang::EbvSubgroupEqMask2: builder.addCapability(spv::Capability::GroupNonUniform); builder.addCapability(spv::Capability::GroupNonUniformBallot); return spv::BuiltIn::SubgroupEqMask; case glslang::EbvSubgroupGeMask2: builder.addCapability(spv::Capability::GroupNonUniform); builder.addCapability(spv::Capability::GroupNonUniformBallot); return spv::BuiltIn::SubgroupGeMask; case glslang::EbvSubgroupGtMask2: builder.addCapability(spv::Capability::GroupNonUniform); builder.addCapability(spv::Capability::GroupNonUniformBallot); return spv::BuiltIn::SubgroupGtMask; case glslang::EbvSubgroupLeMask2: builder.addCapability(spv::Capability::GroupNonUniform); builder.addCapability(spv::Capability::GroupNonUniformBallot); return spv::BuiltIn::SubgroupLeMask; case glslang::EbvSubgroupLtMask2: builder.addCapability(spv::Capability::GroupNonUniform); builder.addCapability(spv::Capability::GroupNonUniformBallot); return spv::BuiltIn::SubgroupLtMask; case glslang::EbvBaryCoordNoPersp: builder.addExtension(spv::E_SPV_AMD_shader_explicit_vertex_parameter); return spv::BuiltIn::BaryCoordNoPerspAMD; case glslang::EbvBaryCoordNoPerspCentroid: builder.addExtension(spv::E_SPV_AMD_shader_explicit_vertex_parameter); return spv::BuiltIn::BaryCoordNoPerspCentroidAMD; case glslang::EbvBaryCoordNoPerspSample: builder.addExtension(spv::E_SPV_AMD_shader_explicit_vertex_parameter); return spv::BuiltIn::BaryCoordNoPerspSampleAMD; case glslang::EbvBaryCoordSmooth: builder.addExtension(spv::E_SPV_AMD_shader_explicit_vertex_parameter); return spv::BuiltIn::BaryCoordSmoothAMD; case glslang::EbvBaryCoordSmoothCentroid: builder.addExtension(spv::E_SPV_AMD_shader_explicit_vertex_parameter); return spv::BuiltIn::BaryCoordSmoothCentroidAMD; case glslang::EbvBaryCoordSmoothSample: builder.addExtension(spv::E_SPV_AMD_shader_explicit_vertex_parameter); return spv::BuiltIn::BaryCoordSmoothSampleAMD; case glslang::EbvBaryCoordPullModel: builder.addExtension(spv::E_SPV_AMD_shader_explicit_vertex_parameter); return spv::BuiltIn::BaryCoordPullModelAMD; case glslang::EbvDeviceIndex: builder.addIncorporatedExtension(spv::E_SPV_KHR_device_group, spv::Spv_1_3); builder.addCapability(spv::Capability::DeviceGroup); return spv::BuiltIn::DeviceIndex; case glslang::EbvViewIndex: builder.addIncorporatedExtension(spv::E_SPV_KHR_multiview, spv::Spv_1_3); builder.addCapability(spv::Capability::MultiView); return spv::BuiltIn::ViewIndex; case glslang::EbvFragSizeEXT: builder.addExtension(spv::E_SPV_EXT_fragment_invocation_density); builder.addCapability(spv::Capability::FragmentDensityEXT); return spv::BuiltIn::FragSizeEXT; case glslang::EbvFragInvocationCountEXT: builder.addExtension(spv::E_SPV_EXT_fragment_invocation_density); builder.addCapability(spv::Capability::FragmentDensityEXT); return spv::BuiltIn::FragInvocationCountEXT; case glslang::EbvViewportMaskNV: if (!memberDeclaration) { builder.addExtension(spv::E_SPV_NV_viewport_array2); builder.addCapability(spv::Capability::ShaderViewportMaskNV); } return spv::BuiltIn::ViewportMaskNV; case glslang::EbvSecondaryPositionNV: if (!memberDeclaration) { builder.addExtension(spv::E_SPV_NV_stereo_view_rendering); builder.addCapability(spv::Capability::ShaderStereoViewNV); } return spv::BuiltIn::SecondaryPositionNV; case glslang::EbvSecondaryViewportMaskNV: if (!memberDeclaration) { builder.addExtension(spv::E_SPV_NV_stereo_view_rendering); builder.addCapability(spv::Capability::ShaderStereoViewNV); } return spv::BuiltIn::SecondaryViewportMaskNV; case glslang::EbvPositionPerViewNV: if (!memberDeclaration) { builder.addExtension(spv::E_SPV_NVX_multiview_per_view_attributes); builder.addCapability(spv::Capability::PerViewAttributesNV); } return spv::BuiltIn::PositionPerViewNV; case glslang::EbvViewportMaskPerViewNV: if (!memberDeclaration) { builder.addExtension(spv::E_SPV_NVX_multiview_per_view_attributes); builder.addCapability(spv::Capability::PerViewAttributesNV); } return spv::BuiltIn::ViewportMaskPerViewNV; case glslang::EbvFragFullyCoveredNV: builder.addExtension(spv::E_SPV_EXT_fragment_fully_covered); builder.addCapability(spv::Capability::FragmentFullyCoveredEXT); return spv::BuiltIn::FullyCoveredEXT; case glslang::EbvFragmentSizeNV: builder.addExtension(spv::E_SPV_NV_shading_rate); builder.addCapability(spv::Capability::ShadingRateNV); return spv::BuiltIn::FragmentSizeNV; case glslang::EbvInvocationsPerPixelNV: builder.addExtension(spv::E_SPV_NV_shading_rate); builder.addCapability(spv::Capability::ShadingRateNV); return spv::BuiltIn::InvocationsPerPixelNV; // ray tracing case glslang::EbvLaunchId: return spv::BuiltIn::LaunchIdKHR; case glslang::EbvLaunchSize: return spv::BuiltIn::LaunchSizeKHR; case glslang::EbvWorldRayOrigin: return spv::BuiltIn::WorldRayOriginKHR; case glslang::EbvWorldRayDirection: return spv::BuiltIn::WorldRayDirectionKHR; case glslang::EbvObjectRayOrigin: return spv::BuiltIn::ObjectRayOriginKHR; case glslang::EbvObjectRayDirection: return spv::BuiltIn::ObjectRayDirectionKHR; case glslang::EbvRayTmin: return spv::BuiltIn::RayTminKHR; case glslang::EbvRayTmax: return spv::BuiltIn::RayTmaxKHR; case glslang::EbvCullMask: return spv::BuiltIn::CullMaskKHR; case glslang::EbvPositionFetch: return spv::BuiltIn::HitTriangleVertexPositionsKHR; case glslang::EbvInstanceCustomIndex: return spv::BuiltIn::InstanceCustomIndexKHR; case glslang::EbvHitKind: return spv::BuiltIn::HitKindKHR; case glslang::EbvObjectToWorld: case glslang::EbvObjectToWorld3x4: return spv::BuiltIn::ObjectToWorldKHR; case glslang::EbvWorldToObject: case glslang::EbvWorldToObject3x4: return spv::BuiltIn::WorldToObjectKHR; case glslang::EbvIncomingRayFlags: return spv::BuiltIn::IncomingRayFlagsKHR; case glslang::EbvGeometryIndex: return spv::BuiltIn::RayGeometryIndexKHR; case glslang::EbvCurrentRayTimeNV: builder.addExtension(spv::E_SPV_NV_ray_tracing_motion_blur); builder.addCapability(spv::Capability::RayTracingMotionBlurNV); return spv::BuiltIn::CurrentRayTimeNV; case glslang::EbvMicroTrianglePositionNV: builder.addCapability(spv::Capability::RayTracingDisplacementMicromapNV); builder.addExtension("SPV_NV_displacement_micromap"); return spv::BuiltIn::HitMicroTriangleVertexPositionsNV; case glslang::EbvMicroTriangleBaryNV: builder.addCapability(spv::Capability::RayTracingDisplacementMicromapNV); builder.addExtension("SPV_NV_displacement_micromap"); return spv::BuiltIn::HitMicroTriangleVertexBarycentricsNV; case glslang::EbvHitKindFrontFacingMicroTriangleNV: builder.addCapability(spv::Capability::RayTracingDisplacementMicromapNV); builder.addExtension("SPV_NV_displacement_micromap"); return spv::BuiltIn::HitKindFrontFacingMicroTriangleNV; case glslang::EbvHitKindBackFacingMicroTriangleNV: builder.addCapability(spv::Capability::RayTracingDisplacementMicromapNV); builder.addExtension("SPV_NV_displacement_micromap"); return spv::BuiltIn::HitKindBackFacingMicroTriangleNV; case glslang::EbvClusterIDNV: builder.addCapability(spv::Capability::RayTracingClusterAccelerationStructureNV); builder.addExtension("SPV_NV_cluster_acceleration_structure"); return spv::BuiltIn::ClusterIDNV; case glslang::EbvHitIsSphereNV: builder.addCapability(spv::Capability::RayTracingSpheresGeometryNV); builder.addExtension("SPV_NV_linear_swept_spheres"); return spv::BuiltIn::HitIsSphereNV; case glslang::EbvHitIsLSSNV: builder.addCapability(spv::Capability::RayTracingLinearSweptSpheresGeometryNV); builder.addExtension("SPV_NV_linear_swept_spheres"); return spv::BuiltIn::HitIsLSSNV; case glslang::EbvHitSpherePositionNV: builder.addCapability(spv::Capability::RayTracingSpheresGeometryNV); builder.addExtension("SPV_NV_linear_swept_spheres"); return spv::BuiltIn::HitSpherePositionNV; case glslang::EbvHitSphereRadiusNV: builder.addCapability(spv::Capability::RayTracingSpheresGeometryNV); builder.addExtension("SPV_NV_linear_swept_spheres"); return spv::BuiltIn::HitSphereRadiusNV; case glslang::EbvHitLSSPositionsNV: builder.addCapability(spv::Capability::RayTracingLinearSweptSpheresGeometryNV); builder.addExtension("SPV_NV_linear_swept_spheres"); return spv::BuiltIn::HitLSSPositionsNV; case glslang::EbvHitLSSRadiiNV: builder.addCapability(spv::Capability::RayTracingLinearSweptSpheresGeometryNV); builder.addExtension("SPV_NV_linear_swept_spheres"); return spv::BuiltIn::HitLSSRadiiNV; // barycentrics case glslang::EbvBaryCoordNV: builder.addExtension(spv::E_SPV_NV_fragment_shader_barycentric); builder.addCapability(spv::Capability::FragmentBarycentricNV); return spv::BuiltIn::BaryCoordNV; case glslang::EbvBaryCoordNoPerspNV: builder.addExtension(spv::E_SPV_NV_fragment_shader_barycentric); builder.addCapability(spv::Capability::FragmentBarycentricNV); return spv::BuiltIn::BaryCoordNoPerspNV; case glslang::EbvBaryCoordEXT: builder.addExtension(spv::E_SPV_KHR_fragment_shader_barycentric); builder.addCapability(spv::Capability::FragmentBarycentricKHR); return spv::BuiltIn::BaryCoordKHR; case glslang::EbvBaryCoordNoPerspEXT: builder.addExtension(spv::E_SPV_KHR_fragment_shader_barycentric); builder.addCapability(spv::Capability::FragmentBarycentricKHR); return spv::BuiltIn::BaryCoordNoPerspKHR; // mesh shaders case glslang::EbvTaskCountNV: return spv::BuiltIn::TaskCountNV; case glslang::EbvPrimitiveCountNV: return spv::BuiltIn::PrimitiveCountNV; case glslang::EbvPrimitiveIndicesNV: return spv::BuiltIn::PrimitiveIndicesNV; case glslang::EbvClipDistancePerViewNV: return spv::BuiltIn::ClipDistancePerViewNV; case glslang::EbvCullDistancePerViewNV: return spv::BuiltIn::CullDistancePerViewNV; case glslang::EbvLayerPerViewNV: return spv::BuiltIn::LayerPerViewNV; case glslang::EbvMeshViewCountNV: return spv::BuiltIn::MeshViewCountNV; case glslang::EbvMeshViewIndicesNV: return spv::BuiltIn::MeshViewIndicesNV; // SPV_EXT_mesh_shader case glslang::EbvPrimitivePointIndicesEXT: return spv::BuiltIn::PrimitivePointIndicesEXT; case glslang::EbvPrimitiveLineIndicesEXT: return spv::BuiltIn::PrimitiveLineIndicesEXT; case glslang::EbvPrimitiveTriangleIndicesEXT: return spv::BuiltIn::PrimitiveTriangleIndicesEXT; case glslang::EbvCullPrimitiveEXT: return spv::BuiltIn::CullPrimitiveEXT; // sm builtins case glslang::EbvWarpsPerSM: builder.addExtension(spv::E_SPV_NV_shader_sm_builtins); builder.addCapability(spv::Capability::ShaderSMBuiltinsNV); return spv::BuiltIn::WarpsPerSMNV; case glslang::EbvSMCount: builder.addExtension(spv::E_SPV_NV_shader_sm_builtins); builder.addCapability(spv::Capability::ShaderSMBuiltinsNV); return spv::BuiltIn::SMCountNV; case glslang::EbvWarpID: builder.addExtension(spv::E_SPV_NV_shader_sm_builtins); builder.addCapability(spv::Capability::ShaderSMBuiltinsNV); return spv::BuiltIn::WarpIDNV; case glslang::EbvSMID: builder.addExtension(spv::E_SPV_NV_shader_sm_builtins); builder.addCapability(spv::Capability::ShaderSMBuiltinsNV); return spv::BuiltIn::SMIDNV; // ARM builtins case glslang::EbvCoreCountARM: builder.addExtension(spv::E_SPV_ARM_core_builtins); builder.addCapability(spv::Capability::CoreBuiltinsARM); return spv::BuiltIn::CoreCountARM; case glslang::EbvCoreIDARM: builder.addExtension(spv::E_SPV_ARM_core_builtins); builder.addCapability(spv::Capability::CoreBuiltinsARM); return spv::BuiltIn::CoreIDARM; case glslang::EbvCoreMaxIDARM: builder.addExtension(spv::E_SPV_ARM_core_builtins); builder.addCapability(spv::Capability::CoreBuiltinsARM); return spv::BuiltIn::CoreMaxIDARM; case glslang::EbvWarpIDARM: builder.addExtension(spv::E_SPV_ARM_core_builtins); builder.addCapability(spv::Capability::CoreBuiltinsARM); return spv::BuiltIn::WarpIDARM; case glslang::EbvWarpMaxIDARM: builder.addExtension(spv::E_SPV_ARM_core_builtins); builder.addCapability(spv::Capability::CoreBuiltinsARM); return spv::BuiltIn::WarpMaxIDARM; // QCOM builtins case glslang::EbvTileOffsetQCOM: builder.addExtension(spv::E_SPV_QCOM_tile_shading); return spv::BuiltIn::TileOffsetQCOM; case glslang::EbvTileDimensionQCOM: builder.addExtension(spv::E_SPV_QCOM_tile_shading); return spv::BuiltIn::TileDimensionQCOM; case glslang::EbvTileApronSizeQCOM: builder.addExtension(spv::E_SPV_QCOM_tile_shading); return spv::BuiltIn::TileApronSizeQCOM; default: return spv::BuiltIn::Max; } } // Translate glslang image layout format to SPIR-V image format. spv::ImageFormat TGlslangToSpvTraverser::TranslateImageFormat(const glslang::TType& type) { assert(type.getBasicType() == glslang::EbtSampler); // Check for capabilities switch (type.getQualifier().getFormat()) { case glslang::ElfRg32f: case glslang::ElfRg16f: case glslang::ElfR11fG11fB10f: case glslang::ElfR16f: case glslang::ElfRgba16: case glslang::ElfRgb10A2: case glslang::ElfRg16: case glslang::ElfRg8: case glslang::ElfR16: case glslang::ElfR8: case glslang::ElfRgba16Snorm: case glslang::ElfRg16Snorm: case glslang::ElfRg8Snorm: case glslang::ElfR16Snorm: case glslang::ElfR8Snorm: case glslang::ElfRg32i: case glslang::ElfRg16i: case glslang::ElfRg8i: case glslang::ElfR16i: case glslang::ElfR8i: case glslang::ElfRgb10a2ui: case glslang::ElfRg32ui: case glslang::ElfRg16ui: case glslang::ElfRg8ui: case glslang::ElfR16ui: case glslang::ElfR8ui: builder.addCapability(spv::Capability::StorageImageExtendedFormats); break; case glslang::ElfR64ui: case glslang::ElfR64i: builder.addExtension(spv::E_SPV_EXT_shader_image_int64); builder.addCapability(spv::Capability::Int64ImageEXT); break; default: break; } // do the translation switch (type.getQualifier().getFormat()) { case glslang::ElfNone: return spv::ImageFormat::Unknown; case glslang::ElfRgba32f: return spv::ImageFormat::Rgba32f; case glslang::ElfRgba16f: return spv::ImageFormat::Rgba16f; case glslang::ElfR32f: return spv::ImageFormat::R32f; case glslang::ElfRgba8: return spv::ImageFormat::Rgba8; case glslang::ElfRgba8Snorm: return spv::ImageFormat::Rgba8Snorm; case glslang::ElfRg32f: return spv::ImageFormat::Rg32f; case glslang::ElfRg16f: return spv::ImageFormat::Rg16f; case glslang::ElfR11fG11fB10f: return spv::ImageFormat::R11fG11fB10f; case glslang::ElfR16f: return spv::ImageFormat::R16f; case glslang::ElfRgba16: return spv::ImageFormat::Rgba16; case glslang::ElfRgb10A2: return spv::ImageFormat::Rgb10A2; case glslang::ElfRg16: return spv::ImageFormat::Rg16; case glslang::ElfRg8: return spv::ImageFormat::Rg8; case glslang::ElfR16: return spv::ImageFormat::R16; case glslang::ElfR8: return spv::ImageFormat::R8; case glslang::ElfRgba16Snorm: return spv::ImageFormat::Rgba16Snorm; case glslang::ElfRg16Snorm: return spv::ImageFormat::Rg16Snorm; case glslang::ElfRg8Snorm: return spv::ImageFormat::Rg8Snorm; case glslang::ElfR16Snorm: return spv::ImageFormat::R16Snorm; case glslang::ElfR8Snorm: return spv::ImageFormat::R8Snorm; case glslang::ElfRgba32i: return spv::ImageFormat::Rgba32i; case glslang::ElfRgba16i: return spv::ImageFormat::Rgba16i; case glslang::ElfRgba8i: return spv::ImageFormat::Rgba8i; case glslang::ElfR32i: return spv::ImageFormat::R32i; case glslang::ElfRg32i: return spv::ImageFormat::Rg32i; case glslang::ElfRg16i: return spv::ImageFormat::Rg16i; case glslang::ElfRg8i: return spv::ImageFormat::Rg8i; case glslang::ElfR16i: return spv::ImageFormat::R16i; case glslang::ElfR8i: return spv::ImageFormat::R8i; case glslang::ElfRgba32ui: return spv::ImageFormat::Rgba32ui; case glslang::ElfRgba16ui: return spv::ImageFormat::Rgba16ui; case glslang::ElfRgba8ui: return spv::ImageFormat::Rgba8ui; case glslang::ElfR32ui: return spv::ImageFormat::R32ui; case glslang::ElfRg32ui: return spv::ImageFormat::Rg32ui; case glslang::ElfRg16ui: return spv::ImageFormat::Rg16ui; case glslang::ElfRgb10a2ui: return spv::ImageFormat::Rgb10a2ui; case glslang::ElfRg8ui: return spv::ImageFormat::Rg8ui; case glslang::ElfR16ui: return spv::ImageFormat::R16ui; case glslang::ElfR8ui: return spv::ImageFormat::R8ui; case glslang::ElfR64ui: return spv::ImageFormat::R64ui; case glslang::ElfR64i: return spv::ImageFormat::R64i; default: return spv::ImageFormat::Max; } } spv::SelectionControlMask TGlslangToSpvTraverser::TranslateSelectionControl( const glslang::TIntermSelection& selectionNode) const { if (selectionNode.getFlatten()) return spv::SelectionControlMask::Flatten; if (selectionNode.getDontFlatten()) return spv::SelectionControlMask::DontFlatten; return spv::SelectionControlMask::MaskNone; } spv::SelectionControlMask TGlslangToSpvTraverser::TranslateSwitchControl(const glslang::TIntermSwitch& switchNode) const { if (switchNode.getFlatten()) return spv::SelectionControlMask::Flatten; if (switchNode.getDontFlatten()) return spv::SelectionControlMask::DontFlatten; return spv::SelectionControlMask::MaskNone; } // return a non-0 dependency if the dependency argument must be set spv::LoopControlMask TGlslangToSpvTraverser::TranslateLoopControl(const glslang::TIntermLoop& loopNode, std::vector& operands) const { spv::LoopControlMask control = spv::LoopControlMask::MaskNone; if (loopNode.getDontUnroll()) control = control | spv::LoopControlMask::DontUnroll; if (loopNode.getUnroll()) control = control | spv::LoopControlMask::Unroll; if (unsigned(loopNode.getLoopDependency()) == glslang::TIntermLoop::dependencyInfinite) control = control | spv::LoopControlMask::DependencyInfinite; else if (loopNode.getLoopDependency() > 0) { control = control | spv::LoopControlMask::DependencyLength; operands.push_back((unsigned int)loopNode.getLoopDependency()); } if (glslangIntermediate->getSpv().spv >= glslang::EShTargetSpv_1_4) { if (loopNode.getMinIterations() > 0) { control = control | spv::LoopControlMask::MinIterations; operands.push_back(loopNode.getMinIterations()); } if (loopNode.getMaxIterations() < glslang::TIntermLoop::iterationsInfinite) { control = control | spv::LoopControlMask::MaxIterations; operands.push_back(loopNode.getMaxIterations()); } if (loopNode.getIterationMultiple() > 1) { control = control | spv::LoopControlMask::IterationMultiple; operands.push_back(loopNode.getIterationMultiple()); } if (loopNode.getPeelCount() > 0) { control = control | spv::LoopControlMask::PeelCount; operands.push_back(loopNode.getPeelCount()); } if (loopNode.getPartialCount() > 0) { control = control | spv::LoopControlMask::PartialCount; operands.push_back(loopNode.getPartialCount()); } } return control; } // Translate glslang type to SPIR-V storage class. spv::StorageClass TGlslangToSpvTraverser::TranslateStorageClass(const glslang::TType& type) { if (type.getBasicType() == glslang::EbtRayQuery || type.getBasicType() == glslang::EbtHitObjectNV) return spv::StorageClass::Private; if (type.getQualifier().isSpirvByReference()) { if (type.getQualifier().isParamInput() || type.getQualifier().isParamOutput()) return spv::StorageClass::Function; } if (type.getQualifier().isPipeInput()) return spv::StorageClass::Input; if (type.getQualifier().isPipeOutput()) return spv::StorageClass::Output; if (type.getQualifier().storage == glslang::EvqTileImageEXT || type.isAttachmentEXT()) { builder.addExtension(spv::E_SPV_EXT_shader_tile_image); builder.addCapability(spv::Capability::TileImageColorReadAccessEXT); return spv::StorageClass::TileImageEXT; } if (type.getQualifier().isTileAttachmentQCOM()) { builder.addExtension(spv::E_SPV_QCOM_tile_shading); builder.addCapability(spv::Capability::TileShadingQCOM); return spv::StorageClass::TileAttachmentQCOM; } if (glslangIntermediate->getSource() != glslang::EShSourceHlsl || type.getQualifier().storage == glslang::EvqUniform) { if (type.isAtomic()) return spv::StorageClass::AtomicCounter; if (type.containsOpaque() && !glslangIntermediate->getBindlessMode()) return spv::StorageClass::UniformConstant; } if (type.getQualifier().isUniformOrBuffer() && type.getQualifier().isShaderRecord()) { return spv::StorageClass::ShaderRecordBufferKHR; } if (glslangIntermediate->usingStorageBuffer() && type.getQualifier().storage == glslang::EvqBuffer) { builder.addIncorporatedExtension(spv::E_SPV_KHR_storage_buffer_storage_class, spv::Spv_1_3); return spv::StorageClass::StorageBuffer; } if (type.getQualifier().isUniformOrBuffer()) { if (type.getQualifier().isPushConstant()) return spv::StorageClass::PushConstant; if (type.getBasicType() == glslang::EbtBlock) return spv::StorageClass::Uniform; return spv::StorageClass::UniformConstant; } if (type.getQualifier().storage == glslang::EvqShared && type.getBasicType() == glslang::EbtBlock) { builder.addExtension(spv::E_SPV_KHR_workgroup_memory_explicit_layout); builder.addCapability(spv::Capability::WorkgroupMemoryExplicitLayoutKHR); return spv::StorageClass::Workgroup; } switch (type.getQualifier().storage) { case glslang::EvqGlobal: return spv::StorageClass::Private; case glslang::EvqConstReadOnly: return spv::StorageClass::Function; case glslang::EvqTemporary: return spv::StorageClass::Function; case glslang::EvqShared: return spv::StorageClass::Workgroup; case glslang::EvqPayload: return spv::StorageClass::RayPayloadKHR; case glslang::EvqPayloadIn: return spv::StorageClass::IncomingRayPayloadKHR; case glslang::EvqHitAttr: return spv::StorageClass::HitAttributeKHR; case glslang::EvqCallableData: return spv::StorageClass::CallableDataKHR; case glslang::EvqCallableDataIn: return spv::StorageClass::IncomingCallableDataKHR; case glslang::EvqtaskPayloadSharedEXT : return spv::StorageClass::TaskPayloadWorkgroupEXT; case glslang::EvqHitObjectAttrNV: return spv::StorageClass::HitObjectAttributeNV; case glslang::EvqSpirvStorageClass: return static_cast(type.getQualifier().spirvStorageClass); default: assert(0); break; } return spv::StorageClass::Function; } // Translate glslang constants to SPIR-V literals void TGlslangToSpvTraverser::TranslateLiterals(const glslang::TVector& constants, std::vector& literals) const { for (auto constant : constants) { if (constant->getBasicType() == glslang::EbtFloat) { float floatValue = static_cast(constant->getConstArray()[0].getDConst()); unsigned literal; static_assert(sizeof(literal) == sizeof(floatValue), "sizeof(unsigned) != sizeof(float)"); memcpy(&literal, &floatValue, sizeof(literal)); literals.push_back(literal); } else if (constant->getBasicType() == glslang::EbtInt) { unsigned literal = constant->getConstArray()[0].getIConst(); literals.push_back(literal); } else if (constant->getBasicType() == glslang::EbtUint) { unsigned literal = constant->getConstArray()[0].getUConst(); literals.push_back(literal); } else if (constant->getBasicType() == glslang::EbtBool) { unsigned literal = constant->getConstArray()[0].getBConst(); literals.push_back(literal); } else if (constant->getBasicType() == glslang::EbtString) { auto str = constant->getConstArray()[0].getSConst()->c_str(); unsigned literal = 0; char* literalPtr = reinterpret_cast(&literal); unsigned charCount = 0; char ch = 0; do { ch = *(str++); *(literalPtr++) = ch; ++charCount; if (charCount == 4) { literals.push_back(literal); literalPtr = reinterpret_cast(&literal); charCount = 0; } } while (ch != 0); // Partial literal is padded with 0 if (charCount > 0) { for (; charCount < 4; ++charCount) *(literalPtr++) = 0; literals.push_back(literal); } } else assert(0); // Unexpected type } } // Add capabilities pertaining to how an array is indexed. void TGlslangToSpvTraverser::addIndirectionIndexCapabilities(const glslang::TType& baseType, const glslang::TType& indexType) { if (indexType.getQualifier().isNonUniform()) { // deal with an asserted non-uniform index // SPV_EXT_descriptor_indexing already added in TranslateNonUniformDecoration if (baseType.getBasicType() == glslang::EbtSampler) { if (baseType.getQualifier().hasAttachment()) builder.addCapability(spv::Capability::InputAttachmentArrayNonUniformIndexingEXT); else if (baseType.isImage() && baseType.getSampler().isBuffer()) builder.addCapability(spv::Capability::StorageTexelBufferArrayNonUniformIndexingEXT); else if (baseType.isTexture() && baseType.getSampler().isBuffer()) builder.addCapability(spv::Capability::UniformTexelBufferArrayNonUniformIndexingEXT); else if (baseType.isImage()) builder.addCapability(spv::Capability::StorageImageArrayNonUniformIndexingEXT); else if (baseType.isTexture()) builder.addCapability(spv::Capability::SampledImageArrayNonUniformIndexingEXT); } else if (baseType.getBasicType() == glslang::EbtBlock) { if (baseType.getQualifier().storage == glslang::EvqBuffer) builder.addCapability(spv::Capability::StorageBufferArrayNonUniformIndexingEXT); else if (baseType.getQualifier().storage == glslang::EvqUniform) builder.addCapability(spv::Capability::UniformBufferArrayNonUniformIndexingEXT); } } else { // assume a dynamically uniform index if (baseType.getBasicType() == glslang::EbtSampler) { if (baseType.getQualifier().hasAttachment()) { builder.addIncorporatedExtension("SPV_EXT_descriptor_indexing", spv::Spv_1_5); builder.addCapability(spv::Capability::InputAttachmentArrayDynamicIndexingEXT); } else if (baseType.isImage() && baseType.getSampler().isBuffer()) { builder.addIncorporatedExtension("SPV_EXT_descriptor_indexing", spv::Spv_1_5); builder.addCapability(spv::Capability::StorageTexelBufferArrayDynamicIndexingEXT); } else if (baseType.isTexture() && baseType.getSampler().isBuffer()) { builder.addIncorporatedExtension("SPV_EXT_descriptor_indexing", spv::Spv_1_5); builder.addCapability(spv::Capability::UniformTexelBufferArrayDynamicIndexingEXT); } } } } // Return whether or not the given type is something that should be tied to a // descriptor set. bool IsDescriptorResource(const glslang::TType& type) { // uniform and buffer blocks are included, unless it is a push_constant if (type.getBasicType() == glslang::EbtBlock) return type.getQualifier().isUniformOrBuffer() && ! type.getQualifier().isShaderRecord() && ! type.getQualifier().isPushConstant(); // non block... // basically samplerXXX/subpass/sampler/texture are all included // if they are the global-scope-class, not the function parameter // (or local, if they ever exist) class. if (type.getBasicType() == glslang::EbtSampler || type.getBasicType() == glslang::EbtAccStruct) return type.getQualifier().isUniformOrBuffer(); // None of the above. return false; } void InheritQualifiers(glslang::TQualifier& child, const glslang::TQualifier& parent) { if (child.layoutMatrix == glslang::ElmNone) child.layoutMatrix = parent.layoutMatrix; if (parent.invariant) child.invariant = true; if (parent.flat) child.flat = true; if (parent.centroid) child.centroid = true; if (parent.nopersp) child.nopersp = true; if (parent.explicitInterp) child.explicitInterp = true; if (parent.perPrimitiveNV) child.perPrimitiveNV = true; if (parent.perViewNV) child.perViewNV = true; if (parent.perTaskNV) child.perTaskNV = true; if (parent.storage == glslang::EvqtaskPayloadSharedEXT) child.storage = glslang::EvqtaskPayloadSharedEXT; if (parent.patch) child.patch = true; if (parent.sample) child.sample = true; if (parent.coherent) child.coherent = true; if (parent.devicecoherent) child.devicecoherent = true; if (parent.queuefamilycoherent) child.queuefamilycoherent = true; if (parent.workgroupcoherent) child.workgroupcoherent = true; if (parent.subgroupcoherent) child.subgroupcoherent = true; if (parent.shadercallcoherent) child.shadercallcoherent = true; if (parent.nonprivate) child.nonprivate = true; if (parent.volatil) child.volatil = true; if (parent.nontemporal) child.nontemporal = true; if (parent.restrict) child.restrict = true; if (parent.readonly) child.readonly = true; if (parent.writeonly) child.writeonly = true; if (parent.nonUniform) child.nonUniform = true; } bool HasNonLayoutQualifiers(const glslang::TType& type, const glslang::TQualifier& qualifier) { // This should list qualifiers that simultaneous satisfy: // - struct members might inherit from a struct declaration // (note that non-block structs don't explicitly inherit, // only implicitly, meaning no decoration involved) // - affect decorations on the struct members // (note smooth does not, and expecting something like volatile // to effect the whole object) // - are not part of the offset/st430/etc or row/column-major layout return qualifier.invariant || (qualifier.hasLocation() && type.getBasicType() == glslang::EbtBlock); } // // Implement the TGlslangToSpvTraverser class. // TGlslangToSpvTraverser::TGlslangToSpvTraverser(unsigned int spvVersion, const glslang::TIntermediate* glslangIntermediate, spv::SpvBuildLogger* buildLogger, glslang::SpvOptions& options) : TIntermTraverser(true, false, true), options(options), shaderEntry(nullptr), currentFunction(nullptr), sequenceDepth(0), logger(buildLogger), builder(spvVersion, (glslang::GetKhronosToolId() << 16) | glslang::GetSpirvGeneratorVersion(), logger), inEntryPoint(false), entryPointTerminated(false), linkageOnly(false), glslangIntermediate(glslangIntermediate), nanMinMaxClamp(glslangIntermediate->getNanMinMaxClamp()), nonSemanticDebugPrintf(0), taskPayloadID(0) { bool isMeshShaderExt = (glslangIntermediate->getRequestedExtensions().find(glslang::E_GL_EXT_mesh_shader) != glslangIntermediate->getRequestedExtensions().end()); spv::ExecutionModel executionModel = TranslateExecutionModel(glslangIntermediate->getStage(), isMeshShaderExt); builder.clearAccessChain(); builder.setSource(TranslateSourceLanguage(glslangIntermediate->getSource(), glslangIntermediate->getProfile()), glslangIntermediate->getVersion()); if (options.emitNonSemanticShaderDebugSource) this->options.emitNonSemanticShaderDebugInfo = true; if (options.emitNonSemanticShaderDebugInfo) this->options.generateDebugInfo = true; if (this->options.generateDebugInfo) { if (this->options.emitNonSemanticShaderDebugInfo) { builder.setEmitNonSemanticShaderDebugInfo(this->options.emitNonSemanticShaderDebugSource); } else { builder.setEmitSpirvDebugInfo(); } builder.setDebugMainSourceFile(glslangIntermediate->getSourceFile()); // Set the source shader's text. If for SPV version 1.0, include // a preamble in comments stating the OpModuleProcessed instructions. // Otherwise, emit those as actual instructions. std::string text; const std::vector& processes = glslangIntermediate->getProcesses(); for (int p = 0; p < (int)processes.size(); ++p) { if (glslangIntermediate->getSpv().spv < glslang::EShTargetSpv_1_1) { text.append("// OpModuleProcessed "); text.append(processes[p]); text.append("\n"); } else builder.addModuleProcessed(processes[p]); } if (glslangIntermediate->getSpv().spv < glslang::EShTargetSpv_1_1 && (int)processes.size() > 0) text.append("#line 1\n"); text.append(glslangIntermediate->getSourceText()); builder.setSourceText(text); // Pass name and text for all included files const std::map& include_txt = glslangIntermediate->getIncludeText(); for (auto iItr = include_txt.begin(); iItr != include_txt.end(); ++iItr) builder.addInclude(iItr->first, iItr->second); } builder.setUseReplicatedComposites(glslangIntermediate->usingReplicatedComposites()); stdBuiltins = builder.import("GLSL.std.450"); spv::AddressingModel addressingModel = spv::AddressingModel::Logical; spv::MemoryModel memoryModel = spv::MemoryModel::GLSL450; if (glslangIntermediate->usingPhysicalStorageBuffer()) { addressingModel = spv::AddressingModel::PhysicalStorageBuffer64EXT; builder.addIncorporatedExtension(spv::E_SPV_KHR_physical_storage_buffer, spv::Spv_1_5); builder.addCapability(spv::Capability::PhysicalStorageBufferAddressesEXT); } if (glslangIntermediate->usingVulkanMemoryModel()) { memoryModel = spv::MemoryModel::VulkanKHR; builder.addCapability(spv::Capability::VulkanMemoryModelKHR); builder.addIncorporatedExtension(spv::E_SPV_KHR_vulkan_memory_model, spv::Spv_1_5); } builder.setMemoryModel(addressingModel, memoryModel); if (glslangIntermediate->usingVariablePointers()) { builder.addCapability(spv::Capability::VariablePointers); } // If not linking, there is no entry point if (!options.compileOnly) { shaderEntry = builder.makeEntryPoint(glslangIntermediate->getEntryPointName().c_str()); entryPoint = builder.addEntryPoint(executionModel, shaderEntry, glslangIntermediate->getEntryPointName().c_str()); } // Add the source extensions const auto& sourceExtensions = glslangIntermediate->getRequestedExtensions(); for (auto it = sourceExtensions.begin(); it != sourceExtensions.end(); ++it) builder.addSourceExtension(it->c_str()); // Add the top-level modes for this shader. if (glslangIntermediate->getXfbMode()) { builder.addCapability(spv::Capability::TransformFeedback); builder.addExecutionMode(shaderEntry, spv::ExecutionMode::Xfb); } if (glslangIntermediate->getLayoutPrimitiveCulling()) { builder.addCapability(spv::Capability::RayTraversalPrimitiveCullingKHR); } if (glslangIntermediate->getSubgroupUniformControlFlow()) { builder.addExtension(spv::E_SPV_KHR_subgroup_uniform_control_flow); builder.addExecutionMode(shaderEntry, spv::ExecutionMode::SubgroupUniformControlFlowKHR); } if (glslangIntermediate->getMaximallyReconverges()) { builder.addExtension(spv::E_SPV_KHR_maximal_reconvergence); builder.addExecutionMode(shaderEntry, spv::ExecutionMode::MaximallyReconvergesKHR); } if (glslangIntermediate->getQuadDerivMode()) { builder.addCapability(spv::Capability::QuadControlKHR); builder.addExtension(spv::E_SPV_KHR_quad_control); builder.addExecutionMode(shaderEntry, spv::ExecutionMode::QuadDerivativesKHR); } if (glslangIntermediate->getReqFullQuadsMode()) { builder.addCapability(spv::Capability::QuadControlKHR); builder.addExtension(spv::E_SPV_KHR_quad_control); builder.addExecutionMode(shaderEntry, spv::ExecutionMode::RequireFullQuadsKHR); } spv::ExecutionMode mode; switch (glslangIntermediate->getStage()) { case EShLangVertex: builder.addCapability(spv::Capability::Shader); break; case EShLangFragment: builder.addCapability(spv::Capability::Shader); if (glslangIntermediate->getPixelCenterInteger()) builder.addExecutionMode(shaderEntry, spv::ExecutionMode::PixelCenterInteger); if (glslangIntermediate->getOriginUpperLeft()) builder.addExecutionMode(shaderEntry, spv::ExecutionMode::OriginUpperLeft); else builder.addExecutionMode(shaderEntry, spv::ExecutionMode::OriginLowerLeft); if (glslangIntermediate->getEarlyFragmentTests()) builder.addExecutionMode(shaderEntry, spv::ExecutionMode::EarlyFragmentTests); if (glslangIntermediate->getEarlyAndLateFragmentTestsAMD()) { builder.addExecutionMode(shaderEntry, spv::ExecutionMode::EarlyAndLateFragmentTestsAMD); builder.addExtension(spv::E_SPV_AMD_shader_early_and_late_fragment_tests); } if (glslangIntermediate->getPostDepthCoverage()) { builder.addCapability(spv::Capability::SampleMaskPostDepthCoverage); builder.addExecutionMode(shaderEntry, spv::ExecutionMode::PostDepthCoverage); builder.addExtension(spv::E_SPV_KHR_post_depth_coverage); } if (glslangIntermediate->getNonCoherentColorAttachmentReadEXT()) { builder.addCapability(spv::Capability::TileImageColorReadAccessEXT); builder.addExecutionMode(shaderEntry, spv::ExecutionMode::NonCoherentColorAttachmentReadEXT); builder.addExtension(spv::E_SPV_EXT_shader_tile_image); } if (glslangIntermediate->getNonCoherentDepthAttachmentReadEXT()) { builder.addCapability(spv::Capability::TileImageDepthReadAccessEXT); builder.addExecutionMode(shaderEntry, spv::ExecutionMode::NonCoherentDepthAttachmentReadEXT); builder.addExtension(spv::E_SPV_EXT_shader_tile_image); } if (glslangIntermediate->getNonCoherentStencilAttachmentReadEXT()) { builder.addCapability(spv::Capability::TileImageStencilReadAccessEXT); builder.addExecutionMode(shaderEntry, spv::ExecutionMode::NonCoherentStencilAttachmentReadEXT); builder.addExtension(spv::E_SPV_EXT_shader_tile_image); } if (glslangIntermediate->getNonCoherentTileAttachmentReadQCOM()) { builder.addCapability(spv::Capability::TileShadingQCOM); builder.addExecutionMode(shaderEntry, spv::ExecutionMode::NonCoherentTileAttachmentReadQCOM); builder.addExtension(spv::E_SPV_QCOM_tile_shading); } if (glslangIntermediate->isDepthReplacing()) builder.addExecutionMode(shaderEntry, spv::ExecutionMode::DepthReplacing); if (glslangIntermediate->isStencilReplacing()) builder.addExecutionMode(shaderEntry, spv::ExecutionMode::StencilRefReplacingEXT); switch(glslangIntermediate->getDepth()) { case glslang::EldGreater: mode = spv::ExecutionMode::DepthGreater; break; case glslang::EldLess: mode = spv::ExecutionMode::DepthLess; break; case glslang::EldUnchanged: mode = spv::ExecutionMode::DepthUnchanged; break; default: mode = spv::ExecutionMode::Max; break; } if (mode != spv::ExecutionMode::Max) builder.addExecutionMode(shaderEntry, mode); switch (glslangIntermediate->getStencil()) { case glslang::ElsRefUnchangedFrontAMD: mode = spv::ExecutionMode::StencilRefUnchangedFrontAMD; break; case glslang::ElsRefGreaterFrontAMD: mode = spv::ExecutionMode::StencilRefGreaterFrontAMD; break; case glslang::ElsRefLessFrontAMD: mode = spv::ExecutionMode::StencilRefLessFrontAMD; break; case glslang::ElsRefUnchangedBackAMD: mode = spv::ExecutionMode::StencilRefUnchangedBackAMD; break; case glslang::ElsRefGreaterBackAMD: mode = spv::ExecutionMode::StencilRefGreaterBackAMD; break; case glslang::ElsRefLessBackAMD: mode = spv::ExecutionMode::StencilRefLessBackAMD; break; default: mode = spv::ExecutionMode::Max; break; } if (mode != spv::ExecutionMode::Max) builder.addExecutionMode(shaderEntry, (spv::ExecutionMode)mode); switch (glslangIntermediate->getInterlockOrdering()) { case glslang::EioPixelInterlockOrdered: mode = spv::ExecutionMode::PixelInterlockOrderedEXT; break; case glslang::EioPixelInterlockUnordered: mode = spv::ExecutionMode::PixelInterlockUnorderedEXT; break; case glslang::EioSampleInterlockOrdered: mode = spv::ExecutionMode::SampleInterlockOrderedEXT; break; case glslang::EioSampleInterlockUnordered: mode = spv::ExecutionMode::SampleInterlockUnorderedEXT; break; case glslang::EioShadingRateInterlockOrdered: mode = spv::ExecutionMode::ShadingRateInterlockOrderedEXT; break; case glslang::EioShadingRateInterlockUnordered: mode = spv::ExecutionMode::ShadingRateInterlockUnorderedEXT; break; default: mode = spv::ExecutionMode::Max; break; } if (mode != spv::ExecutionMode::Max) { builder.addExecutionMode(shaderEntry, (spv::ExecutionMode)mode); if (mode == spv::ExecutionMode::ShadingRateInterlockOrderedEXT || mode == spv::ExecutionMode::ShadingRateInterlockUnorderedEXT) { builder.addCapability(spv::Capability::FragmentShaderShadingRateInterlockEXT); } else if (mode == spv::ExecutionMode::PixelInterlockOrderedEXT || mode == spv::ExecutionMode::PixelInterlockUnorderedEXT) { builder.addCapability(spv::Capability::FragmentShaderPixelInterlockEXT); } else { builder.addCapability(spv::Capability::FragmentShaderSampleInterlockEXT); } builder.addExtension(spv::E_SPV_EXT_fragment_shader_interlock); } break; case EShLangCompute: { builder.addCapability(spv::Capability::Shader); bool needSizeId = false; for (int dim = 0; dim < 3; ++dim) { if ((glslangIntermediate->getLocalSizeSpecId(dim) != glslang::TQualifier::layoutNotSet)) { needSizeId = true; break; } } if (glslangIntermediate->getSpv().spv >= glslang::EShTargetSpv_1_6 && needSizeId) { std::vector dimConstId; for (int dim = 0; dim < 3; ++dim) { bool specConst = (glslangIntermediate->getLocalSizeSpecId(dim) != glslang::TQualifier::layoutNotSet); dimConstId.push_back(builder.makeUintConstant(glslangIntermediate->getLocalSize(dim), specConst)); if (specConst) { builder.addDecoration(dimConstId.back(), spv::Decoration::SpecId, glslangIntermediate->getLocalSizeSpecId(dim)); needSizeId = true; } } builder.addExecutionModeId(shaderEntry, spv::ExecutionMode::LocalSizeId, dimConstId); } else { if (glslangIntermediate->getTileShadingRateQCOM(0) >= 1 || glslangIntermediate->getTileShadingRateQCOM(1) >= 1 || glslangIntermediate->getTileShadingRateQCOM(2) >= 1) { auto rate_x = glslangIntermediate->getTileShadingRateQCOM(0); auto rate_y = glslangIntermediate->getTileShadingRateQCOM(1); auto rate_z = glslangIntermediate->getTileShadingRateQCOM(2); rate_x = ( rate_x == 0 ? 1 : rate_x ); rate_y = ( rate_y == 0 ? 1 : rate_y ); rate_z = ( rate_z == 0 ? 1 : rate_z ); builder.addExecutionMode(shaderEntry, spv::ExecutionMode::TileShadingRateQCOM, rate_x, rate_y, rate_z); } else { builder.addExecutionMode(shaderEntry, spv::ExecutionMode::LocalSize, glslangIntermediate->getLocalSize(0), glslangIntermediate->getLocalSize(1), glslangIntermediate->getLocalSize(2)); } } if (glslangIntermediate->getLayoutDerivativeModeNone() == glslang::LayoutDerivativeGroupQuads) { builder.addCapability(spv::Capability::ComputeDerivativeGroupQuadsNV); builder.addExecutionMode(shaderEntry, spv::ExecutionMode::DerivativeGroupQuadsNV); builder.addExtension(spv::E_SPV_NV_compute_shader_derivatives); } else if (glslangIntermediate->getLayoutDerivativeModeNone() == glslang::LayoutDerivativeGroupLinear) { builder.addCapability(spv::Capability::ComputeDerivativeGroupLinearNV); builder.addExecutionMode(shaderEntry, spv::ExecutionMode::DerivativeGroupLinearNV); builder.addExtension(spv::E_SPV_NV_compute_shader_derivatives); } if (glslangIntermediate->getNonCoherentTileAttachmentReadQCOM()) { builder.addCapability(spv::Capability::TileShadingQCOM); builder.addExecutionMode(shaderEntry, spv::ExecutionMode::NonCoherentTileAttachmentReadQCOM); builder.addExtension(spv::E_SPV_QCOM_tile_shading); } break; } case EShLangTessEvaluation: case EShLangTessControl: builder.addCapability(spv::Capability::Tessellation); glslang::TLayoutGeometry primitive; if (glslangIntermediate->getStage() == EShLangTessControl) { builder.addExecutionMode(shaderEntry, spv::ExecutionMode::OutputVertices, glslangIntermediate->getVertices()); primitive = glslangIntermediate->getOutputPrimitive(); } else { primitive = glslangIntermediate->getInputPrimitive(); } switch (primitive) { case glslang::ElgTriangles: mode = spv::ExecutionMode::Triangles; break; case glslang::ElgQuads: mode = spv::ExecutionMode::Quads; break; case glslang::ElgIsolines: mode = spv::ExecutionMode::Isolines; break; default: mode = spv::ExecutionMode::Max; break; } if (mode != spv::ExecutionMode::Max) builder.addExecutionMode(shaderEntry, mode); switch (glslangIntermediate->getVertexSpacing()) { case glslang::EvsEqual: mode = spv::ExecutionMode::SpacingEqual; break; case glslang::EvsFractionalEven: mode = spv::ExecutionMode::SpacingFractionalEven; break; case glslang::EvsFractionalOdd: mode = spv::ExecutionMode::SpacingFractionalOdd; break; default: mode = spv::ExecutionMode::Max; break; } if (mode != spv::ExecutionMode::Max) builder.addExecutionMode(shaderEntry, mode); switch (glslangIntermediate->getVertexOrder()) { case glslang::EvoCw: mode = spv::ExecutionMode::VertexOrderCw; break; case glslang::EvoCcw: mode = spv::ExecutionMode::VertexOrderCcw; break; default: mode = spv::ExecutionMode::Max; break; } if (mode != spv::ExecutionMode::Max) builder.addExecutionMode(shaderEntry, mode); if (glslangIntermediate->getPointMode()) builder.addExecutionMode(shaderEntry, spv::ExecutionMode::PointMode); break; case EShLangGeometry: builder.addCapability(spv::Capability::Geometry); switch (glslangIntermediate->getInputPrimitive()) { case glslang::ElgPoints: mode = spv::ExecutionMode::InputPoints; break; case glslang::ElgLines: mode = spv::ExecutionMode::InputLines; break; case glslang::ElgLinesAdjacency: mode = spv::ExecutionMode::InputLinesAdjacency; break; case glslang::ElgTriangles: mode = spv::ExecutionMode::Triangles; break; case glslang::ElgTrianglesAdjacency: mode = spv::ExecutionMode::InputTrianglesAdjacency; break; default: mode = spv::ExecutionMode::Max; break; } if (mode != spv::ExecutionMode::Max) builder.addExecutionMode(shaderEntry, mode); builder.addExecutionMode(shaderEntry, spv::ExecutionMode::Invocations, glslangIntermediate->getInvocations()); switch (glslangIntermediate->getOutputPrimitive()) { case glslang::ElgPoints: mode = spv::ExecutionMode::OutputPoints; break; case glslang::ElgLineStrip: mode = spv::ExecutionMode::OutputLineStrip; break; case glslang::ElgTriangleStrip: mode = spv::ExecutionMode::OutputTriangleStrip; break; default: mode = spv::ExecutionMode::Max; break; } if (mode != spv::ExecutionMode::Max) builder.addExecutionMode(shaderEntry, mode); builder.addExecutionMode(shaderEntry, spv::ExecutionMode::OutputVertices, glslangIntermediate->getVertices()); break; case EShLangRayGen: case EShLangIntersect: case EShLangAnyHit: case EShLangClosestHit: case EShLangMiss: case EShLangCallable: { auto& extensions = glslangIntermediate->getRequestedExtensions(); if (extensions.find("GL_EXT_opacity_micromap") != extensions.end()) { builder.addCapability(spv::Capability::RayTracingOpacityMicromapEXT); builder.addExtension("SPV_EXT_opacity_micromap"); } if (extensions.find("GL_NV_ray_tracing") == extensions.end()) { builder.addCapability(spv::Capability::RayTracingKHR); builder.addExtension("SPV_KHR_ray_tracing"); } else { builder.addCapability(spv::Capability::RayTracingNV); builder.addExtension("SPV_NV_ray_tracing"); } if (glslangIntermediate->getStage() != EShLangRayGen && glslangIntermediate->getStage() != EShLangCallable) { if (extensions.find("GL_EXT_ray_cull_mask") != extensions.end()) { builder.addCapability(spv::Capability::RayCullMaskKHR); builder.addExtension("SPV_KHR_ray_cull_mask"); } if (extensions.find("GL_EXT_ray_tracing_position_fetch") != extensions.end()) { builder.addCapability(spv::Capability::RayTracingPositionFetchKHR); builder.addExtension("SPV_KHR_ray_tracing_position_fetch"); } } break; } case EShLangTask: case EShLangMesh: if(isMeshShaderExt) { builder.addCapability(spv::Capability::MeshShadingEXT); builder.addExtension(spv::E_SPV_EXT_mesh_shader); } else { builder.addCapability(spv::Capability::MeshShadingNV); builder.addExtension(spv::E_SPV_NV_mesh_shader); } if (glslangIntermediate->getSpv().spv >= glslang::EShTargetSpv_1_6) { std::vector dimConstId; for (int dim = 0; dim < 3; ++dim) { bool specConst = (glslangIntermediate->getLocalSizeSpecId(dim) != glslang::TQualifier::layoutNotSet); dimConstId.push_back(builder.makeUintConstant(glslangIntermediate->getLocalSize(dim), specConst)); if (specConst) { builder.addDecoration(dimConstId.back(), spv::Decoration::SpecId, glslangIntermediate->getLocalSizeSpecId(dim)); } } builder.addExecutionModeId(shaderEntry, spv::ExecutionMode::LocalSizeId, dimConstId); } else { builder.addExecutionMode(shaderEntry, spv::ExecutionMode::LocalSize, glslangIntermediate->getLocalSize(0), glslangIntermediate->getLocalSize(1), glslangIntermediate->getLocalSize(2)); } if (glslangIntermediate->getStage() == EShLangMesh) { builder.addExecutionMode(shaderEntry, spv::ExecutionMode::OutputVertices, glslangIntermediate->getVertices()); builder.addExecutionMode(shaderEntry, spv::ExecutionMode::OutputPrimitivesNV, glslangIntermediate->getPrimitives()); switch (glslangIntermediate->getOutputPrimitive()) { case glslang::ElgPoints: mode = spv::ExecutionMode::OutputPoints; break; case glslang::ElgLines: mode = spv::ExecutionMode::OutputLinesNV; break; case glslang::ElgTriangles: mode = spv::ExecutionMode::OutputTrianglesNV; break; default: mode = spv::ExecutionMode::Max; break; } if (mode != spv::ExecutionMode::Max) builder.addExecutionMode(shaderEntry, (spv::ExecutionMode)mode); } break; default: break; } // // Add SPIR-V requirements (GL_EXT_spirv_intrinsics) // if (glslangIntermediate->hasSpirvRequirement()) { const glslang::TSpirvRequirement& spirvRequirement = glslangIntermediate->getSpirvRequirement(); // Add SPIR-V extension requirement for (auto& extension : spirvRequirement.extensions) builder.addExtension(extension.c_str()); // Add SPIR-V capability requirement for (auto capability : spirvRequirement.capabilities) builder.addCapability(static_cast(capability)); } // // Add SPIR-V execution mode qualifiers (GL_EXT_spirv_intrinsics) // if (glslangIntermediate->hasSpirvExecutionMode()) { const glslang::TSpirvExecutionMode spirvExecutionMode = glslangIntermediate->getSpirvExecutionMode(); // Add spirv_execution_mode for (auto& mode : spirvExecutionMode.modes) { if (!mode.second.empty()) { std::vector literals; TranslateLiterals(mode.second, literals); builder.addExecutionMode(shaderEntry, static_cast(mode.first), literals); } else builder.addExecutionMode(shaderEntry, static_cast(mode.first)); } // Add spirv_execution_mode_id for (auto& modeId : spirvExecutionMode.modeIds) { std::vector operandIds; assert(!modeId.second.empty()); for (auto extraOperand : modeId.second) { if (extraOperand->getType().getQualifier().isSpecConstant()) operandIds.push_back(getSymbolId(extraOperand->getAsSymbolNode())); else operandIds.push_back(createSpvConstant(*extraOperand)); } builder.addExecutionModeId(shaderEntry, static_cast(modeId.first), operandIds); } } } // Finish creating SPV, after the traversal is complete. void TGlslangToSpvTraverser::finishSpv(bool compileOnly) { // If not linking, an entry point is not expected if (!compileOnly) { // Finish the entry point function if (!entryPointTerminated) { builder.setBuildPoint(shaderEntry->getLastBlock()); builder.leaveFunction(); } // finish off the entry-point SPV instruction by adding the Input/Output entryPoint->reserveOperands(iOSet.size()); for (auto id : iOSet) entryPoint->addIdOperand(id); } // Add capabilities, extensions, remove unneeded decorations, etc., // based on the resulting SPIR-V. // Note: WebGPU code generation must have the opportunity to aggressively // prune unreachable merge blocks and continue targets. builder.postProcess(compileOnly); } // Write the SPV into 'out'. void TGlslangToSpvTraverser::dumpSpv(std::vector& out) { builder.dump(out); } // // Implement the traversal functions. // // Return true from interior nodes to have the external traversal // continue on to children. Return false if children were // already processed. // // // Symbols can turn into // - uniform/input reads // - output writes // - complex lvalue base setups: foo.bar[3].... , where we see foo and start up an access chain // - something simple that degenerates into the last bullet // void TGlslangToSpvTraverser::visitSymbol(glslang::TIntermSymbol* symbol) { // We update the line information even though no code might be generated here // This is helpful to yield correct lines for control flow instructions if (!linkageOnly) { builder.setDebugSourceLocation(symbol->getLoc().line, symbol->getLoc().getFilename()); } if (symbol->getBasicType() == glslang::EbtFunction) { return; } SpecConstantOpModeGuard spec_constant_op_mode_setter(&builder); if (symbol->getType().isStruct()) glslangTypeToIdMap[symbol->getType().getStruct()] = symbol->getId(); if (symbol->getType().getQualifier().isSpecConstant()) spec_constant_op_mode_setter.turnOnSpecConstantOpMode(); #ifdef ENABLE_HLSL // Skip symbol handling if it is string-typed if (symbol->getBasicType() == glslang::EbtString) return; #endif // getSymbolId() will set up all the IO decorations on the first call. // Formal function parameters were mapped during makeFunctions(). spv::Id id = getSymbolId(symbol); if (symbol->getType().getQualifier().isTaskPayload()) taskPayloadID = id; // cache the taskPayloadID to be used it as operand for OpEmitMeshTasksEXT if (builder.isPointer(id)) { if (!symbol->getType().getQualifier().isParamInput() && !symbol->getType().getQualifier().isParamOutput()) { // Include all "static use" and "linkage only" interface variables on the OpEntryPoint instruction // Consider adding to the OpEntryPoint interface list. // Only looking at structures if they have at least one member. if (!symbol->getType().isStruct() || symbol->getType().getStruct()->size() > 0) { spv::StorageClass sc = builder.getStorageClass(id); // Before SPIR-V 1.4, we only want to include Input and Output. // Starting with SPIR-V 1.4, we want all globals. if ((glslangIntermediate->getSpv().spv >= glslang::EShTargetSpv_1_4 && builder.isGlobalVariable(id)) || (sc == spv::StorageClass::Input || sc == spv::StorageClass::Output)) { iOSet.insert(id); } } } // If the SPIR-V type is required to be different than the AST type // (for ex SubgroupMasks or 3x4 ObjectToWorld/WorldToObject matrices), // translate now from the SPIR-V type to the AST type, for the consuming // operation. // Note this turns it from an l-value to an r-value. // Currently, all symbols needing this are inputs; avoid the map lookup when non-input. if (symbol->getType().getQualifier().storage == glslang::EvqVaryingIn) id = translateForcedType(id); } // Only process non-linkage-only nodes for generating actual static uses if (! linkageOnly || symbol->getQualifier().isSpecConstant()) { // Prepare to generate code for the access // L-value chains will be computed left to right. We're on the symbol now, // which is the left-most part of the access chain, so now is "clear" time, // followed by setting the base. builder.clearAccessChain(); // For now, we consider all user variables as being in memory, so they are pointers, // except for // A) R-Value arguments to a function, which are an intermediate object. // See comments in handleUserFunctionCall(). // B) Specialization constants (normal constants don't even come in as a variable), // These are also pure R-values. // C) R-Values from type translation, see above call to translateForcedType() glslang::TQualifier qualifier = symbol->getQualifier(); if (qualifier.isSpecConstant() || rValueParameters.find(symbol->getId()) != rValueParameters.end() || !builder.isPointerType(builder.getTypeId(id))) builder.setAccessChainRValue(id); else builder.setAccessChainLValue(id); } #ifdef ENABLE_HLSL // Process linkage-only nodes for any special additional interface work. if (linkageOnly) { if (glslangIntermediate->getHlslFunctionality1()) { // Map implicit counter buffers to their originating buffers, which should have been // seen by now, given earlier pruning of unused counters, and preservation of order // of declaration. if (symbol->getType().getQualifier().isUniformOrBuffer()) { if (!glslangIntermediate->hasCounterBufferName(symbol->getName())) { // Save possible originating buffers for counter buffers, keyed by // making the potential counter-buffer name. std::string keyName = symbol->getName().c_str(); keyName = glslangIntermediate->addCounterBufferName(keyName); counterOriginator[keyName] = symbol; } else { // Handle a counter buffer, by finding the saved originating buffer. std::string keyName = symbol->getName().c_str(); auto it = counterOriginator.find(keyName); if (it != counterOriginator.end()) { id = getSymbolId(it->second); if (id != spv::NoResult) { spv::Id counterId = getSymbolId(symbol); if (counterId != spv::NoResult) { builder.addExtension("SPV_GOOGLE_hlsl_functionality1"); builder.addDecorationId(id, spv::Decoration::HlslCounterBufferGOOGLE, counterId); } } } } } } } #endif } bool TGlslangToSpvTraverser::visitBinary(glslang::TVisit /* visit */, glslang::TIntermBinary* node) { builder.setDebugSourceLocation(node->getLoc().line, node->getLoc().getFilename()); if (node->getLeft()->getAsSymbolNode() != nullptr && node->getLeft()->getType().isStruct()) { glslangTypeToIdMap[node->getLeft()->getType().getStruct()] = node->getLeft()->getAsSymbolNode()->getId(); } if (node->getRight()->getAsSymbolNode() != nullptr && node->getRight()->getType().isStruct()) { glslangTypeToIdMap[node->getRight()->getType().getStruct()] = node->getRight()->getAsSymbolNode()->getId(); } SpecConstantOpModeGuard spec_constant_op_mode_setter(&builder); if (node->getType().getQualifier().isSpecConstant()) spec_constant_op_mode_setter.turnOnSpecConstantOpMode(); // First, handle special cases switch (node->getOp()) { case glslang::EOpAssign: case glslang::EOpAddAssign: case glslang::EOpSubAssign: case glslang::EOpMulAssign: case glslang::EOpVectorTimesMatrixAssign: case glslang::EOpVectorTimesScalarAssign: case glslang::EOpMatrixTimesScalarAssign: case glslang::EOpMatrixTimesMatrixAssign: case glslang::EOpDivAssign: case glslang::EOpModAssign: case glslang::EOpAndAssign: case glslang::EOpInclusiveOrAssign: case glslang::EOpExclusiveOrAssign: case glslang::EOpLeftShiftAssign: case glslang::EOpRightShiftAssign: // A bin-op assign "a += b" means the same thing as "a = a + b" // where a is evaluated before b. For a simple assignment, GLSL // says to evaluate the left before the right. So, always, left // node then right node. { // get the left l-value, save it away builder.clearAccessChain(); node->getLeft()->traverse(this); spv::Builder::AccessChain lValue = builder.getAccessChain(); // evaluate the right builder.clearAccessChain(); node->getRight()->traverse(this); spv::Id rValue = accessChainLoad(node->getRight()->getType()); // reset line number for assignment builder.setDebugSourceLocation(node->getLoc().line, node->getLoc().getFilename()); if (node->getOp() != glslang::EOpAssign) { // the left is also an r-value builder.setAccessChain(lValue); spv::Id leftRValue = accessChainLoad(node->getLeft()->getType()); // do the operation spv::Builder::AccessChain::CoherentFlags coherentFlags = TranslateCoherent(node->getLeft()->getType()); coherentFlags |= TranslateCoherent(node->getRight()->getType()); OpDecorations decorations = { TranslatePrecisionDecoration(node->getOperationPrecision()), TranslateNoContractionDecoration(node->getType().getQualifier()), TranslateNonUniformDecoration(coherentFlags) }; rValue = createBinaryOperation(node->getOp(), decorations, convertGlslangToSpvType(node->getType()), leftRValue, rValue, node->getType().getBasicType()); // these all need their counterparts in createBinaryOperation() assert(rValue != spv::NoResult); } // store the result builder.setAccessChain(lValue); multiTypeStore(node->getLeft()->getType(), rValue); // assignments are expressions having an rValue after they are evaluated... builder.clearAccessChain(); builder.setAccessChainRValue(rValue); } return false; case glslang::EOpIndexDirect: case glslang::EOpIndexDirectStruct: { // Structure, array, matrix, or vector indirection with statically known index. // Get the left part of the access chain. node->getLeft()->traverse(this); // Add the next element in the chain const int glslangIndex = node->getRight()->getAsConstantUnion()->getConstArray()[0].getIConst(); if (! node->getLeft()->getType().isArray() && node->getLeft()->getType().isVector() && node->getOp() == glslang::EOpIndexDirect) { // Swizzle is uniform so propagate uniform into access chain spv::Builder::AccessChain::CoherentFlags coherentFlags = TranslateCoherent(node->getLeft()->getType()); coherentFlags.nonUniform = 0; // This is essentially a hard-coded vector swizzle of size 1, // so short circuit the access-chain stuff with a swizzle. std::vector swizzle; swizzle.push_back(glslangIndex); int dummySize; builder.accessChainPushSwizzle(swizzle, convertGlslangToSpvType(node->getLeft()->getType()), coherentFlags, glslangIntermediate->getBaseAlignmentScalar( node->getLeft()->getType(), dummySize)); } else { // Load through a block reference is performed with a dot operator that // is mapped to EOpIndexDirectStruct. When we get to the actual reference, // do a load and reset the access chain. if (node->getLeft()->isReference() && !node->getLeft()->getType().isArray() && node->getOp() == glslang::EOpIndexDirectStruct) { spv::Id left = accessChainLoad(node->getLeft()->getType()); builder.clearAccessChain(); builder.setAccessChainLValue(left); } int spvIndex = glslangIndex; if (node->getLeft()->getBasicType() == glslang::EbtBlock && node->getOp() == glslang::EOpIndexDirectStruct) { // This may be, e.g., an anonymous block-member selection, which generally need // index remapping due to hidden members in anonymous blocks. long long glslangId = glslangTypeToIdMap[node->getLeft()->getType().getStruct()]; if (memberRemapper.find(glslangId) != memberRemapper.end()) { std::vector& remapper = memberRemapper[glslangId]; assert(remapper.size() > 0); spvIndex = remapper[glslangIndex]; } } // Struct reference propagates uniform lvalue spv::Builder::AccessChain::CoherentFlags coherentFlags = TranslateCoherent(node->getLeft()->getType()); coherentFlags.nonUniform = 0; // normal case for indexing array or structure or block builder.accessChainPush(builder.makeIntConstant(spvIndex), coherentFlags, node->getLeft()->getType().getBufferReferenceAlignment()); // Add capabilities here for accessing PointSize and clip/cull distance. // We have deferred generation of associated capabilities until now. if (node->getLeft()->getType().isStruct() && ! node->getLeft()->getType().isArray()) declareUseOfStructMember(*(node->getLeft()->getType().getStruct()), glslangIndex); } } return false; case glslang::EOpIndexIndirect: { // Array, matrix, or vector indirection with variable index. // Will use native SPIR-V access-chain for and array indirection; // matrices are arrays of vectors, so will also work for a matrix. // Will use the access chain's 'component' for variable index into a vector. // This adapter is building access chains left to right. // Set up the access chain to the left. node->getLeft()->traverse(this); // save it so that computing the right side doesn't trash it spv::Builder::AccessChain partial = builder.getAccessChain(); // compute the next index in the chain builder.clearAccessChain(); node->getRight()->traverse(this); spv::Id index = accessChainLoad(node->getRight()->getType()); addIndirectionIndexCapabilities(node->getLeft()->getType(), node->getRight()->getType()); // restore the saved access chain builder.setAccessChain(partial); // Only if index is nonUniform should we propagate nonUniform into access chain spv::Builder::AccessChain::CoherentFlags index_flags = TranslateCoherent(node->getRight()->getType()); spv::Builder::AccessChain::CoherentFlags coherent_flags = TranslateCoherent(node->getLeft()->getType()); coherent_flags.nonUniform = index_flags.nonUniform; if (! node->getLeft()->getType().isArray() && node->getLeft()->getType().isVector()) { int dummySize; builder.accessChainPushComponent( index, convertGlslangToSpvType(node->getLeft()->getType()), coherent_flags, glslangIntermediate->getBaseAlignmentScalar(node->getLeft()->getType(), dummySize)); } else builder.accessChainPush(index, coherent_flags, node->getLeft()->getType().getBufferReferenceAlignment()); } return false; case glslang::EOpVectorSwizzle: { node->getLeft()->traverse(this); std::vector swizzle; convertSwizzle(*node->getRight()->getAsAggregate(), swizzle); int dummySize; builder.accessChainPushSwizzle(swizzle, convertGlslangToSpvType(node->getLeft()->getType()), TranslateCoherent(node->getLeft()->getType()), glslangIntermediate->getBaseAlignmentScalar(node->getLeft()->getType(), dummySize)); } return false; case glslang::EOpMatrixSwizzle: logger->missingFunctionality("matrix swizzle"); return true; case glslang::EOpLogicalOr: case glslang::EOpLogicalAnd: { // These may require short circuiting, but can sometimes be done as straight // binary operations. The right operand must be short circuited if it has // side effects, and should probably be if it is complex. if (isTrivial(node->getRight()->getAsTyped())) break; // handle below as a normal binary operation // otherwise, we need to do dynamic short circuiting on the right operand spv::Id result = createShortCircuit(node->getOp(), *node->getLeft()->getAsTyped(), *node->getRight()->getAsTyped()); builder.clearAccessChain(); builder.setAccessChainRValue(result); } return false; default: break; } // Assume generic binary op... // get right operand builder.clearAccessChain(); node->getLeft()->traverse(this); spv::Id left = accessChainLoad(node->getLeft()->getType()); // get left operand builder.clearAccessChain(); node->getRight()->traverse(this); spv::Id right = accessChainLoad(node->getRight()->getType()); // get result OpDecorations decorations = { TranslatePrecisionDecoration(node->getOperationPrecision()), TranslateNoContractionDecoration(node->getType().getQualifier()), TranslateNonUniformDecoration(node->getType().getQualifier()) }; spv::Id result = createBinaryOperation(node->getOp(), decorations, convertGlslangToSpvType(node->getType()), left, right, node->getLeft()->getType().getBasicType()); builder.clearAccessChain(); if (! result) { logger->missingFunctionality("unknown glslang binary operation"); return true; // pick up a child as the place-holder result } else { builder.setAccessChainRValue(result); return false; } } spv::Id TGlslangToSpvTraverser::convertLoadedBoolInUniformToUint(const glslang::TType& type, spv::Id nominalTypeId, spv::Id loadedId) { if (builder.isScalarType(nominalTypeId)) { // Conversion for bool spv::Id boolType = builder.makeBoolType(); if (nominalTypeId != boolType) return builder.createBinOp(spv::Op::OpINotEqual, boolType, loadedId, builder.makeUintConstant(0)); } else if (builder.isVectorType(nominalTypeId)) { // Conversion for bvec int vecSize = builder.getNumTypeComponents(nominalTypeId); spv::Id bvecType = builder.makeVectorType(builder.makeBoolType(), vecSize); if (nominalTypeId != bvecType) loadedId = builder.createBinOp(spv::Op::OpINotEqual, bvecType, loadedId, makeSmearedConstant(builder.makeUintConstant(0), vecSize)); } else if (builder.isArrayType(nominalTypeId)) { // Conversion for bool array spv::Id boolArrayTypeId = convertGlslangToSpvType(type); if (nominalTypeId != boolArrayTypeId) { // Use OpCopyLogical from SPIR-V 1.4 if available. if (glslangIntermediate->getSpv().spv >= glslang::EShTargetSpv_1_4) return builder.createUnaryOp(spv::Op::OpCopyLogical, boolArrayTypeId, loadedId); glslang::TType glslangElementType(type, 0); spv::Id elementNominalTypeId = builder.getContainedTypeId(nominalTypeId); std::vector constituents; for (int index = 0; index < type.getOuterArraySize(); ++index) { // get the element spv::Id elementValue = builder.createCompositeExtract(loadedId, elementNominalTypeId, index); // recursively convert it spv::Id elementConvertedValue = convertLoadedBoolInUniformToUint(glslangElementType, elementNominalTypeId, elementValue); constituents.push_back(elementConvertedValue); } return builder.createCompositeConstruct(boolArrayTypeId, constituents); } } return loadedId; } // Figure out what, if any, type changes are needed when accessing a specific built-in. // Returns . // Also see comment for 'forceType', regarding tracking SPIR-V-required types. std::pair TGlslangToSpvTraverser::getForcedType(glslang::TBuiltInVariable glslangBuiltIn, const glslang::TType& glslangType) { switch(glslangBuiltIn) { case glslang::EbvSubGroupEqMask: case glslang::EbvSubGroupGeMask: case glslang::EbvSubGroupGtMask: case glslang::EbvSubGroupLeMask: case glslang::EbvSubGroupLtMask: { // these require changing a 64-bit scaler -> a vector of 32-bit components if (glslangType.isVector()) break; spv::Id ivec4_type = builder.makeVectorType(builder.makeUintType(32), 4); spv::Id uint64_type = builder.makeUintType(64); std::pair ret(ivec4_type, uint64_type); return ret; } // There are no SPIR-V builtins defined for these and map onto original non-transposed // builtins. During visitBinary we insert a transpose case glslang::EbvWorldToObject3x4: case glslang::EbvObjectToWorld3x4: { spv::Id mat43 = builder.makeMatrixType(builder.makeFloatType(32), 4, 3); spv::Id mat34 = builder.makeMatrixType(builder.makeFloatType(32), 3, 4); std::pair ret(mat43, mat34); return ret; } default: break; } std::pair ret(spv::NoType, spv::NoType); return ret; } // For an object previously identified (see getForcedType() and forceType) // as needing type translations, do the translation needed for a load, turning // an L-value into in R-value. spv::Id TGlslangToSpvTraverser::translateForcedType(spv::Id object) { const auto forceIt = forceType.find(object); if (forceIt == forceType.end()) return object; spv::Id desiredTypeId = forceIt->second; spv::Id objectTypeId = builder.getTypeId(object); assert(builder.isPointerType(objectTypeId)); objectTypeId = builder.getContainedTypeId(objectTypeId); if (builder.isVectorType(objectTypeId) && builder.getScalarTypeWidth(builder.getContainedTypeId(objectTypeId)) == 32) { if (builder.getScalarTypeWidth(desiredTypeId) == 64) { // handle 32-bit v.xy* -> 64-bit builder.clearAccessChain(); builder.setAccessChainLValue(object); object = builder.accessChainLoad(spv::NoPrecision, spv::Decoration::Max, spv::Decoration::Max, objectTypeId); std::vector components; components.push_back(builder.createCompositeExtract(object, builder.getContainedTypeId(objectTypeId), 0)); components.push_back(builder.createCompositeExtract(object, builder.getContainedTypeId(objectTypeId), 1)); spv::Id vecType = builder.makeVectorType(builder.getContainedTypeId(objectTypeId), 2); return builder.createUnaryOp(spv::Op::OpBitcast, desiredTypeId, builder.createCompositeConstruct(vecType, components)); } else { logger->missingFunctionality("forcing 32-bit vector type to non 64-bit scalar"); } } else if (builder.isMatrixType(objectTypeId)) { // There are no SPIR-V builtins defined for 3x4 variants of ObjectToWorld/WorldToObject // and we insert a transpose after loading the original non-transposed builtins builder.clearAccessChain(); builder.setAccessChainLValue(object); object = builder.accessChainLoad(spv::NoPrecision, spv::Decoration::Max, spv::Decoration::Max, objectTypeId); return builder.createUnaryOp(spv::Op::OpTranspose, desiredTypeId, object); } else { logger->missingFunctionality("forcing non 32-bit vector type"); } return object; } bool TGlslangToSpvTraverser::visitUnary(glslang::TVisit /* visit */, glslang::TIntermUnary* node) { builder.setDebugSourceLocation(node->getLoc().line, node->getLoc().getFilename()); SpecConstantOpModeGuard spec_constant_op_mode_setter(&builder); if (node->getType().getQualifier().isSpecConstant()) spec_constant_op_mode_setter.turnOnSpecConstantOpMode(); spv::Id result = spv::NoResult; // try texturing first result = createImageTextureFunctionCall(node); if (result != spv::NoResult) { builder.clearAccessChain(); builder.setAccessChainRValue(result); return false; // done with this node } // Non-texturing. if (node->getOp() == glslang::EOpArrayLength) { // Quite special; won't want to evaluate the operand. // Currently, the front-end does not allow .length() on an array until it is sized, // except for the last block membeor of an SSBO. // TODO: If this changes, link-time sized arrays might show up here, and need their // size extracted. // Normal .length() would have been constant folded by the front-end. // So, this has to be block.lastMember.length(). // SPV wants "block" and member number as the operands, go get them. spv::Id length; if (node->getOperand()->getType().isCoopMat()) { spv::Id typeId = convertGlslangToSpvType(node->getOperand()->getType()); assert(builder.isCooperativeMatrixType(typeId)); if (node->getOperand()->getType().isCoopMatKHR()) { length = builder.createCooperativeMatrixLengthKHR(typeId); } else { spec_constant_op_mode_setter.turnOnSpecConstantOpMode(); length = builder.createCooperativeMatrixLengthNV(typeId); } } else if (node->getOperand()->getType().isCoopVecNV()) { spv::Id typeId = convertGlslangToSpvType(node->getOperand()->getType()); length = builder.getCooperativeVectorNumComponents(typeId); } else { glslang::TIntermTyped* block = node->getOperand()->getAsBinaryNode()->getLeft(); block->traverse(this); unsigned int member = node->getOperand()->getAsBinaryNode()->getRight()->getAsConstantUnion() ->getConstArray()[0].getUConst(); length = builder.createArrayLength(builder.accessChainGetLValue(), member); } // GLSL semantics say the result of .length() is an int, while SPIR-V says // signedness must be 0. So, convert from SPIR-V unsigned back to GLSL's // AST expectation of a signed result. if (glslangIntermediate->getSource() == glslang::EShSourceGlsl) { if (builder.isInSpecConstCodeGenMode()) { length = builder.createBinOp(spv::Op::OpIAdd, builder.makeIntType(32), length, builder.makeIntConstant(0)); } else { length = builder.createUnaryOp(spv::Op::OpBitcast, builder.makeIntType(32), length); } } builder.clearAccessChain(); builder.setAccessChainRValue(length); return false; } // Force variable declaration - Debug Mode Only if (node->getOp() == glslang::EOpDeclare) { builder.clearAccessChain(); node->getOperand()->traverse(this); builder.clearAccessChain(); return false; } // Start by evaluating the operand // Does it need a swizzle inversion? If so, evaluation is inverted; // operate first on the swizzle base, then apply the swizzle. spv::Id invertedType = spv::NoType; auto resultType = [&invertedType, &node, this](){ return invertedType != spv::NoType ? invertedType : convertGlslangToSpvType(node->getType()); }; if (node->getOp() == glslang::EOpInterpolateAtCentroid) invertedType = getInvertedSwizzleType(*node->getOperand()); builder.clearAccessChain(); TIntermNode *operandNode; if (invertedType != spv::NoType) operandNode = node->getOperand()->getAsBinaryNode()->getLeft(); else operandNode = node->getOperand(); operandNode->traverse(this); spv::Id operand = spv::NoResult; spv::Builder::AccessChain::CoherentFlags lvalueCoherentFlags; const auto hitObjectOpsWithLvalue = [](glslang::TOperator op) { switch(op) { case glslang::EOpReorderThreadNV: case glslang::EOpHitObjectGetCurrentTimeNV: case glslang::EOpHitObjectGetHitKindNV: case glslang::EOpHitObjectGetPrimitiveIndexNV: case glslang::EOpHitObjectGetGeometryIndexNV: case glslang::EOpHitObjectGetInstanceIdNV: case glslang::EOpHitObjectGetInstanceCustomIndexNV: case glslang::EOpHitObjectGetObjectRayDirectionNV: case glslang::EOpHitObjectGetObjectRayOriginNV: case glslang::EOpHitObjectGetWorldRayDirectionNV: case glslang::EOpHitObjectGetWorldRayOriginNV: case glslang::EOpHitObjectGetWorldToObjectNV: case glslang::EOpHitObjectGetObjectToWorldNV: case glslang::EOpHitObjectGetRayTMaxNV: case glslang::EOpHitObjectGetRayTMinNV: case glslang::EOpHitObjectIsEmptyNV: case glslang::EOpHitObjectIsHitNV: case glslang::EOpHitObjectIsMissNV: case glslang::EOpHitObjectRecordEmptyNV: case glslang::EOpHitObjectGetShaderBindingTableRecordIndexNV: case glslang::EOpHitObjectGetShaderRecordBufferHandleNV: case glslang::EOpHitObjectGetClusterIdNV: case glslang::EOpHitObjectGetSpherePositionNV: case glslang::EOpHitObjectGetSphereRadiusNV: case glslang::EOpHitObjectIsSphereHitNV: case glslang::EOpHitObjectIsLSSHitNV: return true; default: return false; } }; if (node->getOp() == glslang::EOpAtomicCounterIncrement || node->getOp() == glslang::EOpAtomicCounterDecrement || node->getOp() == glslang::EOpAtomicCounter || (node->getOp() == glslang::EOpInterpolateAtCentroid && glslangIntermediate->getSource() != glslang::EShSourceHlsl) || node->getOp() == glslang::EOpRayQueryProceed || node->getOp() == glslang::EOpRayQueryGetRayTMin || node->getOp() == glslang::EOpRayQueryGetRayFlags || node->getOp() == glslang::EOpRayQueryGetWorldRayOrigin || node->getOp() == glslang::EOpRayQueryGetWorldRayDirection || node->getOp() == glslang::EOpRayQueryGetIntersectionCandidateAABBOpaque || node->getOp() == glslang::EOpRayQueryTerminate || node->getOp() == glslang::EOpRayQueryConfirmIntersection || (node->getOp() == glslang::EOpSpirvInst && operandNode->getAsTyped()->getQualifier().isSpirvByReference()) || hitObjectOpsWithLvalue(node->getOp())) { operand = builder.accessChainGetLValue(); // Special case l-value operands lvalueCoherentFlags = builder.getAccessChain().coherentFlags; lvalueCoherentFlags |= TranslateCoherent(operandNode->getAsTyped()->getType()); } else if (operandNode->getAsTyped()->getQualifier().isSpirvLiteral()) { // Will be translated to a literal value, make a placeholder here operand = spv::NoResult; } else { operand = accessChainLoad(node->getOperand()->getType()); } OpDecorations decorations = { TranslatePrecisionDecoration(node->getOperationPrecision()), TranslateNoContractionDecoration(node->getType().getQualifier()), TranslateNonUniformDecoration(node->getType().getQualifier()) }; // it could be a conversion if (! result) { result = createConversion(node->getOp(), decorations, resultType(), operand, node->getType().getBasicType(), node->getOperand()->getBasicType()); if (result) { if (node->getType().isCoopMatKHR() && node->getOperand()->getAsTyped()->getType().isCoopMatKHR() && !node->getAsTyped()->getType().sameCoopMatUse(node->getOperand()->getAsTyped()->getType())) { // Conversions that change use need CapabilityCooperativeMatrixConversionsNV builder.addCapability(spv::Capability::CooperativeMatrixConversionsNV); builder.addExtension(spv::E_SPV_NV_cooperative_matrix2); } } } // if not, then possibly an operation if (! result) result = createUnaryOperation(node->getOp(), decorations, resultType(), operand, node->getOperand()->getBasicType(), lvalueCoherentFlags, node->getType()); // it could be attached to a SPIR-V intruction if (!result) { if (node->getOp() == glslang::EOpSpirvInst) { const auto& spirvInst = node->getSpirvInstruction(); if (spirvInst.set == "") { spv::IdImmediate idImmOp = {true, operand}; if (operandNode->getAsTyped()->getQualifier().isSpirvLiteral()) { // Translate the constant to a literal value std::vector literals; glslang::TVector constants; constants.push_back(operandNode->getAsConstantUnion()); TranslateLiterals(constants, literals); idImmOp = {false, literals[0]}; } if (node->getBasicType() == glslang::EbtVoid) builder.createNoResultOp(static_cast(spirvInst.id), {idImmOp}); else result = builder.createOp(static_cast(spirvInst.id), resultType(), {idImmOp}); } else { result = builder.createBuiltinCall( resultType(), spirvInst.set == "GLSL.std.450" ? stdBuiltins : getExtBuiltins(spirvInst.set.c_str()), spirvInst.id, {operand}); } if (node->getBasicType() == glslang::EbtVoid) return false; // done with this node } } if (result) { if (invertedType) { result = createInvertedSwizzle(decorations.precision, *node->getOperand(), result); decorations.addNonUniform(builder, result); } builder.clearAccessChain(); builder.setAccessChainRValue(result); return false; // done with this node } // it must be a special case, check... switch (node->getOp()) { case glslang::EOpPostIncrement: case glslang::EOpPostDecrement: case glslang::EOpPreIncrement: case glslang::EOpPreDecrement: { // we need the integer value "1" or the floating point "1.0" to add/subtract spv::Id one = 0; if (node->getBasicType() == glslang::EbtFloat) one = builder.makeFloatConstant(1.0F); else if (node->getBasicType() == glslang::EbtDouble) one = builder.makeDoubleConstant(1.0); else if (node->getBasicType() == glslang::EbtFloat16) one = builder.makeFloat16Constant(1.0F); else if (node->getBasicType() == glslang::EbtBFloat16) one = builder.makeBFloat16Constant(1.0F); else if (node->getBasicType() == glslang::EbtFloatE5M2) one = builder.makeFloatE5M2Constant(1.0F); else if (node->getBasicType() == glslang::EbtFloatE4M3) one = builder.makeFloatE4M3Constant(1.0F); else if (node->getBasicType() == glslang::EbtInt8 || node->getBasicType() == glslang::EbtUint8) one = builder.makeInt8Constant(1); else if (node->getBasicType() == glslang::EbtInt16 || node->getBasicType() == glslang::EbtUint16) one = builder.makeInt16Constant(1); else if (node->getBasicType() == glslang::EbtInt64 || node->getBasicType() == glslang::EbtUint64) one = builder.makeInt64Constant(1); else one = builder.makeIntConstant(1); glslang::TOperator op; if (node->getOp() == glslang::EOpPreIncrement || node->getOp() == glslang::EOpPostIncrement) op = glslang::EOpAdd; else op = glslang::EOpSub; spv::Id result = createBinaryOperation(op, decorations, convertGlslangToSpvType(node->getType()), operand, one, node->getType().getBasicType()); assert(result != spv::NoResult); // The result of operation is always stored, but conditionally the // consumed result. The consumed result is always an r-value. builder.accessChainStore(result, TranslateNonUniformDecoration(builder.getAccessChain().coherentFlags)); builder.clearAccessChain(); if (node->getOp() == glslang::EOpPreIncrement || node->getOp() == glslang::EOpPreDecrement) builder.setAccessChainRValue(result); else builder.setAccessChainRValue(operand); } return false; case glslang::EOpAssumeEXT: builder.addCapability(spv::Capability::ExpectAssumeKHR); builder.addExtension(spv::E_SPV_KHR_expect_assume); builder.createNoResultOp(spv::Op::OpAssumeTrueKHR, operand); return false; case glslang::EOpEmitStreamVertex: builder.createNoResultOp(spv::Op::OpEmitStreamVertex, operand); return false; case glslang::EOpEndStreamPrimitive: builder.createNoResultOp(spv::Op::OpEndStreamPrimitive, operand); return false; case glslang::EOpRayQueryTerminate: builder.createNoResultOp(spv::Op::OpRayQueryTerminateKHR, operand); return false; case glslang::EOpRayQueryConfirmIntersection: builder.createNoResultOp(spv::Op::OpRayQueryConfirmIntersectionKHR, operand); return false; case glslang::EOpReorderThreadNV: builder.createNoResultOp(spv::Op::OpReorderThreadWithHitObjectNV, operand); return false; case glslang::EOpHitObjectRecordEmptyNV: builder.createNoResultOp(spv::Op::OpHitObjectRecordEmptyNV, operand); return false; case glslang::EOpCreateTensorLayoutNV: result = builder.createOp(spv::Op::OpCreateTensorLayoutNV, resultType(), std::vector{}); builder.clearAccessChain(); builder.setAccessChainRValue(result); return false; case glslang::EOpCreateTensorViewNV: result = builder.createOp(spv::Op::OpCreateTensorViewNV, resultType(), std::vector{}); builder.clearAccessChain(); builder.setAccessChainRValue(result); return false; default: logger->missingFunctionality("unknown glslang unary"); return true; // pick up operand as placeholder result } } // Construct a composite object, recursively copying members if their types don't match spv::Id TGlslangToSpvTraverser::createCompositeConstruct(spv::Id resultTypeId, std::vector constituents) { for (int c = 0; c < (int)constituents.size(); ++c) { spv::Id& constituent = constituents[c]; spv::Id lType = builder.getContainedTypeId(resultTypeId, c); spv::Id rType = builder.getTypeId(constituent); if (lType != rType) { if (glslangIntermediate->getSpv().spv >= glslang::EShTargetSpv_1_4) { constituent = builder.createUnaryOp(spv::Op::OpCopyLogical, lType, constituent); } else if (builder.isStructType(rType)) { std::vector rTypeConstituents; int numrTypeConstituents = builder.getNumTypeConstituents(rType); for (int i = 0; i < numrTypeConstituents; ++i) { rTypeConstituents.push_back(builder.createCompositeExtract(constituent, builder.getContainedTypeId(rType, i), i)); } constituents[c] = createCompositeConstruct(lType, rTypeConstituents); } else { assert(builder.isArrayType(rType)); std::vector rTypeConstituents; int numrTypeConstituents = builder.getNumTypeConstituents(rType); spv::Id elementRType = builder.getContainedTypeId(rType); for (int i = 0; i < numrTypeConstituents; ++i) { rTypeConstituents.push_back(builder.createCompositeExtract(constituent, elementRType, i)); } constituents[c] = createCompositeConstruct(lType, rTypeConstituents); } } } return builder.createCompositeConstruct(resultTypeId, constituents); } bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TIntermAggregate* node) { SpecConstantOpModeGuard spec_constant_op_mode_setter(&builder); if (node->getType().getQualifier().isSpecConstant()) spec_constant_op_mode_setter.turnOnSpecConstantOpMode(); spv::Id result = spv::NoResult; spv::Id invertedType = spv::NoType; // to use to override the natural type of the node std::vector complexLvalues; // for holding swizzling l-values too complex for // SPIR-V, for an out parameter std::vector temporaryLvalues; // temporaries to pass, as proxies for complexLValues auto resultType = [&invertedType, &node, this](){ if (invertedType != spv::NoType) { return invertedType; } else { auto ret = convertGlslangToSpvType(node->getType()); // convertGlslangToSpvType may clobber the debug location, reset it builder.setDebugSourceLocation(node->getLoc().line, node->getLoc().getFilename()); return ret; } }; // try texturing result = createImageTextureFunctionCall(node); if (result != spv::NoResult) { builder.clearAccessChain(); builder.setAccessChainRValue(result); return false; } else if (node->getOp() == glslang::EOpImageStore || node->getOp() == glslang::EOpImageStoreLod || node->getOp() == glslang::EOpImageAtomicStore) { // "imageStore" is a special case, which has no result return false; } glslang::TOperator binOp = glslang::EOpNull; bool reduceComparison = true; bool isMatrix = false; bool noReturnValue = false; bool atomic = false; spv::Builder::AccessChain::CoherentFlags lvalueCoherentFlags; assert(node->getOp()); spv::Decoration precision = TranslatePrecisionDecoration(node->getOperationPrecision()); switch (node->getOp()) { case glslang::EOpScope: case glslang::EOpSequence: { if (visit == glslang::EvPreVisit) { ++sequenceDepth; if (sequenceDepth == 1) { // If this is the parent node of all the functions, we want to see them // early, so all call points have actual SPIR-V functions to reference. // In all cases, still let the traverser visit the children for us. makeFunctions(node->getAsAggregate()->getSequence()); // Global initializers is specific to the shader entry point, which does not exist in compile-only mode if (!options.compileOnly) { // Also, we want all globals initializers to go into the beginning of the entry point, before // anything else gets there, so visit out of order, doing them all now. makeGlobalInitializers(node->getAsAggregate()->getSequence()); } //Pre process linker objects for ray tracing stages if (glslangIntermediate->isRayTracingStage()) collectRayTracingLinkerObjects(); // Initializers are done, don't want to visit again, but functions and link objects need to be processed, // so do them manually. visitFunctions(node->getAsAggregate()->getSequence()); return false; } else { if (node->getOp() == glslang::EOpScope) { auto loc = node->getLoc(); builder.enterLexicalBlock(loc.line, loc.column); } } } else { if (sequenceDepth > 1 && node->getOp() == glslang::EOpScope) builder.leaveLexicalBlock(); --sequenceDepth; } return true; } case glslang::EOpLinkerObjects: { if (visit == glslang::EvPreVisit) linkageOnly = true; else linkageOnly = false; return true; } case glslang::EOpComma: { // processing from left to right naturally leaves the right-most // lying around in the access chain glslang::TIntermSequence& glslangOperands = node->getSequence(); for (int i = 0; i < (int)glslangOperands.size(); ++i) glslangOperands[i]->traverse(this); return false; } case glslang::EOpFunction: if (visit == glslang::EvPreVisit) { if (options.generateDebugInfo) { builder.setDebugSourceLocation(node->getLoc().line, node->getLoc().getFilename()); } if (isShaderEntryPoint(node)) { inEntryPoint = true; builder.setBuildPoint(shaderEntry->getLastBlock()); builder.enterFunction(shaderEntry); currentFunction = shaderEntry; } else { handleFunctionEntry(node); } if (options.generateDebugInfo && !options.emitNonSemanticShaderDebugInfo) { const auto& loc = node->getLoc(); const char* sourceFileName = loc.getFilename(); spv::Id sourceFileId = sourceFileName ? builder.getStringId(sourceFileName) : builder.getMainFileId(); currentFunction->setDebugLineInfo(sourceFileId, loc.line, loc.column); } } else { if (options.generateDebugInfo) { if (glslangIntermediate->getSource() == glslang::EShSourceGlsl && node->getSequence().size() > 1) { auto endLoc = node->getSequence()[1]->getAsAggregate()->getEndLoc(); builder.setDebugSourceLocation(endLoc.line, endLoc.getFilename()); } } if (inEntryPoint) entryPointTerminated = true; builder.leaveFunction(); inEntryPoint = false; } return true; case glslang::EOpParameters: // Parameters will have been consumed by EOpFunction processing, but not // the body, so we still visited the function node's children, making this // child redundant. return false; case glslang::EOpFunctionCall: { builder.setDebugSourceLocation(node->getLoc().line, node->getLoc().getFilename()); if (node->isUserDefined()) result = handleUserFunctionCall(node); if (result) { builder.clearAccessChain(); builder.setAccessChainRValue(result); } else logger->missingFunctionality("missing user function; linker needs to catch that"); return false; } case glslang::EOpConstructMat2x2: case glslang::EOpConstructMat2x3: case glslang::EOpConstructMat2x4: case glslang::EOpConstructMat3x2: case glslang::EOpConstructMat3x3: case glslang::EOpConstructMat3x4: case glslang::EOpConstructMat4x2: case glslang::EOpConstructMat4x3: case glslang::EOpConstructMat4x4: case glslang::EOpConstructDMat2x2: case glslang::EOpConstructDMat2x3: case glslang::EOpConstructDMat2x4: case glslang::EOpConstructDMat3x2: case glslang::EOpConstructDMat3x3: case glslang::EOpConstructDMat3x4: case glslang::EOpConstructDMat4x2: case glslang::EOpConstructDMat4x3: case glslang::EOpConstructDMat4x4: case glslang::EOpConstructIMat2x2: case glslang::EOpConstructIMat2x3: case glslang::EOpConstructIMat2x4: case glslang::EOpConstructIMat3x2: case glslang::EOpConstructIMat3x3: case glslang::EOpConstructIMat3x4: case glslang::EOpConstructIMat4x2: case glslang::EOpConstructIMat4x3: case glslang::EOpConstructIMat4x4: case glslang::EOpConstructUMat2x2: case glslang::EOpConstructUMat2x3: case glslang::EOpConstructUMat2x4: case glslang::EOpConstructUMat3x2: case glslang::EOpConstructUMat3x3: case glslang::EOpConstructUMat3x4: case glslang::EOpConstructUMat4x2: case glslang::EOpConstructUMat4x3: case glslang::EOpConstructUMat4x4: case glslang::EOpConstructBMat2x2: case glslang::EOpConstructBMat2x3: case glslang::EOpConstructBMat2x4: case glslang::EOpConstructBMat3x2: case glslang::EOpConstructBMat3x3: case glslang::EOpConstructBMat3x4: case glslang::EOpConstructBMat4x2: case glslang::EOpConstructBMat4x3: case glslang::EOpConstructBMat4x4: case glslang::EOpConstructF16Mat2x2: case glslang::EOpConstructF16Mat2x3: case glslang::EOpConstructF16Mat2x4: case glslang::EOpConstructF16Mat3x2: case glslang::EOpConstructF16Mat3x3: case glslang::EOpConstructF16Mat3x4: case glslang::EOpConstructF16Mat4x2: case glslang::EOpConstructF16Mat4x3: case glslang::EOpConstructF16Mat4x4: isMatrix = true; [[fallthrough]]; case glslang::EOpConstructFloat: case glslang::EOpConstructVec2: case glslang::EOpConstructVec3: case glslang::EOpConstructVec4: case glslang::EOpConstructDouble: case glslang::EOpConstructDVec2: case glslang::EOpConstructDVec3: case glslang::EOpConstructDVec4: case glslang::EOpConstructFloat16: case glslang::EOpConstructF16Vec2: case glslang::EOpConstructF16Vec3: case glslang::EOpConstructF16Vec4: case glslang::EOpConstructBFloat16: case glslang::EOpConstructBF16Vec2: case glslang::EOpConstructBF16Vec3: case glslang::EOpConstructBF16Vec4: case glslang::EOpConstructFloatE5M2: case glslang::EOpConstructFloatE5M2Vec2: case glslang::EOpConstructFloatE5M2Vec3: case glslang::EOpConstructFloatE5M2Vec4: case glslang::EOpConstructFloatE4M3: case glslang::EOpConstructFloatE4M3Vec2: case glslang::EOpConstructFloatE4M3Vec3: case glslang::EOpConstructFloatE4M3Vec4: case glslang::EOpConstructBool: case glslang::EOpConstructBVec2: case glslang::EOpConstructBVec3: case glslang::EOpConstructBVec4: case glslang::EOpConstructInt8: case glslang::EOpConstructI8Vec2: case glslang::EOpConstructI8Vec3: case glslang::EOpConstructI8Vec4: case glslang::EOpConstructUint8: case glslang::EOpConstructU8Vec2: case glslang::EOpConstructU8Vec3: case glslang::EOpConstructU8Vec4: case glslang::EOpConstructInt16: case glslang::EOpConstructI16Vec2: case glslang::EOpConstructI16Vec3: case glslang::EOpConstructI16Vec4: case glslang::EOpConstructUint16: case glslang::EOpConstructU16Vec2: case glslang::EOpConstructU16Vec3: case glslang::EOpConstructU16Vec4: case glslang::EOpConstructInt: case glslang::EOpConstructIVec2: case glslang::EOpConstructIVec3: case glslang::EOpConstructIVec4: case glslang::EOpConstructUint: case glslang::EOpConstructUVec2: case glslang::EOpConstructUVec3: case glslang::EOpConstructUVec4: case glslang::EOpConstructInt64: case glslang::EOpConstructI64Vec2: case glslang::EOpConstructI64Vec3: case glslang::EOpConstructI64Vec4: case glslang::EOpConstructUint64: case glslang::EOpConstructU64Vec2: case glslang::EOpConstructU64Vec3: case glslang::EOpConstructU64Vec4: case glslang::EOpConstructStruct: case glslang::EOpConstructTextureSampler: case glslang::EOpConstructReference: case glslang::EOpConstructCooperativeMatrixNV: case glslang::EOpConstructCooperativeMatrixKHR: case glslang::EOpConstructCooperativeVectorNV: case glslang::EOpConstructSaturated: { builder.setDebugSourceLocation(node->getLoc().line, node->getLoc().getFilename()); std::vector arguments; translateArguments(*node, arguments, lvalueCoherentFlags); spv::Id constructed; if (node->getOp() == glslang::EOpConstructTextureSampler) { const glslang::TType& texType = node->getSequence()[0]->getAsTyped()->getType(); if (glslangIntermediate->getSpv().spv >= glslang::EShTargetSpv_1_6 && texType.getSampler().isBuffer()) { // SamplerBuffer is not supported in spirv1.6 so // `samplerBuffer(textureBuffer, sampler)` is a no-op // and textureBuffer is the result going forward constructed = arguments[0]; } else constructed = builder.createOp(spv::Op::OpSampledImage, resultType(), arguments); } else if (node->getOp() == glslang::EOpConstructCooperativeMatrixKHR && node->getType().isCoopMatKHR() && node->getSequence()[0]->getAsTyped()->getType().isCoopMatKHR()) { builder.addCapability(spv::Capability::CooperativeMatrixConversionsNV); builder.addExtension(spv::E_SPV_NV_cooperative_matrix2); constructed = builder.createCooperativeMatrixConversion(resultType(), arguments[0]); } else if (node->getOp() == glslang::EOpConstructCooperativeVectorNV && arguments.size() == 1 && builder.getTypeId(arguments[0]) == resultType()) { constructed = arguments[0]; } else if (node->getOp() == glslang::EOpConstructStruct || node->getOp() == glslang::EOpConstructCooperativeMatrixNV || node->getOp() == glslang::EOpConstructCooperativeMatrixKHR || node->getType().isArray() || // Handle constructing coopvec from one component here, to avoid the component // getting smeared (node->getOp() == glslang::EOpConstructCooperativeVectorNV && arguments.size() == 1 && builder.isScalar(arguments[0]))) { std::vector constituents; for (int c = 0; c < (int)arguments.size(); ++c) constituents.push_back(arguments[c]); constructed = createCompositeConstruct(resultType(), constituents); } else if (isMatrix) constructed = builder.createMatrixConstructor(precision, arguments, resultType()); else if (node->getOp() == glslang::EOpConstructSaturated) { OpDecorations decorations = { TranslatePrecisionDecoration(node->getOperationPrecision()), TranslateNoContractionDecoration(node->getType().getQualifier()), TranslateNonUniformDecoration(lvalueCoherentFlags) }; constructed = createConversion(node->getOp(), decorations, resultType(), arguments[1], node->getType().getBasicType(), node->getSequence()[1]->getAsTyped()->getBasicType()); builder.addDecoration(constructed, spv::Decoration::SaturatedToLargestFloat8NormalConversionEXT); builder.createStore(constructed, arguments[0]); } else constructed = builder.createConstructor(precision, arguments, resultType()); if (node->getType().getQualifier().isNonUniform()) { builder.addDecoration(constructed, spv::Decoration::NonUniformEXT); } builder.clearAccessChain(); builder.setAccessChainRValue(constructed); return false; } // These six are component-wise compares with component-wise results. // Forward on to createBinaryOperation(), requesting a vector result. case glslang::EOpLessThan: case glslang::EOpGreaterThan: case glslang::EOpLessThanEqual: case glslang::EOpGreaterThanEqual: case glslang::EOpVectorEqual: case glslang::EOpVectorNotEqual: { // Map the operation to a binary binOp = node->getOp(); reduceComparison = false; switch (node->getOp()) { case glslang::EOpVectorEqual: binOp = glslang::EOpVectorEqual; break; case glslang::EOpVectorNotEqual: binOp = glslang::EOpVectorNotEqual; break; default: binOp = node->getOp(); break; } break; } case glslang::EOpMul: // component-wise matrix multiply binOp = glslang::EOpMul; break; case glslang::EOpOuterProduct: // two vectors multiplied to make a matrix binOp = glslang::EOpOuterProduct; break; case glslang::EOpDot: { // for scalar dot product, use multiply glslang::TIntermSequence& glslangOperands = node->getSequence(); if (glslangOperands[0]->getAsTyped()->getVectorSize() == 1) binOp = glslang::EOpMul; break; } case glslang::EOpMod: // when an aggregate, this is the floating-point mod built-in function, // which can be emitted by the one in createBinaryOperation() binOp = glslang::EOpMod; break; case glslang::EOpEmitVertex: case glslang::EOpEndPrimitive: case glslang::EOpBarrier: case glslang::EOpMemoryBarrier: case glslang::EOpMemoryBarrierAtomicCounter: case glslang::EOpMemoryBarrierBuffer: case glslang::EOpMemoryBarrierImage: case glslang::EOpMemoryBarrierShared: case glslang::EOpGroupMemoryBarrier: case glslang::EOpDeviceMemoryBarrier: case glslang::EOpAllMemoryBarrierWithGroupSync: case glslang::EOpDeviceMemoryBarrierWithGroupSync: case glslang::EOpWorkgroupMemoryBarrier: case glslang::EOpWorkgroupMemoryBarrierWithGroupSync: case glslang::EOpSubgroupBarrier: case glslang::EOpSubgroupMemoryBarrier: case glslang::EOpSubgroupMemoryBarrierBuffer: case glslang::EOpSubgroupMemoryBarrierImage: case glslang::EOpSubgroupMemoryBarrierShared: noReturnValue = true; // These all have 0 operands and will naturally finish up in the code below for 0 operands break; case glslang::EOpAtomicAdd: case glslang::EOpAtomicSubtract: case glslang::EOpAtomicMin: case glslang::EOpAtomicMax: case glslang::EOpAtomicAnd: case glslang::EOpAtomicOr: case glslang::EOpAtomicXor: case glslang::EOpAtomicExchange: case glslang::EOpAtomicCompSwap: atomic = true; break; case glslang::EOpAtomicStore: noReturnValue = true; [[fallthrough]]; case glslang::EOpAtomicLoad: atomic = true; break; case glslang::EOpAtomicCounterAdd: case glslang::EOpAtomicCounterSubtract: case glslang::EOpAtomicCounterMin: case glslang::EOpAtomicCounterMax: case glslang::EOpAtomicCounterAnd: case glslang::EOpAtomicCounterOr: case glslang::EOpAtomicCounterXor: case glslang::EOpAtomicCounterExchange: case glslang::EOpAtomicCounterCompSwap: builder.addExtension("SPV_KHR_shader_atomic_counter_ops"); builder.addCapability(spv::Capability::AtomicStorageOps); atomic = true; break; case glslang::EOpAbsDifference: case glslang::EOpAddSaturate: case glslang::EOpSubSaturate: case glslang::EOpAverage: case glslang::EOpAverageRounded: case glslang::EOpMul32x16: builder.addCapability(spv::Capability::IntegerFunctions2INTEL); builder.addExtension("SPV_INTEL_shader_integer_functions2"); binOp = node->getOp(); break; case glslang::EOpExpectEXT: builder.addCapability(spv::Capability::ExpectAssumeKHR); builder.addExtension(spv::E_SPV_KHR_expect_assume); binOp = node->getOp(); break; case glslang::EOpIgnoreIntersectionNV: case glslang::EOpTerminateRayNV: case glslang::EOpTraceNV: case glslang::EOpTraceRayMotionNV: case glslang::EOpTraceKHR: case glslang::EOpExecuteCallableNV: case glslang::EOpExecuteCallableKHR: case glslang::EOpWritePackedPrimitiveIndices4x8NV: case glslang::EOpEmitMeshTasksEXT: case glslang::EOpSetMeshOutputsEXT: noReturnValue = true; break; case glslang::EOpRayQueryInitialize: case glslang::EOpRayQueryTerminate: case glslang::EOpRayQueryGenerateIntersection: case glslang::EOpRayQueryConfirmIntersection: builder.addExtension("SPV_KHR_ray_query"); builder.addCapability(spv::Capability::RayQueryKHR); noReturnValue = true; break; case glslang::EOpRayQueryProceed: case glslang::EOpRayQueryGetIntersectionType: case glslang::EOpRayQueryGetRayTMin: case glslang::EOpRayQueryGetRayFlags: case glslang::EOpRayQueryGetIntersectionT: case glslang::EOpRayQueryGetIntersectionInstanceCustomIndex: case glslang::EOpRayQueryGetIntersectionInstanceId: case glslang::EOpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffset: case glslang::EOpRayQueryGetIntersectionGeometryIndex: case glslang::EOpRayQueryGetIntersectionPrimitiveIndex: case glslang::EOpRayQueryGetIntersectionBarycentrics: case glslang::EOpRayQueryGetIntersectionFrontFace: case glslang::EOpRayQueryGetIntersectionCandidateAABBOpaque: case glslang::EOpRayQueryGetIntersectionObjectRayDirection: case glslang::EOpRayQueryGetIntersectionObjectRayOrigin: case glslang::EOpRayQueryGetWorldRayDirection: case glslang::EOpRayQueryGetWorldRayOrigin: case glslang::EOpRayQueryGetIntersectionObjectToWorld: case glslang::EOpRayQueryGetIntersectionWorldToObject: builder.addExtension("SPV_KHR_ray_query"); builder.addCapability(spv::Capability::RayQueryKHR); break; case glslang::EOpCooperativeMatrixLoad: case glslang::EOpCooperativeMatrixStore: case glslang::EOpCooperativeMatrixLoadNV: case glslang::EOpCooperativeMatrixStoreNV: case glslang::EOpCooperativeMatrixLoadTensorNV: case glslang::EOpCooperativeMatrixStoreTensorNV: case glslang::EOpCooperativeMatrixReduceNV: case glslang::EOpCooperativeMatrixPerElementOpNV: case glslang::EOpCooperativeMatrixTransposeNV: case glslang::EOpCooperativeVectorMatMulNV: case glslang::EOpCooperativeVectorMatMulAddNV: case glslang::EOpCooperativeVectorLoadNV: case glslang::EOpCooperativeVectorStoreNV: case glslang::EOpCooperativeVectorOuterProductAccumulateNV: case glslang::EOpCooperativeVectorReduceSumAccumulateNV: noReturnValue = true; break; case glslang::EOpBeginInvocationInterlock: case glslang::EOpEndInvocationInterlock: builder.addExtension(spv::E_SPV_EXT_fragment_shader_interlock); noReturnValue = true; break; case glslang::EOpHitObjectTraceRayNV: case glslang::EOpHitObjectTraceRayMotionNV: case glslang::EOpHitObjectGetAttributesNV: case glslang::EOpHitObjectExecuteShaderNV: case glslang::EOpHitObjectRecordEmptyNV: case glslang::EOpHitObjectRecordMissNV: case glslang::EOpHitObjectRecordMissMotionNV: case glslang::EOpHitObjectRecordHitNV: case glslang::EOpHitObjectRecordHitMotionNV: case glslang::EOpHitObjectRecordHitWithIndexNV: case glslang::EOpHitObjectRecordHitWithIndexMotionNV: case glslang::EOpReorderThreadNV: noReturnValue = true; [[fallthrough]]; case glslang::EOpHitObjectIsEmptyNV: case glslang::EOpHitObjectIsMissNV: case glslang::EOpHitObjectIsHitNV: case glslang::EOpHitObjectGetRayTMinNV: case glslang::EOpHitObjectGetRayTMaxNV: case glslang::EOpHitObjectGetObjectRayOriginNV: case glslang::EOpHitObjectGetObjectRayDirectionNV: case glslang::EOpHitObjectGetWorldRayOriginNV: case glslang::EOpHitObjectGetWorldRayDirectionNV: case glslang::EOpHitObjectGetObjectToWorldNV: case glslang::EOpHitObjectGetWorldToObjectNV: case glslang::EOpHitObjectGetInstanceCustomIndexNV: case glslang::EOpHitObjectGetInstanceIdNV: case glslang::EOpHitObjectGetGeometryIndexNV: case glslang::EOpHitObjectGetPrimitiveIndexNV: case glslang::EOpHitObjectGetHitKindNV: case glslang::EOpHitObjectGetCurrentTimeNV: case glslang::EOpHitObjectGetShaderBindingTableRecordIndexNV: case glslang::EOpHitObjectGetShaderRecordBufferHandleNV: builder.addExtension(spv::E_SPV_NV_shader_invocation_reorder); builder.addCapability(spv::Capability::ShaderInvocationReorderNV); break; case glslang::EOpHitObjectGetLSSPositionsNV: case glslang::EOpHitObjectGetLSSRadiiNV: builder.addExtension(spv::E_SPV_NV_linear_swept_spheres); builder.addCapability(spv::Capability::ShaderInvocationReorderNV); builder.addCapability(spv::Capability::RayTracingLinearSweptSpheresGeometryNV); noReturnValue = true; break; case glslang::EOpRayQueryGetIntersectionLSSPositionsNV: case glslang::EOpRayQueryGetIntersectionLSSRadiiNV: builder.addExtension(spv::E_SPV_NV_linear_swept_spheres); builder.addCapability(spv::Capability::RayQueryKHR); builder.addCapability(spv::Capability::RayTracingLinearSweptSpheresGeometryNV); noReturnValue = true; break; case glslang::EOpRayQueryGetIntersectionSpherePositionNV: case glslang::EOpRayQueryGetIntersectionSphereRadiusNV: case glslang::EOpRayQueryIsSphereHitNV: builder.addExtension(spv::E_SPV_NV_linear_swept_spheres); builder.addCapability(spv::Capability::RayQueryKHR); builder.addCapability(spv::Capability::RayTracingSpheresGeometryNV); builder.addCapability(spv::Capability::RayTracingLinearSweptSpheresGeometryNV); break; case glslang::EOpRayQueryGetIntersectionLSSHitValueNV: case glslang::EOpRayQueryIsLSSHitNV: builder.addExtension(spv::E_SPV_NV_linear_swept_spheres); builder.addCapability(spv::Capability::RayQueryKHR); builder.addCapability(spv::Capability::RayTracingLinearSweptSpheresGeometryNV); break; case glslang::EOpRayQueryGetIntersectionTriangleVertexPositionsEXT: builder.addExtension(spv::E_SPV_KHR_ray_tracing_position_fetch); builder.addCapability(spv::Capability::RayQueryPositionFetchKHR); noReturnValue = true; break; case glslang::EOpImageSampleWeightedQCOM: builder.addCapability(spv::Capability::TextureSampleWeightedQCOM); builder.addExtension(spv::E_SPV_QCOM_image_processing); break; case glslang::EOpImageBoxFilterQCOM: builder.addCapability(spv::Capability::TextureBoxFilterQCOM); builder.addExtension(spv::E_SPV_QCOM_image_processing); break; case glslang::EOpImageBlockMatchSADQCOM: case glslang::EOpImageBlockMatchSSDQCOM: builder.addCapability(spv::Capability::TextureBlockMatchQCOM); builder.addExtension(spv::E_SPV_QCOM_image_processing); break; case glslang::EOpImageBlockMatchWindowSSDQCOM: case glslang::EOpImageBlockMatchWindowSADQCOM: builder.addCapability(spv::Capability::TextureBlockMatchQCOM); builder.addExtension(spv::E_SPV_QCOM_image_processing); builder.addCapability(spv::Capability::TextureBlockMatch2QCOM); builder.addExtension(spv::E_SPV_QCOM_image_processing2); break; case glslang::EOpImageBlockMatchGatherSSDQCOM: case glslang::EOpImageBlockMatchGatherSADQCOM: builder.addCapability(spv::Capability::TextureBlockMatchQCOM); builder.addExtension(spv::E_SPV_QCOM_image_processing); builder.addCapability(spv::Capability::TextureBlockMatch2QCOM); builder.addExtension(spv::E_SPV_QCOM_image_processing2); break; case glslang::EOpFetchMicroTriangleVertexPositionNV: case glslang::EOpFetchMicroTriangleVertexBarycentricNV: builder.addExtension(spv::E_SPV_NV_displacement_micromap); builder.addCapability(spv::Capability::DisplacementMicromapNV); break; case glslang::EOpRayQueryGetIntersectionClusterIdNV: builder.addExtension(spv::E_SPV_NV_cluster_acceleration_structure); builder.addCapability(spv::Capability::RayQueryKHR); builder.addCapability(spv::Capability::RayTracingClusterAccelerationStructureNV); break; case glslang::EOpDebugPrintf: noReturnValue = true; break; default: break; } // // See if it maps to a regular operation. // if (binOp != glslang::EOpNull) { glslang::TIntermTyped* left = node->getSequence()[0]->getAsTyped(); glslang::TIntermTyped* right = node->getSequence()[1]->getAsTyped(); assert(left && right); builder.clearAccessChain(); left->traverse(this); spv::Id leftId = accessChainLoad(left->getType()); builder.clearAccessChain(); right->traverse(this); spv::Id rightId = accessChainLoad(right->getType()); builder.setDebugSourceLocation(node->getLoc().line, node->getLoc().getFilename()); OpDecorations decorations = { precision, TranslateNoContractionDecoration(node->getType().getQualifier()), TranslateNonUniformDecoration(node->getType().getQualifier()) }; result = createBinaryOperation(binOp, decorations, resultType(), leftId, rightId, left->getType().getBasicType(), reduceComparison); // code above should only make binOp that exists in createBinaryOperation assert(result != spv::NoResult); builder.clearAccessChain(); builder.setAccessChainRValue(result); return false; } // // Create the list of operands. // glslang::TIntermSequence& glslangOperands = node->getSequence(); std::vector operands; std::vector memoryAccessOperands; for (int arg = 0; arg < (int)glslangOperands.size(); ++arg) { // special case l-value operands; there are just a few bool lvalue = false; switch (node->getOp()) { case glslang::EOpModf: if (arg == 1) lvalue = true; break; case glslang::EOpHitObjectRecordHitNV: case glslang::EOpHitObjectRecordHitMotionNV: case glslang::EOpHitObjectRecordHitWithIndexNV: case glslang::EOpHitObjectRecordHitWithIndexMotionNV: case glslang::EOpHitObjectTraceRayNV: case glslang::EOpHitObjectTraceRayMotionNV: case glslang::EOpHitObjectExecuteShaderNV: case glslang::EOpHitObjectRecordMissNV: case glslang::EOpHitObjectRecordMissMotionNV: case glslang::EOpHitObjectGetAttributesNV: case glslang::EOpHitObjectGetClusterIdNV: if (arg == 0) lvalue = true; break; case glslang::EOpHitObjectGetLSSPositionsNV: case glslang::EOpHitObjectGetLSSRadiiNV: lvalue = true; break; case glslang::EOpRayQueryInitialize: case glslang::EOpRayQueryTerminate: case glslang::EOpRayQueryConfirmIntersection: case glslang::EOpRayQueryProceed: case glslang::EOpRayQueryGenerateIntersection: case glslang::EOpRayQueryGetIntersectionType: case glslang::EOpRayQueryGetIntersectionT: case glslang::EOpRayQueryGetIntersectionInstanceCustomIndex: case glslang::EOpRayQueryGetIntersectionInstanceId: case glslang::EOpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffset: case glslang::EOpRayQueryGetIntersectionGeometryIndex: case glslang::EOpRayQueryGetIntersectionPrimitiveIndex: case glslang::EOpRayQueryGetIntersectionBarycentrics: case glslang::EOpRayQueryGetIntersectionFrontFace: case glslang::EOpRayQueryGetIntersectionObjectRayDirection: case glslang::EOpRayQueryGetIntersectionObjectRayOrigin: case glslang::EOpRayQueryGetIntersectionObjectToWorld: case glslang::EOpRayQueryGetIntersectionWorldToObject: case glslang::EOpRayQueryGetIntersectionClusterIdNV: case glslang::EOpRayQueryGetIntersectionSpherePositionNV: case glslang::EOpRayQueryGetIntersectionSphereRadiusNV: case glslang::EOpRayQueryGetIntersectionLSSHitValueNV: case glslang::EOpRayQueryIsSphereHitNV: case glslang::EOpRayQueryIsLSSHitNV: if (arg == 0) lvalue = true; break; case glslang::EOpAtomicAdd: case glslang::EOpAtomicSubtract: case glslang::EOpAtomicMin: case glslang::EOpAtomicMax: case glslang::EOpAtomicAnd: case glslang::EOpAtomicOr: case glslang::EOpAtomicXor: case glslang::EOpAtomicExchange: case glslang::EOpAtomicCompSwap: if (arg == 0) lvalue = true; break; case glslang::EOpFrexp: if (arg == 1) lvalue = true; break; case glslang::EOpInterpolateAtSample: case glslang::EOpInterpolateAtOffset: case glslang::EOpInterpolateAtVertex: if (arg == 0) { // If GLSL, use the address of the interpolant argument. // If HLSL, use an internal version of OpInterolates that takes // the rvalue of the interpolant. A fixup pass in spirv-opt // legalization will remove the OpLoad and convert to an lvalue. // Had to do this because legalization will only propagate a // builtin into an rvalue. lvalue = glslangIntermediate->getSource() != glslang::EShSourceHlsl; // Does it need a swizzle inversion? If so, evaluation is inverted; // operate first on the swizzle base, then apply the swizzle. // That is, we transform // // interpolate(v.zy) -> interpolate(v).zy // if (glslangOperands[0]->getAsOperator() && glslangOperands[0]->getAsOperator()->getOp() == glslang::EOpVectorSwizzle) invertedType = convertGlslangToSpvType( glslangOperands[0]->getAsBinaryNode()->getLeft()->getType()); } break; case glslang::EOpAtomicLoad: case glslang::EOpAtomicStore: case glslang::EOpAtomicCounterAdd: case glslang::EOpAtomicCounterSubtract: case glslang::EOpAtomicCounterMin: case glslang::EOpAtomicCounterMax: case glslang::EOpAtomicCounterAnd: case glslang::EOpAtomicCounterOr: case glslang::EOpAtomicCounterXor: case glslang::EOpAtomicCounterExchange: case glslang::EOpAtomicCounterCompSwap: if (arg == 0) lvalue = true; break; case glslang::EOpAddCarry: case glslang::EOpSubBorrow: if (arg == 2) lvalue = true; break; case glslang::EOpUMulExtended: case glslang::EOpIMulExtended: if (arg >= 2) lvalue = true; break; case glslang::EOpCooperativeMatrixLoad: case glslang::EOpCooperativeMatrixLoadNV: case glslang::EOpCooperativeMatrixLoadTensorNV: case glslang::EOpCooperativeVectorLoadNV: if (arg == 0 || arg == 1) lvalue = true; break; case glslang::EOpCooperativeMatrixStore: case glslang::EOpCooperativeMatrixStoreNV: case glslang::EOpCooperativeMatrixStoreTensorNV: case glslang::EOpCooperativeVectorStoreNV: if (arg == 1) lvalue = true; break; case glslang::EOpCooperativeVectorMatMulNV: if (arg == 0 || arg == 3) lvalue = true; break; case glslang::EOpCooperativeVectorMatMulAddNV: if (arg == 0 || arg == 3 || arg == 6) lvalue = true; break; case glslang::EOpCooperativeVectorOuterProductAccumulateNV: if (arg == 2) lvalue = true; break; case glslang::EOpCooperativeVectorReduceSumAccumulateNV: if (arg == 1) lvalue = true; break; case glslang::EOpCooperativeMatrixReduceNV: case glslang::EOpCooperativeMatrixPerElementOpNV: case glslang::EOpCooperativeMatrixTransposeNV: if (arg == 0) lvalue = true; break; case glslang::EOpSpirvInst: if (glslangOperands[arg]->getAsTyped()->getQualifier().isSpirvByReference()) lvalue = true; break; case glslang::EOpReorderThreadNV: //Three variants of reorderThreadNV, two of them use hitObjectNV if (arg == 0 && glslangOperands.size() != 2) lvalue = true; break; case glslang::EOpRayQueryGetIntersectionTriangleVertexPositionsEXT: case glslang::EOpRayQueryGetIntersectionLSSPositionsNV: case glslang::EOpRayQueryGetIntersectionLSSRadiiNV: if (arg == 0 || arg == 2) lvalue = true; break; default: break; } builder.clearAccessChain(); if (invertedType != spv::NoType && arg == 0) glslangOperands[0]->getAsBinaryNode()->getLeft()->traverse(this); else glslangOperands[arg]->traverse(this); bool isCoopMat = node->getOp() == glslang::EOpCooperativeMatrixLoad || node->getOp() == glslang::EOpCooperativeMatrixStore || node->getOp() == glslang::EOpCooperativeMatrixLoadNV || node->getOp() == glslang::EOpCooperativeMatrixStoreNV || node->getOp() == glslang::EOpCooperativeMatrixLoadTensorNV || node->getOp() == glslang::EOpCooperativeMatrixStoreTensorNV; bool isCoopVec = node->getOp() == glslang::EOpCooperativeVectorLoadNV || node->getOp() == glslang::EOpCooperativeVectorStoreNV; if (isCoopMat || isCoopVec) { if (arg == 1) { spv::Builder::AccessChain::CoherentFlags coherentFlags {}; unsigned int alignment {}; if (isCoopMat) { // fold "element" parameter into the access chain spv::Builder::AccessChain save = builder.getAccessChain(); builder.clearAccessChain(); glslangOperands[2]->traverse(this); spv::Id elementId = accessChainLoad(glslangOperands[2]->getAsTyped()->getType()); builder.setAccessChain(save); // Point to the first element of the array. builder.accessChainPush(elementId, TranslateCoherent(glslangOperands[arg]->getAsTyped()->getType()), glslangOperands[arg]->getAsTyped()->getType().getBufferReferenceAlignment()); coherentFlags = builder.getAccessChain().coherentFlags; alignment = builder.getAccessChain().alignment; } else { coherentFlags = builder.getAccessChain().coherentFlags; coherentFlags |= TranslateCoherent(glslangOperands[arg]->getAsTyped()->getType()); alignment = 16; } spv::MemoryAccessMask memoryAccess = TranslateMemoryAccess(coherentFlags); if (node->getOp() == glslang::EOpCooperativeMatrixLoad || node->getOp() == glslang::EOpCooperativeMatrixLoadNV || node->getOp() == glslang::EOpCooperativeMatrixLoadTensorNV || node->getOp() == glslang::EOpCooperativeVectorLoadNV) memoryAccess = (memoryAccess & ~spv::MemoryAccessMask::MakePointerAvailableKHR); if (node->getOp() == glslang::EOpCooperativeMatrixStore || node->getOp() == glslang::EOpCooperativeMatrixStoreNV || node->getOp() == glslang::EOpCooperativeMatrixStoreTensorNV || node->getOp() == glslang::EOpCooperativeVectorStoreNV) memoryAccess = (memoryAccess & ~spv::MemoryAccessMask::MakePointerVisibleKHR); if (builder.getStorageClass(builder.getAccessChain().base) == spv::StorageClass::PhysicalStorageBufferEXT) { memoryAccess = (spv::MemoryAccessMask)(memoryAccess | spv::MemoryAccessMask::Aligned); } memoryAccessOperands.push_back(spv::IdImmediate(false, memoryAccess)); if (anySet(memoryAccess, spv::MemoryAccessMask::Aligned)) { memoryAccessOperands.push_back(spv::IdImmediate(false, alignment)); } if (anySet(memoryAccess, spv::MemoryAccessMask::MakePointerAvailableKHR | spv::MemoryAccessMask::MakePointerVisibleKHR)) { memoryAccessOperands.push_back(spv::IdImmediate(true, builder.makeUintConstant(TranslateMemoryScope(coherentFlags)))); } } else if (isCoopMat && arg == 2) { continue; } } // for l-values, pass the address, for r-values, pass the value if (lvalue) { if (invertedType == spv::NoType && !builder.isSpvLvalue()) { // SPIR-V cannot represent an l-value containing a swizzle that doesn't // reduce to a simple access chain. So, we need a temporary vector to // receive the result, and must later swizzle that into the original // l-value. complexLvalues.push_back(builder.getAccessChain()); temporaryLvalues.push_back(builder.createVariable( spv::NoPrecision, spv::StorageClass::Function, builder.accessChainGetInferredType(), "swizzleTemp")); operands.push_back(temporaryLvalues.back()); } else { operands.push_back(builder.accessChainGetLValue()); } lvalueCoherentFlags = builder.getAccessChain().coherentFlags; lvalueCoherentFlags |= TranslateCoherent(glslangOperands[arg]->getAsTyped()->getType()); } else { builder.setDebugSourceLocation(node->getLoc().line, node->getLoc().getFilename()); glslang::TOperator glslangOp = node->getOp(); if (arg == 1 && (glslangOp == glslang::EOpRayQueryGetIntersectionType || glslangOp == glslang::EOpRayQueryGetIntersectionT || glslangOp == glslang::EOpRayQueryGetIntersectionInstanceCustomIndex || glslangOp == glslang::EOpRayQueryGetIntersectionInstanceId || glslangOp == glslang::EOpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffset || glslangOp == glslang::EOpRayQueryGetIntersectionGeometryIndex || glslangOp == glslang::EOpRayQueryGetIntersectionPrimitiveIndex || glslangOp == glslang::EOpRayQueryGetIntersectionBarycentrics || glslangOp == glslang::EOpRayQueryGetIntersectionFrontFace || glslangOp == glslang::EOpRayQueryGetIntersectionObjectRayDirection || glslangOp == glslang::EOpRayQueryGetIntersectionObjectRayOrigin || glslangOp == glslang::EOpRayQueryGetIntersectionObjectToWorld || glslangOp == glslang::EOpRayQueryGetIntersectionWorldToObject || glslangOp == glslang::EOpRayQueryGetIntersectionTriangleVertexPositionsEXT || glslangOp == glslang::EOpRayQueryGetIntersectionClusterIdNV || glslangOp == glslang::EOpRayQueryGetIntersectionSpherePositionNV || glslangOp == glslang::EOpRayQueryGetIntersectionSphereRadiusNV || glslangOp == glslang::EOpRayQueryGetIntersectionLSSHitValueNV || glslangOp == glslang::EOpRayQueryGetIntersectionLSSPositionsNV || glslangOp == glslang::EOpRayQueryGetIntersectionLSSRadiiNV || glslangOp == glslang::EOpRayQueryIsLSSHitNV || glslangOp == glslang::EOpRayQueryIsSphereHitNV )) { bool cond = glslangOperands[arg]->getAsConstantUnion()->getConstArray()[0].getBConst(); operands.push_back(builder.makeIntConstant(cond ? 1 : 0)); } else if ((arg == 10 && glslangOp == glslang::EOpTraceKHR) || (arg == 11 && glslangOp == glslang::EOpTraceRayMotionNV) || (arg == 1 && glslangOp == glslang::EOpExecuteCallableKHR) || (arg == 1 && glslangOp == glslang::EOpHitObjectExecuteShaderNV) || (arg == 11 && glslangOp == glslang::EOpHitObjectTraceRayNV) || (arg == 12 && glslangOp == glslang::EOpHitObjectTraceRayMotionNV)) { const int set = glslangOp == glslang::EOpExecuteCallableKHR ? 1 : 0; const int location = glslangOperands[arg]->getAsConstantUnion()->getConstArray()[0].getUConst(); auto itNode = locationToSymbol[set].find(location); visitSymbol(itNode->second); spv::Id symId = getSymbolId(itNode->second); operands.push_back(symId); } else if ((arg == 12 && glslangOp == glslang::EOpHitObjectRecordHitNV) || (arg == 13 && glslangOp == glslang::EOpHitObjectRecordHitMotionNV) || (arg == 11 && glslangOp == glslang::EOpHitObjectRecordHitWithIndexNV) || (arg == 12 && glslangOp == glslang::EOpHitObjectRecordHitWithIndexMotionNV) || (arg == 1 && glslangOp == glslang::EOpHitObjectGetAttributesNV)) { const int location = glslangOperands[arg]->getAsConstantUnion()->getConstArray()[0].getUConst(); const int set = 2; auto itNode = locationToSymbol[set].find(location); visitSymbol(itNode->second); spv::Id symId = getSymbolId(itNode->second); operands.push_back(symId); } else if (glslangOperands[arg]->getAsTyped()->getQualifier().isSpirvLiteral()) { // Will be translated to a literal value, make a placeholder here operands.push_back(spv::NoResult); } else if (glslangOperands[arg]->getAsTyped()->getBasicType() == glslang::EbtFunction) { spv::Function* function = functionMap[glslangOperands[arg]->getAsSymbolNode()->getMangledName().c_str()]; assert(function); operands.push_back(function->getId()); } else { operands.push_back(accessChainLoad(glslangOperands[arg]->getAsTyped()->getType())); } } } builder.setDebugSourceLocation(node->getLoc().line, node->getLoc().getFilename()); if (node->getOp() == glslang::EOpCooperativeMatrixLoadTensorNV) { std::vector idImmOps; builder.addCapability(spv::Capability::CooperativeMatrixTensorAddressingNV); builder.addExtension(spv::E_SPV_NV_cooperative_matrix2); spv::Id object = builder.createLoad(operands[0], spv::NoPrecision); idImmOps.push_back(spv::IdImmediate(true, operands[1])); // Pointer idImmOps.push_back(spv::IdImmediate(true, object)); // Object idImmOps.push_back(spv::IdImmediate(true, operands[2])); // tensorLayout idImmOps.insert(idImmOps.end(), memoryAccessOperands.begin(), memoryAccessOperands.end()); // memoryaccess // initialize tensor operands to zero, then OR in flags based on the operands size_t tensorOpIdx = idImmOps.size(); idImmOps.push_back(spv::IdImmediate(false, 0)); for (uint32_t i = 3; i < operands.size(); ++i) { if (builder.isTensorView(operands[i])) { addMask(idImmOps[tensorOpIdx].word, spv::TensorAddressingOperandsMask::TensorView); } else { // must be the decode func addMask(idImmOps[tensorOpIdx].word, spv::TensorAddressingOperandsMask::DecodeFunc); builder.addCapability(spv::Capability::CooperativeMatrixBlockLoadsNV); } idImmOps.push_back(spv::IdImmediate(true, operands[i])); // tensorView or decodeFunc } // get the pointee type spv::Id typeId = builder.getContainedTypeId(builder.getTypeId(operands[0])); assert(builder.isCooperativeMatrixType(typeId)); // do the op spv::Id result = builder.createOp(spv::Op::OpCooperativeMatrixLoadTensorNV, typeId, idImmOps); // store the result to the pointer (out param 'm') builder.createStore(result, operands[0]); result = 0; } else if (node->getOp() == glslang::EOpCooperativeMatrixLoad || node->getOp() == glslang::EOpCooperativeMatrixLoadNV) { std::vector idImmOps; idImmOps.push_back(spv::IdImmediate(true, operands[1])); // buf if (node->getOp() == glslang::EOpCooperativeMatrixLoad) { idImmOps.push_back(spv::IdImmediate(true, operands[3])); // matrixLayout auto layout = (spv::CooperativeMatrixLayout)builder.getConstantScalar(operands[3]); if (layout == spv::CooperativeMatrixLayout::RowBlockedInterleavedARM || layout == spv::CooperativeMatrixLayout::ColumnBlockedInterleavedARM) { builder.addExtension(spv::E_SPV_ARM_cooperative_matrix_layouts); builder.addCapability(spv::Capability::CooperativeMatrixLayoutsARM); } idImmOps.push_back(spv::IdImmediate(true, operands[2])); // stride } else { idImmOps.push_back(spv::IdImmediate(true, operands[2])); // stride idImmOps.push_back(spv::IdImmediate(true, operands[3])); // colMajor } idImmOps.insert(idImmOps.end(), memoryAccessOperands.begin(), memoryAccessOperands.end()); // get the pointee type spv::Id typeId = builder.getContainedTypeId(builder.getTypeId(operands[0])); assert(builder.isCooperativeMatrixType(typeId)); // do the op spv::Id result = node->getOp() == glslang::EOpCooperativeMatrixLoad ? builder.createOp(spv::Op::OpCooperativeMatrixLoadKHR, typeId, idImmOps) : builder.createOp(spv::Op::OpCooperativeMatrixLoadNV, typeId, idImmOps); // store the result to the pointer (out param 'm') builder.createStore(result, operands[0]); result = 0; } else if (node->getOp() == glslang::EOpCooperativeMatrixStoreTensorNV) { std::vector idImmOps; idImmOps.push_back(spv::IdImmediate(true, operands[1])); // buf idImmOps.push_back(spv::IdImmediate(true, operands[0])); // object builder.addCapability(spv::Capability::CooperativeMatrixTensorAddressingNV); builder.addExtension(spv::E_SPV_NV_cooperative_matrix2); idImmOps.push_back(spv::IdImmediate(true, operands[2])); // tensorLayout idImmOps.insert(idImmOps.end(), memoryAccessOperands.begin(), memoryAccessOperands.end()); // memoryaccess if (operands.size() > 3) { idImmOps.push_back(spv::IdImmediate(false, spv::TensorAddressingOperandsMask::TensorView)); idImmOps.push_back(spv::IdImmediate(true, operands[3])); // tensorView } else { idImmOps.push_back(spv::IdImmediate(false, 0)); } builder.createNoResultOp(spv::Op::OpCooperativeMatrixStoreTensorNV, idImmOps); result = 0; } else if (node->getOp() == glslang::EOpCooperativeMatrixStore || node->getOp() == glslang::EOpCooperativeMatrixStoreNV) { std::vector idImmOps; idImmOps.push_back(spv::IdImmediate(true, operands[1])); // buf idImmOps.push_back(spv::IdImmediate(true, operands[0])); // object if (node->getOp() == glslang::EOpCooperativeMatrixStore) { idImmOps.push_back(spv::IdImmediate(true, operands[3])); // matrixLayout auto layout = (spv::CooperativeMatrixLayout)builder.getConstantScalar(operands[3]); if (layout == spv::CooperativeMatrixLayout::RowBlockedInterleavedARM || layout == spv::CooperativeMatrixLayout::ColumnBlockedInterleavedARM) { builder.addExtension(spv::E_SPV_ARM_cooperative_matrix_layouts); builder.addCapability(spv::Capability::CooperativeMatrixLayoutsARM); } idImmOps.push_back(spv::IdImmediate(true, operands[2])); // stride } else { idImmOps.push_back(spv::IdImmediate(true, operands[2])); // stride idImmOps.push_back(spv::IdImmediate(true, operands[3])); // colMajor } idImmOps.insert(idImmOps.end(), memoryAccessOperands.begin(), memoryAccessOperands.end()); if (node->getOp() == glslang::EOpCooperativeMatrixStore) builder.createNoResultOp(spv::Op::OpCooperativeMatrixStoreKHR, idImmOps); else builder.createNoResultOp(spv::Op::OpCooperativeMatrixStoreNV, idImmOps); result = 0; } else if (node->getOp() == glslang::EOpRayQueryGetIntersectionTriangleVertexPositionsEXT) { std::vector idImmOps; idImmOps.push_back(spv::IdImmediate(true, operands[0])); // q idImmOps.push_back(spv::IdImmediate(true, operands[1])); // committed spv::Id typeId = builder.makeArrayType(builder.makeVectorType(builder.makeFloatType(32), 3), builder.makeUintConstant(3), 0); // do the op spv::Op spvOp = spv::Op::OpRayQueryGetIntersectionTriangleVertexPositionsKHR; spv::Id result = builder.createOp(spvOp, typeId, idImmOps); // store the result to the pointer (out param 'm') builder.createStore(result, operands[2]); result = 0; } else if (node->getOp() == glslang::EOpRayQueryGetIntersectionLSSPositionsNV) { std::vector idImmOps; idImmOps.push_back(spv::IdImmediate(true, operands[0])); // q idImmOps.push_back(spv::IdImmediate(true, operands[1])); // committed spv::Id typeId = builder.makeArrayType(builder.makeVectorType(builder.makeFloatType(32), 3), builder.makeUintConstant(2), 0); // do the op spv::Op spvOp = spv::Op::OpRayQueryGetIntersectionLSSPositionsNV; spv::Id result = builder.createOp(spvOp, typeId, idImmOps); // store the result to the pointer (out param 'm') builder.createStore(result, operands[2]); result = 0; } else if (node->getOp() == glslang::EOpRayQueryGetIntersectionLSSRadiiNV) { std::vector idImmOps; idImmOps.push_back(spv::IdImmediate(true, operands[0])); // q idImmOps.push_back(spv::IdImmediate(true, operands[1])); // committed spv::Id typeId = builder.makeArrayType(builder.makeFloatType(32), builder.makeUintConstant(2), 0); // do the op spv::Op spvOp = spv::Op::OpRayQueryGetIntersectionLSSRadiiNV; spv::Id result = builder.createOp(spvOp, typeId, idImmOps); // store the result to the pointer (out param 'm') builder.createStore(result, operands[2]); result = 0; } else if (node->getOp() == glslang::EOpHitObjectGetLSSPositionsNV) { std::vector idImmOps; idImmOps.push_back(spv::IdImmediate(true, operands[0])); // hitObject spv::Op spvOp = spv::Op::OpHitObjectGetLSSPositionsNV; spv::Id typeId = builder.makeArrayType(builder.makeVectorType(builder.makeFloatType(32), 3), builder.makeUintConstant(2), 0); spv::Id result = builder.createOp(spvOp, typeId, idImmOps); // store the result to the pointer (out param 'm') builder.createStore(result, operands[1]); result = 0; } else if (node->getOp() == glslang::EOpHitObjectGetLSSRadiiNV) { std::vector idImmOps; idImmOps.push_back(spv::IdImmediate(true, operands[0])); // hitObject spv::Op spvOp = spv::Op::OpHitObjectGetLSSRadiiNV; spv::Id typeId = builder.makeArrayType(builder.makeFloatType(32), builder.makeUintConstant(2), 0); spv::Id result = builder.createOp(spvOp, typeId, idImmOps); // store the result to the pointer (out param 'm') builder.createStore(result, operands[1]); result = 0; } else if (node->getOp() == glslang::EOpCooperativeMatrixMulAdd) { auto matrixOperands = spv::CooperativeMatrixOperandsMask::MaskNone; // If the optional operand is present, initialize matrixOperands to that value. if (glslangOperands.size() == 4 && glslangOperands[3]->getAsConstantUnion()) { matrixOperands = (spv::CooperativeMatrixOperandsMask)glslangOperands[3]->getAsConstantUnion()->getConstArray()[0].getIConst(); } // Determine Cooperative Matrix Operands bits from the signedness of the types. if (isTypeSignedInt(glslangOperands[0]->getAsTyped()->getBasicType())) addMask(matrixOperands, spv::CooperativeMatrixOperandsMask::MatrixASignedComponentsKHR); if (isTypeSignedInt(glslangOperands[1]->getAsTyped()->getBasicType())) addMask(matrixOperands, spv::CooperativeMatrixOperandsMask::MatrixBSignedComponentsKHR); if (isTypeSignedInt(glslangOperands[2]->getAsTyped()->getBasicType())) addMask(matrixOperands, spv::CooperativeMatrixOperandsMask::MatrixCSignedComponentsKHR); if (isTypeSignedInt(node->getBasicType())) addMask(matrixOperands, spv::CooperativeMatrixOperandsMask::MatrixResultSignedComponentsKHR); std::vector idImmOps; idImmOps.push_back(spv::IdImmediate(true, operands[0])); idImmOps.push_back(spv::IdImmediate(true, operands[1])); idImmOps.push_back(spv::IdImmediate(true, operands[2])); if (matrixOperands != spv::CooperativeMatrixOperandsMask::MaskNone) idImmOps.push_back(spv::IdImmediate(false, matrixOperands)); result = builder.createOp(spv::Op::OpCooperativeMatrixMulAddKHR, resultType(), idImmOps); } else if (node->getOp() == glslang::EOpCooperativeMatrixReduceNV) { builder.addCapability(spv::Capability::CooperativeMatrixReductionsNV); builder.addExtension(spv::E_SPV_NV_cooperative_matrix2); spv::Op opcode = spv::Op::OpCooperativeMatrixReduceNV; unsigned mask = glslangOperands[2]->getAsConstantUnion()->getConstArray()[0].getUConst(); spv::Id typeId = builder.getContainedTypeId(builder.getTypeId(operands[0])); assert(builder.isCooperativeMatrixType(typeId)); result = builder.createCooperativeMatrixReduce(opcode, typeId, operands[1], mask, operands[3]); // store the result to the pointer (out param 'm') builder.createStore(result, operands[0]); result = 0; } else if (node->getOp() == glslang::EOpCooperativeMatrixPerElementOpNV) { builder.addCapability(spv::Capability::CooperativeMatrixPerElementOperationsNV); builder.addExtension(spv::E_SPV_NV_cooperative_matrix2); spv::Id typeId = builder.getContainedTypeId(builder.getTypeId(operands[0])); assert(builder.isCooperativeMatrixType(typeId)); result = builder.createCooperativeMatrixPerElementOp(typeId, operands); // store the result to the pointer builder.createStore(result, operands[0]); result = 0; } else if (node->getOp() == glslang::EOpCooperativeMatrixTransposeNV) { builder.addCapability(spv::Capability::CooperativeMatrixConversionsNV); builder.addExtension(spv::E_SPV_NV_cooperative_matrix2); spv::Id typeId = builder.getContainedTypeId(builder.getTypeId(operands[0])); assert(builder.isCooperativeMatrixType(typeId)); result = builder.createUnaryOp(spv::Op::OpCooperativeMatrixTransposeNV, typeId, operands[1]); // store the result to the pointer builder.createStore(result, operands[0]); result = 0; } else if (node->getOp() == glslang::EOpCooperativeVectorMatMulNV || node->getOp() == glslang::EOpCooperativeVectorMatMulAddNV) { auto matrixOperands = spv::CooperativeMatrixOperandsMask::MaskNone; bool isMulAdd = node->getOp() == glslang::EOpCooperativeVectorMatMulAddNV; // Determine Cooperative Matrix Operands bits from the signedness of the types. if (isTypeSignedInt(glslangOperands[1]->getAsTyped()->getBasicType())) addMask(matrixOperands, spv::CooperativeMatrixOperandsMask::MatrixBSignedComponentsKHR); if (isTypeSignedInt(glslangOperands[0]->getAsTyped()->getBasicType())) addMask(matrixOperands, spv::CooperativeMatrixOperandsMask::MatrixResultSignedComponentsKHR); uint32_t opIdx = 1; std::vector idImmOps; idImmOps.push_back(spv::IdImmediate(true, operands[opIdx++])); // Input idImmOps.push_back(spv::IdImmediate(true, operands[opIdx++])); // InputInterpretation idImmOps.push_back(spv::IdImmediate(true, operands[opIdx++])); // Matrix idImmOps.push_back(spv::IdImmediate(true, operands[opIdx++])); // MatrixOffset idImmOps.push_back(spv::IdImmediate(true, operands[opIdx++])); // MatrixInterpretation if (isMulAdd) { idImmOps.push_back(spv::IdImmediate(true, operands[opIdx++])); // Bias idImmOps.push_back(spv::IdImmediate(true, operands[opIdx++])); // BiasOffset idImmOps.push_back(spv::IdImmediate(true, operands[opIdx++])); // BiasInterpretation } idImmOps.push_back(spv::IdImmediate(true, operands[opIdx++])); // M idImmOps.push_back(spv::IdImmediate(true, operands[opIdx++])); // K idImmOps.push_back(spv::IdImmediate(true, operands[opIdx++])); // MemoryLayout idImmOps.push_back(spv::IdImmediate(true, operands[opIdx++])); // Transpose idImmOps.push_back(spv::IdImmediate(true, operands[opIdx++])); // MatrixStride if (matrixOperands != spv::CooperativeMatrixOperandsMask::MaskNone) idImmOps.push_back(spv::IdImmediate(false, matrixOperands)); // Cooperative Matrix Operands // get the pointee type spv::Id typeId = builder.getContainedTypeId(builder.getTypeId(operands[0])); assert(builder.isCooperativeVectorType(typeId)); // do the op spv::Id result = builder.createOp(isMulAdd ? spv::Op::OpCooperativeVectorMatrixMulAddNV : spv::Op::OpCooperativeVectorMatrixMulNV, typeId, idImmOps); // store the result to the pointer (out param 'res') builder.createStore(result, operands[0]); result = 0; } else if (node->getOp() == glslang::EOpCooperativeVectorLoadNV) { std::vector idImmOps; idImmOps.push_back(spv::IdImmediate(true, operands[1])); // buf idImmOps.push_back(spv::IdImmediate(true, operands[2])); // offset idImmOps.insert(idImmOps.end(), memoryAccessOperands.begin(), memoryAccessOperands.end()); // get the pointee type spv::Id typeId = builder.getContainedTypeId(builder.getTypeId(operands[0])); assert(builder.isCooperativeVectorType(typeId)); // do the op spv::Id result = builder.createOp(spv::Op::OpCooperativeVectorLoadNV, typeId, idImmOps); // store the result to the pointer (out param 'v') builder.createStore(result, operands[0]); result = 0; } else if (node->getOp() == glslang::EOpCooperativeVectorStoreNV) { std::vector idImmOps; idImmOps.push_back(spv::IdImmediate(true, operands[1])); // buf idImmOps.push_back(spv::IdImmediate(true, operands[2])); // offset idImmOps.push_back(spv::IdImmediate(true, operands[0])); // object idImmOps.insert(idImmOps.end(), memoryAccessOperands.begin(), memoryAccessOperands.end()); builder.createNoResultOp(spv::Op::OpCooperativeVectorStoreNV, idImmOps); result = 0; } else if (node->getOp() == glslang::EOpCooperativeVectorOuterProductAccumulateNV) { builder.addCapability(spv::Capability::CooperativeVectorTrainingNV); builder.addExtension(spv::E_SPV_NV_cooperative_vector); std::vector idImmOps; idImmOps.push_back(spv::IdImmediate(true, operands[2])); // Matrix idImmOps.push_back(spv::IdImmediate(true, operands[3])); // Offset idImmOps.push_back(spv::IdImmediate(true, operands[0])); // A idImmOps.push_back(spv::IdImmediate(true, operands[1])); // B idImmOps.push_back(spv::IdImmediate(true, operands[5])); // MemoryLayout idImmOps.push_back(spv::IdImmediate(true, operands[6])); // MatrixInterpretation idImmOps.push_back(spv::IdImmediate(true, operands[4])); // Stride builder.createNoResultOp(spv::Op::OpCooperativeVectorOuterProductAccumulateNV, idImmOps); result = 0; } else if (node->getOp() == glslang::EOpCooperativeVectorReduceSumAccumulateNV) { builder.addCapability(spv::Capability::CooperativeVectorTrainingNV); builder.addExtension(spv::E_SPV_NV_cooperative_vector); std::vector idImmOps; idImmOps.push_back(spv::IdImmediate(true, operands[1])); // Buf idImmOps.push_back(spv::IdImmediate(true, operands[2])); // Offset idImmOps.push_back(spv::IdImmediate(true, operands[0])); // A builder.createNoResultOp(spv::Op::OpCooperativeVectorReduceSumAccumulateNV, idImmOps); result = 0; } else if (atomic) { // Handle all atomics glslang::TBasicType typeProxy = (node->getOp() == glslang::EOpAtomicStore) ? node->getSequence()[0]->getAsTyped()->getBasicType() : node->getBasicType(); result = createAtomicOperation(node->getOp(), precision, resultType(), operands, typeProxy, lvalueCoherentFlags, node->getType()); } else if (node->getOp() == glslang::EOpSpirvInst) { const auto& spirvInst = node->getSpirvInstruction(); if (spirvInst.set == "") { std::vector idImmOps; for (unsigned int i = 0; i < glslangOperands.size(); ++i) { if (glslangOperands[i]->getAsTyped()->getQualifier().isSpirvLiteral()) { // Translate the constant to a literal value std::vector literals; glslang::TVector constants; constants.push_back(glslangOperands[i]->getAsConstantUnion()); TranslateLiterals(constants, literals); idImmOps.push_back({false, literals[0]}); } else idImmOps.push_back({true, operands[i]}); } if (node->getBasicType() == glslang::EbtVoid) builder.createNoResultOp(static_cast(spirvInst.id), idImmOps); else result = builder.createOp(static_cast(spirvInst.id), resultType(), idImmOps); } else { result = builder.createBuiltinCall( resultType(), spirvInst.set == "GLSL.std.450" ? stdBuiltins : getExtBuiltins(spirvInst.set.c_str()), spirvInst.id, operands); } noReturnValue = node->getBasicType() == glslang::EbtVoid; } else if (node->getOp() == glslang::EOpDebugPrintf) { if (!nonSemanticDebugPrintf) { nonSemanticDebugPrintf = builder.import("NonSemantic.DebugPrintf"); } result = builder.createBuiltinCall(builder.makeVoidType(), nonSemanticDebugPrintf, spv::NonSemanticDebugPrintfDebugPrintf, operands); builder.addExtension(spv::E_SPV_KHR_non_semantic_info); } else { // Pass through to generic operations. switch (glslangOperands.size()) { case 0: result = createNoArgOperation(node->getOp(), precision, resultType()); break; case 1: { OpDecorations decorations = { precision, TranslateNoContractionDecoration(node->getType().getQualifier()), TranslateNonUniformDecoration(node->getType().getQualifier()) }; result = createUnaryOperation( node->getOp(), decorations, resultType(), operands.front(), glslangOperands[0]->getAsTyped()->getBasicType(), lvalueCoherentFlags, node->getType()); } break; default: result = createMiscOperation(node->getOp(), precision, resultType(), operands, node->getBasicType()); break; } if (invertedType != spv::NoResult) result = createInvertedSwizzle(precision, *glslangOperands[0]->getAsBinaryNode(), result); for (unsigned int i = 0; i < temporaryLvalues.size(); ++i) { builder.setAccessChain(complexLvalues[i]); builder.accessChainStore(builder.createLoad(temporaryLvalues[i], spv::NoPrecision), TranslateNonUniformDecoration(complexLvalues[i].coherentFlags)); } } if (noReturnValue) return false; if (! result) { logger->missingFunctionality("unknown glslang aggregate"); return true; // pick up a child as a placeholder operand } else { builder.clearAccessChain(); builder.setAccessChainRValue(result); return false; } } // This path handles both if-then-else and ?: // The if-then-else has a node type of void, while // ?: has either a void or a non-void node type // // Leaving the result, when not void: // GLSL only has r-values as the result of a :?, but // if we have an l-value, that can be more efficient if it will // become the base of a complex r-value expression, because the // next layer copies r-values into memory to use the access-chain mechanism bool TGlslangToSpvTraverser::visitSelection(glslang::TVisit /* visit */, glslang::TIntermSelection* node) { // see if OpSelect can handle it const auto isOpSelectable = [&]() { if (node->getBasicType() == glslang::EbtVoid) return false; // OpSelect can do all other types starting with SPV 1.4 if (glslangIntermediate->getSpv().spv < glslang::EShTargetSpv_1_4) { // pre-1.4, only scalars and vectors can be handled if ((!node->getType().isScalar() && !node->getType().isVector())) return false; } return true; }; // See if it simple and safe, or required, to execute both sides. // Crucially, side effects must be either semantically required or avoided, // and there are performance trade-offs. // Return true if required or a good idea (and safe) to execute both sides, // false otherwise. const auto bothSidesPolicy = [&]() -> bool { // do we have both sides? if (node->getTrueBlock() == nullptr || node->getFalseBlock() == nullptr) return false; // required? (unless we write additional code to look for side effects // and make performance trade-offs if none are present) if (!node->getShortCircuit()) return true; // if not required to execute both, decide based on performance/practicality... if (!isOpSelectable()) return false; assert(node->getType() == node->getTrueBlock() ->getAsTyped()->getType() && node->getType() == node->getFalseBlock()->getAsTyped()->getType()); // return true if a single operand to ? : is okay for OpSelect const auto operandOkay = [](glslang::TIntermTyped* node) { return node->getAsSymbolNode() || node->getType().getQualifier().isConstant(); }; return operandOkay(node->getTrueBlock() ->getAsTyped()) && operandOkay(node->getFalseBlock()->getAsTyped()); }; spv::Id result = spv::NoResult; // upcoming result selecting between trueValue and falseValue // emit the condition before doing anything with selection node->getCondition()->traverse(this); spv::Id condition = accessChainLoad(node->getCondition()->getType()); // Find a way of executing both sides and selecting the right result. const auto executeBothSides = [&]() -> void { // execute both sides spv::Id resultType = convertGlslangToSpvType(node->getType()); node->getTrueBlock()->traverse(this); spv::Id trueValue = accessChainLoad(node->getTrueBlock()->getAsTyped()->getType()); node->getFalseBlock()->traverse(this); spv::Id falseValue = accessChainLoad(node->getFalseBlock()->getAsTyped()->getType()); builder.setDebugSourceLocation(node->getLoc().line, node->getLoc().getFilename()); // done if void if (node->getBasicType() == glslang::EbtVoid) return; // emit code to select between trueValue and falseValue // see if OpSelect can handle the result type, and that the SPIR-V types // of the inputs match the result type. if (isOpSelectable()) { // Emit OpSelect for this selection. // smear condition to vector, if necessary (AST is always scalar) // Before 1.4, smear like for mix(), starting with 1.4, keep it scalar if (glslangIntermediate->getSpv().spv < glslang::EShTargetSpv_1_4 && builder.isVector(trueValue)) { condition = builder.smearScalar(spv::NoPrecision, condition, builder.makeVectorType(builder.makeBoolType(), builder.getNumComponents(trueValue))); } // If the types do not match, it is because of mismatched decorations on aggregates. // Since isOpSelectable only lets us get here for SPIR-V >= 1.4, we can use OpCopyObject // to get matching types. if (builder.getTypeId(trueValue) != resultType) { trueValue = builder.createUnaryOp(spv::Op::OpCopyLogical, resultType, trueValue); } if (builder.getTypeId(falseValue) != resultType) { falseValue = builder.createUnaryOp(spv::Op::OpCopyLogical, resultType, falseValue); } // OpSelect result = builder.createTriOp(spv::Op::OpSelect, resultType, condition, trueValue, falseValue); builder.clearAccessChain(); builder.setAccessChainRValue(result); } else { // We need control flow to select the result. // TODO: Once SPIR-V OpSelect allows arbitrary types, eliminate this path. result = builder.createVariable(TranslatePrecisionDecoration(node->getType()), spv::StorageClass::Function, resultType); // Selection control: const spv::SelectionControlMask control = TranslateSelectionControl(*node); // make an "if" based on the value created by the condition spv::Builder::If ifBuilder(condition, control, builder); // emit the "then" statement builder.clearAccessChain(); builder.setAccessChainLValue(result); multiTypeStore(node->getType(), trueValue); ifBuilder.makeBeginElse(); // emit the "else" statement builder.clearAccessChain(); builder.setAccessChainLValue(result); multiTypeStore(node->getType(), falseValue); // finish off the control flow ifBuilder.makeEndIf(); builder.clearAccessChain(); builder.setAccessChainLValue(result); } }; // Execute the one side needed, as per the condition const auto executeOneSide = [&]() { // Always emit control flow. if (node->getBasicType() != glslang::EbtVoid) { result = builder.createVariable(TranslatePrecisionDecoration(node->getType()), spv::StorageClass::Function, convertGlslangToSpvType(node->getType())); } // Selection control: const spv::SelectionControlMask control = TranslateSelectionControl(*node); // make an "if" based on the value created by the condition spv::Builder::If ifBuilder(condition, control, builder); // emit the "then" statement if (node->getTrueBlock() != nullptr) { node->getTrueBlock()->traverse(this); if (result != spv::NoResult) { spv::Id load = accessChainLoad(node->getTrueBlock()->getAsTyped()->getType()); builder.clearAccessChain(); builder.setAccessChainLValue(result); multiTypeStore(node->getType(), load); } } if (node->getFalseBlock() != nullptr) { ifBuilder.makeBeginElse(); // emit the "else" statement node->getFalseBlock()->traverse(this); if (result != spv::NoResult) { spv::Id load = accessChainLoad(node->getFalseBlock()->getAsTyped()->getType()); builder.clearAccessChain(); builder.setAccessChainLValue(result); multiTypeStore(node->getType(), load); } } // finish off the control flow ifBuilder.makeEndIf(); if (result != spv::NoResult) { builder.clearAccessChain(); builder.setAccessChainLValue(result); } }; // Try for OpSelect (or a requirement to execute both sides) if (bothSidesPolicy()) { SpecConstantOpModeGuard spec_constant_op_mode_setter(&builder); if (node->getType().getQualifier().isSpecConstant()) spec_constant_op_mode_setter.turnOnSpecConstantOpMode(); executeBothSides(); } else executeOneSide(); return false; } bool TGlslangToSpvTraverser::visitSwitch(glslang::TVisit /* visit */, glslang::TIntermSwitch* node) { // emit and get the condition before doing anything with switch node->getCondition()->traverse(this); spv::Id selector = accessChainLoad(node->getCondition()->getAsTyped()->getType()); // Selection control: const spv::SelectionControlMask control = TranslateSwitchControl(*node); // browse the children to sort out code segments int defaultSegment = -1; std::vector codeSegments; glslang::TIntermSequence& sequence = node->getBody()->getSequence(); std::vector caseValues; std::vector valueIndexToSegment(sequence.size()); // note: probably not all are used, it is an overestimate for (glslang::TIntermSequence::iterator c = sequence.begin(); c != sequence.end(); ++c) { TIntermNode* child = *c; if (child->getAsBranchNode() && child->getAsBranchNode()->getFlowOp() == glslang::EOpDefault) defaultSegment = (int)codeSegments.size(); else if (child->getAsBranchNode() && child->getAsBranchNode()->getFlowOp() == glslang::EOpCase) { valueIndexToSegment[caseValues.size()] = (int)codeSegments.size(); caseValues.push_back(child->getAsBranchNode()->getExpression()->getAsConstantUnion() ->getConstArray()[0].getIConst()); } else codeSegments.push_back(child); } // handle the case where the last code segment is missing, due to no code // statements between the last case and the end of the switch statement if ((caseValues.size() && (int)codeSegments.size() == valueIndexToSegment[caseValues.size() - 1]) || (int)codeSegments.size() == defaultSegment) codeSegments.push_back(nullptr); // make the switch statement std::vector segmentBlocks; // returned, as the blocks allocated in the call builder.makeSwitch(selector, control, (int)codeSegments.size(), caseValues, valueIndexToSegment, defaultSegment, segmentBlocks); // emit all the code in the segments breakForLoop.push(false); for (unsigned int s = 0; s < codeSegments.size(); ++s) { builder.nextSwitchSegment(segmentBlocks, s); if (codeSegments[s]) codeSegments[s]->traverse(this); else builder.addSwitchBreak(true); } breakForLoop.pop(); builder.endSwitch(segmentBlocks); return false; } void TGlslangToSpvTraverser::visitConstantUnion(glslang::TIntermConstantUnion* node) { if (node->getQualifier().isSpirvLiteral()) return; // Translated to a literal value, skip further processing int nextConst = 0; spv::Id constant = createSpvConstantFromConstUnionArray(node->getType(), node->getConstArray(), nextConst, false); builder.clearAccessChain(); builder.setAccessChainRValue(constant); } bool TGlslangToSpvTraverser::visitLoop(glslang::TVisit /* visit */, glslang::TIntermLoop* node) { auto blocks = builder.makeNewLoop(); builder.createBranch(true, &blocks.head); // Loop control: std::vector operands; const spv::LoopControlMask control = TranslateLoopControl(*node, operands); // Spec requires back edges to target header blocks, and every header block // must dominate its merge block. Make a header block first to ensure these // conditions are met. By definition, it will contain OpLoopMerge, followed // by a block-ending branch. But we don't want to put any other body/test // instructions in it, since the body/test may have arbitrary instructions, // including merges of its own. builder.setBuildPoint(&blocks.head); builder.setDebugSourceLocation(node->getLoc().line, node->getLoc().getFilename()); builder.createLoopMerge(&blocks.merge, &blocks.continue_target, control, operands); if (node->testFirst() && node->getTest()) { spv::Block& test = builder.makeNewBlock(); builder.createBranch(true, &test); builder.setBuildPoint(&test); node->getTest()->traverse(this); spv::Id condition = accessChainLoad(node->getTest()->getType()); builder.createConditionalBranch(condition, &blocks.body, &blocks.merge); builder.setBuildPoint(&blocks.body); breakForLoop.push(true); if (node->getBody()) node->getBody()->traverse(this); builder.createBranch(true, &blocks.continue_target); breakForLoop.pop(); builder.setBuildPoint(&blocks.continue_target); if (node->getTerminal()) node->getTerminal()->traverse(this); builder.createBranch(true, &blocks.head); } else { builder.setDebugSourceLocation(node->getLoc().line, node->getLoc().getFilename()); builder.createBranch(true, &blocks.body); breakForLoop.push(true); builder.setBuildPoint(&blocks.body); if (node->getBody()) node->getBody()->traverse(this); builder.createBranch(true, &blocks.continue_target); breakForLoop.pop(); builder.setBuildPoint(&blocks.continue_target); if (node->getTerminal()) node->getTerminal()->traverse(this); if (node->getTest()) { node->getTest()->traverse(this); spv::Id condition = accessChainLoad(node->getTest()->getType()); builder.createConditionalBranch(condition, &blocks.head, &blocks.merge); } else { // TODO: unless there was a break/return/discard instruction // somewhere in the body, this is an infinite loop, so we should // issue a warning. builder.createBranch(true, &blocks.head); } } builder.setBuildPoint(&blocks.merge); builder.closeLoop(); return false; } bool TGlslangToSpvTraverser::visitBranch(glslang::TVisit /* visit */, glslang::TIntermBranch* node) { if (node->getExpression()) node->getExpression()->traverse(this); builder.setDebugSourceLocation(node->getLoc().line, node->getLoc().getFilename()); switch (node->getFlowOp()) { case glslang::EOpKill: if (glslangIntermediate->getSpv().spv >= glslang::EShTargetSpv_1_6) { builder.addCapability(spv::Capability::DemoteToHelperInvocation); builder.createNoResultOp(spv::Op::OpDemoteToHelperInvocationEXT); } else { builder.makeStatementTerminator(spv::Op::OpKill, "post-discard"); } break; case glslang::EOpTerminateInvocation: builder.addExtension(spv::E_SPV_KHR_terminate_invocation); builder.makeStatementTerminator(spv::Op::OpTerminateInvocation, "post-terminate-invocation"); break; case glslang::EOpBreak: if (breakForLoop.top()) builder.createLoopExit(); else builder.addSwitchBreak(false); break; case glslang::EOpContinue: builder.createLoopContinue(); break; case glslang::EOpReturn: if (node->getExpression() != nullptr) { const glslang::TType& glslangReturnType = node->getExpression()->getType(); spv::Id returnId = accessChainLoad(glslangReturnType); if (builder.getTypeId(returnId) != currentFunction->getReturnType() || TranslatePrecisionDecoration(glslangReturnType) != currentFunction->getReturnPrecision()) { builder.clearAccessChain(); spv::Id copyId = builder.createVariable(currentFunction->getReturnPrecision(), spv::StorageClass::Function, currentFunction->getReturnType()); builder.setAccessChainLValue(copyId); multiTypeStore(glslangReturnType, returnId); returnId = builder.createLoad(copyId, currentFunction->getReturnPrecision()); } builder.makeReturn(false, returnId); } else builder.makeReturn(false); builder.clearAccessChain(); break; case glslang::EOpDemote: builder.createNoResultOp(spv::Op::OpDemoteToHelperInvocationEXT); builder.addExtension(spv::E_SPV_EXT_demote_to_helper_invocation); builder.addCapability(spv::Capability::DemoteToHelperInvocationEXT); break; case glslang::EOpTerminateRayKHR: builder.makeStatementTerminator(spv::Op::OpTerminateRayKHR, "post-terminateRayKHR"); break; case glslang::EOpIgnoreIntersectionKHR: builder.makeStatementTerminator(spv::Op::OpIgnoreIntersectionKHR, "post-ignoreIntersectionKHR"); break; default: assert(0); break; } return false; } spv::Id TGlslangToSpvTraverser::createSpvVariable(const glslang::TIntermSymbol* node, spv::Id forcedType) { // First, steer off constants, which are not SPIR-V variables, but // can still have a mapping to a SPIR-V Id. // This includes specialization constants. if (node->getQualifier().isConstant()) { spv::Id result = createSpvConstant(*node); if (result != spv::NoResult) return result; } // Now, handle actual variables spv::StorageClass storageClass = TranslateStorageClass(node->getType()); spv::Id spvType = forcedType == spv::NoType ? convertGlslangToSpvType(node->getType()) : forcedType; const bool contains16BitType = node->getType().contains16BitFloat() || node->getType().contains16BitInt(); if (contains16BitType) { switch (storageClass) { case spv::StorageClass::Input: case spv::StorageClass::Output: builder.addIncorporatedExtension(spv::E_SPV_KHR_16bit_storage, spv::Spv_1_3); builder.addCapability(spv::Capability::StorageInputOutput16); break; case spv::StorageClass::Uniform: builder.addIncorporatedExtension(spv::E_SPV_KHR_16bit_storage, spv::Spv_1_3); if (node->getType().getQualifier().storage == glslang::EvqBuffer) builder.addCapability(spv::Capability::StorageUniformBufferBlock16); else builder.addCapability(spv::Capability::StorageUniform16); break; case spv::StorageClass::PushConstant: builder.addIncorporatedExtension(spv::E_SPV_KHR_16bit_storage, spv::Spv_1_3); builder.addCapability(spv::Capability::StoragePushConstant16); break; case spv::StorageClass::StorageBuffer: case spv::StorageClass::PhysicalStorageBufferEXT: builder.addIncorporatedExtension(spv::E_SPV_KHR_16bit_storage, spv::Spv_1_3); builder.addCapability(spv::Capability::StorageUniformBufferBlock16); break; case spv::StorageClass::TileAttachmentQCOM: builder.addCapability(spv::Capability::TileShadingQCOM); break; default: if (storageClass == spv::StorageClass::Workgroup && node->getType().getBasicType() == glslang::EbtBlock) { builder.addCapability(spv::Capability::WorkgroupMemoryExplicitLayout16BitAccessKHR); break; } if (node->getType().contains16BitFloat()) builder.addCapability(spv::Capability::Float16); if (node->getType().contains16BitInt()) builder.addCapability(spv::Capability::Int16); break; } } if (node->getType().contains8BitInt()) { if (storageClass == spv::StorageClass::PushConstant) { builder.addIncorporatedExtension(spv::E_SPV_KHR_8bit_storage, spv::Spv_1_5); builder.addCapability(spv::Capability::StoragePushConstant8); } else if (storageClass == spv::StorageClass::Uniform) { builder.addIncorporatedExtension(spv::E_SPV_KHR_8bit_storage, spv::Spv_1_5); builder.addCapability(spv::Capability::UniformAndStorageBuffer8BitAccess); } else if (storageClass == spv::StorageClass::StorageBuffer) { builder.addIncorporatedExtension(spv::E_SPV_KHR_8bit_storage, spv::Spv_1_5); builder.addCapability(spv::Capability::StorageBuffer8BitAccess); } else if (storageClass == spv::StorageClass::Workgroup && node->getType().getBasicType() == glslang::EbtBlock) { builder.addCapability(spv::Capability::WorkgroupMemoryExplicitLayout8BitAccessKHR); } else { builder.addCapability(spv::Capability::Int8); } } const char* name = node->getName().c_str(); if (glslang::IsAnonymous(name)) name = ""; spv::Id initializer = spv::NoResult; if (node->getType().getQualifier().storage == glslang::EvqUniform && !node->getConstArray().empty()) { int nextConst = 0; initializer = createSpvConstantFromConstUnionArray(node->getType(), node->getConstArray(), nextConst, false /* specConst */); } else if (node->getType().getQualifier().isNullInit()) { initializer = builder.makeNullConstant(spvType); } spv::Id var = builder.createVariable(spv::NoPrecision, storageClass, spvType, name, initializer, false); std::vector topLevelDecorations; glslang::TQualifier typeQualifier = node->getType().getQualifier(); TranslateMemoryDecoration(typeQualifier, topLevelDecorations, glslangIntermediate->usingVulkanMemoryModel()); for (auto deco : topLevelDecorations) { builder.addDecoration(var, deco); } return var; } // Return type Id of the sampled type. spv::Id TGlslangToSpvTraverser::getSampledType(const glslang::TSampler& sampler) { switch (sampler.type) { case glslang::EbtInt: return builder.makeIntType(32); case glslang::EbtUint: return builder.makeUintType(32); case glslang::EbtFloat: return builder.makeFloatType(32); case glslang::EbtFloat16: builder.addExtension(spv::E_SPV_AMD_gpu_shader_half_float_fetch); builder.addCapability(spv::Capability::Float16ImageAMD); return builder.makeFloatType(16); case glslang::EbtInt64: builder.addExtension(spv::E_SPV_EXT_shader_image_int64); builder.addCapability(spv::Capability::Int64ImageEXT); return builder.makeIntType(64); case glslang::EbtUint64: builder.addExtension(spv::E_SPV_EXT_shader_image_int64); builder.addCapability(spv::Capability::Int64ImageEXT); return builder.makeUintType(64); default: assert(0); return builder.makeFloatType(32); } } // If node is a swizzle operation, return the type that should be used if // the swizzle base is first consumed by another operation, before the swizzle // is applied. spv::Id TGlslangToSpvTraverser::getInvertedSwizzleType(const glslang::TIntermTyped& node) { if (node.getAsOperator() && node.getAsOperator()->getOp() == glslang::EOpVectorSwizzle) return convertGlslangToSpvType(node.getAsBinaryNode()->getLeft()->getType()); else return spv::NoType; } // When inverting a swizzle with a parent op, this function // will apply the swizzle operation to a completed parent operation. spv::Id TGlslangToSpvTraverser::createInvertedSwizzle(spv::Decoration precision, const glslang::TIntermTyped& node, spv::Id parentResult) { std::vector swizzle; convertSwizzle(*node.getAsBinaryNode()->getRight()->getAsAggregate(), swizzle); return builder.createRvalueSwizzle(precision, convertGlslangToSpvType(node.getType()), parentResult, swizzle); } // Convert a glslang AST swizzle node to a swizzle vector for building SPIR-V. void TGlslangToSpvTraverser::convertSwizzle(const glslang::TIntermAggregate& node, std::vector& swizzle) { const glslang::TIntermSequence& swizzleSequence = node.getSequence(); for (int i = 0; i < (int)swizzleSequence.size(); ++i) swizzle.push_back(swizzleSequence[i]->getAsConstantUnion()->getConstArray()[0].getIConst()); } // Convert from a glslang type to an SPV type, by calling into a // recursive version of this function. This establishes the inherited // layout state rooted from the top-level type. spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& type, bool forwardReferenceOnly) { return convertGlslangToSpvType(type, getExplicitLayout(type), type.getQualifier(), false, forwardReferenceOnly); } spv::LinkageType TGlslangToSpvTraverser::convertGlslangLinkageToSpv(glslang::TLinkType linkType) { switch (linkType) { case glslang::ELinkExport: return spv::LinkageType::Export; default: return spv::LinkageType::Max; } } // Do full recursive conversion of an arbitrary glslang type to a SPIR-V Id. // explicitLayout can be kept the same throughout the hierarchical recursive walk. // Mutually recursive with convertGlslangStructToSpvType(). spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& type, glslang::TLayoutPacking explicitLayout, const glslang::TQualifier& qualifier, bool lastBufferBlockMember, bool forwardReferenceOnly) { spv::Id spvType = spv::NoResult; switch (type.getBasicType()) { case glslang::EbtVoid: spvType = builder.makeVoidType(); assert (! type.isArray()); break; case glslang::EbtBool: // "transparent" bool doesn't exist in SPIR-V. The GLSL convention is // a 32-bit int where non-0 means true. if (explicitLayout != glslang::ElpNone) spvType = builder.makeUintType(32); else spvType = builder.makeBoolType(); break; case glslang::EbtInt: spvType = builder.makeIntType(32); break; case glslang::EbtUint: spvType = builder.makeUintType(32); break; case glslang::EbtFloat: spvType = builder.makeFloatType(32); break; case glslang::EbtDouble: spvType = builder.makeFloatType(64); break; case glslang::EbtFloat16: spvType = builder.makeFloatType(16); break; case glslang::EbtBFloat16: spvType = builder.makeBFloat16Type(); break; case glslang::EbtFloatE5M2: spvType = builder.makeFloatE5M2Type(); break; case glslang::EbtFloatE4M3: spvType = builder.makeFloatE4M3Type(); break; case glslang::EbtInt8: spvType = builder.makeIntType(8); break; case glslang::EbtUint8: spvType = builder.makeUintType(8); break; case glslang::EbtInt16: spvType = builder.makeIntType(16); break; case glslang::EbtUint16: spvType = builder.makeUintType(16); break; case glslang::EbtInt64: spvType = builder.makeIntType(64); break; case glslang::EbtUint64: spvType = builder.makeUintType(64); break; case glslang::EbtAtomicUint: builder.addCapability(spv::Capability::AtomicStorage); spvType = builder.makeUintType(32); break; case glslang::EbtAccStruct: switch (glslangIntermediate->getStage()) { case EShLangRayGen: case EShLangIntersect: case EShLangAnyHit: case EShLangClosestHit: case EShLangMiss: case EShLangCallable: // these all should have the RayTracingNV/KHR capability already break; default: { auto& extensions = glslangIntermediate->getRequestedExtensions(); if (extensions.find("GL_EXT_ray_query") != extensions.end()) { builder.addExtension(spv::E_SPV_KHR_ray_query); builder.addCapability(spv::Capability::RayQueryKHR); } } break; } spvType = builder.makeAccelerationStructureType(); break; case glslang::EbtRayQuery: { auto& extensions = glslangIntermediate->getRequestedExtensions(); if (extensions.find("GL_EXT_ray_query") != extensions.end()) { builder.addExtension(spv::E_SPV_KHR_ray_query); builder.addCapability(spv::Capability::RayQueryKHR); } spvType = builder.makeRayQueryType(); } break; case glslang::EbtReference: { // Make the forward pointer, then recurse to convert the structure type, then // patch up the forward pointer with a real pointer type. if (forwardPointers.find(type.getReferentType()) == forwardPointers.end()) { spv::Id forwardId = builder.makeForwardPointer(spv::StorageClass::PhysicalStorageBufferEXT); forwardPointers[type.getReferentType()] = forwardId; } spvType = forwardPointers[type.getReferentType()]; if (!forwardReferenceOnly) { spv::Id referentType = convertGlslangToSpvType(*type.getReferentType()); builder.makePointerFromForwardPointer(spv::StorageClass::PhysicalStorageBufferEXT, forwardPointers[type.getReferentType()], referentType); } } break; case glslang::EbtSampler: { const glslang::TSampler& sampler = type.getSampler(); if (sampler.isPureSampler()) { spvType = builder.makeSamplerType(); } else { // an image is present, make its type spvType = builder.makeImageType(getSampledType(sampler), TranslateDimensionality(sampler), sampler.isShadow(), sampler.isArrayed(), sampler.isMultiSample(), sampler.isImageClass() ? 2 : 1, TranslateImageFormat(type)); if (sampler.isCombined() && (!sampler.isBuffer() || glslangIntermediate->getSpv().spv < glslang::EShTargetSpv_1_6)) { // Already has both image and sampler, make the combined type. Only combine sampler to // buffer if before SPIR-V 1.6. spvType = builder.makeSampledImageType(spvType); } } } break; case glslang::EbtStruct: case glslang::EbtBlock: { // If we've seen this struct type, return it const glslang::TTypeList* glslangMembers = type.getStruct(); // Try to share structs for different layouts, but not yet for other // kinds of qualification (primarily not yet including interpolant qualification). if (! HasNonLayoutQualifiers(type, qualifier)) spvType = structMap[explicitLayout][qualifier.layoutMatrix][glslangMembers]; if (spvType != spv::NoResult) break; // else, we haven't seen it... if (type.getBasicType() == glslang::EbtBlock) memberRemapper[glslangTypeToIdMap[glslangMembers]].resize(glslangMembers->size()); spvType = convertGlslangStructToSpvType(type, glslangMembers, explicitLayout, qualifier); } break; case glslang::EbtString: // no type used for OpString return 0; case glslang::EbtHitObjectNV: { builder.addExtension(spv::E_SPV_NV_shader_invocation_reorder); builder.addCapability(spv::Capability::ShaderInvocationReorderNV); spvType = builder.makeHitObjectNVType(); } break; case glslang::EbtSpirvType: { // GL_EXT_spirv_intrinsics const auto& spirvType = type.getSpirvType(); const auto& spirvInst = spirvType.spirvInst; std::vector operands; for (const auto& typeParam : spirvType.typeParams) { if (typeParam.getAsConstant() != nullptr) { // Constant expression auto constant = typeParam.getAsConstant(); if (constant->isLiteral()) { if (constant->getBasicType() == glslang::EbtFloat) { float floatValue = static_cast(constant->getConstArray()[0].getDConst()); unsigned literal; static_assert(sizeof(literal) == sizeof(floatValue), "sizeof(unsigned) != sizeof(float)"); memcpy(&literal, &floatValue, sizeof(literal)); operands.push_back({false, literal}); } else if (constant->getBasicType() == glslang::EbtInt) { unsigned literal = constant->getConstArray()[0].getIConst(); operands.push_back({false, literal}); } else if (constant->getBasicType() == glslang::EbtUint) { unsigned literal = constant->getConstArray()[0].getUConst(); operands.push_back({false, literal}); } else if (constant->getBasicType() == glslang::EbtBool) { unsigned literal = constant->getConstArray()[0].getBConst(); operands.push_back({false, literal}); } else if (constant->getBasicType() == glslang::EbtString) { auto str = constant->getConstArray()[0].getSConst()->c_str(); unsigned literal = 0; char* literalPtr = reinterpret_cast(&literal); unsigned charCount = 0; char ch = 0; do { ch = *(str++); *(literalPtr++) = ch; ++charCount; if (charCount == 4) { operands.push_back({false, literal}); literalPtr = reinterpret_cast(&literal); charCount = 0; } } while (ch != 0); // Partial literal is padded with 0 if (charCount > 0) { for (; charCount < 4; ++charCount) *(literalPtr++) = 0; operands.push_back({false, literal}); } } else assert(0); // Unexpected type } else operands.push_back({true, createSpvConstant(*constant)}); } else { // Type specifier assert(typeParam.getAsType() != nullptr); operands.push_back({true, convertGlslangToSpvType(*typeParam.getAsType())}); } } assert(spirvInst.set == ""); // Currently, couldn't be extended instructions. spvType = builder.makeGenericType(static_cast(spirvInst.id), operands); break; } case glslang::EbtTensorLayoutNV: { builder.addCapability(spv::Capability::TensorAddressingNV); builder.addExtension(spv::E_SPV_NV_tensor_addressing); std::vector operands; for (uint32_t i = 0; i < 2; ++i) { operands.push_back({true, makeArraySizeId(*type.getTypeParameters()->arraySizes, i, true)}); } spvType = builder.makeGenericType(spv::Op::OpTypeTensorLayoutNV, operands); break; } case glslang::EbtTensorViewNV: { builder.addCapability(spv::Capability::TensorAddressingNV); builder.addExtension(spv::E_SPV_NV_tensor_addressing); uint32_t dim = type.getTypeParameters()->arraySizes->getDimSize(0); assert(dim >= 1 && dim <= 5); std::vector operands; for (uint32_t i = 0; i < dim + 2; ++i) { operands.push_back({true, makeArraySizeId(*type.getTypeParameters()->arraySizes, i, true, i==1)}); } spvType = builder.makeGenericType(spv::Op::OpTypeTensorViewNV, operands); break; } default: assert(0); break; } if (type.isMatrix()) spvType = builder.makeMatrixType(spvType, type.getMatrixCols(), type.getMatrixRows()); else { // If this variable has a vector element count greater than 1, create a SPIR-V vector if (type.getVectorSize() > 1) spvType = builder.makeVectorType(spvType, type.getVectorSize()); } if (type.isCoopMatNV()) { builder.addCapability(spv::Capability::CooperativeMatrixNV); builder.addExtension(spv::E_SPV_NV_cooperative_matrix); if (type.getBasicType() == glslang::EbtFloat16) builder.addCapability(spv::Capability::Float16); if (type.getBasicType() == glslang::EbtUint8 || type.getBasicType() == glslang::EbtInt8) { builder.addCapability(spv::Capability::Int8); } spv::Id scope = makeArraySizeId(*type.getTypeParameters()->arraySizes, 1); spv::Id rows = makeArraySizeId(*type.getTypeParameters()->arraySizes, 2); spv::Id cols = makeArraySizeId(*type.getTypeParameters()->arraySizes, 3); spvType = builder.makeCooperativeMatrixTypeNV(spvType, scope, rows, cols); } if (type.isCoopMatKHR()) { builder.addCapability(spv::Capability::CooperativeMatrixKHR); builder.addExtension(spv::E_SPV_KHR_cooperative_matrix); if (type.getBasicType() == glslang::EbtBFloat16) { builder.addExtension(spv::E_SPV_KHR_bfloat16); builder.addCapability(spv::Capability::BFloat16CooperativeMatrixKHR); } if (type.getBasicType() == glslang::EbtFloatE5M2 || type.getBasicType() == glslang::EbtFloatE4M3) { builder.addExtension(spv::E_SPV_EXT_float8); builder.addCapability(spv::Capability::Float8CooperativeMatrixEXT); } if (type.getBasicType() == glslang::EbtFloat16) builder.addCapability(spv::Capability::Float16); if (type.getBasicType() == glslang::EbtUint8 || type.getBasicType() == glslang::EbtInt8) { builder.addCapability(spv::Capability::Int8); } spv::Id scope = makeArraySizeId(*type.getTypeParameters()->arraySizes, 0); spv::Id rows = makeArraySizeId(*type.getTypeParameters()->arraySizes, 1); spv::Id cols = makeArraySizeId(*type.getTypeParameters()->arraySizes, 2); spv::Id use = builder.makeUintConstant(type.getCoopMatKHRuse()); spvType = builder.makeCooperativeMatrixTypeKHR(spvType, scope, rows, cols, use); } if (type.isCoopVecNV()) { builder.addCapability(spv::Capability::CooperativeVectorNV); builder.addExtension(spv::E_SPV_NV_cooperative_vector); if (type.getBasicType() == glslang::EbtFloat16) builder.addCapability(spv::Capability::Float16); if (type.getBasicType() == glslang::EbtUint8 || type.getBasicType() == glslang::EbtInt8) { builder.addCapability(spv::Capability::Int8); } spv::Id components = makeArraySizeId(*type.getTypeParameters()->arraySizes, 0); spvType = builder.makeCooperativeVectorTypeNV(spvType, components); } if (type.isArray()) { int stride = 0; // keep this 0 unless doing an explicit layout; 0 will mean no decoration, no stride // Do all but the outer dimension if (type.getArraySizes()->getNumDims() > 1) { // We need to decorate array strides for types needing explicit layout, except blocks. if (explicitLayout != glslang::ElpNone && type.getBasicType() != glslang::EbtBlock) { // Use a dummy glslang type for querying internal strides of // arrays of arrays, but using just a one-dimensional array. glslang::TType simpleArrayType(type, 0); // deference type of the array while (simpleArrayType.getArraySizes()->getNumDims() > 1) simpleArrayType.getArraySizes()->dereference(); // Will compute the higher-order strides here, rather than making a whole // pile of types and doing repetitive recursion on their contents. stride = getArrayStride(simpleArrayType, explicitLayout, qualifier.layoutMatrix); } // make the arrays for (int dim = type.getArraySizes()->getNumDims() - 1; dim > 0; --dim) { spvType = builder.makeArrayType(spvType, makeArraySizeId(*type.getArraySizes(), dim), stride); if (stride > 0) builder.addDecoration(spvType, spv::Decoration::ArrayStride, stride); stride *= type.getArraySizes()->getDimSize(dim); } } else { // single-dimensional array, and don't yet have stride // We need to decorate array strides for types needing explicit layout, except blocks. if (explicitLayout != glslang::ElpNone && type.getBasicType() != glslang::EbtBlock) stride = getArrayStride(type, explicitLayout, qualifier.layoutMatrix); } // Do the outer dimension, which might not be known for a runtime-sized array. // (Unsized arrays that survive through linking will be runtime-sized arrays) if (type.isSizedArray()) spvType = builder.makeArrayType(spvType, makeArraySizeId(*type.getArraySizes(), 0), stride); else { if (!lastBufferBlockMember) { builder.addIncorporatedExtension("SPV_EXT_descriptor_indexing", spv::Spv_1_5); builder.addCapability(spv::Capability::RuntimeDescriptorArrayEXT); } spvType = builder.makeRuntimeArray(spvType); } if (stride > 0) builder.addDecoration(spvType, spv::Decoration::ArrayStride, stride); } return spvType; } // Apply SPIR-V decorations to the SPIR-V object (provided by SPIR-V ID). If member index is provided, the // decorations are applied to this member. void TGlslangToSpvTraverser::applySpirvDecorate(const glslang::TType& type, spv::Id id, std::optional member) { assert(type.getQualifier().hasSpirvDecorate()); const glslang::TSpirvDecorate& spirvDecorate = type.getQualifier().getSpirvDecorate(); // Add spirv_decorate for (auto& decorate : spirvDecorate.decorates) { if (!decorate.second.empty()) { std::vector literals; TranslateLiterals(decorate.second, literals); if (member.has_value()) builder.addMemberDecoration(id, *member, static_cast(decorate.first), literals); else builder.addDecoration(id, static_cast(decorate.first), literals); } else { if (member.has_value()) builder.addMemberDecoration(id, *member, static_cast(decorate.first)); else builder.addDecoration(id, static_cast(decorate.first)); } } // Add spirv_decorate_id if (member.has_value()) { // spirv_decorate_id not applied to members assert(spirvDecorate.decorateIds.empty()); } else { for (auto& decorateId : spirvDecorate.decorateIds) { std::vector operandIds; assert(!decorateId.second.empty()); for (auto extraOperand : decorateId.second) { if (extraOperand->getQualifier().isFrontEndConstant()) operandIds.push_back(createSpvConstant(*extraOperand)); else operandIds.push_back(getSymbolId(extraOperand->getAsSymbolNode())); } builder.addDecorationId(id, static_cast(decorateId.first), operandIds); } } // Add spirv_decorate_string for (auto& decorateString : spirvDecorate.decorateStrings) { std::vector strings; assert(!decorateString.second.empty()); for (auto extraOperand : decorateString.second) { const char* string = extraOperand->getConstArray()[0].getSConst()->c_str(); strings.push_back(string); } if (member.has_value()) builder.addMemberDecoration(id, *member, static_cast(decorateString.first), strings); else builder.addDecoration(id, static_cast(decorateString.first), strings); } } // TODO: this functionality should exist at a higher level, in creating the AST // // Identify interface members that don't have their required extension turned on. // bool TGlslangToSpvTraverser::filterMember(const glslang::TType& member) { auto& extensions = glslangIntermediate->getRequestedExtensions(); if (member.getFieldName() == "gl_SecondaryViewportMaskNV" && extensions.find("GL_NV_stereo_view_rendering") == extensions.end()) return true; if (member.getFieldName() == "gl_SecondaryPositionNV" && extensions.find("GL_NV_stereo_view_rendering") == extensions.end()) return true; if (glslangIntermediate->getStage() == EShLangMesh) { if (member.getFieldName() == "gl_PrimitiveShadingRateEXT" && extensions.find("GL_EXT_fragment_shading_rate") == extensions.end()) return true; } if (glslangIntermediate->getStage() != EShLangMesh) { if (member.getFieldName() == "gl_ViewportMask" && extensions.find("GL_NV_viewport_array2") == extensions.end()) return true; if (member.getFieldName() == "gl_PositionPerViewNV" && extensions.find("GL_NVX_multiview_per_view_attributes") == extensions.end()) return true; if (member.getFieldName() == "gl_ViewportMaskPerViewNV" && extensions.find("GL_NVX_multiview_per_view_attributes") == extensions.end()) return true; } return false; } // Do full recursive conversion of a glslang structure (or block) type to a SPIR-V Id. // explicitLayout can be kept the same throughout the hierarchical recursive walk. // Mutually recursive with convertGlslangToSpvType(). spv::Id TGlslangToSpvTraverser::convertGlslangStructToSpvType(const glslang::TType& type, const glslang::TTypeList* glslangMembers, glslang::TLayoutPacking explicitLayout, const glslang::TQualifier& qualifier) { // Create a vector of struct types for SPIR-V to consume std::vector spvMembers; int memberDelta = 0; // how much the member's index changes from glslang to SPIR-V, normally 0, // except sometimes for blocks std::vector > deferredForwardPointers; for (int i = 0; i < (int)glslangMembers->size(); i++) { auto& glslangMember = (*glslangMembers)[i]; if (glslangMember.type->hiddenMember()) { ++memberDelta; if (type.getBasicType() == glslang::EbtBlock) memberRemapper[glslangTypeToIdMap[glslangMembers]][i] = -1; } else { if (type.getBasicType() == glslang::EbtBlock) { if (filterMember(*glslangMember.type)) { memberDelta++; memberRemapper[glslangTypeToIdMap[glslangMembers]][i] = -1; continue; } memberRemapper[glslangTypeToIdMap[glslangMembers]][i] = i - memberDelta; } // modify just this child's view of the qualifier glslang::TQualifier memberQualifier = glslangMember.type->getQualifier(); InheritQualifiers(memberQualifier, qualifier); // manually inherit location if (! memberQualifier.hasLocation() && qualifier.hasLocation()) memberQualifier.layoutLocation = qualifier.layoutLocation; // recurse bool lastBufferBlockMember = qualifier.storage == glslang::EvqBuffer && i == (int)glslangMembers->size() - 1; // Make forward pointers for any pointer members. if (glslangMember.type->isReference() && forwardPointers.find(glslangMember.type->getReferentType()) == forwardPointers.end()) { deferredForwardPointers.push_back(std::make_pair(glslangMember.type, memberQualifier)); } // Create the member type. auto const spvMember = convertGlslangToSpvType(*glslangMember.type, explicitLayout, memberQualifier, lastBufferBlockMember, glslangMember.type->isReference()); spvMembers.push_back(spvMember); // Update the builder with the type's location so that we can create debug types for the structure members. // There doesn't exist a "clean" entry point for this information to be passed along to the builder so, for now, // it is stored in the builder and consumed during the construction of composite debug types. // TODO: This probably warrants further investigation. This approach was decided to be the least ugly of the // quick and dirty approaches that were tried. // Advantages of this approach: // + Relatively clean. No direct calls into debug type system. // + Handles nested recursive structures. // Disadvantages of this approach: // + Not as clean as desired. Traverser queries/sets persistent state. This is fragile. // + Table lookup during creation of composite debug types. This really shouldn't be necessary. if(options.emitNonSemanticShaderDebugInfo) { builder.debugTypeLocs[spvMember].name = glslangMember.type->getFieldName().c_str(); builder.debugTypeLocs[spvMember].line = glslangMember.loc.line; builder.debugTypeLocs[spvMember].column = glslangMember.loc.column; } } } // Make the SPIR-V type spv::Id spvType = builder.makeStructType(spvMembers, type.getTypeName().c_str(), false); if (! HasNonLayoutQualifiers(type, qualifier)) structMap[explicitLayout][qualifier.layoutMatrix][glslangMembers] = spvType; // Decorate it decorateStructType(type, glslangMembers, explicitLayout, qualifier, spvType, spvMembers); for (int i = 0; i < (int)deferredForwardPointers.size(); ++i) { auto it = deferredForwardPointers[i]; convertGlslangToSpvType(*it.first, explicitLayout, it.second, false); } return spvType; } void TGlslangToSpvTraverser::decorateStructType(const glslang::TType& type, const glslang::TTypeList* glslangMembers, glslang::TLayoutPacking explicitLayout, const glslang::TQualifier& qualifier, spv::Id spvType, const std::vector& spvMembers) { // Name and decorate the non-hidden members int offset = -1; bool memberLocationInvalid = type.isArrayOfArrays() || (type.isArray() && (type.getQualifier().isArrayedIo(glslangIntermediate->getStage()) == false)); for (int i = 0; i < (int)glslangMembers->size(); i++) { glslang::TType& glslangMember = *(*glslangMembers)[i].type; int member = i; if (type.getBasicType() == glslang::EbtBlock) { member = memberRemapper[glslangTypeToIdMap[glslangMembers]][i]; if (filterMember(glslangMember)) continue; } // modify just this child's view of the qualifier glslang::TQualifier memberQualifier = glslangMember.getQualifier(); InheritQualifiers(memberQualifier, qualifier); // using -1 above to indicate a hidden member if (member < 0) continue; builder.addMemberName(spvType, member, glslangMember.getFieldName().c_str()); builder.addMemberDecoration(spvType, member, TranslateLayoutDecoration(glslangMember, memberQualifier.layoutMatrix)); builder.addMemberDecoration(spvType, member, TranslatePrecisionDecoration(glslangMember)); // Add interpolation and auxiliary storage decorations only to // top-level members of Input and Output storage classes if (type.getQualifier().storage == glslang::EvqVaryingIn || type.getQualifier().storage == glslang::EvqVaryingOut) { if (type.getBasicType() == glslang::EbtBlock || glslangIntermediate->getSource() == glslang::EShSourceHlsl) { builder.addMemberDecoration(spvType, member, TranslateInterpolationDecoration(memberQualifier)); builder.addMemberDecoration(spvType, member, TranslateAuxiliaryStorageDecoration(memberQualifier)); addMeshNVDecoration(spvType, member, memberQualifier); } } builder.addMemberDecoration(spvType, member, TranslateInvariantDecoration(memberQualifier)); if (type.getBasicType() == glslang::EbtBlock && qualifier.storage == glslang::EvqBuffer) { // Add memory decorations only to top-level members of shader storage block std::vector memory; TranslateMemoryDecoration(memberQualifier, memory, glslangIntermediate->usingVulkanMemoryModel()); for (unsigned int i = 0; i < memory.size(); ++i) builder.addMemberDecoration(spvType, member, memory[i]); } // Location assignment was already completed correctly by the front end, // just track whether a member needs to be decorated. // Ignore member locations if the container is an array, as that's // ill-specified and decisions have been made to not allow this. if (!memberLocationInvalid && memberQualifier.hasLocation()) builder.addMemberDecoration(spvType, member, spv::Decoration::Location, memberQualifier.layoutLocation); // component, XFB, others if (glslangMember.getQualifier().hasComponent()) builder.addMemberDecoration(spvType, member, spv::Decoration::Component, glslangMember.getQualifier().layoutComponent); if (glslangMember.getQualifier().hasXfbOffset()) builder.addMemberDecoration(spvType, member, spv::Decoration::Offset, glslangMember.getQualifier().layoutXfbOffset); else if (explicitLayout != glslang::ElpNone) { // figure out what to do with offset, which is accumulating int nextOffset; updateMemberOffset(type, glslangMember, offset, nextOffset, explicitLayout, memberQualifier.layoutMatrix); if (offset >= 0) builder.addMemberDecoration(spvType, member, spv::Decoration::Offset, offset); offset = nextOffset; } if (glslangMember.isMatrix() && explicitLayout != glslang::ElpNone) builder.addMemberDecoration(spvType, member, spv::Decoration::MatrixStride, getMatrixStride(glslangMember, explicitLayout, memberQualifier.layoutMatrix)); // built-in variable decorations spv::BuiltIn builtIn = TranslateBuiltInDecoration(glslangMember.getQualifier().builtIn, true); if (builtIn != spv::BuiltIn::Max) builder.addMemberDecoration(spvType, member, spv::Decoration::BuiltIn, (int)builtIn); // nonuniform builder.addMemberDecoration(spvType, member, TranslateNonUniformDecoration(glslangMember.getQualifier())); if (glslangIntermediate->getHlslFunctionality1() && memberQualifier.semanticName != nullptr) { builder.addExtension("SPV_GOOGLE_hlsl_functionality1"); builder.addMemberDecoration(spvType, member, spv::Decoration::HlslSemanticGOOGLE, memberQualifier.semanticName); } if (builtIn == spv::BuiltIn::Layer) { // SPV_NV_viewport_array2 extension if (glslangMember.getQualifier().layoutViewportRelative){ builder.addMemberDecoration(spvType, member, spv::Decoration::ViewportRelativeNV); builder.addCapability(spv::Capability::ShaderViewportMaskNV); builder.addExtension(spv::E_SPV_NV_viewport_array2); } if (glslangMember.getQualifier().layoutSecondaryViewportRelativeOffset != -2048){ builder.addMemberDecoration(spvType, member, spv::Decoration::SecondaryViewportRelativeNV, glslangMember.getQualifier().layoutSecondaryViewportRelativeOffset); builder.addCapability(spv::Capability::ShaderStereoViewNV); builder.addExtension(spv::E_SPV_NV_stereo_view_rendering); } } if (glslangMember.getQualifier().layoutPassthrough) { builder.addMemberDecoration(spvType, member, spv::Decoration::PassthroughNV); builder.addCapability(spv::Capability::GeometryShaderPassthroughNV); builder.addExtension(spv::E_SPV_NV_geometry_shader_passthrough); } // Add SPIR-V decorations (GL_EXT_spirv_intrinsics) if (glslangMember.getQualifier().hasSpirvDecorate()) applySpirvDecorate(glslangMember, spvType, member); } // Decorate the structure builder.addDecoration(spvType, TranslateLayoutDecoration(type, qualifier.layoutMatrix)); const auto basicType = type.getBasicType(); const auto typeStorageQualifier = type.getQualifier().storage; if (basicType == glslang::EbtBlock) { builder.addDecoration(spvType, TranslateBlockDecoration(typeStorageQualifier, glslangIntermediate->usingStorageBuffer())); } else if (basicType == glslang::EbtStruct && glslangIntermediate->getSpv().vulkan > 0) { const auto hasRuntimeArray = !spvMembers.empty() && builder.getOpCode(spvMembers.back()) == spv::Op::OpTypeRuntimeArray; if (hasRuntimeArray) { builder.addDecoration(spvType, TranslateBlockDecoration(typeStorageQualifier, glslangIntermediate->usingStorageBuffer())); } } if (qualifier.hasHitObjectShaderRecordNV()) builder.addDecoration(spvType, spv::Decoration::HitObjectShaderRecordBufferNV); } // Turn the expression forming the array size into an id. // This is not quite trivial, because of specialization constants. // Sometimes, a raw constant is turned into an Id, and sometimes // a specialization constant expression is. spv::Id TGlslangToSpvTraverser::makeArraySizeId(const glslang::TArraySizes& arraySizes, int dim, bool allowZero, bool boolType) { // First, see if this is sized with a node, meaning a specialization constant: glslang::TIntermTyped* specNode = arraySizes.getDimNode(dim); if (specNode != nullptr) { builder.clearAccessChain(); SpecConstantOpModeGuard spec_constant_op_mode_setter(&builder); spec_constant_op_mode_setter.turnOnSpecConstantOpMode(); specNode->traverse(this); return accessChainLoad(specNode->getAsTyped()->getType()); } // Otherwise, need a compile-time (front end) size, get it: int size = arraySizes.getDimSize(dim); if (!allowZero) assert(size > 0); if (boolType) { return builder.makeBoolConstant(size); } else { return builder.makeUintConstant(size); } } // Wrap the builder's accessChainLoad to: // - localize handling of RelaxedPrecision // - use the SPIR-V inferred type instead of another conversion of the glslang type // (avoids unnecessary work and possible type punning for structures) // - do conversion of concrete to abstract type spv::Id TGlslangToSpvTraverser::accessChainLoad(const glslang::TType& type) { spv::Id nominalTypeId = builder.accessChainGetInferredType(); spv::Builder::AccessChain::CoherentFlags coherentFlags = builder.getAccessChain().coherentFlags; coherentFlags |= TranslateCoherent(type); spv::MemoryAccessMask accessMask = spv::MemoryAccessMask(TranslateMemoryAccess(coherentFlags) & ~spv::MemoryAccessMask::MakePointerAvailableKHR); // If the value being loaded is HelperInvocation, SPIR-V 1.6 is being generated (so that // SPV_EXT_demote_to_helper_invocation is in core) and the memory model is in use, add // the Volatile MemoryAccess semantic. if (type.getQualifier().builtIn == glslang::EbvHelperInvocation && glslangIntermediate->usingVulkanMemoryModel() && glslangIntermediate->getSpv().spv >= glslang::EShTargetSpv_1_6) { accessMask = spv::MemoryAccessMask(accessMask | spv::MemoryAccessMask::Volatile); } unsigned int alignment = builder.getAccessChain().alignment; alignment |= type.getBufferReferenceAlignment(); spv::Id loadedId = builder.accessChainLoad(TranslatePrecisionDecoration(type), TranslateNonUniformDecoration(builder.getAccessChain().coherentFlags), TranslateNonUniformDecoration(type.getQualifier()), nominalTypeId, accessMask, TranslateMemoryScope(coherentFlags), alignment); // Need to convert to abstract types when necessary if (type.getBasicType() == glslang::EbtBool) { loadedId = convertLoadedBoolInUniformToUint(type, nominalTypeId, loadedId); } return loadedId; } // Wrap the builder's accessChainStore to: // - do conversion of concrete to abstract type // // Implicitly uses the existing builder.accessChain as the storage target. void TGlslangToSpvTraverser::accessChainStore(const glslang::TType& type, spv::Id rvalue) { // Need to convert to abstract types when necessary if (type.getBasicType() == glslang::EbtBool) { spv::Id nominalTypeId = builder.accessChainGetInferredType(); if (builder.isScalarType(nominalTypeId)) { // Conversion for bool spv::Id boolType = builder.makeBoolType(); if (nominalTypeId != boolType) { // keep these outside arguments, for determinant order-of-evaluation spv::Id one = builder.makeUintConstant(1); spv::Id zero = builder.makeUintConstant(0); rvalue = builder.createTriOp(spv::Op::OpSelect, nominalTypeId, rvalue, one, zero); } else if (builder.getTypeId(rvalue) != boolType) rvalue = builder.createBinOp(spv::Op::OpINotEqual, boolType, rvalue, builder.makeUintConstant(0)); } else if (builder.isVectorType(nominalTypeId)) { // Conversion for bvec int vecSize = builder.getNumTypeComponents(nominalTypeId); spv::Id bvecType = builder.makeVectorType(builder.makeBoolType(), vecSize); if (nominalTypeId != bvecType) { // keep these outside arguments, for determinant order-of-evaluation spv::Id one = makeSmearedConstant(builder.makeUintConstant(1), vecSize); spv::Id zero = makeSmearedConstant(builder.makeUintConstant(0), vecSize); rvalue = builder.createTriOp(spv::Op::OpSelect, nominalTypeId, rvalue, one, zero); } else if (builder.getTypeId(rvalue) != bvecType) rvalue = builder.createBinOp(spv::Op::OpINotEqual, bvecType, rvalue, makeSmearedConstant(builder.makeUintConstant(0), vecSize)); } } spv::Builder::AccessChain::CoherentFlags coherentFlags = builder.getAccessChain().coherentFlags; coherentFlags |= TranslateCoherent(type); unsigned int alignment = builder.getAccessChain().alignment; alignment |= type.getBufferReferenceAlignment(); builder.accessChainStore(rvalue, TranslateNonUniformDecoration(builder.getAccessChain().coherentFlags), spv::MemoryAccessMask(TranslateMemoryAccess(coherentFlags) & ~spv::MemoryAccessMask::MakePointerVisibleKHR), TranslateMemoryScope(coherentFlags), alignment); } // For storing when types match at the glslang level, but not might match at the // SPIR-V level. // // This especially happens when a single glslang type expands to multiple // SPIR-V types, like a struct that is used in a member-undecorated way as well // as in a member-decorated way. // // NOTE: This function can handle any store request; if it's not special it // simplifies to a simple OpStore. // // Implicitly uses the existing builder.accessChain as the storage target. void TGlslangToSpvTraverser::multiTypeStore(const glslang::TType& type, spv::Id rValue) { // we only do the complex path here if it's an aggregate if (! type.isStruct() && ! type.isArray()) { accessChainStore(type, rValue); return; } // and, it has to be a case of type aliasing spv::Id rType = builder.getTypeId(rValue); spv::Id lValue = builder.accessChainGetLValue(); spv::Id lType = builder.getContainedTypeId(builder.getTypeId(lValue)); if (lType == rType) { accessChainStore(type, rValue); return; } // Recursively (as needed) copy an aggregate type to a different aggregate type, // where the two types were the same type in GLSL. This requires member // by member copy, recursively. // SPIR-V 1.4 added an instruction to do help do this. if (glslangIntermediate->getSpv().spv >= glslang::EShTargetSpv_1_4) { // However, bool in uniform space is changed to int, so // OpCopyLogical does not work for that. // TODO: It would be more robust to do a full recursive verification of the types satisfying SPIR-V rules. bool rBool = builder.containsType(builder.getTypeId(rValue), spv::Op::OpTypeBool, 0); bool lBool = builder.containsType(lType, spv::Op::OpTypeBool, 0); if (lBool == rBool) { spv::Id logicalCopy = builder.createUnaryOp(spv::Op::OpCopyLogical, lType, rValue); accessChainStore(type, logicalCopy); return; } } // If an array, copy element by element. if (type.isArray()) { glslang::TType glslangElementType(type, 0); spv::Id elementRType = builder.getContainedTypeId(rType); for (int index = 0; index < type.getOuterArraySize(); ++index) { // get the source member spv::Id elementRValue = builder.createCompositeExtract(rValue, elementRType, index); // set up the target storage builder.clearAccessChain(); builder.setAccessChainLValue(lValue); builder.accessChainPush(builder.makeIntConstant(index), TranslateCoherent(type), type.getBufferReferenceAlignment()); // store the member multiTypeStore(glslangElementType, elementRValue); } } else { assert(type.isStruct()); // loop over structure members const glslang::TTypeList& members = *type.getStruct(); for (int m = 0; m < (int)members.size(); ++m) { const glslang::TType& glslangMemberType = *members[m].type; // get the source member spv::Id memberRType = builder.getContainedTypeId(rType, m); spv::Id memberRValue = builder.createCompositeExtract(rValue, memberRType, m); // set up the target storage builder.clearAccessChain(); builder.setAccessChainLValue(lValue); builder.accessChainPush(builder.makeIntConstant(m), TranslateCoherent(type), type.getBufferReferenceAlignment()); // store the member multiTypeStore(glslangMemberType, memberRValue); } } } // Decide whether or not this type should be // decorated with offsets and strides, and if so // whether std140 or std430 rules should be applied. glslang::TLayoutPacking TGlslangToSpvTraverser::getExplicitLayout(const glslang::TType& type) const { // has to be a block if (type.getBasicType() != glslang::EbtBlock) return glslang::ElpNone; // has to be a uniform or buffer block or task in/out blocks if (type.getQualifier().storage != glslang::EvqUniform && type.getQualifier().storage != glslang::EvqBuffer && type.getQualifier().storage != glslang::EvqShared && !type.getQualifier().isTaskMemory()) return glslang::ElpNone; // return the layout to use switch (type.getQualifier().layoutPacking) { case glslang::ElpStd140: case glslang::ElpStd430: case glslang::ElpScalar: return type.getQualifier().layoutPacking; default: return glslang::ElpNone; } } // Given an array type, returns the integer stride required for that array int TGlslangToSpvTraverser::getArrayStride(const glslang::TType& arrayType, glslang::TLayoutPacking explicitLayout, glslang::TLayoutMatrix matrixLayout) { int size; int stride; glslangIntermediate->getMemberAlignment(arrayType, size, stride, explicitLayout, matrixLayout == glslang::ElmRowMajor); return stride; } // Given a matrix type, or array (of array) of matrixes type, returns the integer stride required for that matrix // when used as a member of an interface block int TGlslangToSpvTraverser::getMatrixStride(const glslang::TType& matrixType, glslang::TLayoutPacking explicitLayout, glslang::TLayoutMatrix matrixLayout) { glslang::TType elementType; elementType.shallowCopy(matrixType); elementType.clearArraySizes(); int size; int stride; glslangIntermediate->getMemberAlignment(elementType, size, stride, explicitLayout, matrixLayout == glslang::ElmRowMajor); return stride; } // Given a member type of a struct, realign the current offset for it, and compute // the next (not yet aligned) offset for the next member, which will get aligned // on the next call. // 'currentOffset' should be passed in already initialized, ready to modify, and reflecting // the migration of data from nextOffset -> currentOffset. It should be -1 on the first call. // -1 means a non-forced member offset (no decoration needed). void TGlslangToSpvTraverser::updateMemberOffset(const glslang::TType& structType, const glslang::TType& memberType, int& currentOffset, int& nextOffset, glslang::TLayoutPacking explicitLayout, glslang::TLayoutMatrix matrixLayout) { // this will get a positive value when deemed necessary nextOffset = -1; // override anything in currentOffset with user-set offset if (memberType.getQualifier().hasOffset()) currentOffset = memberType.getQualifier().layoutOffset; // It could be that current linker usage in glslang updated all the layoutOffset, // in which case the following code does not matter. But, that's not quite right // once cross-compilation unit GLSL validation is done, as the original user // settings are needed in layoutOffset, and then the following will come into play. if (explicitLayout == glslang::ElpNone) { if (! memberType.getQualifier().hasOffset()) currentOffset = -1; return; } // Getting this far means we need explicit offsets if (currentOffset < 0) currentOffset = 0; // Now, currentOffset is valid (either 0, or from a previous nextOffset), // but possibly not yet correctly aligned. int memberSize; int dummyStride; int memberAlignment = glslangIntermediate->getMemberAlignment(memberType, memberSize, dummyStride, explicitLayout, matrixLayout == glslang::ElmRowMajor); bool isVectorLike = memberType.isVector(); if (memberType.isMatrix()) { if (matrixLayout == glslang::ElmRowMajor) isVectorLike = memberType.getMatrixRows() == 1; else isVectorLike = memberType.getMatrixCols() == 1; } // Adjust alignment for HLSL rules // TODO: make this consistent in early phases of code: // adjusting this late means inconsistencies with earlier code, which for reflection is an issue // Until reflection is brought in sync with these adjustments, don't apply to $Global, // which is the most likely to rely on reflection, and least likely to rely implicit layouts if (glslangIntermediate->usingHlslOffsets() && ! memberType.isStruct() && structType.getTypeName().compare("$Global") != 0) { int componentSize; int componentAlignment = glslangIntermediate->getBaseAlignmentScalar(memberType, componentSize); if (! memberType.isArray() && isVectorLike && componentAlignment <= 4) memberAlignment = componentAlignment; // Don't add unnecessary padding after this member // (undo std140 bumping size to a mutliple of vec4) if (explicitLayout == glslang::ElpStd140) { if (memberType.isMatrix()) { if (matrixLayout == glslang::ElmRowMajor) memberSize -= componentSize * (4 - memberType.getMatrixCols()); else memberSize -= componentSize * (4 - memberType.getMatrixRows()); } else if (memberType.isArray()) memberSize -= componentSize * (4 - memberType.getVectorSize()); } } // Bump up to member alignment glslang::RoundToPow2(currentOffset, memberAlignment); // Bump up to vec4 if there is a bad straddle if (explicitLayout != glslang::ElpScalar && glslangIntermediate->improperStraddle(memberType, memberSize, currentOffset, isVectorLike)) glslang::RoundToPow2(currentOffset, 16); nextOffset = currentOffset + memberSize; } void TGlslangToSpvTraverser::declareUseOfStructMember(const glslang::TTypeList& members, int glslangMember) { const glslang::TBuiltInVariable glslangBuiltIn = members[glslangMember].type->getQualifier().builtIn; switch (glslangBuiltIn) { case glslang::EbvPointSize: case glslang::EbvClipDistance: case glslang::EbvCullDistance: case glslang::EbvViewportMaskNV: case glslang::EbvSecondaryPositionNV: case glslang::EbvSecondaryViewportMaskNV: case glslang::EbvPositionPerViewNV: case glslang::EbvViewportMaskPerViewNV: case glslang::EbvTaskCountNV: case glslang::EbvPrimitiveCountNV: case glslang::EbvPrimitiveIndicesNV: case glslang::EbvClipDistancePerViewNV: case glslang::EbvCullDistancePerViewNV: case glslang::EbvLayerPerViewNV: case glslang::EbvMeshViewCountNV: case glslang::EbvMeshViewIndicesNV: // Generate the associated capability. Delegate to TranslateBuiltInDecoration. // Alternately, we could just call this for any glslang built-in, since the // capability already guards against duplicates. TranslateBuiltInDecoration(glslangBuiltIn, false); break; default: // Capabilities were already generated when the struct was declared. break; } } bool TGlslangToSpvTraverser::isShaderEntryPoint(const glslang::TIntermAggregate* node) { return node->getName().compare(glslangIntermediate->getEntryPointMangledName().c_str()) == 0; } // Does parameter need a place to keep writes, separate from the original? // Assumes called after originalParam(), which filters out block/buffer/opaque-based // qualifiers such that we should have only in/out/inout/constreadonly here. bool TGlslangToSpvTraverser::writableParam(glslang::TStorageQualifier qualifier) const { assert(qualifier == glslang::EvqIn || qualifier == glslang::EvqOut || qualifier == glslang::EvqInOut || qualifier == glslang::EvqUniform || qualifier == glslang::EvqConstReadOnly); return qualifier != glslang::EvqConstReadOnly && qualifier != glslang::EvqUniform; } // Is parameter pass-by-original? bool TGlslangToSpvTraverser::originalParam(glslang::TStorageQualifier qualifier, const glslang::TType& paramType, bool implicitThisParam) { if (implicitThisParam) // implicit this return true; if (glslangIntermediate->getSource() == glslang::EShSourceHlsl) return paramType.getBasicType() == glslang::EbtBlock; return (paramType.containsOpaque() && !glslangIntermediate->getBindlessMode()) || // sampler, etc. paramType.getQualifier().isSpirvByReference() || // spirv_by_reference (paramType.getBasicType() == glslang::EbtBlock && qualifier == glslang::EvqBuffer); // SSBO } // Make all the functions, skeletally, without actually visiting their bodies. void TGlslangToSpvTraverser::makeFunctions(const glslang::TIntermSequence& glslFunctions) { const auto getParamDecorations = [&](std::vector& decorations, const glslang::TType& type, bool useVulkanMemoryModel) { spv::Decoration paramPrecision = TranslatePrecisionDecoration(type); if (paramPrecision != spv::NoPrecision) decorations.push_back(paramPrecision); TranslateMemoryDecoration(type.getQualifier(), decorations, useVulkanMemoryModel); if (type.isReference()) { // Original and non-writable params pass the pointer directly and // use restrict/aliased, others are stored to a pointer in Function // memory and use RestrictPointer/AliasedPointer. if (originalParam(type.getQualifier().storage, type, false) || !writableParam(type.getQualifier().storage)) { // TranslateMemoryDecoration added Restrict decoration already. if (!type.getQualifier().isRestrict()) { decorations.push_back(spv::Decoration::Aliased); } } else { decorations.push_back(type.getQualifier().isRestrict() ? spv::Decoration::RestrictPointerEXT : spv::Decoration::AliasedPointerEXT); } } }; for (int f = 0; f < (int)glslFunctions.size(); ++f) { glslang::TIntermAggregate* glslFunction = glslFunctions[f]->getAsAggregate(); if (! glslFunction || glslFunction->getOp() != glslang::EOpFunction) continue; builder.setDebugSourceLocation(glslFunction->getLoc().line, glslFunction->getLoc().getFilename()); if (isShaderEntryPoint(glslFunction)) { // For HLSL, the entry function is actually a compiler generated function to resolve the difference of // entry function signature between HLSL and SPIR-V. So we don't emit debug information for that. if (glslangIntermediate->getSource() != glslang::EShSourceHlsl) { builder.setupFunctionDebugInfo(shaderEntry, glslangIntermediate->getEntryPointMangledName().c_str(), std::vector(), // main function has no param std::vector()); } continue; } // We're on a user function. Set up the basic interface for the function now, // so that it's available to call. Translating the body will happen later. // // Typically (except for a "const in" parameter), an address will be passed to the // function. What it is an address of varies: // // - "in" parameters not marked as "const" can be written to without modifying the calling // argument so that write needs to be to a copy, hence the address of a copy works. // // - "const in" parameters can just be the r-value, as no writes need occur. // // - "out" and "inout" arguments can't be done as pointers to the calling argument, because // GLSL has copy-in/copy-out semantics. They can be handled though with a pointer to a copy. std::vector paramTypes; std::vector paramNames; std::vector> paramDecorations; // list of decorations per parameter glslang::TIntermSequence& parameters = glslFunction->getSequence()[0]->getAsAggregate()->getSequence(); #ifdef ENABLE_HLSL bool implicitThis = (int)parameters.size() > 0 && parameters[0]->getAsSymbolNode()->getName() == glslangIntermediate->implicitThisName; #else bool implicitThis = false; #endif paramDecorations.resize(parameters.size()); for (int p = 0; p < (int)parameters.size(); ++p) { const glslang::TType& paramType = parameters[p]->getAsTyped()->getType(); spv::Id typeId = convertGlslangToSpvType(paramType); if (originalParam(paramType.getQualifier().storage, paramType, implicitThis && p == 0)) typeId = builder.makePointer(TranslateStorageClass(paramType), typeId); else if (writableParam(paramType.getQualifier().storage)) typeId = builder.makePointer(spv::StorageClass::Function, typeId); else rValueParameters.insert(parameters[p]->getAsSymbolNode()->getId()); getParamDecorations(paramDecorations[p], paramType, glslangIntermediate->usingVulkanMemoryModel()); paramTypes.push_back(typeId); } for (auto const parameter:parameters) { paramNames.push_back(parameter->getAsSymbolNode()->getName().c_str()); } spv::Block* functionBlock; spv::Function* function = builder.makeFunctionEntry( TranslatePrecisionDecoration(glslFunction->getType()), convertGlslangToSpvType(glslFunction->getType()), glslFunction->getName().c_str(), convertGlslangLinkageToSpv(glslFunction->getLinkType()), paramTypes, paramDecorations, &functionBlock); builder.setupFunctionDebugInfo(function, glslFunction->getName().c_str(), paramTypes, paramNames); if (implicitThis) function->setImplicitThis(); // Track function to emit/call later functionMap[glslFunction->getName().c_str()] = function; // Set the parameter id's for (int p = 0; p < (int)parameters.size(); ++p) { symbolValues[parameters[p]->getAsSymbolNode()->getId()] = function->getParamId(p); // give a name too builder.addName(function->getParamId(p), parameters[p]->getAsSymbolNode()->getName().c_str()); const glslang::TType& paramType = parameters[p]->getAsTyped()->getType(); if (paramType.contains8BitInt()) builder.addCapability(spv::Capability::Int8); if (paramType.contains16BitInt()) builder.addCapability(spv::Capability::Int16); if (paramType.contains16BitFloat()) builder.addCapability(spv::Capability::Float16); } } } // Process all the initializers, while skipping the functions and link objects void TGlslangToSpvTraverser::makeGlobalInitializers(const glslang::TIntermSequence& initializers) { builder.setBuildPoint(shaderEntry->getLastBlock()); for (int i = 0; i < (int)initializers.size(); ++i) { glslang::TIntermAggregate* initializer = initializers[i]->getAsAggregate(); if (initializer && initializer->getOp() != glslang::EOpFunction && initializer->getOp() != glslang::EOpLinkerObjects) { // We're on a top-level node that's not a function. Treat as an initializer, whose // code goes into the beginning of the entry point. initializer->traverse(this); } } } // Walk over all linker objects to create a map for payload and callable data linker objects // and their location to be used during codegen for OpTraceKHR and OpExecuteCallableKHR // This is done here since it is possible that these linker objects are not be referenced in the AST void TGlslangToSpvTraverser::collectRayTracingLinkerObjects() { glslang::TIntermAggregate* linkerObjects = glslangIntermediate->findLinkerObjects(); for (auto& objSeq : linkerObjects->getSequence()) { auto objNode = objSeq->getAsSymbolNode(); if (objNode != nullptr) { if (objNode->getQualifier().hasLocation()) { unsigned int location = objNode->getQualifier().layoutLocation; auto st = objNode->getQualifier().storage; int set; switch (st) { case glslang::EvqPayload: case glslang::EvqPayloadIn: set = 0; break; case glslang::EvqCallableData: case glslang::EvqCallableDataIn: set = 1; break; case glslang::EvqHitObjectAttrNV: set = 2; break; default: set = -1; } if (set != -1) locationToSymbol[set].insert(std::make_pair(location, objNode)); } } } } // Process all the functions, while skipping initializers. void TGlslangToSpvTraverser::visitFunctions(const glslang::TIntermSequence& glslFunctions) { for (int f = 0; f < (int)glslFunctions.size(); ++f) { glslang::TIntermAggregate* node = glslFunctions[f]->getAsAggregate(); if (node && (node->getOp() == glslang::EOpFunction || node->getOp() == glslang::EOpLinkerObjects)) node->traverse(this); } } void TGlslangToSpvTraverser::handleFunctionEntry(const glslang::TIntermAggregate* node) { // SPIR-V functions should already be in the functionMap from the prepass // that called makeFunctions(). currentFunction = functionMap[node->getName().c_str()]; spv::Block* functionBlock = currentFunction->getEntryBlock(); builder.setBuildPoint(functionBlock); builder.enterFunction(currentFunction); } void TGlslangToSpvTraverser::translateArguments(const glslang::TIntermAggregate& node, std::vector& arguments, spv::Builder::AccessChain::CoherentFlags &lvalueCoherentFlags) { const glslang::TIntermSequence& glslangArguments = node.getSequence(); glslang::TSampler sampler = {}; bool cubeCompare = false; bool f16ShadowCompare = false; if (node.isTexture() || node.isImage()) { sampler = glslangArguments[0]->getAsTyped()->getType().getSampler(); cubeCompare = sampler.dim == glslang::EsdCube && sampler.arrayed && sampler.shadow; f16ShadowCompare = sampler.shadow && glslangArguments[1]->getAsTyped()->getType().getBasicType() == glslang::EbtFloat16; } for (int i = 0; i < (int)glslangArguments.size(); ++i) { builder.clearAccessChain(); glslangArguments[i]->traverse(this); // Special case l-value operands bool lvalue = false; switch (node.getOp()) { case glslang::EOpImageAtomicAdd: case glslang::EOpImageAtomicMin: case glslang::EOpImageAtomicMax: case glslang::EOpImageAtomicAnd: case glslang::EOpImageAtomicOr: case glslang::EOpImageAtomicXor: case glslang::EOpImageAtomicExchange: case glslang::EOpImageAtomicCompSwap: case glslang::EOpImageAtomicLoad: case glslang::EOpImageAtomicStore: if (i == 0) lvalue = true; break; case glslang::EOpSparseImageLoad: if ((sampler.ms && i == 3) || (! sampler.ms && i == 2)) lvalue = true; break; case glslang::EOpSparseTexture: if (((cubeCompare || f16ShadowCompare) && i == 3) || (! (cubeCompare || f16ShadowCompare) && i == 2)) lvalue = true; break; case glslang::EOpSparseTextureClamp: if (((cubeCompare || f16ShadowCompare) && i == 4) || (! (cubeCompare || f16ShadowCompare) && i == 3)) lvalue = true; break; case glslang::EOpSparseTextureLod: case glslang::EOpSparseTextureOffset: if ((f16ShadowCompare && i == 4) || (! f16ShadowCompare && i == 3)) lvalue = true; break; case glslang::EOpSparseTextureFetch: if ((sampler.dim != glslang::EsdRect && i == 3) || (sampler.dim == glslang::EsdRect && i == 2)) lvalue = true; break; case glslang::EOpSparseTextureFetchOffset: if ((sampler.dim != glslang::EsdRect && i == 4) || (sampler.dim == glslang::EsdRect && i == 3)) lvalue = true; break; case glslang::EOpSparseTextureLodOffset: case glslang::EOpSparseTextureGrad: case glslang::EOpSparseTextureOffsetClamp: if ((f16ShadowCompare && i == 5) || (! f16ShadowCompare && i == 4)) lvalue = true; break; case glslang::EOpSparseTextureGradOffset: case glslang::EOpSparseTextureGradClamp: if ((f16ShadowCompare && i == 6) || (! f16ShadowCompare && i == 5)) lvalue = true; break; case glslang::EOpSparseTextureGradOffsetClamp: if ((f16ShadowCompare && i == 7) || (! f16ShadowCompare && i == 6)) lvalue = true; break; case glslang::EOpSparseTextureGather: if ((sampler.shadow && i == 3) || (! sampler.shadow && i == 2)) lvalue = true; break; case glslang::EOpSparseTextureGatherOffset: case glslang::EOpSparseTextureGatherOffsets: if ((sampler.shadow && i == 4) || (! sampler.shadow && i == 3)) lvalue = true; break; case glslang::EOpSparseTextureGatherLod: if (i == 3) lvalue = true; break; case glslang::EOpSparseTextureGatherLodOffset: case glslang::EOpSparseTextureGatherLodOffsets: if (i == 4) lvalue = true; break; case glslang::EOpSparseImageLoadLod: if (i == 3) lvalue = true; break; case glslang::EOpImageSampleFootprintNV: if (i == 4) lvalue = true; break; case glslang::EOpImageSampleFootprintClampNV: case glslang::EOpImageSampleFootprintLodNV: if (i == 5) lvalue = true; break; case glslang::EOpImageSampleFootprintGradNV: if (i == 6) lvalue = true; break; case glslang::EOpImageSampleFootprintGradClampNV: if (i == 7) lvalue = true; break; case glslang::EOpRayQueryGetIntersectionTriangleVertexPositionsEXT: case glslang::EOpRayQueryGetIntersectionLSSPositionsNV: case glslang::EOpRayQueryGetIntersectionLSSRadiiNV: if (i == 2) lvalue = true; break; case glslang::EOpConstructSaturated: if (i == 0) lvalue = true; break; default: break; } if (lvalue) { spv::Id lvalue_id = builder.accessChainGetLValue(); arguments.push_back(lvalue_id); lvalueCoherentFlags = builder.getAccessChain().coherentFlags; builder.addDecoration(lvalue_id, TranslateNonUniformDecoration(lvalueCoherentFlags)); lvalueCoherentFlags |= TranslateCoherent(glslangArguments[i]->getAsTyped()->getType()); } else { if (i > 0 && glslangArguments[i]->getAsSymbolNode() && glslangArguments[i-1]->getAsSymbolNode() && glslangArguments[i]->getAsSymbolNode()->getId() == glslangArguments[i-1]->getAsSymbolNode()->getId()) { // Reuse the id if possible arguments.push_back(arguments[i-1]); } else { arguments.push_back(accessChainLoad(glslangArguments[i]->getAsTyped()->getType())); } } } } void TGlslangToSpvTraverser::translateArguments(glslang::TIntermUnary& node, std::vector& arguments) { builder.clearAccessChain(); node.getOperand()->traverse(this); arguments.push_back(accessChainLoad(node.getOperand()->getType())); } spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermOperator* node) { if (! node->isImage() && ! node->isTexture()) return spv::NoResult; builder.setDebugSourceLocation(node->getLoc().line, node->getLoc().getFilename()); // Process a GLSL texturing op (will be SPV image) const glslang::TType &imageType = node->getAsAggregate() ? node->getAsAggregate()->getSequence()[0]->getAsTyped()->getType() : node->getAsUnaryNode()->getOperand()->getAsTyped()->getType(); const glslang::TSampler sampler = imageType.getSampler(); bool f16ShadowCompare = (sampler.shadow && node->getAsAggregate()) ? node->getAsAggregate()->getSequence()[1]->getAsTyped()->getType().getBasicType() == glslang::EbtFloat16 : false; const auto signExtensionMask = [&]() { if (builder.getSpvVersion() >= spv::Spv_1_4) { if (sampler.type == glslang::EbtUint) return spv::ImageOperandsMask::ZeroExtend; else if (sampler.type == glslang::EbtInt) return spv::ImageOperandsMask::SignExtend; } return spv::ImageOperandsMask::MaskNone; }; spv::Builder::AccessChain::CoherentFlags lvalueCoherentFlags; std::vector arguments; if (node->getAsAggregate()) translateArguments(*node->getAsAggregate(), arguments, lvalueCoherentFlags); else translateArguments(*node->getAsUnaryNode(), arguments); spv::Decoration precision = TranslatePrecisionDecoration(node->getType()); spv::Builder::TextureParameters params = { }; params.sampler = arguments[0]; glslang::TCrackedTextureOp cracked; node->crackTexture(sampler, cracked); const bool isUnsignedResult = node->getType().getBasicType() == glslang::EbtUint; if (builder.isSampledImage(params.sampler) && ((cracked.query && node->getOp() != glslang::EOpTextureQueryLod) || cracked.fragMask || cracked.fetch)) { params.sampler = builder.createUnaryOp(spv::Op::OpImage, builder.getImageType(params.sampler), params.sampler); if (imageType.getQualifier().isNonUniform()) { builder.addDecoration(params.sampler, spv::Decoration::NonUniformEXT); } } // Check for queries if (cracked.query) { switch (node->getOp()) { case glslang::EOpImageQuerySize: case glslang::EOpTextureQuerySize: if (arguments.size() > 1) { params.lod = arguments[1]; return builder.createTextureQueryCall(spv::Op::OpImageQuerySizeLod, params, isUnsignedResult); } else return builder.createTextureQueryCall(spv::Op::OpImageQuerySize, params, isUnsignedResult); case glslang::EOpImageQuerySamples: case glslang::EOpTextureQuerySamples: return builder.createTextureQueryCall(spv::Op::OpImageQuerySamples, params, isUnsignedResult); case glslang::EOpTextureQueryLod: params.coords = arguments[1]; return builder.createTextureQueryCall(spv::Op::OpImageQueryLod, params, isUnsignedResult); case glslang::EOpTextureQueryLevels: return builder.createTextureQueryCall(spv::Op::OpImageQueryLevels, params, isUnsignedResult); case glslang::EOpSparseTexelsResident: return builder.createUnaryOp(spv::Op::OpImageSparseTexelsResident, builder.makeBoolType(), arguments[0]); default: assert(0); break; } } int components = node->getType().getVectorSize(); if (node->getOp() == glslang::EOpImageLoad || node->getOp() == glslang::EOpImageLoadLod || node->getOp() == glslang::EOpTextureFetch || node->getOp() == glslang::EOpTextureFetchOffset) { // These must produce 4 components, per SPIR-V spec. We'll add a conversion constructor if needed. // This will only happen through the HLSL path for operator[], so we do not have to handle e.g. // the EOpTexture/Proj/Lod/etc family. It would be harmless to do so, but would need more logic // here around e.g. which ones return scalars or other types. components = 4; } glslang::TType returnType(node->getType().getBasicType(), glslang::EvqTemporary, components); auto resultType = [&returnType,this]{ return convertGlslangToSpvType(returnType); }; // Check for image functions other than queries if (node->isImage()) { std::vector operands; auto opIt = arguments.begin(); spv::IdImmediate image = { true, *(opIt++) }; operands.push_back(image); // Handle subpass operations // TODO: GLSL should change to have the "MS" only on the type rather than the // built-in function. if (cracked.subpass) { // add on the (0,0) coordinate spv::Id zero = builder.makeIntConstant(0); std::vector comps; comps.push_back(zero); comps.push_back(zero); spv::IdImmediate coord = { true, builder.makeCompositeConstant(builder.makeVectorType(builder.makeIntType(32), 2), comps) }; operands.push_back(coord); spv::IdImmediate imageOperands = { false, spv::ImageOperandsMask::MaskNone }; imageOperands.word = imageOperands.word | (unsigned)signExtensionMask(); if (sampler.isMultiSample()) { imageOperands.word = imageOperands.word | (unsigned)spv::ImageOperandsMask::Sample; } if (imageOperands.word != (unsigned)spv::ImageOperandsMask::MaskNone) { operands.push_back(imageOperands); if (sampler.isMultiSample()) { spv::IdImmediate imageOperand = { true, *(opIt++) }; operands.push_back(imageOperand); } } spv::Id result = builder.createOp(spv::Op::OpImageRead, resultType(), operands); builder.setPrecision(result, precision); return result; } if (cracked.attachmentEXT) { if (opIt != arguments.end()) { spv::IdImmediate sample = { true, *opIt }; operands.push_back(sample); } spv::Id result = builder.createOp(spv::Op::OpColorAttachmentReadEXT, resultType(), operands); builder.addExtension(spv::E_SPV_EXT_shader_tile_image); builder.setPrecision(result, precision); return result; } spv::IdImmediate coord = { true, *(opIt++) }; operands.push_back(coord); if (node->getOp() == glslang::EOpImageLoad || node->getOp() == glslang::EOpImageLoadLod) { spv::ImageOperandsMask mask = spv::ImageOperandsMask::MaskNone; if (sampler.isMultiSample()) { mask = mask | spv::ImageOperandsMask::Sample; } if (cracked.lod) { builder.addExtension(spv::E_SPV_AMD_shader_image_load_store_lod); builder.addCapability(spv::Capability::ImageReadWriteLodAMD); mask = mask | spv::ImageOperandsMask::Lod; } mask = mask | TranslateImageOperands(TranslateCoherent(imageType)); mask = (spv::ImageOperandsMask)(mask & ~spv::ImageOperandsMask::MakeTexelAvailableKHR); mask = mask | signExtensionMask(); if (mask != spv::ImageOperandsMask::MaskNone) { spv::IdImmediate imageOperands = { false, (unsigned int)mask }; operands.push_back(imageOperands); } if (anySet(mask, spv::ImageOperandsMask::Sample)) { spv::IdImmediate imageOperand = { true, *opIt++ }; operands.push_back(imageOperand); } if (anySet(mask, spv::ImageOperandsMask::Lod)) { spv::IdImmediate imageOperand = { true, *opIt++ }; operands.push_back(imageOperand); } if (anySet(mask, spv::ImageOperandsMask::MakeTexelVisibleKHR)) { spv::IdImmediate imageOperand = { true, builder.makeUintConstant(TranslateMemoryScope(TranslateCoherent(imageType))) }; operands.push_back(imageOperand); } if (builder.getImageTypeFormat(builder.getImageType(operands.front().word)) == spv::ImageFormat::Unknown) builder.addCapability(spv::Capability::StorageImageReadWithoutFormat); std::vector result(1, builder.createOp(spv::Op::OpImageRead, resultType(), operands)); builder.setPrecision(result[0], precision); // If needed, add a conversion constructor to the proper size. if (components != node->getType().getVectorSize()) result[0] = builder.createConstructor(precision, result, convertGlslangToSpvType(node->getType())); return result[0]; } else if (node->getOp() == glslang::EOpImageStore || node->getOp() == glslang::EOpImageStoreLod) { // Push the texel value before the operands if (sampler.isMultiSample() || cracked.lod) { spv::IdImmediate texel = { true, *(opIt + 1) }; operands.push_back(texel); } else { spv::IdImmediate texel = { true, *opIt }; operands.push_back(texel); } spv::ImageOperandsMask mask = spv::ImageOperandsMask::MaskNone; if (sampler.isMultiSample()) { mask = mask | spv::ImageOperandsMask::Sample; } if (cracked.lod) { builder.addExtension(spv::E_SPV_AMD_shader_image_load_store_lod); builder.addCapability(spv::Capability::ImageReadWriteLodAMD); mask = mask | spv::ImageOperandsMask::Lod; } mask = mask | TranslateImageOperands(TranslateCoherent(imageType)); mask = (spv::ImageOperandsMask)(mask & ~spv::ImageOperandsMask::MakeTexelVisibleKHR); mask = mask | signExtensionMask(); if (mask != spv::ImageOperandsMask::MaskNone) { spv::IdImmediate imageOperands = { false, (unsigned int)mask }; operands.push_back(imageOperands); } if (anySet(mask, spv::ImageOperandsMask::Sample)) { spv::IdImmediate imageOperand = { true, *opIt++ }; operands.push_back(imageOperand); } if (anySet(mask, spv::ImageOperandsMask::Lod)) { spv::IdImmediate imageOperand = { true, *opIt++ }; operands.push_back(imageOperand); } if (anySet(mask, spv::ImageOperandsMask::MakeTexelAvailableKHR)) { spv::IdImmediate imageOperand = { true, builder.makeUintConstant(TranslateMemoryScope(TranslateCoherent(imageType))) }; operands.push_back(imageOperand); } builder.createNoResultOp(spv::Op::OpImageWrite, operands); if (builder.getImageTypeFormat(builder.getImageType(operands.front().word)) == spv::ImageFormat::Unknown) builder.addCapability(spv::Capability::StorageImageWriteWithoutFormat); return spv::NoResult; } else if (node->getOp() == glslang::EOpSparseImageLoad || node->getOp() == glslang::EOpSparseImageLoadLod) { builder.addCapability(spv::Capability::SparseResidency); if (builder.getImageTypeFormat(builder.getImageType(operands.front().word)) == spv::ImageFormat::Unknown) builder.addCapability(spv::Capability::StorageImageReadWithoutFormat); spv::ImageOperandsMask mask = spv::ImageOperandsMask::MaskNone; if (sampler.isMultiSample()) { mask = mask | spv::ImageOperandsMask::Sample; } if (cracked.lod) { builder.addExtension(spv::E_SPV_AMD_shader_image_load_store_lod); builder.addCapability(spv::Capability::ImageReadWriteLodAMD); mask = mask | spv::ImageOperandsMask::Lod; } mask = mask | TranslateImageOperands(TranslateCoherent(imageType)); mask = (spv::ImageOperandsMask)(mask & ~spv::ImageOperandsMask::MakeTexelAvailableKHR); mask = mask | signExtensionMask(); if (mask != spv::ImageOperandsMask::MaskNone) { spv::IdImmediate imageOperands = { false, (unsigned int)mask }; operands.push_back(imageOperands); } if (anySet(mask, spv::ImageOperandsMask::Sample)) { spv::IdImmediate imageOperand = { true, *opIt++ }; operands.push_back(imageOperand); } if (anySet(mask, spv::ImageOperandsMask::Lod)) { spv::IdImmediate imageOperand = { true, *opIt++ }; operands.push_back(imageOperand); } if (anySet(mask, spv::ImageOperandsMask::MakeTexelVisibleKHR)) { spv::IdImmediate imageOperand = { true, builder.makeUintConstant(TranslateMemoryScope( TranslateCoherent(imageType))) }; operands.push_back(imageOperand); } // Create the return type that was a special structure spv::Id texelOut = *opIt; spv::Id typeId0 = resultType(); spv::Id typeId1 = builder.getDerefTypeId(texelOut); spv::Id resultTypeId = builder.makeStructResultType(typeId0, typeId1); spv::Id resultId = builder.createOp(spv::Op::OpImageSparseRead, resultTypeId, operands); // Decode the return type builder.createStore(builder.createCompositeExtract(resultId, typeId1, 1), texelOut); return builder.createCompositeExtract(resultId, typeId0, 0); } else { // Process image atomic operations // GLSL "IMAGE_PARAMS" will involve in constructing an image texel pointer and this pointer, // as the first source operand, is required by SPIR-V atomic operations. // For non-MS, the sample value should be 0 spv::IdImmediate sample = { true, sampler.isMultiSample() ? *(opIt++) : builder.makeUintConstant(0) }; operands.push_back(sample); spv::Id resultTypeId; glslang::TBasicType typeProxy = node->getBasicType(); // imageAtomicStore has a void return type so base the pointer type on // the type of the value operand. if (node->getOp() == glslang::EOpImageAtomicStore) { resultTypeId = builder.makePointer(spv::StorageClass::Image, builder.getTypeId(*opIt)); typeProxy = node->getAsAggregate()->getSequence()[0]->getAsTyped()->getType().getSampler().type; } else { resultTypeId = builder.makePointer(spv::StorageClass::Image, resultType()); } spv::Id pointer = builder.createOp(spv::Op::OpImageTexelPointer, resultTypeId, operands); if (imageType.getQualifier().nonUniform) { builder.addDecoration(pointer, spv::Decoration::NonUniformEXT); } std::vector operands; operands.push_back(pointer); for (; opIt != arguments.end(); ++opIt) operands.push_back(*opIt); return createAtomicOperation(node->getOp(), precision, resultType(), operands, typeProxy, lvalueCoherentFlags, node->getType()); } } // Check for fragment mask functions other than queries if (cracked.fragMask) { assert(sampler.ms); auto opIt = arguments.begin(); std::vector operands; operands.push_back(params.sampler); ++opIt; if (sampler.isSubpass()) { // add on the (0,0) coordinate spv::Id zero = builder.makeIntConstant(0); std::vector comps; comps.push_back(zero); comps.push_back(zero); operands.push_back(builder.makeCompositeConstant( builder.makeVectorType(builder.makeIntType(32), 2), comps)); } for (; opIt != arguments.end(); ++opIt) operands.push_back(*opIt); spv::Op fragMaskOp = spv::Op::OpNop; if (node->getOp() == glslang::EOpFragmentMaskFetch) fragMaskOp = spv::Op::OpFragmentMaskFetchAMD; else if (node->getOp() == glslang::EOpFragmentFetch) fragMaskOp = spv::Op::OpFragmentFetchAMD; builder.addExtension(spv::E_SPV_AMD_shader_fragment_mask); builder.addCapability(spv::Capability::FragmentMaskAMD); return builder.createOp(fragMaskOp, resultType(), operands); } // Check for texture functions other than queries bool sparse = node->isSparseTexture(); bool imageFootprint = node->isImageFootprint(); bool cubeCompare = sampler.dim == glslang::EsdCube && sampler.isArrayed() && sampler.isShadow(); // check for bias argument bool bias = false; if (! cracked.lod && ! cracked.grad && ! cracked.fetch && ! cubeCompare) { int nonBiasArgCount = 2; if (cracked.gather) ++nonBiasArgCount; // comp argument should be present when bias argument is present if (f16ShadowCompare) ++nonBiasArgCount; if (cracked.offset) ++nonBiasArgCount; else if (cracked.offsets) ++nonBiasArgCount; if (cracked.grad) nonBiasArgCount += 2; if (cracked.lodClamp) ++nonBiasArgCount; if (sparse) ++nonBiasArgCount; if (imageFootprint) //Following three extra arguments // int granularity, bool coarse, out gl_TextureFootprint2DNV footprint nonBiasArgCount += 3; if ((int)arguments.size() > nonBiasArgCount) bias = true; } if (cracked.gather) { const auto& sourceExtensions = glslangIntermediate->getRequestedExtensions(); if (bias || cracked.lod || sourceExtensions.find(glslang::E_GL_AMD_texture_gather_bias_lod) != sourceExtensions.end()) { builder.addExtension(spv::E_SPV_AMD_texture_gather_bias_lod); builder.addCapability(spv::Capability::ImageGatherBiasLodAMD); } } // set the rest of the arguments params.coords = arguments[1]; int extraArgs = 0; bool noImplicitLod = false; // sort out where Dref is coming from if (cubeCompare || f16ShadowCompare) { params.Dref = arguments[2]; ++extraArgs; } else if (sampler.shadow && cracked.gather) { params.Dref = arguments[2]; ++extraArgs; } else if (sampler.shadow) { std::vector indexes; int dRefComp; if (cracked.proj) dRefComp = 2; // "The resulting 3rd component of P in the shadow forms is used as Dref" else dRefComp = builder.getNumComponents(params.coords) - 1; indexes.push_back(dRefComp); params.Dref = builder.createCompositeExtract(params.coords, builder.getScalarTypeId(builder.getTypeId(params.coords)), indexes); } // lod if (cracked.lod) { params.lod = arguments[2 + extraArgs]; ++extraArgs; } else if (glslangIntermediate->getStage() != EShLangFragment && !(glslangIntermediate->getStage() == EShLangCompute && glslangIntermediate->hasLayoutDerivativeModeNone())) { // we need to invent the default lod for an explicit lod instruction for a non-fragment stage noImplicitLod = true; } // multisample if (sampler.isMultiSample()) { params.sample = arguments[2 + extraArgs]; // For MS, "sample" should be specified ++extraArgs; } // gradient if (cracked.grad) { params.gradX = arguments[2 + extraArgs]; params.gradY = arguments[3 + extraArgs]; extraArgs += 2; } // offset and offsets if (cracked.offset) { params.offset = arguments[2 + extraArgs]; ++extraArgs; } else if (cracked.offsets) { params.offsets = arguments[2 + extraArgs]; ++extraArgs; } // lod clamp if (cracked.lodClamp) { params.lodClamp = arguments[2 + extraArgs]; ++extraArgs; } // sparse if (sparse) { params.texelOut = arguments[2 + extraArgs]; ++extraArgs; } // gather component if (cracked.gather && ! sampler.shadow) { // default component is 0, if missing, otherwise an argument if (2 + extraArgs < (int)arguments.size()) { params.component = arguments[2 + extraArgs]; ++extraArgs; } else params.component = builder.makeIntConstant(0); } spv::Id resultStruct = spv::NoResult; if (imageFootprint) { //Following three extra arguments // int granularity, bool coarse, out gl_TextureFootprint2DNV footprint params.granularity = arguments[2 + extraArgs]; params.coarse = arguments[3 + extraArgs]; resultStruct = arguments[4 + extraArgs]; extraArgs += 3; } // bias if (bias) { params.bias = arguments[2 + extraArgs]; ++extraArgs; } if (imageFootprint) { builder.addExtension(spv::E_SPV_NV_shader_image_footprint); builder.addCapability(spv::Capability::ImageFootprintNV); //resultStructType(OpenGL type) contains 5 elements: //struct gl_TextureFootprint2DNV { // uvec2 anchor; // uvec2 offset; // uvec2 mask; // uint lod; // uint granularity; //}; //or //struct gl_TextureFootprint3DNV { // uvec3 anchor; // uvec3 offset; // uvec2 mask; // uint lod; // uint granularity; //}; spv::Id resultStructType = builder.getContainedTypeId(builder.getTypeId(resultStruct)); assert(builder.isStructType(resultStructType)); //resType (SPIR-V type) contains 6 elements: //Member 0 must be a Boolean type scalar(LOD), //Member 1 must be a vector of integer type, whose Signedness operand is 0(anchor), //Member 2 must be a vector of integer type, whose Signedness operand is 0(offset), //Member 3 must be a vector of integer type, whose Signedness operand is 0(mask), //Member 4 must be a scalar of integer type, whose Signedness operand is 0(lod), //Member 5 must be a scalar of integer type, whose Signedness operand is 0(granularity). std::vector members; members.push_back(resultType()); for (int i = 0; i < 5; i++) { members.push_back(builder.getContainedTypeId(resultStructType, i)); } spv::Id resType = builder.makeStructType(members, "ResType"); //call ImageFootprintNV spv::Id res = builder.createTextureCall(precision, resType, sparse, cracked.fetch, cracked.proj, cracked.gather, noImplicitLod, params, signExtensionMask()); //copy resType (SPIR-V type) to resultStructType(OpenGL type) for (int i = 0; i < 5; i++) { builder.clearAccessChain(); builder.setAccessChainLValue(resultStruct); //Accessing to a struct we created, no coherent flag is set spv::Builder::AccessChain::CoherentFlags flags; flags.clear(); builder.accessChainPush(builder.makeIntConstant(i), flags, 0); builder.accessChainStore(builder.createCompositeExtract(res, builder.getContainedTypeId(resType, i+1), i+1), TranslateNonUniformDecoration(imageType.getQualifier())); } return builder.createCompositeExtract(res, resultType(), 0); } // projective component (might not to move) // GLSL: "The texture coordinates consumed from P, not including the last component of P, // are divided by the last component of P." // SPIR-V: "... (u [, v] [, w], q)... It may be a vector larger than needed, but all // unused components will appear after all used components." if (cracked.proj) { int projSourceComp = builder.getNumComponents(params.coords) - 1; int projTargetComp; switch (sampler.dim) { case glslang::Esd1D: projTargetComp = 1; break; case glslang::Esd2D: projTargetComp = 2; break; case glslang::EsdRect: projTargetComp = 2; break; default: projTargetComp = projSourceComp; break; } // copy the projective coordinate if we have to if (projTargetComp != projSourceComp) { spv::Id projComp = builder.createCompositeExtract(params.coords, builder.getScalarTypeId(builder.getTypeId(params.coords)), projSourceComp); params.coords = builder.createCompositeInsert(projComp, params.coords, builder.getTypeId(params.coords), projTargetComp); } } // nonprivate if (imageType.getQualifier().nonprivate) { params.nonprivate = true; } // volatile if (imageType.getQualifier().volatil) { params.volatil = true; } if (imageType.getQualifier().nontemporal) { params.nontemporal = true; } std::vector result( 1, builder.createTextureCall(precision, resultType(), sparse, cracked.fetch, cracked.proj, cracked.gather, noImplicitLod, params, signExtensionMask()) ); if (components != node->getType().getVectorSize()) result[0] = builder.createConstructor(precision, result, convertGlslangToSpvType(node->getType())); return result[0]; } spv::Id TGlslangToSpvTraverser::handleUserFunctionCall(const glslang::TIntermAggregate* node) { // Grab the function's pointer from the previously created function spv::Function* function = functionMap[node->getName().c_str()]; if (! function) return 0; const glslang::TIntermSequence& glslangArgs = node->getSequence(); const glslang::TQualifierList& qualifiers = node->getQualifierList(); // See comments in makeFunctions() for details about the semantics for parameter passing. // // These imply we need a four step process: // 1. Evaluate the arguments // 2. Allocate and make copies of in, out, and inout arguments // 3. Make the call // 4. Copy back the results // 1. Evaluate the arguments and their types std::vector lValues; std::vector rValues; std::vector argTypes; for (int a = 0; a < (int)glslangArgs.size(); ++a) { argTypes.push_back(&glslangArgs[a]->getAsTyped()->getType()); // build l-value builder.clearAccessChain(); glslangArgs[a]->traverse(this); // keep outputs and pass-by-originals as l-values, evaluate others as r-values if (originalParam(qualifiers[a], *argTypes[a], function->hasImplicitThis() && a == 0) || writableParam(qualifiers[a])) { // save l-value lValues.push_back(builder.getAccessChain()); } else { // process r-value rValues.push_back(accessChainLoad(*argTypes.back())); } } // Reset source location to the function call location after argument evaluation builder.setDebugSourceLocation(node->getLoc().line, node->getLoc().getFilename()); // 2. Allocate space for anything needing a copy, and if it's "in" or "inout" // copy the original into that space. // // Also, build up the list of actual arguments to pass in for the call int lValueCount = 0; int rValueCount = 0; std::vector spvArgs; for (int a = 0; a < (int)glslangArgs.size(); ++a) { spv::Id arg; if (originalParam(qualifiers[a], *argTypes[a], function->hasImplicitThis() && a == 0)) { builder.setAccessChain(lValues[lValueCount]); arg = builder.accessChainGetLValue(); ++lValueCount; } else if (writableParam(qualifiers[a])) { // need space to hold the copy arg = builder.createVariable(function->getParamPrecision(a), spv::StorageClass::Function, builder.getContainedTypeId(function->getParamType(a)), "param"); if (qualifiers[a] == glslang::EvqIn || qualifiers[a] == glslang::EvqInOut) { // need to copy the input into output space builder.setAccessChain(lValues[lValueCount]); spv::Id copy = accessChainLoad(*argTypes[a]); builder.clearAccessChain(); builder.setAccessChainLValue(arg); multiTypeStore(*argTypes[a], copy); } ++lValueCount; } else { // process r-value, which involves a copy for a type mismatch if (function->getParamType(a) != builder.getTypeId(rValues[rValueCount]) || TranslatePrecisionDecoration(*argTypes[a]) != function->getParamPrecision(a)) { spv::Id argCopy = builder.createVariable(function->getParamPrecision(a), spv::StorageClass::Function, function->getParamType(a), "arg"); builder.clearAccessChain(); builder.setAccessChainLValue(argCopy); multiTypeStore(*argTypes[a], rValues[rValueCount]); arg = builder.createLoad(argCopy, function->getParamPrecision(a)); } else arg = rValues[rValueCount]; ++rValueCount; } spvArgs.push_back(arg); } // 3. Make the call. spv::Id result = builder.createFunctionCall(function, spvArgs); builder.setPrecision(result, TranslatePrecisionDecoration(node->getType())); builder.addDecoration(result, TranslateNonUniformDecoration(node->getType().getQualifier())); // 4. Copy back out an "out" arguments. lValueCount = 0; for (int a = 0; a < (int)glslangArgs.size(); ++a) { if (originalParam(qualifiers[a], *argTypes[a], function->hasImplicitThis() && a == 0)) ++lValueCount; else if (writableParam(qualifiers[a])) { if (qualifiers[a] == glslang::EvqOut || qualifiers[a] == glslang::EvqInOut) { spv::Id copy = builder.createLoad(spvArgs[a], spv::NoPrecision); builder.addDecoration(copy, TranslateNonUniformDecoration(argTypes[a]->getQualifier())); builder.setAccessChain(lValues[lValueCount]); multiTypeStore(*argTypes[a], copy); } ++lValueCount; } } return result; } // Translate AST operation to SPV operation, already having SPV-based operands/types. spv::Id TGlslangToSpvTraverser::createBinaryOperation(glslang::TOperator op, OpDecorations& decorations, spv::Id typeId, spv::Id left, spv::Id right, glslang::TBasicType typeProxy, bool reduceComparison) { bool isUnsigned = isTypeUnsignedInt(typeProxy); bool isFloat = isTypeFloat(typeProxy); bool isBool = typeProxy == glslang::EbtBool; spv::Op binOp = spv::Op::OpNop; bool needMatchingVectors = true; // for non-matrix ops, would a scalar need to smear to match a vector? bool comparison = false; switch (op) { case glslang::EOpAdd: case glslang::EOpAddAssign: if (isFloat) binOp = spv::Op::OpFAdd; else binOp = spv::Op::OpIAdd; break; case glslang::EOpSub: case glslang::EOpSubAssign: if (isFloat) binOp = spv::Op::OpFSub; else binOp = spv::Op::OpISub; break; case glslang::EOpMul: case glslang::EOpMulAssign: if (isFloat) binOp = spv::Op::OpFMul; else binOp = spv::Op::OpIMul; break; case glslang::EOpVectorTimesScalar: case glslang::EOpVectorTimesScalarAssign: if (isFloat && (builder.isVector(left) || builder.isVector(right) || builder.isCooperativeVector(left) || builder.isCooperativeVector(right))) { if (builder.isVector(right) || builder.isCooperativeVector(right)) std::swap(left, right); assert(builder.isScalar(right)); needMatchingVectors = false; binOp = spv::Op::OpVectorTimesScalar; } else if (isFloat) { binOp = spv::Op::OpFMul; } else if (builder.isCooperativeVector(left) || builder.isCooperativeVector(right)) { if (builder.isCooperativeVector(right)) std::swap(left, right); assert(builder.isScalar(right)); // Construct a cooperative vector from the scalar right = builder.createCompositeConstruct(builder.getTypeId(left), { right }); binOp = spv::Op::OpIMul; } else { binOp = spv::Op::OpIMul; } break; case glslang::EOpVectorTimesMatrix: case glslang::EOpVectorTimesMatrixAssign: binOp = spv::Op::OpVectorTimesMatrix; break; case glslang::EOpMatrixTimesVector: binOp = spv::Op::OpMatrixTimesVector; break; case glslang::EOpMatrixTimesScalar: case glslang::EOpMatrixTimesScalarAssign: binOp = spv::Op::OpMatrixTimesScalar; break; case glslang::EOpMatrixTimesMatrix: case glslang::EOpMatrixTimesMatrixAssign: binOp = spv::Op::OpMatrixTimesMatrix; break; case glslang::EOpOuterProduct: binOp = spv::Op::OpOuterProduct; needMatchingVectors = false; break; case glslang::EOpDiv: case glslang::EOpDivAssign: if (isFloat) binOp = spv::Op::OpFDiv; else if (isUnsigned) binOp = spv::Op::OpUDiv; else binOp = spv::Op::OpSDiv; break; case glslang::EOpMod: case glslang::EOpModAssign: if (isFloat) binOp = spv::Op::OpFMod; else if (isUnsigned) binOp = spv::Op::OpUMod; else binOp = spv::Op::OpSMod; break; case glslang::EOpRightShift: case glslang::EOpRightShiftAssign: if (isUnsigned) binOp = spv::Op::OpShiftRightLogical; else binOp = spv::Op::OpShiftRightArithmetic; break; case glslang::EOpLeftShift: case glslang::EOpLeftShiftAssign: binOp = spv::Op::OpShiftLeftLogical; break; case glslang::EOpAnd: case glslang::EOpAndAssign: binOp = spv::Op::OpBitwiseAnd; break; case glslang::EOpLogicalAnd: needMatchingVectors = false; binOp = spv::Op::OpLogicalAnd; break; case glslang::EOpInclusiveOr: case glslang::EOpInclusiveOrAssign: binOp = spv::Op::OpBitwiseOr; break; case glslang::EOpLogicalOr: needMatchingVectors = false; binOp = spv::Op::OpLogicalOr; break; case glslang::EOpExclusiveOr: case glslang::EOpExclusiveOrAssign: binOp = spv::Op::OpBitwiseXor; break; case glslang::EOpLogicalXor: needMatchingVectors = false; binOp = spv::Op::OpLogicalNotEqual; break; case glslang::EOpAbsDifference: binOp = isUnsigned ? spv::Op::OpAbsUSubINTEL : spv::Op::OpAbsISubINTEL; break; case glslang::EOpAddSaturate: binOp = isUnsigned ? spv::Op::OpUAddSatINTEL : spv::Op::OpIAddSatINTEL; break; case glslang::EOpSubSaturate: binOp = isUnsigned ? spv::Op::OpUSubSatINTEL : spv::Op::OpISubSatINTEL; break; case glslang::EOpAverage: binOp = isUnsigned ? spv::Op::OpUAverageINTEL : spv::Op::OpIAverageINTEL; break; case glslang::EOpAverageRounded: binOp = isUnsigned ? spv::Op::OpUAverageRoundedINTEL : spv::Op::OpIAverageRoundedINTEL; break; case glslang::EOpMul32x16: binOp = isUnsigned ? spv::Op::OpUMul32x16INTEL : spv::Op::OpIMul32x16INTEL; break; case glslang::EOpExpectEXT: binOp = spv::Op::OpExpectKHR; break; case glslang::EOpLessThan: case glslang::EOpGreaterThan: case glslang::EOpLessThanEqual: case glslang::EOpGreaterThanEqual: case glslang::EOpEqual: case glslang::EOpNotEqual: case glslang::EOpVectorEqual: case glslang::EOpVectorNotEqual: comparison = true; break; default: break; } // handle mapped binary operations (should be non-comparison) if (binOp != spv::Op::OpNop) { assert(comparison == false); if (builder.isMatrix(left) || builder.isMatrix(right) || builder.isCooperativeMatrix(left) || builder.isCooperativeMatrix(right)) return createBinaryMatrixOperation(binOp, decorations, typeId, left, right); // No matrix involved; make both operands be the same number of components, if needed if (needMatchingVectors) builder.promoteScalar(decorations.precision, left, right); spv::Id result = builder.createBinOp(binOp, typeId, left, right); decorations.addNoContraction(builder, result); decorations.addNonUniform(builder, result); return builder.setPrecision(result, decorations.precision); } if (! comparison) return 0; // Handle comparison instructions if (reduceComparison && (op == glslang::EOpEqual || op == glslang::EOpNotEqual) && (builder.isVector(left) || builder.isMatrix(left) || builder.isAggregate(left))) { spv::Id result = builder.createCompositeCompare(decorations.precision, left, right, op == glslang::EOpEqual); decorations.addNonUniform(builder, result); return result; } switch (op) { case glslang::EOpLessThan: if (isFloat) binOp = spv::Op::OpFOrdLessThan; else if (isUnsigned) binOp = spv::Op::OpULessThan; else binOp = spv::Op::OpSLessThan; break; case glslang::EOpGreaterThan: if (isFloat) binOp = spv::Op::OpFOrdGreaterThan; else if (isUnsigned) binOp = spv::Op::OpUGreaterThan; else binOp = spv::Op::OpSGreaterThan; break; case glslang::EOpLessThanEqual: if (isFloat) binOp = spv::Op::OpFOrdLessThanEqual; else if (isUnsigned) binOp = spv::Op::OpULessThanEqual; else binOp = spv::Op::OpSLessThanEqual; break; case glslang::EOpGreaterThanEqual: if (isFloat) binOp = spv::Op::OpFOrdGreaterThanEqual; else if (isUnsigned) binOp = spv::Op::OpUGreaterThanEqual; else binOp = spv::Op::OpSGreaterThanEqual; break; case glslang::EOpEqual: case glslang::EOpVectorEqual: if (isFloat) binOp = spv::Op::OpFOrdEqual; else if (isBool) binOp = spv::Op::OpLogicalEqual; else binOp = spv::Op::OpIEqual; break; case glslang::EOpNotEqual: case glslang::EOpVectorNotEqual: if (isFloat) binOp = spv::Op::OpFUnordNotEqual; else if (isBool) binOp = spv::Op::OpLogicalNotEqual; else binOp = spv::Op::OpINotEqual; break; default: break; } if (binOp != spv::Op::OpNop) { spv::Id result = builder.createBinOp(binOp, typeId, left, right); decorations.addNoContraction(builder, result); decorations.addNonUniform(builder, result); return builder.setPrecision(result, decorations.precision); } return 0; } // // Translate AST matrix operation to SPV operation, already having SPV-based operands/types. // These can be any of: // // matrix * scalar // scalar * matrix // matrix * matrix linear algebraic // matrix * vector // vector * matrix // matrix * matrix componentwise // matrix op matrix op in {+, -, /} // matrix op scalar op in {+, -, /} // scalar op matrix op in {+, -, /} // spv::Id TGlslangToSpvTraverser::createBinaryMatrixOperation(spv::Op op, OpDecorations& decorations, spv::Id typeId, spv::Id left, spv::Id right) { bool firstClass = true; // First, handle first-class matrix operations (* and matrix/scalar) switch (op) { case spv::Op::OpFDiv: if (builder.isMatrix(left) && builder.isScalar(right)) { // turn matrix / scalar into a multiply... spv::Id resultType = builder.getTypeId(right); right = builder.createBinOp(spv::Op::OpFDiv, resultType, builder.makeFpConstant(resultType, 1.0), right); op = spv::Op::OpMatrixTimesScalar; } else firstClass = false; break; case spv::Op::OpMatrixTimesScalar: if (builder.isMatrix(right) || builder.isCooperativeMatrix(right)) std::swap(left, right); assert(builder.isScalar(right)); break; case spv::Op::OpVectorTimesMatrix: assert(builder.isVector(left)); assert(builder.isMatrix(right)); break; case spv::Op::OpMatrixTimesVector: assert(builder.isMatrix(left)); assert(builder.isVector(right)); break; case spv::Op::OpMatrixTimesMatrix: assert(builder.isMatrix(left)); assert(builder.isMatrix(right)); break; default: firstClass = false; break; } if (builder.isCooperativeMatrix(left) || builder.isCooperativeMatrix(right)) firstClass = true; if (firstClass) { spv::Id result = builder.createBinOp(op, typeId, left, right); decorations.addNoContraction(builder, result); decorations.addNonUniform(builder, result); return builder.setPrecision(result, decorations.precision); } // Handle component-wise +, -, *, %, and / for all combinations of type. // The result type of all of them is the same type as the (a) matrix operand. // The algorithm is to: // - break the matrix(es) into vectors // - smear any scalar to a vector // - do vector operations // - make a matrix out the vector results switch (op) { case spv::Op::OpFAdd: case spv::Op::OpFSub: case spv::Op::OpFDiv: case spv::Op::OpFMod: case spv::Op::OpFMul: { // one time set up... bool leftMat = builder.isMatrix(left); bool rightMat = builder.isMatrix(right); unsigned int numCols = leftMat ? builder.getNumColumns(left) : builder.getNumColumns(right); int numRows = leftMat ? builder.getNumRows(left) : builder.getNumRows(right); spv::Id scalarType = builder.getScalarTypeId(typeId); spv::Id vecType = builder.makeVectorType(scalarType, numRows); std::vector results; spv::Id smearVec = spv::NoResult; if (builder.isScalar(left)) smearVec = builder.smearScalar(decorations.precision, left, vecType); else if (builder.isScalar(right)) smearVec = builder.smearScalar(decorations.precision, right, vecType); // do each vector op for (unsigned int c = 0; c < numCols; ++c) { std::vector indexes; indexes.push_back(c); spv::Id leftVec = leftMat ? builder.createCompositeExtract( left, vecType, indexes) : smearVec; spv::Id rightVec = rightMat ? builder.createCompositeExtract(right, vecType, indexes) : smearVec; spv::Id result = builder.createBinOp(op, vecType, leftVec, rightVec); decorations.addNoContraction(builder, result); decorations.addNonUniform(builder, result); results.push_back(builder.setPrecision(result, decorations.precision)); } // put the pieces together spv::Id result = builder.setPrecision(builder.createCompositeConstruct(typeId, results), decorations.precision); decorations.addNonUniform(builder, result); return result; } default: assert(0); return spv::NoResult; } } spv::Id TGlslangToSpvTraverser::createUnaryOperation(glslang::TOperator op, OpDecorations& decorations, spv::Id typeId, spv::Id operand, glslang::TBasicType typeProxy, const spv::Builder::AccessChain::CoherentFlags &lvalueCoherentFlags, const glslang::TType &opType) { spv::Op unaryOp = spv::Op::OpNop; int extBuiltins = -1; int libCall = -1; bool isUnsigned = isTypeUnsignedInt(typeProxy); bool isFloat = isTypeFloat(typeProxy); switch (op) { case glslang::EOpNegative: if (isFloat) { unaryOp = spv::Op::OpFNegate; if (builder.isMatrixType(typeId)) return createUnaryMatrixOperation(unaryOp, decorations, typeId, operand, typeProxy); } else unaryOp = spv::Op::OpSNegate; break; case glslang::EOpLogicalNot: case glslang::EOpVectorLogicalNot: unaryOp = spv::Op::OpLogicalNot; break; case glslang::EOpBitwiseNot: unaryOp = spv::Op::OpNot; break; case glslang::EOpDeterminant: libCall = spv::GLSLstd450Determinant; break; case glslang::EOpMatrixInverse: libCall = spv::GLSLstd450MatrixInverse; break; case glslang::EOpTranspose: unaryOp = spv::Op::OpTranspose; break; case glslang::EOpRadians: libCall = spv::GLSLstd450Radians; break; case glslang::EOpDegrees: libCall = spv::GLSLstd450Degrees; break; case glslang::EOpSin: libCall = spv::GLSLstd450Sin; break; case glslang::EOpCos: libCall = spv::GLSLstd450Cos; break; case glslang::EOpTan: libCall = spv::GLSLstd450Tan; break; case glslang::EOpAcos: libCall = spv::GLSLstd450Acos; break; case glslang::EOpAsin: libCall = spv::GLSLstd450Asin; break; case glslang::EOpAtan: libCall = spv::GLSLstd450Atan; break; case glslang::EOpAcosh: libCall = spv::GLSLstd450Acosh; break; case glslang::EOpAsinh: libCall = spv::GLSLstd450Asinh; break; case glslang::EOpAtanh: libCall = spv::GLSLstd450Atanh; break; case glslang::EOpTanh: libCall = spv::GLSLstd450Tanh; break; case glslang::EOpCosh: libCall = spv::GLSLstd450Cosh; break; case glslang::EOpSinh: libCall = spv::GLSLstd450Sinh; break; case glslang::EOpLength: libCall = spv::GLSLstd450Length; break; case glslang::EOpNormalize: libCall = spv::GLSLstd450Normalize; break; case glslang::EOpExp: libCall = spv::GLSLstd450Exp; break; case glslang::EOpLog: libCall = spv::GLSLstd450Log; break; case glslang::EOpExp2: libCall = spv::GLSLstd450Exp2; break; case glslang::EOpLog2: libCall = spv::GLSLstd450Log2; break; case glslang::EOpSqrt: libCall = spv::GLSLstd450Sqrt; break; case glslang::EOpInverseSqrt: libCall = spv::GLSLstd450InverseSqrt; break; case glslang::EOpFloor: libCall = spv::GLSLstd450Floor; break; case glslang::EOpTrunc: libCall = spv::GLSLstd450Trunc; break; case glslang::EOpRound: libCall = spv::GLSLstd450Round; break; case glslang::EOpRoundEven: libCall = spv::GLSLstd450RoundEven; break; case glslang::EOpCeil: libCall = spv::GLSLstd450Ceil; break; case glslang::EOpFract: libCall = spv::GLSLstd450Fract; break; case glslang::EOpIsNan: unaryOp = spv::Op::OpIsNan; break; case glslang::EOpIsInf: unaryOp = spv::Op::OpIsInf; break; case glslang::EOpIsFinite: unaryOp = spv::Op::OpIsFinite; break; case glslang::EOpFloatBitsToInt: case glslang::EOpFloatBitsToUint: case glslang::EOpIntBitsToFloat: case glslang::EOpUintBitsToFloat: case glslang::EOpDoubleBitsToInt64: case glslang::EOpDoubleBitsToUint64: case glslang::EOpInt64BitsToDouble: case glslang::EOpUint64BitsToDouble: case glslang::EOpFloat16BitsToInt16: case glslang::EOpFloat16BitsToUint16: case glslang::EOpInt16BitsToFloat16: case glslang::EOpUint16BitsToFloat16: unaryOp = spv::Op::OpBitcast; break; case glslang::EOpPackSnorm2x16: libCall = spv::GLSLstd450PackSnorm2x16; break; case glslang::EOpUnpackSnorm2x16: libCall = spv::GLSLstd450UnpackSnorm2x16; break; case glslang::EOpPackUnorm2x16: libCall = spv::GLSLstd450PackUnorm2x16; break; case glslang::EOpUnpackUnorm2x16: libCall = spv::GLSLstd450UnpackUnorm2x16; break; case glslang::EOpPackHalf2x16: libCall = spv::GLSLstd450PackHalf2x16; break; case glslang::EOpUnpackHalf2x16: libCall = spv::GLSLstd450UnpackHalf2x16; break; case glslang::EOpPackSnorm4x8: libCall = spv::GLSLstd450PackSnorm4x8; break; case glslang::EOpUnpackSnorm4x8: libCall = spv::GLSLstd450UnpackSnorm4x8; break; case glslang::EOpPackUnorm4x8: libCall = spv::GLSLstd450PackUnorm4x8; break; case glslang::EOpUnpackUnorm4x8: libCall = spv::GLSLstd450UnpackUnorm4x8; break; case glslang::EOpPackDouble2x32: libCall = spv::GLSLstd450PackDouble2x32; break; case glslang::EOpUnpackDouble2x32: libCall = spv::GLSLstd450UnpackDouble2x32; break; case glslang::EOpPackInt2x32: case glslang::EOpUnpackInt2x32: case glslang::EOpPackUint2x32: case glslang::EOpUnpackUint2x32: case glslang::EOpPack16: case glslang::EOpPack32: case glslang::EOpPack64: case glslang::EOpUnpack32: case glslang::EOpUnpack16: case glslang::EOpUnpack8: case glslang::EOpPackInt2x16: case glslang::EOpUnpackInt2x16: case glslang::EOpPackUint2x16: case glslang::EOpUnpackUint2x16: case glslang::EOpPackInt4x16: case glslang::EOpUnpackInt4x16: case glslang::EOpPackUint4x16: case glslang::EOpUnpackUint4x16: case glslang::EOpPackFloat2x16: case glslang::EOpUnpackFloat2x16: unaryOp = spv::Op::OpBitcast; break; case glslang::EOpDPdx: unaryOp = spv::Op::OpDPdx; break; case glslang::EOpDPdy: unaryOp = spv::Op::OpDPdy; break; case glslang::EOpFwidth: unaryOp = spv::Op::OpFwidth; break; case glslang::EOpAny: unaryOp = spv::Op::OpAny; break; case glslang::EOpAll: unaryOp = spv::Op::OpAll; break; case glslang::EOpAbs: if (isFloat) libCall = spv::GLSLstd450FAbs; else libCall = spv::GLSLstd450SAbs; break; case glslang::EOpSign: if (isFloat) libCall = spv::GLSLstd450FSign; else libCall = spv::GLSLstd450SSign; break; case glslang::EOpDPdxFine: unaryOp = spv::Op::OpDPdxFine; break; case glslang::EOpDPdyFine: unaryOp = spv::Op::OpDPdyFine; break; case glslang::EOpFwidthFine: unaryOp = spv::Op::OpFwidthFine; break; case glslang::EOpDPdxCoarse: unaryOp = spv::Op::OpDPdxCoarse; break; case glslang::EOpDPdyCoarse: unaryOp = spv::Op::OpDPdyCoarse; break; case glslang::EOpFwidthCoarse: unaryOp = spv::Op::OpFwidthCoarse; break; case glslang::EOpRayQueryProceed: unaryOp = spv::Op::OpRayQueryProceedKHR; break; case glslang::EOpRayQueryGetRayTMin: unaryOp = spv::Op::OpRayQueryGetRayTMinKHR; break; case glslang::EOpRayQueryGetRayFlags: unaryOp = spv::Op::OpRayQueryGetRayFlagsKHR; break; case glslang::EOpRayQueryGetWorldRayOrigin: unaryOp = spv::Op::OpRayQueryGetWorldRayOriginKHR; break; case glslang::EOpRayQueryGetWorldRayDirection: unaryOp = spv::Op::OpRayQueryGetWorldRayDirectionKHR; break; case glslang::EOpRayQueryGetIntersectionCandidateAABBOpaque: unaryOp = spv::Op::OpRayQueryGetIntersectionCandidateAABBOpaqueKHR; break; case glslang::EOpInterpolateAtCentroid: if (typeProxy == glslang::EbtFloat16) builder.addExtension(spv::E_SPV_AMD_gpu_shader_half_float); libCall = spv::GLSLstd450InterpolateAtCentroid; break; case glslang::EOpAtomicCounterIncrement: case glslang::EOpAtomicCounterDecrement: case glslang::EOpAtomicCounter: { // Handle all of the atomics in one place, in createAtomicOperation() std::vector operands; operands.push_back(operand); return createAtomicOperation(op, decorations.precision, typeId, operands, typeProxy, lvalueCoherentFlags, opType); } case glslang::EOpBitFieldReverse: unaryOp = spv::Op::OpBitReverse; break; case glslang::EOpBitCount: unaryOp = spv::Op::OpBitCount; break; case glslang::EOpFindLSB: libCall = spv::GLSLstd450FindILsb; break; case glslang::EOpFindMSB: if (isUnsigned) libCall = spv::GLSLstd450FindUMsb; else libCall = spv::GLSLstd450FindSMsb; break; case glslang::EOpCountLeadingZeros: builder.addCapability(spv::Capability::IntegerFunctions2INTEL); builder.addExtension("SPV_INTEL_shader_integer_functions2"); unaryOp = spv::Op::OpUCountLeadingZerosINTEL; break; case glslang::EOpCountTrailingZeros: builder.addCapability(spv::Capability::IntegerFunctions2INTEL); builder.addExtension("SPV_INTEL_shader_integer_functions2"); unaryOp = spv::Op::OpUCountTrailingZerosINTEL; break; case glslang::EOpBallot: case glslang::EOpReadFirstInvocation: case glslang::EOpAnyInvocation: case glslang::EOpAllInvocations: case glslang::EOpAllInvocationsEqual: case glslang::EOpMinInvocations: case glslang::EOpMaxInvocations: case glslang::EOpAddInvocations: case glslang::EOpMinInvocationsNonUniform: case glslang::EOpMaxInvocationsNonUniform: case glslang::EOpAddInvocationsNonUniform: case glslang::EOpMinInvocationsInclusiveScan: case glslang::EOpMaxInvocationsInclusiveScan: case glslang::EOpAddInvocationsInclusiveScan: case glslang::EOpMinInvocationsInclusiveScanNonUniform: case glslang::EOpMaxInvocationsInclusiveScanNonUniform: case glslang::EOpAddInvocationsInclusiveScanNonUniform: case glslang::EOpMinInvocationsExclusiveScan: case glslang::EOpMaxInvocationsExclusiveScan: case glslang::EOpAddInvocationsExclusiveScan: case glslang::EOpMinInvocationsExclusiveScanNonUniform: case glslang::EOpMaxInvocationsExclusiveScanNonUniform: case glslang::EOpAddInvocationsExclusiveScanNonUniform: { std::vector operands; operands.push_back(operand); return createInvocationsOperation(op, typeId, operands, typeProxy); } case glslang::EOpSubgroupAll: case glslang::EOpSubgroupAny: case glslang::EOpSubgroupAllEqual: case glslang::EOpSubgroupBroadcastFirst: case glslang::EOpSubgroupBallot: case glslang::EOpSubgroupInverseBallot: case glslang::EOpSubgroupBallotBitCount: case glslang::EOpSubgroupBallotInclusiveBitCount: case glslang::EOpSubgroupBallotExclusiveBitCount: case glslang::EOpSubgroupBallotFindLSB: case glslang::EOpSubgroupBallotFindMSB: case glslang::EOpSubgroupAdd: case glslang::EOpSubgroupMul: case glslang::EOpSubgroupMin: case glslang::EOpSubgroupMax: case glslang::EOpSubgroupAnd: case glslang::EOpSubgroupOr: case glslang::EOpSubgroupXor: case glslang::EOpSubgroupInclusiveAdd: case glslang::EOpSubgroupInclusiveMul: case glslang::EOpSubgroupInclusiveMin: case glslang::EOpSubgroupInclusiveMax: case glslang::EOpSubgroupInclusiveAnd: case glslang::EOpSubgroupInclusiveOr: case glslang::EOpSubgroupInclusiveXor: case glslang::EOpSubgroupExclusiveAdd: case glslang::EOpSubgroupExclusiveMul: case glslang::EOpSubgroupExclusiveMin: case glslang::EOpSubgroupExclusiveMax: case glslang::EOpSubgroupExclusiveAnd: case glslang::EOpSubgroupExclusiveOr: case glslang::EOpSubgroupExclusiveXor: case glslang::EOpSubgroupQuadSwapHorizontal: case glslang::EOpSubgroupQuadSwapVertical: case glslang::EOpSubgroupQuadSwapDiagonal: case glslang::EOpSubgroupQuadAll: case glslang::EOpSubgroupQuadAny: { std::vector operands; operands.push_back(operand); return createSubgroupOperation(op, typeId, operands, typeProxy); } case glslang::EOpMbcnt: extBuiltins = getExtBuiltins(spv::E_SPV_AMD_shader_ballot); libCall = spv::MbcntAMD; break; case glslang::EOpCubeFaceIndex: extBuiltins = getExtBuiltins(spv::E_SPV_AMD_gcn_shader); libCall = spv::CubeFaceIndexAMD; break; case glslang::EOpCubeFaceCoord: extBuiltins = getExtBuiltins(spv::E_SPV_AMD_gcn_shader); libCall = spv::CubeFaceCoordAMD; break; case glslang::EOpSubgroupPartition: unaryOp = spv::Op::OpGroupNonUniformPartitionNV; break; case glslang::EOpConstructReference: unaryOp = spv::Op::OpBitcast; break; case glslang::EOpConvUint64ToAccStruct: case glslang::EOpConvUvec2ToAccStruct: unaryOp = spv::Op::OpConvertUToAccelerationStructureKHR; break; case glslang::EOpHitObjectIsEmptyNV: unaryOp = spv::Op::OpHitObjectIsEmptyNV; break; case glslang::EOpHitObjectIsMissNV: unaryOp = spv::Op::OpHitObjectIsMissNV; break; case glslang::EOpHitObjectIsHitNV: unaryOp = spv::Op::OpHitObjectIsHitNV; break; case glslang::EOpHitObjectGetObjectRayOriginNV: unaryOp = spv::Op::OpHitObjectGetObjectRayOriginNV; break; case glslang::EOpHitObjectGetObjectRayDirectionNV: unaryOp = spv::Op::OpHitObjectGetObjectRayDirectionNV; break; case glslang::EOpHitObjectGetWorldRayOriginNV: unaryOp = spv::Op::OpHitObjectGetWorldRayOriginNV; break; case glslang::EOpHitObjectGetWorldRayDirectionNV: unaryOp = spv::Op::OpHitObjectGetWorldRayDirectionNV; break; case glslang::EOpHitObjectGetObjectToWorldNV: unaryOp = spv::Op::OpHitObjectGetObjectToWorldNV; break; case glslang::EOpHitObjectGetWorldToObjectNV: unaryOp = spv::Op::OpHitObjectGetWorldToObjectNV; break; case glslang::EOpHitObjectGetRayTMinNV: unaryOp = spv::Op::OpHitObjectGetRayTMinNV; break; case glslang::EOpHitObjectGetRayTMaxNV: unaryOp = spv::Op::OpHitObjectGetRayTMaxNV; break; case glslang::EOpHitObjectGetPrimitiveIndexNV: unaryOp = spv::Op::OpHitObjectGetPrimitiveIndexNV; break; case glslang::EOpHitObjectGetInstanceIdNV: unaryOp = spv::Op::OpHitObjectGetInstanceIdNV; break; case glslang::EOpHitObjectGetInstanceCustomIndexNV: unaryOp = spv::Op::OpHitObjectGetInstanceCustomIndexNV; break; case glslang::EOpHitObjectGetGeometryIndexNV: unaryOp = spv::Op::OpHitObjectGetGeometryIndexNV; break; case glslang::EOpHitObjectGetHitKindNV: unaryOp = spv::Op::OpHitObjectGetHitKindNV; break; case glslang::EOpHitObjectGetCurrentTimeNV: unaryOp = spv::Op::OpHitObjectGetCurrentTimeNV; break; case glslang::EOpHitObjectGetShaderBindingTableRecordIndexNV: unaryOp = spv::Op::OpHitObjectGetShaderBindingTableRecordIndexNV; break; case glslang::EOpHitObjectGetShaderRecordBufferHandleNV: unaryOp = spv::Op::OpHitObjectGetShaderRecordBufferHandleNV; break; case glslang::EOpHitObjectGetClusterIdNV: unaryOp = spv::Op::OpHitObjectGetClusterIdNV; builder.addExtension(spv::E_SPV_NV_cluster_acceleration_structure); builder.addCapability(spv::Capability::ShaderInvocationReorderNV); builder.addCapability(spv::Capability::RayTracingClusterAccelerationStructureNV); break; case glslang::EOpHitObjectGetSpherePositionNV: unaryOp = spv::Op::OpHitObjectGetSpherePositionNV; builder.addExtension(spv::E_SPV_NV_linear_swept_spheres); builder.addCapability(spv::Capability::ShaderInvocationReorderNV); builder.addCapability(spv::Capability::RayTracingSpheresGeometryNV); break; case glslang::EOpHitObjectGetSphereRadiusNV: unaryOp = spv::Op::OpHitObjectGetSphereRadiusNV; builder.addExtension(spv::E_SPV_NV_linear_swept_spheres); builder.addCapability(spv::Capability::ShaderInvocationReorderNV); builder.addCapability(spv::Capability::RayTracingSpheresGeometryNV); break; case glslang::EOpHitObjectIsSphereHitNV: unaryOp = spv::Op::OpHitObjectIsSphereHitNV; builder.addExtension(spv::E_SPV_NV_linear_swept_spheres); builder.addCapability(spv::Capability::ShaderInvocationReorderNV); builder.addCapability(spv::Capability::RayTracingSpheresGeometryNV); break; case glslang::EOpHitObjectIsLSSHitNV: unaryOp = spv::Op::OpHitObjectIsLSSHitNV; builder.addExtension(spv::E_SPV_NV_linear_swept_spheres); builder.addCapability(spv::Capability::ShaderInvocationReorderNV); builder.addCapability(spv::Capability::RayTracingLinearSweptSpheresGeometryNV); break; case glslang::EOpFetchMicroTriangleVertexPositionNV: unaryOp = spv::Op::OpFetchMicroTriangleVertexPositionNV; break; case glslang::EOpFetchMicroTriangleVertexBarycentricNV: unaryOp = spv::Op::OpFetchMicroTriangleVertexBarycentricNV; break; case glslang::EOpCopyObject: unaryOp = spv::Op::OpCopyObject; break; case glslang::EOpDepthAttachmentReadEXT: builder.addExtension(spv::E_SPV_EXT_shader_tile_image); builder.addCapability(spv::Capability::TileImageDepthReadAccessEXT); unaryOp = spv::Op::OpDepthAttachmentReadEXT; decorations.precision = spv::NoPrecision; break; case glslang::EOpStencilAttachmentReadEXT: builder.addExtension(spv::E_SPV_EXT_shader_tile_image); builder.addCapability(spv::Capability::TileImageStencilReadAccessEXT); unaryOp = spv::Op::OpStencilAttachmentReadEXT; decorations.precision = spv::Decoration::RelaxedPrecision; break; default: return 0; } spv::Id id; if (libCall >= 0) { std::vector args; args.push_back(operand); id = builder.createBuiltinCall(typeId, extBuiltins >= 0 ? extBuiltins : stdBuiltins, libCall, args); } else { id = builder.createUnaryOp(unaryOp, typeId, operand); } decorations.addNoContraction(builder, id); decorations.addNonUniform(builder, id); return builder.setPrecision(id, decorations.precision); } // Create a unary operation on a matrix spv::Id TGlslangToSpvTraverser::createUnaryMatrixOperation(spv::Op op, OpDecorations& decorations, spv::Id typeId, spv::Id operand, glslang::TBasicType /* typeProxy */) { // Handle unary operations vector by vector. // The result type is the same type as the original type. // The algorithm is to: // - break the matrix into vectors // - apply the operation to each vector // - make a matrix out the vector results // get the types sorted out int numCols = builder.getNumColumns(operand); int numRows = builder.getNumRows(operand); spv::Id srcVecType = builder.makeVectorType(builder.getScalarTypeId(builder.getTypeId(operand)), numRows); spv::Id destVecType = builder.makeVectorType(builder.getScalarTypeId(typeId), numRows); std::vector results; // do each vector op for (int c = 0; c < numCols; ++c) { std::vector indexes; indexes.push_back(c); spv::Id srcVec = builder.createCompositeExtract(operand, srcVecType, indexes); spv::Id destVec = builder.createUnaryOp(op, destVecType, srcVec); decorations.addNoContraction(builder, destVec); decorations.addNonUniform(builder, destVec); results.push_back(builder.setPrecision(destVec, decorations.precision)); } // put the pieces together spv::Id result = builder.setPrecision(builder.createCompositeConstruct(typeId, results), decorations.precision); decorations.addNonUniform(builder, result); return result; } // For converting integers where both the bitwidth and the signedness could // change, but only do the width change here. The caller is still responsible // for the signedness conversion. // destType is the final type that will be converted to, but this function // may only be doing part of that conversion. spv::Id TGlslangToSpvTraverser::createIntWidthConversion(spv::Id operand, int vectorSize, spv::Id destType, glslang::TBasicType resultBasicType, glslang::TBasicType operandBasicType) { // Get the result type width, based on the type to convert to. int width = GetNumBits(resultBasicType); // Get the conversion operation and result type, // based on the target width, but the source type. spv::Id type = spv::NoType; spv::Op convOp = spv::Op::OpNop; if (isTypeSignedInt(operandBasicType)) { convOp = spv::Op::OpSConvert; type = builder.makeIntType(width); } else { convOp = spv::Op::OpUConvert; type = builder.makeUintType(width); } if (builder.getOpCode(destType) == spv::Op::OpTypeCooperativeVectorNV) { type = builder.makeCooperativeVectorTypeNV(type, builder.getCooperativeVectorNumComponents(destType)); } else if (vectorSize > 0) type = builder.makeVectorType(type, vectorSize); else if (builder.getOpCode(destType) == spv::Op::OpTypeCooperativeMatrixKHR || builder.getOpCode(destType) == spv::Op::OpTypeCooperativeMatrixNV) { type = builder.makeCooperativeMatrixTypeWithSameShape(type, destType); } return builder.createUnaryOp(convOp, type, operand); } spv::Id TGlslangToSpvTraverser::createConversion(glslang::TOperator op, OpDecorations& decorations, spv::Id destType, spv::Id operand, glslang::TBasicType resultBasicType, glslang::TBasicType operandBasicType) { spv::Op convOp = spv::Op::OpNop; spv::Id zero = 0; spv::Id one = 0; int vectorSize = builder.isVectorType(destType) ? builder.getNumTypeComponents(destType) : 0; if (IsOpNumericConv(op) || op == glslang::EOpConstructSaturated) { if (isTypeSignedInt(operandBasicType) && isTypeFloat(resultBasicType)) { convOp = spv::Op::OpConvertSToF; } if (isTypeUnsignedInt(operandBasicType) && isTypeFloat(resultBasicType)) { convOp = spv::Op::OpConvertUToF; } if (isTypeFloat(operandBasicType) && isTypeSignedInt(resultBasicType)) { convOp = spv::Op::OpConvertFToS; } if (isTypeFloat(operandBasicType) && isTypeUnsignedInt(resultBasicType)) { convOp = spv::Op::OpConvertFToU; } if (isTypeSignedInt(operandBasicType) && isTypeSignedInt(resultBasicType)) { convOp = spv::Op::OpSConvert; } if (isTypeUnsignedInt(operandBasicType) && isTypeUnsignedInt(resultBasicType)) { convOp = spv::Op::OpUConvert; } if (isTypeFloat(operandBasicType) && isTypeFloat(resultBasicType)) { convOp = spv::Op::OpFConvert; if (builder.isMatrixType(destType)) return createUnaryMatrixOperation(convOp, decorations, destType, operand, operandBasicType); } if (isTypeInt(operandBasicType) && isTypeInt(resultBasicType) && isTypeUnsignedInt(operandBasicType) != isTypeUnsignedInt(resultBasicType)) { if (GetNumBits(operandBasicType) != GetNumBits(resultBasicType)) { // OpSConvert/OpUConvert + OpBitCast operand = createIntWidthConversion(operand, vectorSize, destType, resultBasicType, operandBasicType); } if (builder.isInSpecConstCodeGenMode()) { uint32_t bits = GetNumBits(resultBasicType); spv::Id zeroType = builder.makeUintType(bits); if (bits == 64) { zero = builder.makeInt64Constant(zeroType, 0, false); } else { zero = builder.makeIntConstant(zeroType, 0, false); } zero = makeSmearedConstant(zero, vectorSize); // Use OpIAdd, instead of OpBitcast to do the conversion when // generating for OpSpecConstantOp instruction. return builder.createBinOp(spv::Op::OpIAdd, destType, operand, zero); } // For normal run-time conversion instruction, use OpBitcast. convOp = spv::Op::OpBitcast; } if (resultBasicType == glslang::EbtBool) { uint32_t bits = GetNumBits(operandBasicType); if (isTypeInt(operandBasicType)) { spv::Id zeroType = builder.makeUintType(bits); if (bits == 64) { zero = builder.makeInt64Constant(zeroType, 0, false); } else { zero = builder.makeIntConstant(zeroType, 0, false); } zero = makeSmearedConstant(zero, vectorSize); return builder.createBinOp(spv::Op::OpINotEqual, destType, operand, zero); } else { assert(isTypeFloat(operandBasicType)); if (bits == 64) { zero = builder.makeDoubleConstant(0.0); } else if (bits == 32) { zero = builder.makeFloatConstant(0.0); } else { assert(bits == 16); zero = builder.makeFloat16Constant(0.0); } zero = makeSmearedConstant(zero, vectorSize); return builder.createBinOp(spv::Op::OpFUnordNotEqual, destType, operand, zero); } } if (operandBasicType == glslang::EbtBool) { uint32_t bits = GetNumBits(resultBasicType); convOp = spv::Op::OpSelect; if (isTypeInt(resultBasicType)) { spv::Id zeroType = isTypeSignedInt(resultBasicType) ? builder.makeIntType(bits) : builder.makeUintType(bits); if (bits == 64) { zero = builder.makeInt64Constant(zeroType, 0, false); one = builder.makeInt64Constant(zeroType, 1, false); } else { zero = builder.makeIntConstant(zeroType, 0, false); one = builder.makeIntConstant(zeroType, 1, false); } } else { assert(isTypeFloat(resultBasicType)); if (bits == 64) { zero = builder.makeDoubleConstant(0.0); one = builder.makeDoubleConstant(1.0); } else if (bits == 32) { zero = builder.makeFloatConstant(0.0); one = builder.makeFloatConstant(1.0); } else { assert(bits == 16); zero = builder.makeFloat16Constant(0.0); one = builder.makeFloat16Constant(1.0); } } } } if (convOp == spv::Op::OpNop) { switch (op) { case glslang::EOpConvUint64ToPtr: convOp = spv::Op::OpConvertUToPtr; break; case glslang::EOpConvPtrToUint64: convOp = spv::Op::OpConvertPtrToU; break; case glslang::EOpConvPtrToUvec2: case glslang::EOpConvUvec2ToPtr: convOp = spv::Op::OpBitcast; break; default: break; } } spv::Id result = 0; if (convOp == spv::Op::OpNop) return result; if (convOp == spv::Op::OpSelect) { zero = makeSmearedConstant(zero, vectorSize); one = makeSmearedConstant(one, vectorSize); result = builder.createTriOp(convOp, destType, operand, one, zero); } else result = builder.createUnaryOp(convOp, destType, operand); result = builder.setPrecision(result, decorations.precision); decorations.addNonUniform(builder, result); return result; } spv::Id TGlslangToSpvTraverser::makeSmearedConstant(spv::Id constant, int vectorSize) { if (vectorSize == 0) return constant; spv::Id vectorTypeId = builder.makeVectorType(builder.getTypeId(constant), vectorSize); std::vector components; for (int c = 0; c < vectorSize; ++c) components.push_back(constant); return builder.makeCompositeConstant(vectorTypeId, components); } // For glslang ops that map to SPV atomic opCodes spv::Id TGlslangToSpvTraverser::createAtomicOperation(glslang::TOperator op, spv::Decoration /*precision*/, spv::Id typeId, std::vector& operands, glslang::TBasicType typeProxy, const spv::Builder::AccessChain::CoherentFlags &lvalueCoherentFlags, const glslang::TType &opType) { spv::Op opCode = spv::Op::OpNop; switch (op) { case glslang::EOpAtomicAdd: case glslang::EOpImageAtomicAdd: case glslang::EOpAtomicCounterAdd: opCode = spv::Op::OpAtomicIAdd; if (typeProxy == glslang::EbtFloat16 || typeProxy == glslang::EbtFloat || typeProxy == glslang::EbtDouble) { opCode = spv::Op::OpAtomicFAddEXT; if (typeProxy == glslang::EbtFloat16 && (opType.getVectorSize() == 2 || opType.getVectorSize() == 4)) { builder.addExtension(spv::E_SPV_NV_shader_atomic_fp16_vector); builder.addCapability(spv::Capability::AtomicFloat16VectorNV); } else { builder.addExtension(spv::E_SPV_EXT_shader_atomic_float_add); if (typeProxy == glslang::EbtFloat16) { builder.addExtension(spv::E_SPV_EXT_shader_atomic_float16_add); builder.addCapability(spv::Capability::AtomicFloat16AddEXT); } else if (typeProxy == glslang::EbtFloat) { builder.addCapability(spv::Capability::AtomicFloat32AddEXT); } else { builder.addCapability(spv::Capability::AtomicFloat64AddEXT); } } } break; case glslang::EOpAtomicSubtract: case glslang::EOpAtomicCounterSubtract: opCode = spv::Op::OpAtomicISub; break; case glslang::EOpAtomicMin: case glslang::EOpImageAtomicMin: case glslang::EOpAtomicCounterMin: if (typeProxy == glslang::EbtFloat16 || typeProxy == glslang::EbtFloat || typeProxy == glslang::EbtDouble) { opCode = spv::Op::OpAtomicFMinEXT; if (typeProxy == glslang::EbtFloat16 && (opType.getVectorSize() == 2 || opType.getVectorSize() == 4)) { builder.addExtension(spv::E_SPV_NV_shader_atomic_fp16_vector); builder.addCapability(spv::Capability::AtomicFloat16VectorNV); } else { builder.addExtension(spv::E_SPV_EXT_shader_atomic_float_min_max); if (typeProxy == glslang::EbtFloat16) builder.addCapability(spv::Capability::AtomicFloat16MinMaxEXT); else if (typeProxy == glslang::EbtFloat) builder.addCapability(spv::Capability::AtomicFloat32MinMaxEXT); else builder.addCapability(spv::Capability::AtomicFloat64MinMaxEXT); } } else if (typeProxy == glslang::EbtUint || typeProxy == glslang::EbtUint64) { opCode = spv::Op::OpAtomicUMin; } else { opCode = spv::Op::OpAtomicSMin; } break; case glslang::EOpAtomicMax: case glslang::EOpImageAtomicMax: case glslang::EOpAtomicCounterMax: if (typeProxy == glslang::EbtFloat16 || typeProxy == glslang::EbtFloat || typeProxy == glslang::EbtDouble) { opCode = spv::Op::OpAtomicFMaxEXT; if (typeProxy == glslang::EbtFloat16 && (opType.getVectorSize() == 2 || opType.getVectorSize() == 4)) { builder.addExtension(spv::E_SPV_NV_shader_atomic_fp16_vector); builder.addCapability(spv::Capability::AtomicFloat16VectorNV); } else { builder.addExtension(spv::E_SPV_EXT_shader_atomic_float_min_max); if (typeProxy == glslang::EbtFloat16) builder.addCapability(spv::Capability::AtomicFloat16MinMaxEXT); else if (typeProxy == glslang::EbtFloat) builder.addCapability(spv::Capability::AtomicFloat32MinMaxEXT); else builder.addCapability(spv::Capability::AtomicFloat64MinMaxEXT); } } else if (typeProxy == glslang::EbtUint || typeProxy == glslang::EbtUint64) { opCode = spv::Op::OpAtomicUMax; } else { opCode = spv::Op::OpAtomicSMax; } break; case glslang::EOpAtomicAnd: case glslang::EOpImageAtomicAnd: case glslang::EOpAtomicCounterAnd: opCode = spv::Op::OpAtomicAnd; break; case glslang::EOpAtomicOr: case glslang::EOpImageAtomicOr: case glslang::EOpAtomicCounterOr: opCode = spv::Op::OpAtomicOr; break; case glslang::EOpAtomicXor: case glslang::EOpImageAtomicXor: case glslang::EOpAtomicCounterXor: opCode = spv::Op::OpAtomicXor; break; case glslang::EOpAtomicExchange: case glslang::EOpImageAtomicExchange: case glslang::EOpAtomicCounterExchange: if ((typeProxy == glslang::EbtFloat16) && (opType.getVectorSize() == 2 || opType.getVectorSize() == 4)) { builder.addExtension(spv::E_SPV_NV_shader_atomic_fp16_vector); builder.addCapability(spv::Capability::AtomicFloat16VectorNV); } opCode = spv::Op::OpAtomicExchange; break; case glslang::EOpAtomicCompSwap: case glslang::EOpImageAtomicCompSwap: case glslang::EOpAtomicCounterCompSwap: opCode = spv::Op::OpAtomicCompareExchange; break; case glslang::EOpAtomicCounterIncrement: opCode = spv::Op::OpAtomicIIncrement; break; case glslang::EOpAtomicCounterDecrement: opCode = spv::Op::OpAtomicIDecrement; break; case glslang::EOpAtomicCounter: case glslang::EOpImageAtomicLoad: case glslang::EOpAtomicLoad: opCode = spv::Op::OpAtomicLoad; break; case glslang::EOpAtomicStore: case glslang::EOpImageAtomicStore: opCode = spv::Op::OpAtomicStore; break; default: assert(0); break; } if (typeProxy == glslang::EbtInt64 || typeProxy == glslang::EbtUint64) builder.addCapability(spv::Capability::Int64Atomics); // Sort out the operands // - mapping from glslang -> SPV // - there are extra SPV operands that are optional in glslang // - compare-exchange swaps the value and comparator // - compare-exchange has an extra memory semantics // - EOpAtomicCounterDecrement needs a post decrement spv::Id pointerId = 0, compareId = 0, valueId = 0; // scope defaults to Device in the old model, QueueFamilyKHR in the new model spv::Id scopeId; if (glslangIntermediate->usingVulkanMemoryModel()) { scopeId = builder.makeUintConstant(spv::Scope::QueueFamilyKHR); } else { scopeId = builder.makeUintConstant(spv::Scope::Device); } // semantics default to relaxed spv::Id semanticsId = builder.makeUintConstant(lvalueCoherentFlags.isVolatile() && glslangIntermediate->usingVulkanMemoryModel() ? spv::MemorySemanticsMask::Volatile : spv::MemorySemanticsMask::MaskNone); spv::Id semanticsId2 = semanticsId; pointerId = operands[0]; if (opCode == spv::Op::OpAtomicIIncrement || opCode == spv::Op::OpAtomicIDecrement) { // no additional operands } else if (opCode == spv::Op::OpAtomicCompareExchange) { compareId = operands[1]; valueId = operands[2]; if (operands.size() > 3) { scopeId = operands[3]; semanticsId = builder.makeUintConstant( builder.getConstantScalar(operands[4]) | builder.getConstantScalar(operands[5])); semanticsId2 = builder.makeUintConstant( builder.getConstantScalar(operands[6]) | builder.getConstantScalar(operands[7])); } } else if (opCode == spv::Op::OpAtomicLoad) { if (operands.size() > 1) { scopeId = operands[1]; semanticsId = builder.makeUintConstant( builder.getConstantScalar(operands[2]) | builder.getConstantScalar(operands[3])); } } else { // atomic store or RMW valueId = operands[1]; if (operands.size() > 2) { scopeId = operands[2]; semanticsId = builder.makeUintConstant (builder.getConstantScalar(operands[3]) | builder.getConstantScalar(operands[4])); } } // Check for capabilities auto const semanticsImmediate = (spv::MemorySemanticsMask)(builder.getConstantScalar(semanticsId) | builder.getConstantScalar(semanticsId2)); if (anySet(semanticsImmediate, spv::MemorySemanticsMask::MakeAvailableKHR | spv::MemorySemanticsMask::MakeVisibleKHR | spv::MemorySemanticsMask::OutputMemoryKHR | spv::MemorySemanticsMask::Volatile)) { builder.addCapability(spv::Capability::VulkanMemoryModelKHR); } auto const scope = (spv::Scope)builder.getConstantScalar(scopeId); if (scope == spv::Scope::QueueFamily) { builder.addCapability(spv::Capability::VulkanMemoryModelKHR); } if (glslangIntermediate->usingVulkanMemoryModel() && scope == spv::Scope::Device) { builder.addCapability(spv::Capability::VulkanMemoryModelDeviceScopeKHR); } std::vector spvAtomicOperands; // hold the spv operands spvAtomicOperands.reserve(6); spvAtomicOperands.push_back(pointerId); spvAtomicOperands.push_back(scopeId); spvAtomicOperands.push_back(semanticsId); if (opCode == spv::Op::OpAtomicCompareExchange) { spvAtomicOperands.push_back(semanticsId2); spvAtomicOperands.push_back(valueId); spvAtomicOperands.push_back(compareId); } else if (opCode != spv::Op::OpAtomicLoad && opCode != spv::Op::OpAtomicIIncrement && opCode != spv::Op::OpAtomicIDecrement) { spvAtomicOperands.push_back(valueId); } if (opCode == spv::Op::OpAtomicStore) { builder.createNoResultOp(opCode, spvAtomicOperands); return 0; } else { spv::Id resultId = builder.createOp(opCode, typeId, spvAtomicOperands); // GLSL and HLSL atomic-counter decrement return post-decrement value, // while SPIR-V returns pre-decrement value. Translate between these semantics. if (op == glslang::EOpAtomicCounterDecrement) resultId = builder.createBinOp(spv::Op::OpISub, typeId, resultId, builder.makeIntConstant(1)); return resultId; } } // Create group invocation operations. spv::Id TGlslangToSpvTraverser::createInvocationsOperation(glslang::TOperator op, spv::Id typeId, std::vector& operands, glslang::TBasicType typeProxy) { bool isUnsigned = isTypeUnsignedInt(typeProxy); bool isFloat = isTypeFloat(typeProxy); spv::Op opCode = spv::Op::OpNop; std::vector spvGroupOperands; spv::GroupOperation groupOperation = spv::GroupOperation::Max; if (op == glslang::EOpBallot || op == glslang::EOpReadFirstInvocation || op == glslang::EOpReadInvocation) { builder.addExtension(spv::E_SPV_KHR_shader_ballot); builder.addCapability(spv::Capability::SubgroupBallotKHR); } else if (op == glslang::EOpAnyInvocation || op == glslang::EOpAllInvocations || op == glslang::EOpAllInvocationsEqual) { builder.addExtension(spv::E_SPV_KHR_subgroup_vote); builder.addCapability(spv::Capability::SubgroupVoteKHR); } else { builder.addCapability(spv::Capability::Groups); if (op == glslang::EOpMinInvocationsNonUniform || op == glslang::EOpMaxInvocationsNonUniform || op == glslang::EOpAddInvocationsNonUniform || op == glslang::EOpMinInvocationsInclusiveScanNonUniform || op == glslang::EOpMaxInvocationsInclusiveScanNonUniform || op == glslang::EOpAddInvocationsInclusiveScanNonUniform || op == glslang::EOpMinInvocationsExclusiveScanNonUniform || op == glslang::EOpMaxInvocationsExclusiveScanNonUniform || op == glslang::EOpAddInvocationsExclusiveScanNonUniform) builder.addExtension(spv::E_SPV_AMD_shader_ballot); switch (op) { case glslang::EOpMinInvocations: case glslang::EOpMaxInvocations: case glslang::EOpAddInvocations: case glslang::EOpMinInvocationsNonUniform: case glslang::EOpMaxInvocationsNonUniform: case glslang::EOpAddInvocationsNonUniform: groupOperation = spv::GroupOperation::Reduce; break; case glslang::EOpMinInvocationsInclusiveScan: case glslang::EOpMaxInvocationsInclusiveScan: case glslang::EOpAddInvocationsInclusiveScan: case glslang::EOpMinInvocationsInclusiveScanNonUniform: case glslang::EOpMaxInvocationsInclusiveScanNonUniform: case glslang::EOpAddInvocationsInclusiveScanNonUniform: groupOperation = spv::GroupOperation::InclusiveScan; break; case glslang::EOpMinInvocationsExclusiveScan: case glslang::EOpMaxInvocationsExclusiveScan: case glslang::EOpAddInvocationsExclusiveScan: case glslang::EOpMinInvocationsExclusiveScanNonUniform: case glslang::EOpMaxInvocationsExclusiveScanNonUniform: case glslang::EOpAddInvocationsExclusiveScanNonUniform: groupOperation = spv::GroupOperation::ExclusiveScan; break; default: break; } spv::IdImmediate scope = { true, builder.makeUintConstant(spv::Scope::Subgroup) }; spvGroupOperands.push_back(scope); if (groupOperation != spv::GroupOperation::Max) { spv::IdImmediate groupOp = { false, (unsigned)groupOperation }; spvGroupOperands.push_back(groupOp); } } for (auto opIt = operands.begin(); opIt != operands.end(); ++opIt) { spv::IdImmediate op = { true, *opIt }; spvGroupOperands.push_back(op); } switch (op) { case glslang::EOpAnyInvocation: opCode = spv::Op::OpSubgroupAnyKHR; break; case glslang::EOpAllInvocations: opCode = spv::Op::OpSubgroupAllKHR; break; case glslang::EOpAllInvocationsEqual: opCode = spv::Op::OpSubgroupAllEqualKHR; break; case glslang::EOpReadInvocation: opCode = spv::Op::OpSubgroupReadInvocationKHR; if (builder.isVectorType(typeId)) return CreateInvocationsVectorOperation(opCode, groupOperation, typeId, operands); break; case glslang::EOpReadFirstInvocation: opCode = spv::Op::OpSubgroupFirstInvocationKHR; if (builder.isVectorType(typeId)) return CreateInvocationsVectorOperation(opCode, groupOperation, typeId, operands); break; case glslang::EOpBallot: { // NOTE: According to the spec, the result type of "OpSubgroupBallotKHR" must be a 4 component vector of 32 // bit integer types. The GLSL built-in function "ballotARB()" assumes the maximum number of invocations in // a subgroup is 64. Thus, we have to convert uvec4.xy to uint64_t as follow: // // result = Bitcast(SubgroupBallotKHR(Predicate).xy) // spv::Id uintType = builder.makeUintType(32); spv::Id uvec4Type = builder.makeVectorType(uintType, 4); spv::Id result = builder.createOp(spv::Op::OpSubgroupBallotKHR, uvec4Type, spvGroupOperands); std::vector components; components.push_back(builder.createCompositeExtract(result, uintType, 0)); components.push_back(builder.createCompositeExtract(result, uintType, 1)); spv::Id uvec2Type = builder.makeVectorType(uintType, 2); return builder.createUnaryOp(spv::Op::OpBitcast, typeId, builder.createCompositeConstruct(uvec2Type, components)); } case glslang::EOpMinInvocations: case glslang::EOpMaxInvocations: case glslang::EOpAddInvocations: case glslang::EOpMinInvocationsInclusiveScan: case glslang::EOpMaxInvocationsInclusiveScan: case glslang::EOpAddInvocationsInclusiveScan: case glslang::EOpMinInvocationsExclusiveScan: case glslang::EOpMaxInvocationsExclusiveScan: case glslang::EOpAddInvocationsExclusiveScan: if (op == glslang::EOpMinInvocations || op == glslang::EOpMinInvocationsInclusiveScan || op == glslang::EOpMinInvocationsExclusiveScan) { if (isFloat) opCode = spv::Op::OpGroupFMin; else { if (isUnsigned) opCode = spv::Op::OpGroupUMin; else opCode = spv::Op::OpGroupSMin; } } else if (op == glslang::EOpMaxInvocations || op == glslang::EOpMaxInvocationsInclusiveScan || op == glslang::EOpMaxInvocationsExclusiveScan) { if (isFloat) opCode = spv::Op::OpGroupFMax; else { if (isUnsigned) opCode = spv::Op::OpGroupUMax; else opCode = spv::Op::OpGroupSMax; } } else { if (isFloat) opCode = spv::Op::OpGroupFAdd; else opCode = spv::Op::OpGroupIAdd; } if (builder.isVectorType(typeId)) return CreateInvocationsVectorOperation(opCode, groupOperation, typeId, operands); break; case glslang::EOpMinInvocationsNonUniform: case glslang::EOpMaxInvocationsNonUniform: case glslang::EOpAddInvocationsNonUniform: case glslang::EOpMinInvocationsInclusiveScanNonUniform: case glslang::EOpMaxInvocationsInclusiveScanNonUniform: case glslang::EOpAddInvocationsInclusiveScanNonUniform: case glslang::EOpMinInvocationsExclusiveScanNonUniform: case glslang::EOpMaxInvocationsExclusiveScanNonUniform: case glslang::EOpAddInvocationsExclusiveScanNonUniform: if (op == glslang::EOpMinInvocationsNonUniform || op == glslang::EOpMinInvocationsInclusiveScanNonUniform || op == glslang::EOpMinInvocationsExclusiveScanNonUniform) { if (isFloat) opCode = spv::Op::OpGroupFMinNonUniformAMD; else { if (isUnsigned) opCode = spv::Op::OpGroupUMinNonUniformAMD; else opCode = spv::Op::OpGroupSMinNonUniformAMD; } } else if (op == glslang::EOpMaxInvocationsNonUniform || op == glslang::EOpMaxInvocationsInclusiveScanNonUniform || op == glslang::EOpMaxInvocationsExclusiveScanNonUniform) { if (isFloat) opCode = spv::Op::OpGroupFMaxNonUniformAMD; else { if (isUnsigned) opCode = spv::Op::OpGroupUMaxNonUniformAMD; else opCode = spv::Op::OpGroupSMaxNonUniformAMD; } } else { if (isFloat) opCode = spv::Op::OpGroupFAddNonUniformAMD; else opCode = spv::Op::OpGroupIAddNonUniformAMD; } if (builder.isVectorType(typeId)) return CreateInvocationsVectorOperation(opCode, groupOperation, typeId, operands); break; default: logger->missingFunctionality("invocation operation"); return spv::NoResult; } assert(opCode != spv::Op::OpNop); return builder.createOp(opCode, typeId, spvGroupOperands); } // Create group invocation operations on a vector spv::Id TGlslangToSpvTraverser::CreateInvocationsVectorOperation(spv::Op op, spv::GroupOperation groupOperation, spv::Id typeId, std::vector& operands) { assert(op == spv::Op::OpGroupFMin || op == spv::Op::OpGroupUMin || op == spv::Op::OpGroupSMin || op == spv::Op::OpGroupFMax || op == spv::Op::OpGroupUMax || op == spv::Op::OpGroupSMax || op == spv::Op::OpGroupFAdd || op == spv::Op::OpGroupIAdd || op == spv::Op::OpGroupBroadcast || op == spv::Op::OpSubgroupReadInvocationKHR || op == spv::Op::OpSubgroupFirstInvocationKHR || op == spv::Op::OpGroupFMinNonUniformAMD || op == spv::Op::OpGroupUMinNonUniformAMD || op == spv::Op::OpGroupSMinNonUniformAMD || op == spv::Op::OpGroupFMaxNonUniformAMD || op == spv::Op::OpGroupUMaxNonUniformAMD || op == spv::Op::OpGroupSMaxNonUniformAMD || op == spv::Op::OpGroupFAddNonUniformAMD || op == spv::Op::OpGroupIAddNonUniformAMD); // Handle group invocation operations scalar by scalar. // The result type is the same type as the original type. // The algorithm is to: // - break the vector into scalars // - apply the operation to each scalar // - make a vector out the scalar results // get the types sorted out int numComponents = builder.getNumComponents(operands[0]); spv::Id scalarType = builder.getScalarTypeId(builder.getTypeId(operands[0])); std::vector results; // do each scalar op for (int comp = 0; comp < numComponents; ++comp) { std::vector indexes; indexes.push_back(comp); spv::IdImmediate scalar = { true, builder.createCompositeExtract(operands[0], scalarType, indexes) }; std::vector spvGroupOperands; if (op == spv::Op::OpSubgroupReadInvocationKHR) { spvGroupOperands.push_back(scalar); spv::IdImmediate operand = { true, operands[1] }; spvGroupOperands.push_back(operand); } else if (op == spv::Op::OpSubgroupFirstInvocationKHR) { spvGroupOperands.push_back(scalar); } else if (op == spv::Op::OpGroupBroadcast) { spv::IdImmediate scope = { true, builder.makeUintConstant(spv::Scope::Subgroup) }; spvGroupOperands.push_back(scope); spvGroupOperands.push_back(scalar); spv::IdImmediate operand = { true, operands[1] }; spvGroupOperands.push_back(operand); } else { spv::IdImmediate scope = { true, builder.makeUintConstant(spv::Scope::Subgroup) }; spvGroupOperands.push_back(scope); spv::IdImmediate groupOp = { false, (unsigned)groupOperation }; spvGroupOperands.push_back(groupOp); spvGroupOperands.push_back(scalar); } results.push_back(builder.createOp(op, scalarType, spvGroupOperands)); } // put the pieces together return builder.createCompositeConstruct(typeId, results); } // Create subgroup invocation operations. spv::Id TGlslangToSpvTraverser::createSubgroupOperation(glslang::TOperator op, spv::Id typeId, std::vector& operands, glslang::TBasicType typeProxy) { // Add the required capabilities. switch (op) { case glslang::EOpSubgroupElect: builder.addCapability(spv::Capability::GroupNonUniform); break; case glslang::EOpSubgroupQuadAll: case glslang::EOpSubgroupQuadAny: builder.addExtension(spv::E_SPV_KHR_quad_control); builder.addCapability(spv::Capability::QuadControlKHR); [[fallthrough]]; case glslang::EOpSubgroupAll: case glslang::EOpSubgroupAny: case glslang::EOpSubgroupAllEqual: builder.addCapability(spv::Capability::GroupNonUniform); builder.addCapability(spv::Capability::GroupNonUniformVote); break; case glslang::EOpSubgroupBroadcast: case glslang::EOpSubgroupBroadcastFirst: case glslang::EOpSubgroupBallot: case glslang::EOpSubgroupInverseBallot: case glslang::EOpSubgroupBallotBitExtract: case glslang::EOpSubgroupBallotBitCount: case glslang::EOpSubgroupBallotInclusiveBitCount: case glslang::EOpSubgroupBallotExclusiveBitCount: case glslang::EOpSubgroupBallotFindLSB: case glslang::EOpSubgroupBallotFindMSB: builder.addCapability(spv::Capability::GroupNonUniform); builder.addCapability(spv::Capability::GroupNonUniformBallot); break; case glslang::EOpSubgroupRotate: case glslang::EOpSubgroupClusteredRotate: builder.addExtension(spv::E_SPV_KHR_subgroup_rotate); builder.addCapability(spv::Capability::GroupNonUniformRotateKHR); break; case glslang::EOpSubgroupShuffle: case glslang::EOpSubgroupShuffleXor: builder.addCapability(spv::Capability::GroupNonUniform); builder.addCapability(spv::Capability::GroupNonUniformShuffle); break; case glslang::EOpSubgroupShuffleUp: case glslang::EOpSubgroupShuffleDown: builder.addCapability(spv::Capability::GroupNonUniform); builder.addCapability(spv::Capability::GroupNonUniformShuffleRelative); break; case glslang::EOpSubgroupAdd: case glslang::EOpSubgroupMul: case glslang::EOpSubgroupMin: case glslang::EOpSubgroupMax: case glslang::EOpSubgroupAnd: case glslang::EOpSubgroupOr: case glslang::EOpSubgroupXor: case glslang::EOpSubgroupInclusiveAdd: case glslang::EOpSubgroupInclusiveMul: case glslang::EOpSubgroupInclusiveMin: case glslang::EOpSubgroupInclusiveMax: case glslang::EOpSubgroupInclusiveAnd: case glslang::EOpSubgroupInclusiveOr: case glslang::EOpSubgroupInclusiveXor: case glslang::EOpSubgroupExclusiveAdd: case glslang::EOpSubgroupExclusiveMul: case glslang::EOpSubgroupExclusiveMin: case glslang::EOpSubgroupExclusiveMax: case glslang::EOpSubgroupExclusiveAnd: case glslang::EOpSubgroupExclusiveOr: case glslang::EOpSubgroupExclusiveXor: builder.addCapability(spv::Capability::GroupNonUniform); builder.addCapability(spv::Capability::GroupNonUniformArithmetic); break; case glslang::EOpSubgroupClusteredAdd: case glslang::EOpSubgroupClusteredMul: case glslang::EOpSubgroupClusteredMin: case glslang::EOpSubgroupClusteredMax: case glslang::EOpSubgroupClusteredAnd: case glslang::EOpSubgroupClusteredOr: case glslang::EOpSubgroupClusteredXor: builder.addCapability(spv::Capability::GroupNonUniform); builder.addCapability(spv::Capability::GroupNonUniformClustered); break; case glslang::EOpSubgroupQuadBroadcast: case glslang::EOpSubgroupQuadSwapHorizontal: case glslang::EOpSubgroupQuadSwapVertical: case glslang::EOpSubgroupQuadSwapDiagonal: builder.addCapability(spv::Capability::GroupNonUniform); builder.addCapability(spv::Capability::GroupNonUniformQuad); break; case glslang::EOpSubgroupPartitionedAdd: case glslang::EOpSubgroupPartitionedMul: case glslang::EOpSubgroupPartitionedMin: case glslang::EOpSubgroupPartitionedMax: case glslang::EOpSubgroupPartitionedAnd: case glslang::EOpSubgroupPartitionedOr: case glslang::EOpSubgroupPartitionedXor: case glslang::EOpSubgroupPartitionedInclusiveAdd: case glslang::EOpSubgroupPartitionedInclusiveMul: case glslang::EOpSubgroupPartitionedInclusiveMin: case glslang::EOpSubgroupPartitionedInclusiveMax: case glslang::EOpSubgroupPartitionedInclusiveAnd: case glslang::EOpSubgroupPartitionedInclusiveOr: case glslang::EOpSubgroupPartitionedInclusiveXor: case glslang::EOpSubgroupPartitionedExclusiveAdd: case glslang::EOpSubgroupPartitionedExclusiveMul: case glslang::EOpSubgroupPartitionedExclusiveMin: case glslang::EOpSubgroupPartitionedExclusiveMax: case glslang::EOpSubgroupPartitionedExclusiveAnd: case glslang::EOpSubgroupPartitionedExclusiveOr: case glslang::EOpSubgroupPartitionedExclusiveXor: builder.addExtension(spv::E_SPV_NV_shader_subgroup_partitioned); builder.addCapability(spv::Capability::GroupNonUniformPartitionedNV); break; default: assert(0 && "Unhandled subgroup operation!"); } const bool isUnsigned = isTypeUnsignedInt(typeProxy); const bool isFloat = isTypeFloat(typeProxy); const bool isBool = typeProxy == glslang::EbtBool; spv::Op opCode = spv::Op::OpNop; // Figure out which opcode to use. switch (op) { case glslang::EOpSubgroupElect: opCode = spv::Op::OpGroupNonUniformElect; break; case glslang::EOpSubgroupQuadAll: opCode = spv::Op::OpGroupNonUniformQuadAllKHR; break; case glslang::EOpSubgroupAll: opCode = spv::Op::OpGroupNonUniformAll; break; case glslang::EOpSubgroupQuadAny: opCode = spv::Op::OpGroupNonUniformQuadAnyKHR; break; case glslang::EOpSubgroupAny: opCode = spv::Op::OpGroupNonUniformAny; break; case glslang::EOpSubgroupAllEqual: opCode = spv::Op::OpGroupNonUniformAllEqual; break; case glslang::EOpSubgroupBroadcast: opCode = spv::Op::OpGroupNonUniformBroadcast; break; case glslang::EOpSubgroupBroadcastFirst: opCode = spv::Op::OpGroupNonUniformBroadcastFirst; break; case glslang::EOpSubgroupBallot: opCode = spv::Op::OpGroupNonUniformBallot; break; case glslang::EOpSubgroupInverseBallot: opCode = spv::Op::OpGroupNonUniformInverseBallot; break; case glslang::EOpSubgroupBallotBitExtract: opCode = spv::Op::OpGroupNonUniformBallotBitExtract; break; case glslang::EOpSubgroupBallotBitCount: case glslang::EOpSubgroupBallotInclusiveBitCount: case glslang::EOpSubgroupBallotExclusiveBitCount: opCode = spv::Op::OpGroupNonUniformBallotBitCount; break; case glslang::EOpSubgroupBallotFindLSB: opCode = spv::Op::OpGroupNonUniformBallotFindLSB; break; case glslang::EOpSubgroupBallotFindMSB: opCode = spv::Op::OpGroupNonUniformBallotFindMSB; break; case glslang::EOpSubgroupShuffle: opCode = spv::Op::OpGroupNonUniformShuffle; break; case glslang::EOpSubgroupShuffleXor: opCode = spv::Op::OpGroupNonUniformShuffleXor; break; case glslang::EOpSubgroupShuffleUp: opCode = spv::Op::OpGroupNonUniformShuffleUp; break; case glslang::EOpSubgroupShuffleDown: opCode = spv::Op::OpGroupNonUniformShuffleDown; break; case glslang::EOpSubgroupRotate: case glslang::EOpSubgroupClusteredRotate: opCode = spv::Op::OpGroupNonUniformRotateKHR; break; case glslang::EOpSubgroupAdd: case glslang::EOpSubgroupInclusiveAdd: case glslang::EOpSubgroupExclusiveAdd: case glslang::EOpSubgroupClusteredAdd: case glslang::EOpSubgroupPartitionedAdd: case glslang::EOpSubgroupPartitionedInclusiveAdd: case glslang::EOpSubgroupPartitionedExclusiveAdd: if (isFloat) { opCode = spv::Op::OpGroupNonUniformFAdd; } else { opCode = spv::Op::OpGroupNonUniformIAdd; } break; case glslang::EOpSubgroupMul: case glslang::EOpSubgroupInclusiveMul: case glslang::EOpSubgroupExclusiveMul: case glslang::EOpSubgroupClusteredMul: case glslang::EOpSubgroupPartitionedMul: case glslang::EOpSubgroupPartitionedInclusiveMul: case glslang::EOpSubgroupPartitionedExclusiveMul: if (isFloat) { opCode = spv::Op::OpGroupNonUniformFMul; } else { opCode = spv::Op::OpGroupNonUniformIMul; } break; case glslang::EOpSubgroupMin: case glslang::EOpSubgroupInclusiveMin: case glslang::EOpSubgroupExclusiveMin: case glslang::EOpSubgroupClusteredMin: case glslang::EOpSubgroupPartitionedMin: case glslang::EOpSubgroupPartitionedInclusiveMin: case glslang::EOpSubgroupPartitionedExclusiveMin: if (isFloat) { opCode = spv::Op::OpGroupNonUniformFMin; } else if (isUnsigned) { opCode = spv::Op::OpGroupNonUniformUMin; } else { opCode = spv::Op::OpGroupNonUniformSMin; } break; case glslang::EOpSubgroupMax: case glslang::EOpSubgroupInclusiveMax: case glslang::EOpSubgroupExclusiveMax: case glslang::EOpSubgroupClusteredMax: case glslang::EOpSubgroupPartitionedMax: case glslang::EOpSubgroupPartitionedInclusiveMax: case glslang::EOpSubgroupPartitionedExclusiveMax: if (isFloat) { opCode = spv::Op::OpGroupNonUniformFMax; } else if (isUnsigned) { opCode = spv::Op::OpGroupNonUniformUMax; } else { opCode = spv::Op::OpGroupNonUniformSMax; } break; case glslang::EOpSubgroupAnd: case glslang::EOpSubgroupInclusiveAnd: case glslang::EOpSubgroupExclusiveAnd: case glslang::EOpSubgroupClusteredAnd: case glslang::EOpSubgroupPartitionedAnd: case glslang::EOpSubgroupPartitionedInclusiveAnd: case glslang::EOpSubgroupPartitionedExclusiveAnd: if (isBool) { opCode = spv::Op::OpGroupNonUniformLogicalAnd; } else { opCode = spv::Op::OpGroupNonUniformBitwiseAnd; } break; case glslang::EOpSubgroupOr: case glslang::EOpSubgroupInclusiveOr: case glslang::EOpSubgroupExclusiveOr: case glslang::EOpSubgroupClusteredOr: case glslang::EOpSubgroupPartitionedOr: case glslang::EOpSubgroupPartitionedInclusiveOr: case glslang::EOpSubgroupPartitionedExclusiveOr: if (isBool) { opCode = spv::Op::OpGroupNonUniformLogicalOr; } else { opCode = spv::Op::OpGroupNonUniformBitwiseOr; } break; case glslang::EOpSubgroupXor: case glslang::EOpSubgroupInclusiveXor: case glslang::EOpSubgroupExclusiveXor: case glslang::EOpSubgroupClusteredXor: case glslang::EOpSubgroupPartitionedXor: case glslang::EOpSubgroupPartitionedInclusiveXor: case glslang::EOpSubgroupPartitionedExclusiveXor: if (isBool) { opCode = spv::Op::OpGroupNonUniformLogicalXor; } else { opCode = spv::Op::OpGroupNonUniformBitwiseXor; } break; case glslang::EOpSubgroupQuadBroadcast: opCode = spv::Op::OpGroupNonUniformQuadBroadcast; break; case glslang::EOpSubgroupQuadSwapHorizontal: case glslang::EOpSubgroupQuadSwapVertical: case glslang::EOpSubgroupQuadSwapDiagonal: opCode = spv::Op::OpGroupNonUniformQuadSwap; break; default: assert(0 && "Unhandled subgroup operation!"); } // get the right Group Operation spv::GroupOperation groupOperation = spv::GroupOperation::Max; switch (op) { default: break; case glslang::EOpSubgroupBallotBitCount: case glslang::EOpSubgroupAdd: case glslang::EOpSubgroupMul: case glslang::EOpSubgroupMin: case glslang::EOpSubgroupMax: case glslang::EOpSubgroupAnd: case glslang::EOpSubgroupOr: case glslang::EOpSubgroupXor: groupOperation = spv::GroupOperation::Reduce; break; case glslang::EOpSubgroupBallotInclusiveBitCount: case glslang::EOpSubgroupInclusiveAdd: case glslang::EOpSubgroupInclusiveMul: case glslang::EOpSubgroupInclusiveMin: case glslang::EOpSubgroupInclusiveMax: case glslang::EOpSubgroupInclusiveAnd: case glslang::EOpSubgroupInclusiveOr: case glslang::EOpSubgroupInclusiveXor: groupOperation = spv::GroupOperation::InclusiveScan; break; case glslang::EOpSubgroupBallotExclusiveBitCount: case glslang::EOpSubgroupExclusiveAdd: case glslang::EOpSubgroupExclusiveMul: case glslang::EOpSubgroupExclusiveMin: case glslang::EOpSubgroupExclusiveMax: case glslang::EOpSubgroupExclusiveAnd: case glslang::EOpSubgroupExclusiveOr: case glslang::EOpSubgroupExclusiveXor: groupOperation = spv::GroupOperation::ExclusiveScan; break; case glslang::EOpSubgroupClusteredAdd: case glslang::EOpSubgroupClusteredMul: case glslang::EOpSubgroupClusteredMin: case glslang::EOpSubgroupClusteredMax: case glslang::EOpSubgroupClusteredAnd: case glslang::EOpSubgroupClusteredOr: case glslang::EOpSubgroupClusteredXor: groupOperation = spv::GroupOperation::ClusteredReduce; break; case glslang::EOpSubgroupPartitionedAdd: case glslang::EOpSubgroupPartitionedMul: case glslang::EOpSubgroupPartitionedMin: case glslang::EOpSubgroupPartitionedMax: case glslang::EOpSubgroupPartitionedAnd: case glslang::EOpSubgroupPartitionedOr: case glslang::EOpSubgroupPartitionedXor: groupOperation = spv::GroupOperation::PartitionedReduceNV; break; case glslang::EOpSubgroupPartitionedInclusiveAdd: case glslang::EOpSubgroupPartitionedInclusiveMul: case glslang::EOpSubgroupPartitionedInclusiveMin: case glslang::EOpSubgroupPartitionedInclusiveMax: case glslang::EOpSubgroupPartitionedInclusiveAnd: case glslang::EOpSubgroupPartitionedInclusiveOr: case glslang::EOpSubgroupPartitionedInclusiveXor: groupOperation = spv::GroupOperation::PartitionedInclusiveScanNV; break; case glslang::EOpSubgroupPartitionedExclusiveAdd: case glslang::EOpSubgroupPartitionedExclusiveMul: case glslang::EOpSubgroupPartitionedExclusiveMin: case glslang::EOpSubgroupPartitionedExclusiveMax: case glslang::EOpSubgroupPartitionedExclusiveAnd: case glslang::EOpSubgroupPartitionedExclusiveOr: case glslang::EOpSubgroupPartitionedExclusiveXor: groupOperation = spv::GroupOperation::PartitionedExclusiveScanNV; break; } // build the instruction std::vector spvGroupOperands; // Every operation begins with the Execution Scope operand. spv::IdImmediate executionScope = { true, builder.makeUintConstant(spv::Scope::Subgroup) }; // All other ops need the execution scope. Quad Control Ops don't need scope, it's always Quad. if (opCode != spv::Op::OpGroupNonUniformQuadAllKHR && opCode != spv::Op::OpGroupNonUniformQuadAnyKHR) { spvGroupOperands.push_back(executionScope); } // Next, for all operations that use a Group Operation, push that as an operand. if (groupOperation != spv::GroupOperation::Max) { spv::IdImmediate groupOperand = { false, (unsigned)groupOperation }; spvGroupOperands.push_back(groupOperand); } // Push back the operands next. for (auto opIt = operands.cbegin(); opIt != operands.cend(); ++opIt) { spv::IdImmediate operand = { true, *opIt }; spvGroupOperands.push_back(operand); } // Some opcodes have additional operands. spv::Id directionId = spv::NoResult; switch (op) { default: break; case glslang::EOpSubgroupQuadSwapHorizontal: directionId = builder.makeUintConstant(0); break; case glslang::EOpSubgroupQuadSwapVertical: directionId = builder.makeUintConstant(1); break; case glslang::EOpSubgroupQuadSwapDiagonal: directionId = builder.makeUintConstant(2); break; } if (directionId != spv::NoResult) { spv::IdImmediate direction = { true, directionId }; spvGroupOperands.push_back(direction); } return builder.createOp(opCode, typeId, spvGroupOperands); } spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv::Decoration precision, spv::Id typeId, std::vector& operands, glslang::TBasicType typeProxy) { bool isUnsigned = isTypeUnsignedInt(typeProxy); bool isFloat = isTypeFloat(typeProxy); spv::Op opCode = spv::Op::OpNop; int extBuiltins = -1; int libCall = -1; size_t consumedOperands = operands.size(); spv::Id typeId0 = 0; if (consumedOperands > 0) typeId0 = builder.getTypeId(operands[0]); spv::Id typeId1 = 0; if (consumedOperands > 1) typeId1 = builder.getTypeId(operands[1]); spv::Id frexpIntType = 0; switch (op) { case glslang::EOpMin: if (isFloat) libCall = nanMinMaxClamp ? spv::GLSLstd450NMin : spv::GLSLstd450FMin; else if (isUnsigned) libCall = spv::GLSLstd450UMin; else libCall = spv::GLSLstd450SMin; builder.promoteScalar(precision, operands.front(), operands.back()); break; case glslang::EOpModf: { libCall = spv::GLSLstd450ModfStruct; assert(builder.isFloatType(builder.getScalarTypeId(typeId0))); // The returned struct has two members of the same type as the first argument typeId = builder.makeStructResultType(typeId0, typeId0); consumedOperands = 1; } break; case glslang::EOpMax: if (isFloat) libCall = nanMinMaxClamp ? spv::GLSLstd450NMax : spv::GLSLstd450FMax; else if (isUnsigned) libCall = spv::GLSLstd450UMax; else libCall = spv::GLSLstd450SMax; builder.promoteScalar(precision, operands.front(), operands.back()); break; case glslang::EOpPow: libCall = spv::GLSLstd450Pow; break; case glslang::EOpDot: case glslang::EOpDotPackedEXT: case glslang::EOpDotAccSatEXT: case glslang::EOpDotPackedAccSatEXT: { if (builder.isFloatType(builder.getScalarTypeId(typeId0)) || // HLSL supports dot(int,int) which is just a multiply glslangIntermediate->getSource() == glslang::EShSourceHlsl) { if (typeProxy == glslang::EbtBFloat16) { builder.addExtension(spv::E_SPV_KHR_bfloat16); builder.addCapability(spv::Capability::BFloat16DotProductKHR); } opCode = spv::Op::OpDot; } else { builder.addExtension(spv::E_SPV_KHR_integer_dot_product); builder.addCapability(spv::Capability::DotProductKHR); const unsigned int vectorSize = builder.getNumComponents(operands[0]); if (op == glslang::EOpDotPackedEXT || op == glslang::EOpDotPackedAccSatEXT) { builder.addCapability(spv::Capability::DotProductInput4x8BitPackedKHR); } else if (vectorSize == 4 && builder.getScalarTypeWidth(typeId0) == 8) { builder.addCapability(spv::Capability::DotProductInput4x8BitKHR); } else { builder.addCapability(spv::Capability::DotProductInputAllKHR); } const bool type0isSigned = builder.isIntType(builder.getScalarTypeId(typeId0)); const bool type1isSigned = builder.isIntType(builder.getScalarTypeId(typeId1)); const bool accSat = (op == glslang::EOpDotAccSatEXT || op == glslang::EOpDotPackedAccSatEXT); if (!type0isSigned && !type1isSigned) { opCode = accSat ? spv::Op::OpUDotAccSatKHR : spv::Op::OpUDotKHR; } else if (type0isSigned && type1isSigned) { opCode = accSat ? spv::Op::OpSDotAccSatKHR : spv::Op::OpSDotKHR; } else { opCode = accSat ? spv::Op::OpSUDotAccSatKHR : spv::Op::OpSUDotKHR; // the spir-v opcode assumes the operands to be "signed, unsigned" in that order, so swap if needed if (type1isSigned) { std::swap(operands[0], operands[1]); } } std::vector operands2; for (auto &o : operands) { operands2.push_back({true, o}); } if (op == glslang::EOpDotPackedEXT || op == glslang::EOpDotPackedAccSatEXT) { operands2.push_back({false, 0}); } return builder.createOp(opCode, typeId, operands2); } } break; case glslang::EOpAtan: libCall = spv::GLSLstd450Atan2; break; case glslang::EOpClamp: if (isFloat) libCall = nanMinMaxClamp ? spv::GLSLstd450NClamp : spv::GLSLstd450FClamp; else if (isUnsigned) libCall = spv::GLSLstd450UClamp; else libCall = spv::GLSLstd450SClamp; builder.promoteScalar(precision, operands.front(), operands[1]); builder.promoteScalar(precision, operands.front(), operands[2]); break; case glslang::EOpMix: if (! builder.isBoolType(builder.getScalarTypeId(builder.getTypeId(operands.back())))) { assert(isFloat); libCall = spv::GLSLstd450FMix; } else { opCode = spv::Op::OpSelect; std::swap(operands.front(), operands.back()); } builder.promoteScalar(precision, operands.front(), operands.back()); break; case glslang::EOpStep: libCall = spv::GLSLstd450Step; builder.promoteScalar(precision, operands.front(), operands.back()); break; case glslang::EOpSmoothStep: libCall = spv::GLSLstd450SmoothStep; builder.promoteScalar(precision, operands[0], operands[2]); builder.promoteScalar(precision, operands[1], operands[2]); break; case glslang::EOpDistance: libCall = spv::GLSLstd450Distance; break; case glslang::EOpCross: libCall = spv::GLSLstd450Cross; break; case glslang::EOpFaceForward: libCall = spv::GLSLstd450FaceForward; break; case glslang::EOpReflect: libCall = spv::GLSLstd450Reflect; break; case glslang::EOpRefract: libCall = spv::GLSLstd450Refract; break; case glslang::EOpBarrier: { // This is for the extended controlBarrier function, with four operands. // The unextended barrier() goes through createNoArgOperation. assert(operands.size() == 4); auto const executionScope = (spv::Scope)builder.getConstantScalar(operands[0]); auto const memoryScope = (spv::Scope)builder.getConstantScalar(operands[1]); auto const semantics = (spv::MemorySemanticsMask)(builder.getConstantScalar(operands[2]) | builder.getConstantScalar(operands[3])); builder.createControlBarrier(executionScope, memoryScope, semantics); if (anySet(semantics, spv::MemorySemanticsMask::MakeAvailableKHR | spv::MemorySemanticsMask::MakeVisibleKHR | spv::MemorySemanticsMask::OutputMemoryKHR | spv::MemorySemanticsMask::Volatile)) { builder.addCapability(spv::Capability::VulkanMemoryModelKHR); } if (glslangIntermediate->usingVulkanMemoryModel() && (executionScope == spv::Scope::Device || memoryScope == spv::Scope::Device)) { builder.addCapability(spv::Capability::VulkanMemoryModelDeviceScopeKHR); } return 0; } break; case glslang::EOpMemoryBarrier: { // This is for the extended memoryBarrier function, with three operands. // The unextended memoryBarrier() goes through createNoArgOperation. assert(operands.size() == 3); auto const memoryScope = (spv::Scope)builder.getConstantScalar(operands[0]); auto const semantics = (spv::MemorySemanticsMask)(builder.getConstantScalar(operands[1]) | builder.getConstantScalar(operands[2])); builder.createMemoryBarrier(memoryScope, semantics); if (anySet(semantics, spv::MemorySemanticsMask::MakeAvailableKHR | spv::MemorySemanticsMask::MakeVisibleKHR | spv::MemorySemanticsMask::OutputMemoryKHR | spv::MemorySemanticsMask::Volatile)) { builder.addCapability(spv::Capability::VulkanMemoryModelKHR); } if (glslangIntermediate->usingVulkanMemoryModel() && memoryScope == spv::Scope::Device) { builder.addCapability(spv::Capability::VulkanMemoryModelDeviceScopeKHR); } return 0; } break; case glslang::EOpInterpolateAtSample: if (typeProxy == glslang::EbtFloat16) builder.addExtension(spv::E_SPV_AMD_gpu_shader_half_float); libCall = spv::GLSLstd450InterpolateAtSample; break; case glslang::EOpInterpolateAtOffset: if (typeProxy == glslang::EbtFloat16) builder.addExtension(spv::E_SPV_AMD_gpu_shader_half_float); libCall = spv::GLSLstd450InterpolateAtOffset; break; case glslang::EOpAddCarry: opCode = spv::Op::OpIAddCarry; typeId = builder.makeStructResultType(typeId0, typeId0); consumedOperands = 2; break; case glslang::EOpSubBorrow: opCode = spv::Op::OpISubBorrow; typeId = builder.makeStructResultType(typeId0, typeId0); consumedOperands = 2; break; case glslang::EOpUMulExtended: opCode = spv::Op::OpUMulExtended; typeId = builder.makeStructResultType(typeId0, typeId0); consumedOperands = 2; break; case glslang::EOpIMulExtended: opCode = spv::Op::OpSMulExtended; typeId = builder.makeStructResultType(typeId0, typeId0); consumedOperands = 2; break; case glslang::EOpBitfieldExtract: if (isUnsigned) opCode = spv::Op::OpBitFieldUExtract; else opCode = spv::Op::OpBitFieldSExtract; break; case glslang::EOpBitfieldInsert: opCode = spv::Op::OpBitFieldInsert; break; case glslang::EOpFma: libCall = spv::GLSLstd450Fma; break; case glslang::EOpFrexp: { libCall = spv::GLSLstd450FrexpStruct; assert(builder.isPointerType(typeId1)); typeId1 = builder.getContainedTypeId(typeId1); int width = builder.getScalarTypeWidth(typeId1); if (width == 16) // Using 16-bit exp operand, enable extension SPV_AMD_gpu_shader_int16 builder.addExtension(spv::E_SPV_AMD_gpu_shader_int16); if (builder.getNumComponents(operands[0]) == 1) frexpIntType = builder.makeIntegerType(width, true); else frexpIntType = builder.makeVectorType(builder.makeIntegerType(width, true), builder.getNumComponents(operands[0])); typeId = builder.makeStructResultType(typeId0, frexpIntType); consumedOperands = 1; } break; case glslang::EOpLdexp: libCall = spv::GLSLstd450Ldexp; break; case glslang::EOpReadInvocation: return createInvocationsOperation(op, typeId, operands, typeProxy); case glslang::EOpSubgroupBroadcast: case glslang::EOpSubgroupBallotBitExtract: case glslang::EOpSubgroupShuffle: case glslang::EOpSubgroupShuffleXor: case glslang::EOpSubgroupShuffleUp: case glslang::EOpSubgroupShuffleDown: case glslang::EOpSubgroupRotate: case glslang::EOpSubgroupClusteredRotate: case glslang::EOpSubgroupClusteredAdd: case glslang::EOpSubgroupClusteredMul: case glslang::EOpSubgroupClusteredMin: case glslang::EOpSubgroupClusteredMax: case glslang::EOpSubgroupClusteredAnd: case glslang::EOpSubgroupClusteredOr: case glslang::EOpSubgroupClusteredXor: case glslang::EOpSubgroupQuadBroadcast: case glslang::EOpSubgroupPartitionedAdd: case glslang::EOpSubgroupPartitionedMul: case glslang::EOpSubgroupPartitionedMin: case glslang::EOpSubgroupPartitionedMax: case glslang::EOpSubgroupPartitionedAnd: case glslang::EOpSubgroupPartitionedOr: case glslang::EOpSubgroupPartitionedXor: case glslang::EOpSubgroupPartitionedInclusiveAdd: case glslang::EOpSubgroupPartitionedInclusiveMul: case glslang::EOpSubgroupPartitionedInclusiveMin: case glslang::EOpSubgroupPartitionedInclusiveMax: case glslang::EOpSubgroupPartitionedInclusiveAnd: case glslang::EOpSubgroupPartitionedInclusiveOr: case glslang::EOpSubgroupPartitionedInclusiveXor: case glslang::EOpSubgroupPartitionedExclusiveAdd: case glslang::EOpSubgroupPartitionedExclusiveMul: case glslang::EOpSubgroupPartitionedExclusiveMin: case glslang::EOpSubgroupPartitionedExclusiveMax: case glslang::EOpSubgroupPartitionedExclusiveAnd: case glslang::EOpSubgroupPartitionedExclusiveOr: case glslang::EOpSubgroupPartitionedExclusiveXor: return createSubgroupOperation(op, typeId, operands, typeProxy); case glslang::EOpSwizzleInvocations: extBuiltins = getExtBuiltins(spv::E_SPV_AMD_shader_ballot); libCall = spv::SwizzleInvocationsAMD; break; case glslang::EOpSwizzleInvocationsMasked: extBuiltins = getExtBuiltins(spv::E_SPV_AMD_shader_ballot); libCall = spv::SwizzleInvocationsMaskedAMD; break; case glslang::EOpWriteInvocation: extBuiltins = getExtBuiltins(spv::E_SPV_AMD_shader_ballot); libCall = spv::WriteInvocationAMD; break; case glslang::EOpMin3: extBuiltins = getExtBuiltins(spv::E_SPV_AMD_shader_trinary_minmax); if (isFloat) libCall = spv::FMin3AMD; else { if (isUnsigned) libCall = spv::UMin3AMD; else libCall = spv::SMin3AMD; } break; case glslang::EOpMax3: extBuiltins = getExtBuiltins(spv::E_SPV_AMD_shader_trinary_minmax); if (isFloat) libCall = spv::FMax3AMD; else { if (isUnsigned) libCall = spv::UMax3AMD; else libCall = spv::SMax3AMD; } break; case glslang::EOpMid3: extBuiltins = getExtBuiltins(spv::E_SPV_AMD_shader_trinary_minmax); if (isFloat) libCall = spv::FMid3AMD; else { if (isUnsigned) libCall = spv::UMid3AMD; else libCall = spv::SMid3AMD; } break; case glslang::EOpInterpolateAtVertex: if (typeProxy == glslang::EbtFloat16) builder.addExtension(spv::E_SPV_AMD_gpu_shader_half_float); extBuiltins = getExtBuiltins(spv::E_SPV_AMD_shader_explicit_vertex_parameter); libCall = spv::InterpolateAtVertexAMD; break; case glslang::EOpReportIntersection: typeId = builder.makeBoolType(); opCode = spv::Op::OpReportIntersectionKHR; break; case glslang::EOpTraceNV: builder.createNoResultOp(spv::Op::OpTraceNV, operands); return 0; case glslang::EOpTraceRayMotionNV: builder.addExtension(spv::E_SPV_NV_ray_tracing_motion_blur); builder.addCapability(spv::Capability::RayTracingMotionBlurNV); builder.createNoResultOp(spv::Op::OpTraceRayMotionNV, operands); return 0; case glslang::EOpTraceKHR: builder.createNoResultOp(spv::Op::OpTraceRayKHR, operands); return 0; case glslang::EOpExecuteCallableNV: builder.createNoResultOp(spv::Op::OpExecuteCallableNV, operands); return 0; case glslang::EOpExecuteCallableKHR: builder.createNoResultOp(spv::Op::OpExecuteCallableKHR, operands); return 0; case glslang::EOpRayQueryInitialize: builder.createNoResultOp(spv::Op::OpRayQueryInitializeKHR, operands); return 0; case glslang::EOpRayQueryTerminate: builder.createNoResultOp(spv::Op::OpRayQueryTerminateKHR, operands); return 0; case glslang::EOpRayQueryGenerateIntersection: builder.createNoResultOp(spv::Op::OpRayQueryGenerateIntersectionKHR, operands); return 0; case glslang::EOpRayQueryConfirmIntersection: builder.createNoResultOp(spv::Op::OpRayQueryConfirmIntersectionKHR, operands); return 0; case glslang::EOpRayQueryProceed: typeId = builder.makeBoolType(); opCode = spv::Op::OpRayQueryProceedKHR; break; case glslang::EOpRayQueryGetIntersectionType: typeId = builder.makeUintType(32); opCode = spv::Op::OpRayQueryGetIntersectionTypeKHR; break; case glslang::EOpRayQueryGetRayTMin: typeId = builder.makeFloatType(32); opCode = spv::Op::OpRayQueryGetRayTMinKHR; break; case glslang::EOpRayQueryGetRayFlags: typeId = builder.makeIntType(32); opCode = spv::Op::OpRayQueryGetRayFlagsKHR; break; case glslang::EOpRayQueryGetIntersectionT: typeId = builder.makeFloatType(32); opCode = spv::Op::OpRayQueryGetIntersectionTKHR; break; case glslang::EOpRayQueryGetIntersectionInstanceCustomIndex: typeId = builder.makeIntType(32); opCode = spv::Op::OpRayQueryGetIntersectionInstanceCustomIndexKHR; break; case glslang::EOpRayQueryGetIntersectionInstanceId: typeId = builder.makeIntType(32); opCode = spv::Op::OpRayQueryGetIntersectionInstanceIdKHR; break; case glslang::EOpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffset: typeId = builder.makeUintType(32); opCode = spv::Op::OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR; break; case glslang::EOpRayQueryGetIntersectionGeometryIndex: typeId = builder.makeIntType(32); opCode = spv::Op::OpRayQueryGetIntersectionGeometryIndexKHR; break; case glslang::EOpRayQueryGetIntersectionPrimitiveIndex: typeId = builder.makeIntType(32); opCode = spv::Op::OpRayQueryGetIntersectionPrimitiveIndexKHR; break; case glslang::EOpRayQueryGetIntersectionBarycentrics: typeId = builder.makeVectorType(builder.makeFloatType(32), 2); opCode = spv::Op::OpRayQueryGetIntersectionBarycentricsKHR; break; case glslang::EOpRayQueryGetIntersectionFrontFace: typeId = builder.makeBoolType(); opCode = spv::Op::OpRayQueryGetIntersectionFrontFaceKHR; break; case glslang::EOpRayQueryGetIntersectionCandidateAABBOpaque: typeId = builder.makeBoolType(); opCode = spv::Op::OpRayQueryGetIntersectionCandidateAABBOpaqueKHR; break; case glslang::EOpRayQueryGetIntersectionObjectRayDirection: typeId = builder.makeVectorType(builder.makeFloatType(32), 3); opCode = spv::Op::OpRayQueryGetIntersectionObjectRayDirectionKHR; break; case glslang::EOpRayQueryGetIntersectionObjectRayOrigin: typeId = builder.makeVectorType(builder.makeFloatType(32), 3); opCode = spv::Op::OpRayQueryGetIntersectionObjectRayOriginKHR; break; case glslang::EOpRayQueryGetWorldRayDirection: typeId = builder.makeVectorType(builder.makeFloatType(32), 3); opCode = spv::Op::OpRayQueryGetWorldRayDirectionKHR; break; case glslang::EOpRayQueryGetWorldRayOrigin: typeId = builder.makeVectorType(builder.makeFloatType(32), 3); opCode = spv::Op::OpRayQueryGetWorldRayOriginKHR; break; case glslang::EOpRayQueryGetIntersectionObjectToWorld: typeId = builder.makeMatrixType(builder.makeFloatType(32), 4, 3); opCode = spv::Op::OpRayQueryGetIntersectionObjectToWorldKHR; break; case glslang::EOpRayQueryGetIntersectionClusterIdNV: typeId = builder.makeIntegerType(32, 1); opCode = spv::Op::OpRayQueryGetClusterIdNV; break; case glslang::EOpRayQueryGetIntersectionWorldToObject: typeId = builder.makeMatrixType(builder.makeFloatType(32), 4, 3); opCode = spv::Op::OpRayQueryGetIntersectionWorldToObjectKHR; break; case glslang::EOpRayQueryGetIntersectionSpherePositionNV: typeId = builder.makeVectorType(builder.makeFloatType(32), 3); opCode = spv::Op::OpRayQueryGetIntersectionSpherePositionNV; break; case glslang::EOpRayQueryGetIntersectionSphereRadiusNV: typeId = builder.makeFloatType(32); opCode = spv::Op::OpRayQueryGetIntersectionSphereRadiusNV; break; case glslang::EOpRayQueryGetIntersectionLSSHitValueNV: typeId = builder.makeFloatType(32); opCode = spv::Op::OpRayQueryGetIntersectionLSSHitValueNV; break; case glslang::EOpRayQueryIsSphereHitNV: typeId = builder.makeBoolType(); opCode = spv::Op::OpRayQueryIsSphereHitNV; break; case glslang::EOpRayQueryIsLSSHitNV: typeId = builder.makeBoolType(); opCode = spv::Op::OpRayQueryIsLSSHitNV; break; case glslang::EOpWritePackedPrimitiveIndices4x8NV: builder.createNoResultOp(spv::Op::OpWritePackedPrimitiveIndices4x8NV, operands); return 0; case glslang::EOpEmitMeshTasksEXT: if (taskPayloadID) operands.push_back(taskPayloadID); // As per SPV_EXT_mesh_shader make it a terminating instruction in the current block builder.makeStatementTerminator(spv::Op::OpEmitMeshTasksEXT, operands, "post-OpEmitMeshTasksEXT"); return 0; case glslang::EOpSetMeshOutputsEXT: builder.createNoResultOp(spv::Op::OpSetMeshOutputsEXT, operands); return 0; case glslang::EOpCooperativeMatrixMulAddNV: opCode = spv::Op::OpCooperativeMatrixMulAddNV; break; case glslang::EOpHitObjectTraceRayNV: builder.createNoResultOp(spv::Op::OpHitObjectTraceRayNV, operands); return 0; case glslang::EOpHitObjectTraceRayMotionNV: builder.createNoResultOp(spv::Op::OpHitObjectTraceRayMotionNV, operands); return 0; case glslang::EOpHitObjectRecordHitNV: builder.createNoResultOp(spv::Op::OpHitObjectRecordHitNV, operands); return 0; case glslang::EOpHitObjectRecordHitMotionNV: builder.createNoResultOp(spv::Op::OpHitObjectRecordHitMotionNV, operands); return 0; case glslang::EOpHitObjectRecordHitWithIndexNV: builder.createNoResultOp(spv::Op::OpHitObjectRecordHitWithIndexNV, operands); return 0; case glslang::EOpHitObjectRecordHitWithIndexMotionNV: builder.createNoResultOp(spv::Op::OpHitObjectRecordHitWithIndexMotionNV, operands); return 0; case glslang::EOpHitObjectRecordMissNV: builder.createNoResultOp(spv::Op::OpHitObjectRecordMissNV, operands); return 0; case glslang::EOpHitObjectRecordMissMotionNV: builder.createNoResultOp(spv::Op::OpHitObjectRecordMissMotionNV, operands); return 0; case glslang::EOpHitObjectExecuteShaderNV: builder.createNoResultOp(spv::Op::OpHitObjectExecuteShaderNV, operands); return 0; case glslang::EOpHitObjectIsEmptyNV: typeId = builder.makeBoolType(); opCode = spv::Op::OpHitObjectIsEmptyNV; break; case glslang::EOpHitObjectIsMissNV: typeId = builder.makeBoolType(); opCode = spv::Op::OpHitObjectIsMissNV; break; case glslang::EOpHitObjectIsHitNV: typeId = builder.makeBoolType(); opCode = spv::Op::OpHitObjectIsHitNV; break; case glslang::EOpHitObjectIsSphereHitNV: typeId = builder.makeBoolType(); opCode = spv::Op::OpHitObjectIsSphereHitNV; break; case glslang::EOpHitObjectIsLSSHitNV: typeId = builder.makeBoolType(); opCode = spv::Op::OpHitObjectIsLSSHitNV; break; case glslang::EOpHitObjectGetRayTMinNV: typeId = builder.makeFloatType(32); opCode = spv::Op::OpHitObjectGetRayTMinNV; break; case glslang::EOpHitObjectGetRayTMaxNV: typeId = builder.makeFloatType(32); opCode = spv::Op::OpHitObjectGetRayTMaxNV; break; case glslang::EOpHitObjectGetObjectRayOriginNV: typeId = builder.makeVectorType(builder.makeFloatType(32), 3); opCode = spv::Op::OpHitObjectGetObjectRayOriginNV; break; case glslang::EOpHitObjectGetObjectRayDirectionNV: typeId = builder.makeVectorType(builder.makeFloatType(32), 3); opCode = spv::Op::OpHitObjectGetObjectRayDirectionNV; break; case glslang::EOpHitObjectGetWorldRayOriginNV: typeId = builder.makeVectorType(builder.makeFloatType(32), 3); opCode = spv::Op::OpHitObjectGetWorldRayOriginNV; break; case glslang::EOpHitObjectGetWorldRayDirectionNV: typeId = builder.makeVectorType(builder.makeFloatType(32), 3); opCode = spv::Op::OpHitObjectGetWorldRayDirectionNV; break; case glslang::EOpHitObjectGetWorldToObjectNV: typeId = builder.makeMatrixType(builder.makeFloatType(32), 4, 3); opCode = spv::Op::OpHitObjectGetWorldToObjectNV; break; case glslang::EOpHitObjectGetObjectToWorldNV: typeId = builder.makeMatrixType(builder.makeFloatType(32), 4, 3); opCode = spv::Op::OpHitObjectGetObjectToWorldNV; break; case glslang::EOpHitObjectGetInstanceCustomIndexNV: typeId = builder.makeIntegerType(32, 1); opCode = spv::Op::OpHitObjectGetInstanceCustomIndexNV; break; case glslang::EOpHitObjectGetInstanceIdNV: typeId = builder.makeIntegerType(32, 1); opCode = spv::Op::OpHitObjectGetInstanceIdNV; break; case glslang::EOpHitObjectGetGeometryIndexNV: typeId = builder.makeIntegerType(32, 1); opCode = spv::Op::OpHitObjectGetGeometryIndexNV; break; case glslang::EOpHitObjectGetPrimitiveIndexNV: typeId = builder.makeIntegerType(32, 1); opCode = spv::Op::OpHitObjectGetPrimitiveIndexNV; break; case glslang::EOpHitObjectGetHitKindNV: typeId = builder.makeIntegerType(32, 0); opCode = spv::Op::OpHitObjectGetHitKindNV; break; case glslang::EOpHitObjectGetCurrentTimeNV: typeId = builder.makeFloatType(32); opCode = spv::Op::OpHitObjectGetCurrentTimeNV; break; case glslang::EOpHitObjectGetShaderBindingTableRecordIndexNV: typeId = builder.makeIntegerType(32, 0); opCode = spv::Op::OpHitObjectGetShaderBindingTableRecordIndexNV; return 0; case glslang::EOpHitObjectGetAttributesNV: builder.createNoResultOp(spv::Op::OpHitObjectGetAttributesNV, operands); return 0; case glslang::EOpHitObjectGetShaderRecordBufferHandleNV: typeId = builder.makeVectorType(builder.makeUintType(32), 2); opCode = spv::Op::OpHitObjectGetShaderRecordBufferHandleNV; break; case glslang::EOpHitObjectGetClusterIdNV: typeId = builder.makeIntegerType(32, 1); opCode = spv::Op::OpHitObjectGetClusterIdNV; break; case glslang::EOpReorderThreadNV: { if (operands.size() == 2) { builder.createNoResultOp(spv::Op::OpReorderThreadWithHintNV, operands); } else { builder.createNoResultOp(spv::Op::OpReorderThreadWithHitObjectNV, operands); } return 0; } case glslang::EOpImageSampleWeightedQCOM: typeId = builder.makeVectorType(builder.makeFloatType(32), 4); opCode = spv::Op::OpImageSampleWeightedQCOM; addImageProcessingQCOMDecoration(operands[2], spv::Decoration::WeightTextureQCOM); break; case glslang::EOpImageBoxFilterQCOM: typeId = builder.makeVectorType(builder.makeFloatType(32), 4); opCode = spv::Op::OpImageBoxFilterQCOM; break; case glslang::EOpImageBlockMatchSADQCOM: typeId = builder.makeVectorType(builder.makeFloatType(32), 4); opCode = spv::Op::OpImageBlockMatchSADQCOM; addImageProcessingQCOMDecoration(operands[0], spv::Decoration::BlockMatchTextureQCOM); addImageProcessingQCOMDecoration(operands[2], spv::Decoration::BlockMatchTextureQCOM); break; case glslang::EOpImageBlockMatchSSDQCOM: typeId = builder.makeVectorType(builder.makeFloatType(32), 4); opCode = spv::Op::OpImageBlockMatchSSDQCOM; addImageProcessingQCOMDecoration(operands[0], spv::Decoration::BlockMatchTextureQCOM); addImageProcessingQCOMDecoration(operands[2], spv::Decoration::BlockMatchTextureQCOM); break; case glslang::EOpFetchMicroTriangleVertexBarycentricNV: typeId = builder.makeVectorType(builder.makeFloatType(32), 2); opCode = spv::Op::OpFetchMicroTriangleVertexBarycentricNV; break; case glslang::EOpFetchMicroTriangleVertexPositionNV: typeId = builder.makeVectorType(builder.makeFloatType(32), 3); opCode = spv::Op::OpFetchMicroTriangleVertexPositionNV; break; case glslang::EOpImageBlockMatchWindowSSDQCOM: typeId = builder.makeVectorType(builder.makeFloatType(32), 4); opCode = spv::Op::OpImageBlockMatchWindowSSDQCOM; addImageProcessing2QCOMDecoration(operands[0], false); addImageProcessing2QCOMDecoration(operands[2], false); break; case glslang::EOpImageBlockMatchWindowSADQCOM: typeId = builder.makeVectorType(builder.makeFloatType(32), 4); opCode = spv::Op::OpImageBlockMatchWindowSADQCOM; addImageProcessing2QCOMDecoration(operands[0], false); addImageProcessing2QCOMDecoration(operands[2], false); break; case glslang::EOpImageBlockMatchGatherSSDQCOM: typeId = builder.makeVectorType(builder.makeFloatType(32), 4); opCode = spv::Op::OpImageBlockMatchGatherSSDQCOM; addImageProcessing2QCOMDecoration(operands[0], true); addImageProcessing2QCOMDecoration(operands[2], true); break; case glslang::EOpImageBlockMatchGatherSADQCOM: typeId = builder.makeVectorType(builder.makeFloatType(32), 4); opCode = spv::Op::OpImageBlockMatchGatherSADQCOM; addImageProcessing2QCOMDecoration(operands[0], true); addImageProcessing2QCOMDecoration(operands[2], true); break; case glslang::EOpCreateTensorLayoutNV: return builder.createOp(spv::Op::OpCreateTensorLayoutNV, typeId, std::vector{}); case glslang::EOpCreateTensorViewNV: return builder.createOp(spv::Op::OpCreateTensorViewNV, typeId, std::vector{}); case glslang::EOpTensorLayoutSetBlockSizeNV: opCode = spv::Op::OpTensorLayoutSetBlockSizeNV; break; case glslang::EOpTensorLayoutSetDimensionNV: opCode = spv::Op::OpTensorLayoutSetDimensionNV; break; case glslang::EOpTensorLayoutSetStrideNV: opCode = spv::Op::OpTensorLayoutSetStrideNV; break; case glslang::EOpTensorLayoutSliceNV: opCode = spv::Op::OpTensorLayoutSliceNV; break; case glslang::EOpTensorLayoutSetClampValueNV: opCode = spv::Op::OpTensorLayoutSetClampValueNV; break; case glslang::EOpTensorViewSetDimensionNV: opCode = spv::Op::OpTensorViewSetDimensionNV; break; case glslang::EOpTensorViewSetStrideNV: opCode = spv::Op::OpTensorViewSetStrideNV; break; case glslang::EOpTensorViewSetClipNV: opCode = spv::Op::OpTensorViewSetClipNV; break; default: return 0; } spv::Id id = 0; if (libCall >= 0) { // Use an extended instruction from the standard library. // Construct the call arguments, without modifying the original operands vector. // We might need the remaining arguments, e.g. in the EOpFrexp case. std::vector callArguments(operands.begin(), operands.begin() + consumedOperands); id = builder.createBuiltinCall(typeId, extBuiltins >= 0 ? extBuiltins : stdBuiltins, libCall, callArguments); } else if (opCode == spv::Op::OpDot && !isFloat) { // int dot(int, int) // NOTE: never called for scalar/vector1, this is turned into simple mul before this can be reached const int componentCount = builder.getNumComponents(operands[0]); spv::Id mulOp = builder.createBinOp(spv::Op::OpIMul, builder.getTypeId(operands[0]), operands[0], operands[1]); builder.setPrecision(mulOp, precision); id = builder.createCompositeExtract(mulOp, typeId, 0); for (int i = 1; i < componentCount; ++i) { builder.setPrecision(id, precision); id = builder.createBinOp(spv::Op::OpIAdd, typeId, id, builder.createCompositeExtract(mulOp, typeId, i)); } } else { switch (consumedOperands) { case 0: // should all be handled by visitAggregate and createNoArgOperation assert(0); return 0; case 1: // should all be handled by createUnaryOperation assert(0); return 0; case 2: id = builder.createBinOp(opCode, typeId, operands[0], operands[1]); break; default: // anything 3 or over doesn't have l-value operands, so all should be consumed assert(consumedOperands == operands.size()); id = builder.createOp(opCode, typeId, operands); break; } } // Decode the return types that were structures switch (op) { case glslang::EOpAddCarry: case glslang::EOpSubBorrow: builder.createStore(builder.createCompositeExtract(id, typeId0, 1), operands[2]); id = builder.createCompositeExtract(id, typeId0, 0); break; case glslang::EOpUMulExtended: case glslang::EOpIMulExtended: builder.createStore(builder.createCompositeExtract(id, typeId0, 0), operands[3]); builder.createStore(builder.createCompositeExtract(id, typeId0, 1), operands[2]); break; case glslang::EOpModf: { assert(operands.size() == 2); builder.createStore(builder.createCompositeExtract(id, typeId0, 1), operands[1]); id = builder.createCompositeExtract(id, typeId0, 0); } break; case glslang::EOpFrexp: { assert(operands.size() == 2); if (builder.isFloatType(builder.getScalarTypeId(typeId1))) { // "exp" is floating-point type (from HLSL intrinsic) spv::Id member1 = builder.createCompositeExtract(id, frexpIntType, 1); member1 = builder.createUnaryOp(spv::Op::OpConvertSToF, typeId1, member1); builder.createStore(member1, operands[1]); } else // "exp" is integer type (from GLSL built-in function) builder.createStore(builder.createCompositeExtract(id, frexpIntType, 1), operands[1]); id = builder.createCompositeExtract(id, typeId0, 0); } break; default: break; } return builder.setPrecision(id, precision); } // Intrinsics with no arguments (or no return value, and no precision). spv::Id TGlslangToSpvTraverser::createNoArgOperation(glslang::TOperator op, spv::Decoration precision, spv::Id typeId) { // GLSL memory barriers use queuefamily scope in new model, device scope in old model spv::Scope memoryBarrierScope = glslangIntermediate->usingVulkanMemoryModel() ? spv::Scope::QueueFamilyKHR : spv::Scope::Device; switch (op) { case glslang::EOpBarrier: if (glslangIntermediate->getStage() == EShLangTessControl) { if (glslangIntermediate->usingVulkanMemoryModel()) { builder.createControlBarrier(spv::Scope::Workgroup, spv::Scope::Workgroup, spv::MemorySemanticsMask::OutputMemoryKHR | spv::MemorySemanticsMask::AcquireRelease); builder.addCapability(spv::Capability::VulkanMemoryModelKHR); } else { builder.createControlBarrier(spv::Scope::Workgroup, spv::Scope::Invocation, spv::MemorySemanticsMask::MaskNone); } } else { builder.createControlBarrier(spv::Scope::Workgroup, spv::Scope::Workgroup, spv::MemorySemanticsMask::WorkgroupMemory | spv::MemorySemanticsMask::AcquireRelease); } return 0; case glslang::EOpMemoryBarrier: builder.createMemoryBarrier(memoryBarrierScope, spv::MemorySemanticsAllMemory | spv::MemorySemanticsMask::AcquireRelease); return 0; case glslang::EOpMemoryBarrierBuffer: builder.createMemoryBarrier(memoryBarrierScope, spv::MemorySemanticsMask::UniformMemory | spv::MemorySemanticsMask::AcquireRelease); return 0; case glslang::EOpMemoryBarrierShared: builder.createMemoryBarrier(memoryBarrierScope, spv::MemorySemanticsMask::WorkgroupMemory | spv::MemorySemanticsMask::AcquireRelease); return 0; case glslang::EOpGroupMemoryBarrier: builder.createMemoryBarrier(spv::Scope::Workgroup, spv::MemorySemanticsAllMemory | spv::MemorySemanticsMask::AcquireRelease); return 0; case glslang::EOpMemoryBarrierAtomicCounter: builder.createMemoryBarrier(memoryBarrierScope, spv::MemorySemanticsMask::AtomicCounterMemory | spv::MemorySemanticsMask::AcquireRelease); return 0; case glslang::EOpMemoryBarrierImage: builder.createMemoryBarrier(memoryBarrierScope, spv::MemorySemanticsMask::ImageMemory | spv::MemorySemanticsMask::AcquireRelease); return 0; case glslang::EOpAllMemoryBarrierWithGroupSync: builder.createControlBarrier(spv::Scope::Workgroup, spv::Scope::Device, spv::MemorySemanticsAllMemory | spv::MemorySemanticsMask::AcquireRelease); return 0; case glslang::EOpDeviceMemoryBarrier: builder.createMemoryBarrier(spv::Scope::Device, spv::MemorySemanticsMask::UniformMemory | spv::MemorySemanticsMask::ImageMemory | spv::MemorySemanticsMask::AcquireRelease); return 0; case glslang::EOpDeviceMemoryBarrierWithGroupSync: builder.createControlBarrier(spv::Scope::Workgroup, spv::Scope::Device, spv::MemorySemanticsMask::UniformMemory | spv::MemorySemanticsMask::ImageMemory | spv::MemorySemanticsMask::AcquireRelease); return 0; case glslang::EOpWorkgroupMemoryBarrier: builder.createMemoryBarrier(spv::Scope::Workgroup, spv::MemorySemanticsMask::WorkgroupMemory | spv::MemorySemanticsMask::AcquireRelease); return 0; case glslang::EOpWorkgroupMemoryBarrierWithGroupSync: builder.createControlBarrier(spv::Scope::Workgroup, spv::Scope::Workgroup, spv::MemorySemanticsMask::WorkgroupMemory | spv::MemorySemanticsMask::AcquireRelease); return 0; case glslang::EOpSubgroupBarrier: builder.createControlBarrier(spv::Scope::Subgroup, spv::Scope::Subgroup, spv::MemorySemanticsAllMemory | spv::MemorySemanticsMask::AcquireRelease); return spv::NoResult; case glslang::EOpSubgroupMemoryBarrier: builder.createMemoryBarrier(spv::Scope::Subgroup, spv::MemorySemanticsAllMemory | spv::MemorySemanticsMask::AcquireRelease); return spv::NoResult; case glslang::EOpSubgroupMemoryBarrierBuffer: builder.createMemoryBarrier(spv::Scope::Subgroup, spv::MemorySemanticsMask::UniformMemory | spv::MemorySemanticsMask::AcquireRelease); return spv::NoResult; case glslang::EOpSubgroupMemoryBarrierImage: builder.createMemoryBarrier(spv::Scope::Subgroup, spv::MemorySemanticsMask::ImageMemory | spv::MemorySemanticsMask::AcquireRelease); return spv::NoResult; case glslang::EOpSubgroupMemoryBarrierShared: builder.createMemoryBarrier(spv::Scope::Subgroup, spv::MemorySemanticsMask::WorkgroupMemory | spv::MemorySemanticsMask::AcquireRelease); return spv::NoResult; case glslang::EOpEmitVertex: builder.createNoResultOp(spv::Op::OpEmitVertex); return 0; case glslang::EOpEndPrimitive: builder.createNoResultOp(spv::Op::OpEndPrimitive); return 0; case glslang::EOpSubgroupElect: { std::vector operands; return createSubgroupOperation(op, typeId, operands, glslang::EbtVoid); } case glslang::EOpTime: { std::vector args; // Dummy arguments spv::Id id = builder.createBuiltinCall(typeId, getExtBuiltins(spv::E_SPV_AMD_gcn_shader), spv::TimeAMD, args); return builder.setPrecision(id, precision); } case glslang::EOpIgnoreIntersectionNV: builder.createNoResultOp(spv::Op::OpIgnoreIntersectionNV); return 0; case glslang::EOpTerminateRayNV: builder.createNoResultOp(spv::Op::OpTerminateRayNV); return 0; case glslang::EOpRayQueryInitialize: builder.createNoResultOp(spv::Op::OpRayQueryInitializeKHR); return 0; case glslang::EOpRayQueryTerminate: builder.createNoResultOp(spv::Op::OpRayQueryTerminateKHR); return 0; case glslang::EOpRayQueryGenerateIntersection: builder.createNoResultOp(spv::Op::OpRayQueryGenerateIntersectionKHR); return 0; case glslang::EOpRayQueryConfirmIntersection: builder.createNoResultOp(spv::Op::OpRayQueryConfirmIntersectionKHR); return 0; case glslang::EOpBeginInvocationInterlock: builder.createNoResultOp(spv::Op::OpBeginInvocationInterlockEXT); return 0; case glslang::EOpEndInvocationInterlock: builder.createNoResultOp(spv::Op::OpEndInvocationInterlockEXT); return 0; case glslang::EOpIsHelperInvocation: { std::vector args; // Dummy arguments builder.addExtension(spv::E_SPV_EXT_demote_to_helper_invocation); builder.addCapability(spv::Capability::DemoteToHelperInvocationEXT); return builder.createOp(spv::Op::OpIsHelperInvocationEXT, typeId, args); } case glslang::EOpReadClockSubgroupKHR: { std::vector args; args.push_back(builder.makeUintConstant(spv::Scope::Subgroup)); builder.addExtension(spv::E_SPV_KHR_shader_clock); builder.addCapability(spv::Capability::ShaderClockKHR); return builder.createOp(spv::Op::OpReadClockKHR, typeId, args); } case glslang::EOpReadClockDeviceKHR: { std::vector args; args.push_back(builder.makeUintConstant(spv::Scope::Device)); builder.addExtension(spv::E_SPV_KHR_shader_clock); builder.addCapability(spv::Capability::ShaderClockKHR); return builder.createOp(spv::Op::OpReadClockKHR, typeId, args); } case glslang::EOpStencilAttachmentReadEXT: case glslang::EOpDepthAttachmentReadEXT: { builder.addExtension(spv::E_SPV_EXT_shader_tile_image); spv::Decoration precision; spv::Op spv_op; if (op == glslang::EOpStencilAttachmentReadEXT) { precision = spv::Decoration::RelaxedPrecision; spv_op = spv::Op::OpStencilAttachmentReadEXT; builder.addCapability(spv::Capability::TileImageStencilReadAccessEXT); } else { precision = spv::NoPrecision; spv_op = spv::Op::OpDepthAttachmentReadEXT; builder.addCapability(spv::Capability::TileImageDepthReadAccessEXT); } std::vector args; // Dummy args spv::Id result = builder.createOp(spv_op, typeId, args); return builder.setPrecision(result, precision); } default: break; } logger->missingFunctionality("unknown operation with no arguments"); return 0; } spv::Id TGlslangToSpvTraverser::getSymbolId(const glslang::TIntermSymbol* symbol) { auto iter = symbolValues.find(symbol->getId()); spv::Id id; if (symbolValues.end() != iter) { id = iter->second; return id; } // it was not found, create it spv::BuiltIn builtIn = TranslateBuiltInDecoration(symbol->getQualifier().builtIn, false); auto forcedType = getForcedType(symbol->getQualifier().builtIn, symbol->getType()); // There are pairs of symbols that map to the same SPIR-V built-in: // gl_ObjectToWorldEXT and gl_ObjectToWorld3x4EXT, and gl_WorldToObjectEXT // and gl_WorldToObject3x4EXT. SPIR-V forbids having two OpVariables // with the same BuiltIn in the same storage class, so we must re-use one. const bool mayNeedToReuseBuiltIn = builtIn == spv::BuiltIn::ObjectToWorldKHR || builtIn == spv::BuiltIn::WorldToObjectKHR; if (mayNeedToReuseBuiltIn) { auto iter = builtInVariableIds.find(uint32_t(builtIn)); if (builtInVariableIds.end() != iter) { id = iter->second; symbolValues[symbol->getId()] = id; if (forcedType.second != spv::NoType) forceType[id] = forcedType.second; return id; } } if (symbol->getBasicType() == glslang::EbtFunction) { return 0; } id = createSpvVariable(symbol, forcedType.first); if (mayNeedToReuseBuiltIn) { builtInVariableIds.insert({uint32_t(builtIn), id}); } symbolValues[symbol->getId()] = id; if (forcedType.second != spv::NoType) forceType[id] = forcedType.second; if (symbol->getBasicType() != glslang::EbtBlock) { builder.addDecoration(id, TranslatePrecisionDecoration(symbol->getType())); builder.addDecoration(id, TranslateInterpolationDecoration(symbol->getType().getQualifier())); builder.addDecoration(id, TranslateAuxiliaryStorageDecoration(symbol->getType().getQualifier())); addMeshNVDecoration(id, /*member*/ -1, symbol->getType().getQualifier()); if (symbol->getQualifier().hasComponent()) builder.addDecoration(id, spv::Decoration::Component, symbol->getQualifier().layoutComponent); if (symbol->getQualifier().hasIndex()) builder.addDecoration(id, spv::Decoration::Index, symbol->getQualifier().layoutIndex); if (symbol->getType().getQualifier().hasSpecConstantId()) builder.addDecoration(id, spv::Decoration::SpecId, symbol->getType().getQualifier().layoutSpecConstantId); // atomic counters use this: if (symbol->getQualifier().hasOffset()) builder.addDecoration(id, spv::Decoration::Offset, symbol->getQualifier().layoutOffset); } if (symbol->getQualifier().hasLocation()) { if (!(glslangIntermediate->isRayTracingStage() && (glslangIntermediate->IsRequestedExtension(glslang::E_GL_EXT_ray_tracing) || glslangIntermediate->IsRequestedExtension(glslang::E_GL_NV_shader_invocation_reorder)) && (builder.getStorageClass(id) == spv::StorageClass::RayPayloadKHR || builder.getStorageClass(id) == spv::StorageClass::IncomingRayPayloadKHR || builder.getStorageClass(id) == spv::StorageClass::CallableDataKHR || builder.getStorageClass(id) == spv::StorageClass::IncomingCallableDataKHR || builder.getStorageClass(id) == spv::StorageClass::HitObjectAttributeNV))) { // Location values are used to link TraceRayKHR/ExecuteCallableKHR/HitObjectGetAttributesNV // to corresponding variables but are not valid in SPIRV since they are supported only // for Input/Output Storage classes. builder.addDecoration(id, spv::Decoration::Location, symbol->getQualifier().layoutLocation); } } builder.addDecoration(id, TranslateInvariantDecoration(symbol->getType().getQualifier())); if (symbol->getQualifier().hasStream() && glslangIntermediate->isMultiStream()) { builder.addCapability(spv::Capability::GeometryStreams); builder.addDecoration(id, spv::Decoration::Stream, symbol->getQualifier().layoutStream); } if (symbol->getQualifier().hasSet()) builder.addDecoration(id, spv::Decoration::DescriptorSet, symbol->getQualifier().layoutSet); else if (IsDescriptorResource(symbol->getType())) { // default to 0 builder.addDecoration(id, spv::Decoration::DescriptorSet, 0); } if (symbol->getQualifier().hasBinding()) builder.addDecoration(id, spv::Decoration::Binding, symbol->getQualifier().layoutBinding); else if (IsDescriptorResource(symbol->getType())) { // default to 0 builder.addDecoration(id, spv::Decoration::Binding, 0); } if (symbol->getQualifier().hasAttachment()) builder.addDecoration(id, spv::Decoration::InputAttachmentIndex, symbol->getQualifier().layoutAttachment); if (glslangIntermediate->getXfbMode()) { builder.addCapability(spv::Capability::TransformFeedback); if (symbol->getQualifier().hasXfbBuffer()) { builder.addDecoration(id, spv::Decoration::XfbBuffer, symbol->getQualifier().layoutXfbBuffer); unsigned stride = glslangIntermediate->getXfbStride(symbol->getQualifier().layoutXfbBuffer); if (stride != glslang::TQualifier::layoutXfbStrideEnd) builder.addDecoration(id, spv::Decoration::XfbStride, stride); } if (symbol->getQualifier().hasXfbOffset()) builder.addDecoration(id, spv::Decoration::Offset, symbol->getQualifier().layoutXfbOffset); } // add built-in variable decoration if (builtIn != spv::BuiltIn::Max) { // WorkgroupSize deprecated in spirv1.6 if (glslangIntermediate->getSpv().spv < glslang::EShTargetSpv_1_6 || builtIn != spv::BuiltIn::WorkgroupSize) builder.addDecoration(id, spv::Decoration::BuiltIn, (int)builtIn); } // Add volatile decoration to HelperInvocation for spirv1.6 and beyond if (builtIn == spv::BuiltIn::HelperInvocation && !glslangIntermediate->usingVulkanMemoryModel() && glslangIntermediate->getSpv().spv >= glslang::EShTargetSpv_1_6) { builder.addDecoration(id, spv::Decoration::Volatile); } // Subgroup builtins which have input storage class are volatile for ray tracing stages. if (symbol->getType().isImage() || symbol->getQualifier().isPipeInput()) { std::vector memory; TranslateMemoryDecoration(symbol->getType().getQualifier(), memory, glslangIntermediate->usingVulkanMemoryModel()); for (unsigned int i = 0; i < memory.size(); ++i) builder.addDecoration(id, memory[i]); } if (builtIn == spv::BuiltIn::SampleMask) { spv::Decoration decoration; // GL_NV_sample_mask_override_coverage extension if (glslangIntermediate->getLayoutOverrideCoverage()) decoration = spv::Decoration::OverrideCoverageNV; else decoration = spv::Decoration::Max; builder.addDecoration(id, decoration); if (decoration != spv::Decoration::Max) { builder.addCapability(spv::Capability::SampleMaskOverrideCoverageNV); builder.addExtension(spv::E_SPV_NV_sample_mask_override_coverage); } } else if (builtIn == spv::BuiltIn::Layer) { // SPV_NV_viewport_array2 extension if (symbol->getQualifier().layoutViewportRelative) { builder.addDecoration(id, spv::Decoration::ViewportRelativeNV); builder.addCapability(spv::Capability::ShaderViewportMaskNV); builder.addExtension(spv::E_SPV_NV_viewport_array2); } if (symbol->getQualifier().layoutSecondaryViewportRelativeOffset != -2048) { builder.addDecoration(id, spv::Decoration::SecondaryViewportRelativeNV, symbol->getQualifier().layoutSecondaryViewportRelativeOffset); builder.addCapability(spv::Capability::ShaderStereoViewNV); builder.addExtension(spv::E_SPV_NV_stereo_view_rendering); } } if (symbol->getQualifier().layoutPassthrough) { builder.addDecoration(id, spv::Decoration::PassthroughNV); builder.addCapability(spv::Capability::GeometryShaderPassthroughNV); builder.addExtension(spv::E_SPV_NV_geometry_shader_passthrough); } if (symbol->getQualifier().pervertexNV) { builder.addDecoration(id, spv::Decoration::PerVertexNV); builder.addCapability(spv::Capability::FragmentBarycentricNV); builder.addExtension(spv::E_SPV_NV_fragment_shader_barycentric); } if (symbol->getQualifier().pervertexEXT) { builder.addDecoration(id, spv::Decoration::PerVertexKHR); builder.addCapability(spv::Capability::FragmentBarycentricKHR); builder.addExtension(spv::E_SPV_KHR_fragment_shader_barycentric); } if (glslangIntermediate->getHlslFunctionality1() && symbol->getType().getQualifier().semanticName != nullptr) { builder.addExtension("SPV_GOOGLE_hlsl_functionality1"); builder.addDecoration(id, spv::Decoration::HlslSemanticGOOGLE, symbol->getType().getQualifier().semanticName); } if (symbol->isReference()) { builder.addDecoration(id, symbol->getType().getQualifier().restrict ? spv::Decoration::RestrictPointerEXT : spv::Decoration::AliasedPointerEXT); } // Add SPIR-V decorations (GL_EXT_spirv_intrinsics) if (symbol->getType().getQualifier().hasSpirvDecorate()) applySpirvDecorate(symbol->getType(), id, {}); return id; } // add per-primitive, per-view. per-task decorations to a struct member (member >= 0) or an object void TGlslangToSpvTraverser::addMeshNVDecoration(spv::Id id, int member, const glslang::TQualifier& qualifier) { bool isMeshShaderExt = (glslangIntermediate->getRequestedExtensions().find(glslang::E_GL_EXT_mesh_shader) != glslangIntermediate->getRequestedExtensions().end()); if (member >= 0) { if (qualifier.perPrimitiveNV) { // Need to add capability/extension for fragment shader. // Mesh shader already adds this by default. if (glslangIntermediate->getStage() == EShLangFragment) { if(isMeshShaderExt) { builder.addCapability(spv::Capability::MeshShadingEXT); builder.addExtension(spv::E_SPV_EXT_mesh_shader); } else { builder.addCapability(spv::Capability::MeshShadingNV); builder.addExtension(spv::E_SPV_NV_mesh_shader); } } builder.addMemberDecoration(id, (unsigned)member, spv::Decoration::PerPrimitiveNV); } if (qualifier.perViewNV) builder.addMemberDecoration(id, (unsigned)member, spv::Decoration::PerViewNV); if (qualifier.perTaskNV) builder.addMemberDecoration(id, (unsigned)member, spv::Decoration::PerTaskNV); } else { if (qualifier.perPrimitiveNV) { // Need to add capability/extension for fragment shader. // Mesh shader already adds this by default. if (glslangIntermediate->getStage() == EShLangFragment) { if(isMeshShaderExt) { builder.addCapability(spv::Capability::MeshShadingEXT); builder.addExtension(spv::E_SPV_EXT_mesh_shader); } else { builder.addCapability(spv::Capability::MeshShadingNV); builder.addExtension(spv::E_SPV_NV_mesh_shader); } } builder.addDecoration(id, spv::Decoration::PerPrimitiveNV); } if (qualifier.perViewNV) builder.addDecoration(id, spv::Decoration::PerViewNV); if (qualifier.perTaskNV) builder.addDecoration(id, spv::Decoration::PerTaskNV); } } bool TGlslangToSpvTraverser::hasQCOMImageProceessingDecoration(spv::Id id, spv::Decoration decor) { std::vector &decoVec = idToQCOMDecorations[id]; for ( auto d : decoVec ) { if ( d == decor ) return true; } return false; } void TGlslangToSpvTraverser::addImageProcessingQCOMDecoration(spv::Id id, spv::Decoration decor) { spv::Op opc = builder.getOpCode(id); if (opc == spv::Op::OpSampledImage) { id = builder.getIdOperand(id, 0); opc = builder.getOpCode(id); } if (opc == spv::Op::OpLoad) { spv::Id texid = builder.getIdOperand(id, 0); if (!hasQCOMImageProceessingDecoration(texid, decor)) {// builder.addDecoration(texid, decor); idToQCOMDecorations[texid].push_back(decor); } } } void TGlslangToSpvTraverser::addImageProcessing2QCOMDecoration(spv::Id id, bool isForGather) { if (isForGather) { return addImageProcessingQCOMDecoration(id, spv::Decoration::BlockMatchTextureQCOM); } auto addDecor = [this](spv::Id id, spv::Decoration decor) { spv::Op tsopc = this->builder.getOpCode(id); if (tsopc == spv::Op::OpLoad) { spv::Id tsid = this->builder.getIdOperand(id, 0); if (this->glslangIntermediate->getSpv().spv >= glslang::EShTargetSpv_1_4) { assert(iOSet.count(tsid) > 0); } if (!hasQCOMImageProceessingDecoration(tsid, decor)) { this->builder.addDecoration(tsid, decor); idToQCOMDecorations[tsid].push_back(decor); } } }; spv::Op opc = builder.getOpCode(id); bool isInterfaceObject = (opc != spv::Op::OpSampledImage); if (!isInterfaceObject) { addDecor(builder.getIdOperand(id, 0), spv::Decoration::BlockMatchTextureQCOM); addDecor(builder.getIdOperand(id, 1), spv::Decoration::BlockMatchSamplerQCOM); } else { addDecor(id, spv::Decoration::BlockMatchTextureQCOM); addDecor(id, spv::Decoration::BlockMatchSamplerQCOM); } } // Make a full tree of instructions to build a SPIR-V specialization constant, // or regular constant if possible. // // TBD: this is not yet done, nor verified to be the best design, it does do the leaf symbols though // // Recursively walk the nodes. The nodes form a tree whose leaves are // regular constants, which themselves are trees that createSpvConstant() // recursively walks. So, this function walks the "top" of the tree: // - emit specialization constant-building instructions for specConstant // - when running into a non-spec-constant, switch to createSpvConstant() spv::Id TGlslangToSpvTraverser::createSpvConstant(const glslang::TIntermTyped& node) { assert(node.getQualifier().isConstant()); // Handle front-end constants first (non-specialization constants). if (! node.getQualifier().specConstant) { // hand off to the non-spec-constant path assert(node.getAsConstantUnion() != nullptr || node.getAsSymbolNode() != nullptr); int nextConst = 0; return createSpvConstantFromConstUnionArray(node.getType(), node.getAsConstantUnion() ? node.getAsConstantUnion()->getConstArray() : node.getAsSymbolNode()->getConstArray(), nextConst, false); } // We now know we have a specialization constant to build // Extra capabilities may be needed. if (node.getType().contains8BitInt()) builder.addCapability(spv::Capability::Int8); if (node.getType().contains16BitFloat()) builder.addCapability(spv::Capability::Float16); if (node.getType().contains16BitInt()) builder.addCapability(spv::Capability::Int16); if (node.getType().contains64BitInt()) builder.addCapability(spv::Capability::Int64); if (node.getType().containsDouble()) builder.addCapability(spv::Capability::Float64); // gl_WorkGroupSize is a special case until the front-end handles hierarchical specialization constants, // even then, it's specialization ids are handled by special case syntax in GLSL: layout(local_size_x = ... if (node.getType().getQualifier().builtIn == glslang::EbvWorkGroupSize) { std::vector dimConstId; for (int dim = 0; dim < 3; ++dim) { bool specConst = (glslangIntermediate->getLocalSizeSpecId(dim) != glslang::TQualifier::layoutNotSet); dimConstId.push_back(builder.makeUintConstant(glslangIntermediate->getLocalSize(dim), specConst)); if (specConst) { builder.addDecoration(dimConstId.back(), spv::Decoration::SpecId, glslangIntermediate->getLocalSizeSpecId(dim)); } } return builder.makeCompositeConstant(builder.makeVectorType(builder.makeUintType(32), 3), dimConstId, true); } // An AST node labelled as specialization constant should be a symbol node. // Its initializer should either be a sub tree with constant nodes, or a constant union array. if (auto* sn = node.getAsSymbolNode()) { spv::Id result; if (auto* sub_tree = sn->getConstSubtree()) { // Traverse the constant constructor sub tree like generating normal run-time instructions. // During the AST traversal, if the node is marked as 'specConstant', SpecConstantOpModeGuard // will set the builder into spec constant op instruction generating mode. sub_tree->traverse(this); result = accessChainLoad(sub_tree->getType()); } else if (auto* const_union_array = &sn->getConstArray()) { int nextConst = 0; result = createSpvConstantFromConstUnionArray(sn->getType(), *const_union_array, nextConst, true); } else { logger->missingFunctionality("Invalid initializer for spec onstant."); return spv::NoResult; } builder.addName(result, sn->getName().c_str()); return result; } // Neither a front-end constant node, nor a specialization constant node with constant union array or // constant sub tree as initializer. logger->missingFunctionality("Neither a front-end constant nor a spec constant."); return spv::NoResult; } // Use 'consts' as the flattened glslang source of scalar constants to recursively // build the aggregate SPIR-V constant. // // If there are not enough elements present in 'consts', 0 will be substituted; // an empty 'consts' can be used to create a fully zeroed SPIR-V constant. // spv::Id TGlslangToSpvTraverser::createSpvConstantFromConstUnionArray(const glslang::TType& glslangType, const glslang::TConstUnionArray& consts, int& nextConst, bool specConstant) { // vector of constants for SPIR-V std::vector spvConsts; // Type is used for struct and array constants spv::Id typeId = convertGlslangToSpvType(glslangType); if (glslangType.isArray()) { glslang::TType elementType(glslangType, 0); for (int i = 0; i < glslangType.getOuterArraySize(); ++i) spvConsts.push_back(createSpvConstantFromConstUnionArray(elementType, consts, nextConst, false)); } else if (glslangType.isMatrix()) { glslang::TType vectorType(glslangType, 0); for (int col = 0; col < glslangType.getMatrixCols(); ++col) spvConsts.push_back(createSpvConstantFromConstUnionArray(vectorType, consts, nextConst, false)); } else if (glslangType.isCoopMat()) { glslang::TType componentType(glslangType.getBasicType()); spvConsts.push_back(createSpvConstantFromConstUnionArray(componentType, consts, nextConst, false)); } else if (glslangType.isStruct()) { glslang::TVector::const_iterator iter; for (iter = glslangType.getStruct()->begin(); iter != glslangType.getStruct()->end(); ++iter) spvConsts.push_back(createSpvConstantFromConstUnionArray(*iter->type, consts, nextConst, false)); } else if (glslangType.getVectorSize() > 1 || glslangType.isCoopVecNV()) { unsigned int numComponents = glslangType.isCoopVecNV() ? glslangType.getTypeParameters()->arraySizes->getDimSize(0) : glslangType.getVectorSize(); for (unsigned int i = 0; i < numComponents; ++i) { bool zero = nextConst >= consts.size(); switch (glslangType.getBasicType()) { case glslang::EbtInt: spvConsts.push_back(builder.makeIntConstant(zero ? 0 : consts[nextConst].getIConst())); break; case glslang::EbtUint: spvConsts.push_back(builder.makeUintConstant(zero ? 0 : consts[nextConst].getUConst())); break; case glslang::EbtFloat: spvConsts.push_back(builder.makeFloatConstant(zero ? 0.0F : (float)consts[nextConst].getDConst())); break; case glslang::EbtBool: spvConsts.push_back(builder.makeBoolConstant(zero ? false : consts[nextConst].getBConst())); break; case glslang::EbtInt8: builder.addCapability(spv::Capability::Int8); spvConsts.push_back(builder.makeInt8Constant(zero ? 0 : consts[nextConst].getI8Const())); break; case glslang::EbtUint8: builder.addCapability(spv::Capability::Int8); spvConsts.push_back(builder.makeUint8Constant(zero ? 0 : consts[nextConst].getU8Const())); break; case glslang::EbtInt16: builder.addCapability(spv::Capability::Int16); spvConsts.push_back(builder.makeInt16Constant(zero ? 0 : consts[nextConst].getI16Const())); break; case glslang::EbtUint16: builder.addCapability(spv::Capability::Int16); spvConsts.push_back(builder.makeUint16Constant(zero ? 0 : consts[nextConst].getU16Const())); break; case glslang::EbtInt64: spvConsts.push_back(builder.makeInt64Constant(zero ? 0 : consts[nextConst].getI64Const())); break; case glslang::EbtUint64: spvConsts.push_back(builder.makeUint64Constant(zero ? 0 : consts[nextConst].getU64Const())); break; case glslang::EbtDouble: spvConsts.push_back(builder.makeDoubleConstant(zero ? 0.0 : consts[nextConst].getDConst())); break; case glslang::EbtFloat16: builder.addCapability(spv::Capability::Float16); spvConsts.push_back(builder.makeFloat16Constant(zero ? 0.0F : (float)consts[nextConst].getDConst())); break; case glslang::EbtBFloat16: spvConsts.push_back(builder.makeBFloat16Constant(zero ? 0.0F : (float)consts[nextConst].getDConst())); break; case glslang::EbtFloatE5M2: spvConsts.push_back(builder.makeFloatE5M2Constant(zero ? 0.0F : (float)consts[nextConst].getDConst())); break; case glslang::EbtFloatE4M3: spvConsts.push_back(builder.makeFloatE4M3Constant(zero ? 0.0F : (float)consts[nextConst].getDConst())); break; default: assert(0); break; } ++nextConst; } } else { // we have a non-aggregate (scalar) constant bool zero = nextConst >= consts.size(); spv::Id scalar = 0; switch (glslangType.getBasicType()) { case glslang::EbtInt: scalar = builder.makeIntConstant(zero ? 0 : consts[nextConst].getIConst(), specConstant); break; case glslang::EbtUint: scalar = builder.makeUintConstant(zero ? 0 : consts[nextConst].getUConst(), specConstant); break; case glslang::EbtFloat: scalar = builder.makeFloatConstant(zero ? 0.0F : (float)consts[nextConst].getDConst(), specConstant); break; case glslang::EbtBool: scalar = builder.makeBoolConstant(zero ? false : consts[nextConst].getBConst(), specConstant); break; case glslang::EbtInt8: builder.addCapability(spv::Capability::Int8); scalar = builder.makeInt8Constant(zero ? 0 : consts[nextConst].getI8Const(), specConstant); break; case glslang::EbtUint8: builder.addCapability(spv::Capability::Int8); scalar = builder.makeUint8Constant(zero ? 0 : consts[nextConst].getU8Const(), specConstant); break; case glslang::EbtInt16: builder.addCapability(spv::Capability::Int16); scalar = builder.makeInt16Constant(zero ? 0 : consts[nextConst].getI16Const(), specConstant); break; case glslang::EbtUint16: builder.addCapability(spv::Capability::Int16); scalar = builder.makeUint16Constant(zero ? 0 : consts[nextConst].getU16Const(), specConstant); break; case glslang::EbtInt64: scalar = builder.makeInt64Constant(zero ? 0 : consts[nextConst].getI64Const(), specConstant); break; case glslang::EbtUint64: scalar = builder.makeUint64Constant(zero ? 0 : consts[nextConst].getU64Const(), specConstant); break; case glslang::EbtDouble: scalar = builder.makeDoubleConstant(zero ? 0.0 : consts[nextConst].getDConst(), specConstant); break; case glslang::EbtFloat16: builder.addCapability(spv::Capability::Float16); scalar = builder.makeFloat16Constant(zero ? 0.0F : (float)consts[nextConst].getDConst(), specConstant); break; case glslang::EbtBFloat16: scalar = builder.makeBFloat16Constant(zero ? 0.0F : (float)consts[nextConst].getDConst(), specConstant); break; case glslang::EbtFloatE5M2: scalar = builder.makeFloatE5M2Constant(zero ? 0.0F : (float)consts[nextConst].getDConst(), specConstant); break; case glslang::EbtFloatE4M3: scalar = builder.makeFloatE4M3Constant(zero ? 0.0F : (float)consts[nextConst].getDConst(), specConstant); break; case glslang::EbtReference: scalar = builder.makeUint64Constant(zero ? 0 : consts[nextConst].getU64Const(), specConstant); scalar = builder.createUnaryOp(spv::Op::OpBitcast, typeId, scalar); break; case glslang::EbtString: scalar = builder.getStringId(consts[nextConst].getSConst()->c_str()); break; default: assert(0); break; } ++nextConst; return scalar; } return builder.makeCompositeConstant(typeId, spvConsts); } // Return true if the node is a constant or symbol whose reading has no // non-trivial observable cost or effect. bool TGlslangToSpvTraverser::isTrivialLeaf(const glslang::TIntermTyped* node) { // don't know what this is if (node == nullptr) return false; // a constant is safe if (node->getAsConstantUnion() != nullptr) return true; // not a symbol means non-trivial if (node->getAsSymbolNode() == nullptr) return false; // a symbol, depends on what's being read switch (node->getType().getQualifier().storage) { case glslang::EvqTemporary: case glslang::EvqGlobal: case glslang::EvqIn: case glslang::EvqInOut: case glslang::EvqConst: case glslang::EvqConstReadOnly: case glslang::EvqUniform: return true; default: return false; } } // A node is trivial if it is a single operation with no side effects. // HLSL (and/or vectors) are always trivial, as it does not short circuit. // Otherwise, error on the side of saying non-trivial. // Return true if trivial. bool TGlslangToSpvTraverser::isTrivial(const glslang::TIntermTyped* node) { if (node == nullptr) return false; // count non scalars as trivial, as well as anything coming from HLSL if (! node->getType().isScalarOrVec1() || glslangIntermediate->getSource() == glslang::EShSourceHlsl) return true; // symbols and constants are trivial if (isTrivialLeaf(node)) return true; // otherwise, it needs to be a simple operation or one or two leaf nodes // not a simple operation const glslang::TIntermBinary* binaryNode = node->getAsBinaryNode(); const glslang::TIntermUnary* unaryNode = node->getAsUnaryNode(); if (binaryNode == nullptr && unaryNode == nullptr) return false; // not on leaf nodes if (binaryNode && (! isTrivialLeaf(binaryNode->getLeft()) || ! isTrivialLeaf(binaryNode->getRight()))) return false; if (unaryNode && ! isTrivialLeaf(unaryNode->getOperand())) { return false; } if (IsOpNumericConv(node->getAsOperator()->getOp()) && node->getType().getBasicType() == glslang::EbtBool) { return true; } switch (node->getAsOperator()->getOp()) { case glslang::EOpLogicalNot: case glslang::EOpEqual: case glslang::EOpNotEqual: case glslang::EOpLessThan: case glslang::EOpGreaterThan: case glslang::EOpLessThanEqual: case glslang::EOpGreaterThanEqual: case glslang::EOpIndexDirect: case glslang::EOpIndexDirectStruct: case glslang::EOpLogicalXor: case glslang::EOpAny: case glslang::EOpAll: return true; default: return false; } } // Emit short-circuiting code, where 'right' is never evaluated unless // the left side is true (for &&) or false (for ||). spv::Id TGlslangToSpvTraverser::createShortCircuit(glslang::TOperator op, glslang::TIntermTyped& left, glslang::TIntermTyped& right) { spv::Id boolTypeId = builder.makeBoolType(); // emit left operand builder.clearAccessChain(); left.traverse(this); spv::Id leftId = accessChainLoad(left.getType()); // Operands to accumulate OpPhi operands std::vector phiOperands; phiOperands.reserve(4); // accumulate left operand's phi information phiOperands.push_back(leftId); phiOperands.push_back(builder.getBuildPoint()->getId()); // Make the two kinds of operation symmetric with a "!" // || => emit "if (! left) result = right" // && => emit "if ( left) result = right" // // TODO: this runtime "not" for || could be avoided by adding functionality // to 'builder' to have an "else" without an "then" if (op == glslang::EOpLogicalOr) leftId = builder.createUnaryOp(spv::Op::OpLogicalNot, boolTypeId, leftId); // make an "if" based on the left value spv::Builder::If ifBuilder(leftId, spv::SelectionControlMask::MaskNone, builder); // emit right operand as the "then" part of the "if" builder.clearAccessChain(); right.traverse(this); spv::Id rightId = accessChainLoad(right.getType()); // accumulate left operand's phi information phiOperands.push_back(rightId); phiOperands.push_back(builder.getBuildPoint()->getId()); // finish the "if" ifBuilder.makeEndIf(); // phi together the two results return builder.createOp(spv::Op::OpPhi, boolTypeId, phiOperands); } // Return type Id of the imported set of extended instructions corresponds to the name. // Import this set if it has not been imported yet. spv::Id TGlslangToSpvTraverser::getExtBuiltins(const char* name) { if (extBuiltinMap.find(name) != extBuiltinMap.end()) return extBuiltinMap[name]; else { spv::Id extBuiltins = builder.import(name); extBuiltinMap[name] = extBuiltins; return extBuiltins; } } } // end anonymous namespace namespace glslang { void GetSpirvVersion(std::string& version) { const int bufSize = 100; char buf[bufSize]; snprintf(buf, bufSize, "0x%08x, Revision %d", spv::Version, spv::Revision); version = buf; } // For low-order part of the generator's magic number. Bump up // when there is a change in the style (e.g., if SSA form changes, // or a different instruction sequence to do something gets used). int GetSpirvGeneratorVersion() { // return 1; // start // return 2; // EOpAtomicCounterDecrement gets a post decrement, to map between GLSL -> SPIR-V // return 3; // change/correct barrier-instruction operands, to match memory model group decisions // return 4; // some deeper access chains: for dynamic vector component, and local Boolean component // return 5; // make OpArrayLength result type be an int with signedness of 0 // return 6; // revert version 5 change, which makes a different (new) kind of incorrect code, // versions 4 and 6 each generate OpArrayLength as it has long been done // return 7; // GLSL volatile keyword maps to both SPIR-V decorations Volatile and Coherent // return 8; // switch to new dead block eliminator; use OpUnreachable // return 9; // don't include opaque function parameters in OpEntryPoint global's operand list // return 10; // Generate OpFUnordNotEqual for != comparisons return 11; // Make OpEmitMeshTasksEXT a terminal instruction } // Write SPIR-V out to a binary file bool OutputSpvBin(const std::vector& spirv, const char* baseName) { std::ofstream out; out.open(baseName, std::ios::binary | std::ios::out); if (out.fail()) { printf("ERROR: Failed to open file: %s\n", baseName); return false; } for (int i = 0; i < (int)spirv.size(); ++i) { unsigned int word = spirv[i]; out.write((const char*)&word, 4); } out.close(); return true; } // Write SPIR-V out to a text file with 32-bit hexadecimal words bool OutputSpvHex(const std::vector& spirv, const char* baseName, const char* varName) { std::ofstream out; out.open(baseName, std::ios::binary | std::ios::out); if (out.fail()) { printf("ERROR: Failed to open file: %s\n", baseName); return false; } out << "\t// " << GetSpirvGeneratorVersion() << GLSLANG_VERSION_MAJOR << "." << GLSLANG_VERSION_MINOR << "." << GLSLANG_VERSION_PATCH << GLSLANG_VERSION_FLAVOR << std::endl; if (varName != nullptr) { out << "\t #pragma once" << std::endl; out << "const uint32_t " << varName << "[] = {" << std::endl; } const int WORDS_PER_LINE = 8; for (int i = 0; i < (int)spirv.size(); i += WORDS_PER_LINE) { out << "\t"; for (int j = 0; j < WORDS_PER_LINE && i + j < (int)spirv.size(); ++j) { const unsigned int word = spirv[i + j]; out << "0x" << std::hex << std::setw(8) << std::setfill('0') << word; if (i + j + 1 < (int)spirv.size()) { out << ","; } } out << std::endl; } if (varName != nullptr) { out << "};"; out << std::endl; } out.close(); return true; } // // Set up the glslang traversal // void GlslangToSpv(const TIntermediate& intermediate, std::vector& spirv, SpvOptions* options) { spv::SpvBuildLogger logger; GlslangToSpv(intermediate, spirv, &logger, options); } void GlslangToSpv(const TIntermediate& intermediate, std::vector& spirv, spv::SpvBuildLogger* logger, SpvOptions* options) { TIntermNode* root = intermediate.getTreeRoot(); if (root == nullptr) return; SpvOptions defaultOptions; if (options == nullptr) options = &defaultOptions; GetThreadPoolAllocator().push(); TGlslangToSpvTraverser it(intermediate.getSpv().spv, &intermediate, logger, *options); root->traverse(&it); it.finishSpv(options->compileOnly); it.dumpSpv(spirv); #if ENABLE_OPT // If from HLSL, run spirv-opt to "legalize" the SPIR-V for Vulkan // eg. forward and remove memory writes of opaque types. bool prelegalization = intermediate.getSource() == EShSourceHlsl; if ((prelegalization || options->optimizeSize) && !options->disableOptimizer) { SpirvToolsTransform(intermediate, spirv, logger, options); prelegalization = false; } else if (options->stripDebugInfo) { // Strip debug info even if optimization is disabled. SpirvToolsStripDebugInfo(intermediate, spirv, logger); } if (options->validate) SpirvToolsValidate(intermediate, spirv, logger, prelegalization); if (options->disassemble) SpirvToolsDisassemble(std::cout, spirv); #endif GetThreadPoolAllocator().pop(); } } // end namespace glslang ================================================ FILE: src/libraries/glslang/SPIRV/GlslangToSpv.h ================================================ // // Copyright (C) 2014 LunarG, Inc. // Copyright (C) 2015-2018 Google, Inc. // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following // disclaimer in the documentation and/or other materials provided // with the distribution. // // Neither the name of 3Dlabs Inc. Ltd. nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. #pragma once #include #include #include "Logger.h" #include "../glslang/Include/visibility.h" namespace glslang { class TIntermediate; struct SpvOptions { bool generateDebugInfo {false}; bool stripDebugInfo {false}; bool disableOptimizer {true}; bool optimizeSize {false}; bool disassemble {false}; bool validate {false}; bool emitNonSemanticShaderDebugInfo {false}; bool emitNonSemanticShaderDebugSource{ false }; bool compileOnly{false}; bool optimizerAllowExpandedIDBound{false}; }; GLSLANG_EXPORT void GetSpirvVersion(std::string&); GLSLANG_EXPORT int GetSpirvGeneratorVersion(); GLSLANG_EXPORT void GlslangToSpv(const glslang::TIntermediate& intermediate, std::vector& spirv, SpvOptions* options = nullptr); GLSLANG_EXPORT void GlslangToSpv(const glslang::TIntermediate& intermediate, std::vector& spirv, spv::SpvBuildLogger* logger, SpvOptions* options = nullptr); GLSLANG_EXPORT bool OutputSpvBin(const std::vector& spirv, const char* baseName); GLSLANG_EXPORT bool OutputSpvHex(const std::vector& spirv, const char* baseName, const char* varName); } ================================================ FILE: src/libraries/glslang/SPIRV/InReadableOrder.cpp ================================================ // // Copyright (C) 2016 Google, Inc. // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following // disclaimer in the documentation and/or other materials provided // with the distribution. // // Neither the name of 3Dlabs Inc. Ltd. nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // The SPIR-V spec requires code blocks to appear in an order satisfying the // dominator-tree direction (ie, dominator before the dominated). This is, // actually, easy to achieve: any pre-order CFG traversal algorithm will do it. // Because such algorithms visit a block only after traversing some path to it // from the root, they necessarily visit the block's idom first. // // But not every graph-traversal algorithm outputs blocks in an order that // appears logical to human readers. The problem is that unrelated branches may // be interspersed with each other, and merge blocks may come before some of the // branches being merged. // // A good, human-readable order of blocks may be achieved by performing // depth-first search but delaying merge nodes until after all their branches // have been visited. This is implemented below by the inReadableOrder() // function. #include "spvIR.h" #include #include using spv::Block; using spv::Id; namespace { // Traverses CFG in a readable order, invoking a pre-set callback on each block. // Use by calling visit() on the root block. class ReadableOrderTraverser { public: ReadableOrderTraverser(std::function callback) : callback_(callback) {} // Visits the block if it hasn't been visited already and isn't currently // being delayed. Invokes callback(block, why, header), then descends into its // successors. Delays merge-block and continue-block processing until all // the branches have been completed. If |block| is an unreachable merge block or // an unreachable continue target, then |header| is the corresponding header block. void visit(Block* block, spv::ReachReason why, Block* header) { assert(block); if (why == spv::ReachViaControlFlow) { reachableViaControlFlow_.insert(block); } if (visited_.count(block) || delayed_.count(block)) return; callback_(block, why, header); visited_.insert(block); Block* mergeBlock = nullptr; Block* continueBlock = nullptr; auto mergeInst = block->getMergeInstruction(); if (mergeInst) { Id mergeId = mergeInst->getIdOperand(0); mergeBlock = block->getParent().getParent().getInstruction(mergeId)->getBlock(); delayed_.insert(mergeBlock); if (mergeInst->getOpCode() == spv::Op::OpLoopMerge) { Id continueId = mergeInst->getIdOperand(1); continueBlock = block->getParent().getParent().getInstruction(continueId)->getBlock(); delayed_.insert(continueBlock); } } if (why == spv::ReachViaControlFlow) { const auto& successors = block->getSuccessors(); for (auto it = successors.cbegin(); it != successors.cend(); ++it) visit(*it, why, nullptr); } if (continueBlock) { const spv::ReachReason continueWhy = (reachableViaControlFlow_.count(continueBlock) > 0) ? spv::ReachViaControlFlow : spv::ReachDeadContinue; delayed_.erase(continueBlock); visit(continueBlock, continueWhy, block); } if (mergeBlock) { const spv::ReachReason mergeWhy = (reachableViaControlFlow_.count(mergeBlock) > 0) ? spv::ReachViaControlFlow : spv::ReachDeadMerge; delayed_.erase(mergeBlock); visit(mergeBlock, mergeWhy, block); } } private: std::function callback_; // Whether a block has already been visited or is being delayed. std::unordered_set visited_, delayed_; // The set of blocks that actually are reached via control flow. std::unordered_set reachableViaControlFlow_; }; } void spv::inReadableOrder(Block* root, std::function callback) { ReadableOrderTraverser(callback).visit(root, spv::ReachViaControlFlow, nullptr); } ================================================ FILE: src/libraries/glslang/SPIRV/Logger.cpp ================================================ // // Copyright (C) 2016 Google, Inc. // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following // disclaimer in the documentation and/or other materials provided // with the distribution. // // Neither the name of Google Inc. nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. #include "Logger.h" #include #include #include namespace spv { void SpvBuildLogger::tbdFunctionality(const std::string& f) { if (std::find(std::begin(tbdFeatures), std::end(tbdFeatures), f) == std::end(tbdFeatures)) tbdFeatures.push_back(f); } void SpvBuildLogger::missingFunctionality(const std::string& f) { if (std::find(std::begin(missingFeatures), std::end(missingFeatures), f) == std::end(missingFeatures)) missingFeatures.push_back(f); } std::string SpvBuildLogger::getAllMessages() const { std::ostringstream messages; for (auto it = tbdFeatures.cbegin(); it != tbdFeatures.cend(); ++it) messages << "TBD functionality: " << *it << "\n"; for (auto it = missingFeatures.cbegin(); it != missingFeatures.cend(); ++it) messages << "Missing functionality: " << *it << "\n"; for (auto it = warnings.cbegin(); it != warnings.cend(); ++it) messages << "warning: " << *it << "\n"; for (auto it = errors.cbegin(); it != errors.cend(); ++it) messages << "error: " << *it << "\n"; return messages.str(); } } // end spv namespace ================================================ FILE: src/libraries/glslang/SPIRV/Logger.h ================================================ // // Copyright (C) 2016 Google, Inc. // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following // disclaimer in the documentation and/or other materials provided // with the distribution. // // Neither the name of Google Inc. nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. #ifndef GLSLANG_SPIRV_LOGGER_H #define GLSLANG_SPIRV_LOGGER_H #include #include #include "../glslang/Include/visibility.h" namespace spv { // A class for holding all SPIR-V build status messages, including // missing/TBD functionalities, warnings, and errors. class GLSLANG_EXPORT SpvBuildLogger { public: SpvBuildLogger() {} // Registers a TBD functionality. void tbdFunctionality(const std::string& f); // Registers a missing functionality. void missingFunctionality(const std::string& f); // Logs a warning. void warning(const std::string& w) { warnings.push_back(w); } // Logs an error. void error(const std::string& e) { errors.push_back(e); } // Returns all messages accumulated in the order of: // TBD functionalities, missing functionalities, warnings, errors. std::string getAllMessages() const; private: SpvBuildLogger(const SpvBuildLogger&); std::vector tbdFeatures; std::vector missingFeatures; std::vector warnings; std::vector errors; }; } // end spv namespace #endif // GLSLANG_SPIRV_LOGGER_H ================================================ FILE: src/libraries/glslang/SPIRV/NonSemanticDebugPrintf.h ================================================ // Copyright (c) 2020 The Khronos Group Inc. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and/or associated documentation files (the // "Materials"), to deal in the Materials without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Materials, and to // permit persons to whom the Materials are furnished to do so, subject to // the following conditions: // // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Materials. // // MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS // KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS // SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT // https://www.khronos.org/registry/ // // THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE // MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. // #ifndef SPIRV_UNIFIED1_NonSemanticDebugPrintf_H_ #define SPIRV_UNIFIED1_NonSemanticDebugPrintf_H_ #ifdef __cplusplus extern "C" { #endif enum { NonSemanticDebugPrintfRevision = 1, NonSemanticDebugPrintfRevision_BitWidthPadding = 0x7fffffff }; enum NonSemanticDebugPrintfInstructions { NonSemanticDebugPrintfDebugPrintf = 1, NonSemanticDebugPrintfInstructionsMax = 0x7fffffff }; #ifdef __cplusplus } #endif #endif // SPIRV_UNIFIED1_NonSemanticDebugPrintf_H_ ================================================ FILE: src/libraries/glslang/SPIRV/NonSemanticShaderDebugInfo100.h ================================================ // Copyright (c) 2018 The Khronos Group Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and/or associated documentation files (the "Materials"), // to deal in the Materials without restriction, including without limitation // the rights to use, copy, modify, merge, publish, distribute, sublicense, // and/or sell copies of the Materials, and to permit persons to whom the // Materials are furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Materials. // // MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS // STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND // HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/ // // THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING // FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS // IN THE MATERIALS. #ifndef SPIRV_UNIFIED1_NonSemanticShaderDebugInfo100_H_ #define SPIRV_UNIFIED1_NonSemanticShaderDebugInfo100_H_ #ifdef __cplusplus extern "C" { #endif enum { NonSemanticShaderDebugInfo100Version = 100, NonSemanticShaderDebugInfo100Version_BitWidthPadding = 0x7fffffff }; enum { NonSemanticShaderDebugInfo100Revision = 6, NonSemanticShaderDebugInfo100Revision_BitWidthPadding = 0x7fffffff }; enum NonSemanticShaderDebugInfo100Instructions { NonSemanticShaderDebugInfo100DebugInfoNone = 0, NonSemanticShaderDebugInfo100DebugCompilationUnit = 1, NonSemanticShaderDebugInfo100DebugTypeBasic = 2, NonSemanticShaderDebugInfo100DebugTypePointer = 3, NonSemanticShaderDebugInfo100DebugTypeQualifier = 4, NonSemanticShaderDebugInfo100DebugTypeArray = 5, NonSemanticShaderDebugInfo100DebugTypeVector = 6, NonSemanticShaderDebugInfo100DebugTypedef = 7, NonSemanticShaderDebugInfo100DebugTypeFunction = 8, NonSemanticShaderDebugInfo100DebugTypeEnum = 9, NonSemanticShaderDebugInfo100DebugTypeComposite = 10, NonSemanticShaderDebugInfo100DebugTypeMember = 11, NonSemanticShaderDebugInfo100DebugTypeInheritance = 12, NonSemanticShaderDebugInfo100DebugTypePtrToMember = 13, NonSemanticShaderDebugInfo100DebugTypeTemplate = 14, NonSemanticShaderDebugInfo100DebugTypeTemplateParameter = 15, NonSemanticShaderDebugInfo100DebugTypeTemplateTemplateParameter = 16, NonSemanticShaderDebugInfo100DebugTypeTemplateParameterPack = 17, NonSemanticShaderDebugInfo100DebugGlobalVariable = 18, NonSemanticShaderDebugInfo100DebugFunctionDeclaration = 19, NonSemanticShaderDebugInfo100DebugFunction = 20, NonSemanticShaderDebugInfo100DebugLexicalBlock = 21, NonSemanticShaderDebugInfo100DebugLexicalBlockDiscriminator = 22, NonSemanticShaderDebugInfo100DebugScope = 23, NonSemanticShaderDebugInfo100DebugNoScope = 24, NonSemanticShaderDebugInfo100DebugInlinedAt = 25, NonSemanticShaderDebugInfo100DebugLocalVariable = 26, NonSemanticShaderDebugInfo100DebugInlinedVariable = 27, NonSemanticShaderDebugInfo100DebugDeclare = 28, NonSemanticShaderDebugInfo100DebugValue = 29, NonSemanticShaderDebugInfo100DebugOperation = 30, NonSemanticShaderDebugInfo100DebugExpression = 31, NonSemanticShaderDebugInfo100DebugMacroDef = 32, NonSemanticShaderDebugInfo100DebugMacroUndef = 33, NonSemanticShaderDebugInfo100DebugImportedEntity = 34, NonSemanticShaderDebugInfo100DebugSource = 35, NonSemanticShaderDebugInfo100DebugFunctionDefinition = 101, NonSemanticShaderDebugInfo100DebugSourceContinued = 102, NonSemanticShaderDebugInfo100DebugLine = 103, NonSemanticShaderDebugInfo100DebugNoLine = 104, NonSemanticShaderDebugInfo100DebugBuildIdentifier = 105, NonSemanticShaderDebugInfo100DebugStoragePath = 106, NonSemanticShaderDebugInfo100DebugEntryPoint = 107, NonSemanticShaderDebugInfo100DebugTypeMatrix = 108, NonSemanticShaderDebugInfo100InstructionsMax = 0x7fffffff }; enum NonSemanticShaderDebugInfo100DebugInfoFlags { NonSemanticShaderDebugInfo100None = 0x0000, NonSemanticShaderDebugInfo100FlagIsProtected = 0x01, NonSemanticShaderDebugInfo100FlagIsPrivate = 0x02, NonSemanticShaderDebugInfo100FlagIsPublic = 0x03, NonSemanticShaderDebugInfo100FlagIsLocal = 0x04, NonSemanticShaderDebugInfo100FlagIsDefinition = 0x08, NonSemanticShaderDebugInfo100FlagFwdDecl = 0x10, NonSemanticShaderDebugInfo100FlagArtificial = 0x20, NonSemanticShaderDebugInfo100FlagExplicit = 0x40, NonSemanticShaderDebugInfo100FlagPrototyped = 0x80, NonSemanticShaderDebugInfo100FlagObjectPointer = 0x100, NonSemanticShaderDebugInfo100FlagStaticMember = 0x200, NonSemanticShaderDebugInfo100FlagIndirectVariable = 0x400, NonSemanticShaderDebugInfo100FlagLValueReference = 0x800, NonSemanticShaderDebugInfo100FlagRValueReference = 0x1000, NonSemanticShaderDebugInfo100FlagIsOptimized = 0x2000, NonSemanticShaderDebugInfo100FlagIsEnumClass = 0x4000, NonSemanticShaderDebugInfo100FlagTypePassByValue = 0x8000, NonSemanticShaderDebugInfo100FlagTypePassByReference = 0x10000, NonSemanticShaderDebugInfo100FlagUnknownPhysicalLayout = 0x20000, NonSemanticShaderDebugInfo100DebugInfoFlagsMax = 0x7fffffff }; enum NonSemanticShaderDebugInfo100BuildIdentifierFlags { NonSemanticShaderDebugInfo100IdentifierPossibleDuplicates = 0x01, NonSemanticShaderDebugInfo100BuildIdentifierFlagsMax = 0x7fffffff }; enum NonSemanticShaderDebugInfo100DebugBaseTypeAttributeEncoding { NonSemanticShaderDebugInfo100Unspecified = 0, NonSemanticShaderDebugInfo100Address = 1, NonSemanticShaderDebugInfo100Boolean = 2, NonSemanticShaderDebugInfo100Float = 3, NonSemanticShaderDebugInfo100Signed = 4, NonSemanticShaderDebugInfo100SignedChar = 5, NonSemanticShaderDebugInfo100Unsigned = 6, NonSemanticShaderDebugInfo100UnsignedChar = 7, NonSemanticShaderDebugInfo100DebugBaseTypeAttributeEncodingMax = 0x7fffffff }; enum NonSemanticShaderDebugInfo100DebugCompositeType { NonSemanticShaderDebugInfo100Class = 0, NonSemanticShaderDebugInfo100Structure = 1, NonSemanticShaderDebugInfo100Union = 2, NonSemanticShaderDebugInfo100DebugCompositeTypeMax = 0x7fffffff }; enum NonSemanticShaderDebugInfo100DebugTypeQualifier { NonSemanticShaderDebugInfo100ConstType = 0, NonSemanticShaderDebugInfo100VolatileType = 1, NonSemanticShaderDebugInfo100RestrictType = 2, NonSemanticShaderDebugInfo100AtomicType = 3, NonSemanticShaderDebugInfo100DebugTypeQualifierMax = 0x7fffffff }; enum NonSemanticShaderDebugInfo100DebugOperation { NonSemanticShaderDebugInfo100Deref = 0, NonSemanticShaderDebugInfo100Plus = 1, NonSemanticShaderDebugInfo100Minus = 2, NonSemanticShaderDebugInfo100PlusUconst = 3, NonSemanticShaderDebugInfo100BitPiece = 4, NonSemanticShaderDebugInfo100Swap = 5, NonSemanticShaderDebugInfo100Xderef = 6, NonSemanticShaderDebugInfo100StackValue = 7, NonSemanticShaderDebugInfo100Constu = 8, NonSemanticShaderDebugInfo100Fragment = 9, NonSemanticShaderDebugInfo100DebugOperationMax = 0x7fffffff }; enum NonSemanticShaderDebugInfo100DebugImportedEntity { NonSemanticShaderDebugInfo100ImportedModule = 0, NonSemanticShaderDebugInfo100ImportedDeclaration = 1, NonSemanticShaderDebugInfo100DebugImportedEntityMax = 0x7fffffff }; #ifdef __cplusplus } #endif #endif // SPIRV_UNIFIED1_NonSemanticShaderDebugInfo100_H_ ================================================ FILE: src/libraries/glslang/SPIRV/SPVRemapper.cpp ================================================ // // Copyright (C) 2015 LunarG, Inc. // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following // disclaimer in the documentation and/or other materials provided // with the distribution. // // Neither the name of 3Dlabs Inc. Ltd. nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // #include "SPVRemapper.h" #include "doc.h" #include "spvUtil.h" #include #include namespace spv { // By default, just abort on error. Can be overridden via RegisterErrorHandler spirvbin_t::errorfn_t spirvbin_t::errorHandler = [](const std::string&) { exit(5); }; // By default, eat log messages. Can be overridden via RegisterLogHandler spirvbin_t::logfn_t spirvbin_t::logHandler = [](const std::string&) { }; // This can be overridden to provide other message behavior if needed void spirvbin_t::msg(int minVerbosity, int indent, const std::string& txt) const { if (verbose >= minVerbosity) logHandler(std::string(indent, ' ') + txt); } // hash opcode, with special handling for OpExtInst std::uint32_t spirvbin_t::asOpCodeHash(unsigned word) { const spv::Op opCode = asOpCode(word); std::uint32_t offset = 0; switch (opCode) { case spv::Op::OpExtInst: offset += asId(word + 4); break; default: break; } return ((unsigned)opCode) * 19 + offset; // 19 = small prime } spirvbin_t::range_t spirvbin_t::literalRange(spv::Op opCode) const { static const int maxCount = 1<<30; switch (opCode) { case spv::Op::OpTypeFloat: // fall through... case spv::Op::OpTypePointer: return range_t(2, 3); case spv::Op::OpTypeInt: return range_t(2, 4); // TODO: case spv::OpTypeImage: // TODO: case spv::OpTypeSampledImage: case spv::Op::OpTypeSampler: return range_t(3, 8); case spv::Op::OpTypeVector: // fall through case spv::Op::OpTypeMatrix: // ... case spv::Op::OpTypePipe: return range_t(3, 4); case spv::Op::OpConstant: return range_t(3, maxCount); default: return range_t(0, 0); } } spirvbin_t::range_t spirvbin_t::typeRange(spv::Op opCode) const { static const int maxCount = 1<<30; if (isConstOp(opCode)) return range_t(1, 2); switch (opCode) { case spv::Op::OpTypeVector: // fall through case spv::Op::OpTypeMatrix: // ... case spv::Op::OpTypeSampler: // ... case spv::Op::OpTypeArray: // ... case spv::Op::OpTypeRuntimeArray: // ... case spv::Op::OpTypePipe: return range_t(2, 3); case spv::Op::OpTypeStruct: // fall through case spv::Op::OpTypeFunction: return range_t(2, maxCount); case spv::Op::OpTypePointer: return range_t(3, 4); default: return range_t(0, 0); } } spirvbin_t::range_t spirvbin_t::constRange(spv::Op opCode) const { static const int maxCount = 1<<30; switch (opCode) { case spv::Op::OpTypeArray: // fall through... case spv::Op::OpTypeRuntimeArray: return range_t(3, 4); case spv::Op::OpConstantComposite: return range_t(3, maxCount); default: return range_t(0, 0); } } // Return the size of a type in 32-bit words. This currently only // handles ints and floats, and is only invoked by queries which must be // integer types. If ever needed, it can be generalized. unsigned spirvbin_t::typeSizeInWords(spv::Id id) const { const unsigned typeStart = idPos(id); const spv::Op opCode = asOpCode(typeStart); if (errorLatch) return 0; switch (opCode) { case spv::Op::OpTypeInt: // fall through... case spv::Op::OpTypeFloat: return (spv[typeStart + 2] + 31) / 32; default: return 0; } } // Looks up the type of a given const or variable ID, and // returns its size in 32-bit words. unsigned spirvbin_t::idTypeSizeInWords(spv::Id id) const { const auto tid_it = idTypeSizeMap.find(id); if (tid_it == idTypeSizeMap.end()) { error("type size for ID not found"); return 0; } return tid_it->second; } // Is this an opcode we should remove when using --strip? bool spirvbin_t::isStripOp(spv::Op opCode, unsigned start) const { switch (opCode) { case spv::Op::OpSource: case spv::Op::OpSourceExtension: case spv::Op::OpName: case spv::Op::OpMemberName: case spv::Op::OpLine: { const std::string name = literalString(start + 2); std::vector::const_iterator it; for (it = stripWhiteList.begin(); it < stripWhiteList.end(); it++) { if (name.find(*it) != std::string::npos) { return false; } } return true; } default : return false; } } // Return true if this opcode is flow control bool spirvbin_t::isFlowCtrl(spv::Op opCode) const { switch (opCode) { case spv::Op::OpBranchConditional: case spv::Op::OpBranch: case spv::Op::OpSwitch: case spv::Op::OpLoopMerge: case spv::Op::OpSelectionMerge: case spv::Op::OpLabel: case spv::Op::OpFunction: case spv::Op::OpFunctionEnd: return true; default: return false; } } // Return true if this opcode defines a type bool spirvbin_t::isTypeOp(spv::Op opCode) const { switch (opCode) { case spv::Op::OpTypeVoid: case spv::Op::OpTypeBool: case spv::Op::OpTypeInt: case spv::Op::OpTypeFloat: case spv::Op::OpTypeVector: case spv::Op::OpTypeMatrix: case spv::Op::OpTypeImage: case spv::Op::OpTypeSampler: case spv::Op::OpTypeArray: case spv::Op::OpTypeRuntimeArray: case spv::Op::OpTypeStruct: case spv::Op::OpTypeOpaque: case spv::Op::OpTypePointer: case spv::Op::OpTypeFunction: case spv::Op::OpTypeEvent: case spv::Op::OpTypeDeviceEvent: case spv::Op::OpTypeReserveId: case spv::Op::OpTypeQueue: case spv::Op::OpTypeSampledImage: case spv::Op::OpTypePipe: return true; default: return false; } } // Return true if this opcode defines a constant bool spirvbin_t::isConstOp(spv::Op opCode) const { switch (opCode) { case spv::Op::OpConstantSampler: error("unimplemented constant type"); return true; case spv::Op::OpConstantNull: case spv::Op::OpConstantTrue: case spv::Op::OpConstantFalse: case spv::Op::OpConstantComposite: case spv::Op::OpConstant: return true; default: return false; } } const auto inst_fn_nop = [](spv::Op, unsigned) { return false; }; const auto op_fn_nop = [](spv::Id&) { }; // g++ doesn't like these defined in the class proper in an anonymous namespace. // Dunno why. Also MSVC doesn't like the constexpr keyword. Also dunno why. // Defining them externally seems to please both compilers, so, here they are. const spv::Id spirvbin_t::unmapped = spv::Id(-10000); const spv::Id spirvbin_t::unused = spv::Id(-10001); const int spirvbin_t::header_size = 5; spv::Id spirvbin_t::nextUnusedId(spv::Id id) { while (isNewIdMapped(id)) // search for an unused ID ++id; return id; } spv::Id spirvbin_t::localId(spv::Id id, spv::Id newId) { //assert(id != spv::NoResult && newId != spv::NoResult); if (id > bound()) { error(std::string("ID out of range: ") + std::to_string(id)); return spirvbin_t::unused; } if (id >= idMapL.size()) idMapL.resize(id+1, unused); if (newId != unmapped && newId != unused) { if (isOldIdUnused(id)) { error(std::string("ID unused in module: ") + std::to_string(id)); return spirvbin_t::unused; } if (!isOldIdUnmapped(id)) { error(std::string("ID already mapped: ") + std::to_string(id) + " -> " + std::to_string(localId(id))); return spirvbin_t::unused; } if (isNewIdMapped(newId)) { error(std::string("ID already used in module: ") + std::to_string(newId)); return spirvbin_t::unused; } msg(4, 4, std::string("map: ") + std::to_string(id) + " -> " + std::to_string(newId)); setMapped(newId); largestNewId = std::max(largestNewId, newId); } return idMapL[id] = newId; } // Parse a literal string from the SPIR binary and return it as an std::string // Due to C++11 RValue references, this doesn't copy the result string. std::string spirvbin_t::literalString(unsigned word) const { std::string literal; const spirword_t * pos = spv.data() + word; literal.reserve(16); do { spirword_t word = *pos; for (int i = 0; i < 4; i++) { char c = word & 0xff; if (c == '\0') return literal; literal += c; word >>= 8; } pos++; } while (true); } void spirvbin_t::applyMap() { msg(3, 2, std::string("Applying map: ")); // Map local IDs through the ID map process(inst_fn_nop, // ignore instructions [this](spv::Id& id) { id = localId(id); if (errorLatch) return; assert(id != unused && id != unmapped); } ); } // Find free IDs for anything we haven't mapped void spirvbin_t::mapRemainder() { msg(3, 2, std::string("Remapping remainder: ")); spv::Id unusedId = 1; // can't use 0: that's NoResult spirword_t maxBound = 0; for (spv::Id id = 0; id < idMapL.size(); ++id) { if (isOldIdUnused(id)) continue; // Find a new mapping for any used but unmapped IDs if (isOldIdUnmapped(id)) { localId(id, unusedId = nextUnusedId(unusedId)); if (errorLatch) return; } if (isOldIdUnmapped(id)) { error(std::string("old ID not mapped: ") + std::to_string(id)); return; } // Track max bound maxBound = std::max(maxBound, localId(id) + 1); if (errorLatch) return; } bound(maxBound); // reset header ID bound to as big as it now needs to be } // Mark debug instructions for stripping void spirvbin_t::stripDebug() { // Strip instructions in the stripOp set: debug info. process( [&](spv::Op opCode, unsigned start) { // remember opcodes we want to strip later if (isStripOp(opCode, start)) stripInst(start); return true; }, op_fn_nop); } // Mark instructions that refer to now-removed IDs for stripping void spirvbin_t::stripDeadRefs() { process( [&](spv::Op opCode, unsigned start) { // strip opcodes pointing to removed data switch (opCode) { case spv::Op::OpName: case spv::Op::OpMemberName: case spv::Op::OpDecorate: case spv::Op::OpMemberDecorate: if (idPosR.find(asId(start+1)) == idPosR.end()) stripInst(start); break; default: break; // leave it alone } return true; }, op_fn_nop); strip(); } // Update local maps of ID, type, etc positions void spirvbin_t::buildLocalMaps() { msg(2, 2, std::string("build local maps: ")); mapped.clear(); idMapL.clear(); // preserve nameMap, so we don't clear that. fnPos.clear(); fnCalls.clear(); typeConstPos.clear(); idPosR.clear(); entryPoint = spv::NoResult; largestNewId = 0; idMapL.resize(bound(), unused); int fnStart = 0; spv::Id fnRes = spv::NoResult; // build local Id and name maps process( [&](spv::Op opCode, unsigned start) { unsigned word = start+1; spv::Id typeId = spv::NoResult; if (spv::InstructionDesc[enumCast(opCode)].hasType()) typeId = asId(word++); // If there's a result ID, remember the size of its type if (spv::InstructionDesc[enumCast(opCode)].hasResult()) { const spv::Id resultId = asId(word++); idPosR[resultId] = start; if (typeId != spv::NoResult) { const unsigned idTypeSize = typeSizeInWords(typeId); if (errorLatch) return false; if (idTypeSize != 0) idTypeSizeMap[resultId] = idTypeSize; } } if (opCode == spv::Op::OpName) { const spv::Id target = asId(start+1); const std::string name = literalString(start+2); nameMap[name] = target; } else if (opCode == spv::Op::OpFunctionCall) { ++fnCalls[asId(start + 3)]; } else if (opCode == spv::Op::OpEntryPoint) { entryPoint = asId(start + 2); } else if (opCode == spv::Op::OpFunction) { if (fnStart != 0) { error("nested function found"); return false; } fnStart = start; fnRes = asId(start + 2); } else if (opCode == spv::Op::OpFunctionEnd) { assert(fnRes != spv::NoResult); if (fnStart == 0) { error("function end without function start"); return false; } fnPos[fnRes] = range_t(fnStart, start + asWordCount(start)); fnStart = 0; } else if (isConstOp(opCode)) { if (errorLatch) return false; assert(asId(start + 2) != spv::NoResult); typeConstPos.insert(start); } else if (isTypeOp(opCode)) { assert(asId(start + 1) != spv::NoResult); typeConstPos.insert(start); } return false; }, [this](spv::Id& id) { localId(id, unmapped); } ); } // Validate the SPIR header void spirvbin_t::validate() const { msg(2, 2, std::string("validating: ")); if (spv.size() < header_size) { error("file too short: "); return; } if (magic() != spv::MagicNumber) { error("bad magic number"); return; } // field 1 = version // field 2 = generator magic // field 3 = result bound if (schemaNum() != 0) { error("bad schema, must be 0"); return; } } int spirvbin_t::processInstruction(unsigned word, instfn_t instFn, idfn_t idFn) { const auto instructionStart = word; const unsigned wordCount = asWordCount(instructionStart); const int nextInst = word++ + wordCount; spv::Op opCode = asOpCode(instructionStart); if (nextInst > int(spv.size())) { error("spir instruction terminated too early"); return -1; } // Base for computing number of operands; will be updated as more is learned unsigned numOperands = wordCount - 1; if (instFn(opCode, instructionStart)) return nextInst; // Read type and result ID from instruction desc table if (spv::InstructionDesc[enumCast(opCode)].hasType()) { idFn(asId(word++)); --numOperands; } if (spv::InstructionDesc[enumCast(opCode)].hasResult()) { idFn(asId(word++)); --numOperands; } // Extended instructions: currently, assume everything is an ID. // TODO: add whatever data we need for exceptions to that if (opCode == spv::Op::OpExtInst) { idFn(asId(word)); // Instruction set is an ID that also needs to be mapped word += 2; // instruction set, and instruction from set numOperands -= 2; for (unsigned op=0; op < numOperands; ++op) idFn(asId(word++)); // ID return nextInst; } // Circular buffer so we can look back at previous unmapped values during the mapping pass. static const unsigned idBufferSize = 4; spv::Id idBuffer[idBufferSize]; unsigned idBufferPos = 0; // Store IDs from instruction in our map for (int op = 0; numOperands > 0; ++op, --numOperands) { // SpecConstantOp is special: it includes the operands of another opcode which is // given as a literal in the 3rd word. We will switch over to pretending that the // opcode being processed is the literal opcode value of the SpecConstantOp. See the // SPIRV spec for details. This way we will handle IDs and literals as appropriate for // the embedded op. if (opCode == spv::Op::OpSpecConstantOp) { if (op == 0) { opCode = asOpCode(word++); // this is the opcode embedded in the SpecConstantOp. --numOperands; } } switch (spv::InstructionDesc[enumCast(opCode)].operands.getClass(op)) { case spv::OperandId: case spv::OperandScope: case spv::OperandMemorySemantics: idBuffer[idBufferPos] = asId(word); idBufferPos = (idBufferPos + 1) % idBufferSize; idFn(asId(word++)); break; case spv::OperandVariableIds: for (unsigned i = 0; i < numOperands; ++i) idFn(asId(word++)); return nextInst; case spv::OperandVariableLiterals: // for clarity // if (opCode == spv::OpDecorate && asDecoration(word - 1) == spv::DecorationBuiltIn) { // ++word; // --numOperands; // } // word += numOperands; return nextInst; case spv::OperandVariableLiteralId: { if (opCode == Op::OpSwitch) { // word-2 is the position of the selector ID. OpSwitch Literals match its type. // In case the IDs are currently being remapped, we get the word[-2] ID from // the circular idBuffer. const unsigned literalSizePos = (idBufferPos+idBufferSize-2) % idBufferSize; const unsigned literalSize = idTypeSizeInWords(idBuffer[literalSizePos]); const unsigned numLiteralIdPairs = (nextInst-word) / (1+literalSize); if (errorLatch) return -1; for (unsigned arg=0; arg instPos; instPos.reserve(unsigned(spv.size()) / 16); // initial estimate; can grow if needed. // Build local table of instruction start positions process( [&](spv::Op, unsigned start) { instPos.push_back(start); return true; }, op_fn_nop); if (errorLatch) return; // Window size for context-sensitive canonicalization values // Empirical best size from a single data set. TODO: Would be a good tunable. // We essentially perform a little convolution around each instruction, // to capture the flavor of nearby code, to hopefully match to similar // code in other modules. static const unsigned windowSize = 2; for (unsigned entry = 0; entry < unsigned(instPos.size()); ++entry) { const unsigned start = instPos[entry]; const spv::Op opCode = asOpCode(start); if (opCode == spv::Op::OpFunction) fnId = asId(start + 2); if (opCode == spv::Op::OpFunctionEnd) fnId = spv::NoResult; if (fnId != spv::NoResult) { // if inside a function if (spv::InstructionDesc[enumCast(opCode)].hasResult()) { const unsigned word = start + (spv::InstructionDesc[enumCast(opCode)].hasType() ? 2 : 1); const spv::Id resId = asId(word); std::uint32_t hashval = fnId * 17; // small prime for (unsigned i = entry-1; i >= entry-windowSize; --i) { if (asOpCode(instPos[i]) == spv::Op::OpFunction) break; hashval = hashval * 30103 + asOpCodeHash(instPos[i]); // 30103 = semiarbitrary prime } for (unsigned i = entry; i <= entry + windowSize; ++i) { if (asOpCode(instPos[i]) == spv::Op::OpFunctionEnd) break; hashval = hashval * 30103 + asOpCodeHash(instPos[i]); // 30103 = semiarbitrary prime } if (isOldIdUnmapped(resId)) { localId(resId, nextUnusedId(hashval % softTypeIdLimit + firstMappedID)); if (errorLatch) return; } } } } spv::Op thisOpCode(spv::Op::OpNop); std::unordered_map opCounter; int idCounter(0); fnId = spv::NoResult; process( [&](spv::Op opCode, unsigned start) { switch (opCode) { case spv::Op::OpFunction: // Reset counters at each function idCounter = 0; opCounter.clear(); fnId = asId(start + 2); break; case spv::Op::OpImageSampleImplicitLod: case spv::Op::OpImageSampleExplicitLod: case spv::Op::OpImageSampleDrefImplicitLod: case spv::Op::OpImageSampleDrefExplicitLod: case spv::Op::OpImageSampleProjImplicitLod: case spv::Op::OpImageSampleProjExplicitLod: case spv::Op::OpImageSampleProjDrefImplicitLod: case spv::Op::OpImageSampleProjDrefExplicitLod: case spv::Op::OpDot: case spv::Op::OpCompositeExtract: case spv::Op::OpCompositeInsert: case spv::Op::OpVectorShuffle: case spv::Op::OpLabel: case spv::Op::OpVariable: case spv::Op::OpAccessChain: case spv::Op::OpLoad: case spv::Op::OpStore: case spv::Op::OpCompositeConstruct: case spv::Op::OpFunctionCall: ++opCounter[enumCast(opCode)]; idCounter = 0; thisOpCode = opCode; break; default: thisOpCode = spv::Op::OpNop; } return false; }, [&](spv::Id& id) { if (thisOpCode != spv::Op::OpNop) { ++idCounter; const std::uint32_t hashval = // Explicitly cast operands to unsigned int to avoid integer // promotion to signed int followed by integer overflow, // which would result in undefined behavior. static_cast(opCounter[enumCast(thisOpCode)]) * enumCast(thisOpCode) * 50047 + idCounter + static_cast(fnId) * 117; if (isOldIdUnmapped(id)) localId(id, nextUnusedId(hashval % softTypeIdLimit + firstMappedID)); } }); } // EXPERIMENTAL: forward IO and uniform load/stores into operands // This produces invalid Schema-0 SPIRV void spirvbin_t::forwardLoadStores() { idset_t fnLocalVars; // set of function local vars idmap_t idMap; // Map of load result IDs to what they load // EXPERIMENTAL: Forward input and access chain loads into consumptions process( [&](spv::Op opCode, unsigned start) { // Add inputs and uniforms to the map if ((opCode == spv::Op::OpVariable && asWordCount(start) == 4) && (spv[start+3] == (unsigned)spv::StorageClass::Uniform || spv[start+3] == (unsigned)spv::StorageClass::UniformConstant || spv[start+3] == (unsigned)spv::StorageClass::Input)) fnLocalVars.insert(asId(start+2)); if (opCode == spv::Op::OpAccessChain && fnLocalVars.count(asId(start+3)) > 0) fnLocalVars.insert(asId(start+2)); if (opCode == spv::Op::OpLoad && fnLocalVars.count(asId(start+3)) > 0) { idMap[asId(start+2)] = asId(start+3); stripInst(start); } return false; }, [&](spv::Id& id) { if (idMap.find(id) != idMap.end()) id = idMap[id]; } ); if (errorLatch) return; // EXPERIMENTAL: Implicit output stores fnLocalVars.clear(); idMap.clear(); process( [&](spv::Op opCode, unsigned start) { // Add inputs and uniforms to the map if ((opCode == spv::Op::OpVariable && asWordCount(start) == 4) && (spv[start+3] == (int)spv::StorageClass::Output)) fnLocalVars.insert(asId(start+2)); if (opCode == spv::Op::OpStore && fnLocalVars.count(asId(start+1)) > 0) { idMap[asId(start+2)] = asId(start+1); stripInst(start); } return false; }, op_fn_nop); if (errorLatch) return; process( inst_fn_nop, [&](spv::Id& id) { if (idMap.find(id) != idMap.end()) id = idMap[id]; } ); if (errorLatch) return; strip(); // strip out data we decided to eliminate } // optimize loads and stores void spirvbin_t::optLoadStore() { idset_t fnLocalVars; // candidates for removal (only locals) idmap_t idMap; // Map of load result IDs to what they load blockmap_t blockMap; // Map of IDs to blocks they first appear in int blockNum = 0; // block count, to avoid crossing flow control // Find all the function local pointers stored at most once, and not via access chains process( [&](spv::Op opCode, unsigned start) { const int wordCount = asWordCount(start); // Count blocks, so we can avoid crossing flow control if (isFlowCtrl(opCode)) ++blockNum; // Add local variables to the map if ((opCode == spv::Op::OpVariable && spv[start+3] == (unsigned)spv::StorageClass::Function && asWordCount(start) == 4)) { fnLocalVars.insert(asId(start+2)); return true; } // Ignore process vars referenced via access chain if ((opCode == spv::Op::OpAccessChain || opCode == spv::Op::OpInBoundsAccessChain) && fnLocalVars.count(asId(start+3)) > 0) { fnLocalVars.erase(asId(start+3)); idMap.erase(asId(start+3)); return true; } if (opCode == spv::Op::OpLoad && fnLocalVars.count(asId(start + 3)) > 0) { const spv::Id varId = asId(start+3); // Avoid loads before stores if (idMap.find(varId) == idMap.end()) { fnLocalVars.erase(varId); idMap.erase(varId); } // don't do for volatile references if (wordCount > 4 && (spv[start+4] & spv::MemoryAccessMask::Volatile)) { fnLocalVars.erase(varId); idMap.erase(varId); } // Handle flow control if (blockMap.find(varId) == blockMap.end()) { blockMap[varId] = blockNum; // track block we found it in. } else if (blockMap[varId] != blockNum) { fnLocalVars.erase(varId); // Ignore if crosses flow control idMap.erase(varId); } return true; } if (opCode == spv::Op::OpStore && fnLocalVars.count(asId(start+1)) > 0) { const spv::Id varId = asId(start+1); if (idMap.find(varId) == idMap.end()) { idMap[varId] = asId(start+2); } else { // Remove if it has more than one store to the same pointer fnLocalVars.erase(varId); idMap.erase(varId); } // don't do for volatile references if (wordCount > 3 && (spv[start+3] & spv::MemoryAccessMask::Volatile)) { fnLocalVars.erase(asId(start+3)); idMap.erase(asId(start+3)); } // Handle flow control if (blockMap.find(varId) == blockMap.end()) { blockMap[varId] = blockNum; // track block we found it in. } else if (blockMap[varId] != blockNum) { fnLocalVars.erase(varId); // Ignore if crosses flow control idMap.erase(varId); } return true; } return false; }, // If local var id used anywhere else, don't eliminate [&](spv::Id& id) { if (fnLocalVars.count(id) > 0) { fnLocalVars.erase(id); idMap.erase(id); } } ); if (errorLatch) return; process( [&](spv::Op opCode, unsigned start) { if (opCode == spv::Op::OpLoad && fnLocalVars.count(asId(start+3)) > 0) idMap[asId(start+2)] = idMap[asId(start+3)]; return false; }, op_fn_nop); if (errorLatch) return; // Chase replacements to their origins, in case there is a chain such as: // 2 = store 1 // 3 = load 2 // 4 = store 3 // 5 = load 4 // We want to replace uses of 5 with 1. for (const auto& idPair : idMap) { spv::Id id = idPair.first; while (idMap.find(id) != idMap.end()) // Chase to end of chain id = idMap[id]; idMap[idPair.first] = id; // replace with final result } // Remove the load/store/variables for the ones we've discovered process( [&](spv::Op opCode, unsigned start) { if ((opCode == spv::Op::OpLoad && fnLocalVars.count(asId(start+3)) > 0) || (opCode == spv::Op::OpStore && fnLocalVars.count(asId(start+1)) > 0) || (opCode == spv::Op::OpVariable && fnLocalVars.count(asId(start+2)) > 0)) { stripInst(start); return true; } return false; }, [&](spv::Id& id) { if (idMap.find(id) != idMap.end()) id = idMap[id]; } ); if (errorLatch) return; strip(); // strip out data we decided to eliminate } // remove bodies of uncalled functions void spirvbin_t::dceFuncs() { msg(3, 2, std::string("Removing Dead Functions: ")); // TODO: There are more efficient ways to do this. bool changed = true; while (changed) { changed = false; for (auto fn = fnPos.begin(); fn != fnPos.end(); ) { if (fn->first == entryPoint) { // don't DCE away the entry point! ++fn; continue; } const auto call_it = fnCalls.find(fn->first); if (call_it == fnCalls.end() || call_it->second == 0) { changed = true; stripRange.push_back(fn->second); // decrease counts of called functions process( [&](spv::Op opCode, unsigned start) { if (opCode == spv::Op::OpFunctionCall) { const auto call_it = fnCalls.find(asId(start + 3)); if (call_it != fnCalls.end()) { if (--call_it->second <= 0) fnCalls.erase(call_it); } } return true; }, op_fn_nop, fn->second.first, fn->second.second); if (errorLatch) return; fn = fnPos.erase(fn); } else ++fn; } } } // remove unused function variables + decorations void spirvbin_t::dceVars() { msg(3, 2, std::string("DCE Vars: ")); std::unordered_map varUseCount; // Count function variable use process( [&](spv::Op opCode, unsigned start) { if (opCode == spv::Op::OpVariable) { ++varUseCount[asId(start+2)]; return true; } else if (opCode == spv::Op::OpEntryPoint) { const int wordCount = asWordCount(start); for (int i = 4; i < wordCount; i++) { ++varUseCount[asId(start+i)]; } return true; } else return false; }, [&](spv::Id& id) { if (varUseCount[id]) ++varUseCount[id]; } ); if (errorLatch) return; // Remove single-use function variables + associated decorations and names process( [&](spv::Op opCode, unsigned start) { spv::Id id = spv::NoResult; if (opCode == spv::Op::OpVariable) id = asId(start+2); if (opCode == spv::Op::OpDecorate || opCode == spv::Op::OpName) id = asId(start+1); if (id != spv::NoResult && varUseCount[id] == 1) stripInst(start); return true; }, op_fn_nop); } // remove unused types void spirvbin_t::dceTypes() { std::vector isType(bound(), false); // for speed, make O(1) way to get to type query (map is log(n)) for (const auto typeStart : typeConstPos) isType[asTypeConstId(typeStart)] = true; std::unordered_map typeUseCount; // This is not the most efficient algorithm, but this is an offline tool, and // it's easy to write this way. Can be improved opportunistically if needed. bool changed = true; while (changed) { changed = false; strip(); typeUseCount.clear(); // Count total type usage process(inst_fn_nop, [&](spv::Id& id) { if (isType[id]) ++typeUseCount[id]; } ); if (errorLatch) return; // Remove single reference types for (const auto typeStart : typeConstPos) { const spv::Id typeId = asTypeConstId(typeStart); if (typeUseCount[typeId] == 1) { changed = true; --typeUseCount[typeId]; stripInst(typeStart); } } if (errorLatch) return; } } #ifdef NOTDEF bool spirvbin_t::matchType(const spirvbin_t::globaltypes_t& globalTypes, spv::Id lt, spv::Id gt) const { // Find the local type id "lt" and global type id "gt" const auto lt_it = typeConstPosR.find(lt); if (lt_it == typeConstPosR.end()) return false; const auto typeStart = lt_it->second; // Search for entry in global table const auto gtype = globalTypes.find(gt); if (gtype == globalTypes.end()) return false; const auto& gdata = gtype->second; // local wordcount and opcode const int wordCount = asWordCount(typeStart); const spv::Op opCode = asOpCode(typeStart); // no type match if opcodes don't match, or operand count doesn't match if (opCode != opOpCode(gdata[0]) || wordCount != opWordCount(gdata[0])) return false; const unsigned numOperands = wordCount - 2; // all types have a result const auto cmpIdRange = [&](range_t range) { for (int x=range.first; xsecond; } // Hash types to canonical values. This can return ID collisions (it's a bit // inevitable): it's up to the caller to handle that gracefully. std::uint32_t spirvbin_t::hashType(unsigned typeStart) const { const unsigned wordCount = asWordCount(typeStart); const spv::Op opCode = asOpCode(typeStart); switch (opCode) { case spv::Op::OpTypeVoid: return 0; case spv::Op::OpTypeBool: return 1; case spv::Op::OpTypeInt: return 3 + (spv[typeStart+3]); case spv::Op::OpTypeFloat: return 5; case spv::Op::OpTypeVector: return 6 + hashType(idPos(spv[typeStart+2])) * (spv[typeStart+3] - 1); case spv::Op::OpTypeMatrix: return 30 + hashType(idPos(spv[typeStart+2])) * (spv[typeStart+3] - 1); case spv::Op::OpTypeImage: return 120 + hashType(idPos(spv[typeStart+2])) + spv[typeStart+3] + // dimensionality spv[typeStart+4] * 8 * 16 + // depth spv[typeStart+5] * 4 * 16 + // arrayed spv[typeStart+6] * 2 * 16 + // multisampled spv[typeStart+7] * 1 * 16; // format case spv::Op::OpTypeSampler: return 500; case spv::Op::OpTypeSampledImage: return 502; case spv::Op::OpTypeArray: return 501 + hashType(idPos(spv[typeStart+2])) * spv[typeStart+3]; case spv::Op::OpTypeRuntimeArray: return 5000 + hashType(idPos(spv[typeStart+2])); case spv::Op::OpTypeStruct: { std::uint32_t hash = 10000; for (unsigned w=2; w < wordCount; ++w) hash += w * hashType(idPos(spv[typeStart+w])); return hash; } case spv::Op::OpTypeOpaque: return 6000 + spv[typeStart+2]; case spv::Op::OpTypePointer: return 100000 + hashType(idPos(spv[typeStart+3])); case spv::Op::OpTypeFunction: { std::uint32_t hash = 200000; for (unsigned w=2; w < wordCount; ++w) hash += w * hashType(idPos(spv[typeStart+w])); return hash; } case spv::Op::OpTypeEvent: return 300000; case spv::Op::OpTypeDeviceEvent: return 300001; case spv::Op::OpTypeReserveId: return 300002; case spv::Op::OpTypeQueue: return 300003; case spv::Op::OpTypePipe: return 300004; case spv::Op::OpConstantTrue: return 300007; case spv::Op::OpConstantFalse: return 300008; case spv::Op::OpTypeRayQueryKHR: return 300009; case spv::Op::OpTypeAccelerationStructureKHR: return 300010; case spv::Op::OpConstantComposite: { std::uint32_t hash = 300011 + hashType(idPos(spv[typeStart+1])); for (unsigned w=3; w < wordCount; ++w) hash += w * hashType(idPos(spv[typeStart+w])); return hash; } case spv::Op::OpConstant: { std::uint32_t hash = 400011 + hashType(idPos(spv[typeStart+1])); for (unsigned w=3; w < wordCount; ++w) hash += w * spv[typeStart+w]; return hash; } case spv::Op::OpConstantNull: { std::uint32_t hash = 500009 + hashType(idPos(spv[typeStart+1])); return hash; } case spv::Op::OpConstantSampler: { std::uint32_t hash = 600011 + hashType(idPos(spv[typeStart+1])); for (unsigned w=3; w < wordCount; ++w) hash += w * spv[typeStart+w]; return hash; } default: error("unknown type opcode"); return 0; } } void spirvbin_t::mapTypeConst() { globaltypes_t globalTypeMap; msg(3, 2, std::string("Remapping Consts & Types: ")); static const std::uint32_t softTypeIdLimit = 3011; // small prime. TODO: get from options static const std::uint32_t firstMappedID = 8; // offset into ID space for (auto& typeStart : typeConstPos) { const spv::Id resId = asTypeConstId(typeStart); const std::uint32_t hashval = hashType(typeStart); if (errorLatch) return; if (isOldIdUnmapped(resId)) { localId(resId, nextUnusedId(hashval % softTypeIdLimit + firstMappedID)); if (errorLatch) return; } } } // Strip a single binary by removing ranges given in stripRange void spirvbin_t::strip() { if (stripRange.empty()) // nothing to do return; // Sort strip ranges in order of traversal std::sort(stripRange.begin(), stripRange.end()); // Allocate a new binary big enough to hold old binary // We'll step this iterator through the strip ranges as we go through the binary auto strip_it = stripRange.begin(); int strippedPos = 0; for (unsigned word = 0; word < unsigned(spv.size()); ++word) { while (strip_it != stripRange.end() && word >= strip_it->second) ++strip_it; if (strip_it == stripRange.end() || word < strip_it->first || word >= strip_it->second) spv[strippedPos++] = spv[word]; } spv.resize(strippedPos); stripRange.clear(); buildLocalMaps(); } // Strip a single binary by removing ranges given in stripRange void spirvbin_t::remap(std::uint32_t opts) { options = opts; // Set up opcode tables from SpvDoc spv::Parameterize(); validate(); // validate header buildLocalMaps(); // build ID maps msg(3, 4, std::string("ID bound: ") + std::to_string(bound())); if (options & STRIP) stripDebug(); if (errorLatch) return; strip(); // strip out data we decided to eliminate if (errorLatch) return; if (options & OPT_LOADSTORE) optLoadStore(); if (errorLatch) return; if (options & OPT_FWD_LS) forwardLoadStores(); if (errorLatch) return; if (options & DCE_FUNCS) dceFuncs(); if (errorLatch) return; if (options & DCE_VARS) dceVars(); if (errorLatch) return; if (options & DCE_TYPES) dceTypes(); if (errorLatch) return; strip(); // strip out data we decided to eliminate if (errorLatch) return; stripDeadRefs(); // remove references to things we DCEed if (errorLatch) return; // after the last strip, we must clean any debug info referring to now-deleted data if (options & MAP_TYPES) mapTypeConst(); if (errorLatch) return; if (options & MAP_NAMES) mapNames(); if (errorLatch) return; if (options & MAP_FUNCS) mapFnBodies(); if (errorLatch) return; if (options & MAP_ALL) { mapRemainder(); // map any unmapped IDs if (errorLatch) return; applyMap(); // Now remap each shader to the new IDs we've come up with if (errorLatch) return; } } // remap from a memory image void spirvbin_t::remap(std::vector& in_spv, const std::vector& whiteListStrings, std::uint32_t opts) { stripWhiteList = whiteListStrings; spv.swap(in_spv); remap(opts); spv.swap(in_spv); } // remap from a memory image - legacy interface without white list void spirvbin_t::remap(std::vector& in_spv, std::uint32_t opts) { stripWhiteList.clear(); spv.swap(in_spv); remap(opts); spv.swap(in_spv); } } // namespace SPV ================================================ FILE: src/libraries/glslang/SPIRV/SPVRemapper.h ================================================ // // Copyright (C) 2015 LunarG, Inc. // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following // disclaimer in the documentation and/or other materials provided // with the distribution. // // Neither the name of 3Dlabs Inc. Ltd. nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // #ifndef SPIRVREMAPPER_H #define SPIRVREMAPPER_H #include #include #include #include #ifdef GLSLANG_IS_SHARED_LIBRARY #ifdef _WIN32 #ifdef GLSLANG_EXPORTING #define GLSLANG_EXPORT __declspec(dllexport) #else #define GLSLANG_EXPORT __declspec(dllimport) #endif #elif __GNUC__ >= 4 #define GLSLANG_EXPORT __attribute__((visibility("default"))) #endif #endif // GLSLANG_IS_SHARED_LIBRARY #ifndef GLSLANG_EXPORT #define GLSLANG_EXPORT #endif namespace spv { class spirvbin_base_t { public: enum Options { NONE = 0, STRIP = (1<<0), MAP_TYPES = (1<<1), MAP_NAMES = (1<<2), MAP_FUNCS = (1<<3), DCE_FUNCS = (1<<4), DCE_VARS = (1<<5), DCE_TYPES = (1<<6), OPT_LOADSTORE = (1<<7), OPT_FWD_LS = (1<<8), // EXPERIMENTAL: PRODUCES INVALID SCHEMA-0 SPIRV MAP_ALL = (MAP_TYPES | MAP_NAMES | MAP_FUNCS), DCE_ALL = (DCE_FUNCS | DCE_VARS | DCE_TYPES), OPT_ALL = (OPT_LOADSTORE), ALL_BUT_STRIP = (MAP_ALL | DCE_ALL | OPT_ALL), DO_EVERYTHING = (STRIP | ALL_BUT_STRIP) }; }; } // namespace SPV #include #include #include #include #include #include #include #include "spirv.hpp11" namespace spv { static inline constexpr Id NoResult = 0; // class to hold SPIR-V binary data for remapping, DCE, and debug stripping class GLSLANG_EXPORT spirvbin_t : public spirvbin_base_t { public: spirvbin_t(int verbose = 0) : entryPoint(spv::NoResult), largestNewId(0), verbose(verbose), errorLatch(false) { } virtual ~spirvbin_t() { } // remap on an existing binary in memory void remap(std::vector& spv, const std::vector& whiteListStrings, std::uint32_t opts = DO_EVERYTHING); // remap on an existing binary in memory - legacy interface without white list void remap(std::vector& spv, std::uint32_t opts = DO_EVERYTHING); // Type for error/log handler functions typedef std::function errorfn_t; typedef std::function logfn_t; // Register error/log handling functions (can be lambda fn / functor / etc) static void registerErrorHandler(errorfn_t handler) { errorHandler = handler; } static void registerLogHandler(logfn_t handler) { logHandler = handler; } protected: // This can be overridden to provide other message behavior if needed virtual void msg(int minVerbosity, int indent, const std::string& txt) const; private: // Local to global, or global to local ID map typedef std::unordered_map idmap_t; typedef std::unordered_set idset_t; typedef std::unordered_map blockmap_t; void remap(std::uint32_t opts = DO_EVERYTHING); // Map of names to IDs typedef std::unordered_map namemap_t; typedef std::uint32_t spirword_t; typedef std::pair range_t; typedef std::function idfn_t; typedef std::function instfn_t; // Special Values for ID map: static const spv::Id unmapped; // unchanged from default value static const spv::Id unused; // unused ID static const int header_size; // SPIR header = 5 words class id_iterator_t; // For mapping type entries between different shaders typedef std::vector typeentry_t; typedef std::map globaltypes_t; // A set that preserves position order, and a reverse map typedef std::set posmap_t; typedef std::unordered_map posmap_rev_t; // Maps and ID to the size of its base type, if known. typedef std::unordered_map typesize_map_t; // handle error void error(const std::string& txt) const { errorLatch = true; errorHandler(txt); } bool isConstOp(spv::Op opCode) const; bool isTypeOp(spv::Op opCode) const; bool isStripOp(spv::Op opCode) const; bool isFlowCtrl(spv::Op opCode) const; range_t literalRange(spv::Op opCode) const; range_t typeRange(spv::Op opCode) const; range_t constRange(spv::Op opCode) const; unsigned typeSizeInWords(spv::Id id) const; unsigned idTypeSizeInWords(spv::Id id) const; bool isStripOp(spv::Op opCode, unsigned start) const; spv::Id& asId(unsigned word) { return spv[word]; } const spv::Id& asId(unsigned word) const { return spv[word]; } spv::Op asOpCode(unsigned word) const { return opOpCode(spv[word]); } std::uint32_t asOpCodeHash(unsigned word); spv::Decoration asDecoration(unsigned word) const { return spv::Decoration(spv[word]); } unsigned asWordCount(unsigned word) const { return opWordCount(spv[word]); } spv::Id asTypeConstId(unsigned word) const { return asId(word + (isTypeOp(asOpCode(word)) ? 1 : 2)); } unsigned idPos(spv::Id id) const; static unsigned opWordCount(spirword_t data) { return data >> spv::WordCountShift; } static spv::Op opOpCode(spirword_t data) { return spv::Op(data & spv::OpCodeMask); } // Header access & set methods spirword_t magic() const { return spv[0]; } // return magic number spirword_t bound() const { return spv[3]; } // return Id bound from header spirword_t bound(spirword_t b) { return spv[3] = b; } spirword_t genmagic() const { return spv[2]; } // generator magic spirword_t genmagic(spirword_t m) { return spv[2] = m; } spirword_t schemaNum() const { return spv[4]; } // schema number from header // Mapping fns: get spv::Id localId(spv::Id id) const { return idMapL[id]; } // Mapping fns: set inline spv::Id localId(spv::Id id, spv::Id newId); void countIds(spv::Id id); // Return next unused new local ID. // NOTE: boost::dynamic_bitset would be more efficient due to find_next(), // which std::vector doens't have. inline spv::Id nextUnusedId(spv::Id id); void buildLocalMaps(); std::string literalString(unsigned word) const; // Return literal as a std::string int literalStringWords(const std::string& str) const { return (int(str.size())+4)/4; } bool isNewIdMapped(spv::Id newId) const { return isMapped(newId); } bool isOldIdUnmapped(spv::Id oldId) const { return localId(oldId) == unmapped; } bool isOldIdUnused(spv::Id oldId) const { return localId(oldId) == unused; } bool isOldIdMapped(spv::Id oldId) const { return !isOldIdUnused(oldId) && !isOldIdUnmapped(oldId); } bool isFunction(spv::Id oldId) const { return fnPos.find(oldId) != fnPos.end(); } // bool matchType(const globaltypes_t& globalTypes, spv::Id lt, spv::Id gt) const; // spv::Id findType(const globaltypes_t& globalTypes, spv::Id lt) const; std::uint32_t hashType(unsigned typeStart) const; spirvbin_t& process(instfn_t, idfn_t, unsigned begin = 0, unsigned end = 0); int processInstruction(unsigned word, instfn_t, idfn_t); void validate() const; void mapTypeConst(); void mapFnBodies(); void optLoadStore(); void dceFuncs(); void dceVars(); void dceTypes(); void mapNames(); void foldIds(); // fold IDs to smallest space void forwardLoadStores(); // load store forwarding (EXPERIMENTAL) void offsetIds(); // create relative offset IDs void applyMap(); // remap per local name map void mapRemainder(); // map any IDs we haven't touched yet void stripDebug(); // strip all debug info void stripDeadRefs(); // strips debug info for now-dead references after DCE void strip(); // remove debug symbols std::vector spv; // SPIR words std::vector stripWhiteList; namemap_t nameMap; // ID names from OpName // Since we want to also do binary ops, we can't use std::vector. we could use // boost::dynamic_bitset, but we're trying to avoid a boost dependency. typedef std::uint64_t bits_t; std::vector mapped; // which new IDs have been mapped static const int mBits = sizeof(bits_t) * 4; bool isMapped(spv::Id id) const { return id < maxMappedId() && ((mapped[id/mBits] & (1LL<<(id%mBits))) != 0); } void setMapped(spv::Id id) { resizeMapped(id); mapped[id/mBits] |= (1LL<<(id%mBits)); } void resizeMapped(spv::Id id) { if (id >= maxMappedId()) mapped.resize(id/mBits+1, 0); } size_t maxMappedId() const { return mapped.size() * mBits; } // Add a strip range for a given instruction starting at 'start' // Note: avoiding brace initializers to please older versions os MSVC. void stripInst(unsigned start) { stripRange.push_back(range_t(start, start + asWordCount(start))); } // Function start and end. use unordered_map because we'll have // many fewer functions than IDs. std::unordered_map fnPos; // Which functions are called, anywhere in the module, with a call count std::unordered_map fnCalls; posmap_t typeConstPos; // word positions that define types & consts (ordered) posmap_rev_t idPosR; // reverse map from IDs to positions typesize_map_t idTypeSizeMap; // maps each ID to its type size, if known. std::vector idMapL; // ID {M}ap from {L}ocal to {G}lobal IDs spv::Id entryPoint; // module entry point spv::Id largestNewId; // biggest new ID we have mapped anything to // Sections of the binary to strip, given as [begin,end) std::vector stripRange; // processing options: std::uint32_t options; int verbose; // verbosity level // Error latch: this is set if the error handler is ever executed. It would be better to // use a try/catch block and throw, but that's not desired for certain environments, so // this is the alternative. mutable bool errorLatch; static errorfn_t errorHandler; static logfn_t logHandler; }; } // namespace SPV #endif // SPIRVREMAPPER_H ================================================ FILE: src/libraries/glslang/SPIRV/SpvBuilder.cpp ================================================ // // Copyright (C) 2014-2015 LunarG, Inc. // Copyright (C) 2015-2018 Google, Inc. // Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights reserved. // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following // disclaimer in the documentation and/or other materials provided // with the distribution. // // Neither the name of 3Dlabs Inc. Ltd. nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // // Helper for making SPIR-V IR. Generally, this is documented in the header // SpvBuilder.h. // #include #include #include #include #include "SpvBuilder.h" #include "spvUtil.h" #include "hex_float.h" #ifndef _WIN32 #include #endif namespace spv { Builder::Builder(unsigned int spvVersion, unsigned int magicNumber, SpvBuildLogger* buildLogger) : spvVersion(spvVersion), sourceLang(SourceLanguage::Unknown), sourceVersion(0), addressModel(AddressingModel::Logical), memoryModel(MemoryModel::GLSL450), builderNumber(magicNumber), buildPoint(nullptr), uniqueId(0), entryPointFunction(nullptr), generatingOpCodeForSpecConst(false), logger(buildLogger) { clearAccessChain(); } Builder::~Builder() { } Id Builder::import(const char* name) { Instruction* import = new Instruction(getUniqueId(), NoType, Op::OpExtInstImport); import->addStringOperand(name); module.mapInstruction(import); imports.push_back(std::unique_ptr(import)); return import->getResultId(); } // For creating new groupedTypes (will return old type if the requested one was already made). Id Builder::makeVoidType() { Instruction* type; if (groupedTypes[enumCast(Op::OpTypeVoid)].size() == 0) { Id typeId = getUniqueId(); type = new Instruction(typeId, NoType, Op::OpTypeVoid); groupedTypes[enumCast(Op::OpTypeVoid)].push_back(type); constantsTypesGlobals.push_back(std::unique_ptr(type)); module.mapInstruction(type); // Core OpTypeVoid used for debug void type if (emitNonSemanticShaderDebugInfo) debugId[typeId] = typeId; } else type = groupedTypes[enumCast(Op::OpTypeVoid)].back(); return type->getResultId(); } Id Builder::makeBoolType() { Instruction* type; if (groupedTypes[enumCast(Op::OpTypeBool)].size() == 0) { type = new Instruction(getUniqueId(), NoType, Op::OpTypeBool); groupedTypes[enumCast(Op::OpTypeBool)].push_back(type); constantsTypesGlobals.push_back(std::unique_ptr(type)); module.mapInstruction(type); if (emitNonSemanticShaderDebugInfo) { auto const debugResultId = makeBoolDebugType(32); debugId[type->getResultId()] = debugResultId; } } else type = groupedTypes[enumCast(Op::OpTypeBool)].back(); return type->getResultId(); } Id Builder::makeSamplerType() { Instruction* type; if (groupedTypes[enumCast(Op::OpTypeSampler)].size() == 0) { type = new Instruction(getUniqueId(), NoType, Op::OpTypeSampler); groupedTypes[enumCast(Op::OpTypeSampler)].push_back(type); constantsTypesGlobals.push_back(std::unique_ptr(type)); module.mapInstruction(type); } else type = groupedTypes[enumCast(Op::OpTypeSampler)].back(); if (emitNonSemanticShaderDebugInfo) { auto const debugResultId = makeCompositeDebugType({}, "type.sampler", NonSemanticShaderDebugInfo100Structure, true); debugId[type->getResultId()] = debugResultId; } return type->getResultId(); } Id Builder::makePointer(StorageClass storageClass, Id pointee) { // try to find it Instruction* type; for (int t = 0; t < (int)groupedTypes[enumCast(Op::OpTypePointer)].size(); ++t) { type = groupedTypes[enumCast(Op::OpTypePointer)][t]; if (type->getImmediateOperand(0) == (unsigned)storageClass && type->getIdOperand(1) == pointee) return type->getResultId(); } // not found, make it type = new Instruction(getUniqueId(), NoType, Op::OpTypePointer); type->reserveOperands(2); type->addImmediateOperand(storageClass); type->addIdOperand(pointee); groupedTypes[enumCast(Op::OpTypePointer)].push_back(type); constantsTypesGlobals.push_back(std::unique_ptr(type)); module.mapInstruction(type); if (emitNonSemanticShaderDebugInfo) { const Id debugResultId = makePointerDebugType(storageClass, pointee); debugId[type->getResultId()] = debugResultId; } return type->getResultId(); } Id Builder::makeForwardPointer(StorageClass storageClass) { // Caching/uniquifying doesn't work here, because we don't know the // pointee type and there can be multiple forward pointers of the same // storage type. Somebody higher up in the stack must keep track. Instruction* type = new Instruction(getUniqueId(), NoType, Op::OpTypeForwardPointer); type->addImmediateOperand(storageClass); constantsTypesGlobals.push_back(std::unique_ptr(type)); module.mapInstruction(type); if (emitNonSemanticShaderDebugInfo) { const Id debugResultId = makeForwardPointerDebugType(storageClass); debugId[type->getResultId()] = debugResultId; } return type->getResultId(); } Id Builder::makePointerFromForwardPointer(StorageClass storageClass, Id forwardPointerType, Id pointee) { // try to find it Instruction* type; for (int t = 0; t < (int)groupedTypes[enumCast(Op::OpTypePointer)].size(); ++t) { type = groupedTypes[enumCast(Op::OpTypePointer)][t]; if (type->getImmediateOperand(0) == (unsigned)storageClass && type->getIdOperand(1) == pointee) return type->getResultId(); } type = new Instruction(forwardPointerType, NoType, Op::OpTypePointer); type->reserveOperands(2); type->addImmediateOperand(storageClass); type->addIdOperand(pointee); groupedTypes[enumCast(Op::OpTypePointer)].push_back(type); constantsTypesGlobals.push_back(std::unique_ptr(type)); module.mapInstruction(type); // If we are emitting nonsemantic debuginfo, we need to patch the debug pointer type // that was emitted alongside the forward pointer, now that we have a pointee debug // type for it to point to. if (emitNonSemanticShaderDebugInfo) { Instruction *debugForwardPointer = module.getInstruction(debugId[forwardPointerType]); assert(debugId[pointee]); debugForwardPointer->setIdOperand(2, debugId[pointee]); } return type->getResultId(); } Id Builder::makeIntegerType(int width, bool hasSign) { // try to find it Instruction* type; for (int t = 0; t < (int)groupedTypes[enumCast(Op::OpTypeInt)].size(); ++t) { type = groupedTypes[enumCast(Op::OpTypeInt)][t]; if (type->getImmediateOperand(0) == (unsigned)width && type->getImmediateOperand(1) == (hasSign ? 1u : 0u)) return type->getResultId(); } // not found, make it type = new Instruction(getUniqueId(), NoType, Op::OpTypeInt); type->reserveOperands(2); type->addImmediateOperand(width); type->addImmediateOperand(hasSign ? 1 : 0); groupedTypes[enumCast(Op::OpTypeInt)].push_back(type); constantsTypesGlobals.push_back(std::unique_ptr(type)); module.mapInstruction(type); // deal with capabilities switch (width) { case 8: case 16: // these are currently handled by storage-type declarations and post processing break; case 64: addCapability(Capability::Int64); break; default: break; } if (emitNonSemanticShaderDebugInfo) { auto const debugResultId = makeIntegerDebugType(width, hasSign); debugId[type->getResultId()] = debugResultId; } return type->getResultId(); } Id Builder::makeFloatType(int width) { // try to find it Instruction* type; for (int t = 0; t < (int)groupedTypes[enumCast(Op::OpTypeFloat)].size(); ++t) { type = groupedTypes[enumCast(Op::OpTypeFloat)][t]; if (type->getNumOperands() != 1) { continue; } if (type->getImmediateOperand(0) == (unsigned)width) return type->getResultId(); } // not found, make it type = new Instruction(getUniqueId(), NoType, Op::OpTypeFloat); type->addImmediateOperand(width); groupedTypes[enumCast(Op::OpTypeFloat)].push_back(type); constantsTypesGlobals.push_back(std::unique_ptr(type)); module.mapInstruction(type); // deal with capabilities switch (width) { case 16: // currently handled by storage-type declarations and post processing break; case 64: addCapability(Capability::Float64); break; default: break; } if (emitNonSemanticShaderDebugInfo) { auto const debugResultId = makeFloatDebugType(width); debugId[type->getResultId()] = debugResultId; } return type->getResultId(); } Id Builder::makeBFloat16Type() { // try to find it Instruction* type; for (int t = 0; t < (int)groupedTypes[enumCast(Op::OpTypeFloat)].size(); ++t) { type = groupedTypes[enumCast(Op::OpTypeFloat)][t]; if (type->getNumOperands() != 2) { continue; } if (type->getImmediateOperand(0) == (unsigned)16 && type->getImmediateOperand(1) == FPEncoding::BFloat16KHR) return type->getResultId(); } // not found, make it type = new Instruction(getUniqueId(), NoType, Op::OpTypeFloat); type->addImmediateOperand(16); type->addImmediateOperand(FPEncoding::BFloat16KHR); groupedTypes[enumCast(Op::OpTypeFloat)].push_back(type); constantsTypesGlobals.push_back(std::unique_ptr(type)); module.mapInstruction(type); addExtension(spv::E_SPV_KHR_bfloat16); addCapability(Capability::BFloat16TypeKHR); #if 0 // XXX not supported if (emitNonSemanticShaderDebugInfo) { auto const debugResultId = makeFloatDebugType(width); debugId[type->getResultId()] = debugResultId; } #endif return type->getResultId(); } Id Builder::makeFloatE5M2Type() { // try to find it Instruction* type; for (int t = 0; t < (int)groupedTypes[enumCast(Op::OpTypeFloat)].size(); ++t) { type = groupedTypes[enumCast(Op::OpTypeFloat)][t]; if (type->getNumOperands() != 2) { continue; } if (type->getImmediateOperand(0) == (unsigned)8 && type->getImmediateOperand(1) == FPEncoding::Float8E5M2EXT) return type->getResultId(); } // not found, make it type = new Instruction(getUniqueId(), NoType, Op::OpTypeFloat); type->addImmediateOperand(8); type->addImmediateOperand(FPEncoding::Float8E5M2EXT); groupedTypes[enumCast(Op::OpTypeFloat)].push_back(type); constantsTypesGlobals.push_back(std::unique_ptr(type)); module.mapInstruction(type); addExtension(spv::E_SPV_EXT_float8); addCapability(Capability::Float8EXT); #if 0 // XXX not supported if (emitNonSemanticShaderDebugInfo) { auto const debugResultId = makeFloatDebugType(width); debugId[type->getResultId()] = debugResultId; } #endif return type->getResultId(); } Id Builder::makeFloatE4M3Type() { // try to find it Instruction* type; for (int t = 0; t < (int)groupedTypes[enumCast(Op::OpTypeFloat)].size(); ++t) { type = groupedTypes[enumCast(Op::OpTypeFloat)][t]; if (type->getNumOperands() != 2) { continue; } if (type->getImmediateOperand(0) == (unsigned)8 && type->getImmediateOperand(1) == FPEncoding::Float8E4M3EXT) return type->getResultId(); } // not found, make it type = new Instruction(getUniqueId(), NoType, Op::OpTypeFloat); type->addImmediateOperand(8); type->addImmediateOperand(FPEncoding::Float8E4M3EXT); groupedTypes[enumCast(Op::OpTypeFloat)].push_back(type); constantsTypesGlobals.push_back(std::unique_ptr(type)); module.mapInstruction(type); addExtension(spv::E_SPV_EXT_float8); addCapability(Capability::Float8EXT); #if 0 // XXX not supported if (emitNonSemanticShaderDebugInfo) { auto const debugResultId = makeFloatDebugType(width); debugId[type->getResultId()] = debugResultId; } #endif return type->getResultId(); } // Make a struct without checking for duplication. // See makeStructResultType() for non-decorated structs // needed as the result of some instructions, which does // check for duplicates. Id Builder::makeStructType(const std::vector& members, const char* name, bool const compilerGenerated) { // Don't look for previous one, because in the general case, // structs can be duplicated except for decorations. // not found, make it Instruction* type = new Instruction(getUniqueId(), NoType, Op::OpTypeStruct); for (int op = 0; op < (int)members.size(); ++op) type->addIdOperand(members[op]); groupedTypes[enumCast(Op::OpTypeStruct)].push_back(type); constantsTypesGlobals.push_back(std::unique_ptr(type)); module.mapInstruction(type); addName(type->getResultId(), name); if (emitNonSemanticShaderDebugInfo && !compilerGenerated) { auto const debugResultId = makeCompositeDebugType(members, name, NonSemanticShaderDebugInfo100Structure); debugId[type->getResultId()] = debugResultId; } return type->getResultId(); } // Make a struct for the simple results of several instructions, // checking for duplication. Id Builder::makeStructResultType(Id type0, Id type1) { // try to find it Instruction* type; for (int t = 0; t < (int)groupedTypes[enumCast(Op::OpTypeStruct)].size(); ++t) { type = groupedTypes[enumCast(Op::OpTypeStruct)][t]; if (type->getNumOperands() != 2) continue; if (type->getIdOperand(0) != type0 || type->getIdOperand(1) != type1) continue; return type->getResultId(); } // not found, make it std::vector members; members.push_back(type0); members.push_back(type1); return makeStructType(members, "ResType"); } Id Builder::makeVectorType(Id component, int size) { // try to find it Instruction* type; for (int t = 0; t < (int)groupedTypes[enumCast(Op::OpTypeVector)].size(); ++t) { type = groupedTypes[enumCast(Op::OpTypeVector)][t]; if (type->getIdOperand(0) == component && type->getImmediateOperand(1) == (unsigned)size) return type->getResultId(); } // not found, make it type = new Instruction(getUniqueId(), NoType, Op::OpTypeVector); type->reserveOperands(2); type->addIdOperand(component); type->addImmediateOperand(size); groupedTypes[enumCast(Op::OpTypeVector)].push_back(type); constantsTypesGlobals.push_back(std::unique_ptr(type)); module.mapInstruction(type); if (emitNonSemanticShaderDebugInfo) { auto const debugResultId = makeVectorDebugType(component, size); debugId[type->getResultId()] = debugResultId; } return type->getResultId(); } Id Builder::makeMatrixType(Id component, int cols, int rows) { assert(cols <= maxMatrixSize && rows <= maxMatrixSize); Id column = makeVectorType(component, rows); // try to find it Instruction* type; for (int t = 0; t < (int)groupedTypes[enumCast(Op::OpTypeMatrix)].size(); ++t) { type = groupedTypes[enumCast(Op::OpTypeMatrix)][t]; if (type->getIdOperand(0) == column && type->getImmediateOperand(1) == (unsigned)cols) return type->getResultId(); } // not found, make it type = new Instruction(getUniqueId(), NoType, Op::OpTypeMatrix); type->reserveOperands(2); type->addIdOperand(column); type->addImmediateOperand(cols); groupedTypes[enumCast(Op::OpTypeMatrix)].push_back(type); constantsTypesGlobals.push_back(std::unique_ptr(type)); module.mapInstruction(type); if (emitNonSemanticShaderDebugInfo) { auto const debugResultId = makeMatrixDebugType(column, cols); debugId[type->getResultId()] = debugResultId; } return type->getResultId(); } Id Builder::makeCooperativeMatrixTypeKHR(Id component, Id scope, Id rows, Id cols, Id use) { // try to find it Instruction* type; for (int t = 0; t < (int)groupedTypes[enumCast(Op::OpTypeCooperativeMatrixKHR)].size(); ++t) { type = groupedTypes[enumCast(Op::OpTypeCooperativeMatrixKHR)][t]; if (type->getIdOperand(0) == component && type->getIdOperand(1) == scope && type->getIdOperand(2) == rows && type->getIdOperand(3) == cols && type->getIdOperand(4) == use) return type->getResultId(); } // not found, make it type = new Instruction(getUniqueId(), NoType, Op::OpTypeCooperativeMatrixKHR); type->reserveOperands(5); type->addIdOperand(component); type->addIdOperand(scope); type->addIdOperand(rows); type->addIdOperand(cols); type->addIdOperand(use); groupedTypes[enumCast(Op::OpTypeCooperativeMatrixKHR)].push_back(type); constantsTypesGlobals.push_back(std::unique_ptr(type)); module.mapInstruction(type); if (emitNonSemanticShaderDebugInfo) { // Find a name for one of the parameters. It can either come from debuginfo for another // type, or an OpName from a constant. auto const findName = [&](Id id) { Id id2 = debugId[id]; for (auto &t : groupedDebugTypes[NonSemanticShaderDebugInfo100DebugTypeBasic]) { if (t->getResultId() == id2) { for (auto &s : strings) { if (s->getResultId() == t->getIdOperand(2)) { return s->getNameString(); } } } } for (auto &t : names) { if (t->getIdOperand(0) == id) { return t->getNameString(); } } return "unknown"; }; std::string debugName = "coopmat<"; debugName += std::string(findName(component)) + ", "; if (isConstantScalar(scope)) { debugName += std::string("gl_Scope") + std::string(spv::ScopeToString((spv::Scope)getConstantScalar(scope))) + ", "; } else { debugName += std::string(findName(scope)) + ", "; } debugName += std::string(findName(rows)) + ", "; debugName += std::string(findName(cols)) + ">"; // There's no nonsemantic debug info instruction for cooperative matrix types, // use opaque composite instead. auto const debugResultId = makeCompositeDebugType({}, debugName.c_str(), NonSemanticShaderDebugInfo100Structure, true); debugId[type->getResultId()] = debugResultId; } return type->getResultId(); } Id Builder::makeCooperativeMatrixTypeNV(Id component, Id scope, Id rows, Id cols) { // try to find it Instruction* type; for (int t = 0; t < (int)groupedTypes[enumCast(Op::OpTypeCooperativeMatrixNV)].size(); ++t) { type = groupedTypes[enumCast(Op::OpTypeCooperativeMatrixNV)][t]; if (type->getIdOperand(0) == component && type->getIdOperand(1) == scope && type->getIdOperand(2) == rows && type->getIdOperand(3) == cols) return type->getResultId(); } // not found, make it type = new Instruction(getUniqueId(), NoType, Op::OpTypeCooperativeMatrixNV); type->reserveOperands(4); type->addIdOperand(component); type->addIdOperand(scope); type->addIdOperand(rows); type->addIdOperand(cols); groupedTypes[enumCast(Op::OpTypeCooperativeMatrixNV)].push_back(type); constantsTypesGlobals.push_back(std::unique_ptr(type)); module.mapInstruction(type); return type->getResultId(); } Id Builder::makeCooperativeMatrixTypeWithSameShape(Id component, Id otherType) { Instruction* instr = module.getInstruction(otherType); if (instr->getOpCode() == Op::OpTypeCooperativeMatrixNV) { return makeCooperativeMatrixTypeNV(component, instr->getIdOperand(1), instr->getIdOperand(2), instr->getIdOperand(3)); } else { assert(instr->getOpCode() == Op::OpTypeCooperativeMatrixKHR); return makeCooperativeMatrixTypeKHR(component, instr->getIdOperand(1), instr->getIdOperand(2), instr->getIdOperand(3), instr->getIdOperand(4)); } } Id Builder::makeCooperativeVectorTypeNV(Id componentType, Id components) { // try to find it Instruction* type; for (int t = 0; t < (int)groupedTypes[enumCast(Op::OpTypeCooperativeVectorNV)].size(); ++t) { type = groupedTypes[enumCast(Op::OpTypeCooperativeVectorNV)][t]; if (type->getIdOperand(0) == componentType && type->getIdOperand(1) == components) return type->getResultId(); } // not found, make it type = new Instruction(getUniqueId(), NoType, Op::OpTypeCooperativeVectorNV); type->addIdOperand(componentType); type->addIdOperand(components); groupedTypes[enumCast(Op::OpTypeCooperativeVectorNV)].push_back(type); constantsTypesGlobals.push_back(std::unique_ptr(type)); module.mapInstruction(type); return type->getResultId(); } Id Builder::makeGenericType(spv::Op opcode, std::vector& operands) { // try to find it Instruction* type; for (int t = 0; t < (int)groupedTypes[enumCast(opcode)].size(); ++t) { type = groupedTypes[enumCast(opcode)][t]; if (static_cast(type->getNumOperands()) != operands.size()) continue; // Number mismatch, find next bool match = true; for (int op = 0; match && op < (int)operands.size(); ++op) { match = (operands[op].isId ? type->getIdOperand(op) : type->getImmediateOperand(op)) == operands[op].word; } if (match) return type->getResultId(); } // not found, make it type = new Instruction(getUniqueId(), NoType, opcode); type->reserveOperands(operands.size()); for (size_t op = 0; op < operands.size(); ++op) { if (operands[op].isId) type->addIdOperand(operands[op].word); else type->addImmediateOperand(operands[op].word); } groupedTypes[enumCast(opcode)].push_back(type); constantsTypesGlobals.push_back(std::unique_ptr(type)); module.mapInstruction(type); return type->getResultId(); } // TODO: performance: track arrays per stride // If a stride is supplied (non-zero) make an array. // If no stride (0), reuse previous array types. // 'size' is an Id of a constant or specialization constant of the array size Id Builder::makeArrayType(Id element, Id sizeId, int stride) { Instruction* type; if (stride == 0) { // try to find existing type for (int t = 0; t < (int)groupedTypes[enumCast(Op::OpTypeArray)].size(); ++t) { type = groupedTypes[enumCast(Op::OpTypeArray)][t]; if (type->getIdOperand(0) == element && type->getIdOperand(1) == sizeId && explicitlyLaidOut.find(type->getResultId()) == explicitlyLaidOut.end()) return type->getResultId(); } } // not found, make it type = new Instruction(getUniqueId(), NoType, Op::OpTypeArray); type->reserveOperands(2); type->addIdOperand(element); type->addIdOperand(sizeId); groupedTypes[enumCast(Op::OpTypeArray)].push_back(type); constantsTypesGlobals.push_back(std::unique_ptr(type)); module.mapInstruction(type); if (stride != 0) { explicitlyLaidOut.insert(type->getResultId()); } if (emitNonSemanticShaderDebugInfo) { auto const debugResultId = makeArrayDebugType(element, sizeId); debugId[type->getResultId()] = debugResultId; } return type->getResultId(); } Id Builder::makeRuntimeArray(Id element) { Instruction* type = new Instruction(getUniqueId(), NoType, Op::OpTypeRuntimeArray); type->addIdOperand(element); constantsTypesGlobals.push_back(std::unique_ptr(type)); module.mapInstruction(type); if (emitNonSemanticShaderDebugInfo) { auto const debugResultId = makeArrayDebugType(element, makeUintConstant(0)); debugId[type->getResultId()] = debugResultId; } return type->getResultId(); } Id Builder::makeFunctionType(Id returnType, const std::vector& paramTypes) { // try to find it Instruction* type; for (int t = 0; t < (int)groupedTypes[enumCast(Op::OpTypeFunction)].size(); ++t) { type = groupedTypes[enumCast(Op::OpTypeFunction)][t]; if (type->getIdOperand(0) != returnType || (int)paramTypes.size() != type->getNumOperands() - 1) continue; bool mismatch = false; for (int p = 0; p < (int)paramTypes.size(); ++p) { if (paramTypes[p] != type->getIdOperand(p + 1)) { mismatch = true; break; } } if (! mismatch) { // If compiling HLSL, glslang will create a wrapper function around the entrypoint. Accordingly, a void(void) // function type is created for the wrapper function. However, nonsemantic shader debug information is disabled // while creating the HLSL wrapper. Consequently, if we encounter another void(void) function, we need to create // the associated debug function type if it hasn't been created yet. if(emitNonSemanticShaderDebugInfo && debugId[type->getResultId()] == 0) { assert(sourceLang == spv::SourceLanguage::HLSL); assert(getTypeClass(returnType) == Op::OpTypeVoid && paramTypes.size() == 0); Id debugTypeId = makeDebugFunctionType(returnType, {}); debugId[type->getResultId()] = debugTypeId; } return type->getResultId(); } } // not found, make it Id typeId = getUniqueId(); type = new Instruction(typeId, NoType, Op::OpTypeFunction); type->reserveOperands(paramTypes.size() + 1); type->addIdOperand(returnType); for (int p = 0; p < (int)paramTypes.size(); ++p) type->addIdOperand(paramTypes[p]); groupedTypes[enumCast(Op::OpTypeFunction)].push_back(type); constantsTypesGlobals.push_back(std::unique_ptr(type)); module.mapInstruction(type); // make debug type and map it if (emitNonSemanticShaderDebugInfo) { Id debugTypeId = makeDebugFunctionType(returnType, paramTypes); debugId[typeId] = debugTypeId; } return type->getResultId(); } Id Builder::makeDebugFunctionType(Id returnType, const std::vector& paramTypes) { assert(debugId[returnType] != 0); Id typeId = getUniqueId(); auto type = new Instruction(typeId, makeVoidType(), Op::OpExtInst); type->reserveOperands(paramTypes.size() + 4); type->addIdOperand(nonSemanticShaderDebugInfo); type->addImmediateOperand(NonSemanticShaderDebugInfo100DebugTypeFunction); type->addIdOperand(makeUintConstant(NonSemanticShaderDebugInfo100FlagIsPublic)); type->addIdOperand(debugId[returnType]); for (auto const paramType : paramTypes) { if (isPointerType(paramType) || isArrayType(paramType)) { type->addIdOperand(debugId[getContainedTypeId(paramType)]); } else { type->addIdOperand(debugId[paramType]); } } constantsTypesGlobals.push_back(std::unique_ptr(type)); module.mapInstruction(type); return typeId; } Id Builder::makeImageType(Id sampledType, Dim dim, bool depth, bool arrayed, bool ms, unsigned sampled, ImageFormat format) { assert(sampled == 1 || sampled == 2); // try to find it Instruction* type; for (int t = 0; t < (int)groupedTypes[enumCast(Op::OpTypeImage)].size(); ++t) { type = groupedTypes[enumCast(Op::OpTypeImage)][t]; if (type->getIdOperand(0) == sampledType && type->getImmediateOperand(1) == (unsigned int)dim && type->getImmediateOperand(2) == ( depth ? 1u : 0u) && type->getImmediateOperand(3) == (arrayed ? 1u : 0u) && type->getImmediateOperand(4) == ( ms ? 1u : 0u) && type->getImmediateOperand(5) == sampled && type->getImmediateOperand(6) == (unsigned int)format) return type->getResultId(); } // not found, make it type = new Instruction(getUniqueId(), NoType, Op::OpTypeImage); type->reserveOperands(7); type->addIdOperand(sampledType); type->addImmediateOperand( dim); type->addImmediateOperand( depth ? 1 : 0); type->addImmediateOperand(arrayed ? 1 : 0); type->addImmediateOperand( ms ? 1 : 0); type->addImmediateOperand(sampled); type->addImmediateOperand((unsigned int)format); groupedTypes[enumCast(Op::OpTypeImage)].push_back(type); constantsTypesGlobals.push_back(std::unique_ptr(type)); module.mapInstruction(type); // deal with capabilities switch (dim) { case Dim::Buffer: if (sampled == 1) addCapability(Capability::SampledBuffer); else addCapability(Capability::ImageBuffer); break; case Dim::Dim1D: if (sampled == 1) addCapability(Capability::Sampled1D); else addCapability(Capability::Image1D); break; case Dim::Cube: if (arrayed) { if (sampled == 1) addCapability(Capability::SampledCubeArray); else addCapability(Capability::ImageCubeArray); } break; case Dim::Rect: if (sampled == 1) addCapability(Capability::SampledRect); else addCapability(Capability::ImageRect); break; case Dim::SubpassData: addCapability(Capability::InputAttachment); break; default: break; } if (ms) { if (sampled == 2) { // Images used with subpass data are not storage // images, so don't require the capability for them. if (dim != Dim::SubpassData) addCapability(Capability::StorageImageMultisample); if (arrayed) addCapability(Capability::ImageMSArray); } } if (emitNonSemanticShaderDebugInfo) { auto TypeName = [&dim]() -> char const* { switch (dim) { case Dim::Dim1D: return "type.1d.image"; case Dim::Dim2D: return "type.2d.image"; case Dim::Dim3D: return "type.3d.image"; case Dim::Cube: return "type.cube.image"; default: return "type.image"; } }; auto const debugResultId = makeCompositeDebugType({}, TypeName(), NonSemanticShaderDebugInfo100Class, true); debugId[type->getResultId()] = debugResultId; } return type->getResultId(); } Id Builder::makeSampledImageType(Id imageType) { // try to find it Instruction* type; for (int t = 0; t < (int)groupedTypes[enumCast(Op::OpTypeSampledImage)].size(); ++t) { type = groupedTypes[enumCast(Op::OpTypeSampledImage)][t]; if (type->getIdOperand(0) == imageType) return type->getResultId(); } // not found, make it type = new Instruction(getUniqueId(), NoType, Op::OpTypeSampledImage); type->addIdOperand(imageType); groupedTypes[enumCast(Op::OpTypeSampledImage)].push_back(type); constantsTypesGlobals.push_back(std::unique_ptr(type)); module.mapInstruction(type); if (emitNonSemanticShaderDebugInfo) { auto const debugResultId = makeCompositeDebugType({}, "type.sampled.image", NonSemanticShaderDebugInfo100Class, true); debugId[type->getResultId()] = debugResultId; } return type->getResultId(); } Id Builder::makeDebugInfoNone() { if (debugInfoNone != 0) return debugInfoNone; Instruction* inst = new Instruction(getUniqueId(), makeVoidType(), Op::OpExtInst); inst->reserveOperands(2); inst->addIdOperand(nonSemanticShaderDebugInfo); inst->addImmediateOperand(NonSemanticShaderDebugInfo100DebugInfoNone); constantsTypesGlobals.push_back(std::unique_ptr(inst)); module.mapInstruction(inst); debugInfoNone = inst->getResultId(); return debugInfoNone; } Id Builder::makeBoolDebugType(int const size) { // try to find it Instruction* type; for (int t = 0; t < (int)groupedDebugTypes[NonSemanticShaderDebugInfo100DebugTypeBasic].size(); ++t) { type = groupedDebugTypes[NonSemanticShaderDebugInfo100DebugTypeBasic][t]; if (type->getIdOperand(0) == getStringId("bool") && type->getIdOperand(1) == static_cast(size) && type->getIdOperand(2) == NonSemanticShaderDebugInfo100Boolean) return type->getResultId(); } type = new Instruction(getUniqueId(), makeVoidType(), Op::OpExtInst); type->reserveOperands(6); type->addIdOperand(nonSemanticShaderDebugInfo); type->addImmediateOperand(NonSemanticShaderDebugInfo100DebugTypeBasic); type->addIdOperand(getStringId("bool")); // name id type->addIdOperand(makeUintConstant(size)); // size id type->addIdOperand(makeUintConstant(NonSemanticShaderDebugInfo100Boolean)); // encoding id type->addIdOperand(makeUintConstant(NonSemanticShaderDebugInfo100None)); // flags id groupedDebugTypes[NonSemanticShaderDebugInfo100DebugTypeBasic].push_back(type); constantsTypesGlobals.push_back(std::unique_ptr(type)); module.mapInstruction(type); return type->getResultId(); } Id Builder::makeIntegerDebugType(int const width, bool const hasSign) { const char* typeName = nullptr; switch (width) { case 8: typeName = hasSign ? "int8_t" : "uint8_t"; break; case 16: typeName = hasSign ? "int16_t" : "uint16_t"; break; case 64: typeName = hasSign ? "int64_t" : "uint64_t"; break; default: typeName = hasSign ? "int" : "uint"; } auto nameId = getStringId(typeName); // try to find it Instruction* type; for (int t = 0; t < (int)groupedDebugTypes[NonSemanticShaderDebugInfo100DebugTypeBasic].size(); ++t) { type = groupedDebugTypes[NonSemanticShaderDebugInfo100DebugTypeBasic][t]; if (type->getIdOperand(0) == nameId && type->getIdOperand(1) == static_cast(width) && type->getIdOperand(2) == (hasSign ? NonSemanticShaderDebugInfo100Signed : NonSemanticShaderDebugInfo100Unsigned)) return type->getResultId(); } // not found, make it type = new Instruction(getUniqueId(), makeVoidType(), Op::OpExtInst); type->reserveOperands(6); type->addIdOperand(nonSemanticShaderDebugInfo); type->addImmediateOperand(NonSemanticShaderDebugInfo100DebugTypeBasic); type->addIdOperand(nameId); // name id type->addIdOperand(makeUintConstant(width)); // size id if(hasSign == true) { type->addIdOperand(makeUintConstant(NonSemanticShaderDebugInfo100Signed)); // encoding id } else { type->addIdOperand(makeUintConstant(NonSemanticShaderDebugInfo100Unsigned)); // encoding id } type->addIdOperand(makeUintConstant(NonSemanticShaderDebugInfo100None)); // flags id groupedDebugTypes[NonSemanticShaderDebugInfo100DebugTypeBasic].push_back(type); constantsTypesGlobals.push_back(std::unique_ptr(type)); module.mapInstruction(type); return type->getResultId(); } Id Builder::makeFloatDebugType(int const width) { const char* typeName = nullptr; switch (width) { case 16: typeName = "float16_t"; break; case 64: typeName = "double"; break; default: typeName = "float"; break; } auto nameId = getStringId(typeName); // try to find it Instruction* type; for (int t = 0; t < (int)groupedDebugTypes[NonSemanticShaderDebugInfo100DebugTypeBasic].size(); ++t) { type = groupedDebugTypes[NonSemanticShaderDebugInfo100DebugTypeBasic][t]; if (type->getIdOperand(0) == nameId && type->getIdOperand(1) == static_cast(width) && type->getIdOperand(2) == NonSemanticShaderDebugInfo100Float) return type->getResultId(); } // not found, make it type = new Instruction(getUniqueId(), makeVoidType(), Op::OpExtInst); type->reserveOperands(6); type->addIdOperand(nonSemanticShaderDebugInfo); type->addImmediateOperand(NonSemanticShaderDebugInfo100DebugTypeBasic); type->addIdOperand(nameId); // name id type->addIdOperand(makeUintConstant(width)); // size id type->addIdOperand(makeUintConstant(NonSemanticShaderDebugInfo100Float)); // encoding id type->addIdOperand(makeUintConstant(NonSemanticShaderDebugInfo100None)); // flags id groupedDebugTypes[NonSemanticShaderDebugInfo100DebugTypeBasic].push_back(type); constantsTypesGlobals.push_back(std::unique_ptr(type)); module.mapInstruction(type); return type->getResultId(); } Id Builder::makeSequentialDebugType(Id const baseType, Id const componentCount, NonSemanticShaderDebugInfo100Instructions const sequenceType) { assert(sequenceType == NonSemanticShaderDebugInfo100DebugTypeArray || sequenceType == NonSemanticShaderDebugInfo100DebugTypeVector); // try to find it Instruction* type; for (int t = 0; t < (int)groupedDebugTypes[sequenceType].size(); ++t) { type = groupedDebugTypes[sequenceType][t]; if (type->getIdOperand(0) == baseType && type->getIdOperand(1) == makeUintConstant(componentCount)) return type->getResultId(); } // not found, make it type = new Instruction(getUniqueId(), makeVoidType(), Op::OpExtInst); type->reserveOperands(4); type->addIdOperand(nonSemanticShaderDebugInfo); type->addImmediateOperand(sequenceType); type->addIdOperand(debugId[baseType]); // base type type->addIdOperand(componentCount); // component count groupedDebugTypes[sequenceType].push_back(type); constantsTypesGlobals.push_back(std::unique_ptr(type)); module.mapInstruction(type); return type->getResultId(); } Id Builder::makeArrayDebugType(Id const baseType, Id const componentCount) { return makeSequentialDebugType(baseType, componentCount, NonSemanticShaderDebugInfo100DebugTypeArray); } Id Builder::makeVectorDebugType(Id const baseType, int const componentCount) { return makeSequentialDebugType(baseType, makeUintConstant(componentCount), NonSemanticShaderDebugInfo100DebugTypeVector); } Id Builder::makeMatrixDebugType(Id const vectorType, int const vectorCount, bool columnMajor) { // try to find it Instruction* type; for (int t = 0; t < (int)groupedDebugTypes[NonSemanticShaderDebugInfo100DebugTypeMatrix].size(); ++t) { type = groupedDebugTypes[NonSemanticShaderDebugInfo100DebugTypeMatrix][t]; if (type->getIdOperand(0) == vectorType && type->getIdOperand(1) == makeUintConstant(vectorCount)) return type->getResultId(); } // not found, make it type = new Instruction(getUniqueId(), makeVoidType(), Op::OpExtInst); type->reserveOperands(5); type->addIdOperand(nonSemanticShaderDebugInfo); type->addImmediateOperand(NonSemanticShaderDebugInfo100DebugTypeMatrix); type->addIdOperand(debugId[vectorType]); // vector type id type->addIdOperand(makeUintConstant(vectorCount)); // component count id type->addIdOperand(makeBoolConstant(columnMajor)); // column-major id groupedDebugTypes[NonSemanticShaderDebugInfo100DebugTypeMatrix].push_back(type); constantsTypesGlobals.push_back(std::unique_ptr(type)); module.mapInstruction(type); return type->getResultId(); } Id Builder::makeMemberDebugType(Id const memberType, DebugTypeLoc const& debugTypeLoc) { assert(debugId[memberType] != 0); Instruction* type = new Instruction(getUniqueId(), makeVoidType(), Op::OpExtInst); type->reserveOperands(10); type->addIdOperand(nonSemanticShaderDebugInfo); type->addImmediateOperand(NonSemanticShaderDebugInfo100DebugTypeMember); type->addIdOperand(getStringId(debugTypeLoc.name)); // name id type->addIdOperand(debugId[memberType]); // type id type->addIdOperand(makeDebugSource(currentFileId)); // source id type->addIdOperand(makeUintConstant(debugTypeLoc.line)); // line id TODO: currentLine is always zero type->addIdOperand(makeUintConstant(debugTypeLoc.column)); // TODO: column id type->addIdOperand(makeUintConstant(0)); // TODO: offset id type->addIdOperand(makeUintConstant(0)); // TODO: size id type->addIdOperand(makeUintConstant(NonSemanticShaderDebugInfo100FlagIsPublic)); // flags id groupedDebugTypes[NonSemanticShaderDebugInfo100DebugTypeMember].push_back(type); constantsTypesGlobals.push_back(std::unique_ptr(type)); module.mapInstruction(type); return type->getResultId(); } // Note: To represent a source language opaque type, this instruction must have no Members operands, Size operand must be // DebugInfoNone, and Name must start with @ to avoid clashes with user defined names. Id Builder::makeCompositeDebugType(std::vector const& memberTypes, char const*const name, NonSemanticShaderDebugInfo100DebugCompositeType const tag, bool const isOpaqueType) { // Create the debug member types. std::vector memberDebugTypes; for(auto const memberType : memberTypes) { assert(debugTypeLocs.find(memberType) != debugTypeLocs.end()); // There _should_ be debug types for all the member types but currently buffer references // do not have member debug info generated. if (debugId[memberType]) memberDebugTypes.emplace_back(makeMemberDebugType(memberType, debugTypeLocs[memberType])); // TODO: Need to rethink this method of passing location information. // debugTypeLocs.erase(memberType); } // Create The structure debug type. Instruction* type = new Instruction(getUniqueId(), makeVoidType(), Op::OpExtInst); type->reserveOperands(memberDebugTypes.size() + 11); type->addIdOperand(nonSemanticShaderDebugInfo); type->addImmediateOperand(NonSemanticShaderDebugInfo100DebugTypeComposite); type->addIdOperand(getStringId(name)); // name id type->addIdOperand(makeUintConstant(tag)); // tag id type->addIdOperand(makeDebugSource(currentFileId)); // source id type->addIdOperand(makeUintConstant(currentLine)); // line id TODO: currentLine always zero? type->addIdOperand(makeUintConstant(0)); // TODO: column id type->addIdOperand(makeDebugCompilationUnit()); // scope id if(isOpaqueType == true) { // Prepend '@' to opaque types. type->addIdOperand(getStringId('@' + std::string(name))); // linkage name id type->addIdOperand(makeDebugInfoNone()); // size id } else { type->addIdOperand(getStringId(name)); // linkage name id type->addIdOperand(makeUintConstant(0)); // TODO: size id } type->addIdOperand(makeUintConstant(NonSemanticShaderDebugInfo100FlagIsPublic)); // flags id assert(isOpaqueType == false || (isOpaqueType == true && memberDebugTypes.empty())); for(auto const memberDebugType : memberDebugTypes) { type->addIdOperand(memberDebugType); } groupedDebugTypes[NonSemanticShaderDebugInfo100DebugTypeComposite].push_back(type); constantsTypesGlobals.push_back(std::unique_ptr(type)); module.mapInstruction(type); return type->getResultId(); } Id Builder::makePointerDebugType(StorageClass storageClass, Id const baseType) { const Id debugBaseType = debugId[baseType]; if (!debugBaseType) { return makeDebugInfoNone(); } const Id scID = makeUintConstant(storageClass); for (Instruction* otherType : groupedDebugTypes[NonSemanticShaderDebugInfo100DebugTypePointer]) { if (otherType->getIdOperand(2) == debugBaseType && otherType->getIdOperand(3) == scID) { return otherType->getResultId(); } } Instruction* type = new Instruction(getUniqueId(), makeVoidType(), Op::OpExtInst); type->reserveOperands(5); type->addIdOperand(nonSemanticShaderDebugInfo); type->addImmediateOperand(NonSemanticShaderDebugInfo100DebugTypePointer); type->addIdOperand(debugBaseType); type->addIdOperand(scID); type->addIdOperand(makeUintConstant(0)); groupedDebugTypes[NonSemanticShaderDebugInfo100DebugTypePointer].push_back(type); constantsTypesGlobals.push_back(std::unique_ptr(type)); module.mapInstruction(type); return type->getResultId(); } // Emit a OpExtInstWithForwardRefsKHR nonsemantic instruction for a pointer debug type // where we don't have the pointee yet. Since we don't have the pointee yet, it just // points to itself and we rely on patching it later. Id Builder::makeForwardPointerDebugType(StorageClass storageClass) { const Id scID = makeUintConstant(storageClass); this->addExtension(spv::E_SPV_KHR_relaxed_extended_instruction); Instruction *type = new Instruction(getUniqueId(), makeVoidType(), Op::OpExtInstWithForwardRefsKHR); type->addIdOperand(nonSemanticShaderDebugInfo); type->addImmediateOperand(NonSemanticShaderDebugInfo100DebugTypePointer); type->addIdOperand(type->getResultId()); type->addIdOperand(scID); type->addIdOperand(makeUintConstant(0)); groupedDebugTypes[NonSemanticShaderDebugInfo100DebugTypePointer].push_back(type); constantsTypesGlobals.push_back(std::unique_ptr(type)); module.mapInstruction(type); return type->getResultId(); } Id Builder::makeDebugSource(const Id fileName) { if (debugSourceId.find(fileName) != debugSourceId.end()) return debugSourceId[fileName]; spv::Id resultId = getUniqueId(); Instruction* sourceInst = new Instruction(resultId, makeVoidType(), Op::OpExtInst); sourceInst->reserveOperands(3); sourceInst->addIdOperand(nonSemanticShaderDebugInfo); sourceInst->addImmediateOperand(NonSemanticShaderDebugInfo100DebugSource); sourceInst->addIdOperand(fileName); constantsTypesGlobals.push_back(std::unique_ptr(sourceInst)); module.mapInstruction(sourceInst); if (emitNonSemanticShaderDebugSource) { const int maxWordCount = 0xFFFF; const int opSourceWordCount = 4; const int nonNullBytesPerInstruction = 4 * (maxWordCount - opSourceWordCount) - 1; auto processDebugSource = [&](std::string source) { if (source.size() > 0) { int nextByte = 0; while ((int)source.size() - nextByte > 0) { auto subString = source.substr(nextByte, nonNullBytesPerInstruction); auto sourceId = getStringId(subString); if (nextByte == 0) { // DebugSource sourceInst->addIdOperand(sourceId); } else { // DebugSourceContinued Instruction* sourceContinuedInst = new Instruction(getUniqueId(), makeVoidType(), Op::OpExtInst); sourceContinuedInst->reserveOperands(2); sourceContinuedInst->addIdOperand(nonSemanticShaderDebugInfo); sourceContinuedInst->addImmediateOperand(NonSemanticShaderDebugInfo100DebugSourceContinued); sourceContinuedInst->addIdOperand(sourceId); constantsTypesGlobals.push_back(std::unique_ptr(sourceContinuedInst)); module.mapInstruction(sourceContinuedInst); } nextByte += nonNullBytesPerInstruction; } } else { auto sourceId = getStringId(source); sourceInst->addIdOperand(sourceId); } }; if (fileName == mainFileId) { processDebugSource(sourceText); } else { auto incItr = includeFiles.find(fileName); if (incItr != includeFiles.end()) { processDebugSource(*incItr->second); } else { // We omit the optional source text item if not available in glslang } } } debugSourceId[fileName] = resultId; return resultId; } Id Builder::makeDebugCompilationUnit() { if (nonSemanticShaderCompilationUnitId != 0) return nonSemanticShaderCompilationUnitId; spv::Id resultId = getUniqueId(); Instruction* sourceInst = new Instruction(resultId, makeVoidType(), Op::OpExtInst); sourceInst->reserveOperands(6); sourceInst->addIdOperand(nonSemanticShaderDebugInfo); sourceInst->addImmediateOperand(NonSemanticShaderDebugInfo100DebugCompilationUnit); sourceInst->addIdOperand(makeUintConstant(1)); // TODO(greg-lunarg): Get rid of magic number sourceInst->addIdOperand(makeUintConstant(4)); // TODO(greg-lunarg): Get rid of magic number sourceInst->addIdOperand(makeDebugSource(mainFileId)); sourceInst->addIdOperand(makeUintConstant(sourceLang)); constantsTypesGlobals.push_back(std::unique_ptr(sourceInst)); module.mapInstruction(sourceInst); nonSemanticShaderCompilationUnitId = resultId; // We can reasonably assume that makeDebugCompilationUnit will be called before any of // debug-scope stack. Function scopes and lexical scopes will occur afterward. assert(currentDebugScopeId.empty()); currentDebugScopeId.push(nonSemanticShaderCompilationUnitId); return resultId; } Id Builder::createDebugGlobalVariable(Id const type, char const*const name, Id const variable) { assert(type != 0); Instruction* inst = new Instruction(getUniqueId(), makeVoidType(), Op::OpExtInst); inst->reserveOperands(11); inst->addIdOperand(nonSemanticShaderDebugInfo); inst->addImmediateOperand(NonSemanticShaderDebugInfo100DebugGlobalVariable); inst->addIdOperand(getStringId(name)); // name id inst->addIdOperand(type); // type id inst->addIdOperand(makeDebugSource(currentFileId)); // source id inst->addIdOperand(makeUintConstant(currentLine)); // line id TODO: currentLine always zero? inst->addIdOperand(makeUintConstant(0)); // TODO: column id inst->addIdOperand(makeDebugCompilationUnit()); // scope id inst->addIdOperand(getStringId(name)); // linkage name id inst->addIdOperand(variable); // variable id inst->addIdOperand(makeUintConstant(NonSemanticShaderDebugInfo100FlagIsDefinition)); // flags id constantsTypesGlobals.push_back(std::unique_ptr(inst)); module.mapInstruction(inst); return inst->getResultId(); } Id Builder::createDebugLocalVariable(Id type, char const*const name, size_t const argNumber) { assert(name != nullptr); assert(!currentDebugScopeId.empty()); Instruction* inst = new Instruction(getUniqueId(), makeVoidType(), Op::OpExtInst); inst->reserveOperands(9); inst->addIdOperand(nonSemanticShaderDebugInfo); inst->addImmediateOperand(NonSemanticShaderDebugInfo100DebugLocalVariable); inst->addIdOperand(getStringId(name)); // name id inst->addIdOperand(type); // type id inst->addIdOperand(makeDebugSource(currentFileId)); // source id inst->addIdOperand(makeUintConstant(currentLine)); // line id inst->addIdOperand(makeUintConstant(0)); // TODO: column id inst->addIdOperand(currentDebugScopeId.top()); // scope id inst->addIdOperand(makeUintConstant(NonSemanticShaderDebugInfo100FlagIsLocal)); // flags id if(argNumber != 0) { inst->addIdOperand(makeUintConstant(argNumber)); } constantsTypesGlobals.push_back(std::unique_ptr(inst)); module.mapInstruction(inst); return inst->getResultId(); } Id Builder::makeDebugExpression() { if (debugExpression != 0) return debugExpression; Instruction* inst = new Instruction(getUniqueId(), makeVoidType(), Op::OpExtInst); inst->reserveOperands(2); inst->addIdOperand(nonSemanticShaderDebugInfo); inst->addImmediateOperand(NonSemanticShaderDebugInfo100DebugExpression); constantsTypesGlobals.push_back(std::unique_ptr(inst)); module.mapInstruction(inst); debugExpression = inst->getResultId(); return debugExpression; } Id Builder::makeDebugDeclare(Id const debugLocalVariable, Id const pointer) { Instruction* inst = new Instruction(getUniqueId(), makeVoidType(), Op::OpExtInst); inst->reserveOperands(5); inst->addIdOperand(nonSemanticShaderDebugInfo); inst->addImmediateOperand(NonSemanticShaderDebugInfo100DebugDeclare); inst->addIdOperand(debugLocalVariable); // debug local variable id inst->addIdOperand(pointer); // pointer to local variable id inst->addIdOperand(makeDebugExpression()); // expression id addInstruction(std::unique_ptr(inst)); return inst->getResultId(); } Id Builder::makeDebugValue(Id const debugLocalVariable, Id const value) { Instruction* inst = new Instruction(getUniqueId(), makeVoidType(), Op::OpExtInst); inst->reserveOperands(5); inst->addIdOperand(nonSemanticShaderDebugInfo); inst->addImmediateOperand(NonSemanticShaderDebugInfo100DebugValue); inst->addIdOperand(debugLocalVariable); // debug local variable id inst->addIdOperand(value); // value of local variable id inst->addIdOperand(makeDebugExpression()); // expression id addInstruction(std::unique_ptr(inst)); return inst->getResultId(); } Id Builder::makeAccelerationStructureType() { Instruction *type; if (groupedTypes[enumCast(Op::OpTypeAccelerationStructureKHR)].size() == 0) { type = new Instruction(getUniqueId(), NoType, Op::OpTypeAccelerationStructureKHR); groupedTypes[enumCast(Op::OpTypeAccelerationStructureKHR)].push_back(type); constantsTypesGlobals.push_back(std::unique_ptr(type)); module.mapInstruction(type); if (emitNonSemanticShaderDebugInfo) { spv::Id debugType = makeCompositeDebugType({}, "accelerationStructure", NonSemanticShaderDebugInfo100Structure, true); debugId[type->getResultId()] = debugType; } } else { type = groupedTypes[enumCast(Op::OpTypeAccelerationStructureKHR)].back(); } return type->getResultId(); } Id Builder::makeRayQueryType() { Instruction *type; if (groupedTypes[enumCast(Op::OpTypeRayQueryKHR)].size() == 0) { type = new Instruction(getUniqueId(), NoType, Op::OpTypeRayQueryKHR); groupedTypes[enumCast(Op::OpTypeRayQueryKHR)].push_back(type); constantsTypesGlobals.push_back(std::unique_ptr(type)); module.mapInstruction(type); if (emitNonSemanticShaderDebugInfo) { spv::Id debugType = makeCompositeDebugType({}, "rayQuery", NonSemanticShaderDebugInfo100Structure, true); debugId[type->getResultId()] = debugType; } } else { type = groupedTypes[enumCast(Op::OpTypeRayQueryKHR)].back(); } return type->getResultId(); } Id Builder::makeHitObjectNVType() { Instruction *type; if (groupedTypes[enumCast(Op::OpTypeHitObjectNV)].size() == 0) { type = new Instruction(getUniqueId(), NoType, Op::OpTypeHitObjectNV); groupedTypes[enumCast(Op::OpTypeHitObjectNV)].push_back(type); constantsTypesGlobals.push_back(std::unique_ptr(type)); module.mapInstruction(type); } else { type = groupedTypes[enumCast(Op::OpTypeHitObjectNV)].back(); } return type->getResultId(); } Id Builder::getDerefTypeId(Id resultId) const { Id typeId = getTypeId(resultId); assert(isPointerType(typeId)); return module.getInstruction(typeId)->getIdOperand(1); } Op Builder::getMostBasicTypeClass(Id typeId) const { Instruction* instr = module.getInstruction(typeId); Op typeClass = instr->getOpCode(); switch (typeClass) { case Op::OpTypeVector: case Op::OpTypeMatrix: case Op::OpTypeArray: case Op::OpTypeRuntimeArray: return getMostBasicTypeClass(instr->getIdOperand(0)); case Op::OpTypePointer: return getMostBasicTypeClass(instr->getIdOperand(1)); default: return typeClass; } } unsigned int Builder::getNumTypeConstituents(Id typeId) const { Instruction* instr = module.getInstruction(typeId); switch (instr->getOpCode()) { case Op::OpTypeBool: case Op::OpTypeInt: case Op::OpTypeFloat: case Op::OpTypePointer: return 1; case Op::OpTypeVector: case Op::OpTypeMatrix: return instr->getImmediateOperand(1); case Op::OpTypeCooperativeVectorNV: case Op::OpTypeArray: { Id lengthId = instr->getIdOperand(1); return module.getInstruction(lengthId)->getImmediateOperand(0); } case Op::OpTypeStruct: return instr->getNumOperands(); case Op::OpTypeCooperativeMatrixKHR: case Op::OpTypeCooperativeMatrixNV: // has only one constituent when used with OpCompositeConstruct. return 1; default: assert(0); return 1; } } // Return the lowest-level type of scalar that an homogeneous composite is made out of. // Typically, this is just to find out if something is made out of ints or floats. // However, it includes returning a structure, if say, it is an array of structure. Id Builder::getScalarTypeId(Id typeId) const { Instruction* instr = module.getInstruction(typeId); Op typeClass = instr->getOpCode(); switch (typeClass) { case Op::OpTypeVoid: case Op::OpTypeBool: case Op::OpTypeInt: case Op::OpTypeFloat: case Op::OpTypeStruct: return instr->getResultId(); case Op::OpTypeVector: case Op::OpTypeMatrix: case Op::OpTypeArray: case Op::OpTypeRuntimeArray: case Op::OpTypePointer: case Op::OpTypeCooperativeVectorNV: return getScalarTypeId(getContainedTypeId(typeId)); default: assert(0); return NoResult; } } // Return the type of 'member' of a composite. Id Builder::getContainedTypeId(Id typeId, int member) const { Instruction* instr = module.getInstruction(typeId); Op typeClass = instr->getOpCode(); switch (typeClass) { case Op::OpTypeVector: case Op::OpTypeMatrix: case Op::OpTypeArray: case Op::OpTypeRuntimeArray: case Op::OpTypeCooperativeMatrixKHR: case Op::OpTypeCooperativeMatrixNV: case Op::OpTypeCooperativeVectorNV: return instr->getIdOperand(0); case Op::OpTypePointer: return instr->getIdOperand(1); case Op::OpTypeStruct: return instr->getIdOperand(member); default: assert(0); return NoResult; } } // Figure out the final resulting type of the access chain. Id Builder::getResultingAccessChainType() const { assert(accessChain.base != NoResult); Id typeId = getTypeId(accessChain.base); assert(isPointerType(typeId)); typeId = getContainedTypeId(typeId); for (int i = 0; i < (int)accessChain.indexChain.size(); ++i) { if (isStructType(typeId)) { assert(isConstantScalar(accessChain.indexChain[i])); typeId = getContainedTypeId(typeId, getConstantScalar(accessChain.indexChain[i])); } else typeId = getContainedTypeId(typeId, accessChain.indexChain[i]); } return typeId; } // Return the immediately contained type of a given composite type. Id Builder::getContainedTypeId(Id typeId) const { return getContainedTypeId(typeId, 0); } // Returns true if 'typeId' is or contains a scalar type declared with 'typeOp' // of width 'width'. The 'width' is only consumed for int and float types. // Returns false otherwise. bool Builder::containsType(Id typeId, spv::Op typeOp, unsigned int width) const { const Instruction& instr = *module.getInstruction(typeId); Op typeClass = instr.getOpCode(); switch (typeClass) { case Op::OpTypeInt: case Op::OpTypeFloat: return typeClass == typeOp && instr.getImmediateOperand(0) == width; case Op::OpTypeStruct: for (int m = 0; m < instr.getNumOperands(); ++m) { if (containsType(instr.getIdOperand(m), typeOp, width)) return true; } return false; case Op::OpTypePointer: return false; case Op::OpTypeVector: case Op::OpTypeMatrix: case Op::OpTypeArray: case Op::OpTypeRuntimeArray: return containsType(getContainedTypeId(typeId), typeOp, width); default: return typeClass == typeOp; } } // return true if the type is a pointer to PhysicalStorageBufferEXT or an // contains such a pointer. These require restrict/aliased decorations. bool Builder::containsPhysicalStorageBufferOrArray(Id typeId) const { const Instruction& instr = *module.getInstruction(typeId); Op typeClass = instr.getOpCode(); switch (typeClass) { case Op::OpTypePointer: return getTypeStorageClass(typeId) == StorageClass::PhysicalStorageBufferEXT; case Op::OpTypeArray: return containsPhysicalStorageBufferOrArray(getContainedTypeId(typeId)); case Op::OpTypeStruct: for (int m = 0; m < instr.getNumOperands(); ++m) { if (containsPhysicalStorageBufferOrArray(instr.getIdOperand(m))) return true; } return false; default: return false; } } // See if a scalar constant of this type has already been created, so it // can be reused rather than duplicated. (Required by the specification). Id Builder::findScalarConstant(Op typeClass, Op opcode, Id typeId, unsigned value) { Instruction* constant; for (int i = 0; i < (int)groupedConstants[enumCast(typeClass)].size(); ++i) { constant = groupedConstants[enumCast(typeClass)][i]; if (constant->getOpCode() == opcode && constant->getTypeId() == typeId && constant->getImmediateOperand(0) == value) return constant->getResultId(); } return 0; } // Version of findScalarConstant (see above) for scalars that take two operands (e.g. a 'double' or 'int64'). Id Builder::findScalarConstant(Op typeClass, Op opcode, Id typeId, unsigned v1, unsigned v2) { Instruction* constant; for (int i = 0; i < (int)groupedConstants[enumCast(typeClass)].size(); ++i) { constant = groupedConstants[enumCast(typeClass)][i]; if (constant->getOpCode() == opcode && constant->getTypeId() == typeId && constant->getImmediateOperand(0) == v1 && constant->getImmediateOperand(1) == v2) return constant->getResultId(); } return 0; } // Return true if consuming 'opcode' means consuming a constant. // "constant" here means after final transform to executable code, // the value consumed will be a constant, so includes specialization. bool Builder::isConstantOpCode(Op opcode) const { switch (opcode) { case Op::OpUndef: case Op::OpConstantTrue: case Op::OpConstantFalse: case Op::OpConstant: case Op::OpConstantComposite: case Op::OpConstantCompositeReplicateEXT: case Op::OpConstantSampler: case Op::OpConstantNull: case Op::OpSpecConstantTrue: case Op::OpSpecConstantFalse: case Op::OpSpecConstant: case Op::OpSpecConstantComposite: case Op::OpSpecConstantCompositeReplicateEXT: case Op::OpSpecConstantOp: return true; default: return false; } } // Return true if consuming 'opcode' means consuming a specialization constant. bool Builder::isSpecConstantOpCode(Op opcode) const { switch (opcode) { case Op::OpSpecConstantTrue: case Op::OpSpecConstantFalse: case Op::OpSpecConstant: case Op::OpSpecConstantComposite: case Op::OpSpecConstantOp: case Op::OpSpecConstantCompositeReplicateEXT: return true; default: return false; } } Id Builder::makeNullConstant(Id typeId) { Instruction* constant; // See if we already made it. Id existing = NoResult; for (int i = 0; i < (int)nullConstants.size(); ++i) { constant = nullConstants[i]; if (constant->getTypeId() == typeId) existing = constant->getResultId(); } if (existing != NoResult) return existing; // Make it Instruction* c = new Instruction(getUniqueId(), typeId, Op::OpConstantNull); constantsTypesGlobals.push_back(std::unique_ptr(c)); nullConstants.push_back(c); module.mapInstruction(c); return c->getResultId(); } Id Builder::makeBoolConstant(bool b, bool specConstant) { Id typeId = makeBoolType(); Instruction* constant; Op opcode = specConstant ? (b ? Op::OpSpecConstantTrue : Op::OpSpecConstantFalse) : (b ? Op::OpConstantTrue : Op::OpConstantFalse); // See if we already made it. Applies only to regular constants, because specialization constants // must remain distinct for the purpose of applying a SpecId decoration. if (! specConstant) { Id existing = 0; for (int i = 0; i < (int)groupedConstants[enumCast(Op::OpTypeBool)].size(); ++i) { constant = groupedConstants[enumCast(Op::OpTypeBool)][i]; if (constant->getTypeId() == typeId && constant->getOpCode() == opcode) existing = constant->getResultId(); } if (existing) return existing; } // Make it Instruction* c = new Instruction(getUniqueId(), typeId, opcode); constantsTypesGlobals.push_back(std::unique_ptr(c)); groupedConstants[enumCast(Op::OpTypeBool)].push_back(c); module.mapInstruction(c); return c->getResultId(); } Id Builder::makeIntConstant(Id typeId, unsigned value, bool specConstant) { Op opcode = specConstant ? Op::OpSpecConstant : Op::OpConstant; // See if we already made it. Applies only to regular constants, because specialization constants // must remain distinct for the purpose of applying a SpecId decoration. if (! specConstant) { Id existing = findScalarConstant(Op::OpTypeInt, opcode, typeId, value); if (existing) return existing; } Instruction* c = new Instruction(getUniqueId(), typeId, opcode); c->addImmediateOperand(value); constantsTypesGlobals.push_back(std::unique_ptr(c)); groupedConstants[enumCast(Op::OpTypeInt)].push_back(c); module.mapInstruction(c); return c->getResultId(); } Id Builder::makeInt64Constant(Id typeId, unsigned long long value, bool specConstant) { Op opcode = specConstant ? Op::OpSpecConstant : Op::OpConstant; unsigned op1 = value & 0xFFFFFFFF; unsigned op2 = value >> 32; // See if we already made it. Applies only to regular constants, because specialization constants // must remain distinct for the purpose of applying a SpecId decoration. if (! specConstant) { Id existing = findScalarConstant(Op::OpTypeInt, opcode, typeId, op1, op2); if (existing) return existing; } Instruction* c = new Instruction(getUniqueId(), typeId, opcode); c->reserveOperands(2); c->addImmediateOperand(op1); c->addImmediateOperand(op2); constantsTypesGlobals.push_back(std::unique_ptr(c)); groupedConstants[enumCast(Op::OpTypeInt)].push_back(c); module.mapInstruction(c); return c->getResultId(); } Id Builder::makeFloatConstant(float f, bool specConstant) { Op opcode = specConstant ? Op::OpSpecConstant : Op::OpConstant; Id typeId = makeFloatType(32); union { float fl; unsigned int ui; } u; u.fl = f; unsigned value = u.ui; // See if we already made it. Applies only to regular constants, because specialization constants // must remain distinct for the purpose of applying a SpecId decoration. if (! specConstant) { Id existing = findScalarConstant(Op::OpTypeFloat, opcode, typeId, value); if (existing) return existing; } Instruction* c = new Instruction(getUniqueId(), typeId, opcode); c->addImmediateOperand(value); constantsTypesGlobals.push_back(std::unique_ptr(c)); groupedConstants[enumCast(Op::OpTypeFloat)].push_back(c); module.mapInstruction(c); return c->getResultId(); } Id Builder::makeDoubleConstant(double d, bool specConstant) { Op opcode = specConstant ? Op::OpSpecConstant : Op::OpConstant; Id typeId = makeFloatType(64); union { double db; unsigned long long ull; } u; u.db = d; unsigned long long value = u.ull; unsigned op1 = value & 0xFFFFFFFF; unsigned op2 = value >> 32; // See if we already made it. Applies only to regular constants, because specialization constants // must remain distinct for the purpose of applying a SpecId decoration. if (! specConstant) { Id existing = findScalarConstant(Op::OpTypeFloat, opcode, typeId, op1, op2); if (existing) return existing; } Instruction* c = new Instruction(getUniqueId(), typeId, opcode); c->reserveOperands(2); c->addImmediateOperand(op1); c->addImmediateOperand(op2); constantsTypesGlobals.push_back(std::unique_ptr(c)); groupedConstants[enumCast(Op::OpTypeFloat)].push_back(c); module.mapInstruction(c); return c->getResultId(); } Id Builder::makeFloat16Constant(float f16, bool specConstant) { Op opcode = specConstant ? Op::OpSpecConstant : Op::OpConstant; Id typeId = makeFloatType(16); spvutils::HexFloat> fVal(f16); spvutils::HexFloat> f16Val(0); fVal.castTo(f16Val, spvutils::kRoundToZero); unsigned value = f16Val.value().getAsFloat().get_value(); // See if we already made it. Applies only to regular constants, because specialization constants // must remain distinct for the purpose of applying a SpecId decoration. if (!specConstant) { Id existing = findScalarConstant(Op::OpTypeFloat, opcode, typeId, value); if (existing) return existing; } Instruction* c = new Instruction(getUniqueId(), typeId, opcode); c->addImmediateOperand(value); constantsTypesGlobals.push_back(std::unique_ptr(c)); groupedConstants[enumCast(Op::OpTypeFloat)].push_back(c); module.mapInstruction(c); return c->getResultId(); } Id Builder::makeBFloat16Constant(float bf16, bool specConstant) { Op opcode = specConstant ? Op::OpSpecConstant : Op::OpConstant; Id typeId = makeBFloat16Type(); union { float f; uint32_t u; } un; un.f = bf16; // take high 16b of fp32 value. This is effectively round-to-zero, other than certain NaNs. unsigned value = un.u >> 16; // See if we already made it. Applies only to regular constants, because specialization constants // must remain distinct for the purpose of applying a SpecId decoration. if (!specConstant) { Id existing = findScalarConstant(Op::OpTypeFloat, opcode, typeId, value); if (existing) return existing; } Instruction* c = new Instruction(getUniqueId(), typeId, opcode); c->addImmediateOperand(value); constantsTypesGlobals.push_back(std::unique_ptr(c)); groupedConstants[enumCast(Op::OpTypeFloat)].push_back(c); module.mapInstruction(c); return c->getResultId(); } Id Builder::makeFloatE5M2Constant(float fe5m2, bool specConstant) { Op opcode = specConstant ? Op::OpSpecConstant : Op::OpConstant; Id typeId = makeFloatE5M2Type(); spvutils::HexFloat> fVal(fe5m2); spvutils::HexFloat> fe5m2Val(0); fVal.castTo(fe5m2Val, spvutils::kRoundToZero); unsigned value = fe5m2Val.value().getAsFloat().get_value(); // See if we already made it. Applies only to regular constants, because specialization constants // must remain distinct for the purpose of applying a SpecId decoration. if (!specConstant) { Id existing = findScalarConstant(Op::OpTypeFloat, opcode, typeId, value); if (existing) return existing; } Instruction* c = new Instruction(getUniqueId(), typeId, opcode); c->addImmediateOperand(value); constantsTypesGlobals.push_back(std::unique_ptr(c)); groupedConstants[enumCast(Op::OpTypeFloat)].push_back(c); module.mapInstruction(c); return c->getResultId(); } Id Builder::makeFloatE4M3Constant(float fe4m3, bool specConstant) { Op opcode = specConstant ? Op::OpSpecConstant : Op::OpConstant; Id typeId = makeFloatE4M3Type(); spvutils::HexFloat> fVal(fe4m3); spvutils::HexFloat> fe4m3Val(0); fVal.castTo(fe4m3Val, spvutils::kRoundToZero); unsigned value = fe4m3Val.value().getAsFloat().get_value(); // See if we already made it. Applies only to regular constants, because specialization constants // must remain distinct for the purpose of applying a SpecId decoration. if (!specConstant) { Id existing = findScalarConstant(Op::OpTypeFloat, opcode, typeId, value); if (existing) return existing; } Instruction* c = new Instruction(getUniqueId(), typeId, opcode); c->addImmediateOperand(value); constantsTypesGlobals.push_back(std::unique_ptr(c)); groupedConstants[enumCast(Op::OpTypeFloat)].push_back(c); module.mapInstruction(c); return c->getResultId(); } Id Builder::makeFpConstant(Id type, double d, bool specConstant) { const int width = getScalarTypeWidth(type); assert(isFloatType(type)); switch (width) { case 16: return makeFloat16Constant((float)d, specConstant); case 32: return makeFloatConstant((float)d, specConstant); case 64: return makeDoubleConstant(d, specConstant); default: break; } assert(false); return NoResult; } Id Builder::importNonSemanticShaderDebugInfoInstructions() { assert(emitNonSemanticShaderDebugInfo == true); if(nonSemanticShaderDebugInfo == 0) { this->addExtension(spv::E_SPV_KHR_non_semantic_info); nonSemanticShaderDebugInfo = this->import("NonSemantic.Shader.DebugInfo.100"); } return nonSemanticShaderDebugInfo; } Id Builder::findCompositeConstant(Op typeClass, Op opcode, Id typeId, const std::vector& comps, size_t numMembers) { Instruction* constant = nullptr; bool found = false; for (int i = 0; i < (int)groupedConstants[enumCast(typeClass)].size(); ++i) { constant = groupedConstants[enumCast(typeClass)][i]; if (constant->getTypeId() != typeId) continue; if (constant->getOpCode() != opcode) { continue; } if (constant->getNumOperands() != (int)numMembers) continue; // same contents? bool mismatch = false; for (int op = 0; op < constant->getNumOperands(); ++op) { if (constant->getIdOperand(op) != comps[op]) { mismatch = true; break; } } if (! mismatch) { found = true; break; } } return found ? constant->getResultId() : NoResult; } Id Builder::findStructConstant(Id typeId, const std::vector& comps) { Instruction* constant = nullptr; bool found = false; for (int i = 0; i < (int)groupedStructConstants[typeId].size(); ++i) { constant = groupedStructConstants[typeId][i]; // same contents? bool mismatch = false; for (int op = 0; op < constant->getNumOperands(); ++op) { if (constant->getIdOperand(op) != comps[op]) { mismatch = true; break; } } if (! mismatch) { found = true; break; } } return found ? constant->getResultId() : NoResult; } // Comments in header Id Builder::makeCompositeConstant(Id typeId, const std::vector& members, bool specConstant) { assert(typeId); Op typeClass = getTypeClass(typeId); bool replicate = false; size_t numMembers = members.size(); if (useReplicatedComposites || typeClass == Op::OpTypeCooperativeVectorNV) { // use replicate if all members are the same replicate = numMembers > 0 && std::equal(members.begin() + 1, members.end(), members.begin()); if (replicate) { numMembers = 1; addCapability(spv::Capability::ReplicatedCompositesEXT); addExtension(spv::E_SPV_EXT_replicated_composites); } } Op opcode = replicate ? (specConstant ? Op::OpSpecConstantCompositeReplicateEXT : Op::OpConstantCompositeReplicateEXT) : (specConstant ? Op::OpSpecConstantComposite : Op::OpConstantComposite); switch (typeClass) { case Op::OpTypeVector: case Op::OpTypeArray: case Op::OpTypeMatrix: case Op::OpTypeCooperativeMatrixKHR: case Op::OpTypeCooperativeMatrixNV: case Op::OpTypeCooperativeVectorNV: if (! specConstant) { Id existing = findCompositeConstant(typeClass, opcode, typeId, members, numMembers); if (existing) return existing; } break; case Op::OpTypeStruct: if (! specConstant) { Id existing = findStructConstant(typeId, members); if (existing) return existing; } break; default: assert(0); return makeFloatConstant(0.0); } Instruction* c = new Instruction(getUniqueId(), typeId, opcode); c->reserveOperands(members.size()); for (size_t op = 0; op < numMembers; ++op) c->addIdOperand(members[op]); constantsTypesGlobals.push_back(std::unique_ptr(c)); if (typeClass == Op::OpTypeStruct) groupedStructConstants[typeId].push_back(c); else groupedConstants[enumCast(typeClass)].push_back(c); module.mapInstruction(c); return c->getResultId(); } Instruction* Builder::addEntryPoint(ExecutionModel model, Function* function, const char* name) { Instruction* entryPoint = new Instruction(Op::OpEntryPoint); entryPoint->reserveOperands(3); entryPoint->addImmediateOperand(model); entryPoint->addIdOperand(function->getId()); entryPoint->addStringOperand(name); entryPoints.push_back(std::unique_ptr(entryPoint)); return entryPoint; } // Currently relying on the fact that all 'value' of interest are small non-negative values. void Builder::addExecutionMode(Function* entryPoint, ExecutionMode mode, int value1, int value2, int value3) { // entryPoint can be null if we are in compile-only mode if (!entryPoint) return; Instruction* instr = new Instruction(Op::OpExecutionMode); instr->reserveOperands(3); instr->addIdOperand(entryPoint->getId()); instr->addImmediateOperand(mode); if (value1 >= 0) instr->addImmediateOperand(value1); if (value2 >= 0) instr->addImmediateOperand(value2); if (value3 >= 0) instr->addImmediateOperand(value3); executionModes.push_back(std::unique_ptr(instr)); } void Builder::addExecutionMode(Function* entryPoint, ExecutionMode mode, const std::vector& literals) { // entryPoint can be null if we are in compile-only mode if (!entryPoint) return; Instruction* instr = new Instruction(Op::OpExecutionMode); instr->reserveOperands(literals.size() + 2); instr->addIdOperand(entryPoint->getId()); instr->addImmediateOperand(mode); for (auto literal : literals) instr->addImmediateOperand(literal); executionModes.push_back(std::unique_ptr(instr)); } void Builder::addExecutionModeId(Function* entryPoint, ExecutionMode mode, const std::vector& operandIds) { // entryPoint can be null if we are in compile-only mode if (!entryPoint) return; Instruction* instr = new Instruction(Op::OpExecutionModeId); instr->reserveOperands(operandIds.size() + 2); instr->addIdOperand(entryPoint->getId()); instr->addImmediateOperand(mode); for (auto operandId : operandIds) instr->addIdOperand(operandId); executionModes.push_back(std::unique_ptr(instr)); } void Builder::addName(Id id, const char* string) { Instruction* name = new Instruction(Op::OpName); name->reserveOperands(2); name->addIdOperand(id); name->addStringOperand(string); names.push_back(std::unique_ptr(name)); } void Builder::addMemberName(Id id, int memberNumber, const char* string) { Instruction* name = new Instruction(Op::OpMemberName); name->reserveOperands(3); name->addIdOperand(id); name->addImmediateOperand(memberNumber); name->addStringOperand(string); names.push_back(std::unique_ptr(name)); } void Builder::addDecoration(Id id, Decoration decoration, int num) { if (decoration == spv::Decoration::Max) return; Instruction* dec = new Instruction(Op::OpDecorate); dec->reserveOperands(2); dec->addIdOperand(id); dec->addImmediateOperand(decoration); if (num >= 0) dec->addImmediateOperand(num); decorations.insert(std::unique_ptr(dec)); } void Builder::addDecoration(Id id, Decoration decoration, const char* s) { if (decoration == spv::Decoration::Max) return; Instruction* dec = new Instruction(Op::OpDecorateString); dec->reserveOperands(3); dec->addIdOperand(id); dec->addImmediateOperand(decoration); dec->addStringOperand(s); decorations.insert(std::unique_ptr(dec)); } void Builder::addDecoration(Id id, Decoration decoration, const std::vector& literals) { if (decoration == spv::Decoration::Max) return; Instruction* dec = new Instruction(Op::OpDecorate); dec->reserveOperands(literals.size() + 2); dec->addIdOperand(id); dec->addImmediateOperand(decoration); for (auto literal : literals) dec->addImmediateOperand(literal); decorations.insert(std::unique_ptr(dec)); } void Builder::addDecoration(Id id, Decoration decoration, const std::vector& strings) { if (decoration == spv::Decoration::Max) return; Instruction* dec = new Instruction(Op::OpDecorateString); dec->reserveOperands(strings.size() + 2); dec->addIdOperand(id); dec->addImmediateOperand(decoration); for (auto string : strings) dec->addStringOperand(string); decorations.insert(std::unique_ptr(dec)); } void Builder::addLinkageDecoration(Id id, const char* name, spv::LinkageType linkType) { Instruction* dec = new Instruction(Op::OpDecorate); dec->reserveOperands(4); dec->addIdOperand(id); dec->addImmediateOperand(spv::Decoration::LinkageAttributes); dec->addStringOperand(name); dec->addImmediateOperand(linkType); decorations.insert(std::unique_ptr(dec)); } void Builder::addDecorationId(Id id, Decoration decoration, Id idDecoration) { if (decoration == spv::Decoration::Max) return; Instruction* dec = new Instruction(Op::OpDecorateId); dec->reserveOperands(3); dec->addIdOperand(id); dec->addImmediateOperand(decoration); dec->addIdOperand(idDecoration); decorations.insert(std::unique_ptr(dec)); } void Builder::addDecorationId(Id id, Decoration decoration, const std::vector& operandIds) { if(decoration == spv::Decoration::Max) return; Instruction* dec = new Instruction(Op::OpDecorateId); dec->reserveOperands(operandIds.size() + 2); dec->addIdOperand(id); dec->addImmediateOperand(decoration); for (auto operandId : operandIds) dec->addIdOperand(operandId); decorations.insert(std::unique_ptr(dec)); } void Builder::addMemberDecoration(Id id, unsigned int member, Decoration decoration, int num) { if (decoration == spv::Decoration::Max) return; Instruction* dec = new Instruction(Op::OpMemberDecorate); dec->reserveOperands(3); dec->addIdOperand(id); dec->addImmediateOperand(member); dec->addImmediateOperand(decoration); if (num >= 0) dec->addImmediateOperand(num); decorations.insert(std::unique_ptr(dec)); } void Builder::addMemberDecoration(Id id, unsigned int member, Decoration decoration, const char *s) { if (decoration == spv::Decoration::Max) return; Instruction* dec = new Instruction(Op::OpMemberDecorateStringGOOGLE); dec->reserveOperands(4); dec->addIdOperand(id); dec->addImmediateOperand(member); dec->addImmediateOperand(decoration); dec->addStringOperand(s); decorations.insert(std::unique_ptr(dec)); } void Builder::addMemberDecoration(Id id, unsigned int member, Decoration decoration, const std::vector& literals) { if (decoration == spv::Decoration::Max) return; Instruction* dec = new Instruction(Op::OpMemberDecorate); dec->reserveOperands(literals.size() + 3); dec->addIdOperand(id); dec->addImmediateOperand(member); dec->addImmediateOperand(decoration); for (auto literal : literals) dec->addImmediateOperand(literal); decorations.insert(std::unique_ptr(dec)); } void Builder::addMemberDecoration(Id id, unsigned int member, Decoration decoration, const std::vector& strings) { if (decoration == spv::Decoration::Max) return; Instruction* dec = new Instruction(Op::OpMemberDecorateString); dec->reserveOperands(strings.size() + 3); dec->addIdOperand(id); dec->addImmediateOperand(member); dec->addImmediateOperand(decoration); for (auto string : strings) dec->addStringOperand(string); decorations.insert(std::unique_ptr(dec)); } void Builder::addInstruction(std::unique_ptr inst) { // Phis must appear first in their block, don't insert line tracking instructions // in front of them, just add the OpPhi and return. if (inst->getOpCode() == Op::OpPhi) { buildPoint->addInstruction(std::move(inst)); return; } // Optionally insert OpDebugScope if (emitNonSemanticShaderDebugInfo && dirtyScopeTracker) { if (buildPoint->updateDebugScope(currentDebugScopeId.top())) { auto scopeInst = std::make_unique(getUniqueId(), makeVoidType(), Op::OpExtInst); scopeInst->reserveOperands(3); scopeInst->addIdOperand(nonSemanticShaderDebugInfo); scopeInst->addImmediateOperand(NonSemanticShaderDebugInfo100DebugScope); scopeInst->addIdOperand(currentDebugScopeId.top()); buildPoint->addInstruction(std::move(scopeInst)); } dirtyScopeTracker = false; } // Insert OpLine/OpDebugLine if the debug source location has changed if (trackDebugInfo && dirtyLineTracker) { if (buildPoint->updateDebugSourceLocation(currentLine, 0, currentFileId)) { if (emitSpirvDebugInfo) { auto lineInst = std::make_unique(Op::OpLine); lineInst->reserveOperands(3); lineInst->addIdOperand(currentFileId); lineInst->addImmediateOperand(currentLine); lineInst->addImmediateOperand(0); buildPoint->addInstruction(std::move(lineInst)); } if (emitNonSemanticShaderDebugInfo) { auto lineInst = std::make_unique(getUniqueId(), makeVoidType(), Op::OpExtInst); lineInst->reserveOperands(7); lineInst->addIdOperand(nonSemanticShaderDebugInfo); lineInst->addImmediateOperand(NonSemanticShaderDebugInfo100DebugLine); lineInst->addIdOperand(makeDebugSource(currentFileId)); lineInst->addIdOperand(makeUintConstant(currentLine)); lineInst->addIdOperand(makeUintConstant(currentLine)); lineInst->addIdOperand(makeUintConstant(0)); lineInst->addIdOperand(makeUintConstant(0)); buildPoint->addInstruction(std::move(lineInst)); } } dirtyLineTracker = false; } buildPoint->addInstruction(std::move(inst)); } void Builder::addInstructionNoDebugInfo(std::unique_ptr inst) { buildPoint->addInstruction(std::move(inst)); } // Comments in header Function* Builder::makeEntryPoint(const char* entryPoint) { assert(! entryPointFunction); auto const returnType = makeVoidType(); restoreNonSemanticShaderDebugInfo = emitNonSemanticShaderDebugInfo; if(sourceLang == spv::SourceLanguage::HLSL) { emitNonSemanticShaderDebugInfo = false; } Block* entry = nullptr; entryPointFunction = makeFunctionEntry(NoPrecision, returnType, entryPoint, LinkageType::Max, {}, {}, &entry); emitNonSemanticShaderDebugInfo = restoreNonSemanticShaderDebugInfo; return entryPointFunction; } // Comments in header Function* Builder::makeFunctionEntry(Decoration precision, Id returnType, const char* name, LinkageType linkType, const std::vector& paramTypes, const std::vector>& decorations, Block** entry) { // Make the function and initial instructions in it Id typeId = makeFunctionType(returnType, paramTypes); Id firstParamId = paramTypes.size() == 0 ? 0 : getUniqueIds((int)paramTypes.size()); Id funcId = getUniqueId(); Function* function = new Function(funcId, returnType, typeId, firstParamId, linkType, name, module); // Set up the precisions setPrecision(function->getId(), precision); function->setReturnPrecision(precision); for (unsigned p = 0; p < (unsigned)decorations.size(); ++p) { for (int d = 0; d < (int)decorations[p].size(); ++d) { addDecoration(firstParamId + p, decorations[p][d]); function->addParamPrecision(p, decorations[p][d]); } } // reset last debug scope if (emitNonSemanticShaderDebugInfo) { dirtyScopeTracker = true; } // CFG assert(entry != nullptr); *entry = new Block(getUniqueId(), *function); function->addBlock(*entry); setBuildPoint(*entry); if (name) addName(function->getId(), name); functions.push_back(std::unique_ptr(function)); return function; } void Builder::setupFunctionDebugInfo(Function* function, const char* name, const std::vector& paramTypes, const std::vector& paramNames) { if (!emitNonSemanticShaderDebugInfo) return; Id nameId = getStringId(unmangleFunctionName(name)); Id funcTypeId = function->getFuncTypeId(); assert(debugId[funcTypeId] != 0); Id funcId = function->getId(); assert(funcId != 0); // Make the debug function instruction Id debugFuncId = makeDebugFunction(function, nameId, funcTypeId); debugId[funcId] = debugFuncId; currentDebugScopeId.push(debugFuncId); // DebugScope and DebugLine for parameter DebugDeclares assert(paramTypes.size() == paramNames.size()); if ((int)paramTypes.size() > 0) { Id firstParamId = function->getParamId(0); for (size_t p = 0; p < paramTypes.size(); ++p) { bool passByRef = false; Id paramTypeId = paramTypes[p]; // For pointer-typed parameters, they are actually passed by reference and we need unwrap the pointer to get the actual parameter type. if (isPointerType(paramTypeId) || isArrayType(paramTypeId)) { passByRef = true; paramTypeId = getContainedTypeId(paramTypeId); } auto const& paramName = paramNames[p]; auto const debugLocalVariableId = createDebugLocalVariable(debugId[paramTypeId], paramName, p + 1); auto const paramId = static_cast(firstParamId + p); debugId[paramId] = debugLocalVariableId; if (passByRef) { makeDebugDeclare(debugLocalVariableId, paramId); } else { makeDebugValue(debugLocalVariableId, paramId); } } } // Clear debug scope stack if (emitNonSemanticShaderDebugInfo) currentDebugScopeId.pop(); } Id Builder::makeDebugFunction([[maybe_unused]] Function* function, Id nameId, Id funcTypeId) { assert(function != nullptr); assert(nameId != 0); assert(funcTypeId != 0); assert(debugId[funcTypeId] != 0); Id funcId = getUniqueId(); auto type = new Instruction(funcId, makeVoidType(), Op::OpExtInst); type->reserveOperands(11); type->addIdOperand(nonSemanticShaderDebugInfo); type->addImmediateOperand(NonSemanticShaderDebugInfo100DebugFunction); type->addIdOperand(nameId); type->addIdOperand(debugId[funcTypeId]); type->addIdOperand(makeDebugSource(currentFileId)); // TODO: This points to file of definition instead of declaration type->addIdOperand(makeUintConstant(currentLine)); // TODO: This points to line of definition instead of declaration type->addIdOperand(makeUintConstant(0)); // column type->addIdOperand(makeDebugCompilationUnit()); // scope type->addIdOperand(nameId); // linkage name type->addIdOperand(makeUintConstant(NonSemanticShaderDebugInfo100FlagIsPublic)); type->addIdOperand(makeUintConstant(currentLine)); constantsTypesGlobals.push_back(std::unique_ptr(type)); module.mapInstruction(type); return funcId; } Id Builder::makeDebugLexicalBlock(uint32_t line, uint32_t column) { assert(!currentDebugScopeId.empty()); Id lexId = getUniqueId(); auto lex = new Instruction(lexId, makeVoidType(), Op::OpExtInst); lex->reserveOperands(6); lex->addIdOperand(nonSemanticShaderDebugInfo); lex->addImmediateOperand(NonSemanticShaderDebugInfo100DebugLexicalBlock); lex->addIdOperand(makeDebugSource(currentFileId)); lex->addIdOperand(makeUintConstant(line)); lex->addIdOperand(makeUintConstant(column)); // column lex->addIdOperand(currentDebugScopeId.top()); // scope constantsTypesGlobals.push_back(std::unique_ptr(lex)); module.mapInstruction(lex); return lexId; } std::string Builder::unmangleFunctionName(std::string const& name) const { assert(name.length() > 0); if(name.rfind('(') != std::string::npos) { return name.substr(0, name.rfind('(')); } else { return name; } } // Comments in header void Builder::makeReturn(bool implicit, Id retVal) { if (retVal) { Instruction* inst = new Instruction(NoResult, NoType, Op::OpReturnValue); inst->addIdOperand(retVal); addInstruction(std::unique_ptr(inst)); } else addInstruction(std::unique_ptr(new Instruction(NoResult, NoType, Op::OpReturn))); if (! implicit) createAndSetNoPredecessorBlock("post-return"); } // Comments in header void Builder::enterLexicalBlock(uint32_t line, uint32_t column) { if (!emitNonSemanticShaderDebugInfo) { return; } // Generate new lexical scope debug instruction Id lexId = makeDebugLexicalBlock(line, column); currentDebugScopeId.push(lexId); dirtyScopeTracker = true; } // Comments in header void Builder::leaveLexicalBlock() { if (!emitNonSemanticShaderDebugInfo) { return; } // Pop current scope from stack and clear current scope currentDebugScopeId.pop(); dirtyScopeTracker = true; } // Comments in header void Builder::enterFunction(Function const* function) { // Save and disable debugInfo for HLSL entry point function. It is a wrapper // function with no user code in it. restoreNonSemanticShaderDebugInfo = emitNonSemanticShaderDebugInfo; if (sourceLang == spv::SourceLanguage::HLSL && function == entryPointFunction) { emitNonSemanticShaderDebugInfo = false; } if (emitNonSemanticShaderDebugInfo) { // Initialize scope state Id funcId = function->getFuncId(); currentDebugScopeId.push(debugId[funcId]); // Create DebugFunctionDefinition spv::Id resultId = getUniqueId(); Instruction* defInst = new Instruction(resultId, makeVoidType(), Op::OpExtInst); defInst->reserveOperands(4); defInst->addIdOperand(nonSemanticShaderDebugInfo); defInst->addImmediateOperand(NonSemanticShaderDebugInfo100DebugFunctionDefinition); defInst->addIdOperand(debugId[funcId]); defInst->addIdOperand(funcId); addInstruction(std::unique_ptr(defInst)); } if (auto linkType = function->getLinkType(); linkType != LinkageType::Max) { Id funcId = function->getFuncId(); addCapability(Capability::Linkage); addLinkageDecoration(funcId, function->getExportName(), linkType); } } // Comments in header void Builder::leaveFunction() { Block* block = buildPoint; Function& function = buildPoint->getParent(); assert(block); // If our function did not contain a return, add a return void now. if (! block->isTerminated()) { if (function.getReturnType() == makeVoidType()) makeReturn(true); else { makeReturn(true, createUndefined(function.getReturnType())); } } // Clear function scope from debug scope stack if (emitNonSemanticShaderDebugInfo) currentDebugScopeId.pop(); emitNonSemanticShaderDebugInfo = restoreNonSemanticShaderDebugInfo; } // Comments in header void Builder::makeStatementTerminator(spv::Op opcode, const char *name) { addInstruction(std::unique_ptr(new Instruction(opcode))); createAndSetNoPredecessorBlock(name); } // Comments in header void Builder::makeStatementTerminator(spv::Op opcode, const std::vector& operands, const char* name) { // It's assumed that the terminator instruction is always of void return type // However in future if there is a need for non void return type, new helper // methods can be created. createNoResultOp(opcode, operands); createAndSetNoPredecessorBlock(name); } // Comments in header Id Builder::createVariable(Decoration precision, StorageClass storageClass, Id type, const char* name, Id initializer, bool const compilerGenerated) { Id pointerType = makePointer(storageClass, type); Instruction* inst = new Instruction(getUniqueId(), pointerType, Op::OpVariable); inst->addImmediateOperand(storageClass); if (initializer != NoResult) inst->addIdOperand(initializer); switch (storageClass) { case StorageClass::Function: // Validation rules require the declaration in the entry block buildPoint->getParent().addLocalVariable(std::unique_ptr(inst)); if (emitNonSemanticShaderDebugInfo && !compilerGenerated) { auto const debugLocalVariableId = createDebugLocalVariable(debugId[type], name); debugId[inst->getResultId()] = debugLocalVariableId; makeDebugDeclare(debugLocalVariableId, inst->getResultId()); } break; default: constantsTypesGlobals.push_back(std::unique_ptr(inst)); module.mapInstruction(inst); if (emitNonSemanticShaderDebugInfo) { auto const debugResultId = createDebugGlobalVariable(debugId[type], name, inst->getResultId()); debugId[inst->getResultId()] = debugResultId; } break; } if (name) addName(inst->getResultId(), name); setPrecision(inst->getResultId(), precision); return inst->getResultId(); } // Comments in header Id Builder::createUndefined(Id type) { Instruction* inst = new Instruction(getUniqueId(), type, Op::OpUndef); addInstruction(std::unique_ptr(inst)); return inst->getResultId(); } // av/vis/nonprivate are unnecessary and illegal for some storage classes. spv::MemoryAccessMask Builder::sanitizeMemoryAccessForStorageClass(spv::MemoryAccessMask memoryAccess, StorageClass sc) const { switch (sc) { case spv::StorageClass::Uniform: case spv::StorageClass::Workgroup: case spv::StorageClass::StorageBuffer: case spv::StorageClass::PhysicalStorageBufferEXT: break; default: memoryAccess = spv::MemoryAccessMask(memoryAccess & ~(spv::MemoryAccessMask::MakePointerAvailableKHR | spv::MemoryAccessMask::MakePointerVisibleKHR | spv::MemoryAccessMask::NonPrivatePointerKHR)); break; } return memoryAccess; } // Comments in header void Builder::createStore(Id rValue, Id lValue, spv::MemoryAccessMask memoryAccess, spv::Scope scope, unsigned int alignment) { Instruction* store = new Instruction(Op::OpStore); store->reserveOperands(2); store->addIdOperand(lValue); store->addIdOperand(rValue); memoryAccess = sanitizeMemoryAccessForStorageClass(memoryAccess, getStorageClass(lValue)); if (memoryAccess != MemoryAccessMask::MaskNone) { store->addImmediateOperand(memoryAccess); if (anySet(memoryAccess, spv::MemoryAccessMask::Aligned)) { store->addImmediateOperand(alignment); } if (anySet(memoryAccess, spv::MemoryAccessMask::MakePointerAvailableKHR)) { store->addIdOperand(makeUintConstant(scope)); } } addInstruction(std::unique_ptr(store)); } // Comments in header Id Builder::createLoad(Id lValue, spv::Decoration precision, spv::MemoryAccessMask memoryAccess, spv::Scope scope, unsigned int alignment) { Instruction* load = new Instruction(getUniqueId(), getDerefTypeId(lValue), Op::OpLoad); load->addIdOperand(lValue); memoryAccess = sanitizeMemoryAccessForStorageClass(memoryAccess, getStorageClass(lValue)); if (memoryAccess != MemoryAccessMask::MaskNone) { load->addImmediateOperand(memoryAccess); if (anySet(memoryAccess, spv::MemoryAccessMask::Aligned)) { load->addImmediateOperand(alignment); } if (anySet(memoryAccess, spv::MemoryAccessMask::MakePointerVisibleKHR)) { load->addIdOperand(makeUintConstant(scope)); } } addInstruction(std::unique_ptr(load)); setPrecision(load->getResultId(), precision); return load->getResultId(); } // Comments in header Id Builder::createAccessChain(StorageClass storageClass, Id base, const std::vector& offsets) { // Figure out the final resulting type. Id typeId = getResultingAccessChainType(); typeId = makePointer(storageClass, typeId); // Make the instruction Instruction* chain = new Instruction(getUniqueId(), typeId, Op::OpAccessChain); chain->reserveOperands(offsets.size() + 1); chain->addIdOperand(base); for (int i = 0; i < (int)offsets.size(); ++i) chain->addIdOperand(offsets[i]); addInstruction(std::unique_ptr(chain)); return chain->getResultId(); } Id Builder::createArrayLength(Id base, unsigned int member) { spv::Id intType = makeUintType(32); Instruction* length = new Instruction(getUniqueId(), intType, Op::OpArrayLength); length->reserveOperands(2); length->addIdOperand(base); length->addImmediateOperand(member); addInstruction(std::unique_ptr(length)); return length->getResultId(); } Id Builder::createCooperativeMatrixLengthKHR(Id type) { spv::Id intType = makeUintType(32); // Generate code for spec constants if in spec constant operation // generation mode. if (generatingOpCodeForSpecConst) { return createSpecConstantOp(Op::OpCooperativeMatrixLengthKHR, intType, std::vector(1, type), std::vector()); } Instruction* length = new Instruction(getUniqueId(), intType, Op::OpCooperativeMatrixLengthKHR); length->addIdOperand(type); addInstruction(std::unique_ptr(length)); return length->getResultId(); } Id Builder::createCooperativeMatrixLengthNV(Id type) { spv::Id intType = makeUintType(32); // Generate code for spec constants if in spec constant operation // generation mode. if (generatingOpCodeForSpecConst) { return createSpecConstantOp(Op::OpCooperativeMatrixLengthNV, intType, std::vector(1, type), std::vector()); } Instruction* length = new Instruction(getUniqueId(), intType, Op::OpCooperativeMatrixLengthNV); length->addIdOperand(type); addInstruction(std::unique_ptr(length)); return length->getResultId(); } Id Builder::createCompositeExtract(Id composite, Id typeId, unsigned index) { // Generate code for spec constants if in spec constant operation // generation mode. if (generatingOpCodeForSpecConst) { return createSpecConstantOp(Op::OpCompositeExtract, typeId, std::vector(1, composite), std::vector(1, index)); } Instruction* extract = new Instruction(getUniqueId(), typeId, Op::OpCompositeExtract); extract->reserveOperands(2); extract->addIdOperand(composite); extract->addImmediateOperand(index); addInstruction(std::unique_ptr(extract)); return extract->getResultId(); } Id Builder::createCompositeExtract(Id composite, Id typeId, const std::vector& indexes) { // Generate code for spec constants if in spec constant operation // generation mode. if (generatingOpCodeForSpecConst) { return createSpecConstantOp(Op::OpCompositeExtract, typeId, std::vector(1, composite), indexes); } Instruction* extract = new Instruction(getUniqueId(), typeId, Op::OpCompositeExtract); extract->reserveOperands(indexes.size() + 1); extract->addIdOperand(composite); for (int i = 0; i < (int)indexes.size(); ++i) extract->addImmediateOperand(indexes[i]); addInstruction(std::unique_ptr(extract)); return extract->getResultId(); } Id Builder::createCompositeInsert(Id object, Id composite, Id typeId, unsigned index) { Instruction* insert = new Instruction(getUniqueId(), typeId, Op::OpCompositeInsert); insert->reserveOperands(3); insert->addIdOperand(object); insert->addIdOperand(composite); insert->addImmediateOperand(index); addInstruction(std::unique_ptr(insert)); return insert->getResultId(); } Id Builder::createCompositeInsert(Id object, Id composite, Id typeId, const std::vector& indexes) { Instruction* insert = new Instruction(getUniqueId(), typeId, Op::OpCompositeInsert); insert->reserveOperands(indexes.size() + 2); insert->addIdOperand(object); insert->addIdOperand(composite); for (int i = 0; i < (int)indexes.size(); ++i) insert->addImmediateOperand(indexes[i]); addInstruction(std::unique_ptr(insert)); return insert->getResultId(); } Id Builder::createVectorExtractDynamic(Id vector, Id typeId, Id componentIndex) { Instruction* extract = new Instruction(getUniqueId(), typeId, Op::OpVectorExtractDynamic); extract->reserveOperands(2); extract->addIdOperand(vector); extract->addIdOperand(componentIndex); addInstruction(std::unique_ptr(extract)); return extract->getResultId(); } Id Builder::createVectorInsertDynamic(Id vector, Id typeId, Id component, Id componentIndex) { Instruction* insert = new Instruction(getUniqueId(), typeId, Op::OpVectorInsertDynamic); insert->reserveOperands(3); insert->addIdOperand(vector); insert->addIdOperand(component); insert->addIdOperand(componentIndex); addInstruction(std::unique_ptr(insert)); return insert->getResultId(); } // An opcode that has no operands, no result id, and no type void Builder::createNoResultOp(Op opCode) { Instruction* op = new Instruction(opCode); addInstruction(std::unique_ptr(op)); } // An opcode that has one id operand, no result id, and no type void Builder::createNoResultOp(Op opCode, Id operand) { Instruction* op = new Instruction(opCode); op->addIdOperand(operand); addInstruction(std::unique_ptr(op)); } // An opcode that has one or more operands, no result id, and no type void Builder::createNoResultOp(Op opCode, const std::vector& operands) { Instruction* op = new Instruction(opCode); op->reserveOperands(operands.size()); for (auto id : operands) { op->addIdOperand(id); } addInstruction(std::unique_ptr(op)); } // An opcode that has multiple operands, no result id, and no type void Builder::createNoResultOp(Op opCode, const std::vector& operands) { Instruction* op = new Instruction(opCode); op->reserveOperands(operands.size()); for (auto it = operands.cbegin(); it != operands.cend(); ++it) { if (it->isId) op->addIdOperand(it->word); else op->addImmediateOperand(it->word); } addInstruction(std::unique_ptr(op)); } void Builder::createControlBarrier(Scope execution, Scope memory, MemorySemanticsMask semantics) { Instruction* op = new Instruction(Op::OpControlBarrier); op->reserveOperands(3); op->addIdOperand(makeUintConstant(execution)); op->addIdOperand(makeUintConstant(memory)); op->addIdOperand(makeUintConstant(semantics)); addInstruction(std::unique_ptr(op)); } void Builder::createMemoryBarrier(Scope executionScope, MemorySemanticsMask memorySemantics) { Instruction* op = new Instruction(Op::OpMemoryBarrier); op->reserveOperands(2); op->addIdOperand(makeUintConstant((unsigned)executionScope)); op->addIdOperand(makeUintConstant((unsigned)memorySemantics)); addInstruction(std::unique_ptr(op)); } // An opcode that has one operands, a result id, and a type Id Builder::createUnaryOp(Op opCode, Id typeId, Id operand) { // Generate code for spec constants if in spec constant operation // generation mode. if (generatingOpCodeForSpecConst) { return createSpecConstantOp(opCode, typeId, std::vector(1, operand), std::vector()); } Instruction* op = new Instruction(getUniqueId(), typeId, opCode); op->addIdOperand(operand); addInstruction(std::unique_ptr(op)); return op->getResultId(); } Id Builder::createBinOp(Op opCode, Id typeId, Id left, Id right) { // Generate code for spec constants if in spec constant operation // generation mode. if (generatingOpCodeForSpecConst) { std::vector operands(2); operands[0] = left; operands[1] = right; return createSpecConstantOp(opCode, typeId, operands, std::vector()); } Instruction* op = new Instruction(getUniqueId(), typeId, opCode); op->reserveOperands(2); op->addIdOperand(left); op->addIdOperand(right); addInstruction(std::unique_ptr(op)); return op->getResultId(); } Id Builder::createTriOp(Op opCode, Id typeId, Id op1, Id op2, Id op3) { // Generate code for spec constants if in spec constant operation // generation mode. if (generatingOpCodeForSpecConst) { std::vector operands(3); operands[0] = op1; operands[1] = op2; operands[2] = op3; return createSpecConstantOp( opCode, typeId, operands, std::vector()); } Instruction* op = new Instruction(getUniqueId(), typeId, opCode); op->reserveOperands(3); op->addIdOperand(op1); op->addIdOperand(op2); op->addIdOperand(op3); addInstruction(std::unique_ptr(op)); return op->getResultId(); } Id Builder::createOp(Op opCode, Id typeId, const std::vector& operands) { Instruction* op = new Instruction(getUniqueId(), typeId, opCode); op->reserveOperands(operands.size()); for (auto id : operands) op->addIdOperand(id); addInstruction(std::unique_ptr(op)); return op->getResultId(); } Id Builder::createOp(Op opCode, Id typeId, const std::vector& operands) { Instruction* op = new Instruction(getUniqueId(), typeId, opCode); op->reserveOperands(operands.size()); for (auto it = operands.cbegin(); it != operands.cend(); ++it) { if (it->isId) op->addIdOperand(it->word); else op->addImmediateOperand(it->word); } addInstruction(std::unique_ptr(op)); return op->getResultId(); } Id Builder::createSpecConstantOp(Op opCode, Id typeId, const std::vector& operands, const std::vector& literals) { Instruction* op = new Instruction(getUniqueId(), typeId, Op::OpSpecConstantOp); op->reserveOperands(operands.size() + literals.size() + 1); op->addImmediateOperand((unsigned) opCode); for (auto it = operands.cbegin(); it != operands.cend(); ++it) op->addIdOperand(*it); for (auto it = literals.cbegin(); it != literals.cend(); ++it) op->addImmediateOperand(*it); module.mapInstruction(op); constantsTypesGlobals.push_back(std::unique_ptr(op)); // OpSpecConstantOp's using 8 or 16 bit types require the associated capability if (containsType(typeId, Op::OpTypeInt, 8)) addCapability(Capability::Int8); if (containsType(typeId, Op::OpTypeInt, 16)) addCapability(Capability::Int16); if (containsType(typeId, Op::OpTypeFloat, 16)) addCapability(Capability::Float16); return op->getResultId(); } Id Builder::createFunctionCall(spv::Function* function, const std::vector& args) { Instruction* op = new Instruction(getUniqueId(), function->getReturnType(), Op::OpFunctionCall); op->reserveOperands(args.size() + 1); op->addIdOperand(function->getId()); for (int a = 0; a < (int)args.size(); ++a) op->addIdOperand(args[a]); addInstruction(std::unique_ptr(op)); return op->getResultId(); } // Comments in header Id Builder::createRvalueSwizzle(Decoration precision, Id typeId, Id source, const std::vector& channels) { if (channels.size() == 1) return setPrecision(createCompositeExtract(source, typeId, channels.front()), precision); if (generatingOpCodeForSpecConst) { std::vector operands(2); operands[0] = operands[1] = source; return setPrecision(createSpecConstantOp(Op::OpVectorShuffle, typeId, operands, channels), precision); } Instruction* swizzle = new Instruction(getUniqueId(), typeId, Op::OpVectorShuffle); assert(isVector(source)); swizzle->reserveOperands(channels.size() + 2); swizzle->addIdOperand(source); swizzle->addIdOperand(source); for (int i = 0; i < (int)channels.size(); ++i) swizzle->addImmediateOperand(channels[i]); addInstruction(std::unique_ptr(swizzle)); return setPrecision(swizzle->getResultId(), precision); } // Comments in header Id Builder::createLvalueSwizzle(Id typeId, Id target, Id source, const std::vector& channels) { if (channels.size() == 1 && getNumComponents(source) == 1) return createCompositeInsert(source, target, typeId, channels.front()); Instruction* swizzle = new Instruction(getUniqueId(), typeId, Op::OpVectorShuffle); assert(isVector(target)); swizzle->reserveOperands(2); swizzle->addIdOperand(target); assert(getNumComponents(source) == channels.size()); assert(isVector(source)); swizzle->addIdOperand(source); // Set up an identity shuffle from the base value to the result value unsigned int components[4]; int numTargetComponents = getNumComponents(target); for (int i = 0; i < numTargetComponents; ++i) components[i] = i; // Punch in the l-value swizzle for (int i = 0; i < (int)channels.size(); ++i) components[channels[i]] = numTargetComponents + i; // finish the instruction with these components selectors swizzle->reserveOperands(numTargetComponents); for (int i = 0; i < numTargetComponents; ++i) swizzle->addImmediateOperand(components[i]); addInstruction(std::unique_ptr(swizzle)); return swizzle->getResultId(); } // Comments in header void Builder::promoteScalar(Decoration precision, Id& left, Id& right) { int direction = getNumComponents(right) - getNumComponents(left); if (direction > 0) left = smearScalar(precision, left, makeVectorType(getTypeId(left), getNumComponents(right))); else if (direction < 0) right = smearScalar(precision, right, makeVectorType(getTypeId(right), getNumComponents(left))); return; } // Comments in header Id Builder::smearScalar(Decoration precision, Id scalar, Id vectorType) { assert(getNumComponents(scalar) == 1); assert(getTypeId(scalar) == getScalarTypeId(vectorType)); int numComponents = getNumTypeComponents(vectorType); if (numComponents == 1 && !isCooperativeVectorType(vectorType)) return scalar; Instruction* smear = nullptr; if (generatingOpCodeForSpecConst) { auto members = std::vector(numComponents, scalar); // Sometime even in spec-constant-op mode, the temporary vector created by // promoting a scalar might not be a spec constant. This should depend on // the scalar. // e.g.: // const vec2 spec_const_result = a_spec_const_vec2 + a_front_end_const_scalar; // In such cases, the temporary vector created from a_front_end_const_scalar // is not a spec constant vector, even though the binary operation node is marked // as 'specConstant' and we are in spec-constant-op mode. auto result_id = makeCompositeConstant(vectorType, members, isSpecConstant(scalar)); smear = module.getInstruction(result_id); } else { bool replicate = (useReplicatedComposites || isCooperativeVectorType(vectorType)) && (numComponents > 0); if (replicate) { numComponents = 1; addCapability(spv::Capability::ReplicatedCompositesEXT); addExtension(spv::E_SPV_EXT_replicated_composites); } Op opcode = replicate ? Op::OpCompositeConstructReplicateEXT : Op::OpCompositeConstruct; smear = new Instruction(getUniqueId(), vectorType, opcode); smear->reserveOperands(numComponents); for (int c = 0; c < numComponents; ++c) smear->addIdOperand(scalar); addInstruction(std::unique_ptr(smear)); } return setPrecision(smear->getResultId(), precision); } // Comments in header Id Builder::createBuiltinCall(Id resultType, Id builtins, int entryPoint, const std::vector& args) { Instruction* inst = new Instruction(getUniqueId(), resultType, Op::OpExtInst); inst->reserveOperands(args.size() + 2); inst->addIdOperand(builtins); inst->addImmediateOperand(entryPoint); for (int arg = 0; arg < (int)args.size(); ++arg) inst->addIdOperand(args[arg]); addInstruction(std::unique_ptr(inst)); return inst->getResultId(); } // Accept all parameters needed to create a texture instruction. // Create the correct instruction based on the inputs, and make the call. Id Builder::createTextureCall(Decoration precision, Id resultType, bool sparse, bool fetch, bool proj, bool gather, bool noImplicitLod, const TextureParameters& parameters, ImageOperandsMask signExtensionMask) { std::vector texArgs; // // Set up the fixed arguments // bool explicitLod = false; texArgs.push_back(parameters.sampler); texArgs.push_back(parameters.coords); if (parameters.Dref != NoResult) texArgs.push_back(parameters.Dref); if (parameters.component != NoResult) texArgs.push_back(parameters.component); if (parameters.granularity != NoResult) texArgs.push_back(parameters.granularity); if (parameters.coarse != NoResult) texArgs.push_back(parameters.coarse); // // Set up the optional arguments // size_t optArgNum = texArgs.size(); // the position of the mask for the optional arguments, if any. ImageOperandsMask mask = ImageOperandsMask::MaskNone; // the mask operand if (parameters.bias) { mask = (ImageOperandsMask)(mask | ImageOperandsMask::Bias); texArgs.push_back(parameters.bias); } if (parameters.lod) { mask = (ImageOperandsMask)(mask | ImageOperandsMask::Lod); texArgs.push_back(parameters.lod); explicitLod = true; } else if (parameters.gradX) { mask = (ImageOperandsMask)(mask | ImageOperandsMask::Grad); texArgs.push_back(parameters.gradX); texArgs.push_back(parameters.gradY); explicitLod = true; } else if (noImplicitLod && ! fetch && ! gather) { // have to explicitly use lod of 0 if not allowed to have them be implicit, and // we would otherwise be about to issue an implicit instruction mask = (ImageOperandsMask)(mask | ImageOperandsMask::Lod); texArgs.push_back(makeFloatConstant(0.0)); explicitLod = true; } if (parameters.offset) { if (isConstant(parameters.offset)) mask = (ImageOperandsMask)(mask | ImageOperandsMask::ConstOffset); else { addCapability(Capability::ImageGatherExtended); mask = (ImageOperandsMask)(mask | ImageOperandsMask::Offset); } texArgs.push_back(parameters.offset); } if (parameters.offsets) { if (!isConstant(parameters.offsets) && sourceLang == spv::SourceLanguage::GLSL) { mask = (ImageOperandsMask)(mask | ImageOperandsMask::Offsets); } else { addCapability(Capability::ImageGatherExtended); mask = (ImageOperandsMask)(mask | ImageOperandsMask::ConstOffsets); } texArgs.push_back(parameters.offsets); } if (parameters.sample) { mask = (ImageOperandsMask)(mask | ImageOperandsMask::Sample); texArgs.push_back(parameters.sample); } if (parameters.lodClamp) { // capability if this bit is used addCapability(Capability::MinLod); mask = (ImageOperandsMask)(mask | ImageOperandsMask::MinLod); texArgs.push_back(parameters.lodClamp); } if (parameters.nonprivate) { mask = mask | ImageOperandsMask::NonPrivateTexelKHR; } if (parameters.volatil) { mask = mask | ImageOperandsMask::VolatileTexelKHR; } if (parameters.nontemporal) { mask = mask | ImageOperandsMask::Nontemporal; } mask = mask | signExtensionMask; // insert the operand for the mask, if any bits were set. if (mask != ImageOperandsMask::MaskNone) texArgs.insert(texArgs.begin() + optArgNum, (Id)mask); // // Set up the instruction // Op opCode = Op::OpNop; // All paths below need to set this if (fetch) { if (sparse) opCode = Op::OpImageSparseFetch; else opCode = Op::OpImageFetch; } else if (parameters.granularity && parameters.coarse) { opCode = Op::OpImageSampleFootprintNV; } else if (gather) { if (parameters.Dref) if (sparse) opCode = Op::OpImageSparseDrefGather; else opCode = Op::OpImageDrefGather; else if (sparse) opCode = Op::OpImageSparseGather; else opCode = Op::OpImageGather; } else if (explicitLod) { if (parameters.Dref) { if (proj) if (sparse) opCode = Op::OpImageSparseSampleProjDrefExplicitLod; else opCode = Op::OpImageSampleProjDrefExplicitLod; else if (sparse) opCode = Op::OpImageSparseSampleDrefExplicitLod; else opCode = Op::OpImageSampleDrefExplicitLod; } else { if (proj) if (sparse) opCode = Op::OpImageSparseSampleProjExplicitLod; else opCode = Op::OpImageSampleProjExplicitLod; else if (sparse) opCode = Op::OpImageSparseSampleExplicitLod; else opCode = Op::OpImageSampleExplicitLod; } } else { if (parameters.Dref) { if (proj) if (sparse) opCode = Op::OpImageSparseSampleProjDrefImplicitLod; else opCode = Op::OpImageSampleProjDrefImplicitLod; else if (sparse) opCode = Op::OpImageSparseSampleDrefImplicitLod; else opCode = Op::OpImageSampleDrefImplicitLod; } else { if (proj) if (sparse) opCode = Op::OpImageSparseSampleProjImplicitLod; else opCode = Op::OpImageSampleProjImplicitLod; else if (sparse) opCode = Op::OpImageSparseSampleImplicitLod; else opCode = Op::OpImageSampleImplicitLod; } } // See if the result type is expecting a smeared result. // This happens when a legacy shadow*() call is made, which // gets a vec4 back instead of a float. Id smearedType = resultType; if (! isScalarType(resultType)) { switch (opCode) { case Op::OpImageSampleDrefImplicitLod: case Op::OpImageSampleDrefExplicitLod: case Op::OpImageSampleProjDrefImplicitLod: case Op::OpImageSampleProjDrefExplicitLod: resultType = getScalarTypeId(resultType); break; default: break; } } Id typeId0 = 0; Id typeId1 = 0; if (sparse) { typeId0 = resultType; typeId1 = getDerefTypeId(parameters.texelOut); resultType = makeStructResultType(typeId0, typeId1); } // Build the SPIR-V instruction Instruction* textureInst = new Instruction(getUniqueId(), resultType, opCode); textureInst->reserveOperands(optArgNum + (texArgs.size() - (optArgNum + 1))); for (size_t op = 0; op < optArgNum; ++op) textureInst->addIdOperand(texArgs[op]); if (optArgNum < texArgs.size()) textureInst->addImmediateOperand(texArgs[optArgNum]); for (size_t op = optArgNum + 1; op < texArgs.size(); ++op) textureInst->addIdOperand(texArgs[op]); setPrecision(textureInst->getResultId(), precision); addInstruction(std::unique_ptr(textureInst)); Id resultId = textureInst->getResultId(); if (sparse) { // set capability addCapability(Capability::SparseResidency); // Decode the return type that was a special structure createStore(createCompositeExtract(resultId, typeId1, 1), parameters.texelOut); resultId = createCompositeExtract(resultId, typeId0, 0); setPrecision(resultId, precision); } else { // When a smear is needed, do it, as per what was computed // above when resultType was changed to a scalar type. if (resultType != smearedType) resultId = smearScalar(precision, resultId, smearedType); } return resultId; } // Comments in header Id Builder::createTextureQueryCall(Op opCode, const TextureParameters& parameters, bool isUnsignedResult) { // Figure out the result type Id resultType = 0; switch (opCode) { case Op::OpImageQuerySize: case Op::OpImageQuerySizeLod: { int numComponents = 0; switch (getTypeDimensionality(getImageType(parameters.sampler))) { case Dim::Dim1D: case Dim::Buffer: numComponents = 1; break; case Dim::Dim2D: case Dim::Cube: case Dim::Rect: case Dim::SubpassData: numComponents = 2; break; case Dim::Dim3D: numComponents = 3; break; default: assert(0); break; } if (isArrayedImageType(getImageType(parameters.sampler))) ++numComponents; Id intType = isUnsignedResult ? makeUintType(32) : makeIntType(32); if (numComponents == 1) resultType = intType; else resultType = makeVectorType(intType, numComponents); break; } case Op::OpImageQueryLod: resultType = makeVectorType(getScalarTypeId(getTypeId(parameters.coords)), 2); break; case Op::OpImageQueryLevels: case Op::OpImageQuerySamples: resultType = isUnsignedResult ? makeUintType(32) : makeIntType(32); break; default: assert(0); break; } Instruction* query = new Instruction(getUniqueId(), resultType, opCode); query->addIdOperand(parameters.sampler); if (parameters.coords) query->addIdOperand(parameters.coords); if (parameters.lod) query->addIdOperand(parameters.lod); addInstruction(std::unique_ptr(query)); addCapability(Capability::ImageQuery); return query->getResultId(); } // External comments in header. // Operates recursively to visit the composite's hierarchy. Id Builder::createCompositeCompare(Decoration precision, Id value1, Id value2, bool equal) { Id boolType = makeBoolType(); Id valueType = getTypeId(value1); Id resultId = NoResult; int numConstituents = getNumTypeConstituents(valueType); // Scalars and Vectors if (isScalarType(valueType) || isVectorType(valueType)) { assert(valueType == getTypeId(value2)); // These just need a single comparison, just have // to figure out what it is. Op op; switch (getMostBasicTypeClass(valueType)) { case Op::OpTypeFloat: op = equal ? Op::OpFOrdEqual : Op::OpFUnordNotEqual; break; case Op::OpTypeInt: default: op = equal ? Op::OpIEqual : Op::OpINotEqual; break; case Op::OpTypeBool: op = equal ? Op::OpLogicalEqual : Op::OpLogicalNotEqual; precision = NoPrecision; break; } if (isScalarType(valueType)) { // scalar resultId = createBinOp(op, boolType, value1, value2); } else { // vector resultId = createBinOp(op, makeVectorType(boolType, numConstituents), value1, value2); setPrecision(resultId, precision); // reduce vector compares... resultId = createUnaryOp(equal ? Op::OpAll : Op::OpAny, boolType, resultId); } return setPrecision(resultId, precision); } // Only structs, arrays, and matrices should be left. // They share in common the reduction operation across their constituents. assert(isAggregateType(valueType) || isMatrixType(valueType)); // Compare each pair of constituents for (int constituent = 0; constituent < numConstituents; ++constituent) { std::vector indexes(1, constituent); Id constituentType1 = getContainedTypeId(getTypeId(value1), constituent); Id constituentType2 = getContainedTypeId(getTypeId(value2), constituent); Id constituent1 = createCompositeExtract(value1, constituentType1, indexes); Id constituent2 = createCompositeExtract(value2, constituentType2, indexes); Id subResultId = createCompositeCompare(precision, constituent1, constituent2, equal); if (constituent == 0) resultId = subResultId; else resultId = setPrecision(createBinOp(equal ? Op::OpLogicalAnd : Op::OpLogicalOr, boolType, resultId, subResultId), precision); } return resultId; } // OpCompositeConstruct Id Builder::createCompositeConstruct(Id typeId, const std::vector& constituents) { assert(isAggregateType(typeId) || (getNumTypeConstituents(typeId) > 1 && getNumTypeConstituents(typeId) == constituents.size()) || (isCooperativeVectorType(typeId) && constituents.size() == 1)); if (generatingOpCodeForSpecConst) { // Sometime, even in spec-constant-op mode, the constant composite to be // constructed may not be a specialization constant. // e.g.: // const mat2 m2 = mat2(a_spec_const, a_front_end_const, another_front_end_const, third_front_end_const); // The first column vector should be a spec constant one, as a_spec_const is a spec constant. // The second column vector should NOT be spec constant, as it does not contain any spec constants. // To handle such cases, we check the constituents of the constant vector to determine whether this // vector should be created as a spec constant. return makeCompositeConstant(typeId, constituents, std::any_of(constituents.begin(), constituents.end(), [&](spv::Id id) { return isSpecConstant(id); })); } bool replicate = false; size_t numConstituents = constituents.size(); if (useReplicatedComposites || isCooperativeVectorType(typeId)) { replicate = numConstituents > 0 && std::equal(constituents.begin() + 1, constituents.end(), constituents.begin()); } if (replicate) { numConstituents = 1; addCapability(spv::Capability::ReplicatedCompositesEXT); addExtension(spv::E_SPV_EXT_replicated_composites); } Op opcode = replicate ? Op::OpCompositeConstructReplicateEXT : Op::OpCompositeConstruct; Instruction* op = new Instruction(getUniqueId(), typeId, opcode); op->reserveOperands(constituents.size()); for (size_t c = 0; c < numConstituents; ++c) op->addIdOperand(constituents[c]); addInstruction(std::unique_ptr(op)); return op->getResultId(); } // coopmat conversion Id Builder::createCooperativeMatrixConversion(Id typeId, Id source) { Instruction* op = new Instruction(getUniqueId(), typeId, Op::OpCooperativeMatrixConvertNV); op->addIdOperand(source); addInstruction(std::unique_ptr(op)); return op->getResultId(); } // coopmat reduce Id Builder::createCooperativeMatrixReduce(Op opcode, Id typeId, Id source, unsigned int mask, Id func) { Instruction* op = new Instruction(getUniqueId(), typeId, opcode); op->addIdOperand(source); op->addImmediateOperand(mask); op->addIdOperand(func); addInstruction(std::unique_ptr(op)); return op->getResultId(); } // coopmat per-element operation Id Builder::createCooperativeMatrixPerElementOp(Id typeId, const std::vector& operands) { Instruction* op = new Instruction(getUniqueId(), typeId, spv::Op::OpCooperativeMatrixPerElementOpNV); // skip operand[0], which is where the result is stored for (uint32_t i = 1; i < operands.size(); ++i) { op->addIdOperand(operands[i]); } addInstruction(std::unique_ptr(op)); return op->getResultId(); } // Vector or scalar constructor Id Builder::createConstructor(Decoration precision, const std::vector& sources, Id resultTypeId) { Id result = NoResult; unsigned int numTargetComponents = getNumTypeComponents(resultTypeId); unsigned int targetComponent = 0; // Special case: when calling a vector constructor with a single scalar // argument, smear the scalar if (sources.size() == 1 && isScalar(sources[0]) && (numTargetComponents > 1 || isCooperativeVectorType(resultTypeId))) return smearScalar(precision, sources[0], resultTypeId); // Special case: 2 vectors of equal size if (sources.size() == 1 && isVector(sources[0]) && numTargetComponents == getNumComponents(sources[0])) { assert(resultTypeId == getTypeId(sources[0])); return sources[0]; } // accumulate the arguments for OpCompositeConstruct std::vector constituents; Id scalarTypeId = getScalarTypeId(resultTypeId); // lambda to store the result of visiting an argument component const auto latchResult = [&](Id comp) { if (numTargetComponents > 1) constituents.push_back(comp); else result = comp; ++targetComponent; }; // lambda to visit a vector argument's components const auto accumulateVectorConstituents = [&](Id sourceArg) { unsigned int sourceSize = getNumComponents(sourceArg); unsigned int sourcesToUse = sourceSize; if (sourcesToUse + targetComponent > numTargetComponents) sourcesToUse = numTargetComponents - targetComponent; for (unsigned int s = 0; s < sourcesToUse; ++s) { std::vector swiz; swiz.push_back(s); latchResult(createRvalueSwizzle(precision, scalarTypeId, sourceArg, swiz)); } }; // lambda to visit a matrix argument's components const auto accumulateMatrixConstituents = [&](Id sourceArg) { unsigned int sourceSize = getNumColumns(sourceArg) * getNumRows(sourceArg); unsigned int sourcesToUse = sourceSize; if (sourcesToUse + targetComponent > numTargetComponents) sourcesToUse = numTargetComponents - targetComponent; unsigned int col = 0; unsigned int row = 0; for (unsigned int s = 0; s < sourcesToUse; ++s) { if (row >= getNumRows(sourceArg)) { row = 0; col++; } std::vector indexes; indexes.push_back(col); indexes.push_back(row); latchResult(createCompositeExtract(sourceArg, scalarTypeId, indexes)); row++; } }; // Go through the source arguments, each one could have either // a single or multiple components to contribute. for (unsigned int i = 0; i < sources.size(); ++i) { if (isScalar(sources[i]) || isPointer(sources[i])) latchResult(sources[i]); else if (isVector(sources[i]) || isCooperativeVector(sources[i])) accumulateVectorConstituents(sources[i]); else if (isMatrix(sources[i])) accumulateMatrixConstituents(sources[i]); else assert(0); if (targetComponent >= numTargetComponents) break; } // If the result is a vector, make it from the gathered constituents. if (constituents.size() > 0) { result = createCompositeConstruct(resultTypeId, constituents); return setPrecision(result, precision); } else { // Precision was set when generating this component. return result; } } // Comments in header Id Builder::createMatrixConstructor(Decoration precision, const std::vector& sources, Id resultTypeId) { Id componentTypeId = getScalarTypeId(resultTypeId); unsigned int numCols = getTypeNumColumns(resultTypeId); unsigned int numRows = getTypeNumRows(resultTypeId); Instruction* instr = module.getInstruction(componentTypeId); const unsigned bitCount = instr->getImmediateOperand(0); // Optimize matrix constructed from a bigger matrix if (isMatrix(sources[0]) && getNumColumns(sources[0]) >= numCols && getNumRows(sources[0]) >= numRows) { // To truncate the matrix to a smaller number of rows/columns, we need to: // 1. For each column, extract the column and truncate it to the required size using shuffle // 2. Assemble the resulting matrix from all columns Id matrix = sources[0]; Id columnTypeId = getContainedTypeId(resultTypeId); Id sourceColumnTypeId = getContainedTypeId(getTypeId(matrix)); std::vector channels; for (unsigned int row = 0; row < numRows; ++row) channels.push_back(row); std::vector matrixColumns; for (unsigned int col = 0; col < numCols; ++col) { std::vector indexes; indexes.push_back(col); Id colv = createCompositeExtract(matrix, sourceColumnTypeId, indexes); setPrecision(colv, precision); if (numRows != getNumRows(matrix)) { matrixColumns.push_back(createRvalueSwizzle(precision, columnTypeId, colv, channels)); } else { matrixColumns.push_back(colv); } } return setPrecision(createCompositeConstruct(resultTypeId, matrixColumns), precision); } // Detect a matrix being constructed from a repeated vector of the correct size. // Create the composite directly from it. if (sources.size() == numCols && isVector(sources[0]) && getNumComponents(sources[0]) == numRows && std::equal(sources.begin() + 1, sources.end(), sources.begin())) { return setPrecision(createCompositeConstruct(resultTypeId, sources), precision); } // Otherwise, will use a two step process // 1. make a compile-time 2D array of values // 2. construct a matrix from that array // Step 1. // initialize the array to the identity matrix Id ids[maxMatrixSize][maxMatrixSize]; Id one = (bitCount == 64 ? makeDoubleConstant(1.0) : makeFloatConstant(1.0)); Id zero = (bitCount == 64 ? makeDoubleConstant(0.0) : makeFloatConstant(0.0)); for (int col = 0; col < 4; ++col) { for (int row = 0; row < 4; ++row) { if (col == row) ids[col][row] = one; else ids[col][row] = zero; } } // modify components as dictated by the arguments if (sources.size() == 1 && isScalar(sources[0])) { // a single scalar; resets the diagonals for (int col = 0; col < 4; ++col) ids[col][col] = sources[0]; } else if (isMatrix(sources[0])) { // constructing from another matrix; copy over the parts that exist in both the argument and constructee Id matrix = sources[0]; unsigned int minCols = std::min(numCols, getNumColumns(matrix)); unsigned int minRows = std::min(numRows, getNumRows(matrix)); for (unsigned int col = 0; col < minCols; ++col) { std::vector indexes; indexes.push_back(col); for (unsigned int row = 0; row < minRows; ++row) { indexes.push_back(row); ids[col][row] = createCompositeExtract(matrix, componentTypeId, indexes); indexes.pop_back(); setPrecision(ids[col][row], precision); } } } else { // fill in the matrix in column-major order with whatever argument components are available unsigned int row = 0; unsigned int col = 0; for (unsigned int arg = 0; arg < sources.size() && col < numCols; ++arg) { Id argComp = sources[arg]; for (unsigned int comp = 0; comp < getNumComponents(sources[arg]); ++comp) { if (getNumComponents(sources[arg]) > 1) { argComp = createCompositeExtract(sources[arg], componentTypeId, comp); setPrecision(argComp, precision); } ids[col][row++] = argComp; if (row == numRows) { row = 0; col++; } if (col == numCols) { // If more components are provided than fit the matrix, discard the rest. break; } } } } // Step 2: Construct a matrix from that array. // First make the column vectors, then make the matrix. // make the column vectors Id columnTypeId = getContainedTypeId(resultTypeId); std::vector matrixColumns; for (unsigned int col = 0; col < numCols; ++col) { std::vector vectorComponents; for (unsigned int row = 0; row < numRows; ++row) vectorComponents.push_back(ids[col][row]); Id column = createCompositeConstruct(columnTypeId, vectorComponents); setPrecision(column, precision); matrixColumns.push_back(column); } // make the matrix return setPrecision(createCompositeConstruct(resultTypeId, matrixColumns), precision); } // Comments in header Builder::If::If(Id cond, SelectionControlMask ctrl, Builder& gb) : builder(gb), condition(cond), control(ctrl), elseBlock(nullptr) { function = &builder.getBuildPoint()->getParent(); // make the blocks, but only put the then-block into the function, // the else-block and merge-block will be added later, in order, after // earlier code is emitted thenBlock = new Block(builder.getUniqueId(), *function); mergeBlock = new Block(builder.getUniqueId(), *function); // Save the current block, so that we can add in the flow control split when // makeEndIf is called. headerBlock = builder.getBuildPoint(); builder.createSelectionMerge(mergeBlock, control); function->addBlock(thenBlock); builder.setBuildPoint(thenBlock); } // Comments in header void Builder::If::makeBeginElse() { // Close out the "then" by having it jump to the mergeBlock builder.createBranch(true, mergeBlock); // Make the first else block and add it to the function elseBlock = new Block(builder.getUniqueId(), *function); function->addBlock(elseBlock); // Start building the else block builder.setBuildPoint(elseBlock); } // Comments in header void Builder::If::makeEndIf() { // jump to the merge block builder.createBranch(true, mergeBlock); // Go back to the headerBlock and make the flow control split builder.setBuildPoint(headerBlock); if (elseBlock) builder.createConditionalBranch(condition, thenBlock, elseBlock); else builder.createConditionalBranch(condition, thenBlock, mergeBlock); // add the merge block to the function function->addBlock(mergeBlock); builder.setBuildPoint(mergeBlock); } // Comments in header void Builder::makeSwitch(Id selector, SelectionControlMask control, int numSegments, const std::vector& caseValues, const std::vector& valueIndexToSegment, int defaultSegment, std::vector& segmentBlocks) { Function& function = buildPoint->getParent(); // make all the blocks for (int s = 0; s < numSegments; ++s) segmentBlocks.push_back(new Block(getUniqueId(), function)); Block* mergeBlock = new Block(getUniqueId(), function); // make and insert the switch's selection-merge instruction createSelectionMerge(mergeBlock, control); // make the switch instruction Instruction* switchInst = new Instruction(NoResult, NoType, Op::OpSwitch); switchInst->reserveOperands((caseValues.size() * 2) + 2); switchInst->addIdOperand(selector); auto defaultOrMerge = (defaultSegment >= 0) ? segmentBlocks[defaultSegment] : mergeBlock; switchInst->addIdOperand(defaultOrMerge->getId()); defaultOrMerge->addPredecessor(buildPoint); for (int i = 0; i < (int)caseValues.size(); ++i) { switchInst->addImmediateOperand(caseValues[i]); switchInst->addIdOperand(segmentBlocks[valueIndexToSegment[i]]->getId()); segmentBlocks[valueIndexToSegment[i]]->addPredecessor(buildPoint); } addInstruction(std::unique_ptr(switchInst)); // push the merge block switchMerges.push(mergeBlock); } // Comments in header void Builder::addSwitchBreak(bool implicit) { // branch to the top of the merge block stack createBranch(implicit, switchMerges.top()); createAndSetNoPredecessorBlock("post-switch-break"); } // Comments in header void Builder::nextSwitchSegment(std::vector& segmentBlock, int nextSegment) { int lastSegment = nextSegment - 1; if (lastSegment >= 0) { // Close out previous segment by jumping, if necessary, to next segment if (! buildPoint->isTerminated()) createBranch(true, segmentBlock[nextSegment]); } Block* block = segmentBlock[nextSegment]; block->getParent().addBlock(block); setBuildPoint(block); } // Comments in header void Builder::endSwitch(std::vector& /*segmentBlock*/) { // Close out previous segment by jumping, if necessary, to next segment if (! buildPoint->isTerminated()) addSwitchBreak(true); switchMerges.top()->getParent().addBlock(switchMerges.top()); setBuildPoint(switchMerges.top()); switchMerges.pop(); } Block& Builder::makeNewBlock() { Function& function = buildPoint->getParent(); auto block = new Block(getUniqueId(), function); function.addBlock(block); return *block; } Builder::LoopBlocks& Builder::makeNewLoop() { // This verbosity is needed to simultaneously get the same behavior // everywhere (id's in the same order), have a syntax that works // across lots of versions of C++, have no warnings from pedantic // compilation modes, and leave the rest of the code alone. Block& head = makeNewBlock(); Block& body = makeNewBlock(); Block& merge = makeNewBlock(); Block& continue_target = makeNewBlock(); LoopBlocks blocks(head, body, merge, continue_target); loops.push(blocks); return loops.top(); } void Builder::createLoopContinue() { createBranch(false, &loops.top().continue_target); // Set up a block for dead code. createAndSetNoPredecessorBlock("post-loop-continue"); } void Builder::createLoopExit() { createBranch(false, &loops.top().merge); // Set up a block for dead code. createAndSetNoPredecessorBlock("post-loop-break"); } void Builder::closeLoop() { loops.pop(); } void Builder::clearAccessChain() { accessChain.base = NoResult; accessChain.indexChain.clear(); accessChain.instr = NoResult; accessChain.swizzle.clear(); accessChain.component = NoResult; accessChain.preSwizzleBaseType = NoType; accessChain.isRValue = false; accessChain.coherentFlags.clear(); accessChain.alignment = 0; } // Comments in header void Builder::accessChainPushSwizzle(std::vector& swizzle, Id preSwizzleBaseType, AccessChain::CoherentFlags coherentFlags, unsigned int alignment) { accessChain.coherentFlags |= coherentFlags; accessChain.alignment |= alignment; // swizzles can be stacked in GLSL, but simplified to a single // one here; the base type doesn't change if (accessChain.preSwizzleBaseType == NoType) accessChain.preSwizzleBaseType = preSwizzleBaseType; // if needed, propagate the swizzle for the current access chain if (accessChain.swizzle.size() > 0) { std::vector oldSwizzle = accessChain.swizzle; accessChain.swizzle.resize(0); for (unsigned int i = 0; i < swizzle.size(); ++i) { assert(swizzle[i] < oldSwizzle.size()); accessChain.swizzle.push_back(oldSwizzle[swizzle[i]]); } } else accessChain.swizzle = swizzle; // determine if we need to track this swizzle anymore simplifyAccessChainSwizzle(); } // Comments in header void Builder::accessChainStore(Id rvalue, Decoration nonUniform, spv::MemoryAccessMask memoryAccess, spv::Scope scope, unsigned int alignment) { assert(accessChain.isRValue == false); transferAccessChainSwizzle(true); // If a swizzle exists and is not full and is not dynamic, then the swizzle will be broken into individual stores. if (accessChain.swizzle.size() > 0 && getNumTypeComponents(getResultingAccessChainType()) != accessChain.swizzle.size() && accessChain.component == NoResult) { for (unsigned int i = 0; i < accessChain.swizzle.size(); ++i) { accessChain.indexChain.push_back(makeUintConstant(accessChain.swizzle[i])); accessChain.instr = NoResult; Id base = collapseAccessChain(); addDecoration(base, nonUniform); accessChain.indexChain.pop_back(); accessChain.instr = NoResult; // dynamic component should be gone assert(accessChain.component == NoResult); Id source = createCompositeExtract(rvalue, getContainedTypeId(getTypeId(rvalue)), i); // take LSB of alignment alignment = alignment & ~(alignment & (alignment-1)); if (getStorageClass(base) == StorageClass::PhysicalStorageBufferEXT) { memoryAccess = (spv::MemoryAccessMask)(memoryAccess | spv::MemoryAccessMask::Aligned); } createStore(source, base, memoryAccess, scope, alignment); } } else { Id base = collapseAccessChain(); addDecoration(base, nonUniform); Id source = rvalue; // dynamic component should be gone assert(accessChain.component == NoResult); // If swizzle still exists, it may be out-of-order, we must load the target vector, // extract and insert elements to perform writeMask and/or swizzle. if (accessChain.swizzle.size() > 0) { Id tempBaseId = createLoad(base, spv::NoPrecision); source = createLvalueSwizzle(getTypeId(tempBaseId), tempBaseId, source, accessChain.swizzle); } // take LSB of alignment alignment = alignment & ~(alignment & (alignment-1)); if (getStorageClass(base) == StorageClass::PhysicalStorageBufferEXT) { memoryAccess = (spv::MemoryAccessMask)(memoryAccess | spv::MemoryAccessMask::Aligned); } createStore(source, base, memoryAccess, scope, alignment); } } // Comments in header Id Builder::accessChainLoad(Decoration precision, Decoration l_nonUniform, Decoration r_nonUniform, Id resultType, spv::MemoryAccessMask memoryAccess, spv::Scope scope, unsigned int alignment) { Id id; if (accessChain.isRValue) { // transfer access chain, but try to stay in registers transferAccessChainSwizzle(false); if (accessChain.indexChain.size() > 0) { Id swizzleBase = accessChain.preSwizzleBaseType != NoType ? accessChain.preSwizzleBaseType : resultType; // if all the accesses are constants, we can use OpCompositeExtract std::vector indexes; bool constant = true; for (int i = 0; i < (int)accessChain.indexChain.size(); ++i) { if (isConstantScalar(accessChain.indexChain[i])) indexes.push_back(getConstantScalar(accessChain.indexChain[i])); else { constant = false; break; } } if (constant) { id = createCompositeExtract(accessChain.base, swizzleBase, indexes); setPrecision(id, precision); } else if (isCooperativeVector(accessChain.base)) { assert(accessChain.indexChain.size() == 1); id = createVectorExtractDynamic(accessChain.base, resultType, accessChain.indexChain[0]); } else { Id lValue = NoResult; if (spvVersion >= Spv_1_4 && isValidInitializer(accessChain.base)) { // make a new function variable for this r-value, using an initializer, // and mark it as NonWritable so that downstream it can be detected as a lookup // table lValue = createVariable(NoPrecision, StorageClass::Function, getTypeId(accessChain.base), "indexable", accessChain.base); addDecoration(lValue, Decoration::NonWritable); } else { lValue = createVariable(NoPrecision, StorageClass::Function, getTypeId(accessChain.base), "indexable"); // store into it createStore(accessChain.base, lValue); } // move base to the new variable accessChain.base = lValue; accessChain.isRValue = false; // load through the access chain id = createLoad(collapseAccessChain(), precision); } } else id = accessChain.base; // no precision, it was set when this was defined } else { transferAccessChainSwizzle(true); // take LSB of alignment alignment = alignment & ~(alignment & (alignment-1)); if (getStorageClass(accessChain.base) == StorageClass::PhysicalStorageBufferEXT) { memoryAccess = (spv::MemoryAccessMask)(memoryAccess | spv::MemoryAccessMask::Aligned); } // load through the access chain id = collapseAccessChain(); // Apply nonuniform both to the access chain and the loaded value. // Buffer accesses need the access chain decorated, and this is where // loaded image types get decorated. TODO: This should maybe move to // createImageTextureFunctionCall. addDecoration(id, l_nonUniform); id = createLoad(id, precision, memoryAccess, scope, alignment); addDecoration(id, r_nonUniform); } // Done, unless there are swizzles to do if (accessChain.swizzle.size() == 0 && accessChain.component == NoResult) return id; // Do remaining swizzling // Do the basic swizzle if (accessChain.swizzle.size() > 0) { Id swizzledType = getScalarTypeId(getTypeId(id)); if (accessChain.swizzle.size() > 1) swizzledType = makeVectorType(swizzledType, (int)accessChain.swizzle.size()); id = createRvalueSwizzle(precision, swizzledType, id, accessChain.swizzle); } // Do the dynamic component if (accessChain.component != NoResult) id = setPrecision(createVectorExtractDynamic(id, resultType, accessChain.component), precision); addDecoration(id, r_nonUniform); return id; } Id Builder::accessChainGetLValue() { assert(accessChain.isRValue == false); transferAccessChainSwizzle(true); Id lvalue = collapseAccessChain(); // If swizzle exists, it is out-of-order or not full, we must load the target vector, // extract and insert elements to perform writeMask and/or swizzle. This does not // go with getting a direct l-value pointer. assert(accessChain.swizzle.size() == 0); assert(accessChain.component == NoResult); return lvalue; } // comment in header Id Builder::accessChainGetInferredType() { // anything to operate on? if (accessChain.base == NoResult) return NoType; Id type = getTypeId(accessChain.base); // do initial dereference if (! accessChain.isRValue) type = getContainedTypeId(type); // dereference each index for (auto it = accessChain.indexChain.cbegin(); it != accessChain.indexChain.cend(); ++it) { if (isStructType(type)) type = getContainedTypeId(type, getConstantScalar(*it)); else type = getContainedTypeId(type); } // dereference swizzle if (accessChain.swizzle.size() == 1) type = getContainedTypeId(type); else if (accessChain.swizzle.size() > 1) type = makeVectorType(getContainedTypeId(type), (int)accessChain.swizzle.size()); // dereference component selection if (accessChain.component) type = getContainedTypeId(type); return type; } void Builder::dump(std::vector& out) const { // Header, before first instructions: out.push_back(MagicNumber); out.push_back(spvVersion); out.push_back(builderNumber); out.push_back(uniqueId + 1); out.push_back(0); // Capabilities for (auto it = capabilities.cbegin(); it != capabilities.cend(); ++it) { Instruction capInst(0, 0, Op::OpCapability); capInst.addImmediateOperand(*it); capInst.dump(out); } for (auto it = extensions.cbegin(); it != extensions.cend(); ++it) { Instruction extInst(0, 0, Op::OpExtension); extInst.addStringOperand(it->c_str()); extInst.dump(out); } dumpInstructions(out, imports); Instruction memInst(0, 0, Op::OpMemoryModel); memInst.addImmediateOperand(addressModel); memInst.addImmediateOperand(memoryModel); memInst.dump(out); // Instructions saved up while building: dumpInstructions(out, entryPoints); dumpInstructions(out, executionModes); // Debug instructions dumpInstructions(out, strings); dumpSourceInstructions(out); for (int e = 0; e < (int)sourceExtensions.size(); ++e) { Instruction sourceExtInst(0, 0, Op::OpSourceExtension); sourceExtInst.addStringOperand(sourceExtensions[e]); sourceExtInst.dump(out); } dumpInstructions(out, names); dumpModuleProcesses(out); // Annotation instructions dumpInstructions(out, decorations); dumpInstructions(out, constantsTypesGlobals); dumpInstructions(out, externals); // The functions module.dump(out); } // // Protected methods. // // Turn the described access chain in 'accessChain' into an instruction(s) // computing its address. This *cannot* include complex swizzles, which must // be handled after this is called. // // Can generate code. Id Builder::collapseAccessChain() { assert(accessChain.isRValue == false); // did we already emit an access chain for this? if (accessChain.instr != NoResult) return accessChain.instr; // If we have a dynamic component, we can still transfer // that into a final operand to the access chain. We need to remap the // dynamic component through the swizzle to get a new dynamic component to // update. // // This was not done in transferAccessChainSwizzle() because it might // generate code. remapDynamicSwizzle(); if (accessChain.component != NoResult) { // transfer the dynamic component to the access chain accessChain.indexChain.push_back(accessChain.component); accessChain.component = NoResult; } // note that non-trivial swizzling is left pending // do we have an access chain? if (accessChain.indexChain.size() == 0) return accessChain.base; // emit the access chain StorageClass storageClass = (StorageClass)module.getStorageClass(getTypeId(accessChain.base)); accessChain.instr = createAccessChain(storageClass, accessChain.base, accessChain.indexChain); return accessChain.instr; } // For a dynamic component selection of a swizzle. // // Turn the swizzle and dynamic component into just a dynamic component. // // Generates code. void Builder::remapDynamicSwizzle() { // do we have a swizzle to remap a dynamic component through? if (accessChain.component != NoResult && accessChain.swizzle.size() > 1) { // build a vector of the swizzle for the component to map into std::vector components; for (int c = 0; c < (int)accessChain.swizzle.size(); ++c) components.push_back(makeUintConstant(accessChain.swizzle[c])); Id mapType = makeVectorType(makeUintType(32), (int)accessChain.swizzle.size()); Id map = makeCompositeConstant(mapType, components); // use it accessChain.component = createVectorExtractDynamic(map, makeUintType(32), accessChain.component); accessChain.swizzle.clear(); } } // clear out swizzle if it is redundant, that is reselecting the same components // that would be present without the swizzle. void Builder::simplifyAccessChainSwizzle() { // If the swizzle has fewer components than the vector, it is subsetting, and must stay // to preserve that fact. if (getNumTypeComponents(accessChain.preSwizzleBaseType) > accessChain.swizzle.size()) return; // if components are out of order, it is a swizzle for (unsigned int i = 0; i < accessChain.swizzle.size(); ++i) { if (i != accessChain.swizzle[i]) return; } // otherwise, there is no need to track this swizzle accessChain.swizzle.clear(); if (accessChain.component == NoResult) accessChain.preSwizzleBaseType = NoType; } // To the extent any swizzling can become part of the chain // of accesses instead of a post operation, make it so. // If 'dynamic' is true, include transferring the dynamic component, // otherwise, leave it pending. // // Does not generate code. just updates the access chain. void Builder::transferAccessChainSwizzle(bool dynamic) { // non existent? if (accessChain.swizzle.size() == 0 && accessChain.component == NoResult) return; // too complex? // (this requires either a swizzle, or generating code for a dynamic component) if (accessChain.swizzle.size() > 1) return; // single component, either in the swizzle and/or dynamic component if (accessChain.swizzle.size() == 1) { assert(accessChain.component == NoResult); // handle static component selection accessChain.indexChain.push_back(makeUintConstant(accessChain.swizzle.front())); accessChain.swizzle.clear(); accessChain.preSwizzleBaseType = NoType; } else if (dynamic && accessChain.component != NoResult) { assert(accessChain.swizzle.size() == 0); // handle dynamic component accessChain.indexChain.push_back(accessChain.component); accessChain.preSwizzleBaseType = NoType; accessChain.component = NoResult; } } // Utility method for creating a new block and setting the insert point to // be in it. This is useful for flow-control operations that need a "dummy" // block proceeding them (e.g. instructions after a discard, etc). void Builder::createAndSetNoPredecessorBlock(const char* /*name*/) { Block* block = new Block(getUniqueId(), buildPoint->getParent()); block->setUnreachable(); buildPoint->getParent().addBlock(block); setBuildPoint(block); // if (name) // addName(block->getId(), name); } // Comments in header void Builder::createBranch(bool implicit, Block* block) { Instruction* branch = new Instruction(Op::OpBranch); branch->addIdOperand(block->getId()); if (implicit) { addInstructionNoDebugInfo(std::unique_ptr(branch)); } else { addInstruction(std::unique_ptr(branch)); } block->addPredecessor(buildPoint); } void Builder::createSelectionMerge(Block* mergeBlock, SelectionControlMask control) { Instruction* merge = new Instruction(Op::OpSelectionMerge); merge->reserveOperands(2); merge->addIdOperand(mergeBlock->getId()); merge->addImmediateOperand(control); addInstruction(std::unique_ptr(merge)); } void Builder::createLoopMerge(Block* mergeBlock, Block* continueBlock, LoopControlMask control, const std::vector& operands) { Instruction* merge = new Instruction(Op::OpLoopMerge); merge->reserveOperands(operands.size() + 3); merge->addIdOperand(mergeBlock->getId()); merge->addIdOperand(continueBlock->getId()); merge->addImmediateOperand(control); for (int op = 0; op < (int)operands.size(); ++op) merge->addImmediateOperand(operands[op]); addInstruction(std::unique_ptr(merge)); } void Builder::createConditionalBranch(Id condition, Block* thenBlock, Block* elseBlock) { Instruction* branch = new Instruction(Op::OpBranchConditional); branch->reserveOperands(3); branch->addIdOperand(condition); branch->addIdOperand(thenBlock->getId()); branch->addIdOperand(elseBlock->getId()); // A conditional branch is always attached to a condition expression addInstructionNoDebugInfo(std::unique_ptr(branch)); thenBlock->addPredecessor(buildPoint); elseBlock->addPredecessor(buildPoint); } // OpSource // [OpSourceContinued] // ... void Builder::dumpSourceInstructions(const spv::Id fileId, const std::string& text, std::vector& out) const { const int maxWordCount = 0xFFFF; const int opSourceWordCount = 4; const int nonNullBytesPerInstruction = 4 * (maxWordCount - opSourceWordCount) - 1; if (sourceLang != SourceLanguage::Unknown) { // OpSource Language Version File Source Instruction sourceInst(NoResult, NoType, Op::OpSource); sourceInst.reserveOperands(3); sourceInst.addImmediateOperand(sourceLang); sourceInst.addImmediateOperand(sourceVersion); // File operand if (fileId != NoResult) { sourceInst.addIdOperand(fileId); // Source operand if (text.size() > 0) { int nextByte = 0; std::string subString; while ((int)text.size() - nextByte > 0) { subString = text.substr(nextByte, nonNullBytesPerInstruction); if (nextByte == 0) { // OpSource sourceInst.addStringOperand(subString.c_str()); sourceInst.dump(out); } else { // OpSourcContinued Instruction sourceContinuedInst(Op::OpSourceContinued); sourceContinuedInst.addStringOperand(subString.c_str()); sourceContinuedInst.dump(out); } nextByte += nonNullBytesPerInstruction; } } else sourceInst.dump(out); } else sourceInst.dump(out); } } // Dump an OpSource[Continued] sequence for the source and every include file void Builder::dumpSourceInstructions(std::vector& out) const { if (emitNonSemanticShaderDebugInfo) return; dumpSourceInstructions(mainFileId, sourceText, out); for (auto iItr = includeFiles.begin(); iItr != includeFiles.end(); ++iItr) dumpSourceInstructions(iItr->first, *iItr->second, out); } template void Builder::dumpInstructions(std::vector& out, const Range& instructions) const { for (const auto& inst : instructions) { inst->dump(out); } } void Builder::dumpModuleProcesses(std::vector& out) const { for (int i = 0; i < (int)moduleProcesses.size(); ++i) { Instruction moduleProcessed(Op::OpModuleProcessed); moduleProcessed.addStringOperand(moduleProcesses[i]); moduleProcessed.dump(out); } } bool Builder::DecorationInstructionLessThan::operator()(const std::unique_ptr& lhs, const std::unique_ptr& rhs) const { // Order by the id to which the decoration applies first. This is more intuitive. assert(lhs->isIdOperand(0) && rhs->isIdOperand(0)); if (lhs->getIdOperand(0) != rhs->getIdOperand(0)) { return lhs->getIdOperand(0) < rhs->getIdOperand(0); } if (lhs->getOpCode() != rhs->getOpCode()) return lhs->getOpCode() < rhs->getOpCode(); // Now compare the operands. int minSize = std::min(lhs->getNumOperands(), rhs->getNumOperands()); for (int i = 1; i < minSize; ++i) { if (lhs->isIdOperand(i) != rhs->isIdOperand(i)) { return lhs->isIdOperand(i) < rhs->isIdOperand(i); } if (lhs->isIdOperand(i)) { if (lhs->getIdOperand(i) != rhs->getIdOperand(i)) { return lhs->getIdOperand(i) < rhs->getIdOperand(i); } } else { if (lhs->getImmediateOperand(i) != rhs->getImmediateOperand(i)) { return lhs->getImmediateOperand(i) < rhs->getImmediateOperand(i); } } } if (lhs->getNumOperands() != rhs->getNumOperands()) return lhs->getNumOperands() < rhs->getNumOperands(); // In this case they are equal. return false; } } // end spv namespace ================================================ FILE: src/libraries/glslang/SPIRV/SpvBuilder.h ================================================ // // Copyright (C) 2014-2015 LunarG, Inc. // Copyright (C) 2015-2020 Google, Inc. // Copyright (C) 2017 ARM Limited. // Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights reserved. // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following // disclaimer in the documentation and/or other materials provided // with the distribution. // // Neither the name of 3Dlabs Inc. Ltd. nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // // "Builder" is an interface to fully build SPIR-V IR. Allocate one of // these to build (a thread safe) internal SPIR-V representation (IR), // and then dump it as a binary stream according to the SPIR-V specification. // // A Builder has a 1:1 relationship with a SPIR-V module. // #pragma once #ifndef SpvBuilder_H #define SpvBuilder_H #include "Logger.h" #define SPV_ENABLE_UTILITY_CODE #include "spirv.hpp11" #include "spvIR.h" #include "spvUtil.h" namespace spv { #include "GLSL.ext.KHR.h" #include "GLSL.ext.EXT.h" #include "NonSemanticShaderDebugInfo100.h" } #include #include #include #include #include #include #include #include #include #include namespace spv { typedef enum { Spv_1_0 = (1 << 16), Spv_1_1 = (1 << 16) | (1 << 8), Spv_1_2 = (1 << 16) | (2 << 8), Spv_1_3 = (1 << 16) | (3 << 8), Spv_1_4 = (1 << 16) | (4 << 8), Spv_1_5 = (1 << 16) | (5 << 8), Spv_1_6 = (1 << 16) | (6 << 8), } SpvVersion; class Builder { public: Builder(unsigned int spvVersion, unsigned int userNumber, SpvBuildLogger* logger); virtual ~Builder(); static const int maxMatrixSize = 4; unsigned int getSpvVersion() const { return spvVersion; } void setSource(spv::SourceLanguage lang, int version) { sourceLang = lang; sourceVersion = version; } spv::Id getStringId(const std::string& str) { auto sItr = stringIds.find(str); if (sItr != stringIds.end()) return sItr->second; spv::Id strId = getUniqueId(); Instruction* fileString = new Instruction(strId, NoType, Op::OpString); const char* file_c_str = str.c_str(); fileString->addStringOperand(file_c_str); strings.push_back(std::unique_ptr(fileString)); module.mapInstruction(fileString); stringIds[file_c_str] = strId; return strId; } spv::Id getMainFileId() const { return mainFileId; } // Initialize the main source file name void setDebugMainSourceFile(const std::string& file) { if (trackDebugInfo) { dirtyLineTracker = true; mainFileId = getStringId(file); currentFileId = mainFileId; } } // Set the debug source location tracker in the builder. // The upcoming instructions in basic blocks will be associated to this location. void setDebugSourceLocation(int line, const char* filename) { if (trackDebugInfo) { dirtyLineTracker = true; if (line != 0) { // TODO: This is special handling of some AST nodes having (untracked) line 0. // But they should have a valid line number. currentLine = line; if (filename) { currentFileId = getStringId(filename); } } } } void setSourceText(const std::string& text) { sourceText = text; } void addSourceExtension(const char* ext) { sourceExtensions.push_back(ext); } void addModuleProcessed(const std::string& p) { moduleProcesses.push_back(p.c_str()); } void setEmitSpirvDebugInfo() { trackDebugInfo = true; emitSpirvDebugInfo = true; } void setEmitNonSemanticShaderDebugInfo(bool emitSourceText) { trackDebugInfo = true; emitNonSemanticShaderDebugInfo = true; importNonSemanticShaderDebugInfoInstructions(); if (emitSourceText) { emitNonSemanticShaderDebugSource = emitSourceText; } } void addExtension(const char* ext) { extensions.insert(ext); } void removeExtension(const char* ext) { extensions.erase(ext); } void addIncorporatedExtension(const char* ext, SpvVersion incorporatedVersion) { if (getSpvVersion() < static_cast(incorporatedVersion)) addExtension(ext); } void promoteIncorporatedExtension(const char* baseExt, const char* promoExt, SpvVersion incorporatedVersion) { removeExtension(baseExt); addIncorporatedExtension(promoExt, incorporatedVersion); } void addInclude(const std::string& name, const std::string& text) { spv::Id incId = getStringId(name); includeFiles[incId] = &text; } Id import(const char*); void setMemoryModel(spv::AddressingModel addr, spv::MemoryModel mem) { addressModel = addr; memoryModel = mem; } void addCapability(spv::Capability cap) { capabilities.insert(cap); } // To get a new for anything needing a new one. Id getUniqueId() { return ++uniqueId; } // To get a set of new s, e.g., for a set of function parameters Id getUniqueIds(int numIds) { Id id = uniqueId + 1; uniqueId += numIds; return id; } // For creating new types (will return old type if the requested one was already made). Id makeVoidType(); Id makeBoolType(); Id makePointer(StorageClass, Id pointee); Id makeForwardPointer(StorageClass); Id makePointerFromForwardPointer(StorageClass, Id forwardPointerType, Id pointee); Id makeIntegerType(int width, bool hasSign); // generic Id makeIntType(int width) { return makeIntegerType(width, true); } Id makeUintType(int width) { return makeIntegerType(width, false); } Id makeFloatType(int width); Id makeBFloat16Type(); Id makeFloatE5M2Type(); Id makeFloatE4M3Type(); Id makeStructType(const std::vector& members, const char* name, bool const compilerGenerated = true); Id makeStructResultType(Id type0, Id type1); Id makeVectorType(Id component, int size); Id makeMatrixType(Id component, int cols, int rows); Id makeArrayType(Id element, Id sizeId, int stride); // 0 stride means no stride decoration Id makeRuntimeArray(Id element); Id makeFunctionType(Id returnType, const std::vector& paramTypes); Id makeImageType(Id sampledType, Dim, bool depth, bool arrayed, bool ms, unsigned sampled, ImageFormat format); Id makeSamplerType(); Id makeSampledImageType(Id imageType); Id makeCooperativeMatrixTypeKHR(Id component, Id scope, Id rows, Id cols, Id use); Id makeCooperativeMatrixTypeNV(Id component, Id scope, Id rows, Id cols); Id makeCooperativeMatrixTypeWithSameShape(Id component, Id otherType); Id makeCooperativeVectorTypeNV(Id componentType, Id components); Id makeGenericType(spv::Op opcode, std::vector& operands); // SPIR-V NonSemantic Shader DebugInfo Instructions struct DebugTypeLoc { std::string name {}; int line {0}; int column {0}; }; std::unordered_map debugTypeLocs; Id makeDebugInfoNone(); Id makeBoolDebugType(int const size); Id makeIntegerDebugType(int const width, bool const hasSign); Id makeFloatDebugType(int const width); Id makeSequentialDebugType(Id const baseType, Id const componentCount, NonSemanticShaderDebugInfo100Instructions const sequenceType); Id makeArrayDebugType(Id const baseType, Id const componentCount); Id makeVectorDebugType(Id const baseType, int const componentCount); Id makeMatrixDebugType(Id const vectorType, int const vectorCount, bool columnMajor = true); Id makeMemberDebugType(Id const memberType, DebugTypeLoc const& debugTypeLoc); Id makeCompositeDebugType(std::vector const& memberTypes, char const*const name, NonSemanticShaderDebugInfo100DebugCompositeType const tag, bool const isOpaqueType = false); Id makePointerDebugType(StorageClass storageClass, Id const baseType); Id makeForwardPointerDebugType(StorageClass storageClass); Id makeDebugSource(const Id fileName); Id makeDebugCompilationUnit(); Id createDebugGlobalVariable(Id const type, char const*const name, Id const variable); Id createDebugLocalVariable(Id type, char const*const name, size_t const argNumber = 0); Id makeDebugExpression(); Id makeDebugDeclare(Id const debugLocalVariable, Id const pointer); Id makeDebugValue(Id const debugLocalVariable, Id const value); Id makeDebugFunctionType(Id returnType, const std::vector& paramTypes); Id makeDebugFunction(Function* function, Id nameId, Id funcTypeId); Id makeDebugLexicalBlock(uint32_t line, uint32_t column); std::string unmangleFunctionName(std::string const& name) const; // Initialize non-semantic debug information for a function, including those of: // - The function definition // - The function parameters void setupFunctionDebugInfo(Function* function, const char* name, const std::vector& paramTypes, const std::vector& paramNames); // accelerationStructureNV type Id makeAccelerationStructureType(); // rayQueryEXT type Id makeRayQueryType(); // hitObjectNV type Id makeHitObjectNVType(); // For querying about types. Id getTypeId(Id resultId) const { return module.getTypeId(resultId); } Id getDerefTypeId(Id resultId) const; Op getOpCode(Id id) const { return module.getInstruction(id)->getOpCode(); } Op getTypeClass(Id typeId) const { return getOpCode(typeId); } Op getMostBasicTypeClass(Id typeId) const; unsigned int getNumComponents(Id resultId) const { return getNumTypeComponents(getTypeId(resultId)); } unsigned int getNumTypeConstituents(Id typeId) const; unsigned int getNumTypeComponents(Id typeId) const { return getNumTypeConstituents(typeId); } Id getScalarTypeId(Id typeId) const; Id getContainedTypeId(Id typeId) const; Id getContainedTypeId(Id typeId, int) const; StorageClass getTypeStorageClass(Id typeId) const { return module.getStorageClass(typeId); } ImageFormat getImageTypeFormat(Id typeId) const { return (ImageFormat)module.getInstruction(typeId)->getImmediateOperand(6); } Id getResultingAccessChainType() const; Id getIdOperand(Id resultId, int idx) { return module.getInstruction(resultId)->getIdOperand(idx); } Id getCooperativeVectorNumComponents(Id typeId) const { return module.getInstruction(typeId)->getIdOperand(1); } bool isPointer(Id resultId) const { return isPointerType(getTypeId(resultId)); } bool isScalar(Id resultId) const { return isScalarType(getTypeId(resultId)); } bool isVector(Id resultId) const { return isVectorType(getTypeId(resultId)); } bool isMatrix(Id resultId) const { return isMatrixType(getTypeId(resultId)); } bool isCooperativeMatrix(Id resultId)const { return isCooperativeMatrixType(getTypeId(resultId)); } bool isCooperativeVector(Id resultId)const { return isCooperativeVectorType(getTypeId(resultId)); } bool isAggregate(Id resultId) const { return isAggregateType(getTypeId(resultId)); } bool isSampledImage(Id resultId) const { return isSampledImageType(getTypeId(resultId)); } bool isTensorView(Id resultId)const { return isTensorViewType(getTypeId(resultId)); } bool isBoolType(Id typeId) { return groupedTypes[enumCast(Op::OpTypeBool)].size() > 0 && typeId == groupedTypes[enumCast(Op::OpTypeBool)].back()->getResultId(); } bool isIntType(Id typeId) const { return getTypeClass(typeId) == Op::OpTypeInt && module.getInstruction(typeId)->getImmediateOperand(1) != 0; } bool isUintType(Id typeId) const { return getTypeClass(typeId) == Op::OpTypeInt && module.getInstruction(typeId)->getImmediateOperand(1) == 0; } bool isFloatType(Id typeId) const { return getTypeClass(typeId) == Op::OpTypeFloat; } bool isPointerType(Id typeId) const { return getTypeClass(typeId) == Op::OpTypePointer; } bool isScalarType(Id typeId) const { return getTypeClass(typeId) == Op::OpTypeFloat || getTypeClass(typeId) == Op::OpTypeInt || getTypeClass(typeId) == Op::OpTypeBool; } bool isVectorType(Id typeId) const { return getTypeClass(typeId) == Op::OpTypeVector; } bool isMatrixType(Id typeId) const { return getTypeClass(typeId) == Op::OpTypeMatrix; } bool isStructType(Id typeId) const { return getTypeClass(typeId) == Op::OpTypeStruct; } bool isArrayType(Id typeId) const { return getTypeClass(typeId) == Op::OpTypeArray; } bool isCooperativeMatrixType(Id typeId)const { return getTypeClass(typeId) == Op::OpTypeCooperativeMatrixKHR || getTypeClass(typeId) == Op::OpTypeCooperativeMatrixNV; } bool isTensorViewType(Id typeId) const { return getTypeClass(typeId) == Op::OpTypeTensorViewNV; } bool isCooperativeVectorType(Id typeId) const { return getTypeClass(typeId) == Op::OpTypeCooperativeVectorNV; } bool isAggregateType(Id typeId) const { return isArrayType(typeId) || isStructType(typeId) || isCooperativeMatrixType(typeId); } bool isImageType(Id typeId) const { return getTypeClass(typeId) == Op::OpTypeImage; } bool isSamplerType(Id typeId) const { return getTypeClass(typeId) == Op::OpTypeSampler; } bool isSampledImageType(Id typeId) const { return getTypeClass(typeId) == Op::OpTypeSampledImage; } bool containsType(Id typeId, Op typeOp, unsigned int width) const; bool containsPhysicalStorageBufferOrArray(Id typeId) const; bool isConstantOpCode(Op opcode) const; bool isSpecConstantOpCode(Op opcode) const; bool isConstant(Id resultId) const { return isConstantOpCode(getOpCode(resultId)); } bool isConstantScalar(Id resultId) const { return getOpCode(resultId) == Op::OpConstant; } bool isSpecConstant(Id resultId) const { return isSpecConstantOpCode(getOpCode(resultId)); } unsigned int getConstantScalar(Id resultId) const { return module.getInstruction(resultId)->getImmediateOperand(0); } StorageClass getStorageClass(Id resultId) const { return getTypeStorageClass(getTypeId(resultId)); } bool isVariableOpCode(Op opcode) const { return opcode == Op::OpVariable; } bool isVariable(Id resultId) const { return isVariableOpCode(getOpCode(resultId)); } bool isGlobalStorage(Id resultId) const { return getStorageClass(resultId) != StorageClass::Function; } bool isGlobalVariable(Id resultId) const { return isVariable(resultId) && isGlobalStorage(resultId); } // See if a resultId is valid for use as an initializer. bool isValidInitializer(Id resultId) const { return isConstant(resultId) || isGlobalVariable(resultId); } int getScalarTypeWidth(Id typeId) const { Id scalarTypeId = getScalarTypeId(typeId); assert(getTypeClass(scalarTypeId) == Op::OpTypeInt || getTypeClass(scalarTypeId) == Op::OpTypeFloat); return module.getInstruction(scalarTypeId)->getImmediateOperand(0); } unsigned int getTypeNumColumns(Id typeId) const { assert(isMatrixType(typeId)); return getNumTypeConstituents(typeId); } unsigned int getNumColumns(Id resultId) const { return getTypeNumColumns(getTypeId(resultId)); } unsigned int getTypeNumRows(Id typeId) const { assert(isMatrixType(typeId)); return getNumTypeComponents(getContainedTypeId(typeId)); } unsigned int getNumRows(Id resultId) const { return getTypeNumRows(getTypeId(resultId)); } Dim getTypeDimensionality(Id typeId) const { assert(isImageType(typeId)); return (Dim)module.getInstruction(typeId)->getImmediateOperand(1); } Id getImageType(Id resultId) const { Id typeId = getTypeId(resultId); assert(isImageType(typeId) || isSampledImageType(typeId)); return isSampledImageType(typeId) ? module.getInstruction(typeId)->getIdOperand(0) : typeId; } bool isArrayedImageType(Id typeId) const { assert(isImageType(typeId)); return module.getInstruction(typeId)->getImmediateOperand(3) != 0; } // For making new constants (will return old constant if the requested one was already made). Id makeNullConstant(Id typeId); Id makeBoolConstant(bool b, bool specConstant = false); Id makeIntConstant(Id typeId, unsigned value, bool specConstant); Id makeInt64Constant(Id typeId, unsigned long long value, bool specConstant); Id makeInt8Constant(int i, bool specConstant = false) { return makeIntConstant(makeIntType(8), (unsigned)i, specConstant); } Id makeUint8Constant(unsigned u, bool specConstant = false) { return makeIntConstant(makeUintType(8), u, specConstant); } Id makeInt16Constant(int i, bool specConstant = false) { return makeIntConstant(makeIntType(16), (unsigned)i, specConstant); } Id makeUint16Constant(unsigned u, bool specConstant = false) { return makeIntConstant(makeUintType(16), u, specConstant); } Id makeIntConstant(int i, bool specConstant = false) { return makeIntConstant(makeIntType(32), (unsigned)i, specConstant); } Id makeUintConstant(unsigned u, bool specConstant = false) { return makeIntConstant(makeUintType(32), u, specConstant); } Id makeUintConstant(Scope u, bool specConstant = false) { return makeUintConstant((unsigned)u, specConstant); } Id makeUintConstant(StorageClass u, bool specConstant = false) { return makeUintConstant((unsigned)u, specConstant); } Id makeUintConstant(MemorySemanticsMask u, bool specConstant = false) { return makeUintConstant((unsigned)u, specConstant); } Id makeUintConstant(SourceLanguage u, bool specConstant = false) { return makeUintConstant((unsigned)u, specConstant); } Id makeInt64Constant(long long i, bool specConstant = false) { return makeInt64Constant(makeIntType(64), (unsigned long long)i, specConstant); } Id makeUint64Constant(unsigned long long u, bool specConstant = false) { return makeInt64Constant(makeUintType(64), u, specConstant); } Id makeFloatConstant(float f, bool specConstant = false); Id makeDoubleConstant(double d, bool specConstant = false); Id makeFloat16Constant(float f16, bool specConstant = false); Id makeBFloat16Constant(float bf16, bool specConstant = false); Id makeFloatE5M2Constant(float fe5m2, bool specConstant = false); Id makeFloatE4M3Constant(float fe4m3, bool specConstant = false); Id makeFpConstant(Id type, double d, bool specConstant = false); Id importNonSemanticShaderDebugInfoInstructions(); // Turn the array of constants into a proper spv constant of the requested type. Id makeCompositeConstant(Id type, const std::vector& comps, bool specConst = false); // Methods for adding information outside the CFG. Instruction* addEntryPoint(ExecutionModel, Function*, const char* name); void addExecutionMode(Function*, ExecutionMode mode, int value1 = -1, int value2 = -1, int value3 = -1); void addExecutionMode(Function*, ExecutionMode mode, const std::vector& literals); void addExecutionModeId(Function*, ExecutionMode mode, const std::vector& operandIds); void addName(Id, const char* name); void addMemberName(Id, int member, const char* name); void addDecoration(Id, Decoration, int num = -1); void addDecoration(Id, Decoration, const char*); void addDecoration(Id, Decoration, const std::vector& literals); void addDecoration(Id, Decoration, const std::vector& strings); void addLinkageDecoration(Id id, const char* name, spv::LinkageType linkType); void addDecorationId(Id id, Decoration, Id idDecoration); void addDecorationId(Id id, Decoration, const std::vector& operandIds); void addMemberDecoration(Id, unsigned int member, Decoration, int num = -1); void addMemberDecoration(Id, unsigned int member, Decoration, const char*); void addMemberDecoration(Id, unsigned int member, Decoration, const std::vector& literals); void addMemberDecoration(Id, unsigned int member, Decoration, const std::vector& strings); // At the end of what block do the next create*() instructions go? // Also reset current last DebugScope and current source line to unknown void setBuildPoint(Block* bp) { buildPoint = bp; dirtyLineTracker = true; dirtyScopeTracker = true; } Block* getBuildPoint() const { return buildPoint; } // Append an instruction to the end of the current build point. // Optionally, additional debug info instructions may also be prepended. void addInstruction(std::unique_ptr inst); // Append an instruction to the end of the current build point without prepending any debug instructions. // This is useful for insertion of some debug info instructions themselves or some control flow instructions // that are attached to its predecessor instruction. void addInstructionNoDebugInfo(std::unique_ptr inst); // Make the entry-point function. The returned pointer is only valid // for the lifetime of this builder. Function* makeEntryPoint(const char*); // Make a shader-style function, and create its entry block if entry is non-zero. // Return the function, pass back the entry. // The returned pointer is only valid for the lifetime of this builder. Function* makeFunctionEntry(Decoration precision, Id returnType, const char* name, LinkageType linkType, const std::vector& paramTypes, const std::vector>& precisions, Block** entry = nullptr); // Create a return. An 'implicit' return is one not appearing in the source // code. In the case of an implicit return, no post-return block is inserted. void makeReturn(bool implicit, Id retVal = 0); // Initialize state and generate instructions for new lexical scope void enterLexicalBlock(uint32_t line, uint32_t column); // Set state and generate instructions to exit current lexical scope void leaveLexicalBlock(); // Prepare builder for generation of instructions for a function. void enterFunction(Function const* function); // Generate all the code needed to finish up a function. void leaveFunction(); // Create block terminator instruction for certain statements like // discard, terminate-invocation, terminateRayEXT, or ignoreIntersectionEXT void makeStatementTerminator(spv::Op opcode, const char *name); // Create block terminator instruction for statements that have input operands // such as OpEmitMeshTasksEXT void makeStatementTerminator(spv::Op opcode, const std::vector& operands, const char* name); // Create a global or function local or IO variable. Id createVariable(Decoration precision, StorageClass storageClass, Id type, const char* name = nullptr, Id initializer = NoResult, bool const compilerGenerated = true); // Create an intermediate with an undefined value. Id createUndefined(Id type); // Store into an Id and return the l-value void createStore(Id rValue, Id lValue, spv::MemoryAccessMask memoryAccess = spv::MemoryAccessMask::MaskNone, spv::Scope scope = spv::Scope::Max, unsigned int alignment = 0); // Load from an Id and return it Id createLoad(Id lValue, spv::Decoration precision, spv::MemoryAccessMask memoryAccess = spv::MemoryAccessMask::MaskNone, spv::Scope scope = spv::Scope::Max, unsigned int alignment = 0); // Create an OpAccessChain instruction Id createAccessChain(StorageClass, Id base, const std::vector& offsets); // Create an OpArrayLength instruction Id createArrayLength(Id base, unsigned int member); // Create an OpCooperativeMatrixLengthKHR instruction Id createCooperativeMatrixLengthKHR(Id type); // Create an OpCooperativeMatrixLengthNV instruction Id createCooperativeMatrixLengthNV(Id type); // Create an OpCompositeExtract instruction Id createCompositeExtract(Id composite, Id typeId, unsigned index); Id createCompositeExtract(Id composite, Id typeId, const std::vector& indexes); Id createCompositeInsert(Id object, Id composite, Id typeId, unsigned index); Id createCompositeInsert(Id object, Id composite, Id typeId, const std::vector& indexes); Id createVectorExtractDynamic(Id vector, Id typeId, Id componentIndex); Id createVectorInsertDynamic(Id vector, Id typeId, Id component, Id componentIndex); void createNoResultOp(Op); void createNoResultOp(Op, Id operand); void createNoResultOp(Op, const std::vector& operands); void createNoResultOp(Op, const std::vector& operands); void createControlBarrier(Scope execution, Scope memory, MemorySemanticsMask); void createMemoryBarrier(Scope executionScope, MemorySemanticsMask memorySemantics); Id createUnaryOp(Op, Id typeId, Id operand); Id createBinOp(Op, Id typeId, Id operand1, Id operand2); Id createTriOp(Op, Id typeId, Id operand1, Id operand2, Id operand3); Id createOp(Op, Id typeId, const std::vector& operands); Id createOp(Op, Id typeId, const std::vector& operands); Id createFunctionCall(spv::Function*, const std::vector&); Id createSpecConstantOp(Op, Id typeId, const std::vector& operands, const std::vector& literals); // Take an rvalue (source) and a set of channels to extract from it to // make a new rvalue, which is returned. Id createRvalueSwizzle(Decoration precision, Id typeId, Id source, const std::vector& channels); // Take a copy of an lvalue (target) and a source of components, and set the // source components into the lvalue where the 'channels' say to put them. // An updated version of the target is returned. // (No true lvalue or stores are used.) Id createLvalueSwizzle(Id typeId, Id target, Id source, const std::vector& channels); // If both the id and precision are valid, the id // gets tagged with the requested precision. // The passed in id is always the returned id, to simplify use patterns. Id setPrecision(Id id, Decoration precision) { if (precision != NoPrecision && id != NoResult) addDecoration(id, precision); return id; } // Can smear a scalar to a vector for the following forms: // - promoteScalar(scalar, vector) // smear scalar to width of vector // - promoteScalar(vector, scalar) // smear scalar to width of vector // - promoteScalar(pointer, scalar) // smear scalar to width of what pointer points to // - promoteScalar(scalar, scalar) // do nothing // Other forms are not allowed. // // Generally, the type of 'scalar' does not need to be the same type as the components in 'vector'. // The type of the created vector is a vector of components of the same type as the scalar. // // Note: One of the arguments will change, with the result coming back that way rather than // through the return value. void promoteScalar(Decoration precision, Id& left, Id& right); // Make a value by smearing the scalar to fill the type. // vectorType should be the correct type for making a vector of scalarVal. // (No conversions are done.) Id smearScalar(Decoration precision, Id scalarVal, Id vectorType); // Create a call to a built-in function. Id createBuiltinCall(Id resultType, Id builtins, int entryPoint, const std::vector& args); // List of parameters used to create a texture operation struct TextureParameters { Id sampler; Id coords; Id bias; Id lod; Id Dref; Id offset; Id offsets; Id gradX; Id gradY; Id sample; Id component; Id texelOut; Id lodClamp; Id granularity; Id coarse; bool nonprivate; bool volatil; bool nontemporal; }; // Select the correct texture operation based on all inputs, and emit the correct instruction Id createTextureCall(Decoration precision, Id resultType, bool sparse, bool fetch, bool proj, bool gather, bool noImplicit, const TextureParameters&, ImageOperandsMask); // Emit the OpTextureQuery* instruction that was passed in. // Figure out the right return value and type, and return it. Id createTextureQueryCall(Op, const TextureParameters&, bool isUnsignedResult); Id createSamplePositionCall(Decoration precision, Id, Id); Id createBitFieldExtractCall(Decoration precision, Id, Id, Id, bool isSigned); Id createBitFieldInsertCall(Decoration precision, Id, Id, Id, Id); // Reduction comparison for composites: For equal and not-equal resulting in a scalar. Id createCompositeCompare(Decoration precision, Id, Id, bool /* true if for equal, false if for not-equal */); // OpCompositeConstruct Id createCompositeConstruct(Id typeId, const std::vector& constituents); // vector or scalar constructor Id createConstructor(Decoration precision, const std::vector& sources, Id resultTypeId); // matrix constructor Id createMatrixConstructor(Decoration precision, const std::vector& sources, Id constructee); // coopmat conversion Id createCooperativeMatrixConversion(Id typeId, Id source); Id createCooperativeMatrixReduce(Op opcode, Id typeId, Id source, unsigned int mask, Id func); Id createCooperativeMatrixPerElementOp(Id typeId, const std::vector& operands); // Helper to use for building nested control flow with if-then-else. class If { public: If(Id condition, SelectionControlMask ctrl, Builder& builder); ~If() {} void makeBeginElse(); void makeEndIf(); private: If(const If&); If& operator=(If&); Builder& builder; Id condition; SelectionControlMask control; Function* function; Block* headerBlock; Block* thenBlock; Block* elseBlock; Block* mergeBlock; }; // Make a switch statement. A switch has 'numSegments' of pieces of code, not containing // any case/default labels, all separated by one or more case/default labels. Each possible // case value v is a jump to the caseValues[v] segment. The defaultSegment is also in this // number space. How to compute the value is given by 'condition', as in switch(condition). // // The SPIR-V Builder will maintain the stack of post-switch merge blocks for nested switches. // // Use a defaultSegment < 0 if there is no default segment (to branch to post switch). // // Returns the right set of basic blocks to start each code segment with, so that the caller's // recursion stack can hold the memory for it. // void makeSwitch(Id condition, SelectionControlMask control, int numSegments, const std::vector& caseValues, const std::vector& valueToSegment, int defaultSegment, std::vector& segmentBB); // Add a branch to the innermost switch's merge block. void addSwitchBreak(bool implicit); // Move to the next code segment, passing in the return argument in makeSwitch() void nextSwitchSegment(std::vector& segmentBB, int segment); // Finish off the innermost switch. void endSwitch(std::vector& segmentBB); struct LoopBlocks { LoopBlocks(Block& head, Block& body, Block& merge, Block& continue_target) : head(head), body(body), merge(merge), continue_target(continue_target) { } Block &head, &body, &merge, &continue_target; private: LoopBlocks(); LoopBlocks& operator=(const LoopBlocks&) = delete; }; // Start a new loop and prepare the builder to generate code for it. Until // closeLoop() is called for this loop, createLoopContinue() and // createLoopExit() will target its corresponding blocks. LoopBlocks& makeNewLoop(); // Create a new block in the function containing the build point. Memory is // owned by the function object. Block& makeNewBlock(); // Add a branch to the continue_target of the current (innermost) loop. void createLoopContinue(); // Add an exit (e.g. "break") from the innermost loop that we're currently // in. void createLoopExit(); // Close the innermost loop that you're in void closeLoop(); // // Access chain design for an R-Value vs. L-Value: // // There is a single access chain the builder is building at // any particular time. Such a chain can be used to either to a load or // a store, when desired. // // Expressions can be r-values, l-values, or both, or only r-values: // a[b.c].d = .... // l-value // ... = a[b.c].d; // r-value, that also looks like an l-value // ++a[b.c].d; // r-value and l-value // (x + y)[2]; // r-value only, can't possibly be l-value // // Computing an r-value means generating code. Hence, // r-values should only be computed when they are needed, not speculatively. // // Computing an l-value means saving away information for later use in the compiler, // no code is generated until the l-value is later dereferenced. It is okay // to speculatively generate an l-value, just not okay to speculatively dereference it. // // The base of the access chain (the left-most variable or expression // from which everything is based) can be set either as an l-value // or as an r-value. Most efficient would be to set an l-value if one // is available. If an expression was evaluated, the resulting r-value // can be set as the chain base. // // The users of this single access chain can save and restore if they // want to nest or manage multiple chains. // struct AccessChain { Id base; // for l-values, pointer to the base object, for r-values, the base object std::vector indexChain; Id instr; // cache the instruction that generates this access chain std::vector swizzle; // each std::vector element selects the next GLSL component number Id component; // a dynamic component index, can coexist with a swizzle, // done after the swizzle, NoResult if not present Id preSwizzleBaseType; // dereferenced type, before swizzle or component is applied; // NoType unless a swizzle or component is present bool isRValue; // true if 'base' is an r-value, otherwise, base is an l-value unsigned int alignment; // bitwise OR of alignment values passed in. Accumulates worst alignment. // Only tracks base and (optional) component selection alignment. // Accumulate whether anything in the chain of structures has coherent decorations. struct CoherentFlags { CoherentFlags() { clear(); } bool isVolatile() const { return volatil; } bool isNonUniform() const { return nonUniform; } bool anyCoherent() const { return coherent || devicecoherent || queuefamilycoherent || workgroupcoherent || subgroupcoherent || shadercallcoherent; } unsigned coherent : 1; unsigned devicecoherent : 1; unsigned queuefamilycoherent : 1; unsigned workgroupcoherent : 1; unsigned subgroupcoherent : 1; unsigned shadercallcoherent : 1; unsigned nonprivate : 1; unsigned volatil : 1; unsigned nontemporal : 1; unsigned isImage : 1; unsigned nonUniform : 1; void clear() { coherent = 0; devicecoherent = 0; queuefamilycoherent = 0; workgroupcoherent = 0; subgroupcoherent = 0; shadercallcoherent = 0; nonprivate = 0; volatil = 0; nontemporal = 0; isImage = 0; nonUniform = 0; } CoherentFlags operator |=(const CoherentFlags &other) { coherent |= other.coherent; devicecoherent |= other.devicecoherent; queuefamilycoherent |= other.queuefamilycoherent; workgroupcoherent |= other.workgroupcoherent; subgroupcoherent |= other.subgroupcoherent; shadercallcoherent |= other.shadercallcoherent; nonprivate |= other.nonprivate; volatil |= other.volatil; nontemporal = other.nontemporal; isImage |= other.isImage; nonUniform |= other.nonUniform; return *this; } }; CoherentFlags coherentFlags; }; // // the SPIR-V builder maintains a single active chain that // the following methods operate on // // for external save and restore AccessChain getAccessChain() { return accessChain; } void setAccessChain(AccessChain newChain) { accessChain = newChain; } // clear accessChain void clearAccessChain(); // set new base as an l-value base void setAccessChainLValue(Id lValue) { assert(isPointer(lValue)); accessChain.base = lValue; } // set new base value as an r-value void setAccessChainRValue(Id rValue) { accessChain.isRValue = true; accessChain.base = rValue; } // push offset onto the end of the chain void accessChainPush(Id offset, AccessChain::CoherentFlags coherentFlags, unsigned int alignment) { accessChain.indexChain.push_back(offset); accessChain.coherentFlags |= coherentFlags; accessChain.alignment |= alignment; } // push new swizzle onto the end of any existing swizzle, merging into a single swizzle void accessChainPushSwizzle(std::vector& swizzle, Id preSwizzleBaseType, AccessChain::CoherentFlags coherentFlags, unsigned int alignment); // push a dynamic component selection onto the access chain, only applicable with a // non-trivial swizzle or no swizzle void accessChainPushComponent(Id component, Id preSwizzleBaseType, AccessChain::CoherentFlags coherentFlags, unsigned int alignment) { if (accessChain.swizzle.size() != 1) { accessChain.component = component; if (accessChain.preSwizzleBaseType == NoType) accessChain.preSwizzleBaseType = preSwizzleBaseType; } accessChain.coherentFlags |= coherentFlags; accessChain.alignment |= alignment; } // use accessChain and swizzle to store value void accessChainStore(Id rvalue, Decoration nonUniform, spv::MemoryAccessMask memoryAccess = spv::MemoryAccessMask::MaskNone, spv::Scope scope = spv::Scope::Max, unsigned int alignment = 0); // use accessChain and swizzle to load an r-value Id accessChainLoad(Decoration precision, Decoration l_nonUniform, Decoration r_nonUniform, Id ResultType, spv::MemoryAccessMask memoryAccess = spv::MemoryAccessMask::MaskNone, spv::Scope scope = spv::Scope::Max, unsigned int alignment = 0); // Return whether or not the access chain can be represented in SPIR-V // as an l-value. // E.g., a[3].yx cannot be, while a[3].y and a[3].y[x] can be. bool isSpvLvalue() const { return accessChain.swizzle.size() <= 1; } // get the direct pointer for an l-value Id accessChainGetLValue(); // Get the inferred SPIR-V type of the result of the current access chain, // based on the type of the base and the chain of dereferences. Id accessChainGetInferredType(); // Add capabilities, extensions, remove unneeded decorations, etc., // based on the resulting SPIR-V. void postProcess(bool compileOnly); // Prune unreachable blocks in the CFG and remove unneeded decorations. void postProcessCFG(); // Add capabilities, extensions based on instructions in the module. void postProcessFeatures(); // Hook to visit each instruction in a block in a function void postProcess(Instruction&); // Hook to visit each non-32-bit sized float/int operation in a block. void postProcessType(const Instruction&, spv::Id typeId); // move OpSampledImage instructions to be next to their users. void postProcessSamplers(); void dump(std::vector&) const; // Add a branch to the target block. // If set implicit, the branch instruction shouldn't have debug source location. void createBranch(bool implicit, Block* block); void createConditionalBranch(Id condition, Block* thenBlock, Block* elseBlock); void createLoopMerge(Block* mergeBlock, Block* continueBlock, LoopControlMask control, const std::vector& operands); // Sets to generate opcode for specialization constants. void setToSpecConstCodeGenMode() { generatingOpCodeForSpecConst = true; } // Sets to generate opcode for non-specialization constants (normal mode). void setToNormalCodeGenMode() { generatingOpCodeForSpecConst = false; } // Check if the builder is generating code for spec constants. bool isInSpecConstCodeGenMode() { return generatingOpCodeForSpecConst; } void setUseReplicatedComposites(bool use) { useReplicatedComposites = use; } protected: Id findScalarConstant(Op typeClass, Op opcode, Id typeId, unsigned value); Id findScalarConstant(Op typeClass, Op opcode, Id typeId, unsigned v1, unsigned v2); Id findCompositeConstant(Op typeClass, Op opcode, Id typeId, const std::vector& comps, size_t numMembers); Id findStructConstant(Id typeId, const std::vector& comps); Id collapseAccessChain(); void remapDynamicSwizzle(); void transferAccessChainSwizzle(bool dynamic); void simplifyAccessChainSwizzle(); void createAndSetNoPredecessorBlock(const char*); void createSelectionMerge(Block* mergeBlock, SelectionControlMask control); void dumpSourceInstructions(std::vector&) const; void dumpSourceInstructions(const spv::Id fileId, const std::string& text, std::vector&) const; template void dumpInstructions(std::vector& out, const Range& instructions) const; void dumpModuleProcesses(std::vector&) const; spv::MemoryAccessMask sanitizeMemoryAccessForStorageClass(spv::MemoryAccessMask memoryAccess, StorageClass sc) const; struct DecorationInstructionLessThan { bool operator()(const std::unique_ptr& lhs, const std::unique_ptr& rhs) const; }; unsigned int spvVersion; // the version of SPIR-V to emit in the header SourceLanguage sourceLang; int sourceVersion; spv::Id nonSemanticShaderCompilationUnitId {0}; spv::Id nonSemanticShaderDebugInfo {0}; spv::Id debugInfoNone {0}; spv::Id debugExpression {0}; // Debug expression with zero operations. std::string sourceText; // True if an new OpLine/OpDebugLine may need to be inserted. Either: // 1. The current debug location changed // 2. The current build point changed bool dirtyLineTracker; int currentLine = 0; // OpString id of the current file name. Always 0 if debug info is off. spv::Id currentFileId = 0; // OpString id of the main file name. Always 0 if debug info is off. spv::Id mainFileId = 0; // True if an new OpDebugScope may need to be inserted. Either: // 1. A new lexical block is pushed // 2. The current build point changed bool dirtyScopeTracker; std::stack currentDebugScopeId; // This flag toggles tracking of debug info while building the SPIR-V. bool trackDebugInfo = false; // This flag toggles emission of SPIR-V debug instructions, like OpLine and OpSource. bool emitSpirvDebugInfo = false; // This flag toggles emission of Non-Semantic Debug extension debug instructions. bool emitNonSemanticShaderDebugInfo = false; bool restoreNonSemanticShaderDebugInfo = false; bool emitNonSemanticShaderDebugSource = false; std::set extensions; std::vector sourceExtensions; std::vector moduleProcesses; AddressingModel addressModel; MemoryModel memoryModel; std::set capabilities; int builderNumber; Module module; Block* buildPoint; Id uniqueId; Function* entryPointFunction; bool generatingOpCodeForSpecConst; bool useReplicatedComposites { false }; AccessChain accessChain; // special blocks of instructions for output std::vector > strings; std::vector > imports; std::vector > entryPoints; std::vector > executionModes; std::vector > names; std::set, DecorationInstructionLessThan> decorations; std::vector > constantsTypesGlobals; std::vector > externals; std::vector > functions; // not output, internally used for quick & dirty canonical (unique) creation // map type opcodes to constant inst. std::unordered_map> groupedConstants; // map struct-id to constant instructions std::unordered_map> groupedStructConstants; // map type opcodes to type instructions std::unordered_map> groupedTypes; // map type opcodes to debug type instructions std::unordered_map> groupedDebugTypes; // list of OpConstantNull instructions std::vector nullConstants; // Track which types have explicit layouts, to avoid reusing in storage classes without layout. // Currently only tracks array types. std::unordered_set explicitlyLaidOut; // stack of switches std::stack switchMerges; // Our loop stack. std::stack loops; // map from strings to their string ids std::unordered_map stringIds; // map from include file name ids to their contents std::map includeFiles; // map from core id to debug id std::map debugId; // map from file name string id to DebugSource id std::unordered_map debugSourceId; // The stream for outputting warnings and errors. SpvBuildLogger* logger; }; // end Builder class } // end spv namespace #endif // SpvBuilder_H ================================================ FILE: src/libraries/glslang/SPIRV/SpvPostProcess.cpp ================================================ // // Copyright (C) 2018 Google, Inc. // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following // disclaimer in the documentation and/or other materials provided // with the distribution. // // Neither the name of 3Dlabs Inc. Ltd. nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // // Post-processing for SPIR-V IR, in internal form, not standard binary form. // #include #include #include #include #include #include "SpvBuilder.h" #include "spirv.hpp11" #include "spvUtil.h" namespace spv { #include "GLSL.std.450.h" #include "GLSL.ext.KHR.h" #include "GLSL.ext.EXT.h" #include "GLSL.ext.AMD.h" #include "GLSL.ext.NV.h" #include "GLSL.ext.ARM.h" #include "GLSL.ext.QCOM.h" } namespace spv { // Hook to visit each operand type and result type of an instruction. // Will be called multiple times for one instruction, once for each typed // operand and the result. void Builder::postProcessType(const Instruction& inst, Id typeId) { // Characterize the type being questioned Op basicTypeOp = getMostBasicTypeClass(typeId); int width = 0; if (basicTypeOp == Op::OpTypeFloat || basicTypeOp == Op::OpTypeInt) width = getScalarTypeWidth(typeId); // Do opcode-specific checks switch (inst.getOpCode()) { case Op::OpLoad: case Op::OpStore: if (basicTypeOp == Op::OpTypeStruct) { if (containsType(typeId, Op::OpTypeInt, 8)) addCapability(Capability::Int8); if (containsType(typeId, Op::OpTypeInt, 16)) addCapability(Capability::Int16); if (containsType(typeId, Op::OpTypeFloat, 16)) addCapability(Capability::Float16); } else { StorageClass storageClass = getStorageClass(inst.getIdOperand(0)); if (width == 8) { switch (storageClass) { case StorageClass::PhysicalStorageBufferEXT: case StorageClass::Uniform: case StorageClass::StorageBuffer: case StorageClass::PushConstant: break; default: addCapability(Capability::Int8); break; } } else if (width == 16) { switch (storageClass) { case StorageClass::PhysicalStorageBufferEXT: case StorageClass::Uniform: case StorageClass::StorageBuffer: case StorageClass::PushConstant: case StorageClass::Input: case StorageClass::Output: break; default: if (basicTypeOp == Op::OpTypeInt) addCapability(Capability::Int16); if (basicTypeOp == Op::OpTypeFloat) addCapability(Capability::Float16); break; } } } break; case Op::OpCopyObject: break; case Op::OpFConvert: case Op::OpSConvert: case Op::OpUConvert: // Look for any 8/16-bit storage capabilities. If there are none, assume that // the convert instruction requires the Float16/Int8/16 capability. if (containsType(typeId, Op::OpTypeFloat, 16) || containsType(typeId, Op::OpTypeInt, 16)) { bool foundStorage = false; for (auto it = capabilities.begin(); it != capabilities.end(); ++it) { spv::Capability cap = *it; if (cap == spv::Capability::StorageInputOutput16 || cap == spv::Capability::StoragePushConstant16 || cap == spv::Capability::StorageUniformBufferBlock16 || cap == spv::Capability::StorageUniform16) { foundStorage = true; break; } } if (!foundStorage) { if (containsType(typeId, Op::OpTypeFloat, 16)) addCapability(Capability::Float16); if (containsType(typeId, Op::OpTypeInt, 16)) addCapability(Capability::Int16); } } if (containsType(typeId, Op::OpTypeInt, 8)) { bool foundStorage = false; for (auto it = capabilities.begin(); it != capabilities.end(); ++it) { spv::Capability cap = *it; if (cap == spv::Capability::StoragePushConstant8 || cap == spv::Capability::UniformAndStorageBuffer8BitAccess || cap == spv::Capability::StorageBuffer8BitAccess) { foundStorage = true; break; } } if (!foundStorage) { addCapability(Capability::Int8); } } break; case Op::OpExtInst: switch (inst.getImmediateOperand(1)) { case GLSLstd450Frexp: case GLSLstd450FrexpStruct: if (getSpvVersion() < spv::Spv_1_3 && containsType(typeId, Op::OpTypeInt, 16)) addExtension(spv::E_SPV_AMD_gpu_shader_int16); break; case GLSLstd450InterpolateAtCentroid: case GLSLstd450InterpolateAtSample: case GLSLstd450InterpolateAtOffset: if (getSpvVersion() < spv::Spv_1_3 && containsType(typeId, Op::OpTypeFloat, 16)) addExtension(spv::E_SPV_AMD_gpu_shader_half_float); break; default: break; } break; case Op::OpAccessChain: case Op::OpPtrAccessChain: if (isPointerType(typeId)) break; if (basicTypeOp == Op::OpTypeInt) { if (width == 16) addCapability(Capability::Int16); else if (width == 8) addCapability(Capability::Int8); } break; default: if (basicTypeOp == Op::OpTypeInt) { if (width == 16) addCapability(Capability::Int16); else if (width == 8) addCapability(Capability::Int8); else if (width == 64) addCapability(Capability::Int64); } else if (basicTypeOp == Op::OpTypeFloat) { if (width == 16) addCapability(Capability::Float16); else if (width == 64) addCapability(Capability::Float64); } break; } } // Called for each instruction that resides in a block. void Builder::postProcess(Instruction& inst) { // Add capabilities based simply on the opcode. switch (inst.getOpCode()) { case Op::OpExtInst: switch (inst.getImmediateOperand(1)) { case GLSLstd450InterpolateAtCentroid: case GLSLstd450InterpolateAtSample: case GLSLstd450InterpolateAtOffset: addCapability(Capability::InterpolationFunction); break; default: break; } break; case Op::OpDPdxFine: case Op::OpDPdyFine: case Op::OpFwidthFine: case Op::OpDPdxCoarse: case Op::OpDPdyCoarse: case Op::OpFwidthCoarse: addCapability(Capability::DerivativeControl); break; case Op::OpImageQueryLod: case Op::OpImageQuerySize: case Op::OpImageQuerySizeLod: case Op::OpImageQuerySamples: case Op::OpImageQueryLevels: addCapability(Capability::ImageQuery); break; case Op::OpGroupNonUniformPartitionNV: addExtension(E_SPV_NV_shader_subgroup_partitioned); addCapability(Capability::GroupNonUniformPartitionedNV); break; case Op::OpLoad: case Op::OpStore: { // For any load/store to a PhysicalStorageBufferEXT, walk the accesschain // index list to compute the misalignment. The pre-existing alignment value // (set via Builder::AccessChain::alignment) only accounts for the base of // the reference type and any scalar component selection in the accesschain, // and this function computes the rest from the SPIR-V Offset decorations. Instruction *accessChain = module.getInstruction(inst.getIdOperand(0)); if (accessChain->getOpCode() == Op::OpAccessChain) { Instruction *base = module.getInstruction(accessChain->getIdOperand(0)); // Get the type of the base of the access chain. It must be a pointer type. Id typeId = base->getTypeId(); Instruction *type = module.getInstruction(typeId); assert(type->getOpCode() == Op::OpTypePointer); if (type->getImmediateOperand(0) != StorageClass::PhysicalStorageBufferEXT) { break; } // Get the pointee type. typeId = type->getIdOperand(1); type = module.getInstruction(typeId); // Walk the index list for the access chain. For each index, find any // misalignment that can apply when accessing the member/element via // Offset/ArrayStride/MatrixStride decorations, and bitwise OR them all // together. int alignment = 0; for (int i = 1; i < accessChain->getNumOperands(); ++i) { Instruction *idx = module.getInstruction(accessChain->getIdOperand(i)); if (type->getOpCode() == Op::OpTypeStruct) { assert(idx->getOpCode() == Op::OpConstant); unsigned int c = idx->getImmediateOperand(0); const auto function = [&](const std::unique_ptr& decoration) { if (decoration.get()->getOpCode() == Op::OpMemberDecorate && decoration.get()->getIdOperand(0) == typeId && decoration.get()->getImmediateOperand(1) == c && (decoration.get()->getImmediateOperand(2) == Decoration::Offset || decoration.get()->getImmediateOperand(2) == Decoration::MatrixStride)) { alignment |= decoration.get()->getImmediateOperand(3); } }; std::for_each(decorations.begin(), decorations.end(), function); // get the next member type typeId = type->getIdOperand(c); type = module.getInstruction(typeId); } else if (type->getOpCode() == Op::OpTypeArray || type->getOpCode() == Op::OpTypeRuntimeArray) { const auto function = [&](const std::unique_ptr& decoration) { if (decoration.get()->getOpCode() == Op::OpDecorate && decoration.get()->getIdOperand(0) == typeId && decoration.get()->getImmediateOperand(1) == Decoration::ArrayStride) { alignment |= decoration.get()->getImmediateOperand(2); } }; std::for_each(decorations.begin(), decorations.end(), function); // Get the element type typeId = type->getIdOperand(0); type = module.getInstruction(typeId); } else { // Once we get to any non-aggregate type, we're done. break; } } assert(inst.getNumOperands() >= 3); auto const memoryAccess = (MemoryAccessMask)inst.getImmediateOperand((inst.getOpCode() == Op::OpStore) ? 2 : 1); assert(anySet(memoryAccess, MemoryAccessMask::Aligned)); static_cast(memoryAccess); // Compute the index of the alignment operand. int alignmentIdx = 2; if (inst.getOpCode() == Op::OpStore) alignmentIdx++; // Merge new and old (mis)alignment alignment |= inst.getImmediateOperand(alignmentIdx); // Pick the LSB alignment = alignment & ~(alignment & (alignment-1)); // update the Aligned operand inst.setImmediateOperand(alignmentIdx, alignment); } break; } default: break; } // Checks based on type if (inst.getTypeId() != NoType) postProcessType(inst, inst.getTypeId()); for (int op = 0; op < inst.getNumOperands(); ++op) { if (inst.isIdOperand(op)) { // In blocks, these are always result ids, but we are relying on // getTypeId() to return NoType for things like OpLabel. if (getTypeId(inst.getIdOperand(op)) != NoType) postProcessType(inst, getTypeId(inst.getIdOperand(op))); } } } // comment in header void Builder::postProcessCFG() { // reachableBlocks is the set of blockss reached via control flow, or which are // unreachable continue targert or unreachable merge. std::unordered_set reachableBlocks; std::unordered_map headerForUnreachableContinue; std::unordered_set unreachableMerges; std::unordered_set unreachableDefinitions; // Collect IDs defined in unreachable blocks. For each function, label the // reachable blocks first. Then for each unreachable block, collect the // result IDs of the instructions in it. for (auto fi = module.getFunctions().cbegin(); fi != module.getFunctions().cend(); fi++) { Function* f = *fi; Block* entry = f->getEntryBlock(); inReadableOrder(entry, [&reachableBlocks, &unreachableMerges, &headerForUnreachableContinue] (Block* b, ReachReason why, Block* header) { reachableBlocks.insert(b); if (why == ReachDeadContinue) headerForUnreachableContinue[b] = header; if (why == ReachDeadMerge) unreachableMerges.insert(b); }); for (auto bi = f->getBlocks().cbegin(); bi != f->getBlocks().cend(); bi++) { Block* b = *bi; if (unreachableMerges.count(b) != 0 || headerForUnreachableContinue.count(b) != 0) { auto ii = b->getInstructions().cbegin(); ++ii; // Keep potential decorations on the label. for (; ii != b->getInstructions().cend(); ++ii) unreachableDefinitions.insert(ii->get()->getResultId()); } else if (reachableBlocks.count(b) == 0) { // The normal case for unreachable code. All definitions are considered dead. for (auto ii = b->getInstructions().cbegin(); ii != b->getInstructions().cend(); ++ii) unreachableDefinitions.insert(ii->get()->getResultId()); } } } // Modify unreachable merge blocks and unreachable continue targets. // Delete their contents. for (auto mergeIter = unreachableMerges.begin(); mergeIter != unreachableMerges.end(); ++mergeIter) { (*mergeIter)->rewriteAsCanonicalUnreachableMerge(); } for (auto continueIter = headerForUnreachableContinue.begin(); continueIter != headerForUnreachableContinue.end(); ++continueIter) { Block* continue_target = continueIter->first; Block* header = continueIter->second; continue_target->rewriteAsCanonicalUnreachableContinue(header); } // Remove unneeded decorations, for unreachable instructions for (auto decorationIter = decorations.begin(); decorationIter != decorations.end();) { Id decorationId = (*decorationIter)->getIdOperand(0); if (unreachableDefinitions.count(decorationId) != 0) { decorationIter = decorations.erase(decorationIter); } else { ++decorationIter; } } } // comment in header void Builder::postProcessFeatures() { // Add per-instruction capabilities, extensions, etc., // Look for any 8/16 bit type in physical storage buffer class, and set the // appropriate capability. This happens in createSpvVariable for other storage // classes, but there isn't always a variable for physical storage buffer. for (int t = 0; t < (int)groupedTypes[enumCast(Op::OpTypePointer)].size(); ++t) { Instruction* type = groupedTypes[enumCast(Op::OpTypePointer)][t]; if (type->getImmediateOperand(0) == (unsigned)StorageClass::PhysicalStorageBufferEXT) { if (containsType(type->getIdOperand(1), Op::OpTypeInt, 8)) { addIncorporatedExtension(spv::E_SPV_KHR_8bit_storage, spv::Spv_1_5); addCapability(spv::Capability::StorageBuffer8BitAccess); } if (containsType(type->getIdOperand(1), Op::OpTypeInt, 16) || containsType(type->getIdOperand(1), Op::OpTypeFloat, 16)) { addIncorporatedExtension(spv::E_SPV_KHR_16bit_storage, spv::Spv_1_3); addCapability(spv::Capability::StorageBuffer16BitAccess); } } } // process all block-contained instructions for (auto fi = module.getFunctions().cbegin(); fi != module.getFunctions().cend(); fi++) { Function* f = *fi; for (auto bi = f->getBlocks().cbegin(); bi != f->getBlocks().cend(); bi++) { Block* b = *bi; for (auto ii = b->getInstructions().cbegin(); ii != b->getInstructions().cend(); ii++) postProcess(*ii->get()); // For all local variables that contain pointers to PhysicalStorageBufferEXT, check whether // there is an existing restrict/aliased decoration. If we don't find one, add Aliased as the // default. for (auto vi = b->getLocalVariables().cbegin(); vi != b->getLocalVariables().cend(); vi++) { const Instruction& inst = *vi->get(); Id resultId = inst.getResultId(); if (containsPhysicalStorageBufferOrArray(getDerefTypeId(resultId))) { bool foundDecoration = false; const auto function = [&](const std::unique_ptr& decoration) { if (decoration.get()->getIdOperand(0) == resultId && decoration.get()->getOpCode() == Op::OpDecorate && (decoration.get()->getImmediateOperand(1) == spv::Decoration::AliasedPointerEXT || decoration.get()->getImmediateOperand(1) == spv::Decoration::RestrictPointerEXT)) { foundDecoration = true; } }; std::for_each(decorations.begin(), decorations.end(), function); if (!foundDecoration) { addDecoration(resultId, spv::Decoration::AliasedPointerEXT); } } } } } // If any Vulkan memory model-specific functionality is used, update the // OpMemoryModel to match. if (capabilities.find(spv::Capability::VulkanMemoryModelKHR) != capabilities.end()) { memoryModel = spv::MemoryModel::VulkanKHR; addIncorporatedExtension(spv::E_SPV_KHR_vulkan_memory_model, spv::Spv_1_5); } // Add Aliased decoration if there's more than one Workgroup Block variable. if (capabilities.find(spv::Capability::WorkgroupMemoryExplicitLayoutKHR) != capabilities.end()) { assert(entryPoints.size() == 1); auto &ep = entryPoints[0]; std::vector workgroup_variables; for (int i = 0; i < (int)ep->getNumOperands(); i++) { if (!ep->isIdOperand(i)) continue; const Id id = ep->getIdOperand(i); const Instruction *instr = module.getInstruction(id); if (instr->getOpCode() != spv::Op::OpVariable) continue; if (instr->getImmediateOperand(0) == spv::StorageClass::Workgroup) workgroup_variables.push_back(id); } if (workgroup_variables.size() > 1) { for (size_t i = 0; i < workgroup_variables.size(); i++) addDecoration(workgroup_variables[i], spv::Decoration::Aliased); } } } // SPIR-V requires that any instruction consuming the result of an OpSampledImage // be in the same block as the OpSampledImage instruction. This pass goes finds // uses of OpSampledImage where that is not the case and duplicates the // OpSampledImage to be immediately before the instruction that consumes it. // The old OpSampledImage is left in place, potentially with no users. void Builder::postProcessSamplers() { // first, find all OpSampledImage instructions and store them in a map. std::map sampledImageInstrs; for (auto f: module.getFunctions()) { for (auto b: f->getBlocks()) { for (auto &i: b->getInstructions()) { if (i->getOpCode() == spv::Op::OpSampledImage) { sampledImageInstrs[i->getResultId()] = i.get(); } } } } // next find all uses of the given ids and rewrite them if needed. for (auto f: module.getFunctions()) { for (auto b: f->getBlocks()) { auto &instrs = b->getInstructions(); for (size_t idx = 0; idx < instrs.size(); idx++) { Instruction *i = instrs[idx].get(); for (int opnum = 0; opnum < i->getNumOperands(); opnum++) { // Is this operand of the current instruction the result of an OpSampledImage? if (i->isIdOperand(opnum) && sampledImageInstrs.count(i->getIdOperand(opnum))) { Instruction *opSampImg = sampledImageInstrs[i->getIdOperand(opnum)]; if (i->getBlock() != opSampImg->getBlock()) { Instruction *newInstr = new Instruction(getUniqueId(), opSampImg->getTypeId(), spv::Op::OpSampledImage); newInstr->addIdOperand(opSampImg->getIdOperand(0)); newInstr->addIdOperand(opSampImg->getIdOperand(1)); newInstr->setBlock(b); // rewrite the user of the OpSampledImage to use the new instruction. i->setIdOperand(opnum, newInstr->getResultId()); // insert the new OpSampledImage right before the current instruction. instrs.insert(instrs.begin() + idx, std::unique_ptr(newInstr)); idx++; } } } } } } } // comment in header void Builder::postProcess(bool compileOnly) { // postProcessCFG needs an entrypoint to determine what is reachable, but if we are not creating an "executable" shader, we don't have an entrypoint if (!compileOnly) postProcessCFG(); postProcessFeatures(); postProcessSamplers(); } } // end spv namespace ================================================ FILE: src/libraries/glslang/SPIRV/SpvTools.cpp ================================================ // // Copyright (C) 2014-2016 LunarG, Inc. // Copyright (C) 2018-2020 Google, Inc. // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following // disclaimer in the documentation and/or other materials provided // with the distribution. // // Neither the name of 3Dlabs Inc. Ltd. nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // // Call into SPIRV-Tools to disassemble, validate, and optimize. // #if ENABLE_OPT #include #include #include "SpvTools.h" #include "spirv-tools/optimizer.hpp" #include "../glslang/MachineIndependent/localintermediate.h" namespace glslang { // Translate glslang's view of target versioning to what SPIRV-Tools uses. spv_target_env MapToSpirvToolsEnv(const SpvVersion& spvVersion, spv::SpvBuildLogger* logger) { switch (spvVersion.vulkan) { case glslang::EShTargetVulkan_1_0: return spv_target_env::SPV_ENV_VULKAN_1_0; case glslang::EShTargetVulkan_1_1: switch (spvVersion.spv) { case EShTargetSpv_1_0: case EShTargetSpv_1_1: case EShTargetSpv_1_2: case EShTargetSpv_1_3: return spv_target_env::SPV_ENV_VULKAN_1_1; case EShTargetSpv_1_4: return spv_target_env::SPV_ENV_VULKAN_1_1_SPIRV_1_4; default: logger->missingFunctionality("Target version for SPIRV-Tools validator"); return spv_target_env::SPV_ENV_VULKAN_1_1; } case glslang::EShTargetVulkan_1_2: return spv_target_env::SPV_ENV_VULKAN_1_2; case glslang::EShTargetVulkan_1_3: return spv_target_env::SPV_ENV_VULKAN_1_3; case glslang::EShTargetVulkan_1_4: return spv_target_env::SPV_ENV_VULKAN_1_4; default: break; } if (spvVersion.openGl > 0) return spv_target_env::SPV_ENV_OPENGL_4_5; logger->missingFunctionality("Target version for SPIRV-Tools validator"); return spv_target_env::SPV_ENV_UNIVERSAL_1_0; } spv_target_env MapToSpirvToolsEnv(const glslang::TIntermediate& intermediate, spv::SpvBuildLogger* logger) { return MapToSpirvToolsEnv(intermediate.getSpv(), logger); } // Callback passed to spvtools::Optimizer::SetMessageConsumer void OptimizerMesssageConsumer(spv_message_level_t level, const char *source, const spv_position_t &position, const char *message) { auto &out = std::cerr; switch (level) { case SPV_MSG_FATAL: case SPV_MSG_INTERNAL_ERROR: case SPV_MSG_ERROR: out << "error: "; break; case SPV_MSG_WARNING: out << "warning: "; break; case SPV_MSG_INFO: case SPV_MSG_DEBUG: out << "info: "; break; default: break; } if (source) { out << source << ":"; } out << position.line << ":" << position.column << ":" << position.index << ":"; if (message) { out << " " << message; } out << std::endl; } // Use the SPIRV-Tools disassembler to print SPIR-V using a SPV_ENV_UNIVERSAL_1_3 environment. void SpirvToolsDisassemble(std::ostream& out, const std::vector& spirv) { SpirvToolsDisassemble(out, spirv, spv_target_env::SPV_ENV_UNIVERSAL_1_3); } // Use the SPIRV-Tools disassembler to print SPIR-V with a provided SPIR-V environment. void SpirvToolsDisassemble(std::ostream& out, const std::vector& spirv, spv_target_env requested_context) { // disassemble spv_context context = spvContextCreate(requested_context); spv_text text; spv_diagnostic diagnostic = nullptr; spvBinaryToText(context, spirv.data(), spirv.size(), SPV_BINARY_TO_TEXT_OPTION_FRIENDLY_NAMES | SPV_BINARY_TO_TEXT_OPTION_INDENT, &text, &diagnostic); // dump if (diagnostic == nullptr) out << text->str; else spvDiagnosticPrint(diagnostic); // teardown spvDiagnosticDestroy(diagnostic); spvContextDestroy(context); } // Apply the SPIRV-Tools validator to generated SPIR-V. void SpirvToolsValidate(const glslang::TIntermediate& intermediate, std::vector& spirv, spv::SpvBuildLogger* logger, bool prelegalization) { // validate spv_context context = spvContextCreate(MapToSpirvToolsEnv(intermediate.getSpv(), logger)); spv_const_binary_t binary = { spirv.data(), spirv.size() }; spv_diagnostic diagnostic = nullptr; spv_validator_options options = spvValidatorOptionsCreate(); spvValidatorOptionsSetRelaxBlockLayout(options, intermediate.usingHlslOffsets()); spvValidatorOptionsSetBeforeHlslLegalization(options, prelegalization); spvValidatorOptionsSetScalarBlockLayout(options, intermediate.usingScalarBlockLayout()); spvValidatorOptionsSetWorkgroupScalarBlockLayout(options, intermediate.usingScalarBlockLayout()); spvValidatorOptionsSetAllowOffsetTextureOperand(options, intermediate.usingTextureOffsetNonConst()); spvValidateWithOptions(context, options, &binary, &diagnostic); // report if (diagnostic != nullptr) { logger->error("SPIRV-Tools Validation Errors"); logger->error(diagnostic->error); } // tear down spvValidatorOptionsDestroy(options); spvDiagnosticDestroy(diagnostic); spvContextDestroy(context); } // Apply the SPIRV-Tools optimizer to generated SPIR-V. HLSL SPIR-V is legalized in the process. void SpirvToolsTransform(const glslang::TIntermediate& intermediate, std::vector& spirv, spv::SpvBuildLogger* logger, const SpvOptions* options) { spv_target_env target_env = MapToSpirvToolsEnv(intermediate.getSpv(), logger); spvtools::Optimizer optimizer(target_env); optimizer.SetMessageConsumer(OptimizerMesssageConsumer); // If debug (specifically source line info) is being generated, propagate // line information into all SPIR-V instructions. This avoids loss of // information when instructions are deleted or moved. Later, remove // redundant information to minimize final SPRIR-V size. if (options->stripDebugInfo) { optimizer.RegisterPass(spvtools::CreateStripDebugInfoPass()); } optimizer.RegisterPass(spvtools::CreateWrapOpKillPass()); optimizer.RegisterPass(spvtools::CreateDeadBranchElimPass()); optimizer.RegisterPass(spvtools::CreateMergeReturnPass()); optimizer.RegisterPass(spvtools::CreateInlineExhaustivePass()); optimizer.RegisterPass(spvtools::CreateEliminateDeadFunctionsPass()); optimizer.RegisterPass(spvtools::CreateScalarReplacementPass()); optimizer.RegisterPass(spvtools::CreateLocalAccessChainConvertPass()); optimizer.RegisterPass(spvtools::CreateLocalSingleBlockLoadStoreElimPass()); optimizer.RegisterPass(spvtools::CreateLocalSingleStoreElimPass()); optimizer.RegisterPass(spvtools::CreateSimplificationPass()); optimizer.RegisterPass(spvtools::CreateAggressiveDCEPass()); optimizer.RegisterPass(spvtools::CreateVectorDCEPass()); optimizer.RegisterPass(spvtools::CreateDeadInsertElimPass()); optimizer.RegisterPass(spvtools::CreateAggressiveDCEPass()); optimizer.RegisterPass(spvtools::CreateDeadBranchElimPass()); optimizer.RegisterPass(spvtools::CreateBlockMergePass()); optimizer.RegisterPass(spvtools::CreateLocalMultiStoreElimPass()); optimizer.RegisterPass(spvtools::CreateIfConversionPass()); optimizer.RegisterPass(spvtools::CreateSimplificationPass()); optimizer.RegisterPass(spvtools::CreateAggressiveDCEPass()); optimizer.RegisterPass(spvtools::CreateVectorDCEPass()); optimizer.RegisterPass(spvtools::CreateDeadInsertElimPass()); optimizer.RegisterPass(spvtools::CreateInterpolateFixupPass()); if (options->optimizeSize) { optimizer.RegisterPass(spvtools::CreateRedundancyEliminationPass()); optimizer.RegisterPass(spvtools::CreateEliminateDeadInputComponentsSafePass()); } optimizer.RegisterPass(spvtools::CreateAggressiveDCEPass()); optimizer.RegisterPass(spvtools::CreateCFGCleanupPass()); spvtools::OptimizerOptions spvOptOptions; if (options->optimizerAllowExpandedIDBound) spvOptOptions.set_max_id_bound(0x3FFFFFFF); optimizer.SetTargetEnv(MapToSpirvToolsEnv(intermediate.getSpv(), logger)); spvOptOptions.set_run_validator(false); // The validator may run as a separate step later on optimizer.Run(spirv.data(), spirv.size(), &spirv, spvOptOptions); if (options->optimizerAllowExpandedIDBound) { if (spirv.size() > 3 && spirv[3] > kDefaultMaxIdBound) { spvtools::Optimizer optimizer2(target_env); optimizer2.SetMessageConsumer(OptimizerMesssageConsumer); optimizer2.RegisterPass(spvtools::CreateCompactIdsPass()); optimizer2.Run(spirv.data(), spirv.size(), &spirv, spvOptOptions); } } } bool SpirvToolsAnalyzeDeadOutputStores(spv_target_env target_env, std::vector& spirv, std::unordered_set* live_locs, std::unordered_set* live_builtins, spv::SpvBuildLogger*) { spvtools::Optimizer optimizer(target_env); optimizer.SetMessageConsumer(OptimizerMesssageConsumer); optimizer.RegisterPass(spvtools::CreateAnalyzeLiveInputPass(live_locs, live_builtins)); spvtools::OptimizerOptions spvOptOptions; optimizer.SetTargetEnv(target_env); spvOptOptions.set_run_validator(false); return optimizer.Run(spirv.data(), spirv.size(), &spirv, spvOptOptions); } void SpirvToolsEliminateDeadOutputStores(spv_target_env target_env, std::vector& spirv, std::unordered_set* live_locs, std::unordered_set* live_builtins, spv::SpvBuildLogger*) { spvtools::Optimizer optimizer(target_env); optimizer.SetMessageConsumer(OptimizerMesssageConsumer); optimizer.RegisterPass(spvtools::CreateEliminateDeadOutputStoresPass(live_locs, live_builtins)); optimizer.RegisterPass(spvtools::CreateAggressiveDCEPass(false, true)); optimizer.RegisterPass(spvtools::CreateEliminateDeadOutputComponentsPass()); optimizer.RegisterPass(spvtools::CreateAggressiveDCEPass(false, true)); spvtools::OptimizerOptions spvOptOptions; optimizer.SetTargetEnv(target_env); spvOptOptions.set_run_validator(false); optimizer.Run(spirv.data(), spirv.size(), &spirv, spvOptOptions); } void SpirvToolsEliminateDeadInputComponents(spv_target_env target_env, std::vector& spirv, spv::SpvBuildLogger*) { spvtools::Optimizer optimizer(target_env); optimizer.SetMessageConsumer(OptimizerMesssageConsumer); optimizer.RegisterPass(spvtools::CreateEliminateDeadInputComponentsPass()); optimizer.RegisterPass(spvtools::CreateAggressiveDCEPass()); spvtools::OptimizerOptions spvOptOptions; optimizer.SetTargetEnv(target_env); spvOptOptions.set_run_validator(false); optimizer.Run(spirv.data(), spirv.size(), &spirv, spvOptOptions); } // Apply the SPIRV-Tools optimizer to strip debug info from SPIR-V. This is implicitly done by // SpirvToolsTransform if spvOptions->stripDebugInfo is set, but can be called separately if // optimization is disabled. void SpirvToolsStripDebugInfo(const glslang::TIntermediate& intermediate, std::vector& spirv, spv::SpvBuildLogger* logger) { spv_target_env target_env = MapToSpirvToolsEnv(intermediate.getSpv(), logger); spvtools::Optimizer optimizer(target_env); optimizer.SetMessageConsumer(OptimizerMesssageConsumer); optimizer.RegisterPass(spvtools::CreateStripDebugInfoPass()); spvtools::OptimizerOptions spvOptOptions; optimizer.SetTargetEnv(MapToSpirvToolsEnv(intermediate.getSpv(), logger)); spvOptOptions.set_run_validator(false); // The validator may run as a separate step later on optimizer.Run(spirv.data(), spirv.size(), &spirv, spvOptOptions); } } // end namespace glslang #endif ================================================ FILE: src/libraries/glslang/SPIRV/SpvTools.h ================================================ // // Copyright (C) 2014-2016 LunarG, Inc. // Copyright (C) 2018 Google, Inc. // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following // disclaimer in the documentation and/or other materials provided // with the distribution. // // Neither the name of 3Dlabs Inc. Ltd. nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // // Call into SPIRV-Tools to disassemble, validate, and optimize. // #pragma once #ifndef GLSLANG_SPV_TOOLS_H #define GLSLANG_SPV_TOOLS_H #if ENABLE_OPT #include #include #include #include "spirv-tools/libspirv.h" #endif #include "../glslang/MachineIndependent/Versions.h" #include "../glslang/Include/visibility.h" #include "GlslangToSpv.h" #include "Logger.h" namespace glslang { #if ENABLE_OPT class TIntermediate; // Translate glslang's view of target versioning to what SPIRV-Tools uses. GLSLANG_EXPORT spv_target_env MapToSpirvToolsEnv(const SpvVersion& spvVersion, spv::SpvBuildLogger* logger); GLSLANG_EXPORT spv_target_env MapToSpirvToolsEnv(const glslang::TIntermediate& intermediate, spv::SpvBuildLogger* logger); // Use the SPIRV-Tools disassembler to print SPIR-V using a SPV_ENV_UNIVERSAL_1_3 environment. GLSLANG_EXPORT void SpirvToolsDisassemble(std::ostream& out, const std::vector& spirv); // Use the SPIRV-Tools disassembler to print SPIR-V with a provided SPIR-V environment. GLSLANG_EXPORT void SpirvToolsDisassemble(std::ostream& out, const std::vector& spirv, spv_target_env requested_context); // Apply the SPIRV-Tools validator to generated SPIR-V. GLSLANG_EXPORT void SpirvToolsValidate(const glslang::TIntermediate& intermediate, std::vector& spirv, spv::SpvBuildLogger*, bool prelegalization); // Apply the SPIRV-Tools optimizer to generated SPIR-V. HLSL SPIR-V is legalized in the process. GLSLANG_EXPORT void SpirvToolsTransform(const glslang::TIntermediate& intermediate, std::vector& spirv, spv::SpvBuildLogger*, const SpvOptions*); // Apply the SPIRV-Tools EliminateDeadInputComponents pass to generated SPIR-V. Put result in |spirv|. GLSLANG_EXPORT void SpirvToolsEliminateDeadInputComponents(spv_target_env target_env, std::vector& spirv, spv::SpvBuildLogger*); // Apply the SPIRV-Tools AnalyzeDeadOutputStores pass to generated SPIR-V. Put result in |live_locs|. // Return true if the result is valid. GLSLANG_EXPORT bool SpirvToolsAnalyzeDeadOutputStores(spv_target_env target_env, std::vector& spirv, std::unordered_set* live_locs, std::unordered_set* live_builtins, spv::SpvBuildLogger*); // Apply the SPIRV-Tools EliminateDeadOutputStores and AggressiveDeadCodeElimination passes to generated SPIR-V using // |live_locs|. Put result in |spirv|. GLSLANG_EXPORT void SpirvToolsEliminateDeadOutputStores(spv_target_env target_env, std::vector& spirv, std::unordered_set* live_locs, std::unordered_set* live_builtins, spv::SpvBuildLogger*); // Apply the SPIRV-Tools optimizer to strip debug info from SPIR-V. This is implicitly done by // SpirvToolsTransform if spvOptions->stripDebugInfo is set, but can be called separately if // optimization is disabled. GLSLANG_EXPORT void SpirvToolsStripDebugInfo(const glslang::TIntermediate& intermediate, std::vector& spirv, spv::SpvBuildLogger*); #endif } // end namespace glslang #endif // GLSLANG_SPV_TOOLS_H ================================================ FILE: src/libraries/glslang/SPIRV/bitutils.h ================================================ // Copyright (c) 2015-2016 The Khronos Group Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. #ifndef LIBSPIRV_UTIL_BITUTILS_H_ #define LIBSPIRV_UTIL_BITUTILS_H_ #include #include namespace spvutils { // Performs a bitwise copy of source to the destination type Dest. template Dest BitwiseCast(Src source) { Dest dest; static_assert(sizeof(source) == sizeof(dest), "BitwiseCast: Source and destination must have the same size"); std::memcpy(static_cast(&dest), &source, sizeof(dest)); return dest; } // SetBits returns an integer of type with bits set // for position through , counting from the least // significant bit. In particular when Num == 0, no positions are set to 1. // A static assert will be triggered if First + Num > sizeof(T) * 8, that is, // a bit that will not fit in the underlying type is set. template struct SetBits { static_assert(First < sizeof(T) * 8, "Tried to set a bit that is shifted too far."); const static T get = (T(1) << First) | SetBits::get; }; template struct SetBits { const static T get = T(0); }; // This is all compile-time so we can put our tests right here. static_assert(SetBits::get == uint32_t(0x00000000), "SetBits failed"); static_assert(SetBits::get == uint32_t(0x00000001), "SetBits failed"); static_assert(SetBits::get == uint32_t(0x80000000), "SetBits failed"); static_assert(SetBits::get == uint32_t(0x00000006), "SetBits failed"); static_assert(SetBits::get == uint32_t(0xc0000000), "SetBits failed"); static_assert(SetBits::get == uint32_t(0x7FFFFFFF), "SetBits failed"); static_assert(SetBits::get == uint32_t(0xFFFFFFFF), "SetBits failed"); static_assert(SetBits::get == uint32_t(0xFFFF0000), "SetBits failed"); static_assert(SetBits::get == uint64_t(0x0000000000000001LL), "SetBits failed"); static_assert(SetBits::get == uint64_t(0x8000000000000000LL), "SetBits failed"); static_assert(SetBits::get == uint64_t(0xc000000000000000LL), "SetBits failed"); static_assert(SetBits::get == uint64_t(0x0000000080000000LL), "SetBits failed"); static_assert(SetBits::get == uint64_t(0x00000000FFFF0000LL), "SetBits failed"); } // namespace spvutils #endif // LIBSPIRV_UTIL_BITUTILS_H_ ================================================ FILE: src/libraries/glslang/SPIRV/disassemble.cpp ================================================ // // Copyright (C) 2014-2015 LunarG, Inc. // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following // disclaimer in the documentation and/or other materials provided // with the distribution. // // Neither the name of 3Dlabs Inc. Ltd. nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // // Disassembler for SPIR-V. // #include #include #include #include #include #include #include #include #include #include "disassemble.h" #include "doc.h" #include "spvUtil.h" namespace spv { extern "C" { // Include C-based headers that don't have a namespace #include "GLSL.std.450.h" #include "GLSL.ext.AMD.h" #include "GLSL.ext.NV.h" #include "GLSL.ext.ARM.h" #include "NonSemanticShaderDebugInfo100.h" #include "GLSL.ext.QCOM.h" } } const char* GlslStd450DebugNames[spv::GLSLstd450Count]; namespace spv { static const char* GLSLextAMDGetDebugNames(const char*, unsigned); static const char* GLSLextNVGetDebugNames(const char*, unsigned); static const char* NonSemanticShaderDebugInfo100GetDebugNames(unsigned); static void Kill(std::ostream& out, const char* message) { out << std::endl << "Disassembly failed: " << message << std::endl; exit(1); } // used to identify the extended instruction library imported when printing enum ExtInstSet { GLSL450Inst, GLSLextAMDInst, GLSLextNVInst, OpenCLExtInst, NonSemanticDebugPrintfExtInst, NonSemanticDebugBreakExtInst, NonSemanticShaderDebugInfo100 }; // Container class for a single instance of a SPIR-V stream, with methods for disassembly. class SpirvStream { public: SpirvStream(std::ostream& out, const std::vector& stream) : out(out), stream(stream), word(0), nextNestedControl(0) { } virtual ~SpirvStream() { } void validate(); void processInstructions(); protected: SpirvStream(const SpirvStream&); SpirvStream& operator=(const SpirvStream&); Op getOpCode(int id) const { return idInstruction[id] ? (Op)(stream[idInstruction[id]] & OpCodeMask) : Op::OpNop; } // Output methods void outputIndent(); void formatId(Id id, std::stringstream&); void outputResultId(Id id); void outputTypeId(Id id); void outputId(Id id); void outputMask(OperandClass operandClass, unsigned mask); void disassembleImmediates(int numOperands); void disassembleIds(int numOperands); std::pair decodeString(); int disassembleString(); void disassembleInstruction(Id resultId, Id typeId, Op opCode, int numOperands); // Data std::ostream& out; // where to write the disassembly const std::vector& stream; // the actual word stream int size; // the size of the word stream int word; // the next word of the stream to read // map each to the instruction that created it Id bound; std::vector idInstruction; // the word offset into the stream where the instruction for result [id] starts; 0 if not yet seen (forward reference or function parameter) std::vector idDescriptor; // the best text string known for explaining the // schema unsigned int schema; // stack of structured-merge points std::stack nestedControl; Id nextNestedControl; // need a slight delay for when we are nested }; void SpirvStream::validate() { size = (int)stream.size(); if (size < 4) Kill(out, "stream is too short"); // Magic number if (stream[word++] != MagicNumber) { out << "Bad magic number"; return; } // Version out << "// Module Version " << std::hex << stream[word++] << std::endl; // Generator's magic number out << "// Generated by (magic number): " << std::hex << stream[word++] << std::dec << std::endl; // Result bound bound = stream[word++]; idInstruction.resize(bound); idDescriptor.resize(bound); out << "// Id's are bound by " << bound << std::endl; out << std::endl; // Reserved schema, must be 0 for now schema = stream[word++]; if (schema != 0) Kill(out, "bad schema, must be 0"); } // Loop over all the instructions, in order, processing each. // Boiler plate for each is handled here directly, the rest is dispatched. void SpirvStream::processInstructions() { // Instructions while (word < size) { int instructionStart = word; // Instruction wordCount and opcode unsigned int firstWord = stream[word]; unsigned wordCount = firstWord >> WordCountShift; Op opCode = (Op)(firstWord & OpCodeMask); int nextInst = word + wordCount; ++word; // Presence of full instruction if (nextInst > size) Kill(out, "stream instruction terminated too early"); // Base for computing number of operands; will be updated as more is learned unsigned numOperands = wordCount - 1; // Type Id typeId = 0; if (InstructionDesc[enumCast(opCode)].hasType()) { typeId = stream[word++]; --numOperands; } // Result Id resultId = 0; if (InstructionDesc[enumCast(opCode)].hasResult()) { resultId = stream[word++]; --numOperands; // save instruction for future reference idInstruction[resultId] = instructionStart; } outputResultId(resultId); outputTypeId(typeId); outputIndent(); // Hand off the Op and all its operands disassembleInstruction(resultId, typeId, opCode, numOperands); if (word != nextInst) { out << " ERROR, incorrect number of operands consumed. At " << word << " instead of " << nextInst << " instruction start was " << instructionStart; word = nextInst; } out << std::endl; } } void SpirvStream::outputIndent() { for (int i = 0; i < (int)nestedControl.size(); ++i) out << " "; } void SpirvStream::formatId(Id id, std::stringstream& idStream) { if (id != 0) { // On instructions with no IDs, this is called with "0", which does not // have to be within ID bounds on null shaders. if (id >= bound) Kill(out, "Bad "); idStream << id; if (idDescriptor[id].size() > 0) idStream << "(" << idDescriptor[id] << ")"; } } void SpirvStream::outputResultId(Id id) { const int width = 16; std::stringstream idStream; formatId(id, idStream); out << std::setw(width) << std::right << idStream.str(); if (id != 0) out << ":"; else out << " "; if (nestedControl.size() && id == nestedControl.top()) nestedControl.pop(); } void SpirvStream::outputTypeId(Id id) { const int width = 12; std::stringstream idStream; formatId(id, idStream); out << std::setw(width) << std::right << idStream.str() << " "; } void SpirvStream::outputId(Id id) { if (id >= bound) Kill(out, "Bad "); out << id; if (idDescriptor[id].size() > 0) out << "(" << idDescriptor[id] << ")"; } void SpirvStream::outputMask(OperandClass operandClass, unsigned mask) { if (mask == 0) out << "None"; else { for (int m = 0; m < OperandClassParams[operandClass].ceiling; ++m) { if (mask & (1 << m)) out << OperandClassParams[operandClass].getName(m) << " "; } } } void SpirvStream::disassembleImmediates(int numOperands) { for (int i = 0; i < numOperands; ++i) { out << stream[word++]; if (i < numOperands - 1) out << " "; } } void SpirvStream::disassembleIds(int numOperands) { for (int i = 0; i < numOperands; ++i) { outputId(stream[word++]); if (i < numOperands - 1) out << " "; } } // decode string from words at current position (non-consuming) std::pair SpirvStream::decodeString() { std::string res; int wordPos = word; char c; bool done = false; do { unsigned int content = stream[wordPos]; for (int charCount = 0; charCount < 4; ++charCount) { c = content & 0xff; content >>= 8; if (c == '\0') { done = true; break; } res += c; } ++wordPos; } while(! done); return std::make_pair(wordPos - word, res); } // return the number of operands consumed by the string int SpirvStream::disassembleString() { out << " \""; std::pair decoderes = decodeString(); out << decoderes.second; out << "\""; word += decoderes.first; return decoderes.first; } static uint32_t popcount(uint32_t mask) { uint32_t count = 0; while (mask) { if (mask & 1) { count++; } mask >>= 1; } return count; } void SpirvStream::disassembleInstruction(Id resultId, Id /*typeId*/, Op opCode, int numOperands) { // Process the opcode out << (OpcodeString((int)opCode) + 2); // leave out the "Op" if (opCode == Op::OpLoopMerge || opCode == Op::OpSelectionMerge) nextNestedControl = stream[word]; else if (opCode == Op::OpBranchConditional || opCode == Op::OpSwitch) { if (nextNestedControl) { nestedControl.push(nextNestedControl); nextNestedControl = 0; } } else if (opCode == Op::OpExtInstImport) { idDescriptor[resultId] = decodeString().second; } else { if (resultId != 0 && idDescriptor[resultId].size() == 0) { switch (opCode) { case Op::OpTypeInt: switch (stream[word]) { case 8: idDescriptor[resultId] = "int8_t"; break; case 16: idDescriptor[resultId] = "int16_t"; break; default: assert(0); [[fallthrough]]; case 32: idDescriptor[resultId] = "int"; break; case 64: idDescriptor[resultId] = "int64_t"; break; } break; case Op::OpTypeFloat: switch (stream[word]) { case 8: case 16: if (numOperands > 1) { switch (stream[word+1]) { default: assert(0); [[fallthrough]]; case (int)spv::FPEncoding::BFloat16KHR: idDescriptor[resultId] = "bfloat16_t"; break; case (int)spv::FPEncoding::Float8E4M3EXT: idDescriptor[resultId] = "floate4m3_t"; break; case (int)spv::FPEncoding::Float8E5M2EXT: idDescriptor[resultId] = "floate5m2_t"; break; } } else { idDescriptor[resultId] = "float16_t"; } break; default: assert(0); [[fallthrough]]; case 32: idDescriptor[resultId] = "float"; break; case 64: idDescriptor[resultId] = "float64_t"; break; } break; case Op::OpTypeBool: idDescriptor[resultId] = "bool"; break; case Op::OpTypeStruct: idDescriptor[resultId] = "struct"; break; case Op::OpTypePointer: idDescriptor[resultId] = "ptr"; break; case Op::OpTypeVector: if (idDescriptor[stream[word]].size() > 0) { if (idDescriptor[stream[word]].substr(0,2) == "bf") { idDescriptor[resultId].append(idDescriptor[stream[word]].begin(), idDescriptor[stream[word]].begin() + 2); } else { idDescriptor[resultId].append(idDescriptor[stream[word]].begin(), idDescriptor[stream[word]].begin() + 1); } if (strstr(idDescriptor[stream[word]].c_str(), "8")) { idDescriptor[resultId].append("8"); } if (strstr(idDescriptor[stream[word]].c_str(), "16")) { idDescriptor[resultId].append("16"); } if (strstr(idDescriptor[stream[word]].c_str(), "64")) { idDescriptor[resultId].append("64"); } } idDescriptor[resultId].append("vec"); switch (stream[word + 1]) { case 2: idDescriptor[resultId].append("2"); break; case 3: idDescriptor[resultId].append("3"); break; case 4: idDescriptor[resultId].append("4"); break; case 8: idDescriptor[resultId].append("8"); break; case 16: idDescriptor[resultId].append("16"); break; case 32: idDescriptor[resultId].append("32"); break; default: break; } break; default: break; } } } // Process the operands. Note, a new context-dependent set could be // swapped in mid-traversal. // Handle images specially, so can put out helpful strings. if (opCode == Op::OpTypeImage) { out << " "; disassembleIds(1); out << " " << DimensionString((int)(Dim)stream[word++]); out << (stream[word++] != 0 ? " depth" : ""); out << (stream[word++] != 0 ? " array" : ""); out << (stream[word++] != 0 ? " multi-sampled" : ""); switch (stream[word++]) { case 0: out << " runtime"; break; case 1: out << " sampled"; break; case 2: out << " nonsampled"; break; } out << " format:" << ImageFormatString((int)(ImageFormat)stream[word++]); if (numOperands == 8) { out << " " << AccessQualifierString(stream[word++]); } return; } // Handle all the parameterized operands for (int op = 0; op < InstructionDesc[enumCast(opCode)].operands.getNum() && numOperands > 0; ++op) { out << " "; OperandClass operandClass = InstructionDesc[enumCast(opCode)].operands.getClass(op); switch (operandClass) { case OperandId: case OperandScope: case OperandMemorySemantics: disassembleIds(1); --numOperands; // Get names for printing "(XXX)" for readability, *after* this id if (opCode == Op::OpName) idDescriptor[stream[word - 1]] = decodeString().second; break; case OperandVariableIds: disassembleIds(numOperands); return; case OperandImageOperands: outputMask(OperandImageOperands, stream[word++]); --numOperands; disassembleIds(numOperands); return; case OperandOptionalLiteral: case OperandVariableLiterals: if ((opCode == Op::OpDecorate && stream[word - 1] == Decoration::BuiltIn) || (opCode == Op::OpMemberDecorate && stream[word - 1] == Decoration::BuiltIn)) { out << BuiltInString(stream[word++]); --numOperands; ++op; } disassembleImmediates(numOperands); return; case OperandVariableIdLiteral: while (numOperands > 0) { out << std::endl; outputResultId(0); outputTypeId(0); outputIndent(); out << " Type "; disassembleIds(1); out << ", member "; disassembleImmediates(1); numOperands -= 2; } return; case OperandVariableLiteralId: while (numOperands > 0) { out << std::endl; outputResultId(0); outputTypeId(0); outputIndent(); out << " case "; disassembleImmediates(1); out << ": "; disassembleIds(1); numOperands -= 2; } return; case OperandLiteralNumber: disassembleImmediates(1); --numOperands; if (opCode == Op::OpExtInst) { ExtInstSet extInstSet = GLSL450Inst; const char* name = idDescriptor[stream[word - 2]].c_str(); if (strcmp("OpenCL.std", name) == 0) { extInstSet = OpenCLExtInst; } else if (strcmp("OpenCL.DebugInfo.100", name) == 0) { extInstSet = OpenCLExtInst; } else if (strcmp("NonSemantic.DebugPrintf", name) == 0) { extInstSet = NonSemanticDebugPrintfExtInst; } else if (strcmp("NonSemantic.DebugBreak", name) == 0) { extInstSet = NonSemanticDebugBreakExtInst; } else if (strcmp("NonSemantic.Shader.DebugInfo.100", name) == 0) { extInstSet = NonSemanticShaderDebugInfo100; } else if (strcmp(spv::E_SPV_AMD_shader_ballot, name) == 0 || strcmp(spv::E_SPV_AMD_shader_trinary_minmax, name) == 0 || strcmp(spv::E_SPV_AMD_shader_explicit_vertex_parameter, name) == 0 || strcmp(spv::E_SPV_AMD_gcn_shader, name) == 0) { extInstSet = GLSLextAMDInst; } else if (strcmp(spv::E_SPV_NV_sample_mask_override_coverage, name) == 0 || strcmp(spv::E_SPV_NV_geometry_shader_passthrough, name) == 0 || strcmp(spv::E_SPV_NV_viewport_array2, name) == 0 || strcmp(spv::E_SPV_NVX_multiview_per_view_attributes, name) == 0 || strcmp(spv::E_SPV_NV_fragment_shader_barycentric, name) == 0 || strcmp(spv::E_SPV_NV_mesh_shader, name) == 0) { extInstSet = GLSLextNVInst; } unsigned entrypoint = stream[word - 1]; if (extInstSet == GLSL450Inst) { if (entrypoint < GLSLstd450Count) { out << "(" << GlslStd450DebugNames[entrypoint] << ")"; } } else if (extInstSet == GLSLextAMDInst) { out << "(" << GLSLextAMDGetDebugNames(name, entrypoint) << ")"; } else if (extInstSet == GLSLextNVInst) { out << "(" << GLSLextNVGetDebugNames(name, entrypoint) << ")"; } else if (extInstSet == NonSemanticDebugPrintfExtInst) { out << "(DebugPrintf)"; } else if (extInstSet == NonSemanticDebugBreakExtInst) { out << "(DebugBreak)"; } else if (extInstSet == NonSemanticShaderDebugInfo100) { out << "(" << NonSemanticShaderDebugInfo100GetDebugNames(entrypoint) << ")"; } } break; case OperandOptionalLiteralString: case OperandLiteralString: numOperands -= disassembleString(); break; case OperandVariableLiteralStrings: while (numOperands > 0) numOperands -= disassembleString(); return; case OperandMemoryAccess: { outputMask(OperandMemoryAccess, stream[word++]); --numOperands; // Put a space after "None" if there are any remaining operands if (numOperands && stream[word-1] == 0) { out << " "; } uint32_t mask = stream[word-1]; // Aligned is the only memory access operand that uses an immediate // value, and it is also the first operand that uses a value at all. if (mask & (uint32_t)MemoryAccessMask::Aligned) { disassembleImmediates(1); numOperands--; if (numOperands) out << " "; } uint32_t bitCount = popcount(mask & (uint32_t)(MemoryAccessMask::MakePointerAvailable | MemoryAccessMask::MakePointerVisible)); disassembleIds(bitCount); numOperands -= bitCount; } break; case OperandTensorAddressingOperands: { outputMask(OperandTensorAddressingOperands, stream[word++]); --numOperands; // Put a space after "None" if there are any remaining operands if (numOperands && stream[word-1] == 0) { out << " "; } uint32_t bitCount = popcount(stream[word-1]); disassembleIds(bitCount); numOperands -= bitCount; } break; default: assert(operandClass >= OperandSource && operandClass < OperandOpcode); if (OperandClassParams[operandClass].bitmask) outputMask(operandClass, stream[word++]); else out << OperandClassParams[operandClass].getName(stream[word++]); --numOperands; break; } } return; } static void GLSLstd450GetDebugNames(const char** names) { for (int i = 0; i < GLSLstd450Count; ++i) names[i] = "Unknown"; names[GLSLstd450Round] = "Round"; names[GLSLstd450RoundEven] = "RoundEven"; names[GLSLstd450Trunc] = "Trunc"; names[GLSLstd450FAbs] = "FAbs"; names[GLSLstd450SAbs] = "SAbs"; names[GLSLstd450FSign] = "FSign"; names[GLSLstd450SSign] = "SSign"; names[GLSLstd450Floor] = "Floor"; names[GLSLstd450Ceil] = "Ceil"; names[GLSLstd450Fract] = "Fract"; names[GLSLstd450Radians] = "Radians"; names[GLSLstd450Degrees] = "Degrees"; names[GLSLstd450Sin] = "Sin"; names[GLSLstd450Cos] = "Cos"; names[GLSLstd450Tan] = "Tan"; names[GLSLstd450Asin] = "Asin"; names[GLSLstd450Acos] = "Acos"; names[GLSLstd450Atan] = "Atan"; names[GLSLstd450Sinh] = "Sinh"; names[GLSLstd450Cosh] = "Cosh"; names[GLSLstd450Tanh] = "Tanh"; names[GLSLstd450Asinh] = "Asinh"; names[GLSLstd450Acosh] = "Acosh"; names[GLSLstd450Atanh] = "Atanh"; names[GLSLstd450Atan2] = "Atan2"; names[GLSLstd450Pow] = "Pow"; names[GLSLstd450Exp] = "Exp"; names[GLSLstd450Log] = "Log"; names[GLSLstd450Exp2] = "Exp2"; names[GLSLstd450Log2] = "Log2"; names[GLSLstd450Sqrt] = "Sqrt"; names[GLSLstd450InverseSqrt] = "InverseSqrt"; names[GLSLstd450Determinant] = "Determinant"; names[GLSLstd450MatrixInverse] = "MatrixInverse"; names[GLSLstd450Modf] = "Modf"; names[GLSLstd450ModfStruct] = "ModfStruct"; names[GLSLstd450FMin] = "FMin"; names[GLSLstd450SMin] = "SMin"; names[GLSLstd450UMin] = "UMin"; names[GLSLstd450FMax] = "FMax"; names[GLSLstd450SMax] = "SMax"; names[GLSLstd450UMax] = "UMax"; names[GLSLstd450FClamp] = "FClamp"; names[GLSLstd450SClamp] = "SClamp"; names[GLSLstd450UClamp] = "UClamp"; names[GLSLstd450FMix] = "FMix"; names[GLSLstd450Step] = "Step"; names[GLSLstd450SmoothStep] = "SmoothStep"; names[GLSLstd450Fma] = "Fma"; names[GLSLstd450Frexp] = "Frexp"; names[GLSLstd450FrexpStruct] = "FrexpStruct"; names[GLSLstd450Ldexp] = "Ldexp"; names[GLSLstd450PackSnorm4x8] = "PackSnorm4x8"; names[GLSLstd450PackUnorm4x8] = "PackUnorm4x8"; names[GLSLstd450PackSnorm2x16] = "PackSnorm2x16"; names[GLSLstd450PackUnorm2x16] = "PackUnorm2x16"; names[GLSLstd450PackHalf2x16] = "PackHalf2x16"; names[GLSLstd450PackDouble2x32] = "PackDouble2x32"; names[GLSLstd450UnpackSnorm2x16] = "UnpackSnorm2x16"; names[GLSLstd450UnpackUnorm2x16] = "UnpackUnorm2x16"; names[GLSLstd450UnpackHalf2x16] = "UnpackHalf2x16"; names[GLSLstd450UnpackSnorm4x8] = "UnpackSnorm4x8"; names[GLSLstd450UnpackUnorm4x8] = "UnpackUnorm4x8"; names[GLSLstd450UnpackDouble2x32] = "UnpackDouble2x32"; names[GLSLstd450Length] = "Length"; names[GLSLstd450Distance] = "Distance"; names[GLSLstd450Cross] = "Cross"; names[GLSLstd450Normalize] = "Normalize"; names[GLSLstd450FaceForward] = "FaceForward"; names[GLSLstd450Reflect] = "Reflect"; names[GLSLstd450Refract] = "Refract"; names[GLSLstd450FindILsb] = "FindILsb"; names[GLSLstd450FindSMsb] = "FindSMsb"; names[GLSLstd450FindUMsb] = "FindUMsb"; names[GLSLstd450InterpolateAtCentroid] = "InterpolateAtCentroid"; names[GLSLstd450InterpolateAtSample] = "InterpolateAtSample"; names[GLSLstd450InterpolateAtOffset] = "InterpolateAtOffset"; names[GLSLstd450NMin] = "NMin"; names[GLSLstd450NMax] = "NMax"; names[GLSLstd450NClamp] = "NClamp"; } static const char* GLSLextAMDGetDebugNames(const char* name, unsigned entrypoint) { if (strcmp(name, spv::E_SPV_AMD_shader_ballot) == 0) { switch (entrypoint) { case SwizzleInvocationsAMD: return "SwizzleInvocationsAMD"; case SwizzleInvocationsMaskedAMD: return "SwizzleInvocationsMaskedAMD"; case WriteInvocationAMD: return "WriteInvocationAMD"; case MbcntAMD: return "MbcntAMD"; default: return "Bad"; } } else if (strcmp(name, spv::E_SPV_AMD_shader_trinary_minmax) == 0) { switch (entrypoint) { case FMin3AMD: return "FMin3AMD"; case UMin3AMD: return "UMin3AMD"; case SMin3AMD: return "SMin3AMD"; case FMax3AMD: return "FMax3AMD"; case UMax3AMD: return "UMax3AMD"; case SMax3AMD: return "SMax3AMD"; case FMid3AMD: return "FMid3AMD"; case UMid3AMD: return "UMid3AMD"; case SMid3AMD: return "SMid3AMD"; default: return "Bad"; } } else if (strcmp(name, spv::E_SPV_AMD_shader_explicit_vertex_parameter) == 0) { switch (entrypoint) { case InterpolateAtVertexAMD: return "InterpolateAtVertexAMD"; default: return "Bad"; } } else if (strcmp(name, spv::E_SPV_AMD_gcn_shader) == 0) { switch (entrypoint) { case CubeFaceIndexAMD: return "CubeFaceIndexAMD"; case CubeFaceCoordAMD: return "CubeFaceCoordAMD"; case TimeAMD: return "TimeAMD"; default: break; } } return "Bad"; } static const char* GLSLextNVGetDebugNames(const char* name, unsigned entrypoint) { if (strcmp(name, spv::E_SPV_NV_sample_mask_override_coverage) == 0 || strcmp(name, spv::E_SPV_NV_geometry_shader_passthrough) == 0 || strcmp(name, spv::E_ARB_shader_viewport_layer_array) == 0 || strcmp(name, spv::E_SPV_NV_viewport_array2) == 0 || strcmp(name, spv::E_SPV_NVX_multiview_per_view_attributes) == 0 || strcmp(name, spv::E_SPV_NV_fragment_shader_barycentric) == 0 || strcmp(name, spv::E_SPV_NV_mesh_shader) == 0 || strcmp(name, spv::E_SPV_NV_shader_image_footprint) == 0) { switch (entrypoint) { // NV builtins case (unsigned)BuiltIn::ViewportMaskNV: return "ViewportMaskNV"; case (unsigned)BuiltIn::SecondaryPositionNV: return "SecondaryPositionNV"; case (unsigned)BuiltIn::SecondaryViewportMaskNV: return "SecondaryViewportMaskNV"; case (unsigned)BuiltIn::PositionPerViewNV: return "PositionPerViewNV"; case (unsigned)BuiltIn::ViewportMaskPerViewNV: return "ViewportMaskPerViewNV"; case (unsigned)BuiltIn::BaryCoordNV: return "BaryCoordNV"; case (unsigned)BuiltIn::BaryCoordNoPerspNV: return "BaryCoordNoPerspNV"; case (unsigned)BuiltIn::TaskCountNV: return "TaskCountNV"; case (unsigned)BuiltIn::PrimitiveCountNV: return "PrimitiveCountNV"; case (unsigned)BuiltIn::PrimitiveIndicesNV: return "PrimitiveIndicesNV"; case (unsigned)BuiltIn::ClipDistancePerViewNV: return "ClipDistancePerViewNV"; case (unsigned)BuiltIn::CullDistancePerViewNV: return "CullDistancePerViewNV"; case (unsigned)BuiltIn::LayerPerViewNV: return "LayerPerViewNV"; case (unsigned)BuiltIn::MeshViewCountNV: return "MeshViewCountNV"; case (unsigned)BuiltIn::MeshViewIndicesNV: return "MeshViewIndicesNV"; // NV Capabilities case (unsigned)Capability::GeometryShaderPassthroughNV: return "GeometryShaderPassthroughNV"; case (unsigned)Capability::ShaderViewportMaskNV: return "ShaderViewportMaskNV"; case (unsigned)Capability::ShaderStereoViewNV: return "ShaderStereoViewNV"; case (unsigned)Capability::PerViewAttributesNV: return "PerViewAttributesNV"; case (unsigned)Capability::FragmentBarycentricNV: return "FragmentBarycentricNV"; case (unsigned)Capability::MeshShadingNV: return "MeshShadingNV"; case (unsigned)Capability::ImageFootprintNV: return "ImageFootprintNV"; case (unsigned)Capability::SampleMaskOverrideCoverageNV:return "SampleMaskOverrideCoverageNV"; // NV Decorations case (unsigned)Decoration::OverrideCoverageNV: return "OverrideCoverageNV"; case (unsigned)Decoration::PassthroughNV: return "PassthroughNV"; case (unsigned)Decoration::ViewportRelativeNV: return "ViewportRelativeNV"; case (unsigned)Decoration::SecondaryViewportRelativeNV: return "SecondaryViewportRelativeNV"; case (unsigned)Decoration::PerVertexNV: return "PerVertexNV"; case (unsigned)Decoration::PerPrimitiveNV: return "PerPrimitiveNV"; case (unsigned)Decoration::PerViewNV: return "PerViewNV"; case (unsigned)Decoration::PerTaskNV: return "PerTaskNV"; default: return "Bad"; } } return "Bad"; } static const char* NonSemanticShaderDebugInfo100GetDebugNames(unsigned entrypoint) { switch (entrypoint) { case NonSemanticShaderDebugInfo100DebugInfoNone: return "DebugInfoNone"; case NonSemanticShaderDebugInfo100DebugCompilationUnit: return "DebugCompilationUnit"; case NonSemanticShaderDebugInfo100DebugTypeBasic: return "DebugTypeBasic"; case NonSemanticShaderDebugInfo100DebugTypePointer: return "DebugTypePointer"; case NonSemanticShaderDebugInfo100DebugTypeQualifier: return "DebugTypeQualifier"; case NonSemanticShaderDebugInfo100DebugTypeArray: return "DebugTypeArray"; case NonSemanticShaderDebugInfo100DebugTypeVector: return "DebugTypeVector"; case NonSemanticShaderDebugInfo100DebugTypedef: return "DebugTypedef"; case NonSemanticShaderDebugInfo100DebugTypeFunction: return "DebugTypeFunction"; case NonSemanticShaderDebugInfo100DebugTypeEnum: return "DebugTypeEnum"; case NonSemanticShaderDebugInfo100DebugTypeComposite: return "DebugTypeComposite"; case NonSemanticShaderDebugInfo100DebugTypeMember: return "DebugTypeMember"; case NonSemanticShaderDebugInfo100DebugTypeInheritance: return "DebugTypeInheritance"; case NonSemanticShaderDebugInfo100DebugTypePtrToMember: return "DebugTypePtrToMember"; case NonSemanticShaderDebugInfo100DebugTypeTemplate: return "DebugTypeTemplate"; case NonSemanticShaderDebugInfo100DebugTypeTemplateParameter: return "DebugTypeTemplateParameter"; case NonSemanticShaderDebugInfo100DebugTypeTemplateTemplateParameter: return "DebugTypeTemplateTemplateParameter"; case NonSemanticShaderDebugInfo100DebugTypeTemplateParameterPack: return "DebugTypeTemplateParameterPack"; case NonSemanticShaderDebugInfo100DebugGlobalVariable: return "DebugGlobalVariable"; case NonSemanticShaderDebugInfo100DebugFunctionDeclaration: return "DebugFunctionDeclaration"; case NonSemanticShaderDebugInfo100DebugFunction: return "DebugFunction"; case NonSemanticShaderDebugInfo100DebugLexicalBlock: return "DebugLexicalBlock"; case NonSemanticShaderDebugInfo100DebugLexicalBlockDiscriminator: return "DebugLexicalBlockDiscriminator"; case NonSemanticShaderDebugInfo100DebugScope: return "DebugScope"; case NonSemanticShaderDebugInfo100DebugNoScope: return "DebugNoScope"; case NonSemanticShaderDebugInfo100DebugInlinedAt: return "DebugInlinedAt"; case NonSemanticShaderDebugInfo100DebugLocalVariable: return "DebugLocalVariable"; case NonSemanticShaderDebugInfo100DebugInlinedVariable: return "DebugInlinedVariable"; case NonSemanticShaderDebugInfo100DebugDeclare: return "DebugDeclare"; case NonSemanticShaderDebugInfo100DebugValue: return "DebugValue"; case NonSemanticShaderDebugInfo100DebugOperation: return "DebugOperation"; case NonSemanticShaderDebugInfo100DebugExpression: return "DebugExpression"; case NonSemanticShaderDebugInfo100DebugMacroDef: return "DebugMacroDef"; case NonSemanticShaderDebugInfo100DebugMacroUndef: return "DebugMacroUndef"; case NonSemanticShaderDebugInfo100DebugImportedEntity: return "DebugImportedEntity"; case NonSemanticShaderDebugInfo100DebugSource: return "DebugSource"; case NonSemanticShaderDebugInfo100DebugFunctionDefinition: return "DebugFunctionDefinition"; case NonSemanticShaderDebugInfo100DebugSourceContinued: return "DebugSourceContinued"; case NonSemanticShaderDebugInfo100DebugLine: return "DebugLine"; case NonSemanticShaderDebugInfo100DebugNoLine: return "DebugNoLine"; case NonSemanticShaderDebugInfo100DebugBuildIdentifier: return "DebugBuildIdentifier"; case NonSemanticShaderDebugInfo100DebugStoragePath: return "DebugStoragePath"; case NonSemanticShaderDebugInfo100DebugEntryPoint: return "DebugEntryPoint"; case NonSemanticShaderDebugInfo100DebugTypeMatrix: return "DebugTypeMatrix"; default: return "Bad"; } return "Bad"; } void Disassemble(std::ostream& out, const std::vector& stream) { SpirvStream SpirvStream(out, stream); spv::Parameterize(); GLSLstd450GetDebugNames(GlslStd450DebugNames); SpirvStream.validate(); SpirvStream.processInstructions(); } } // end namespace spv ================================================ FILE: src/libraries/glslang/SPIRV/disassemble.h ================================================ // // Copyright (C) 2014-2015 LunarG, Inc. // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following // disclaimer in the documentation and/or other materials provided // with the distribution. // // Neither the name of 3Dlabs Inc. Ltd. nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // // Disassembler for SPIR-V. // #pragma once #ifndef disassembler_H #define disassembler_H #include #include #include "../glslang/Include/visibility.h" namespace spv { // disassemble with glslang custom disassembler GLSLANG_EXPORT void Disassemble(std::ostream& out, const std::vector&); } // end namespace spv #endif // disassembler_H ================================================ FILE: src/libraries/glslang/SPIRV/doc.cpp ================================================ // // Copyright (C) 2014-2015 LunarG, Inc. // Copyright (C) 2022-2025 Arm Limited. // Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights reserved. // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following // disclaimer in the documentation and/or other materials provided // with the distribution. // // Neither the name of 3Dlabs Inc. Ltd. nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // // 1) Programmatically fill in instruction/operand information. // This can be used for disassembly, printing documentation, etc. // // 2) Print documentation from this parameterization. // #include "doc.h" #include "spvUtil.h" #include #include #include #include namespace spv { extern "C" { // Include C-based headers that don't have a namespace #include "GLSL.ext.KHR.h" #include "GLSL.ext.EXT.h" #include "GLSL.ext.AMD.h" #include "GLSL.ext.NV.h" #include "GLSL.ext.ARM.h" #include "GLSL.ext.QCOM.h" } } namespace spv { // // Whole set of functions that translate enumerants to their text strings for // the specification (or their sanitized versions for auto-generating the // spirv headers. // // Also, for masks the ceilings are declared next to these, to help keep them in sync. // Ceilings should be // - one more than the maximum value an enumerant takes on, for non-mask enumerants // (for non-sparse enums, this is the number of enumerants) // - the number of bits consumed by the set of masks // (for non-sparse mask enums, this is the number of enumerants) // const char* SourceString(int source) { switch (source) { case 0: return "Unknown"; case 1: return "ESSL"; case 2: return "GLSL"; case 3: return "OpenCL_C"; case 4: return "OpenCL_CPP"; case 5: return "HLSL"; default: return "Bad"; } } const char* ExecutionModelString(int model) { switch (model) { case 0: return "Vertex"; case 1: return "TessellationControl"; case 2: return "TessellationEvaluation"; case 3: return "Geometry"; case 4: return "Fragment"; case 5: return "GLCompute"; case 6: return "Kernel"; case (int)ExecutionModel::TaskNV: return "TaskNV"; case (int)ExecutionModel::MeshNV: return "MeshNV"; case (int)ExecutionModel::TaskEXT: return "TaskEXT"; case (int)ExecutionModel::MeshEXT: return "MeshEXT"; default: return "Bad"; case (int)ExecutionModel::RayGenerationKHR: return "RayGenerationKHR"; case (int)ExecutionModel::IntersectionKHR: return "IntersectionKHR"; case (int)ExecutionModel::AnyHitKHR: return "AnyHitKHR"; case (int)ExecutionModel::ClosestHitKHR: return "ClosestHitKHR"; case (int)ExecutionModel::MissKHR: return "MissKHR"; case (int)ExecutionModel::CallableKHR: return "CallableKHR"; } } const char* AddressingString(int addr) { switch (addr) { case 0: return "Logical"; case 1: return "Physical32"; case 2: return "Physical64"; case (int)AddressingModel::PhysicalStorageBuffer64EXT: return "PhysicalStorageBuffer64EXT"; default: return "Bad"; } } const char* MemoryString(int mem) { switch (mem) { case (int)MemoryModel::Simple: return "Simple"; case (int)MemoryModel::GLSL450: return "GLSL450"; case (int)MemoryModel::OpenCL: return "OpenCL"; case (int)MemoryModel::VulkanKHR: return "VulkanKHR"; default: return "Bad"; } } const int ExecutionModeCeiling = 40; const char* ExecutionModeString(int mode) { switch (mode) { case 0: return "Invocations"; case 1: return "SpacingEqual"; case 2: return "SpacingFractionalEven"; case 3: return "SpacingFractionalOdd"; case 4: return "VertexOrderCw"; case 5: return "VertexOrderCcw"; case 6: return "PixelCenterInteger"; case 7: return "OriginUpperLeft"; case 8: return "OriginLowerLeft"; case 9: return "EarlyFragmentTests"; case 10: return "PointMode"; case 11: return "Xfb"; case 12: return "DepthReplacing"; case 13: return "Bad"; case 14: return "DepthGreater"; case 15: return "DepthLess"; case 16: return "DepthUnchanged"; case 17: return "LocalSize"; case 18: return "LocalSizeHint"; case 19: return "InputPoints"; case 20: return "InputLines"; case 21: return "InputLinesAdjacency"; case 22: return "Triangles"; case 23: return "InputTrianglesAdjacency"; case 24: return "Quads"; case 25: return "Isolines"; case 26: return "OutputVertices"; case 27: return "OutputPoints"; case 28: return "OutputLineStrip"; case 29: return "OutputTriangleStrip"; case 30: return "VecTypeHint"; case 31: return "ContractionOff"; case 32: return "Bad"; case (int)ExecutionMode::Initializer: return "Initializer"; case (int)ExecutionMode::Finalizer: return "Finalizer"; case (int)ExecutionMode::SubgroupSize: return "SubgroupSize"; case (int)ExecutionMode::SubgroupsPerWorkgroup: return "SubgroupsPerWorkgroup"; case (int)ExecutionMode::SubgroupsPerWorkgroupId: return "SubgroupsPerWorkgroupId"; case (int)ExecutionMode::LocalSizeId: return "LocalSizeId"; case (int)ExecutionMode::LocalSizeHintId: return "LocalSizeHintId"; case (int)ExecutionMode::PostDepthCoverage: return "PostDepthCoverage"; case (int)ExecutionMode::DenormPreserve: return "DenormPreserve"; case (int)ExecutionMode::DenormFlushToZero: return "DenormFlushToZero"; case (int)ExecutionMode::SignedZeroInfNanPreserve: return "SignedZeroInfNanPreserve"; case (int)ExecutionMode::RoundingModeRTE: return "RoundingModeRTE"; case (int)ExecutionMode::RoundingModeRTZ: return "RoundingModeRTZ"; case (int)ExecutionMode::NonCoherentTileAttachmentReadQCOM: return "NonCoherentTileAttachmentReadQCOM"; case (int)ExecutionMode::TileShadingRateQCOM: return "TileShadingRateQCOM"; case (int)ExecutionMode::EarlyAndLateFragmentTestsAMD: return "EarlyAndLateFragmentTestsAMD"; case (int)ExecutionMode::StencilRefUnchangedFrontAMD: return "StencilRefUnchangedFrontAMD"; case (int)ExecutionMode::StencilRefLessFrontAMD: return "StencilRefLessFrontAMD"; case (int)ExecutionMode::StencilRefGreaterBackAMD: return "StencilRefGreaterBackAMD"; case (int)ExecutionMode::StencilRefReplacingEXT: return "StencilRefReplacingEXT"; case (int)ExecutionMode::SubgroupUniformControlFlowKHR: return "SubgroupUniformControlFlow"; case (int)ExecutionMode::MaximallyReconvergesKHR: return "MaximallyReconverges"; case (int)ExecutionMode::OutputLinesNV: return "OutputLinesNV"; case (int)ExecutionMode::OutputPrimitivesNV: return "OutputPrimitivesNV"; case (int)ExecutionMode::OutputTrianglesNV: return "OutputTrianglesNV"; case (int)ExecutionMode::DerivativeGroupQuadsNV: return "DerivativeGroupQuadsNV"; case (int)ExecutionMode::DerivativeGroupLinearNV: return "DerivativeGroupLinearNV"; case (int)ExecutionMode::PixelInterlockOrderedEXT: return "PixelInterlockOrderedEXT"; case (int)ExecutionMode::PixelInterlockUnorderedEXT: return "PixelInterlockUnorderedEXT"; case (int)ExecutionMode::SampleInterlockOrderedEXT: return "SampleInterlockOrderedEXT"; case (int)ExecutionMode::SampleInterlockUnorderedEXT: return "SampleInterlockUnorderedEXT"; case (int)ExecutionMode::ShadingRateInterlockOrderedEXT: return "ShadingRateInterlockOrderedEXT"; case (int)ExecutionMode::ShadingRateInterlockUnorderedEXT: return "ShadingRateInterlockUnorderedEXT"; case (int)ExecutionMode::MaxWorkgroupSizeINTEL: return "MaxWorkgroupSizeINTEL"; case (int)ExecutionMode::MaxWorkDimINTEL: return "MaxWorkDimINTEL"; case (int)ExecutionMode::NoGlobalOffsetINTEL: return "NoGlobalOffsetINTEL"; case (int)ExecutionMode::NumSIMDWorkitemsINTEL: return "NumSIMDWorkitemsINTEL"; case (int)ExecutionMode::RequireFullQuadsKHR: return "RequireFullQuadsKHR"; case (int)ExecutionMode::QuadDerivativesKHR: return "QuadDerivativesKHR"; case (int)ExecutionMode::NonCoherentColorAttachmentReadEXT: return "NonCoherentColorAttachmentReadEXT"; case (int)ExecutionMode::NonCoherentDepthAttachmentReadEXT: return "NonCoherentDepthAttachmentReadEXT"; case (int)ExecutionMode::NonCoherentStencilAttachmentReadEXT: return "NonCoherentStencilAttachmentReadEXT"; case ExecutionModeCeiling: default: return "Bad"; } } const char* StorageClassString(int StorageClass) { switch (StorageClass) { case 0: return "UniformConstant"; case 1: return "Input"; case 2: return "Uniform"; case 3: return "Output"; case 4: return "Workgroup"; case 5: return "CrossWorkgroup"; case 6: return "Private"; case 7: return "Function"; case 8: return "Generic"; case 9: return "PushConstant"; case 10: return "AtomicCounter"; case 11: return "Image"; case 12: return "StorageBuffer"; case (int)StorageClass::TileAttachmentQCOM: return "TileAttachmentQCOM"; case (int)StorageClass::RayPayloadKHR: return "RayPayloadKHR"; case (int)StorageClass::HitAttributeKHR: return "HitAttributeKHR"; case (int)StorageClass::IncomingRayPayloadKHR: return "IncomingRayPayloadKHR"; case (int)StorageClass::ShaderRecordBufferKHR: return "ShaderRecordBufferKHR"; case (int)StorageClass::CallableDataKHR: return "CallableDataKHR"; case (int)StorageClass::IncomingCallableDataKHR: return "IncomingCallableDataKHR"; case (int)StorageClass::PhysicalStorageBufferEXT: return "PhysicalStorageBufferEXT"; case (int)StorageClass::TaskPayloadWorkgroupEXT: return "TaskPayloadWorkgroupEXT"; case (int)StorageClass::HitObjectAttributeNV: return "HitObjectAttributeNV"; case (int)StorageClass::TileImageEXT: return "TileImageEXT"; default: return "Bad"; } } const int DecorationCeiling = 45; const char* DecorationString(int decoration) { switch (decoration) { case 0: return "RelaxedPrecision"; case 1: return "SpecId"; case 2: return "Block"; case 3: return "BufferBlock"; case 4: return "RowMajor"; case 5: return "ColMajor"; case 6: return "ArrayStride"; case 7: return "MatrixStride"; case 8: return "GLSLShared"; case 9: return "GLSLPacked"; case 10: return "CPacked"; case 11: return "BuiltIn"; case 12: return "Bad"; case 13: return "NoPerspective"; case 14: return "Flat"; case 15: return "Patch"; case 16: return "Centroid"; case 17: return "Sample"; case 18: return "Invariant"; case 19: return "Restrict"; case 20: return "Aliased"; case 21: return "Volatile"; case 22: return "Constant"; case 23: return "Coherent"; case 24: return "NonWritable"; case 25: return "NonReadable"; case 26: return "Uniform"; case 27: return "Bad"; case 28: return "SaturatedConversion"; case 29: return "Stream"; case 30: return "Location"; case 31: return "Component"; case 32: return "Index"; case 33: return "Binding"; case 34: return "DescriptorSet"; case 35: return "Offset"; case 36: return "XfbBuffer"; case 37: return "XfbStride"; case 38: return "FuncParamAttr"; case 39: return "FP Rounding Mode"; case 40: return "FP Fast Math Mode"; case 41: return "Linkage Attributes"; case 42: return "NoContraction"; case 43: return "InputAttachmentIndex"; case 44: return "Alignment"; case DecorationCeiling: default: return "Bad"; case (int)Decoration::WeightTextureQCOM: return "DecorationWeightTextureQCOM"; case (int)Decoration::BlockMatchTextureQCOM: return "DecorationBlockMatchTextureQCOM"; case (int)Decoration::BlockMatchSamplerQCOM: return "DecorationBlockMatchSamplerQCOM"; case (int)Decoration::ExplicitInterpAMD: return "ExplicitInterpAMD"; case (int)Decoration::OverrideCoverageNV: return "OverrideCoverageNV"; case (int)Decoration::PassthroughNV: return "PassthroughNV"; case (int)Decoration::ViewportRelativeNV: return "ViewportRelativeNV"; case (int)Decoration::SecondaryViewportRelativeNV: return "SecondaryViewportRelativeNV"; case (int)Decoration::PerPrimitiveNV: return "PerPrimitiveNV"; case (int)Decoration::PerViewNV: return "PerViewNV"; case (int)Decoration::PerTaskNV: return "PerTaskNV"; case (int)Decoration::PerVertexKHR: return "PerVertexKHR"; case (int)Decoration::NonUniformEXT: return "DecorationNonUniformEXT"; case (int)Decoration::HlslCounterBufferGOOGLE: return "DecorationHlslCounterBufferGOOGLE"; case (int)Decoration::HlslSemanticGOOGLE: return "DecorationHlslSemanticGOOGLE"; case (int)Decoration::RestrictPointerEXT: return "DecorationRestrictPointerEXT"; case (int)Decoration::AliasedPointerEXT: return "DecorationAliasedPointerEXT"; case (int)Decoration::HitObjectShaderRecordBufferNV: return "DecorationHitObjectShaderRecordBufferNV"; case (int)Decoration::SaturatedToLargestFloat8NormalConversionEXT: return "DecorationSaturatedToLargestFloat8NormalConversionEXT"; } } const char* BuiltInString(int builtIn) { switch (builtIn) { case 0: return "Position"; case 1: return "PointSize"; case 2: return "Bad"; case 3: return "ClipDistance"; case 4: return "CullDistance"; case 5: return "VertexId"; case 6: return "InstanceId"; case 7: return "PrimitiveId"; case 8: return "InvocationId"; case 9: return "Layer"; case 10: return "ViewportIndex"; case 11: return "TessLevelOuter"; case 12: return "TessLevelInner"; case 13: return "TessCoord"; case 14: return "PatchVertices"; case 15: return "FragCoord"; case 16: return "PointCoord"; case 17: return "FrontFacing"; case 18: return "SampleId"; case 19: return "SamplePosition"; case 20: return "SampleMask"; case 21: return "Bad"; case 22: return "FragDepth"; case 23: return "HelperInvocation"; case 24: return "NumWorkgroups"; case 25: return "WorkgroupSize"; case 26: return "WorkgroupId"; case 27: return "LocalInvocationId"; case 28: return "GlobalInvocationId"; case 29: return "LocalInvocationIndex"; case 30: return "WorkDim"; case 31: return "GlobalSize"; case 32: return "EnqueuedWorkgroupSize"; case 33: return "GlobalOffset"; case 34: return "GlobalLinearId"; case 35: return "Bad"; case 36: return "SubgroupSize"; case 37: return "SubgroupMaxSize"; case 38: return "NumSubgroups"; case 39: return "NumEnqueuedSubgroups"; case 40: return "SubgroupId"; case 41: return "SubgroupLocalInvocationId"; case 42: return "VertexIndex"; // TBD: put next to VertexId? case 43: return "InstanceIndex"; // TBD: put next to InstanceId? case 4416: return "SubgroupEqMaskKHR"; case 4417: return "SubgroupGeMaskKHR"; case 4418: return "SubgroupGtMaskKHR"; case 4419: return "SubgroupLeMaskKHR"; case 4420: return "SubgroupLtMaskKHR"; case 4438: return "DeviceIndex"; case 4440: return "ViewIndex"; case 4424: return "BaseVertex"; case 4425: return "BaseInstance"; case 4426: return "DrawIndex"; case 4432: return "PrimitiveShadingRateKHR"; case 4444: return "ShadingRateKHR"; case 5014: return "FragStencilRefEXT"; case (int)BuiltIn::TileOffsetQCOM: return "TileOffsetQCOM"; case (int)BuiltIn::TileDimensionQCOM: return "TileDimensionQCOM"; case (int)BuiltIn::TileApronSizeQCOM: return "TileApronSizeQCOM"; case 4992: return "BaryCoordNoPerspAMD"; case 4993: return "BaryCoordNoPerspCentroidAMD"; case 4994: return "BaryCoordNoPerspSampleAMD"; case 4995: return "BaryCoordSmoothAMD"; case 4996: return "BaryCoordSmoothCentroidAMD"; case 4997: return "BaryCoordSmoothSampleAMD"; case 4998: return "BaryCoordPullModelAMD"; case (int)BuiltIn::LaunchIdKHR: return "LaunchIdKHR"; case (int)BuiltIn::LaunchSizeKHR: return "LaunchSizeKHR"; case (int)BuiltIn::WorldRayOriginKHR: return "WorldRayOriginKHR"; case (int)BuiltIn::WorldRayDirectionKHR: return "WorldRayDirectionKHR"; case (int)BuiltIn::ObjectRayOriginKHR: return "ObjectRayOriginKHR"; case (int)BuiltIn::ObjectRayDirectionKHR: return "ObjectRayDirectionKHR"; case (int)BuiltIn::RayTminKHR: return "RayTminKHR"; case (int)BuiltIn::RayTmaxKHR: return "RayTmaxKHR"; case (int)BuiltIn::CullMaskKHR: return "CullMaskKHR"; case (int)BuiltIn::HitTriangleVertexPositionsKHR: return "HitTriangleVertexPositionsKHR"; case (int)BuiltIn::HitMicroTriangleVertexPositionsNV: return "HitMicroTriangleVertexPositionsNV"; case (int)BuiltIn::HitMicroTriangleVertexBarycentricsNV: return "HitMicroTriangleVertexBarycentricsNV"; case (int)BuiltIn::HitKindFrontFacingMicroTriangleNV: return "HitKindFrontFacingMicroTriangleNV"; case (int)BuiltIn::HitKindBackFacingMicroTriangleNV: return "HitKindBackFacingMicroTriangleNV"; case (int)BuiltIn::HitIsSphereNV: return "HitIsSphereNV"; case (int)BuiltIn::HitIsLSSNV: return "HitIsLSSNV"; case (int)BuiltIn::HitSpherePositionNV: return "HitSpherePositionNV"; case (int)BuiltIn::HitSphereRadiusNV: return "HitSphereRadiusNV"; case (int)BuiltIn::HitLSSPositionsNV: return "HitLSSPositionsNV"; case (int)BuiltIn::HitLSSRadiiNV: return "HitLLSSRadiiNV"; case (int)BuiltIn::InstanceCustomIndexKHR: return "InstanceCustomIndexKHR"; case (int)BuiltIn::RayGeometryIndexKHR: return "RayGeometryIndexKHR"; case (int)BuiltIn::ObjectToWorldKHR: return "ObjectToWorldKHR"; case (int)BuiltIn::WorldToObjectKHR: return "WorldToObjectKHR"; case (int)BuiltIn::HitTNV: return "HitTNV"; case (int)BuiltIn::HitKindKHR: return "HitKindKHR"; case (int)BuiltIn::IncomingRayFlagsKHR: return "IncomingRayFlagsKHR"; case (int)BuiltIn::ViewportMaskNV: return "ViewportMaskNV"; case (int)BuiltIn::SecondaryPositionNV: return "SecondaryPositionNV"; case (int)BuiltIn::SecondaryViewportMaskNV: return "SecondaryViewportMaskNV"; case (int)BuiltIn::PositionPerViewNV: return "PositionPerViewNV"; case (int)BuiltIn::ViewportMaskPerViewNV: return "ViewportMaskPerViewNV"; // case (int)BuiltIn::FragmentSizeNV: return "FragmentSizeNV"; // superseded by BuiltInFragSizeEXT // case (int)BuiltIn::InvocationsPerPixelNV: return "InvocationsPerPixelNV"; // superseded by BuiltInFragInvocationCountEXT case (int)BuiltIn::BaryCoordKHR: return "BaryCoordKHR"; case (int)BuiltIn::BaryCoordNoPerspKHR: return "BaryCoordNoPerspKHR"; case (int)BuiltIn::ClusterIDNV: return "ClusterIDNV"; case (int)BuiltIn::FragSizeEXT: return "FragSizeEXT"; case (int)BuiltIn::FragInvocationCountEXT: return "FragInvocationCountEXT"; case 5264: return "FullyCoveredEXT"; case (int)BuiltIn::TaskCountNV: return "TaskCountNV"; case (int)BuiltIn::PrimitiveCountNV: return "PrimitiveCountNV"; case (int)BuiltIn::PrimitiveIndicesNV: return "PrimitiveIndicesNV"; case (int)BuiltIn::ClipDistancePerViewNV: return "ClipDistancePerViewNV"; case (int)BuiltIn::CullDistancePerViewNV: return "CullDistancePerViewNV"; case (int)BuiltIn::LayerPerViewNV: return "LayerPerViewNV"; case (int)BuiltIn::MeshViewCountNV: return "MeshViewCountNV"; case (int)BuiltIn::MeshViewIndicesNV: return "MeshViewIndicesNV"; case (int)BuiltIn::WarpsPerSMNV: return "WarpsPerSMNV"; case (int)BuiltIn::SMCountNV: return "SMCountNV"; case (int)BuiltIn::WarpIDNV: return "WarpIDNV"; case (int)BuiltIn::SMIDNV: return "SMIDNV"; case (int)BuiltIn::CurrentRayTimeNV: return "CurrentRayTimeNV"; case (int)BuiltIn::PrimitivePointIndicesEXT: return "PrimitivePointIndicesEXT"; case (int)BuiltIn::PrimitiveLineIndicesEXT: return "PrimitiveLineIndicesEXT"; case (int)BuiltIn::PrimitiveTriangleIndicesEXT: return "PrimitiveTriangleIndicesEXT"; case (int)BuiltIn::CullPrimitiveEXT: return "CullPrimitiveEXT"; case (int)BuiltIn::CoreCountARM: return "CoreCountARM"; case (int)BuiltIn::CoreIDARM: return "CoreIDARM"; case (int)BuiltIn::CoreMaxIDARM: return "CoreMaxIDARM"; case (int)BuiltIn::WarpIDARM: return "WarpIDARM"; case (int)BuiltIn::WarpMaxIDARM: return "BuiltInWarpMaxIDARM"; default: return "Bad"; } } const char* DimensionString(int dim) { switch (dim) { case 0: return "1D"; case 1: return "2D"; case 2: return "3D"; case 3: return "Cube"; case 4: return "Rect"; case 5: return "Buffer"; case 6: return "SubpassData"; case (int)Dim::TileImageDataEXT: return "TileImageDataEXT"; default: return "Bad"; } } const char* SamplerAddressingModeString(int mode) { switch (mode) { case 0: return "None"; case 1: return "ClampToEdge"; case 2: return "Clamp"; case 3: return "Repeat"; case 4: return "RepeatMirrored"; default: return "Bad"; } } const char* SamplerFilterModeString(int mode) { switch (mode) { case 0: return "Nearest"; case 1: return "Linear"; default: return "Bad"; } } const char* ImageFormatString(int format) { switch (format) { case 0: return "Unknown"; // ES/Desktop float case 1: return "Rgba32f"; case 2: return "Rgba16f"; case 3: return "R32f"; case 4: return "Rgba8"; case 5: return "Rgba8Snorm"; // Desktop float case 6: return "Rg32f"; case 7: return "Rg16f"; case 8: return "R11fG11fB10f"; case 9: return "R16f"; case 10: return "Rgba16"; case 11: return "Rgb10A2"; case 12: return "Rg16"; case 13: return "Rg8"; case 14: return "R16"; case 15: return "R8"; case 16: return "Rgba16Snorm"; case 17: return "Rg16Snorm"; case 18: return "Rg8Snorm"; case 19: return "R16Snorm"; case 20: return "R8Snorm"; // ES/Desktop int case 21: return "Rgba32i"; case 22: return "Rgba16i"; case 23: return "Rgba8i"; case 24: return "R32i"; // Desktop int case 25: return "Rg32i"; case 26: return "Rg16i"; case 27: return "Rg8i"; case 28: return "R16i"; case 29: return "R8i"; // ES/Desktop uint case 30: return "Rgba32ui"; case 31: return "Rgba16ui"; case 32: return "Rgba8ui"; case 33: return "R32ui"; // Desktop uint case 34: return "Rgb10a2ui"; case 35: return "Rg32ui"; case 36: return "Rg16ui"; case 37: return "Rg8ui"; case 38: return "R16ui"; case 39: return "R8ui"; case 40: return "R64ui"; case 41: return "R64i"; default: return "Bad"; } } const char* ImageChannelOrderString(int format) { switch (format) { case 0: return "R"; case 1: return "A"; case 2: return "RG"; case 3: return "RA"; case 4: return "RGB"; case 5: return "RGBA"; case 6: return "BGRA"; case 7: return "ARGB"; case 8: return "Intensity"; case 9: return "Luminance"; case 10: return "Rx"; case 11: return "RGx"; case 12: return "RGBx"; case 13: return "Depth"; case 14: return "DepthStencil"; case 15: return "sRGB"; case 16: return "sRGBx"; case 17: return "sRGBA"; case 18: return "sBGRA"; default: return "Bad"; } } const char* ImageChannelDataTypeString(int type) { switch (type) { case 0: return "SnormInt8"; case 1: return "SnormInt16"; case 2: return "UnormInt8"; case 3: return "UnormInt16"; case 4: return "UnormShort565"; case 5: return "UnormShort555"; case 6: return "UnormInt101010"; case 7: return "SignedInt8"; case 8: return "SignedInt16"; case 9: return "SignedInt32"; case 10: return "UnsignedInt8"; case 11: return "UnsignedInt16"; case 12: return "UnsignedInt32"; case 13: return "HalfFloat"; case 14: return "Float"; case 15: return "UnormInt24"; case 16: return "UnormInt101010_2"; default: return "Bad"; } } const int ImageOperandsCeiling = 17; const char* ImageOperandsString(int format) { switch (format) { case (int)ImageOperandsShift::Bias: return "Bias"; case (int)ImageOperandsShift::Lod: return "Lod"; case (int)ImageOperandsShift::Grad: return "Grad"; case (int)ImageOperandsShift::ConstOffset: return "ConstOffset"; case (int)ImageOperandsShift::Offset: return "Offset"; case (int)ImageOperandsShift::ConstOffsets: return "ConstOffsets"; case (int)ImageOperandsShift::Sample: return "Sample"; case (int)ImageOperandsShift::MinLod: return "MinLod"; case (int)ImageOperandsShift::MakeTexelAvailableKHR: return "MakeTexelAvailableKHR"; case (int)ImageOperandsShift::MakeTexelVisibleKHR: return "MakeTexelVisibleKHR"; case (int)ImageOperandsShift::NonPrivateTexelKHR: return "NonPrivateTexelKHR"; case (int)ImageOperandsShift::VolatileTexelKHR: return "VolatileTexelKHR"; case (int)ImageOperandsShift::SignExtend: return "SignExtend"; case (int)ImageOperandsShift::ZeroExtend: return "ZeroExtend"; case (int)ImageOperandsShift::Nontemporal: return "Nontemporal"; case (int)ImageOperandsShift::Offsets: return "Offsets"; case ImageOperandsCeiling: default: return "Bad"; } } const char* FPFastMathString(int mode) { switch (mode) { case 0: return "NotNaN"; case 1: return "NotInf"; case 2: return "NSZ"; case 3: return "AllowRecip"; case 4: return "Fast"; default: return "Bad"; } } const char* FPRoundingModeString(int mode) { switch (mode) { case 0: return "RTE"; case 1: return "RTZ"; case 2: return "RTP"; case 3: return "RTN"; default: return "Bad"; } } const char* LinkageTypeString(int type) { switch (type) { case 0: return "Export"; case 1: return "Import"; default: return "Bad"; } } const char* FuncParamAttrString(int attr) { switch (attr) { case 0: return "Zext"; case 1: return "Sext"; case 2: return "ByVal"; case 3: return "Sret"; case 4: return "NoAlias"; case 5: return "NoCapture"; case 6: return "NoWrite"; case 7: return "NoReadWrite"; default: return "Bad"; } } const char* AccessQualifierString(int attr) { switch (attr) { case 0: return "ReadOnly"; case 1: return "WriteOnly"; case 2: return "ReadWrite"; default: return "Bad"; } } const int SelectControlCeiling = 2; const char* SelectControlString(int cont) { switch (cont) { case 0: return "Flatten"; case 1: return "DontFlatten"; case SelectControlCeiling: default: return "Bad"; } } const int LoopControlCeiling = (int)LoopControlShift::PartialCount + 1; const char* LoopControlString(int cont) { switch (cont) { case (int)LoopControlShift::Unroll: return "Unroll"; case (int)LoopControlShift::DontUnroll: return "DontUnroll"; case (int)LoopControlShift::DependencyInfinite: return "DependencyInfinite"; case (int)LoopControlShift::DependencyLength: return "DependencyLength"; case (int)LoopControlShift::MinIterations: return "MinIterations"; case (int)LoopControlShift::MaxIterations: return "MaxIterations"; case (int)LoopControlShift::IterationMultiple: return "IterationMultiple"; case (int)LoopControlShift::PeelCount: return "PeelCount"; case (int)LoopControlShift::PartialCount: return "PartialCount"; case LoopControlCeiling: default: return "Bad"; } } const int FunctionControlCeiling = 4; const char* FunctionControlString(int cont) { switch (cont) { case 0: return "Inline"; case 1: return "DontInline"; case 2: return "Pure"; case 3: return "Const"; case FunctionControlCeiling: default: return "Bad"; } } const char* MemorySemanticsString(int mem) { // Note: No bits set (None) means "Relaxed" switch (mem) { case 0: return "Bad"; // Note: this is a placeholder for 'Consume' case 1: return "Acquire"; case 2: return "Release"; case 3: return "AcquireRelease"; case 4: return "SequentiallyConsistent"; case 5: return "Bad"; // Note: reserved for future expansion case 6: return "UniformMemory"; case 7: return "SubgroupMemory"; case 8: return "WorkgroupMemory"; case 9: return "CrossWorkgroupMemory"; case 10: return "AtomicCounterMemory"; case 11: return "ImageMemory"; default: return "Bad"; } } const int MemoryAccessCeiling = 6; const char* MemoryAccessString(int mem) { switch (mem) { case (int)MemoryAccessShift::Volatile: return "Volatile"; case (int)MemoryAccessShift::Aligned: return "Aligned"; case (int)MemoryAccessShift::Nontemporal: return "Nontemporal"; case (int)MemoryAccessShift::MakePointerAvailableKHR: return "MakePointerAvailableKHR"; case (int)MemoryAccessShift::MakePointerVisibleKHR: return "MakePointerVisibleKHR"; case (int)MemoryAccessShift::NonPrivatePointerKHR: return "NonPrivatePointerKHR"; default: return "Bad"; } } const int CooperativeMatrixOperandsCeiling = 6; const char* CooperativeMatrixOperandsString(int op) { switch (op) { case (int)CooperativeMatrixOperandsShift::MatrixASignedComponentsKHR: return "ASignedComponentsKHR"; case (int)CooperativeMatrixOperandsShift::MatrixBSignedComponentsKHR: return "BSignedComponentsKHR"; case (int)CooperativeMatrixOperandsShift::MatrixCSignedComponentsKHR: return "CSignedComponentsKHR"; case (int)CooperativeMatrixOperandsShift::MatrixResultSignedComponentsKHR: return "ResultSignedComponentsKHR"; case (int)CooperativeMatrixOperandsShift::SaturatingAccumulationKHR: return "SaturatingAccumulationKHR"; default: return "Bad"; } } const int TensorAddressingOperandsCeiling = 3; const char* TensorAddressingOperandsString(int op) { switch (op) { case (int)TensorAddressingOperandsShift::TensorView: return "TensorView"; case (int)TensorAddressingOperandsShift::DecodeFunc: return "DecodeFunc"; default: return "Bad"; } } const char* ScopeString(int mem) { switch (mem) { case 0: return "CrossDevice"; case 1: return "Device"; case 2: return "Workgroup"; case 3: return "Subgroup"; case 4: return "Invocation"; default: return "Bad"; } } const char* GroupOperationString(int gop) { switch (gop) { case (int)GroupOperation::Reduce: return "Reduce"; case (int)GroupOperation::InclusiveScan: return "InclusiveScan"; case (int)GroupOperation::ExclusiveScan: return "ExclusiveScan"; case (int)GroupOperation::ClusteredReduce: return "ClusteredReduce"; case (int)GroupOperation::PartitionedReduceNV: return "PartitionedReduceNV"; case (int)GroupOperation::PartitionedInclusiveScanNV: return "PartitionedInclusiveScanNV"; case (int)GroupOperation::PartitionedExclusiveScanNV: return "PartitionedExclusiveScanNV"; default: return "Bad"; } } const char* KernelEnqueueFlagsString(int flag) { switch (flag) { case 0: return "NoWait"; case 1: return "WaitKernel"; case 2: return "WaitWorkGroup"; default: return "Bad"; } } const char* KernelProfilingInfoString(int info) { switch (info) { case 0: return "CmdExecTime"; default: return "Bad"; } } const char* CapabilityString(int info) { switch (info) { case 0: return "Matrix"; case 1: return "Shader"; case 2: return "Geometry"; case 3: return "Tessellation"; case 4: return "Addresses"; case 5: return "Linkage"; case 6: return "Kernel"; case 7: return "Vector16"; case 8: return "Float16Buffer"; case 9: return "Float16"; case 10: return "Float64"; case 11: return "Int64"; case 12: return "Int64Atomics"; case 13: return "ImageBasic"; case 14: return "ImageReadWrite"; case 15: return "ImageMipmap"; case 16: return "Bad"; case 17: return "Pipes"; case 18: return "Groups"; case 19: return "DeviceEnqueue"; case 20: return "LiteralSampler"; case 21: return "AtomicStorage"; case 22: return "Int16"; case 23: return "TessellationPointSize"; case 24: return "GeometryPointSize"; case 25: return "ImageGatherExtended"; case 26: return "Bad"; case 27: return "StorageImageMultisample"; case 28: return "UniformBufferArrayDynamicIndexing"; case 29: return "SampledImageArrayDynamicIndexing"; case 30: return "StorageBufferArrayDynamicIndexing"; case 31: return "StorageImageArrayDynamicIndexing"; case 32: return "ClipDistance"; case 33: return "CullDistance"; case 34: return "ImageCubeArray"; case 35: return "SampleRateShading"; case 36: return "ImageRect"; case 37: return "SampledRect"; case 38: return "GenericPointer"; case 39: return "Int8"; case 40: return "InputAttachment"; case 41: return "SparseResidency"; case 42: return "MinLod"; case 43: return "Sampled1D"; case 44: return "Image1D"; case 45: return "SampledCubeArray"; case 46: return "SampledBuffer"; case 47: return "ImageBuffer"; case 48: return "ImageMSArray"; case 49: return "StorageImageExtendedFormats"; case 50: return "ImageQuery"; case 51: return "DerivativeControl"; case 52: return "InterpolationFunction"; case 53: return "TransformFeedback"; case 54: return "GeometryStreams"; case 55: return "StorageImageReadWithoutFormat"; case 56: return "StorageImageWriteWithoutFormat"; case 57: return "MultiViewport"; case 61: return "GroupNonUniform"; case 62: return "GroupNonUniformVote"; case 63: return "GroupNonUniformArithmetic"; case 64: return "GroupNonUniformBallot"; case 65: return "GroupNonUniformShuffle"; case 66: return "GroupNonUniformShuffleRelative"; case 67: return "GroupNonUniformClustered"; case 68: return "GroupNonUniformQuad"; case (int)Capability::SubgroupBallotKHR: return "SubgroupBallotKHR"; case (int)Capability::DrawParameters: return "DrawParameters"; case (int)Capability::SubgroupVoteKHR: return "SubgroupVoteKHR"; case (int)Capability::GroupNonUniformRotateKHR: return "CapabilityGroupNonUniformRotateKHR"; case (int)Capability::StorageUniformBufferBlock16: return "StorageUniformBufferBlock16"; case (int)Capability::StorageUniform16: return "StorageUniform16"; case (int)Capability::StoragePushConstant16: return "StoragePushConstant16"; case (int)Capability::StorageInputOutput16: return "StorageInputOutput16"; case (int)Capability::StorageBuffer8BitAccess: return "StorageBuffer8BitAccess"; case (int)Capability::UniformAndStorageBuffer8BitAccess: return "UniformAndStorageBuffer8BitAccess"; case (int)Capability::StoragePushConstant8: return "StoragePushConstant8"; case (int)Capability::DeviceGroup: return "DeviceGroup"; case (int)Capability::MultiView: return "MultiView"; case (int)Capability::DenormPreserve: return "DenormPreserve"; case (int)Capability::DenormFlushToZero: return "DenormFlushToZero"; case (int)Capability::SignedZeroInfNanPreserve: return "SignedZeroInfNanPreserve"; case (int)Capability::RoundingModeRTE: return "RoundingModeRTE"; case (int)Capability::RoundingModeRTZ: return "RoundingModeRTZ"; case (int)Capability::StencilExportEXT: return "StencilExportEXT"; case (int)Capability::Float16ImageAMD: return "Float16ImageAMD"; case (int)Capability::ImageGatherBiasLodAMD: return "ImageGatherBiasLodAMD"; case (int)Capability::FragmentMaskAMD: return "FragmentMaskAMD"; case (int)Capability::ImageReadWriteLodAMD: return "ImageReadWriteLodAMD"; case (int)Capability::AtomicStorageOps: return "AtomicStorageOps"; case (int)Capability::SampleMaskPostDepthCoverage: return "SampleMaskPostDepthCoverage"; case (int)Capability::GeometryShaderPassthroughNV: return "GeometryShaderPassthroughNV"; case (int)Capability::ShaderViewportIndexLayerNV: return "ShaderViewportIndexLayerNV"; case (int)Capability::ShaderViewportMaskNV: return "ShaderViewportMaskNV"; case (int)Capability::ShaderStereoViewNV: return "ShaderStereoViewNV"; case (int)Capability::PerViewAttributesNV: return "PerViewAttributesNV"; case (int)Capability::GroupNonUniformPartitionedNV: return "GroupNonUniformPartitionedNV"; case (int)Capability::RayTracingNV: return "RayTracingNV"; case (int)Capability::RayTracingMotionBlurNV: return "RayTracingMotionBlurNV"; case (int)Capability::RayTracingKHR: return "RayTracingKHR"; case (int)Capability::RayCullMaskKHR: return "RayCullMaskKHR"; case (int)Capability::RayQueryKHR: return "RayQueryKHR"; case (int)Capability::RayTracingProvisionalKHR: return "RayTracingProvisionalKHR"; case (int)Capability::RayTraversalPrimitiveCullingKHR: return "RayTraversalPrimitiveCullingKHR"; case (int)Capability::RayTracingPositionFetchKHR: return "RayTracingPositionFetchKHR"; case (int)Capability::DisplacementMicromapNV: return "DisplacementMicromapNV"; case (int)Capability::RayTracingOpacityMicromapEXT: return "RayTracingOpacityMicromapEXT"; case (int)Capability::RayTracingDisplacementMicromapNV: return "CapabilityRayTracingDisplacementMicromapNV"; case (int)Capability::RayQueryPositionFetchKHR: return "RayQueryPositionFetchKHR"; case (int)Capability::ComputeDerivativeGroupQuadsNV: return "ComputeDerivativeGroupQuadsNV"; case (int)Capability::ComputeDerivativeGroupLinearNV: return "ComputeDerivativeGroupLinearNV"; case (int)Capability::FragmentBarycentricKHR: return "FragmentBarycentricKHR"; case (int)Capability::MeshShadingNV: return "MeshShadingNV"; case (int)Capability::ImageFootprintNV: return "ImageFootprintNV"; case (int)Capability::MeshShadingEXT: return "MeshShadingEXT"; // case (int)Capability::ShadingRateNV: return "ShadingRateNV"; // superseded by FragmentDensityEXT case (int)Capability::SampleMaskOverrideCoverageNV: return "SampleMaskOverrideCoverageNV"; case (int)Capability::FragmentDensityEXT: return "FragmentDensityEXT"; case (int)Capability::FragmentFullyCoveredEXT: return "FragmentFullyCoveredEXT"; case (int)Capability::ShaderNonUniformEXT: return "ShaderNonUniformEXT"; case (int)Capability::RuntimeDescriptorArrayEXT: return "RuntimeDescriptorArrayEXT"; case (int)Capability::InputAttachmentArrayDynamicIndexingEXT: return "InputAttachmentArrayDynamicIndexingEXT"; case (int)Capability::UniformTexelBufferArrayDynamicIndexingEXT: return "UniformTexelBufferArrayDynamicIndexingEXT"; case (int)Capability::StorageTexelBufferArrayDynamicIndexingEXT: return "StorageTexelBufferArrayDynamicIndexingEXT"; case (int)Capability::UniformBufferArrayNonUniformIndexingEXT: return "UniformBufferArrayNonUniformIndexingEXT"; case (int)Capability::SampledImageArrayNonUniformIndexingEXT: return "SampledImageArrayNonUniformIndexingEXT"; case (int)Capability::StorageBufferArrayNonUniformIndexingEXT: return "StorageBufferArrayNonUniformIndexingEXT"; case (int)Capability::StorageImageArrayNonUniformIndexingEXT: return "StorageImageArrayNonUniformIndexingEXT"; case (int)Capability::InputAttachmentArrayNonUniformIndexingEXT: return "InputAttachmentArrayNonUniformIndexingEXT"; case (int)Capability::UniformTexelBufferArrayNonUniformIndexingEXT: return "UniformTexelBufferArrayNonUniformIndexingEXT"; case (int)Capability::StorageTexelBufferArrayNonUniformIndexingEXT: return "StorageTexelBufferArrayNonUniformIndexingEXT"; case (int)Capability::VulkanMemoryModelKHR: return "VulkanMemoryModelKHR"; case (int)Capability::VulkanMemoryModelDeviceScopeKHR: return "VulkanMemoryModelDeviceScopeKHR"; case (int)Capability::PhysicalStorageBufferAddressesEXT: return "PhysicalStorageBufferAddressesEXT"; case (int)Capability::VariablePointers: return "VariablePointers"; case (int)Capability::CooperativeMatrixNV: return "CooperativeMatrixNV"; case (int)Capability::CooperativeMatrixKHR: return "CooperativeMatrixKHR"; case (int)Capability::CooperativeMatrixReductionsNV: return "CooperativeMatrixReductionsNV"; case (int)Capability::CooperativeMatrixConversionsNV: return "CooperativeMatrixConversionsNV"; case (int)Capability::CooperativeMatrixPerElementOperationsNV: return "CooperativeMatrixPerElementOperationsNV"; case (int)Capability::CooperativeMatrixTensorAddressingNV: return "CooperativeMatrixTensorAddressingNV"; case (int)Capability::CooperativeMatrixBlockLoadsNV: return "CooperativeMatrixBlockLoadsNV"; case (int)Capability::TensorAddressingNV: return "TensorAddressingNV"; case (int)Capability::ShaderSMBuiltinsNV: return "ShaderSMBuiltinsNV"; case (int)Capability::CooperativeVectorNV: return "CooperativeVectorNV"; case (int)Capability::CooperativeVectorTrainingNV: return "CooperativeVectorTrainingNV"; case (int)Capability::FragmentShaderSampleInterlockEXT: return "CapabilityFragmentShaderSampleInterlockEXT"; case (int)Capability::FragmentShaderPixelInterlockEXT: return "CapabilityFragmentShaderPixelInterlockEXT"; case (int)Capability::FragmentShaderShadingRateInterlockEXT: return "CapabilityFragmentShaderShadingRateInterlockEXT"; case (int)Capability::TileImageColorReadAccessEXT: return "TileImageColorReadAccessEXT"; case (int)Capability::TileImageDepthReadAccessEXT: return "TileImageDepthReadAccessEXT"; case (int)Capability::TileImageStencilReadAccessEXT: return "TileImageStencilReadAccessEXT"; case (int)Capability::CooperativeMatrixLayoutsARM: return "CooperativeMatrixLayoutsARM"; case (int)Capability::FragmentShadingRateKHR: return "FragmentShadingRateKHR"; case (int)Capability::DemoteToHelperInvocationEXT: return "DemoteToHelperInvocationEXT"; case (int)Capability::AtomicFloat16VectorNV: return "AtomicFloat16VectorNV"; case (int)Capability::ShaderClockKHR: return "ShaderClockKHR"; case (int)Capability::QuadControlKHR: return "QuadControlKHR"; case (int)Capability::Int64ImageEXT: return "Int64ImageEXT"; case (int)Capability::IntegerFunctions2INTEL: return "CapabilityIntegerFunctions2INTEL"; case (int)Capability::ExpectAssumeKHR: return "ExpectAssumeKHR"; case (int)Capability::AtomicFloat16AddEXT: return "AtomicFloat16AddEXT"; case (int)Capability::AtomicFloat32AddEXT: return "AtomicFloat32AddEXT"; case (int)Capability::AtomicFloat64AddEXT: return "AtomicFloat64AddEXT"; case (int)Capability::AtomicFloat16MinMaxEXT: return "AtomicFloat16MinMaxEXT"; case (int)Capability::AtomicFloat32MinMaxEXT: return "AtomicFloat32MinMaxEXT"; case (int)Capability::AtomicFloat64MinMaxEXT: return "AtomicFloat64MinMaxEXT"; case (int)Capability::WorkgroupMemoryExplicitLayoutKHR: return "CapabilityWorkgroupMemoryExplicitLayoutKHR"; case (int)Capability::WorkgroupMemoryExplicitLayout8BitAccessKHR: return "CapabilityWorkgroupMemoryExplicitLayout8BitAccessKHR"; case (int)Capability::WorkgroupMemoryExplicitLayout16BitAccessKHR: return "CapabilityWorkgroupMemoryExplicitLayout16BitAccessKHR"; case (int)Capability::CoreBuiltinsARM: return "CoreBuiltinsARM"; case (int)Capability::ShaderInvocationReorderNV: return "ShaderInvocationReorderNV"; case (int)Capability::TextureSampleWeightedQCOM: return "TextureSampleWeightedQCOM"; case (int)Capability::TextureBoxFilterQCOM: return "TextureBoxFilterQCOM"; case (int)Capability::TextureBlockMatchQCOM: return "TextureBlockMatchQCOM"; case (int)Capability::TileShadingQCOM: return "TileShadingQCOM"; case (int)Capability::TextureBlockMatch2QCOM: return "TextureBlockMatch2QCOM"; case (int)Capability::ReplicatedCompositesEXT: return "CapabilityReplicatedCompositesEXT"; case (int)Capability::DotProductKHR: return "DotProductKHR"; case (int)Capability::DotProductInputAllKHR: return "DotProductInputAllKHR"; case (int)Capability::DotProductInput4x8BitKHR: return "DotProductInput4x8BitKHR"; case (int)Capability::DotProductInput4x8BitPackedKHR: return "DotProductInput4x8BitPackedKHR"; case (int)Capability::RayTracingClusterAccelerationStructureNV: return "RayTracingClusterAccelerationStructureNV"; case (int)Capability::RayTracingSpheresGeometryNV: return "RayTracingSpheresGeometryNV"; case (int)Capability::RayTracingLinearSweptSpheresGeometryNV: return "RayTracingLinearSweptSpheresGeometryNV"; case (int)Capability::BFloat16TypeKHR: return "CapabilityBFloat16TypeKHR"; case (int)Capability::BFloat16DotProductKHR: return "CapabilityBFloat16DotProductKHR"; case (int)Capability::BFloat16CooperativeMatrixKHR: return "CapabilityBFloat16CooperativeMatrixKHR"; case (int)Capability::Float8EXT: return "CapabilityFloat8EXT"; case (int)Capability::Float8CooperativeMatrixEXT: return "CapabilityFloat8CooperativeMatrixEXT"; default: return "Bad"; } } const char* OpcodeString(int op) { switch (op) { case 0: return "OpNop"; case 1: return "OpUndef"; case 2: return "OpSourceContinued"; case 3: return "OpSource"; case 4: return "OpSourceExtension"; case 5: return "OpName"; case 6: return "OpMemberName"; case 7: return "OpString"; case 8: return "OpLine"; case 9: return "Bad"; case 10: return "OpExtension"; case 11: return "OpExtInstImport"; case 12: return "OpExtInst"; case 13: return "Bad"; case 14: return "OpMemoryModel"; case 15: return "OpEntryPoint"; case 16: return "OpExecutionMode"; case 17: return "OpCapability"; case 18: return "Bad"; case 19: return "OpTypeVoid"; case 20: return "OpTypeBool"; case 21: return "OpTypeInt"; case 22: return "OpTypeFloat"; case 23: return "OpTypeVector"; case 24: return "OpTypeMatrix"; case 25: return "OpTypeImage"; case 26: return "OpTypeSampler"; case 27: return "OpTypeSampledImage"; case 28: return "OpTypeArray"; case 29: return "OpTypeRuntimeArray"; case 30: return "OpTypeStruct"; case 31: return "OpTypeOpaque"; case 32: return "OpTypePointer"; case 33: return "OpTypeFunction"; case 34: return "OpTypeEvent"; case 35: return "OpTypeDeviceEvent"; case 36: return "OpTypeReserveId"; case 37: return "OpTypeQueue"; case 38: return "OpTypePipe"; case 39: return "OpTypeForwardPointer"; case 40: return "Bad"; case 41: return "OpConstantTrue"; case 42: return "OpConstantFalse"; case 43: return "OpConstant"; case 44: return "OpConstantComposite"; case 45: return "OpConstantSampler"; case 46: return "OpConstantNull"; case 47: return "Bad"; case 48: return "OpSpecConstantTrue"; case 49: return "OpSpecConstantFalse"; case 50: return "OpSpecConstant"; case 51: return "OpSpecConstantComposite"; case 52: return "OpSpecConstantOp"; case 53: return "Bad"; case 54: return "OpFunction"; case 55: return "OpFunctionParameter"; case 56: return "OpFunctionEnd"; case 57: return "OpFunctionCall"; case 58: return "Bad"; case 59: return "OpVariable"; case 60: return "OpImageTexelPointer"; case 61: return "OpLoad"; case 62: return "OpStore"; case 63: return "OpCopyMemory"; case 64: return "OpCopyMemorySized"; case 65: return "OpAccessChain"; case 66: return "OpInBoundsAccessChain"; case 67: return "OpPtrAccessChain"; case 68: return "OpArrayLength"; case 69: return "OpGenericPtrMemSemantics"; case 70: return "OpInBoundsPtrAccessChain"; case 71: return "OpDecorate"; case 72: return "OpMemberDecorate"; case 73: return "OpDecorationGroup"; case 74: return "OpGroupDecorate"; case 75: return "OpGroupMemberDecorate"; case 76: return "Bad"; case 77: return "OpVectorExtractDynamic"; case 78: return "OpVectorInsertDynamic"; case 79: return "OpVectorShuffle"; case 80: return "OpCompositeConstruct"; case 81: return "OpCompositeExtract"; case 82: return "OpCompositeInsert"; case 83: return "OpCopyObject"; case 84: return "OpTranspose"; case (int)Op::OpCopyLogical: return "OpCopyLogical"; case 85: return "Bad"; case 86: return "OpSampledImage"; case 87: return "OpImageSampleImplicitLod"; case 88: return "OpImageSampleExplicitLod"; case 89: return "OpImageSampleDrefImplicitLod"; case 90: return "OpImageSampleDrefExplicitLod"; case 91: return "OpImageSampleProjImplicitLod"; case 92: return "OpImageSampleProjExplicitLod"; case 93: return "OpImageSampleProjDrefImplicitLod"; case 94: return "OpImageSampleProjDrefExplicitLod"; case 95: return "OpImageFetch"; case 96: return "OpImageGather"; case 97: return "OpImageDrefGather"; case 98: return "OpImageRead"; case 99: return "OpImageWrite"; case 100: return "OpImage"; case 101: return "OpImageQueryFormat"; case 102: return "OpImageQueryOrder"; case 103: return "OpImageQuerySizeLod"; case 104: return "OpImageQuerySize"; case 105: return "OpImageQueryLod"; case 106: return "OpImageQueryLevels"; case 107: return "OpImageQuerySamples"; case 108: return "Bad"; case 109: return "OpConvertFToU"; case 110: return "OpConvertFToS"; case 111: return "OpConvertSToF"; case 112: return "OpConvertUToF"; case 113: return "OpUConvert"; case 114: return "OpSConvert"; case 115: return "OpFConvert"; case 116: return "OpQuantizeToF16"; case 117: return "OpConvertPtrToU"; case 118: return "OpSatConvertSToU"; case 119: return "OpSatConvertUToS"; case 120: return "OpConvertUToPtr"; case 121: return "OpPtrCastToGeneric"; case 122: return "OpGenericCastToPtr"; case 123: return "OpGenericCastToPtrExplicit"; case 124: return "OpBitcast"; case 125: return "Bad"; case 126: return "OpSNegate"; case 127: return "OpFNegate"; case 128: return "OpIAdd"; case 129: return "OpFAdd"; case 130: return "OpISub"; case 131: return "OpFSub"; case 132: return "OpIMul"; case 133: return "OpFMul"; case 134: return "OpUDiv"; case 135: return "OpSDiv"; case 136: return "OpFDiv"; case 137: return "OpUMod"; case 138: return "OpSRem"; case 139: return "OpSMod"; case 140: return "OpFRem"; case 141: return "OpFMod"; case 142: return "OpVectorTimesScalar"; case 143: return "OpMatrixTimesScalar"; case 144: return "OpVectorTimesMatrix"; case 145: return "OpMatrixTimesVector"; case 146: return "OpMatrixTimesMatrix"; case 147: return "OpOuterProduct"; case 148: return "OpDot"; case 149: return "OpIAddCarry"; case 150: return "OpISubBorrow"; case 151: return "OpUMulExtended"; case 152: return "OpSMulExtended"; case 153: return "Bad"; case 154: return "OpAny"; case 155: return "OpAll"; case 156: return "OpIsNan"; case 157: return "OpIsInf"; case 158: return "OpIsFinite"; case 159: return "OpIsNormal"; case 160: return "OpSignBitSet"; case 161: return "OpLessOrGreater"; case 162: return "OpOrdered"; case 163: return "OpUnordered"; case 164: return "OpLogicalEqual"; case 165: return "OpLogicalNotEqual"; case 166: return "OpLogicalOr"; case 167: return "OpLogicalAnd"; case 168: return "OpLogicalNot"; case 169: return "OpSelect"; case 170: return "OpIEqual"; case 171: return "OpINotEqual"; case 172: return "OpUGreaterThan"; case 173: return "OpSGreaterThan"; case 174: return "OpUGreaterThanEqual"; case 175: return "OpSGreaterThanEqual"; case 176: return "OpULessThan"; case 177: return "OpSLessThan"; case 178: return "OpULessThanEqual"; case 179: return "OpSLessThanEqual"; case 180: return "OpFOrdEqual"; case 181: return "OpFUnordEqual"; case 182: return "OpFOrdNotEqual"; case 183: return "OpFUnordNotEqual"; case 184: return "OpFOrdLessThan"; case 185: return "OpFUnordLessThan"; case 186: return "OpFOrdGreaterThan"; case 187: return "OpFUnordGreaterThan"; case 188: return "OpFOrdLessThanEqual"; case 189: return "OpFUnordLessThanEqual"; case 190: return "OpFOrdGreaterThanEqual"; case 191: return "OpFUnordGreaterThanEqual"; case 192: return "Bad"; case 193: return "Bad"; case 194: return "OpShiftRightLogical"; case 195: return "OpShiftRightArithmetic"; case 196: return "OpShiftLeftLogical"; case 197: return "OpBitwiseOr"; case 198: return "OpBitwiseXor"; case 199: return "OpBitwiseAnd"; case 200: return "OpNot"; case 201: return "OpBitFieldInsert"; case 202: return "OpBitFieldSExtract"; case 203: return "OpBitFieldUExtract"; case 204: return "OpBitReverse"; case 205: return "OpBitCount"; case 206: return "Bad"; case 207: return "OpDPdx"; case 208: return "OpDPdy"; case 209: return "OpFwidth"; case 210: return "OpDPdxFine"; case 211: return "OpDPdyFine"; case 212: return "OpFwidthFine"; case 213: return "OpDPdxCoarse"; case 214: return "OpDPdyCoarse"; case 215: return "OpFwidthCoarse"; case 216: return "Bad"; case 217: return "Bad"; case 218: return "OpEmitVertex"; case 219: return "OpEndPrimitive"; case 220: return "OpEmitStreamVertex"; case 221: return "OpEndStreamPrimitive"; case 222: return "Bad"; case 223: return "Bad"; case 224: return "OpControlBarrier"; case 225: return "OpMemoryBarrier"; case 226: return "Bad"; case 227: return "OpAtomicLoad"; case 228: return "OpAtomicStore"; case 229: return "OpAtomicExchange"; case 230: return "OpAtomicCompareExchange"; case 231: return "OpAtomicCompareExchangeWeak"; case 232: return "OpAtomicIIncrement"; case 233: return "OpAtomicIDecrement"; case 234: return "OpAtomicIAdd"; case 235: return "OpAtomicISub"; case 236: return "OpAtomicSMin"; case 237: return "OpAtomicUMin"; case 238: return "OpAtomicSMax"; case 239: return "OpAtomicUMax"; case 240: return "OpAtomicAnd"; case 241: return "OpAtomicOr"; case 242: return "OpAtomicXor"; case 243: return "Bad"; case 244: return "Bad"; case 245: return "OpPhi"; case 246: return "OpLoopMerge"; case 247: return "OpSelectionMerge"; case 248: return "OpLabel"; case 249: return "OpBranch"; case 250: return "OpBranchConditional"; case 251: return "OpSwitch"; case 252: return "OpKill"; case 253: return "OpReturn"; case 254: return "OpReturnValue"; case 255: return "OpUnreachable"; case 256: return "OpLifetimeStart"; case 257: return "OpLifetimeStop"; case 258: return "Bad"; case 259: return "OpGroupAsyncCopy"; case 260: return "OpGroupWaitEvents"; case 261: return "OpGroupAll"; case 262: return "OpGroupAny"; case 263: return "OpGroupBroadcast"; case 264: return "OpGroupIAdd"; case 265: return "OpGroupFAdd"; case 266: return "OpGroupFMin"; case 267: return "OpGroupUMin"; case 268: return "OpGroupSMin"; case 269: return "OpGroupFMax"; case 270: return "OpGroupUMax"; case 271: return "OpGroupSMax"; case 272: return "Bad"; case 273: return "Bad"; case 274: return "OpReadPipe"; case 275: return "OpWritePipe"; case 276: return "OpReservedReadPipe"; case 277: return "OpReservedWritePipe"; case 278: return "OpReserveReadPipePackets"; case 279: return "OpReserveWritePipePackets"; case 280: return "OpCommitReadPipe"; case 281: return "OpCommitWritePipe"; case 282: return "OpIsValidReserveId"; case 283: return "OpGetNumPipePackets"; case 284: return "OpGetMaxPipePackets"; case 285: return "OpGroupReserveReadPipePackets"; case 286: return "OpGroupReserveWritePipePackets"; case 287: return "OpGroupCommitReadPipe"; case 288: return "OpGroupCommitWritePipe"; case 289: return "Bad"; case 290: return "Bad"; case 291: return "OpEnqueueMarker"; case 292: return "OpEnqueueKernel"; case 293: return "OpGetKernelNDrangeSubGroupCount"; case 294: return "OpGetKernelNDrangeMaxSubGroupSize"; case 295: return "OpGetKernelWorkGroupSize"; case 296: return "OpGetKernelPreferredWorkGroupSizeMultiple"; case 297: return "OpRetainEvent"; case 298: return "OpReleaseEvent"; case 299: return "OpCreateUserEvent"; case 300: return "OpIsValidEvent"; case 301: return "OpSetUserEventStatus"; case 302: return "OpCaptureEventProfilingInfo"; case 303: return "OpGetDefaultQueue"; case 304: return "OpBuildNDRange"; case 305: return "OpImageSparseSampleImplicitLod"; case 306: return "OpImageSparseSampleExplicitLod"; case 307: return "OpImageSparseSampleDrefImplicitLod"; case 308: return "OpImageSparseSampleDrefExplicitLod"; case 309: return "OpImageSparseSampleProjImplicitLod"; case 310: return "OpImageSparseSampleProjExplicitLod"; case 311: return "OpImageSparseSampleProjDrefImplicitLod"; case 312: return "OpImageSparseSampleProjDrefExplicitLod"; case 313: return "OpImageSparseFetch"; case 314: return "OpImageSparseGather"; case 315: return "OpImageSparseDrefGather"; case 316: return "OpImageSparseTexelsResident"; case 317: return "OpNoLine"; case 318: return "OpAtomicFlagTestAndSet"; case 319: return "OpAtomicFlagClear"; case 320: return "OpImageSparseRead"; case (int)Op::OpModuleProcessed: return "OpModuleProcessed"; case (int)Op::OpExecutionModeId: return "OpExecutionModeId"; case (int)Op::OpDecorateId: return "OpDecorateId"; case 333: return "OpGroupNonUniformElect"; case 334: return "OpGroupNonUniformAll"; case 335: return "OpGroupNonUniformAny"; case 336: return "OpGroupNonUniformAllEqual"; case 337: return "OpGroupNonUniformBroadcast"; case 338: return "OpGroupNonUniformBroadcastFirst"; case 339: return "OpGroupNonUniformBallot"; case 340: return "OpGroupNonUniformInverseBallot"; case 341: return "OpGroupNonUniformBallotBitExtract"; case 342: return "OpGroupNonUniformBallotBitCount"; case 343: return "OpGroupNonUniformBallotFindLSB"; case 344: return "OpGroupNonUniformBallotFindMSB"; case 345: return "OpGroupNonUniformShuffle"; case 346: return "OpGroupNonUniformShuffleXor"; case 347: return "OpGroupNonUniformShuffleUp"; case 348: return "OpGroupNonUniformShuffleDown"; case 349: return "OpGroupNonUniformIAdd"; case 350: return "OpGroupNonUniformFAdd"; case 351: return "OpGroupNonUniformIMul"; case 352: return "OpGroupNonUniformFMul"; case 353: return "OpGroupNonUniformSMin"; case 354: return "OpGroupNonUniformUMin"; case 355: return "OpGroupNonUniformFMin"; case 356: return "OpGroupNonUniformSMax"; case 357: return "OpGroupNonUniformUMax"; case 358: return "OpGroupNonUniformFMax"; case 359: return "OpGroupNonUniformBitwiseAnd"; case 360: return "OpGroupNonUniformBitwiseOr"; case 361: return "OpGroupNonUniformBitwiseXor"; case 362: return "OpGroupNonUniformLogicalAnd"; case 363: return "OpGroupNonUniformLogicalOr"; case 364: return "OpGroupNonUniformLogicalXor"; case 365: return "OpGroupNonUniformQuadBroadcast"; case 366: return "OpGroupNonUniformQuadSwap"; case (int)Op::OpTerminateInvocation: return "OpTerminateInvocation"; case 4421: return "OpSubgroupBallotKHR"; case 4422: return "OpSubgroupFirstInvocationKHR"; case 4428: return "OpSubgroupAllKHR"; case 4429: return "OpSubgroupAnyKHR"; case 4430: return "OpSubgroupAllEqualKHR"; case 4432: return "OpSubgroupReadInvocationKHR"; case 4433: return "OpExtInstWithForwardRefsKHR"; case (int)Op::OpGroupNonUniformQuadAllKHR: return "OpGroupNonUniformQuadAllKHR"; case (int)Op::OpGroupNonUniformQuadAnyKHR: return "OpGroupNonUniformQuadAnyKHR"; case (int)Op::OpAtomicFAddEXT: return "OpAtomicFAddEXT"; case (int)Op::OpAtomicFMinEXT: return "OpAtomicFMinEXT"; case (int)Op::OpAtomicFMaxEXT: return "OpAtomicFMaxEXT"; case (int)Op::OpAssumeTrueKHR: return "OpAssumeTrueKHR"; case (int)Op::OpExpectKHR: return "OpExpectKHR"; case 5000: return "OpGroupIAddNonUniformAMD"; case 5001: return "OpGroupFAddNonUniformAMD"; case 5002: return "OpGroupFMinNonUniformAMD"; case 5003: return "OpGroupUMinNonUniformAMD"; case 5004: return "OpGroupSMinNonUniformAMD"; case 5005: return "OpGroupFMaxNonUniformAMD"; case 5006: return "OpGroupUMaxNonUniformAMD"; case 5007: return "OpGroupSMaxNonUniformAMD"; case 5011: return "OpFragmentMaskFetchAMD"; case 5012: return "OpFragmentFetchAMD"; case (int)Op::OpReadClockKHR: return "OpReadClockKHR"; case (int)Op::OpDecorateStringGOOGLE: return "OpDecorateStringGOOGLE"; case (int)Op::OpMemberDecorateStringGOOGLE: return "OpMemberDecorateStringGOOGLE"; case (int)Op::OpReportIntersectionKHR: return "OpReportIntersectionKHR"; case (int)Op::OpIgnoreIntersectionNV: return "OpIgnoreIntersectionNV"; case (int)Op::OpIgnoreIntersectionKHR: return "OpIgnoreIntersectionKHR"; case (int)Op::OpTerminateRayNV: return "OpTerminateRayNV"; case (int)Op::OpTerminateRayKHR: return "OpTerminateRayKHR"; case (int)Op::OpTraceNV: return "OpTraceNV"; case (int)Op::OpTraceRayMotionNV: return "OpTraceRayMotionNV"; case (int)Op::OpTraceRayKHR: return "OpTraceRayKHR"; case (int)Op::OpTypeAccelerationStructureKHR: return "OpTypeAccelerationStructureKHR"; case (int)Op::OpExecuteCallableNV: return "OpExecuteCallableNV"; case (int)Op::OpExecuteCallableKHR: return "OpExecuteCallableKHR"; case (int)Op::OpConvertUToAccelerationStructureKHR: return "OpConvertUToAccelerationStructureKHR"; case (int)Op::OpGroupNonUniformPartitionNV: return "OpGroupNonUniformPartitionNV"; case (int)Op::OpImageSampleFootprintNV: return "OpImageSampleFootprintNV"; case (int)Op::OpWritePackedPrimitiveIndices4x8NV: return "OpWritePackedPrimitiveIndices4x8NV"; case (int)Op::OpEmitMeshTasksEXT: return "OpEmitMeshTasksEXT"; case (int)Op::OpSetMeshOutputsEXT: return "OpSetMeshOutputsEXT"; case (int)Op::OpGroupNonUniformRotateKHR: return "OpGroupNonUniformRotateKHR"; case (int)Op::OpTypeRayQueryKHR: return "OpTypeRayQueryKHR"; case (int)Op::OpRayQueryInitializeKHR: return "OpRayQueryInitializeKHR"; case (int)Op::OpRayQueryTerminateKHR: return "OpRayQueryTerminateKHR"; case (int)Op::OpRayQueryGenerateIntersectionKHR: return "OpRayQueryGenerateIntersectionKHR"; case (int)Op::OpRayQueryConfirmIntersectionKHR: return "OpRayQueryConfirmIntersectionKHR"; case (int)Op::OpRayQueryProceedKHR: return "OpRayQueryProceedKHR"; case (int)Op::OpRayQueryGetIntersectionTypeKHR: return "OpRayQueryGetIntersectionTypeKHR"; case (int)Op::OpRayQueryGetRayTMinKHR: return "OpRayQueryGetRayTMinKHR"; case (int)Op::OpRayQueryGetRayFlagsKHR: return "OpRayQueryGetRayFlagsKHR"; case (int)Op::OpRayQueryGetIntersectionTKHR: return "OpRayQueryGetIntersectionTKHR"; case (int)Op::OpRayQueryGetIntersectionInstanceCustomIndexKHR: return "OpRayQueryGetIntersectionInstanceCustomIndexKHR"; case (int)Op::OpRayQueryGetIntersectionInstanceIdKHR: return "OpRayQueryGetIntersectionInstanceIdKHR"; case (int)Op::OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR: return "OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR"; case (int)Op::OpRayQueryGetIntersectionGeometryIndexKHR: return "OpRayQueryGetIntersectionGeometryIndexKHR"; case (int)Op::OpRayQueryGetIntersectionPrimitiveIndexKHR: return "OpRayQueryGetIntersectionPrimitiveIndexKHR"; case (int)Op::OpRayQueryGetIntersectionBarycentricsKHR: return "OpRayQueryGetIntersectionBarycentricsKHR"; case (int)Op::OpRayQueryGetIntersectionFrontFaceKHR: return "OpRayQueryGetIntersectionFrontFaceKHR"; case (int)Op::OpRayQueryGetIntersectionCandidateAABBOpaqueKHR: return "OpRayQueryGetIntersectionCandidateAABBOpaqueKHR"; case (int)Op::OpRayQueryGetIntersectionObjectRayDirectionKHR: return "OpRayQueryGetIntersectionObjectRayDirectionKHR"; case (int)Op::OpRayQueryGetIntersectionObjectRayOriginKHR: return "OpRayQueryGetIntersectionObjectRayOriginKHR"; case (int)Op::OpRayQueryGetWorldRayDirectionKHR: return "OpRayQueryGetWorldRayDirectionKHR"; case (int)Op::OpRayQueryGetWorldRayOriginKHR: return "OpRayQueryGetWorldRayOriginKHR"; case (int)Op::OpRayQueryGetIntersectionObjectToWorldKHR: return "OpRayQueryGetIntersectionObjectToWorldKHR"; case (int)Op::OpRayQueryGetIntersectionWorldToObjectKHR: return "OpRayQueryGetIntersectionWorldToObjectKHR"; case (int)Op::OpRayQueryGetIntersectionTriangleVertexPositionsKHR: return "OpRayQueryGetIntersectionTriangleVertexPositionsKHR"; case (int)Op::OpRayQueryGetClusterIdNV: return "OpRayQueryGetIntersectionClusterIdNV"; case (int)Op::OpRayQueryGetIntersectionSpherePositionNV: return "OpRayQueryGetIntersectionSpherePositionNV"; case (int)Op::OpRayQueryGetIntersectionSphereRadiusNV: return "OpRayQueryGetIntersectionSphereRadiusNV"; case (int)Op::OpRayQueryGetIntersectionLSSHitValueNV: return "OpRayQueryGetIntersectionLSSHitValueNV"; case (int)Op::OpRayQueryGetIntersectionLSSPositionsNV: return "OpRayQueryGetIntersectionLSSPositionsNV"; case (int)Op::OpRayQueryGetIntersectionLSSRadiiNV: return "OpRayQueryGetIntersectionLSSRadiiNV"; case (int)Op::OpRayQueryIsSphereHitNV: return "OpRayQueryIsSphereHitNV"; case (int)Op::OpRayQueryIsLSSHitNV: return "OpRayQueryIsLSSHitNV"; case (int)Op::OpTypeCooperativeMatrixNV: return "OpTypeCooperativeMatrixNV"; case (int)Op::OpCooperativeMatrixLoadNV: return "OpCooperativeMatrixLoadNV"; case (int)Op::OpCooperativeMatrixStoreNV: return "OpCooperativeMatrixStoreNV"; case (int)Op::OpCooperativeMatrixMulAddNV: return "OpCooperativeMatrixMulAddNV"; case (int)Op::OpCooperativeMatrixLengthNV: return "OpCooperativeMatrixLengthNV"; case (int)Op::OpTypeCooperativeMatrixKHR: return "OpTypeCooperativeMatrixKHR"; case (int)Op::OpCooperativeMatrixLoadKHR: return "OpCooperativeMatrixLoadKHR"; case (int)Op::OpCooperativeMatrixStoreKHR: return "OpCooperativeMatrixStoreKHR"; case (int)Op::OpCooperativeMatrixMulAddKHR: return "OpCooperativeMatrixMulAddKHR"; case (int)Op::OpCooperativeMatrixLengthKHR: return "OpCooperativeMatrixLengthKHR"; case (int)Op::OpDemoteToHelperInvocationEXT: return "OpDemoteToHelperInvocationEXT"; case (int)Op::OpIsHelperInvocationEXT: return "OpIsHelperInvocationEXT"; case (int)Op::OpCooperativeMatrixConvertNV: return "OpCooperativeMatrixConvertNV"; case (int)Op::OpCooperativeMatrixTransposeNV: return "OpCooperativeMatrixTransposeNV"; case (int)Op::OpCooperativeMatrixReduceNV: return "OpCooperativeMatrixReduceNV"; case (int)Op::OpCooperativeMatrixLoadTensorNV: return "OpCooperativeMatrixLoadTensorNV"; case (int)Op::OpCooperativeMatrixStoreTensorNV: return "OpCooperativeMatrixStoreTensorNV"; case (int)Op::OpCooperativeMatrixPerElementOpNV: return "OpCooperativeMatrixPerElementOpNV"; case (int)Op::OpTypeTensorLayoutNV: return "OpTypeTensorLayoutNV"; case (int)Op::OpTypeTensorViewNV: return "OpTypeTensorViewNV"; case (int)Op::OpCreateTensorLayoutNV: return "OpCreateTensorLayoutNV"; case (int)Op::OpTensorLayoutSetBlockSizeNV: return "OpTensorLayoutSetBlockSizeNV"; case (int)Op::OpTensorLayoutSetDimensionNV: return "OpTensorLayoutSetDimensionNV"; case (int)Op::OpTensorLayoutSetStrideNV: return "OpTensorLayoutSetStrideNV"; case (int)Op::OpTensorLayoutSliceNV: return "OpTensorLayoutSliceNV"; case (int)Op::OpTensorLayoutSetClampValueNV: return "OpTensorLayoutSetClampValueNV"; case (int)Op::OpCreateTensorViewNV: return "OpCreateTensorViewNV"; case (int)Op::OpTensorViewSetDimensionNV: return "OpTensorViewSetDimensionNV"; case (int)Op::OpTensorViewSetStrideNV: return "OpTensorViewSetStrideNV"; case (int)Op::OpTensorViewSetClipNV: return "OpTensorViewSetClipNV"; case (int)Op::OpTypeCooperativeVectorNV: return "OpTypeCooperativeVectorNV"; case (int)Op::OpCooperativeVectorMatrixMulNV: return "OpCooperativeVectorMatrixMulNV"; case (int)Op::OpCooperativeVectorMatrixMulAddNV: return "OpCooperativeVectorMatrixMulAddNV"; case (int)Op::OpCooperativeVectorLoadNV: return "OpCooperativeVectorLoadNV"; case (int)Op::OpCooperativeVectorStoreNV: return "OpCooperativeVectorStoreNV"; case (int)Op::OpCooperativeVectorOuterProductAccumulateNV: return "OpCooperativeVectorOuterProductAccumulateNV"; case (int)Op::OpCooperativeVectorReduceSumAccumulateNV: return "OpCooperativeVectorReduceSumAccumulateNV"; case (int)Op::OpBeginInvocationInterlockEXT: return "OpBeginInvocationInterlockEXT"; case (int)Op::OpEndInvocationInterlockEXT: return "OpEndInvocationInterlockEXT"; case (int)Op::OpTypeHitObjectNV: return "OpTypeHitObjectNV"; case (int)Op::OpHitObjectTraceRayNV: return "OpHitObjectTraceRayNV"; case (int)Op::OpHitObjectTraceRayMotionNV: return "OpHitObjectTraceRayMotionNV"; case (int)Op::OpHitObjectRecordHitNV: return "OpHitObjectRecordHitNV"; case (int)Op::OpHitObjectRecordHitMotionNV: return "OpHitObjectRecordHitMotionNV"; case (int)Op::OpHitObjectRecordHitWithIndexNV: return "OpHitObjectRecordHitWithIndexNV"; case (int)Op::OpHitObjectRecordHitWithIndexMotionNV: return "OpHitObjectRecordHitWithIndexMotionNV"; case (int)Op::OpHitObjectRecordMissNV: return "OpHitObjectRecordMissNV"; case (int)Op::OpHitObjectRecordMissMotionNV: return "OpHitObjectRecordMissMotionNV"; case (int)Op::OpHitObjectRecordEmptyNV: return "OpHitObjectRecordEmptyNV"; case (int)Op::OpHitObjectExecuteShaderNV: return "OpHitObjectExecuteShaderNV"; case (int)Op::OpReorderThreadWithHintNV: return "OpReorderThreadWithHintNV"; case (int)Op::OpReorderThreadWithHitObjectNV: return "OpReorderThreadWithHitObjectNV"; case (int)Op::OpHitObjectGetCurrentTimeNV: return "OpHitObjectGetCurrentTimeNV"; case (int)Op::OpHitObjectGetAttributesNV: return "OpHitObjectGetAttributesNV"; case (int)Op::OpHitObjectGetHitKindNV: return "OpHitObjectGetFrontFaceNV"; case (int)Op::OpHitObjectGetPrimitiveIndexNV: return "OpHitObjectGetPrimitiveIndexNV"; case (int)Op::OpHitObjectGetGeometryIndexNV: return "OpHitObjectGetGeometryIndexNV"; case (int)Op::OpHitObjectGetInstanceIdNV: return "OpHitObjectGetInstanceIdNV"; case (int)Op::OpHitObjectGetInstanceCustomIndexNV: return "OpHitObjectGetInstanceCustomIndexNV"; case (int)Op::OpHitObjectGetObjectRayDirectionNV: return "OpHitObjectGetObjectRayDirectionNV"; case (int)Op::OpHitObjectGetObjectRayOriginNV: return "OpHitObjectGetObjectRayOriginNV"; case (int)Op::OpHitObjectGetWorldRayDirectionNV: return "OpHitObjectGetWorldRayDirectionNV"; case (int)Op::OpHitObjectGetWorldRayOriginNV: return "OpHitObjectGetWorldRayOriginNV"; case (int)Op::OpHitObjectGetWorldToObjectNV: return "OpHitObjectGetWorldToObjectNV"; case (int)Op::OpHitObjectGetObjectToWorldNV: return "OpHitObjectGetObjectToWorldNV"; case (int)Op::OpHitObjectGetRayTMaxNV: return "OpHitObjectGetRayTMaxNV"; case (int)Op::OpHitObjectGetRayTMinNV: return "OpHitObjectGetRayTMinNV"; case (int)Op::OpHitObjectIsEmptyNV: return "OpHitObjectIsEmptyNV"; case (int)Op::OpHitObjectIsHitNV: return "OpHitObjectIsHitNV"; case (int)Op::OpHitObjectIsMissNV: return "OpHitObjectIsMissNV"; case (int)Op::OpHitObjectGetShaderBindingTableRecordIndexNV: return "OpHitObjectGetShaderBindingTableRecordIndexNV"; case (int)Op::OpHitObjectGetShaderRecordBufferHandleNV: return "OpHitObjectGetShaderRecordBufferHandleNV"; case (int)Op::OpHitObjectGetClusterIdNV: return "OpHitObjectGetClusterIdNV"; case (int)Op::OpHitObjectGetSpherePositionNV: return "OpHitObjectGetSpherePositionNV"; case (int)Op::OpHitObjectGetSphereRadiusNV: return "OpHitObjectGetSphereRadiusNV"; case (int)Op::OpHitObjectGetLSSPositionsNV: return "OpHitObjectGetLSSPositionsNV"; case (int)Op::OpHitObjectGetLSSRadiiNV: return "OpHitObjectGetLSSRadiiNV"; case (int)Op::OpHitObjectIsSphereHitNV: return "OpHitObjectIsSphereHitNV"; case (int)Op::OpHitObjectIsLSSHitNV: return "OpHitObjectIsLSSHitNV"; case (int)Op::OpFetchMicroTriangleVertexBarycentricNV: return "OpFetchMicroTriangleVertexBarycentricNV"; case (int)Op::OpFetchMicroTriangleVertexPositionNV: return "OpFetchMicroTriangleVertexPositionNV"; case (int)Op::OpColorAttachmentReadEXT: return "OpColorAttachmentReadEXT"; case (int)Op::OpDepthAttachmentReadEXT: return "OpDepthAttachmentReadEXT"; case (int)Op::OpStencilAttachmentReadEXT: return "OpStencilAttachmentReadEXT"; case (int)Op::OpImageSampleWeightedQCOM: return "OpImageSampleWeightedQCOM"; case (int)Op::OpImageBoxFilterQCOM: return "OpImageBoxFilterQCOM"; case (int)Op::OpImageBlockMatchSADQCOM: return "OpImageBlockMatchSADQCOM"; case (int)Op::OpImageBlockMatchSSDQCOM: return "OpImageBlockMatchSSDQCOM"; case (int)Op::OpImageBlockMatchWindowSSDQCOM: return "OpImageBlockMatchWindowSSDQCOM"; case (int)Op::OpImageBlockMatchWindowSADQCOM: return "OpImageBlockMatchWindowSADQCOM"; case (int)Op::OpImageBlockMatchGatherSSDQCOM: return "OpImageBlockMatchGatherSSDQCOM"; case (int)Op::OpImageBlockMatchGatherSADQCOM: return "OpImageBlockMatchGatherSADQCOM"; case (int)Op::OpConstantCompositeReplicateEXT: return "OpConstantCompositeReplicateEXT"; case (int)Op::OpSpecConstantCompositeReplicateEXT: return "OpSpecConstantCompositeReplicateEXT"; case (int)Op::OpCompositeConstructReplicateEXT: return "OpCompositeConstructReplicateEXT"; case (int)Op::OpSDotKHR: return "OpSDotKHR"; case (int)Op::OpUDotKHR: return "OpUDotKHR"; case (int)Op::OpSUDotKHR: return "OpSUDotKHR"; case (int)Op::OpSDotAccSatKHR: return "OpSDotAccSatKHR"; case (int)Op::OpUDotAccSatKHR: return "OpUDotAccSatKHR"; case (int)Op::OpSUDotAccSatKHR: return "OpSUDotAccSatKHR"; default: return "Bad"; } } // The set of objects that hold all the instruction/operand // parameterization information. InstructionParameters InstructionDesc[OpCodeMask + 1]; OperandParameters ExecutionModeOperands[ExecutionModeCeiling]; OperandParameters DecorationOperands[DecorationCeiling]; EnumDefinition OperandClassParams[OperandCount]; EnumParameters ExecutionModeParams[ExecutionModeCeiling]; EnumParameters ImageOperandsParams[ImageOperandsCeiling]; EnumParameters DecorationParams[DecorationCeiling]; EnumParameters LoopControlParams[FunctionControlCeiling]; EnumParameters SelectionControlParams[SelectControlCeiling]; EnumParameters FunctionControlParams[FunctionControlCeiling]; EnumParameters MemoryAccessParams[MemoryAccessCeiling]; EnumParameters CooperativeMatrixOperandsParams[CooperativeMatrixOperandsCeiling]; EnumParameters TensorAddressingOperandsParams[TensorAddressingOperandsCeiling]; // Set up all the parameterizing descriptions of the opcodes, operands, etc. void Parameterize() { // only do this once. static std::once_flag initialized; std::call_once(initialized, [](){ // Exceptions to having a result and a resulting type . // (Everything is initialized to have both). InstructionDesc[enumCast(Op::OpNop)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpSource)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpSourceContinued)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpSourceExtension)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpExtension)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpExtInstImport)].setResultAndType(true, false); InstructionDesc[enumCast(Op::OpCapability)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpMemoryModel)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpEntryPoint)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpExecutionMode)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpExecutionModeId)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpTypeVoid)].setResultAndType(true, false); InstructionDesc[enumCast(Op::OpTypeBool)].setResultAndType(true, false); InstructionDesc[enumCast(Op::OpTypeInt)].setResultAndType(true, false); InstructionDesc[enumCast(Op::OpTypeFloat)].setResultAndType(true, false); InstructionDesc[enumCast(Op::OpTypeVector)].setResultAndType(true, false); InstructionDesc[enumCast(Op::OpTypeMatrix)].setResultAndType(true, false); InstructionDesc[enumCast(Op::OpTypeImage)].setResultAndType(true, false); InstructionDesc[enumCast(Op::OpTypeSampler)].setResultAndType(true, false); InstructionDesc[enumCast(Op::OpTypeSampledImage)].setResultAndType(true, false); InstructionDesc[enumCast(Op::OpTypeArray)].setResultAndType(true, false); InstructionDesc[enumCast(Op::OpTypeRuntimeArray)].setResultAndType(true, false); InstructionDesc[enumCast(Op::OpTypeStruct)].setResultAndType(true, false); InstructionDesc[enumCast(Op::OpTypeOpaque)].setResultAndType(true, false); InstructionDesc[enumCast(Op::OpTypePointer)].setResultAndType(true, false); InstructionDesc[enumCast(Op::OpTypeForwardPointer)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpTypeFunction)].setResultAndType(true, false); InstructionDesc[enumCast(Op::OpTypeEvent)].setResultAndType(true, false); InstructionDesc[enumCast(Op::OpTypeDeviceEvent)].setResultAndType(true, false); InstructionDesc[enumCast(Op::OpTypeReserveId)].setResultAndType(true, false); InstructionDesc[enumCast(Op::OpTypeQueue)].setResultAndType(true, false); InstructionDesc[enumCast(Op::OpTypePipe)].setResultAndType(true, false); InstructionDesc[enumCast(Op::OpFunctionEnd)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpStore)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpImageWrite)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpDecorationGroup)].setResultAndType(true, false); InstructionDesc[enumCast(Op::OpDecorate)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpDecorateId)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpDecorateStringGOOGLE)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpMemberDecorate)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpMemberDecorateStringGOOGLE)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpGroupDecorate)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpGroupMemberDecorate)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpName)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpMemberName)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpString)].setResultAndType(true, false); InstructionDesc[enumCast(Op::OpLine)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpNoLine)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpCopyMemory)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpCopyMemorySized)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpEmitVertex)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpEndPrimitive)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpEmitStreamVertex)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpEndStreamPrimitive)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpControlBarrier)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpMemoryBarrier)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpAtomicStore)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpLoopMerge)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpSelectionMerge)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpLabel)].setResultAndType(true, false); InstructionDesc[enumCast(Op::OpBranch)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpBranchConditional)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpSwitch)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpKill)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpTerminateInvocation)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpReturn)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpReturnValue)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpUnreachable)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpLifetimeStart)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpLifetimeStop)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpCommitReadPipe)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpCommitWritePipe)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpGroupCommitWritePipe)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpGroupCommitReadPipe)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpCaptureEventProfilingInfo)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpSetUserEventStatus)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpRetainEvent)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpReleaseEvent)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpGroupWaitEvents)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpAtomicFlagClear)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpModuleProcessed)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpTypeCooperativeMatrixNV)].setResultAndType(true, false); InstructionDesc[enumCast(Op::OpCooperativeMatrixStoreNV)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpTypeCooperativeMatrixKHR)].setResultAndType(true, false); InstructionDesc[enumCast(Op::OpCooperativeMatrixStoreKHR)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpBeginInvocationInterlockEXT)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpEndInvocationInterlockEXT)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpAssumeTrueKHR)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpTypeTensorLayoutNV)].setResultAndType(true, false); InstructionDesc[enumCast(Op::OpTypeTensorViewNV)].setResultAndType(true, false); InstructionDesc[enumCast(Op::OpCooperativeMatrixStoreTensorNV)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpTypeCooperativeVectorNV)].setResultAndType(true, false); InstructionDesc[enumCast(Op::OpCooperativeVectorStoreNV)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpCooperativeVectorOuterProductAccumulateNV)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpCooperativeVectorReduceSumAccumulateNV)].setResultAndType(false, false); // Specific additional context-dependent operands ExecutionModeOperands[enumCast(ExecutionMode::Invocations)].push(OperandLiteralNumber, "'Number of <>'"); ExecutionModeOperands[enumCast(ExecutionMode::LocalSize)].push(OperandLiteralNumber, "'x size'"); ExecutionModeOperands[enumCast(ExecutionMode::LocalSize)].push(OperandLiteralNumber, "'y size'"); ExecutionModeOperands[enumCast(ExecutionMode::LocalSize)].push(OperandLiteralNumber, "'z size'"); ExecutionModeOperands[enumCast(ExecutionMode::LocalSizeHint)].push(OperandLiteralNumber, "'x size'"); ExecutionModeOperands[enumCast(ExecutionMode::LocalSizeHint)].push(OperandLiteralNumber, "'y size'"); ExecutionModeOperands[enumCast(ExecutionMode::LocalSizeHint)].push(OperandLiteralNumber, "'z size'"); ExecutionModeOperands[enumCast(ExecutionMode::OutputVertices)].push(OperandLiteralNumber, "'Vertex count'"); ExecutionModeOperands[enumCast(ExecutionMode::VecTypeHint)].push(OperandLiteralNumber, "'Vector type'"); DecorationOperands[enumCast(Decoration::Stream)].push(OperandLiteralNumber, "'Stream Number'"); DecorationOperands[enumCast(Decoration::Location)].push(OperandLiteralNumber, "'Location'"); DecorationOperands[enumCast(Decoration::Component)].push(OperandLiteralNumber, "'Component'"); DecorationOperands[enumCast(Decoration::Index)].push(OperandLiteralNumber, "'Index'"); DecorationOperands[enumCast(Decoration::Binding)].push(OperandLiteralNumber, "'Binding Point'"); DecorationOperands[enumCast(Decoration::DescriptorSet)].push(OperandLiteralNumber, "'Descriptor Set'"); DecorationOperands[enumCast(Decoration::Offset)].push(OperandLiteralNumber, "'Byte Offset'"); DecorationOperands[enumCast(Decoration::XfbBuffer)].push(OperandLiteralNumber, "'XFB Buffer Number'"); DecorationOperands[enumCast(Decoration::XfbStride)].push(OperandLiteralNumber, "'XFB Stride'"); DecorationOperands[enumCast(Decoration::ArrayStride)].push(OperandLiteralNumber, "'Array Stride'"); DecorationOperands[enumCast(Decoration::MatrixStride)].push(OperandLiteralNumber, "'Matrix Stride'"); DecorationOperands[enumCast(Decoration::BuiltIn)].push(OperandLiteralNumber, "See <>"); DecorationOperands[enumCast(Decoration::FPRoundingMode)].push(OperandFPRoundingMode, "'Floating-Point Rounding Mode'"); DecorationOperands[enumCast(Decoration::FPFastMathMode)].push(OperandFPFastMath, "'Fast-Math Mode'"); DecorationOperands[enumCast(Decoration::LinkageAttributes)].push(OperandLiteralString, "'Name'"); DecorationOperands[enumCast(Decoration::LinkageAttributes)].push(OperandLinkageType, "'Linkage Type'"); DecorationOperands[enumCast(Decoration::FuncParamAttr)].push(OperandFuncParamAttr, "'Function Parameter Attribute'"); DecorationOperands[enumCast(Decoration::SpecId)].push(OperandLiteralNumber, "'Specialization Constant ID'"); DecorationOperands[enumCast(Decoration::InputAttachmentIndex)].push(OperandLiteralNumber, "'Attachment Index'"); DecorationOperands[enumCast(Decoration::Alignment)].push(OperandLiteralNumber, "'Alignment'"); OperandClassParams[OperandSource].set(0, SourceString, nullptr); OperandClassParams[OperandExecutionModel].set(0, ExecutionModelString, nullptr); OperandClassParams[OperandAddressing].set(0, AddressingString, nullptr); OperandClassParams[OperandMemory].set(0, MemoryString, nullptr); OperandClassParams[OperandExecutionMode].set(ExecutionModeCeiling, ExecutionModeString, ExecutionModeParams); OperandClassParams[OperandExecutionMode].setOperands(ExecutionModeOperands); OperandClassParams[OperandStorage].set(0, StorageClassString, nullptr); OperandClassParams[OperandDimensionality].set(0, DimensionString, nullptr); OperandClassParams[OperandSamplerAddressingMode].set(0, SamplerAddressingModeString, nullptr); OperandClassParams[OperandSamplerFilterMode].set(0, SamplerFilterModeString, nullptr); OperandClassParams[OperandSamplerImageFormat].set(0, ImageFormatString, nullptr); OperandClassParams[OperandImageChannelOrder].set(0, ImageChannelOrderString, nullptr); OperandClassParams[OperandImageChannelDataType].set(0, ImageChannelDataTypeString, nullptr); OperandClassParams[OperandImageOperands].set(ImageOperandsCeiling, ImageOperandsString, ImageOperandsParams, true); OperandClassParams[OperandFPFastMath].set(0, FPFastMathString, nullptr, true); OperandClassParams[OperandFPRoundingMode].set(0, FPRoundingModeString, nullptr); OperandClassParams[OperandLinkageType].set(0, LinkageTypeString, nullptr); OperandClassParams[OperandFuncParamAttr].set(0, FuncParamAttrString, nullptr); OperandClassParams[OperandAccessQualifier].set(0, AccessQualifierString, nullptr); OperandClassParams[OperandDecoration].set(DecorationCeiling, DecorationString, DecorationParams); OperandClassParams[OperandDecoration].setOperands(DecorationOperands); OperandClassParams[OperandBuiltIn].set(0, BuiltInString, nullptr); OperandClassParams[OperandSelect].set(SelectControlCeiling, SelectControlString, SelectionControlParams, true); OperandClassParams[OperandLoop].set(LoopControlCeiling, LoopControlString, LoopControlParams, true); OperandClassParams[OperandFunction].set(FunctionControlCeiling, FunctionControlString, FunctionControlParams, true); OperandClassParams[OperandMemorySemantics].set(0, MemorySemanticsString, nullptr, true); OperandClassParams[OperandMemoryAccess].set(MemoryAccessCeiling, MemoryAccessString, MemoryAccessParams, true); OperandClassParams[OperandScope].set(0, ScopeString, nullptr); OperandClassParams[OperandGroupOperation].set(0, GroupOperationString, nullptr); OperandClassParams[OperandKernelEnqueueFlags].set(0, KernelEnqueueFlagsString, nullptr); OperandClassParams[OperandKernelProfilingInfo].set(0, KernelProfilingInfoString, nullptr, true); OperandClassParams[OperandCapability].set(0, CapabilityString, nullptr); OperandClassParams[OperandCooperativeMatrixOperands].set(CooperativeMatrixOperandsCeiling, CooperativeMatrixOperandsString, CooperativeMatrixOperandsParams, true); OperandClassParams[OperandTensorAddressingOperands].set(TensorAddressingOperandsCeiling, TensorAddressingOperandsString, TensorAddressingOperandsParams, true); OperandClassParams[OperandOpcode].set(OpCodeMask + 1, OpcodeString, nullptr); // set name of operator, an initial set of style operands, and the description InstructionDesc[enumCast(Op::OpSource)].operands.push(OperandSource, ""); InstructionDesc[enumCast(Op::OpSource)].operands.push(OperandLiteralNumber, "'Version'"); InstructionDesc[enumCast(Op::OpSource)].operands.push(OperandId, "'File'", true); InstructionDesc[enumCast(Op::OpSource)].operands.push(OperandLiteralString, "'Source'", true); InstructionDesc[enumCast(Op::OpSourceContinued)].operands.push(OperandLiteralString, "'Continued Source'"); InstructionDesc[enumCast(Op::OpSourceExtension)].operands.push(OperandLiteralString, "'Extension'"); InstructionDesc[enumCast(Op::OpName)].operands.push(OperandId, "'Target'"); InstructionDesc[enumCast(Op::OpName)].operands.push(OperandLiteralString, "'Name'"); InstructionDesc[enumCast(Op::OpMemberName)].operands.push(OperandId, "'Type'"); InstructionDesc[enumCast(Op::OpMemberName)].operands.push(OperandLiteralNumber, "'Member'"); InstructionDesc[enumCast(Op::OpMemberName)].operands.push(OperandLiteralString, "'Name'"); InstructionDesc[enumCast(Op::OpString)].operands.push(OperandLiteralString, "'String'"); InstructionDesc[enumCast(Op::OpLine)].operands.push(OperandId, "'File'"); InstructionDesc[enumCast(Op::OpLine)].operands.push(OperandLiteralNumber, "'Line'"); InstructionDesc[enumCast(Op::OpLine)].operands.push(OperandLiteralNumber, "'Column'"); InstructionDesc[enumCast(Op::OpExtension)].operands.push(OperandLiteralString, "'Name'"); InstructionDesc[enumCast(Op::OpExtInstImport)].operands.push(OperandLiteralString, "'Name'"); InstructionDesc[enumCast(Op::OpCapability)].operands.push(OperandCapability, "'Capability'"); InstructionDesc[enumCast(Op::OpMemoryModel)].operands.push(OperandAddressing, ""); InstructionDesc[enumCast(Op::OpMemoryModel)].operands.push(OperandMemory, ""); InstructionDesc[enumCast(Op::OpEntryPoint)].operands.push(OperandExecutionModel, ""); InstructionDesc[enumCast(Op::OpEntryPoint)].operands.push(OperandId, "'Entry Point'"); InstructionDesc[enumCast(Op::OpEntryPoint)].operands.push(OperandLiteralString, "'Name'"); InstructionDesc[enumCast(Op::OpEntryPoint)].operands.push(OperandVariableIds, "'Interface'"); InstructionDesc[enumCast(Op::OpExecutionMode)].operands.push(OperandId, "'Entry Point'"); InstructionDesc[enumCast(Op::OpExecutionMode)].operands.push(OperandExecutionMode, "'Mode'"); InstructionDesc[enumCast(Op::OpExecutionMode)].operands.push(OperandOptionalLiteral, "See <>"); InstructionDesc[enumCast(Op::OpExecutionModeId)].operands.push(OperandId, "'Entry Point'"); InstructionDesc[enumCast(Op::OpExecutionModeId)].operands.push(OperandExecutionMode, "'Mode'"); InstructionDesc[enumCast(Op::OpExecutionModeId)].operands.push(OperandVariableIds, "See <>"); InstructionDesc[enumCast(Op::OpTypeInt)].operands.push(OperandLiteralNumber, "'Width'"); InstructionDesc[enumCast(Op::OpTypeInt)].operands.push(OperandLiteralNumber, "'Signedness'"); InstructionDesc[enumCast(Op::OpTypeFloat)].operands.push(OperandLiteralNumber, "'Width'"); InstructionDesc[enumCast(Op::OpTypeFloat)].operands.push(OperandOptionalLiteral, "'FP Encoding'"); InstructionDesc[enumCast(Op::OpTypeVector)].operands.push(OperandId, "'Component Type'"); InstructionDesc[enumCast(Op::OpTypeVector)].operands.push(OperandLiteralNumber, "'Component Count'"); InstructionDesc[enumCast(Op::OpTypeMatrix)].operands.push(OperandId, "'Column Type'"); InstructionDesc[enumCast(Op::OpTypeMatrix)].operands.push(OperandLiteralNumber, "'Column Count'"); InstructionDesc[enumCast(Op::OpTypeImage)].operands.push(OperandId, "'Sampled Type'"); InstructionDesc[enumCast(Op::OpTypeImage)].operands.push(OperandDimensionality, ""); InstructionDesc[enumCast(Op::OpTypeImage)].operands.push(OperandLiteralNumber, "'Depth'"); InstructionDesc[enumCast(Op::OpTypeImage)].operands.push(OperandLiteralNumber, "'Arrayed'"); InstructionDesc[enumCast(Op::OpTypeImage)].operands.push(OperandLiteralNumber, "'MS'"); InstructionDesc[enumCast(Op::OpTypeImage)].operands.push(OperandLiteralNumber, "'Sampled'"); InstructionDesc[enumCast(Op::OpTypeImage)].operands.push(OperandSamplerImageFormat, ""); InstructionDesc[enumCast(Op::OpTypeImage)].operands.push(OperandAccessQualifier, "", true); InstructionDesc[enumCast(Op::OpTypeSampledImage)].operands.push(OperandId, "'Image Type'"); InstructionDesc[enumCast(Op::OpTypeArray)].operands.push(OperandId, "'Element Type'"); InstructionDesc[enumCast(Op::OpTypeArray)].operands.push(OperandId, "'Length'"); InstructionDesc[enumCast(Op::OpTypeRuntimeArray)].operands.push(OperandId, "'Element Type'"); InstructionDesc[enumCast(Op::OpTypeStruct)].operands.push(OperandVariableIds, "'Member 0 type', +\n'member 1 type', +\n..."); InstructionDesc[enumCast(Op::OpTypeOpaque)].operands.push(OperandLiteralString, "The name of the opaque type."); InstructionDesc[enumCast(Op::OpTypePointer)].operands.push(OperandStorage, ""); InstructionDesc[enumCast(Op::OpTypePointer)].operands.push(OperandId, "'Type'"); InstructionDesc[enumCast(Op::OpTypeForwardPointer)].operands.push(OperandId, "'Pointer Type'"); InstructionDesc[enumCast(Op::OpTypeForwardPointer)].operands.push(OperandStorage, ""); InstructionDesc[enumCast(Op::OpTypePipe)].operands.push(OperandAccessQualifier, "'Qualifier'"); InstructionDesc[enumCast(Op::OpTypeFunction)].operands.push(OperandId, "'Return Type'"); InstructionDesc[enumCast(Op::OpTypeFunction)].operands.push(OperandVariableIds, "'Parameter 0 Type', +\n'Parameter 1 Type', +\n..."); InstructionDesc[enumCast(Op::OpConstant)].operands.push(OperandVariableLiterals, "'Value'"); InstructionDesc[enumCast(Op::OpConstantComposite)].operands.push(OperandVariableIds, "'Constituents'"); InstructionDesc[enumCast(Op::OpConstantSampler)].operands.push(OperandSamplerAddressingMode, ""); InstructionDesc[enumCast(Op::OpConstantSampler)].operands.push(OperandLiteralNumber, "'Param'"); InstructionDesc[enumCast(Op::OpConstantSampler)].operands.push(OperandSamplerFilterMode, ""); InstructionDesc[enumCast(Op::OpSpecConstant)].operands.push(OperandVariableLiterals, "'Value'"); InstructionDesc[enumCast(Op::OpSpecConstantComposite)].operands.push(OperandVariableIds, "'Constituents'"); InstructionDesc[enumCast(Op::OpSpecConstantOp)].operands.push(OperandLiteralNumber, "'Opcode'"); InstructionDesc[enumCast(Op::OpSpecConstantOp)].operands.push(OperandVariableIds, "'Operands'"); InstructionDesc[enumCast(Op::OpVariable)].operands.push(OperandStorage, ""); InstructionDesc[enumCast(Op::OpVariable)].operands.push(OperandId, "'Initializer'", true); InstructionDesc[enumCast(Op::OpFunction)].operands.push(OperandFunction, ""); InstructionDesc[enumCast(Op::OpFunction)].operands.push(OperandId, "'Function Type'"); InstructionDesc[enumCast(Op::OpFunctionCall)].operands.push(OperandId, "'Function'"); InstructionDesc[enumCast(Op::OpFunctionCall)].operands.push(OperandVariableIds, "'Argument 0', +\n'Argument 1', +\n..."); InstructionDesc[enumCast(Op::OpExtInst)].operands.push(OperandId, "'Set'"); InstructionDesc[enumCast(Op::OpExtInst)].operands.push(OperandLiteralNumber, "'Instruction'"); InstructionDesc[enumCast(Op::OpExtInst)].operands.push(OperandVariableIds, "'Operand 1', +\n'Operand 2', +\n..."); InstructionDesc[enumCast(Op::OpExtInstWithForwardRefsKHR)].operands.push(OperandId, "'Set'"); InstructionDesc[enumCast(Op::OpExtInstWithForwardRefsKHR)].operands.push(OperandLiteralNumber, "'Instruction'"); InstructionDesc[enumCast(Op::OpExtInstWithForwardRefsKHR)].operands.push(OperandVariableIds, "'Operand 1', +\n'Operand 2', +\n..."); InstructionDesc[enumCast(Op::OpLoad)].operands.push(OperandId, "'Pointer'"); InstructionDesc[enumCast(Op::OpLoad)].operands.push(OperandMemoryAccess, "", true); InstructionDesc[enumCast(Op::OpLoad)].operands.push(OperandLiteralNumber, "", true); InstructionDesc[enumCast(Op::OpLoad)].operands.push(OperandId, "", true); InstructionDesc[enumCast(Op::OpStore)].operands.push(OperandId, "'Pointer'"); InstructionDesc[enumCast(Op::OpStore)].operands.push(OperandId, "'Object'"); InstructionDesc[enumCast(Op::OpStore)].operands.push(OperandMemoryAccess, "", true); InstructionDesc[enumCast(Op::OpStore)].operands.push(OperandLiteralNumber, "", true); InstructionDesc[enumCast(Op::OpStore)].operands.push(OperandId, "", true); InstructionDesc[enumCast(Op::OpPhi)].operands.push(OperandVariableIds, "'Variable, Parent, ...'"); InstructionDesc[enumCast(Op::OpDecorate)].operands.push(OperandId, "'Target'"); InstructionDesc[enumCast(Op::OpDecorate)].operands.push(OperandDecoration, ""); InstructionDesc[enumCast(Op::OpDecorate)].operands.push(OperandVariableLiterals, "See <>."); InstructionDesc[enumCast(Op::OpDecorateId)].operands.push(OperandId, "'Target'"); InstructionDesc[enumCast(Op::OpDecorateId)].operands.push(OperandDecoration, ""); InstructionDesc[enumCast(Op::OpDecorateId)].operands.push(OperandVariableIds, "See <>."); InstructionDesc[enumCast(Op::OpDecorateStringGOOGLE)].operands.push(OperandId, "'Target'"); InstructionDesc[enumCast(Op::OpDecorateStringGOOGLE)].operands.push(OperandDecoration, ""); InstructionDesc[enumCast(Op::OpDecorateStringGOOGLE)].operands.push(OperandVariableLiteralStrings, "'Literal Strings'"); InstructionDesc[enumCast(Op::OpMemberDecorate)].operands.push(OperandId, "'Structure Type'"); InstructionDesc[enumCast(Op::OpMemberDecorate)].operands.push(OperandLiteralNumber, "'Member'"); InstructionDesc[enumCast(Op::OpMemberDecorate)].operands.push(OperandDecoration, ""); InstructionDesc[enumCast(Op::OpMemberDecorate)].operands.push(OperandVariableLiterals, "See <>."); InstructionDesc[enumCast(Op::OpMemberDecorateStringGOOGLE)].operands.push(OperandId, "'Structure Type'"); InstructionDesc[enumCast(Op::OpMemberDecorateStringGOOGLE)].operands.push(OperandLiteralNumber, "'Member'"); InstructionDesc[enumCast(Op::OpMemberDecorateStringGOOGLE)].operands.push(OperandDecoration, ""); InstructionDesc[enumCast(Op::OpMemberDecorateStringGOOGLE)].operands.push(OperandVariableLiteralStrings, "'Literal Strings'"); InstructionDesc[enumCast(Op::OpGroupDecorate)].operands.push(OperandId, "'Decoration Group'"); InstructionDesc[enumCast(Op::OpGroupDecorate)].operands.push(OperandVariableIds, "'Targets'"); InstructionDesc[enumCast(Op::OpGroupMemberDecorate)].operands.push(OperandId, "'Decoration Group'"); InstructionDesc[enumCast(Op::OpGroupMemberDecorate)].operands.push(OperandVariableIdLiteral, "'Targets'"); InstructionDesc[enumCast(Op::OpVectorExtractDynamic)].operands.push(OperandId, "'Vector'"); InstructionDesc[enumCast(Op::OpVectorExtractDynamic)].operands.push(OperandId, "'Index'"); InstructionDesc[enumCast(Op::OpVectorInsertDynamic)].operands.push(OperandId, "'Vector'"); InstructionDesc[enumCast(Op::OpVectorInsertDynamic)].operands.push(OperandId, "'Component'"); InstructionDesc[enumCast(Op::OpVectorInsertDynamic)].operands.push(OperandId, "'Index'"); InstructionDesc[enumCast(Op::OpVectorShuffle)].operands.push(OperandId, "'Vector 1'"); InstructionDesc[enumCast(Op::OpVectorShuffle)].operands.push(OperandId, "'Vector 2'"); InstructionDesc[enumCast(Op::OpVectorShuffle)].operands.push(OperandVariableLiterals, "'Components'"); InstructionDesc[enumCast(Op::OpCompositeConstruct)].operands.push(OperandVariableIds, "'Constituents'"); InstructionDesc[enumCast(Op::OpCompositeExtract)].operands.push(OperandId, "'Composite'"); InstructionDesc[enumCast(Op::OpCompositeExtract)].operands.push(OperandVariableLiterals, "'Indexes'"); InstructionDesc[enumCast(Op::OpCompositeInsert)].operands.push(OperandId, "'Object'"); InstructionDesc[enumCast(Op::OpCompositeInsert)].operands.push(OperandId, "'Composite'"); InstructionDesc[enumCast(Op::OpCompositeInsert)].operands.push(OperandVariableLiterals, "'Indexes'"); InstructionDesc[enumCast(Op::OpCopyObject)].operands.push(OperandId, "'Operand'"); InstructionDesc[enumCast(Op::OpCopyMemory)].operands.push(OperandId, "'Target'"); InstructionDesc[enumCast(Op::OpCopyMemory)].operands.push(OperandId, "'Source'"); InstructionDesc[enumCast(Op::OpCopyMemory)].operands.push(OperandMemoryAccess, "", true); InstructionDesc[enumCast(Op::OpCopyMemorySized)].operands.push(OperandId, "'Target'"); InstructionDesc[enumCast(Op::OpCopyMemorySized)].operands.push(OperandId, "'Source'"); InstructionDesc[enumCast(Op::OpCopyMemorySized)].operands.push(OperandId, "'Size'"); InstructionDesc[enumCast(Op::OpCopyMemorySized)].operands.push(OperandMemoryAccess, "", true); InstructionDesc[enumCast(Op::OpSampledImage)].operands.push(OperandId, "'Image'"); InstructionDesc[enumCast(Op::OpSampledImage)].operands.push(OperandId, "'Sampler'"); InstructionDesc[enumCast(Op::OpImage)].operands.push(OperandId, "'Sampled Image'"); InstructionDesc[enumCast(Op::OpImageRead)].operands.push(OperandId, "'Image'"); InstructionDesc[enumCast(Op::OpImageRead)].operands.push(OperandId, "'Coordinate'"); InstructionDesc[enumCast(Op::OpImageRead)].operands.push(OperandImageOperands, "", true); InstructionDesc[enumCast(Op::OpImageRead)].operands.push(OperandVariableIds, "", true); InstructionDesc[enumCast(Op::OpImageWrite)].operands.push(OperandId, "'Image'"); InstructionDesc[enumCast(Op::OpImageWrite)].operands.push(OperandId, "'Coordinate'"); InstructionDesc[enumCast(Op::OpImageWrite)].operands.push(OperandId, "'Texel'"); InstructionDesc[enumCast(Op::OpImageWrite)].operands.push(OperandImageOperands, "", true); InstructionDesc[enumCast(Op::OpImageWrite)].operands.push(OperandVariableIds, "", true); InstructionDesc[enumCast(Op::OpImageSampleImplicitLod)].operands.push(OperandId, "'Sampled Image'"); InstructionDesc[enumCast(Op::OpImageSampleImplicitLod)].operands.push(OperandId, "'Coordinate'"); InstructionDesc[enumCast(Op::OpImageSampleImplicitLod)].operands.push(OperandImageOperands, "", true); InstructionDesc[enumCast(Op::OpImageSampleImplicitLod)].operands.push(OperandVariableIds, "", true); InstructionDesc[enumCast(Op::OpImageSampleExplicitLod)].operands.push(OperandId, "'Sampled Image'"); InstructionDesc[enumCast(Op::OpImageSampleExplicitLod)].operands.push(OperandId, "'Coordinate'"); InstructionDesc[enumCast(Op::OpImageSampleExplicitLod)].operands.push(OperandImageOperands, "", true); InstructionDesc[enumCast(Op::OpImageSampleExplicitLod)].operands.push(OperandVariableIds, "", true); InstructionDesc[enumCast(Op::OpImageSampleDrefImplicitLod)].operands.push(OperandId, "'Sampled Image'"); InstructionDesc[enumCast(Op::OpImageSampleDrefImplicitLod)].operands.push(OperandId, "'Coordinate'"); InstructionDesc[enumCast(Op::OpImageSampleDrefImplicitLod)].operands.push(OperandId, "'D~ref~'"); InstructionDesc[enumCast(Op::OpImageSampleDrefImplicitLod)].operands.push(OperandImageOperands, "", true); InstructionDesc[enumCast(Op::OpImageSampleDrefImplicitLod)].operands.push(OperandVariableIds, "", true); InstructionDesc[enumCast(Op::OpImageSampleDrefExplicitLod)].operands.push(OperandId, "'Sampled Image'"); InstructionDesc[enumCast(Op::OpImageSampleDrefExplicitLod)].operands.push(OperandId, "'Coordinate'"); InstructionDesc[enumCast(Op::OpImageSampleDrefExplicitLod)].operands.push(OperandId, "'D~ref~'"); InstructionDesc[enumCast(Op::OpImageSampleDrefExplicitLod)].operands.push(OperandImageOperands, "", true); InstructionDesc[enumCast(Op::OpImageSampleDrefExplicitLod)].operands.push(OperandVariableIds, "", true); InstructionDesc[enumCast(Op::OpImageSampleProjImplicitLod)].operands.push(OperandId, "'Sampled Image'"); InstructionDesc[enumCast(Op::OpImageSampleProjImplicitLod)].operands.push(OperandId, "'Coordinate'"); InstructionDesc[enumCast(Op::OpImageSampleProjImplicitLod)].operands.push(OperandImageOperands, "", true); InstructionDesc[enumCast(Op::OpImageSampleProjImplicitLod)].operands.push(OperandVariableIds, "", true); InstructionDesc[enumCast(Op::OpImageSampleProjExplicitLod)].operands.push(OperandId, "'Sampled Image'"); InstructionDesc[enumCast(Op::OpImageSampleProjExplicitLod)].operands.push(OperandId, "'Coordinate'"); InstructionDesc[enumCast(Op::OpImageSampleProjExplicitLod)].operands.push(OperandImageOperands, "", true); InstructionDesc[enumCast(Op::OpImageSampleProjExplicitLod)].operands.push(OperandVariableIds, "", true); InstructionDesc[enumCast(Op::OpImageSampleProjDrefImplicitLod)].operands.push(OperandId, "'Sampled Image'"); InstructionDesc[enumCast(Op::OpImageSampleProjDrefImplicitLod)].operands.push(OperandId, "'Coordinate'"); InstructionDesc[enumCast(Op::OpImageSampleProjDrefImplicitLod)].operands.push(OperandId, "'D~ref~'"); InstructionDesc[enumCast(Op::OpImageSampleProjDrefImplicitLod)].operands.push(OperandImageOperands, "", true); InstructionDesc[enumCast(Op::OpImageSampleProjDrefImplicitLod)].operands.push(OperandVariableIds, "", true); InstructionDesc[enumCast(Op::OpImageSampleProjDrefExplicitLod)].operands.push(OperandId, "'Sampled Image'"); InstructionDesc[enumCast(Op::OpImageSampleProjDrefExplicitLod)].operands.push(OperandId, "'Coordinate'"); InstructionDesc[enumCast(Op::OpImageSampleProjDrefExplicitLod)].operands.push(OperandId, "'D~ref~'"); InstructionDesc[enumCast(Op::OpImageSampleProjDrefExplicitLod)].operands.push(OperandImageOperands, "", true); InstructionDesc[enumCast(Op::OpImageSampleProjDrefExplicitLod)].operands.push(OperandVariableIds, "", true); InstructionDesc[enumCast(Op::OpImageFetch)].operands.push(OperandId, "'Image'"); InstructionDesc[enumCast(Op::OpImageFetch)].operands.push(OperandId, "'Coordinate'"); InstructionDesc[enumCast(Op::OpImageFetch)].operands.push(OperandImageOperands, "", true); InstructionDesc[enumCast(Op::OpImageFetch)].operands.push(OperandVariableIds, "", true); InstructionDesc[enumCast(Op::OpImageGather)].operands.push(OperandId, "'Sampled Image'"); InstructionDesc[enumCast(Op::OpImageGather)].operands.push(OperandId, "'Coordinate'"); InstructionDesc[enumCast(Op::OpImageGather)].operands.push(OperandId, "'Component'"); InstructionDesc[enumCast(Op::OpImageGather)].operands.push(OperandImageOperands, "", true); InstructionDesc[enumCast(Op::OpImageGather)].operands.push(OperandVariableIds, "", true); InstructionDesc[enumCast(Op::OpImageDrefGather)].operands.push(OperandId, "'Sampled Image'"); InstructionDesc[enumCast(Op::OpImageDrefGather)].operands.push(OperandId, "'Coordinate'"); InstructionDesc[enumCast(Op::OpImageDrefGather)].operands.push(OperandId, "'D~ref~'"); InstructionDesc[enumCast(Op::OpImageDrefGather)].operands.push(OperandImageOperands, "", true); InstructionDesc[enumCast(Op::OpImageDrefGather)].operands.push(OperandVariableIds, "", true); InstructionDesc[enumCast(Op::OpImageSparseSampleImplicitLod)].operands.push(OperandId, "'Sampled Image'"); InstructionDesc[enumCast(Op::OpImageSparseSampleImplicitLod)].operands.push(OperandId, "'Coordinate'"); InstructionDesc[enumCast(Op::OpImageSparseSampleImplicitLod)].operands.push(OperandImageOperands, "", true); InstructionDesc[enumCast(Op::OpImageSparseSampleImplicitLod)].operands.push(OperandVariableIds, "", true); InstructionDesc[enumCast(Op::OpImageSparseSampleExplicitLod)].operands.push(OperandId, "'Sampled Image'"); InstructionDesc[enumCast(Op::OpImageSparseSampleExplicitLod)].operands.push(OperandId, "'Coordinate'"); InstructionDesc[enumCast(Op::OpImageSparseSampleExplicitLod)].operands.push(OperandImageOperands, "", true); InstructionDesc[enumCast(Op::OpImageSparseSampleExplicitLod)].operands.push(OperandVariableIds, "", true); InstructionDesc[enumCast(Op::OpImageSparseSampleDrefImplicitLod)].operands.push(OperandId, "'Sampled Image'"); InstructionDesc[enumCast(Op::OpImageSparseSampleDrefImplicitLod)].operands.push(OperandId, "'Coordinate'"); InstructionDesc[enumCast(Op::OpImageSparseSampleDrefImplicitLod)].operands.push(OperandId, "'D~ref~'"); InstructionDesc[enumCast(Op::OpImageSparseSampleDrefImplicitLod)].operands.push(OperandImageOperands, "", true); InstructionDesc[enumCast(Op::OpImageSparseSampleDrefImplicitLod)].operands.push(OperandVariableIds, "", true); InstructionDesc[enumCast(Op::OpImageSparseSampleDrefExplicitLod)].operands.push(OperandId, "'Sampled Image'"); InstructionDesc[enumCast(Op::OpImageSparseSampleDrefExplicitLod)].operands.push(OperandId, "'Coordinate'"); InstructionDesc[enumCast(Op::OpImageSparseSampleDrefExplicitLod)].operands.push(OperandId, "'D~ref~'"); InstructionDesc[enumCast(Op::OpImageSparseSampleDrefExplicitLod)].operands.push(OperandImageOperands, "", true); InstructionDesc[enumCast(Op::OpImageSparseSampleDrefExplicitLod)].operands.push(OperandVariableIds, "", true); InstructionDesc[enumCast(Op::OpImageSparseSampleProjImplicitLod)].operands.push(OperandId, "'Sampled Image'"); InstructionDesc[enumCast(Op::OpImageSparseSampleProjImplicitLod)].operands.push(OperandId, "'Coordinate'"); InstructionDesc[enumCast(Op::OpImageSparseSampleProjImplicitLod)].operands.push(OperandImageOperands, "", true); InstructionDesc[enumCast(Op::OpImageSparseSampleProjImplicitLod)].operands.push(OperandVariableIds, "", true); InstructionDesc[enumCast(Op::OpImageSparseSampleProjExplicitLod)].operands.push(OperandId, "'Sampled Image'"); InstructionDesc[enumCast(Op::OpImageSparseSampleProjExplicitLod)].operands.push(OperandId, "'Coordinate'"); InstructionDesc[enumCast(Op::OpImageSparseSampleProjExplicitLod)].operands.push(OperandImageOperands, "", true); InstructionDesc[enumCast(Op::OpImageSparseSampleProjExplicitLod)].operands.push(OperandVariableIds, "", true); InstructionDesc[enumCast(Op::OpImageSparseSampleProjDrefImplicitLod)].operands.push(OperandId, "'Sampled Image'"); InstructionDesc[enumCast(Op::OpImageSparseSampleProjDrefImplicitLod)].operands.push(OperandId, "'Coordinate'"); InstructionDesc[enumCast(Op::OpImageSparseSampleProjDrefImplicitLod)].operands.push(OperandId, "'D~ref~'"); InstructionDesc[enumCast(Op::OpImageSparseSampleProjDrefImplicitLod)].operands.push(OperandImageOperands, "", true); InstructionDesc[enumCast(Op::OpImageSparseSampleProjDrefImplicitLod)].operands.push(OperandVariableIds, "", true); InstructionDesc[enumCast(Op::OpImageSparseSampleProjDrefExplicitLod)].operands.push(OperandId, "'Sampled Image'"); InstructionDesc[enumCast(Op::OpImageSparseSampleProjDrefExplicitLod)].operands.push(OperandId, "'Coordinate'"); InstructionDesc[enumCast(Op::OpImageSparseSampleProjDrefExplicitLod)].operands.push(OperandId, "'D~ref~'"); InstructionDesc[enumCast(Op::OpImageSparseSampleProjDrefExplicitLod)].operands.push(OperandImageOperands, "", true); InstructionDesc[enumCast(Op::OpImageSparseSampleProjDrefExplicitLod)].operands.push(OperandVariableIds, "", true); InstructionDesc[enumCast(Op::OpImageSparseFetch)].operands.push(OperandId, "'Image'"); InstructionDesc[enumCast(Op::OpImageSparseFetch)].operands.push(OperandId, "'Coordinate'"); InstructionDesc[enumCast(Op::OpImageSparseFetch)].operands.push(OperandImageOperands, "", true); InstructionDesc[enumCast(Op::OpImageSparseFetch)].operands.push(OperandVariableIds, "", true); InstructionDesc[enumCast(Op::OpImageSparseGather)].operands.push(OperandId, "'Sampled Image'"); InstructionDesc[enumCast(Op::OpImageSparseGather)].operands.push(OperandId, "'Coordinate'"); InstructionDesc[enumCast(Op::OpImageSparseGather)].operands.push(OperandId, "'Component'"); InstructionDesc[enumCast(Op::OpImageSparseGather)].operands.push(OperandImageOperands, "", true); InstructionDesc[enumCast(Op::OpImageSparseGather)].operands.push(OperandVariableIds, "", true); InstructionDesc[enumCast(Op::OpImageSparseDrefGather)].operands.push(OperandId, "'Sampled Image'"); InstructionDesc[enumCast(Op::OpImageSparseDrefGather)].operands.push(OperandId, "'Coordinate'"); InstructionDesc[enumCast(Op::OpImageSparseDrefGather)].operands.push(OperandId, "'D~ref~'"); InstructionDesc[enumCast(Op::OpImageSparseDrefGather)].operands.push(OperandImageOperands, "", true); InstructionDesc[enumCast(Op::OpImageSparseDrefGather)].operands.push(OperandVariableIds, "", true); InstructionDesc[enumCast(Op::OpImageSparseRead)].operands.push(OperandId, "'Image'"); InstructionDesc[enumCast(Op::OpImageSparseRead)].operands.push(OperandId, "'Coordinate'"); InstructionDesc[enumCast(Op::OpImageSparseRead)].operands.push(OperandImageOperands, "", true); InstructionDesc[enumCast(Op::OpImageSparseRead)].operands.push(OperandVariableIds, "", true); InstructionDesc[enumCast(Op::OpImageSparseTexelsResident)].operands.push(OperandId, "'Resident Code'"); InstructionDesc[enumCast(Op::OpImageQuerySizeLod)].operands.push(OperandId, "'Image'"); InstructionDesc[enumCast(Op::OpImageQuerySizeLod)].operands.push(OperandId, "'Level of Detail'"); InstructionDesc[enumCast(Op::OpImageQuerySize)].operands.push(OperandId, "'Image'"); InstructionDesc[enumCast(Op::OpImageQueryLod)].operands.push(OperandId, "'Image'"); InstructionDesc[enumCast(Op::OpImageQueryLod)].operands.push(OperandId, "'Coordinate'"); InstructionDesc[enumCast(Op::OpImageQueryLevels)].operands.push(OperandId, "'Image'"); InstructionDesc[enumCast(Op::OpImageQuerySamples)].operands.push(OperandId, "'Image'"); InstructionDesc[enumCast(Op::OpImageQueryFormat)].operands.push(OperandId, "'Image'"); InstructionDesc[enumCast(Op::OpImageQueryOrder)].operands.push(OperandId, "'Image'"); InstructionDesc[enumCast(Op::OpAccessChain)].operands.push(OperandId, "'Base'"); InstructionDesc[enumCast(Op::OpAccessChain)].operands.push(OperandVariableIds, "'Indexes'"); InstructionDesc[enumCast(Op::OpInBoundsAccessChain)].operands.push(OperandId, "'Base'"); InstructionDesc[enumCast(Op::OpInBoundsAccessChain)].operands.push(OperandVariableIds, "'Indexes'"); InstructionDesc[enumCast(Op::OpPtrAccessChain)].operands.push(OperandId, "'Base'"); InstructionDesc[enumCast(Op::OpPtrAccessChain)].operands.push(OperandId, "'Element'"); InstructionDesc[enumCast(Op::OpPtrAccessChain)].operands.push(OperandVariableIds, "'Indexes'"); InstructionDesc[enumCast(Op::OpInBoundsPtrAccessChain)].operands.push(OperandId, "'Base'"); InstructionDesc[enumCast(Op::OpInBoundsPtrAccessChain)].operands.push(OperandId, "'Element'"); InstructionDesc[enumCast(Op::OpInBoundsPtrAccessChain)].operands.push(OperandVariableIds, "'Indexes'"); InstructionDesc[enumCast(Op::OpSNegate)].operands.push(OperandId, "'Operand'"); InstructionDesc[enumCast(Op::OpFNegate)].operands.push(OperandId, "'Operand'"); InstructionDesc[enumCast(Op::OpNot)].operands.push(OperandId, "'Operand'"); InstructionDesc[enumCast(Op::OpAny)].operands.push(OperandId, "'Vector'"); InstructionDesc[enumCast(Op::OpAll)].operands.push(OperandId, "'Vector'"); InstructionDesc[enumCast(Op::OpConvertFToU)].operands.push(OperandId, "'Float Value'"); InstructionDesc[enumCast(Op::OpConvertFToS)].operands.push(OperandId, "'Float Value'"); InstructionDesc[enumCast(Op::OpConvertSToF)].operands.push(OperandId, "'Signed Value'"); InstructionDesc[enumCast(Op::OpConvertUToF)].operands.push(OperandId, "'Unsigned Value'"); InstructionDesc[enumCast(Op::OpUConvert)].operands.push(OperandId, "'Unsigned Value'"); InstructionDesc[enumCast(Op::OpSConvert)].operands.push(OperandId, "'Signed Value'"); InstructionDesc[enumCast(Op::OpFConvert)].operands.push(OperandId, "'Float Value'"); InstructionDesc[enumCast(Op::OpSatConvertSToU)].operands.push(OperandId, "'Signed Value'"); InstructionDesc[enumCast(Op::OpSatConvertUToS)].operands.push(OperandId, "'Unsigned Value'"); InstructionDesc[enumCast(Op::OpConvertPtrToU)].operands.push(OperandId, "'Pointer'"); InstructionDesc[enumCast(Op::OpConvertUToPtr)].operands.push(OperandId, "'Integer Value'"); InstructionDesc[enumCast(Op::OpPtrCastToGeneric)].operands.push(OperandId, "'Pointer'"); InstructionDesc[enumCast(Op::OpGenericCastToPtr)].operands.push(OperandId, "'Pointer'"); InstructionDesc[enumCast(Op::OpGenericCastToPtrExplicit)].operands.push(OperandId, "'Pointer'"); InstructionDesc[enumCast(Op::OpGenericCastToPtrExplicit)].operands.push(OperandStorage, "'Storage'"); InstructionDesc[enumCast(Op::OpGenericPtrMemSemantics)].operands.push(OperandId, "'Pointer'"); InstructionDesc[enumCast(Op::OpBitcast)].operands.push(OperandId, "'Operand'"); InstructionDesc[enumCast(Op::OpQuantizeToF16)].operands.push(OperandId, "'Value'"); InstructionDesc[enumCast(Op::OpTranspose)].operands.push(OperandId, "'Matrix'"); InstructionDesc[enumCast(Op::OpCopyLogical)].operands.push(OperandId, "'Operand'"); InstructionDesc[enumCast(Op::OpIsNan)].operands.push(OperandId, "'x'"); InstructionDesc[enumCast(Op::OpIsInf)].operands.push(OperandId, "'x'"); InstructionDesc[enumCast(Op::OpIsFinite)].operands.push(OperandId, "'x'"); InstructionDesc[enumCast(Op::OpIsNormal)].operands.push(OperandId, "'x'"); InstructionDesc[enumCast(Op::OpSignBitSet)].operands.push(OperandId, "'x'"); InstructionDesc[enumCast(Op::OpLessOrGreater)].operands.push(OperandId, "'x'"); InstructionDesc[enumCast(Op::OpLessOrGreater)].operands.push(OperandId, "'y'"); InstructionDesc[enumCast(Op::OpOrdered)].operands.push(OperandId, "'x'"); InstructionDesc[enumCast(Op::OpOrdered)].operands.push(OperandId, "'y'"); InstructionDesc[enumCast(Op::OpUnordered)].operands.push(OperandId, "'x'"); InstructionDesc[enumCast(Op::OpUnordered)].operands.push(OperandId, "'y'"); InstructionDesc[enumCast(Op::OpArrayLength)].operands.push(OperandId, "'Structure'"); InstructionDesc[enumCast(Op::OpArrayLength)].operands.push(OperandLiteralNumber, "'Array member'"); InstructionDesc[enumCast(Op::OpIAdd)].operands.push(OperandId, "'Operand 1'"); InstructionDesc[enumCast(Op::OpIAdd)].operands.push(OperandId, "'Operand 2'"); InstructionDesc[enumCast(Op::OpFAdd)].operands.push(OperandId, "'Operand 1'"); InstructionDesc[enumCast(Op::OpFAdd)].operands.push(OperandId, "'Operand 2'"); InstructionDesc[enumCast(Op::OpISub)].operands.push(OperandId, "'Operand 1'"); InstructionDesc[enumCast(Op::OpISub)].operands.push(OperandId, "'Operand 2'"); InstructionDesc[enumCast(Op::OpFSub)].operands.push(OperandId, "'Operand 1'"); InstructionDesc[enumCast(Op::OpFSub)].operands.push(OperandId, "'Operand 2'"); InstructionDesc[enumCast(Op::OpIMul)].operands.push(OperandId, "'Operand 1'"); InstructionDesc[enumCast(Op::OpIMul)].operands.push(OperandId, "'Operand 2'"); InstructionDesc[enumCast(Op::OpFMul)].operands.push(OperandId, "'Operand 1'"); InstructionDesc[enumCast(Op::OpFMul)].operands.push(OperandId, "'Operand 2'"); InstructionDesc[enumCast(Op::OpUDiv)].operands.push(OperandId, "'Operand 1'"); InstructionDesc[enumCast(Op::OpUDiv)].operands.push(OperandId, "'Operand 2'"); InstructionDesc[enumCast(Op::OpSDiv)].operands.push(OperandId, "'Operand 1'"); InstructionDesc[enumCast(Op::OpSDiv)].operands.push(OperandId, "'Operand 2'"); InstructionDesc[enumCast(Op::OpFDiv)].operands.push(OperandId, "'Operand 1'"); InstructionDesc[enumCast(Op::OpFDiv)].operands.push(OperandId, "'Operand 2'"); InstructionDesc[enumCast(Op::OpUMod)].operands.push(OperandId, "'Operand 1'"); InstructionDesc[enumCast(Op::OpUMod)].operands.push(OperandId, "'Operand 2'"); InstructionDesc[enumCast(Op::OpSRem)].operands.push(OperandId, "'Operand 1'"); InstructionDesc[enumCast(Op::OpSRem)].operands.push(OperandId, "'Operand 2'"); InstructionDesc[enumCast(Op::OpSMod)].operands.push(OperandId, "'Operand 1'"); InstructionDesc[enumCast(Op::OpSMod)].operands.push(OperandId, "'Operand 2'"); InstructionDesc[enumCast(Op::OpFRem)].operands.push(OperandId, "'Operand 1'"); InstructionDesc[enumCast(Op::OpFRem)].operands.push(OperandId, "'Operand 2'"); InstructionDesc[enumCast(Op::OpFMod)].operands.push(OperandId, "'Operand 1'"); InstructionDesc[enumCast(Op::OpFMod)].operands.push(OperandId, "'Operand 2'"); InstructionDesc[enumCast(Op::OpVectorTimesScalar)].operands.push(OperandId, "'Vector'"); InstructionDesc[enumCast(Op::OpVectorTimesScalar)].operands.push(OperandId, "'Scalar'"); InstructionDesc[enumCast(Op::OpMatrixTimesScalar)].operands.push(OperandId, "'Matrix'"); InstructionDesc[enumCast(Op::OpMatrixTimesScalar)].operands.push(OperandId, "'Scalar'"); InstructionDesc[enumCast(Op::OpVectorTimesMatrix)].operands.push(OperandId, "'Vector'"); InstructionDesc[enumCast(Op::OpVectorTimesMatrix)].operands.push(OperandId, "'Matrix'"); InstructionDesc[enumCast(Op::OpMatrixTimesVector)].operands.push(OperandId, "'Matrix'"); InstructionDesc[enumCast(Op::OpMatrixTimesVector)].operands.push(OperandId, "'Vector'"); InstructionDesc[enumCast(Op::OpMatrixTimesMatrix)].operands.push(OperandId, "'LeftMatrix'"); InstructionDesc[enumCast(Op::OpMatrixTimesMatrix)].operands.push(OperandId, "'RightMatrix'"); InstructionDesc[enumCast(Op::OpOuterProduct)].operands.push(OperandId, "'Vector 1'"); InstructionDesc[enumCast(Op::OpOuterProduct)].operands.push(OperandId, "'Vector 2'"); InstructionDesc[enumCast(Op::OpDot)].operands.push(OperandId, "'Vector 1'"); InstructionDesc[enumCast(Op::OpDot)].operands.push(OperandId, "'Vector 2'"); InstructionDesc[enumCast(Op::OpIAddCarry)].operands.push(OperandId, "'Operand 1'"); InstructionDesc[enumCast(Op::OpIAddCarry)].operands.push(OperandId, "'Operand 2'"); InstructionDesc[enumCast(Op::OpISubBorrow)].operands.push(OperandId, "'Operand 1'"); InstructionDesc[enumCast(Op::OpISubBorrow)].operands.push(OperandId, "'Operand 2'"); InstructionDesc[enumCast(Op::OpUMulExtended)].operands.push(OperandId, "'Operand 1'"); InstructionDesc[enumCast(Op::OpUMulExtended)].operands.push(OperandId, "'Operand 2'"); InstructionDesc[enumCast(Op::OpSMulExtended)].operands.push(OperandId, "'Operand 1'"); InstructionDesc[enumCast(Op::OpSMulExtended)].operands.push(OperandId, "'Operand 2'"); InstructionDesc[enumCast(Op::OpShiftRightLogical)].operands.push(OperandId, "'Base'"); InstructionDesc[enumCast(Op::OpShiftRightLogical)].operands.push(OperandId, "'Shift'"); InstructionDesc[enumCast(Op::OpShiftRightArithmetic)].operands.push(OperandId, "'Base'"); InstructionDesc[enumCast(Op::OpShiftRightArithmetic)].operands.push(OperandId, "'Shift'"); InstructionDesc[enumCast(Op::OpShiftLeftLogical)].operands.push(OperandId, "'Base'"); InstructionDesc[enumCast(Op::OpShiftLeftLogical)].operands.push(OperandId, "'Shift'"); InstructionDesc[enumCast(Op::OpLogicalOr)].operands.push(OperandId, "'Operand 1'"); InstructionDesc[enumCast(Op::OpLogicalOr)].operands.push(OperandId, "'Operand 2'"); InstructionDesc[enumCast(Op::OpLogicalAnd)].operands.push(OperandId, "'Operand 1'"); InstructionDesc[enumCast(Op::OpLogicalAnd)].operands.push(OperandId, "'Operand 2'"); InstructionDesc[enumCast(Op::OpLogicalEqual)].operands.push(OperandId, "'Operand 1'"); InstructionDesc[enumCast(Op::OpLogicalEqual)].operands.push(OperandId, "'Operand 2'"); InstructionDesc[enumCast(Op::OpLogicalNotEqual)].operands.push(OperandId, "'Operand 1'"); InstructionDesc[enumCast(Op::OpLogicalNotEqual)].operands.push(OperandId, "'Operand 2'"); InstructionDesc[enumCast(Op::OpLogicalNot)].operands.push(OperandId, "'Operand'"); InstructionDesc[enumCast(Op::OpBitwiseOr)].operands.push(OperandId, "'Operand 1'"); InstructionDesc[enumCast(Op::OpBitwiseOr)].operands.push(OperandId, "'Operand 2'"); InstructionDesc[enumCast(Op::OpBitwiseXor)].operands.push(OperandId, "'Operand 1'"); InstructionDesc[enumCast(Op::OpBitwiseXor)].operands.push(OperandId, "'Operand 2'"); InstructionDesc[enumCast(Op::OpBitwiseAnd)].operands.push(OperandId, "'Operand 1'"); InstructionDesc[enumCast(Op::OpBitwiseAnd)].operands.push(OperandId, "'Operand 2'"); InstructionDesc[enumCast(Op::OpBitFieldInsert)].operands.push(OperandId, "'Base'"); InstructionDesc[enumCast(Op::OpBitFieldInsert)].operands.push(OperandId, "'Insert'"); InstructionDesc[enumCast(Op::OpBitFieldInsert)].operands.push(OperandId, "'Offset'"); InstructionDesc[enumCast(Op::OpBitFieldInsert)].operands.push(OperandId, "'Count'"); InstructionDesc[enumCast(Op::OpBitFieldSExtract)].operands.push(OperandId, "'Base'"); InstructionDesc[enumCast(Op::OpBitFieldSExtract)].operands.push(OperandId, "'Offset'"); InstructionDesc[enumCast(Op::OpBitFieldSExtract)].operands.push(OperandId, "'Count'"); InstructionDesc[enumCast(Op::OpBitFieldUExtract)].operands.push(OperandId, "'Base'"); InstructionDesc[enumCast(Op::OpBitFieldUExtract)].operands.push(OperandId, "'Offset'"); InstructionDesc[enumCast(Op::OpBitFieldUExtract)].operands.push(OperandId, "'Count'"); InstructionDesc[enumCast(Op::OpBitReverse)].operands.push(OperandId, "'Base'"); InstructionDesc[enumCast(Op::OpBitCount)].operands.push(OperandId, "'Base'"); InstructionDesc[enumCast(Op::OpSelect)].operands.push(OperandId, "'Condition'"); InstructionDesc[enumCast(Op::OpSelect)].operands.push(OperandId, "'Object 1'"); InstructionDesc[enumCast(Op::OpSelect)].operands.push(OperandId, "'Object 2'"); InstructionDesc[enumCast(Op::OpIEqual)].operands.push(OperandId, "'Operand 1'"); InstructionDesc[enumCast(Op::OpIEqual)].operands.push(OperandId, "'Operand 2'"); InstructionDesc[enumCast(Op::OpFOrdEqual)].operands.push(OperandId, "'Operand 1'"); InstructionDesc[enumCast(Op::OpFOrdEqual)].operands.push(OperandId, "'Operand 2'"); InstructionDesc[enumCast(Op::OpFUnordEqual)].operands.push(OperandId, "'Operand 1'"); InstructionDesc[enumCast(Op::OpFUnordEqual)].operands.push(OperandId, "'Operand 2'"); InstructionDesc[enumCast(Op::OpINotEqual)].operands.push(OperandId, "'Operand 1'"); InstructionDesc[enumCast(Op::OpINotEqual)].operands.push(OperandId, "'Operand 2'"); InstructionDesc[enumCast(Op::OpFOrdNotEqual)].operands.push(OperandId, "'Operand 1'"); InstructionDesc[enumCast(Op::OpFOrdNotEqual)].operands.push(OperandId, "'Operand 2'"); InstructionDesc[enumCast(Op::OpFUnordNotEqual)].operands.push(OperandId, "'Operand 1'"); InstructionDesc[enumCast(Op::OpFUnordNotEqual)].operands.push(OperandId, "'Operand 2'"); InstructionDesc[enumCast(Op::OpULessThan)].operands.push(OperandId, "'Operand 1'"); InstructionDesc[enumCast(Op::OpULessThan)].operands.push(OperandId, "'Operand 2'"); InstructionDesc[enumCast(Op::OpSLessThan)].operands.push(OperandId, "'Operand 1'"); InstructionDesc[enumCast(Op::OpSLessThan)].operands.push(OperandId, "'Operand 2'"); InstructionDesc[enumCast(Op::OpFOrdLessThan)].operands.push(OperandId, "'Operand 1'"); InstructionDesc[enumCast(Op::OpFOrdLessThan)].operands.push(OperandId, "'Operand 2'"); InstructionDesc[enumCast(Op::OpFUnordLessThan)].operands.push(OperandId, "'Operand 1'"); InstructionDesc[enumCast(Op::OpFUnordLessThan)].operands.push(OperandId, "'Operand 2'"); InstructionDesc[enumCast(Op::OpUGreaterThan)].operands.push(OperandId, "'Operand 1'"); InstructionDesc[enumCast(Op::OpUGreaterThan)].operands.push(OperandId, "'Operand 2'"); InstructionDesc[enumCast(Op::OpSGreaterThan)].operands.push(OperandId, "'Operand 1'"); InstructionDesc[enumCast(Op::OpSGreaterThan)].operands.push(OperandId, "'Operand 2'"); InstructionDesc[enumCast(Op::OpFOrdGreaterThan)].operands.push(OperandId, "'Operand 1'"); InstructionDesc[enumCast(Op::OpFOrdGreaterThan)].operands.push(OperandId, "'Operand 2'"); InstructionDesc[enumCast(Op::OpFUnordGreaterThan)].operands.push(OperandId, "'Operand 1'"); InstructionDesc[enumCast(Op::OpFUnordGreaterThan)].operands.push(OperandId, "'Operand 2'"); InstructionDesc[enumCast(Op::OpULessThanEqual)].operands.push(OperandId, "'Operand 1'"); InstructionDesc[enumCast(Op::OpULessThanEqual)].operands.push(OperandId, "'Operand 2'"); InstructionDesc[enumCast(Op::OpSLessThanEqual)].operands.push(OperandId, "'Operand 1'"); InstructionDesc[enumCast(Op::OpSLessThanEqual)].operands.push(OperandId, "'Operand 2'"); InstructionDesc[enumCast(Op::OpFOrdLessThanEqual)].operands.push(OperandId, "'Operand 1'"); InstructionDesc[enumCast(Op::OpFOrdLessThanEqual)].operands.push(OperandId, "'Operand 2'"); InstructionDesc[enumCast(Op::OpFUnordLessThanEqual)].operands.push(OperandId, "'Operand 1'"); InstructionDesc[enumCast(Op::OpFUnordLessThanEqual)].operands.push(OperandId, "'Operand 2'"); InstructionDesc[enumCast(Op::OpUGreaterThanEqual)].operands.push(OperandId, "'Operand 1'"); InstructionDesc[enumCast(Op::OpUGreaterThanEqual)].operands.push(OperandId, "'Operand 2'"); InstructionDesc[enumCast(Op::OpSGreaterThanEqual)].operands.push(OperandId, "'Operand 1'"); InstructionDesc[enumCast(Op::OpSGreaterThanEqual)].operands.push(OperandId, "'Operand 2'"); InstructionDesc[enumCast(Op::OpFOrdGreaterThanEqual)].operands.push(OperandId, "'Operand 1'"); InstructionDesc[enumCast(Op::OpFOrdGreaterThanEqual)].operands.push(OperandId, "'Operand 2'"); InstructionDesc[enumCast(Op::OpFUnordGreaterThanEqual)].operands.push(OperandId, "'Operand 1'"); InstructionDesc[enumCast(Op::OpFUnordGreaterThanEqual)].operands.push(OperandId, "'Operand 2'"); InstructionDesc[enumCast(Op::OpDPdx)].operands.push(OperandId, "'P'"); InstructionDesc[enumCast(Op::OpDPdy)].operands.push(OperandId, "'P'"); InstructionDesc[enumCast(Op::OpFwidth)].operands.push(OperandId, "'P'"); InstructionDesc[enumCast(Op::OpDPdxFine)].operands.push(OperandId, "'P'"); InstructionDesc[enumCast(Op::OpDPdyFine)].operands.push(OperandId, "'P'"); InstructionDesc[enumCast(Op::OpFwidthFine)].operands.push(OperandId, "'P'"); InstructionDesc[enumCast(Op::OpDPdxCoarse)].operands.push(OperandId, "'P'"); InstructionDesc[enumCast(Op::OpDPdyCoarse)].operands.push(OperandId, "'P'"); InstructionDesc[enumCast(Op::OpFwidthCoarse)].operands.push(OperandId, "'P'"); InstructionDesc[enumCast(Op::OpEmitStreamVertex)].operands.push(OperandId, "'Stream'"); InstructionDesc[enumCast(Op::OpEndStreamPrimitive)].operands.push(OperandId, "'Stream'"); InstructionDesc[enumCast(Op::OpControlBarrier)].operands.push(OperandScope, "'Execution'"); InstructionDesc[enumCast(Op::OpControlBarrier)].operands.push(OperandScope, "'Memory'"); InstructionDesc[enumCast(Op::OpControlBarrier)].operands.push(OperandMemorySemantics, "'Semantics'"); InstructionDesc[enumCast(Op::OpMemoryBarrier)].operands.push(OperandScope, "'Memory'"); InstructionDesc[enumCast(Op::OpMemoryBarrier)].operands.push(OperandMemorySemantics, "'Semantics'"); InstructionDesc[enumCast(Op::OpImageTexelPointer)].operands.push(OperandId, "'Image'"); InstructionDesc[enumCast(Op::OpImageTexelPointer)].operands.push(OperandId, "'Coordinate'"); InstructionDesc[enumCast(Op::OpImageTexelPointer)].operands.push(OperandId, "'Sample'"); InstructionDesc[enumCast(Op::OpAtomicLoad)].operands.push(OperandId, "'Pointer'"); InstructionDesc[enumCast(Op::OpAtomicLoad)].operands.push(OperandScope, "'Scope'"); InstructionDesc[enumCast(Op::OpAtomicLoad)].operands.push(OperandMemorySemantics, "'Semantics'"); InstructionDesc[enumCast(Op::OpAtomicStore)].operands.push(OperandId, "'Pointer'"); InstructionDesc[enumCast(Op::OpAtomicStore)].operands.push(OperandScope, "'Scope'"); InstructionDesc[enumCast(Op::OpAtomicStore)].operands.push(OperandMemorySemantics, "'Semantics'"); InstructionDesc[enumCast(Op::OpAtomicStore)].operands.push(OperandId, "'Value'"); InstructionDesc[enumCast(Op::OpAtomicExchange)].operands.push(OperandId, "'Pointer'"); InstructionDesc[enumCast(Op::OpAtomicExchange)].operands.push(OperandScope, "'Scope'"); InstructionDesc[enumCast(Op::OpAtomicExchange)].operands.push(OperandMemorySemantics, "'Semantics'"); InstructionDesc[enumCast(Op::OpAtomicExchange)].operands.push(OperandId, "'Value'"); InstructionDesc[enumCast(Op::OpAtomicCompareExchange)].operands.push(OperandId, "'Pointer'"); InstructionDesc[enumCast(Op::OpAtomicCompareExchange)].operands.push(OperandScope, "'Scope'"); InstructionDesc[enumCast(Op::OpAtomicCompareExchange)].operands.push(OperandMemorySemantics, "'Equal'"); InstructionDesc[enumCast(Op::OpAtomicCompareExchange)].operands.push(OperandMemorySemantics, "'Unequal'"); InstructionDesc[enumCast(Op::OpAtomicCompareExchange)].operands.push(OperandId, "'Value'"); InstructionDesc[enumCast(Op::OpAtomicCompareExchange)].operands.push(OperandId, "'Comparator'"); InstructionDesc[enumCast(Op::OpAtomicCompareExchangeWeak)].operands.push(OperandId, "'Pointer'"); InstructionDesc[enumCast(Op::OpAtomicCompareExchangeWeak)].operands.push(OperandScope, "'Scope'"); InstructionDesc[enumCast(Op::OpAtomicCompareExchangeWeak)].operands.push(OperandMemorySemantics, "'Equal'"); InstructionDesc[enumCast(Op::OpAtomicCompareExchangeWeak)].operands.push(OperandMemorySemantics, "'Unequal'"); InstructionDesc[enumCast(Op::OpAtomicCompareExchangeWeak)].operands.push(OperandId, "'Value'"); InstructionDesc[enumCast(Op::OpAtomicCompareExchangeWeak)].operands.push(OperandId, "'Comparator'"); InstructionDesc[enumCast(Op::OpAtomicIIncrement)].operands.push(OperandId, "'Pointer'"); InstructionDesc[enumCast(Op::OpAtomicIIncrement)].operands.push(OperandScope, "'Scope'"); InstructionDesc[enumCast(Op::OpAtomicIIncrement)].operands.push(OperandMemorySemantics, "'Semantics'"); InstructionDesc[enumCast(Op::OpAtomicIDecrement)].operands.push(OperandId, "'Pointer'"); InstructionDesc[enumCast(Op::OpAtomicIDecrement)].operands.push(OperandScope, "'Scope'"); InstructionDesc[enumCast(Op::OpAtomicIDecrement)].operands.push(OperandMemorySemantics, "'Semantics'"); InstructionDesc[enumCast(Op::OpAtomicIAdd)].operands.push(OperandId, "'Pointer'"); InstructionDesc[enumCast(Op::OpAtomicIAdd)].operands.push(OperandScope, "'Scope'"); InstructionDesc[enumCast(Op::OpAtomicIAdd)].operands.push(OperandMemorySemantics, "'Semantics'"); InstructionDesc[enumCast(Op::OpAtomicIAdd)].operands.push(OperandId, "'Value'"); InstructionDesc[enumCast(Op::OpAtomicFAddEXT)].operands.push(OperandId, "'Pointer'"); InstructionDesc[enumCast(Op::OpAtomicFAddEXT)].operands.push(OperandScope, "'Scope'"); InstructionDesc[enumCast(Op::OpAtomicFAddEXT)].operands.push(OperandMemorySemantics, "'Semantics'"); InstructionDesc[enumCast(Op::OpAtomicFAddEXT)].operands.push(OperandId, "'Value'"); InstructionDesc[enumCast(Op::OpAssumeTrueKHR)].operands.push(OperandId, "'Condition'"); InstructionDesc[enumCast(Op::OpExpectKHR)].operands.push(OperandId, "'Value'"); InstructionDesc[enumCast(Op::OpExpectKHR)].operands.push(OperandId, "'ExpectedValue'"); InstructionDesc[enumCast(Op::OpAtomicISub)].operands.push(OperandId, "'Pointer'"); InstructionDesc[enumCast(Op::OpAtomicISub)].operands.push(OperandScope, "'Scope'"); InstructionDesc[enumCast(Op::OpAtomicISub)].operands.push(OperandMemorySemantics, "'Semantics'"); InstructionDesc[enumCast(Op::OpAtomicISub)].operands.push(OperandId, "'Value'"); InstructionDesc[enumCast(Op::OpAtomicUMin)].operands.push(OperandId, "'Pointer'"); InstructionDesc[enumCast(Op::OpAtomicUMin)].operands.push(OperandScope, "'Scope'"); InstructionDesc[enumCast(Op::OpAtomicUMin)].operands.push(OperandMemorySemantics, "'Semantics'"); InstructionDesc[enumCast(Op::OpAtomicUMin)].operands.push(OperandId, "'Value'"); InstructionDesc[enumCast(Op::OpAtomicUMax)].operands.push(OperandId, "'Pointer'"); InstructionDesc[enumCast(Op::OpAtomicUMax)].operands.push(OperandScope, "'Scope'"); InstructionDesc[enumCast(Op::OpAtomicUMax)].operands.push(OperandMemorySemantics, "'Semantics'"); InstructionDesc[enumCast(Op::OpAtomicUMax)].operands.push(OperandId, "'Value'"); InstructionDesc[enumCast(Op::OpAtomicSMin)].operands.push(OperandId, "'Pointer'"); InstructionDesc[enumCast(Op::OpAtomicSMin)].operands.push(OperandScope, "'Scope'"); InstructionDesc[enumCast(Op::OpAtomicSMin)].operands.push(OperandMemorySemantics, "'Semantics'"); InstructionDesc[enumCast(Op::OpAtomicSMin)].operands.push(OperandId, "'Value'"); InstructionDesc[enumCast(Op::OpAtomicSMax)].operands.push(OperandId, "'Pointer'"); InstructionDesc[enumCast(Op::OpAtomicSMax)].operands.push(OperandScope, "'Scope'"); InstructionDesc[enumCast(Op::OpAtomicSMax)].operands.push(OperandMemorySemantics, "'Semantics'"); InstructionDesc[enumCast(Op::OpAtomicSMax)].operands.push(OperandId, "'Value'"); InstructionDesc[enumCast(Op::OpAtomicFMinEXT)].operands.push(OperandId, "'Pointer'"); InstructionDesc[enumCast(Op::OpAtomicFMinEXT)].operands.push(OperandScope, "'Scope'"); InstructionDesc[enumCast(Op::OpAtomicFMinEXT)].operands.push(OperandMemorySemantics, "'Semantics'"); InstructionDesc[enumCast(Op::OpAtomicFMinEXT)].operands.push(OperandId, "'Value'"); InstructionDesc[enumCast(Op::OpAtomicFMaxEXT)].operands.push(OperandId, "'Pointer'"); InstructionDesc[enumCast(Op::OpAtomicFMaxEXT)].operands.push(OperandScope, "'Scope'"); InstructionDesc[enumCast(Op::OpAtomicFMaxEXT)].operands.push(OperandMemorySemantics, "'Semantics'"); InstructionDesc[enumCast(Op::OpAtomicFMaxEXT)].operands.push(OperandId, "'Value'"); InstructionDesc[enumCast(Op::OpAtomicAnd)].operands.push(OperandId, "'Pointer'"); InstructionDesc[enumCast(Op::OpAtomicAnd)].operands.push(OperandScope, "'Scope'"); InstructionDesc[enumCast(Op::OpAtomicAnd)].operands.push(OperandMemorySemantics, "'Semantics'"); InstructionDesc[enumCast(Op::OpAtomicAnd)].operands.push(OperandId, "'Value'"); InstructionDesc[enumCast(Op::OpAtomicOr)].operands.push(OperandId, "'Pointer'"); InstructionDesc[enumCast(Op::OpAtomicOr)].operands.push(OperandScope, "'Scope'"); InstructionDesc[enumCast(Op::OpAtomicOr)].operands.push(OperandMemorySemantics, "'Semantics'"); InstructionDesc[enumCast(Op::OpAtomicOr)].operands.push(OperandId, "'Value'"); InstructionDesc[enumCast(Op::OpAtomicXor)].operands.push(OperandId, "'Pointer'"); InstructionDesc[enumCast(Op::OpAtomicXor)].operands.push(OperandScope, "'Scope'"); InstructionDesc[enumCast(Op::OpAtomicXor)].operands.push(OperandMemorySemantics, "'Semantics'"); InstructionDesc[enumCast(Op::OpAtomicXor)].operands.push(OperandId, "'Value'"); InstructionDesc[enumCast(Op::OpAtomicFlagTestAndSet)].operands.push(OperandId, "'Pointer'"); InstructionDesc[enumCast(Op::OpAtomicFlagTestAndSet)].operands.push(OperandScope, "'Scope'"); InstructionDesc[enumCast(Op::OpAtomicFlagTestAndSet)].operands.push(OperandMemorySemantics, "'Semantics'"); InstructionDesc[enumCast(Op::OpAtomicFlagClear)].operands.push(OperandId, "'Pointer'"); InstructionDesc[enumCast(Op::OpAtomicFlagClear)].operands.push(OperandScope, "'Scope'"); InstructionDesc[enumCast(Op::OpAtomicFlagClear)].operands.push(OperandMemorySemantics, "'Semantics'"); InstructionDesc[enumCast(Op::OpLoopMerge)].operands.push(OperandId, "'Merge Block'"); InstructionDesc[enumCast(Op::OpLoopMerge)].operands.push(OperandId, "'Continue Target'"); InstructionDesc[enumCast(Op::OpLoopMerge)].operands.push(OperandLoop, ""); InstructionDesc[enumCast(Op::OpLoopMerge)].operands.push(OperandOptionalLiteral, ""); InstructionDesc[enumCast(Op::OpSelectionMerge)].operands.push(OperandId, "'Merge Block'"); InstructionDesc[enumCast(Op::OpSelectionMerge)].operands.push(OperandSelect, ""); InstructionDesc[enumCast(Op::OpBranch)].operands.push(OperandId, "'Target Label'"); InstructionDesc[enumCast(Op::OpBranchConditional)].operands.push(OperandId, "'Condition'"); InstructionDesc[enumCast(Op::OpBranchConditional)].operands.push(OperandId, "'True Label'"); InstructionDesc[enumCast(Op::OpBranchConditional)].operands.push(OperandId, "'False Label'"); InstructionDesc[enumCast(Op::OpBranchConditional)].operands.push(OperandVariableLiterals, "'Branch weights'"); InstructionDesc[enumCast(Op::OpSwitch)].operands.push(OperandId, "'Selector'"); InstructionDesc[enumCast(Op::OpSwitch)].operands.push(OperandId, "'Default'"); InstructionDesc[enumCast(Op::OpSwitch)].operands.push(OperandVariableLiteralId, "'Target'"); InstructionDesc[enumCast(Op::OpReturnValue)].operands.push(OperandId, "'Value'"); InstructionDesc[enumCast(Op::OpLifetimeStart)].operands.push(OperandId, "'Pointer'"); InstructionDesc[enumCast(Op::OpLifetimeStart)].operands.push(OperandLiteralNumber, "'Size'"); InstructionDesc[enumCast(Op::OpLifetimeStop)].operands.push(OperandId, "'Pointer'"); InstructionDesc[enumCast(Op::OpLifetimeStop)].operands.push(OperandLiteralNumber, "'Size'"); InstructionDesc[enumCast(Op::OpGroupAsyncCopy)].operands.push(OperandScope, "'Execution'"); InstructionDesc[enumCast(Op::OpGroupAsyncCopy)].operands.push(OperandId, "'Destination'"); InstructionDesc[enumCast(Op::OpGroupAsyncCopy)].operands.push(OperandId, "'Source'"); InstructionDesc[enumCast(Op::OpGroupAsyncCopy)].operands.push(OperandId, "'Num Elements'"); InstructionDesc[enumCast(Op::OpGroupAsyncCopy)].operands.push(OperandId, "'Stride'"); InstructionDesc[enumCast(Op::OpGroupAsyncCopy)].operands.push(OperandId, "'Event'"); InstructionDesc[enumCast(Op::OpGroupWaitEvents)].operands.push(OperandScope, "'Execution'"); InstructionDesc[enumCast(Op::OpGroupWaitEvents)].operands.push(OperandId, "'Num Events'"); InstructionDesc[enumCast(Op::OpGroupWaitEvents)].operands.push(OperandId, "'Events List'"); InstructionDesc[enumCast(Op::OpGroupAll)].operands.push(OperandScope, "'Execution'"); InstructionDesc[enumCast(Op::OpGroupAll)].operands.push(OperandId, "'Predicate'"); InstructionDesc[enumCast(Op::OpGroupAny)].operands.push(OperandScope, "'Execution'"); InstructionDesc[enumCast(Op::OpGroupAny)].operands.push(OperandId, "'Predicate'"); InstructionDesc[enumCast(Op::OpGroupBroadcast)].operands.push(OperandScope, "'Execution'"); InstructionDesc[enumCast(Op::OpGroupBroadcast)].operands.push(OperandId, "'Value'"); InstructionDesc[enumCast(Op::OpGroupBroadcast)].operands.push(OperandId, "'LocalId'"); InstructionDesc[enumCast(Op::OpGroupIAdd)].operands.push(OperandScope, "'Execution'"); InstructionDesc[enumCast(Op::OpGroupIAdd)].operands.push(OperandGroupOperation, "'Operation'"); InstructionDesc[enumCast(Op::OpGroupIAdd)].operands.push(OperandId, "'X'"); InstructionDesc[enumCast(Op::OpGroupFAdd)].operands.push(OperandScope, "'Execution'"); InstructionDesc[enumCast(Op::OpGroupFAdd)].operands.push(OperandGroupOperation, "'Operation'"); InstructionDesc[enumCast(Op::OpGroupFAdd)].operands.push(OperandId, "'X'"); InstructionDesc[enumCast(Op::OpGroupUMin)].operands.push(OperandScope, "'Execution'"); InstructionDesc[enumCast(Op::OpGroupUMin)].operands.push(OperandGroupOperation, "'Operation'"); InstructionDesc[enumCast(Op::OpGroupUMin)].operands.push(OperandId, "'X'"); InstructionDesc[enumCast(Op::OpGroupSMin)].operands.push(OperandScope, "'Execution'"); InstructionDesc[enumCast(Op::OpGroupSMin)].operands.push(OperandGroupOperation, "'Operation'"); InstructionDesc[enumCast(Op::OpGroupSMin)].operands.push(OperandId, "X"); InstructionDesc[enumCast(Op::OpGroupFMin)].operands.push(OperandScope, "'Execution'"); InstructionDesc[enumCast(Op::OpGroupFMin)].operands.push(OperandGroupOperation, "'Operation'"); InstructionDesc[enumCast(Op::OpGroupFMin)].operands.push(OperandId, "X"); InstructionDesc[enumCast(Op::OpGroupUMax)].operands.push(OperandScope, "'Execution'"); InstructionDesc[enumCast(Op::OpGroupUMax)].operands.push(OperandGroupOperation, "'Operation'"); InstructionDesc[enumCast(Op::OpGroupUMax)].operands.push(OperandId, "X"); InstructionDesc[enumCast(Op::OpGroupSMax)].operands.push(OperandScope, "'Execution'"); InstructionDesc[enumCast(Op::OpGroupSMax)].operands.push(OperandGroupOperation, "'Operation'"); InstructionDesc[enumCast(Op::OpGroupSMax)].operands.push(OperandId, "X"); InstructionDesc[enumCast(Op::OpGroupFMax)].operands.push(OperandScope, "'Execution'"); InstructionDesc[enumCast(Op::OpGroupFMax)].operands.push(OperandGroupOperation, "'Operation'"); InstructionDesc[enumCast(Op::OpGroupFMax)].operands.push(OperandId, "X"); InstructionDesc[enumCast(Op::OpReadPipe)].operands.push(OperandId, "'Pipe'"); InstructionDesc[enumCast(Op::OpReadPipe)].operands.push(OperandId, "'Pointer'"); InstructionDesc[enumCast(Op::OpReadPipe)].operands.push(OperandId, "'Packet Size'"); InstructionDesc[enumCast(Op::OpReadPipe)].operands.push(OperandId, "'Packet Alignment'"); InstructionDesc[enumCast(Op::OpWritePipe)].operands.push(OperandId, "'Pipe'"); InstructionDesc[enumCast(Op::OpWritePipe)].operands.push(OperandId, "'Pointer'"); InstructionDesc[enumCast(Op::OpWritePipe)].operands.push(OperandId, "'Packet Size'"); InstructionDesc[enumCast(Op::OpWritePipe)].operands.push(OperandId, "'Packet Alignment'"); InstructionDesc[enumCast(Op::OpReservedReadPipe)].operands.push(OperandId, "'Pipe'"); InstructionDesc[enumCast(Op::OpReservedReadPipe)].operands.push(OperandId, "'Reserve Id'"); InstructionDesc[enumCast(Op::OpReservedReadPipe)].operands.push(OperandId, "'Index'"); InstructionDesc[enumCast(Op::OpReservedReadPipe)].operands.push(OperandId, "'Pointer'"); InstructionDesc[enumCast(Op::OpReservedReadPipe)].operands.push(OperandId, "'Packet Size'"); InstructionDesc[enumCast(Op::OpReservedReadPipe)].operands.push(OperandId, "'Packet Alignment'"); InstructionDesc[enumCast(Op::OpReservedWritePipe)].operands.push(OperandId, "'Pipe'"); InstructionDesc[enumCast(Op::OpReservedWritePipe)].operands.push(OperandId, "'Reserve Id'"); InstructionDesc[enumCast(Op::OpReservedWritePipe)].operands.push(OperandId, "'Index'"); InstructionDesc[enumCast(Op::OpReservedWritePipe)].operands.push(OperandId, "'Pointer'"); InstructionDesc[enumCast(Op::OpReservedWritePipe)].operands.push(OperandId, "'Packet Size'"); InstructionDesc[enumCast(Op::OpReservedWritePipe)].operands.push(OperandId, "'Packet Alignment'"); InstructionDesc[enumCast(Op::OpReserveReadPipePackets)].operands.push(OperandId, "'Pipe'"); InstructionDesc[enumCast(Op::OpReserveReadPipePackets)].operands.push(OperandId, "'Num Packets'"); InstructionDesc[enumCast(Op::OpReserveReadPipePackets)].operands.push(OperandId, "'Packet Size'"); InstructionDesc[enumCast(Op::OpReserveReadPipePackets)].operands.push(OperandId, "'Packet Alignment'"); InstructionDesc[enumCast(Op::OpReserveWritePipePackets)].operands.push(OperandId, "'Pipe'"); InstructionDesc[enumCast(Op::OpReserveWritePipePackets)].operands.push(OperandId, "'Num Packets'"); InstructionDesc[enumCast(Op::OpReserveWritePipePackets)].operands.push(OperandId, "'Packet Size'"); InstructionDesc[enumCast(Op::OpReserveWritePipePackets)].operands.push(OperandId, "'Packet Alignment'"); InstructionDesc[enumCast(Op::OpCommitReadPipe)].operands.push(OperandId, "'Pipe'"); InstructionDesc[enumCast(Op::OpCommitReadPipe)].operands.push(OperandId, "'Reserve Id'"); InstructionDesc[enumCast(Op::OpCommitReadPipe)].operands.push(OperandId, "'Packet Size'"); InstructionDesc[enumCast(Op::OpCommitReadPipe)].operands.push(OperandId, "'Packet Alignment'"); InstructionDesc[enumCast(Op::OpCommitWritePipe)].operands.push(OperandId, "'Pipe'"); InstructionDesc[enumCast(Op::OpCommitWritePipe)].operands.push(OperandId, "'Reserve Id'"); InstructionDesc[enumCast(Op::OpCommitWritePipe)].operands.push(OperandId, "'Packet Size'"); InstructionDesc[enumCast(Op::OpCommitWritePipe)].operands.push(OperandId, "'Packet Alignment'"); InstructionDesc[enumCast(Op::OpIsValidReserveId)].operands.push(OperandId, "'Reserve Id'"); InstructionDesc[enumCast(Op::OpGetNumPipePackets)].operands.push(OperandId, "'Pipe'"); InstructionDesc[enumCast(Op::OpGetNumPipePackets)].operands.push(OperandId, "'Packet Size'"); InstructionDesc[enumCast(Op::OpGetNumPipePackets)].operands.push(OperandId, "'Packet Alignment'"); InstructionDesc[enumCast(Op::OpGetMaxPipePackets)].operands.push(OperandId, "'Pipe'"); InstructionDesc[enumCast(Op::OpGetMaxPipePackets)].operands.push(OperandId, "'Packet Size'"); InstructionDesc[enumCast(Op::OpGetMaxPipePackets)].operands.push(OperandId, "'Packet Alignment'"); InstructionDesc[enumCast(Op::OpGroupReserveReadPipePackets)].operands.push(OperandScope, "'Execution'"); InstructionDesc[enumCast(Op::OpGroupReserveReadPipePackets)].operands.push(OperandId, "'Pipe'"); InstructionDesc[enumCast(Op::OpGroupReserveReadPipePackets)].operands.push(OperandId, "'Num Packets'"); InstructionDesc[enumCast(Op::OpGroupReserveReadPipePackets)].operands.push(OperandId, "'Packet Size'"); InstructionDesc[enumCast(Op::OpGroupReserveReadPipePackets)].operands.push(OperandId, "'Packet Alignment'"); InstructionDesc[enumCast(Op::OpGroupReserveWritePipePackets)].operands.push(OperandScope, "'Execution'"); InstructionDesc[enumCast(Op::OpGroupReserveWritePipePackets)].operands.push(OperandId, "'Pipe'"); InstructionDesc[enumCast(Op::OpGroupReserveWritePipePackets)].operands.push(OperandId, "'Num Packets'"); InstructionDesc[enumCast(Op::OpGroupReserveWritePipePackets)].operands.push(OperandId, "'Packet Size'"); InstructionDesc[enumCast(Op::OpGroupReserveWritePipePackets)].operands.push(OperandId, "'Packet Alignment'"); InstructionDesc[enumCast(Op::OpGroupCommitReadPipe)].operands.push(OperandScope, "'Execution'"); InstructionDesc[enumCast(Op::OpGroupCommitReadPipe)].operands.push(OperandId, "'Pipe'"); InstructionDesc[enumCast(Op::OpGroupCommitReadPipe)].operands.push(OperandId, "'Reserve Id'"); InstructionDesc[enumCast(Op::OpGroupCommitReadPipe)].operands.push(OperandId, "'Packet Size'"); InstructionDesc[enumCast(Op::OpGroupCommitReadPipe)].operands.push(OperandId, "'Packet Alignment'"); InstructionDesc[enumCast(Op::OpGroupCommitWritePipe)].operands.push(OperandScope, "'Execution'"); InstructionDesc[enumCast(Op::OpGroupCommitWritePipe)].operands.push(OperandId, "'Pipe'"); InstructionDesc[enumCast(Op::OpGroupCommitWritePipe)].operands.push(OperandId, "'Reserve Id'"); InstructionDesc[enumCast(Op::OpGroupCommitWritePipe)].operands.push(OperandId, "'Packet Size'"); InstructionDesc[enumCast(Op::OpGroupCommitWritePipe)].operands.push(OperandId, "'Packet Alignment'"); InstructionDesc[enumCast(Op::OpBuildNDRange)].operands.push(OperandId, "'GlobalWorkSize'"); InstructionDesc[enumCast(Op::OpBuildNDRange)].operands.push(OperandId, "'LocalWorkSize'"); InstructionDesc[enumCast(Op::OpBuildNDRange)].operands.push(OperandId, "'GlobalWorkOffset'"); InstructionDesc[enumCast(Op::OpCaptureEventProfilingInfo)].operands.push(OperandId, "'Event'"); InstructionDesc[enumCast(Op::OpCaptureEventProfilingInfo)].operands.push(OperandId, "'Profiling Info'"); InstructionDesc[enumCast(Op::OpCaptureEventProfilingInfo)].operands.push(OperandId, "'Value'"); InstructionDesc[enumCast(Op::OpSetUserEventStatus)].operands.push(OperandId, "'Event'"); InstructionDesc[enumCast(Op::OpSetUserEventStatus)].operands.push(OperandId, "'Status'"); InstructionDesc[enumCast(Op::OpIsValidEvent)].operands.push(OperandId, "'Event'"); InstructionDesc[enumCast(Op::OpRetainEvent)].operands.push(OperandId, "'Event'"); InstructionDesc[enumCast(Op::OpReleaseEvent)].operands.push(OperandId, "'Event'"); InstructionDesc[enumCast(Op::OpGetKernelWorkGroupSize)].operands.push(OperandId, "'Invoke'"); InstructionDesc[enumCast(Op::OpGetKernelWorkGroupSize)].operands.push(OperandId, "'Param'"); InstructionDesc[enumCast(Op::OpGetKernelWorkGroupSize)].operands.push(OperandId, "'Param Size'"); InstructionDesc[enumCast(Op::OpGetKernelWorkGroupSize)].operands.push(OperandId, "'Param Align'"); InstructionDesc[enumCast(Op::OpGetKernelPreferredWorkGroupSizeMultiple)].operands.push(OperandId, "'Invoke'"); InstructionDesc[enumCast(Op::OpGetKernelPreferredWorkGroupSizeMultiple)].operands.push(OperandId, "'Param'"); InstructionDesc[enumCast(Op::OpGetKernelPreferredWorkGroupSizeMultiple)].operands.push(OperandId, "'Param Size'"); InstructionDesc[enumCast(Op::OpGetKernelPreferredWorkGroupSizeMultiple)].operands.push(OperandId, "'Param Align'"); InstructionDesc[enumCast(Op::OpGetKernelNDrangeSubGroupCount)].operands.push(OperandId, "'ND Range'"); InstructionDesc[enumCast(Op::OpGetKernelNDrangeSubGroupCount)].operands.push(OperandId, "'Invoke'"); InstructionDesc[enumCast(Op::OpGetKernelNDrangeSubGroupCount)].operands.push(OperandId, "'Param'"); InstructionDesc[enumCast(Op::OpGetKernelNDrangeSubGroupCount)].operands.push(OperandId, "'Param Size'"); InstructionDesc[enumCast(Op::OpGetKernelNDrangeSubGroupCount)].operands.push(OperandId, "'Param Align'"); InstructionDesc[enumCast(Op::OpGetKernelNDrangeMaxSubGroupSize)].operands.push(OperandId, "'ND Range'"); InstructionDesc[enumCast(Op::OpGetKernelNDrangeMaxSubGroupSize)].operands.push(OperandId, "'Invoke'"); InstructionDesc[enumCast(Op::OpGetKernelNDrangeMaxSubGroupSize)].operands.push(OperandId, "'Param'"); InstructionDesc[enumCast(Op::OpGetKernelNDrangeMaxSubGroupSize)].operands.push(OperandId, "'Param Size'"); InstructionDesc[enumCast(Op::OpGetKernelNDrangeMaxSubGroupSize)].operands.push(OperandId, "'Param Align'"); InstructionDesc[enumCast(Op::OpEnqueueKernel)].operands.push(OperandId, "'Queue'"); InstructionDesc[enumCast(Op::OpEnqueueKernel)].operands.push(OperandId, "'Flags'"); InstructionDesc[enumCast(Op::OpEnqueueKernel)].operands.push(OperandId, "'ND Range'"); InstructionDesc[enumCast(Op::OpEnqueueKernel)].operands.push(OperandId, "'Num Events'"); InstructionDesc[enumCast(Op::OpEnqueueKernel)].operands.push(OperandId, "'Wait Events'"); InstructionDesc[enumCast(Op::OpEnqueueKernel)].operands.push(OperandId, "'Ret Event'"); InstructionDesc[enumCast(Op::OpEnqueueKernel)].operands.push(OperandId, "'Invoke'"); InstructionDesc[enumCast(Op::OpEnqueueKernel)].operands.push(OperandId, "'Param'"); InstructionDesc[enumCast(Op::OpEnqueueKernel)].operands.push(OperandId, "'Param Size'"); InstructionDesc[enumCast(Op::OpEnqueueKernel)].operands.push(OperandId, "'Param Align'"); InstructionDesc[enumCast(Op::OpEnqueueKernel)].operands.push(OperandVariableIds, "'Local Size'"); InstructionDesc[enumCast(Op::OpEnqueueMarker)].operands.push(OperandId, "'Queue'"); InstructionDesc[enumCast(Op::OpEnqueueMarker)].operands.push(OperandId, "'Num Events'"); InstructionDesc[enumCast(Op::OpEnqueueMarker)].operands.push(OperandId, "'Wait Events'"); InstructionDesc[enumCast(Op::OpEnqueueMarker)].operands.push(OperandId, "'Ret Event'"); InstructionDesc[enumCast(Op::OpGroupNonUniformElect)].operands.push(OperandScope, "'Execution'"); InstructionDesc[enumCast(Op::OpGroupNonUniformAll)].operands.push(OperandScope, "'Execution'"); InstructionDesc[enumCast(Op::OpGroupNonUniformAll)].operands.push(OperandId, "X"); InstructionDesc[enumCast(Op::OpGroupNonUniformAny)].operands.push(OperandScope, "'Execution'"); InstructionDesc[enumCast(Op::OpGroupNonUniformAny)].operands.push(OperandId, "X"); InstructionDesc[enumCast(Op::OpGroupNonUniformAllEqual)].operands.push(OperandScope, "'Execution'"); InstructionDesc[enumCast(Op::OpGroupNonUniformAllEqual)].operands.push(OperandId, "X"); InstructionDesc[enumCast(Op::OpGroupNonUniformBroadcast)].operands.push(OperandScope, "'Execution'"); InstructionDesc[enumCast(Op::OpGroupNonUniformBroadcast)].operands.push(OperandId, "X"); InstructionDesc[enumCast(Op::OpGroupNonUniformBroadcast)].operands.push(OperandId, "ID"); InstructionDesc[enumCast(Op::OpGroupNonUniformBroadcastFirst)].operands.push(OperandScope, "'Execution'"); InstructionDesc[enumCast(Op::OpGroupNonUniformBroadcastFirst)].operands.push(OperandId, "X"); InstructionDesc[enumCast(Op::OpGroupNonUniformBallot)].operands.push(OperandScope, "'Execution'"); InstructionDesc[enumCast(Op::OpGroupNonUniformBallot)].operands.push(OperandId, "X"); InstructionDesc[enumCast(Op::OpGroupNonUniformInverseBallot)].operands.push(OperandScope, "'Execution'"); InstructionDesc[enumCast(Op::OpGroupNonUniformInverseBallot)].operands.push(OperandId, "X"); InstructionDesc[enumCast(Op::OpGroupNonUniformBallotBitExtract)].operands.push(OperandScope, "'Execution'"); InstructionDesc[enumCast(Op::OpGroupNonUniformBallotBitExtract)].operands.push(OperandId, "X"); InstructionDesc[enumCast(Op::OpGroupNonUniformBallotBitExtract)].operands.push(OperandId, "Bit"); InstructionDesc[enumCast(Op::OpGroupNonUniformBallotBitCount)].operands.push(OperandScope, "'Execution'"); InstructionDesc[enumCast(Op::OpGroupNonUniformBallotBitCount)].operands.push(OperandGroupOperation, "'Operation'"); InstructionDesc[enumCast(Op::OpGroupNonUniformBallotBitCount)].operands.push(OperandId, "X"); InstructionDesc[enumCast(Op::OpGroupNonUniformBallotFindLSB)].operands.push(OperandScope, "'Execution'"); InstructionDesc[enumCast(Op::OpGroupNonUniformBallotFindLSB)].operands.push(OperandId, "X"); InstructionDesc[enumCast(Op::OpGroupNonUniformBallotFindMSB)].operands.push(OperandScope, "'Execution'"); InstructionDesc[enumCast(Op::OpGroupNonUniformBallotFindMSB)].operands.push(OperandId, "X"); InstructionDesc[enumCast(Op::OpGroupNonUniformShuffle)].operands.push(OperandScope, "'Execution'"); InstructionDesc[enumCast(Op::OpGroupNonUniformShuffle)].operands.push(OperandId, "X"); InstructionDesc[enumCast(Op::OpGroupNonUniformShuffle)].operands.push(OperandId, "'Id'"); InstructionDesc[enumCast(Op::OpGroupNonUniformShuffleXor)].operands.push(OperandScope, "'Execution'"); InstructionDesc[enumCast(Op::OpGroupNonUniformShuffleXor)].operands.push(OperandId, "X"); InstructionDesc[enumCast(Op::OpGroupNonUniformShuffleXor)].operands.push(OperandId, "Mask"); InstructionDesc[enumCast(Op::OpGroupNonUniformShuffleUp)].operands.push(OperandScope, "'Execution'"); InstructionDesc[enumCast(Op::OpGroupNonUniformShuffleUp)].operands.push(OperandId, "X"); InstructionDesc[enumCast(Op::OpGroupNonUniformShuffleUp)].operands.push(OperandId, "Offset"); InstructionDesc[enumCast(Op::OpGroupNonUniformShuffleDown)].operands.push(OperandScope, "'Execution'"); InstructionDesc[enumCast(Op::OpGroupNonUniformShuffleDown)].operands.push(OperandId, "X"); InstructionDesc[enumCast(Op::OpGroupNonUniformShuffleDown)].operands.push(OperandId, "Offset"); InstructionDesc[enumCast(Op::OpGroupNonUniformIAdd)].operands.push(OperandScope, "'Execution'"); InstructionDesc[enumCast(Op::OpGroupNonUniformIAdd)].operands.push(OperandGroupOperation, "'Operation'"); InstructionDesc[enumCast(Op::OpGroupNonUniformIAdd)].operands.push(OperandId, "X"); InstructionDesc[enumCast(Op::OpGroupNonUniformIAdd)].operands.push(OperandId, "'ClusterSize'", true); InstructionDesc[enumCast(Op::OpGroupNonUniformFAdd)].operands.push(OperandScope, "'Execution'"); InstructionDesc[enumCast(Op::OpGroupNonUniformFAdd)].operands.push(OperandGroupOperation, "'Operation'"); InstructionDesc[enumCast(Op::OpGroupNonUniformFAdd)].operands.push(OperandId, "X"); InstructionDesc[enumCast(Op::OpGroupNonUniformFAdd)].operands.push(OperandId, "'ClusterSize'", true); InstructionDesc[enumCast(Op::OpGroupNonUniformIMul)].operands.push(OperandScope, "'Execution'"); InstructionDesc[enumCast(Op::OpGroupNonUniformIMul)].operands.push(OperandGroupOperation, "'Operation'"); InstructionDesc[enumCast(Op::OpGroupNonUniformIMul)].operands.push(OperandId, "X"); InstructionDesc[enumCast(Op::OpGroupNonUniformIMul)].operands.push(OperandId, "'ClusterSize'", true); InstructionDesc[enumCast(Op::OpGroupNonUniformFMul)].operands.push(OperandScope, "'Execution'"); InstructionDesc[enumCast(Op::OpGroupNonUniformFMul)].operands.push(OperandGroupOperation, "'Operation'"); InstructionDesc[enumCast(Op::OpGroupNonUniformFMul)].operands.push(OperandId, "X"); InstructionDesc[enumCast(Op::OpGroupNonUniformFMul)].operands.push(OperandId, "'ClusterSize'", true); InstructionDesc[enumCast(Op::OpGroupNonUniformSMin)].operands.push(OperandScope, "'Execution'"); InstructionDesc[enumCast(Op::OpGroupNonUniformSMin)].operands.push(OperandGroupOperation, "'Operation'"); InstructionDesc[enumCast(Op::OpGroupNonUniformSMin)].operands.push(OperandId, "X"); InstructionDesc[enumCast(Op::OpGroupNonUniformSMin)].operands.push(OperandId, "'ClusterSize'", true); InstructionDesc[enumCast(Op::OpGroupNonUniformUMin)].operands.push(OperandScope, "'Execution'"); InstructionDesc[enumCast(Op::OpGroupNonUniformUMin)].operands.push(OperandGroupOperation, "'Operation'"); InstructionDesc[enumCast(Op::OpGroupNonUniformUMin)].operands.push(OperandId, "X"); InstructionDesc[enumCast(Op::OpGroupNonUniformUMin)].operands.push(OperandId, "'ClusterSize'", true); InstructionDesc[enumCast(Op::OpGroupNonUniformFMin)].operands.push(OperandScope, "'Execution'"); InstructionDesc[enumCast(Op::OpGroupNonUniformFMin)].operands.push(OperandGroupOperation, "'Operation'"); InstructionDesc[enumCast(Op::OpGroupNonUniformFMin)].operands.push(OperandId, "X"); InstructionDesc[enumCast(Op::OpGroupNonUniformFMin)].operands.push(OperandId, "'ClusterSize'", true); InstructionDesc[enumCast(Op::OpGroupNonUniformSMax)].operands.push(OperandScope, "'Execution'"); InstructionDesc[enumCast(Op::OpGroupNonUniformSMax)].operands.push(OperandGroupOperation, "'Operation'"); InstructionDesc[enumCast(Op::OpGroupNonUniformSMax)].operands.push(OperandId, "X"); InstructionDesc[enumCast(Op::OpGroupNonUniformSMax)].operands.push(OperandId, "'ClusterSize'", true); InstructionDesc[enumCast(Op::OpGroupNonUniformUMax)].operands.push(OperandScope, "'Execution'"); InstructionDesc[enumCast(Op::OpGroupNonUniformUMax)].operands.push(OperandGroupOperation, "'Operation'"); InstructionDesc[enumCast(Op::OpGroupNonUniformUMax)].operands.push(OperandId, "X"); InstructionDesc[enumCast(Op::OpGroupNonUniformUMax)].operands.push(OperandId, "'ClusterSize'", true); InstructionDesc[enumCast(Op::OpGroupNonUniformFMax)].operands.push(OperandScope, "'Execution'"); InstructionDesc[enumCast(Op::OpGroupNonUniformFMax)].operands.push(OperandGroupOperation, "'Operation'"); InstructionDesc[enumCast(Op::OpGroupNonUniformFMax)].operands.push(OperandId, "X"); InstructionDesc[enumCast(Op::OpGroupNonUniformFMax)].operands.push(OperandId, "'ClusterSize'", true); InstructionDesc[enumCast(Op::OpGroupNonUniformBitwiseAnd)].operands.push(OperandScope, "'Execution'"); InstructionDesc[enumCast(Op::OpGroupNonUniformBitwiseAnd)].operands.push(OperandGroupOperation, "'Operation'"); InstructionDesc[enumCast(Op::OpGroupNonUniformBitwiseAnd)].operands.push(OperandId, "X"); InstructionDesc[enumCast(Op::OpGroupNonUniformBitwiseAnd)].operands.push(OperandId, "'ClusterSize'", true); InstructionDesc[enumCast(Op::OpGroupNonUniformBitwiseOr)].operands.push(OperandScope, "'Execution'"); InstructionDesc[enumCast(Op::OpGroupNonUniformBitwiseOr)].operands.push(OperandGroupOperation, "'Operation'"); InstructionDesc[enumCast(Op::OpGroupNonUniformBitwiseOr)].operands.push(OperandId, "X"); InstructionDesc[enumCast(Op::OpGroupNonUniformBitwiseOr)].operands.push(OperandId, "'ClusterSize'", true); InstructionDesc[enumCast(Op::OpGroupNonUniformBitwiseXor)].operands.push(OperandScope, "'Execution'"); InstructionDesc[enumCast(Op::OpGroupNonUniformBitwiseXor)].operands.push(OperandGroupOperation, "'Operation'"); InstructionDesc[enumCast(Op::OpGroupNonUniformBitwiseXor)].operands.push(OperandId, "X"); InstructionDesc[enumCast(Op::OpGroupNonUniformBitwiseXor)].operands.push(OperandId, "'ClusterSize'", true); InstructionDesc[enumCast(Op::OpGroupNonUniformLogicalAnd)].operands.push(OperandScope, "'Execution'"); InstructionDesc[enumCast(Op::OpGroupNonUniformLogicalAnd)].operands.push(OperandGroupOperation, "'Operation'"); InstructionDesc[enumCast(Op::OpGroupNonUniformLogicalAnd)].operands.push(OperandId, "X"); InstructionDesc[enumCast(Op::OpGroupNonUniformLogicalAnd)].operands.push(OperandId, "'ClusterSize'", true); InstructionDesc[enumCast(Op::OpGroupNonUniformLogicalOr)].operands.push(OperandScope, "'Execution'"); InstructionDesc[enumCast(Op::OpGroupNonUniformLogicalOr)].operands.push(OperandGroupOperation, "'Operation'"); InstructionDesc[enumCast(Op::OpGroupNonUniformLogicalOr)].operands.push(OperandId, "X"); InstructionDesc[enumCast(Op::OpGroupNonUniformLogicalOr)].operands.push(OperandId, "'ClusterSize'", true); InstructionDesc[enumCast(Op::OpGroupNonUniformLogicalXor)].operands.push(OperandScope, "'Execution'"); InstructionDesc[enumCast(Op::OpGroupNonUniformLogicalXor)].operands.push(OperandGroupOperation, "'Operation'"); InstructionDesc[enumCast(Op::OpGroupNonUniformLogicalXor)].operands.push(OperandId, "X"); InstructionDesc[enumCast(Op::OpGroupNonUniformLogicalXor)].operands.push(OperandId, "'ClusterSize'", true); InstructionDesc[enumCast(Op::OpGroupNonUniformQuadBroadcast)].operands.push(OperandScope, "'Execution'"); InstructionDesc[enumCast(Op::OpGroupNonUniformQuadBroadcast)].operands.push(OperandId, "X"); InstructionDesc[enumCast(Op::OpGroupNonUniformQuadBroadcast)].operands.push(OperandId, "'Id'"); InstructionDesc[enumCast(Op::OpGroupNonUniformQuadSwap)].operands.push(OperandScope, "'Execution'"); InstructionDesc[enumCast(Op::OpGroupNonUniformQuadSwap)].operands.push(OperandId, "X"); InstructionDesc[enumCast(Op::OpGroupNonUniformQuadSwap)].operands.push(OperandId, "'Direction'"); InstructionDesc[enumCast(Op::OpSubgroupBallotKHR)].operands.push(OperandId, "'Predicate'"); InstructionDesc[enumCast(Op::OpSubgroupFirstInvocationKHR)].operands.push(OperandId, "'Value'"); InstructionDesc[enumCast(Op::OpSubgroupAnyKHR)].operands.push(OperandScope, "'Execution'"); InstructionDesc[enumCast(Op::OpSubgroupAnyKHR)].operands.push(OperandId, "'Predicate'"); InstructionDesc[enumCast(Op::OpSubgroupAllKHR)].operands.push(OperandScope, "'Execution'"); InstructionDesc[enumCast(Op::OpSubgroupAllKHR)].operands.push(OperandId, "'Predicate'"); InstructionDesc[enumCast(Op::OpSubgroupAllEqualKHR)].operands.push(OperandScope, "'Execution'"); InstructionDesc[enumCast(Op::OpSubgroupAllEqualKHR)].operands.push(OperandId, "'Predicate'"); InstructionDesc[enumCast(Op::OpGroupNonUniformRotateKHR)].operands.push(OperandScope, "'Execution'"); InstructionDesc[enumCast(Op::OpGroupNonUniformRotateKHR)].operands.push(OperandId, "'X'"); InstructionDesc[enumCast(Op::OpGroupNonUniformRotateKHR)].operands.push(OperandId, "'Delta'"); InstructionDesc[enumCast(Op::OpGroupNonUniformRotateKHR)].operands.push(OperandId, "'ClusterSize'", true); InstructionDesc[enumCast(Op::OpSubgroupReadInvocationKHR)].operands.push(OperandId, "'Value'"); InstructionDesc[enumCast(Op::OpSubgroupReadInvocationKHR)].operands.push(OperandId, "'Index'"); InstructionDesc[enumCast(Op::OpModuleProcessed)].operands.push(OperandLiteralString, "'process'"); InstructionDesc[enumCast(Op::OpGroupIAddNonUniformAMD)].operands.push(OperandScope, "'Execution'"); InstructionDesc[enumCast(Op::OpGroupIAddNonUniformAMD)].operands.push(OperandGroupOperation, "'Operation'"); InstructionDesc[enumCast(Op::OpGroupIAddNonUniformAMD)].operands.push(OperandId, "'X'"); InstructionDesc[enumCast(Op::OpGroupFAddNonUniformAMD)].operands.push(OperandScope, "'Execution'"); InstructionDesc[enumCast(Op::OpGroupFAddNonUniformAMD)].operands.push(OperandGroupOperation, "'Operation'"); InstructionDesc[enumCast(Op::OpGroupFAddNonUniformAMD)].operands.push(OperandId, "'X'"); InstructionDesc[enumCast(Op::OpGroupUMinNonUniformAMD)].operands.push(OperandScope, "'Execution'"); InstructionDesc[enumCast(Op::OpGroupUMinNonUniformAMD)].operands.push(OperandGroupOperation, "'Operation'"); InstructionDesc[enumCast(Op::OpGroupUMinNonUniformAMD)].operands.push(OperandId, "'X'"); InstructionDesc[enumCast(Op::OpGroupSMinNonUniformAMD)].operands.push(OperandScope, "'Execution'"); InstructionDesc[enumCast(Op::OpGroupSMinNonUniformAMD)].operands.push(OperandGroupOperation, "'Operation'"); InstructionDesc[enumCast(Op::OpGroupSMinNonUniformAMD)].operands.push(OperandId, "X"); InstructionDesc[enumCast(Op::OpGroupFMinNonUniformAMD)].operands.push(OperandScope, "'Execution'"); InstructionDesc[enumCast(Op::OpGroupFMinNonUniformAMD)].operands.push(OperandGroupOperation, "'Operation'"); InstructionDesc[enumCast(Op::OpGroupFMinNonUniformAMD)].operands.push(OperandId, "X"); InstructionDesc[enumCast(Op::OpGroupUMaxNonUniformAMD)].operands.push(OperandScope, "'Execution'"); InstructionDesc[enumCast(Op::OpGroupUMaxNonUniformAMD)].operands.push(OperandGroupOperation, "'Operation'"); InstructionDesc[enumCast(Op::OpGroupUMaxNonUniformAMD)].operands.push(OperandId, "X"); InstructionDesc[enumCast(Op::OpGroupSMaxNonUniformAMD)].operands.push(OperandScope, "'Execution'"); InstructionDesc[enumCast(Op::OpGroupSMaxNonUniformAMD)].operands.push(OperandGroupOperation, "'Operation'"); InstructionDesc[enumCast(Op::OpGroupSMaxNonUniformAMD)].operands.push(OperandId, "X"); InstructionDesc[enumCast(Op::OpGroupFMaxNonUniformAMD)].operands.push(OperandScope, "'Execution'"); InstructionDesc[enumCast(Op::OpGroupFMaxNonUniformAMD)].operands.push(OperandGroupOperation, "'Operation'"); InstructionDesc[enumCast(Op::OpGroupFMaxNonUniformAMD)].operands.push(OperandId, "X"); InstructionDesc[enumCast(Op::OpFragmentMaskFetchAMD)].operands.push(OperandId, "'Image'"); InstructionDesc[enumCast(Op::OpFragmentMaskFetchAMD)].operands.push(OperandId, "'Coordinate'"); InstructionDesc[enumCast(Op::OpFragmentFetchAMD)].operands.push(OperandId, "'Image'"); InstructionDesc[enumCast(Op::OpFragmentFetchAMD)].operands.push(OperandId, "'Coordinate'"); InstructionDesc[enumCast(Op::OpFragmentFetchAMD)].operands.push(OperandId, "'Fragment Index'"); InstructionDesc[enumCast(Op::OpGroupNonUniformPartitionNV)].operands.push(OperandId, "X"); InstructionDesc[enumCast(Op::OpGroupNonUniformQuadAllKHR)].operands.push(OperandId, "'Predicate'"); InstructionDesc[enumCast(Op::OpGroupNonUniformQuadAnyKHR)].operands.push(OperandId, "'Predicate'"); InstructionDesc[enumCast(Op::OpTypeAccelerationStructureKHR)].setResultAndType(true, false); InstructionDesc[enumCast(Op::OpTraceNV)].operands.push(OperandId, "'Acceleration Structure'"); InstructionDesc[enumCast(Op::OpTraceNV)].operands.push(OperandId, "'Ray Flags'"); InstructionDesc[enumCast(Op::OpTraceNV)].operands.push(OperandId, "'Cull Mask'"); InstructionDesc[enumCast(Op::OpTraceNV)].operands.push(OperandId, "'SBT Record Offset'"); InstructionDesc[enumCast(Op::OpTraceNV)].operands.push(OperandId, "'SBT Record Stride'"); InstructionDesc[enumCast(Op::OpTraceNV)].operands.push(OperandId, "'Miss Index'"); InstructionDesc[enumCast(Op::OpTraceNV)].operands.push(OperandId, "'Ray Origin'"); InstructionDesc[enumCast(Op::OpTraceNV)].operands.push(OperandId, "'TMin'"); InstructionDesc[enumCast(Op::OpTraceNV)].operands.push(OperandId, "'Ray Direction'"); InstructionDesc[enumCast(Op::OpTraceNV)].operands.push(OperandId, "'TMax'"); InstructionDesc[enumCast(Op::OpTraceNV)].operands.push(OperandId, "'Payload'"); InstructionDesc[enumCast(Op::OpTraceNV)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpTraceRayMotionNV)].operands.push(OperandId, "'Acceleration Structure'"); InstructionDesc[enumCast(Op::OpTraceRayMotionNV)].operands.push(OperandId, "'Ray Flags'"); InstructionDesc[enumCast(Op::OpTraceRayMotionNV)].operands.push(OperandId, "'Cull Mask'"); InstructionDesc[enumCast(Op::OpTraceRayMotionNV)].operands.push(OperandId, "'SBT Record Offset'"); InstructionDesc[enumCast(Op::OpTraceRayMotionNV)].operands.push(OperandId, "'SBT Record Stride'"); InstructionDesc[enumCast(Op::OpTraceRayMotionNV)].operands.push(OperandId, "'Miss Index'"); InstructionDesc[enumCast(Op::OpTraceRayMotionNV)].operands.push(OperandId, "'Ray Origin'"); InstructionDesc[enumCast(Op::OpTraceRayMotionNV)].operands.push(OperandId, "'TMin'"); InstructionDesc[enumCast(Op::OpTraceRayMotionNV)].operands.push(OperandId, "'Ray Direction'"); InstructionDesc[enumCast(Op::OpTraceRayMotionNV)].operands.push(OperandId, "'TMax'"); InstructionDesc[enumCast(Op::OpTraceRayMotionNV)].operands.push(OperandId, "'Time'"); InstructionDesc[enumCast(Op::OpTraceRayMotionNV)].operands.push(OperandId, "'Payload'"); InstructionDesc[enumCast(Op::OpTraceRayMotionNV)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpTraceRayKHR)].operands.push(OperandId, "'Acceleration Structure'"); InstructionDesc[enumCast(Op::OpTraceRayKHR)].operands.push(OperandId, "'Ray Flags'"); InstructionDesc[enumCast(Op::OpTraceRayKHR)].operands.push(OperandId, "'Cull Mask'"); InstructionDesc[enumCast(Op::OpTraceRayKHR)].operands.push(OperandId, "'SBT Record Offset'"); InstructionDesc[enumCast(Op::OpTraceRayKHR)].operands.push(OperandId, "'SBT Record Stride'"); InstructionDesc[enumCast(Op::OpTraceRayKHR)].operands.push(OperandId, "'Miss Index'"); InstructionDesc[enumCast(Op::OpTraceRayKHR)].operands.push(OperandId, "'Ray Origin'"); InstructionDesc[enumCast(Op::OpTraceRayKHR)].operands.push(OperandId, "'TMin'"); InstructionDesc[enumCast(Op::OpTraceRayKHR)].operands.push(OperandId, "'Ray Direction'"); InstructionDesc[enumCast(Op::OpTraceRayKHR)].operands.push(OperandId, "'TMax'"); InstructionDesc[enumCast(Op::OpTraceRayKHR)].operands.push(OperandId, "'Payload'"); InstructionDesc[enumCast(Op::OpTraceRayKHR)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpReportIntersectionKHR)].operands.push(OperandId, "'Hit Parameter'"); InstructionDesc[enumCast(Op::OpReportIntersectionKHR)].operands.push(OperandId, "'Hit Kind'"); InstructionDesc[enumCast(Op::OpIgnoreIntersectionNV)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpIgnoreIntersectionKHR)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpTerminateRayNV)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpTerminateRayKHR)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpExecuteCallableNV)].operands.push(OperandId, "SBT Record Index"); InstructionDesc[enumCast(Op::OpExecuteCallableNV)].operands.push(OperandId, "CallableData ID"); InstructionDesc[enumCast(Op::OpExecuteCallableNV)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpExecuteCallableKHR)].operands.push(OperandId, "SBT Record Index"); InstructionDesc[enumCast(Op::OpExecuteCallableKHR)].operands.push(OperandId, "CallableData"); InstructionDesc[enumCast(Op::OpExecuteCallableKHR)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpConvertUToAccelerationStructureKHR)].operands.push(OperandId, "Value"); InstructionDesc[enumCast(Op::OpConvertUToAccelerationStructureKHR)].setResultAndType(true, true); // Ray Query InstructionDesc[enumCast(Op::OpTypeAccelerationStructureKHR)].setResultAndType(true, false); InstructionDesc[enumCast(Op::OpTypeRayQueryKHR)].setResultAndType(true, false); InstructionDesc[enumCast(Op::OpRayQueryInitializeKHR)].operands.push(OperandId, "'RayQuery'"); InstructionDesc[enumCast(Op::OpRayQueryInitializeKHR)].operands.push(OperandId, "'AccelerationS'"); InstructionDesc[enumCast(Op::OpRayQueryInitializeKHR)].operands.push(OperandId, "'RayFlags'"); InstructionDesc[enumCast(Op::OpRayQueryInitializeKHR)].operands.push(OperandId, "'CullMask'"); InstructionDesc[enumCast(Op::OpRayQueryInitializeKHR)].operands.push(OperandId, "'Origin'"); InstructionDesc[enumCast(Op::OpRayQueryInitializeKHR)].operands.push(OperandId, "'Tmin'"); InstructionDesc[enumCast(Op::OpRayQueryInitializeKHR)].operands.push(OperandId, "'Direction'"); InstructionDesc[enumCast(Op::OpRayQueryInitializeKHR)].operands.push(OperandId, "'Tmax'"); InstructionDesc[enumCast(Op::OpRayQueryInitializeKHR)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpRayQueryTerminateKHR)].operands.push(OperandId, "'RayQuery'"); InstructionDesc[enumCast(Op::OpRayQueryTerminateKHR)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpRayQueryGenerateIntersectionKHR)].operands.push(OperandId, "'RayQuery'"); InstructionDesc[enumCast(Op::OpRayQueryGenerateIntersectionKHR)].operands.push(OperandId, "'THit'"); InstructionDesc[enumCast(Op::OpRayQueryGenerateIntersectionKHR)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpRayQueryConfirmIntersectionKHR)].operands.push(OperandId, "'RayQuery'"); InstructionDesc[enumCast(Op::OpRayQueryConfirmIntersectionKHR)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpRayQueryProceedKHR)].operands.push(OperandId, "'RayQuery'"); InstructionDesc[enumCast(Op::OpRayQueryProceedKHR)].setResultAndType(true, true); InstructionDesc[enumCast(Op::OpRayQueryGetIntersectionTypeKHR)].operands.push(OperandId, "'RayQuery'"); InstructionDesc[enumCast(Op::OpRayQueryGetIntersectionTypeKHR)].operands.push(OperandId, "'Committed'"); InstructionDesc[enumCast(Op::OpRayQueryGetIntersectionTypeKHR)].setResultAndType(true, true); InstructionDesc[enumCast(Op::OpRayQueryGetRayTMinKHR)].operands.push(OperandId, "'RayQuery'"); InstructionDesc[enumCast(Op::OpRayQueryGetRayTMinKHR)].setResultAndType(true, true); InstructionDesc[enumCast(Op::OpRayQueryGetRayFlagsKHR)].operands.push(OperandId, "'RayQuery'"); InstructionDesc[enumCast(Op::OpRayQueryGetRayFlagsKHR)].setResultAndType(true, true); InstructionDesc[enumCast(Op::OpRayQueryGetIntersectionTKHR)].operands.push(OperandId, "'RayQuery'"); InstructionDesc[enumCast(Op::OpRayQueryGetIntersectionTKHR)].operands.push(OperandId, "'Committed'"); InstructionDesc[enumCast(Op::OpRayQueryGetIntersectionTKHR)].setResultAndType(true, true); InstructionDesc[enumCast(Op::OpRayQueryGetIntersectionInstanceCustomIndexKHR)].operands.push(OperandId, "'RayQuery'"); InstructionDesc[enumCast(Op::OpRayQueryGetIntersectionInstanceCustomIndexKHR)].operands.push(OperandId, "'Committed'"); InstructionDesc[enumCast(Op::OpRayQueryGetIntersectionInstanceCustomIndexKHR)].setResultAndType(true, true); InstructionDesc[enumCast(Op::OpRayQueryGetIntersectionInstanceIdKHR)].operands.push(OperandId, "'RayQuery'"); InstructionDesc[enumCast(Op::OpRayQueryGetIntersectionInstanceIdKHR)].operands.push(OperandId, "'Committed'"); InstructionDesc[enumCast(Op::OpRayQueryGetIntersectionInstanceIdKHR)].setResultAndType(true, true); InstructionDesc[enumCast(Op::OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR)].operands.push(OperandId, "'RayQuery'"); InstructionDesc[enumCast(Op::OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR)].operands.push(OperandId, "'Committed'"); InstructionDesc[enumCast(Op::OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR)].setResultAndType(true, true); InstructionDesc[enumCast(Op::OpRayQueryGetIntersectionGeometryIndexKHR)].operands.push(OperandId, "'RayQuery'"); InstructionDesc[enumCast(Op::OpRayQueryGetIntersectionGeometryIndexKHR)].operands.push(OperandId, "'Committed'"); InstructionDesc[enumCast(Op::OpRayQueryGetIntersectionGeometryIndexKHR)].setResultAndType(true, true); InstructionDesc[enumCast(Op::OpRayQueryGetIntersectionPrimitiveIndexKHR)].operands.push(OperandId, "'RayQuery'"); InstructionDesc[enumCast(Op::OpRayQueryGetIntersectionPrimitiveIndexKHR)].operands.push(OperandId, "'Committed'"); InstructionDesc[enumCast(Op::OpRayQueryGetIntersectionPrimitiveIndexKHR)].setResultAndType(true, true); InstructionDesc[enumCast(Op::OpRayQueryGetIntersectionBarycentricsKHR)].operands.push(OperandId, "'RayQuery'"); InstructionDesc[enumCast(Op::OpRayQueryGetIntersectionBarycentricsKHR)].operands.push(OperandId, "'Committed'"); InstructionDesc[enumCast(Op::OpRayQueryGetIntersectionBarycentricsKHR)].setResultAndType(true, true); InstructionDesc[enumCast(Op::OpRayQueryGetIntersectionFrontFaceKHR)].operands.push(OperandId, "'RayQuery'"); InstructionDesc[enumCast(Op::OpRayQueryGetIntersectionFrontFaceKHR)].operands.push(OperandId, "'Committed'"); InstructionDesc[enumCast(Op::OpRayQueryGetIntersectionFrontFaceKHR)].setResultAndType(true, true); InstructionDesc[enumCast(Op::OpRayQueryGetIntersectionCandidateAABBOpaqueKHR)].operands.push(OperandId, "'RayQuery'"); InstructionDesc[enumCast(Op::OpRayQueryGetIntersectionCandidateAABBOpaqueKHR)].setResultAndType(true, true); InstructionDesc[enumCast(Op::OpRayQueryGetIntersectionObjectRayDirectionKHR)].operands.push(OperandId, "'RayQuery'"); InstructionDesc[enumCast(Op::OpRayQueryGetIntersectionObjectRayDirectionKHR)].operands.push(OperandId, "'Committed'"); InstructionDesc[enumCast(Op::OpRayQueryGetIntersectionObjectRayDirectionKHR)].setResultAndType(true, true); InstructionDesc[enumCast(Op::OpRayQueryGetIntersectionObjectRayOriginKHR)].operands.push(OperandId, "'RayQuery'"); InstructionDesc[enumCast(Op::OpRayQueryGetIntersectionObjectRayOriginKHR)].operands.push(OperandId, "'Committed'"); InstructionDesc[enumCast(Op::OpRayQueryGetIntersectionObjectRayOriginKHR)].setResultAndType(true, true); InstructionDesc[enumCast(Op::OpRayQueryGetWorldRayDirectionKHR)].operands.push(OperandId, "'RayQuery'"); InstructionDesc[enumCast(Op::OpRayQueryGetWorldRayDirectionKHR)].setResultAndType(true, true); InstructionDesc[enumCast(Op::OpRayQueryGetWorldRayOriginKHR)].operands.push(OperandId, "'RayQuery'"); InstructionDesc[enumCast(Op::OpRayQueryGetWorldRayOriginKHR)].setResultAndType(true, true); InstructionDesc[enumCast(Op::OpRayQueryGetIntersectionObjectToWorldKHR)].operands.push(OperandId, "'RayQuery'"); InstructionDesc[enumCast(Op::OpRayQueryGetIntersectionObjectToWorldKHR)].operands.push(OperandId, "'Committed'"); InstructionDesc[enumCast(Op::OpRayQueryGetIntersectionObjectToWorldKHR)].setResultAndType(true, true); InstructionDesc[enumCast(Op::OpRayQueryGetIntersectionWorldToObjectKHR)].operands.push(OperandId, "'RayQuery'"); InstructionDesc[enumCast(Op::OpRayQueryGetIntersectionWorldToObjectKHR)].operands.push(OperandId, "'Committed'"); InstructionDesc[enumCast(Op::OpRayQueryGetIntersectionWorldToObjectKHR)].setResultAndType(true, true); InstructionDesc[enumCast(Op::OpRayQueryGetIntersectionTriangleVertexPositionsKHR)].operands.push(OperandId, "'RayQuery'"); InstructionDesc[enumCast(Op::OpRayQueryGetIntersectionTriangleVertexPositionsKHR)].operands.push(OperandId, "'Committed'"); InstructionDesc[enumCast(Op::OpRayQueryGetIntersectionTriangleVertexPositionsKHR)].setResultAndType(true, true); InstructionDesc[enumCast(Op::OpRayQueryGetClusterIdNV)].operands.push(OperandId, "'RayQuery'"); InstructionDesc[enumCast(Op::OpRayQueryGetClusterIdNV)].operands.push(OperandId, "'Committed'"); InstructionDesc[enumCast(Op::OpRayQueryGetClusterIdNV)].setResultAndType(true, true); InstructionDesc[enumCast(Op::OpRayQueryGetIntersectionSpherePositionNV)].operands.push(OperandId, "'RayQuery'"); InstructionDesc[enumCast(Op::OpRayQueryGetIntersectionSpherePositionNV)].operands.push(OperandId, "'Committed'"); InstructionDesc[enumCast(Op::OpRayQueryGetIntersectionSpherePositionNV)].setResultAndType(true, true); InstructionDesc[enumCast(Op::OpRayQueryGetIntersectionSphereRadiusNV)].operands.push(OperandId, "'RayQuery'"); InstructionDesc[enumCast(Op::OpRayQueryGetIntersectionSphereRadiusNV)].operands.push(OperandId, "'Committed'"); InstructionDesc[enumCast(Op::OpRayQueryGetIntersectionSphereRadiusNV)].setResultAndType(true, true); InstructionDesc[enumCast(Op::OpRayQueryGetIntersectionLSSHitValueNV)].operands.push(OperandId, "'RayQuery'"); InstructionDesc[enumCast(Op::OpRayQueryGetIntersectionLSSHitValueNV)].operands.push(OperandId, "'Committed'"); InstructionDesc[enumCast(Op::OpRayQueryGetIntersectionLSSHitValueNV)].setResultAndType(true, true); InstructionDesc[enumCast(Op::OpRayQueryGetIntersectionLSSPositionsNV)].operands.push(OperandId, "'RayQuery'"); InstructionDesc[enumCast(Op::OpRayQueryGetIntersectionLSSPositionsNV)].operands.push(OperandId, "'Committed'"); InstructionDesc[enumCast(Op::OpRayQueryGetIntersectionLSSPositionsNV)].setResultAndType(true, true); InstructionDesc[enumCast(Op::OpRayQueryGetIntersectionLSSRadiiNV)].operands.push(OperandId, "'RayQuery'"); InstructionDesc[enumCast(Op::OpRayQueryGetIntersectionLSSRadiiNV)].operands.push(OperandId, "'Committed'"); InstructionDesc[enumCast(Op::OpRayQueryGetIntersectionLSSRadiiNV)].setResultAndType(true, true); InstructionDesc[enumCast(Op::OpRayQueryIsSphereHitNV)].operands.push(OperandId, "'RayQuery'"); InstructionDesc[enumCast(Op::OpRayQueryIsSphereHitNV)].operands.push(OperandId, "'Committed'"); InstructionDesc[enumCast(Op::OpRayQueryIsSphereHitNV)].setResultAndType(true, true); InstructionDesc[enumCast(Op::OpRayQueryIsLSSHitNV)].operands.push(OperandId, "'RayQuery'"); InstructionDesc[enumCast(Op::OpRayQueryIsLSSHitNV)].operands.push(OperandId, "'Committed'"); InstructionDesc[enumCast(Op::OpRayQueryIsLSSHitNV)].setResultAndType(true, true); InstructionDesc[enumCast(Op::OpImageSampleFootprintNV)].operands.push(OperandId, "'Sampled Image'"); InstructionDesc[enumCast(Op::OpImageSampleFootprintNV)].operands.push(OperandId, "'Coordinate'"); InstructionDesc[enumCast(Op::OpImageSampleFootprintNV)].operands.push(OperandId, "'Granularity'"); InstructionDesc[enumCast(Op::OpImageSampleFootprintNV)].operands.push(OperandId, "'Coarse'"); InstructionDesc[enumCast(Op::OpImageSampleFootprintNV)].operands.push(OperandImageOperands, "", true); InstructionDesc[enumCast(Op::OpImageSampleFootprintNV)].operands.push(OperandVariableIds, "", true); InstructionDesc[enumCast(Op::OpWritePackedPrimitiveIndices4x8NV)].operands.push(OperandId, "'Index Offset'"); InstructionDesc[enumCast(Op::OpWritePackedPrimitiveIndices4x8NV)].operands.push(OperandId, "'Packed Indices'"); InstructionDesc[enumCast(Op::OpEmitMeshTasksEXT)].operands.push(OperandId, "'groupCountX'"); InstructionDesc[enumCast(Op::OpEmitMeshTasksEXT)].operands.push(OperandId, "'groupCountY'"); InstructionDesc[enumCast(Op::OpEmitMeshTasksEXT)].operands.push(OperandId, "'groupCountZ'"); InstructionDesc[enumCast(Op::OpEmitMeshTasksEXT)].operands.push(OperandId, "'Payload'"); InstructionDesc[enumCast(Op::OpEmitMeshTasksEXT)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpSetMeshOutputsEXT)].operands.push(OperandId, "'vertexCount'"); InstructionDesc[enumCast(Op::OpSetMeshOutputsEXT)].operands.push(OperandId, "'primitiveCount'"); InstructionDesc[enumCast(Op::OpSetMeshOutputsEXT)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpTypeCooperativeMatrixNV)].operands.push(OperandId, "'Component Type'"); InstructionDesc[enumCast(Op::OpTypeCooperativeMatrixNV)].operands.push(OperandId, "'Scope'"); InstructionDesc[enumCast(Op::OpTypeCooperativeMatrixNV)].operands.push(OperandId, "'Rows'"); InstructionDesc[enumCast(Op::OpTypeCooperativeMatrixNV)].operands.push(OperandId, "'Columns'"); InstructionDesc[enumCast(Op::OpCooperativeMatrixLoadNV)].operands.push(OperandId, "'Pointer'"); InstructionDesc[enumCast(Op::OpCooperativeMatrixLoadNV)].operands.push(OperandId, "'Stride'"); InstructionDesc[enumCast(Op::OpCooperativeMatrixLoadNV)].operands.push(OperandId, "'Column Major'"); InstructionDesc[enumCast(Op::OpCooperativeMatrixLoadNV)].operands.push(OperandMemoryAccess, "'Memory Access'"); InstructionDesc[enumCast(Op::OpCooperativeMatrixLoadNV)].operands.push(OperandLiteralNumber, "", true); InstructionDesc[enumCast(Op::OpCooperativeMatrixLoadNV)].operands.push(OperandId, "", true); InstructionDesc[enumCast(Op::OpCooperativeMatrixStoreNV)].operands.push(OperandId, "'Pointer'"); InstructionDesc[enumCast(Op::OpCooperativeMatrixStoreNV)].operands.push(OperandId, "'Object'"); InstructionDesc[enumCast(Op::OpCooperativeMatrixStoreNV)].operands.push(OperandId, "'Stride'"); InstructionDesc[enumCast(Op::OpCooperativeMatrixStoreNV)].operands.push(OperandId, "'Column Major'"); InstructionDesc[enumCast(Op::OpCooperativeMatrixStoreNV)].operands.push(OperandMemoryAccess, "'Memory Access'"); InstructionDesc[enumCast(Op::OpCooperativeMatrixStoreNV)].operands.push(OperandLiteralNumber, "", true); InstructionDesc[enumCast(Op::OpCooperativeMatrixStoreNV)].operands.push(OperandId, "", true); InstructionDesc[enumCast(Op::OpCooperativeMatrixMulAddNV)].operands.push(OperandId, "'A'"); InstructionDesc[enumCast(Op::OpCooperativeMatrixMulAddNV)].operands.push(OperandId, "'B'"); InstructionDesc[enumCast(Op::OpCooperativeMatrixMulAddNV)].operands.push(OperandId, "'C'"); InstructionDesc[enumCast(Op::OpCooperativeMatrixLengthNV)].operands.push(OperandId, "'Type'"); InstructionDesc[enumCast(Op::OpTypeCooperativeMatrixKHR)].operands.push(OperandId, "'Component Type'"); InstructionDesc[enumCast(Op::OpTypeCooperativeMatrixKHR)].operands.push(OperandId, "'Scope'"); InstructionDesc[enumCast(Op::OpTypeCooperativeMatrixKHR)].operands.push(OperandId, "'Rows'"); InstructionDesc[enumCast(Op::OpTypeCooperativeMatrixKHR)].operands.push(OperandId, "'Columns'"); InstructionDesc[enumCast(Op::OpTypeCooperativeMatrixKHR)].operands.push(OperandId, "'Use'"); InstructionDesc[enumCast(Op::OpCooperativeMatrixLoadKHR)].operands.push(OperandId, "'Pointer'"); InstructionDesc[enumCast(Op::OpCooperativeMatrixLoadKHR)].operands.push(OperandId, "'Memory Layout'"); InstructionDesc[enumCast(Op::OpCooperativeMatrixLoadKHR)].operands.push(OperandId, "'Stride'"); InstructionDesc[enumCast(Op::OpCooperativeMatrixLoadKHR)].operands.push(OperandMemoryAccess, "'Memory Access'"); InstructionDesc[enumCast(Op::OpCooperativeMatrixLoadKHR)].operands.push(OperandLiteralNumber, "", true); InstructionDesc[enumCast(Op::OpCooperativeMatrixLoadKHR)].operands.push(OperandId, "", true); InstructionDesc[enumCast(Op::OpCooperativeMatrixStoreKHR)].operands.push(OperandId, "'Pointer'"); InstructionDesc[enumCast(Op::OpCooperativeMatrixStoreKHR)].operands.push(OperandId, "'Object'"); InstructionDesc[enumCast(Op::OpCooperativeMatrixStoreKHR)].operands.push(OperandId, "'Memory Layout'"); InstructionDesc[enumCast(Op::OpCooperativeMatrixStoreKHR)].operands.push(OperandId, "'Stride'"); InstructionDesc[enumCast(Op::OpCooperativeMatrixStoreKHR)].operands.push(OperandMemoryAccess, "'Memory Access'"); InstructionDesc[enumCast(Op::OpCooperativeMatrixStoreKHR)].operands.push(OperandLiteralNumber, "", true); InstructionDesc[enumCast(Op::OpCooperativeMatrixStoreKHR)].operands.push(OperandId, "", true); InstructionDesc[enumCast(Op::OpCooperativeMatrixMulAddKHR)].operands.push(OperandId, "'A'"); InstructionDesc[enumCast(Op::OpCooperativeMatrixMulAddKHR)].operands.push(OperandId, "'B'"); InstructionDesc[enumCast(Op::OpCooperativeMatrixMulAddKHR)].operands.push(OperandId, "'C'"); InstructionDesc[enumCast(Op::OpCooperativeMatrixMulAddKHR)].operands.push(OperandCooperativeMatrixOperands, "'Cooperative Matrix Operands'", true); InstructionDesc[enumCast(Op::OpCooperativeMatrixLengthKHR)].operands.push(OperandId, "'Type'"); InstructionDesc[enumCast(Op::OpTypeCooperativeVectorNV)].operands.push(OperandId, "'Component Type'"); InstructionDesc[enumCast(Op::OpTypeCooperativeVectorNV)].operands.push(OperandId, "'Components'"); InstructionDesc[enumCast(Op::OpCooperativeVectorMatrixMulNV)].operands.push(OperandId, "'Input'"); InstructionDesc[enumCast(Op::OpCooperativeVectorMatrixMulNV)].operands.push(OperandId, "'InputInterpretation'"); InstructionDesc[enumCast(Op::OpCooperativeVectorMatrixMulNV)].operands.push(OperandId, "'Matrix'"); InstructionDesc[enumCast(Op::OpCooperativeVectorMatrixMulNV)].operands.push(OperandId, "'MatrixOffset'"); InstructionDesc[enumCast(Op::OpCooperativeVectorMatrixMulNV)].operands.push(OperandId, "'MatrixInterpretation'"); InstructionDesc[enumCast(Op::OpCooperativeVectorMatrixMulNV)].operands.push(OperandId, "'M'"); InstructionDesc[enumCast(Op::OpCooperativeVectorMatrixMulNV)].operands.push(OperandId, "'K'"); InstructionDesc[enumCast(Op::OpCooperativeVectorMatrixMulNV)].operands.push(OperandId, "'MemoryLayout'"); InstructionDesc[enumCast(Op::OpCooperativeVectorMatrixMulNV)].operands.push(OperandId, "'Transpose'"); InstructionDesc[enumCast(Op::OpCooperativeVectorMatrixMulNV)].operands.push(OperandId, "'MatrixStride'", true); InstructionDesc[enumCast(Op::OpCooperativeVectorMatrixMulNV)].operands.push(OperandCooperativeMatrixOperands, "'Cooperative Matrix Operands'", true); InstructionDesc[enumCast(Op::OpCooperativeVectorMatrixMulAddNV)].operands.push(OperandId, "'Input'"); InstructionDesc[enumCast(Op::OpCooperativeVectorMatrixMulAddNV)].operands.push(OperandId, "'InputInterpretation'"); InstructionDesc[enumCast(Op::OpCooperativeVectorMatrixMulAddNV)].operands.push(OperandId, "'Matrix'"); InstructionDesc[enumCast(Op::OpCooperativeVectorMatrixMulAddNV)].operands.push(OperandId, "'MatrixOffset'"); InstructionDesc[enumCast(Op::OpCooperativeVectorMatrixMulAddNV)].operands.push(OperandId, "'MatrixInterpretation'"); InstructionDesc[enumCast(Op::OpCooperativeVectorMatrixMulAddNV)].operands.push(OperandId, "'Bias'"); InstructionDesc[enumCast(Op::OpCooperativeVectorMatrixMulAddNV)].operands.push(OperandId, "'BiasOffset'"); InstructionDesc[enumCast(Op::OpCooperativeVectorMatrixMulAddNV)].operands.push(OperandId, "'BiasInterpretation'"); InstructionDesc[enumCast(Op::OpCooperativeVectorMatrixMulAddNV)].operands.push(OperandId, "'M'"); InstructionDesc[enumCast(Op::OpCooperativeVectorMatrixMulAddNV)].operands.push(OperandId, "'K'"); InstructionDesc[enumCast(Op::OpCooperativeVectorMatrixMulAddNV)].operands.push(OperandId, "'MemoryLayout'"); InstructionDesc[enumCast(Op::OpCooperativeVectorMatrixMulAddNV)].operands.push(OperandId, "'Transpose'"); InstructionDesc[enumCast(Op::OpCooperativeVectorMatrixMulAddNV)].operands.push(OperandId, "'MatrixStride'", true); InstructionDesc[enumCast(Op::OpCooperativeVectorMatrixMulAddNV)].operands.push(OperandCooperativeMatrixOperands, "'Cooperative Matrix Operands'", true); InstructionDesc[enumCast(Op::OpCooperativeVectorLoadNV)].operands.push(OperandId, "'Pointer'"); InstructionDesc[enumCast(Op::OpCooperativeVectorLoadNV)].operands.push(OperandId, "'Offset'"); InstructionDesc[enumCast(Op::OpCooperativeVectorLoadNV)].operands.push(OperandMemoryAccess, "'Memory Access'"); InstructionDesc[enumCast(Op::OpCooperativeVectorLoadNV)].operands.push(OperandLiteralNumber, "", true); InstructionDesc[enumCast(Op::OpCooperativeVectorLoadNV)].operands.push(OperandId, "", true); InstructionDesc[enumCast(Op::OpCooperativeVectorStoreNV)].operands.push(OperandId, "'Pointer'"); InstructionDesc[enumCast(Op::OpCooperativeVectorStoreNV)].operands.push(OperandId, "'Offset'"); InstructionDesc[enumCast(Op::OpCooperativeVectorStoreNV)].operands.push(OperandId, "'Object'"); InstructionDesc[enumCast(Op::OpCooperativeVectorStoreNV)].operands.push(OperandMemoryAccess, "'Memory Access'"); InstructionDesc[enumCast(Op::OpCooperativeVectorStoreNV)].operands.push(OperandLiteralNumber, "", true); InstructionDesc[enumCast(Op::OpCooperativeVectorStoreNV)].operands.push(OperandId, "", true); InstructionDesc[enumCast(Op::OpCooperativeVectorOuterProductAccumulateNV)].operands.push(OperandId, "'Pointer'"); InstructionDesc[enumCast(Op::OpCooperativeVectorOuterProductAccumulateNV)].operands.push(OperandId, "'Offset'"); InstructionDesc[enumCast(Op::OpCooperativeVectorOuterProductAccumulateNV)].operands.push(OperandId, "'A'"); InstructionDesc[enumCast(Op::OpCooperativeVectorOuterProductAccumulateNV)].operands.push(OperandId, "'B'"); InstructionDesc[enumCast(Op::OpCooperativeVectorOuterProductAccumulateNV)].operands.push(OperandId, "'MemoryLayout'"); InstructionDesc[enumCast(Op::OpCooperativeVectorOuterProductAccumulateNV)].operands.push(OperandId, "'MatrixInterpretation'"); InstructionDesc[enumCast(Op::OpCooperativeVectorOuterProductAccumulateNV)].operands.push(OperandId, "'MatrixStride'", true); InstructionDesc[enumCast(Op::OpCooperativeVectorReduceSumAccumulateNV)].operands.push(OperandId, "'Pointer'"); InstructionDesc[enumCast(Op::OpCooperativeVectorReduceSumAccumulateNV)].operands.push(OperandId, "'Offset'"); InstructionDesc[enumCast(Op::OpCooperativeVectorReduceSumAccumulateNV)].operands.push(OperandId, "'V'"); InstructionDesc[enumCast(Op::OpDemoteToHelperInvocationEXT)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpReadClockKHR)].operands.push(OperandScope, "'Scope'"); InstructionDesc[enumCast(Op::OpTypeHitObjectNV)].setResultAndType(true, false); InstructionDesc[enumCast(Op::OpHitObjectGetShaderRecordBufferHandleNV)].operands.push(OperandId, "'HitObject'"); InstructionDesc[enumCast(Op::OpHitObjectGetShaderRecordBufferHandleNV)].setResultAndType(true, true); InstructionDesc[enumCast(Op::OpReorderThreadWithHintNV)].operands.push(OperandId, "'Hint'"); InstructionDesc[enumCast(Op::OpReorderThreadWithHintNV)].operands.push(OperandId, "'Bits'"); InstructionDesc[enumCast(Op::OpReorderThreadWithHintNV)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpReorderThreadWithHitObjectNV)].operands.push(OperandId, "'HitObject'"); InstructionDesc[enumCast(Op::OpReorderThreadWithHitObjectNV)].operands.push(OperandId, "'Hint'"); InstructionDesc[enumCast(Op::OpReorderThreadWithHitObjectNV)].operands.push(OperandId, "'Bits'"); InstructionDesc[enumCast(Op::OpReorderThreadWithHitObjectNV)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpHitObjectGetCurrentTimeNV)].operands.push(OperandId, "'HitObject'"); InstructionDesc[enumCast(Op::OpHitObjectGetCurrentTimeNV)].setResultAndType(true, true); InstructionDesc[enumCast(Op::OpHitObjectGetHitKindNV)].operands.push(OperandId, "'HitObject'"); InstructionDesc[enumCast(Op::OpHitObjectGetHitKindNV)].setResultAndType(true, true); InstructionDesc[enumCast(Op::OpHitObjectGetPrimitiveIndexNV)].operands.push(OperandId, "'HitObject'"); InstructionDesc[enumCast(Op::OpHitObjectGetPrimitiveIndexNV)].setResultAndType(true, true); InstructionDesc[enumCast(Op::OpHitObjectGetGeometryIndexNV)].operands.push(OperandId, "'HitObject'"); InstructionDesc[enumCast(Op::OpHitObjectGetGeometryIndexNV)].setResultAndType(true, true); InstructionDesc[enumCast(Op::OpHitObjectGetInstanceIdNV)].operands.push(OperandId, "'HitObject'"); InstructionDesc[enumCast(Op::OpHitObjectGetInstanceIdNV)].setResultAndType(true, true); InstructionDesc[enumCast(Op::OpHitObjectGetInstanceCustomIndexNV)].operands.push(OperandId, "'HitObject'"); InstructionDesc[enumCast(Op::OpHitObjectGetInstanceCustomIndexNV)].setResultAndType(true, true); InstructionDesc[enumCast(Op::OpHitObjectGetObjectRayDirectionNV)].operands.push(OperandId, "'HitObject'"); InstructionDesc[enumCast(Op::OpHitObjectGetObjectRayDirectionNV)].setResultAndType(true, true); InstructionDesc[enumCast(Op::OpHitObjectGetObjectRayOriginNV)].operands.push(OperandId, "'HitObject'"); InstructionDesc[enumCast(Op::OpHitObjectGetObjectRayOriginNV)].setResultAndType(true, true); InstructionDesc[enumCast(Op::OpHitObjectGetWorldRayDirectionNV)].operands.push(OperandId, "'HitObject'"); InstructionDesc[enumCast(Op::OpHitObjectGetWorldRayDirectionNV)].setResultAndType(true, true); InstructionDesc[enumCast(Op::OpHitObjectGetWorldRayOriginNV)].operands.push(OperandId, "'HitObject'"); InstructionDesc[enumCast(Op::OpHitObjectGetWorldRayOriginNV)].setResultAndType(true, true); InstructionDesc[enumCast(Op::OpHitObjectGetWorldToObjectNV)].operands.push(OperandId, "'HitObject'"); InstructionDesc[enumCast(Op::OpHitObjectGetWorldToObjectNV)].setResultAndType(true, true); InstructionDesc[enumCast(Op::OpHitObjectGetObjectToWorldNV)].operands.push(OperandId, "'HitObject'"); InstructionDesc[enumCast(Op::OpHitObjectGetObjectToWorldNV)].setResultAndType(true, true); InstructionDesc[enumCast(Op::OpHitObjectGetRayTMaxNV)].operands.push(OperandId, "'HitObject'"); InstructionDesc[enumCast(Op::OpHitObjectGetRayTMaxNV)].setResultAndType(true, true); InstructionDesc[enumCast(Op::OpHitObjectGetRayTMinNV)].operands.push(OperandId, "'HitObject'"); InstructionDesc[enumCast(Op::OpHitObjectGetRayTMinNV)].setResultAndType(true, true); InstructionDesc[enumCast(Op::OpHitObjectGetShaderBindingTableRecordIndexNV)].operands.push(OperandId, "'HitObject'"); InstructionDesc[enumCast(Op::OpHitObjectGetShaderBindingTableRecordIndexNV)].setResultAndType(true, true); InstructionDesc[enumCast(Op::OpHitObjectIsEmptyNV)].operands.push(OperandId, "'HitObject'"); InstructionDesc[enumCast(Op::OpHitObjectIsEmptyNV)].setResultAndType(true, true); InstructionDesc[enumCast(Op::OpHitObjectIsHitNV)].operands.push(OperandId, "'HitObject'"); InstructionDesc[enumCast(Op::OpHitObjectIsHitNV)].setResultAndType(true, true); InstructionDesc[enumCast(Op::OpHitObjectIsMissNV)].operands.push(OperandId, "'HitObject'"); InstructionDesc[enumCast(Op::OpHitObjectIsMissNV)].setResultAndType(true, true); InstructionDesc[enumCast(Op::OpHitObjectGetAttributesNV)].operands.push(OperandId, "'HitObject'"); InstructionDesc[enumCast(Op::OpHitObjectGetAttributesNV)].operands.push(OperandId, "'HitObjectAttribute'"); InstructionDesc[enumCast(Op::OpHitObjectGetAttributesNV)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpHitObjectExecuteShaderNV)].operands.push(OperandId, "'HitObject'"); InstructionDesc[enumCast(Op::OpHitObjectExecuteShaderNV)].operands.push(OperandId, "'Payload'"); InstructionDesc[enumCast(Op::OpHitObjectExecuteShaderNV)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpHitObjectRecordHitNV)].operands.push(OperandId, "'HitObject'"); InstructionDesc[enumCast(Op::OpHitObjectRecordHitNV)].operands.push(OperandId, "'Acceleration Structure'"); InstructionDesc[enumCast(Op::OpHitObjectRecordHitNV)].operands.push(OperandId, "'InstanceId'"); InstructionDesc[enumCast(Op::OpHitObjectRecordHitNV)].operands.push(OperandId, "'PrimitiveId'"); InstructionDesc[enumCast(Op::OpHitObjectRecordHitNV)].operands.push(OperandId, "'GeometryIndex'"); InstructionDesc[enumCast(Op::OpHitObjectRecordHitNV)].operands.push(OperandId, "'HitKind'"); InstructionDesc[enumCast(Op::OpHitObjectRecordHitNV)].operands.push(OperandId, "'SBT Record Offset'"); InstructionDesc[enumCast(Op::OpHitObjectRecordHitNV)].operands.push(OperandId, "'SBT Record Stride'"); InstructionDesc[enumCast(Op::OpHitObjectRecordHitNV)].operands.push(OperandId, "'Origin'"); InstructionDesc[enumCast(Op::OpHitObjectRecordHitNV)].operands.push(OperandId, "'TMin'"); InstructionDesc[enumCast(Op::OpHitObjectRecordHitNV)].operands.push(OperandId, "'Direction'"); InstructionDesc[enumCast(Op::OpHitObjectRecordHitNV)].operands.push(OperandId, "'TMax'"); InstructionDesc[enumCast(Op::OpHitObjectRecordHitNV)].operands.push(OperandId, "'HitObject Attribute'"); InstructionDesc[enumCast(Op::OpHitObjectRecordHitNV)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpHitObjectRecordHitMotionNV)].operands.push(OperandId, "'HitObject'"); InstructionDesc[enumCast(Op::OpHitObjectRecordHitMotionNV)].operands.push(OperandId, "'Acceleration Structure'"); InstructionDesc[enumCast(Op::OpHitObjectRecordHitMotionNV)].operands.push(OperandId, "'InstanceId'"); InstructionDesc[enumCast(Op::OpHitObjectRecordHitMotionNV)].operands.push(OperandId, "'PrimitiveId'"); InstructionDesc[enumCast(Op::OpHitObjectRecordHitMotionNV)].operands.push(OperandId, "'GeometryIndex'"); InstructionDesc[enumCast(Op::OpHitObjectRecordHitMotionNV)].operands.push(OperandId, "'HitKind'"); InstructionDesc[enumCast(Op::OpHitObjectRecordHitMotionNV)].operands.push(OperandId, "'SBT Record Offset'"); InstructionDesc[enumCast(Op::OpHitObjectRecordHitMotionNV)].operands.push(OperandId, "'SBT Record Stride'"); InstructionDesc[enumCast(Op::OpHitObjectRecordHitMotionNV)].operands.push(OperandId, "'Origin'"); InstructionDesc[enumCast(Op::OpHitObjectRecordHitMotionNV)].operands.push(OperandId, "'TMin'"); InstructionDesc[enumCast(Op::OpHitObjectRecordHitMotionNV)].operands.push(OperandId, "'Direction'"); InstructionDesc[enumCast(Op::OpHitObjectRecordHitMotionNV)].operands.push(OperandId, "'TMax'"); InstructionDesc[enumCast(Op::OpHitObjectRecordHitMotionNV)].operands.push(OperandId, "'Current Time'"); InstructionDesc[enumCast(Op::OpHitObjectRecordHitMotionNV)].operands.push(OperandId, "'HitObject Attribute'"); InstructionDesc[enumCast(Op::OpHitObjectRecordHitMotionNV)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpHitObjectRecordHitWithIndexNV)].operands.push(OperandId, "'HitObject'"); InstructionDesc[enumCast(Op::OpHitObjectRecordHitWithIndexNV)].operands.push(OperandId, "'Acceleration Structure'"); InstructionDesc[enumCast(Op::OpHitObjectRecordHitWithIndexNV)].operands.push(OperandId, "'InstanceId'"); InstructionDesc[enumCast(Op::OpHitObjectRecordHitWithIndexNV)].operands.push(OperandId, "'PrimitiveId'"); InstructionDesc[enumCast(Op::OpHitObjectRecordHitWithIndexNV)].operands.push(OperandId, "'GeometryIndex'"); InstructionDesc[enumCast(Op::OpHitObjectRecordHitWithIndexNV)].operands.push(OperandId, "'HitKind'"); InstructionDesc[enumCast(Op::OpHitObjectRecordHitWithIndexNV)].operands.push(OperandId, "'SBT Record Index'"); InstructionDesc[enumCast(Op::OpHitObjectRecordHitWithIndexNV)].operands.push(OperandId, "'Origin'"); InstructionDesc[enumCast(Op::OpHitObjectRecordHitWithIndexNV)].operands.push(OperandId, "'TMin'"); InstructionDesc[enumCast(Op::OpHitObjectRecordHitWithIndexNV)].operands.push(OperandId, "'Direction'"); InstructionDesc[enumCast(Op::OpHitObjectRecordHitWithIndexNV)].operands.push(OperandId, "'TMax'"); InstructionDesc[enumCast(Op::OpHitObjectRecordHitWithIndexNV)].operands.push(OperandId, "'HitObject Attribute'"); InstructionDesc[enumCast(Op::OpHitObjectRecordHitWithIndexNV)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpHitObjectRecordHitWithIndexMotionNV)].operands.push(OperandId, "'HitObject'"); InstructionDesc[enumCast(Op::OpHitObjectRecordHitWithIndexMotionNV)].operands.push(OperandId, "'Acceleration Structure'"); InstructionDesc[enumCast(Op::OpHitObjectRecordHitWithIndexMotionNV)].operands.push(OperandId, "'InstanceId'"); InstructionDesc[enumCast(Op::OpHitObjectRecordHitWithIndexMotionNV)].operands.push(OperandId, "'PrimitiveId'"); InstructionDesc[enumCast(Op::OpHitObjectRecordHitWithIndexMotionNV)].operands.push(OperandId, "'GeometryIndex'"); InstructionDesc[enumCast(Op::OpHitObjectRecordHitWithIndexMotionNV)].operands.push(OperandId, "'HitKind'"); InstructionDesc[enumCast(Op::OpHitObjectRecordHitWithIndexMotionNV)].operands.push(OperandId, "'SBT Record Index'"); InstructionDesc[enumCast(Op::OpHitObjectRecordHitWithIndexMotionNV)].operands.push(OperandId, "'Origin'"); InstructionDesc[enumCast(Op::OpHitObjectRecordHitWithIndexMotionNV)].operands.push(OperandId, "'TMin'"); InstructionDesc[enumCast(Op::OpHitObjectRecordHitWithIndexMotionNV)].operands.push(OperandId, "'Direction'"); InstructionDesc[enumCast(Op::OpHitObjectRecordHitWithIndexMotionNV)].operands.push(OperandId, "'TMax'"); InstructionDesc[enumCast(Op::OpHitObjectRecordHitWithIndexMotionNV)].operands.push(OperandId, "'Current Time'"); InstructionDesc[enumCast(Op::OpHitObjectRecordHitWithIndexMotionNV)].operands.push(OperandId, "'HitObject Attribute'"); InstructionDesc[enumCast(Op::OpHitObjectRecordHitWithIndexMotionNV)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpHitObjectRecordMissNV)].operands.push(OperandId, "'HitObject'"); InstructionDesc[enumCast(Op::OpHitObjectRecordMissNV)].operands.push(OperandId, "'SBT Index'"); InstructionDesc[enumCast(Op::OpHitObjectRecordMissNV)].operands.push(OperandId, "'Origin'"); InstructionDesc[enumCast(Op::OpHitObjectRecordMissNV)].operands.push(OperandId, "'TMin'"); InstructionDesc[enumCast(Op::OpHitObjectRecordMissNV)].operands.push(OperandId, "'Direction'"); InstructionDesc[enumCast(Op::OpHitObjectRecordMissNV)].operands.push(OperandId, "'TMax'"); InstructionDesc[enumCast(Op::OpHitObjectRecordMissNV)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpHitObjectRecordMissMotionNV)].operands.push(OperandId, "'HitObject'"); InstructionDesc[enumCast(Op::OpHitObjectRecordMissMotionNV)].operands.push(OperandId, "'SBT Index'"); InstructionDesc[enumCast(Op::OpHitObjectRecordMissMotionNV)].operands.push(OperandId, "'Origin'"); InstructionDesc[enumCast(Op::OpHitObjectRecordMissMotionNV)].operands.push(OperandId, "'TMin'"); InstructionDesc[enumCast(Op::OpHitObjectRecordMissMotionNV)].operands.push(OperandId, "'Direction'"); InstructionDesc[enumCast(Op::OpHitObjectRecordMissMotionNV)].operands.push(OperandId, "'TMax'"); InstructionDesc[enumCast(Op::OpHitObjectRecordMissMotionNV)].operands.push(OperandId, "'Current Time'"); InstructionDesc[enumCast(Op::OpHitObjectRecordMissMotionNV)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpHitObjectRecordEmptyNV)].operands.push(OperandId, "'HitObject'"); InstructionDesc[enumCast(Op::OpHitObjectRecordEmptyNV)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpHitObjectTraceRayNV)].operands.push(OperandId, "'HitObject'"); InstructionDesc[enumCast(Op::OpHitObjectTraceRayNV)].operands.push(OperandId, "'Acceleration Structure'"); InstructionDesc[enumCast(Op::OpHitObjectTraceRayNV)].operands.push(OperandId, "'RayFlags'"); InstructionDesc[enumCast(Op::OpHitObjectTraceRayNV)].operands.push(OperandId, "'Cullmask'"); InstructionDesc[enumCast(Op::OpHitObjectTraceRayNV)].operands.push(OperandId, "'SBT Record Offset'"); InstructionDesc[enumCast(Op::OpHitObjectTraceRayNV)].operands.push(OperandId, "'SBT Record Stride'"); InstructionDesc[enumCast(Op::OpHitObjectTraceRayNV)].operands.push(OperandId, "'Miss Index'"); InstructionDesc[enumCast(Op::OpHitObjectTraceRayNV)].operands.push(OperandId, "'Origin'"); InstructionDesc[enumCast(Op::OpHitObjectTraceRayNV)].operands.push(OperandId, "'TMin'"); InstructionDesc[enumCast(Op::OpHitObjectTraceRayNV)].operands.push(OperandId, "'Direction'"); InstructionDesc[enumCast(Op::OpHitObjectTraceRayNV)].operands.push(OperandId, "'TMax'"); InstructionDesc[enumCast(Op::OpHitObjectTraceRayNV)].operands.push(OperandId, "'Payload'"); InstructionDesc[enumCast(Op::OpHitObjectTraceRayNV)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpHitObjectTraceRayMotionNV)].operands.push(OperandId, "'HitObject'"); InstructionDesc[enumCast(Op::OpHitObjectTraceRayMotionNV)].operands.push(OperandId, "'Acceleration Structure'"); InstructionDesc[enumCast(Op::OpHitObjectTraceRayMotionNV)].operands.push(OperandId, "'RayFlags'"); InstructionDesc[enumCast(Op::OpHitObjectTraceRayMotionNV)].operands.push(OperandId, "'Cullmask'"); InstructionDesc[enumCast(Op::OpHitObjectTraceRayMotionNV)].operands.push(OperandId, "'SBT Record Offset'"); InstructionDesc[enumCast(Op::OpHitObjectTraceRayMotionNV)].operands.push(OperandId, "'SBT Record Stride'"); InstructionDesc[enumCast(Op::OpHitObjectTraceRayMotionNV)].operands.push(OperandId, "'Miss Index'"); InstructionDesc[enumCast(Op::OpHitObjectTraceRayMotionNV)].operands.push(OperandId, "'Origin'"); InstructionDesc[enumCast(Op::OpHitObjectTraceRayMotionNV)].operands.push(OperandId, "'TMin'"); InstructionDesc[enumCast(Op::OpHitObjectTraceRayMotionNV)].operands.push(OperandId, "'Direction'"); InstructionDesc[enumCast(Op::OpHitObjectTraceRayMotionNV)].operands.push(OperandId, "'TMax'"); InstructionDesc[enumCast(Op::OpHitObjectTraceRayMotionNV)].operands.push(OperandId, "'Time'"); InstructionDesc[enumCast(Op::OpHitObjectTraceRayMotionNV)].operands.push(OperandId, "'Payload'"); InstructionDesc[enumCast(Op::OpHitObjectTraceRayMotionNV)].setResultAndType(false, false); InstructionDesc[enumCast(Op::OpHitObjectGetClusterIdNV)].operands.push(OperandId, "'HitObject'"); InstructionDesc[enumCast(Op::OpHitObjectGetClusterIdNV)].setResultAndType(true, true); InstructionDesc[enumCast(Op::OpHitObjectGetSpherePositionNV)].operands.push(OperandId, "'HitObject'"); InstructionDesc[enumCast(Op::OpHitObjectGetSpherePositionNV)].setResultAndType(true, true); InstructionDesc[enumCast(Op::OpHitObjectGetSphereRadiusNV)].operands.push(OperandId, "'HitObject'"); InstructionDesc[enumCast(Op::OpHitObjectGetSphereRadiusNV)].setResultAndType(true, true); InstructionDesc[enumCast(Op::OpHitObjectGetLSSPositionsNV)].operands.push(OperandId, "'HitObject'"); InstructionDesc[enumCast(Op::OpHitObjectGetLSSPositionsNV)].setResultAndType(true, true); InstructionDesc[enumCast(Op::OpHitObjectGetLSSRadiiNV)].operands.push(OperandId, "'HitObject'"); InstructionDesc[enumCast(Op::OpHitObjectGetLSSRadiiNV)].setResultAndType(true, true); InstructionDesc[enumCast(Op::OpHitObjectIsSphereHitNV)].operands.push(OperandId, "'HitObject'"); InstructionDesc[enumCast(Op::OpHitObjectIsSphereHitNV)].setResultAndType(true, true); InstructionDesc[enumCast(Op::OpHitObjectIsLSSHitNV)].operands.push(OperandId, "'HitObject'"); InstructionDesc[enumCast(Op::OpHitObjectIsLSSHitNV)].setResultAndType(true, true); InstructionDesc[enumCast(Op::OpFetchMicroTriangleVertexBarycentricNV)].operands.push(OperandId, "'Acceleration Structure'"); InstructionDesc[enumCast(Op::OpFetchMicroTriangleVertexBarycentricNV)].operands.push(OperandId, "'Instance ID'"); InstructionDesc[enumCast(Op::OpFetchMicroTriangleVertexBarycentricNV)].operands.push(OperandId, "'Geometry Index'"); InstructionDesc[enumCast(Op::OpFetchMicroTriangleVertexBarycentricNV)].operands.push(OperandId, "'Primitive Index'"); InstructionDesc[enumCast(Op::OpFetchMicroTriangleVertexBarycentricNV)].operands.push(OperandId, "'Barycentrics'"); InstructionDesc[enumCast(Op::OpFetchMicroTriangleVertexBarycentricNV)].setResultAndType(true, true); InstructionDesc[enumCast(Op::OpFetchMicroTriangleVertexPositionNV)].operands.push(OperandId, "'Acceleration Structure'"); InstructionDesc[enumCast(Op::OpFetchMicroTriangleVertexPositionNV)].operands.push(OperandId, "'Instance ID'"); InstructionDesc[enumCast(Op::OpFetchMicroTriangleVertexPositionNV)].operands.push(OperandId, "'Geometry Index'"); InstructionDesc[enumCast(Op::OpFetchMicroTriangleVertexPositionNV)].operands.push(OperandId, "'Primitive Index'"); InstructionDesc[enumCast(Op::OpFetchMicroTriangleVertexPositionNV)].operands.push(OperandId, "'Barycentrics'"); InstructionDesc[enumCast(Op::OpFetchMicroTriangleVertexPositionNV)].setResultAndType(true, true); InstructionDesc[enumCast(Op::OpColorAttachmentReadEXT)].operands.push(OperandId, "'Attachment'"); InstructionDesc[enumCast(Op::OpColorAttachmentReadEXT)].operands.push(OperandId, "'Sample'", true); InstructionDesc[enumCast(Op::OpStencilAttachmentReadEXT)].operands.push(OperandId, "'Sample'", true); InstructionDesc[enumCast(Op::OpDepthAttachmentReadEXT)].operands.push(OperandId, "'Sample'", true); InstructionDesc[enumCast(Op::OpImageSampleWeightedQCOM)].operands.push(OperandId, "'source texture'"); InstructionDesc[enumCast(Op::OpImageSampleWeightedQCOM)].operands.push(OperandId, "'texture coordinates'"); InstructionDesc[enumCast(Op::OpImageSampleWeightedQCOM)].operands.push(OperandId, "'weights texture'"); InstructionDesc[enumCast(Op::OpImageSampleWeightedQCOM)].operands.push(OperandImageOperands, "", true); InstructionDesc[enumCast(Op::OpImageSampleWeightedQCOM)].setResultAndType(true, true); InstructionDesc[enumCast(Op::OpImageBoxFilterQCOM)].operands.push(OperandId, "'source texture'"); InstructionDesc[enumCast(Op::OpImageBoxFilterQCOM)].operands.push(OperandId, "'texture coordinates'"); InstructionDesc[enumCast(Op::OpImageBoxFilterQCOM)].operands.push(OperandId, "'box size'"); InstructionDesc[enumCast(Op::OpImageBoxFilterQCOM)].operands.push(OperandImageOperands, "", true); InstructionDesc[enumCast(Op::OpImageBoxFilterQCOM)].setResultAndType(true, true); InstructionDesc[enumCast(Op::OpImageBlockMatchSADQCOM)].operands.push(OperandId, "'target texture'"); InstructionDesc[enumCast(Op::OpImageBlockMatchSADQCOM)].operands.push(OperandId, "'target coordinates'"); InstructionDesc[enumCast(Op::OpImageBlockMatchSADQCOM)].operands.push(OperandId, "'reference texture'"); InstructionDesc[enumCast(Op::OpImageBlockMatchSADQCOM)].operands.push(OperandId, "'reference coordinates'"); InstructionDesc[enumCast(Op::OpImageBlockMatchSADQCOM)].operands.push(OperandId, "'block size'"); InstructionDesc[enumCast(Op::OpImageBlockMatchSADQCOM)].operands.push(OperandImageOperands, "", true); InstructionDesc[enumCast(Op::OpImageBlockMatchSADQCOM)].setResultAndType(true, true); InstructionDesc[enumCast(Op::OpImageBlockMatchSSDQCOM)].operands.push(OperandId, "'target texture'"); InstructionDesc[enumCast(Op::OpImageBlockMatchSSDQCOM)].operands.push(OperandId, "'target coordinates'"); InstructionDesc[enumCast(Op::OpImageBlockMatchSSDQCOM)].operands.push(OperandId, "'reference texture'"); InstructionDesc[enumCast(Op::OpImageBlockMatchSSDQCOM)].operands.push(OperandId, "'reference coordinates'"); InstructionDesc[enumCast(Op::OpImageBlockMatchSSDQCOM)].operands.push(OperandId, "'block size'"); InstructionDesc[enumCast(Op::OpImageBlockMatchSSDQCOM)].operands.push(OperandImageOperands, "", true); InstructionDesc[enumCast(Op::OpImageBlockMatchSSDQCOM)].setResultAndType(true, true); InstructionDesc[enumCast(Op::OpImageBlockMatchWindowSSDQCOM)].operands.push(OperandId, "'target texture'"); InstructionDesc[enumCast(Op::OpImageBlockMatchWindowSSDQCOM)].operands.push(OperandId, "'target coordinates'"); InstructionDesc[enumCast(Op::OpImageBlockMatchWindowSSDQCOM)].operands.push(OperandId, "'reference texture'"); InstructionDesc[enumCast(Op::OpImageBlockMatchWindowSSDQCOM)].operands.push(OperandId, "'reference coordinates'"); InstructionDesc[enumCast(Op::OpImageBlockMatchWindowSSDQCOM)].operands.push(OperandId, "'block size'"); InstructionDesc[enumCast(Op::OpImageBlockMatchWindowSSDQCOM)].operands.push(OperandImageOperands, "", true); InstructionDesc[enumCast(Op::OpImageBlockMatchWindowSSDQCOM)].setResultAndType(true, true); InstructionDesc[enumCast(Op::OpImageBlockMatchWindowSADQCOM)].operands.push(OperandId, "'target texture'"); InstructionDesc[enumCast(Op::OpImageBlockMatchWindowSADQCOM)].operands.push(OperandId, "'target coordinates'"); InstructionDesc[enumCast(Op::OpImageBlockMatchWindowSADQCOM)].operands.push(OperandId, "'reference texture'"); InstructionDesc[enumCast(Op::OpImageBlockMatchWindowSADQCOM)].operands.push(OperandId, "'reference coordinates'"); InstructionDesc[enumCast(Op::OpImageBlockMatchWindowSADQCOM)].operands.push(OperandId, "'block size'"); InstructionDesc[enumCast(Op::OpImageBlockMatchWindowSADQCOM)].operands.push(OperandImageOperands, "", true); InstructionDesc[enumCast(Op::OpImageBlockMatchWindowSADQCOM)].setResultAndType(true, true); InstructionDesc[enumCast(Op::OpImageBlockMatchGatherSSDQCOM)].operands.push(OperandId, "'target texture'"); InstructionDesc[enumCast(Op::OpImageBlockMatchGatherSSDQCOM)].operands.push(OperandId, "'target coordinates'"); InstructionDesc[enumCast(Op::OpImageBlockMatchGatherSSDQCOM)].operands.push(OperandId, "'reference texture'"); InstructionDesc[enumCast(Op::OpImageBlockMatchGatherSSDQCOM)].operands.push(OperandId, "'reference coordinates'"); InstructionDesc[enumCast(Op::OpImageBlockMatchGatherSSDQCOM)].operands.push(OperandId, "'block size'"); InstructionDesc[enumCast(Op::OpImageBlockMatchGatherSSDQCOM)].operands.push(OperandImageOperands, "", true); InstructionDesc[enumCast(Op::OpImageBlockMatchGatherSSDQCOM)].setResultAndType(true, true); InstructionDesc[enumCast(Op::OpImageBlockMatchGatherSADQCOM)].operands.push(OperandId, "'target texture'"); InstructionDesc[enumCast(Op::OpImageBlockMatchGatherSADQCOM)].operands.push(OperandId, "'target coordinates'"); InstructionDesc[enumCast(Op::OpImageBlockMatchGatherSADQCOM)].operands.push(OperandId, "'reference texture'"); InstructionDesc[enumCast(Op::OpImageBlockMatchGatherSADQCOM)].operands.push(OperandId, "'reference coordinates'"); InstructionDesc[enumCast(Op::OpImageBlockMatchGatherSADQCOM)].operands.push(OperandId, "'block size'"); InstructionDesc[enumCast(Op::OpImageBlockMatchGatherSADQCOM)].operands.push(OperandImageOperands, "", true); InstructionDesc[enumCast(Op::OpImageBlockMatchGatherSADQCOM)].setResultAndType(true, true); InstructionDesc[enumCast(Op::OpConstantCompositeReplicateEXT)].operands.push(OperandId, "'Value'"); InstructionDesc[enumCast(Op::OpSpecConstantCompositeReplicateEXT)].operands.push(OperandId, "'Value'"); InstructionDesc[enumCast(Op::OpCompositeConstructReplicateEXT)].operands.push(OperandId, "'Value'"); InstructionDesc[enumCast(Op::OpCooperativeMatrixConvertNV)].operands.push(OperandId, "'Value'"); InstructionDesc[enumCast(Op::OpCooperativeMatrixTransposeNV)].operands.push(OperandId, "'Matrix'"); InstructionDesc[enumCast(Op::OpCooperativeMatrixReduceNV)].operands.push(OperandId, "'Matrix'"); InstructionDesc[enumCast(Op::OpCooperativeMatrixReduceNV)].operands.push(OperandLiteralNumber, "'ReduceMask'"); InstructionDesc[enumCast(Op::OpCooperativeMatrixReduceNV)].operands.push(OperandId, "'CombineFunc'"); InstructionDesc[enumCast(Op::OpCooperativeMatrixPerElementOpNV)].operands.push(OperandId, "'Matrix'"); InstructionDesc[enumCast(Op::OpCooperativeMatrixPerElementOpNV)].operands.push(OperandId, "'Operation'"); InstructionDesc[enumCast(Op::OpCooperativeMatrixPerElementOpNV)].operands.push(OperandVariableIds, "'Operands'"); InstructionDesc[enumCast(Op::OpCooperativeMatrixLoadTensorNV)].operands.push(OperandId, "'Pointer'"); InstructionDesc[enumCast(Op::OpCooperativeMatrixLoadTensorNV)].operands.push(OperandId, "'Object'"); InstructionDesc[enumCast(Op::OpCooperativeMatrixLoadTensorNV)].operands.push(OperandId, "'TensorLayout'"); InstructionDesc[enumCast(Op::OpCooperativeMatrixLoadTensorNV)].operands.push(OperandMemoryAccess, "'Memory Access'"); InstructionDesc[enumCast(Op::OpCooperativeMatrixLoadTensorNV)].operands.push(OperandTensorAddressingOperands, "'Tensor Addressing Operands'"); InstructionDesc[enumCast(Op::OpCooperativeMatrixStoreTensorNV)].operands.push(OperandId, "'Pointer'"); InstructionDesc[enumCast(Op::OpCooperativeMatrixStoreTensorNV)].operands.push(OperandId, "'Object'"); InstructionDesc[enumCast(Op::OpCooperativeMatrixStoreTensorNV)].operands.push(OperandId, "'TensorLayout'"); InstructionDesc[enumCast(Op::OpCooperativeMatrixStoreTensorNV)].operands.push(OperandMemoryAccess, "'Memory Access'"); InstructionDesc[enumCast(Op::OpCooperativeMatrixStoreTensorNV)].operands.push(OperandTensorAddressingOperands, "'Tensor Addressing Operands'"); InstructionDesc[enumCast(Op::OpCooperativeMatrixReduceNV)].operands.push(OperandId, "'Matrix'"); InstructionDesc[enumCast(Op::OpCooperativeMatrixReduceNV)].operands.push(OperandLiteralNumber, "'ReduceMask'"); InstructionDesc[enumCast(Op::OpTypeTensorLayoutNV)].operands.push(OperandId, "'Dim'"); InstructionDesc[enumCast(Op::OpTypeTensorLayoutNV)].operands.push(OperandId, "'ClampMode'"); InstructionDesc[enumCast(Op::OpTypeTensorViewNV)].operands.push(OperandId, "'Dim'"); InstructionDesc[enumCast(Op::OpTypeTensorViewNV)].operands.push(OperandId, "'HasDimensions'"); InstructionDesc[enumCast(Op::OpTypeTensorViewNV)].operands.push(OperandVariableIds, "'p'"); InstructionDesc[enumCast(Op::OpTensorLayoutSetBlockSizeNV)].operands.push(OperandId, "'TensorLayout'"); InstructionDesc[enumCast(Op::OpTensorLayoutSetBlockSizeNV)].operands.push(OperandVariableIds, "'BlockSize'"); InstructionDesc[enumCast(Op::OpTensorLayoutSetDimensionNV)].operands.push(OperandId, "'TensorLayout'"); InstructionDesc[enumCast(Op::OpTensorLayoutSetDimensionNV)].operands.push(OperandVariableIds, "'Dim'"); InstructionDesc[enumCast(Op::OpTensorLayoutSetStrideNV)].operands.push(OperandId, "'TensorLayout'"); InstructionDesc[enumCast(Op::OpTensorLayoutSetStrideNV)].operands.push(OperandVariableIds, "'Stride'"); InstructionDesc[enumCast(Op::OpTensorLayoutSliceNV)].operands.push(OperandId, "'TensorLayout'"); InstructionDesc[enumCast(Op::OpTensorLayoutSliceNV)].operands.push(OperandVariableIds, "'Operands'"); InstructionDesc[enumCast(Op::OpTensorLayoutSetClampValueNV)].operands.push(OperandId, "'TensorLayout'"); InstructionDesc[enumCast(Op::OpTensorLayoutSetClampValueNV)].operands.push(OperandId, "'Value'"); InstructionDesc[enumCast(Op::OpTensorViewSetDimensionNV)].operands.push(OperandId, "'TensorView'"); InstructionDesc[enumCast(Op::OpTensorViewSetDimensionNV)].operands.push(OperandVariableIds, "'Dim'"); InstructionDesc[enumCast(Op::OpTensorViewSetStrideNV)].operands.push(OperandId, "'TensorView'"); InstructionDesc[enumCast(Op::OpTensorViewSetStrideNV)].operands.push(OperandVariableIds, "'Stride'"); InstructionDesc[enumCast(Op::OpTensorViewSetClipNV)].operands.push(OperandId, "'TensorView'"); InstructionDesc[enumCast(Op::OpTensorViewSetClipNV)].operands.push(OperandId, "'ClipRowOffset'"); InstructionDesc[enumCast(Op::OpTensorViewSetClipNV)].operands.push(OperandId, "'ClipRowSpan'"); InstructionDesc[enumCast(Op::OpTensorViewSetClipNV)].operands.push(OperandId, "'ClipColOffset'"); InstructionDesc[enumCast(Op::OpTensorViewSetClipNV)].operands.push(OperandId, "'ClipColSpan'"); InstructionDesc[enumCast(Op::OpSDotKHR)].operands.push(OperandId, "'Vector1'"); InstructionDesc[enumCast(Op::OpSDotKHR)].operands.push(OperandId, "'Vector2'"); InstructionDesc[enumCast(Op::OpSDotKHR)].operands.push(OperandLiteralNumber, "'PackedVectorFormat'"); InstructionDesc[enumCast(Op::OpUDotKHR)].operands.push(OperandId, "'Vector1'"); InstructionDesc[enumCast(Op::OpUDotKHR)].operands.push(OperandId, "'Vector2'"); InstructionDesc[enumCast(Op::OpUDotKHR)].operands.push(OperandLiteralNumber, "'PackedVectorFormat'"); InstructionDesc[enumCast(Op::OpSUDotKHR)].operands.push(OperandId, "'Vector1'"); InstructionDesc[enumCast(Op::OpSUDotKHR)].operands.push(OperandId, "'Vector2'"); InstructionDesc[enumCast(Op::OpSUDotKHR)].operands.push(OperandLiteralNumber, "'PackedVectorFormat'"); InstructionDesc[enumCast(Op::OpSDotAccSatKHR)].operands.push(OperandId, "'Vector1'"); InstructionDesc[enumCast(Op::OpSDotAccSatKHR)].operands.push(OperandId, "'Vector2'"); InstructionDesc[enumCast(Op::OpSDotAccSatKHR)].operands.push(OperandId, "'Accumulator'"); InstructionDesc[enumCast(Op::OpSDotAccSatKHR)].operands.push(OperandLiteralNumber, "'PackedVectorFormat'"); InstructionDesc[enumCast(Op::OpUDotAccSatKHR)].operands.push(OperandId, "'Vector1'"); InstructionDesc[enumCast(Op::OpUDotAccSatKHR)].operands.push(OperandId, "'Vector2'"); InstructionDesc[enumCast(Op::OpUDotAccSatKHR)].operands.push(OperandId, "'Accumulator'"); InstructionDesc[enumCast(Op::OpUDotAccSatKHR)].operands.push(OperandLiteralNumber, "'PackedVectorFormat'"); InstructionDesc[enumCast(Op::OpSUDotAccSatKHR)].operands.push(OperandId, "'Vector1'"); InstructionDesc[enumCast(Op::OpSUDotAccSatKHR)].operands.push(OperandId, "'Vector2'"); InstructionDesc[enumCast(Op::OpSUDotAccSatKHR)].operands.push(OperandId, "'Accumulator'"); InstructionDesc[enumCast(Op::OpSUDotAccSatKHR)].operands.push(OperandLiteralNumber, "'PackedVectorFormat'"); }); } } // end spv namespace ================================================ FILE: src/libraries/glslang/SPIRV/doc.h ================================================ // // Copyright (C) 2014-2015 LunarG, Inc. // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following // disclaimer in the documentation and/or other materials provided // with the distribution. // // Neither the name of 3Dlabs Inc. Ltd. nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // // Parameterize the SPIR-V enumerants. // #pragma once #include "spirv.hpp11" #include namespace spv { // Fill in all the parameters void Parameterize(); // Return the English names of all the enums. const char* SourceString(int); const char* AddressingString(int); const char* MemoryString(int); const char* ExecutionModelString(int); const char* ExecutionModeString(int); const char* StorageClassString(int); const char* DecorationString(int); const char* BuiltInString(int); const char* DimensionString(int); const char* SelectControlString(int); const char* LoopControlString(int); const char* FunctionControlString(int); const char* SamplerAddressingModeString(int); const char* SamplerFilterModeString(int); const char* ImageFormatString(int); const char* ImageChannelOrderString(int); const char* ImageChannelTypeString(int); const char* ImageChannelDataTypeString(int type); const char* ImageOperandsString(int format); const char* ImageOperands(int); const char* FPFastMathString(int); const char* FPRoundingModeString(int); const char* LinkageTypeString(int); const char* FuncParamAttrString(int); const char* AccessQualifierString(int); const char* MemorySemanticsString(int); const char* MemoryAccessString(int); const char* ExecutionScopeString(int); const char* GroupOperationString(int); const char* KernelEnqueueFlagsString(int); const char* KernelProfilingInfoString(int); const char* CapabilityString(int); const char* OpcodeString(int); const char* ScopeString(int mem); // For grouping opcodes into subsections enum OpcodeClass { OpClassMisc, OpClassDebug, OpClassAnnotate, OpClassExtension, OpClassMode, OpClassType, OpClassConstant, OpClassMemory, OpClassFunction, OpClassImage, OpClassConvert, OpClassComposite, OpClassArithmetic, OpClassBit, OpClassRelationalLogical, OpClassDerivative, OpClassFlowControl, OpClassAtomic, OpClassPrimitive, OpClassBarrier, OpClassGroup, OpClassDeviceSideEnqueue, OpClassPipe, OpClassCount, OpClassMissing // all instructions start out as missing }; // For parameterizing operands. enum OperandClass { OperandNone, OperandId, OperandVariableIds, OperandOptionalLiteral, OperandOptionalLiteralString, OperandVariableLiterals, OperandVariableIdLiteral, OperandVariableLiteralId, OperandLiteralNumber, OperandLiteralString, OperandVariableLiteralStrings, OperandSource, OperandExecutionModel, OperandAddressing, OperandMemory, OperandExecutionMode, OperandStorage, OperandDimensionality, OperandSamplerAddressingMode, OperandSamplerFilterMode, OperandSamplerImageFormat, OperandImageChannelOrder, OperandImageChannelDataType, OperandImageOperands, OperandFPFastMath, OperandFPRoundingMode, OperandLinkageType, OperandAccessQualifier, OperandFuncParamAttr, OperandDecoration, OperandBuiltIn, OperandSelect, OperandLoop, OperandFunction, OperandMemorySemantics, OperandMemoryAccess, OperandScope, OperandGroupOperation, OperandKernelEnqueueFlags, OperandKernelProfilingInfo, OperandCapability, OperandCooperativeMatrixOperands, OperandTensorAddressingOperands, OperandOpcode, OperandCount }; // Any specific enum can have a set of capabilities that allow it: typedef std::vector EnumCaps; // Parameterize a set of operands with their OperandClass(es) and descriptions. class OperandParameters { public: OperandParameters() { } void push(OperandClass oc, const char* d, bool opt = false) { opClass.push_back(oc); desc.push_back(d); optional.push_back(opt); } void setOptional(); OperandClass getClass(int op) const { return opClass[op]; } const char* getDesc(int op) const { return desc[op]; } bool isOptional(int op) const { return optional[op]; } int getNum() const { return (int)opClass.size(); } protected: std::vector opClass; std::vector desc; std::vector optional; }; // Parameterize an enumerant class EnumParameters { public: EnumParameters() : desc(nullptr) { } const char* desc; }; // Parameterize a set of enumerants that form an enum class EnumDefinition : public EnumParameters { public: EnumDefinition() : ceiling(0), bitmask(false), getName(nullptr), enumParams(nullptr), operandParams(nullptr) { } void set(int ceil, const char* (*name)(int), EnumParameters* ep, bool mask = false) { ceiling = ceil; getName = name; bitmask = mask; enumParams = ep; } void setOperands(OperandParameters* op) { operandParams = op; } int ceiling; // ceiling of enumerants bool bitmask; // true if these enumerants combine into a bitmask const char* (*getName)(int); // a function that returns the name for each enumerant value (or shift) EnumParameters* enumParams; // parameters for each individual enumerant OperandParameters* operandParams; // sets of operands }; // Parameterize an instruction's logical format, including its known set of operands, // per OperandParameters above. class InstructionParameters { public: InstructionParameters() : opDesc("TBD"), opClass(OpClassMissing), typePresent(true), // most normal, only exceptions have to be spelled out resultPresent(true) // most normal, only exceptions have to be spelled out { } void setResultAndType(bool r, bool t) { resultPresent = r; typePresent = t; } bool hasResult() const { return resultPresent != 0; } bool hasType() const { return typePresent != 0; } const char* opDesc; OpcodeClass opClass; OperandParameters operands; protected: bool typePresent : 1; bool resultPresent : 1; }; // The set of objects that hold all the instruction/operand // parameterization information. extern InstructionParameters InstructionDesc[]; // These hold definitions of the enumerants used for operands extern EnumDefinition OperandClassParams[]; const char* GetOperandDesc(OperandClass operand); void PrintImmediateRow(int imm, const char* name, const EnumParameters* enumParams, bool caps, bool hex = false); const char* AccessQualifierString(int attr); void PrintOperands(const OperandParameters& operands, int reservedOperands); } // end namespace spv ================================================ FILE: src/libraries/glslang/SPIRV/hex_float.h ================================================ // Copyright (c) 2015-2016 The Khronos Group Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. #ifndef LIBSPIRV_UTIL_HEX_FLOAT_H_ #define LIBSPIRV_UTIL_HEX_FLOAT_H_ #include #include #include #include #include #include #include #include "bitutils.h" namespace spvutils { class Float16 { public: Float16(uint16_t v) : val(v) {} Float16() {} static bool isNan(const Float16& val) { return ((val.val & 0x7C00) == 0x7C00) && ((val.val & 0x3FF) != 0); } // Returns true if the given value is any kind of infinity. static bool isInfinity(const Float16& val) { return ((val.val & 0x7C00) == 0x7C00) && ((val.val & 0x3FF) == 0); } Float16(const Float16& other) { val = other.val; } uint16_t get_value() const { return val; } // Returns the maximum normal value. static Float16 max() { return Float16(0x7bff); } // Returns the lowest normal value. static Float16 lowest() { return Float16(0xfbff); } private: uint16_t val; }; class FloatE5M2 { public: FloatE5M2(uint8_t v) : val(v) {} FloatE5M2() {} static bool isNan(const FloatE5M2& val) { return ((val.val & 0x7C) == 0x7C) && ((val.val & 0x3) != 0); } // Returns true if the given value is any kind of infinity. static bool isInfinity(const FloatE5M2& val) { return ((val.val & 0x7C) == 0x7C) && ((val.val & 0x3) == 0); } FloatE5M2(const FloatE5M2& other) { val = other.val; } uint8_t get_value() const { return val; } // Returns the maximum normal value. static FloatE5M2 max() { return FloatE5M2(0x7B); } // Returns the lowest normal value. static FloatE5M2 lowest() { return FloatE5M2(0xFB); } private: uint8_t val; }; class FloatE4M3 { public: FloatE4M3(uint8_t v) : val(v) {} FloatE4M3() {} static bool isNan(const FloatE4M3& val) { return (val.val & 0x7F) == 0x7F; } // Returns true if the given value is any kind of infinity. static bool isInfinity(const FloatE4M3&) { return false; } FloatE4M3(const FloatE4M3& other) { val = other.val; } uint8_t get_value() const { return val; } // Returns the maximum normal value. static FloatE4M3 max() { return FloatE4M3(0x7E); } // Returns the lowest normal value. static FloatE4M3 lowest() { return FloatE4M3(0xFE); } private: uint8_t val; }; // To specialize this type, you must override uint_type to define // an unsigned integer that can fit your floating point type. // You must also add a isNan function that returns true if // a value is Nan. template struct FloatProxyTraits { typedef void uint_type; }; template <> struct FloatProxyTraits { typedef uint32_t uint_type; static bool isNan(float f) { return std::isnan(f); } // Returns true if the given value is any kind of infinity. static bool isInfinity(float f) { return std::isinf(f); } // Returns the maximum normal value. static float max() { return std::numeric_limits::max(); } // Returns the lowest normal value. static float lowest() { return std::numeric_limits::lowest(); } }; template <> struct FloatProxyTraits { typedef uint64_t uint_type; static bool isNan(double f) { return std::isnan(f); } // Returns true if the given value is any kind of infinity. static bool isInfinity(double f) { return std::isinf(f); } // Returns the maximum normal value. static double max() { return std::numeric_limits::max(); } // Returns the lowest normal value. static double lowest() { return std::numeric_limits::lowest(); } }; template <> struct FloatProxyTraits { typedef uint16_t uint_type; static bool isNan(Float16 f) { return Float16::isNan(f); } // Returns true if the given value is any kind of infinity. static bool isInfinity(Float16 f) { return Float16::isInfinity(f); } // Returns the maximum normal value. static Float16 max() { return Float16::max(); } // Returns the lowest normal value. static Float16 lowest() { return Float16::lowest(); } }; template <> struct FloatProxyTraits { typedef uint8_t uint_type; static bool isNan(FloatE5M2 f) { return FloatE5M2::isNan(f); } // Returns true if the given value is any kind of infinity. static bool isInfinity(FloatE5M2 f) { return FloatE5M2::isInfinity(f); } // Returns the maximum normal value. static FloatE5M2 max() { return FloatE5M2::max(); } // Returns the lowest normal value. static FloatE5M2 lowest() { return FloatE5M2::lowest(); } }; template <> struct FloatProxyTraits { typedef uint8_t uint_type; static bool isNan(FloatE4M3 f) { return FloatE4M3::isNan(f); } // Returns true if the given value is any kind of infinity. static bool isInfinity(FloatE4M3 f) { return FloatE4M3::isInfinity(f); } // Returns the maximum normal value. static FloatE4M3 max() { return FloatE4M3::max(); } // Returns the lowest normal value. static FloatE4M3 lowest() { return FloatE4M3::lowest(); } }; // Since copying a floating point number (especially if it is NaN) // does not guarantee that bits are preserved, this class lets us // store the type and use it as a float when necessary. template class FloatProxy { public: typedef typename FloatProxyTraits::uint_type uint_type; // Since this is to act similar to the normal floats, // do not initialize the data by default. FloatProxy() {} // Intentionally non-explicit. This is a proxy type so // implicit conversions allow us to use it more transparently. FloatProxy(T val) { data_ = BitwiseCast(val); } // Intentionally non-explicit. This is a proxy type so // implicit conversions allow us to use it more transparently. FloatProxy(uint_type val) { data_ = val; } // This is helpful to have and is guaranteed not to stomp bits. FloatProxy operator-() const { return static_cast(data_ ^ (uint_type(0x1) << (sizeof(T) * 8 - 1))); } // Returns the data as a floating point value. T getAsFloat() const { return BitwiseCast(data_); } // Returns the raw data. uint_type data() const { return data_; } // Returns true if the value represents any type of NaN. bool isNan() { return FloatProxyTraits::isNan(getAsFloat()); } // Returns true if the value represents any type of infinity. bool isInfinity() { return FloatProxyTraits::isInfinity(getAsFloat()); } // Returns the maximum normal value. static FloatProxy max() { return FloatProxy(FloatProxyTraits::max()); } // Returns the lowest normal value. static FloatProxy lowest() { return FloatProxy(FloatProxyTraits::lowest()); } private: uint_type data_; }; template bool operator==(const FloatProxy& first, const FloatProxy& second) { return first.data() == second.data(); } // Reads a FloatProxy value as a normal float from a stream. template std::istream& operator>>(std::istream& is, FloatProxy& value) { T float_val; is >> float_val; value = FloatProxy(float_val); return is; } // This is an example traits. It is not meant to be used in practice, but will // be the default for any non-specialized type. template struct HexFloatTraits { // Integer type that can store this hex-float. typedef void uint_type; // Signed integer type that can store this hex-float. typedef void int_type; // The numerical type that this HexFloat represents. typedef void underlying_type; // The type needed to construct the underlying type. typedef void native_type; // The number of bits that are actually relevant in the uint_type. // This allows us to deal with, for example, 24-bit values in a 32-bit // integer. static const uint32_t num_used_bits = 0; // Number of bits that represent the exponent. static const uint32_t num_exponent_bits = 0; // Number of bits that represent the fractional part. static const uint32_t num_fraction_bits = 0; // The bias of the exponent. (How much we need to subtract from the stored // value to get the correct value.) static const uint32_t exponent_bias = 0; }; // Traits for IEEE float. // 1 sign bit, 8 exponent bits, 23 fractional bits. template <> struct HexFloatTraits> { typedef uint32_t uint_type; typedef int32_t int_type; typedef FloatProxy underlying_type; typedef float native_type; static const uint_type num_used_bits = 32; static const uint_type num_exponent_bits = 8; static const uint_type num_fraction_bits = 23; static const uint_type exponent_bias = 127; }; // Traits for IEEE double. // 1 sign bit, 11 exponent bits, 52 fractional bits. template <> struct HexFloatTraits> { typedef uint64_t uint_type; typedef int64_t int_type; typedef FloatProxy underlying_type; typedef double native_type; static const uint_type num_used_bits = 64; static const uint_type num_exponent_bits = 11; static const uint_type num_fraction_bits = 52; static const uint_type exponent_bias = 1023; }; // Traits for IEEE half. // 1 sign bit, 5 exponent bits, 10 fractional bits. template <> struct HexFloatTraits> { typedef uint16_t uint_type; typedef int16_t int_type; typedef uint16_t underlying_type; typedef uint16_t native_type; static const uint_type num_used_bits = 16; static const uint_type num_exponent_bits = 5; static const uint_type num_fraction_bits = 10; static const uint_type exponent_bias = 15; }; template <> struct HexFloatTraits> { typedef uint8_t uint_type; typedef int8_t int_type; typedef uint8_t underlying_type; typedef uint8_t native_type; static const uint_type num_used_bits = 8; static const uint_type num_exponent_bits = 5; static const uint_type num_fraction_bits = 2; static const uint_type exponent_bias = 15; }; template <> struct HexFloatTraits> { typedef uint8_t uint_type; typedef int8_t int_type; typedef uint8_t underlying_type; typedef uint8_t native_type; static const uint_type num_used_bits = 8; static const uint_type num_exponent_bits = 4; static const uint_type num_fraction_bits = 3; static const uint_type exponent_bias = 7; }; enum round_direction { kRoundToZero, kRoundToNearestEven, kRoundToPositiveInfinity, kRoundToNegativeInfinity }; // Template class that houses a floating pointer number. // It exposes a number of constants based on the provided traits to // assist in interpreting the bits of the value. template > class HexFloat { public: typedef typename Traits::uint_type uint_type; typedef typename Traits::int_type int_type; typedef typename Traits::underlying_type underlying_type; typedef typename Traits::native_type native_type; explicit HexFloat(T f) : value_(f) {} T value() const { return value_; } void set_value(T f) { value_ = f; } // These are all written like this because it is convenient to have // compile-time constants for all of these values. // Pass-through values to save typing. static const uint32_t num_used_bits = Traits::num_used_bits; static const uint32_t exponent_bias = Traits::exponent_bias; static const uint32_t num_exponent_bits = Traits::num_exponent_bits; static const uint32_t num_fraction_bits = Traits::num_fraction_bits; // Number of bits to shift left to set the highest relevant bit. static const uint32_t top_bit_left_shift = num_used_bits - 1; // How many nibbles (hex characters) the fractional part takes up. static const uint32_t fraction_nibbles = (num_fraction_bits + 3) / 4; // If the fractional part does not fit evenly into a hex character (4-bits) // then we have to left-shift to get rid of leading 0s. This is the amount // we have to shift (might be 0). static const uint32_t num_overflow_bits = fraction_nibbles * 4 - num_fraction_bits; // The representation of the fraction, not the actual bits. This // includes the leading bit that is usually implicit. static const uint_type fraction_represent_mask = spvutils::SetBits::get; // The topmost bit in the nibble-aligned fraction. static const uint_type fraction_top_bit = uint_type(1) << (num_fraction_bits + num_overflow_bits - 1); // The least significant bit in the exponent, which is also the bit // immediately to the left of the significand. static const uint_type first_exponent_bit = uint_type(1) << (num_fraction_bits); // The mask for the encoded fraction. It does not include the // implicit bit. static const uint_type fraction_encode_mask = spvutils::SetBits::get; // The bit that is used as a sign. static const uint_type sign_mask = uint_type(1) << top_bit_left_shift; // The bits that represent the exponent. static const uint_type exponent_mask = spvutils::SetBits::get; // How far left the exponent is shifted. static const uint32_t exponent_left_shift = num_fraction_bits; // How far from the right edge the fraction is shifted. static const uint32_t fraction_right_shift = static_cast(sizeof(uint_type) * 8) - num_fraction_bits; // The maximum representable unbiased exponent. static const int_type max_exponent = (exponent_mask >> num_fraction_bits) - exponent_bias; // The minimum representable exponent for normalized numbers. static const int_type min_exponent = -static_cast(exponent_bias); // Returns the bits associated with the value. uint_type getBits() const { return spvutils::BitwiseCast(value_); } // Returns the bits associated with the value, without the leading sign bit. uint_type getUnsignedBits() const { return static_cast(spvutils::BitwiseCast(value_) & ~sign_mask); } // Returns the bits associated with the exponent, shifted to start at the // lsb of the type. const uint_type getExponentBits() const { return static_cast((getBits() & exponent_mask) >> num_fraction_bits); } // Returns the exponent in unbiased form. This is the exponent in the // human-friendly form. const int_type getUnbiasedExponent() const { return static_cast(getExponentBits() - exponent_bias); } // Returns just the significand bits from the value. const uint_type getSignificandBits() const { return getBits() & fraction_encode_mask; } // If the number was normalized, returns the unbiased exponent. // If the number was denormal, normalize the exponent first. const int_type getUnbiasedNormalizedExponent() const { if ((getBits() & ~sign_mask) == 0) { // special case if everything is 0 return 0; } int_type exp = getUnbiasedExponent(); if (exp == min_exponent) { // We are in denorm land. uint_type significand_bits = getSignificandBits(); while ((significand_bits & (first_exponent_bit >> 1)) == 0) { significand_bits = static_cast(significand_bits << 1); exp = static_cast(exp - 1); } significand_bits &= fraction_encode_mask; } return exp; } // Returns the signficand after it has been normalized. const uint_type getNormalizedSignificand() const { int_type unbiased_exponent = getUnbiasedNormalizedExponent(); uint_type significand = getSignificandBits(); for (int_type i = unbiased_exponent; i <= min_exponent; ++i) { significand = static_cast(significand << 1); } significand &= fraction_encode_mask; return significand; } // Returns true if this number represents a negative value. bool isNegative() const { return (getBits() & sign_mask) != 0; } // Sets this HexFloat from the individual components. // Note this assumes EVERY significand is normalized, and has an implicit // leading one. This means that the only way that this method will set 0, // is if you set a number so denormalized that it underflows. // Do not use this method with raw bits extracted from a subnormal number, // since subnormals do not have an implicit leading 1 in the significand. // The significand is also expected to be in the // lowest-most num_fraction_bits of the uint_type. // The exponent is expected to be unbiased, meaning an exponent of // 0 actually means 0. // If underflow_round_up is set, then on underflow, if a number is non-0 // and would underflow, we round up to the smallest denorm. void setFromSignUnbiasedExponentAndNormalizedSignificand( bool negative, int_type exponent, uint_type significand, bool round_denorm_up) { bool significand_is_zero = significand == 0; if (exponent <= min_exponent) { // If this was denormalized, then we have to shift the bit on, meaning // the significand is not zero. significand_is_zero = false; significand |= first_exponent_bit; significand = static_cast(significand >> 1); } while (exponent < min_exponent) { significand = static_cast(significand >> 1); ++exponent; } if (exponent == min_exponent) { if (significand == 0 && !significand_is_zero && round_denorm_up) { significand = static_cast(0x1); } } uint_type new_value = 0; if (negative) { new_value = static_cast(new_value | sign_mask); } exponent = static_cast(exponent + exponent_bias); assert(exponent >= 0); // put it all together exponent = static_cast((exponent << exponent_left_shift) & exponent_mask); significand = static_cast(significand & fraction_encode_mask); new_value = static_cast(new_value | (exponent | significand)); value_ = BitwiseCast(new_value); } // Increments the significand of this number by the given amount. // If this would spill the significand into the implicit bit, // carry is set to true and the significand is shifted to fit into // the correct location, otherwise carry is set to false. // All significands and to_increment are assumed to be within the bounds // for a valid significand. static uint_type incrementSignificand(uint_type significand, uint_type to_increment, bool* carry) { significand = static_cast(significand + to_increment); *carry = false; if (significand & first_exponent_bit) { *carry = true; // The implicit 1-bit will have carried, so we should zero-out the // top bit and shift back. significand = static_cast(significand & ~first_exponent_bit); significand = static_cast(significand >> 1); } return significand; } // These exist because MSVC throws warnings on negative right-shifts // even if they are not going to be executed. Eg: // constant_number < 0? 0: constant_number // These convert the negative left-shifts into right shifts. template uint_type negatable_left_shift(int_type N, uint_type val) { if(N >= 0) return val << N; return val >> -N; } template uint_type negatable_right_shift(int_type N, uint_type val) { if(N >= 0) return val >> N; return val << -N; } // Returns the significand, rounded to fit in a significand in // other_T. This is shifted so that the most significant // bit of the rounded number lines up with the most significant bit // of the returned significand. template typename other_T::uint_type getRoundedNormalizedSignificand( round_direction dir, bool* carry_bit) { typedef typename other_T::uint_type other_uint_type; static const int_type num_throwaway_bits = static_cast(num_fraction_bits) - static_cast(other_T::num_fraction_bits); static const uint_type last_significant_bit = (num_throwaway_bits < 0) ? 0 : negatable_left_shift(num_throwaway_bits, 1u); static const uint_type first_rounded_bit = (num_throwaway_bits < 1) ? 0 : negatable_left_shift(num_throwaway_bits - 1, 1u); static const uint_type throwaway_mask_bits = num_throwaway_bits > 0 ? num_throwaway_bits : 0; static const uint_type throwaway_mask = spvutils::SetBits::get; *carry_bit = false; other_uint_type out_val = 0; uint_type significand = getNormalizedSignificand(); // If we are up-casting, then we just have to shift to the right location. if (num_throwaway_bits <= 0) { out_val = static_cast(significand); uint_type shift_amount = static_cast(-num_throwaway_bits); out_val = static_cast(out_val << shift_amount); return out_val; } // If every non-representable bit is 0, then we don't have any casting to // do. if ((significand & throwaway_mask) == 0) { return static_cast( negatable_right_shift(num_throwaway_bits, significand)); } bool round_away_from_zero = false; // We actually have to narrow the significand here, so we have to follow the // rounding rules. switch (dir) { case kRoundToZero: break; case kRoundToPositiveInfinity: round_away_from_zero = !isNegative(); break; case kRoundToNegativeInfinity: round_away_from_zero = isNegative(); break; case kRoundToNearestEven: // Have to round down, round bit is 0 if ((first_rounded_bit & significand) == 0) { break; } if (((significand & throwaway_mask) & ~first_rounded_bit) != 0) { // If any subsequent bit of the rounded portion is non-0 then we round // up. round_away_from_zero = true; break; } // We are exactly half-way between 2 numbers, pick even. if ((significand & last_significant_bit) != 0) { // 1 for our last bit, round up. round_away_from_zero = true; break; } break; } if (round_away_from_zero) { return static_cast( negatable_right_shift(num_throwaway_bits, incrementSignificand( significand, last_significant_bit, carry_bit))); } else { return static_cast( negatable_right_shift(num_throwaway_bits, significand)); } } // Casts this value to another HexFloat. If the cast is widening, // then round_dir is ignored. If the cast is narrowing, then // the result is rounded in the direction specified. // This number will retain Nan and Inf values. // It will also saturate to Inf if the number overflows, and // underflow to (0 or min depending on rounding) if the number underflows. template void castTo(other_T& other, round_direction round_dir) { other = other_T(static_cast(0)); bool negate = isNegative(); if (getUnsignedBits() == 0) { if (negate) { other.set_value(-other.value()); } return; } uint_type significand = getSignificandBits(); bool carried = false; typename other_T::uint_type rounded_significand = getRoundedNormalizedSignificand(round_dir, &carried); int_type exponent = getUnbiasedExponent(); if (exponent == min_exponent) { // If we are denormal, normalize the exponent, so that we can encode // easily. exponent = static_cast(exponent + 1); for (uint_type check_bit = first_exponent_bit >> 1; check_bit != 0; check_bit = static_cast(check_bit >> 1)) { exponent = static_cast(exponent - 1); if (check_bit & significand) break; } } bool is_nan = (getBits() & exponent_mask) == exponent_mask && significand != 0; bool is_inf = !is_nan && ((exponent + carried) > static_cast(other_T::exponent_bias) || (significand == 0 && (getBits() & exponent_mask) == exponent_mask)); // If we are Nan or Inf we should pass that through. if (is_inf) { other.set_value(BitwiseCast( static_cast( (negate ? other_T::sign_mask : 0) | other_T::exponent_mask))); return; } if (is_nan) { typename other_T::uint_type shifted_significand; shifted_significand = static_cast( negatable_left_shift( static_cast(other_T::num_fraction_bits) - static_cast(num_fraction_bits), significand)); // We are some sort of Nan. We try to keep the bit-pattern of the Nan // as close as possible. If we had to shift off bits so we are 0, then we // just set the last bit. other.set_value(BitwiseCast( static_cast( (negate ? other_T::sign_mask : 0) | other_T::exponent_mask | (shifted_significand == 0 ? 0x1 : shifted_significand)))); return; } bool round_underflow_up = isNegative() ? round_dir == kRoundToNegativeInfinity : round_dir == kRoundToPositiveInfinity; typedef typename other_T::int_type other_int_type; // setFromSignUnbiasedExponentAndNormalizedSignificand will // zero out any underflowing value (but retain the sign). other.setFromSignUnbiasedExponentAndNormalizedSignificand( negate, static_cast(exponent), rounded_significand, round_underflow_up); return; } private: T value_; static_assert(num_used_bits == Traits::num_exponent_bits + Traits::num_fraction_bits + 1, "The number of bits do not fit"); static_assert(sizeof(T) == sizeof(uint_type), "The type sizes do not match"); }; // Returns 4 bits represented by the hex character. inline uint8_t get_nibble_from_character(int character) { const char* dec = "0123456789"; const char* lower = "abcdef"; const char* upper = "ABCDEF"; const char* p = nullptr; if ((p = strchr(dec, character))) { return static_cast(p - dec); } else if ((p = strchr(lower, character))) { return static_cast(p - lower + 0xa); } else if ((p = strchr(upper, character))) { return static_cast(p - upper + 0xa); } assert(false && "This was called with a non-hex character"); return 0; } // Outputs the given HexFloat to the stream. template std::ostream& operator<<(std::ostream& os, const HexFloat& value) { typedef HexFloat HF; typedef typename HF::uint_type uint_type; typedef typename HF::int_type int_type; static_assert(HF::num_used_bits != 0, "num_used_bits must be non-zero for a valid float"); static_assert(HF::num_exponent_bits != 0, "num_exponent_bits must be non-zero for a valid float"); static_assert(HF::num_fraction_bits != 0, "num_fractin_bits must be non-zero for a valid float"); const uint_type bits = spvutils::BitwiseCast(value.value()); const char* const sign = (bits & HF::sign_mask) ? "-" : ""; const uint_type exponent = static_cast( (bits & HF::exponent_mask) >> HF::num_fraction_bits); uint_type fraction = static_cast((bits & HF::fraction_encode_mask) << HF::num_overflow_bits); const bool is_zero = exponent == 0 && fraction == 0; const bool is_denorm = exponent == 0 && !is_zero; // exponent contains the biased exponent we have to convert it back into // the normal range. int_type int_exponent = static_cast(exponent - HF::exponent_bias); // If the number is all zeros, then we actually have to NOT shift the // exponent. int_exponent = is_zero ? 0 : int_exponent; // If we are denorm, then start shifting, and decreasing the exponent until // our leading bit is 1. if (is_denorm) { while ((fraction & HF::fraction_top_bit) == 0) { fraction = static_cast(fraction << 1); int_exponent = static_cast(int_exponent - 1); } // Since this is denormalized, we have to consume the leading 1 since it // will end up being implicit. fraction = static_cast(fraction << 1); // eat the leading 1 fraction &= HF::fraction_represent_mask; } uint_type fraction_nibbles = HF::fraction_nibbles; // We do not have to display any trailing 0s, since this represents the // fractional part. while (fraction_nibbles > 0 && (fraction & 0xF) == 0) { // Shift off any trailing values; fraction = static_cast(fraction >> 4); --fraction_nibbles; } const auto saved_flags = os.flags(); const auto saved_fill = os.fill(); os << sign << "0x" << (is_zero ? '0' : '1'); if (fraction_nibbles) { // Make sure to keep the leading 0s in place, since this is the fractional // part. os << "." << std::setw(static_cast(fraction_nibbles)) << std::setfill('0') << std::hex << fraction; } os << "p" << std::dec << (int_exponent >= 0 ? "+" : "") << int_exponent; os.flags(saved_flags); os.fill(saved_fill); return os; } // Returns true if negate_value is true and the next character on the // input stream is a plus or minus sign. In that case we also set the fail bit // on the stream and set the value to the zero value for its type. template inline bool RejectParseDueToLeadingSign(std::istream& is, bool negate_value, HexFloat& value) { if (negate_value) { auto next_char = is.peek(); if (next_char == '-' || next_char == '+') { // Fail the parse. Emulate standard behaviour by setting the value to // the zero value, and set the fail bit on the stream. value = HexFloat(typename HexFloat::uint_type(0)); is.setstate(std::ios_base::failbit); return true; } } return false; } // Parses a floating point number from the given stream and stores it into the // value parameter. // If negate_value is true then the number may not have a leading minus or // plus, and if it successfully parses, then the number is negated before // being stored into the value parameter. // If the value cannot be correctly parsed or overflows the target floating // point type, then set the fail bit on the stream. // TODO(dneto): Promise C++11 standard behavior in how the value is set in // the error case, but only after all target platforms implement it correctly. // In particular, the Microsoft C++ runtime appears to be out of spec. template inline std::istream& ParseNormalFloat(std::istream& is, bool negate_value, HexFloat& value) { if (RejectParseDueToLeadingSign(is, negate_value, value)) { return is; } T val; is >> val; if (negate_value) { val = -val; } value.set_value(val); // In the failure case, map -0.0 to 0.0. if (is.fail() && value.getUnsignedBits() == 0u) { value = HexFloat(typename HexFloat::uint_type(0)); } if (val.isInfinity()) { // Fail the parse. Emulate standard behaviour by setting the value to // the closest normal value, and set the fail bit on the stream. value.set_value((value.isNegative() || negate_value) ? T::lowest() : T::max()); is.setstate(std::ios_base::failbit); } return is; } // Specialization of ParseNormalFloat for FloatProxy values. // This will parse the float as it were a 32-bit floating point number, // and then round it down to fit into a Float16 value. // The number is rounded towards zero. // If negate_value is true then the number may not have a leading minus or // plus, and if it successfully parses, then the number is negated before // being stored into the value parameter. // If the value cannot be correctly parsed or overflows the target floating // point type, then set the fail bit on the stream. // TODO(dneto): Promise C++11 standard behavior in how the value is set in // the error case, but only after all target platforms implement it correctly. // In particular, the Microsoft C++ runtime appears to be out of spec. template <> inline std::istream& ParseNormalFloat, HexFloatTraits>>( std::istream& is, bool negate_value, HexFloat, HexFloatTraits>>& value) { // First parse as a 32-bit float. HexFloat> float_val(0.0f); ParseNormalFloat(is, negate_value, float_val); // Then convert to 16-bit float, saturating at infinities, and // rounding toward zero. float_val.castTo(value, kRoundToZero); // Overflow on 16-bit behaves the same as for 32- and 64-bit: set the // fail bit and set the lowest or highest value. if (Float16::isInfinity(value.value().getAsFloat())) { value.set_value(value.isNegative() ? Float16::lowest() : Float16::max()); is.setstate(std::ios_base::failbit); } return is; } // Reads a HexFloat from the given stream. // If the float is not encoded as a hex-float then it will be parsed // as a regular float. // This may fail if your stream does not support at least one unget. // Nan values can be encoded with "0x1.p+exponent_bias". // This would normally overflow a float and round to // infinity but this special pattern is the exact representation for a NaN, // and therefore is actually encoded as the correct NaN. To encode inf, // either 0x0p+exponent_bias can be specified or any exponent greater than // exponent_bias. // Examples using IEEE 32-bit float encoding. // 0x1.0p+128 (+inf) // -0x1.0p-128 (-inf) // // 0x1.1p+128 (+Nan) // -0x1.1p+128 (-Nan) // // 0x1p+129 (+inf) // -0x1p+129 (-inf) template std::istream& operator>>(std::istream& is, HexFloat& value) { using HF = HexFloat; using uint_type = typename HF::uint_type; using int_type = typename HF::int_type; value.set_value(static_cast(0.f)); if (is.flags() & std::ios::skipws) { // If the user wants to skip whitespace , then we should obey that. while (std::isspace(is.peek())) { is.get(); } } auto next_char = is.peek(); bool negate_value = false; if (next_char != '-' && next_char != '0') { return ParseNormalFloat(is, negate_value, value); } if (next_char == '-') { negate_value = true; is.get(); next_char = is.peek(); } if (next_char == '0') { is.get(); // We may have to unget this. auto maybe_hex_start = is.peek(); if (maybe_hex_start != 'x' && maybe_hex_start != 'X') { is.unget(); return ParseNormalFloat(is, negate_value, value); } else { is.get(); // Throw away the 'x'; } } else { return ParseNormalFloat(is, negate_value, value); } // This "looks" like a hex-float so treat it as one. bool seen_p = false; bool seen_dot = false; uint_type fraction_index = 0; uint_type fraction = 0; int_type exponent = HF::exponent_bias; // Strip off leading zeros so we don't have to special-case them later. while ((next_char = is.peek()) == '0') { is.get(); } bool is_denorm = true; // Assume denorm "representation" until we hear otherwise. // NB: This does not mean the value is actually denorm, // it just means that it was written 0. bool bits_written = false; // Stays false until we write a bit. while (!seen_p && !seen_dot) { // Handle characters that are left of the fractional part. if (next_char == '.') { seen_dot = true; } else if (next_char == 'p') { seen_p = true; } else if (::isxdigit(next_char)) { // We know this is not denormalized since we have stripped all leading // zeroes and we are not a ".". is_denorm = false; int number = get_nibble_from_character(next_char); for (int i = 0; i < 4; ++i, number <<= 1) { uint_type write_bit = (number & 0x8) ? 0x1 : 0x0; if (bits_written) { // If we are here the bits represented belong in the fractional // part of the float, and we have to adjust the exponent accordingly. fraction = static_cast( fraction | static_cast( write_bit << (HF::top_bit_left_shift - fraction_index++))); exponent = static_cast(exponent + 1); } bits_written |= write_bit != 0; } } else { // We have not found our exponent yet, so we have to fail. is.setstate(std::ios::failbit); return is; } is.get(); next_char = is.peek(); } bits_written = false; while (seen_dot && !seen_p) { // Handle only fractional parts now. if (next_char == 'p') { seen_p = true; } else if (::isxdigit(next_char)) { int number = get_nibble_from_character(next_char); for (int i = 0; i < 4; ++i, number <<= 1) { uint_type write_bit = (number & 0x8) ? 0x01 : 0x00; bits_written |= write_bit != 0; if (is_denorm && !bits_written) { // Handle modifying the exponent here this way we can handle // an arbitrary number of hex values without overflowing our // integer. exponent = static_cast(exponent - 1); } else { fraction = static_cast( fraction | static_cast( write_bit << (HF::top_bit_left_shift - fraction_index++))); } } } else { // We still have not found our 'p' exponent yet, so this is not a valid // hex-float. is.setstate(std::ios::failbit); return is; } is.get(); next_char = is.peek(); } bool seen_sign = false; int8_t exponent_sign = 1; int_type written_exponent = 0; while (true) { if ((next_char == '-' || next_char == '+')) { if (seen_sign) { is.setstate(std::ios::failbit); return is; } seen_sign = true; exponent_sign = (next_char == '-') ? -1 : 1; } else if (::isdigit(next_char)) { // Hex-floats express their exponent as decimal. written_exponent = static_cast(written_exponent * 10); written_exponent = static_cast(written_exponent + (next_char - '0')); } else { break; } is.get(); next_char = is.peek(); } written_exponent = static_cast(written_exponent * exponent_sign); exponent = static_cast(exponent + written_exponent); bool is_zero = is_denorm && (fraction == 0); if (is_denorm && !is_zero) { fraction = static_cast(fraction << 1); exponent = static_cast(exponent - 1); } else if (is_zero) { exponent = 0; } if (exponent <= 0 && !is_zero) { fraction = static_cast(fraction >> 1); fraction |= static_cast(1) << HF::top_bit_left_shift; } fraction = (fraction >> HF::fraction_right_shift) & HF::fraction_encode_mask; const int_type max_exponent = SetBits::get; // Handle actual denorm numbers while (exponent < 0 && !is_zero) { fraction = static_cast(fraction >> 1); exponent = static_cast(exponent + 1); fraction &= HF::fraction_encode_mask; if (fraction == 0) { // We have underflowed our fraction. We should clamp to zero. is_zero = true; exponent = 0; } } // We have overflowed so we should be inf/-inf. if (exponent > max_exponent) { exponent = max_exponent; fraction = 0; } uint_type output_bits = static_cast( static_cast(negate_value ? 1 : 0) << HF::top_bit_left_shift); output_bits |= fraction; uint_type shifted_exponent = static_cast( static_cast(exponent << HF::exponent_left_shift) & HF::exponent_mask); output_bits |= shifted_exponent; T output_float = spvutils::BitwiseCast(output_bits); value.set_value(output_float); return is; } // Writes a FloatProxy value to a stream. // Zero and normal numbers are printed in the usual notation, but with // enough digits to fully reproduce the value. Other values (subnormal, // NaN, and infinity) are printed as a hex float. template std::ostream& operator<<(std::ostream& os, const FloatProxy& value) { auto float_val = value.getAsFloat(); switch (std::fpclassify(float_val)) { case FP_ZERO: case FP_NORMAL: { auto saved_precision = os.precision(); os.precision(std::numeric_limits::digits10); os << float_val; os.precision(saved_precision); } break; default: os << HexFloat>(value); break; } return os; } template <> inline std::ostream& operator<<(std::ostream& os, const FloatProxy& value) { os << HexFloat>(value); return os; } } #endif // LIBSPIRV_UTIL_HEX_FLOAT_H_ ================================================ FILE: src/libraries/glslang/SPIRV/spirv.hpp11 ================================================ // Copyright (c) 2014-2024 The Khronos Group Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and/or associated documentation files (the "Materials"), // to deal in the Materials without restriction, including without limitation // the rights to use, copy, modify, merge, publish, distribute, sublicense, // and/or sell copies of the Materials, and to permit persons to whom the // Materials are furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Materials. // // MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS // STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND // HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/ // // THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING // FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS // IN THE MATERIALS. // This header is automatically generated by the same tool that creates // the Binary Section of the SPIR-V specification. // Enumeration tokens for SPIR-V, in various styles: // C, C++, C++11, JSON, Lua, Python, C#, D, Beef // // - C will have tokens with a "Spv" prefix, e.g.: SpvSourceLanguageGLSL // - C++ will have tokens in the "spv" name space, e.g.: spv::SourceLanguageGLSL // - C++11 will use enum classes in the spv namespace, e.g.: spv::SourceLanguage::GLSL // - Lua will use tables, e.g.: spv.SourceLanguage.GLSL // - Python will use dictionaries, e.g.: spv['SourceLanguage']['GLSL'] // - C# will use enum classes in the Specification class located in the "Spv" namespace, // e.g.: Spv.Specification.SourceLanguage.GLSL // - D will have tokens under the "spv" module, e.g: spv.SourceLanguage.GLSL // - Beef will use enum classes in the Specification class located in the "Spv" namespace, // e.g.: Spv.Specification.SourceLanguage.GLSL // // Some tokens act like mask values, which can be OR'd together, // while others are mutually exclusive. The mask-like ones have // "Mask" in their name, and a parallel enum that has the shift // amount (1 << x) for each corresponding enumerant. #ifndef spirv_HPP #define spirv_HPP namespace spv { typedef unsigned int Id; #define SPV_VERSION 0x10600 #define SPV_REVISION 1 static const unsigned int MagicNumber = 0x07230203; static const unsigned int Version = 0x00010600; static const unsigned int Revision = 1; static const unsigned int OpCodeMask = 0xffff; static const unsigned int WordCountShift = 16; enum class SourceLanguage : unsigned { Unknown = 0, ESSL = 1, GLSL = 2, OpenCL_C = 3, OpenCL_CPP = 4, HLSL = 5, CPP_for_OpenCL = 6, SYCL = 7, HERO_C = 8, NZSL = 9, WGSL = 10, Slang = 11, Zig = 12, Rust = 13, Max = 0x7fffffff, }; enum class ExecutionModel : unsigned { Vertex = 0, TessellationControl = 1, TessellationEvaluation = 2, Geometry = 3, Fragment = 4, GLCompute = 5, Kernel = 6, TaskNV = 5267, MeshNV = 5268, RayGenerationKHR = 5313, RayGenerationNV = 5313, IntersectionKHR = 5314, IntersectionNV = 5314, AnyHitKHR = 5315, AnyHitNV = 5315, ClosestHitKHR = 5316, ClosestHitNV = 5316, MissKHR = 5317, MissNV = 5317, CallableKHR = 5318, CallableNV = 5318, TaskEXT = 5364, MeshEXT = 5365, Max = 0x7fffffff, }; enum class AddressingModel : unsigned { Logical = 0, Physical32 = 1, Physical64 = 2, PhysicalStorageBuffer64 = 5348, PhysicalStorageBuffer64EXT = 5348, Max = 0x7fffffff, }; enum class MemoryModel : unsigned { Simple = 0, GLSL450 = 1, OpenCL = 2, Vulkan = 3, VulkanKHR = 3, Max = 0x7fffffff, }; enum class ExecutionMode : unsigned { Invocations = 0, SpacingEqual = 1, SpacingFractionalEven = 2, SpacingFractionalOdd = 3, VertexOrderCw = 4, VertexOrderCcw = 5, PixelCenterInteger = 6, OriginUpperLeft = 7, OriginLowerLeft = 8, EarlyFragmentTests = 9, PointMode = 10, Xfb = 11, DepthReplacing = 12, DepthGreater = 14, DepthLess = 15, DepthUnchanged = 16, LocalSize = 17, LocalSizeHint = 18, InputPoints = 19, InputLines = 20, InputLinesAdjacency = 21, Triangles = 22, InputTrianglesAdjacency = 23, Quads = 24, Isolines = 25, OutputVertices = 26, OutputPoints = 27, OutputLineStrip = 28, OutputTriangleStrip = 29, VecTypeHint = 30, ContractionOff = 31, Initializer = 33, Finalizer = 34, SubgroupSize = 35, SubgroupsPerWorkgroup = 36, SubgroupsPerWorkgroupId = 37, LocalSizeId = 38, LocalSizeHintId = 39, NonCoherentColorAttachmentReadEXT = 4169, NonCoherentDepthAttachmentReadEXT = 4170, NonCoherentStencilAttachmentReadEXT = 4171, SubgroupUniformControlFlowKHR = 4421, PostDepthCoverage = 4446, DenormPreserve = 4459, DenormFlushToZero = 4460, SignedZeroInfNanPreserve = 4461, RoundingModeRTE = 4462, RoundingModeRTZ = 4463, NonCoherentTileAttachmentReadQCOM = 4489, TileShadingRateQCOM = 4490, EarlyAndLateFragmentTestsAMD = 5017, StencilRefReplacingEXT = 5027, CoalescingAMDX = 5069, IsApiEntryAMDX = 5070, MaxNodeRecursionAMDX = 5071, StaticNumWorkgroupsAMDX = 5072, ShaderIndexAMDX = 5073, MaxNumWorkgroupsAMDX = 5077, StencilRefUnchangedFrontAMD = 5079, StencilRefGreaterFrontAMD = 5080, StencilRefLessFrontAMD = 5081, StencilRefUnchangedBackAMD = 5082, StencilRefGreaterBackAMD = 5083, StencilRefLessBackAMD = 5084, QuadDerivativesKHR = 5088, RequireFullQuadsKHR = 5089, SharesInputWithAMDX = 5102, OutputLinesEXT = 5269, OutputLinesNV = 5269, OutputPrimitivesEXT = 5270, OutputPrimitivesNV = 5270, DerivativeGroupQuadsKHR = 5289, DerivativeGroupQuadsNV = 5289, DerivativeGroupLinearKHR = 5290, DerivativeGroupLinearNV = 5290, OutputTrianglesEXT = 5298, OutputTrianglesNV = 5298, PixelInterlockOrderedEXT = 5366, PixelInterlockUnorderedEXT = 5367, SampleInterlockOrderedEXT = 5368, SampleInterlockUnorderedEXT = 5369, ShadingRateInterlockOrderedEXT = 5370, ShadingRateInterlockUnorderedEXT = 5371, SharedLocalMemorySizeINTEL = 5618, RoundingModeRTPINTEL = 5620, RoundingModeRTNINTEL = 5621, FloatingPointModeALTINTEL = 5622, FloatingPointModeIEEEINTEL = 5623, MaxWorkgroupSizeINTEL = 5893, MaxWorkDimINTEL = 5894, NoGlobalOffsetINTEL = 5895, NumSIMDWorkitemsINTEL = 5896, SchedulerTargetFmaxMhzINTEL = 5903, MaximallyReconvergesKHR = 6023, FPFastMathDefault = 6028, StreamingInterfaceINTEL = 6154, RegisterMapInterfaceINTEL = 6160, NamedBarrierCountINTEL = 6417, MaximumRegistersINTEL = 6461, MaximumRegistersIdINTEL = 6462, NamedMaximumRegistersINTEL = 6463, Max = 0x7fffffff, }; enum class StorageClass : unsigned { UniformConstant = 0, Input = 1, Uniform = 2, Output = 3, Workgroup = 4, CrossWorkgroup = 5, Private = 6, Function = 7, Generic = 8, PushConstant = 9, AtomicCounter = 10, Image = 11, StorageBuffer = 12, TileImageEXT = 4172, TileAttachmentQCOM = 4491, NodePayloadAMDX = 5068, CallableDataKHR = 5328, CallableDataNV = 5328, IncomingCallableDataKHR = 5329, IncomingCallableDataNV = 5329, RayPayloadKHR = 5338, RayPayloadNV = 5338, HitAttributeKHR = 5339, HitAttributeNV = 5339, IncomingRayPayloadKHR = 5342, IncomingRayPayloadNV = 5342, ShaderRecordBufferKHR = 5343, ShaderRecordBufferNV = 5343, PhysicalStorageBuffer = 5349, PhysicalStorageBufferEXT = 5349, HitObjectAttributeNV = 5385, TaskPayloadWorkgroupEXT = 5402, CodeSectionINTEL = 5605, DeviceOnlyINTEL = 5936, HostOnlyINTEL = 5937, Max = 0x7fffffff, }; enum class Dim : unsigned { Dim1D = 0, Dim2D = 1, Dim3D = 2, Cube = 3, Rect = 4, Buffer = 5, SubpassData = 6, TileImageDataEXT = 4173, Max = 0x7fffffff, }; enum class SamplerAddressingMode : unsigned { None = 0, ClampToEdge = 1, Clamp = 2, Repeat = 3, RepeatMirrored = 4, Max = 0x7fffffff, }; enum class SamplerFilterMode : unsigned { Nearest = 0, Linear = 1, Max = 0x7fffffff, }; enum class ImageFormat : unsigned { Unknown = 0, Rgba32f = 1, Rgba16f = 2, R32f = 3, Rgba8 = 4, Rgba8Snorm = 5, Rg32f = 6, Rg16f = 7, R11fG11fB10f = 8, R16f = 9, Rgba16 = 10, Rgb10A2 = 11, Rg16 = 12, Rg8 = 13, R16 = 14, R8 = 15, Rgba16Snorm = 16, Rg16Snorm = 17, Rg8Snorm = 18, R16Snorm = 19, R8Snorm = 20, Rgba32i = 21, Rgba16i = 22, Rgba8i = 23, R32i = 24, Rg32i = 25, Rg16i = 26, Rg8i = 27, R16i = 28, R8i = 29, Rgba32ui = 30, Rgba16ui = 31, Rgba8ui = 32, R32ui = 33, Rgb10a2ui = 34, Rg32ui = 35, Rg16ui = 36, Rg8ui = 37, R16ui = 38, R8ui = 39, R64ui = 40, R64i = 41, Max = 0x7fffffff, }; enum class ImageChannelOrder : unsigned { R = 0, A = 1, RG = 2, RA = 3, RGB = 4, RGBA = 5, BGRA = 6, ARGB = 7, Intensity = 8, Luminance = 9, Rx = 10, RGx = 11, RGBx = 12, Depth = 13, DepthStencil = 14, sRGB = 15, sRGBx = 16, sRGBA = 17, sBGRA = 18, ABGR = 19, Max = 0x7fffffff, }; enum class ImageChannelDataType : unsigned { SnormInt8 = 0, SnormInt16 = 1, UnormInt8 = 2, UnormInt16 = 3, UnormShort565 = 4, UnormShort555 = 5, UnormInt101010 = 6, SignedInt8 = 7, SignedInt16 = 8, SignedInt32 = 9, UnsignedInt8 = 10, UnsignedInt16 = 11, UnsignedInt32 = 12, HalfFloat = 13, Float = 14, UnormInt24 = 15, UnormInt101010_2 = 16, UnsignedIntRaw10EXT = 19, UnsignedIntRaw12EXT = 20, UnormInt2_101010EXT = 21, Max = 0x7fffffff, }; enum class ImageOperandsShift : unsigned { Bias = 0, Lod = 1, Grad = 2, ConstOffset = 3, Offset = 4, ConstOffsets = 5, Sample = 6, MinLod = 7, MakeTexelAvailable = 8, MakeTexelAvailableKHR = 8, MakeTexelVisible = 9, MakeTexelVisibleKHR = 9, NonPrivateTexel = 10, NonPrivateTexelKHR = 10, VolatileTexel = 11, VolatileTexelKHR = 11, SignExtend = 12, ZeroExtend = 13, Nontemporal = 14, Offsets = 16, Max = 0x7fffffff, }; enum class ImageOperandsMask : unsigned { MaskNone = 0, Bias = 0x00000001, Lod = 0x00000002, Grad = 0x00000004, ConstOffset = 0x00000008, Offset = 0x00000010, ConstOffsets = 0x00000020, Sample = 0x00000040, MinLod = 0x00000080, MakeTexelAvailable = 0x00000100, MakeTexelAvailableKHR = 0x00000100, MakeTexelVisible = 0x00000200, MakeTexelVisibleKHR = 0x00000200, NonPrivateTexel = 0x00000400, NonPrivateTexelKHR = 0x00000400, VolatileTexel = 0x00000800, VolatileTexelKHR = 0x00000800, SignExtend = 0x00001000, ZeroExtend = 0x00002000, Nontemporal = 0x00004000, Offsets = 0x00010000, }; enum class FPFastMathModeShift : unsigned { NotNaN = 0, NotInf = 1, NSZ = 2, AllowRecip = 3, Fast = 4, AllowContract = 16, AllowContractFastINTEL = 16, AllowReassoc = 17, AllowReassocINTEL = 17, AllowTransform = 18, Max = 0x7fffffff, }; enum class FPFastMathModeMask : unsigned { MaskNone = 0, NotNaN = 0x00000001, NotInf = 0x00000002, NSZ = 0x00000004, AllowRecip = 0x00000008, Fast = 0x00000010, AllowContract = 0x00010000, AllowContractFastINTEL = 0x00010000, AllowReassoc = 0x00020000, AllowReassocINTEL = 0x00020000, AllowTransform = 0x00040000, }; enum class FPRoundingMode : unsigned { RTE = 0, RTZ = 1, RTP = 2, RTN = 3, Max = 0x7fffffff, }; enum class LinkageType : unsigned { Export = 0, Import = 1, LinkOnceODR = 2, Max = 0x7fffffff, }; enum class AccessQualifier : unsigned { ReadOnly = 0, WriteOnly = 1, ReadWrite = 2, Max = 0x7fffffff, }; enum class FunctionParameterAttribute : unsigned { Zext = 0, Sext = 1, ByVal = 2, Sret = 3, NoAlias = 4, NoCapture = 5, NoWrite = 6, NoReadWrite = 7, RuntimeAlignedINTEL = 5940, Max = 0x7fffffff, }; enum class Decoration : unsigned { RelaxedPrecision = 0, SpecId = 1, Block = 2, BufferBlock = 3, RowMajor = 4, ColMajor = 5, ArrayStride = 6, MatrixStride = 7, GLSLShared = 8, GLSLPacked = 9, CPacked = 10, BuiltIn = 11, NoPerspective = 13, Flat = 14, Patch = 15, Centroid = 16, Sample = 17, Invariant = 18, Restrict = 19, Aliased = 20, Volatile = 21, Constant = 22, Coherent = 23, NonWritable = 24, NonReadable = 25, Uniform = 26, UniformId = 27, SaturatedConversion = 28, Stream = 29, Location = 30, Component = 31, Index = 32, Binding = 33, DescriptorSet = 34, Offset = 35, XfbBuffer = 36, XfbStride = 37, FuncParamAttr = 38, FPRoundingMode = 39, FPFastMathMode = 40, LinkageAttributes = 41, NoContraction = 42, InputAttachmentIndex = 43, Alignment = 44, MaxByteOffset = 45, AlignmentId = 46, MaxByteOffsetId = 47, SaturatedToLargestFloat8NormalConversionEXT = 4216, NoSignedWrap = 4469, NoUnsignedWrap = 4470, WeightTextureQCOM = 4487, BlockMatchTextureQCOM = 4488, BlockMatchSamplerQCOM = 4499, ExplicitInterpAMD = 4999, NodeSharesPayloadLimitsWithAMDX = 5019, NodeMaxPayloadsAMDX = 5020, TrackFinishWritingAMDX = 5078, PayloadNodeNameAMDX = 5091, PayloadNodeBaseIndexAMDX = 5098, PayloadNodeSparseArrayAMDX = 5099, PayloadNodeArraySizeAMDX = 5100, PayloadDispatchIndirectAMDX = 5105, OverrideCoverageNV = 5248, PassthroughNV = 5250, ViewportRelativeNV = 5252, SecondaryViewportRelativeNV = 5256, PerPrimitiveEXT = 5271, PerPrimitiveNV = 5271, PerViewNV = 5272, PerTaskNV = 5273, PerVertexKHR = 5285, PerVertexNV = 5285, NonUniform = 5300, NonUniformEXT = 5300, RestrictPointer = 5355, RestrictPointerEXT = 5355, AliasedPointer = 5356, AliasedPointerEXT = 5356, HitObjectShaderRecordBufferNV = 5386, BindlessSamplerNV = 5398, BindlessImageNV = 5399, BoundSamplerNV = 5400, BoundImageNV = 5401, SIMTCallINTEL = 5599, ReferencedIndirectlyINTEL = 5602, ClobberINTEL = 5607, SideEffectsINTEL = 5608, VectorComputeVariableINTEL = 5624, FuncParamIOKindINTEL = 5625, VectorComputeFunctionINTEL = 5626, StackCallINTEL = 5627, GlobalVariableOffsetINTEL = 5628, CounterBuffer = 5634, HlslCounterBufferGOOGLE = 5634, HlslSemanticGOOGLE = 5635, UserSemantic = 5635, UserTypeGOOGLE = 5636, FunctionRoundingModeINTEL = 5822, FunctionDenormModeINTEL = 5823, RegisterINTEL = 5825, MemoryINTEL = 5826, NumbanksINTEL = 5827, BankwidthINTEL = 5828, MaxPrivateCopiesINTEL = 5829, SinglepumpINTEL = 5830, DoublepumpINTEL = 5831, MaxReplicatesINTEL = 5832, SimpleDualPortINTEL = 5833, MergeINTEL = 5834, BankBitsINTEL = 5835, ForcePow2DepthINTEL = 5836, StridesizeINTEL = 5883, WordsizeINTEL = 5884, TrueDualPortINTEL = 5885, BurstCoalesceINTEL = 5899, CacheSizeINTEL = 5900, DontStaticallyCoalesceINTEL = 5901, PrefetchINTEL = 5902, StallEnableINTEL = 5905, FuseLoopsInFunctionINTEL = 5907, MathOpDSPModeINTEL = 5909, AliasScopeINTEL = 5914, NoAliasINTEL = 5915, InitiationIntervalINTEL = 5917, MaxConcurrencyINTEL = 5918, PipelineEnableINTEL = 5919, BufferLocationINTEL = 5921, IOPipeStorageINTEL = 5944, FunctionFloatingPointModeINTEL = 6080, SingleElementVectorINTEL = 6085, VectorComputeCallableFunctionINTEL = 6087, MediaBlockIOINTEL = 6140, StallFreeINTEL = 6151, FPMaxErrorDecorationINTEL = 6170, LatencyControlLabelINTEL = 6172, LatencyControlConstraintINTEL = 6173, ConduitKernelArgumentINTEL = 6175, RegisterMapKernelArgumentINTEL = 6176, MMHostInterfaceAddressWidthINTEL = 6177, MMHostInterfaceDataWidthINTEL = 6178, MMHostInterfaceLatencyINTEL = 6179, MMHostInterfaceReadWriteModeINTEL = 6180, MMHostInterfaceMaxBurstINTEL = 6181, MMHostInterfaceWaitRequestINTEL = 6182, StableKernelArgumentINTEL = 6183, HostAccessINTEL = 6188, InitModeINTEL = 6190, ImplementInRegisterMapINTEL = 6191, CacheControlLoadINTEL = 6442, CacheControlStoreINTEL = 6443, Max = 0x7fffffff, }; enum class BuiltIn : unsigned { Position = 0, PointSize = 1, ClipDistance = 3, CullDistance = 4, VertexId = 5, InstanceId = 6, PrimitiveId = 7, InvocationId = 8, Layer = 9, ViewportIndex = 10, TessLevelOuter = 11, TessLevelInner = 12, TessCoord = 13, PatchVertices = 14, FragCoord = 15, PointCoord = 16, FrontFacing = 17, SampleId = 18, SamplePosition = 19, SampleMask = 20, FragDepth = 22, HelperInvocation = 23, NumWorkgroups = 24, WorkgroupSize = 25, WorkgroupId = 26, LocalInvocationId = 27, GlobalInvocationId = 28, LocalInvocationIndex = 29, WorkDim = 30, GlobalSize = 31, EnqueuedWorkgroupSize = 32, GlobalOffset = 33, GlobalLinearId = 34, SubgroupSize = 36, SubgroupMaxSize = 37, NumSubgroups = 38, NumEnqueuedSubgroups = 39, SubgroupId = 40, SubgroupLocalInvocationId = 41, VertexIndex = 42, InstanceIndex = 43, CoreIDARM = 4160, CoreCountARM = 4161, CoreMaxIDARM = 4162, WarpIDARM = 4163, WarpMaxIDARM = 4164, SubgroupEqMask = 4416, SubgroupEqMaskKHR = 4416, SubgroupGeMask = 4417, SubgroupGeMaskKHR = 4417, SubgroupGtMask = 4418, SubgroupGtMaskKHR = 4418, SubgroupLeMask = 4419, SubgroupLeMaskKHR = 4419, SubgroupLtMask = 4420, SubgroupLtMaskKHR = 4420, BaseVertex = 4424, BaseInstance = 4425, DrawIndex = 4426, PrimitiveShadingRateKHR = 4432, DeviceIndex = 4438, ViewIndex = 4440, ShadingRateKHR = 4444, TileOffsetQCOM = 4492, TileDimensionQCOM = 4493, TileApronSizeQCOM = 4494, BaryCoordNoPerspAMD = 4992, BaryCoordNoPerspCentroidAMD = 4993, BaryCoordNoPerspSampleAMD = 4994, BaryCoordSmoothAMD = 4995, BaryCoordSmoothCentroidAMD = 4996, BaryCoordSmoothSampleAMD = 4997, BaryCoordPullModelAMD = 4998, FragStencilRefEXT = 5014, RemainingRecursionLevelsAMDX = 5021, ShaderIndexAMDX = 5073, ViewportMaskNV = 5253, SecondaryPositionNV = 5257, SecondaryViewportMaskNV = 5258, PositionPerViewNV = 5261, ViewportMaskPerViewNV = 5262, FullyCoveredEXT = 5264, TaskCountNV = 5274, PrimitiveCountNV = 5275, PrimitiveIndicesNV = 5276, ClipDistancePerViewNV = 5277, CullDistancePerViewNV = 5278, LayerPerViewNV = 5279, MeshViewCountNV = 5280, MeshViewIndicesNV = 5281, BaryCoordKHR = 5286, BaryCoordNV = 5286, BaryCoordNoPerspKHR = 5287, BaryCoordNoPerspNV = 5287, FragSizeEXT = 5292, FragmentSizeNV = 5292, FragInvocationCountEXT = 5293, InvocationsPerPixelNV = 5293, PrimitivePointIndicesEXT = 5294, PrimitiveLineIndicesEXT = 5295, PrimitiveTriangleIndicesEXT = 5296, CullPrimitiveEXT = 5299, LaunchIdKHR = 5319, LaunchIdNV = 5319, LaunchSizeKHR = 5320, LaunchSizeNV = 5320, WorldRayOriginKHR = 5321, WorldRayOriginNV = 5321, WorldRayDirectionKHR = 5322, WorldRayDirectionNV = 5322, ObjectRayOriginKHR = 5323, ObjectRayOriginNV = 5323, ObjectRayDirectionKHR = 5324, ObjectRayDirectionNV = 5324, RayTminKHR = 5325, RayTminNV = 5325, RayTmaxKHR = 5326, RayTmaxNV = 5326, InstanceCustomIndexKHR = 5327, InstanceCustomIndexNV = 5327, ObjectToWorldKHR = 5330, ObjectToWorldNV = 5330, WorldToObjectKHR = 5331, WorldToObjectNV = 5331, HitTNV = 5332, HitKindKHR = 5333, HitKindNV = 5333, CurrentRayTimeNV = 5334, HitTriangleVertexPositionsKHR = 5335, HitMicroTriangleVertexPositionsNV = 5337, HitMicroTriangleVertexBarycentricsNV = 5344, IncomingRayFlagsKHR = 5351, IncomingRayFlagsNV = 5351, RayGeometryIndexKHR = 5352, HitIsSphereNV = 5359, HitIsLSSNV = 5360, HitSpherePositionNV = 5361, WarpsPerSMNV = 5374, SMCountNV = 5375, WarpIDNV = 5376, SMIDNV = 5377, HitLSSPositionsNV = 5396, HitKindFrontFacingMicroTriangleNV = 5405, HitKindBackFacingMicroTriangleNV = 5406, HitSphereRadiusNV = 5420, HitLSSRadiiNV = 5421, ClusterIDNV = 5436, CullMaskKHR = 6021, Max = 0x7fffffff, }; enum class SelectionControlShift : unsigned { Flatten = 0, DontFlatten = 1, Max = 0x7fffffff, }; enum class SelectionControlMask : unsigned { MaskNone = 0, Flatten = 0x00000001, DontFlatten = 0x00000002, }; enum class LoopControlShift : unsigned { Unroll = 0, DontUnroll = 1, DependencyInfinite = 2, DependencyLength = 3, MinIterations = 4, MaxIterations = 5, IterationMultiple = 6, PeelCount = 7, PartialCount = 8, InitiationIntervalINTEL = 16, MaxConcurrencyINTEL = 17, DependencyArrayINTEL = 18, PipelineEnableINTEL = 19, LoopCoalesceINTEL = 20, MaxInterleavingINTEL = 21, SpeculatedIterationsINTEL = 22, NoFusionINTEL = 23, LoopCountINTEL = 24, MaxReinvocationDelayINTEL = 25, Max = 0x7fffffff, }; enum class LoopControlMask : unsigned { MaskNone = 0, Unroll = 0x00000001, DontUnroll = 0x00000002, DependencyInfinite = 0x00000004, DependencyLength = 0x00000008, MinIterations = 0x00000010, MaxIterations = 0x00000020, IterationMultiple = 0x00000040, PeelCount = 0x00000080, PartialCount = 0x00000100, InitiationIntervalINTEL = 0x00010000, MaxConcurrencyINTEL = 0x00020000, DependencyArrayINTEL = 0x00040000, PipelineEnableINTEL = 0x00080000, LoopCoalesceINTEL = 0x00100000, MaxInterleavingINTEL = 0x00200000, SpeculatedIterationsINTEL = 0x00400000, NoFusionINTEL = 0x00800000, LoopCountINTEL = 0x01000000, MaxReinvocationDelayINTEL = 0x02000000, }; enum class FunctionControlShift : unsigned { Inline = 0, DontInline = 1, Pure = 2, Const = 3, OptNoneEXT = 16, OptNoneINTEL = 16, Max = 0x7fffffff, }; enum class FunctionControlMask : unsigned { MaskNone = 0, Inline = 0x00000001, DontInline = 0x00000002, Pure = 0x00000004, Const = 0x00000008, OptNoneEXT = 0x00010000, OptNoneINTEL = 0x00010000, }; enum class MemorySemanticsShift : unsigned { Acquire = 1, Release = 2, AcquireRelease = 3, SequentiallyConsistent = 4, UniformMemory = 6, SubgroupMemory = 7, WorkgroupMemory = 8, CrossWorkgroupMemory = 9, AtomicCounterMemory = 10, ImageMemory = 11, OutputMemory = 12, OutputMemoryKHR = 12, MakeAvailable = 13, MakeAvailableKHR = 13, MakeVisible = 14, MakeVisibleKHR = 14, Volatile = 15, Max = 0x7fffffff, }; enum class MemorySemanticsMask : unsigned { MaskNone = 0, Acquire = 0x00000002, Release = 0x00000004, AcquireRelease = 0x00000008, SequentiallyConsistent = 0x00000010, UniformMemory = 0x00000040, SubgroupMemory = 0x00000080, WorkgroupMemory = 0x00000100, CrossWorkgroupMemory = 0x00000200, AtomicCounterMemory = 0x00000400, ImageMemory = 0x00000800, OutputMemory = 0x00001000, OutputMemoryKHR = 0x00001000, MakeAvailable = 0x00002000, MakeAvailableKHR = 0x00002000, MakeVisible = 0x00004000, MakeVisibleKHR = 0x00004000, Volatile = 0x00008000, }; enum class MemoryAccessShift : unsigned { Volatile = 0, Aligned = 1, Nontemporal = 2, MakePointerAvailable = 3, MakePointerAvailableKHR = 3, MakePointerVisible = 4, MakePointerVisibleKHR = 4, NonPrivatePointer = 5, NonPrivatePointerKHR = 5, AliasScopeINTELMask = 16, NoAliasINTELMask = 17, Max = 0x7fffffff, }; enum class MemoryAccessMask : unsigned { MaskNone = 0, Volatile = 0x00000001, Aligned = 0x00000002, Nontemporal = 0x00000004, MakePointerAvailable = 0x00000008, MakePointerAvailableKHR = 0x00000008, MakePointerVisible = 0x00000010, MakePointerVisibleKHR = 0x00000010, NonPrivatePointer = 0x00000020, NonPrivatePointerKHR = 0x00000020, AliasScopeINTELMask = 0x00010000, NoAliasINTELMask = 0x00020000, }; enum class Scope : unsigned { CrossDevice = 0, Device = 1, Workgroup = 2, Subgroup = 3, Invocation = 4, QueueFamily = 5, QueueFamilyKHR = 5, ShaderCallKHR = 6, Max = 0x7fffffff, }; enum class GroupOperation : unsigned { Reduce = 0, InclusiveScan = 1, ExclusiveScan = 2, ClusteredReduce = 3, PartitionedReduceNV = 6, PartitionedInclusiveScanNV = 7, PartitionedExclusiveScanNV = 8, Max = 0x7fffffff, }; enum class KernelEnqueueFlags : unsigned { NoWait = 0, WaitKernel = 1, WaitWorkGroup = 2, Max = 0x7fffffff, }; enum class KernelProfilingInfoShift : unsigned { CmdExecTime = 0, Max = 0x7fffffff, }; enum class KernelProfilingInfoMask : unsigned { MaskNone = 0, CmdExecTime = 0x00000001, }; enum class Capability : unsigned { Matrix = 0, Shader = 1, Geometry = 2, Tessellation = 3, Addresses = 4, Linkage = 5, Kernel = 6, Vector16 = 7, Float16Buffer = 8, Float16 = 9, Float64 = 10, Int64 = 11, Int64Atomics = 12, ImageBasic = 13, ImageReadWrite = 14, ImageMipmap = 15, Pipes = 17, Groups = 18, DeviceEnqueue = 19, LiteralSampler = 20, AtomicStorage = 21, Int16 = 22, TessellationPointSize = 23, GeometryPointSize = 24, ImageGatherExtended = 25, StorageImageMultisample = 27, UniformBufferArrayDynamicIndexing = 28, SampledImageArrayDynamicIndexing = 29, StorageBufferArrayDynamicIndexing = 30, StorageImageArrayDynamicIndexing = 31, ClipDistance = 32, CullDistance = 33, ImageCubeArray = 34, SampleRateShading = 35, ImageRect = 36, SampledRect = 37, GenericPointer = 38, Int8 = 39, InputAttachment = 40, SparseResidency = 41, MinLod = 42, Sampled1D = 43, Image1D = 44, SampledCubeArray = 45, SampledBuffer = 46, ImageBuffer = 47, ImageMSArray = 48, StorageImageExtendedFormats = 49, ImageQuery = 50, DerivativeControl = 51, InterpolationFunction = 52, TransformFeedback = 53, GeometryStreams = 54, StorageImageReadWithoutFormat = 55, StorageImageWriteWithoutFormat = 56, MultiViewport = 57, SubgroupDispatch = 58, NamedBarrier = 59, PipeStorage = 60, GroupNonUniform = 61, GroupNonUniformVote = 62, GroupNonUniformArithmetic = 63, GroupNonUniformBallot = 64, GroupNonUniformShuffle = 65, GroupNonUniformShuffleRelative = 66, GroupNonUniformClustered = 67, GroupNonUniformQuad = 68, ShaderLayer = 69, ShaderViewportIndex = 70, UniformDecoration = 71, CoreBuiltinsARM = 4165, TileImageColorReadAccessEXT = 4166, TileImageDepthReadAccessEXT = 4167, TileImageStencilReadAccessEXT = 4168, CooperativeMatrixLayoutsARM = 4201, Float8EXT = 4212, Float8CooperativeMatrixEXT = 4213, FragmentShadingRateKHR = 4422, SubgroupBallotKHR = 4423, DrawParameters = 4427, WorkgroupMemoryExplicitLayoutKHR = 4428, WorkgroupMemoryExplicitLayout8BitAccessKHR = 4429, WorkgroupMemoryExplicitLayout16BitAccessKHR = 4430, SubgroupVoteKHR = 4431, StorageBuffer16BitAccess = 4433, StorageUniformBufferBlock16 = 4433, StorageUniform16 = 4434, UniformAndStorageBuffer16BitAccess = 4434, StoragePushConstant16 = 4435, StorageInputOutput16 = 4436, DeviceGroup = 4437, MultiView = 4439, VariablePointersStorageBuffer = 4441, VariablePointers = 4442, AtomicStorageOps = 4445, SampleMaskPostDepthCoverage = 4447, StorageBuffer8BitAccess = 4448, UniformAndStorageBuffer8BitAccess = 4449, StoragePushConstant8 = 4450, DenormPreserve = 4464, DenormFlushToZero = 4465, SignedZeroInfNanPreserve = 4466, RoundingModeRTE = 4467, RoundingModeRTZ = 4468, RayQueryProvisionalKHR = 4471, RayQueryKHR = 4472, UntypedPointersKHR = 4473, RayTraversalPrimitiveCullingKHR = 4478, RayTracingKHR = 4479, TextureSampleWeightedQCOM = 4484, TextureBoxFilterQCOM = 4485, TextureBlockMatchQCOM = 4486, TileShadingQCOM = 4495, TextureBlockMatch2QCOM = 4498, Float16ImageAMD = 5008, ImageGatherBiasLodAMD = 5009, FragmentMaskAMD = 5010, StencilExportEXT = 5013, ImageReadWriteLodAMD = 5015, Int64ImageEXT = 5016, ShaderClockKHR = 5055, ShaderEnqueueAMDX = 5067, QuadControlKHR = 5087, BFloat16TypeKHR = 5116, BFloat16DotProductKHR = 5117, BFloat16CooperativeMatrixKHR = 5118, SampleMaskOverrideCoverageNV = 5249, GeometryShaderPassthroughNV = 5251, ShaderViewportIndexLayerEXT = 5254, ShaderViewportIndexLayerNV = 5254, ShaderViewportMaskNV = 5255, ShaderStereoViewNV = 5259, PerViewAttributesNV = 5260, FragmentFullyCoveredEXT = 5265, MeshShadingNV = 5266, ImageFootprintNV = 5282, MeshShadingEXT = 5283, FragmentBarycentricKHR = 5284, FragmentBarycentricNV = 5284, ComputeDerivativeGroupQuadsKHR = 5288, ComputeDerivativeGroupQuadsNV = 5288, FragmentDensityEXT = 5291, ShadingRateNV = 5291, GroupNonUniformPartitionedNV = 5297, ShaderNonUniform = 5301, ShaderNonUniformEXT = 5301, RuntimeDescriptorArray = 5302, RuntimeDescriptorArrayEXT = 5302, InputAttachmentArrayDynamicIndexing = 5303, InputAttachmentArrayDynamicIndexingEXT = 5303, UniformTexelBufferArrayDynamicIndexing = 5304, UniformTexelBufferArrayDynamicIndexingEXT = 5304, StorageTexelBufferArrayDynamicIndexing = 5305, StorageTexelBufferArrayDynamicIndexingEXT = 5305, UniformBufferArrayNonUniformIndexing = 5306, UniformBufferArrayNonUniformIndexingEXT = 5306, SampledImageArrayNonUniformIndexing = 5307, SampledImageArrayNonUniformIndexingEXT = 5307, StorageBufferArrayNonUniformIndexing = 5308, StorageBufferArrayNonUniformIndexingEXT = 5308, StorageImageArrayNonUniformIndexing = 5309, StorageImageArrayNonUniformIndexingEXT = 5309, InputAttachmentArrayNonUniformIndexing = 5310, InputAttachmentArrayNonUniformIndexingEXT = 5310, UniformTexelBufferArrayNonUniformIndexing = 5311, UniformTexelBufferArrayNonUniformIndexingEXT = 5311, StorageTexelBufferArrayNonUniformIndexing = 5312, StorageTexelBufferArrayNonUniformIndexingEXT = 5312, RayTracingPositionFetchKHR = 5336, RayTracingNV = 5340, RayTracingMotionBlurNV = 5341, VulkanMemoryModel = 5345, VulkanMemoryModelKHR = 5345, VulkanMemoryModelDeviceScope = 5346, VulkanMemoryModelDeviceScopeKHR = 5346, PhysicalStorageBufferAddresses = 5347, PhysicalStorageBufferAddressesEXT = 5347, ComputeDerivativeGroupLinearKHR = 5350, ComputeDerivativeGroupLinearNV = 5350, RayTracingProvisionalKHR = 5353, CooperativeMatrixNV = 5357, FragmentShaderSampleInterlockEXT = 5363, FragmentShaderShadingRateInterlockEXT = 5372, ShaderSMBuiltinsNV = 5373, FragmentShaderPixelInterlockEXT = 5378, DemoteToHelperInvocation = 5379, DemoteToHelperInvocationEXT = 5379, DisplacementMicromapNV = 5380, RayTracingOpacityMicromapEXT = 5381, ShaderInvocationReorderNV = 5383, BindlessTextureNV = 5390, RayQueryPositionFetchKHR = 5391, CooperativeVectorNV = 5394, AtomicFloat16VectorNV = 5404, RayTracingDisplacementMicromapNV = 5409, RawAccessChainsNV = 5414, RayTracingSpheresGeometryNV = 5418, RayTracingLinearSweptSpheresGeometryNV = 5419, CooperativeMatrixReductionsNV = 5430, CooperativeMatrixConversionsNV = 5431, CooperativeMatrixPerElementOperationsNV = 5432, CooperativeMatrixTensorAddressingNV = 5433, CooperativeMatrixBlockLoadsNV = 5434, CooperativeVectorTrainingNV = 5435, RayTracingClusterAccelerationStructureNV = 5437, TensorAddressingNV = 5439, SubgroupShuffleINTEL = 5568, SubgroupBufferBlockIOINTEL = 5569, SubgroupImageBlockIOINTEL = 5570, SubgroupImageMediaBlockIOINTEL = 5579, RoundToInfinityINTEL = 5582, FloatingPointModeINTEL = 5583, IntegerFunctions2INTEL = 5584, FunctionPointersINTEL = 5603, IndirectReferencesINTEL = 5604, AsmINTEL = 5606, AtomicFloat32MinMaxEXT = 5612, AtomicFloat64MinMaxEXT = 5613, AtomicFloat16MinMaxEXT = 5616, VectorComputeINTEL = 5617, VectorAnyINTEL = 5619, ExpectAssumeKHR = 5629, SubgroupAvcMotionEstimationINTEL = 5696, SubgroupAvcMotionEstimationIntraINTEL = 5697, SubgroupAvcMotionEstimationChromaINTEL = 5698, VariableLengthArrayINTEL = 5817, FunctionFloatControlINTEL = 5821, FPGAMemoryAttributesINTEL = 5824, FPFastMathModeINTEL = 5837, ArbitraryPrecisionIntegersINTEL = 5844, ArbitraryPrecisionFloatingPointINTEL = 5845, UnstructuredLoopControlsINTEL = 5886, FPGALoopControlsINTEL = 5888, KernelAttributesINTEL = 5892, FPGAKernelAttributesINTEL = 5897, FPGAMemoryAccessesINTEL = 5898, FPGAClusterAttributesINTEL = 5904, LoopFuseINTEL = 5906, FPGADSPControlINTEL = 5908, MemoryAccessAliasingINTEL = 5910, FPGAInvocationPipeliningAttributesINTEL = 5916, FPGABufferLocationINTEL = 5920, ArbitraryPrecisionFixedPointINTEL = 5922, USMStorageClassesINTEL = 5935, RuntimeAlignedAttributeINTEL = 5939, IOPipesINTEL = 5943, BlockingPipesINTEL = 5945, FPGARegINTEL = 5948, DotProductInputAll = 6016, DotProductInputAllKHR = 6016, DotProductInput4x8Bit = 6017, DotProductInput4x8BitKHR = 6017, DotProductInput4x8BitPacked = 6018, DotProductInput4x8BitPackedKHR = 6018, DotProduct = 6019, DotProductKHR = 6019, RayCullMaskKHR = 6020, CooperativeMatrixKHR = 6022, ReplicatedCompositesEXT = 6024, BitInstructions = 6025, GroupNonUniformRotateKHR = 6026, FloatControls2 = 6029, AtomicFloat32AddEXT = 6033, AtomicFloat64AddEXT = 6034, LongCompositesINTEL = 6089, OptNoneEXT = 6094, OptNoneINTEL = 6094, AtomicFloat16AddEXT = 6095, DebugInfoModuleINTEL = 6114, BFloat16ConversionINTEL = 6115, SplitBarrierINTEL = 6141, ArithmeticFenceEXT = 6144, FPGAClusterAttributesV2INTEL = 6150, FPGAKernelAttributesv2INTEL = 6161, FPMaxErrorINTEL = 6169, FPGALatencyControlINTEL = 6171, FPGAArgumentInterfacesINTEL = 6174, GlobalVariableHostAccessINTEL = 6187, GlobalVariableFPGADecorationsINTEL = 6189, SubgroupBufferPrefetchINTEL = 6220, Subgroup2DBlockIOINTEL = 6228, Subgroup2DBlockTransformINTEL = 6229, Subgroup2DBlockTransposeINTEL = 6230, SubgroupMatrixMultiplyAccumulateINTEL = 6236, GroupUniformArithmeticKHR = 6400, MaskedGatherScatterINTEL = 6427, CacheControlsINTEL = 6441, RegisterLimitsINTEL = 6460, Max = 0x7fffffff, }; enum class RayFlagsShift : unsigned { OpaqueKHR = 0, NoOpaqueKHR = 1, TerminateOnFirstHitKHR = 2, SkipClosestHitShaderKHR = 3, CullBackFacingTrianglesKHR = 4, CullFrontFacingTrianglesKHR = 5, CullOpaqueKHR = 6, CullNoOpaqueKHR = 7, SkipBuiltinPrimitivesNV = 8, SkipTrianglesKHR = 8, SkipAABBsKHR = 9, ForceOpacityMicromap2StateEXT = 10, Max = 0x7fffffff, }; enum class RayFlagsMask : unsigned { MaskNone = 0, OpaqueKHR = 0x00000001, NoOpaqueKHR = 0x00000002, TerminateOnFirstHitKHR = 0x00000004, SkipClosestHitShaderKHR = 0x00000008, CullBackFacingTrianglesKHR = 0x00000010, CullFrontFacingTrianglesKHR = 0x00000020, CullOpaqueKHR = 0x00000040, CullNoOpaqueKHR = 0x00000080, SkipBuiltinPrimitivesNV = 0x00000100, SkipTrianglesKHR = 0x00000100, SkipAABBsKHR = 0x00000200, ForceOpacityMicromap2StateEXT = 0x00000400, }; enum class RayQueryIntersection : unsigned { RayQueryCandidateIntersectionKHR = 0, RayQueryCommittedIntersectionKHR = 1, Max = 0x7fffffff, }; enum class RayQueryCommittedIntersectionType : unsigned { RayQueryCommittedIntersectionNoneKHR = 0, RayQueryCommittedIntersectionTriangleKHR = 1, RayQueryCommittedIntersectionGeneratedKHR = 2, Max = 0x7fffffff, }; enum class RayQueryCandidateIntersectionType : unsigned { RayQueryCandidateIntersectionTriangleKHR = 0, RayQueryCandidateIntersectionAABBKHR = 1, Max = 0x7fffffff, }; enum class FragmentShadingRateShift : unsigned { Vertical2Pixels = 0, Vertical4Pixels = 1, Horizontal2Pixels = 2, Horizontal4Pixels = 3, Max = 0x7fffffff, }; enum class FragmentShadingRateMask : unsigned { MaskNone = 0, Vertical2Pixels = 0x00000001, Vertical4Pixels = 0x00000002, Horizontal2Pixels = 0x00000004, Horizontal4Pixels = 0x00000008, }; enum class FPDenormMode : unsigned { Preserve = 0, FlushToZero = 1, Max = 0x7fffffff, }; enum class FPOperationMode : unsigned { IEEE = 0, ALT = 1, Max = 0x7fffffff, }; enum class QuantizationModes : unsigned { TRN = 0, TRN_ZERO = 1, RND = 2, RND_ZERO = 3, RND_INF = 4, RND_MIN_INF = 5, RND_CONV = 6, RND_CONV_ODD = 7, Max = 0x7fffffff, }; enum class OverflowModes : unsigned { WRAP = 0, SAT = 1, SAT_ZERO = 2, SAT_SYM = 3, Max = 0x7fffffff, }; enum class PackedVectorFormat : unsigned { PackedVectorFormat4x8Bit = 0, PackedVectorFormat4x8BitKHR = 0, Max = 0x7fffffff, }; enum class CooperativeMatrixOperandsShift : unsigned { MatrixASignedComponentsKHR = 0, MatrixBSignedComponentsKHR = 1, MatrixCSignedComponentsKHR = 2, MatrixResultSignedComponentsKHR = 3, SaturatingAccumulationKHR = 4, Max = 0x7fffffff, }; enum class CooperativeMatrixOperandsMask : unsigned { MaskNone = 0, MatrixASignedComponentsKHR = 0x00000001, MatrixBSignedComponentsKHR = 0x00000002, MatrixCSignedComponentsKHR = 0x00000004, MatrixResultSignedComponentsKHR = 0x00000008, SaturatingAccumulationKHR = 0x00000010, }; enum class CooperativeMatrixLayout : unsigned { RowMajorKHR = 0, ColumnMajorKHR = 1, RowBlockedInterleavedARM = 4202, ColumnBlockedInterleavedARM = 4203, Max = 0x7fffffff, }; enum class CooperativeMatrixUse : unsigned { MatrixAKHR = 0, MatrixBKHR = 1, MatrixAccumulatorKHR = 2, Max = 0x7fffffff, }; enum class CooperativeMatrixReduceShift : unsigned { Row = 0, Column = 1, CooperativeMatrixReduce2x2 = 2, Max = 0x7fffffff, }; enum class CooperativeMatrixReduceMask : unsigned { MaskNone = 0, Row = 0x00000001, Column = 0x00000002, CooperativeMatrixReduce2x2 = 0x00000004, }; enum class TensorClampMode : unsigned { Undefined = 0, Constant = 1, ClampToEdge = 2, Repeat = 3, RepeatMirrored = 4, Max = 0x7fffffff, }; enum class TensorAddressingOperandsShift : unsigned { TensorView = 0, DecodeFunc = 1, Max = 0x7fffffff, }; enum class TensorAddressingOperandsMask : unsigned { MaskNone = 0, TensorView = 0x00000001, DecodeFunc = 0x00000002, }; enum class InitializationModeQualifier : unsigned { InitOnDeviceReprogramINTEL = 0, InitOnDeviceResetINTEL = 1, Max = 0x7fffffff, }; enum class HostAccessQualifier : unsigned { NoneINTEL = 0, ReadINTEL = 1, WriteINTEL = 2, ReadWriteINTEL = 3, Max = 0x7fffffff, }; enum class LoadCacheControl : unsigned { UncachedINTEL = 0, CachedINTEL = 1, StreamingINTEL = 2, InvalidateAfterReadINTEL = 3, ConstCachedINTEL = 4, Max = 0x7fffffff, }; enum class StoreCacheControl : unsigned { UncachedINTEL = 0, WriteThroughINTEL = 1, WriteBackINTEL = 2, StreamingINTEL = 3, Max = 0x7fffffff, }; enum class NamedMaximumNumberOfRegisters : unsigned { AutoINTEL = 0, Max = 0x7fffffff, }; enum class MatrixMultiplyAccumulateOperandsShift : unsigned { MatrixASignedComponentsINTEL = 0, MatrixBSignedComponentsINTEL = 1, MatrixCBFloat16INTEL = 2, MatrixResultBFloat16INTEL = 3, MatrixAPackedInt8INTEL = 4, MatrixBPackedInt8INTEL = 5, MatrixAPackedInt4INTEL = 6, MatrixBPackedInt4INTEL = 7, MatrixATF32INTEL = 8, MatrixBTF32INTEL = 9, MatrixAPackedFloat16INTEL = 10, MatrixBPackedFloat16INTEL = 11, MatrixAPackedBFloat16INTEL = 12, MatrixBPackedBFloat16INTEL = 13, Max = 0x7fffffff, }; enum class MatrixMultiplyAccumulateOperandsMask : unsigned { MaskNone = 0, MatrixASignedComponentsINTEL = 0x00000001, MatrixBSignedComponentsINTEL = 0x00000002, MatrixCBFloat16INTEL = 0x00000004, MatrixResultBFloat16INTEL = 0x00000008, MatrixAPackedInt8INTEL = 0x00000010, MatrixBPackedInt8INTEL = 0x00000020, MatrixAPackedInt4INTEL = 0x00000040, MatrixBPackedInt4INTEL = 0x00000080, MatrixATF32INTEL = 0x00000100, MatrixBTF32INTEL = 0x00000200, MatrixAPackedFloat16INTEL = 0x00000400, MatrixBPackedFloat16INTEL = 0x00000800, MatrixAPackedBFloat16INTEL = 0x00001000, MatrixBPackedBFloat16INTEL = 0x00002000, }; enum class RawAccessChainOperandsShift : unsigned { RobustnessPerComponentNV = 0, RobustnessPerElementNV = 1, Max = 0x7fffffff, }; enum class RawAccessChainOperandsMask : unsigned { MaskNone = 0, RobustnessPerComponentNV = 0x00000001, RobustnessPerElementNV = 0x00000002, }; enum class FPEncoding : unsigned { BFloat16KHR = 0, Float8E4M3EXT = 4214, Float8E5M2EXT = 4215, Max = 0x7fffffff, }; enum class CooperativeVectorMatrixLayout : unsigned { RowMajorNV = 0, ColumnMajorNV = 1, InferencingOptimalNV = 2, TrainingOptimalNV = 3, Max = 0x7fffffff, }; enum class ComponentType : unsigned { Float16NV = 0, Float32NV = 1, Float64NV = 2, SignedInt8NV = 3, SignedInt16NV = 4, SignedInt32NV = 5, SignedInt64NV = 6, UnsignedInt8NV = 7, UnsignedInt16NV = 8, UnsignedInt32NV = 9, UnsignedInt64NV = 10, SignedInt8PackedNV = 1000491000, UnsignedInt8PackedNV = 1000491001, FloatE4M3NV = 1000491002, FloatE5M2NV = 1000491003, Max = 0x7fffffff, }; enum class Op : unsigned { OpNop = 0, OpUndef = 1, OpSourceContinued = 2, OpSource = 3, OpSourceExtension = 4, OpName = 5, OpMemberName = 6, OpString = 7, OpLine = 8, OpExtension = 10, OpExtInstImport = 11, OpExtInst = 12, OpMemoryModel = 14, OpEntryPoint = 15, OpExecutionMode = 16, OpCapability = 17, OpTypeVoid = 19, OpTypeBool = 20, OpTypeInt = 21, OpTypeFloat = 22, OpTypeVector = 23, OpTypeMatrix = 24, OpTypeImage = 25, OpTypeSampler = 26, OpTypeSampledImage = 27, OpTypeArray = 28, OpTypeRuntimeArray = 29, OpTypeStruct = 30, OpTypeOpaque = 31, OpTypePointer = 32, OpTypeFunction = 33, OpTypeEvent = 34, OpTypeDeviceEvent = 35, OpTypeReserveId = 36, OpTypeQueue = 37, OpTypePipe = 38, OpTypeForwardPointer = 39, OpConstantTrue = 41, OpConstantFalse = 42, OpConstant = 43, OpConstantComposite = 44, OpConstantSampler = 45, OpConstantNull = 46, OpSpecConstantTrue = 48, OpSpecConstantFalse = 49, OpSpecConstant = 50, OpSpecConstantComposite = 51, OpSpecConstantOp = 52, OpFunction = 54, OpFunctionParameter = 55, OpFunctionEnd = 56, OpFunctionCall = 57, OpVariable = 59, OpImageTexelPointer = 60, OpLoad = 61, OpStore = 62, OpCopyMemory = 63, OpCopyMemorySized = 64, OpAccessChain = 65, OpInBoundsAccessChain = 66, OpPtrAccessChain = 67, OpArrayLength = 68, OpGenericPtrMemSemantics = 69, OpInBoundsPtrAccessChain = 70, OpDecorate = 71, OpMemberDecorate = 72, OpDecorationGroup = 73, OpGroupDecorate = 74, OpGroupMemberDecorate = 75, OpVectorExtractDynamic = 77, OpVectorInsertDynamic = 78, OpVectorShuffle = 79, OpCompositeConstruct = 80, OpCompositeExtract = 81, OpCompositeInsert = 82, OpCopyObject = 83, OpTranspose = 84, OpSampledImage = 86, OpImageSampleImplicitLod = 87, OpImageSampleExplicitLod = 88, OpImageSampleDrefImplicitLod = 89, OpImageSampleDrefExplicitLod = 90, OpImageSampleProjImplicitLod = 91, OpImageSampleProjExplicitLod = 92, OpImageSampleProjDrefImplicitLod = 93, OpImageSampleProjDrefExplicitLod = 94, OpImageFetch = 95, OpImageGather = 96, OpImageDrefGather = 97, OpImageRead = 98, OpImageWrite = 99, OpImage = 100, OpImageQueryFormat = 101, OpImageQueryOrder = 102, OpImageQuerySizeLod = 103, OpImageQuerySize = 104, OpImageQueryLod = 105, OpImageQueryLevels = 106, OpImageQuerySamples = 107, OpConvertFToU = 109, OpConvertFToS = 110, OpConvertSToF = 111, OpConvertUToF = 112, OpUConvert = 113, OpSConvert = 114, OpFConvert = 115, OpQuantizeToF16 = 116, OpConvertPtrToU = 117, OpSatConvertSToU = 118, OpSatConvertUToS = 119, OpConvertUToPtr = 120, OpPtrCastToGeneric = 121, OpGenericCastToPtr = 122, OpGenericCastToPtrExplicit = 123, OpBitcast = 124, OpSNegate = 126, OpFNegate = 127, OpIAdd = 128, OpFAdd = 129, OpISub = 130, OpFSub = 131, OpIMul = 132, OpFMul = 133, OpUDiv = 134, OpSDiv = 135, OpFDiv = 136, OpUMod = 137, OpSRem = 138, OpSMod = 139, OpFRem = 140, OpFMod = 141, OpVectorTimesScalar = 142, OpMatrixTimesScalar = 143, OpVectorTimesMatrix = 144, OpMatrixTimesVector = 145, OpMatrixTimesMatrix = 146, OpOuterProduct = 147, OpDot = 148, OpIAddCarry = 149, OpISubBorrow = 150, OpUMulExtended = 151, OpSMulExtended = 152, OpAny = 154, OpAll = 155, OpIsNan = 156, OpIsInf = 157, OpIsFinite = 158, OpIsNormal = 159, OpSignBitSet = 160, OpLessOrGreater = 161, OpOrdered = 162, OpUnordered = 163, OpLogicalEqual = 164, OpLogicalNotEqual = 165, OpLogicalOr = 166, OpLogicalAnd = 167, OpLogicalNot = 168, OpSelect = 169, OpIEqual = 170, OpINotEqual = 171, OpUGreaterThan = 172, OpSGreaterThan = 173, OpUGreaterThanEqual = 174, OpSGreaterThanEqual = 175, OpULessThan = 176, OpSLessThan = 177, OpULessThanEqual = 178, OpSLessThanEqual = 179, OpFOrdEqual = 180, OpFUnordEqual = 181, OpFOrdNotEqual = 182, OpFUnordNotEqual = 183, OpFOrdLessThan = 184, OpFUnordLessThan = 185, OpFOrdGreaterThan = 186, OpFUnordGreaterThan = 187, OpFOrdLessThanEqual = 188, OpFUnordLessThanEqual = 189, OpFOrdGreaterThanEqual = 190, OpFUnordGreaterThanEqual = 191, OpShiftRightLogical = 194, OpShiftRightArithmetic = 195, OpShiftLeftLogical = 196, OpBitwiseOr = 197, OpBitwiseXor = 198, OpBitwiseAnd = 199, OpNot = 200, OpBitFieldInsert = 201, OpBitFieldSExtract = 202, OpBitFieldUExtract = 203, OpBitReverse = 204, OpBitCount = 205, OpDPdx = 207, OpDPdy = 208, OpFwidth = 209, OpDPdxFine = 210, OpDPdyFine = 211, OpFwidthFine = 212, OpDPdxCoarse = 213, OpDPdyCoarse = 214, OpFwidthCoarse = 215, OpEmitVertex = 218, OpEndPrimitive = 219, OpEmitStreamVertex = 220, OpEndStreamPrimitive = 221, OpControlBarrier = 224, OpMemoryBarrier = 225, OpAtomicLoad = 227, OpAtomicStore = 228, OpAtomicExchange = 229, OpAtomicCompareExchange = 230, OpAtomicCompareExchangeWeak = 231, OpAtomicIIncrement = 232, OpAtomicIDecrement = 233, OpAtomicIAdd = 234, OpAtomicISub = 235, OpAtomicSMin = 236, OpAtomicUMin = 237, OpAtomicSMax = 238, OpAtomicUMax = 239, OpAtomicAnd = 240, OpAtomicOr = 241, OpAtomicXor = 242, OpPhi = 245, OpLoopMerge = 246, OpSelectionMerge = 247, OpLabel = 248, OpBranch = 249, OpBranchConditional = 250, OpSwitch = 251, OpKill = 252, OpReturn = 253, OpReturnValue = 254, OpUnreachable = 255, OpLifetimeStart = 256, OpLifetimeStop = 257, OpGroupAsyncCopy = 259, OpGroupWaitEvents = 260, OpGroupAll = 261, OpGroupAny = 262, OpGroupBroadcast = 263, OpGroupIAdd = 264, OpGroupFAdd = 265, OpGroupFMin = 266, OpGroupUMin = 267, OpGroupSMin = 268, OpGroupFMax = 269, OpGroupUMax = 270, OpGroupSMax = 271, OpReadPipe = 274, OpWritePipe = 275, OpReservedReadPipe = 276, OpReservedWritePipe = 277, OpReserveReadPipePackets = 278, OpReserveWritePipePackets = 279, OpCommitReadPipe = 280, OpCommitWritePipe = 281, OpIsValidReserveId = 282, OpGetNumPipePackets = 283, OpGetMaxPipePackets = 284, OpGroupReserveReadPipePackets = 285, OpGroupReserveWritePipePackets = 286, OpGroupCommitReadPipe = 287, OpGroupCommitWritePipe = 288, OpEnqueueMarker = 291, OpEnqueueKernel = 292, OpGetKernelNDrangeSubGroupCount = 293, OpGetKernelNDrangeMaxSubGroupSize = 294, OpGetKernelWorkGroupSize = 295, OpGetKernelPreferredWorkGroupSizeMultiple = 296, OpRetainEvent = 297, OpReleaseEvent = 298, OpCreateUserEvent = 299, OpIsValidEvent = 300, OpSetUserEventStatus = 301, OpCaptureEventProfilingInfo = 302, OpGetDefaultQueue = 303, OpBuildNDRange = 304, OpImageSparseSampleImplicitLod = 305, OpImageSparseSampleExplicitLod = 306, OpImageSparseSampleDrefImplicitLod = 307, OpImageSparseSampleDrefExplicitLod = 308, OpImageSparseSampleProjImplicitLod = 309, OpImageSparseSampleProjExplicitLod = 310, OpImageSparseSampleProjDrefImplicitLod = 311, OpImageSparseSampleProjDrefExplicitLod = 312, OpImageSparseFetch = 313, OpImageSparseGather = 314, OpImageSparseDrefGather = 315, OpImageSparseTexelsResident = 316, OpNoLine = 317, OpAtomicFlagTestAndSet = 318, OpAtomicFlagClear = 319, OpImageSparseRead = 320, OpSizeOf = 321, OpTypePipeStorage = 322, OpConstantPipeStorage = 323, OpCreatePipeFromPipeStorage = 324, OpGetKernelLocalSizeForSubgroupCount = 325, OpGetKernelMaxNumSubgroups = 326, OpTypeNamedBarrier = 327, OpNamedBarrierInitialize = 328, OpMemoryNamedBarrier = 329, OpModuleProcessed = 330, OpExecutionModeId = 331, OpDecorateId = 332, OpGroupNonUniformElect = 333, OpGroupNonUniformAll = 334, OpGroupNonUniformAny = 335, OpGroupNonUniformAllEqual = 336, OpGroupNonUniformBroadcast = 337, OpGroupNonUniformBroadcastFirst = 338, OpGroupNonUniformBallot = 339, OpGroupNonUniformInverseBallot = 340, OpGroupNonUniformBallotBitExtract = 341, OpGroupNonUniformBallotBitCount = 342, OpGroupNonUniformBallotFindLSB = 343, OpGroupNonUniformBallotFindMSB = 344, OpGroupNonUniformShuffle = 345, OpGroupNonUniformShuffleXor = 346, OpGroupNonUniformShuffleUp = 347, OpGroupNonUniformShuffleDown = 348, OpGroupNonUniformIAdd = 349, OpGroupNonUniformFAdd = 350, OpGroupNonUniformIMul = 351, OpGroupNonUniformFMul = 352, OpGroupNonUniformSMin = 353, OpGroupNonUniformUMin = 354, OpGroupNonUniformFMin = 355, OpGroupNonUniformSMax = 356, OpGroupNonUniformUMax = 357, OpGroupNonUniformFMax = 358, OpGroupNonUniformBitwiseAnd = 359, OpGroupNonUniformBitwiseOr = 360, OpGroupNonUniformBitwiseXor = 361, OpGroupNonUniformLogicalAnd = 362, OpGroupNonUniformLogicalOr = 363, OpGroupNonUniformLogicalXor = 364, OpGroupNonUniformQuadBroadcast = 365, OpGroupNonUniformQuadSwap = 366, OpCopyLogical = 400, OpPtrEqual = 401, OpPtrNotEqual = 402, OpPtrDiff = 403, OpColorAttachmentReadEXT = 4160, OpDepthAttachmentReadEXT = 4161, OpStencilAttachmentReadEXT = 4162, OpTerminateInvocation = 4416, OpTypeUntypedPointerKHR = 4417, OpUntypedVariableKHR = 4418, OpUntypedAccessChainKHR = 4419, OpUntypedInBoundsAccessChainKHR = 4420, OpSubgroupBallotKHR = 4421, OpSubgroupFirstInvocationKHR = 4422, OpUntypedPtrAccessChainKHR = 4423, OpUntypedInBoundsPtrAccessChainKHR = 4424, OpUntypedArrayLengthKHR = 4425, OpUntypedPrefetchKHR = 4426, OpSubgroupAllKHR = 4428, OpSubgroupAnyKHR = 4429, OpSubgroupAllEqualKHR = 4430, OpGroupNonUniformRotateKHR = 4431, OpSubgroupReadInvocationKHR = 4432, OpExtInstWithForwardRefsKHR = 4433, OpTraceRayKHR = 4445, OpExecuteCallableKHR = 4446, OpConvertUToAccelerationStructureKHR = 4447, OpIgnoreIntersectionKHR = 4448, OpTerminateRayKHR = 4449, OpSDot = 4450, OpSDotKHR = 4450, OpUDot = 4451, OpUDotKHR = 4451, OpSUDot = 4452, OpSUDotKHR = 4452, OpSDotAccSat = 4453, OpSDotAccSatKHR = 4453, OpUDotAccSat = 4454, OpUDotAccSatKHR = 4454, OpSUDotAccSat = 4455, OpSUDotAccSatKHR = 4455, OpTypeCooperativeMatrixKHR = 4456, OpCooperativeMatrixLoadKHR = 4457, OpCooperativeMatrixStoreKHR = 4458, OpCooperativeMatrixMulAddKHR = 4459, OpCooperativeMatrixLengthKHR = 4460, OpConstantCompositeReplicateEXT = 4461, OpSpecConstantCompositeReplicateEXT = 4462, OpCompositeConstructReplicateEXT = 4463, OpTypeRayQueryKHR = 4472, OpRayQueryInitializeKHR = 4473, OpRayQueryTerminateKHR = 4474, OpRayQueryGenerateIntersectionKHR = 4475, OpRayQueryConfirmIntersectionKHR = 4476, OpRayQueryProceedKHR = 4477, OpRayQueryGetIntersectionTypeKHR = 4479, OpImageSampleWeightedQCOM = 4480, OpImageBoxFilterQCOM = 4481, OpImageBlockMatchSSDQCOM = 4482, OpImageBlockMatchSADQCOM = 4483, OpImageBlockMatchWindowSSDQCOM = 4500, OpImageBlockMatchWindowSADQCOM = 4501, OpImageBlockMatchGatherSSDQCOM = 4502, OpImageBlockMatchGatherSADQCOM = 4503, OpGroupIAddNonUniformAMD = 5000, OpGroupFAddNonUniformAMD = 5001, OpGroupFMinNonUniformAMD = 5002, OpGroupUMinNonUniformAMD = 5003, OpGroupSMinNonUniformAMD = 5004, OpGroupFMaxNonUniformAMD = 5005, OpGroupUMaxNonUniformAMD = 5006, OpGroupSMaxNonUniformAMD = 5007, OpFragmentMaskFetchAMD = 5011, OpFragmentFetchAMD = 5012, OpReadClockKHR = 5056, OpAllocateNodePayloadsAMDX = 5074, OpEnqueueNodePayloadsAMDX = 5075, OpTypeNodePayloadArrayAMDX = 5076, OpFinishWritingNodePayloadAMDX = 5078, OpNodePayloadArrayLengthAMDX = 5090, OpIsNodePayloadValidAMDX = 5101, OpConstantStringAMDX = 5103, OpSpecConstantStringAMDX = 5104, OpGroupNonUniformQuadAllKHR = 5110, OpGroupNonUniformQuadAnyKHR = 5111, OpHitObjectRecordHitMotionNV = 5249, OpHitObjectRecordHitWithIndexMotionNV = 5250, OpHitObjectRecordMissMotionNV = 5251, OpHitObjectGetWorldToObjectNV = 5252, OpHitObjectGetObjectToWorldNV = 5253, OpHitObjectGetObjectRayDirectionNV = 5254, OpHitObjectGetObjectRayOriginNV = 5255, OpHitObjectTraceRayMotionNV = 5256, OpHitObjectGetShaderRecordBufferHandleNV = 5257, OpHitObjectGetShaderBindingTableRecordIndexNV = 5258, OpHitObjectRecordEmptyNV = 5259, OpHitObjectTraceRayNV = 5260, OpHitObjectRecordHitNV = 5261, OpHitObjectRecordHitWithIndexNV = 5262, OpHitObjectRecordMissNV = 5263, OpHitObjectExecuteShaderNV = 5264, OpHitObjectGetCurrentTimeNV = 5265, OpHitObjectGetAttributesNV = 5266, OpHitObjectGetHitKindNV = 5267, OpHitObjectGetPrimitiveIndexNV = 5268, OpHitObjectGetGeometryIndexNV = 5269, OpHitObjectGetInstanceIdNV = 5270, OpHitObjectGetInstanceCustomIndexNV = 5271, OpHitObjectGetWorldRayDirectionNV = 5272, OpHitObjectGetWorldRayOriginNV = 5273, OpHitObjectGetRayTMaxNV = 5274, OpHitObjectGetRayTMinNV = 5275, OpHitObjectIsEmptyNV = 5276, OpHitObjectIsHitNV = 5277, OpHitObjectIsMissNV = 5278, OpReorderThreadWithHitObjectNV = 5279, OpReorderThreadWithHintNV = 5280, OpTypeHitObjectNV = 5281, OpImageSampleFootprintNV = 5283, OpTypeCooperativeVectorNV = 5288, OpCooperativeVectorMatrixMulNV = 5289, OpCooperativeVectorOuterProductAccumulateNV = 5290, OpCooperativeVectorReduceSumAccumulateNV = 5291, OpCooperativeVectorMatrixMulAddNV = 5292, OpCooperativeMatrixConvertNV = 5293, OpEmitMeshTasksEXT = 5294, OpSetMeshOutputsEXT = 5295, OpGroupNonUniformPartitionNV = 5296, OpWritePackedPrimitiveIndices4x8NV = 5299, OpFetchMicroTriangleVertexPositionNV = 5300, OpFetchMicroTriangleVertexBarycentricNV = 5301, OpCooperativeVectorLoadNV = 5302, OpCooperativeVectorStoreNV = 5303, OpReportIntersectionKHR = 5334, OpReportIntersectionNV = 5334, OpIgnoreIntersectionNV = 5335, OpTerminateRayNV = 5336, OpTraceNV = 5337, OpTraceMotionNV = 5338, OpTraceRayMotionNV = 5339, OpRayQueryGetIntersectionTriangleVertexPositionsKHR = 5340, OpTypeAccelerationStructureKHR = 5341, OpTypeAccelerationStructureNV = 5341, OpExecuteCallableNV = 5344, OpRayQueryGetClusterIdNV = 5345, OpHitObjectGetClusterIdNV = 5346, OpTypeCooperativeMatrixNV = 5358, OpCooperativeMatrixLoadNV = 5359, OpCooperativeMatrixStoreNV = 5360, OpCooperativeMatrixMulAddNV = 5361, OpCooperativeMatrixLengthNV = 5362, OpBeginInvocationInterlockEXT = 5364, OpEndInvocationInterlockEXT = 5365, OpCooperativeMatrixReduceNV = 5366, OpCooperativeMatrixLoadTensorNV = 5367, OpCooperativeMatrixStoreTensorNV = 5368, OpCooperativeMatrixPerElementOpNV = 5369, OpTypeTensorLayoutNV = 5370, OpTypeTensorViewNV = 5371, OpCreateTensorLayoutNV = 5372, OpTensorLayoutSetDimensionNV = 5373, OpTensorLayoutSetStrideNV = 5374, OpTensorLayoutSliceNV = 5375, OpTensorLayoutSetClampValueNV = 5376, OpCreateTensorViewNV = 5377, OpTensorViewSetDimensionNV = 5378, OpTensorViewSetStrideNV = 5379, OpDemoteToHelperInvocation = 5380, OpDemoteToHelperInvocationEXT = 5380, OpIsHelperInvocationEXT = 5381, OpTensorViewSetClipNV = 5382, OpTensorLayoutSetBlockSizeNV = 5384, OpCooperativeMatrixTransposeNV = 5390, OpConvertUToImageNV = 5391, OpConvertUToSamplerNV = 5392, OpConvertImageToUNV = 5393, OpConvertSamplerToUNV = 5394, OpConvertUToSampledImageNV = 5395, OpConvertSampledImageToUNV = 5396, OpSamplerImageAddressingModeNV = 5397, OpRawAccessChainNV = 5398, OpRayQueryGetIntersectionSpherePositionNV = 5427, OpRayQueryGetIntersectionSphereRadiusNV = 5428, OpRayQueryGetIntersectionLSSPositionsNV = 5429, OpRayQueryGetIntersectionLSSRadiiNV = 5430, OpRayQueryGetIntersectionLSSHitValueNV = 5431, OpHitObjectGetSpherePositionNV = 5432, OpHitObjectGetSphereRadiusNV = 5433, OpHitObjectGetLSSPositionsNV = 5434, OpHitObjectGetLSSRadiiNV = 5435, OpHitObjectIsSphereHitNV = 5436, OpHitObjectIsLSSHitNV = 5437, OpRayQueryIsSphereHitNV = 5438, OpRayQueryIsLSSHitNV = 5439, OpSubgroupShuffleINTEL = 5571, OpSubgroupShuffleDownINTEL = 5572, OpSubgroupShuffleUpINTEL = 5573, OpSubgroupShuffleXorINTEL = 5574, OpSubgroupBlockReadINTEL = 5575, OpSubgroupBlockWriteINTEL = 5576, OpSubgroupImageBlockReadINTEL = 5577, OpSubgroupImageBlockWriteINTEL = 5578, OpSubgroupImageMediaBlockReadINTEL = 5580, OpSubgroupImageMediaBlockWriteINTEL = 5581, OpUCountLeadingZerosINTEL = 5585, OpUCountTrailingZerosINTEL = 5586, OpAbsISubINTEL = 5587, OpAbsUSubINTEL = 5588, OpIAddSatINTEL = 5589, OpUAddSatINTEL = 5590, OpIAverageINTEL = 5591, OpUAverageINTEL = 5592, OpIAverageRoundedINTEL = 5593, OpUAverageRoundedINTEL = 5594, OpISubSatINTEL = 5595, OpUSubSatINTEL = 5596, OpIMul32x16INTEL = 5597, OpUMul32x16INTEL = 5598, OpConstantFunctionPointerINTEL = 5600, OpFunctionPointerCallINTEL = 5601, OpAsmTargetINTEL = 5609, OpAsmINTEL = 5610, OpAsmCallINTEL = 5611, OpAtomicFMinEXT = 5614, OpAtomicFMaxEXT = 5615, OpAssumeTrueKHR = 5630, OpExpectKHR = 5631, OpDecorateString = 5632, OpDecorateStringGOOGLE = 5632, OpMemberDecorateString = 5633, OpMemberDecorateStringGOOGLE = 5633, OpVmeImageINTEL = 5699, OpTypeVmeImageINTEL = 5700, OpTypeAvcImePayloadINTEL = 5701, OpTypeAvcRefPayloadINTEL = 5702, OpTypeAvcSicPayloadINTEL = 5703, OpTypeAvcMcePayloadINTEL = 5704, OpTypeAvcMceResultINTEL = 5705, OpTypeAvcImeResultINTEL = 5706, OpTypeAvcImeResultSingleReferenceStreamoutINTEL = 5707, OpTypeAvcImeResultDualReferenceStreamoutINTEL = 5708, OpTypeAvcImeSingleReferenceStreaminINTEL = 5709, OpTypeAvcImeDualReferenceStreaminINTEL = 5710, OpTypeAvcRefResultINTEL = 5711, OpTypeAvcSicResultINTEL = 5712, OpSubgroupAvcMceGetDefaultInterBaseMultiReferencePenaltyINTEL = 5713, OpSubgroupAvcMceSetInterBaseMultiReferencePenaltyINTEL = 5714, OpSubgroupAvcMceGetDefaultInterShapePenaltyINTEL = 5715, OpSubgroupAvcMceSetInterShapePenaltyINTEL = 5716, OpSubgroupAvcMceGetDefaultInterDirectionPenaltyINTEL = 5717, OpSubgroupAvcMceSetInterDirectionPenaltyINTEL = 5718, OpSubgroupAvcMceGetDefaultIntraLumaShapePenaltyINTEL = 5719, OpSubgroupAvcMceGetDefaultInterMotionVectorCostTableINTEL = 5720, OpSubgroupAvcMceGetDefaultHighPenaltyCostTableINTEL = 5721, OpSubgroupAvcMceGetDefaultMediumPenaltyCostTableINTEL = 5722, OpSubgroupAvcMceGetDefaultLowPenaltyCostTableINTEL = 5723, OpSubgroupAvcMceSetMotionVectorCostFunctionINTEL = 5724, OpSubgroupAvcMceGetDefaultIntraLumaModePenaltyINTEL = 5725, OpSubgroupAvcMceGetDefaultNonDcLumaIntraPenaltyINTEL = 5726, OpSubgroupAvcMceGetDefaultIntraChromaModeBasePenaltyINTEL = 5727, OpSubgroupAvcMceSetAcOnlyHaarINTEL = 5728, OpSubgroupAvcMceSetSourceInterlacedFieldPolarityINTEL = 5729, OpSubgroupAvcMceSetSingleReferenceInterlacedFieldPolarityINTEL = 5730, OpSubgroupAvcMceSetDualReferenceInterlacedFieldPolaritiesINTEL = 5731, OpSubgroupAvcMceConvertToImePayloadINTEL = 5732, OpSubgroupAvcMceConvertToImeResultINTEL = 5733, OpSubgroupAvcMceConvertToRefPayloadINTEL = 5734, OpSubgroupAvcMceConvertToRefResultINTEL = 5735, OpSubgroupAvcMceConvertToSicPayloadINTEL = 5736, OpSubgroupAvcMceConvertToSicResultINTEL = 5737, OpSubgroupAvcMceGetMotionVectorsINTEL = 5738, OpSubgroupAvcMceGetInterDistortionsINTEL = 5739, OpSubgroupAvcMceGetBestInterDistortionsINTEL = 5740, OpSubgroupAvcMceGetInterMajorShapeINTEL = 5741, OpSubgroupAvcMceGetInterMinorShapeINTEL = 5742, OpSubgroupAvcMceGetInterDirectionsINTEL = 5743, OpSubgroupAvcMceGetInterMotionVectorCountINTEL = 5744, OpSubgroupAvcMceGetInterReferenceIdsINTEL = 5745, OpSubgroupAvcMceGetInterReferenceInterlacedFieldPolaritiesINTEL = 5746, OpSubgroupAvcImeInitializeINTEL = 5747, OpSubgroupAvcImeSetSingleReferenceINTEL = 5748, OpSubgroupAvcImeSetDualReferenceINTEL = 5749, OpSubgroupAvcImeRefWindowSizeINTEL = 5750, OpSubgroupAvcImeAdjustRefOffsetINTEL = 5751, OpSubgroupAvcImeConvertToMcePayloadINTEL = 5752, OpSubgroupAvcImeSetMaxMotionVectorCountINTEL = 5753, OpSubgroupAvcImeSetUnidirectionalMixDisableINTEL = 5754, OpSubgroupAvcImeSetEarlySearchTerminationThresholdINTEL = 5755, OpSubgroupAvcImeSetWeightedSadINTEL = 5756, OpSubgroupAvcImeEvaluateWithSingleReferenceINTEL = 5757, OpSubgroupAvcImeEvaluateWithDualReferenceINTEL = 5758, OpSubgroupAvcImeEvaluateWithSingleReferenceStreaminINTEL = 5759, OpSubgroupAvcImeEvaluateWithDualReferenceStreaminINTEL = 5760, OpSubgroupAvcImeEvaluateWithSingleReferenceStreamoutINTEL = 5761, OpSubgroupAvcImeEvaluateWithDualReferenceStreamoutINTEL = 5762, OpSubgroupAvcImeEvaluateWithSingleReferenceStreaminoutINTEL = 5763, OpSubgroupAvcImeEvaluateWithDualReferenceStreaminoutINTEL = 5764, OpSubgroupAvcImeConvertToMceResultINTEL = 5765, OpSubgroupAvcImeGetSingleReferenceStreaminINTEL = 5766, OpSubgroupAvcImeGetDualReferenceStreaminINTEL = 5767, OpSubgroupAvcImeStripSingleReferenceStreamoutINTEL = 5768, OpSubgroupAvcImeStripDualReferenceStreamoutINTEL = 5769, OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeMotionVectorsINTEL = 5770, OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeDistortionsINTEL = 5771, OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeReferenceIdsINTEL = 5772, OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeMotionVectorsINTEL = 5773, OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeDistortionsINTEL = 5774, OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeReferenceIdsINTEL = 5775, OpSubgroupAvcImeGetBorderReachedINTEL = 5776, OpSubgroupAvcImeGetTruncatedSearchIndicationINTEL = 5777, OpSubgroupAvcImeGetUnidirectionalEarlySearchTerminationINTEL = 5778, OpSubgroupAvcImeGetWeightingPatternMinimumMotionVectorINTEL = 5779, OpSubgroupAvcImeGetWeightingPatternMinimumDistortionINTEL = 5780, OpSubgroupAvcFmeInitializeINTEL = 5781, OpSubgroupAvcBmeInitializeINTEL = 5782, OpSubgroupAvcRefConvertToMcePayloadINTEL = 5783, OpSubgroupAvcRefSetBidirectionalMixDisableINTEL = 5784, OpSubgroupAvcRefSetBilinearFilterEnableINTEL = 5785, OpSubgroupAvcRefEvaluateWithSingleReferenceINTEL = 5786, OpSubgroupAvcRefEvaluateWithDualReferenceINTEL = 5787, OpSubgroupAvcRefEvaluateWithMultiReferenceINTEL = 5788, OpSubgroupAvcRefEvaluateWithMultiReferenceInterlacedINTEL = 5789, OpSubgroupAvcRefConvertToMceResultINTEL = 5790, OpSubgroupAvcSicInitializeINTEL = 5791, OpSubgroupAvcSicConfigureSkcINTEL = 5792, OpSubgroupAvcSicConfigureIpeLumaINTEL = 5793, OpSubgroupAvcSicConfigureIpeLumaChromaINTEL = 5794, OpSubgroupAvcSicGetMotionVectorMaskINTEL = 5795, OpSubgroupAvcSicConvertToMcePayloadINTEL = 5796, OpSubgroupAvcSicSetIntraLumaShapePenaltyINTEL = 5797, OpSubgroupAvcSicSetIntraLumaModeCostFunctionINTEL = 5798, OpSubgroupAvcSicSetIntraChromaModeCostFunctionINTEL = 5799, OpSubgroupAvcSicSetBilinearFilterEnableINTEL = 5800, OpSubgroupAvcSicSetSkcForwardTransformEnableINTEL = 5801, OpSubgroupAvcSicSetBlockBasedRawSkipSadINTEL = 5802, OpSubgroupAvcSicEvaluateIpeINTEL = 5803, OpSubgroupAvcSicEvaluateWithSingleReferenceINTEL = 5804, OpSubgroupAvcSicEvaluateWithDualReferenceINTEL = 5805, OpSubgroupAvcSicEvaluateWithMultiReferenceINTEL = 5806, OpSubgroupAvcSicEvaluateWithMultiReferenceInterlacedINTEL = 5807, OpSubgroupAvcSicConvertToMceResultINTEL = 5808, OpSubgroupAvcSicGetIpeLumaShapeINTEL = 5809, OpSubgroupAvcSicGetBestIpeLumaDistortionINTEL = 5810, OpSubgroupAvcSicGetBestIpeChromaDistortionINTEL = 5811, OpSubgroupAvcSicGetPackedIpeLumaModesINTEL = 5812, OpSubgroupAvcSicGetIpeChromaModeINTEL = 5813, OpSubgroupAvcSicGetPackedSkcLumaCountThresholdINTEL = 5814, OpSubgroupAvcSicGetPackedSkcLumaSumThresholdINTEL = 5815, OpSubgroupAvcSicGetInterRawSadsINTEL = 5816, OpVariableLengthArrayINTEL = 5818, OpSaveMemoryINTEL = 5819, OpRestoreMemoryINTEL = 5820, OpArbitraryFloatSinCosPiINTEL = 5840, OpArbitraryFloatCastINTEL = 5841, OpArbitraryFloatCastFromIntINTEL = 5842, OpArbitraryFloatCastToIntINTEL = 5843, OpArbitraryFloatAddINTEL = 5846, OpArbitraryFloatSubINTEL = 5847, OpArbitraryFloatMulINTEL = 5848, OpArbitraryFloatDivINTEL = 5849, OpArbitraryFloatGTINTEL = 5850, OpArbitraryFloatGEINTEL = 5851, OpArbitraryFloatLTINTEL = 5852, OpArbitraryFloatLEINTEL = 5853, OpArbitraryFloatEQINTEL = 5854, OpArbitraryFloatRecipINTEL = 5855, OpArbitraryFloatRSqrtINTEL = 5856, OpArbitraryFloatCbrtINTEL = 5857, OpArbitraryFloatHypotINTEL = 5858, OpArbitraryFloatSqrtINTEL = 5859, OpArbitraryFloatLogINTEL = 5860, OpArbitraryFloatLog2INTEL = 5861, OpArbitraryFloatLog10INTEL = 5862, OpArbitraryFloatLog1pINTEL = 5863, OpArbitraryFloatExpINTEL = 5864, OpArbitraryFloatExp2INTEL = 5865, OpArbitraryFloatExp10INTEL = 5866, OpArbitraryFloatExpm1INTEL = 5867, OpArbitraryFloatSinINTEL = 5868, OpArbitraryFloatCosINTEL = 5869, OpArbitraryFloatSinCosINTEL = 5870, OpArbitraryFloatSinPiINTEL = 5871, OpArbitraryFloatCosPiINTEL = 5872, OpArbitraryFloatASinINTEL = 5873, OpArbitraryFloatASinPiINTEL = 5874, OpArbitraryFloatACosINTEL = 5875, OpArbitraryFloatACosPiINTEL = 5876, OpArbitraryFloatATanINTEL = 5877, OpArbitraryFloatATanPiINTEL = 5878, OpArbitraryFloatATan2INTEL = 5879, OpArbitraryFloatPowINTEL = 5880, OpArbitraryFloatPowRINTEL = 5881, OpArbitraryFloatPowNINTEL = 5882, OpLoopControlINTEL = 5887, OpAliasDomainDeclINTEL = 5911, OpAliasScopeDeclINTEL = 5912, OpAliasScopeListDeclINTEL = 5913, OpFixedSqrtINTEL = 5923, OpFixedRecipINTEL = 5924, OpFixedRsqrtINTEL = 5925, OpFixedSinINTEL = 5926, OpFixedCosINTEL = 5927, OpFixedSinCosINTEL = 5928, OpFixedSinPiINTEL = 5929, OpFixedCosPiINTEL = 5930, OpFixedSinCosPiINTEL = 5931, OpFixedLogINTEL = 5932, OpFixedExpINTEL = 5933, OpPtrCastToCrossWorkgroupINTEL = 5934, OpCrossWorkgroupCastToPtrINTEL = 5938, OpReadPipeBlockingINTEL = 5946, OpWritePipeBlockingINTEL = 5947, OpFPGARegINTEL = 5949, OpRayQueryGetRayTMinKHR = 6016, OpRayQueryGetRayFlagsKHR = 6017, OpRayQueryGetIntersectionTKHR = 6018, OpRayQueryGetIntersectionInstanceCustomIndexKHR = 6019, OpRayQueryGetIntersectionInstanceIdKHR = 6020, OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR = 6021, OpRayQueryGetIntersectionGeometryIndexKHR = 6022, OpRayQueryGetIntersectionPrimitiveIndexKHR = 6023, OpRayQueryGetIntersectionBarycentricsKHR = 6024, OpRayQueryGetIntersectionFrontFaceKHR = 6025, OpRayQueryGetIntersectionCandidateAABBOpaqueKHR = 6026, OpRayQueryGetIntersectionObjectRayDirectionKHR = 6027, OpRayQueryGetIntersectionObjectRayOriginKHR = 6028, OpRayQueryGetWorldRayDirectionKHR = 6029, OpRayQueryGetWorldRayOriginKHR = 6030, OpRayQueryGetIntersectionObjectToWorldKHR = 6031, OpRayQueryGetIntersectionWorldToObjectKHR = 6032, OpAtomicFAddEXT = 6035, OpTypeBufferSurfaceINTEL = 6086, OpTypeStructContinuedINTEL = 6090, OpConstantCompositeContinuedINTEL = 6091, OpSpecConstantCompositeContinuedINTEL = 6092, OpCompositeConstructContinuedINTEL = 6096, OpConvertFToBF16INTEL = 6116, OpConvertBF16ToFINTEL = 6117, OpControlBarrierArriveINTEL = 6142, OpControlBarrierWaitINTEL = 6143, OpArithmeticFenceEXT = 6145, OpSubgroupBlockPrefetchINTEL = 6221, OpSubgroup2DBlockLoadINTEL = 6231, OpSubgroup2DBlockLoadTransformINTEL = 6232, OpSubgroup2DBlockLoadTransposeINTEL = 6233, OpSubgroup2DBlockPrefetchINTEL = 6234, OpSubgroup2DBlockStoreINTEL = 6235, OpSubgroupMatrixMultiplyAccumulateINTEL = 6237, OpGroupIMulKHR = 6401, OpGroupFMulKHR = 6402, OpGroupBitwiseAndKHR = 6403, OpGroupBitwiseOrKHR = 6404, OpGroupBitwiseXorKHR = 6405, OpGroupLogicalAndKHR = 6406, OpGroupLogicalOrKHR = 6407, OpGroupLogicalXorKHR = 6408, OpMaskedGatherINTEL = 6428, OpMaskedScatterINTEL = 6429, Max = 0x7fffffff, }; #ifdef SPV_ENABLE_UTILITY_CODE #ifndef __cplusplus #include #endif inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) { *hasResult = *hasResultType = false; switch (opcode) { default: /* unknown opcode */ break; case Op::OpNop: *hasResult = false; *hasResultType = false; break; case Op::OpUndef: *hasResult = true; *hasResultType = true; break; case Op::OpSourceContinued: *hasResult = false; *hasResultType = false; break; case Op::OpSource: *hasResult = false; *hasResultType = false; break; case Op::OpSourceExtension: *hasResult = false; *hasResultType = false; break; case Op::OpName: *hasResult = false; *hasResultType = false; break; case Op::OpMemberName: *hasResult = false; *hasResultType = false; break; case Op::OpString: *hasResult = true; *hasResultType = false; break; case Op::OpLine: *hasResult = false; *hasResultType = false; break; case Op::OpExtension: *hasResult = false; *hasResultType = false; break; case Op::OpExtInstImport: *hasResult = true; *hasResultType = false; break; case Op::OpExtInst: *hasResult = true; *hasResultType = true; break; case Op::OpMemoryModel: *hasResult = false; *hasResultType = false; break; case Op::OpEntryPoint: *hasResult = false; *hasResultType = false; break; case Op::OpExecutionMode: *hasResult = false; *hasResultType = false; break; case Op::OpCapability: *hasResult = false; *hasResultType = false; break; case Op::OpTypeVoid: *hasResult = true; *hasResultType = false; break; case Op::OpTypeBool: *hasResult = true; *hasResultType = false; break; case Op::OpTypeInt: *hasResult = true; *hasResultType = false; break; case Op::OpTypeFloat: *hasResult = true; *hasResultType = false; break; case Op::OpTypeVector: *hasResult = true; *hasResultType = false; break; case Op::OpTypeMatrix: *hasResult = true; *hasResultType = false; break; case Op::OpTypeImage: *hasResult = true; *hasResultType = false; break; case Op::OpTypeSampler: *hasResult = true; *hasResultType = false; break; case Op::OpTypeSampledImage: *hasResult = true; *hasResultType = false; break; case Op::OpTypeArray: *hasResult = true; *hasResultType = false; break; case Op::OpTypeRuntimeArray: *hasResult = true; *hasResultType = false; break; case Op::OpTypeStruct: *hasResult = true; *hasResultType = false; break; case Op::OpTypeOpaque: *hasResult = true; *hasResultType = false; break; case Op::OpTypePointer: *hasResult = true; *hasResultType = false; break; case Op::OpTypeFunction: *hasResult = true; *hasResultType = false; break; case Op::OpTypeEvent: *hasResult = true; *hasResultType = false; break; case Op::OpTypeDeviceEvent: *hasResult = true; *hasResultType = false; break; case Op::OpTypeReserveId: *hasResult = true; *hasResultType = false; break; case Op::OpTypeQueue: *hasResult = true; *hasResultType = false; break; case Op::OpTypePipe: *hasResult = true; *hasResultType = false; break; case Op::OpTypeForwardPointer: *hasResult = false; *hasResultType = false; break; case Op::OpConstantTrue: *hasResult = true; *hasResultType = true; break; case Op::OpConstantFalse: *hasResult = true; *hasResultType = true; break; case Op::OpConstant: *hasResult = true; *hasResultType = true; break; case Op::OpConstantComposite: *hasResult = true; *hasResultType = true; break; case Op::OpConstantSampler: *hasResult = true; *hasResultType = true; break; case Op::OpConstantNull: *hasResult = true; *hasResultType = true; break; case Op::OpSpecConstantTrue: *hasResult = true; *hasResultType = true; break; case Op::OpSpecConstantFalse: *hasResult = true; *hasResultType = true; break; case Op::OpSpecConstant: *hasResult = true; *hasResultType = true; break; case Op::OpSpecConstantComposite: *hasResult = true; *hasResultType = true; break; case Op::OpSpecConstantOp: *hasResult = true; *hasResultType = true; break; case Op::OpFunction: *hasResult = true; *hasResultType = true; break; case Op::OpFunctionParameter: *hasResult = true; *hasResultType = true; break; case Op::OpFunctionEnd: *hasResult = false; *hasResultType = false; break; case Op::OpFunctionCall: *hasResult = true; *hasResultType = true; break; case Op::OpVariable: *hasResult = true; *hasResultType = true; break; case Op::OpImageTexelPointer: *hasResult = true; *hasResultType = true; break; case Op::OpLoad: *hasResult = true; *hasResultType = true; break; case Op::OpStore: *hasResult = false; *hasResultType = false; break; case Op::OpCopyMemory: *hasResult = false; *hasResultType = false; break; case Op::OpCopyMemorySized: *hasResult = false; *hasResultType = false; break; case Op::OpAccessChain: *hasResult = true; *hasResultType = true; break; case Op::OpInBoundsAccessChain: *hasResult = true; *hasResultType = true; break; case Op::OpPtrAccessChain: *hasResult = true; *hasResultType = true; break; case Op::OpArrayLength: *hasResult = true; *hasResultType = true; break; case Op::OpGenericPtrMemSemantics: *hasResult = true; *hasResultType = true; break; case Op::OpInBoundsPtrAccessChain: *hasResult = true; *hasResultType = true; break; case Op::OpDecorate: *hasResult = false; *hasResultType = false; break; case Op::OpMemberDecorate: *hasResult = false; *hasResultType = false; break; case Op::OpDecorationGroup: *hasResult = true; *hasResultType = false; break; case Op::OpGroupDecorate: *hasResult = false; *hasResultType = false; break; case Op::OpGroupMemberDecorate: *hasResult = false; *hasResultType = false; break; case Op::OpVectorExtractDynamic: *hasResult = true; *hasResultType = true; break; case Op::OpVectorInsertDynamic: *hasResult = true; *hasResultType = true; break; case Op::OpVectorShuffle: *hasResult = true; *hasResultType = true; break; case Op::OpCompositeConstruct: *hasResult = true; *hasResultType = true; break; case Op::OpCompositeExtract: *hasResult = true; *hasResultType = true; break; case Op::OpCompositeInsert: *hasResult = true; *hasResultType = true; break; case Op::OpCopyObject: *hasResult = true; *hasResultType = true; break; case Op::OpTranspose: *hasResult = true; *hasResultType = true; break; case Op::OpSampledImage: *hasResult = true; *hasResultType = true; break; case Op::OpImageSampleImplicitLod: *hasResult = true; *hasResultType = true; break; case Op::OpImageSampleExplicitLod: *hasResult = true; *hasResultType = true; break; case Op::OpImageSampleDrefImplicitLod: *hasResult = true; *hasResultType = true; break; case Op::OpImageSampleDrefExplicitLod: *hasResult = true; *hasResultType = true; break; case Op::OpImageSampleProjImplicitLod: *hasResult = true; *hasResultType = true; break; case Op::OpImageSampleProjExplicitLod: *hasResult = true; *hasResultType = true; break; case Op::OpImageSampleProjDrefImplicitLod: *hasResult = true; *hasResultType = true; break; case Op::OpImageSampleProjDrefExplicitLod: *hasResult = true; *hasResultType = true; break; case Op::OpImageFetch: *hasResult = true; *hasResultType = true; break; case Op::OpImageGather: *hasResult = true; *hasResultType = true; break; case Op::OpImageDrefGather: *hasResult = true; *hasResultType = true; break; case Op::OpImageRead: *hasResult = true; *hasResultType = true; break; case Op::OpImageWrite: *hasResult = false; *hasResultType = false; break; case Op::OpImage: *hasResult = true; *hasResultType = true; break; case Op::OpImageQueryFormat: *hasResult = true; *hasResultType = true; break; case Op::OpImageQueryOrder: *hasResult = true; *hasResultType = true; break; case Op::OpImageQuerySizeLod: *hasResult = true; *hasResultType = true; break; case Op::OpImageQuerySize: *hasResult = true; *hasResultType = true; break; case Op::OpImageQueryLod: *hasResult = true; *hasResultType = true; break; case Op::OpImageQueryLevels: *hasResult = true; *hasResultType = true; break; case Op::OpImageQuerySamples: *hasResult = true; *hasResultType = true; break; case Op::OpConvertFToU: *hasResult = true; *hasResultType = true; break; case Op::OpConvertFToS: *hasResult = true; *hasResultType = true; break; case Op::OpConvertSToF: *hasResult = true; *hasResultType = true; break; case Op::OpConvertUToF: *hasResult = true; *hasResultType = true; break; case Op::OpUConvert: *hasResult = true; *hasResultType = true; break; case Op::OpSConvert: *hasResult = true; *hasResultType = true; break; case Op::OpFConvert: *hasResult = true; *hasResultType = true; break; case Op::OpQuantizeToF16: *hasResult = true; *hasResultType = true; break; case Op::OpConvertPtrToU: *hasResult = true; *hasResultType = true; break; case Op::OpSatConvertSToU: *hasResult = true; *hasResultType = true; break; case Op::OpSatConvertUToS: *hasResult = true; *hasResultType = true; break; case Op::OpConvertUToPtr: *hasResult = true; *hasResultType = true; break; case Op::OpPtrCastToGeneric: *hasResult = true; *hasResultType = true; break; case Op::OpGenericCastToPtr: *hasResult = true; *hasResultType = true; break; case Op::OpGenericCastToPtrExplicit: *hasResult = true; *hasResultType = true; break; case Op::OpBitcast: *hasResult = true; *hasResultType = true; break; case Op::OpSNegate: *hasResult = true; *hasResultType = true; break; case Op::OpFNegate: *hasResult = true; *hasResultType = true; break; case Op::OpIAdd: *hasResult = true; *hasResultType = true; break; case Op::OpFAdd: *hasResult = true; *hasResultType = true; break; case Op::OpISub: *hasResult = true; *hasResultType = true; break; case Op::OpFSub: *hasResult = true; *hasResultType = true; break; case Op::OpIMul: *hasResult = true; *hasResultType = true; break; case Op::OpFMul: *hasResult = true; *hasResultType = true; break; case Op::OpUDiv: *hasResult = true; *hasResultType = true; break; case Op::OpSDiv: *hasResult = true; *hasResultType = true; break; case Op::OpFDiv: *hasResult = true; *hasResultType = true; break; case Op::OpUMod: *hasResult = true; *hasResultType = true; break; case Op::OpSRem: *hasResult = true; *hasResultType = true; break; case Op::OpSMod: *hasResult = true; *hasResultType = true; break; case Op::OpFRem: *hasResult = true; *hasResultType = true; break; case Op::OpFMod: *hasResult = true; *hasResultType = true; break; case Op::OpVectorTimesScalar: *hasResult = true; *hasResultType = true; break; case Op::OpMatrixTimesScalar: *hasResult = true; *hasResultType = true; break; case Op::OpVectorTimesMatrix: *hasResult = true; *hasResultType = true; break; case Op::OpMatrixTimesVector: *hasResult = true; *hasResultType = true; break; case Op::OpMatrixTimesMatrix: *hasResult = true; *hasResultType = true; break; case Op::OpOuterProduct: *hasResult = true; *hasResultType = true; break; case Op::OpDot: *hasResult = true; *hasResultType = true; break; case Op::OpIAddCarry: *hasResult = true; *hasResultType = true; break; case Op::OpISubBorrow: *hasResult = true; *hasResultType = true; break; case Op::OpUMulExtended: *hasResult = true; *hasResultType = true; break; case Op::OpSMulExtended: *hasResult = true; *hasResultType = true; break; case Op::OpAny: *hasResult = true; *hasResultType = true; break; case Op::OpAll: *hasResult = true; *hasResultType = true; break; case Op::OpIsNan: *hasResult = true; *hasResultType = true; break; case Op::OpIsInf: *hasResult = true; *hasResultType = true; break; case Op::OpIsFinite: *hasResult = true; *hasResultType = true; break; case Op::OpIsNormal: *hasResult = true; *hasResultType = true; break; case Op::OpSignBitSet: *hasResult = true; *hasResultType = true; break; case Op::OpLessOrGreater: *hasResult = true; *hasResultType = true; break; case Op::OpOrdered: *hasResult = true; *hasResultType = true; break; case Op::OpUnordered: *hasResult = true; *hasResultType = true; break; case Op::OpLogicalEqual: *hasResult = true; *hasResultType = true; break; case Op::OpLogicalNotEqual: *hasResult = true; *hasResultType = true; break; case Op::OpLogicalOr: *hasResult = true; *hasResultType = true; break; case Op::OpLogicalAnd: *hasResult = true; *hasResultType = true; break; case Op::OpLogicalNot: *hasResult = true; *hasResultType = true; break; case Op::OpSelect: *hasResult = true; *hasResultType = true; break; case Op::OpIEqual: *hasResult = true; *hasResultType = true; break; case Op::OpINotEqual: *hasResult = true; *hasResultType = true; break; case Op::OpUGreaterThan: *hasResult = true; *hasResultType = true; break; case Op::OpSGreaterThan: *hasResult = true; *hasResultType = true; break; case Op::OpUGreaterThanEqual: *hasResult = true; *hasResultType = true; break; case Op::OpSGreaterThanEqual: *hasResult = true; *hasResultType = true; break; case Op::OpULessThan: *hasResult = true; *hasResultType = true; break; case Op::OpSLessThan: *hasResult = true; *hasResultType = true; break; case Op::OpULessThanEqual: *hasResult = true; *hasResultType = true; break; case Op::OpSLessThanEqual: *hasResult = true; *hasResultType = true; break; case Op::OpFOrdEqual: *hasResult = true; *hasResultType = true; break; case Op::OpFUnordEqual: *hasResult = true; *hasResultType = true; break; case Op::OpFOrdNotEqual: *hasResult = true; *hasResultType = true; break; case Op::OpFUnordNotEqual: *hasResult = true; *hasResultType = true; break; case Op::OpFOrdLessThan: *hasResult = true; *hasResultType = true; break; case Op::OpFUnordLessThan: *hasResult = true; *hasResultType = true; break; case Op::OpFOrdGreaterThan: *hasResult = true; *hasResultType = true; break; case Op::OpFUnordGreaterThan: *hasResult = true; *hasResultType = true; break; case Op::OpFOrdLessThanEqual: *hasResult = true; *hasResultType = true; break; case Op::OpFUnordLessThanEqual: *hasResult = true; *hasResultType = true; break; case Op::OpFOrdGreaterThanEqual: *hasResult = true; *hasResultType = true; break; case Op::OpFUnordGreaterThanEqual: *hasResult = true; *hasResultType = true; break; case Op::OpShiftRightLogical: *hasResult = true; *hasResultType = true; break; case Op::OpShiftRightArithmetic: *hasResult = true; *hasResultType = true; break; case Op::OpShiftLeftLogical: *hasResult = true; *hasResultType = true; break; case Op::OpBitwiseOr: *hasResult = true; *hasResultType = true; break; case Op::OpBitwiseXor: *hasResult = true; *hasResultType = true; break; case Op::OpBitwiseAnd: *hasResult = true; *hasResultType = true; break; case Op::OpNot: *hasResult = true; *hasResultType = true; break; case Op::OpBitFieldInsert: *hasResult = true; *hasResultType = true; break; case Op::OpBitFieldSExtract: *hasResult = true; *hasResultType = true; break; case Op::OpBitFieldUExtract: *hasResult = true; *hasResultType = true; break; case Op::OpBitReverse: *hasResult = true; *hasResultType = true; break; case Op::OpBitCount: *hasResult = true; *hasResultType = true; break; case Op::OpDPdx: *hasResult = true; *hasResultType = true; break; case Op::OpDPdy: *hasResult = true; *hasResultType = true; break; case Op::OpFwidth: *hasResult = true; *hasResultType = true; break; case Op::OpDPdxFine: *hasResult = true; *hasResultType = true; break; case Op::OpDPdyFine: *hasResult = true; *hasResultType = true; break; case Op::OpFwidthFine: *hasResult = true; *hasResultType = true; break; case Op::OpDPdxCoarse: *hasResult = true; *hasResultType = true; break; case Op::OpDPdyCoarse: *hasResult = true; *hasResultType = true; break; case Op::OpFwidthCoarse: *hasResult = true; *hasResultType = true; break; case Op::OpEmitVertex: *hasResult = false; *hasResultType = false; break; case Op::OpEndPrimitive: *hasResult = false; *hasResultType = false; break; case Op::OpEmitStreamVertex: *hasResult = false; *hasResultType = false; break; case Op::OpEndStreamPrimitive: *hasResult = false; *hasResultType = false; break; case Op::OpControlBarrier: *hasResult = false; *hasResultType = false; break; case Op::OpMemoryBarrier: *hasResult = false; *hasResultType = false; break; case Op::OpAtomicLoad: *hasResult = true; *hasResultType = true; break; case Op::OpAtomicStore: *hasResult = false; *hasResultType = false; break; case Op::OpAtomicExchange: *hasResult = true; *hasResultType = true; break; case Op::OpAtomicCompareExchange: *hasResult = true; *hasResultType = true; break; case Op::OpAtomicCompareExchangeWeak: *hasResult = true; *hasResultType = true; break; case Op::OpAtomicIIncrement: *hasResult = true; *hasResultType = true; break; case Op::OpAtomicIDecrement: *hasResult = true; *hasResultType = true; break; case Op::OpAtomicIAdd: *hasResult = true; *hasResultType = true; break; case Op::OpAtomicISub: *hasResult = true; *hasResultType = true; break; case Op::OpAtomicSMin: *hasResult = true; *hasResultType = true; break; case Op::OpAtomicUMin: *hasResult = true; *hasResultType = true; break; case Op::OpAtomicSMax: *hasResult = true; *hasResultType = true; break; case Op::OpAtomicUMax: *hasResult = true; *hasResultType = true; break; case Op::OpAtomicAnd: *hasResult = true; *hasResultType = true; break; case Op::OpAtomicOr: *hasResult = true; *hasResultType = true; break; case Op::OpAtomicXor: *hasResult = true; *hasResultType = true; break; case Op::OpPhi: *hasResult = true; *hasResultType = true; break; case Op::OpLoopMerge: *hasResult = false; *hasResultType = false; break; case Op::OpSelectionMerge: *hasResult = false; *hasResultType = false; break; case Op::OpLabel: *hasResult = true; *hasResultType = false; break; case Op::OpBranch: *hasResult = false; *hasResultType = false; break; case Op::OpBranchConditional: *hasResult = false; *hasResultType = false; break; case Op::OpSwitch: *hasResult = false; *hasResultType = false; break; case Op::OpKill: *hasResult = false; *hasResultType = false; break; case Op::OpReturn: *hasResult = false; *hasResultType = false; break; case Op::OpReturnValue: *hasResult = false; *hasResultType = false; break; case Op::OpUnreachable: *hasResult = false; *hasResultType = false; break; case Op::OpLifetimeStart: *hasResult = false; *hasResultType = false; break; case Op::OpLifetimeStop: *hasResult = false; *hasResultType = false; break; case Op::OpGroupAsyncCopy: *hasResult = true; *hasResultType = true; break; case Op::OpGroupWaitEvents: *hasResult = false; *hasResultType = false; break; case Op::OpGroupAll: *hasResult = true; *hasResultType = true; break; case Op::OpGroupAny: *hasResult = true; *hasResultType = true; break; case Op::OpGroupBroadcast: *hasResult = true; *hasResultType = true; break; case Op::OpGroupIAdd: *hasResult = true; *hasResultType = true; break; case Op::OpGroupFAdd: *hasResult = true; *hasResultType = true; break; case Op::OpGroupFMin: *hasResult = true; *hasResultType = true; break; case Op::OpGroupUMin: *hasResult = true; *hasResultType = true; break; case Op::OpGroupSMin: *hasResult = true; *hasResultType = true; break; case Op::OpGroupFMax: *hasResult = true; *hasResultType = true; break; case Op::OpGroupUMax: *hasResult = true; *hasResultType = true; break; case Op::OpGroupSMax: *hasResult = true; *hasResultType = true; break; case Op::OpReadPipe: *hasResult = true; *hasResultType = true; break; case Op::OpWritePipe: *hasResult = true; *hasResultType = true; break; case Op::OpReservedReadPipe: *hasResult = true; *hasResultType = true; break; case Op::OpReservedWritePipe: *hasResult = true; *hasResultType = true; break; case Op::OpReserveReadPipePackets: *hasResult = true; *hasResultType = true; break; case Op::OpReserveWritePipePackets: *hasResult = true; *hasResultType = true; break; case Op::OpCommitReadPipe: *hasResult = false; *hasResultType = false; break; case Op::OpCommitWritePipe: *hasResult = false; *hasResultType = false; break; case Op::OpIsValidReserveId: *hasResult = true; *hasResultType = true; break; case Op::OpGetNumPipePackets: *hasResult = true; *hasResultType = true; break; case Op::OpGetMaxPipePackets: *hasResult = true; *hasResultType = true; break; case Op::OpGroupReserveReadPipePackets: *hasResult = true; *hasResultType = true; break; case Op::OpGroupReserveWritePipePackets: *hasResult = true; *hasResultType = true; break; case Op::OpGroupCommitReadPipe: *hasResult = false; *hasResultType = false; break; case Op::OpGroupCommitWritePipe: *hasResult = false; *hasResultType = false; break; case Op::OpEnqueueMarker: *hasResult = true; *hasResultType = true; break; case Op::OpEnqueueKernel: *hasResult = true; *hasResultType = true; break; case Op::OpGetKernelNDrangeSubGroupCount: *hasResult = true; *hasResultType = true; break; case Op::OpGetKernelNDrangeMaxSubGroupSize: *hasResult = true; *hasResultType = true; break; case Op::OpGetKernelWorkGroupSize: *hasResult = true; *hasResultType = true; break; case Op::OpGetKernelPreferredWorkGroupSizeMultiple: *hasResult = true; *hasResultType = true; break; case Op::OpRetainEvent: *hasResult = false; *hasResultType = false; break; case Op::OpReleaseEvent: *hasResult = false; *hasResultType = false; break; case Op::OpCreateUserEvent: *hasResult = true; *hasResultType = true; break; case Op::OpIsValidEvent: *hasResult = true; *hasResultType = true; break; case Op::OpSetUserEventStatus: *hasResult = false; *hasResultType = false; break; case Op::OpCaptureEventProfilingInfo: *hasResult = false; *hasResultType = false; break; case Op::OpGetDefaultQueue: *hasResult = true; *hasResultType = true; break; case Op::OpBuildNDRange: *hasResult = true; *hasResultType = true; break; case Op::OpImageSparseSampleImplicitLod: *hasResult = true; *hasResultType = true; break; case Op::OpImageSparseSampleExplicitLod: *hasResult = true; *hasResultType = true; break; case Op::OpImageSparseSampleDrefImplicitLod: *hasResult = true; *hasResultType = true; break; case Op::OpImageSparseSampleDrefExplicitLod: *hasResult = true; *hasResultType = true; break; case Op::OpImageSparseSampleProjImplicitLod: *hasResult = true; *hasResultType = true; break; case Op::OpImageSparseSampleProjExplicitLod: *hasResult = true; *hasResultType = true; break; case Op::OpImageSparseSampleProjDrefImplicitLod: *hasResult = true; *hasResultType = true; break; case Op::OpImageSparseSampleProjDrefExplicitLod: *hasResult = true; *hasResultType = true; break; case Op::OpImageSparseFetch: *hasResult = true; *hasResultType = true; break; case Op::OpImageSparseGather: *hasResult = true; *hasResultType = true; break; case Op::OpImageSparseDrefGather: *hasResult = true; *hasResultType = true; break; case Op::OpImageSparseTexelsResident: *hasResult = true; *hasResultType = true; break; case Op::OpNoLine: *hasResult = false; *hasResultType = false; break; case Op::OpAtomicFlagTestAndSet: *hasResult = true; *hasResultType = true; break; case Op::OpAtomicFlagClear: *hasResult = false; *hasResultType = false; break; case Op::OpImageSparseRead: *hasResult = true; *hasResultType = true; break; case Op::OpSizeOf: *hasResult = true; *hasResultType = true; break; case Op::OpTypePipeStorage: *hasResult = true; *hasResultType = false; break; case Op::OpConstantPipeStorage: *hasResult = true; *hasResultType = true; break; case Op::OpCreatePipeFromPipeStorage: *hasResult = true; *hasResultType = true; break; case Op::OpGetKernelLocalSizeForSubgroupCount: *hasResult = true; *hasResultType = true; break; case Op::OpGetKernelMaxNumSubgroups: *hasResult = true; *hasResultType = true; break; case Op::OpTypeNamedBarrier: *hasResult = true; *hasResultType = false; break; case Op::OpNamedBarrierInitialize: *hasResult = true; *hasResultType = true; break; case Op::OpMemoryNamedBarrier: *hasResult = false; *hasResultType = false; break; case Op::OpModuleProcessed: *hasResult = false; *hasResultType = false; break; case Op::OpExecutionModeId: *hasResult = false; *hasResultType = false; break; case Op::OpDecorateId: *hasResult = false; *hasResultType = false; break; case Op::OpGroupNonUniformElect: *hasResult = true; *hasResultType = true; break; case Op::OpGroupNonUniformAll: *hasResult = true; *hasResultType = true; break; case Op::OpGroupNonUniformAny: *hasResult = true; *hasResultType = true; break; case Op::OpGroupNonUniformAllEqual: *hasResult = true; *hasResultType = true; break; case Op::OpGroupNonUniformBroadcast: *hasResult = true; *hasResultType = true; break; case Op::OpGroupNonUniformBroadcastFirst: *hasResult = true; *hasResultType = true; break; case Op::OpGroupNonUniformBallot: *hasResult = true; *hasResultType = true; break; case Op::OpGroupNonUniformInverseBallot: *hasResult = true; *hasResultType = true; break; case Op::OpGroupNonUniformBallotBitExtract: *hasResult = true; *hasResultType = true; break; case Op::OpGroupNonUniformBallotBitCount: *hasResult = true; *hasResultType = true; break; case Op::OpGroupNonUniformBallotFindLSB: *hasResult = true; *hasResultType = true; break; case Op::OpGroupNonUniformBallotFindMSB: *hasResult = true; *hasResultType = true; break; case Op::OpGroupNonUniformShuffle: *hasResult = true; *hasResultType = true; break; case Op::OpGroupNonUniformShuffleXor: *hasResult = true; *hasResultType = true; break; case Op::OpGroupNonUniformShuffleUp: *hasResult = true; *hasResultType = true; break; case Op::OpGroupNonUniformShuffleDown: *hasResult = true; *hasResultType = true; break; case Op::OpGroupNonUniformIAdd: *hasResult = true; *hasResultType = true; break; case Op::OpGroupNonUniformFAdd: *hasResult = true; *hasResultType = true; break; case Op::OpGroupNonUniformIMul: *hasResult = true; *hasResultType = true; break; case Op::OpGroupNonUniformFMul: *hasResult = true; *hasResultType = true; break; case Op::OpGroupNonUniformSMin: *hasResult = true; *hasResultType = true; break; case Op::OpGroupNonUniformUMin: *hasResult = true; *hasResultType = true; break; case Op::OpGroupNonUniformFMin: *hasResult = true; *hasResultType = true; break; case Op::OpGroupNonUniformSMax: *hasResult = true; *hasResultType = true; break; case Op::OpGroupNonUniformUMax: *hasResult = true; *hasResultType = true; break; case Op::OpGroupNonUniformFMax: *hasResult = true; *hasResultType = true; break; case Op::OpGroupNonUniformBitwiseAnd: *hasResult = true; *hasResultType = true; break; case Op::OpGroupNonUniformBitwiseOr: *hasResult = true; *hasResultType = true; break; case Op::OpGroupNonUniformBitwiseXor: *hasResult = true; *hasResultType = true; break; case Op::OpGroupNonUniformLogicalAnd: *hasResult = true; *hasResultType = true; break; case Op::OpGroupNonUniformLogicalOr: *hasResult = true; *hasResultType = true; break; case Op::OpGroupNonUniformLogicalXor: *hasResult = true; *hasResultType = true; break; case Op::OpGroupNonUniformQuadBroadcast: *hasResult = true; *hasResultType = true; break; case Op::OpGroupNonUniformQuadSwap: *hasResult = true; *hasResultType = true; break; case Op::OpCopyLogical: *hasResult = true; *hasResultType = true; break; case Op::OpPtrEqual: *hasResult = true; *hasResultType = true; break; case Op::OpPtrNotEqual: *hasResult = true; *hasResultType = true; break; case Op::OpPtrDiff: *hasResult = true; *hasResultType = true; break; case Op::OpColorAttachmentReadEXT: *hasResult = true; *hasResultType = true; break; case Op::OpDepthAttachmentReadEXT: *hasResult = true; *hasResultType = true; break; case Op::OpStencilAttachmentReadEXT: *hasResult = true; *hasResultType = true; break; case Op::OpTerminateInvocation: *hasResult = false; *hasResultType = false; break; case Op::OpTypeUntypedPointerKHR: *hasResult = true; *hasResultType = false; break; case Op::OpUntypedVariableKHR: *hasResult = true; *hasResultType = true; break; case Op::OpUntypedAccessChainKHR: *hasResult = true; *hasResultType = true; break; case Op::OpUntypedInBoundsAccessChainKHR: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupBallotKHR: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupFirstInvocationKHR: *hasResult = true; *hasResultType = true; break; case Op::OpUntypedPtrAccessChainKHR: *hasResult = true; *hasResultType = true; break; case Op::OpUntypedInBoundsPtrAccessChainKHR: *hasResult = true; *hasResultType = true; break; case Op::OpUntypedArrayLengthKHR: *hasResult = true; *hasResultType = true; break; case Op::OpUntypedPrefetchKHR: *hasResult = false; *hasResultType = false; break; case Op::OpSubgroupAllKHR: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAnyKHR: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAllEqualKHR: *hasResult = true; *hasResultType = true; break; case Op::OpGroupNonUniformRotateKHR: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupReadInvocationKHR: *hasResult = true; *hasResultType = true; break; case Op::OpExtInstWithForwardRefsKHR: *hasResult = true; *hasResultType = true; break; case Op::OpTraceRayKHR: *hasResult = false; *hasResultType = false; break; case Op::OpExecuteCallableKHR: *hasResult = false; *hasResultType = false; break; case Op::OpConvertUToAccelerationStructureKHR: *hasResult = true; *hasResultType = true; break; case Op::OpIgnoreIntersectionKHR: *hasResult = false; *hasResultType = false; break; case Op::OpTerminateRayKHR: *hasResult = false; *hasResultType = false; break; case Op::OpSDot: *hasResult = true; *hasResultType = true; break; case Op::OpUDot: *hasResult = true; *hasResultType = true; break; case Op::OpSUDot: *hasResult = true; *hasResultType = true; break; case Op::OpSDotAccSat: *hasResult = true; *hasResultType = true; break; case Op::OpUDotAccSat: *hasResult = true; *hasResultType = true; break; case Op::OpSUDotAccSat: *hasResult = true; *hasResultType = true; break; case Op::OpTypeCooperativeMatrixKHR: *hasResult = true; *hasResultType = false; break; case Op::OpCooperativeMatrixLoadKHR: *hasResult = true; *hasResultType = true; break; case Op::OpCooperativeMatrixStoreKHR: *hasResult = false; *hasResultType = false; break; case Op::OpCooperativeMatrixMulAddKHR: *hasResult = true; *hasResultType = true; break; case Op::OpCooperativeMatrixLengthKHR: *hasResult = true; *hasResultType = true; break; case Op::OpConstantCompositeReplicateEXT: *hasResult = true; *hasResultType = true; break; case Op::OpSpecConstantCompositeReplicateEXT: *hasResult = true; *hasResultType = true; break; case Op::OpCompositeConstructReplicateEXT: *hasResult = true; *hasResultType = true; break; case Op::OpTypeRayQueryKHR: *hasResult = true; *hasResultType = false; break; case Op::OpRayQueryInitializeKHR: *hasResult = false; *hasResultType = false; break; case Op::OpRayQueryTerminateKHR: *hasResult = false; *hasResultType = false; break; case Op::OpRayQueryGenerateIntersectionKHR: *hasResult = false; *hasResultType = false; break; case Op::OpRayQueryConfirmIntersectionKHR: *hasResult = false; *hasResultType = false; break; case Op::OpRayQueryProceedKHR: *hasResult = true; *hasResultType = true; break; case Op::OpRayQueryGetIntersectionTypeKHR: *hasResult = true; *hasResultType = true; break; case Op::OpImageSampleWeightedQCOM: *hasResult = true; *hasResultType = true; break; case Op::OpImageBoxFilterQCOM: *hasResult = true; *hasResultType = true; break; case Op::OpImageBlockMatchSSDQCOM: *hasResult = true; *hasResultType = true; break; case Op::OpImageBlockMatchSADQCOM: *hasResult = true; *hasResultType = true; break; case Op::OpImageBlockMatchWindowSSDQCOM: *hasResult = true; *hasResultType = true; break; case Op::OpImageBlockMatchWindowSADQCOM: *hasResult = true; *hasResultType = true; break; case Op::OpImageBlockMatchGatherSSDQCOM: *hasResult = true; *hasResultType = true; break; case Op::OpImageBlockMatchGatherSADQCOM: *hasResult = true; *hasResultType = true; break; case Op::OpGroupIAddNonUniformAMD: *hasResult = true; *hasResultType = true; break; case Op::OpGroupFAddNonUniformAMD: *hasResult = true; *hasResultType = true; break; case Op::OpGroupFMinNonUniformAMD: *hasResult = true; *hasResultType = true; break; case Op::OpGroupUMinNonUniformAMD: *hasResult = true; *hasResultType = true; break; case Op::OpGroupSMinNonUniformAMD: *hasResult = true; *hasResultType = true; break; case Op::OpGroupFMaxNonUniformAMD: *hasResult = true; *hasResultType = true; break; case Op::OpGroupUMaxNonUniformAMD: *hasResult = true; *hasResultType = true; break; case Op::OpGroupSMaxNonUniformAMD: *hasResult = true; *hasResultType = true; break; case Op::OpFragmentMaskFetchAMD: *hasResult = true; *hasResultType = true; break; case Op::OpFragmentFetchAMD: *hasResult = true; *hasResultType = true; break; case Op::OpReadClockKHR: *hasResult = true; *hasResultType = true; break; case Op::OpAllocateNodePayloadsAMDX: *hasResult = true; *hasResultType = true; break; case Op::OpEnqueueNodePayloadsAMDX: *hasResult = false; *hasResultType = false; break; case Op::OpTypeNodePayloadArrayAMDX: *hasResult = true; *hasResultType = false; break; case Op::OpFinishWritingNodePayloadAMDX: *hasResult = true; *hasResultType = true; break; case Op::OpNodePayloadArrayLengthAMDX: *hasResult = true; *hasResultType = true; break; case Op::OpIsNodePayloadValidAMDX: *hasResult = true; *hasResultType = true; break; case Op::OpConstantStringAMDX: *hasResult = true; *hasResultType = false; break; case Op::OpSpecConstantStringAMDX: *hasResult = true; *hasResultType = false; break; case Op::OpGroupNonUniformQuadAllKHR: *hasResult = true; *hasResultType = true; break; case Op::OpGroupNonUniformQuadAnyKHR: *hasResult = true; *hasResultType = true; break; case Op::OpHitObjectRecordHitMotionNV: *hasResult = false; *hasResultType = false; break; case Op::OpHitObjectRecordHitWithIndexMotionNV: *hasResult = false; *hasResultType = false; break; case Op::OpHitObjectRecordMissMotionNV: *hasResult = false; *hasResultType = false; break; case Op::OpHitObjectGetWorldToObjectNV: *hasResult = true; *hasResultType = true; break; case Op::OpHitObjectGetObjectToWorldNV: *hasResult = true; *hasResultType = true; break; case Op::OpHitObjectGetObjectRayDirectionNV: *hasResult = true; *hasResultType = true; break; case Op::OpHitObjectGetObjectRayOriginNV: *hasResult = true; *hasResultType = true; break; case Op::OpHitObjectTraceRayMotionNV: *hasResult = false; *hasResultType = false; break; case Op::OpHitObjectGetShaderRecordBufferHandleNV: *hasResult = true; *hasResultType = true; break; case Op::OpHitObjectGetShaderBindingTableRecordIndexNV: *hasResult = true; *hasResultType = true; break; case Op::OpHitObjectRecordEmptyNV: *hasResult = false; *hasResultType = false; break; case Op::OpHitObjectTraceRayNV: *hasResult = false; *hasResultType = false; break; case Op::OpHitObjectRecordHitNV: *hasResult = false; *hasResultType = false; break; case Op::OpHitObjectRecordHitWithIndexNV: *hasResult = false; *hasResultType = false; break; case Op::OpHitObjectRecordMissNV: *hasResult = false; *hasResultType = false; break; case Op::OpHitObjectExecuteShaderNV: *hasResult = false; *hasResultType = false; break; case Op::OpHitObjectGetCurrentTimeNV: *hasResult = true; *hasResultType = true; break; case Op::OpHitObjectGetAttributesNV: *hasResult = false; *hasResultType = false; break; case Op::OpHitObjectGetHitKindNV: *hasResult = true; *hasResultType = true; break; case Op::OpHitObjectGetPrimitiveIndexNV: *hasResult = true; *hasResultType = true; break; case Op::OpHitObjectGetGeometryIndexNV: *hasResult = true; *hasResultType = true; break; case Op::OpHitObjectGetInstanceIdNV: *hasResult = true; *hasResultType = true; break; case Op::OpHitObjectGetInstanceCustomIndexNV: *hasResult = true; *hasResultType = true; break; case Op::OpHitObjectGetWorldRayDirectionNV: *hasResult = true; *hasResultType = true; break; case Op::OpHitObjectGetWorldRayOriginNV: *hasResult = true; *hasResultType = true; break; case Op::OpHitObjectGetRayTMaxNV: *hasResult = true; *hasResultType = true; break; case Op::OpHitObjectGetRayTMinNV: *hasResult = true; *hasResultType = true; break; case Op::OpHitObjectIsEmptyNV: *hasResult = true; *hasResultType = true; break; case Op::OpHitObjectIsHitNV: *hasResult = true; *hasResultType = true; break; case Op::OpHitObjectIsMissNV: *hasResult = true; *hasResultType = true; break; case Op::OpReorderThreadWithHitObjectNV: *hasResult = false; *hasResultType = false; break; case Op::OpReorderThreadWithHintNV: *hasResult = false; *hasResultType = false; break; case Op::OpTypeHitObjectNV: *hasResult = true; *hasResultType = false; break; case Op::OpImageSampleFootprintNV: *hasResult = true; *hasResultType = true; break; case Op::OpTypeCooperativeVectorNV: *hasResult = true; *hasResultType = false; break; case Op::OpCooperativeVectorMatrixMulNV: *hasResult = true; *hasResultType = true; break; case Op::OpCooperativeVectorOuterProductAccumulateNV: *hasResult = false; *hasResultType = false; break; case Op::OpCooperativeVectorReduceSumAccumulateNV: *hasResult = false; *hasResultType = false; break; case Op::OpCooperativeVectorMatrixMulAddNV: *hasResult = true; *hasResultType = true; break; case Op::OpCooperativeMatrixConvertNV: *hasResult = true; *hasResultType = true; break; case Op::OpEmitMeshTasksEXT: *hasResult = false; *hasResultType = false; break; case Op::OpSetMeshOutputsEXT: *hasResult = false; *hasResultType = false; break; case Op::OpGroupNonUniformPartitionNV: *hasResult = true; *hasResultType = true; break; case Op::OpWritePackedPrimitiveIndices4x8NV: *hasResult = false; *hasResultType = false; break; case Op::OpFetchMicroTriangleVertexPositionNV: *hasResult = true; *hasResultType = true; break; case Op::OpFetchMicroTriangleVertexBarycentricNV: *hasResult = true; *hasResultType = true; break; case Op::OpCooperativeVectorLoadNV: *hasResult = true; *hasResultType = true; break; case Op::OpCooperativeVectorStoreNV: *hasResult = false; *hasResultType = false; break; case Op::OpReportIntersectionKHR: *hasResult = true; *hasResultType = true; break; case Op::OpIgnoreIntersectionNV: *hasResult = false; *hasResultType = false; break; case Op::OpTerminateRayNV: *hasResult = false; *hasResultType = false; break; case Op::OpTraceNV: *hasResult = false; *hasResultType = false; break; case Op::OpTraceMotionNV: *hasResult = false; *hasResultType = false; break; case Op::OpTraceRayMotionNV: *hasResult = false; *hasResultType = false; break; case Op::OpRayQueryGetIntersectionTriangleVertexPositionsKHR: *hasResult = true; *hasResultType = true; break; case Op::OpTypeAccelerationStructureKHR: *hasResult = true; *hasResultType = false; break; case Op::OpExecuteCallableNV: *hasResult = false; *hasResultType = false; break; case Op::OpRayQueryGetClusterIdNV: *hasResult = true; *hasResultType = true; break; case Op::OpHitObjectGetClusterIdNV: *hasResult = true; *hasResultType = true; break; case Op::OpTypeCooperativeMatrixNV: *hasResult = true; *hasResultType = false; break; case Op::OpCooperativeMatrixLoadNV: *hasResult = true; *hasResultType = true; break; case Op::OpCooperativeMatrixStoreNV: *hasResult = false; *hasResultType = false; break; case Op::OpCooperativeMatrixMulAddNV: *hasResult = true; *hasResultType = true; break; case Op::OpCooperativeMatrixLengthNV: *hasResult = true; *hasResultType = true; break; case Op::OpBeginInvocationInterlockEXT: *hasResult = false; *hasResultType = false; break; case Op::OpEndInvocationInterlockEXT: *hasResult = false; *hasResultType = false; break; case Op::OpCooperativeMatrixReduceNV: *hasResult = true; *hasResultType = true; break; case Op::OpCooperativeMatrixLoadTensorNV: *hasResult = true; *hasResultType = true; break; case Op::OpCooperativeMatrixStoreTensorNV: *hasResult = false; *hasResultType = false; break; case Op::OpCooperativeMatrixPerElementOpNV: *hasResult = true; *hasResultType = true; break; case Op::OpTypeTensorLayoutNV: *hasResult = true; *hasResultType = false; break; case Op::OpTypeTensorViewNV: *hasResult = true; *hasResultType = false; break; case Op::OpCreateTensorLayoutNV: *hasResult = true; *hasResultType = true; break; case Op::OpTensorLayoutSetDimensionNV: *hasResult = true; *hasResultType = true; break; case Op::OpTensorLayoutSetStrideNV: *hasResult = true; *hasResultType = true; break; case Op::OpTensorLayoutSliceNV: *hasResult = true; *hasResultType = true; break; case Op::OpTensorLayoutSetClampValueNV: *hasResult = true; *hasResultType = true; break; case Op::OpCreateTensorViewNV: *hasResult = true; *hasResultType = true; break; case Op::OpTensorViewSetDimensionNV: *hasResult = true; *hasResultType = true; break; case Op::OpTensorViewSetStrideNV: *hasResult = true; *hasResultType = true; break; case Op::OpDemoteToHelperInvocation: *hasResult = false; *hasResultType = false; break; case Op::OpIsHelperInvocationEXT: *hasResult = true; *hasResultType = true; break; case Op::OpTensorViewSetClipNV: *hasResult = true; *hasResultType = true; break; case Op::OpTensorLayoutSetBlockSizeNV: *hasResult = true; *hasResultType = true; break; case Op::OpCooperativeMatrixTransposeNV: *hasResult = true; *hasResultType = true; break; case Op::OpConvertUToImageNV: *hasResult = true; *hasResultType = true; break; case Op::OpConvertUToSamplerNV: *hasResult = true; *hasResultType = true; break; case Op::OpConvertImageToUNV: *hasResult = true; *hasResultType = true; break; case Op::OpConvertSamplerToUNV: *hasResult = true; *hasResultType = true; break; case Op::OpConvertUToSampledImageNV: *hasResult = true; *hasResultType = true; break; case Op::OpConvertSampledImageToUNV: *hasResult = true; *hasResultType = true; break; case Op::OpSamplerImageAddressingModeNV: *hasResult = false; *hasResultType = false; break; case Op::OpRawAccessChainNV: *hasResult = true; *hasResultType = true; break; case Op::OpRayQueryGetIntersectionSpherePositionNV: *hasResult = true; *hasResultType = true; break; case Op::OpRayQueryGetIntersectionSphereRadiusNV: *hasResult = true; *hasResultType = true; break; case Op::OpRayQueryGetIntersectionLSSPositionsNV: *hasResult = true; *hasResultType = true; break; case Op::OpRayQueryGetIntersectionLSSRadiiNV: *hasResult = true; *hasResultType = true; break; case Op::OpRayQueryGetIntersectionLSSHitValueNV: *hasResult = true; *hasResultType = true; break; case Op::OpHitObjectGetSpherePositionNV: *hasResult = true; *hasResultType = true; break; case Op::OpHitObjectGetSphereRadiusNV: *hasResult = true; *hasResultType = true; break; case Op::OpHitObjectGetLSSPositionsNV: *hasResult = true; *hasResultType = true; break; case Op::OpHitObjectGetLSSRadiiNV: *hasResult = true; *hasResultType = true; break; case Op::OpHitObjectIsSphereHitNV: *hasResult = true; *hasResultType = true; break; case Op::OpHitObjectIsLSSHitNV: *hasResult = true; *hasResultType = true; break; case Op::OpRayQueryIsSphereHitNV: *hasResult = true; *hasResultType = true; break; case Op::OpRayQueryIsLSSHitNV: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupShuffleINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupShuffleDownINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupShuffleUpINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupShuffleXorINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupBlockReadINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupBlockWriteINTEL: *hasResult = false; *hasResultType = false; break; case Op::OpSubgroupImageBlockReadINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupImageBlockWriteINTEL: *hasResult = false; *hasResultType = false; break; case Op::OpSubgroupImageMediaBlockReadINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupImageMediaBlockWriteINTEL: *hasResult = false; *hasResultType = false; break; case Op::OpUCountLeadingZerosINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpUCountTrailingZerosINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpAbsISubINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpAbsUSubINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpIAddSatINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpUAddSatINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpIAverageINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpUAverageINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpIAverageRoundedINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpUAverageRoundedINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpISubSatINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpUSubSatINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpIMul32x16INTEL: *hasResult = true; *hasResultType = true; break; case Op::OpUMul32x16INTEL: *hasResult = true; *hasResultType = true; break; case Op::OpConstantFunctionPointerINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpFunctionPointerCallINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpAsmTargetINTEL: *hasResult = true; *hasResultType = false; break; case Op::OpAsmINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpAsmCallINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpAtomicFMinEXT: *hasResult = true; *hasResultType = true; break; case Op::OpAtomicFMaxEXT: *hasResult = true; *hasResultType = true; break; case Op::OpAssumeTrueKHR: *hasResult = false; *hasResultType = false; break; case Op::OpExpectKHR: *hasResult = true; *hasResultType = true; break; case Op::OpDecorateString: *hasResult = false; *hasResultType = false; break; case Op::OpMemberDecorateString: *hasResult = false; *hasResultType = false; break; case Op::OpVmeImageINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpTypeVmeImageINTEL: *hasResult = true; *hasResultType = false; break; case Op::OpTypeAvcImePayloadINTEL: *hasResult = true; *hasResultType = false; break; case Op::OpTypeAvcRefPayloadINTEL: *hasResult = true; *hasResultType = false; break; case Op::OpTypeAvcSicPayloadINTEL: *hasResult = true; *hasResultType = false; break; case Op::OpTypeAvcMcePayloadINTEL: *hasResult = true; *hasResultType = false; break; case Op::OpTypeAvcMceResultINTEL: *hasResult = true; *hasResultType = false; break; case Op::OpTypeAvcImeResultINTEL: *hasResult = true; *hasResultType = false; break; case Op::OpTypeAvcImeResultSingleReferenceStreamoutINTEL: *hasResult = true; *hasResultType = false; break; case Op::OpTypeAvcImeResultDualReferenceStreamoutINTEL: *hasResult = true; *hasResultType = false; break; case Op::OpTypeAvcImeSingleReferenceStreaminINTEL: *hasResult = true; *hasResultType = false; break; case Op::OpTypeAvcImeDualReferenceStreaminINTEL: *hasResult = true; *hasResultType = false; break; case Op::OpTypeAvcRefResultINTEL: *hasResult = true; *hasResultType = false; break; case Op::OpTypeAvcSicResultINTEL: *hasResult = true; *hasResultType = false; break; case Op::OpSubgroupAvcMceGetDefaultInterBaseMultiReferencePenaltyINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcMceSetInterBaseMultiReferencePenaltyINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcMceGetDefaultInterShapePenaltyINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcMceSetInterShapePenaltyINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcMceGetDefaultInterDirectionPenaltyINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcMceSetInterDirectionPenaltyINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcMceGetDefaultIntraLumaShapePenaltyINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcMceGetDefaultInterMotionVectorCostTableINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcMceGetDefaultHighPenaltyCostTableINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcMceGetDefaultMediumPenaltyCostTableINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcMceGetDefaultLowPenaltyCostTableINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcMceSetMotionVectorCostFunctionINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcMceGetDefaultIntraLumaModePenaltyINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcMceGetDefaultNonDcLumaIntraPenaltyINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcMceGetDefaultIntraChromaModeBasePenaltyINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcMceSetAcOnlyHaarINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcMceSetSourceInterlacedFieldPolarityINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcMceSetSingleReferenceInterlacedFieldPolarityINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcMceSetDualReferenceInterlacedFieldPolaritiesINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcMceConvertToImePayloadINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcMceConvertToImeResultINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcMceConvertToRefPayloadINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcMceConvertToRefResultINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcMceConvertToSicPayloadINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcMceConvertToSicResultINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcMceGetMotionVectorsINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcMceGetInterDistortionsINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcMceGetBestInterDistortionsINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcMceGetInterMajorShapeINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcMceGetInterMinorShapeINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcMceGetInterDirectionsINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcMceGetInterMotionVectorCountINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcMceGetInterReferenceIdsINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcMceGetInterReferenceInterlacedFieldPolaritiesINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcImeInitializeINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcImeSetSingleReferenceINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcImeSetDualReferenceINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcImeRefWindowSizeINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcImeAdjustRefOffsetINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcImeConvertToMcePayloadINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcImeSetMaxMotionVectorCountINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcImeSetUnidirectionalMixDisableINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcImeSetEarlySearchTerminationThresholdINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcImeSetWeightedSadINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcImeEvaluateWithSingleReferenceINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcImeEvaluateWithDualReferenceINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcImeEvaluateWithSingleReferenceStreaminINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcImeEvaluateWithDualReferenceStreaminINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcImeEvaluateWithSingleReferenceStreamoutINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcImeEvaluateWithDualReferenceStreamoutINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcImeEvaluateWithSingleReferenceStreaminoutINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcImeEvaluateWithDualReferenceStreaminoutINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcImeConvertToMceResultINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcImeGetSingleReferenceStreaminINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcImeGetDualReferenceStreaminINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcImeStripSingleReferenceStreamoutINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcImeStripDualReferenceStreamoutINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeMotionVectorsINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeDistortionsINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeReferenceIdsINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeMotionVectorsINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeDistortionsINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeReferenceIdsINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcImeGetBorderReachedINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcImeGetTruncatedSearchIndicationINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcImeGetUnidirectionalEarlySearchTerminationINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcImeGetWeightingPatternMinimumMotionVectorINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcImeGetWeightingPatternMinimumDistortionINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcFmeInitializeINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcBmeInitializeINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcRefConvertToMcePayloadINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcRefSetBidirectionalMixDisableINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcRefSetBilinearFilterEnableINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcRefEvaluateWithSingleReferenceINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcRefEvaluateWithDualReferenceINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcRefEvaluateWithMultiReferenceINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcRefEvaluateWithMultiReferenceInterlacedINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcRefConvertToMceResultINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcSicInitializeINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcSicConfigureSkcINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcSicConfigureIpeLumaINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcSicConfigureIpeLumaChromaINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcSicGetMotionVectorMaskINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcSicConvertToMcePayloadINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcSicSetIntraLumaShapePenaltyINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcSicSetIntraLumaModeCostFunctionINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcSicSetIntraChromaModeCostFunctionINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcSicSetBilinearFilterEnableINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcSicSetSkcForwardTransformEnableINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcSicSetBlockBasedRawSkipSadINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcSicEvaluateIpeINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcSicEvaluateWithSingleReferenceINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcSicEvaluateWithDualReferenceINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcSicEvaluateWithMultiReferenceINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcSicEvaluateWithMultiReferenceInterlacedINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcSicConvertToMceResultINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcSicGetIpeLumaShapeINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcSicGetBestIpeLumaDistortionINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcSicGetBestIpeChromaDistortionINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcSicGetPackedIpeLumaModesINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcSicGetIpeChromaModeINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcSicGetPackedSkcLumaCountThresholdINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcSicGetPackedSkcLumaSumThresholdINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAvcSicGetInterRawSadsINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpVariableLengthArrayINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSaveMemoryINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpRestoreMemoryINTEL: *hasResult = false; *hasResultType = false; break; case Op::OpArbitraryFloatSinCosPiINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpArbitraryFloatCastINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpArbitraryFloatCastFromIntINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpArbitraryFloatCastToIntINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpArbitraryFloatAddINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpArbitraryFloatSubINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpArbitraryFloatMulINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpArbitraryFloatDivINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpArbitraryFloatGTINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpArbitraryFloatGEINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpArbitraryFloatLTINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpArbitraryFloatLEINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpArbitraryFloatEQINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpArbitraryFloatRecipINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpArbitraryFloatRSqrtINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpArbitraryFloatCbrtINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpArbitraryFloatHypotINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpArbitraryFloatSqrtINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpArbitraryFloatLogINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpArbitraryFloatLog2INTEL: *hasResult = true; *hasResultType = true; break; case Op::OpArbitraryFloatLog10INTEL: *hasResult = true; *hasResultType = true; break; case Op::OpArbitraryFloatLog1pINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpArbitraryFloatExpINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpArbitraryFloatExp2INTEL: *hasResult = true; *hasResultType = true; break; case Op::OpArbitraryFloatExp10INTEL: *hasResult = true; *hasResultType = true; break; case Op::OpArbitraryFloatExpm1INTEL: *hasResult = true; *hasResultType = true; break; case Op::OpArbitraryFloatSinINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpArbitraryFloatCosINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpArbitraryFloatSinCosINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpArbitraryFloatSinPiINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpArbitraryFloatCosPiINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpArbitraryFloatASinINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpArbitraryFloatASinPiINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpArbitraryFloatACosINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpArbitraryFloatACosPiINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpArbitraryFloatATanINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpArbitraryFloatATanPiINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpArbitraryFloatATan2INTEL: *hasResult = true; *hasResultType = true; break; case Op::OpArbitraryFloatPowINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpArbitraryFloatPowRINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpArbitraryFloatPowNINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpLoopControlINTEL: *hasResult = false; *hasResultType = false; break; case Op::OpAliasDomainDeclINTEL: *hasResult = true; *hasResultType = false; break; case Op::OpAliasScopeDeclINTEL: *hasResult = true; *hasResultType = false; break; case Op::OpAliasScopeListDeclINTEL: *hasResult = true; *hasResultType = false; break; case Op::OpFixedSqrtINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpFixedRecipINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpFixedRsqrtINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpFixedSinINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpFixedCosINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpFixedSinCosINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpFixedSinPiINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpFixedCosPiINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpFixedSinCosPiINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpFixedLogINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpFixedExpINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpPtrCastToCrossWorkgroupINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpCrossWorkgroupCastToPtrINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpReadPipeBlockingINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpWritePipeBlockingINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpFPGARegINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpRayQueryGetRayTMinKHR: *hasResult = true; *hasResultType = true; break; case Op::OpRayQueryGetRayFlagsKHR: *hasResult = true; *hasResultType = true; break; case Op::OpRayQueryGetIntersectionTKHR: *hasResult = true; *hasResultType = true; break; case Op::OpRayQueryGetIntersectionInstanceCustomIndexKHR: *hasResult = true; *hasResultType = true; break; case Op::OpRayQueryGetIntersectionInstanceIdKHR: *hasResult = true; *hasResultType = true; break; case Op::OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR: *hasResult = true; *hasResultType = true; break; case Op::OpRayQueryGetIntersectionGeometryIndexKHR: *hasResult = true; *hasResultType = true; break; case Op::OpRayQueryGetIntersectionPrimitiveIndexKHR: *hasResult = true; *hasResultType = true; break; case Op::OpRayQueryGetIntersectionBarycentricsKHR: *hasResult = true; *hasResultType = true; break; case Op::OpRayQueryGetIntersectionFrontFaceKHR: *hasResult = true; *hasResultType = true; break; case Op::OpRayQueryGetIntersectionCandidateAABBOpaqueKHR: *hasResult = true; *hasResultType = true; break; case Op::OpRayQueryGetIntersectionObjectRayDirectionKHR: *hasResult = true; *hasResultType = true; break; case Op::OpRayQueryGetIntersectionObjectRayOriginKHR: *hasResult = true; *hasResultType = true; break; case Op::OpRayQueryGetWorldRayDirectionKHR: *hasResult = true; *hasResultType = true; break; case Op::OpRayQueryGetWorldRayOriginKHR: *hasResult = true; *hasResultType = true; break; case Op::OpRayQueryGetIntersectionObjectToWorldKHR: *hasResult = true; *hasResultType = true; break; case Op::OpRayQueryGetIntersectionWorldToObjectKHR: *hasResult = true; *hasResultType = true; break; case Op::OpAtomicFAddEXT: *hasResult = true; *hasResultType = true; break; case Op::OpTypeBufferSurfaceINTEL: *hasResult = true; *hasResultType = false; break; case Op::OpTypeStructContinuedINTEL: *hasResult = false; *hasResultType = false; break; case Op::OpConstantCompositeContinuedINTEL: *hasResult = false; *hasResultType = false; break; case Op::OpSpecConstantCompositeContinuedINTEL: *hasResult = false; *hasResultType = false; break; case Op::OpCompositeConstructContinuedINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpConvertFToBF16INTEL: *hasResult = true; *hasResultType = true; break; case Op::OpConvertBF16ToFINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpControlBarrierArriveINTEL: *hasResult = false; *hasResultType = false; break; case Op::OpControlBarrierWaitINTEL: *hasResult = false; *hasResultType = false; break; case Op::OpArithmeticFenceEXT: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupBlockPrefetchINTEL: *hasResult = false; *hasResultType = false; break; case Op::OpSubgroup2DBlockLoadINTEL: *hasResult = false; *hasResultType = false; break; case Op::OpSubgroup2DBlockLoadTransformINTEL: *hasResult = false; *hasResultType = false; break; case Op::OpSubgroup2DBlockLoadTransposeINTEL: *hasResult = false; *hasResultType = false; break; case Op::OpSubgroup2DBlockPrefetchINTEL: *hasResult = false; *hasResultType = false; break; case Op::OpSubgroup2DBlockStoreINTEL: *hasResult = false; *hasResultType = false; break; case Op::OpSubgroupMatrixMultiplyAccumulateINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpGroupIMulKHR: *hasResult = true; *hasResultType = true; break; case Op::OpGroupFMulKHR: *hasResult = true; *hasResultType = true; break; case Op::OpGroupBitwiseAndKHR: *hasResult = true; *hasResultType = true; break; case Op::OpGroupBitwiseOrKHR: *hasResult = true; *hasResultType = true; break; case Op::OpGroupBitwiseXorKHR: *hasResult = true; *hasResultType = true; break; case Op::OpGroupLogicalAndKHR: *hasResult = true; *hasResultType = true; break; case Op::OpGroupLogicalOrKHR: *hasResult = true; *hasResultType = true; break; case Op::OpGroupLogicalXorKHR: *hasResult = true; *hasResultType = true; break; case Op::OpMaskedGatherINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpMaskedScatterINTEL: *hasResult = false; *hasResultType = false; break; } } inline const char* SourceLanguageToString(SourceLanguage value) { switch (value) { case SourceLanguage::Unknown: return "Unknown"; case SourceLanguage::ESSL: return "ESSL"; case SourceLanguage::GLSL: return "GLSL"; case SourceLanguage::OpenCL_C: return "OpenCL_C"; case SourceLanguage::OpenCL_CPP: return "OpenCL_CPP"; case SourceLanguage::HLSL: return "HLSL"; case SourceLanguage::CPP_for_OpenCL: return "CPP_for_OpenCL"; case SourceLanguage::SYCL: return "SYCL"; case SourceLanguage::HERO_C: return "HERO_C"; case SourceLanguage::NZSL: return "NZSL"; case SourceLanguage::WGSL: return "WGSL"; case SourceLanguage::Slang: return "Slang"; case SourceLanguage::Zig: return "Zig"; case SourceLanguage::Rust: return "Rust"; default: return "Unknown"; } } inline const char* ExecutionModelToString(ExecutionModel value) { switch (value) { case ExecutionModel::Vertex: return "Vertex"; case ExecutionModel::TessellationControl: return "TessellationControl"; case ExecutionModel::TessellationEvaluation: return "TessellationEvaluation"; case ExecutionModel::Geometry: return "Geometry"; case ExecutionModel::Fragment: return "Fragment"; case ExecutionModel::GLCompute: return "GLCompute"; case ExecutionModel::Kernel: return "Kernel"; case ExecutionModel::TaskNV: return "TaskNV"; case ExecutionModel::MeshNV: return "MeshNV"; case ExecutionModel::RayGenerationKHR: return "RayGenerationKHR"; case ExecutionModel::IntersectionKHR: return "IntersectionKHR"; case ExecutionModel::AnyHitKHR: return "AnyHitKHR"; case ExecutionModel::ClosestHitKHR: return "ClosestHitKHR"; case ExecutionModel::MissKHR: return "MissKHR"; case ExecutionModel::CallableKHR: return "CallableKHR"; case ExecutionModel::TaskEXT: return "TaskEXT"; case ExecutionModel::MeshEXT: return "MeshEXT"; default: return "Unknown"; } } inline const char* AddressingModelToString(AddressingModel value) { switch (value) { case AddressingModel::Logical: return "Logical"; case AddressingModel::Physical32: return "Physical32"; case AddressingModel::Physical64: return "Physical64"; case AddressingModel::PhysicalStorageBuffer64: return "PhysicalStorageBuffer64"; default: return "Unknown"; } } inline const char* MemoryModelToString(MemoryModel value) { switch (value) { case MemoryModel::Simple: return "Simple"; case MemoryModel::GLSL450: return "GLSL450"; case MemoryModel::OpenCL: return "OpenCL"; case MemoryModel::Vulkan: return "Vulkan"; default: return "Unknown"; } } inline const char* ExecutionModeToString(ExecutionMode value) { switch (value) { case ExecutionMode::Invocations: return "Invocations"; case ExecutionMode::SpacingEqual: return "SpacingEqual"; case ExecutionMode::SpacingFractionalEven: return "SpacingFractionalEven"; case ExecutionMode::SpacingFractionalOdd: return "SpacingFractionalOdd"; case ExecutionMode::VertexOrderCw: return "VertexOrderCw"; case ExecutionMode::VertexOrderCcw: return "VertexOrderCcw"; case ExecutionMode::PixelCenterInteger: return "PixelCenterInteger"; case ExecutionMode::OriginUpperLeft: return "OriginUpperLeft"; case ExecutionMode::OriginLowerLeft: return "OriginLowerLeft"; case ExecutionMode::EarlyFragmentTests: return "EarlyFragmentTests"; case ExecutionMode::PointMode: return "PointMode"; case ExecutionMode::Xfb: return "Xfb"; case ExecutionMode::DepthReplacing: return "DepthReplacing"; case ExecutionMode::DepthGreater: return "DepthGreater"; case ExecutionMode::DepthLess: return "DepthLess"; case ExecutionMode::DepthUnchanged: return "DepthUnchanged"; case ExecutionMode::LocalSize: return "LocalSize"; case ExecutionMode::LocalSizeHint: return "LocalSizeHint"; case ExecutionMode::InputPoints: return "InputPoints"; case ExecutionMode::InputLines: return "InputLines"; case ExecutionMode::InputLinesAdjacency: return "InputLinesAdjacency"; case ExecutionMode::Triangles: return "Triangles"; case ExecutionMode::InputTrianglesAdjacency: return "InputTrianglesAdjacency"; case ExecutionMode::Quads: return "Quads"; case ExecutionMode::Isolines: return "Isolines"; case ExecutionMode::OutputVertices: return "OutputVertices"; case ExecutionMode::OutputPoints: return "OutputPoints"; case ExecutionMode::OutputLineStrip: return "OutputLineStrip"; case ExecutionMode::OutputTriangleStrip: return "OutputTriangleStrip"; case ExecutionMode::VecTypeHint: return "VecTypeHint"; case ExecutionMode::ContractionOff: return "ContractionOff"; case ExecutionMode::Initializer: return "Initializer"; case ExecutionMode::Finalizer: return "Finalizer"; case ExecutionMode::SubgroupSize: return "SubgroupSize"; case ExecutionMode::SubgroupsPerWorkgroup: return "SubgroupsPerWorkgroup"; case ExecutionMode::SubgroupsPerWorkgroupId: return "SubgroupsPerWorkgroupId"; case ExecutionMode::LocalSizeId: return "LocalSizeId"; case ExecutionMode::LocalSizeHintId: return "LocalSizeHintId"; case ExecutionMode::NonCoherentColorAttachmentReadEXT: return "NonCoherentColorAttachmentReadEXT"; case ExecutionMode::NonCoherentDepthAttachmentReadEXT: return "NonCoherentDepthAttachmentReadEXT"; case ExecutionMode::NonCoherentStencilAttachmentReadEXT: return "NonCoherentStencilAttachmentReadEXT"; case ExecutionMode::SubgroupUniformControlFlowKHR: return "SubgroupUniformControlFlowKHR"; case ExecutionMode::PostDepthCoverage: return "PostDepthCoverage"; case ExecutionMode::DenormPreserve: return "DenormPreserve"; case ExecutionMode::DenormFlushToZero: return "DenormFlushToZero"; case ExecutionMode::SignedZeroInfNanPreserve: return "SignedZeroInfNanPreserve"; case ExecutionMode::RoundingModeRTE: return "RoundingModeRTE"; case ExecutionMode::RoundingModeRTZ: return "RoundingModeRTZ"; case ExecutionMode::NonCoherentTileAttachmentReadQCOM: return "NonCoherentTileAttachmentReadQCOM"; case ExecutionMode::TileShadingRateQCOM: return "TileShadingRateQCOM"; case ExecutionMode::EarlyAndLateFragmentTestsAMD: return "EarlyAndLateFragmentTestsAMD"; case ExecutionMode::StencilRefReplacingEXT: return "StencilRefReplacingEXT"; case ExecutionMode::CoalescingAMDX: return "CoalescingAMDX"; case ExecutionMode::IsApiEntryAMDX: return "IsApiEntryAMDX"; case ExecutionMode::MaxNodeRecursionAMDX: return "MaxNodeRecursionAMDX"; case ExecutionMode::StaticNumWorkgroupsAMDX: return "StaticNumWorkgroupsAMDX"; case ExecutionMode::ShaderIndexAMDX: return "ShaderIndexAMDX"; case ExecutionMode::MaxNumWorkgroupsAMDX: return "MaxNumWorkgroupsAMDX"; case ExecutionMode::StencilRefUnchangedFrontAMD: return "StencilRefUnchangedFrontAMD"; case ExecutionMode::StencilRefGreaterFrontAMD: return "StencilRefGreaterFrontAMD"; case ExecutionMode::StencilRefLessFrontAMD: return "StencilRefLessFrontAMD"; case ExecutionMode::StencilRefUnchangedBackAMD: return "StencilRefUnchangedBackAMD"; case ExecutionMode::StencilRefGreaterBackAMD: return "StencilRefGreaterBackAMD"; case ExecutionMode::StencilRefLessBackAMD: return "StencilRefLessBackAMD"; case ExecutionMode::QuadDerivativesKHR: return "QuadDerivativesKHR"; case ExecutionMode::RequireFullQuadsKHR: return "RequireFullQuadsKHR"; case ExecutionMode::SharesInputWithAMDX: return "SharesInputWithAMDX"; case ExecutionMode::OutputLinesEXT: return "OutputLinesEXT"; case ExecutionMode::OutputPrimitivesEXT: return "OutputPrimitivesEXT"; case ExecutionMode::DerivativeGroupQuadsKHR: return "DerivativeGroupQuadsKHR"; case ExecutionMode::DerivativeGroupLinearKHR: return "DerivativeGroupLinearKHR"; case ExecutionMode::OutputTrianglesEXT: return "OutputTrianglesEXT"; case ExecutionMode::PixelInterlockOrderedEXT: return "PixelInterlockOrderedEXT"; case ExecutionMode::PixelInterlockUnorderedEXT: return "PixelInterlockUnorderedEXT"; case ExecutionMode::SampleInterlockOrderedEXT: return "SampleInterlockOrderedEXT"; case ExecutionMode::SampleInterlockUnorderedEXT: return "SampleInterlockUnorderedEXT"; case ExecutionMode::ShadingRateInterlockOrderedEXT: return "ShadingRateInterlockOrderedEXT"; case ExecutionMode::ShadingRateInterlockUnorderedEXT: return "ShadingRateInterlockUnorderedEXT"; case ExecutionMode::SharedLocalMemorySizeINTEL: return "SharedLocalMemorySizeINTEL"; case ExecutionMode::RoundingModeRTPINTEL: return "RoundingModeRTPINTEL"; case ExecutionMode::RoundingModeRTNINTEL: return "RoundingModeRTNINTEL"; case ExecutionMode::FloatingPointModeALTINTEL: return "FloatingPointModeALTINTEL"; case ExecutionMode::FloatingPointModeIEEEINTEL: return "FloatingPointModeIEEEINTEL"; case ExecutionMode::MaxWorkgroupSizeINTEL: return "MaxWorkgroupSizeINTEL"; case ExecutionMode::MaxWorkDimINTEL: return "MaxWorkDimINTEL"; case ExecutionMode::NoGlobalOffsetINTEL: return "NoGlobalOffsetINTEL"; case ExecutionMode::NumSIMDWorkitemsINTEL: return "NumSIMDWorkitemsINTEL"; case ExecutionMode::SchedulerTargetFmaxMhzINTEL: return "SchedulerTargetFmaxMhzINTEL"; case ExecutionMode::MaximallyReconvergesKHR: return "MaximallyReconvergesKHR"; case ExecutionMode::FPFastMathDefault: return "FPFastMathDefault"; case ExecutionMode::StreamingInterfaceINTEL: return "StreamingInterfaceINTEL"; case ExecutionMode::RegisterMapInterfaceINTEL: return "RegisterMapInterfaceINTEL"; case ExecutionMode::NamedBarrierCountINTEL: return "NamedBarrierCountINTEL"; case ExecutionMode::MaximumRegistersINTEL: return "MaximumRegistersINTEL"; case ExecutionMode::MaximumRegistersIdINTEL: return "MaximumRegistersIdINTEL"; case ExecutionMode::NamedMaximumRegistersINTEL: return "NamedMaximumRegistersINTEL"; default: return "Unknown"; } } inline const char* StorageClassToString(StorageClass value) { switch (value) { case StorageClass::UniformConstant: return "UniformConstant"; case StorageClass::Input: return "Input"; case StorageClass::Uniform: return "Uniform"; case StorageClass::Output: return "Output"; case StorageClass::Workgroup: return "Workgroup"; case StorageClass::CrossWorkgroup: return "CrossWorkgroup"; case StorageClass::Private: return "Private"; case StorageClass::Function: return "Function"; case StorageClass::Generic: return "Generic"; case StorageClass::PushConstant: return "PushConstant"; case StorageClass::AtomicCounter: return "AtomicCounter"; case StorageClass::Image: return "Image"; case StorageClass::StorageBuffer: return "StorageBuffer"; case StorageClass::TileImageEXT: return "TileImageEXT"; case StorageClass::TileAttachmentQCOM: return "TileAttachmentQCOM"; case StorageClass::NodePayloadAMDX: return "NodePayloadAMDX"; case StorageClass::CallableDataKHR: return "CallableDataKHR"; case StorageClass::IncomingCallableDataKHR: return "IncomingCallableDataKHR"; case StorageClass::RayPayloadKHR: return "RayPayloadKHR"; case StorageClass::HitAttributeKHR: return "HitAttributeKHR"; case StorageClass::IncomingRayPayloadKHR: return "IncomingRayPayloadKHR"; case StorageClass::ShaderRecordBufferKHR: return "ShaderRecordBufferKHR"; case StorageClass::PhysicalStorageBuffer: return "PhysicalStorageBuffer"; case StorageClass::HitObjectAttributeNV: return "HitObjectAttributeNV"; case StorageClass::TaskPayloadWorkgroupEXT: return "TaskPayloadWorkgroupEXT"; case StorageClass::CodeSectionINTEL: return "CodeSectionINTEL"; case StorageClass::DeviceOnlyINTEL: return "DeviceOnlyINTEL"; case StorageClass::HostOnlyINTEL: return "HostOnlyINTEL"; default: return "Unknown"; } } inline const char* DimToString(Dim value) { switch (value) { case Dim::Dim1D: return "1D"; case Dim::Dim2D: return "2D"; case Dim::Dim3D: return "3D"; case Dim::Cube: return "Cube"; case Dim::Rect: return "Rect"; case Dim::Buffer: return "Buffer"; case Dim::SubpassData: return "SubpassData"; case Dim::TileImageDataEXT: return "TileImageDataEXT"; default: return "Unknown"; } } inline const char* SamplerAddressingModeToString(SamplerAddressingMode value) { switch (value) { case SamplerAddressingMode::None: return "None"; case SamplerAddressingMode::ClampToEdge: return "ClampToEdge"; case SamplerAddressingMode::Clamp: return "Clamp"; case SamplerAddressingMode::Repeat: return "Repeat"; case SamplerAddressingMode::RepeatMirrored: return "RepeatMirrored"; default: return "Unknown"; } } inline const char* SamplerFilterModeToString(SamplerFilterMode value) { switch (value) { case SamplerFilterMode::Nearest: return "Nearest"; case SamplerFilterMode::Linear: return "Linear"; default: return "Unknown"; } } inline const char* ImageFormatToString(ImageFormat value) { switch (value) { case ImageFormat::Unknown: return "Unknown"; case ImageFormat::Rgba32f: return "Rgba32f"; case ImageFormat::Rgba16f: return "Rgba16f"; case ImageFormat::R32f: return "R32f"; case ImageFormat::Rgba8: return "Rgba8"; case ImageFormat::Rgba8Snorm: return "Rgba8Snorm"; case ImageFormat::Rg32f: return "Rg32f"; case ImageFormat::Rg16f: return "Rg16f"; case ImageFormat::R11fG11fB10f: return "R11fG11fB10f"; case ImageFormat::R16f: return "R16f"; case ImageFormat::Rgba16: return "Rgba16"; case ImageFormat::Rgb10A2: return "Rgb10A2"; case ImageFormat::Rg16: return "Rg16"; case ImageFormat::Rg8: return "Rg8"; case ImageFormat::R16: return "R16"; case ImageFormat::R8: return "R8"; case ImageFormat::Rgba16Snorm: return "Rgba16Snorm"; case ImageFormat::Rg16Snorm: return "Rg16Snorm"; case ImageFormat::Rg8Snorm: return "Rg8Snorm"; case ImageFormat::R16Snorm: return "R16Snorm"; case ImageFormat::R8Snorm: return "R8Snorm"; case ImageFormat::Rgba32i: return "Rgba32i"; case ImageFormat::Rgba16i: return "Rgba16i"; case ImageFormat::Rgba8i: return "Rgba8i"; case ImageFormat::R32i: return "R32i"; case ImageFormat::Rg32i: return "Rg32i"; case ImageFormat::Rg16i: return "Rg16i"; case ImageFormat::Rg8i: return "Rg8i"; case ImageFormat::R16i: return "R16i"; case ImageFormat::R8i: return "R8i"; case ImageFormat::Rgba32ui: return "Rgba32ui"; case ImageFormat::Rgba16ui: return "Rgba16ui"; case ImageFormat::Rgba8ui: return "Rgba8ui"; case ImageFormat::R32ui: return "R32ui"; case ImageFormat::Rgb10a2ui: return "Rgb10a2ui"; case ImageFormat::Rg32ui: return "Rg32ui"; case ImageFormat::Rg16ui: return "Rg16ui"; case ImageFormat::Rg8ui: return "Rg8ui"; case ImageFormat::R16ui: return "R16ui"; case ImageFormat::R8ui: return "R8ui"; case ImageFormat::R64ui: return "R64ui"; case ImageFormat::R64i: return "R64i"; default: return "Unknown"; } } inline const char* ImageChannelOrderToString(ImageChannelOrder value) { switch (value) { case ImageChannelOrder::R: return "R"; case ImageChannelOrder::A: return "A"; case ImageChannelOrder::RG: return "RG"; case ImageChannelOrder::RA: return "RA"; case ImageChannelOrder::RGB: return "RGB"; case ImageChannelOrder::RGBA: return "RGBA"; case ImageChannelOrder::BGRA: return "BGRA"; case ImageChannelOrder::ARGB: return "ARGB"; case ImageChannelOrder::Intensity: return "Intensity"; case ImageChannelOrder::Luminance: return "Luminance"; case ImageChannelOrder::Rx: return "Rx"; case ImageChannelOrder::RGx: return "RGx"; case ImageChannelOrder::RGBx: return "RGBx"; case ImageChannelOrder::Depth: return "Depth"; case ImageChannelOrder::DepthStencil: return "DepthStencil"; case ImageChannelOrder::sRGB: return "sRGB"; case ImageChannelOrder::sRGBx: return "sRGBx"; case ImageChannelOrder::sRGBA: return "sRGBA"; case ImageChannelOrder::sBGRA: return "sBGRA"; case ImageChannelOrder::ABGR: return "ABGR"; default: return "Unknown"; } } inline const char* ImageChannelDataTypeToString(ImageChannelDataType value) { switch (value) { case ImageChannelDataType::SnormInt8: return "SnormInt8"; case ImageChannelDataType::SnormInt16: return "SnormInt16"; case ImageChannelDataType::UnormInt8: return "UnormInt8"; case ImageChannelDataType::UnormInt16: return "UnormInt16"; case ImageChannelDataType::UnormShort565: return "UnormShort565"; case ImageChannelDataType::UnormShort555: return "UnormShort555"; case ImageChannelDataType::UnormInt101010: return "UnormInt101010"; case ImageChannelDataType::SignedInt8: return "SignedInt8"; case ImageChannelDataType::SignedInt16: return "SignedInt16"; case ImageChannelDataType::SignedInt32: return "SignedInt32"; case ImageChannelDataType::UnsignedInt8: return "UnsignedInt8"; case ImageChannelDataType::UnsignedInt16: return "UnsignedInt16"; case ImageChannelDataType::UnsignedInt32: return "UnsignedInt32"; case ImageChannelDataType::HalfFloat: return "HalfFloat"; case ImageChannelDataType::Float: return "Float"; case ImageChannelDataType::UnormInt24: return "UnormInt24"; case ImageChannelDataType::UnormInt101010_2: return "UnormInt101010_2"; case ImageChannelDataType::UnsignedIntRaw10EXT: return "UnsignedIntRaw10EXT"; case ImageChannelDataType::UnsignedIntRaw12EXT: return "UnsignedIntRaw12EXT"; case ImageChannelDataType::UnormInt2_101010EXT: return "UnormInt2_101010EXT"; default: return "Unknown"; } } inline const char* FPRoundingModeToString(FPRoundingMode value) { switch (value) { case FPRoundingMode::RTE: return "RTE"; case FPRoundingMode::RTZ: return "RTZ"; case FPRoundingMode::RTP: return "RTP"; case FPRoundingMode::RTN: return "RTN"; default: return "Unknown"; } } inline const char* LinkageTypeToString(LinkageType value) { switch (value) { case LinkageType::Export: return "Export"; case LinkageType::Import: return "Import"; case LinkageType::LinkOnceODR: return "LinkOnceODR"; default: return "Unknown"; } } inline const char* AccessQualifierToString(AccessQualifier value) { switch (value) { case AccessQualifier::ReadOnly: return "ReadOnly"; case AccessQualifier::WriteOnly: return "WriteOnly"; case AccessQualifier::ReadWrite: return "ReadWrite"; default: return "Unknown"; } } inline const char* FunctionParameterAttributeToString(FunctionParameterAttribute value) { switch (value) { case FunctionParameterAttribute::Zext: return "Zext"; case FunctionParameterAttribute::Sext: return "Sext"; case FunctionParameterAttribute::ByVal: return "ByVal"; case FunctionParameterAttribute::Sret: return "Sret"; case FunctionParameterAttribute::NoAlias: return "NoAlias"; case FunctionParameterAttribute::NoCapture: return "NoCapture"; case FunctionParameterAttribute::NoWrite: return "NoWrite"; case FunctionParameterAttribute::NoReadWrite: return "NoReadWrite"; case FunctionParameterAttribute::RuntimeAlignedINTEL: return "RuntimeAlignedINTEL"; default: return "Unknown"; } } inline const char* DecorationToString(Decoration value) { switch (value) { case Decoration::RelaxedPrecision: return "RelaxedPrecision"; case Decoration::SpecId: return "SpecId"; case Decoration::Block: return "Block"; case Decoration::BufferBlock: return "BufferBlock"; case Decoration::RowMajor: return "RowMajor"; case Decoration::ColMajor: return "ColMajor"; case Decoration::ArrayStride: return "ArrayStride"; case Decoration::MatrixStride: return "MatrixStride"; case Decoration::GLSLShared: return "GLSLShared"; case Decoration::GLSLPacked: return "GLSLPacked"; case Decoration::CPacked: return "CPacked"; case Decoration::BuiltIn: return "BuiltIn"; case Decoration::NoPerspective: return "NoPerspective"; case Decoration::Flat: return "Flat"; case Decoration::Patch: return "Patch"; case Decoration::Centroid: return "Centroid"; case Decoration::Sample: return "Sample"; case Decoration::Invariant: return "Invariant"; case Decoration::Restrict: return "Restrict"; case Decoration::Aliased: return "Aliased"; case Decoration::Volatile: return "Volatile"; case Decoration::Constant: return "Constant"; case Decoration::Coherent: return "Coherent"; case Decoration::NonWritable: return "NonWritable"; case Decoration::NonReadable: return "NonReadable"; case Decoration::Uniform: return "Uniform"; case Decoration::UniformId: return "UniformId"; case Decoration::SaturatedConversion: return "SaturatedConversion"; case Decoration::Stream: return "Stream"; case Decoration::Location: return "Location"; case Decoration::Component: return "Component"; case Decoration::Index: return "Index"; case Decoration::Binding: return "Binding"; case Decoration::DescriptorSet: return "DescriptorSet"; case Decoration::Offset: return "Offset"; case Decoration::XfbBuffer: return "XfbBuffer"; case Decoration::XfbStride: return "XfbStride"; case Decoration::FuncParamAttr: return "FuncParamAttr"; case Decoration::FPRoundingMode: return "FPRoundingMode"; case Decoration::FPFastMathMode: return "FPFastMathMode"; case Decoration::LinkageAttributes: return "LinkageAttributes"; case Decoration::NoContraction: return "NoContraction"; case Decoration::InputAttachmentIndex: return "InputAttachmentIndex"; case Decoration::Alignment: return "Alignment"; case Decoration::MaxByteOffset: return "MaxByteOffset"; case Decoration::AlignmentId: return "AlignmentId"; case Decoration::MaxByteOffsetId: return "MaxByteOffsetId"; case Decoration::SaturatedToLargestFloat8NormalConversionEXT: return "SaturatedToLargestFloat8NormalConversionEXT"; case Decoration::NoSignedWrap: return "NoSignedWrap"; case Decoration::NoUnsignedWrap: return "NoUnsignedWrap"; case Decoration::WeightTextureQCOM: return "WeightTextureQCOM"; case Decoration::BlockMatchTextureQCOM: return "BlockMatchTextureQCOM"; case Decoration::BlockMatchSamplerQCOM: return "BlockMatchSamplerQCOM"; case Decoration::ExplicitInterpAMD: return "ExplicitInterpAMD"; case Decoration::NodeSharesPayloadLimitsWithAMDX: return "NodeSharesPayloadLimitsWithAMDX"; case Decoration::NodeMaxPayloadsAMDX: return "NodeMaxPayloadsAMDX"; case Decoration::TrackFinishWritingAMDX: return "TrackFinishWritingAMDX"; case Decoration::PayloadNodeNameAMDX: return "PayloadNodeNameAMDX"; case Decoration::PayloadNodeBaseIndexAMDX: return "PayloadNodeBaseIndexAMDX"; case Decoration::PayloadNodeSparseArrayAMDX: return "PayloadNodeSparseArrayAMDX"; case Decoration::PayloadNodeArraySizeAMDX: return "PayloadNodeArraySizeAMDX"; case Decoration::PayloadDispatchIndirectAMDX: return "PayloadDispatchIndirectAMDX"; case Decoration::OverrideCoverageNV: return "OverrideCoverageNV"; case Decoration::PassthroughNV: return "PassthroughNV"; case Decoration::ViewportRelativeNV: return "ViewportRelativeNV"; case Decoration::SecondaryViewportRelativeNV: return "SecondaryViewportRelativeNV"; case Decoration::PerPrimitiveEXT: return "PerPrimitiveEXT"; case Decoration::PerViewNV: return "PerViewNV"; case Decoration::PerTaskNV: return "PerTaskNV"; case Decoration::PerVertexKHR: return "PerVertexKHR"; case Decoration::NonUniform: return "NonUniform"; case Decoration::RestrictPointer: return "RestrictPointer"; case Decoration::AliasedPointer: return "AliasedPointer"; case Decoration::HitObjectShaderRecordBufferNV: return "HitObjectShaderRecordBufferNV"; case Decoration::BindlessSamplerNV: return "BindlessSamplerNV"; case Decoration::BindlessImageNV: return "BindlessImageNV"; case Decoration::BoundSamplerNV: return "BoundSamplerNV"; case Decoration::BoundImageNV: return "BoundImageNV"; case Decoration::SIMTCallINTEL: return "SIMTCallINTEL"; case Decoration::ReferencedIndirectlyINTEL: return "ReferencedIndirectlyINTEL"; case Decoration::ClobberINTEL: return "ClobberINTEL"; case Decoration::SideEffectsINTEL: return "SideEffectsINTEL"; case Decoration::VectorComputeVariableINTEL: return "VectorComputeVariableINTEL"; case Decoration::FuncParamIOKindINTEL: return "FuncParamIOKindINTEL"; case Decoration::VectorComputeFunctionINTEL: return "VectorComputeFunctionINTEL"; case Decoration::StackCallINTEL: return "StackCallINTEL"; case Decoration::GlobalVariableOffsetINTEL: return "GlobalVariableOffsetINTEL"; case Decoration::CounterBuffer: return "CounterBuffer"; case Decoration::HlslSemanticGOOGLE: return "HlslSemanticGOOGLE"; case Decoration::UserTypeGOOGLE: return "UserTypeGOOGLE"; case Decoration::FunctionRoundingModeINTEL: return "FunctionRoundingModeINTEL"; case Decoration::FunctionDenormModeINTEL: return "FunctionDenormModeINTEL"; case Decoration::RegisterINTEL: return "RegisterINTEL"; case Decoration::MemoryINTEL: return "MemoryINTEL"; case Decoration::NumbanksINTEL: return "NumbanksINTEL"; case Decoration::BankwidthINTEL: return "BankwidthINTEL"; case Decoration::MaxPrivateCopiesINTEL: return "MaxPrivateCopiesINTEL"; case Decoration::SinglepumpINTEL: return "SinglepumpINTEL"; case Decoration::DoublepumpINTEL: return "DoublepumpINTEL"; case Decoration::MaxReplicatesINTEL: return "MaxReplicatesINTEL"; case Decoration::SimpleDualPortINTEL: return "SimpleDualPortINTEL"; case Decoration::MergeINTEL: return "MergeINTEL"; case Decoration::BankBitsINTEL: return "BankBitsINTEL"; case Decoration::ForcePow2DepthINTEL: return "ForcePow2DepthINTEL"; case Decoration::StridesizeINTEL: return "StridesizeINTEL"; case Decoration::WordsizeINTEL: return "WordsizeINTEL"; case Decoration::TrueDualPortINTEL: return "TrueDualPortINTEL"; case Decoration::BurstCoalesceINTEL: return "BurstCoalesceINTEL"; case Decoration::CacheSizeINTEL: return "CacheSizeINTEL"; case Decoration::DontStaticallyCoalesceINTEL: return "DontStaticallyCoalesceINTEL"; case Decoration::PrefetchINTEL: return "PrefetchINTEL"; case Decoration::StallEnableINTEL: return "StallEnableINTEL"; case Decoration::FuseLoopsInFunctionINTEL: return "FuseLoopsInFunctionINTEL"; case Decoration::MathOpDSPModeINTEL: return "MathOpDSPModeINTEL"; case Decoration::AliasScopeINTEL: return "AliasScopeINTEL"; case Decoration::NoAliasINTEL: return "NoAliasINTEL"; case Decoration::InitiationIntervalINTEL: return "InitiationIntervalINTEL"; case Decoration::MaxConcurrencyINTEL: return "MaxConcurrencyINTEL"; case Decoration::PipelineEnableINTEL: return "PipelineEnableINTEL"; case Decoration::BufferLocationINTEL: return "BufferLocationINTEL"; case Decoration::IOPipeStorageINTEL: return "IOPipeStorageINTEL"; case Decoration::FunctionFloatingPointModeINTEL: return "FunctionFloatingPointModeINTEL"; case Decoration::SingleElementVectorINTEL: return "SingleElementVectorINTEL"; case Decoration::VectorComputeCallableFunctionINTEL: return "VectorComputeCallableFunctionINTEL"; case Decoration::MediaBlockIOINTEL: return "MediaBlockIOINTEL"; case Decoration::StallFreeINTEL: return "StallFreeINTEL"; case Decoration::FPMaxErrorDecorationINTEL: return "FPMaxErrorDecorationINTEL"; case Decoration::LatencyControlLabelINTEL: return "LatencyControlLabelINTEL"; case Decoration::LatencyControlConstraintINTEL: return "LatencyControlConstraintINTEL"; case Decoration::ConduitKernelArgumentINTEL: return "ConduitKernelArgumentINTEL"; case Decoration::RegisterMapKernelArgumentINTEL: return "RegisterMapKernelArgumentINTEL"; case Decoration::MMHostInterfaceAddressWidthINTEL: return "MMHostInterfaceAddressWidthINTEL"; case Decoration::MMHostInterfaceDataWidthINTEL: return "MMHostInterfaceDataWidthINTEL"; case Decoration::MMHostInterfaceLatencyINTEL: return "MMHostInterfaceLatencyINTEL"; case Decoration::MMHostInterfaceReadWriteModeINTEL: return "MMHostInterfaceReadWriteModeINTEL"; case Decoration::MMHostInterfaceMaxBurstINTEL: return "MMHostInterfaceMaxBurstINTEL"; case Decoration::MMHostInterfaceWaitRequestINTEL: return "MMHostInterfaceWaitRequestINTEL"; case Decoration::StableKernelArgumentINTEL: return "StableKernelArgumentINTEL"; case Decoration::HostAccessINTEL: return "HostAccessINTEL"; case Decoration::InitModeINTEL: return "InitModeINTEL"; case Decoration::ImplementInRegisterMapINTEL: return "ImplementInRegisterMapINTEL"; case Decoration::CacheControlLoadINTEL: return "CacheControlLoadINTEL"; case Decoration::CacheControlStoreINTEL: return "CacheControlStoreINTEL"; default: return "Unknown"; } } inline const char* BuiltInToString(BuiltIn value) { switch (value) { case BuiltIn::Position: return "Position"; case BuiltIn::PointSize: return "PointSize"; case BuiltIn::ClipDistance: return "ClipDistance"; case BuiltIn::CullDistance: return "CullDistance"; case BuiltIn::VertexId: return "VertexId"; case BuiltIn::InstanceId: return "InstanceId"; case BuiltIn::PrimitiveId: return "PrimitiveId"; case BuiltIn::InvocationId: return "InvocationId"; case BuiltIn::Layer: return "Layer"; case BuiltIn::ViewportIndex: return "ViewportIndex"; case BuiltIn::TessLevelOuter: return "TessLevelOuter"; case BuiltIn::TessLevelInner: return "TessLevelInner"; case BuiltIn::TessCoord: return "TessCoord"; case BuiltIn::PatchVertices: return "PatchVertices"; case BuiltIn::FragCoord: return "FragCoord"; case BuiltIn::PointCoord: return "PointCoord"; case BuiltIn::FrontFacing: return "FrontFacing"; case BuiltIn::SampleId: return "SampleId"; case BuiltIn::SamplePosition: return "SamplePosition"; case BuiltIn::SampleMask: return "SampleMask"; case BuiltIn::FragDepth: return "FragDepth"; case BuiltIn::HelperInvocation: return "HelperInvocation"; case BuiltIn::NumWorkgroups: return "NumWorkgroups"; case BuiltIn::WorkgroupSize: return "WorkgroupSize"; case BuiltIn::WorkgroupId: return "WorkgroupId"; case BuiltIn::LocalInvocationId: return "LocalInvocationId"; case BuiltIn::GlobalInvocationId: return "GlobalInvocationId"; case BuiltIn::LocalInvocationIndex: return "LocalInvocationIndex"; case BuiltIn::WorkDim: return "WorkDim"; case BuiltIn::GlobalSize: return "GlobalSize"; case BuiltIn::EnqueuedWorkgroupSize: return "EnqueuedWorkgroupSize"; case BuiltIn::GlobalOffset: return "GlobalOffset"; case BuiltIn::GlobalLinearId: return "GlobalLinearId"; case BuiltIn::SubgroupSize: return "SubgroupSize"; case BuiltIn::SubgroupMaxSize: return "SubgroupMaxSize"; case BuiltIn::NumSubgroups: return "NumSubgroups"; case BuiltIn::NumEnqueuedSubgroups: return "NumEnqueuedSubgroups"; case BuiltIn::SubgroupId: return "SubgroupId"; case BuiltIn::SubgroupLocalInvocationId: return "SubgroupLocalInvocationId"; case BuiltIn::VertexIndex: return "VertexIndex"; case BuiltIn::InstanceIndex: return "InstanceIndex"; case BuiltIn::CoreIDARM: return "CoreIDARM"; case BuiltIn::CoreCountARM: return "CoreCountARM"; case BuiltIn::CoreMaxIDARM: return "CoreMaxIDARM"; case BuiltIn::WarpIDARM: return "WarpIDARM"; case BuiltIn::WarpMaxIDARM: return "WarpMaxIDARM"; case BuiltIn::SubgroupEqMask: return "SubgroupEqMask"; case BuiltIn::SubgroupGeMask: return "SubgroupGeMask"; case BuiltIn::SubgroupGtMask: return "SubgroupGtMask"; case BuiltIn::SubgroupLeMask: return "SubgroupLeMask"; case BuiltIn::SubgroupLtMask: return "SubgroupLtMask"; case BuiltIn::BaseVertex: return "BaseVertex"; case BuiltIn::BaseInstance: return "BaseInstance"; case BuiltIn::DrawIndex: return "DrawIndex"; case BuiltIn::PrimitiveShadingRateKHR: return "PrimitiveShadingRateKHR"; case BuiltIn::DeviceIndex: return "DeviceIndex"; case BuiltIn::ViewIndex: return "ViewIndex"; case BuiltIn::ShadingRateKHR: return "ShadingRateKHR"; case BuiltIn::TileOffsetQCOM: return "TileOffsetQCOM"; case BuiltIn::TileDimensionQCOM: return "TileDimensionQCOM"; case BuiltIn::TileApronSizeQCOM: return "TileApronSizeQCOM"; case BuiltIn::BaryCoordNoPerspAMD: return "BaryCoordNoPerspAMD"; case BuiltIn::BaryCoordNoPerspCentroidAMD: return "BaryCoordNoPerspCentroidAMD"; case BuiltIn::BaryCoordNoPerspSampleAMD: return "BaryCoordNoPerspSampleAMD"; case BuiltIn::BaryCoordSmoothAMD: return "BaryCoordSmoothAMD"; case BuiltIn::BaryCoordSmoothCentroidAMD: return "BaryCoordSmoothCentroidAMD"; case BuiltIn::BaryCoordSmoothSampleAMD: return "BaryCoordSmoothSampleAMD"; case BuiltIn::BaryCoordPullModelAMD: return "BaryCoordPullModelAMD"; case BuiltIn::FragStencilRefEXT: return "FragStencilRefEXT"; case BuiltIn::RemainingRecursionLevelsAMDX: return "RemainingRecursionLevelsAMDX"; case BuiltIn::ShaderIndexAMDX: return "ShaderIndexAMDX"; case BuiltIn::ViewportMaskNV: return "ViewportMaskNV"; case BuiltIn::SecondaryPositionNV: return "SecondaryPositionNV"; case BuiltIn::SecondaryViewportMaskNV: return "SecondaryViewportMaskNV"; case BuiltIn::PositionPerViewNV: return "PositionPerViewNV"; case BuiltIn::ViewportMaskPerViewNV: return "ViewportMaskPerViewNV"; case BuiltIn::FullyCoveredEXT: return "FullyCoveredEXT"; case BuiltIn::TaskCountNV: return "TaskCountNV"; case BuiltIn::PrimitiveCountNV: return "PrimitiveCountNV"; case BuiltIn::PrimitiveIndicesNV: return "PrimitiveIndicesNV"; case BuiltIn::ClipDistancePerViewNV: return "ClipDistancePerViewNV"; case BuiltIn::CullDistancePerViewNV: return "CullDistancePerViewNV"; case BuiltIn::LayerPerViewNV: return "LayerPerViewNV"; case BuiltIn::MeshViewCountNV: return "MeshViewCountNV"; case BuiltIn::MeshViewIndicesNV: return "MeshViewIndicesNV"; case BuiltIn::BaryCoordKHR: return "BaryCoordKHR"; case BuiltIn::BaryCoordNoPerspKHR: return "BaryCoordNoPerspKHR"; case BuiltIn::FragSizeEXT: return "FragSizeEXT"; case BuiltIn::FragInvocationCountEXT: return "FragInvocationCountEXT"; case BuiltIn::PrimitivePointIndicesEXT: return "PrimitivePointIndicesEXT"; case BuiltIn::PrimitiveLineIndicesEXT: return "PrimitiveLineIndicesEXT"; case BuiltIn::PrimitiveTriangleIndicesEXT: return "PrimitiveTriangleIndicesEXT"; case BuiltIn::CullPrimitiveEXT: return "CullPrimitiveEXT"; case BuiltIn::LaunchIdKHR: return "LaunchIdKHR"; case BuiltIn::LaunchSizeKHR: return "LaunchSizeKHR"; case BuiltIn::WorldRayOriginKHR: return "WorldRayOriginKHR"; case BuiltIn::WorldRayDirectionKHR: return "WorldRayDirectionKHR"; case BuiltIn::ObjectRayOriginKHR: return "ObjectRayOriginKHR"; case BuiltIn::ObjectRayDirectionKHR: return "ObjectRayDirectionKHR"; case BuiltIn::RayTminKHR: return "RayTminKHR"; case BuiltIn::RayTmaxKHR: return "RayTmaxKHR"; case BuiltIn::InstanceCustomIndexKHR: return "InstanceCustomIndexKHR"; case BuiltIn::ObjectToWorldKHR: return "ObjectToWorldKHR"; case BuiltIn::WorldToObjectKHR: return "WorldToObjectKHR"; case BuiltIn::HitTNV: return "HitTNV"; case BuiltIn::HitKindKHR: return "HitKindKHR"; case BuiltIn::CurrentRayTimeNV: return "CurrentRayTimeNV"; case BuiltIn::HitTriangleVertexPositionsKHR: return "HitTriangleVertexPositionsKHR"; case BuiltIn::HitMicroTriangleVertexPositionsNV: return "HitMicroTriangleVertexPositionsNV"; case BuiltIn::HitMicroTriangleVertexBarycentricsNV: return "HitMicroTriangleVertexBarycentricsNV"; case BuiltIn::IncomingRayFlagsKHR: return "IncomingRayFlagsKHR"; case BuiltIn::RayGeometryIndexKHR: return "RayGeometryIndexKHR"; case BuiltIn::HitIsSphereNV: return "HitIsSphereNV"; case BuiltIn::HitIsLSSNV: return "HitIsLSSNV"; case BuiltIn::HitSpherePositionNV: return "HitSpherePositionNV"; case BuiltIn::WarpsPerSMNV: return "WarpsPerSMNV"; case BuiltIn::SMCountNV: return "SMCountNV"; case BuiltIn::WarpIDNV: return "WarpIDNV"; case BuiltIn::SMIDNV: return "SMIDNV"; case BuiltIn::HitLSSPositionsNV: return "HitLSSPositionsNV"; case BuiltIn::HitKindFrontFacingMicroTriangleNV: return "HitKindFrontFacingMicroTriangleNV"; case BuiltIn::HitKindBackFacingMicroTriangleNV: return "HitKindBackFacingMicroTriangleNV"; case BuiltIn::HitSphereRadiusNV: return "HitSphereRadiusNV"; case BuiltIn::HitLSSRadiiNV: return "HitLSSRadiiNV"; case BuiltIn::ClusterIDNV: return "ClusterIDNV"; case BuiltIn::CullMaskKHR: return "CullMaskKHR"; default: return "Unknown"; } } inline const char* ScopeToString(Scope value) { switch (value) { case Scope::CrossDevice: return "CrossDevice"; case Scope::Device: return "Device"; case Scope::Workgroup: return "Workgroup"; case Scope::Subgroup: return "Subgroup"; case Scope::Invocation: return "Invocation"; case Scope::QueueFamily: return "QueueFamily"; case Scope::ShaderCallKHR: return "ShaderCallKHR"; default: return "Unknown"; } } inline const char* GroupOperationToString(GroupOperation value) { switch (value) { case GroupOperation::Reduce: return "Reduce"; case GroupOperation::InclusiveScan: return "InclusiveScan"; case GroupOperation::ExclusiveScan: return "ExclusiveScan"; case GroupOperation::ClusteredReduce: return "ClusteredReduce"; case GroupOperation::PartitionedReduceNV: return "PartitionedReduceNV"; case GroupOperation::PartitionedInclusiveScanNV: return "PartitionedInclusiveScanNV"; case GroupOperation::PartitionedExclusiveScanNV: return "PartitionedExclusiveScanNV"; default: return "Unknown"; } } inline const char* KernelEnqueueFlagsToString(KernelEnqueueFlags value) { switch (value) { case KernelEnqueueFlags::NoWait: return "NoWait"; case KernelEnqueueFlags::WaitKernel: return "WaitKernel"; case KernelEnqueueFlags::WaitWorkGroup: return "WaitWorkGroup"; default: return "Unknown"; } } inline const char* CapabilityToString(Capability value) { switch (value) { case Capability::Matrix: return "Matrix"; case Capability::Shader: return "Shader"; case Capability::Geometry: return "Geometry"; case Capability::Tessellation: return "Tessellation"; case Capability::Addresses: return "Addresses"; case Capability::Linkage: return "Linkage"; case Capability::Kernel: return "Kernel"; case Capability::Vector16: return "Vector16"; case Capability::Float16Buffer: return "Float16Buffer"; case Capability::Float16: return "Float16"; case Capability::Float64: return "Float64"; case Capability::Int64: return "Int64"; case Capability::Int64Atomics: return "Int64Atomics"; case Capability::ImageBasic: return "ImageBasic"; case Capability::ImageReadWrite: return "ImageReadWrite"; case Capability::ImageMipmap: return "ImageMipmap"; case Capability::Pipes: return "Pipes"; case Capability::Groups: return "Groups"; case Capability::DeviceEnqueue: return "DeviceEnqueue"; case Capability::LiteralSampler: return "LiteralSampler"; case Capability::AtomicStorage: return "AtomicStorage"; case Capability::Int16: return "Int16"; case Capability::TessellationPointSize: return "TessellationPointSize"; case Capability::GeometryPointSize: return "GeometryPointSize"; case Capability::ImageGatherExtended: return "ImageGatherExtended"; case Capability::StorageImageMultisample: return "StorageImageMultisample"; case Capability::UniformBufferArrayDynamicIndexing: return "UniformBufferArrayDynamicIndexing"; case Capability::SampledImageArrayDynamicIndexing: return "SampledImageArrayDynamicIndexing"; case Capability::StorageBufferArrayDynamicIndexing: return "StorageBufferArrayDynamicIndexing"; case Capability::StorageImageArrayDynamicIndexing: return "StorageImageArrayDynamicIndexing"; case Capability::ClipDistance: return "ClipDistance"; case Capability::CullDistance: return "CullDistance"; case Capability::ImageCubeArray: return "ImageCubeArray"; case Capability::SampleRateShading: return "SampleRateShading"; case Capability::ImageRect: return "ImageRect"; case Capability::SampledRect: return "SampledRect"; case Capability::GenericPointer: return "GenericPointer"; case Capability::Int8: return "Int8"; case Capability::InputAttachment: return "InputAttachment"; case Capability::SparseResidency: return "SparseResidency"; case Capability::MinLod: return "MinLod"; case Capability::Sampled1D: return "Sampled1D"; case Capability::Image1D: return "Image1D"; case Capability::SampledCubeArray: return "SampledCubeArray"; case Capability::SampledBuffer: return "SampledBuffer"; case Capability::ImageBuffer: return "ImageBuffer"; case Capability::ImageMSArray: return "ImageMSArray"; case Capability::StorageImageExtendedFormats: return "StorageImageExtendedFormats"; case Capability::ImageQuery: return "ImageQuery"; case Capability::DerivativeControl: return "DerivativeControl"; case Capability::InterpolationFunction: return "InterpolationFunction"; case Capability::TransformFeedback: return "TransformFeedback"; case Capability::GeometryStreams: return "GeometryStreams"; case Capability::StorageImageReadWithoutFormat: return "StorageImageReadWithoutFormat"; case Capability::StorageImageWriteWithoutFormat: return "StorageImageWriteWithoutFormat"; case Capability::MultiViewport: return "MultiViewport"; case Capability::SubgroupDispatch: return "SubgroupDispatch"; case Capability::NamedBarrier: return "NamedBarrier"; case Capability::PipeStorage: return "PipeStorage"; case Capability::GroupNonUniform: return "GroupNonUniform"; case Capability::GroupNonUniformVote: return "GroupNonUniformVote"; case Capability::GroupNonUniformArithmetic: return "GroupNonUniformArithmetic"; case Capability::GroupNonUniformBallot: return "GroupNonUniformBallot"; case Capability::GroupNonUniformShuffle: return "GroupNonUniformShuffle"; case Capability::GroupNonUniformShuffleRelative: return "GroupNonUniformShuffleRelative"; case Capability::GroupNonUniformClustered: return "GroupNonUniformClustered"; case Capability::GroupNonUniformQuad: return "GroupNonUniformQuad"; case Capability::ShaderLayer: return "ShaderLayer"; case Capability::ShaderViewportIndex: return "ShaderViewportIndex"; case Capability::UniformDecoration: return "UniformDecoration"; case Capability::CoreBuiltinsARM: return "CoreBuiltinsARM"; case Capability::TileImageColorReadAccessEXT: return "TileImageColorReadAccessEXT"; case Capability::TileImageDepthReadAccessEXT: return "TileImageDepthReadAccessEXT"; case Capability::TileImageStencilReadAccessEXT: return "TileImageStencilReadAccessEXT"; case Capability::CooperativeMatrixLayoutsARM: return "CooperativeMatrixLayoutsARM"; case Capability::Float8EXT: return "Float8EXT"; case Capability::Float8CooperativeMatrixEXT: return "Float8CooperativeMatrixEXT"; case Capability::FragmentShadingRateKHR: return "FragmentShadingRateKHR"; case Capability::SubgroupBallotKHR: return "SubgroupBallotKHR"; case Capability::DrawParameters: return "DrawParameters"; case Capability::WorkgroupMemoryExplicitLayoutKHR: return "WorkgroupMemoryExplicitLayoutKHR"; case Capability::WorkgroupMemoryExplicitLayout8BitAccessKHR: return "WorkgroupMemoryExplicitLayout8BitAccessKHR"; case Capability::WorkgroupMemoryExplicitLayout16BitAccessKHR: return "WorkgroupMemoryExplicitLayout16BitAccessKHR"; case Capability::SubgroupVoteKHR: return "SubgroupVoteKHR"; case Capability::StorageBuffer16BitAccess: return "StorageBuffer16BitAccess"; case Capability::StorageUniform16: return "StorageUniform16"; case Capability::StoragePushConstant16: return "StoragePushConstant16"; case Capability::StorageInputOutput16: return "StorageInputOutput16"; case Capability::DeviceGroup: return "DeviceGroup"; case Capability::MultiView: return "MultiView"; case Capability::VariablePointersStorageBuffer: return "VariablePointersStorageBuffer"; case Capability::VariablePointers: return "VariablePointers"; case Capability::AtomicStorageOps: return "AtomicStorageOps"; case Capability::SampleMaskPostDepthCoverage: return "SampleMaskPostDepthCoverage"; case Capability::StorageBuffer8BitAccess: return "StorageBuffer8BitAccess"; case Capability::UniformAndStorageBuffer8BitAccess: return "UniformAndStorageBuffer8BitAccess"; case Capability::StoragePushConstant8: return "StoragePushConstant8"; case Capability::DenormPreserve: return "DenormPreserve"; case Capability::DenormFlushToZero: return "DenormFlushToZero"; case Capability::SignedZeroInfNanPreserve: return "SignedZeroInfNanPreserve"; case Capability::RoundingModeRTE: return "RoundingModeRTE"; case Capability::RoundingModeRTZ: return "RoundingModeRTZ"; case Capability::RayQueryProvisionalKHR: return "RayQueryProvisionalKHR"; case Capability::RayQueryKHR: return "RayQueryKHR"; case Capability::UntypedPointersKHR: return "UntypedPointersKHR"; case Capability::RayTraversalPrimitiveCullingKHR: return "RayTraversalPrimitiveCullingKHR"; case Capability::RayTracingKHR: return "RayTracingKHR"; case Capability::TextureSampleWeightedQCOM: return "TextureSampleWeightedQCOM"; case Capability::TextureBoxFilterQCOM: return "TextureBoxFilterQCOM"; case Capability::TextureBlockMatchQCOM: return "TextureBlockMatchQCOM"; case Capability::TileShadingQCOM: return "TileShadingQCOM"; case Capability::TextureBlockMatch2QCOM: return "TextureBlockMatch2QCOM"; case Capability::Float16ImageAMD: return "Float16ImageAMD"; case Capability::ImageGatherBiasLodAMD: return "ImageGatherBiasLodAMD"; case Capability::FragmentMaskAMD: return "FragmentMaskAMD"; case Capability::StencilExportEXT: return "StencilExportEXT"; case Capability::ImageReadWriteLodAMD: return "ImageReadWriteLodAMD"; case Capability::Int64ImageEXT: return "Int64ImageEXT"; case Capability::ShaderClockKHR: return "ShaderClockKHR"; case Capability::ShaderEnqueueAMDX: return "ShaderEnqueueAMDX"; case Capability::QuadControlKHR: return "QuadControlKHR"; case Capability::BFloat16TypeKHR: return "BFloat16TypeKHR"; case Capability::BFloat16DotProductKHR: return "BFloat16DotProductKHR"; case Capability::BFloat16CooperativeMatrixKHR: return "BFloat16CooperativeMatrixKHR"; case Capability::SampleMaskOverrideCoverageNV: return "SampleMaskOverrideCoverageNV"; case Capability::GeometryShaderPassthroughNV: return "GeometryShaderPassthroughNV"; case Capability::ShaderViewportIndexLayerEXT: return "ShaderViewportIndexLayerEXT"; case Capability::ShaderViewportMaskNV: return "ShaderViewportMaskNV"; case Capability::ShaderStereoViewNV: return "ShaderStereoViewNV"; case Capability::PerViewAttributesNV: return "PerViewAttributesNV"; case Capability::FragmentFullyCoveredEXT: return "FragmentFullyCoveredEXT"; case Capability::MeshShadingNV: return "MeshShadingNV"; case Capability::ImageFootprintNV: return "ImageFootprintNV"; case Capability::MeshShadingEXT: return "MeshShadingEXT"; case Capability::FragmentBarycentricKHR: return "FragmentBarycentricKHR"; case Capability::ComputeDerivativeGroupQuadsKHR: return "ComputeDerivativeGroupQuadsKHR"; case Capability::FragmentDensityEXT: return "FragmentDensityEXT"; case Capability::GroupNonUniformPartitionedNV: return "GroupNonUniformPartitionedNV"; case Capability::ShaderNonUniform: return "ShaderNonUniform"; case Capability::RuntimeDescriptorArray: return "RuntimeDescriptorArray"; case Capability::InputAttachmentArrayDynamicIndexing: return "InputAttachmentArrayDynamicIndexing"; case Capability::UniformTexelBufferArrayDynamicIndexing: return "UniformTexelBufferArrayDynamicIndexing"; case Capability::StorageTexelBufferArrayDynamicIndexing: return "StorageTexelBufferArrayDynamicIndexing"; case Capability::UniformBufferArrayNonUniformIndexing: return "UniformBufferArrayNonUniformIndexing"; case Capability::SampledImageArrayNonUniformIndexing: return "SampledImageArrayNonUniformIndexing"; case Capability::StorageBufferArrayNonUniformIndexing: return "StorageBufferArrayNonUniformIndexing"; case Capability::StorageImageArrayNonUniformIndexing: return "StorageImageArrayNonUniformIndexing"; case Capability::InputAttachmentArrayNonUniformIndexing: return "InputAttachmentArrayNonUniformIndexing"; case Capability::UniformTexelBufferArrayNonUniformIndexing: return "UniformTexelBufferArrayNonUniformIndexing"; case Capability::StorageTexelBufferArrayNonUniformIndexing: return "StorageTexelBufferArrayNonUniformIndexing"; case Capability::RayTracingPositionFetchKHR: return "RayTracingPositionFetchKHR"; case Capability::RayTracingNV: return "RayTracingNV"; case Capability::RayTracingMotionBlurNV: return "RayTracingMotionBlurNV"; case Capability::VulkanMemoryModel: return "VulkanMemoryModel"; case Capability::VulkanMemoryModelDeviceScope: return "VulkanMemoryModelDeviceScope"; case Capability::PhysicalStorageBufferAddresses: return "PhysicalStorageBufferAddresses"; case Capability::ComputeDerivativeGroupLinearKHR: return "ComputeDerivativeGroupLinearKHR"; case Capability::RayTracingProvisionalKHR: return "RayTracingProvisionalKHR"; case Capability::CooperativeMatrixNV: return "CooperativeMatrixNV"; case Capability::FragmentShaderSampleInterlockEXT: return "FragmentShaderSampleInterlockEXT"; case Capability::FragmentShaderShadingRateInterlockEXT: return "FragmentShaderShadingRateInterlockEXT"; case Capability::ShaderSMBuiltinsNV: return "ShaderSMBuiltinsNV"; case Capability::FragmentShaderPixelInterlockEXT: return "FragmentShaderPixelInterlockEXT"; case Capability::DemoteToHelperInvocation: return "DemoteToHelperInvocation"; case Capability::DisplacementMicromapNV: return "DisplacementMicromapNV"; case Capability::RayTracingOpacityMicromapEXT: return "RayTracingOpacityMicromapEXT"; case Capability::ShaderInvocationReorderNV: return "ShaderInvocationReorderNV"; case Capability::BindlessTextureNV: return "BindlessTextureNV"; case Capability::RayQueryPositionFetchKHR: return "RayQueryPositionFetchKHR"; case Capability::CooperativeVectorNV: return "CooperativeVectorNV"; case Capability::AtomicFloat16VectorNV: return "AtomicFloat16VectorNV"; case Capability::RayTracingDisplacementMicromapNV: return "RayTracingDisplacementMicromapNV"; case Capability::RawAccessChainsNV: return "RawAccessChainsNV"; case Capability::RayTracingSpheresGeometryNV: return "RayTracingSpheresGeometryNV"; case Capability::RayTracingLinearSweptSpheresGeometryNV: return "RayTracingLinearSweptSpheresGeometryNV"; case Capability::CooperativeMatrixReductionsNV: return "CooperativeMatrixReductionsNV"; case Capability::CooperativeMatrixConversionsNV: return "CooperativeMatrixConversionsNV"; case Capability::CooperativeMatrixPerElementOperationsNV: return "CooperativeMatrixPerElementOperationsNV"; case Capability::CooperativeMatrixTensorAddressingNV: return "CooperativeMatrixTensorAddressingNV"; case Capability::CooperativeMatrixBlockLoadsNV: return "CooperativeMatrixBlockLoadsNV"; case Capability::CooperativeVectorTrainingNV: return "CooperativeVectorTrainingNV"; case Capability::RayTracingClusterAccelerationStructureNV: return "RayTracingClusterAccelerationStructureNV"; case Capability::TensorAddressingNV: return "TensorAddressingNV"; case Capability::SubgroupShuffleINTEL: return "SubgroupShuffleINTEL"; case Capability::SubgroupBufferBlockIOINTEL: return "SubgroupBufferBlockIOINTEL"; case Capability::SubgroupImageBlockIOINTEL: return "SubgroupImageBlockIOINTEL"; case Capability::SubgroupImageMediaBlockIOINTEL: return "SubgroupImageMediaBlockIOINTEL"; case Capability::RoundToInfinityINTEL: return "RoundToInfinityINTEL"; case Capability::FloatingPointModeINTEL: return "FloatingPointModeINTEL"; case Capability::IntegerFunctions2INTEL: return "IntegerFunctions2INTEL"; case Capability::FunctionPointersINTEL: return "FunctionPointersINTEL"; case Capability::IndirectReferencesINTEL: return "IndirectReferencesINTEL"; case Capability::AsmINTEL: return "AsmINTEL"; case Capability::AtomicFloat32MinMaxEXT: return "AtomicFloat32MinMaxEXT"; case Capability::AtomicFloat64MinMaxEXT: return "AtomicFloat64MinMaxEXT"; case Capability::AtomicFloat16MinMaxEXT: return "AtomicFloat16MinMaxEXT"; case Capability::VectorComputeINTEL: return "VectorComputeINTEL"; case Capability::VectorAnyINTEL: return "VectorAnyINTEL"; case Capability::ExpectAssumeKHR: return "ExpectAssumeKHR"; case Capability::SubgroupAvcMotionEstimationINTEL: return "SubgroupAvcMotionEstimationINTEL"; case Capability::SubgroupAvcMotionEstimationIntraINTEL: return "SubgroupAvcMotionEstimationIntraINTEL"; case Capability::SubgroupAvcMotionEstimationChromaINTEL: return "SubgroupAvcMotionEstimationChromaINTEL"; case Capability::VariableLengthArrayINTEL: return "VariableLengthArrayINTEL"; case Capability::FunctionFloatControlINTEL: return "FunctionFloatControlINTEL"; case Capability::FPGAMemoryAttributesINTEL: return "FPGAMemoryAttributesINTEL"; case Capability::FPFastMathModeINTEL: return "FPFastMathModeINTEL"; case Capability::ArbitraryPrecisionIntegersINTEL: return "ArbitraryPrecisionIntegersINTEL"; case Capability::ArbitraryPrecisionFloatingPointINTEL: return "ArbitraryPrecisionFloatingPointINTEL"; case Capability::UnstructuredLoopControlsINTEL: return "UnstructuredLoopControlsINTEL"; case Capability::FPGALoopControlsINTEL: return "FPGALoopControlsINTEL"; case Capability::KernelAttributesINTEL: return "KernelAttributesINTEL"; case Capability::FPGAKernelAttributesINTEL: return "FPGAKernelAttributesINTEL"; case Capability::FPGAMemoryAccessesINTEL: return "FPGAMemoryAccessesINTEL"; case Capability::FPGAClusterAttributesINTEL: return "FPGAClusterAttributesINTEL"; case Capability::LoopFuseINTEL: return "LoopFuseINTEL"; case Capability::FPGADSPControlINTEL: return "FPGADSPControlINTEL"; case Capability::MemoryAccessAliasingINTEL: return "MemoryAccessAliasingINTEL"; case Capability::FPGAInvocationPipeliningAttributesINTEL: return "FPGAInvocationPipeliningAttributesINTEL"; case Capability::FPGABufferLocationINTEL: return "FPGABufferLocationINTEL"; case Capability::ArbitraryPrecisionFixedPointINTEL: return "ArbitraryPrecisionFixedPointINTEL"; case Capability::USMStorageClassesINTEL: return "USMStorageClassesINTEL"; case Capability::RuntimeAlignedAttributeINTEL: return "RuntimeAlignedAttributeINTEL"; case Capability::IOPipesINTEL: return "IOPipesINTEL"; case Capability::BlockingPipesINTEL: return "BlockingPipesINTEL"; case Capability::FPGARegINTEL: return "FPGARegINTEL"; case Capability::DotProductInputAll: return "DotProductInputAll"; case Capability::DotProductInput4x8Bit: return "DotProductInput4x8Bit"; case Capability::DotProductInput4x8BitPacked: return "DotProductInput4x8BitPacked"; case Capability::DotProduct: return "DotProduct"; case Capability::RayCullMaskKHR: return "RayCullMaskKHR"; case Capability::CooperativeMatrixKHR: return "CooperativeMatrixKHR"; case Capability::ReplicatedCompositesEXT: return "ReplicatedCompositesEXT"; case Capability::BitInstructions: return "BitInstructions"; case Capability::GroupNonUniformRotateKHR: return "GroupNonUniformRotateKHR"; case Capability::FloatControls2: return "FloatControls2"; case Capability::AtomicFloat32AddEXT: return "AtomicFloat32AddEXT"; case Capability::AtomicFloat64AddEXT: return "AtomicFloat64AddEXT"; case Capability::LongCompositesINTEL: return "LongCompositesINTEL"; case Capability::OptNoneEXT: return "OptNoneEXT"; case Capability::AtomicFloat16AddEXT: return "AtomicFloat16AddEXT"; case Capability::DebugInfoModuleINTEL: return "DebugInfoModuleINTEL"; case Capability::BFloat16ConversionINTEL: return "BFloat16ConversionINTEL"; case Capability::SplitBarrierINTEL: return "SplitBarrierINTEL"; case Capability::ArithmeticFenceEXT: return "ArithmeticFenceEXT"; case Capability::FPGAClusterAttributesV2INTEL: return "FPGAClusterAttributesV2INTEL"; case Capability::FPGAKernelAttributesv2INTEL: return "FPGAKernelAttributesv2INTEL"; case Capability::FPMaxErrorINTEL: return "FPMaxErrorINTEL"; case Capability::FPGALatencyControlINTEL: return "FPGALatencyControlINTEL"; case Capability::FPGAArgumentInterfacesINTEL: return "FPGAArgumentInterfacesINTEL"; case Capability::GlobalVariableHostAccessINTEL: return "GlobalVariableHostAccessINTEL"; case Capability::GlobalVariableFPGADecorationsINTEL: return "GlobalVariableFPGADecorationsINTEL"; case Capability::SubgroupBufferPrefetchINTEL: return "SubgroupBufferPrefetchINTEL"; case Capability::Subgroup2DBlockIOINTEL: return "Subgroup2DBlockIOINTEL"; case Capability::Subgroup2DBlockTransformINTEL: return "Subgroup2DBlockTransformINTEL"; case Capability::Subgroup2DBlockTransposeINTEL: return "Subgroup2DBlockTransposeINTEL"; case Capability::SubgroupMatrixMultiplyAccumulateINTEL: return "SubgroupMatrixMultiplyAccumulateINTEL"; case Capability::GroupUniformArithmeticKHR: return "GroupUniformArithmeticKHR"; case Capability::MaskedGatherScatterINTEL: return "MaskedGatherScatterINTEL"; case Capability::CacheControlsINTEL: return "CacheControlsINTEL"; case Capability::RegisterLimitsINTEL: return "RegisterLimitsINTEL"; default: return "Unknown"; } } inline const char* RayQueryIntersectionToString(RayQueryIntersection value) { switch (value) { case RayQueryIntersection::RayQueryCandidateIntersectionKHR: return "RayQueryCandidateIntersectionKHR"; case RayQueryIntersection::RayQueryCommittedIntersectionKHR: return "RayQueryCommittedIntersectionKHR"; default: return "Unknown"; } } inline const char* RayQueryCommittedIntersectionTypeToString(RayQueryCommittedIntersectionType value) { switch (value) { case RayQueryCommittedIntersectionType::RayQueryCommittedIntersectionNoneKHR: return "RayQueryCommittedIntersectionNoneKHR"; case RayQueryCommittedIntersectionType::RayQueryCommittedIntersectionTriangleKHR: return "RayQueryCommittedIntersectionTriangleKHR"; case RayQueryCommittedIntersectionType::RayQueryCommittedIntersectionGeneratedKHR: return "RayQueryCommittedIntersectionGeneratedKHR"; default: return "Unknown"; } } inline const char* RayQueryCandidateIntersectionTypeToString(RayQueryCandidateIntersectionType value) { switch (value) { case RayQueryCandidateIntersectionType::RayQueryCandidateIntersectionTriangleKHR: return "RayQueryCandidateIntersectionTriangleKHR"; case RayQueryCandidateIntersectionType::RayQueryCandidateIntersectionAABBKHR: return "RayQueryCandidateIntersectionAABBKHR"; default: return "Unknown"; } } inline const char* FPDenormModeToString(FPDenormMode value) { switch (value) { case FPDenormMode::Preserve: return "Preserve"; case FPDenormMode::FlushToZero: return "FlushToZero"; default: return "Unknown"; } } inline const char* FPOperationModeToString(FPOperationMode value) { switch (value) { case FPOperationMode::IEEE: return "IEEE"; case FPOperationMode::ALT: return "ALT"; default: return "Unknown"; } } inline const char* QuantizationModesToString(QuantizationModes value) { switch (value) { case QuantizationModes::TRN: return "TRN"; case QuantizationModes::TRN_ZERO: return "TRN_ZERO"; case QuantizationModes::RND: return "RND"; case QuantizationModes::RND_ZERO: return "RND_ZERO"; case QuantizationModes::RND_INF: return "RND_INF"; case QuantizationModes::RND_MIN_INF: return "RND_MIN_INF"; case QuantizationModes::RND_CONV: return "RND_CONV"; case QuantizationModes::RND_CONV_ODD: return "RND_CONV_ODD"; default: return "Unknown"; } } inline const char* OverflowModesToString(OverflowModes value) { switch (value) { case OverflowModes::WRAP: return "WRAP"; case OverflowModes::SAT: return "SAT"; case OverflowModes::SAT_ZERO: return "SAT_ZERO"; case OverflowModes::SAT_SYM: return "SAT_SYM"; default: return "Unknown"; } } inline const char* PackedVectorFormatToString(PackedVectorFormat value) { switch (value) { case PackedVectorFormat::PackedVectorFormat4x8Bit: return "PackedVectorFormat4x8Bit"; default: return "Unknown"; } } inline const char* CooperativeMatrixLayoutToString(CooperativeMatrixLayout value) { switch (value) { case CooperativeMatrixLayout::RowMajorKHR: return "RowMajorKHR"; case CooperativeMatrixLayout::ColumnMajorKHR: return "ColumnMajorKHR"; case CooperativeMatrixLayout::RowBlockedInterleavedARM: return "RowBlockedInterleavedARM"; case CooperativeMatrixLayout::ColumnBlockedInterleavedARM: return "ColumnBlockedInterleavedARM"; default: return "Unknown"; } } inline const char* CooperativeMatrixUseToString(CooperativeMatrixUse value) { switch (value) { case CooperativeMatrixUse::MatrixAKHR: return "MatrixAKHR"; case CooperativeMatrixUse::MatrixBKHR: return "MatrixBKHR"; case CooperativeMatrixUse::MatrixAccumulatorKHR: return "MatrixAccumulatorKHR"; default: return "Unknown"; } } inline const char* TensorClampModeToString(TensorClampMode value) { switch (value) { case TensorClampMode::Undefined: return "Undefined"; case TensorClampMode::Constant: return "Constant"; case TensorClampMode::ClampToEdge: return "ClampToEdge"; case TensorClampMode::Repeat: return "Repeat"; case TensorClampMode::RepeatMirrored: return "RepeatMirrored"; default: return "Unknown"; } } inline const char* InitializationModeQualifierToString(InitializationModeQualifier value) { switch (value) { case InitializationModeQualifier::InitOnDeviceReprogramINTEL: return "InitOnDeviceReprogramINTEL"; case InitializationModeQualifier::InitOnDeviceResetINTEL: return "InitOnDeviceResetINTEL"; default: return "Unknown"; } } inline const char* HostAccessQualifierToString(HostAccessQualifier value) { switch (value) { case HostAccessQualifier::NoneINTEL: return "NoneINTEL"; case HostAccessQualifier::ReadINTEL: return "ReadINTEL"; case HostAccessQualifier::WriteINTEL: return "WriteINTEL"; case HostAccessQualifier::ReadWriteINTEL: return "ReadWriteINTEL"; default: return "Unknown"; } } inline const char* LoadCacheControlToString(LoadCacheControl value) { switch (value) { case LoadCacheControl::UncachedINTEL: return "UncachedINTEL"; case LoadCacheControl::CachedINTEL: return "CachedINTEL"; case LoadCacheControl::StreamingINTEL: return "StreamingINTEL"; case LoadCacheControl::InvalidateAfterReadINTEL: return "InvalidateAfterReadINTEL"; case LoadCacheControl::ConstCachedINTEL: return "ConstCachedINTEL"; default: return "Unknown"; } } inline const char* StoreCacheControlToString(StoreCacheControl value) { switch (value) { case StoreCacheControl::UncachedINTEL: return "UncachedINTEL"; case StoreCacheControl::WriteThroughINTEL: return "WriteThroughINTEL"; case StoreCacheControl::WriteBackINTEL: return "WriteBackINTEL"; case StoreCacheControl::StreamingINTEL: return "StreamingINTEL"; default: return "Unknown"; } } inline const char* NamedMaximumNumberOfRegistersToString(NamedMaximumNumberOfRegisters value) { switch (value) { case NamedMaximumNumberOfRegisters::AutoINTEL: return "AutoINTEL"; default: return "Unknown"; } } inline const char* FPEncodingToString(FPEncoding value) { switch (value) { case FPEncoding::BFloat16KHR: return "BFloat16KHR"; case FPEncoding::Float8E4M3EXT: return "Float8E4M3EXT"; case FPEncoding::Float8E5M2EXT: return "Float8E5M2EXT"; default: return "Unknown"; } } inline const char* CooperativeVectorMatrixLayoutToString(CooperativeVectorMatrixLayout value) { switch (value) { case CooperativeVectorMatrixLayout::RowMajorNV: return "RowMajorNV"; case CooperativeVectorMatrixLayout::ColumnMajorNV: return "ColumnMajorNV"; case CooperativeVectorMatrixLayout::InferencingOptimalNV: return "InferencingOptimalNV"; case CooperativeVectorMatrixLayout::TrainingOptimalNV: return "TrainingOptimalNV"; default: return "Unknown"; } } inline const char* ComponentTypeToString(ComponentType value) { switch (value) { case ComponentType::Float16NV: return "Float16NV"; case ComponentType::Float32NV: return "Float32NV"; case ComponentType::Float64NV: return "Float64NV"; case ComponentType::SignedInt8NV: return "SignedInt8NV"; case ComponentType::SignedInt16NV: return "SignedInt16NV"; case ComponentType::SignedInt32NV: return "SignedInt32NV"; case ComponentType::SignedInt64NV: return "SignedInt64NV"; case ComponentType::UnsignedInt8NV: return "UnsignedInt8NV"; case ComponentType::UnsignedInt16NV: return "UnsignedInt16NV"; case ComponentType::UnsignedInt32NV: return "UnsignedInt32NV"; case ComponentType::UnsignedInt64NV: return "UnsignedInt64NV"; case ComponentType::SignedInt8PackedNV: return "SignedInt8PackedNV"; case ComponentType::UnsignedInt8PackedNV: return "UnsignedInt8PackedNV"; case ComponentType::FloatE4M3NV: return "FloatE4M3NV"; case ComponentType::FloatE5M2NV: return "FloatE5M2NV"; default: return "Unknown"; } } inline const char* OpToString(Op value) { switch (value) { case Op::OpNop: return "OpNop"; case Op::OpUndef: return "OpUndef"; case Op::OpSourceContinued: return "OpSourceContinued"; case Op::OpSource: return "OpSource"; case Op::OpSourceExtension: return "OpSourceExtension"; case Op::OpName: return "OpName"; case Op::OpMemberName: return "OpMemberName"; case Op::OpString: return "OpString"; case Op::OpLine: return "OpLine"; case Op::OpExtension: return "OpExtension"; case Op::OpExtInstImport: return "OpExtInstImport"; case Op::OpExtInst: return "OpExtInst"; case Op::OpMemoryModel: return "OpMemoryModel"; case Op::OpEntryPoint: return "OpEntryPoint"; case Op::OpExecutionMode: return "OpExecutionMode"; case Op::OpCapability: return "OpCapability"; case Op::OpTypeVoid: return "OpTypeVoid"; case Op::OpTypeBool: return "OpTypeBool"; case Op::OpTypeInt: return "OpTypeInt"; case Op::OpTypeFloat: return "OpTypeFloat"; case Op::OpTypeVector: return "OpTypeVector"; case Op::OpTypeMatrix: return "OpTypeMatrix"; case Op::OpTypeImage: return "OpTypeImage"; case Op::OpTypeSampler: return "OpTypeSampler"; case Op::OpTypeSampledImage: return "OpTypeSampledImage"; case Op::OpTypeArray: return "OpTypeArray"; case Op::OpTypeRuntimeArray: return "OpTypeRuntimeArray"; case Op::OpTypeStruct: return "OpTypeStruct"; case Op::OpTypeOpaque: return "OpTypeOpaque"; case Op::OpTypePointer: return "OpTypePointer"; case Op::OpTypeFunction: return "OpTypeFunction"; case Op::OpTypeEvent: return "OpTypeEvent"; case Op::OpTypeDeviceEvent: return "OpTypeDeviceEvent"; case Op::OpTypeReserveId: return "OpTypeReserveId"; case Op::OpTypeQueue: return "OpTypeQueue"; case Op::OpTypePipe: return "OpTypePipe"; case Op::OpTypeForwardPointer: return "OpTypeForwardPointer"; case Op::OpConstantTrue: return "OpConstantTrue"; case Op::OpConstantFalse: return "OpConstantFalse"; case Op::OpConstant: return "OpConstant"; case Op::OpConstantComposite: return "OpConstantComposite"; case Op::OpConstantSampler: return "OpConstantSampler"; case Op::OpConstantNull: return "OpConstantNull"; case Op::OpSpecConstantTrue: return "OpSpecConstantTrue"; case Op::OpSpecConstantFalse: return "OpSpecConstantFalse"; case Op::OpSpecConstant: return "OpSpecConstant"; case Op::OpSpecConstantComposite: return "OpSpecConstantComposite"; case Op::OpSpecConstantOp: return "OpSpecConstantOp"; case Op::OpFunction: return "OpFunction"; case Op::OpFunctionParameter: return "OpFunctionParameter"; case Op::OpFunctionEnd: return "OpFunctionEnd"; case Op::OpFunctionCall: return "OpFunctionCall"; case Op::OpVariable: return "OpVariable"; case Op::OpImageTexelPointer: return "OpImageTexelPointer"; case Op::OpLoad: return "OpLoad"; case Op::OpStore: return "OpStore"; case Op::OpCopyMemory: return "OpCopyMemory"; case Op::OpCopyMemorySized: return "OpCopyMemorySized"; case Op::OpAccessChain: return "OpAccessChain"; case Op::OpInBoundsAccessChain: return "OpInBoundsAccessChain"; case Op::OpPtrAccessChain: return "OpPtrAccessChain"; case Op::OpArrayLength: return "OpArrayLength"; case Op::OpGenericPtrMemSemantics: return "OpGenericPtrMemSemantics"; case Op::OpInBoundsPtrAccessChain: return "OpInBoundsPtrAccessChain"; case Op::OpDecorate: return "OpDecorate"; case Op::OpMemberDecorate: return "OpMemberDecorate"; case Op::OpDecorationGroup: return "OpDecorationGroup"; case Op::OpGroupDecorate: return "OpGroupDecorate"; case Op::OpGroupMemberDecorate: return "OpGroupMemberDecorate"; case Op::OpVectorExtractDynamic: return "OpVectorExtractDynamic"; case Op::OpVectorInsertDynamic: return "OpVectorInsertDynamic"; case Op::OpVectorShuffle: return "OpVectorShuffle"; case Op::OpCompositeConstruct: return "OpCompositeConstruct"; case Op::OpCompositeExtract: return "OpCompositeExtract"; case Op::OpCompositeInsert: return "OpCompositeInsert"; case Op::OpCopyObject: return "OpCopyObject"; case Op::OpTranspose: return "OpTranspose"; case Op::OpSampledImage: return "OpSampledImage"; case Op::OpImageSampleImplicitLod: return "OpImageSampleImplicitLod"; case Op::OpImageSampleExplicitLod: return "OpImageSampleExplicitLod"; case Op::OpImageSampleDrefImplicitLod: return "OpImageSampleDrefImplicitLod"; case Op::OpImageSampleDrefExplicitLod: return "OpImageSampleDrefExplicitLod"; case Op::OpImageSampleProjImplicitLod: return "OpImageSampleProjImplicitLod"; case Op::OpImageSampleProjExplicitLod: return "OpImageSampleProjExplicitLod"; case Op::OpImageSampleProjDrefImplicitLod: return "OpImageSampleProjDrefImplicitLod"; case Op::OpImageSampleProjDrefExplicitLod: return "OpImageSampleProjDrefExplicitLod"; case Op::OpImageFetch: return "OpImageFetch"; case Op::OpImageGather: return "OpImageGather"; case Op::OpImageDrefGather: return "OpImageDrefGather"; case Op::OpImageRead: return "OpImageRead"; case Op::OpImageWrite: return "OpImageWrite"; case Op::OpImage: return "OpImage"; case Op::OpImageQueryFormat: return "OpImageQueryFormat"; case Op::OpImageQueryOrder: return "OpImageQueryOrder"; case Op::OpImageQuerySizeLod: return "OpImageQuerySizeLod"; case Op::OpImageQuerySize: return "OpImageQuerySize"; case Op::OpImageQueryLod: return "OpImageQueryLod"; case Op::OpImageQueryLevels: return "OpImageQueryLevels"; case Op::OpImageQuerySamples: return "OpImageQuerySamples"; case Op::OpConvertFToU: return "OpConvertFToU"; case Op::OpConvertFToS: return "OpConvertFToS"; case Op::OpConvertSToF: return "OpConvertSToF"; case Op::OpConvertUToF: return "OpConvertUToF"; case Op::OpUConvert: return "OpUConvert"; case Op::OpSConvert: return "OpSConvert"; case Op::OpFConvert: return "OpFConvert"; case Op::OpQuantizeToF16: return "OpQuantizeToF16"; case Op::OpConvertPtrToU: return "OpConvertPtrToU"; case Op::OpSatConvertSToU: return "OpSatConvertSToU"; case Op::OpSatConvertUToS: return "OpSatConvertUToS"; case Op::OpConvertUToPtr: return "OpConvertUToPtr"; case Op::OpPtrCastToGeneric: return "OpPtrCastToGeneric"; case Op::OpGenericCastToPtr: return "OpGenericCastToPtr"; case Op::OpGenericCastToPtrExplicit: return "OpGenericCastToPtrExplicit"; case Op::OpBitcast: return "OpBitcast"; case Op::OpSNegate: return "OpSNegate"; case Op::OpFNegate: return "OpFNegate"; case Op::OpIAdd: return "OpIAdd"; case Op::OpFAdd: return "OpFAdd"; case Op::OpISub: return "OpISub"; case Op::OpFSub: return "OpFSub"; case Op::OpIMul: return "OpIMul"; case Op::OpFMul: return "OpFMul"; case Op::OpUDiv: return "OpUDiv"; case Op::OpSDiv: return "OpSDiv"; case Op::OpFDiv: return "OpFDiv"; case Op::OpUMod: return "OpUMod"; case Op::OpSRem: return "OpSRem"; case Op::OpSMod: return "OpSMod"; case Op::OpFRem: return "OpFRem"; case Op::OpFMod: return "OpFMod"; case Op::OpVectorTimesScalar: return "OpVectorTimesScalar"; case Op::OpMatrixTimesScalar: return "OpMatrixTimesScalar"; case Op::OpVectorTimesMatrix: return "OpVectorTimesMatrix"; case Op::OpMatrixTimesVector: return "OpMatrixTimesVector"; case Op::OpMatrixTimesMatrix: return "OpMatrixTimesMatrix"; case Op::OpOuterProduct: return "OpOuterProduct"; case Op::OpDot: return "OpDot"; case Op::OpIAddCarry: return "OpIAddCarry"; case Op::OpISubBorrow: return "OpISubBorrow"; case Op::OpUMulExtended: return "OpUMulExtended"; case Op::OpSMulExtended: return "OpSMulExtended"; case Op::OpAny: return "OpAny"; case Op::OpAll: return "OpAll"; case Op::OpIsNan: return "OpIsNan"; case Op::OpIsInf: return "OpIsInf"; case Op::OpIsFinite: return "OpIsFinite"; case Op::OpIsNormal: return "OpIsNormal"; case Op::OpSignBitSet: return "OpSignBitSet"; case Op::OpLessOrGreater: return "OpLessOrGreater"; case Op::OpOrdered: return "OpOrdered"; case Op::OpUnordered: return "OpUnordered"; case Op::OpLogicalEqual: return "OpLogicalEqual"; case Op::OpLogicalNotEqual: return "OpLogicalNotEqual"; case Op::OpLogicalOr: return "OpLogicalOr"; case Op::OpLogicalAnd: return "OpLogicalAnd"; case Op::OpLogicalNot: return "OpLogicalNot"; case Op::OpSelect: return "OpSelect"; case Op::OpIEqual: return "OpIEqual"; case Op::OpINotEqual: return "OpINotEqual"; case Op::OpUGreaterThan: return "OpUGreaterThan"; case Op::OpSGreaterThan: return "OpSGreaterThan"; case Op::OpUGreaterThanEqual: return "OpUGreaterThanEqual"; case Op::OpSGreaterThanEqual: return "OpSGreaterThanEqual"; case Op::OpULessThan: return "OpULessThan"; case Op::OpSLessThan: return "OpSLessThan"; case Op::OpULessThanEqual: return "OpULessThanEqual"; case Op::OpSLessThanEqual: return "OpSLessThanEqual"; case Op::OpFOrdEqual: return "OpFOrdEqual"; case Op::OpFUnordEqual: return "OpFUnordEqual"; case Op::OpFOrdNotEqual: return "OpFOrdNotEqual"; case Op::OpFUnordNotEqual: return "OpFUnordNotEqual"; case Op::OpFOrdLessThan: return "OpFOrdLessThan"; case Op::OpFUnordLessThan: return "OpFUnordLessThan"; case Op::OpFOrdGreaterThan: return "OpFOrdGreaterThan"; case Op::OpFUnordGreaterThan: return "OpFUnordGreaterThan"; case Op::OpFOrdLessThanEqual: return "OpFOrdLessThanEqual"; case Op::OpFUnordLessThanEqual: return "OpFUnordLessThanEqual"; case Op::OpFOrdGreaterThanEqual: return "OpFOrdGreaterThanEqual"; case Op::OpFUnordGreaterThanEqual: return "OpFUnordGreaterThanEqual"; case Op::OpShiftRightLogical: return "OpShiftRightLogical"; case Op::OpShiftRightArithmetic: return "OpShiftRightArithmetic"; case Op::OpShiftLeftLogical: return "OpShiftLeftLogical"; case Op::OpBitwiseOr: return "OpBitwiseOr"; case Op::OpBitwiseXor: return "OpBitwiseXor"; case Op::OpBitwiseAnd: return "OpBitwiseAnd"; case Op::OpNot: return "OpNot"; case Op::OpBitFieldInsert: return "OpBitFieldInsert"; case Op::OpBitFieldSExtract: return "OpBitFieldSExtract"; case Op::OpBitFieldUExtract: return "OpBitFieldUExtract"; case Op::OpBitReverse: return "OpBitReverse"; case Op::OpBitCount: return "OpBitCount"; case Op::OpDPdx: return "OpDPdx"; case Op::OpDPdy: return "OpDPdy"; case Op::OpFwidth: return "OpFwidth"; case Op::OpDPdxFine: return "OpDPdxFine"; case Op::OpDPdyFine: return "OpDPdyFine"; case Op::OpFwidthFine: return "OpFwidthFine"; case Op::OpDPdxCoarse: return "OpDPdxCoarse"; case Op::OpDPdyCoarse: return "OpDPdyCoarse"; case Op::OpFwidthCoarse: return "OpFwidthCoarse"; case Op::OpEmitVertex: return "OpEmitVertex"; case Op::OpEndPrimitive: return "OpEndPrimitive"; case Op::OpEmitStreamVertex: return "OpEmitStreamVertex"; case Op::OpEndStreamPrimitive: return "OpEndStreamPrimitive"; case Op::OpControlBarrier: return "OpControlBarrier"; case Op::OpMemoryBarrier: return "OpMemoryBarrier"; case Op::OpAtomicLoad: return "OpAtomicLoad"; case Op::OpAtomicStore: return "OpAtomicStore"; case Op::OpAtomicExchange: return "OpAtomicExchange"; case Op::OpAtomicCompareExchange: return "OpAtomicCompareExchange"; case Op::OpAtomicCompareExchangeWeak: return "OpAtomicCompareExchangeWeak"; case Op::OpAtomicIIncrement: return "OpAtomicIIncrement"; case Op::OpAtomicIDecrement: return "OpAtomicIDecrement"; case Op::OpAtomicIAdd: return "OpAtomicIAdd"; case Op::OpAtomicISub: return "OpAtomicISub"; case Op::OpAtomicSMin: return "OpAtomicSMin"; case Op::OpAtomicUMin: return "OpAtomicUMin"; case Op::OpAtomicSMax: return "OpAtomicSMax"; case Op::OpAtomicUMax: return "OpAtomicUMax"; case Op::OpAtomicAnd: return "OpAtomicAnd"; case Op::OpAtomicOr: return "OpAtomicOr"; case Op::OpAtomicXor: return "OpAtomicXor"; case Op::OpPhi: return "OpPhi"; case Op::OpLoopMerge: return "OpLoopMerge"; case Op::OpSelectionMerge: return "OpSelectionMerge"; case Op::OpLabel: return "OpLabel"; case Op::OpBranch: return "OpBranch"; case Op::OpBranchConditional: return "OpBranchConditional"; case Op::OpSwitch: return "OpSwitch"; case Op::OpKill: return "OpKill"; case Op::OpReturn: return "OpReturn"; case Op::OpReturnValue: return "OpReturnValue"; case Op::OpUnreachable: return "OpUnreachable"; case Op::OpLifetimeStart: return "OpLifetimeStart"; case Op::OpLifetimeStop: return "OpLifetimeStop"; case Op::OpGroupAsyncCopy: return "OpGroupAsyncCopy"; case Op::OpGroupWaitEvents: return "OpGroupWaitEvents"; case Op::OpGroupAll: return "OpGroupAll"; case Op::OpGroupAny: return "OpGroupAny"; case Op::OpGroupBroadcast: return "OpGroupBroadcast"; case Op::OpGroupIAdd: return "OpGroupIAdd"; case Op::OpGroupFAdd: return "OpGroupFAdd"; case Op::OpGroupFMin: return "OpGroupFMin"; case Op::OpGroupUMin: return "OpGroupUMin"; case Op::OpGroupSMin: return "OpGroupSMin"; case Op::OpGroupFMax: return "OpGroupFMax"; case Op::OpGroupUMax: return "OpGroupUMax"; case Op::OpGroupSMax: return "OpGroupSMax"; case Op::OpReadPipe: return "OpReadPipe"; case Op::OpWritePipe: return "OpWritePipe"; case Op::OpReservedReadPipe: return "OpReservedReadPipe"; case Op::OpReservedWritePipe: return "OpReservedWritePipe"; case Op::OpReserveReadPipePackets: return "OpReserveReadPipePackets"; case Op::OpReserveWritePipePackets: return "OpReserveWritePipePackets"; case Op::OpCommitReadPipe: return "OpCommitReadPipe"; case Op::OpCommitWritePipe: return "OpCommitWritePipe"; case Op::OpIsValidReserveId: return "OpIsValidReserveId"; case Op::OpGetNumPipePackets: return "OpGetNumPipePackets"; case Op::OpGetMaxPipePackets: return "OpGetMaxPipePackets"; case Op::OpGroupReserveReadPipePackets: return "OpGroupReserveReadPipePackets"; case Op::OpGroupReserveWritePipePackets: return "OpGroupReserveWritePipePackets"; case Op::OpGroupCommitReadPipe: return "OpGroupCommitReadPipe"; case Op::OpGroupCommitWritePipe: return "OpGroupCommitWritePipe"; case Op::OpEnqueueMarker: return "OpEnqueueMarker"; case Op::OpEnqueueKernel: return "OpEnqueueKernel"; case Op::OpGetKernelNDrangeSubGroupCount: return "OpGetKernelNDrangeSubGroupCount"; case Op::OpGetKernelNDrangeMaxSubGroupSize: return "OpGetKernelNDrangeMaxSubGroupSize"; case Op::OpGetKernelWorkGroupSize: return "OpGetKernelWorkGroupSize"; case Op::OpGetKernelPreferredWorkGroupSizeMultiple: return "OpGetKernelPreferredWorkGroupSizeMultiple"; case Op::OpRetainEvent: return "OpRetainEvent"; case Op::OpReleaseEvent: return "OpReleaseEvent"; case Op::OpCreateUserEvent: return "OpCreateUserEvent"; case Op::OpIsValidEvent: return "OpIsValidEvent"; case Op::OpSetUserEventStatus: return "OpSetUserEventStatus"; case Op::OpCaptureEventProfilingInfo: return "OpCaptureEventProfilingInfo"; case Op::OpGetDefaultQueue: return "OpGetDefaultQueue"; case Op::OpBuildNDRange: return "OpBuildNDRange"; case Op::OpImageSparseSampleImplicitLod: return "OpImageSparseSampleImplicitLod"; case Op::OpImageSparseSampleExplicitLod: return "OpImageSparseSampleExplicitLod"; case Op::OpImageSparseSampleDrefImplicitLod: return "OpImageSparseSampleDrefImplicitLod"; case Op::OpImageSparseSampleDrefExplicitLod: return "OpImageSparseSampleDrefExplicitLod"; case Op::OpImageSparseSampleProjImplicitLod: return "OpImageSparseSampleProjImplicitLod"; case Op::OpImageSparseSampleProjExplicitLod: return "OpImageSparseSampleProjExplicitLod"; case Op::OpImageSparseSampleProjDrefImplicitLod: return "OpImageSparseSampleProjDrefImplicitLod"; case Op::OpImageSparseSampleProjDrefExplicitLod: return "OpImageSparseSampleProjDrefExplicitLod"; case Op::OpImageSparseFetch: return "OpImageSparseFetch"; case Op::OpImageSparseGather: return "OpImageSparseGather"; case Op::OpImageSparseDrefGather: return "OpImageSparseDrefGather"; case Op::OpImageSparseTexelsResident: return "OpImageSparseTexelsResident"; case Op::OpNoLine: return "OpNoLine"; case Op::OpAtomicFlagTestAndSet: return "OpAtomicFlagTestAndSet"; case Op::OpAtomicFlagClear: return "OpAtomicFlagClear"; case Op::OpImageSparseRead: return "OpImageSparseRead"; case Op::OpSizeOf: return "OpSizeOf"; case Op::OpTypePipeStorage: return "OpTypePipeStorage"; case Op::OpConstantPipeStorage: return "OpConstantPipeStorage"; case Op::OpCreatePipeFromPipeStorage: return "OpCreatePipeFromPipeStorage"; case Op::OpGetKernelLocalSizeForSubgroupCount: return "OpGetKernelLocalSizeForSubgroupCount"; case Op::OpGetKernelMaxNumSubgroups: return "OpGetKernelMaxNumSubgroups"; case Op::OpTypeNamedBarrier: return "OpTypeNamedBarrier"; case Op::OpNamedBarrierInitialize: return "OpNamedBarrierInitialize"; case Op::OpMemoryNamedBarrier: return "OpMemoryNamedBarrier"; case Op::OpModuleProcessed: return "OpModuleProcessed"; case Op::OpExecutionModeId: return "OpExecutionModeId"; case Op::OpDecorateId: return "OpDecorateId"; case Op::OpGroupNonUniformElect: return "OpGroupNonUniformElect"; case Op::OpGroupNonUniformAll: return "OpGroupNonUniformAll"; case Op::OpGroupNonUniformAny: return "OpGroupNonUniformAny"; case Op::OpGroupNonUniformAllEqual: return "OpGroupNonUniformAllEqual"; case Op::OpGroupNonUniformBroadcast: return "OpGroupNonUniformBroadcast"; case Op::OpGroupNonUniformBroadcastFirst: return "OpGroupNonUniformBroadcastFirst"; case Op::OpGroupNonUniformBallot: return "OpGroupNonUniformBallot"; case Op::OpGroupNonUniformInverseBallot: return "OpGroupNonUniformInverseBallot"; case Op::OpGroupNonUniformBallotBitExtract: return "OpGroupNonUniformBallotBitExtract"; case Op::OpGroupNonUniformBallotBitCount: return "OpGroupNonUniformBallotBitCount"; case Op::OpGroupNonUniformBallotFindLSB: return "OpGroupNonUniformBallotFindLSB"; case Op::OpGroupNonUniformBallotFindMSB: return "OpGroupNonUniformBallotFindMSB"; case Op::OpGroupNonUniformShuffle: return "OpGroupNonUniformShuffle"; case Op::OpGroupNonUniformShuffleXor: return "OpGroupNonUniformShuffleXor"; case Op::OpGroupNonUniformShuffleUp: return "OpGroupNonUniformShuffleUp"; case Op::OpGroupNonUniformShuffleDown: return "OpGroupNonUniformShuffleDown"; case Op::OpGroupNonUniformIAdd: return "OpGroupNonUniformIAdd"; case Op::OpGroupNonUniformFAdd: return "OpGroupNonUniformFAdd"; case Op::OpGroupNonUniformIMul: return "OpGroupNonUniformIMul"; case Op::OpGroupNonUniformFMul: return "OpGroupNonUniformFMul"; case Op::OpGroupNonUniformSMin: return "OpGroupNonUniformSMin"; case Op::OpGroupNonUniformUMin: return "OpGroupNonUniformUMin"; case Op::OpGroupNonUniformFMin: return "OpGroupNonUniformFMin"; case Op::OpGroupNonUniformSMax: return "OpGroupNonUniformSMax"; case Op::OpGroupNonUniformUMax: return "OpGroupNonUniformUMax"; case Op::OpGroupNonUniformFMax: return "OpGroupNonUniformFMax"; case Op::OpGroupNonUniformBitwiseAnd: return "OpGroupNonUniformBitwiseAnd"; case Op::OpGroupNonUniformBitwiseOr: return "OpGroupNonUniformBitwiseOr"; case Op::OpGroupNonUniformBitwiseXor: return "OpGroupNonUniformBitwiseXor"; case Op::OpGroupNonUniformLogicalAnd: return "OpGroupNonUniformLogicalAnd"; case Op::OpGroupNonUniformLogicalOr: return "OpGroupNonUniformLogicalOr"; case Op::OpGroupNonUniformLogicalXor: return "OpGroupNonUniformLogicalXor"; case Op::OpGroupNonUniformQuadBroadcast: return "OpGroupNonUniformQuadBroadcast"; case Op::OpGroupNonUniformQuadSwap: return "OpGroupNonUniformQuadSwap"; case Op::OpCopyLogical: return "OpCopyLogical"; case Op::OpPtrEqual: return "OpPtrEqual"; case Op::OpPtrNotEqual: return "OpPtrNotEqual"; case Op::OpPtrDiff: return "OpPtrDiff"; case Op::OpColorAttachmentReadEXT: return "OpColorAttachmentReadEXT"; case Op::OpDepthAttachmentReadEXT: return "OpDepthAttachmentReadEXT"; case Op::OpStencilAttachmentReadEXT: return "OpStencilAttachmentReadEXT"; case Op::OpTerminateInvocation: return "OpTerminateInvocation"; case Op::OpTypeUntypedPointerKHR: return "OpTypeUntypedPointerKHR"; case Op::OpUntypedVariableKHR: return "OpUntypedVariableKHR"; case Op::OpUntypedAccessChainKHR: return "OpUntypedAccessChainKHR"; case Op::OpUntypedInBoundsAccessChainKHR: return "OpUntypedInBoundsAccessChainKHR"; case Op::OpSubgroupBallotKHR: return "OpSubgroupBallotKHR"; case Op::OpSubgroupFirstInvocationKHR: return "OpSubgroupFirstInvocationKHR"; case Op::OpUntypedPtrAccessChainKHR: return "OpUntypedPtrAccessChainKHR"; case Op::OpUntypedInBoundsPtrAccessChainKHR: return "OpUntypedInBoundsPtrAccessChainKHR"; case Op::OpUntypedArrayLengthKHR: return "OpUntypedArrayLengthKHR"; case Op::OpUntypedPrefetchKHR: return "OpUntypedPrefetchKHR"; case Op::OpSubgroupAllKHR: return "OpSubgroupAllKHR"; case Op::OpSubgroupAnyKHR: return "OpSubgroupAnyKHR"; case Op::OpSubgroupAllEqualKHR: return "OpSubgroupAllEqualKHR"; case Op::OpGroupNonUniformRotateKHR: return "OpGroupNonUniformRotateKHR"; case Op::OpSubgroupReadInvocationKHR: return "OpSubgroupReadInvocationKHR"; case Op::OpExtInstWithForwardRefsKHR: return "OpExtInstWithForwardRefsKHR"; case Op::OpTraceRayKHR: return "OpTraceRayKHR"; case Op::OpExecuteCallableKHR: return "OpExecuteCallableKHR"; case Op::OpConvertUToAccelerationStructureKHR: return "OpConvertUToAccelerationStructureKHR"; case Op::OpIgnoreIntersectionKHR: return "OpIgnoreIntersectionKHR"; case Op::OpTerminateRayKHR: return "OpTerminateRayKHR"; case Op::OpSDot: return "OpSDot"; case Op::OpUDot: return "OpUDot"; case Op::OpSUDot: return "OpSUDot"; case Op::OpSDotAccSat: return "OpSDotAccSat"; case Op::OpUDotAccSat: return "OpUDotAccSat"; case Op::OpSUDotAccSat: return "OpSUDotAccSat"; case Op::OpTypeCooperativeMatrixKHR: return "OpTypeCooperativeMatrixKHR"; case Op::OpCooperativeMatrixLoadKHR: return "OpCooperativeMatrixLoadKHR"; case Op::OpCooperativeMatrixStoreKHR: return "OpCooperativeMatrixStoreKHR"; case Op::OpCooperativeMatrixMulAddKHR: return "OpCooperativeMatrixMulAddKHR"; case Op::OpCooperativeMatrixLengthKHR: return "OpCooperativeMatrixLengthKHR"; case Op::OpConstantCompositeReplicateEXT: return "OpConstantCompositeReplicateEXT"; case Op::OpSpecConstantCompositeReplicateEXT: return "OpSpecConstantCompositeReplicateEXT"; case Op::OpCompositeConstructReplicateEXT: return "OpCompositeConstructReplicateEXT"; case Op::OpTypeRayQueryKHR: return "OpTypeRayQueryKHR"; case Op::OpRayQueryInitializeKHR: return "OpRayQueryInitializeKHR"; case Op::OpRayQueryTerminateKHR: return "OpRayQueryTerminateKHR"; case Op::OpRayQueryGenerateIntersectionKHR: return "OpRayQueryGenerateIntersectionKHR"; case Op::OpRayQueryConfirmIntersectionKHR: return "OpRayQueryConfirmIntersectionKHR"; case Op::OpRayQueryProceedKHR: return "OpRayQueryProceedKHR"; case Op::OpRayQueryGetIntersectionTypeKHR: return "OpRayQueryGetIntersectionTypeKHR"; case Op::OpImageSampleWeightedQCOM: return "OpImageSampleWeightedQCOM"; case Op::OpImageBoxFilterQCOM: return "OpImageBoxFilterQCOM"; case Op::OpImageBlockMatchSSDQCOM: return "OpImageBlockMatchSSDQCOM"; case Op::OpImageBlockMatchSADQCOM: return "OpImageBlockMatchSADQCOM"; case Op::OpImageBlockMatchWindowSSDQCOM: return "OpImageBlockMatchWindowSSDQCOM"; case Op::OpImageBlockMatchWindowSADQCOM: return "OpImageBlockMatchWindowSADQCOM"; case Op::OpImageBlockMatchGatherSSDQCOM: return "OpImageBlockMatchGatherSSDQCOM"; case Op::OpImageBlockMatchGatherSADQCOM: return "OpImageBlockMatchGatherSADQCOM"; case Op::OpGroupIAddNonUniformAMD: return "OpGroupIAddNonUniformAMD"; case Op::OpGroupFAddNonUniformAMD: return "OpGroupFAddNonUniformAMD"; case Op::OpGroupFMinNonUniformAMD: return "OpGroupFMinNonUniformAMD"; case Op::OpGroupUMinNonUniformAMD: return "OpGroupUMinNonUniformAMD"; case Op::OpGroupSMinNonUniformAMD: return "OpGroupSMinNonUniformAMD"; case Op::OpGroupFMaxNonUniformAMD: return "OpGroupFMaxNonUniformAMD"; case Op::OpGroupUMaxNonUniformAMD: return "OpGroupUMaxNonUniformAMD"; case Op::OpGroupSMaxNonUniformAMD: return "OpGroupSMaxNonUniformAMD"; case Op::OpFragmentMaskFetchAMD: return "OpFragmentMaskFetchAMD"; case Op::OpFragmentFetchAMD: return "OpFragmentFetchAMD"; case Op::OpReadClockKHR: return "OpReadClockKHR"; case Op::OpAllocateNodePayloadsAMDX: return "OpAllocateNodePayloadsAMDX"; case Op::OpEnqueueNodePayloadsAMDX: return "OpEnqueueNodePayloadsAMDX"; case Op::OpTypeNodePayloadArrayAMDX: return "OpTypeNodePayloadArrayAMDX"; case Op::OpFinishWritingNodePayloadAMDX: return "OpFinishWritingNodePayloadAMDX"; case Op::OpNodePayloadArrayLengthAMDX: return "OpNodePayloadArrayLengthAMDX"; case Op::OpIsNodePayloadValidAMDX: return "OpIsNodePayloadValidAMDX"; case Op::OpConstantStringAMDX: return "OpConstantStringAMDX"; case Op::OpSpecConstantStringAMDX: return "OpSpecConstantStringAMDX"; case Op::OpGroupNonUniformQuadAllKHR: return "OpGroupNonUniformQuadAllKHR"; case Op::OpGroupNonUniformQuadAnyKHR: return "OpGroupNonUniformQuadAnyKHR"; case Op::OpHitObjectRecordHitMotionNV: return "OpHitObjectRecordHitMotionNV"; case Op::OpHitObjectRecordHitWithIndexMotionNV: return "OpHitObjectRecordHitWithIndexMotionNV"; case Op::OpHitObjectRecordMissMotionNV: return "OpHitObjectRecordMissMotionNV"; case Op::OpHitObjectGetWorldToObjectNV: return "OpHitObjectGetWorldToObjectNV"; case Op::OpHitObjectGetObjectToWorldNV: return "OpHitObjectGetObjectToWorldNV"; case Op::OpHitObjectGetObjectRayDirectionNV: return "OpHitObjectGetObjectRayDirectionNV"; case Op::OpHitObjectGetObjectRayOriginNV: return "OpHitObjectGetObjectRayOriginNV"; case Op::OpHitObjectTraceRayMotionNV: return "OpHitObjectTraceRayMotionNV"; case Op::OpHitObjectGetShaderRecordBufferHandleNV: return "OpHitObjectGetShaderRecordBufferHandleNV"; case Op::OpHitObjectGetShaderBindingTableRecordIndexNV: return "OpHitObjectGetShaderBindingTableRecordIndexNV"; case Op::OpHitObjectRecordEmptyNV: return "OpHitObjectRecordEmptyNV"; case Op::OpHitObjectTraceRayNV: return "OpHitObjectTraceRayNV"; case Op::OpHitObjectRecordHitNV: return "OpHitObjectRecordHitNV"; case Op::OpHitObjectRecordHitWithIndexNV: return "OpHitObjectRecordHitWithIndexNV"; case Op::OpHitObjectRecordMissNV: return "OpHitObjectRecordMissNV"; case Op::OpHitObjectExecuteShaderNV: return "OpHitObjectExecuteShaderNV"; case Op::OpHitObjectGetCurrentTimeNV: return "OpHitObjectGetCurrentTimeNV"; case Op::OpHitObjectGetAttributesNV: return "OpHitObjectGetAttributesNV"; case Op::OpHitObjectGetHitKindNV: return "OpHitObjectGetHitKindNV"; case Op::OpHitObjectGetPrimitiveIndexNV: return "OpHitObjectGetPrimitiveIndexNV"; case Op::OpHitObjectGetGeometryIndexNV: return "OpHitObjectGetGeometryIndexNV"; case Op::OpHitObjectGetInstanceIdNV: return "OpHitObjectGetInstanceIdNV"; case Op::OpHitObjectGetInstanceCustomIndexNV: return "OpHitObjectGetInstanceCustomIndexNV"; case Op::OpHitObjectGetWorldRayDirectionNV: return "OpHitObjectGetWorldRayDirectionNV"; case Op::OpHitObjectGetWorldRayOriginNV: return "OpHitObjectGetWorldRayOriginNV"; case Op::OpHitObjectGetRayTMaxNV: return "OpHitObjectGetRayTMaxNV"; case Op::OpHitObjectGetRayTMinNV: return "OpHitObjectGetRayTMinNV"; case Op::OpHitObjectIsEmptyNV: return "OpHitObjectIsEmptyNV"; case Op::OpHitObjectIsHitNV: return "OpHitObjectIsHitNV"; case Op::OpHitObjectIsMissNV: return "OpHitObjectIsMissNV"; case Op::OpReorderThreadWithHitObjectNV: return "OpReorderThreadWithHitObjectNV"; case Op::OpReorderThreadWithHintNV: return "OpReorderThreadWithHintNV"; case Op::OpTypeHitObjectNV: return "OpTypeHitObjectNV"; case Op::OpImageSampleFootprintNV: return "OpImageSampleFootprintNV"; case Op::OpTypeCooperativeVectorNV: return "OpTypeCooperativeVectorNV"; case Op::OpCooperativeVectorMatrixMulNV: return "OpCooperativeVectorMatrixMulNV"; case Op::OpCooperativeVectorOuterProductAccumulateNV: return "OpCooperativeVectorOuterProductAccumulateNV"; case Op::OpCooperativeVectorReduceSumAccumulateNV: return "OpCooperativeVectorReduceSumAccumulateNV"; case Op::OpCooperativeVectorMatrixMulAddNV: return "OpCooperativeVectorMatrixMulAddNV"; case Op::OpCooperativeMatrixConvertNV: return "OpCooperativeMatrixConvertNV"; case Op::OpEmitMeshTasksEXT: return "OpEmitMeshTasksEXT"; case Op::OpSetMeshOutputsEXT: return "OpSetMeshOutputsEXT"; case Op::OpGroupNonUniformPartitionNV: return "OpGroupNonUniformPartitionNV"; case Op::OpWritePackedPrimitiveIndices4x8NV: return "OpWritePackedPrimitiveIndices4x8NV"; case Op::OpFetchMicroTriangleVertexPositionNV: return "OpFetchMicroTriangleVertexPositionNV"; case Op::OpFetchMicroTriangleVertexBarycentricNV: return "OpFetchMicroTriangleVertexBarycentricNV"; case Op::OpCooperativeVectorLoadNV: return "OpCooperativeVectorLoadNV"; case Op::OpCooperativeVectorStoreNV: return "OpCooperativeVectorStoreNV"; case Op::OpReportIntersectionKHR: return "OpReportIntersectionKHR"; case Op::OpIgnoreIntersectionNV: return "OpIgnoreIntersectionNV"; case Op::OpTerminateRayNV: return "OpTerminateRayNV"; case Op::OpTraceNV: return "OpTraceNV"; case Op::OpTraceMotionNV: return "OpTraceMotionNV"; case Op::OpTraceRayMotionNV: return "OpTraceRayMotionNV"; case Op::OpRayQueryGetIntersectionTriangleVertexPositionsKHR: return "OpRayQueryGetIntersectionTriangleVertexPositionsKHR"; case Op::OpTypeAccelerationStructureKHR: return "OpTypeAccelerationStructureKHR"; case Op::OpExecuteCallableNV: return "OpExecuteCallableNV"; case Op::OpRayQueryGetClusterIdNV: return "OpRayQueryGetClusterIdNV"; case Op::OpHitObjectGetClusterIdNV: return "OpHitObjectGetClusterIdNV"; case Op::OpTypeCooperativeMatrixNV: return "OpTypeCooperativeMatrixNV"; case Op::OpCooperativeMatrixLoadNV: return "OpCooperativeMatrixLoadNV"; case Op::OpCooperativeMatrixStoreNV: return "OpCooperativeMatrixStoreNV"; case Op::OpCooperativeMatrixMulAddNV: return "OpCooperativeMatrixMulAddNV"; case Op::OpCooperativeMatrixLengthNV: return "OpCooperativeMatrixLengthNV"; case Op::OpBeginInvocationInterlockEXT: return "OpBeginInvocationInterlockEXT"; case Op::OpEndInvocationInterlockEXT: return "OpEndInvocationInterlockEXT"; case Op::OpCooperativeMatrixReduceNV: return "OpCooperativeMatrixReduceNV"; case Op::OpCooperativeMatrixLoadTensorNV: return "OpCooperativeMatrixLoadTensorNV"; case Op::OpCooperativeMatrixStoreTensorNV: return "OpCooperativeMatrixStoreTensorNV"; case Op::OpCooperativeMatrixPerElementOpNV: return "OpCooperativeMatrixPerElementOpNV"; case Op::OpTypeTensorLayoutNV: return "OpTypeTensorLayoutNV"; case Op::OpTypeTensorViewNV: return "OpTypeTensorViewNV"; case Op::OpCreateTensorLayoutNV: return "OpCreateTensorLayoutNV"; case Op::OpTensorLayoutSetDimensionNV: return "OpTensorLayoutSetDimensionNV"; case Op::OpTensorLayoutSetStrideNV: return "OpTensorLayoutSetStrideNV"; case Op::OpTensorLayoutSliceNV: return "OpTensorLayoutSliceNV"; case Op::OpTensorLayoutSetClampValueNV: return "OpTensorLayoutSetClampValueNV"; case Op::OpCreateTensorViewNV: return "OpCreateTensorViewNV"; case Op::OpTensorViewSetDimensionNV: return "OpTensorViewSetDimensionNV"; case Op::OpTensorViewSetStrideNV: return "OpTensorViewSetStrideNV"; case Op::OpDemoteToHelperInvocation: return "OpDemoteToHelperInvocation"; case Op::OpIsHelperInvocationEXT: return "OpIsHelperInvocationEXT"; case Op::OpTensorViewSetClipNV: return "OpTensorViewSetClipNV"; case Op::OpTensorLayoutSetBlockSizeNV: return "OpTensorLayoutSetBlockSizeNV"; case Op::OpCooperativeMatrixTransposeNV: return "OpCooperativeMatrixTransposeNV"; case Op::OpConvertUToImageNV: return "OpConvertUToImageNV"; case Op::OpConvertUToSamplerNV: return "OpConvertUToSamplerNV"; case Op::OpConvertImageToUNV: return "OpConvertImageToUNV"; case Op::OpConvertSamplerToUNV: return "OpConvertSamplerToUNV"; case Op::OpConvertUToSampledImageNV: return "OpConvertUToSampledImageNV"; case Op::OpConvertSampledImageToUNV: return "OpConvertSampledImageToUNV"; case Op::OpSamplerImageAddressingModeNV: return "OpSamplerImageAddressingModeNV"; case Op::OpRawAccessChainNV: return "OpRawAccessChainNV"; case Op::OpRayQueryGetIntersectionSpherePositionNV: return "OpRayQueryGetIntersectionSpherePositionNV"; case Op::OpRayQueryGetIntersectionSphereRadiusNV: return "OpRayQueryGetIntersectionSphereRadiusNV"; case Op::OpRayQueryGetIntersectionLSSPositionsNV: return "OpRayQueryGetIntersectionLSSPositionsNV"; case Op::OpRayQueryGetIntersectionLSSRadiiNV: return "OpRayQueryGetIntersectionLSSRadiiNV"; case Op::OpRayQueryGetIntersectionLSSHitValueNV: return "OpRayQueryGetIntersectionLSSHitValueNV"; case Op::OpHitObjectGetSpherePositionNV: return "OpHitObjectGetSpherePositionNV"; case Op::OpHitObjectGetSphereRadiusNV: return "OpHitObjectGetSphereRadiusNV"; case Op::OpHitObjectGetLSSPositionsNV: return "OpHitObjectGetLSSPositionsNV"; case Op::OpHitObjectGetLSSRadiiNV: return "OpHitObjectGetLSSRadiiNV"; case Op::OpHitObjectIsSphereHitNV: return "OpHitObjectIsSphereHitNV"; case Op::OpHitObjectIsLSSHitNV: return "OpHitObjectIsLSSHitNV"; case Op::OpRayQueryIsSphereHitNV: return "OpRayQueryIsSphereHitNV"; case Op::OpRayQueryIsLSSHitNV: return "OpRayQueryIsLSSHitNV"; case Op::OpSubgroupShuffleINTEL: return "OpSubgroupShuffleINTEL"; case Op::OpSubgroupShuffleDownINTEL: return "OpSubgroupShuffleDownINTEL"; case Op::OpSubgroupShuffleUpINTEL: return "OpSubgroupShuffleUpINTEL"; case Op::OpSubgroupShuffleXorINTEL: return "OpSubgroupShuffleXorINTEL"; case Op::OpSubgroupBlockReadINTEL: return "OpSubgroupBlockReadINTEL"; case Op::OpSubgroupBlockWriteINTEL: return "OpSubgroupBlockWriteINTEL"; case Op::OpSubgroupImageBlockReadINTEL: return "OpSubgroupImageBlockReadINTEL"; case Op::OpSubgroupImageBlockWriteINTEL: return "OpSubgroupImageBlockWriteINTEL"; case Op::OpSubgroupImageMediaBlockReadINTEL: return "OpSubgroupImageMediaBlockReadINTEL"; case Op::OpSubgroupImageMediaBlockWriteINTEL: return "OpSubgroupImageMediaBlockWriteINTEL"; case Op::OpUCountLeadingZerosINTEL: return "OpUCountLeadingZerosINTEL"; case Op::OpUCountTrailingZerosINTEL: return "OpUCountTrailingZerosINTEL"; case Op::OpAbsISubINTEL: return "OpAbsISubINTEL"; case Op::OpAbsUSubINTEL: return "OpAbsUSubINTEL"; case Op::OpIAddSatINTEL: return "OpIAddSatINTEL"; case Op::OpUAddSatINTEL: return "OpUAddSatINTEL"; case Op::OpIAverageINTEL: return "OpIAverageINTEL"; case Op::OpUAverageINTEL: return "OpUAverageINTEL"; case Op::OpIAverageRoundedINTEL: return "OpIAverageRoundedINTEL"; case Op::OpUAverageRoundedINTEL: return "OpUAverageRoundedINTEL"; case Op::OpISubSatINTEL: return "OpISubSatINTEL"; case Op::OpUSubSatINTEL: return "OpUSubSatINTEL"; case Op::OpIMul32x16INTEL: return "OpIMul32x16INTEL"; case Op::OpUMul32x16INTEL: return "OpUMul32x16INTEL"; case Op::OpConstantFunctionPointerINTEL: return "OpConstantFunctionPointerINTEL"; case Op::OpFunctionPointerCallINTEL: return "OpFunctionPointerCallINTEL"; case Op::OpAsmTargetINTEL: return "OpAsmTargetINTEL"; case Op::OpAsmINTEL: return "OpAsmINTEL"; case Op::OpAsmCallINTEL: return "OpAsmCallINTEL"; case Op::OpAtomicFMinEXT: return "OpAtomicFMinEXT"; case Op::OpAtomicFMaxEXT: return "OpAtomicFMaxEXT"; case Op::OpAssumeTrueKHR: return "OpAssumeTrueKHR"; case Op::OpExpectKHR: return "OpExpectKHR"; case Op::OpDecorateString: return "OpDecorateString"; case Op::OpMemberDecorateString: return "OpMemberDecorateString"; case Op::OpVmeImageINTEL: return "OpVmeImageINTEL"; case Op::OpTypeVmeImageINTEL: return "OpTypeVmeImageINTEL"; case Op::OpTypeAvcImePayloadINTEL: return "OpTypeAvcImePayloadINTEL"; case Op::OpTypeAvcRefPayloadINTEL: return "OpTypeAvcRefPayloadINTEL"; case Op::OpTypeAvcSicPayloadINTEL: return "OpTypeAvcSicPayloadINTEL"; case Op::OpTypeAvcMcePayloadINTEL: return "OpTypeAvcMcePayloadINTEL"; case Op::OpTypeAvcMceResultINTEL: return "OpTypeAvcMceResultINTEL"; case Op::OpTypeAvcImeResultINTEL: return "OpTypeAvcImeResultINTEL"; case Op::OpTypeAvcImeResultSingleReferenceStreamoutINTEL: return "OpTypeAvcImeResultSingleReferenceStreamoutINTEL"; case Op::OpTypeAvcImeResultDualReferenceStreamoutINTEL: return "OpTypeAvcImeResultDualReferenceStreamoutINTEL"; case Op::OpTypeAvcImeSingleReferenceStreaminINTEL: return "OpTypeAvcImeSingleReferenceStreaminINTEL"; case Op::OpTypeAvcImeDualReferenceStreaminINTEL: return "OpTypeAvcImeDualReferenceStreaminINTEL"; case Op::OpTypeAvcRefResultINTEL: return "OpTypeAvcRefResultINTEL"; case Op::OpTypeAvcSicResultINTEL: return "OpTypeAvcSicResultINTEL"; case Op::OpSubgroupAvcMceGetDefaultInterBaseMultiReferencePenaltyINTEL: return "OpSubgroupAvcMceGetDefaultInterBaseMultiReferencePenaltyINTEL"; case Op::OpSubgroupAvcMceSetInterBaseMultiReferencePenaltyINTEL: return "OpSubgroupAvcMceSetInterBaseMultiReferencePenaltyINTEL"; case Op::OpSubgroupAvcMceGetDefaultInterShapePenaltyINTEL: return "OpSubgroupAvcMceGetDefaultInterShapePenaltyINTEL"; case Op::OpSubgroupAvcMceSetInterShapePenaltyINTEL: return "OpSubgroupAvcMceSetInterShapePenaltyINTEL"; case Op::OpSubgroupAvcMceGetDefaultInterDirectionPenaltyINTEL: return "OpSubgroupAvcMceGetDefaultInterDirectionPenaltyINTEL"; case Op::OpSubgroupAvcMceSetInterDirectionPenaltyINTEL: return "OpSubgroupAvcMceSetInterDirectionPenaltyINTEL"; case Op::OpSubgroupAvcMceGetDefaultIntraLumaShapePenaltyINTEL: return "OpSubgroupAvcMceGetDefaultIntraLumaShapePenaltyINTEL"; case Op::OpSubgroupAvcMceGetDefaultInterMotionVectorCostTableINTEL: return "OpSubgroupAvcMceGetDefaultInterMotionVectorCostTableINTEL"; case Op::OpSubgroupAvcMceGetDefaultHighPenaltyCostTableINTEL: return "OpSubgroupAvcMceGetDefaultHighPenaltyCostTableINTEL"; case Op::OpSubgroupAvcMceGetDefaultMediumPenaltyCostTableINTEL: return "OpSubgroupAvcMceGetDefaultMediumPenaltyCostTableINTEL"; case Op::OpSubgroupAvcMceGetDefaultLowPenaltyCostTableINTEL: return "OpSubgroupAvcMceGetDefaultLowPenaltyCostTableINTEL"; case Op::OpSubgroupAvcMceSetMotionVectorCostFunctionINTEL: return "OpSubgroupAvcMceSetMotionVectorCostFunctionINTEL"; case Op::OpSubgroupAvcMceGetDefaultIntraLumaModePenaltyINTEL: return "OpSubgroupAvcMceGetDefaultIntraLumaModePenaltyINTEL"; case Op::OpSubgroupAvcMceGetDefaultNonDcLumaIntraPenaltyINTEL: return "OpSubgroupAvcMceGetDefaultNonDcLumaIntraPenaltyINTEL"; case Op::OpSubgroupAvcMceGetDefaultIntraChromaModeBasePenaltyINTEL: return "OpSubgroupAvcMceGetDefaultIntraChromaModeBasePenaltyINTEL"; case Op::OpSubgroupAvcMceSetAcOnlyHaarINTEL: return "OpSubgroupAvcMceSetAcOnlyHaarINTEL"; case Op::OpSubgroupAvcMceSetSourceInterlacedFieldPolarityINTEL: return "OpSubgroupAvcMceSetSourceInterlacedFieldPolarityINTEL"; case Op::OpSubgroupAvcMceSetSingleReferenceInterlacedFieldPolarityINTEL: return "OpSubgroupAvcMceSetSingleReferenceInterlacedFieldPolarityINTEL"; case Op::OpSubgroupAvcMceSetDualReferenceInterlacedFieldPolaritiesINTEL: return "OpSubgroupAvcMceSetDualReferenceInterlacedFieldPolaritiesINTEL"; case Op::OpSubgroupAvcMceConvertToImePayloadINTEL: return "OpSubgroupAvcMceConvertToImePayloadINTEL"; case Op::OpSubgroupAvcMceConvertToImeResultINTEL: return "OpSubgroupAvcMceConvertToImeResultINTEL"; case Op::OpSubgroupAvcMceConvertToRefPayloadINTEL: return "OpSubgroupAvcMceConvertToRefPayloadINTEL"; case Op::OpSubgroupAvcMceConvertToRefResultINTEL: return "OpSubgroupAvcMceConvertToRefResultINTEL"; case Op::OpSubgroupAvcMceConvertToSicPayloadINTEL: return "OpSubgroupAvcMceConvertToSicPayloadINTEL"; case Op::OpSubgroupAvcMceConvertToSicResultINTEL: return "OpSubgroupAvcMceConvertToSicResultINTEL"; case Op::OpSubgroupAvcMceGetMotionVectorsINTEL: return "OpSubgroupAvcMceGetMotionVectorsINTEL"; case Op::OpSubgroupAvcMceGetInterDistortionsINTEL: return "OpSubgroupAvcMceGetInterDistortionsINTEL"; case Op::OpSubgroupAvcMceGetBestInterDistortionsINTEL: return "OpSubgroupAvcMceGetBestInterDistortionsINTEL"; case Op::OpSubgroupAvcMceGetInterMajorShapeINTEL: return "OpSubgroupAvcMceGetInterMajorShapeINTEL"; case Op::OpSubgroupAvcMceGetInterMinorShapeINTEL: return "OpSubgroupAvcMceGetInterMinorShapeINTEL"; case Op::OpSubgroupAvcMceGetInterDirectionsINTEL: return "OpSubgroupAvcMceGetInterDirectionsINTEL"; case Op::OpSubgroupAvcMceGetInterMotionVectorCountINTEL: return "OpSubgroupAvcMceGetInterMotionVectorCountINTEL"; case Op::OpSubgroupAvcMceGetInterReferenceIdsINTEL: return "OpSubgroupAvcMceGetInterReferenceIdsINTEL"; case Op::OpSubgroupAvcMceGetInterReferenceInterlacedFieldPolaritiesINTEL: return "OpSubgroupAvcMceGetInterReferenceInterlacedFieldPolaritiesINTEL"; case Op::OpSubgroupAvcImeInitializeINTEL: return "OpSubgroupAvcImeInitializeINTEL"; case Op::OpSubgroupAvcImeSetSingleReferenceINTEL: return "OpSubgroupAvcImeSetSingleReferenceINTEL"; case Op::OpSubgroupAvcImeSetDualReferenceINTEL: return "OpSubgroupAvcImeSetDualReferenceINTEL"; case Op::OpSubgroupAvcImeRefWindowSizeINTEL: return "OpSubgroupAvcImeRefWindowSizeINTEL"; case Op::OpSubgroupAvcImeAdjustRefOffsetINTEL: return "OpSubgroupAvcImeAdjustRefOffsetINTEL"; case Op::OpSubgroupAvcImeConvertToMcePayloadINTEL: return "OpSubgroupAvcImeConvertToMcePayloadINTEL"; case Op::OpSubgroupAvcImeSetMaxMotionVectorCountINTEL: return "OpSubgroupAvcImeSetMaxMotionVectorCountINTEL"; case Op::OpSubgroupAvcImeSetUnidirectionalMixDisableINTEL: return "OpSubgroupAvcImeSetUnidirectionalMixDisableINTEL"; case Op::OpSubgroupAvcImeSetEarlySearchTerminationThresholdINTEL: return "OpSubgroupAvcImeSetEarlySearchTerminationThresholdINTEL"; case Op::OpSubgroupAvcImeSetWeightedSadINTEL: return "OpSubgroupAvcImeSetWeightedSadINTEL"; case Op::OpSubgroupAvcImeEvaluateWithSingleReferenceINTEL: return "OpSubgroupAvcImeEvaluateWithSingleReferenceINTEL"; case Op::OpSubgroupAvcImeEvaluateWithDualReferenceINTEL: return "OpSubgroupAvcImeEvaluateWithDualReferenceINTEL"; case Op::OpSubgroupAvcImeEvaluateWithSingleReferenceStreaminINTEL: return "OpSubgroupAvcImeEvaluateWithSingleReferenceStreaminINTEL"; case Op::OpSubgroupAvcImeEvaluateWithDualReferenceStreaminINTEL: return "OpSubgroupAvcImeEvaluateWithDualReferenceStreaminINTEL"; case Op::OpSubgroupAvcImeEvaluateWithSingleReferenceStreamoutINTEL: return "OpSubgroupAvcImeEvaluateWithSingleReferenceStreamoutINTEL"; case Op::OpSubgroupAvcImeEvaluateWithDualReferenceStreamoutINTEL: return "OpSubgroupAvcImeEvaluateWithDualReferenceStreamoutINTEL"; case Op::OpSubgroupAvcImeEvaluateWithSingleReferenceStreaminoutINTEL: return "OpSubgroupAvcImeEvaluateWithSingleReferenceStreaminoutINTEL"; case Op::OpSubgroupAvcImeEvaluateWithDualReferenceStreaminoutINTEL: return "OpSubgroupAvcImeEvaluateWithDualReferenceStreaminoutINTEL"; case Op::OpSubgroupAvcImeConvertToMceResultINTEL: return "OpSubgroupAvcImeConvertToMceResultINTEL"; case Op::OpSubgroupAvcImeGetSingleReferenceStreaminINTEL: return "OpSubgroupAvcImeGetSingleReferenceStreaminINTEL"; case Op::OpSubgroupAvcImeGetDualReferenceStreaminINTEL: return "OpSubgroupAvcImeGetDualReferenceStreaminINTEL"; case Op::OpSubgroupAvcImeStripSingleReferenceStreamoutINTEL: return "OpSubgroupAvcImeStripSingleReferenceStreamoutINTEL"; case Op::OpSubgroupAvcImeStripDualReferenceStreamoutINTEL: return "OpSubgroupAvcImeStripDualReferenceStreamoutINTEL"; case Op::OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeMotionVectorsINTEL: return "OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeMotionVectorsINTEL"; case Op::OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeDistortionsINTEL: return "OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeDistortionsINTEL"; case Op::OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeReferenceIdsINTEL: return "OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeReferenceIdsINTEL"; case Op::OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeMotionVectorsINTEL: return "OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeMotionVectorsINTEL"; case Op::OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeDistortionsINTEL: return "OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeDistortionsINTEL"; case Op::OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeReferenceIdsINTEL: return "OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeReferenceIdsINTEL"; case Op::OpSubgroupAvcImeGetBorderReachedINTEL: return "OpSubgroupAvcImeGetBorderReachedINTEL"; case Op::OpSubgroupAvcImeGetTruncatedSearchIndicationINTEL: return "OpSubgroupAvcImeGetTruncatedSearchIndicationINTEL"; case Op::OpSubgroupAvcImeGetUnidirectionalEarlySearchTerminationINTEL: return "OpSubgroupAvcImeGetUnidirectionalEarlySearchTerminationINTEL"; case Op::OpSubgroupAvcImeGetWeightingPatternMinimumMotionVectorINTEL: return "OpSubgroupAvcImeGetWeightingPatternMinimumMotionVectorINTEL"; case Op::OpSubgroupAvcImeGetWeightingPatternMinimumDistortionINTEL: return "OpSubgroupAvcImeGetWeightingPatternMinimumDistortionINTEL"; case Op::OpSubgroupAvcFmeInitializeINTEL: return "OpSubgroupAvcFmeInitializeINTEL"; case Op::OpSubgroupAvcBmeInitializeINTEL: return "OpSubgroupAvcBmeInitializeINTEL"; case Op::OpSubgroupAvcRefConvertToMcePayloadINTEL: return "OpSubgroupAvcRefConvertToMcePayloadINTEL"; case Op::OpSubgroupAvcRefSetBidirectionalMixDisableINTEL: return "OpSubgroupAvcRefSetBidirectionalMixDisableINTEL"; case Op::OpSubgroupAvcRefSetBilinearFilterEnableINTEL: return "OpSubgroupAvcRefSetBilinearFilterEnableINTEL"; case Op::OpSubgroupAvcRefEvaluateWithSingleReferenceINTEL: return "OpSubgroupAvcRefEvaluateWithSingleReferenceINTEL"; case Op::OpSubgroupAvcRefEvaluateWithDualReferenceINTEL: return "OpSubgroupAvcRefEvaluateWithDualReferenceINTEL"; case Op::OpSubgroupAvcRefEvaluateWithMultiReferenceINTEL: return "OpSubgroupAvcRefEvaluateWithMultiReferenceINTEL"; case Op::OpSubgroupAvcRefEvaluateWithMultiReferenceInterlacedINTEL: return "OpSubgroupAvcRefEvaluateWithMultiReferenceInterlacedINTEL"; case Op::OpSubgroupAvcRefConvertToMceResultINTEL: return "OpSubgroupAvcRefConvertToMceResultINTEL"; case Op::OpSubgroupAvcSicInitializeINTEL: return "OpSubgroupAvcSicInitializeINTEL"; case Op::OpSubgroupAvcSicConfigureSkcINTEL: return "OpSubgroupAvcSicConfigureSkcINTEL"; case Op::OpSubgroupAvcSicConfigureIpeLumaINTEL: return "OpSubgroupAvcSicConfigureIpeLumaINTEL"; case Op::OpSubgroupAvcSicConfigureIpeLumaChromaINTEL: return "OpSubgroupAvcSicConfigureIpeLumaChromaINTEL"; case Op::OpSubgroupAvcSicGetMotionVectorMaskINTEL: return "OpSubgroupAvcSicGetMotionVectorMaskINTEL"; case Op::OpSubgroupAvcSicConvertToMcePayloadINTEL: return "OpSubgroupAvcSicConvertToMcePayloadINTEL"; case Op::OpSubgroupAvcSicSetIntraLumaShapePenaltyINTEL: return "OpSubgroupAvcSicSetIntraLumaShapePenaltyINTEL"; case Op::OpSubgroupAvcSicSetIntraLumaModeCostFunctionINTEL: return "OpSubgroupAvcSicSetIntraLumaModeCostFunctionINTEL"; case Op::OpSubgroupAvcSicSetIntraChromaModeCostFunctionINTEL: return "OpSubgroupAvcSicSetIntraChromaModeCostFunctionINTEL"; case Op::OpSubgroupAvcSicSetBilinearFilterEnableINTEL: return "OpSubgroupAvcSicSetBilinearFilterEnableINTEL"; case Op::OpSubgroupAvcSicSetSkcForwardTransformEnableINTEL: return "OpSubgroupAvcSicSetSkcForwardTransformEnableINTEL"; case Op::OpSubgroupAvcSicSetBlockBasedRawSkipSadINTEL: return "OpSubgroupAvcSicSetBlockBasedRawSkipSadINTEL"; case Op::OpSubgroupAvcSicEvaluateIpeINTEL: return "OpSubgroupAvcSicEvaluateIpeINTEL"; case Op::OpSubgroupAvcSicEvaluateWithSingleReferenceINTEL: return "OpSubgroupAvcSicEvaluateWithSingleReferenceINTEL"; case Op::OpSubgroupAvcSicEvaluateWithDualReferenceINTEL: return "OpSubgroupAvcSicEvaluateWithDualReferenceINTEL"; case Op::OpSubgroupAvcSicEvaluateWithMultiReferenceINTEL: return "OpSubgroupAvcSicEvaluateWithMultiReferenceINTEL"; case Op::OpSubgroupAvcSicEvaluateWithMultiReferenceInterlacedINTEL: return "OpSubgroupAvcSicEvaluateWithMultiReferenceInterlacedINTEL"; case Op::OpSubgroupAvcSicConvertToMceResultINTEL: return "OpSubgroupAvcSicConvertToMceResultINTEL"; case Op::OpSubgroupAvcSicGetIpeLumaShapeINTEL: return "OpSubgroupAvcSicGetIpeLumaShapeINTEL"; case Op::OpSubgroupAvcSicGetBestIpeLumaDistortionINTEL: return "OpSubgroupAvcSicGetBestIpeLumaDistortionINTEL"; case Op::OpSubgroupAvcSicGetBestIpeChromaDistortionINTEL: return "OpSubgroupAvcSicGetBestIpeChromaDistortionINTEL"; case Op::OpSubgroupAvcSicGetPackedIpeLumaModesINTEL: return "OpSubgroupAvcSicGetPackedIpeLumaModesINTEL"; case Op::OpSubgroupAvcSicGetIpeChromaModeINTEL: return "OpSubgroupAvcSicGetIpeChromaModeINTEL"; case Op::OpSubgroupAvcSicGetPackedSkcLumaCountThresholdINTEL: return "OpSubgroupAvcSicGetPackedSkcLumaCountThresholdINTEL"; case Op::OpSubgroupAvcSicGetPackedSkcLumaSumThresholdINTEL: return "OpSubgroupAvcSicGetPackedSkcLumaSumThresholdINTEL"; case Op::OpSubgroupAvcSicGetInterRawSadsINTEL: return "OpSubgroupAvcSicGetInterRawSadsINTEL"; case Op::OpVariableLengthArrayINTEL: return "OpVariableLengthArrayINTEL"; case Op::OpSaveMemoryINTEL: return "OpSaveMemoryINTEL"; case Op::OpRestoreMemoryINTEL: return "OpRestoreMemoryINTEL"; case Op::OpArbitraryFloatSinCosPiINTEL: return "OpArbitraryFloatSinCosPiINTEL"; case Op::OpArbitraryFloatCastINTEL: return "OpArbitraryFloatCastINTEL"; case Op::OpArbitraryFloatCastFromIntINTEL: return "OpArbitraryFloatCastFromIntINTEL"; case Op::OpArbitraryFloatCastToIntINTEL: return "OpArbitraryFloatCastToIntINTEL"; case Op::OpArbitraryFloatAddINTEL: return "OpArbitraryFloatAddINTEL"; case Op::OpArbitraryFloatSubINTEL: return "OpArbitraryFloatSubINTEL"; case Op::OpArbitraryFloatMulINTEL: return "OpArbitraryFloatMulINTEL"; case Op::OpArbitraryFloatDivINTEL: return "OpArbitraryFloatDivINTEL"; case Op::OpArbitraryFloatGTINTEL: return "OpArbitraryFloatGTINTEL"; case Op::OpArbitraryFloatGEINTEL: return "OpArbitraryFloatGEINTEL"; case Op::OpArbitraryFloatLTINTEL: return "OpArbitraryFloatLTINTEL"; case Op::OpArbitraryFloatLEINTEL: return "OpArbitraryFloatLEINTEL"; case Op::OpArbitraryFloatEQINTEL: return "OpArbitraryFloatEQINTEL"; case Op::OpArbitraryFloatRecipINTEL: return "OpArbitraryFloatRecipINTEL"; case Op::OpArbitraryFloatRSqrtINTEL: return "OpArbitraryFloatRSqrtINTEL"; case Op::OpArbitraryFloatCbrtINTEL: return "OpArbitraryFloatCbrtINTEL"; case Op::OpArbitraryFloatHypotINTEL: return "OpArbitraryFloatHypotINTEL"; case Op::OpArbitraryFloatSqrtINTEL: return "OpArbitraryFloatSqrtINTEL"; case Op::OpArbitraryFloatLogINTEL: return "OpArbitraryFloatLogINTEL"; case Op::OpArbitraryFloatLog2INTEL: return "OpArbitraryFloatLog2INTEL"; case Op::OpArbitraryFloatLog10INTEL: return "OpArbitraryFloatLog10INTEL"; case Op::OpArbitraryFloatLog1pINTEL: return "OpArbitraryFloatLog1pINTEL"; case Op::OpArbitraryFloatExpINTEL: return "OpArbitraryFloatExpINTEL"; case Op::OpArbitraryFloatExp2INTEL: return "OpArbitraryFloatExp2INTEL"; case Op::OpArbitraryFloatExp10INTEL: return "OpArbitraryFloatExp10INTEL"; case Op::OpArbitraryFloatExpm1INTEL: return "OpArbitraryFloatExpm1INTEL"; case Op::OpArbitraryFloatSinINTEL: return "OpArbitraryFloatSinINTEL"; case Op::OpArbitraryFloatCosINTEL: return "OpArbitraryFloatCosINTEL"; case Op::OpArbitraryFloatSinCosINTEL: return "OpArbitraryFloatSinCosINTEL"; case Op::OpArbitraryFloatSinPiINTEL: return "OpArbitraryFloatSinPiINTEL"; case Op::OpArbitraryFloatCosPiINTEL: return "OpArbitraryFloatCosPiINTEL"; case Op::OpArbitraryFloatASinINTEL: return "OpArbitraryFloatASinINTEL"; case Op::OpArbitraryFloatASinPiINTEL: return "OpArbitraryFloatASinPiINTEL"; case Op::OpArbitraryFloatACosINTEL: return "OpArbitraryFloatACosINTEL"; case Op::OpArbitraryFloatACosPiINTEL: return "OpArbitraryFloatACosPiINTEL"; case Op::OpArbitraryFloatATanINTEL: return "OpArbitraryFloatATanINTEL"; case Op::OpArbitraryFloatATanPiINTEL: return "OpArbitraryFloatATanPiINTEL"; case Op::OpArbitraryFloatATan2INTEL: return "OpArbitraryFloatATan2INTEL"; case Op::OpArbitraryFloatPowINTEL: return "OpArbitraryFloatPowINTEL"; case Op::OpArbitraryFloatPowRINTEL: return "OpArbitraryFloatPowRINTEL"; case Op::OpArbitraryFloatPowNINTEL: return "OpArbitraryFloatPowNINTEL"; case Op::OpLoopControlINTEL: return "OpLoopControlINTEL"; case Op::OpAliasDomainDeclINTEL: return "OpAliasDomainDeclINTEL"; case Op::OpAliasScopeDeclINTEL: return "OpAliasScopeDeclINTEL"; case Op::OpAliasScopeListDeclINTEL: return "OpAliasScopeListDeclINTEL"; case Op::OpFixedSqrtINTEL: return "OpFixedSqrtINTEL"; case Op::OpFixedRecipINTEL: return "OpFixedRecipINTEL"; case Op::OpFixedRsqrtINTEL: return "OpFixedRsqrtINTEL"; case Op::OpFixedSinINTEL: return "OpFixedSinINTEL"; case Op::OpFixedCosINTEL: return "OpFixedCosINTEL"; case Op::OpFixedSinCosINTEL: return "OpFixedSinCosINTEL"; case Op::OpFixedSinPiINTEL: return "OpFixedSinPiINTEL"; case Op::OpFixedCosPiINTEL: return "OpFixedCosPiINTEL"; case Op::OpFixedSinCosPiINTEL: return "OpFixedSinCosPiINTEL"; case Op::OpFixedLogINTEL: return "OpFixedLogINTEL"; case Op::OpFixedExpINTEL: return "OpFixedExpINTEL"; case Op::OpPtrCastToCrossWorkgroupINTEL: return "OpPtrCastToCrossWorkgroupINTEL"; case Op::OpCrossWorkgroupCastToPtrINTEL: return "OpCrossWorkgroupCastToPtrINTEL"; case Op::OpReadPipeBlockingINTEL: return "OpReadPipeBlockingINTEL"; case Op::OpWritePipeBlockingINTEL: return "OpWritePipeBlockingINTEL"; case Op::OpFPGARegINTEL: return "OpFPGARegINTEL"; case Op::OpRayQueryGetRayTMinKHR: return "OpRayQueryGetRayTMinKHR"; case Op::OpRayQueryGetRayFlagsKHR: return "OpRayQueryGetRayFlagsKHR"; case Op::OpRayQueryGetIntersectionTKHR: return "OpRayQueryGetIntersectionTKHR"; case Op::OpRayQueryGetIntersectionInstanceCustomIndexKHR: return "OpRayQueryGetIntersectionInstanceCustomIndexKHR"; case Op::OpRayQueryGetIntersectionInstanceIdKHR: return "OpRayQueryGetIntersectionInstanceIdKHR"; case Op::OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR: return "OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR"; case Op::OpRayQueryGetIntersectionGeometryIndexKHR: return "OpRayQueryGetIntersectionGeometryIndexKHR"; case Op::OpRayQueryGetIntersectionPrimitiveIndexKHR: return "OpRayQueryGetIntersectionPrimitiveIndexKHR"; case Op::OpRayQueryGetIntersectionBarycentricsKHR: return "OpRayQueryGetIntersectionBarycentricsKHR"; case Op::OpRayQueryGetIntersectionFrontFaceKHR: return "OpRayQueryGetIntersectionFrontFaceKHR"; case Op::OpRayQueryGetIntersectionCandidateAABBOpaqueKHR: return "OpRayQueryGetIntersectionCandidateAABBOpaqueKHR"; case Op::OpRayQueryGetIntersectionObjectRayDirectionKHR: return "OpRayQueryGetIntersectionObjectRayDirectionKHR"; case Op::OpRayQueryGetIntersectionObjectRayOriginKHR: return "OpRayQueryGetIntersectionObjectRayOriginKHR"; case Op::OpRayQueryGetWorldRayDirectionKHR: return "OpRayQueryGetWorldRayDirectionKHR"; case Op::OpRayQueryGetWorldRayOriginKHR: return "OpRayQueryGetWorldRayOriginKHR"; case Op::OpRayQueryGetIntersectionObjectToWorldKHR: return "OpRayQueryGetIntersectionObjectToWorldKHR"; case Op::OpRayQueryGetIntersectionWorldToObjectKHR: return "OpRayQueryGetIntersectionWorldToObjectKHR"; case Op::OpAtomicFAddEXT: return "OpAtomicFAddEXT"; case Op::OpTypeBufferSurfaceINTEL: return "OpTypeBufferSurfaceINTEL"; case Op::OpTypeStructContinuedINTEL: return "OpTypeStructContinuedINTEL"; case Op::OpConstantCompositeContinuedINTEL: return "OpConstantCompositeContinuedINTEL"; case Op::OpSpecConstantCompositeContinuedINTEL: return "OpSpecConstantCompositeContinuedINTEL"; case Op::OpCompositeConstructContinuedINTEL: return "OpCompositeConstructContinuedINTEL"; case Op::OpConvertFToBF16INTEL: return "OpConvertFToBF16INTEL"; case Op::OpConvertBF16ToFINTEL: return "OpConvertBF16ToFINTEL"; case Op::OpControlBarrierArriveINTEL: return "OpControlBarrierArriveINTEL"; case Op::OpControlBarrierWaitINTEL: return "OpControlBarrierWaitINTEL"; case Op::OpArithmeticFenceEXT: return "OpArithmeticFenceEXT"; case Op::OpSubgroupBlockPrefetchINTEL: return "OpSubgroupBlockPrefetchINTEL"; case Op::OpSubgroup2DBlockLoadINTEL: return "OpSubgroup2DBlockLoadINTEL"; case Op::OpSubgroup2DBlockLoadTransformINTEL: return "OpSubgroup2DBlockLoadTransformINTEL"; case Op::OpSubgroup2DBlockLoadTransposeINTEL: return "OpSubgroup2DBlockLoadTransposeINTEL"; case Op::OpSubgroup2DBlockPrefetchINTEL: return "OpSubgroup2DBlockPrefetchINTEL"; case Op::OpSubgroup2DBlockStoreINTEL: return "OpSubgroup2DBlockStoreINTEL"; case Op::OpSubgroupMatrixMultiplyAccumulateINTEL: return "OpSubgroupMatrixMultiplyAccumulateINTEL"; case Op::OpGroupIMulKHR: return "OpGroupIMulKHR"; case Op::OpGroupFMulKHR: return "OpGroupFMulKHR"; case Op::OpGroupBitwiseAndKHR: return "OpGroupBitwiseAndKHR"; case Op::OpGroupBitwiseOrKHR: return "OpGroupBitwiseOrKHR"; case Op::OpGroupBitwiseXorKHR: return "OpGroupBitwiseXorKHR"; case Op::OpGroupLogicalAndKHR: return "OpGroupLogicalAndKHR"; case Op::OpGroupLogicalOrKHR: return "OpGroupLogicalOrKHR"; case Op::OpGroupLogicalXorKHR: return "OpGroupLogicalXorKHR"; case Op::OpMaskedGatherINTEL: return "OpMaskedGatherINTEL"; case Op::OpMaskedScatterINTEL: return "OpMaskedScatterINTEL"; default: return "Unknown"; } } #endif /* SPV_ENABLE_UTILITY_CODE */ // Overload bitwise operators for mask bit combining constexpr ImageOperandsMask operator|(ImageOperandsMask a, ImageOperandsMask b) { return ImageOperandsMask(unsigned(a) | unsigned(b)); } constexpr ImageOperandsMask operator&(ImageOperandsMask a, ImageOperandsMask b) { return ImageOperandsMask(unsigned(a) & unsigned(b)); } constexpr ImageOperandsMask operator^(ImageOperandsMask a, ImageOperandsMask b) { return ImageOperandsMask(unsigned(a) ^ unsigned(b)); } constexpr ImageOperandsMask operator~(ImageOperandsMask a) { return ImageOperandsMask(~unsigned(a)); } constexpr FPFastMathModeMask operator|(FPFastMathModeMask a, FPFastMathModeMask b) { return FPFastMathModeMask(unsigned(a) | unsigned(b)); } constexpr FPFastMathModeMask operator&(FPFastMathModeMask a, FPFastMathModeMask b) { return FPFastMathModeMask(unsigned(a) & unsigned(b)); } constexpr FPFastMathModeMask operator^(FPFastMathModeMask a, FPFastMathModeMask b) { return FPFastMathModeMask(unsigned(a) ^ unsigned(b)); } constexpr FPFastMathModeMask operator~(FPFastMathModeMask a) { return FPFastMathModeMask(~unsigned(a)); } constexpr SelectionControlMask operator|(SelectionControlMask a, SelectionControlMask b) { return SelectionControlMask(unsigned(a) | unsigned(b)); } constexpr SelectionControlMask operator&(SelectionControlMask a, SelectionControlMask b) { return SelectionControlMask(unsigned(a) & unsigned(b)); } constexpr SelectionControlMask operator^(SelectionControlMask a, SelectionControlMask b) { return SelectionControlMask(unsigned(a) ^ unsigned(b)); } constexpr SelectionControlMask operator~(SelectionControlMask a) { return SelectionControlMask(~unsigned(a)); } constexpr LoopControlMask operator|(LoopControlMask a, LoopControlMask b) { return LoopControlMask(unsigned(a) | unsigned(b)); } constexpr LoopControlMask operator&(LoopControlMask a, LoopControlMask b) { return LoopControlMask(unsigned(a) & unsigned(b)); } constexpr LoopControlMask operator^(LoopControlMask a, LoopControlMask b) { return LoopControlMask(unsigned(a) ^ unsigned(b)); } constexpr LoopControlMask operator~(LoopControlMask a) { return LoopControlMask(~unsigned(a)); } constexpr FunctionControlMask operator|(FunctionControlMask a, FunctionControlMask b) { return FunctionControlMask(unsigned(a) | unsigned(b)); } constexpr FunctionControlMask operator&(FunctionControlMask a, FunctionControlMask b) { return FunctionControlMask(unsigned(a) & unsigned(b)); } constexpr FunctionControlMask operator^(FunctionControlMask a, FunctionControlMask b) { return FunctionControlMask(unsigned(a) ^ unsigned(b)); } constexpr FunctionControlMask operator~(FunctionControlMask a) { return FunctionControlMask(~unsigned(a)); } constexpr MemorySemanticsMask operator|(MemorySemanticsMask a, MemorySemanticsMask b) { return MemorySemanticsMask(unsigned(a) | unsigned(b)); } constexpr MemorySemanticsMask operator&(MemorySemanticsMask a, MemorySemanticsMask b) { return MemorySemanticsMask(unsigned(a) & unsigned(b)); } constexpr MemorySemanticsMask operator^(MemorySemanticsMask a, MemorySemanticsMask b) { return MemorySemanticsMask(unsigned(a) ^ unsigned(b)); } constexpr MemorySemanticsMask operator~(MemorySemanticsMask a) { return MemorySemanticsMask(~unsigned(a)); } constexpr MemoryAccessMask operator|(MemoryAccessMask a, MemoryAccessMask b) { return MemoryAccessMask(unsigned(a) | unsigned(b)); } constexpr MemoryAccessMask operator&(MemoryAccessMask a, MemoryAccessMask b) { return MemoryAccessMask(unsigned(a) & unsigned(b)); } constexpr MemoryAccessMask operator^(MemoryAccessMask a, MemoryAccessMask b) { return MemoryAccessMask(unsigned(a) ^ unsigned(b)); } constexpr MemoryAccessMask operator~(MemoryAccessMask a) { return MemoryAccessMask(~unsigned(a)); } constexpr KernelProfilingInfoMask operator|(KernelProfilingInfoMask a, KernelProfilingInfoMask b) { return KernelProfilingInfoMask(unsigned(a) | unsigned(b)); } constexpr KernelProfilingInfoMask operator&(KernelProfilingInfoMask a, KernelProfilingInfoMask b) { return KernelProfilingInfoMask(unsigned(a) & unsigned(b)); } constexpr KernelProfilingInfoMask operator^(KernelProfilingInfoMask a, KernelProfilingInfoMask b) { return KernelProfilingInfoMask(unsigned(a) ^ unsigned(b)); } constexpr KernelProfilingInfoMask operator~(KernelProfilingInfoMask a) { return KernelProfilingInfoMask(~unsigned(a)); } constexpr RayFlagsMask operator|(RayFlagsMask a, RayFlagsMask b) { return RayFlagsMask(unsigned(a) | unsigned(b)); } constexpr RayFlagsMask operator&(RayFlagsMask a, RayFlagsMask b) { return RayFlagsMask(unsigned(a) & unsigned(b)); } constexpr RayFlagsMask operator^(RayFlagsMask a, RayFlagsMask b) { return RayFlagsMask(unsigned(a) ^ unsigned(b)); } constexpr RayFlagsMask operator~(RayFlagsMask a) { return RayFlagsMask(~unsigned(a)); } constexpr FragmentShadingRateMask operator|(FragmentShadingRateMask a, FragmentShadingRateMask b) { return FragmentShadingRateMask(unsigned(a) | unsigned(b)); } constexpr FragmentShadingRateMask operator&(FragmentShadingRateMask a, FragmentShadingRateMask b) { return FragmentShadingRateMask(unsigned(a) & unsigned(b)); } constexpr FragmentShadingRateMask operator^(FragmentShadingRateMask a, FragmentShadingRateMask b) { return FragmentShadingRateMask(unsigned(a) ^ unsigned(b)); } constexpr FragmentShadingRateMask operator~(FragmentShadingRateMask a) { return FragmentShadingRateMask(~unsigned(a)); } constexpr CooperativeMatrixOperandsMask operator|(CooperativeMatrixOperandsMask a, CooperativeMatrixOperandsMask b) { return CooperativeMatrixOperandsMask(unsigned(a) | unsigned(b)); } constexpr CooperativeMatrixOperandsMask operator&(CooperativeMatrixOperandsMask a, CooperativeMatrixOperandsMask b) { return CooperativeMatrixOperandsMask(unsigned(a) & unsigned(b)); } constexpr CooperativeMatrixOperandsMask operator^(CooperativeMatrixOperandsMask a, CooperativeMatrixOperandsMask b) { return CooperativeMatrixOperandsMask(unsigned(a) ^ unsigned(b)); } constexpr CooperativeMatrixOperandsMask operator~(CooperativeMatrixOperandsMask a) { return CooperativeMatrixOperandsMask(~unsigned(a)); } constexpr CooperativeMatrixReduceMask operator|(CooperativeMatrixReduceMask a, CooperativeMatrixReduceMask b) { return CooperativeMatrixReduceMask(unsigned(a) | unsigned(b)); } constexpr CooperativeMatrixReduceMask operator&(CooperativeMatrixReduceMask a, CooperativeMatrixReduceMask b) { return CooperativeMatrixReduceMask(unsigned(a) & unsigned(b)); } constexpr CooperativeMatrixReduceMask operator^(CooperativeMatrixReduceMask a, CooperativeMatrixReduceMask b) { return CooperativeMatrixReduceMask(unsigned(a) ^ unsigned(b)); } constexpr CooperativeMatrixReduceMask operator~(CooperativeMatrixReduceMask a) { return CooperativeMatrixReduceMask(~unsigned(a)); } constexpr TensorAddressingOperandsMask operator|(TensorAddressingOperandsMask a, TensorAddressingOperandsMask b) { return TensorAddressingOperandsMask(unsigned(a) | unsigned(b)); } constexpr TensorAddressingOperandsMask operator&(TensorAddressingOperandsMask a, TensorAddressingOperandsMask b) { return TensorAddressingOperandsMask(unsigned(a) & unsigned(b)); } constexpr TensorAddressingOperandsMask operator^(TensorAddressingOperandsMask a, TensorAddressingOperandsMask b) { return TensorAddressingOperandsMask(unsigned(a) ^ unsigned(b)); } constexpr TensorAddressingOperandsMask operator~(TensorAddressingOperandsMask a) { return TensorAddressingOperandsMask(~unsigned(a)); } constexpr MatrixMultiplyAccumulateOperandsMask operator|(MatrixMultiplyAccumulateOperandsMask a, MatrixMultiplyAccumulateOperandsMask b) { return MatrixMultiplyAccumulateOperandsMask(unsigned(a) | unsigned(b)); } constexpr MatrixMultiplyAccumulateOperandsMask operator&(MatrixMultiplyAccumulateOperandsMask a, MatrixMultiplyAccumulateOperandsMask b) { return MatrixMultiplyAccumulateOperandsMask(unsigned(a) & unsigned(b)); } constexpr MatrixMultiplyAccumulateOperandsMask operator^(MatrixMultiplyAccumulateOperandsMask a, MatrixMultiplyAccumulateOperandsMask b) { return MatrixMultiplyAccumulateOperandsMask(unsigned(a) ^ unsigned(b)); } constexpr MatrixMultiplyAccumulateOperandsMask operator~(MatrixMultiplyAccumulateOperandsMask a) { return MatrixMultiplyAccumulateOperandsMask(~unsigned(a)); } constexpr RawAccessChainOperandsMask operator|(RawAccessChainOperandsMask a, RawAccessChainOperandsMask b) { return RawAccessChainOperandsMask(unsigned(a) | unsigned(b)); } constexpr RawAccessChainOperandsMask operator&(RawAccessChainOperandsMask a, RawAccessChainOperandsMask b) { return RawAccessChainOperandsMask(unsigned(a) & unsigned(b)); } constexpr RawAccessChainOperandsMask operator^(RawAccessChainOperandsMask a, RawAccessChainOperandsMask b) { return RawAccessChainOperandsMask(unsigned(a) ^ unsigned(b)); } constexpr RawAccessChainOperandsMask operator~(RawAccessChainOperandsMask a) { return RawAccessChainOperandsMask(~unsigned(a)); } } // end namespace spv #endif // #ifndef spirv_HPP ================================================ FILE: src/libraries/glslang/SPIRV/spvIR.h ================================================ // // Copyright (C) 2014 LunarG, Inc. // Copyright (C) 2015-2018 Google, Inc. // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following // disclaimer in the documentation and/or other materials provided // with the distribution. // // Neither the name of 3Dlabs Inc. Ltd. nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // SPIRV-IR // // Simple in-memory representation (IR) of SPIRV. Just for holding // Each function's CFG of blocks. Has this hierarchy: // - Module, which is a list of // - Function, which is a list of // - Block, which is a list of // - Instruction // #pragma once #ifndef spvIR_H #define spvIR_H #include "spirv.hpp11" #include #include #include #include #include #include #include #include namespace spv { class Block; class Function; class Module; const Id NoResult = 0; const Id NoType = 0; const Decoration NoPrecision = Decoration::Max; #ifdef __GNUC__ # define POTENTIALLY_UNUSED __attribute__((unused)) #else # define POTENTIALLY_UNUSED #endif POTENTIALLY_UNUSED const MemorySemanticsMask MemorySemanticsAllMemory = (MemorySemanticsMask)(MemorySemanticsMask::UniformMemory | MemorySemanticsMask::WorkgroupMemory | MemorySemanticsMask::AtomicCounterMemory | MemorySemanticsMask::ImageMemory); struct IdImmediate { bool isId; // true if word is an Id, false if word is an immediate unsigned word; IdImmediate(bool i, unsigned w) : isId(i), word(w) {} IdImmediate(bool i, spv::MemoryAccessMask w) : isId(i), word((unsigned)w) {} IdImmediate(bool i, spv::TensorAddressingOperandsMask w) : isId(i), word((unsigned)w) {} IdImmediate(bool i, spv::ImageOperandsMask w) : isId(i), word((unsigned)w) {} IdImmediate(bool i, spv::CooperativeMatrixOperandsMask w) : isId(i), word((unsigned)w) {} }; // // SPIR-V IR instruction. // class Instruction { public: Instruction(Id resultId, Id typeId, Op opCode) : resultId(resultId), typeId(typeId), opCode(opCode), block(nullptr) { } explicit Instruction(Op opCode) : resultId(NoResult), typeId(NoType), opCode(opCode), block(nullptr) { } virtual ~Instruction() {} void reserveOperands(size_t count) { operands.reserve(count); idOperand.reserve(count); } void addIdOperand(Id id) { // ids can't be 0 assert(id); operands.push_back(id); idOperand.push_back(true); } // This method is potentially dangerous as it can break assumptions // about SSA and lack of forward references. void setIdOperand(unsigned idx, Id id) { assert(id); assert(idOperand[idx]); operands[idx] = id; } void addImmediateOperand(unsigned int immediate) { operands.push_back(immediate); idOperand.push_back(false); } void addImmediateOperand(spv::StorageClass immediate) { addImmediateOperand((unsigned)immediate); } void addImmediateOperand(spv::ExecutionMode immediate) { addImmediateOperand((unsigned)immediate); } void addImmediateOperand(spv::ExecutionModel immediate) { addImmediateOperand((unsigned)immediate); } void addImmediateOperand(spv::Decoration immediate) { addImmediateOperand((unsigned)immediate); } void addImmediateOperand(spv::LinkageType immediate) { addImmediateOperand((unsigned)immediate); } void addImmediateOperand(spv::MemoryAccessMask immediate) { addImmediateOperand((unsigned)immediate); } void addImmediateOperand(spv::Capability immediate) { addImmediateOperand((unsigned)immediate); } void addImmediateOperand(spv::AddressingModel immediate) { addImmediateOperand((unsigned)immediate); } void addImmediateOperand(spv::MemoryModel immediate) { addImmediateOperand((unsigned)immediate); } void addImmediateOperand(spv::FPEncoding immediate) { addImmediateOperand((unsigned)immediate); } void addImmediateOperand(spv::SourceLanguage immediate) { addImmediateOperand((unsigned)immediate); } void addImmediateOperand(spv::Dim immediate) { addImmediateOperand((unsigned)immediate); } void addImmediateOperand(spv::FunctionControlMask immediate){ addImmediateOperand((unsigned)immediate); } void addImmediateOperand(spv::SelectionControlMask immediate) { addImmediateOperand((unsigned)immediate); } void addImmediateOperand(spv::LoopControlMask immediate) { addImmediateOperand((unsigned)immediate); } void setImmediateOperand(unsigned idx, unsigned int immediate) { assert(!idOperand[idx]); operands[idx] = immediate; } void addStringOperand(const char* str) { unsigned int word = 0; unsigned int shiftAmount = 0; unsigned char c; do { c = *(str++); word |= ((unsigned int)c) << shiftAmount; shiftAmount += 8; if (shiftAmount == 32) { addImmediateOperand(word); word = 0; shiftAmount = 0; } } while (c != 0); // deal with partial last word if (shiftAmount > 0) { addImmediateOperand(word); } } bool isIdOperand(int op) const { return idOperand[op]; } void setBlock(Block* b) { block = b; } Block* getBlock() const { return block; } Op getOpCode() const { return opCode; } int getNumOperands() const { assert(operands.size() == idOperand.size()); return (int)operands.size(); } Id getResultId() const { return resultId; } Id getTypeId() const { return typeId; } Id getIdOperand(int op) const { assert(idOperand[op]); return operands[op]; } unsigned int getImmediateOperand(int op) const { assert(!idOperand[op]); return operands[op]; } // Write out the binary form. void dump(std::vector& out) const { // Compute the wordCount unsigned int wordCount = 1; if (typeId) ++wordCount; if (resultId) ++wordCount; wordCount += (unsigned int)operands.size(); // Write out the beginning of the instruction out.push_back(((wordCount) << WordCountShift) | (unsigned)opCode); if (typeId) out.push_back(typeId); if (resultId) out.push_back(resultId); // Write out the operands for (int op = 0; op < (int)operands.size(); ++op) out.push_back(operands[op]); } const char *getNameString() const { if (opCode == Op::OpString) { return (const char *)&operands[0]; } else { assert(opCode == Op::OpName); return (const char *)&operands[1]; } } protected: Instruction(const Instruction&); Id resultId; Id typeId; Op opCode; std::vector operands; // operands, both and immediates (both are unsigned int) std::vector idOperand; // true for operands that are , false for immediates Block* block; }; // // SPIR-V IR block. // struct DebugSourceLocation { int line; int column; spv::Id fileId; }; class Block { public: Block(Id id, Function& parent); virtual ~Block() { } Id getId() { return instructions.front()->getResultId(); } Function& getParent() const { return parent; } // Returns true if the source location is actually updated. // Note we still need the builder to insert the line marker instruction. This is just a tracker. bool updateDebugSourceLocation(int line, int column, spv::Id fileId) { if (currentSourceLoc && currentSourceLoc->line == line && currentSourceLoc->column == column && currentSourceLoc->fileId == fileId) { return false; } currentSourceLoc = DebugSourceLocation{line, column, fileId}; return true; } // Returns true if the scope is actually updated. // Note we still need the builder to insert the debug scope instruction. This is just a tracker. bool updateDebugScope(spv::Id scopeId) { assert(scopeId); if (currentDebugScope && *currentDebugScope == scopeId) { return false; } currentDebugScope = scopeId; return true; } void addInstruction(std::unique_ptr inst); void addPredecessor(Block* pred) { predecessors.push_back(pred); pred->successors.push_back(this);} void addLocalVariable(std::unique_ptr inst) { localVariables.push_back(std::move(inst)); } const std::vector& getPredecessors() const { return predecessors; } const std::vector& getSuccessors() const { return successors; } std::vector >& getInstructions() { return instructions; } const std::vector >& getLocalVariables() const { return localVariables; } void setUnreachable() { unreachable = true; } bool isUnreachable() const { return unreachable; } // Returns the block's merge instruction, if one exists (otherwise null). const Instruction* getMergeInstruction() const { if (instructions.size() < 2) return nullptr; const Instruction* nextToLast = (instructions.cend() - 2)->get(); switch (nextToLast->getOpCode()) { case Op::OpSelectionMerge: case Op::OpLoopMerge: return nextToLast; default: return nullptr; } return nullptr; } // Change this block into a canonical dead merge block. Delete instructions // as necessary. A canonical dead merge block has only an OpLabel and an // OpUnreachable. void rewriteAsCanonicalUnreachableMerge() { assert(localVariables.empty()); // Delete all instructions except for the label. assert(instructions.size() > 0); instructions.resize(1); successors.clear(); addInstruction(std::unique_ptr(new Instruction(Op::OpUnreachable))); } // Change this block into a canonical dead continue target branching to the // given header ID. Delete instructions as necessary. A canonical dead continue // target has only an OpLabel and an unconditional branch back to the corresponding // header. void rewriteAsCanonicalUnreachableContinue(Block* header) { assert(localVariables.empty()); // Delete all instructions except for the label. assert(instructions.size() > 0); instructions.resize(1); successors.clear(); // Add OpBranch back to the header. assert(header != nullptr); Instruction* branch = new Instruction(Op::OpBranch); branch->addIdOperand(header->getId()); addInstruction(std::unique_ptr(branch)); successors.push_back(header); } bool isTerminated() const { switch (instructions.back()->getOpCode()) { case Op::OpBranch: case Op::OpBranchConditional: case Op::OpSwitch: case Op::OpKill: case Op::OpTerminateInvocation: case Op::OpReturn: case Op::OpReturnValue: case Op::OpUnreachable: return true; default: return false; } } void dump(std::vector& out) const { instructions[0]->dump(out); for (int i = 0; i < (int)localVariables.size(); ++i) localVariables[i]->dump(out); for (int i = 1; i < (int)instructions.size(); ++i) instructions[i]->dump(out); } protected: Block(const Block&); Block& operator=(Block&); // To enforce keeping parent and ownership in sync: friend Function; std::vector > instructions; std::vector predecessors, successors; std::vector > localVariables; Function& parent; // Track source location of the last source location marker instruction. std::optional currentSourceLoc; // Track scope of the last debug scope instruction. std::optional currentDebugScope; // track whether this block is known to be uncreachable (not necessarily // true for all unreachable blocks, but should be set at least // for the extraneous ones introduced by the builder). bool unreachable; }; // The different reasons for reaching a block in the inReadableOrder traversal. enum ReachReason { // Reachable from the entry block via transfers of control, i.e. branches. ReachViaControlFlow = 0, // A continue target that is not reachable via control flow. ReachDeadContinue, // A merge block that is not reachable via control flow. ReachDeadMerge }; // Traverses the control-flow graph rooted at root in an order suited for // readable code generation. Invokes callback at every node in the traversal // order. The callback arguments are: // - the block, // - the reason we reached the block, // - if the reason was that block is an unreachable continue or unreachable merge block // then the last parameter is the corresponding header block. void inReadableOrder(Block* root, std::function callback); // // SPIR-V IR Function. // class Function { public: Function(Id id, Id resultType, Id functionType, Id firstParam, LinkageType linkage, const std::string& name, Module& parent); virtual ~Function() { for (int i = 0; i < (int)parameterInstructions.size(); ++i) delete parameterInstructions[i]; for (int i = 0; i < (int)blocks.size(); ++i) delete blocks[i]; } Id getId() const { return functionInstruction.getResultId(); } Id getParamId(int p) const { return parameterInstructions[p]->getResultId(); } Id getParamType(int p) const { return parameterInstructions[p]->getTypeId(); } void addBlock(Block* block) { blocks.push_back(block); } void removeBlock(Block* block) { auto found = find(blocks.begin(), blocks.end(), block); assert(found != blocks.end()); blocks.erase(found); delete block; } Module& getParent() const { return parent; } Block* getEntryBlock() const { return blocks.front(); } Block* getLastBlock() const { return blocks.back(); } const std::vector& getBlocks() const { return blocks; } void addLocalVariable(std::unique_ptr inst); Id getReturnType() const { return functionInstruction.getTypeId(); } Id getFuncId() const { return functionInstruction.getResultId(); } Id getFuncTypeId() const { return functionInstruction.getIdOperand(1); } void setReturnPrecision(Decoration precision) { if (precision == Decoration::RelaxedPrecision) reducedPrecisionReturn = true; } Decoration getReturnPrecision() const { return reducedPrecisionReturn ? Decoration::RelaxedPrecision : NoPrecision; } void setDebugLineInfo(Id fileName, int line, int column) { lineInstruction = std::unique_ptr{new Instruction(Op::OpLine)}; lineInstruction->reserveOperands(3); lineInstruction->addIdOperand(fileName); lineInstruction->addImmediateOperand(line); lineInstruction->addImmediateOperand(column); } bool hasDebugLineInfo() const { return lineInstruction != nullptr; } void setImplicitThis() { implicitThis = true; } bool hasImplicitThis() const { return implicitThis; } void addParamPrecision(unsigned param, Decoration precision) { if (precision == Decoration::RelaxedPrecision) reducedPrecisionParams.insert(param); } Decoration getParamPrecision(unsigned param) const { return reducedPrecisionParams.find(param) != reducedPrecisionParams.end() ? Decoration::RelaxedPrecision : NoPrecision; } void dump(std::vector& out) const { // OpLine if (lineInstruction != nullptr) { lineInstruction->dump(out); } // OpFunction functionInstruction.dump(out); // OpFunctionParameter for (int p = 0; p < (int)parameterInstructions.size(); ++p) parameterInstructions[p]->dump(out); // Blocks inReadableOrder(blocks[0], [&out](const Block* b, ReachReason, Block*) { b->dump(out); }); Instruction end(0, 0, Op::OpFunctionEnd); end.dump(out); } LinkageType getLinkType() const { return linkType; } const char* getExportName() const { return exportName.c_str(); } protected: Function(const Function&); Function& operator=(Function&); Module& parent; std::unique_ptr lineInstruction; Instruction functionInstruction; std::vector parameterInstructions; std::vector blocks; bool implicitThis; // true if this is a member function expecting to be passed a 'this' as the first argument bool reducedPrecisionReturn; std::set reducedPrecisionParams; // list of parameter indexes that need a relaxed precision arg LinkageType linkType; std::string exportName; }; // // SPIR-V IR Module. // class Module { public: Module() {} virtual ~Module() { // TODO delete things } void addFunction(Function *fun) { functions.push_back(fun); } void mapInstruction(Instruction *instruction) { spv::Id resultId = instruction->getResultId(); // map the instruction's result id if (resultId >= idToInstruction.size()) idToInstruction.resize(resultId + 16); idToInstruction[resultId] = instruction; } Instruction* getInstruction(Id id) const { return idToInstruction[id]; } const std::vector& getFunctions() const { return functions; } spv::Id getTypeId(Id resultId) const { return idToInstruction[resultId] == nullptr ? NoType : idToInstruction[resultId]->getTypeId(); } StorageClass getStorageClass(Id typeId) const { assert(idToInstruction[typeId]->getOpCode() == spv::Op::OpTypePointer); return (StorageClass)idToInstruction[typeId]->getImmediateOperand(0); } void dump(std::vector& out) const { for (int f = 0; f < (int)functions.size(); ++f) functions[f]->dump(out); } protected: Module(const Module&); std::vector functions; // map from result id to instruction having that result id std::vector idToInstruction; // map from a result id to its type id }; // // Implementation (it's here due to circular type definitions). // // Add both // - the OpFunction instruction // - all the OpFunctionParameter instructions __inline Function::Function(Id id, Id resultType, Id functionType, Id firstParamId, LinkageType linkage, const std::string& name, Module& parent) : parent(parent), lineInstruction(nullptr), functionInstruction(id, resultType, Op::OpFunction), implicitThis(false), reducedPrecisionReturn(false), linkType(linkage) { // OpFunction functionInstruction.reserveOperands(2); functionInstruction.addImmediateOperand(FunctionControlMask::MaskNone); functionInstruction.addIdOperand(functionType); parent.mapInstruction(&functionInstruction); parent.addFunction(this); // OpFunctionParameter Instruction* typeInst = parent.getInstruction(functionType); int numParams = typeInst->getNumOperands() - 1; for (int p = 0; p < numParams; ++p) { Instruction* param = new Instruction(firstParamId + p, typeInst->getIdOperand(p + 1), Op::OpFunctionParameter); parent.mapInstruction(param); parameterInstructions.push_back(param); } // If importing/exporting, save the function name (without the mangled parameters) for the linkage decoration if (linkType != LinkageType::Max) { exportName = name.substr(0, name.find_first_of('(')); } } __inline void Function::addLocalVariable(std::unique_ptr inst) { Instruction* raw_instruction = inst.get(); blocks[0]->addLocalVariable(std::move(inst)); parent.mapInstruction(raw_instruction); } __inline Block::Block(Id id, Function& parent) : parent(parent), unreachable(false) { instructions.push_back(std::unique_ptr(new Instruction(id, NoType, Op::OpLabel))); instructions.back()->setBlock(this); parent.getParent().mapInstruction(instructions.back().get()); } __inline void Block::addInstruction(std::unique_ptr inst) { Instruction* raw_instruction = inst.get(); instructions.push_back(std::move(inst)); raw_instruction->setBlock(this); if (raw_instruction->getResultId()) parent.getParent().mapInstruction(raw_instruction); } } // end spv namespace #endif // spvIR_H ================================================ FILE: src/libraries/glslang/SPIRV/spvUtil.h ================================================ // // Copyright (C) 2025 Jan Kelemen // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following // disclaimer in the documentation and/or other materials provided // with the distribution. // // Neither the name of 3Dlabs Inc. Ltd. nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // #pragma once #ifndef spvUtil_H #define spvUtil_H #include #include #include "spirv.hpp11" namespace spv { __inline uint32_t operator&(uint32_t value, spv::MemoryAccessMask mask) { return value & (unsigned)mask; } __inline bool operator==(uint32_t word, spv::FPEncoding encoding) { return word == (unsigned)encoding; } __inline bool operator!=(uint32_t word, spv::FPEncoding encoding) { return !(word == encoding); } __inline bool operator==(uint32_t word, spv::Decoration decoration) { return word == (unsigned)decoration; } __inline bool operator!=(uint32_t word, spv::Decoration decoration) { return !(word == decoration); } __inline bool operator==(uint32_t word, spv::Op op) { return word == (unsigned)op; } __inline bool operator!=(uint32_t word, spv::Op op) { return !(word == op); } __inline bool operator==(uint32_t word, spv::StorageClass storage) { return word == (unsigned)storage; } __inline bool operator!=(uint32_t word, spv::StorageClass storage) { return !(word == storage); } __inline bool anySet(spv::MemoryAccessMask value, spv::MemoryAccessMask mask) { return (value & mask) != spv::MemoryAccessMask::MaskNone; } __inline bool anySet(spv::ImageOperandsMask value, spv::ImageOperandsMask mask) { return (value & mask) != spv::ImageOperandsMask::MaskNone; } __inline bool anySet(spv::MemorySemanticsMask value, spv::MemorySemanticsMask mask) { return (value & mask) != spv::MemorySemanticsMask::MaskNone; } __inline void addMask(uint32_t& word, spv::TensorAddressingOperandsMask mask) { word |= (unsigned)mask; } __inline void addMask(spv::CooperativeMatrixOperandsMask& word, spv::CooperativeMatrixOperandsMask mask) { word = word | mask; } template> __inline To enumCast(Enum value) { return static_cast(value); } } #endif // spvUtil_H ================================================ FILE: src/libraries/glslang/glslang/ExtensionHeaders/GL_EXT_shader_realtime_clock.glsl ================================================ // // Copyright (C) 2002-2005 3Dlabs Inc. Ltd. // Copyright (C) 2013-2016 LunarG, Inc. // Copyright (C) 2016-2020 Google, Inc. // Modifications Copyright(C) 2021 Advanced Micro Devices, Inc.All rights reserved. // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following // disclaimer in the documentation and/or other materials provided // with the distribution. // // Neither the name of 3Dlabs Inc. Ltd. nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // ================================================ FILE: src/libraries/glslang/glslang/GenericCodeGen/CodeGen.cpp ================================================ // // Copyright (C) 2002-2005 3Dlabs Inc. Ltd. // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following // disclaimer in the documentation and/or other materials provided // with the distribution. // // Neither the name of 3Dlabs Inc. Ltd. nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // #include "../Include/Common.h" #include "../Include/ShHandle.h" #include "../MachineIndependent/Versions.h" // // Here is where real machine specific high-level data would be defined. // class TGenericCompiler : public TCompiler { public: TGenericCompiler(EShLanguage l) : TCompiler(l, infoSink) {} virtual bool compile(TIntermNode* root, int version = 0, EProfile profile = ENoProfile); TInfoSink infoSink; }; // // This function must be provided to create the actual // compile object used by higher level code. It returns // a subclass of TCompiler. // TCompiler* ConstructCompiler(EShLanguage language, int) { return new TGenericCompiler(language); } // // Delete the compiler made by ConstructCompiler // void DeleteCompiler(TCompiler* compiler) { delete compiler; } // // Generate code from the given parse tree // bool TGenericCompiler::compile(TIntermNode* /*root*/, int /*version*/, EProfile /*profile*/) { haveValidObjectCode = true; return haveValidObjectCode; } ================================================ FILE: src/libraries/glslang/glslang/GenericCodeGen/Link.cpp ================================================ // // Copyright (C) 2002-2005 3Dlabs Inc. Ltd. // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following // disclaimer in the documentation and/or other materials provided // with the distribution. // // Neither the name of 3Dlabs Inc. Ltd. nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // // // The top level algorithms for linking multiple // shaders together. // #include "../Include/Common.h" #include "../Include/ShHandle.h" // // Actual link object, derived from the shader handle base classes. // class TGenericLinker : public TLinker { public: TGenericLinker(EShExecutable e) : TLinker(e, infoSink) {} bool link(TCompilerList&, TUniformMap*) { return true; } void getAttributeBindings(ShBindingTable const **) const { } TInfoSink infoSink; }; // // The internal view of a uniform/float object exchanged with the driver. // class TUniformLinkedMap : public TUniformMap { public: TUniformLinkedMap() { } virtual int getLocation(const char*) { return 0; } }; TShHandleBase* ConstructLinker(EShExecutable executable, int) { return new TGenericLinker(executable); } void DeleteLinker(TShHandleBase* linker) { delete linker; } TUniformMap* ConstructUniformMap() { return new TUniformLinkedMap(); } void DeleteUniformMap(TUniformMap* map) { delete map; } TShHandleBase* ConstructBindings() { return nullptr; } void DeleteBindingList(TShHandleBase* bindingList) { delete bindingList; } ================================================ FILE: src/libraries/glslang/glslang/Include/BaseTypes.h ================================================ // // Copyright (C) 2002-2005 3Dlabs Inc. Ltd. // Copyright (C) 2012-2013 LunarG, Inc. // Copyright (C) 2017 ARM Limited. // Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights reserved. // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following // disclaimer in the documentation and/or other materials provided // with the distribution. // // Neither the name of 3Dlabs Inc. Ltd. nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // #ifndef _BASICTYPES_INCLUDED_ #define _BASICTYPES_INCLUDED_ namespace glslang { // // Basic type. Arrays, vectors, sampler details, etc., are orthogonal to this. // enum TBasicType { EbtVoid, EbtFloat, EbtDouble, EbtFloat16, EbtBFloat16, EbtFloatE5M2, EbtFloatE4M3, EbtInt8, EbtUint8, EbtInt16, EbtUint16, EbtInt, EbtUint, EbtInt64, EbtUint64, EbtBool, EbtAtomicUint, EbtSampler, EbtStruct, EbtBlock, EbtAccStruct, EbtReference, EbtRayQuery, EbtHitObjectNV, EbtCoopmat, EbtFunction, EbtTensorLayoutNV, EbtTensorViewNV, EbtCoopvecNV, // SPIR-V type defined by spirv_type EbtSpirvType, // HLSL types that live only temporarily. EbtString, EbtNumTypes }; // // Storage qualifiers. Should align with different kinds of storage or // resource or GLSL storage qualifier. Expansion is deprecated. // // N.B.: You probably DON'T want to add anything here, but rather just add it // to the built-in variables. See the comment above TBuiltInVariable. // // A new built-in variable will normally be an existing qualifier, like 'in', 'out', etc. // DO NOT follow the design pattern of, say EvqInstanceId, etc. // enum TStorageQualifier { EvqTemporary, // For temporaries (within a function), read/write EvqGlobal, // For globals read/write EvqConst, // User-defined constant values, will be semantically constant and constant folded EvqVaryingIn, // pipeline input, read only, also supercategory for all built-ins not included in this enum (see TBuiltInVariable) EvqVaryingOut, // pipeline output, read/write, also supercategory for all built-ins not included in this enum (see TBuiltInVariable) EvqUniform, // read only, shared with app EvqBuffer, // read/write, shared with app EvqShared, // compute shader's read/write 'shared' qualifier EvqSpirvStorageClass, // spirv_storage_class EvqPayload, EvqPayloadIn, EvqHitAttr, EvqCallableData, EvqCallableDataIn, EvqHitObjectAttrNV, EvqtaskPayloadSharedEXT, // parameters EvqIn, // also, for 'in' in the grammar before we know if it's a pipeline input or an 'in' parameter EvqOut, // also, for 'out' in the grammar before we know if it's a pipeline output or an 'out' parameter EvqInOut, EvqConstReadOnly, // input; also other read-only types having neither a constant value nor constant-value semantics // built-ins read by vertex shader EvqVertexId, EvqInstanceId, // built-ins written by vertex shader EvqPosition, EvqPointSize, EvqClipVertex, // built-ins read by fragment shader EvqFace, EvqFragCoord, EvqPointCoord, // built-ins written by fragment shader EvqFragColor, EvqFragDepth, EvqFragStencil, EvqTileImageEXT, // end of list EvqLast }; // // Subcategories of the TStorageQualifier, simply to give a direct mapping // between built-in variable names and an numerical value (the enum). // // For backward compatibility, there is some redundancy between the // TStorageQualifier and these. Existing members should both be maintained accurately. // However, any new built-in variable (and any existing non-redundant one) // must follow the pattern that the specific built-in is here, and only its // general qualifier is in TStorageQualifier. // // Something like gl_Position, which is sometimes 'in' and sometimes 'out' // shows up as two different built-in variables in a single stage, but // only has a single enum in TBuiltInVariable, so both the // TStorageQualifier and the TBuitinVariable are needed to distinguish // between them. // enum TBuiltInVariable { EbvNone, EbvNumWorkGroups, EbvWorkGroupSize, EbvWorkGroupId, EbvLocalInvocationId, EbvGlobalInvocationId, EbvLocalInvocationIndex, EbvNumSubgroups, EbvSubgroupID, EbvSubGroupSize, EbvSubGroupInvocation, EbvSubGroupEqMask, EbvSubGroupGeMask, EbvSubGroupGtMask, EbvSubGroupLeMask, EbvSubGroupLtMask, EbvSubgroupSize2, EbvSubgroupInvocation2, EbvSubgroupEqMask2, EbvSubgroupGeMask2, EbvSubgroupGtMask2, EbvSubgroupLeMask2, EbvSubgroupLtMask2, EbvVertexId, EbvInstanceId, EbvVertexIndex, EbvInstanceIndex, EbvBaseVertex, EbvBaseInstance, EbvDrawId, EbvPosition, EbvPointSize, EbvClipVertex, EbvClipDistance, EbvCullDistance, EbvNormal, EbvVertex, EbvMultiTexCoord0, EbvMultiTexCoord1, EbvMultiTexCoord2, EbvMultiTexCoord3, EbvMultiTexCoord4, EbvMultiTexCoord5, EbvMultiTexCoord6, EbvMultiTexCoord7, EbvFrontColor, EbvBackColor, EbvFrontSecondaryColor, EbvBackSecondaryColor, EbvTexCoord, EbvFogFragCoord, EbvInvocationId, EbvPrimitiveId, EbvLayer, EbvViewportIndex, EbvPatchVertices, EbvTessLevelOuter, EbvTessLevelInner, EbvBoundingBox, EbvTessCoord, EbvColor, EbvSecondaryColor, EbvFace, EbvFragCoord, EbvPointCoord, EbvFragColor, EbvFragData, EbvFragDepth, EbvFragStencilRef, EbvSampleId, EbvSamplePosition, EbvSampleMask, EbvHelperInvocation, EbvBaryCoordNoPersp, EbvBaryCoordNoPerspCentroid, EbvBaryCoordNoPerspSample, EbvBaryCoordSmooth, EbvBaryCoordSmoothCentroid, EbvBaryCoordSmoothSample, EbvBaryCoordPullModel, EbvViewIndex, EbvDeviceIndex, EbvShadingRateKHR, EbvPrimitiveShadingRateKHR, EbvFragSizeEXT, EbvFragInvocationCountEXT, EbvSecondaryFragDataEXT, EbvSecondaryFragColorEXT, EbvViewportMaskNV, EbvSecondaryPositionNV, EbvSecondaryViewportMaskNV, EbvPositionPerViewNV, EbvViewportMaskPerViewNV, EbvFragFullyCoveredNV, EbvFragmentSizeNV, EbvInvocationsPerPixelNV, // ray tracing EbvLaunchId, EbvLaunchSize, EbvInstanceCustomIndex, EbvGeometryIndex, EbvWorldRayOrigin, EbvWorldRayDirection, EbvObjectRayOrigin, EbvObjectRayDirection, EbvRayTmin, EbvRayTmax, EbvCullMask, EbvHitKind, EbvObjectToWorld, EbvObjectToWorld3x4, EbvWorldToObject, EbvWorldToObject3x4, EbvIncomingRayFlags, EbvCurrentRayTimeNV, EbvClusterIDNV, // barycentrics EbvBaryCoordNV, EbvBaryCoordNoPerspNV, EbvBaryCoordEXT, EbvBaryCoordNoPerspEXT, // mesh shaders EbvTaskCountNV, EbvPrimitiveCountNV, EbvPrimitiveIndicesNV, EbvClipDistancePerViewNV, EbvCullDistancePerViewNV, EbvLayerPerViewNV, EbvMeshViewCountNV, EbvMeshViewIndicesNV, EbvMicroTrianglePositionNV, EbvMicroTriangleBaryNV, EbvHitKindFrontFacingMicroTriangleNV, EbvHitKindBackFacingMicroTriangleNV, EbvHitIsSphereNV, EbvHitIsLSSNV, EbvHitSpherePositionNV, EbvHitSphereRadiusNV, EbvHitLSSPositionsNV, EbvHitLSSRadiiNV, //GL_EXT_mesh_shader EbvPrimitivePointIndicesEXT, EbvPrimitiveLineIndicesEXT, EbvPrimitiveTriangleIndicesEXT, EbvCullPrimitiveEXT, // sm builtins EbvWarpsPerSM, EbvSMCount, EbvWarpID, EbvSMID, // HLSL built-ins that live only temporarily, until they get remapped // to one of the above. EbvFragDepthGreater, EbvFragDepthLesser, EbvGsOutputStream, EbvOutputPatch, EbvInputPatch, // structbuffer types EbvAppendConsume, // no need to differentiate append and consume EbvRWStructuredBuffer, EbvStructuredBuffer, EbvByteAddressBuffer, EbvRWByteAddressBuffer, // ARM specific core builtins EbvCoreCountARM, EbvCoreIDARM, EbvCoreMaxIDARM, EbvWarpIDARM, EbvWarpMaxIDARM, EbvPositionFetch, // SPV_QCOM_tile_shading EbvTileOffsetQCOM, EbvTileDimensionQCOM, EbvTileApronSizeQCOM, EbvLast }; // In this enum, order matters; users can assume higher precision is a bigger value // and EpqNone is 0. enum TPrecisionQualifier { EpqNone = 0, EpqLow, EpqMedium, EpqHigh }; // These will show up in error messages __inline const char* GetStorageQualifierString(TStorageQualifier q) { switch (q) { case EvqTemporary: return "temp"; break; case EvqGlobal: return "global"; break; case EvqConst: return "const"; break; case EvqConstReadOnly: return "const (read only)"; break; case EvqSpirvStorageClass: return "spirv_storage_class"; break; case EvqVaryingIn: return "in"; break; case EvqVaryingOut: return "out"; break; case EvqUniform: return "uniform"; break; case EvqBuffer: return "buffer"; break; case EvqShared: return "shared"; break; case EvqIn: return "in"; break; case EvqOut: return "out"; break; case EvqInOut: return "inout"; break; case EvqVertexId: return "gl_VertexId"; break; case EvqInstanceId: return "gl_InstanceId"; break; case EvqPosition: return "gl_Position"; break; case EvqPointSize: return "gl_PointSize"; break; case EvqClipVertex: return "gl_ClipVertex"; break; case EvqFace: return "gl_FrontFacing"; break; case EvqFragCoord: return "gl_FragCoord"; break; case EvqPointCoord: return "gl_PointCoord"; break; case EvqFragColor: return "fragColor"; break; case EvqFragDepth: return "gl_FragDepth"; break; case EvqFragStencil: return "gl_FragStencilRefARB"; break; case EvqPayload: return "rayPayloadNV"; break; case EvqPayloadIn: return "rayPayloadInNV"; break; case EvqHitAttr: return "hitAttributeNV"; break; case EvqCallableData: return "callableDataNV"; break; case EvqCallableDataIn: return "callableDataInNV"; break; case EvqtaskPayloadSharedEXT: return "taskPayloadSharedEXT"; break; case EvqHitObjectAttrNV:return "hitObjectAttributeNV"; break; default: return "unknown qualifier"; } } __inline const char* GetBuiltInVariableString(TBuiltInVariable v) { switch (v) { case EbvNone: return ""; case EbvNumWorkGroups: return "NumWorkGroups"; case EbvWorkGroupSize: return "WorkGroupSize"; case EbvWorkGroupId: return "WorkGroupID"; case EbvLocalInvocationId: return "LocalInvocationID"; case EbvGlobalInvocationId: return "GlobalInvocationID"; case EbvLocalInvocationIndex: return "LocalInvocationIndex"; case EbvNumSubgroups: return "NumSubgroups"; case EbvSubgroupID: return "SubgroupID"; case EbvSubGroupSize: return "SubGroupSize"; case EbvSubGroupInvocation: return "SubGroupInvocation"; case EbvSubGroupEqMask: return "SubGroupEqMask"; case EbvSubGroupGeMask: return "SubGroupGeMask"; case EbvSubGroupGtMask: return "SubGroupGtMask"; case EbvSubGroupLeMask: return "SubGroupLeMask"; case EbvSubGroupLtMask: return "SubGroupLtMask"; case EbvSubgroupSize2: return "SubgroupSize"; case EbvSubgroupInvocation2: return "SubgroupInvocationID"; case EbvSubgroupEqMask2: return "SubgroupEqMask"; case EbvSubgroupGeMask2: return "SubgroupGeMask"; case EbvSubgroupGtMask2: return "SubgroupGtMask"; case EbvSubgroupLeMask2: return "SubgroupLeMask"; case EbvSubgroupLtMask2: return "SubgroupLtMask"; case EbvVertexId: return "VertexId"; case EbvInstanceId: return "InstanceId"; case EbvVertexIndex: return "VertexIndex"; case EbvInstanceIndex: return "InstanceIndex"; case EbvBaseVertex: return "BaseVertex"; case EbvBaseInstance: return "BaseInstance"; case EbvDrawId: return "DrawId"; case EbvPosition: return "Position"; case EbvPointSize: return "PointSize"; case EbvClipVertex: return "ClipVertex"; case EbvClipDistance: return "ClipDistance"; case EbvCullDistance: return "CullDistance"; case EbvNormal: return "Normal"; case EbvVertex: return "Vertex"; case EbvMultiTexCoord0: return "MultiTexCoord0"; case EbvMultiTexCoord1: return "MultiTexCoord1"; case EbvMultiTexCoord2: return "MultiTexCoord2"; case EbvMultiTexCoord3: return "MultiTexCoord3"; case EbvMultiTexCoord4: return "MultiTexCoord4"; case EbvMultiTexCoord5: return "MultiTexCoord5"; case EbvMultiTexCoord6: return "MultiTexCoord6"; case EbvMultiTexCoord7: return "MultiTexCoord7"; case EbvFrontColor: return "FrontColor"; case EbvBackColor: return "BackColor"; case EbvFrontSecondaryColor: return "FrontSecondaryColor"; case EbvBackSecondaryColor: return "BackSecondaryColor"; case EbvTexCoord: return "TexCoord"; case EbvFogFragCoord: return "FogFragCoord"; case EbvInvocationId: return "InvocationID"; case EbvPrimitiveId: return "PrimitiveID"; case EbvLayer: return "Layer"; case EbvViewportIndex: return "ViewportIndex"; case EbvPatchVertices: return "PatchVertices"; case EbvTessLevelOuter: return "TessLevelOuter"; case EbvTessLevelInner: return "TessLevelInner"; case EbvBoundingBox: return "BoundingBox"; case EbvTessCoord: return "TessCoord"; case EbvColor: return "Color"; case EbvSecondaryColor: return "SecondaryColor"; case EbvFace: return "Face"; case EbvFragCoord: return "FragCoord"; case EbvPointCoord: return "PointCoord"; case EbvFragColor: return "FragColor"; case EbvFragData: return "FragData"; case EbvFragDepth: return "FragDepth"; case EbvFragStencilRef: return "FragStencilRef"; case EbvSampleId: return "SampleId"; case EbvSamplePosition: return "SamplePosition"; case EbvSampleMask: return "SampleMaskIn"; case EbvHelperInvocation: return "HelperInvocation"; case EbvBaryCoordNoPersp: return "BaryCoordNoPersp"; case EbvBaryCoordNoPerspCentroid: return "BaryCoordNoPerspCentroid"; case EbvBaryCoordNoPerspSample: return "BaryCoordNoPerspSample"; case EbvBaryCoordSmooth: return "BaryCoordSmooth"; case EbvBaryCoordSmoothCentroid: return "BaryCoordSmoothCentroid"; case EbvBaryCoordSmoothSample: return "BaryCoordSmoothSample"; case EbvBaryCoordPullModel: return "BaryCoordPullModel"; case EbvViewIndex: return "ViewIndex"; case EbvDeviceIndex: return "DeviceIndex"; case EbvFragSizeEXT: return "FragSizeEXT"; case EbvFragInvocationCountEXT: return "FragInvocationCountEXT"; case EbvSecondaryFragDataEXT: return "SecondaryFragDataEXT"; case EbvSecondaryFragColorEXT: return "SecondaryFragColorEXT"; case EbvViewportMaskNV: return "ViewportMaskNV"; case EbvSecondaryPositionNV: return "SecondaryPositionNV"; case EbvSecondaryViewportMaskNV: return "SecondaryViewportMaskNV"; case EbvPositionPerViewNV: return "PositionPerViewNV"; case EbvViewportMaskPerViewNV: return "ViewportMaskPerViewNV"; case EbvFragFullyCoveredNV: return "FragFullyCoveredNV"; case EbvFragmentSizeNV: return "FragmentSizeNV"; case EbvInvocationsPerPixelNV: return "InvocationsPerPixelNV"; case EbvLaunchId: return "LaunchIdNV"; case EbvLaunchSize: return "LaunchSizeNV"; case EbvInstanceCustomIndex: return "InstanceCustomIndexNV"; case EbvGeometryIndex: return "GeometryIndexEXT"; case EbvWorldRayOrigin: return "WorldRayOriginNV"; case EbvWorldRayDirection: return "WorldRayDirectionNV"; case EbvObjectRayOrigin: return "ObjectRayOriginNV"; case EbvObjectRayDirection: return "ObjectRayDirectionNV"; case EbvRayTmin: return "ObjectRayTminNV"; case EbvRayTmax: return "ObjectRayTmaxNV"; case EbvHitKind: return "HitKindNV"; case EbvIncomingRayFlags: return "IncomingRayFlagsNV"; case EbvObjectToWorld: return "ObjectToWorldNV"; case EbvWorldToObject: return "WorldToObjectNV"; case EbvCurrentRayTimeNV: return "CurrentRayTimeNV"; case EbvClusterIDNV: return "ClusterIDNV"; case EbvBaryCoordEXT: case EbvBaryCoordNV: return "BaryCoordKHR"; case EbvBaryCoordNoPerspEXT: case EbvBaryCoordNoPerspNV: return "BaryCoordNoPerspKHR"; case EbvTaskCountNV: return "TaskCountNV"; case EbvPrimitiveCountNV: return "PrimitiveCountNV"; case EbvPrimitiveIndicesNV: return "PrimitiveIndicesNV"; case EbvClipDistancePerViewNV: return "ClipDistancePerViewNV"; case EbvCullDistancePerViewNV: return "CullDistancePerViewNV"; case EbvLayerPerViewNV: return "LayerPerViewNV"; case EbvMeshViewCountNV: return "MeshViewCountNV"; case EbvMeshViewIndicesNV: return "MeshViewIndicesNV"; // GL_EXT_mesh_shader case EbvPrimitivePointIndicesEXT: return "PrimitivePointIndicesEXT"; case EbvPrimitiveLineIndicesEXT: return "PrimitiveLineIndicesEXT"; case EbvPrimitiveTriangleIndicesEXT: return "PrimitiveTriangleIndicesEXT"; case EbvCullPrimitiveEXT: return "CullPrimitiveEXT"; case EbvWarpsPerSM: return "WarpsPerSMNV"; case EbvSMCount: return "SMCountNV"; case EbvWarpID: return "WarpIDNV"; case EbvSMID: return "SMIDNV"; case EbvShadingRateKHR: return "ShadingRateKHR"; case EbvPrimitiveShadingRateKHR: return "PrimitiveShadingRateKHR"; case EbvHitKindFrontFacingMicroTriangleNV: return "HitKindFrontFacingMicroTriangleNV"; case EbvHitKindBackFacingMicroTriangleNV: return "HitKindBackFacingMicroTriangleNV"; case EbvHitIsSphereNV: return "HitIsSphereNV"; case EbvHitIsLSSNV: return "HitIsLSSNV"; case EbvHitSpherePositionNV: return "HitSpherePositionNV"; case EbvHitSphereRadiusNV: return "HitSphereRadiusNV"; case EbvHitLSSPositionsNV: return "HitSpherePositionsNV"; case EbvHitLSSRadiiNV: return "HitLSSRadiiNV"; default: return "unknown built-in variable"; } } __inline const char* GetPrecisionQualifierString(TPrecisionQualifier p) { switch (p) { case EpqNone: return ""; break; case EpqLow: return "lowp"; break; case EpqMedium: return "mediump"; break; case EpqHigh: return "highp"; break; default: return "unknown precision qualifier"; } } __inline bool isTypeSignedInt(TBasicType type) { switch (type) { case EbtInt8: case EbtInt16: case EbtInt: case EbtInt64: return true; default: return false; } } __inline bool isTypeUnsignedInt(TBasicType type) { switch (type) { case EbtUint8: case EbtUint16: case EbtUint: case EbtUint64: return true; default: return false; } } __inline bool isTypeInt(TBasicType type) { return isTypeSignedInt(type) || isTypeUnsignedInt(type); } __inline bool isTypeFloat(TBasicType type) { switch (type) { case EbtFloat: case EbtDouble: case EbtFloat16: case EbtBFloat16: case EbtFloatE5M2: case EbtFloatE4M3: return true; default: return false; } } __inline uint32_t GetNumBits(TBasicType type) { switch (type) { case EbtInt8: case EbtUint8: case EbtFloatE5M2: case EbtFloatE4M3: return 8; case EbtBFloat16: case EbtFloat16: case EbtInt16: case EbtUint16: return 16; case EbtInt: case EbtUint: case EbtFloat: return 32; case EbtDouble: case EbtInt64: case EbtUint64: return 64; default: assert(false); return 0; } } __inline int getTypeRank(TBasicType type) { int res = -1; switch(type) { case EbtInt8: case EbtUint8: res = 0; break; case EbtInt16: case EbtUint16: res = 1; break; case EbtInt: case EbtUint: res = 2; break; case EbtInt64: case EbtUint64: res = 3; break; default: assert(false); break; } return res; } } // end namespace glslang #endif // _BASICTYPES_INCLUDED_ ================================================ FILE: src/libraries/glslang/glslang/Include/Common.h ================================================ // // Copyright (C) 2002-2005 3Dlabs Inc. Ltd. // Copyright (C) 2012-2013 LunarG, Inc. // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following // disclaimer in the documentation and/or other materials provided // with the distribution. // // Neither the name of 3Dlabs Inc. Ltd. nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // #ifndef _COMMON_INCLUDED_ #define _COMMON_INCLUDED_ #include #include #ifdef _MSC_VER #include #else #include #endif #include #include #include #include #include #include #include #include #include #include #if defined(__ANDROID__) #include namespace std { template std::string to_string(const T& val) { std::ostringstream os; os << val; return os.str(); } } #endif #if defined(MINGW_HAS_SECURE_API) && MINGW_HAS_SECURE_API #include #ifndef snprintf #define snprintf sprintf_s #endif #define safe_vsprintf(buf,max,format,args) vsnprintf_s((buf), (max), (max), (format), (args)) #elif defined (solaris) #define safe_vsprintf(buf,max,format,args) vsnprintf((buf), (max), (format), (args)) #include #define UINT_PTR uintptr_t #else #define safe_vsprintf(buf,max,format,args) vsnprintf((buf), (max), (format), (args)) #include #define UINT_PTR uintptr_t #endif #if defined(_MSC_VER) #define strdup _strdup #endif /* windows only pragma */ #ifdef _MSC_VER #pragma warning(disable : 4786) // Don't warn about too long identifiers #pragma warning(disable : 4514) // unused inline method #pragma warning(disable : 4201) // nameless union #endif // Allow compilation to WASI which does not support threads yet. #ifdef __wasi__ #define DISABLE_THREAD_SUPPORT #endif #include "PoolAlloc.h" // // Put POOL_ALLOCATOR_NEW_DELETE in base classes to make them use this scheme. // #define POOL_ALLOCATOR_NEW_DELETE(A) \ void* operator new(size_t s) { return (A).allocate(s); } \ void* operator new(size_t, void *_Where) { return (_Where); } \ void operator delete(void*) { } \ void operator delete(void *, void *) { } \ void* operator new[](size_t s) { return (A).allocate(s); } \ void* operator new[](size_t, void *_Where) { return (_Where); } \ void operator delete[](void*) { } \ void operator delete[](void *, void *) { } namespace glslang { // // Pool version of string. // typedef pool_allocator TStringAllocator; typedef std::basic_string , TStringAllocator> TString; } // end namespace glslang // Repackage the std::hash for use by unordered map/set with a TString key. namespace std { template<> struct hash { std::size_t operator()(const glslang::TString& s) const { const unsigned _FNV_offset_basis = 2166136261U; const unsigned _FNV_prime = 16777619U; unsigned _Val = _FNV_offset_basis; size_t _Count = s.size(); const char* _First = s.c_str(); for (size_t _Next = 0; _Next < _Count; ++_Next) { _Val ^= (unsigned)_First[_Next]; _Val *= _FNV_prime; } return _Val; } }; } namespace glslang { inline TString* NewPoolTString(const char* s) { void* memory = GetThreadPoolAllocator().allocate(sizeof(TString)); return new(memory) TString(s); } template inline T* NewPoolObject(T*) { return new(GetThreadPoolAllocator().allocate(sizeof(T))) T; } template inline T* NewPoolObject(T, int instances) { return new(GetThreadPoolAllocator().allocate(instances * sizeof(T))) T[instances]; } inline bool StartsWith(TString const &str, const char *prefix) { return str.compare(0, strlen(prefix), prefix) == 0; } // // Pool allocator versions of vectors, lists, and maps // template class TVector : public std::vector > { public: POOL_ALLOCATOR_NEW_DELETE(GetThreadPoolAllocator()) typedef typename std::vector >::size_type size_type; TVector() : std::vector >() {} TVector(const pool_allocator& a) : std::vector >(a) {} TVector(size_type i) : std::vector >(i) {} TVector(size_type i, const T& val) : std::vector >(i, val) {} }; template class TList : public std::list > { }; template > class TMap : public std::map > > { }; template , class PRED = std::equal_to > class TUnorderedMap : public std::unordered_map > > { }; template > class TSet : public std::set > { }; // // Persistent string memory. Should only be used for strings that survive // across compiles/links. // typedef std::basic_string TPersistString; // // templatized min and max functions. // template T Min(const T a, const T b) { return a < b ? a : b; } template T Max(const T a, const T b) { return a > b ? a : b; } // // Create a TString object from an integer. // #if defined(_MSC_VER) || (defined(MINGW_HAS_SECURE_API) && MINGW_HAS_SECURE_API) inline const TString String(const int i, const int base = 10) { char text[16]; // 32 bit ints are at most 10 digits in base 10 _itoa_s(i, text, sizeof(text), base); return text; } #else inline const TString String(const int i, const int /*base*/ = 10) { char text[16]; // 32 bit ints are at most 10 digits in base 10 // we assume base 10 for all cases snprintf(text, sizeof(text), "%d", i); return text; } #endif struct TSourceLoc { void init() { name = nullptr; string = 0; line = 0; column = 0; } void init(int stringNum) { init(); string = stringNum; } // Returns the name if it exists. Otherwise, returns the string number. std::string getStringNameOrNum(bool quoteStringName = true) const { if (name != nullptr) { TString qstr = quoteStringName ? ("\"" + *name + "\"") : *name; std::string ret_str(qstr.c_str()); return ret_str; } return std::to_string((long long)string); } const char* getFilename() const { if (name == nullptr) return nullptr; return name->c_str(); } const char* getFilenameStr() const { return name == nullptr ? "" : name->c_str(); } TString* name; // descriptive name for this string, when a textual name is available, otherwise nullptr int string; int line; int column; }; class TPragmaTable : public TMap { public: POOL_ALLOCATOR_NEW_DELETE(GetThreadPoolAllocator()) }; const int MaxTokenLength = 1024; template bool IsPow2(T powerOf2) { if (powerOf2 <= 0) return false; return (powerOf2 & (powerOf2 - 1)) == 0; } // Round number up to a multiple of the given powerOf2, which is not // a power, just a number that must be a power of 2. template void RoundToPow2(T& number, int powerOf2) { assert(IsPow2(powerOf2)); number = (number + powerOf2 - 1) & ~(powerOf2 - 1); } template bool IsMultipleOfPow2(T number, int powerOf2) { assert(IsPow2(powerOf2)); return ! (number & (powerOf2 - 1)); } // Returns log2 of an integer power of 2. // T should be integral. template int IntLog2(T n) { assert(IsPow2(n)); int result = 0; while ((T(1) << result) != n) { result++; } return result; } } // end namespace glslang #endif // _COMMON_INCLUDED_ ================================================ FILE: src/libraries/glslang/glslang/Include/ConstantUnion.h ================================================ // // Copyright (C) 2002-2005 3Dlabs Inc. Ltd. // Copyright (C) 2013 LunarG, Inc. // Copyright (C) 2017 ARM Limited. // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following // disclaimer in the documentation and/or other materials provided // with the distribution. // // Neither the name of 3Dlabs Inc. Ltd. nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // #ifndef _CONSTANT_UNION_INCLUDED_ #define _CONSTANT_UNION_INCLUDED_ #include "../Include/Common.h" #include "../Include/BaseTypes.h" namespace glslang { class TConstUnion { public: POOL_ALLOCATOR_NEW_DELETE(GetThreadPoolAllocator()) TConstUnion() : iConst(0), type(EbtInt) { } void setI8Const(signed char i) { i8Const = i; type = EbtInt8; } void setU8Const(unsigned char u) { u8Const = u; type = EbtUint8; } void setI16Const(signed short i) { i16Const = i; type = EbtInt16; } void setU16Const(unsigned short u) { u16Const = u; type = EbtUint16; } void setIConst(int i) { iConst = i; type = EbtInt; } void setUConst(unsigned int u) { uConst = u; type = EbtUint; } void setI64Const(long long i64) { i64Const = i64; type = EbtInt64; } void setU64Const(unsigned long long u64) { u64Const = u64; type = EbtUint64; } void setDConst(double d) { dConst = d; type = EbtDouble; } void setBConst(bool b) { bConst = b; type = EbtBool; } void setSConst(const TString* s) { sConst = s; type = EbtString; } signed char getI8Const() const { return i8Const; } unsigned char getU8Const() const { return u8Const; } signed short getI16Const() const { return i16Const; } unsigned short getU16Const() const { return u16Const; } int getIConst() const { return iConst; } unsigned int getUConst() const { return uConst; } long long getI64Const() const { return i64Const; } unsigned long long getU64Const() const { return u64Const; } double getDConst() const { return dConst; } bool getBConst() const { return bConst; } const TString* getSConst() const { return sConst; } bool operator==(const signed char i) const { if (i == i8Const) return true; return false; } bool operator==(const unsigned char u) const { if (u == u8Const) return true; return false; } bool operator==(const signed short i) const { if (i == i16Const) return true; return false; } bool operator==(const unsigned short u) const { if (u == u16Const) return true; return false; } bool operator==(const int i) const { if (i == iConst) return true; return false; } bool operator==(const unsigned int u) const { if (u == uConst) return true; return false; } bool operator==(const long long i64) const { if (i64 == i64Const) return true; return false; } bool operator==(const unsigned long long u64) const { if (u64 == u64Const) return true; return false; } bool operator==(const double d) const { if (d == dConst) return true; return false; } bool operator==(const bool b) const { if (b == bConst) return true; return false; } bool operator==(const TConstUnion& constant) const { if (constant.type != type) return false; switch (type) { case EbtInt: if (constant.iConst == iConst) return true; break; case EbtUint: if (constant.uConst == uConst) return true; break; case EbtBool: if (constant.bConst == bConst) return true; break; case EbtDouble: if (constant.dConst == dConst) return true; break; case EbtInt16: if (constant.i16Const == i16Const) return true; break; case EbtUint16: if (constant.u16Const == u16Const) return true; break; case EbtInt8: if (constant.i8Const == i8Const) return true; break; case EbtUint8: if (constant.u8Const == u8Const) return true; break; case EbtInt64: if (constant.i64Const == i64Const) return true; break; case EbtUint64: if (constant.u64Const == u64Const) return true; break; default: assert(false && "Default missing"); } return false; } bool operator!=(const signed char i) const { return !operator==(i); } bool operator!=(const unsigned char u) const { return !operator==(u); } bool operator!=(const signed short i) const { return !operator==(i); } bool operator!=(const unsigned short u) const { return !operator==(u); } bool operator!=(const int i) const { return !operator==(i); } bool operator!=(const unsigned int u) const { return !operator==(u); } bool operator!=(const long long i) const { return !operator==(i); } bool operator!=(const unsigned long long u) const { return !operator==(u); } bool operator!=(const float f) const { return !operator==(f); } bool operator!=(const bool b) const { return !operator==(b); } bool operator!=(const TConstUnion& constant) const { return !operator==(constant); } bool operator>(const TConstUnion& constant) const { assert(type == constant.type); switch (type) { case EbtInt: if (iConst > constant.iConst) return true; return false; case EbtUint: if (uConst > constant.uConst) return true; return false; case EbtDouble: if (dConst > constant.dConst) return true; return false; case EbtInt8: if (i8Const > constant.i8Const) return true; return false; case EbtUint8: if (u8Const > constant.u8Const) return true; return false; case EbtInt16: if (i16Const > constant.i16Const) return true; return false; case EbtUint16: if (u16Const > constant.u16Const) return true; return false; case EbtInt64: if (i64Const > constant.i64Const) return true; return false; case EbtUint64: if (u64Const > constant.u64Const) return true; return false; default: assert(false && "Default missing"); return false; } } bool operator<(const TConstUnion& constant) const { assert(type == constant.type); switch (type) { case EbtInt8: if (i8Const < constant.i8Const) return true; return false; case EbtUint8: if (u8Const < constant.u8Const) return true; return false; case EbtInt16: if (i16Const < constant.i16Const) return true; return false; case EbtUint16: if (u16Const < constant.u16Const) return true; return false; case EbtInt64: if (i64Const < constant.i64Const) return true; return false; case EbtUint64: if (u64Const < constant.u64Const) return true; return false; case EbtDouble: if (dConst < constant.dConst) return true; return false; case EbtInt: if (iConst < constant.iConst) return true; return false; case EbtUint: if (uConst < constant.uConst) return true; return false; default: assert(false && "Default missing"); return false; } } TConstUnion operator+(const TConstUnion& constant) const { TConstUnion returnValue; assert(type == constant.type); switch (type) { case EbtInt: returnValue.setIConst(iConst + constant.iConst); break; case EbtUint: returnValue.setUConst(uConst + constant.uConst); break; case EbtDouble: returnValue.setDConst(dConst + constant.dConst); break; case EbtInt8: returnValue.setI8Const(i8Const + constant.i8Const); break; case EbtInt16: returnValue.setI16Const(i16Const + constant.i16Const); break; case EbtInt64: returnValue.setI64Const(i64Const + constant.i64Const); break; case EbtUint8: returnValue.setU8Const(u8Const + constant.u8Const); break; case EbtUint16: returnValue.setU16Const(u16Const + constant.u16Const); break; case EbtUint64: returnValue.setU64Const(u64Const + constant.u64Const); break; default: assert(false && "Default missing"); } return returnValue; } TConstUnion operator-(const TConstUnion& constant) const { TConstUnion returnValue; assert(type == constant.type); switch (type) { case EbtInt: returnValue.setIConst(iConst - constant.iConst); break; case EbtUint: returnValue.setUConst(uConst - constant.uConst); break; case EbtDouble: returnValue.setDConst(dConst - constant.dConst); break; case EbtInt8: returnValue.setI8Const(i8Const - constant.i8Const); break; case EbtInt16: returnValue.setI16Const(i16Const - constant.i16Const); break; case EbtInt64: returnValue.setI64Const(i64Const - constant.i64Const); break; case EbtUint8: returnValue.setU8Const(u8Const - constant.u8Const); break; case EbtUint16: returnValue.setU16Const(u16Const - constant.u16Const); break; case EbtUint64: returnValue.setU64Const(u64Const - constant.u64Const); break; default: assert(false && "Default missing"); } return returnValue; } TConstUnion operator*(const TConstUnion& constant) const { TConstUnion returnValue; assert(type == constant.type); switch (type) { case EbtInt: returnValue.setIConst(iConst * constant.iConst); break; case EbtUint: returnValue.setUConst(uConst * constant.uConst); break; case EbtDouble: returnValue.setDConst(dConst * constant.dConst); break; case EbtInt8: returnValue.setI8Const(i8Const * constant.i8Const); break; case EbtInt16: returnValue.setI16Const(i16Const * constant.i16Const); break; case EbtInt64: returnValue.setI64Const(i64Const * constant.i64Const); break; case EbtUint8: returnValue.setU8Const(u8Const * constant.u8Const); break; case EbtUint16: returnValue.setU16Const(u16Const * constant.u16Const); break; case EbtUint64: returnValue.setU64Const(u64Const * constant.u64Const); break; default: assert(false && "Default missing"); } return returnValue; } TConstUnion operator%(const TConstUnion& constant) const { TConstUnion returnValue; assert(type == constant.type); switch (type) { case EbtInt: returnValue.setIConst(iConst % constant.iConst); break; case EbtUint: returnValue.setUConst(uConst % constant.uConst); break; case EbtInt8: returnValue.setI8Const(i8Const % constant.i8Const); break; case EbtInt16: returnValue.setI16Const(i16Const % constant.i16Const); break; case EbtInt64: returnValue.setI64Const(i64Const % constant.i64Const); break; case EbtUint8: returnValue.setU8Const(u8Const % constant.u8Const); break; case EbtUint16: returnValue.setU16Const(u16Const % constant.u16Const); break; case EbtUint64: returnValue.setU64Const(u64Const % constant.u64Const); break; default: assert(false && "Default missing"); } return returnValue; } TConstUnion operator>>(const TConstUnion& constant) const { TConstUnion returnValue; switch (type) { case EbtInt8: switch (constant.type) { case EbtInt8: returnValue.setI8Const(i8Const >> constant.i8Const); break; case EbtUint8: returnValue.setI8Const(i8Const >> constant.u8Const); break; case EbtInt16: returnValue.setI8Const(i8Const >> constant.i16Const); break; case EbtUint16: returnValue.setI8Const(i8Const >> constant.u16Const); break; case EbtInt: returnValue.setI8Const(i8Const >> constant.iConst); break; case EbtUint: returnValue.setI8Const(i8Const >> constant.uConst); break; case EbtInt64: returnValue.setI8Const(i8Const >> constant.i64Const); break; case EbtUint64: returnValue.setI8Const(i8Const >> constant.u64Const); break; default: assert(false && "Default missing"); } break; case EbtUint8: switch (constant.type) { case EbtInt8: returnValue.setU8Const(u8Const >> constant.i8Const); break; case EbtUint8: returnValue.setU8Const(u8Const >> constant.u8Const); break; case EbtInt16: returnValue.setU8Const(u8Const >> constant.i16Const); break; case EbtUint16: returnValue.setU8Const(u8Const >> constant.u16Const); break; case EbtInt: returnValue.setU8Const(u8Const >> constant.iConst); break; case EbtUint: returnValue.setU8Const(u8Const >> constant.uConst); break; case EbtInt64: returnValue.setU8Const(u8Const >> constant.i64Const); break; case EbtUint64: returnValue.setU8Const(u8Const >> constant.u64Const); break; default: assert(false && "Default missing"); } break; case EbtInt16: switch (constant.type) { case EbtInt8: returnValue.setI16Const(i16Const >> constant.i8Const); break; case EbtUint8: returnValue.setI16Const(i16Const >> constant.u8Const); break; case EbtInt16: returnValue.setI16Const(i16Const >> constant.i16Const); break; case EbtUint16: returnValue.setI16Const(i16Const >> constant.u16Const); break; case EbtInt: returnValue.setI16Const(i16Const >> constant.iConst); break; case EbtUint: returnValue.setI16Const(i16Const >> constant.uConst); break; case EbtInt64: returnValue.setI16Const(i16Const >> constant.i64Const); break; case EbtUint64: returnValue.setI16Const(i16Const >> constant.u64Const); break; default: assert(false && "Default missing"); } break; case EbtUint16: switch (constant.type) { case EbtInt8: returnValue.setU16Const(u16Const >> constant.i8Const); break; case EbtUint8: returnValue.setU16Const(u16Const >> constant.u8Const); break; case EbtInt16: returnValue.setU16Const(u16Const >> constant.i16Const); break; case EbtUint16: returnValue.setU16Const(u16Const >> constant.u16Const); break; case EbtInt: returnValue.setU16Const(u16Const >> constant.iConst); break; case EbtUint: returnValue.setU16Const(u16Const >> constant.uConst); break; case EbtInt64: returnValue.setU16Const(u16Const >> constant.i64Const); break; case EbtUint64: returnValue.setU16Const(u16Const >> constant.u64Const); break; default: assert(false && "Default missing"); } break; case EbtInt: switch (constant.type) { case EbtInt: returnValue.setIConst(iConst >> constant.iConst); break; case EbtUint: returnValue.setIConst(iConst >> constant.uConst); break; case EbtInt8: returnValue.setIConst(iConst >> constant.i8Const); break; case EbtUint8: returnValue.setIConst(iConst >> constant.u8Const); break; case EbtInt16: returnValue.setIConst(iConst >> constant.i16Const); break; case EbtUint16: returnValue.setIConst(iConst >> constant.u16Const); break; case EbtInt64: returnValue.setIConst(iConst >> constant.i64Const); break; case EbtUint64: returnValue.setIConst(iConst >> constant.u64Const); break; default: assert(false && "Default missing"); } break; case EbtUint: switch (constant.type) { case EbtInt: returnValue.setUConst(uConst >> constant.iConst); break; case EbtUint: returnValue.setUConst(uConst >> constant.uConst); break; case EbtInt8: returnValue.setUConst(uConst >> constant.i8Const); break; case EbtUint8: returnValue.setUConst(uConst >> constant.u8Const); break; case EbtInt16: returnValue.setUConst(uConst >> constant.i16Const); break; case EbtUint16: returnValue.setUConst(uConst >> constant.u16Const); break; case EbtInt64: returnValue.setUConst(uConst >> constant.i64Const); break; case EbtUint64: returnValue.setUConst(uConst >> constant.u64Const); break; default: assert(false && "Default missing"); } break; case EbtInt64: switch (constant.type) { case EbtInt8: returnValue.setI64Const(i64Const >> constant.i8Const); break; case EbtUint8: returnValue.setI64Const(i64Const >> constant.u8Const); break; case EbtInt16: returnValue.setI64Const(i64Const >> constant.i16Const); break; case EbtUint16: returnValue.setI64Const(i64Const >> constant.u16Const); break; case EbtInt: returnValue.setI64Const(i64Const >> constant.iConst); break; case EbtUint: returnValue.setI64Const(i64Const >> constant.uConst); break; case EbtInt64: returnValue.setI64Const(i64Const >> constant.i64Const); break; case EbtUint64: returnValue.setI64Const(i64Const >> constant.u64Const); break; default: assert(false && "Default missing"); } break; case EbtUint64: switch (constant.type) { case EbtInt8: returnValue.setU64Const(u64Const >> constant.i8Const); break; case EbtUint8: returnValue.setU64Const(u64Const >> constant.u8Const); break; case EbtInt16: returnValue.setU64Const(u64Const >> constant.i16Const); break; case EbtUint16: returnValue.setU64Const(u64Const >> constant.u16Const); break; case EbtInt: returnValue.setU64Const(u64Const >> constant.iConst); break; case EbtUint: returnValue.setU64Const(u64Const >> constant.uConst); break; case EbtInt64: returnValue.setU64Const(u64Const >> constant.i64Const); break; case EbtUint64: returnValue.setU64Const(u64Const >> constant.u64Const); break; default: assert(false && "Default missing"); } break; default: assert(false && "Default missing"); } return returnValue; } TConstUnion operator<<(const TConstUnion& constant) const { TConstUnion returnValue; switch (type) { case EbtInt8: switch (constant.type) { case EbtInt8: returnValue.setI8Const(i8Const << constant.i8Const); break; case EbtUint8: returnValue.setI8Const(i8Const << constant.u8Const); break; case EbtInt16: returnValue.setI8Const(i8Const << constant.i16Const); break; case EbtUint16: returnValue.setI8Const(i8Const << constant.u16Const); break; case EbtInt: returnValue.setI8Const(i8Const << constant.iConst); break; case EbtUint: returnValue.setI8Const(i8Const << constant.uConst); break; case EbtInt64: returnValue.setI8Const(i8Const << constant.i64Const); break; case EbtUint64: returnValue.setI8Const(i8Const << constant.u64Const); break; default: assert(false && "Default missing"); } break; case EbtUint8: switch (constant.type) { case EbtInt8: returnValue.setU8Const(u8Const << constant.i8Const); break; case EbtUint8: returnValue.setU8Const(u8Const << constant.u8Const); break; case EbtInt16: returnValue.setU8Const(u8Const << constant.i16Const); break; case EbtUint16: returnValue.setU8Const(u8Const << constant.u16Const); break; case EbtInt: returnValue.setU8Const(u8Const << constant.iConst); break; case EbtUint: returnValue.setU8Const(u8Const << constant.uConst); break; case EbtInt64: returnValue.setU8Const(u8Const << constant.i64Const); break; case EbtUint64: returnValue.setU8Const(u8Const << constant.u64Const); break; default: assert(false && "Default missing"); } break; case EbtInt16: switch (constant.type) { case EbtInt8: returnValue.setI16Const(i16Const << constant.i8Const); break; case EbtUint8: returnValue.setI16Const(i16Const << constant.u8Const); break; case EbtInt16: returnValue.setI16Const(i16Const << constant.i16Const); break; case EbtUint16: returnValue.setI16Const(i16Const << constant.u16Const); break; case EbtInt: returnValue.setI16Const(i16Const << constant.iConst); break; case EbtUint: returnValue.setI16Const(i16Const << constant.uConst); break; case EbtInt64: returnValue.setI16Const(i16Const << constant.i64Const); break; case EbtUint64: returnValue.setI16Const(i16Const << constant.u64Const); break; default: assert(false && "Default missing"); } break; case EbtUint16: switch (constant.type) { case EbtInt8: returnValue.setU16Const(u16Const << constant.i8Const); break; case EbtUint8: returnValue.setU16Const(u16Const << constant.u8Const); break; case EbtInt16: returnValue.setU16Const(u16Const << constant.i16Const); break; case EbtUint16: returnValue.setU16Const(u16Const << constant.u16Const); break; case EbtInt: returnValue.setU16Const(u16Const << constant.iConst); break; case EbtUint: returnValue.setU16Const(u16Const << constant.uConst); break; case EbtInt64: returnValue.setU16Const(u16Const << constant.i64Const); break; case EbtUint64: returnValue.setU16Const(u16Const << constant.u64Const); break; default: assert(false && "Default missing"); } break; case EbtInt64: switch (constant.type) { case EbtInt8: returnValue.setI64Const(i64Const << constant.i8Const); break; case EbtUint8: returnValue.setI64Const(i64Const << constant.u8Const); break; case EbtInt16: returnValue.setI64Const(i64Const << constant.i16Const); break; case EbtUint16: returnValue.setI64Const(i64Const << constant.u16Const); break; case EbtInt: returnValue.setI64Const(i64Const << constant.iConst); break; case EbtUint: returnValue.setI64Const(i64Const << constant.uConst); break; case EbtInt64: returnValue.setI64Const(i64Const << constant.i64Const); break; case EbtUint64: returnValue.setI64Const(i64Const << constant.u64Const); break; default: assert(false && "Default missing"); } break; case EbtUint64: switch (constant.type) { case EbtInt8: returnValue.setU64Const(u64Const << constant.i8Const); break; case EbtUint8: returnValue.setU64Const(u64Const << constant.u8Const); break; case EbtInt16: returnValue.setU64Const(u64Const << constant.i16Const); break; case EbtUint16: returnValue.setU64Const(u64Const << constant.u16Const); break; case EbtInt: returnValue.setU64Const(u64Const << constant.iConst); break; case EbtUint: returnValue.setU64Const(u64Const << constant.uConst); break; case EbtInt64: returnValue.setU64Const(u64Const << constant.i64Const); break; case EbtUint64: returnValue.setU64Const(u64Const << constant.u64Const); break; default: assert(false && "Default missing"); } break; case EbtInt: switch (constant.type) { case EbtInt: returnValue.setIConst(iConst << constant.iConst); break; case EbtUint: returnValue.setIConst(iConst << constant.uConst); break; case EbtInt8: returnValue.setIConst(iConst << constant.i8Const); break; case EbtUint8: returnValue.setIConst(iConst << constant.u8Const); break; case EbtInt16: returnValue.setIConst(iConst << constant.i16Const); break; case EbtUint16: returnValue.setIConst(iConst << constant.u16Const); break; case EbtInt64: returnValue.setIConst(iConst << constant.i64Const); break; case EbtUint64: returnValue.setIConst(iConst << constant.u64Const); break; default: assert(false && "Default missing"); } break; case EbtUint: switch (constant.type) { case EbtInt: returnValue.setUConst(uConst << constant.iConst); break; case EbtUint: returnValue.setUConst(uConst << constant.uConst); break; case EbtInt8: returnValue.setUConst(uConst << constant.i8Const); break; case EbtUint8: returnValue.setUConst(uConst << constant.u8Const); break; case EbtInt16: returnValue.setUConst(uConst << constant.i16Const); break; case EbtUint16: returnValue.setUConst(uConst << constant.u16Const); break; case EbtInt64: returnValue.setUConst(uConst << constant.i64Const); break; case EbtUint64: returnValue.setUConst(uConst << constant.u64Const); break; default: assert(false && "Default missing"); } break; default: assert(false && "Default missing"); } return returnValue; } TConstUnion operator&(const TConstUnion& constant) const { TConstUnion returnValue; assert(type == constant.type); switch (type) { case EbtInt: returnValue.setIConst(iConst & constant.iConst); break; case EbtUint: returnValue.setUConst(uConst & constant.uConst); break; case EbtInt8: returnValue.setI8Const(i8Const & constant.i8Const); break; case EbtUint8: returnValue.setU8Const(u8Const & constant.u8Const); break; case EbtInt16: returnValue.setI16Const(i16Const & constant.i16Const); break; case EbtUint16: returnValue.setU16Const(u16Const & constant.u16Const); break; case EbtInt64: returnValue.setI64Const(i64Const & constant.i64Const); break; case EbtUint64: returnValue.setU64Const(u64Const & constant.u64Const); break; default: assert(false && "Default missing"); } return returnValue; } TConstUnion operator|(const TConstUnion& constant) const { TConstUnion returnValue; assert(type == constant.type); switch (type) { case EbtInt: returnValue.setIConst(iConst | constant.iConst); break; case EbtUint: returnValue.setUConst(uConst | constant.uConst); break; case EbtInt8: returnValue.setI8Const(i8Const | constant.i8Const); break; case EbtUint8: returnValue.setU8Const(u8Const | constant.u8Const); break; case EbtInt16: returnValue.setI16Const(i16Const | constant.i16Const); break; case EbtUint16: returnValue.setU16Const(u16Const | constant.u16Const); break; case EbtInt64: returnValue.setI64Const(i64Const | constant.i64Const); break; case EbtUint64: returnValue.setU64Const(u64Const | constant.u64Const); break; default: assert(false && "Default missing"); } return returnValue; } TConstUnion operator^(const TConstUnion& constant) const { TConstUnion returnValue; assert(type == constant.type); switch (type) { case EbtInt: returnValue.setIConst(iConst ^ constant.iConst); break; case EbtUint: returnValue.setUConst(uConst ^ constant.uConst); break; case EbtInt8: returnValue.setI8Const(i8Const ^ constant.i8Const); break; case EbtUint8: returnValue.setU8Const(u8Const ^ constant.u8Const); break; case EbtInt16: returnValue.setI16Const(i16Const ^ constant.i16Const); break; case EbtUint16: returnValue.setU16Const(u16Const ^ constant.u16Const); break; case EbtInt64: returnValue.setI64Const(i64Const ^ constant.i64Const); break; case EbtUint64: returnValue.setU64Const(u64Const ^ constant.u64Const); break; default: assert(false && "Default missing"); } return returnValue; } TConstUnion operator~() const { TConstUnion returnValue; switch (type) { case EbtInt: returnValue.setIConst(~iConst); break; case EbtUint: returnValue.setUConst(~uConst); break; case EbtInt8: returnValue.setI8Const(~i8Const); break; case EbtUint8: returnValue.setU8Const(~u8Const); break; case EbtInt16: returnValue.setI16Const(~i16Const); break; case EbtUint16: returnValue.setU16Const(~u16Const); break; case EbtInt64: returnValue.setI64Const(~i64Const); break; case EbtUint64: returnValue.setU64Const(~u64Const); break; default: assert(false && "Default missing"); } return returnValue; } TConstUnion operator&&(const TConstUnion& constant) const { TConstUnion returnValue; assert(type == constant.type); switch (type) { case EbtBool: returnValue.setBConst(bConst && constant.bConst); break; default: assert(false && "Default missing"); } return returnValue; } TConstUnion operator||(const TConstUnion& constant) const { TConstUnion returnValue; assert(type == constant.type); switch (type) { case EbtBool: returnValue.setBConst(bConst || constant.bConst); break; default: assert(false && "Default missing"); } return returnValue; } TBasicType getType() const { return type; } private: union { signed char i8Const; // used for i8vec, scalar int8s unsigned char u8Const; // used for u8vec, scalar uint8s signed short i16Const; // used for i16vec, scalar int16s unsigned short u16Const; // used for u16vec, scalar uint16s int iConst; // used for ivec, scalar ints unsigned int uConst; // used for uvec, scalar uints long long i64Const; // used for i64vec, scalar int64s unsigned long long u64Const; // used for u64vec, scalar uint64s bool bConst; // used for bvec, scalar bools double dConst; // used for vec, dvec, mat, dmat, scalar floats and doubles const TString* sConst; // string constant }; TBasicType type; }; // Encapsulate having a pointer to an array of TConstUnion, // which only needs to be allocated if its size is going to be // bigger than 0. // // One convenience is being able to use [] to go inside the array, instead // of C++ assuming it as an array of pointers to vectors. // // General usage is that the size is known up front, and it is // created once with the proper size. // class TConstUnionArray { public: POOL_ALLOCATOR_NEW_DELETE(GetThreadPoolAllocator()) TConstUnionArray() : unionArray(nullptr) { } virtual ~TConstUnionArray() { } explicit TConstUnionArray(int size) { if (size == 0) unionArray = nullptr; else unionArray = new TConstUnionVector(size); } TConstUnionArray(const TConstUnionArray& a) = default; TConstUnionArray(const TConstUnionArray& a, int start, int size) { unionArray = new TConstUnionVector(size); for (int i = 0; i < size; ++i) (*unionArray)[i] = a[start + i]; } // Use this constructor for a smear operation TConstUnionArray(int size, const TConstUnion& val) { unionArray = new TConstUnionVector(size, val); } int size() const { return unionArray ? (int)unionArray->size() : 0; } TConstUnion& operator[](size_t index) { return (*unionArray)[index]; } const TConstUnion& operator[](size_t index) const { return (*unionArray)[index]; } bool operator==(const TConstUnionArray& rhs) const { // this includes the case that both are unallocated if (unionArray == rhs.unionArray) return true; if (! unionArray || ! rhs.unionArray) return false; return *unionArray == *rhs.unionArray; } bool operator!=(const TConstUnionArray& rhs) const { return ! operator==(rhs); } double dot(const TConstUnionArray& rhs) { assert(rhs.unionArray->size() == unionArray->size()); double sum = 0.0; for (size_t comp = 0; comp < unionArray->size(); ++comp) sum += (*this)[comp].getDConst() * rhs[comp].getDConst(); return sum; } bool empty() const { return unionArray == nullptr; } protected: typedef TVector TConstUnionVector; TConstUnionVector* unionArray; }; } // end namespace glslang #endif // _CONSTANT_UNION_INCLUDED_ ================================================ FILE: src/libraries/glslang/glslang/Include/InfoSink.h ================================================ // // Copyright (C) 2002-2005 3Dlabs Inc. Ltd. // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following // disclaimer in the documentation and/or other materials provided // with the distribution. // // Neither the name of 3Dlabs Inc. Ltd. nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // #ifndef _INFOSINK_INCLUDED_ #define _INFOSINK_INCLUDED_ #include "../Include/Common.h" #include #include namespace glslang { // // TPrefixType is used to centralize how info log messages start. // See below. // enum TPrefixType { EPrefixNone, EPrefixWarning, EPrefixError, EPrefixInternalError, EPrefixUnimplemented, EPrefixNote }; enum TOutputStream { ENull = 0, EDebugger = 0x01, EStdOut = 0x02, EString = 0x04, }; // // Encapsulate info logs for all objects that have them. // // The methods are a general set of tools for getting a variety of // messages and types inserted into the log. // class TInfoSinkBase { public: TInfoSinkBase() : outputStream(4), shaderFileName(nullptr) {} void erase() { sink.erase(); } TInfoSinkBase& operator<<(const TPersistString& t) { append(t); return *this; } TInfoSinkBase& operator<<(char c) { append(1, c); return *this; } TInfoSinkBase& operator<<(const char* s) { append(s); return *this; } TInfoSinkBase& operator<<(int n) { append(String(n)); return *this; } TInfoSinkBase& operator<<(unsigned int n) { append(String(n)); return *this; } TInfoSinkBase& operator<<(float n) { const int size = 40; char buf[size]; snprintf(buf, size, (fabs(n) > 1e-8 && fabs(n) < 1e8) || n == 0.0f ? "%f" : "%g", n); append(buf); return *this; } TInfoSinkBase& operator+(const TPersistString& t) { append(t); return *this; } TInfoSinkBase& operator+(const TString& t) { append(t); return *this; } TInfoSinkBase& operator<<(const TString& t) { append(t); return *this; } TInfoSinkBase& operator+(const char* s) { append(s); return *this; } const char* c_str() const { return sink.c_str(); } void prefix(TPrefixType message) { switch(message) { case EPrefixNone: break; case EPrefixWarning: append("WARNING: "); break; case EPrefixError: append("ERROR: "); break; case EPrefixInternalError: append("INTERNAL ERROR: "); break; case EPrefixUnimplemented: append("UNIMPLEMENTED: "); break; case EPrefixNote: append("NOTE: "); break; default: append("UNKNOWN ERROR: "); break; } } void location(const TSourceLoc& loc, bool absolute = false, bool displayColumn = false) { const int maxSize = 24; char locText[maxSize]; if (displayColumn) { snprintf(locText, maxSize, ":%d:%d", loc.line, loc.column); } else { snprintf(locText, maxSize, ":%d", loc.line); } if(loc.getFilename() == nullptr && shaderFileName != nullptr && absolute) { append(std::filesystem::absolute(shaderFileName).string()); } else { std::string location = loc.getStringNameOrNum(false); if (absolute) { append(std::filesystem::absolute(location).string()); } else { append(location); } } append(locText); append(": "); } void message(TPrefixType message, const char* s) { prefix(message); append(s); append("\n"); } void message(TPrefixType message, const char* s, const TSourceLoc& loc, bool absolute = false, bool displayColumn = false) { prefix(message); location(loc, absolute, displayColumn); append(s); append("\n"); } void setOutputStream(int output = 4) { outputStream = output; } void setShaderFileName(const char* file = nullptr) { shaderFileName = file; } protected: void append(const char* s); void append(int count, char c); void append(const TPersistString& t); void append(const TString& t); void checkMem(size_t growth) { if (sink.capacity() < sink.size() + growth + 2) sink.reserve(sink.capacity() + sink.capacity() / 2); } void appendToStream(const char* s); TPersistString sink; int outputStream; const char* shaderFileName; }; } // end namespace glslang class TInfoSink { public: glslang::TInfoSinkBase info; glslang::TInfoSinkBase debug; }; #endif // _INFOSINK_INCLUDED_ ================================================ FILE: src/libraries/glslang/glslang/Include/InitializeGlobals.h ================================================ // // Copyright (C) 2002-2005 3Dlabs Inc. Ltd. // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following // disclaimer in the documentation and/or other materials provided // with the distribution. // // Neither the name of 3Dlabs Inc. Ltd. nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // #ifndef __INITIALIZE_GLOBALS_INCLUDED_ #define __INITIALIZE_GLOBALS_INCLUDED_ namespace glslang { inline bool InitializePoolIndex() { return true; } // DEPRECATED: No need to call } // end namespace glslang #endif // __INITIALIZE_GLOBALS_INCLUDED_ ================================================ FILE: src/libraries/glslang/glslang/Include/PoolAlloc.h ================================================ // // Copyright (C) 2002-2005 3Dlabs Inc. Ltd. // Copyright (C) 2012-2013 LunarG, Inc. // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following // disclaimer in the documentation and/or other materials provided // with the distribution. // // Neither the name of 3Dlabs Inc. Ltd. nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // #ifndef _POOLALLOC_INCLUDED_ #define _POOLALLOC_INCLUDED_ #ifndef NDEBUG # define GUARD_BLOCKS // define to enable guard block sanity checking #endif // // This header defines an allocator that can be used to efficiently // allocate a large number of small requests for heap memory, with the // intention that they are not individually deallocated, but rather // collectively deallocated at one time. // // This simultaneously // // * Makes each individual allocation much more efficient; the // typical allocation is trivial. // * Completely avoids the cost of doing individual deallocation. // * Saves the trouble of tracking down and plugging a large class of leaks. // // Individual classes can use this allocator by supplying their own // new and delete methods. // // STL containers can use this allocator by using the pool_allocator // class as the allocator (second) template argument. // #include "visibility.h" #include #include #include namespace glslang { // If we are using guard blocks, we must track each individual // allocation. If we aren't using guard blocks, these // never get instantiated, so won't have any impact. // class TAllocation { public: TAllocation(size_t size, unsigned char* mem, TAllocation* prev = nullptr) : size(size), mem(mem), prevAlloc(prev) { // Allocations are bracketed: // [allocationHeader][initialGuardBlock][userData][finalGuardBlock] // This would be cleaner with if (guardBlockSize)..., but that // makes the compiler print warnings about 0 length memsets, // even with the if() protecting them. # ifdef GUARD_BLOCKS memset(preGuard(), guardBlockBeginVal, guardBlockSize); memset(data(), userDataFill, size); memset(postGuard(), guardBlockEndVal, guardBlockSize); # endif } void check() const { checkGuardBlock(preGuard(), guardBlockBeginVal, "before"); checkGuardBlock(postGuard(), guardBlockEndVal, "after"); } void checkAllocList() const; // Return total size needed to accommodate user buffer of 'size', // plus our tracking data. inline static size_t allocationSize(size_t size) { return size + 2 * guardBlockSize + headerSize(); } // Offset from surrounding buffer to get to user data buffer. inline static unsigned char* offsetAllocation(unsigned char* m) { return m + guardBlockSize + headerSize(); } private: void checkGuardBlock(unsigned char* blockMem, unsigned char val, const char* locText) const; // Find offsets to pre and post guard blocks, and user data buffer unsigned char* preGuard() const { return mem + headerSize(); } unsigned char* data() const { return preGuard() + guardBlockSize; } unsigned char* postGuard() const { return data() + size; } size_t size; // size of the user data area unsigned char* mem; // beginning of our allocation (pts to header) TAllocation* prevAlloc; // prior allocation in the chain static inline constexpr unsigned char guardBlockBeginVal = 0xfb; static inline constexpr unsigned char guardBlockEndVal = 0xfe; static inline constexpr unsigned char userDataFill = 0xcd; # ifdef GUARD_BLOCKS static inline constexpr size_t guardBlockSize = 16; # else static inline constexpr size_t guardBlockSize = 0; # endif # ifdef GUARD_BLOCKS inline static size_t headerSize() { return sizeof(TAllocation); } # else inline static size_t headerSize() { return 0; } # endif }; // // There are several stacks. One is to track the pushing and popping // of the user, and not yet implemented. The others are simply a // repositories of free pages or used pages. // // Page stacks are linked together with a simple header at the beginning // of each allocation obtained from the underlying OS. Multi-page allocations // are returned to the OS. Individual page allocations are kept for future // re-use. // // The "page size" used is not, nor must it match, the underlying OS // page size. But, having it be about that size or equal to a set of // pages is likely most optimal. // class TPoolAllocator { public: TPoolAllocator(int growthIncrement = 8*1024, int allocationAlignment = 16); // // Don't call the destructor just to free up the memory, call pop() // ~TPoolAllocator(); // // Call push() to establish a new place to pop memory too. Does not // have to be called to get things started. // void push(); // // Call pop() to free all memory allocated since the last call to push(), // or if no last call to push, frees all memory since first allocation. // void pop(); // // Call popAll() to free all memory allocated. // void popAll(); // // Call allocate() to actually acquire memory. Returns nullptr if no memory // available, otherwise a properly aligned pointer to 'numBytes' of memory. // GLSLANG_EXPORT_FOR_TESTS void* allocate(size_t numBytes); // // There is no deallocate. The point of this class is that // deallocation can be skipped by the user of it, as the model // of use is to simultaneously deallocate everything at once // by calling pop(), and to not have to solve memory leak problems. // protected: friend struct tHeader; struct tHeader { tHeader(tHeader* nextPage, size_t pageCount) : #ifdef GUARD_BLOCKS lastAllocation(nullptr), #endif nextPage(nextPage), pageCount(pageCount) { } ~tHeader() { #ifdef GUARD_BLOCKS if (lastAllocation) lastAllocation->checkAllocList(); #endif } #ifdef GUARD_BLOCKS TAllocation* lastAllocation; #endif tHeader* nextPage; size_t pageCount; }; struct tAllocState { size_t offset; tHeader* page; }; typedef std::vector tAllocStack; // Track allocations if and only if we're using guard blocks #ifndef GUARD_BLOCKS void* initializeAllocation(tHeader*, unsigned char* memory, size_t) { #else void* initializeAllocation(tHeader* block, unsigned char* memory, size_t numBytes) { new(memory) TAllocation(numBytes, memory, block->lastAllocation); block->lastAllocation = reinterpret_cast(memory); #endif // This is optimized entirely away if GUARD_BLOCKS is not defined. return TAllocation::offsetAllocation(memory); } size_t pageSize; // granularity of allocation from the OS size_t alignment; // all returned allocations will be aligned at // this granularity, which will be a power of 2 size_t alignmentMask; size_t headerSkip; // amount of memory to skip to make room for the // header (basically, size of header, rounded // up to make it aligned size_t currentPageOffset; // next offset in top of inUseList to allocate from tHeader* freeList; // list of popped memory tHeader* inUseList; // list of all memory currently being used tAllocStack stack; // stack of where to allocate from, to partition pool int numCalls; // just an interesting statistic size_t totalBytes; // just an interesting statistic private: TPoolAllocator& operator=(const TPoolAllocator&); // don't allow assignment operator TPoolAllocator(const TPoolAllocator&); // don't allow default copy constructor }; // // There could potentially be many pools with pops happening at // different times. But a simple use is to have a global pop // with everyone using the same global allocator. // GLSLANG_EXPORT_FOR_TESTS extern TPoolAllocator& GetThreadPoolAllocator(); void SetThreadPoolAllocator(TPoolAllocator* poolAllocator); // // This STL compatible allocator is intended to be used as the allocator // parameter to templatized STL containers, like vector and map. // // It will use the pools for allocation, and not // do any deallocation, but will still do destruction. // template class pool_allocator { public: typedef size_t size_type; typedef ptrdiff_t difference_type; typedef T *pointer; typedef const T *const_pointer; typedef T& reference; typedef const T& const_reference; typedef T value_type; template struct rebind { typedef pool_allocator other; }; pointer address(reference x) const { return &x; } const_pointer address(const_reference x) const { return &x; } pool_allocator() : allocator(GetThreadPoolAllocator()) { } pool_allocator(TPoolAllocator& a) : allocator(a) { } pool_allocator(const pool_allocator& p) : allocator(p.allocator) { } template pool_allocator(const pool_allocator& p) : allocator(p.getAllocator()) { } GLSLANG_EXPORT_FOR_TESTS pointer allocate(size_type n) { return reinterpret_cast(getAllocator().allocate(n * sizeof(T))); } pointer allocate(size_type n, const void*) { return reinterpret_cast(getAllocator().allocate(n * sizeof(T))); } void deallocate(void*, size_type) { } void deallocate(pointer, size_type) { } pointer _Charalloc(size_t n) { return reinterpret_cast(getAllocator().allocate(n)); } void construct(pointer p, const T& val) { new ((void *)p) T(val); } void destroy(pointer p) { p->T::~T(); } bool operator==(const pool_allocator& rhs) const { return &getAllocator() == &rhs.getAllocator(); } bool operator!=(const pool_allocator& rhs) const { return &getAllocator() != &rhs.getAllocator(); } size_type max_size() const { return static_cast(-1) / sizeof(T); } size_type max_size(int size) const { return static_cast(-1) / size; } TPoolAllocator& getAllocator() const { return allocator; } pool_allocator select_on_container_copy_construction() const { return pool_allocator{}; } protected: pool_allocator& operator=(const pool_allocator&) { return *this; } TPoolAllocator& allocator; }; } // end namespace glslang #endif // _POOLALLOC_INCLUDED_ ================================================ FILE: src/libraries/glslang/glslang/Include/ResourceLimits.h ================================================ // // Copyright (C) 2002-2005 3Dlabs Inc. Ltd. // Copyright (C) 2013 LunarG, Inc. // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following // disclaimer in the documentation and/or other materials provided // with the distribution. // // Neither the name of 3Dlabs Inc. Ltd. nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // #ifndef _RESOURCE_LIMITS_INCLUDED_ #define _RESOURCE_LIMITS_INCLUDED_ struct TLimits { bool nonInductiveForLoops; bool whileLoops; bool doWhileLoops; bool generalUniformIndexing; bool generalAttributeMatrixVectorIndexing; bool generalVaryingIndexing; bool generalSamplerIndexing; bool generalVariableIndexing; bool generalConstantMatrixVectorIndexing; }; struct TBuiltInResource { int maxLights; int maxClipPlanes; int maxTextureUnits; int maxTextureCoords; int maxVertexAttribs; int maxVertexUniformComponents; int maxVaryingFloats; int maxVertexTextureImageUnits; int maxCombinedTextureImageUnits; int maxTextureImageUnits; int maxFragmentUniformComponents; int maxDrawBuffers; int maxVertexUniformVectors; int maxVaryingVectors; int maxFragmentUniformVectors; int maxVertexOutputVectors; int maxFragmentInputVectors; int minProgramTexelOffset; int maxProgramTexelOffset; int maxClipDistances; int maxComputeWorkGroupCountX; int maxComputeWorkGroupCountY; int maxComputeWorkGroupCountZ; int maxComputeWorkGroupSizeX; int maxComputeWorkGroupSizeY; int maxComputeWorkGroupSizeZ; int maxComputeUniformComponents; int maxComputeTextureImageUnits; int maxComputeImageUniforms; int maxComputeAtomicCounters; int maxComputeAtomicCounterBuffers; int maxVaryingComponents; int maxVertexOutputComponents; int maxGeometryInputComponents; int maxGeometryOutputComponents; int maxFragmentInputComponents; int maxImageUnits; int maxCombinedImageUnitsAndFragmentOutputs; int maxCombinedShaderOutputResources; int maxImageSamples; int maxVertexImageUniforms; int maxTessControlImageUniforms; int maxTessEvaluationImageUniforms; int maxGeometryImageUniforms; int maxFragmentImageUniforms; int maxCombinedImageUniforms; int maxGeometryTextureImageUnits; int maxGeometryOutputVertices; int maxGeometryTotalOutputComponents; int maxGeometryUniformComponents; int maxGeometryVaryingComponents; int maxTessControlInputComponents; int maxTessControlOutputComponents; int maxTessControlTextureImageUnits; int maxTessControlUniformComponents; int maxTessControlTotalOutputComponents; int maxTessEvaluationInputComponents; int maxTessEvaluationOutputComponents; int maxTessEvaluationTextureImageUnits; int maxTessEvaluationUniformComponents; int maxTessPatchComponents; int maxPatchVertices; int maxTessGenLevel; int maxViewports; int maxVertexAtomicCounters; int maxTessControlAtomicCounters; int maxTessEvaluationAtomicCounters; int maxGeometryAtomicCounters; int maxFragmentAtomicCounters; int maxCombinedAtomicCounters; int maxAtomicCounterBindings; int maxVertexAtomicCounterBuffers; int maxTessControlAtomicCounterBuffers; int maxTessEvaluationAtomicCounterBuffers; int maxGeometryAtomicCounterBuffers; int maxFragmentAtomicCounterBuffers; int maxCombinedAtomicCounterBuffers; int maxAtomicCounterBufferSize; int maxTransformFeedbackBuffers; int maxTransformFeedbackInterleavedComponents; int maxCullDistances; int maxCombinedClipAndCullDistances; int maxSamples; int maxMeshOutputVerticesNV; int maxMeshOutputPrimitivesNV; int maxMeshWorkGroupSizeX_NV; int maxMeshWorkGroupSizeY_NV; int maxMeshWorkGroupSizeZ_NV; int maxTaskWorkGroupSizeX_NV; int maxTaskWorkGroupSizeY_NV; int maxTaskWorkGroupSizeZ_NV; int maxMeshViewCountNV; int maxMeshOutputVerticesEXT; int maxMeshOutputPrimitivesEXT; int maxMeshWorkGroupSizeX_EXT; int maxMeshWorkGroupSizeY_EXT; int maxMeshWorkGroupSizeZ_EXT; int maxTaskWorkGroupSizeX_EXT; int maxTaskWorkGroupSizeY_EXT; int maxTaskWorkGroupSizeZ_EXT; int maxMeshViewCountEXT; int maxDualSourceDrawBuffersEXT; TLimits limits; }; #endif // _RESOURCE_LIMITS_INCLUDED_ ================================================ FILE: src/libraries/glslang/glslang/Include/ShHandle.h ================================================ // // Copyright (C) 2002-2005 3Dlabs Inc. Ltd. // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following // disclaimer in the documentation and/or other materials provided // with the distribution. // // Neither the name of 3Dlabs Inc. Ltd. nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // #ifndef _SHHANDLE_INCLUDED_ #define _SHHANDLE_INCLUDED_ // // Machine independent part of the compiler private objects // sent as ShHandle to the driver. // // This should not be included by driver code. // #define SH_EXPORTING #include "../Public/ShaderLang.h" #include "../MachineIndependent/Versions.h" #include "InfoSink.h" class TCompiler; class TLinker; class TUniformMap; // // The base class used to back handles returned to the driver. // class TShHandleBase { public: TShHandleBase() { pool = new glslang::TPoolAllocator; } virtual ~TShHandleBase() { delete pool; } virtual TCompiler* getAsCompiler() { return nullptr; } virtual TLinker* getAsLinker() { return nullptr; } virtual TUniformMap* getAsUniformMap() { return nullptr; } virtual glslang::TPoolAllocator* getPool() const { return pool; } private: glslang::TPoolAllocator* pool; }; // // The base class for the machine dependent linker to derive from // for managing where uniforms live. // class TUniformMap : public TShHandleBase { public: TUniformMap() { } virtual ~TUniformMap() { } virtual TUniformMap* getAsUniformMap() { return this; } virtual int getLocation(const char* name) = 0; virtual TInfoSink& getInfoSink() { return infoSink; } TInfoSink infoSink; }; class TIntermNode; // // The base class for the machine dependent compiler to derive from // for managing object code from the compile. // class TCompiler : public TShHandleBase { public: TCompiler(EShLanguage l, TInfoSink& sink) : infoSink(sink) , language(l), haveValidObjectCode(false) { } virtual ~TCompiler() { } EShLanguage getLanguage() { return language; } virtual TInfoSink& getInfoSink() { return infoSink; } virtual bool compile(TIntermNode* root, int version = 0, EProfile profile = ENoProfile) = 0; virtual TCompiler* getAsCompiler() { return this; } virtual bool linkable() { return haveValidObjectCode; } TInfoSink& infoSink; protected: TCompiler& operator=(TCompiler&); EShLanguage language; bool haveValidObjectCode; }; // // Link operations are based on a list of compile results... // typedef glslang::TVector TCompilerList; typedef glslang::TVector THandleList; // // The base class for the machine dependent linker to derive from // to manage the resulting executable. // class TLinker : public TShHandleBase { public: TLinker(EShExecutable e, TInfoSink& iSink) : infoSink(iSink), executable(e), haveReturnableObjectCode(false), appAttributeBindings(nullptr), fixedAttributeBindings(nullptr), excludedAttributes(nullptr), excludedCount(0), uniformBindings(nullptr) { } virtual TLinker* getAsLinker() { return this; } virtual ~TLinker() { } virtual bool link(TCompilerList&, TUniformMap*) = 0; virtual bool link(THandleList&) { return false; } virtual void setAppAttributeBindings(const ShBindingTable* t) { appAttributeBindings = t; } virtual void setFixedAttributeBindings(const ShBindingTable* t) { fixedAttributeBindings = t; } virtual void getAttributeBindings(ShBindingTable const **t) const = 0; virtual void setExcludedAttributes(const int* attributes, int count) { excludedAttributes = attributes; excludedCount = count; } virtual ShBindingTable* getUniformBindings() const { return uniformBindings; } virtual const void* getObjectCode() const { return nullptr; } // a real compiler would be returning object code here virtual TInfoSink& getInfoSink() { return infoSink; } TInfoSink& infoSink; protected: TLinker& operator=(TLinker&); EShExecutable executable; bool haveReturnableObjectCode; // true when objectCode is acceptable to send to driver const ShBindingTable* appAttributeBindings; const ShBindingTable* fixedAttributeBindings; const int* excludedAttributes; int excludedCount; ShBindingTable* uniformBindings; // created by the linker }; // // This is the interface between the machine independent code // and the machine dependent code. // // The machine dependent code should derive from the classes // above. Then Construct*() and Delete*() will create and // destroy the machine dependent objects, which contain the // above machine independent information. // TCompiler* ConstructCompiler(EShLanguage, int); TShHandleBase* ConstructLinker(EShExecutable, int); TShHandleBase* ConstructBindings(); void DeleteLinker(TShHandleBase*); void DeleteBindingList(TShHandleBase* bindingList); TUniformMap* ConstructUniformMap(); void DeleteCompiler(TCompiler*); void DeleteUniformMap(TUniformMap*); #endif // _SHHANDLE_INCLUDED_ ================================================ FILE: src/libraries/glslang/glslang/Include/SpirvIntrinsics.h ================================================ // // Copyright(C) 2021 Advanced Micro Devices, Inc. // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following // disclaimer in the documentation and/or other materials provided // with the distribution. // // Neither the name of 3Dlabs Inc. Ltd. nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // #pragma once // // GL_EXT_spirv_intrinsics // #include "Common.h" #include namespace glslang { class TIntermTyped; class TIntermConstantUnion; class TType; // SPIR-V requirements struct TSpirvRequirement { POOL_ALLOCATOR_NEW_DELETE(GetThreadPoolAllocator()) // capability = [..] TSet extensions; // extension = [..] TSet capabilities; }; // SPIR-V execution modes struct TSpirvExecutionMode { POOL_ALLOCATOR_NEW_DELETE(GetThreadPoolAllocator()) // spirv_execution_mode TMap> modes; // spirv_execution_mode_id TMap > modeIds; }; // SPIR-V decorations struct TSpirvDecorate { POOL_ALLOCATOR_NEW_DELETE(GetThreadPoolAllocator()) // spirv_decorate TMap > decorates; // spirv_decorate_id TMap> decorateIds; // spirv_decorate_string TMap > decorateStrings; }; // SPIR-V instruction struct TSpirvInstruction { POOL_ALLOCATOR_NEW_DELETE(GetThreadPoolAllocator()) TSpirvInstruction() { set = ""; id = -1; } bool operator==(const TSpirvInstruction& rhs) const { return set == rhs.set && id == rhs.id; } bool operator!=(const TSpirvInstruction& rhs) const { return !operator==(rhs); } // spirv_instruction TString set; int id; }; // SPIR-V type parameter struct TSpirvTypeParameter { POOL_ALLOCATOR_NEW_DELETE(GetThreadPoolAllocator()) TSpirvTypeParameter(const TIntermConstantUnion* arg) { value = arg; } TSpirvTypeParameter(const TType* arg) { value = arg; } const TIntermConstantUnion* getAsConstant() const { if (value.index() == 0) return std::get(value); return nullptr; } const TType* getAsType() const { if (value.index() == 1) return std::get(value); return nullptr; } bool operator==(const TSpirvTypeParameter& rhs) const; bool operator!=(const TSpirvTypeParameter& rhs) const { return !operator==(rhs); } // Parameter value: constant expression or type specifier std::variant value; }; typedef TVector TSpirvTypeParameters; // SPIR-V type struct TSpirvType { POOL_ALLOCATOR_NEW_DELETE(GetThreadPoolAllocator()) bool operator==(const TSpirvType& rhs) const { return spirvInst == rhs.spirvInst && typeParams == rhs.typeParams; } bool operator!=(const TSpirvType& rhs) const { return !operator==(rhs); } // spirv_type TSpirvInstruction spirvInst; TSpirvTypeParameters typeParams; }; } // end namespace glslang ================================================ FILE: src/libraries/glslang/glslang/Include/Types.h ================================================ // // Copyright (C) 2002-2005 3Dlabs Inc. Ltd. // Copyright (C) 2012-2016 LunarG, Inc. // Copyright (C) 2015-2016 Google, Inc. // Copyright (C) 2017 ARM Limited. // Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights reserved. // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following // disclaimer in the documentation and/or other materials provided // with the distribution. // // Neither the name of 3Dlabs Inc. Ltd. nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // #ifndef _TYPES_INCLUDED #define _TYPES_INCLUDED #include "../Include/Common.h" #include "../Include/BaseTypes.h" #include "../Public/ShaderLang.h" #include "arrays.h" #include "SpirvIntrinsics.h" #include namespace glslang { class TIntermAggregate; const int GlslangMaxTypeLength = 200; // TODO: need to print block/struct one member per line, so this can stay bounded const char* const AnonymousPrefix = "anon@"; // for something like a block whose members can be directly accessed inline bool IsAnonymous(const TString& name) { return name.compare(0, 5, AnonymousPrefix) == 0; } // // Details within a sampler type // enum TSamplerDim { EsdNone, Esd1D, Esd2D, Esd3D, EsdCube, EsdRect, EsdBuffer, EsdSubpass, // goes only with non-sampled image (image is true) EsdAttachmentEXT, EsdNumDims }; struct TSampler { // misnomer now; includes images, textures without sampler, and textures with sampler TBasicType type : 8; // type returned by sampler TSamplerDim dim : 8; bool arrayed : 1; bool shadow : 1; bool ms : 1; bool image : 1; // image, combined should be false bool combined : 1; // true means texture is combined with a sampler, false means texture with no sampler bool sampler : 1; // true means a pure sampler, other fields should be clear() bool tileQCOM : 1; // is tile shading attachment unsigned int vectorSize : 3; // vector return type size. // Some languages support structures as sample results. Storing the whole structure in the // TSampler is too large, so there is an index to a separate table. static const unsigned structReturnIndexBits = 4; // number of index bits to use. static const unsigned structReturnSlots = (1< TTypeList; typedef TVector TIdentifierList; enum TLayoutMatrix { ElmNone, ElmRowMajor, ElmColumnMajor, // default, but different than saying nothing ElmCount // If expanding, see bitfield width below }; // Union of geometry shader and tessellation shader geometry types. // They don't go into TType, but rather have current state per shader or // active parser type (TPublicType). enum TLayoutGeometry { ElgNone, ElgPoints, ElgLines, ElgLinesAdjacency, ElgLineStrip, ElgTriangles, ElgTrianglesAdjacency, ElgTriangleStrip, ElgQuads, ElgIsolines, }; enum TVertexSpacing { EvsNone, EvsEqual, EvsFractionalEven, EvsFractionalOdd }; enum TVertexOrder { EvoNone, EvoCw, EvoCcw }; // Note: order matters, as type of format is done by comparison. enum TLayoutFormat { ElfNone, // Float image ElfRgba32f, ElfRgba16f, ElfR32f, ElfRgba8, ElfRgba8Snorm, ElfEsFloatGuard, // to help with comparisons ElfRg32f, ElfRg16f, ElfR11fG11fB10f, ElfR16f, ElfRgba16, ElfRgb10A2, ElfRg16, ElfRg8, ElfR16, ElfR8, ElfRgba16Snorm, ElfRg16Snorm, ElfRg8Snorm, ElfR16Snorm, ElfR8Snorm, ElfFloatGuard, // to help with comparisons // Int image ElfRgba32i, ElfRgba16i, ElfRgba8i, ElfR32i, ElfEsIntGuard, // to help with comparisons ElfRg32i, ElfRg16i, ElfRg8i, ElfR16i, ElfR8i, ElfR64i, ElfIntGuard, // to help with comparisons // Uint image ElfRgba32ui, ElfRgba16ui, ElfRgba8ui, ElfR32ui, ElfEsUintGuard, // to help with comparisons ElfRg32ui, ElfRg16ui, ElfRgb10a2ui, ElfRg8ui, ElfR16ui, ElfR8ui, ElfR64ui, ElfExtSizeGuard, // to help with comparisons ElfSize1x8, ElfSize1x16, ElfSize1x32, ElfSize2x32, ElfSize4x32, ElfCount }; enum TLayoutDepth { EldNone, EldAny, EldGreater, EldLess, EldUnchanged, EldCount }; enum TLayoutStencil { ElsNone, ElsRefUnchangedFrontAMD, ElsRefGreaterFrontAMD, ElsRefLessFrontAMD, ElsRefUnchangedBackAMD, ElsRefGreaterBackAMD, ElsRefLessBackAMD, ElsCount }; enum TBlendEquationShift { // No 'EBlendNone': // These are used as bit-shift amounts. A mask of such shifts will have type 'int', // and in that space, 0 means no bits set, or none. In this enum, 0 means (1 << 0), a bit is set. EBlendMultiply, EBlendScreen, EBlendOverlay, EBlendDarken, EBlendLighten, EBlendColordodge, EBlendColorburn, EBlendHardlight, EBlendSoftlight, EBlendDifference, EBlendExclusion, EBlendHslHue, EBlendHslSaturation, EBlendHslColor, EBlendHslLuminosity, EBlendAllEquations, EBlendCount }; enum TInterlockOrdering { EioNone, EioPixelInterlockOrdered, EioPixelInterlockUnordered, EioSampleInterlockOrdered, EioSampleInterlockUnordered, EioShadingRateInterlockOrdered, EioShadingRateInterlockUnordered, EioCount, }; enum TShaderInterface { // Includes both uniform blocks and buffer blocks EsiUniform = 0, EsiInput, EsiOutput, EsiNone, EsiCount }; class TQualifier { public: static const int layoutNotSet = -1; void clear() { precision = EpqNone; invariant = false; makeTemporary(); declaredBuiltIn = EbvNone; noContraction = false; nullInit = false; spirvByReference = false; spirvLiteral = false; defaultBlock = false; } // drop qualifiers that don't belong in a temporary variable void makeTemporary() { semanticName = nullptr; storage = EvqTemporary; builtIn = EbvNone; clearInterstage(); clearMemory(); specConstant = false; nonUniform = false; nullInit = false; defaultBlock = false; clearLayout(); spirvStorageClass = -1; spirvDecorate = nullptr; spirvByReference = false; spirvLiteral = false; } void clearInterstage() { clearInterpolation(); patch = false; sample = false; } void clearInterpolation() { centroid = false; smooth = false; flat = false; nopersp = false; explicitInterp = false; pervertexNV = false; perPrimitiveNV = false; perViewNV = false; perTaskNV = false; pervertexEXT = false; } void clearMemory() { coherent = false; devicecoherent = false; queuefamilycoherent = false; workgroupcoherent = false; subgroupcoherent = false; shadercallcoherent = false; nonprivate = false; volatil = false; nontemporal = false; restrict = false; readonly = false; writeonly = false; } const char* semanticName; TStorageQualifier storage : 7; static_assert(EvqLast < 64, "need to increase size of TStorageQualifier bitfields!"); TBuiltInVariable builtIn : 9; TBuiltInVariable declaredBuiltIn : 9; static_assert(EbvLast < 256, "need to increase size of TBuiltInVariable bitfields!"); TPrecisionQualifier precision : 3; bool invariant : 1; // require canonical treatment for cross-shader invariance bool centroid : 1; bool smooth : 1; bool flat : 1; // having a constant_id is not sufficient: expressions have no id, but are still specConstant bool specConstant : 1; bool nonUniform : 1; bool explicitOffset : 1; bool defaultBlock : 1; // default blocks with matching names have structures merged when linking bool noContraction: 1; // prevent contraction and reassociation, e.g., for 'precise' keyword, and expressions it affects bool nopersp : 1; bool explicitInterp : 1; bool pervertexNV : 1; bool pervertexEXT : 1; bool perPrimitiveNV : 1; bool perViewNV : 1; bool perTaskNV : 1; bool patch : 1; bool sample : 1; bool restrict : 1; bool readonly : 1; bool writeonly : 1; bool coherent : 1; bool volatil : 1; bool nontemporal : 1; bool devicecoherent : 1; bool queuefamilycoherent : 1; bool workgroupcoherent : 1; bool subgroupcoherent : 1; bool shadercallcoherent : 1; bool nonprivate : 1; bool nullInit : 1; bool spirvByReference : 1; bool spirvLiteral : 1; bool isWriteOnly() const { return writeonly; } bool isReadOnly() const { return readonly; } bool isRestrict() const { return restrict; } bool isCoherent() const { return coherent; } bool isVolatile() const { return volatil; } bool isNonTemporal() const { return nontemporal; } bool isSample() const { return sample; } bool isMemory() const { return shadercallcoherent || subgroupcoherent || workgroupcoherent || queuefamilycoherent || devicecoherent || coherent || volatil || nontemporal || restrict || readonly || writeonly || nonprivate; } bool isMemoryQualifierImageAndSSBOOnly() const { return shadercallcoherent || subgroupcoherent || workgroupcoherent || queuefamilycoherent || devicecoherent || coherent || volatil || nontemporal || restrict || readonly || writeonly; } bool bufferReferenceNeedsVulkanMemoryModel() const { // include qualifiers that map to load/store availability/visibility/nonprivate memory access operands return subgroupcoherent || workgroupcoherent || queuefamilycoherent || devicecoherent || coherent || nonprivate; } bool isInterpolation() const { return flat || smooth || nopersp || explicitInterp; } bool isExplicitInterpolation() const { return explicitInterp; } bool isAuxiliary() const { return centroid || patch || sample || pervertexNV || pervertexEXT; } bool isPatch() const { return patch; } bool isNoContraction() const { return noContraction; } void setNoContraction() { noContraction = true; } bool isPervertexNV() const { return pervertexNV; } bool isPervertexEXT() const { return pervertexEXT; } void setNullInit() { nullInit = true; } bool isNullInit() const { return nullInit; } void setSpirvByReference() { spirvByReference = true; } bool isSpirvByReference() const { return spirvByReference; } void setSpirvLiteral() { spirvLiteral = true; } bool isSpirvLiteral() const { return spirvLiteral; } bool isPipeInput() const { switch (storage) { case EvqVaryingIn: case EvqFragCoord: case EvqPointCoord: case EvqFace: case EvqVertexId: case EvqInstanceId: return true; default: return false; } } bool isPipeOutput() const { switch (storage) { case EvqPosition: case EvqPointSize: case EvqClipVertex: case EvqVaryingOut: case EvqFragColor: case EvqFragDepth: case EvqFragStencil: return true; default: return false; } } bool isParamInput() const { switch (storage) { case EvqIn: case EvqInOut: case EvqConstReadOnly: return true; default: return false; } } bool isParamOutput() const { switch (storage) { case EvqOut: case EvqInOut: return true; default: return false; } } bool isUniformOrBuffer() const { switch (storage) { case EvqUniform: case EvqBuffer: return true; default: return false; } } bool isUniform() const { switch (storage) { case EvqUniform: return true; default: return false; } } bool isIo() const { switch (storage) { case EvqUniform: case EvqBuffer: case EvqVaryingIn: case EvqFragCoord: case EvqPointCoord: case EvqFace: case EvqVertexId: case EvqInstanceId: case EvqPosition: case EvqPointSize: case EvqClipVertex: case EvqVaryingOut: case EvqFragColor: case EvqFragDepth: case EvqFragStencil: return true; default: return false; } } // non-built-in symbols that might link between compilation units bool isLinkable() const { switch (storage) { case EvqGlobal: case EvqVaryingIn: case EvqVaryingOut: case EvqUniform: case EvqBuffer: case EvqShared: return true; default: return false; } } TBlockStorageClass getBlockStorage() const { if (storage == EvqUniform && !isPushConstant()) { return EbsUniform; } else if (storage == EvqUniform) { return EbsPushConstant; } else if (storage == EvqBuffer) { return EbsStorageBuffer; } return EbsNone; } void setBlockStorage(TBlockStorageClass newBacking) { layoutPushConstant = (newBacking == EbsPushConstant); switch (newBacking) { case EbsUniform : if (layoutPacking == ElpStd430) { // std430 would not be valid layoutPacking = ElpStd140; } storage = EvqUniform; break; case EbsStorageBuffer : storage = EvqBuffer; break; case EbsPushConstant : storage = EvqUniform; layoutSet = TQualifier::layoutSetEnd; layoutBinding = TQualifier::layoutBindingEnd; break; default: break; } } bool isPerPrimitive() const { return perPrimitiveNV; } bool isPerView() const { return perViewNV; } bool isTaskMemory() const { return perTaskNV; } bool isTaskPayload() const { return storage == EvqtaskPayloadSharedEXT; } bool isAnyPayload() const { return storage == EvqPayload || storage == EvqPayloadIn; } bool isAnyCallable() const { return storage == EvqCallableData || storage == EvqCallableDataIn; } bool isHitObjectAttrNV() const { return storage == EvqHitObjectAttrNV; } // True if this type of IO is supposed to be arrayed with extra level for per-vertex data bool isArrayedIo(EShLanguage language) const { switch (language) { case EShLangGeometry: return isPipeInput(); case EShLangTessControl: return ! patch && (isPipeInput() || isPipeOutput()); case EShLangTessEvaluation: return ! patch && isPipeInput(); case EShLangFragment: return (pervertexNV || pervertexEXT) && isPipeInput(); case EShLangMesh: return ! perTaskNV && isPipeOutput(); default: return false; } } // Implementing an embedded layout-qualifier class here, since C++ can't have a real class bitfield void clearLayout() // all layout { clearUniformLayout(); layoutPushConstant = false; layoutBufferReference = false; layoutPassthrough = false; layoutViewportRelative = false; // -2048 as the default value indicating layoutSecondaryViewportRelative is not set layoutSecondaryViewportRelativeOffset = -2048; layoutShaderRecord = false; layoutFullQuads = false; layoutQuadDeriv = false; layoutHitObjectShaderRecordNV = false; layoutBindlessSampler = false; layoutBindlessImage = false; layoutBufferReferenceAlign = layoutBufferReferenceAlignEnd; layoutFormat = ElfNone; layoutTileAttachmentQCOM = false; clearInterstageLayout(); layoutSpecConstantId = layoutSpecConstantIdEnd; } void clearInterstageLayout() { layoutLocation = layoutLocationEnd; layoutComponent = layoutComponentEnd; layoutIndex = layoutIndexEnd; clearStreamLayout(); clearXfbLayout(); } void clearStreamLayout() { layoutStream = layoutStreamEnd; } void clearXfbLayout() { layoutXfbBuffer = layoutXfbBufferEnd; layoutXfbStride = layoutXfbStrideEnd; layoutXfbOffset = layoutXfbOffsetEnd; } bool hasNonXfbLayout() const { return hasUniformLayout() || hasAnyLocation() || hasStream() || hasFormat() || isShaderRecord() || isPushConstant() || hasBufferReference(); } bool hasLayout() const { return hasNonXfbLayout() || hasXfb(); } TLayoutMatrix layoutMatrix : 3; TLayoutPacking layoutPacking : 4; int layoutOffset; int layoutAlign; unsigned int layoutLocation : 12; static const unsigned int layoutLocationEnd = 0xFFF; unsigned int layoutComponent : 3; static const unsigned int layoutComponentEnd = 4; unsigned int layoutSet : 7; static const unsigned int layoutSetEnd = 0x3F; unsigned int layoutBinding : 16; static const unsigned int layoutBindingEnd = 0xFFFF; unsigned int layoutIndex : 8; static const unsigned int layoutIndexEnd = 0xFF; unsigned int layoutStream : 8; static const unsigned int layoutStreamEnd = 0xFF; unsigned int layoutXfbBuffer : 4; static const unsigned int layoutXfbBufferEnd = 0xF; unsigned int layoutXfbStride : 14; static const unsigned int layoutXfbStrideEnd = 0x3FFF; unsigned int layoutXfbOffset : 13; static const unsigned int layoutXfbOffsetEnd = 0x1FFF; unsigned int layoutAttachment : 8; // for input_attachment_index static const unsigned int layoutAttachmentEnd = 0XFF; unsigned int layoutSpecConstantId : 11; static const unsigned int layoutSpecConstantIdEnd = 0x7FF; // stored as log2 of the actual alignment value unsigned int layoutBufferReferenceAlign : 6; static const unsigned int layoutBufferReferenceAlignEnd = 0x3F; TLayoutFormat layoutFormat : 8; bool layoutPushConstant; bool layoutBufferReference; bool layoutPassthrough; bool layoutViewportRelative; int layoutSecondaryViewportRelativeOffset; bool layoutShaderRecord; bool layoutFullQuads; bool layoutQuadDeriv; bool layoutHitObjectShaderRecordNV; // GL_EXT_spirv_intrinsics int spirvStorageClass; TSpirvDecorate* spirvDecorate; bool layoutBindlessSampler; bool layoutBindlessImage; bool layoutTileAttachmentQCOM; bool hasUniformLayout() const { return hasMatrix() || hasPacking() || hasOffset() || hasBinding() || hasSet() || hasAlign(); } void clearUniformLayout() // only uniform specific { layoutMatrix = ElmNone; layoutPacking = ElpNone; layoutOffset = layoutNotSet; layoutAlign = layoutNotSet; layoutSet = layoutSetEnd; layoutBinding = layoutBindingEnd; layoutAttachment = layoutAttachmentEnd; } bool hasMatrix() const { return layoutMatrix != ElmNone; } bool hasPacking() const { return layoutPacking != ElpNone; } bool hasAlign() const { return layoutAlign != layoutNotSet; } bool hasAnyLocation() const { return hasLocation() || hasComponent() || hasIndex(); } bool hasLocation() const { return layoutLocation != layoutLocationEnd; } bool hasSet() const { return layoutSet != layoutSetEnd; } bool hasBinding() const { return layoutBinding != layoutBindingEnd; } bool hasOffset() const { return layoutOffset != layoutNotSet; } bool isNonPerspective() const { return nopersp; } bool hasIndex() const { return layoutIndex != layoutIndexEnd; } unsigned getIndex() const { return layoutIndex; } bool hasComponent() const { return layoutComponent != layoutComponentEnd; } bool hasStream() const { return layoutStream != layoutStreamEnd; } bool hasFormat() const { return layoutFormat != ElfNone; } bool hasXfb() const { return hasXfbBuffer() || hasXfbStride() || hasXfbOffset(); } bool hasXfbBuffer() const { return layoutXfbBuffer != layoutXfbBufferEnd; } bool hasXfbStride() const { return layoutXfbStride != layoutXfbStrideEnd; } bool hasXfbOffset() const { return layoutXfbOffset != layoutXfbOffsetEnd; } bool hasAttachment() const { return layoutAttachment != layoutAttachmentEnd; } TLayoutFormat getFormat() const { return layoutFormat; } bool isPushConstant() const { return layoutPushConstant; } bool isShaderRecord() const { return layoutShaderRecord; } bool isFullQuads() const { return layoutFullQuads; } bool isQuadDeriv() const { return layoutQuadDeriv; } bool hasHitObjectShaderRecordNV() const { return layoutHitObjectShaderRecordNV; } bool hasBufferReference() const { return layoutBufferReference; } bool hasBufferReferenceAlign() const { return layoutBufferReferenceAlign != layoutBufferReferenceAlignEnd; } bool isNonUniform() const { return nonUniform; } bool isBindlessSampler() const { return layoutBindlessSampler; } bool isBindlessImage() const { return layoutBindlessImage; } bool isTileAttachmentQCOM() const { return layoutTileAttachmentQCOM; } // GL_EXT_spirv_intrinsics bool hasSpirvDecorate() const { return spirvDecorate != nullptr; } void setSpirvDecorate(int decoration, const TIntermAggregate* args = nullptr); void setSpirvDecorateId(int decoration, const TIntermAggregate* args); void setSpirvDecorateString(int decoration, const TIntermAggregate* args); const TSpirvDecorate& getSpirvDecorate() const { assert(spirvDecorate); return *spirvDecorate; } TSpirvDecorate& getSpirvDecorate() { assert(spirvDecorate); return *spirvDecorate; } TString getSpirvDecorateQualifierString() const; bool hasSpecConstantId() const { // Not the same thing as being a specialization constant, this // is just whether or not it was declared with an ID. return layoutSpecConstantId != layoutSpecConstantIdEnd; } bool isSpecConstant() const { // True if type is a specialization constant, whether or not it // had a specialization-constant ID, and false if it is not a // true front-end constant. return specConstant; } bool isFrontEndConstant() const { // True if the front-end knows the final constant value. // This allows front-end constant folding. return storage == EvqConst && ! specConstant; } bool isConstant() const { // True if is either kind of constant; specialization or regular. return isFrontEndConstant() || isSpecConstant(); } void makeSpecConstant() { storage = EvqConst; specConstant = true; } static const char* getLayoutPackingString(TLayoutPacking packing) { switch (packing) { case ElpStd140: return "std140"; case ElpPacked: return "packed"; case ElpShared: return "shared"; case ElpStd430: return "std430"; case ElpScalar: return "scalar"; default: return "none"; } } static const char* getLayoutMatrixString(TLayoutMatrix m) { switch (m) { case ElmColumnMajor: return "column_major"; case ElmRowMajor: return "row_major"; default: return "none"; } } static const char* getLayoutFormatString(TLayoutFormat f) { switch (f) { case ElfRgba32f: return "rgba32f"; case ElfRgba16f: return "rgba16f"; case ElfRg32f: return "rg32f"; case ElfRg16f: return "rg16f"; case ElfR11fG11fB10f: return "r11f_g11f_b10f"; case ElfR32f: return "r32f"; case ElfR16f: return "r16f"; case ElfRgba16: return "rgba16"; case ElfRgb10A2: return "rgb10_a2"; case ElfRgba8: return "rgba8"; case ElfRg16: return "rg16"; case ElfRg8: return "rg8"; case ElfR16: return "r16"; case ElfR8: return "r8"; case ElfRgba16Snorm: return "rgba16_snorm"; case ElfRgba8Snorm: return "rgba8_snorm"; case ElfRg16Snorm: return "rg16_snorm"; case ElfRg8Snorm: return "rg8_snorm"; case ElfR16Snorm: return "r16_snorm"; case ElfR8Snorm: return "r8_snorm"; case ElfRgba32i: return "rgba32i"; case ElfRgba16i: return "rgba16i"; case ElfRgba8i: return "rgba8i"; case ElfRg32i: return "rg32i"; case ElfRg16i: return "rg16i"; case ElfRg8i: return "rg8i"; case ElfR32i: return "r32i"; case ElfR16i: return "r16i"; case ElfR8i: return "r8i"; case ElfRgba32ui: return "rgba32ui"; case ElfRgba16ui: return "rgba16ui"; case ElfRgba8ui: return "rgba8ui"; case ElfRg32ui: return "rg32ui"; case ElfRg16ui: return "rg16ui"; case ElfRgb10a2ui: return "rgb10_a2ui"; case ElfRg8ui: return "rg8ui"; case ElfR32ui: return "r32ui"; case ElfR16ui: return "r16ui"; case ElfR8ui: return "r8ui"; case ElfR64ui: return "r64ui"; case ElfR64i: return "r64i"; case ElfSize1x8: return "size1x8"; case ElfSize1x16: return "size1x16"; case ElfSize1x32: return "size1x32"; case ElfSize2x32: return "size2x32"; case ElfSize4x32: return "size4x32"; default: return "none"; } } static const char* getLayoutDepthString(TLayoutDepth d) { switch (d) { case EldAny: return "depth_any"; case EldGreater: return "depth_greater"; case EldLess: return "depth_less"; case EldUnchanged: return "depth_unchanged"; default: return "none"; } } static const char* getLayoutStencilString(TLayoutStencil s) { switch (s) { case ElsRefUnchangedFrontAMD: return "stencil_ref_unchanged_front_amd"; case ElsRefGreaterFrontAMD: return "stencil_ref_greater_front_amd"; case ElsRefLessFrontAMD: return "stencil_ref_less_front_amd"; case ElsRefUnchangedBackAMD: return "stencil_ref_unchanged_back_amd"; case ElsRefGreaterBackAMD: return "stencil_ref_greater_back_amd"; case ElsRefLessBackAMD: return "stencil_ref_less_back_amd"; default: return "none"; } } static const char* getBlendEquationString(TBlendEquationShift e) { switch (e) { case EBlendMultiply: return "blend_support_multiply"; case EBlendScreen: return "blend_support_screen"; case EBlendOverlay: return "blend_support_overlay"; case EBlendDarken: return "blend_support_darken"; case EBlendLighten: return "blend_support_lighten"; case EBlendColordodge: return "blend_support_colordodge"; case EBlendColorburn: return "blend_support_colorburn"; case EBlendHardlight: return "blend_support_hardlight"; case EBlendSoftlight: return "blend_support_softlight"; case EBlendDifference: return "blend_support_difference"; case EBlendExclusion: return "blend_support_exclusion"; case EBlendHslHue: return "blend_support_hsl_hue"; case EBlendHslSaturation: return "blend_support_hsl_saturation"; case EBlendHslColor: return "blend_support_hsl_color"; case EBlendHslLuminosity: return "blend_support_hsl_luminosity"; case EBlendAllEquations: return "blend_support_all_equations"; default: return "unknown"; } } static const char* getGeometryString(TLayoutGeometry geometry) { switch (geometry) { case ElgPoints: return "points"; case ElgLines: return "lines"; case ElgLinesAdjacency: return "lines_adjacency"; case ElgLineStrip: return "line_strip"; case ElgTriangles: return "triangles"; case ElgTrianglesAdjacency: return "triangles_adjacency"; case ElgTriangleStrip: return "triangle_strip"; case ElgQuads: return "quads"; case ElgIsolines: return "isolines"; default: return "none"; } } static const char* getVertexSpacingString(TVertexSpacing spacing) { switch (spacing) { case EvsEqual: return "equal_spacing"; case EvsFractionalEven: return "fractional_even_spacing"; case EvsFractionalOdd: return "fractional_odd_spacing"; default: return "none"; } } static const char* getVertexOrderString(TVertexOrder order) { switch (order) { case EvoCw: return "cw"; case EvoCcw: return "ccw"; default: return "none"; } } static int mapGeometryToSize(TLayoutGeometry geometry) { switch (geometry) { case ElgPoints: return 1; case ElgLines: return 2; case ElgLinesAdjacency: return 4; case ElgTriangles: return 3; case ElgTrianglesAdjacency: return 6; default: return 0; } } static const char* getInterlockOrderingString(TInterlockOrdering order) { switch (order) { case EioPixelInterlockOrdered: return "pixel_interlock_ordered"; case EioPixelInterlockUnordered: return "pixel_interlock_unordered"; case EioSampleInterlockOrdered: return "sample_interlock_ordered"; case EioSampleInterlockUnordered: return "sample_interlock_unordered"; case EioShadingRateInterlockOrdered: return "shading_rate_interlock_ordered"; case EioShadingRateInterlockUnordered: return "shading_rate_interlock_unordered"; default: return "none"; } } }; // Qualifiers that don't need to be kept per object. They have shader scope, not object scope. // So, they will not be part of TType, TQualifier, etc. struct TShaderQualifiers { TLayoutGeometry geometry; // geometry/tessellation shader in/out primitives bool pixelCenterInteger; // fragment shader bool originUpperLeft; // fragment shader int invocations; int vertices; // for tessellation "vertices", geometry & mesh "max_vertices" TVertexSpacing spacing; TVertexOrder order; bool pointMode; int localSize[3]; // compute shader bool localSizeNotDefault[3]; // compute shader int localSizeSpecId[3]; // compute shader specialization id for gl_WorkGroupSize bool earlyFragmentTests; // fragment input bool postDepthCoverage; // fragment input bool earlyAndLateFragmentTestsAMD; //fragment input bool nonCoherentColorAttachmentReadEXT; // fragment input bool nonCoherentDepthAttachmentReadEXT; // fragment input bool nonCoherentStencilAttachmentReadEXT; // fragment input TLayoutDepth layoutDepth; TLayoutStencil layoutStencil; bool blendEquation; // true if any blend equation was specified int numViews; // multiview extenstions TInterlockOrdering interlockOrdering; bool layoutOverrideCoverage; // true if layout override_coverage set bool layoutDerivativeGroupQuads; // true if layout derivative_group_quadsNV set bool layoutDerivativeGroupLinear; // true if layout derivative_group_linearNV set int primitives; // mesh shader "max_primitives"DerivativeGroupLinear; // true if layout derivative_group_linearNV set bool layoutPrimitiveCulling; // true if layout primitive_culling set bool layoutNonCoherentTileAttachmentReadQCOM; // fragment shaders -- per object int layoutTileShadingRateQCOM[3]; // compute shader bool layoutTileShadingRateQCOMNotDefault[3]; // compute shader TLayoutDepth getDepth() const { return layoutDepth; } TLayoutStencil getStencil() const { return layoutStencil; } void init() { geometry = ElgNone; originUpperLeft = false; pixelCenterInteger = false; invocations = TQualifier::layoutNotSet; vertices = TQualifier::layoutNotSet; spacing = EvsNone; order = EvoNone; pointMode = false; localSize[0] = 1; localSize[1] = 1; localSize[2] = 1; localSizeNotDefault[0] = false; localSizeNotDefault[1] = false; localSizeNotDefault[2] = false; localSizeSpecId[0] = TQualifier::layoutNotSet; localSizeSpecId[1] = TQualifier::layoutNotSet; localSizeSpecId[2] = TQualifier::layoutNotSet; earlyFragmentTests = false; earlyAndLateFragmentTestsAMD = false; postDepthCoverage = false; nonCoherentColorAttachmentReadEXT = false; nonCoherentDepthAttachmentReadEXT = false; nonCoherentStencilAttachmentReadEXT = false; layoutDepth = EldNone; layoutStencil = ElsNone; blendEquation = false; numViews = TQualifier::layoutNotSet; layoutOverrideCoverage = false; layoutDerivativeGroupQuads = false; layoutDerivativeGroupLinear = false; layoutPrimitiveCulling = false; layoutNonCoherentTileAttachmentReadQCOM = false; layoutTileShadingRateQCOM[0] = 0; layoutTileShadingRateQCOM[1] = 0; layoutTileShadingRateQCOM[2] = 0; layoutTileShadingRateQCOMNotDefault[0] = false; layoutTileShadingRateQCOMNotDefault[1] = false; layoutTileShadingRateQCOMNotDefault[2] = false; primitives = TQualifier::layoutNotSet; interlockOrdering = EioNone; } bool hasBlendEquation() const { return blendEquation; } // Merge in characteristics from the 'src' qualifier. They can override when // set, but never erase when not set. void merge(const TShaderQualifiers& src) { if (src.geometry != ElgNone) geometry = src.geometry; if (src.pixelCenterInteger) pixelCenterInteger = src.pixelCenterInteger; if (src.originUpperLeft) originUpperLeft = src.originUpperLeft; if (src.invocations != TQualifier::layoutNotSet) invocations = src.invocations; if (src.vertices != TQualifier::layoutNotSet) vertices = src.vertices; if (src.spacing != EvsNone) spacing = src.spacing; if (src.order != EvoNone) order = src.order; if (src.pointMode) pointMode = true; for (int i = 0; i < 3; ++i) { if (src.localSize[i] > 1) localSize[i] = src.localSize[i]; } for (int i = 0; i < 3; ++i) { localSizeNotDefault[i] = src.localSizeNotDefault[i] || localSizeNotDefault[i]; } for (int i = 0; i < 3; ++i) { if (src.localSizeSpecId[i] != TQualifier::layoutNotSet) localSizeSpecId[i] = src.localSizeSpecId[i]; } if (src.earlyFragmentTests) earlyFragmentTests = true; if (src.earlyAndLateFragmentTestsAMD) earlyAndLateFragmentTestsAMD = true; if (src.postDepthCoverage) postDepthCoverage = true; if (src.nonCoherentColorAttachmentReadEXT) nonCoherentColorAttachmentReadEXT = true; if (src.nonCoherentDepthAttachmentReadEXT) nonCoherentDepthAttachmentReadEXT = true; if (src.nonCoherentStencilAttachmentReadEXT) nonCoherentStencilAttachmentReadEXT = true; if (src.layoutDepth) layoutDepth = src.layoutDepth; if (src.layoutStencil) layoutStencil = src.layoutStencil; if (src.blendEquation) blendEquation = src.blendEquation; if (src.numViews != TQualifier::layoutNotSet) numViews = src.numViews; if (src.layoutOverrideCoverage) layoutOverrideCoverage = src.layoutOverrideCoverage; if (src.layoutDerivativeGroupQuads) layoutDerivativeGroupQuads = src.layoutDerivativeGroupQuads; if (src.layoutDerivativeGroupLinear) layoutDerivativeGroupLinear = src.layoutDerivativeGroupLinear; if (src.primitives != TQualifier::layoutNotSet) primitives = src.primitives; if (src.interlockOrdering != EioNone) interlockOrdering = src.interlockOrdering; if (src.layoutPrimitiveCulling) layoutPrimitiveCulling = src.layoutPrimitiveCulling; if (src.layoutNonCoherentTileAttachmentReadQCOM) layoutNonCoherentTileAttachmentReadQCOM = src.layoutNonCoherentTileAttachmentReadQCOM; for (int i = 0; i < 3; ++i) { if (src.layoutTileShadingRateQCOM[i] > 1) layoutTileShadingRateQCOM[i] = src.layoutTileShadingRateQCOM[i]; } for (int i = 0; i < 3; ++i) { layoutTileShadingRateQCOMNotDefault[i] = src.layoutTileShadingRateQCOMNotDefault[i] || layoutTileShadingRateQCOMNotDefault[i]; } } }; class TTypeParameters { public: POOL_ALLOCATOR_NEW_DELETE(GetThreadPoolAllocator()) TTypeParameters() : basicType(EbtVoid), arraySizes(nullptr), spirvType(nullptr) {} TBasicType basicType; TArraySizes *arraySizes; TSpirvType *spirvType; bool operator==(const TTypeParameters& rhs) const { bool same = basicType == rhs.basicType && *arraySizes == *rhs.arraySizes; if (same && basicType == EbtSpirvType) { assert(spirvType && rhs.spirvType); return *spirvType == *rhs.spirvType; } return same; } bool operator!=(const TTypeParameters& rhs) const { return !(*this == rhs); } }; // // TPublicType is just temporarily used while parsing and not quite the same // information kept per node in TType. Due to the bison stack, it can't have // types that it thinks have non-trivial constructors. It should // just be used while recognizing the grammar, not anything else. // Once enough is known about the situation, the proper information // moved into a TType, or the parse context, etc. // class TPublicType { public: TBasicType basicType; TSampler sampler; TQualifier qualifier; TShaderQualifiers shaderQualifiers; uint32_t vectorSize : 4; uint32_t matrixCols : 4; uint32_t matrixRows : 4; bool coopmatNV : 1; bool coopmatKHR : 1; bool coopvecNV : 1; bool tileAttachmentQCOM: 1; TArraySizes* arraySizes; const TType* userDef; TSourceLoc loc; TTypeParameters* typeParameters; // SPIR-V type defined by spirv_type directive TSpirvType* spirvType; bool isCoopmat() const { return coopmatNV || coopmatKHR; } bool isCoopmatNV() const { return coopmatNV; } bool isCoopmatKHR() const { return coopmatKHR; } bool isCoopvecNV() const { return coopvecNV; } bool isCoopmatOrvec() const { return isCoopmat() || isCoopvecNV(); } bool isTensorLayoutNV() const { return basicType == EbtTensorLayoutNV; } bool isTensorViewNV() const { return basicType == EbtTensorViewNV; } void initType(const TSourceLoc& l) { basicType = EbtVoid; vectorSize = 1u; matrixRows = 0; matrixCols = 0; arraySizes = nullptr; userDef = nullptr; loc = l; typeParameters = nullptr; coopmatNV = false; coopmatKHR = false; coopvecNV = false; tileAttachmentQCOM = false; spirvType = nullptr; } void initQualifiers(bool global = false) { qualifier.clear(); if (global) qualifier.storage = EvqGlobal; } void init(const TSourceLoc& l, bool global = false) { initType(l); sampler.clear(); initQualifiers(global); shaderQualifiers.init(); } void setVector(int s) { matrixRows = 0; matrixCols = 0; assert(s >= 0); vectorSize = static_cast(s) & 0b1111; } void setMatrix(int c, int r) { assert(r >= 0); matrixRows = static_cast(r) & 0b1111; assert(c >= 0); matrixCols = static_cast(c) & 0b1111; vectorSize = 0; } bool isScalar() const { return matrixCols == 0u && vectorSize == 1u && arraySizes == nullptr && userDef == nullptr; } // GL_EXT_spirv_intrinsics void setSpirvType(const TSpirvInstruction& spirvInst, const TSpirvTypeParameters* typeParams = nullptr); // "Image" is a superset of "Subpass" bool isImage() const { return basicType == EbtSampler && sampler.isImage(); } bool isSubpass() const { return basicType == EbtSampler && sampler.isSubpass(); } bool isAttachmentEXT() const { return basicType == EbtSampler && sampler.isAttachmentEXT(); } }; // // Base class for things that have a type. // class TType { public: POOL_ALLOCATOR_NEW_DELETE(GetThreadPoolAllocator()) // for "empty" type (no args) or simple scalar/vector/matrix explicit TType(TBasicType t = EbtVoid, TStorageQualifier q = EvqTemporary, int vs = 1, int mc = 0, int mr = 0, bool isVector = false) : basicType(t), vectorSize(static_cast(vs) & 0b1111), matrixCols(static_cast(mc) & 0b1111), matrixRows(static_cast(mr) & 0b1111), vector1(isVector && vs == 1), coopmatNV(false), coopmatKHR(false), coopmatKHRuse(0), coopmatKHRUseValid(false), coopvecNV(false), tileAttachmentQCOM(false), arraySizes(nullptr), structure(nullptr), fieldName(nullptr), typeName(nullptr), typeParameters(nullptr), spirvType(nullptr) { assert(vs >= 0); assert(mc >= 0); assert(mr >= 0); sampler.clear(); qualifier.clear(); qualifier.storage = q; assert(!(isMatrix() && vectorSize != 0)); // prevent vectorSize != 0 on matrices } // for explicit precision qualifier TType(TBasicType t, TStorageQualifier q, TPrecisionQualifier p, int vs = 1, int mc = 0, int mr = 0, bool isVector = false) : basicType(t), vectorSize(static_cast(vs) & 0b1111), matrixCols(static_cast(mc) & 0b1111), matrixRows(static_cast(mr) & 0b1111), vector1(isVector && vs == 1), coopmatNV(false), coopmatKHR(false), coopmatKHRuse(0), coopmatKHRUseValid(false), coopvecNV(false), tileAttachmentQCOM(false), arraySizes(nullptr), structure(nullptr), fieldName(nullptr), typeName(nullptr), typeParameters(nullptr), spirvType(nullptr) { assert(vs >= 0); assert(mc >= 0); assert(mr >= 0); sampler.clear(); qualifier.clear(); qualifier.storage = q; qualifier.precision = p; assert(p >= EpqNone && p <= EpqHigh); assert(!(isMatrix() && vectorSize != 0)); // prevent vectorSize != 0 on matrices } // for turning a TPublicType into a TType, using a shallow copy explicit TType(const TPublicType& p) : basicType(p.basicType), vectorSize(p.vectorSize), matrixCols(p.matrixCols), matrixRows(p.matrixRows), vector1(false), coopmatNV(p.coopmatNV), coopmatKHR(p.coopmatKHR), coopmatKHRuse(0), coopmatKHRUseValid(false), coopvecNV(p.coopvecNV), tileAttachmentQCOM(p.tileAttachmentQCOM), arraySizes(p.arraySizes), structure(nullptr), fieldName(nullptr), typeName(nullptr), typeParameters(p.typeParameters), spirvType(p.spirvType) { if (basicType == EbtSampler) sampler = p.sampler; else sampler.clear(); qualifier = p.qualifier; if (p.userDef) { if (p.userDef->basicType == EbtReference) { basicType = EbtReference; referentType = p.userDef->referentType; } else { structure = p.userDef->getWritableStruct(); // public type is short-lived; there are no sharing issues } typeName = NewPoolTString(p.userDef->getTypeName().c_str()); } if (p.isCoopmatNV() && p.typeParameters && p.typeParameters->arraySizes->getNumDims() > 0) { int numBits = p.typeParameters->arraySizes->getDimSize(0); if (p.basicType == EbtFloat && numBits == 16) { basicType = EbtFloat16; qualifier.precision = EpqNone; } else if (p.basicType == EbtUint && numBits == 8) { basicType = EbtUint8; qualifier.precision = EpqNone; } else if (p.basicType == EbtUint && numBits == 16) { basicType = EbtUint16; qualifier.precision = EpqNone; } else if (p.basicType == EbtInt && numBits == 8) { basicType = EbtInt8; qualifier.precision = EpqNone; } else if (p.basicType == EbtInt && numBits == 16) { basicType = EbtInt16; qualifier.precision = EpqNone; } } if (p.isCoopmatKHR() && p.typeParameters && p.typeParameters->arraySizes->getNumDims() > 0) { basicType = p.typeParameters->basicType; if (isSpirvType()) { assert(p.typeParameters->spirvType); spirvType = p.typeParameters->spirvType; } if (p.typeParameters->arraySizes->getNumDims() == 4) { const int dimSize = p.typeParameters->arraySizes->getDimSize(3); assert(dimSize >= 0); coopmatKHRuse = static_cast(dimSize) & 0b111; coopmatKHRUseValid = true; } } if (p.isCoopvecNV() && p.typeParameters) { basicType = p.typeParameters->basicType; } } // for construction of sampler types TType(const TSampler& sampler, TStorageQualifier q = EvqUniform, TArraySizes* as = nullptr) : basicType(EbtSampler), vectorSize(1u), matrixCols(0u), matrixRows(0u), vector1(false), coopmatNV(false), coopmatKHR(false), coopmatKHRuse(0), coopmatKHRUseValid(false), coopvecNV(false), tileAttachmentQCOM(false), arraySizes(as), structure(nullptr), fieldName(nullptr), typeName(nullptr), sampler(sampler), typeParameters(nullptr), spirvType(nullptr) { qualifier.clear(); qualifier.storage = q; } // to efficiently make a dereferenced type // without ever duplicating the outer structure that will be thrown away // and using only shallow copy TType(const TType& type, int derefIndex, bool rowMajor = false) { if (type.isArray()) { shallowCopy(type); if (type.getArraySizes()->getNumDims() == 1) { arraySizes = nullptr; } else { // want our own copy of the array, so we can edit it arraySizes = new TArraySizes; arraySizes->copyDereferenced(*type.arraySizes); } } else if (type.basicType == EbtStruct || type.basicType == EbtBlock) { // do a structure dereference const TTypeList& memberList = *type.getStruct(); shallowCopy(*memberList[derefIndex].type); return; } else { // do a vector/matrix dereference shallowCopy(type); if (matrixCols > 0) { // dereference from matrix to vector if (rowMajor) vectorSize = matrixCols; else vectorSize = matrixRows; matrixCols = 0; matrixRows = 0; if (vectorSize == 1) vector1 = true; } else if (isVector()) { // dereference from vector to scalar vectorSize = 1; vector1 = false; } else if (isCoopMat() || isCoopVecNV()) { coopmatNV = false; coopmatKHR = false; coopmatKHRuse = 0; coopmatKHRUseValid = false; coopvecNV = false; typeParameters = nullptr; } else if (isTileAttachmentQCOM()) { tileAttachmentQCOM = false; typeParameters = nullptr; } } } // for making structures, ... TType(TTypeList* userDef, const TString& n) : basicType(EbtStruct), vectorSize(1), matrixCols(0), matrixRows(0), vector1(false), coopmatNV(false), coopmatKHR(false), coopmatKHRuse(0), coopmatKHRUseValid(false), coopvecNV(false), tileAttachmentQCOM(false), arraySizes(nullptr), structure(userDef), fieldName(nullptr), typeParameters(nullptr), spirvType(nullptr) { sampler.clear(); qualifier.clear(); typeName = NewPoolTString(n.c_str()); } // For interface blocks TType(TTypeList* userDef, const TString& n, const TQualifier& q) : basicType(EbtBlock), vectorSize(1), matrixCols(0), matrixRows(0), vector1(false), coopmatNV(false), coopmatKHR(false), coopmatKHRuse(0), coopmatKHRUseValid(false), coopvecNV(false), tileAttachmentQCOM(false), qualifier(q), arraySizes(nullptr), structure(userDef), fieldName(nullptr), typeParameters(nullptr), spirvType(nullptr) { sampler.clear(); typeName = NewPoolTString(n.c_str()); } // for block reference (first parameter must be EbtReference) explicit TType(TBasicType t, const TType &p, const TString& n) : basicType(t), vectorSize(1), matrixCols(0), matrixRows(0), vector1(false), coopmatNV(false), coopmatKHR(false), coopmatKHRuse(0), coopmatKHRUseValid(false), tileAttachmentQCOM(false), arraySizes(nullptr), structure(nullptr), fieldName(nullptr), typeName(nullptr), typeParameters(nullptr), spirvType(nullptr) { assert(t == EbtReference); typeName = NewPoolTString(n.c_str()); sampler.clear(); qualifier.clear(); qualifier.storage = p.qualifier.storage; referentType = p.clone(); } virtual ~TType() {} // Not for use across pool pops; it will cause multiple instances of TType to point to the same information. // This only works if that information (like a structure's list of types) does not change and // the instances are sharing the same pool. void shallowCopy(const TType& copyOf) { basicType = copyOf.basicType; sampler = copyOf.sampler; qualifier = copyOf.qualifier; vectorSize = copyOf.vectorSize; matrixCols = copyOf.matrixCols; matrixRows = copyOf.matrixRows; vector1 = copyOf.vector1; arraySizes = copyOf.arraySizes; // copying the pointer only, not the contents fieldName = copyOf.fieldName; typeName = copyOf.typeName; if (isStruct()) { structure = copyOf.structure; } else { referentType = copyOf.referentType; } typeParameters = copyOf.typeParameters; spirvType = copyOf.spirvType; coopmatNV = copyOf.isCoopMatNV(); coopmatKHR = copyOf.isCoopMatKHR(); coopmatKHRuse = copyOf.coopmatKHRuse; coopmatKHRUseValid = copyOf.coopmatKHRUseValid; coopvecNV = copyOf.isCoopVecNV(); tileAttachmentQCOM = copyOf.tileAttachmentQCOM; } // Make complete copy of the whole type graph rooted at 'copyOf'. void deepCopy(const TType& copyOf) { TMap copied; // to enable copying a type graph as a graph, not a tree deepCopy(copyOf, copied); } // Recursively make temporary void makeTemporary() { getQualifier().makeTemporary(); if (isStruct()) for (unsigned int i = 0; i < structure->size(); ++i) (*structure)[i].type->makeTemporary(); } TType* clone() const { TType *newType = new TType(); newType->deepCopy(*this); return newType; } void makeVector() { vector1 = true; } virtual void hideMember() { basicType = EbtVoid; vectorSize = 1u; } virtual bool hiddenMember() const { return basicType == EbtVoid; } virtual void setFieldName(const TString& n) { fieldName = NewPoolTString(n.c_str()); } virtual const TString& getTypeName() const { assert(typeName); return *typeName; } virtual const TString& getFieldName() const { assert(fieldName); return *fieldName; } TShaderInterface getShaderInterface() const { if (basicType != EbtBlock) return EsiNone; switch (qualifier.storage) { default: return EsiNone; case EvqVaryingIn: return EsiInput; case EvqVaryingOut: return EsiOutput; case EvqUniform: case EvqBuffer: return EsiUniform; } } virtual TBasicType getBasicType() const { return basicType; } virtual const TSampler& getSampler() const { return sampler; } virtual TSampler& getSampler() { return sampler; } virtual TQualifier& getQualifier() { return qualifier; } virtual const TQualifier& getQualifier() const { return qualifier; } virtual int getVectorSize() const { return static_cast(vectorSize); } // returns 1 for either scalar or vector of size 1, valid for both virtual int getMatrixCols() const { return static_cast(matrixCols); } virtual int getMatrixRows() const { return static_cast(matrixRows); } virtual int getOuterArraySize() const { return arraySizes->getOuterSize(); } virtual TIntermTyped* getOuterArrayNode() const { return arraySizes->getOuterNode(); } virtual int getCumulativeArraySize() const { return arraySizes->getCumulativeSize(); } bool isArrayOfArrays() const { return arraySizes != nullptr && arraySizes->getNumDims() > 1; } virtual int getImplicitArraySize() const { return arraySizes->getImplicitSize(); } virtual const TArraySizes* getArraySizes() const { return arraySizes; } virtual TArraySizes* getArraySizes() { return arraySizes; } virtual TType* getReferentType() const { return referentType; } virtual const TTypeParameters* getTypeParameters() const { return typeParameters; } virtual TTypeParameters* getTypeParameters() { return typeParameters; } virtual bool isScalar() const { return ! isVector() && ! isMatrix() && ! isStruct() && ! isArray() && ! isCoopVecNV(); } virtual bool isScalarOrVec1() const { return isScalar() || vector1; } virtual bool isScalarOrVector() const { return !isMatrix() && !isStruct() && !isArray(); } virtual bool isVector() const { return vectorSize > 1u || vector1; } virtual bool isMatrix() const { return matrixCols ? true : false; } virtual bool isArray() const { return arraySizes != nullptr; } virtual bool isSizedArray() const { return isArray() && arraySizes->isSized(); } virtual bool isUnsizedArray() const { return isArray() && !arraySizes->isSized(); } virtual bool isImplicitlySizedArray() const { return isArray() && arraySizes->isImplicitlySized(); } virtual bool isArrayVariablyIndexed() const { assert(isArray()); return arraySizes->isVariablyIndexed(); } virtual void setArrayVariablyIndexed() { assert(isArray()); arraySizes->setVariablyIndexed(); } virtual void updateImplicitArraySize(int size) { assert(isArray()); arraySizes->updateImplicitSize(size); } virtual void setImplicitlySized(bool isImplicitSized) { arraySizes->setImplicitlySized(isImplicitSized); } virtual bool isStruct() const { return basicType == EbtStruct || basicType == EbtBlock; } virtual bool isFloatingDomain() const { return basicType == EbtFloat || basicType == EbtDouble || basicType == EbtFloat16 || basicType == EbtBFloat16 || basicType == EbtFloatE5M2 || basicType == EbtFloatE4M3; } virtual bool isIntegerDomain() const { switch (basicType) { case EbtInt8: case EbtUint8: case EbtInt16: case EbtUint16: case EbtInt: case EbtUint: case EbtInt64: case EbtUint64: case EbtAtomicUint: return true; default: break; } return false; } virtual bool isOpaque() const { return basicType == EbtSampler || basicType == EbtAtomicUint || basicType == EbtAccStruct || basicType == EbtRayQuery || basicType == EbtHitObjectNV || isTileAttachmentQCOM(); } virtual bool isBuiltIn() const { return getQualifier().builtIn != EbvNone; } virtual bool isAttachmentEXT() const { return basicType == EbtSampler && getSampler().isAttachmentEXT(); } virtual bool isImage() const { return basicType == EbtSampler && getSampler().isImage(); } virtual bool isSubpass() const { return basicType == EbtSampler && getSampler().isSubpass(); } virtual bool isTexture() const { return basicType == EbtSampler && getSampler().isTexture(); } virtual bool isBindlessImage() const { return isImage() && qualifier.layoutBindlessImage; } virtual bool isBindlessTexture() const { return isTexture() && qualifier.layoutBindlessSampler; } // Check the block-name convention of creating a block without populating it's members: virtual bool isUnusableName() const { return isStruct() && structure == nullptr; } virtual bool isParameterized() const { return typeParameters != nullptr; } bool isAtomic() const { return basicType == EbtAtomicUint; } bool isCoopMat() const { return coopmatNV || coopmatKHR; } bool isCoopMatNV() const { return coopmatNV; } bool isCoopMatKHR() const { return coopmatKHR; } bool isCoopVecNV() const { return coopvecNV; } bool isCoopMatOrVec() const { return isCoopMat() || isCoopVecNV(); } bool isTileAttachmentQCOM() const { return tileAttachmentQCOM; } bool isReference() const { return getBasicType() == EbtReference; } bool isSpirvType() const { return getBasicType() == EbtSpirvType; } int getCoopMatKHRuse() const { return static_cast(coopmatKHRuse); } bool isTensorLayoutNV() const { return getBasicType() == EbtTensorLayoutNV; } bool isTensorViewNV() const { return getBasicType() == EbtTensorViewNV; } // return true if this type contains any subtype which satisfies the given predicate. template bool contains(P predicate) const { if (predicate(this)) return true; const auto hasa = [predicate](const TTypeLoc& tl) { return tl.type->contains(predicate); }; return isStruct() && std::any_of(structure->begin(), structure->end(), hasa); } // Recursively checks if the type contains the given basic type virtual bool containsBasicType(TBasicType checkType) const { return contains([checkType](const TType* t) { return t->basicType == checkType; } ); } // Recursively check the structure for any arrays, needed for some error checks virtual bool containsArray() const { return contains([](const TType* t) { return t->isArray(); } ); } // Check the structure for any structures, needed for some error checks virtual bool containsStructure() const { return contains([this](const TType* t) { return t != this && t->isStruct(); } ); } // Recursively check the structure for any unsized arrays, needed for triggering a copyUp(). virtual bool containsUnsizedArray() const { return contains([](const TType* t) { return t->isUnsizedArray(); } ); } virtual bool containsOpaque() const { return contains([](const TType* t) { return t->isOpaque(); } ); } virtual bool containsSampler() const { return contains([](const TType* t) { return t->isTexture() || t->isImage(); }); } // Recursively checks if the type contains a built-in variable virtual bool containsBuiltIn() const { return contains([](const TType* t) { return t->isBuiltIn(); } ); } virtual bool containsNonOpaque() const { const auto nonOpaque = [](const TType* t) { switch (t->basicType) { case EbtVoid: case EbtFloat: case EbtDouble: case EbtFloat16: case EbtBFloat16: case EbtFloatE5M2: case EbtFloatE4M3: case EbtInt8: case EbtUint8: case EbtInt16: case EbtUint16: case EbtInt: case EbtUint: case EbtInt64: case EbtUint64: case EbtBool: case EbtReference: return true; default: return false; } }; return contains(nonOpaque); } virtual bool containsSpecializationSize() const { return contains([](const TType* t) { return t->isArray() && t->arraySizes->isOuterSpecialization(); } ); } bool containsDouble() const { return containsBasicType(EbtDouble); } bool contains16BitFloat() const { return containsBasicType(EbtFloat16); } bool containsBFloat16() const { return containsBasicType(EbtBFloat16); } bool contains64BitInt() const { return containsBasicType(EbtInt64) || containsBasicType(EbtUint64); } bool contains16BitInt() const { return containsBasicType(EbtInt16) || containsBasicType(EbtUint16); } bool contains8BitInt() const { return containsBasicType(EbtInt8) || containsBasicType(EbtUint8); } bool containsCoopMat() const { return contains([](const TType* t) { return t->coopmatNV || t->coopmatKHR; } ); } bool containsCoopVec() const { return contains([](const TType* t) { return t->coopvecNV; } ); } bool containsReference() const { return containsBasicType(EbtReference); } // Array editing methods. Array descriptors can be shared across // type instances. This allows all uses of the same array // to be updated at once. E.g., all nodes can be explicitly sized // by tracking and correcting one implicit size. Or, all nodes // can get the explicit size on a redeclaration that gives size. // // N.B.: Don't share with the shared symbol tables (symbols are // marked as isReadOnly(). Such symbols with arrays that will be // edited need to copyUp() on first use, so that // A) the edits don't effect the shared symbol table, and // B) the edits are shared across all users. void updateArraySizes(const TType& type) { // For when we may already be sharing existing array descriptors, // keeping the pointers the same, just updating the contents. assert(arraySizes != nullptr); assert(type.arraySizes != nullptr); *arraySizes = *type.arraySizes; } void copyArraySizes(const TArraySizes& s) { // For setting a fresh new set of array sizes, not yet worrying about sharing. arraySizes = new TArraySizes; *arraySizes = s; } void transferArraySizes(TArraySizes* s) { // For setting an already allocated set of sizes that this type can use // (no copy made). arraySizes = s; } void clearArraySizes() { arraySizes = nullptr; } // Add inner array sizes, to any existing sizes, via copy; the // sizes passed in can still be reused for other purposes. void copyArrayInnerSizes(const TArraySizes* s) { if (s != nullptr) { if (arraySizes == nullptr) copyArraySizes(*s); else arraySizes->addInnerSizes(*s); } } void changeOuterArraySize(int s) { arraySizes->changeOuterSize(s); } // Recursively make the implicit array size the explicit array size. // Expicit arrays are compile-time or link-time sized, never run-time sized. // Sometimes, policy calls for an array to be run-time sized even if it was // never variably indexed: Don't turn a 'skipNonvariablyIndexed' array into // an explicit array. void adoptImplicitArraySizes(bool skipNonvariablyIndexed) { if (isUnsizedArray() && (qualifier.builtIn == EbvSampleMask || !(skipNonvariablyIndexed || isArrayVariablyIndexed()))) { changeOuterArraySize(getImplicitArraySize()); setImplicitlySized(true); } // For multi-dim per-view arrays, set unsized inner dimension size to 1 if (qualifier.isPerView() && arraySizes && arraySizes->isInnerUnsized()) arraySizes->clearInnerUnsized(); if (isStruct() && structure->size() > 0) { int lastMember = (int)structure->size() - 1; for (int i = 0; i < lastMember; ++i) (*structure)[i].type->adoptImplicitArraySizes(false); // implement the "last member of an SSBO" policy (*structure)[lastMember].type->adoptImplicitArraySizes(getQualifier().storage == EvqBuffer); } } void copyTypeParameters(const TTypeParameters& s) { // For setting a fresh new set of type parameters, not yet worrying about sharing. typeParameters = new TTypeParameters; *typeParameters = s; } const char* getBasicString() const { return TType::getBasicString(basicType); } static const char* getBasicString(TBasicType t) { switch (t) { case EbtFloat: return "float"; case EbtInt: return "int"; case EbtUint: return "uint"; case EbtSampler: return "sampler/image"; case EbtVoid: return "void"; case EbtDouble: return "double"; case EbtFloat16: return "float16_t"; case EbtBFloat16: return "bfloat16_t"; case EbtFloatE5M2: return "floate5m2_t"; case EbtFloatE4M3: return "floate4m3_t"; case EbtInt8: return "int8_t"; case EbtUint8: return "uint8_t"; case EbtInt16: return "int16_t"; case EbtUint16: return "uint16_t"; case EbtInt64: return "int64_t"; case EbtUint64: return "uint64_t"; case EbtBool: return "bool"; case EbtAtomicUint: return "atomic_uint"; case EbtStruct: return "structure"; case EbtBlock: return "block"; case EbtAccStruct: return "accelerationStructureNV"; case EbtRayQuery: return "rayQueryEXT"; case EbtReference: return "reference"; case EbtString: return "string"; case EbtSpirvType: return "spirv_type"; case EbtCoopmat: return "coopmat"; case EbtTensorLayoutNV: return "tensorLayoutNV"; case EbtTensorViewNV: return "tensorViewNV"; case EbtCoopvecNV: return "coopvecNV"; default: return "unknown type"; } } TString getCompleteString(bool syntactic = false, bool getQualifiers = true, bool getPrecision = true, bool getType = true, TString name = "", TString structName = "") const { TString typeString; const auto appendStr = [&](const char* s) { typeString.append(s); }; const auto appendUint = [&](unsigned int u) { typeString.append(std::to_string(u).c_str()); }; const auto appendInt = [&](int i) { typeString.append(std::to_string(i).c_str()); }; if (getQualifiers) { if (qualifier.hasSpirvDecorate()) appendStr(qualifier.getSpirvDecorateQualifierString().c_str()); if (qualifier.hasLayout()) { // To reduce noise, skip this if the only layout is an xfb_buffer // with no triggering xfb_offset. TQualifier noXfbBuffer = qualifier; noXfbBuffer.layoutXfbBuffer = TQualifier::layoutXfbBufferEnd; if (noXfbBuffer.hasLayout()) { appendStr("layout("); if (qualifier.hasAnyLocation()) { appendStr(" location="); appendUint(qualifier.layoutLocation); if (qualifier.hasComponent()) { appendStr(" component="); appendUint(qualifier.layoutComponent); } if (qualifier.hasIndex()) { appendStr(" index="); appendUint(qualifier.layoutIndex); } } if (qualifier.hasSet()) { appendStr(" set="); appendUint(qualifier.layoutSet); } if (qualifier.hasBinding()) { appendStr(" binding="); appendUint(qualifier.layoutBinding); } if (qualifier.hasStream()) { appendStr(" stream="); appendUint(qualifier.layoutStream); } if (qualifier.hasMatrix()) { appendStr(" "); appendStr(TQualifier::getLayoutMatrixString(qualifier.layoutMatrix)); } if (qualifier.hasPacking()) { appendStr(" "); appendStr(TQualifier::getLayoutPackingString(qualifier.layoutPacking)); } if (qualifier.hasOffset()) { appendStr(" offset="); appendInt(qualifier.layoutOffset); } if (qualifier.hasAlign()) { appendStr(" align="); appendInt(qualifier.layoutAlign); } if (qualifier.hasFormat()) { appendStr(" "); appendStr(TQualifier::getLayoutFormatString(qualifier.layoutFormat)); } if (qualifier.hasXfbBuffer() && qualifier.hasXfbOffset()) { appendStr(" xfb_buffer="); appendUint(qualifier.layoutXfbBuffer); } if (qualifier.hasXfbOffset()) { appendStr(" xfb_offset="); appendUint(qualifier.layoutXfbOffset); } if (qualifier.hasXfbStride()) { appendStr(" xfb_stride="); appendUint(qualifier.layoutXfbStride); } if (qualifier.hasAttachment()) { appendStr(" input_attachment_index="); appendUint(qualifier.layoutAttachment); } if (qualifier.hasSpecConstantId()) { appendStr(" constant_id="); appendUint(qualifier.layoutSpecConstantId); } if (qualifier.layoutPushConstant) appendStr(" push_constant"); if (qualifier.layoutBufferReference) appendStr(" buffer_reference"); if (qualifier.hasBufferReferenceAlign()) { appendStr(" buffer_reference_align="); appendUint(1u << qualifier.layoutBufferReferenceAlign); } if (qualifier.layoutPassthrough) appendStr(" passthrough"); if (qualifier.layoutViewportRelative) appendStr(" layoutViewportRelative"); if (qualifier.layoutSecondaryViewportRelativeOffset != -2048) { appendStr(" layoutSecondaryViewportRelativeOffset="); appendInt(qualifier.layoutSecondaryViewportRelativeOffset); } if (qualifier.layoutShaderRecord) appendStr(" shaderRecordNV"); if (qualifier.layoutFullQuads) appendStr(" full_quads"); if (qualifier.layoutQuadDeriv) appendStr(" quad_derivatives"); if (qualifier.layoutHitObjectShaderRecordNV) appendStr(" hitobjectshaderrecordnv"); if (qualifier.layoutBindlessSampler) appendStr(" layoutBindlessSampler"); if (qualifier.layoutBindlessImage) appendStr(" layoutBindlessImage"); appendStr(")"); } } if (qualifier.invariant) appendStr(" invariant"); if (qualifier.noContraction) appendStr(" noContraction"); if (qualifier.centroid) appendStr(" centroid"); if (qualifier.smooth) appendStr(" smooth"); if (qualifier.flat) appendStr(" flat"); if (qualifier.nopersp) appendStr(" noperspective"); if (qualifier.explicitInterp) appendStr(" __explicitInterpAMD"); if (qualifier.pervertexNV) appendStr(" pervertexNV"); if (qualifier.pervertexEXT) appendStr(" pervertexEXT"); if (qualifier.perPrimitiveNV) appendStr(" perprimitiveNV"); if (qualifier.perViewNV) appendStr(" perviewNV"); if (qualifier.perTaskNV) appendStr(" taskNV"); if (qualifier.patch) appendStr(" patch"); if (qualifier.sample) appendStr(" sample"); if (qualifier.coherent) appendStr(" coherent"); if (qualifier.devicecoherent) appendStr(" devicecoherent"); if (qualifier.queuefamilycoherent) appendStr(" queuefamilycoherent"); if (qualifier.workgroupcoherent) appendStr(" workgroupcoherent"); if (qualifier.subgroupcoherent) appendStr(" subgroupcoherent"); if (qualifier.shadercallcoherent) appendStr(" shadercallcoherent"); if (qualifier.nonprivate) appendStr(" nonprivate"); if (qualifier.volatil) appendStr(" volatile"); if (qualifier.nontemporal) appendStr(" nontemporal"); if (qualifier.restrict) appendStr(" restrict"); if (qualifier.readonly) appendStr(" readonly"); if (qualifier.writeonly) appendStr(" writeonly"); if (qualifier.specConstant) appendStr(" specialization-constant"); if (qualifier.nonUniform) appendStr(" nonuniform"); if (qualifier.isNullInit()) appendStr(" null-init"); if (qualifier.isSpirvByReference()) appendStr(" spirv_by_reference"); if (qualifier.isSpirvLiteral()) appendStr(" spirv_literal"); appendStr(" "); appendStr(getStorageQualifierString()); } if (getType) { if (syntactic) { if (getPrecision && qualifier.precision != EpqNone) { appendStr(" "); appendStr(getPrecisionQualifierString()); } if (isVector() || isMatrix()) { appendStr(" "); switch (basicType) { case EbtDouble: appendStr("d"); break; case EbtInt: appendStr("i"); break; case EbtUint: appendStr("u"); break; case EbtBool: appendStr("b"); break; case EbtFloat: default: break; } if (isVector()) { appendStr("vec"); appendInt(vectorSize); } else { appendStr("mat"); appendInt(matrixCols); appendStr("x"); appendInt(matrixRows); } } else if (isStruct() && structure) { appendStr(" "); appendStr(structName.c_str()); appendStr("{"); bool hasHiddenMember = true; for (size_t i = 0; i < structure->size(); ++i) { if (!(*structure)[i].type->hiddenMember()) { if (!hasHiddenMember) appendStr(", "); typeString.append((*structure)[i].type->getCompleteString(syntactic, getQualifiers, getPrecision, getType, (*structure)[i].type->getFieldName())); hasHiddenMember = false; } } appendStr("}"); } else { appendStr(" "); switch (basicType) { case EbtDouble: appendStr("double"); break; case EbtInt: appendStr("int"); break; case EbtUint: appendStr("uint"); break; case EbtBool: appendStr("bool"); break; case EbtFloat: appendStr("float"); break; default: appendStr("unexpected"); break; } } if (name.length() > 0) { appendStr(" "); appendStr(name.c_str()); } if (isArray()) { for (int i = 0; i < (int)arraySizes->getNumDims(); ++i) { int size = arraySizes->getDimSize(i); if (size == UnsizedArraySize && i == 0 && arraySizes->isVariablyIndexed()) appendStr("[]"); else { if (size == UnsizedArraySize) { appendStr("["); if (i == 0) appendInt(arraySizes->getImplicitSize()); appendStr("]"); } else { appendStr("["); appendInt(arraySizes->getDimSize(i)); appendStr("]"); } } } } } else { if (isArray()) { for (int i = 0; i < (int)arraySizes->getNumDims(); ++i) { int size = arraySizes->getDimSize(i); if (size == UnsizedArraySize && i == 0 && arraySizes->isVariablyIndexed()) appendStr(" runtime-sized array of"); else { if (size == UnsizedArraySize) { appendStr(" unsized"); if (i == 0) { appendStr(" "); appendInt(arraySizes->getImplicitSize()); } } else { appendStr(" "); appendInt(arraySizes->getDimSize(i)); } appendStr("-element array of"); } } } if (isParameterized()) { if (isCoopMatKHR()) { appendStr(" "); appendStr("coopmat"); } if (isTensorLayoutNV()) { appendStr(" "); appendStr("tensorLayoutNV"); } if (isTensorViewNV()) { appendStr(" "); appendStr("tensorViewNV"); } if (isCoopVecNV()) { appendStr(" "); appendStr("coopvecNV"); } appendStr("<"); for (int i = 0; i < (int)typeParameters->arraySizes->getNumDims(); ++i) { appendInt(typeParameters->arraySizes->getDimSize(i)); if (i != (int)typeParameters->arraySizes->getNumDims() - 1) appendStr(", "); } appendStr(">"); } if (getPrecision && qualifier.precision != EpqNone) { appendStr(" "); appendStr(getPrecisionQualifierString()); } if (isMatrix()) { appendStr(" "); appendInt(matrixCols); appendStr("X"); appendInt(matrixRows); appendStr(" matrix of"); } else if (isVector()) { appendStr(" "); appendInt(vectorSize); appendStr("-component vector of"); } appendStr(" "); typeString.append(getBasicTypeString()); if (qualifier.builtIn != EbvNone) { appendStr(" "); appendStr(getBuiltInVariableString()); } // Add struct/block members if (isStruct() && structure) { appendStr("{"); bool hasHiddenMember = true; for (size_t i = 0; i < structure->size(); ++i) { if (!(*structure)[i].type->hiddenMember()) { if (!hasHiddenMember) appendStr(", "); typeString.append((*structure)[i].type->getCompleteString()); typeString.append(" "); typeString.append((*structure)[i].type->getFieldName()); hasHiddenMember = false; } } appendStr("}"); } } } return typeString; } TString getBasicTypeString() const { if (basicType == EbtSampler) return sampler.getString(); else return getBasicString(); } const char* getStorageQualifierString() const { return GetStorageQualifierString(qualifier.storage); } const char* getBuiltInVariableString() const { return GetBuiltInVariableString(qualifier.builtIn); } const char* getPrecisionQualifierString() const { return GetPrecisionQualifierString(qualifier.precision); } const TTypeList* getStruct() const { assert(isStruct()); return structure; } void setStruct(TTypeList* s) { assert(isStruct()); structure = s; } TTypeList* getWritableStruct() const { assert(isStruct()); return structure; } // This should only be used when known to not be sharing with other threads void setBasicType(const TBasicType& t) { basicType = t; } void setVectorSize(int s) { assert(s >= 0); vectorSize = static_cast(s) & 0b1111; } int computeNumComponents() const { uint32_t components = 0; if (isCoopVecNV()) { components = typeParameters->arraySizes->getDimSize(0); } else if (getBasicType() == EbtStruct || getBasicType() == EbtBlock) { for (TTypeList::const_iterator tl = getStruct()->begin(); tl != getStruct()->end(); tl++) components += ((*tl).type)->computeNumComponents(); } else if (matrixCols) components = matrixCols * matrixRows; else components = vectorSize; if (arraySizes != nullptr) { components *= arraySizes->getCumulativeSize(); } return static_cast(components); } // append this type's mangled name to the passed in 'name' void appendMangledName(TString& name) const { buildMangledName(name); name += ';' ; } // These variables are inconsistently declared inside and outside of gl_PerVertex in glslang right now. // They are declared inside of 'in gl_PerVertex', but sitting as standalone when they are 'out'puts. bool isInconsistentGLPerVertexMember(const TString& name) const { if (name == "gl_SecondaryPositionNV" || name == "gl_PositionPerViewNV") return true; return false; } // Do two structure types match? They could be declared independently, // in different places, but still might satisfy the definition of matching. // From the spec: // // "Structures must have the same name, sequence of type names, and // type definitions, and member names to be considered the same type. // This rule applies recursively for nested or embedded types." // // If type mismatch in structure, return member indices through lpidx and rpidx. // If matching members for either block are exhausted, return -1 for exhausted // block and the index of the unmatched member. Otherwise return {-1,-1}. // bool sameStructType(const TType& right, int* lpidx = nullptr, int* rpidx = nullptr) const { // Initialize error to general type mismatch. if (lpidx != nullptr) { *lpidx = -1; *rpidx = -1; } // Most commonly, they are both nullptr, or the same pointer to the same actual structure // TODO: Why return true when neither types are structures? if ((!isStruct() && !right.isStruct()) || (isStruct() && right.isStruct() && structure == right.structure)) return true; if (!isStruct() || !right.isStruct()) return false; // Structure names have to match if (*typeName != *right.typeName) return false; // There are inconsistencies with how gl_PerVertex is setup. For now ignore those as errors if they // are known inconsistencies. bool isGLPerVertex = *typeName == "gl_PerVertex"; // Both being nullptr was caught above, now they both have to be structures of the same number of elements if (lpidx == nullptr && (structure->size() != right.structure->size() && !isGLPerVertex)) { return false; } // Compare the names and types of all the members, which have to match for (size_t li = 0, ri = 0; li < structure->size() || ri < right.structure->size(); ++li, ++ri) { if (lpidx != nullptr) { *lpidx = static_cast(li); *rpidx = static_cast(ri); } if (li < structure->size() && ri < right.structure->size()) { if ((*structure)[li].type->getFieldName() == (*right.structure)[ri].type->getFieldName()) { if (*(*structure)[li].type != *(*right.structure)[ri].type) return false; } else { // Skip hidden members if ((*structure)[li].type->hiddenMember()) { ri--; continue; } else if ((*right.structure)[ri].type->hiddenMember()) { li--; continue; } // If one of the members is something that's inconsistently declared, skip over it // for now. if (isGLPerVertex) { if (isInconsistentGLPerVertexMember((*structure)[li].type->getFieldName())) { ri--; continue; } else if (isInconsistentGLPerVertexMember((*right.structure)[ri].type->getFieldName())) { li--; continue; } } else { return false; } } // If we get here, then there should only be inconsistently declared members left } else if (li < structure->size()) { if (!(*structure)[li].type->hiddenMember() && !isInconsistentGLPerVertexMember((*structure)[li].type->getFieldName())) { if (lpidx != nullptr) { *rpidx = -1; } return false; } } else { if (!(*right.structure)[ri].type->hiddenMember() && !isInconsistentGLPerVertexMember((*right.structure)[ri].type->getFieldName())) { if (lpidx != nullptr) { *lpidx = -1; } return false; } } } return true; } bool sameReferenceType(const TType& right) const { if (isReference() != right.isReference()) return false; if (!isReference() && !right.isReference()) return true; assert(referentType != nullptr); assert(right.referentType != nullptr); if (referentType == right.referentType) return true; return *referentType == *right.referentType; } // See if two types match, in all aspects except arrayness // If mismatch in structure members, return member indices in lpidx and rpidx. bool sameElementType(const TType& right, int* lpidx = nullptr, int* rpidx = nullptr) const { if (lpidx != nullptr) { *lpidx = -1; *rpidx = -1; } return basicType == right.basicType && sameElementShape(right, lpidx, rpidx); } // See if two type's arrayness match bool sameArrayness(const TType& right) const { return ((arraySizes == nullptr && right.arraySizes == nullptr) || (arraySizes != nullptr && right.arraySizes != nullptr && (*arraySizes == *right.arraySizes || (arraySizes->isImplicitlySized() && right.arraySizes->isDefaultImplicitlySized()) || (right.arraySizes->isImplicitlySized() && arraySizes->isDefaultImplicitlySized())))); } // See if two type's arrayness match in everything except their outer dimension bool sameInnerArrayness(const TType& right) const { assert(arraySizes != nullptr && right.arraySizes != nullptr); return arraySizes->sameInnerArrayness(*right.arraySizes); } // See if two type's parameters match bool sameTypeParameters(const TType& right) const { return ((typeParameters == nullptr && right.typeParameters == nullptr) || (typeParameters != nullptr && right.typeParameters != nullptr && *typeParameters == *right.typeParameters)); } // See if two type's SPIR-V type contents match bool sameSpirvType(const TType& right) const { return ((spirvType == nullptr && right.spirvType == nullptr) || (spirvType != nullptr && right.spirvType != nullptr && *spirvType == *right.spirvType)); } // See if two type's elements match in all ways except basic type // If mismatch in structure members, return member indices in lpidx and rpidx. bool sameElementShape(const TType& right, int* lpidx = nullptr, int* rpidx = nullptr) const { if (lpidx != nullptr) { *lpidx = -1; *rpidx = -1; } return ((basicType != EbtSampler && right.basicType != EbtSampler) || sampler == right.sampler) && vectorSize == right.vectorSize && matrixCols == right.matrixCols && matrixRows == right.matrixRows && vector1 == right.vector1 && isCoopMatNV() == right.isCoopMatNV() && isCoopMatKHR() == right.isCoopMatKHR() && isCoopVecNV() == right.isCoopVecNV() && sameStructType(right, lpidx, rpidx) && sameReferenceType(right); } // See if a cooperative matrix type parameter with unspecified parameters is // an OK function parameter bool coopMatParameterOK(const TType& right) const { if (isCoopMatNV()) { return right.isCoopMatNV() && (getBasicType() == right.getBasicType()) && typeParameters == nullptr && right.typeParameters != nullptr; } if (isCoopMatKHR() && right.isCoopMatKHR()) { return ((getBasicType() == right.getBasicType()) || (getBasicType() == EbtCoopmat) || (right.getBasicType() == EbtCoopmat)) && ((typeParameters == nullptr && right.typeParameters != nullptr) || (typeParameters != nullptr && right.typeParameters == nullptr)); } return false; } // See if a cooperative vector type parameter with unspecified parameters is // an OK function parameter bool coopVecParameterOK(const TType& right) const { if (isCoopVecNV() && right.isCoopVecNV()) { return ((getBasicType() == right.getBasicType()) || (getBasicType() == EbtCoopvecNV) || (right.getBasicType() == EbtCoopvecNV)) && typeParameters == nullptr && right.typeParameters != nullptr; } return false; } bool sameCoopMatBaseType(const TType &right) const { bool rv = false; if (isCoopMatNV()) { rv = isCoopMatNV() && right.isCoopMatNV(); if (getBasicType() == EbtFloat || getBasicType() == EbtFloat16) rv = right.getBasicType() == EbtFloat || right.getBasicType() == EbtFloat16; else if (getBasicType() == EbtUint || getBasicType() == EbtUint8 || getBasicType() == EbtUint16) rv = right.getBasicType() == EbtUint || right.getBasicType() == EbtUint8 || right.getBasicType() == EbtUint16; else if (getBasicType() == EbtInt || getBasicType() == EbtInt8 || getBasicType() == EbtInt16) rv = right.getBasicType() == EbtInt || right.getBasicType() == EbtInt8 || right.getBasicType() == EbtInt16; else rv = false; } else if (isCoopMatKHR() && right.isCoopMatKHR()) { if (isFloatingDomain()) rv = right.isFloatingDomain() || right.getBasicType() == EbtCoopmat; else if (getBasicType() == EbtUint || getBasicType() == EbtUint8 || getBasicType() == EbtUint16) rv = right.getBasicType() == EbtUint || right.getBasicType() == EbtUint8 || right.getBasicType() == EbtUint16 || right.getBasicType() == EbtCoopmat; else if (getBasicType() == EbtInt || getBasicType() == EbtInt8 || getBasicType() == EbtInt16) rv = right.getBasicType() == EbtInt || right.getBasicType() == EbtInt8 || right.getBasicType() == EbtInt16 || right.getBasicType() == EbtCoopmat; else rv = false; } return rv; } bool tensorParameterOK(const TType& right) const { if (isTensorLayoutNV()) { return right.isTensorLayoutNV() && right.typeParameters == nullptr && typeParameters != nullptr; } if (isTensorViewNV()) { return right.isTensorViewNV() && right.typeParameters == nullptr && typeParameters != nullptr; } return false; } bool sameCoopVecBaseType(const TType &right) const { bool rv = false; if (isCoopVecNV() && right.isCoopVecNV()) { if (getBasicType() == EbtFloat || getBasicType() == EbtFloat16) rv = right.getBasicType() == EbtFloat || right.getBasicType() == EbtFloat16 || right.getBasicType() == EbtCoopvecNV; else if (getBasicType() == EbtUint || getBasicType() == EbtUint8 || getBasicType() == EbtUint16) rv = right.getBasicType() == EbtUint || right.getBasicType() == EbtUint8 || right.getBasicType() == EbtUint16 || right.getBasicType() == EbtCoopvecNV; else if (getBasicType() == EbtInt || getBasicType() == EbtInt8 || getBasicType() == EbtInt16) rv = right.getBasicType() == EbtInt || right.getBasicType() == EbtInt8 || right.getBasicType() == EbtInt16 || right.getBasicType() == EbtCoopvecNV; else rv = false; } return rv; } bool sameCoopMatUse(const TType &right) const { return coopmatKHRuse == right.coopmatKHRuse; } bool sameCoopMatShape(const TType &right) const { if (!isCoopMat() || !right.isCoopMat() || isCoopMatKHR() != right.isCoopMatKHR()) return false; // Skip bit width type parameter (first array size) for coopmatNV int firstArrayDimToCompare = isCoopMatNV() ? 1 : 0; int lastArrayDimToCompare = typeParameters->arraySizes->getNumDims() - (isCoopMatKHR() ? 1 : 0); for (int i = firstArrayDimToCompare; i < lastArrayDimToCompare; ++i) { if (typeParameters->arraySizes->getDimSize(i) != right.typeParameters->arraySizes->getDimSize(i)) return false; } return true; } bool sameCoopMatShapeAndUse(const TType &right) const { if (!sameCoopMatShape(right)) return false; if (coopmatKHRuse != right.coopmatKHRuse) return false; return true; } // See if two types match in all ways (just the actual type, not qualification) bool operator==(const TType& right) const { return sameElementType(right) && sameArrayness(right) && sameTypeParameters(right) && sameCoopMatUse(right) && sameSpirvType(right); } bool operator!=(const TType& right) const { return ! operator==(right); } unsigned int getBufferReferenceAlignment() const { if (getBasicType() == glslang::EbtReference) { return getReferentType()->getQualifier().hasBufferReferenceAlign() ? (1u << getReferentType()->getQualifier().layoutBufferReferenceAlign) : 16u; } return 0; } const TSpirvType& getSpirvType() const { assert(spirvType); return *spirvType; } protected: // Require consumer to pick between deep copy and shallow copy. TType(const TType& type); TType& operator=(const TType& type); // Recursively copy a type graph, while preserving the graph-like // quality. That is, don't make more than one copy of a structure that // gets reused multiple times in the type graph. void deepCopy(const TType& copyOf, TMap& copiedMap) { shallowCopy(copyOf); // GL_EXT_spirv_intrinsics if (copyOf.qualifier.spirvDecorate) { qualifier.spirvDecorate = new TSpirvDecorate; *qualifier.spirvDecorate = *copyOf.qualifier.spirvDecorate; } if (copyOf.spirvType) { spirvType = new TSpirvType; *spirvType = *copyOf.spirvType; } if (copyOf.arraySizes) { arraySizes = new TArraySizes; *arraySizes = *copyOf.arraySizes; } if (copyOf.typeParameters) { typeParameters = new TTypeParameters; typeParameters->arraySizes = new TArraySizes; *typeParameters->arraySizes = *copyOf.typeParameters->arraySizes; if (copyOf.typeParameters->spirvType) { *typeParameters->spirvType = *copyOf.typeParameters->spirvType; } typeParameters->basicType = copyOf.basicType; } if (copyOf.isStruct() && copyOf.structure) { auto prevCopy = copiedMap.find(copyOf.structure); if (prevCopy != copiedMap.end()) structure = prevCopy->second; else { structure = new TTypeList; copiedMap[copyOf.structure] = structure; for (unsigned int i = 0; i < copyOf.structure->size(); ++i) { TTypeLoc typeLoc; typeLoc.loc = (*copyOf.structure)[i].loc; typeLoc.type = new TType(); typeLoc.type->deepCopy(*(*copyOf.structure)[i].type, copiedMap); structure->push_back(typeLoc); } } } if (copyOf.fieldName) fieldName = NewPoolTString(copyOf.fieldName->c_str()); if (copyOf.typeName) typeName = NewPoolTString(copyOf.typeName->c_str()); } void buildMangledName(TString&) const; TBasicType basicType : 8; uint32_t vectorSize : 4; // 1 means either scalar or 1-component vector; see vector1 to disambiguate. uint32_t matrixCols : 4; uint32_t matrixRows : 4; bool vector1 : 1; // Backward-compatible tracking of a 1-component vector distinguished from a scalar. // GLSL 4.5 never has a 1-component vector; so this will always be false until such // functionality is added. // HLSL does have a 1-component vectors, so this will be true to disambiguate // from a scalar. bool coopmatNV : 1; bool coopmatKHR : 1; uint32_t coopmatKHRuse : 3; // Accepts one of three values: 0, 1, 2 (gl_MatrixUseA, gl_MatrixUseB, gl_MatrixUseAccumulator) bool coopmatKHRUseValid : 1; // True if coopmatKHRuse has been set bool coopvecNV : 1; bool tileAttachmentQCOM : 1; TQualifier qualifier; TArraySizes* arraySizes; // nullptr unless an array; can be shared across types // A type can't be both a structure (EbtStruct/EbtBlock) and a reference (EbtReference), so // conserve space by making these a union union { TTypeList* structure; // invalid unless this is a struct; can be shared across types TType *referentType; // invalid unless this is an EbtReference }; TString *fieldName; // for structure field names TString *typeName; // for structure type name TSampler sampler; TTypeParameters *typeParameters;// nullptr unless a parameterized type; can be shared across types TSpirvType* spirvType; // SPIR-V type defined by spirv_type directive }; } // end namespace glslang #endif // _TYPES_INCLUDED_ ================================================ FILE: src/libraries/glslang/glslang/Include/arrays.h ================================================ // // Copyright (C) 2002-2005 3Dlabs Inc. Ltd. // Copyright (C) 2012-2013 LunarG, Inc. // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following // disclaimer in the documentation and/or other materials provided // with the distribution. // // Neither the name of 3Dlabs Inc. Ltd. nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // // // Implement types for tracking GLSL arrays, arrays of arrays, etc. // #ifndef _ARRAYS_INCLUDED #define _ARRAYS_INCLUDED #include namespace glslang { // This is used to mean there is no size yet (unsized), it is waiting to get a size from somewhere else. const int UnsizedArraySize = 0; class TIntermTyped; extern bool SameSpecializationConstants(TIntermTyped*, TIntermTyped*); // Specialization constants need both a nominal size and a node that defines // the specialization constant being used. Array types are the same when their // size and specialization constant nodes are the same. struct TArraySize { unsigned int size; TIntermTyped* node; // nullptr means no specialization constant node bool operator==(const TArraySize& rhs) const { if (size != rhs.size) return false; if (node == nullptr || rhs.node == nullptr) return node == rhs.node; return SameSpecializationConstants(node, rhs.node); } }; // // TSmallArrayVector is used as the container for the set of sizes in TArraySizes. // It has generic-container semantics, while TArraySizes has array-of-array semantics. // That is, TSmallArrayVector should be more focused on mechanism and TArraySizes on policy. // struct TSmallArrayVector { // // TODO: memory: TSmallArrayVector is intended to be smaller. // Almost all arrays could be handled by two sizes each fitting // in 16 bits, needing a real vector only in the cases where there // are more than 3 sizes or a size needing more than 16 bits. // POOL_ALLOCATOR_NEW_DELETE(GetThreadPoolAllocator()) TSmallArrayVector() : sizes(nullptr) { } virtual ~TSmallArrayVector() { dealloc(); } // For breaking into two non-shared copies, independently modifiable. TSmallArrayVector& operator=(const TSmallArrayVector& from) { if (from.sizes == nullptr) sizes = nullptr; else { alloc(); *sizes = *from.sizes; } return *this; } int size() const { if (sizes == nullptr) return 0; return (int)sizes->size(); } unsigned int frontSize() const { assert(sizes != nullptr && sizes->size() > 0); return sizes->front().size; } TIntermTyped* frontNode() const { assert(sizes != nullptr && sizes->size() > 0); return sizes->front().node; } void changeFront(unsigned int s) { assert(sizes != nullptr); // this should only happen for implicitly sized arrays, not specialization constants assert(sizes->front().node == nullptr); sizes->front().size = s; } void push_back(unsigned int e, TIntermTyped* n) { alloc(); TArraySize pair = { e, n }; sizes->push_back(pair); } void push_back(const TSmallArrayVector& newDims) { alloc(); sizes->insert(sizes->end(), newDims.sizes->begin(), newDims.sizes->end()); } void pop_front() { assert(sizes != nullptr && sizes->size() > 0); if (sizes->size() == 1) dealloc(); else sizes->erase(sizes->begin()); } void pop_back() { assert(sizes != nullptr && sizes->size() > 0); if (sizes->size() == 1) dealloc(); else sizes->resize(sizes->size() - 1); } // 'this' should currently not be holding anything, and copyNonFront // will make it hold a copy of all but the first element of rhs. // (This would be useful for making a type that is dereferenced by // one dimension.) void copyNonFront(const TSmallArrayVector& rhs) { assert(sizes == nullptr); if (rhs.size() > 1) { alloc(); sizes->insert(sizes->begin(), rhs.sizes->begin() + 1, rhs.sizes->end()); } } unsigned int getDimSize(int i) const { assert(sizes != nullptr && (int)sizes->size() > i); return (*sizes)[i].size; } void setDimSize(int i, unsigned int size) const { assert(sizes != nullptr && (int)sizes->size() > i); assert((*sizes)[i].node == nullptr); (*sizes)[i].size = size; } TIntermTyped* getDimNode(int i) const { assert(sizes != nullptr && (int)sizes->size() > i); return (*sizes)[i].node; } bool operator==(const TSmallArrayVector& rhs) const { if (sizes == nullptr && rhs.sizes == nullptr) return true; if (sizes == nullptr || rhs.sizes == nullptr) return false; return *sizes == *rhs.sizes; } bool operator!=(const TSmallArrayVector& rhs) const { return ! operator==(rhs); } protected: TSmallArrayVector(const TSmallArrayVector&); void alloc() { if (sizes == nullptr) sizes = new TVector; } void dealloc() { delete sizes; sizes = nullptr; } TVector* sizes; // will either hold such a pointer, or in the future, hold the two array sizes }; // // Represent an array, or array of arrays, to arbitrary depth. This is not // done through a hierarchy of types in a type tree, rather all contiguous arrayness // in the type hierarchy is localized into this single cumulative object. // // The arrayness in TTtype is a pointer, so that it can be non-allocated and zero // for the vast majority of types that are non-array types. // // Order Policy: these are all identical: // - left to right order within a contiguous set of ...[..][..][..]... in the source language // - index order 0, 1, 2, ... within the 'sizes' member below // - outer-most to inner-most // struct TArraySizes { POOL_ALLOCATOR_NEW_DELETE(GetThreadPoolAllocator()) TArraySizes() : implicitArraySize(0), implicitlySized(true), variablyIndexed(false){ } // For breaking into two non-shared copies, independently modifiable. TArraySizes& operator=(const TArraySizes& from) { implicitArraySize = from.implicitArraySize; variablyIndexed = from.variablyIndexed; sizes = from.sizes; implicitlySized = from.implicitlySized; return *this; } // translate from array-of-array semantics to container semantics int getNumDims() const { return sizes.size(); } int getDimSize(int dim) const { return sizes.getDimSize(dim); } TIntermTyped* getDimNode(int dim) const { return sizes.getDimNode(dim); } void setDimSize(int dim, int size) { sizes.setDimSize(dim, size); } int getOuterSize() const { return sizes.frontSize(); } TIntermTyped* getOuterNode() const { return sizes.frontNode(); } int getCumulativeSize() const { int size = 1; for (int d = 0; d < sizes.size(); ++d) { // this only makes sense in paths that have a known array size assert(sizes.getDimSize(d) != UnsizedArraySize); size *= sizes.getDimSize(d); } return size; } void addInnerSize() { addInnerSize((unsigned)UnsizedArraySize); } void addInnerSize(int s) { addInnerSize((unsigned)s, nullptr); } void addInnerSize(int s, TIntermTyped* n) { sizes.push_back((unsigned)s, n); } void addInnerSize(TArraySize pair) { sizes.push_back(pair.size, pair.node); implicitlySized = false; } void addInnerSizes(const TArraySizes& s) { sizes.push_back(s.sizes); } void changeOuterSize(int s) { sizes.changeFront((unsigned)s); implicitlySized = false; } int getImplicitSize() const { return implicitArraySize > 0 ? implicitArraySize : 1; } void updateImplicitSize(int s) { implicitArraySize = (std::max)(implicitArraySize, s); } bool isInnerUnsized() const { for (int d = 1; d < sizes.size(); ++d) { if (sizes.getDimSize(d) == (unsigned)UnsizedArraySize) return true; } return false; } bool clearInnerUnsized() { for (int d = 1; d < sizes.size(); ++d) { if (sizes.getDimSize(d) == (unsigned)UnsizedArraySize) setDimSize(d, 1); } return false; } bool isInnerSpecialization() const { for (int d = 1; d < sizes.size(); ++d) { if (sizes.getDimNode(d) != nullptr) return true; } return false; } bool isOuterSpecialization() { return sizes.getDimNode(0) != nullptr; } bool hasUnsized() const { return getOuterSize() == UnsizedArraySize || isInnerUnsized(); } bool isSized() const { return getOuterSize() != UnsizedArraySize; } bool isImplicitlySized() const { return implicitlySized; } bool isDefaultImplicitlySized() const { return implicitlySized && implicitArraySize == 0; } void setImplicitlySized(bool isImplicitSizing) { implicitlySized = isImplicitSizing; } void dereference() { sizes.pop_front(); } void removeLastSize() { sizes.pop_back(); } void copyDereferenced(const TArraySizes& rhs) { assert(sizes.size() == 0); if (rhs.sizes.size() > 1) sizes.copyNonFront(rhs.sizes); } bool sameInnerArrayness(const TArraySizes& rhs) const { if (sizes.size() != rhs.sizes.size()) return false; for (int d = 1; d < sizes.size(); ++d) { if (sizes.getDimSize(d) != rhs.sizes.getDimSize(d) || sizes.getDimNode(d) != rhs.sizes.getDimNode(d)) return false; } return true; } void setVariablyIndexed() { variablyIndexed = true; } bool isVariablyIndexed() const { return variablyIndexed; } bool operator==(const TArraySizes& rhs) const { return sizes == rhs.sizes; } bool operator!=(const TArraySizes& rhs) const { return sizes != rhs.sizes; } protected: TSmallArrayVector sizes; TArraySizes(const TArraySizes&); // For tracking maximum referenced compile-time constant index. // Applies only to the outer-most dimension. Potentially becomes // the implicit size of the array, if not variably indexed and // otherwise legal. int implicitArraySize; bool implicitlySized; bool variablyIndexed; // true if array is indexed with a non compile-time constant }; } // end namespace glslang #endif // _ARRAYS_INCLUDED_ ================================================ FILE: src/libraries/glslang/glslang/Include/intermediate.h ================================================ // // Copyright (C) 2002-2005 3Dlabs Inc. Ltd. // Copyright (C) 2012-2016 LunarG, Inc. // Copyright (C) 2017, 2022-2024 Arm Limited. // Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights reserved. // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following // disclaimer in the documentation and/or other materials provided // with the distribution. // // Neither the name of 3Dlabs Inc. Ltd. nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // // // Definition of the in-memory high-level intermediate representation // of shaders. This is a tree that parser creates. // // Nodes in the tree are defined as a hierarchy of classes derived from // TIntermNode. Each is a node in a tree. There is no preset branching factor; // each node can have it's own type of list of children. // #ifndef __INTERMEDIATE_H #define __INTERMEDIATE_H #include "Common.h" #include "Types.h" #include "ConstantUnion.h" namespace glslang { class TIntermediate; // // Operators used by the high-level (parse tree) representation. // enum TOperator { EOpNull, // if in a node, should only mean a node is still being built EOpSequence, // denotes a list of statements, or parameters, etc. EOpScope, // Used by debugging to denote a scoped list of statements EOpLinkerObjects, // for aggregate node of objects the linker may need, if not reference by the rest of the AST EOpFunctionCall, EOpFunction, // For function definition EOpParameters, // an aggregate listing the parameters to a function EOpSpirvInst, // // Unary operators // EOpNegative, EOpLogicalNot, EOpVectorLogicalNot, EOpBitwiseNot, EOpPostIncrement, EOpPostDecrement, EOpPreIncrement, EOpPreDecrement, EOpCopyObject, EOpDeclare, // Used by debugging to force declaration of variable in correct scope // Operator used to represent all conversions between int, float, and bool. // The specific types are inferred from TBasicType. EOpConvNumeric, // uint64_t <-> pointer EOpConvUint64ToPtr, EOpConvPtrToUint64, // uvec2 <-> pointer EOpConvUvec2ToPtr, EOpConvPtrToUvec2, // uint64_t -> accelerationStructureEXT EOpConvUint64ToAccStruct, // uvec2 -> accelerationStructureEXT EOpConvUvec2ToAccStruct, // // binary operations // EOpAdd, EOpSub, EOpMul, EOpDiv, EOpMod, EOpRightShift, EOpLeftShift, EOpAnd, EOpInclusiveOr, EOpExclusiveOr, EOpEqual, EOpNotEqual, EOpVectorEqual, EOpVectorNotEqual, EOpLessThan, EOpGreaterThan, EOpLessThanEqual, EOpGreaterThanEqual, EOpComma, EOpVectorTimesScalar, EOpVectorTimesMatrix, EOpMatrixTimesVector, EOpMatrixTimesScalar, EOpLogicalOr, EOpLogicalXor, EOpLogicalAnd, EOpIndexDirect, EOpIndexIndirect, EOpIndexDirectStruct, EOpVectorSwizzle, EOpMethod, EOpScoping, // // Built-in functions mapped to operators // EOpRadians, EOpDegrees, EOpSin, EOpCos, EOpTan, EOpAsin, EOpAcos, EOpAtan, EOpSinh, EOpCosh, EOpTanh, EOpAsinh, EOpAcosh, EOpAtanh, EOpPow, EOpExp, EOpLog, EOpExp2, EOpLog2, EOpSqrt, EOpInverseSqrt, EOpAbs, EOpSign, EOpFloor, EOpTrunc, EOpRound, EOpRoundEven, EOpCeil, EOpFract, EOpModf, EOpMin, EOpMax, EOpClamp, EOpMix, EOpStep, EOpSmoothStep, EOpIsNan, EOpIsInf, EOpFma, EOpFrexp, EOpLdexp, EOpFloatBitsToInt, EOpFloatBitsToUint, EOpIntBitsToFloat, EOpUintBitsToFloat, EOpDoubleBitsToInt64, EOpDoubleBitsToUint64, EOpInt64BitsToDouble, EOpUint64BitsToDouble, EOpFloat16BitsToInt16, EOpFloat16BitsToUint16, EOpInt16BitsToFloat16, EOpUint16BitsToFloat16, EOpPackSnorm2x16, EOpUnpackSnorm2x16, EOpPackUnorm2x16, EOpUnpackUnorm2x16, EOpPackSnorm4x8, EOpUnpackSnorm4x8, EOpPackUnorm4x8, EOpUnpackUnorm4x8, EOpPackHalf2x16, EOpUnpackHalf2x16, EOpPackDouble2x32, EOpUnpackDouble2x32, EOpPackInt2x32, EOpUnpackInt2x32, EOpPackUint2x32, EOpUnpackUint2x32, EOpPackFloat2x16, EOpUnpackFloat2x16, EOpPackInt2x16, EOpUnpackInt2x16, EOpPackUint2x16, EOpUnpackUint2x16, EOpPackInt4x16, EOpUnpackInt4x16, EOpPackUint4x16, EOpUnpackUint4x16, EOpPack16, EOpPack32, EOpPack64, EOpUnpack32, EOpUnpack16, EOpUnpack8, EOpLength, EOpDistance, EOpDot, EOpCross, EOpNormalize, EOpFaceForward, EOpReflect, EOpRefract, EOpMin3, EOpMax3, EOpMid3, EOpDPdx, // Fragment only EOpDPdy, // Fragment only EOpFwidth, // Fragment only EOpDPdxFine, // Fragment only EOpDPdyFine, // Fragment only EOpFwidthFine, // Fragment only EOpDPdxCoarse, // Fragment only EOpDPdyCoarse, // Fragment only EOpFwidthCoarse, // Fragment only EOpInterpolateAtCentroid, // Fragment only EOpInterpolateAtSample, // Fragment only EOpInterpolateAtOffset, // Fragment only EOpInterpolateAtVertex, EOpMatrixTimesMatrix, EOpOuterProduct, EOpDeterminant, EOpMatrixInverse, EOpTranspose, EOpFtransform, EOpNoise, EOpEmitVertex, // geometry only EOpEndPrimitive, // geometry only EOpEmitStreamVertex, // geometry only EOpEndStreamPrimitive, // geometry only EOpBarrier, EOpMemoryBarrier, EOpMemoryBarrierAtomicCounter, EOpMemoryBarrierBuffer, EOpMemoryBarrierImage, EOpMemoryBarrierShared, // compute only EOpGroupMemoryBarrier, // compute only EOpBallot, EOpReadInvocation, EOpReadFirstInvocation, EOpAnyInvocation, EOpAllInvocations, EOpAllInvocationsEqual, EOpSubgroupGuardStart, EOpSubgroupBarrier, EOpSubgroupMemoryBarrier, EOpSubgroupMemoryBarrierBuffer, EOpSubgroupMemoryBarrierImage, EOpSubgroupMemoryBarrierShared, // compute only EOpSubgroupElect, EOpSubgroupAll, EOpSubgroupAny, EOpSubgroupAllEqual, EOpSubgroupBroadcast, EOpSubgroupBroadcastFirst, EOpSubgroupBallot, EOpSubgroupInverseBallot, EOpSubgroupBallotBitExtract, EOpSubgroupBallotBitCount, EOpSubgroupBallotInclusiveBitCount, EOpSubgroupBallotExclusiveBitCount, EOpSubgroupBallotFindLSB, EOpSubgroupBallotFindMSB, EOpSubgroupShuffle, EOpSubgroupShuffleXor, EOpSubgroupShuffleUp, EOpSubgroupShuffleDown, EOpSubgroupRotate, EOpSubgroupClusteredRotate, EOpSubgroupAdd, EOpSubgroupMul, EOpSubgroupMin, EOpSubgroupMax, EOpSubgroupAnd, EOpSubgroupOr, EOpSubgroupXor, EOpSubgroupInclusiveAdd, EOpSubgroupInclusiveMul, EOpSubgroupInclusiveMin, EOpSubgroupInclusiveMax, EOpSubgroupInclusiveAnd, EOpSubgroupInclusiveOr, EOpSubgroupInclusiveXor, EOpSubgroupExclusiveAdd, EOpSubgroupExclusiveMul, EOpSubgroupExclusiveMin, EOpSubgroupExclusiveMax, EOpSubgroupExclusiveAnd, EOpSubgroupExclusiveOr, EOpSubgroupExclusiveXor, EOpSubgroupClusteredAdd, EOpSubgroupClusteredMul, EOpSubgroupClusteredMin, EOpSubgroupClusteredMax, EOpSubgroupClusteredAnd, EOpSubgroupClusteredOr, EOpSubgroupClusteredXor, EOpSubgroupQuadBroadcast, EOpSubgroupQuadSwapHorizontal, EOpSubgroupQuadSwapVertical, EOpSubgroupQuadSwapDiagonal, EOpSubgroupQuadAll, EOpSubgroupQuadAny, EOpSubgroupPartition, EOpSubgroupPartitionedAdd, EOpSubgroupPartitionedMul, EOpSubgroupPartitionedMin, EOpSubgroupPartitionedMax, EOpSubgroupPartitionedAnd, EOpSubgroupPartitionedOr, EOpSubgroupPartitionedXor, EOpSubgroupPartitionedInclusiveAdd, EOpSubgroupPartitionedInclusiveMul, EOpSubgroupPartitionedInclusiveMin, EOpSubgroupPartitionedInclusiveMax, EOpSubgroupPartitionedInclusiveAnd, EOpSubgroupPartitionedInclusiveOr, EOpSubgroupPartitionedInclusiveXor, EOpSubgroupPartitionedExclusiveAdd, EOpSubgroupPartitionedExclusiveMul, EOpSubgroupPartitionedExclusiveMin, EOpSubgroupPartitionedExclusiveMax, EOpSubgroupPartitionedExclusiveAnd, EOpSubgroupPartitionedExclusiveOr, EOpSubgroupPartitionedExclusiveXor, EOpSubgroupGuardStop, // Integer dot product EOpDotPackedEXT, EOpDotAccSatEXT, EOpDotPackedAccSatEXT, EOpMinInvocations, EOpMaxInvocations, EOpAddInvocations, EOpMinInvocationsNonUniform, EOpMaxInvocationsNonUniform, EOpAddInvocationsNonUniform, EOpMinInvocationsInclusiveScan, EOpMaxInvocationsInclusiveScan, EOpAddInvocationsInclusiveScan, EOpMinInvocationsInclusiveScanNonUniform, EOpMaxInvocationsInclusiveScanNonUniform, EOpAddInvocationsInclusiveScanNonUniform, EOpMinInvocationsExclusiveScan, EOpMaxInvocationsExclusiveScan, EOpAddInvocationsExclusiveScan, EOpMinInvocationsExclusiveScanNonUniform, EOpMaxInvocationsExclusiveScanNonUniform, EOpAddInvocationsExclusiveScanNonUniform, EOpSwizzleInvocations, EOpSwizzleInvocationsMasked, EOpWriteInvocation, EOpMbcnt, EOpCubeFaceIndex, EOpCubeFaceCoord, EOpTime, EOpAtomicAdd, EOpAtomicSubtract, EOpAtomicMin, EOpAtomicMax, EOpAtomicAnd, EOpAtomicOr, EOpAtomicXor, EOpAtomicExchange, EOpAtomicCompSwap, EOpAtomicLoad, EOpAtomicStore, EOpAtomicCounterIncrement, // results in pre-increment value EOpAtomicCounterDecrement, // results in post-decrement value EOpAtomicCounter, EOpAtomicCounterAdd, EOpAtomicCounterSubtract, EOpAtomicCounterMin, EOpAtomicCounterMax, EOpAtomicCounterAnd, EOpAtomicCounterOr, EOpAtomicCounterXor, EOpAtomicCounterExchange, EOpAtomicCounterCompSwap, EOpAny, EOpAll, EOpCooperativeMatrixLoad, EOpCooperativeMatrixStore, EOpCooperativeMatrixMulAdd, EOpCooperativeMatrixLoadNV, EOpCooperativeMatrixStoreNV, EOpCooperativeMatrixLoadTensorNV, EOpCooperativeMatrixStoreTensorNV, EOpCooperativeMatrixMulAddNV, EOpCooperativeMatrixReduceNV, EOpCooperativeMatrixPerElementOpNV, EOpCooperativeMatrixTransposeNV, EOpCreateTensorLayoutNV, EOpTensorLayoutSetBlockSizeNV, EOpTensorLayoutSetDimensionNV, EOpTensorLayoutSetStrideNV, EOpTensorLayoutSliceNV, EOpTensorLayoutSetClampValueNV, EOpCreateTensorViewNV, EOpTensorViewSetDimensionNV, EOpTensorViewSetStrideNV, EOpTensorViewSetClipNV, EOpCooperativeVectorMatMulNV, EOpCooperativeVectorMatMulAddNV, EOpCooperativeVectorLoadNV, EOpCooperativeVectorStoreNV, EOpCooperativeVectorOuterProductAccumulateNV, EOpCooperativeVectorReduceSumAccumulateNV, EOpBeginInvocationInterlock, // Fragment only EOpEndInvocationInterlock, // Fragment only EOpIsHelperInvocation, EOpDebugPrintf, // // Branch // EOpKill, // Fragment only EOpTerminateInvocation, // Fragment only EOpDemote, // Fragment only EOpTerminateRayKHR, // Any-hit only EOpIgnoreIntersectionKHR, // Any-hit only EOpReturn, EOpBreak, EOpContinue, EOpCase, EOpDefault, // // Constructors // EOpConstructGuardStart, EOpConstructInt, // these first scalar forms also identify what implicit conversion is needed EOpConstructUint, EOpConstructInt8, EOpConstructUint8, EOpConstructInt16, EOpConstructUint16, EOpConstructInt64, EOpConstructUint64, EOpConstructBool, EOpConstructFloat, EOpConstructDouble, // Keep vector and matrix constructors in a consistent relative order for // TParseContext::constructBuiltIn, which converts between 8/16/32 bit // vector constructors EOpConstructVec2, EOpConstructVec3, EOpConstructVec4, EOpConstructMat2x2, EOpConstructMat2x3, EOpConstructMat2x4, EOpConstructMat3x2, EOpConstructMat3x3, EOpConstructMat3x4, EOpConstructMat4x2, EOpConstructMat4x3, EOpConstructMat4x4, EOpConstructDVec2, EOpConstructDVec3, EOpConstructDVec4, EOpConstructBVec2, EOpConstructBVec3, EOpConstructBVec4, EOpConstructI8Vec2, EOpConstructI8Vec3, EOpConstructI8Vec4, EOpConstructU8Vec2, EOpConstructU8Vec3, EOpConstructU8Vec4, EOpConstructI16Vec2, EOpConstructI16Vec3, EOpConstructI16Vec4, EOpConstructU16Vec2, EOpConstructU16Vec3, EOpConstructU16Vec4, EOpConstructIVec2, EOpConstructIVec3, EOpConstructIVec4, EOpConstructUVec2, EOpConstructUVec3, EOpConstructUVec4, EOpConstructI64Vec2, EOpConstructI64Vec3, EOpConstructI64Vec4, EOpConstructU64Vec2, EOpConstructU64Vec3, EOpConstructU64Vec4, EOpConstructDMat2x2, EOpConstructDMat2x3, EOpConstructDMat2x4, EOpConstructDMat3x2, EOpConstructDMat3x3, EOpConstructDMat3x4, EOpConstructDMat4x2, EOpConstructDMat4x3, EOpConstructDMat4x4, EOpConstructIMat2x2, EOpConstructIMat2x3, EOpConstructIMat2x4, EOpConstructIMat3x2, EOpConstructIMat3x3, EOpConstructIMat3x4, EOpConstructIMat4x2, EOpConstructIMat4x3, EOpConstructIMat4x4, EOpConstructUMat2x2, EOpConstructUMat2x3, EOpConstructUMat2x4, EOpConstructUMat3x2, EOpConstructUMat3x3, EOpConstructUMat3x4, EOpConstructUMat4x2, EOpConstructUMat4x3, EOpConstructUMat4x4, EOpConstructBMat2x2, EOpConstructBMat2x3, EOpConstructBMat2x4, EOpConstructBMat3x2, EOpConstructBMat3x3, EOpConstructBMat3x4, EOpConstructBMat4x2, EOpConstructBMat4x3, EOpConstructBMat4x4, EOpConstructFloat16, EOpConstructF16Vec2, EOpConstructF16Vec3, EOpConstructF16Vec4, EOpConstructF16Mat2x2, EOpConstructF16Mat2x3, EOpConstructF16Mat2x4, EOpConstructF16Mat3x2, EOpConstructF16Mat3x3, EOpConstructF16Mat3x4, EOpConstructF16Mat4x2, EOpConstructF16Mat4x3, EOpConstructF16Mat4x4, EOpConstructBFloat16, EOpConstructBF16Vec2, EOpConstructBF16Vec3, EOpConstructBF16Vec4, EOpConstructFloatE5M2, EOpConstructFloatE5M2Vec2, EOpConstructFloatE5M2Vec3, EOpConstructFloatE5M2Vec4, EOpConstructFloatE4M3, EOpConstructFloatE4M3Vec2, EOpConstructFloatE4M3Vec3, EOpConstructFloatE4M3Vec4, EOpConstructStruct, EOpConstructTextureSampler, EOpConstructNonuniform, // expected to be transformed away, not present in final AST EOpConstructReference, EOpConstructCooperativeMatrixNV, EOpConstructCooperativeMatrixKHR, EOpConstructCooperativeVectorNV, EOpConstructAccStruct, EOpConstructSaturated, EOpConstructGuardEnd, // // moves // EOpAssign, EOpAddAssign, EOpSubAssign, EOpMulAssign, EOpVectorTimesMatrixAssign, EOpVectorTimesScalarAssign, EOpMatrixTimesScalarAssign, EOpMatrixTimesMatrixAssign, EOpDivAssign, EOpModAssign, EOpAndAssign, EOpInclusiveOrAssign, EOpExclusiveOrAssign, EOpLeftShiftAssign, EOpRightShiftAssign, // // Array operators // // Can apply to arrays, vectors, or matrices. // Can be decomposed to a constant at compile time, but this does not always happen, // due to link-time effects. So, consumer can expect either a link-time sized or // run-time sized array. EOpArrayLength, // // Image operations // EOpImageGuardBegin, EOpImageQuerySize, EOpImageQuerySamples, EOpImageLoad, EOpImageStore, EOpImageLoadLod, EOpImageStoreLod, EOpImageAtomicAdd, EOpImageAtomicMin, EOpImageAtomicMax, EOpImageAtomicAnd, EOpImageAtomicOr, EOpImageAtomicXor, EOpImageAtomicExchange, EOpImageAtomicCompSwap, EOpImageAtomicLoad, EOpImageAtomicStore, EOpSubpassLoad, EOpSubpassLoadMS, EOpSparseImageLoad, EOpSparseImageLoadLod, EOpColorAttachmentReadEXT, // Fragment only EOpImageGuardEnd, // // Texture operations // EOpTextureGuardBegin, EOpTextureQuerySize, EOpTextureQueryLod, EOpTextureQueryLevels, EOpTextureQuerySamples, EOpSamplingGuardBegin, EOpTexture, EOpTextureProj, EOpTextureLod, EOpTextureOffset, EOpTextureFetch, EOpTextureFetchOffset, EOpTextureProjOffset, EOpTextureLodOffset, EOpTextureProjLod, EOpTextureProjLodOffset, EOpTextureGrad, EOpTextureGradOffset, EOpTextureProjGrad, EOpTextureProjGradOffset, EOpTextureGather, EOpTextureGatherOffset, EOpTextureGatherOffsets, EOpTextureClamp, EOpTextureOffsetClamp, EOpTextureGradClamp, EOpTextureGradOffsetClamp, EOpTextureGatherLod, EOpTextureGatherLodOffset, EOpTextureGatherLodOffsets, EOpFragmentMaskFetch, EOpFragmentFetch, EOpSparseTextureGuardBegin, EOpSparseTexture, EOpSparseTextureLod, EOpSparseTextureOffset, EOpSparseTextureFetch, EOpSparseTextureFetchOffset, EOpSparseTextureLodOffset, EOpSparseTextureGrad, EOpSparseTextureGradOffset, EOpSparseTextureGather, EOpSparseTextureGatherOffset, EOpSparseTextureGatherOffsets, EOpSparseTexelsResident, EOpSparseTextureClamp, EOpSparseTextureOffsetClamp, EOpSparseTextureGradClamp, EOpSparseTextureGradOffsetClamp, EOpSparseTextureGatherLod, EOpSparseTextureGatherLodOffset, EOpSparseTextureGatherLodOffsets, EOpSparseTextureGuardEnd, EOpImageFootprintGuardBegin, EOpImageSampleFootprintNV, EOpImageSampleFootprintClampNV, EOpImageSampleFootprintLodNV, EOpImageSampleFootprintGradNV, EOpImageSampleFootprintGradClampNV, EOpImageFootprintGuardEnd, EOpSamplingGuardEnd, EOpTextureGuardEnd, // // Integer operations // EOpAddCarry, EOpSubBorrow, EOpUMulExtended, EOpIMulExtended, EOpBitfieldExtract, EOpBitfieldInsert, EOpBitFieldReverse, EOpBitCount, EOpFindLSB, EOpFindMSB, EOpCountLeadingZeros, EOpCountTrailingZeros, EOpAbsDifference, EOpAddSaturate, EOpSubSaturate, EOpAverage, EOpAverageRounded, EOpMul32x16, EOpTraceNV, EOpTraceRayMotionNV, EOpTraceKHR, EOpReportIntersection, EOpIgnoreIntersectionNV, EOpTerminateRayNV, EOpExecuteCallableNV, EOpExecuteCallableKHR, EOpWritePackedPrimitiveIndices4x8NV, EOpEmitMeshTasksEXT, EOpSetMeshOutputsEXT, // // GL_EXT_ray_query operations // EOpRayQueryInitialize, EOpRayQueryTerminate, EOpRayQueryGenerateIntersection, EOpRayQueryConfirmIntersection, EOpRayQueryProceed, EOpRayQueryGetIntersectionType, EOpRayQueryGetRayTMin, EOpRayQueryGetRayFlags, EOpRayQueryGetIntersectionT, EOpRayQueryGetIntersectionInstanceCustomIndex, EOpRayQueryGetIntersectionInstanceId, EOpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffset, EOpRayQueryGetIntersectionGeometryIndex, EOpRayQueryGetIntersectionPrimitiveIndex, EOpRayQueryGetIntersectionBarycentrics, EOpRayQueryGetIntersectionFrontFace, EOpRayQueryGetIntersectionCandidateAABBOpaque, EOpRayQueryGetIntersectionObjectRayDirection, EOpRayQueryGetIntersectionObjectRayOrigin, EOpRayQueryGetWorldRayDirection, EOpRayQueryGetWorldRayOrigin, EOpRayQueryGetIntersectionObjectToWorld, EOpRayQueryGetIntersectionWorldToObject, // // GL_NV_shader_invocation_reorder // EOpHitObjectTraceRayNV, EOpHitObjectTraceRayMotionNV, EOpHitObjectRecordHitNV, EOpHitObjectRecordHitMotionNV, EOpHitObjectRecordHitWithIndexNV, EOpHitObjectRecordHitWithIndexMotionNV, EOpHitObjectRecordMissNV, EOpHitObjectRecordMissMotionNV, EOpHitObjectRecordEmptyNV, EOpHitObjectExecuteShaderNV, EOpHitObjectIsEmptyNV, EOpHitObjectIsMissNV, EOpHitObjectIsHitNV, EOpHitObjectGetRayTMinNV, EOpHitObjectGetRayTMaxNV, EOpHitObjectGetObjectRayOriginNV, EOpHitObjectGetObjectRayDirectionNV, EOpHitObjectGetWorldRayOriginNV, EOpHitObjectGetWorldRayDirectionNV, EOpHitObjectGetWorldToObjectNV, EOpHitObjectGetObjectToWorldNV, EOpHitObjectGetInstanceCustomIndexNV, EOpHitObjectGetInstanceIdNV, EOpHitObjectGetGeometryIndexNV, EOpHitObjectGetPrimitiveIndexNV, EOpHitObjectGetHitKindNV, EOpHitObjectGetShaderBindingTableRecordIndexNV, EOpHitObjectGetShaderRecordBufferHandleNV, EOpHitObjectGetAttributesNV, EOpHitObjectGetCurrentTimeNV, EOpReorderThreadNV, EOpFetchMicroTriangleVertexPositionNV, EOpFetchMicroTriangleVertexBarycentricNV, // HLSL operations // EOpClip, // discard if input value < 0 EOpIsFinite, EOpLog10, // base 10 log EOpRcp, // 1/x EOpSaturate, // clamp from 0 to 1 EOpSinCos, // sin and cos in out parameters EOpGenMul, // mul(x,y) on any of mat/vec/scalars EOpDst, // x = 1, y=src0.y * src1.y, z=src0.z, w=src1.w EOpInterlockedAdd, // atomic ops, but uses [optional] out arg instead of return EOpInterlockedAnd, // ... EOpInterlockedCompareExchange, // ... EOpInterlockedCompareStore, // ... EOpInterlockedExchange, // ... EOpInterlockedMax, // ... EOpInterlockedMin, // ... EOpInterlockedOr, // ... EOpInterlockedXor, // ... EOpAllMemoryBarrierWithGroupSync, // memory barriers without non-hlsl AST equivalents EOpDeviceMemoryBarrier, // ... EOpDeviceMemoryBarrierWithGroupSync, // ... EOpWorkgroupMemoryBarrier, // ... EOpWorkgroupMemoryBarrierWithGroupSync, // ... EOpEvaluateAttributeSnapped, // InterpolateAtOffset with int position on 16x16 grid EOpF32tof16, // HLSL conversion: half of a PackHalf2x16 EOpF16tof32, // HLSL conversion: half of an UnpackHalf2x16 EOpLit, // HLSL lighting coefficient vector EOpTextureBias, // HLSL texture bias: will be lowered to EOpTexture EOpAsDouble, // slightly different from EOpUint64BitsToDouble EOpD3DCOLORtoUBYTE4, // convert and swizzle 4-component color to UBYTE4 range EOpMethodSample, // Texture object methods. These are translated to existing EOpMethodSampleBias, // AST methods, and exist to represent HLSL semantics until that EOpMethodSampleCmp, // translation is performed. See HlslParseContext::decomposeSampleMethods(). EOpMethodSampleCmpLevelZero, // ... EOpMethodSampleGrad, // ... EOpMethodSampleLevel, // ... EOpMethodLoad, // ... EOpMethodGetDimensions, // ... EOpMethodGetSamplePosition, // ... EOpMethodGather, // ... EOpMethodCalculateLevelOfDetail, // ... EOpMethodCalculateLevelOfDetailUnclamped, // ... // Load already defined above for textures EOpMethodLoad2, // Structure buffer object methods. These are translated to existing EOpMethodLoad3, // AST methods, and exist to represent HLSL semantics until that EOpMethodLoad4, // translation is performed. See HlslParseContext::decomposeSampleMethods(). EOpMethodStore, // ... EOpMethodStore2, // ... EOpMethodStore3, // ... EOpMethodStore4, // ... EOpMethodIncrementCounter, // ... EOpMethodDecrementCounter, // ... // EOpMethodAppend is defined for geo shaders below EOpMethodConsume, // SM5 texture methods EOpMethodGatherRed, // These are covered under the above EOpMethodSample comment about EOpMethodGatherGreen, // translation to existing AST opcodes. They exist temporarily EOpMethodGatherBlue, // because HLSL arguments are slightly different. EOpMethodGatherAlpha, // ... EOpMethodGatherCmp, // ... EOpMethodGatherCmpRed, // ... EOpMethodGatherCmpGreen, // ... EOpMethodGatherCmpBlue, // ... EOpMethodGatherCmpAlpha, // ... // geometry methods EOpMethodAppend, // Geometry shader methods EOpMethodRestartStrip, // ... // matrix EOpMatrixSwizzle, // select multiple matrix components (non-column) // SM6 wave ops EOpWaveGetLaneCount, // Will decompose to gl_SubgroupSize. EOpWaveGetLaneIndex, // Will decompose to gl_SubgroupInvocationID. EOpWaveActiveCountBits, // Will decompose to subgroupBallotBitCount(subgroupBallot()). EOpWavePrefixCountBits, // Will decompose to subgroupBallotInclusiveBitCount(subgroupBallot()). // GL_EXT_expect_assume EOpAssumeEXT, EOpExpectEXT, // Shader Clock Ops EOpReadClockSubgroupKHR, EOpReadClockDeviceKHR, // GL_EXT_ray_tracing_position_fetch EOpRayQueryGetIntersectionTriangleVertexPositionsEXT, // Shader tile image ops EOpStencilAttachmentReadEXT, // Fragment only EOpDepthAttachmentReadEXT, // Fragment only // Image processing EOpImageSampleWeightedQCOM, EOpImageBoxFilterQCOM, EOpImageBlockMatchSADQCOM, EOpImageBlockMatchSSDQCOM, // Image processing2 EOpImageBlockMatchWindowSSDQCOM, EOpImageBlockMatchWindowSADQCOM, EOpImageBlockMatchGatherSSDQCOM, EOpImageBlockMatchGatherSADQCOM, // GL_NV_cluster_acceleration_structure EOpRayQueryGetIntersectionClusterIdNV, EOpHitObjectGetClusterIdNV, // GL_NV_linear_swept_spheres EOpRayQueryGetIntersectionSpherePositionNV, EOpRayQueryGetIntersectionSphereRadiusNV, EOpRayQueryGetIntersectionLSSHitValueNV, EOpRayQueryGetIntersectionLSSPositionsNV, EOpRayQueryGetIntersectionLSSRadiiNV, EOpRayQueryIsSphereHitNV, EOpRayQueryIsLSSHitNV, EOpHitObjectGetSpherePositionNV, EOpHitObjectGetSphereRadiusNV, EOpHitObjectGetLSSPositionsNV, EOpHitObjectGetLSSRadiiNV, EOpHitObjectIsSphereHitNV, EOpHitObjectIsLSSHitNV, }; inline bool IsOpNumericConv(const TOperator op) { return op == EOpConvNumeric; } enum TLinkType { ELinkNone, ELinkExport, }; class TIntermTraverser; class TIntermOperator; class TIntermAggregate; class TIntermUnary; class TIntermBinary; class TIntermConstantUnion; class TIntermSelection; class TIntermSwitch; class TIntermBranch; class TIntermTyped; class TIntermMethod; class TIntermSymbol; class TIntermLoop; } // end namespace glslang // // Base class for the tree nodes // // (Put outside the glslang namespace, as it's used as part of the external interface.) // class TIntermNode { public: POOL_ALLOCATOR_NEW_DELETE(glslang::GetThreadPoolAllocator()) TIntermNode() { loc.init(); } virtual const glslang::TSourceLoc& getLoc() const { return loc; } virtual void setLoc(const glslang::TSourceLoc& l) { loc = l; } virtual void traverse(glslang::TIntermTraverser*) = 0; virtual glslang::TIntermTyped* getAsTyped() { return nullptr; } virtual glslang::TIntermOperator* getAsOperator() { return nullptr; } virtual glslang::TIntermConstantUnion* getAsConstantUnion() { return nullptr; } virtual glslang::TIntermAggregate* getAsAggregate() { return nullptr; } virtual glslang::TIntermUnary* getAsUnaryNode() { return nullptr; } virtual glslang::TIntermBinary* getAsBinaryNode() { return nullptr; } virtual glslang::TIntermSelection* getAsSelectionNode() { return nullptr; } virtual glslang::TIntermSwitch* getAsSwitchNode() { return nullptr; } virtual glslang::TIntermMethod* getAsMethodNode() { return nullptr; } virtual glslang::TIntermSymbol* getAsSymbolNode() { return nullptr; } virtual glslang::TIntermBranch* getAsBranchNode() { return nullptr; } virtual glslang::TIntermLoop* getAsLoopNode() { return nullptr; } virtual const glslang::TIntermTyped* getAsTyped() const { return nullptr; } virtual const glslang::TIntermOperator* getAsOperator() const { return nullptr; } virtual const glslang::TIntermConstantUnion* getAsConstantUnion() const { return nullptr; } virtual const glslang::TIntermAggregate* getAsAggregate() const { return nullptr; } virtual const glslang::TIntermUnary* getAsUnaryNode() const { return nullptr; } virtual const glslang::TIntermBinary* getAsBinaryNode() const { return nullptr; } virtual const glslang::TIntermSelection* getAsSelectionNode() const { return nullptr; } virtual const glslang::TIntermSwitch* getAsSwitchNode() const { return nullptr; } virtual const glslang::TIntermMethod* getAsMethodNode() const { return nullptr; } virtual const glslang::TIntermSymbol* getAsSymbolNode() const { return nullptr; } virtual const glslang::TIntermBranch* getAsBranchNode() const { return nullptr; } virtual const glslang::TIntermLoop* getAsLoopNode() const { return nullptr; } virtual ~TIntermNode() { } protected: TIntermNode(const TIntermNode&); TIntermNode& operator=(const TIntermNode&); glslang::TSourceLoc loc; }; namespace glslang { // // This is just to help yacc. // struct TIntermNodePair { TIntermNode* node1; TIntermNode* node2; }; // // Intermediate class for nodes that have a type. // class TIntermTyped : public TIntermNode { public: TIntermTyped(const TType& t) { type.shallowCopy(t); } TIntermTyped(TBasicType basicType) { TType bt(basicType); type.shallowCopy(bt); } virtual TIntermTyped* getAsTyped() { return this; } virtual const TIntermTyped* getAsTyped() const { return this; } virtual void setType(const TType& t) { type.shallowCopy(t); } virtual const TType& getType() const { return type; } virtual TType& getWritableType() { return type; } virtual TBasicType getBasicType() const { return type.getBasicType(); } virtual TQualifier& getQualifier() { return type.getQualifier(); } virtual const TQualifier& getQualifier() const { return type.getQualifier(); } virtual TArraySizes* getArraySizes() { return type.getArraySizes(); } virtual const TArraySizes* getArraySizes() const { return type.getArraySizes(); } virtual void propagatePrecision(TPrecisionQualifier); virtual int getVectorSize() const { return type.getVectorSize(); } virtual int getMatrixCols() const { return type.getMatrixCols(); } virtual int getMatrixRows() const { return type.getMatrixRows(); } virtual bool isMatrix() const { return type.isMatrix(); } virtual bool isArray() const { return type.isArray(); } virtual bool isVector() const { return type.isVector(); } virtual bool isScalar() const { return type.isScalar(); } virtual bool isStruct() const { return type.isStruct(); } virtual bool isFloatingDomain() const { return type.isFloatingDomain(); } virtual bool isIntegerDomain() const { return type.isIntegerDomain(); } bool isAtomic() const { return type.isAtomic(); } bool isReference() const { return type.isReference(); } TString getCompleteString(bool enhanced = false) const { return type.getCompleteString(enhanced); } protected: TIntermTyped& operator=(const TIntermTyped&); TType type; }; // // Handle for, do-while, and while loops. // class TIntermLoop : public TIntermNode { public: TIntermLoop(TIntermNode* aBody, TIntermTyped* aTest, TIntermTyped* aTerminal, bool testFirst) : body(aBody), test(aTest), terminal(aTerminal), first(testFirst), unroll(false), dontUnroll(false), dependency(0), minIterations(0), maxIterations(iterationsInfinite), iterationMultiple(1), peelCount(0), partialCount(0) { } virtual TIntermLoop* getAsLoopNode() { return this; } virtual const TIntermLoop* getAsLoopNode() const { return this; } virtual void traverse(TIntermTraverser*); TIntermNode* getBody() const { return body; } TIntermTyped* getTest() const { return test; } TIntermTyped* getTerminal() const { return terminal; } bool testFirst() const { return first; } void setUnroll() { unroll = true; } void setDontUnroll() { dontUnroll = true; peelCount = 0; partialCount = 0; } bool getUnroll() const { return unroll; } bool getDontUnroll() const { return dontUnroll; } static const unsigned int dependencyInfinite = 0xFFFFFFFF; static const unsigned int iterationsInfinite = 0xFFFFFFFF; void setLoopDependency(int d) { dependency = d; } int getLoopDependency() const { return dependency; } void setMinIterations(unsigned int v) { minIterations = v; } unsigned int getMinIterations() const { return minIterations; } void setMaxIterations(unsigned int v) { maxIterations = v; } unsigned int getMaxIterations() const { return maxIterations; } void setIterationMultiple(unsigned int v) { iterationMultiple = v; } unsigned int getIterationMultiple() const { return iterationMultiple; } void setPeelCount(unsigned int v) { peelCount = v; dontUnroll = false; } unsigned int getPeelCount() const { return peelCount; } void setPartialCount(unsigned int v) { partialCount = v; dontUnroll = false; } unsigned int getPartialCount() const { return partialCount; } protected: TIntermNode* body; // code to loop over TIntermTyped* test; // exit condition associated with loop, could be 0 for 'for' loops TIntermTyped* terminal; // exists for for-loops bool first; // true for while and for, not for do-while bool unroll; // true if unroll requested bool dontUnroll; // true if request to not unroll unsigned int dependency; // loop dependency hint; 0 means not set or unknown unsigned int minIterations; // as per the SPIR-V specification unsigned int maxIterations; // as per the SPIR-V specification unsigned int iterationMultiple; // as per the SPIR-V specification unsigned int peelCount; // as per the SPIR-V specification unsigned int partialCount; // as per the SPIR-V specification }; // // Handle case, break, continue, return, and kill. // class TIntermBranch : public TIntermNode { public: TIntermBranch(TOperator op, TIntermTyped* e) : flowOp(op), expression(e) { } virtual TIntermBranch* getAsBranchNode() { return this; } virtual const TIntermBranch* getAsBranchNode() const { return this; } virtual void traverse(TIntermTraverser*); TOperator getFlowOp() const { return flowOp; } TIntermTyped* getExpression() const { return expression; } void setExpression(TIntermTyped* pExpression) { expression = pExpression; } void updatePrecision(TPrecisionQualifier parentPrecision); protected: TOperator flowOp; TIntermTyped* expression; }; // // Represent method names before seeing their calling signature // or resolving them to operations. Just an expression as the base object // and a textural name. // class TIntermMethod : public TIntermTyped { public: TIntermMethod(TIntermTyped* o, const TType& t, const TString& m) : TIntermTyped(t), object(o), method(m) { } virtual TIntermMethod* getAsMethodNode() { return this; } virtual const TIntermMethod* getAsMethodNode() const { return this; } virtual const TString& getMethodName() const { return method; } virtual TIntermTyped* getObject() const { return object; } virtual void traverse(TIntermTraverser*); void setExport() { linkType = ELinkExport; } protected: TIntermTyped* object; TString method; TLinkType linkType; }; // // Nodes that correspond to symbols or constants in the source code. // class TIntermSymbol : public TIntermTyped { public: // if symbol is initialized as symbol(sym), the memory comes from the pool allocator of sym. If sym comes from // per process threadPoolAllocator, then it causes increased memory usage per compile // it is essential to use "symbol = sym" to assign to symbol TIntermSymbol(long long i, const TString& n, EShLanguage s, const TType& t, const TString* mn = nullptr) : TIntermTyped(t), id(i), flattenSubset(-1), stage(s), constSubtree(nullptr) { name = n; if (mn) { mangledName = *mn; } else { mangledName = n; } } virtual long long getId() const { return id; } virtual void changeId(long long i) { id = i; } virtual const TString& getName() const { return name; } virtual const TString& getMangledName() const { return mangledName; } virtual void traverse(TIntermTraverser*); virtual TIntermSymbol* getAsSymbolNode() { return this; } virtual const TIntermSymbol* getAsSymbolNode() const { return this; } void setConstArray(const TConstUnionArray& c) { constArray = c; } const TConstUnionArray& getConstArray() const { return constArray; } void setConstSubtree(TIntermTyped* subtree) { constSubtree = subtree; } TIntermTyped* getConstSubtree() const { return constSubtree; } void setFlattenSubset(int subset) { flattenSubset = subset; } virtual const TString& getAccessName() const; int getFlattenSubset() const { return flattenSubset; } // -1 means full object // This is meant for cases where a node has already been constructed, and // later on, it becomes necessary to switch to a different symbol. virtual void switchId(long long newId) { id = newId; } EShLanguage getStage() const { return stage; } protected: long long id; // the unique id of the symbol this node represents int flattenSubset; // how deeply the flattened object rooted at id has been dereferenced TString name; // the name of the symbol this node represents EShLanguage stage; TString mangledName; // mangled function name, or a copy of name if not a function TConstUnionArray constArray; // if the symbol is a front-end compile-time constant, this is its value TIntermTyped* constSubtree; }; class TIntermConstantUnion : public TIntermTyped { public: TIntermConstantUnion(const TConstUnionArray& ua, const TType& t) : TIntermTyped(t), constArray(ua), literal(false) { } const TConstUnionArray& getConstArray() const { return constArray; } virtual TIntermConstantUnion* getAsConstantUnion() { return this; } virtual const TIntermConstantUnion* getAsConstantUnion() const { return this; } virtual void traverse(TIntermTraverser*); virtual TIntermTyped* fold(TOperator, const TIntermTyped*) const; virtual TIntermTyped* fold(TOperator, const TType&) const; void setLiteral() { literal = true; } void setExpression() { literal = false; } bool isLiteral() const { return literal; } protected: TIntermConstantUnion& operator=(const TIntermConstantUnion&); const TConstUnionArray constArray; bool literal; // true if node represents a literal in the source code }; // Represent the independent aspects of a texturing TOperator struct TCrackedTextureOp { bool query; bool proj; bool lod; bool fetch; bool offset; bool offsets; bool gather; bool grad; bool subpass; bool lodClamp; bool fragMask; bool attachmentEXT; }; // // Intermediate class for node types that hold operators. // class TIntermOperator : public TIntermTyped { public: virtual TIntermOperator* getAsOperator() { return this; } virtual const TIntermOperator* getAsOperator() const { return this; } TOperator getOp() const { return op; } void setOp(TOperator newOp) { op = newOp; } bool modifiesState() const; bool isConstructor() const; bool isTexture() const { return op > EOpTextureGuardBegin && op < EOpTextureGuardEnd; } bool isSampling() const { return op > EOpSamplingGuardBegin && op < EOpSamplingGuardEnd; } bool isImage() const { return op > EOpImageGuardBegin && op < EOpImageGuardEnd; } bool isSparseTexture() const { return op > EOpSparseTextureGuardBegin && op < EOpSparseTextureGuardEnd; } bool isImageFootprint() const { return op > EOpImageFootprintGuardBegin && op < EOpImageFootprintGuardEnd; } bool isSparseImage() const { return op == EOpSparseImageLoad; } bool isSubgroup() const { return op > EOpSubgroupGuardStart && op < EOpSubgroupGuardStop; } void setOperationPrecision(TPrecisionQualifier p) { operationPrecision = p; } TPrecisionQualifier getOperationPrecision() const { return operationPrecision != EpqNone ? operationPrecision : type.getQualifier().precision; } TString getCompleteString() const { TString cs = type.getCompleteString(); if (getOperationPrecision() != type.getQualifier().precision) { cs += ", operation at "; cs += GetPrecisionQualifierString(getOperationPrecision()); } return cs; } // Crack the op into the individual dimensions of texturing operation. void crackTexture(TSampler sampler, TCrackedTextureOp& cracked) const { cracked.query = false; cracked.proj = false; cracked.lod = false; cracked.fetch = false; cracked.offset = false; cracked.offsets = false; cracked.gather = false; cracked.grad = false; cracked.subpass = false; cracked.attachmentEXT = false; cracked.lodClamp = false; cracked.fragMask = false; switch (op) { case EOpImageQuerySize: case EOpImageQuerySamples: case EOpTextureQuerySize: case EOpTextureQueryLod: case EOpTextureQueryLevels: case EOpTextureQuerySamples: case EOpSparseTexelsResident: cracked.query = true; break; case EOpTexture: case EOpSparseTexture: break; case EOpTextureProj: cracked.proj = true; break; case EOpTextureLod: case EOpSparseTextureLod: cracked.lod = true; break; case EOpTextureOffset: case EOpSparseTextureOffset: cracked.offset = true; break; case EOpTextureFetch: case EOpSparseTextureFetch: cracked.fetch = true; if (sampler.is1D() || (sampler.dim == Esd2D && ! sampler.isMultiSample()) || sampler.dim == Esd3D) cracked.lod = true; break; case EOpTextureFetchOffset: case EOpSparseTextureFetchOffset: cracked.fetch = true; cracked.offset = true; if (sampler.is1D() || (sampler.dim == Esd2D && ! sampler.isMultiSample()) || sampler.dim == Esd3D) cracked.lod = true; break; case EOpTextureProjOffset: cracked.offset = true; cracked.proj = true; break; case EOpTextureLodOffset: case EOpSparseTextureLodOffset: cracked.offset = true; cracked.lod = true; break; case EOpTextureProjLod: cracked.lod = true; cracked.proj = true; break; case EOpTextureProjLodOffset: cracked.offset = true; cracked.lod = true; cracked.proj = true; break; case EOpTextureGrad: case EOpSparseTextureGrad: cracked.grad = true; break; case EOpTextureGradOffset: case EOpSparseTextureGradOffset: cracked.grad = true; cracked.offset = true; break; case EOpTextureProjGrad: cracked.grad = true; cracked.proj = true; break; case EOpTextureProjGradOffset: cracked.grad = true; cracked.offset = true; cracked.proj = true; break; case EOpTextureClamp: case EOpSparseTextureClamp: cracked.lodClamp = true; break; case EOpTextureOffsetClamp: case EOpSparseTextureOffsetClamp: cracked.offset = true; cracked.lodClamp = true; break; case EOpTextureGradClamp: case EOpSparseTextureGradClamp: cracked.grad = true; cracked.lodClamp = true; break; case EOpTextureGradOffsetClamp: case EOpSparseTextureGradOffsetClamp: cracked.grad = true; cracked.offset = true; cracked.lodClamp = true; break; case EOpTextureGather: case EOpSparseTextureGather: cracked.gather = true; break; case EOpTextureGatherOffset: case EOpSparseTextureGatherOffset: cracked.gather = true; cracked.offset = true; break; case EOpTextureGatherOffsets: case EOpSparseTextureGatherOffsets: cracked.gather = true; cracked.offsets = true; break; case EOpTextureGatherLod: case EOpSparseTextureGatherLod: cracked.gather = true; cracked.lod = true; break; case EOpTextureGatherLodOffset: case EOpSparseTextureGatherLodOffset: cracked.gather = true; cracked.offset = true; cracked.lod = true; break; case EOpTextureGatherLodOffsets: case EOpSparseTextureGatherLodOffsets: cracked.gather = true; cracked.offsets = true; cracked.lod = true; break; case EOpImageLoadLod: case EOpImageStoreLod: case EOpSparseImageLoadLod: cracked.lod = true; break; case EOpFragmentMaskFetch: cracked.subpass = sampler.dim == EsdSubpass; cracked.fragMask = true; break; case EOpFragmentFetch: cracked.subpass = sampler.dim == EsdSubpass; cracked.fragMask = true; break; case EOpImageSampleFootprintNV: break; case EOpImageSampleFootprintClampNV: cracked.lodClamp = true; break; case EOpImageSampleFootprintLodNV: cracked.lod = true; break; case EOpImageSampleFootprintGradNV: cracked.grad = true; break; case EOpImageSampleFootprintGradClampNV: cracked.lodClamp = true; cracked.grad = true; break; case EOpSubpassLoad: case EOpSubpassLoadMS: cracked.subpass = true; break; case EOpColorAttachmentReadEXT: cracked.attachmentEXT = true; break; default: break; } } protected: TIntermOperator(TOperator o) : TIntermTyped(EbtFloat), op(o), operationPrecision(EpqNone) {} TIntermOperator(TOperator o, TType& t) : TIntermTyped(t), op(o), operationPrecision(EpqNone) {} TOperator op; // The result precision is in the inherited TType, and is usually meant to be both // the operation precision and the result precision. However, some more complex things, // like built-in function calls, distinguish between the two, in which case non-EqpNone // 'operationPrecision' overrides the result precision as far as operation precision // is concerned. TPrecisionQualifier operationPrecision; }; // // Nodes for all the basic binary math operators. // class TIntermBinary : public TIntermOperator { public: TIntermBinary(TOperator o) : TIntermOperator(o) {} virtual void traverse(TIntermTraverser*); virtual void setLeft(TIntermTyped* n) { left = n; } virtual void setRight(TIntermTyped* n) { right = n; } virtual TIntermTyped* getLeft() const { return left; } virtual TIntermTyped* getRight() const { return right; } virtual TIntermBinary* getAsBinaryNode() { return this; } virtual const TIntermBinary* getAsBinaryNode() const { return this; } virtual void updatePrecision(); protected: TIntermTyped* left; TIntermTyped* right; }; // // Nodes for unary math operators. // class TIntermUnary : public TIntermOperator { public: TIntermUnary(TOperator o, TType& t) : TIntermOperator(o, t), operand(nullptr) {} TIntermUnary(TOperator o) : TIntermOperator(o), operand(nullptr) {} virtual void traverse(TIntermTraverser*); virtual void setOperand(TIntermTyped* o) { operand = o; } virtual TIntermTyped* getOperand() { return operand; } virtual const TIntermTyped* getOperand() const { return operand; } virtual TIntermUnary* getAsUnaryNode() { return this; } virtual const TIntermUnary* getAsUnaryNode() const { return this; } virtual void updatePrecision(); void setSpirvInstruction(const TSpirvInstruction& inst) { spirvInst = inst; } const TSpirvInstruction& getSpirvInstruction() const { return spirvInst; } protected: TIntermTyped* operand; TSpirvInstruction spirvInst; }; typedef TVector TIntermSequence; typedef TVector TQualifierList; // // Nodes that operate on an arbitrary sized set of children. // class TIntermAggregate : public TIntermOperator { public: TIntermAggregate() : TIntermOperator(EOpNull), userDefined(false), pragmaTable(nullptr) { endLoc.init(); } TIntermAggregate(TOperator o) : TIntermOperator(o), pragmaTable(nullptr) { endLoc.init(); } ~TIntermAggregate() { delete pragmaTable; } virtual TIntermAggregate* getAsAggregate() { return this; } virtual const TIntermAggregate* getAsAggregate() const { return this; } virtual void updatePrecision(); virtual void setOperator(TOperator o) { op = o; } virtual TIntermSequence& getSequence() { return sequence; } virtual const TIntermSequence& getSequence() const { return sequence; } virtual void setName(const TString& n) { name = n; } virtual const TString& getName() const { return name; } virtual void traverse(TIntermTraverser*); virtual void setUserDefined() { userDefined = true; } virtual bool isUserDefined() { return userDefined; } virtual TQualifierList& getQualifierList() { return qualifier; } virtual const TQualifierList& getQualifierList() const { return qualifier; } void setOptimize(bool o) { optimize = o; } void setDebug(bool d) { debug = d; } bool getOptimize() const { return optimize; } bool getDebug() const { return debug; } void setPragmaTable(const TPragmaTable& pTable); const TPragmaTable& getPragmaTable() const { return *pragmaTable; } void setSpirvInstruction(const TSpirvInstruction& inst) { spirvInst = inst; } const TSpirvInstruction& getSpirvInstruction() const { return spirvInst; } void setEndLoc(TSourceLoc loc) { endLoc = loc; } TSourceLoc getEndLoc() const { return endLoc; } void setLinkType(TLinkType l) { linkType = l; } TLinkType getLinkType() const { return linkType; } protected: TIntermAggregate(const TIntermAggregate&); // disallow copy constructor TIntermAggregate& operator=(const TIntermAggregate&); // disallow assignment operator TIntermSequence sequence; TQualifierList qualifier; TString name; bool userDefined; // used for user defined function names bool optimize; bool debug; TPragmaTable* pragmaTable; TSpirvInstruction spirvInst; TLinkType linkType = ELinkNone; // Marking the end source location of the aggregate. // This is currently only set for a compound statement or a function body, pointing to '}'. TSourceLoc endLoc; }; // // For if tests. // class TIntermSelection : public TIntermTyped { public: TIntermSelection(TIntermTyped* cond, TIntermNode* trueB, TIntermNode* falseB) : TIntermTyped(EbtVoid), condition(cond), trueBlock(trueB), falseBlock(falseB), shortCircuit(true), flatten(false), dontFlatten(false) {} TIntermSelection(TIntermTyped* cond, TIntermNode* trueB, TIntermNode* falseB, const TType& type) : TIntermTyped(type), condition(cond), trueBlock(trueB), falseBlock(falseB), shortCircuit(true), flatten(false), dontFlatten(false) {} virtual void traverse(TIntermTraverser*); virtual TIntermTyped* getCondition() const { return condition; } virtual void setCondition(TIntermTyped* c) { condition = c; } virtual TIntermNode* getTrueBlock() const { return trueBlock; } virtual void setTrueBlock(TIntermTyped* tb) { trueBlock = tb; } virtual TIntermNode* getFalseBlock() const { return falseBlock; } virtual void setFalseBlock(TIntermTyped* fb) { falseBlock = fb; } virtual TIntermSelection* getAsSelectionNode() { return this; } virtual const TIntermSelection* getAsSelectionNode() const { return this; } void setNoShortCircuit() { shortCircuit = false; } bool getShortCircuit() const { return shortCircuit; } void setFlatten() { flatten = true; } void setDontFlatten() { dontFlatten = true; } bool getFlatten() const { return flatten; } bool getDontFlatten() const { return dontFlatten; } protected: TIntermTyped* condition; TIntermNode* trueBlock; TIntermNode* falseBlock; bool shortCircuit; // normally all if-then-else and all GLSL ?: short-circuit, but HLSL ?: does not bool flatten; // true if flatten requested bool dontFlatten; // true if requested to not flatten }; // // For switch statements. Designed use is that a switch will have sequence of nodes // that are either case/default nodes or a *single* node that represents all the code // in between (if any) consecutive case/defaults. So, a traversal need only deal with // 0 or 1 nodes per case/default statement. // class TIntermSwitch : public TIntermNode { public: TIntermSwitch(TIntermTyped* cond, TIntermAggregate* b) : condition(cond), body(b), flatten(false), dontFlatten(false) {} virtual void traverse(TIntermTraverser*); virtual TIntermNode* getCondition() const { return condition; } virtual TIntermAggregate* getBody() const { return body; } virtual TIntermSwitch* getAsSwitchNode() { return this; } virtual const TIntermSwitch* getAsSwitchNode() const { return this; } void setFlatten() { flatten = true; } void setDontFlatten() { dontFlatten = true; } bool getFlatten() const { return flatten; } bool getDontFlatten() const { return dontFlatten; } protected: TIntermTyped* condition; TIntermAggregate* body; bool flatten; // true if flatten requested bool dontFlatten; // true if requested to not flatten }; enum TVisit { EvPreVisit, EvInVisit, EvPostVisit }; // // For traversing the tree. User should derive from this, // put their traversal specific data in it, and then pass // it to a Traverse method. // // When using this, just fill in the methods for nodes you want visited. // Return false from a pre-visit to skip visiting that node's subtree. // // Explicitly set postVisit to true if you want post visiting, otherwise, // filled in methods will only be called at pre-visit time (before processing // the subtree). Similarly for inVisit for in-order visiting of nodes with // multiple children. // // If you only want post-visits, explicitly turn off preVisit (and inVisit) // and turn on postVisit. // // In general, for the visit*() methods, return true from interior nodes // to have the traversal continue on to children. // // If you process children yourself, or don't want them processed, return false. // class TIntermTraverser { public: POOL_ALLOCATOR_NEW_DELETE(glslang::GetThreadPoolAllocator()) TIntermTraverser(bool preVisit = true, bool inVisit = false, bool postVisit = false, bool rightToLeft = false) : preVisit(preVisit), inVisit(inVisit), postVisit(postVisit), rightToLeft(rightToLeft), depth(0), maxDepth(0) { } virtual ~TIntermTraverser() { } virtual void visitSymbol(TIntermSymbol*) { } virtual void visitConstantUnion(TIntermConstantUnion*) { } virtual bool visitBinary(TVisit, TIntermBinary*) { return true; } virtual bool visitUnary(TVisit, TIntermUnary*) { return true; } virtual bool visitSelection(TVisit, TIntermSelection*) { return true; } virtual bool visitAggregate(TVisit, TIntermAggregate*) { return true; } virtual bool visitLoop(TVisit, TIntermLoop*) { return true; } virtual bool visitBranch(TVisit, TIntermBranch*) { return true; } virtual bool visitSwitch(TVisit, TIntermSwitch*) { return true; } int getMaxDepth() const { return maxDepth; } void incrementDepth(TIntermNode *current) { depth++; maxDepth = (std::max)(maxDepth, depth); path.push_back(current); } void decrementDepth() { depth--; path.pop_back(); } TIntermNode *getParentNode() { return path.size() == 0 ? nullptr : path.back(); } const bool preVisit; const bool inVisit; const bool postVisit; const bool rightToLeft; protected: TIntermTraverser& operator=(TIntermTraverser&); int depth; int maxDepth; // All the nodes from root to the current node's parent during traversing. TVector path; }; // KHR_vulkan_glsl says "Two arrays sized with specialization constants are the same type only if // sized with the same symbol, involving no operations" inline bool SameSpecializationConstants(TIntermTyped* node1, TIntermTyped* node2) { return node1->getAsSymbolNode() && node2->getAsSymbolNode() && node1->getAsSymbolNode()->getId() == node2->getAsSymbolNode()->getId(); } } // end namespace glslang #endif // __INTERMEDIATE_H ================================================ FILE: src/libraries/glslang/glslang/Include/visibility.h ================================================ // // Copyright (C) 2023 LunarG, Inc. // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following // disclaimer in the documentation and/or other materials provided // with the distribution. // // Neither the name of 3Dlabs Inc. Ltd. nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // #ifdef GLSLANG_IS_SHARED_LIBRARY #ifdef _WIN32 #ifdef GLSLANG_EXPORTING #define GLSLANG_EXPORT __declspec(dllexport) #else #define GLSLANG_EXPORT __declspec(dllimport) #endif #elif __GNUC__ >= 4 #define GLSLANG_EXPORT __attribute__((visibility("default"))) #endif #endif // GLSLANG_IS_SHARED_LIBRARY #ifndef GLSLANG_EXPORT #define GLSLANG_EXPORT #endif // Symbols marked with this macro are only meant for public use by the test suite // and do not appear in publicly installed headers. They are not considered to be // part of the glslang library ABI. #define GLSLANG_EXPORT_FOR_TESTS GLSLANG_EXPORT ================================================ FILE: src/libraries/glslang/glslang/MachineIndependent/Constant.cpp ================================================ // // Copyright (C) 2002-2005 3Dlabs Inc. Ltd. // Copyright (C) 2012-2013 LunarG, Inc. // Copyright (C) 2017 ARM Limited. // Copyright (C) 2018-2020 Google, Inc. // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following // disclaimer in the documentation and/or other materials provided // with the distribution. // // Neither the name of 3Dlabs Inc. Ltd. nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // #include "localintermediate.h" #include #include #include #include namespace { using namespace glslang; const double pi = 3.1415926535897932384626433832795; } // end anonymous namespace namespace glslang { // // The fold functions see if an operation on a constant can be done in place, // without generating run-time code. // // Returns the node to keep using, which may or may not be the node passed in. // // Note: As of version 1.2, all constant operations must be folded. It is // not opportunistic, but rather a semantic requirement. // // // Do folding between a pair of nodes. // 'this' is the left-hand operand and 'rightConstantNode' is the right-hand operand. // // Returns a new node representing the result. // TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TIntermTyped* rightConstantNode) const { // For most cases, the return type matches the argument type, so set that // up and just code to exceptions below. TType returnType; returnType.shallowCopy(getType()); // // A pair of nodes is to be folded together // const TIntermConstantUnion *rightNode = rightConstantNode->getAsConstantUnion(); TConstUnionArray leftUnionArray = getConstArray(); TConstUnionArray rightUnionArray = rightNode->getConstArray(); // Figure out the size of the result int newComps; int constComps; switch(op) { case EOpMatrixTimesMatrix: newComps = rightNode->getMatrixCols() * getMatrixRows(); break; case EOpMatrixTimesVector: newComps = getMatrixRows(); break; case EOpVectorTimesMatrix: newComps = rightNode->getMatrixCols(); break; default: newComps = getType().computeNumComponents(); constComps = rightConstantNode->getType().computeNumComponents(); if (constComps == 1 && newComps > 1) { // for a case like vec4 f = vec4(2,3,4,5) + 1.2; TConstUnionArray smearedArray(newComps, rightNode->getConstArray()[0]); rightUnionArray = smearedArray; } else if (constComps > 1 && newComps == 1) { // for a case like vec4 f = 1.2 + vec4(2,3,4,5); newComps = constComps; rightUnionArray = rightNode->getConstArray(); TConstUnionArray smearedArray(newComps, getConstArray()[0]); leftUnionArray = smearedArray; returnType.shallowCopy(rightNode->getType()); } break; } TConstUnionArray newConstArray(newComps); TType constBool(EbtBool, EvqConst); switch(op) { case EOpAdd: for (int i = 0; i < newComps; i++) newConstArray[i] = leftUnionArray[i] + rightUnionArray[i]; break; case EOpSub: for (int i = 0; i < newComps; i++) newConstArray[i] = leftUnionArray[i] - rightUnionArray[i]; break; case EOpMul: case EOpVectorTimesScalar: case EOpMatrixTimesScalar: for (int i = 0; i < newComps; i++) newConstArray[i] = leftUnionArray[i] * rightUnionArray[i]; break; case EOpMatrixTimesMatrix: for (int row = 0; row < getMatrixRows(); row++) { for (int column = 0; column < rightNode->getMatrixCols(); column++) { double sum = 0.0f; for (int i = 0; i < rightNode->getMatrixRows(); i++) sum += leftUnionArray[i * getMatrixRows() + row].getDConst() * rightUnionArray[column * rightNode->getMatrixRows() + i].getDConst(); newConstArray[column * getMatrixRows() + row].setDConst(sum); } } returnType.shallowCopy(TType(getType().getBasicType(), EvqConst, 0, rightNode->getMatrixCols(), getMatrixRows())); break; case EOpDiv: for (int i = 0; i < newComps; i++) { switch (getType().getBasicType()) { case EbtDouble: case EbtFloat: case EbtFloat16: case EbtBFloat16: case EbtFloatE5M2: case EbtFloatE4M3: if (rightUnionArray[i].getDConst() != 0.0) newConstArray[i].setDConst(leftUnionArray[i].getDConst() / rightUnionArray[i].getDConst()); else if (leftUnionArray[i].getDConst() > 0.0) newConstArray[i].setDConst((double)INFINITY); else if (leftUnionArray[i].getDConst() < 0.0) newConstArray[i].setDConst(-(double)INFINITY); else newConstArray[i].setDConst((double)NAN); break; case EbtInt: if (rightUnionArray[i] == 0) newConstArray[i].setIConst(0x7FFFFFFF); else if (rightUnionArray[i].getIConst() == -1 && leftUnionArray[i].getIConst() == (int)-0x80000000ll) newConstArray[i].setIConst((int)-0x80000000ll); else newConstArray[i].setIConst(leftUnionArray[i].getIConst() / rightUnionArray[i].getIConst()); break; case EbtUint: if (rightUnionArray[i] == 0u) newConstArray[i].setUConst(0xFFFFFFFFu); else newConstArray[i].setUConst(leftUnionArray[i].getUConst() / rightUnionArray[i].getUConst()); break; case EbtInt8: if (rightUnionArray[i] == (signed char)0) newConstArray[i].setI8Const((signed char)0x7F); else if (rightUnionArray[i].getI8Const() == (signed char)-1 && leftUnionArray[i].getI8Const() == (signed char)-0x80) newConstArray[i].setI8Const((signed char)-0x80); else newConstArray[i].setI8Const(leftUnionArray[i].getI8Const() / rightUnionArray[i].getI8Const()); break; case EbtUint8: if (rightUnionArray[i] == (unsigned char)0u) newConstArray[i].setU8Const((unsigned char)0xFFu); else newConstArray[i].setU8Const(leftUnionArray[i].getU8Const() / rightUnionArray[i].getU8Const()); break; case EbtInt16: if (rightUnionArray[i] == (signed short)0) newConstArray[i].setI16Const((signed short)0x7FFF); else if (rightUnionArray[i].getI16Const() == (signed short)-1 && leftUnionArray[i].getI16Const() == (signed short)-0x8000) newConstArray[i].setI16Const((signed short)-0x8000); else newConstArray[i].setI16Const(leftUnionArray[i].getI16Const() / rightUnionArray[i].getI16Const()); break; case EbtUint16: if (rightUnionArray[i] == (unsigned short)0u) newConstArray[i].setU16Const((unsigned short)0xFFFFu); else newConstArray[i].setU16Const(leftUnionArray[i].getU16Const() / rightUnionArray[i].getU16Const()); break; case EbtInt64: if (rightUnionArray[i] == 0ll) newConstArray[i].setI64Const(LLONG_MAX); else if (rightUnionArray[i].getI64Const() == -1 && leftUnionArray[i].getI64Const() == LLONG_MIN) newConstArray[i].setI64Const(LLONG_MIN); else newConstArray[i].setI64Const(leftUnionArray[i].getI64Const() / rightUnionArray[i].getI64Const()); break; case EbtUint64: if (rightUnionArray[i] == 0ull) newConstArray[i].setU64Const(0xFFFFFFFFFFFFFFFFull); else newConstArray[i].setU64Const(leftUnionArray[i].getU64Const() / rightUnionArray[i].getU64Const()); break; default: return nullptr; } } break; case EOpMatrixTimesVector: for (int i = 0; i < getMatrixRows(); i++) { double sum = 0.0f; for (int j = 0; j < rightNode->getVectorSize(); j++) { sum += leftUnionArray[j*getMatrixRows() + i].getDConst() * rightUnionArray[j].getDConst(); } newConstArray[i].setDConst(sum); } returnType.shallowCopy(TType(getBasicType(), EvqConst, getMatrixRows())); break; case EOpVectorTimesMatrix: for (int i = 0; i < rightNode->getMatrixCols(); i++) { double sum = 0.0f; for (int j = 0; j < getVectorSize(); j++) sum += leftUnionArray[j].getDConst() * rightUnionArray[i*rightNode->getMatrixRows() + j].getDConst(); newConstArray[i].setDConst(sum); } returnType.shallowCopy(TType(getBasicType(), EvqConst, rightNode->getMatrixCols())); break; case EOpMod: for (int i = 0; i < newComps; i++) { if (rightUnionArray[i] == 0) newConstArray[i] = leftUnionArray[i]; else { switch (getType().getBasicType()) { case EbtInt: if (rightUnionArray[i].getIConst() == -1 && leftUnionArray[i].getIConst() == INT_MIN) { newConstArray[i].setIConst(0); break; } else goto modulo_default; case EbtInt64: if (rightUnionArray[i].getI64Const() == -1 && leftUnionArray[i].getI64Const() == LLONG_MIN) { newConstArray[i].setI64Const(0); break; } else goto modulo_default; case EbtInt16: if (rightUnionArray[i].getIConst() == -1 && leftUnionArray[i].getIConst() == SHRT_MIN) { newConstArray[i].setIConst(0); break; } else goto modulo_default; default: modulo_default: newConstArray[i] = leftUnionArray[i] % rightUnionArray[i]; } } } break; case EOpRightShift: for (int i = 0; i < newComps; i++) newConstArray[i] = leftUnionArray[i] >> rightUnionArray[i]; break; case EOpLeftShift: for (int i = 0; i < newComps; i++) newConstArray[i] = leftUnionArray[i] << rightUnionArray[i]; break; case EOpAnd: for (int i = 0; i < newComps; i++) newConstArray[i] = leftUnionArray[i] & rightUnionArray[i]; break; case EOpInclusiveOr: for (int i = 0; i < newComps; i++) newConstArray[i] = leftUnionArray[i] | rightUnionArray[i]; break; case EOpExclusiveOr: for (int i = 0; i < newComps; i++) newConstArray[i] = leftUnionArray[i] ^ rightUnionArray[i]; break; case EOpLogicalAnd: // this code is written for possible future use, will not get executed currently for (int i = 0; i < newComps; i++) newConstArray[i] = leftUnionArray[i] && rightUnionArray[i]; break; case EOpLogicalOr: // this code is written for possible future use, will not get executed currently for (int i = 0; i < newComps; i++) newConstArray[i] = leftUnionArray[i] || rightUnionArray[i]; break; case EOpLogicalXor: for (int i = 0; i < newComps; i++) { switch (getType().getBasicType()) { case EbtBool: newConstArray[i].setBConst((leftUnionArray[i] == rightUnionArray[i]) ? false : true); break; default: assert(false && "Default missing"); } } break; case EOpLessThan: newConstArray[0].setBConst(leftUnionArray[0] < rightUnionArray[0]); returnType.shallowCopy(constBool); break; case EOpGreaterThan: newConstArray[0].setBConst(leftUnionArray[0] > rightUnionArray[0]); returnType.shallowCopy(constBool); break; case EOpLessThanEqual: newConstArray[0].setBConst(! (leftUnionArray[0] > rightUnionArray[0])); returnType.shallowCopy(constBool); break; case EOpGreaterThanEqual: newConstArray[0].setBConst(! (leftUnionArray[0] < rightUnionArray[0])); returnType.shallowCopy(constBool); break; case EOpEqual: newConstArray[0].setBConst(rightNode->getConstArray() == leftUnionArray); returnType.shallowCopy(constBool); break; case EOpNotEqual: newConstArray[0].setBConst(rightNode->getConstArray() != leftUnionArray); returnType.shallowCopy(constBool); break; default: return nullptr; } TIntermConstantUnion *newNode = new TIntermConstantUnion(newConstArray, returnType); newNode->setLoc(getLoc()); return newNode; } // // Do single unary node folding // // Returns a new node representing the result. // TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TType& returnType) const { // First, size the result, which is mostly the same as the argument's size, // but not always, and classify what is componentwise. // Also, eliminate cases that can't be compile-time constant. int resultSize; bool componentWise = true; int objectSize = getType().computeNumComponents(); switch (op) { case EOpDeterminant: case EOpAny: case EOpAll: case EOpLength: componentWise = false; resultSize = 1; break; case EOpEmitStreamVertex: case EOpEndStreamPrimitive: // These don't fold return nullptr; case EOpPackSnorm2x16: case EOpPackUnorm2x16: case EOpPackHalf2x16: componentWise = false; resultSize = 1; break; case EOpUnpackSnorm2x16: case EOpUnpackUnorm2x16: case EOpUnpackHalf2x16: componentWise = false; resultSize = 2; break; case EOpPack16: case EOpPack32: case EOpPack64: case EOpUnpack32: case EOpUnpack16: case EOpUnpack8: case EOpNormalize: componentWise = false; resultSize = objectSize; break; default: resultSize = objectSize; break; } // Set up for processing TConstUnionArray newConstArray(resultSize); const TConstUnionArray& unionArray = getConstArray(); // Process non-component-wise operations switch (op) { case EOpLength: case EOpNormalize: { double sum = 0; for (int i = 0; i < objectSize; i++) sum += unionArray[i].getDConst() * unionArray[i].getDConst(); double length = sqrt(sum); if (op == EOpLength) newConstArray[0].setDConst(length); else { for (int i = 0; i < objectSize; i++) newConstArray[i].setDConst(unionArray[i].getDConst() / length); } break; } case EOpAny: { bool result = false; for (int i = 0; i < objectSize; i++) { if (unionArray[i].getBConst()) result = true; } newConstArray[0].setBConst(result); break; } case EOpAll: { bool result = true; for (int i = 0; i < objectSize; i++) { if (! unionArray[i].getBConst()) result = false; } newConstArray[0].setBConst(result); break; } case EOpPackSnorm2x16: case EOpPackUnorm2x16: case EOpPackHalf2x16: case EOpPack16: case EOpPack32: case EOpPack64: case EOpUnpack32: case EOpUnpack16: case EOpUnpack8: case EOpUnpackSnorm2x16: case EOpUnpackUnorm2x16: case EOpUnpackHalf2x16: case EOpDeterminant: case EOpMatrixInverse: case EOpTranspose: return nullptr; default: assert(componentWise); break; } // Turn off the componentwise loop if (! componentWise) objectSize = 0; // Process component-wise operations for (int i = 0; i < objectSize; i++) { // First read the value and convert to i64/u64/f64/bool, then convert // to the destination type (still 64b), then convert down to the // destination size. if (IsOpNumericConv(op)) { enum ConvType { CONV_FLOAT, CONV_INT, CONV_UINT, CONV_BOOL }; ConvType srcType = CONV_UINT, dstType = CONV_UINT; double valf = 0.0; uint64_t valu = 0; int64_t vali = 0; bool valb = false; switch (getType().getBasicType()) { case EbtDouble: case EbtFloat16: case EbtBFloat16: case EbtFloatE5M2: case EbtFloatE4M3: case EbtFloat: valf = unionArray[i].getDConst(); srcType = CONV_FLOAT; break; case EbtInt8: vali = unionArray[i].getI8Const(); srcType = CONV_INT; break; case EbtInt16: vali = unionArray[i].getI16Const(); srcType = CONV_INT; break; case EbtInt: vali = unionArray[i].getIConst(); srcType = CONV_INT; break; case EbtInt64: vali = unionArray[i].getI64Const(); srcType = CONV_INT; break; case EbtUint8: valu = unionArray[i].getU8Const(); srcType = CONV_UINT; break; case EbtUint16: valu = unionArray[i].getU16Const(); srcType = CONV_UINT; break; case EbtUint: valu = unionArray[i].getUConst(); srcType = CONV_UINT; break; case EbtUint64: valu = unionArray[i].getU64Const(); srcType = CONV_UINT; break; case EbtBool: valb = unionArray[i].getBConst(); srcType = CONV_BOOL; break; default: assert(0); break; } switch (returnType.getBasicType()) { case EbtDouble: case EbtFloat16: case EbtBFloat16: case EbtFloatE5M2: case EbtFloatE4M3: case EbtFloat: dstType = CONV_FLOAT; break; case EbtInt8: case EbtInt16: case EbtInt: case EbtInt64: dstType = CONV_INT; break; case EbtUint8: case EbtUint16: case EbtUint: case EbtUint64: dstType = CONV_UINT; break; case EbtBool: dstType = CONV_BOOL; break; default: assert(0); break; } if (dstType == CONV_BOOL) { switch (srcType) { case CONV_FLOAT: valb = (valf != 0.0); break; case CONV_INT: valb = (vali != 0.0); break; case CONV_UINT: valb = (valu != 0.0); break; default: break; } } else if (dstType == CONV_FLOAT) { switch (srcType) { case CONV_BOOL: valf = (double)valb; break; case CONV_INT: valf = (double)vali; break; case CONV_UINT: valf = (double)valu; break; default: break; } } else if (dstType == CONV_INT) { switch (srcType) { case CONV_BOOL: vali = (int64_t)valb; break; case CONV_FLOAT: vali = (int64_t)valf; break; case CONV_UINT: vali = (int64_t)valu; break; default: break; } } else if (dstType == CONV_UINT) { switch (srcType) { case CONV_BOOL: valu = (uint64_t)valb; break; case CONV_FLOAT: valu = (uint64_t)valf; break; case CONV_INT: valu = (uint64_t)vali; break; default: break; } } switch (returnType.getBasicType()) { case EbtDouble: case EbtFloat16: case EbtBFloat16: case EbtFloatE5M2: case EbtFloatE4M3: case EbtFloat: newConstArray[i].setDConst(valf); break; case EbtInt8: newConstArray[i].setI8Const(static_cast(vali)); break; case EbtInt16: newConstArray[i].setI16Const(static_cast(vali)); break; case EbtInt: newConstArray[i].setIConst(static_cast(vali)); break; case EbtInt64: newConstArray[i].setI64Const(vali); break; case EbtUint8: newConstArray[i].setU8Const(static_cast(valu)); break; case EbtUint16: newConstArray[i].setU16Const(static_cast(valu)); break; case EbtUint: newConstArray[i].setUConst(static_cast(valu)); break; case EbtUint64: newConstArray[i].setU64Const(valu); break; case EbtBool: newConstArray[i].setBConst(valb); break; default: assert(0); break; } continue; } switch (op) { case EOpNegative: switch (getType().getBasicType()) { case EbtDouble: case EbtFloat16: case EbtBFloat16: case EbtFloatE5M2: case EbtFloatE4M3: case EbtFloat: newConstArray[i].setDConst(-unionArray[i].getDConst()); break; // Note: avoid UBSAN error regarding negating 0x80000000 case EbtInt: newConstArray[i].setIConst( static_cast(unionArray[i].getIConst()) == 0x80000000 ? -0x7FFFFFFF - 1 : -unionArray[i].getIConst()); break; case EbtUint: newConstArray[i].setUConst(static_cast(-static_cast(unionArray[i].getUConst()))); break; case EbtInt8: newConstArray[i].setI8Const(-unionArray[i].getI8Const()); break; case EbtUint8: newConstArray[i].setU8Const(static_cast(-static_cast(unionArray[i].getU8Const()))); break; case EbtInt16: newConstArray[i].setI16Const(-unionArray[i].getI16Const()); break; case EbtUint16:newConstArray[i].setU16Const(static_cast(-static_cast(unionArray[i].getU16Const()))); break; case EbtInt64: { int64_t i64val = unionArray[i].getI64Const(); newConstArray[i].setI64Const(i64val == INT64_MIN ? INT64_MIN : -i64val); break; } case EbtUint64: newConstArray[i].setU64Const(static_cast(-static_cast(unionArray[i].getU64Const()))); break; default: return nullptr; } break; case EOpLogicalNot: case EOpVectorLogicalNot: switch (getType().getBasicType()) { case EbtBool: newConstArray[i].setBConst(!unionArray[i].getBConst()); break; default: return nullptr; } break; case EOpBitwiseNot: newConstArray[i] = ~unionArray[i]; break; case EOpRadians: newConstArray[i].setDConst(unionArray[i].getDConst() * pi / 180.0); break; case EOpDegrees: newConstArray[i].setDConst(unionArray[i].getDConst() * 180.0 / pi); break; case EOpSin: newConstArray[i].setDConst(sin(unionArray[i].getDConst())); break; case EOpCos: newConstArray[i].setDConst(cos(unionArray[i].getDConst())); break; case EOpTan: newConstArray[i].setDConst(tan(unionArray[i].getDConst())); break; case EOpAsin: newConstArray[i].setDConst(asin(unionArray[i].getDConst())); break; case EOpAcos: newConstArray[i].setDConst(acos(unionArray[i].getDConst())); break; case EOpAtan: newConstArray[i].setDConst(atan(unionArray[i].getDConst())); break; case EOpDPdx: case EOpDPdy: case EOpFwidth: case EOpDPdxFine: case EOpDPdyFine: case EOpFwidthFine: case EOpDPdxCoarse: case EOpDPdyCoarse: case EOpFwidthCoarse: // The derivatives are all mandated to create a constant 0. newConstArray[i].setDConst(0.0); break; case EOpExp: newConstArray[i].setDConst(exp(unionArray[i].getDConst())); break; case EOpLog: newConstArray[i].setDConst(log(unionArray[i].getDConst())); break; case EOpExp2: newConstArray[i].setDConst(exp2(unionArray[i].getDConst())); break; case EOpLog2: newConstArray[i].setDConst(log2(unionArray[i].getDConst())); break; case EOpSqrt: newConstArray[i].setDConst(sqrt(unionArray[i].getDConst())); break; case EOpInverseSqrt: newConstArray[i].setDConst(1.0 / sqrt(unionArray[i].getDConst())); break; case EOpAbs: if (unionArray[i].getType() == EbtDouble) newConstArray[i].setDConst(fabs(unionArray[i].getDConst())); else if (unionArray[i].getType() == EbtInt) newConstArray[i].setIConst(abs(unionArray[i].getIConst())); else newConstArray[i] = unionArray[i]; break; case EOpSign: #define SIGN(X) (X == 0 ? 0 : (X < 0 ? -1 : 1)) if (unionArray[i].getType() == EbtDouble) newConstArray[i].setDConst(SIGN(unionArray[i].getDConst())); else newConstArray[i].setIConst(SIGN(unionArray[i].getIConst())); break; case EOpFloor: newConstArray[i].setDConst(floor(unionArray[i].getDConst())); break; case EOpTrunc: if (unionArray[i].getDConst() > 0) newConstArray[i].setDConst(floor(unionArray[i].getDConst())); else newConstArray[i].setDConst(ceil(unionArray[i].getDConst())); break; case EOpRound: newConstArray[i].setDConst(floor(0.5 + unionArray[i].getDConst())); break; case EOpRoundEven: { double flr = floor(unionArray[i].getDConst()); bool even = flr / 2.0 == floor(flr / 2.0); double rounded = even ? ceil(unionArray[i].getDConst() - 0.5) : floor(unionArray[i].getDConst() + 0.5); newConstArray[i].setDConst(rounded); break; } case EOpCeil: newConstArray[i].setDConst(ceil(unionArray[i].getDConst())); break; case EOpFract: { double x = unionArray[i].getDConst(); newConstArray[i].setDConst(x - floor(x)); break; } case EOpIsNan: { newConstArray[i].setBConst(std::isnan(unionArray[i].getDConst())); break; } case EOpIsInf: { newConstArray[i].setBConst(std::isinf(unionArray[i].getDConst())); break; } case EOpConvPtrToUint64: case EOpConvUint64ToPtr: case EOpConstructReference: newConstArray[i].setU64Const(unionArray[i].getU64Const()); break; // TODO: 3.0 Functionality: unary constant folding: the rest of the ops have to be fleshed out case EOpSinh: case EOpCosh: case EOpTanh: case EOpAsinh: case EOpAcosh: case EOpAtanh: case EOpFloatBitsToInt: case EOpFloatBitsToUint: case EOpIntBitsToFloat: case EOpUintBitsToFloat: case EOpDoubleBitsToInt64: case EOpDoubleBitsToUint64: case EOpInt64BitsToDouble: case EOpUint64BitsToDouble: case EOpFloat16BitsToInt16: case EOpFloat16BitsToUint16: case EOpInt16BitsToFloat16: case EOpUint16BitsToFloat16: default: return nullptr; } } TIntermConstantUnion *newNode = new TIntermConstantUnion(newConstArray, returnType); newNode->getWritableType().getQualifier().storage = EvqConst; newNode->setLoc(getLoc()); return newNode; } // // Do constant folding for an aggregate node that has all its children // as constants and an operator that requires constant folding. // TIntermTyped* TIntermediate::fold(TIntermAggregate* aggrNode) { if (aggrNode == nullptr) return aggrNode; if (! areAllChildConst(aggrNode)) return aggrNode; if (aggrNode->isConstructor()) return foldConstructor(aggrNode); TIntermSequence& children = aggrNode->getSequence(); // First, see if this is an operation to constant fold, kick out if not, // see what size the result is if so. bool componentwise = false; // will also say componentwise if a scalar argument gets repeated to make per-component results int objectSize; switch (aggrNode->getOp()) { case EOpAtan: case EOpPow: case EOpMin: case EOpMax: case EOpMix: case EOpMod: case EOpClamp: case EOpLessThan: case EOpGreaterThan: case EOpLessThanEqual: case EOpGreaterThanEqual: case EOpVectorEqual: case EOpVectorNotEqual: componentwise = true; objectSize = children[0]->getAsConstantUnion()->getType().computeNumComponents(); break; case EOpCross: case EOpReflect: case EOpRefract: case EOpFaceForward: objectSize = children[0]->getAsConstantUnion()->getType().computeNumComponents(); break; case EOpDistance: case EOpDot: objectSize = 1; break; case EOpOuterProduct: objectSize = children[0]->getAsTyped()->getType().getVectorSize() * children[1]->getAsTyped()->getType().getVectorSize(); break; case EOpStep: componentwise = true; objectSize = std::max(children[0]->getAsTyped()->getType().getVectorSize(), children[1]->getAsTyped()->getType().getVectorSize()); break; case EOpSmoothStep: componentwise = true; objectSize = std::max(children[0]->getAsTyped()->getType().getVectorSize(), children[2]->getAsTyped()->getType().getVectorSize()); break; case EOpMul: { TIntermConstantUnion* left = children[0]->getAsConstantUnion(); TIntermConstantUnion* right = children[1]->getAsConstantUnion(); return left->fold(EOpMul, right); } default: return aggrNode; } TConstUnionArray newConstArray(objectSize); TVector childConstUnions; for (unsigned int arg = 0; arg < children.size(); ++arg) childConstUnions.push_back(children[arg]->getAsConstantUnion()->getConstArray()); if (componentwise) { for (int comp = 0; comp < objectSize; comp++) { // some arguments are scalars instead of matching vectors; simulate a smear int arg0comp = std::min(comp, children[0]->getAsTyped()->getType().getVectorSize() - 1); int arg1comp = 0; if (children.size() > 1) arg1comp = std::min(comp, children[1]->getAsTyped()->getType().getVectorSize() - 1); int arg2comp = 0; if (children.size() > 2) arg2comp = std::min(comp, children[2]->getAsTyped()->getType().getVectorSize() - 1); switch (aggrNode->getOp()) { case EOpAtan: newConstArray[comp].setDConst(atan2(childConstUnions[0][arg0comp].getDConst(), childConstUnions[1][arg1comp].getDConst())); break; case EOpPow: newConstArray[comp].setDConst(pow(childConstUnions[0][arg0comp].getDConst(), childConstUnions[1][arg1comp].getDConst())); break; case EOpMod: { double arg0 = childConstUnions[0][arg0comp].getDConst(); double arg1 = childConstUnions[1][arg1comp].getDConst(); double result = arg0 - arg1 * floor(arg0 / arg1); newConstArray[comp].setDConst(result); break; } case EOpMin: switch(children[0]->getAsTyped()->getBasicType()) { case EbtFloat16: case EbtBFloat16: case EbtFloatE5M2: case EbtFloatE4M3: case EbtFloat: case EbtDouble: newConstArray[comp].setDConst(std::min(childConstUnions[0][arg0comp].getDConst(), childConstUnions[1][arg1comp].getDConst())); break; case EbtInt: newConstArray[comp].setIConst(std::min(childConstUnions[0][arg0comp].getIConst(), childConstUnions[1][arg1comp].getIConst())); break; case EbtUint: newConstArray[comp].setUConst(std::min(childConstUnions[0][arg0comp].getUConst(), childConstUnions[1][arg1comp].getUConst())); break; case EbtInt8: newConstArray[comp].setI8Const(std::min(childConstUnions[0][arg0comp].getI8Const(), childConstUnions[1][arg1comp].getI8Const())); break; case EbtUint8: newConstArray[comp].setU8Const(std::min(childConstUnions[0][arg0comp].getU8Const(), childConstUnions[1][arg1comp].getU8Const())); break; case EbtInt16: newConstArray[comp].setI16Const(std::min(childConstUnions[0][arg0comp].getI16Const(), childConstUnions[1][arg1comp].getI16Const())); break; case EbtUint16: newConstArray[comp].setU16Const(std::min(childConstUnions[0][arg0comp].getU16Const(), childConstUnions[1][arg1comp].getU16Const())); break; case EbtInt64: newConstArray[comp].setI64Const(std::min(childConstUnions[0][arg0comp].getI64Const(), childConstUnions[1][arg1comp].getI64Const())); break; case EbtUint64: newConstArray[comp].setU64Const(std::min(childConstUnions[0][arg0comp].getU64Const(), childConstUnions[1][arg1comp].getU64Const())); break; default: assert(false && "Default missing"); } break; case EOpMax: switch(children[0]->getAsTyped()->getBasicType()) { case EbtFloat16: case EbtBFloat16: case EbtFloatE5M2: case EbtFloatE4M3: case EbtFloat: case EbtDouble: newConstArray[comp].setDConst(std::max(childConstUnions[0][arg0comp].getDConst(), childConstUnions[1][arg1comp].getDConst())); break; case EbtInt: newConstArray[comp].setIConst(std::max(childConstUnions[0][arg0comp].getIConst(), childConstUnions[1][arg1comp].getIConst())); break; case EbtUint: newConstArray[comp].setUConst(std::max(childConstUnions[0][arg0comp].getUConst(), childConstUnions[1][arg1comp].getUConst())); break; case EbtInt8: newConstArray[comp].setI8Const(std::max(childConstUnions[0][arg0comp].getI8Const(), childConstUnions[1][arg1comp].getI8Const())); break; case EbtUint8: newConstArray[comp].setU8Const(std::max(childConstUnions[0][arg0comp].getU8Const(), childConstUnions[1][arg1comp].getU8Const())); break; case EbtInt16: newConstArray[comp].setI16Const(std::max(childConstUnions[0][arg0comp].getI16Const(), childConstUnions[1][arg1comp].getI16Const())); break; case EbtUint16: newConstArray[comp].setU16Const(std::max(childConstUnions[0][arg0comp].getU16Const(), childConstUnions[1][arg1comp].getU16Const())); break; case EbtInt64: newConstArray[comp].setI64Const(std::max(childConstUnions[0][arg0comp].getI64Const(), childConstUnions[1][arg1comp].getI64Const())); break; case EbtUint64: newConstArray[comp].setU64Const(std::max(childConstUnions[0][arg0comp].getU64Const(), childConstUnions[1][arg1comp].getU64Const())); break; default: assert(false && "Default missing"); } break; case EOpClamp: switch(children[0]->getAsTyped()->getBasicType()) { case EbtFloat16: case EbtBFloat16: case EbtFloatE5M2: case EbtFloatE4M3: case EbtFloat: case EbtDouble: newConstArray[comp].setDConst(std::min(std::max(childConstUnions[0][arg0comp].getDConst(), childConstUnions[1][arg1comp].getDConst()), childConstUnions[2][arg2comp].getDConst())); break; case EbtUint: newConstArray[comp].setUConst(std::min(std::max(childConstUnions[0][arg0comp].getUConst(), childConstUnions[1][arg1comp].getUConst()), childConstUnions[2][arg2comp].getUConst())); break; case EbtInt8: newConstArray[comp].setI8Const(std::min(std::max(childConstUnions[0][arg0comp].getI8Const(), childConstUnions[1][arg1comp].getI8Const()), childConstUnions[2][arg2comp].getI8Const())); break; case EbtUint8: newConstArray[comp].setU8Const(std::min(std::max(childConstUnions[0][arg0comp].getU8Const(), childConstUnions[1][arg1comp].getU8Const()), childConstUnions[2][arg2comp].getU8Const())); break; case EbtInt16: newConstArray[comp].setI16Const(std::min(std::max(childConstUnions[0][arg0comp].getI16Const(), childConstUnions[1][arg1comp].getI16Const()), childConstUnions[2][arg2comp].getI16Const())); break; case EbtUint16: newConstArray[comp].setU16Const(std::min(std::max(childConstUnions[0][arg0comp].getU16Const(), childConstUnions[1][arg1comp].getU16Const()), childConstUnions[2][arg2comp].getU16Const())); break; case EbtInt: newConstArray[comp].setIConst(std::min(std::max(childConstUnions[0][arg0comp].getIConst(), childConstUnions[1][arg1comp].getIConst()), childConstUnions[2][arg2comp].getIConst())); break; case EbtInt64: newConstArray[comp].setI64Const(std::min(std::max(childConstUnions[0][arg0comp].getI64Const(), childConstUnions[1][arg1comp].getI64Const()), childConstUnions[2][arg2comp].getI64Const())); break; case EbtUint64: newConstArray[comp].setU64Const(std::min(std::max(childConstUnions[0][arg0comp].getU64Const(), childConstUnions[1][arg1comp].getU64Const()), childConstUnions[2][arg2comp].getU64Const())); break; default: assert(false && "Default missing"); } break; case EOpLessThan: newConstArray[comp].setBConst(childConstUnions[0][arg0comp] < childConstUnions[1][arg1comp]); break; case EOpGreaterThan: newConstArray[comp].setBConst(childConstUnions[0][arg0comp] > childConstUnions[1][arg1comp]); break; case EOpLessThanEqual: newConstArray[comp].setBConst(! (childConstUnions[0][arg0comp] > childConstUnions[1][arg1comp])); break; case EOpGreaterThanEqual: newConstArray[comp].setBConst(! (childConstUnions[0][arg0comp] < childConstUnions[1][arg1comp])); break; case EOpVectorEqual: newConstArray[comp].setBConst(childConstUnions[0][arg0comp] == childConstUnions[1][arg1comp]); break; case EOpVectorNotEqual: newConstArray[comp].setBConst(childConstUnions[0][arg0comp] != childConstUnions[1][arg1comp]); break; case EOpMix: if (!children[0]->getAsTyped()->isFloatingDomain()) return aggrNode; if (children[2]->getAsTyped()->getBasicType() == EbtBool) { newConstArray[comp].setDConst(childConstUnions[2][arg2comp].getBConst() ? childConstUnions[1][arg1comp].getDConst() : childConstUnions[0][arg0comp].getDConst()); } else { newConstArray[comp].setDConst( childConstUnions[0][arg0comp].getDConst() * (1.0 - childConstUnions[2][arg2comp].getDConst()) + childConstUnions[1][arg1comp].getDConst() * childConstUnions[2][arg2comp].getDConst()); } break; case EOpStep: newConstArray[comp].setDConst(childConstUnions[1][arg1comp].getDConst() < childConstUnions[0][arg0comp].getDConst() ? 0.0 : 1.0); break; case EOpSmoothStep: { double t = (childConstUnions[2][arg2comp].getDConst() - childConstUnions[0][arg0comp].getDConst()) / (childConstUnions[1][arg1comp].getDConst() - childConstUnions[0][arg0comp].getDConst()); if (t < 0.0) t = 0.0; if (t > 1.0) t = 1.0; newConstArray[comp].setDConst(t * t * (3.0 - 2.0 * t)); break; } default: return aggrNode; } } } else { // Non-componentwise... int numComps = children[0]->getAsConstantUnion()->getType().computeNumComponents(); double dot; switch (aggrNode->getOp()) { case EOpDistance: { double sum = 0.0; for (int comp = 0; comp < numComps; ++comp) { double diff = childConstUnions[1][comp].getDConst() - childConstUnions[0][comp].getDConst(); sum += diff * diff; } newConstArray[0].setDConst(sqrt(sum)); break; } case EOpDot: if (!children[0]->getAsTyped()->isFloatingDomain()) { return aggrNode; } newConstArray[0].setDConst(childConstUnions[0].dot(childConstUnions[1])); break; case EOpCross: newConstArray[0] = childConstUnions[0][1] * childConstUnions[1][2] - childConstUnions[0][2] * childConstUnions[1][1]; newConstArray[1] = childConstUnions[0][2] * childConstUnions[1][0] - childConstUnions[0][0] * childConstUnions[1][2]; newConstArray[2] = childConstUnions[0][0] * childConstUnions[1][1] - childConstUnions[0][1] * childConstUnions[1][0]; break; case EOpFaceForward: // If dot(Nref, I) < 0 return N, otherwise return -N: Arguments are (N, I, Nref). dot = childConstUnions[1].dot(childConstUnions[2]); for (int comp = 0; comp < numComps; ++comp) { if (dot < 0.0) newConstArray[comp] = childConstUnions[0][comp]; else newConstArray[comp].setDConst(-childConstUnions[0][comp].getDConst()); } break; case EOpReflect: // I - 2 * dot(N, I) * N: Arguments are (I, N). dot = childConstUnions[0].dot(childConstUnions[1]); dot *= 2.0; for (int comp = 0; comp < numComps; ++comp) newConstArray[comp].setDConst(childConstUnions[0][comp].getDConst() - dot * childConstUnions[1][comp].getDConst()); break; case EOpRefract: { // Arguments are (I, N, eta). // k = 1.0 - eta * eta * (1.0 - dot(N, I) * dot(N, I)) // if (k < 0.0) // return dvec(0.0) // else // return eta * I - (eta * dot(N, I) + sqrt(k)) * N dot = childConstUnions[0].dot(childConstUnions[1]); double eta = childConstUnions[2][0].getDConst(); double k = 1.0 - eta * eta * (1.0 - dot * dot); if (k < 0.0) { for (int comp = 0; comp < numComps; ++comp) newConstArray[comp].setDConst(0.0); } else { for (int comp = 0; comp < numComps; ++comp) newConstArray[comp].setDConst(eta * childConstUnions[0][comp].getDConst() - (eta * dot + sqrt(k)) * childConstUnions[1][comp].getDConst()); } break; } case EOpOuterProduct: { int numRows = numComps; int numCols = children[1]->getAsConstantUnion()->getType().computeNumComponents(); for (int row = 0; row < numRows; ++row) for (int col = 0; col < numCols; ++col) newConstArray[col * numRows + row] = childConstUnions[0][row] * childConstUnions[1][col]; break; } default: return aggrNode; } } TIntermConstantUnion *newNode = new TIntermConstantUnion(newConstArray, aggrNode->getType()); newNode->getWritableType().getQualifier().storage = EvqConst; newNode->setLoc(aggrNode->getLoc()); return newNode; } bool TIntermediate::areAllChildConst(TIntermAggregate* aggrNode) { bool allConstant = true; // check if all the child nodes are constants so that they can be inserted into // the parent node if (aggrNode) { TIntermSequence& childSequenceVector = aggrNode->getSequence(); for (TIntermSequence::iterator p = childSequenceVector.begin(); p != childSequenceVector.end(); p++) { if (!(*p)->getAsTyped()->getAsConstantUnion()) return false; } } return allConstant; } TIntermTyped* TIntermediate::foldConstructor(TIntermAggregate* aggrNode) { bool error = false; TConstUnionArray unionArray(aggrNode->getType().computeNumComponents()); if (aggrNode->getSequence().size() == 1) error = parseConstTree(aggrNode, unionArray, aggrNode->getOp(), aggrNode->getType(), true); else error = parseConstTree(aggrNode, unionArray, aggrNode->getOp(), aggrNode->getType()); if (error) return aggrNode; return addConstantUnion(unionArray, aggrNode->getType(), aggrNode->getLoc()); } // // Constant folding of a bracket (array-style) dereference or struct-like dot // dereference. Can handle anything except a multi-character swizzle, though // all swizzles may go to foldSwizzle(). // TIntermTyped* TIntermediate::foldDereference(TIntermTyped* node, int index, const TSourceLoc& loc) { TType dereferencedType(node->getType(), index); dereferencedType.getQualifier().storage = EvqConst; TIntermTyped* result = nullptr; int size = dereferencedType.computeNumComponents(); // arrays, vectors, matrices, all use simple multiplicative math // while structures need to add up heterogeneous members int start; if (node->getType().isCoopMat()) start = 0; else if (node->isArray() || ! node->isStruct()) start = size * index; else { // it is a structure assert(node->isStruct()); start = 0; for (int i = 0; i < index; ++i) start += (*node->getType().getStruct())[i].type->computeNumComponents(); } result = addConstantUnion(TConstUnionArray(node->getAsConstantUnion()->getConstArray(), start, size), node->getType(), loc); if (result == nullptr) result = node; else result->setType(dereferencedType); return result; } // // Make a constant vector node or constant scalar node, representing a given // constant vector and constant swizzle into it. // TIntermTyped* TIntermediate::foldSwizzle(TIntermTyped* node, TSwizzleSelectors& selectors, const TSourceLoc& loc) { const TConstUnionArray& unionArray = node->getAsConstantUnion()->getConstArray(); TConstUnionArray constArray(selectors.size()); for (int i = 0; i < selectors.size(); i++) constArray[i] = unionArray[selectors[i]]; TIntermTyped* result = addConstantUnion(constArray, node->getType(), loc); if (result == nullptr) result = node; else result->setType(TType(node->getBasicType(), EvqConst, selectors.size())); return result; } } // end namespace glslang ================================================ FILE: src/libraries/glslang/glslang/MachineIndependent/InfoSink.cpp ================================================ // // Copyright (C) 2002-2005 3Dlabs Inc. Ltd. // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following // disclaimer in the documentation and/or other materials provided // with the distribution. // // Neither the name of 3Dlabs Inc. Ltd. nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // #include "../Include/InfoSink.h" #include namespace glslang { void TInfoSinkBase::append(const char* s) { if (outputStream & EString) { if (s == nullptr) sink.append("(null)"); else { checkMem(strlen(s)); sink.append(s); } } //#ifdef _WIN32 // if (outputStream & EDebugger) // OutputDebugString(s); //#endif if (outputStream & EStdOut) fprintf(stdout, "%s", s); } void TInfoSinkBase::append(int count, char c) { if (outputStream & EString) { checkMem(count); sink.append(count, c); } //#ifdef _WIN32 // if (outputStream & EDebugger) { // char str[2]; // str[0] = c; // str[1] = '\0'; // OutputDebugString(str); // } //#endif if (outputStream & EStdOut) fprintf(stdout, "%c", c); } void TInfoSinkBase::append(const TPersistString& t) { if (outputStream & EString) { checkMem(t.size()); sink.append(t); } //#ifdef _WIN32 // if (outputStream & EDebugger) // OutputDebugString(t.c_str()); //#endif if (outputStream & EStdOut) fprintf(stdout, "%s", t.c_str()); } void TInfoSinkBase::append(const TString& t) { if (outputStream & EString) { checkMem(t.size()); sink.append(t.c_str()); } //#ifdef _WIN32 // if (outputStream & EDebugger) // OutputDebugString(t.c_str()); //#endif if (outputStream & EStdOut) fprintf(stdout, "%s", t.c_str()); } } // end namespace glslang ================================================ FILE: src/libraries/glslang/glslang/MachineIndependent/Initialize.cpp ================================================ // // Copyright (C) 2002-2005 3Dlabs Inc. Ltd. // Copyright (C) 2012-2016 LunarG, Inc. // Copyright (C) 2015-2020 Google, Inc. // Copyright (C) 2017, 2022-2024 Arm Limited. // Modifications Copyright (C) 2020-2021 Advanced Micro Devices, Inc. All rights reserved. // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following // disclaimer in the documentation and/or other materials provided // with the distribution. // // Neither the name of 3Dlabs Inc. Ltd. nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // // // Create strings that declare built-in definitions, add built-ins programmatically // that cannot be expressed in the strings, and establish mappings between // built-in functions and operators. // // Where to put a built-in: // TBuiltIns::initialize(version,profile) context-independent textual built-ins; add them to the right string // TBuiltIns::initialize(resources,...) context-dependent textual built-ins; add them to the right string // TBuiltIns::identifyBuiltIns(...,symbolTable) context-independent programmatic additions/mappings to the symbol table, // including identifying what extensions are needed if a version does not allow a symbol // TBuiltIns::identifyBuiltIns(...,symbolTable, resources) context-dependent programmatic additions/mappings to the symbol table, // including identifying what extensions are needed if a version does not allow a symbol // #include #include #include "Initialize.h" #include "span.h" namespace glslang { // TODO: ARB_Compatability: do full extension support const bool ARBCompatibility = false; const bool ForwardCompatibility = true; namespace { // // A set of definitions for tabling of the built-in functions. // // Order matters here, as does correlation with the subsequent // "const int ..." declarations and the ArgType enumerants. const char* TypeString[] = { "bool", "bvec2", "bvec3", "bvec4", "float", "vec2", "vec3", "vec4", "int", "ivec2", "ivec3", "ivec4", "uint", "uvec2", "uvec3", "uvec4", }; const int TypeStringCount = sizeof(TypeString) / sizeof(char*); // number of entries in 'TypeString' const int TypeStringRowShift = 2; // shift amount to go downe one row in 'TypeString' const int TypeStringColumnMask = (1 << TypeStringRowShift) - 1; // reduce type to its column number in 'TypeString' const int TypeStringScalarMask = ~TypeStringColumnMask; // take type to its scalar column in 'TypeString' enum ArgType { // numbers hardcoded to correspond to 'TypeString'; order and value matter TypeB = 1 << 0, // Boolean TypeF = 1 << 1, // float 32 TypeI = 1 << 2, // int 32 TypeU = 1 << 3, // uint 32 TypeF16 = 1 << 4, // float 16 TypeF64 = 1 << 5, // float 64 TypeI8 = 1 << 6, // int 8 TypeI16 = 1 << 7, // int 16 TypeI64 = 1 << 8, // int 64 TypeU8 = 1 << 9, // uint 8 TypeU16 = 1 << 10, // uint 16 TypeU64 = 1 << 11, // uint 64 }; // Mixtures of the above, to help the function tables const ArgType TypeFI = static_cast(TypeF | TypeI); const ArgType TypeFIB = static_cast(TypeF | TypeI | TypeB); const ArgType TypeIU = static_cast(TypeI | TypeU); // The relationships between arguments and return type, whether anything is // output, or other unusual situations. enum ArgClass { ClassRegular = 0, // nothing special, just all vector widths with matching return type; traditional arithmetic ClassLS = 1 << 0, // the last argument is also held fixed as a (type-matched) scalar while the others cycle ClassXLS = 1 << 1, // the last argument is exclusively a (type-matched) scalar while the others cycle ClassLS2 = 1 << 2, // the last two arguments are held fixed as a (type-matched) scalar while the others cycle ClassFS = 1 << 3, // the first argument is held fixed as a (type-matched) scalar while the others cycle ClassFS2 = 1 << 4, // the first two arguments are held fixed as a (type-matched) scalar while the others cycle ClassLO = 1 << 5, // the last argument is an output ClassB = 1 << 6, // return type cycles through only bool/bvec, matching vector width of args ClassLB = 1 << 7, // last argument cycles through only bool/bvec, matching vector width of args ClassV1 = 1 << 8, // scalar only ClassFIO = 1 << 9, // first argument is inout ClassRS = 1 << 10, // the return is held scalar as the arguments cycle ClassNS = 1 << 11, // no scalar prototype ClassCVN = 1 << 12, // first argument is 'coherent volatile nontemporal' ClassFO = 1 << 13, // first argument is output ClassV3 = 1 << 14, // vec3 only }; // Mixtures of the above, to help the function tables const ArgClass ClassV1FIOCVN = (ArgClass)(ClassV1 | ClassFIO | ClassCVN); const ArgClass ClassBNS = (ArgClass)(ClassB | ClassNS); const ArgClass ClassRSNS = (ArgClass)(ClassRS | ClassNS); // A descriptor, for a single profile, of when something is available. // If the current profile does not match 'profile' mask below, the other fields // do not apply (nor validate). // profiles == EBadProfile is the end of an array of these struct Versioning { EProfile profiles; // the profile(s) (mask) that the following fields are valid for int minExtendedVersion; // earliest version when extensions are enabled; ignored if numExtensions is 0 int minCoreVersion; // earliest version function is in core; 0 means never int numExtensions; // how many extensions are in the 'extensions' list const char** extensions; // list of extension names enabling the function }; EProfile EDesktopProfile = static_cast(ENoProfile | ECoreProfile | ECompatibilityProfile); // Declare pointers to put into the table for versioning. const std::array Es300Desktop130Version = { Versioning{ EEsProfile, 0, 300, 0, nullptr }, Versioning{ EDesktopProfile, 0, 130, 0, nullptr }, }; const std::array Es310Desktop400Version = { Versioning{ EEsProfile, 0, 310, 0, nullptr }, Versioning{ EDesktopProfile, 0, 400, 0, nullptr }, }; const std::array Es310Desktop450Version = { Versioning{ EEsProfile, 0, 310, 0, nullptr }, Versioning{ EDesktopProfile, 0, 450, 0, nullptr }, }; // The main descriptor of what a set of function prototypes can look like, and // a pointer to extra versioning information, when needed. struct BuiltInFunction { TOperator op; // operator to map the name to const char* name; // function name int numArguments; // number of arguments (overloads with varying arguments need different entries) ArgType types; // ArgType mask ArgClass classes; // the ways this particular function entry manifests const span versioning; // An empty span means always a valid version }; // The tables can have the same built-in function name more than one time, // but the exact same prototype must be indicated at most once. // The prototypes that get declared are the union of all those indicated. // This is important when different releases add new prototypes for the same name. // It also also congnitively simpler tiling of the prototype space. // In practice, most names can be fully represented with one entry. // // Table is terminated by an OpNull TOperator. const std::array BaseFunctions = { // TOperator, name, arg-count, ArgType, ArgClass, versioning // --------- ---- --------- ------- -------- ---------- BuiltInFunction{ EOpRadians, "radians", 1, TypeF, ClassRegular, {} }, BuiltInFunction{ EOpDegrees, "degrees", 1, TypeF, ClassRegular, {} }, BuiltInFunction{ EOpSin, "sin", 1, TypeF, ClassRegular, {} }, BuiltInFunction{ EOpCos, "cos", 1, TypeF, ClassRegular, {} }, BuiltInFunction{ EOpTan, "tan", 1, TypeF, ClassRegular, {} }, BuiltInFunction{ EOpAsin, "asin", 1, TypeF, ClassRegular, {} }, BuiltInFunction{ EOpAcos, "acos", 1, TypeF, ClassRegular, {} }, BuiltInFunction{ EOpAtan, "atan", 2, TypeF, ClassRegular, {} }, BuiltInFunction{ EOpAtan, "atan", 1, TypeF, ClassRegular, {} }, BuiltInFunction{ EOpPow, "pow", 2, TypeF, ClassRegular, {} }, BuiltInFunction{ EOpExp, "exp", 1, TypeF, ClassRegular, {} }, BuiltInFunction{ EOpLog, "log", 1, TypeF, ClassRegular, {} }, BuiltInFunction{ EOpExp2, "exp2", 1, TypeF, ClassRegular, {} }, BuiltInFunction{ EOpLog2, "log2", 1, TypeF, ClassRegular, {} }, BuiltInFunction{ EOpSqrt, "sqrt", 1, TypeF, ClassRegular, {} }, BuiltInFunction{ EOpInverseSqrt, "inversesqrt", 1, TypeF, ClassRegular, {} }, BuiltInFunction{ EOpAbs, "abs", 1, TypeF, ClassRegular, {} }, BuiltInFunction{ EOpSign, "sign", 1, TypeF, ClassRegular, {} }, BuiltInFunction{ EOpFloor, "floor", 1, TypeF, ClassRegular, {} }, BuiltInFunction{ EOpCeil, "ceil", 1, TypeF, ClassRegular, {} }, BuiltInFunction{ EOpFract, "fract", 1, TypeF, ClassRegular, {} }, BuiltInFunction{ EOpMod, "mod", 2, TypeF, ClassLS, {} }, BuiltInFunction{ EOpMin, "min", 2, TypeF, ClassLS, {} }, BuiltInFunction{ EOpMax, "max", 2, TypeF, ClassLS, {} }, BuiltInFunction{ EOpClamp, "clamp", 3, TypeF, ClassLS2, {} }, BuiltInFunction{ EOpMix, "mix", 3, TypeF, ClassLS, {} }, BuiltInFunction{ EOpStep, "step", 2, TypeF, ClassFS, {} }, BuiltInFunction{ EOpSmoothStep, "smoothstep", 3, TypeF, ClassFS2, {} }, BuiltInFunction{ EOpNormalize, "normalize", 1, TypeF, ClassRegular, {} }, BuiltInFunction{ EOpFaceForward, "faceforward", 3, TypeF, ClassRegular, {} }, BuiltInFunction{ EOpReflect, "reflect", 2, TypeF, ClassRegular, {} }, BuiltInFunction{ EOpRefract, "refract", 3, TypeF, ClassXLS, {} }, BuiltInFunction{ EOpLength, "length", 1, TypeF, ClassRS, {} }, BuiltInFunction{ EOpDistance, "distance", 2, TypeF, ClassRS, {} }, BuiltInFunction{ EOpDot, "dot", 2, TypeF, ClassRS, {} }, BuiltInFunction{ EOpCross, "cross", 2, TypeF, ClassV3, {} }, BuiltInFunction{ EOpLessThan, "lessThan", 2, TypeFI, ClassBNS, {} }, BuiltInFunction{ EOpLessThanEqual, "lessThanEqual", 2, TypeFI, ClassBNS, {} }, BuiltInFunction{ EOpGreaterThan, "greaterThan", 2, TypeFI, ClassBNS, {} }, BuiltInFunction{ EOpGreaterThanEqual, "greaterThanEqual", 2, TypeFI, ClassBNS, {} }, BuiltInFunction{ EOpVectorEqual, "equal", 2, TypeFIB, ClassBNS, {} }, BuiltInFunction{ EOpVectorNotEqual, "notEqual", 2, TypeFIB, ClassBNS, {} }, BuiltInFunction{ EOpAny, "any", 1, TypeB, ClassRSNS, {} }, BuiltInFunction{ EOpAll, "all", 1, TypeB, ClassRSNS, {} }, BuiltInFunction{ EOpVectorLogicalNot, "not", 1, TypeB, ClassNS, {} }, BuiltInFunction{ EOpSinh, "sinh", 1, TypeF, ClassRegular, {Es300Desktop130Version} }, BuiltInFunction{ EOpCosh, "cosh", 1, TypeF, ClassRegular, {Es300Desktop130Version} }, BuiltInFunction{ EOpTanh, "tanh", 1, TypeF, ClassRegular, {Es300Desktop130Version} }, BuiltInFunction{ EOpAsinh, "asinh", 1, TypeF, ClassRegular, {Es300Desktop130Version} }, BuiltInFunction{ EOpAcosh, "acosh", 1, TypeF, ClassRegular, {Es300Desktop130Version} }, BuiltInFunction{ EOpAtanh, "atanh", 1, TypeF, ClassRegular, {Es300Desktop130Version} }, BuiltInFunction{ EOpAbs, "abs", 1, TypeI, ClassRegular, {Es300Desktop130Version} }, BuiltInFunction{ EOpSign, "sign", 1, TypeI, ClassRegular, {Es300Desktop130Version} }, BuiltInFunction{ EOpTrunc, "trunc", 1, TypeF, ClassRegular, {Es300Desktop130Version} }, BuiltInFunction{ EOpRound, "round", 1, TypeF, ClassRegular, {Es300Desktop130Version} }, BuiltInFunction{ EOpRoundEven, "roundEven", 1, TypeF, ClassRegular, {Es300Desktop130Version} }, BuiltInFunction{ EOpModf, "modf", 2, TypeF, ClassLO, {Es300Desktop130Version} }, BuiltInFunction{ EOpMin, "min", 2, TypeIU, ClassLS, {Es300Desktop130Version} }, BuiltInFunction{ EOpMax, "max", 2, TypeIU, ClassLS, {Es300Desktop130Version} }, BuiltInFunction{ EOpClamp, "clamp", 3, TypeIU, ClassLS2, {Es300Desktop130Version} }, BuiltInFunction{ EOpMix, "mix", 3, TypeF, ClassLB, {Es300Desktop130Version} }, BuiltInFunction{ EOpIsInf, "isinf", 1, TypeF, ClassB, {Es300Desktop130Version} }, BuiltInFunction{ EOpIsNan, "isnan", 1, TypeF, ClassB, {Es300Desktop130Version} }, BuiltInFunction{ EOpLessThan, "lessThan", 2, TypeU, ClassBNS, {Es300Desktop130Version} }, BuiltInFunction{ EOpLessThanEqual, "lessThanEqual", 2, TypeU, ClassBNS, {Es300Desktop130Version} }, BuiltInFunction{ EOpGreaterThan, "greaterThan", 2, TypeU, ClassBNS, {Es300Desktop130Version} }, BuiltInFunction{ EOpGreaterThanEqual, "greaterThanEqual", 2, TypeU, ClassBNS, {Es300Desktop130Version} }, BuiltInFunction{ EOpVectorEqual, "equal", 2, TypeU, ClassBNS, {Es300Desktop130Version} }, BuiltInFunction{ EOpVectorNotEqual, "notEqual", 2, TypeU, ClassBNS, {Es300Desktop130Version} }, BuiltInFunction{ EOpAtomicAdd, "atomicAdd", 2, TypeIU, ClassV1FIOCVN, {Es310Desktop400Version} }, BuiltInFunction{ EOpAtomicMin, "atomicMin", 2, TypeIU, ClassV1FIOCVN, {Es310Desktop400Version} }, BuiltInFunction{ EOpAtomicMax, "atomicMax", 2, TypeIU, ClassV1FIOCVN, {Es310Desktop400Version} }, BuiltInFunction{ EOpAtomicAnd, "atomicAnd", 2, TypeIU, ClassV1FIOCVN, {Es310Desktop400Version} }, BuiltInFunction{ EOpAtomicOr, "atomicOr", 2, TypeIU, ClassV1FIOCVN, {Es310Desktop400Version} }, BuiltInFunction{ EOpAtomicXor, "atomicXor", 2, TypeIU, ClassV1FIOCVN, {Es310Desktop400Version} }, BuiltInFunction{ EOpAtomicExchange, "atomicExchange", 2, TypeIU, ClassV1FIOCVN, {Es310Desktop400Version} }, BuiltInFunction{ EOpAtomicCompSwap, "atomicCompSwap", 3, TypeIU, ClassV1FIOCVN, {Es310Desktop400Version} }, BuiltInFunction{ EOpMix, "mix", 3, TypeB, ClassRegular, {Es310Desktop450Version} }, BuiltInFunction{ EOpMix, "mix", 3, TypeIU, ClassLB, {Es310Desktop450Version} }, }; const std::array DerivativeFunctions = { BuiltInFunction{ EOpDPdx, "dFdx", 1, TypeF, ClassRegular, {} }, BuiltInFunction{ EOpDPdy, "dFdy", 1, TypeF, ClassRegular, {} }, BuiltInFunction{ EOpFwidth, "fwidth", 1, TypeF, ClassRegular, {} }, }; // For functions declared some other way, but still use the table to relate to operator. struct CustomFunction { TOperator op; // operator to map the name to const char* name; // function name const span versioning; // An empty span means always a valid version }; const CustomFunction CustomFunctions[] = { { EOpBarrier, "barrier", {} }, { EOpMemoryBarrierShared, "memoryBarrierShared", {} }, { EOpGroupMemoryBarrier, "groupMemoryBarrier", {} }, { EOpMemoryBarrier, "memoryBarrier", {} }, { EOpMemoryBarrierBuffer, "memoryBarrierBuffer", {} }, { EOpPackSnorm2x16, "packSnorm2x16", {} }, { EOpUnpackSnorm2x16, "unpackSnorm2x16", {} }, { EOpPackUnorm2x16, "packUnorm2x16", {} }, { EOpUnpackUnorm2x16, "unpackUnorm2x16", {} }, { EOpPackHalf2x16, "packHalf2x16", {} }, { EOpUnpackHalf2x16, "unpackHalf2x16", {} }, { EOpMul, "matrixCompMult", {} }, { EOpOuterProduct, "outerProduct", {} }, { EOpTranspose, "transpose", {} }, { EOpDeterminant, "determinant", {} }, { EOpMatrixInverse, "inverse", {} }, { EOpFloatBitsToInt, "floatBitsToInt", {} }, { EOpFloatBitsToUint, "floatBitsToUint", {} }, { EOpIntBitsToFloat, "intBitsToFloat", {} }, { EOpUintBitsToFloat, "uintBitsToFloat", {} }, { EOpTextureQuerySize, "textureSize", {} }, { EOpTextureQueryLod, "textureQueryLod", {} }, { EOpTextureQueryLod, "textureQueryLOD", {} }, // extension GL_ARB_texture_query_lod { EOpTextureQueryLevels, "textureQueryLevels", {} }, { EOpTextureQuerySamples, "textureSamples", {} }, { EOpTexture, "texture", {} }, { EOpTextureProj, "textureProj", {} }, { EOpTextureLod, "textureLod", {} }, { EOpTextureOffset, "textureOffset", {} }, { EOpTextureFetch, "texelFetch", {} }, { EOpTextureFetchOffset, "texelFetchOffset", {} }, { EOpTextureProjOffset, "textureProjOffset", {} }, { EOpTextureLodOffset, "textureLodOffset", {} }, { EOpTextureProjLod, "textureProjLod", {} }, { EOpTextureProjLodOffset, "textureProjLodOffset", {} }, { EOpTextureGrad, "textureGrad", {} }, { EOpTextureGradOffset, "textureGradOffset", {} }, { EOpTextureProjGrad, "textureProjGrad", {} }, { EOpTextureProjGradOffset, "textureProjGradOffset", {} }, }; // For the given table of functions, add all the indicated prototypes for each // one, to be returned in the passed in decls. void AddTabledBuiltin(TString& decls, const BuiltInFunction& function) { const auto isScalarType = [](int type) { return (type & TypeStringColumnMask) == 0; }; // loop across these two: // 0: the varying arg set, and // 1: the fixed scalar args const ArgClass ClassFixed = (ArgClass)(ClassLS | ClassXLS | ClassLS2 | ClassFS | ClassFS2); for (int fixed = 0; fixed < ((function.classes & ClassFixed) > 0 ? 2 : 1); ++fixed) { if (fixed == 0 && (function.classes & ClassXLS)) continue; // walk the type strings in TypeString[] for (int type = 0; type < TypeStringCount; ++type) { // skip types not selected: go from type to row number to type bit if ((function.types & (1 << (type >> TypeStringRowShift))) == 0) continue; // if we aren't on a scalar, and should be, skip if ((function.classes & ClassV1) && !isScalarType(type)) continue; // if we aren't on a 3-vector, and should be, skip if ((function.classes & ClassV3) && (type & TypeStringColumnMask) != 2) continue; // skip replication of all arg scalars between the varying arg set and the fixed args if (fixed == 1 && type == (type & TypeStringScalarMask) && (function.classes & ClassXLS) == 0) continue; // skip scalars when we are told to if ((function.classes & ClassNS) && isScalarType(type)) continue; // return type if (function.classes & ClassB) decls.append(TypeString[type & TypeStringColumnMask]); else if (function.classes & ClassRS) decls.append(TypeString[type & TypeStringScalarMask]); else decls.append(TypeString[type]); decls.append(" "); decls.append(function.name); decls.append("("); // arguments for (int arg = 0; arg < function.numArguments; ++arg) { if (arg == function.numArguments - 1 && (function.classes & ClassLO)) decls.append("out "); if (arg == 0) { if (function.classes & ClassCVN) decls.append("coherent volatile nontemporal "); if (function.classes & ClassFIO) decls.append("inout "); if (function.classes & ClassFO) decls.append("out "); } if ((function.classes & ClassLB) && arg == function.numArguments - 1) decls.append(TypeString[type & TypeStringColumnMask]); else if (fixed && ((arg == function.numArguments - 1 && (function.classes & (ClassLS | ClassXLS | ClassLS2))) || (arg == function.numArguments - 2 && (function.classes & ClassLS2)) || (arg == 0 && (function.classes & (ClassFS | ClassFS2))) || (arg == 1 && (function.classes & ClassFS2)))) decls.append(TypeString[type & TypeStringScalarMask]); else decls.append(TypeString[type]); if (arg < function.numArguments - 1) decls.append(","); } decls.append(");\n"); } } } // See if the tabled versioning information allows the current version. bool ValidVersion(const BuiltInFunction& function, int version, EProfile profile, const SpvVersion& /* spVersion */) { // nullptr means always valid if (function.versioning.empty()) return true; // check for what is said about our current profile for (const auto& v : function.versioning) { if ((v.profiles & profile) != 0) { if (v.minCoreVersion <= version || (v.numExtensions > 0 && v.minExtendedVersion <= version)) return true; } } return false; } // Relate a single table of built-ins to their AST operator. // This can get called redundantly (especially for the common built-ins, when // called once per stage). This is a performance issue only, not a correctness // concern. It is done for quality arising from simplicity, as there are subtleties // to get correct if instead trying to do it surgically. template void RelateTabledBuiltins(const FunctionContainer& functions, TSymbolTable& symbolTable) { for (const auto& fn : functions) { symbolTable.relateToOperator(fn.name, fn.op); } } } // end anonymous namespace // Add declarations for all tables of built-in functions. void TBuiltIns::addTabledBuiltins(int version, EProfile profile, const SpvVersion& spvVersion) { const auto forEachFunction = [&](TString& decls, const span& functions) { for (const auto& fn : functions) { if (ValidVersion(fn, version, profile, spvVersion)) AddTabledBuiltin(decls, fn); } }; forEachFunction(commonBuiltins, BaseFunctions); forEachFunction(stageBuiltins[EShLangFragment], DerivativeFunctions); if ((profile == EEsProfile && version >= 320) || (profile != EEsProfile && version >= 450)) forEachFunction(stageBuiltins[EShLangCompute], DerivativeFunctions); } // Relate all tables of built-ins to the AST operators. void TBuiltIns::relateTabledBuiltins(int /* version */, EProfile /* profile */, const SpvVersion& /* spvVersion */, EShLanguage /* stage */, TSymbolTable& symbolTable) { RelateTabledBuiltins(BaseFunctions, symbolTable); RelateTabledBuiltins(DerivativeFunctions, symbolTable); RelateTabledBuiltins(CustomFunctions, symbolTable); } inline bool IncludeLegacy(int version, EProfile profile, const SpvVersion& spvVersion) { return profile != EEsProfile && (version <= 130 || (spvVersion.spv == 0 && version == 140 && ARBCompatibility) || profile == ECompatibilityProfile); } // Construct TBuiltInParseables base class. This can be used for language-common constructs. TBuiltInParseables::TBuiltInParseables() { } // Destroy TBuiltInParseables. TBuiltInParseables::~TBuiltInParseables() { } TBuiltIns::TBuiltIns() { // Set up textual representations for making all the permutations // of texturing/imaging functions. prefixes[EbtFloat] = ""; prefixes[EbtInt] = "i"; prefixes[EbtUint] = "u"; prefixes[EbtFloat16] = "f16"; prefixes[EbtInt8] = "i8"; prefixes[EbtUint8] = "u8"; prefixes[EbtInt16] = "i16"; prefixes[EbtUint16] = "u16"; prefixes[EbtInt64] = "i64"; prefixes[EbtUint64] = "u64"; postfixes[2] = "2"; postfixes[3] = "3"; postfixes[4] = "4"; // Map from symbolic class of texturing dimension to numeric dimensions. dimMap[Esd2D] = 2; dimMap[Esd3D] = 3; dimMap[EsdCube] = 3; dimMap[Esd1D] = 1; dimMap[EsdRect] = 2; dimMap[EsdBuffer] = 1; dimMap[EsdSubpass] = 2; // potentially unused for now dimMap[EsdAttachmentEXT] = 2; // potentially unused for now } TBuiltIns::~TBuiltIns() { } // // Add all context-independent built-in functions and variables that are present // for the given version and profile. Share common ones across stages, otherwise // make stage-specific entries. // // Most built-ins variables can be added as simple text strings. Some need to // be added programmatically, which is done later in IdentifyBuiltIns() below. // void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvVersion) { addTabledBuiltins(version, profile, spvVersion); //============================================================================ // // Prototypes for built-in functions used repeatly by different shaders // //============================================================================ // // Derivatives Functions. // TString derivativeControls ( "float dFdxFine(float p);" "vec2 dFdxFine(vec2 p);" "vec3 dFdxFine(vec3 p);" "vec4 dFdxFine(vec4 p);" "float dFdyFine(float p);" "vec2 dFdyFine(vec2 p);" "vec3 dFdyFine(vec3 p);" "vec4 dFdyFine(vec4 p);" "float fwidthFine(float p);" "vec2 fwidthFine(vec2 p);" "vec3 fwidthFine(vec3 p);" "vec4 fwidthFine(vec4 p);" "float dFdxCoarse(float p);" "vec2 dFdxCoarse(vec2 p);" "vec3 dFdxCoarse(vec3 p);" "vec4 dFdxCoarse(vec4 p);" "float dFdyCoarse(float p);" "vec2 dFdyCoarse(vec2 p);" "vec3 dFdyCoarse(vec3 p);" "vec4 dFdyCoarse(vec4 p);" "float fwidthCoarse(float p);" "vec2 fwidthCoarse(vec2 p);" "vec3 fwidthCoarse(vec3 p);" "vec4 fwidthCoarse(vec4 p);" ); TString derivativesAndControl16bits ( "float16_t dFdx(float16_t);" "f16vec2 dFdx(f16vec2);" "f16vec3 dFdx(f16vec3);" "f16vec4 dFdx(f16vec4);" "float16_t dFdy(float16_t);" "f16vec2 dFdy(f16vec2);" "f16vec3 dFdy(f16vec3);" "f16vec4 dFdy(f16vec4);" "float16_t dFdxFine(float16_t);" "f16vec2 dFdxFine(f16vec2);" "f16vec3 dFdxFine(f16vec3);" "f16vec4 dFdxFine(f16vec4);" "float16_t dFdyFine(float16_t);" "f16vec2 dFdyFine(f16vec2);" "f16vec3 dFdyFine(f16vec3);" "f16vec4 dFdyFine(f16vec4);" "float16_t dFdxCoarse(float16_t);" "f16vec2 dFdxCoarse(f16vec2);" "f16vec3 dFdxCoarse(f16vec3);" "f16vec4 dFdxCoarse(f16vec4);" "float16_t dFdyCoarse(float16_t);" "f16vec2 dFdyCoarse(f16vec2);" "f16vec3 dFdyCoarse(f16vec3);" "f16vec4 dFdyCoarse(f16vec4);" "float16_t fwidth(float16_t);" "f16vec2 fwidth(f16vec2);" "f16vec3 fwidth(f16vec3);" "f16vec4 fwidth(f16vec4);" "float16_t fwidthFine(float16_t);" "f16vec2 fwidthFine(f16vec2);" "f16vec3 fwidthFine(f16vec3);" "f16vec4 fwidthFine(f16vec4);" "float16_t fwidthCoarse(float16_t);" "f16vec2 fwidthCoarse(f16vec2);" "f16vec3 fwidthCoarse(f16vec3);" "f16vec4 fwidthCoarse(f16vec4);" ); TString derivativesAndControl64bits ( "float64_t dFdx(float64_t);" "f64vec2 dFdx(f64vec2);" "f64vec3 dFdx(f64vec3);" "f64vec4 dFdx(f64vec4);" "float64_t dFdy(float64_t);" "f64vec2 dFdy(f64vec2);" "f64vec3 dFdy(f64vec3);" "f64vec4 dFdy(f64vec4);" "float64_t dFdxFine(float64_t);" "f64vec2 dFdxFine(f64vec2);" "f64vec3 dFdxFine(f64vec3);" "f64vec4 dFdxFine(f64vec4);" "float64_t dFdyFine(float64_t);" "f64vec2 dFdyFine(f64vec2);" "f64vec3 dFdyFine(f64vec3);" "f64vec4 dFdyFine(f64vec4);" "float64_t dFdxCoarse(float64_t);" "f64vec2 dFdxCoarse(f64vec2);" "f64vec3 dFdxCoarse(f64vec3);" "f64vec4 dFdxCoarse(f64vec4);" "float64_t dFdyCoarse(float64_t);" "f64vec2 dFdyCoarse(f64vec2);" "f64vec3 dFdyCoarse(f64vec3);" "f64vec4 dFdyCoarse(f64vec4);" "float64_t fwidth(float64_t);" "f64vec2 fwidth(f64vec2);" "f64vec3 fwidth(f64vec3);" "f64vec4 fwidth(f64vec4);" "float64_t fwidthFine(float64_t);" "f64vec2 fwidthFine(f64vec2);" "f64vec3 fwidthFine(f64vec3);" "f64vec4 fwidthFine(f64vec4);" "float64_t fwidthCoarse(float64_t);" "f64vec2 fwidthCoarse(f64vec2);" "f64vec3 fwidthCoarse(f64vec3);" "f64vec4 fwidthCoarse(f64vec4);" ); //============================================================================ // // Prototypes for built-in functions seen by both vertex and fragment shaders. // //============================================================================ // // double functions added to desktop 4.00, but not fma, frexp, ldexp, or pack/unpack // if (profile != EEsProfile && version >= 150) { // ARB_gpu_shader_fp64 commonBuiltins.append( "double sqrt(double);" "dvec2 sqrt(dvec2);" "dvec3 sqrt(dvec3);" "dvec4 sqrt(dvec4);" "double inversesqrt(double);" "dvec2 inversesqrt(dvec2);" "dvec3 inversesqrt(dvec3);" "dvec4 inversesqrt(dvec4);" "double abs(double);" "dvec2 abs(dvec2);" "dvec3 abs(dvec3);" "dvec4 abs(dvec4);" "double sign(double);" "dvec2 sign(dvec2);" "dvec3 sign(dvec3);" "dvec4 sign(dvec4);" "double floor(double);" "dvec2 floor(dvec2);" "dvec3 floor(dvec3);" "dvec4 floor(dvec4);" "double trunc(double);" "dvec2 trunc(dvec2);" "dvec3 trunc(dvec3);" "dvec4 trunc(dvec4);" "double round(double);" "dvec2 round(dvec2);" "dvec3 round(dvec3);" "dvec4 round(dvec4);" "double roundEven(double);" "dvec2 roundEven(dvec2);" "dvec3 roundEven(dvec3);" "dvec4 roundEven(dvec4);" "double ceil(double);" "dvec2 ceil(dvec2);" "dvec3 ceil(dvec3);" "dvec4 ceil(dvec4);" "double fract(double);" "dvec2 fract(dvec2);" "dvec3 fract(dvec3);" "dvec4 fract(dvec4);" "double mod(double, double);" "dvec2 mod(dvec2 , double);" "dvec3 mod(dvec3 , double);" "dvec4 mod(dvec4 , double);" "dvec2 mod(dvec2 , dvec2);" "dvec3 mod(dvec3 , dvec3);" "dvec4 mod(dvec4 , dvec4);" "double modf(double, out double);" "dvec2 modf(dvec2, out dvec2);" "dvec3 modf(dvec3, out dvec3);" "dvec4 modf(dvec4, out dvec4);" "double min(double, double);" "dvec2 min(dvec2, double);" "dvec3 min(dvec3, double);" "dvec4 min(dvec4, double);" "dvec2 min(dvec2, dvec2);" "dvec3 min(dvec3, dvec3);" "dvec4 min(dvec4, dvec4);" "double max(double, double);" "dvec2 max(dvec2 , double);" "dvec3 max(dvec3 , double);" "dvec4 max(dvec4 , double);" "dvec2 max(dvec2 , dvec2);" "dvec3 max(dvec3 , dvec3);" "dvec4 max(dvec4 , dvec4);" "double clamp(double, double, double);" "dvec2 clamp(dvec2 , double, double);" "dvec3 clamp(dvec3 , double, double);" "dvec4 clamp(dvec4 , double, double);" "dvec2 clamp(dvec2 , dvec2 , dvec2);" "dvec3 clamp(dvec3 , dvec3 , dvec3);" "dvec4 clamp(dvec4 , dvec4 , dvec4);" "double mix(double, double, double);" "dvec2 mix(dvec2, dvec2, double);" "dvec3 mix(dvec3, dvec3, double);" "dvec4 mix(dvec4, dvec4, double);" "dvec2 mix(dvec2, dvec2, dvec2);" "dvec3 mix(dvec3, dvec3, dvec3);" "dvec4 mix(dvec4, dvec4, dvec4);" "double mix(double, double, bool);" "dvec2 mix(dvec2, dvec2, bvec2);" "dvec3 mix(dvec3, dvec3, bvec3);" "dvec4 mix(dvec4, dvec4, bvec4);" "double step(double, double);" "dvec2 step(dvec2 , dvec2);" "dvec3 step(dvec3 , dvec3);" "dvec4 step(dvec4 , dvec4);" "dvec2 step(double, dvec2);" "dvec3 step(double, dvec3);" "dvec4 step(double, dvec4);" "double smoothstep(double, double, double);" "dvec2 smoothstep(dvec2 , dvec2 , dvec2);" "dvec3 smoothstep(dvec3 , dvec3 , dvec3);" "dvec4 smoothstep(dvec4 , dvec4 , dvec4);" "dvec2 smoothstep(double, double, dvec2);" "dvec3 smoothstep(double, double, dvec3);" "dvec4 smoothstep(double, double, dvec4);" "bool isnan(double);" "bvec2 isnan(dvec2);" "bvec3 isnan(dvec3);" "bvec4 isnan(dvec4);" "bool isinf(double);" "bvec2 isinf(dvec2);" "bvec3 isinf(dvec3);" "bvec4 isinf(dvec4);" "double length(double);" "double length(dvec2);" "double length(dvec3);" "double length(dvec4);" "double distance(double, double);" "double distance(dvec2 , dvec2);" "double distance(dvec3 , dvec3);" "double distance(dvec4 , dvec4);" "double dot(double, double);" "double dot(dvec2 , dvec2);" "double dot(dvec3 , dvec3);" "double dot(dvec4 , dvec4);" "dvec3 cross(dvec3, dvec3);" "double normalize(double);" "dvec2 normalize(dvec2);" "dvec3 normalize(dvec3);" "dvec4 normalize(dvec4);" "double faceforward(double, double, double);" "dvec2 faceforward(dvec2, dvec2, dvec2);" "dvec3 faceforward(dvec3, dvec3, dvec3);" "dvec4 faceforward(dvec4, dvec4, dvec4);" "double reflect(double, double);" "dvec2 reflect(dvec2 , dvec2 );" "dvec3 reflect(dvec3 , dvec3 );" "dvec4 reflect(dvec4 , dvec4 );" "double refract(double, double, double);" "dvec2 refract(dvec2 , dvec2 , double);" "dvec3 refract(dvec3 , dvec3 , double);" "dvec4 refract(dvec4 , dvec4 , double);" "dmat2 matrixCompMult(dmat2, dmat2);" "dmat3 matrixCompMult(dmat3, dmat3);" "dmat4 matrixCompMult(dmat4, dmat4);" "dmat2x3 matrixCompMult(dmat2x3, dmat2x3);" "dmat2x4 matrixCompMult(dmat2x4, dmat2x4);" "dmat3x2 matrixCompMult(dmat3x2, dmat3x2);" "dmat3x4 matrixCompMult(dmat3x4, dmat3x4);" "dmat4x2 matrixCompMult(dmat4x2, dmat4x2);" "dmat4x3 matrixCompMult(dmat4x3, dmat4x3);" "dmat2 outerProduct(dvec2, dvec2);" "dmat3 outerProduct(dvec3, dvec3);" "dmat4 outerProduct(dvec4, dvec4);" "dmat2x3 outerProduct(dvec3, dvec2);" "dmat3x2 outerProduct(dvec2, dvec3);" "dmat2x4 outerProduct(dvec4, dvec2);" "dmat4x2 outerProduct(dvec2, dvec4);" "dmat3x4 outerProduct(dvec4, dvec3);" "dmat4x3 outerProduct(dvec3, dvec4);" "dmat2 transpose(dmat2);" "dmat3 transpose(dmat3);" "dmat4 transpose(dmat4);" "dmat2x3 transpose(dmat3x2);" "dmat3x2 transpose(dmat2x3);" "dmat2x4 transpose(dmat4x2);" "dmat4x2 transpose(dmat2x4);" "dmat3x4 transpose(dmat4x3);" "dmat4x3 transpose(dmat3x4);" "double determinant(dmat2);" "double determinant(dmat3);" "double determinant(dmat4);" "dmat2 inverse(dmat2);" "dmat3 inverse(dmat3);" "dmat4 inverse(dmat4);" "bvec2 lessThan(dvec2, dvec2);" "bvec3 lessThan(dvec3, dvec3);" "bvec4 lessThan(dvec4, dvec4);" "bvec2 lessThanEqual(dvec2, dvec2);" "bvec3 lessThanEqual(dvec3, dvec3);" "bvec4 lessThanEqual(dvec4, dvec4);" "bvec2 greaterThan(dvec2, dvec2);" "bvec3 greaterThan(dvec3, dvec3);" "bvec4 greaterThan(dvec4, dvec4);" "bvec2 greaterThanEqual(dvec2, dvec2);" "bvec3 greaterThanEqual(dvec3, dvec3);" "bvec4 greaterThanEqual(dvec4, dvec4);" "bvec2 equal(dvec2, dvec2);" "bvec3 equal(dvec3, dvec3);" "bvec4 equal(dvec4, dvec4);" "bvec2 notEqual(dvec2, dvec2);" "bvec3 notEqual(dvec3, dvec3);" "bvec4 notEqual(dvec4, dvec4);" "\n"); } if (profile == EEsProfile && version >= 310) { // Explicit Types commonBuiltins.append( "float64_t sqrt(float64_t);" "f64vec2 sqrt(f64vec2);" "f64vec3 sqrt(f64vec3);" "f64vec4 sqrt(f64vec4);" "float64_t inversesqrt(float64_t);" "f64vec2 inversesqrt(f64vec2);" "f64vec3 inversesqrt(f64vec3);" "f64vec4 inversesqrt(f64vec4);" "float64_t abs(float64_t);" "f64vec2 abs(f64vec2);" "f64vec3 abs(f64vec3);" "f64vec4 abs(f64vec4);" "float64_t sign(float64_t);" "f64vec2 sign(f64vec2);" "f64vec3 sign(f64vec3);" "f64vec4 sign(f64vec4);" "float64_t floor(float64_t);" "f64vec2 floor(f64vec2);" "f64vec3 floor(f64vec3);" "f64vec4 floor(f64vec4);" "float64_t trunc(float64_t);" "f64vec2 trunc(f64vec2);" "f64vec3 trunc(f64vec3);" "f64vec4 trunc(f64vec4);" "float64_t round(float64_t);" "f64vec2 round(f64vec2);" "f64vec3 round(f64vec3);" "f64vec4 round(f64vec4);" "float64_t roundEven(float64_t);" "f64vec2 roundEven(f64vec2);" "f64vec3 roundEven(f64vec3);" "f64vec4 roundEven(f64vec4);" "float64_t ceil(float64_t);" "f64vec2 ceil(f64vec2);" "f64vec3 ceil(f64vec3);" "f64vec4 ceil(f64vec4);" "float64_t fract(float64_t);" "f64vec2 fract(f64vec2);" "f64vec3 fract(f64vec3);" "f64vec4 fract(f64vec4);" "float64_t mod(float64_t, float64_t);" "f64vec2 mod(f64vec2 , float64_t);" "f64vec3 mod(f64vec3 , float64_t);" "f64vec4 mod(f64vec4 , float64_t);" "f64vec2 mod(f64vec2 , f64vec2);" "f64vec3 mod(f64vec3 , f64vec3);" "f64vec4 mod(f64vec4 , f64vec4);" "float64_t modf(float64_t, out float64_t);" "f64vec2 modf(f64vec2, out f64vec2);" "f64vec3 modf(f64vec3, out f64vec3);" "f64vec4 modf(f64vec4, out f64vec4);" "float64_t min(float64_t, float64_t);" "f64vec2 min(f64vec2, float64_t);" "f64vec3 min(f64vec3, float64_t);" "f64vec4 min(f64vec4, float64_t);" "f64vec2 min(f64vec2, f64vec2);" "f64vec3 min(f64vec3, f64vec3);" "f64vec4 min(f64vec4, f64vec4);" "float64_t max(float64_t, float64_t);" "f64vec2 max(f64vec2 , float64_t);" "f64vec3 max(f64vec3 , float64_t);" "f64vec4 max(f64vec4 , float64_t);" "f64vec2 max(f64vec2 , f64vec2);" "f64vec3 max(f64vec3 , f64vec3);" "f64vec4 max(f64vec4 , f64vec4);" "float64_t clamp(float64_t, float64_t, float64_t);" "f64vec2 clamp(f64vec2 , float64_t, float64_t);" "f64vec3 clamp(f64vec3 , float64_t, float64_t);" "f64vec4 clamp(f64vec4 , float64_t, float64_t);" "f64vec2 clamp(f64vec2 , f64vec2 , f64vec2);" "f64vec3 clamp(f64vec3 , f64vec3 , f64vec3);" "f64vec4 clamp(f64vec4 , f64vec4 , f64vec4);" "float64_t mix(float64_t, float64_t, float64_t);" "f64vec2 mix(f64vec2, f64vec2, float64_t);" "f64vec3 mix(f64vec3, f64vec3, float64_t);" "f64vec4 mix(f64vec4, f64vec4, float64_t);" "f64vec2 mix(f64vec2, f64vec2, f64vec2);" "f64vec3 mix(f64vec3, f64vec3, f64vec3);" "f64vec4 mix(f64vec4, f64vec4, f64vec4);" "float64_t mix(float64_t, float64_t, bool);" "f64vec2 mix(f64vec2, f64vec2, bvec2);" "f64vec3 mix(f64vec3, f64vec3, bvec3);" "f64vec4 mix(f64vec4, f64vec4, bvec4);" "float64_t step(float64_t, float64_t);" "f64vec2 step(f64vec2 , f64vec2);" "f64vec3 step(f64vec3 , f64vec3);" "f64vec4 step(f64vec4 , f64vec4);" "f64vec2 step(float64_t, f64vec2);" "f64vec3 step(float64_t, f64vec3);" "f64vec4 step(float64_t, f64vec4);" "float64_t smoothstep(float64_t, float64_t, float64_t);" "f64vec2 smoothstep(f64vec2 , f64vec2 , f64vec2);" "f64vec3 smoothstep(f64vec3 , f64vec3 , f64vec3);" "f64vec4 smoothstep(f64vec4 , f64vec4 , f64vec4);" "f64vec2 smoothstep(float64_t, float64_t, f64vec2);" "f64vec3 smoothstep(float64_t, float64_t, f64vec3);" "f64vec4 smoothstep(float64_t, float64_t, f64vec4);" "float64_t length(float64_t);" "float64_t length(f64vec2);" "float64_t length(f64vec3);" "float64_t length(f64vec4);" "float64_t distance(float64_t, float64_t);" "float64_t distance(f64vec2 , f64vec2);" "float64_t distance(f64vec3 , f64vec3);" "float64_t distance(f64vec4 , f64vec4);" "float64_t dot(float64_t, float64_t);" "float64_t dot(f64vec2 , f64vec2);" "float64_t dot(f64vec3 , f64vec3);" "float64_t dot(f64vec4 , f64vec4);" "f64vec3 cross(f64vec3, f64vec3);" "float64_t normalize(float64_t);" "f64vec2 normalize(f64vec2);" "f64vec3 normalize(f64vec3);" "f64vec4 normalize(f64vec4);" "float64_t faceforward(float64_t, float64_t, float64_t);" "f64vec2 faceforward(f64vec2, f64vec2, f64vec2);" "f64vec3 faceforward(f64vec3, f64vec3, f64vec3);" "f64vec4 faceforward(f64vec4, f64vec4, f64vec4);" "float64_t reflect(float64_t, float64_t);" "f64vec2 reflect(f64vec2 , f64vec2 );" "f64vec3 reflect(f64vec3 , f64vec3 );" "f64vec4 reflect(f64vec4 , f64vec4 );" "float64_t refract(float64_t, float64_t, float64_t);" "f64vec2 refract(f64vec2 , f64vec2 , float64_t);" "f64vec3 refract(f64vec3 , f64vec3 , float64_t);" "f64vec4 refract(f64vec4 , f64vec4 , float64_t);" "f64mat2 matrixCompMult(f64mat2, f64mat2);" "f64mat3 matrixCompMult(f64mat3, f64mat3);" "f64mat4 matrixCompMult(f64mat4, f64mat4);" "f64mat2x3 matrixCompMult(f64mat2x3, f64mat2x3);" "f64mat2x4 matrixCompMult(f64mat2x4, f64mat2x4);" "f64mat3x2 matrixCompMult(f64mat3x2, f64mat3x2);" "f64mat3x4 matrixCompMult(f64mat3x4, f64mat3x4);" "f64mat4x2 matrixCompMult(f64mat4x2, f64mat4x2);" "f64mat4x3 matrixCompMult(f64mat4x3, f64mat4x3);" "f64mat2 outerProduct(f64vec2, f64vec2);" "f64mat3 outerProduct(f64vec3, f64vec3);" "f64mat4 outerProduct(f64vec4, f64vec4);" "f64mat2x3 outerProduct(f64vec3, f64vec2);" "f64mat3x2 outerProduct(f64vec2, f64vec3);" "f64mat2x4 outerProduct(f64vec4, f64vec2);" "f64mat4x2 outerProduct(f64vec2, f64vec4);" "f64mat3x4 outerProduct(f64vec4, f64vec3);" "f64mat4x3 outerProduct(f64vec3, f64vec4);" "f64mat2 transpose(f64mat2);" "f64mat3 transpose(f64mat3);" "f64mat4 transpose(f64mat4);" "f64mat2x3 transpose(f64mat3x2);" "f64mat3x2 transpose(f64mat2x3);" "f64mat2x4 transpose(f64mat4x2);" "f64mat4x2 transpose(f64mat2x4);" "f64mat3x4 transpose(f64mat4x3);" "f64mat4x3 transpose(f64mat3x4);" "float64_t determinant(f64mat2);" "float64_t determinant(f64mat3);" "float64_t determinant(f64mat4);" "f64mat2 inverse(f64mat2);" "f64mat3 inverse(f64mat3);" "f64mat4 inverse(f64mat4);" "\n"); } if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 310)) { commonBuiltins.append( "int64_t abs(int64_t);" "i64vec2 abs(i64vec2);" "i64vec3 abs(i64vec3);" "i64vec4 abs(i64vec4);" "int64_t sign(int64_t);" "i64vec2 sign(i64vec2);" "i64vec3 sign(i64vec3);" "i64vec4 sign(i64vec4);" "int64_t min(int64_t, int64_t);" "i64vec2 min(i64vec2, int64_t);" "i64vec3 min(i64vec3, int64_t);" "i64vec4 min(i64vec4, int64_t);" "i64vec2 min(i64vec2, i64vec2);" "i64vec3 min(i64vec3, i64vec3);" "i64vec4 min(i64vec4, i64vec4);" "uint64_t min(uint64_t, uint64_t);" "u64vec2 min(u64vec2, uint64_t);" "u64vec3 min(u64vec3, uint64_t);" "u64vec4 min(u64vec4, uint64_t);" "u64vec2 min(u64vec2, u64vec2);" "u64vec3 min(u64vec3, u64vec3);" "u64vec4 min(u64vec4, u64vec4);" "int64_t max(int64_t, int64_t);" "i64vec2 max(i64vec2, int64_t);" "i64vec3 max(i64vec3, int64_t);" "i64vec4 max(i64vec4, int64_t);" "i64vec2 max(i64vec2, i64vec2);" "i64vec3 max(i64vec3, i64vec3);" "i64vec4 max(i64vec4, i64vec4);" "uint64_t max(uint64_t, uint64_t);" "u64vec2 max(u64vec2, uint64_t);" "u64vec3 max(u64vec3, uint64_t);" "u64vec4 max(u64vec4, uint64_t);" "u64vec2 max(u64vec2, u64vec2);" "u64vec3 max(u64vec3, u64vec3);" "u64vec4 max(u64vec4, u64vec4);" "int64_t clamp(int64_t, int64_t, int64_t);" "i64vec2 clamp(i64vec2, int64_t, int64_t);" "i64vec3 clamp(i64vec3, int64_t, int64_t);" "i64vec4 clamp(i64vec4, int64_t, int64_t);" "i64vec2 clamp(i64vec2, i64vec2, i64vec2);" "i64vec3 clamp(i64vec3, i64vec3, i64vec3);" "i64vec4 clamp(i64vec4, i64vec4, i64vec4);" "uint64_t clamp(uint64_t, uint64_t, uint64_t);" "u64vec2 clamp(u64vec2, uint64_t, uint64_t);" "u64vec3 clamp(u64vec3, uint64_t, uint64_t);" "u64vec4 clamp(u64vec4, uint64_t, uint64_t);" "u64vec2 clamp(u64vec2, u64vec2, u64vec2);" "u64vec3 clamp(u64vec3, u64vec3, u64vec3);" "u64vec4 clamp(u64vec4, u64vec4, u64vec4);" "int64_t mix(int64_t, int64_t, bool);" "i64vec2 mix(i64vec2, i64vec2, bvec2);" "i64vec3 mix(i64vec3, i64vec3, bvec3);" "i64vec4 mix(i64vec4, i64vec4, bvec4);" "uint64_t mix(uint64_t, uint64_t, bool);" "u64vec2 mix(u64vec2, u64vec2, bvec2);" "u64vec3 mix(u64vec3, u64vec3, bvec3);" "u64vec4 mix(u64vec4, u64vec4, bvec4);" "int64_t doubleBitsToInt64(float64_t);" "i64vec2 doubleBitsToInt64(f64vec2);" "i64vec3 doubleBitsToInt64(f64vec3);" "i64vec4 doubleBitsToInt64(f64vec4);" "uint64_t doubleBitsToUint64(float64_t);" "u64vec2 doubleBitsToUint64(f64vec2);" "u64vec3 doubleBitsToUint64(f64vec3);" "u64vec4 doubleBitsToUint64(f64vec4);" "float64_t int64BitsToDouble(int64_t);" "f64vec2 int64BitsToDouble(i64vec2);" "f64vec3 int64BitsToDouble(i64vec3);" "f64vec4 int64BitsToDouble(i64vec4);" "float64_t uint64BitsToDouble(uint64_t);" "f64vec2 uint64BitsToDouble(u64vec2);" "f64vec3 uint64BitsToDouble(u64vec3);" "f64vec4 uint64BitsToDouble(u64vec4);" "int64_t packInt2x32(ivec2);" "uint64_t packUint2x32(uvec2);" "ivec2 unpackInt2x32(int64_t);" "uvec2 unpackUint2x32(uint64_t);" "bvec2 lessThan(i64vec2, i64vec2);" "bvec3 lessThan(i64vec3, i64vec3);" "bvec4 lessThan(i64vec4, i64vec4);" "bvec2 lessThan(u64vec2, u64vec2);" "bvec3 lessThan(u64vec3, u64vec3);" "bvec4 lessThan(u64vec4, u64vec4);" "bvec2 lessThanEqual(i64vec2, i64vec2);" "bvec3 lessThanEqual(i64vec3, i64vec3);" "bvec4 lessThanEqual(i64vec4, i64vec4);" "bvec2 lessThanEqual(u64vec2, u64vec2);" "bvec3 lessThanEqual(u64vec3, u64vec3);" "bvec4 lessThanEqual(u64vec4, u64vec4);" "bvec2 greaterThan(i64vec2, i64vec2);" "bvec3 greaterThan(i64vec3, i64vec3);" "bvec4 greaterThan(i64vec4, i64vec4);" "bvec2 greaterThan(u64vec2, u64vec2);" "bvec3 greaterThan(u64vec3, u64vec3);" "bvec4 greaterThan(u64vec4, u64vec4);" "bvec2 greaterThanEqual(i64vec2, i64vec2);" "bvec3 greaterThanEqual(i64vec3, i64vec3);" "bvec4 greaterThanEqual(i64vec4, i64vec4);" "bvec2 greaterThanEqual(u64vec2, u64vec2);" "bvec3 greaterThanEqual(u64vec3, u64vec3);" "bvec4 greaterThanEqual(u64vec4, u64vec4);" "bvec2 equal(i64vec2, i64vec2);" "bvec3 equal(i64vec3, i64vec3);" "bvec4 equal(i64vec4, i64vec4);" "bvec2 equal(u64vec2, u64vec2);" "bvec3 equal(u64vec3, u64vec3);" "bvec4 equal(u64vec4, u64vec4);" "bvec2 notEqual(i64vec2, i64vec2);" "bvec3 notEqual(i64vec3, i64vec3);" "bvec4 notEqual(i64vec4, i64vec4);" "bvec2 notEqual(u64vec2, u64vec2);" "bvec3 notEqual(u64vec3, u64vec3);" "bvec4 notEqual(u64vec4, u64vec4);" "int64_t bitCount(int64_t);" "i64vec2 bitCount(i64vec2);" "i64vec3 bitCount(i64vec3);" "i64vec4 bitCount(i64vec4);" "int64_t bitCount(uint64_t);" "i64vec2 bitCount(u64vec2);" "i64vec3 bitCount(u64vec3);" "i64vec4 bitCount(u64vec4);" "int64_t findLSB(int64_t);" "i64vec2 findLSB(i64vec2);" "i64vec3 findLSB(i64vec3);" "i64vec4 findLSB(i64vec4);" "int64_t findLSB(uint64_t);" "i64vec2 findLSB(u64vec2);" "i64vec3 findLSB(u64vec3);" "i64vec4 findLSB(u64vec4);" "int64_t findMSB(int64_t);" "i64vec2 findMSB(i64vec2);" "i64vec3 findMSB(i64vec3);" "i64vec4 findMSB(i64vec4);" "int64_t findMSB(uint64_t);" "i64vec2 findMSB(u64vec2);" "i64vec3 findMSB(u64vec3);" "i64vec4 findMSB(u64vec4);" "\n" ); } // GL_AMD_shader_trinary_minmax if (profile != EEsProfile && version >= 430) { commonBuiltins.append( "float min3(float, float, float);" "vec2 min3(vec2, vec2, vec2);" "vec3 min3(vec3, vec3, vec3);" "vec4 min3(vec4, vec4, vec4);" "int min3(int, int, int);" "ivec2 min3(ivec2, ivec2, ivec2);" "ivec3 min3(ivec3, ivec3, ivec3);" "ivec4 min3(ivec4, ivec4, ivec4);" "uint min3(uint, uint, uint);" "uvec2 min3(uvec2, uvec2, uvec2);" "uvec3 min3(uvec3, uvec3, uvec3);" "uvec4 min3(uvec4, uvec4, uvec4);" "float max3(float, float, float);" "vec2 max3(vec2, vec2, vec2);" "vec3 max3(vec3, vec3, vec3);" "vec4 max3(vec4, vec4, vec4);" "int max3(int, int, int);" "ivec2 max3(ivec2, ivec2, ivec2);" "ivec3 max3(ivec3, ivec3, ivec3);" "ivec4 max3(ivec4, ivec4, ivec4);" "uint max3(uint, uint, uint);" "uvec2 max3(uvec2, uvec2, uvec2);" "uvec3 max3(uvec3, uvec3, uvec3);" "uvec4 max3(uvec4, uvec4, uvec4);" "float mid3(float, float, float);" "vec2 mid3(vec2, vec2, vec2);" "vec3 mid3(vec3, vec3, vec3);" "vec4 mid3(vec4, vec4, vec4);" "int mid3(int, int, int);" "ivec2 mid3(ivec2, ivec2, ivec2);" "ivec3 mid3(ivec3, ivec3, ivec3);" "ivec4 mid3(ivec4, ivec4, ivec4);" "uint mid3(uint, uint, uint);" "uvec2 mid3(uvec2, uvec2, uvec2);" "uvec3 mid3(uvec3, uvec3, uvec3);" "uvec4 mid3(uvec4, uvec4, uvec4);" "float16_t min3(float16_t, float16_t, float16_t);" "f16vec2 min3(f16vec2, f16vec2, f16vec2);" "f16vec3 min3(f16vec3, f16vec3, f16vec3);" "f16vec4 min3(f16vec4, f16vec4, f16vec4);" "float16_t max3(float16_t, float16_t, float16_t);" "f16vec2 max3(f16vec2, f16vec2, f16vec2);" "f16vec3 max3(f16vec3, f16vec3, f16vec3);" "f16vec4 max3(f16vec4, f16vec4, f16vec4);" "float16_t mid3(float16_t, float16_t, float16_t);" "f16vec2 mid3(f16vec2, f16vec2, f16vec2);" "f16vec3 mid3(f16vec3, f16vec3, f16vec3);" "f16vec4 mid3(f16vec4, f16vec4, f16vec4);" "int16_t min3(int16_t, int16_t, int16_t);" "i16vec2 min3(i16vec2, i16vec2, i16vec2);" "i16vec3 min3(i16vec3, i16vec3, i16vec3);" "i16vec4 min3(i16vec4, i16vec4, i16vec4);" "int16_t max3(int16_t, int16_t, int16_t);" "i16vec2 max3(i16vec2, i16vec2, i16vec2);" "i16vec3 max3(i16vec3, i16vec3, i16vec3);" "i16vec4 max3(i16vec4, i16vec4, i16vec4);" "int16_t mid3(int16_t, int16_t, int16_t);" "i16vec2 mid3(i16vec2, i16vec2, i16vec2);" "i16vec3 mid3(i16vec3, i16vec3, i16vec3);" "i16vec4 mid3(i16vec4, i16vec4, i16vec4);" "uint16_t min3(uint16_t, uint16_t, uint16_t);" "u16vec2 min3(u16vec2, u16vec2, u16vec2);" "u16vec3 min3(u16vec3, u16vec3, u16vec3);" "u16vec4 min3(u16vec4, u16vec4, u16vec4);" "uint16_t max3(uint16_t, uint16_t, uint16_t);" "u16vec2 max3(u16vec2, u16vec2, u16vec2);" "u16vec3 max3(u16vec3, u16vec3, u16vec3);" "u16vec4 max3(u16vec4, u16vec4, u16vec4);" "uint16_t mid3(uint16_t, uint16_t, uint16_t);" "u16vec2 mid3(u16vec2, u16vec2, u16vec2);" "u16vec3 mid3(u16vec3, u16vec3, u16vec3);" "u16vec4 mid3(u16vec4, u16vec4, u16vec4);" "\n" ); } if ((profile == EEsProfile && version >= 310) || (profile != EEsProfile && version >= 430)) { commonBuiltins.append( "uint atomicAdd(coherent volatile nontemporal inout uint, uint, int, int, int);" " int atomicAdd(coherent volatile nontemporal inout int, int, int, int, int);" "uint atomicMin(coherent volatile nontemporal inout uint, uint, int, int, int);" " int atomicMin(coherent volatile nontemporal inout int, int, int, int, int);" "uint atomicMax(coherent volatile nontemporal inout uint, uint, int, int, int);" " int atomicMax(coherent volatile nontemporal inout int, int, int, int, int);" "uint atomicAnd(coherent volatile nontemporal inout uint, uint, int, int, int);" " int atomicAnd(coherent volatile nontemporal inout int, int, int, int, int);" "uint atomicOr (coherent volatile nontemporal inout uint, uint, int, int, int);" " int atomicOr (coherent volatile nontemporal inout int, int, int, int, int);" "uint atomicXor(coherent volatile nontemporal inout uint, uint, int, int, int);" " int atomicXor(coherent volatile nontemporal inout int, int, int, int, int);" "uint atomicExchange(coherent volatile nontemporal inout uint, uint, int, int, int);" " int atomicExchange(coherent volatile nontemporal inout int, int, int, int, int);" "uint atomicCompSwap(coherent volatile nontemporal inout uint, uint, uint, int, int, int, int, int);" " int atomicCompSwap(coherent volatile nontemporal inout int, int, int, int, int, int, int, int);" "uint atomicLoad(coherent volatile nontemporal in uint, int, int, int);" " int atomicLoad(coherent volatile nontemporal in int, int, int, int);" "void atomicStore(coherent volatile nontemporal out uint, uint, int, int, int);" "void atomicStore(coherent volatile nontemporal out int, int, int, int, int);" "\n"); } if (profile != EEsProfile && version >= 440) { commonBuiltins.append( "uint64_t atomicMin(coherent volatile nontemporal inout uint64_t, uint64_t);" " int64_t atomicMin(coherent volatile nontemporal inout int64_t, int64_t);" "uint64_t atomicMin(coherent volatile nontemporal inout uint64_t, uint64_t, int, int, int);" " int64_t atomicMin(coherent volatile nontemporal inout int64_t, int64_t, int, int, int);" "float16_t atomicMin(coherent volatile nontemporal inout float16_t, float16_t);" "float16_t atomicMin(coherent volatile nontemporal inout float16_t, float16_t, int, int, int);" " float atomicMin(coherent volatile nontemporal inout float, float);" " float atomicMin(coherent volatile nontemporal inout float, float, int, int, int);" " double atomicMin(coherent volatile nontemporal inout double, double);" " double atomicMin(coherent volatile nontemporal inout double, double, int, int, int);" "uint64_t atomicMax(coherent volatile nontemporal inout uint64_t, uint64_t);" " int64_t atomicMax(coherent volatile nontemporal inout int64_t, int64_t);" "uint64_t atomicMax(coherent volatile nontemporal inout uint64_t, uint64_t, int, int, int);" " int64_t atomicMax(coherent volatile nontemporal inout int64_t, int64_t, int, int, int);" "float16_t atomicMax(coherent volatile nontemporal inout float16_t, float16_t);" "float16_t atomicMax(coherent volatile nontemporal inout float16_t, float16_t, int, int, int);" " float atomicMax(coherent volatile nontemporal inout float, float);" " float atomicMax(coherent volatile nontemporal inout float, float, int, int, int);" " double atomicMax(coherent volatile nontemporal inout double, double);" " double atomicMax(coherent volatile nontemporal inout double, double, int, int, int);" "uint64_t atomicAnd(coherent volatile nontemporal inout uint64_t, uint64_t);" " int64_t atomicAnd(coherent volatile nontemporal inout int64_t, int64_t);" "uint64_t atomicAnd(coherent volatile nontemporal inout uint64_t, uint64_t, int, int, int);" " int64_t atomicAnd(coherent volatile nontemporal inout int64_t, int64_t, int, int, int);" "uint64_t atomicOr (coherent volatile nontemporal inout uint64_t, uint64_t);" " int64_t atomicOr (coherent volatile nontemporal inout int64_t, int64_t);" "uint64_t atomicOr (coherent volatile nontemporal inout uint64_t, uint64_t, int, int, int);" " int64_t atomicOr (coherent volatile nontemporal inout int64_t, int64_t, int, int, int);" "uint64_t atomicXor(coherent volatile nontemporal inout uint64_t, uint64_t);" " int64_t atomicXor(coherent volatile nontemporal inout int64_t, int64_t);" "uint64_t atomicXor(coherent volatile nontemporal inout uint64_t, uint64_t, int, int, int);" " int64_t atomicXor(coherent volatile nontemporal inout int64_t, int64_t, int, int, int);" "uint64_t atomicAdd(coherent volatile nontemporal inout uint64_t, uint64_t);" " int64_t atomicAdd(coherent volatile nontemporal inout int64_t, int64_t);" "uint64_t atomicAdd(coherent volatile nontemporal inout uint64_t, uint64_t, int, int, int);" " int64_t atomicAdd(coherent volatile nontemporal inout int64_t, int64_t, int, int, int);" "float16_t atomicAdd(coherent volatile nontemporal inout float16_t, float16_t);" "float16_t atomicAdd(coherent volatile nontemporal inout float16_t, float16_t, int, int, int);" " float atomicAdd(coherent volatile nontemporal inout float, float);" " float atomicAdd(coherent volatile nontemporal inout float, float, int, int, int);" " double atomicAdd(coherent volatile nontemporal inout double, double);" " double atomicAdd(coherent volatile nontemporal inout double, double, int, int, int);" "uint64_t atomicExchange(coherent volatile nontemporal inout uint64_t, uint64_t);" " int64_t atomicExchange(coherent volatile nontemporal inout int64_t, int64_t);" "uint64_t atomicExchange(coherent volatile nontemporal inout uint64_t, uint64_t, int, int, int);" " int64_t atomicExchange(coherent volatile nontemporal inout int64_t, int64_t, int, int, int);" "float16_t atomicExchange(coherent volatile nontemporal inout float16_t, float16_t);" "float16_t atomicExchange(coherent volatile nontemporal inout float16_t, float16_t, int, int, int);" " float atomicExchange(coherent volatile nontemporal inout float, float);" " float atomicExchange(coherent volatile nontemporal inout float, float, int, int, int);" " double atomicExchange(coherent volatile nontemporal inout double, double);" " double atomicExchange(coherent volatile nontemporal inout double, double, int, int, int);" "uint64_t atomicCompSwap(coherent volatile nontemporal inout uint64_t, uint64_t, uint64_t);" " int64_t atomicCompSwap(coherent volatile nontemporal inout int64_t, int64_t, int64_t);" "uint64_t atomicCompSwap(coherent volatile nontemporal inout uint64_t, uint64_t, uint64_t, int, int, int, int, int);" " int64_t atomicCompSwap(coherent volatile nontemporal inout int64_t, int64_t, int64_t, int, int, int, int, int);" "uint64_t atomicLoad(coherent volatile nontemporal in uint64_t, int, int, int);" " int64_t atomicLoad(coherent volatile nontemporal in int64_t, int, int, int);" "float16_t atomicLoad(coherent volatile nontemporal in float16_t, int, int, int);" " float atomicLoad(coherent volatile nontemporal in float, int, int, int);" " double atomicLoad(coherent volatile nontemporal in double, int, int, int);" "void atomicStore(coherent volatile nontemporal out uint64_t, uint64_t, int, int, int);" "void atomicStore(coherent volatile nontemporal out int64_t, int64_t, int, int, int);" "void atomicStore(coherent volatile nontemporal out float16_t, float16_t, int, int, int);" "void atomicStore(coherent volatile nontemporal out float, float, int, int, int);" "void atomicStore(coherent volatile nontemporal out double, double, int, int, int);" "\n"); } // NV_shader_atomic_fp16_vector if (profile != EEsProfile && version >= 430) { commonBuiltins.append( "f16vec2 atomicAdd(coherent volatile nontemporal inout f16vec2, f16vec2);" "f16vec4 atomicAdd(coherent volatile nontemporal inout f16vec4, f16vec4);" "f16vec2 atomicMin(coherent volatile nontemporal inout f16vec2, f16vec2);" "f16vec4 atomicMin(coherent volatile nontemporal inout f16vec4, f16vec4);" "f16vec2 atomicMax(coherent volatile nontemporal inout f16vec2, f16vec2);" "f16vec4 atomicMax(coherent volatile nontemporal inout f16vec4, f16vec4);" "f16vec2 atomicExchange(coherent volatile nontemporal inout f16vec2, f16vec2);" "f16vec4 atomicExchange(coherent volatile nontemporal inout f16vec4, f16vec4);" "\n"); } if ((profile == EEsProfile && version >= 300) || (profile != EEsProfile && version >= 150)) { // GL_ARB_shader_bit_encoding commonBuiltins.append( "int floatBitsToInt(highp float value);" "ivec2 floatBitsToInt(highp vec2 value);" "ivec3 floatBitsToInt(highp vec3 value);" "ivec4 floatBitsToInt(highp vec4 value);" "uint floatBitsToUint(highp float value);" "uvec2 floatBitsToUint(highp vec2 value);" "uvec3 floatBitsToUint(highp vec3 value);" "uvec4 floatBitsToUint(highp vec4 value);" "float intBitsToFloat(highp int value);" "vec2 intBitsToFloat(highp ivec2 value);" "vec3 intBitsToFloat(highp ivec3 value);" "vec4 intBitsToFloat(highp ivec4 value);" "float uintBitsToFloat(highp uint value);" "vec2 uintBitsToFloat(highp uvec2 value);" "vec3 uintBitsToFloat(highp uvec3 value);" "vec4 uintBitsToFloat(highp uvec4 value);" "\n"); } if ((profile != EEsProfile && version >= 150) || // GL_NV_gpu_shader5 (profile == EEsProfile && version >= 310)) { // GL_OES_gpu_shader5 commonBuiltins.append( "float fma(float, float, float );" "vec2 fma(vec2, vec2, vec2 );" "vec3 fma(vec3, vec3, vec3 );" "vec4 fma(vec4, vec4, vec4 );" "\n"); } if (profile != EEsProfile && version >= 150) { // ARB_gpu_shader_fp64 commonBuiltins.append( "double fma(double, double, double);" "dvec2 fma(dvec2, dvec2, dvec2 );" "dvec3 fma(dvec3, dvec3, dvec3 );" "dvec4 fma(dvec4, dvec4, dvec4 );" "\n"); } if (profile == EEsProfile && version >= 310) { // ARB_gpu_shader_fp64 commonBuiltins.append( "float64_t fma(float64_t, float64_t, float64_t);" "f64vec2 fma(f64vec2, f64vec2, f64vec2 );" "f64vec3 fma(f64vec3, f64vec3, f64vec3 );" "f64vec4 fma(f64vec4, f64vec4, f64vec4 );" "\n"); } if ((profile == EEsProfile && version >= 310) || (profile != EEsProfile && version >= 150)) { // GL_NV_gpu_shader5 commonBuiltins.append( "float frexp(highp float, out highp int);" "vec2 frexp(highp vec2, out highp ivec2);" "vec3 frexp(highp vec3, out highp ivec3);" "vec4 frexp(highp vec4, out highp ivec4);" "float ldexp(highp float, highp int);" "vec2 ldexp(highp vec2, highp ivec2);" "vec3 ldexp(highp vec3, highp ivec3);" "vec4 ldexp(highp vec4, highp ivec4);" "\n"); } if (profile != EEsProfile && version >= 150) { // ARB_gpu_shader_fp64 commonBuiltins.append( "double frexp(double, out int);" "dvec2 frexp( dvec2, out ivec2);" "dvec3 frexp( dvec3, out ivec3);" "dvec4 frexp( dvec4, out ivec4);" "double ldexp(double, int);" "dvec2 ldexp( dvec2, ivec2);" "dvec3 ldexp( dvec3, ivec3);" "dvec4 ldexp( dvec4, ivec4);" "double packDouble2x32(uvec2);" "uvec2 unpackDouble2x32(double);" "\n"); } if (profile == EEsProfile && version >= 310) { // ARB_gpu_shader_fp64 commonBuiltins.append( "float64_t frexp(float64_t, out int);" "f64vec2 frexp( f64vec2, out ivec2);" "f64vec3 frexp( f64vec3, out ivec3);" "f64vec4 frexp( f64vec4, out ivec4);" "float64_t ldexp(float64_t, int);" "f64vec2 ldexp( f64vec2, ivec2);" "f64vec3 ldexp( f64vec3, ivec3);" "f64vec4 ldexp( f64vec4, ivec4);" "\n"); } if ((profile == EEsProfile && version >= 300) || (profile != EEsProfile && version >= 150)) { commonBuiltins.append( "highp uint packUnorm2x16(vec2);" "vec2 unpackUnorm2x16(highp uint);" "\n"); } if ((profile == EEsProfile && version >= 300) || (profile != EEsProfile && version >= 150)) { commonBuiltins.append( "highp uint packSnorm2x16(vec2);" " vec2 unpackSnorm2x16(highp uint);" "highp uint packHalf2x16(vec2);" "\n"); } if (profile == EEsProfile && version >= 300) { commonBuiltins.append( "mediump vec2 unpackHalf2x16(highp uint);" "\n"); } else if (profile != EEsProfile && version >= 150) { commonBuiltins.append( " vec2 unpackHalf2x16(highp uint);" "\n"); } if ((profile == EEsProfile && version >= 310) || (profile != EEsProfile && version >= 150)) { commonBuiltins.append( "highp uint packSnorm4x8(vec4);" "highp uint packUnorm4x8(vec4);" "\n"); } if (profile == EEsProfile && version >= 310) { commonBuiltins.append( "mediump vec4 unpackSnorm4x8(highp uint);" "mediump vec4 unpackUnorm4x8(highp uint);" "\n"); } else if (profile != EEsProfile && version >= 150) { commonBuiltins.append( "vec4 unpackSnorm4x8(highp uint);" "vec4 unpackUnorm4x8(highp uint);" "\n"); } // // Matrix Functions. // commonBuiltins.append( "mat2 matrixCompMult(mat2 x, mat2 y);" "mat3 matrixCompMult(mat3 x, mat3 y);" "mat4 matrixCompMult(mat4 x, mat4 y);" "\n"); // 120 is correct for both ES and desktop if (version >= 120) { commonBuiltins.append( "mat2 outerProduct(vec2 c, vec2 r);" "mat3 outerProduct(vec3 c, vec3 r);" "mat4 outerProduct(vec4 c, vec4 r);" "mat2x3 outerProduct(vec3 c, vec2 r);" "mat3x2 outerProduct(vec2 c, vec3 r);" "mat2x4 outerProduct(vec4 c, vec2 r);" "mat4x2 outerProduct(vec2 c, vec4 r);" "mat3x4 outerProduct(vec4 c, vec3 r);" "mat4x3 outerProduct(vec3 c, vec4 r);" "mat2 transpose(mat2 m);" "mat3 transpose(mat3 m);" "mat4 transpose(mat4 m);" "mat2x3 transpose(mat3x2 m);" "mat3x2 transpose(mat2x3 m);" "mat2x4 transpose(mat4x2 m);" "mat4x2 transpose(mat2x4 m);" "mat3x4 transpose(mat4x3 m);" "mat4x3 transpose(mat3x4 m);" "mat2x3 matrixCompMult(mat2x3, mat2x3);" "mat2x4 matrixCompMult(mat2x4, mat2x4);" "mat3x2 matrixCompMult(mat3x2, mat3x2);" "mat3x4 matrixCompMult(mat3x4, mat3x4);" "mat4x2 matrixCompMult(mat4x2, mat4x2);" "mat4x3 matrixCompMult(mat4x3, mat4x3);" "\n"); // 150 is correct for both ES and desktop if (version >= 150) { commonBuiltins.append( "float determinant(mat2 m);" "float determinant(mat3 m);" "float determinant(mat4 m);" "mat2 inverse(mat2 m);" "mat3 inverse(mat3 m);" "mat4 inverse(mat4 m);" "\n"); } } // // Original-style texture functions existing in all stages. // (Per-stage functions below.) // if ((profile == EEsProfile && version == 100) || profile == ECompatibilityProfile || (profile == ECoreProfile && version < 420) || profile == ENoProfile) { if (spvVersion.spv == 0) { commonBuiltins.append( "vec4 texture2D(sampler2D, vec2);" "vec4 texture2DProj(sampler2D, vec3);" "vec4 texture2DProj(sampler2D, vec4);" "vec4 texture3D(sampler3D, vec3);" // OES_texture_3D, but caught by keyword check "vec4 texture3DProj(sampler3D, vec4);" // OES_texture_3D, but caught by keyword check "vec4 textureCube(samplerCube, vec3);" "\n"); } } if ( profile == ECompatibilityProfile || (profile == ECoreProfile && version < 420) || profile == ENoProfile) { if (spvVersion.spv == 0) { commonBuiltins.append( "vec4 texture1D(sampler1D, float);" "vec4 texture1DProj(sampler1D, vec2);" "vec4 texture1DProj(sampler1D, vec4);" "vec4 shadow1D(sampler1DShadow, vec3);" "vec4 shadow2D(sampler2DShadow, vec3);" "vec4 shadow1DProj(sampler1DShadow, vec4);" "vec4 shadow2DProj(sampler2DShadow, vec4);" "vec4 texture2DRect(sampler2DRect, vec2);" // GL_ARB_texture_rectangle, caught by keyword check "vec4 texture2DRectProj(sampler2DRect, vec3);" // GL_ARB_texture_rectangle, caught by keyword check "vec4 texture2DRectProj(sampler2DRect, vec4);" // GL_ARB_texture_rectangle, caught by keyword check "vec4 shadow2DRect(sampler2DRectShadow, vec3);" // GL_ARB_texture_rectangle, caught by keyword check "vec4 shadow2DRectProj(sampler2DRectShadow, vec4);" // GL_ARB_texture_rectangle, caught by keyword check "vec4 texture1DArray(sampler1DArray, vec2);" // GL_EXT_texture_array "vec4 texture2DArray(sampler2DArray, vec3);" // GL_EXT_texture_array "vec4 shadow1DArray(sampler1DArrayShadow, vec3);" // GL_EXT_texture_array "vec4 shadow2DArray(sampler2DArrayShadow, vec4);" // GL_EXT_texture_array "vec4 texture1DArray(sampler1DArray, vec2, float);" // GL_EXT_texture_array "vec4 texture2DArray(sampler2DArray, vec3, float);" // GL_EXT_texture_array "vec4 shadow1DArray(sampler1DArrayShadow, vec3, float);" // GL_EXT_texture_array "vec4 texture1DArrayLod(sampler1DArray, vec2, float);" // GL_EXT_texture_array "vec4 texture2DArrayLod(sampler2DArray, vec3, float);" // GL_EXT_texture_array "vec4 shadow1DArrayLod(sampler1DArrayShadow, vec3, float);" // GL_EXT_texture_array "\n"); } } if (profile == EEsProfile) { if (spvVersion.spv == 0) { if (version < 300) { commonBuiltins.append( "vec4 texture2D(samplerExternalOES, vec2 coord);" // GL_OES_EGL_image_external "vec4 texture2DProj(samplerExternalOES, vec3);" // GL_OES_EGL_image_external "vec4 texture2DProj(samplerExternalOES, vec4);" // GL_OES_EGL_image_external "\n"); } else { commonBuiltins.append( "highp ivec2 textureSize(samplerExternalOES, int lod);" // GL_OES_EGL_image_external_essl3 "vec4 texture(samplerExternalOES, vec2);" // GL_OES_EGL_image_external_essl3 "vec4 texture(samplerExternalOES, vec2, float bias);" // GL_OES_EGL_image_external_essl3 "vec4 textureProj(samplerExternalOES, vec3);" // GL_OES_EGL_image_external_essl3 "vec4 textureProj(samplerExternalOES, vec3, float bias);" // GL_OES_EGL_image_external_essl3 "vec4 textureProj(samplerExternalOES, vec4);" // GL_OES_EGL_image_external_essl3 "vec4 textureProj(samplerExternalOES, vec4, float bias);" // GL_OES_EGL_image_external_essl3 "vec4 texelFetch(samplerExternalOES, ivec2, int lod);" // GL_OES_EGL_image_external_essl3 "\n"); } commonBuiltins.append( "highp ivec2 textureSize(__samplerExternal2DY2YEXT, int lod);" // GL_EXT_YUV_target "vec4 texture(__samplerExternal2DY2YEXT, vec2);" // GL_EXT_YUV_target "vec4 texture(__samplerExternal2DY2YEXT, vec2, float bias);" // GL_EXT_YUV_target "vec4 textureProj(__samplerExternal2DY2YEXT, vec3);" // GL_EXT_YUV_target "vec4 textureProj(__samplerExternal2DY2YEXT, vec3, float bias);" // GL_EXT_YUV_target "vec4 textureProj(__samplerExternal2DY2YEXT, vec4);" // GL_EXT_YUV_target "vec4 textureProj(__samplerExternal2DY2YEXT, vec4, float bias);" // GL_EXT_YUV_target "vec4 texelFetch(__samplerExternal2DY2YEXT sampler, ivec2, int lod);" // GL_EXT_YUV_target "\n"); commonBuiltins.append( "vec4 texture2DGradEXT(sampler2D, vec2, vec2, vec2);" // GL_EXT_shader_texture_lod "vec4 texture2DProjGradEXT(sampler2D, vec3, vec2, vec2);" // GL_EXT_shader_texture_lod "vec4 texture2DProjGradEXT(sampler2D, vec4, vec2, vec2);" // GL_EXT_shader_texture_lod "vec4 textureCubeGradEXT(samplerCube, vec3, vec3, vec3);" // GL_EXT_shader_texture_lod "float shadow2DEXT(sampler2DShadow, vec3);" // GL_EXT_shadow_samplers "float shadow2DProjEXT(sampler2DShadow, vec4);" // GL_EXT_shadow_samplers "\n"); } } // // Noise functions. // if (spvVersion.spv == 0 && profile != EEsProfile) { commonBuiltins.append( "float noise1(float x);" "float noise1(vec2 x);" "float noise1(vec3 x);" "float noise1(vec4 x);" "vec2 noise2(float x);" "vec2 noise2(vec2 x);" "vec2 noise2(vec3 x);" "vec2 noise2(vec4 x);" "vec3 noise3(float x);" "vec3 noise3(vec2 x);" "vec3 noise3(vec3 x);" "vec3 noise3(vec4 x);" "vec4 noise4(float x);" "vec4 noise4(vec2 x);" "vec4 noise4(vec3 x);" "vec4 noise4(vec4 x);" "\n"); } if (spvVersion.vulkan == 0) { // // Atomic counter functions. // if ((profile != EEsProfile && version >= 300) || (profile == EEsProfile && version >= 310)) { commonBuiltins.append( "uint atomicCounterIncrement(atomic_uint);" "uint atomicCounterDecrement(atomic_uint);" "uint atomicCounter(atomic_uint);" "\n"); } if (profile != EEsProfile && version == 450) { commonBuiltins.append( "uint atomicCounterAddARB(atomic_uint, uint);" "uint atomicCounterSubtractARB(atomic_uint, uint);" "uint atomicCounterMinARB(atomic_uint, uint);" "uint atomicCounterMaxARB(atomic_uint, uint);" "uint atomicCounterAndARB(atomic_uint, uint);" "uint atomicCounterOrARB(atomic_uint, uint);" "uint atomicCounterXorARB(atomic_uint, uint);" "uint atomicCounterExchangeARB(atomic_uint, uint);" "uint atomicCounterCompSwapARB(atomic_uint, uint, uint);" "\n"); } if (profile != EEsProfile && version >= 460) { commonBuiltins.append( "uint atomicCounterAdd(atomic_uint, uint);" "uint atomicCounterSubtract(atomic_uint, uint);" "uint atomicCounterMin(atomic_uint, uint);" "uint atomicCounterMax(atomic_uint, uint);" "uint atomicCounterAnd(atomic_uint, uint);" "uint atomicCounterOr(atomic_uint, uint);" "uint atomicCounterXor(atomic_uint, uint);" "uint atomicCounterExchange(atomic_uint, uint);" "uint atomicCounterCompSwap(atomic_uint, uint, uint);" "\n"); } } else if (spvVersion.vulkanRelaxed) { // // Atomic counter functions act as aliases to normal atomic functions. // replace definitions to take 'volatile coherent nontemporal uint' instead of 'atomic_uint' // and map to equivalent non-counter atomic op // if ((profile != EEsProfile && version >= 300) || (profile == EEsProfile && version >= 310)) { commonBuiltins.append( "uint atomicCounterIncrement(volatile coherent nontemporal uint);" "uint atomicCounterDecrement(volatile coherent nontemporal uint);" "uint atomicCounter(volatile coherent nontemporal uint);" "\n"); } if (profile != EEsProfile && version >= 460) { commonBuiltins.append( "uint atomicCounterAdd(volatile coherent nontemporal uint, uint);" "uint atomicCounterSubtract(volatile coherent nontemporal uint, uint);" "uint atomicCounterMin(volatile coherent nontemporal uint, uint);" "uint atomicCounterMax(volatile coherent nontemporal uint, uint);" "uint atomicCounterAnd(volatile coherent nontemporal uint, uint);" "uint atomicCounterOr(volatile coherent nontemporal uint, uint);" "uint atomicCounterXor(volatile coherent nontemporal uint, uint);" "uint atomicCounterExchange(volatile coherent nontemporal uint, uint);" "uint atomicCounterCompSwap(volatile coherent nontemporal uint, uint, uint);" "\n"); } } // Bitfield if ((profile == EEsProfile && version >= 310) || (profile != EEsProfile && version >= 150)) { // ARB_gpu_shader5/NV_gpu_shader5 commonBuiltins.append( " int bitfieldExtract( int, int, int);" "ivec2 bitfieldExtract(ivec2, int, int);" "ivec3 bitfieldExtract(ivec3, int, int);" "ivec4 bitfieldExtract(ivec4, int, int);" " uint bitfieldExtract( uint, int, int);" "uvec2 bitfieldExtract(uvec2, int, int);" "uvec3 bitfieldExtract(uvec3, int, int);" "uvec4 bitfieldExtract(uvec4, int, int);" " int bitfieldInsert( int base, int, int, int);" "ivec2 bitfieldInsert(ivec2 base, ivec2, int, int);" "ivec3 bitfieldInsert(ivec3 base, ivec3, int, int);" "ivec4 bitfieldInsert(ivec4 base, ivec4, int, int);" " uint bitfieldInsert( uint base, uint, int, int);" "uvec2 bitfieldInsert(uvec2 base, uvec2, int, int);" "uvec3 bitfieldInsert(uvec3 base, uvec3, int, int);" "uvec4 bitfieldInsert(uvec4 base, uvec4, int, int);" "\n"); } if (profile != EEsProfile && version >= 150) { //GL_ARB_gpu_shader5/GL_NV_gpu_shader5 commonBuiltins.append( " int findLSB( int);" "ivec2 findLSB(ivec2);" "ivec3 findLSB(ivec3);" "ivec4 findLSB(ivec4);" " int findLSB( uint);" "ivec2 findLSB(uvec2);" "ivec3 findLSB(uvec3);" "ivec4 findLSB(uvec4);" "\n"); } else if (profile == EEsProfile && version >= 310) { commonBuiltins.append( "lowp int findLSB( int);" "lowp ivec2 findLSB(ivec2);" "lowp ivec3 findLSB(ivec3);" "lowp ivec4 findLSB(ivec4);" "lowp int findLSB( uint);" "lowp ivec2 findLSB(uvec2);" "lowp ivec3 findLSB(uvec3);" "lowp ivec4 findLSB(uvec4);" "\n"); } if (profile != EEsProfile && version >= 150) { //GL_ARB_gpu_shader5/GL_NV_gpu_shader5 commonBuiltins.append( " int bitCount( int);" "ivec2 bitCount(ivec2);" "ivec3 bitCount(ivec3);" "ivec4 bitCount(ivec4);" " int bitCount( uint);" "ivec2 bitCount(uvec2);" "ivec3 bitCount(uvec3);" "ivec4 bitCount(uvec4);" " int findMSB(highp int);" "ivec2 findMSB(highp ivec2);" "ivec3 findMSB(highp ivec3);" "ivec4 findMSB(highp ivec4);" " int findMSB(highp uint);" "ivec2 findMSB(highp uvec2);" "ivec3 findMSB(highp uvec3);" "ivec4 findMSB(highp uvec4);" "\n"); } if (profile != EEsProfile && version >= 150 && version < 450) { //GL_NV_gpu_shader5 commonBuiltins.append( "int64_t packInt2x32(ivec2);" "uint64_t packUint2x32(uvec2);" "ivec2 unpackInt2x32(int64_t);" "uvec2 unpackUint2x32(uint64_t);" "uint packFloat2x16(f16vec2);" "f16vec2 unpackFloat2x16(uint);" "int64_t doubleBitsToInt64(double);" "i64vec2 doubleBitsToInt64(dvec2);" "i64vec3 doubleBitsToInt64(dvec3);" "i64vec4 doubleBitsToInt64(dvec4);" "uint64_t doubleBitsToUint64(double);" "u64vec2 doubleBitsToUint64(dvec2);" "u64vec3 doubleBitsToUint64(dvec3);" "u64vec4 doubleBitsToUint64(dvec4);" "double int64BitsToDouble(int64_t);" "dvec2 int64BitsToDouble(i64vec2);" "dvec3 int64BitsToDouble(i64vec3);" "dvec4 int64BitsToDouble(i64vec4);" "double uint64BitsToDouble(uint64_t);" "dvec2 uint64BitsToDouble(u64vec2);" "dvec3 uint64BitsToDouble(u64vec3);" "dvec4 uint64BitsToDouble(u64vec4);" // Modifications to Vector Relational Functions // Introduction of explicitly sized types "bvec2 lessThan(i64vec2, i64vec2);" "bvec3 lessThan(i64vec3, i64vec3);" "bvec4 lessThan(i64vec4, i64vec4);" "bvec2 lessThan(u64vec2, u64vec2);" "bvec3 lessThan(u64vec3, u64vec3);" "bvec4 lessThan(u64vec4, u64vec4);" "bvec2 lessThanEqual(i64vec2, i64vec2);" "bvec3 lessThanEqual(i64vec3, i64vec3);" "bvec4 lessThanEqual(i64vec4, i64vec4);" "bvec2 lessThanEqual(u64vec2, u64vec2);" "bvec3 lessThanEqual(u64vec3, u64vec3);" "bvec4 lessThanEqual(u64vec4, u64vec4);" "bvec2 greaterThan(i64vec2, i64vec2);" "bvec3 greaterThan(i64vec3, i64vec3);" "bvec4 greaterThan(i64vec4, i64vec4);" "bvec2 greaterThan(u64vec2, u64vec2);" "bvec3 greaterThan(u64vec3, u64vec3);" "bvec4 greaterThan(u64vec4, u64vec4);" "bvec2 greaterThanEqual(i64vec2, i64vec2);" "bvec3 greaterThanEqual(i64vec3, i64vec3);" "bvec4 greaterThanEqual(i64vec4, i64vec4);" "bvec2 greaterThanEqual(u64vec2, u64vec2);" "bvec3 greaterThanEqual(u64vec3, u64vec3);" "bvec4 greaterThanEqual(u64vec4, u64vec4);" "bvec2 equal(i64vec2, i64vec2);" "bvec3 equal(i64vec3, i64vec3);" "bvec4 equal(i64vec4, i64vec4);" "bvec2 equal(u64vec2, u64vec2);" "bvec3 equal(u64vec3, u64vec3);" "bvec4 equal(u64vec4, u64vec4);" "bvec2 notEqual(i64vec2, i64vec2);" "bvec3 notEqual(i64vec3, i64vec3);" "bvec4 notEqual(i64vec4, i64vec4);" "bvec2 notEqual(u64vec2, u64vec2);" "bvec3 notEqual(u64vec3, u64vec3);" "bvec4 notEqual(u64vec4, u64vec4);" "bvec2 lessThan(f16vec2, f16vec2);" "bvec3 lessThan(f16vec3, f16vec3);" "bvec4 lessThan(f16vec4, f16vec4);" "bvec2 lessThanEqual(f16vec2, f16vec2);" "bvec3 lessThanEqual(f16vec3, f16vec3);" "bvec4 lessThanEqual(f16vec4, f16vec4);" "bvec2 greaterThan(f16vec2, f16vec2);" "bvec3 greaterThan(f16vec3, f16vec3);" "bvec4 greaterThan(f16vec4, f16vec4);" "bvec2 greaterThanEqual(f16vec2, f16vec2);" "bvec3 greaterThanEqual(f16vec3, f16vec3);" "bvec4 greaterThanEqual(f16vec4, f16vec4);" "bvec2 equal(f16vec2, f16vec2);" "bvec3 equal(f16vec3, f16vec3);" "bvec4 equal(f16vec4, f16vec4);" "bvec2 notEqual(f16vec2, f16vec2);" "bvec3 notEqual(f16vec3, f16vec3);" "bvec4 notEqual(f16vec4, f16vec4);" // Dependency on GL_ARB_gpu_shader_fp64 "bvec2 lessThan(dvec2, dvec2);" "bvec3 lessThan(dvec3, dvec3);" "bvec4 lessThan(dvec4, dvec4);" "bvec2 lessThanEqual(dvec2, dvec2);" "bvec3 lessThanEqual(dvec3, dvec3);" "bvec4 lessThanEqual(dvec4, dvec4);" "bvec2 greaterThan(dvec2, dvec2);" "bvec3 greaterThan(dvec3, dvec3);" "bvec4 greaterThan(dvec4, dvec4);" "bvec2 greaterThanEqual(dvec2, dvec2);" "bvec3 greaterThanEqual(dvec3, dvec3);" "bvec4 greaterThanEqual(dvec4, dvec4);" "bvec2 equal(dvec2, dvec2);" "bvec3 equal(dvec3, dvec3);" "bvec4 equal(dvec4, dvec4);" "bvec2 notEqual(dvec2, dvec2);" "bvec3 notEqual(dvec3, dvec3);" "bvec4 notEqual(dvec4, dvec4);" "\n"); } if (profile != EEsProfile && version >= 150) { commonBuiltins.append( "bool anyThreadNV(bool);" "bool allThreadsNV(bool);" "bool allThreadsEqualNV(bool);" "\n"); } if ((profile == EEsProfile && version >= 310) || (profile != EEsProfile && version >= 150)) { // NV_gpu_shader5 commonBuiltins.append( " uint uaddCarry(highp uint, highp uint, out lowp uint carry);" "uvec2 uaddCarry(highp uvec2, highp uvec2, out lowp uvec2 carry);" "uvec3 uaddCarry(highp uvec3, highp uvec3, out lowp uvec3 carry);" "uvec4 uaddCarry(highp uvec4, highp uvec4, out lowp uvec4 carry);" " uint usubBorrow(highp uint, highp uint, out lowp uint borrow);" "uvec2 usubBorrow(highp uvec2, highp uvec2, out lowp uvec2 borrow);" "uvec3 usubBorrow(highp uvec3, highp uvec3, out lowp uvec3 borrow);" "uvec4 usubBorrow(highp uvec4, highp uvec4, out lowp uvec4 borrow);" "void umulExtended(highp uint, highp uint, out highp uint, out highp uint lsb);" "void umulExtended(highp uvec2, highp uvec2, out highp uvec2, out highp uvec2 lsb);" "void umulExtended(highp uvec3, highp uvec3, out highp uvec3, out highp uvec3 lsb);" "void umulExtended(highp uvec4, highp uvec4, out highp uvec4, out highp uvec4 lsb);" "void imulExtended(highp int, highp int, out highp int, out highp int lsb);" "void imulExtended(highp ivec2, highp ivec2, out highp ivec2, out highp ivec2 lsb);" "void imulExtended(highp ivec3, highp ivec3, out highp ivec3, out highp ivec3 lsb);" "void imulExtended(highp ivec4, highp ivec4, out highp ivec4, out highp ivec4 lsb);" " int bitfieldReverse(highp int);" "ivec2 bitfieldReverse(highp ivec2);" "ivec3 bitfieldReverse(highp ivec3);" "ivec4 bitfieldReverse(highp ivec4);" " uint bitfieldReverse(highp uint);" "uvec2 bitfieldReverse(highp uvec2);" "uvec3 bitfieldReverse(highp uvec3);" "uvec4 bitfieldReverse(highp uvec4);" "\n"); } if (profile == EEsProfile && version >= 310) { commonBuiltins.append( "lowp int bitCount( int);" "lowp ivec2 bitCount(ivec2);" "lowp ivec3 bitCount(ivec3);" "lowp ivec4 bitCount(ivec4);" "lowp int bitCount( uint);" "lowp ivec2 bitCount(uvec2);" "lowp ivec3 bitCount(uvec3);" "lowp ivec4 bitCount(uvec4);" "lowp int findMSB(highp int);" "lowp ivec2 findMSB(highp ivec2);" "lowp ivec3 findMSB(highp ivec3);" "lowp ivec4 findMSB(highp ivec4);" "lowp int findMSB(highp uint);" "lowp ivec2 findMSB(highp uvec2);" "lowp ivec3 findMSB(highp uvec3);" "lowp ivec4 findMSB(highp uvec4);" "\n"); } // GL_ARB_shader_ballot if (profile != EEsProfile && version >= 450) { commonBuiltins.append( "uint64_t ballotARB(bool);" "float readInvocationARB(float, uint);" "vec2 readInvocationARB(vec2, uint);" "vec3 readInvocationARB(vec3, uint);" "vec4 readInvocationARB(vec4, uint);" "int readInvocationARB(int, uint);" "ivec2 readInvocationARB(ivec2, uint);" "ivec3 readInvocationARB(ivec3, uint);" "ivec4 readInvocationARB(ivec4, uint);" "uint readInvocationARB(uint, uint);" "uvec2 readInvocationARB(uvec2, uint);" "uvec3 readInvocationARB(uvec3, uint);" "uvec4 readInvocationARB(uvec4, uint);" "float readFirstInvocationARB(float);" "vec2 readFirstInvocationARB(vec2);" "vec3 readFirstInvocationARB(vec3);" "vec4 readFirstInvocationARB(vec4);" "int readFirstInvocationARB(int);" "ivec2 readFirstInvocationARB(ivec2);" "ivec3 readFirstInvocationARB(ivec3);" "ivec4 readFirstInvocationARB(ivec4);" "uint readFirstInvocationARB(uint);" "uvec2 readFirstInvocationARB(uvec2);" "uvec3 readFirstInvocationARB(uvec3);" "uvec4 readFirstInvocationARB(uvec4);" "\n"); } // GL_ARB_shader_group_vote if (profile != EEsProfile && version >= 430) { commonBuiltins.append( "bool anyInvocationARB(bool);" "bool allInvocationsARB(bool);" "bool allInvocationsEqualARB(bool);" "\n"); } // GL_EXT_integer_dot_product if ((profile == EEsProfile && version >= 300) || (profile != EEsProfile && version >= 450)) { commonBuiltins.append( "uint dotEXT(uvec2 a, uvec2 b);" "int dotEXT(ivec2 a, ivec2 b);" "int dotEXT(ivec2 a, uvec2 b);" "int dotEXT(uvec2 a, ivec2 b);" "uint dotEXT(uvec3 a, uvec3 b);" "int dotEXT(ivec3 a, ivec3 b);" "int dotEXT(ivec3 a, uvec3 b);" "int dotEXT(uvec3 a, ivec3 b);" "uint dotEXT(uvec4 a, uvec4 b);" "int dotEXT(ivec4 a, ivec4 b);" "int dotEXT(ivec4 a, uvec4 b);" "int dotEXT(uvec4 a, ivec4 b);" "uint dotPacked4x8EXT(uint a, uint b);" "int dotPacked4x8EXT(int a, uint b);" "int dotPacked4x8EXT(uint a, int b);" "int dotPacked4x8EXT(int a, int b);" "uint dotEXT(u8vec2 a, u8vec2 b);" "int dotEXT(i8vec2 a, u8vec2 b);" "int dotEXT(u8vec2 a, i8vec2 b);" "int dotEXT(i8vec2 a, i8vec2 b);" "uint dotEXT(u8vec3 a, u8vec3 b);" "int dotEXT(i8vec3 a, u8vec3 b);" "int dotEXT(u8vec3 a, i8vec3 b);" "int dotEXT(i8vec3 a, i8vec3 b);" "uint dotEXT(u8vec4 a, u8vec4 b);" "int dotEXT(i8vec4 a, u8vec4 b);" "int dotEXT(u8vec4 a, i8vec4 b);" "int dotEXT(i8vec4 a, i8vec4 b);" "uint dotEXT(u16vec2 a, u16vec2 b);" "int dotEXT(i16vec2 a, u16vec2 b);" "int dotEXT(u16vec2 a, i16vec2 b);" "int dotEXT(i16vec2 a, i16vec2 b);" "uint dotEXT(u16vec3 a, u16vec3 b);" "int dotEXT(i16vec3 a, u16vec3 b);" "int dotEXT(u16vec3 a, i16vec3 b);" "int dotEXT(i16vec3 a, i16vec3 b);" "uint dotEXT(u16vec4 a, u16vec4 b);" "int dotEXT(i16vec4 a, u16vec4 b);" "int dotEXT(u16vec4 a, i16vec4 b);" "int dotEXT(i16vec4 a, i16vec4 b);" "uint64_t dotEXT(u64vec2 a, u64vec2 b);" "int64_t dotEXT(i64vec2 a, u64vec2 b);" "int64_t dotEXT(u64vec2 a, i64vec2 b);" "int64_t dotEXT(i64vec2 a, i64vec2 b);" "uint64_t dotEXT(u64vec3 a, u64vec3 b);" "int64_t dotEXT(i64vec3 a, u64vec3 b);" "int64_t dotEXT(u64vec3 a, i64vec3 b);" "int64_t dotEXT(i64vec3 a, i64vec3 b);" "uint64_t dotEXT(u64vec4 a, u64vec4 b);" "int64_t dotEXT(i64vec4 a, u64vec4 b);" "int64_t dotEXT(u64vec4 a, i64vec4 b);" "int64_t dotEXT(i64vec4 a, i64vec4 b);" "uint dotAccSatEXT(uvec2 a, uvec2 b, uint c);" "int dotAccSatEXT(ivec2 a, uvec2 b, int c);" "int dotAccSatEXT(uvec2 a, ivec2 b, int c);" "int dotAccSatEXT(ivec2 a, ivec2 b, int c);" "uint dotAccSatEXT(uvec3 a, uvec3 b, uint c);" "int dotAccSatEXT(ivec3 a, uvec3 b, int c);" "int dotAccSatEXT(uvec3 a, ivec3 b, int c);" "int dotAccSatEXT(ivec3 a, ivec3 b, int c);" "uint dotAccSatEXT(uvec4 a, uvec4 b, uint c);" "int dotAccSatEXT(ivec4 a, uvec4 b, int c);" "int dotAccSatEXT(uvec4 a, ivec4 b, int c);" "int dotAccSatEXT(ivec4 a, ivec4 b, int c);" "uint dotPacked4x8AccSatEXT(uint a, uint b, uint c);" "int dotPacked4x8AccSatEXT(int a, uint b, int c);" "int dotPacked4x8AccSatEXT(uint a, int b, int c);" "int dotPacked4x8AccSatEXT(int a, int b, int c);" "uint dotAccSatEXT(u8vec2 a, u8vec2 b, uint c);" "int dotAccSatEXT(i8vec2 a, u8vec2 b, int c);" "int dotAccSatEXT(u8vec2 a, i8vec2 b, int c);" "int dotAccSatEXT(i8vec2 a, i8vec2 b, int c);" "uint dotAccSatEXT(u8vec3 a, u8vec3 b, uint c);" "int dotAccSatEXT(i8vec3 a, u8vec3 b, int c);" "int dotAccSatEXT(u8vec3 a, i8vec3 b, int c);" "int dotAccSatEXT(i8vec3 a, i8vec3 b, int c);" "uint dotAccSatEXT(u8vec4 a, u8vec4 b, uint c);" "int dotAccSatEXT(i8vec4 a, u8vec4 b, int c);" "int dotAccSatEXT(u8vec4 a, i8vec4 b, int c);" "int dotAccSatEXT(i8vec4 a, i8vec4 b, int c);" "uint dotAccSatEXT(u16vec2 a, u16vec2 b, uint c);" "int dotAccSatEXT(i16vec2 a, u16vec2 b, int c);" "int dotAccSatEXT(u16vec2 a, i16vec2 b, int c);" "int dotAccSatEXT(i16vec2 a, i16vec2 b, int c);" "uint dotAccSatEXT(u16vec3 a, u16vec3 b, uint c);" "int dotAccSatEXT(i16vec3 a, u16vec3 b, int c);" "int dotAccSatEXT(u16vec3 a, i16vec3 b, int c);" "int dotAccSatEXT(i16vec3 a, i16vec3 b, int c);" "uint dotAccSatEXT(u16vec4 a, u16vec4 b, uint c);" "int dotAccSatEXT(i16vec4 a, u16vec4 b, int c);" "int dotAccSatEXT(u16vec4 a, i16vec4 b, int c);" "int dotAccSatEXT(i16vec4 a, i16vec4 b, int c);" "uint64_t dotAccSatEXT(u64vec2 a, u64vec2 b, uint64_t c);" "int64_t dotAccSatEXT(i64vec2 a, u64vec2 b, int64_t c);" "int64_t dotAccSatEXT(u64vec2 a, i64vec2 b, int64_t c);" "int64_t dotAccSatEXT(i64vec2 a, i64vec2 b, int64_t c);" "uint64_t dotAccSatEXT(u64vec3 a, u64vec3 b, uint64_t c);" "int64_t dotAccSatEXT(i64vec3 a, u64vec3 b, int64_t c);" "int64_t dotAccSatEXT(u64vec3 a, i64vec3 b, int64_t c);" "int64_t dotAccSatEXT(i64vec3 a, i64vec3 b, int64_t c);" "uint64_t dotAccSatEXT(u64vec4 a, u64vec4 b, uint64_t c);" "int64_t dotAccSatEXT(i64vec4 a, u64vec4 b, int64_t c);" "int64_t dotAccSatEXT(u64vec4 a, i64vec4 b, int64_t c);" "int64_t dotAccSatEXT(i64vec4 a, i64vec4 b, int64_t c);" "\n"); } // GL_KHR_shader_subgroup if ((profile == EEsProfile && version >= 310) || (profile != EEsProfile && version >= 140)) { commonBuiltins.append( "void subgroupBarrier();" "void subgroupMemoryBarrier();" "void subgroupMemoryBarrierBuffer();" "void subgroupMemoryBarrierImage();" "bool subgroupElect();" "bool subgroupAll(bool);\n" "bool subgroupAny(bool);\n" "uvec4 subgroupBallot(bool);\n" "bool subgroupInverseBallot(uvec4);\n" "bool subgroupBallotBitExtract(uvec4, uint);\n" "uint subgroupBallotBitCount(uvec4);\n" "uint subgroupBallotInclusiveBitCount(uvec4);\n" "uint subgroupBallotExclusiveBitCount(uvec4);\n" "uint subgroupBallotFindLSB(uvec4);\n" "uint subgroupBallotFindMSB(uvec4);\n" ); // Generate all flavors of subgroup ops. static const char *subgroupOps[] = { "bool subgroupAllEqual(%s);\n", "%s subgroupBroadcast(%s, uint);\n", "%s subgroupBroadcastFirst(%s);\n", "%s subgroupShuffle(%s, uint);\n", "%s subgroupShuffleXor(%s, uint);\n", "%s subgroupShuffleUp(%s, uint delta);\n", "%s subgroupShuffleDown(%s, uint delta);\n", "%s subgroupRotate(%s, uint);\n", "%s subgroupClusteredRotate(%s, uint, uint);\n", "%s subgroupAdd(%s);\n", "%s subgroupMul(%s);\n", "%s subgroupMin(%s);\n", "%s subgroupMax(%s);\n", "%s subgroupAnd(%s);\n", "%s subgroupOr(%s);\n", "%s subgroupXor(%s);\n", "%s subgroupInclusiveAdd(%s);\n", "%s subgroupInclusiveMul(%s);\n", "%s subgroupInclusiveMin(%s);\n", "%s subgroupInclusiveMax(%s);\n", "%s subgroupInclusiveAnd(%s);\n", "%s subgroupInclusiveOr(%s);\n", "%s subgroupInclusiveXor(%s);\n", "%s subgroupExclusiveAdd(%s);\n", "%s subgroupExclusiveMul(%s);\n", "%s subgroupExclusiveMin(%s);\n", "%s subgroupExclusiveMax(%s);\n", "%s subgroupExclusiveAnd(%s);\n", "%s subgroupExclusiveOr(%s);\n", "%s subgroupExclusiveXor(%s);\n", "%s subgroupClusteredAdd(%s, uint);\n", "%s subgroupClusteredMul(%s, uint);\n", "%s subgroupClusteredMin(%s, uint);\n", "%s subgroupClusteredMax(%s, uint);\n", "%s subgroupClusteredAnd(%s, uint);\n", "%s subgroupClusteredOr(%s, uint);\n", "%s subgroupClusteredXor(%s, uint);\n", "%s subgroupQuadBroadcast(%s, uint);\n", "%s subgroupQuadSwapHorizontal(%s);\n", "%s subgroupQuadSwapVertical(%s);\n", "%s subgroupQuadSwapDiagonal(%s);\n", "uvec4 subgroupPartitionNV(%s);\n", "%s subgroupPartitionedAddNV(%s, uvec4 ballot);\n", "%s subgroupPartitionedMulNV(%s, uvec4 ballot);\n", "%s subgroupPartitionedMinNV(%s, uvec4 ballot);\n", "%s subgroupPartitionedMaxNV(%s, uvec4 ballot);\n", "%s subgroupPartitionedAndNV(%s, uvec4 ballot);\n", "%s subgroupPartitionedOrNV(%s, uvec4 ballot);\n", "%s subgroupPartitionedXorNV(%s, uvec4 ballot);\n", "%s subgroupPartitionedInclusiveAddNV(%s, uvec4 ballot);\n", "%s subgroupPartitionedInclusiveMulNV(%s, uvec4 ballot);\n", "%s subgroupPartitionedInclusiveMinNV(%s, uvec4 ballot);\n", "%s subgroupPartitionedInclusiveMaxNV(%s, uvec4 ballot);\n", "%s subgroupPartitionedInclusiveAndNV(%s, uvec4 ballot);\n", "%s subgroupPartitionedInclusiveOrNV(%s, uvec4 ballot);\n", "%s subgroupPartitionedInclusiveXorNV(%s, uvec4 ballot);\n", "%s subgroupPartitionedExclusiveAddNV(%s, uvec4 ballot);\n", "%s subgroupPartitionedExclusiveMulNV(%s, uvec4 ballot);\n", "%s subgroupPartitionedExclusiveMinNV(%s, uvec4 ballot);\n", "%s subgroupPartitionedExclusiveMaxNV(%s, uvec4 ballot);\n", "%s subgroupPartitionedExclusiveAndNV(%s, uvec4 ballot);\n", "%s subgroupPartitionedExclusiveOrNV(%s, uvec4 ballot);\n", "%s subgroupPartitionedExclusiveXorNV(%s, uvec4 ballot);\n", }; static const char *floatTypes[] = { "float", "vec2", "vec3", "vec4", "float16_t", "f16vec2", "f16vec3", "f16vec4", }; static const char *doubleTypes[] = { "double", "dvec2", "dvec3", "dvec4", }; static const char *intTypes[] = { "int8_t", "i8vec2", "i8vec3", "i8vec4", "int16_t", "i16vec2", "i16vec3", "i16vec4", "int", "ivec2", "ivec3", "ivec4", "int64_t", "i64vec2", "i64vec3", "i64vec4", "uint8_t", "u8vec2", "u8vec3", "u8vec4", "uint16_t", "u16vec2", "u16vec3", "u16vec4", "uint", "uvec2", "uvec3", "uvec4", "uint64_t", "u64vec2", "u64vec3", "u64vec4", }; static const char *boolTypes[] = { "bool", "bvec2", "bvec3", "bvec4", }; for (size_t i = 0; i < sizeof(subgroupOps)/sizeof(subgroupOps[0]); ++i) { const char *op = subgroupOps[i]; // Logical operations don't support float bool logicalOp = strstr(op, "Or") || strstr(op, "And") || (strstr(op, "Xor") && !strstr(op, "ShuffleXor")); // Math operations don't support bool bool mathOp = strstr(op, "Add") || strstr(op, "Mul") || strstr(op, "Min") || strstr(op, "Max"); const int bufSize = 256; char buf[bufSize]; if (!logicalOp) { for (size_t j = 0; j < sizeof(floatTypes)/sizeof(floatTypes[0]); ++j) { snprintf(buf, bufSize, op, floatTypes[j], floatTypes[j]); commonBuiltins.append(buf); } if (profile != EEsProfile && version >= 400) { for (size_t j = 0; j < sizeof(doubleTypes)/sizeof(doubleTypes[0]); ++j) { snprintf(buf, bufSize, op, doubleTypes[j], doubleTypes[j]); commonBuiltins.append(buf); } } } if (!mathOp) { for (size_t j = 0; j < sizeof(boolTypes)/sizeof(boolTypes[0]); ++j) { snprintf(buf, bufSize, op, boolTypes[j], boolTypes[j]); commonBuiltins.append(buf); } } for (size_t j = 0; j < sizeof(intTypes)/sizeof(intTypes[0]); ++j) { snprintf(buf, bufSize, op, intTypes[j], intTypes[j]); commonBuiltins.append(buf); } } stageBuiltins[EShLangCompute].append( "void subgroupMemoryBarrierShared();" "\n" ); stageBuiltins[EShLangMesh].append( "void subgroupMemoryBarrierShared();" "\n" ); stageBuiltins[EShLangTask].append( "void subgroupMemoryBarrierShared();" "\n" ); } // GL_EXT_shader_quad_control if ((profile == EEsProfile && version >= 310) || (profile != EEsProfile && version >= 140)) { commonBuiltins.append( "bool subgroupQuadAll(bool);\n" "bool subgroupQuadAny(bool);\n" ); } if (profile != EEsProfile && version >= 460) { commonBuiltins.append( "bool anyInvocation(bool);" "bool allInvocations(bool);" "bool allInvocationsEqual(bool);" "\n"); } // GL_AMD_shader_ballot if (profile != EEsProfile && version >= 450) { commonBuiltins.append( "float minInvocationsAMD(float);" "vec2 minInvocationsAMD(vec2);" "vec3 minInvocationsAMD(vec3);" "vec4 minInvocationsAMD(vec4);" "int minInvocationsAMD(int);" "ivec2 minInvocationsAMD(ivec2);" "ivec3 minInvocationsAMD(ivec3);" "ivec4 minInvocationsAMD(ivec4);" "uint minInvocationsAMD(uint);" "uvec2 minInvocationsAMD(uvec2);" "uvec3 minInvocationsAMD(uvec3);" "uvec4 minInvocationsAMD(uvec4);" "double minInvocationsAMD(double);" "dvec2 minInvocationsAMD(dvec2);" "dvec3 minInvocationsAMD(dvec3);" "dvec4 minInvocationsAMD(dvec4);" "int64_t minInvocationsAMD(int64_t);" "i64vec2 minInvocationsAMD(i64vec2);" "i64vec3 minInvocationsAMD(i64vec3);" "i64vec4 minInvocationsAMD(i64vec4);" "uint64_t minInvocationsAMD(uint64_t);" "u64vec2 minInvocationsAMD(u64vec2);" "u64vec3 minInvocationsAMD(u64vec3);" "u64vec4 minInvocationsAMD(u64vec4);" "float16_t minInvocationsAMD(float16_t);" "f16vec2 minInvocationsAMD(f16vec2);" "f16vec3 minInvocationsAMD(f16vec3);" "f16vec4 minInvocationsAMD(f16vec4);" "int16_t minInvocationsAMD(int16_t);" "i16vec2 minInvocationsAMD(i16vec2);" "i16vec3 minInvocationsAMD(i16vec3);" "i16vec4 minInvocationsAMD(i16vec4);" "uint16_t minInvocationsAMD(uint16_t);" "u16vec2 minInvocationsAMD(u16vec2);" "u16vec3 minInvocationsAMD(u16vec3);" "u16vec4 minInvocationsAMD(u16vec4);" "float minInvocationsInclusiveScanAMD(float);" "vec2 minInvocationsInclusiveScanAMD(vec2);" "vec3 minInvocationsInclusiveScanAMD(vec3);" "vec4 minInvocationsInclusiveScanAMD(vec4);" "int minInvocationsInclusiveScanAMD(int);" "ivec2 minInvocationsInclusiveScanAMD(ivec2);" "ivec3 minInvocationsInclusiveScanAMD(ivec3);" "ivec4 minInvocationsInclusiveScanAMD(ivec4);" "uint minInvocationsInclusiveScanAMD(uint);" "uvec2 minInvocationsInclusiveScanAMD(uvec2);" "uvec3 minInvocationsInclusiveScanAMD(uvec3);" "uvec4 minInvocationsInclusiveScanAMD(uvec4);" "double minInvocationsInclusiveScanAMD(double);" "dvec2 minInvocationsInclusiveScanAMD(dvec2);" "dvec3 minInvocationsInclusiveScanAMD(dvec3);" "dvec4 minInvocationsInclusiveScanAMD(dvec4);" "int64_t minInvocationsInclusiveScanAMD(int64_t);" "i64vec2 minInvocationsInclusiveScanAMD(i64vec2);" "i64vec3 minInvocationsInclusiveScanAMD(i64vec3);" "i64vec4 minInvocationsInclusiveScanAMD(i64vec4);" "uint64_t minInvocationsInclusiveScanAMD(uint64_t);" "u64vec2 minInvocationsInclusiveScanAMD(u64vec2);" "u64vec3 minInvocationsInclusiveScanAMD(u64vec3);" "u64vec4 minInvocationsInclusiveScanAMD(u64vec4);" "float16_t minInvocationsInclusiveScanAMD(float16_t);" "f16vec2 minInvocationsInclusiveScanAMD(f16vec2);" "f16vec3 minInvocationsInclusiveScanAMD(f16vec3);" "f16vec4 minInvocationsInclusiveScanAMD(f16vec4);" "int16_t minInvocationsInclusiveScanAMD(int16_t);" "i16vec2 minInvocationsInclusiveScanAMD(i16vec2);" "i16vec3 minInvocationsInclusiveScanAMD(i16vec3);" "i16vec4 minInvocationsInclusiveScanAMD(i16vec4);" "uint16_t minInvocationsInclusiveScanAMD(uint16_t);" "u16vec2 minInvocationsInclusiveScanAMD(u16vec2);" "u16vec3 minInvocationsInclusiveScanAMD(u16vec3);" "u16vec4 minInvocationsInclusiveScanAMD(u16vec4);" "float minInvocationsExclusiveScanAMD(float);" "vec2 minInvocationsExclusiveScanAMD(vec2);" "vec3 minInvocationsExclusiveScanAMD(vec3);" "vec4 minInvocationsExclusiveScanAMD(vec4);" "int minInvocationsExclusiveScanAMD(int);" "ivec2 minInvocationsExclusiveScanAMD(ivec2);" "ivec3 minInvocationsExclusiveScanAMD(ivec3);" "ivec4 minInvocationsExclusiveScanAMD(ivec4);" "uint minInvocationsExclusiveScanAMD(uint);" "uvec2 minInvocationsExclusiveScanAMD(uvec2);" "uvec3 minInvocationsExclusiveScanAMD(uvec3);" "uvec4 minInvocationsExclusiveScanAMD(uvec4);" "double minInvocationsExclusiveScanAMD(double);" "dvec2 minInvocationsExclusiveScanAMD(dvec2);" "dvec3 minInvocationsExclusiveScanAMD(dvec3);" "dvec4 minInvocationsExclusiveScanAMD(dvec4);" "int64_t minInvocationsExclusiveScanAMD(int64_t);" "i64vec2 minInvocationsExclusiveScanAMD(i64vec2);" "i64vec3 minInvocationsExclusiveScanAMD(i64vec3);" "i64vec4 minInvocationsExclusiveScanAMD(i64vec4);" "uint64_t minInvocationsExclusiveScanAMD(uint64_t);" "u64vec2 minInvocationsExclusiveScanAMD(u64vec2);" "u64vec3 minInvocationsExclusiveScanAMD(u64vec3);" "u64vec4 minInvocationsExclusiveScanAMD(u64vec4);" "float16_t minInvocationsExclusiveScanAMD(float16_t);" "f16vec2 minInvocationsExclusiveScanAMD(f16vec2);" "f16vec3 minInvocationsExclusiveScanAMD(f16vec3);" "f16vec4 minInvocationsExclusiveScanAMD(f16vec4);" "int16_t minInvocationsExclusiveScanAMD(int16_t);" "i16vec2 minInvocationsExclusiveScanAMD(i16vec2);" "i16vec3 minInvocationsExclusiveScanAMD(i16vec3);" "i16vec4 minInvocationsExclusiveScanAMD(i16vec4);" "uint16_t minInvocationsExclusiveScanAMD(uint16_t);" "u16vec2 minInvocationsExclusiveScanAMD(u16vec2);" "u16vec3 minInvocationsExclusiveScanAMD(u16vec3);" "u16vec4 minInvocationsExclusiveScanAMD(u16vec4);" "float maxInvocationsAMD(float);" "vec2 maxInvocationsAMD(vec2);" "vec3 maxInvocationsAMD(vec3);" "vec4 maxInvocationsAMD(vec4);" "int maxInvocationsAMD(int);" "ivec2 maxInvocationsAMD(ivec2);" "ivec3 maxInvocationsAMD(ivec3);" "ivec4 maxInvocationsAMD(ivec4);" "uint maxInvocationsAMD(uint);" "uvec2 maxInvocationsAMD(uvec2);" "uvec3 maxInvocationsAMD(uvec3);" "uvec4 maxInvocationsAMD(uvec4);" "double maxInvocationsAMD(double);" "dvec2 maxInvocationsAMD(dvec2);" "dvec3 maxInvocationsAMD(dvec3);" "dvec4 maxInvocationsAMD(dvec4);" "int64_t maxInvocationsAMD(int64_t);" "i64vec2 maxInvocationsAMD(i64vec2);" "i64vec3 maxInvocationsAMD(i64vec3);" "i64vec4 maxInvocationsAMD(i64vec4);" "uint64_t maxInvocationsAMD(uint64_t);" "u64vec2 maxInvocationsAMD(u64vec2);" "u64vec3 maxInvocationsAMD(u64vec3);" "u64vec4 maxInvocationsAMD(u64vec4);" "float16_t maxInvocationsAMD(float16_t);" "f16vec2 maxInvocationsAMD(f16vec2);" "f16vec3 maxInvocationsAMD(f16vec3);" "f16vec4 maxInvocationsAMD(f16vec4);" "int16_t maxInvocationsAMD(int16_t);" "i16vec2 maxInvocationsAMD(i16vec2);" "i16vec3 maxInvocationsAMD(i16vec3);" "i16vec4 maxInvocationsAMD(i16vec4);" "uint16_t maxInvocationsAMD(uint16_t);" "u16vec2 maxInvocationsAMD(u16vec2);" "u16vec3 maxInvocationsAMD(u16vec3);" "u16vec4 maxInvocationsAMD(u16vec4);" "float maxInvocationsInclusiveScanAMD(float);" "vec2 maxInvocationsInclusiveScanAMD(vec2);" "vec3 maxInvocationsInclusiveScanAMD(vec3);" "vec4 maxInvocationsInclusiveScanAMD(vec4);" "int maxInvocationsInclusiveScanAMD(int);" "ivec2 maxInvocationsInclusiveScanAMD(ivec2);" "ivec3 maxInvocationsInclusiveScanAMD(ivec3);" "ivec4 maxInvocationsInclusiveScanAMD(ivec4);" "uint maxInvocationsInclusiveScanAMD(uint);" "uvec2 maxInvocationsInclusiveScanAMD(uvec2);" "uvec3 maxInvocationsInclusiveScanAMD(uvec3);" "uvec4 maxInvocationsInclusiveScanAMD(uvec4);" "double maxInvocationsInclusiveScanAMD(double);" "dvec2 maxInvocationsInclusiveScanAMD(dvec2);" "dvec3 maxInvocationsInclusiveScanAMD(dvec3);" "dvec4 maxInvocationsInclusiveScanAMD(dvec4);" "int64_t maxInvocationsInclusiveScanAMD(int64_t);" "i64vec2 maxInvocationsInclusiveScanAMD(i64vec2);" "i64vec3 maxInvocationsInclusiveScanAMD(i64vec3);" "i64vec4 maxInvocationsInclusiveScanAMD(i64vec4);" "uint64_t maxInvocationsInclusiveScanAMD(uint64_t);" "u64vec2 maxInvocationsInclusiveScanAMD(u64vec2);" "u64vec3 maxInvocationsInclusiveScanAMD(u64vec3);" "u64vec4 maxInvocationsInclusiveScanAMD(u64vec4);" "float16_t maxInvocationsInclusiveScanAMD(float16_t);" "f16vec2 maxInvocationsInclusiveScanAMD(f16vec2);" "f16vec3 maxInvocationsInclusiveScanAMD(f16vec3);" "f16vec4 maxInvocationsInclusiveScanAMD(f16vec4);" "int16_t maxInvocationsInclusiveScanAMD(int16_t);" "i16vec2 maxInvocationsInclusiveScanAMD(i16vec2);" "i16vec3 maxInvocationsInclusiveScanAMD(i16vec3);" "i16vec4 maxInvocationsInclusiveScanAMD(i16vec4);" "uint16_t maxInvocationsInclusiveScanAMD(uint16_t);" "u16vec2 maxInvocationsInclusiveScanAMD(u16vec2);" "u16vec3 maxInvocationsInclusiveScanAMD(u16vec3);" "u16vec4 maxInvocationsInclusiveScanAMD(u16vec4);" "float maxInvocationsExclusiveScanAMD(float);" "vec2 maxInvocationsExclusiveScanAMD(vec2);" "vec3 maxInvocationsExclusiveScanAMD(vec3);" "vec4 maxInvocationsExclusiveScanAMD(vec4);" "int maxInvocationsExclusiveScanAMD(int);" "ivec2 maxInvocationsExclusiveScanAMD(ivec2);" "ivec3 maxInvocationsExclusiveScanAMD(ivec3);" "ivec4 maxInvocationsExclusiveScanAMD(ivec4);" "uint maxInvocationsExclusiveScanAMD(uint);" "uvec2 maxInvocationsExclusiveScanAMD(uvec2);" "uvec3 maxInvocationsExclusiveScanAMD(uvec3);" "uvec4 maxInvocationsExclusiveScanAMD(uvec4);" "double maxInvocationsExclusiveScanAMD(double);" "dvec2 maxInvocationsExclusiveScanAMD(dvec2);" "dvec3 maxInvocationsExclusiveScanAMD(dvec3);" "dvec4 maxInvocationsExclusiveScanAMD(dvec4);" "int64_t maxInvocationsExclusiveScanAMD(int64_t);" "i64vec2 maxInvocationsExclusiveScanAMD(i64vec2);" "i64vec3 maxInvocationsExclusiveScanAMD(i64vec3);" "i64vec4 maxInvocationsExclusiveScanAMD(i64vec4);" "uint64_t maxInvocationsExclusiveScanAMD(uint64_t);" "u64vec2 maxInvocationsExclusiveScanAMD(u64vec2);" "u64vec3 maxInvocationsExclusiveScanAMD(u64vec3);" "u64vec4 maxInvocationsExclusiveScanAMD(u64vec4);" "float16_t maxInvocationsExclusiveScanAMD(float16_t);" "f16vec2 maxInvocationsExclusiveScanAMD(f16vec2);" "f16vec3 maxInvocationsExclusiveScanAMD(f16vec3);" "f16vec4 maxInvocationsExclusiveScanAMD(f16vec4);" "int16_t maxInvocationsExclusiveScanAMD(int16_t);" "i16vec2 maxInvocationsExclusiveScanAMD(i16vec2);" "i16vec3 maxInvocationsExclusiveScanAMD(i16vec3);" "i16vec4 maxInvocationsExclusiveScanAMD(i16vec4);" "uint16_t maxInvocationsExclusiveScanAMD(uint16_t);" "u16vec2 maxInvocationsExclusiveScanAMD(u16vec2);" "u16vec3 maxInvocationsExclusiveScanAMD(u16vec3);" "u16vec4 maxInvocationsExclusiveScanAMD(u16vec4);" "float addInvocationsAMD(float);" "vec2 addInvocationsAMD(vec2);" "vec3 addInvocationsAMD(vec3);" "vec4 addInvocationsAMD(vec4);" "int addInvocationsAMD(int);" "ivec2 addInvocationsAMD(ivec2);" "ivec3 addInvocationsAMD(ivec3);" "ivec4 addInvocationsAMD(ivec4);" "uint addInvocationsAMD(uint);" "uvec2 addInvocationsAMD(uvec2);" "uvec3 addInvocationsAMD(uvec3);" "uvec4 addInvocationsAMD(uvec4);" "double addInvocationsAMD(double);" "dvec2 addInvocationsAMD(dvec2);" "dvec3 addInvocationsAMD(dvec3);" "dvec4 addInvocationsAMD(dvec4);" "int64_t addInvocationsAMD(int64_t);" "i64vec2 addInvocationsAMD(i64vec2);" "i64vec3 addInvocationsAMD(i64vec3);" "i64vec4 addInvocationsAMD(i64vec4);" "uint64_t addInvocationsAMD(uint64_t);" "u64vec2 addInvocationsAMD(u64vec2);" "u64vec3 addInvocationsAMD(u64vec3);" "u64vec4 addInvocationsAMD(u64vec4);" "float16_t addInvocationsAMD(float16_t);" "f16vec2 addInvocationsAMD(f16vec2);" "f16vec3 addInvocationsAMD(f16vec3);" "f16vec4 addInvocationsAMD(f16vec4);" "int16_t addInvocationsAMD(int16_t);" "i16vec2 addInvocationsAMD(i16vec2);" "i16vec3 addInvocationsAMD(i16vec3);" "i16vec4 addInvocationsAMD(i16vec4);" "uint16_t addInvocationsAMD(uint16_t);" "u16vec2 addInvocationsAMD(u16vec2);" "u16vec3 addInvocationsAMD(u16vec3);" "u16vec4 addInvocationsAMD(u16vec4);" "float addInvocationsInclusiveScanAMD(float);" "vec2 addInvocationsInclusiveScanAMD(vec2);" "vec3 addInvocationsInclusiveScanAMD(vec3);" "vec4 addInvocationsInclusiveScanAMD(vec4);" "int addInvocationsInclusiveScanAMD(int);" "ivec2 addInvocationsInclusiveScanAMD(ivec2);" "ivec3 addInvocationsInclusiveScanAMD(ivec3);" "ivec4 addInvocationsInclusiveScanAMD(ivec4);" "uint addInvocationsInclusiveScanAMD(uint);" "uvec2 addInvocationsInclusiveScanAMD(uvec2);" "uvec3 addInvocationsInclusiveScanAMD(uvec3);" "uvec4 addInvocationsInclusiveScanAMD(uvec4);" "double addInvocationsInclusiveScanAMD(double);" "dvec2 addInvocationsInclusiveScanAMD(dvec2);" "dvec3 addInvocationsInclusiveScanAMD(dvec3);" "dvec4 addInvocationsInclusiveScanAMD(dvec4);" "int64_t addInvocationsInclusiveScanAMD(int64_t);" "i64vec2 addInvocationsInclusiveScanAMD(i64vec2);" "i64vec3 addInvocationsInclusiveScanAMD(i64vec3);" "i64vec4 addInvocationsInclusiveScanAMD(i64vec4);" "uint64_t addInvocationsInclusiveScanAMD(uint64_t);" "u64vec2 addInvocationsInclusiveScanAMD(u64vec2);" "u64vec3 addInvocationsInclusiveScanAMD(u64vec3);" "u64vec4 addInvocationsInclusiveScanAMD(u64vec4);" "float16_t addInvocationsInclusiveScanAMD(float16_t);" "f16vec2 addInvocationsInclusiveScanAMD(f16vec2);" "f16vec3 addInvocationsInclusiveScanAMD(f16vec3);" "f16vec4 addInvocationsInclusiveScanAMD(f16vec4);" "int16_t addInvocationsInclusiveScanAMD(int16_t);" "i16vec2 addInvocationsInclusiveScanAMD(i16vec2);" "i16vec3 addInvocationsInclusiveScanAMD(i16vec3);" "i16vec4 addInvocationsInclusiveScanAMD(i16vec4);" "uint16_t addInvocationsInclusiveScanAMD(uint16_t);" "u16vec2 addInvocationsInclusiveScanAMD(u16vec2);" "u16vec3 addInvocationsInclusiveScanAMD(u16vec3);" "u16vec4 addInvocationsInclusiveScanAMD(u16vec4);" "float addInvocationsExclusiveScanAMD(float);" "vec2 addInvocationsExclusiveScanAMD(vec2);" "vec3 addInvocationsExclusiveScanAMD(vec3);" "vec4 addInvocationsExclusiveScanAMD(vec4);" "int addInvocationsExclusiveScanAMD(int);" "ivec2 addInvocationsExclusiveScanAMD(ivec2);" "ivec3 addInvocationsExclusiveScanAMD(ivec3);" "ivec4 addInvocationsExclusiveScanAMD(ivec4);" "uint addInvocationsExclusiveScanAMD(uint);" "uvec2 addInvocationsExclusiveScanAMD(uvec2);" "uvec3 addInvocationsExclusiveScanAMD(uvec3);" "uvec4 addInvocationsExclusiveScanAMD(uvec4);" "double addInvocationsExclusiveScanAMD(double);" "dvec2 addInvocationsExclusiveScanAMD(dvec2);" "dvec3 addInvocationsExclusiveScanAMD(dvec3);" "dvec4 addInvocationsExclusiveScanAMD(dvec4);" "int64_t addInvocationsExclusiveScanAMD(int64_t);" "i64vec2 addInvocationsExclusiveScanAMD(i64vec2);" "i64vec3 addInvocationsExclusiveScanAMD(i64vec3);" "i64vec4 addInvocationsExclusiveScanAMD(i64vec4);" "uint64_t addInvocationsExclusiveScanAMD(uint64_t);" "u64vec2 addInvocationsExclusiveScanAMD(u64vec2);" "u64vec3 addInvocationsExclusiveScanAMD(u64vec3);" "u64vec4 addInvocationsExclusiveScanAMD(u64vec4);" "float16_t addInvocationsExclusiveScanAMD(float16_t);" "f16vec2 addInvocationsExclusiveScanAMD(f16vec2);" "f16vec3 addInvocationsExclusiveScanAMD(f16vec3);" "f16vec4 addInvocationsExclusiveScanAMD(f16vec4);" "int16_t addInvocationsExclusiveScanAMD(int16_t);" "i16vec2 addInvocationsExclusiveScanAMD(i16vec2);" "i16vec3 addInvocationsExclusiveScanAMD(i16vec3);" "i16vec4 addInvocationsExclusiveScanAMD(i16vec4);" "uint16_t addInvocationsExclusiveScanAMD(uint16_t);" "u16vec2 addInvocationsExclusiveScanAMD(u16vec2);" "u16vec3 addInvocationsExclusiveScanAMD(u16vec3);" "u16vec4 addInvocationsExclusiveScanAMD(u16vec4);" "float minInvocationsNonUniformAMD(float);" "vec2 minInvocationsNonUniformAMD(vec2);" "vec3 minInvocationsNonUniformAMD(vec3);" "vec4 minInvocationsNonUniformAMD(vec4);" "int minInvocationsNonUniformAMD(int);" "ivec2 minInvocationsNonUniformAMD(ivec2);" "ivec3 minInvocationsNonUniformAMD(ivec3);" "ivec4 minInvocationsNonUniformAMD(ivec4);" "uint minInvocationsNonUniformAMD(uint);" "uvec2 minInvocationsNonUniformAMD(uvec2);" "uvec3 minInvocationsNonUniformAMD(uvec3);" "uvec4 minInvocationsNonUniformAMD(uvec4);" "double minInvocationsNonUniformAMD(double);" "dvec2 minInvocationsNonUniformAMD(dvec2);" "dvec3 minInvocationsNonUniformAMD(dvec3);" "dvec4 minInvocationsNonUniformAMD(dvec4);" "int64_t minInvocationsNonUniformAMD(int64_t);" "i64vec2 minInvocationsNonUniformAMD(i64vec2);" "i64vec3 minInvocationsNonUniformAMD(i64vec3);" "i64vec4 minInvocationsNonUniformAMD(i64vec4);" "uint64_t minInvocationsNonUniformAMD(uint64_t);" "u64vec2 minInvocationsNonUniformAMD(u64vec2);" "u64vec3 minInvocationsNonUniformAMD(u64vec3);" "u64vec4 minInvocationsNonUniformAMD(u64vec4);" "float16_t minInvocationsNonUniformAMD(float16_t);" "f16vec2 minInvocationsNonUniformAMD(f16vec2);" "f16vec3 minInvocationsNonUniformAMD(f16vec3);" "f16vec4 minInvocationsNonUniformAMD(f16vec4);" "int16_t minInvocationsNonUniformAMD(int16_t);" "i16vec2 minInvocationsNonUniformAMD(i16vec2);" "i16vec3 minInvocationsNonUniformAMD(i16vec3);" "i16vec4 minInvocationsNonUniformAMD(i16vec4);" "uint16_t minInvocationsNonUniformAMD(uint16_t);" "u16vec2 minInvocationsNonUniformAMD(u16vec2);" "u16vec3 minInvocationsNonUniformAMD(u16vec3);" "u16vec4 minInvocationsNonUniformAMD(u16vec4);" "float minInvocationsInclusiveScanNonUniformAMD(float);" "vec2 minInvocationsInclusiveScanNonUniformAMD(vec2);" "vec3 minInvocationsInclusiveScanNonUniformAMD(vec3);" "vec4 minInvocationsInclusiveScanNonUniformAMD(vec4);" "int minInvocationsInclusiveScanNonUniformAMD(int);" "ivec2 minInvocationsInclusiveScanNonUniformAMD(ivec2);" "ivec3 minInvocationsInclusiveScanNonUniformAMD(ivec3);" "ivec4 minInvocationsInclusiveScanNonUniformAMD(ivec4);" "uint minInvocationsInclusiveScanNonUniformAMD(uint);" "uvec2 minInvocationsInclusiveScanNonUniformAMD(uvec2);" "uvec3 minInvocationsInclusiveScanNonUniformAMD(uvec3);" "uvec4 minInvocationsInclusiveScanNonUniformAMD(uvec4);" "double minInvocationsInclusiveScanNonUniformAMD(double);" "dvec2 minInvocationsInclusiveScanNonUniformAMD(dvec2);" "dvec3 minInvocationsInclusiveScanNonUniformAMD(dvec3);" "dvec4 minInvocationsInclusiveScanNonUniformAMD(dvec4);" "int64_t minInvocationsInclusiveScanNonUniformAMD(int64_t);" "i64vec2 minInvocationsInclusiveScanNonUniformAMD(i64vec2);" "i64vec3 minInvocationsInclusiveScanNonUniformAMD(i64vec3);" "i64vec4 minInvocationsInclusiveScanNonUniformAMD(i64vec4);" "uint64_t minInvocationsInclusiveScanNonUniformAMD(uint64_t);" "u64vec2 minInvocationsInclusiveScanNonUniformAMD(u64vec2);" "u64vec3 minInvocationsInclusiveScanNonUniformAMD(u64vec3);" "u64vec4 minInvocationsInclusiveScanNonUniformAMD(u64vec4);" "float16_t minInvocationsInclusiveScanNonUniformAMD(float16_t);" "f16vec2 minInvocationsInclusiveScanNonUniformAMD(f16vec2);" "f16vec3 minInvocationsInclusiveScanNonUniformAMD(f16vec3);" "f16vec4 minInvocationsInclusiveScanNonUniformAMD(f16vec4);" "int16_t minInvocationsInclusiveScanNonUniformAMD(int16_t);" "i16vec2 minInvocationsInclusiveScanNonUniformAMD(i16vec2);" "i16vec3 minInvocationsInclusiveScanNonUniformAMD(i16vec3);" "i16vec4 minInvocationsInclusiveScanNonUniformAMD(i16vec4);" "uint16_t minInvocationsInclusiveScanNonUniformAMD(uint16_t);" "u16vec2 minInvocationsInclusiveScanNonUniformAMD(u16vec2);" "u16vec3 minInvocationsInclusiveScanNonUniformAMD(u16vec3);" "u16vec4 minInvocationsInclusiveScanNonUniformAMD(u16vec4);" "float minInvocationsExclusiveScanNonUniformAMD(float);" "vec2 minInvocationsExclusiveScanNonUniformAMD(vec2);" "vec3 minInvocationsExclusiveScanNonUniformAMD(vec3);" "vec4 minInvocationsExclusiveScanNonUniformAMD(vec4);" "int minInvocationsExclusiveScanNonUniformAMD(int);" "ivec2 minInvocationsExclusiveScanNonUniformAMD(ivec2);" "ivec3 minInvocationsExclusiveScanNonUniformAMD(ivec3);" "ivec4 minInvocationsExclusiveScanNonUniformAMD(ivec4);" "uint minInvocationsExclusiveScanNonUniformAMD(uint);" "uvec2 minInvocationsExclusiveScanNonUniformAMD(uvec2);" "uvec3 minInvocationsExclusiveScanNonUniformAMD(uvec3);" "uvec4 minInvocationsExclusiveScanNonUniformAMD(uvec4);" "double minInvocationsExclusiveScanNonUniformAMD(double);" "dvec2 minInvocationsExclusiveScanNonUniformAMD(dvec2);" "dvec3 minInvocationsExclusiveScanNonUniformAMD(dvec3);" "dvec4 minInvocationsExclusiveScanNonUniformAMD(dvec4);" "int64_t minInvocationsExclusiveScanNonUniformAMD(int64_t);" "i64vec2 minInvocationsExclusiveScanNonUniformAMD(i64vec2);" "i64vec3 minInvocationsExclusiveScanNonUniformAMD(i64vec3);" "i64vec4 minInvocationsExclusiveScanNonUniformAMD(i64vec4);" "uint64_t minInvocationsExclusiveScanNonUniformAMD(uint64_t);" "u64vec2 minInvocationsExclusiveScanNonUniformAMD(u64vec2);" "u64vec3 minInvocationsExclusiveScanNonUniformAMD(u64vec3);" "u64vec4 minInvocationsExclusiveScanNonUniformAMD(u64vec4);" "float16_t minInvocationsExclusiveScanNonUniformAMD(float16_t);" "f16vec2 minInvocationsExclusiveScanNonUniformAMD(f16vec2);" "f16vec3 minInvocationsExclusiveScanNonUniformAMD(f16vec3);" "f16vec4 minInvocationsExclusiveScanNonUniformAMD(f16vec4);" "int16_t minInvocationsExclusiveScanNonUniformAMD(int16_t);" "i16vec2 minInvocationsExclusiveScanNonUniformAMD(i16vec2);" "i16vec3 minInvocationsExclusiveScanNonUniformAMD(i16vec3);" "i16vec4 minInvocationsExclusiveScanNonUniformAMD(i16vec4);" "uint16_t minInvocationsExclusiveScanNonUniformAMD(uint16_t);" "u16vec2 minInvocationsExclusiveScanNonUniformAMD(u16vec2);" "u16vec3 minInvocationsExclusiveScanNonUniformAMD(u16vec3);" "u16vec4 minInvocationsExclusiveScanNonUniformAMD(u16vec4);" "float maxInvocationsNonUniformAMD(float);" "vec2 maxInvocationsNonUniformAMD(vec2);" "vec3 maxInvocationsNonUniformAMD(vec3);" "vec4 maxInvocationsNonUniformAMD(vec4);" "int maxInvocationsNonUniformAMD(int);" "ivec2 maxInvocationsNonUniformAMD(ivec2);" "ivec3 maxInvocationsNonUniformAMD(ivec3);" "ivec4 maxInvocationsNonUniformAMD(ivec4);" "uint maxInvocationsNonUniformAMD(uint);" "uvec2 maxInvocationsNonUniformAMD(uvec2);" "uvec3 maxInvocationsNonUniformAMD(uvec3);" "uvec4 maxInvocationsNonUniformAMD(uvec4);" "double maxInvocationsNonUniformAMD(double);" "dvec2 maxInvocationsNonUniformAMD(dvec2);" "dvec3 maxInvocationsNonUniformAMD(dvec3);" "dvec4 maxInvocationsNonUniformAMD(dvec4);" "int64_t maxInvocationsNonUniformAMD(int64_t);" "i64vec2 maxInvocationsNonUniformAMD(i64vec2);" "i64vec3 maxInvocationsNonUniformAMD(i64vec3);" "i64vec4 maxInvocationsNonUniformAMD(i64vec4);" "uint64_t maxInvocationsNonUniformAMD(uint64_t);" "u64vec2 maxInvocationsNonUniformAMD(u64vec2);" "u64vec3 maxInvocationsNonUniformAMD(u64vec3);" "u64vec4 maxInvocationsNonUniformAMD(u64vec4);" "float16_t maxInvocationsNonUniformAMD(float16_t);" "f16vec2 maxInvocationsNonUniformAMD(f16vec2);" "f16vec3 maxInvocationsNonUniformAMD(f16vec3);" "f16vec4 maxInvocationsNonUniformAMD(f16vec4);" "int16_t maxInvocationsNonUniformAMD(int16_t);" "i16vec2 maxInvocationsNonUniformAMD(i16vec2);" "i16vec3 maxInvocationsNonUniformAMD(i16vec3);" "i16vec4 maxInvocationsNonUniformAMD(i16vec4);" "uint16_t maxInvocationsNonUniformAMD(uint16_t);" "u16vec2 maxInvocationsNonUniformAMD(u16vec2);" "u16vec3 maxInvocationsNonUniformAMD(u16vec3);" "u16vec4 maxInvocationsNonUniformAMD(u16vec4);" "float maxInvocationsInclusiveScanNonUniformAMD(float);" "vec2 maxInvocationsInclusiveScanNonUniformAMD(vec2);" "vec3 maxInvocationsInclusiveScanNonUniformAMD(vec3);" "vec4 maxInvocationsInclusiveScanNonUniformAMD(vec4);" "int maxInvocationsInclusiveScanNonUniformAMD(int);" "ivec2 maxInvocationsInclusiveScanNonUniformAMD(ivec2);" "ivec3 maxInvocationsInclusiveScanNonUniformAMD(ivec3);" "ivec4 maxInvocationsInclusiveScanNonUniformAMD(ivec4);" "uint maxInvocationsInclusiveScanNonUniformAMD(uint);" "uvec2 maxInvocationsInclusiveScanNonUniformAMD(uvec2);" "uvec3 maxInvocationsInclusiveScanNonUniformAMD(uvec3);" "uvec4 maxInvocationsInclusiveScanNonUniformAMD(uvec4);" "double maxInvocationsInclusiveScanNonUniformAMD(double);" "dvec2 maxInvocationsInclusiveScanNonUniformAMD(dvec2);" "dvec3 maxInvocationsInclusiveScanNonUniformAMD(dvec3);" "dvec4 maxInvocationsInclusiveScanNonUniformAMD(dvec4);" "int64_t maxInvocationsInclusiveScanNonUniformAMD(int64_t);" "i64vec2 maxInvocationsInclusiveScanNonUniformAMD(i64vec2);" "i64vec3 maxInvocationsInclusiveScanNonUniformAMD(i64vec3);" "i64vec4 maxInvocationsInclusiveScanNonUniformAMD(i64vec4);" "uint64_t maxInvocationsInclusiveScanNonUniformAMD(uint64_t);" "u64vec2 maxInvocationsInclusiveScanNonUniformAMD(u64vec2);" "u64vec3 maxInvocationsInclusiveScanNonUniformAMD(u64vec3);" "u64vec4 maxInvocationsInclusiveScanNonUniformAMD(u64vec4);" "float16_t maxInvocationsInclusiveScanNonUniformAMD(float16_t);" "f16vec2 maxInvocationsInclusiveScanNonUniformAMD(f16vec2);" "f16vec3 maxInvocationsInclusiveScanNonUniformAMD(f16vec3);" "f16vec4 maxInvocationsInclusiveScanNonUniformAMD(f16vec4);" "int16_t maxInvocationsInclusiveScanNonUniformAMD(int16_t);" "i16vec2 maxInvocationsInclusiveScanNonUniformAMD(i16vec2);" "i16vec3 maxInvocationsInclusiveScanNonUniformAMD(i16vec3);" "i16vec4 maxInvocationsInclusiveScanNonUniformAMD(i16vec4);" "uint16_t maxInvocationsInclusiveScanNonUniformAMD(uint16_t);" "u16vec2 maxInvocationsInclusiveScanNonUniformAMD(u16vec2);" "u16vec3 maxInvocationsInclusiveScanNonUniformAMD(u16vec3);" "u16vec4 maxInvocationsInclusiveScanNonUniformAMD(u16vec4);" "float maxInvocationsExclusiveScanNonUniformAMD(float);" "vec2 maxInvocationsExclusiveScanNonUniformAMD(vec2);" "vec3 maxInvocationsExclusiveScanNonUniformAMD(vec3);" "vec4 maxInvocationsExclusiveScanNonUniformAMD(vec4);" "int maxInvocationsExclusiveScanNonUniformAMD(int);" "ivec2 maxInvocationsExclusiveScanNonUniformAMD(ivec2);" "ivec3 maxInvocationsExclusiveScanNonUniformAMD(ivec3);" "ivec4 maxInvocationsExclusiveScanNonUniformAMD(ivec4);" "uint maxInvocationsExclusiveScanNonUniformAMD(uint);" "uvec2 maxInvocationsExclusiveScanNonUniformAMD(uvec2);" "uvec3 maxInvocationsExclusiveScanNonUniformAMD(uvec3);" "uvec4 maxInvocationsExclusiveScanNonUniformAMD(uvec4);" "double maxInvocationsExclusiveScanNonUniformAMD(double);" "dvec2 maxInvocationsExclusiveScanNonUniformAMD(dvec2);" "dvec3 maxInvocationsExclusiveScanNonUniformAMD(dvec3);" "dvec4 maxInvocationsExclusiveScanNonUniformAMD(dvec4);" "int64_t maxInvocationsExclusiveScanNonUniformAMD(int64_t);" "i64vec2 maxInvocationsExclusiveScanNonUniformAMD(i64vec2);" "i64vec3 maxInvocationsExclusiveScanNonUniformAMD(i64vec3);" "i64vec4 maxInvocationsExclusiveScanNonUniformAMD(i64vec4);" "uint64_t maxInvocationsExclusiveScanNonUniformAMD(uint64_t);" "u64vec2 maxInvocationsExclusiveScanNonUniformAMD(u64vec2);" "u64vec3 maxInvocationsExclusiveScanNonUniformAMD(u64vec3);" "u64vec4 maxInvocationsExclusiveScanNonUniformAMD(u64vec4);" "float16_t maxInvocationsExclusiveScanNonUniformAMD(float16_t);" "f16vec2 maxInvocationsExclusiveScanNonUniformAMD(f16vec2);" "f16vec3 maxInvocationsExclusiveScanNonUniformAMD(f16vec3);" "f16vec4 maxInvocationsExclusiveScanNonUniformAMD(f16vec4);" "int16_t maxInvocationsExclusiveScanNonUniformAMD(int16_t);" "i16vec2 maxInvocationsExclusiveScanNonUniformAMD(i16vec2);" "i16vec3 maxInvocationsExclusiveScanNonUniformAMD(i16vec3);" "i16vec4 maxInvocationsExclusiveScanNonUniformAMD(i16vec4);" "uint16_t maxInvocationsExclusiveScanNonUniformAMD(uint16_t);" "u16vec2 maxInvocationsExclusiveScanNonUniformAMD(u16vec2);" "u16vec3 maxInvocationsExclusiveScanNonUniformAMD(u16vec3);" "u16vec4 maxInvocationsExclusiveScanNonUniformAMD(u16vec4);" "float addInvocationsNonUniformAMD(float);" "vec2 addInvocationsNonUniformAMD(vec2);" "vec3 addInvocationsNonUniformAMD(vec3);" "vec4 addInvocationsNonUniformAMD(vec4);" "int addInvocationsNonUniformAMD(int);" "ivec2 addInvocationsNonUniformAMD(ivec2);" "ivec3 addInvocationsNonUniformAMD(ivec3);" "ivec4 addInvocationsNonUniformAMD(ivec4);" "uint addInvocationsNonUniformAMD(uint);" "uvec2 addInvocationsNonUniformAMD(uvec2);" "uvec3 addInvocationsNonUniformAMD(uvec3);" "uvec4 addInvocationsNonUniformAMD(uvec4);" "double addInvocationsNonUniformAMD(double);" "dvec2 addInvocationsNonUniformAMD(dvec2);" "dvec3 addInvocationsNonUniformAMD(dvec3);" "dvec4 addInvocationsNonUniformAMD(dvec4);" "int64_t addInvocationsNonUniformAMD(int64_t);" "i64vec2 addInvocationsNonUniformAMD(i64vec2);" "i64vec3 addInvocationsNonUniformAMD(i64vec3);" "i64vec4 addInvocationsNonUniformAMD(i64vec4);" "uint64_t addInvocationsNonUniformAMD(uint64_t);" "u64vec2 addInvocationsNonUniformAMD(u64vec2);" "u64vec3 addInvocationsNonUniformAMD(u64vec3);" "u64vec4 addInvocationsNonUniformAMD(u64vec4);" "float16_t addInvocationsNonUniformAMD(float16_t);" "f16vec2 addInvocationsNonUniformAMD(f16vec2);" "f16vec3 addInvocationsNonUniformAMD(f16vec3);" "f16vec4 addInvocationsNonUniformAMD(f16vec4);" "int16_t addInvocationsNonUniformAMD(int16_t);" "i16vec2 addInvocationsNonUniformAMD(i16vec2);" "i16vec3 addInvocationsNonUniformAMD(i16vec3);" "i16vec4 addInvocationsNonUniformAMD(i16vec4);" "uint16_t addInvocationsNonUniformAMD(uint16_t);" "u16vec2 addInvocationsNonUniformAMD(u16vec2);" "u16vec3 addInvocationsNonUniformAMD(u16vec3);" "u16vec4 addInvocationsNonUniformAMD(u16vec4);" "float addInvocationsInclusiveScanNonUniformAMD(float);" "vec2 addInvocationsInclusiveScanNonUniformAMD(vec2);" "vec3 addInvocationsInclusiveScanNonUniformAMD(vec3);" "vec4 addInvocationsInclusiveScanNonUniformAMD(vec4);" "int addInvocationsInclusiveScanNonUniformAMD(int);" "ivec2 addInvocationsInclusiveScanNonUniformAMD(ivec2);" "ivec3 addInvocationsInclusiveScanNonUniformAMD(ivec3);" "ivec4 addInvocationsInclusiveScanNonUniformAMD(ivec4);" "uint addInvocationsInclusiveScanNonUniformAMD(uint);" "uvec2 addInvocationsInclusiveScanNonUniformAMD(uvec2);" "uvec3 addInvocationsInclusiveScanNonUniformAMD(uvec3);" "uvec4 addInvocationsInclusiveScanNonUniformAMD(uvec4);" "double addInvocationsInclusiveScanNonUniformAMD(double);" "dvec2 addInvocationsInclusiveScanNonUniformAMD(dvec2);" "dvec3 addInvocationsInclusiveScanNonUniformAMD(dvec3);" "dvec4 addInvocationsInclusiveScanNonUniformAMD(dvec4);" "int64_t addInvocationsInclusiveScanNonUniformAMD(int64_t);" "i64vec2 addInvocationsInclusiveScanNonUniformAMD(i64vec2);" "i64vec3 addInvocationsInclusiveScanNonUniformAMD(i64vec3);" "i64vec4 addInvocationsInclusiveScanNonUniformAMD(i64vec4);" "uint64_t addInvocationsInclusiveScanNonUniformAMD(uint64_t);" "u64vec2 addInvocationsInclusiveScanNonUniformAMD(u64vec2);" "u64vec3 addInvocationsInclusiveScanNonUniformAMD(u64vec3);" "u64vec4 addInvocationsInclusiveScanNonUniformAMD(u64vec4);" "float16_t addInvocationsInclusiveScanNonUniformAMD(float16_t);" "f16vec2 addInvocationsInclusiveScanNonUniformAMD(f16vec2);" "f16vec3 addInvocationsInclusiveScanNonUniformAMD(f16vec3);" "f16vec4 addInvocationsInclusiveScanNonUniformAMD(f16vec4);" "int16_t addInvocationsInclusiveScanNonUniformAMD(int16_t);" "i16vec2 addInvocationsInclusiveScanNonUniformAMD(i16vec2);" "i16vec3 addInvocationsInclusiveScanNonUniformAMD(i16vec3);" "i16vec4 addInvocationsInclusiveScanNonUniformAMD(i16vec4);" "uint16_t addInvocationsInclusiveScanNonUniformAMD(uint16_t);" "u16vec2 addInvocationsInclusiveScanNonUniformAMD(u16vec2);" "u16vec3 addInvocationsInclusiveScanNonUniformAMD(u16vec3);" "u16vec4 addInvocationsInclusiveScanNonUniformAMD(u16vec4);" "float addInvocationsExclusiveScanNonUniformAMD(float);" "vec2 addInvocationsExclusiveScanNonUniformAMD(vec2);" "vec3 addInvocationsExclusiveScanNonUniformAMD(vec3);" "vec4 addInvocationsExclusiveScanNonUniformAMD(vec4);" "int addInvocationsExclusiveScanNonUniformAMD(int);" "ivec2 addInvocationsExclusiveScanNonUniformAMD(ivec2);" "ivec3 addInvocationsExclusiveScanNonUniformAMD(ivec3);" "ivec4 addInvocationsExclusiveScanNonUniformAMD(ivec4);" "uint addInvocationsExclusiveScanNonUniformAMD(uint);" "uvec2 addInvocationsExclusiveScanNonUniformAMD(uvec2);" "uvec3 addInvocationsExclusiveScanNonUniformAMD(uvec3);" "uvec4 addInvocationsExclusiveScanNonUniformAMD(uvec4);" "double addInvocationsExclusiveScanNonUniformAMD(double);" "dvec2 addInvocationsExclusiveScanNonUniformAMD(dvec2);" "dvec3 addInvocationsExclusiveScanNonUniformAMD(dvec3);" "dvec4 addInvocationsExclusiveScanNonUniformAMD(dvec4);" "int64_t addInvocationsExclusiveScanNonUniformAMD(int64_t);" "i64vec2 addInvocationsExclusiveScanNonUniformAMD(i64vec2);" "i64vec3 addInvocationsExclusiveScanNonUniformAMD(i64vec3);" "i64vec4 addInvocationsExclusiveScanNonUniformAMD(i64vec4);" "uint64_t addInvocationsExclusiveScanNonUniformAMD(uint64_t);" "u64vec2 addInvocationsExclusiveScanNonUniformAMD(u64vec2);" "u64vec3 addInvocationsExclusiveScanNonUniformAMD(u64vec3);" "u64vec4 addInvocationsExclusiveScanNonUniformAMD(u64vec4);" "float16_t addInvocationsExclusiveScanNonUniformAMD(float16_t);" "f16vec2 addInvocationsExclusiveScanNonUniformAMD(f16vec2);" "f16vec3 addInvocationsExclusiveScanNonUniformAMD(f16vec3);" "f16vec4 addInvocationsExclusiveScanNonUniformAMD(f16vec4);" "int16_t addInvocationsExclusiveScanNonUniformAMD(int16_t);" "i16vec2 addInvocationsExclusiveScanNonUniformAMD(i16vec2);" "i16vec3 addInvocationsExclusiveScanNonUniformAMD(i16vec3);" "i16vec4 addInvocationsExclusiveScanNonUniformAMD(i16vec4);" "uint16_t addInvocationsExclusiveScanNonUniformAMD(uint16_t);" "u16vec2 addInvocationsExclusiveScanNonUniformAMD(u16vec2);" "u16vec3 addInvocationsExclusiveScanNonUniformAMD(u16vec3);" "u16vec4 addInvocationsExclusiveScanNonUniformAMD(u16vec4);" "float swizzleInvocationsAMD(float, uvec4);" "vec2 swizzleInvocationsAMD(vec2, uvec4);" "vec3 swizzleInvocationsAMD(vec3, uvec4);" "vec4 swizzleInvocationsAMD(vec4, uvec4);" "int swizzleInvocationsAMD(int, uvec4);" "ivec2 swizzleInvocationsAMD(ivec2, uvec4);" "ivec3 swizzleInvocationsAMD(ivec3, uvec4);" "ivec4 swizzleInvocationsAMD(ivec4, uvec4);" "uint swizzleInvocationsAMD(uint, uvec4);" "uvec2 swizzleInvocationsAMD(uvec2, uvec4);" "uvec3 swizzleInvocationsAMD(uvec3, uvec4);" "uvec4 swizzleInvocationsAMD(uvec4, uvec4);" "float swizzleInvocationsMaskedAMD(float, uvec3);" "vec2 swizzleInvocationsMaskedAMD(vec2, uvec3);" "vec3 swizzleInvocationsMaskedAMD(vec3, uvec3);" "vec4 swizzleInvocationsMaskedAMD(vec4, uvec3);" "int swizzleInvocationsMaskedAMD(int, uvec3);" "ivec2 swizzleInvocationsMaskedAMD(ivec2, uvec3);" "ivec3 swizzleInvocationsMaskedAMD(ivec3, uvec3);" "ivec4 swizzleInvocationsMaskedAMD(ivec4, uvec3);" "uint swizzleInvocationsMaskedAMD(uint, uvec3);" "uvec2 swizzleInvocationsMaskedAMD(uvec2, uvec3);" "uvec3 swizzleInvocationsMaskedAMD(uvec3, uvec3);" "uvec4 swizzleInvocationsMaskedAMD(uvec4, uvec3);" "float writeInvocationAMD(float, float, uint);" "vec2 writeInvocationAMD(vec2, vec2, uint);" "vec3 writeInvocationAMD(vec3, vec3, uint);" "vec4 writeInvocationAMD(vec4, vec4, uint);" "int writeInvocationAMD(int, int, uint);" "ivec2 writeInvocationAMD(ivec2, ivec2, uint);" "ivec3 writeInvocationAMD(ivec3, ivec3, uint);" "ivec4 writeInvocationAMD(ivec4, ivec4, uint);" "uint writeInvocationAMD(uint, uint, uint);" "uvec2 writeInvocationAMD(uvec2, uvec2, uint);" "uvec3 writeInvocationAMD(uvec3, uvec3, uint);" "uvec4 writeInvocationAMD(uvec4, uvec4, uint);" "uint mbcntAMD(uint64_t);" "\n"); } // GL_AMD_gcn_shader if (profile != EEsProfile && version >= 440) { commonBuiltins.append( "float cubeFaceIndexAMD(vec3);" "vec2 cubeFaceCoordAMD(vec3);" "uint64_t timeAMD();" "in int gl_SIMDGroupSizeAMD;" "\n"); } // GL_AMD_shader_fragment_mask if (profile != EEsProfile && version >= 450) { commonBuiltins.append( "uint fragmentMaskFetchAMD(sampler2DMS, ivec2);" "uint fragmentMaskFetchAMD(isampler2DMS, ivec2);" "uint fragmentMaskFetchAMD(usampler2DMS, ivec2);" "uint fragmentMaskFetchAMD(sampler2DMSArray, ivec3);" "uint fragmentMaskFetchAMD(isampler2DMSArray, ivec3);" "uint fragmentMaskFetchAMD(usampler2DMSArray, ivec3);" "vec4 fragmentFetchAMD(sampler2DMS, ivec2, uint);" "ivec4 fragmentFetchAMD(isampler2DMS, ivec2, uint);" "uvec4 fragmentFetchAMD(usampler2DMS, ivec2, uint);" "vec4 fragmentFetchAMD(sampler2DMSArray, ivec3, uint);" "ivec4 fragmentFetchAMD(isampler2DMSArray, ivec3, uint);" "uvec4 fragmentFetchAMD(usampler2DMSArray, ivec3, uint);" "\n"); } if ((profile != EEsProfile && version >= 130) || (profile == EEsProfile && version >= 300)) { commonBuiltins.append( "uint countLeadingZeros(uint);" "uvec2 countLeadingZeros(uvec2);" "uvec3 countLeadingZeros(uvec3);" "uvec4 countLeadingZeros(uvec4);" "uint countTrailingZeros(uint);" "uvec2 countTrailingZeros(uvec2);" "uvec3 countTrailingZeros(uvec3);" "uvec4 countTrailingZeros(uvec4);" "uint absoluteDifference(int, int);" "uvec2 absoluteDifference(ivec2, ivec2);" "uvec3 absoluteDifference(ivec3, ivec3);" "uvec4 absoluteDifference(ivec4, ivec4);" "uint16_t absoluteDifference(int16_t, int16_t);" "u16vec2 absoluteDifference(i16vec2, i16vec2);" "u16vec3 absoluteDifference(i16vec3, i16vec3);" "u16vec4 absoluteDifference(i16vec4, i16vec4);" "uint64_t absoluteDifference(int64_t, int64_t);" "u64vec2 absoluteDifference(i64vec2, i64vec2);" "u64vec3 absoluteDifference(i64vec3, i64vec3);" "u64vec4 absoluteDifference(i64vec4, i64vec4);" "uint absoluteDifference(uint, uint);" "uvec2 absoluteDifference(uvec2, uvec2);" "uvec3 absoluteDifference(uvec3, uvec3);" "uvec4 absoluteDifference(uvec4, uvec4);" "uint16_t absoluteDifference(uint16_t, uint16_t);" "u16vec2 absoluteDifference(u16vec2, u16vec2);" "u16vec3 absoluteDifference(u16vec3, u16vec3);" "u16vec4 absoluteDifference(u16vec4, u16vec4);" "uint64_t absoluteDifference(uint64_t, uint64_t);" "u64vec2 absoluteDifference(u64vec2, u64vec2);" "u64vec3 absoluteDifference(u64vec3, u64vec3);" "u64vec4 absoluteDifference(u64vec4, u64vec4);" "int addSaturate(int, int);" "ivec2 addSaturate(ivec2, ivec2);" "ivec3 addSaturate(ivec3, ivec3);" "ivec4 addSaturate(ivec4, ivec4);" "int16_t addSaturate(int16_t, int16_t);" "i16vec2 addSaturate(i16vec2, i16vec2);" "i16vec3 addSaturate(i16vec3, i16vec3);" "i16vec4 addSaturate(i16vec4, i16vec4);" "int64_t addSaturate(int64_t, int64_t);" "i64vec2 addSaturate(i64vec2, i64vec2);" "i64vec3 addSaturate(i64vec3, i64vec3);" "i64vec4 addSaturate(i64vec4, i64vec4);" "uint addSaturate(uint, uint);" "uvec2 addSaturate(uvec2, uvec2);" "uvec3 addSaturate(uvec3, uvec3);" "uvec4 addSaturate(uvec4, uvec4);" "uint16_t addSaturate(uint16_t, uint16_t);" "u16vec2 addSaturate(u16vec2, u16vec2);" "u16vec3 addSaturate(u16vec3, u16vec3);" "u16vec4 addSaturate(u16vec4, u16vec4);" "uint64_t addSaturate(uint64_t, uint64_t);" "u64vec2 addSaturate(u64vec2, u64vec2);" "u64vec3 addSaturate(u64vec3, u64vec3);" "u64vec4 addSaturate(u64vec4, u64vec4);" "int subtractSaturate(int, int);" "ivec2 subtractSaturate(ivec2, ivec2);" "ivec3 subtractSaturate(ivec3, ivec3);" "ivec4 subtractSaturate(ivec4, ivec4);" "int16_t subtractSaturate(int16_t, int16_t);" "i16vec2 subtractSaturate(i16vec2, i16vec2);" "i16vec3 subtractSaturate(i16vec3, i16vec3);" "i16vec4 subtractSaturate(i16vec4, i16vec4);" "int64_t subtractSaturate(int64_t, int64_t);" "i64vec2 subtractSaturate(i64vec2, i64vec2);" "i64vec3 subtractSaturate(i64vec3, i64vec3);" "i64vec4 subtractSaturate(i64vec4, i64vec4);" "uint subtractSaturate(uint, uint);" "uvec2 subtractSaturate(uvec2, uvec2);" "uvec3 subtractSaturate(uvec3, uvec3);" "uvec4 subtractSaturate(uvec4, uvec4);" "uint16_t subtractSaturate(uint16_t, uint16_t);" "u16vec2 subtractSaturate(u16vec2, u16vec2);" "u16vec3 subtractSaturate(u16vec3, u16vec3);" "u16vec4 subtractSaturate(u16vec4, u16vec4);" "uint64_t subtractSaturate(uint64_t, uint64_t);" "u64vec2 subtractSaturate(u64vec2, u64vec2);" "u64vec3 subtractSaturate(u64vec3, u64vec3);" "u64vec4 subtractSaturate(u64vec4, u64vec4);" "int average(int, int);" "ivec2 average(ivec2, ivec2);" "ivec3 average(ivec3, ivec3);" "ivec4 average(ivec4, ivec4);" "int16_t average(int16_t, int16_t);" "i16vec2 average(i16vec2, i16vec2);" "i16vec3 average(i16vec3, i16vec3);" "i16vec4 average(i16vec4, i16vec4);" "int64_t average(int64_t, int64_t);" "i64vec2 average(i64vec2, i64vec2);" "i64vec3 average(i64vec3, i64vec3);" "i64vec4 average(i64vec4, i64vec4);" "uint average(uint, uint);" "uvec2 average(uvec2, uvec2);" "uvec3 average(uvec3, uvec3);" "uvec4 average(uvec4, uvec4);" "uint16_t average(uint16_t, uint16_t);" "u16vec2 average(u16vec2, u16vec2);" "u16vec3 average(u16vec3, u16vec3);" "u16vec4 average(u16vec4, u16vec4);" "uint64_t average(uint64_t, uint64_t);" "u64vec2 average(u64vec2, u64vec2);" "u64vec3 average(u64vec3, u64vec3);" "u64vec4 average(u64vec4, u64vec4);" "int averageRounded(int, int);" "ivec2 averageRounded(ivec2, ivec2);" "ivec3 averageRounded(ivec3, ivec3);" "ivec4 averageRounded(ivec4, ivec4);" "int16_t averageRounded(int16_t, int16_t);" "i16vec2 averageRounded(i16vec2, i16vec2);" "i16vec3 averageRounded(i16vec3, i16vec3);" "i16vec4 averageRounded(i16vec4, i16vec4);" "int64_t averageRounded(int64_t, int64_t);" "i64vec2 averageRounded(i64vec2, i64vec2);" "i64vec3 averageRounded(i64vec3, i64vec3);" "i64vec4 averageRounded(i64vec4, i64vec4);" "uint averageRounded(uint, uint);" "uvec2 averageRounded(uvec2, uvec2);" "uvec3 averageRounded(uvec3, uvec3);" "uvec4 averageRounded(uvec4, uvec4);" "uint16_t averageRounded(uint16_t, uint16_t);" "u16vec2 averageRounded(u16vec2, u16vec2);" "u16vec3 averageRounded(u16vec3, u16vec3);" "u16vec4 averageRounded(u16vec4, u16vec4);" "uint64_t averageRounded(uint64_t, uint64_t);" "u64vec2 averageRounded(u64vec2, u64vec2);" "u64vec3 averageRounded(u64vec3, u64vec3);" "u64vec4 averageRounded(u64vec4, u64vec4);" "int multiply32x16(int, int);" "ivec2 multiply32x16(ivec2, ivec2);" "ivec3 multiply32x16(ivec3, ivec3);" "ivec4 multiply32x16(ivec4, ivec4);" "uint multiply32x16(uint, uint);" "uvec2 multiply32x16(uvec2, uvec2);" "uvec3 multiply32x16(uvec3, uvec3);" "uvec4 multiply32x16(uvec4, uvec4);" "\n"); } if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 320)) { commonBuiltins.append( "struct gl_TextureFootprint2DNV {" "uvec2 anchor;" "uvec2 offset;" "uvec2 mask;" "uint lod;" "uint granularity;" "};" "struct gl_TextureFootprint3DNV {" "uvec3 anchor;" "uvec3 offset;" "uvec2 mask;" "uint lod;" "uint granularity;" "};" "bool textureFootprintNV(sampler2D, vec2, int, bool, out gl_TextureFootprint2DNV);" "bool textureFootprintNV(sampler3D, vec3, int, bool, out gl_TextureFootprint3DNV);" "bool textureFootprintNV(sampler2D, vec2, int, bool, out gl_TextureFootprint2DNV, float);" "bool textureFootprintNV(sampler3D, vec3, int, bool, out gl_TextureFootprint3DNV, float);" "bool textureFootprintClampNV(sampler2D, vec2, float, int, bool, out gl_TextureFootprint2DNV);" "bool textureFootprintClampNV(sampler3D, vec3, float, int, bool, out gl_TextureFootprint3DNV);" "bool textureFootprintClampNV(sampler2D, vec2, float, int, bool, out gl_TextureFootprint2DNV, float);" "bool textureFootprintClampNV(sampler3D, vec3, float, int, bool, out gl_TextureFootprint3DNV, float);" "bool textureFootprintLodNV(sampler2D, vec2, float, int, bool, out gl_TextureFootprint2DNV);" "bool textureFootprintLodNV(sampler3D, vec3, float, int, bool, out gl_TextureFootprint3DNV);" "bool textureFootprintGradNV(sampler2D, vec2, vec2, vec2, int, bool, out gl_TextureFootprint2DNV);" "bool textureFootprintGradClampNV(sampler2D, vec2, vec2, vec2, float, int, bool, out gl_TextureFootprint2DNV);" "\n"); } if ((profile == EEsProfile && version >= 300 && version < 310) || (profile != EEsProfile && version >= 150 && version < 450)) { // GL_EXT_shader_integer_mix commonBuiltins.append("int mix(int, int, bool);" "ivec2 mix(ivec2, ivec2, bvec2);" "ivec3 mix(ivec3, ivec3, bvec3);" "ivec4 mix(ivec4, ivec4, bvec4);" "uint mix(uint, uint, bool );" "uvec2 mix(uvec2, uvec2, bvec2);" "uvec3 mix(uvec3, uvec3, bvec3);" "uvec4 mix(uvec4, uvec4, bvec4);" "bool mix(bool, bool, bool );" "bvec2 mix(bvec2, bvec2, bvec2);" "bvec3 mix(bvec3, bvec3, bvec3);" "bvec4 mix(bvec4, bvec4, bvec4);" "\n"); } // GL_AMD_gpu_shader_half_float/Explicit types if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 310)) { commonBuiltins.append( "float16_t radians(float16_t);" "f16vec2 radians(f16vec2);" "f16vec3 radians(f16vec3);" "f16vec4 radians(f16vec4);" "float16_t degrees(float16_t);" "f16vec2 degrees(f16vec2);" "f16vec3 degrees(f16vec3);" "f16vec4 degrees(f16vec4);" "float16_t sin(float16_t);" "f16vec2 sin(f16vec2);" "f16vec3 sin(f16vec3);" "f16vec4 sin(f16vec4);" "float16_t cos(float16_t);" "f16vec2 cos(f16vec2);" "f16vec3 cos(f16vec3);" "f16vec4 cos(f16vec4);" "float16_t tan(float16_t);" "f16vec2 tan(f16vec2);" "f16vec3 tan(f16vec3);" "f16vec4 tan(f16vec4);" "float16_t asin(float16_t);" "f16vec2 asin(f16vec2);" "f16vec3 asin(f16vec3);" "f16vec4 asin(f16vec4);" "float16_t acos(float16_t);" "f16vec2 acos(f16vec2);" "f16vec3 acos(f16vec3);" "f16vec4 acos(f16vec4);" "float16_t atan(float16_t, float16_t);" "f16vec2 atan(f16vec2, f16vec2);" "f16vec3 atan(f16vec3, f16vec3);" "f16vec4 atan(f16vec4, f16vec4);" "float16_t atan(float16_t);" "f16vec2 atan(f16vec2);" "f16vec3 atan(f16vec3);" "f16vec4 atan(f16vec4);" "float16_t sinh(float16_t);" "f16vec2 sinh(f16vec2);" "f16vec3 sinh(f16vec3);" "f16vec4 sinh(f16vec4);" "float16_t cosh(float16_t);" "f16vec2 cosh(f16vec2);" "f16vec3 cosh(f16vec3);" "f16vec4 cosh(f16vec4);" "float16_t tanh(float16_t);" "f16vec2 tanh(f16vec2);" "f16vec3 tanh(f16vec3);" "f16vec4 tanh(f16vec4);" "float16_t asinh(float16_t);" "f16vec2 asinh(f16vec2);" "f16vec3 asinh(f16vec3);" "f16vec4 asinh(f16vec4);" "float16_t acosh(float16_t);" "f16vec2 acosh(f16vec2);" "f16vec3 acosh(f16vec3);" "f16vec4 acosh(f16vec4);" "float16_t atanh(float16_t);" "f16vec2 atanh(f16vec2);" "f16vec3 atanh(f16vec3);" "f16vec4 atanh(f16vec4);" "float16_t pow(float16_t, float16_t);" "f16vec2 pow(f16vec2, f16vec2);" "f16vec3 pow(f16vec3, f16vec3);" "f16vec4 pow(f16vec4, f16vec4);" "float16_t exp(float16_t);" "f16vec2 exp(f16vec2);" "f16vec3 exp(f16vec3);" "f16vec4 exp(f16vec4);" "float16_t log(float16_t);" "f16vec2 log(f16vec2);" "f16vec3 log(f16vec3);" "f16vec4 log(f16vec4);" "float16_t exp2(float16_t);" "f16vec2 exp2(f16vec2);" "f16vec3 exp2(f16vec3);" "f16vec4 exp2(f16vec4);" "float16_t log2(float16_t);" "f16vec2 log2(f16vec2);" "f16vec3 log2(f16vec3);" "f16vec4 log2(f16vec4);" "float16_t sqrt(float16_t);" "f16vec2 sqrt(f16vec2);" "f16vec3 sqrt(f16vec3);" "f16vec4 sqrt(f16vec4);" "float16_t inversesqrt(float16_t);" "f16vec2 inversesqrt(f16vec2);" "f16vec3 inversesqrt(f16vec3);" "f16vec4 inversesqrt(f16vec4);" "float16_t abs(float16_t);" "f16vec2 abs(f16vec2);" "f16vec3 abs(f16vec3);" "f16vec4 abs(f16vec4);" "float16_t sign(float16_t);" "f16vec2 sign(f16vec2);" "f16vec3 sign(f16vec3);" "f16vec4 sign(f16vec4);" "float16_t floor(float16_t);" "f16vec2 floor(f16vec2);" "f16vec3 floor(f16vec3);" "f16vec4 floor(f16vec4);" "float16_t trunc(float16_t);" "f16vec2 trunc(f16vec2);" "f16vec3 trunc(f16vec3);" "f16vec4 trunc(f16vec4);" "float16_t round(float16_t);" "f16vec2 round(f16vec2);" "f16vec3 round(f16vec3);" "f16vec4 round(f16vec4);" "float16_t roundEven(float16_t);" "f16vec2 roundEven(f16vec2);" "f16vec3 roundEven(f16vec3);" "f16vec4 roundEven(f16vec4);" "float16_t ceil(float16_t);" "f16vec2 ceil(f16vec2);" "f16vec3 ceil(f16vec3);" "f16vec4 ceil(f16vec4);" "float16_t fract(float16_t);" "f16vec2 fract(f16vec2);" "f16vec3 fract(f16vec3);" "f16vec4 fract(f16vec4);" "float16_t mod(float16_t, float16_t);" "f16vec2 mod(f16vec2, float16_t);" "f16vec3 mod(f16vec3, float16_t);" "f16vec4 mod(f16vec4, float16_t);" "f16vec2 mod(f16vec2, f16vec2);" "f16vec3 mod(f16vec3, f16vec3);" "f16vec4 mod(f16vec4, f16vec4);" "float16_t modf(float16_t, out float16_t);" "f16vec2 modf(f16vec2, out f16vec2);" "f16vec3 modf(f16vec3, out f16vec3);" "f16vec4 modf(f16vec4, out f16vec4);" "float16_t min(float16_t, float16_t);" "f16vec2 min(f16vec2, float16_t);" "f16vec3 min(f16vec3, float16_t);" "f16vec4 min(f16vec4, float16_t);" "f16vec2 min(f16vec2, f16vec2);" "f16vec3 min(f16vec3, f16vec3);" "f16vec4 min(f16vec4, f16vec4);" "float16_t max(float16_t, float16_t);" "f16vec2 max(f16vec2, float16_t);" "f16vec3 max(f16vec3, float16_t);" "f16vec4 max(f16vec4, float16_t);" "f16vec2 max(f16vec2, f16vec2);" "f16vec3 max(f16vec3, f16vec3);" "f16vec4 max(f16vec4, f16vec4);" "float16_t clamp(float16_t, float16_t, float16_t);" "f16vec2 clamp(f16vec2, float16_t, float16_t);" "f16vec3 clamp(f16vec3, float16_t, float16_t);" "f16vec4 clamp(f16vec4, float16_t, float16_t);" "f16vec2 clamp(f16vec2, f16vec2, f16vec2);" "f16vec3 clamp(f16vec3, f16vec3, f16vec3);" "f16vec4 clamp(f16vec4, f16vec4, f16vec4);" "float16_t mix(float16_t, float16_t, float16_t);" "f16vec2 mix(f16vec2, f16vec2, float16_t);" "f16vec3 mix(f16vec3, f16vec3, float16_t);" "f16vec4 mix(f16vec4, f16vec4, float16_t);" "f16vec2 mix(f16vec2, f16vec2, f16vec2);" "f16vec3 mix(f16vec3, f16vec3, f16vec3);" "f16vec4 mix(f16vec4, f16vec4, f16vec4);" "float16_t mix(float16_t, float16_t, bool);" "f16vec2 mix(f16vec2, f16vec2, bvec2);" "f16vec3 mix(f16vec3, f16vec3, bvec3);" "f16vec4 mix(f16vec4, f16vec4, bvec4);" "float16_t step(float16_t, float16_t);" "f16vec2 step(f16vec2, f16vec2);" "f16vec3 step(f16vec3, f16vec3);" "f16vec4 step(f16vec4, f16vec4);" "f16vec2 step(float16_t, f16vec2);" "f16vec3 step(float16_t, f16vec3);" "f16vec4 step(float16_t, f16vec4);" "float16_t smoothstep(float16_t, float16_t, float16_t);" "f16vec2 smoothstep(f16vec2, f16vec2, f16vec2);" "f16vec3 smoothstep(f16vec3, f16vec3, f16vec3);" "f16vec4 smoothstep(f16vec4, f16vec4, f16vec4);" "f16vec2 smoothstep(float16_t, float16_t, f16vec2);" "f16vec3 smoothstep(float16_t, float16_t, f16vec3);" "f16vec4 smoothstep(float16_t, float16_t, f16vec4);" "bool isnan(float16_t);" "bvec2 isnan(f16vec2);" "bvec3 isnan(f16vec3);" "bvec4 isnan(f16vec4);" "bool isinf(float16_t);" "bvec2 isinf(f16vec2);" "bvec3 isinf(f16vec3);" "bvec4 isinf(f16vec4);" "float16_t fma(float16_t, float16_t, float16_t);" "f16vec2 fma(f16vec2, f16vec2, f16vec2);" "f16vec3 fma(f16vec3, f16vec3, f16vec3);" "f16vec4 fma(f16vec4, f16vec4, f16vec4);" "float16_t frexp(float16_t, out int);" "f16vec2 frexp(f16vec2, out ivec2);" "f16vec3 frexp(f16vec3, out ivec3);" "f16vec4 frexp(f16vec4, out ivec4);" "float16_t ldexp(float16_t, in int);" "f16vec2 ldexp(f16vec2, in ivec2);" "f16vec3 ldexp(f16vec3, in ivec3);" "f16vec4 ldexp(f16vec4, in ivec4);" "uint packFloat2x16(f16vec2);" "f16vec2 unpackFloat2x16(uint);" "float16_t length(float16_t);" "float16_t length(f16vec2);" "float16_t length(f16vec3);" "float16_t length(f16vec4);" "float16_t distance(float16_t, float16_t);" "float16_t distance(f16vec2, f16vec2);" "float16_t distance(f16vec3, f16vec3);" "float16_t distance(f16vec4, f16vec4);" "float16_t dot(float16_t, float16_t);" "float16_t dot(f16vec2, f16vec2);" "float16_t dot(f16vec3, f16vec3);" "float16_t dot(f16vec4, f16vec4);" "f16vec3 cross(f16vec3, f16vec3);" "float16_t normalize(float16_t);" "f16vec2 normalize(f16vec2);" "f16vec3 normalize(f16vec3);" "f16vec4 normalize(f16vec4);" "float16_t faceforward(float16_t, float16_t, float16_t);" "f16vec2 faceforward(f16vec2, f16vec2, f16vec2);" "f16vec3 faceforward(f16vec3, f16vec3, f16vec3);" "f16vec4 faceforward(f16vec4, f16vec4, f16vec4);" "float16_t reflect(float16_t, float16_t);" "f16vec2 reflect(f16vec2, f16vec2);" "f16vec3 reflect(f16vec3, f16vec3);" "f16vec4 reflect(f16vec4, f16vec4);" "float16_t refract(float16_t, float16_t, float16_t);" "f16vec2 refract(f16vec2, f16vec2, float16_t);" "f16vec3 refract(f16vec3, f16vec3, float16_t);" "f16vec4 refract(f16vec4, f16vec4, float16_t);" "f16mat2 matrixCompMult(f16mat2, f16mat2);" "f16mat3 matrixCompMult(f16mat3, f16mat3);" "f16mat4 matrixCompMult(f16mat4, f16mat4);" "f16mat2x3 matrixCompMult(f16mat2x3, f16mat2x3);" "f16mat2x4 matrixCompMult(f16mat2x4, f16mat2x4);" "f16mat3x2 matrixCompMult(f16mat3x2, f16mat3x2);" "f16mat3x4 matrixCompMult(f16mat3x4, f16mat3x4);" "f16mat4x2 matrixCompMult(f16mat4x2, f16mat4x2);" "f16mat4x3 matrixCompMult(f16mat4x3, f16mat4x3);" "f16mat2 outerProduct(f16vec2, f16vec2);" "f16mat3 outerProduct(f16vec3, f16vec3);" "f16mat4 outerProduct(f16vec4, f16vec4);" "f16mat2x3 outerProduct(f16vec3, f16vec2);" "f16mat3x2 outerProduct(f16vec2, f16vec3);" "f16mat2x4 outerProduct(f16vec4, f16vec2);" "f16mat4x2 outerProduct(f16vec2, f16vec4);" "f16mat3x4 outerProduct(f16vec4, f16vec3);" "f16mat4x3 outerProduct(f16vec3, f16vec4);" "f16mat2 transpose(f16mat2);" "f16mat3 transpose(f16mat3);" "f16mat4 transpose(f16mat4);" "f16mat2x3 transpose(f16mat3x2);" "f16mat3x2 transpose(f16mat2x3);" "f16mat2x4 transpose(f16mat4x2);" "f16mat4x2 transpose(f16mat2x4);" "f16mat3x4 transpose(f16mat4x3);" "f16mat4x3 transpose(f16mat3x4);" "float16_t determinant(f16mat2);" "float16_t determinant(f16mat3);" "float16_t determinant(f16mat4);" "f16mat2 inverse(f16mat2);" "f16mat3 inverse(f16mat3);" "f16mat4 inverse(f16mat4);" "bvec2 lessThan(f16vec2, f16vec2);" "bvec3 lessThan(f16vec3, f16vec3);" "bvec4 lessThan(f16vec4, f16vec4);" "bvec2 lessThanEqual(f16vec2, f16vec2);" "bvec3 lessThanEqual(f16vec3, f16vec3);" "bvec4 lessThanEqual(f16vec4, f16vec4);" "bvec2 greaterThan(f16vec2, f16vec2);" "bvec3 greaterThan(f16vec3, f16vec3);" "bvec4 greaterThan(f16vec4, f16vec4);" "bvec2 greaterThanEqual(f16vec2, f16vec2);" "bvec3 greaterThanEqual(f16vec3, f16vec3);" "bvec4 greaterThanEqual(f16vec4, f16vec4);" "bvec2 equal(f16vec2, f16vec2);" "bvec3 equal(f16vec3, f16vec3);" "bvec4 equal(f16vec4, f16vec4);" "bvec2 notEqual(f16vec2, f16vec2);" "bvec3 notEqual(f16vec3, f16vec3);" "bvec4 notEqual(f16vec4, f16vec4);" "bfloat16_t dot(bfloat16_t, bfloat16_t);" "bfloat16_t dot(bf16vec2, bf16vec2);" "bfloat16_t dot(bf16vec3, bf16vec3);" "bfloat16_t dot(bf16vec4, bf16vec4);" "int16_t bfloat16BitsToIntEXT(bfloat16_t value);" "i16vec2 bfloat16BitsToIntEXT(bf16vec2 value);" "i16vec3 bfloat16BitsToIntEXT(bf16vec3 value);" "i16vec4 bfloat16BitsToIntEXT(bf16vec4 value);" "uint16_t bfloat16BitsToUintEXT(bfloat16_t value);" "u16vec2 bfloat16BitsToUintEXT(bf16vec2 value);" "u16vec3 bfloat16BitsToUintEXT(bf16vec3 value);" "u16vec4 bfloat16BitsToUintEXT(bf16vec4 value);" "bfloat16_t intBitsToBFloat16EXT(int16_t value);" "bf16vec2 intBitsToBFloat16EXT(i16vec2 value);" "bf16vec3 intBitsToBFloat16EXT(i16vec3 value);" "bf16vec4 intBitsToBFloat16EXT(i16vec4 value);" "bfloat16_t uintBitsToBFloat16EXT(uint16_t value);" "bf16vec2 uintBitsToBFloat16EXT(u16vec2 value);" "bf16vec3 uintBitsToBFloat16EXT(u16vec3 value);" "bf16vec4 uintBitsToBFloat16EXT(u16vec4 value);" "int8_t floate5m2BitsToIntEXT(floate5m2_t value);" "i8vec2 floate5m2BitsToIntEXT(fe5m2vec2 value);" "i8vec3 floate5m2BitsToIntEXT(fe5m2vec3 value);" "i8vec4 floate5m2BitsToIntEXT(fe5m2vec4 value);" "uint8_t floate5m2BitsToUintEXT(floate5m2_t value);" "u8vec2 floate5m2BitsToUintEXT(fe5m2vec2 value);" "u8vec3 floate5m2BitsToUintEXT(fe5m2vec3 value);" "u8vec4 floate5m2BitsToUintEXT(fe5m2vec4 value);" "floate5m2_t intBitsToFloate5m2EXT(int8_t value);" "fe5m2vec2 intBitsToFloate5m2EXT(i8vec2 value);" "fe5m2vec3 intBitsToFloate5m2EXT(i8vec3 value);" "fe5m2vec4 intBitsToFloate5m2EXT(i8vec4 value);" "floate5m2_t uintBitsToFloate5m2EXT(uint8_t value);" "fe5m2vec2 uintBitsToFloate5m2EXT(u8vec2 value);" "fe5m2vec3 uintBitsToFloate5m2EXT(u8vec3 value);" "fe5m2vec4 uintBitsToFloate5m2EXT(u8vec4 value);" "int8_t floate4m3BitsToIntEXT(floate4m3_t value);" "i8vec2 floate4m3BitsToIntEXT(fe4m3vec2 value);" "i8vec3 floate4m3BitsToIntEXT(fe4m3vec3 value);" "i8vec4 floate4m3BitsToIntEXT(fe4m3vec4 value);" "uint8_t floate4m3BitsToUintEXT(floate4m3_t value);" "u8vec2 floate4m3BitsToUintEXT(fe4m3vec2 value);" "u8vec3 floate4m3BitsToUintEXT(fe4m3vec3 value);" "u8vec4 floate4m3BitsToUintEXT(fe4m3vec4 value);" "floate4m3_t intBitsToFloate4m3EXT(int8_t value);" "fe4m3vec2 intBitsToFloate4m3EXT(i8vec2 value);" "fe4m3vec3 intBitsToFloate4m3EXT(i8vec3 value);" "fe4m3vec4 intBitsToFloate4m3EXT(i8vec4 value);" "floate4m3_t uintBitsToFloate4m3EXT(uint8_t value);" "fe4m3vec2 uintBitsToFloate4m3EXT(u8vec2 value);" "fe4m3vec3 uintBitsToFloate4m3EXT(u8vec3 value);" "fe4m3vec4 uintBitsToFloate4m3EXT(u8vec4 value);" "void saturatedConvertEXT();" "\n"); } // Explicit types if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 310)) { commonBuiltins.append( "int8_t abs(int8_t);" "i8vec2 abs(i8vec2);" "i8vec3 abs(i8vec3);" "i8vec4 abs(i8vec4);" "int8_t sign(int8_t);" "i8vec2 sign(i8vec2);" "i8vec3 sign(i8vec3);" "i8vec4 sign(i8vec4);" "int8_t min(int8_t x, int8_t y);" "i8vec2 min(i8vec2 x, int8_t y);" "i8vec3 min(i8vec3 x, int8_t y);" "i8vec4 min(i8vec4 x, int8_t y);" "i8vec2 min(i8vec2 x, i8vec2 y);" "i8vec3 min(i8vec3 x, i8vec3 y);" "i8vec4 min(i8vec4 x, i8vec4 y);" "uint8_t min(uint8_t x, uint8_t y);" "u8vec2 min(u8vec2 x, uint8_t y);" "u8vec3 min(u8vec3 x, uint8_t y);" "u8vec4 min(u8vec4 x, uint8_t y);" "u8vec2 min(u8vec2 x, u8vec2 y);" "u8vec3 min(u8vec3 x, u8vec3 y);" "u8vec4 min(u8vec4 x, u8vec4 y);" "int8_t max(int8_t x, int8_t y);" "i8vec2 max(i8vec2 x, int8_t y);" "i8vec3 max(i8vec3 x, int8_t y);" "i8vec4 max(i8vec4 x, int8_t y);" "i8vec2 max(i8vec2 x, i8vec2 y);" "i8vec3 max(i8vec3 x, i8vec3 y);" "i8vec4 max(i8vec4 x, i8vec4 y);" "uint8_t max(uint8_t x, uint8_t y);" "u8vec2 max(u8vec2 x, uint8_t y);" "u8vec3 max(u8vec3 x, uint8_t y);" "u8vec4 max(u8vec4 x, uint8_t y);" "u8vec2 max(u8vec2 x, u8vec2 y);" "u8vec3 max(u8vec3 x, u8vec3 y);" "u8vec4 max(u8vec4 x, u8vec4 y);" "int8_t clamp(int8_t x, int8_t minVal, int8_t maxVal);" "i8vec2 clamp(i8vec2 x, int8_t minVal, int8_t maxVal);" "i8vec3 clamp(i8vec3 x, int8_t minVal, int8_t maxVal);" "i8vec4 clamp(i8vec4 x, int8_t minVal, int8_t maxVal);" "i8vec2 clamp(i8vec2 x, i8vec2 minVal, i8vec2 maxVal);" "i8vec3 clamp(i8vec3 x, i8vec3 minVal, i8vec3 maxVal);" "i8vec4 clamp(i8vec4 x, i8vec4 minVal, i8vec4 maxVal);" "uint8_t clamp(uint8_t x, uint8_t minVal, uint8_t maxVal);" "u8vec2 clamp(u8vec2 x, uint8_t minVal, uint8_t maxVal);" "u8vec3 clamp(u8vec3 x, uint8_t minVal, uint8_t maxVal);" "u8vec4 clamp(u8vec4 x, uint8_t minVal, uint8_t maxVal);" "u8vec2 clamp(u8vec2 x, u8vec2 minVal, u8vec2 maxVal);" "u8vec3 clamp(u8vec3 x, u8vec3 minVal, u8vec3 maxVal);" "u8vec4 clamp(u8vec4 x, u8vec4 minVal, u8vec4 maxVal);" "int8_t mix(int8_t, int8_t, bool);" "i8vec2 mix(i8vec2, i8vec2, bvec2);" "i8vec3 mix(i8vec3, i8vec3, bvec3);" "i8vec4 mix(i8vec4, i8vec4, bvec4);" "uint8_t mix(uint8_t, uint8_t, bool);" "u8vec2 mix(u8vec2, u8vec2, bvec2);" "u8vec3 mix(u8vec3, u8vec3, bvec3);" "u8vec4 mix(u8vec4, u8vec4, bvec4);" "bvec2 lessThan(i8vec2, i8vec2);" "bvec3 lessThan(i8vec3, i8vec3);" "bvec4 lessThan(i8vec4, i8vec4);" "bvec2 lessThan(u8vec2, u8vec2);" "bvec3 lessThan(u8vec3, u8vec3);" "bvec4 lessThan(u8vec4, u8vec4);" "bvec2 lessThanEqual(i8vec2, i8vec2);" "bvec3 lessThanEqual(i8vec3, i8vec3);" "bvec4 lessThanEqual(i8vec4, i8vec4);" "bvec2 lessThanEqual(u8vec2, u8vec2);" "bvec3 lessThanEqual(u8vec3, u8vec3);" "bvec4 lessThanEqual(u8vec4, u8vec4);" "bvec2 greaterThan(i8vec2, i8vec2);" "bvec3 greaterThan(i8vec3, i8vec3);" "bvec4 greaterThan(i8vec4, i8vec4);" "bvec2 greaterThan(u8vec2, u8vec2);" "bvec3 greaterThan(u8vec3, u8vec3);" "bvec4 greaterThan(u8vec4, u8vec4);" "bvec2 greaterThanEqual(i8vec2, i8vec2);" "bvec3 greaterThanEqual(i8vec3, i8vec3);" "bvec4 greaterThanEqual(i8vec4, i8vec4);" "bvec2 greaterThanEqual(u8vec2, u8vec2);" "bvec3 greaterThanEqual(u8vec3, u8vec3);" "bvec4 greaterThanEqual(u8vec4, u8vec4);" "bvec2 equal(i8vec2, i8vec2);" "bvec3 equal(i8vec3, i8vec3);" "bvec4 equal(i8vec4, i8vec4);" "bvec2 equal(u8vec2, u8vec2);" "bvec3 equal(u8vec3, u8vec3);" "bvec4 equal(u8vec4, u8vec4);" "bvec2 notEqual(i8vec2, i8vec2);" "bvec3 notEqual(i8vec3, i8vec3);" "bvec4 notEqual(i8vec4, i8vec4);" "bvec2 notEqual(u8vec2, u8vec2);" "bvec3 notEqual(u8vec3, u8vec3);" "bvec4 notEqual(u8vec4, u8vec4);" " int8_t bitfieldExtract( int8_t, int8_t, int8_t);" "i8vec2 bitfieldExtract(i8vec2, int8_t, int8_t);" "i8vec3 bitfieldExtract(i8vec3, int8_t, int8_t);" "i8vec4 bitfieldExtract(i8vec4, int8_t, int8_t);" " uint8_t bitfieldExtract( uint8_t, int8_t, int8_t);" "u8vec2 bitfieldExtract(u8vec2, int8_t, int8_t);" "u8vec3 bitfieldExtract(u8vec3, int8_t, int8_t);" "u8vec4 bitfieldExtract(u8vec4, int8_t, int8_t);" " int8_t bitfieldInsert( int8_t base, int8_t, int8_t, int8_t);" "i8vec2 bitfieldInsert(i8vec2 base, i8vec2, int8_t, int8_t);" "i8vec3 bitfieldInsert(i8vec3 base, i8vec3, int8_t, int8_t);" "i8vec4 bitfieldInsert(i8vec4 base, i8vec4, int8_t, int8_t);" " uint8_t bitfieldInsert( uint8_t base, uint8_t, int8_t, int8_t);" "u8vec2 bitfieldInsert(u8vec2 base, u8vec2, int8_t, int8_t);" "u8vec3 bitfieldInsert(u8vec3 base, u8vec3, int8_t, int8_t);" "u8vec4 bitfieldInsert(u8vec4 base, u8vec4, int8_t, int8_t);" " int8_t bitCount( int8_t);" "i8vec2 bitCount(i8vec2);" "i8vec3 bitCount(i8vec3);" "i8vec4 bitCount(i8vec4);" " int8_t bitCount( uint8_t);" "i8vec2 bitCount(u8vec2);" "i8vec3 bitCount(u8vec3);" "i8vec4 bitCount(u8vec4);" " int8_t findLSB( int8_t);" "i8vec2 findLSB(i8vec2);" "i8vec3 findLSB(i8vec3);" "i8vec4 findLSB(i8vec4);" " int8_t findLSB( uint8_t);" "i8vec2 findLSB(u8vec2);" "i8vec3 findLSB(u8vec3);" "i8vec4 findLSB(u8vec4);" " int8_t findMSB( int8_t);" "i8vec2 findMSB(i8vec2);" "i8vec3 findMSB(i8vec3);" "i8vec4 findMSB(i8vec4);" " int8_t findMSB( uint8_t);" "i8vec2 findMSB(u8vec2);" "i8vec3 findMSB(u8vec3);" "i8vec4 findMSB(u8vec4);" "int16_t abs(int16_t);" "i16vec2 abs(i16vec2);" "i16vec3 abs(i16vec3);" "i16vec4 abs(i16vec4);" "int16_t sign(int16_t);" "i16vec2 sign(i16vec2);" "i16vec3 sign(i16vec3);" "i16vec4 sign(i16vec4);" "int16_t min(int16_t x, int16_t y);" "i16vec2 min(i16vec2 x, int16_t y);" "i16vec3 min(i16vec3 x, int16_t y);" "i16vec4 min(i16vec4 x, int16_t y);" "i16vec2 min(i16vec2 x, i16vec2 y);" "i16vec3 min(i16vec3 x, i16vec3 y);" "i16vec4 min(i16vec4 x, i16vec4 y);" "uint16_t min(uint16_t x, uint16_t y);" "u16vec2 min(u16vec2 x, uint16_t y);" "u16vec3 min(u16vec3 x, uint16_t y);" "u16vec4 min(u16vec4 x, uint16_t y);" "u16vec2 min(u16vec2 x, u16vec2 y);" "u16vec3 min(u16vec3 x, u16vec3 y);" "u16vec4 min(u16vec4 x, u16vec4 y);" "int16_t max(int16_t x, int16_t y);" "i16vec2 max(i16vec2 x, int16_t y);" "i16vec3 max(i16vec3 x, int16_t y);" "i16vec4 max(i16vec4 x, int16_t y);" "i16vec2 max(i16vec2 x, i16vec2 y);" "i16vec3 max(i16vec3 x, i16vec3 y);" "i16vec4 max(i16vec4 x, i16vec4 y);" "uint16_t max(uint16_t x, uint16_t y);" "u16vec2 max(u16vec2 x, uint16_t y);" "u16vec3 max(u16vec3 x, uint16_t y);" "u16vec4 max(u16vec4 x, uint16_t y);" "u16vec2 max(u16vec2 x, u16vec2 y);" "u16vec3 max(u16vec3 x, u16vec3 y);" "u16vec4 max(u16vec4 x, u16vec4 y);" "int16_t clamp(int16_t x, int16_t minVal, int16_t maxVal);" "i16vec2 clamp(i16vec2 x, int16_t minVal, int16_t maxVal);" "i16vec3 clamp(i16vec3 x, int16_t minVal, int16_t maxVal);" "i16vec4 clamp(i16vec4 x, int16_t minVal, int16_t maxVal);" "i16vec2 clamp(i16vec2 x, i16vec2 minVal, i16vec2 maxVal);" "i16vec3 clamp(i16vec3 x, i16vec3 minVal, i16vec3 maxVal);" "i16vec4 clamp(i16vec4 x, i16vec4 minVal, i16vec4 maxVal);" "uint16_t clamp(uint16_t x, uint16_t minVal, uint16_t maxVal);" "u16vec2 clamp(u16vec2 x, uint16_t minVal, uint16_t maxVal);" "u16vec3 clamp(u16vec3 x, uint16_t minVal, uint16_t maxVal);" "u16vec4 clamp(u16vec4 x, uint16_t minVal, uint16_t maxVal);" "u16vec2 clamp(u16vec2 x, u16vec2 minVal, u16vec2 maxVal);" "u16vec3 clamp(u16vec3 x, u16vec3 minVal, u16vec3 maxVal);" "u16vec4 clamp(u16vec4 x, u16vec4 minVal, u16vec4 maxVal);" "int16_t mix(int16_t, int16_t, bool);" "i16vec2 mix(i16vec2, i16vec2, bvec2);" "i16vec3 mix(i16vec3, i16vec3, bvec3);" "i16vec4 mix(i16vec4, i16vec4, bvec4);" "uint16_t mix(uint16_t, uint16_t, bool);" "u16vec2 mix(u16vec2, u16vec2, bvec2);" "u16vec3 mix(u16vec3, u16vec3, bvec3);" "u16vec4 mix(u16vec4, u16vec4, bvec4);" "float16_t frexp(float16_t, out int16_t);" "f16vec2 frexp(f16vec2, out i16vec2);" "f16vec3 frexp(f16vec3, out i16vec3);" "f16vec4 frexp(f16vec4, out i16vec4);" "float16_t ldexp(float16_t, int16_t);" "f16vec2 ldexp(f16vec2, i16vec2);" "f16vec3 ldexp(f16vec3, i16vec3);" "f16vec4 ldexp(f16vec4, i16vec4);" "int16_t halfBitsToInt16(float16_t);" "i16vec2 halfBitsToInt16(f16vec2);" "i16vec3 halhBitsToInt16(f16vec3);" "i16vec4 halfBitsToInt16(f16vec4);" "uint16_t halfBitsToUint16(float16_t);" "u16vec2 halfBitsToUint16(f16vec2);" "u16vec3 halfBitsToUint16(f16vec3);" "u16vec4 halfBitsToUint16(f16vec4);" "int16_t float16BitsToInt16(float16_t);" "i16vec2 float16BitsToInt16(f16vec2);" "i16vec3 float16BitsToInt16(f16vec3);" "i16vec4 float16BitsToInt16(f16vec4);" "uint16_t float16BitsToUint16(float16_t);" "u16vec2 float16BitsToUint16(f16vec2);" "u16vec3 float16BitsToUint16(f16vec3);" "u16vec4 float16BitsToUint16(f16vec4);" "float16_t int16BitsToFloat16(int16_t);" "f16vec2 int16BitsToFloat16(i16vec2);" "f16vec3 int16BitsToFloat16(i16vec3);" "f16vec4 int16BitsToFloat16(i16vec4);" "float16_t uint16BitsToFloat16(uint16_t);" "f16vec2 uint16BitsToFloat16(u16vec2);" "f16vec3 uint16BitsToFloat16(u16vec3);" "f16vec4 uint16BitsToFloat16(u16vec4);" "float16_t int16BitsToHalf(int16_t);" "f16vec2 int16BitsToHalf(i16vec2);" "f16vec3 int16BitsToHalf(i16vec3);" "f16vec4 int16BitsToHalf(i16vec4);" "float16_t uint16BitsToHalf(uint16_t);" "f16vec2 uint16BitsToHalf(u16vec2);" "f16vec3 uint16BitsToHalf(u16vec3);" "f16vec4 uint16BitsToHalf(u16vec4);" "int packInt2x16(i16vec2);" "uint packUint2x16(u16vec2);" "int64_t packInt4x16(i16vec4);" "uint64_t packUint4x16(u16vec4);" "i16vec2 unpackInt2x16(int);" "u16vec2 unpackUint2x16(uint);" "i16vec4 unpackInt4x16(int64_t);" "u16vec4 unpackUint4x16(uint64_t);" "bvec2 lessThan(i16vec2, i16vec2);" "bvec3 lessThan(i16vec3, i16vec3);" "bvec4 lessThan(i16vec4, i16vec4);" "bvec2 lessThan(u16vec2, u16vec2);" "bvec3 lessThan(u16vec3, u16vec3);" "bvec4 lessThan(u16vec4, u16vec4);" "bvec2 lessThanEqual(i16vec2, i16vec2);" "bvec3 lessThanEqual(i16vec3, i16vec3);" "bvec4 lessThanEqual(i16vec4, i16vec4);" "bvec2 lessThanEqual(u16vec2, u16vec2);" "bvec3 lessThanEqual(u16vec3, u16vec3);" "bvec4 lessThanEqual(u16vec4, u16vec4);" "bvec2 greaterThan(i16vec2, i16vec2);" "bvec3 greaterThan(i16vec3, i16vec3);" "bvec4 greaterThan(i16vec4, i16vec4);" "bvec2 greaterThan(u16vec2, u16vec2);" "bvec3 greaterThan(u16vec3, u16vec3);" "bvec4 greaterThan(u16vec4, u16vec4);" "bvec2 greaterThanEqual(i16vec2, i16vec2);" "bvec3 greaterThanEqual(i16vec3, i16vec3);" "bvec4 greaterThanEqual(i16vec4, i16vec4);" "bvec2 greaterThanEqual(u16vec2, u16vec2);" "bvec3 greaterThanEqual(u16vec3, u16vec3);" "bvec4 greaterThanEqual(u16vec4, u16vec4);" "bvec2 equal(i16vec2, i16vec2);" "bvec3 equal(i16vec3, i16vec3);" "bvec4 equal(i16vec4, i16vec4);" "bvec2 equal(u16vec2, u16vec2);" "bvec3 equal(u16vec3, u16vec3);" "bvec4 equal(u16vec4, u16vec4);" "bvec2 notEqual(i16vec2, i16vec2);" "bvec3 notEqual(i16vec3, i16vec3);" "bvec4 notEqual(i16vec4, i16vec4);" "bvec2 notEqual(u16vec2, u16vec2);" "bvec3 notEqual(u16vec3, u16vec3);" "bvec4 notEqual(u16vec4, u16vec4);" " int16_t bitfieldExtract( int16_t, int16_t, int16_t);" "i16vec2 bitfieldExtract(i16vec2, int16_t, int16_t);" "i16vec3 bitfieldExtract(i16vec3, int16_t, int16_t);" "i16vec4 bitfieldExtract(i16vec4, int16_t, int16_t);" " uint16_t bitfieldExtract( uint16_t, int16_t, int16_t);" "u16vec2 bitfieldExtract(u16vec2, int16_t, int16_t);" "u16vec3 bitfieldExtract(u16vec3, int16_t, int16_t);" "u16vec4 bitfieldExtract(u16vec4, int16_t, int16_t);" " int16_t bitfieldInsert( int16_t base, int16_t, int16_t, int16_t);" "i16vec2 bitfieldInsert(i16vec2 base, i16vec2, int16_t, int16_t);" "i16vec3 bitfieldInsert(i16vec3 base, i16vec3, int16_t, int16_t);" "i16vec4 bitfieldInsert(i16vec4 base, i16vec4, int16_t, int16_t);" " uint16_t bitfieldInsert( uint16_t base, uint16_t, int16_t, int16_t);" "u16vec2 bitfieldInsert(u16vec2 base, u16vec2, int16_t, int16_t);" "u16vec3 bitfieldInsert(u16vec3 base, u16vec3, int16_t, int16_t);" "u16vec4 bitfieldInsert(u16vec4 base, u16vec4, int16_t, int16_t);" " int16_t bitCount( int16_t);" "i16vec2 bitCount(i16vec2);" "i16vec3 bitCount(i16vec3);" "i16vec4 bitCount(i16vec4);" " int16_t bitCount( uint16_t);" "i16vec2 bitCount(u16vec2);" "i16vec3 bitCount(u16vec3);" "i16vec4 bitCount(u16vec4);" " int16_t findLSB( int16_t);" "i16vec2 findLSB(i16vec2);" "i16vec3 findLSB(i16vec3);" "i16vec4 findLSB(i16vec4);" " int16_t findLSB( uint16_t);" "i16vec2 findLSB(u16vec2);" "i16vec3 findLSB(u16vec3);" "i16vec4 findLSB(u16vec4);" " int16_t findMSB( int16_t);" "i16vec2 findMSB(i16vec2);" "i16vec3 findMSB(i16vec3);" "i16vec4 findMSB(i16vec4);" " int16_t findMSB( uint16_t);" "i16vec2 findMSB(u16vec2);" "i16vec3 findMSB(u16vec3);" "i16vec4 findMSB(u16vec4);" "int16_t pack16(i8vec2);" "uint16_t pack16(u8vec2);" "int32_t pack32(i8vec4);" "uint32_t pack32(u8vec4);" "int32_t pack32(i16vec2);" "uint32_t pack32(u16vec2);" "int64_t pack64(i16vec4);" "uint64_t pack64(u16vec4);" "int64_t pack64(i32vec2);" "uint64_t pack64(u32vec2);" "i8vec2 unpack8(int16_t);" "u8vec2 unpack8(uint16_t);" "i8vec4 unpack8(int32_t);" "u8vec4 unpack8(uint32_t);" "i16vec2 unpack16(int32_t);" "u16vec2 unpack16(uint32_t);" "i16vec4 unpack16(int64_t);" "u16vec4 unpack16(uint64_t);" "i32vec2 unpack32(int64_t);" "u32vec2 unpack32(uint64_t);" // GL_EXT_expect_assume "int8_t expectEXT(int8_t, int8_t);" "i8vec2 expectEXT(i8vec2, i8vec2);" "i8vec3 expectEXT(i8vec3, i8vec3);" "i8vec4 expectEXT(i8vec4, i8vec4);" "uint8_t expectEXT(uint8_t, uint8_t);" "u8vec2 expectEXT(u8vec2, u8vec2);" "u8vec3 expectEXT(u8vec3, u8vec3);" "u8vec4 expectEXT(u8vec4, u8vec4);" "int16_t expectEXT(int16_t, int16_t);" "i16vec2 expectEXT(i16vec2, i16vec2);" "i16vec3 expectEXT(i16vec3, i16vec3);" "i16vec4 expectEXT(i16vec4, i16vec4);" "uint16_t expectEXT(uint16_t, uint16_t);" "u16vec2 expectEXT(u16vec2, u16vec2);" "u16vec3 expectEXT(u16vec3, u16vec3);" "u16vec4 expectEXT(u16vec4, u16vec4);" "int64_t expectEXT(int64_t, int64_t);" "i64vec2 expectEXT(i64vec2, i64vec2);" "i64vec3 expectEXT(i64vec3, i64vec3);" "i64vec4 expectEXT(i64vec4, i64vec4);" "uint64_t expectEXT(uint64_t, uint64_t);" "u64vec2 expectEXT(u64vec2, u64vec2);" "u64vec3 expectEXT(u64vec3, u64vec3);" "u64vec4 expectEXT(u64vec4, u64vec4);" "\n"); } // Builtins for GL_EXT_texture_shadow_lod if ((profile == EEsProfile && version >= 300) || ((profile != EEsProfile && version >= 130))) { commonBuiltins.append( "float texture(sampler2DArrayShadow, vec4, float);" "float texture(samplerCubeArrayShadow, vec4, float, float);" "float textureLod(sampler2DArrayShadow, vec4, float);" "float textureLod(samplerCubeShadow, vec4, float);" "float textureLod(samplerCubeArrayShadow, vec4, float, float);" "float textureLodOffset(sampler2DArrayShadow, vec4, float, ivec2);" "float textureOffset(sampler2DArrayShadow, vec4 , ivec2, float);" "\n"); } if (profile != EEsProfile && version >= 450) { stageBuiltins[EShLangFragment].append(derivativesAndControl64bits); stageBuiltins[EShLangFragment].append( "float64_t interpolateAtCentroid(float64_t);" "f64vec2 interpolateAtCentroid(f64vec2);" "f64vec3 interpolateAtCentroid(f64vec3);" "f64vec4 interpolateAtCentroid(f64vec4);" "float64_t interpolateAtSample(float64_t, int);" "f64vec2 interpolateAtSample(f64vec2, int);" "f64vec3 interpolateAtSample(f64vec3, int);" "f64vec4 interpolateAtSample(f64vec4, int);" "float64_t interpolateAtOffset(float64_t, f64vec2);" "f64vec2 interpolateAtOffset(f64vec2, f64vec2);" "f64vec3 interpolateAtOffset(f64vec3, f64vec2);" "f64vec4 interpolateAtOffset(f64vec4, f64vec2);" "\n"); } // GL_EXT_expect_assume if ((profile == EEsProfile && version >= 310) || ((profile != EEsProfile && version >= 140))) { commonBuiltins.append( "void assumeEXT(bool);" "bool expectEXT(bool, bool);" "bvec2 expectEXT(bvec2, bvec2);" "bvec3 expectEXT(bvec3, bvec3);" "bvec4 expectEXT(bvec4, bvec4);" "int expectEXT(int, int);" "ivec2 expectEXT(ivec2, ivec2);" "ivec3 expectEXT(ivec3, ivec3);" "ivec4 expectEXT(ivec4, ivec4);" "uint expectEXT(uint, uint);" "uvec2 expectEXT(uvec2, uvec2);" "uvec3 expectEXT(uvec3, uvec3);" "uvec4 expectEXT(uvec4, uvec4);" "\n"); } // QCOM_image_processing if ((profile == EEsProfile && version >= 310) || (profile != EEsProfile && version >= 140)) { commonBuiltins.append( "vec4 textureWeightedQCOM(sampler2D, vec2, sampler2DArray);" "vec4 textureWeightedQCOM(sampler2D, vec2, sampler1DArray);" "vec4 textureBoxFilterQCOM(sampler2D, vec2, vec2);" "vec4 textureBlockMatchSADQCOM(sampler2D, uvec2, sampler2D, uvec2, uvec2);" "vec4 textureBlockMatchSSDQCOM(sampler2D, uvec2, sampler2D, uvec2, uvec2);" "vec4 textureBlockMatchWindowSSDQCOM(sampler2D, uvec2, sampler2D, uvec2, uvec2);" "vec4 textureBlockMatchWindowSADQCOM(sampler2D, uvec2, sampler2D, uvec2, uvec2);" "vec4 textureBlockMatchGatherSSDQCOM(sampler2D, uvec2, sampler2D, uvec2, uvec2);" "vec4 textureBlockMatchGatherSADQCOM(sampler2D, uvec2, sampler2D, uvec2, uvec2);" "\n"); } //============================================================================ // // Prototypes for built-in functions seen by vertex shaders only. // (Except legacy lod functions, where it depends which release they are // vertex only.) // //============================================================================ // // Geometric Functions. // if (spvVersion.vulkan == 0 && IncludeLegacy(version, profile, spvVersion)) stageBuiltins[EShLangVertex].append("vec4 ftransform();"); // // Original-style texture Functions with lod. // TString* s; if (version == 100) s = &stageBuiltins[EShLangVertex]; else s = &commonBuiltins; if ((profile == EEsProfile && version == 100) || profile == ECompatibilityProfile || (profile == ECoreProfile && version < 420) || profile == ENoProfile) { if (spvVersion.spv == 0) { s->append( "vec4 texture2DLod(sampler2D, vec2, float);" // GL_ARB_shader_texture_lod "vec4 texture2DProjLod(sampler2D, vec3, float);" // GL_ARB_shader_texture_lod "vec4 texture2DProjLod(sampler2D, vec4, float);" // GL_ARB_shader_texture_lod "vec4 texture3DLod(sampler3D, vec3, float);" // GL_ARB_shader_texture_lod // OES_texture_3D, but caught by keyword check "vec4 texture3DProjLod(sampler3D, vec4, float);" // GL_ARB_shader_texture_lod // OES_texture_3D, but caught by keyword check "vec4 textureCubeLod(samplerCube, vec3, float);" // GL_ARB_shader_texture_lod "\n"); } } if ( profile == ECompatibilityProfile || (profile == ECoreProfile && version < 420) || profile == ENoProfile) { if (spvVersion.spv == 0) { s->append( "vec4 texture1DLod(sampler1D, float, float);" // GL_ARB_shader_texture_lod "vec4 texture1DProjLod(sampler1D, vec2, float);" // GL_ARB_shader_texture_lod "vec4 texture1DProjLod(sampler1D, vec4, float);" // GL_ARB_shader_texture_lod "vec4 shadow1DLod(sampler1DShadow, vec3, float);" // GL_ARB_shader_texture_lod "vec4 shadow2DLod(sampler2DShadow, vec3, float);" // GL_ARB_shader_texture_lod "vec4 shadow1DProjLod(sampler1DShadow, vec4, float);" // GL_ARB_shader_texture_lod "vec4 shadow2DProjLod(sampler2DShadow, vec4, float);" // GL_ARB_shader_texture_lod "vec4 texture1DGradARB(sampler1D, float, float, float);" // GL_ARB_shader_texture_lod "vec4 texture1DProjGradARB(sampler1D, vec2, float, float);" // GL_ARB_shader_texture_lod "vec4 texture1DProjGradARB(sampler1D, vec4, float, float);" // GL_ARB_shader_texture_lod "vec4 texture2DGradARB(sampler2D, vec2, vec2, vec2);" // GL_ARB_shader_texture_lod "vec4 texture2DProjGradARB(sampler2D, vec3, vec2, vec2);" // GL_ARB_shader_texture_lod "vec4 texture2DProjGradARB(sampler2D, vec4, vec2, vec2);" // GL_ARB_shader_texture_lod "vec4 texture3DGradARB(sampler3D, vec3, vec3, vec3);" // GL_ARB_shader_texture_lod "vec4 texture3DProjGradARB(sampler3D, vec4, vec3, vec3);" // GL_ARB_shader_texture_lod "vec4 textureCubeGradARB(samplerCube, vec3, vec3, vec3);" // GL_ARB_shader_texture_lod "vec4 shadow1DGradARB(sampler1DShadow, vec3, float, float);" // GL_ARB_shader_texture_lod "vec4 shadow1DProjGradARB( sampler1DShadow, vec4, float, float);" // GL_ARB_shader_texture_lod "vec4 shadow2DGradARB(sampler2DShadow, vec3, vec2, vec2);" // GL_ARB_shader_texture_lod "vec4 shadow2DProjGradARB( sampler2DShadow, vec4, vec2, vec2);" // GL_ARB_shader_texture_lod "vec4 texture2DRectGradARB(sampler2DRect, vec2, vec2, vec2);" // GL_ARB_shader_texture_lod "vec4 texture2DRectProjGradARB( sampler2DRect, vec3, vec2, vec2);" // GL_ARB_shader_texture_lod "vec4 texture2DRectProjGradARB( sampler2DRect, vec4, vec2, vec2);" // GL_ARB_shader_texture_lod "vec4 shadow2DRectGradARB( sampler2DRectShadow, vec3, vec2, vec2);" // GL_ARB_shader_texture_lod "vec4 shadow2DRectProjGradARB(sampler2DRectShadow, vec4, vec2, vec2);" // GL_ARB_shader_texture_lod "\n"); } } if ((profile != EEsProfile && version >= 150) || (profile == EEsProfile && version >= 310)) { //============================================================================ // // Prototypes for built-in functions seen by geometry shaders only. // //============================================================================ if (profile != EEsProfile && version >= 150) { stageBuiltins[EShLangGeometry].append( "void EmitStreamVertex(int);" "void EndStreamPrimitive(int);" ); } stageBuiltins[EShLangGeometry].append( "void EmitVertex();" "void EndPrimitive();" "\n"); } //============================================================================ // // Prototypes for all control functions. // //============================================================================ bool esBarrier = (profile == EEsProfile && version >= 310); if ((profile != EEsProfile && version >= 150) || esBarrier) stageBuiltins[EShLangTessControl].append( "void barrier();" ); if ((profile != EEsProfile && version >= 420) || esBarrier) stageBuiltins[EShLangCompute].append( "void barrier();" ); if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 320)) { stageBuiltins[EShLangMesh].append( "void barrier();" ); stageBuiltins[EShLangTask].append( "void barrier();" ); } if ((profile != EEsProfile && version >= 130) || esBarrier) commonBuiltins.append( "void memoryBarrier();" ); if ((profile != EEsProfile && version >= 420) || esBarrier) { commonBuiltins.append( "void memoryBarrierBuffer();" ); stageBuiltins[EShLangCompute].append( "void memoryBarrierShared();" "void groupMemoryBarrier();" ); } if ((profile != EEsProfile && version >= 420) || esBarrier) { if (spvVersion.vulkan == 0 || spvVersion.vulkanRelaxed) { commonBuiltins.append("void memoryBarrierAtomicCounter();"); } commonBuiltins.append("void memoryBarrierImage();"); } if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 320)) { stageBuiltins[EShLangMesh].append( "void memoryBarrierShared();" "void groupMemoryBarrier();" ); stageBuiltins[EShLangTask].append( "void memoryBarrierShared();" "void groupMemoryBarrier();" ); } commonBuiltins.append("void controlBarrier(int, int, int, int);\n" "void memoryBarrier(int, int, int);\n"); commonBuiltins.append("void debugPrintfEXT();\n"); if (profile != EEsProfile && version >= 450) { // coopMatStoreNV perhaps ought to have "out" on the buf parameter, but // adding it introduces undesirable tempArgs on the stack. What we want // is more like "buf" thought of as a pointer value being an in parameter. stageBuiltins[EShLangCompute].append( "void coopMatLoadNV(out fcoopmatNV m, volatile coherent nontemporal float16_t[] buf, uint element, uint stride, bool colMajor);\n" "void coopMatLoadNV(out fcoopmatNV m, volatile coherent nontemporal float[] buf, uint element, uint stride, bool colMajor);\n" "void coopMatLoadNV(out fcoopmatNV m, volatile coherent nontemporal uint8_t[] buf, uint element, uint stride, bool colMajor);\n" "void coopMatLoadNV(out fcoopmatNV m, volatile coherent nontemporal uint16_t[] buf, uint element, uint stride, bool colMajor);\n" "void coopMatLoadNV(out fcoopmatNV m, volatile coherent nontemporal uint[] buf, uint element, uint stride, bool colMajor);\n" "void coopMatLoadNV(out fcoopmatNV m, volatile coherent nontemporal uint64_t[] buf, uint element, uint stride, bool colMajor);\n" "void coopMatLoadNV(out fcoopmatNV m, volatile coherent nontemporal uvec2[] buf, uint element, uint stride, bool colMajor);\n" "void coopMatLoadNV(out fcoopmatNV m, volatile coherent nontemporal uvec4[] buf, uint element, uint stride, bool colMajor);\n" "void coopMatStoreNV(fcoopmatNV m, volatile coherent nontemporal float16_t[] buf, uint element, uint stride, bool colMajor);\n" "void coopMatStoreNV(fcoopmatNV m, volatile coherent nontemporal float[] buf, uint element, uint stride, bool colMajor);\n" "void coopMatStoreNV(fcoopmatNV m, volatile coherent nontemporal float64_t[] buf, uint element, uint stride, bool colMajor);\n" "void coopMatStoreNV(fcoopmatNV m, volatile coherent nontemporal uint8_t[] buf, uint element, uint stride, bool colMajor);\n" "void coopMatStoreNV(fcoopmatNV m, volatile coherent nontemporal uint16_t[] buf, uint element, uint stride, bool colMajor);\n" "void coopMatStoreNV(fcoopmatNV m, volatile coherent nontemporal uint[] buf, uint element, uint stride, bool colMajor);\n" "void coopMatStoreNV(fcoopmatNV m, volatile coherent nontemporal uint64_t[] buf, uint element, uint stride, bool colMajor);\n" "void coopMatStoreNV(fcoopmatNV m, volatile coherent nontemporal uvec2[] buf, uint element, uint stride, bool colMajor);\n" "void coopMatStoreNV(fcoopmatNV m, volatile coherent nontemporal uvec4[] buf, uint element, uint stride, bool colMajor);\n" "fcoopmatNV coopMatMulAddNV(fcoopmatNV A, fcoopmatNV B, fcoopmatNV C);\n" "void coopMatLoadNV(out icoopmatNV m, volatile coherent nontemporal int8_t[] buf, uint element, uint stride, bool colMajor);\n" "void coopMatLoadNV(out icoopmatNV m, volatile coherent nontemporal int16_t[] buf, uint element, uint stride, bool colMajor);\n" "void coopMatLoadNV(out icoopmatNV m, volatile coherent nontemporal int[] buf, uint element, uint stride, bool colMajor);\n" "void coopMatLoadNV(out icoopmatNV m, volatile coherent nontemporal int64_t[] buf, uint element, uint stride, bool colMajor);\n" "void coopMatLoadNV(out icoopmatNV m, volatile coherent nontemporal ivec2[] buf, uint element, uint stride, bool colMajor);\n" "void coopMatLoadNV(out icoopmatNV m, volatile coherent nontemporal ivec4[] buf, uint element, uint stride, bool colMajor);\n" "void coopMatLoadNV(out icoopmatNV m, volatile coherent nontemporal uint8_t[] buf, uint element, uint stride, bool colMajor);\n" "void coopMatLoadNV(out icoopmatNV m, volatile coherent nontemporal uint16_t[] buf, uint element, uint stride, bool colMajor);\n" "void coopMatLoadNV(out icoopmatNV m, volatile coherent nontemporal uint[] buf, uint element, uint stride, bool colMajor);\n" "void coopMatLoadNV(out icoopmatNV m, volatile coherent nontemporal uint64_t[] buf, uint element, uint stride, bool colMajor);\n" "void coopMatLoadNV(out icoopmatNV m, volatile coherent nontemporal uvec2[] buf, uint element, uint stride, bool colMajor);\n" "void coopMatLoadNV(out icoopmatNV m, volatile coherent nontemporal uvec4[] buf, uint element, uint stride, bool colMajor);\n" "void coopMatLoadNV(out ucoopmatNV m, volatile coherent nontemporal int8_t[] buf, uint element, uint stride, bool colMajor);\n" "void coopMatLoadNV(out ucoopmatNV m, volatile coherent nontemporal int16_t[] buf, uint element, uint stride, bool colMajor);\n" "void coopMatLoadNV(out ucoopmatNV m, volatile coherent nontemporal int[] buf, uint element, uint stride, bool colMajor);\n" "void coopMatLoadNV(out ucoopmatNV m, volatile coherent nontemporal int64_t[] buf, uint element, uint stride, bool colMajor);\n" "void coopMatLoadNV(out ucoopmatNV m, volatile coherent nontemporal ivec2[] buf, uint element, uint stride, bool colMajor);\n" "void coopMatLoadNV(out ucoopmatNV m, volatile coherent nontemporal ivec4[] buf, uint element, uint stride, bool colMajor);\n" "void coopMatLoadNV(out ucoopmatNV m, volatile coherent nontemporal uint8_t[] buf, uint element, uint stride, bool colMajor);\n" "void coopMatLoadNV(out ucoopmatNV m, volatile coherent nontemporal uint16_t[] buf, uint element, uint stride, bool colMajor);\n" "void coopMatLoadNV(out ucoopmatNV m, volatile coherent nontemporal uint[] buf, uint element, uint stride, bool colMajor);\n" "void coopMatLoadNV(out ucoopmatNV m, volatile coherent nontemporal uint64_t[] buf, uint element, uint stride, bool colMajor);\n" "void coopMatLoadNV(out ucoopmatNV m, volatile coherent nontemporal uvec2[] buf, uint element, uint stride, bool colMajor);\n" "void coopMatLoadNV(out ucoopmatNV m, volatile coherent nontemporal uvec4[] buf, uint element, uint stride, bool colMajor);\n" "void coopMatStoreNV(icoopmatNV m, volatile coherent nontemporal int8_t[] buf, uint element, uint stride, bool colMajor);\n" "void coopMatStoreNV(icoopmatNV m, volatile coherent nontemporal int16_t[] buf, uint element, uint stride, bool colMajor);\n" "void coopMatStoreNV(icoopmatNV m, volatile coherent nontemporal int[] buf, uint element, uint stride, bool colMajor);\n" "void coopMatStoreNV(icoopmatNV m, volatile coherent nontemporal int64_t[] buf, uint element, uint stride, bool colMajor);\n" "void coopMatStoreNV(icoopmatNV m, volatile coherent nontemporal ivec2[] buf, uint element, uint stride, bool colMajor);\n" "void coopMatStoreNV(icoopmatNV m, volatile coherent nontemporal ivec4[] buf, uint element, uint stride, bool colMajor);\n" "void coopMatStoreNV(icoopmatNV m, volatile coherent nontemporal uint8_t[] buf, uint element, uint stride, bool colMajor);\n" "void coopMatStoreNV(icoopmatNV m, volatile coherent nontemporal uint16_t[] buf, uint element, uint stride, bool colMajor);\n" "void coopMatStoreNV(icoopmatNV m, volatile coherent nontemporal uint[] buf, uint element, uint stride, bool colMajor);\n" "void coopMatStoreNV(icoopmatNV m, volatile coherent nontemporal uint64_t[] buf, uint element, uint stride, bool colMajor);\n" "void coopMatStoreNV(icoopmatNV m, volatile coherent nontemporal uvec2[] buf, uint element, uint stride, bool colMajor);\n" "void coopMatStoreNV(icoopmatNV m, volatile coherent nontemporal uvec4[] buf, uint element, uint stride, bool colMajor);\n" "void coopMatStoreNV(ucoopmatNV m, volatile coherent nontemporal int8_t[] buf, uint element, uint stride, bool colMajor);\n" "void coopMatStoreNV(ucoopmatNV m, volatile coherent nontemporal int16_t[] buf, uint element, uint stride, bool colMajor);\n" "void coopMatStoreNV(ucoopmatNV m, volatile coherent nontemporal int[] buf, uint element, uint stride, bool colMajor);\n" "void coopMatStoreNV(ucoopmatNV m, volatile coherent nontemporal int64_t[] buf, uint element, uint stride, bool colMajor);\n" "void coopMatStoreNV(ucoopmatNV m, volatile coherent nontemporal ivec2[] buf, uint element, uint stride, bool colMajor);\n" "void coopMatStoreNV(ucoopmatNV m, volatile coherent nontemporal ivec4[] buf, uint element, uint stride, bool colMajor);\n" "void coopMatStoreNV(ucoopmatNV m, volatile coherent nontemporal uint8_t[] buf, uint element, uint stride, bool colMajor);\n" "void coopMatStoreNV(ucoopmatNV m, volatile coherent nontemporal uint16_t[] buf, uint element, uint stride, bool colMajor);\n" "void coopMatStoreNV(ucoopmatNV m, volatile coherent nontemporal uint[] buf, uint element, uint stride, bool colMajor);\n" "void coopMatStoreNV(ucoopmatNV m, volatile coherent nontemporal uint64_t[] buf, uint element, uint stride, bool colMajor);\n" "void coopMatStoreNV(ucoopmatNV m, volatile coherent nontemporal uvec2[] buf, uint element, uint stride, bool colMajor);\n" "void coopMatStoreNV(ucoopmatNV m, volatile coherent nontemporal uvec4[] buf, uint element, uint stride, bool colMajor);\n" "icoopmatNV coopMatMulAddNV(icoopmatNV A, icoopmatNV B, icoopmatNV C);\n" "ucoopmatNV coopMatMulAddNV(ucoopmatNV A, ucoopmatNV B, ucoopmatNV C);\n" ); std::stringstream cooperativeMatrixFuncs; { static const char *allTypes[] = { "float", "vec2", "vec4", "float16_t", "f16vec2", "f16vec4", "bfloat16_t", "bf16vec2", "bf16vec4", "floate5m2_t", "fe5m2vec2", "fe5m2vec4", "floate4m3_t", "fe4m3vec2", "fe4m3vec4", "double", "dvec2", "dvec4", "int8_t", "i8vec2", "i8vec4", "int16_t", "i16vec2", "i16vec4", "int", "ivec2", "ivec4", "int64_t", "i64vec2", "i64vec4", "uint8_t", "u8vec2", "u8vec4", "uint16_t", "u16vec2", "u16vec4", "uint", "uvec2", "uvec4", "uint64_t", "u64vec2", "u64vec4", }; for (auto t : allTypes) { cooperativeMatrixFuncs << "void coopMatLoad(out coopmat m, volatile coherent nontemporal " << t << "[] buf, uint element, uint stride, int matrixLayout);\n"; cooperativeMatrixFuncs << "void coopMatStore(coopmat m, volatile coherent nontemporal " << t << "[] buf, uint element, uint stride, int matrixLayout);\n"; } // Just use uint8_t for buffer type, we have special matching rules to allow any conversion cooperativeMatrixFuncs << "void coopMatLoadTensorNV(inout coopmat m, volatile coherent nontemporal uint8_t[] buf, uint element, tensorLayoutNV t);\n"; cooperativeMatrixFuncs << "void coopMatLoadTensorNV(inout coopmat m, volatile coherent nontemporal uint8_t[] buf, uint element, tensorLayoutNV t, tensorViewNV v);\n"; cooperativeMatrixFuncs << "void coopMatLoadTensorNV(inout coopmat m, volatile coherent nontemporal uint8_t[] buf, uint element, tensorLayoutNV t, __function f);\n"; cooperativeMatrixFuncs << "void coopMatLoadTensorNV(inout coopmat m, volatile coherent nontemporal uint8_t[] buf, uint element, tensorLayoutNV t, tensorViewNV v, __function f);\n"; cooperativeMatrixFuncs << "void coopMatStoreTensorNV(coopmat m, volatile coherent nontemporal uint8_t[] buf, uint element, tensorLayoutNV t);\n"; cooperativeMatrixFuncs << "void coopMatStoreTensorNV(coopmat m, volatile coherent nontemporal uint8_t[] buf, uint element, tensorLayoutNV t, tensorViewNV v);\n"; } cooperativeMatrixFuncs << "coopmat coopMatMulAdd(coopmat A, coopmat B, coopmat C);\n" "coopmat coopMatMulAdd(coopmat A, coopmat B, coopmat C, int matrixOperands);\n"; commonBuiltins.append(cooperativeMatrixFuncs.str().c_str()); commonBuiltins.append( "const int gl_MatrixUseA = 0;\n" "const int gl_MatrixUseB = 1;\n" "const int gl_MatrixUseAccumulator = 2;\n" "const int gl_MatrixOperandsSaturatingAccumulation = 0x10;\n" "const int gl_CooperativeMatrixLayoutRowMajor = 0;\n" "const int gl_CooperativeMatrixLayoutColumnMajor = 1;\n" "const int gl_CooperativeMatrixLayoutRowBlockedInterleavedARM = 4202;\n" "const int gl_CooperativeMatrixLayoutColumnBlockedInterleavedARM = 4203;\n" "\n" ); commonBuiltins.append( "void coopMatTransposeNV(out coopmat, coopmat);" "void coopMatReduceNV(out coopmat, coopmat, int, __function);" "void coopMatPerElementNV();" ); commonBuiltins.append( "const int gl_CooperativeMatrixReduceRowNV = 0x1;\n" "const int gl_CooperativeMatrixReduceColumnNV = 0x2;\n" "const int gl_CooperativeMatrixReduceRowAndColumnNV = 0x3;\n" "const int gl_CooperativeMatrixReduce2x2NV = 0x4;\n" "\n" ); commonBuiltins.append( "const int gl_CooperativeMatrixClampModeUndefinedNV = 0x0;\n" "const int gl_CooperativeMatrixClampModeConstantNV = 0x1;\n" "const int gl_CooperativeMatrixClampModeClampToEdgeNV = 0x2;\n" "const int gl_CooperativeMatrixClampModeRepeatNV = 0x3;\n" "const int gl_CooperativeMatrixClampModeMirrorRepeatNV = 0x4;\n" "\n" ); commonBuiltins.append( "tensorLayoutNV createTensorLayoutNV(uint Dim);\n" "tensorLayoutNV createTensorLayoutNV(uint Dim, uint Mode);\n" "tensorLayoutNV setTensorLayoutBlockSizeNV(tensorLayoutNV t, uint blockSize0);\n" "tensorLayoutNV setTensorLayoutBlockSizeNV(tensorLayoutNV t, uint blockSize0, uint blockSize1);\n" "tensorLayoutNV setTensorLayoutBlockSizeNV(tensorLayoutNV t, uint blockSize0, uint blockSize1, uint blockSize2);\n" "tensorLayoutNV setTensorLayoutBlockSizeNV(tensorLayoutNV t, uint blockSize0, uint blockSize1, uint blockSize2, uint blockSize3);\n" "tensorLayoutNV setTensorLayoutBlockSizeNV(tensorLayoutNV t, uint blockSize0, uint blockSize1, uint blockSize2, uint blockSize3, uint blockSize4);\n" "tensorLayoutNV setTensorLayoutDimensionNV(tensorLayoutNV t, uint dim0);\n" "tensorLayoutNV setTensorLayoutDimensionNV(tensorLayoutNV t, uint dim0, uint dim1);\n" "tensorLayoutNV setTensorLayoutDimensionNV(tensorLayoutNV t, uint dim0, uint dim1, uint dim2);\n" "tensorLayoutNV setTensorLayoutDimensionNV(tensorLayoutNV t, uint dim0, uint dim1, uint dim2, uint dim3);\n" "tensorLayoutNV setTensorLayoutDimensionNV(tensorLayoutNV t, uint dim0, uint dim1, uint dim2, uint dim3, uint dim4);\n" "tensorLayoutNV setTensorLayoutStrideNV(tensorLayoutNV t, uint stride0);\n" "tensorLayoutNV setTensorLayoutStrideNV(tensorLayoutNV t, uint stride0, uint stride1);\n" "tensorLayoutNV setTensorLayoutStrideNV(tensorLayoutNV t, uint stride0, uint stride1, uint stride2);\n" "tensorLayoutNV setTensorLayoutStrideNV(tensorLayoutNV t, uint stride0, uint stride1, uint stride2, uint stride3);\n" "tensorLayoutNV setTensorLayoutStrideNV(tensorLayoutNV t, uint stride0, uint stride1, uint stride2, uint stride3, uint stride4);\n" "tensorLayoutNV sliceTensorLayoutNV(tensorLayoutNV t, uint offset0, uint span0);\n" "tensorLayoutNV sliceTensorLayoutNV(tensorLayoutNV t, uint offset0, uint span0, uint offset1, uint span1);\n" "tensorLayoutNV sliceTensorLayoutNV(tensorLayoutNV t, uint offset0, uint span0, uint offset1, uint span1, uint offset2, uint span2);\n" "tensorLayoutNV sliceTensorLayoutNV(tensorLayoutNV t, uint offset0, uint span0, uint offset1, uint span1, uint offset2, uint span2, uint offset3, uint span3);\n" "tensorLayoutNV sliceTensorLayoutNV(tensorLayoutNV t, uint offset0, uint span0, uint offset1, uint span1, uint offset2, uint span2, uint offset3, uint span3, uint offset4, uint span4);\n" "tensorLayoutNV setTensorLayoutClampValueNV(tensorLayoutNV t, uint value);\n" "tensorViewNV createTensorViewNV(uint Dim);\n" "tensorViewNV createTensorViewNV(uint Dim, bool HasDimensions);\n" "tensorViewNV createTensorViewNV(uint Dim, bool HasDimensions, uint p0);\n" "tensorViewNV createTensorViewNV(uint Dim, bool HasDimensions, uint p0, uint p1);\n" "tensorViewNV createTensorViewNV(uint Dim, bool HasDimensions, uint p0, uint p1, uint p2);\n" "tensorViewNV createTensorViewNV(uint Dim, bool HasDimensions, uint p0, uint p1, uint p2, uint p3);\n" "tensorViewNV createTensorViewNV(uint Dim, bool HasDimensions, uint p0, uint p1, uint p2, uint p3, uint p4);\n" "tensorViewNV setTensorViewDimensionsNV(tensorViewNV v, uint dim0);\n" "tensorViewNV setTensorViewDimensionsNV(tensorViewNV v, uint dim0, uint dim1);\n" "tensorViewNV setTensorViewDimensionsNV(tensorViewNV v, uint dim0, uint dim1, uint dim2);\n" "tensorViewNV setTensorViewDimensionsNV(tensorViewNV v, uint dim0, uint dim1, uint dim2, uint dim3);\n" "tensorViewNV setTensorViewDimensionsNV(tensorViewNV v, uint dim0, uint dim1, uint dim2, uint dim3, uint dim4);\n" "tensorViewNV setTensorViewStrideNV(tensorViewNV v, uint stride0);\n" "tensorViewNV setTensorViewStrideNV(tensorViewNV v, uint stride0, uint stride1);\n" "tensorViewNV setTensorViewStrideNV(tensorViewNV v, uint stride0, uint stride1, uint stride2);\n" "tensorViewNV setTensorViewStrideNV(tensorViewNV v, uint stride0, uint stride1, uint stride2, uint stride3);\n" "tensorViewNV setTensorViewStrideNV(tensorViewNV v, uint stride0, uint stride1, uint stride2, uint stride3, uint stride4);\n" "tensorViewNV setTensorViewClipNV(tensorViewNV v, uint clipRowOffset, uint clipRowSpan, uint clipColOffset, uint clipColSpan);\n" "\n" ); } if (profile != EEsProfile && version >= 450) { const char *basicTypes[] = { "int8_t", "int16_t", "int32_t", "int64_t", "uint8_t", "uint16_t", "uint32_t", "uint64_t", "float16_t", "float32_t", "float64_t", }; for (uint32_t i = 0; i < sizeof(basicTypes)/sizeof(basicTypes[0]); ++i) { std::string func = std::string("void coopVecMatMulNV(out coopvecNV result, ") + std::string("coopvecNV v, ") + std::string("int inputInterpretation, ") + std::string(basicTypes[i]) + std::string("[] matrix, ") + std::string("uint matrixOffset, ") + std::string("int matrixInterpretation, ") + std::string("uint M, ") + std::string("uint K, ") + std::string("int matrixLayout, ") + std::string("bool transpose, ") + std::string("uint matrixStride);\n"); commonBuiltins.append(func.c_str()); for (uint32_t j = 0; j < sizeof(basicTypes)/sizeof(basicTypes[0]); ++j) { func = std::string("void coopVecMatMulAddNV(out coopvecNV result, ") + std::string("coopvecNV v, ") + std::string("int inputInterpretation, ") + std::string(basicTypes[i]) + std::string("[] matrix, ") + std::string("uint matrixOffset, ") + std::string("int matrixInterpretation, ") + std::string(basicTypes[j]) + std::string("[] bias, ") + std::string("uint biasOffset, ") + std::string("int biasInterpretation, ") + std::string("uint M, ") + std::string("uint K, ") + std::string("int matrixLayout, ") + std::string("bool transpose, ") + std::string("uint matrixStride);\n"); commonBuiltins.append(func.c_str()); } func = std::string("void coopVecOuterProductAccumulateNV(coopvecNV v1, coopvecNV v2, ") + std::string(basicTypes[i]) + std::string("[] buf, uint offset, uint stride, int matrixLayout, int matrixInterpretation);\n"); commonBuiltins.append(func.c_str()); func = std::string("void coopVecReduceSumAccumulateNV(coopvecNV v, ") + std::string(basicTypes[i]) + std::string("[] buf, uint offset);\n"); commonBuiltins.append(func.c_str()); } std::string cooperativeVectorFuncs = "coopvecNV fma(coopvecNV, coopvecNV, coopvecNV);\n" "coopvecNV min(coopvecNV, coopvecNV);\n" "coopvecNV max(coopvecNV, coopvecNV);\n" "coopvecNV step(coopvecNV, coopvecNV);\n" "coopvecNV exp(coopvecNV);\n" "coopvecNV log(coopvecNV);\n" "coopvecNV tanh(coopvecNV);\n" "coopvecNV atan(coopvecNV);\n" "coopvecNV clamp(coopvecNV, coopvecNV, coopvecNV);\n" "\n" ; commonBuiltins.append(cooperativeVectorFuncs.c_str()); const char *scalarAndVectorTypes[] = { "int8_t", "int16_t", "int32_t", "int64_t", "uint8_t", "uint16_t", "uint32_t", "uint64_t", "float16_t", "float32_t", "float64_t", "i8vec2", "i16vec2", "i32vec2", "i64vec2", "u8vec2", "u16vec2", "u32vec2", "u64vec2", "f16vec2", "f32vec2", "f64vec2", "i8vec3", "i16vec3", "i32vec3", "i64vec3", "u8vec3", "u16vec3", "u32vec3", "u64vec3", "f16vec3", "f32vec3", "f64vec3", "i8vec4", "i16vec4", "i32vec4", "i64vec4", "u8vec4", "u16vec4", "u32vec4", "u64vec4", "f16vec4", "f32vec4", "f64vec4", }; for (uint32_t i = 0; i < sizeof(scalarAndVectorTypes)/sizeof(scalarAndVectorTypes[0]); ++i) { std::string load = std::string("void coopVecLoadNV(out coopvecNV v, volatile coherent ") + std::string(scalarAndVectorTypes[i]) + std::string("[] buf, uint offset);"); std::string store = std::string("void coopVecStoreNV(coopvecNV v, volatile coherent ") + std::string(scalarAndVectorTypes[i]) + std::string("[] buf, uint offset);"); commonBuiltins.append(load.c_str()); commonBuiltins.append(store.c_str()); } commonBuiltins.append( "const int gl_CooperativeVectorMatrixLayoutRowMajorNV = 0;\n" "const int gl_CooperativeVectorMatrixLayoutColumnMajorNV = 1;\n" "const int gl_CooperativeVectorMatrixLayoutInferencingOptimalNV = 2;\n" "const int gl_CooperativeVectorMatrixLayoutTrainingOptimalNV = 3;\n" "\n" ); commonBuiltins.append( "const int gl_ComponentTypeFloat16NV = 0;\n" "const int gl_ComponentTypeFloat32NV = 1;\n" "const int gl_ComponentTypeFloat64NV = 2;\n" "const int gl_ComponentTypeSignedInt8NV = 3;\n" "const int gl_ComponentTypeSignedInt16NV = 4;\n" "const int gl_ComponentTypeSignedInt32NV = 5;\n" "const int gl_ComponentTypeSignedInt64NV = 6;\n" "const int gl_ComponentTypeUnsignedInt8NV = 7;\n" "const int gl_ComponentTypeUnsignedInt16NV = 8;\n" "const int gl_ComponentTypeUnsignedInt32NV = 9;\n" "const int gl_ComponentTypeUnsignedInt64NV = 10;\n" "const int gl_ComponentTypeSignedInt8PackedNV = 1000491000;\n" "const int gl_ComponentTypeUnsignedInt8PackedNV = 1000491001;\n" "const int gl_ComponentTypeFloatE4M3NV = 1000491002;\n" "const int gl_ComponentTypeFloatE5M2NV = 1000491003;\n" "\n" ); } //============================================================================ // // Prototypes for built-in functions seen by fragment shaders only. // //============================================================================ // // Original-style texture Functions with bias. // if (spvVersion.spv == 0 && (profile != EEsProfile || version == 100)) { stageBuiltins[EShLangFragment].append( "vec4 texture2D(sampler2D, vec2, float);" "vec4 texture2DProj(sampler2D, vec3, float);" "vec4 texture2DProj(sampler2D, vec4, float);" "vec4 texture3D(sampler3D, vec3, float);" // OES_texture_3D "vec4 texture3DProj(sampler3D, vec4, float);" // OES_texture_3D "vec4 textureCube(samplerCube, vec3, float);" "\n"); } if (spvVersion.spv == 0 && (profile != EEsProfile && version > 100)) { stageBuiltins[EShLangFragment].append( "vec4 texture1D(sampler1D, float, float);" "vec4 texture1DProj(sampler1D, vec2, float);" "vec4 texture1DProj(sampler1D, vec4, float);" "vec4 shadow1D(sampler1DShadow, vec3, float);" "vec4 shadow2D(sampler2DShadow, vec3, float);" "vec4 shadow1DProj(sampler1DShadow, vec4, float);" "vec4 shadow2DProj(sampler2DShadow, vec4, float);" "\n"); } if (spvVersion.spv == 0 && profile == EEsProfile) { stageBuiltins[EShLangFragment].append( "vec4 texture2DLodEXT(sampler2D, vec2, float);" // GL_EXT_shader_texture_lod "vec4 texture2DProjLodEXT(sampler2D, vec3, float);" // GL_EXT_shader_texture_lod "vec4 texture2DProjLodEXT(sampler2D, vec4, float);" // GL_EXT_shader_texture_lod "vec4 textureCubeLodEXT(samplerCube, vec3, float);" // GL_EXT_shader_texture_lod "\n"); } // GL_EXT_shader_tile_image if (spvVersion.vulkan > 0) { stageBuiltins[EShLangFragment].append( "lowp uint stencilAttachmentReadEXT();" "lowp uint stencilAttachmentReadEXT(int);" "highp float depthAttachmentReadEXT();" "highp float depthAttachmentReadEXT(int);" "\n"); stageBuiltins[EShLangFragment].append( "vec4 colorAttachmentReadEXT(attachmentEXT);" "vec4 colorAttachmentReadEXT(attachmentEXT, int);" "ivec4 colorAttachmentReadEXT(iattachmentEXT);" "ivec4 colorAttachmentReadEXT(iattachmentEXT, int);" "uvec4 colorAttachmentReadEXT(uattachmentEXT);" "uvec4 colorAttachmentReadEXT(uattachmentEXT, int);" "\n"); } // GL_ARB_derivative_control if (profile != EEsProfile && version >= 400) { stageBuiltins[EShLangFragment].append(derivativeControls); stageBuiltins[EShLangFragment].append("\n"); } // GL_OES_shader_multisample_interpolation if ((profile == EEsProfile && version >= 310) || (profile != EEsProfile && version >= 150)) { // NV_gpu_shader5 stageBuiltins[EShLangFragment].append( "float interpolateAtCentroid(float);" "vec2 interpolateAtCentroid(vec2);" "vec3 interpolateAtCentroid(vec3);" "vec4 interpolateAtCentroid(vec4);" "float interpolateAtSample(float, int);" "vec2 interpolateAtSample(vec2, int);" "vec3 interpolateAtSample(vec3, int);" "vec4 interpolateAtSample(vec4, int);" "float interpolateAtOffset(float, vec2);" "vec2 interpolateAtOffset(vec2, vec2);" "vec3 interpolateAtOffset(vec3, vec2);" "vec4 interpolateAtOffset(vec4, vec2);" "\n"); } stageBuiltins[EShLangFragment].append( "void beginInvocationInterlockARB(void);" "void endInvocationInterlockARB(void);"); stageBuiltins[EShLangFragment].append( "bool helperInvocationEXT();" "\n"); // GL_AMD_shader_explicit_vertex_parameter if (profile != EEsProfile && version >= 450) { stageBuiltins[EShLangFragment].append( "float interpolateAtVertexAMD(float, uint);" "vec2 interpolateAtVertexAMD(vec2, uint);" "vec3 interpolateAtVertexAMD(vec3, uint);" "vec4 interpolateAtVertexAMD(vec4, uint);" "int interpolateAtVertexAMD(int, uint);" "ivec2 interpolateAtVertexAMD(ivec2, uint);" "ivec3 interpolateAtVertexAMD(ivec3, uint);" "ivec4 interpolateAtVertexAMD(ivec4, uint);" "uint interpolateAtVertexAMD(uint, uint);" "uvec2 interpolateAtVertexAMD(uvec2, uint);" "uvec3 interpolateAtVertexAMD(uvec3, uint);" "uvec4 interpolateAtVertexAMD(uvec4, uint);" "float16_t interpolateAtVertexAMD(float16_t, uint);" "f16vec2 interpolateAtVertexAMD(f16vec2, uint);" "f16vec3 interpolateAtVertexAMD(f16vec3, uint);" "f16vec4 interpolateAtVertexAMD(f16vec4, uint);" "\n"); } // GL_AMD_gpu_shader_half_float if (profile != EEsProfile && version >= 450) { stageBuiltins[EShLangFragment].append(derivativesAndControl16bits); stageBuiltins[EShLangFragment].append("\n"); stageBuiltins[EShLangFragment].append( "float16_t interpolateAtCentroid(float16_t);" "f16vec2 interpolateAtCentroid(f16vec2);" "f16vec3 interpolateAtCentroid(f16vec3);" "f16vec4 interpolateAtCentroid(f16vec4);" "float16_t interpolateAtSample(float16_t, int);" "f16vec2 interpolateAtSample(f16vec2, int);" "f16vec3 interpolateAtSample(f16vec3, int);" "f16vec4 interpolateAtSample(f16vec4, int);" "float16_t interpolateAtOffset(float16_t, f16vec2);" "f16vec2 interpolateAtOffset(f16vec2, f16vec2);" "f16vec3 interpolateAtOffset(f16vec3, f16vec2);" "f16vec4 interpolateAtOffset(f16vec4, f16vec2);" "\n"); } // GL_ARB_shader_clock& GL_EXT_shader_realtime_clock if (profile != EEsProfile && version >= 450) { commonBuiltins.append( "uvec2 clock2x32ARB();" "uint64_t clockARB();" "uvec2 clockRealtime2x32EXT();" "uint64_t clockRealtimeEXT();" "\n"); } // GL_AMD_shader_fragment_mask if (profile != EEsProfile && version >= 450 && spvVersion.vulkan > 0) { stageBuiltins[EShLangFragment].append( "uint fragmentMaskFetchAMD(subpassInputMS);" "uint fragmentMaskFetchAMD(isubpassInputMS);" "uint fragmentMaskFetchAMD(usubpassInputMS);" "vec4 fragmentFetchAMD(subpassInputMS, uint);" "ivec4 fragmentFetchAMD(isubpassInputMS, uint);" "uvec4 fragmentFetchAMD(usubpassInputMS, uint);" "\n"); } // Builtins for GL_NV_ray_tracing/GL_NV_ray_tracing_motion_blur/GL_EXT_ray_tracing/GL_EXT_ray_query/ // GL_NV_shader_invocation_reorder/GL_KHR_ray_tracing_position_Fetch if (profile != EEsProfile && version >= 460) { commonBuiltins.append("void rayQueryInitializeEXT(rayQueryEXT, accelerationStructureEXT, uint, uint, vec3, float, vec3, float);" "void rayQueryTerminateEXT(rayQueryEXT);" "void rayQueryGenerateIntersectionEXT(rayQueryEXT, float);" "void rayQueryConfirmIntersectionEXT(rayQueryEXT);" "bool rayQueryProceedEXT(rayQueryEXT);" "uint rayQueryGetIntersectionTypeEXT(rayQueryEXT, bool);" "float rayQueryGetRayTMinEXT(rayQueryEXT);" "uint rayQueryGetRayFlagsEXT(rayQueryEXT);" "vec3 rayQueryGetWorldRayOriginEXT(rayQueryEXT);" "vec3 rayQueryGetWorldRayDirectionEXT(rayQueryEXT);" "float rayQueryGetIntersectionTEXT(rayQueryEXT, bool);" "int rayQueryGetIntersectionInstanceCustomIndexEXT(rayQueryEXT, bool);" "int rayQueryGetIntersectionInstanceIdEXT(rayQueryEXT, bool);" "uint rayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetEXT(rayQueryEXT, bool);" "int rayQueryGetIntersectionGeometryIndexEXT(rayQueryEXT, bool);" "int rayQueryGetIntersectionPrimitiveIndexEXT(rayQueryEXT, bool);" "vec2 rayQueryGetIntersectionBarycentricsEXT(rayQueryEXT, bool);" "bool rayQueryGetIntersectionFrontFaceEXT(rayQueryEXT, bool);" "bool rayQueryGetIntersectionCandidateAABBOpaqueEXT(rayQueryEXT);" "vec3 rayQueryGetIntersectionObjectRayDirectionEXT(rayQueryEXT, bool);" "vec3 rayQueryGetIntersectionObjectRayOriginEXT(rayQueryEXT, bool);" "mat4x3 rayQueryGetIntersectionObjectToWorldEXT(rayQueryEXT, bool);" "mat4x3 rayQueryGetIntersectionWorldToObjectEXT(rayQueryEXT, bool);" "void rayQueryGetIntersectionTriangleVertexPositionsEXT(rayQueryEXT, bool, out vec3[3]);" "int rayQueryGetIntersectionClusterIdNV(rayQueryEXT, bool);" "vec3 rayQueryGetIntersectionSpherePositionNV(rayQueryEXT, bool);" "float rayQueryGetIntersectionSphereRadiusNV(rayQueryEXT, bool);" "float rayQueryGetIntersectionLSSHitValueNV(rayQueryEXT, bool);" "void rayQueryGetIntersectionLSSPositionsNV(rayQueryEXT, bool, out vec3[2]);" "void rayQueryGetIntersectionLSSRadiiNV(rayQueryEXT, bool, out float[2]);" "bool rayQueryIsSphereHitNV(rayQueryEXT, bool);" "bool rayQueryIsLSSHitNV(rayQueryEXT, bool);" "\n"); stageBuiltins[EShLangRayGen].append( "void traceNV(accelerationStructureNV,uint,uint,uint,uint,uint,vec3,float,vec3,float,int);" "void traceRayMotionNV(accelerationStructureNV,uint,uint,uint,uint,uint,vec3,float,vec3,float,float,int);" "void traceRayEXT(accelerationStructureEXT,uint,uint,uint,uint,uint,vec3,float,vec3,float,int);" "void executeCallableNV(uint, int);" "void executeCallableEXT(uint, int);" "void hitObjectTraceRayNV(hitObjectNV,accelerationStructureEXT,uint,uint,uint,uint,uint,vec3,float,vec3,float,int);" "void hitObjectTraceRayMotionNV(hitObjectNV,accelerationStructureEXT,uint,uint,uint,uint,uint,vec3,float,vec3,float,float,int);" "void hitObjectRecordHitNV(hitObjectNV,accelerationStructureEXT,int,int,int,uint,uint,uint,vec3,float,vec3,float,int);" "void hitObjectRecordHitMotionNV(hitObjectNV,accelerationStructureEXT,int,int,int,uint,uint,uint,vec3,float,vec3,float,float,int);" "void hitObjectRecordHitWithIndexNV(hitObjectNV, accelerationStructureEXT,int,int,int,uint,uint,vec3,float,vec3,float,int);" "void hitObjectRecordHitWithIndexMotionNV(hitObjectNV, accelerationStructureEXT,int,int,int,uint,uint,vec3,float,vec3,float,float,int);" "void hitObjectRecordMissNV(hitObjectNV,uint,vec3,float,vec3,float);" "void hitObjectRecordMissMotionNV(hitObjectNV,uint,vec3,float,vec3,float,float);" "void hitObjectRecordEmptyNV(hitObjectNV);" "void hitObjectExecuteShaderNV(hitObjectNV,int);" "bool hitObjectIsEmptyNV(hitObjectNV);" "bool hitObjectIsMissNV(hitObjectNV);" "bool hitObjectIsHitNV(hitObjectNV);" "float hitObjectGetRayTMinNV(hitObjectNV);" "float hitObjectGetRayTMaxNV(hitObjectNV);" "vec3 hitObjectGetWorldRayOriginNV(hitObjectNV);" "vec3 hitObjectGetWorldRayDirectionNV(hitObjectNV);" "vec3 hitObjectGetObjectRayOriginNV(hitObjectNV);" "vec3 hitObjectGetObjectRayDirectionNV(hitObjectNV);" "mat4x3 hitObjectGetWorldToObjectNV(hitObjectNV);" "mat4x3 hitObjectGetObjectToWorldNV(hitObjectNV);" "int hitObjectGetInstanceCustomIndexNV(hitObjectNV);" "int hitObjectGetInstanceIdNV(hitObjectNV);" "int hitObjectGetGeometryIndexNV(hitObjectNV);" "int hitObjectGetPrimitiveIndexNV(hitObjectNV);" "uint hitObjectGetHitKindNV(hitObjectNV);" "void hitObjectGetAttributesNV(hitObjectNV,int);" "float hitObjectGetCurrentTimeNV(hitObjectNV);" "uint hitObjectGetShaderBindingTableRecordIndexNV(hitObjectNV);" "uvec2 hitObjectGetShaderRecordBufferHandleNV(hitObjectNV);" "int hitObjectGetClusterIdNV(hitObjectNV);" "void reorderThreadNV(uint, uint);" "void reorderThreadNV(hitObjectNV);" "void reorderThreadNV(hitObjectNV, uint, uint);" "vec3 fetchMicroTriangleVertexPositionNV(accelerationStructureEXT, int, int, int, ivec2);" "vec2 fetchMicroTriangleVertexBarycentricNV(accelerationStructureEXT, int, int, int, ivec2);" "vec3 hitObjectGetSpherePositionNV(hitObjectNV);" "float hitObjectGetSphereRadiusNV(hitObjectNV);" "void hitObjectGetLSSPositionsNV(hitObjectNV, out vec3[2]);" "void hitObjectGetLSSRadiiNV(hitObjectNV, out float[2]);" "bool hitObjectIsSphereHitNV(hitObjectNV);" "bool hitObjectIsLSSHitNV(hitObjectNV);" "\n"); stageBuiltins[EShLangIntersect].append( "bool reportIntersectionNV(float, uint);" "bool reportIntersectionEXT(float, uint);" "\n"); stageBuiltins[EShLangAnyHit].append( "void ignoreIntersectionNV();" "void terminateRayNV();" "\n"); stageBuiltins[EShLangClosestHit].append( "void traceNV(accelerationStructureNV,uint,uint,uint,uint,uint,vec3,float,vec3,float,int);" "void traceRayMotionNV(accelerationStructureNV,uint,uint,uint,uint,uint,vec3,float,vec3,float,float,int);" "void traceRayEXT(accelerationStructureEXT,uint,uint,uint,uint,uint,vec3,float,vec3,float,int);" "void executeCallableNV(uint, int);" "void executeCallableEXT(uint, int);" "void hitObjectTraceRayNV(hitObjectNV,accelerationStructureEXT,uint,uint,uint,uint,uint,vec3,float,vec3,float,int);" "void hitObjectTraceRayMotionNV(hitObjectNV,accelerationStructureEXT,uint,uint,uint,uint,uint,vec3,float,vec3,float,float,int);" "void hitObjectRecordHitNV(hitObjectNV,accelerationStructureEXT,int,int,int,uint,uint,uint,vec3,float,vec3,float,int);" "void hitObjectRecordHitMotionNV(hitObjectNV,accelerationStructureEXT,int,int,int,uint,uint,uint,vec3,float,vec3,float,float,int);" "void hitObjectRecordHitWithIndexNV(hitObjectNV,accelerationStructureEXT,int,int,int,uint,uint,vec3,float,vec3,float,int);" "void hitObjectRecordHitWithIndexMotionNV(hitObjectNV, accelerationStructureEXT,int,int,int,uint,uint,vec3,float,vec3,float,float,int);" "void hitObjectRecordMissNV(hitObjectNV, uint, vec3, float, vec3, float);" "void hitObjectRecordMissMotionNV(hitObjectNV,uint,vec3,float,vec3,float,float);" "void hitObjectRecordEmptyNV(hitObjectNV);" "void hitObjectExecuteShaderNV(hitObjectNV, int);" "bool hitObjectIsEmptyNV(hitObjectNV);" "bool hitObjectIsMissNV(hitObjectNV);" "bool hitObjectIsHitNV(hitObjectNV);" "float hitObjectGetRayTMinNV(hitObjectNV);" "float hitObjectGetRayTMaxNV(hitObjectNV);" "vec3 hitObjectGetWorldRayOriginNV(hitObjectNV);" "vec3 hitObjectGetWorldRayDirectionNV(hitObjectNV);" "vec3 hitObjectGetObjectRayOriginNV(hitObjectNV);" "vec3 hitObjectGetObjectRayDirectionNV(hitObjectNV);" "mat4x3 hitObjectGetWorldToObjectNV(hitObjectNV);" "mat4x3 hitObjectGetObjectToWorldNV(hitObjectNV);" "int hitObjectGetInstanceCustomIndexNV(hitObjectNV);" "int hitObjectGetInstanceIdNV(hitObjectNV);" "int hitObjectGetGeometryIndexNV(hitObjectNV);" "int hitObjectGetPrimitiveIndexNV(hitObjectNV);" "uint hitObjectGetHitKindNV(hitObjectNV);" "void hitObjectGetAttributesNV(hitObjectNV,int);" "float hitObjectGetCurrentTimeNV(hitObjectNV);" "uint hitObjectGetShaderBindingTableRecordIndexNV(hitObjectNV);" "uvec2 hitObjectGetShaderRecordBufferHandleNV(hitObjectNV);" "int hitObjectGetClusterIdNV(hitObjectNV);" "vec3 hitObjectGetSpherePositionNV(hitObjectNV);" "float hitObjectGetSphereRadiusNV(hitObjectNV);" "void hitObjectGetLSSPositionsNV(hitObjectNV, out vec3[2]);" "void hitObjectGetLSSRadiiNV(hitObjectNV, out float[2]);" "bool hitObjectIsSphereHitNV(hitObjectNV);" "bool hitObjectIsLSSHitNV(hitObjectNV);" "\n"); stageBuiltins[EShLangMiss].append( "void traceNV(accelerationStructureNV,uint,uint,uint,uint,uint,vec3,float,vec3,float,int);" "void traceRayMotionNV(accelerationStructureNV,uint,uint,uint,uint,uint,vec3,float,vec3,float,float,int);" "void traceRayEXT(accelerationStructureEXT,uint,uint,uint,uint,uint,vec3,float,vec3,float,int);" "void executeCallableNV(uint, int);" "void executeCallableEXT(uint, int);" "void hitObjectTraceRayNV(hitObjectNV,accelerationStructureEXT,uint,uint,uint,uint,uint,vec3,float,vec3,float,int);" "void hitObjectTraceRayMotionNV(hitObjectNV,accelerationStructureEXT,uint,uint,uint,uint,uint,vec3,float,vec3,float,float,int);" "void hitObjectRecordHitNV(hitObjectNV,accelerationStructureEXT,int,int,int,uint,uint,uint,vec3,float,vec3,float,int);" "void hitObjectRecordHitMotionNV(hitObjectNV,accelerationStructureEXT,int,int,int,uint,uint,uint,vec3,float,vec3,float,float,int);" "void hitObjectRecordHitWithIndexNV(hitObjectNV,accelerationStructureEXT,int,int,int,uint,uint,vec3,float,vec3,float,int);" "void hitObjectRecordHitWithIndexMotionNV(hitObjectNV, accelerationStructureEXT,int,int,int,uint,uint,vec3,float,vec3,float,float,int);" "void hitObjectRecordMissNV(hitObjectNV, uint, vec3, float, vec3, float);" "void hitObjectRecordMissMotionNV(hitObjectNV,uint,vec3,float,vec3,float,float);" "void hitObjectRecordEmptyNV(hitObjectNV);" "void hitObjectExecuteShaderNV(hitObjectNV, int);" "bool hitObjectIsEmptyNV(hitObjectNV);" "bool hitObjectIsMissNV(hitObjectNV);" "bool hitObjectIsHitNV(hitObjectNV);" "float hitObjectGetRayTMinNV(hitObjectNV);" "float hitObjectGetRayTMaxNV(hitObjectNV);" "vec3 hitObjectGetWorldRayOriginNV(hitObjectNV);" "vec3 hitObjectGetWorldRayDirectionNV(hitObjectNV);" "vec3 hitObjectGetObjectRayOriginNV(hitObjectNV);" "vec3 hitObjectGetObjectRayDirectionNV(hitObjectNV);" "mat4x3 hitObjectGetWorldToObjectNV(hitObjectNV);" "mat4x3 hitObjectGetObjectToWorldNV(hitObjectNV);" "int hitObjectGetInstanceCustomIndexNV(hitObjectNV);" "int hitObjectGetInstanceIdNV(hitObjectNV);" "int hitObjectGetGeometryIndexNV(hitObjectNV);" "int hitObjectGetPrimitiveIndexNV(hitObjectNV);" "uint hitObjectGetHitKindNV(hitObjectNV);" "void hitObjectGetAttributesNV(hitObjectNV,int);" "float hitObjectGetCurrentTimeNV(hitObjectNV);" "uint hitObjectGetShaderBindingTableRecordIndexNV(hitObjectNV);" "uvec2 hitObjectGetShaderRecordBufferHandleNV(hitObjectNV);" "int hitObjectGetClusterIdNV(hitObjectNV);" "vec3 hitObjectGetSpherePositionNV(hitObjectNV);" "float hitObjectGetSphereRadiusNV(hitObjectNV);" "void hitObjectGetLSSPositionsNV(hitObjectNV, out vec3[2]);" "void hitObjectGetLSSRadiiNV(hitObjectNV, out float[2]);" "bool hitObjectIsSphereHitNV(hitObjectNV);" "bool hitObjectIsLSSHitNV(hitObjectNV);" "\n"); stageBuiltins[EShLangCallable].append( "void executeCallableNV(uint, int);" "void executeCallableEXT(uint, int);" "\n"); } //E_SPV_NV_compute_shader_derivatives if ((profile == EEsProfile && version >= 320) || (profile != EEsProfile && version >= 450)) { stageBuiltins[EShLangCompute].append(derivativeControls); stageBuiltins[EShLangCompute].append("\n"); } if (profile != EEsProfile && version >= 450) { stageBuiltins[EShLangCompute].append(derivativesAndControl16bits); stageBuiltins[EShLangCompute].append(derivativesAndControl64bits); stageBuiltins[EShLangCompute].append("\n"); } // Builtins for GL_NV_mesh_shader if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 320)) { stageBuiltins[EShLangMesh].append( "void writePackedPrimitiveIndices4x8NV(uint, uint);" "\n"); } // Builtins for GL_EXT_mesh_shader if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 320)) { // Builtins for GL_EXT_mesh_shader stageBuiltins[EShLangTask].append( "void EmitMeshTasksEXT(uint, uint, uint);" "\n"); stageBuiltins[EShLangMesh].append( "void SetMeshOutputsEXT(uint, uint);" "\n"); } // Builtins for GL_NV_displacement_micromap if ((profile != EEsProfile && version >= 460) || (profile == EEsProfile && version >= 320)) { stageBuiltins[EShLangMesh].append( "vec3 fetchMicroTriangleVertexPositionNV(accelerationStructureEXT, int, int, int, ivec2);" "vec2 fetchMicroTriangleVertexBarycentricNV(accelerationStructureEXT, int, int, int, ivec2);" "\n"); stageBuiltins[EShLangCompute].append( "vec3 fetchMicroTriangleVertexPositionNV(accelerationStructureEXT, int, int, int, ivec2);" "vec2 fetchMicroTriangleVertexBarycentricNV(accelerationStructureEXT, int, int, int, ivec2);" "\n"); } //============================================================================ // // Standard Uniforms // //============================================================================ // // Depth range in window coordinates, p. 33 // if (spvVersion.spv == 0) { commonBuiltins.append( "struct gl_DepthRangeParameters {" ); if (profile == EEsProfile) { commonBuiltins.append( "highp float near;" // n "highp float far;" // f "highp float diff;" // f - n ); } else { commonBuiltins.append( "float near;" // n "float far;" // f "float diff;" // f - n ); } commonBuiltins.append( "};" "uniform gl_DepthRangeParameters gl_DepthRange;" "\n"); } if (spvVersion.spv == 0 && IncludeLegacy(version, profile, spvVersion)) { // // Matrix state. p. 31, 32, 37, 39, 40. // commonBuiltins.append( "uniform mat4 gl_ModelViewMatrix;" "uniform mat4 gl_ProjectionMatrix;" "uniform mat4 gl_ModelViewProjectionMatrix;" // // Derived matrix state that provides inverse and transposed versions // of the matrices above. // "uniform mat3 gl_NormalMatrix;" "uniform mat4 gl_ModelViewMatrixInverse;" "uniform mat4 gl_ProjectionMatrixInverse;" "uniform mat4 gl_ModelViewProjectionMatrixInverse;" "uniform mat4 gl_ModelViewMatrixTranspose;" "uniform mat4 gl_ProjectionMatrixTranspose;" "uniform mat4 gl_ModelViewProjectionMatrixTranspose;" "uniform mat4 gl_ModelViewMatrixInverseTranspose;" "uniform mat4 gl_ProjectionMatrixInverseTranspose;" "uniform mat4 gl_ModelViewProjectionMatrixInverseTranspose;" // // Normal scaling p. 39. // "uniform float gl_NormalScale;" // // Point Size, p. 66, 67. // "struct gl_PointParameters {" "float size;" "float sizeMin;" "float sizeMax;" "float fadeThresholdSize;" "float distanceConstantAttenuation;" "float distanceLinearAttenuation;" "float distanceQuadraticAttenuation;" "};" "uniform gl_PointParameters gl_Point;" // // Material State p. 50, 55. // "struct gl_MaterialParameters {" "vec4 emission;" // Ecm "vec4 ambient;" // Acm "vec4 diffuse;" // Dcm "vec4 specular;" // Scm "float shininess;" // Srm "};" "uniform gl_MaterialParameters gl_FrontMaterial;" "uniform gl_MaterialParameters gl_BackMaterial;" // // Light State p 50, 53, 55. // "struct gl_LightSourceParameters {" "vec4 ambient;" // Acli "vec4 diffuse;" // Dcli "vec4 specular;" // Scli "vec4 position;" // Ppli "vec4 halfVector;" // Derived: Hi "vec3 spotDirection;" // Sdli "float spotExponent;" // Srli "float spotCutoff;" // Crli // (range: [0.0,90.0], 180.0) "float spotCosCutoff;" // Derived: cos(Crli) // (range: [1.0,0.0],-1.0) "float constantAttenuation;" // K0 "float linearAttenuation;" // K1 "float quadraticAttenuation;"// K2 "};" "struct gl_LightModelParameters {" "vec4 ambient;" // Acs "};" "uniform gl_LightModelParameters gl_LightModel;" // // Derived state from products of light and material. // "struct gl_LightModelProducts {" "vec4 sceneColor;" // Derived. Ecm + Acm * Acs "};" "uniform gl_LightModelProducts gl_FrontLightModelProduct;" "uniform gl_LightModelProducts gl_BackLightModelProduct;" "struct gl_LightProducts {" "vec4 ambient;" // Acm * Acli "vec4 diffuse;" // Dcm * Dcli "vec4 specular;" // Scm * Scli "};" // // Fog p. 161 // "struct gl_FogParameters {" "vec4 color;" "float density;" "float start;" "float end;" "float scale;" // 1 / (gl_FogEnd - gl_FogStart) "};" "uniform gl_FogParameters gl_Fog;" "\n"); } //============================================================================ // // Define the interface to the compute shader. // //============================================================================ if ((profile != EEsProfile && version >= 420) || (profile == EEsProfile && version >= 310)) { stageBuiltins[EShLangCompute].append( "in highp uvec3 gl_NumWorkGroups;" "const highp uvec3 gl_WorkGroupSize = uvec3(1,1,1);" "in highp uvec3 gl_WorkGroupID;" "in highp uvec3 gl_LocalInvocationID;" "in highp uvec3 gl_GlobalInvocationID;" "in highp uint gl_LocalInvocationIndex;" "\n"); } if ((profile != EEsProfile && version >= 140) || (profile == EEsProfile && version >= 310)) { stageBuiltins[EShLangCompute].append( "in highp int gl_DeviceIndex;" // GL_EXT_device_group "\n"); } // GL_QCOM_tile_shading if ((profile == EEsProfile && version >= 310) || (profile != EEsProfile && version >= 460)) { stageBuiltins[EShLangCompute].append( "in highp uvec2 gl_TileOffsetQCOM;" // GL_QCOM_tile_shading "in highp uvec3 gl_TileDimensionQCOM;" // GL_QCOM_tile_shading "in highp uvec2 gl_TileApronSizeQCOM;" // GL_QCOM_tile_shading "\n"); } //============================================================================ // // Define the interface to the mesh/task shader. // //============================================================================ if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 320)) { // per-vertex attributes stageBuiltins[EShLangMesh].append( "out gl_MeshPerVertexNV {" "vec4 gl_Position;" "float gl_PointSize;" "float gl_ClipDistance[];" "float gl_CullDistance[];" "perviewNV vec4 gl_PositionPerViewNV[];" "perviewNV float gl_ClipDistancePerViewNV[][];" "perviewNV float gl_CullDistancePerViewNV[][];" "} gl_MeshVerticesNV[];" ); // per-primitive attributes stageBuiltins[EShLangMesh].append( "perprimitiveNV out gl_MeshPerPrimitiveNV {" "int gl_PrimitiveID;" "int gl_Layer;" "int gl_ViewportIndex;" "int gl_ViewportMask[];" "perviewNV int gl_LayerPerViewNV[];" "perviewNV int gl_ViewportMaskPerViewNV[][];" "} gl_MeshPrimitivesNV[];" ); stageBuiltins[EShLangMesh].append( "out uint gl_PrimitiveCountNV;" "out uint gl_PrimitiveIndicesNV[];" "in uint gl_MeshViewCountNV;" "in uint gl_MeshViewIndicesNV[4];" "const highp uvec3 gl_WorkGroupSize = uvec3(1,1,1);" "in highp uvec3 gl_WorkGroupID;" "in highp uvec3 gl_LocalInvocationID;" "in highp uvec3 gl_GlobalInvocationID;" "in highp uint gl_LocalInvocationIndex;" "\n"); // GL_EXT_mesh_shader stageBuiltins[EShLangMesh].append( "out uint gl_PrimitivePointIndicesEXT[];" "out uvec2 gl_PrimitiveLineIndicesEXT[];" "out uvec3 gl_PrimitiveTriangleIndicesEXT[];" "in highp uvec3 gl_NumWorkGroups;" "\n"); // per-vertex attributes stageBuiltins[EShLangMesh].append( "out gl_MeshPerVertexEXT {" "vec4 gl_Position;" "float gl_PointSize;" "float gl_ClipDistance[];" "float gl_CullDistance[];" "} gl_MeshVerticesEXT[];" ); // per-primitive attributes stageBuiltins[EShLangMesh].append( "perprimitiveEXT out gl_MeshPerPrimitiveEXT {" "int gl_PrimitiveID;" "int gl_Layer;" "int gl_ViewportIndex;" "bool gl_CullPrimitiveEXT;" "int gl_PrimitiveShadingRateEXT;" "} gl_MeshPrimitivesEXT[];" ); stageBuiltins[EShLangTask].append( "out uint gl_TaskCountNV;" "const highp uvec3 gl_WorkGroupSize = uvec3(1,1,1);" "in highp uvec3 gl_WorkGroupID;" "in highp uvec3 gl_LocalInvocationID;" "in highp uvec3 gl_GlobalInvocationID;" "in highp uint gl_LocalInvocationIndex;" "in uint gl_MeshViewCountNV;" "in uint gl_MeshViewIndicesNV[4];" "in highp uvec3 gl_NumWorkGroups;" "\n"); } if (profile != EEsProfile && version >= 450) { stageBuiltins[EShLangMesh].append( "in highp int gl_DeviceIndex;" // GL_EXT_device_group "in int gl_DrawIDARB;" // GL_ARB_shader_draw_parameters "in int gl_ViewIndex;" // GL_EXT_multiview "\n"); stageBuiltins[EShLangTask].append( "in highp int gl_DeviceIndex;" // GL_EXT_device_group "in int gl_DrawIDARB;" // GL_ARB_shader_draw_parameters "\n"); if (version >= 460) { stageBuiltins[EShLangMesh].append( "in int gl_DrawID;" "\n"); stageBuiltins[EShLangTask].append( "in int gl_DrawID;" "\n"); } } //============================================================================ // // Define the interface to the vertex shader. // //============================================================================ if (profile != EEsProfile) { if (version < 130) { stageBuiltins[EShLangVertex].append( "attribute vec4 gl_Color;" "attribute vec4 gl_SecondaryColor;" "attribute vec3 gl_Normal;" "attribute vec4 gl_Vertex;" "attribute vec4 gl_MultiTexCoord0;" "attribute vec4 gl_MultiTexCoord1;" "attribute vec4 gl_MultiTexCoord2;" "attribute vec4 gl_MultiTexCoord3;" "attribute vec4 gl_MultiTexCoord4;" "attribute vec4 gl_MultiTexCoord5;" "attribute vec4 gl_MultiTexCoord6;" "attribute vec4 gl_MultiTexCoord7;" "attribute float gl_FogCoord;" "\n"); } else if (IncludeLegacy(version, profile, spvVersion)) { stageBuiltins[EShLangVertex].append( "in vec4 gl_Color;" "in vec4 gl_SecondaryColor;" "in vec3 gl_Normal;" "in vec4 gl_Vertex;" "in vec4 gl_MultiTexCoord0;" "in vec4 gl_MultiTexCoord1;" "in vec4 gl_MultiTexCoord2;" "in vec4 gl_MultiTexCoord3;" "in vec4 gl_MultiTexCoord4;" "in vec4 gl_MultiTexCoord5;" "in vec4 gl_MultiTexCoord6;" "in vec4 gl_MultiTexCoord7;" "in float gl_FogCoord;" "\n"); } if (version < 150) { if (version < 130) { stageBuiltins[EShLangVertex].append( " vec4 gl_ClipVertex;" // needs qualifier fixed later "varying vec4 gl_FrontColor;" "varying vec4 gl_BackColor;" "varying vec4 gl_FrontSecondaryColor;" "varying vec4 gl_BackSecondaryColor;" "varying vec4 gl_TexCoord[];" "varying float gl_FogFragCoord;" "\n"); } else if (IncludeLegacy(version, profile, spvVersion)) { stageBuiltins[EShLangVertex].append( " vec4 gl_ClipVertex;" // needs qualifier fixed later "out vec4 gl_FrontColor;" "out vec4 gl_BackColor;" "out vec4 gl_FrontSecondaryColor;" "out vec4 gl_BackSecondaryColor;" "out vec4 gl_TexCoord[];" "out float gl_FogFragCoord;" "\n"); } stageBuiltins[EShLangVertex].append( "vec4 gl_Position;" // needs qualifier fixed later "float gl_PointSize;" // needs qualifier fixed later ); if (version == 130 || version == 140) stageBuiltins[EShLangVertex].append( "out float gl_ClipDistance[];" ); } else { // version >= 150 stageBuiltins[EShLangVertex].append( "out gl_PerVertex {" "vec4 gl_Position;" // needs qualifier fixed later "float gl_PointSize;" // needs qualifier fixed later "float gl_ClipDistance[];" ); if (IncludeLegacy(version, profile, spvVersion)) stageBuiltins[EShLangVertex].append( "vec4 gl_ClipVertex;" // needs qualifier fixed later "vec4 gl_FrontColor;" "vec4 gl_BackColor;" "vec4 gl_FrontSecondaryColor;" "vec4 gl_BackSecondaryColor;" "vec4 gl_TexCoord[];" "float gl_FogFragCoord;" ); if (version >= 450) stageBuiltins[EShLangVertex].append( "float gl_CullDistance[];" ); stageBuiltins[EShLangVertex].append( "};" "\n"); } if (version >= 130 && spvVersion.vulkan == 0) stageBuiltins[EShLangVertex].append( "int gl_VertexID;" // needs qualifier fixed later ); if (spvVersion.vulkan == 0) stageBuiltins[EShLangVertex].append( "int gl_InstanceID;" // needs qualifier fixed later ); if (spvVersion.vulkan > 0 && version >= 140) stageBuiltins[EShLangVertex].append( "in int gl_VertexIndex;" "in int gl_InstanceIndex;" ); if (spvVersion.vulkan > 0 && version >= 140 && spvVersion.vulkanRelaxed) stageBuiltins[EShLangVertex].append( "in int gl_VertexID;" // declare with 'in' qualifier "in int gl_InstanceID;" ); if (version >= 440) { stageBuiltins[EShLangVertex].append( "in int gl_BaseVertexARB;" "in int gl_BaseInstanceARB;" "in int gl_DrawIDARB;" ); } if (version >= 410) { stageBuiltins[EShLangVertex].append( "out int gl_ViewportIndex;" "out int gl_Layer;" ); } if (version >= 460) { stageBuiltins[EShLangVertex].append( "in int gl_BaseVertex;" "in int gl_BaseInstance;" "in int gl_DrawID;" ); } if (version >= 430) stageBuiltins[EShLangVertex].append( "out int gl_ViewportMask[];" // GL_NV_viewport_array2 ); if (version >= 450) stageBuiltins[EShLangVertex].append( "out int gl_SecondaryViewportMaskNV[];" // GL_NV_stereo_view_rendering "out vec4 gl_SecondaryPositionNV;" // GL_NV_stereo_view_rendering "out vec4 gl_PositionPerViewNV[];" // GL_NVX_multiview_per_view_attributes "out int gl_ViewportMaskPerViewNV[];" // GL_NVX_multiview_per_view_attributes ); } else { // ES profile if (version == 100) { stageBuiltins[EShLangVertex].append( "highp vec4 gl_Position;" // needs qualifier fixed later "mediump float gl_PointSize;" // needs qualifier fixed later "highp int gl_InstanceID;" // needs qualifier fixed later ); } else { if (spvVersion.vulkan == 0 || spvVersion.vulkanRelaxed) stageBuiltins[EShLangVertex].append( "in highp int gl_VertexID;" // needs qualifier fixed later "in highp int gl_InstanceID;" // needs qualifier fixed later ); if (spvVersion.vulkan > 0) stageBuiltins[EShLangVertex].append( "in highp int gl_VertexIndex;" "in highp int gl_InstanceIndex;" ); if (version < 310) stageBuiltins[EShLangVertex].append( "highp vec4 gl_Position;" // needs qualifier fixed later "highp float gl_PointSize;" // needs qualifier fixed later ); else stageBuiltins[EShLangVertex].append( "out gl_PerVertex {" "highp vec4 gl_Position;" // needs qualifier fixed later "highp float gl_PointSize;" // needs qualifier fixed later "};" ); } } if ((profile != EEsProfile && version >= 140) || (profile == EEsProfile && version >= 310)) { stageBuiltins[EShLangVertex].append( "in highp int gl_DeviceIndex;" // GL_EXT_device_group "in highp int gl_ViewIndex;" // GL_EXT_multiview "\n"); } if (version >= 300 /* both ES and non-ES */) { stageBuiltins[EShLangVertex].append( "in highp uint gl_ViewID_OVR;" // GL_OVR_multiview, GL_OVR_multiview2 "\n"); } if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 310)) { stageBuiltins[EShLangVertex].append( "out highp int gl_PrimitiveShadingRateEXT;" // GL_EXT_fragment_shading_rate "\n"); } //============================================================================ // // Define the interface to the geometry shader. // //============================================================================ if (profile == ECoreProfile || profile == ECompatibilityProfile) { stageBuiltins[EShLangGeometry].append( "in gl_PerVertex {" "vec4 gl_Position;" "float gl_PointSize;" "float gl_ClipDistance[];" ); if (profile == ECompatibilityProfile) stageBuiltins[EShLangGeometry].append( "vec4 gl_ClipVertex;" "vec4 gl_FrontColor;" "vec4 gl_BackColor;" "vec4 gl_FrontSecondaryColor;" "vec4 gl_BackSecondaryColor;" "vec4 gl_TexCoord[];" "float gl_FogFragCoord;" ); if (version >= 450) stageBuiltins[EShLangGeometry].append( "float gl_CullDistance[];" "vec4 gl_SecondaryPositionNV;" // GL_NV_stereo_view_rendering "vec4 gl_PositionPerViewNV[];" // GL_NVX_multiview_per_view_attributes ); stageBuiltins[EShLangGeometry].append( "} gl_in[];" "in int gl_PrimitiveIDIn;" "out gl_PerVertex {" "vec4 gl_Position;" "float gl_PointSize;" "float gl_ClipDistance[];" "\n"); if (profile == ECompatibilityProfile && version >= 400) stageBuiltins[EShLangGeometry].append( "vec4 gl_ClipVertex;" "vec4 gl_FrontColor;" "vec4 gl_BackColor;" "vec4 gl_FrontSecondaryColor;" "vec4 gl_BackSecondaryColor;" "vec4 gl_TexCoord[];" "float gl_FogFragCoord;" ); if (version >= 450) stageBuiltins[EShLangGeometry].append( "float gl_CullDistance[];" ); stageBuiltins[EShLangGeometry].append( "};" "out int gl_PrimitiveID;" "out int gl_Layer;"); if (version >= 150) stageBuiltins[EShLangGeometry].append( "out int gl_ViewportIndex;" ); if (profile == ECompatibilityProfile && version < 400) stageBuiltins[EShLangGeometry].append( "out vec4 gl_ClipVertex;" ); if (version >= 150) stageBuiltins[EShLangGeometry].append( "in int gl_InvocationID;" ); if (version >= 430) stageBuiltins[EShLangGeometry].append( "out int gl_ViewportMask[];" // GL_NV_viewport_array2 ); if (version >= 450) stageBuiltins[EShLangGeometry].append( "out int gl_SecondaryViewportMaskNV[];" // GL_NV_stereo_view_rendering "out vec4 gl_SecondaryPositionNV;" // GL_NV_stereo_view_rendering "out vec4 gl_PositionPerViewNV[];" // GL_NVX_multiview_per_view_attributes "out int gl_ViewportMaskPerViewNV[];" // GL_NVX_multiview_per_view_attributes ); stageBuiltins[EShLangGeometry].append("\n"); } else if (profile == EEsProfile && version >= 310) { stageBuiltins[EShLangGeometry].append( "in gl_PerVertex {" "highp vec4 gl_Position;" "highp float gl_PointSize;" "} gl_in[];" "\n" "in highp int gl_PrimitiveIDIn;" "in highp int gl_InvocationID;" "\n" "out gl_PerVertex {" "highp vec4 gl_Position;" "highp float gl_PointSize;" "};" "\n" "out highp int gl_PrimitiveID;" "out highp int gl_Layer;" "\n" ); } if ((profile != EEsProfile && version >= 140) || (profile == EEsProfile && version >= 310)) { stageBuiltins[EShLangGeometry].append( "in highp int gl_DeviceIndex;" // GL_EXT_device_group "in highp int gl_ViewIndex;" // GL_EXT_multiview "\n"); } if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 310)) { stageBuiltins[EShLangGeometry].append( "out highp int gl_PrimitiveShadingRateEXT;" // GL_EXT_fragment_shading_rate "\n"); } //============================================================================ // // Define the interface to the tessellation control shader. // //============================================================================ if (profile != EEsProfile && version >= 150) { // Note: "in gl_PerVertex {...} gl_in[gl_MaxPatchVertices];" is declared in initialize() below, // as it depends on the resource sizing of gl_MaxPatchVertices. stageBuiltins[EShLangTessControl].append( "in int gl_PatchVerticesIn;" "in int gl_PrimitiveID;" "in int gl_InvocationID;" "out gl_PerVertex {" "vec4 gl_Position;" "float gl_PointSize;" "float gl_ClipDistance[];" ); if (profile == ECompatibilityProfile) stageBuiltins[EShLangTessControl].append( "vec4 gl_ClipVertex;" "vec4 gl_FrontColor;" "vec4 gl_BackColor;" "vec4 gl_FrontSecondaryColor;" "vec4 gl_BackSecondaryColor;" "vec4 gl_TexCoord[];" "float gl_FogFragCoord;" ); if (version >= 450) stageBuiltins[EShLangTessControl].append( "float gl_CullDistance[];" ); if (version >= 430) stageBuiltins[EShLangTessControl].append( "int gl_ViewportMask[];" // GL_NV_viewport_array2 ); if (version >= 450) stageBuiltins[EShLangTessControl].append( "vec4 gl_SecondaryPositionNV;" // GL_NV_stereo_view_rendering "int gl_SecondaryViewportMaskNV[];" // GL_NV_stereo_view_rendering "vec4 gl_PositionPerViewNV[];" // GL_NVX_multiview_per_view_attributes "int gl_ViewportMaskPerViewNV[];" // GL_NVX_multiview_per_view_attributes ); stageBuiltins[EShLangTessControl].append( "} gl_out[];" "patch out float gl_TessLevelOuter[4];" "patch out float gl_TessLevelInner[2];" "\n"); if (version >= 410) stageBuiltins[EShLangTessControl].append( "out int gl_ViewportIndex;" "out int gl_Layer;" "\n"); } else { // Note: "in gl_PerVertex {...} gl_in[gl_MaxPatchVertices];" is declared in initialize() below, // as it depends on the resource sizing of gl_MaxPatchVertices. stageBuiltins[EShLangTessControl].append( "in highp int gl_PatchVerticesIn;" "in highp int gl_PrimitiveID;" "in highp int gl_InvocationID;" "out gl_PerVertex {" "highp vec4 gl_Position;" "highp float gl_PointSize;" ); stageBuiltins[EShLangTessControl].append( "} gl_out[];" "patch out highp float gl_TessLevelOuter[4];" "patch out highp float gl_TessLevelInner[2];" "patch out highp vec4 gl_BoundingBoxOES[2];" "patch out highp vec4 gl_BoundingBoxEXT[2];" "\n"); if (profile == EEsProfile && version >= 320) { stageBuiltins[EShLangTessControl].append( "patch out highp vec4 gl_BoundingBox[2];" "\n" ); } } if ((profile != EEsProfile && version >= 140) || (profile == EEsProfile && version >= 310)) { stageBuiltins[EShLangTessControl].append( "in highp int gl_DeviceIndex;" // GL_EXT_device_group "in highp int gl_ViewIndex;" // GL_EXT_multiview "\n"); } //============================================================================ // // Define the interface to the tessellation evaluation shader. // //============================================================================ if (profile != EEsProfile && version >= 150) { // Note: "in gl_PerVertex {...} gl_in[gl_MaxPatchVertices];" is declared in initialize() below, // as it depends on the resource sizing of gl_MaxPatchVertices. stageBuiltins[EShLangTessEvaluation].append( "in int gl_PatchVerticesIn;" "in int gl_PrimitiveID;" "in vec3 gl_TessCoord;" "patch in float gl_TessLevelOuter[4];" "patch in float gl_TessLevelInner[2];" "out gl_PerVertex {" "vec4 gl_Position;" "float gl_PointSize;" "float gl_ClipDistance[];" ); if (version >= 400 && profile == ECompatibilityProfile) stageBuiltins[EShLangTessEvaluation].append( "vec4 gl_ClipVertex;" "vec4 gl_FrontColor;" "vec4 gl_BackColor;" "vec4 gl_FrontSecondaryColor;" "vec4 gl_BackSecondaryColor;" "vec4 gl_TexCoord[];" "float gl_FogFragCoord;" ); if (version >= 450) stageBuiltins[EShLangTessEvaluation].append( "float gl_CullDistance[];" ); stageBuiltins[EShLangTessEvaluation].append( "};" "\n"); if (version >= 410) stageBuiltins[EShLangTessEvaluation].append( "out int gl_ViewportIndex;" "out int gl_Layer;" "\n"); if (version >= 430) stageBuiltins[EShLangTessEvaluation].append( "out int gl_ViewportMask[];" // GL_NV_viewport_array2 ); if (version >= 450) stageBuiltins[EShLangTessEvaluation].append( "out vec4 gl_SecondaryPositionNV;" // GL_NV_stereo_view_rendering "out int gl_SecondaryViewportMaskNV[];" // GL_NV_stereo_view_rendering "out vec4 gl_PositionPerViewNV[];" // GL_NVX_multiview_per_view_attributes "out int gl_ViewportMaskPerViewNV[];" // GL_NVX_multiview_per_view_attributes ); } else if (profile == EEsProfile && version >= 310) { // Note: "in gl_PerVertex {...} gl_in[gl_MaxPatchVertices];" is declared in initialize() below, // as it depends on the resource sizing of gl_MaxPatchVertices. stageBuiltins[EShLangTessEvaluation].append( "in highp int gl_PatchVerticesIn;" "in highp int gl_PrimitiveID;" "in highp vec3 gl_TessCoord;" "patch in highp float gl_TessLevelOuter[4];" "patch in highp float gl_TessLevelInner[2];" "out gl_PerVertex {" "highp vec4 gl_Position;" "highp float gl_PointSize;" ); stageBuiltins[EShLangTessEvaluation].append( "};" "\n"); } if ((profile != EEsProfile && version >= 140) || (profile == EEsProfile && version >= 310)) { stageBuiltins[EShLangTessEvaluation].append( "in highp int gl_DeviceIndex;" // GL_EXT_device_group "in highp int gl_ViewIndex;" // GL_EXT_multiview "\n"); } //============================================================================ // // Define the interface to the fragment shader. // //============================================================================ if (profile != EEsProfile) { stageBuiltins[EShLangFragment].append( "vec4 gl_FragCoord;" // needs qualifier fixed later "bool gl_FrontFacing;" // needs qualifier fixed later "float gl_FragDepth;" // needs qualifier fixed later ); if (version >= 120) stageBuiltins[EShLangFragment].append( "vec2 gl_PointCoord;" // needs qualifier fixed later ); if (version >= 140) stageBuiltins[EShLangFragment].append( "out int gl_FragStencilRefARB;" ); if (IncludeLegacy(version, profile, spvVersion) || (! ForwardCompatibility && version < 420)) stageBuiltins[EShLangFragment].append( "vec4 gl_FragColor;" // needs qualifier fixed later ); if (version < 130) { stageBuiltins[EShLangFragment].append( "varying vec4 gl_Color;" "varying vec4 gl_SecondaryColor;" "varying vec4 gl_TexCoord[];" "varying float gl_FogFragCoord;" ); } else { stageBuiltins[EShLangFragment].append( "in float gl_ClipDistance[];" ); if (IncludeLegacy(version, profile, spvVersion)) { if (version < 150) stageBuiltins[EShLangFragment].append( "in float gl_FogFragCoord;" "in vec4 gl_TexCoord[];" "in vec4 gl_Color;" "in vec4 gl_SecondaryColor;" ); else stageBuiltins[EShLangFragment].append( "in gl_PerFragment {" "in float gl_FogFragCoord;" "in vec4 gl_TexCoord[];" "in vec4 gl_Color;" "in vec4 gl_SecondaryColor;" "};" ); } } if (version >= 150) stageBuiltins[EShLangFragment].append( "flat in int gl_PrimitiveID;" ); if (version >= 130) { // ARB_sample_shading stageBuiltins[EShLangFragment].append( "flat in int gl_SampleID;" " in vec2 gl_SamplePosition;" " out int gl_SampleMask[];" ); if (spvVersion.spv == 0) { stageBuiltins[EShLangFragment].append( "uniform int gl_NumSamples;" ); } } if (version >= 150) stageBuiltins[EShLangFragment].append( "flat in int gl_SampleMaskIn[];" ); if (version >= 430) stageBuiltins[EShLangFragment].append( "flat in int gl_Layer;" "flat in int gl_ViewportIndex;" ); if (version >= 450) stageBuiltins[EShLangFragment].append( "in float gl_CullDistance[];" "bool gl_HelperInvocation;" // needs qualifier fixed later ); if (version >= 450) stageBuiltins[EShLangFragment].append( // GL_EXT_fragment_invocation_density "flat in ivec2 gl_FragSizeEXT;" "flat in int gl_FragInvocationCountEXT;" ); if (version >= 450) stageBuiltins[EShLangFragment].append( "in vec2 gl_BaryCoordNoPerspAMD;" "in vec2 gl_BaryCoordNoPerspCentroidAMD;" "in vec2 gl_BaryCoordNoPerspSampleAMD;" "in vec2 gl_BaryCoordSmoothAMD;" "in vec2 gl_BaryCoordSmoothCentroidAMD;" "in vec2 gl_BaryCoordSmoothSampleAMD;" "in vec3 gl_BaryCoordPullModelAMD;" ); if (version >= 430) stageBuiltins[EShLangFragment].append( "in bool gl_FragFullyCoveredNV;" ); if (version >= 450) stageBuiltins[EShLangFragment].append( "flat in ivec2 gl_FragmentSizeNV;" // GL_NV_shading_rate_image "flat in int gl_InvocationsPerPixelNV;" "in vec3 gl_BaryCoordNV;" // GL_NV_fragment_shader_barycentric "in vec3 gl_BaryCoordNoPerspNV;" "in vec3 gl_BaryCoordEXT;" // GL_EXT_fragment_shader_barycentric "in vec3 gl_BaryCoordNoPerspEXT;" ); if (version >= 450) stageBuiltins[EShLangFragment].append( "flat in int gl_ShadingRateEXT;" // GL_EXT_fragment_shading_rate ); } else { // ES profile if (version == 100) { stageBuiltins[EShLangFragment].append( "mediump vec4 gl_FragCoord;" // needs qualifier fixed later " bool gl_FrontFacing;" // needs qualifier fixed later "mediump vec4 gl_FragColor;" // needs qualifier fixed later "mediump vec2 gl_PointCoord;" // needs qualifier fixed later ); } if (version >= 300) { stageBuiltins[EShLangFragment].append( "highp vec4 gl_FragCoord;" // needs qualifier fixed later " bool gl_FrontFacing;" // needs qualifier fixed later "mediump vec2 gl_PointCoord;" // needs qualifier fixed later "highp float gl_FragDepth;" // needs qualifier fixed later ); } if (version >= 310) { stageBuiltins[EShLangFragment].append( "bool gl_HelperInvocation;" // needs qualifier fixed later "flat in highp int gl_PrimitiveID;" // needs qualifier fixed later "flat in highp int gl_Layer;" // needs qualifier fixed later ); stageBuiltins[EShLangFragment].append( // GL_OES_sample_variables "flat in lowp int gl_SampleID;" " in mediump vec2 gl_SamplePosition;" "flat in highp int gl_SampleMaskIn[];" " out highp int gl_SampleMask[];" ); if (spvVersion.spv == 0) stageBuiltins[EShLangFragment].append( // GL_OES_sample_variables "uniform lowp int gl_NumSamples;" ); } stageBuiltins[EShLangFragment].append( "highp float gl_FragDepthEXT;" // GL_EXT_frag_depth ); if (version >= 310) stageBuiltins[EShLangFragment].append( // GL_EXT_fragment_invocation_density "flat in ivec2 gl_FragSizeEXT;" "flat in int gl_FragInvocationCountEXT;" ); if (version >= 320) stageBuiltins[EShLangFragment].append( // GL_NV_shading_rate_image "flat in ivec2 gl_FragmentSizeNV;" "flat in int gl_InvocationsPerPixelNV;" ); if (version >= 320) stageBuiltins[EShLangFragment].append( "in vec3 gl_BaryCoordNV;" "in vec3 gl_BaryCoordNoPerspNV;" "in vec3 gl_BaryCoordEXT;" "in vec3 gl_BaryCoordNoPerspEXT;" ); if (version >= 310) stageBuiltins[EShLangFragment].append( "flat in highp int gl_ShadingRateEXT;" // GL_EXT_fragment_shading_rate ); } stageBuiltins[EShLangFragment].append("\n"); if (version >= 130) add2ndGenerationSamplingImaging(version, profile, spvVersion); if ((profile != EEsProfile && version >= 140) || (profile == EEsProfile && version >= 310)) { stageBuiltins[EShLangFragment].append( "flat in highp int gl_DeviceIndex;" // GL_EXT_device_group "flat in highp int gl_ViewIndex;" // GL_EXT_multiview "\n"); } if (version >= 300 /* both ES and non-ES */) { stageBuiltins[EShLangFragment].append( "flat in highp uint gl_ViewID_OVR;" // GL_OVR_multiview, GL_OVR_multiview2 "\n"); } // GL_QCOM_tile_shading if ((profile == EEsProfile && version >= 310) || (profile != EEsProfile && version >= 460)) { stageBuiltins[EShLangFragment].append( "flat in highp uvec2 gl_TileOffsetQCOM;" // GL_QCOM_tile_shading "flat in highp uvec3 gl_TileDimensionQCOM;" // GL_QCOM_tile_shading "flat in highp uvec2 gl_TileApronSizeQCOM;" // GL_QCOM_tile_shading "\n"); } // GL_ARB_shader_ballot if (profile != EEsProfile && version >= 450) { const char* ballotDecls = "uniform uint gl_SubGroupSizeARB;" "in uint gl_SubGroupInvocationARB;" "in uint64_t gl_SubGroupEqMaskARB;" "in uint64_t gl_SubGroupGeMaskARB;" "in uint64_t gl_SubGroupGtMaskARB;" "in uint64_t gl_SubGroupLeMaskARB;" "in uint64_t gl_SubGroupLtMaskARB;" "\n"; const char* rtBallotDecls = "uniform volatile uint gl_SubGroupSizeARB;" "in volatile uint gl_SubGroupInvocationARB;" "in volatile uint64_t gl_SubGroupEqMaskARB;" "in volatile uint64_t gl_SubGroupGeMaskARB;" "in volatile uint64_t gl_SubGroupGtMaskARB;" "in volatile uint64_t gl_SubGroupLeMaskARB;" "in volatile uint64_t gl_SubGroupLtMaskARB;" "\n"; const char* fragmentBallotDecls = "uniform uint gl_SubGroupSizeARB;" "flat in uint gl_SubGroupInvocationARB;" "flat in uint64_t gl_SubGroupEqMaskARB;" "flat in uint64_t gl_SubGroupGeMaskARB;" "flat in uint64_t gl_SubGroupGtMaskARB;" "flat in uint64_t gl_SubGroupLeMaskARB;" "flat in uint64_t gl_SubGroupLtMaskARB;" "\n"; stageBuiltins[EShLangVertex] .append(ballotDecls); stageBuiltins[EShLangTessControl] .append(ballotDecls); stageBuiltins[EShLangTessEvaluation].append(ballotDecls); stageBuiltins[EShLangGeometry] .append(ballotDecls); stageBuiltins[EShLangCompute] .append(ballotDecls); stageBuiltins[EShLangFragment] .append(fragmentBallotDecls); stageBuiltins[EShLangMesh] .append(ballotDecls); stageBuiltins[EShLangTask] .append(ballotDecls); stageBuiltins[EShLangRayGen] .append(rtBallotDecls); stageBuiltins[EShLangIntersect] .append(rtBallotDecls); // No volatile qualifier on these builtins in any-hit stageBuiltins[EShLangAnyHit] .append(ballotDecls); stageBuiltins[EShLangClosestHit] .append(rtBallotDecls); stageBuiltins[EShLangMiss] .append(rtBallotDecls); stageBuiltins[EShLangCallable] .append(rtBallotDecls); } // GL_KHR_shader_subgroup if ((profile == EEsProfile && version >= 310) || (profile != EEsProfile && version >= 140)) { const char* subgroupDecls = "in mediump uint gl_SubgroupSize;" "in mediump uint gl_SubgroupInvocationID;" "in highp uvec4 gl_SubgroupEqMask;" "in highp uvec4 gl_SubgroupGeMask;" "in highp uvec4 gl_SubgroupGtMask;" "in highp uvec4 gl_SubgroupLeMask;" "in highp uvec4 gl_SubgroupLtMask;" // GL_NV_shader_sm_builtins "in highp uint gl_WarpsPerSMNV;" "in highp uint gl_SMCountNV;" "in highp uint gl_WarpIDNV;" "in highp uint gl_SMIDNV;" // GL_ARM_shader_core_builtins "in highp uint gl_CoreIDARM;" "in highp uint gl_CoreCountARM;" "in highp uint gl_CoreMaxIDARM;" "in highp uint gl_WarpIDARM;" "in highp uint gl_WarpMaxIDARM;" "\n"; const char* fragmentSubgroupDecls = "flat in mediump uint gl_SubgroupSize;" "flat in mediump uint gl_SubgroupInvocationID;" "flat in highp uvec4 gl_SubgroupEqMask;" "flat in highp uvec4 gl_SubgroupGeMask;" "flat in highp uvec4 gl_SubgroupGtMask;" "flat in highp uvec4 gl_SubgroupLeMask;" "flat in highp uvec4 gl_SubgroupLtMask;" // GL_NV_shader_sm_builtins "flat in highp uint gl_WarpsPerSMNV;" "flat in highp uint gl_SMCountNV;" "flat in highp uint gl_WarpIDNV;" "flat in highp uint gl_SMIDNV;" // GL_ARM_shader_core_builtins "flat in highp uint gl_CoreIDARM;" "flat in highp uint gl_CoreCountARM;" "flat in highp uint gl_CoreMaxIDARM;" "flat in highp uint gl_WarpIDARM;" "flat in highp uint gl_WarpMaxIDARM;" "\n"; const char* computeSubgroupDecls = "in highp uint gl_NumSubgroups;" "in highp uint gl_SubgroupID;" "\n"; // These builtins are volatile for RT stages const char* rtSubgroupDecls = "in mediump volatile uint gl_SubgroupSize;" "in mediump volatile uint gl_SubgroupInvocationID;" "in highp volatile uvec4 gl_SubgroupEqMask;" "in highp volatile uvec4 gl_SubgroupGeMask;" "in highp volatile uvec4 gl_SubgroupGtMask;" "in highp volatile uvec4 gl_SubgroupLeMask;" "in highp volatile uvec4 gl_SubgroupLtMask;" // GL_NV_shader_sm_builtins "in highp uint gl_WarpsPerSMNV;" "in highp uint gl_SMCountNV;" "in highp volatile uint gl_WarpIDNV;" "in highp volatile uint gl_SMIDNV;" // GL_ARM_shader_core_builtins "in highp uint gl_CoreIDARM;" "in highp uint gl_CoreCountARM;" "in highp uint gl_CoreMaxIDARM;" "in highp uint gl_WarpIDARM;" "in highp uint gl_WarpMaxIDARM;" "\n"; stageBuiltins[EShLangVertex] .append(subgroupDecls); stageBuiltins[EShLangTessControl] .append(subgroupDecls); stageBuiltins[EShLangTessEvaluation].append(subgroupDecls); stageBuiltins[EShLangGeometry] .append(subgroupDecls); stageBuiltins[EShLangCompute] .append(subgroupDecls); stageBuiltins[EShLangCompute] .append(computeSubgroupDecls); stageBuiltins[EShLangFragment] .append(fragmentSubgroupDecls); stageBuiltins[EShLangMesh] .append(subgroupDecls); stageBuiltins[EShLangMesh] .append(computeSubgroupDecls); stageBuiltins[EShLangTask] .append(subgroupDecls); stageBuiltins[EShLangTask] .append(computeSubgroupDecls); stageBuiltins[EShLangRayGen] .append(rtSubgroupDecls); stageBuiltins[EShLangIntersect] .append(rtSubgroupDecls); // No volatile qualifier on these builtins in any-hit stageBuiltins[EShLangAnyHit] .append(subgroupDecls); stageBuiltins[EShLangClosestHit] .append(rtSubgroupDecls); stageBuiltins[EShLangMiss] .append(rtSubgroupDecls); stageBuiltins[EShLangCallable] .append(rtSubgroupDecls); } // GL_NV_ray_tracing/GL_EXT_ray_tracing if (profile != EEsProfile && version >= 460) { const char *constRayFlags = "const uint gl_RayFlagsNoneNV = 0U;" "const uint gl_RayFlagsNoneEXT = 0U;" "const uint gl_RayFlagsOpaqueNV = 1U;" "const uint gl_RayFlagsOpaqueEXT = 1U;" "const uint gl_RayFlagsNoOpaqueNV = 2U;" "const uint gl_RayFlagsNoOpaqueEXT = 2U;" "const uint gl_RayFlagsTerminateOnFirstHitNV = 4U;" "const uint gl_RayFlagsTerminateOnFirstHitEXT = 4U;" "const uint gl_RayFlagsSkipClosestHitShaderNV = 8U;" "const uint gl_RayFlagsSkipClosestHitShaderEXT = 8U;" "const uint gl_RayFlagsCullBackFacingTrianglesNV = 16U;" "const uint gl_RayFlagsCullBackFacingTrianglesEXT = 16U;" "const uint gl_RayFlagsCullFrontFacingTrianglesNV = 32U;" "const uint gl_RayFlagsCullFrontFacingTrianglesEXT = 32U;" "const uint gl_RayFlagsCullOpaqueNV = 64U;" "const uint gl_RayFlagsCullOpaqueEXT = 64U;" "const uint gl_RayFlagsCullNoOpaqueNV = 128U;" "const uint gl_RayFlagsCullNoOpaqueEXT = 128U;" "const uint gl_RayFlagsSkipTrianglesEXT = 256U;" "const uint gl_RayFlagsSkipBuiltinPrimitivesNV = 256U;" "const uint gl_RayFlagsSkipAABBEXT = 512U;" "const uint gl_RayFlagsForceOpacityMicromap2StateEXT = 1024U;" "const uint gl_HitKindFrontFacingTriangleEXT = 254U;" "const uint gl_HitKindBackFacingTriangleEXT = 255U;" "in uint gl_HitKindFrontFacingMicroTriangleNV;" "in uint gl_HitKindBackFacingMicroTriangleNV;" "const int gl_ClusterIDNoneNV = -1;" "\n"; const char *constRayQueryIntersection = "const uint gl_RayQueryCandidateIntersectionEXT = 0U;" "const uint gl_RayQueryCommittedIntersectionEXT = 1U;" "const uint gl_RayQueryCommittedIntersectionNoneEXT = 0U;" "const uint gl_RayQueryCommittedIntersectionTriangleEXT = 1U;" "const uint gl_RayQueryCommittedIntersectionGeneratedEXT = 2U;" "const uint gl_RayQueryCandidateIntersectionTriangleEXT = 0U;" "const uint gl_RayQueryCandidateIntersectionAABBEXT = 1U;" "\n"; const char *rayGenDecls = "in uvec3 gl_LaunchIDNV;" "in uvec3 gl_LaunchIDEXT;" "in uvec3 gl_LaunchSizeNV;" "in uvec3 gl_LaunchSizeEXT;" "\n"; const char *intersectDecls = "in uvec3 gl_LaunchIDNV;" "in uvec3 gl_LaunchIDEXT;" "in uvec3 gl_LaunchSizeNV;" "in uvec3 gl_LaunchSizeEXT;" "in int gl_PrimitiveID;" "in int gl_InstanceID;" "in int gl_InstanceCustomIndexNV;" "in int gl_InstanceCustomIndexEXT;" "in int gl_GeometryIndexEXT;" "in vec3 gl_WorldRayOriginNV;" "in vec3 gl_WorldRayOriginEXT;" "in vec3 gl_WorldRayDirectionNV;" "in vec3 gl_WorldRayDirectionEXT;" "in vec3 gl_ObjectRayOriginNV;" "in vec3 gl_ObjectRayOriginEXT;" "in vec3 gl_ObjectRayDirectionNV;" "in vec3 gl_ObjectRayDirectionEXT;" "in float gl_RayTminNV;" "in float gl_RayTminEXT;" "in float gl_RayTmaxNV;" "in volatile float gl_RayTmaxEXT;" "in mat4x3 gl_ObjectToWorldNV;" "in mat4x3 gl_ObjectToWorldEXT;" "in mat3x4 gl_ObjectToWorld3x4EXT;" "in mat4x3 gl_WorldToObjectNV;" "in mat4x3 gl_WorldToObjectEXT;" "in mat3x4 gl_WorldToObject3x4EXT;" "in uint gl_IncomingRayFlagsNV;" "in uint gl_IncomingRayFlagsEXT;" "in float gl_CurrentRayTimeNV;" "in uint gl_CullMaskEXT;" "\n"; const char *hitDecls = "in uvec3 gl_LaunchIDNV;" "in uvec3 gl_LaunchIDEXT;" "in uvec3 gl_LaunchSizeNV;" "in uvec3 gl_LaunchSizeEXT;" "in int gl_PrimitiveID;" "in int gl_InstanceID;" "in int gl_InstanceCustomIndexNV;" "in int gl_InstanceCustomIndexEXT;" "in int gl_GeometryIndexEXT;" "in vec3 gl_WorldRayOriginNV;" "in vec3 gl_WorldRayOriginEXT;" "in vec3 gl_WorldRayDirectionNV;" "in vec3 gl_WorldRayDirectionEXT;" "in vec3 gl_ObjectRayOriginNV;" "in vec3 gl_ObjectRayOriginEXT;" "in vec3 gl_ObjectRayDirectionNV;" "in vec3 gl_ObjectRayDirectionEXT;" "in float gl_RayTminNV;" "in float gl_RayTminEXT;" "in float gl_RayTmaxNV;" "in float gl_RayTmaxEXT;" "in float gl_HitTNV;" "in float gl_HitTEXT;" "in uint gl_HitKindNV;" "in uint gl_HitKindEXT;" "in mat4x3 gl_ObjectToWorldNV;" "in mat4x3 gl_ObjectToWorldEXT;" "in mat3x4 gl_ObjectToWorld3x4EXT;" "in mat4x3 gl_WorldToObjectNV;" "in mat4x3 gl_WorldToObjectEXT;" "in mat3x4 gl_WorldToObject3x4EXT;" "in uint gl_IncomingRayFlagsNV;" "in uint gl_IncomingRayFlagsEXT;" "in float gl_CurrentRayTimeNV;" "in uint gl_CullMaskEXT;" "in vec3 gl_HitTriangleVertexPositionsEXT[3];" "in vec3 gl_HitMicroTriangleVertexPositionsNV[3];" "in vec2 gl_HitMicroTriangleVertexBarycentricsNV[3];" "in int gl_ClusterIDNV;" "in bool gl_HitIsSphereNV;" "in bool gl_HitIsLSSNV;" "in vec3 gl_HitSpherePositionNV;" "in float gl_HitSphereRadiusNV;" "in vec3 gl_HitLSSPositionsNV[2];" "in float gl_HitLSSRadiiNV[2];" "\n"; const char *missDecls = "in uvec3 gl_LaunchIDNV;" "in uvec3 gl_LaunchIDEXT;" "in uvec3 gl_LaunchSizeNV;" "in uvec3 gl_LaunchSizeEXT;" "in vec3 gl_WorldRayOriginNV;" "in vec3 gl_WorldRayOriginEXT;" "in vec3 gl_WorldRayDirectionNV;" "in vec3 gl_WorldRayDirectionEXT;" "in vec3 gl_ObjectRayOriginNV;" "in vec3 gl_ObjectRayDirectionNV;" "in float gl_RayTminNV;" "in float gl_RayTminEXT;" "in float gl_RayTmaxNV;" "in float gl_RayTmaxEXT;" "in uint gl_IncomingRayFlagsNV;" "in uint gl_IncomingRayFlagsEXT;" "in float gl_CurrentRayTimeNV;" "in uint gl_CullMaskEXT;" "\n"; const char *callableDecls = "in uvec3 gl_LaunchIDNV;" "in uvec3 gl_LaunchIDEXT;" "in uvec3 gl_LaunchSizeNV;" "in uvec3 gl_LaunchSizeEXT;" "\n"; commonBuiltins.append(constRayQueryIntersection); commonBuiltins.append(constRayFlags); stageBuiltins[EShLangRayGen].append(rayGenDecls); stageBuiltins[EShLangIntersect].append(intersectDecls); stageBuiltins[EShLangAnyHit].append(hitDecls); stageBuiltins[EShLangClosestHit].append(hitDecls); stageBuiltins[EShLangMiss].append(missDecls); stageBuiltins[EShLangCallable].append(callableDecls); } if ((profile != EEsProfile && version >= 140)) { const char *deviceIndex = "in highp int gl_DeviceIndex;" // GL_EXT_device_group "\n"; stageBuiltins[EShLangRayGen].append(deviceIndex); stageBuiltins[EShLangIntersect].append(deviceIndex); stageBuiltins[EShLangAnyHit].append(deviceIndex); stageBuiltins[EShLangClosestHit].append(deviceIndex); stageBuiltins[EShLangMiss].append(deviceIndex); } if ((profile != EEsProfile && version >= 420) || (profile == EEsProfile && version >= 310)) { commonBuiltins.append("const int gl_ScopeDevice = 1;\n"); commonBuiltins.append("const int gl_ScopeWorkgroup = 2;\n"); commonBuiltins.append("const int gl_ScopeSubgroup = 3;\n"); commonBuiltins.append("const int gl_ScopeInvocation = 4;\n"); commonBuiltins.append("const int gl_ScopeQueueFamily = 5;\n"); commonBuiltins.append("const int gl_ScopeShaderCallEXT = 6;\n"); commonBuiltins.append("const int gl_SemanticsRelaxed = 0x0;\n"); commonBuiltins.append("const int gl_SemanticsAcquire = 0x2;\n"); commonBuiltins.append("const int gl_SemanticsRelease = 0x4;\n"); commonBuiltins.append("const int gl_SemanticsAcquireRelease = 0x8;\n"); commonBuiltins.append("const int gl_SemanticsMakeAvailable = 0x2000;\n"); commonBuiltins.append("const int gl_SemanticsMakeVisible = 0x4000;\n"); commonBuiltins.append("const int gl_SemanticsVolatile = 0x8000;\n"); commonBuiltins.append("const int gl_StorageSemanticsNone = 0x0;\n"); commonBuiltins.append("const int gl_StorageSemanticsBuffer = 0x40;\n"); commonBuiltins.append("const int gl_StorageSemanticsShared = 0x100;\n"); commonBuiltins.append("const int gl_StorageSemanticsImage = 0x800;\n"); commonBuiltins.append("const int gl_StorageSemanticsOutput = 0x1000;\n"); } // Adding these to common built-ins triggers an assert due to a memory corruption in related code when testing // So instead add to each stage individually, avoiding the GLSLang bug if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 310)) { for (int stage=EShLangVertex; stage(stage)].append("const highp int gl_ShadingRateFlag2VerticalPixelsEXT = 1;\n"); stageBuiltins[static_cast(stage)].append("const highp int gl_ShadingRateFlag4VerticalPixelsEXT = 2;\n"); stageBuiltins[static_cast(stage)].append("const highp int gl_ShadingRateFlag2HorizontalPixelsEXT = 4;\n"); stageBuiltins[static_cast(stage)].append("const highp int gl_ShadingRateFlag4HorizontalPixelsEXT = 8;\n"); } } // GL_EXT_shader_image_int64 if ((profile != EEsProfile && version >= 420) || (profile == EEsProfile && version >= 310)) { const TBasicType bTypes[] = { EbtInt64, EbtUint64 }; for (int ms = 0; ms <= 1; ++ms) { // loop over "bool" multisample or not for (int arrayed = 0; arrayed <= 1; ++arrayed) { // loop over "bool" arrayed or not for (int dim = Esd1D; dim < EsdSubpass; ++dim) { // 1D, ..., buffer if ((dim == Esd1D || dim == EsdRect) && profile == EEsProfile) continue; if ((dim == Esd3D || dim == EsdRect || dim == EsdBuffer) && arrayed) continue; if (dim != Esd2D && ms) continue; // Loop over the bTypes for (size_t bType = 0; bType < sizeof(bTypes)/sizeof(TBasicType); ++bType) { // // Now, make all the function prototypes for the type we just built... // TSampler sampler; sampler.setImage(bTypes[bType], (TSamplerDim)dim, arrayed ? true : false, false, ms ? true : false); TString typeName = sampler.getString(); addQueryFunctions(sampler, typeName, version, profile); addImageFunctions(sampler, typeName, version, profile); } } } } } // printf("%s\n", commonBuiltins.c_str()); // printf("%s\n", stageBuiltins[EShLangFragment].c_str()); } // // Helper function for initialize(), to add the second set of names for texturing, // when adding context-independent built-in functions. // void TBuiltIns::add2ndGenerationSamplingImaging(int version, EProfile profile, const SpvVersion& spvVersion) { // // In this function proper, enumerate the types, then calls the next set of functions // to enumerate all the uses for that type. // // enumerate all the types const TBasicType bTypes[] = { EbtFloat, EbtInt, EbtUint, EbtFloat16 }; bool skipBuffer = (profile == EEsProfile && version < 310) || (profile != EEsProfile && version < 140); bool skipCubeArrayed = (profile == EEsProfile && version < 310) || (profile != EEsProfile && version < 130); for (int image = 0; image <= 1; ++image) // loop over "bool" image vs sampler { for (int shadow = 0; shadow <= 1; ++shadow) { // loop over "bool" shadow or not for (int ms = 0; ms <= 1; ++ms) // loop over "bool" multisample or not { if ((ms || image) && shadow) continue; if (ms && profile != EEsProfile && version < 140) continue; if (ms && image && profile == EEsProfile) continue; if (ms && profile == EEsProfile && version < 310) continue; for (int arrayed = 0; arrayed <= 1; ++arrayed) { // loop over "bool" arrayed or not for (int dim = Esd1D; dim < EsdNumDims; ++dim) { // 1D, ..., buffer, subpass if (dim == EsdAttachmentEXT) continue; if (dim == EsdSubpass && spvVersion.vulkan == 0) continue; if (dim == EsdSubpass && (image || shadow || arrayed)) continue; if ((dim == Esd1D || dim == EsdRect) && profile == EEsProfile) continue; if (dim == EsdSubpass && spvVersion.vulkan == 0) continue; if (dim == EsdSubpass && (image || shadow || arrayed)) continue; if ((dim == Esd1D || dim == EsdRect) && profile == EEsProfile) continue; if (dim != Esd2D && dim != EsdSubpass && ms) continue; if (dim == EsdBuffer && skipBuffer) continue; if (dim == EsdBuffer && (shadow || arrayed || ms)) continue; if (ms && arrayed && profile == EEsProfile && version < 310) continue; if (dim == Esd3D && shadow) continue; if (dim == EsdCube && arrayed && skipCubeArrayed) continue; if ((dim == Esd3D || dim == EsdRect) && arrayed) continue; // Loop over the bTypes for (size_t bType = 0; bType < sizeof(bTypes)/sizeof(TBasicType); ++bType) { if (bTypes[bType] == EbtFloat16 && (profile == EEsProfile || version < 450)) continue; if (dim == EsdRect && version < 140 && bType > 0) continue; if (shadow && (bTypes[bType] == EbtInt || bTypes[bType] == EbtUint)) continue; // // Now, make all the function prototypes for the type we just built... // TSampler sampler; if (dim == EsdSubpass) { sampler.setSubpass(bTypes[bType], ms ? true : false); } else if (dim == EsdAttachmentEXT) { sampler.setAttachmentEXT(bTypes[bType]); } else if (image) { sampler.setImage(bTypes[bType], (TSamplerDim)dim, arrayed ? true : false, shadow ? true : false, ms ? true : false); } else { sampler.set(bTypes[bType], (TSamplerDim)dim, arrayed ? true : false, shadow ? true : false, ms ? true : false); } TString typeName = sampler.getString(); if (dim == EsdSubpass) { addSubpassSampling(sampler, typeName, version, profile); continue; } addQueryFunctions(sampler, typeName, version, profile); if (image) addImageFunctions(sampler, typeName, version, profile); else { addSamplingFunctions(sampler, typeName, version, profile); addGatherFunctions(sampler, typeName, version, profile); if (spvVersion.vulkan > 0 && sampler.isCombined() && !sampler.shadow) { // Base Vulkan allows texelFetch() for // textureBuffer (i.e. without sampler). // // GL_EXT_samplerless_texture_functions // allows texelFetch() and query functions // (other than textureQueryLod()) for all // texture types. sampler.setTexture(sampler.type, sampler.dim, sampler.arrayed, sampler.shadow, sampler.ms); TString textureTypeName = sampler.getString(); addSamplingFunctions(sampler, textureTypeName, version, profile); addQueryFunctions(sampler, textureTypeName, version, profile); } } } } } } } } // // sparseTexelsResidentARB() // if (profile != EEsProfile && version >= 450) { commonBuiltins.append("bool sparseTexelsResidentARB(int code);\n"); } } // // Helper function for add2ndGenerationSamplingImaging(), // when adding context-independent built-in functions. // // Add all the query functions for the given type. // void TBuiltIns::addQueryFunctions(TSampler sampler, const TString& typeName, int version, EProfile profile) { // // textureSize() and imageSize() // int sizeDims = dimMap[sampler.dim] + (sampler.arrayed ? 1 : 0) - (sampler.dim == EsdCube ? 1 : 0); if (sampler.isImage() && ((profile == EEsProfile && version < 310) || (profile != EEsProfile && version < 420))) return; if (profile == EEsProfile) commonBuiltins.append("highp "); if (sizeDims == 1) commonBuiltins.append("int"); else { commonBuiltins.append("ivec"); commonBuiltins.append(postfixes[sizeDims]); } if (sampler.isImage()) commonBuiltins.append(" imageSize(readonly writeonly volatile coherent nontemporal "); else commonBuiltins.append(" textureSize("); commonBuiltins.append(typeName); if (! sampler.isImage() && ! sampler.isRect() && ! sampler.isBuffer() && ! sampler.isMultiSample()) commonBuiltins.append(",int);\n"); else commonBuiltins.append(");\n"); // // textureSamples() and imageSamples() // // GL_ARB_shader_texture_image_samples // TODO: spec issue? there are no memory qualifiers; how to query a writeonly/readonly image, etc? if (profile != EEsProfile && version >= 430 && sampler.isMultiSample()) { commonBuiltins.append("int "); if (sampler.isImage()) commonBuiltins.append("imageSamples(readonly writeonly volatile coherent nontemporal "); else commonBuiltins.append("textureSamples("); commonBuiltins.append(typeName); commonBuiltins.append(");\n"); } // // textureQueryLod(), fragment stage only // Also enabled with extension GL_ARB_texture_query_lod // Extension GL_ARB_texture_query_lod says that textureQueryLOD() also exist at extension. if (profile != EEsProfile && version >= 150 && sampler.isCombined() && sampler.dim != EsdRect && ! sampler.isMultiSample() && ! sampler.isBuffer()) { const TString funcName[2] = {"vec2 textureQueryLod(", "vec2 textureQueryLOD("}; for (int i = 0; i < 2; ++i){ for (int f16TexAddr = 0; f16TexAddr < 2; ++f16TexAddr) { if (f16TexAddr && sampler.type != EbtFloat16) continue; stageBuiltins[EShLangFragment].append(funcName[i]); stageBuiltins[EShLangFragment].append(typeName); if (dimMap[sampler.dim] == 1) if (f16TexAddr) stageBuiltins[EShLangFragment].append(", float16_t"); else stageBuiltins[EShLangFragment].append(", float"); else { if (f16TexAddr) stageBuiltins[EShLangFragment].append(", f16vec"); else stageBuiltins[EShLangFragment].append(", vec"); stageBuiltins[EShLangFragment].append(postfixes[dimMap[sampler.dim]]); } stageBuiltins[EShLangFragment].append(");\n"); } stageBuiltins[EShLangCompute].append(funcName[i]); stageBuiltins[EShLangCompute].append(typeName); if (dimMap[sampler.dim] == 1) stageBuiltins[EShLangCompute].append(", float"); else { stageBuiltins[EShLangCompute].append(", vec"); stageBuiltins[EShLangCompute].append(postfixes[dimMap[sampler.dim]]); } stageBuiltins[EShLangCompute].append(");\n"); } } // // textureQueryLevels() // if (profile != EEsProfile && version >= 430 && ! sampler.isImage() && sampler.dim != EsdRect && ! sampler.isMultiSample() && ! sampler.isBuffer()) { commonBuiltins.append("int textureQueryLevels("); commonBuiltins.append(typeName); commonBuiltins.append(");\n"); } } // // Helper function for add2ndGenerationSamplingImaging(), // when adding context-independent built-in functions. // // Add all the image access functions for the given type. // void TBuiltIns::addImageFunctions(TSampler sampler, const TString& typeName, int version, EProfile profile) { int dims = dimMap[sampler.dim]; // most things with an array add a dimension, except for cubemaps if (sampler.arrayed && sampler.dim != EsdCube) ++dims; TString imageParams = typeName; if (dims == 1) imageParams.append(", int"); else { imageParams.append(", ivec"); imageParams.append(postfixes[dims]); } if (sampler.isMultiSample()) imageParams.append(", int"); if (profile == EEsProfile) commonBuiltins.append("highp "); commonBuiltins.append(prefixes[sampler.type]); commonBuiltins.append("vec4 imageLoad(readonly volatile coherent nontemporal "); commonBuiltins.append(imageParams); commonBuiltins.append(");\n"); commonBuiltins.append("void imageStore(writeonly volatile coherent nontemporal "); commonBuiltins.append(imageParams); commonBuiltins.append(", "); commonBuiltins.append(prefixes[sampler.type]); commonBuiltins.append("vec4);\n"); if (! sampler.is1D() && ! sampler.isBuffer() && profile != EEsProfile && version >= 450) { commonBuiltins.append("int sparseImageLoadARB(readonly volatile coherent nontemporal "); commonBuiltins.append(imageParams); commonBuiltins.append(", out "); commonBuiltins.append(prefixes[sampler.type]); commonBuiltins.append("vec4"); commonBuiltins.append(");\n"); } if ( profile != EEsProfile || (profile == EEsProfile && version >= 310)) { if (sampler.type == EbtInt || sampler.type == EbtUint || sampler.type == EbtInt64 || sampler.type == EbtUint64 ) { const char* dataType; switch (sampler.type) { case(EbtInt): dataType = "highp int"; break; case(EbtUint): dataType = "highp uint"; break; case(EbtInt64): dataType = "highp int64_t"; break; case(EbtUint64): dataType = "highp uint64_t"; break; default: dataType = ""; } const int numBuiltins = 7; static const char* atomicFunc[numBuiltins] = { " imageAtomicAdd(volatile coherent nontemporal ", " imageAtomicMin(volatile coherent nontemporal ", " imageAtomicMax(volatile coherent nontemporal ", " imageAtomicAnd(volatile coherent nontemporal ", " imageAtomicOr(volatile coherent nontemporal ", " imageAtomicXor(volatile coherent nontemporal ", " imageAtomicExchange(volatile coherent nontemporal " }; // Loop twice to add prototypes with/without scope/semantics for (int j = 0; j < 2; ++j) { for (size_t i = 0; i < numBuiltins; ++i) { commonBuiltins.append(dataType); commonBuiltins.append(atomicFunc[i]); commonBuiltins.append(imageParams); commonBuiltins.append(", "); commonBuiltins.append(dataType); if (j == 1) { commonBuiltins.append(", int, int, int"); } commonBuiltins.append(");\n"); } commonBuiltins.append(dataType); commonBuiltins.append(" imageAtomicCompSwap(volatile coherent nontemporal "); commonBuiltins.append(imageParams); commonBuiltins.append(", "); commonBuiltins.append(dataType); commonBuiltins.append(", "); commonBuiltins.append(dataType); if (j == 1) { commonBuiltins.append(", int, int, int, int, int"); } commonBuiltins.append(");\n"); } commonBuiltins.append(dataType); commonBuiltins.append(" imageAtomicLoad(volatile coherent nontemporal "); commonBuiltins.append(imageParams); commonBuiltins.append(", int, int, int);\n"); commonBuiltins.append("void imageAtomicStore(volatile coherent nontemporal "); commonBuiltins.append(imageParams); commonBuiltins.append(", "); commonBuiltins.append(dataType); commonBuiltins.append(", int, int, int);\n"); } else { // not int or uint // GL_ARB_ES3_1_compatibility // TODO: spec issue: are there restrictions on the kind of layout() that can be used? what about dropping memory qualifiers? if (profile == EEsProfile && version >= 310) { commonBuiltins.append("float imageAtomicExchange(volatile coherent nontemporal "); commonBuiltins.append(imageParams); commonBuiltins.append(", float);\n"); } // GL_NV_shader_atomic_fp16_vector if (profile != EEsProfile && version >= 430) { const int numFp16Builtins = 4; const char* atomicFp16Func[numFp16Builtins] = { " imageAtomicAdd(volatile coherent nontemporal ", " imageAtomicMin(volatile coherent nontemporal ", " imageAtomicMax(volatile coherent nontemporal ", " imageAtomicExchange(volatile coherent nontemporal " }; const int numFp16DataTypes = 2; const char* atomicFp16DataTypes[numFp16DataTypes] = { "f16vec2", "f16vec4" }; // Loop twice to add prototypes with/without scope/semantics for (int j = 0; j < numFp16DataTypes; ++j) { for (int i = 0; i < numFp16Builtins; ++i) { commonBuiltins.append(atomicFp16DataTypes[j]); commonBuiltins.append(atomicFp16Func[i]); commonBuiltins.append(imageParams); commonBuiltins.append(", "); commonBuiltins.append(atomicFp16DataTypes[j]); commonBuiltins.append(");\n"); } } } if (profile != EEsProfile && version >= 450) { commonBuiltins.append("float imageAtomicAdd(volatile coherent nontemporal "); commonBuiltins.append(imageParams); commonBuiltins.append(", float);\n"); commonBuiltins.append("float imageAtomicAdd(volatile coherent nontemporal "); commonBuiltins.append(imageParams); commonBuiltins.append(", float"); commonBuiltins.append(", int, int, int);\n"); commonBuiltins.append("float imageAtomicExchange(volatile coherent nontemporal "); commonBuiltins.append(imageParams); commonBuiltins.append(", float);\n"); commonBuiltins.append("float imageAtomicExchange(volatile coherent nontemporal "); commonBuiltins.append(imageParams); commonBuiltins.append(", float"); commonBuiltins.append(", int, int, int);\n"); commonBuiltins.append("float imageAtomicLoad(readonly volatile coherent nontemporal "); commonBuiltins.append(imageParams); commonBuiltins.append(", int, int, int);\n"); commonBuiltins.append("void imageAtomicStore(writeonly volatile coherent nontemporal "); commonBuiltins.append(imageParams); commonBuiltins.append(", float"); commonBuiltins.append(", int, int, int);\n"); commonBuiltins.append("float imageAtomicMin(volatile coherent nontemporal "); commonBuiltins.append(imageParams); commonBuiltins.append(", float);\n"); commonBuiltins.append("float imageAtomicMin(volatile coherent nontemporal "); commonBuiltins.append(imageParams); commonBuiltins.append(", float"); commonBuiltins.append(", int, int, int);\n"); commonBuiltins.append("float imageAtomicMax(volatile coherent nontemporal "); commonBuiltins.append(imageParams); commonBuiltins.append(", float);\n"); commonBuiltins.append("float imageAtomicMax(volatile coherent nontemporal "); commonBuiltins.append(imageParams); commonBuiltins.append(", float"); commonBuiltins.append(", int, int, int);\n"); } } } if (sampler.dim == EsdRect || sampler.dim == EsdBuffer || sampler.shadow || sampler.isMultiSample()) return; if (profile == EEsProfile || version < 450) return; TString imageLodParams = typeName; if (dims == 1) imageLodParams.append(", int"); else { imageLodParams.append(", ivec"); imageLodParams.append(postfixes[dims]); } imageLodParams.append(", int"); commonBuiltins.append(prefixes[sampler.type]); commonBuiltins.append("vec4 imageLoadLodAMD(readonly volatile coherent nontemporal "); commonBuiltins.append(imageLodParams); commonBuiltins.append(");\n"); commonBuiltins.append("void imageStoreLodAMD(writeonly volatile coherent nontemporal "); commonBuiltins.append(imageLodParams); commonBuiltins.append(", "); commonBuiltins.append(prefixes[sampler.type]); commonBuiltins.append("vec4);\n"); if (! sampler.is1D()) { commonBuiltins.append("int sparseImageLoadLodAMD(readonly volatile coherent nontemporal "); commonBuiltins.append(imageLodParams); commonBuiltins.append(", out "); commonBuiltins.append(prefixes[sampler.type]); commonBuiltins.append("vec4"); commonBuiltins.append(");\n"); } } // // Helper function for initialize(), // when adding context-independent built-in functions. // // Add all the subpass access functions for the given type. // void TBuiltIns::addSubpassSampling(TSampler sampler, const TString& typeName, int /*version*/, EProfile /*profile*/) { stageBuiltins[EShLangFragment].append(prefixes[sampler.type]); stageBuiltins[EShLangFragment].append("vec4 subpassLoad"); stageBuiltins[EShLangFragment].append("("); stageBuiltins[EShLangFragment].append(typeName.c_str()); if (sampler.isMultiSample()) stageBuiltins[EShLangFragment].append(", int"); stageBuiltins[EShLangFragment].append(");\n"); } // // Helper function for add2ndGenerationSamplingImaging(), // when adding context-independent built-in functions. // // Add all the texture lookup functions for the given type. // void TBuiltIns::addSamplingFunctions(TSampler sampler, const TString& typeName, int version, EProfile profile) { // // texturing // for (int proj = 0; proj <= 1; ++proj) { // loop over "bool" projective or not if (proj && (sampler.dim == EsdCube || sampler.isBuffer() || sampler.arrayed || sampler.isMultiSample() || !sampler.isCombined())) continue; for (int lod = 0; lod <= 1; ++lod) { if (lod && (sampler.isBuffer() || sampler.isRect() || sampler.isMultiSample() || !sampler.isCombined())) continue; if (lod && sampler.dim == Esd2D && sampler.arrayed && sampler.shadow) continue; if (lod && sampler.dim == EsdCube && sampler.shadow) continue; for (int bias = 0; bias <= 1; ++bias) { if (bias && (lod || sampler.isMultiSample() || !sampler.isCombined())) continue; if (bias && (sampler.dim == Esd2D || sampler.dim == EsdCube) && sampler.shadow && sampler.arrayed) continue; if (bias && (sampler.isRect() || sampler.isBuffer())) continue; for (int offset = 0; offset <= 1; ++offset) { // loop over "bool" offset or not if (proj + offset + bias + lod > 3) continue; if (offset && (sampler.dim == EsdCube || sampler.isBuffer() || sampler.isMultiSample())) continue; for (int fetch = 0; fetch <= 1; ++fetch) { // loop over "bool" fetch or not if (proj + offset + fetch + bias + lod > 3) continue; if (fetch && (lod || bias)) continue; if (fetch && (sampler.shadow || sampler.dim == EsdCube)) continue; if (fetch == 0 && (sampler.isMultiSample() || sampler.isBuffer() || !sampler.isCombined())) continue; for (int grad = 0; grad <= 1; ++grad) { // loop over "bool" grad or not if (grad && (lod || bias || sampler.isMultiSample() || !sampler.isCombined())) continue; if (grad && sampler.isBuffer()) continue; if (proj + offset + fetch + grad + bias + lod > 3) continue; for (int extraProj = 0; extraProj <= 1; ++extraProj) { bool compare = false; int totalDims = dimMap[sampler.dim] + (sampler.arrayed ? 1 : 0); // skip dummy unused second component for 1D non-array shadows if (sampler.shadow && totalDims < 2) totalDims = 2; totalDims += (sampler.shadow ? 1 : 0) + proj; if (totalDims > 4 && sampler.shadow) { compare = true; totalDims = 4; } assert(totalDims <= 4); if (extraProj && ! proj) continue; if (extraProj && (sampler.dim == Esd3D || sampler.shadow || !sampler.isCombined())) continue; // loop over 16-bit floating-point texel addressing for (int f16TexAddr = 0; f16TexAddr <= 1; ++f16TexAddr) { if (f16TexAddr && sampler.type != EbtFloat16) continue; if (f16TexAddr && sampler.shadow && ! compare) { compare = true; // compare argument is always present totalDims--; } // loop over "bool" lod clamp for (int lodClamp = 0; lodClamp <= 1 ;++lodClamp) { if (lodClamp && (profile == EEsProfile || version < 450)) continue; if (lodClamp && (proj || lod || fetch)) continue; // loop over "bool" sparse or not for (int sparse = 0; sparse <= 1; ++sparse) { if (sparse && (profile == EEsProfile || version < 450)) continue; // Sparse sampling is not for 1D/1D array texture, buffer texture, and // projective texture if (sparse && (sampler.is1D() || sampler.isBuffer() || proj)) continue; TString s; // return type if (sparse) s.append("int "); else { if (sampler.shadow) if (sampler.type == EbtFloat16) s.append("float16_t "); else s.append("float "); else { s.append(prefixes[sampler.type]); s.append("vec4 "); } } // name if (sparse) { if (fetch) s.append("sparseTexel"); else s.append("sparseTexture"); } else { if (fetch) s.append("texel"); else s.append("texture"); } if (proj) s.append("Proj"); if (lod) s.append("Lod"); if (grad) s.append("Grad"); if (fetch) s.append("Fetch"); if (offset) s.append("Offset"); if (lodClamp) s.append("Clamp"); if (lodClamp != 0 || sparse) s.append("ARB"); s.append("("); // sampler type s.append(typeName); // P coordinate if (extraProj) { if (f16TexAddr) s.append(",f16vec4"); else s.append(",vec4"); } else { s.append(","); TBasicType t = fetch ? EbtInt : (f16TexAddr ? EbtFloat16 : EbtFloat); if (totalDims == 1) s.append(TType::getBasicString(t)); else { s.append(prefixes[t]); s.append("vec"); s.append(postfixes[totalDims]); } } // non-optional compare if (compare) s.append(",float"); // non-optional lod argument (lod that's not driven by lod loop) or sample if ((fetch && !sampler.isBuffer() && !sampler.isRect() && !sampler.isMultiSample()) || (sampler.isMultiSample() && fetch)) s.append(",int"); // non-optional lod if (lod) { if (f16TexAddr) s.append(",float16_t"); else s.append(",float"); } // gradient arguments if (grad) { if (dimMap[sampler.dim] == 1) { if (f16TexAddr) s.append(",float16_t,float16_t"); else s.append(",float,float"); } else { if (f16TexAddr) s.append(",f16vec"); else s.append(",vec"); s.append(postfixes[dimMap[sampler.dim]]); if (f16TexAddr) s.append(",f16vec"); else s.append(",vec"); s.append(postfixes[dimMap[sampler.dim]]); } } // offset if (offset) { if (dimMap[sampler.dim] == 1) s.append(",int"); else { s.append(",ivec"); s.append(postfixes[dimMap[sampler.dim]]); } } // lod clamp if (lodClamp) { if (f16TexAddr) s.append(",float16_t"); else s.append(",float"); } // texel out (for sparse texture) if (sparse) { s.append(",out "); if (sampler.shadow) if (sampler.type == EbtFloat16) s.append("float16_t"); else s.append("float"); else { s.append(prefixes[sampler.type]); s.append("vec4"); } } // optional bias if (bias) { if (f16TexAddr) s.append(",float16_t"); else s.append(",float"); } s.append(");\n"); // Add to the per-language set of built-ins if (!grad && (bias || lodClamp != 0)) { stageBuiltins[EShLangFragment].append(s); stageBuiltins[EShLangCompute].append(s); } else commonBuiltins.append(s); } } } } } } } } } } } // // Helper function for add2ndGenerationSamplingImaging(), // when adding context-independent built-in functions. // // Add all the texture gather functions for the given type. // void TBuiltIns::addGatherFunctions(TSampler sampler, const TString& typeName, int version, EProfile profile) { switch (sampler.dim) { case Esd2D: case EsdRect: case EsdCube: break; default: return; } if (sampler.isMultiSample()) return; if (version < 140 && sampler.dim == EsdRect && sampler.type != EbtFloat) return; for (int f16TexAddr = 0; f16TexAddr <= 1; ++f16TexAddr) { // loop over 16-bit floating-point texel addressing if (f16TexAddr && sampler.type != EbtFloat16) continue; for (int offset = 0; offset < 3; ++offset) { // loop over three forms of offset in the call name: none, Offset, and Offsets for (int comp = 0; comp < 2; ++comp) { // loop over presence of comp argument if (comp > 0 && sampler.shadow) continue; if (offset > 0 && sampler.dim == EsdCube) continue; for (int sparse = 0; sparse <= 1; ++sparse) { // loop over "bool" sparse or not if (sparse && (profile == EEsProfile || version < 450)) continue; TString s; // return type if (sparse) s.append("int "); else { s.append(prefixes[sampler.type]); s.append("vec4 "); } // name if (sparse) s.append("sparseTextureGather"); else s.append("textureGather"); switch (offset) { case 1: s.append("Offset"); break; case 2: s.append("Offsets"); break; default: break; } if (sparse) s.append("ARB"); s.append("("); // sampler type argument s.append(typeName); // P coordinate argument if (f16TexAddr) s.append(",f16vec"); else s.append(",vec"); int totalDims = dimMap[sampler.dim] + (sampler.arrayed ? 1 : 0); s.append(postfixes[totalDims]); // refZ argument if (sampler.shadow) s.append(",float"); // offset argument if (offset > 0) { s.append(",ivec2"); if (offset == 2) s.append("[4]"); } // texel out (for sparse texture) if (sparse) { s.append(",out "); s.append(prefixes[sampler.type]); s.append("vec4 "); } // comp argument if (comp) s.append(",int"); s.append(");\n"); commonBuiltins.append(s); } } } } if (sampler.dim == EsdRect || sampler.shadow) return; if (profile == EEsProfile || version < 450) return; for (int bias = 0; bias < 2; ++bias) { // loop over presence of bias argument for (int lod = 0; lod < 2; ++lod) { // loop over presence of lod argument if ((lod && bias) || (lod == 0 && bias == 0)) continue; for (int f16TexAddr = 0; f16TexAddr <= 1; ++f16TexAddr) { // loop over 16-bit floating-point texel addressing if (f16TexAddr && sampler.type != EbtFloat16) continue; for (int offset = 0; offset < 3; ++offset) { // loop over three forms of offset in the call name: none, Offset, and Offsets for (int comp = 0; comp < 2; ++comp) { // loop over presence of comp argument if (comp == 0 && bias) continue; if (offset > 0 && sampler.dim == EsdCube) continue; for (int sparse = 0; sparse <= 1; ++sparse) { // loop over "bool" sparse or not if (sparse && (profile == EEsProfile || version < 450)) continue; TString s; // return type if (sparse) s.append("int "); else { s.append(prefixes[sampler.type]); s.append("vec4 "); } // name if (sparse) s.append("sparseTextureGather"); else s.append("textureGather"); if (lod) s.append("Lod"); switch (offset) { case 1: s.append("Offset"); break; case 2: s.append("Offsets"); break; default: break; } if (lod) s.append("AMD"); else if (sparse) s.append("ARB"); s.append("("); // sampler type argument s.append(typeName); // P coordinate argument if (f16TexAddr) s.append(",f16vec"); else s.append(",vec"); int totalDims = dimMap[sampler.dim] + (sampler.arrayed ? 1 : 0); s.append(postfixes[totalDims]); // lod argument if (lod) { if (f16TexAddr) s.append(",float16_t"); else s.append(",float"); } // offset argument if (offset > 0) { s.append(",ivec2"); if (offset == 2) s.append("[4]"); } // texel out (for sparse texture) if (sparse) { s.append(",out "); s.append(prefixes[sampler.type]); s.append("vec4 "); } // comp argument if (comp) s.append(",int"); // bias argument if (bias) { if (f16TexAddr) s.append(",float16_t"); else s.append(",float"); } s.append(");\n"); if (bias) stageBuiltins[EShLangFragment].append(s); else commonBuiltins.append(s); } } } } } } } // // Add context-dependent built-in functions and variables that are present // for the given version and profile. All the results are put into just the // commonBuiltins, because it is called for just a specific stage. So, // add stage-specific entries to the commonBuiltins, and only if that stage // was requested. // void TBuiltIns::initialize(const TBuiltInResource &resources, int version, EProfile profile, const SpvVersion& spvVersion, EShLanguage language) { // // Initialize the context-dependent (resource-dependent) built-in strings for parsing. // //============================================================================ // // Standard Uniforms // //============================================================================ TString& s = commonBuiltins; const int maxSize = 200; char builtInConstant[maxSize]; // // Build string of implementation dependent constants. // if (profile == EEsProfile) { snprintf(builtInConstant, maxSize, "const mediump int gl_MaxVertexAttribs = %d;", resources.maxVertexAttribs); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const mediump int gl_MaxVertexUniformVectors = %d;", resources.maxVertexUniformVectors); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const mediump int gl_MaxVertexTextureImageUnits = %d;", resources.maxVertexTextureImageUnits); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const mediump int gl_MaxCombinedTextureImageUnits = %d;", resources.maxCombinedTextureImageUnits); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const mediump int gl_MaxTextureImageUnits = %d;", resources.maxTextureImageUnits); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const mediump int gl_MaxFragmentUniformVectors = %d;", resources.maxFragmentUniformVectors); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const mediump int gl_MaxDrawBuffers = %d;", resources.maxDrawBuffers); s.append(builtInConstant); if (version == 100) { snprintf(builtInConstant, maxSize, "const mediump int gl_MaxVaryingVectors = %d;", resources.maxVaryingVectors); s.append(builtInConstant); } else { snprintf(builtInConstant, maxSize, "const mediump int gl_MaxVertexOutputVectors = %d;", resources.maxVertexOutputVectors); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const mediump int gl_MaxFragmentInputVectors = %d;", resources.maxFragmentInputVectors); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const mediump int gl_MinProgramTexelOffset = %d;", resources.minProgramTexelOffset); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const mediump int gl_MaxProgramTexelOffset = %d;", resources.maxProgramTexelOffset); s.append(builtInConstant); } if (version >= 310) { // geometry snprintf(builtInConstant, maxSize, "const int gl_MaxGeometryInputComponents = %d;", resources.maxGeometryInputComponents); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const int gl_MaxGeometryOutputComponents = %d;", resources.maxGeometryOutputComponents); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const int gl_MaxGeometryImageUniforms = %d;", resources.maxGeometryImageUniforms); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const int gl_MaxGeometryTextureImageUnits = %d;", resources.maxGeometryTextureImageUnits); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const int gl_MaxGeometryOutputVertices = %d;", resources.maxGeometryOutputVertices); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const int gl_MaxGeometryTotalOutputComponents = %d;", resources.maxGeometryTotalOutputComponents); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const int gl_MaxGeometryUniformComponents = %d;", resources.maxGeometryUniformComponents); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const int gl_MaxGeometryAtomicCounters = %d;", resources.maxGeometryAtomicCounters); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const int gl_MaxGeometryAtomicCounterBuffers = %d;", resources.maxGeometryAtomicCounterBuffers); s.append(builtInConstant); // tessellation snprintf(builtInConstant, maxSize, "const int gl_MaxTessControlInputComponents = %d;", resources.maxTessControlInputComponents); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const int gl_MaxTessControlOutputComponents = %d;", resources.maxTessControlOutputComponents); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const int gl_MaxTessControlTextureImageUnits = %d;", resources.maxTessControlTextureImageUnits); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const int gl_MaxTessControlUniformComponents = %d;", resources.maxTessControlUniformComponents); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const int gl_MaxTessControlTotalOutputComponents = %d;", resources.maxTessControlTotalOutputComponents); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const int gl_MaxTessEvaluationInputComponents = %d;", resources.maxTessEvaluationInputComponents); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const int gl_MaxTessEvaluationOutputComponents = %d;", resources.maxTessEvaluationOutputComponents); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const int gl_MaxTessEvaluationTextureImageUnits = %d;", resources.maxTessEvaluationTextureImageUnits); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const int gl_MaxTessEvaluationUniformComponents = %d;", resources.maxTessEvaluationUniformComponents); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const int gl_MaxTessPatchComponents = %d;", resources.maxTessPatchComponents); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const int gl_MaxPatchVertices = %d;", resources.maxPatchVertices); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const int gl_MaxTessGenLevel = %d;", resources.maxTessGenLevel); s.append(builtInConstant); // this is here instead of with the others in initialize(version, profile) due to the dependence on gl_MaxPatchVertices if (language == EShLangTessControl || language == EShLangTessEvaluation) { s.append( "in gl_PerVertex {" "highp vec4 gl_Position;" "highp float gl_PointSize;" "highp vec4 gl_SecondaryPositionNV;" // GL_NV_stereo_view_rendering "highp vec4 gl_PositionPerViewNV[];" // GL_NVX_multiview_per_view_attributes "} gl_in[gl_MaxPatchVertices];" "\n"); } } if (version >= 320) { // tessellation snprintf(builtInConstant, maxSize, "const int gl_MaxTessControlImageUniforms = %d;", resources.maxTessControlImageUniforms); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const int gl_MaxTessEvaluationImageUniforms = %d;", resources.maxTessEvaluationImageUniforms); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const int gl_MaxTessControlAtomicCounters = %d;", resources.maxTessControlAtomicCounters); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const int gl_MaxTessEvaluationAtomicCounters = %d;", resources.maxTessEvaluationAtomicCounters); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const int gl_MaxTessControlAtomicCounterBuffers = %d;", resources.maxTessControlAtomicCounterBuffers); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const int gl_MaxTessEvaluationAtomicCounterBuffers = %d;", resources.maxTessEvaluationAtomicCounterBuffers); s.append(builtInConstant); } if (version >= 100) { // GL_EXT_blend_func_extended snprintf(builtInConstant, maxSize, "const mediump int gl_MaxDualSourceDrawBuffersEXT = %d;", resources.maxDualSourceDrawBuffersEXT); s.append(builtInConstant); // this is here instead of with the others in initialize(version, profile) due to the dependence on gl_MaxDualSourceDrawBuffersEXT if (language == EShLangFragment) { s.append( "mediump vec4 gl_SecondaryFragColorEXT;" "mediump vec4 gl_SecondaryFragDataEXT[gl_MaxDualSourceDrawBuffersEXT];" "\n"); } } } else { // non-ES profile if (version > 400) { snprintf(builtInConstant, maxSize, "const int gl_MaxVertexUniformVectors = %d;", resources.maxVertexUniformVectors); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const int gl_MaxFragmentUniformVectors = %d;", resources.maxFragmentUniformVectors); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const int gl_MaxVaryingVectors = %d;", resources.maxVaryingVectors); s.append(builtInConstant); } snprintf(builtInConstant, maxSize, "const int gl_MaxVertexAttribs = %d;", resources.maxVertexAttribs); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const int gl_MaxVertexTextureImageUnits = %d;", resources.maxVertexTextureImageUnits); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const int gl_MaxCombinedTextureImageUnits = %d;", resources.maxCombinedTextureImageUnits); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const int gl_MaxTextureImageUnits = %d;", resources.maxTextureImageUnits); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const int gl_MaxDrawBuffers = %d;", resources.maxDrawBuffers); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const int gl_MaxLights = %d;", resources.maxLights); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const int gl_MaxClipPlanes = %d;", resources.maxClipPlanes); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const int gl_MaxTextureUnits = %d;", resources.maxTextureUnits); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const int gl_MaxTextureCoords = %d;", resources.maxTextureCoords); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const int gl_MaxVertexUniformComponents = %d;", resources.maxVertexUniformComponents); s.append(builtInConstant); // Moved from just being deprecated into compatibility profile only as of 4.20 if (version < 420 || profile == ECompatibilityProfile) { snprintf(builtInConstant, maxSize, "const int gl_MaxVaryingFloats = %d;", resources.maxVaryingFloats); s.append(builtInConstant); } snprintf(builtInConstant, maxSize, "const int gl_MaxFragmentUniformComponents = %d;", resources.maxFragmentUniformComponents); s.append(builtInConstant); if (spvVersion.spv == 0 && IncludeLegacy(version, profile, spvVersion)) { // // OpenGL'uniform' state. Page numbers are in reference to version // 1.4 of the OpenGL specification. // // // Matrix state. p. 31, 32, 37, 39, 40. // s.append("uniform mat4 gl_TextureMatrix[gl_MaxTextureCoords];" // // Derived matrix state that provides inverse and transposed versions // of the matrices above. // "uniform mat4 gl_TextureMatrixInverse[gl_MaxTextureCoords];" "uniform mat4 gl_TextureMatrixTranspose[gl_MaxTextureCoords];" "uniform mat4 gl_TextureMatrixInverseTranspose[gl_MaxTextureCoords];" // // Clip planes p. 42. // "uniform vec4 gl_ClipPlane[gl_MaxClipPlanes];" // // Light State p 50, 53, 55. // "uniform gl_LightSourceParameters gl_LightSource[gl_MaxLights];" // // Derived state from products of light. // "uniform gl_LightProducts gl_FrontLightProduct[gl_MaxLights];" "uniform gl_LightProducts gl_BackLightProduct[gl_MaxLights];" // // Texture Environment and Generation, p. 152, p. 40-42. // "uniform vec4 gl_TextureEnvColor[gl_MaxTextureImageUnits];" "uniform vec4 gl_EyePlaneS[gl_MaxTextureCoords];" "uniform vec4 gl_EyePlaneT[gl_MaxTextureCoords];" "uniform vec4 gl_EyePlaneR[gl_MaxTextureCoords];" "uniform vec4 gl_EyePlaneQ[gl_MaxTextureCoords];" "uniform vec4 gl_ObjectPlaneS[gl_MaxTextureCoords];" "uniform vec4 gl_ObjectPlaneT[gl_MaxTextureCoords];" "uniform vec4 gl_ObjectPlaneR[gl_MaxTextureCoords];" "uniform vec4 gl_ObjectPlaneQ[gl_MaxTextureCoords];"); } if (version >= 130) { snprintf(builtInConstant, maxSize, "const int gl_MaxClipDistances = %d;", resources.maxClipDistances); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const int gl_MaxVaryingComponents = %d;", resources.maxVaryingComponents); s.append(builtInConstant); // GL_ARB_shading_language_420pack snprintf(builtInConstant, maxSize, "const mediump int gl_MinProgramTexelOffset = %d;", resources.minProgramTexelOffset); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const mediump int gl_MaxProgramTexelOffset = %d;", resources.maxProgramTexelOffset); s.append(builtInConstant); } // geometry if (version >= 150) { snprintf(builtInConstant, maxSize, "const int gl_MaxGeometryInputComponents = %d;", resources.maxGeometryInputComponents); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const int gl_MaxGeometryOutputComponents = %d;", resources.maxGeometryOutputComponents); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const int gl_MaxGeometryTextureImageUnits = %d;", resources.maxGeometryTextureImageUnits); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const int gl_MaxGeometryOutputVertices = %d;", resources.maxGeometryOutputVertices); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const int gl_MaxGeometryTotalOutputComponents = %d;", resources.maxGeometryTotalOutputComponents); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const int gl_MaxGeometryUniformComponents = %d;", resources.maxGeometryUniformComponents); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const int gl_MaxGeometryVaryingComponents = %d;", resources.maxGeometryVaryingComponents); s.append(builtInConstant); } if (version >= 150) { snprintf(builtInConstant, maxSize, "const int gl_MaxVertexOutputComponents = %d;", resources.maxVertexOutputComponents); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const int gl_MaxFragmentInputComponents = %d;", resources.maxFragmentInputComponents); s.append(builtInConstant); } // tessellation if (version >= 150) { snprintf(builtInConstant, maxSize, "const int gl_MaxTessControlInputComponents = %d;", resources.maxTessControlInputComponents); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const int gl_MaxTessControlOutputComponents = %d;", resources.maxTessControlOutputComponents); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const int gl_MaxTessControlTextureImageUnits = %d;", resources.maxTessControlTextureImageUnits); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const int gl_MaxTessControlUniformComponents = %d;", resources.maxTessControlUniformComponents); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const int gl_MaxTessControlTotalOutputComponents = %d;", resources.maxTessControlTotalOutputComponents); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const int gl_MaxTessEvaluationInputComponents = %d;", resources.maxTessEvaluationInputComponents); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const int gl_MaxTessEvaluationOutputComponents = %d;", resources.maxTessEvaluationOutputComponents); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const int gl_MaxTessEvaluationTextureImageUnits = %d;", resources.maxTessEvaluationTextureImageUnits); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const int gl_MaxTessEvaluationUniformComponents = %d;", resources.maxTessEvaluationUniformComponents); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const int gl_MaxTessPatchComponents = %d;", resources.maxTessPatchComponents); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const int gl_MaxTessGenLevel = %d;", resources.maxTessGenLevel); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const int gl_MaxPatchVertices = %d;", resources.maxPatchVertices); s.append(builtInConstant); // this is here instead of with the others in initialize(version, profile) due to the dependence on gl_MaxPatchVertices if (language == EShLangTessControl || language == EShLangTessEvaluation) { s.append( "in gl_PerVertex {" "vec4 gl_Position;" "float gl_PointSize;" "float gl_ClipDistance[];" ); if (profile == ECompatibilityProfile) s.append( "vec4 gl_ClipVertex;" "vec4 gl_FrontColor;" "vec4 gl_BackColor;" "vec4 gl_FrontSecondaryColor;" "vec4 gl_BackSecondaryColor;" "vec4 gl_TexCoord[];" "float gl_FogFragCoord;" ); if (profile != EEsProfile && version >= 450) s.append( "float gl_CullDistance[];" "vec4 gl_SecondaryPositionNV;" // GL_NV_stereo_view_rendering "vec4 gl_PositionPerViewNV[];" // GL_NVX_multiview_per_view_attributes ); s.append( "} gl_in[gl_MaxPatchVertices];" "\n"); } } if (version >= 150) { snprintf(builtInConstant, maxSize, "const int gl_MaxViewports = %d;", resources.maxViewports); s.append(builtInConstant); } // images if (version >= 130) { snprintf(builtInConstant, maxSize, "const int gl_MaxCombinedImageUnitsAndFragmentOutputs = %d;", resources.maxCombinedImageUnitsAndFragmentOutputs); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const int gl_MaxImageSamples = %d;", resources.maxImageSamples); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const int gl_MaxTessControlImageUniforms = %d;", resources.maxTessControlImageUniforms); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const int gl_MaxTessEvaluationImageUniforms = %d;", resources.maxTessEvaluationImageUniforms); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const int gl_MaxGeometryImageUniforms = %d;", resources.maxGeometryImageUniforms); s.append(builtInConstant); } // enhanced layouts if (version >= 430) { snprintf(builtInConstant, maxSize, "const int gl_MaxTransformFeedbackBuffers = %d;", resources.maxTransformFeedbackBuffers); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const int gl_MaxTransformFeedbackInterleavedComponents = %d;", resources.maxTransformFeedbackInterleavedComponents); s.append(builtInConstant); } } // compute if ((profile == EEsProfile && version >= 310) || (profile != EEsProfile && version >= 420)) { snprintf(builtInConstant, maxSize, "const ivec3 gl_MaxComputeWorkGroupCount = ivec3(%d,%d,%d);", resources.maxComputeWorkGroupCountX, resources.maxComputeWorkGroupCountY, resources.maxComputeWorkGroupCountZ); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const ivec3 gl_MaxComputeWorkGroupSize = ivec3(%d,%d,%d);", resources.maxComputeWorkGroupSizeX, resources.maxComputeWorkGroupSizeY, resources.maxComputeWorkGroupSizeZ); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const int gl_MaxComputeUniformComponents = %d;", resources.maxComputeUniformComponents); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const int gl_MaxComputeTextureImageUnits = %d;", resources.maxComputeTextureImageUnits); s.append(builtInConstant); s.append("\n"); } // images (some in compute below) if ((profile == EEsProfile && version >= 310) || (profile != EEsProfile && version >= 130)) { snprintf(builtInConstant, maxSize, "const int gl_MaxImageUnits = %d;", resources.maxImageUnits); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const int gl_MaxCombinedShaderOutputResources = %d;", resources.maxCombinedShaderOutputResources); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const int gl_MaxVertexImageUniforms = %d;", resources.maxVertexImageUniforms); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const int gl_MaxFragmentImageUniforms = %d;", resources.maxFragmentImageUniforms); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const int gl_MaxCombinedImageUniforms = %d;", resources.maxCombinedImageUniforms); s.append(builtInConstant); } // compute if ((profile == EEsProfile && version >= 310) || (profile != EEsProfile && version >= 420)) { snprintf(builtInConstant, maxSize, "const int gl_MaxComputeImageUniforms = %d;", resources.maxComputeImageUniforms); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const int gl_MaxComputeAtomicCounters = %d;", resources.maxComputeAtomicCounters); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const int gl_MaxComputeAtomicCounterBuffers = %d;", resources.maxComputeAtomicCounterBuffers); s.append(builtInConstant); s.append("\n"); } // atomic counters (some in compute below) if ((profile == EEsProfile && version >= 310) || (profile != EEsProfile && version >= 420)) { snprintf(builtInConstant, maxSize, "const int gl_MaxVertexAtomicCounters = %d;", resources. maxVertexAtomicCounters); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const int gl_MaxFragmentAtomicCounters = %d;", resources. maxFragmentAtomicCounters); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const int gl_MaxCombinedAtomicCounters = %d;", resources. maxCombinedAtomicCounters); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const int gl_MaxAtomicCounterBindings = %d;", resources. maxAtomicCounterBindings); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const int gl_MaxVertexAtomicCounterBuffers = %d;", resources. maxVertexAtomicCounterBuffers); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const int gl_MaxFragmentAtomicCounterBuffers = %d;", resources. maxFragmentAtomicCounterBuffers); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const int gl_MaxCombinedAtomicCounterBuffers = %d;", resources. maxCombinedAtomicCounterBuffers); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const int gl_MaxAtomicCounterBufferSize = %d;", resources. maxAtomicCounterBufferSize); s.append(builtInConstant); } if (profile != EEsProfile && version >= 420) { snprintf(builtInConstant, maxSize, "const int gl_MaxTessControlAtomicCounters = %d;", resources. maxTessControlAtomicCounters); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const int gl_MaxTessEvaluationAtomicCounters = %d;", resources. maxTessEvaluationAtomicCounters); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const int gl_MaxGeometryAtomicCounters = %d;", resources. maxGeometryAtomicCounters); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const int gl_MaxTessControlAtomicCounterBuffers = %d;", resources. maxTessControlAtomicCounterBuffers); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const int gl_MaxTessEvaluationAtomicCounterBuffers = %d;", resources. maxTessEvaluationAtomicCounterBuffers); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const int gl_MaxGeometryAtomicCounterBuffers = %d;", resources. maxGeometryAtomicCounterBuffers); s.append(builtInConstant); s.append("\n"); } // GL_ARB_cull_distance if (profile != EEsProfile && version >= 450) { snprintf(builtInConstant, maxSize, "const int gl_MaxCullDistances = %d;", resources.maxCullDistances); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const int gl_MaxCombinedClipAndCullDistances = %d;", resources.maxCombinedClipAndCullDistances); s.append(builtInConstant); } // GL_ARB_ES3_1_compatibility if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 310)) { snprintf(builtInConstant, maxSize, "const int gl_MaxSamples = %d;", resources.maxSamples); s.append(builtInConstant); } // SPV_NV_mesh_shader if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 320)) { snprintf(builtInConstant, maxSize, "const int gl_MaxMeshOutputVerticesNV = %d;", resources.maxMeshOutputVerticesNV); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const int gl_MaxMeshOutputPrimitivesNV = %d;", resources.maxMeshOutputPrimitivesNV); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const ivec3 gl_MaxMeshWorkGroupSizeNV = ivec3(%d,%d,%d);", resources.maxMeshWorkGroupSizeX_NV, resources.maxMeshWorkGroupSizeY_NV, resources.maxMeshWorkGroupSizeZ_NV); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const ivec3 gl_MaxTaskWorkGroupSizeNV = ivec3(%d,%d,%d);", resources.maxTaskWorkGroupSizeX_NV, resources.maxTaskWorkGroupSizeY_NV, resources.maxTaskWorkGroupSizeZ_NV); s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const int gl_MaxMeshViewCountNV = %d;", resources.maxMeshViewCountNV); s.append(builtInConstant); s.append("\n"); } s.append("\n"); } // // To support special built-ins that have a special qualifier that cannot be declared textually // in a shader, like gl_Position. // // This lets the type of the built-in be declared textually, and then have just its qualifier be // updated afterward. // // Safe to call even if name is not present. // // Only use this for built-in variables that have a special qualifier in TStorageQualifier. // New built-in variables should use a generic (textually declarable) qualifier in // TStoraregQualifier and only call BuiltInVariable(). // static void SpecialQualifier(const char* name, TStorageQualifier qualifier, TBuiltInVariable builtIn, TSymbolTable& symbolTable) { TSymbol* symbol = symbolTable.find(name); if (symbol == nullptr) return; TQualifier& symQualifier = symbol->getWritableType().getQualifier(); symQualifier.storage = qualifier; symQualifier.builtIn = builtIn; } // // Modify the symbol's flat decoration. // // Safe to call even if name is not present. // // Originally written to transform gl_SubGroupSizeARB from uniform to fragment input in Vulkan. // static void ModifyFlatDecoration(const char* name, bool flat, TSymbolTable& symbolTable) { TSymbol* symbol = symbolTable.find(name); if (symbol == nullptr) return; TQualifier& symQualifier = symbol->getWritableType().getQualifier(); symQualifier.flat = flat; } // // To tag built-in variables with their TBuiltInVariable enum. Use this when the // normal declaration text already gets the qualifier right, and all that's needed // is setting the builtIn field. This should be the normal way for all new // built-in variables. // // If SpecialQualifier() was called, this does not need to be called. // // Safe to call even if name is not present. // static void BuiltInVariable(const char* name, TBuiltInVariable builtIn, TSymbolTable& symbolTable) { TSymbol* symbol = symbolTable.find(name); if (symbol == nullptr) return; TQualifier& symQualifier = symbol->getWritableType().getQualifier(); symQualifier.builtIn = builtIn; } static void RetargetVariable(const char* from, const char* to, TSymbolTable& symbolTable) { symbolTable.retargetSymbol(from, to); } // // For built-in variables inside a named block. // SpecialQualifier() won't ever go inside a block; their member's qualifier come // from the qualification of the block. // // See comments above for other detail. // static void BuiltInVariable(const char* blockName, const char* name, TBuiltInVariable builtIn, TSymbolTable& symbolTable) { TSymbol* symbol = symbolTable.find(blockName); if (symbol == nullptr) return; TTypeList& structure = *symbol->getWritableType().getWritableStruct(); for (int i = 0; i < (int)structure.size(); ++i) { if (structure[i].type->getFieldName().compare(name) == 0) { structure[i].type->getQualifier().builtIn = builtIn; return; } } } // // Finish adding/processing context-independent built-in symbols. // 1) Programmatically add symbols that could not be added by simple text strings above. // 2) Map built-in functions to operators, for those that will turn into an operation node // instead of remaining a function call. // 3) Tag extension-related symbols added to their base version with their extensions, so // that if an early version has the extension turned off, there is an error reported on use. // void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion& spvVersion, EShLanguage language, TSymbolTable& symbolTable) { // // Tag built-in variables and functions with additional qualifier and extension information // that cannot be declared with the text strings. // // N.B.: a symbol should only be tagged once, and this function is called multiple times, once // per stage that's used for this profile. So // - generally, stick common ones in the fragment stage to ensure they are tagged exactly once // - for ES, which has different precisions for different stages, the coarsest-grained tagging // for a built-in used in many stages needs to be once for the fragment stage and once for // the vertex stage switch(language) { case EShLangVertex: if (spvVersion.vulkan > 0) { BuiltInVariable("gl_VertexIndex", EbvVertexIndex, symbolTable); BuiltInVariable("gl_InstanceIndex", EbvInstanceIndex, symbolTable); } if (spvVersion.vulkan == 0) { SpecialQualifier("gl_VertexID", EvqVertexId, EbvVertexId, symbolTable); SpecialQualifier("gl_InstanceID", EvqInstanceId, EbvInstanceId, symbolTable); if (version < 140) symbolTable.setVariableExtensions("gl_InstanceID", 1, &E_GL_EXT_draw_instanced); } if (spvVersion.vulkan > 0 && spvVersion.vulkanRelaxed) { // treat these built-ins as aliases of VertexIndex and InstanceIndex RetargetVariable("gl_InstanceID", "gl_InstanceIndex", symbolTable); RetargetVariable("gl_VertexID", "gl_VertexIndex", symbolTable); } if (profile != EEsProfile) { if (version >= 440) { symbolTable.setVariableExtensions("gl_BaseVertexARB", 1, &E_GL_ARB_shader_draw_parameters); symbolTable.setVariableExtensions("gl_BaseInstanceARB", 1, &E_GL_ARB_shader_draw_parameters); symbolTable.setVariableExtensions("gl_DrawIDARB", 1, &E_GL_ARB_shader_draw_parameters); BuiltInVariable("gl_BaseVertexARB", EbvBaseVertex, symbolTable); BuiltInVariable("gl_BaseInstanceARB", EbvBaseInstance, symbolTable); BuiltInVariable("gl_DrawIDARB", EbvDrawId, symbolTable); } if (version >= 460) { BuiltInVariable("gl_BaseVertex", EbvBaseVertex, symbolTable); BuiltInVariable("gl_BaseInstance", EbvBaseInstance, symbolTable); BuiltInVariable("gl_DrawID", EbvDrawId, symbolTable); } symbolTable.setVariableExtensions("gl_SubGroupSizeARB", 1, &E_GL_ARB_shader_ballot); symbolTable.setVariableExtensions("gl_SubGroupInvocationARB", 1, &E_GL_ARB_shader_ballot); symbolTable.setVariableExtensions("gl_SubGroupEqMaskARB", 1, &E_GL_ARB_shader_ballot); symbolTable.setVariableExtensions("gl_SubGroupGeMaskARB", 1, &E_GL_ARB_shader_ballot); symbolTable.setVariableExtensions("gl_SubGroupGtMaskARB", 1, &E_GL_ARB_shader_ballot); symbolTable.setVariableExtensions("gl_SubGroupLeMaskARB", 1, &E_GL_ARB_shader_ballot); symbolTable.setVariableExtensions("gl_SubGroupLtMaskARB", 1, &E_GL_ARB_shader_ballot); symbolTable.setFunctionExtensions("ballotARB", 1, &E_GL_ARB_shader_ballot); symbolTable.setFunctionExtensions("readInvocationARB", 1, &E_GL_ARB_shader_ballot); symbolTable.setFunctionExtensions("readFirstInvocationARB", 1, &E_GL_ARB_shader_ballot); if (version >= 430) { symbolTable.setFunctionExtensions("anyInvocationARB", 1, &E_GL_ARB_shader_group_vote); symbolTable.setFunctionExtensions("allInvocationsARB", 1, &E_GL_ARB_shader_group_vote); symbolTable.setFunctionExtensions("allInvocationsEqualARB", 1, &E_GL_ARB_shader_group_vote); } if (version >= 150) { symbolTable.setFunctionExtensions("anyThreadNV", 1, &E_GL_NV_gpu_shader5); symbolTable.setFunctionExtensions("allThreadsNV", 1, &E_GL_NV_gpu_shader5); symbolTable.setFunctionExtensions("allThreadsEqualNV", 1, &E_GL_NV_gpu_shader5); } } if (profile != EEsProfile) { symbolTable.setFunctionExtensions("minInvocationsAMD", 1, &E_GL_AMD_shader_ballot); symbolTable.setFunctionExtensions("maxInvocationsAMD", 1, &E_GL_AMD_shader_ballot); symbolTable.setFunctionExtensions("addInvocationsAMD", 1, &E_GL_AMD_shader_ballot); symbolTable.setFunctionExtensions("minInvocationsNonUniformAMD", 1, &E_GL_AMD_shader_ballot); symbolTable.setFunctionExtensions("maxInvocationsNonUniformAMD", 1, &E_GL_AMD_shader_ballot); symbolTable.setFunctionExtensions("addInvocationsNonUniformAMD", 1, &E_GL_AMD_shader_ballot); symbolTable.setFunctionExtensions("swizzleInvocationsAMD", 1, &E_GL_AMD_shader_ballot); symbolTable.setFunctionExtensions("swizzleInvocationsWithPatternAMD", 1, &E_GL_AMD_shader_ballot); symbolTable.setFunctionExtensions("writeInvocationAMD", 1, &E_GL_AMD_shader_ballot); symbolTable.setFunctionExtensions("mbcntAMD", 1, &E_GL_AMD_shader_ballot); symbolTable.setFunctionExtensions("minInvocationsInclusiveScanAMD", 1, &E_GL_AMD_shader_ballot); symbolTable.setFunctionExtensions("maxInvocationsInclusiveScanAMD", 1, &E_GL_AMD_shader_ballot); symbolTable.setFunctionExtensions("addInvocationsInclusiveScanAMD", 1, &E_GL_AMD_shader_ballot); symbolTable.setFunctionExtensions("minInvocationsInclusiveScanNonUniformAMD", 1, &E_GL_AMD_shader_ballot); symbolTable.setFunctionExtensions("maxInvocationsInclusiveScanNonUniformAMD", 1, &E_GL_AMD_shader_ballot); symbolTable.setFunctionExtensions("addInvocationsInclusiveScanNonUniformAMD", 1, &E_GL_AMD_shader_ballot); symbolTable.setFunctionExtensions("minInvocationsExclusiveScanAMD", 1, &E_GL_AMD_shader_ballot); symbolTable.setFunctionExtensions("maxInvocationsExclusiveScanAMD", 1, &E_GL_AMD_shader_ballot); symbolTable.setFunctionExtensions("addInvocationsExclusiveScanAMD", 1, &E_GL_AMD_shader_ballot); symbolTable.setFunctionExtensions("minInvocationsExclusiveScanNonUniformAMD", 1, &E_GL_AMD_shader_ballot); symbolTable.setFunctionExtensions("maxInvocationsExclusiveScanNonUniformAMD", 1, &E_GL_AMD_shader_ballot); symbolTable.setFunctionExtensions("addInvocationsExclusiveScanNonUniformAMD", 1, &E_GL_AMD_shader_ballot); } if (profile != EEsProfile) { symbolTable.setFunctionExtensions("min3", 1, &E_GL_AMD_shader_trinary_minmax); symbolTable.setFunctionExtensions("max3", 1, &E_GL_AMD_shader_trinary_minmax); symbolTable.setFunctionExtensions("mid3", 1, &E_GL_AMD_shader_trinary_minmax); } if (profile != EEsProfile) { symbolTable.setVariableExtensions("gl_SIMDGroupSizeAMD", 1, &E_GL_AMD_gcn_shader); SpecialQualifier("gl_SIMDGroupSizeAMD", EvqVaryingIn, EbvSubGroupSize, symbolTable); symbolTable.setFunctionExtensions("cubeFaceIndexAMD", 1, &E_GL_AMD_gcn_shader); symbolTable.setFunctionExtensions("cubeFaceCoordAMD", 1, &E_GL_AMD_gcn_shader); symbolTable.setFunctionExtensions("timeAMD", 1, &E_GL_AMD_gcn_shader); } if (profile != EEsProfile) { symbolTable.setFunctionExtensions("fragmentMaskFetchAMD", 1, &E_GL_AMD_shader_fragment_mask); symbolTable.setFunctionExtensions("fragmentFetchAMD", 1, &E_GL_AMD_shader_fragment_mask); } symbolTable.setFunctionExtensions("countLeadingZeros", 1, &E_GL_INTEL_shader_integer_functions2); symbolTable.setFunctionExtensions("countTrailingZeros", 1, &E_GL_INTEL_shader_integer_functions2); symbolTable.setFunctionExtensions("absoluteDifference", 1, &E_GL_INTEL_shader_integer_functions2); symbolTable.setFunctionExtensions("addSaturate", 1, &E_GL_INTEL_shader_integer_functions2); symbolTable.setFunctionExtensions("subtractSaturate", 1, &E_GL_INTEL_shader_integer_functions2); symbolTable.setFunctionExtensions("average", 1, &E_GL_INTEL_shader_integer_functions2); symbolTable.setFunctionExtensions("averageRounded", 1, &E_GL_INTEL_shader_integer_functions2); symbolTable.setFunctionExtensions("multiply32x16", 1, &E_GL_INTEL_shader_integer_functions2); symbolTable.setFunctionExtensions("textureFootprintNV", 1, &E_GL_NV_shader_texture_footprint); symbolTable.setFunctionExtensions("textureFootprintClampNV", 1, &E_GL_NV_shader_texture_footprint); symbolTable.setFunctionExtensions("textureFootprintLodNV", 1, &E_GL_NV_shader_texture_footprint); symbolTable.setFunctionExtensions("textureFootprintGradNV", 1, &E_GL_NV_shader_texture_footprint); symbolTable.setFunctionExtensions("textureFootprintGradClampNV", 1, &E_GL_NV_shader_texture_footprint); // Compatibility variables, vertex only if (spvVersion.spv == 0) { BuiltInVariable("gl_Color", EbvColor, symbolTable); BuiltInVariable("gl_SecondaryColor", EbvSecondaryColor, symbolTable); BuiltInVariable("gl_Normal", EbvNormal, symbolTable); BuiltInVariable("gl_Vertex", EbvVertex, symbolTable); BuiltInVariable("gl_MultiTexCoord0", EbvMultiTexCoord0, symbolTable); BuiltInVariable("gl_MultiTexCoord1", EbvMultiTexCoord1, symbolTable); BuiltInVariable("gl_MultiTexCoord2", EbvMultiTexCoord2, symbolTable); BuiltInVariable("gl_MultiTexCoord3", EbvMultiTexCoord3, symbolTable); BuiltInVariable("gl_MultiTexCoord4", EbvMultiTexCoord4, symbolTable); BuiltInVariable("gl_MultiTexCoord5", EbvMultiTexCoord5, symbolTable); BuiltInVariable("gl_MultiTexCoord6", EbvMultiTexCoord6, symbolTable); BuiltInVariable("gl_MultiTexCoord7", EbvMultiTexCoord7, symbolTable); BuiltInVariable("gl_FogCoord", EbvFogFragCoord, symbolTable); } if (profile == EEsProfile) { if (spvVersion.spv == 0) { symbolTable.setFunctionExtensions("texture2DGradEXT", 1, &E_GL_EXT_shader_texture_lod); symbolTable.setFunctionExtensions("texture2DProjGradEXT", 1, &E_GL_EXT_shader_texture_lod); symbolTable.setFunctionExtensions("textureCubeGradEXT", 1, &E_GL_EXT_shader_texture_lod); if (version == 310) symbolTable.setFunctionExtensions("textureGatherOffsets", Num_AEP_gpu_shader5, AEP_gpu_shader5); } if (version == 310) { symbolTable.setFunctionExtensions("fma", Num_AEP_gpu_shader5, AEP_gpu_shader5); } else if (profile != EEsProfile && version >= 150) { symbolTable.setFunctionExtensions("fma", Num_AEP_core_gpu_shader5, AEP_core_gpu_shader5); } } if (profile == EEsProfile && version < 320) { symbolTable.setFunctionExtensions("imageAtomicAdd", 1, &E_GL_OES_shader_image_atomic); symbolTable.setFunctionExtensions("imageAtomicMin", 1, &E_GL_OES_shader_image_atomic); symbolTable.setFunctionExtensions("imageAtomicMax", 1, &E_GL_OES_shader_image_atomic); symbolTable.setFunctionExtensions("imageAtomicAnd", 1, &E_GL_OES_shader_image_atomic); symbolTable.setFunctionExtensions("imageAtomicOr", 1, &E_GL_OES_shader_image_atomic); symbolTable.setFunctionExtensions("imageAtomicXor", 1, &E_GL_OES_shader_image_atomic); symbolTable.setFunctionExtensions("imageAtomicExchange", 1, &E_GL_OES_shader_image_atomic); symbolTable.setFunctionExtensions("imageAtomicCompSwap", 1, &E_GL_OES_shader_image_atomic); } if (version >= 300 /* both ES and non-ES */) { symbolTable.setVariableExtensions("gl_ViewID_OVR", Num_OVR_multiview_EXTs, OVR_multiview_EXTs); BuiltInVariable("gl_ViewID_OVR", EbvViewIndex, symbolTable); } if (profile == EEsProfile) { symbolTable.setFunctionExtensions("shadow2DEXT", 1, &E_GL_EXT_shadow_samplers); symbolTable.setFunctionExtensions("shadow2DProjEXT", 1, &E_GL_EXT_shadow_samplers); } // E_GL_EXT_texture_array if (profile != EEsProfile && spvVersion.spv == 0) { symbolTable.setFunctionExtensions("texture1DArray", 1, &E_GL_EXT_texture_array); symbolTable.setFunctionExtensions("texture2DArray", 1, &E_GL_EXT_texture_array); symbolTable.setFunctionExtensions("shadow1DArray", 1, &E_GL_EXT_texture_array); symbolTable.setFunctionExtensions("shadow2DArray", 1, &E_GL_EXT_texture_array); symbolTable.setFunctionExtensions("texture1DArrayLod", 1, &E_GL_EXT_texture_array); symbolTable.setFunctionExtensions("texture2DArrayLod", 1, &E_GL_EXT_texture_array); symbolTable.setFunctionExtensions("shadow1DArrayLod", 1, &E_GL_EXT_texture_array); } [[fallthrough]]; case EShLangTessControl: if (profile == EEsProfile && version >= 310) { BuiltInVariable("gl_BoundingBoxEXT", EbvBoundingBox, symbolTable); symbolTable.setVariableExtensions("gl_BoundingBoxEXT", 1, &E_GL_EXT_primitive_bounding_box); BuiltInVariable("gl_BoundingBoxOES", EbvBoundingBox, symbolTable); symbolTable.setVariableExtensions("gl_BoundingBoxOES", 1, &E_GL_OES_primitive_bounding_box); if (version >= 320) { BuiltInVariable("gl_BoundingBox", EbvBoundingBox, symbolTable); } } [[fallthrough]]; case EShLangTessEvaluation: case EShLangGeometry: SpecialQualifier("gl_Position", EvqPosition, EbvPosition, symbolTable); SpecialQualifier("gl_PointSize", EvqPointSize, EbvPointSize, symbolTable); BuiltInVariable("gl_in", "gl_Position", EbvPosition, symbolTable); BuiltInVariable("gl_in", "gl_PointSize", EbvPointSize, symbolTable); BuiltInVariable("gl_out", "gl_Position", EbvPosition, symbolTable); BuiltInVariable("gl_out", "gl_PointSize", EbvPointSize, symbolTable); SpecialQualifier("gl_ClipVertex", EvqClipVertex, EbvClipVertex, symbolTable); BuiltInVariable("gl_in", "gl_ClipDistance", EbvClipDistance, symbolTable); BuiltInVariable("gl_in", "gl_CullDistance", EbvCullDistance, symbolTable); BuiltInVariable("gl_out", "gl_ClipDistance", EbvClipDistance, symbolTable); BuiltInVariable("gl_out", "gl_CullDistance", EbvCullDistance, symbolTable); BuiltInVariable("gl_ClipDistance", EbvClipDistance, symbolTable); BuiltInVariable("gl_CullDistance", EbvCullDistance, symbolTable); BuiltInVariable("gl_PrimitiveIDIn", EbvPrimitiveId, symbolTable); BuiltInVariable("gl_PrimitiveID", EbvPrimitiveId, symbolTable); BuiltInVariable("gl_InvocationID", EbvInvocationId, symbolTable); BuiltInVariable("gl_Layer", EbvLayer, symbolTable); BuiltInVariable("gl_ViewportIndex", EbvViewportIndex, symbolTable); if (language != EShLangGeometry) { symbolTable.setVariableExtensions("gl_Layer", Num_viewportEXTs, viewportEXTs); symbolTable.setVariableExtensions("gl_ViewportIndex", Num_viewportEXTs, viewportEXTs); } symbolTable.setVariableExtensions("gl_ViewportMask", 1, &E_GL_NV_viewport_array2); symbolTable.setVariableExtensions("gl_SecondaryPositionNV", 1, &E_GL_NV_stereo_view_rendering); symbolTable.setVariableExtensions("gl_SecondaryViewportMaskNV", 1, &E_GL_NV_stereo_view_rendering); symbolTable.setVariableExtensions("gl_PositionPerViewNV", 1, &E_GL_NVX_multiview_per_view_attributes); symbolTable.setVariableExtensions("gl_ViewportMaskPerViewNV", 1, &E_GL_NVX_multiview_per_view_attributes); if (profile != EEsProfile && language == EShLangGeometry && version < 400) { symbolTable.setVariableExtensions("gl_InvocationID", Num_AEP_core_gpu_shader5, AEP_core_gpu_shader5); } BuiltInVariable("gl_ViewportMask", EbvViewportMaskNV, symbolTable); BuiltInVariable("gl_SecondaryPositionNV", EbvSecondaryPositionNV, symbolTable); BuiltInVariable("gl_SecondaryViewportMaskNV", EbvSecondaryViewportMaskNV, symbolTable); BuiltInVariable("gl_PositionPerViewNV", EbvPositionPerViewNV, symbolTable); BuiltInVariable("gl_ViewportMaskPerViewNV", EbvViewportMaskPerViewNV, symbolTable); if (language == EShLangVertex || language == EShLangGeometry) { symbolTable.setVariableExtensions("gl_in", "gl_SecondaryPositionNV", 1, &E_GL_NV_stereo_view_rendering); symbolTable.setVariableExtensions("gl_in", "gl_PositionPerViewNV", 1, &E_GL_NVX_multiview_per_view_attributes); BuiltInVariable("gl_in", "gl_SecondaryPositionNV", EbvSecondaryPositionNV, symbolTable); BuiltInVariable("gl_in", "gl_PositionPerViewNV", EbvPositionPerViewNV, symbolTable); } symbolTable.setVariableExtensions("gl_out", "gl_ViewportMask", 1, &E_GL_NV_viewport_array2); symbolTable.setVariableExtensions("gl_out", "gl_SecondaryPositionNV", 1, &E_GL_NV_stereo_view_rendering); symbolTable.setVariableExtensions("gl_out", "gl_SecondaryViewportMaskNV", 1, &E_GL_NV_stereo_view_rendering); symbolTable.setVariableExtensions("gl_out", "gl_PositionPerViewNV", 1, &E_GL_NVX_multiview_per_view_attributes); symbolTable.setVariableExtensions("gl_out", "gl_ViewportMaskPerViewNV", 1, &E_GL_NVX_multiview_per_view_attributes); BuiltInVariable("gl_out", "gl_ViewportMask", EbvViewportMaskNV, symbolTable); BuiltInVariable("gl_out", "gl_SecondaryPositionNV", EbvSecondaryPositionNV, symbolTable); BuiltInVariable("gl_out", "gl_SecondaryViewportMaskNV", EbvSecondaryViewportMaskNV, symbolTable); BuiltInVariable("gl_out", "gl_PositionPerViewNV", EbvPositionPerViewNV, symbolTable); BuiltInVariable("gl_out", "gl_ViewportMaskPerViewNV", EbvViewportMaskPerViewNV, symbolTable); BuiltInVariable("gl_PatchVerticesIn", EbvPatchVertices, symbolTable); BuiltInVariable("gl_TessLevelOuter", EbvTessLevelOuter, symbolTable); BuiltInVariable("gl_TessLevelInner", EbvTessLevelInner, symbolTable); BuiltInVariable("gl_TessCoord", EbvTessCoord, symbolTable); if (version < 410) symbolTable.setVariableExtensions("gl_ViewportIndex", 1, &E_GL_ARB_viewport_array); // Compatibility variables BuiltInVariable("gl_in", "gl_ClipVertex", EbvClipVertex, symbolTable); BuiltInVariable("gl_in", "gl_FrontColor", EbvFrontColor, symbolTable); BuiltInVariable("gl_in", "gl_BackColor", EbvBackColor, symbolTable); BuiltInVariable("gl_in", "gl_FrontSecondaryColor", EbvFrontSecondaryColor, symbolTable); BuiltInVariable("gl_in", "gl_BackSecondaryColor", EbvBackSecondaryColor, symbolTable); BuiltInVariable("gl_in", "gl_TexCoord", EbvTexCoord, symbolTable); BuiltInVariable("gl_in", "gl_FogFragCoord", EbvFogFragCoord, symbolTable); BuiltInVariable("gl_out", "gl_ClipVertex", EbvClipVertex, symbolTable); BuiltInVariable("gl_out", "gl_FrontColor", EbvFrontColor, symbolTable); BuiltInVariable("gl_out", "gl_BackColor", EbvBackColor, symbolTable); BuiltInVariable("gl_out", "gl_FrontSecondaryColor", EbvFrontSecondaryColor, symbolTable); BuiltInVariable("gl_out", "gl_BackSecondaryColor", EbvBackSecondaryColor, symbolTable); BuiltInVariable("gl_out", "gl_TexCoord", EbvTexCoord, symbolTable); BuiltInVariable("gl_out", "gl_FogFragCoord", EbvFogFragCoord, symbolTable); BuiltInVariable("gl_ClipVertex", EbvClipVertex, symbolTable); BuiltInVariable("gl_FrontColor", EbvFrontColor, symbolTable); BuiltInVariable("gl_BackColor", EbvBackColor, symbolTable); BuiltInVariable("gl_FrontSecondaryColor", EbvFrontSecondaryColor, symbolTable); BuiltInVariable("gl_BackSecondaryColor", EbvBackSecondaryColor, symbolTable); BuiltInVariable("gl_TexCoord", EbvTexCoord, symbolTable); BuiltInVariable("gl_FogFragCoord", EbvFogFragCoord, symbolTable); // gl_PointSize, when it needs to be tied to an extension, is always a member of a block. // (Sometimes with an instance name, sometimes anonymous). if (profile == EEsProfile) { if (language == EShLangGeometry) { symbolTable.setVariableExtensions("gl_PointSize", Num_AEP_geometry_point_size, AEP_geometry_point_size); symbolTable.setVariableExtensions("gl_in", "gl_PointSize", Num_AEP_geometry_point_size, AEP_geometry_point_size); } else if (language == EShLangTessEvaluation || language == EShLangTessControl) { // gl_in tessellation settings of gl_PointSize are in the context-dependent paths symbolTable.setVariableExtensions("gl_PointSize", Num_AEP_tessellation_point_size, AEP_tessellation_point_size); symbolTable.setVariableExtensions("gl_out", "gl_PointSize", Num_AEP_tessellation_point_size, AEP_tessellation_point_size); } } if ((profile != EEsProfile && version >= 140) || (profile == EEsProfile && version >= 310)) { symbolTable.setVariableExtensions("gl_DeviceIndex", 1, &E_GL_EXT_device_group); BuiltInVariable("gl_DeviceIndex", EbvDeviceIndex, symbolTable); symbolTable.setVariableExtensions("gl_ViewIndex", 1, &E_GL_EXT_multiview); BuiltInVariable("gl_ViewIndex", EbvViewIndex, symbolTable); } if (profile != EEsProfile) { BuiltInVariable("gl_SubGroupInvocationARB", EbvSubGroupInvocation, symbolTable); BuiltInVariable("gl_SubGroupEqMaskARB", EbvSubGroupEqMask, symbolTable); BuiltInVariable("gl_SubGroupGeMaskARB", EbvSubGroupGeMask, symbolTable); BuiltInVariable("gl_SubGroupGtMaskARB", EbvSubGroupGtMask, symbolTable); BuiltInVariable("gl_SubGroupLeMaskARB", EbvSubGroupLeMask, symbolTable); BuiltInVariable("gl_SubGroupLtMaskARB", EbvSubGroupLtMask, symbolTable); if (spvVersion.vulkan > 0) { // Treat "gl_SubGroupSizeARB" as shader input instead of uniform for Vulkan SpecialQualifier("gl_SubGroupSizeARB", EvqVaryingIn, EbvSubGroupSize, symbolTable); if (language == EShLangFragment) ModifyFlatDecoration("gl_SubGroupSizeARB", true, symbolTable); } else BuiltInVariable("gl_SubGroupSizeARB", EbvSubGroupSize, symbolTable); } // GL_ARB_gpu_shader5/GL_NV_gpu_shader5 if (profile != EEsProfile && version < 400 && language == EShLangGeometry) { symbolTable.setFunctionExtensions("EmitStreamVertex", Num_AEP_core_gpu_shader5, AEP_core_gpu_shader5); symbolTable.setFunctionExtensions("EndStreamPrimitive", Num_AEP_core_gpu_shader5, AEP_core_gpu_shader5); } // GL_KHR_shader_subgroup if ((profile == EEsProfile && version >= 310) || (profile != EEsProfile && version >= 140)) { symbolTable.setVariableExtensions("gl_SubgroupSize", 1, &E_GL_KHR_shader_subgroup_basic); symbolTable.setVariableExtensions("gl_SubgroupInvocationID", 1, &E_GL_KHR_shader_subgroup_basic); symbolTable.setVariableExtensions("gl_SubgroupEqMask", 1, &E_GL_KHR_shader_subgroup_ballot); symbolTable.setVariableExtensions("gl_SubgroupGeMask", 1, &E_GL_KHR_shader_subgroup_ballot); symbolTable.setVariableExtensions("gl_SubgroupGtMask", 1, &E_GL_KHR_shader_subgroup_ballot); symbolTable.setVariableExtensions("gl_SubgroupLeMask", 1, &E_GL_KHR_shader_subgroup_ballot); symbolTable.setVariableExtensions("gl_SubgroupLtMask", 1, &E_GL_KHR_shader_subgroup_ballot); BuiltInVariable("gl_SubgroupSize", EbvSubgroupSize2, symbolTable); BuiltInVariable("gl_SubgroupInvocationID", EbvSubgroupInvocation2, symbolTable); BuiltInVariable("gl_SubgroupEqMask", EbvSubgroupEqMask2, symbolTable); BuiltInVariable("gl_SubgroupGeMask", EbvSubgroupGeMask2, symbolTable); BuiltInVariable("gl_SubgroupGtMask", EbvSubgroupGtMask2, symbolTable); BuiltInVariable("gl_SubgroupLeMask", EbvSubgroupLeMask2, symbolTable); BuiltInVariable("gl_SubgroupLtMask", EbvSubgroupLtMask2, symbolTable); // GL_NV_shader_sm_builtins symbolTable.setVariableExtensions("gl_WarpsPerSMNV", 1, &E_GL_NV_shader_sm_builtins); symbolTable.setVariableExtensions("gl_SMCountNV", 1, &E_GL_NV_shader_sm_builtins); symbolTable.setVariableExtensions("gl_WarpIDNV", 1, &E_GL_NV_shader_sm_builtins); symbolTable.setVariableExtensions("gl_SMIDNV", 1, &E_GL_NV_shader_sm_builtins); BuiltInVariable("gl_WarpsPerSMNV", EbvWarpsPerSM, symbolTable); BuiltInVariable("gl_SMCountNV", EbvSMCount, symbolTable); BuiltInVariable("gl_WarpIDNV", EbvWarpID, symbolTable); BuiltInVariable("gl_SMIDNV", EbvSMID, symbolTable); // GL_ARM_shader_core_builtins symbolTable.setVariableExtensions("gl_CoreCountARM", 1, &E_GL_ARM_shader_core_builtins); symbolTable.setVariableExtensions("gl_CoreIDARM", 1, &E_GL_ARM_shader_core_builtins); symbolTable.setVariableExtensions("gl_CoreMaxIDARM", 1, &E_GL_ARM_shader_core_builtins); symbolTable.setVariableExtensions("gl_WarpIDARM", 1, &E_GL_ARM_shader_core_builtins); symbolTable.setVariableExtensions("gl_WarpMaxIDARM", 1, &E_GL_ARM_shader_core_builtins); BuiltInVariable("gl_CoreCountARM", EbvCoreCountARM, symbolTable); BuiltInVariable("gl_CoreIDARM", EbvCoreIDARM, symbolTable); BuiltInVariable("gl_CoreMaxIDARM", EbvCoreMaxIDARM, symbolTable); BuiltInVariable("gl_WarpIDARM", EbvWarpIDARM, symbolTable); BuiltInVariable("gl_WarpMaxIDARM", EbvWarpMaxIDARM, symbolTable); } if (language == EShLangGeometry || language == EShLangVertex) { if ((profile == EEsProfile && version >= 310) || (profile != EEsProfile && version >= 450)) { symbolTable.setVariableExtensions("gl_PrimitiveShadingRateEXT", 1, &E_GL_EXT_fragment_shading_rate); BuiltInVariable("gl_PrimitiveShadingRateEXT", EbvPrimitiveShadingRateKHR, symbolTable); symbolTable.setVariableExtensions("gl_ShadingRateFlag2VerticalPixelsEXT", 1, &E_GL_EXT_fragment_shading_rate); symbolTable.setVariableExtensions("gl_ShadingRateFlag4VerticalPixelsEXT", 1, &E_GL_EXT_fragment_shading_rate); symbolTable.setVariableExtensions("gl_ShadingRateFlag2HorizontalPixelsEXT", 1, &E_GL_EXT_fragment_shading_rate); symbolTable.setVariableExtensions("gl_ShadingRateFlag4HorizontalPixelsEXT", 1, &E_GL_EXT_fragment_shading_rate); } } break; case EShLangFragment: SpecialQualifier("gl_FrontFacing", EvqFace, EbvFace, symbolTable); SpecialQualifier("gl_FragCoord", EvqFragCoord, EbvFragCoord, symbolTable); SpecialQualifier("gl_PointCoord", EvqPointCoord, EbvPointCoord, symbolTable); if (spvVersion.spv == 0) SpecialQualifier("gl_FragColor", EvqFragColor, EbvFragColor, symbolTable); else { TSymbol* symbol = symbolTable.find("gl_FragColor"); if (symbol) { symbol->getWritableType().getQualifier().storage = EvqVaryingOut; symbol->getWritableType().getQualifier().layoutLocation = 0; } } SpecialQualifier("gl_FragDepth", EvqFragDepth, EbvFragDepth, symbolTable); SpecialQualifier("gl_FragDepthEXT", EvqFragDepth, EbvFragDepth, symbolTable); SpecialQualifier("gl_FragStencilRefARB", EvqFragStencil, EbvFragStencilRef, symbolTable); SpecialQualifier("gl_HelperInvocation", EvqVaryingIn, EbvHelperInvocation, symbolTable); BuiltInVariable("gl_ClipDistance", EbvClipDistance, symbolTable); BuiltInVariable("gl_CullDistance", EbvCullDistance, symbolTable); BuiltInVariable("gl_PrimitiveID", EbvPrimitiveId, symbolTable); if (profile != EEsProfile && version >= 140) { symbolTable.setVariableExtensions("gl_FragStencilRefARB", 1, &E_GL_ARB_shader_stencil_export); BuiltInVariable("gl_FragStencilRefARB", EbvFragStencilRef, symbolTable); } if (profile != EEsProfile && version < 400) { symbolTable.setFunctionExtensions("textureQueryLOD", 1, &E_GL_ARB_texture_query_lod); } if (profile != EEsProfile && version >= 460) { symbolTable.setFunctionExtensions("rayQueryInitializeEXT", 1, &E_GL_EXT_ray_query); symbolTable.setFunctionExtensions("rayQueryTerminateEXT", 1, &E_GL_EXT_ray_query); symbolTable.setFunctionExtensions("rayQueryGenerateIntersectionEXT", 1, &E_GL_EXT_ray_query); symbolTable.setFunctionExtensions("rayQueryConfirmIntersectionEXT", 1, &E_GL_EXT_ray_query); symbolTable.setFunctionExtensions("rayQueryProceedEXT", 1, &E_GL_EXT_ray_query); symbolTable.setFunctionExtensions("rayQueryGetIntersectionTypeEXT", 1, &E_GL_EXT_ray_query); symbolTable.setFunctionExtensions("rayQueryGetIntersectionTEXT", 1, &E_GL_EXT_ray_query); symbolTable.setFunctionExtensions("rayQueryGetRayFlagsEXT", 1, &E_GL_EXT_ray_query); symbolTable.setFunctionExtensions("rayQueryGetRayTMinEXT", 1, &E_GL_EXT_ray_query); symbolTable.setFunctionExtensions("rayQueryGetIntersectionInstanceCustomIndexEXT", 1, &E_GL_EXT_ray_query); symbolTable.setFunctionExtensions("rayQueryGetIntersectionInstanceIdEXT", 1, &E_GL_EXT_ray_query); symbolTable.setFunctionExtensions("rayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetEXT", 1, &E_GL_EXT_ray_query); symbolTable.setFunctionExtensions("rayQueryGetIntersectionGeometryIndexEXT", 1, &E_GL_EXT_ray_query); symbolTable.setFunctionExtensions("rayQueryGetIntersectionPrimitiveIndexEXT", 1, &E_GL_EXT_ray_query); symbolTable.setFunctionExtensions("rayQueryGetIntersectionBarycentricsEXT", 1, &E_GL_EXT_ray_query); symbolTable.setFunctionExtensions("rayQueryGetIntersectionFrontFaceEXT", 1, &E_GL_EXT_ray_query); symbolTable.setFunctionExtensions("rayQueryGetIntersectionCandidateAABBOpaqueEXT", 1, &E_GL_EXT_ray_query); symbolTable.setFunctionExtensions("rayQueryGetIntersectionObjectRayDirectionEXT", 1, &E_GL_EXT_ray_query); symbolTable.setFunctionExtensions("rayQueryGetIntersectionObjectRayOriginEXT", 1, &E_GL_EXT_ray_query); symbolTable.setFunctionExtensions("rayQueryGetIntersectionObjectToWorldEXT", 1, &E_GL_EXT_ray_query); symbolTable.setFunctionExtensions("rayQueryGetIntersectionWorldToObjectEXT", 1, &E_GL_EXT_ray_query); symbolTable.setFunctionExtensions("rayQueryGetWorldRayOriginEXT", 1, &E_GL_EXT_ray_query); symbolTable.setFunctionExtensions("rayQueryGetWorldRayDirectionEXT", 1, &E_GL_EXT_ray_query); symbolTable.setFunctionExtensions("rayQueryGetIntersectionTriangleVertexPositionsEXT", 1, &E_GL_EXT_ray_tracing_position_fetch); symbolTable.setFunctionExtensions("rayQueryGetIntersectionClusterIdNV", 1, &E_GL_NV_cluster_acceleration_structure); symbolTable.setFunctionExtensions("rayQueryGetIntersectionSpherePositionNV", 1, &E_GL_NV_linear_swept_spheres); symbolTable.setFunctionExtensions("rayQueryGetIntersectionSphereRadiusNV", 1, &E_GL_NV_linear_swept_spheres); symbolTable.setFunctionExtensions("rayQueryGetIntersectionLSSHitValueNV", 1, &E_GL_NV_linear_swept_spheres); symbolTable.setFunctionExtensions("rayQueryGetIntersectionLSSPositionsNV", 1, &E_GL_NV_linear_swept_spheres); symbolTable.setFunctionExtensions("rayQueryGetIntersectionLSSRadiiNV", 1, &E_GL_NV_linear_swept_spheres); symbolTable.setFunctionExtensions("rayQueryIsSphereHitNV", 1, &E_GL_NV_linear_swept_spheres); symbolTable.setFunctionExtensions("rayQueryIsLSSHitNV", 1, &E_GL_NV_linear_swept_spheres); symbolTable.setVariableExtensions("gl_RayFlagsSkipAABBEXT", 1, &E_GL_EXT_ray_flags_primitive_culling); symbolTable.setVariableExtensions("gl_RayFlagsSkipTrianglesEXT", 1, &E_GL_EXT_ray_flags_primitive_culling); symbolTable.setVariableExtensions("gl_RayFlagsForceOpacityMicromap2StateEXT", 1, &E_GL_EXT_opacity_micromap); } if ((profile != EEsProfile && version >= 130) || (profile == EEsProfile && version >= 310)) { BuiltInVariable("gl_SampleID", EbvSampleId, symbolTable); BuiltInVariable("gl_SamplePosition", EbvSamplePosition, symbolTable); BuiltInVariable("gl_SampleMask", EbvSampleMask, symbolTable); if (profile != EEsProfile && version < 400) { BuiltInVariable("gl_SampleMaskIn", EbvSampleMask, symbolTable); symbolTable.setVariableExtensions("gl_SampleMaskIn", Num_AEP_core_gpu_shader5, AEP_core_gpu_shader5); BuiltInVariable("gl_NumSamples", EbvSampleMask, symbolTable); symbolTable.setVariableExtensions("gl_SampleMask", 1, &E_GL_ARB_sample_shading); symbolTable.setVariableExtensions("gl_SampleID", 1, &E_GL_ARB_sample_shading); symbolTable.setVariableExtensions("gl_SamplePosition", 1, &E_GL_ARB_sample_shading); symbolTable.setVariableExtensions("gl_NumSamples", 1, &E_GL_ARB_sample_shading); } else { BuiltInVariable("gl_SampleMaskIn", EbvSampleMask, symbolTable); if (profile == EEsProfile && version < 320) { symbolTable.setVariableExtensions("gl_SampleID", 1, &E_GL_OES_sample_variables); symbolTable.setVariableExtensions("gl_SamplePosition", 1, &E_GL_OES_sample_variables); symbolTable.setVariableExtensions("gl_SampleMaskIn", 1, &E_GL_OES_sample_variables); symbolTable.setVariableExtensions("gl_SampleMask", 1, &E_GL_OES_sample_variables); symbolTable.setVariableExtensions("gl_NumSamples", 1, &E_GL_OES_sample_variables); } } } BuiltInVariable("gl_Layer", EbvLayer, symbolTable); BuiltInVariable("gl_ViewportIndex", EbvViewportIndex, symbolTable); // Compatibility variables BuiltInVariable("gl_in", "gl_FogFragCoord", EbvFogFragCoord, symbolTable); BuiltInVariable("gl_in", "gl_TexCoord", EbvTexCoord, symbolTable); BuiltInVariable("gl_in", "gl_Color", EbvColor, symbolTable); BuiltInVariable("gl_in", "gl_SecondaryColor", EbvSecondaryColor, symbolTable); BuiltInVariable("gl_FogFragCoord", EbvFogFragCoord, symbolTable); BuiltInVariable("gl_TexCoord", EbvTexCoord, symbolTable); BuiltInVariable("gl_Color", EbvColor, symbolTable); BuiltInVariable("gl_SecondaryColor", EbvSecondaryColor, symbolTable); // built-in functions if (profile == EEsProfile) { if (spvVersion.spv == 0) { symbolTable.setFunctionExtensions("texture2DLodEXT", 1, &E_GL_EXT_shader_texture_lod); symbolTable.setFunctionExtensions("texture2DProjLodEXT", 1, &E_GL_EXT_shader_texture_lod); symbolTable.setFunctionExtensions("textureCubeLodEXT", 1, &E_GL_EXT_shader_texture_lod); symbolTable.setFunctionExtensions("texture2DGradEXT", 1, &E_GL_EXT_shader_texture_lod); symbolTable.setFunctionExtensions("texture2DProjGradEXT", 1, &E_GL_EXT_shader_texture_lod); symbolTable.setFunctionExtensions("textureCubeGradEXT", 1, &E_GL_EXT_shader_texture_lod); if (version < 320) symbolTable.setFunctionExtensions("textureGatherOffsets", Num_AEP_gpu_shader5, AEP_gpu_shader5); } if (version == 100) { symbolTable.setFunctionExtensions("dFdx", 1, &E_GL_OES_standard_derivatives); symbolTable.setFunctionExtensions("dFdy", 1, &E_GL_OES_standard_derivatives); symbolTable.setFunctionExtensions("fwidth", 1, &E_GL_OES_standard_derivatives); } if (version == 310) { symbolTable.setFunctionExtensions("fma", Num_AEP_gpu_shader5, AEP_gpu_shader5); symbolTable.setFunctionExtensions("interpolateAtCentroid", 1, &E_GL_OES_shader_multisample_interpolation); symbolTable.setFunctionExtensions("interpolateAtSample", 1, &E_GL_OES_shader_multisample_interpolation); symbolTable.setFunctionExtensions("interpolateAtOffset", 1, &E_GL_OES_shader_multisample_interpolation); } } else if (version < 130) { if (spvVersion.spv == 0) { symbolTable.setFunctionExtensions("texture1DLod", 1, &E_GL_ARB_shader_texture_lod); symbolTable.setFunctionExtensions("texture2DLod", 1, &E_GL_ARB_shader_texture_lod); symbolTable.setFunctionExtensions("texture3DLod", 1, &E_GL_ARB_shader_texture_lod); symbolTable.setFunctionExtensions("textureCubeLod", 1, &E_GL_ARB_shader_texture_lod); symbolTable.setFunctionExtensions("texture1DProjLod", 1, &E_GL_ARB_shader_texture_lod); symbolTable.setFunctionExtensions("texture2DProjLod", 1, &E_GL_ARB_shader_texture_lod); symbolTable.setFunctionExtensions("texture3DProjLod", 1, &E_GL_ARB_shader_texture_lod); symbolTable.setFunctionExtensions("shadow1DLod", 1, &E_GL_ARB_shader_texture_lod); symbolTable.setFunctionExtensions("shadow2DLod", 1, &E_GL_ARB_shader_texture_lod); symbolTable.setFunctionExtensions("shadow1DProjLod", 1, &E_GL_ARB_shader_texture_lod); symbolTable.setFunctionExtensions("shadow2DProjLod", 1, &E_GL_ARB_shader_texture_lod); } } // E_GL_ARB_shader_texture_lod functions usable only with the extension enabled if (profile != EEsProfile && spvVersion.spv == 0) { symbolTable.setFunctionExtensions("texture1DGradARB", 1, &E_GL_ARB_shader_texture_lod); symbolTable.setFunctionExtensions("texture1DProjGradARB", 1, &E_GL_ARB_shader_texture_lod); symbolTable.setFunctionExtensions("texture2DGradARB", 1, &E_GL_ARB_shader_texture_lod); symbolTable.setFunctionExtensions("texture2DProjGradARB", 1, &E_GL_ARB_shader_texture_lod); symbolTable.setFunctionExtensions("texture3DGradARB", 1, &E_GL_ARB_shader_texture_lod); symbolTable.setFunctionExtensions("texture3DProjGradARB", 1, &E_GL_ARB_shader_texture_lod); symbolTable.setFunctionExtensions("textureCubeGradARB", 1, &E_GL_ARB_shader_texture_lod); symbolTable.setFunctionExtensions("shadow1DGradARB", 1, &E_GL_ARB_shader_texture_lod); symbolTable.setFunctionExtensions("shadow1DProjGradARB", 1, &E_GL_ARB_shader_texture_lod); symbolTable.setFunctionExtensions("shadow2DGradARB", 1, &E_GL_ARB_shader_texture_lod); symbolTable.setFunctionExtensions("shadow2DProjGradARB", 1, &E_GL_ARB_shader_texture_lod); symbolTable.setFunctionExtensions("texture2DRectGradARB", 1, &E_GL_ARB_shader_texture_lod); symbolTable.setFunctionExtensions("texture2DRectProjGradARB", 1, &E_GL_ARB_shader_texture_lod); symbolTable.setFunctionExtensions("shadow2DRectGradARB", 1, &E_GL_ARB_shader_texture_lod); symbolTable.setFunctionExtensions("shadow2DRectProjGradARB", 1, &E_GL_ARB_shader_texture_lod); } // E_GL_ARB_shader_image_load_store if (profile != EEsProfile && version < 420) symbolTable.setFunctionExtensions("memoryBarrier", 1, &E_GL_ARB_shader_image_load_store); // All the image access functions are protected by checks on the type of the first argument. // E_GL_ARB_shader_atomic_counters if (profile != EEsProfile && version < 420) { symbolTable.setFunctionExtensions("atomicCounterIncrement", 1, &E_GL_ARB_shader_atomic_counters); symbolTable.setFunctionExtensions("atomicCounterDecrement", 1, &E_GL_ARB_shader_atomic_counters); symbolTable.setFunctionExtensions("atomicCounter" , 1, &E_GL_ARB_shader_atomic_counters); } // E_GL_ARB_gpu_shader5/E_GL_NV_gpu_shader5 if (profile != EEsProfile && version < 400) { symbolTable.setFunctionExtensions("bitfieldExtract", Num_AEP_core_gpu_shader5, AEP_core_gpu_shader5); symbolTable.setFunctionExtensions("bitfieldInsert", Num_AEP_core_gpu_shader5, AEP_core_gpu_shader5); symbolTable.setFunctionExtensions("bitfieldReverse", Num_AEP_core_gpu_shader5, AEP_core_gpu_shader5); symbolTable.setFunctionExtensions("bitCount", Num_AEP_core_gpu_shader5, AEP_core_gpu_shader5); symbolTable.setFunctionExtensions("findLSB", Num_AEP_core_gpu_shader5, AEP_core_gpu_shader5); symbolTable.setFunctionExtensions("findMSB", Num_AEP_core_gpu_shader5, AEP_core_gpu_shader5); symbolTable.setFunctionExtensions("uaddCarry", Num_AEP_core_gpu_shader5, AEP_core_gpu_shader5); symbolTable.setFunctionExtensions("usubBorrow", Num_AEP_core_gpu_shader5, AEP_core_gpu_shader5); symbolTable.setFunctionExtensions("umulExtended", Num_AEP_core_gpu_shader5, AEP_core_gpu_shader5); symbolTable.setFunctionExtensions("imulExtended", Num_AEP_core_gpu_shader5, AEP_core_gpu_shader5); symbolTable.setFunctionExtensions("interpolateAtCentroid", Num_AEP_core_gpu_shader5, AEP_core_gpu_shader5); symbolTable.setFunctionExtensions("interpolateAtSample", Num_AEP_core_gpu_shader5, AEP_core_gpu_shader5); symbolTable.setFunctionExtensions("interpolateAtOffset", Num_AEP_core_gpu_shader5, AEP_core_gpu_shader5); } // E_GL_NV_gpu_shader5 if (profile != EEsProfile && version < 450) { symbolTable.setFunctionExtensions("packInt2x32", 1, &E_GL_NV_gpu_shader5); symbolTable.setFunctionExtensions("packUint2x32", 1, &E_GL_NV_gpu_shader5); symbolTable.setFunctionExtensions("unpackInt2x32", 1, &E_GL_NV_gpu_shader5); symbolTable.setFunctionExtensions("unpackUint2x32", 1, &E_GL_NV_gpu_shader5); symbolTable.setFunctionExtensions("packFloat2x16", 1, &E_GL_NV_gpu_shader5); symbolTable.setFunctionExtensions("unpackFloat2x16", 1, &E_GL_NV_gpu_shader5); symbolTable.setFunctionExtensions("doubleBitsToInt64", 1, &E_GL_NV_gpu_shader5); symbolTable.setFunctionExtensions("doubleBitsToUint64", 1, &E_GL_NV_gpu_shader5); symbolTable.setFunctionExtensions("int64BitsToDouble", 1, &E_GL_NV_gpu_shader5); symbolTable.setFunctionExtensions("uint64BitsToDouble", 1, &E_GL_NV_gpu_shader5); } // E_GL_ARB_shader_atomic_counter_ops if (profile != EEsProfile && version == 450) { symbolTable.setFunctionExtensions("atomicCounterAddARB" , 1, &E_GL_ARB_shader_atomic_counter_ops); symbolTable.setFunctionExtensions("atomicCounterSubtractARB", 1, &E_GL_ARB_shader_atomic_counter_ops); symbolTable.setFunctionExtensions("atomicCounterMinARB" , 1, &E_GL_ARB_shader_atomic_counter_ops); symbolTable.setFunctionExtensions("atomicCounterMaxARB" , 1, &E_GL_ARB_shader_atomic_counter_ops); symbolTable.setFunctionExtensions("atomicCounterAndARB" , 1, &E_GL_ARB_shader_atomic_counter_ops); symbolTable.setFunctionExtensions("atomicCounterOrARB" , 1, &E_GL_ARB_shader_atomic_counter_ops); symbolTable.setFunctionExtensions("atomicCounterXorARB" , 1, &E_GL_ARB_shader_atomic_counter_ops); symbolTable.setFunctionExtensions("atomicCounterExchangeARB", 1, &E_GL_ARB_shader_atomic_counter_ops); symbolTable.setFunctionExtensions("atomicCounterCompSwapARB", 1, &E_GL_ARB_shader_atomic_counter_ops); } // E_GL_ARB_derivative_control if (profile != EEsProfile && version < 450) { symbolTable.setFunctionExtensions("dFdxFine", 1, &E_GL_ARB_derivative_control); symbolTable.setFunctionExtensions("dFdyFine", 1, &E_GL_ARB_derivative_control); symbolTable.setFunctionExtensions("fwidthFine", 1, &E_GL_ARB_derivative_control); symbolTable.setFunctionExtensions("dFdxCoarse", 1, &E_GL_ARB_derivative_control); symbolTable.setFunctionExtensions("dFdyCoarse", 1, &E_GL_ARB_derivative_control); symbolTable.setFunctionExtensions("fwidthCoarse", 1, &E_GL_ARB_derivative_control); } // E_GL_ARB_sparse_texture2 if (profile != EEsProfile) { symbolTable.setFunctionExtensions("sparseTextureARB", 1, &E_GL_ARB_sparse_texture2); symbolTable.setFunctionExtensions("sparseTextureLodARB", 1, &E_GL_ARB_sparse_texture2); symbolTable.setFunctionExtensions("sparseTextureOffsetARB", 1, &E_GL_ARB_sparse_texture2); symbolTable.setFunctionExtensions("sparseTexelFetchARB", 1, &E_GL_ARB_sparse_texture2); symbolTable.setFunctionExtensions("sparseTexelFetchOffsetARB", 1, &E_GL_ARB_sparse_texture2); symbolTable.setFunctionExtensions("sparseTextureLodOffsetARB", 1, &E_GL_ARB_sparse_texture2); symbolTable.setFunctionExtensions("sparseTextureGradARB", 1, &E_GL_ARB_sparse_texture2); symbolTable.setFunctionExtensions("sparseTextureGradOffsetARB", 1, &E_GL_ARB_sparse_texture2); symbolTable.setFunctionExtensions("sparseTextureGatherARB", 1, &E_GL_ARB_sparse_texture2); symbolTable.setFunctionExtensions("sparseTextureGatherOffsetARB", 1, &E_GL_ARB_sparse_texture2); symbolTable.setFunctionExtensions("sparseTextureGatherOffsetsARB", 1, &E_GL_ARB_sparse_texture2); symbolTable.setFunctionExtensions("sparseImageLoadARB", 1, &E_GL_ARB_sparse_texture2); symbolTable.setFunctionExtensions("sparseTexelsResident", 1, &E_GL_ARB_sparse_texture2); } // E_GL_ARB_sparse_texture_clamp if (profile != EEsProfile) { symbolTable.setFunctionExtensions("sparseTextureClampARB", 1, &E_GL_ARB_sparse_texture_clamp); symbolTable.setFunctionExtensions("sparseTextureOffsetClampARB", 1, &E_GL_ARB_sparse_texture_clamp); symbolTable.setFunctionExtensions("sparseTextureGradClampARB", 1, &E_GL_ARB_sparse_texture_clamp); symbolTable.setFunctionExtensions("sparseTextureGradOffsetClampARB", 1, &E_GL_ARB_sparse_texture_clamp); symbolTable.setFunctionExtensions("textureClampARB", 1, &E_GL_ARB_sparse_texture_clamp); symbolTable.setFunctionExtensions("textureOffsetClampARB", 1, &E_GL_ARB_sparse_texture_clamp); symbolTable.setFunctionExtensions("textureGradClampARB", 1, &E_GL_ARB_sparse_texture_clamp); symbolTable.setFunctionExtensions("textureGradOffsetClampARB", 1, &E_GL_ARB_sparse_texture_clamp); } // E_GL_AMD_shader_explicit_vertex_parameter if (profile != EEsProfile) { symbolTable.setVariableExtensions("gl_BaryCoordNoPerspAMD", 1, &E_GL_AMD_shader_explicit_vertex_parameter); symbolTable.setVariableExtensions("gl_BaryCoordNoPerspCentroidAMD", 1, &E_GL_AMD_shader_explicit_vertex_parameter); symbolTable.setVariableExtensions("gl_BaryCoordNoPerspSampleAMD", 1, &E_GL_AMD_shader_explicit_vertex_parameter); symbolTable.setVariableExtensions("gl_BaryCoordSmoothAMD", 1, &E_GL_AMD_shader_explicit_vertex_parameter); symbolTable.setVariableExtensions("gl_BaryCoordSmoothCentroidAMD", 1, &E_GL_AMD_shader_explicit_vertex_parameter); symbolTable.setVariableExtensions("gl_BaryCoordSmoothSampleAMD", 1, &E_GL_AMD_shader_explicit_vertex_parameter); symbolTable.setVariableExtensions("gl_BaryCoordPullModelAMD", 1, &E_GL_AMD_shader_explicit_vertex_parameter); symbolTable.setFunctionExtensions("interpolateAtVertexAMD", 1, &E_GL_AMD_shader_explicit_vertex_parameter); BuiltInVariable("gl_BaryCoordNoPerspAMD", EbvBaryCoordNoPersp, symbolTable); BuiltInVariable("gl_BaryCoordNoPerspCentroidAMD", EbvBaryCoordNoPerspCentroid, symbolTable); BuiltInVariable("gl_BaryCoordNoPerspSampleAMD", EbvBaryCoordNoPerspSample, symbolTable); BuiltInVariable("gl_BaryCoordSmoothAMD", EbvBaryCoordSmooth, symbolTable); BuiltInVariable("gl_BaryCoordSmoothCentroidAMD", EbvBaryCoordSmoothCentroid, symbolTable); BuiltInVariable("gl_BaryCoordSmoothSampleAMD", EbvBaryCoordSmoothSample, symbolTable); BuiltInVariable("gl_BaryCoordPullModelAMD", EbvBaryCoordPullModel, symbolTable); } // E_GL_AMD_texture_gather_bias_lod if (profile != EEsProfile) { symbolTable.setFunctionExtensions("textureGatherLodAMD", 1, &E_GL_AMD_texture_gather_bias_lod); symbolTable.setFunctionExtensions("textureGatherLodOffsetAMD", 1, &E_GL_AMD_texture_gather_bias_lod); symbolTable.setFunctionExtensions("textureGatherLodOffsetsAMD", 1, &E_GL_AMD_texture_gather_bias_lod); symbolTable.setFunctionExtensions("sparseTextureGatherLodAMD", 1, &E_GL_AMD_texture_gather_bias_lod); symbolTable.setFunctionExtensions("sparseTextureGatherLodOffsetAMD", 1, &E_GL_AMD_texture_gather_bias_lod); symbolTable.setFunctionExtensions("sparseTextureGatherLodOffsetsAMD", 1, &E_GL_AMD_texture_gather_bias_lod); } // E_GL_AMD_shader_image_load_store_lod if (profile != EEsProfile) { symbolTable.setFunctionExtensions("imageLoadLodAMD", 1, &E_GL_AMD_shader_image_load_store_lod); symbolTable.setFunctionExtensions("imageStoreLodAMD", 1, &E_GL_AMD_shader_image_load_store_lod); symbolTable.setFunctionExtensions("sparseImageLoadLodAMD", 1, &E_GL_AMD_shader_image_load_store_lod); } if (profile != EEsProfile && version >= 430) { symbolTable.setVariableExtensions("gl_FragFullyCoveredNV", 1, &E_GL_NV_conservative_raster_underestimation); BuiltInVariable("gl_FragFullyCoveredNV", EbvFragFullyCoveredNV, symbolTable); } if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 320)) { symbolTable.setVariableExtensions("gl_FragmentSizeNV", 1, &E_GL_NV_shading_rate_image); symbolTable.setVariableExtensions("gl_InvocationsPerPixelNV", 1, &E_GL_NV_shading_rate_image); BuiltInVariable("gl_FragmentSizeNV", EbvFragmentSizeNV, symbolTable); BuiltInVariable("gl_InvocationsPerPixelNV", EbvInvocationsPerPixelNV, symbolTable); symbolTable.setVariableExtensions("gl_BaryCoordNV", 1, &E_GL_NV_fragment_shader_barycentric); symbolTable.setVariableExtensions("gl_BaryCoordNoPerspNV", 1, &E_GL_NV_fragment_shader_barycentric); BuiltInVariable("gl_BaryCoordNV", EbvBaryCoordNV, symbolTable); BuiltInVariable("gl_BaryCoordNoPerspNV", EbvBaryCoordNoPerspNV, symbolTable); symbolTable.setVariableExtensions("gl_BaryCoordEXT", 1, &E_GL_EXT_fragment_shader_barycentric); symbolTable.setVariableExtensions("gl_BaryCoordNoPerspEXT", 1, &E_GL_EXT_fragment_shader_barycentric); BuiltInVariable("gl_BaryCoordEXT", EbvBaryCoordEXT, symbolTable); BuiltInVariable("gl_BaryCoordNoPerspEXT", EbvBaryCoordNoPerspEXT, symbolTable); } if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 310)) { symbolTable.setVariableExtensions("gl_FragSizeEXT", 1, &E_GL_EXT_fragment_invocation_density); symbolTable.setVariableExtensions("gl_FragInvocationCountEXT", 1, &E_GL_EXT_fragment_invocation_density); BuiltInVariable("gl_FragSizeEXT", EbvFragSizeEXT, symbolTable); BuiltInVariable("gl_FragInvocationCountEXT", EbvFragInvocationCountEXT, symbolTable); } symbolTable.setVariableExtensions("gl_FragDepthEXT", 1, &E_GL_EXT_frag_depth); symbolTable.setFunctionExtensions("clockARB", 1, &E_GL_ARB_shader_clock); symbolTable.setFunctionExtensions("clock2x32ARB", 1, &E_GL_ARB_shader_clock); symbolTable.setFunctionExtensions("clockRealtimeEXT", 1, &E_GL_EXT_shader_realtime_clock); symbolTable.setFunctionExtensions("clockRealtime2x32EXT", 1, &E_GL_EXT_shader_realtime_clock); if (profile == EEsProfile && version < 320) { symbolTable.setVariableExtensions("gl_PrimitiveID", Num_AEP_geometry_shader, AEP_geometry_shader); symbolTable.setVariableExtensions("gl_Layer", Num_AEP_geometry_shader, AEP_geometry_shader); } if (profile == EEsProfile && version < 320) { symbolTable.setFunctionExtensions("imageAtomicAdd", 1, &E_GL_OES_shader_image_atomic); symbolTable.setFunctionExtensions("imageAtomicMin", 1, &E_GL_OES_shader_image_atomic); symbolTable.setFunctionExtensions("imageAtomicMax", 1, &E_GL_OES_shader_image_atomic); symbolTable.setFunctionExtensions("imageAtomicAnd", 1, &E_GL_OES_shader_image_atomic); symbolTable.setFunctionExtensions("imageAtomicOr", 1, &E_GL_OES_shader_image_atomic); symbolTable.setFunctionExtensions("imageAtomicXor", 1, &E_GL_OES_shader_image_atomic); symbolTable.setFunctionExtensions("imageAtomicExchange", 1, &E_GL_OES_shader_image_atomic); symbolTable.setFunctionExtensions("imageAtomicCompSwap", 1, &E_GL_OES_shader_image_atomic); } if (profile != EEsProfile && version < 330 ) { const int numBitEncodingExts = 3; const char* bitEncodingExts[numBitEncodingExts] = { E_GL_ARB_shader_bit_encoding, E_GL_ARB_gpu_shader5, E_GL_NV_gpu_shader5}; symbolTable.setFunctionExtensions("floatBitsToInt", numBitEncodingExts, bitEncodingExts); symbolTable.setFunctionExtensions("floatBitsToUint", numBitEncodingExts, bitEncodingExts); symbolTable.setFunctionExtensions("intBitsToFloat", numBitEncodingExts, bitEncodingExts); symbolTable.setFunctionExtensions("uintBitsToFloat", numBitEncodingExts, bitEncodingExts); } if (profile != EEsProfile && version < 430 ) { symbolTable.setFunctionExtensions("imageSize", 1, &E_GL_ARB_shader_image_size); } // GL_ARB_shader_storage_buffer_object if (profile != EEsProfile && version < 430 ) { symbolTable.setFunctionExtensions("atomicAdd", 1, &E_GL_ARB_shader_storage_buffer_object); symbolTable.setFunctionExtensions("atomicMin", 1, &E_GL_ARB_shader_storage_buffer_object); symbolTable.setFunctionExtensions("atomicMax", 1, &E_GL_ARB_shader_storage_buffer_object); symbolTable.setFunctionExtensions("atomicAnd", 1, &E_GL_ARB_shader_storage_buffer_object); symbolTable.setFunctionExtensions("atomicOr", 1, &E_GL_ARB_shader_storage_buffer_object); symbolTable.setFunctionExtensions("atomicXor", 1, &E_GL_ARB_shader_storage_buffer_object); symbolTable.setFunctionExtensions("atomicExchange", 1, &E_GL_ARB_shader_storage_buffer_object); symbolTable.setFunctionExtensions("atomicCompSwap", 1, &E_GL_ARB_shader_storage_buffer_object); } // GL_ARB_shading_language_packing if (profile != EEsProfile && version < 400 ) { const int numPackingExts = 3; const char* packingExts[numPackingExts] = { E_GL_ARB_shading_language_packing, E_GL_ARB_gpu_shader5, E_GL_NV_gpu_shader5}; symbolTable.setFunctionExtensions("packUnorm2x16", numPackingExts, packingExts); symbolTable.setFunctionExtensions("unpackUnorm2x16", numPackingExts, packingExts); symbolTable.setFunctionExtensions("packSnorm4x8", numPackingExts, packingExts); symbolTable.setFunctionExtensions("packUnorm4x8", numPackingExts, packingExts); symbolTable.setFunctionExtensions("unpackSnorm4x8", numPackingExts, packingExts); symbolTable.setFunctionExtensions("unpackUnorm4x8", numPackingExts, packingExts); } if (profile != EEsProfile && version < 420 ) { symbolTable.setFunctionExtensions("packSnorm2x16", 1, &E_GL_ARB_shading_language_packing); symbolTable.setFunctionExtensions("unpackSnorm2x16", 1, &E_GL_ARB_shading_language_packing); symbolTable.setFunctionExtensions("unpackHalf2x16", 1, &E_GL_ARB_shading_language_packing); symbolTable.setFunctionExtensions("packHalf2x16", 1, &E_GL_ARB_shading_language_packing); } symbolTable.setVariableExtensions("gl_DeviceIndex", 1, &E_GL_EXT_device_group); BuiltInVariable("gl_DeviceIndex", EbvDeviceIndex, symbolTable); symbolTable.setVariableExtensions("gl_ViewIndex", 1, &E_GL_EXT_multiview); BuiltInVariable("gl_ViewIndex", EbvViewIndex, symbolTable); if (version >= 300 /* both ES and non-ES */) { symbolTable.setVariableExtensions("gl_ViewID_OVR", Num_OVR_multiview_EXTs, OVR_multiview_EXTs); BuiltInVariable("gl_ViewID_OVR", EbvViewIndex, symbolTable); } // GL_ARB_shader_ballot if (profile != EEsProfile) { symbolTable.setVariableExtensions("gl_SubGroupSizeARB", 1, &E_GL_ARB_shader_ballot); symbolTable.setVariableExtensions("gl_SubGroupInvocationARB", 1, &E_GL_ARB_shader_ballot); symbolTable.setVariableExtensions("gl_SubGroupEqMaskARB", 1, &E_GL_ARB_shader_ballot); symbolTable.setVariableExtensions("gl_SubGroupGeMaskARB", 1, &E_GL_ARB_shader_ballot); symbolTable.setVariableExtensions("gl_SubGroupGtMaskARB", 1, &E_GL_ARB_shader_ballot); symbolTable.setVariableExtensions("gl_SubGroupLeMaskARB", 1, &E_GL_ARB_shader_ballot); symbolTable.setVariableExtensions("gl_SubGroupLtMaskARB", 1, &E_GL_ARB_shader_ballot); BuiltInVariable("gl_SubGroupInvocationARB", EbvSubGroupInvocation, symbolTable); BuiltInVariable("gl_SubGroupEqMaskARB", EbvSubGroupEqMask, symbolTable); BuiltInVariable("gl_SubGroupGeMaskARB", EbvSubGroupGeMask, symbolTable); BuiltInVariable("gl_SubGroupGtMaskARB", EbvSubGroupGtMask, symbolTable); BuiltInVariable("gl_SubGroupLeMaskARB", EbvSubGroupLeMask, symbolTable); BuiltInVariable("gl_SubGroupLtMaskARB", EbvSubGroupLtMask, symbolTable); if (spvVersion.vulkan > 0) { // Treat "gl_SubGroupSizeARB" as shader input instead of uniform for Vulkan SpecialQualifier("gl_SubGroupSizeARB", EvqVaryingIn, EbvSubGroupSize, symbolTable); if (language == EShLangFragment) ModifyFlatDecoration("gl_SubGroupSizeARB", true, symbolTable); } else BuiltInVariable("gl_SubGroupSizeARB", EbvSubGroupSize, symbolTable); } // GL_EXT_expect_assume if ((profile == EEsProfile && version >= 310) || (profile != EEsProfile && version >= 140)) { symbolTable.setFunctionExtensions("assumeEXT", 1, &E_GL_EXT_expect_assume); symbolTable.setFunctionExtensions("expectEXT", 1, &E_GL_EXT_expect_assume); } // GL_KHR_shader_subgroup if ((profile == EEsProfile && version >= 310) || (profile != EEsProfile && version >= 140)) { symbolTable.setVariableExtensions("gl_SubgroupSize", 1, &E_GL_KHR_shader_subgroup_basic); symbolTable.setVariableExtensions("gl_SubgroupInvocationID", 1, &E_GL_KHR_shader_subgroup_basic); symbolTable.setVariableExtensions("gl_SubgroupEqMask", 1, &E_GL_KHR_shader_subgroup_ballot); symbolTable.setVariableExtensions("gl_SubgroupGeMask", 1, &E_GL_KHR_shader_subgroup_ballot); symbolTable.setVariableExtensions("gl_SubgroupGtMask", 1, &E_GL_KHR_shader_subgroup_ballot); symbolTable.setVariableExtensions("gl_SubgroupLeMask", 1, &E_GL_KHR_shader_subgroup_ballot); symbolTable.setVariableExtensions("gl_SubgroupLtMask", 1, &E_GL_KHR_shader_subgroup_ballot); BuiltInVariable("gl_SubgroupSize", EbvSubgroupSize2, symbolTable); BuiltInVariable("gl_SubgroupInvocationID", EbvSubgroupInvocation2, symbolTable); BuiltInVariable("gl_SubgroupEqMask", EbvSubgroupEqMask2, symbolTable); BuiltInVariable("gl_SubgroupGeMask", EbvSubgroupGeMask2, symbolTable); BuiltInVariable("gl_SubgroupGtMask", EbvSubgroupGtMask2, symbolTable); BuiltInVariable("gl_SubgroupLeMask", EbvSubgroupLeMask2, symbolTable); BuiltInVariable("gl_SubgroupLtMask", EbvSubgroupLtMask2, symbolTable); symbolTable.setFunctionExtensions("subgroupBarrier", 1, &E_GL_KHR_shader_subgroup_basic); symbolTable.setFunctionExtensions("subgroupMemoryBarrier", 1, &E_GL_KHR_shader_subgroup_basic); symbolTable.setFunctionExtensions("subgroupMemoryBarrierBuffer", 1, &E_GL_KHR_shader_subgroup_basic); symbolTable.setFunctionExtensions("subgroupMemoryBarrierImage", 1, &E_GL_KHR_shader_subgroup_basic); symbolTable.setFunctionExtensions("subgroupElect", 1, &E_GL_KHR_shader_subgroup_basic); symbolTable.setFunctionExtensions("subgroupAll", 1, &E_GL_KHR_shader_subgroup_vote); symbolTable.setFunctionExtensions("subgroupAny", 1, &E_GL_KHR_shader_subgroup_vote); symbolTable.setFunctionExtensions("subgroupAllEqual", 1, &E_GL_KHR_shader_subgroup_vote); symbolTable.setFunctionExtensions("subgroupBroadcast", 1, &E_GL_KHR_shader_subgroup_ballot); symbolTable.setFunctionExtensions("subgroupBroadcastFirst", 1, &E_GL_KHR_shader_subgroup_ballot); symbolTable.setFunctionExtensions("subgroupBallot", 1, &E_GL_KHR_shader_subgroup_ballot); symbolTable.setFunctionExtensions("subgroupInverseBallot", 1, &E_GL_KHR_shader_subgroup_ballot); symbolTable.setFunctionExtensions("subgroupBallotBitExtract", 1, &E_GL_KHR_shader_subgroup_ballot); symbolTable.setFunctionExtensions("subgroupBallotBitCount", 1, &E_GL_KHR_shader_subgroup_ballot); symbolTable.setFunctionExtensions("subgroupBallotInclusiveBitCount", 1, &E_GL_KHR_shader_subgroup_ballot); symbolTable.setFunctionExtensions("subgroupBallotExclusiveBitCount", 1, &E_GL_KHR_shader_subgroup_ballot); symbolTable.setFunctionExtensions("subgroupBallotFindLSB", 1, &E_GL_KHR_shader_subgroup_ballot); symbolTable.setFunctionExtensions("subgroupBallotFindMSB", 1, &E_GL_KHR_shader_subgroup_ballot); symbolTable.setFunctionExtensions("subgroupShuffle", 1, &E_GL_KHR_shader_subgroup_shuffle); symbolTable.setFunctionExtensions("subgroupShuffleXor", 1, &E_GL_KHR_shader_subgroup_shuffle); symbolTable.setFunctionExtensions("subgroupShuffleUp", 1, &E_GL_KHR_shader_subgroup_shuffle_relative); symbolTable.setFunctionExtensions("subgroupShuffleDown", 1, &E_GL_KHR_shader_subgroup_shuffle_relative); symbolTable.setFunctionExtensions("subgroupRotate", 1, &E_GL_KHR_shader_subgroup_rotate); symbolTable.setFunctionExtensions("subgroupClusteredRotate", 1, &E_GL_KHR_shader_subgroup_rotate); symbolTable.setFunctionExtensions("subgroupAdd", 1, &E_GL_KHR_shader_subgroup_arithmetic); symbolTable.setFunctionExtensions("subgroupMul", 1, &E_GL_KHR_shader_subgroup_arithmetic); symbolTable.setFunctionExtensions("subgroupMin", 1, &E_GL_KHR_shader_subgroup_arithmetic); symbolTable.setFunctionExtensions("subgroupMax", 1, &E_GL_KHR_shader_subgroup_arithmetic); symbolTable.setFunctionExtensions("subgroupAnd", 1, &E_GL_KHR_shader_subgroup_arithmetic); symbolTable.setFunctionExtensions("subgroupOr", 1, &E_GL_KHR_shader_subgroup_arithmetic); symbolTable.setFunctionExtensions("subgroupXor", 1, &E_GL_KHR_shader_subgroup_arithmetic); symbolTable.setFunctionExtensions("subgroupInclusiveAdd", 1, &E_GL_KHR_shader_subgroup_arithmetic); symbolTable.setFunctionExtensions("subgroupInclusiveMul", 1, &E_GL_KHR_shader_subgroup_arithmetic); symbolTable.setFunctionExtensions("subgroupInclusiveMin", 1, &E_GL_KHR_shader_subgroup_arithmetic); symbolTable.setFunctionExtensions("subgroupInclusiveMax", 1, &E_GL_KHR_shader_subgroup_arithmetic); symbolTable.setFunctionExtensions("subgroupInclusiveAnd", 1, &E_GL_KHR_shader_subgroup_arithmetic); symbolTable.setFunctionExtensions("subgroupInclusiveOr", 1, &E_GL_KHR_shader_subgroup_arithmetic); symbolTable.setFunctionExtensions("subgroupInclusiveXor", 1, &E_GL_KHR_shader_subgroup_arithmetic); symbolTable.setFunctionExtensions("subgroupExclusiveAdd", 1, &E_GL_KHR_shader_subgroup_arithmetic); symbolTable.setFunctionExtensions("subgroupExclusiveMul", 1, &E_GL_KHR_shader_subgroup_arithmetic); symbolTable.setFunctionExtensions("subgroupExclusiveMin", 1, &E_GL_KHR_shader_subgroup_arithmetic); symbolTable.setFunctionExtensions("subgroupExclusiveMax", 1, &E_GL_KHR_shader_subgroup_arithmetic); symbolTable.setFunctionExtensions("subgroupExclusiveAnd", 1, &E_GL_KHR_shader_subgroup_arithmetic); symbolTable.setFunctionExtensions("subgroupExclusiveOr", 1, &E_GL_KHR_shader_subgroup_arithmetic); symbolTable.setFunctionExtensions("subgroupExclusiveXor", 1, &E_GL_KHR_shader_subgroup_arithmetic); symbolTable.setFunctionExtensions("subgroupClusteredAdd", 1, &E_GL_KHR_shader_subgroup_clustered); symbolTable.setFunctionExtensions("subgroupClusteredMul", 1, &E_GL_KHR_shader_subgroup_clustered); symbolTable.setFunctionExtensions("subgroupClusteredMin", 1, &E_GL_KHR_shader_subgroup_clustered); symbolTable.setFunctionExtensions("subgroupClusteredMax", 1, &E_GL_KHR_shader_subgroup_clustered); symbolTable.setFunctionExtensions("subgroupClusteredAnd", 1, &E_GL_KHR_shader_subgroup_clustered); symbolTable.setFunctionExtensions("subgroupClusteredOr", 1, &E_GL_KHR_shader_subgroup_clustered); symbolTable.setFunctionExtensions("subgroupClusteredXor", 1, &E_GL_KHR_shader_subgroup_clustered); symbolTable.setFunctionExtensions("subgroupQuadBroadcast", 1, &E_GL_KHR_shader_subgroup_quad); symbolTable.setFunctionExtensions("subgroupQuadSwapHorizontal", 1, &E_GL_KHR_shader_subgroup_quad); symbolTable.setFunctionExtensions("subgroupQuadSwapVertical", 1, &E_GL_KHR_shader_subgroup_quad); symbolTable.setFunctionExtensions("subgroupQuadSwapDiagonal", 1, &E_GL_KHR_shader_subgroup_quad); symbolTable.setFunctionExtensions("subgroupPartitionNV", 1, &E_GL_NV_shader_subgroup_partitioned); symbolTable.setFunctionExtensions("subgroupPartitionedAddNV", 1, &E_GL_NV_shader_subgroup_partitioned); symbolTable.setFunctionExtensions("subgroupPartitionedMulNV", 1, &E_GL_NV_shader_subgroup_partitioned); symbolTable.setFunctionExtensions("subgroupPartitionedMinNV", 1, &E_GL_NV_shader_subgroup_partitioned); symbolTable.setFunctionExtensions("subgroupPartitionedMaxNV", 1, &E_GL_NV_shader_subgroup_partitioned); symbolTable.setFunctionExtensions("subgroupPartitionedAndNV", 1, &E_GL_NV_shader_subgroup_partitioned); symbolTable.setFunctionExtensions("subgroupPartitionedOrNV", 1, &E_GL_NV_shader_subgroup_partitioned); symbolTable.setFunctionExtensions("subgroupPartitionedXorNV", 1, &E_GL_NV_shader_subgroup_partitioned); symbolTable.setFunctionExtensions("subgroupPartitionedInclusiveAddNV", 1, &E_GL_NV_shader_subgroup_partitioned); symbolTable.setFunctionExtensions("subgroupPartitionedInclusiveMulNV", 1, &E_GL_NV_shader_subgroup_partitioned); symbolTable.setFunctionExtensions("subgroupPartitionedInclusiveMinNV", 1, &E_GL_NV_shader_subgroup_partitioned); symbolTable.setFunctionExtensions("subgroupPartitionedInclusiveMaxNV", 1, &E_GL_NV_shader_subgroup_partitioned); symbolTable.setFunctionExtensions("subgroupPartitionedInclusiveAndNV", 1, &E_GL_NV_shader_subgroup_partitioned); symbolTable.setFunctionExtensions("subgroupPartitionedInclusiveOrNV", 1, &E_GL_NV_shader_subgroup_partitioned); symbolTable.setFunctionExtensions("subgroupPartitionedInclusiveXorNV", 1, &E_GL_NV_shader_subgroup_partitioned); symbolTable.setFunctionExtensions("subgroupPartitionedExclusiveAddNV", 1, &E_GL_NV_shader_subgroup_partitioned); symbolTable.setFunctionExtensions("subgroupPartitionedExclusiveMulNV", 1, &E_GL_NV_shader_subgroup_partitioned); symbolTable.setFunctionExtensions("subgroupPartitionedExclusiveMinNV", 1, &E_GL_NV_shader_subgroup_partitioned); symbolTable.setFunctionExtensions("subgroupPartitionedExclusiveMaxNV", 1, &E_GL_NV_shader_subgroup_partitioned); symbolTable.setFunctionExtensions("subgroupPartitionedExclusiveAndNV", 1, &E_GL_NV_shader_subgroup_partitioned); symbolTable.setFunctionExtensions("subgroupPartitionedExclusiveOrNV", 1, &E_GL_NV_shader_subgroup_partitioned); symbolTable.setFunctionExtensions("subgroupPartitionedExclusiveXorNV", 1, &E_GL_NV_shader_subgroup_partitioned); // GL_NV_shader_sm_builtins symbolTable.setVariableExtensions("gl_WarpsPerSMNV", 1, &E_GL_NV_shader_sm_builtins); symbolTable.setVariableExtensions("gl_SMCountNV", 1, &E_GL_NV_shader_sm_builtins); symbolTable.setVariableExtensions("gl_WarpIDNV", 1, &E_GL_NV_shader_sm_builtins); symbolTable.setVariableExtensions("gl_SMIDNV", 1, &E_GL_NV_shader_sm_builtins); BuiltInVariable("gl_WarpsPerSMNV", EbvWarpsPerSM, symbolTable); BuiltInVariable("gl_SMCountNV", EbvSMCount, symbolTable); BuiltInVariable("gl_WarpIDNV", EbvWarpID, symbolTable); BuiltInVariable("gl_SMIDNV", EbvSMID, symbolTable); // GL_ARM_shader_core_builtins symbolTable.setVariableExtensions("gl_CoreCountARM", 1, &E_GL_ARM_shader_core_builtins); symbolTable.setVariableExtensions("gl_CoreIDARM", 1, &E_GL_ARM_shader_core_builtins); symbolTable.setVariableExtensions("gl_CoreMaxIDARM", 1, &E_GL_ARM_shader_core_builtins); symbolTable.setVariableExtensions("gl_WarpIDARM", 1, &E_GL_ARM_shader_core_builtins); symbolTable.setVariableExtensions("gl_WarpMaxIDARM", 1, &E_GL_ARM_shader_core_builtins); BuiltInVariable("gl_CoreCountARM", EbvCoreCountARM, symbolTable); BuiltInVariable("gl_CoreIDARM", EbvCoreIDARM, symbolTable); BuiltInVariable("gl_CoreMaxIDARM", EbvCoreMaxIDARM, symbolTable); BuiltInVariable("gl_WarpIDARM", EbvWarpIDARM, symbolTable); BuiltInVariable("gl_WarpMaxIDARM", EbvWarpMaxIDARM, symbolTable); } if (profile == EEsProfile) { symbolTable.setFunctionExtensions("shadow2DEXT", 1, &E_GL_EXT_shadow_samplers); symbolTable.setFunctionExtensions("shadow2DProjEXT", 1, &E_GL_EXT_shadow_samplers); } if (spvVersion.vulkan > 0) { symbolTable.setVariableExtensions("gl_ScopeDevice", 1, &E_GL_KHR_memory_scope_semantics); symbolTable.setVariableExtensions("gl_ScopeWorkgroup", 1, &E_GL_KHR_memory_scope_semantics); symbolTable.setVariableExtensions("gl_ScopeSubgroup", 1, &E_GL_KHR_memory_scope_semantics); symbolTable.setVariableExtensions("gl_ScopeInvocation", 1, &E_GL_KHR_memory_scope_semantics); symbolTable.setVariableExtensions("gl_SemanticsRelaxed", 1, &E_GL_KHR_memory_scope_semantics); symbolTable.setVariableExtensions("gl_SemanticsAcquire", 1, &E_GL_KHR_memory_scope_semantics); symbolTable.setVariableExtensions("gl_SemanticsRelease", 1, &E_GL_KHR_memory_scope_semantics); symbolTable.setVariableExtensions("gl_SemanticsAcquireRelease", 1, &E_GL_KHR_memory_scope_semantics); symbolTable.setVariableExtensions("gl_SemanticsMakeAvailable", 1, &E_GL_KHR_memory_scope_semantics); symbolTable.setVariableExtensions("gl_SemanticsMakeVisible", 1, &E_GL_KHR_memory_scope_semantics); symbolTable.setVariableExtensions("gl_SemanticsVolatile", 1, &E_GL_KHR_memory_scope_semantics); symbolTable.setVariableExtensions("gl_StorageSemanticsNone", 1, &E_GL_KHR_memory_scope_semantics); symbolTable.setVariableExtensions("gl_StorageSemanticsBuffer", 1, &E_GL_KHR_memory_scope_semantics); symbolTable.setVariableExtensions("gl_StorageSemanticsShared", 1, &E_GL_KHR_memory_scope_semantics); symbolTable.setVariableExtensions("gl_StorageSemanticsImage", 1, &E_GL_KHR_memory_scope_semantics); symbolTable.setVariableExtensions("gl_StorageSemanticsOutput", 1, &E_GL_KHR_memory_scope_semantics); } symbolTable.setFunctionExtensions("helperInvocationEXT", 1, &E_GL_EXT_demote_to_helper_invocation); if ((profile == EEsProfile && version >= 310) || (profile != EEsProfile && version >= 450)) { symbolTable.setVariableExtensions("gl_ShadingRateEXT", 1, &E_GL_EXT_fragment_shading_rate); BuiltInVariable("gl_ShadingRateEXT", EbvShadingRateKHR, symbolTable); symbolTable.setVariableExtensions("gl_ShadingRateFlag2VerticalPixelsEXT", 1, &E_GL_EXT_fragment_shading_rate); symbolTable.setVariableExtensions("gl_ShadingRateFlag4VerticalPixelsEXT", 1, &E_GL_EXT_fragment_shading_rate); symbolTable.setVariableExtensions("gl_ShadingRateFlag2HorizontalPixelsEXT", 1, &E_GL_EXT_fragment_shading_rate); symbolTable.setVariableExtensions("gl_ShadingRateFlag4HorizontalPixelsEXT", 1, &E_GL_EXT_fragment_shading_rate); } // GL_EXT_shader_quad_control if ((profile != EEsProfile && version >= 140) || (profile == EEsProfile && version >= 310)) { symbolTable.setFunctionExtensions("subgroupQuadAll", 1, &E_GL_KHR_shader_subgroup_vote); symbolTable.setFunctionExtensions("subgroupQuadAny", 1, &E_GL_KHR_shader_subgroup_vote); } // GL_EXT_shader_tile_image symbolTable.setFunctionExtensions("stencilAttachmentReadEXT", 1, &E_GL_EXT_shader_tile_image); symbolTable.setFunctionExtensions("depthAttachmentReadEXT", 1, &E_GL_EXT_shader_tile_image); symbolTable.setFunctionExtensions("colorAttachmentReadEXT", 1, &E_GL_EXT_shader_tile_image); if ((profile == EEsProfile && version >= 310) || (profile != EEsProfile && version >= 140)) { symbolTable.setFunctionExtensions("textureWeightedQCOM", 1, &E_GL_QCOM_image_processing); symbolTable.setFunctionExtensions("textureBoxFilterQCOM", 1, &E_GL_QCOM_image_processing); symbolTable.setFunctionExtensions("textureBlockMatchSADQCOM", 1, &E_GL_QCOM_image_processing); symbolTable.setFunctionExtensions("textureBlockMatchSSDQCOM", 1, &E_GL_QCOM_image_processing); symbolTable.setFunctionExtensions("textureBlockMatchWindowSSDQCOM", 1, &E_GL_QCOM_image_processing2); symbolTable.setFunctionExtensions("textureBlockMatchWindowSADQCOM", 1, &E_GL_QCOM_image_processing2); symbolTable.setFunctionExtensions("textureBlockMatchGatherSSDQCOM", 1, &E_GL_QCOM_image_processing2); symbolTable.setFunctionExtensions("textureBlockMatchGatherSADQCOM", 1, &E_GL_QCOM_image_processing2); } if ((profile == EEsProfile && version >= 310) || (profile != EEsProfile && version >= 460)) { BuiltInVariable("gl_TileOffsetQCOM", EbvTileOffsetQCOM, symbolTable); BuiltInVariable("gl_TileDimensionQCOM", EbvTileDimensionQCOM, symbolTable); BuiltInVariable("gl_TileApronSizeQCOM", EbvTileApronSizeQCOM, symbolTable); symbolTable.setVariableExtensions("gl_TileOffsetQCOM", 1, &E_GL_QCOM_tile_shading); symbolTable.setVariableExtensions("gl_TileDimensionQCOM", 1, &E_GL_QCOM_tile_shading); symbolTable.setVariableExtensions("gl_TileApronSizeQCOM", 1, &E_GL_QCOM_tile_shading); } break; case EShLangCompute: BuiltInVariable("gl_NumWorkGroups", EbvNumWorkGroups, symbolTable); BuiltInVariable("gl_WorkGroupSize", EbvWorkGroupSize, symbolTable); BuiltInVariable("gl_WorkGroupID", EbvWorkGroupId, symbolTable); BuiltInVariable("gl_LocalInvocationID", EbvLocalInvocationId, symbolTable); BuiltInVariable("gl_GlobalInvocationID", EbvGlobalInvocationId, symbolTable); BuiltInVariable("gl_LocalInvocationIndex", EbvLocalInvocationIndex, symbolTable); BuiltInVariable("gl_DeviceIndex", EbvDeviceIndex, symbolTable); BuiltInVariable("gl_ViewIndex", EbvViewIndex, symbolTable); if ((profile != EEsProfile && version >= 140) || (profile == EEsProfile && version >= 310)) { symbolTable.setVariableExtensions("gl_DeviceIndex", 1, &E_GL_EXT_device_group); symbolTable.setVariableExtensions("gl_ViewIndex", 1, &E_GL_EXT_multiview); } if (profile != EEsProfile && version < 430) { symbolTable.setVariableExtensions("gl_NumWorkGroups", 1, &E_GL_ARB_compute_shader); symbolTable.setVariableExtensions("gl_WorkGroupSize", 1, &E_GL_ARB_compute_shader); symbolTable.setVariableExtensions("gl_WorkGroupID", 1, &E_GL_ARB_compute_shader); symbolTable.setVariableExtensions("gl_LocalInvocationID", 1, &E_GL_ARB_compute_shader); symbolTable.setVariableExtensions("gl_GlobalInvocationID", 1, &E_GL_ARB_compute_shader); symbolTable.setVariableExtensions("gl_LocalInvocationIndex", 1, &E_GL_ARB_compute_shader); symbolTable.setVariableExtensions("gl_MaxComputeWorkGroupCount", 1, &E_GL_ARB_compute_shader); symbolTable.setVariableExtensions("gl_MaxComputeWorkGroupSize", 1, &E_GL_ARB_compute_shader); symbolTable.setVariableExtensions("gl_MaxComputeUniformComponents", 1, &E_GL_ARB_compute_shader); symbolTable.setVariableExtensions("gl_MaxComputeTextureImageUnits", 1, &E_GL_ARB_compute_shader); symbolTable.setVariableExtensions("gl_MaxComputeImageUniforms", 1, &E_GL_ARB_compute_shader); symbolTable.setVariableExtensions("gl_MaxComputeAtomicCounters", 1, &E_GL_ARB_compute_shader); symbolTable.setVariableExtensions("gl_MaxComputeAtomicCounterBuffers", 1, &E_GL_ARB_compute_shader); symbolTable.setFunctionExtensions("barrier", 1, &E_GL_ARB_compute_shader); symbolTable.setFunctionExtensions("memoryBarrierAtomicCounter", 1, &E_GL_ARB_compute_shader); symbolTable.setFunctionExtensions("memoryBarrierBuffer", 1, &E_GL_ARB_compute_shader); symbolTable.setFunctionExtensions("memoryBarrierImage", 1, &E_GL_ARB_compute_shader); symbolTable.setFunctionExtensions("memoryBarrierShared", 1, &E_GL_ARB_compute_shader); symbolTable.setFunctionExtensions("groupMemoryBarrier", 1, &E_GL_ARB_compute_shader); } symbolTable.setFunctionExtensions("controlBarrier", 1, &E_GL_KHR_memory_scope_semantics); symbolTable.setFunctionExtensions("debugPrintfEXT", 1, &E_GL_EXT_debug_printf); // GL_ARB_shader_ballot if (profile != EEsProfile) { symbolTable.setVariableExtensions("gl_SubGroupSizeARB", 1, &E_GL_ARB_shader_ballot); symbolTable.setVariableExtensions("gl_SubGroupInvocationARB", 1, &E_GL_ARB_shader_ballot); symbolTable.setVariableExtensions("gl_SubGroupEqMaskARB", 1, &E_GL_ARB_shader_ballot); symbolTable.setVariableExtensions("gl_SubGroupGeMaskARB", 1, &E_GL_ARB_shader_ballot); symbolTable.setVariableExtensions("gl_SubGroupGtMaskARB", 1, &E_GL_ARB_shader_ballot); symbolTable.setVariableExtensions("gl_SubGroupLeMaskARB", 1, &E_GL_ARB_shader_ballot); symbolTable.setVariableExtensions("gl_SubGroupLtMaskARB", 1, &E_GL_ARB_shader_ballot); BuiltInVariable("gl_SubGroupInvocationARB", EbvSubGroupInvocation, symbolTable); BuiltInVariable("gl_SubGroupEqMaskARB", EbvSubGroupEqMask, symbolTable); BuiltInVariable("gl_SubGroupGeMaskARB", EbvSubGroupGeMask, symbolTable); BuiltInVariable("gl_SubGroupGtMaskARB", EbvSubGroupGtMask, symbolTable); BuiltInVariable("gl_SubGroupLeMaskARB", EbvSubGroupLeMask, symbolTable); BuiltInVariable("gl_SubGroupLtMaskARB", EbvSubGroupLtMask, symbolTable); if (spvVersion.vulkan > 0) { // Treat "gl_SubGroupSizeARB" as shader input instead of uniform for Vulkan SpecialQualifier("gl_SubGroupSizeARB", EvqVaryingIn, EbvSubGroupSize, symbolTable); if (language == EShLangFragment) ModifyFlatDecoration("gl_SubGroupSizeARB", true, symbolTable); } else BuiltInVariable("gl_SubGroupSizeARB", EbvSubGroupSize, symbolTable); } // GL_KHR_shader_subgroup if ((profile == EEsProfile && version >= 310) || (profile != EEsProfile && version >= 140)) { symbolTable.setVariableExtensions("gl_SubgroupSize", 1, &E_GL_KHR_shader_subgroup_basic); symbolTable.setVariableExtensions("gl_SubgroupInvocationID", 1, &E_GL_KHR_shader_subgroup_basic); symbolTable.setVariableExtensions("gl_SubgroupEqMask", 1, &E_GL_KHR_shader_subgroup_ballot); symbolTable.setVariableExtensions("gl_SubgroupGeMask", 1, &E_GL_KHR_shader_subgroup_ballot); symbolTable.setVariableExtensions("gl_SubgroupGtMask", 1, &E_GL_KHR_shader_subgroup_ballot); symbolTable.setVariableExtensions("gl_SubgroupLeMask", 1, &E_GL_KHR_shader_subgroup_ballot); symbolTable.setVariableExtensions("gl_SubgroupLtMask", 1, &E_GL_KHR_shader_subgroup_ballot); BuiltInVariable("gl_SubgroupSize", EbvSubgroupSize2, symbolTable); BuiltInVariable("gl_SubgroupInvocationID", EbvSubgroupInvocation2, symbolTable); BuiltInVariable("gl_SubgroupEqMask", EbvSubgroupEqMask2, symbolTable); BuiltInVariable("gl_SubgroupGeMask", EbvSubgroupGeMask2, symbolTable); BuiltInVariable("gl_SubgroupGtMask", EbvSubgroupGtMask2, symbolTable); BuiltInVariable("gl_SubgroupLeMask", EbvSubgroupLeMask2, symbolTable); BuiltInVariable("gl_SubgroupLtMask", EbvSubgroupLtMask2, symbolTable); // GL_NV_shader_sm_builtins symbolTable.setVariableExtensions("gl_WarpsPerSMNV", 1, &E_GL_NV_shader_sm_builtins); symbolTable.setVariableExtensions("gl_SMCountNV", 1, &E_GL_NV_shader_sm_builtins); symbolTable.setVariableExtensions("gl_WarpIDNV", 1, &E_GL_NV_shader_sm_builtins); symbolTable.setVariableExtensions("gl_SMIDNV", 1, &E_GL_NV_shader_sm_builtins); BuiltInVariable("gl_WarpsPerSMNV", EbvWarpsPerSM, symbolTable); BuiltInVariable("gl_SMCountNV", EbvSMCount, symbolTable); BuiltInVariable("gl_WarpIDNV", EbvWarpID, symbolTable); BuiltInVariable("gl_SMIDNV", EbvSMID, symbolTable); // GL_ARM_shader_core_builtins symbolTable.setVariableExtensions("gl_CoreCountARM", 1, &E_GL_ARM_shader_core_builtins); symbolTable.setVariableExtensions("gl_CoreIDARM", 1, &E_GL_ARM_shader_core_builtins); symbolTable.setVariableExtensions("gl_CoreMaxIDARM", 1, &E_GL_ARM_shader_core_builtins); symbolTable.setVariableExtensions("gl_WarpIDARM", 1, &E_GL_ARM_shader_core_builtins); symbolTable.setVariableExtensions("gl_WarpMaxIDARM", 1, &E_GL_ARM_shader_core_builtins); BuiltInVariable("gl_CoreCountARM", EbvCoreCountARM, symbolTable); BuiltInVariable("gl_CoreIDARM", EbvCoreIDARM, symbolTable); BuiltInVariable("gl_CoreMaxIDARM", EbvCoreMaxIDARM, symbolTable); BuiltInVariable("gl_WarpIDARM", EbvWarpIDARM, symbolTable); BuiltInVariable("gl_WarpMaxIDARM", EbvWarpMaxIDARM, symbolTable); } // GL_KHR_shader_subgroup if ((profile == EEsProfile && version >= 310) || (profile != EEsProfile && version >= 140)) { symbolTable.setVariableExtensions("gl_NumSubgroups", 1, &E_GL_KHR_shader_subgroup_basic); symbolTable.setVariableExtensions("gl_SubgroupID", 1, &E_GL_KHR_shader_subgroup_basic); BuiltInVariable("gl_NumSubgroups", EbvNumSubgroups, symbolTable); BuiltInVariable("gl_SubgroupID", EbvSubgroupID, symbolTable); symbolTable.setFunctionExtensions("subgroupMemoryBarrierShared", 1, &E_GL_KHR_shader_subgroup_basic); } { const char *coopExt[2] = { E_GL_NV_cooperative_matrix, E_GL_NV_integer_cooperative_matrix }; symbolTable.setFunctionExtensions("coopMatLoadNV", 2, coopExt); symbolTable.setFunctionExtensions("coopMatStoreNV", 2, coopExt); symbolTable.setFunctionExtensions("coopMatMulAddNV", 2, coopExt); } { symbolTable.setFunctionExtensions("coopMatLoad", 1, &E_GL_KHR_cooperative_matrix); symbolTable.setFunctionExtensions("coopMatStore", 1, &E_GL_KHR_cooperative_matrix); symbolTable.setFunctionExtensions("coopMatMulAdd", 1, &E_GL_KHR_cooperative_matrix); symbolTable.setFunctionExtensions("coopMatReduceNV", 1, &E_GL_NV_cooperative_matrix2); symbolTable.setFunctionExtensions("coopMatPerElementNV", 1, &E_GL_NV_cooperative_matrix2); symbolTable.setFunctionExtensions("coopMatTransposeNV", 1, &E_GL_NV_cooperative_matrix2); symbolTable.setFunctionExtensions("createTensorLayoutNV", 1, &E_GL_NV_cooperative_matrix2); symbolTable.setFunctionExtensions("setTensorLayoutBlockSizeNV", 1, &E_GL_NV_cooperative_matrix2); symbolTable.setFunctionExtensions("setTensorLayoutDimensionNV", 1, &E_GL_NV_cooperative_matrix2); symbolTable.setFunctionExtensions("setTensorLayoutStrideNV", 1, &E_GL_NV_cooperative_matrix2); symbolTable.setFunctionExtensions("sliceTensorLayoutNV", 1, &E_GL_NV_cooperative_matrix2); symbolTable.setFunctionExtensions("setTensorLayoutClampValueNV", 1, &E_GL_NV_cooperative_matrix2); symbolTable.setFunctionExtensions("createTensorViewNV", 1, &E_GL_NV_cooperative_matrix2); symbolTable.setFunctionExtensions("setTensorViewDimensionsNV", 1, &E_GL_NV_cooperative_matrix2); symbolTable.setFunctionExtensions("setTensorViewStrideNV", 1, &E_GL_NV_cooperative_matrix2); symbolTable.setFunctionExtensions("setTensorViewClipNV", 1, &E_GL_NV_cooperative_matrix2); } { symbolTable.setFunctionExtensions("coopVecMatMulNV", 1, &E_GL_NV_cooperative_vector); symbolTable.setFunctionExtensions("coopVecMatMulAddNV", 1, &E_GL_NV_cooperative_vector); symbolTable.setFunctionExtensions("coopVecOuterProductAccumulateNV", 1, &E_GL_NV_cooperative_vector); symbolTable.setFunctionExtensions("coopVecReduceSumAccumulateNV", 1, &E_GL_NV_cooperative_vector); } if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 320)) { symbolTable.setFunctionExtensions("dFdx", 1, &E_GL_NV_compute_shader_derivatives); symbolTable.setFunctionExtensions("dFdy", 1, &E_GL_NV_compute_shader_derivatives); symbolTable.setFunctionExtensions("fwidth", 1, &E_GL_NV_compute_shader_derivatives); symbolTable.setFunctionExtensions("dFdxFine", 1, &E_GL_NV_compute_shader_derivatives); symbolTable.setFunctionExtensions("dFdyFine", 1, &E_GL_NV_compute_shader_derivatives); symbolTable.setFunctionExtensions("fwidthFine", 1, &E_GL_NV_compute_shader_derivatives); symbolTable.setFunctionExtensions("dFdxCoarse", 1, &E_GL_NV_compute_shader_derivatives); symbolTable.setFunctionExtensions("dFdyCoarse", 1, &E_GL_NV_compute_shader_derivatives); symbolTable.setFunctionExtensions("fwidthCoarse", 1, &E_GL_NV_compute_shader_derivatives); } if ((profile == EEsProfile && version >= 310) || (profile != EEsProfile && version >= 450)) { symbolTable.setVariableExtensions("gl_ShadingRateFlag2VerticalPixelsEXT", 1, &E_GL_EXT_fragment_shading_rate); symbolTable.setVariableExtensions("gl_ShadingRateFlag4VerticalPixelsEXT", 1, &E_GL_EXT_fragment_shading_rate); symbolTable.setVariableExtensions("gl_ShadingRateFlag2HorizontalPixelsEXT", 1, &E_GL_EXT_fragment_shading_rate); symbolTable.setVariableExtensions("gl_ShadingRateFlag4HorizontalPixelsEXT", 1, &E_GL_EXT_fragment_shading_rate); } if ((profile != EEsProfile && version >= 460)) { symbolTable.setFunctionExtensions("fetchMicroTriangleVertexPositionNV", 1, &E_GL_NV_displacement_micromap); symbolTable.setFunctionExtensions("fetchMicroTriangleVertexBarycentricNV", 1, &E_GL_NV_displacement_micromap); } // GL_EXT_integer_dot_product if ((profile == EEsProfile && version >= 300) || (profile != EEsProfile && version >= 450)) { symbolTable.setFunctionExtensions("dotEXT", 1, &E_GL_EXT_integer_dot_product); symbolTable.setFunctionExtensions("dotPacked4x8EXT", 1, &E_GL_EXT_integer_dot_product); symbolTable.setFunctionExtensions("dotAccSatEXT", 1, &E_GL_EXT_integer_dot_product); symbolTable.setFunctionExtensions("dotPacked4x8AccSatEXT", 1, &E_GL_EXT_integer_dot_product); } { symbolTable.setFunctionExtensions("bfloat16BitsToIntEXT", 1, &E_GL_EXT_bfloat16); symbolTable.setFunctionExtensions("bfloat16BitsToUintEXT", 1, &E_GL_EXT_bfloat16); symbolTable.setFunctionExtensions("intBitsToBFloat16EXT", 1, &E_GL_EXT_bfloat16); symbolTable.setFunctionExtensions("uintBitsToBFloat16EXT", 1, &E_GL_EXT_bfloat16); symbolTable.setFunctionExtensions("floate5m2BitsToIntEXT", 1, &E_GL_EXT_float_e5m2); symbolTable.setFunctionExtensions("floate5m2BitsToUintEXT", 1, &E_GL_EXT_float_e5m2); symbolTable.setFunctionExtensions("intBitsToFloate5m2EXT", 1, &E_GL_EXT_float_e5m2); symbolTable.setFunctionExtensions("uintBitsToFloate5m2EXT", 1, &E_GL_EXT_float_e5m2); symbolTable.setFunctionExtensions("floate4m3BitsToIntEXT", 1, &E_GL_EXT_float_e4m3); symbolTable.setFunctionExtensions("floate4m3BitsToUintEXT", 1, &E_GL_EXT_float_e4m3); symbolTable.setFunctionExtensions("intBitsToFloate4m3EXT", 1, &E_GL_EXT_float_e4m3); symbolTable.setFunctionExtensions("uintBitsToFloate4m3EXT", 1, &E_GL_EXT_float_e4m3); const char *float8exts[] = {E_GL_EXT_float_e5m2, E_GL_EXT_float_e4m3}; symbolTable.setFunctionExtensions("saturatedConvertEXT", 2, float8exts); } // E_SPV_QCOM_tile_shading if ((profile == EEsProfile && version >= 310) || (profile != EEsProfile && version >= 460)) { BuiltInVariable("gl_TileOffsetQCOM", EbvTileOffsetQCOM, symbolTable); BuiltInVariable("gl_TileDimensionQCOM", EbvTileDimensionQCOM, symbolTable); BuiltInVariable("gl_TileApronSizeQCOM", EbvTileApronSizeQCOM, symbolTable); symbolTable.setVariableExtensions("gl_TileOffsetQCOM", 1, &E_GL_QCOM_tile_shading); symbolTable.setVariableExtensions("gl_TileDimensionQCOM", 1, &E_GL_QCOM_tile_shading); symbolTable.setVariableExtensions("gl_TileApronSizeQCOM", 1, &E_GL_QCOM_tile_shading); } break; case EShLangRayGen: case EShLangIntersect: case EShLangAnyHit: case EShLangClosestHit: case EShLangMiss: case EShLangCallable: if (profile != EEsProfile && version >= 460) { const char *rtexts[] = { E_GL_NV_ray_tracing, E_GL_EXT_ray_tracing }; symbolTable.setVariableExtensions("gl_LaunchIDNV", 1, &E_GL_NV_ray_tracing); symbolTable.setVariableExtensions("gl_LaunchIDEXT", 1, &E_GL_EXT_ray_tracing); symbolTable.setVariableExtensions("gl_LaunchSizeNV", 1, &E_GL_NV_ray_tracing); symbolTable.setVariableExtensions("gl_LaunchSizeEXT", 1, &E_GL_EXT_ray_tracing); symbolTable.setVariableExtensions("gl_PrimitiveID", 2, rtexts); symbolTable.setVariableExtensions("gl_InstanceID", 2, rtexts); symbolTable.setVariableExtensions("gl_InstanceCustomIndexNV", 1, &E_GL_NV_ray_tracing); symbolTable.setVariableExtensions("gl_InstanceCustomIndexEXT", 1, &E_GL_EXT_ray_tracing); symbolTable.setVariableExtensions("gl_GeometryIndexEXT", 1, &E_GL_EXT_ray_tracing); symbolTable.setVariableExtensions("gl_WorldRayOriginNV", 1, &E_GL_NV_ray_tracing); symbolTable.setVariableExtensions("gl_WorldRayOriginEXT", 1, &E_GL_EXT_ray_tracing); symbolTable.setVariableExtensions("gl_WorldRayDirectionNV", 1, &E_GL_NV_ray_tracing); symbolTable.setVariableExtensions("gl_WorldRayDirectionEXT", 1, &E_GL_EXT_ray_tracing); symbolTable.setVariableExtensions("gl_ObjectRayOriginNV", 1, &E_GL_NV_ray_tracing); symbolTable.setVariableExtensions("gl_ObjectRayOriginEXT", 1, &E_GL_EXT_ray_tracing); symbolTable.setVariableExtensions("gl_ObjectRayDirectionNV", 1, &E_GL_NV_ray_tracing); symbolTable.setVariableExtensions("gl_ObjectRayDirectionEXT", 1, &E_GL_EXT_ray_tracing); symbolTable.setVariableExtensions("gl_RayTminNV", 1, &E_GL_NV_ray_tracing); symbolTable.setVariableExtensions("gl_RayTminEXT", 1, &E_GL_EXT_ray_tracing); symbolTable.setVariableExtensions("gl_RayTmaxNV", 1, &E_GL_NV_ray_tracing); symbolTable.setVariableExtensions("gl_RayTmaxEXT", 1, &E_GL_EXT_ray_tracing); symbolTable.setVariableExtensions("gl_CullMaskEXT", 1, &E_GL_EXT_ray_cull_mask); symbolTable.setVariableExtensions("gl_HitTNV", 1, &E_GL_NV_ray_tracing); symbolTable.setVariableExtensions("gl_HitTEXT", 1, &E_GL_EXT_ray_tracing); symbolTable.setVariableExtensions("gl_HitKindNV", 1, &E_GL_NV_ray_tracing); symbolTable.setVariableExtensions("gl_HitKindEXT", 1, &E_GL_EXT_ray_tracing); symbolTable.setVariableExtensions("gl_ObjectToWorldNV", 1, &E_GL_NV_ray_tracing); symbolTable.setVariableExtensions("gl_ObjectToWorldEXT", 1, &E_GL_EXT_ray_tracing); symbolTable.setVariableExtensions("gl_ObjectToWorld3x4EXT", 1, &E_GL_EXT_ray_tracing); symbolTable.setVariableExtensions("gl_WorldToObjectNV", 1, &E_GL_NV_ray_tracing); symbolTable.setVariableExtensions("gl_WorldToObjectEXT", 1, &E_GL_EXT_ray_tracing); symbolTable.setVariableExtensions("gl_WorldToObject3x4EXT", 1, &E_GL_EXT_ray_tracing); symbolTable.setVariableExtensions("gl_IncomingRayFlagsNV", 1, &E_GL_NV_ray_tracing); symbolTable.setVariableExtensions("gl_IncomingRayFlagsEXT", 1, &E_GL_EXT_ray_tracing); symbolTable.setVariableExtensions("gl_CurrentRayTimeNV", 1, &E_GL_NV_ray_tracing_motion_blur); symbolTable.setVariableExtensions("gl_HitTriangleVertexPositionsEXT", 1, &E_GL_EXT_ray_tracing_position_fetch); symbolTable.setVariableExtensions("gl_HitMicroTriangleVertexPositionsNV", 1, &E_GL_NV_displacement_micromap); symbolTable.setVariableExtensions("gl_HitMicroTriangleVertexBarycentricsNV", 1, &E_GL_NV_displacement_micromap); symbolTable.setVariableExtensions("gl_ClusterIDNV", 1, &E_GL_NV_cluster_acceleration_structure); symbolTable.setVariableExtensions("gl_HitKindSphereNV", 1, &E_GL_NV_linear_swept_spheres); symbolTable.setVariableExtensions("gl_HitKindLSSNV", 1, &E_GL_NV_linear_swept_spheres); symbolTable.setVariableExtensions("gl_HitSpherePositionNV", 1, &E_GL_NV_linear_swept_spheres); symbolTable.setVariableExtensions("gl_HitSphereRadiusNV", 1, &E_GL_NV_linear_swept_spheres); symbolTable.setVariableExtensions("gl_HitLSSPositionNV", 1, &E_GL_NV_linear_swept_spheres); symbolTable.setVariableExtensions("gl_HitLSSRadiiNV", 1, &E_GL_NV_linear_swept_spheres); symbolTable.setVariableExtensions("gl_DeviceIndex", 1, &E_GL_EXT_device_group); symbolTable.setFunctionExtensions("traceNV", 1, &E_GL_NV_ray_tracing); symbolTable.setFunctionExtensions("traceRayMotionNV", 1, &E_GL_NV_ray_tracing_motion_blur); symbolTable.setFunctionExtensions("traceRayEXT", 1, &E_GL_EXT_ray_tracing); symbolTable.setFunctionExtensions("reportIntersectionNV", 1, &E_GL_NV_ray_tracing); symbolTable.setFunctionExtensions("reportIntersectionEXT", 1, &E_GL_EXT_ray_tracing); symbolTable.setFunctionExtensions("ignoreIntersectionNV", 1, &E_GL_NV_ray_tracing); symbolTable.setFunctionExtensions("terminateRayNV", 1, &E_GL_NV_ray_tracing); symbolTable.setFunctionExtensions("executeCallableNV", 1, &E_GL_NV_ray_tracing); symbolTable.setFunctionExtensions("executeCallableEXT", 1, &E_GL_EXT_ray_tracing); symbolTable.setFunctionExtensions("hitObjectTraceRayNV", 1, &E_GL_NV_shader_invocation_reorder); symbolTable.setFunctionExtensions("hitObjectTraceRayMotionNV", 1, &E_GL_NV_shader_invocation_reorder); symbolTable.setFunctionExtensions("hitObjectRecordHitNV", 1, &E_GL_NV_shader_invocation_reorder); symbolTable.setFunctionExtensions("hitObjectRecordHitMotionNV", 1, &E_GL_NV_shader_invocation_reorder); symbolTable.setFunctionExtensions("hitObjectRecordHitWithIndexNV", 1, &E_GL_NV_shader_invocation_reorder); symbolTable.setFunctionExtensions("hitObjectRecordHitWithIndexMotionNV", 1, &E_GL_NV_shader_invocation_reorder); symbolTable.setFunctionExtensions("hitObjectRecordMissNV", 1, &E_GL_NV_shader_invocation_reorder); symbolTable.setFunctionExtensions("hitObjectRecordMissMotionNV", 1, &E_GL_NV_shader_invocation_reorder); symbolTable.setFunctionExtensions("hitObjectRecordEmptyNV", 1, &E_GL_NV_shader_invocation_reorder); symbolTable.setFunctionExtensions("hitObjectExecuteShaderNV", 1, &E_GL_NV_shader_invocation_reorder); symbolTable.setFunctionExtensions("hitObjectIsEmptyNV", 1, &E_GL_NV_shader_invocation_reorder); symbolTable.setFunctionExtensions("hitObjectIsMissNV", 1, &E_GL_NV_shader_invocation_reorder); symbolTable.setFunctionExtensions("hitObjectIsHitNV", 1, &E_GL_NV_shader_invocation_reorder); symbolTable.setFunctionExtensions("hitObjectGetRayTMinNV", 1, &E_GL_NV_shader_invocation_reorder); symbolTable.setFunctionExtensions("hitObjectGetRayTMaxNV", 1, &E_GL_NV_shader_invocation_reorder); symbolTable.setFunctionExtensions("hitObjectGetObjectRayOriginNV", 1, &E_GL_NV_shader_invocation_reorder); symbolTable.setFunctionExtensions("hitObjectGetObjectRayDirectionNV", 1, &E_GL_NV_shader_invocation_reorder); symbolTable.setFunctionExtensions("hitObjectGetWorldRayOriginNV", 1, &E_GL_NV_shader_invocation_reorder); symbolTable.setFunctionExtensions("hitObjectGetWorldRayDirectionNV", 1, &E_GL_NV_shader_invocation_reorder); symbolTable.setFunctionExtensions("hitObjectGetWorldToObjectNV", 1, &E_GL_NV_shader_invocation_reorder); symbolTable.setFunctionExtensions("hitObjectGetbjectToWorldNV", 1, &E_GL_NV_shader_invocation_reorder); symbolTable.setFunctionExtensions("hitObjectGetInstanceCustomIndexNV", 1, &E_GL_NV_shader_invocation_reorder); symbolTable.setFunctionExtensions("hitObjectGetInstanceIdNV", 1, &E_GL_NV_shader_invocation_reorder); symbolTable.setFunctionExtensions("hitObjectGetGeometryIndexNV", 1, &E_GL_NV_shader_invocation_reorder); symbolTable.setFunctionExtensions("hitObjectGetPrimitiveIndexNV", 1, &E_GL_NV_shader_invocation_reorder); symbolTable.setFunctionExtensions("hitObjectGetHitKindNV", 1, &E_GL_NV_shader_invocation_reorder); symbolTable.setFunctionExtensions("hitObjectGetAttributesNV", 1, &E_GL_NV_shader_invocation_reorder); symbolTable.setFunctionExtensions("hitObjectGetCurrentTimeNV", 1, &E_GL_NV_shader_invocation_reorder); symbolTable.setFunctionExtensions("hitObjectGetShaderBindingTableRecordIndexNV", 1, &E_GL_NV_shader_invocation_reorder); symbolTable.setFunctionExtensions("hitObjectGetShaderRecordBufferHandleNV", 1, &E_GL_NV_shader_invocation_reorder); symbolTable.setFunctionExtensions("hitObjectGetClusterIdNV", 1, &E_GL_NV_cluster_acceleration_structure); symbolTable.setFunctionExtensions("reorderThreadNV", 1, &E_GL_NV_shader_invocation_reorder); symbolTable.setFunctionExtensions("fetchMicroTriangleVertexPositionNV", 1, &E_GL_NV_displacement_micromap); symbolTable.setFunctionExtensions("fetchMicroTriangleVertexBarycentricNV", 1, &E_GL_NV_displacement_micromap); symbolTable.setFunctionExtensions("hitObjectGetSpherePositionNV", 1, &E_GL_NV_linear_swept_spheres); symbolTable.setFunctionExtensions("hitObjectGetSphereRadiusNV", 1, &E_GL_NV_linear_swept_spheres); symbolTable.setFunctionExtensions("hitObjectGetLSSPositionsNV", 1, &E_GL_NV_linear_swept_spheres); symbolTable.setFunctionExtensions("hitObjectGetLSSRadiiNV", 1, &E_GL_NV_linear_swept_spheres); symbolTable.setFunctionExtensions("hitObjectIsSphereHitNV", 1, &E_GL_NV_linear_swept_spheres); symbolTable.setFunctionExtensions("hitObjectIsLSSHitNV", 1, &E_GL_NV_linear_swept_spheres); BuiltInVariable("gl_LaunchIDNV", EbvLaunchId, symbolTable); BuiltInVariable("gl_LaunchIDEXT", EbvLaunchId, symbolTable); BuiltInVariable("gl_LaunchSizeNV", EbvLaunchSize, symbolTable); BuiltInVariable("gl_LaunchSizeEXT", EbvLaunchSize, symbolTable); BuiltInVariable("gl_PrimitiveID", EbvPrimitiveId, symbolTable); BuiltInVariable("gl_InstanceID", EbvInstanceId, symbolTable); BuiltInVariable("gl_InstanceCustomIndexNV", EbvInstanceCustomIndex,symbolTable); BuiltInVariable("gl_InstanceCustomIndexEXT", EbvInstanceCustomIndex,symbolTable); BuiltInVariable("gl_GeometryIndexEXT", EbvGeometryIndex, symbolTable); BuiltInVariable("gl_WorldRayOriginNV", EbvWorldRayOrigin, symbolTable); BuiltInVariable("gl_WorldRayOriginEXT", EbvWorldRayOrigin, symbolTable); BuiltInVariable("gl_WorldRayDirectionNV", EbvWorldRayDirection, symbolTable); BuiltInVariable("gl_WorldRayDirectionEXT", EbvWorldRayDirection, symbolTable); BuiltInVariable("gl_ObjectRayOriginNV", EbvObjectRayOrigin, symbolTable); BuiltInVariable("gl_ObjectRayOriginEXT", EbvObjectRayOrigin, symbolTable); BuiltInVariable("gl_ObjectRayDirectionNV", EbvObjectRayDirection, symbolTable); BuiltInVariable("gl_ObjectRayDirectionEXT", EbvObjectRayDirection, symbolTable); BuiltInVariable("gl_RayTminNV", EbvRayTmin, symbolTable); BuiltInVariable("gl_RayTminEXT", EbvRayTmin, symbolTable); BuiltInVariable("gl_RayTmaxNV", EbvRayTmax, symbolTable); BuiltInVariable("gl_RayTmaxEXT", EbvRayTmax, symbolTable); BuiltInVariable("gl_CullMaskEXT", EbvCullMask, symbolTable); BuiltInVariable("gl_HitKindNV", EbvHitKind, symbolTable); BuiltInVariable("gl_HitKindEXT", EbvHitKind, symbolTable); BuiltInVariable("gl_ObjectToWorldNV", EbvObjectToWorld, symbolTable); BuiltInVariable("gl_ObjectToWorldEXT", EbvObjectToWorld, symbolTable); BuiltInVariable("gl_ObjectToWorld3x4EXT", EbvObjectToWorld3x4, symbolTable); BuiltInVariable("gl_WorldToObjectNV", EbvWorldToObject, symbolTable); BuiltInVariable("gl_WorldToObjectEXT", EbvWorldToObject, symbolTable); BuiltInVariable("gl_WorldToObject3x4EXT", EbvWorldToObject3x4, symbolTable); BuiltInVariable("gl_IncomingRayFlagsNV", EbvIncomingRayFlags, symbolTable); BuiltInVariable("gl_IncomingRayFlagsEXT", EbvIncomingRayFlags, symbolTable); BuiltInVariable("gl_DeviceIndex", EbvDeviceIndex, symbolTable); BuiltInVariable("gl_CurrentRayTimeNV", EbvCurrentRayTimeNV, symbolTable); BuiltInVariable("gl_HitTriangleVertexPositionsEXT", EbvPositionFetch, symbolTable); BuiltInVariable("gl_HitMicroTriangleVertexPositionsNV", EbvMicroTrianglePositionNV, symbolTable); BuiltInVariable("gl_HitMicroTriangleVertexBarycentricsNV", EbvMicroTriangleBaryNV, symbolTable); BuiltInVariable("gl_HitKindFrontFacingMicroTriangleNV", EbvHitKindFrontFacingMicroTriangleNV, symbolTable); BuiltInVariable("gl_HitKindBackFacingMicroTriangleNV", EbvHitKindBackFacingMicroTriangleNV, symbolTable); BuiltInVariable("gl_ClusterIDNV", EbvClusterIDNV, symbolTable); BuiltInVariable("gl_HitIsSphereNV", EbvHitIsSphereNV, symbolTable); BuiltInVariable("gl_HitIsLSSNV", EbvHitIsLSSNV, symbolTable); BuiltInVariable("gl_HitSpherePositionNV", EbvHitSpherePositionNV, symbolTable); BuiltInVariable("gl_HitSphereRadiusNV", EbvHitSphereRadiusNV, symbolTable); BuiltInVariable("gl_HitLSSPositionsNV", EbvHitLSSPositionsNV, symbolTable); BuiltInVariable("gl_HitLSSRadiiNV", EbvHitLSSRadiiNV, symbolTable); // gl_HitT variables are aliases of their gl_RayTmax counterparts. RetargetVariable("gl_HitTNV", "gl_RayTmaxNV", symbolTable); RetargetVariable("gl_HitTEXT", "gl_RayTmaxEXT", symbolTable); // GL_ARB_shader_ballot symbolTable.setVariableExtensions("gl_SubGroupSizeARB", 1, &E_GL_ARB_shader_ballot); symbolTable.setVariableExtensions("gl_SubGroupInvocationARB", 1, &E_GL_ARB_shader_ballot); symbolTable.setVariableExtensions("gl_SubGroupEqMaskARB", 1, &E_GL_ARB_shader_ballot); symbolTable.setVariableExtensions("gl_SubGroupGeMaskARB", 1, &E_GL_ARB_shader_ballot); symbolTable.setVariableExtensions("gl_SubGroupGtMaskARB", 1, &E_GL_ARB_shader_ballot); symbolTable.setVariableExtensions("gl_SubGroupLeMaskARB", 1, &E_GL_ARB_shader_ballot); symbolTable.setVariableExtensions("gl_SubGroupLtMaskARB", 1, &E_GL_ARB_shader_ballot); BuiltInVariable("gl_SubGroupInvocationARB", EbvSubGroupInvocation, symbolTable); BuiltInVariable("gl_SubGroupEqMaskARB", EbvSubGroupEqMask, symbolTable); BuiltInVariable("gl_SubGroupGeMaskARB", EbvSubGroupGeMask, symbolTable); BuiltInVariable("gl_SubGroupGtMaskARB", EbvSubGroupGtMask, symbolTable); BuiltInVariable("gl_SubGroupLeMaskARB", EbvSubGroupLeMask, symbolTable); BuiltInVariable("gl_SubGroupLtMaskARB", EbvSubGroupLtMask, symbolTable); if (spvVersion.vulkan > 0) { // Treat "gl_SubGroupSizeARB" as shader input instead of uniform for Vulkan SpecialQualifier("gl_SubGroupSizeARB", EvqVaryingIn, EbvSubGroupSize, symbolTable); if (language == EShLangFragment) ModifyFlatDecoration("gl_SubGroupSizeARB", true, symbolTable); } else BuiltInVariable("gl_SubGroupSizeARB", EbvSubGroupSize, symbolTable); // GL_KHR_shader_subgroup symbolTable.setVariableExtensions("gl_NumSubgroups", 1, &E_GL_KHR_shader_subgroup_basic); symbolTable.setVariableExtensions("gl_SubgroupID", 1, &E_GL_KHR_shader_subgroup_basic); symbolTable.setVariableExtensions("gl_SubgroupSize", 1, &E_GL_KHR_shader_subgroup_basic); symbolTable.setVariableExtensions("gl_SubgroupInvocationID", 1, &E_GL_KHR_shader_subgroup_basic); symbolTable.setVariableExtensions("gl_SubgroupEqMask", 1, &E_GL_KHR_shader_subgroup_ballot); symbolTable.setVariableExtensions("gl_SubgroupGeMask", 1, &E_GL_KHR_shader_subgroup_ballot); symbolTable.setVariableExtensions("gl_SubgroupGtMask", 1, &E_GL_KHR_shader_subgroup_ballot); symbolTable.setVariableExtensions("gl_SubgroupLeMask", 1, &E_GL_KHR_shader_subgroup_ballot); symbolTable.setVariableExtensions("gl_SubgroupLtMask", 1, &E_GL_KHR_shader_subgroup_ballot); BuiltInVariable("gl_NumSubgroups", EbvNumSubgroups, symbolTable); BuiltInVariable("gl_SubgroupID", EbvSubgroupID, symbolTable); BuiltInVariable("gl_SubgroupSize", EbvSubgroupSize2, symbolTable); BuiltInVariable("gl_SubgroupInvocationID", EbvSubgroupInvocation2, symbolTable); BuiltInVariable("gl_SubgroupEqMask", EbvSubgroupEqMask2, symbolTable); BuiltInVariable("gl_SubgroupGeMask", EbvSubgroupGeMask2, symbolTable); BuiltInVariable("gl_SubgroupGtMask", EbvSubgroupGtMask2, symbolTable); BuiltInVariable("gl_SubgroupLeMask", EbvSubgroupLeMask2, symbolTable); BuiltInVariable("gl_SubgroupLtMask", EbvSubgroupLtMask2, symbolTable); // GL_NV_shader_sm_builtins symbolTable.setVariableExtensions("gl_WarpsPerSMNV", 1, &E_GL_NV_shader_sm_builtins); symbolTable.setVariableExtensions("gl_SMCountNV", 1, &E_GL_NV_shader_sm_builtins); symbolTable.setVariableExtensions("gl_WarpIDNV", 1, &E_GL_NV_shader_sm_builtins); symbolTable.setVariableExtensions("gl_SMIDNV", 1, &E_GL_NV_shader_sm_builtins); BuiltInVariable("gl_WarpsPerSMNV", EbvWarpsPerSM, symbolTable); BuiltInVariable("gl_SMCountNV", EbvSMCount, symbolTable); BuiltInVariable("gl_WarpIDNV", EbvWarpID, symbolTable); BuiltInVariable("gl_SMIDNV", EbvSMID, symbolTable); // GL_ARM_shader_core_builtins symbolTable.setVariableExtensions("gl_CoreCountARM", 1, &E_GL_ARM_shader_core_builtins); symbolTable.setVariableExtensions("gl_CoreIDARM", 1, &E_GL_ARM_shader_core_builtins); symbolTable.setVariableExtensions("gl_CoreMaxIDARM", 1, &E_GL_ARM_shader_core_builtins); symbolTable.setVariableExtensions("gl_WarpIDARM", 1, &E_GL_ARM_shader_core_builtins); symbolTable.setVariableExtensions("gl_WarpMaxIDARM", 1, &E_GL_ARM_shader_core_builtins); BuiltInVariable("gl_CoreCountARM", EbvCoreCountARM, symbolTable); BuiltInVariable("gl_CoreIDARM", EbvCoreIDARM, symbolTable); BuiltInVariable("gl_CoreMaxIDARM", EbvCoreMaxIDARM, symbolTable); BuiltInVariable("gl_WarpIDARM", EbvWarpIDARM, symbolTable); BuiltInVariable("gl_WarpMaxIDARM", EbvWarpMaxIDARM, symbolTable); } if ((profile == EEsProfile && version >= 310) || (profile != EEsProfile && version >= 450)) { symbolTable.setVariableExtensions("gl_ShadingRateFlag2VerticalPixelsEXT", 1, &E_GL_EXT_fragment_shading_rate); symbolTable.setVariableExtensions("gl_ShadingRateFlag4VerticalPixelsEXT", 1, &E_GL_EXT_fragment_shading_rate); symbolTable.setVariableExtensions("gl_ShadingRateFlag2HorizontalPixelsEXT", 1, &E_GL_EXT_fragment_shading_rate); symbolTable.setVariableExtensions("gl_ShadingRateFlag4HorizontalPixelsEXT", 1, &E_GL_EXT_fragment_shading_rate); } break; case EShLangMesh: if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 320)) { // per-vertex builtins symbolTable.setVariableExtensions("gl_MeshVerticesNV", "gl_Position", 1, &E_GL_NV_mesh_shader); symbolTable.setVariableExtensions("gl_MeshVerticesNV", "gl_PointSize", 1, &E_GL_NV_mesh_shader); symbolTable.setVariableExtensions("gl_MeshVerticesNV", "gl_ClipDistance", 1, &E_GL_NV_mesh_shader); symbolTable.setVariableExtensions("gl_MeshVerticesNV", "gl_CullDistance", 1, &E_GL_NV_mesh_shader); BuiltInVariable("gl_MeshVerticesNV", "gl_Position", EbvPosition, symbolTable); BuiltInVariable("gl_MeshVerticesNV", "gl_PointSize", EbvPointSize, symbolTable); BuiltInVariable("gl_MeshVerticesNV", "gl_ClipDistance", EbvClipDistance, symbolTable); BuiltInVariable("gl_MeshVerticesNV", "gl_CullDistance", EbvCullDistance, symbolTable); symbolTable.setVariableExtensions("gl_MeshVerticesNV", "gl_PositionPerViewNV", 1, &E_GL_NV_mesh_shader); symbolTable.setVariableExtensions("gl_MeshVerticesNV", "gl_ClipDistancePerViewNV", 1, &E_GL_NV_mesh_shader); symbolTable.setVariableExtensions("gl_MeshVerticesNV", "gl_CullDistancePerViewNV", 1, &E_GL_NV_mesh_shader); BuiltInVariable("gl_MeshVerticesNV", "gl_PositionPerViewNV", EbvPositionPerViewNV, symbolTable); BuiltInVariable("gl_MeshVerticesNV", "gl_ClipDistancePerViewNV", EbvClipDistancePerViewNV, symbolTable); BuiltInVariable("gl_MeshVerticesNV", "gl_CullDistancePerViewNV", EbvCullDistancePerViewNV, symbolTable); // per-primitive builtins symbolTable.setVariableExtensions("gl_MeshPrimitivesNV", "gl_PrimitiveID", 1, &E_GL_NV_mesh_shader); symbolTable.setVariableExtensions("gl_MeshPrimitivesNV", "gl_Layer", 1, &E_GL_NV_mesh_shader); symbolTable.setVariableExtensions("gl_MeshPrimitivesNV", "gl_ViewportIndex", 1, &E_GL_NV_mesh_shader); symbolTable.setVariableExtensions("gl_MeshPrimitivesNV", "gl_ViewportMask", 1, &E_GL_NV_mesh_shader); BuiltInVariable("gl_MeshPrimitivesNV", "gl_PrimitiveID", EbvPrimitiveId, symbolTable); BuiltInVariable("gl_MeshPrimitivesNV", "gl_Layer", EbvLayer, symbolTable); BuiltInVariable("gl_MeshPrimitivesNV", "gl_ViewportIndex", EbvViewportIndex, symbolTable); BuiltInVariable("gl_MeshPrimitivesNV", "gl_ViewportMask", EbvViewportMaskNV, symbolTable); // per-view per-primitive builtins symbolTable.setVariableExtensions("gl_MeshPrimitivesNV", "gl_LayerPerViewNV", 1, &E_GL_NV_mesh_shader); symbolTable.setVariableExtensions("gl_MeshPrimitivesNV", "gl_ViewportMaskPerViewNV", 1, &E_GL_NV_mesh_shader); BuiltInVariable("gl_MeshPrimitivesNV", "gl_LayerPerViewNV", EbvLayerPerViewNV, symbolTable); BuiltInVariable("gl_MeshPrimitivesNV", "gl_ViewportMaskPerViewNV", EbvViewportMaskPerViewNV, symbolTable); // other builtins symbolTable.setVariableExtensions("gl_PrimitiveCountNV", 1, &E_GL_NV_mesh_shader); symbolTable.setVariableExtensions("gl_PrimitiveIndicesNV", 1, &E_GL_NV_mesh_shader); symbolTable.setVariableExtensions("gl_MeshViewCountNV", 1, &E_GL_NV_mesh_shader); symbolTable.setVariableExtensions("gl_MeshViewIndicesNV", 1, &E_GL_NV_mesh_shader); if (profile != EEsProfile) { symbolTable.setVariableExtensions("gl_WorkGroupSize", Num_AEP_mesh_shader, AEP_mesh_shader); symbolTable.setVariableExtensions("gl_WorkGroupID", Num_AEP_mesh_shader, AEP_mesh_shader); symbolTable.setVariableExtensions("gl_LocalInvocationID", Num_AEP_mesh_shader, AEP_mesh_shader); symbolTable.setVariableExtensions("gl_GlobalInvocationID", Num_AEP_mesh_shader, AEP_mesh_shader); symbolTable.setVariableExtensions("gl_LocalInvocationIndex", Num_AEP_mesh_shader, AEP_mesh_shader); } else { symbolTable.setVariableExtensions("gl_WorkGroupSize", 1, &E_GL_NV_mesh_shader); symbolTable.setVariableExtensions("gl_WorkGroupID", 1, &E_GL_NV_mesh_shader); symbolTable.setVariableExtensions("gl_LocalInvocationID", 1, &E_GL_NV_mesh_shader); symbolTable.setVariableExtensions("gl_GlobalInvocationID", 1, &E_GL_NV_mesh_shader); symbolTable.setVariableExtensions("gl_LocalInvocationIndex", 1, &E_GL_NV_mesh_shader); } BuiltInVariable("gl_PrimitiveCountNV", EbvPrimitiveCountNV, symbolTable); BuiltInVariable("gl_PrimitiveIndicesNV", EbvPrimitiveIndicesNV, symbolTable); BuiltInVariable("gl_MeshViewCountNV", EbvMeshViewCountNV, symbolTable); BuiltInVariable("gl_MeshViewIndicesNV", EbvMeshViewIndicesNV, symbolTable); BuiltInVariable("gl_WorkGroupSize", EbvWorkGroupSize, symbolTable); BuiltInVariable("gl_WorkGroupID", EbvWorkGroupId, symbolTable); BuiltInVariable("gl_LocalInvocationID", EbvLocalInvocationId, symbolTable); BuiltInVariable("gl_GlobalInvocationID", EbvGlobalInvocationId, symbolTable); BuiltInVariable("gl_LocalInvocationIndex", EbvLocalInvocationIndex, symbolTable); // builtin constants symbolTable.setVariableExtensions("gl_MaxMeshOutputVerticesNV", 1, &E_GL_NV_mesh_shader); symbolTable.setVariableExtensions("gl_MaxMeshOutputPrimitivesNV", 1, &E_GL_NV_mesh_shader); symbolTable.setVariableExtensions("gl_MaxMeshWorkGroupSizeNV", 1, &E_GL_NV_mesh_shader); symbolTable.setVariableExtensions("gl_MaxMeshViewCountNV", 1, &E_GL_NV_mesh_shader); // builtin functions if (profile != EEsProfile) { symbolTable.setFunctionExtensions("barrier", Num_AEP_mesh_shader, AEP_mesh_shader); symbolTable.setFunctionExtensions("memoryBarrierShared", Num_AEP_mesh_shader, AEP_mesh_shader); symbolTable.setFunctionExtensions("groupMemoryBarrier", Num_AEP_mesh_shader, AEP_mesh_shader); } else { symbolTable.setFunctionExtensions("barrier", 1, &E_GL_NV_mesh_shader); symbolTable.setFunctionExtensions("memoryBarrierShared", 1, &E_GL_NV_mesh_shader); symbolTable.setFunctionExtensions("groupMemoryBarrier", 1, &E_GL_NV_mesh_shader); } symbolTable.setFunctionExtensions("writePackedPrimitiveIndices4x8NV", 1, &E_GL_NV_mesh_shader); } if (profile != EEsProfile && version >= 450) { // GL_EXT_Mesh_shader symbolTable.setVariableExtensions("gl_PrimitivePointIndicesEXT", 1, &E_GL_EXT_mesh_shader); symbolTable.setVariableExtensions("gl_PrimitiveLineIndicesEXT", 1, &E_GL_EXT_mesh_shader); symbolTable.setVariableExtensions("gl_PrimitiveTriangleIndicesEXT", 1, &E_GL_EXT_mesh_shader); symbolTable.setVariableExtensions("gl_NumWorkGroups", 1, &E_GL_EXT_mesh_shader); BuiltInVariable("gl_PrimitivePointIndicesEXT", EbvPrimitivePointIndicesEXT, symbolTable); BuiltInVariable("gl_PrimitiveLineIndicesEXT", EbvPrimitiveLineIndicesEXT, symbolTable); BuiltInVariable("gl_PrimitiveTriangleIndicesEXT", EbvPrimitiveTriangleIndicesEXT, symbolTable); BuiltInVariable("gl_NumWorkGroups", EbvNumWorkGroups, symbolTable); symbolTable.setVariableExtensions("gl_MeshVerticesEXT", "gl_Position", 1, &E_GL_EXT_mesh_shader); symbolTable.setVariableExtensions("gl_MeshVerticesEXT", "gl_PointSize", 1, &E_GL_EXT_mesh_shader); symbolTable.setVariableExtensions("gl_MeshVerticesEXT", "gl_ClipDistance", 1, &E_GL_EXT_mesh_shader); symbolTable.setVariableExtensions("gl_MeshVerticesEXT", "gl_CullDistance", 1, &E_GL_EXT_mesh_shader); BuiltInVariable("gl_MeshVerticesEXT", "gl_Position", EbvPosition, symbolTable); BuiltInVariable("gl_MeshVerticesEXT", "gl_PointSize", EbvPointSize, symbolTable); BuiltInVariable("gl_MeshVerticesEXT", "gl_ClipDistance", EbvClipDistance, symbolTable); BuiltInVariable("gl_MeshVerticesEXT", "gl_CullDistance", EbvCullDistance, symbolTable); symbolTable.setVariableExtensions("gl_MeshPrimitivesEXT", "gl_PrimitiveID", 1, &E_GL_EXT_mesh_shader); symbolTable.setVariableExtensions("gl_MeshPrimitivesEXT", "gl_Layer", 1, &E_GL_EXT_mesh_shader); symbolTable.setVariableExtensions("gl_MeshPrimitivesEXT", "gl_ViewportIndex", 1, &E_GL_EXT_mesh_shader); symbolTable.setVariableExtensions("gl_MeshPrimitivesEXT", "gl_CullPrimitiveEXT", 1, &E_GL_EXT_mesh_shader); // note: technically this member requires both GL_EXT_mesh_shader and GL_EXT_fragment_shading_rate // since setVariableExtensions only needs *one of* the extensions to validate, it's more useful to specify EXT_fragment_shading_rate // GL_EXT_mesh_shader will be required in practice by use of other fields of gl_MeshPrimitivesEXT symbolTable.setVariableExtensions("gl_MeshPrimitivesEXT", "gl_PrimitiveShadingRateEXT", 1, &E_GL_EXT_fragment_shading_rate); BuiltInVariable("gl_MeshPrimitivesEXT", "gl_PrimitiveID", EbvPrimitiveId, symbolTable); BuiltInVariable("gl_MeshPrimitivesEXT", "gl_Layer", EbvLayer, symbolTable); BuiltInVariable("gl_MeshPrimitivesEXT", "gl_ViewportIndex", EbvViewportIndex, symbolTable); BuiltInVariable("gl_MeshPrimitivesEXT", "gl_CullPrimitiveEXT", EbvCullPrimitiveEXT, symbolTable); BuiltInVariable("gl_MeshPrimitivesEXT", "gl_PrimitiveShadingRateEXT", EbvPrimitiveShadingRateKHR, symbolTable); symbolTable.setFunctionExtensions("SetMeshOutputsEXT", 1, &E_GL_EXT_mesh_shader); // GL_EXT_device_group symbolTable.setVariableExtensions("gl_DeviceIndex", 1, &E_GL_EXT_device_group); BuiltInVariable("gl_DeviceIndex", EbvDeviceIndex, symbolTable); // GL_ARB_shader_draw_parameters symbolTable.setVariableExtensions("gl_DrawIDARB", 1, &E_GL_ARB_shader_draw_parameters); BuiltInVariable("gl_DrawIDARB", EbvDrawId, symbolTable); if (version >= 460) { BuiltInVariable("gl_DrawID", EbvDrawId, symbolTable); } // GL_EXT_multiview BuiltInVariable("gl_ViewIndex", EbvViewIndex, symbolTable); symbolTable.setVariableExtensions("gl_ViewIndex", 1, &E_GL_EXT_multiview); // GL_ARB_shader_ballot symbolTable.setVariableExtensions("gl_SubGroupSizeARB", 1, &E_GL_ARB_shader_ballot); symbolTable.setVariableExtensions("gl_SubGroupInvocationARB", 1, &E_GL_ARB_shader_ballot); symbolTable.setVariableExtensions("gl_SubGroupEqMaskARB", 1, &E_GL_ARB_shader_ballot); symbolTable.setVariableExtensions("gl_SubGroupGeMaskARB", 1, &E_GL_ARB_shader_ballot); symbolTable.setVariableExtensions("gl_SubGroupGtMaskARB", 1, &E_GL_ARB_shader_ballot); symbolTable.setVariableExtensions("gl_SubGroupLeMaskARB", 1, &E_GL_ARB_shader_ballot); symbolTable.setVariableExtensions("gl_SubGroupLtMaskARB", 1, &E_GL_ARB_shader_ballot); BuiltInVariable("gl_SubGroupInvocationARB", EbvSubGroupInvocation, symbolTable); BuiltInVariable("gl_SubGroupEqMaskARB", EbvSubGroupEqMask, symbolTable); BuiltInVariable("gl_SubGroupGeMaskARB", EbvSubGroupGeMask, symbolTable); BuiltInVariable("gl_SubGroupGtMaskARB", EbvSubGroupGtMask, symbolTable); BuiltInVariable("gl_SubGroupLeMaskARB", EbvSubGroupLeMask, symbolTable); BuiltInVariable("gl_SubGroupLtMaskARB", EbvSubGroupLtMask, symbolTable); if (spvVersion.vulkan > 0) { // Treat "gl_SubGroupSizeARB" as shader input instead of uniform for Vulkan SpecialQualifier("gl_SubGroupSizeARB", EvqVaryingIn, EbvSubGroupSize, symbolTable); if (language == EShLangFragment) ModifyFlatDecoration("gl_SubGroupSizeARB", true, symbolTable); } else BuiltInVariable("gl_SubGroupSizeARB", EbvSubGroupSize, symbolTable); } // GL_KHR_shader_subgroup if ((profile == EEsProfile && version >= 310) || (profile != EEsProfile && version >= 140)) { symbolTable.setVariableExtensions("gl_NumSubgroups", 1, &E_GL_KHR_shader_subgroup_basic); symbolTable.setVariableExtensions("gl_SubgroupID", 1, &E_GL_KHR_shader_subgroup_basic); symbolTable.setVariableExtensions("gl_SubgroupSize", 1, &E_GL_KHR_shader_subgroup_basic); symbolTable.setVariableExtensions("gl_SubgroupInvocationID", 1, &E_GL_KHR_shader_subgroup_basic); symbolTable.setVariableExtensions("gl_SubgroupEqMask", 1, &E_GL_KHR_shader_subgroup_ballot); symbolTable.setVariableExtensions("gl_SubgroupGeMask", 1, &E_GL_KHR_shader_subgroup_ballot); symbolTable.setVariableExtensions("gl_SubgroupGtMask", 1, &E_GL_KHR_shader_subgroup_ballot); symbolTable.setVariableExtensions("gl_SubgroupLeMask", 1, &E_GL_KHR_shader_subgroup_ballot); symbolTable.setVariableExtensions("gl_SubgroupLtMask", 1, &E_GL_KHR_shader_subgroup_ballot); BuiltInVariable("gl_NumSubgroups", EbvNumSubgroups, symbolTable); BuiltInVariable("gl_SubgroupID", EbvSubgroupID, symbolTable); BuiltInVariable("gl_SubgroupSize", EbvSubgroupSize2, symbolTable); BuiltInVariable("gl_SubgroupInvocationID", EbvSubgroupInvocation2, symbolTable); BuiltInVariable("gl_SubgroupEqMask", EbvSubgroupEqMask2, symbolTable); BuiltInVariable("gl_SubgroupGeMask", EbvSubgroupGeMask2, symbolTable); BuiltInVariable("gl_SubgroupGtMask", EbvSubgroupGtMask2, symbolTable); BuiltInVariable("gl_SubgroupLeMask", EbvSubgroupLeMask2, symbolTable); BuiltInVariable("gl_SubgroupLtMask", EbvSubgroupLtMask2, symbolTable); symbolTable.setFunctionExtensions("subgroupMemoryBarrierShared", 1, &E_GL_KHR_shader_subgroup_basic); // GL_NV_shader_sm_builtins symbolTable.setVariableExtensions("gl_WarpsPerSMNV", 1, &E_GL_NV_shader_sm_builtins); symbolTable.setVariableExtensions("gl_SMCountNV", 1, &E_GL_NV_shader_sm_builtins); symbolTable.setVariableExtensions("gl_WarpIDNV", 1, &E_GL_NV_shader_sm_builtins); symbolTable.setVariableExtensions("gl_SMIDNV", 1, &E_GL_NV_shader_sm_builtins); BuiltInVariable("gl_WarpsPerSMNV", EbvWarpsPerSM, symbolTable); BuiltInVariable("gl_SMCountNV", EbvSMCount, symbolTable); BuiltInVariable("gl_WarpIDNV", EbvWarpID, symbolTable); BuiltInVariable("gl_SMIDNV", EbvSMID, symbolTable); // GL_ARM_shader_core_builtins symbolTable.setVariableExtensions("gl_CoreCountARM", 1, &E_GL_ARM_shader_core_builtins); symbolTable.setVariableExtensions("gl_CoreIDARM", 1, &E_GL_ARM_shader_core_builtins); symbolTable.setVariableExtensions("gl_CoreMaxIDARM", 1, &E_GL_ARM_shader_core_builtins); symbolTable.setVariableExtensions("gl_WarpIDARM", 1, &E_GL_ARM_shader_core_builtins); symbolTable.setVariableExtensions("gl_WarpMaxIDARM", 1, &E_GL_ARM_shader_core_builtins); BuiltInVariable("gl_CoreCountARM", EbvCoreCountARM, symbolTable); BuiltInVariable("gl_CoreIDARM", EbvCoreIDARM, symbolTable); BuiltInVariable("gl_CoreMaxIDARM", EbvCoreMaxIDARM, symbolTable); BuiltInVariable("gl_WarpIDARM", EbvWarpIDARM, symbolTable); BuiltInVariable("gl_WarpMaxIDARM", EbvWarpMaxIDARM, symbolTable); } if ((profile == EEsProfile && version >= 310) || (profile != EEsProfile && version >= 450)) { symbolTable.setVariableExtensions("gl_ShadingRateFlag2VerticalPixelsEXT", 1, &E_GL_EXT_fragment_shading_rate); symbolTable.setVariableExtensions("gl_ShadingRateFlag4VerticalPixelsEXT", 1, &E_GL_EXT_fragment_shading_rate); symbolTable.setVariableExtensions("gl_ShadingRateFlag2HorizontalPixelsEXT", 1, &E_GL_EXT_fragment_shading_rate); symbolTable.setVariableExtensions("gl_ShadingRateFlag4HorizontalPixelsEXT", 1, &E_GL_EXT_fragment_shading_rate); } // Builtins for GL_NV_displacment_micromap if ((profile != EEsProfile && version >= 460)) { symbolTable.setFunctionExtensions("fetchMicroTriangleVertexPositionNV", 1, &E_GL_NV_displacement_micromap); symbolTable.setFunctionExtensions("fetchMicroTriangleVertexBarycentricNV", 1, &E_GL_NV_displacement_micromap); } break; case EShLangTask: if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 320)) { symbolTable.setVariableExtensions("gl_TaskCountNV", 1, &E_GL_NV_mesh_shader); symbolTable.setVariableExtensions("gl_MeshViewCountNV", 1, &E_GL_NV_mesh_shader); symbolTable.setVariableExtensions("gl_MeshViewIndicesNV", 1, &E_GL_NV_mesh_shader); if (profile != EEsProfile) { symbolTable.setVariableExtensions("gl_WorkGroupSize", Num_AEP_mesh_shader, AEP_mesh_shader); symbolTable.setVariableExtensions("gl_WorkGroupID", Num_AEP_mesh_shader, AEP_mesh_shader); symbolTable.setVariableExtensions("gl_LocalInvocationID", Num_AEP_mesh_shader, AEP_mesh_shader); symbolTable.setVariableExtensions("gl_GlobalInvocationID", Num_AEP_mesh_shader, AEP_mesh_shader); symbolTable.setVariableExtensions("gl_LocalInvocationIndex", Num_AEP_mesh_shader, AEP_mesh_shader); } else { symbolTable.setVariableExtensions("gl_WorkGroupSize", 1, &E_GL_NV_mesh_shader); symbolTable.setVariableExtensions("gl_WorkGroupID", 1, &E_GL_NV_mesh_shader); symbolTable.setVariableExtensions("gl_LocalInvocationID", 1, &E_GL_NV_mesh_shader); symbolTable.setVariableExtensions("gl_GlobalInvocationID", 1, &E_GL_NV_mesh_shader); symbolTable.setVariableExtensions("gl_LocalInvocationIndex", 1, &E_GL_NV_mesh_shader); } BuiltInVariable("gl_TaskCountNV", EbvTaskCountNV, symbolTable); BuiltInVariable("gl_WorkGroupSize", EbvWorkGroupSize, symbolTable); BuiltInVariable("gl_WorkGroupID", EbvWorkGroupId, symbolTable); BuiltInVariable("gl_LocalInvocationID", EbvLocalInvocationId, symbolTable); BuiltInVariable("gl_GlobalInvocationID", EbvGlobalInvocationId, symbolTable); BuiltInVariable("gl_LocalInvocationIndex", EbvLocalInvocationIndex, symbolTable); BuiltInVariable("gl_MeshViewCountNV", EbvMeshViewCountNV, symbolTable); BuiltInVariable("gl_MeshViewIndicesNV", EbvMeshViewIndicesNV, symbolTable); symbolTable.setVariableExtensions("gl_MaxTaskWorkGroupSizeNV", 1, &E_GL_NV_mesh_shader); symbolTable.setVariableExtensions("gl_MaxMeshViewCountNV", 1, &E_GL_NV_mesh_shader); if (profile != EEsProfile) { symbolTable.setFunctionExtensions("barrier", Num_AEP_mesh_shader, AEP_mesh_shader); symbolTable.setFunctionExtensions("memoryBarrierShared", Num_AEP_mesh_shader, AEP_mesh_shader); symbolTable.setFunctionExtensions("groupMemoryBarrier", Num_AEP_mesh_shader, AEP_mesh_shader); } else { symbolTable.setFunctionExtensions("barrier", 1, &E_GL_NV_mesh_shader); symbolTable.setFunctionExtensions("memoryBarrierShared", 1, &E_GL_NV_mesh_shader); symbolTable.setFunctionExtensions("groupMemoryBarrier", 1, &E_GL_NV_mesh_shader); } } if (profile != EEsProfile && version >= 450) { // GL_EXT_mesh_shader symbolTable.setFunctionExtensions("EmitMeshTasksEXT", 1, &E_GL_EXT_mesh_shader); symbolTable.setVariableExtensions("gl_NumWorkGroups", 1, &E_GL_EXT_mesh_shader); BuiltInVariable("gl_NumWorkGroups", EbvNumWorkGroups, symbolTable); // GL_EXT_device_group symbolTable.setVariableExtensions("gl_DeviceIndex", 1, &E_GL_EXT_device_group); BuiltInVariable("gl_DeviceIndex", EbvDeviceIndex, symbolTable); // GL_ARB_shader_draw_parameters symbolTable.setVariableExtensions("gl_DrawIDARB", 1, &E_GL_ARB_shader_draw_parameters); BuiltInVariable("gl_DrawIDARB", EbvDrawId, symbolTable); if (version >= 460) { BuiltInVariable("gl_DrawID", EbvDrawId, symbolTable); } // GL_ARB_shader_ballot symbolTable.setVariableExtensions("gl_SubGroupSizeARB", 1, &E_GL_ARB_shader_ballot); symbolTable.setVariableExtensions("gl_SubGroupInvocationARB", 1, &E_GL_ARB_shader_ballot); symbolTable.setVariableExtensions("gl_SubGroupEqMaskARB", 1, &E_GL_ARB_shader_ballot); symbolTable.setVariableExtensions("gl_SubGroupGeMaskARB", 1, &E_GL_ARB_shader_ballot); symbolTable.setVariableExtensions("gl_SubGroupGtMaskARB", 1, &E_GL_ARB_shader_ballot); symbolTable.setVariableExtensions("gl_SubGroupLeMaskARB", 1, &E_GL_ARB_shader_ballot); symbolTable.setVariableExtensions("gl_SubGroupLtMaskARB", 1, &E_GL_ARB_shader_ballot); BuiltInVariable("gl_SubGroupInvocationARB", EbvSubGroupInvocation, symbolTable); BuiltInVariable("gl_SubGroupEqMaskARB", EbvSubGroupEqMask, symbolTable); BuiltInVariable("gl_SubGroupGeMaskARB", EbvSubGroupGeMask, symbolTable); BuiltInVariable("gl_SubGroupGtMaskARB", EbvSubGroupGtMask, symbolTable); BuiltInVariable("gl_SubGroupLeMaskARB", EbvSubGroupLeMask, symbolTable); BuiltInVariable("gl_SubGroupLtMaskARB", EbvSubGroupLtMask, symbolTable); if (spvVersion.vulkan > 0) { // Treat "gl_SubGroupSizeARB" as shader input instead of uniform for Vulkan SpecialQualifier("gl_SubGroupSizeARB", EvqVaryingIn, EbvSubGroupSize, symbolTable); if (language == EShLangFragment) ModifyFlatDecoration("gl_SubGroupSizeARB", true, symbolTable); } else BuiltInVariable("gl_SubGroupSizeARB", EbvSubGroupSize, symbolTable); } // GL_KHR_shader_subgroup if ((profile == EEsProfile && version >= 310) || (profile != EEsProfile && version >= 140)) { symbolTable.setVariableExtensions("gl_NumSubgroups", 1, &E_GL_KHR_shader_subgroup_basic); symbolTable.setVariableExtensions("gl_SubgroupID", 1, &E_GL_KHR_shader_subgroup_basic); symbolTable.setVariableExtensions("gl_SubgroupSize", 1, &E_GL_KHR_shader_subgroup_basic); symbolTable.setVariableExtensions("gl_SubgroupInvocationID", 1, &E_GL_KHR_shader_subgroup_basic); symbolTable.setVariableExtensions("gl_SubgroupEqMask", 1, &E_GL_KHR_shader_subgroup_ballot); symbolTable.setVariableExtensions("gl_SubgroupGeMask", 1, &E_GL_KHR_shader_subgroup_ballot); symbolTable.setVariableExtensions("gl_SubgroupGtMask", 1, &E_GL_KHR_shader_subgroup_ballot); symbolTable.setVariableExtensions("gl_SubgroupLeMask", 1, &E_GL_KHR_shader_subgroup_ballot); symbolTable.setVariableExtensions("gl_SubgroupLtMask", 1, &E_GL_KHR_shader_subgroup_ballot); BuiltInVariable("gl_NumSubgroups", EbvNumSubgroups, symbolTable); BuiltInVariable("gl_SubgroupID", EbvSubgroupID, symbolTable); BuiltInVariable("gl_SubgroupSize", EbvSubgroupSize2, symbolTable); BuiltInVariable("gl_SubgroupInvocationID", EbvSubgroupInvocation2, symbolTable); BuiltInVariable("gl_SubgroupEqMask", EbvSubgroupEqMask2, symbolTable); BuiltInVariable("gl_SubgroupGeMask", EbvSubgroupGeMask2, symbolTable); BuiltInVariable("gl_SubgroupGtMask", EbvSubgroupGtMask2, symbolTable); BuiltInVariable("gl_SubgroupLeMask", EbvSubgroupLeMask2, symbolTable); BuiltInVariable("gl_SubgroupLtMask", EbvSubgroupLtMask2, symbolTable); symbolTable.setFunctionExtensions("subgroupMemoryBarrierShared", 1, &E_GL_KHR_shader_subgroup_basic); // GL_NV_shader_sm_builtins symbolTable.setVariableExtensions("gl_WarpsPerSMNV", 1, &E_GL_NV_shader_sm_builtins); symbolTable.setVariableExtensions("gl_SMCountNV", 1, &E_GL_NV_shader_sm_builtins); symbolTable.setVariableExtensions("gl_WarpIDNV", 1, &E_GL_NV_shader_sm_builtins); symbolTable.setVariableExtensions("gl_SMIDNV", 1, &E_GL_NV_shader_sm_builtins); BuiltInVariable("gl_WarpsPerSMNV", EbvWarpsPerSM, symbolTable); BuiltInVariable("gl_SMCountNV", EbvSMCount, symbolTable); BuiltInVariable("gl_WarpIDNV", EbvWarpID, symbolTable); BuiltInVariable("gl_SMIDNV", EbvSMID, symbolTable); // GL_ARM_shader_core_builtins symbolTable.setVariableExtensions("gl_CoreCountARM", 1, &E_GL_ARM_shader_core_builtins); symbolTable.setVariableExtensions("gl_CoreIDARM", 1, &E_GL_ARM_shader_core_builtins); symbolTable.setVariableExtensions("gl_CoreMaxIDARM", 1, &E_GL_ARM_shader_core_builtins); symbolTable.setVariableExtensions("gl_WarpIDARM", 1, &E_GL_ARM_shader_core_builtins); symbolTable.setVariableExtensions("gl_WarpMaxIDARM", 1, &E_GL_ARM_shader_core_builtins); BuiltInVariable("gl_CoreCountARM", EbvCoreCountARM, symbolTable); BuiltInVariable("gl_CoreIDARM", EbvCoreIDARM, symbolTable); BuiltInVariable("gl_CoreMaxIDARM", EbvCoreMaxIDARM, symbolTable); BuiltInVariable("gl_WarpIDARM", EbvWarpIDARM, symbolTable); BuiltInVariable("gl_WarpMaxIDARM", EbvWarpMaxIDARM, symbolTable); } if ((profile == EEsProfile && version >= 310) || (profile != EEsProfile && version >= 450)) { symbolTable.setVariableExtensions("gl_ShadingRateFlag2VerticalPixelsEXT", 1, &E_GL_EXT_fragment_shading_rate); symbolTable.setVariableExtensions("gl_ShadingRateFlag4VerticalPixelsEXT", 1, &E_GL_EXT_fragment_shading_rate); symbolTable.setVariableExtensions("gl_ShadingRateFlag2HorizontalPixelsEXT", 1, &E_GL_EXT_fragment_shading_rate); symbolTable.setVariableExtensions("gl_ShadingRateFlag4HorizontalPixelsEXT", 1, &E_GL_EXT_fragment_shading_rate); } break; default: assert(false && "Language not supported"); break; } // // Next, identify which built-ins have a mapping to an operator. // If PureOperatorBuiltins is false, those that are not identified as such are // expected to be resolved through a library of functions, versus as // operations. // relateTabledBuiltins(version, profile, spvVersion, language, symbolTable); symbolTable.relateToOperator("doubleBitsToInt64", EOpDoubleBitsToInt64); symbolTable.relateToOperator("doubleBitsToUint64", EOpDoubleBitsToUint64); symbolTable.relateToOperator("int64BitsToDouble", EOpInt64BitsToDouble); symbolTable.relateToOperator("uint64BitsToDouble", EOpUint64BitsToDouble); symbolTable.relateToOperator("halfBitsToInt16", EOpFloat16BitsToInt16); symbolTable.relateToOperator("halfBitsToUint16", EOpFloat16BitsToUint16); symbolTable.relateToOperator("float16BitsToInt16", EOpFloat16BitsToInt16); symbolTable.relateToOperator("float16BitsToUint16", EOpFloat16BitsToUint16); symbolTable.relateToOperator("int16BitsToFloat16", EOpInt16BitsToFloat16); symbolTable.relateToOperator("uint16BitsToFloat16", EOpUint16BitsToFloat16); symbolTable.relateToOperator("int16BitsToHalf", EOpInt16BitsToFloat16); symbolTable.relateToOperator("uint16BitsToHalf", EOpUint16BitsToFloat16); symbolTable.relateToOperator("packSnorm4x8", EOpPackSnorm4x8); symbolTable.relateToOperator("unpackSnorm4x8", EOpUnpackSnorm4x8); symbolTable.relateToOperator("packUnorm4x8", EOpPackUnorm4x8); symbolTable.relateToOperator("unpackUnorm4x8", EOpUnpackUnorm4x8); symbolTable.relateToOperator("packDouble2x32", EOpPackDouble2x32); symbolTable.relateToOperator("unpackDouble2x32", EOpUnpackDouble2x32); symbolTable.relateToOperator("packInt2x32", EOpPackInt2x32); symbolTable.relateToOperator("unpackInt2x32", EOpUnpackInt2x32); symbolTable.relateToOperator("packUint2x32", EOpPackUint2x32); symbolTable.relateToOperator("unpackUint2x32", EOpUnpackUint2x32); symbolTable.relateToOperator("packInt2x16", EOpPackInt2x16); symbolTable.relateToOperator("unpackInt2x16", EOpUnpackInt2x16); symbolTable.relateToOperator("packUint2x16", EOpPackUint2x16); symbolTable.relateToOperator("unpackUint2x16", EOpUnpackUint2x16); symbolTable.relateToOperator("packInt4x16", EOpPackInt4x16); symbolTable.relateToOperator("unpackInt4x16", EOpUnpackInt4x16); symbolTable.relateToOperator("packUint4x16", EOpPackUint4x16); symbolTable.relateToOperator("unpackUint4x16", EOpUnpackUint4x16); symbolTable.relateToOperator("packFloat2x16", EOpPackFloat2x16); symbolTable.relateToOperator("unpackFloat2x16", EOpUnpackFloat2x16); symbolTable.relateToOperator("pack16", EOpPack16); symbolTable.relateToOperator("pack32", EOpPack32); symbolTable.relateToOperator("pack64", EOpPack64); symbolTable.relateToOperator("unpack32", EOpUnpack32); symbolTable.relateToOperator("unpack16", EOpUnpack16); symbolTable.relateToOperator("unpack8", EOpUnpack8); symbolTable.relateToOperator("controlBarrier", EOpBarrier); symbolTable.relateToOperator("memoryBarrierAtomicCounter", EOpMemoryBarrierAtomicCounter); symbolTable.relateToOperator("memoryBarrierImage", EOpMemoryBarrierImage); if (spvVersion.vulkanRelaxed) { // // functions signature have been replaced to take uint operations on buffer variables // remap atomic counter functions to atomic operations // symbolTable.relateToOperator("memoryBarrierAtomicCounter", EOpMemoryBarrierBuffer); } symbolTable.relateToOperator("atomicLoad", EOpAtomicLoad); symbolTable.relateToOperator("atomicStore", EOpAtomicStore); symbolTable.relateToOperator("atomicCounterIncrement", EOpAtomicCounterIncrement); symbolTable.relateToOperator("atomicCounterDecrement", EOpAtomicCounterDecrement); symbolTable.relateToOperator("atomicCounter", EOpAtomicCounter); if (spvVersion.vulkanRelaxed) { // // functions signature have been replaced to take uint operations // remap atomic counter functions to atomic operations // // these atomic counter functions do not match signatures of glsl // atomic functions, so they will be remapped to semantically // equivalent functions in the parser // symbolTable.relateToOperator("atomicCounterIncrement", EOpNull); symbolTable.relateToOperator("atomicCounterDecrement", EOpNull); symbolTable.relateToOperator("atomicCounter", EOpNull); } symbolTable.relateToOperator("clockARB", EOpReadClockSubgroupKHR); symbolTable.relateToOperator("clock2x32ARB", EOpReadClockSubgroupKHR); symbolTable.relateToOperator("clockRealtimeEXT", EOpReadClockDeviceKHR); symbolTable.relateToOperator("clockRealtime2x32EXT", EOpReadClockDeviceKHR); if (profile != EEsProfile && version == 450) { symbolTable.relateToOperator("atomicCounterAddARB", EOpAtomicCounterAdd); symbolTable.relateToOperator("atomicCounterSubtractARB", EOpAtomicCounterSubtract); symbolTable.relateToOperator("atomicCounterMinARB", EOpAtomicCounterMin); symbolTable.relateToOperator("atomicCounterMaxARB", EOpAtomicCounterMax); symbolTable.relateToOperator("atomicCounterAndARB", EOpAtomicCounterAnd); symbolTable.relateToOperator("atomicCounterOrARB", EOpAtomicCounterOr); symbolTable.relateToOperator("atomicCounterXorARB", EOpAtomicCounterXor); symbolTable.relateToOperator("atomicCounterExchangeARB", EOpAtomicCounterExchange); symbolTable.relateToOperator("atomicCounterCompSwapARB", EOpAtomicCounterCompSwap); } if (profile != EEsProfile && version >= 460) { symbolTable.relateToOperator("atomicCounterAdd", EOpAtomicCounterAdd); symbolTable.relateToOperator("atomicCounterSubtract", EOpAtomicCounterSubtract); symbolTable.relateToOperator("atomicCounterMin", EOpAtomicCounterMin); symbolTable.relateToOperator("atomicCounterMax", EOpAtomicCounterMax); symbolTable.relateToOperator("atomicCounterAnd", EOpAtomicCounterAnd); symbolTable.relateToOperator("atomicCounterOr", EOpAtomicCounterOr); symbolTable.relateToOperator("atomicCounterXor", EOpAtomicCounterXor); symbolTable.relateToOperator("atomicCounterExchange", EOpAtomicCounterExchange); symbolTable.relateToOperator("atomicCounterCompSwap", EOpAtomicCounterCompSwap); } if (spvVersion.vulkanRelaxed) { // // functions signature have been replaced to take 'uint' instead of 'atomic_uint' // remap atomic counter functions to non-counter atomic ops so // functions act as aliases to non-counter atomic ops // symbolTable.relateToOperator("atomicCounterAdd", EOpAtomicAdd); symbolTable.relateToOperator("atomicCounterSubtract", EOpAtomicSubtract); symbolTable.relateToOperator("atomicCounterMin", EOpAtomicMin); symbolTable.relateToOperator("atomicCounterMax", EOpAtomicMax); symbolTable.relateToOperator("atomicCounterAnd", EOpAtomicAnd); symbolTable.relateToOperator("atomicCounterOr", EOpAtomicOr); symbolTable.relateToOperator("atomicCounterXor", EOpAtomicXor); symbolTable.relateToOperator("atomicCounterExchange", EOpAtomicExchange); symbolTable.relateToOperator("atomicCounterCompSwap", EOpAtomicCompSwap); } symbolTable.relateToOperator("fma", EOpFma); symbolTable.relateToOperator("frexp", EOpFrexp); symbolTable.relateToOperator("ldexp", EOpLdexp); symbolTable.relateToOperator("uaddCarry", EOpAddCarry); symbolTable.relateToOperator("usubBorrow", EOpSubBorrow); symbolTable.relateToOperator("umulExtended", EOpUMulExtended); symbolTable.relateToOperator("imulExtended", EOpIMulExtended); symbolTable.relateToOperator("bitfieldExtract", EOpBitfieldExtract); symbolTable.relateToOperator("bitfieldInsert", EOpBitfieldInsert); symbolTable.relateToOperator("bitfieldReverse", EOpBitFieldReverse); symbolTable.relateToOperator("bitCount", EOpBitCount); symbolTable.relateToOperator("findLSB", EOpFindLSB); symbolTable.relateToOperator("findMSB", EOpFindMSB); symbolTable.relateToOperator("helperInvocationEXT", EOpIsHelperInvocation); symbolTable.relateToOperator("countLeadingZeros", EOpCountLeadingZeros); symbolTable.relateToOperator("countTrailingZeros", EOpCountTrailingZeros); symbolTable.relateToOperator("absoluteDifference", EOpAbsDifference); symbolTable.relateToOperator("addSaturate", EOpAddSaturate); symbolTable.relateToOperator("subtractSaturate", EOpSubSaturate); symbolTable.relateToOperator("average", EOpAverage); symbolTable.relateToOperator("averageRounded", EOpAverageRounded); symbolTable.relateToOperator("multiply32x16", EOpMul32x16); symbolTable.relateToOperator("debugPrintfEXT", EOpDebugPrintf); symbolTable.relateToOperator("assumeEXT", EOpAssumeEXT); symbolTable.relateToOperator("expectEXT", EOpExpectEXT); if (PureOperatorBuiltins) { symbolTable.relateToOperator("imageSize", EOpImageQuerySize); symbolTable.relateToOperator("imageSamples", EOpImageQuerySamples); symbolTable.relateToOperator("imageLoad", EOpImageLoad); symbolTable.relateToOperator("imageStore", EOpImageStore); symbolTable.relateToOperator("imageAtomicAdd", EOpImageAtomicAdd); symbolTable.relateToOperator("imageAtomicMin", EOpImageAtomicMin); symbolTable.relateToOperator("imageAtomicMax", EOpImageAtomicMax); symbolTable.relateToOperator("imageAtomicAnd", EOpImageAtomicAnd); symbolTable.relateToOperator("imageAtomicOr", EOpImageAtomicOr); symbolTable.relateToOperator("imageAtomicXor", EOpImageAtomicXor); symbolTable.relateToOperator("imageAtomicExchange", EOpImageAtomicExchange); symbolTable.relateToOperator("imageAtomicCompSwap", EOpImageAtomicCompSwap); symbolTable.relateToOperator("imageAtomicLoad", EOpImageAtomicLoad); symbolTable.relateToOperator("imageAtomicStore", EOpImageAtomicStore); symbolTable.relateToOperator("subpassLoad", EOpSubpassLoad); symbolTable.relateToOperator("subpassLoadMS", EOpSubpassLoadMS); symbolTable.relateToOperator("textureGather", EOpTextureGather); symbolTable.relateToOperator("textureGatherOffset", EOpTextureGatherOffset); symbolTable.relateToOperator("textureGatherOffsets", EOpTextureGatherOffsets); symbolTable.relateToOperator("noise1", EOpNoise); symbolTable.relateToOperator("noise2", EOpNoise); symbolTable.relateToOperator("noise3", EOpNoise); symbolTable.relateToOperator("noise4", EOpNoise); symbolTable.relateToOperator("textureFootprintNV", EOpImageSampleFootprintNV); symbolTable.relateToOperator("textureFootprintClampNV", EOpImageSampleFootprintClampNV); symbolTable.relateToOperator("textureFootprintLodNV", EOpImageSampleFootprintLodNV); symbolTable.relateToOperator("textureFootprintGradNV", EOpImageSampleFootprintGradNV); symbolTable.relateToOperator("textureFootprintGradClampNV", EOpImageSampleFootprintGradClampNV); if (spvVersion.spv == 0 && IncludeLegacy(version, profile, spvVersion)) symbolTable.relateToOperator("ftransform", EOpFtransform); if (spvVersion.spv == 0 && (IncludeLegacy(version, profile, spvVersion) || (profile == EEsProfile && version == 100))) { symbolTable.relateToOperator("texture1D", EOpTexture); symbolTable.relateToOperator("texture1DGradARB", EOpTextureGrad); symbolTable.relateToOperator("texture1DProj", EOpTextureProj); symbolTable.relateToOperator("texture1DProjGradARB", EOpTextureProjGrad); symbolTable.relateToOperator("texture1DLod", EOpTextureLod); symbolTable.relateToOperator("texture1DProjLod", EOpTextureProjLod); symbolTable.relateToOperator("texture2DRect", EOpTexture); symbolTable.relateToOperator("texture2DRectProj", EOpTextureProj); symbolTable.relateToOperator("texture2DRectGradARB", EOpTextureGrad); symbolTable.relateToOperator("texture2DRectProjGradARB", EOpTextureProjGrad); symbolTable.relateToOperator("shadow2DRect", EOpTexture); symbolTable.relateToOperator("shadow2DRectProj", EOpTextureProj); symbolTable.relateToOperator("shadow2DRectGradARB", EOpTextureGrad); symbolTable.relateToOperator("shadow2DRectProjGradARB", EOpTextureProjGrad); symbolTable.relateToOperator("texture2D", EOpTexture); symbolTable.relateToOperator("texture2DProj", EOpTextureProj); symbolTable.relateToOperator("texture2DGradEXT", EOpTextureGrad); symbolTable.relateToOperator("texture2DGradARB", EOpTextureGrad); symbolTable.relateToOperator("texture2DProjGradEXT", EOpTextureProjGrad); symbolTable.relateToOperator("texture2DProjGradARB", EOpTextureProjGrad); symbolTable.relateToOperator("texture2DLod", EOpTextureLod); symbolTable.relateToOperator("texture2DLodEXT", EOpTextureLod); symbolTable.relateToOperator("texture2DProjLod", EOpTextureProjLod); symbolTable.relateToOperator("texture2DProjLodEXT", EOpTextureProjLod); symbolTable.relateToOperator("texture3D", EOpTexture); symbolTable.relateToOperator("texture3DGradARB", EOpTextureGrad); symbolTable.relateToOperator("texture3DProj", EOpTextureProj); symbolTable.relateToOperator("texture3DProjGradARB", EOpTextureProjGrad); symbolTable.relateToOperator("texture3DLod", EOpTextureLod); symbolTable.relateToOperator("texture3DProjLod", EOpTextureProjLod); symbolTable.relateToOperator("textureCube", EOpTexture); symbolTable.relateToOperator("textureCubeGradEXT", EOpTextureGrad); symbolTable.relateToOperator("textureCubeGradARB", EOpTextureGrad); symbolTable.relateToOperator("textureCubeLod", EOpTextureLod); symbolTable.relateToOperator("textureCubeLodEXT", EOpTextureLod); symbolTable.relateToOperator("shadow1D", EOpTexture); symbolTable.relateToOperator("shadow1DGradARB", EOpTextureGrad); symbolTable.relateToOperator("shadow2D", EOpTexture); symbolTable.relateToOperator("shadow2DGradARB", EOpTextureGrad); symbolTable.relateToOperator("shadow1DProj", EOpTextureProj); symbolTable.relateToOperator("shadow2DProj", EOpTextureProj); symbolTable.relateToOperator("shadow1DProjGradARB", EOpTextureProjGrad); symbolTable.relateToOperator("shadow2DProjGradARB", EOpTextureProjGrad); symbolTable.relateToOperator("shadow1DLod", EOpTextureLod); symbolTable.relateToOperator("shadow2DLod", EOpTextureLod); symbolTable.relateToOperator("shadow1DProjLod", EOpTextureProjLod); symbolTable.relateToOperator("shadow2DProjLod", EOpTextureProjLod); } if (profile != EEsProfile) { symbolTable.relateToOperator("sparseTextureARB", EOpSparseTexture); symbolTable.relateToOperator("sparseTextureLodARB", EOpSparseTextureLod); symbolTable.relateToOperator("sparseTextureOffsetARB", EOpSparseTextureOffset); symbolTable.relateToOperator("sparseTexelFetchARB", EOpSparseTextureFetch); symbolTable.relateToOperator("sparseTexelFetchOffsetARB", EOpSparseTextureFetchOffset); symbolTable.relateToOperator("sparseTextureLodOffsetARB", EOpSparseTextureLodOffset); symbolTable.relateToOperator("sparseTextureGradARB", EOpSparseTextureGrad); symbolTable.relateToOperator("sparseTextureGradOffsetARB", EOpSparseTextureGradOffset); symbolTable.relateToOperator("sparseTextureGatherARB", EOpSparseTextureGather); symbolTable.relateToOperator("sparseTextureGatherOffsetARB", EOpSparseTextureGatherOffset); symbolTable.relateToOperator("sparseTextureGatherOffsetsARB", EOpSparseTextureGatherOffsets); symbolTable.relateToOperator("sparseImageLoadARB", EOpSparseImageLoad); symbolTable.relateToOperator("sparseTexelsResidentARB", EOpSparseTexelsResident); symbolTable.relateToOperator("sparseTextureClampARB", EOpSparseTextureClamp); symbolTable.relateToOperator("sparseTextureOffsetClampARB", EOpSparseTextureOffsetClamp); symbolTable.relateToOperator("sparseTextureGradClampARB", EOpSparseTextureGradClamp); symbolTable.relateToOperator("sparseTextureGradOffsetClampARB", EOpSparseTextureGradOffsetClamp); symbolTable.relateToOperator("textureClampARB", EOpTextureClamp); symbolTable.relateToOperator("textureOffsetClampARB", EOpTextureOffsetClamp); symbolTable.relateToOperator("textureGradClampARB", EOpTextureGradClamp); symbolTable.relateToOperator("textureGradOffsetClampARB", EOpTextureGradOffsetClamp); symbolTable.relateToOperator("ballotARB", EOpBallot); symbolTable.relateToOperator("readInvocationARB", EOpReadInvocation); symbolTable.relateToOperator("readFirstInvocationARB", EOpReadFirstInvocation); if (version >= 430) { symbolTable.relateToOperator("anyInvocationARB", EOpAnyInvocation); symbolTable.relateToOperator("allInvocationsARB", EOpAllInvocations); symbolTable.relateToOperator("allInvocationsEqualARB", EOpAllInvocationsEqual); } if (version >= 460) { symbolTable.relateToOperator("anyInvocation", EOpAnyInvocation); symbolTable.relateToOperator("allInvocations", EOpAllInvocations); symbolTable.relateToOperator("allInvocationsEqual", EOpAllInvocationsEqual); } // As per dependency between NV_gpu_shader5 and ARB_shader_group_vote // anyInvocationARB = anyThreadNV // allInvocationsARB = allThreadsNV // allInvocationsEqualARB = allThreadsEqualNV // Thus we reuse the Op's if (version >= 150) { symbolTable.relateToOperator("anyThreadNV", EOpAnyInvocation); symbolTable.relateToOperator("allThreadsNV", EOpAllInvocations); symbolTable.relateToOperator("allThreadsEqualNV", EOpAllInvocationsEqual); } symbolTable.relateToOperator("minInvocationsAMD", EOpMinInvocations); symbolTable.relateToOperator("maxInvocationsAMD", EOpMaxInvocations); symbolTable.relateToOperator("addInvocationsAMD", EOpAddInvocations); symbolTable.relateToOperator("minInvocationsNonUniformAMD", EOpMinInvocationsNonUniform); symbolTable.relateToOperator("maxInvocationsNonUniformAMD", EOpMaxInvocationsNonUniform); symbolTable.relateToOperator("addInvocationsNonUniformAMD", EOpAddInvocationsNonUniform); symbolTable.relateToOperator("minInvocationsInclusiveScanAMD", EOpMinInvocationsInclusiveScan); symbolTable.relateToOperator("maxInvocationsInclusiveScanAMD", EOpMaxInvocationsInclusiveScan); symbolTable.relateToOperator("addInvocationsInclusiveScanAMD", EOpAddInvocationsInclusiveScan); symbolTable.relateToOperator("minInvocationsInclusiveScanNonUniformAMD", EOpMinInvocationsInclusiveScanNonUniform); symbolTable.relateToOperator("maxInvocationsInclusiveScanNonUniformAMD", EOpMaxInvocationsInclusiveScanNonUniform); symbolTable.relateToOperator("addInvocationsInclusiveScanNonUniformAMD", EOpAddInvocationsInclusiveScanNonUniform); symbolTable.relateToOperator("minInvocationsExclusiveScanAMD", EOpMinInvocationsExclusiveScan); symbolTable.relateToOperator("maxInvocationsExclusiveScanAMD", EOpMaxInvocationsExclusiveScan); symbolTable.relateToOperator("addInvocationsExclusiveScanAMD", EOpAddInvocationsExclusiveScan); symbolTable.relateToOperator("minInvocationsExclusiveScanNonUniformAMD", EOpMinInvocationsExclusiveScanNonUniform); symbolTable.relateToOperator("maxInvocationsExclusiveScanNonUniformAMD", EOpMaxInvocationsExclusiveScanNonUniform); symbolTable.relateToOperator("addInvocationsExclusiveScanNonUniformAMD", EOpAddInvocationsExclusiveScanNonUniform); symbolTable.relateToOperator("swizzleInvocationsAMD", EOpSwizzleInvocations); symbolTable.relateToOperator("swizzleInvocationsMaskedAMD", EOpSwizzleInvocationsMasked); symbolTable.relateToOperator("writeInvocationAMD", EOpWriteInvocation); symbolTable.relateToOperator("mbcntAMD", EOpMbcnt); symbolTable.relateToOperator("min3", EOpMin3); symbolTable.relateToOperator("max3", EOpMax3); symbolTable.relateToOperator("mid3", EOpMid3); symbolTable.relateToOperator("cubeFaceIndexAMD", EOpCubeFaceIndex); symbolTable.relateToOperator("cubeFaceCoordAMD", EOpCubeFaceCoord); symbolTable.relateToOperator("timeAMD", EOpTime); symbolTable.relateToOperator("textureGatherLodAMD", EOpTextureGatherLod); symbolTable.relateToOperator("textureGatherLodOffsetAMD", EOpTextureGatherLodOffset); symbolTable.relateToOperator("textureGatherLodOffsetsAMD", EOpTextureGatherLodOffsets); symbolTable.relateToOperator("sparseTextureGatherLodAMD", EOpSparseTextureGatherLod); symbolTable.relateToOperator("sparseTextureGatherLodOffsetAMD", EOpSparseTextureGatherLodOffset); symbolTable.relateToOperator("sparseTextureGatherLodOffsetsAMD", EOpSparseTextureGatherLodOffsets); symbolTable.relateToOperator("imageLoadLodAMD", EOpImageLoadLod); symbolTable.relateToOperator("imageStoreLodAMD", EOpImageStoreLod); symbolTable.relateToOperator("sparseImageLoadLodAMD", EOpSparseImageLoadLod); symbolTable.relateToOperator("fragmentMaskFetchAMD", EOpFragmentMaskFetch); symbolTable.relateToOperator("fragmentFetchAMD", EOpFragmentFetch); } // GL_EXT_integer_dot_product if ((profile == EEsProfile && version >= 300) || (profile != EEsProfile && version >= 450)) { symbolTable.relateToOperator("dotEXT", EOpDot); symbolTable.relateToOperator("dotPacked4x8EXT", EOpDotPackedEXT); symbolTable.relateToOperator("dotAccSatEXT", EOpDotAccSatEXT); symbolTable.relateToOperator("dotPacked4x8AccSatEXT", EOpDotPackedAccSatEXT); } // GL_EXT_bfloat16 if ((profile == EEsProfile && version >= 320) || (profile != EEsProfile && version >= 450)) { symbolTable.relateToOperator("bfloat16BitsToIntEXT", EOpFloatBitsToInt); symbolTable.relateToOperator("bfloat16BitsToUintEXT", EOpFloatBitsToUint); symbolTable.relateToOperator("intBitsToBFloat16EXT", EOpIntBitsToFloat); symbolTable.relateToOperator("uintBitsToBFloat16EXT", EOpUintBitsToFloat); symbolTable.relateToOperator("floate5m2BitsToIntEXT", EOpFloatBitsToInt); symbolTable.relateToOperator("floate5m2BitsToUintEXT", EOpFloatBitsToUint); symbolTable.relateToOperator("intBitsToFloate5m2EXT", EOpIntBitsToFloat); symbolTable.relateToOperator("uintBitsToFloate5m2EXT", EOpUintBitsToFloat); symbolTable.relateToOperator("floate4m3BitsToIntEXT", EOpFloatBitsToInt); symbolTable.relateToOperator("floate4m3BitsToUintEXT", EOpFloatBitsToUint); symbolTable.relateToOperator("intBitsToFloate4m3EXT", EOpIntBitsToFloat); symbolTable.relateToOperator("uintBitsToFloate4m3EXT", EOpUintBitsToFloat); symbolTable.relateToOperator("saturatedConvertEXT", EOpConstructSaturated); } // GL_KHR_shader_subgroup if ((profile == EEsProfile && version >= 310) || (profile != EEsProfile && version >= 140)) { symbolTable.relateToOperator("subgroupBarrier", EOpSubgroupBarrier); symbolTable.relateToOperator("subgroupMemoryBarrier", EOpSubgroupMemoryBarrier); symbolTable.relateToOperator("subgroupMemoryBarrierBuffer", EOpSubgroupMemoryBarrierBuffer); symbolTable.relateToOperator("subgroupMemoryBarrierImage", EOpSubgroupMemoryBarrierImage); symbolTable.relateToOperator("subgroupElect", EOpSubgroupElect); symbolTable.relateToOperator("subgroupAll", EOpSubgroupAll); symbolTable.relateToOperator("subgroupAny", EOpSubgroupAny); symbolTable.relateToOperator("subgroupAllEqual", EOpSubgroupAllEqual); symbolTable.relateToOperator("subgroupBroadcast", EOpSubgroupBroadcast); symbolTable.relateToOperator("subgroupBroadcastFirst", EOpSubgroupBroadcastFirst); symbolTable.relateToOperator("subgroupBallot", EOpSubgroupBallot); symbolTable.relateToOperator("subgroupInverseBallot", EOpSubgroupInverseBallot); symbolTable.relateToOperator("subgroupBallotBitExtract", EOpSubgroupBallotBitExtract); symbolTable.relateToOperator("subgroupBallotBitCount", EOpSubgroupBallotBitCount); symbolTable.relateToOperator("subgroupBallotInclusiveBitCount", EOpSubgroupBallotInclusiveBitCount); symbolTable.relateToOperator("subgroupBallotExclusiveBitCount", EOpSubgroupBallotExclusiveBitCount); symbolTable.relateToOperator("subgroupBallotFindLSB", EOpSubgroupBallotFindLSB); symbolTable.relateToOperator("subgroupBallotFindMSB", EOpSubgroupBallotFindMSB); symbolTable.relateToOperator("subgroupShuffle", EOpSubgroupShuffle); symbolTable.relateToOperator("subgroupShuffleXor", EOpSubgroupShuffleXor); symbolTable.relateToOperator("subgroupShuffleUp", EOpSubgroupShuffleUp); symbolTable.relateToOperator("subgroupShuffleDown", EOpSubgroupShuffleDown); symbolTable.relateToOperator("subgroupRotate", EOpSubgroupRotate); symbolTable.relateToOperator("subgroupClusteredRotate", EOpSubgroupClusteredRotate); symbolTable.relateToOperator("subgroupAdd", EOpSubgroupAdd); symbolTable.relateToOperator("subgroupMul", EOpSubgroupMul); symbolTable.relateToOperator("subgroupMin", EOpSubgroupMin); symbolTable.relateToOperator("subgroupMax", EOpSubgroupMax); symbolTable.relateToOperator("subgroupAnd", EOpSubgroupAnd); symbolTable.relateToOperator("subgroupOr", EOpSubgroupOr); symbolTable.relateToOperator("subgroupXor", EOpSubgroupXor); symbolTable.relateToOperator("subgroupInclusiveAdd", EOpSubgroupInclusiveAdd); symbolTable.relateToOperator("subgroupInclusiveMul", EOpSubgroupInclusiveMul); symbolTable.relateToOperator("subgroupInclusiveMin", EOpSubgroupInclusiveMin); symbolTable.relateToOperator("subgroupInclusiveMax", EOpSubgroupInclusiveMax); symbolTable.relateToOperator("subgroupInclusiveAnd", EOpSubgroupInclusiveAnd); symbolTable.relateToOperator("subgroupInclusiveOr", EOpSubgroupInclusiveOr); symbolTable.relateToOperator("subgroupInclusiveXor", EOpSubgroupInclusiveXor); symbolTable.relateToOperator("subgroupExclusiveAdd", EOpSubgroupExclusiveAdd); symbolTable.relateToOperator("subgroupExclusiveMul", EOpSubgroupExclusiveMul); symbolTable.relateToOperator("subgroupExclusiveMin", EOpSubgroupExclusiveMin); symbolTable.relateToOperator("subgroupExclusiveMax", EOpSubgroupExclusiveMax); symbolTable.relateToOperator("subgroupExclusiveAnd", EOpSubgroupExclusiveAnd); symbolTable.relateToOperator("subgroupExclusiveOr", EOpSubgroupExclusiveOr); symbolTable.relateToOperator("subgroupExclusiveXor", EOpSubgroupExclusiveXor); symbolTable.relateToOperator("subgroupClusteredAdd", EOpSubgroupClusteredAdd); symbolTable.relateToOperator("subgroupClusteredMul", EOpSubgroupClusteredMul); symbolTable.relateToOperator("subgroupClusteredMin", EOpSubgroupClusteredMin); symbolTable.relateToOperator("subgroupClusteredMax", EOpSubgroupClusteredMax); symbolTable.relateToOperator("subgroupClusteredAnd", EOpSubgroupClusteredAnd); symbolTable.relateToOperator("subgroupClusteredOr", EOpSubgroupClusteredOr); symbolTable.relateToOperator("subgroupClusteredXor", EOpSubgroupClusteredXor); symbolTable.relateToOperator("subgroupQuadBroadcast", EOpSubgroupQuadBroadcast); symbolTable.relateToOperator("subgroupQuadSwapHorizontal", EOpSubgroupQuadSwapHorizontal); symbolTable.relateToOperator("subgroupQuadSwapVertical", EOpSubgroupQuadSwapVertical); symbolTable.relateToOperator("subgroupQuadSwapDiagonal", EOpSubgroupQuadSwapDiagonal); symbolTable.relateToOperator("subgroupPartitionNV", EOpSubgroupPartition); symbolTable.relateToOperator("subgroupPartitionedAddNV", EOpSubgroupPartitionedAdd); symbolTable.relateToOperator("subgroupPartitionedMulNV", EOpSubgroupPartitionedMul); symbolTable.relateToOperator("subgroupPartitionedMinNV", EOpSubgroupPartitionedMin); symbolTable.relateToOperator("subgroupPartitionedMaxNV", EOpSubgroupPartitionedMax); symbolTable.relateToOperator("subgroupPartitionedAndNV", EOpSubgroupPartitionedAnd); symbolTable.relateToOperator("subgroupPartitionedOrNV", EOpSubgroupPartitionedOr); symbolTable.relateToOperator("subgroupPartitionedXorNV", EOpSubgroupPartitionedXor); symbolTable.relateToOperator("subgroupPartitionedInclusiveAddNV", EOpSubgroupPartitionedInclusiveAdd); symbolTable.relateToOperator("subgroupPartitionedInclusiveMulNV", EOpSubgroupPartitionedInclusiveMul); symbolTable.relateToOperator("subgroupPartitionedInclusiveMinNV", EOpSubgroupPartitionedInclusiveMin); symbolTable.relateToOperator("subgroupPartitionedInclusiveMaxNV", EOpSubgroupPartitionedInclusiveMax); symbolTable.relateToOperator("subgroupPartitionedInclusiveAndNV", EOpSubgroupPartitionedInclusiveAnd); symbolTable.relateToOperator("subgroupPartitionedInclusiveOrNV", EOpSubgroupPartitionedInclusiveOr); symbolTable.relateToOperator("subgroupPartitionedInclusiveXorNV", EOpSubgroupPartitionedInclusiveXor); symbolTable.relateToOperator("subgroupPartitionedExclusiveAddNV", EOpSubgroupPartitionedExclusiveAdd); symbolTable.relateToOperator("subgroupPartitionedExclusiveMulNV", EOpSubgroupPartitionedExclusiveMul); symbolTable.relateToOperator("subgroupPartitionedExclusiveMinNV", EOpSubgroupPartitionedExclusiveMin); symbolTable.relateToOperator("subgroupPartitionedExclusiveMaxNV", EOpSubgroupPartitionedExclusiveMax); symbolTable.relateToOperator("subgroupPartitionedExclusiveAndNV", EOpSubgroupPartitionedExclusiveAnd); symbolTable.relateToOperator("subgroupPartitionedExclusiveOrNV", EOpSubgroupPartitionedExclusiveOr); symbolTable.relateToOperator("subgroupPartitionedExclusiveXorNV", EOpSubgroupPartitionedExclusiveXor); } if (profile == EEsProfile) { symbolTable.relateToOperator("shadow2DEXT", EOpTexture); symbolTable.relateToOperator("shadow2DProjEXT", EOpTextureProj); } // GL_EXT_shader_quad_control if ((profile == EEsProfile && version >= 310) || (profile != EEsProfile && version >= 140)) { symbolTable.relateToOperator("subgroupQuadAll", EOpSubgroupQuadAll); symbolTable.relateToOperator("subgroupQuadAny", EOpSubgroupQuadAny); } if ((profile == EEsProfile && version >= 310) || (profile != EEsProfile && version >= 140)) { symbolTable.relateToOperator("textureWeightedQCOM", EOpImageSampleWeightedQCOM); symbolTable.relateToOperator("textureBoxFilterQCOM", EOpImageBoxFilterQCOM); symbolTable.relateToOperator("textureBlockMatchSADQCOM", EOpImageBlockMatchSADQCOM); symbolTable.relateToOperator("textureBlockMatchSSDQCOM", EOpImageBlockMatchSSDQCOM); symbolTable.relateToOperator("textureBlockMatchWindowSSDQCOM", EOpImageBlockMatchWindowSSDQCOM); symbolTable.relateToOperator("textureBlockMatchWindowSADQCOM", EOpImageBlockMatchWindowSADQCOM); symbolTable.relateToOperator("textureBlockMatchGatherSSDQCOM", EOpImageBlockMatchGatherSSDQCOM); symbolTable.relateToOperator("textureBlockMatchGatherSADQCOM", EOpImageBlockMatchGatherSADQCOM); } if (profile != EEsProfile && spvVersion.spv == 0) { symbolTable.relateToOperator("texture1DArray", EOpTexture); symbolTable.relateToOperator("texture2DArray", EOpTexture); symbolTable.relateToOperator("shadow1DArray", EOpTexture); symbolTable.relateToOperator("shadow2DArray", EOpTexture); symbolTable.relateToOperator("texture1DArrayLod", EOpTextureLod); symbolTable.relateToOperator("texture2DArrayLod", EOpTextureLod); symbolTable.relateToOperator("shadow1DArrayLod", EOpTextureLod); } symbolTable.relateToOperator("coopVecMatMulNV", EOpCooperativeVectorMatMulNV); symbolTable.relateToOperator("coopVecMatMulAddNV", EOpCooperativeVectorMatMulAddNV); symbolTable.relateToOperator("coopVecLoadNV", EOpCooperativeVectorLoadNV); symbolTable.relateToOperator("coopVecStoreNV", EOpCooperativeVectorStoreNV); symbolTable.relateToOperator("coopVecOuterProductAccumulateNV", EOpCooperativeVectorOuterProductAccumulateNV); symbolTable.relateToOperator("coopVecReduceSumAccumulateNV", EOpCooperativeVectorReduceSumAccumulateNV); } switch(language) { case EShLangVertex: break; case EShLangTessControl: case EShLangTessEvaluation: break; case EShLangGeometry: symbolTable.relateToOperator("EmitStreamVertex", EOpEmitStreamVertex); symbolTable.relateToOperator("EndStreamPrimitive", EOpEndStreamPrimitive); symbolTable.relateToOperator("EmitVertex", EOpEmitVertex); symbolTable.relateToOperator("EndPrimitive", EOpEndPrimitive); break; case EShLangFragment: if (profile != EEsProfile && version >= 400) { symbolTable.relateToOperator("dFdxFine", EOpDPdxFine); symbolTable.relateToOperator("dFdyFine", EOpDPdyFine); symbolTable.relateToOperator("fwidthFine", EOpFwidthFine); symbolTable.relateToOperator("dFdxCoarse", EOpDPdxCoarse); symbolTable.relateToOperator("dFdyCoarse", EOpDPdyCoarse); symbolTable.relateToOperator("fwidthCoarse", EOpFwidthCoarse); } if (profile != EEsProfile && version >= 460) { symbolTable.relateToOperator("rayQueryInitializeEXT", EOpRayQueryInitialize); symbolTable.relateToOperator("rayQueryTerminateEXT", EOpRayQueryTerminate); symbolTable.relateToOperator("rayQueryGenerateIntersectionEXT", EOpRayQueryGenerateIntersection); symbolTable.relateToOperator("rayQueryConfirmIntersectionEXT", EOpRayQueryConfirmIntersection); symbolTable.relateToOperator("rayQueryProceedEXT", EOpRayQueryProceed); symbolTable.relateToOperator("rayQueryGetIntersectionTypeEXT", EOpRayQueryGetIntersectionType); symbolTable.relateToOperator("rayQueryGetRayTMinEXT", EOpRayQueryGetRayTMin); symbolTable.relateToOperator("rayQueryGetRayFlagsEXT", EOpRayQueryGetRayFlags); symbolTable.relateToOperator("rayQueryGetIntersectionTEXT", EOpRayQueryGetIntersectionT); symbolTable.relateToOperator("rayQueryGetIntersectionInstanceCustomIndexEXT", EOpRayQueryGetIntersectionInstanceCustomIndex); symbolTable.relateToOperator("rayQueryGetIntersectionInstanceIdEXT", EOpRayQueryGetIntersectionInstanceId); symbolTable.relateToOperator("rayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetEXT", EOpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffset); symbolTable.relateToOperator("rayQueryGetIntersectionGeometryIndexEXT", EOpRayQueryGetIntersectionGeometryIndex); symbolTable.relateToOperator("rayQueryGetIntersectionPrimitiveIndexEXT", EOpRayQueryGetIntersectionPrimitiveIndex); symbolTable.relateToOperator("rayQueryGetIntersectionBarycentricsEXT", EOpRayQueryGetIntersectionBarycentrics); symbolTable.relateToOperator("rayQueryGetIntersectionFrontFaceEXT", EOpRayQueryGetIntersectionFrontFace); symbolTable.relateToOperator("rayQueryGetIntersectionCandidateAABBOpaqueEXT", EOpRayQueryGetIntersectionCandidateAABBOpaque); symbolTable.relateToOperator("rayQueryGetIntersectionObjectRayDirectionEXT", EOpRayQueryGetIntersectionObjectRayDirection); symbolTable.relateToOperator("rayQueryGetIntersectionObjectRayOriginEXT", EOpRayQueryGetIntersectionObjectRayOrigin); symbolTable.relateToOperator("rayQueryGetWorldRayDirectionEXT", EOpRayQueryGetWorldRayDirection); symbolTable.relateToOperator("rayQueryGetWorldRayOriginEXT", EOpRayQueryGetWorldRayOrigin); symbolTable.relateToOperator("rayQueryGetIntersectionObjectToWorldEXT", EOpRayQueryGetIntersectionObjectToWorld); symbolTable.relateToOperator("rayQueryGetIntersectionWorldToObjectEXT", EOpRayQueryGetIntersectionWorldToObject); symbolTable.relateToOperator("rayQueryGetIntersectionTriangleVertexPositionsEXT", EOpRayQueryGetIntersectionTriangleVertexPositionsEXT); symbolTable.relateToOperator("rayQueryGetIntersectionClusterIdNV", EOpRayQueryGetIntersectionClusterIdNV); symbolTable.relateToOperator("rayQueryGetIntersectionSpherePositionNV", EOpRayQueryGetIntersectionSpherePositionNV); symbolTable.relateToOperator("rayQueryGetIntersectionSphereRadiusNV", EOpRayQueryGetIntersectionSphereRadiusNV); symbolTable.relateToOperator("rayQueryGetIntersectionLSSHitValueNV", EOpRayQueryGetIntersectionLSSHitValueNV); symbolTable.relateToOperator("rayQueryGetIntersectionLSSPositionsNV", EOpRayQueryGetIntersectionLSSPositionsNV); symbolTable.relateToOperator("rayQueryGetIntersectionLSSRadiiNV", EOpRayQueryGetIntersectionLSSRadiiNV); symbolTable.relateToOperator("rayQueryIsSphereHitNV", EOpRayQueryIsSphereHitNV); symbolTable.relateToOperator("rayQueryIsLSSHitNV", EOpRayQueryIsLSSHitNV); } symbolTable.relateToOperator("interpolateAtCentroid", EOpInterpolateAtCentroid); symbolTable.relateToOperator("interpolateAtSample", EOpInterpolateAtSample); symbolTable.relateToOperator("interpolateAtOffset", EOpInterpolateAtOffset); if (profile != EEsProfile) symbolTable.relateToOperator("interpolateAtVertexAMD", EOpInterpolateAtVertex); symbolTable.relateToOperator("beginInvocationInterlockARB", EOpBeginInvocationInterlock); symbolTable.relateToOperator("endInvocationInterlockARB", EOpEndInvocationInterlock); symbolTable.relateToOperator("stencilAttachmentReadEXT", EOpStencilAttachmentReadEXT); symbolTable.relateToOperator("depthAttachmentReadEXT", EOpDepthAttachmentReadEXT); symbolTable.relateToOperator("colorAttachmentReadEXT", EOpColorAttachmentReadEXT); break; case EShLangCompute: symbolTable.relateToOperator("subgroupMemoryBarrierShared", EOpSubgroupMemoryBarrierShared); if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 320)) { symbolTable.relateToOperator("dFdx", EOpDPdx); symbolTable.relateToOperator("dFdy", EOpDPdy); symbolTable.relateToOperator("fwidth", EOpFwidth); symbolTable.relateToOperator("dFdxFine", EOpDPdxFine); symbolTable.relateToOperator("dFdyFine", EOpDPdyFine); symbolTable.relateToOperator("fwidthFine", EOpFwidthFine); symbolTable.relateToOperator("dFdxCoarse", EOpDPdxCoarse); symbolTable.relateToOperator("dFdyCoarse", EOpDPdyCoarse); symbolTable.relateToOperator("fwidthCoarse",EOpFwidthCoarse); } symbolTable.relateToOperator("coopMatLoadNV", EOpCooperativeMatrixLoadNV); symbolTable.relateToOperator("coopMatStoreNV", EOpCooperativeMatrixStoreNV); symbolTable.relateToOperator("coopMatMulAddNV", EOpCooperativeMatrixMulAddNV); symbolTable.relateToOperator("coopMatLoad", EOpCooperativeMatrixLoad); symbolTable.relateToOperator("coopMatStore", EOpCooperativeMatrixStore); symbolTable.relateToOperator("coopMatMulAdd", EOpCooperativeMatrixMulAdd); symbolTable.relateToOperator("coopMatLoadTensorNV", EOpCooperativeMatrixLoadTensorNV); symbolTable.relateToOperator("coopMatStoreTensorNV", EOpCooperativeMatrixStoreTensorNV); symbolTable.relateToOperator("coopMatReduceNV", EOpCooperativeMatrixReduceNV); symbolTable.relateToOperator("coopMatPerElementNV", EOpCooperativeMatrixPerElementOpNV); symbolTable.relateToOperator("coopMatTransposeNV", EOpCooperativeMatrixTransposeNV); symbolTable.relateToOperator("createTensorLayoutNV", EOpCreateTensorLayoutNV); symbolTable.relateToOperator("setTensorLayoutBlockSizeNV", EOpTensorLayoutSetBlockSizeNV); symbolTable.relateToOperator("setTensorLayoutDimensionNV", EOpTensorLayoutSetDimensionNV); symbolTable.relateToOperator("setTensorLayoutStrideNV", EOpTensorLayoutSetStrideNV); symbolTable.relateToOperator("sliceTensorLayoutNV", EOpTensorLayoutSliceNV); symbolTable.relateToOperator("setTensorLayoutClampValueNV", EOpTensorLayoutSetClampValueNV); symbolTable.relateToOperator("createTensorViewNV", EOpCreateTensorViewNV); symbolTable.relateToOperator("setTensorViewDimensionsNV", EOpTensorViewSetDimensionNV); symbolTable.relateToOperator("setTensorViewStrideNV", EOpTensorViewSetStrideNV); symbolTable.relateToOperator("setTensorViewClipNV", EOpTensorViewSetClipNV); if (profile != EEsProfile && version >= 460) { symbolTable.relateToOperator("fetchMicroTriangleVertexPositionNV", EOpFetchMicroTriangleVertexPositionNV); symbolTable.relateToOperator("fetchMicroTriangleVertexBarycentricNV", EOpFetchMicroTriangleVertexBarycentricNV); } break; case EShLangRayGen: if (profile != EEsProfile && version >= 460) { symbolTable.relateToOperator("fetchMicroTriangleVertexPositionNV", EOpFetchMicroTriangleVertexPositionNV); symbolTable.relateToOperator("fetchMicroTriangleVertexBarycentricNV", EOpFetchMicroTriangleVertexBarycentricNV); } [[fallthrough]]; case EShLangClosestHit: case EShLangMiss: if (profile != EEsProfile && version >= 460) { symbolTable.relateToOperator("traceNV", EOpTraceNV); symbolTable.relateToOperator("traceRayMotionNV", EOpTraceRayMotionNV); symbolTable.relateToOperator("traceRayEXT", EOpTraceKHR); symbolTable.relateToOperator("executeCallableNV", EOpExecuteCallableNV); symbolTable.relateToOperator("executeCallableEXT", EOpExecuteCallableKHR); symbolTable.relateToOperator("hitObjectTraceRayNV", EOpHitObjectTraceRayNV); symbolTable.relateToOperator("hitObjectTraceRayMotionNV", EOpHitObjectTraceRayMotionNV); symbolTable.relateToOperator("hitObjectRecordHitNV", EOpHitObjectRecordHitNV); symbolTable.relateToOperator("hitObjectRecordHitMotionNV", EOpHitObjectRecordHitMotionNV); symbolTable.relateToOperator("hitObjectRecordHitWithIndexNV", EOpHitObjectRecordHitWithIndexNV); symbolTable.relateToOperator("hitObjectRecordHitWithIndexMotionNV", EOpHitObjectRecordHitWithIndexMotionNV); symbolTable.relateToOperator("hitObjectRecordMissNV", EOpHitObjectRecordMissNV); symbolTable.relateToOperator("hitObjectRecordMissMotionNV", EOpHitObjectRecordMissMotionNV); symbolTable.relateToOperator("hitObjectRecordEmptyNV", EOpHitObjectRecordEmptyNV); symbolTable.relateToOperator("hitObjectExecuteShaderNV", EOpHitObjectExecuteShaderNV); symbolTable.relateToOperator("hitObjectIsEmptyNV", EOpHitObjectIsEmptyNV); symbolTable.relateToOperator("hitObjectIsMissNV", EOpHitObjectIsMissNV); symbolTable.relateToOperator("hitObjectIsHitNV", EOpHitObjectIsHitNV); symbolTable.relateToOperator("hitObjectGetRayTMinNV", EOpHitObjectGetRayTMinNV); symbolTable.relateToOperator("hitObjectGetRayTMaxNV", EOpHitObjectGetRayTMaxNV); symbolTable.relateToOperator("hitObjectGetObjectRayOriginNV", EOpHitObjectGetObjectRayOriginNV); symbolTable.relateToOperator("hitObjectGetObjectRayDirectionNV", EOpHitObjectGetObjectRayDirectionNV); symbolTable.relateToOperator("hitObjectGetWorldRayOriginNV", EOpHitObjectGetWorldRayOriginNV); symbolTable.relateToOperator("hitObjectGetWorldRayDirectionNV", EOpHitObjectGetWorldRayDirectionNV); symbolTable.relateToOperator("hitObjectGetWorldToObjectNV", EOpHitObjectGetWorldToObjectNV); symbolTable.relateToOperator("hitObjectGetObjectToWorldNV", EOpHitObjectGetObjectToWorldNV); symbolTable.relateToOperator("hitObjectGetInstanceCustomIndexNV", EOpHitObjectGetInstanceCustomIndexNV); symbolTable.relateToOperator("hitObjectGetInstanceIdNV", EOpHitObjectGetInstanceIdNV); symbolTable.relateToOperator("hitObjectGetGeometryIndexNV", EOpHitObjectGetGeometryIndexNV); symbolTable.relateToOperator("hitObjectGetPrimitiveIndexNV", EOpHitObjectGetPrimitiveIndexNV); symbolTable.relateToOperator("hitObjectGetHitKindNV", EOpHitObjectGetHitKindNV); symbolTable.relateToOperator("hitObjectGetAttributesNV", EOpHitObjectGetAttributesNV); symbolTable.relateToOperator("hitObjectGetCurrentTimeNV", EOpHitObjectGetCurrentTimeNV); symbolTable.relateToOperator("hitObjectGetShaderBindingTableRecordIndexNV", EOpHitObjectGetShaderBindingTableRecordIndexNV); symbolTable.relateToOperator("hitObjectGetShaderRecordBufferHandleNV", EOpHitObjectGetShaderRecordBufferHandleNV); symbolTable.relateToOperator("hitObjectGetClusterIdNV", EOpHitObjectGetClusterIdNV); symbolTable.relateToOperator("reorderThreadNV", EOpReorderThreadNV); symbolTable.relateToOperator("hitObjectGetSpherePositionNV", EOpHitObjectGetSpherePositionNV); symbolTable.relateToOperator("hitObjectGetSphereRadiusNV", EOpHitObjectGetSphereRadiusNV); symbolTable.relateToOperator("hitObjectGetLSSPositionsNV", EOpHitObjectGetLSSPositionsNV); symbolTable.relateToOperator("hitObjectGetLSSRadiiNV", EOpHitObjectGetLSSRadiiNV); symbolTable.relateToOperator("hitObjectIsSphereHitNV", EOpHitObjectIsSphereHitNV); symbolTable.relateToOperator("hitObjectIsLSSHitNV", EOpHitObjectIsLSSHitNV); } break; case EShLangIntersect: if (profile != EEsProfile && version >= 460) { symbolTable.relateToOperator("reportIntersectionNV", EOpReportIntersection); symbolTable.relateToOperator("reportIntersectionEXT", EOpReportIntersection); } break; case EShLangAnyHit: if (profile != EEsProfile && version >= 460) { symbolTable.relateToOperator("ignoreIntersectionNV", EOpIgnoreIntersectionNV); symbolTable.relateToOperator("terminateRayNV", EOpTerminateRayNV); } break; case EShLangCallable: if (profile != EEsProfile && version >= 460) { symbolTable.relateToOperator("executeCallableNV", EOpExecuteCallableNV); symbolTable.relateToOperator("executeCallableEXT", EOpExecuteCallableKHR); } break; case EShLangMesh: if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 320)) { symbolTable.relateToOperator("writePackedPrimitiveIndices4x8NV", EOpWritePackedPrimitiveIndices4x8NV); symbolTable.relateToOperator("memoryBarrierShared", EOpMemoryBarrierShared); symbolTable.relateToOperator("groupMemoryBarrier", EOpGroupMemoryBarrier); symbolTable.relateToOperator("subgroupMemoryBarrierShared", EOpSubgroupMemoryBarrierShared); } if (profile != EEsProfile && version >= 450) { symbolTable.relateToOperator("SetMeshOutputsEXT", EOpSetMeshOutputsEXT); } if (profile != EEsProfile && version >= 460) { // Builtins for GL_NV_displacement_micromap. symbolTable.relateToOperator("fetchMicroTriangleVertexPositionNV", EOpFetchMicroTriangleVertexPositionNV); symbolTable.relateToOperator("fetchMicroTriangleVertexBarycentricNV", EOpFetchMicroTriangleVertexBarycentricNV); } break; case EShLangTask: if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 320)) { symbolTable.relateToOperator("memoryBarrierShared", EOpMemoryBarrierShared); symbolTable.relateToOperator("groupMemoryBarrier", EOpGroupMemoryBarrier); symbolTable.relateToOperator("subgroupMemoryBarrierShared", EOpSubgroupMemoryBarrierShared); } if (profile != EEsProfile && version >= 450) { symbolTable.relateToOperator("EmitMeshTasksEXT", EOpEmitMeshTasksEXT); } break; default: assert(false && "Language not supported"); } } // // Add context-dependent (resource-specific) built-ins not handled by the above. These // would be ones that need to be programmatically added because they cannot // be added by simple text strings. For these, also // 1) Map built-in functions to operators, for those that will turn into an operation node // instead of remaining a function call. // 2) Tag extension-related symbols added to their base version with their extensions, so // that if an early version has the extension turned off, there is an error reported on use. // void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion& spvVersion, EShLanguage language, TSymbolTable& symbolTable, const TBuiltInResource &resources) { if (profile != EEsProfile && version >= 430 && version < 440) { symbolTable.setVariableExtensions("gl_MaxTransformFeedbackBuffers", 1, &E_GL_ARB_enhanced_layouts); symbolTable.setVariableExtensions("gl_MaxTransformFeedbackInterleavedComponents", 1, &E_GL_ARB_enhanced_layouts); } if (profile != EEsProfile && version >= 130 && version < 420) { symbolTable.setVariableExtensions("gl_MinProgramTexelOffset", 1, &E_GL_ARB_shading_language_420pack); symbolTable.setVariableExtensions("gl_MaxProgramTexelOffset", 1, &E_GL_ARB_shading_language_420pack); } if (profile != EEsProfile && version >= 150 && version < 410) symbolTable.setVariableExtensions("gl_MaxViewports", 1, &E_GL_ARB_viewport_array); switch(language) { case EShLangFragment: // Set up gl_FragData based on current array size. if (version == 100 || IncludeLegacy(version, profile, spvVersion) || (! ForwardCompatibility && profile != EEsProfile && version < 420)) { TPrecisionQualifier pq = profile == EEsProfile ? EpqMedium : EpqNone; TType fragData(EbtFloat, EvqFragColor, pq, 4); TArraySizes* arraySizes = new TArraySizes; arraySizes->addInnerSize(resources.maxDrawBuffers); fragData.transferArraySizes(arraySizes); symbolTable.insert(*new TVariable(NewPoolTString("gl_FragData"), fragData)); SpecialQualifier("gl_FragData", EvqFragColor, EbvFragData, symbolTable); } // GL_EXT_blend_func_extended if (profile == EEsProfile && version >= 100) { symbolTable.setVariableExtensions("gl_MaxDualSourceDrawBuffersEXT", 1, &E_GL_EXT_blend_func_extended); symbolTable.setVariableExtensions("gl_SecondaryFragColorEXT", 1, &E_GL_EXT_blend_func_extended); symbolTable.setVariableExtensions("gl_SecondaryFragDataEXT", 1, &E_GL_EXT_blend_func_extended); SpecialQualifier("gl_SecondaryFragColorEXT", EvqVaryingOut, EbvSecondaryFragColorEXT, symbolTable); SpecialQualifier("gl_SecondaryFragDataEXT", EvqVaryingOut, EbvSecondaryFragDataEXT, symbolTable); } break; case EShLangTessControl: case EShLangTessEvaluation: // Because of the context-dependent array size (gl_MaxPatchVertices), // these variables were added later than the others and need to be mapped now. // standard members BuiltInVariable("gl_in", "gl_Position", EbvPosition, symbolTable); BuiltInVariable("gl_in", "gl_PointSize", EbvPointSize, symbolTable); BuiltInVariable("gl_in", "gl_ClipDistance", EbvClipDistance, symbolTable); BuiltInVariable("gl_in", "gl_CullDistance", EbvCullDistance, symbolTable); // compatibility members BuiltInVariable("gl_in", "gl_ClipVertex", EbvClipVertex, symbolTable); BuiltInVariable("gl_in", "gl_FrontColor", EbvFrontColor, symbolTable); BuiltInVariable("gl_in", "gl_BackColor", EbvBackColor, symbolTable); BuiltInVariable("gl_in", "gl_FrontSecondaryColor", EbvFrontSecondaryColor, symbolTable); BuiltInVariable("gl_in", "gl_BackSecondaryColor", EbvBackSecondaryColor, symbolTable); BuiltInVariable("gl_in", "gl_TexCoord", EbvTexCoord, symbolTable); BuiltInVariable("gl_in", "gl_FogFragCoord", EbvFogFragCoord, symbolTable); symbolTable.setVariableExtensions("gl_in", "gl_SecondaryPositionNV", 1, &E_GL_NV_stereo_view_rendering); symbolTable.setVariableExtensions("gl_in", "gl_PositionPerViewNV", 1, &E_GL_NVX_multiview_per_view_attributes); BuiltInVariable("gl_in", "gl_SecondaryPositionNV", EbvSecondaryPositionNV, symbolTable); BuiltInVariable("gl_in", "gl_PositionPerViewNV", EbvPositionPerViewNV, symbolTable); // extension requirements if (profile == EEsProfile) { symbolTable.setVariableExtensions("gl_in", "gl_PointSize", Num_AEP_tessellation_point_size, AEP_tessellation_point_size); } break; default: break; } } } // end namespace glslang ================================================ FILE: src/libraries/glslang/glslang/MachineIndependent/Initialize.h ================================================ // // Copyright (C) 2002-2005 3Dlabs Inc. Ltd. // Copyright (C) 2013-2016 LunarG, Inc. // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following // disclaimer in the documentation and/or other materials provided // with the distribution. // // Neither the name of 3Dlabs Inc. Ltd. nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // #ifndef _INITIALIZE_INCLUDED_ #define _INITIALIZE_INCLUDED_ #include "../Include/ResourceLimits.h" #include "../Include/Common.h" #include "../Include/ShHandle.h" #include "SymbolTable.h" #include "Versions.h" namespace glslang { // // This is made to hold parseable strings for almost all the built-in // functions and variables for one specific combination of version // and profile. (Some still need to be added programmatically.) // This is a base class for language-specific derivations, which // can be used for language independent builtins. // // The strings are organized by // commonBuiltins: intersection of all stages' built-ins, processed just once // stageBuiltins[]: anything a stage needs that's not in commonBuiltins // class TBuiltInParseables { public: POOL_ALLOCATOR_NEW_DELETE(GetThreadPoolAllocator()) TBuiltInParseables(); virtual ~TBuiltInParseables(); virtual void initialize(int version, EProfile, const SpvVersion& spvVersion) = 0; virtual void initialize(const TBuiltInResource& resources, int version, EProfile, const SpvVersion& spvVersion, EShLanguage) = 0; virtual const TString& getCommonString() const { return commonBuiltins; } virtual const TString& getStageString(EShLanguage language) const { return stageBuiltins[language]; } virtual void identifyBuiltIns(int version, EProfile profile, const SpvVersion& spvVersion, EShLanguage language, TSymbolTable& symbolTable) = 0; virtual void identifyBuiltIns(int version, EProfile profile, const SpvVersion& spvVersion, EShLanguage language, TSymbolTable& symbolTable, const TBuiltInResource &resources) = 0; protected: TString commonBuiltins; TString stageBuiltins[EShLangCount]; }; // // This is a GLSL specific derivation of TBuiltInParseables. To present a stable // interface and match other similar code, it is called TBuiltIns, rather // than TBuiltInParseablesGlsl. // class TBuiltIns : public TBuiltInParseables { public: POOL_ALLOCATOR_NEW_DELETE(GetThreadPoolAllocator()) TBuiltIns(); virtual ~TBuiltIns(); void initialize(int version, EProfile, const SpvVersion& spvVersion); void initialize(const TBuiltInResource& resources, int version, EProfile, const SpvVersion& spvVersion, EShLanguage); void identifyBuiltIns(int version, EProfile profile, const SpvVersion& spvVersion, EShLanguage language, TSymbolTable& symbolTable); void identifyBuiltIns(int version, EProfile profile, const SpvVersion& spvVersion, EShLanguage language, TSymbolTable& symbolTable, const TBuiltInResource &resources); protected: void addTabledBuiltins(int version, EProfile profile, const SpvVersion& spvVersion); void relateTabledBuiltins(int version, EProfile profile, const SpvVersion& spvVersion, EShLanguage, TSymbolTable&); void add2ndGenerationSamplingImaging(int version, EProfile profile, const SpvVersion& spvVersion); void addSubpassSampling(TSampler, const TString& typeName, int version, EProfile profile); void addQueryFunctions(TSampler, const TString& typeName, int version, EProfile profile); void addImageFunctions(TSampler, const TString& typeName, int version, EProfile profile); void addSamplingFunctions(TSampler, const TString& typeName, int version, EProfile profile); void addGatherFunctions(TSampler, const TString& typeName, int version, EProfile profile); // Helpers for making textual representations of the permutations // of texturing/imaging functions. const char* postfixes[5]; const char* prefixes[EbtNumTypes]; int dimMap[EsdNumDims]; }; // change this back to false if depending on textual spellings of texturing calls when consuming the AST // Using PureOperatorBuiltins=false is deprecated. constexpr bool PureOperatorBuiltins = true; } // end namespace glslang #endif // _INITIALIZE_INCLUDED_ ================================================ FILE: src/libraries/glslang/glslang/MachineIndependent/IntermTraverse.cpp ================================================ // // Copyright (C) 2002-2005 3Dlabs Inc. Ltd. // Copyright (C) 2013 LunarG, Inc. // Copyright (c) 2002-2010 The ANGLE Project Authors. // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following // disclaimer in the documentation and/or other materials provided // with the distribution. // // Neither the name of 3Dlabs Inc. Ltd. nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // #include "../Include/intermediate.h" namespace glslang { // // Traverse the intermediate representation tree, and // call a node type specific function for each node. // Done recursively through the member function Traverse(). // Node types can be skipped if their function to call is 0, // but their subtree will still be traversed. // Nodes with children can have their whole subtree skipped // if preVisit is turned on and the type specific function // returns false. // // preVisit, postVisit, and rightToLeft control what order // nodes are visited in. // // // Traversal functions for terminals are straightforward.... // void TIntermMethod::traverse(TIntermTraverser*) { // Tree should always resolve all methods as a non-method. } void TIntermSymbol::traverse(TIntermTraverser *it) { it->visitSymbol(this); } void TIntermConstantUnion::traverse(TIntermTraverser *it) { it->visitConstantUnion(this); } const TString& TIntermSymbol::getAccessName() const { if (getBasicType() == EbtBlock) return getType().getTypeName(); else return getName(); } // // Traverse a binary node. // void TIntermBinary::traverse(TIntermTraverser *it) { bool visit = true; // // visit the node before children if pre-visiting. // if (it->preVisit) visit = it->visitBinary(EvPreVisit, this); // // Visit the children, in the right order. // if (visit) { it->incrementDepth(this); if (it->rightToLeft) { if (right) right->traverse(it); if (it->inVisit) visit = it->visitBinary(EvInVisit, this); if (visit && left) left->traverse(it); } else { if (left) left->traverse(it); if (it->inVisit) visit = it->visitBinary(EvInVisit, this); if (visit && right) right->traverse(it); } it->decrementDepth(); } // // Visit the node after the children, if requested and the traversal // hasn't been canceled yet. // if (visit && it->postVisit) it->visitBinary(EvPostVisit, this); } // // Traverse a unary node. Same comments in binary node apply here. // void TIntermUnary::traverse(TIntermTraverser *it) { bool visit = true; if (it->preVisit) visit = it->visitUnary(EvPreVisit, this); if (visit) { it->incrementDepth(this); operand->traverse(it); it->decrementDepth(); } if (visit && it->postVisit) it->visitUnary(EvPostVisit, this); } // // Traverse an aggregate node. Same comments in binary node apply here. // void TIntermAggregate::traverse(TIntermTraverser *it) { bool visit = true; if (it->preVisit) visit = it->visitAggregate(EvPreVisit, this); if (visit) { it->incrementDepth(this); if (it->rightToLeft) { for (TIntermSequence::reverse_iterator sit = sequence.rbegin(); sit != sequence.rend(); sit++) { (*sit)->traverse(it); if (visit && it->inVisit) { if (*sit != sequence.front()) visit = it->visitAggregate(EvInVisit, this); } } } else { for (TIntermSequence::iterator sit = sequence.begin(); sit != sequence.end(); sit++) { (*sit)->traverse(it); if (visit && it->inVisit) { if (*sit != sequence.back()) visit = it->visitAggregate(EvInVisit, this); } } } it->decrementDepth(); } if (visit && it->postVisit) it->visitAggregate(EvPostVisit, this); } // // Traverse a selection node. Same comments in binary node apply here. // void TIntermSelection::traverse(TIntermTraverser *it) { bool visit = true; if (it->preVisit) visit = it->visitSelection(EvPreVisit, this); if (visit) { it->incrementDepth(this); if (it->rightToLeft) { if (falseBlock) falseBlock->traverse(it); if (trueBlock) trueBlock->traverse(it); condition->traverse(it); } else { condition->traverse(it); if (trueBlock) trueBlock->traverse(it); if (falseBlock) falseBlock->traverse(it); } it->decrementDepth(); } if (visit && it->postVisit) it->visitSelection(EvPostVisit, this); } // // Traverse a loop node. Same comments in binary node apply here. // void TIntermLoop::traverse(TIntermTraverser *it) { bool visit = true; if (it->preVisit) visit = it->visitLoop(EvPreVisit, this); if (visit) { it->incrementDepth(this); if (it->rightToLeft) { if (terminal) terminal->traverse(it); if (body) body->traverse(it); if (test) test->traverse(it); } else { if (test) test->traverse(it); if (body) body->traverse(it); if (terminal) terminal->traverse(it); } it->decrementDepth(); } if (visit && it->postVisit) it->visitLoop(EvPostVisit, this); } // // Traverse a branch node. Same comments in binary node apply here. // void TIntermBranch::traverse(TIntermTraverser *it) { bool visit = true; if (it->preVisit) visit = it->visitBranch(EvPreVisit, this); if (visit && expression) { it->incrementDepth(this); expression->traverse(it); it->decrementDepth(); } if (visit && it->postVisit) it->visitBranch(EvPostVisit, this); } // // Traverse a switch node. // void TIntermSwitch::traverse(TIntermTraverser* it) { bool visit = true; if (it->preVisit) visit = it->visitSwitch(EvPreVisit, this); if (visit) { it->incrementDepth(this); if (it->rightToLeft) { body->traverse(it); condition->traverse(it); } else { condition->traverse(it); body->traverse(it); } it->decrementDepth(); } if (visit && it->postVisit) it->visitSwitch(EvPostVisit, this); } } // end namespace glslang ================================================ FILE: src/libraries/glslang/glslang/MachineIndependent/Intermediate.cpp ================================================ // // Copyright (C) 2002-2005 3Dlabs Inc. Ltd. // Copyright (C) 2012-2015 LunarG, Inc. // Copyright (C) 2015-2020 Google, Inc. // Copyright (C) 2017 ARM Limited. // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following // disclaimer in the documentation and/or other materials provided // with the distribution. // // Neither the name of 3Dlabs Inc. Ltd. nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // // // Build the intermediate representation. // #include "localintermediate.h" #include "RemoveTree.h" #include "SymbolTable.h" #include "propagateNoContraction.h" #include #include #include #include namespace glslang { //////////////////////////////////////////////////////////////////////////// // // First set of functions are to help build the intermediate representation. // These functions are not member functions of the nodes. // They are called from parser productions. // ///////////////////////////////////////////////////////////////////////////// // // Add a terminal node for an identifier in an expression. // // Returns the added node. // TIntermSymbol* TIntermediate::addSymbol(long long id, const TString& name, const TString& mangledName, const TType& type, const TConstUnionArray& constArray, TIntermTyped* constSubtree, const TSourceLoc& loc) { TIntermSymbol* node = new TIntermSymbol(id, name, getStage(), type, &mangledName); node->setLoc(loc); node->setConstArray(constArray); node->setConstSubtree(constSubtree); return node; } TIntermSymbol* TIntermediate::addSymbol(const TIntermSymbol& intermSymbol) { return addSymbol(intermSymbol.getId(), intermSymbol.getName(), intermSymbol.getMangledName(), intermSymbol.getType(), intermSymbol.getConstArray(), intermSymbol.getConstSubtree(), intermSymbol.getLoc()); } TIntermSymbol* TIntermediate::addSymbol(const TVariable& variable) { glslang::TSourceLoc loc; // just a null location loc.init(); return addSymbol(variable, loc); } TIntermSymbol* TIntermediate::addSymbol(const TVariable& variable, const TSourceLoc& loc) { return addSymbol(variable.getUniqueId(), variable.getName(), variable.getMangledName(), variable.getType(), variable.getConstArray(), variable.getConstSubtree(), loc); } TIntermSymbol* TIntermediate::addSymbol(const TType& type, const TSourceLoc& loc) { TConstUnionArray unionArray; // just a null constant return addSymbol(0, "", "", type, unionArray, nullptr, loc); } // // Connect two nodes with a new parent that does a binary operation on the nodes. // // Returns the added node. // // Returns nullptr if the working conversions and promotions could not be found. // TIntermTyped* TIntermediate::addBinaryMath(TOperator op, TIntermTyped* left, TIntermTyped* right, const TSourceLoc& loc) { // No operations work on blocks if (left->getType().getBasicType() == EbtBlock || right->getType().getBasicType() == EbtBlock) return nullptr; // Convert "reference +/- int" and "reference - reference" to integer math if (op == EOpAdd || op == EOpSub) { // No addressing math on struct with unsized array. if ((left->isReference() && left->getType().getReferentType()->containsUnsizedArray()) || (right->isReference() && right->getType().getReferentType()->containsUnsizedArray())) { return nullptr; } if (left->isReference() && isTypeInt(right->getBasicType())) { const TType& referenceType = left->getType(); TIntermConstantUnion* size = addConstantUnion((unsigned long long)computeBufferReferenceTypeSize(left->getType()), loc, true); left = addBuiltInFunctionCall(loc, EOpConvPtrToUint64, true, left, TType(EbtUint64)); right = createConversion(EbtInt64, right); right = addBinaryMath(EOpMul, right, size, loc); TIntermTyped *node = addBinaryMath(op, left, right, loc); node = addBuiltInFunctionCall(loc, EOpConvUint64ToPtr, true, node, referenceType); return node; } } if (op == EOpAdd && right->isReference() && isTypeInt(left->getBasicType())) { const TType& referenceType = right->getType(); TIntermConstantUnion* size = addConstantUnion((unsigned long long)computeBufferReferenceTypeSize(right->getType()), loc, true); right = addBuiltInFunctionCall(loc, EOpConvPtrToUint64, true, right, TType(EbtUint64)); left = createConversion(EbtInt64, left); left = addBinaryMath(EOpMul, left, size, loc); TIntermTyped *node = addBinaryMath(op, left, right, loc); node = addBuiltInFunctionCall(loc, EOpConvUint64ToPtr, true, node, referenceType); return node; } if (op == EOpSub && left->isReference() && right->isReference()) { TIntermConstantUnion* size = addConstantUnion((long long)computeBufferReferenceTypeSize(left->getType()), loc, true); left = addBuiltInFunctionCall(loc, EOpConvPtrToUint64, true, left, TType(EbtUint64)); right = addBuiltInFunctionCall(loc, EOpConvPtrToUint64, true, right, TType(EbtUint64)); left = addBuiltInFunctionCall(loc, EOpConvNumeric, true, left, TType(EbtInt64)); right = addBuiltInFunctionCall(loc, EOpConvNumeric, true, right, TType(EbtInt64)); left = addBinaryMath(EOpSub, left, right, loc); TIntermTyped *node = addBinaryMath(EOpDiv, left, size, loc); return node; } // No other math operators supported on references if (left->isReference() || right->isReference()) return nullptr; // Try converting the children's base types to compatible types. auto children = addPairConversion(op, left, right); left = std::get<0>(children); right = std::get<1>(children); if (left == nullptr || right == nullptr) return nullptr; // Convert the children's type shape to be compatible. addBiShapeConversion(op, left, right); if (left == nullptr || right == nullptr) return nullptr; // // Need a new node holding things together. Make // one and promote it to the right type. // TIntermBinary* node = addBinaryNode(op, left, right, loc); if (! promote(node)) return nullptr; node->updatePrecision(); // // If they are both (non-specialization) constants, they must be folded. // (Unless it's the sequence (comma) operator, but that's handled in addComma().) // TIntermConstantUnion *leftTempConstant = node->getLeft()->getAsConstantUnion(); TIntermConstantUnion *rightTempConstant = node->getRight()->getAsConstantUnion(); if (leftTempConstant && rightTempConstant) { TIntermTyped* folded = leftTempConstant->fold(node->getOp(), rightTempConstant); if (folded) return folded; } // If can propagate spec-constantness and if the operation is an allowed // specialization-constant operation, make a spec-constant. if (specConstantPropagates(*node->getLeft(), *node->getRight()) && isSpecializationOperation(*node)) node->getWritableType().getQualifier().makeSpecConstant(); // If must propagate nonuniform, make a nonuniform. if ((node->getLeft()->getQualifier().isNonUniform() || node->getRight()->getQualifier().isNonUniform()) && isNonuniformPropagating(node->getOp())) node->getWritableType().getQualifier().nonUniform = true; return node; } // // Low level: add binary node (no promotions or other argument modifications) // TIntermBinary* TIntermediate::addBinaryNode(TOperator op, TIntermTyped* left, TIntermTyped* right, const TSourceLoc& loc) const { // build the node TIntermBinary* node = new TIntermBinary(op); node->setLoc(loc.line != 0 ? loc : left->getLoc()); node->setLeft(left); node->setRight(right); return node; } // // like non-type form, but sets node's type. // TIntermBinary* TIntermediate::addBinaryNode(TOperator op, TIntermTyped* left, TIntermTyped* right, const TSourceLoc& loc, const TType& type) const { TIntermBinary* node = addBinaryNode(op, left, right, loc); node->setType(type); return node; } // // Low level: add unary node (no promotions or other argument modifications) // TIntermUnary* TIntermediate::addUnaryNode(TOperator op, TIntermTyped* child, const TSourceLoc& loc) const { TIntermUnary* node = new TIntermUnary(op); node->setLoc(loc.line != 0 ? loc : child->getLoc()); node->setOperand(child); return node; } // // like non-type form, but sets node's type. // TIntermUnary* TIntermediate::addUnaryNode(TOperator op, TIntermTyped* child, const TSourceLoc& loc, const TType& type) const { TIntermUnary* node = addUnaryNode(op, child, loc); node->setType(type); return node; } // // Connect two nodes through an assignment. // // Returns the added node. // // Returns nullptr if the 'right' type could not be converted to match the 'left' type, // or the resulting operation cannot be properly promoted. // TIntermTyped* TIntermediate::addAssign(TOperator op, TIntermTyped* left, TIntermTyped* right, const TSourceLoc& loc) { // No block assignment if (left->getType().getBasicType() == EbtBlock || right->getType().getBasicType() == EbtBlock) return nullptr; // Convert "reference += int" to "reference = reference + int". We need this because the // "reference + int" calculation involves a cast back to the original type, which makes it // not an lvalue. if ((op == EOpAddAssign || op == EOpSubAssign) && left->isReference()) { if (!(right->getType().isScalar() && right->getType().isIntegerDomain())) return nullptr; TIntermTyped* node = addBinaryMath(op == EOpAddAssign ? EOpAdd : EOpSub, left, right, loc); if (!node) return nullptr; TIntermSymbol* symbol = left->getAsSymbolNode(); left = addSymbol(*symbol); node = addAssign(EOpAssign, left, node, loc); return node; } // // Like adding binary math, except the conversion can only go // from right to left. // // convert base types, nullptr return means not possible right = addConversion(op, left->getType(), right); if (right == nullptr) return nullptr; // convert shape right = addUniShapeConversion(op, left->getType(), right); // build the node TIntermBinary* node = addBinaryNode(op, left, right, loc); if (! promote(node)) return nullptr; node->updatePrecision(); return node; } // // Connect two nodes through an index operator, where the left node is the base // of an array or struct, and the right node is a direct or indirect offset. // // Returns the added node. // The caller should set the type of the returned node. // TIntermTyped* TIntermediate::addIndex(TOperator op, TIntermTyped* base, TIntermTyped* index, const TSourceLoc& loc) { // caller should set the type return addBinaryNode(op, base, index, loc); } // // Add one node as the parent of another that it operates on. // // Returns the added node. // TIntermTyped* TIntermediate::addUnaryMath(TOperator op, TIntermTyped* child, const TSourceLoc& loc) { if (child == nullptr) return nullptr; if (child->getType().getBasicType() == EbtBlock) return nullptr; switch (op) { case EOpLogicalNot: if (getSource() == EShSourceHlsl) { break; // HLSL can promote logical not } if (child->getType().getBasicType() != EbtBool || child->getType().isMatrix() || child->getType().isArray() || child->getType().isVector()) { return nullptr; } break; case EOpPostIncrement: case EOpPreIncrement: case EOpPostDecrement: case EOpPreDecrement: case EOpNegative: if (child->getType().getBasicType() == EbtStruct || child->getType().isArray()) return nullptr; break; default: break; // some compilers want this } // // Do we need to promote the operand? // TBasicType newType = EbtVoid; switch (op) { case EOpConstructBool: newType = EbtBool; break; case EOpConstructFloat: newType = EbtFloat; break; case EOpConstructInt: newType = EbtInt; break; case EOpConstructUint: newType = EbtUint; break; case EOpConstructInt8: newType = EbtInt8; break; case EOpConstructUint8: newType = EbtUint8; break; case EOpConstructInt16: newType = EbtInt16; break; case EOpConstructUint16: newType = EbtUint16; break; case EOpConstructInt64: newType = EbtInt64; break; case EOpConstructUint64: newType = EbtUint64; break; case EOpConstructDouble: newType = EbtDouble; break; case EOpConstructFloat16: newType = EbtFloat16; break; case EOpConstructBFloat16: newType = EbtBFloat16; break; case EOpConstructFloatE4M3: newType = EbtFloatE4M3; break; case EOpConstructFloatE5M2: newType = EbtFloatE5M2; break; default: break; // some compilers want this } if (newType != EbtVoid) { child = addConversion(op, TType(newType, EvqTemporary, child->getVectorSize(), child->getMatrixCols(), child->getMatrixRows(), child->isVector()), child); if (child == nullptr) return nullptr; } // // For constructors, we are now done, it was all in the conversion. // TODO: but, did this bypass constant folding? // switch (op) { case EOpConstructInt8: case EOpConstructUint8: case EOpConstructInt16: case EOpConstructUint16: case EOpConstructInt: case EOpConstructUint: case EOpConstructInt64: case EOpConstructUint64: case EOpConstructBool: case EOpConstructFloat: case EOpConstructDouble: case EOpConstructFloat16: case EOpConstructBFloat16: case EOpConstructFloatE5M2: case EOpConstructFloatE4M3: { TIntermUnary* unary_node = child->getAsUnaryNode(); if (unary_node != nullptr) unary_node->updatePrecision(); return child; } default: break; // some compilers want this } // // Make a new node for the operator. // TIntermUnary* node = addUnaryNode(op, child, loc); if (! promote(node)) return nullptr; node->updatePrecision(); // If it's a (non-specialization) constant, it must be folded. if (node->getOperand()->getAsConstantUnion()) return node->getOperand()->getAsConstantUnion()->fold(op, node->getType()); // If it's a specialization constant, the result is too, // if the operation is allowed for specialization constants. if (node->getOperand()->getType().getQualifier().isSpecConstant() && isSpecializationOperation(*node)) node->getWritableType().getQualifier().makeSpecConstant(); // If must propagate nonuniform, make a nonuniform. if (node->getOperand()->getQualifier().isNonUniform() && isNonuniformPropagating(node->getOp())) node->getWritableType().getQualifier().nonUniform = true; return node; } TIntermTyped* TIntermediate::addBuiltInFunctionCall(const TSourceLoc& loc, TOperator op, bool unary, TIntermNode* childNode, const TType& returnType) { if (unary) { // // Treat it like a unary operator. // addUnaryMath() should get the type correct on its own; // including constness (which would differ from the prototype). // TIntermTyped* child = childNode->getAsTyped(); if (child == nullptr) return nullptr; if (child->getAsConstantUnion()) { TIntermTyped* folded = child->getAsConstantUnion()->fold(op, returnType); if (folded) return folded; } return addUnaryNode(op, child, child->getLoc(), returnType); } else { // setAggregateOperater() calls fold() for constant folding TIntermTyped* node = setAggregateOperator(childNode, op, returnType, loc); return node; } } // // This is the safe way to change the operator on an aggregate, as it // does lots of error checking and fixing. Especially for establishing // a function call's operation on its set of parameters. Sequences // of instructions are also aggregates, but they just directly set // their operator to EOpSequence. // // Returns an aggregate node, which could be the one passed in if // it was already an aggregate. // TIntermTyped* TIntermediate::setAggregateOperator(TIntermNode* node, TOperator op, const TType& type, const TSourceLoc& loc) { TIntermAggregate* aggNode; // // Make sure we have an aggregate. If not turn it into one. // if (node != nullptr) { aggNode = node->getAsAggregate(); if (aggNode == nullptr || aggNode->getOp() != EOpNull) { // // Make an aggregate containing this node. // aggNode = new TIntermAggregate(); aggNode->getSequence().push_back(node); } } else aggNode = new TIntermAggregate(); // // Set the operator. // aggNode->setOperator(op); if (loc.line != 0 || node != nullptr) aggNode->setLoc(loc.line != 0 ? loc : node->getLoc()); aggNode->setType(type); return fold(aggNode); } bool TIntermediate::isConversionAllowed(TOperator op, TIntermTyped* node) const { // // Does the base type even allow the operation? // switch (node->getBasicType()) { case EbtVoid: return false; case EbtAtomicUint: case EbtSampler: case EbtAccStruct: // opaque types can be passed to functions if (op == EOpFunction) break; // HLSL can assign samplers directly (no constructor) if (getSource() == EShSourceHlsl && node->getBasicType() == EbtSampler) break; // samplers can get assigned via a sampler constructor // (well, not yet, but code in the rest of this function is ready for it) if (node->getBasicType() == EbtSampler && op == EOpAssign && node->getAsOperator() != nullptr && node->getAsOperator()->getOp() == EOpConstructTextureSampler) break; // otherwise, opaque types can't even be operated on, let alone converted return false; default: break; } return true; } bool TIntermediate::buildConvertOp(TBasicType dst, TBasicType src, TOperator& newOp) const { // (bfloat16_t,fp8) <-> bool not supported if (((src == EbtBFloat16 || src == EbtFloatE5M2 || src == EbtFloatE4M3) && dst == EbtBool) || ((dst == EbtBFloat16 || dst == EbtFloatE5M2 || dst == EbtFloatE4M3) && src == EbtBool)) { return false; } if ((isTypeInt(dst) || isTypeFloat(dst) || dst == EbtBool) && (isTypeInt(src) || isTypeFloat(src) || src == EbtBool)) { newOp = EOpConvNumeric; return true; } return false; } // This is 'mechanism' here, it does any conversion told. // It is about basic type, not about shape. // The policy comes from the shader or the calling code. TIntermTyped* TIntermediate::createConversion(TBasicType convertTo, TIntermTyped* node) const { // // Add a new newNode for the conversion. // bool convertToIntTypes = (convertTo == EbtInt8 || convertTo == EbtUint8 || convertTo == EbtInt16 || convertTo == EbtUint16 || convertTo == EbtInt || convertTo == EbtUint || convertTo == EbtInt64 || convertTo == EbtUint64); bool convertFromIntTypes = (node->getBasicType() == EbtInt8 || node->getBasicType() == EbtUint8 || node->getBasicType() == EbtInt16 || node->getBasicType() == EbtUint16 || node->getBasicType() == EbtInt || node->getBasicType() == EbtUint || node->getBasicType() == EbtInt64 || node->getBasicType() == EbtUint64); bool convertToFloatTypes = (convertTo == EbtFloat16 || convertTo == EbtBFloat16 || convertTo == EbtFloat || convertTo == EbtDouble || convertTo == EbtFloatE5M2 || convertTo == EbtFloatE4M3); bool convertFromFloatTypes = (node->getBasicType() == EbtFloat16 || node->getBasicType() == EbtBFloat16 || node->getBasicType() == EbtFloat || node->getBasicType() == EbtDouble || node->getBasicType() == EbtFloatE5M2 || node->getBasicType() == EbtFloatE4M3); if (((convertTo == EbtInt8 || convertTo == EbtUint8) && ! convertFromIntTypes) || ((node->getBasicType() == EbtInt8 || node->getBasicType() == EbtUint8) && ! convertToIntTypes)) { if (! getArithemeticInt8Enabled()) { return nullptr; } } if (((convertTo == EbtInt16 || convertTo == EbtUint16) && ! convertFromIntTypes) || ((node->getBasicType() == EbtInt16 || node->getBasicType() == EbtUint16) && ! convertToIntTypes)) { if (! getArithemeticInt16Enabled()) { return nullptr; } } if ((convertTo == EbtFloat16 && ! convertFromFloatTypes) || (node->getBasicType() == EbtFloat16 && ! convertToFloatTypes)) { if (! getArithemeticFloat16Enabled()) { return nullptr; } } TIntermUnary* newNode = nullptr; TOperator newOp = EOpNull; if (!buildConvertOp(convertTo, node->getBasicType(), newOp)) { return nullptr; } TType newType(convertTo, EvqTemporary, node->getVectorSize(), node->getMatrixCols(), node->getMatrixRows()); newNode = addUnaryNode(newOp, node, node->getLoc(), newType); if (node->getAsConstantUnion()) { // 8/16-bit storage extensions don't support 8/16-bit constants, so don't fold conversions // to those types if ((getArithemeticInt8Enabled() || !(convertTo == EbtInt8 || convertTo == EbtUint8)) && (getArithemeticInt16Enabled() || !(convertTo == EbtInt16 || convertTo == EbtUint16)) && (getArithemeticFloat16Enabled() || !(convertTo == EbtFloat16))) { TIntermTyped* folded = node->getAsConstantUnion()->fold(newOp, newType); if (folded) return folded; } } // Propagate specialization-constant-ness, if allowed if (node->getType().getQualifier().isSpecConstant() && isSpecializationOperation(*newNode)) newNode->getWritableType().getQualifier().makeSpecConstant(); return newNode; } TIntermTyped* TIntermediate::addConversion(TBasicType convertTo, TIntermTyped* node) const { return createConversion(convertTo, node); } // For converting a pair of operands to a binary operation to compatible // types with each other, relative to the operation in 'op'. // This does not cover assignment operations, which is asymmetric in that the // left type is not changeable. // See addConversion(op, type, node) for assignments and unary operation // conversions. // // Generally, this is focused on basic type conversion, not shape conversion. // See addShapeConversion() for shape conversions. // // Returns the converted pair of nodes. // Returns when there is no conversion. std::tuple TIntermediate::addPairConversion(TOperator op, TIntermTyped* node0, TIntermTyped* node1) { if (!isConversionAllowed(op, node0) || !isConversionAllowed(op, node1)) return std::make_tuple(nullptr, nullptr); if (node0->getType() != node1->getType()) { // If differing structure, then no conversions. if (node0->isStruct() || node1->isStruct()) return std::make_tuple(nullptr, nullptr); // If differing arrays, then no conversions. if (node0->getType().isArray() || node1->getType().isArray()) return std::make_tuple(nullptr, nullptr); // No implicit conversions for operations involving cooperative matrices if (node0->getType().isCoopMat() || node1->getType().isCoopMat()) return std::make_tuple(node0, node1); } auto promoteTo = std::make_tuple(EbtNumTypes, EbtNumTypes); switch (op) { // // List all the binary ops that can implicitly convert one operand to the other's type; // This implements the 'policy' for implicit type conversion. // case EOpLessThan: case EOpGreaterThan: case EOpLessThanEqual: case EOpGreaterThanEqual: case EOpEqual: case EOpNotEqual: case EOpAdd: case EOpSub: case EOpMul: case EOpDiv: case EOpMod: case EOpVectorTimesScalar: case EOpVectorTimesMatrix: case EOpMatrixTimesVector: case EOpMatrixTimesScalar: case EOpAnd: case EOpInclusiveOr: case EOpExclusiveOr: case EOpSequence: // used by ?: if (node0->getBasicType() == node1->getBasicType()) return std::make_tuple(node0, node1); promoteTo = getConversionDestinationType(node0->getBasicType(), node1->getBasicType(), op); if (std::get<0>(promoteTo) == EbtNumTypes || std::get<1>(promoteTo) == EbtNumTypes) return std::make_tuple(nullptr, nullptr); break; case EOpLogicalAnd: case EOpLogicalOr: case EOpLogicalXor: if (getSource() == EShSourceHlsl) promoteTo = std::make_tuple(EbtBool, EbtBool); else return std::make_tuple(node0, node1); break; // There are no conversions needed for GLSL; the shift amount just needs to be an // integer type, as does the base. // HLSL can promote bools to ints to make this work. case EOpLeftShift: case EOpRightShift: if (getSource() == EShSourceHlsl) { TBasicType node0BasicType = node0->getBasicType(); if (node0BasicType == EbtBool) node0BasicType = EbtInt; if (node1->getBasicType() == EbtBool) promoteTo = std::make_tuple(node0BasicType, EbtInt); else promoteTo = std::make_tuple(node0BasicType, node1->getBasicType()); } else { if (isTypeInt(node0->getBasicType()) && isTypeInt(node1->getBasicType())) return std::make_tuple(node0, node1); else return std::make_tuple(nullptr, nullptr); } break; default: if (node0->getType() == node1->getType()) return std::make_tuple(node0, node1); return std::make_tuple(nullptr, nullptr); } TIntermTyped* newNode0; TIntermTyped* newNode1; if (std::get<0>(promoteTo) != node0->getType().getBasicType()) { if (node0->getAsConstantUnion()) newNode0 = promoteConstantUnion(std::get<0>(promoteTo), node0->getAsConstantUnion()); else newNode0 = createConversion(std::get<0>(promoteTo), node0); } else newNode0 = node0; if (std::get<1>(promoteTo) != node1->getType().getBasicType()) { if (node1->getAsConstantUnion()) newNode1 = promoteConstantUnion(std::get<1>(promoteTo), node1->getAsConstantUnion()); else newNode1 = createConversion(std::get<1>(promoteTo), node1); } else newNode1 = node1; return std::make_tuple(newNode0, newNode1); } // // Convert the node's type to the given type, as allowed by the operation involved: 'op'. // For implicit conversions, 'op' is not the requested conversion, it is the explicit // operation requiring the implicit conversion. // // Binary operation conversions should be handled by addConversion(op, node, node), not here. // // Returns a node representing the conversion, which could be the same // node passed in if no conversion was needed. // // Generally, this is focused on basic type conversion, not shape conversion. // See addShapeConversion() for shape conversions. // // Return nullptr if a conversion can't be done. // TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TIntermTyped* node) { if (!isConversionAllowed(op, node)) return nullptr; // Otherwise, if types are identical, no problem if (type == node->getType()) return node; // If one's a structure, then no conversions. if (type.isStruct() || node->isStruct()) return nullptr; // If one's an array, then no conversions. if (type.isArray() || node->getType().isArray()) return nullptr; // Reject implicit conversions to cooperative matrix types if (node->getType().isCoopMat() && op != EOpConstructCooperativeMatrixNV && op != EOpConstructCooperativeMatrixKHR) return nullptr; if (node->getType().isTensorLayoutNV() || node->getType().isTensorViewNV()) return nullptr; // Reject implicit conversions to cooperative vector types if (node->getType().isCoopVecNV() && op != EOpConstructCooperativeVectorNV) return nullptr; // Note: callers are responsible for other aspects of shape, // like vector and matrix sizes. switch (op) { // // Explicit conversions (unary operations) // case EOpConstructBool: case EOpConstructFloat: case EOpConstructInt: case EOpConstructUint: case EOpConstructDouble: case EOpConstructFloat16: case EOpConstructBFloat16: case EOpConstructFloatE5M2: case EOpConstructFloatE4M3: case EOpConstructInt8: case EOpConstructUint8: case EOpConstructInt16: case EOpConstructUint16: case EOpConstructInt64: case EOpConstructUint64: case EOpConstructSaturated: break; // // Implicit conversions // case EOpLogicalNot: case EOpFunctionCall: case EOpReturn: case EOpAssign: case EOpAddAssign: case EOpSubAssign: case EOpMulAssign: case EOpVectorTimesScalarAssign: case EOpMatrixTimesScalarAssign: case EOpDivAssign: case EOpModAssign: case EOpAndAssign: case EOpInclusiveOrAssign: case EOpExclusiveOrAssign: case EOpAtan: case EOpClamp: case EOpCross: case EOpDistance: case EOpDot: case EOpDst: case EOpFaceForward: case EOpFma: case EOpFrexp: case EOpLdexp: case EOpMix: case EOpLit: case EOpMax: case EOpMin: case EOpMod: case EOpModf: case EOpPow: case EOpReflect: case EOpRefract: case EOpSmoothStep: case EOpStep: case EOpSequence: case EOpConstructStruct: case EOpConstructCooperativeMatrixNV: case EOpConstructCooperativeMatrixKHR: case EOpConstructCooperativeVectorNV: if (type.isReference() || node->getType().isReference()) { // types must match to assign a reference if (type == node->getType()) return node; else return nullptr; } if (type.getBasicType() == node->getType().getBasicType()) return node; if (! canImplicitlyPromote(node->getBasicType(), type.getBasicType(), op)) return nullptr; break; // For GLSL, there are no conversions needed; the shift amount just needs to be an // integer type, as do the base/result. // HLSL can convert the shift from a bool to an int. case EOpLeftShiftAssign: case EOpRightShiftAssign: { if (!(getSource() == EShSourceHlsl && node->getType().getBasicType() == EbtBool)) { if (isTypeInt(type.getBasicType()) && isTypeInt(node->getBasicType())) return node; else return nullptr; } break; } default: // default is to require a match; all exceptions should have case statements above if (type.getBasicType() == node->getType().getBasicType()) return node; else return nullptr; } bool canPromoteConstant = true; // GL_EXT_shader_16bit_storage can't do OpConstantComposite with // 16-bit types, so disable promotion for those types. // Many issues with this, from JohnK: // - this isn't really right to discuss SPIR-V here // - this could easily be entirely about scalars, so is overstepping // - we should be looking at what the shader asked for, and saying whether or // not it can be done, in the parser, by calling requireExtensions(), not // changing language sementics on the fly by asking what extensions are in use // - at the time of this writing (14-Aug-2020), no test results are changed by this. switch (op) { case EOpConstructBFloat16: case EOpConstructFloatE5M2: case EOpConstructFloatE4M3: canPromoteConstant = true; break; case EOpConstructFloat16: canPromoteConstant = numericFeatures.contains(TNumericFeatures::shader_explicit_arithmetic_types) || numericFeatures.contains(TNumericFeatures::shader_explicit_arithmetic_types_float16); break; case EOpConstructInt8: case EOpConstructUint8: canPromoteConstant = numericFeatures.contains(TNumericFeatures::shader_explicit_arithmetic_types) || numericFeatures.contains(TNumericFeatures::shader_explicit_arithmetic_types_int8); break; case EOpConstructInt16: case EOpConstructUint16: canPromoteConstant = numericFeatures.contains(TNumericFeatures::shader_explicit_arithmetic_types) || numericFeatures.contains(TNumericFeatures::shader_explicit_arithmetic_types_int16); break; default: break; } if (canPromoteConstant && node->getAsConstantUnion()) return promoteConstantUnion(type.getBasicType(), node->getAsConstantUnion()); // // Add a new newNode for the conversion. // TIntermTyped* newNode = createConversion(type.getBasicType(), node); return newNode; } // Convert the node's shape of type for the given type, as allowed by the // operation involved: 'op'. This is for situations where there is only one // direction to consider doing the shape conversion. // // This implements policy, it call addShapeConversion() for the mechanism. // // Generally, the AST represents allowed GLSL shapes, so this isn't needed // for GLSL. Bad shapes are caught in conversion or promotion. // // Return 'node' if no conversion was done. Promotion handles final shape // checking. // TIntermTyped* TIntermediate::addUniShapeConversion(TOperator op, const TType& type, TIntermTyped* node) { // some source languages don't do this switch (getSource()) { case EShSourceHlsl: break; case EShSourceGlsl: default: return node; } // some operations don't do this switch (op) { case EOpFunctionCall: case EOpReturn: break; case EOpMulAssign: // want to support vector *= scalar native ops in AST and lower, not smear, similarly for // matrix *= scalar, etc. case EOpAddAssign: case EOpSubAssign: case EOpDivAssign: case EOpAndAssign: case EOpInclusiveOrAssign: case EOpExclusiveOrAssign: case EOpRightShiftAssign: case EOpLeftShiftAssign: if (node->getVectorSize() == 1) return node; break; case EOpAssign: break; case EOpMix: break; default: return node; } return addShapeConversion(type, node); } // Convert the nodes' shapes to be compatible for the operation 'op'. // // This implements policy, it call addShapeConversion() for the mechanism. // // Generally, the AST represents allowed GLSL shapes, so this isn't needed // for GLSL. Bad shapes are caught in conversion or promotion. // void TIntermediate::addBiShapeConversion(TOperator op, TIntermTyped*& lhsNode, TIntermTyped*& rhsNode) { // some source languages don't do this switch (getSource()) { case EShSourceHlsl: break; case EShSourceGlsl: default: return; } // some operations don't do this // 'break' will mean attempt bidirectional conversion switch (op) { case EOpMulAssign: case EOpAssign: case EOpAddAssign: case EOpSubAssign: case EOpDivAssign: case EOpAndAssign: case EOpInclusiveOrAssign: case EOpExclusiveOrAssign: case EOpRightShiftAssign: case EOpLeftShiftAssign: // switch to unidirectional conversion (the lhs can't change) rhsNode = addUniShapeConversion(op, lhsNode->getType(), rhsNode); return; case EOpMul: // matrix multiply does not change shapes if (lhsNode->isMatrix() && rhsNode->isMatrix()) return; [[fallthrough]]; case EOpAdd: case EOpSub: case EOpDiv: // want to support vector * scalar native ops in AST and lower, not smear, similarly for // matrix * vector, etc. if (lhsNode->getVectorSize() == 1 || rhsNode->getVectorSize() == 1) return; break; case EOpRightShift: case EOpLeftShift: // can natively support the right operand being a scalar and the left a vector, // but not the reverse if (rhsNode->getVectorSize() == 1) return; break; case EOpLessThan: case EOpGreaterThan: case EOpLessThanEqual: case EOpGreaterThanEqual: case EOpEqual: case EOpNotEqual: case EOpLogicalAnd: case EOpLogicalOr: case EOpLogicalXor: case EOpAnd: case EOpInclusiveOr: case EOpExclusiveOr: case EOpMix: break; default: return; } // Do bidirectional conversions if (lhsNode->getType().isScalarOrVec1() || rhsNode->getType().isScalarOrVec1()) { if (lhsNode->getType().isScalarOrVec1()) lhsNode = addShapeConversion(rhsNode->getType(), lhsNode); else rhsNode = addShapeConversion(lhsNode->getType(), rhsNode); } lhsNode = addShapeConversion(rhsNode->getType(), lhsNode); rhsNode = addShapeConversion(lhsNode->getType(), rhsNode); } // Convert the node's shape of type for the given type, as allowed by the // operation involved: 'op'. // // Generally, the AST represents allowed GLSL shapes, so this isn't needed // for GLSL. Bad shapes are caught in conversion or promotion. // // Return 'node' if no conversion was done. Promotion handles final shape // checking. // TIntermTyped* TIntermediate::addShapeConversion(const TType& type, TIntermTyped* node) { // no conversion needed if (node->getType() == type) return node; // structures and arrays don't change shape, either to or from if (node->getType().isStruct() || node->getType().isArray() || type.isStruct() || type.isArray()) return node; // The new node that handles the conversion TOperator constructorOp = mapTypeToConstructorOp(type); if (getSource() == EShSourceHlsl) { // HLSL rules for scalar, vector and matrix conversions: // 1) scalar can become anything, initializing every component with its value // 2) vector and matrix can become scalar, first element is used (warning: truncation) // 3) matrix can become matrix with less rows and/or columns (warning: truncation) // 4) vector can become vector with less rows size (warning: truncation) // 5a) vector 4 can become 2x2 matrix (special case) (same packing layout, its a reinterpret) // 5b) 2x2 matrix can become vector 4 (special case) (same packing layout, its a reinterpret) const TType &sourceType = node->getType(); // rule 1 for scalar to matrix is special if (sourceType.isScalarOrVec1() && type.isMatrix()) { // HLSL semantics: the scalar (or vec1) is replicated to every component of the matrix. Left to its // own devices, the constructor from a scalar would populate the diagonal. This forces replication // to every matrix element. // Note that if the node is complex (e.g, a function call), we don't want to duplicate it here // repeatedly, so we copy it to a temp, then use the temp. const int matSize = type.computeNumComponents(); TIntermAggregate* rhsAggregate = new TIntermAggregate(); const bool isSimple = (node->getAsSymbolNode() != nullptr) || (node->getAsConstantUnion() != nullptr); if (!isSimple) { assert(0); // TODO: use node replicator service when available. } for (int x = 0; x < matSize; ++x) rhsAggregate->getSequence().push_back(node); return setAggregateOperator(rhsAggregate, constructorOp, type, node->getLoc()); } // rule 1 and 2 if ((sourceType.isScalar() && !type.isScalar()) || (!sourceType.isScalar() && type.isScalar())) return setAggregateOperator(makeAggregate(node), constructorOp, type, node->getLoc()); // rule 3 and 5b if (sourceType.isMatrix()) { // rule 3 if (type.isMatrix()) { if ((sourceType.getMatrixCols() != type.getMatrixCols() || sourceType.getMatrixRows() != type.getMatrixRows()) && sourceType.getMatrixCols() >= type.getMatrixCols() && sourceType.getMatrixRows() >= type.getMatrixRows()) return setAggregateOperator(makeAggregate(node), constructorOp, type, node->getLoc()); // rule 5b } else if (type.isVector()) { if (type.getVectorSize() == 4 && sourceType.getMatrixCols() == 2 && sourceType.getMatrixRows() == 2) return setAggregateOperator(makeAggregate(node), constructorOp, type, node->getLoc()); } } // rule 4 and 5a if (sourceType.isVector()) { // rule 4 if (type.isVector()) { if (sourceType.getVectorSize() > type.getVectorSize()) return setAggregateOperator(makeAggregate(node), constructorOp, type, node->getLoc()); // rule 5a } else if (type.isMatrix()) { if (sourceType.getVectorSize() == 4 && type.getMatrixCols() == 2 && type.getMatrixRows() == 2) return setAggregateOperator(makeAggregate(node), constructorOp, type, node->getLoc()); } } } // scalar -> vector or vec1 -> vector or // vector -> scalar or // bigger vector -> smaller vector if ((node->getType().isScalarOrVec1() && type.isVector()) || (node->getType().isVector() && type.isScalar()) || (node->isVector() && type.isVector() && node->getVectorSize() > type.getVectorSize())) return setAggregateOperator(makeAggregate(node), constructorOp, type, node->getLoc()); return node; } bool TIntermediate::isIntegralPromotion(TBasicType from, TBasicType to) const { // integral promotions if (to == EbtInt) { switch(from) { case EbtInt8: case EbtInt16: case EbtUint8: case EbtUint16: return true; default: break; } } return false; } bool TIntermediate::isFPPromotion(TBasicType from, TBasicType to) const { // floating-point promotions if (to == EbtDouble) { switch(from) { case EbtBFloat16: case EbtFloatE5M2: case EbtFloatE4M3: case EbtFloat16: case EbtFloat: return true; default: break; } } return false; } bool TIntermediate::isIntegralConversion(TBasicType from, TBasicType to) const { switch (from) { case EbtInt: switch(to) { case EbtUint: return version >= 400 || getSource() == EShSourceHlsl; case EbtInt64: case EbtUint64: return true; default: break; } break; case EbtUint: switch(to) { case EbtInt64: case EbtUint64: return true; default: break; } break; case EbtInt8: switch (to) { case EbtUint8: case EbtInt16: case EbtUint16: case EbtUint: case EbtInt64: case EbtUint64: return true; default: break; } break; case EbtUint8: switch (to) { case EbtInt16: case EbtUint16: case EbtUint: case EbtInt64: case EbtUint64: return true; default: break; } break; case EbtInt16: switch(to) { case EbtUint16: case EbtUint: case EbtInt64: case EbtUint64: return true; default: break; } break; case EbtUint16: switch(to) { case EbtUint: case EbtInt64: case EbtUint64: return true; default: break; } break; case EbtInt64: if (to == EbtUint64) { return true; } break; default: break; } return false; } bool TIntermediate::isFPConversion(TBasicType from, TBasicType to) const { if (to == EbtFloat && (from == EbtFloat16 || from == EbtBFloat16 || from == EbtFloatE5M2 || from == EbtFloatE4M3)) { return true; } else { return false; } } bool TIntermediate::isFPIntegralConversion(TBasicType from, TBasicType to) const { switch (from) { case EbtInt: case EbtUint: switch(to) { case EbtFloat: case EbtDouble: return true; default: break; } break; case EbtInt8: case EbtUint8: case EbtInt16: case EbtUint16: switch (to) { case EbtFloat16: case EbtFloat: case EbtDouble: return true; default: break; } break; case EbtInt64: case EbtUint64: if (to == EbtDouble) { return true; } break; default: break; } return false; } // // See if the 'from' type is allowed to be implicitly converted to the // 'to' type. This is not about vector/array/struct, only about basic type. // bool TIntermediate::canImplicitlyPromote(TBasicType from, TBasicType to, TOperator op) const { if ((isEsProfile() && version < 310 ) || version == 110) return false; if (from == to) return true; // TODO: Move more policies into language-specific handlers. // Some languages allow more general (or potentially, more specific) conversions under some conditions. if (getSource() == EShSourceHlsl) { const bool fromConvertable = (from == EbtFloat || from == EbtDouble || from == EbtInt || from == EbtUint || from == EbtBool); const bool toConvertable = (to == EbtFloat || to == EbtDouble || to == EbtInt || to == EbtUint || to == EbtBool); if (fromConvertable && toConvertable) { switch (op) { case EOpAndAssign: // assignments can perform arbitrary conversions case EOpInclusiveOrAssign: // ... case EOpExclusiveOrAssign: // ... case EOpAssign: // ... case EOpAddAssign: // ... case EOpSubAssign: // ... case EOpMulAssign: // ... case EOpVectorTimesScalarAssign: // ... case EOpMatrixTimesScalarAssign: // ... case EOpDivAssign: // ... case EOpModAssign: // ... case EOpReturn: // function returns can also perform arbitrary conversions case EOpFunctionCall: // conversion of a calling parameter case EOpLogicalNot: case EOpLogicalAnd: case EOpLogicalOr: case EOpLogicalXor: case EOpConstructStruct: return true; default: break; } } } if (getSource() == EShSourceHlsl) { // HLSL if (from == EbtBool && (to == EbtInt || to == EbtUint || to == EbtFloat)) return true; } else { // GLSL if (isIntegralPromotion(from, to) || isFPPromotion(from, to) || isIntegralConversion(from, to) || isFPConversion(from, to) || isFPIntegralConversion(from, to)) { if (numericFeatures.contains(TNumericFeatures::shader_explicit_arithmetic_types) || numericFeatures.contains(TNumericFeatures::shader_explicit_arithmetic_types_int8) || numericFeatures.contains(TNumericFeatures::shader_explicit_arithmetic_types_int16) || numericFeatures.contains(TNumericFeatures::shader_explicit_arithmetic_types_int32) || numericFeatures.contains(TNumericFeatures::shader_explicit_arithmetic_types_int64) || numericFeatures.contains(TNumericFeatures::shader_explicit_arithmetic_types_float16) || numericFeatures.contains(TNumericFeatures::shader_explicit_arithmetic_types_float32) || numericFeatures.contains(TNumericFeatures::shader_explicit_arithmetic_types_float64)) { return true; } } } if (isEsProfile()) { switch (to) { case EbtFloat: switch (from) { case EbtInt: case EbtUint: return numericFeatures.contains(TNumericFeatures::shader_implicit_conversions); default: return false; } case EbtUint: switch (from) { case EbtInt: return numericFeatures.contains(TNumericFeatures::shader_implicit_conversions); default: return false; } default: return false; } } else { switch (to) { case EbtDouble: switch (from) { case EbtInt: case EbtUint: case EbtInt64: case EbtUint64: case EbtFloat: return version >= 400 || numericFeatures.contains(TNumericFeatures::gpu_shader_fp64); case EbtInt16: case EbtUint16: return (version >= 400 || numericFeatures.contains(TNumericFeatures::gpu_shader_fp64)) && (numericFeatures.contains(TNumericFeatures::nv_gpu_shader5_types) || numericFeatures.contains(TNumericFeatures::gpu_shader_int16)); case EbtFloat16: return (version >= 400 || numericFeatures.contains(TNumericFeatures::gpu_shader_fp64)) && (numericFeatures.contains(TNumericFeatures::nv_gpu_shader5_types) || numericFeatures.contains(TNumericFeatures::gpu_shader_half_float)); case EbtBFloat16: case EbtFloatE5M2: case EbtFloatE4M3: return true; case EbtInt8: case EbtUint8: return numericFeatures.contains(TNumericFeatures::nv_gpu_shader5_types); default: return false; } case EbtFloat: switch (from) { case EbtInt: case EbtUint: return true; case EbtBool: return getSource() == EShSourceHlsl; case EbtInt16: case EbtUint16: return numericFeatures.contains(TNumericFeatures::gpu_shader_int16) || numericFeatures.contains(TNumericFeatures::nv_gpu_shader5_types); case EbtFloat16: return numericFeatures.contains(TNumericFeatures::gpu_shader_half_float) || numericFeatures.contains(TNumericFeatures::nv_gpu_shader5_types) || getSource() == EShSourceHlsl; case EbtBFloat16: case EbtFloatE5M2: case EbtFloatE4M3: return true; case EbtInt8: case EbtUint8: return numericFeatures.contains(TNumericFeatures::nv_gpu_shader5_types); default: return false; } case EbtUint: switch (from) { case EbtInt: return version >= 400 || getSource() == EShSourceHlsl || IsRequestedExtension(E_GL_ARB_gpu_shader5) || numericFeatures.contains(TNumericFeatures::nv_gpu_shader5_types); case EbtBool: return getSource() == EShSourceHlsl; case EbtInt16: case EbtUint16: return numericFeatures.contains(TNumericFeatures::gpu_shader_int16) || numericFeatures.contains(TNumericFeatures::nv_gpu_shader5_types); case EbtInt8: case EbtUint8: return numericFeatures.contains(TNumericFeatures::nv_gpu_shader5_types); default: return false; } case EbtInt: switch (from) { case EbtBool: return getSource() == EShSourceHlsl; case EbtInt16: return numericFeatures.contains(TNumericFeatures::gpu_shader_int16) || numericFeatures.contains(TNumericFeatures::nv_gpu_shader5_types); case EbtInt8: return numericFeatures.contains(TNumericFeatures::nv_gpu_shader5_types); default: return false; } case EbtUint64: switch (from) { case EbtInt: case EbtUint: case EbtInt64: return true; case EbtInt16: case EbtUint16: return numericFeatures.contains(TNumericFeatures::gpu_shader_int16) || numericFeatures.contains(TNumericFeatures::nv_gpu_shader5_types); case EbtInt8: case EbtUint8: return numericFeatures.contains(TNumericFeatures::nv_gpu_shader5_types); default: return false; } case EbtInt64: switch (from) { case EbtInt: return true; case EbtInt8: return numericFeatures.contains(TNumericFeatures::nv_gpu_shader5_types); case EbtInt16: return numericFeatures.contains(TNumericFeatures::gpu_shader_int16) || numericFeatures.contains(TNumericFeatures::nv_gpu_shader5_types); default: return false; } case EbtFloat16: switch (from) { case EbtInt16: case EbtUint16: return numericFeatures.contains(TNumericFeatures::gpu_shader_int16); case EbtFloatE5M2: case EbtFloatE4M3: return true; default: break; } return false; case EbtBFloat16: switch (from) { case EbtFloatE5M2: case EbtFloatE4M3: return true; default: break; } return false; case EbtUint16: switch (from) { case EbtInt16: return numericFeatures.contains(TNumericFeatures::gpu_shader_int16); default: break; } return false; default: return false; } } return false; } static bool canSignedIntTypeRepresentAllUnsignedValues(TBasicType sintType, TBasicType uintType) { switch(sintType) { case EbtInt8: switch(uintType) { case EbtUint8: case EbtUint16: case EbtUint: case EbtUint64: return false; default: assert(false); return false; } break; case EbtInt16: switch(uintType) { case EbtUint8: return true; case EbtUint16: case EbtUint: case EbtUint64: return false; default: assert(false); return false; } break; case EbtInt: switch(uintType) { case EbtUint8: case EbtUint16: return true; case EbtUint: return false; default: assert(false); return false; } break; case EbtInt64: switch(uintType) { case EbtUint8: case EbtUint16: case EbtUint: return true; case EbtUint64: return false; default: assert(false); return false; } break; default: assert(false); return false; } } static TBasicType getCorrespondingUnsignedType(TBasicType type) { switch(type) { case EbtInt8: return EbtUint8; case EbtInt16: return EbtUint16; case EbtInt: return EbtUint; case EbtInt64: return EbtUint64; default: assert(false); return EbtNumTypes; } } // Implements the following rules // - If either operand has type float64_t or derived from float64_t, // the other shall be converted to float64_t or derived type. // - Otherwise, if either operand has type float32_t or derived from // float32_t, the other shall be converted to float32_t or derived type. // - Otherwise, if either operand has type float16_t or derived from // float16_t, the other shall be converted to float16_t or derived type. // - Otherwise, if both operands have integer types the following rules // shall be applied to the operands: // - If both operands have the same type, no further conversion // is needed. // - Otherwise, if both operands have signed integer types or both // have unsigned integer types, the operand with the type of lesser // integer conversion rank shall be converted to the type of the // operand with greater rank. // - Otherwise, if the operand that has unsigned integer type has rank // greater than or equal to the rank of the type of the other // operand, the operand with signed integer type shall be converted // to the type of the operand with unsigned integer type. // - Otherwise, if the type of the operand with signed integer type can // represent all of the values of the type of the operand with // unsigned integer type, the operand with unsigned integer type // shall be converted to the type of the operand with signed // integer type. // - Otherwise, both operands shall be converted to the unsigned // integer type corresponding to the type of the operand with signed // integer type. std::tuple TIntermediate::getConversionDestinationType(TBasicType type0, TBasicType type1, TOperator op) const { TBasicType res0 = EbtNumTypes; TBasicType res1 = EbtNumTypes; if ((isEsProfile() && (version < 310 || !numericFeatures.contains(TNumericFeatures::shader_implicit_conversions))) || version == 110) return std::make_tuple(res0, res1); if (getSource() == EShSourceHlsl) { if (canImplicitlyPromote(type1, type0, op)) { res0 = type0; res1 = type0; } else if (canImplicitlyPromote(type0, type1, op)) { res0 = type1; res1 = type1; } return std::make_tuple(res0, res1); } if ((type0 == EbtDouble && canImplicitlyPromote(type1, EbtDouble, op)) || (type1 == EbtDouble && canImplicitlyPromote(type0, EbtDouble, op)) ) { res0 = EbtDouble; res1 = EbtDouble; } else if ((type0 == EbtFloat && canImplicitlyPromote(type1, EbtFloat, op)) || (type1 == EbtFloat && canImplicitlyPromote(type0, EbtFloat, op)) ) { res0 = EbtFloat; res1 = EbtFloat; } else if ((type0 == EbtFloat16 && canImplicitlyPromote(type1, EbtFloat16, op)) || (type1 == EbtFloat16 && canImplicitlyPromote(type0, EbtFloat16, op)) ) { res0 = EbtFloat16; res1 = EbtFloat16; } else if ((type0 == EbtBFloat16 && canImplicitlyPromote(type1, EbtBFloat16, op)) || (type1 == EbtBFloat16 && canImplicitlyPromote(type0, EbtBFloat16, op)) ) { res0 = EbtBFloat16; res1 = EbtBFloat16; } else if (isTypeInt(type0) && isTypeInt(type1) && (canImplicitlyPromote(type0, type1, op) || canImplicitlyPromote(type1, type0, op))) { if ((isTypeSignedInt(type0) && isTypeSignedInt(type1)) || (isTypeUnsignedInt(type0) && isTypeUnsignedInt(type1))) { if (getTypeRank(type0) < getTypeRank(type1)) { res0 = type1; res1 = type1; } else { res0 = type0; res1 = type0; } } else if (isTypeUnsignedInt(type0) && (getTypeRank(type0) > getTypeRank(type1))) { res0 = type0; res1 = type0; } else if (isTypeUnsignedInt(type1) && (getTypeRank(type1) > getTypeRank(type0))) { res0 = type1; res1 = type1; } else if (isTypeSignedInt(type0)) { if (canSignedIntTypeRepresentAllUnsignedValues(type0, type1)) { res0 = type0; res1 = type0; } else { res0 = getCorrespondingUnsignedType(type0); res1 = getCorrespondingUnsignedType(type0); } } else if (isTypeSignedInt(type1)) { if (canSignedIntTypeRepresentAllUnsignedValues(type1, type0)) { res0 = type1; res1 = type1; } else { res0 = getCorrespondingUnsignedType(type1); res1 = getCorrespondingUnsignedType(type1); } } } return std::make_tuple(res0, res1); } // // Given a type, find what operation would fully construct it. // TOperator TIntermediate::mapTypeToConstructorOp(const TType& type) const { TOperator op = EOpNull; if (type.getQualifier().isNonUniform()) return EOpConstructNonuniform; if (type.isCoopMatNV()) return EOpConstructCooperativeMatrixNV; if (type.isCoopMatKHR()) return EOpConstructCooperativeMatrixKHR; if (type.isCoopVecNV()) return EOpConstructCooperativeVectorNV; switch (type.getBasicType()) { case EbtStruct: op = EOpConstructStruct; break; case EbtSampler: if (type.getSampler().isCombined()) op = EOpConstructTextureSampler; break; case EbtFloat: if (type.isMatrix()) { switch (type.getMatrixCols()) { case 2: switch (type.getMatrixRows()) { case 2: op = EOpConstructMat2x2; break; case 3: op = EOpConstructMat2x3; break; case 4: op = EOpConstructMat2x4; break; default: break; // some compilers want this } break; case 3: switch (type.getMatrixRows()) { case 2: op = EOpConstructMat3x2; break; case 3: op = EOpConstructMat3x3; break; case 4: op = EOpConstructMat3x4; break; default: break; // some compilers want this } break; case 4: switch (type.getMatrixRows()) { case 2: op = EOpConstructMat4x2; break; case 3: op = EOpConstructMat4x3; break; case 4: op = EOpConstructMat4x4; break; default: break; // some compilers want this } break; default: break; // some compilers want this } } else { switch(type.getVectorSize()) { case 1: op = EOpConstructFloat; break; case 2: op = EOpConstructVec2; break; case 3: op = EOpConstructVec3; break; case 4: op = EOpConstructVec4; break; default: break; // some compilers want this } } break; case EbtInt: if (type.getMatrixCols()) { switch (type.getMatrixCols()) { case 2: switch (type.getMatrixRows()) { case 2: op = EOpConstructIMat2x2; break; case 3: op = EOpConstructIMat2x3; break; case 4: op = EOpConstructIMat2x4; break; default: break; // some compilers want this } break; case 3: switch (type.getMatrixRows()) { case 2: op = EOpConstructIMat3x2; break; case 3: op = EOpConstructIMat3x3; break; case 4: op = EOpConstructIMat3x4; break; default: break; // some compilers want this } break; case 4: switch (type.getMatrixRows()) { case 2: op = EOpConstructIMat4x2; break; case 3: op = EOpConstructIMat4x3; break; case 4: op = EOpConstructIMat4x4; break; default: break; // some compilers want this } break; } } else { switch(type.getVectorSize()) { case 1: op = EOpConstructInt; break; case 2: op = EOpConstructIVec2; break; case 3: op = EOpConstructIVec3; break; case 4: op = EOpConstructIVec4; break; default: break; // some compilers want this } } break; case EbtUint: if (type.getMatrixCols()) { switch (type.getMatrixCols()) { case 2: switch (type.getMatrixRows()) { case 2: op = EOpConstructUMat2x2; break; case 3: op = EOpConstructUMat2x3; break; case 4: op = EOpConstructUMat2x4; break; default: break; // some compilers want this } break; case 3: switch (type.getMatrixRows()) { case 2: op = EOpConstructUMat3x2; break; case 3: op = EOpConstructUMat3x3; break; case 4: op = EOpConstructUMat3x4; break; default: break; // some compilers want this } break; case 4: switch (type.getMatrixRows()) { case 2: op = EOpConstructUMat4x2; break; case 3: op = EOpConstructUMat4x3; break; case 4: op = EOpConstructUMat4x4; break; default: break; // some compilers want this } break; } } else { switch(type.getVectorSize()) { case 1: op = EOpConstructUint; break; case 2: op = EOpConstructUVec2; break; case 3: op = EOpConstructUVec3; break; case 4: op = EOpConstructUVec4; break; default: break; // some compilers want this } } break; case EbtBool: if (type.getMatrixCols()) { switch (type.getMatrixCols()) { case 2: switch (type.getMatrixRows()) { case 2: op = EOpConstructBMat2x2; break; case 3: op = EOpConstructBMat2x3; break; case 4: op = EOpConstructBMat2x4; break; default: break; // some compilers want this } break; case 3: switch (type.getMatrixRows()) { case 2: op = EOpConstructBMat3x2; break; case 3: op = EOpConstructBMat3x3; break; case 4: op = EOpConstructBMat3x4; break; default: break; // some compilers want this } break; case 4: switch (type.getMatrixRows()) { case 2: op = EOpConstructBMat4x2; break; case 3: op = EOpConstructBMat4x3; break; case 4: op = EOpConstructBMat4x4; break; default: break; // some compilers want this } break; } } else { switch(type.getVectorSize()) { case 1: op = EOpConstructBool; break; case 2: op = EOpConstructBVec2; break; case 3: op = EOpConstructBVec3; break; case 4: op = EOpConstructBVec4; break; default: break; // some compilers want this } } break; case EbtDouble: if (type.getMatrixCols()) { switch (type.getMatrixCols()) { case 2: switch (type.getMatrixRows()) { case 2: op = EOpConstructDMat2x2; break; case 3: op = EOpConstructDMat2x3; break; case 4: op = EOpConstructDMat2x4; break; default: break; // some compilers want this } break; case 3: switch (type.getMatrixRows()) { case 2: op = EOpConstructDMat3x2; break; case 3: op = EOpConstructDMat3x3; break; case 4: op = EOpConstructDMat3x4; break; default: break; // some compilers want this } break; case 4: switch (type.getMatrixRows()) { case 2: op = EOpConstructDMat4x2; break; case 3: op = EOpConstructDMat4x3; break; case 4: op = EOpConstructDMat4x4; break; default: break; // some compilers want this } break; } } else { switch(type.getVectorSize()) { case 1: op = EOpConstructDouble; break; case 2: op = EOpConstructDVec2; break; case 3: op = EOpConstructDVec3; break; case 4: op = EOpConstructDVec4; break; default: break; // some compilers want this } } break; case EbtFloat16: if (type.getMatrixCols()) { switch (type.getMatrixCols()) { case 2: switch (type.getMatrixRows()) { case 2: op = EOpConstructF16Mat2x2; break; case 3: op = EOpConstructF16Mat2x3; break; case 4: op = EOpConstructF16Mat2x4; break; default: break; // some compilers want this } break; case 3: switch (type.getMatrixRows()) { case 2: op = EOpConstructF16Mat3x2; break; case 3: op = EOpConstructF16Mat3x3; break; case 4: op = EOpConstructF16Mat3x4; break; default: break; // some compilers want this } break; case 4: switch (type.getMatrixRows()) { case 2: op = EOpConstructF16Mat4x2; break; case 3: op = EOpConstructF16Mat4x3; break; case 4: op = EOpConstructF16Mat4x4; break; default: break; // some compilers want this } break; } } else { switch (type.getVectorSize()) { case 1: op = EOpConstructFloat16; break; case 2: op = EOpConstructF16Vec2; break; case 3: op = EOpConstructF16Vec3; break; case 4: op = EOpConstructF16Vec4; break; default: break; // some compilers want this } } break; case EbtBFloat16: switch (type.getVectorSize()) { case 1: op = EOpConstructBFloat16; break; case 2: op = EOpConstructBF16Vec2; break; case 3: op = EOpConstructBF16Vec3; break; case 4: op = EOpConstructBF16Vec4; break; default: break; // some compilers want this } break; case EbtFloatE5M2: switch (type.getVectorSize()) { case 1: op = EOpConstructFloatE5M2; break; case 2: op = EOpConstructFloatE5M2Vec2; break; case 3: op = EOpConstructFloatE5M2Vec3; break; case 4: op = EOpConstructFloatE5M2Vec4; break; default: break; // some compilers want this } break; case EbtFloatE4M3: switch (type.getVectorSize()) { case 1: op = EOpConstructFloatE4M3; break; case 2: op = EOpConstructFloatE4M3Vec2; break; case 3: op = EOpConstructFloatE4M3Vec3; break; case 4: op = EOpConstructFloatE4M3Vec4; break; default: break; // some compilers want this } break; case EbtInt8: switch(type.getVectorSize()) { case 1: op = EOpConstructInt8; break; case 2: op = EOpConstructI8Vec2; break; case 3: op = EOpConstructI8Vec3; break; case 4: op = EOpConstructI8Vec4; break; default: break; // some compilers want this } break; case EbtUint8: switch(type.getVectorSize()) { case 1: op = EOpConstructUint8; break; case 2: op = EOpConstructU8Vec2; break; case 3: op = EOpConstructU8Vec3; break; case 4: op = EOpConstructU8Vec4; break; default: break; // some compilers want this } break; case EbtInt16: switch(type.getVectorSize()) { case 1: op = EOpConstructInt16; break; case 2: op = EOpConstructI16Vec2; break; case 3: op = EOpConstructI16Vec3; break; case 4: op = EOpConstructI16Vec4; break; default: break; // some compilers want this } break; case EbtUint16: switch(type.getVectorSize()) { case 1: op = EOpConstructUint16; break; case 2: op = EOpConstructU16Vec2; break; case 3: op = EOpConstructU16Vec3; break; case 4: op = EOpConstructU16Vec4; break; default: break; // some compilers want this } break; case EbtInt64: switch(type.getVectorSize()) { case 1: op = EOpConstructInt64; break; case 2: op = EOpConstructI64Vec2; break; case 3: op = EOpConstructI64Vec3; break; case 4: op = EOpConstructI64Vec4; break; default: break; // some compilers want this } break; case EbtUint64: switch(type.getVectorSize()) { case 1: op = EOpConstructUint64; break; case 2: op = EOpConstructU64Vec2; break; case 3: op = EOpConstructU64Vec3; break; case 4: op = EOpConstructU64Vec4; break; default: break; // some compilers want this } break; case EbtReference: op = EOpConstructReference; break; case EbtAccStruct: op = EOpConstructAccStruct; break; default: break; } return op; } // // Safe way to combine two nodes into an aggregate. Works with null pointers, // a node that's not a aggregate yet, etc. // // Returns the resulting aggregate, unless nullptr was passed in for // both existing nodes. // TIntermAggregate* TIntermediate::growAggregate(TIntermNode* left, TIntermNode* right) { if (left == nullptr && right == nullptr) return nullptr; TIntermAggregate* aggNode = nullptr; if (left != nullptr) aggNode = left->getAsAggregate(); if (aggNode == nullptr || aggNode->getOp() != EOpNull) { aggNode = new TIntermAggregate; if (left != nullptr) aggNode->getSequence().push_back(left); } if (right != nullptr) aggNode->getSequence().push_back(right); return aggNode; } TIntermAggregate* TIntermediate::growAggregate(TIntermNode* left, TIntermNode* right, const TSourceLoc& loc) { TIntermAggregate* aggNode = growAggregate(left, right); if (aggNode) aggNode->setLoc(loc); return aggNode; } TIntermAggregate* TIntermediate::mergeAggregate(TIntermNode* left, TIntermNode* right) { if (left == nullptr && right == nullptr) return nullptr; TIntermAggregate* aggNode = nullptr; if (left != nullptr) aggNode = left->getAsAggregate(); if (aggNode == nullptr || aggNode->getOp() != EOpNull) { aggNode = new TIntermAggregate; if (left != nullptr) aggNode->getSequence().push_back(left); } TIntermAggregate* rhsagg = right->getAsAggregate(); if (rhsagg == nullptr || rhsagg->getOp() != EOpNull) aggNode->getSequence().push_back(right); else aggNode->getSequence().insert(aggNode->getSequence().end(), rhsagg->getSequence().begin(), rhsagg->getSequence().end()); return aggNode; } TIntermAggregate* TIntermediate::mergeAggregate(TIntermNode* left, TIntermNode* right, const TSourceLoc& loc) { TIntermAggregate* aggNode = mergeAggregate(left, right); if (aggNode) aggNode->setLoc(loc); return aggNode; } // // Turn an existing node into an aggregate. // // Returns an aggregate, unless nullptr was passed in for the existing node. // TIntermAggregate* TIntermediate::makeAggregate(TIntermNode* node) { if (node == nullptr) return nullptr; TIntermAggregate* aggNode = new TIntermAggregate; aggNode->getSequence().push_back(node); aggNode->setLoc(node->getLoc()); return aggNode; } TIntermAggregate* TIntermediate::makeAggregate(TIntermNode* node, const TSourceLoc& loc) { if (node == nullptr) return nullptr; TIntermAggregate* aggNode = new TIntermAggregate; aggNode->getSequence().push_back(node); aggNode->setLoc(loc); return aggNode; } // // Make an aggregate with an empty sequence. // TIntermAggregate* TIntermediate::makeAggregate(const TSourceLoc& loc) { TIntermAggregate* aggNode = new TIntermAggregate; aggNode->setLoc(loc); return aggNode; } // // For "if" test nodes. There are three children; a condition, // a true path, and a false path. The two paths are in the // nodePair. // // Returns the selection node created. // TIntermSelection* TIntermediate::addSelection(TIntermTyped* cond, TIntermNodePair nodePair, const TSourceLoc& loc) { // // Don't prune the false path for compile-time constants; it's needed // for static access analysis. // TIntermSelection* node = new TIntermSelection(cond, nodePair.node1, nodePair.node2); node->setLoc(loc); return node; } TIntermTyped* TIntermediate::addComma(TIntermTyped* left, TIntermTyped* right, const TSourceLoc& loc) { // However, the lowest precedence operators of the sequence operator ( , ) and the assignment operators // ... are not included in the operators that can create a constant expression. // // if (left->getType().getQualifier().storage == EvqConst && // right->getType().getQualifier().storage == EvqConst) { // return right; //} TIntermTyped *commaAggregate = growAggregate(left, right, loc); commaAggregate->getAsAggregate()->setOperator(EOpComma); commaAggregate->setType(right->getType()); commaAggregate->getWritableType().getQualifier().makeTemporary(); return commaAggregate; } TIntermTyped* TIntermediate::addMethod(TIntermTyped* object, const TType& type, const TString* name, const TSourceLoc& loc) { TIntermMethod* method = new TIntermMethod(object, type, *name); method->setLoc(loc); return method; } // // For "?:" test nodes. There are three children; a condition, // a true path, and a false path. The two paths are specified // as separate parameters. For vector 'cond', the true and false // are not paths, but vectors to mix. // // Specialization constant operations include // - The ternary operator ( ? : ) // // Returns the selection node created, or nullptr if one could not be. // TIntermTyped* TIntermediate::addSelection(TIntermTyped* cond, TIntermTyped* trueBlock, TIntermTyped* falseBlock, const TSourceLoc& loc) { // If it's void, go to the if-then-else selection() if (trueBlock->getBasicType() == EbtVoid && falseBlock->getBasicType() == EbtVoid) { TIntermNodePair pair = { trueBlock, falseBlock }; TIntermSelection* selection = addSelection(cond, pair, loc); if (getSource() == EShSourceHlsl) selection->setNoShortCircuit(); return selection; } // // Get compatible types. // auto children = addPairConversion(EOpSequence, trueBlock, falseBlock); trueBlock = std::get<0>(children); falseBlock = std::get<1>(children); if (trueBlock == nullptr || falseBlock == nullptr) return nullptr; // Handle a vector condition as a mix if (!cond->getType().isScalarOrVec1()) { TType targetVectorType(trueBlock->getType().getBasicType(), EvqTemporary, cond->getType().getVectorSize()); // smear true/false operands as needed trueBlock = addUniShapeConversion(EOpMix, targetVectorType, trueBlock); falseBlock = addUniShapeConversion(EOpMix, targetVectorType, falseBlock); // After conversion, types have to match. if (falseBlock->getType() != trueBlock->getType()) return nullptr; // make the mix operation TIntermAggregate* mix = makeAggregate(loc); mix = growAggregate(mix, falseBlock); mix = growAggregate(mix, trueBlock); mix = growAggregate(mix, cond); mix->setType(targetVectorType); mix->setOp(EOpMix); return mix; } // Now have a scalar condition... // Convert true and false expressions to matching types addBiShapeConversion(EOpMix, trueBlock, falseBlock); // After conversion, types have to match. if (falseBlock->getType() != trueBlock->getType()) return nullptr; // Eliminate the selection when the condition is a scalar and all operands are constant. if (cond->getAsConstantUnion() && trueBlock->getAsConstantUnion() && falseBlock->getAsConstantUnion()) { if (cond->getAsConstantUnion()->getConstArray()[0].getBConst()) return trueBlock; else return falseBlock; } // // Make a selection node. // TIntermSelection* node = new TIntermSelection(cond, trueBlock, falseBlock, trueBlock->getType()); node->setLoc(loc); node->getQualifier().precision = std::max(trueBlock->getQualifier().precision, falseBlock->getQualifier().precision); if ((cond->getQualifier().isConstant() && specConstantPropagates(*trueBlock, *falseBlock)) || (cond->getQualifier().isSpecConstant() && trueBlock->getQualifier().isConstant() && falseBlock->getQualifier().isConstant())) node->getQualifier().makeSpecConstant(); else node->getQualifier().makeTemporary(); if (getSource() == EShSourceHlsl) node->setNoShortCircuit(); return node; } // // Constant terminal nodes. Has a union that contains bool, float or int constants // // Returns the constant union node created. // TIntermConstantUnion* TIntermediate::addConstantUnion(const TConstUnionArray& unionArray, const TType& t, const TSourceLoc& loc, bool literal) const { TIntermConstantUnion* node = new TIntermConstantUnion(unionArray, t); node->getQualifier().storage = EvqConst; node->setLoc(loc); if (literal) node->setLiteral(); return node; } TIntermConstantUnion* TIntermediate::addConstantUnion(signed char i8, const TSourceLoc& loc, bool literal) const { TConstUnionArray unionArray(1); unionArray[0].setI8Const(i8); return addConstantUnion(unionArray, TType(EbtInt8, EvqConst), loc, literal); } TIntermConstantUnion* TIntermediate::addConstantUnion(unsigned char u8, const TSourceLoc& loc, bool literal) const { TConstUnionArray unionArray(1); unionArray[0].setUConst(u8); return addConstantUnion(unionArray, TType(EbtUint8, EvqConst), loc, literal); } TIntermConstantUnion* TIntermediate::addConstantUnion(signed short i16, const TSourceLoc& loc, bool literal) const { TConstUnionArray unionArray(1); unionArray[0].setI16Const(i16); return addConstantUnion(unionArray, TType(EbtInt16, EvqConst), loc, literal); } TIntermConstantUnion* TIntermediate::addConstantUnion(unsigned short u16, const TSourceLoc& loc, bool literal) const { TConstUnionArray unionArray(1); unionArray[0].setU16Const(u16); return addConstantUnion(unionArray, TType(EbtUint16, EvqConst), loc, literal); } TIntermConstantUnion* TIntermediate::addConstantUnion(int i, const TSourceLoc& loc, bool literal) const { TConstUnionArray unionArray(1); unionArray[0].setIConst(i); return addConstantUnion(unionArray, TType(EbtInt, EvqConst), loc, literal); } TIntermConstantUnion* TIntermediate::addConstantUnion(unsigned int u, const TSourceLoc& loc, bool literal) const { TConstUnionArray unionArray(1); unionArray[0].setUConst(u); return addConstantUnion(unionArray, TType(EbtUint, EvqConst), loc, literal); } TIntermConstantUnion* TIntermediate::addConstantUnion(long long i64, const TSourceLoc& loc, bool literal) const { TConstUnionArray unionArray(1); unionArray[0].setI64Const(i64); return addConstantUnion(unionArray, TType(EbtInt64, EvqConst), loc, literal); } TIntermConstantUnion* TIntermediate::addConstantUnion(unsigned long long u64, const TSourceLoc& loc, bool literal) const { TConstUnionArray unionArray(1); unionArray[0].setU64Const(u64); return addConstantUnion(unionArray, TType(EbtUint64, EvqConst), loc, literal); } TIntermConstantUnion* TIntermediate::addConstantUnion(bool b, const TSourceLoc& loc, bool literal) const { TConstUnionArray unionArray(1); unionArray[0].setBConst(b); return addConstantUnion(unionArray, TType(EbtBool, EvqConst), loc, literal); } TIntermConstantUnion* TIntermediate::addConstantUnion(double d, TBasicType baseType, const TSourceLoc& loc, bool literal) const { assert(baseType == EbtFloat || baseType == EbtDouble || baseType == EbtFloat16 || baseType == EbtBFloat16 || baseType == EbtFloatE5M2 || baseType == EbtFloatE4M3); if (isEsProfile() && (baseType == EbtFloat || baseType == EbtFloat16)) { int exponent = 0; frexp(d, &exponent); int minExp = baseType == EbtFloat ? -126 : -14; int maxExp = baseType == EbtFloat ? 127 : 15; if (exponent > maxExp) { //overflow, d = inf d = std::numeric_limits::infinity(); } else if (exponent < minExp) { //underflow, d = 0.0; d = 0.0; } } TConstUnionArray unionArray(1); unionArray[0].setDConst(d); return addConstantUnion(unionArray, TType(baseType, EvqConst), loc, literal); } TIntermConstantUnion* TIntermediate::addConstantUnion(const TString* s, const TSourceLoc& loc, bool literal) const { TConstUnionArray unionArray(1); unionArray[0].setSConst(s); return addConstantUnion(unionArray, TType(EbtString, EvqConst), loc, literal); } // Put vector swizzle selectors onto the given sequence void TIntermediate::pushSelector(TIntermSequence& sequence, const TVectorSelector& selector, const TSourceLoc& loc) { TIntermConstantUnion* constIntNode = addConstantUnion(selector, loc); sequence.push_back(constIntNode); } // Put matrix swizzle selectors onto the given sequence void TIntermediate::pushSelector(TIntermSequence& sequence, const TMatrixSelector& selector, const TSourceLoc& loc) { TIntermConstantUnion* constIntNode = addConstantUnion(selector.coord1, loc); sequence.push_back(constIntNode); constIntNode = addConstantUnion(selector.coord2, loc); sequence.push_back(constIntNode); } // Make an aggregate node that has a sequence of all selectors. template TIntermTyped* TIntermediate::addSwizzle(TSwizzleSelectors& selector, const TSourceLoc& loc); template TIntermTyped* TIntermediate::addSwizzle(TSwizzleSelectors& selector, const TSourceLoc& loc); template TIntermTyped* TIntermediate::addSwizzle(TSwizzleSelectors& selector, const TSourceLoc& loc) { TIntermAggregate* node = new TIntermAggregate(EOpSequence); node->setLoc(loc); TIntermSequence &sequenceVector = node->getSequence(); for (int i = 0; i < selector.size(); i++) pushSelector(sequenceVector, selector[i], loc); return node; } // // Follow the left branches down to the root of an l-value // expression (just "." and []). // // Return the base of the l-value (where following indexing quits working). // Return nullptr if a chain following dereferences cannot be followed. // // 'swizzleOkay' says whether or not it is okay to consider a swizzle // a valid part of the dereference chain. // // 'bufferReferenceOk' says if type is buffer_reference, the routine will stop to find the most left node. // // 'proc' is an optional function to run on each node that is processed during the traversal. 'proc' must // return true to continue the traversal, or false to end the traversal early. // const TIntermTyped* TIntermediate::traverseLValueBase(const TIntermTyped* node, bool swizzleOkay, bool bufferReferenceOk, std::function proc) { do { const TIntermBinary* binary = node->getAsBinaryNode(); if (binary == nullptr) { if (proc) { proc(*node); } return node; } TOperator op = binary->getOp(); if (op != EOpIndexDirect && op != EOpIndexIndirect && op != EOpIndexDirectStruct && op != EOpVectorSwizzle && op != EOpMatrixSwizzle) return nullptr; if (!swizzleOkay) { if (op == EOpVectorSwizzle || op == EOpMatrixSwizzle) return nullptr; if ((op == EOpIndexDirect || op == EOpIndexIndirect) && (binary->getLeft()->getType().isVector() || binary->getLeft()->getType().isScalar()) && !binary->getLeft()->getType().isArray()) return nullptr; } if (proc) { if (!proc(*node)) { return node; } } node = binary->getLeft(); if (bufferReferenceOk && node->isReference()) return node; } while (true); } // // Create while and do-while loop nodes. // TIntermLoop* TIntermediate::addLoop(TIntermNode* body, TIntermTyped* test, TIntermTyped* terminal, bool testFirst, const TSourceLoc& loc) { TIntermLoop* node = new TIntermLoop(body, test, terminal, testFirst); node->setLoc(loc); return node; } // // Create a for-loop sequence. // TIntermAggregate* TIntermediate::addForLoop(TIntermNode* body, TIntermNode* initializer, TIntermTyped* test, TIntermTyped* terminal, bool testFirst, const TSourceLoc& loc, TIntermLoop*& node) { node = new TIntermLoop(body, test, terminal, testFirst); node->setLoc(loc); // make a sequence of the initializer and statement, but try to reuse the // aggregate already created for whatever is in the initializer, if there is one TIntermAggregate* loopSequence = (initializer == nullptr || initializer->getAsAggregate() == nullptr) ? makeAggregate(initializer, loc) : initializer->getAsAggregate(); if (loopSequence != nullptr && (loopSequence->getOp() == EOpSequence || loopSequence->getOp() == EOpScope)) loopSequence->setOp(EOpNull); loopSequence = growAggregate(loopSequence, node); loopSequence->setOperator(getDebugInfo() ? EOpScope : EOpSequence); return loopSequence; } // // Add branches. // TIntermBranch* TIntermediate::addBranch(TOperator branchOp, const TSourceLoc& loc) { return addBranch(branchOp, nullptr, loc); } TIntermBranch* TIntermediate::addBranch(TOperator branchOp, TIntermTyped* expression, const TSourceLoc& loc) { TIntermBranch* node = new TIntermBranch(branchOp, expression); node->setLoc(loc); return node; } // Propagate precision from formal function return type to actual return type, // and on to its subtree. void TIntermBranch::updatePrecision(TPrecisionQualifier parentPrecision) { TIntermTyped* exp = getExpression(); if (exp == nullptr) return; if (exp->getBasicType() == EbtInt || exp->getBasicType() == EbtUint || exp->getBasicType() == EbtFloat) { if (parentPrecision != EpqNone && exp->getQualifier().precision == EpqNone) { exp->propagatePrecision(parentPrecision); } } } // // This is to be executed after the final root is put on top by the parsing // process. // bool TIntermediate::postProcess(TIntermNode* root, EShLanguage /*language*/) { if (root == nullptr) return true; // Finish off the top-level sequence TIntermAggregate* aggRoot = root->getAsAggregate(); if (aggRoot && aggRoot->getOp() == EOpNull) aggRoot->setOperator(EOpSequence); // Propagate 'noContraction' label in backward from 'precise' variables. glslang::PropagateNoContraction(*this); switch (textureSamplerTransformMode) { case EShTexSampTransKeep: break; case EShTexSampTransUpgradeTextureRemoveSampler: performTextureUpgradeAndSamplerRemovalTransformation(root); break; case EShTexSampTransCount: assert(0); break; } return true; } void TIntermediate::addSymbolLinkageNodes(TIntermAggregate*& linkage, EShLanguage language, TSymbolTable& symbolTable) { // Add top-level nodes for declarations that must be checked cross // compilation unit by a linker, yet might not have been referenced // by the AST. // // Almost entirely, translation of symbols is driven by what's present // in the AST traversal, not by translating the symbol table. // // However, there are some special cases: // - From the specification: "Special built-in inputs gl_VertexID and // gl_InstanceID are also considered active vertex attributes." // - Linker-based type mismatch error reporting needs to see all // uniforms/ins/outs variables and blocks. // - ftransform() can make gl_Vertex and gl_ModelViewProjectionMatrix active. // // if (ftransformUsed) { // TODO: 1.1 lowering functionality: track ftransform() usage // addSymbolLinkageNode(root, symbolTable, "gl_Vertex"); // addSymbolLinkageNode(root, symbolTable, "gl_ModelViewProjectionMatrix"); //} if (language == EShLangVertex) { addSymbolLinkageNode(linkage, symbolTable, "gl_VertexID"); if ((version < 140 && requestedExtensions.find(E_GL_EXT_draw_instanced) != requestedExtensions.end()) || version >= 140) addSymbolLinkageNode(linkage, symbolTable, "gl_InstanceID"); } // Add a child to the root node for the linker objects linkage->setOperator(EOpLinkerObjects); treeRoot = growAggregate(treeRoot, linkage); } // // Add the given name or symbol to the list of nodes at the end of the tree used // for link-time checking and external linkage. // void TIntermediate::addSymbolLinkageNode(TIntermAggregate*& linkage, TSymbolTable& symbolTable, const TString& name) { TSymbol* symbol = symbolTable.find(name); if (symbol) addSymbolLinkageNode(linkage, *symbol->getAsVariable()); } void TIntermediate::addSymbolLinkageNode(TIntermAggregate*& linkage, const TSymbol& symbol) { const TVariable* variable = symbol.getAsVariable(); if (! variable) { // This must be a member of an anonymous block, and we need to add the whole block const TAnonMember* anon = symbol.getAsAnonMember(); variable = &anon->getAnonContainer(); } TIntermSymbol* node = addSymbol(*variable); linkage = growAggregate(linkage, node); } // // Add a caller->callee relationship to the call graph. // Assumes the strings are unique per signature. // void TIntermediate::addToCallGraph(TInfoSink& /*infoSink*/, const TString& caller, const TString& callee) { // Duplicates are okay, but faster to not keep them, and they come grouped by caller, // as long as new ones are push on the same end we check on for duplicates for (TGraph::const_iterator call = callGraph.begin(); call != callGraph.end(); ++call) { if (call->caller != caller) break; if (call->callee == callee) return; } callGraph.emplace_front(caller, callee); } // // This deletes the tree. // void TIntermediate::removeTree() { if (treeRoot) RemoveAllTreeNodes(treeRoot); } // // Implement the part of KHR_vulkan_glsl that lists the set of operations // that can result in a specialization constant operation. // // "5.x Specialization Constant Operations" // // Only some operations discussed in this section may be applied to a // specialization constant and still yield a result that is as // specialization constant. The operations allowed are listed below. // When a specialization constant is operated on with one of these // operators and with another constant or specialization constant, the // result is implicitly a specialization constant. // // - int(), uint(), and bool() constructors for type conversions // from any of the following types to any of the following types: // * int // * uint // * bool // - vector versions of the above conversion constructors // - allowed implicit conversions of the above // - swizzles (e.g., foo.yx) // - The following when applied to integer or unsigned integer types: // * unary negative ( - ) // * binary operations ( + , - , * , / , % ) // * shift ( <<, >> ) // * bitwise operations ( & , | , ^ ) // - The following when applied to integer or unsigned integer scalar types: // * comparison ( == , != , > , >= , < , <= ) // - The following when applied to the Boolean scalar type: // * not ( ! ) // * logical operations ( && , || , ^^ ) // * comparison ( == , != )" // // This function just handles binary and unary nodes. Construction // rules are handled in construction paths that are not covered by the unary // and binary paths, while required conversions will still show up here // as unary converters in the from a construction operator. // bool TIntermediate::isSpecializationOperation(const TIntermOperator& node) const { // The operations resulting in floating point are quite limited // (However, some floating-point operations result in bool, like ">", // so are handled later.) if (node.getType().isFloatingDomain()) { if (IsOpNumericConv(node.getOp()) && isTypeFloat(node.getType().getBasicType()) && isTypeFloat(node.getAsUnaryNode()->getOperand()->getAsTyped()->getType().getBasicType())) { return true; } switch (node.getOp()) { case EOpIndexDirect: case EOpIndexIndirect: case EOpIndexDirectStruct: case EOpVectorSwizzle: return true; default: return false; } } // Check for floating-point arguments if (const TIntermBinary* bin = node.getAsBinaryNode()) if (bin->getLeft() ->getType().isFloatingDomain() || bin->getRight()->getType().isFloatingDomain()) return false; // So, for now, we can assume everything left is non-floating-point... if (IsOpNumericConv(node.getOp())) { TBasicType srcType = node.getAsUnaryNode()->getOperand()->getAsTyped()->getType().getBasicType(); TBasicType dstType = node.getType().getBasicType(); if ((isTypeInt(srcType) || srcType == EbtBool) && (isTypeInt(dstType) || dstType == EbtBool)) { return true; } } // Now check for integer/bool-based operations switch (node.getOp()) { // dereference/swizzle case EOpIndexDirect: case EOpIndexIndirect: case EOpIndexDirectStruct: case EOpVectorSwizzle: // unary operations case EOpNegative: case EOpLogicalNot: case EOpBitwiseNot: // binary operations case EOpAdd: case EOpSub: case EOpMul: case EOpVectorTimesScalar: case EOpDiv: case EOpMod: case EOpRightShift: case EOpLeftShift: case EOpAnd: case EOpInclusiveOr: case EOpExclusiveOr: case EOpLogicalOr: case EOpLogicalXor: case EOpLogicalAnd: case EOpEqual: case EOpNotEqual: case EOpLessThan: case EOpGreaterThan: case EOpLessThanEqual: case EOpGreaterThanEqual: return true; default: return false; } } // Is the operation one that must propagate nonuniform? bool TIntermediate::isNonuniformPropagating(TOperator op) const { // "* All Operators in Section 5.1 (Operators), except for assignment, // arithmetic assignment, and sequence // * Component selection in Section 5.5 // * Matrix components in Section 5.6 // * Structure and Array Operations in Section 5.7, except for the length // method." switch (op) { case EOpPostIncrement: case EOpPostDecrement: case EOpPreIncrement: case EOpPreDecrement: case EOpNegative: case EOpLogicalNot: case EOpVectorLogicalNot: case EOpBitwiseNot: case EOpAdd: case EOpSub: case EOpMul: case EOpDiv: case EOpMod: case EOpRightShift: case EOpLeftShift: case EOpAnd: case EOpInclusiveOr: case EOpExclusiveOr: case EOpEqual: case EOpNotEqual: case EOpLessThan: case EOpGreaterThan: case EOpLessThanEqual: case EOpGreaterThanEqual: case EOpVectorTimesScalar: case EOpVectorTimesMatrix: case EOpMatrixTimesVector: case EOpMatrixTimesScalar: case EOpLogicalOr: case EOpLogicalXor: case EOpLogicalAnd: case EOpIndexDirect: case EOpIndexIndirect: case EOpIndexDirectStruct: case EOpVectorSwizzle: return true; default: break; } return false; } //////////////////////////////////////////////////////////////// // // Member functions of the nodes used for building the tree. // //////////////////////////////////////////////////////////////// // // Say whether or not an operation node changes the value of a variable. // // Returns true if state is modified. // bool TIntermOperator::modifiesState() const { switch (op) { case EOpPostIncrement: case EOpPostDecrement: case EOpPreIncrement: case EOpPreDecrement: case EOpAssign: case EOpAddAssign: case EOpSubAssign: case EOpMulAssign: case EOpVectorTimesMatrixAssign: case EOpVectorTimesScalarAssign: case EOpMatrixTimesScalarAssign: case EOpMatrixTimesMatrixAssign: case EOpDivAssign: case EOpModAssign: case EOpAndAssign: case EOpInclusiveOrAssign: case EOpExclusiveOrAssign: case EOpLeftShiftAssign: case EOpRightShiftAssign: return true; default: return false; } } // // returns true if the operator is for one of the constructors // bool TIntermOperator::isConstructor() const { return op > EOpConstructGuardStart && op < EOpConstructGuardEnd; } // // Make sure the type of an operator is appropriate for its // combination of operation and operand type. This will invoke // promoteUnary, promoteBinary, etc as needed. // // Returns false if nothing makes sense. // bool TIntermediate::promote(TIntermOperator* node) { if (node == nullptr) return false; if (node->getAsUnaryNode()) return promoteUnary(*node->getAsUnaryNode()); if (node->getAsBinaryNode()) return promoteBinary(*node->getAsBinaryNode()); if (node->getAsAggregate()) return promoteAggregate(*node->getAsAggregate()); return false; } // // See TIntermediate::promote // bool TIntermediate::promoteUnary(TIntermUnary& node) { const TOperator op = node.getOp(); TIntermTyped* operand = node.getOperand(); switch (op) { case EOpLogicalNot: // Convert operand to a boolean type if (operand->getBasicType() != EbtBool) { // Add constructor to boolean type. If that fails, we can't do it, so return false. TIntermTyped* converted = addConversion(op, TType(EbtBool), operand); if (converted == nullptr) return false; // Use the result of converting the node to a bool. node.setOperand(operand = converted); // also updates stack variable } break; case EOpBitwiseNot: if (!isTypeInt(operand->getBasicType())) return false; break; case EOpNegative: case EOpPostIncrement: case EOpPostDecrement: case EOpPreIncrement: case EOpPreDecrement: if (!isTypeInt(operand->getBasicType()) && operand->getBasicType() != EbtFloat && operand->getBasicType() != EbtFloat16 && operand->getBasicType() != EbtDouble) return false; break; default: // HLSL uses this path for initial function signature finding for built-ins // taking a single argument, which generally don't participate in // operator-based type promotion (type conversion will occur later). // For now, scalar argument cases are relying on the setType() call below. if (getSource() == EShSourceHlsl) break; // GLSL only allows integer arguments for the cases identified above in the // case statements. if (operand->getBasicType() != EbtFloat) return false; } node.setType(operand->getType()); node.getWritableType().getQualifier().makeTemporary(); return true; } // Propagate precision qualifiers *up* from children to parent. void TIntermUnary::updatePrecision() { if (getBasicType() == EbtInt || getBasicType() == EbtUint || getBasicType() == EbtFloat) { if (operand->getQualifier().precision > getQualifier().precision) getQualifier().precision = operand->getQualifier().precision; } } // // See TIntermediate::promote // bool TIntermediate::promoteBinary(TIntermBinary& node) { TOperator op = node.getOp(); TIntermTyped* left = node.getLeft(); TIntermTyped* right = node.getRight(); // Arrays and structures have to be exact matches. if ((left->isArray() || right->isArray() || left->getBasicType() == EbtStruct || right->getBasicType() == EbtStruct) && left->getType() != right->getType()) return false; // Base assumption: just make the type the same as the left // operand. Only deviations from this will be coded. node.setType(left->getType()); node.getWritableType().getQualifier().clear(); // Composite and opaque types don't having pending operator changes, e.g., // array, structure, and samplers. Just establish final type and correctness. if (left->isArray() || left->getBasicType() == EbtStruct || left->getBasicType() == EbtSampler) { switch (op) { case EOpEqual: case EOpNotEqual: if (left->getBasicType() == EbtSampler) { // can't compare samplers return false; } else { // Promote to conditional node.setType(TType(EbtBool)); } return true; case EOpAssign: // Keep type from above return true; default: return false; } } // // We now have only scalars, vectors, and matrices to worry about. // // HLSL implicitly promotes bool -> int for numeric operations. // (Implicit conversions to make the operands match each other's types were already done.) if (getSource() == EShSourceHlsl && (left->getBasicType() == EbtBool || right->getBasicType() == EbtBool)) { switch (op) { case EOpLessThan: case EOpGreaterThan: case EOpLessThanEqual: case EOpGreaterThanEqual: case EOpRightShift: case EOpLeftShift: case EOpMod: case EOpAnd: case EOpInclusiveOr: case EOpExclusiveOr: case EOpAdd: case EOpSub: case EOpDiv: case EOpMul: if (left->getBasicType() == EbtBool) left = createConversion(EbtInt, left); if (right->getBasicType() == EbtBool) right = createConversion(EbtInt, right); if (left == nullptr || right == nullptr) return false; node.setLeft(left); node.setRight(right); // Update the original base assumption on result type.. node.setType(left->getType()); node.getWritableType().getQualifier().clear(); break; default: break; } } // Do general type checks against individual operands (comparing left and right is coming up, checking mixed shapes after that) switch (op) { case EOpLessThan: case EOpGreaterThan: case EOpLessThanEqual: case EOpGreaterThanEqual: // Relational comparisons need numeric types and will promote to scalar Boolean. if (left->getBasicType() == EbtBool) return false; node.setType(TType(EbtBool, EvqTemporary, left->getVectorSize())); break; case EOpEqual: case EOpNotEqual: if (getSource() == EShSourceHlsl) { const int resultWidth = std::max(left->getVectorSize(), right->getVectorSize()); // In HLSL, == or != on vectors means component-wise comparison. if (resultWidth > 1) { op = (op == EOpEqual) ? EOpVectorEqual : EOpVectorNotEqual; node.setOp(op); } node.setType(TType(EbtBool, EvqTemporary, resultWidth)); } else { // All the above comparisons result in a bool (but not the vector compares) node.setType(TType(EbtBool)); } break; case EOpLogicalAnd: case EOpLogicalOr: case EOpLogicalXor: // logical ops operate only on Booleans or vectors of Booleans. if (left->getBasicType() != EbtBool || left->isMatrix()) return false; if (getSource() == EShSourceGlsl) { // logical ops operate only on scalar Booleans and will promote to scalar Boolean. if (left->isVector()) return false; } node.setType(TType(EbtBool, EvqTemporary, left->getVectorSize())); break; case EOpRightShift: case EOpLeftShift: case EOpRightShiftAssign: case EOpLeftShiftAssign: case EOpMod: case EOpModAssign: case EOpAnd: case EOpInclusiveOr: case EOpExclusiveOr: case EOpAndAssign: case EOpInclusiveOrAssign: case EOpExclusiveOrAssign: if (getSource() == EShSourceHlsl) break; // Check for integer-only operands. if (!isTypeInt(left->getBasicType()) && !isTypeInt(right->getBasicType())) return false; if (left->isMatrix() || right->isMatrix()) return false; break; case EOpAdd: case EOpSub: case EOpDiv: case EOpMul: case EOpAddAssign: case EOpSubAssign: case EOpMulAssign: case EOpDivAssign: // check for non-Boolean operands if (left->getBasicType() == EbtBool || right->getBasicType() == EbtBool) return false; break; default: break; } // Compare left and right, and finish with the cases where the operand types must match switch (op) { case EOpLessThan: case EOpGreaterThan: case EOpLessThanEqual: case EOpGreaterThanEqual: case EOpEqual: case EOpNotEqual: case EOpVectorEqual: case EOpVectorNotEqual: case EOpLogicalAnd: case EOpLogicalOr: case EOpLogicalXor: return left->getType() == right->getType(); case EOpMod: case EOpModAssign: case EOpAnd: case EOpInclusiveOr: case EOpExclusiveOr: case EOpAndAssign: case EOpInclusiveOrAssign: case EOpExclusiveOrAssign: case EOpAdd: case EOpSub: case EOpDiv: case EOpAddAssign: case EOpSubAssign: case EOpDivAssign: // Quick out in case the types do match if (left->getType() == right->getType()) return true; [[fallthrough]]; case EOpMul: case EOpMulAssign: // At least the basic type has to match if (left->getBasicType() != right->getBasicType()) return false; break; default: break; } if (left->getType().isCoopMat() || right->getType().isCoopMat()) { // Operations on two cooperative matrices must have identical types if (left->getType().isCoopMat() && right->getType().isCoopMat() && left->getType() != right->getType()) { return false; } switch (op) { case EOpMul: case EOpMulAssign: // Mul not supported in NV_cooperative_matrix if (left->getType().isCoopMatNV() && right->getType().isCoopMatNV()) { return false; } // NV_cooperative_matrix supports MulAssign is for mat*=scalar only. // KHR_cooperative_matrix supports it for mat*=mat as well. if (op == EOpMulAssign && right->getType().isCoopMatNV()) { return false; } // Use MatrixTimesScalar if either operand is not a matrix. Otherwise use Mul. if (!left->getType().isCoopMat() || !right->getType().isCoopMat()) { node.setOp(op == EOpMulAssign ? EOpMatrixTimesScalarAssign : EOpMatrixTimesScalar); } // In case of scalar*matrix, take the result type from the matrix. if (right->getType().isCoopMat()) { node.setType(right->getType()); } return true; case EOpAdd: case EOpSub: case EOpDiv: case EOpAssign: // These require both to be cooperative matrices if (!left->getType().isCoopMat() || !right->getType().isCoopMat()) { return false; } return true; default: break; } return false; } if (left->getType().isCoopVecNV() || right->getType().isCoopVecNV()) { // Operations on two cooperative vectors must have identical types if (left->getType().isCoopVecNV() && right->getType().isCoopVecNV() && left->getType() != right->getType()) { return false; } switch (op) { case EOpMul: case EOpMulAssign: // Use VectorTimesScalar if either operand is not a vector. Otherwise use Mul. if (!left->getType().isCoopVecNV() || !right->getType().isCoopVecNV()) { node.setOp(op == EOpMulAssign ? EOpVectorTimesScalarAssign : EOpVectorTimesScalar); } // In case of scalar*vector, take the result type from the vector. if (right->getType().isCoopVecNV()) { node.setType(right->getType()); } return true; case EOpLeftShift: case EOpLeftShiftAssign: case EOpRightShift: case EOpRightShiftAssign: case EOpAdd: case EOpSub: case EOpDiv: case EOpAssign: // These require both to be cooperative vectors if (!left->getType().isCoopVecNV() || !right->getType().isCoopVecNV()) { return false; } return true; default: break; } return false; } // Finish handling the case, for all ops, where both operands are scalars. if (left->isScalar() && right->isScalar()) return true; // Finish handling the case, for all ops, where there are two vectors of different sizes if (left->isVector() && right->isVector() && left->getVectorSize() != right->getVectorSize() && right->getVectorSize() > 1) return false; // // We now have a mix of scalars, vectors, or matrices, for non-relational operations. // // Can these two operands be combined, what is the resulting type? TBasicType basicType = left->getBasicType(); switch (op) { case EOpMul: if (!left->isMatrix() && right->isMatrix()) { if (left->isVector()) { if (left->getVectorSize() != right->getMatrixRows()) return false; node.setOp(op = EOpVectorTimesMatrix); node.setType(TType(basicType, EvqTemporary, right->getMatrixCols())); } else { node.setOp(op = EOpMatrixTimesScalar); node.setType(TType(basicType, EvqTemporary, 0, right->getMatrixCols(), right->getMatrixRows())); } } else if (left->isMatrix() && !right->isMatrix()) { if (right->isVector()) { if (left->getMatrixCols() != right->getVectorSize()) return false; node.setOp(op = EOpMatrixTimesVector); node.setType(TType(basicType, EvqTemporary, left->getMatrixRows())); } else { node.setOp(op = EOpMatrixTimesScalar); } } else if (left->isMatrix() && right->isMatrix()) { if (left->getMatrixCols() != right->getMatrixRows()) return false; node.setOp(op = EOpMatrixTimesMatrix); node.setType(TType(basicType, EvqTemporary, 0, right->getMatrixCols(), left->getMatrixRows())); } else if (! left->isMatrix() && ! right->isMatrix()) { if (left->isVector() && right->isVector()) { ; // leave as component product } else if (left->isVector() || right->isVector()) { node.setOp(op = EOpVectorTimesScalar); if (right->isVector()) node.setType(TType(basicType, EvqTemporary, right->getVectorSize())); } } else { return false; } break; case EOpMulAssign: if (! left->isMatrix() && right->isMatrix()) { if (left->isVector()) { if (left->getVectorSize() != right->getMatrixRows() || left->getVectorSize() != right->getMatrixCols()) return false; node.setOp(op = EOpVectorTimesMatrixAssign); } else { return false; } } else if (left->isMatrix() && !right->isMatrix()) { if (right->isVector()) { return false; } else { node.setOp(op = EOpMatrixTimesScalarAssign); } } else if (left->isMatrix() && right->isMatrix()) { if (left->getMatrixCols() != right->getMatrixCols() || left->getMatrixCols() != right->getMatrixRows()) return false; node.setOp(op = EOpMatrixTimesMatrixAssign); } else if (!left->isMatrix() && !right->isMatrix()) { if (left->isVector() && right->isVector()) { // leave as component product } else if (left->isVector() || right->isVector()) { if (! left->isVector()) return false; node.setOp(op = EOpVectorTimesScalarAssign); } } else { return false; } break; case EOpRightShift: case EOpLeftShift: case EOpRightShiftAssign: case EOpLeftShiftAssign: if (right->isVector() && (! left->isVector() || right->getVectorSize() != left->getVectorSize())) return false; break; case EOpAssign: if (left->getVectorSize() != right->getVectorSize() || left->getMatrixCols() != right->getMatrixCols() || left->getMatrixRows() != right->getMatrixRows()) return false; [[fallthrough]]; case EOpAdd: case EOpSub: case EOpDiv: case EOpMod: case EOpAnd: case EOpInclusiveOr: case EOpExclusiveOr: case EOpAddAssign: case EOpSubAssign: case EOpDivAssign: case EOpModAssign: case EOpAndAssign: case EOpInclusiveOrAssign: case EOpExclusiveOrAssign: if ((left->isMatrix() && right->isVector()) || (left->isVector() && right->isMatrix()) || left->getBasicType() != right->getBasicType()) return false; if (left->isMatrix() && right->isMatrix() && (left->getMatrixCols() != right->getMatrixCols() || left->getMatrixRows() != right->getMatrixRows())) return false; if (left->isVector() && right->isVector() && left->getVectorSize() != right->getVectorSize()) return false; if (right->isVector() || right->isMatrix()) { node.getWritableType().shallowCopy(right->getType()); node.getWritableType().getQualifier().makeTemporary(); } break; default: return false; } // // One more check for assignment. // switch (op) { // The resulting type has to match the left operand. case EOpAssign: case EOpAddAssign: case EOpSubAssign: case EOpMulAssign: case EOpDivAssign: case EOpModAssign: case EOpAndAssign: case EOpInclusiveOrAssign: case EOpExclusiveOrAssign: case EOpLeftShiftAssign: case EOpRightShiftAssign: if (node.getType() != left->getType()) return false; break; default: break; } return true; } // // See TIntermediate::promote // bool TIntermediate::promoteAggregate(TIntermAggregate& node) { TOperator op = node.getOp(); TIntermSequence& args = node.getSequence(); const int numArgs = static_cast(args.size()); // Presently, only hlsl does intrinsic promotions. if (getSource() != EShSourceHlsl) return true; // set of opcodes that can be promoted in this manner. switch (op) { case EOpAtan: case EOpClamp: case EOpCross: case EOpDistance: case EOpDot: case EOpDst: case EOpFaceForward: // case EOpFindMSB: TODO: // case EOpFindLSB: TODO: case EOpFma: case EOpMod: case EOpFrexp: case EOpLdexp: case EOpMix: case EOpLit: case EOpMax: case EOpMin: case EOpModf: // case EOpGenMul: TODO: case EOpPow: case EOpReflect: case EOpRefract: // case EOpSinCos: TODO: case EOpSmoothStep: case EOpStep: break; default: return true; } // TODO: array and struct behavior // Try converting all nodes to the given node's type TIntermSequence convertedArgs(numArgs, nullptr); // Try to convert all types to the nonConvArg type. for (int nonConvArg = 0; nonConvArg < numArgs; ++nonConvArg) { // Try converting all args to this arg's type for (int convArg = 0; convArg < numArgs; ++convArg) { convertedArgs[convArg] = addConversion(op, args[nonConvArg]->getAsTyped()->getType(), args[convArg]->getAsTyped()); } // If we successfully converted all the args, use the result. if (std::all_of(convertedArgs.begin(), convertedArgs.end(), [](const TIntermNode* node) { return node != nullptr; })) { std::swap(args, convertedArgs); return true; } } return false; } // Propagate precision qualifiers *up* from children to parent, and then // back *down* again to the children's subtrees. void TIntermAggregate::updatePrecision() { if (getBasicType() == EbtInt || getBasicType() == EbtUint || getBasicType() == EbtFloat) { TPrecisionQualifier maxPrecision = EpqNone; TIntermSequence operands = getSequence(); for (unsigned int i = 0; i < operands.size(); ++i) { TIntermTyped* typedNode = operands[i]->getAsTyped(); assert(typedNode); maxPrecision = std::max(maxPrecision, typedNode->getQualifier().precision); } getQualifier().precision = maxPrecision; for (unsigned int i = 0; i < operands.size(); ++i) { TIntermTyped* typedNode = operands[i]->getAsTyped(); assert(typedNode); typedNode->propagatePrecision(maxPrecision); } } } // Propagate precision qualifiers *up* from children to parent, and then // back *down* again to the children's subtrees. void TIntermBinary::updatePrecision() { if (getBasicType() == EbtInt || getBasicType() == EbtUint || getBasicType() == EbtFloat) { if (op == EOpRightShift || op == EOpLeftShift) { // For shifts get precision from left side only and thus no need to propagate getQualifier().precision = left->getQualifier().precision; } else { getQualifier().precision = std::max(right->getQualifier().precision, left->getQualifier().precision); if (getQualifier().precision != EpqNone) { left->propagatePrecision(getQualifier().precision); right->propagatePrecision(getQualifier().precision); } } } } // Recursively propagate precision qualifiers *down* the subtree of the current node, // until reaching a node that already has a precision qualifier or otherwise does // not participate in precision propagation. void TIntermTyped::propagatePrecision(TPrecisionQualifier newPrecision) { if (getQualifier().precision != EpqNone || (getBasicType() != EbtInt && getBasicType() != EbtUint && getBasicType() != EbtFloat && getBasicType() != EbtFloat16)) return; getQualifier().precision = newPrecision; TIntermBinary* binaryNode = getAsBinaryNode(); if (binaryNode) { binaryNode->getLeft()->propagatePrecision(newPrecision); binaryNode->getRight()->propagatePrecision(newPrecision); return; } TIntermUnary* unaryNode = getAsUnaryNode(); if (unaryNode) { unaryNode->getOperand()->propagatePrecision(newPrecision); return; } TIntermAggregate* aggregateNode = getAsAggregate(); if (aggregateNode) { TIntermSequence operands = aggregateNode->getSequence(); for (unsigned int i = 0; i < operands.size(); ++i) { TIntermTyped* typedNode = operands[i]->getAsTyped(); if (! typedNode) break; typedNode->propagatePrecision(newPrecision); } return; } TIntermSelection* selectionNode = getAsSelectionNode(); if (selectionNode) { TIntermTyped* typedNode = selectionNode->getTrueBlock()->getAsTyped(); if (typedNode) { typedNode->propagatePrecision(newPrecision); typedNode = selectionNode->getFalseBlock()->getAsTyped(); if (typedNode) typedNode->propagatePrecision(newPrecision); } return; } } TIntermTyped* TIntermediate::promoteConstantUnion(TBasicType promoteTo, TIntermConstantUnion* node) const { const TConstUnionArray& rightUnionArray = node->getConstArray(); int size = node->getType().computeNumComponents(); TConstUnionArray leftUnionArray(size); for (int i=0; i < size; i++) { #define PROMOTE(Set, CType, Get) leftUnionArray[i].Set(static_cast(rightUnionArray[i].Get())) #define PROMOTE_TO_BOOL(Get) leftUnionArray[i].setBConst(rightUnionArray[i].Get() != 0) #define TO_ALL(Get) \ switch (promoteTo) { \ case EbtBFloat16: PROMOTE(setDConst, double, Get); break; \ case EbtFloatE5M2: PROMOTE(setDConst, double, Get); break; \ case EbtFloatE4M3: PROMOTE(setDConst, double, Get); break; \ case EbtFloat16: PROMOTE(setDConst, double, Get); break; \ case EbtFloat: PROMOTE(setDConst, double, Get); break; \ case EbtDouble: PROMOTE(setDConst, double, Get); break; \ case EbtInt8: PROMOTE(setI8Const, signed char, Get); break; \ case EbtInt16: PROMOTE(setI16Const, short, Get); break; \ case EbtInt: PROMOTE(setIConst, int, Get); break; \ case EbtInt64: PROMOTE(setI64Const, long long, Get); break; \ case EbtUint8: PROMOTE(setU8Const, unsigned char, Get); break; \ case EbtUint16: PROMOTE(setU16Const, unsigned short, Get); break; \ case EbtUint: PROMOTE(setUConst, unsigned int, Get); break; \ case EbtUint64: PROMOTE(setU64Const, unsigned long long, Get); break; \ case EbtBool: PROMOTE_TO_BOOL(Get); break; \ default: return node; \ } switch (node->getType().getBasicType()) { case EbtFloat: TO_ALL(getDConst); break; case EbtInt: TO_ALL(getIConst); break; case EbtUint: TO_ALL(getUConst); break; case EbtBool: TO_ALL(getBConst); break; case EbtFloat16: TO_ALL(getDConst); break; case EbtBFloat16: TO_ALL(getDConst); break; case EbtFloatE5M2: TO_ALL(getDConst); break; case EbtFloatE4M3: TO_ALL(getDConst); break; case EbtDouble: TO_ALL(getDConst); break; case EbtInt8: TO_ALL(getI8Const); break; case EbtInt16: TO_ALL(getI16Const); break; case EbtInt64: TO_ALL(getI64Const); break; case EbtUint8: TO_ALL(getU8Const); break; case EbtUint16: TO_ALL(getU16Const); break; case EbtUint64: TO_ALL(getU64Const); break; default: return node; } } const TType& t = node->getType(); return addConstantUnion(leftUnionArray, TType(promoteTo, t.getQualifier().storage, t.getVectorSize(), t.getMatrixCols(), t.getMatrixRows()), node->getLoc()); } void TIntermAggregate::setPragmaTable(const TPragmaTable& pTable) { assert(pragmaTable == nullptr); pragmaTable = new TPragmaTable; *pragmaTable = pTable; } // If either node is a specialization constant, while the other is // a constant (or specialization constant), the result is still // a specialization constant. bool TIntermediate::specConstantPropagates(const TIntermTyped& node1, const TIntermTyped& node2) { return (node1.getType().getQualifier().isSpecConstant() && node2.getType().getQualifier().isConstant()) || (node2.getType().getQualifier().isSpecConstant() && node1.getType().getQualifier().isConstant()); } struct TextureUpgradeAndSamplerRemovalTransform : public TIntermTraverser { void visitSymbol(TIntermSymbol* symbol) override { if (symbol->getBasicType() == EbtSampler && symbol->getType().getSampler().isTexture()) { symbol->getWritableType().getSampler().setCombined(true); } } bool visitAggregate(TVisit, TIntermAggregate* ag) override { using namespace std; TIntermSequence& seq = ag->getSequence(); TQualifierList& qual = ag->getQualifierList(); // qual and seq are indexed using the same indices, so we have to modify both in lock-step assert(seq.size() == qual.size() || qual.empty()); size_t write = 0; for (size_t i = 0; i < seq.size(); ++i) { TIntermSymbol* symbol = seq[i]->getAsSymbolNode(); if (symbol && symbol->getBasicType() == EbtSampler && symbol->getType().getSampler().isPureSampler()) { // remove pure sampler variables continue; } TIntermNode* result = seq[i]; // replace constructors with sampler/textures TIntermAggregate *constructor = seq[i]->getAsAggregate(); if (constructor && constructor->getOp() == EOpConstructTextureSampler) { if (!constructor->getSequence().empty()) result = constructor->getSequence()[0]; } // write new node & qualifier seq[write] = result; if (!qual.empty()) qual[write] = qual[i]; write++; } seq.resize(write); if (!qual.empty()) qual.resize(write); return true; } }; void TIntermediate::performTextureUpgradeAndSamplerRemovalTransformation(TIntermNode* root) { TextureUpgradeAndSamplerRemovalTransform transform; root->traverse(&transform); } const char* TIntermediate::getResourceName(TResourceType res) { switch (res) { case EResSampler: return "shift-sampler-binding"; case EResTexture: return "shift-texture-binding"; case EResImage: return "shift-image-binding"; case EResUbo: return "shift-UBO-binding"; case EResSsbo: return "shift-ssbo-binding"; case EResUav: return "shift-uav-binding"; default: assert(0); // internal error: should only be called with valid resource types. return nullptr; } } } // end namespace glslang ================================================ FILE: src/libraries/glslang/glslang/MachineIndependent/LiveTraverser.h ================================================ // // Copyright (C) 2016 LunarG, Inc. // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following // disclaimer in the documentation and/or other materials provided // with the distribution. // // Neither the name of 3Dlabs Inc. Ltd. nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // #pragma once #include "../Include/Common.h" #include "reflection.h" #include "localintermediate.h" #include "gl_types.h" #include #include namespace glslang { // // The traverser: mostly pass through, except // - processing function-call nodes to push live functions onto the stack of functions to process // - processing selection nodes to trim semantically dead code // // This is in the glslang namespace directly so it can be a friend of TReflection. // This can be derived from to implement reflection database traversers or // binding mappers: anything that wants to traverse the live subset of the tree. // class TLiveTraverser : public TIntermTraverser { public: TLiveTraverser(const TIntermediate& i, bool traverseAll = false, bool preVisit = true, bool inVisit = false, bool postVisit = false) : TIntermTraverser(preVisit, inVisit, postVisit), intermediate(i), traverseAll(traverseAll) { } // // Given a function name, find its subroot in the tree, and push it onto the stack of // functions left to process. // void pushFunction(const TString& name) { TIntermSequence& globals = intermediate.getTreeRoot()->getAsAggregate()->getSequence(); for (unsigned int f = 0; f < globals.size(); ++f) { TIntermAggregate* candidate = globals[f]->getAsAggregate(); if (candidate && candidate->getOp() == EOpFunction && candidate->getName() == name) { destinations.push_back(candidate); break; } } } void pushGlobalReference(const TString& name) { TIntermSequence& globals = intermediate.getTreeRoot()->getAsAggregate()->getSequence(); for (unsigned int f = 0; f < globals.size(); ++f) { TIntermAggregate* candidate = globals[f]->getAsAggregate(); if (candidate && candidate->getOp() == EOpSequence && candidate->getSequence().size() == 1 && candidate->getSequence()[0]->getAsBinaryNode()) { TIntermBinary* binary = candidate->getSequence()[0]->getAsBinaryNode(); TIntermSymbol* symbol = binary->getLeft()->getAsSymbolNode(); if (symbol && symbol->getQualifier().storage == EvqGlobal && symbol->getName() == name) { destinations.push_back(candidate); break; } } } } typedef std::list TDestinationStack; TDestinationStack destinations; protected: // To catch which function calls are not dead, and hence which functions must be visited. virtual bool visitAggregate(TVisit, TIntermAggregate* node) { if (!traverseAll) if (node->getOp() == EOpFunctionCall) addFunctionCall(node); return true; // traverse this subtree } // To prune semantically dead paths. virtual bool visitSelection(TVisit /* visit */, TIntermSelection* node) { if (traverseAll) return true; // traverse all code TIntermConstantUnion* constant = node->getCondition()->getAsConstantUnion(); if (constant) { // cull the path that is dead if (constant->getConstArray()[0].getBConst() == true && node->getTrueBlock()) node->getTrueBlock()->traverse(this); if (constant->getConstArray()[0].getBConst() == false && node->getFalseBlock()) node->getFalseBlock()->traverse(this); return false; // don't traverse any more, we did it all above } else return true; // traverse the whole subtree } // To prune semantically dead paths in switch statements with constant expressions. virtual bool visitSwitch(TVisit /* visit */, TIntermSwitch* node) { if (traverseAll) return true; // traverse all code TIntermConstantUnion* constant = node->getCondition()->getAsConstantUnion(); if (constant) { TConstUnion switchValue = constant->getConstArray()[0]; int liveBranch = -1; const auto& body = node->getBody()->getSequence(); for (unsigned int i = 0; i < body.size(); ++i) { if (body[i]->getAsBranchNode()) { if (body[i]->getAsBranchNode()->getFlowOp() == glslang::EOpCase) { TConstUnion caseValue = body[i]->getAsBranchNode()->getExpression()->getAsConstantUnion()->getConstArray()[0]; if (switchValue == caseValue.getIConst()) { liveBranch = (int)i; break; } } else if (body[i]->getAsBranchNode()->getFlowOp() == glslang::EOpDefault) { liveBranch = (int)i; } } } if (liveBranch != -1) { for (int i = liveBranch; i < (int)body.size(); ++i) { if (body[i]->getAsAggregate()) { for (auto* inst : body[i]->getAsAggregate()->getSequence()) { if (inst->getAsBranchNode() && (inst->getAsBranchNode()->getFlowOp() == glslang::EOpBreak)) return false; // found and traversed the live case(s) inst->traverse(this); } } } } return false; // finished traversing all cases } else return true; // traverse the whole subtree } // Track live functions as well as uniforms, so that we don't visit dead functions // and only visit each function once. void addFunctionCall(TIntermAggregate* call) { // just use the map to ensure we process each function at most once if (liveFunctions.find(call->getName()) == liveFunctions.end()) { liveFunctions.insert(call->getName()); pushFunction(call->getName()); } } void addGlobalReference(const TString& name) { // just use the map to ensure we process each global at most once if (liveGlobals.find(name) == liveGlobals.end()) { liveGlobals.insert(name); pushGlobalReference(name); } } const TIntermediate& intermediate; typedef std::unordered_set TLiveFunctions; TLiveFunctions liveFunctions; typedef std::unordered_set TLiveGlobals; TLiveGlobals liveGlobals; bool traverseAll; private: // prevent copy & copy construct TLiveTraverser(TLiveTraverser&); TLiveTraverser& operator=(TLiveTraverser&); }; } // namespace glslang ================================================ FILE: src/libraries/glslang/glslang/MachineIndependent/ParseContextBase.cpp ================================================ // // Copyright (C) 2002-2005 3Dlabs Inc. Ltd. // Copyright (C) 2016 Google, Inc. // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following // disclaimer in the documentation and/or other materials provided // with the distribution. // // Neither the name of 3Dlabs Inc. Ltd. nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // // Implement the TParseContextBase class. #include #include "ParseHelper.h" extern int yyparse(glslang::TParseContext*); namespace glslang { // // Used to output syntax, parsing, and semantic errors. // void TParseContextBase::outputMessage(const TSourceLoc& loc, const char* szReason, const char* szToken, const char* szExtraInfoFormat, TPrefixType prefix, va_list args) { const int maxSize = MaxTokenLength + 200; char szExtraInfo[maxSize]; safe_vsprintf(szExtraInfo, maxSize, szExtraInfoFormat, args); infoSink.info.prefix(prefix); infoSink.info.location(loc, messages & EShMsgAbsolutePath, messages & EShMsgDisplayErrorColumn); infoSink.info << "'" << szToken << "' : " << szReason << " " << szExtraInfo << "\n"; if (prefix == EPrefixError) { ++numErrors; } } void C_DECL TParseContextBase::error(const TSourceLoc& loc, const char* szReason, const char* szToken, const char* szExtraInfoFormat, ...) { if (messages & EShMsgOnlyPreprocessor) return; // If enhanced msg readability, only print one error if (messages & EShMsgEnhanced && numErrors > 0) return; va_list args; va_start(args, szExtraInfoFormat); outputMessage(loc, szReason, szToken, szExtraInfoFormat, EPrefixError, args); va_end(args); if ((messages & EShMsgCascadingErrors) == 0) currentScanner->setEndOfInput(); } void C_DECL TParseContextBase::warn(const TSourceLoc& loc, const char* szReason, const char* szToken, const char* szExtraInfoFormat, ...) { if (suppressWarnings()) return; va_list args; va_start(args, szExtraInfoFormat); outputMessage(loc, szReason, szToken, szExtraInfoFormat, EPrefixWarning, args); va_end(args); } void C_DECL TParseContextBase::ppError(const TSourceLoc& loc, const char* szReason, const char* szToken, const char* szExtraInfoFormat, ...) { va_list args; va_start(args, szExtraInfoFormat); outputMessage(loc, szReason, szToken, szExtraInfoFormat, EPrefixError, args); va_end(args); if ((messages & EShMsgCascadingErrors) == 0) currentScanner->setEndOfInput(); } void C_DECL TParseContextBase::ppWarn(const TSourceLoc& loc, const char* szReason, const char* szToken, const char* szExtraInfoFormat, ...) { va_list args; va_start(args, szExtraInfoFormat); outputMessage(loc, szReason, szToken, szExtraInfoFormat, EPrefixWarning, args); va_end(args); } // // Both test and if necessary, spit out an error, to see if the node is really // an l-value that can be operated on this way. // // Returns true if there was an error. // bool TParseContextBase::lValueErrorCheck(const TSourceLoc& loc, const char* op, TIntermTyped* node) { TIntermBinary* binaryNode = node->getAsBinaryNode(); const char* symbol = nullptr; TIntermSymbol* symNode = node->getAsSymbolNode(); if (symNode != nullptr) symbol = symNode->getName().c_str(); const char* message = nullptr; switch (node->getQualifier().storage) { case EvqConst: message = "can't modify a const"; break; case EvqConstReadOnly: message = "can't modify a const"; break; case EvqUniform: message = "can't modify a uniform"; break; case EvqBuffer: if (node->getQualifier().isReadOnly()) message = "can't modify a readonly buffer"; if (node->getQualifier().isShaderRecord()) message = "can't modify a shaderrecordnv qualified buffer"; break; case EvqHitAttr: if (language != EShLangIntersect) message = "cannot modify hitAttributeNV in this stage"; break; default: // // Type that can't be written to? // switch (node->getBasicType()) { case EbtSampler: if (extensionTurnedOn(E_GL_ARB_bindless_texture) == false) message = "can't modify a sampler"; break; case EbtVoid: message = "can't modify void"; break; case EbtAtomicUint: message = "can't modify an atomic_uint"; break; case EbtAccStruct: message = "can't modify accelerationStructureNV"; break; case EbtRayQuery: message = "can't modify rayQueryEXT"; break; case EbtHitObjectNV: message = "can't modify hitObjectNV"; break; default: break; } } if (message == nullptr && binaryNode == nullptr && symNode == nullptr) { error(loc, " l-value required", op, "", ""); return true; } // // Everything else is okay, no error. // if (message == nullptr) { if (binaryNode) { switch (binaryNode->getOp()) { case EOpIndexDirect: case EOpIndexIndirect: // fall through case EOpIndexDirectStruct: // fall through case EOpVectorSwizzle: case EOpMatrixSwizzle: return lValueErrorCheck(loc, op, binaryNode->getLeft()); default: break; } error(loc, " l-value required", op, "", ""); return true; } return false; } // // If we get here, we have an error and a message. // const TIntermTyped* leftMostTypeNode = TIntermediate::traverseLValueBase(node, true); if (symNode) error(loc, " l-value required", op, "\"%s\" (%s)", symbol, message); else if (binaryNode && binaryNode->getAsOperator()->getOp() == EOpIndexDirectStruct) if(IsAnonymous(leftMostTypeNode->getAsSymbolNode()->getName())) error(loc, " l-value required", op, "\"%s\" (%s)", leftMostTypeNode->getAsSymbolNode()->getAccessName().c_str(), message); else error(loc, " l-value required", op, "\"%s\" (%s)", leftMostTypeNode->getAsSymbolNode()->getName().c_str(), message); else error(loc, " l-value required", op, "(%s)", message); return true; } // Test for and give an error if the node can't be read from. void TParseContextBase::rValueErrorCheck(const TSourceLoc& loc, const char* op, TIntermTyped* node) { if (! node) return; TIntermBinary* binaryNode = node->getAsBinaryNode(); const TIntermSymbol* symNode = node->getAsSymbolNode(); if (node->getQualifier().isWriteOnly()) { const TIntermTyped* leftMostTypeNode = TIntermediate::traverseLValueBase(node, true); if (symNode != nullptr) error(loc, "can't read from writeonly object: ", op, symNode->getName().c_str()); else if (binaryNode && (binaryNode->getAsOperator()->getOp() == EOpIndexDirectStruct || binaryNode->getAsOperator()->getOp() == EOpIndexDirect)) if(IsAnonymous(leftMostTypeNode->getAsSymbolNode()->getName())) error(loc, "can't read from writeonly object: ", op, leftMostTypeNode->getAsSymbolNode()->getAccessName().c_str()); else error(loc, "can't read from writeonly object: ", op, leftMostTypeNode->getAsSymbolNode()->getName().c_str()); else error(loc, "can't read from writeonly object: ", op, ""); } else { if (binaryNode) { switch (binaryNode->getOp()) { case EOpIndexDirect: case EOpIndexIndirect: case EOpIndexDirectStruct: case EOpVectorSwizzle: case EOpMatrixSwizzle: rValueErrorCheck(loc, op, binaryNode->getLeft()); break; default: break; } } } } // Add 'symbol' to the list of deferred linkage symbols, which // are later processed in finish(), at which point the symbol // must still be valid. // It is okay if the symbol's type will be subsequently edited; // the modifications will be tracked. // Order is preserved, to avoid creating novel forward references. void TParseContextBase::trackLinkage(TSymbol& symbol) { if (!parsingBuiltins) linkageSymbols.push_back(&symbol); } // Ensure index is in bounds, correct if necessary. // Give an error if not. void TParseContextBase::checkIndex(const TSourceLoc& loc, const TType& type, int& index) { const auto sizeIsSpecializationExpression = [&type]() { return type.containsSpecializationSize() && type.getArraySizes()->getOuterNode() != nullptr && type.getArraySizes()->getOuterNode()->getAsSymbolNode() == nullptr; }; if (index < 0) { error(loc, "", "[", "index out of range '%d'", index); index = 0; } else if (type.isArray()) { if (type.isSizedArray() && !sizeIsSpecializationExpression() && index >= type.getOuterArraySize()) { error(loc, "", "[", "array index out of range '%d'", index); index = type.getOuterArraySize() - 1; } } else if (type.isVector()) { if (index >= type.getVectorSize()) { error(loc, "", "[", "vector index out of range '%d'", index); index = type.getVectorSize() - 1; } } else if (type.isMatrix()) { if (index >= type.getMatrixCols()) { error(loc, "", "[", "matrix index out of range '%d'", index); index = type.getMatrixCols() - 1; } } else if (type.isCoopVecNV()) { if (index >= type.computeNumComponents()) { error(loc, "", "[", "cooperative vector index out of range '%d'", index); index = type.computeNumComponents() - 1; } } } // Make a shared symbol have a non-shared version that can be edited by the current // compile, such that editing its type will not change the shared version and will // effect all nodes already sharing it (non-shallow type), // or adopting its full type after being edited (shallow type). void TParseContextBase::makeEditable(TSymbol*& symbol) { // copyUp() does a deep copy of the type. symbol = symbolTable.copyUp(symbol); // Save it (deferred, so it can be edited first) in the AST for linker use. if (symbol) trackLinkage(*symbol); } // Return a writable version of the variable 'name'. // // Return nullptr if 'name' is not found. This should mean // something is seriously wrong (e.g., compiler asking self for // built-in that doesn't exist). TVariable* TParseContextBase::getEditableVariable(const char* name) { bool builtIn; TSymbol* symbol = symbolTable.find(name, &builtIn); assert(symbol != nullptr); if (symbol == nullptr) return nullptr; if (builtIn) makeEditable(symbol); return symbol->getAsVariable(); } // Select the best matching function for 'call' from 'candidateList'. // // Assumptions // // There is no exact match, so a selection algorithm needs to run. That is, the // language-specific handler should check for exact match first, to // decide what to do, before calling this selector. // // Input // // * list of candidate signatures to select from // * the call // * a predicate function convertible(from, to) that says whether or not type // 'from' can implicitly convert to type 'to' (it includes the case of what // the calling language would consider a matching type with no conversion // needed) // * a predicate function better(from1, from2, to1, to2) that says whether or // not a conversion from <-> to2 is considered better than a conversion // from <-> to1 (both in and out directions need testing, as declared by the // formal parameter) // // Output // // * best matching candidate (or none, if no viable candidates found) // * whether there was a tie for the best match (ambiguous overload selection, // caller's choice for how to report) // const TFunction* TParseContextBase::selectFunction( const TVector candidateList, const TFunction& call, std::function convertible, std::function better, /* output */ bool& tie) { // // Operation // // 1. Prune the input list of candidates down to a list of viable candidates, // where each viable candidate has // // * at least as many parameters as there are calling arguments, with any // remaining parameters being optional or having default values // * each parameter is true under convertible(A, B), where A is the calling // type for in and B is the formal type, and in addition, for out B is the // calling type and A is the formal type // // 2. If there are no viable candidates, return with no match. // // 3. If there is only one viable candidate, it is the best match. // // 4. If there are multiple viable candidates, select the first viable candidate // as the incumbent. Compare the incumbent to the next viable candidate, and if // that candidate is better (bullets below), make it the incumbent. Repeat, with // a linear walk through the viable candidate list. The final incumbent will be // returned as the best match. A viable candidate is better than the incumbent if // // * it has a function argument with a better(...) conversion than the incumbent, // for all directions needed by in and out // * the incumbent has no argument with a better(...) conversion then the // candidate, for either in or out (as needed) // // 5. Check for ambiguity by comparing the best match against all other viable // candidates. If any other viable candidate has a function argument with a // better(...) conversion than the best candidate (for either in or out // directions), return that there was a tie for best. // tie = false; // 1. prune to viable... TVector viableCandidates; for (auto it = candidateList.begin(); it != candidateList.end(); ++it) { const TFunction& candidate = *(*it); // to even be a potential match, number of arguments must be >= the number of // fixed (non-default) parameters, and <= the total (including parameter with defaults). if (call.getParamCount() < candidate.getFixedParamCount() || call.getParamCount() > candidate.getParamCount()) continue; // see if arguments are convertible bool viable = true; // The call can have fewer parameters than the candidate, if some have defaults. const int paramCount = std::min(call.getParamCount(), candidate.getParamCount()); for (int param = 0; param < paramCount; ++param) { if (candidate[param].type->getQualifier().isParamInput()) { if (! convertible(*call[param].type, *candidate[param].type, candidate.getBuiltInOp(), param)) { viable = false; break; } } if (candidate[param].type->getQualifier().isParamOutput()) { if (! convertible(*candidate[param].type, *call[param].type, candidate.getBuiltInOp(), param)) { viable = false; break; } } } if (viable) viableCandidates.push_back(&candidate); } // 2. none viable... if (viableCandidates.size() == 0) return nullptr; // 3. only one viable... if (viableCandidates.size() == 1) return viableCandidates.front(); // 4. find best... const auto betterParam = [&call, &better](const TFunction& can1, const TFunction& can2) -> bool { // is call -> can2 better than call -> can1 for any parameter bool hasBetterParam = false; for (int param = 0; param < call.getParamCount(); ++param) { if (better(*call[param].type, *can1[param].type, *can2[param].type)) { hasBetterParam = true; break; } } return hasBetterParam; }; const auto equivalentParams = [&call, &better](const TFunction& can1, const TFunction& can2) -> bool { // is call -> can2 equivalent to call -> can1 for all the call parameters? for (int param = 0; param < call.getParamCount(); ++param) { if (better(*call[param].type, *can1[param].type, *can2[param].type) || better(*call[param].type, *can2[param].type, *can1[param].type)) return false; } return true; }; const TFunction* incumbent = viableCandidates.front(); for (auto it = viableCandidates.begin() + 1; it != viableCandidates.end(); ++it) { const TFunction& candidate = *(*it); if (betterParam(*incumbent, candidate) && ! betterParam(candidate, *incumbent)) incumbent = &candidate; } // 5. ambiguity... for (auto it = viableCandidates.begin(); it != viableCandidates.end(); ++it) { if (incumbent == *it) continue; const TFunction& candidate = *(*it); // In the case of default parameters, it may have an identical initial set, which is // also ambiguous if (betterParam(*incumbent, candidate) || equivalentParams(*incumbent, candidate)) tie = true; } return incumbent; } // // Look at a '.' field selector string and change it into numerical selectors // for a vector or scalar. // // Always return some form of swizzle, so the result is always usable. // void TParseContextBase::parseSwizzleSelector(const TSourceLoc& loc, const TString& compString, int vecSize, TSwizzleSelectors& selector) { // Too long? if (compString.size() > MaxSwizzleSelectors) error(loc, "vector swizzle too long", compString.c_str(), ""); // Use this to test that all swizzle characters are from the same swizzle-namespace-set enum { exyzw, ergba, estpq, } fieldSet[MaxSwizzleSelectors]; // Decode the swizzle string. int size = std::min(MaxSwizzleSelectors, (int)compString.size()); for (int i = 0; i < size; ++i) { switch (compString[i]) { case 'x': selector.push_back(0); fieldSet[i] = exyzw; break; case 'r': selector.push_back(0); fieldSet[i] = ergba; break; case 's': selector.push_back(0); fieldSet[i] = estpq; break; case 'y': selector.push_back(1); fieldSet[i] = exyzw; break; case 'g': selector.push_back(1); fieldSet[i] = ergba; break; case 't': selector.push_back(1); fieldSet[i] = estpq; break; case 'z': selector.push_back(2); fieldSet[i] = exyzw; break; case 'b': selector.push_back(2); fieldSet[i] = ergba; break; case 'p': selector.push_back(2); fieldSet[i] = estpq; break; case 'w': selector.push_back(3); fieldSet[i] = exyzw; break; case 'a': selector.push_back(3); fieldSet[i] = ergba; break; case 'q': selector.push_back(3); fieldSet[i] = estpq; break; default: error(loc, "unknown swizzle selection", compString.c_str(), ""); break; } } // Additional error checking. for (int i = 0; i < selector.size(); ++i) { if (selector[i] >= vecSize) { error(loc, "vector swizzle selection out of range", compString.c_str(), ""); selector.resize(i); break; } if (i > 0 && fieldSet[i] != fieldSet[i-1]) { error(loc, "vector swizzle selectors not from the same set", compString.c_str(), ""); selector.resize(i); break; } } // Ensure it is valid. if (selector.size() == 0) selector.push_back(0); } // // Make the passed-in variable information become a member of the // global uniform block. If this doesn't exist yet, make it. // void TParseContextBase::growGlobalUniformBlock(const TSourceLoc& loc, TType& memberType, const TString& memberName, TTypeList* typeList) { // Make the global block, if not yet made. if (globalUniformBlock == nullptr) { TQualifier blockQualifier; blockQualifier.clear(); blockQualifier.storage = EvqUniform; TType blockType(new TTypeList, *NewPoolTString(getGlobalUniformBlockName()), blockQualifier); setUniformBlockDefaults(blockType); globalUniformBlock = new TVariable(NewPoolTString(""), blockType, true); firstNewMember = 0; } // Update with binding and set globalUniformBlock->getWritableType().getQualifier().layoutBinding = globalUniformBinding; globalUniformBlock->getWritableType().getQualifier().layoutSet = globalUniformSet; // Check for declarations of this default uniform that already exist due to other compilation units. TSymbol* symbol = symbolTable.find(memberName); if (symbol) { if (memberType != symbol->getType()) { TString err; err += "Redeclaration: already declared as \"" + symbol->getType().getCompleteString() + "\""; error(loc, "", memberName.c_str(), err.c_str()); } return; } // Add the requested member as a member to the global block. TType* type = new TType; type->shallowCopy(memberType); type->setFieldName(memberName); if (typeList) type->setStruct(typeList); TTypeLoc typeLoc = {type, loc}; globalUniformBlock->getType().getWritableStruct()->push_back(typeLoc); // Insert into the symbol table. if (firstNewMember == 0) { // This is the first request; we need a normal symbol table insert if (symbolTable.insert(*globalUniformBlock)) trackLinkage(*globalUniformBlock); else error(loc, "failed to insert the global constant buffer", "uniform", ""); } else { // This is a follow-on request; we need to amend the first insert symbolTable.amend(*globalUniformBlock, firstNewMember); } ++firstNewMember; } void TParseContextBase::growAtomicCounterBlock(int binding, const TSourceLoc& loc, TType& memberType, const TString& memberName, TTypeList* typeList) { // Make the atomic counter block, if not yet made. const auto &at = atomicCounterBuffers.find(binding); if (at == atomicCounterBuffers.end()) { atomicCounterBuffers.insert({binding, (TVariable*)nullptr }); atomicCounterBlockFirstNewMember.insert({binding, 0}); } TVariable*& atomicCounterBuffer = atomicCounterBuffers[binding]; int& bufferNewMember = atomicCounterBlockFirstNewMember[binding]; if (atomicCounterBuffer == nullptr) { TQualifier blockQualifier; blockQualifier.clear(); blockQualifier.storage = EvqBuffer; char charBuffer[512]; if (binding != TQualifier::layoutBindingEnd) { snprintf(charBuffer, 512, "%s_%d", getAtomicCounterBlockName(), binding); } else { snprintf(charBuffer, 512, "%s_0", getAtomicCounterBlockName()); } TType blockType(new TTypeList, *NewPoolTString(charBuffer), blockQualifier); setUniformBlockDefaults(blockType); blockType.getQualifier().layoutPacking = ElpStd430; atomicCounterBuffer = new TVariable(NewPoolTString(""), blockType, true); // If we arn't auto mapping bindings then set the block to use the same // binding as what the atomic was set to use if (!intermediate.getAutoMapBindings()) { atomicCounterBuffer->getWritableType().getQualifier().layoutBinding = binding; } bufferNewMember = 0; atomicCounterBuffer->getWritableType().getQualifier().layoutSet = atomicCounterBlockSet; } // Add the requested member as a member to the global block. TType* type = new TType; type->shallowCopy(memberType); type->setFieldName(memberName); if (typeList) type->setStruct(typeList); TTypeLoc typeLoc = {type, loc}; atomicCounterBuffer->getType().getWritableStruct()->push_back(typeLoc); // Insert into the symbol table. if (bufferNewMember == 0) { // This is the first request; we need a normal symbol table insert if (symbolTable.insert(*atomicCounterBuffer)) trackLinkage(*atomicCounterBuffer); else error(loc, "failed to insert the global constant buffer", "buffer", ""); } else { // This is a follow-on request; we need to amend the first insert symbolTable.amend(*atomicCounterBuffer, bufferNewMember); } ++bufferNewMember; } void TParseContextBase::finish() { if (parsingBuiltins) return; for (const TString& relaxedSymbol : relaxedSymbols) { TSymbol* symbol = symbolTable.find(relaxedSymbol); TType& type = symbol->getWritableType(); for (const TTypeLoc& typeLoc : *type.getStruct()) { if (typeLoc.type->isOpaque()) { typeLoc.type->getSampler() = TSampler{}; typeLoc.type->setBasicType(EbtInt); TString fieldName("/*"); fieldName.append(typeLoc.type->getFieldName()); fieldName.append("*/"); typeLoc.type->setFieldName(fieldName); } } } // Transfer the linkage symbols to AST nodes, preserving order. TIntermAggregate* linkage = new TIntermAggregate; for (auto i = linkageSymbols.begin(); i != linkageSymbols.end(); ++i) intermediate.addSymbolLinkageNode(linkage, **i); intermediate.addSymbolLinkageNodes(linkage, getLanguage(), symbolTable); } } // end namespace glslang ================================================ FILE: src/libraries/glslang/glslang/MachineIndependent/ParseHelper.cpp ================================================ // // Copyright (C) 2002-2005 3Dlabs Inc. Ltd. // Copyright (C) 2012-2015 LunarG, Inc. // Copyright (C) 2015-2018 Google, Inc. // Copyright (C) 2017, 2019 ARM Limited. // Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights reserved. // Modifications Copyright (C) 2024 Ravi Prakash Singh. // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following // disclaimer in the documentation and/or other materials provided // with the distribution. // // Neither the name of 3Dlabs Inc. Ltd. nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // #include "ParseHelper.h" #include "Initialize.h" #include "Scan.h" #include #include "Versions.h" #include "preprocessor/PpContext.h" extern int yyparse(glslang::TParseContext*); namespace glslang { TParseContext::TParseContext(TSymbolTable& symbolTable, TIntermediate& interm, bool parsingBuiltins, int version, EProfile profile, const SpvVersion& spvVersion, EShLanguage language, TInfoSink& infoSink, bool forwardCompatible, EShMessages messages, const TString* entryPoint) : TParseContextBase(symbolTable, interm, parsingBuiltins, version, profile, spvVersion, language, infoSink, forwardCompatible, messages, entryPoint), inMain(false), blockName(nullptr), limits(resources.limits), atomicUintOffsets(nullptr), anyIndexLimits(false) { // decide whether precision qualifiers should be ignored or respected if (isEsProfile() || spvVersion.vulkan > 0) { precisionManager.respectPrecisionQualifiers(); if (! parsingBuiltins && language == EShLangFragment && !isEsProfile() && spvVersion.vulkan > 0) precisionManager.warnAboutDefaults(); } setPrecisionDefaults(); globalUniformDefaults.clear(); globalUniformDefaults.layoutMatrix = ElmColumnMajor; globalUniformDefaults.layoutPacking = spvVersion.spv != 0 ? ElpStd140 : ElpShared; globalBufferDefaults.clear(); globalBufferDefaults.layoutMatrix = ElmColumnMajor; globalBufferDefaults.layoutPacking = spvVersion.spv != 0 ? ElpStd430 : ElpShared; globalInputDefaults.clear(); globalOutputDefaults.clear(); globalSharedDefaults.clear(); globalSharedDefaults.layoutMatrix = ElmColumnMajor; globalSharedDefaults.layoutPacking = ElpStd430; // "Shaders in the transform // feedback capturing mode have an initial global default of // layout(xfb_buffer = 0) out;" if (language == EShLangVertex || language == EShLangTessControl || language == EShLangTessEvaluation || language == EShLangGeometry) globalOutputDefaults.layoutXfbBuffer = 0; if (language == EShLangGeometry) globalOutputDefaults.layoutStream = 0; if (entryPoint != nullptr && entryPoint->size() > 0 && *entryPoint != "main") infoSink.info.message(EPrefixError, "Source entry point must be \"main\""); } TParseContext::~TParseContext() { delete [] atomicUintOffsets; } // Set up all default precisions as needed by the current environment. // Intended just as a TParseContext constructor helper. void TParseContext::setPrecisionDefaults() { // Set all precision defaults to EpqNone, which is correct for all types // when not obeying precision qualifiers, and correct for types that don't // have defaults (thus getting an error on use) when obeying precision // qualifiers. for (int type = 0; type < EbtNumTypes; ++type) defaultPrecision[type] = EpqNone; for (int type = 0; type < maxSamplerIndex; ++type) defaultSamplerPrecision[type] = EpqNone; // replace with real precision defaults for those that have them if (obeyPrecisionQualifiers()) { if (isEsProfile()) { // Most don't have defaults, a few default to lowp. TSampler sampler; sampler.set(EbtFloat, Esd2D); defaultSamplerPrecision[computeSamplerTypeIndex(sampler)] = EpqLow; sampler.set(EbtFloat, EsdCube); defaultSamplerPrecision[computeSamplerTypeIndex(sampler)] = EpqLow; sampler.set(EbtFloat, Esd2D); sampler.setExternal(true); defaultSamplerPrecision[computeSamplerTypeIndex(sampler)] = EpqLow; } // If we are parsing built-in computational variables/functions, it is meaningful to record // whether the built-in has no precision qualifier, as that ambiguity // is used to resolve the precision from the supplied arguments/operands instead. // So, we don't actually want to replace EpqNone with a default precision for built-ins. if (! parsingBuiltins) { if (isEsProfile() && language == EShLangFragment) { defaultPrecision[EbtInt] = EpqMedium; defaultPrecision[EbtUint] = EpqMedium; } else { defaultPrecision[EbtInt] = EpqHigh; defaultPrecision[EbtUint] = EpqHigh; defaultPrecision[EbtFloat] = EpqHigh; } if (!isEsProfile()) { // Non-ES profile // All sampler precisions default to highp. for (int type = 0; type < maxSamplerIndex; ++type) defaultSamplerPrecision[type] = EpqHigh; } } defaultPrecision[EbtSampler] = EpqLow; defaultPrecision[EbtAtomicUint] = EpqHigh; } } void TParseContext::setLimits(const TBuiltInResource& r) { resources = r; intermediate.setLimits(r); anyIndexLimits = ! limits.generalAttributeMatrixVectorIndexing || ! limits.generalConstantMatrixVectorIndexing || ! limits.generalSamplerIndexing || ! limits.generalUniformIndexing || ! limits.generalVariableIndexing || ! limits.generalVaryingIndexing; // "Each binding point tracks its own current default offset for // inheritance of subsequent variables using the same binding. The initial state of compilation is that all // binding points have an offset of 0." atomicUintOffsets = new int[resources.maxAtomicCounterBindings]; for (int b = 0; b < resources.maxAtomicCounterBindings; ++b) atomicUintOffsets[b] = 0; } // // Parse an array of strings using yyparse, going through the // preprocessor to tokenize the shader strings, then through // the GLSL scanner. // // Returns true for successful acceptance of the shader, false if any errors. // bool TParseContext::parseShaderStrings(TPpContext& ppContext, TInputScanner& input, bool versionWillBeError) { currentScanner = &input; ppContext.setInput(input, versionWillBeError); yyparse(this); finish(); return numErrors == 0; } // This is called from bison when it has a parse (syntax) error // Note though that to stop cascading errors, we set EOF, which // will usually cause a syntax error, so be more accurate that // compilation is terminating. void TParseContext::parserError(const char* s) { if (! getScanner()->atEndOfInput() || numErrors == 0) error(getCurrentLoc(), "", "", s, ""); else error(getCurrentLoc(), "compilation terminated", "", ""); } void TParseContext::growGlobalUniformBlock(const TSourceLoc& loc, TType& memberType, const TString& memberName, TTypeList* typeList) { bool createBlock = globalUniformBlock == nullptr; if (createBlock) { globalUniformBinding = intermediate.getGlobalUniformBinding(); globalUniformSet = intermediate.getGlobalUniformSet(); } // use base class function to create/expand block TParseContextBase::growGlobalUniformBlock(loc, memberType, memberName, typeList); if (spvVersion.vulkan > 0 && spvVersion.vulkanRelaxed) { // check for a block storage override TBlockStorageClass storageOverride = intermediate.getBlockStorageOverride(getGlobalUniformBlockName()); TQualifier& qualifier = globalUniformBlock->getWritableType().getQualifier(); qualifier.defaultBlock = true; if (storageOverride != EbsNone) { if (createBlock) { // Remap block storage qualifier.setBlockStorage(storageOverride); // check that the change didn't create errors blockQualifierCheck(loc, qualifier, false); } // remap meber storage as well memberType.getQualifier().setBlockStorage(storageOverride); } } } void TParseContext::growAtomicCounterBlock(int binding, const TSourceLoc& loc, TType& memberType, const TString& memberName, TTypeList* typeList) { bool createBlock = atomicCounterBuffers.find(binding) == atomicCounterBuffers.end(); if (createBlock) { atomicCounterBlockSet = intermediate.getAtomicCounterBlockSet(); } // use base class function to create/expand block TParseContextBase::growAtomicCounterBlock(binding, loc, memberType, memberName, typeList); TQualifier& qualifier = atomicCounterBuffers[binding]->getWritableType().getQualifier(); qualifier.defaultBlock = true; if (spvVersion.vulkan > 0 && spvVersion.vulkanRelaxed) { // check for a Block storage override TBlockStorageClass storageOverride = intermediate.getBlockStorageOverride(getAtomicCounterBlockName()); if (storageOverride != EbsNone) { if (createBlock) { // Remap block storage qualifier.setBlockStorage(storageOverride); // check that the change didn't create errors blockQualifierCheck(loc, qualifier, false); } // remap meber storage as well memberType.getQualifier().setBlockStorage(storageOverride); } } } const char* TParseContext::getGlobalUniformBlockName() const { const char* name = intermediate.getGlobalUniformBlockName(); if (std::string(name) == "") return "gl_DefaultUniformBlock"; else return name; } void TParseContext::finalizeGlobalUniformBlockLayout(TVariable&) { } void TParseContext::setUniformBlockDefaults(TType& block) const { block.getQualifier().layoutPacking = ElpStd140; block.getQualifier().layoutMatrix = ElmColumnMajor; } const char* TParseContext::getAtomicCounterBlockName() const { const char* name = intermediate.getAtomicCounterBlockName(); if (std::string(name) == "") return "gl_AtomicCounterBlock"; else return name; } void TParseContext::finalizeAtomicCounterBlockLayout(TVariable&) { } void TParseContext::setAtomicCounterBlockDefaults(TType& block) const { block.getQualifier().layoutPacking = ElpStd430; block.getQualifier().layoutMatrix = ElmRowMajor; } void TParseContext::setInvariant(const TSourceLoc& loc, const char* builtin) { TSymbol* symbol = symbolTable.find(builtin); if (symbol && symbol->getType().getQualifier().isPipeOutput()) { if (intermediate.inIoAccessed(builtin)) warn(loc, "changing qualification after use", "invariant", builtin); TSymbol* csymbol = symbolTable.copyUp(symbol); csymbol->getWritableType().getQualifier().invariant = true; } } void TParseContext::handlePragma(const TSourceLoc& loc, const TVector& tokens) { if (pragmaCallback) pragmaCallback(loc.line, tokens); if (tokens.size() == 0) return; if (tokens[0].compare("optimize") == 0) { if (tokens.size() != 4) { error(loc, "optimize pragma syntax is incorrect", "#pragma", ""); return; } if (tokens[1].compare("(") != 0) { error(loc, "\"(\" expected after 'optimize' keyword", "#pragma", ""); return; } if (tokens[2].compare("on") == 0) contextPragma.optimize = true; else if (tokens[2].compare("off") == 0) contextPragma.optimize = false; else { if(relaxedErrors()) // If an implementation does not recognize the tokens following #pragma, then it will ignore that pragma. warn(loc, "\"on\" or \"off\" expected after '(' for 'optimize' pragma", "#pragma", ""); return; } if (tokens[3].compare(")") != 0) { error(loc, "\")\" expected to end 'optimize' pragma", "#pragma", ""); return; } } else if (tokens[0].compare("debug") == 0) { if (tokens.size() != 4) { error(loc, "debug pragma syntax is incorrect", "#pragma", ""); return; } if (tokens[1].compare("(") != 0) { error(loc, "\"(\" expected after 'debug' keyword", "#pragma", ""); return; } if (tokens[2].compare("on") == 0) contextPragma.debug = true; else if (tokens[2].compare("off") == 0) contextPragma.debug = false; else { if(relaxedErrors()) // If an implementation does not recognize the tokens following #pragma, then it will ignore that pragma. warn(loc, "\"on\" or \"off\" expected after '(' for 'debug' pragma", "#pragma", ""); return; } if (tokens[3].compare(")") != 0) { error(loc, "\")\" expected to end 'debug' pragma", "#pragma", ""); return; } } else if (spvVersion.spv > 0 && tokens[0].compare("use_storage_buffer") == 0) { if (tokens.size() != 1) error(loc, "extra tokens", "#pragma", ""); intermediate.setUseStorageBuffer(); } else if (spvVersion.spv > 0 && tokens[0].compare("use_vulkan_memory_model") == 0) { if (tokens.size() != 1) error(loc, "extra tokens", "#pragma", ""); intermediate.setUseVulkanMemoryModel(); } else if (spvVersion.spv > 0 && tokens[0].compare("use_variable_pointers") == 0) { if (tokens.size() != 1) error(loc, "extra tokens", "#pragma", ""); if (spvVersion.spv < glslang::EShTargetSpv_1_3) error(loc, "requires SPIR-V 1.3", "#pragma use_variable_pointers", ""); intermediate.setUseVariablePointers(); } else if (spvVersion.spv > 0 && tokens[0].compare("use_replicated_composites") == 0) { if (tokens.size() != 1) error(loc, "extra tokens", "#pragma", ""); intermediate.setReplicatedComposites(); } else if (tokens[0].compare("once") == 0) { warn(loc, "not implemented", "#pragma once", ""); } else if (tokens[0].compare("glslang_binary_double_output") == 0) { intermediate.setBinaryDoubleOutput(); } else if (spvVersion.spv > 0 && tokens[0].compare("STDGL") == 0 && tokens[1].compare("invariant") == 0 && tokens[3].compare("all") == 0) { intermediate.setInvariantAll(); // Set all builtin out variables invariant if declared setInvariant(loc, "gl_Position"); setInvariant(loc, "gl_PointSize"); setInvariant(loc, "gl_ClipDistance"); setInvariant(loc, "gl_CullDistance"); setInvariant(loc, "gl_TessLevelOuter"); setInvariant(loc, "gl_TessLevelInner"); setInvariant(loc, "gl_PrimitiveID"); setInvariant(loc, "gl_Layer"); setInvariant(loc, "gl_ViewportIndex"); setInvariant(loc, "gl_FragDepth"); setInvariant(loc, "gl_SampleMask"); setInvariant(loc, "gl_ClipVertex"); setInvariant(loc, "gl_FrontColor"); setInvariant(loc, "gl_BackColor"); setInvariant(loc, "gl_FrontSecondaryColor"); setInvariant(loc, "gl_BackSecondaryColor"); setInvariant(loc, "gl_TexCoord"); setInvariant(loc, "gl_FogFragCoord"); setInvariant(loc, "gl_FragColor"); setInvariant(loc, "gl_FragData"); } } // // Handle seeing a variable identifier in the grammar. // TIntermTyped* TParseContext::handleVariable(const TSourceLoc& loc, TSymbol* symbol, const TString* string) { TIntermTyped* node = nullptr; // Error check for requiring specific extensions present. if (symbol && symbol->getNumExtensions()) requireExtensions(loc, symbol->getNumExtensions(), symbol->getExtensions(), symbol->getName().c_str()); if (symbol && symbol->isReadOnly()) { // All shared things containing an unsized array must be copied up // on first use, so that all future references will share its array structure, // so that editing the implicit size will effect all nodes consuming it, // and so that editing the implicit size won't change the shared one. // // If this is a variable or a block, check it and all it contains, but if this // is a member of an anonymous block, check the whole block, as the whole block // will need to be copied up if it contains an unsized array. // // This check is being done before the block-name check further down, so guard // for that too. if (!symbol->getType().isUnusableName()) { if (symbol->getType().containsUnsizedArray() || (symbol->getAsAnonMember() && symbol->getAsAnonMember()->getAnonContainer().getType().containsUnsizedArray())) makeEditable(symbol); } } const TVariable* variable; const TAnonMember* anon = symbol ? symbol->getAsAnonMember() : nullptr; if (anon) { // It was a member of an anonymous container. // Create a subtree for its dereference. variable = anon->getAnonContainer().getAsVariable(); TIntermTyped* container = intermediate.addSymbol(*variable, loc); TIntermTyped* constNode = intermediate.addConstantUnion(anon->getMemberNumber(), loc); node = intermediate.addIndex(EOpIndexDirectStruct, container, constNode, loc); node->setType(*(*variable->getType().getStruct())[anon->getMemberNumber()].type); if (node->getType().hiddenMember()) error(loc, "member of nameless block was not redeclared", string->c_str(), ""); } else { // Not a member of an anonymous container. // The symbol table search was done in the lexical phase. // See if it was a variable. variable = symbol ? symbol->getAsVariable() : nullptr; if (variable) { if (variable->getType().isUnusableName()) { error(loc, "cannot be used (maybe an instance name is needed)", string->c_str(), ""); variable = nullptr; } if (language == EShLangMesh && variable) { TLayoutGeometry primitiveType = intermediate.getOutputPrimitive(); if ((variable->getMangledName() == "gl_PrimitiveTriangleIndicesEXT" && primitiveType != ElgTriangles) || (variable->getMangledName() == "gl_PrimitiveLineIndicesEXT" && primitiveType != ElgLines) || (variable->getMangledName() == "gl_PrimitivePointIndicesEXT" && primitiveType != ElgPoints)) { error(loc, "cannot be used (output primitive type mismatch)", string->c_str(), ""); variable = nullptr; } } } else { if (symbol) error(loc, "variable name expected", string->c_str(), ""); } // Recovery, if it wasn't found or was not a variable. if (! variable) { bool builtIn = false; TVector candidateList; symbolTable.findFunctionNameList(*string + "(", candidateList, builtIn); // If it's a function, pass the name/mangledName if (!candidateList.empty() && !builtIn) { variable = new TVariable(&candidateList[0]->getName(), &candidateList[0]->getMangledName(), TType(EbtFunction)); } else { variable = new TVariable(string, TType(EbtVoid)); } } if (variable->getType().getQualifier().isFrontEndConstant()) node = intermediate.addConstantUnion(variable->getConstArray(), variable->getType(), loc); else node = intermediate.addSymbol(*variable, loc); } if (variable->getType().getQualifier().isIo()) intermediate.addIoAccessed(*string); if (variable->getType().isReference() && variable->getType().getQualifier().bufferReferenceNeedsVulkanMemoryModel()) { intermediate.setUseVulkanMemoryModel(); } return node; } // // Handle seeing a base[index] dereference in the grammar. // TIntermTyped* TParseContext::handleBracketDereference(const TSourceLoc& loc, TIntermTyped* base, TIntermTyped* index) { int indexValue = 0; if (index->getQualifier().isFrontEndConstant()) indexValue = index->getAsConstantUnion()->getConstArray()[0].getIConst(); // basic type checks... variableCheck(base); if (! base->isArray() && ! base->isMatrix() && ! base->isVector() && ! base->getType().isCoopMat() && ! base->isReference() && ! base->getType().isCoopVecNV()) { if (base->getAsSymbolNode()) error(loc, " left of '[' is not of type array, matrix, or vector ", base->getAsSymbolNode()->getName().c_str(), ""); else error(loc, " left of '[' is not of type array, matrix, or vector ", "expression", ""); // Insert dummy error-recovery result return intermediate.addConstantUnion(0.0, EbtFloat, loc); } if (!base->isArray() && base->isVector()) { if (base->getType().contains16BitFloat()) requireFloat16Arithmetic(loc, "[", "does not operate on types containing float16"); if (base->getType().contains16BitInt()) requireInt16Arithmetic(loc, "[", "does not operate on types containing (u)int16"); if (base->getType().contains8BitInt()) requireInt8Arithmetic(loc, "[", "does not operate on types containing (u)int8"); } // check for constant folding if (base->getType().getQualifier().isFrontEndConstant() && index->getQualifier().isFrontEndConstant()) { // both base and index are front-end constants checkIndex(loc, base->getType(), indexValue); return intermediate.foldDereference(base, indexValue, loc); } // at least one of base and index is not a front-end constant variable... TIntermTyped* result = nullptr; if (base->isReference() && ! base->isArray()) { requireExtensions(loc, 1, &E_GL_EXT_buffer_reference2, "buffer reference indexing"); if (base->getType().getReferentType()->containsUnsizedArray()) { error(loc, "cannot index reference to buffer containing an unsized array", "", ""); result = nullptr; } else { result = intermediate.addBinaryMath(EOpAdd, base, index, loc); if (result != nullptr) result->setType(base->getType()); } if (result == nullptr) { error(loc, "cannot index buffer reference", "", ""); result = intermediate.addConstantUnion(0.0, EbtFloat, loc); } return result; } if (base->getAsSymbolNode() && isIoResizeArray(base->getType())) handleIoResizeArrayAccess(loc, base); if (index->getQualifier().isFrontEndConstant()) checkIndex(loc, base->getType(), indexValue); if (index->getQualifier().isFrontEndConstant()) { if (base->getType().isUnsizedArray()) { base->getWritableType().updateImplicitArraySize(indexValue + 1); base->getWritableType().setImplicitlySized(true); if (base->getQualifier().builtIn == EbvClipDistance && indexValue >= resources.maxClipDistances) { error(loc, "gl_ClipDistance", "[", "array index out of range '%d'", indexValue); } else if (base->getQualifier().builtIn == EbvCullDistance && indexValue >= resources.maxCullDistances) { error(loc, "gl_CullDistance", "[", "array index out of range '%d'", indexValue); } else if (base->getQualifier().builtIn == EbvSampleMask && indexValue >= (resources.maxSamples + 31) / 32) { error(loc, "gl_SampleMask", "[", "array index out of range '%d'", indexValue); } // For 2D per-view builtin arrays, update the inner dimension size in parent type if (base->getQualifier().isPerView() && base->getQualifier().builtIn != EbvNone) { TIntermBinary* binaryNode = base->getAsBinaryNode(); if (binaryNode) { TType& leftType = binaryNode->getLeft()->getWritableType(); TArraySizes& arraySizes = *leftType.getArraySizes(); assert(arraySizes.getNumDims() == 2); arraySizes.setDimSize(1, std::max(arraySizes.getDimSize(1), indexValue + 1)); } } } else checkIndex(loc, base->getType(), indexValue); result = intermediate.addIndex(EOpIndexDirect, base, index, loc); } else { if (base->getType().isUnsizedArray()) { // we have a variable index into an unsized array, which is okay, // depending on the situation if (base->getAsSymbolNode() && isIoResizeArray(base->getType())) error(loc, "", "[", "array must be sized by a redeclaration or layout qualifier before being indexed with a variable"); else { // it is okay for a run-time sized array checkRuntimeSizable(loc, *base); } base->getWritableType().setArrayVariablyIndexed(); } if (base->getBasicType() == EbtBlock) { if (base->getQualifier().storage == EvqBuffer) requireProfile(base->getLoc(), ~EEsProfile, "variable indexing buffer block array"); else if (base->getQualifier().storage == EvqUniform) { profileRequires(base->getLoc(), EEsProfile, 320, Num_AEP_gpu_shader5, AEP_gpu_shader5, "variable indexing uniform block array"); profileRequires(base->getLoc(), ECoreProfile, 400, Num_AEP_core_gpu_shader5, AEP_core_gpu_shader5, "variable indexing uniform block array"); } else { // input/output blocks either don't exist or can't be variably indexed } } else if (language == EShLangFragment && base->getQualifier().isPipeOutput() && base->getQualifier().builtIn != EbvSampleMask) requireProfile(base->getLoc(), ~EEsProfile, "variable indexing fragment shader output array"); else if (base->getBasicType() == EbtSampler && version >= 130) { const char* explanation = "variable indexing sampler array"; requireProfile(base->getLoc(), EEsProfile | ECoreProfile | ECompatibilityProfile, explanation); profileRequires(base->getLoc(), EEsProfile, 320, Num_AEP_gpu_shader5, AEP_gpu_shader5, explanation); profileRequires(base->getLoc(), ECoreProfile | ECompatibilityProfile, 400, Num_AEP_core_gpu_shader5, AEP_core_gpu_shader5, explanation); } result = intermediate.addIndex(EOpIndexIndirect, base, index, loc); } // Insert valid dereferenced result type TType newType(base->getType(), 0); if (base->getType().getQualifier().isConstant() && index->getQualifier().isConstant()) { newType.getQualifier().storage = EvqConst; // If base or index is a specialization constant, the result should also be a specialization constant. if (base->getType().getQualifier().isSpecConstant() || index->getQualifier().isSpecConstant()) { newType.getQualifier().makeSpecConstant(); } } else { newType.getQualifier().storage = EvqTemporary; newType.getQualifier().specConstant = false; } result->setType(newType); inheritMemoryQualifiers(base->getQualifier(), result->getWritableType().getQualifier()); // Propagate nonuniform if (base->getQualifier().isNonUniform() || index->getQualifier().isNonUniform()) result->getWritableType().getQualifier().nonUniform = true; if (anyIndexLimits) handleIndexLimits(loc, base, index); return result; } // for ES 2.0 (version 100) limitations for almost all index operations except vertex-shader uniforms void TParseContext::handleIndexLimits(const TSourceLoc& /*loc*/, TIntermTyped* base, TIntermTyped* index) { if ((! limits.generalSamplerIndexing && base->getBasicType() == EbtSampler) || (! limits.generalUniformIndexing && base->getQualifier().isUniformOrBuffer() && language != EShLangVertex) || (! limits.generalAttributeMatrixVectorIndexing && base->getQualifier().isPipeInput() && language == EShLangVertex && (base->getType().isMatrix() || base->getType().isVector())) || (! limits.generalConstantMatrixVectorIndexing && base->getAsConstantUnion()) || (! limits.generalVariableIndexing && ! base->getType().getQualifier().isUniformOrBuffer() && ! base->getType().getQualifier().isPipeInput() && ! base->getType().getQualifier().isPipeOutput() && ! base->getType().getQualifier().isConstant()) || (! limits.generalVaryingIndexing && (base->getType().getQualifier().isPipeInput() || base->getType().getQualifier().isPipeOutput()))) { // it's too early to know what the inductive variables are, save it for post processing needsIndexLimitationChecking.push_back(index); } } // Make a shared symbol have a non-shared version that can be edited by the current // compile, such that editing its type will not change the shared version and will // effect all nodes sharing it. void TParseContext::makeEditable(TSymbol*& symbol) { TParseContextBase::makeEditable(symbol); // See if it's tied to IO resizing if (isIoResizeArray(symbol->getType())) ioArraySymbolResizeList.push_back(symbol); } // Return true if this is a geometry shader input array or tessellation control output array // or mesh shader output array. bool TParseContext::isIoResizeArray(const TType& type) const { return type.isArray() && ((language == EShLangGeometry && type.getQualifier().storage == EvqVaryingIn) || (language == EShLangTessControl && type.getQualifier().storage == EvqVaryingOut && ! type.getQualifier().patch) || (language == EShLangFragment && type.getQualifier().storage == EvqVaryingIn && (type.getQualifier().pervertexNV || type.getQualifier().pervertexEXT)) || (language == EShLangMesh && type.getQualifier().storage == EvqVaryingOut && !type.getQualifier().perTaskNV)); } // If an array is not isIoResizeArray() but is an io array, make sure it has the right size void TParseContext::fixIoArraySize(const TSourceLoc& loc, TType& type) { if (! type.isArray() || type.getQualifier().patch || symbolTable.atBuiltInLevel()) return; assert(! isIoResizeArray(type)); if (type.getQualifier().storage != EvqVaryingIn || type.getQualifier().patch) return; if (language == EShLangTessControl || language == EShLangTessEvaluation) { if (type.getOuterArraySize() != resources.maxPatchVertices) { if (type.isSizedArray()) error(loc, "tessellation input array size must be gl_MaxPatchVertices or implicitly sized", "[]", ""); type.changeOuterArraySize(resources.maxPatchVertices); } } } // Issue any errors if the non-array object is missing arrayness WRT // shader I/O that has array requirements. // All arrayness checking is handled in array paths, this is for void TParseContext::ioArrayCheck(const TSourceLoc& loc, const TType& type, const TString& identifier) { if (! type.isArray() && ! symbolTable.atBuiltInLevel()) { if (type.getQualifier().isArrayedIo(language) && !type.getQualifier().layoutPassthrough) error(loc, "type must be an array:", type.getStorageQualifierString(), identifier.c_str()); } } // Handle a dereference of a geometry shader input array or tessellation control output array. // See ioArraySymbolResizeList comment in ParseHelper.h. // void TParseContext::handleIoResizeArrayAccess(const TSourceLoc& /*loc*/, TIntermTyped* base) { TIntermSymbol* symbolNode = base->getAsSymbolNode(); assert(symbolNode); if (! symbolNode) return; // fix array size, if it can be fixed and needs to be fixed (will allow variable indexing) if (symbolNode->getType().isUnsizedArray()) { int newSize = getIoArrayImplicitSize(symbolNode->getType().getQualifier()); if (newSize > 0) symbolNode->getWritableType().changeOuterArraySize(newSize); } } // If there has been an input primitive declaration (geometry shader) or an output // number of vertices declaration(tessellation shader), make sure all input array types // match it in size. Types come either from nodes in the AST or symbols in the // symbol table. // // Types without an array size will be given one. // Types already having a size that is wrong will get an error. // void TParseContext::checkIoArraysConsistency(const TSourceLoc &loc, bool tailOnly) { int requiredSize = 0; TString featureString; size_t listSize = ioArraySymbolResizeList.size(); size_t i = 0; // If tailOnly = true, only check the last array symbol in the list. if (tailOnly) { i = listSize - 1; } for (bool firstIteration = true; i < listSize; ++i) { TType &type = ioArraySymbolResizeList[i]->getWritableType(); // As I/O array sizes don't change, fetch requiredSize only once, // except for mesh shaders which could have different I/O array sizes based on type qualifiers. if (firstIteration || (language == EShLangMesh)) { requiredSize = getIoArrayImplicitSize(type.getQualifier(), &featureString); if (requiredSize == 0) break; firstIteration = false; } checkIoArrayConsistency(loc, requiredSize, featureString.c_str(), type, ioArraySymbolResizeList[i]->getName()); } } int TParseContext::getIoArrayImplicitSize(const TQualifier &qualifier, TString *featureString) const { int expectedSize = 0; TString str = "unknown"; unsigned int maxVertices = intermediate.getVertices() != TQualifier::layoutNotSet ? intermediate.getVertices() : 0; if (language == EShLangGeometry) { expectedSize = TQualifier::mapGeometryToSize(intermediate.getInputPrimitive()); str = TQualifier::getGeometryString(intermediate.getInputPrimitive()); } else if (language == EShLangTessControl) { expectedSize = maxVertices; str = "vertices"; } else if (language == EShLangFragment) { // Number of vertices for Fragment shader is always three. expectedSize = 3; str = "vertices"; } else if (language == EShLangMesh) { unsigned int maxPrimitives = intermediate.getPrimitives() != TQualifier::layoutNotSet ? intermediate.getPrimitives() : 0; if (qualifier.builtIn == EbvPrimitiveIndicesNV) { expectedSize = maxPrimitives * TQualifier::mapGeometryToSize(intermediate.getOutputPrimitive()); str = "max_primitives*"; str += TQualifier::getGeometryString(intermediate.getOutputPrimitive()); } else if (qualifier.builtIn == EbvPrimitiveTriangleIndicesEXT || qualifier.builtIn == EbvPrimitiveLineIndicesEXT || qualifier.builtIn == EbvPrimitivePointIndicesEXT) { expectedSize = maxPrimitives; str = "max_primitives"; } else if (qualifier.isPerPrimitive()) { expectedSize = maxPrimitives; str = "max_primitives"; } else { expectedSize = maxVertices; str = "max_vertices"; } } if (featureString) *featureString = str; return expectedSize; } void TParseContext::checkIoArrayConsistency(const TSourceLoc& loc, int requiredSize, const char* feature, TType& type, const TString& name) { if (type.isUnsizedArray()) type.changeOuterArraySize(requiredSize); else if (type.getOuterArraySize() != requiredSize) { if (language == EShLangGeometry) error(loc, "inconsistent input primitive for array size of", feature, name.c_str()); else if (language == EShLangTessControl) error(loc, "inconsistent output number of vertices for array size of", feature, name.c_str()); else if (language == EShLangFragment) { if (type.getOuterArraySize() > requiredSize) error(loc, " cannot be greater than 3 for pervertexEXT", feature, name.c_str()); } else if (language == EShLangMesh) error(loc, "inconsistent output array size of", feature, name.c_str()); else assert(0); } } // Handle seeing a binary node with a math operation. // Returns nullptr if not semantically allowed. TIntermTyped* TParseContext::handleBinaryMath(const TSourceLoc& loc, const char* str, TOperator op, TIntermTyped* left, TIntermTyped* right) { rValueErrorCheck(loc, str, left->getAsTyped()); rValueErrorCheck(loc, str, right->getAsTyped()); bool allowed = true; switch (op) { // TODO: Bring more source language-specific checks up from intermediate.cpp // to the specific parse helpers for that source language. case EOpLessThan: case EOpGreaterThan: case EOpLessThanEqual: case EOpGreaterThanEqual: if (! left->isScalar() || ! right->isScalar()) allowed = false; break; default: break; } if (((left->getType().contains16BitFloat() || right->getType().contains16BitFloat()) && !float16Arithmetic()) || ((left->getType().contains16BitInt() || right->getType().contains16BitInt()) && !int16Arithmetic()) || ((left->getType().contains8BitInt() || right->getType().contains8BitInt()) && !int8Arithmetic()) || (left->getType().containsBFloat16() || right->getType().containsBFloat16())) { allowed = false; } TIntermTyped* result = nullptr; if (allowed) { if ((left->isReference() || right->isReference())) requireExtensions(loc, 1, &E_GL_EXT_buffer_reference2, "buffer reference math"); result = intermediate.addBinaryMath(op, left, right, loc); } if (result == nullptr) { bool enhanced = intermediate.getEnhancedMsgs(); binaryOpError(loc, str, left->getCompleteString(enhanced), right->getCompleteString(enhanced)); } return result; } // Handle seeing a unary node with a math operation. TIntermTyped* TParseContext::handleUnaryMath(const TSourceLoc& loc, const char* str, TOperator op, TIntermTyped* childNode) { rValueErrorCheck(loc, str, childNode); bool allowed = true; if ((childNode->getType().contains16BitFloat() && !float16Arithmetic()) || (childNode->getType().contains16BitInt() && !int16Arithmetic()) || (childNode->getType().contains8BitInt() && !int8Arithmetic()) || (childNode->getType().containsBFloat16())) { allowed = false; } TIntermTyped* result = nullptr; if (allowed) result = intermediate.addUnaryMath(op, childNode, loc); if (result) return result; else { bool enhanced = intermediate.getEnhancedMsgs(); unaryOpError(loc, str, childNode->getCompleteString(enhanced)); } return childNode; } // // Handle seeing a base.field dereference in the grammar. // TIntermTyped* TParseContext::handleDotDereference(const TSourceLoc& loc, TIntermTyped* base, const TString& field) { variableCheck(base); // // .length() can't be resolved until we later see the function-calling syntax. // Save away the name in the AST for now. Processing is completed in // handleLengthMethod(). // if (field == "length") { if (base->isArray()) { profileRequires(loc, ENoProfile, 120, E_GL_3DL_array_objects, ".length"); profileRequires(loc, EEsProfile, 300, nullptr, ".length"); } else if (base->isVector() || base->isMatrix()) { const char* feature = ".length() on vectors and matrices"; requireProfile(loc, ~EEsProfile, feature); profileRequires(loc, ~EEsProfile, 420, E_GL_ARB_shading_language_420pack, feature); } else if (!base->getType().isCoopMat() && !base->getType().isCoopVecNV()) { bool enhanced = intermediate.getEnhancedMsgs(); error(loc, "does not operate on this type:", field.c_str(), base->getType().getCompleteString(enhanced).c_str()); return base; } return intermediate.addMethod(base, TType(EbtInt), &field, loc); } // It's not .length() if we get to here. if (base->isArray()) { error(loc, "cannot apply to an array:", ".", field.c_str()); return base; } if (base->getType().isCoopMat()) { error(loc, "cannot apply to a cooperative matrix type:", ".", field.c_str()); return base; } // It's neither an array nor .length() if we get here, // leaving swizzles and struct/block dereferences. TIntermTyped* result = base; if ((base->isVector() || base->isScalar()) && (base->isFloatingDomain() || base->isIntegerDomain() || base->getBasicType() == EbtBool)) { result = handleDotSwizzle(loc, base, field); } else if (base->isStruct() || base->isReference()) { const TTypeList* fields = base->isReference() ? base->getType().getReferentType()->getStruct() : base->getType().getStruct(); bool fieldFound = false; int member; for (member = 0; member < (int)fields->size(); ++member) { if ((*fields)[member].type->getFieldName() == field) { fieldFound = true; break; } } if (fieldFound) { if (spvVersion.vulkan != 0 && spvVersion.vulkanRelaxed) result = vkRelaxedRemapDotDereference(loc, *base, *(*fields)[member].type, field); if (result == base) { if (base->getType().getQualifier().isFrontEndConstant()) result = intermediate.foldDereference(base, member, loc); else { blockMemberExtensionCheck(loc, base, member, field); TIntermTyped* index = intermediate.addConstantUnion(member, loc); result = intermediate.addIndex(EOpIndexDirectStruct, base, index, loc); result->setType(*(*fields)[member].type); if ((*fields)[member].type->getQualifier().isIo()) intermediate.addIoAccessed(field); } } inheritMemoryQualifiers(base->getQualifier(), result->getWritableType().getQualifier()); } else { auto baseSymbol = base; while (baseSymbol->getAsSymbolNode() == nullptr) { auto binaryNode = baseSymbol->getAsBinaryNode(); if (binaryNode == nullptr) break; baseSymbol = binaryNode->getLeft(); } if (baseSymbol->getAsSymbolNode() != nullptr) { TString structName; structName.append("\'").append(baseSymbol->getAsSymbolNode()->getName().c_str()).append("\'"); error(loc, "no such field in structure", field.c_str(), structName.c_str()); } else { error(loc, "no such field in structure", field.c_str(), ""); } } } else error(loc, "does not apply to this type:", field.c_str(), base->getType().getCompleteString(intermediate.getEnhancedMsgs()).c_str()); // Propagate noContraction up the dereference chain if (base->getQualifier().isNoContraction()) result->getWritableType().getQualifier().setNoContraction(); // Propagate nonuniform if (base->getQualifier().isNonUniform()) result->getWritableType().getQualifier().nonUniform = true; return result; } // // Handle seeing a base.swizzle, a subset of base.identifier in the grammar. // TIntermTyped* TParseContext::handleDotSwizzle(const TSourceLoc& loc, TIntermTyped* base, const TString& field) { TIntermTyped* result = base; if (base->isScalar()) { const char* dotFeature = "scalar swizzle"; requireProfile(loc, ~EEsProfile, dotFeature); profileRequires(loc, ~EEsProfile, 420, E_GL_ARB_shading_language_420pack, dotFeature); } TSwizzleSelectors selectors; parseSwizzleSelector(loc, field, base->getVectorSize(), selectors); if (base->isVector() && selectors.size() != 1 && base->getType().contains16BitFloat()) requireFloat16Arithmetic(loc, ".", "can't swizzle types containing float16"); if (base->isVector() && selectors.size() != 1 && base->getType().contains16BitInt()) requireInt16Arithmetic(loc, ".", "can't swizzle types containing (u)int16"); if (base->isVector() && selectors.size() != 1 && base->getType().contains8BitInt()) requireInt8Arithmetic(loc, ".", "can't swizzle types containing (u)int8"); if (base->isScalar()) { if (selectors.size() == 1) return result; else { TType type(base->getBasicType(), EvqTemporary, selectors.size()); // Swizzle operations propagate specialization-constantness if (base->getQualifier().isSpecConstant()) type.getQualifier().makeSpecConstant(); return addConstructor(loc, base, type); } } if (base->getType().getQualifier().isFrontEndConstant()) result = intermediate.foldSwizzle(base, selectors, loc); else { if (selectors.size() == 1) { TIntermTyped* index = intermediate.addConstantUnion(selectors[0], loc); result = intermediate.addIndex(EOpIndexDirect, base, index, loc); result->setType(TType(base->getBasicType(), EvqTemporary, base->getType().getQualifier().precision)); } else { TIntermTyped* index = intermediate.addSwizzle(selectors, loc); result = intermediate.addIndex(EOpVectorSwizzle, base, index, loc); result->setType(TType(base->getBasicType(), EvqTemporary, base->getType().getQualifier().precision, selectors.size())); } // Swizzle operations propagate specialization-constantness if (base->getType().getQualifier().isSpecConstant()) result->getWritableType().getQualifier().makeSpecConstant(); } return result; } void TParseContext::blockMemberExtensionCheck(const TSourceLoc& loc, const TIntermTyped* base, int member, const TString& memberName) { // a block that needs extension checking is either 'base', or if arrayed, // one level removed to the left const TIntermSymbol* baseSymbol = nullptr; if (base->getAsBinaryNode() == nullptr) baseSymbol = base->getAsSymbolNode(); else baseSymbol = base->getAsBinaryNode()->getLeft()->getAsSymbolNode(); if (baseSymbol == nullptr) return; const TSymbol* symbol = symbolTable.find(baseSymbol->getName()); if (symbol == nullptr) return; const TVariable* variable = symbol->getAsVariable(); if (variable == nullptr) return; if (!variable->hasMemberExtensions()) return; // We now have a variable that is the base of a dot reference // with members that need extension checking. if (variable->getNumMemberExtensions(member) > 0) requireExtensions(loc, variable->getNumMemberExtensions(member), variable->getMemberExtensions(member), memberName.c_str()); } // // Handle seeing a function declarator in the grammar. This is the precursor // to recognizing a function prototype or function definition. // TFunction* TParseContext::handleFunctionDeclarator(const TSourceLoc& loc, TFunction& function, bool prototype) { // ES can't declare prototypes inside functions if (! symbolTable.atGlobalLevel()) requireProfile(loc, ~EEsProfile, "local function declaration"); // // Multiple declarations of the same function name are allowed. // // If this is a definition, the definition production code will check for redefinitions // (we don't know at this point if it's a definition or not). // // Redeclarations (full signature match) are allowed. But, return types and parameter qualifiers must also match. // - except ES 100, which only allows a single prototype // // ES 100 does not allow redefining, but does allow overloading of built-in functions. // ES 300 does not allow redefining or overloading of built-in functions. // bool builtIn; TSymbol* symbol = symbolTable.find(function.getMangledName(), &builtIn); if (symbol && symbol->getAsFunction() && builtIn) requireProfile(loc, ~EEsProfile, "redefinition of built-in function"); // Check the validity of using spirv_literal qualifier for (int i = 0; i < function.getParamCount(); ++i) { if (function[i].type->getQualifier().isSpirvLiteral() && function.getBuiltInOp() != EOpSpirvInst) error(loc, "'spirv_literal' can only be used on functions defined with 'spirv_instruction' for argument", function.getName().c_str(), "%d", i + 1); } // For function declaration with SPIR-V instruction qualifier, always ignore the built-in function and // respect this redeclared one. if (symbol && builtIn && function.getBuiltInOp() == EOpSpirvInst) symbol = nullptr; const TFunction* prevDec = symbol ? symbol->getAsFunction() : nullptr; if (prevDec) { if (prevDec->isPrototyped() && prototype) profileRequires(loc, EEsProfile, 300, nullptr, "multiple prototypes for same function"); if (prevDec->getSpirvInstruction() != function.getSpirvInstruction()) { error(loc, "overloaded functions must have the same qualifiers", function.getName().c_str(), "spirv_instruction"); } bool parameterTypesDiffer = false; for (int i = 0; i < prevDec->getParamCount(); ++i) { if ((*prevDec)[i].type->getQualifier().storage != function[i].type->getQualifier().storage) error(loc, "overloaded functions must have the same parameter storage qualifiers for argument", function[i].type->getStorageQualifierString(), "%d", i+1); if ((*prevDec)[i].type->getQualifier().precision != function[i].type->getQualifier().precision) error(loc, "overloaded functions must have the same parameter precision qualifiers for argument", function[i].type->getPrecisionQualifierString(), "%d", i+1); if (*(*prevDec)[i].type != *function[i].type) parameterTypesDiffer = true; } if (!parameterTypesDiffer && prevDec->getType() != function.getType()) error(loc, "overloaded functions must have the same return type", function.getName().c_str(), ""); } arrayObjectCheck(loc, function.getType(), "array in function return type"); if (prototype) { // All built-in functions are defined, even though they don't have a body. // Count their prototype as a definition instead. if (symbolTable.atBuiltInLevel()) function.setDefined(); else { if (prevDec && ! builtIn) symbol->getAsFunction()->setPrototyped(); // need a writable one, but like having prevDec as a const function.setPrototyped(); } } // This insert won't actually insert it if it's a duplicate signature, but it will still check for // other forms of name collisions. if (! symbolTable.insert(function)) error(loc, "function name is redeclaration of existing name", function.getName().c_str(), ""); // // If this is a redeclaration, it could also be a definition, // in which case, we need to use the parameter names from this one, and not the one that's // being redeclared. So, pass back this declaration, not the one in the symbol table. // return &function; } // // Handle seeing the function prototype in front of a function definition in the grammar. // The body is handled after this function returns. // TIntermAggregate* TParseContext::handleFunctionDefinition(const TSourceLoc& loc, TFunction& function) { currentCaller = function.getMangledName(); TSymbol* symbol = symbolTable.find(function.getMangledName()); TFunction* prevDec = symbol ? symbol->getAsFunction() : nullptr; if (! prevDec) error(loc, "can't find function", function.getName().c_str(), ""); // Note: 'prevDec' could be 'function' if this is the first time we've seen function // as it would have just been put in the symbol table. Otherwise, we're looking up // an earlier occurrence. if (prevDec && prevDec->isDefined()) { // Then this function already has a body. error(loc, "function already has a body", function.getName().c_str(), ""); } if (prevDec && ! prevDec->isDefined()) { prevDec->setDefined(); // Remember the return type for later checking for RETURN statements. currentFunctionType = &(prevDec->getType()); } else currentFunctionType = new TType(EbtVoid); functionReturnsValue = false; // Check for entry point if (function.getName().compare(intermediate.getEntryPointName().c_str()) == 0) { intermediate.setEntryPointMangledName(function.getMangledName().c_str()); intermediate.incrementEntryPointCount(); inMain = true; } else inMain = false; // // Raise error message if main function takes any parameters or returns anything other than void // if (inMain) { if (function.getParamCount() > 0) error(loc, "function cannot take any parameter(s)", function.getName().c_str(), ""); if (function.getType().getBasicType() != EbtVoid) error(loc, "", function.getType().getBasicTypeString().c_str(), "entry point cannot return a value"); if (function.getLinkType() != ELinkNone) error(loc, "main function cannot be exported", "", ""); } // // New symbol table scope for body of function plus its arguments // symbolTable.push(); // // Insert parameters into the symbol table. // If the parameter has no name, it's not an error, just don't insert it // (could be used for unused args). // // Also, accumulate the list of parameters into the HIL, so lower level code // knows where to find parameters. // TIntermAggregate* paramNodes = new TIntermAggregate; for (int i = 0; i < function.getParamCount(); i++) { TParameter& param = function[i]; if (param.name != nullptr) { TVariable *variable = new TVariable(param.name, *param.type); // Insert the parameters with name in the symbol table. if (! symbolTable.insert(*variable)) error(loc, "redefinition", variable->getName().c_str(), ""); else { // Transfer ownership of name pointer to symbol table. param.name = nullptr; // Add the parameter to the HIL paramNodes = intermediate.growAggregate(paramNodes, intermediate.addSymbol(*variable, loc), loc); } } else paramNodes = intermediate.growAggregate(paramNodes, intermediate.addSymbol(*param.type, loc), loc); } paramNodes->setLinkType(function.getLinkType()); intermediate.setAggregateOperator(paramNodes, EOpParameters, TType(EbtVoid), loc); loopNestingLevel = 0; statementNestingLevel = 0; controlFlowNestingLevel = 0; postEntryPointReturn = false; return paramNodes; } // // Handle seeing function call syntax in the grammar, which could be any of // - .length() method // - constructor // - a call to a built-in function mapped to an operator // - a call to a built-in function that will remain a function call (e.g., texturing) // - user function // - subroutine call (not implemented yet) // TIntermTyped* TParseContext::handleFunctionCall(const TSourceLoc& loc, TFunction* function, TIntermNode* arguments) { TIntermTyped* result = nullptr; if (spvVersion.vulkan != 0 && spvVersion.vulkanRelaxed) { // allow calls that are invalid in Vulkan Semantics to be invisibily // remapped to equivalent valid functions result = vkRelaxedRemapFunctionCall(loc, function, arguments); if (result) return result; } if (function->getBuiltInOp() == EOpArrayLength) result = handleLengthMethod(loc, function, arguments); else if (function->getBuiltInOp() != EOpNull) { // // Then this should be a constructor. // Don't go through the symbol table for constructors. // Their parameters will be verified algorithmically. // TType type(EbtVoid); // use this to get the type back if (! constructorError(loc, arguments, *function, function->getBuiltInOp(), type)) { // // It's a constructor, of type 'type'. // result = addConstructor(loc, arguments, type); if (result == nullptr) error(loc, "cannot construct with these arguments", type.getCompleteString(intermediate.getEnhancedMsgs()).c_str(), ""); } } else { // // Find it in the symbol table. // const TFunction* fnCandidate; bool builtIn {false}; fnCandidate = findFunction(loc, *function, builtIn); if (fnCandidate) { // This is a declared function that might map to // - a built-in operator, // - a built-in function not mapped to an operator, or // - a user function. // Error check for a function requiring specific extensions present. if (builtIn && (fnCandidate->getBuiltInOp() == EOpSubgroupQuadAll || fnCandidate->getBuiltInOp() == EOpSubgroupQuadAny)) requireExtensions(loc, 1, &E_GL_EXT_shader_quad_control, fnCandidate->getName().c_str()); if (builtIn && fnCandidate->getNumExtensions()) requireExtensions(loc, fnCandidate->getNumExtensions(), fnCandidate->getExtensions(), fnCandidate->getName().c_str()); if (builtIn && fnCandidate->getType().contains16BitFloat()) requireFloat16Arithmetic(loc, "built-in function", "float16 types can only be in uniform block or buffer storage"); if (builtIn && fnCandidate->getType().contains16BitInt()) requireInt16Arithmetic(loc, "built-in function", "(u)int16 types can only be in uniform block or buffer storage"); if (builtIn && fnCandidate->getType().contains8BitInt()) requireInt8Arithmetic(loc, "built-in function", "(u)int8 types can only be in uniform block or buffer storage"); if (builtIn && (fnCandidate->getBuiltInOp() == EOpTextureFetch || fnCandidate->getBuiltInOp() == EOpTextureQuerySize)) { if ((*fnCandidate)[0].type->getSampler().isMultiSample() && version <= 140) requireExtensions(loc, 1, &E_GL_ARB_texture_multisample, fnCandidate->getName().c_str()); } if (arguments != nullptr) { // Make sure qualifications work for these arguments. TIntermAggregate* aggregate = arguments->getAsAggregate(); for (int i = 0; i < fnCandidate->getParamCount(); ++i) { // At this early point there is a slight ambiguity between whether an aggregate 'arguments' // is the single argument itself or its children are the arguments. Only one argument // means take 'arguments' itself as the one argument. TIntermNode* arg = fnCandidate->getParamCount() == 1 ? arguments : (aggregate ? aggregate->getSequence()[i] : arguments); TQualifier& formalQualifier = (*fnCandidate)[i].type->getQualifier(); if (formalQualifier.isParamOutput()) { if (lValueErrorCheck(arguments->getLoc(), "assign", arg->getAsTyped())) error(arguments->getLoc(), "Non-L-value cannot be passed for 'out' or 'inout' parameters.", "out", ""); } if (formalQualifier.isSpirvLiteral()) { if (!arg->getAsTyped()->getQualifier().isFrontEndConstant()) { error(arguments->getLoc(), "Non front-end constant expressions cannot be passed for 'spirv_literal' parameters.", "spirv_literal", ""); } } const TType& argType = arg->getAsTyped()->getType(); const TQualifier& argQualifier = argType.getQualifier(); bool containsBindlessSampler = intermediate.getBindlessMode() && argType.containsSampler(); if (argQualifier.isMemory() && !containsBindlessSampler && (argType.containsOpaque() || argType.isReference())) { const char* message = "argument cannot drop memory qualifier when passed to formal parameter"; if (argQualifier.volatil && ! formalQualifier.volatil) error(arguments->getLoc(), message, "volatile", ""); if (argQualifier.coherent && ! (formalQualifier.devicecoherent || formalQualifier.coherent)) error(arguments->getLoc(), message, "coherent", ""); if (argQualifier.devicecoherent && ! (formalQualifier.devicecoherent || formalQualifier.coherent)) error(arguments->getLoc(), message, "devicecoherent", ""); if (argQualifier.queuefamilycoherent && ! (formalQualifier.queuefamilycoherent || formalQualifier.devicecoherent || formalQualifier.coherent)) error(arguments->getLoc(), message, "queuefamilycoherent", ""); if (argQualifier.workgroupcoherent && ! (formalQualifier.workgroupcoherent || formalQualifier.queuefamilycoherent || formalQualifier.devicecoherent || formalQualifier.coherent)) error(arguments->getLoc(), message, "workgroupcoherent", ""); if (argQualifier.subgroupcoherent && ! (formalQualifier.subgroupcoherent || formalQualifier.workgroupcoherent || formalQualifier.queuefamilycoherent || formalQualifier.devicecoherent || formalQualifier.coherent)) error(arguments->getLoc(), message, "subgroupcoherent", ""); if (argQualifier.readonly && ! formalQualifier.readonly) error(arguments->getLoc(), message, "readonly", ""); if (argQualifier.writeonly && ! formalQualifier.writeonly) error(arguments->getLoc(), message, "writeonly", ""); if (argQualifier.nontemporal && ! formalQualifier.nontemporal) error(arguments->getLoc(), message, "nontemporal", ""); // Don't check 'restrict', it is different than the rest: // "...but only restrict can be taken away from a calling argument, by a formal parameter that // lacks the restrict qualifier..." } if (!builtIn && argQualifier.getFormat() != formalQualifier.getFormat()) { // we have mismatched formats, which should only be allowed if writeonly // and at least one format is unknown if (!formalQualifier.isWriteOnly() || (formalQualifier.getFormat() != ElfNone && argQualifier.getFormat() != ElfNone)) error(arguments->getLoc(), "image formats must match", "format", ""); } if (builtIn && arg->getAsTyped()->getType().contains16BitFloat()) requireFloat16Arithmetic(arguments->getLoc(), "built-in function", "float16 types can only be in uniform block or buffer storage"); if (builtIn && arg->getAsTyped()->getType().contains16BitInt()) requireInt16Arithmetic(arguments->getLoc(), "built-in function", "(u)int16 types can only be in uniform block or buffer storage"); if (builtIn && arg->getAsTyped()->getType().contains8BitInt()) requireInt8Arithmetic(arguments->getLoc(), "built-in function", "(u)int8 types can only be in uniform block or buffer storage"); // Check that coopVecOuterProductAccumulateNV vector component types match if (builtIn && fnCandidate->getBuiltInOp() == EOpCooperativeVectorOuterProductAccumulateNV && i == 1 && arg->getAsTyped()->getType().getBasicType() != aggregate->getSequence()[0]->getAsTyped()->getType().getBasicType()) error(arguments->getLoc(), "cooperative vector basic types must match", fnCandidate->getName().c_str(), ""); // TODO 4.5 functionality: A shader will fail to compile // if the value passed to the memargument of an atomic memory function does not correspond to a buffer or // shared variable. It is acceptable to pass an element of an array or a single component of a vector to the // memargument of an atomic memory function, as long as the underlying array or vector is a buffer or // shared variable. } // Convert 'in' arguments addInputArgumentConversions(*fnCandidate, arguments); // arguments may be modified if it's just a single argument node } if (builtIn && fnCandidate->getBuiltInOp() != EOpNull) { // A function call mapped to a built-in operation. result = handleBuiltInFunctionCall(loc, arguments, *fnCandidate); } else if (fnCandidate->getBuiltInOp() == EOpSpirvInst) { // When SPIR-V instruction qualifier is specified, the function call is still mapped to a built-in operation. result = handleBuiltInFunctionCall(loc, arguments, *fnCandidate); } else { // This is a function call not mapped to built-in operator. // It could still be a built-in function, but only if PureOperatorBuiltins == false. result = intermediate.setAggregateOperator(arguments, EOpFunctionCall, fnCandidate->getType(), loc); TIntermAggregate* call = result->getAsAggregate(); call->setName(fnCandidate->getMangledName()); // this is how we know whether the given function is a built-in function or a user-defined function // if builtIn == false, it's a userDefined -> could be an overloaded built-in function also // if builtIn == true, it's definitely a built-in function with EOpNull if (! builtIn) { call->setUserDefined(); if (symbolTable.atGlobalLevel()) { requireProfile(loc, ~EEsProfile, "calling user function from global scope"); intermediate.addToCallGraph(infoSink, "main(", fnCandidate->getMangledName()); } else intermediate.addToCallGraph(infoSink, currentCaller, fnCandidate->getMangledName()); } if (builtIn) nonOpBuiltInCheck(loc, *fnCandidate, *call); else userFunctionCallCheck(loc, *call); } // Convert 'out' arguments. If it was a constant folded built-in, it won't be an aggregate anymore. // Built-ins with a single argument aren't called with an aggregate, but they also don't have an output. // Also, build the qualifier list for user function calls, which are always called with an aggregate. if (result->getAsAggregate()) { TQualifierList& qualifierList = result->getAsAggregate()->getQualifierList(); for (int i = 0; i < fnCandidate->getParamCount(); ++i) { TStorageQualifier qual = (*fnCandidate)[i].type->getQualifier().storage; qualifierList.push_back(qual); } result = addOutputArgumentConversions(*fnCandidate, *result->getAsAggregate()); } handleCoopMat2FunctionCall(loc, fnCandidate, result, arguments); if (result->getAsTyped()->getType().isCoopVecNV() && !result->getAsTyped()->getType().isParameterized()) { if (auto unaryNode = result->getAsUnaryNode()) result->setType(unaryNode->getOperand()->getAsTyped()->getType()); else result->setType(result->getAsAggregate()->getSequence()[0]->getAsTyped()->getType()); } if (fnCandidate->getBuiltInOp() == EOpConstructSaturated) { // result type is taken from the first parameter result->setType(result->getAsAggregate()->getSequence()[0]->getAsTyped()->getType()); } } } // generic error recovery // TODO: simplification: localize all the error recoveries that look like this, and taking type into account to reduce cascades if (result == nullptr) result = intermediate.addConstantUnion(0.0, EbtFloat, loc); return result; } void TParseContext::handleCoopMat2FunctionCall(const TSourceLoc& loc, const TFunction* fnCandidate, TIntermTyped* result, TIntermNode* arguments) { if (arguments && arguments->getAsAggregate()) { auto &sequence = arguments->getAsAggregate()->getSequence(); for (uint32_t i = 0; i < sequence.size(); ++i) { auto param = sequence[i]; if (param->getAsTyped()->getBasicType() == EbtFunction) { // Add the function to the callgraph intermediate.addToCallGraph(infoSink, currentCaller, param->getAsSymbolNode()->getMangledName()); // error checking that all parameters are 'const in' if (fnCandidate->getBuiltInOp() == EOpCooperativeMatrixLoadTensorNV || fnCandidate->getBuiltInOp() == EOpCooperativeMatrixReduceNV || fnCandidate->getBuiltInOp() == EOpCooperativeMatrixPerElementOpNV) { const TFunction* func = symbolTable.find(param->getAsSymbolNode()->getMangledName())->getAsFunction(); for (int i = 0; i < func->getParamCount(); ++i) { const TParameter& arg = (*func)[i]; const TQualifier& formalQualifier = arg.type->getQualifier(); if (formalQualifier.storage != EvqConstReadOnly) { error(loc, "function parameters must all be qualified 'const in'", param->getAsSymbolNode()->getMangledName().c_str(), ""); } } } // error checking decodeFunc parameters are (reference, uint32_t[], uint32_t[]) if (fnCandidate->getBuiltInOp() == EOpCooperativeMatrixLoadTensorNV) { const TFunction* decodeFunc = symbolTable.find(param->getAsSymbolNode()->getMangledName())->getAsFunction(); if (decodeFunc->getParamCount() != 3) { error(loc, "must have three parameters", param->getAsSymbolNode()->getMangledName().c_str(), ""); } if ((*decodeFunc)[0].type->getBasicType() != EbtReference) { error(loc, "first parameter must be buffer reference type", param->getAsSymbolNode()->getMangledName().c_str(), ""); } if ((*decodeFunc)[1].type->getBasicType() != EbtUint || (*decodeFunc)[2].type->getBasicType() != EbtUint) { error(loc, "coordinate parameters must be uint32_t", param->getAsSymbolNode()->getMangledName().c_str(), ""); } if (!(*decodeFunc)[1].type->isArray() || !(*decodeFunc)[2].type->isArray()) { error(loc, "coordinate parameters must be uint32_t", param->getAsSymbolNode()->getMangledName().c_str(), ""); } } // error checking reduce function has matching parameters if (fnCandidate->getBuiltInOp() == EOpCooperativeMatrixReduceNV) { const TFunction* combineOp = symbolTable.find(param->getAsSymbolNode()->getMangledName())->getAsFunction(); if (combineOp->getParamCount() != 2) { error(loc, "must have two parameters", param->getAsSymbolNode()->getMangledName().c_str(), ""); } for (int i = 0; i < combineOp->getParamCount(); ++i) { const TParameter& arg = (*combineOp)[i]; if (sequence[1]->getAsTyped()->getType().getBasicType() != arg.type->getBasicType()) { error(loc, "parameter types must match cooperative matrix component type", param->getAsSymbolNode()->getMangledName().c_str(), ""); } } if (sequence[1]->getAsTyped()->getType().getBasicType() != combineOp->getType().getBasicType()) { error(loc, "return type must match cooperative matrix component type", param->getAsSymbolNode()->getMangledName().c_str(), ""); } } // error checking perelement op has correct parameters if (fnCandidate->getBuiltInOp() == EOpCooperativeMatrixPerElementOpNV) { const TFunction* elemOp = symbolTable.find(param->getAsSymbolNode()->getMangledName())->getAsFunction(); if (sequence[1]->getAsTyped()->getType() != sequence[0]->getAsTyped()->getType()) { error(loc, "cooperative matrix input and result types must match", "", ""); } if (elemOp->getParamCount() < 3) { error(loc, "not enough parameters", param->getAsSymbolNode()->getMangledName().c_str(), ""); } else if (elemOp->getParamCount() != (int)sequence.size()) { error(loc, "number of parameters must match call to coopMatPerElementNV", param->getAsSymbolNode()->getMangledName().c_str(), ""); } else { if ((*elemOp)[0].type->getBasicType() != EbtUint || (*elemOp)[1].type->getBasicType() != EbtUint) { error(loc, "row/column parameters must be uint32_t", param->getAsSymbolNode()->getMangledName().c_str(), ""); } const TParameter& matArg = (*elemOp)[2]; if (sequence[1]->getAsTyped()->getType().getBasicType() != matArg.type->getBasicType()) { error(loc, "third parameter must match cooperative matrix component type", param->getAsSymbolNode()->getMangledName().c_str(), ""); } for (int i = 3; i < elemOp->getParamCount(); ++i) { const TParameter& arg = (*elemOp)[i]; if (sequence[i]->getAsTyped()->getType().getBasicType() != arg.type->getBasicType()) { error(loc, "parameter types must match or be cooperative matrix component type", param->getAsSymbolNode()->getMangledName().c_str(), ""); } } if (sequence[1]->getAsTyped()->getType().getBasicType() != elemOp->getType().getBasicType()) { error(loc, "return type must match cooperative matrix component type", param->getAsSymbolNode()->getMangledName().c_str(), ""); } } } } } } if ((result->getAsTyped()->getType().isCoopMat() || result->getAsTyped()->getType().isTensorLayoutNV() || result->getAsTyped()->getType().isTensorViewNV()) && !result->getAsTyped()->getType().isParameterized()) { assert(fnCandidate->getBuiltInOp() == EOpCooperativeMatrixMulAdd || fnCandidate->getBuiltInOp() == EOpCooperativeMatrixMulAddNV || fnCandidate->getBuiltInOp() == EOpCooperativeMatrixReduceNV || fnCandidate->getBuiltInOp() == EOpCooperativeMatrixPerElementOpNV || fnCandidate->getBuiltInOp() == EOpCooperativeMatrixTransposeNV || fnCandidate->getBuiltInOp() == EOpCreateTensorLayoutNV || fnCandidate->getBuiltInOp() == EOpTensorLayoutSetDimensionNV || fnCandidate->getBuiltInOp() == EOpTensorLayoutSetBlockSizeNV || fnCandidate->getBuiltInOp() == EOpTensorLayoutSetStrideNV || fnCandidate->getBuiltInOp() == EOpTensorLayoutSliceNV || fnCandidate->getBuiltInOp() == EOpTensorLayoutSetClampValueNV || fnCandidate->getBuiltInOp() == EOpCreateTensorViewNV || fnCandidate->getBuiltInOp() == EOpTensorViewSetDimensionNV || fnCandidate->getBuiltInOp() == EOpTensorViewSetStrideNV || fnCandidate->getBuiltInOp() == EOpTensorViewSetClipNV); if (fnCandidate->getBuiltInOp() == EOpCreateTensorLayoutNV) { // Convert template parameters to arraySizes/typeParameters TArraySizes *arraySizes = new TArraySizes; for (uint32_t i = 0; i < 2; ++i) { TIntermNode *param {}; if (arguments->getAsConstantUnion()) { if (i == 0) { param = arguments; } } else { assert(arguments->getAsAggregate()); auto &sequence = arguments->getAsAggregate()->getSequence(); if (i < sequence.size()) { param = sequence[i]; } } if (param) { if (param->getAsTyped()->getType().getQualifier().isSpecConstant()) { uint32_t value = param->getAsSymbolNode()->getConstArray()[0].getIConst(); arraySizes->addInnerSize(value, param->getAsTyped()); } else { uint32_t value = param->getAsConstantUnion()->getConstArray()[0].getIConst(); arraySizes->addInnerSize(value); } } else { // gl_CooperativeMatrixClampModeUndefined arraySizes->addInnerSize(0); } } TTypeParameters typeParameters; typeParameters.arraySizes = arraySizes; TType resultType; resultType.deepCopy(result->getAsTyped()->getType()); resultType.copyTypeParameters(typeParameters); result->setType(resultType); } else if (fnCandidate->getBuiltInOp() == EOpCreateTensorViewNV) { // Convert template parameters to arraySizes/typeParameters TArraySizes *arraySizes = new TArraySizes; for (uint32_t i = 0; i < 7; ++i) { TIntermNode *param {}; if (arguments->getAsConstantUnion()) { if (i == 0) { param = arguments; } } else { assert(arguments->getAsAggregate()); auto &sequence = arguments->getAsAggregate()->getSequence(); if (i < sequence.size()) { param = sequence[i]; } } if (param) { if (param->getAsTyped()->getType().getQualifier().isSpecConstant()) { uint32_t value = param->getAsSymbolNode()->getConstArray()[0].getIConst(); arraySizes->addInnerSize(value, param->getAsTyped()); } else { uint32_t value = param->getAsConstantUnion()->getConstArray()[0].getIConst(); arraySizes->addInnerSize(value); } } else { uint32_t value = 0; if (i >= 2) { // default permutation values are an increasing sequence value = i - 2; } arraySizes->addInnerSize(value); } } TTypeParameters typeParameters; typeParameters.arraySizes = arraySizes; TType resultType; resultType.deepCopy(result->getAsTyped()->getType()); resultType.copyTypeParameters(typeParameters); result->setType(resultType); } else if (fnCandidate->getBuiltInOp() == EOpCooperativeMatrixReduceNV || fnCandidate->getBuiltInOp() == EOpCooperativeMatrixPerElementOpNV || fnCandidate->getBuiltInOp() == EOpCooperativeMatrixTransposeNV || fnCandidate->getBuiltInOp() == EOpTensorLayoutSetDimensionNV || fnCandidate->getBuiltInOp() == EOpTensorLayoutSetBlockSizeNV || fnCandidate->getBuiltInOp() == EOpTensorLayoutSetStrideNV || fnCandidate->getBuiltInOp() == EOpTensorLayoutSliceNV || fnCandidate->getBuiltInOp() == EOpTensorLayoutSetClampValueNV || fnCandidate->getBuiltInOp() == EOpTensorViewSetDimensionNV || fnCandidate->getBuiltInOp() == EOpTensorViewSetStrideNV || fnCandidate->getBuiltInOp() == EOpTensorViewSetClipNV) { // Set result type to match type of first parameter result->setType(result->getAsAggregate()->getSequence()[0]->getAsTyped()->getType()); } else { // For MulAdd, set result type to match type of C parameter result->setType(result->getAsAggregate()->getSequence()[2]->getAsTyped()->getType()); } } } TIntermTyped* TParseContext::handleBuiltInFunctionCall(TSourceLoc loc, TIntermNode* arguments, const TFunction& function) { checkLocation(loc, function.getBuiltInOp()); TIntermTyped *result = intermediate.addBuiltInFunctionCall(loc, function.getBuiltInOp(), function.getParamCount() == 1, arguments, function.getType()); if (result != nullptr && obeyPrecisionQualifiers()) computeBuiltinPrecisions(*result, function); if (result == nullptr) { if (arguments == nullptr) error(loc, " wrong operand type", "Internal Error", "built in unary operator function. Type: %s", ""); else error(arguments->getLoc(), " wrong operand type", "Internal Error", "built in unary operator function. Type: %s", static_cast(arguments)->getCompleteString(intermediate.getEnhancedMsgs()).c_str()); } else if (result->getAsOperator()) builtInOpCheck(loc, function, *result->getAsOperator()); // Special handling for function call with SPIR-V instruction qualifier specified if (function.getBuiltInOp() == EOpSpirvInst) { if (auto agg = result->getAsAggregate()) { // Propogate spirv_by_reference/spirv_literal from parameters to arguments auto& sequence = agg->getSequence(); for (unsigned i = 0; i < sequence.size(); ++i) { if (function[i].type->getQualifier().isSpirvByReference()) sequence[i]->getAsTyped()->getQualifier().setSpirvByReference(); if (function[i].type->getQualifier().isSpirvLiteral()) sequence[i]->getAsTyped()->getQualifier().setSpirvLiteral(); } // Attach the function call to SPIR-V intruction agg->setSpirvInstruction(function.getSpirvInstruction()); } else if (auto unaryNode = result->getAsUnaryNode()) { // Propogate spirv_by_reference/spirv_literal from parameters to arguments if (function[0].type->getQualifier().isSpirvByReference()) unaryNode->getOperand()->getQualifier().setSpirvByReference(); if (function[0].type->getQualifier().isSpirvLiteral()) unaryNode->getOperand()->getQualifier().setSpirvLiteral(); // Attach the function call to SPIR-V intruction unaryNode->setSpirvInstruction(function.getSpirvInstruction()); } else assert(0); } return result; } // "The operation of a built-in function can have a different precision // qualification than the precision qualification of the resulting value. // These two precision qualifications are established as follows. // // The precision qualification of the operation of a built-in function is // based on the precision qualification of its input arguments and formal // parameters: When a formal parameter specifies a precision qualifier, // that is used, otherwise, the precision qualification of the calling // argument is used. The highest precision of these will be the precision // qualification of the operation of the built-in function. Generally, // this is applied across all arguments to a built-in function, with the // exceptions being: // - bitfieldExtract and bitfieldInsert ignore the 'offset' and 'bits' // arguments. // - interpolateAt* functions only look at the 'interpolant' argument. // // The precision qualification of the result of a built-in function is // determined in one of the following ways: // // - For the texture sampling, image load, and image store functions, // the precision of the return type matches the precision of the // sampler type // // Otherwise: // // - For prototypes that do not specify a resulting precision qualifier, // the precision will be the same as the precision of the operation. // // - For prototypes that do specify a resulting precision qualifier, // the specified precision qualifier is the precision qualification of // the result." // void TParseContext::computeBuiltinPrecisions(TIntermTyped& node, const TFunction& function) { TPrecisionQualifier operationPrecision = EpqNone; TPrecisionQualifier resultPrecision = EpqNone; TIntermOperator* opNode = node.getAsOperator(); if (opNode == nullptr) return; if (TIntermUnary* unaryNode = node.getAsUnaryNode()) { operationPrecision = std::max(function[0].type->getQualifier().precision, unaryNode->getOperand()->getType().getQualifier().precision); if (function.getType().getBasicType() != EbtBool) resultPrecision = function.getType().getQualifier().precision == EpqNone ? operationPrecision : function.getType().getQualifier().precision; } else if (TIntermAggregate* agg = node.getAsAggregate()) { TIntermSequence& sequence = agg->getSequence(); unsigned int numArgs = (unsigned int)sequence.size(); switch (agg->getOp()) { case EOpBitfieldExtract: numArgs = 1; break; case EOpBitfieldInsert: numArgs = 2; break; case EOpInterpolateAtCentroid: case EOpInterpolateAtOffset: case EOpInterpolateAtSample: numArgs = 1; break; case EOpDebugPrintf: case EOpCooperativeMatrixPerElementOpNV: case EOpCooperativeMatrixReduceNV: case EOpConstructSaturated: numArgs = 0; break; default: break; } // find the maximum precision from the arguments and parameters for (unsigned int arg = 0; arg < numArgs; ++arg) { operationPrecision = std::max(operationPrecision, sequence[arg]->getAsTyped()->getQualifier().precision); operationPrecision = std::max(operationPrecision, function[arg].type->getQualifier().precision); } // compute the result precision if (agg->isSampling() || agg->getOp() == EOpImageLoad || agg->getOp() == EOpImageStore || agg->getOp() == EOpImageLoadLod || agg->getOp() == EOpImageStoreLod) resultPrecision = sequence[0]->getAsTyped()->getQualifier().precision; else if (function.getType().getBasicType() != EbtBool) resultPrecision = function.getType().getQualifier().precision == EpqNone ? operationPrecision : function.getType().getQualifier().precision; } // Propagate precision through this node and its children. That algorithm stops // when a precision is found, so start by clearing this subroot precision opNode->getQualifier().precision = EpqNone; if (operationPrecision != EpqNone) { opNode->propagatePrecision(operationPrecision); opNode->setOperationPrecision(operationPrecision); } // Now, set the result precision, which might not match opNode->getQualifier().precision = resultPrecision; } TIntermNode* TParseContext::handleReturnValue(const TSourceLoc& loc, TIntermTyped* value) { storage16BitAssignmentCheck(loc, value->getType(), "return"); functionReturnsValue = true; TIntermBranch* branch = nullptr; if (currentFunctionType->getBasicType() == EbtVoid) { error(loc, "void function cannot return a value", "return", ""); branch = intermediate.addBranch(EOpReturn, loc); } else if (*currentFunctionType != value->getType()) { TIntermTyped* converted = intermediate.addConversion(EOpReturn, *currentFunctionType, value); if (converted) { if (*currentFunctionType != converted->getType()) error(loc, "cannot convert return value to function return type", "return", ""); if (version < 420) warn(loc, "type conversion on return values was not explicitly allowed until version 420", "return", ""); branch = intermediate.addBranch(EOpReturn, converted, loc); } else { error(loc, "type does not match, or is not convertible to, the function's return type", "return", ""); branch = intermediate.addBranch(EOpReturn, value, loc); } } else { if (value->getType().isTexture() || value->getType().isImage()) { if (spvVersion.spv != 0) error(loc, "sampler or image cannot be used as return type when generating SPIR-V", "return", ""); else if (!extensionTurnedOn(E_GL_ARB_bindless_texture)) error(loc, "sampler or image can be used as return type only when the extension GL_ARB_bindless_texture enabled", "return", ""); } branch = intermediate.addBranch(EOpReturn, value, loc); } branch->updatePrecision(currentFunctionType->getQualifier().precision); return branch; } // See if the operation is being done in an illegal location. void TParseContext::checkLocation(const TSourceLoc& loc, TOperator op) { switch (op) { case EOpBarrier: if (language == EShLangTessControl) { if (controlFlowNestingLevel > 0) error(loc, "tessellation control barrier() cannot be placed within flow control", "", ""); if (! inMain) error(loc, "tessellation control barrier() must be in main()", "", ""); else if (postEntryPointReturn) error(loc, "tessellation control barrier() cannot be placed after a return from main()", "", ""); } break; case EOpBeginInvocationInterlock: if (language != EShLangFragment) error(loc, "beginInvocationInterlockARB() must be in a fragment shader", "", ""); if (! inMain) error(loc, "beginInvocationInterlockARB() must be in main()", "", ""); else if (postEntryPointReturn) error(loc, "beginInvocationInterlockARB() cannot be placed after a return from main()", "", ""); if (controlFlowNestingLevel > 0) error(loc, "beginInvocationInterlockARB() cannot be placed within flow control", "", ""); if (beginInvocationInterlockCount > 0) error(loc, "beginInvocationInterlockARB() must only be called once", "", ""); if (endInvocationInterlockCount > 0) error(loc, "beginInvocationInterlockARB() must be called before endInvocationInterlockARB()", "", ""); beginInvocationInterlockCount++; // default to pixel_interlock_ordered if (intermediate.getInterlockOrdering() == EioNone) intermediate.setInterlockOrdering(EioPixelInterlockOrdered); break; case EOpEndInvocationInterlock: if (language != EShLangFragment) error(loc, "endInvocationInterlockARB() must be in a fragment shader", "", ""); if (! inMain) error(loc, "endInvocationInterlockARB() must be in main()", "", ""); else if (postEntryPointReturn) error(loc, "endInvocationInterlockARB() cannot be placed after a return from main()", "", ""); if (controlFlowNestingLevel > 0) error(loc, "endInvocationInterlockARB() cannot be placed within flow control", "", ""); if (endInvocationInterlockCount > 0) error(loc, "endInvocationInterlockARB() must only be called once", "", ""); if (beginInvocationInterlockCount == 0) error(loc, "beginInvocationInterlockARB() must be called before endInvocationInterlockARB()", "", ""); endInvocationInterlockCount++; break; default: break; } } // Finish processing object.length(). This started earlier in handleDotDereference(), where // the ".length" part was recognized and semantically checked, and finished here where the // function syntax "()" is recognized. // // Return resulting tree node. TIntermTyped* TParseContext::handleLengthMethod(const TSourceLoc& loc, TFunction* function, TIntermNode* intermNode) { int length = 0; if (function->getParamCount() > 0) error(loc, "method does not accept any arguments", function->getName().c_str(), ""); else { const TType& type = intermNode->getAsTyped()->getType(); if (type.isArray()) { if (type.isUnsizedArray()) { if (intermNode->getAsSymbolNode() && isIoResizeArray(type)) { // We could be between a layout declaration that gives a built-in io array implicit size and // a user redeclaration of that array, meaning we have to substitute its implicit size here // without actually redeclaring the array. (It is an error to use a member before the // redeclaration, but not an error to use the array name itself.) const TString& name = intermNode->getAsSymbolNode()->getName(); if (name == "gl_in" || name == "gl_out" || name == "gl_MeshVerticesNV" || name == "gl_MeshPrimitivesNV") { length = getIoArrayImplicitSize(type.getQualifier()); } } else if (const auto typed = intermNode->getAsTyped()) { if (typed->getQualifier().builtIn == EbvSampleMask) { requireProfile(loc, EEsProfile, "the array size of gl_SampleMask and gl_SampleMaskIn is ceil(gl_MaxSamples/32)"); length = (resources.maxSamples + 31) / 32; } } if (length == 0) { if (intermNode->getAsSymbolNode() && isIoResizeArray(type)) error(loc, "", function->getName().c_str(), "array must first be sized by a redeclaration or layout qualifier"); else if (isRuntimeLength(*intermNode->getAsTyped())) { // Create a unary op and let the back end handle it return intermediate.addBuiltInFunctionCall(loc, EOpArrayLength, true, intermNode, TType(EbtInt)); } else error(loc, "", function->getName().c_str(), "array must be declared with a size before using this method"); } } else if (type.getOuterArrayNode()) { // If the array's outer size is specified by an intermediate node, it means the array's length // was specified by a specialization constant. In such a case, we should return the node of the // specialization constants to represent the length. return type.getOuterArrayNode(); } else length = type.getOuterArraySize(); } else if (type.isMatrix()) length = type.getMatrixCols(); else if (type.isVector()) length = type.getVectorSize(); else if (type.isCoopMat() || type.isCoopVecNV()) return intermediate.addBuiltInFunctionCall(loc, EOpArrayLength, true, intermNode, TType(EbtInt)); else { // we should not get here, because earlier semantic checking should have prevented this path error(loc, ".length()", "unexpected use of .length()", ""); } } if (length == 0) length = 1; return intermediate.addConstantUnion(length, loc); } // // Add any needed implicit conversions for function-call arguments to input parameters. // void TParseContext::addInputArgumentConversions(const TFunction& function, TIntermNode*& arguments) const { TIntermAggregate* aggregate = arguments->getAsAggregate(); // Process each argument's conversion for (int i = 0; i < function.getParamCount(); ++i) { // At this early point there is a slight ambiguity between whether an aggregate 'arguments' // is the single argument itself or its children are the arguments. Only one argument // means take 'arguments' itself as the one argument. TIntermTyped* arg = function.getParamCount() == 1 ? arguments->getAsTyped() : (aggregate ? aggregate->getSequence()[i]->getAsTyped() : arguments->getAsTyped()); if (*function[i].type != arg->getType()) { if (function[i].type->getQualifier().isParamInput() && !function[i].type->isCoopMat()) { // In-qualified arguments just need an extra node added above the argument to // convert to the correct type. arg = intermediate.addConversion(EOpFunctionCall, *function[i].type, arg); if (arg) { if (function.getParamCount() == 1) arguments = arg; else { if (aggregate) aggregate->getSequence()[i] = arg; else arguments = arg; } } } } } } // // Add any needed implicit output conversions for function-call arguments. This // can require a new tree topology, complicated further by whether the function // has a return value. // // Returns a node of a subtree that evaluates to the return value of the function. // TIntermTyped* TParseContext::addOutputArgumentConversions(const TFunction& function, TIntermAggregate& intermNode) const { TIntermSequence& arguments = intermNode.getSequence(); // Will there be any output conversions? bool outputConversions = false; for (int i = 0; i < function.getParamCount(); ++i) { if (*function[i].type != arguments[i]->getAsTyped()->getType() && function[i].type->getQualifier().isParamOutput() && !function[i].type->isCoopMat()) { outputConversions = true; break; } } if (! outputConversions) return &intermNode; // Setup for the new tree, if needed: // // Output conversions need a different tree topology. // Out-qualified arguments need a temporary of the correct type, with the call // followed by an assignment of the temporary to the original argument: // void: function(arg, ...) -> ( function(tempArg, ...), arg = tempArg, ...) // ret = function(arg, ...) -> ret = (tempRet = function(tempArg, ...), arg = tempArg, ..., tempRet) // Where the "tempArg" type needs no conversion as an argument, but will convert on assignment. TIntermTyped* conversionTree = nullptr; TVariable* tempRet = nullptr; if (intermNode.getBasicType() != EbtVoid) { // do the "tempRet = function(...), " bit from above tempRet = makeInternalVariable("tempReturn", intermNode.getType()); TIntermSymbol* tempRetNode = intermediate.addSymbol(*tempRet, intermNode.getLoc()); conversionTree = intermediate.addAssign(EOpAssign, tempRetNode, &intermNode, intermNode.getLoc()); } else conversionTree = &intermNode; conversionTree = intermediate.makeAggregate(conversionTree); // Process each argument's conversion for (int i = 0; i < function.getParamCount(); ++i) { if (*function[i].type != arguments[i]->getAsTyped()->getType()) { if (function[i].type->getQualifier().isParamOutput()) { // Out-qualified arguments need to use the topology set up above. // do the " ...(tempArg, ...), arg = tempArg" bit from above TType paramType; paramType.shallowCopy(*function[i].type); if (arguments[i]->getAsTyped()->getType().isParameterized() && !paramType.isParameterized()) { paramType.shallowCopy(arguments[i]->getAsTyped()->getType()); paramType.copyTypeParameters(*arguments[i]->getAsTyped()->getType().getTypeParameters()); } TVariable* tempArg = makeInternalVariable("tempArg", paramType); tempArg->getWritableType().getQualifier().makeTemporary(); TIntermSymbol* tempArgNode = intermediate.addSymbol(*tempArg, intermNode.getLoc()); TIntermTyped* tempAssign = intermediate.addAssign(EOpAssign, arguments[i]->getAsTyped(), tempArgNode, arguments[i]->getLoc()); conversionTree = intermediate.growAggregate(conversionTree, tempAssign, arguments[i]->getLoc()); // replace the argument with another node for the same tempArg variable arguments[i] = intermediate.addSymbol(*tempArg, intermNode.getLoc()); } } } // Finalize the tree topology (see bigger comment above). if (tempRet) { // do the "..., tempRet" bit from above TIntermSymbol* tempRetNode = intermediate.addSymbol(*tempRet, intermNode.getLoc()); conversionTree = intermediate.growAggregate(conversionTree, tempRetNode, intermNode.getLoc()); } conversionTree = intermediate.setAggregateOperator(conversionTree, EOpComma, intermNode.getType(), intermNode.getLoc()); return conversionTree; } TIntermTyped* TParseContext::addAssign(const TSourceLoc& loc, TOperator op, TIntermTyped* left, TIntermTyped* right) { if ((op == EOpAddAssign || op == EOpSubAssign) && left->isReference()) requireExtensions(loc, 1, &E_GL_EXT_buffer_reference2, "+= and -= on a buffer reference"); if (op == EOpAssign && left->getBasicType() == EbtSampler && right->getBasicType() == EbtSampler) requireExtensions(loc, 1, &E_GL_ARB_bindless_texture, "sampler assignment for bindless texture"); return intermediate.addAssign(op, left, right, loc); } void TParseContext::memorySemanticsCheck(const TSourceLoc& loc, const TFunction& fnCandidate, const TIntermOperator& callNode) { const TIntermSequence* argp = &callNode.getAsAggregate()->getSequence(); //const int gl_SemanticsRelaxed = 0x0; const int gl_SemanticsAcquire = 0x2; const int gl_SemanticsRelease = 0x4; const int gl_SemanticsAcquireRelease = 0x8; const int gl_SemanticsMakeAvailable = 0x2000; const int gl_SemanticsMakeVisible = 0x4000; const int gl_SemanticsVolatile = 0x8000; //const int gl_StorageSemanticsNone = 0x0; const int gl_StorageSemanticsBuffer = 0x40; const int gl_StorageSemanticsShared = 0x100; const int gl_StorageSemanticsImage = 0x800; const int gl_StorageSemanticsOutput = 0x1000; unsigned int semantics = 0, storageClassSemantics = 0; unsigned int semantics2 = 0, storageClassSemantics2 = 0; const TIntermTyped* arg0 = (*argp)[0]->getAsTyped(); const bool isMS = arg0->getBasicType() == EbtSampler && arg0->getType().getSampler().isMultiSample(); // Grab the semantics and storage class semantics from the operands, based on opcode switch (callNode.getOp()) { case EOpAtomicAdd: case EOpAtomicSubtract: case EOpAtomicMin: case EOpAtomicMax: case EOpAtomicAnd: case EOpAtomicOr: case EOpAtomicXor: case EOpAtomicExchange: case EOpAtomicStore: storageClassSemantics = (*argp)[3]->getAsConstantUnion()->getConstArray()[0].getIConst(); semantics = (*argp)[4]->getAsConstantUnion()->getConstArray()[0].getIConst(); break; case EOpAtomicLoad: storageClassSemantics = (*argp)[2]->getAsConstantUnion()->getConstArray()[0].getIConst(); semantics = (*argp)[3]->getAsConstantUnion()->getConstArray()[0].getIConst(); break; case EOpAtomicCompSwap: storageClassSemantics = (*argp)[4]->getAsConstantUnion()->getConstArray()[0].getIConst(); semantics = (*argp)[5]->getAsConstantUnion()->getConstArray()[0].getIConst(); storageClassSemantics2 = (*argp)[6]->getAsConstantUnion()->getConstArray()[0].getIConst(); semantics2 = (*argp)[7]->getAsConstantUnion()->getConstArray()[0].getIConst(); break; case EOpImageAtomicAdd: case EOpImageAtomicMin: case EOpImageAtomicMax: case EOpImageAtomicAnd: case EOpImageAtomicOr: case EOpImageAtomicXor: case EOpImageAtomicExchange: case EOpImageAtomicStore: storageClassSemantics = (*argp)[isMS ? 5 : 4]->getAsConstantUnion()->getConstArray()[0].getIConst(); semantics = (*argp)[isMS ? 6 : 5]->getAsConstantUnion()->getConstArray()[0].getIConst(); break; case EOpImageAtomicLoad: storageClassSemantics = (*argp)[isMS ? 4 : 3]->getAsConstantUnion()->getConstArray()[0].getIConst(); semantics = (*argp)[isMS ? 5 : 4]->getAsConstantUnion()->getConstArray()[0].getIConst(); break; case EOpImageAtomicCompSwap: storageClassSemantics = (*argp)[isMS ? 6 : 5]->getAsConstantUnion()->getConstArray()[0].getIConst(); semantics = (*argp)[isMS ? 7 : 6]->getAsConstantUnion()->getConstArray()[0].getIConst(); storageClassSemantics2 = (*argp)[isMS ? 8 : 7]->getAsConstantUnion()->getConstArray()[0].getIConst(); semantics2 = (*argp)[isMS ? 9 : 8]->getAsConstantUnion()->getConstArray()[0].getIConst(); break; case EOpBarrier: storageClassSemantics = (*argp)[2]->getAsConstantUnion()->getConstArray()[0].getIConst(); semantics = (*argp)[3]->getAsConstantUnion()->getConstArray()[0].getIConst(); break; case EOpMemoryBarrier: storageClassSemantics = (*argp)[1]->getAsConstantUnion()->getConstArray()[0].getIConst(); semantics = (*argp)[2]->getAsConstantUnion()->getConstArray()[0].getIConst(); break; default: break; } if ((semantics & gl_SemanticsAcquire) && (callNode.getOp() == EOpAtomicStore || callNode.getOp() == EOpImageAtomicStore)) { error(loc, "gl_SemanticsAcquire must not be used with (image) atomic store", fnCandidate.getName().c_str(), ""); } if ((semantics & gl_SemanticsRelease) && (callNode.getOp() == EOpAtomicLoad || callNode.getOp() == EOpImageAtomicLoad)) { error(loc, "gl_SemanticsRelease must not be used with (image) atomic load", fnCandidate.getName().c_str(), ""); } if ((semantics & gl_SemanticsAcquireRelease) && (callNode.getOp() == EOpAtomicStore || callNode.getOp() == EOpImageAtomicStore || callNode.getOp() == EOpAtomicLoad || callNode.getOp() == EOpImageAtomicLoad)) { error(loc, "gl_SemanticsAcquireRelease must not be used with (image) atomic load/store", fnCandidate.getName().c_str(), ""); } if (((semantics | semantics2) & ~(gl_SemanticsAcquire | gl_SemanticsRelease | gl_SemanticsAcquireRelease | gl_SemanticsMakeAvailable | gl_SemanticsMakeVisible | gl_SemanticsVolatile))) { error(loc, "Invalid semantics value", fnCandidate.getName().c_str(), ""); } if (((storageClassSemantics | storageClassSemantics2) & ~(gl_StorageSemanticsBuffer | gl_StorageSemanticsShared | gl_StorageSemanticsImage | gl_StorageSemanticsOutput))) { error(loc, "Invalid storage class semantics value", fnCandidate.getName().c_str(), ""); } if (callNode.getOp() == EOpMemoryBarrier) { if (!IsPow2(semantics & (gl_SemanticsAcquire | gl_SemanticsRelease | gl_SemanticsAcquireRelease))) { error(loc, "Semantics must include exactly one of gl_SemanticsRelease, gl_SemanticsAcquire, or " "gl_SemanticsAcquireRelease", fnCandidate.getName().c_str(), ""); } } else { if (semantics & (gl_SemanticsAcquire | gl_SemanticsRelease | gl_SemanticsAcquireRelease)) { if (!IsPow2(semantics & (gl_SemanticsAcquire | gl_SemanticsRelease | gl_SemanticsAcquireRelease))) { error(loc, "Semantics must not include multiple of gl_SemanticsRelease, gl_SemanticsAcquire, or " "gl_SemanticsAcquireRelease", fnCandidate.getName().c_str(), ""); } } if (semantics2 & (gl_SemanticsAcquire | gl_SemanticsRelease | gl_SemanticsAcquireRelease)) { if (!IsPow2(semantics2 & (gl_SemanticsAcquire | gl_SemanticsRelease | gl_SemanticsAcquireRelease))) { error(loc, "semUnequal must not include multiple of gl_SemanticsRelease, gl_SemanticsAcquire, or " "gl_SemanticsAcquireRelease", fnCandidate.getName().c_str(), ""); } } } if (callNode.getOp() == EOpMemoryBarrier) { if (storageClassSemantics == 0) { error(loc, "Storage class semantics must not be zero", fnCandidate.getName().c_str(), ""); } } if (callNode.getOp() == EOpBarrier && semantics != 0 && storageClassSemantics == 0) { error(loc, "Storage class semantics must not be zero", fnCandidate.getName().c_str(), ""); } if ((callNode.getOp() == EOpAtomicCompSwap || callNode.getOp() == EOpImageAtomicCompSwap) && (semantics2 & (gl_SemanticsRelease | gl_SemanticsAcquireRelease))) { error(loc, "semUnequal must not be gl_SemanticsRelease or gl_SemanticsAcquireRelease", fnCandidate.getName().c_str(), ""); } if ((semantics & gl_SemanticsMakeAvailable) && !(semantics & (gl_SemanticsRelease | gl_SemanticsAcquireRelease))) { error(loc, "gl_SemanticsMakeAvailable requires gl_SemanticsRelease or gl_SemanticsAcquireRelease", fnCandidate.getName().c_str(), ""); } if ((semantics & gl_SemanticsMakeVisible) && !(semantics & (gl_SemanticsAcquire | gl_SemanticsAcquireRelease))) { error(loc, "gl_SemanticsMakeVisible requires gl_SemanticsAcquire or gl_SemanticsAcquireRelease", fnCandidate.getName().c_str(), ""); } if ((semantics & gl_SemanticsVolatile) && (callNode.getOp() == EOpMemoryBarrier || callNode.getOp() == EOpBarrier)) { error(loc, "gl_SemanticsVolatile must not be used with memoryBarrier or controlBarrier", fnCandidate.getName().c_str(), ""); } if ((callNode.getOp() == EOpAtomicCompSwap || callNode.getOp() == EOpImageAtomicCompSwap) && ((semantics ^ semantics2) & gl_SemanticsVolatile)) { error(loc, "semEqual and semUnequal must either both include gl_SemanticsVolatile or neither", fnCandidate.getName().c_str(), ""); } } // // Do additional checking of built-in function calls that is not caught // by normal semantic checks on argument type, extension tagging, etc. // // Assumes there has been a semantically correct match to a built-in function prototype. // void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCandidate, TIntermOperator& callNode) { // Set up convenience accessors to the argument(s). There is almost always // multiple arguments for the cases below, but when there might be one, // check the unaryArg first. const TIntermSequence* argp = nullptr; // confusing to use [] syntax on a pointer, so this is to help get a reference const TIntermTyped* unaryArg = nullptr; const TIntermTyped* arg0 = nullptr; if (callNode.getAsAggregate()) { argp = &callNode.getAsAggregate()->getSequence(); if (argp->size() > 0) arg0 = (*argp)[0]->getAsTyped(); } else { assert(callNode.getAsUnaryNode()); unaryArg = callNode.getAsUnaryNode()->getOperand(); arg0 = unaryArg; } TString featureString; const char* feature = nullptr; switch (callNode.getOp()) { case EOpTextureGather: case EOpTextureGatherOffset: case EOpTextureGatherOffsets: { // Figure out which variants are allowed by what extensions, // and what arguments must be constant for which situations. featureString = fnCandidate.getName(); featureString += "(...)"; feature = featureString.c_str(); profileRequires(loc, EEsProfile, 310, nullptr, feature); int compArg = -1; // track which argument, if any, is the constant component argument const int numTexGatherExts = 3; const char* texGatherExts[numTexGatherExts] = { E_GL_ARB_texture_gather, E_GL_ARB_gpu_shader5, E_GL_NV_gpu_shader5}; switch (callNode.getOp()) { case EOpTextureGather: // More than two arguments needs gpu_shader5, and rectangular or shadow needs gpu_shader5, // otherwise, need GL_ARB_texture_gather. if (fnCandidate.getParamCount() > 2 || fnCandidate[0].type->getSampler().dim == EsdRect || fnCandidate[0].type->getSampler().shadow) { profileRequires(loc, ~EEsProfile, 400, Num_AEP_core_gpu_shader5, AEP_core_gpu_shader5, feature); if (! fnCandidate[0].type->getSampler().shadow) compArg = 2; } else profileRequires(loc, ~EEsProfile, 400, numTexGatherExts, texGatherExts, feature); break; case EOpTextureGatherOffset: // GL_ARB_texture_gather is good enough for 2D non-shadow textures with no component argument if (fnCandidate[0].type->getSampler().dim == Esd2D && ! fnCandidate[0].type->getSampler().shadow && fnCandidate.getParamCount() == 3) profileRequires(loc, ~EEsProfile, 400, numTexGatherExts, texGatherExts, feature); else profileRequires(loc, ~EEsProfile, 400, Num_AEP_core_gpu_shader5, AEP_core_gpu_shader5, feature); if (! (*argp)[fnCandidate[0].type->getSampler().shadow ? 3 : 2]->getAsConstantUnion()) profileRequires(loc, EEsProfile, 320, Num_AEP_gpu_shader5, AEP_gpu_shader5, "non-constant offset argument"); if (! fnCandidate[0].type->getSampler().shadow) compArg = 3; break; case EOpTextureGatherOffsets: profileRequires(loc, ~EEsProfile, 400, Num_AEP_core_gpu_shader5, AEP_core_gpu_shader5, feature); if (! fnCandidate[0].type->getSampler().shadow) compArg = 3; // check for constant offsets if (! (*argp)[fnCandidate[0].type->getSampler().shadow ? 3 : 2]->getAsConstantUnion() // NV_gpu_shader5 relaxes this limitation and allows for non-constant offsets && !extensionTurnedOn(E_GL_NV_gpu_shader5)) error(loc, "must be a compile-time constant:", feature, "offsets argument"); break; default: break; } if (compArg > 0 && compArg < fnCandidate.getParamCount()) { if ((*argp)[compArg]->getAsConstantUnion()) { int value = (*argp)[compArg]->getAsConstantUnion()->getConstArray()[0].getIConst(); if (value < 0 || value > 3) error(loc, "must be 0, 1, 2, or 3:", feature, "component argument"); } else error(loc, "must be a compile-time constant:", feature, "component argument"); } bool bias = false; if (callNode.getOp() == EOpTextureGather) bias = fnCandidate.getParamCount() > 3; else if (callNode.getOp() == EOpTextureGatherOffset || callNode.getOp() == EOpTextureGatherOffsets) bias = fnCandidate.getParamCount() > 4; if (bias) { featureString = fnCandidate.getName(); featureString += "with bias argument"; feature = featureString.c_str(); profileRequires(loc, ~EEsProfile, 450, nullptr, feature); requireExtensions(loc, 1, &E_GL_AMD_texture_gather_bias_lod, feature); } break; } case EOpTexture: case EOpTextureLod: { if ((fnCandidate.getParamCount() > 2) && ((*argp)[1]->getAsTyped()->getType().getBasicType() == EbtFloat) && ((*argp)[1]->getAsTyped()->getType().getVectorSize() == 4) && fnCandidate[0].type->getSampler().shadow) { featureString = fnCandidate.getName(); if (callNode.getOp() == EOpTexture) featureString += "(..., float bias)"; else featureString += "(..., float lod)"; feature = featureString.c_str(); if ((fnCandidate[0].type->getSampler().dim == Esd2D && fnCandidate[0].type->getSampler().arrayed) || //2D Array Shadow (fnCandidate[0].type->getSampler().dim == EsdCube && fnCandidate[0].type->getSampler().arrayed && fnCandidate.getParamCount() > 3) || // Cube Array Shadow (fnCandidate[0].type->getSampler().dim == EsdCube && callNode.getOp() == EOpTextureLod)) { // Cube Shadow requireExtensions(loc, 1, &E_GL_EXT_texture_shadow_lod, feature); if (isEsProfile()) { if (version < 320 && !extensionsTurnedOn(Num_AEP_texture_cube_map_array, AEP_texture_cube_map_array)) error(loc, "GL_EXT_texture_shadow_lod not supported for this ES version", feature, ""); else profileRequires(loc, EEsProfile, 320, nullptr, feature); } else { // Desktop profileRequires(loc, ~EEsProfile, 130, nullptr, feature); } } } break; } case EOpSparseTextureGather: case EOpSparseTextureGatherOffset: case EOpSparseTextureGatherOffsets: { bool bias = false; if (callNode.getOp() == EOpSparseTextureGather) bias = fnCandidate.getParamCount() > 4; else if (callNode.getOp() == EOpSparseTextureGatherOffset || callNode.getOp() == EOpSparseTextureGatherOffsets) bias = fnCandidate.getParamCount() > 5; if (bias) { featureString = fnCandidate.getName(); featureString += "with bias argument"; feature = featureString.c_str(); profileRequires(loc, ~EEsProfile, 450, nullptr, feature); requireExtensions(loc, 1, &E_GL_AMD_texture_gather_bias_lod, feature); } // As per GL_ARB_sparse_texture2 extension "Offsets" parameter must be constant integral expression // for sparseTextureGatherOffsetsARB just as textureGatherOffsets if (callNode.getOp() == EOpSparseTextureGatherOffsets) { int offsetsArg = arg0->getType().getSampler().shadow ? 3 : 2; if (!(*argp)[offsetsArg]->getAsConstantUnion()) error(loc, "argument must be compile-time constant", "offsets", ""); } break; } case EOpSparseTextureGatherLod: case EOpSparseTextureGatherLodOffset: case EOpSparseTextureGatherLodOffsets: { requireExtensions(loc, 1, &E_GL_ARB_sparse_texture2, fnCandidate.getName().c_str()); break; } case EOpSwizzleInvocations: { if (! (*argp)[1]->getAsConstantUnion()) error(loc, "argument must be compile-time constant", "offset", ""); else { unsigned offset[4] = {}; offset[0] = (*argp)[1]->getAsConstantUnion()->getConstArray()[0].getUConst(); offset[1] = (*argp)[1]->getAsConstantUnion()->getConstArray()[1].getUConst(); offset[2] = (*argp)[1]->getAsConstantUnion()->getConstArray()[2].getUConst(); offset[3] = (*argp)[1]->getAsConstantUnion()->getConstArray()[3].getUConst(); if (offset[0] > 3 || offset[1] > 3 || offset[2] > 3 || offset[3] > 3) error(loc, "components must be in the range [0, 3]", "offset", ""); } break; } case EOpSwizzleInvocationsMasked: { if (! (*argp)[1]->getAsConstantUnion()) error(loc, "argument must be compile-time constant", "mask", ""); else { unsigned mask[3] = {}; mask[0] = (*argp)[1]->getAsConstantUnion()->getConstArray()[0].getUConst(); mask[1] = (*argp)[1]->getAsConstantUnion()->getConstArray()[1].getUConst(); mask[2] = (*argp)[1]->getAsConstantUnion()->getConstArray()[2].getUConst(); if (mask[0] > 31 || mask[1] > 31 || mask[2] > 31) error(loc, "components must be in the range [0, 31]", "mask", ""); } break; } case EOpTextureOffset: case EOpTextureFetchOffset: case EOpTextureProjOffset: case EOpTextureLodOffset: case EOpTextureProjLodOffset: case EOpTextureGradOffset: case EOpTextureProjGradOffset: case EOpSparseTextureOffset: case EOpSparseTextureFetchOffset: case EOpSparseTextureLodOffset: case EOpSparseTextureGradOffset: { // Handle texture-offset limits checking // Pick which argument has to hold constant offsets int arg = -1; switch (callNode.getOp()) { case EOpSparseTextureOffset: case EOpTextureOffset: case EOpTextureProjOffset: arg = 2; break; case EOpSparseTextureLodOffset: case EOpTextureLodOffset: case EOpTextureProjLodOffset: arg = 3; break; case EOpSparseTextureGradOffset: case EOpTextureGradOffset: case EOpTextureProjGradOffset: arg = 4; break; case EOpSparseTextureFetchOffset: case EOpTextureFetchOffset: arg = (arg0->getType().getSampler().isRect()) ? 2 : 3; break; default: assert(0); break; } if (arg > 0) { bool f16ShadowCompare = (*argp)[1]->getAsTyped()->getBasicType() == EbtFloat16 && arg0->getType().getSampler().shadow; if (f16ShadowCompare) ++arg; // Allow non-constant offsets for certain texture ops bool variableOffsetSupport = extensionTurnedOn(E_GL_NV_gpu_shader5) && (callNode.getOp() == EOpTextureOffset || callNode.getOp() == EOpTextureFetchOffset || callNode.getOp() == EOpTextureProjOffset || callNode.getOp() == EOpTextureLodOffset || callNode.getOp() == EOpTextureProjLodOffset); if (! (*argp)[arg]->getAsTyped()->getQualifier().isConstant()) { if (!extensionTurnedOn(E_GL_EXT_texture_offset_non_const) && !variableOffsetSupport) error(loc, "argument must be compile-time constant", "texel offset", ""); } else if ((*argp)[arg]->getAsConstantUnion()) { const TType& type = (*argp)[arg]->getAsTyped()->getType(); for (int c = 0; c < type.getVectorSize(); ++c) { int offset = (*argp)[arg]->getAsConstantUnion()->getConstArray()[c].getIConst(); if (offset > resources.maxProgramTexelOffset || offset < resources.minProgramTexelOffset) error(loc, "value is out of range:", "texel offset", "[gl_MinProgramTexelOffset, gl_MaxProgramTexelOffset]"); } } // This check does not apply to sparse because // GL_ARB_sparse_texture2 always includes this function. if (callNode.getOp() == EOpTextureOffset) { TSampler s = arg0->getType().getSampler(); if (s.is2D() && s.isArrayed() && s.isShadow()) { if ( ((*argp)[1]->getAsTyped()->getType().getBasicType() == EbtFloat) && ((*argp)[1]->getAsTyped()->getType().getVectorSize() == 4) && (fnCandidate.getParamCount() == 4)) { featureString = fnCandidate.getName() + " for sampler2DArrayShadow"; feature = featureString.c_str(); requireExtensions(loc, 1, &E_GL_EXT_texture_shadow_lod, feature); profileRequires(loc, EEsProfile, 300, nullptr, feature); profileRequires(loc, ~EEsProfile, 130, nullptr, feature); } else if (isEsProfile()) error(loc, "TextureOffset does not support sampler2DArrayShadow : ", "sampler", "ES Profile"); else if (version <= 420) error(loc, "TextureOffset does not support sampler2DArrayShadow : ", "sampler", "version <= 420"); } } // This check does not apply to sparse because // GL_ARB_sparse_texture2 does not define sparseTextureLodOffsetARB // with a sampler2DArrayShadow. if (callNode.getOp() == EOpTextureLodOffset) { TSampler s = arg0->getType().getSampler(); if (s.is2D() && s.isArrayed() && s.isShadow() && ((*argp)[1]->getAsTyped()->getType().getBasicType() == EbtFloat) && ((*argp)[1]->getAsTyped()->getType().getVectorSize() == 4) && (fnCandidate.getParamCount() == 4)) { featureString = fnCandidate.getName() + " for sampler2DArrayShadow"; feature = featureString.c_str(); profileRequires(loc, EEsProfile, 300, nullptr, feature); profileRequires(loc, ~EEsProfile, 130, nullptr, feature); requireExtensions(loc, 1, &E_GL_EXT_texture_shadow_lod, feature); } } } break; } case EOpTraceNV: if (!(*argp)[10]->getAsConstantUnion()) error(loc, "argument must be compile-time constant", "payload number", "a"); break; case EOpTraceRayMotionNV: if (!(*argp)[11]->getAsConstantUnion()) error(loc, "argument must be compile-time constant", "payload number", "a"); break; case EOpTraceKHR: if (!(*argp)[10]->getAsConstantUnion()) error(loc, "argument must be compile-time constant", "payload number", "a"); else { unsigned int location = (*argp)[10]->getAsConstantUnion()->getAsConstantUnion()->getConstArray()[0].getUConst(); if (!extensionTurnedOn(E_GL_EXT_spirv_intrinsics) && intermediate.checkLocationRT(0, location) < 0) error(loc, "with layout(location =", "no rayPayloadEXT/rayPayloadInEXT declared", "%d)", location); } break; case EOpExecuteCallableNV: if (!(*argp)[1]->getAsConstantUnion()) error(loc, "argument must be compile-time constant", "callable data number", ""); break; case EOpExecuteCallableKHR: if (!(*argp)[1]->getAsConstantUnion()) error(loc, "argument must be compile-time constant", "callable data number", ""); else { unsigned int location = (*argp)[1]->getAsConstantUnion()->getAsConstantUnion()->getConstArray()[0].getUConst(); if (!extensionTurnedOn(E_GL_EXT_spirv_intrinsics) && intermediate.checkLocationRT(1, location) < 0) error(loc, "with layout(location =", "no callableDataEXT/callableDataInEXT declared", "%d)", location); } break; case EOpHitObjectTraceRayNV: if (!(*argp)[11]->getAsConstantUnion()) error(loc, "argument must be compile-time constant", "payload number", ""); else { unsigned int location = (*argp)[11]->getAsConstantUnion()->getAsConstantUnion()->getConstArray()[0].getUConst(); if (!extensionTurnedOn(E_GL_EXT_spirv_intrinsics) && intermediate.checkLocationRT(0, location) < 0) error(loc, "with layout(location =", "no rayPayloadEXT/rayPayloadInEXT declared", "%d)", location); } break; case EOpHitObjectTraceRayMotionNV: if (!(*argp)[12]->getAsConstantUnion()) error(loc, "argument must be compile-time constant", "payload number", ""); else { unsigned int location = (*argp)[12]->getAsConstantUnion()->getAsConstantUnion()->getConstArray()[0].getUConst(); if (!extensionTurnedOn(E_GL_EXT_spirv_intrinsics) && intermediate.checkLocationRT(0, location) < 0) error(loc, "with layout(location =", "no rayPayloadEXT/rayPayloadInEXT declared", "%d)", location); } break; case EOpHitObjectExecuteShaderNV: if (!(*argp)[1]->getAsConstantUnion()) error(loc, "argument must be compile-time constant", "payload number", ""); else { unsigned int location = (*argp)[1]->getAsConstantUnion()->getAsConstantUnion()->getConstArray()[0].getUConst(); if (!extensionTurnedOn(E_GL_EXT_spirv_intrinsics) && intermediate.checkLocationRT(0, location) < 0) error(loc, "with layout(location =", "no rayPayloadEXT/rayPayloadInEXT declared", "%d)", location); } break; case EOpHitObjectRecordHitNV: if (!(*argp)[12]->getAsConstantUnion()) error(loc, "argument must be compile-time constant", "hitobjectattribute number", ""); else { unsigned int location = (*argp)[12]->getAsConstantUnion()->getAsConstantUnion()->getConstArray()[0].getUConst(); if (!extensionTurnedOn(E_GL_EXT_spirv_intrinsics) && intermediate.checkLocationRT(2, location) < 0) error(loc, "with layout(location =", "no hitObjectAttributeNV declared", "%d)", location); } break; case EOpHitObjectRecordHitMotionNV: if (!(*argp)[13]->getAsConstantUnion()) error(loc, "argument must be compile-time constant", "hitobjectattribute number", ""); else { unsigned int location = (*argp)[13]->getAsConstantUnion()->getAsConstantUnion()->getConstArray()[0].getUConst(); if (!extensionTurnedOn(E_GL_EXT_spirv_intrinsics) && intermediate.checkLocationRT(2, location) < 0) error(loc, "with layout(location =", "no hitObjectAttributeNV declared", "%d)", location); } break; case EOpHitObjectRecordHitWithIndexNV: if (!(*argp)[11]->getAsConstantUnion()) error(loc, "argument must be compile-time constant", "hitobjectattribute number", ""); else { unsigned int location = (*argp)[11]->getAsConstantUnion()->getAsConstantUnion()->getConstArray()[0].getUConst(); if (!extensionTurnedOn(E_GL_EXT_spirv_intrinsics) && intermediate.checkLocationRT(2, location) < 0) error(loc, "with layout(location =", "no hitObjectAttributeNV declared", "%d)", location); } break; case EOpHitObjectRecordHitWithIndexMotionNV: if (!(*argp)[12]->getAsConstantUnion()) error(loc, "argument must be compile-time constant", "hitobjectattribute number", ""); else { unsigned int location = (*argp)[12]->getAsConstantUnion()->getAsConstantUnion()->getConstArray()[0].getUConst(); if (!extensionTurnedOn(E_GL_EXT_spirv_intrinsics) && intermediate.checkLocationRT(2, location) < 0) error(loc, "with layout(location =", "no hitObjectAttributeNV declared", "%d)", location); } break; case EOpHitObjectGetAttributesNV: if (!(*argp)[1]->getAsConstantUnion()) error(loc, "argument must be compile-time constant", "hitobjectattribute number", ""); else { unsigned int location = (*argp)[1]->getAsConstantUnion()->getAsConstantUnion()->getConstArray()[0].getUConst(); if (!extensionTurnedOn(E_GL_EXT_spirv_intrinsics) && intermediate.checkLocationRT(2, location) < 0) error(loc, "with layout(location =", "no hitObjectAttributeNV declared", "%d)", location); } break; case EOpRayQueryGetIntersectionType: case EOpRayQueryGetIntersectionT: case EOpRayQueryGetIntersectionInstanceCustomIndex: case EOpRayQueryGetIntersectionInstanceId: case EOpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffset: case EOpRayQueryGetIntersectionGeometryIndex: case EOpRayQueryGetIntersectionPrimitiveIndex: case EOpRayQueryGetIntersectionBarycentrics: case EOpRayQueryGetIntersectionFrontFace: case EOpRayQueryGetIntersectionObjectRayDirection: case EOpRayQueryGetIntersectionObjectRayOrigin: case EOpRayQueryGetIntersectionObjectToWorld: case EOpRayQueryGetIntersectionWorldToObject: case EOpRayQueryGetIntersectionTriangleVertexPositionsEXT: case EOpRayQueryGetIntersectionClusterIdNV: case EOpRayQueryGetIntersectionSpherePositionNV: case EOpRayQueryGetIntersectionSphereRadiusNV: case EOpRayQueryGetIntersectionLSSHitValueNV: case EOpRayQueryGetIntersectionLSSPositionsNV: case EOpRayQueryGetIntersectionLSSRadiiNV: if (!(*argp)[1]->getAsConstantUnion()) error(loc, "argument must be compile-time constant", "committed", ""); break; case EOpTextureQuerySamples: case EOpImageQuerySamples: // GL_ARB_shader_texture_image_samples profileRequires(loc, ~EEsProfile, 450, E_GL_ARB_shader_texture_image_samples, "textureSamples and imageSamples"); break; case EOpImageAtomicAdd: case EOpImageAtomicMin: case EOpImageAtomicMax: case EOpImageAtomicAnd: case EOpImageAtomicOr: case EOpImageAtomicXor: case EOpImageAtomicExchange: case EOpImageAtomicCompSwap: case EOpImageAtomicLoad: case EOpImageAtomicStore: { // Make sure the image types have the correct layout() format and correct argument types const TType& imageType = arg0->getType(); if (imageType.getSampler().type == EbtInt || imageType.getSampler().type == EbtUint || imageType.getSampler().type == EbtInt64 || imageType.getSampler().type == EbtUint64) { if (imageType.getQualifier().getFormat() != ElfR32i && imageType.getQualifier().getFormat() != ElfR32ui && imageType.getQualifier().getFormat() != ElfR64i && imageType.getQualifier().getFormat() != ElfR64ui) error(loc, "only supported on image with format r32i or r32ui", fnCandidate.getName().c_str(), ""); if (callNode.getType().getBasicType() == EbtInt64 && imageType.getQualifier().getFormat() != ElfR64i) error(loc, "only supported on image with format r64i", fnCandidate.getName().c_str(), ""); else if (callNode.getType().getBasicType() == EbtUint64 && imageType.getQualifier().getFormat() != ElfR64ui) error(loc, "only supported on image with format r64ui", fnCandidate.getName().c_str(), ""); } else if(callNode.getType().getBasicType() == EbtFloat16 && ((callNode.getType().getVectorSize() == 2 && arg0->getType().getQualifier().getFormat() == ElfRg16f) || (callNode.getType().getVectorSize() == 4 && arg0->getType().getQualifier().getFormat() == ElfRgba16f))) { if (StartsWith(fnCandidate.getName(), "imageAtomicAdd") || StartsWith(fnCandidate.getName(), "imageAtomicExchange") || StartsWith(fnCandidate.getName(), "imageAtomicMin") || StartsWith(fnCandidate.getName(), "imageAtomicMax")) { requireExtensions(loc, 1, &E_GL_NV_shader_atomic_fp16_vector, fnCandidate.getName().c_str()); } else { error(loc, "f16vec2/4 operation not supported on: ", fnCandidate.getName().c_str(), ""); } } else if (imageType.getSampler().type == EbtFloat) { if (StartsWith(fnCandidate.getName(), "imageAtomicExchange")) { // imageAtomicExchange doesn't require an extension } else if (StartsWith(fnCandidate.getName(), "imageAtomicAdd") || StartsWith(fnCandidate.getName(), "imageAtomicLoad") || StartsWith(fnCandidate.getName(), "imageAtomicStore")) { requireExtensions(loc, 1, &E_GL_EXT_shader_atomic_float, fnCandidate.getName().c_str()); } else if (StartsWith(fnCandidate.getName(), "imageAtomicMin") || StartsWith(fnCandidate.getName(), "imageAtomicMax")) { requireExtensions(loc, 1, &E_GL_EXT_shader_atomic_float2, fnCandidate.getName().c_str()); } else { error(loc, "only supported on integer images", fnCandidate.getName().c_str(), ""); } if (imageType.getQualifier().getFormat() != ElfR32f && isEsProfile()) error(loc, "only supported on image with format r32f", fnCandidate.getName().c_str(), ""); } else { error(loc, "not supported on this image type", fnCandidate.getName().c_str(), ""); } const size_t maxArgs = imageType.getSampler().isMultiSample() ? 5 : 4; if (argp->size() > maxArgs) { requireExtensions(loc, 1, &E_GL_KHR_memory_scope_semantics, fnCandidate.getName().c_str()); memorySemanticsCheck(loc, fnCandidate, callNode); } break; } case EOpAtomicAdd: case EOpAtomicSubtract: case EOpAtomicMin: case EOpAtomicMax: case EOpAtomicAnd: case EOpAtomicOr: case EOpAtomicXor: case EOpAtomicExchange: case EOpAtomicCompSwap: case EOpAtomicLoad: case EOpAtomicStore: { if (argp->size() > 3) { requireExtensions(loc, 1, &E_GL_KHR_memory_scope_semantics, fnCandidate.getName().c_str()); memorySemanticsCheck(loc, fnCandidate, callNode); if ((callNode.getOp() == EOpAtomicAdd || callNode.getOp() == EOpAtomicExchange || callNode.getOp() == EOpAtomicLoad || callNode.getOp() == EOpAtomicStore) && (arg0->getType().getBasicType() == EbtFloat || arg0->getType().getBasicType() == EbtDouble)) { requireExtensions(loc, 1, &E_GL_EXT_shader_atomic_float, fnCandidate.getName().c_str()); } else if ((callNode.getOp() == EOpAtomicAdd || callNode.getOp() == EOpAtomicExchange || callNode.getOp() == EOpAtomicLoad || callNode.getOp() == EOpAtomicStore || callNode.getOp() == EOpAtomicMin || callNode.getOp() == EOpAtomicMax) && arg0->getType().isFloatingDomain()) { requireExtensions(loc, 1, &E_GL_EXT_shader_atomic_float2, fnCandidate.getName().c_str()); } } else if (arg0->getType().getBasicType() == EbtInt64 || arg0->getType().getBasicType() == EbtUint64) { const char* const extensions[2] = { E_GL_NV_shader_atomic_int64, E_GL_EXT_shader_atomic_int64 }; requireExtensions(loc, 2, extensions, fnCandidate.getName().c_str()); } else if ((callNode.getOp() == EOpAtomicAdd || callNode.getOp() == EOpAtomicExchange || callNode.getOp() == EOpAtomicMin || callNode.getOp() == EOpAtomicMax) && arg0->getType().getBasicType() == EbtFloat16 && (arg0->getType().getVectorSize() == 2 || arg0->getType().getVectorSize() == 4 )) { requireExtensions(loc, 1, &E_GL_NV_shader_atomic_fp16_vector, fnCandidate.getName().c_str()); } else if ((callNode.getOp() == EOpAtomicAdd || callNode.getOp() == EOpAtomicExchange) && (arg0->getType().getBasicType() == EbtFloat || arg0->getType().getBasicType() == EbtDouble)) { requireExtensions(loc, 1, &E_GL_EXT_shader_atomic_float, fnCandidate.getName().c_str()); } else if ((callNode.getOp() == EOpAtomicAdd || callNode.getOp() == EOpAtomicExchange || callNode.getOp() == EOpAtomicLoad || callNode.getOp() == EOpAtomicStore || callNode.getOp() == EOpAtomicMin || callNode.getOp() == EOpAtomicMax) && arg0->getType().isFloatingDomain()) { requireExtensions(loc, 1, &E_GL_EXT_shader_atomic_float2, fnCandidate.getName().c_str()); } const TIntermTyped* base = TIntermediate::traverseLValueBase(arg0, true, true); const char* errMsg = "Only l-values corresponding to shader block storage or shared variables can be used with " "atomic memory functions."; if (base) { const TType* refType = (base->getType().isReference()) ? base->getType().getReferentType() : nullptr; const TQualifier& qualifier = (refType != nullptr) ? refType->getQualifier() : base->getType().getQualifier(); if (qualifier.storage != EvqShared && qualifier.storage != EvqBuffer && qualifier.storage != EvqtaskPayloadSharedEXT) error(loc, errMsg, fnCandidate.getName().c_str(), ""); } else { error(loc, errMsg, fnCandidate.getName().c_str(), ""); } break; } case EOpInterpolateAtCentroid: case EOpInterpolateAtSample: case EOpInterpolateAtOffset: case EOpInterpolateAtVertex: { if (arg0->getType().getQualifier().storage != EvqVaryingIn) { // Traverse down the left branch of arg0 to ensure this argument is a valid interpolant. // // For desktop GL >4.3 we effectively only need to ensure that arg0 represents an l-value from an // input declaration. // // For desktop GL <= 4.3 and ES, we must also ensure that swizzling is not used // // For ES, we must also ensure that a field selection operator (i.e., '.') is not used on a named // struct. const bool esProfile = isEsProfile(); const bool swizzleOkay = !esProfile && (version >= 440); std::string interpolantErrorMsg = "first argument must be an interpolant, or interpolant-array element"; bool isValid = true; // Assume that the interpolant is valid until we find a condition making it invalid bool isIn = false; // Checks whether or not the interpolant is a shader input bool structAccessOp = false; // Whether or not the previous node in the chain is a struct accessor TIntermediate::traverseLValueBase( arg0, swizzleOkay, false, [&isValid, &isIn, &interpolantErrorMsg, esProfile, &structAccessOp](const TIntermNode& n) -> bool { auto* type = n.getAsTyped(); if (type) { if (type->getType().getQualifier().storage == EvqVaryingIn) { isIn = true; } // If a field accessor was used, it can only be used to access a field with an input block, not a struct. if (structAccessOp && (type->getType().getBasicType() != EbtBlock)) { interpolantErrorMsg += ". Using the field of a named struct as an interpolant argument is not " "allowed (ES-only)."; isValid = false; } } // ES has different requirements for interpolants than GL if (esProfile) { // Swizzling will be taken care of by the 'swizzleOkay' argument passsed to traverseLValueBase, // so we only ned to check whether or not a field accessor has been used with a named struct. auto* binary = n.getAsBinaryNode(); if (binary && (binary->getOp() == EOpIndexDirectStruct)) { structAccessOp = true; } } // Don't continue traversing if we know we have an invalid interpolant at this point. return isValid; }); if (!isIn || !isValid) { error(loc, interpolantErrorMsg.c_str(), fnCandidate.getName().c_str(), ""); } } if (callNode.getOp() == EOpInterpolateAtVertex) { if (!arg0->getType().getQualifier().isExplicitInterpolation()) error(loc, "argument must be qualified as __explicitInterpAMD in", "interpolant", ""); else { if (! (*argp)[1]->getAsConstantUnion()) error(loc, "argument must be compile-time constant", "vertex index", ""); else { unsigned vertexIdx = (*argp)[1]->getAsConstantUnion()->getConstArray()[0].getUConst(); if (vertexIdx > 2) error(loc, "must be in the range [0, 2]", "vertex index", ""); } } } } break; case EOpEmitStreamVertex: case EOpEndStreamPrimitive: if (version == 150) requireExtensions(loc, Num_AEP_core_gpu_shader5, AEP_core_gpu_shader5, "if the verison is 150 , the EmitStreamVertex and EndStreamPrimitive only support at extension GL_ARB_gpu_shader5/GL_NV_gpu_shader5"); intermediate.setMultiStream(); break; case EOpSubgroupClusteredAdd: case EOpSubgroupClusteredMul: case EOpSubgroupClusteredMin: case EOpSubgroupClusteredMax: case EOpSubgroupClusteredAnd: case EOpSubgroupClusteredOr: case EOpSubgroupClusteredXor: // The as used in the subgroupClustered() operations must be: // - An integral constant expression. // - At least 1. // - A power of 2. if ((*argp)[1]->getAsConstantUnion() == nullptr) error(loc, "argument must be compile-time constant", "cluster size", ""); else { int size = (*argp)[1]->getAsConstantUnion()->getConstArray()[0].getIConst(); if (size < 1) error(loc, "argument must be at least 1", "cluster size", ""); else if (!IsPow2(size)) error(loc, "argument must be a power of 2", "cluster size", ""); } break; case EOpSubgroupBroadcast: case EOpSubgroupQuadBroadcast: if (spvVersion.spv < EShTargetSpv_1_5) { // must be an integral constant expression. if ((*argp)[1]->getAsConstantUnion() == nullptr) error(loc, "argument must be compile-time constant", "id", ""); } break; case EOpBarrier: case EOpMemoryBarrier: if (argp->size() > 0) { requireExtensions(loc, 1, &E_GL_KHR_memory_scope_semantics, fnCandidate.getName().c_str()); memorySemanticsCheck(loc, fnCandidate, callNode); } break; case EOpMix: if (profile == EEsProfile && version < 310) { // Look for specific signatures if ((*argp)[0]->getAsTyped()->getBasicType() != EbtFloat && (*argp)[1]->getAsTyped()->getBasicType() != EbtFloat && (*argp)[2]->getAsTyped()->getBasicType() == EbtBool) { requireExtensions(loc, 1, &E_GL_EXT_shader_integer_mix, "specific signature of builtin mix"); } } if (profile != EEsProfile && version < 450) { if ((*argp)[0]->getAsTyped()->getBasicType() != EbtFloat && (*argp)[0]->getAsTyped()->getBasicType() != EbtDouble && (*argp)[1]->getAsTyped()->getBasicType() != EbtFloat && (*argp)[1]->getAsTyped()->getBasicType() != EbtDouble && (*argp)[2]->getAsTyped()->getBasicType() == EbtBool) { requireExtensions(loc, 1, &E_GL_EXT_shader_integer_mix, fnCandidate.getName().c_str()); } } break; case EOpLessThan: case EOpLessThanEqual: case EOpGreaterThan: case EOpGreaterThanEqual: case EOpEqual: case EOpNotEqual: if (profile != EEsProfile && version >= 150 && version < 450) { if ((*argp)[1]->getAsTyped()->getBasicType() == EbtInt64 || (*argp)[1]->getAsTyped()->getBasicType() == EbtUint64) requireExtensions(loc, 1, &E_GL_NV_gpu_shader5, fnCandidate.getName().c_str()); } break; case EOpFma: case EOpFrexp: case EOpLdexp: if (profile != EEsProfile && version < 400) { if ((*argp)[0]->getAsTyped()->getBasicType() == EbtFloat) { requireExtensions(loc, Num_AEP_core_gpu_shader5, AEP_core_gpu_shader5, fnCandidate.getName().c_str()); } } break; case EOpCooperativeVectorMatMulNV: case EOpCooperativeVectorMatMulAddNV: { int inputInterpIdx = 2; int matrixInterpIdx = 5; int biasInterpIdx = 8; int MIdx = callNode.getOp() == EOpCooperativeVectorMatMulAddNV ? 9 : 6; int KIdx = callNode.getOp() == EOpCooperativeVectorMatMulAddNV ? 10 : 7; int matrixLayoutIdx = callNode.getOp() == EOpCooperativeVectorMatMulAddNV ? 11 : 8; int transposeIdx = callNode.getOp() == EOpCooperativeVectorMatMulAddNV ? 12 : 9; if (!(*argp)[inputInterpIdx]->getAsTyped()->getType().getQualifier().isConstant()) error(loc, "argument must be compile-time constant", "inputInterpretation", ""); if (!(*argp)[matrixInterpIdx]->getAsTyped()->getType().getQualifier().isConstant()) error(loc, "argument must be compile-time constant", "matrixInterpretation", ""); if (callNode.getOp() == EOpCooperativeVectorMatMulAddNV) { if (!(*argp)[biasInterpIdx]->getAsTyped()->getType().getQualifier().isConstant()) error(loc, "argument must be compile-time constant", "biasInterpretation", ""); } if (!(*argp)[MIdx]->getAsTyped()->getType().getQualifier().isConstant()) error(loc, "argument must be compile-time constant", "M", ""); if (!(*argp)[KIdx]->getAsTyped()->getType().getQualifier().isConstant()) error(loc, "argument must be compile-time constant", "K", ""); if (!(*argp)[matrixLayoutIdx]->getAsTyped()->getType().getQualifier().isConstant()) error(loc, "argument must be compile-time constant", "matrixLayout", ""); if (!(*argp)[transposeIdx]->getAsTyped()->getType().getQualifier().isConstant()) error(loc, "argument must be compile-time constant", "transpose", ""); } break; case EOpCooperativeVectorOuterProductAccumulateNV: if (!(*argp)[5]->getAsTyped()->getType().getQualifier().isConstant()) error(loc, "argument must be compile-time constant", "matrixLayout", ""); if (!(*argp)[6]->getAsTyped()->getType().getQualifier().isConstant()) error(loc, "argument must be compile-time constant", "matrixInterpretation", ""); break; default: break; } // Texture operations on texture objects (aside from texelFetch on a // textureBuffer) require EXT_samplerless_texture_functions. switch (callNode.getOp()) { case EOpTextureQuerySize: case EOpTextureQueryLevels: case EOpTextureQuerySamples: case EOpTextureFetch: case EOpTextureFetchOffset: { const TSampler& sampler = fnCandidate[0].type->getSampler(); const bool isTexture = sampler.isTexture() && !sampler.isCombined(); const bool isBuffer = sampler.isBuffer(); const bool isFetch = callNode.getOp() == EOpTextureFetch || callNode.getOp() == EOpTextureFetchOffset; if (isTexture && (!isBuffer || !isFetch)) requireExtensions(loc, 1, &E_GL_EXT_samplerless_texture_functions, fnCandidate.getName().c_str()); break; } case EOpConstructSaturated: { auto &sequence = callNode.getAsAggregate()->getSequence(); if (sequence.size() != 2) { error(loc, "requires exactly two parameters", "", ""); } auto &op0Type = sequence[0]->getAsTyped()->getType(); auto &op1Type = sequence[1]->getAsTyped()->getType(); if (op0Type.getBasicType() != EbtFloatE5M2 && op0Type.getBasicType() != EbtFloatE4M3) { error(loc, "first parameter must have floate5m2 or floate4m3 basic type", "", ""); } if (op1Type.getBasicType() == EbtFloatE5M2 || op1Type.getBasicType() == EbtFloatE4M3) { error(loc, "second parameter must not have floate5m2 or floate4m3 basic type", "", ""); } if (!(op0Type.isScalar() || op0Type.isVector() || op0Type.isCoopMatKHR())) { error(loc, "first parameter must be scalar, vector, or cooperative matrix", "", ""); } if (!(op1Type.isScalar() || op1Type.isVector() || op1Type.isCoopMatKHR())) { error(loc, "second parameter must be scalar, vector, or cooperative matrix", "", ""); } if (!(op0Type.sameElementShape(op1Type) || op0Type.sameCoopMatShape(op1Type))) { error(loc, "types must match other than scalar type and coopmat Use", "", ""); } break; } default: break; } if (callNode.isSubgroup()) { // these require SPIR-V 1.3 if (spvVersion.spv > 0 && spvVersion.spv < EShTargetSpv_1_3) error(loc, "requires SPIR-V 1.3", "subgroup op", ""); // Check that if extended types are being used that the correct extensions are enabled. if (arg0 != nullptr) { const TType& type = arg0->getType(); bool enhanced = intermediate.getEnhancedMsgs(); switch (type.getBasicType()) { default: break; case EbtInt8: case EbtUint8: requireExtensions(loc, 1, &E_GL_EXT_shader_subgroup_extended_types_int8, type.getCompleteString(enhanced).c_str()); break; case EbtInt16: case EbtUint16: requireExtensions(loc, 1, &E_GL_EXT_shader_subgroup_extended_types_int16, type.getCompleteString(enhanced).c_str()); break; case EbtInt64: case EbtUint64: requireExtensions(loc, 1, &E_GL_EXT_shader_subgroup_extended_types_int64, type.getCompleteString(enhanced).c_str()); break; case EbtFloat16: requireExtensions(loc, 1, &E_GL_EXT_shader_subgroup_extended_types_float16, type.getCompleteString(enhanced).c_str()); break; } } } } // Deprecated! Use PureOperatorBuiltins == true instead, in which case this // functionality is handled in builtInOpCheck() instead of here. // // Do additional checking of built-in function calls that were not mapped // to built-in operations (e.g., texturing functions). // // Assumes there has been a semantically correct match to a built-in function. // void TParseContext::nonOpBuiltInCheck(const TSourceLoc& loc, const TFunction& fnCandidate, TIntermAggregate& callNode) { // Further maintenance of this function is deprecated, because the "correct" // future-oriented design is to not have to do string compares on function names. // If PureOperatorBuiltins == true, then all built-ins should be mapped // to a TOperator, and this function would then never get called. assert(PureOperatorBuiltins == false); // built-in texturing functions get their return value precision from the precision of the sampler if (fnCandidate.getType().getQualifier().precision == EpqNone && fnCandidate.getParamCount() > 0 && fnCandidate[0].type->getBasicType() == EbtSampler) callNode.getQualifier().precision = callNode.getSequence()[0]->getAsTyped()->getQualifier().precision; if (fnCandidate.getName().compare(0, 7, "texture") == 0) { if (fnCandidate.getName().compare(0, 13, "textureGather") == 0) { TString featureString = fnCandidate.getName() + "(...)"; const char* feature = featureString.c_str(); profileRequires(loc, EEsProfile, 310, nullptr, feature); int compArg = -1; // track which argument, if any, is the constant component argument if (fnCandidate.getName().compare("textureGatherOffset") == 0) { // GL_ARB_texture_gather is good enough for 2D non-shadow textures with no component argument if (fnCandidate[0].type->getSampler().dim == Esd2D && ! fnCandidate[0].type->getSampler().shadow && fnCandidate.getParamCount() == 3) profileRequires(loc, ~EEsProfile, 400, E_GL_ARB_texture_gather, feature); else profileRequires(loc, ~EEsProfile, 400, E_GL_ARB_gpu_shader5, feature); int offsetArg = fnCandidate[0].type->getSampler().shadow ? 3 : 2; if (! callNode.getSequence()[offsetArg]->getAsConstantUnion()) profileRequires(loc, EEsProfile, 320, Num_AEP_gpu_shader5, AEP_gpu_shader5, "non-constant offset argument"); if (! fnCandidate[0].type->getSampler().shadow) compArg = 3; } else if (fnCandidate.getName().compare("textureGatherOffsets") == 0) { profileRequires(loc, ~EEsProfile, 400, E_GL_ARB_gpu_shader5, feature); if (! fnCandidate[0].type->getSampler().shadow) compArg = 3; // check for constant offsets int offsetArg = fnCandidate[0].type->getSampler().shadow ? 3 : 2; if (! callNode.getSequence()[offsetArg]->getAsConstantUnion() && !extensionTurnedOn(E_GL_NV_gpu_shader5)) error(loc, "must be a compile-time constant:", feature, "offsets argument"); } else if (fnCandidate.getName().compare("textureGather") == 0) { // More than two arguments needs gpu_shader5, and rectangular or shadow needs gpu_shader5, // otherwise, need GL_ARB_texture_gather. if (fnCandidate.getParamCount() > 2 || fnCandidate[0].type->getSampler().dim == EsdRect || fnCandidate[0].type->getSampler().shadow) { profileRequires(loc, ~EEsProfile, 400, E_GL_ARB_gpu_shader5, feature); if (! fnCandidate[0].type->getSampler().shadow) compArg = 2; } else profileRequires(loc, ~EEsProfile, 400, E_GL_ARB_texture_gather, feature); } if (compArg > 0 && compArg < fnCandidate.getParamCount()) { if (callNode.getSequence()[compArg]->getAsConstantUnion()) { int value = callNode.getSequence()[compArg]->getAsConstantUnion()->getConstArray()[0].getIConst(); if (value < 0 || value > 3) error(loc, "must be 0, 1, 2, or 3:", feature, "component argument"); } else error(loc, "must be a compile-time constant:", feature, "component argument"); } } else { // this is only for functions not starting "textureGather"... if (fnCandidate.getName().find("Offset") != TString::npos) { // Handle texture-offset limits checking int arg = -1; if (fnCandidate.getName().compare("textureOffset") == 0) arg = 2; else if (fnCandidate.getName().compare("texelFetchOffset") == 0) arg = 3; else if (fnCandidate.getName().compare("textureProjOffset") == 0) arg = 2; else if (fnCandidate.getName().compare("textureLodOffset") == 0) arg = 3; else if (fnCandidate.getName().compare("textureProjLodOffset") == 0) arg = 3; else if (fnCandidate.getName().compare("textureGradOffset") == 0) arg = 4; else if (fnCandidate.getName().compare("textureProjGradOffset") == 0) arg = 4; if (arg > 0) { if (! callNode.getSequence()[arg]->getAsConstantUnion()) { if (!extensionTurnedOn(E_GL_EXT_texture_offset_non_const)) error(loc, "argument must be compile-time constant", "texel offset", ""); } else { const TType& type = callNode.getSequence()[arg]->getAsTyped()->getType(); for (int c = 0; c < type.getVectorSize(); ++c) { int offset = callNode.getSequence()[arg]->getAsConstantUnion()->getConstArray()[c].getIConst(); if (offset > resources.maxProgramTexelOffset || offset < resources.minProgramTexelOffset) error(loc, "value is out of range:", "texel offset", "[gl_MinProgramTexelOffset, gl_MaxProgramTexelOffset]"); } } } } } } // GL_ARB_shader_texture_image_samples if (fnCandidate.getName().compare(0, 14, "textureSamples") == 0 || fnCandidate.getName().compare(0, 12, "imageSamples") == 0) profileRequires(loc, ~EEsProfile, 450, E_GL_ARB_shader_texture_image_samples, "textureSamples and imageSamples"); if (fnCandidate.getName().compare(0, 11, "imageAtomic") == 0) { const TType& imageType = callNode.getSequence()[0]->getAsTyped()->getType(); if (imageType.getSampler().type == EbtInt || imageType.getSampler().type == EbtUint) { if (imageType.getQualifier().getFormat() != ElfR32i && imageType.getQualifier().getFormat() != ElfR32ui) error(loc, "only supported on image with format r32i or r32ui", fnCandidate.getName().c_str(), ""); } else { if (fnCandidate.getName().compare(0, 19, "imageAtomicExchange") != 0) error(loc, "only supported on integer images", fnCandidate.getName().c_str(), ""); else if (imageType.getQualifier().getFormat() != ElfR32f && isEsProfile()) error(loc, "only supported on image with format r32f", fnCandidate.getName().c_str(), ""); } } } // // Do any extra checking for a user function call. // void TParseContext::userFunctionCallCheck(const TSourceLoc& loc, TIntermAggregate& callNode) { TIntermSequence& arguments = callNode.getSequence(); for (int i = 0; i < (int)arguments.size(); ++i) samplerConstructorLocationCheck(loc, "call argument", arguments[i]); } // // Emit an error if this is a sampler constructor // void TParseContext::samplerConstructorLocationCheck(const TSourceLoc& loc, const char* token, TIntermNode* node) { if (node->getAsOperator() && node->getAsOperator()->getOp() == EOpConstructTextureSampler) error(loc, "sampler constructor must appear at point of use", token, ""); } // // Handle seeing a built-in constructor in a grammar production. // TFunction* TParseContext::handleConstructorCall(const TSourceLoc& loc, const TPublicType& publicType) { TType type(publicType); type.getQualifier().precision = EpqNone; if (type.isArray()) { profileRequires(loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed constructor"); profileRequires(loc, EEsProfile, 300, nullptr, "arrayed constructor"); } // Reuse EOpConstructTextureSampler for bindless image constructor // uvec2 imgHandle; // imageLoad(image1D(imgHandle), 0); if (type.isImage() && extensionTurnedOn(E_GL_ARB_bindless_texture)) { intermediate.setBindlessImageMode(currentCaller, AstRefTypeFunc); } TOperator op = intermediate.mapTypeToConstructorOp(type); if (op == EOpNull) { if (intermediate.getEnhancedMsgs() && type.getBasicType() == EbtSampler) error(loc, "function not supported in this version; use texture() instead", "texture*D*", ""); else error(loc, "cannot construct this type", type.getBasicString(), ""); op = EOpConstructFloat; TType errorType(EbtFloat); type.shallowCopy(errorType); } TString empty(""); return new TFunction(&empty, type, op); } // Handle seeing a precision qualifier in the grammar. void TParseContext::handlePrecisionQualifier(const TSourceLoc& /*loc*/, TQualifier& qualifier, TPrecisionQualifier precision) { if (obeyPrecisionQualifiers()) qualifier.precision = precision; } // Check for messages to give on seeing a precision qualifier used in a // declaration in the grammar. void TParseContext::checkPrecisionQualifier(const TSourceLoc& loc, TPrecisionQualifier) { if (precisionManager.shouldWarnAboutDefaults()) { warn(loc, "all default precisions are highp; use precision statements to quiet warning, e.g.:\n" " \"precision mediump int; precision highp float;\"", "", ""); precisionManager.defaultWarningGiven(); } } // // Same error message for all places assignments don't work. // void TParseContext::assignError(const TSourceLoc& loc, const char* op, TString left, TString right) { error(loc, "", op, "cannot convert from '%s' to '%s'", right.c_str(), left.c_str()); } // // Same error message for all places unary operations don't work. // void TParseContext::unaryOpError(const TSourceLoc& loc, const char* op, TString operand) { error(loc, " wrong operand type", op, "no operation '%s' exists that takes an operand of type %s (or there is no acceptable conversion)", op, operand.c_str()); } // // Same error message for all binary operations don't work. // void TParseContext::binaryOpError(const TSourceLoc& loc, const char* op, TString left, TString right) { error(loc, " wrong operand types:", op, "no operation '%s' exists that takes a left-hand operand of type '%s' and " "a right operand of type '%s' (or there is no acceptable conversion)", op, left.c_str(), right.c_str()); } // // A basic type of EbtVoid is a key that the name string was seen in the source, but // it was not found as a variable in the symbol table. If so, give the error // message and insert a dummy variable in the symbol table to prevent future errors. // void TParseContext::variableCheck(TIntermTyped*& nodePtr) { TIntermSymbol* symbol = nodePtr->getAsSymbolNode(); if (! symbol) return; if (symbol->getType().getBasicType() == EbtVoid) { const char *extraInfoFormat = ""; if (spvVersion.vulkan != 0 && symbol->getName() == "gl_VertexID") { extraInfoFormat = "(Did you mean gl_VertexIndex?)"; } else if (spvVersion.vulkan != 0 && symbol->getName() == "gl_InstanceID") { extraInfoFormat = "(Did you mean gl_InstanceIndex?)"; } error(symbol->getLoc(), "undeclared identifier", symbol->getName().c_str(), extraInfoFormat); // Add to symbol table to prevent future error messages on the same name if (symbol->getName().size() > 0) { TVariable* fakeVariable = new TVariable(&symbol->getName(), TType(EbtFloat)); symbolTable.insert(*fakeVariable); // substitute a symbol node for this new variable nodePtr = intermediate.addSymbol(*fakeVariable, symbol->getLoc()); } } else { switch (symbol->getQualifier().storage) { case EvqPointCoord: profileRequires(symbol->getLoc(), ENoProfile, 120, nullptr, "gl_PointCoord"); break; default: break; // some compilers want this } } } // // Both test and if necessary, spit out an error, to see if the node is really // an l-value that can be operated on this way. // // Returns true if there was an error. // bool TParseContext::lValueErrorCheck(const TSourceLoc& loc, const char* op, TIntermTyped* node) { TIntermBinary* binaryNode = node->getAsBinaryNode(); if (binaryNode) { bool errorReturn = false; switch(binaryNode->getOp()) { case EOpIndexDirect: case EOpIndexIndirect: // ... tessellation control shader ... // If a per-vertex output variable is used as an l-value, it is a // compile-time or link-time error if the expression indicating the // vertex index is not the identifier gl_InvocationID. if (language == EShLangTessControl) { const TType& leftType = binaryNode->getLeft()->getType(); if (leftType.getQualifier().storage == EvqVaryingOut && ! leftType.getQualifier().patch && binaryNode->getLeft()->getAsSymbolNode()) { // we have a per-vertex output const TIntermSymbol* rightSymbol = binaryNode->getRight()->getAsSymbolNode(); if (! rightSymbol || rightSymbol->getQualifier().builtIn != EbvInvocationId) error(loc, "tessellation-control per-vertex output l-value must be indexed with gl_InvocationID", "[]", ""); } } break; // left node is checked by base class case EOpVectorSwizzle: errorReturn = lValueErrorCheck(loc, op, binaryNode->getLeft()); if (!errorReturn) { int offset[4] = {0,0,0,0}; TIntermTyped* rightNode = binaryNode->getRight(); TIntermAggregate *aggrNode = rightNode->getAsAggregate(); for (TIntermSequence::iterator p = aggrNode->getSequence().begin(); p != aggrNode->getSequence().end(); p++) { int value = (*p)->getAsTyped()->getAsConstantUnion()->getConstArray()[0].getIConst(); offset[value]++; if (offset[value] > 1) { error(loc, " l-value of swizzle cannot have duplicate components", op, "", ""); return true; } } } return errorReturn; default: break; } if (errorReturn) { error(loc, " l-value required", op, "", ""); return true; } } if (binaryNode && binaryNode->getOp() == EOpIndexDirectStruct && binaryNode->getLeft()->isReference()) return false; // Let the base class check errors if (TParseContextBase::lValueErrorCheck(loc, op, node)) return true; const char* symbol = nullptr; TIntermSymbol* symNode = node->getAsSymbolNode(); if (symNode != nullptr) symbol = symNode->getName().c_str(); const char* message = nullptr; switch (node->getQualifier().storage) { case EvqVaryingIn: message = "can't modify shader input"; break; case EvqInstanceId: message = "can't modify gl_InstanceID"; break; case EvqVertexId: message = "can't modify gl_VertexID"; break; case EvqFace: message = "can't modify gl_FrontFace"; break; case EvqFragCoord: message = "can't modify gl_FragCoord"; break; case EvqPointCoord: message = "can't modify gl_PointCoord"; break; case EvqFragDepth: intermediate.setDepthReplacing(); // "In addition, it is an error to statically write to gl_FragDepth in the fragment shader." if (isEsProfile() && intermediate.getEarlyFragmentTests()) message = "can't modify gl_FragDepth if using early_fragment_tests"; break; case EvqFragStencil: intermediate.setStencilReplacing(); // "In addition, it is an error to statically write to gl_FragDepth in the fragment shader." if (isEsProfile() && intermediate.getEarlyFragmentTests()) message = "can't modify EvqFragStencil if using early_fragment_tests"; break; case EvqtaskPayloadSharedEXT: if (language == EShLangMesh) message = "can't modify variable with storage qualifier taskPayloadSharedEXT in mesh shaders"; break; default: break; } if (message == nullptr && binaryNode == nullptr && symNode == nullptr) { error(loc, " l-value required", op, "", ""); return true; } // // Everything else is okay, no error. // if (message == nullptr) return false; // // If we get here, we have an error and a message. // if (symNode) error(loc, " l-value required", op, "\"%s\" (%s)", symbol, message); else error(loc, " l-value required", op, "(%s)", message); return true; } // Test for and give an error if the node can't be read from. void TParseContext::rValueErrorCheck(const TSourceLoc& loc, const char* op, TIntermTyped* node) { // Let the base class check errors TParseContextBase::rValueErrorCheck(loc, op, node); TIntermSymbol* symNode = node->getAsSymbolNode(); if (!(symNode && symNode->getQualifier().isWriteOnly())) // base class checks if (symNode && symNode->getQualifier().isExplicitInterpolation()) error(loc, "can't read from explicitly-interpolated object: ", op, symNode->getName().c_str()); // local_size_{xyz} must be assigned or specialized before gl_WorkGroupSize can be assigned. if(node->getQualifier().builtIn == EbvWorkGroupSize && !(intermediate.isLocalSizeSet() || intermediate.isLocalSizeSpecialized())) error(loc, "can't read from gl_WorkGroupSize before a fixed workgroup size has been declared", op, ""); } // // Both test, and if necessary spit out an error, to see if the node is really // a constant. // void TParseContext::constantValueCheck(TIntermTyped* node, const char* token) { if (! node->getQualifier().isConstant()) error(node->getLoc(), "constant expression required", token, ""); } // // Both test, and if necessary spit out an error, to see if the node is really // a 32-bit integer or can implicitly convert to one. // void TParseContext::integerCheck(const TIntermTyped* node, const char* token) { auto from_type = node->getBasicType(); if ((from_type == EbtInt || from_type == EbtUint || intermediate.canImplicitlyPromote(from_type, EbtInt, EOpNull) || intermediate.canImplicitlyPromote(from_type, EbtUint, EOpNull)) && node->isScalar()) return; error(node->getLoc(), "scalar integer expression required", token, ""); } // // Both test, and if necessary spit out an error, to see if we are currently // globally scoped. // void TParseContext::globalCheck(const TSourceLoc& loc, const char* token) { if (! symbolTable.atGlobalLevel()) error(loc, "not allowed in nested scope", token, ""); } // // Reserved errors for GLSL. // void TParseContext::reservedErrorCheck(const TSourceLoc& loc, const TString& identifier) { // "Identifiers starting with "gl_" are reserved for use by OpenGL, and may not be // declared in a shader; this results in a compile-time error." if (! symbolTable.atBuiltInLevel()) { if (builtInName(identifier) && !extensionTurnedOn(E_GL_EXT_spirv_intrinsics)) // The extension GL_EXT_spirv_intrinsics allows us to declare identifiers starting with "gl_". error(loc, "identifiers starting with \"gl_\" are reserved", identifier.c_str(), ""); // "__" are not supposed to be an error. ES 300 (and desktop) added the clarification: // "In addition, all identifiers containing two consecutive underscores (__) are // reserved; using such a name does not itself result in an error, but may result // in undefined behavior." // however, before that, ES tests required an error. if (identifier.find("__") != TString::npos && !extensionTurnedOn(E_GL_EXT_spirv_intrinsics)) { // The extension GL_EXT_spirv_intrinsics allows us to declare identifiers starting with "__". if (isEsProfile() && version < 300) error(loc, "identifiers containing consecutive underscores (\"__\") are reserved, and an error if version < 300", identifier.c_str(), ""); else warn(loc, "identifiers containing consecutive underscores (\"__\") are reserved", identifier.c_str(), ""); } } } // // Reserved errors for the preprocessor. // void TParseContext::reservedPpErrorCheck(const TSourceLoc& loc, const char* identifier, const char* op) { // "__" are not supposed to be an error. ES 300 (and desktop) added the clarification: // "All macro names containing two consecutive underscores ( __ ) are reserved; // defining such a name does not itself result in an error, but may result in // undefined behavior. All macro names prefixed with "GL_" ("GL" followed by a // single underscore) are also reserved, and defining such a name results in a // compile-time error." // however, before that, ES tests required an error. if (strncmp(identifier, "GL_", 3) == 0 && !extensionTurnedOn(E_GL_EXT_spirv_intrinsics)) // The extension GL_EXT_spirv_intrinsics allows us to declare macros prefixed with "GL_". ppError(loc, "names beginning with \"GL_\" can't be (un)defined:", op, identifier); else if (strncmp(identifier, "defined", 8) == 0) if (relaxedErrors()) ppWarn(loc, "\"defined\" is (un)defined:", op, identifier); else ppError(loc, "\"defined\" can't be (un)defined:", op, identifier); else if (strstr(identifier, "__") != nullptr && !extensionTurnedOn(E_GL_EXT_spirv_intrinsics)) { // The extension GL_EXT_spirv_intrinsics allows us to declare macros prefixed with "__". if (isEsProfile() && version >= 300 && (strcmp(identifier, "__LINE__") == 0 || strcmp(identifier, "__FILE__") == 0 || strcmp(identifier, "__VERSION__") == 0)) ppError(loc, "predefined names can't be (un)defined:", op, identifier); else { if (isEsProfile() && version < 300 && !relaxedErrors()) ppError(loc, "names containing consecutive underscores are reserved, and an error if version < 300:", op, identifier); else ppWarn(loc, "names containing consecutive underscores are reserved:", op, identifier); } } } // // See if this version/profile allows use of the line-continuation character '\'. // // Returns true if a line continuation should be done. // bool TParseContext::lineContinuationCheck(const TSourceLoc& loc, bool endOfComment) { const char* message = "line continuation"; bool lineContinuationAllowed = (isEsProfile() && version >= 300) || (!isEsProfile() && (version >= 420 || extensionTurnedOn(E_GL_ARB_shading_language_420pack))); if (endOfComment) { if (lineContinuationAllowed) warn(loc, "used at end of comment; the following line is still part of the comment", message, ""); else warn(loc, "used at end of comment, but this version does not provide line continuation", message, ""); return lineContinuationAllowed; } if (relaxedErrors()) { if (! lineContinuationAllowed) warn(loc, "not allowed in this version", message, ""); return true; } else { profileRequires(loc, EEsProfile, 300, nullptr, message); profileRequires(loc, ~EEsProfile, 420, E_GL_ARB_shading_language_420pack, message); } return lineContinuationAllowed; } bool TParseContext::builtInName(const TString& identifier) { return identifier.compare(0, 3, "gl_") == 0; } // // Make sure there is enough data and not too many arguments provided to the // constructor to build something of the type of the constructor. Also returns // the type of the constructor. // // Part of establishing type is establishing specialization-constness. // We don't yet know "top down" whether type is a specialization constant, // but a const constructor can becomes a specialization constant if any of // its children are, subject to KHR_vulkan_glsl rules: // // - int(), uint(), and bool() constructors for type conversions // from any of the following types to any of the following types: // * int // * uint // * bool // - vector versions of the above conversion constructors // // Returns true if there was an error in construction. // bool TParseContext::constructorError(const TSourceLoc& loc, TIntermNode* node, TFunction& function, TOperator op, TType& type) { // See if the constructor does not establish the main type, only requalifies // it, in which case the type comes from the argument instead of from the // constructor function. switch (op) { case EOpConstructNonuniform: if (node != nullptr && node->getAsTyped() != nullptr) { type.shallowCopy(node->getAsTyped()->getType()); type.getQualifier().makeTemporary(); type.getQualifier().nonUniform = true; } break; default: type.shallowCopy(function.getType()); break; } TString constructorString; if (intermediate.getEnhancedMsgs()) constructorString.append(type.getCompleteString(true, false, false, true)).append(" constructor"); else constructorString.append("constructor"); // See if it's a matrix bool constructingMatrix = false; switch (op) { case EOpConstructTextureSampler: return constructorTextureSamplerError(loc, function); case EOpConstructMat2x2: case EOpConstructMat2x3: case EOpConstructMat2x4: case EOpConstructMat3x2: case EOpConstructMat3x3: case EOpConstructMat3x4: case EOpConstructMat4x2: case EOpConstructMat4x3: case EOpConstructMat4x4: case EOpConstructDMat2x2: case EOpConstructDMat2x3: case EOpConstructDMat2x4: case EOpConstructDMat3x2: case EOpConstructDMat3x3: case EOpConstructDMat3x4: case EOpConstructDMat4x2: case EOpConstructDMat4x3: case EOpConstructDMat4x4: case EOpConstructF16Mat2x2: case EOpConstructF16Mat2x3: case EOpConstructF16Mat2x4: case EOpConstructF16Mat3x2: case EOpConstructF16Mat3x3: case EOpConstructF16Mat3x4: case EOpConstructF16Mat4x2: case EOpConstructF16Mat4x3: case EOpConstructF16Mat4x4: constructingMatrix = true; break; default: break; } // // Walk the arguments for first-pass checks and collection of information. // int size = 0; bool constType = true; bool specConstType = false; // value is only valid if constType is true bool full = false; bool overFull = false; bool matrixInMatrix = false; bool arrayArg = false; bool floatArgument = false; bool intArgument = false; for (int arg = 0; arg < function.getParamCount(); ++arg) { if (function[arg].type->isArray()) { if (function[arg].type->isUnsizedArray()) { // Can't construct from an unsized array. error(loc, "array argument must be sized", constructorString.c_str(), ""); return true; } arrayArg = true; } if (constructingMatrix && function[arg].type->isMatrix()) matrixInMatrix = true; // 'full' will go to true when enough args have been seen. If we loop // again, there is an extra argument. if (full) { // For vectors and matrices, it's okay to have too many components // available, but not okay to have unused arguments. overFull = true; } size += function[arg].type->computeNumComponents(); if (op != EOpConstructStruct && ! type.isArray() && size >= type.computeNumComponents()) full = true; if (! function[arg].type->getQualifier().isConstant()) constType = false; if (function[arg].type->getQualifier().isSpecConstant()) specConstType = true; if (function[arg].type->isFloatingDomain()) floatArgument = true; if (function[arg].type->isIntegerDomain()) intArgument = true; if (type.isStruct()) { if (function[arg].type->contains16BitFloat()) { requireFloat16Arithmetic(loc, constructorString.c_str(), "can't construct structure containing 16-bit type"); } if (function[arg].type->contains16BitInt()) { requireInt16Arithmetic(loc, constructorString.c_str(), "can't construct structure containing 16-bit type"); } if (function[arg].type->contains8BitInt()) { requireInt8Arithmetic(loc, constructorString.c_str(), "can't construct structure containing 8-bit type"); } } } if (op == EOpConstructNonuniform) constType = false; switch (op) { case EOpConstructFloat16: case EOpConstructF16Vec2: case EOpConstructF16Vec3: case EOpConstructF16Vec4: if (type.isArray()) requireFloat16Arithmetic(loc, constructorString.c_str(), "16-bit arrays not supported"); if (type.isVector() && function.getParamCount() != 1) requireFloat16Arithmetic(loc, constructorString.c_str(), "16-bit vectors only take vector types"); break; case EOpConstructUint16: case EOpConstructU16Vec2: case EOpConstructU16Vec3: case EOpConstructU16Vec4: case EOpConstructInt16: case EOpConstructI16Vec2: case EOpConstructI16Vec3: case EOpConstructI16Vec4: if (type.isArray()) requireInt16Arithmetic(loc, constructorString.c_str(), "16-bit arrays not supported"); if (type.isVector() && function.getParamCount() != 1) requireInt16Arithmetic(loc, constructorString.c_str(), "16-bit vectors only take vector types"); break; case EOpConstructUint8: case EOpConstructU8Vec2: case EOpConstructU8Vec3: case EOpConstructU8Vec4: case EOpConstructInt8: case EOpConstructI8Vec2: case EOpConstructI8Vec3: case EOpConstructI8Vec4: if (type.isArray()) requireInt8Arithmetic(loc, constructorString.c_str(), "8-bit arrays not supported"); if (type.isVector() && function.getParamCount() != 1) requireInt8Arithmetic(loc, constructorString.c_str(), "8-bit vectors only take vector types"); break; default: break; } // inherit constness from children if (constType) { bool makeSpecConst; // Finish pinning down spec-const semantics if (specConstType) { switch (op) { case EOpConstructInt8: case EOpConstructInt: case EOpConstructUint: case EOpConstructBool: case EOpConstructBVec2: case EOpConstructBVec3: case EOpConstructBVec4: case EOpConstructIVec2: case EOpConstructIVec3: case EOpConstructIVec4: case EOpConstructUVec2: case EOpConstructUVec3: case EOpConstructUVec4: case EOpConstructUint8: case EOpConstructInt16: case EOpConstructUint16: case EOpConstructInt64: case EOpConstructUint64: case EOpConstructI8Vec2: case EOpConstructI8Vec3: case EOpConstructI8Vec4: case EOpConstructU8Vec2: case EOpConstructU8Vec3: case EOpConstructU8Vec4: case EOpConstructI16Vec2: case EOpConstructI16Vec3: case EOpConstructI16Vec4: case EOpConstructU16Vec2: case EOpConstructU16Vec3: case EOpConstructU16Vec4: case EOpConstructI64Vec2: case EOpConstructI64Vec3: case EOpConstructI64Vec4: case EOpConstructU64Vec2: case EOpConstructU64Vec3: case EOpConstructU64Vec4: // This was the list of valid ones, if they aren't converting from float // and aren't making an array. makeSpecConst = ! floatArgument && ! type.isArray(); break; case EOpConstructVec2: case EOpConstructVec3: case EOpConstructVec4: // This was the list of valid ones, if they aren't converting from int // and aren't making an array. makeSpecConst = ! intArgument && !type.isArray(); break; case EOpConstructCooperativeMatrixNV: case EOpConstructCooperativeMatrixKHR: case EOpConstructStruct: { const char *specConstantCompositeExt[] = { E_GL_EXT_spec_constant_composites }; if (checkExtensionsRequested(loc, 1, specConstantCompositeExt, "spec constant aggregate constructor")) { makeSpecConst = true; } else { makeSpecConst = false; } } break; default: // anything else wasn't white-listed in the spec as a conversion makeSpecConst = false; break; } } else makeSpecConst = false; if (makeSpecConst) type.getQualifier().makeSpecConstant(); else if (specConstType) type.getQualifier().makeTemporary(); else type.getQualifier().storage = EvqConst; } if (type.isArray()) { if (function.getParamCount() == 0) { error(loc, "array constructor must have at least one argument", constructorString.c_str(), ""); return true; } if (type.isUnsizedArray()) { // auto adapt the constructor type to the number of arguments type.changeOuterArraySize(function.getParamCount()); } else if (type.getOuterArraySize() != function.getParamCount()) { error(loc, "array constructor needs one argument per array element", constructorString.c_str(), ""); return true; } if (type.isArrayOfArrays()) { // Types have to match, but we're still making the type. // Finish making the type, and the comparison is done later // when checking for conversion. TArraySizes& arraySizes = *type.getArraySizes(); // At least the dimensionalities have to match. if (! function[0].type->isArray() || arraySizes.getNumDims() != function[0].type->getArraySizes()->getNumDims() + 1) { error(loc, "array constructor argument not correct type to construct array element", constructorString.c_str(), ""); return true; } if (arraySizes.isInnerUnsized()) { // "Arrays of arrays ..., and the size for any dimension is optional" // That means we need to adopt (from the first argument) the other array sizes into the type. for (int d = 1; d < arraySizes.getNumDims(); ++d) { if (arraySizes.getDimSize(d) == UnsizedArraySize) { arraySizes.setDimSize(d, function[0].type->getArraySizes()->getDimSize(d - 1)); } } } } } if (arrayArg && op != EOpConstructStruct && ! type.isArrayOfArrays()) { error(loc, "constructing non-array constituent from array argument", constructorString.c_str(), ""); return true; } if (matrixInMatrix && ! type.isArray()) { profileRequires(loc, ENoProfile, 120, nullptr, "constructing matrix from matrix"); // "If a matrix argument is given to a matrix constructor, // it is a compile-time error to have any other arguments." if (function.getParamCount() != 1) error(loc, "matrix constructed from matrix can only have one argument", constructorString.c_str(), ""); return false; } if (overFull) { error(loc, "too many arguments", constructorString.c_str(), ""); return true; } if (op == EOpConstructStruct && ! type.isArray() && (int)type.getStruct()->size() != function.getParamCount()) { error(loc, "Number of constructor parameters does not match the number of structure fields", constructorString.c_str(), ""); return true; } if ((op != EOpConstructStruct && size != 1 && size < type.computeNumComponents()) || (op == EOpConstructStruct && size < type.computeNumComponents())) { error(loc, "not enough data provided for construction", constructorString.c_str(), ""); return true; } if (type.isCoopMat() && function.getParamCount() != 1) { error(loc, "wrong number of arguments", constructorString.c_str(), ""); return true; } if (type.isCoopMat() && !(function[0].type->isScalar() || function[0].type->isCoopMat())) { error(loc, "Cooperative matrix constructor argument must be scalar or cooperative matrix", constructorString.c_str(), ""); return true; } TIntermTyped* typed = node->getAsTyped(); if (type.isCoopMat() && typed->getType().isCoopMat() && ((extensionTurnedOn(E_GL_NV_cooperative_matrix2) && !type.sameCoopMatShape(typed->getType())) || (!extensionTurnedOn(E_GL_NV_cooperative_matrix2) && !type.sameCoopMatShapeAndUse(typed->getType())))) { error(loc, "Cooperative matrix type parameters mismatch", constructorString.c_str(), ""); return true; } if (typed == nullptr) { error(loc, "constructor argument does not have a type", constructorString.c_str(), ""); return true; } if (op != EOpConstructStruct && op != EOpConstructNonuniform && typed->getBasicType() == EbtSampler) { if (op == EOpConstructUVec2 && extensionTurnedOn(E_GL_ARB_bindless_texture)) { intermediate.setBindlessTextureMode(currentCaller, AstRefTypeFunc); } else { error(loc, "cannot convert a sampler", constructorString.c_str(), ""); return true; } } if (op != EOpConstructStruct && typed->isAtomic()) { error(loc, "cannot convert an atomic_uint", constructorString.c_str(), ""); return true; } if (typed->getBasicType() == EbtVoid) { error(loc, "cannot convert a void", constructorString.c_str(), ""); return true; } return false; } // Verify all the correct semantics for constructing a combined texture/sampler. // Return true if the semantics are incorrect. bool TParseContext::constructorTextureSamplerError(const TSourceLoc& loc, const TFunction& function) { TString constructorName = function.getType().getBasicTypeString(); // TODO: performance: should not be making copy; interface needs to change const char* token = constructorName.c_str(); // verify the constructor for bindless texture, the input must be ivec2 or uvec2 if (function.getParamCount() == 1) { TType* pType = function[0].type; TBasicType basicType = pType->getBasicType(); bool isIntegerVec2 = ((basicType == EbtUint || basicType == EbtInt) && pType->getVectorSize() == 2); bool bindlessMode = extensionTurnedOn(E_GL_ARB_bindless_texture); if (isIntegerVec2 && bindlessMode) { if (pType->getSampler().isImage()) intermediate.setBindlessImageMode(currentCaller, AstRefTypeFunc); else intermediate.setBindlessTextureMode(currentCaller, AstRefTypeFunc); return false; } else { if (!bindlessMode) error(loc, "sampler-constructor requires the extension GL_ARB_bindless_texture enabled", token, ""); else error(loc, "sampler-constructor requires the input to be ivec2 or uvec2", token, ""); return true; } } // exactly two arguments needed if (function.getParamCount() != 2) { error(loc, "sampler-constructor requires two arguments", token, ""); return true; } // For now, not allowing arrayed constructors, the rest of this function // is set up to allow them, if this test is removed: if (function.getType().isArray()) { error(loc, "sampler-constructor cannot make an array of samplers", token, ""); return true; } // first argument // * the constructor's first argument must be a texture type // * the dimensionality (1D, 2D, 3D, Cube, Rect, Buffer, MS, and Array) // of the texture type must match that of the constructed sampler type // (that is, the suffixes of the type of the first argument and the // type of the constructor will be spelled the same way) if (function[0].type->getBasicType() != EbtSampler || ! function[0].type->getSampler().isTexture() || function[0].type->isArray()) { error(loc, "sampler-constructor first argument must be a scalar *texture* type", token, ""); return true; } // simulate the first argument's impact on the result type, so it can be compared with the encapsulated operator!=() TSampler texture = function.getType().getSampler(); texture.setCombined(false); texture.shadow = false; if (function[0].type->getSampler().isTileAttachmentQCOM()) { //TSampler& texture = const_cast(function).getWritableType().getSampler(); texture.image = true; texture.tileQCOM = true; } if (texture != function[0].type->getSampler()) { error(loc, "sampler-constructor first argument must be a *texture* type" " matching the dimensionality and sampled type of the constructor", token, ""); return true; } // second argument // * the constructor's second argument must be a scalar of type // *sampler* or *samplerShadow* if ( function[1].type->getBasicType() != EbtSampler || ! function[1].type->getSampler().isPureSampler() || function[1].type->isArray()) { error(loc, "sampler-constructor second argument must be a scalar sampler or samplerShadow", token, ""); return true; } return false; } // Checks to see if a void variable has been declared and raise an error message for such a case // // returns true in case of an error // bool TParseContext::voidErrorCheck(const TSourceLoc& loc, const TString& identifier, const TBasicType basicType) { if (basicType == EbtVoid) { error(loc, "illegal use of type 'void'", identifier.c_str(), ""); return true; } return false; } // Checks to see if the node (for the expression) contains a scalar boolean expression or not void TParseContext::boolCheck(const TSourceLoc& loc, const TIntermTyped* type) { if (type->getBasicType() != EbtBool || type->isArray() || type->isMatrix() || type->isVector()) error(loc, "boolean expression expected", "", ""); } // This function checks to see if the node (for the expression) contains a scalar boolean expression or not void TParseContext::boolCheck(const TSourceLoc& loc, const TPublicType& pType) { if (pType.basicType != EbtBool || pType.arraySizes || pType.matrixCols > 1 || (pType.vectorSize > 1)) error(loc, "boolean expression expected", "", ""); } void TParseContext::samplerCheck(const TSourceLoc& loc, const TType& type, const TString& identifier, TIntermTyped* /*initializer*/) { // Check that the appropriate extension is enabled if external sampler is used. // There are two extensions. The correct one must be used based on GLSL version. if (type.getBasicType() == EbtSampler && type.getSampler().isExternal()) { if (version < 300) { requireExtensions(loc, 1, &E_GL_OES_EGL_image_external, "samplerExternalOES"); } else { requireExtensions(loc, 1, &E_GL_OES_EGL_image_external_essl3, "samplerExternalOES"); } } if (type.getSampler().isYuv()) { requireExtensions(loc, 1, &E_GL_EXT_YUV_target, "__samplerExternal2DY2YEXT"); } if (type.getQualifier().storage == EvqUniform) return; if (type.getBasicType() == EbtStruct && containsFieldWithBasicType(type, EbtSampler)) { // For bindless texture, sampler can be declared as an struct member if (extensionTurnedOn(E_GL_ARB_bindless_texture)) { if (type.getSampler().isImage()) intermediate.setBindlessImageMode(currentCaller, AstRefTypeVar); else intermediate.setBindlessTextureMode(currentCaller, AstRefTypeVar); } else { error(loc, "non-uniform struct contains a sampler or image:", type.getBasicTypeString().c_str(), identifier.c_str()); } } else if (type.getBasicType() == EbtSampler && type.getQualifier().storage != EvqUniform) { // For bindless texture, sampler can be declared as an input/output/block member if (extensionTurnedOn(E_GL_ARB_bindless_texture)) { if (type.getSampler().isImage()) intermediate.setBindlessImageMode(currentCaller, AstRefTypeVar); else intermediate.setBindlessTextureMode(currentCaller, AstRefTypeVar); } else { // non-uniform sampler // not yet: okay if it has an initializer // if (! initializer) if (type.getSampler().isAttachmentEXT() && type.getQualifier().storage != EvqTileImageEXT) error(loc, "can only be used in tileImageEXT variables or function parameters:", type.getBasicTypeString().c_str(), identifier.c_str()); else if (type.getQualifier().storage != EvqTileImageEXT) error(loc, "sampler/image types can only be used in uniform variables or function parameters:", type.getBasicTypeString().c_str(), identifier.c_str()); } } } void TParseContext::atomicUintCheck(const TSourceLoc& loc, const TType& type, const TString& identifier) { if (type.getQualifier().storage == EvqUniform) return; if (type.getBasicType() == EbtStruct && containsFieldWithBasicType(type, EbtAtomicUint)) error(loc, "non-uniform struct contains an atomic_uint:", type.getBasicTypeString().c_str(), identifier.c_str()); else if (type.getBasicType() == EbtAtomicUint && type.getQualifier().storage != EvqUniform) error(loc, "atomic_uints can only be used in uniform variables or function parameters:", type.getBasicTypeString().c_str(), identifier.c_str()); } void TParseContext::accStructCheck(const TSourceLoc& loc, const TType& type, const TString& identifier) { if (type.getQualifier().storage == EvqUniform) return; if (type.getBasicType() == EbtStruct && containsFieldWithBasicType(type, EbtAccStruct)) error(loc, "non-uniform struct contains an accelerationStructureNV:", type.getBasicTypeString().c_str(), identifier.c_str()); else if (type.getBasicType() == EbtAccStruct && type.getQualifier().storage != EvqUniform) error(loc, "accelerationStructureNV can only be used in uniform variables or function parameters:", type.getBasicTypeString().c_str(), identifier.c_str()); } void TParseContext::hitObjectNVCheck(const TSourceLoc & loc, const TType & type, const TString & identifier) { if (type.getBasicType() == EbtStruct && containsFieldWithBasicType(type, EbtHitObjectNV)) { error(loc, "struct is not allowed to contain hitObjectNV:", type.getTypeName().c_str(), identifier.c_str()); } else if (type.getBasicType() == EbtHitObjectNV) { TStorageQualifier qualifier = type.getQualifier().storage; if (qualifier != EvqGlobal && qualifier != EvqTemporary) { error(loc, "hitObjectNV can only be declared in global or function scope with no storage qualifier:", "hitObjectNV", identifier.c_str()); } } } void TParseContext::transparentOpaqueCheck(const TSourceLoc& loc, const TType& type, const TString& identifier) { if (parsingBuiltins) return; if (type.getQualifier().storage != EvqUniform) return; if (type.containsNonOpaque()) { // Vulkan doesn't allow transparent uniforms outside of blocks if (spvVersion.vulkan > 0 && !spvVersion.vulkanRelaxed) vulkanRemoved(loc, "non-opaque uniforms outside a block"); // OpenGL wants locations on these (unless they are getting automapped) if (spvVersion.openGl > 0 && !type.getQualifier().hasLocation() && !intermediate.getAutoMapLocations()) error(loc, "non-opaque uniform variables need a layout(location=L)", identifier.c_str(), ""); } } // // Qualifier checks knowing the qualifier and that it is a member of a struct/block. // void TParseContext::memberQualifierCheck(glslang::TPublicType& publicType) { globalQualifierFixCheck(publicType.loc, publicType.qualifier, true); checkNoShaderLayouts(publicType.loc, publicType.shaderQualifiers); if (publicType.qualifier.isNonUniform()) { error(publicType.loc, "not allowed on block or structure members", "nonuniformEXT", ""); publicType.qualifier.nonUniform = false; } if (publicType.qualifier.isPatch()) { error(publicType.loc, "not allowed on block or structure members", "patch", ""); } } // // Check/fix just a full qualifier (no variables or types yet, but qualifier is complete) at global level. // void TParseContext::globalQualifierFixCheck(const TSourceLoc& loc, TQualifier& qualifier, bool isMemberCheck, const TPublicType* publicType) { bool nonuniformOkay = false; // move from parameter/unknown qualifiers to pipeline in/out qualifiers switch (qualifier.storage) { case EvqIn: profileRequires(loc, ENoProfile, 130, nullptr, "in for stage inputs"); profileRequires(loc, EEsProfile, 300, nullptr, "in for stage inputs"); qualifier.storage = EvqVaryingIn; nonuniformOkay = true; break; case EvqOut: profileRequires(loc, ENoProfile, 130, nullptr, "out for stage outputs"); profileRequires(loc, EEsProfile, 300, nullptr, "out for stage outputs"); qualifier.storage = EvqVaryingOut; if (intermediate.isInvariantAll()) qualifier.invariant = true; break; case EvqInOut: qualifier.storage = EvqVaryingIn; error(loc, "cannot use 'inout' at global scope", "", ""); break; case EvqGlobal: case EvqTemporary: nonuniformOkay = true; break; case EvqUniform: // According to GLSL spec: The std430 qualifier is supported only for shader storage blocks; a shader using // the std430 qualifier on a uniform block will fail to compile. // Only check the global declaration: layout(std430) uniform; if (blockName == nullptr && qualifier.layoutPacking == ElpStd430) { requireExtensions(loc, 1, &E_GL_EXT_scalar_block_layout, "default std430 layout for uniform"); } if (publicType != nullptr && publicType->isImage() && (qualifier.layoutFormat > ElfExtSizeGuard && qualifier.layoutFormat < ElfCount)) qualifier.layoutFormat = mapLegacyLayoutFormat(qualifier.layoutFormat, publicType->sampler.getBasicType()); break; default: break; } if (!nonuniformOkay && qualifier.isNonUniform()) error(loc, "for non-parameter, can only apply to 'in' or no storage qualifier", "nonuniformEXT", ""); if (qualifier.isSpirvByReference()) error(loc, "can only apply to parameter", "spirv_by_reference", ""); if (qualifier.isSpirvLiteral()) error(loc, "can only apply to parameter", "spirv_literal", ""); // Storage qualifier isn't ready for memberQualifierCheck, we should skip invariantCheck for it. if (!isMemberCheck || structNestingLevel > 0) invariantCheck(loc, qualifier); if (qualifier.isFullQuads()) { if (qualifier.storage != EvqVaryingIn) error(loc, "can only apply to input layout", "full_quads ", ""); intermediate.setReqFullQuadsMode(); } if (qualifier.isQuadDeriv()) { if (qualifier.storage != EvqVaryingIn) error(loc, "can only apply to input layout", "quad_derivatives", ""); intermediate.setQuadDerivMode(); } } // // Check a full qualifier and type (no variable yet) at global level. // void TParseContext::globalQualifierTypeCheck(const TSourceLoc& loc, const TQualifier& qualifier, const TPublicType& publicType) { if (! symbolTable.atGlobalLevel()) return; if (!(publicType.userDef && publicType.userDef->isReference()) && !parsingBuiltins) { if (qualifier.isMemoryQualifierImageAndSSBOOnly() && ! publicType.isImage() && publicType.qualifier.storage != EvqBuffer) { error(loc, "memory qualifiers cannot be used on this type", "", ""); } else if (qualifier.isMemory() && (publicType.basicType != EbtSampler) && !publicType.qualifier.isUniformOrBuffer()) { error(loc, "memory qualifiers cannot be used on this type", "", ""); } } if (qualifier.storage == EvqBuffer && publicType.basicType != EbtBlock && !qualifier.hasBufferReference()) error(loc, "buffers can be declared only as blocks", "buffer", ""); if (qualifier.storage != EvqVaryingIn && publicType.basicType == EbtDouble && extensionTurnedOn(E_GL_ARB_vertex_attrib_64bit) && language == EShLangVertex && version < 400) { profileRequires(loc, ECoreProfile | ECompatibilityProfile, 410, E_GL_ARB_gpu_shader_fp64, "vertex-shader `double` type"); } if (qualifier.storage != EvqVaryingIn && qualifier.storage != EvqVaryingOut) return; if (publicType.shaderQualifiers.hasBlendEquation()) error(loc, "can only be applied to a standalone 'out'", "blend equation", ""); // now, knowing it is a shader in/out, do all the in/out semantic checks if (publicType.basicType == EbtBool && !parsingBuiltins) { error(loc, "cannot be bool", GetStorageQualifierString(qualifier.storage), ""); return; } if (isTypeInt(publicType.basicType) || publicType.basicType == EbtDouble) { profileRequires(loc, EEsProfile, 300, nullptr, "non-float shader input/output"); profileRequires(loc, ~EEsProfile, 130, nullptr, "non-float shader input/output"); } if (!qualifier.flat && !qualifier.isExplicitInterpolation() && !qualifier.isPervertexNV() && !qualifier.isPervertexEXT()) { if (isTypeInt(publicType.basicType) || publicType.basicType == EbtDouble || (publicType.userDef && ( publicType.userDef->containsBasicType(EbtInt) || publicType.userDef->containsBasicType(EbtUint) || publicType.userDef->contains16BitInt() || publicType.userDef->contains8BitInt() || publicType.userDef->contains64BitInt() || publicType.userDef->containsDouble()))) { if (qualifier.storage == EvqVaryingIn && language == EShLangFragment) error(loc, "must be qualified as flat", TType::getBasicString(publicType.basicType), GetStorageQualifierString(qualifier.storage)); else if (qualifier.storage == EvqVaryingOut && language == EShLangVertex && version == 300) error(loc, "must be qualified as flat", TType::getBasicString(publicType.basicType), GetStorageQualifierString(qualifier.storage)); } } if (qualifier.isPatch() && qualifier.isInterpolation()) error(loc, "cannot use interpolation qualifiers with patch", "patch", ""); // Only "patch in" is supported via GL_NV_gpu_shader5 if (! symbolTable.atBuiltInLevel() && qualifier.isPatch() && (language == EShLangGeometry) && qualifier.storage != EvqVaryingIn && extensionTurnedOn(E_GL_NV_gpu_shader5)) error(loc, "only 'patch in' is supported in this stage:", "patch", "geometry"); if (qualifier.isTaskPayload() && publicType.basicType == EbtBlock) error(loc, "taskPayloadSharedEXT variables should not be declared as interface blocks", "taskPayloadSharedEXT", ""); if (qualifier.isTaskMemory() && publicType.basicType != EbtBlock) error(loc, "taskNV variables can be declared only as blocks", "taskNV", ""); if (qualifier.storage == EvqVaryingIn) { switch (language) { case EShLangVertex: if (publicType.basicType == EbtStruct) { error(loc, "cannot be a structure", GetStorageQualifierString(qualifier.storage), ""); return; } if (publicType.arraySizes) { requireProfile(loc, ~EEsProfile, "vertex input arrays"); profileRequires(loc, ENoProfile, 150, nullptr, "vertex input arrays"); } if (publicType.basicType == EbtDouble) { const char* const float64_attrib[] = {E_GL_NV_gpu_shader5, E_GL_ARB_vertex_attrib_64bit}; const int Num_float64_attrib = sizeof(float64_attrib) / sizeof(float64_attrib[0]); profileRequires(loc, ~EEsProfile, 410, Num_float64_attrib, float64_attrib, "vertex-shader `double` type input"); } if (qualifier.isAuxiliary() || qualifier.isInterpolation() || qualifier.isMemory() || qualifier.invariant) error(loc, "vertex input cannot be further qualified", "", ""); break; case EShLangFragment: if (publicType.userDef) { profileRequires(loc, EEsProfile, 300, nullptr, "fragment-shader struct input"); profileRequires(loc, ~EEsProfile, 150, nullptr, "fragment-shader struct input"); if (publicType.userDef->containsStructure()) requireProfile(loc, ~EEsProfile, "fragment-shader struct input containing structure"); if (publicType.userDef->containsArray()) requireProfile(loc, ~EEsProfile, "fragment-shader struct input containing an array"); } break; case EShLangCompute: if (! symbolTable.atBuiltInLevel()) error(loc, "global storage input qualifier cannot be used in a compute shader", "in", ""); break; case EShLangTessControl: if (qualifier.patch) error(loc, "can only use on output in tessellation-control shader", "patch", ""); break; default: break; } } else { // qualifier.storage == EvqVaryingOut switch (language) { case EShLangVertex: if (publicType.userDef) { profileRequires(loc, EEsProfile, 300, nullptr, "vertex-shader struct output"); profileRequires(loc, ~EEsProfile, 150, nullptr, "vertex-shader struct output"); if (publicType.userDef->containsStructure()) requireProfile(loc, ~EEsProfile, "vertex-shader struct output containing structure"); if (publicType.userDef->containsArray()) requireProfile(loc, ~EEsProfile, "vertex-shader struct output containing an array"); } break; case EShLangFragment: profileRequires(loc, EEsProfile, 300, nullptr, "fragment shader output"); if (publicType.basicType == EbtStruct) { error(loc, "cannot be a structure", GetStorageQualifierString(qualifier.storage), ""); return; } if (publicType.matrixRows > 0) { error(loc, "cannot be a matrix", GetStorageQualifierString(qualifier.storage), ""); return; } if (qualifier.isAuxiliary()) error(loc, "can't use auxiliary qualifier on a fragment output", "centroid/sample/patch", ""); if (qualifier.isInterpolation()) error(loc, "can't use interpolation qualifier on a fragment output", "flat/smooth/noperspective", ""); if (publicType.basicType == EbtDouble || publicType.basicType == EbtInt64 || publicType.basicType == EbtUint64) error(loc, "cannot contain a double, int64, or uint64", GetStorageQualifierString(qualifier.storage), ""); break; case EShLangCompute: error(loc, "global storage output qualifier cannot be used in a compute shader", "out", ""); break; case EShLangTessEvaluation: if (qualifier.patch) error(loc, "can only use on input in tessellation-evaluation shader", "patch", ""); break; default: break; } } } // // Merge characteristics of the 'src' qualifier into the 'dst'. // If there is duplication, issue error messages, unless 'force' // is specified, which means to just override default settings. // // Also, when force is false, it will be assumed that 'src' follows // 'dst', for the purpose of error checking order for versions // that require specific orderings of qualifiers. // void TParseContext::mergeQualifiers(const TSourceLoc& loc, TQualifier& dst, const TQualifier& src, bool force) { // Multiple auxiliary qualifiers (mostly done later by 'individual qualifiers') if (src.isAuxiliary() && dst.isAuxiliary()) error(loc, "can only have one auxiliary qualifier (centroid, patch, and sample)", "", ""); // Multiple interpolation qualifiers (mostly done later by 'individual qualifiers') if (src.isInterpolation() && dst.isInterpolation()) error(loc, "can only have one interpolation qualifier (flat, smooth, noperspective, __explicitInterpAMD)", "", ""); // Ordering if (! force && ((!isEsProfile() && version < 420) || (isEsProfile() && version < 310)) && ! extensionTurnedOn(E_GL_ARB_shading_language_420pack)) { // non-function parameters if (src.isNoContraction() && (dst.invariant || dst.isInterpolation() || dst.isAuxiliary() || dst.storage != EvqTemporary || dst.precision != EpqNone)) error(loc, "precise qualifier must appear first", "", ""); if (src.invariant && (dst.isInterpolation() || dst.isAuxiliary() || dst.storage != EvqTemporary || dst.precision != EpqNone)) error(loc, "invariant qualifier must appear before interpolation, storage, and precision qualifiers ", "", ""); else if (src.isInterpolation() && (dst.isAuxiliary() || dst.storage != EvqTemporary || dst.precision != EpqNone)) error(loc, "interpolation qualifiers must appear before storage and precision qualifiers", "", ""); else if (src.isAuxiliary() && (dst.storage != EvqTemporary || dst.precision != EpqNone)) error(loc, "Auxiliary qualifiers (centroid, patch, and sample) must appear before storage and precision qualifiers", "", ""); else if (src.storage != EvqTemporary && (dst.precision != EpqNone)) error(loc, "precision qualifier must appear as last qualifier", "", ""); // function parameters if (src.isNoContraction() && (dst.storage == EvqConst || dst.storage == EvqIn || dst.storage == EvqOut)) error(loc, "precise qualifier must appear first", "", ""); if (src.storage == EvqConst && (dst.storage == EvqIn || dst.storage == EvqOut)) error(loc, "in/out must appear before const", "", ""); } // Storage qualification if (dst.storage == EvqTemporary || dst.storage == EvqGlobal) dst.storage = src.storage; else if ((dst.storage == EvqIn && src.storage == EvqOut) || (dst.storage == EvqOut && src.storage == EvqIn)) dst.storage = EvqInOut; else if ((dst.storage == EvqIn && src.storage == EvqConst) || (dst.storage == EvqConst && src.storage == EvqIn)) dst.storage = EvqConstReadOnly; else if (src.storage != EvqTemporary && src.storage != EvqGlobal) error(loc, "too many storage qualifiers", GetStorageQualifierString(src.storage), ""); // Precision qualifiers if (! force && src.precision != EpqNone && dst.precision != EpqNone) error(loc, "only one precision qualifier allowed", GetPrecisionQualifierString(src.precision), ""); if (dst.precision == EpqNone || (force && src.precision != EpqNone)) dst.precision = src.precision; if (!force && ((src.coherent && (dst.devicecoherent || dst.queuefamilycoherent || dst.workgroupcoherent || dst.subgroupcoherent || dst.shadercallcoherent)) || (src.devicecoherent && (dst.coherent || dst.queuefamilycoherent || dst.workgroupcoherent || dst.subgroupcoherent || dst.shadercallcoherent)) || (src.queuefamilycoherent && (dst.coherent || dst.devicecoherent || dst.workgroupcoherent || dst.subgroupcoherent || dst.shadercallcoherent)) || (src.workgroupcoherent && (dst.coherent || dst.devicecoherent || dst.queuefamilycoherent || dst.subgroupcoherent || dst.shadercallcoherent)) || (src.subgroupcoherent && (dst.coherent || dst.devicecoherent || dst.queuefamilycoherent || dst.workgroupcoherent || dst.shadercallcoherent)) || (src.shadercallcoherent && (dst.coherent || dst.devicecoherent || dst.queuefamilycoherent || dst.workgroupcoherent || dst.subgroupcoherent)))) { error(loc, "only one coherent/devicecoherent/queuefamilycoherent/workgroupcoherent/subgroupcoherent/shadercallcoherent qualifier allowed", GetPrecisionQualifierString(src.precision), ""); } // Layout qualifiers mergeObjectLayoutQualifiers(dst, src, false); // individual qualifiers bool repeated = false; #define MERGE_SINGLETON(field) repeated |= dst.field && src.field; dst.field |= src.field; MERGE_SINGLETON(invariant); MERGE_SINGLETON(centroid); MERGE_SINGLETON(smooth); MERGE_SINGLETON(flat); MERGE_SINGLETON(specConstant); MERGE_SINGLETON(noContraction); MERGE_SINGLETON(nopersp); MERGE_SINGLETON(explicitInterp); MERGE_SINGLETON(perPrimitiveNV); MERGE_SINGLETON(perViewNV); MERGE_SINGLETON(perTaskNV); MERGE_SINGLETON(patch); MERGE_SINGLETON(sample); MERGE_SINGLETON(coherent); MERGE_SINGLETON(devicecoherent); MERGE_SINGLETON(queuefamilycoherent); MERGE_SINGLETON(workgroupcoherent); MERGE_SINGLETON(subgroupcoherent); MERGE_SINGLETON(shadercallcoherent); MERGE_SINGLETON(nonprivate); MERGE_SINGLETON(volatil); MERGE_SINGLETON(nontemporal); MERGE_SINGLETON(restrict); MERGE_SINGLETON(readonly); MERGE_SINGLETON(writeonly); MERGE_SINGLETON(nonUniform); // SPIR-V storage class qualifier (GL_EXT_spirv_intrinsics) dst.spirvStorageClass = src.spirvStorageClass; // SPIR-V decorate qualifiers (GL_EXT_spirv_intrinsics) if (src.hasSpirvDecorate()) { if (dst.hasSpirvDecorate()) { const TSpirvDecorate& srcSpirvDecorate = src.getSpirvDecorate(); TSpirvDecorate& dstSpirvDecorate = dst.getSpirvDecorate(); for (auto& decorate : srcSpirvDecorate.decorates) { if (dstSpirvDecorate.decorates.find(decorate.first) != dstSpirvDecorate.decorates.end()) error(loc, "too many SPIR-V decorate qualifiers", "spirv_decorate", "(decoration=%u)", decorate.first); else dstSpirvDecorate.decorates.insert(decorate); } for (auto& decorateId : srcSpirvDecorate.decorateIds) { if (dstSpirvDecorate.decorateIds.find(decorateId.first) != dstSpirvDecorate.decorateIds.end()) error(loc, "too many SPIR-V decorate qualifiers", "spirv_decorate_id", "(decoration=%u)", decorateId.first); else dstSpirvDecorate.decorateIds.insert(decorateId); } for (auto& decorateString : srcSpirvDecorate.decorateStrings) { if (dstSpirvDecorate.decorates.find(decorateString.first) != dstSpirvDecorate.decorates.end()) error(loc, "too many SPIR-V decorate qualifiers", "spirv_decorate_string", "(decoration=%u)", decorateString.first); else dstSpirvDecorate.decorateStrings.insert(decorateString); } } else { dst.spirvDecorate = src.spirvDecorate; } } if (repeated) error(loc, "replicated qualifiers", "", ""); } void TParseContext::setDefaultPrecision(const TSourceLoc& loc, TPublicType& publicType, TPrecisionQualifier qualifier) { TBasicType basicType = publicType.basicType; if (basicType == EbtSampler) { defaultSamplerPrecision[computeSamplerTypeIndex(publicType.sampler)] = qualifier; return; // all is well } if (basicType == EbtInt || basicType == EbtFloat) { if (publicType.isScalar()) { defaultPrecision[basicType] = qualifier; if (basicType == EbtInt) { defaultPrecision[EbtUint] = qualifier; precisionManager.explicitIntDefaultSeen(); } else precisionManager.explicitFloatDefaultSeen(); return; // all is well } } if (basicType == EbtAtomicUint) { if (qualifier != EpqHigh) error(loc, "can only apply highp to atomic_uint", "precision", ""); return; } error(loc, "cannot apply precision statement to this type; use 'float', 'int' or a sampler type", TType::getBasicString(basicType), ""); } // used to flatten the sampler type space into a single dimension // correlates with the declaration of defaultSamplerPrecision[] int TParseContext::computeSamplerTypeIndex(TSampler& sampler) { int arrayIndex = sampler.arrayed ? 1 : 0; int shadowIndex = sampler.shadow ? 1 : 0; int externalIndex = sampler.isExternal() ? 1 : 0; int imageIndex = sampler.isImageClass() ? 1 : 0; int msIndex = sampler.isMultiSample() ? 1 : 0; int flattened = EsdNumDims * (EbtNumTypes * (2 * (2 * (2 * (2 * arrayIndex + msIndex) + imageIndex) + shadowIndex) + externalIndex) + sampler.type) + sampler.dim; assert(flattened < maxSamplerIndex); return flattened; } TPrecisionQualifier TParseContext::getDefaultPrecision(TPublicType& publicType) { if (publicType.basicType == EbtSampler) return defaultSamplerPrecision[computeSamplerTypeIndex(publicType.sampler)]; else return defaultPrecision[publicType.basicType]; } void TParseContext::precisionQualifierCheck(const TSourceLoc& loc, TBasicType baseType, TQualifier& qualifier, bool isCoopMatOrVec) { // Built-in symbols are allowed some ambiguous precisions, to be pinned down // later by context. if (! obeyPrecisionQualifiers() || parsingBuiltins) return; if (baseType == EbtAtomicUint && qualifier.precision != EpqNone && qualifier.precision != EpqHigh) error(loc, "atomic counters can only be highp", "atomic_uint", ""); if (isCoopMatOrVec) return; if (baseType == EbtFloat || baseType == EbtUint || baseType == EbtInt || baseType == EbtSampler || baseType == EbtAtomicUint) { if (qualifier.precision == EpqNone) { if (relaxedErrors()) warn(loc, "type requires declaration of default precision qualifier", TType::getBasicString(baseType), "substituting 'mediump'"); else error(loc, "type requires declaration of default precision qualifier", TType::getBasicString(baseType), ""); qualifier.precision = EpqMedium; defaultPrecision[baseType] = EpqMedium; } } else if (qualifier.precision != EpqNone) error(loc, "type cannot have precision qualifier", TType::getBasicString(baseType), ""); } void TParseContext::parameterTypeCheck(const TSourceLoc& loc, TStorageQualifier qualifier, const TType& type) { if ((qualifier == EvqOut || qualifier == EvqInOut) && type.isOpaque() && !intermediate.getBindlessMode()) error(loc, "samplers and atomic_uints cannot be output parameters", type.getBasicTypeString().c_str(), ""); if (!parsingBuiltins && type.contains16BitFloat()) requireFloat16Arithmetic(loc, type.getBasicTypeString().c_str(), "float16 types can only be in uniform block or buffer storage"); if (!parsingBuiltins && type.contains16BitInt()) requireInt16Arithmetic(loc, type.getBasicTypeString().c_str(), "(u)int16 types can only be in uniform block or buffer storage"); if (!parsingBuiltins && type.contains8BitInt()) requireInt8Arithmetic(loc, type.getBasicTypeString().c_str(), "(u)int8 types can only be in uniform block or buffer storage"); } bool TParseContext::containsFieldWithBasicType(const TType& type, TBasicType basicType) { if (type.getBasicType() == basicType) return true; if (type.getBasicType() == EbtStruct) { const TTypeList& structure = *type.getStruct(); for (unsigned int i = 0; i < structure.size(); ++i) { if (containsFieldWithBasicType(*structure[i].type, basicType)) return true; } } return false; } // // Do size checking for an array type's size. // void TParseContext::arraySizeCheck(const TSourceLoc& loc, TIntermTyped* expr, TArraySize& sizePair, const char* sizeType, const bool isTypeParameter) { bool isConst = false; sizePair.node = nullptr; int size = 1; TIntermConstantUnion* constant = expr->getAsConstantUnion(); if (constant) { // handle true (non-specialization) constant size = constant->getConstArray()[0].getIConst(); isConst = true; } else { // see if it's a specialization constant instead if (expr->getQualifier().isSpecConstant()) { isConst = true; sizePair.node = expr; TIntermSymbol* symbol = expr->getAsSymbolNode(); if (symbol && symbol->getConstArray().size() > 0) size = symbol->getConstArray()[0].getIConst(); } else if (expr->getAsUnaryNode() && expr->getAsUnaryNode()->getOp() == glslang::EOpArrayLength && expr->getAsUnaryNode()->getOperand()->getType().isCoopMatNV()) { isConst = true; size = 1; sizePair.node = expr->getAsUnaryNode(); } } sizePair.size = size; if (isTypeParameter) { if (extensionTurnedOn(E_GL_NV_cooperative_matrix2)) { if (! isConst || (expr->getBasicType() != EbtInt && expr->getBasicType() != EbtUint && expr->getBasicType() != EbtBool)) { error(loc, sizeType, "", "must be a constant integer or boolean expression"); return; } } else { if (! isConst || (expr->getBasicType() != EbtInt && expr->getBasicType() != EbtUint)) { error(loc, sizeType, "", "must be a constant integer expression"); return; } } if (size < 0) { error(loc, sizeType, "", "must be a non-negative integer"); return; } } else { if (! isConst || (expr->getBasicType() != EbtInt && expr->getBasicType() != EbtUint)) { error(loc, sizeType, "", "must be a constant integer expression"); return; } if (size <= 0) { error(loc, sizeType, "", "must be a positive integer"); return; } } } // // See if this qualifier can be an array. // // Returns true if there is an error. // bool TParseContext::arrayQualifierError(const TSourceLoc& loc, const TQualifier& qualifier) { if (qualifier.storage == EvqConst) { profileRequires(loc, ENoProfile, 120, E_GL_3DL_array_objects, "const array"); profileRequires(loc, EEsProfile, 300, nullptr, "const array"); } if (qualifier.storage == EvqVaryingIn && language == EShLangVertex) { requireProfile(loc, ~EEsProfile, "vertex input arrays"); profileRequires(loc, ENoProfile, 150, nullptr, "vertex input arrays"); } return false; } // // See if this qualifier and type combination can be an array. // Assumes arrayQualifierError() was also called to catch the type-invariant tests. // // Returns true if there is an error. // bool TParseContext::arrayError(const TSourceLoc& loc, const TType& type) { if (type.getQualifier().storage == EvqVaryingOut && language == EShLangVertex) { if (type.isArrayOfArrays()) requireProfile(loc, ~EEsProfile, "vertex-shader array-of-array output"); else if (type.isStruct()) requireProfile(loc, ~EEsProfile, "vertex-shader array-of-struct output"); } if (type.getQualifier().storage == EvqVaryingIn && language == EShLangFragment) { if (type.isArrayOfArrays()) requireProfile(loc, ~EEsProfile, "fragment-shader array-of-array input"); else if (type.isStruct()) requireProfile(loc, ~EEsProfile, "fragment-shader array-of-struct input"); } if (type.getQualifier().storage == EvqVaryingOut && language == EShLangFragment) { if (type.isArrayOfArrays()) requireProfile(loc, ~EEsProfile, "fragment-shader array-of-array output"); } return false; } // // Require array to be completely sized // void TParseContext::arraySizeRequiredCheck(const TSourceLoc& loc, const TArraySizes& arraySizes) { if (!parsingBuiltins && arraySizes.hasUnsized()) error(loc, "array size required", "", ""); } void TParseContext::structArrayCheck(const TSourceLoc& /*loc*/, const TType& type) { const TTypeList& structure = *type.getStruct(); for (int m = 0; m < (int)structure.size(); ++m) { const TType& member = *structure[m].type; if (member.isArray()) arraySizeRequiredCheck(structure[m].loc, *member.getArraySizes()); } } void TParseContext::arraySizesCheck(const TSourceLoc& loc, const TQualifier& qualifier, TArraySizes* arraySizes, const TIntermTyped* initializer, bool lastMember) { assert(arraySizes); // always allow special built-in ins/outs sized to topologies if (parsingBuiltins) return; // initializer must be a sized array, in which case // allow the initializer to set any unknown array sizes if (initializer != nullptr) { if (initializer->getType().isUnsizedArray()) error(loc, "array initializer must be sized", "[]", ""); return; } // No environment allows any non-outer-dimension to be implicitly sized if (arraySizes->isInnerUnsized()) { error(loc, "only outermost dimension of an array of arrays can be implicitly sized", "[]", ""); arraySizes->clearInnerUnsized(); } if (arraySizes->isInnerSpecialization() && (qualifier.storage != EvqTemporary && qualifier.storage != EvqGlobal && qualifier.storage != EvqShared && qualifier.storage != EvqConst)) error(loc, "only outermost dimension of an array of arrays can be a specialization constant", "[]", ""); // desktop always allows outer-dimension-unsized variable arrays, if (!isEsProfile()) return; // for ES, if size isn't coming from an initializer, it has to be explicitly declared now, // with very few exceptions // implicitly-sized io exceptions: switch (language) { case EShLangGeometry: if (qualifier.storage == EvqVaryingIn) if ((isEsProfile() && version >= 320) || extensionsTurnedOn(Num_AEP_geometry_shader, AEP_geometry_shader)) return; break; case EShLangTessControl: if ( qualifier.storage == EvqVaryingIn || (qualifier.storage == EvqVaryingOut && ! qualifier.isPatch())) if ((isEsProfile() && version >= 320) || extensionsTurnedOn(Num_AEP_tessellation_shader, AEP_tessellation_shader)) return; break; case EShLangTessEvaluation: if ((qualifier.storage == EvqVaryingIn && ! qualifier.isPatch()) || qualifier.storage == EvqVaryingOut) if ((isEsProfile() && version >= 320) || extensionsTurnedOn(Num_AEP_tessellation_shader, AEP_tessellation_shader)) return; break; case EShLangMesh: if (qualifier.storage == EvqVaryingOut) if ((isEsProfile() && version >= 320) || extensionsTurnedOn(Num_AEP_mesh_shader, AEP_mesh_shader)) return; break; default: break; } // last member of ssbo block exception: if (qualifier.storage == EvqBuffer && lastMember) return; arraySizeRequiredCheck(loc, *arraySizes); } void TParseContext::arrayOfArrayVersionCheck(const TSourceLoc& loc, const TArraySizes* sizes) { if (sizes == nullptr || sizes->getNumDims() == 1) return; const char* feature = "arrays of arrays"; requireProfile(loc, EEsProfile | ECoreProfile | ECompatibilityProfile, feature); profileRequires(loc, EEsProfile, 310, nullptr, feature); profileRequires(loc, ECoreProfile | ECompatibilityProfile, 430, nullptr, feature); } // // Do all the semantic checking for declaring or redeclaring an array, with and // without a size, and make the right changes to the symbol table. // void TParseContext::declareArray(const TSourceLoc& loc, const TString& identifier, const TType& type, TSymbol*& symbol) { if (symbol == nullptr) { bool currentScope; symbol = symbolTable.find(identifier, nullptr, ¤tScope); if (symbol && builtInName(identifier) && ! symbolTable.atBuiltInLevel()) { // bad shader (errors already reported) trying to redeclare a built-in name as an array symbol = nullptr; return; } if (symbol == nullptr || ! currentScope) { // // Successfully process a new definition. // (Redeclarations have to take place at the same scope; otherwise they are hiding declarations) // symbol = new TVariable(&identifier, type); symbolTable.insert(*symbol); if (symbolTable.atGlobalLevel()) trackLinkage(*symbol); if (! symbolTable.atBuiltInLevel()) { if (isIoResizeArray(type)) { ioArraySymbolResizeList.push_back(symbol); checkIoArraysConsistency(loc, true); } else fixIoArraySize(loc, symbol->getWritableType()); } return; } if (symbol->getAsAnonMember()) { error(loc, "cannot redeclare a user-block member array", identifier.c_str(), ""); symbol = nullptr; return; } } // // Process a redeclaration. // if (symbol == nullptr) { error(loc, "array variable name expected", identifier.c_str(), ""); return; } // redeclareBuiltinVariable() should have already done the copyUp() TType& existingType = symbol->getWritableType(); if (! existingType.isArray()) { error(loc, "redeclaring non-array as array", identifier.c_str(), ""); return; } if (! existingType.sameElementType(type)) { error(loc, "redeclaration of array with a different element type", identifier.c_str(), ""); return; } if (! existingType.sameInnerArrayness(type)) { error(loc, "redeclaration of array with a different array dimensions or sizes", identifier.c_str(), ""); return; } if (existingType.isSizedArray()) { // be more leniant for input arrays to geometry shaders and tessellation control outputs, where the redeclaration is the same size if (! (isIoResizeArray(type) && existingType.getOuterArraySize() == type.getOuterArraySize())) error(loc, "redeclaration of array with size", identifier.c_str(), ""); return; } arrayLimitCheck(loc, identifier, type.getOuterArraySize()); existingType.updateArraySizes(type); if (isIoResizeArray(type)) checkIoArraysConsistency(loc); } // Policy and error check for needing a runtime sized array. void TParseContext::checkRuntimeSizable(const TSourceLoc& loc, const TIntermTyped& base) { // runtime length implies runtime sizeable, so no problem if (isRuntimeLength(base)) return; if (base.getType().getQualifier().builtIn == EbvSampleMask) return; // Check for last member of a bufferreference type, which is runtime sizeable // but doesn't support runtime length if (base.getType().getQualifier().storage == EvqBuffer) { const TIntermBinary* binary = base.getAsBinaryNode(); if (binary != nullptr && binary->getOp() == EOpIndexDirectStruct && binary->getLeft()->isReference()) { const int index = binary->getRight()->getAsConstantUnion()->getConstArray()[0].getIConst(); const int memberCount = (int)binary->getLeft()->getType().getReferentType()->getStruct()->size(); if (index == memberCount - 1) return; } } // check for additional things allowed by GL_EXT_nonuniform_qualifier if (base.getBasicType() == EbtSampler || base.getBasicType() == EbtAccStruct || base.getBasicType() == EbtRayQuery || base.getBasicType() == EbtHitObjectNV || (base.getBasicType() == EbtBlock && base.getType().getQualifier().isUniformOrBuffer())) requireExtensions(loc, 1, &E_GL_EXT_nonuniform_qualifier, "variable index"); else error(loc, "", "[", "array must be redeclared with a size before being indexed with a variable"); } // Policy decision for whether a run-time .length() is allowed. bool TParseContext::isRuntimeLength(const TIntermTyped& base) const { if (base.getType().getQualifier().storage == EvqBuffer) { // in a buffer block const TIntermBinary* binary = base.getAsBinaryNode(); if (binary != nullptr && binary->getOp() == EOpIndexDirectStruct) { // is it the last member? const int index = binary->getRight()->getAsConstantUnion()->getConstArray()[0].getIConst(); if (binary->getLeft()->isReference()) return false; const int memberCount = (int)binary->getLeft()->getType().getStruct()->size(); if (index == memberCount - 1) return true; } } return false; } // Check if mesh perviewNV attributes have a view dimension // and resize it to gl_MaxMeshViewCountNV when implicitly sized. void TParseContext::checkAndResizeMeshViewDim(const TSourceLoc& loc, TType& type, bool isBlockMember) { // see if member is a per-view attribute if (!type.getQualifier().isPerView()) return; if ((isBlockMember && type.isArray()) || (!isBlockMember && type.isArrayOfArrays())) { // since we don't have the maxMeshViewCountNV set during parsing builtins, we hardcode the value. int maxViewCount = parsingBuiltins ? 4 : resources.maxMeshViewCountNV; // For block members, outermost array dimension is the view dimension. // For non-block members, outermost array dimension is the vertex/primitive dimension // and 2nd outermost is the view dimension. int viewDim = isBlockMember ? 0 : 1; int viewDimSize = type.getArraySizes()->getDimSize(viewDim); if (viewDimSize != UnsizedArraySize && viewDimSize != maxViewCount) error(loc, "mesh view output array size must be gl_MaxMeshViewCountNV or implicitly sized", "[]", ""); else if (viewDimSize == UnsizedArraySize) type.getArraySizes()->setDimSize(viewDim, maxViewCount); } else { error(loc, "requires a view array dimension", "perviewNV", ""); } } // Returns true if the first argument to the #line directive is the line number for the next line. // // Desktop, pre-version 3.30: "After processing this directive // (including its new-line), the implementation will behave as if it is compiling at line number line+1 and // source string number source-string-number." // // Desktop, version 3.30 and later, and ES: "After processing this directive // (including its new-line), the implementation will behave as if it is compiling at line number line and // source string number source-string-number. bool TParseContext::lineDirectiveShouldSetNextLine() const { return isEsProfile() || version >= 330; } // // Enforce non-initializer type/qualifier rules. // void TParseContext::nonInitConstCheck(const TSourceLoc& loc, TString& identifier, TType& type) { // // Make the qualifier make sense, given that there is not an initializer. // if (type.getQualifier().storage == EvqConst || type.getQualifier().storage == EvqConstReadOnly) { type.getQualifier().makeTemporary(); error(loc, "variables with qualifier 'const' must be initialized", identifier.c_str(), ""); } } // // See if the identifier is a built-in symbol that can be redeclared, and if so, // copy the symbol table's read-only built-in variable to the current // global level, where it can be modified based on the passed in type. // // Returns nullptr if no redeclaration took place; meaning a normal declaration still // needs to occur for it, not necessarily an error. // // Returns a redeclared and type-modified variable if a redeclarated occurred. // TSymbol* TParseContext::redeclareBuiltinVariable(const TSourceLoc& loc, const TString& identifier, const TQualifier& qualifier, const TShaderQualifiers& publicType) { if (! builtInName(identifier) || symbolTable.atBuiltInLevel() || ! symbolTable.atGlobalLevel()) return nullptr; bool nonEsRedecls = (!isEsProfile() && (version >= 130 || identifier == "gl_TexCoord")); bool esRedecls = (isEsProfile() && (version >= 320 || extensionsTurnedOn(Num_AEP_shader_io_blocks, AEP_shader_io_blocks))); if (! esRedecls && ! nonEsRedecls) return nullptr; // Special case when using GL_ARB_separate_shader_objects bool ssoPre150 = false; // means the only reason this variable is redeclared is due to this combination if (!isEsProfile() && version <= 140 && extensionTurnedOn(E_GL_ARB_separate_shader_objects)) { if (identifier == "gl_Position" || identifier == "gl_PointSize" || identifier == "gl_ClipVertex" || identifier == "gl_FogFragCoord") ssoPre150 = true; } // Potentially redeclaring a built-in variable... if (ssoPre150 || (identifier == "gl_FragDepth" && ((nonEsRedecls && version >= 420) || esRedecls)) || (identifier == "gl_FragCoord" && ((nonEsRedecls && version >= 140) || esRedecls)) || identifier == "gl_ClipDistance" || identifier == "gl_CullDistance" || identifier == "gl_ShadingRateEXT" || identifier == "gl_PrimitiveShadingRateEXT" || identifier == "gl_FrontColor" || identifier == "gl_BackColor" || identifier == "gl_FrontSecondaryColor" || identifier == "gl_BackSecondaryColor" || identifier == "gl_SecondaryColor" || (identifier == "gl_Color" && language == EShLangFragment) || (identifier == "gl_FragStencilRefARB" && (nonEsRedecls && version >= 140) && language == EShLangFragment) || identifier == "gl_SampleMask" || identifier == "gl_Layer" || identifier == "gl_PrimitiveIndicesNV" || identifier == "gl_PrimitivePointIndicesEXT" || identifier == "gl_PrimitiveLineIndicesEXT" || identifier == "gl_PrimitiveTriangleIndicesEXT" || identifier == "gl_TexCoord") { // Find the existing symbol, if any. bool builtIn; TSymbol* symbol = symbolTable.find(identifier, &builtIn); // If the symbol was not found, this must be a version/profile/stage // that doesn't have it. if (! symbol) return nullptr; // If it wasn't at a built-in level, then it's already been redeclared; // that is, this is a redeclaration of a redeclaration; reuse that initial // redeclaration. Otherwise, make the new one. if (builtIn) { makeEditable(symbol); symbolTable.amendSymbolIdLevel(*symbol); } // Now, modify the type of the copy, as per the type of the current redeclaration. TQualifier& symbolQualifier = symbol->getWritableType().getQualifier(); if (ssoPre150) { if (intermediate.inIoAccessed(identifier)) error(loc, "cannot redeclare after use", identifier.c_str(), ""); if (qualifier.hasLayout()) error(loc, "cannot apply layout qualifier to", "redeclaration", symbol->getName().c_str()); if (qualifier.isMemory() || qualifier.isAuxiliary() || (language == EShLangVertex && qualifier.storage != EvqVaryingOut) || (language == EShLangFragment && qualifier.storage != EvqVaryingIn)) error(loc, "cannot change storage, memory, or auxiliary qualification of", "redeclaration", symbol->getName().c_str()); if (! qualifier.smooth) error(loc, "cannot change interpolation qualification of", "redeclaration", symbol->getName().c_str()); } else if (identifier == "gl_FrontColor" || identifier == "gl_BackColor" || identifier == "gl_FrontSecondaryColor" || identifier == "gl_BackSecondaryColor" || identifier == "gl_SecondaryColor" || identifier == "gl_Color") { symbolQualifier.flat = qualifier.flat; symbolQualifier.smooth = qualifier.smooth; symbolQualifier.nopersp = qualifier.nopersp; if (qualifier.hasLayout()) error(loc, "cannot apply layout qualifier to", "redeclaration", symbol->getName().c_str()); if (qualifier.isMemory() || qualifier.isAuxiliary() || symbol->getType().getQualifier().storage != qualifier.storage) error(loc, "cannot change storage, memory, or auxiliary qualification of", "redeclaration", symbol->getName().c_str()); } else if (identifier == "gl_TexCoord" || identifier == "gl_ClipDistance" || identifier == "gl_CullDistance") { if (qualifier.hasLayout() || qualifier.isMemory() || qualifier.isAuxiliary() || qualifier.nopersp != symbolQualifier.nopersp || qualifier.flat != symbolQualifier.flat || symbolQualifier.storage != qualifier.storage) error(loc, "cannot change qualification of", "redeclaration", symbol->getName().c_str()); } else if (identifier == "gl_FragCoord") { if (!intermediate.getTexCoordRedeclared() && intermediate.inIoAccessed("gl_FragCoord")) error(loc, "cannot redeclare after use", "gl_FragCoord", ""); if (qualifier.nopersp != symbolQualifier.nopersp || qualifier.flat != symbolQualifier.flat || qualifier.isMemory() || qualifier.isAuxiliary()) error(loc, "can only change layout qualification of", "redeclaration", symbol->getName().c_str()); if (qualifier.storage != EvqVaryingIn) error(loc, "cannot change input storage qualification of", "redeclaration", symbol->getName().c_str()); if (! builtIn && (publicType.pixelCenterInteger != intermediate.getPixelCenterInteger() || publicType.originUpperLeft != intermediate.getOriginUpperLeft())) error(loc, "cannot redeclare with different qualification:", "redeclaration", symbol->getName().c_str()); intermediate.setTexCoordRedeclared(); if (publicType.pixelCenterInteger) intermediate.setPixelCenterInteger(); if (publicType.originUpperLeft) intermediate.setOriginUpperLeft(); } else if (identifier == "gl_FragDepth") { if (qualifier.nopersp != symbolQualifier.nopersp || qualifier.flat != symbolQualifier.flat || qualifier.isMemory() || qualifier.isAuxiliary()) error(loc, "can only change layout qualification of", "redeclaration", symbol->getName().c_str()); if (qualifier.storage != EvqVaryingOut) error(loc, "cannot change output storage qualification of", "redeclaration", symbol->getName().c_str()); if (publicType.layoutDepth != EldNone) { if (intermediate.inIoAccessed("gl_FragDepth")) error(loc, "cannot redeclare after use", "gl_FragDepth", ""); if (! intermediate.setDepth(publicType.layoutDepth)) error(loc, "all redeclarations must use the same depth layout on", "redeclaration", symbol->getName().c_str()); } } else if (identifier == "gl_FragStencilRefARB") { if (qualifier.nopersp != symbolQualifier.nopersp || qualifier.flat != symbolQualifier.flat || qualifier.isMemory() || qualifier.isAuxiliary()) error(loc, "can only change layout qualification of", "redeclaration", symbol->getName().c_str()); if (qualifier.storage != EvqVaryingOut) error(loc, "cannot change output storage qualification of", "redeclaration", symbol->getName().c_str()); if (publicType.layoutStencil != ElsNone) { if (intermediate.inIoAccessed("gl_FragStencilRefARB")) error(loc, "cannot redeclare after use", "gl_FragStencilRefARB", ""); if (!intermediate.setStencil(publicType.layoutStencil)) error(loc, "all redeclarations must use the same stencil layout on", "redeclaration", symbol->getName().c_str()); } } else if ( identifier == "gl_PrimitiveIndicesNV") { if (qualifier.hasLayout()) error(loc, "cannot apply layout qualifier to", "redeclaration", symbol->getName().c_str()); if (qualifier.storage != EvqVaryingOut) error(loc, "cannot change output storage qualification of", "redeclaration", symbol->getName().c_str()); } else if (identifier == "gl_SampleMask") { if (!publicType.layoutOverrideCoverage) { error(loc, "redeclaration only allowed for override_coverage layout", "redeclaration", symbol->getName().c_str()); } intermediate.setLayoutOverrideCoverage(); } else if (identifier == "gl_Layer") { if (!qualifier.layoutViewportRelative && qualifier.layoutSecondaryViewportRelativeOffset == -2048) error(loc, "redeclaration only allowed for viewport_relative or secondary_view_offset layout", "redeclaration", symbol->getName().c_str()); symbolQualifier.layoutViewportRelative = qualifier.layoutViewportRelative; symbolQualifier.layoutSecondaryViewportRelativeOffset = qualifier.layoutSecondaryViewportRelativeOffset; } // TODO: semantics quality: separate smooth from nothing declared, then use IsInterpolation for several tests above return symbol; } return nullptr; } // // Either redeclare the requested block, or give an error message why it can't be done. // // TODO: functionality: explicitly sizing members of redeclared blocks is not giving them an explicit size void TParseContext::redeclareBuiltinBlock(const TSourceLoc& loc, TTypeList& newTypeList, const TString& blockName, const TString* instanceName, TArraySizes* arraySizes) { const char* feature = "built-in block redeclaration"; profileRequires(loc, EEsProfile, 320, Num_AEP_shader_io_blocks, AEP_shader_io_blocks, feature); profileRequires(loc, ~EEsProfile, 410, E_GL_ARB_separate_shader_objects, feature); if (blockName != "gl_PerVertex" && blockName != "gl_PerFragment" && blockName != "gl_MeshPerVertexNV" && blockName != "gl_MeshPerPrimitiveNV" && blockName != "gl_MeshPerVertexEXT" && blockName != "gl_MeshPerPrimitiveEXT") { error(loc, "cannot redeclare block: ", "block declaration", blockName.c_str()); return; } // Redeclaring a built-in block... if (instanceName && ! builtInName(*instanceName)) { error(loc, "cannot redeclare a built-in block with a user name", instanceName->c_str(), ""); return; } // Blocks with instance names are easy to find, lookup the instance name, // Anonymous blocks need to be found via a member. bool builtIn; TSymbol* block; if (instanceName) block = symbolTable.find(*instanceName, &builtIn); else block = symbolTable.find(newTypeList.front().type->getFieldName(), &builtIn); // If the block was not found, this must be a version/profile/stage // that doesn't have it, or the instance name is wrong. const char* errorName = instanceName ? instanceName->c_str() : newTypeList.front().type->getFieldName().c_str(); if (! block) { error(loc, "no declaration found for redeclaration", errorName, ""); return; } // Built-in blocks cannot be redeclared more than once, which if happened, // we'd be finding the already redeclared one here, rather than the built in. if (! builtIn) { error(loc, "can only redeclare a built-in block once, and before any use", blockName.c_str(), ""); return; } // Copy the block to make a writable version, to insert into the block table after editing. block = symbolTable.copyUpDeferredInsert(block); if (block->getType().getBasicType() != EbtBlock) { error(loc, "cannot redeclare a non block as a block", errorName, ""); return; } // Fix XFB stuff up, it applies to the order of the redeclaration, not // the order of the original members. if (currentBlockQualifier.storage == EvqVaryingOut && globalOutputDefaults.hasXfbBuffer()) { if (!currentBlockQualifier.hasXfbBuffer()) currentBlockQualifier.layoutXfbBuffer = globalOutputDefaults.layoutXfbBuffer; if (!currentBlockQualifier.hasStream()) currentBlockQualifier.layoutStream = globalOutputDefaults.layoutStream; fixXfbOffsets(currentBlockQualifier, newTypeList); } // Edit and error check the container against the redeclaration // - remove unused members // - ensure remaining qualifiers/types match TType& type = block->getWritableType(); // if gl_PerVertex is redeclared for the purpose of passing through "gl_Position" // for passthrough purpose, the redeclared block should have the same qualifers as // the current one if (currentBlockQualifier.layoutPassthrough) { type.getQualifier().layoutPassthrough = currentBlockQualifier.layoutPassthrough; type.getQualifier().storage = currentBlockQualifier.storage; type.getQualifier().layoutStream = currentBlockQualifier.layoutStream; type.getQualifier().layoutXfbBuffer = currentBlockQualifier.layoutXfbBuffer; } TTypeList::iterator member = type.getWritableStruct()->begin(); size_t numOriginalMembersFound = 0; while (member != type.getStruct()->end()) { // look for match bool found = false; TTypeList::const_iterator newMember; TSourceLoc memberLoc; memberLoc.init(); for (newMember = newTypeList.begin(); newMember != newTypeList.end(); ++newMember) { if (member->type->getFieldName() == newMember->type->getFieldName()) { found = true; memberLoc = newMember->loc; break; } } if (found) { ++numOriginalMembersFound; // - ensure match between redeclared members' types // - check for things that can't be changed // - update things that can be changed TType& oldType = *member->type; const TType& newType = *newMember->type; if (! newType.sameElementType(oldType)) error(memberLoc, "cannot redeclare block member with a different type", member->type->getFieldName().c_str(), ""); if (oldType.isArray() != newType.isArray()) error(memberLoc, "cannot change arrayness of redeclared block member", member->type->getFieldName().c_str(), ""); else if (! oldType.getQualifier().isPerView() && ! oldType.sameArrayness(newType) && oldType.isSizedArray()) error(memberLoc, "cannot change array size of redeclared block member", member->type->getFieldName().c_str(), ""); else if (! oldType.getQualifier().isPerView() && newType.isArray()) arrayLimitCheck(loc, member->type->getFieldName(), newType.getOuterArraySize()); if (oldType.getQualifier().isPerView() && ! newType.getQualifier().isPerView()) error(memberLoc, "missing perviewNV qualifier to redeclared block member", member->type->getFieldName().c_str(), ""); else if (! oldType.getQualifier().isPerView() && newType.getQualifier().isPerView()) error(memberLoc, "cannot add perviewNV qualifier to redeclared block member", member->type->getFieldName().c_str(), ""); else if (newType.getQualifier().isPerView()) { if (oldType.getArraySizes()->getNumDims() != newType.getArraySizes()->getNumDims()) error(memberLoc, "cannot change arrayness of redeclared block member", member->type->getFieldName().c_str(), ""); else if (! newType.isUnsizedArray() && newType.getOuterArraySize() != resources.maxMeshViewCountNV) error(loc, "mesh view output array size must be gl_MaxMeshViewCountNV or implicitly sized", "[]", ""); else if (newType.getArraySizes()->getNumDims() == 2) { int innerDimSize = newType.getArraySizes()->getDimSize(1); arrayLimitCheck(memberLoc, member->type->getFieldName(), innerDimSize); oldType.getArraySizes()->setDimSize(1, innerDimSize); } } if (oldType.getQualifier().isPerPrimitive() && ! newType.getQualifier().isPerPrimitive()) error(memberLoc, "missing perprimitiveNV qualifier to redeclared block member", member->type->getFieldName().c_str(), ""); else if (! oldType.getQualifier().isPerPrimitive() && newType.getQualifier().isPerPrimitive()) error(memberLoc, "cannot add perprimitiveNV qualifier to redeclared block member", member->type->getFieldName().c_str(), ""); if (newType.getQualifier().isMemory()) error(memberLoc, "cannot add memory qualifier to redeclared block member", member->type->getFieldName().c_str(), ""); if (newType.getQualifier().hasNonXfbLayout()) error(memberLoc, "cannot add non-XFB layout to redeclared block member", member->type->getFieldName().c_str(), ""); if (newType.getQualifier().patch) error(memberLoc, "cannot add patch to redeclared block member", member->type->getFieldName().c_str(), ""); if (newType.getQualifier().hasXfbBuffer() && newType.getQualifier().layoutXfbBuffer != currentBlockQualifier.layoutXfbBuffer) error(memberLoc, "member cannot contradict block (or what block inherited from global)", "xfb_buffer", ""); if (newType.getQualifier().hasStream() && newType.getQualifier().layoutStream != currentBlockQualifier.layoutStream) error(memberLoc, "member cannot contradict block (or what block inherited from global)", "xfb_stream", ""); oldType.getQualifier().centroid = newType.getQualifier().centroid; oldType.getQualifier().sample = newType.getQualifier().sample; oldType.getQualifier().invariant = newType.getQualifier().invariant; oldType.getQualifier().noContraction = newType.getQualifier().noContraction; oldType.getQualifier().smooth = newType.getQualifier().smooth; oldType.getQualifier().flat = newType.getQualifier().flat; oldType.getQualifier().nopersp = newType.getQualifier().nopersp; oldType.getQualifier().layoutXfbOffset = newType.getQualifier().layoutXfbOffset; oldType.getQualifier().layoutXfbBuffer = newType.getQualifier().layoutXfbBuffer; oldType.getQualifier().layoutXfbStride = newType.getQualifier().layoutXfbStride; if (oldType.getQualifier().layoutXfbOffset != TQualifier::layoutXfbBufferEnd) { // If any member has an xfb_offset, then the block's xfb_buffer inherents current xfb_buffer, // and for xfb processing, the member needs it as well, along with xfb_stride. type.getQualifier().layoutXfbBuffer = currentBlockQualifier.layoutXfbBuffer; oldType.getQualifier().layoutXfbBuffer = currentBlockQualifier.layoutXfbBuffer; } if (oldType.isUnsizedArray() && newType.isSizedArray()) oldType.changeOuterArraySize(newType.getOuterArraySize()); // check and process the member's type, which will include managing xfb information layoutTypeCheck(loc, oldType); // go to next member ++member; } else { // For missing members of anonymous blocks that have been redeclared, // hide the original (shared) declaration. // Instance-named blocks can just have the member removed. if (instanceName) member = type.getWritableStruct()->erase(member); else { member->type->hideMember(); ++member; } } } if (spvVersion.vulkan > 0) { // ...then streams apply to built-in blocks, instead of them being only on stream 0 type.getQualifier().layoutStream = currentBlockQualifier.layoutStream; } if (numOriginalMembersFound < newTypeList.size()) error(loc, "block redeclaration has extra members", blockName.c_str(), ""); if (type.isArray() != (arraySizes != nullptr) || (type.isArray() && arraySizes != nullptr && type.getArraySizes()->getNumDims() != arraySizes->getNumDims())) error(loc, "cannot change arrayness of redeclared block", blockName.c_str(), ""); else if (type.isArray()) { // At this point, we know both are arrays and both have the same number of dimensions. // It is okay for a built-in block redeclaration to be unsized, and keep the size of the // original block declaration. if (!arraySizes->isSized() && type.isSizedArray()) arraySizes->changeOuterSize(type.getOuterArraySize()); // And, okay to be giving a size to the array, by the redeclaration if (!type.isSizedArray() && arraySizes->isSized()) type.changeOuterArraySize(arraySizes->getOuterSize()); // Now, they must match in all dimensions. if (type.isSizedArray() && *type.getArraySizes() != *arraySizes) error(loc, "cannot change array size of redeclared block", blockName.c_str(), ""); } symbolTable.insert(*block); // Check for general layout qualifier errors layoutObjectCheck(loc, *block); // Tracking for implicit sizing of array if (isIoResizeArray(block->getType())) { ioArraySymbolResizeList.push_back(block); checkIoArraysConsistency(loc, true); } else if (block->getType().isArray()) fixIoArraySize(loc, block->getWritableType()); // Save it in the AST for linker use. trackLinkage(*block); } void TParseContext::paramCheckFixStorage(const TSourceLoc& loc, const TStorageQualifier& qualifier, TType& type) { switch (qualifier) { case EvqConst: case EvqConstReadOnly: type.getQualifier().storage = EvqConstReadOnly; break; case EvqIn: case EvqOut: case EvqInOut: case EvqTileImageEXT: type.getQualifier().storage = qualifier; break; case EvqGlobal: case EvqTemporary: type.getQualifier().storage = EvqIn; break; default: type.getQualifier().storage = EvqIn; error(loc, "storage qualifier not allowed on function parameter", GetStorageQualifierString(qualifier), ""); break; } } void TParseContext::paramCheckFix(const TSourceLoc& loc, const TQualifier& qualifier, TType& type) { if (qualifier.isMemory()) { type.getQualifier().volatil = qualifier.volatil; type.getQualifier().nontemporal = qualifier.nontemporal; type.getQualifier().coherent = qualifier.coherent; type.getQualifier().devicecoherent = qualifier.devicecoherent ; type.getQualifier().queuefamilycoherent = qualifier.queuefamilycoherent; type.getQualifier().workgroupcoherent = qualifier.workgroupcoherent; type.getQualifier().subgroupcoherent = qualifier.subgroupcoherent; type.getQualifier().shadercallcoherent = qualifier.shadercallcoherent; type.getQualifier().nonprivate = qualifier.nonprivate; type.getQualifier().readonly = qualifier.readonly; type.getQualifier().writeonly = qualifier.writeonly; type.getQualifier().restrict = qualifier.restrict; } if (qualifier.isAuxiliary() || qualifier.isInterpolation()) error(loc, "cannot use auxiliary or interpolation qualifiers on a function parameter", "", ""); if (qualifier.hasLayout()) error(loc, "cannot use layout qualifiers on a function parameter", "", ""); if (qualifier.invariant) error(loc, "cannot use invariant qualifier on a function parameter", "", ""); if (qualifier.isNoContraction()) { if (qualifier.isParamOutput()) type.getQualifier().setNoContraction(); else warn(loc, "qualifier has no effect on non-output parameters", "precise", ""); } if (qualifier.isNonUniform()) type.getQualifier().nonUniform = qualifier.nonUniform; if (qualifier.isSpirvByReference()) type.getQualifier().setSpirvByReference(); if (qualifier.isSpirvLiteral()) { if (type.getBasicType() == EbtFloat || type.getBasicType() == EbtInt || type.getBasicType() == EbtUint || type.getBasicType() == EbtBool) type.getQualifier().setSpirvLiteral(); else error(loc, "cannot use spirv_literal qualifier", type.getBasicTypeString().c_str(), ""); } paramCheckFixStorage(loc, qualifier.storage, type); } void TParseContext::nestedBlockCheck(const TSourceLoc& loc) { if (structNestingLevel > 0 || blockNestingLevel > 0) error(loc, "cannot nest a block definition inside a structure or block", "", ""); ++blockNestingLevel; } void TParseContext::nestedStructCheck(const TSourceLoc& loc) { if (structNestingLevel > 0 || blockNestingLevel > 0) error(loc, "cannot nest a structure definition inside a structure or block", "", ""); ++structNestingLevel; } void TParseContext::arrayObjectCheck(const TSourceLoc& loc, const TType& type, const char* op) { // Some versions don't allow comparing arrays or structures containing arrays if (type.containsArray()) { profileRequires(loc, ENoProfile, 120, E_GL_3DL_array_objects, op); profileRequires(loc, EEsProfile, 300, nullptr, op); } } void TParseContext::opaqueCheck(const TSourceLoc& loc, const TType& type, const char* op) { if (containsFieldWithBasicType(type, EbtSampler) && !extensionTurnedOn(E_GL_ARB_bindless_texture)) error(loc, "can't use with samplers or structs containing samplers", op, ""); } void TParseContext::referenceCheck(const TSourceLoc& loc, const TType& type, const char* op) { if (containsFieldWithBasicType(type, EbtReference)) error(loc, "can't use with reference types", op, ""); } void TParseContext::storage16BitAssignmentCheck(const TSourceLoc& loc, const TType& type, const char* op) { if (type.getBasicType() == EbtStruct && containsFieldWithBasicType(type, EbtFloat16)) requireFloat16Arithmetic(loc, op, "can't use with structs containing float16"); if (type.isArray() && type.getBasicType() == EbtFloat16) requireFloat16Arithmetic(loc, op, "can't use with arrays containing float16"); if (type.getBasicType() == EbtStruct && containsFieldWithBasicType(type, EbtInt16)) requireInt16Arithmetic(loc, op, "can't use with structs containing int16"); if (type.isArray() && type.getBasicType() == EbtInt16) requireInt16Arithmetic(loc, op, "can't use with arrays containing int16"); if (type.getBasicType() == EbtStruct && containsFieldWithBasicType(type, EbtUint16)) requireInt16Arithmetic(loc, op, "can't use with structs containing uint16"); if (type.isArray() && type.getBasicType() == EbtUint16) requireInt16Arithmetic(loc, op, "can't use with arrays containing uint16"); if (type.getBasicType() == EbtStruct && containsFieldWithBasicType(type, EbtInt8)) requireInt8Arithmetic(loc, op, "can't use with structs containing int8"); if (type.isArray() && type.getBasicType() == EbtInt8) requireInt8Arithmetic(loc, op, "can't use with arrays containing int8"); if (type.getBasicType() == EbtStruct && containsFieldWithBasicType(type, EbtUint8)) requireInt8Arithmetic(loc, op, "can't use with structs containing uint8"); if (type.isArray() && type.getBasicType() == EbtUint8) requireInt8Arithmetic(loc, op, "can't use with arrays containing uint8"); } void TParseContext::specializationCheck(const TSourceLoc& loc, const TType& type, const char* op) { if (type.containsSpecializationSize()) error(loc, "can't use with types containing arrays sized with a specialization constant", op, ""); } void TParseContext::structTypeCheck(const TSourceLoc& /*loc*/, TPublicType& publicType) { const TTypeList& typeList = *publicType.userDef->getStruct(); // fix and check for member storage qualifiers and types that don't belong within a structure for (unsigned int member = 0; member < typeList.size(); ++member) { TQualifier& memberQualifier = typeList[member].type->getQualifier(); const TSourceLoc& memberLoc = typeList[member].loc; if (memberQualifier.isAuxiliary() || memberQualifier.isInterpolation() || (memberQualifier.storage != EvqTemporary && memberQualifier.storage != EvqGlobal)) error(memberLoc, "cannot use storage or interpolation qualifiers on structure members", typeList[member].type->getFieldName().c_str(), ""); if (memberQualifier.isMemory()) error(memberLoc, "cannot use memory qualifiers on structure members", typeList[member].type->getFieldName().c_str(), ""); if (memberQualifier.hasLayout()) { error(memberLoc, "cannot use layout qualifiers on structure members", typeList[member].type->getFieldName().c_str(), ""); memberQualifier.clearLayout(); } if (memberQualifier.invariant) error(memberLoc, "cannot use invariant qualifier on structure members", typeList[member].type->getFieldName().c_str(), ""); } } // // See if this loop satisfies the limitations for ES 2.0 (version 100) for loops in Appendex A: // // "The loop index has type int or float. // // "The for statement has the form: // for ( init-declaration ; condition ; expression ) // init-declaration has the form: type-specifier identifier = constant-expression // condition has the form: loop-index relational_operator constant-expression // where relational_operator is one of: > >= < <= == or != // expression [sic] has one of the following forms: // loop-index++ // loop-index-- // loop-index += constant-expression // loop-index -= constant-expression // // The body is handled in an AST traversal. // void TParseContext::inductiveLoopCheck(const TSourceLoc& loc, TIntermNode* init, TIntermLoop* loop) { // loop index init must exist and be a declaration, which shows up in the AST as an aggregate of size 1 of the declaration bool badInit = false; if (! init || ! init->getAsAggregate() || init->getAsAggregate()->getSequence().size() != 1) badInit = true; TIntermBinary* binaryInit = nullptr; if (! badInit) { // get the declaration assignment binaryInit = init->getAsAggregate()->getSequence()[0]->getAsBinaryNode(); if (! binaryInit) badInit = true; } if (badInit) { error(loc, "inductive-loop init-declaration requires the form \"type-specifier loop-index = constant-expression\"", "limitations", ""); return; } // loop index must be type int or float if (! binaryInit->getType().isScalar() || (binaryInit->getBasicType() != EbtInt && binaryInit->getBasicType() != EbtFloat)) { error(loc, "inductive loop requires a scalar 'int' or 'float' loop index", "limitations", ""); return; } // init is the form "loop-index = constant" if (binaryInit->getOp() != EOpAssign || ! binaryInit->getLeft()->getAsSymbolNode() || ! binaryInit->getRight()->getAsConstantUnion()) { error(loc, "inductive-loop init-declaration requires the form \"type-specifier loop-index = constant-expression\"", "limitations", ""); return; } // get the unique id of the loop index long long loopIndex = binaryInit->getLeft()->getAsSymbolNode()->getId(); inductiveLoopIds.insert(loopIndex); // condition's form must be "loop-index relational-operator constant-expression" bool badCond = ! loop->getTest(); if (! badCond) { TIntermBinary* binaryCond = loop->getTest()->getAsBinaryNode(); badCond = ! binaryCond; if (! badCond) { switch (binaryCond->getOp()) { case EOpGreaterThan: case EOpGreaterThanEqual: case EOpLessThan: case EOpLessThanEqual: case EOpEqual: case EOpNotEqual: break; default: badCond = true; } } if (binaryCond && (! binaryCond->getLeft()->getAsSymbolNode() || binaryCond->getLeft()->getAsSymbolNode()->getId() != loopIndex || ! binaryCond->getRight()->getAsConstantUnion())) badCond = true; } if (badCond) { error(loc, "inductive-loop condition requires the form \"loop-index constant-expression\"", "limitations", ""); return; } // loop-index++ // loop-index-- // loop-index += constant-expression // loop-index -= constant-expression bool badTerminal = ! loop->getTerminal(); if (! badTerminal) { TIntermUnary* unaryTerminal = loop->getTerminal()->getAsUnaryNode(); TIntermBinary* binaryTerminal = loop->getTerminal()->getAsBinaryNode(); if (unaryTerminal || binaryTerminal) { switch(loop->getTerminal()->getAsOperator()->getOp()) { case EOpPostDecrement: case EOpPostIncrement: case EOpAddAssign: case EOpSubAssign: break; default: badTerminal = true; } } else badTerminal = true; if (binaryTerminal && (! binaryTerminal->getLeft()->getAsSymbolNode() || binaryTerminal->getLeft()->getAsSymbolNode()->getId() != loopIndex || ! binaryTerminal->getRight()->getAsConstantUnion())) badTerminal = true; if (unaryTerminal && (! unaryTerminal->getOperand()->getAsSymbolNode() || unaryTerminal->getOperand()->getAsSymbolNode()->getId() != loopIndex)) badTerminal = true; } if (badTerminal) { error(loc, "inductive-loop termination requires the form \"loop-index++, loop-index--, loop-index += constant-expression, or loop-index -= constant-expression\"", "limitations", ""); return; } // the body inductiveLoopBodyCheck(loop->getBody(), loopIndex, symbolTable); } // Do limit checks for built-in arrays. void TParseContext::arrayLimitCheck(const TSourceLoc& loc, const TString& identifier, int size) { if (identifier.compare("gl_TexCoord") == 0) limitCheck(loc, size, "gl_MaxTextureCoords", "gl_TexCoord array size"); else if (identifier.compare("gl_ClipDistance") == 0) limitCheck(loc, size, "gl_MaxClipDistances", "gl_ClipDistance array size"); else if (identifier.compare("gl_CullDistance") == 0) limitCheck(loc, size, "gl_MaxCullDistances", "gl_CullDistance array size"); else if (identifier.compare("gl_ClipDistancePerViewNV") == 0) limitCheck(loc, size, "gl_MaxClipDistances", "gl_ClipDistancePerViewNV array size"); else if (identifier.compare("gl_CullDistancePerViewNV") == 0) limitCheck(loc, size, "gl_MaxCullDistances", "gl_CullDistancePerViewNV array size"); } // See if the provided value is less than or equal to the symbol indicated by limit, // which should be a constant in the symbol table. void TParseContext::limitCheck(const TSourceLoc& loc, int value, const char* limit, const char* feature) { TSymbol* symbol = symbolTable.find(limit); assert(symbol->getAsVariable()); const TConstUnionArray& constArray = symbol->getAsVariable()->getConstArray(); assert(! constArray.empty()); if (value > constArray[0].getIConst()) error(loc, "must be less than or equal to", feature, "%s (%d)", limit, constArray[0].getIConst()); } // // Do any additional error checking, etc., once we know the parsing is done. // void TParseContext::finish() { TParseContextBase::finish(); if (parsingBuiltins) return; // Check on array indexes for ES 2.0 (version 100) limitations. for (size_t i = 0; i < needsIndexLimitationChecking.size(); ++i) constantIndexExpressionCheck(needsIndexLimitationChecking[i]); // Check for stages that are enabled by extension. // Can't do this at the beginning, it is chicken and egg to add a stage by // extension. // Stage-specific features were correctly tested for already, this is just // about the stage itself. switch (language) { case EShLangGeometry: if (isEsProfile() && version == 310) requireExtensions(getCurrentLoc(), Num_AEP_geometry_shader, AEP_geometry_shader, "geometry shaders"); break; case EShLangTessControl: case EShLangTessEvaluation: if (isEsProfile() && version == 310) requireExtensions(getCurrentLoc(), Num_AEP_tessellation_shader, AEP_tessellation_shader, "tessellation shaders"); else if (!isEsProfile() && version < 400) requireExtensions(getCurrentLoc(), 1, &E_GL_ARB_tessellation_shader, "tessellation shaders"); break; case EShLangCompute: if (!isEsProfile() && version < 430) requireExtensions(getCurrentLoc(), 1, &E_GL_ARB_compute_shader, "compute shaders"); break; case EShLangTask: requireExtensions(getCurrentLoc(), Num_AEP_mesh_shader, AEP_mesh_shader, "task shaders"); break; case EShLangMesh: requireExtensions(getCurrentLoc(), Num_AEP_mesh_shader, AEP_mesh_shader, "mesh shaders"); break; default: break; } // Set default outputs for GL_NV_geometry_shader_passthrough if (language == EShLangGeometry && extensionTurnedOn(E_SPV_NV_geometry_shader_passthrough)) { if (intermediate.getOutputPrimitive() == ElgNone) { switch (intermediate.getInputPrimitive()) { case ElgPoints: intermediate.setOutputPrimitive(ElgPoints); break; case ElgLines: intermediate.setOutputPrimitive(ElgLineStrip); break; case ElgTriangles: intermediate.setOutputPrimitive(ElgTriangleStrip); break; default: break; } } if (intermediate.getVertices() == TQualifier::layoutNotSet) { switch (intermediate.getInputPrimitive()) { case ElgPoints: intermediate.setVertices(1); break; case ElgLines: intermediate.setVertices(2); break; case ElgTriangles: intermediate.setVertices(3); break; default: break; } } } } // // Layout qualifier stuff. // // Put the id's layout qualification into the public type, for qualifiers not having a number set. // This is before we know any type information for error checking. void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publicType, TString& id) { std::transform(id.begin(), id.end(), id.begin(), ::tolower); if (id == TQualifier::getLayoutMatrixString(ElmColumnMajor)) { publicType.qualifier.layoutMatrix = ElmColumnMajor; return; } if (id == TQualifier::getLayoutMatrixString(ElmRowMajor)) { publicType.qualifier.layoutMatrix = ElmRowMajor; return; } if (id == TQualifier::getLayoutPackingString(ElpPacked)) { if (spvVersion.spv != 0) { if (spvVersion.vulkanRelaxed) return; // silently ignore qualifier else spvRemoved(loc, "packed"); } publicType.qualifier.layoutPacking = ElpPacked; return; } if (id == TQualifier::getLayoutPackingString(ElpShared)) { if (spvVersion.spv != 0) { if (spvVersion.vulkanRelaxed) return; // silently ignore qualifier else spvRemoved(loc, "shared"); } publicType.qualifier.layoutPacking = ElpShared; return; } if (id == TQualifier::getLayoutPackingString(ElpStd140)) { publicType.qualifier.layoutPacking = ElpStd140; return; } if (id == TQualifier::getLayoutPackingString(ElpStd430)) { requireProfile(loc, EEsProfile | ECoreProfile | ECompatibilityProfile, "std430"); profileRequires(loc, ECoreProfile | ECompatibilityProfile, 430, E_GL_ARB_shader_storage_buffer_object, "std430"); profileRequires(loc, EEsProfile, 310, nullptr, "std430"); publicType.qualifier.layoutPacking = ElpStd430; return; } if (id == TQualifier::getLayoutPackingString(ElpScalar)) { requireVulkan(loc, "scalar"); requireExtensions(loc, 1, &E_GL_EXT_scalar_block_layout, "scalar block layout"); publicType.qualifier.layoutPacking = ElpScalar; return; } // TODO: compile-time performance: may need to stop doing linear searches for (TLayoutFormat format = (TLayoutFormat)(ElfNone + 1); format < ElfCount; format = (TLayoutFormat)(format + 1)) { if (id == TQualifier::getLayoutFormatString(format)) { if ((format > ElfEsFloatGuard && format < ElfFloatGuard) || (format > ElfEsIntGuard && format < ElfIntGuard) || (format > ElfEsUintGuard && format < ElfCount)) requireProfile(loc, ENoProfile | ECoreProfile | ECompatibilityProfile, "image load-store format"); profileRequires(loc, ENoProfile | ECoreProfile | ECompatibilityProfile, 420, E_GL_ARB_shader_image_load_store, "image load store"); profileRequires(loc, EEsProfile, 310, E_GL_ARB_shader_image_load_store, "image load store"); publicType.qualifier.layoutFormat = format; return; } } if (id == "push_constant") { requireVulkan(loc, "push_constant"); publicType.qualifier.layoutPushConstant = true; return; } if (id == "buffer_reference") { requireVulkan(loc, "buffer_reference"); requireExtensions(loc, 1, &E_GL_EXT_buffer_reference, "buffer_reference"); publicType.qualifier.layoutBufferReference = true; intermediate.setUseStorageBuffer(); intermediate.setUsePhysicalStorageBuffer(); return; } if (id == "bindless_sampler") { requireExtensions(loc, 1, &E_GL_ARB_bindless_texture, "bindless_sampler"); publicType.qualifier.layoutBindlessSampler = true; intermediate.setBindlessTextureMode(currentCaller, AstRefTypeLayout); return; } if (id == "bindless_image") { requireExtensions(loc, 1, &E_GL_ARB_bindless_texture, "bindless_image"); publicType.qualifier.layoutBindlessImage = true; intermediate.setBindlessImageMode(currentCaller, AstRefTypeLayout); return; } if (id == "bound_sampler") { requireExtensions(loc, 1, &E_GL_ARB_bindless_texture, "bound_sampler"); publicType.qualifier.layoutBindlessSampler = false; return; } if (id == "bound_image") { requireExtensions(loc, 1, &E_GL_ARB_bindless_texture, "bound_image"); publicType.qualifier.layoutBindlessImage = false; return; } if (language == EShLangGeometry || language == EShLangTessEvaluation || language == EShLangMesh) { if (id == TQualifier::getGeometryString(ElgTriangles)) { publicType.shaderQualifiers.geometry = ElgTriangles; return; } if (language == EShLangGeometry || language == EShLangMesh) { if (id == TQualifier::getGeometryString(ElgPoints)) { publicType.shaderQualifiers.geometry = ElgPoints; return; } if (id == TQualifier::getGeometryString(ElgLines)) { publicType.shaderQualifiers.geometry = ElgLines; return; } if (language == EShLangGeometry) { if (id == TQualifier::getGeometryString(ElgLineStrip)) { publicType.shaderQualifiers.geometry = ElgLineStrip; return; } if (id == TQualifier::getGeometryString(ElgLinesAdjacency)) { publicType.shaderQualifiers.geometry = ElgLinesAdjacency; return; } if (id == TQualifier::getGeometryString(ElgTrianglesAdjacency)) { publicType.shaderQualifiers.geometry = ElgTrianglesAdjacency; return; } if (id == TQualifier::getGeometryString(ElgTriangleStrip)) { publicType.shaderQualifiers.geometry = ElgTriangleStrip; return; } if (id == "passthrough") { requireExtensions(loc, 1, &E_SPV_NV_geometry_shader_passthrough, "geometry shader passthrough"); publicType.qualifier.layoutPassthrough = true; intermediate.setGeoPassthroughEXT(); return; } } } else { assert(language == EShLangTessEvaluation); // input primitive if (id == TQualifier::getGeometryString(ElgTriangles)) { publicType.shaderQualifiers.geometry = ElgTriangles; return; } if (id == TQualifier::getGeometryString(ElgQuads)) { publicType.shaderQualifiers.geometry = ElgQuads; return; } if (id == TQualifier::getGeometryString(ElgIsolines)) { publicType.shaderQualifiers.geometry = ElgIsolines; return; } // vertex spacing if (id == TQualifier::getVertexSpacingString(EvsEqual)) { publicType.shaderQualifiers.spacing = EvsEqual; return; } if (id == TQualifier::getVertexSpacingString(EvsFractionalEven)) { publicType.shaderQualifiers.spacing = EvsFractionalEven; return; } if (id == TQualifier::getVertexSpacingString(EvsFractionalOdd)) { publicType.shaderQualifiers.spacing = EvsFractionalOdd; return; } // triangle order if (id == TQualifier::getVertexOrderString(EvoCw)) { publicType.shaderQualifiers.order = EvoCw; return; } if (id == TQualifier::getVertexOrderString(EvoCcw)) { publicType.shaderQualifiers.order = EvoCcw; return; } // point mode if (id == "point_mode") { publicType.shaderQualifiers.pointMode = true; return; } } } if (language == EShLangFragment) { if (id == "origin_upper_left") { requireProfile(loc, ECoreProfile | ECompatibilityProfile | ENoProfile, "origin_upper_left"); if (profile == ENoProfile) { profileRequires(loc,ECoreProfile | ECompatibilityProfile, 140, E_GL_ARB_fragment_coord_conventions, "origin_upper_left"); } publicType.shaderQualifiers.originUpperLeft = true; return; } if (id == "pixel_center_integer") { requireProfile(loc, ECoreProfile | ECompatibilityProfile | ENoProfile, "pixel_center_integer"); if (profile == ENoProfile) { profileRequires(loc,ECoreProfile | ECompatibilityProfile, 140, E_GL_ARB_fragment_coord_conventions, "pixel_center_integer"); } publicType.shaderQualifiers.pixelCenterInteger = true; return; } if (id == "early_fragment_tests") { profileRequires(loc, ENoProfile | ECoreProfile | ECompatibilityProfile, 420, E_GL_ARB_shader_image_load_store, "early_fragment_tests"); profileRequires(loc, EEsProfile, 310, nullptr, "early_fragment_tests"); publicType.shaderQualifiers.earlyFragmentTests = true; return; } if (id == "early_and_late_fragment_tests_amd") { profileRequires(loc, ENoProfile | ECoreProfile | ECompatibilityProfile, 420, E_GL_AMD_shader_early_and_late_fragment_tests, "early_and_late_fragment_tests_amd"); profileRequires(loc, EEsProfile, 310, nullptr, "early_and_late_fragment_tests_amd"); publicType.shaderQualifiers.earlyAndLateFragmentTestsAMD = true; return; } if (id == "post_depth_coverage") { requireExtensions(loc, Num_post_depth_coverageEXTs, post_depth_coverageEXTs, "post depth coverage"); if (extensionTurnedOn(E_GL_ARB_post_depth_coverage)) { publicType.shaderQualifiers.earlyFragmentTests = true; } publicType.shaderQualifiers.postDepthCoverage = true; return; } /* id is transformed into lower case in the beginning of this function. */ if (id == "non_coherent_color_attachment_readext") { requireExtensions(loc, 1, &E_GL_EXT_shader_tile_image, "non_coherent_color_attachment_readEXT"); publicType.shaderQualifiers.nonCoherentColorAttachmentReadEXT = true; return; } if (id == "non_coherent_depth_attachment_readext") { requireExtensions(loc, 1, &E_GL_EXT_shader_tile_image, "non_coherent_depth_attachment_readEXT"); publicType.shaderQualifiers.nonCoherentDepthAttachmentReadEXT = true; return; } if (id == "non_coherent_stencil_attachment_readext") { requireExtensions(loc, 1, &E_GL_EXT_shader_tile_image, "non_coherent_stencil_attachment_readEXT"); publicType.shaderQualifiers.nonCoherentStencilAttachmentReadEXT = true; return; } for (TLayoutDepth depth = (TLayoutDepth)(EldNone + 1); depth < EldCount; depth = (TLayoutDepth)(depth+1)) { if (id == TQualifier::getLayoutDepthString(depth)) { requireProfile(loc, ECoreProfile | ECompatibilityProfile, "depth layout qualifier"); profileRequires(loc, ECoreProfile | ECompatibilityProfile, 420, nullptr, "depth layout qualifier"); publicType.shaderQualifiers.layoutDepth = depth; return; } } for (TLayoutStencil stencil = (TLayoutStencil)(ElsNone + 1); stencil < ElsCount; stencil = (TLayoutStencil)(stencil+1)) { if (id == TQualifier::getLayoutStencilString(stencil)) { requireProfile(loc, ECoreProfile | ECompatibilityProfile, "stencil layout qualifier"); profileRequires(loc, ECoreProfile | ECompatibilityProfile, 420, nullptr, "stencil layout qualifier"); publicType.shaderQualifiers.layoutStencil = stencil; return; } } for (TInterlockOrdering order = (TInterlockOrdering)(EioNone + 1); order < EioCount; order = (TInterlockOrdering)(order+1)) { if (id == TQualifier::getInterlockOrderingString(order)) { requireProfile(loc, ECoreProfile | ECompatibilityProfile, "fragment shader interlock layout qualifier"); profileRequires(loc, ECoreProfile | ECompatibilityProfile, 450, nullptr, "fragment shader interlock layout qualifier"); requireExtensions(loc, 1, &E_GL_ARB_fragment_shader_interlock, TQualifier::getInterlockOrderingString(order)); if (order == EioShadingRateInterlockOrdered || order == EioShadingRateInterlockUnordered) requireExtensions(loc, 1, &E_GL_NV_shading_rate_image, TQualifier::getInterlockOrderingString(order)); publicType.shaderQualifiers.interlockOrdering = order; return; } } if (id.compare(0, 13, "blend_support") == 0) { bool found = false; for (TBlendEquationShift be = (TBlendEquationShift)0; be < EBlendCount; be = (TBlendEquationShift)(be + 1)) { if (id == TQualifier::getBlendEquationString(be)) { profileRequires(loc, EEsProfile, 320, E_GL_KHR_blend_equation_advanced, "blend equation"); profileRequires(loc, ~EEsProfile, 0, E_GL_KHR_blend_equation_advanced, "blend equation"); intermediate.addBlendEquation(be); publicType.shaderQualifiers.blendEquation = true; found = true; break; } } if (! found) error(loc, "unknown blend equation", "blend_support", ""); return; } if (id == "override_coverage") { requireExtensions(loc, 1, &E_GL_NV_sample_mask_override_coverage, "sample mask override coverage"); publicType.shaderQualifiers.layoutOverrideCoverage = true; return; } if (id == "full_quads") { const char* feature = "full_quads qualifier"; requireProfile(loc, ECompatibilityProfile | ECoreProfile | EEsProfile, feature); profileRequires(loc, ECoreProfile | ECompatibilityProfile, 140, E_GL_EXT_shader_quad_control, feature); profileRequires(loc, EEsProfile, 310, E_GL_EXT_shader_quad_control, feature); publicType.qualifier.layoutFullQuads = true; return; } if (id == "non_coherent_attachment_readqcom") { requireExtensions(loc, 1, &E_GL_QCOM_tile_shading, "tile shading QCOM"); publicType.shaderQualifiers.layoutNonCoherentTileAttachmentReadQCOM = true; return; } if (id == "tile_attachmentqcom") { requireExtensions(loc, 1, &E_GL_QCOM_tile_shading, "tile shading QCOM"); publicType.qualifier.layoutTileAttachmentQCOM = true; return; } } if (language == EShLangVertex || language == EShLangTessControl || language == EShLangTessEvaluation || language == EShLangGeometry ) { if (id == "viewport_relative") { requireExtensions(loc, 1, &E_GL_NV_viewport_array2, "view port array2"); publicType.qualifier.layoutViewportRelative = true; return; } } else { if (language == EShLangRayGen || language == EShLangIntersect || language == EShLangAnyHit || language == EShLangClosestHit || language == EShLangMiss || language == EShLangCallable) { if (id == "shaderrecordnv" || id == "shaderrecordext") { if (id == "shaderrecordnv") { requireExtensions(loc, 1, &E_GL_NV_ray_tracing, "shader record NV"); } else { requireExtensions(loc, 1, &E_GL_EXT_ray_tracing, "shader record EXT"); } publicType.qualifier.layoutShaderRecord = true; return; } else if (id == "hitobjectshaderrecordnv") { requireExtensions(loc, 1, &E_GL_NV_shader_invocation_reorder, "hitobject shader record NV"); publicType.qualifier.layoutHitObjectShaderRecordNV = true; return; } } } if (language == EShLangCompute) { if (id.compare(0, 17, "derivative_group_") == 0) { requireExtensions(loc, 1, &E_GL_NV_compute_shader_derivatives, "compute shader derivatives"); if (id == "derivative_group_quadsnv") { publicType.shaderQualifiers.layoutDerivativeGroupQuads = true; return; } else if (id == "derivative_group_linearnv") { publicType.shaderQualifiers.layoutDerivativeGroupLinear = true; return; } } if (id == "tile_attachmentqcom") { requireExtensions(loc, 1, &E_GL_QCOM_tile_shading, "tile shading QCOM"); publicType.qualifier.layoutTileAttachmentQCOM = true; return; } } if (id == "primitive_culling") { requireExtensions(loc, 1, &E_GL_EXT_ray_flags_primitive_culling, "primitive culling"); publicType.shaderQualifiers.layoutPrimitiveCulling = true; return; } if (id == "quad_derivatives") { const char* feature = "quad_derivatives qualifier"; requireProfile(loc, ECompatibilityProfile | ECoreProfile | EEsProfile, feature); profileRequires(loc, ECoreProfile | ECompatibilityProfile, 140, E_GL_EXT_shader_quad_control, feature); profileRequires(loc, EEsProfile, 310, E_GL_EXT_shader_quad_control, feature); publicType.qualifier.layoutQuadDeriv = true; return; } error(loc, "unrecognized layout identifier, or qualifier requires assignment (e.g., binding = 4)", id.c_str(), ""); } // Put the id's layout qualifier value into the public type, for qualifiers having a number set. // This is before we know any type information for error checking. void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publicType, TString& id, const TIntermTyped* node) { const char* feature = "layout-id value"; const char* nonLiteralFeature = "non-literal layout-id value"; integerCheck(node, feature); const TIntermConstantUnion* constUnion = node->getAsConstantUnion(); int value; bool nonLiteral = false; if (constUnion) { value = constUnion->getConstArray()[0].getIConst(); if (! constUnion->isLiteral()) { requireProfile(loc, ECoreProfile | ECompatibilityProfile, nonLiteralFeature); profileRequires(loc, ECoreProfile | ECompatibilityProfile, 440, E_GL_ARB_enhanced_layouts, nonLiteralFeature); } } else { // grammar should have give out the error message value = 0; nonLiteral = true; } if (value < 0) { error(loc, "cannot be negative", feature, ""); return; } std::transform(id.begin(), id.end(), id.begin(), ::tolower); if (id == "offset") { // "offset" can be for either // - uniform offsets // - atomic_uint offsets const char* feature = "offset"; if (spvVersion.spv == 0) { requireProfile(loc, EEsProfile | ECoreProfile | ECompatibilityProfile, feature); const char* exts[2] = { E_GL_ARB_enhanced_layouts, E_GL_ARB_shader_atomic_counters }; profileRequires(loc, ECoreProfile | ECompatibilityProfile, 420, 2, exts, feature); profileRequires(loc, EEsProfile, 310, nullptr, feature); } publicType.qualifier.layoutOffset = value; publicType.qualifier.explicitOffset = true; if (nonLiteral) error(loc, "needs a literal integer", "offset", ""); return; } else if (id == "align") { const char* feature = "uniform buffer-member align"; if (spvVersion.spv == 0) { requireProfile(loc, ECoreProfile | ECompatibilityProfile, feature); profileRequires(loc, ECoreProfile | ECompatibilityProfile, 440, E_GL_ARB_enhanced_layouts, feature); } // "The specified alignment must be a power of 2, or a compile-time error results." if (! IsPow2(value)) error(loc, "must be a power of 2", "align", ""); else publicType.qualifier.layoutAlign = value; if (nonLiteral) error(loc, "needs a literal integer", "align", ""); return; } else if (id == "location") { profileRequires(loc, EEsProfile, 300, nullptr, "location"); const char* exts[2] = { E_GL_ARB_separate_shader_objects, E_GL_ARB_explicit_attrib_location }; // GL_ARB_explicit_uniform_location requires 330 or GL_ARB_explicit_attrib_location we do not need to add it here profileRequires(loc, ~EEsProfile, 330, 2, exts, "location"); if ((unsigned int)value >= TQualifier::layoutLocationEnd) error(loc, "location is too large", id.c_str(), ""); else publicType.qualifier.layoutLocation = value; if (nonLiteral) error(loc, "needs a literal integer", "location", ""); return; } else if (id == "set") { if ((unsigned int)value >= TQualifier::layoutSetEnd) error(loc, "set is too large", id.c_str(), ""); else publicType.qualifier.layoutSet = value; if (value != 0) requireVulkan(loc, "descriptor set"); if (nonLiteral) error(loc, "needs a literal integer", "set", ""); return; } else if (id == "binding") { profileRequires(loc, ~EEsProfile, 420, E_GL_ARB_shading_language_420pack, "binding"); profileRequires(loc, EEsProfile, 310, nullptr, "binding"); if ((unsigned int)value >= TQualifier::layoutBindingEnd) error(loc, "binding is too large", id.c_str(), ""); else publicType.qualifier.layoutBinding = value; if (nonLiteral) error(loc, "needs a literal integer", "binding", ""); return; } if (id == "constant_id") { requireSpv(loc, "constant_id"); if (value >= (int)TQualifier::layoutSpecConstantIdEnd) { error(loc, "specialization-constant id is too large", id.c_str(), ""); } else { publicType.qualifier.layoutSpecConstantId = value; publicType.qualifier.specConstant = true; if (! intermediate.addUsedConstantId(value)) error(loc, "specialization-constant id already used", id.c_str(), ""); } if (nonLiteral) error(loc, "needs a literal integer", "constant_id", ""); return; } if (id == "component") { requireProfile(loc, ECoreProfile | ECompatibilityProfile, "component"); profileRequires(loc, ECoreProfile | ECompatibilityProfile, 440, E_GL_ARB_enhanced_layouts, "component"); if ((unsigned)value >= TQualifier::layoutComponentEnd) error(loc, "component is too large", id.c_str(), ""); else publicType.qualifier.layoutComponent = value; if (nonLiteral) error(loc, "needs a literal integer", "component", ""); return; } if (id.compare(0, 4, "xfb_") == 0) { // "Any shader making any static use (after preprocessing) of any of these // *xfb_* qualifiers will cause the shader to be in a transform feedback // capturing mode and hence responsible for describing the transform feedback // setup." intermediate.setXfbMode(); const char* feature = "transform feedback qualifier"; requireStage(loc, (EShLanguageMask)(EShLangVertexMask | EShLangGeometryMask | EShLangTessControlMask | EShLangTessEvaluationMask), feature); requireProfile(loc, ECoreProfile | ECompatibilityProfile, feature); profileRequires(loc, ECoreProfile | ECompatibilityProfile, 440, E_GL_ARB_enhanced_layouts, feature); if (id == "xfb_buffer") { // "It is a compile-time error to specify an *xfb_buffer* that is greater than // the implementation-dependent constant gl_MaxTransformFeedbackBuffers." if (value >= resources.maxTransformFeedbackBuffers) error(loc, "buffer is too large:", id.c_str(), "gl_MaxTransformFeedbackBuffers is %d", resources.maxTransformFeedbackBuffers); if (value >= (int)TQualifier::layoutXfbBufferEnd) error(loc, "buffer is too large:", id.c_str(), "internal max is %d", TQualifier::layoutXfbBufferEnd-1); else publicType.qualifier.layoutXfbBuffer = value; if (nonLiteral) error(loc, "needs a literal integer", "xfb_buffer", ""); return; } else if (id == "xfb_offset") { if (value >= (int)TQualifier::layoutXfbOffsetEnd) error(loc, "offset is too large:", id.c_str(), "internal max is %d", TQualifier::layoutXfbOffsetEnd-1); else publicType.qualifier.layoutXfbOffset = value; if (nonLiteral) error(loc, "needs a literal integer", "xfb_offset", ""); return; } else if (id == "xfb_stride") { // "The resulting stride (implicit or explicit), when divided by 4, must be less than or equal to the // implementation-dependent constant gl_MaxTransformFeedbackInterleavedComponents." if (value > 4 * resources.maxTransformFeedbackInterleavedComponents) { error(loc, "1/4 stride is too large:", id.c_str(), "gl_MaxTransformFeedbackInterleavedComponents is %d", resources.maxTransformFeedbackInterleavedComponents); } if (value >= (int)TQualifier::layoutXfbStrideEnd) error(loc, "stride is too large:", id.c_str(), "internal max is %d", TQualifier::layoutXfbStrideEnd-1); else publicType.qualifier.layoutXfbStride = value; if (nonLiteral) error(loc, "needs a literal integer", "xfb_stride", ""); return; } } if (id == "input_attachment_index") { requireVulkan(loc, "input_attachment_index"); if (value >= (int)TQualifier::layoutAttachmentEnd) error(loc, "attachment index is too large", id.c_str(), ""); else publicType.qualifier.layoutAttachment = value; if (nonLiteral) error(loc, "needs a literal integer", "input_attachment_index", ""); return; } if (id == "num_views") { requireExtensions(loc, Num_OVR_multiview_EXTs, OVR_multiview_EXTs, "num_views"); publicType.shaderQualifiers.numViews = value; if (nonLiteral) error(loc, "needs a literal integer", "num_views", ""); return; } if (language == EShLangVertex || language == EShLangTessControl || language == EShLangTessEvaluation || language == EShLangGeometry) { if (id == "secondary_view_offset") { requireExtensions(loc, 1, &E_GL_NV_stereo_view_rendering, "stereo view rendering"); publicType.qualifier.layoutSecondaryViewportRelativeOffset = value; if (nonLiteral) error(loc, "needs a literal integer", "secondary_view_offset", ""); return; } } if (id == "buffer_reference_align") { requireExtensions(loc, 1, &E_GL_EXT_buffer_reference, "buffer_reference_align"); if (! IsPow2(value)) error(loc, "must be a power of 2", "buffer_reference_align", ""); else publicType.qualifier.layoutBufferReferenceAlign = IntLog2(value); if (nonLiteral) error(loc, "needs a literal integer", "buffer_reference_align", ""); return; } switch (language) { case EShLangTessControl: if (id == "vertices") { if (value == 0) error(loc, "must be greater than 0", "vertices", ""); else publicType.shaderQualifiers.vertices = value; if (nonLiteral) error(loc, "needs a literal integer", "vertices", ""); return; } break; case EShLangGeometry: if (id == "invocations") { profileRequires(loc, ECompatibilityProfile | ECoreProfile, 400, Num_AEP_core_gpu_shader5, AEP_core_gpu_shader5, "invocations"); if (value == 0) error(loc, "must be at least 1", "invocations", ""); else publicType.shaderQualifiers.invocations = value; if (nonLiteral) error(loc, "needs a literal integer", "invocations", ""); return; } if (id == "max_vertices") { publicType.shaderQualifiers.vertices = value; if (value > resources.maxGeometryOutputVertices) error(loc, "too large, must be less than gl_MaxGeometryOutputVertices", "max_vertices", ""); if (nonLiteral) error(loc, "needs a literal integer", "max_vertices", ""); return; } if (id == "stream") { requireProfile(loc, ~EEsProfile, "selecting output stream"); publicType.qualifier.layoutStream = value; if (value > 0) intermediate.setMultiStream(); if (nonLiteral) error(loc, "needs a literal integer", "stream", ""); return; } break; case EShLangFragment: if (id == "index") { requireProfile(loc, ECompatibilityProfile | ECoreProfile | EEsProfile, "index layout qualifier on fragment output"); const char* exts[2] = { E_GL_ARB_separate_shader_objects, E_GL_ARB_explicit_attrib_location }; profileRequires(loc, ECompatibilityProfile | ECoreProfile, 330, 2, exts, "index layout qualifier on fragment output"); profileRequires(loc, EEsProfile ,310, E_GL_EXT_blend_func_extended, "index layout qualifier on fragment output"); // "It is also a compile-time error if a fragment shader sets a layout index to less than 0 or greater than 1." if (value < 0 || value > 1) { value = 0; error(loc, "value must be 0 or 1", "index", ""); } publicType.qualifier.layoutIndex = value; if (nonLiteral) error(loc, "needs a literal integer", "index", ""); return; } break; case EShLangMesh: if (id == "max_vertices") { requireExtensions(loc, Num_AEP_mesh_shader, AEP_mesh_shader, "max_vertices"); publicType.shaderQualifiers.vertices = value; int max = extensionTurnedOn(E_GL_EXT_mesh_shader) ? resources.maxMeshOutputVerticesEXT : resources.maxMeshOutputVerticesNV; if (value > max) { TString maxsErrtring = "too large, must be less than "; maxsErrtring.append(extensionTurnedOn(E_GL_EXT_mesh_shader) ? "gl_MaxMeshOutputVerticesEXT" : "gl_MaxMeshOutputVerticesNV"); error(loc, maxsErrtring.c_str(), "max_vertices", ""); } if (nonLiteral) error(loc, "needs a literal integer", "max_vertices", ""); return; } if (id == "max_primitives") { requireExtensions(loc, Num_AEP_mesh_shader, AEP_mesh_shader, "max_primitives"); publicType.shaderQualifiers.primitives = value; int max = extensionTurnedOn(E_GL_EXT_mesh_shader) ? resources.maxMeshOutputPrimitivesEXT : resources.maxMeshOutputPrimitivesNV; if (value > max) { TString maxsErrtring = "too large, must be less than "; maxsErrtring.append(extensionTurnedOn(E_GL_EXT_mesh_shader) ? "gl_MaxMeshOutputPrimitivesEXT" : "gl_MaxMeshOutputPrimitivesNV"); error(loc, maxsErrtring.c_str(), "max_primitives", ""); } if (nonLiteral) error(loc, "needs a literal integer", "max_primitives", ""); return; } [[fallthrough]]; case EShLangTask: // Fall through case EShLangCompute: if (id.compare(0, 11, "local_size_") == 0) { if (language == EShLangMesh || language == EShLangTask) { requireExtensions(loc, Num_AEP_mesh_shader, AEP_mesh_shader, "gl_WorkGroupSize"); } else { profileRequires(loc, EEsProfile, 310, nullptr, "gl_WorkGroupSize"); profileRequires(loc, ~EEsProfile, 430, E_GL_ARB_compute_shader, "gl_WorkGroupSize"); } if (nonLiteral) error(loc, "needs a literal integer", "local_size", ""); if (id.size() == 12 && value == 0) { error(loc, "must be at least 1", id.c_str(), ""); return; } if (id == "local_size_x") { publicType.shaderQualifiers.localSize[0] = value; publicType.shaderQualifiers.localSizeNotDefault[0] = true; return; } if (id == "local_size_y") { publicType.shaderQualifiers.localSize[1] = value; publicType.shaderQualifiers.localSizeNotDefault[1] = true; return; } if (id == "local_size_z") { publicType.shaderQualifiers.localSize[2] = value; publicType.shaderQualifiers.localSizeNotDefault[2] = true; return; } if (spvVersion.spv != 0) { if (id == "local_size_x_id") { publicType.shaderQualifiers.localSizeSpecId[0] = value; return; } if (id == "local_size_y_id") { publicType.shaderQualifiers.localSizeSpecId[1] = value; return; } if (id == "local_size_z_id") { publicType.shaderQualifiers.localSizeSpecId[2] = value; return; } } } if (id.compare(0, 18, "shading_rate_xqcom") == 0 || id.compare(0, 18, "shading_rate_yqcom") == 0 || id.compare(0, 18, "shading_rate_zqcom") == 0) { requireExtensions(loc, 1, &E_GL_QCOM_tile_shading, "tile shading QCOM"); if (nonLiteral) error(loc, "needs a literal integer", "shading_rate_*QCOM", ""); if (id.size() == 18 && value == 0) { error(loc, "must be at least 1", id.c_str(), ""); return; } if (id == "shading_rate_xqcom") { publicType.shaderQualifiers.layoutTileShadingRateQCOM[0] = value; publicType.shaderQualifiers.layoutTileShadingRateQCOMNotDefault[0] = true; if (! IsPow2(value)) error(loc, "must be a power of 2", id.c_str(), ""); return; } if (id == "shading_rate_yqcom") { publicType.shaderQualifiers.layoutTileShadingRateQCOM[1] = value; publicType.shaderQualifiers.layoutTileShadingRateQCOMNotDefault[1] = true; if (! IsPow2(value)) error(loc, "must be a power of 2", id.c_str(), ""); return; } if (id == "shading_rate_zqcom") { publicType.shaderQualifiers.layoutTileShadingRateQCOM[2] = value; publicType.shaderQualifiers.layoutTileShadingRateQCOMNotDefault[2] = true; if (value <= 0) error(loc, "must be a positive value", id.c_str(), ""); return; } } break; default: break; } error(loc, "there is no such layout identifier for this stage taking an assigned value", id.c_str(), ""); } // Merge any layout qualifier information from src into dst, leaving everything else in dst alone // // "More than one layout qualifier may appear in a single declaration. // Additionally, the same layout-qualifier-name can occur multiple times // within a layout qualifier or across multiple layout qualifiers in the // same declaration. When the same layout-qualifier-name occurs // multiple times, in a single declaration, the last occurrence overrides // the former occurrence(s). Further, if such a layout-qualifier-name // will effect subsequent declarations or other observable behavior, it // is only the last occurrence that will have any effect, behaving as if // the earlier occurrence(s) within the declaration are not present. // This is also true for overriding layout-qualifier-names, where one // overrides the other (e.g., row_major vs. column_major); only the last // occurrence has any effect." void TParseContext::mergeObjectLayoutQualifiers(TQualifier& dst, const TQualifier& src, bool inheritOnly) { if (src.hasMatrix()) dst.layoutMatrix = src.layoutMatrix; if (src.hasPacking()) dst.layoutPacking = src.layoutPacking; if (src.hasStream()) dst.layoutStream = src.layoutStream; if (src.hasFormat()) dst.layoutFormat = src.layoutFormat; if (src.hasXfbBuffer()) dst.layoutXfbBuffer = src.layoutXfbBuffer; if (src.hasBufferReferenceAlign()) dst.layoutBufferReferenceAlign = src.layoutBufferReferenceAlign; if (src.hasAlign()) dst.layoutAlign = src.layoutAlign; if (! inheritOnly) { if (src.hasLocation()) dst.layoutLocation = src.layoutLocation; if (src.hasOffset()) dst.layoutOffset = src.layoutOffset; if (src.hasSet()) dst.layoutSet = src.layoutSet; if (src.layoutBinding != TQualifier::layoutBindingEnd) dst.layoutBinding = src.layoutBinding; if (src.hasSpecConstantId()) dst.layoutSpecConstantId = src.layoutSpecConstantId; if (src.hasComponent()) dst.layoutComponent = src.layoutComponent; if (src.hasIndex()) dst.layoutIndex = src.layoutIndex; if (src.hasXfbStride()) dst.layoutXfbStride = src.layoutXfbStride; if (src.hasXfbOffset()) dst.layoutXfbOffset = src.layoutXfbOffset; if (src.hasAttachment()) dst.layoutAttachment = src.layoutAttachment; if (src.layoutPushConstant) dst.layoutPushConstant = true; if (src.layoutBufferReference) dst.layoutBufferReference = true; if (src.layoutPassthrough) dst.layoutPassthrough = true; if (src.layoutViewportRelative) dst.layoutViewportRelative = true; if (src.layoutSecondaryViewportRelativeOffset != -2048) dst.layoutSecondaryViewportRelativeOffset = src.layoutSecondaryViewportRelativeOffset; if (src.layoutShaderRecord) dst.layoutShaderRecord = true; if (src.layoutFullQuads) dst.layoutFullQuads = true; if (src.layoutQuadDeriv) dst.layoutQuadDeriv = true; if (src.layoutBindlessSampler) dst.layoutBindlessSampler = true; if (src.layoutBindlessImage) dst.layoutBindlessImage = true; if (src.pervertexNV) dst.pervertexNV = true; if (src.pervertexEXT) dst.pervertexEXT = true; if (src.layoutHitObjectShaderRecordNV) dst.layoutHitObjectShaderRecordNV = true; dst.layoutTileAttachmentQCOM |= src.layoutTileAttachmentQCOM; } } // Do error layout error checking given a full variable/block declaration. void TParseContext::layoutObjectCheck(const TSourceLoc& loc, const TSymbol& symbol) { const TType& type = symbol.getType(); const TQualifier& qualifier = type.getQualifier(); // first, cross check WRT to just the type layoutTypeCheck(loc, type); // now, any remaining error checking based on the object itself if (qualifier.hasAnyLocation()) { switch (qualifier.storage) { case EvqUniform: case EvqBuffer: if (symbol.getAsVariable() == nullptr) error(loc, "can only be used on variable declaration", "location", ""); break; default: break; } } // user-variable location check, which are required for SPIR-V in/out: // - variables have it directly, // - blocks have it on each member (already enforced), so check first one if (spvVersion.spv > 0 && !parsingBuiltins && qualifier.builtIn == EbvNone && !qualifier.hasLocation() && !intermediate.getAutoMapLocations()) { switch (qualifier.storage) { case EvqVaryingIn: case EvqVaryingOut: if (!type.getQualifier().isTaskMemory() && !type.getQualifier().hasSpirvDecorate() && (type.getBasicType() != EbtBlock || (!(*type.getStruct())[0].type->getQualifier().hasLocation() && (*type.getStruct())[0].type->getQualifier().builtIn == EbvNone))) error(loc, "SPIR-V requires location for user input/output", "location", ""); break; default: break; } } // Check packing and matrix if (qualifier.hasUniformLayout()) { switch (qualifier.storage) { case EvqUniform: case EvqBuffer: if (type.getBasicType() != EbtBlock) { if (qualifier.hasMatrix()) error(loc, "cannot specify matrix layout on a variable declaration", "layout", ""); if (qualifier.hasPacking()) error(loc, "cannot specify packing on a variable declaration", "layout", ""); // "The offset qualifier can only be used on block members of blocks..." if (qualifier.hasOffset() && !type.isAtomic()) error(loc, "cannot specify on a variable declaration", "offset", ""); // "The align qualifier can only be used on blocks or block members..." if (qualifier.hasAlign()) error(loc, "cannot specify on a variable declaration", "align", ""); if (qualifier.isPushConstant()) error(loc, "can only specify on a uniform block", "push_constant", ""); if (qualifier.isShaderRecord()) error(loc, "can only specify on a buffer block", "shaderRecordNV", ""); if (qualifier.hasLocation() && type.isAtomic()) error(loc, "cannot specify on atomic counter", "location", ""); } break; default: // these were already filtered by layoutTypeCheck() (or its callees) break; } } } // "For some blocks declared as arrays, the location can only be applied at the block level: // When a block is declared as an array where additional locations are needed for each member // for each block array element, it is a compile-time error to specify locations on the block // members. That is, when locations would be under specified by applying them on block members, // they are not allowed on block members. For arrayed interfaces (those generally having an // extra level of arrayness due to interface expansion), the outer array is stripped before // applying this rule." void TParseContext::layoutMemberLocationArrayCheck(const TSourceLoc& loc, bool memberWithLocation, TArraySizes* arraySizes) { if (memberWithLocation && arraySizes != nullptr) { if (arraySizes->getNumDims() > (currentBlockQualifier.isArrayedIo(language) ? 1 : 0)) error(loc, "cannot use in a block array where new locations are needed for each block element", "location", ""); } } // Do layout error checking with respect to a type. void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type) { const TQualifier& qualifier = type.getQualifier(); // first, intra-layout qualifier-only error checking layoutQualifierCheck(loc, qualifier); // now, error checking combining type and qualifier if (qualifier.hasAnyLocation()) { if (qualifier.hasLocation()) { if (qualifier.storage == EvqVaryingOut && language == EShLangFragment) { if (qualifier.layoutLocation >= (unsigned int)resources.maxDrawBuffers) error(loc, "too large for fragment output", "location", ""); } } if (qualifier.hasComponent()) { // "It is a compile-time error if this sequence of components gets larger than 3." if (qualifier.layoutComponent + type.getVectorSize() * (type.getBasicType() == EbtDouble ? 2 : 1) > 4) error(loc, "type overflows the available 4 components", "component", ""); // "It is a compile-time error to apply the component qualifier to a matrix, a structure, a block, or an array containing any of these." if (type.isMatrix() || type.getBasicType() == EbtBlock || type.getBasicType() == EbtStruct) error(loc, "cannot apply to a matrix, structure, or block", "component", ""); // " It is a compile-time error to use component 1 or 3 as the beginning of a double or dvec2." if (type.getBasicType() == EbtDouble) if (qualifier.layoutComponent & 1) error(loc, "doubles cannot start on an odd-numbered component", "component", ""); } switch (qualifier.storage) { case EvqVaryingIn: case EvqVaryingOut: if (type.getBasicType() == EbtBlock) profileRequires(loc, ECoreProfile | ECompatibilityProfile, 440, E_GL_ARB_enhanced_layouts, "location qualifier on in/out block"); if (type.getQualifier().isTaskMemory()) error(loc, "cannot apply to taskNV in/out blocks", "location", ""); break; case EvqUniform: case EvqBuffer: if (type.getBasicType() == EbtBlock) error(loc, "cannot apply to uniform or buffer block", "location", ""); else if (type.getBasicType() == EbtSampler && type.getSampler().isAttachmentEXT()) error(loc, "only applies to", "location", "%s with storage tileImageEXT", type.getBasicTypeString().c_str()); break; case EvqtaskPayloadSharedEXT: error(loc, "cannot apply to taskPayloadSharedEXT", "location", ""); break; case EvqPayload: case EvqPayloadIn: case EvqHitAttr: case EvqCallableData: case EvqCallableDataIn: case EvqHitObjectAttrNV: case EvqSpirvStorageClass: break; case EvqTileImageEXT: break; default: error(loc, "can only apply to uniform, buffer, in, or out storage qualifiers", "location", ""); break; } bool typeCollision; int repeated = intermediate.addUsedLocation(messages, qualifier, type, typeCollision); if (repeated >= 0 && ! typeCollision) error(loc, "overlapping use of location", "location", "%d", repeated); // When location aliasing, the aliases sharing the location must have the same underlying numerical type and bit width( // floating - point or integer, 32 - bit versus 64 - bit,etc.) if (typeCollision && (qualifier.isPipeInput() || qualifier.isPipeOutput() || qualifier.storage == EvqTileImageEXT)) error(loc, "the aliases sharing the location", "location", "%d must be the same basic type and interpolation qualification", repeated); } if (qualifier.hasXfbOffset() && qualifier.hasXfbBuffer()) { if (type.isUnsizedArray()) { error(loc, "unsized array", "xfb_offset", "in buffer %d", qualifier.layoutXfbBuffer); } else { int repeated = intermediate.addXfbBufferOffset(type); if (repeated >= 0) error(loc, "overlapping offsets at", "xfb_offset", "offset %d in buffer %d", repeated, qualifier.layoutXfbBuffer); } // "The offset must be a multiple of the size of the first component of the first // qualified variable or block member, or a compile-time error results. Further, if applied to an aggregate // containing a double or 64-bit integer, the offset must also be a multiple of 8..." if ((type.containsBasicType(EbtDouble) || type.containsBasicType(EbtInt64) || type.containsBasicType(EbtUint64)) && ! IsMultipleOfPow2(qualifier.layoutXfbOffset, 8)) error(loc, "type contains double or 64-bit integer; xfb_offset must be a multiple of 8", "xfb_offset", ""); else if ((type.containsBasicType(EbtBool) || type.containsBasicType(EbtFloat) || type.containsBasicType(EbtInt) || type.containsBasicType(EbtUint)) && ! IsMultipleOfPow2(qualifier.layoutXfbOffset, 4)) error(loc, "must be a multiple of size of first component", "xfb_offset", ""); // ..., if applied to an aggregate containing a half float or 16-bit integer, the offset must also be a multiple of 2..." else if ((type.contains16BitFloat() || type.containsBasicType(EbtInt16) || type.containsBasicType(EbtUint16)) && !IsMultipleOfPow2(qualifier.layoutXfbOffset, 2)) error(loc, "type contains half float or 16-bit integer; xfb_offset must be a multiple of 2", "xfb_offset", ""); } if (qualifier.hasXfbStride() && qualifier.hasXfbBuffer()) { if (! intermediate.setXfbBufferStride(qualifier.layoutXfbBuffer, qualifier.layoutXfbStride)) error(loc, "all stride settings must match for xfb buffer", "xfb_stride", "%d", qualifier.layoutXfbBuffer); } if (qualifier.hasBinding()) { // Binding checking, from the spec: // // "If the binding point for any uniform or shader storage block instance is less than zero, or greater than or // equal to the implementation-dependent maximum number of uniform buffer bindings, a compile-time // error will occur. When the binding identifier is used with a uniform or shader storage block instanced as // an array of size N, all elements of the array from binding through binding + N - 1 must be within this // range." // if (!type.isOpaque() && type.getBasicType() != EbtBlock && type.getBasicType() != EbtSpirvType) error(loc, "requires block, or sampler/image, or atomic-counter type", "binding", ""); if (type.getBasicType() == EbtSampler) { int lastBinding = qualifier.layoutBinding; if (type.isArray()) { if (spvVersion.vulkan == 0) { if (type.isSizedArray()) lastBinding += (type.getCumulativeArraySize() - 1); else { warn(loc, "assuming binding count of one for compile-time checking of binding numbers for unsized array", "[]", ""); } } } if (spvVersion.vulkan == 0 && lastBinding >= resources.maxCombinedTextureImageUnits) error(loc, "sampler binding not less than gl_MaxCombinedTextureImageUnits", "binding", type.isArray() ? "(using array)" : ""); } if (type.isAtomic() && !spvVersion.vulkanRelaxed) { if (qualifier.layoutBinding >= (unsigned int)resources.maxAtomicCounterBindings) { error(loc, "atomic_uint binding is too large; see gl_MaxAtomicCounterBindings", "binding", ""); return; } } } else if (!intermediate.getAutoMapBindings()) { // some types require bindings // atomic_uint if (type.isAtomic()) error(loc, "layout(binding=X) is required", "atomic_uint", ""); // SPIR-V if (spvVersion.spv > 0) { if (qualifier.isUniformOrBuffer()) { if (type.getBasicType() == EbtBlock && !qualifier.isPushConstant() && !qualifier.isShaderRecord() && !qualifier.hasAttachment() && !qualifier.hasBufferReference()) error(loc, "uniform/buffer blocks require layout(binding=X)", "binding", ""); else if (spvVersion.vulkan > 0 && type.getBasicType() == EbtSampler && !type.getSampler().isAttachmentEXT()) error(loc, "sampler/texture/image requires layout(binding=X)", "binding", ""); } } } // some things can't have arrays of arrays if (type.isArrayOfArrays()) { if (spvVersion.vulkan > 0) { if (type.isOpaque() || (type.getQualifier().isUniformOrBuffer() && type.getBasicType() == EbtBlock)) warn(loc, "Generating SPIR-V array-of-arrays, but Vulkan only supports single array level for this resource", "[][]", ""); } } // "The offset qualifier can only be used on block members of blocks..." if (qualifier.hasOffset()) { if (type.getBasicType() == EbtBlock) error(loc, "only applies to block members, not blocks", "offset", ""); } // Image format if (qualifier.hasFormat()) { if (! type.isImage() && !intermediate.getBindlessImageMode()) error(loc, "only apply to images", TQualifier::getLayoutFormatString(qualifier.getFormat()), ""); else { if (type.getSampler().type == EbtFloat && qualifier.getFormat() > ElfFloatGuard) error(loc, "does not apply to floating point images", TQualifier::getLayoutFormatString(qualifier.getFormat()), ""); if (type.getSampler().type == EbtInt && (qualifier.getFormat() < ElfFloatGuard || qualifier.getFormat() > ElfIntGuard)) error(loc, "does not apply to signed integer images", TQualifier::getLayoutFormatString(qualifier.getFormat()), ""); if (type.getSampler().type == EbtUint && qualifier.getFormat() < ElfIntGuard) error(loc, "does not apply to unsigned integer images", TQualifier::getLayoutFormatString(qualifier.getFormat()), ""); if (isEsProfile()) { // "Except for image variables qualified with the format qualifiers r32f, r32i, and r32ui, image variables must // specify either memory qualifier readonly or the memory qualifier writeonly." if (! (qualifier.getFormat() == ElfR32f || qualifier.getFormat() == ElfR32i || qualifier.getFormat() == ElfR32ui)) { if (! qualifier.isReadOnly() && ! qualifier.isWriteOnly()) error(loc, "format requires readonly or writeonly memory qualifier", TQualifier::getLayoutFormatString(qualifier.getFormat()), ""); } } } } else if (type.isImage() && ! qualifier.isWriteOnly() && !intermediate.getBindlessImageMode()) { const char *explanation = "image variables not declared 'writeonly' and without a format layout qualifier"; requireProfile(loc, ECoreProfile | ECompatibilityProfile, explanation); profileRequires(loc, ECoreProfile | ECompatibilityProfile, 0, E_GL_EXT_shader_image_load_formatted, explanation); } if (qualifier.isPushConstant()) { if (type.getBasicType() != EbtBlock) error(loc, "can only be used with a block", "push_constant", ""); if (type.isArray()) error(loc, "Push constants blocks can't be an array", "push_constant", ""); } if (type.getBasicType() == EbtReference) { if (qualifier.isPipeInput()) error(loc, "cannot contain any structs with buffer_reference.", "in", "If you want to interface shader stages with a buffer_reference cast to a uint64 or uvec2 instead."); if (qualifier.isPipeOutput()) error(loc, "cannot contain any structs with buffer_reference.", "out", "If you want to interface shader stages with a buffer_reference cast to a uint64 or uvec2 instead."); } if (qualifier.hasBufferReference() && type.getBasicType() != EbtBlock) error(loc, "can only be used with a block", "buffer_reference", ""); if (qualifier.isShaderRecord() && type.getBasicType() != EbtBlock) error(loc, "can only be used with a block", "shaderRecordNV", ""); // input attachment if (type.isSubpass()) { if (extensionTurnedOn(E_GL_EXT_shader_tile_image)) error(loc, "cannot be used with GL_EXT_shader_tile_image enabled", type.getSampler().getString().c_str(), ""); if (! qualifier.hasAttachment()) error(loc, "requires an input_attachment_index layout qualifier", "subpass", ""); } else { if (qualifier.hasAttachment()) error(loc, "can only be used with a subpass", "input_attachment_index", ""); } // specialization-constant id if (qualifier.hasSpecConstantId()) { if (type.getQualifier().storage != EvqConst) error(loc, "can only be applied to 'const'-qualified scalar", "constant_id", ""); if (! type.isScalar()) error(loc, "can only be applied to a scalar", "constant_id", ""); switch (type.getBasicType()) { case EbtInt8: case EbtUint8: case EbtInt16: case EbtUint16: case EbtInt: case EbtUint: case EbtInt64: case EbtUint64: case EbtBool: case EbtFloat: case EbtDouble: case EbtFloat16: case EbtBFloat16: case EbtFloatE5M2: case EbtFloatE4M3: break; default: error(loc, "cannot be applied to this type", "constant_id", ""); break; } } } static bool storageCanHaveLayoutInBlock(const enum TStorageQualifier storage) { switch (storage) { case EvqUniform: case EvqBuffer: case EvqShared: return true; default: return false; } } // Do layout error checking that can be done within a layout qualifier proper, not needing to know // if there are blocks, atomic counters, variables, etc. void TParseContext::layoutQualifierCheck(const TSourceLoc& loc, const TQualifier& qualifier) { if (qualifier.storage == EvqShared && qualifier.hasLayout()) { if (spvVersion.spv > 0 && spvVersion.spv < EShTargetSpv_1_4) { error(loc, "shared block requires at least SPIR-V 1.4", "shared block", ""); } profileRequires(loc, EEsProfile | ECoreProfile | ECompatibilityProfile, 0, E_GL_EXT_shared_memory_block, "shared block"); } // "It is a compile-time error to use *component* without also specifying the location qualifier (order does not matter)." if (qualifier.hasComponent() && ! qualifier.hasLocation()) error(loc, "must specify 'location' to use 'component'", "component", ""); if (qualifier.hasAnyLocation()) { // "As with input layout qualifiers, all shaders except compute shaders // allow *location* layout qualifiers on output variable declarations, // output block declarations, and output block member declarations." switch (qualifier.storage) { case EvqVaryingIn: { const char* feature = "location qualifier on input"; if (isEsProfile() && version < 310) requireStage(loc, EShLangVertex, feature); else requireStage(loc, (EShLanguageMask)~EShLangComputeMask, feature); if (language == EShLangVertex) { const char* exts[2] = { E_GL_ARB_separate_shader_objects, E_GL_ARB_explicit_attrib_location }; profileRequires(loc, ~EEsProfile, 330, 2, exts, feature); profileRequires(loc, EEsProfile, 300, nullptr, feature); } else { profileRequires(loc, ~EEsProfile, 410, E_GL_ARB_separate_shader_objects, feature); profileRequires(loc, EEsProfile, 310, nullptr, feature); } break; } case EvqVaryingOut: { const char* feature = "location qualifier on output"; if (isEsProfile() && version < 310) requireStage(loc, EShLangFragment, feature); else requireStage(loc, (EShLanguageMask)~EShLangComputeMask, feature); if (language == EShLangFragment) { const char* exts[2] = { E_GL_ARB_separate_shader_objects, E_GL_ARB_explicit_attrib_location }; profileRequires(loc, ~EEsProfile, 330, 2, exts, feature); profileRequires(loc, EEsProfile, 300, nullptr, feature); } else { profileRequires(loc, ~EEsProfile, 410, E_GL_ARB_separate_shader_objects, feature); profileRequires(loc, EEsProfile, 310, nullptr, feature); } break; } case EvqUniform: case EvqBuffer: { const char* feature = "location qualifier on uniform or buffer"; requireProfile(loc, EEsProfile | ECoreProfile | ECompatibilityProfile | ENoProfile, feature); profileRequires(loc, ~EEsProfile, 330, E_GL_ARB_explicit_attrib_location, feature); profileRequires(loc, ~EEsProfile, 430, E_GL_ARB_explicit_uniform_location, feature); profileRequires(loc, EEsProfile, 310, nullptr, feature); break; } default: break; } if (qualifier.hasIndex()) { if (qualifier.storage != EvqVaryingOut) error(loc, "can only be used on an output", "index", ""); if (! qualifier.hasLocation()) error(loc, "can only be used with an explicit location", "index", ""); } } if (qualifier.hasBinding()) { if (! qualifier.isUniformOrBuffer() && !qualifier.isTaskMemory() && !qualifier.isTileAttachmentQCOM()) error(loc, "requires uniform or buffer or tile image storage qualifier", "binding", ""); } if (qualifier.hasStream()) { if (!qualifier.isPipeOutput()) error(loc, "can only be used on an output", "stream", ""); } if (qualifier.hasXfb()) { if (!qualifier.isPipeOutput()) error(loc, "can only be used on an output", "xfb layout qualifier", ""); } if (qualifier.hasUniformLayout()) { if (!storageCanHaveLayoutInBlock(qualifier.storage) && !qualifier.isTaskMemory()) { if (qualifier.hasMatrix() || qualifier.hasPacking()) error(loc, "matrix or packing qualifiers can only be used on a uniform or buffer", "layout", ""); if (qualifier.hasOffset() || qualifier.hasAlign()) error(loc, "offset/align can only be used on a uniform or buffer", "layout", ""); } } if (qualifier.isPushConstant()) { if (qualifier.storage != EvqUniform) error(loc, "can only be used with a uniform", "push_constant", ""); if (qualifier.hasSet()) error(loc, "cannot be used with push_constant", "set", ""); if (qualifier.hasBinding()) error(loc, "cannot be used with push_constant", "binding", ""); } if (qualifier.hasBufferReference()) { if (qualifier.storage != EvqBuffer) error(loc, "can only be used with buffer", "buffer_reference", ""); } if (qualifier.isShaderRecord()) { if (qualifier.storage != EvqBuffer) error(loc, "can only be used with a buffer", "shaderRecordNV", ""); if (qualifier.hasBinding()) error(loc, "cannot be used with shaderRecordNV", "binding", ""); if (qualifier.hasSet()) error(loc, "cannot be used with shaderRecordNV", "set", ""); } if (qualifier.storage == EvqTileImageEXT) { if (qualifier.hasSet()) error(loc, "cannot be used with tileImageEXT", "set", ""); if (!qualifier.hasLocation()) error(loc, "can only be used with an explicit location", "tileImageEXT", ""); } if (qualifier.storage == EvqHitAttr && qualifier.hasLayout()) { error(loc, "cannot apply layout qualifiers to hitAttributeNV variable", "hitAttributeNV", ""); } } // For places that can't have shader-level layout qualifiers void TParseContext::checkNoShaderLayouts(const TSourceLoc& loc, const TShaderQualifiers& shaderQualifiers) { const char* message = "can only apply to a standalone qualifier"; if (shaderQualifiers.geometry != ElgNone) error(loc, message, TQualifier::getGeometryString(shaderQualifiers.geometry), ""); if (shaderQualifiers.spacing != EvsNone) error(loc, message, TQualifier::getVertexSpacingString(shaderQualifiers.spacing), ""); if (shaderQualifiers.order != EvoNone) error(loc, message, TQualifier::getVertexOrderString(shaderQualifiers.order), ""); if (shaderQualifiers.pointMode) error(loc, message, "point_mode", ""); if (shaderQualifiers.invocations != TQualifier::layoutNotSet) error(loc, message, "invocations", ""); for (int i = 0; i < 3; ++i) { if (shaderQualifiers.localSize[i] > 1) error(loc, message, "local_size", ""); if (shaderQualifiers.localSizeSpecId[i] != TQualifier::layoutNotSet) error(loc, message, "local_size id", ""); } if (shaderQualifiers.vertices != TQualifier::layoutNotSet) { if (language == EShLangGeometry || language == EShLangMesh) error(loc, message, "max_vertices", ""); else if (language == EShLangTessControl) error(loc, message, "vertices", ""); else assert(0); } if (shaderQualifiers.earlyFragmentTests) error(loc, message, "early_fragment_tests", ""); if (shaderQualifiers.postDepthCoverage) error(loc, message, "post_depth_coverage", ""); if (shaderQualifiers.nonCoherentColorAttachmentReadEXT) error(loc, message, "non_coherent_color_attachment_readEXT", ""); if (shaderQualifiers.nonCoherentDepthAttachmentReadEXT) error(loc, message, "non_coherent_depth_attachment_readEXT", ""); if (shaderQualifiers.nonCoherentStencilAttachmentReadEXT) error(loc, message, "non_coherent_stencil_attachment_readEXT", ""); if (shaderQualifiers.primitives != TQualifier::layoutNotSet) { if (language == EShLangMesh) error(loc, message, "max_primitives", ""); else assert(0); } if (shaderQualifiers.hasBlendEquation()) error(loc, message, "blend equation", ""); if (shaderQualifiers.numViews != TQualifier::layoutNotSet) error(loc, message, "num_views", ""); if (shaderQualifiers.interlockOrdering != EioNone) error(loc, message, TQualifier::getInterlockOrderingString(shaderQualifiers.interlockOrdering), ""); if (shaderQualifiers.layoutPrimitiveCulling) error(loc, "can only be applied as standalone", "primitive_culling", ""); if (shaderQualifiers.layoutNonCoherentTileAttachmentReadQCOM) error(loc, message, "non_coherent_attachment_readQCOM", ""); if (shaderQualifiers.layoutTileShadingRateQCOM[0] >= 1) error(loc, message, "shading_rate_xQCOM", ""); if (shaderQualifiers.layoutTileShadingRateQCOM[1] >= 1) error(loc, message, "shading_rate_yQCOM", ""); if (shaderQualifiers.layoutTileShadingRateQCOM[2] >= 1) error(loc, message, "shading_rate_zQCOM", ""); } // Correct and/or advance an object's offset layout qualifier. void TParseContext::fixOffset(const TSourceLoc& loc, TSymbol& symbol) { const TQualifier& qualifier = symbol.getType().getQualifier(); if (symbol.getType().isAtomic()) { if (qualifier.hasBinding() && (int)qualifier.layoutBinding < resources.maxAtomicCounterBindings) { // Set the offset int offset; if (qualifier.hasOffset()) offset = qualifier.layoutOffset; else offset = atomicUintOffsets[qualifier.layoutBinding]; if (offset % 4 != 0) error(loc, "atomic counters offset should align based on 4:", "offset", "%d", offset); symbol.getWritableType().getQualifier().layoutOffset = offset; // Check for overlap int numOffsets = 4; if (symbol.getType().isArray()) { if (symbol.getType().isSizedArray() && !symbol.getType().getArraySizes()->isInnerUnsized()) numOffsets *= symbol.getType().getCumulativeArraySize(); else { // "It is a compile-time error to declare an unsized array of atomic_uint." error(loc, "array must be explicitly sized", "atomic_uint", ""); } } int repeated = intermediate.addUsedOffsets(qualifier.layoutBinding, offset, numOffsets); if (repeated >= 0) error(loc, "atomic counters sharing the same offset:", "offset", "%d", repeated); // Bump the default offset atomicUintOffsets[qualifier.layoutBinding] = offset + numOffsets; } } } // // Look up a function name in the symbol table, and make sure it is a function. // // Return the function symbol if found, otherwise nullptr. // const TFunction* TParseContext::findFunction(const TSourceLoc& loc, const TFunction& call, bool& builtIn) { if (symbolTable.isFunctionNameVariable(call.getName())) { error(loc, "can't use function syntax on variable", call.getName().c_str(), ""); return nullptr; } const TFunction* function = nullptr; // debugPrintfEXT has var args and is in the symbol table as "debugPrintfEXT()", // mangled to "debugPrintfEXT(" if (call.getName() == "debugPrintfEXT") { TSymbol* symbol = symbolTable.find("debugPrintfEXT(", &builtIn); if (symbol) return symbol->getAsFunction(); } // coopMatPerElementNV is variadic. There is some function signature error // checking in handleCoopMat2FunctionCall. if (call.getName() == "coopMatPerElementNV") { TSymbol* symbol = symbolTable.find("coopMatPerElementNV(", &builtIn); if (symbol) return symbol->getAsFunction(); } if (call.getName() == "saturatedConvertEXT") { TSymbol* symbol = symbolTable.find("saturatedConvertEXT(", &builtIn); if (symbol) return symbol->getAsFunction(); } bool explicitTypesEnabled = extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types) || extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types_int8) || extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types_int16) || extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types_int32) || extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types_int64) || extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types_float16) || extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types_float32) || extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types_float64); if (isEsProfile()) function = (explicitTypesEnabled && version >= 310) ? findFunctionExplicitTypes(loc, call, builtIn) : ((extensionTurnedOn(E_GL_EXT_shader_implicit_conversions) && version >= 310) ? findFunction120(loc, call, builtIn) : findFunctionExact(loc, call, builtIn)); else if (version < 120) function = findFunctionExact(loc, call, builtIn); else if (version < 400) { bool needfindFunction400 = extensionTurnedOn(E_GL_ARB_gpu_shader_fp64) || extensionTurnedOn(E_GL_ARB_gpu_shader5) || extensionTurnedOn(E_GL_NV_gpu_shader5); function = needfindFunction400 ? findFunction400(loc, call, builtIn) : findFunction120(loc, call, builtIn); } else if (explicitTypesEnabled) function = findFunctionExplicitTypes(loc, call, builtIn); else function = findFunction400(loc, call, builtIn); return function; } // Function finding algorithm for ES and desktop 110. const TFunction* TParseContext::findFunctionExact(const TSourceLoc& loc, const TFunction& call, bool& builtIn) { TSymbol* symbol = symbolTable.find(call.getMangledName(), &builtIn); if (symbol == nullptr) { error(loc, "no matching overloaded function found", call.getName().c_str(), ""); return nullptr; } return symbol->getAsFunction(); } // Function finding algorithm for desktop versions 120 through 330. const TFunction* TParseContext::findFunction120(const TSourceLoc& loc, const TFunction& call, bool& builtIn) { // first, look for an exact match TSymbol* symbol = symbolTable.find(call.getMangledName(), &builtIn); if (symbol) return symbol->getAsFunction(); // exact match not found, look through a list of overloaded functions of the same name // "If no exact match is found, then [implicit conversions] will be applied to find a match. Mismatched types // on input parameters (in or inout or default) must have a conversion from the calling argument type to the // formal parameter type. Mismatched types on output parameters (out or inout) must have a conversion // from the formal parameter type to the calling argument type. When argument conversions are used to find // a match, it is a semantic error if there are multiple ways to apply these conversions to make the call match // more than one function." const TFunction* candidate = nullptr; TVector candidateList; symbolTable.findFunctionNameList(call.getMangledName(), candidateList, builtIn); for (auto it = candidateList.begin(); it != candidateList.end(); ++it) { const TFunction& function = *(*it); // to even be a potential match, number of arguments has to match if (call.getParamCount() != function.getParamCount()) continue; bool possibleMatch = true; for (int i = 0; i < function.getParamCount(); ++i) { // same types is easy if (*function[i].type == *call[i].type) continue; // We have a mismatch in type, see if it is implicitly convertible if (function[i].type->isArray() || call[i].type->isArray() || ! function[i].type->sameElementShape(*call[i].type)) possibleMatch = false; else { // do direction-specific checks for conversion of basic type if (function[i].type->getQualifier().isParamInput()) { if (! intermediate.canImplicitlyPromote(call[i].type->getBasicType(), function[i].type->getBasicType())) possibleMatch = false; } if (function[i].type->getQualifier().isParamOutput()) { if (! intermediate.canImplicitlyPromote(function[i].type->getBasicType(), call[i].type->getBasicType())) possibleMatch = false; } } if (! possibleMatch) break; } if (possibleMatch) { if (candidate) { // our second match, meaning ambiguity error(loc, "ambiguous function signature match: multiple signatures match under implicit type conversion", call.getName().c_str(), ""); } else candidate = &function; } } if (candidate == nullptr) error(loc, "no matching overloaded function found", call.getName().c_str(), ""); return candidate; } // Function finding algorithm for desktop version 400 and above. // // "When function calls are resolved, an exact type match for all the arguments // is sought. If an exact match is found, all other functions are ignored, and // the exact match is used. If no exact match is found, then the implicit // conversions in section 4.1.10 Implicit Conversions will be applied to find // a match. Mismatched types on input parameters (in or inout or default) must // have a conversion from the calling argument type to the formal parameter type. // Mismatched types on output parameters (out or inout) must have a conversion // from the formal parameter type to the calling argument type. // // "If implicit conversions can be used to find more than one matching function, // a single best-matching function is sought. To determine a best match, the // conversions between calling argument and formal parameter types are compared // for each function argument and pair of matching functions. After these // comparisons are performed, each pair of matching functions are compared. // A function declaration A is considered a better match than function // declaration B if // // * for at least one function argument, the conversion for that argument in A // is better than the corresponding conversion in B; and // * there is no function argument for which the conversion in B is better than // the corresponding conversion in A. // // "If a single function declaration is considered a better match than every // other matching function declaration, it will be used. Otherwise, a // compile-time semantic error for an ambiguous overloaded function call occurs. // // "To determine whether the conversion for a single argument in one match is // better than that for another match, the following rules are applied, in order: // // 1. An exact match is better than a match involving any implicit conversion. // 2. A match involving an implicit conversion from float to double is better // than a match involving any other implicit conversion. // 3. A match involving an implicit conversion from either int or uint to float // is better than a match involving an implicit conversion from either int // or uint to double. // // "If none of the rules above apply to a particular pair of conversions, neither // conversion is considered better than the other." // const TFunction* TParseContext::findFunction400(const TSourceLoc& loc, const TFunction& call, bool& builtIn) { // first, look for an exact match TSymbol* symbol = symbolTable.find(call.getMangledName(), &builtIn); if (symbol) return symbol->getAsFunction(); // no exact match, use the generic selector, parameterized by the GLSL rules // create list of candidates to send TVector candidateList; symbolTable.findFunctionNameList(call.getMangledName(), candidateList, builtIn); // can 'from' convert to 'to'? const auto convertible = [this,builtIn](const TType& from, const TType& to, TOperator op, int param) -> bool { if (from == to) return true; if (from.coopMatParameterOK(to)) return true; if (from.tensorParameterOK(to)) return true; if (from.getBasicType() == EbtFunction && to.getBasicType() == EbtFunction) return true; if (from.coopVecParameterOK(to)) return true; // Allow a sized array to be passed through an unsized array parameter, for coopMatLoad/Store functions if (builtIn && from.isArray() && to.isUnsizedArray()) { TType fromElementType(from, 0); TType toElementType(to, 0); // Load/store tensor functions allow any element type for the pointer if ((op == EOpCooperativeMatrixLoadTensorNV || op == EOpCooperativeMatrixStoreTensorNV) && param == 1 && (from.getQualifier().storage == EvqBuffer || from.getQualifier().storage == EvqShared)) { return true; } if (fromElementType == toElementType) return true; } if (from.isArray() || to.isArray() || ! from.sameElementShape(to)) return false; if (from.isCoopMat() && to.isCoopMat()) return from.sameCoopMatBaseType(to); if (from.isCoopVecNV() && to.isCoopVecNV()) return from.sameCoopVecBaseType(to); return intermediate.canImplicitlyPromote(from.getBasicType(), to.getBasicType()); }; // Is 'to2' a better conversion than 'to1'? // Ties should not be considered as better. // Assumes 'convertible' already said true. const auto better = [&](const TType& from, const TType& to1, const TType& to2) -> bool { // 1. exact match if (from == to2) return from != to1; if (from == to1) return false; if (extensionTurnedOn(E_GL_NV_gpu_shader5)) { // This map refers to the conversion table mentioned under the // section "Modify Section 6.1, Function Definitions, p. 63" in NV_gpu_shader5 spec const static std::map> conversionTable = { {EbtInt8, {EbtInt, EbtInt64}}, {EbtInt16, {EbtInt, EbtInt64}}, {EbtInt, {EbtInt64}}, {EbtUint8, {EbtUint, EbtUint64}}, {EbtUint16, {EbtUint, EbtUint64}}, {EbtUint, {EbtUint64}}, }; auto source = conversionTable.find(from.getBasicType()); if (source != conversionTable.end()) { for (auto destination : source->second) { if (to2.getBasicType() == destination && to1.getBasicType() != destination) // to2 is better then to1 return true; else if (to1.getBasicType() == destination && to2.getBasicType() != destination) // This means to1 is better then to2 return false; } } } // 2. float -> double is better if (from.getBasicType() == EbtFloat) { if (to2.getBasicType() == EbtDouble && to1.getBasicType() != EbtDouble) return true; } // 3. -> float is better than -> double return to2.getBasicType() == EbtFloat && to1.getBasicType() == EbtDouble; }; // for ambiguity reporting bool tie = false; // send to the generic selector const TFunction* bestMatch = selectFunction(candidateList, call, convertible, better, tie); if (bestMatch == nullptr) error(loc, "no matching overloaded function found", call.getName().c_str(), ""); else if (tie) error(loc, "ambiguous best function under implicit type conversion", call.getName().c_str(), ""); return bestMatch; } // "To determine whether the conversion for a single argument in one match // is better than that for another match, the conversion is assigned of the // three ranks ordered from best to worst: // 1. Exact match: no conversion. // 2. Promotion: integral or floating-point promotion. // 3. Conversion: integral conversion, floating-point conversion, // floating-integral conversion. // A conversion C1 is better than a conversion C2 if the rank of C1 is // better than the rank of C2." const TFunction* TParseContext::findFunctionExplicitTypes(const TSourceLoc& loc, const TFunction& call, bool& builtIn) { // first, look for an exact match TSymbol* symbol = symbolTable.find(call.getMangledName(), &builtIn); if (symbol) return symbol->getAsFunction(); // no exact match, use the generic selector, parameterized by the GLSL rules // create list of candidates to send TVector candidateList; symbolTable.findFunctionNameList(call.getMangledName(), candidateList, builtIn); // can 'from' convert to 'to'? const auto convertible = [this,builtIn](const TType& from, const TType& to, TOperator op, int param) -> bool { if (from == to) return true; if (from.coopMatParameterOK(to)) return true; if (from.tensorParameterOK(to)) return true; if (from.getBasicType() == EbtFunction && to.getBasicType() == EbtFunction) return true; if (from.coopVecParameterOK(to)) return true; // Allow a sized array to be passed through an unsized array parameter, for coopMatLoad/Store functions if (builtIn && from.isArray() && to.isUnsizedArray()) { TType fromElementType(from, 0); TType toElementType(to, 0); // Load/store tensor functions allow any element type for the pointer if ((op == EOpCooperativeMatrixLoadTensorNV || op == EOpCooperativeMatrixStoreTensorNV) && param == 1 && (from.getQualifier().storage == EvqBuffer || from.getQualifier().storage == EvqShared)) { return true; } if (fromElementType == toElementType) return true; } if (from.isArray() || to.isArray() || ! from.sameElementShape(to)) return false; if (from.isCoopMat() && to.isCoopMat()) return from.sameCoopMatBaseType(to); if (from.isCoopVecNV() && to.isCoopVecNV()) return from.sameCoopVecBaseType(to); return intermediate.canImplicitlyPromote(from.getBasicType(), to.getBasicType()); }; // Is 'to2' a better conversion than 'to1'? // Ties should not be considered as better. // Assumes 'convertible' already said true. const auto better = [this](const TType& from, const TType& to1, const TType& to2) -> bool { // 1. exact match if (from == to2) return from != to1; if (from == to1) return false; // 2. Promotion (integral, floating-point) is better TBasicType from_type = from.getBasicType(); TBasicType to1_type = to1.getBasicType(); TBasicType to2_type = to2.getBasicType(); bool isPromotion1 = (intermediate.isIntegralPromotion(from_type, to1_type) || intermediate.isFPPromotion(from_type, to1_type)); bool isPromotion2 = (intermediate.isIntegralPromotion(from_type, to2_type) || intermediate.isFPPromotion(from_type, to2_type)); if (isPromotion2) return !isPromotion1; if(isPromotion1) return false; // 3. Conversion (integral, floating-point , floating-integral) bool isConversion1 = (intermediate.isIntegralConversion(from_type, to1_type) || intermediate.isFPConversion(from_type, to1_type) || intermediate.isFPIntegralConversion(from_type, to1_type)); bool isConversion2 = (intermediate.isIntegralConversion(from_type, to2_type) || intermediate.isFPConversion(from_type, to2_type) || intermediate.isFPIntegralConversion(from_type, to2_type)); return isConversion2 && !isConversion1; }; // for ambiguity reporting bool tie = false; // send to the generic selector const TFunction* bestMatch = selectFunction(candidateList, call, convertible, better, tie); if (bestMatch == nullptr) error(loc, "no matching overloaded function found", call.getName().c_str(), ""); else if (tie) error(loc, "ambiguous best function under implicit type conversion", call.getName().c_str(), ""); return bestMatch; } // // Adjust function calls that aren't declared in Vulkan to a // calls with equivalent effects // TIntermTyped* TParseContext::vkRelaxedRemapFunctionCall(const TSourceLoc& loc, TFunction* function, TIntermNode* arguments) { TIntermTyped* result = nullptr; if (function->getBuiltInOp() != EOpNull) { return nullptr; } if (function->getName() == "atomicCounterIncrement") { // change atomicCounterIncrement into an atomicAdd of 1 TString name("atomicAdd"); TType uintType(EbtUint); TFunction realFunc(&name, function->getType()); // Use copyParam to avoid shared ownership of the 'type' field // of the parameter. for (int i = 0; i < function->getParamCount(); ++i) { realFunc.addParameter(TParameter().copyParam((*function)[i])); } TParameter tmpP = { nullptr, &uintType, {} }; realFunc.addParameter(TParameter().copyParam(tmpP)); arguments = intermediate.growAggregate(arguments, intermediate.addConstantUnion(1, loc, true)); result = handleFunctionCall(loc, &realFunc, arguments); } else if (function->getName() == "atomicCounterDecrement") { // change atomicCounterDecrement into an atomicAdd with -1 // and subtract 1 from result, to return post-decrement value TString name("atomicAdd"); TType uintType(EbtUint); TFunction realFunc(&name, function->getType()); for (int i = 0; i < function->getParamCount(); ++i) { realFunc.addParameter(TParameter().copyParam((*function)[i])); } TParameter tmpP = { nullptr, &uintType, {} }; realFunc.addParameter(TParameter().copyParam(tmpP)); arguments = intermediate.growAggregate(arguments, intermediate.addConstantUnion(-1, loc, true)); result = handleFunctionCall(loc, &realFunc, arguments); // post decrement, so that it matches AtomicCounterDecrement semantics if (result) { result = handleBinaryMath(loc, "-", EOpSub, result, intermediate.addConstantUnion(1, loc, true)); } } else if (function->getName() == "atomicCounter") { // change atomicCounter into a direct read of the variable if (arguments && arguments->getAsTyped()) { result = arguments->getAsTyped(); } } return result; } // When a declaration includes a type, but not a variable name, it can be used // to establish defaults. void TParseContext::declareTypeDefaults(const TSourceLoc& loc, const TPublicType& publicType) { if (publicType.basicType == EbtAtomicUint && publicType.qualifier.hasBinding()) { if (publicType.qualifier.layoutBinding >= (unsigned int)resources.maxAtomicCounterBindings) { error(loc, "atomic_uint binding is too large", "binding", ""); return; } if (publicType.qualifier.hasOffset()) atomicUintOffsets[publicType.qualifier.layoutBinding] = publicType.qualifier.layoutOffset; return; } if (publicType.arraySizes) { error(loc, "expect an array name", "", ""); } if (publicType.qualifier.hasLayout() && !publicType.qualifier.hasBufferReference()) warn(loc, "useless application of layout qualifier", "layout", ""); } void TParseContext::typeParametersCheck(const TSourceLoc& loc, const TPublicType& publicType) { if (parsingBuiltins) return; if (publicType.isCoopmatKHR()) { if (publicType.typeParameters == nullptr) { error(loc, "coopmat missing type parameters", "", ""); return; } switch (publicType.typeParameters->basicType) { case EbtFloat: case EbtFloat16: case EbtBFloat16: case EbtFloatE5M2: case EbtFloatE4M3: case EbtInt: case EbtInt8: case EbtInt16: case EbtUint: case EbtUint8: case EbtUint16: case EbtSpirvType: break; default: error(loc, "coopmat invalid basic type", TType::getBasicString(publicType.typeParameters->basicType), ""); break; } if (publicType.typeParameters->arraySizes->getNumDims() != 4) { error(loc, "coopmat incorrect number of type parameters", "", ""); return; } int use = publicType.typeParameters->arraySizes->getDimSize(3); if (use < 0 || use > 2) { error(loc, "coopmat invalid matrix Use", "", ""); return; } } if (publicType.isTensorLayoutNV()) { if (publicType.typeParameters == nullptr) { error(loc, "tensorLayout missing type parameters", "", ""); return; } if (publicType.typeParameters->arraySizes->getNumDims() > 2) { error(loc, "tensorLayout incorrect number of type parameters", "", ""); return; } if (publicType.typeParameters && publicType.typeParameters->arraySizes->getNumDims() < 2) { while (publicType.typeParameters->arraySizes->getNumDims() < 2) { publicType.typeParameters->arraySizes->addInnerSize(0); } } } if (publicType.isTensorViewNV()) { if (publicType.typeParameters == nullptr) { error(loc, "tensorView missing type parameters", "", ""); return; } if (publicType.typeParameters->arraySizes->getNumDims() < 1 || publicType.typeParameters->arraySizes->getNumDims() > 7) { error(loc, "tensorView incorrect number of type parameters", "", ""); return; } if (publicType.typeParameters && publicType.typeParameters->arraySizes->getNumDims() < 7) { uint32_t numDims = publicType.typeParameters->arraySizes->getNumDims(); while (numDims < 7) { uint32_t dim = (numDims == 1) ? 0 : (numDims - 2); publicType.typeParameters->arraySizes->addInnerSize(dim); numDims++; } } } } bool TParseContext::vkRelaxedRemapUniformVariable(const TSourceLoc& loc, TString& identifier, const TPublicType& publicType, TArraySizes*, TIntermTyped* initializer, TType& type) { vkRelaxedRemapUniformMembers(loc, publicType, type, identifier); if (parsingBuiltins || symbolTable.atBuiltInLevel() || !symbolTable.atGlobalLevel() || type.getQualifier().storage != EvqUniform || !(type.containsNonOpaque() || type.getBasicType() == EbtAtomicUint || (type.containsSampler() && type.isStruct()))) { return false; } if (type.getQualifier().hasLocation()) { warn(loc, "ignoring layout qualifier for uniform", identifier.c_str(), "location"); type.getQualifier().layoutLocation = TQualifier::layoutLocationEnd; } if (initializer) { warn(loc, "Ignoring initializer for uniform", identifier.c_str(), ""); initializer = nullptr; } if (type.isArray()) { // do array size checks here arraySizesCheck(loc, type.getQualifier(), type.getArraySizes(), initializer, false); if (arrayQualifierError(loc, type.getQualifier()) || arrayError(loc, type)) { error(loc, "array param error", identifier.c_str(), ""); } } // do some checking on the type as it was declared layoutTypeCheck(loc, type); int bufferBinding = TQualifier::layoutBindingEnd; TVariable* updatedBlock = nullptr; // Convert atomic_uint into members of a buffer block if (type.isAtomic()) { type.setBasicType(EbtUint); type.getQualifier().storage = EvqBuffer; type.getQualifier().volatil = true; type.getQualifier().coherent = true; // xxTODO: use logic from fixOffset() to apply explicit member offset bufferBinding = type.getQualifier().layoutBinding; type.getQualifier().layoutBinding = TQualifier::layoutBindingEnd; type.getQualifier().explicitOffset = false; growAtomicCounterBlock(bufferBinding, loc, type, identifier, nullptr); updatedBlock = atomicCounterBuffers[bufferBinding]; } if (!updatedBlock) { growGlobalUniformBlock(loc, type, identifier, nullptr); updatedBlock = globalUniformBlock; } // // don't assign explicit member offsets here // if any are assigned, need to be updated here and in the merge/link step // fixBlockUniformOffsets(updatedBlock->getWritableType().getQualifier(), *updatedBlock->getWritableType().getWritableStruct()); // checks on update buffer object layoutObjectCheck(loc, *updatedBlock); TSymbol* symbol = symbolTable.find(identifier); if (!symbol) { if (updatedBlock == globalUniformBlock) error(loc, "error adding uniform to default uniform block", identifier.c_str(), ""); else error(loc, "error adding atomic counter to atomic counter block", identifier.c_str(), ""); return false; } // merge qualifiers mergeObjectLayoutQualifiers(updatedBlock->getWritableType().getQualifier(), type.getQualifier(), true); return true; } template static void ForEachOpaque(const TType& type, const TString& path, Function callback) { auto recursion = [&callback](const TType& type, const TString& path, bool skipArray, auto& recursion) -> void { if (!skipArray && type.isArray()) { std::vector indices(type.getArraySizes()->getNumDims()); for (int flatIndex = 0; flatIndex < type.getArraySizes()->getCumulativeSize(); ++flatIndex) { TString subscriptPath = path; for (size_t dimIndex = 0; dimIndex < indices.size(); ++dimIndex) { int index = indices[dimIndex]; subscriptPath.append("["); subscriptPath.append(String(index)); subscriptPath.append("]"); } recursion(type, subscriptPath, true, recursion); for (size_t dimIndex = 0; dimIndex < indices.size(); ++dimIndex) { ++indices[dimIndex]; if (indices[dimIndex] < type.getArraySizes()->getDimSize(dimIndex)) break; else indices[dimIndex] = 0; } } } else if (type.isStruct() && type.containsOpaque()) { const TTypeList& types = *type.getStruct(); for (const TTypeLoc& typeLoc : types) { TString nextPath = path; nextPath.append("."); nextPath.append(typeLoc.type->getFieldName()); recursion(*(typeLoc.type), nextPath, false, recursion); } } else if (type.isOpaque()) { callback(type, path); } }; recursion(type, path, false, recursion); } void TParseContext::vkRelaxedRemapUniformMembers(const TSourceLoc& loc, const TPublicType& publicType, const TType& type, const TString& identifier) { if (!type.isStruct() || !type.containsOpaque()) return; ForEachOpaque(type, identifier, [&publicType, &loc, this](const TType& type, const TString& path) { TArraySizes arraySizes = {}; if (type.getArraySizes()) arraySizes = *type.getArraySizes(); TTypeParameters typeParameters = {}; if (type.getTypeParameters()) typeParameters = *type.getTypeParameters(); TPublicType memberType{}; memberType.basicType = type.getBasicType(); memberType.sampler = type.getSampler(); memberType.qualifier = type.getQualifier(); memberType.vectorSize = type.getVectorSize(); memberType.matrixCols = type.getMatrixCols(); memberType.matrixRows = type.getMatrixRows(); memberType.coopmatNV = type.isCoopMatNV(); memberType.coopmatKHR = type.isCoopMatKHR(); memberType.arraySizes = nullptr; memberType.userDef = nullptr; memberType.loc = loc; memberType.typeParameters = (type.getTypeParameters() ? &typeParameters : nullptr); memberType.spirvType = nullptr; memberType.qualifier.storage = publicType.qualifier.storage; memberType.shaderQualifiers = publicType.shaderQualifiers; TString& structMemberName = *NewPoolTString(path.c_str()); // A copy is required due to declareVariable() signature. declareVariable(loc, structMemberName, memberType, nullptr, nullptr); }); } void TParseContext::vkRelaxedRemapFunctionParameter(TFunction* function, TParameter& param, std::vector* newParams) { function->addParameter(param); if (!param.type->isStruct() || !param.type->containsOpaque()) return; ForEachOpaque(*param.type, (param.name ? *param.name : param.type->getFieldName()), [function, param, newParams](const TType& type, const TString& path) { TString* memberName = NewPoolTString(path.c_str()); TType* memberType = new TType(); memberType->shallowCopy(type); memberType->getQualifier().storage = param.type->getQualifier().storage; memberType->clearArraySizes(); TParameter memberParam = {}; memberParam.name = memberName; memberParam.type = memberType; memberParam.defaultValue = nullptr; function->addParameter(memberParam); if (newParams) newParams->push_back(function->getParamCount()-1); }); } // // Generates a valid GLSL dereferencing string for the input TIntermNode // struct AccessChainTraverser : public TIntermTraverser { AccessChainTraverser() : TIntermTraverser(false, false, true) {} TString path = ""; TStorageQualifier topLevelStorageQualifier = TStorageQualifier::EvqLast; bool visitBinary(TVisit, TIntermBinary* binary) override { if (binary->getOp() == EOpIndexDirectStruct) { const TTypeList& members = *binary->getLeft()->getType().getStruct(); const TTypeLoc& member = members[binary->getRight()->getAsConstantUnion()->getConstArray()[0].getIConst()]; TString memberName = member.type->getFieldName(); if (path != "") path.append("."); path.append(memberName); } if (binary->getOp() == EOpIndexDirect) { const TConstUnionArray& indices = binary->getRight()->getAsConstantUnion()->getConstArray(); for (int index = 0; index < indices.size(); ++index) { path.append("["); path.append(String(indices[index].getIConst())); path.append("]"); } } return true; } void visitSymbol(TIntermSymbol* symbol) override { if (symbol->getType().isOpaque()) topLevelStorageQualifier = symbol->getQualifier().storage; if (!IsAnonymous(symbol->getName())) path.append(symbol->getName()); } }; TIntermNode* TParseContext::vkRelaxedRemapFunctionArgument(const TSourceLoc& loc, TFunction* function, TIntermTyped* intermTyped) { AccessChainTraverser accessChainTraverser{}; intermTyped->traverse(&accessChainTraverser); if (accessChainTraverser.topLevelStorageQualifier == TStorageQualifier::EvqUniform) { TParameter param = { 0, new TType, {} }; param.type->shallowCopy(intermTyped->getType()); function->addParameter(param); return intermTyped; } TParameter param = { NewPoolTString(accessChainTraverser.path.c_str()), new TType, {} }; param.type->shallowCopy(intermTyped->getType()); std::vector newParams = {}; vkRelaxedRemapFunctionParameter(function, param, &newParams); if (intermTyped->getType().isOpaque()) { TIntermNode* remappedArgument = intermTyped; { TIntermSymbol* intermSymbol = nullptr; TSymbol* symbol = symbolTable.find(*param.name); if (symbol && symbol->getAsVariable()) intermSymbol = intermediate.addSymbol(*symbol->getAsVariable(), loc); else { TVariable* variable = new TVariable(param.name, *param.type); intermSymbol = intermediate.addSymbol(*variable, loc); } remappedArgument = intermSymbol; } return remappedArgument; } else if (!(intermTyped->isStruct() && intermTyped->getType().containsOpaque())) return intermTyped; else { TIntermNode* remappedArgument = intermTyped; { TSymbol* symbol = symbolTable.find(*param.name); if (symbol && symbol->getAsVariable()) remappedArgument = intermediate.addSymbol(*symbol->getAsVariable(), loc); } if (!newParams.empty()) remappedArgument = intermediate.makeAggregate(remappedArgument, loc); for (int paramIndex : newParams) { TParameter& newParam = function->operator[](paramIndex); TIntermSymbol* intermSymbol = nullptr; TSymbol* symbol = symbolTable.find(*newParam.name); if (symbol && symbol->getAsVariable()) intermSymbol = intermediate.addSymbol(*symbol->getAsVariable(), loc); else { TVariable* variable = new TVariable(newParam.name, *newParam.type); intermSymbol = intermediate.addSymbol(*variable, loc); } remappedArgument = intermediate.growAggregate(remappedArgument, intermSymbol); } return remappedArgument; } } TIntermTyped* TParseContext::vkRelaxedRemapDotDereference(const TSourceLoc&, TIntermTyped& base, const TType& member, const TString& identifier) { if (!member.isOpaque()) return &base; AccessChainTraverser traverser{}; base.traverse(&traverser); if (!traverser.path.empty()) traverser.path.append("."); traverser.path.append(identifier); const TSymbol* symbol = symbolTable.find(traverser.path); if (!symbol) return &base; TIntermTyped* result = intermediate.addSymbol(*symbol->getAsVariable()); result->setType(symbol->getType()); return result; } // // Do everything necessary to handle a variable (non-block) declaration. // Either redeclaring a variable, or making a new one, updating the symbol // table, and all error checking. // // Returns a subtree node that computes an initializer, if needed. // Returns nullptr if there is no code to execute for initialization. // // 'publicType' is the type part of the declaration (to the left) // 'arraySizes' is the arrayness tagged on the identifier (to the right) // TIntermNode* TParseContext::declareVariable(const TSourceLoc& loc, TString& identifier, const TPublicType& publicType, TArraySizes* arraySizes, TIntermTyped* initializer) { // Make a fresh type that combines the characteristics from the individual // identifier syntax and the declaration-type syntax. TType type(publicType); type.transferArraySizes(arraySizes); type.copyArrayInnerSizes(publicType.arraySizes); arrayOfArrayVersionCheck(loc, type.getArraySizes()); if (initializer) { if (type.getBasicType() == EbtRayQuery) { error(loc, "ray queries can only be initialized by using the rayQueryInitializeEXT intrinsic:", "=", identifier.c_str()); } else if (type.getBasicType() == EbtHitObjectNV) { error(loc, "hit objects cannot be initialized using initializers", "=", identifier.c_str()); } } if (type.isCoopMatKHR()) { intermediate.setUseVulkanMemoryModel(); intermediate.setUseStorageBuffer(); if (!publicType.typeParameters || !publicType.typeParameters->arraySizes || publicType.typeParameters->arraySizes->getNumDims() != 4) { error(loc, "unexpected number type parameters", identifier.c_str(), ""); } if (publicType.typeParameters) { if (!isTypeFloat(publicType.typeParameters->basicType) && !isTypeInt(publicType.typeParameters->basicType) && publicType.typeParameters->basicType != EbtSpirvType) { error(loc, "expected 8, 16, 32, or 64 bit signed or unsigned integer or 16, 32, or 64 bit float type", identifier.c_str(), ""); } } } else if (type.isCoopMatNV()) { intermediate.setUseVulkanMemoryModel(); intermediate.setUseStorageBuffer(); if (!publicType.typeParameters || !publicType.typeParameters->arraySizes || publicType.typeParameters->arraySizes->getNumDims() != 4) { error(loc, "expected four type parameters", identifier.c_str(), ""); } else { if (isTypeFloat(publicType.basicType) && publicType.typeParameters->arraySizes->getDimSize(0) != 16 && publicType.typeParameters->arraySizes->getDimSize(0) != 32 && publicType.typeParameters->arraySizes->getDimSize(0) != 64) { error(loc, "expected 16, 32, or 64 bits for first type parameter", identifier.c_str(), ""); } if (isTypeInt(publicType.basicType) && publicType.typeParameters->arraySizes->getDimSize(0) != 8 && publicType.typeParameters->arraySizes->getDimSize(0) != 16 && publicType.typeParameters->arraySizes->getDimSize(0) != 32) { error(loc, "expected 8, 16, or 32 bits for first type parameter", identifier.c_str(), ""); } } } else if (type.isTensorLayoutNV()) { if (!publicType.typeParameters || publicType.typeParameters->arraySizes->getNumDims() > 2) { error(loc, "expected 1-2 type parameters", identifier.c_str(), ""); } } else if (type.isTensorViewNV()) { if (!publicType.typeParameters || publicType.typeParameters->arraySizes->getNumDims() > 7) { error(loc, "expected 1-7 type parameters", identifier.c_str(), ""); } } else if (type.isCoopVecNV()) { intermediate.setUseVulkanMemoryModel(); intermediate.setUseStorageBuffer(); if (!publicType.typeParameters || !publicType.typeParameters->arraySizes || publicType.typeParameters->arraySizes->getNumDims() != 1) { error(loc, "expected two type parameters", identifier.c_str(), ""); } else if (publicType.typeParameters->arraySizes->getDimSize(0) <= 0) { error(loc, "expected positive number of components", identifier.c_str(), ""); } } else { if (publicType.typeParameters && publicType.typeParameters->arraySizes->getNumDims() != 0) { error(loc, "unexpected type parameters", identifier.c_str(), ""); } } if (voidErrorCheck(loc, identifier, type.getBasicType())) return nullptr; if (initializer) rValueErrorCheck(loc, "initializer", initializer); else nonInitConstCheck(loc, identifier, type); samplerCheck(loc, type, identifier, initializer); transparentOpaqueCheck(loc, type, identifier); atomicUintCheck(loc, type, identifier); accStructCheck(loc, type, identifier); hitObjectNVCheck(loc, type, identifier); checkAndResizeMeshViewDim(loc, type, /*isBlockMember*/ false); if (type.getQualifier().storage == EvqConst && type.containsReference()) { error(loc, "variables with reference type can't have qualifier 'const'", "qualifier", ""); } if (type.getQualifier().storage != EvqUniform && type.getQualifier().storage != EvqBuffer) { if (type.contains16BitFloat()) requireFloat16Arithmetic(loc, "qualifier", "float16 types can only be in uniform block or buffer storage"); if (type.contains16BitInt()) requireInt16Arithmetic(loc, "qualifier", "(u)int16 types can only be in uniform block or buffer storage"); if (type.contains8BitInt()) requireInt8Arithmetic(loc, "qualifier", "(u)int8 types can only be in uniform block or buffer storage"); } if (type.getBasicType() == EbtBFloat16 && (type.getQualifier().storage == EvqVaryingIn || type.getQualifier().storage == EvqVaryingOut)) error(loc, "qualifier", "bfloat16 types not allowed as input/output", ""); if ((type.getBasicType() == EbtFloatE5M2 || type.getBasicType() == EbtFloatE4M3) && (type.getQualifier().storage == EvqVaryingIn || type.getQualifier().storage == EvqVaryingOut)) error(loc, "qualifier", "fp8 types not allowed as input/output", ""); if (type.getQualifier().storage == EvqtaskPayloadSharedEXT) intermediate.addTaskPayloadEXTCount(); if (type.getQualifier().storage == EvqShared && type.containsCoopMat()) error(loc, "qualifier", "Cooperative matrix types must not be used in shared memory", ""); if (profile == EEsProfile) { if (type.getQualifier().isPipeInput() && type.getBasicType() == EbtStruct) { if (type.getQualifier().isArrayedIo(language)) { TType perVertexType(type, 0); if (perVertexType.containsArray() && perVertexType.containsBuiltIn() == false) { error(loc, "A per vertex structure containing an array is not allowed as input in ES", type.getTypeName().c_str(), ""); } } else if (type.containsArray() && type.containsBuiltIn() == false) { error(loc, "A structure containing an array is not allowed as input in ES", type.getTypeName().c_str(), ""); } if (type.containsStructure()) error(loc, "A structure containing an struct is not allowed as input in ES", type.getTypeName().c_str(), ""); } } if (identifier != "gl_FragCoord" && (publicType.shaderQualifiers.originUpperLeft || publicType.shaderQualifiers.pixelCenterInteger)) error(loc, "can only apply origin_upper_left and pixel_center_origin to gl_FragCoord", "layout qualifier", ""); if (identifier != "gl_FragDepth" && publicType.shaderQualifiers.getDepth() != EldNone) error(loc, "can only apply depth layout to gl_FragDepth", "layout qualifier", ""); if (identifier != "gl_FragStencilRefARB" && publicType.shaderQualifiers.getStencil() != ElsNone) error(loc, "can only apply depth layout to gl_FragStencilRefARB", "layout qualifier", ""); // Check for redeclaration of built-ins and/or attempting to declare a reserved name TSymbol* symbol = redeclareBuiltinVariable(loc, identifier, type.getQualifier(), publicType.shaderQualifiers); if (symbol == nullptr) reservedErrorCheck(loc, identifier); if (symbol == nullptr && spvVersion.vulkan > 0 && spvVersion.vulkanRelaxed) { bool remapped = vkRelaxedRemapUniformVariable(loc, identifier, publicType, arraySizes, initializer, type); if (remapped) { return nullptr; } } inheritGlobalDefaults(type.getQualifier()); // Declare the variable if (type.isArray()) { // Check that implicit sizing is only where allowed. arraySizesCheck(loc, type.getQualifier(), type.getArraySizes(), initializer, false); if (! arrayQualifierError(loc, type.getQualifier()) && ! arrayError(loc, type)) declareArray(loc, identifier, type, symbol); if (initializer) { profileRequires(loc, ENoProfile, 120, E_GL_3DL_array_objects, "initializer"); profileRequires(loc, EEsProfile, 300, nullptr, "initializer"); } } else { // non-array case if (symbol == nullptr) symbol = declareNonArray(loc, identifier, type); else if (type != symbol->getType()) error(loc, "cannot change the type of", "redeclaration", symbol->getName().c_str()); } if (symbol == nullptr) return nullptr; // Deal with initializer TIntermNode* initNode = nullptr; if (symbol != nullptr && initializer) { TVariable* variable = symbol->getAsVariable(); if (! variable) { error(loc, "initializer requires a variable, not a member", identifier.c_str(), ""); return nullptr; } initNode = executeInitializer(loc, initializer, variable); } // look for errors in layout qualifier use layoutObjectCheck(loc, *symbol); // fix up fixOffset(loc, *symbol); return initNode; } // Pick up global defaults from the provide global defaults into dst. void TParseContext::inheritGlobalDefaults(TQualifier& dst) const { if (dst.storage == EvqVaryingOut) { if (! dst.hasStream() && language == EShLangGeometry) dst.layoutStream = globalOutputDefaults.layoutStream; if (! dst.hasXfbBuffer()) dst.layoutXfbBuffer = globalOutputDefaults.layoutXfbBuffer; } } // // Make an internal-only variable whose name is for debug purposes only // and won't be searched for. Callers will only use the return value to use // the variable, not the name to look it up. It is okay if the name // is the same as other names; there won't be any conflict. // TVariable* TParseContext::makeInternalVariable(const char* name, const TType& type) const { TString* nameString = NewPoolTString(name); TVariable* variable = new TVariable(nameString, type); symbolTable.makeInternalVariable(*variable); return variable; } // // Declare a non-array variable, the main point being there is no redeclaration // for resizing allowed. // // Return the successfully declared variable. // TVariable* TParseContext::declareNonArray(const TSourceLoc& loc, const TString& identifier, const TType& type) { // make a new variable TVariable* variable = new TVariable(&identifier, type); ioArrayCheck(loc, type, identifier); // add variable to symbol table if (symbolTable.insert(*variable)) { if (symbolTable.atGlobalLevel()) trackLinkage(*variable); return variable; } error(loc, "redefinition", variable->getName().c_str(), ""); return nullptr; } // // Handle all types of initializers from the grammar. // // Returning nullptr just means there is no code to execute to handle the // initializer, which will, for example, be the case for constant initializers. // TIntermNode* TParseContext::executeInitializer(const TSourceLoc& loc, TIntermTyped* initializer, TVariable* variable) { // A null initializer is an aggregate that hasn't had an op assigned yet // (still EOpNull, no relation to nullInit), and has no children. bool nullInit = initializer->getAsAggregate() && initializer->getAsAggregate()->getOp() == EOpNull && initializer->getAsAggregate()->getSequence().size() == 0; // // Identifier must be of type constant, a global, or a temporary, and // starting at version 120, desktop allows uniforms to have initializers. // TStorageQualifier qualifier = variable->getType().getQualifier().storage; if (! (qualifier == EvqTemporary || qualifier == EvqGlobal || qualifier == EvqConst || (qualifier == EvqUniform && !isEsProfile() && version >= 120))) { if (qualifier == EvqShared) { // GL_EXT_null_initializer allows this for shared, if it's a null initializer if (nullInit) { const char* feature = "initialization with shared qualifier"; profileRequires(loc, EEsProfile, 0, E_GL_EXT_null_initializer, feature); profileRequires(loc, ~EEsProfile, 0, E_GL_EXT_null_initializer, feature); } else { error(loc, "initializer can only be a null initializer ('{}')", "shared", ""); } } else { error(loc, " cannot initialize this type of qualifier ", variable->getType().getStorageQualifierString(), ""); return nullptr; } } if (nullInit) { // only some types can be null initialized if (variable->getType().containsUnsizedArray()) { error(loc, "null initializers can't size unsized arrays", "{}", ""); return nullptr; } if (variable->getType().containsOpaque()) { error(loc, "null initializers can't be used on opaque values", "{}", ""); return nullptr; } variable->getWritableType().getQualifier().setNullInit(); return nullptr; } arrayObjectCheck(loc, variable->getType(), "array initializer"); // // If the initializer was from braces { ... }, we convert the whole subtree to a // constructor-style subtree, allowing the rest of the code to operate // identically for both kinds of initializers. // // Type can't be deduced from the initializer list, so a skeletal type to // follow has to be passed in. Constness and specialization-constness // should be deduced bottom up, not dictated by the skeletal type. // TType skeletalType; skeletalType.shallowCopy(variable->getType()); skeletalType.getQualifier().makeTemporary(); initializer = convertInitializerList(loc, skeletalType, initializer); if (! initializer) { // error recovery; don't leave const without constant values if (qualifier == EvqConst) variable->getWritableType().getQualifier().makeTemporary(); return nullptr; } // Fix outer arrayness if variable is unsized, getting size from the initializer if (initializer->getType().isSizedArray() && variable->getType().isUnsizedArray()) variable->getWritableType().changeOuterArraySize(initializer->getType().getOuterArraySize()); // Inner arrayness can also get set by an initializer if (initializer->getType().isArrayOfArrays() && variable->getType().isArrayOfArrays() && initializer->getType().getArraySizes()->getNumDims() == variable->getType().getArraySizes()->getNumDims()) { // adopt unsized sizes from the initializer's sizes for (int d = 1; d < variable->getType().getArraySizes()->getNumDims(); ++d) { if (variable->getType().getArraySizes()->getDimSize(d) == UnsizedArraySize) { variable->getWritableType().getArraySizes()->setDimSize(d, initializer->getType().getArraySizes()->getDimSize(d)); } } } // Uniforms require a compile-time constant initializer if (qualifier == EvqUniform && ! initializer->getType().getQualifier().isFrontEndConstant()) { error(loc, "uniform initializers must be constant", "=", "'%s'", variable->getType().getCompleteString(intermediate.getEnhancedMsgs()).c_str()); variable->getWritableType().getQualifier().makeTemporary(); return nullptr; } // Global consts require a constant initializer (specialization constant is okay) if (qualifier == EvqConst && symbolTable.atGlobalLevel() && ! initializer->getType().getQualifier().isConstant()) { error(loc, "global const initializers must be constant", "=", "'%s'", variable->getType().getCompleteString(intermediate.getEnhancedMsgs()).c_str()); variable->getWritableType().getQualifier().makeTemporary(); return nullptr; } // Const variables require a constant initializer, depending on version if (qualifier == EvqConst) { if (! initializer->getType().getQualifier().isConstant()) { const char* initFeature = "non-constant initializer"; requireProfile(loc, ~EEsProfile, initFeature); profileRequires(loc, ~EEsProfile, 420, E_GL_ARB_shading_language_420pack, initFeature); variable->getWritableType().getQualifier().storage = EvqConstReadOnly; qualifier = EvqConstReadOnly; } } else { // Non-const global variables in ES need a const initializer. // // "In declarations of global variables with no storage qualifier or with a const // qualifier any initializer must be a constant expression." if (symbolTable.atGlobalLevel() && ! initializer->getType().getQualifier().isConstant()) { const char* initFeature = "non-constant global initializer (needs GL_EXT_shader_non_constant_global_initializers)"; if (isEsProfile()) { if (relaxedErrors() && ! extensionTurnedOn(E_GL_EXT_shader_non_constant_global_initializers)) warn(loc, "not allowed in this version", initFeature, ""); else profileRequires(loc, EEsProfile, 0, E_GL_EXT_shader_non_constant_global_initializers, initFeature); } } } if (qualifier == EvqConst || qualifier == EvqUniform) { // Compile-time tagging of the variable with its constant value... initializer = intermediate.addConversion(EOpAssign, variable->getType(), initializer); if (! initializer || ! initializer->getType().getQualifier().isConstant() || variable->getType() != initializer->getType()) { error(loc, "non-matching or non-convertible constant type for const initializer", variable->getType().getStorageQualifierString(), ""); variable->getWritableType().getQualifier().makeTemporary(); return nullptr; } // We either have a folded constant in getAsConstantUnion, or we have to use // the initializer's subtree in the AST to represent the computation of a // specialization constant. assert(initializer->getAsConstantUnion() || initializer->getType().getQualifier().isSpecConstant()); if (initializer->getAsConstantUnion()) variable->setConstArray(initializer->getAsConstantUnion()->getConstArray()); else { // It's a specialization constant. variable->getWritableType().getQualifier().makeSpecConstant(); // Keep the subtree that computes the specialization constant with the variable. // Later, a symbol node will adopt the subtree from the variable. variable->setConstSubtree(initializer); } } else { // normal assigning of a value to a variable... specializationCheck(loc, initializer->getType(), "initializer"); TIntermSymbol* intermSymbol = intermediate.addSymbol(*variable, loc); TIntermTyped* initNode = intermediate.addAssign(EOpAssign, intermSymbol, initializer, loc); if (! initNode) assignError(loc, "=", intermSymbol->getCompleteString(intermediate.getEnhancedMsgs()), initializer->getCompleteString(intermediate.getEnhancedMsgs())); return initNode; } return nullptr; } // // Reprocess any initializer-list (the "{ ... }" syntax) parts of the // initializer. // // Need to hierarchically assign correct types and implicit // conversions. Will do this mimicking the same process used for // creating a constructor-style initializer, ensuring we get the // same form. However, it has to in parallel walk the 'type' // passed in, as type cannot be deduced from an initializer list. // TIntermTyped* TParseContext::convertInitializerList(const TSourceLoc& loc, const TType& type, TIntermTyped* initializer) { // Will operate recursively. Once a subtree is found that is constructor style, // everything below it is already good: Only the "top part" of the initializer // can be an initializer list, where "top part" can extend for several (or all) levels. // see if we have bottomed out in the tree within the initializer-list part TIntermAggregate* initList = initializer->getAsAggregate(); if (! initList || initList->getOp() != EOpNull) return initializer; // Of the initializer-list set of nodes, need to process bottom up, // so recurse deep, then process on the way up. // Go down the tree here... if (type.isArray()) { // The type's array might be unsized, which could be okay, so base sizes on the size of the aggregate. // Later on, initializer execution code will deal with array size logic. TType arrayType; arrayType.shallowCopy(type); // sharing struct stuff is fine arrayType.copyArraySizes(*type.getArraySizes()); // but get a fresh copy of the array information, to edit below // edit array sizes to fill in unsized dimensions arrayType.changeOuterArraySize((int)initList->getSequence().size()); TIntermTyped* firstInit = initList->getSequence()[0]->getAsTyped(); if (arrayType.isArrayOfArrays() && firstInit->getType().isArray() && arrayType.getArraySizes()->getNumDims() == firstInit->getType().getArraySizes()->getNumDims() + 1) { for (int d = 1; d < arrayType.getArraySizes()->getNumDims(); ++d) { if (arrayType.getArraySizes()->getDimSize(d) == UnsizedArraySize) arrayType.getArraySizes()->setDimSize(d, firstInit->getType().getArraySizes()->getDimSize(d - 1)); } } TType elementType(arrayType, 0); // dereferenced type for (size_t i = 0; i < initList->getSequence().size(); ++i) { initList->getSequence()[i] = convertInitializerList(loc, elementType, initList->getSequence()[i]->getAsTyped()); if (initList->getSequence()[i] == nullptr) return nullptr; } return addConstructor(loc, initList, arrayType); } else if (type.isStruct()) { if (type.getStruct()->size() != initList->getSequence().size()) { error(loc, "wrong number of structure members", "initializer list", ""); return nullptr; } for (size_t i = 0; i < type.getStruct()->size(); ++i) { initList->getSequence()[i] = convertInitializerList(loc, *(*type.getStruct())[i].type, initList->getSequence()[i]->getAsTyped()); if (initList->getSequence()[i] == nullptr) return nullptr; } } else if (type.isMatrix()) { if (type.getMatrixCols() != (int)initList->getSequence().size()) { error(loc, "wrong number of matrix columns:", "initializer list", type.getCompleteString(intermediate.getEnhancedMsgs()).c_str()); return nullptr; } TType vectorType(type, 0); // dereferenced type for (int i = 0; i < type.getMatrixCols(); ++i) { initList->getSequence()[i] = convertInitializerList(loc, vectorType, initList->getSequence()[i]->getAsTyped()); if (initList->getSequence()[i] == nullptr) return nullptr; } } else if (type.isVector()) { if (type.getVectorSize() != (int)initList->getSequence().size()) { error(loc, "wrong vector size (or rows in a matrix column):", "initializer list", type.getCompleteString(intermediate.getEnhancedMsgs()).c_str()); return nullptr; } TBasicType destType = type.getBasicType(); for (int i = 0; i < type.getVectorSize(); ++i) { TBasicType initType = initList->getSequence()[i]->getAsTyped()->getBasicType(); if (destType != initType && !intermediate.canImplicitlyPromote(initType, destType)) { error(loc, "type mismatch in initializer list", "initializer list", type.getCompleteString(intermediate.getEnhancedMsgs()).c_str()); return nullptr; } } } else { error(loc, "unexpected initializer-list type:", "initializer list", type.getCompleteString(intermediate.getEnhancedMsgs()).c_str()); return nullptr; } // Now that the subtree is processed, process this node as if the // initializer list is a set of arguments to a constructor. TIntermNode* emulatedConstructorArguments; if (initList->getSequence().size() == 1) emulatedConstructorArguments = initList->getSequence()[0]; else emulatedConstructorArguments = initList; return addConstructor(loc, emulatedConstructorArguments, type); } // // Test for the correctness of the parameters passed to various constructor functions // and also convert them to the right data type, if allowed and required. // // 'node' is what to construct from. // 'type' is what type to construct. // // Returns nullptr for an error or the constructed node (aggregate or typed) for no error. // TIntermTyped* TParseContext::addConstructor(const TSourceLoc& loc, TIntermNode* node, const TType& type) { if (node == nullptr || node->getAsTyped() == nullptr) return nullptr; rValueErrorCheck(loc, "constructor", node->getAsTyped()); TIntermAggregate* aggrNode = node->getAsAggregate(); TOperator op = intermediate.mapTypeToConstructorOp(type); // Combined texture-sampler constructors are completely semantic checked // in constructorTextureSamplerError() if (op == EOpConstructTextureSampler) { if (aggrNode != nullptr) { if (aggrNode->getSequence()[1]->getAsTyped()->getType().getSampler().shadow) { // Transfer depth into the texture (SPIR-V image) type, as a hint // for tools to know this texture/image is a depth image. aggrNode->getSequence()[0]->getAsTyped()->getWritableType().getSampler().shadow = true; } return intermediate.setAggregateOperator(aggrNode, op, type, loc); } } TTypeList::const_iterator memberTypes; if (op == EOpConstructStruct) memberTypes = type.getStruct()->begin(); TType elementType; if (type.isArray()) { TType dereferenced(type, 0); elementType.shallowCopy(dereferenced); } else elementType.shallowCopy(type); bool singleArg; if (aggrNode) { if (aggrNode->getOp() != EOpNull) singleArg = true; else singleArg = false; } else singleArg = true; TIntermTyped *newNode; if (singleArg) { // If structure constructor or array constructor is being called // for only one parameter inside the structure, we need to call constructAggregate function once. if (type.isArray()) newNode = constructAggregate(node, elementType, 1, node->getLoc()); else if (op == EOpConstructStruct) newNode = constructAggregate(node, *(*memberTypes).type, 1, node->getLoc()); else newNode = constructBuiltIn(type, op, node->getAsTyped(), node->getLoc(), false); if (newNode && (type.isArray() || op == EOpConstructStruct)) newNode = intermediate.setAggregateOperator(newNode, EOpConstructStruct, type, loc); return newNode; } // // Handle list of arguments. // TIntermSequence &sequenceVector = aggrNode->getSequence(); // Stores the information about the parameter to the constructor // if the structure constructor contains more than one parameter, then construct // each parameter int paramCount = 0; // keeps track of the constructor parameter number being checked // We don't know "top down" whether type is a specialization constant, // but a const becomes a specialization constant if any of its children are. bool hasSpecConst = false; bool isConstConstructor = true; // for each parameter to the constructor call, check to see if the right type is passed or convert them // to the right type if possible (and allowed). // for structure constructors, just check if the right type is passed, no conversion is allowed. for (TIntermSequence::iterator p = sequenceVector.begin(); p != sequenceVector.end(); p++, paramCount++) { if (type.isArray()) newNode = constructAggregate(*p, elementType, paramCount+1, node->getLoc()); else if (op == EOpConstructStruct) newNode = constructAggregate(*p, *(memberTypes[paramCount]).type, paramCount+1, node->getLoc()); else newNode = constructBuiltIn(type, op, (*p)->getAsTyped(), node->getLoc(), true); if (newNode) { *p = newNode; if (!newNode->getType().getQualifier().isConstant()) isConstConstructor = false; if (newNode->getType().getQualifier().isSpecConstant()) hasSpecConst = true; } else return nullptr; } TIntermTyped* ret_node = intermediate.setAggregateOperator(aggrNode, op, type, loc); const char *specConstantCompositeExt[] = { E_GL_EXT_spec_constant_composites }; if (checkExtensionsRequested(loc, 1, specConstantCompositeExt, "spec constant aggregate constructor")) { if (isConstConstructor && hasSpecConst) { ret_node->getWritableType().getQualifier().makeSpecConstant(); } } TIntermAggregate *agg_node = ret_node->getAsAggregate(); if (agg_node && (agg_node->isVector() || agg_node->isArray() || agg_node->isMatrix())) agg_node->updatePrecision(); return ret_node; } // Function for constructor implementation. Calls addUnaryMath with appropriate EOp value // for the parameter to the constructor (passed to this function). Essentially, it converts // the parameter types correctly. If a constructor expects an int (like ivec2) and is passed a // float, then float is converted to int. // // Returns nullptr for an error or the constructed node. // TIntermTyped* TParseContext::constructBuiltIn(const TType& type, TOperator op, TIntermTyped* node, const TSourceLoc& loc, bool subset) { // If we are changing a matrix in both domain of basic type and to a non matrix, // do the shape change first (by default, below, basic type is changed before shape). // This avoids requesting a matrix of a new type that is going to be discarded anyway. // TODO: This could be generalized to more type combinations, but that would require // more extensive testing and full algorithm rework. For now, the need to do two changes makes // the recursive call work, and avoids the most egregious case of creating integer matrices. if (node->getType().isMatrix() && (type.isScalar() || type.isVector()) && type.isFloatingDomain() != node->getType().isFloatingDomain()) { TType transitionType(node->getBasicType(), glslang::EvqTemporary, type.getVectorSize(), 0, 0, node->isVector()); TOperator transitionOp = intermediate.mapTypeToConstructorOp(transitionType); node = constructBuiltIn(transitionType, transitionOp, node, loc, false); } TIntermTyped* newNode; TOperator basicOp; // // First, convert types as needed. // switch (op) { case EOpConstructVec2: case EOpConstructVec3: case EOpConstructVec4: case EOpConstructMat2x2: case EOpConstructMat2x3: case EOpConstructMat2x4: case EOpConstructMat3x2: case EOpConstructMat3x3: case EOpConstructMat3x4: case EOpConstructMat4x2: case EOpConstructMat4x3: case EOpConstructMat4x4: case EOpConstructFloat: basicOp = EOpConstructFloat; break; case EOpConstructIVec2: case EOpConstructIVec3: case EOpConstructIVec4: case EOpConstructInt: basicOp = EOpConstructInt; break; case EOpConstructUVec2: if (node->getType().getBasicType() == EbtReference) { requireExtensions(loc, 1, &E_GL_EXT_buffer_reference_uvec2, "reference conversion to uvec2"); TIntermTyped* newNode = intermediate.addBuiltInFunctionCall(node->getLoc(), EOpConvPtrToUvec2, true, node, type); return newNode; } else if (node->getType().getBasicType() == EbtSampler) { requireExtensions(loc, 1, &E_GL_ARB_bindless_texture, "sampler conversion to uvec2"); // force the basic type of the constructor param to uvec2, otherwise spv builder will // report some errors TIntermTyped* newSrcNode = intermediate.createConversion(EbtUint, node); newSrcNode->getAsTyped()->getWritableType().setVectorSize(2); TIntermTyped* newNode = intermediate.addBuiltInFunctionCall(node->getLoc(), EOpConstructUVec2, false, newSrcNode, type); return newNode; } [[fallthrough]]; case EOpConstructUVec3: case EOpConstructUVec4: case EOpConstructUint: basicOp = EOpConstructUint; break; case EOpConstructBVec2: case EOpConstructBVec3: case EOpConstructBVec4: case EOpConstructBool: basicOp = EOpConstructBool; break; case EOpConstructTextureSampler: if ((node->getType().getBasicType() == EbtUint || node->getType().getBasicType() == EbtInt) && node->getType().getVectorSize() == 2) { requireExtensions(loc, 1, &E_GL_ARB_bindless_texture, "ivec2/uvec2 convert to texture handle"); // No matter ivec2 or uvec2, Set EOpPackUint2x32 just to generate an opBitcast op code TIntermTyped* newNode = intermediate.addBuiltInFunctionCall(node->getLoc(), EOpPackUint2x32, true, node, type); return newNode; } [[fallthrough]]; case EOpConstructDVec2: case EOpConstructDVec3: case EOpConstructDVec4: case EOpConstructDMat2x2: case EOpConstructDMat2x3: case EOpConstructDMat2x4: case EOpConstructDMat3x2: case EOpConstructDMat3x3: case EOpConstructDMat3x4: case EOpConstructDMat4x2: case EOpConstructDMat4x3: case EOpConstructDMat4x4: case EOpConstructDouble: basicOp = EOpConstructDouble; break; case EOpConstructF16Vec2: case EOpConstructF16Vec3: case EOpConstructF16Vec4: case EOpConstructF16Mat2x2: case EOpConstructF16Mat2x3: case EOpConstructF16Mat2x4: case EOpConstructF16Mat3x2: case EOpConstructF16Mat3x3: case EOpConstructF16Mat3x4: case EOpConstructF16Mat4x2: case EOpConstructF16Mat4x3: case EOpConstructF16Mat4x4: case EOpConstructFloat16: basicOp = EOpConstructFloat16; // 8/16-bit storage extensions don't support direct constructing composites of 8/16-bit types, // so construct a 32-bit type and convert // and do not generate any conversion if it is an identity conversion, i.e. float16_t( var) if (!intermediate.getArithemeticFloat16Enabled() && (node->getBasicType() != EbtFloat16)) { TType tempType(EbtFloat, EvqTemporary, type.getVectorSize()); newNode = node; if (tempType != newNode->getType()) { TOperator aggregateOp; if (op == EOpConstructFloat16) aggregateOp = EOpConstructFloat; else aggregateOp = (TOperator)(EOpConstructVec2 + op - EOpConstructF16Vec2); newNode = intermediate.setAggregateOperator(newNode, aggregateOp, tempType, node->getLoc()); } newNode = intermediate.addConversion(EbtFloat16, newNode); return newNode; } break; case EOpConstructBF16Vec2: case EOpConstructBF16Vec3: case EOpConstructBF16Vec4: case EOpConstructBFloat16: basicOp = EOpConstructBFloat16; break; case EOpConstructFloatE5M2Vec2: case EOpConstructFloatE5M2Vec3: case EOpConstructFloatE5M2Vec4: case EOpConstructFloatE5M2: basicOp = EOpConstructFloatE5M2; break; case EOpConstructFloatE4M3Vec2: case EOpConstructFloatE4M3Vec3: case EOpConstructFloatE4M3Vec4: case EOpConstructFloatE4M3: basicOp = EOpConstructFloatE4M3; break; case EOpConstructI8Vec2: case EOpConstructI8Vec3: case EOpConstructI8Vec4: case EOpConstructInt8: basicOp = EOpConstructInt8; // 8/16-bit storage extensions don't support direct constructing composites of 8/16-bit types, // so construct a 32-bit type and convert // and do not generate any conversion if it is an identity conversion, i.e. int8_t( var) if (!intermediate.getArithemeticInt8Enabled() && (node->getBasicType() != EbtInt8)) { TType tempType(EbtInt, EvqTemporary, type.getVectorSize()); newNode = node; if (tempType != newNode->getType()) { TOperator aggregateOp; if (op == EOpConstructInt8) aggregateOp = EOpConstructInt; else aggregateOp = (TOperator)(EOpConstructIVec2 + op - EOpConstructI8Vec2); newNode = intermediate.setAggregateOperator(newNode, aggregateOp, tempType, node->getLoc()); } newNode = intermediate.addConversion(EbtInt8, newNode); return newNode; } break; case EOpConstructU8Vec2: case EOpConstructU8Vec3: case EOpConstructU8Vec4: case EOpConstructUint8: basicOp = EOpConstructUint8; // 8/16-bit storage extensions don't support direct constructing composites of 8/16-bit types, // so construct a 32-bit type and convert // and do not generate any conversion if it is an identity conversion, i.e. uint8_t( var) if (!intermediate.getArithemeticInt8Enabled() && (node->getBasicType() != EbtUint8)) { TType tempType(EbtUint, EvqTemporary, type.getVectorSize()); newNode = node; if (tempType != newNode->getType()) { TOperator aggregateOp; if (op == EOpConstructUint8) aggregateOp = EOpConstructUint; else aggregateOp = (TOperator)(EOpConstructUVec2 + op - EOpConstructU8Vec2); newNode = intermediate.setAggregateOperator(newNode, aggregateOp, tempType, node->getLoc()); } newNode = intermediate.addConversion(EbtUint8, newNode); return newNode; } break; case EOpConstructI16Vec2: case EOpConstructI16Vec3: case EOpConstructI16Vec4: case EOpConstructInt16: basicOp = EOpConstructInt16; // 8/16-bit storage extensions don't support direct constructing composites of 8/16-bit types, // so construct a 32-bit type and convert // and do not generate any conversion if it is an identity conversion, i.e. int16_t( var) if (!intermediate.getArithemeticInt16Enabled() && (node->getBasicType() != EbtInt16)) { TType tempType(EbtInt, EvqTemporary, type.getVectorSize()); newNode = node; if (tempType != newNode->getType()) { TOperator aggregateOp; if (op == EOpConstructInt16) aggregateOp = EOpConstructInt; else aggregateOp = (TOperator)(EOpConstructIVec2 + op - EOpConstructI16Vec2); newNode = intermediate.setAggregateOperator(newNode, aggregateOp, tempType, node->getLoc()); } newNode = intermediate.addConversion(EbtInt16, newNode); return newNode; } break; case EOpConstructU16Vec2: case EOpConstructU16Vec3: case EOpConstructU16Vec4: case EOpConstructUint16: basicOp = EOpConstructUint16; // 8/16-bit storage extensions don't support direct constructing composites of 8/16-bit types, // so construct a 32-bit type and convert // and do not generate any conversion if it is an identity conversion, i.e. uint16_t( var) if (!intermediate.getArithemeticInt16Enabled() && (node->getBasicType() != EbtUint16)) { TType tempType(EbtUint, EvqTemporary, type.getVectorSize()); newNode = node; if (tempType != newNode->getType()) { TOperator aggregateOp; if (op == EOpConstructUint16) aggregateOp = EOpConstructUint; else aggregateOp = (TOperator)(EOpConstructUVec2 + op - EOpConstructU16Vec2); newNode = intermediate.setAggregateOperator(newNode, aggregateOp, tempType, node->getLoc()); } newNode = intermediate.addConversion(EbtUint16, newNode); return newNode; } break; case EOpConstructI64Vec2: case EOpConstructI64Vec3: case EOpConstructI64Vec4: case EOpConstructInt64: basicOp = EOpConstructInt64; break; case EOpConstructUint64: if (type.isScalar() && node->getType().isReference()) { TIntermTyped* newNode = intermediate.addBuiltInFunctionCall(node->getLoc(), EOpConvPtrToUint64, true, node, type); return newNode; } [[fallthrough]]; case EOpConstructU64Vec2: case EOpConstructU64Vec3: case EOpConstructU64Vec4: basicOp = EOpConstructUint64; break; case EOpConstructNonuniform: // Make a nonuniform copy of node newNode = intermediate.addBuiltInFunctionCall(node->getLoc(), EOpCopyObject, true, node, type); return newNode; case EOpConstructReference: // construct reference from reference if (node->getType().isReference()) { newNode = intermediate.addBuiltInFunctionCall(node->getLoc(), EOpConstructReference, true, node, type); return newNode; // construct reference from uint64 } else if (node->getType().isScalar() && node->getType().getBasicType() == EbtUint64) { TIntermTyped* newNode = intermediate.addBuiltInFunctionCall(node->getLoc(), EOpConvUint64ToPtr, true, node, type); return newNode; // construct reference from uvec2 } else if (node->getType().isVector() && node->getType().getBasicType() == EbtUint && node->getVectorSize() == 2) { requireExtensions(loc, 1, &E_GL_EXT_buffer_reference_uvec2, "uvec2 conversion to reference"); TIntermTyped* newNode = intermediate.addBuiltInFunctionCall(node->getLoc(), EOpConvUvec2ToPtr, true, node, type); return newNode; } else { return nullptr; } case EOpConstructCooperativeVectorNV: if (!node->getType().isCoopVecNV()) { if (type.getBasicType() != node->getType().getBasicType()) { node = intermediate.addConversion(type.getBasicType(), node); if (node == nullptr) return nullptr; } } if (type.getBasicType() != node->getType().getBasicType()) { intermediate.buildConvertOp(type.getBasicType(), node->getType().getBasicType(), op); node = intermediate.addUnaryNode(op, node, node->getLoc(), type); return node; } if (subset) { return node; } node = intermediate.setAggregateOperator(node, op, type, node->getLoc()); return node; case EOpConstructCooperativeMatrixNV: case EOpConstructCooperativeMatrixKHR: if (node->getType() == type) { return node; } if (!node->getType().isCoopMat()) { if (type.getBasicType() != node->getType().getBasicType()) { node = intermediate.addConversion(type.getBasicType(), node); if (node == nullptr) return nullptr; } node = intermediate.setAggregateOperator(node, op, type, node->getLoc()); } else if (type.sameCoopMatShape(node->getType()) && !type.sameCoopMatUse(node->getType()) && type.getBasicType() == node->getType().getBasicType()) { node = intermediate.setAggregateOperator(node, op, type, node->getLoc()); } else { TOperator op = EOpConvNumeric; node = intermediate.addUnaryNode(op, node, node->getLoc(), type); // If it's a (non-specialization) constant, it must be folded. if (node->getAsUnaryNode()->getOperand()->getAsConstantUnion()) return node->getAsUnaryNode()->getOperand()->getAsConstantUnion()->fold(op, node->getType()); } return node; case EOpConstructAccStruct: if ((node->getType().isScalar() && node->getType().getBasicType() == EbtUint64)) { // construct acceleration structure from uint64 requireExtensions(loc, Num_ray_tracing_EXTs, ray_tracing_EXTs, "uint64_t conversion to acclerationStructureEXT"); return intermediate.addBuiltInFunctionCall(node->getLoc(), EOpConvUint64ToAccStruct, true, node, type); } else if (node->getType().isVector() && node->getType().getBasicType() == EbtUint && node->getVectorSize() == 2) { // construct acceleration structure from uint64 requireExtensions(loc, Num_ray_tracing_EXTs, ray_tracing_EXTs, "uvec2 conversion to accelerationStructureEXT"); return intermediate.addBuiltInFunctionCall(node->getLoc(), EOpConvUvec2ToAccStruct, true, node, type); } else return nullptr; default: error(loc, "unsupported construction", "", ""); return nullptr; } newNode = intermediate.addUnaryMath(basicOp, node, node->getLoc()); if (newNode == nullptr) { error(loc, "can't convert", "constructor", ""); return nullptr; } // // Now, if there still isn't an operation to do the construction, and we need one, add one. // // Otherwise, skip out early. if (subset || (newNode != node && newNode->getType() == type)) return newNode; // setAggregateOperator will insert a new node for the constructor, as needed. return intermediate.setAggregateOperator(newNode, op, type, loc); } // This function tests for the type of the parameters to the structure or array constructor. Raises // an error message if the expected type does not match the parameter passed to the constructor. // // Returns nullptr for an error or the input node itself if the expected and the given parameter types match. // TIntermTyped* TParseContext::constructAggregate(TIntermNode* node, const TType& type, int paramCount, const TSourceLoc& loc) { TIntermTyped* converted = intermediate.addConversion(EOpConstructStruct, type, node->getAsTyped()); if (! converted || converted->getType() != type) { bool enhanced = intermediate.getEnhancedMsgs(); error(loc, "", "constructor", "cannot convert parameter %d from '%s' to '%s'", paramCount, node->getAsTyped()->getType().getCompleteString(enhanced).c_str(), type.getCompleteString(enhanced).c_str()); return nullptr; } return converted; } // If a memory qualifier is present in 'to', also make it present in 'from'. void TParseContext::inheritMemoryQualifiers(const TQualifier& from, TQualifier& to) { if (from.isReadOnly()) to.readonly = from.readonly; if (from.isWriteOnly()) to.writeonly = from.writeonly; if (from.coherent) to.coherent = from.coherent; if (from.volatil) to.volatil = from.volatil; if (from.nontemporal) to.nontemporal = from.nontemporal; if (from.restrict) to.restrict = from.restrict; } // // Update qualifier layoutBindlessImage & layoutBindlessSampler on block member // void TParseContext::updateBindlessQualifier(TType& memberType) { if (memberType.containsSampler()) { if (memberType.isStruct()) { TTypeList* typeList = memberType.getWritableStruct(); for (unsigned int member = 0; member < typeList->size(); ++member) { TType* subMemberType = (*typeList)[member].type; updateBindlessQualifier(*subMemberType); } } else if (memberType.getSampler().isImage()) { intermediate.setBindlessImageMode(currentCaller, AstRefTypeLayout); memberType.getQualifier().layoutBindlessImage = true; } else { intermediate.setBindlessTextureMode(currentCaller, AstRefTypeLayout); memberType.getQualifier().layoutBindlessSampler = true; } } } // // Do everything needed to add an interface block. // void TParseContext::declareBlock(const TSourceLoc& loc, TTypeList& typeList, const TString* instanceName, TArraySizes* arraySizes) { if (spvVersion.vulkan > 0 && spvVersion.vulkanRelaxed) blockStorageRemap(loc, blockName, currentBlockQualifier); blockStageIoCheck(loc, currentBlockQualifier); blockQualifierCheck(loc, currentBlockQualifier, instanceName != nullptr); if (arraySizes != nullptr) { arraySizesCheck(loc, currentBlockQualifier, arraySizes, nullptr, false); arrayOfArrayVersionCheck(loc, arraySizes); if (arraySizes->getNumDims() > 1) requireProfile(loc, ~EEsProfile, "array-of-array of block"); } // Inherit and check member storage qualifiers WRT to the block-level qualifier. for (unsigned int member = 0; member < typeList.size(); ++member) { TType& memberType = *typeList[member].type; TQualifier& memberQualifier = memberType.getQualifier(); const TSourceLoc& memberLoc = typeList[member].loc; if (memberQualifier.storage != EvqTemporary && memberQualifier.storage != EvqGlobal && memberQualifier.storage != currentBlockQualifier.storage) error(memberLoc, "member storage qualifier cannot contradict block storage qualifier", memberType.getFieldName().c_str(), ""); memberQualifier.storage = currentBlockQualifier.storage; globalQualifierFixCheck(memberLoc, memberQualifier); inheritMemoryQualifiers(currentBlockQualifier, memberQualifier); if (currentBlockQualifier.perPrimitiveNV) memberQualifier.perPrimitiveNV = currentBlockQualifier.perPrimitiveNV; if (currentBlockQualifier.perViewNV) memberQualifier.perViewNV = currentBlockQualifier.perViewNV; if (currentBlockQualifier.perTaskNV) memberQualifier.perTaskNV = currentBlockQualifier.perTaskNV; if (currentBlockQualifier.storage == EvqtaskPayloadSharedEXT) memberQualifier.storage = EvqtaskPayloadSharedEXT; if (memberQualifier.storage == EvqSpirvStorageClass) error(memberLoc, "member cannot have a spirv_storage_class qualifier", memberType.getFieldName().c_str(), ""); if (memberQualifier.hasSpirvDecorate() && !memberQualifier.getSpirvDecorate().decorateIds.empty()) error(memberLoc, "member cannot have a spirv_decorate_id qualifier", memberType.getFieldName().c_str(), ""); if ((currentBlockQualifier.storage == EvqUniform || currentBlockQualifier.storage == EvqBuffer) && (memberQualifier.isInterpolation() || memberQualifier.isAuxiliary())) error(memberLoc, "member of uniform or buffer block cannot have an auxiliary or interpolation qualifier", memberType.getFieldName().c_str(), ""); if (memberType.isArray()) arraySizesCheck(memberLoc, currentBlockQualifier, memberType.getArraySizes(), nullptr, member == typeList.size() - 1); if (memberQualifier.hasOffset()) { if (spvVersion.spv == 0) { profileRequires(memberLoc, ~EEsProfile, 440, E_GL_ARB_enhanced_layouts, "\"offset\" on block member"); profileRequires(memberLoc, EEsProfile, 300, E_GL_ARB_enhanced_layouts, "\"offset\" on block member"); } } // For bindless texture, sampler can be declared as uniform/storage block member, if (memberType.containsOpaque()) { if (memberType.containsSampler() && extensionTurnedOn(E_GL_ARB_bindless_texture)) updateBindlessQualifier(memberType); else error(memberLoc, "member of block cannot be or contain a sampler, image, or atomic_uint type", typeList[member].type->getFieldName().c_str(), ""); } if (memberType.containsCoopMat()) error(memberLoc, "member of block cannot be or contain a cooperative matrix type", typeList[member].type->getFieldName().c_str(), ""); if (memberType.containsCoopVec()) error(memberLoc, "member of block cannot be or contain a cooperative vector type", typeList[member].type->getFieldName().c_str(), ""); } // This might be a redeclaration of a built-in block. If so, redeclareBuiltinBlock() will // do all the rest. if (! symbolTable.atBuiltInLevel() && builtInName(*blockName)) { redeclareBuiltinBlock(loc, typeList, *blockName, instanceName, arraySizes); return; } // Not a redeclaration of a built-in; check that all names are user names. reservedErrorCheck(loc, *blockName); if (instanceName) reservedErrorCheck(loc, *instanceName); for (unsigned int member = 0; member < typeList.size(); ++member) reservedErrorCheck(typeList[member].loc, typeList[member].type->getFieldName()); // Make default block qualification, and adjust the member qualifications TQualifier defaultQualification; switch (currentBlockQualifier.storage) { case EvqUniform: defaultQualification = globalUniformDefaults; break; case EvqBuffer: defaultQualification = globalBufferDefaults; break; case EvqVaryingIn: defaultQualification = globalInputDefaults; break; case EvqVaryingOut: defaultQualification = globalOutputDefaults; break; case EvqShared: defaultQualification = globalSharedDefaults; break; default: defaultQualification.clear(); break; } // Special case for "push_constant uniform", which has a default of std430, // contrary to normal uniform defaults, and can't have a default tracked for it. if ((currentBlockQualifier.isPushConstant() && !currentBlockQualifier.hasPacking()) || (currentBlockQualifier.isShaderRecord() && !currentBlockQualifier.hasPacking())) currentBlockQualifier.layoutPacking = ElpStd430; // Special case for "taskNV in/out", which has a default of std430, if (currentBlockQualifier.isTaskMemory() && !currentBlockQualifier.hasPacking()) currentBlockQualifier.layoutPacking = ElpStd430; // fix and check for member layout qualifiers mergeObjectLayoutQualifiers(defaultQualification, currentBlockQualifier, true); // "The align qualifier can only be used on blocks or block members, and only for blocks declared with std140 or std430 layouts." if (currentBlockQualifier.hasAlign()) { if (defaultQualification.layoutPacking != ElpStd140 && defaultQualification.layoutPacking != ElpStd430 && defaultQualification.layoutPacking != ElpScalar) { error(loc, "can only be used with std140, std430, or scalar layout packing", "align", ""); defaultQualification.layoutAlign = -1; } } bool memberWithLocation = false; bool memberWithoutLocation = false; bool memberWithPerViewQualifier = false; for (unsigned int member = 0; member < typeList.size(); ++member) { TQualifier& memberQualifier = typeList[member].type->getQualifier(); const TSourceLoc& memberLoc = typeList[member].loc; if (memberQualifier.hasStream()) { if (defaultQualification.layoutStream != memberQualifier.layoutStream) error(memberLoc, "member cannot contradict block", "stream", ""); } // "This includes a block's inheritance of the // current global default buffer, a block member's inheritance of the block's // buffer, and the requirement that any *xfb_buffer* declared on a block // member must match the buffer inherited from the block." if (memberQualifier.hasXfbBuffer()) { if (defaultQualification.layoutXfbBuffer != memberQualifier.layoutXfbBuffer) error(memberLoc, "member cannot contradict block (or what block inherited from global)", "xfb_buffer", ""); } if (memberQualifier.hasPacking()) error(memberLoc, "member of block cannot have a packing layout qualifier", typeList[member].type->getFieldName().c_str(), ""); if (memberQualifier.hasLocation()) { const char* feature = "location on block member"; switch (currentBlockQualifier.storage) { case EvqVaryingIn: case EvqVaryingOut: requireProfile(memberLoc, ECoreProfile | ECompatibilityProfile | EEsProfile, feature); profileRequires(memberLoc, ECoreProfile | ECompatibilityProfile, 440, E_GL_ARB_enhanced_layouts, feature); profileRequires(memberLoc, EEsProfile, 320, Num_AEP_shader_io_blocks, AEP_shader_io_blocks, feature); memberWithLocation = true; break; default: error(memberLoc, "can only use in an in/out block", feature, ""); break; } } else memberWithoutLocation = true; // "The offset qualifier can only be used on block members of blocks declared with std140 or std430 layouts." // "The align qualifier can only be used on blocks or block members, and only for blocks declared with std140 or std430 layouts." if (memberQualifier.hasAlign() || memberQualifier.hasOffset()) { if (defaultQualification.layoutPacking != ElpStd140 && defaultQualification.layoutPacking != ElpStd430 && defaultQualification.layoutPacking != ElpScalar) error(memberLoc, "can only be used with std140, std430, or scalar layout packing", "offset/align", ""); } if (memberQualifier.isPerView()) { memberWithPerViewQualifier = true; } TQualifier newMemberQualification = defaultQualification; mergeQualifiers(memberLoc, newMemberQualification, memberQualifier, false); memberQualifier = newMemberQualification; } layoutMemberLocationArrayCheck(loc, memberWithLocation, arraySizes); // Ensure that the block has an XfbBuffer assigned. This is needed // because if the block has a XfbOffset assigned, then it is // assumed that it has implicitly assigned the current global // XfbBuffer, and because it's members need to be assigned a // XfbOffset if they lack it. if (currentBlockQualifier.storage == EvqVaryingOut && globalOutputDefaults.hasXfbBuffer()) { if (!currentBlockQualifier.hasXfbBuffer() && currentBlockQualifier.hasXfbOffset()) currentBlockQualifier.layoutXfbBuffer = globalOutputDefaults.layoutXfbBuffer; } // Process the members fixBlockLocations(loc, currentBlockQualifier, typeList, memberWithLocation, memberWithoutLocation); fixXfbOffsets(currentBlockQualifier, typeList); fixBlockUniformOffsets(currentBlockQualifier, typeList); fixBlockUniformLayoutMatrix(currentBlockQualifier, &typeList, nullptr); fixBlockUniformLayoutPacking(currentBlockQualifier, &typeList, nullptr); for (unsigned int member = 0; member < typeList.size(); ++member) layoutTypeCheck(typeList[member].loc, *typeList[member].type); if (memberWithPerViewQualifier) { for (unsigned int member = 0; member < typeList.size(); ++member) { checkAndResizeMeshViewDim(typeList[member].loc, *typeList[member].type, /*isBlockMember*/ true); } } // reverse merge, so that currentBlockQualifier now has all layout information // (can't use defaultQualification directly, it's missing other non-layout-default-class qualifiers) mergeObjectLayoutQualifiers(currentBlockQualifier, defaultQualification, true); // // Build and add the interface block as a new type named 'blockName' // TType blockType(&typeList, *blockName, currentBlockQualifier); if (arraySizes != nullptr) blockType.transferArraySizes(arraySizes); if (arraySizes == nullptr) ioArrayCheck(loc, blockType, instanceName ? *instanceName : *blockName); if (currentBlockQualifier.hasBufferReference()) { if (currentBlockQualifier.storage != EvqBuffer) error(loc, "can only be used with buffer", "buffer_reference", ""); // Create the block reference type. If it was forward-declared, detect that // as a referent struct type with no members. Replace the referent type with // blockType. TType blockNameType(EbtReference, blockType, *blockName); TVariable* blockNameVar = new TVariable(blockName, blockNameType, true); if (! symbolTable.insert(*blockNameVar)) { TSymbol* existingName = symbolTable.find(*blockName); if (existingName->getType().isReference() && existingName->getType().getReferentType()->getStruct() && existingName->getType().getReferentType()->getStruct()->size() == 0 && existingName->getType().getQualifier().storage == blockType.getQualifier().storage) { existingName->getType().getReferentType()->deepCopy(blockType); } else { error(loc, "block name cannot be redefined", blockName->c_str(), ""); } } if (!instanceName) { return; } } else { // // Don't make a user-defined type out of block name; that will cause an error // if the same block name gets reused in a different interface. // // "Block names have no other use within a shader // beyond interface matching; it is a compile-time error to use a block name at global scope for anything // other than as a block name (e.g., use of a block name for a global variable name or function name is // currently reserved)." // // Use the symbol table to prevent normal reuse of the block's name, as a variable entry, // whose type is EbtBlock, but without all the structure; that will come from the type // the instances point to. // TType blockNameType(EbtBlock, blockType.getQualifier().storage); TVariable* blockNameVar = new TVariable(blockName, blockNameType); if (! symbolTable.insert(*blockNameVar)) { TSymbol* existingName = symbolTable.find(*blockName); if (existingName->getType().getBasicType() == EbtBlock) { if (existingName->getType().getQualifier().storage == blockType.getQualifier().storage) { error(loc, "Cannot reuse block name within the same interface:", blockName->c_str(), blockType.getStorageQualifierString()); return; } } else { error(loc, "block name cannot redefine a non-block name", blockName->c_str(), ""); return; } } } // Add the variable, as anonymous or named instanceName. // Make an anonymous variable if no name was provided. if (! instanceName) instanceName = NewPoolTString(""); TVariable& variable = *new TVariable(instanceName, blockType); if (! symbolTable.insert(variable)) { if (*instanceName == "") error(loc, "nameless block contains a member that already has a name at global scope", blockName->c_str(), ""); else error(loc, "block instance name redefinition", variable.getName().c_str(), ""); return; } // Check for general layout qualifier errors layoutObjectCheck(loc, variable); // fix up if (isIoResizeArray(blockType)) { ioArraySymbolResizeList.push_back(&variable); checkIoArraysConsistency(loc, true); } else fixIoArraySize(loc, variable.getWritableType()); // Save it in the AST for linker use. trackLinkage(variable); } // // allow storage type of block to be remapped at compile time // void TParseContext::blockStorageRemap(const TSourceLoc&, const TString* instanceName, TQualifier& qualifier) { TBlockStorageClass type = intermediate.getBlockStorageOverride(instanceName->c_str()); if (type != EbsNone) { qualifier.setBlockStorage(type); } } // Do all block-declaration checking regarding the combination of in/out/uniform/buffer // with a particular stage. void TParseContext::blockStageIoCheck(const TSourceLoc& loc, const TQualifier& qualifier) { const char *extsrt[2] = { E_GL_NV_ray_tracing, E_GL_EXT_ray_tracing }; switch (qualifier.storage) { case EvqUniform: profileRequires(loc, EEsProfile, 300, nullptr, "uniform block"); profileRequires(loc, ENoProfile, 140, E_GL_ARB_uniform_buffer_object, "uniform block"); if (currentBlockQualifier.layoutPacking == ElpStd430 && ! currentBlockQualifier.isPushConstant()) requireExtensions(loc, 1, &E_GL_EXT_scalar_block_layout, "std430 requires the buffer storage qualifier"); break; case EvqBuffer: requireProfile(loc, EEsProfile | ECoreProfile | ECompatibilityProfile, "buffer block"); profileRequires(loc, ECoreProfile | ECompatibilityProfile, 430, E_GL_ARB_shader_storage_buffer_object, "buffer block"); profileRequires(loc, EEsProfile, 310, nullptr, "buffer block"); break; case EvqVaryingIn: profileRequires(loc, ~EEsProfile, 150, E_GL_ARB_separate_shader_objects, "input block"); // It is a compile-time error to have an input block in a vertex shader or an output block in a fragment shader // "Compute shaders do not permit user-defined input variables..." requireStage(loc, (EShLanguageMask)(EShLangTessControlMask|EShLangTessEvaluationMask|EShLangGeometryMask| EShLangFragmentMask|EShLangMeshMask), "input block"); if (language == EShLangFragment) { profileRequires(loc, EEsProfile, 320, Num_AEP_shader_io_blocks, AEP_shader_io_blocks, "fragment input block"); } else if (language == EShLangMesh && ! qualifier.isTaskMemory()) { error(loc, "input blocks cannot be used in a mesh shader", "out", ""); } break; case EvqVaryingOut: profileRequires(loc, ~EEsProfile, 150, E_GL_ARB_separate_shader_objects, "output block"); requireStage(loc, (EShLanguageMask)(EShLangVertexMask|EShLangTessControlMask|EShLangTessEvaluationMask| EShLangGeometryMask|EShLangMeshMask|EShLangTaskMask), "output block"); // ES 310 can have a block before shader_io is turned on, so skip this test for built-ins if (language == EShLangVertex && ! parsingBuiltins) { profileRequires(loc, EEsProfile, 320, Num_AEP_shader_io_blocks, AEP_shader_io_blocks, "vertex output block"); } else if (language == EShLangMesh && qualifier.isTaskMemory()) { error(loc, "can only use on input blocks in mesh shader", "taskNV", ""); } else if (language == EShLangTask && ! qualifier.isTaskMemory()) { error(loc, "output blocks cannot be used in a task shader", "out", ""); } break; case EvqShared: if (spvVersion.spv > 0 && spvVersion.spv < EShTargetSpv_1_4) { error(loc, "shared block requires at least SPIR-V 1.4", "shared block", ""); } profileRequires(loc, EEsProfile | ECoreProfile | ECompatibilityProfile, 0, E_GL_EXT_shared_memory_block, "shared block"); break; case EvqPayload: profileRequires(loc, ~EEsProfile, 460, 2, extsrt, "rayPayloadNV block"); requireStage(loc, (EShLanguageMask)(EShLangRayGenMask | EShLangAnyHitMask | EShLangClosestHitMask | EShLangMissMask), "rayPayloadNV block"); break; case EvqPayloadIn: profileRequires(loc, ~EEsProfile, 460, 2, extsrt, "rayPayloadInNV block"); requireStage(loc, (EShLanguageMask)(EShLangAnyHitMask | EShLangClosestHitMask | EShLangMissMask), "rayPayloadInNV block"); break; case EvqHitAttr: profileRequires(loc, ~EEsProfile, 460, 2, extsrt, "hitAttributeNV block"); requireStage(loc, (EShLanguageMask)(EShLangIntersectMask | EShLangAnyHitMask | EShLangClosestHitMask), "hitAttributeNV block"); break; case EvqCallableData: profileRequires(loc, ~EEsProfile, 460, 2, extsrt, "callableDataNV block"); requireStage(loc, (EShLanguageMask)(EShLangRayGenMask | EShLangClosestHitMask | EShLangMissMask | EShLangCallableMask), "callableDataNV block"); break; case EvqCallableDataIn: profileRequires(loc, ~EEsProfile, 460, 2, extsrt, "callableDataInNV block"); requireStage(loc, (EShLanguageMask)(EShLangCallableMask), "callableDataInNV block"); break; case EvqHitObjectAttrNV: profileRequires(loc, ~EEsProfile, 460, E_GL_NV_shader_invocation_reorder, "hitObjectAttributeNV block"); requireStage(loc, (EShLanguageMask)(EShLangRayGenMask | EShLangClosestHitMask | EShLangMissMask), "hitObjectAttributeNV block"); break; default: error(loc, "only uniform, buffer, in, or out blocks are supported", blockName->c_str(), ""); break; } } // Do all block-declaration checking regarding its qualifiers. void TParseContext::blockQualifierCheck(const TSourceLoc& loc, const TQualifier& qualifier, bool /*instanceName*/) { // The 4.5 specification says: // // interface-block : // layout-qualifieropt interface-qualifier block-name { member-list } instance-nameopt ; // // interface-qualifier : // in // out // patch in // patch out // uniform // buffer // // Note however memory qualifiers aren't included, yet the specification also says // // "...memory qualifiers may also be used in the declaration of shader storage blocks..." if (qualifier.isInterpolation()) error(loc, "cannot use interpolation qualifiers on an interface block", "flat/smooth/noperspective", ""); if (qualifier.centroid) error(loc, "cannot use centroid qualifier on an interface block", "centroid", ""); if (qualifier.isSample()) error(loc, "cannot use sample qualifier on an interface block", "sample", ""); if (qualifier.invariant) error(loc, "cannot use invariant qualifier on an interface block", "invariant", ""); if (qualifier.isPushConstant()) intermediate.addPushConstantCount(); if (qualifier.isShaderRecord()) intermediate.addShaderRecordCount(); if (qualifier.isTaskMemory()) intermediate.addTaskNVCount(); } // // "For a block, this process applies to the entire block, or until the first member // is reached that has a location layout qualifier. When a block member is declared with a location // qualifier, its location comes from that qualifier: The member's location qualifier overrides the block-level // declaration. Subsequent members are again assigned consecutive locations, based on the newest location, // until the next member declared with a location qualifier. The values used for locations do not have to be // declared in increasing order." void TParseContext::fixBlockLocations(const TSourceLoc& loc, TQualifier& qualifier, TTypeList& typeList, bool memberWithLocation, bool memberWithoutLocation) { // "If a block has no block-level location layout qualifier, it is required that either all or none of its members // have a location layout qualifier, or a compile-time error results." if (! qualifier.hasLocation() && memberWithLocation && memberWithoutLocation) error(loc, "either the block needs a location, or all members need a location, or no members have a location", "location", ""); else { if (memberWithLocation) { // remove any block-level location and make it per *every* member int nextLocation = 0; // by the rule above, initial value is not relevant if (qualifier.hasAnyLocation()) { nextLocation = qualifier.layoutLocation; qualifier.layoutLocation = TQualifier::layoutLocationEnd; if (qualifier.hasComponent()) { // "It is a compile-time error to apply the *component* qualifier to a ... block" error(loc, "cannot apply to a block", "component", ""); } if (qualifier.hasIndex()) { error(loc, "cannot apply to a block", "index", ""); } } for (unsigned int member = 0; member < typeList.size(); ++member) { TQualifier& memberQualifier = typeList[member].type->getQualifier(); const TSourceLoc& memberLoc = typeList[member].loc; if (! memberQualifier.hasLocation()) { if (nextLocation >= (int)TQualifier::layoutLocationEnd) error(memberLoc, "location is too large", "location", ""); memberQualifier.layoutLocation = nextLocation; memberQualifier.layoutComponent = TQualifier::layoutComponentEnd; } nextLocation = memberQualifier.layoutLocation + intermediate.computeTypeLocationSize( *typeList[member].type, language); } } } } void TParseContext::fixXfbOffsets(TQualifier& qualifier, TTypeList& typeList) { // "If a block is qualified with xfb_offset, all its // members are assigned transform feedback buffer offsets. If a block is not qualified with xfb_offset, any // members of that block not qualified with an xfb_offset will not be assigned transform feedback buffer // offsets." if (! qualifier.hasXfbBuffer() || ! qualifier.hasXfbOffset()) return; int nextOffset = qualifier.layoutXfbOffset; for (unsigned int member = 0; member < typeList.size(); ++member) { TQualifier& memberQualifier = typeList[member].type->getQualifier(); bool contains64BitType = false; bool contains32BitType = false; bool contains16BitType = false; int memberSize = intermediate.computeTypeXfbSize(*typeList[member].type, contains64BitType, contains32BitType, contains16BitType); // see if we need to auto-assign an offset to this member if (! memberQualifier.hasXfbOffset()) { // "if applied to an aggregate containing a double or 64-bit integer, the offset must also be a multiple of 8" if (contains64BitType) RoundToPow2(nextOffset, 8); else if (contains32BitType) RoundToPow2(nextOffset, 4); else if (contains16BitType) RoundToPow2(nextOffset, 2); memberQualifier.layoutXfbOffset = nextOffset; } else nextOffset = memberQualifier.layoutXfbOffset; nextOffset += memberSize; } // The above gave all block members an offset, so we can take it off the block now, // which will avoid double counting the offset usage. qualifier.layoutXfbOffset = TQualifier::layoutXfbOffsetEnd; } // Calculate and save the offset of each block member, using the recursively // defined block offset rules and the user-provided offset and align. // // Also, compute and save the total size of the block. For the block's size, arrayness // is not taken into account, as each element is backed by a separate buffer. // void TParseContext::fixBlockUniformOffsets(TQualifier& qualifier, TTypeList& typeList) { if (!storageCanHaveLayoutInBlock(qualifier.storage) && !qualifier.isTaskMemory()) return; if (qualifier.layoutPacking != ElpStd140 && qualifier.layoutPacking != ElpStd430 && qualifier.layoutPacking != ElpScalar) return; int offset = 0; int memberSize; for (unsigned int member = 0; member < typeList.size(); ++member) { TQualifier& memberQualifier = typeList[member].type->getQualifier(); const TSourceLoc& memberLoc = typeList[member].loc; // "When align is applied to an array, it effects only the start of the array, not the array's internal stride." // modify just the children's view of matrix layout, if there is one for this member TLayoutMatrix subMatrixLayout = typeList[member].type->getQualifier().layoutMatrix; int dummyStride; int memberAlignment = intermediate.getMemberAlignment(*typeList[member].type, memberSize, dummyStride, qualifier.layoutPacking, subMatrixLayout != ElmNone ? subMatrixLayout == ElmRowMajor : qualifier.layoutMatrix == ElmRowMajor); if (memberQualifier.hasOffset()) { // "The specified offset must be a multiple // of the base alignment of the type of the block member it qualifies, or a compile-time error results." if (! IsMultipleOfPow2(memberQualifier.layoutOffset, memberAlignment)) error(memberLoc, "must be a multiple of the member's alignment", "offset", "(layout offset = %d | member alignment = %d)", memberQualifier.layoutOffset, memberAlignment); // GLSL: "It is a compile-time error to specify an offset that is smaller than the offset of the previous // member in the block or that lies within the previous member of the block" if (spvVersion.spv == 0) { if (memberQualifier.layoutOffset < offset) error(memberLoc, "cannot lie in previous members", "offset", ""); // "The offset qualifier forces the qualified member to start at or after the specified // integral-constant expression, which will be its byte offset from the beginning of the buffer. // "The actual offset of a member is computed as // follows: If offset was declared, start with that offset, otherwise start with the next available offset." offset = std::max(offset, memberQualifier.layoutOffset); } else { // TODO: Vulkan: "It is a compile-time error to have any offset, explicit or assigned, // that lies within another member of the block." offset = memberQualifier.layoutOffset; } } // "The actual alignment of a member will be the greater of the specified align alignment and the standard // (e.g., std140) base alignment for the member's type." if (memberQualifier.hasAlign()) memberAlignment = std::max(memberAlignment, memberQualifier.layoutAlign); // "If the resulting offset is not a multiple of the actual alignment, // increase it to the first offset that is a multiple of // the actual alignment." RoundToPow2(offset, memberAlignment); typeList[member].type->getQualifier().layoutOffset = offset; offset += memberSize; } } // // Spread LayoutMatrix to uniform block member, if a uniform block member is a struct, // we need spread LayoutMatrix to this struct member too. and keep this rule for recursive. // void TParseContext::fixBlockUniformLayoutMatrix(TQualifier& qualifier, TTypeList* originTypeList, TTypeList* tmpTypeList) { assert(tmpTypeList == nullptr || originTypeList->size() == tmpTypeList->size()); for (unsigned int member = 0; member < originTypeList->size(); ++member) { if (qualifier.layoutPacking != ElpNone) { if (tmpTypeList == nullptr) { if (((*originTypeList)[member].type->isMatrix() || (*originTypeList)[member].type->getBasicType() == EbtStruct) && (*originTypeList)[member].type->getQualifier().layoutMatrix == ElmNone) { (*originTypeList)[member].type->getQualifier().layoutMatrix = qualifier.layoutMatrix; } } else { if (((*tmpTypeList)[member].type->isMatrix() || (*tmpTypeList)[member].type->getBasicType() == EbtStruct) && (*tmpTypeList)[member].type->getQualifier().layoutMatrix == ElmNone) { (*tmpTypeList)[member].type->getQualifier().layoutMatrix = qualifier.layoutMatrix; } } } if ((*originTypeList)[member].type->getBasicType() == EbtStruct) { TQualifier* memberQualifier = nullptr; // block member can be declare a matrix style, so it should be update to the member's style if ((*originTypeList)[member].type->getQualifier().layoutMatrix == ElmNone) { memberQualifier = &qualifier; } else { memberQualifier = &((*originTypeList)[member].type->getQualifier()); } const TType* tmpType = tmpTypeList == nullptr ? (*originTypeList)[member].type->clone() : (*tmpTypeList)[member].type; fixBlockUniformLayoutMatrix(*memberQualifier, (*originTypeList)[member].type->getWritableStruct(), tmpType->getWritableStruct()); const TTypeList* structure = recordStructCopy(matrixFixRecord, (*originTypeList)[member].type, tmpType); if (tmpTypeList == nullptr) { (*originTypeList)[member].type->setStruct(const_cast(structure)); } if (tmpTypeList != nullptr) { (*tmpTypeList)[member].type->setStruct(const_cast(structure)); } } } } // // Spread LayoutPacking to matrix or aggregate block members. If a block member is a struct or // array of struct, spread LayoutPacking recursively to its matrix or aggregate members. // void TParseContext::fixBlockUniformLayoutPacking(TQualifier& qualifier, TTypeList* originTypeList, TTypeList* tmpTypeList) { assert(tmpTypeList == nullptr || originTypeList->size() == tmpTypeList->size()); for (unsigned int member = 0; member < originTypeList->size(); ++member) { if (qualifier.layoutPacking != ElpNone) { if (tmpTypeList == nullptr) { if ((*originTypeList)[member].type->getQualifier().layoutPacking == ElpNone && !(*originTypeList)[member].type->isScalarOrVector()) { (*originTypeList)[member].type->getQualifier().layoutPacking = qualifier.layoutPacking; } } else { if ((*tmpTypeList)[member].type->getQualifier().layoutPacking == ElpNone && !(*tmpTypeList)[member].type->isScalarOrVector()) { (*tmpTypeList)[member].type->getQualifier().layoutPacking = qualifier.layoutPacking; } } } if ((*originTypeList)[member].type->getBasicType() == EbtStruct) { // Deep copy the type in pool. // Because, struct use in different block may have different layout qualifier. // We have to new a object to distinguish between them. const TType* tmpType = tmpTypeList == nullptr ? (*originTypeList)[member].type->clone() : (*tmpTypeList)[member].type; fixBlockUniformLayoutPacking(qualifier, (*originTypeList)[member].type->getWritableStruct(), tmpType->getWritableStruct()); const TTypeList* structure = recordStructCopy(packingFixRecord, (*originTypeList)[member].type, tmpType); if (tmpTypeList == nullptr) { (*originTypeList)[member].type->setStruct(const_cast(structure)); } if (tmpTypeList != nullptr) { (*tmpTypeList)[member].type->setStruct(const_cast(structure)); } } } } // For an identifier that is already declared, add more qualification to it. void TParseContext::addQualifierToExisting(const TSourceLoc& loc, TQualifier qualifier, const TString& identifier) { TSymbol* symbol = symbolTable.find(identifier); // A forward declaration of a block reference looks to the grammar like adding // a qualifier to an existing symbol. Detect this and create the block reference // type with an empty type list, which will be filled in later in // TParseContext::declareBlock. if (!symbol && qualifier.hasBufferReference()) { // The layout qualifiers are ignored in forward declaration, give warning for the most probable to be seen if (qualifier.hasBufferReferenceAlign()) { warn(loc, "the buffer_reference_align layout is ignored when defined in forward declaration", identifier.c_str(), ""); } if (qualifier.hasPacking()) { warn(loc, "the packing layout (scalar, std430, etc) is ignored when defined in forward declaration", identifier.c_str(), ""); } TTypeList typeList; TType blockType(&typeList, identifier, qualifier); TType blockNameType(EbtReference, blockType, identifier); TVariable* blockNameVar = new TVariable(&identifier, blockNameType, true); if (! symbolTable.insert(*blockNameVar)) { error(loc, "block name cannot redefine a non-block name", blockName->c_str(), ""); } return; } if (! symbol) { error(loc, "identifier not previously declared", identifier.c_str(), ""); return; } if (symbol->getAsFunction()) { error(loc, "cannot re-qualify a function name", identifier.c_str(), ""); return; } if (qualifier.isAuxiliary() || qualifier.isMemory() || qualifier.isInterpolation() || qualifier.hasLayout() || qualifier.storage != EvqTemporary || qualifier.precision != EpqNone) { error(loc, "cannot add storage, auxiliary, memory, interpolation, layout, or precision qualifier to an existing variable", identifier.c_str(), ""); return; } // For read-only built-ins, add a new symbol for holding the modified qualifier. // This will bring up an entire block, if a block type has to be modified (e.g., gl_Position inside a block) if (symbol->isReadOnly()) symbol = symbolTable.copyUp(symbol); if (qualifier.invariant) { if (intermediate.inIoAccessed(identifier)) error(loc, "cannot change qualification after use", "invariant", ""); symbol->getWritableType().getQualifier().invariant = true; invariantCheck(loc, symbol->getType().getQualifier()); } else if (qualifier.isNoContraction()) { if (intermediate.inIoAccessed(identifier)) error(loc, "cannot change qualification after use", "precise", ""); symbol->getWritableType().getQualifier().setNoContraction(); } else if (qualifier.specConstant) { symbol->getWritableType().getQualifier().makeSpecConstant(); if (qualifier.hasSpecConstantId()) symbol->getWritableType().getQualifier().layoutSpecConstantId = qualifier.layoutSpecConstantId; } else warn(loc, "unknown requalification", "", ""); } void TParseContext::addQualifierToExisting(const TSourceLoc& loc, TQualifier qualifier, TIdentifierList& identifiers) { for (unsigned int i = 0; i < identifiers.size(); ++i) addQualifierToExisting(loc, qualifier, *identifiers[i]); } // Make sure 'invariant' isn't being applied to a non-allowed object. void TParseContext::invariantCheck(const TSourceLoc& loc, const TQualifier& qualifier) { if (! qualifier.invariant) return; bool pipeOut = qualifier.isPipeOutput(); bool pipeIn = qualifier.isPipeInput(); if ((version >= 300 && isEsProfile()) || (!isEsProfile() && version >= 420)) { if (! pipeOut) error(loc, "can only apply to an output", "invariant", ""); } else { if ((language == EShLangVertex && pipeIn) || (! pipeOut && ! pipeIn)) error(loc, "can only apply to an output, or to an input in a non-vertex stage\n", "invariant", ""); } } // // Updating default qualifier for the case of a declaration with just a qualifier, // no type, block, or identifier. // void TParseContext::updateStandaloneQualifierDefaults(const TSourceLoc& loc, const TPublicType& publicType) { if (publicType.shaderQualifiers.vertices != TQualifier::layoutNotSet) { assert(language == EShLangTessControl || language == EShLangGeometry || language == EShLangMesh); const char* id = (language == EShLangTessControl) ? "vertices" : "max_vertices"; if (publicType.qualifier.storage != EvqVaryingOut) error(loc, "can only apply to 'out'", id, ""); if (! intermediate.setVertices(publicType.shaderQualifiers.vertices)) error(loc, "cannot change previously set layout value", id, ""); if (language == EShLangTessControl) checkIoArraysConsistency(loc); } if (publicType.shaderQualifiers.primitives != TQualifier::layoutNotSet) { assert(language == EShLangMesh); const char* id = "max_primitives"; if (publicType.qualifier.storage != EvqVaryingOut) error(loc, "can only apply to 'out'", id, ""); if (! intermediate.setPrimitives(publicType.shaderQualifiers.primitives)) error(loc, "cannot change previously set layout value", id, ""); } if (publicType.shaderQualifiers.invocations != TQualifier::layoutNotSet) { if (publicType.qualifier.storage != EvqVaryingIn) error(loc, "can only apply to 'in'", "invocations", ""); if (! intermediate.setInvocations(publicType.shaderQualifiers.invocations)) error(loc, "cannot change previously set layout value", "invocations", ""); } if (publicType.shaderQualifiers.geometry != ElgNone) { if (publicType.qualifier.storage == EvqVaryingIn) { switch (publicType.shaderQualifiers.geometry) { case ElgPoints: case ElgLines: case ElgLinesAdjacency: case ElgTriangles: case ElgTrianglesAdjacency: case ElgQuads: case ElgIsolines: if (language == EShLangMesh) { error(loc, "cannot apply to input", TQualifier::getGeometryString(publicType.shaderQualifiers.geometry), ""); break; } if (intermediate.setInputPrimitive(publicType.shaderQualifiers.geometry)) { if (language == EShLangGeometry) checkIoArraysConsistency(loc); } else error(loc, "cannot change previously set input primitive", TQualifier::getGeometryString(publicType.shaderQualifiers.geometry), ""); break; default: error(loc, "cannot apply to input", TQualifier::getGeometryString(publicType.shaderQualifiers.geometry), ""); } } else if (publicType.qualifier.storage == EvqVaryingOut) { switch (publicType.shaderQualifiers.geometry) { case ElgLines: case ElgTriangles: if (language != EShLangMesh) { error(loc, "cannot apply to 'out'", TQualifier::getGeometryString(publicType.shaderQualifiers.geometry), ""); break; } [[fallthrough]]; case ElgPoints: case ElgLineStrip: case ElgTriangleStrip: if (! intermediate.setOutputPrimitive(publicType.shaderQualifiers.geometry)) error(loc, "cannot change previously set output primitive", TQualifier::getGeometryString(publicType.shaderQualifiers.geometry), ""); break; default: error(loc, "cannot apply to 'out'", TQualifier::getGeometryString(publicType.shaderQualifiers.geometry), ""); } } else error(loc, "cannot apply to:", TQualifier::getGeometryString(publicType.shaderQualifiers.geometry), GetStorageQualifierString(publicType.qualifier.storage)); } if (publicType.shaderQualifiers.spacing != EvsNone) { if (publicType.qualifier.storage == EvqVaryingIn) { if (! intermediate.setVertexSpacing(publicType.shaderQualifiers.spacing)) error(loc, "cannot change previously set vertex spacing", TQualifier::getVertexSpacingString(publicType.shaderQualifiers.spacing), ""); } else error(loc, "can only apply to 'in'", TQualifier::getVertexSpacingString(publicType.shaderQualifiers.spacing), ""); } if (publicType.shaderQualifiers.order != EvoNone) { if (publicType.qualifier.storage == EvqVaryingIn) { if (! intermediate.setVertexOrder(publicType.shaderQualifiers.order)) error(loc, "cannot change previously set vertex order", TQualifier::getVertexOrderString(publicType.shaderQualifiers.order), ""); } else error(loc, "can only apply to 'in'", TQualifier::getVertexOrderString(publicType.shaderQualifiers.order), ""); } if (publicType.shaderQualifiers.pointMode) { if (publicType.qualifier.storage == EvqVaryingIn) intermediate.setPointMode(); else error(loc, "can only apply to 'in'", "point_mode", ""); } for (int i = 0; i < 3; ++i) { if (publicType.shaderQualifiers.localSizeNotDefault[i]) { if (publicType.qualifier.storage == EvqVaryingIn) { if (! intermediate.setLocalSize(i, publicType.shaderQualifiers.localSize[i])) error(loc, "cannot change previously set size", "local_size", ""); else { int max = 0; if (language == EShLangCompute) { switch (i) { case 0: max = resources.maxComputeWorkGroupSizeX; break; case 1: max = resources.maxComputeWorkGroupSizeY; break; case 2: max = resources.maxComputeWorkGroupSizeZ; break; default: break; } if (intermediate.getLocalSize(i) > (unsigned int)max) error(loc, "too large; see gl_MaxComputeWorkGroupSize", "local_size", ""); } else if (language == EShLangMesh) { switch (i) { case 0: max = extensionTurnedOn(E_GL_EXT_mesh_shader) ? resources.maxMeshWorkGroupSizeX_EXT : resources.maxMeshWorkGroupSizeX_NV; break; case 1: max = extensionTurnedOn(E_GL_EXT_mesh_shader) ? resources.maxMeshWorkGroupSizeY_EXT : resources.maxMeshWorkGroupSizeY_NV ; break; case 2: max = extensionTurnedOn(E_GL_EXT_mesh_shader) ? resources.maxMeshWorkGroupSizeZ_EXT : resources.maxMeshWorkGroupSizeZ_NV ; break; default: break; } if (intermediate.getLocalSize(i) > (unsigned int)max) { TString maxsErrtring = "too large, see "; maxsErrtring.append(extensionTurnedOn(E_GL_EXT_mesh_shader) ? "gl_MaxMeshWorkGroupSizeEXT" : "gl_MaxMeshWorkGroupSizeNV"); error(loc, maxsErrtring.c_str(), "local_size", ""); } } else if (language == EShLangTask) { switch (i) { case 0: max = extensionTurnedOn(E_GL_EXT_mesh_shader) ? resources.maxTaskWorkGroupSizeX_EXT : resources.maxTaskWorkGroupSizeX_NV; break; case 1: max = extensionTurnedOn(E_GL_EXT_mesh_shader) ? resources.maxTaskWorkGroupSizeY_EXT: resources.maxTaskWorkGroupSizeY_NV; break; case 2: max = extensionTurnedOn(E_GL_EXT_mesh_shader) ? resources.maxTaskWorkGroupSizeZ_EXT: resources.maxTaskWorkGroupSizeZ_NV; break; default: break; } if (intermediate.getLocalSize(i) > (unsigned int)max) { TString maxsErrtring = "too large, see "; maxsErrtring.append(extensionTurnedOn(E_GL_EXT_mesh_shader) ? "gl_MaxTaskWorkGroupSizeEXT" : "gl_MaxTaskWorkGroupSizeNV"); error(loc, maxsErrtring.c_str(), "local_size", ""); } } else { assert(0); } // Fix the existing constant gl_WorkGroupSize with this new information. TVariable* workGroupSize = getEditableVariable("gl_WorkGroupSize"); if (workGroupSize != nullptr) workGroupSize->getWritableConstArray()[i].setUConst(intermediate.getLocalSize(i)); } } else error(loc, "can only apply to 'in'", "local_size", ""); } if (publicType.shaderQualifiers.localSizeSpecId[i] != TQualifier::layoutNotSet) { if (publicType.qualifier.storage == EvqVaryingIn) { if (! intermediate.setLocalSizeSpecId(i, publicType.shaderQualifiers.localSizeSpecId[i])) error(loc, "cannot change previously set size", "local_size", ""); } else error(loc, "can only apply to 'in'", "local_size id", ""); // Set the workgroup built-in variable as a specialization constant TVariable* workGroupSize = getEditableVariable("gl_WorkGroupSize"); if (workGroupSize != nullptr) workGroupSize->getWritableType().getQualifier().specConstant = true; } } if (publicType.shaderQualifiers.earlyFragmentTests) { if (publicType.qualifier.storage == EvqVaryingIn) intermediate.setEarlyFragmentTests(); else error(loc, "can only apply to 'in'", "early_fragment_tests", ""); } if (publicType.shaderQualifiers.earlyAndLateFragmentTestsAMD) { if (publicType.qualifier.storage == EvqVaryingIn) intermediate.setEarlyAndLateFragmentTestsAMD(); else error(loc, "can only apply to 'in'", "early_and_late_fragment_tests_amd", ""); } if (publicType.shaderQualifiers.postDepthCoverage) { if (publicType.qualifier.storage == EvqVaryingIn) intermediate.setPostDepthCoverage(); else error(loc, "can only apply to 'in'", "post_coverage_coverage", ""); } if (publicType.shaderQualifiers.nonCoherentColorAttachmentReadEXT) { if (publicType.qualifier.storage == EvqVaryingIn) intermediate.setNonCoherentColorAttachmentReadEXT(); else error(loc, "can only apply to 'in'", "non_coherent_color_attachment_readEXT", ""); } if (publicType.shaderQualifiers.nonCoherentDepthAttachmentReadEXT) { if (publicType.qualifier.storage == EvqVaryingIn) intermediate.setNonCoherentDepthAttachmentReadEXT(); else error(loc, "can only apply to 'in'", "non_coherent_depth_attachment_readEXT", ""); } if (publicType.shaderQualifiers.nonCoherentStencilAttachmentReadEXT) { if (publicType.qualifier.storage == EvqVaryingIn) intermediate.setNonCoherentStencilAttachmentReadEXT(); else error(loc, "can only apply to 'in'", "non_coherent_stencil_attachment_readEXT", ""); } if (publicType.shaderQualifiers.layoutNonCoherentTileAttachmentReadQCOM) { if (publicType.qualifier.storage == EvqVaryingIn) intermediate.setNonCoherentTileAttachmentReadQCOM(); else error(loc, "can only apply to 'in'", "non_coherent_attachment_readQCOM", ""); } if (publicType.shaderQualifiers.hasBlendEquation()) { if (publicType.qualifier.storage != EvqVaryingOut) error(loc, "can only apply to 'out'", "blend equation", ""); } if (publicType.shaderQualifiers.interlockOrdering) { if (publicType.qualifier.storage == EvqVaryingIn) { if (!intermediate.setInterlockOrdering(publicType.shaderQualifiers.interlockOrdering)) error(loc, "cannot change previously set fragment shader interlock ordering", TQualifier::getInterlockOrderingString(publicType.shaderQualifiers.interlockOrdering), ""); } else error(loc, "can only apply to 'in'", TQualifier::getInterlockOrderingString(publicType.shaderQualifiers.interlockOrdering), ""); } if (publicType.shaderQualifiers.layoutDerivativeGroupQuads && publicType.shaderQualifiers.layoutDerivativeGroupLinear) { error(loc, "cannot be both specified", "derivative_group_quadsNV and derivative_group_linearNV", ""); } if (publicType.shaderQualifiers.layoutDerivativeGroupQuads) { if (publicType.qualifier.storage == EvqVaryingIn) { if ((intermediate.getLocalSizeSpecId(0) == TQualifier::layoutNotSet && (intermediate.getLocalSize(0) & 1)) || (intermediate.getLocalSizeSpecId(1) == TQualifier::layoutNotSet && (intermediate.getLocalSize(1) & 1))) error(loc, "requires local_size_x and local_size_y to be multiple of two", "derivative_group_quadsNV", ""); else intermediate.setLayoutDerivativeMode(LayoutDerivativeGroupQuads); } else error(loc, "can only apply to 'in'", "derivative_group_quadsNV", ""); } if (publicType.shaderQualifiers.layoutDerivativeGroupLinear) { if (publicType.qualifier.storage == EvqVaryingIn) { if (intermediate.getLocalSizeSpecId(0) == TQualifier::layoutNotSet && intermediate.getLocalSizeSpecId(1) == TQualifier::layoutNotSet && intermediate.getLocalSizeSpecId(2) == TQualifier::layoutNotSet && (intermediate.getLocalSize(0) * intermediate.getLocalSize(1) * intermediate.getLocalSize(2)) % 4 != 0) error(loc, "requires total group size to be multiple of four", "derivative_group_linearNV", ""); else intermediate.setLayoutDerivativeMode(LayoutDerivativeGroupLinear); } else error(loc, "can only apply to 'in'", "derivative_group_linearNV", ""); } // Check mesh out array sizes, once all the necessary out qualifiers are defined. if ((language == EShLangMesh) && (intermediate.getVertices() != TQualifier::layoutNotSet) && (intermediate.getPrimitives() != TQualifier::layoutNotSet) && (intermediate.getOutputPrimitive() != ElgNone)) { checkIoArraysConsistency(loc); } if (publicType.shaderQualifiers.layoutPrimitiveCulling) { if (publicType.qualifier.storage != EvqTemporary) error(loc, "layout qualifier cannot have storage qualifiers", "primitive_culling", "", ""); else { intermediate.setLayoutPrimitiveCulling(); } // Exit early as further checks are not valid return; } for (int i = 0; i < 3; ++i) { if (publicType.shaderQualifiers.layoutTileShadingRateQCOMNotDefault[i]) { if (publicType.qualifier.storage == EvqVaryingIn) { if (! intermediate.setTileShadingRateQCOM(i, publicType.shaderQualifiers.layoutTileShadingRateQCOM[i])) error(loc, "cannot change previously set size", (i==0?"shading_rate_xQCOM":(i==1?"shading_rate_yQCOM":"shading_rate_zQCOM")), ""); } else error(loc, "can only apply to 'in'", (i==0?"shading_rate_xQCOM":(i==1?"shading_rate_yQCOM":"shading_rate_zQCOM")), ""); } } const TQualifier& qualifier = publicType.qualifier; if (qualifier.isAuxiliary() || qualifier.isMemory() || qualifier.isInterpolation() || qualifier.precision != EpqNone) error(loc, "cannot use auxiliary, memory, interpolation, or precision qualifier in a default qualifier declaration (declaration with no type)", "qualifier", ""); // "The offset qualifier can only be used on block members of blocks..." // "The align qualifier can only be used on blocks or block members..." if (qualifier.hasOffset() || qualifier.hasAlign()) error(loc, "cannot use offset or align qualifiers in a default qualifier declaration (declaration with no type)", "layout qualifier", ""); layoutQualifierCheck(loc, qualifier); switch (qualifier.storage) { case EvqUniform: if (qualifier.hasMatrix()) globalUniformDefaults.layoutMatrix = qualifier.layoutMatrix; if (qualifier.hasPacking()) globalUniformDefaults.layoutPacking = qualifier.layoutPacking; break; case EvqBuffer: if (qualifier.hasMatrix()) globalBufferDefaults.layoutMatrix = qualifier.layoutMatrix; if (qualifier.hasPacking()) globalBufferDefaults.layoutPacking = qualifier.layoutPacking; break; case EvqVaryingIn: break; case EvqVaryingOut: if (qualifier.hasStream()) globalOutputDefaults.layoutStream = qualifier.layoutStream; if (qualifier.hasXfbBuffer()) globalOutputDefaults.layoutXfbBuffer = qualifier.layoutXfbBuffer; if (globalOutputDefaults.hasXfbBuffer() && qualifier.hasXfbStride()) { if (! intermediate.setXfbBufferStride(globalOutputDefaults.layoutXfbBuffer, qualifier.layoutXfbStride)) error(loc, "all stride settings must match for xfb buffer", "xfb_stride", "%d", qualifier.layoutXfbBuffer); } break; case EvqShared: if (qualifier.hasMatrix()) globalSharedDefaults.layoutMatrix = qualifier.layoutMatrix; if (qualifier.hasPacking()) globalSharedDefaults.layoutPacking = qualifier.layoutPacking; break; default: error(loc, "default qualifier requires 'uniform', 'buffer', 'in', 'out' or 'shared' storage qualification", "", ""); return; } if (qualifier.hasBinding()) error(loc, "cannot declare a default, include a type or full declaration", "binding", ""); if (qualifier.hasAnyLocation()) error(loc, "cannot declare a default, use a full declaration", "location/component/index", ""); if (qualifier.hasXfbOffset()) error(loc, "cannot declare a default, use a full declaration", "xfb_offset", ""); if (qualifier.isPushConstant()) error(loc, "cannot declare a default, can only be used on a block", "push_constant", ""); if (qualifier.hasBufferReference()) error(loc, "cannot declare a default, can only be used on a block", "buffer_reference", ""); if (qualifier.hasSpecConstantId()) error(loc, "cannot declare a default, can only be used on a scalar", "constant_id", ""); if (qualifier.isShaderRecord()) error(loc, "cannot declare a default, can only be used on a block", "shaderRecordNV", ""); } // // Take the sequence of statements that has been built up since the last case/default, // put it on the list of top-level nodes for the current (inner-most) switch statement, // and follow that by the case/default we are on now. (See switch topology comment on // TIntermSwitch.) // void TParseContext::wrapupSwitchSubsequence(TIntermAggregate* statements, TIntermNode* branchNode) { TIntermSequence* switchSequence = switchSequenceStack.back(); if (statements) { if (switchSequence->size() == 0) error(statements->getLoc(), "cannot have statements before first case/default label", "switch", ""); statements->setOperator(EOpSequence); switchSequence->push_back(statements); } if (branchNode) { // check all previous cases for the same label (or both are 'default') for (unsigned int s = 0; s < switchSequence->size(); ++s) { TIntermBranch* prevBranch = (*switchSequence)[s]->getAsBranchNode(); if (prevBranch) { TIntermTyped* prevExpression = prevBranch->getExpression(); TIntermTyped* newExpression = branchNode->getAsBranchNode()->getExpression(); if (prevExpression == nullptr && newExpression == nullptr) error(branchNode->getLoc(), "duplicate label", "default", ""); else if (prevExpression != nullptr && newExpression != nullptr && prevExpression->getAsConstantUnion() && newExpression->getAsConstantUnion() && prevExpression->getAsConstantUnion()->getConstArray()[0].getIConst() == newExpression->getAsConstantUnion()->getConstArray()[0].getIConst()) error(branchNode->getLoc(), "duplicated value", "case", ""); } } switchSequence->push_back(branchNode); } } // // Turn the top-level node sequence built up of wrapupSwitchSubsequence9) // into a switch node. // TIntermNode* TParseContext::addSwitch(const TSourceLoc& loc, TIntermTyped* expression, TIntermAggregate* lastStatements) { profileRequires(loc, EEsProfile, 300, nullptr, "switch statements"); profileRequires(loc, ENoProfile, 130, nullptr, "switch statements"); wrapupSwitchSubsequence(lastStatements, nullptr); if (expression == nullptr || (expression->getBasicType() != EbtInt && expression->getBasicType() != EbtUint) || expression->getType().isArray() || expression->getType().isMatrix() || expression->getType().isVector()) error(loc, "condition must be a scalar integer expression", "switch", ""); // If there is nothing to do, drop the switch but still execute the expression TIntermSequence* switchSequence = switchSequenceStack.back(); if (switchSequence->size() == 0) return expression; if (lastStatements == nullptr) { // This was originally an ERRROR, because early versions of the specification said // "it is an error to have no statement between a label and the end of the switch statement." // The specifications were updated to remove this (being ill-defined what a "statement" was), // so, this became a warning. However, 3.0 tests still check for the error. if (isEsProfile() && (version <= 300 || version >= 320) && ! relaxedErrors()) error(loc, "last case/default label not followed by statements", "switch", ""); else if (!isEsProfile() && (version <= 430 || version >= 460)) error(loc, "last case/default label not followed by statements", "switch", ""); else warn(loc, "last case/default label not followed by statements", "switch", ""); // emulate a break for error recovery lastStatements = intermediate.makeAggregate(intermediate.addBranch(EOpBreak, loc)); lastStatements->setOperator(EOpSequence); switchSequence->push_back(lastStatements); } TIntermAggregate* body = new TIntermAggregate(EOpSequence); body->getSequence() = *switchSequenceStack.back(); body->setLoc(loc); TIntermSwitch* switchNode = new TIntermSwitch(expression, body); switchNode->setLoc(loc); return switchNode; } // // When a struct used in block, and has it's own layout packing, layout matrix, // record the origin structure of a struct to map, and Record the structure copy to the copy table, // const TTypeList* TParseContext::recordStructCopy(TStructRecord& record, const TType* originType, const TType* tmpType) { size_t memberCount = tmpType->getStruct()->size(); size_t originHash = 0, tmpHash = 0; std::hash hasher; for (size_t i = 0; i < memberCount; i++) { size_t originMemberHash = hasher(originType->getStruct()->at(i).type->getQualifier().layoutPacking + originType->getStruct()->at(i).type->getQualifier().layoutMatrix); size_t tmpMemberHash = hasher(tmpType->getStruct()->at(i).type->getQualifier().layoutPacking + tmpType->getStruct()->at(i).type->getQualifier().layoutMatrix); originHash = hasher((originHash ^ originMemberHash) << 1); tmpHash = hasher((tmpHash ^ tmpMemberHash) << 1); } const TTypeList* originStruct = originType->getStruct(); const TTypeList* tmpStruct = tmpType->getStruct(); if (originHash != tmpHash) { auto fixRecords = record.find(originStruct); if (fixRecords != record.end()) { auto fixRecord = fixRecords->second.find(tmpHash); if (fixRecord != fixRecords->second.end()) { return fixRecord->second; } else { record[originStruct][tmpHash] = tmpStruct; return tmpStruct; } } else { record[originStruct] = std::map(); record[originStruct][tmpHash] = tmpStruct; return tmpStruct; } } return originStruct; } TLayoutFormat TParseContext::mapLegacyLayoutFormat(TLayoutFormat legacyLayoutFormat, TBasicType imageType) { TLayoutFormat layoutFormat = ElfNone; if (imageType == EbtFloat) { switch (legacyLayoutFormat) { case ElfSize1x16: layoutFormat = ElfR16f; break; case ElfSize1x32: layoutFormat = ElfR32f; break; case ElfSize2x32: layoutFormat = ElfRg32f; break; case ElfSize4x32: layoutFormat = ElfRgba32f; break; default: break; } } else if (imageType == EbtUint) { switch (legacyLayoutFormat) { case ElfSize1x8: layoutFormat = ElfR8ui; break; case ElfSize1x16: layoutFormat = ElfR16ui; break; case ElfSize1x32: layoutFormat = ElfR32ui; break; case ElfSize2x32: layoutFormat = ElfRg32ui; break; case ElfSize4x32: layoutFormat = ElfRgba32ui; break; default: break; } } else if (imageType == EbtInt) { switch (legacyLayoutFormat) { case ElfSize1x8: layoutFormat = ElfR8i; break; case ElfSize1x16: layoutFormat = ElfR16i; break; case ElfSize1x32: layoutFormat = ElfR32i; break; case ElfSize2x32: layoutFormat = ElfRg32i; break; case ElfSize4x32: layoutFormat = ElfRgba32i; break; default: break; } } return layoutFormat; } } // end namespace glslang ================================================ FILE: src/libraries/glslang/glslang/MachineIndependent/ParseHelper.h ================================================ // // Copyright (C) 2002-2005 3Dlabs Inc. Ltd. // Copyright (C) 2012-2013 LunarG, Inc. // Copyright (C) 2015-2018 Google, Inc. // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following // disclaimer in the documentation and/or other materials provided // with the distribution. // // Neither the name of 3Dlabs Inc. Ltd. nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // // // This header defines a two-level parse-helper hierarchy, derived from // TParseVersions: // - TParseContextBase: sharable across multiple parsers // - TParseContext: GLSL specific helper // #ifndef _PARSER_HELPER_INCLUDED_ #define _PARSER_HELPER_INCLUDED_ #include #include #include "parseVersions.h" #include "../Include/ShHandle.h" #include "SymbolTable.h" #include "localintermediate.h" #include "Scan.h" #include "attribute.h" namespace glslang { struct TPragma { TPragma(bool o, bool d) : optimize(o), debug(d) { } bool optimize; bool debug; TPragmaTable pragmaTable; }; class TScanContext; class TPpContext; typedef std::set TIdSetType; typedef std::map> TStructRecord; // // Sharable code (as well as what's in TParseVersions) across // parse helpers. // class TParseContextBase : public TParseVersions { public: TParseContextBase(TSymbolTable& symbolTable, TIntermediate& interm, bool parsingBuiltins, int version, EProfile profile, const SpvVersion& spvVersion, EShLanguage language, TInfoSink& infoSink, bool forwardCompatible, EShMessages messages, const TString* entryPoint = nullptr) : TParseVersions(interm, version, profile, spvVersion, language, infoSink, forwardCompatible, messages), scopeMangler("::"), symbolTable(symbolTable), statementNestingLevel(0), loopNestingLevel(0), structNestingLevel(0), blockNestingLevel(0), controlFlowNestingLevel(0), currentFunctionType(nullptr), postEntryPointReturn(false), contextPragma(true, false), beginInvocationInterlockCount(0), endInvocationInterlockCount(0), parsingBuiltins(parsingBuiltins), scanContext(nullptr), ppContext(nullptr), limits(resources.limits), globalUniformBlock(nullptr), globalUniformBinding(TQualifier::layoutBindingEnd), globalUniformSet(TQualifier::layoutSetEnd), atomicCounterBlockSet(TQualifier::layoutSetEnd) { // use storage buffer on SPIR-V 1.3 and up if (spvVersion.spv >= EShTargetSpv_1_3) intermediate.setUseStorageBuffer(); if (entryPoint != nullptr) sourceEntryPointName = *entryPoint; } virtual ~TParseContextBase() { } virtual void C_DECL error(const TSourceLoc&, const char* szReason, const char* szToken, const char* szExtraInfoFormat, ...); virtual void C_DECL warn(const TSourceLoc&, const char* szReason, const char* szToken, const char* szExtraInfoFormat, ...); virtual void C_DECL ppError(const TSourceLoc&, const char* szReason, const char* szToken, const char* szExtraInfoFormat, ...); virtual void C_DECL ppWarn(const TSourceLoc&, const char* szReason, const char* szToken, const char* szExtraInfoFormat, ...); virtual void setLimits(const TBuiltInResource&) = 0; void checkIndex(const TSourceLoc&, const TType&, int& index); EShLanguage getLanguage() const { return language; } void setScanContext(TScanContext* c) { scanContext = c; } TScanContext* getScanContext() const { return scanContext; } void setPpContext(TPpContext* c) { ppContext = c; } TPpContext* getPpContext() const { return ppContext; } virtual void setLineCallback(const std::function& func) { lineCallback = func; } virtual void setExtensionCallback(const std::function& func) { extensionCallback = func; } virtual void setVersionCallback(const std::function& func) { versionCallback = func; } virtual void setPragmaCallback(const std::function&)>& func) { pragmaCallback = func; } virtual void setErrorCallback(const std::function& func) { errorCallback = func; } virtual void reservedPpErrorCheck(const TSourceLoc&, const char* name, const char* op) = 0; virtual bool lineContinuationCheck(const TSourceLoc&, bool endOfComment) = 0; virtual bool lineDirectiveShouldSetNextLine() const = 0; virtual void handlePragma(const TSourceLoc&, const TVector&) = 0; virtual bool parseShaderStrings(TPpContext&, TInputScanner& input, bool versionWillBeError = false) = 0; virtual void notifyVersion(int line, int version, const char* type_string) { if (versionCallback) versionCallback(line, version, type_string); } virtual void notifyErrorDirective(int line, const char* error_message) { if (errorCallback) errorCallback(line, error_message); } virtual void notifyLineDirective(int curLineNo, int newLineNo, bool hasSource, int sourceNum, const char* sourceName) { if (lineCallback) lineCallback(curLineNo, newLineNo, hasSource, sourceNum, sourceName); } virtual void notifyExtensionDirective(int line, const char* extension, const char* behavior) { if (extensionCallback) extensionCallback(line, extension, behavior); } // Manage the global uniform block (default uniforms in GLSL, $Global in HLSL) virtual void growGlobalUniformBlock(const TSourceLoc&, TType&, const TString& memberName, TTypeList* typeList = nullptr); // Manage global buffer (used for backing atomic counters in GLSL when using relaxed Vulkan semantics) virtual void growAtomicCounterBlock(int binding, const TSourceLoc&, TType&, const TString& memberName, TTypeList* typeList = nullptr); // Potentially rename shader entry point function void renameShaderFunction(TString*& name) const { // Replace the entry point name given in the shader with the real entry point name, // if there is a substitution. if (name != nullptr && *name == sourceEntryPointName && intermediate.getEntryPointName().size() > 0) name = NewPoolTString(intermediate.getEntryPointName().c_str()); } virtual bool lValueErrorCheck(const TSourceLoc&, const char* op, TIntermTyped*); virtual void rValueErrorCheck(const TSourceLoc&, const char* op, TIntermTyped*); const char* const scopeMangler; // Basic parsing state, easily accessible to the grammar TSymbolTable& symbolTable; // symbol table that goes with the current language, version, and profile TVector relaxedSymbols; int statementNestingLevel; // 0 if outside all flow control or compound statements int loopNestingLevel; // 0 if outside all loops int structNestingLevel; // 0 if outside structures int blockNestingLevel; // 0 if outside blocks int controlFlowNestingLevel; // 0 if outside all flow control const TType* currentFunctionType; // the return type of the function that's currently being parsed bool functionReturnsValue; // true if a non-void function has a return // if inside a function, true if the function is the entry point and this is after a return statement bool postEntryPointReturn; // case, node, case, case, node, ...; ensure only one node between cases; stack of them for nesting TList switchSequenceStack; // the statementNestingLevel the current switch statement is at, which must match the level of its case statements TList switchLevel; struct TPragma contextPragma; int beginInvocationInterlockCount; int endInvocationInterlockCount; bool compileOnly = false; protected: TParseContextBase(TParseContextBase&); TParseContextBase& operator=(TParseContextBase&); const bool parsingBuiltins; // true if parsing built-in symbols/functions TVector linkageSymbols; // will be transferred to 'linkage', after all editing is done, order preserving TScanContext* scanContext; TPpContext* ppContext; TBuiltInResource resources; TLimits& limits; TString sourceEntryPointName; // These, if set, will be called when a line, pragma ... is preprocessed. // They will be called with any parameters to the original directive. std::function lineCallback; std::function&)> pragmaCallback; std::function versionCallback; std::function extensionCallback; std::function errorCallback; // see implementation for detail const TFunction* selectFunction(const TVector, const TFunction&, std::function, std::function, /* output */ bool& tie); virtual void parseSwizzleSelector(const TSourceLoc&, const TString&, int size, TSwizzleSelectors&); // Manage the global uniform block (default uniforms in GLSL, $Global in HLSL) TVariable* globalUniformBlock; // the actual block, inserted into the symbol table unsigned int globalUniformBinding; // the block's binding number unsigned int globalUniformSet; // the block's set number int firstNewMember; // the index of the first member not yet inserted into the symbol table // override this to set the language-specific name virtual const char* getGlobalUniformBlockName() const { return ""; } virtual void setUniformBlockDefaults(TType&) const { } virtual void finalizeGlobalUniformBlockLayout(TVariable&) {} // Manage the atomic counter block (used for atomic_uints with Vulkan-Relaxed) TMap atomicCounterBuffers; unsigned int atomicCounterBlockSet; TMap atomicCounterBlockFirstNewMember; // override this to set the language-specific name virtual const char* getAtomicCounterBlockName() const { return ""; } virtual void setAtomicCounterBlockDefaults(TType&) const {} virtual void setInvariant(const TSourceLoc&, const char*) {} virtual void finalizeAtomicCounterBlockLayout(TVariable&) {} bool isAtomicCounterBlock(const TSymbol& symbol) { const TVariable* var = symbol.getAsVariable(); if (!var) return false; const auto& at = atomicCounterBuffers.find(var->getType().getQualifier().layoutBinding); return (at != atomicCounterBuffers.end() && (*at).second->getType() == var->getType()); } virtual void outputMessage(const TSourceLoc&, const char* szReason, const char* szToken, const char* szExtraInfoFormat, TPrefixType prefix, va_list args); virtual void trackLinkage(TSymbol& symbol); virtual void makeEditable(TSymbol*&); virtual TVariable* getEditableVariable(const char* name); virtual void finish(); }; // // Manage the state for when to respect precision qualifiers and when to warn about // the defaults being different than might be expected. // class TPrecisionManager { public: TPrecisionManager() : obey(false), warn(false), explicitIntDefault(false), explicitFloatDefault(false){ } virtual ~TPrecisionManager() {} void respectPrecisionQualifiers() { obey = true; } bool respectingPrecisionQualifiers() const { return obey; } bool shouldWarnAboutDefaults() const { return warn; } void defaultWarningGiven() { warn = false; } void warnAboutDefaults() { warn = true; } void explicitIntDefaultSeen() { explicitIntDefault = true; if (explicitFloatDefault) warn = false; } void explicitFloatDefaultSeen() { explicitFloatDefault = true; if (explicitIntDefault) warn = false; } protected: bool obey; // respect precision qualifiers bool warn; // need to give a warning about the defaults bool explicitIntDefault; // user set the default for int/uint bool explicitFloatDefault; // user set the default for float }; // // GLSL-specific parse helper. Should have GLSL in the name, but that's // too big of a change for comparing branches at the moment, and perhaps // impacts downstream consumers as well. // class TParseContext : public TParseContextBase { public: TParseContext(TSymbolTable&, TIntermediate&, bool parsingBuiltins, int version, EProfile, const SpvVersion& spvVersion, EShLanguage, TInfoSink&, bool forwardCompatible = false, EShMessages messages = EShMsgDefault, const TString* entryPoint = nullptr); virtual ~TParseContext(); bool obeyPrecisionQualifiers() const { return precisionManager.respectingPrecisionQualifiers(); } void setPrecisionDefaults(); void setLimits(const TBuiltInResource&) override; bool parseShaderStrings(TPpContext&, TInputScanner& input, bool versionWillBeError = false) override; void parserError(const char* s); // for bison's yyerror virtual void growGlobalUniformBlock(const TSourceLoc&, TType&, const TString& memberName, TTypeList* typeList = nullptr) override; virtual void growAtomicCounterBlock(int binding, const TSourceLoc&, TType&, const TString& memberName, TTypeList* typeList = nullptr) override; void reservedErrorCheck(const TSourceLoc&, const TString&); void reservedPpErrorCheck(const TSourceLoc&, const char* name, const char* op) override; bool lineContinuationCheck(const TSourceLoc&, bool endOfComment) override; bool lineDirectiveShouldSetNextLine() const override; bool builtInName(const TString&); void handlePragma(const TSourceLoc&, const TVector&) override; TIntermTyped* handleVariable(const TSourceLoc&, TSymbol* symbol, const TString* string); TIntermTyped* handleBracketDereference(const TSourceLoc&, TIntermTyped* base, TIntermTyped* index); void handleIndexLimits(const TSourceLoc&, TIntermTyped* base, TIntermTyped* index); void makeEditable(TSymbol*&) override; void ioArrayCheck(const TSourceLoc&, const TType&, const TString& identifier); bool isIoResizeArray(const TType&) const; void fixIoArraySize(const TSourceLoc&, TType&); void handleIoResizeArrayAccess(const TSourceLoc&, TIntermTyped* base); void checkIoArraysConsistency(const TSourceLoc&, bool tailOnly = false); int getIoArrayImplicitSize(const TQualifier&, TString* featureString = nullptr) const; void checkIoArrayConsistency(const TSourceLoc&, int requiredSize, const char* feature, TType&, const TString&); TIntermTyped* handleBinaryMath(const TSourceLoc&, const char* str, TOperator op, TIntermTyped* left, TIntermTyped* right); TIntermTyped* handleUnaryMath(const TSourceLoc&, const char* str, TOperator op, TIntermTyped* childNode); TIntermTyped* handleDotDereference(const TSourceLoc&, TIntermTyped* base, const TString& field); TIntermTyped* handleDotSwizzle(const TSourceLoc&, TIntermTyped* base, const TString& field); void blockMemberExtensionCheck(const TSourceLoc&, const TIntermTyped* base, int member, const TString& memberName); TFunction* handleFunctionDeclarator(const TSourceLoc&, TFunction& function, bool prototype); TIntermAggregate* handleFunctionDefinition(const TSourceLoc&, TFunction&); TIntermTyped* handleFunctionCall(const TSourceLoc&, TFunction*, TIntermNode*); TIntermTyped* handleBuiltInFunctionCall(TSourceLoc, TIntermNode* arguments, const TFunction& function); void computeBuiltinPrecisions(TIntermTyped&, const TFunction&); TIntermNode* handleReturnValue(const TSourceLoc&, TIntermTyped*); void checkLocation(const TSourceLoc&, TOperator); TIntermTyped* handleLengthMethod(const TSourceLoc&, TFunction*, TIntermNode*); void addInputArgumentConversions(const TFunction&, TIntermNode*&) const; TIntermTyped* addOutputArgumentConversions(const TFunction&, TIntermAggregate&) const; TIntermTyped* addAssign(const TSourceLoc&, TOperator op, TIntermTyped* left, TIntermTyped* right); void builtInOpCheck(const TSourceLoc&, const TFunction&, TIntermOperator&); void nonOpBuiltInCheck(const TSourceLoc&, const TFunction&, TIntermAggregate&); void userFunctionCallCheck(const TSourceLoc&, TIntermAggregate&); void samplerConstructorLocationCheck(const TSourceLoc&, const char* token, TIntermNode*); TFunction* handleConstructorCall(const TSourceLoc&, const TPublicType&); void handlePrecisionQualifier(const TSourceLoc&, TQualifier&, TPrecisionQualifier); void checkPrecisionQualifier(const TSourceLoc&, TPrecisionQualifier); void memorySemanticsCheck(const TSourceLoc&, const TFunction&, const TIntermOperator& callNode); TIntermTyped* vkRelaxedRemapFunctionCall(const TSourceLoc&, TFunction*, TIntermNode*); // returns true if the variable was remapped to something else bool vkRelaxedRemapUniformVariable(const TSourceLoc&, TString&, const TPublicType&, TArraySizes*, TIntermTyped*, TType&); void vkRelaxedRemapUniformMembers(const TSourceLoc&, const TPublicType&, const TType&, const TString&); void vkRelaxedRemapFunctionParameter(TFunction*, TParameter&, std::vector* newParams = nullptr); TIntermNode* vkRelaxedRemapFunctionArgument(const TSourceLoc&, TFunction*, TIntermTyped*); TIntermTyped* vkRelaxedRemapDotDereference(const TSourceLoc&, TIntermTyped&, const TType&, const TString&); void assignError(const TSourceLoc&, const char* op, TString left, TString right); void unaryOpError(const TSourceLoc&, const char* op, TString operand); void binaryOpError(const TSourceLoc&, const char* op, TString left, TString right); void variableCheck(TIntermTyped*& nodePtr); bool lValueErrorCheck(const TSourceLoc&, const char* op, TIntermTyped*) override; void rValueErrorCheck(const TSourceLoc&, const char* op, TIntermTyped*) override; void constantValueCheck(TIntermTyped* node, const char* token); void integerCheck(const TIntermTyped* node, const char* token); void globalCheck(const TSourceLoc&, const char* token); bool constructorError(const TSourceLoc&, TIntermNode*, TFunction&, TOperator, TType&); bool constructorTextureSamplerError(const TSourceLoc&, const TFunction&); void arraySizeCheck(const TSourceLoc&, TIntermTyped* expr, TArraySize&, const char *sizeType, const bool isTypeParameter = false); bool arrayQualifierError(const TSourceLoc&, const TQualifier&); bool arrayError(const TSourceLoc&, const TType&); void arraySizeRequiredCheck(const TSourceLoc&, const TArraySizes&); void structArrayCheck(const TSourceLoc&, const TType& structure); void arraySizesCheck(const TSourceLoc&, const TQualifier&, TArraySizes*, const TIntermTyped* initializer, bool lastMember); void arrayOfArrayVersionCheck(const TSourceLoc&, const TArraySizes*); bool voidErrorCheck(const TSourceLoc&, const TString&, TBasicType); void boolCheck(const TSourceLoc&, const TIntermTyped*); void boolCheck(const TSourceLoc&, const TPublicType&); void samplerCheck(const TSourceLoc&, const TType&, const TString& identifier, TIntermTyped* initializer); void atomicUintCheck(const TSourceLoc&, const TType&, const TString& identifier); void accStructCheck(const TSourceLoc & loc, const TType & type, const TString & identifier); void hitObjectNVCheck(const TSourceLoc & loc, const TType & type, const TString & identifier); void transparentOpaqueCheck(const TSourceLoc&, const TType&, const TString& identifier); void memberQualifierCheck(glslang::TPublicType&); void globalQualifierFixCheck(const TSourceLoc&, TQualifier&, bool isMemberCheck = false, const TPublicType* publicType = nullptr); void globalQualifierTypeCheck(const TSourceLoc&, const TQualifier&, const TPublicType&); bool structQualifierErrorCheck(const TSourceLoc&, const TPublicType& pType); void mergeQualifiers(const TSourceLoc&, TQualifier& dst, const TQualifier& src, bool force); void setDefaultPrecision(const TSourceLoc&, TPublicType&, TPrecisionQualifier); int computeSamplerTypeIndex(TSampler&); TPrecisionQualifier getDefaultPrecision(TPublicType&); void precisionQualifierCheck(const TSourceLoc&, TBasicType, TQualifier&, bool isCoopMatOrVec); void parameterTypeCheck(const TSourceLoc&, TStorageQualifier qualifier, const TType& type); bool containsFieldWithBasicType(const TType& type ,TBasicType basicType); TSymbol* redeclareBuiltinVariable(const TSourceLoc&, const TString&, const TQualifier&, const TShaderQualifiers&); void redeclareBuiltinBlock(const TSourceLoc&, TTypeList& typeList, const TString& blockName, const TString* instanceName, TArraySizes* arraySizes); void paramCheckFixStorage(const TSourceLoc&, const TStorageQualifier&, TType& type); void paramCheckFix(const TSourceLoc&, const TQualifier&, TType& type); void nestedBlockCheck(const TSourceLoc&); void nestedStructCheck(const TSourceLoc&); void arrayObjectCheck(const TSourceLoc&, const TType&, const char* op); void opaqueCheck(const TSourceLoc&, const TType&, const char* op); void referenceCheck(const TSourceLoc&, const TType&, const char* op); void storage16BitAssignmentCheck(const TSourceLoc&, const TType&, const char* op); void specializationCheck(const TSourceLoc&, const TType&, const char* op); void structTypeCheck(const TSourceLoc&, TPublicType&); void inductiveLoopCheck(const TSourceLoc&, TIntermNode* init, TIntermLoop* loop); void arrayLimitCheck(const TSourceLoc&, const TString&, int size); void limitCheck(const TSourceLoc&, int value, const char* limit, const char* feature); void typeParametersCheck(const TSourceLoc&, const TPublicType&); void inductiveLoopBodyCheck(TIntermNode*, long long loopIndexId, TSymbolTable&); void constantIndexExpressionCheck(TIntermNode*); void setLayoutQualifier(const TSourceLoc&, TPublicType&, TString&); void setLayoutQualifier(const TSourceLoc&, TPublicType&, TString&, const TIntermTyped*); void mergeObjectLayoutQualifiers(TQualifier& dest, const TQualifier& src, bool inheritOnly); void layoutObjectCheck(const TSourceLoc&, const TSymbol&); void layoutMemberLocationArrayCheck(const TSourceLoc&, bool memberWithLocation, TArraySizes* arraySizes); void layoutTypeCheck(const TSourceLoc&, const TType&); void layoutQualifierCheck(const TSourceLoc&, const TQualifier&); void checkNoShaderLayouts(const TSourceLoc&, const TShaderQualifiers&); void fixOffset(const TSourceLoc&, TSymbol&); const TFunction* findFunction(const TSourceLoc& loc, const TFunction& call, bool& builtIn); const TFunction* findFunctionExact(const TSourceLoc& loc, const TFunction& call, bool& builtIn); const TFunction* findFunction120(const TSourceLoc& loc, const TFunction& call, bool& builtIn); const TFunction* findFunction400(const TSourceLoc& loc, const TFunction& call, bool& builtIn); const TFunction* findFunctionExplicitTypes(const TSourceLoc& loc, const TFunction& call, bool& builtIn); void declareTypeDefaults(const TSourceLoc&, const TPublicType&); TIntermNode* declareVariable(const TSourceLoc&, TString& identifier, const TPublicType&, TArraySizes* typeArray = nullptr, TIntermTyped* initializer = nullptr); TIntermTyped* addConstructor(const TSourceLoc&, TIntermNode*, const TType&); TIntermTyped* constructAggregate(TIntermNode*, const TType&, int, const TSourceLoc&); TIntermTyped* constructBuiltIn(const TType&, TOperator, TIntermTyped*, const TSourceLoc&, bool subset); void inheritMemoryQualifiers(const TQualifier& from, TQualifier& to); void declareBlock(const TSourceLoc&, TTypeList& typeList, const TString* instanceName = nullptr, TArraySizes* arraySizes = nullptr); void blockStorageRemap(const TSourceLoc&, const TString*, TQualifier&); void blockStageIoCheck(const TSourceLoc&, const TQualifier&); void blockQualifierCheck(const TSourceLoc&, const TQualifier&, bool instanceName); void fixBlockLocations(const TSourceLoc&, TQualifier&, TTypeList&, bool memberWithLocation, bool memberWithoutLocation); void fixXfbOffsets(TQualifier&, TTypeList&); void fixBlockUniformOffsets(TQualifier&, TTypeList&); void fixBlockUniformLayoutMatrix(TQualifier&, TTypeList*, TTypeList*); void fixBlockUniformLayoutPacking(TQualifier&, TTypeList*, TTypeList*); void addQualifierToExisting(const TSourceLoc&, TQualifier, const TString& identifier); void addQualifierToExisting(const TSourceLoc&, TQualifier, TIdentifierList&); void invariantCheck(const TSourceLoc&, const TQualifier&); void updateStandaloneQualifierDefaults(const TSourceLoc&, const TPublicType&); void updateBindlessQualifier(TType& memberType); void wrapupSwitchSubsequence(TIntermAggregate* statements, TIntermNode* branchNode); TIntermNode* addSwitch(const TSourceLoc&, TIntermTyped* expression, TIntermAggregate* body); const TTypeList* recordStructCopy(TStructRecord&, const TType*, const TType*); TLayoutFormat mapLegacyLayoutFormat(TLayoutFormat legacyLayoutFormat, TBasicType imageType); TAttributeType attributeFromName(const TString& name) const; TAttributes* makeAttributes(const TString& identifier) const; TAttributes* makeAttributes(const TString& identifier, TIntermNode* node) const; TAttributes* mergeAttributes(TAttributes*, TAttributes*) const; // Determine selection control from attributes void handleSelectionAttributes(const TAttributes& attributes, TIntermNode*); void handleSwitchAttributes(const TAttributes& attributes, TIntermNode*); // Determine loop control from attributes void handleLoopAttributes(const TAttributes& attributes, TIntermNode*); // Function attributes void handleFunctionAttributes(const TSourceLoc&, const TAttributes&); // GL_EXT_spirv_intrinsics TSpirvRequirement* makeSpirvRequirement(const TSourceLoc& loc, const TString& name, const TIntermAggregate* extensions, const TIntermAggregate* capabilities); TSpirvRequirement* mergeSpirvRequirements(const TSourceLoc& loc, TSpirvRequirement* spirvReq1, TSpirvRequirement* spirvReq2); TSpirvTypeParameters* makeSpirvTypeParameters(const TSourceLoc& loc, const TIntermConstantUnion* constant); TSpirvTypeParameters* makeSpirvTypeParameters(const TSourceLoc& loc, const TPublicType& type); TSpirvTypeParameters* mergeSpirvTypeParameters(TSpirvTypeParameters* spirvTypeParams1, TSpirvTypeParameters* spirvTypeParams2); TSpirvInstruction* makeSpirvInstruction(const TSourceLoc& loc, const TString& name, const TString& value); TSpirvInstruction* makeSpirvInstruction(const TSourceLoc& loc, const TString& name, int value); TSpirvInstruction* mergeSpirvInstruction(const TSourceLoc& loc, TSpirvInstruction* spirvInst1, TSpirvInstruction* spirvInst2); void checkAndResizeMeshViewDim(const TSourceLoc&, TType&, bool isBlockMember); protected: void nonInitConstCheck(const TSourceLoc&, TString& identifier, TType& type); void inheritGlobalDefaults(TQualifier& dst) const; TVariable* makeInternalVariable(const char* name, const TType&) const; TVariable* declareNonArray(const TSourceLoc&, const TString& identifier, const TType&); void declareArray(const TSourceLoc&, const TString& identifier, const TType&, TSymbol*&); void checkRuntimeSizable(const TSourceLoc&, const TIntermTyped&); bool isRuntimeLength(const TIntermTyped&) const; TIntermNode* executeInitializer(const TSourceLoc&, TIntermTyped* initializer, TVariable* variable); TIntermTyped* convertInitializerList(const TSourceLoc&, const TType&, TIntermTyped* initializer); void finish() override; void handleCoopMat2FunctionCall(const TSourceLoc& loc, const TFunction* fnCandidate, TIntermTyped* result, TIntermNode* arguments); virtual const char* getGlobalUniformBlockName() const override; virtual void finalizeGlobalUniformBlockLayout(TVariable&) override; virtual void setUniformBlockDefaults(TType& block) const override; virtual const char* getAtomicCounterBlockName() const override; virtual void finalizeAtomicCounterBlockLayout(TVariable&) override; virtual void setAtomicCounterBlockDefaults(TType& block) const override; virtual void setInvariant(const TSourceLoc& loc, const char* builtin) override; public: // // Generally, bison productions, the scanner, and the PP need read/write access to these; just give them direct access // // Current state of parsing bool inMain; // if inside a function, true if the function is main const TString* blockName; TQualifier currentBlockQualifier; TPrecisionQualifier defaultPrecision[EbtNumTypes]; TBuiltInResource resources; TLimits& limits; protected: TParseContext(TParseContext&); TParseContext& operator=(TParseContext&); static const int maxSamplerIndex = EsdNumDims * (EbtNumTypes * (2 * 2 * 2 * 2 * 2)); // see computeSamplerTypeIndex() TPrecisionQualifier defaultSamplerPrecision[maxSamplerIndex]; TPrecisionManager precisionManager; TQualifier globalBufferDefaults; TQualifier globalUniformDefaults; TQualifier globalInputDefaults; TQualifier globalOutputDefaults; TQualifier globalSharedDefaults; TString currentCaller; // name of last function body entered (not valid when at global scope) int* atomicUintOffsets; // to become an array of the right size to hold an offset per binding point bool anyIndexLimits; TIdSetType inductiveLoopIds; TVector needsIndexLimitationChecking; TStructRecord matrixFixRecord; TStructRecord packingFixRecord; // // Geometry shader input arrays: // - array sizing is based on input primitive and/or explicit size // // Tessellation control output arrays: // - array sizing is based on output layout(vertices=...) and/or explicit size // // Both: // - array sizing is retroactive // - built-in block redeclarations interact with this // // Design: // - use a per-context "resize-list", a list of symbols whose array sizes // can be fixed // // - the resize-list starts empty at beginning of user-shader compilation, it does // not have built-ins in it // // - on built-in array use: copyUp() symbol and add it to the resize-list // // - on user array declaration: add it to the resize-list // // - on block redeclaration: copyUp() symbol and add it to the resize-list // * note, that appropriately gives an error if redeclaring a block that // was already used and hence already copied-up // // - on seeing a layout declaration that sizes the array, fix everything in the // resize-list, giving errors for mismatch // // - on seeing an array size declaration, give errors on mismatch between it and previous // array-sizing declarations // TVector ioArraySymbolResizeList; }; } // end namespace glslang #endif // _PARSER_HELPER_INCLUDED_ ================================================ FILE: src/libraries/glslang/glslang/MachineIndependent/PoolAlloc.cpp ================================================ // // Copyright (C) 2002-2005 3Dlabs Inc. Ltd. // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following // disclaimer in the documentation and/or other materials provided // with the distribution. // // Neither the name of 3Dlabs Inc. Ltd. nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // #include "../Include/Common.h" #include "../Include/PoolAlloc.h" // Mostly here for target that do not support threads such as WASI. #ifdef DISABLE_THREAD_SUPPORT #define THREAD_LOCAL #else #define THREAD_LOCAL thread_local #endif namespace glslang { namespace { THREAD_LOCAL TPoolAllocator* threadPoolAllocator = nullptr; TPoolAllocator* GetDefaultThreadPoolAllocator() { THREAD_LOCAL TPoolAllocator defaultAllocator; return &defaultAllocator; } } // anonymous namespace // Return the thread-specific current pool. TPoolAllocator& GetThreadPoolAllocator() { return *(threadPoolAllocator ? threadPoolAllocator : GetDefaultThreadPoolAllocator()); } // Set the thread-specific current pool. void SetThreadPoolAllocator(TPoolAllocator* poolAllocator) { threadPoolAllocator = poolAllocator; } // // Implement the functionality of the TPoolAllocator class, which // is documented in PoolAlloc.h. // TPoolAllocator::TPoolAllocator(int growthIncrement, int allocationAlignment) : pageSize(growthIncrement), alignment(allocationAlignment), freeList(nullptr), inUseList(nullptr), numCalls(0) { // // Don't allow page sizes we know are smaller than all common // OS page sizes. // if (pageSize < 4*1024) pageSize = 4*1024; // // A large currentPageOffset indicates a new page needs to // be obtained to allocate memory. // currentPageOffset = pageSize; // // Adjust alignment to be at least pointer aligned and // power of 2. // size_t minAlign = sizeof(void*); alignment &= ~(minAlign - 1); if (alignment < minAlign) alignment = minAlign; size_t a = 1; while (a < alignment) a <<= 1; alignment = a; alignmentMask = a - 1; // // Align header skip // headerSkip = minAlign; if (headerSkip < sizeof(tHeader)) { headerSkip = (sizeof(tHeader) + alignmentMask) & ~alignmentMask; } push(); } TPoolAllocator::~TPoolAllocator() { while (inUseList) { tHeader* next = inUseList->nextPage; inUseList->~tHeader(); delete [] reinterpret_cast(inUseList); inUseList = next; } // // Always delete the free list memory - it can't be being // (correctly) referenced, whether the pool allocator was // global or not. We should not check the guard blocks // here, because we did it already when the block was // placed into the free list. // while (freeList) { tHeader* next = freeList->nextPage; delete [] reinterpret_cast(freeList); freeList = next; } } // // Check a single guard block for damage // #ifdef GUARD_BLOCKS void TAllocation::checkGuardBlock(unsigned char* blockMem, unsigned char val, const char* locText) const #else void TAllocation::checkGuardBlock(unsigned char*, unsigned char, const char*) const #endif { #ifdef GUARD_BLOCKS for (size_t x = 0; x < guardBlockSize; x++) { if (blockMem[x] != val) { const int maxSize = 80; char assertMsg[maxSize]; // We don't print the assert message. It's here just to be helpful. snprintf(assertMsg, maxSize, "PoolAlloc: Damage %s %zu byte allocation at 0x%p\n", locText, size, data()); assert(0 && "PoolAlloc: Damage in guard block"); } } #else assert(guardBlockSize == 0); #endif } void TPoolAllocator::push() { tAllocState state = { currentPageOffset, inUseList }; stack.push_back(state); // // Indicate there is no current page to allocate from. // currentPageOffset = pageSize; } // // Do a mass-deallocation of all the individual allocations // that have occurred since the last push(), or since the // last pop(), or since the object's creation. // // The deallocated pages are saved for future allocations. // void TPoolAllocator::pop() { if (stack.size() < 1) return; tHeader* page = stack.back().page; currentPageOffset = stack.back().offset; while (inUseList != page) { tHeader* nextInUse = inUseList->nextPage; size_t pageCount = inUseList->pageCount; // This technically ends the lifetime of the header as C++ object, // but we will still control the memory and reuse it. inUseList->~tHeader(); // currently, just a debug allocation checker if (pageCount > 1) { delete [] reinterpret_cast(inUseList); } else { inUseList->nextPage = freeList; freeList = inUseList; } inUseList = nextInUse; } stack.pop_back(); } // // Do a mass-deallocation of all the individual allocations // that have occurred. // void TPoolAllocator::popAll() { while (stack.size() > 0) pop(); } void* TPoolAllocator::allocate(size_t numBytes) { // If we are using guard blocks, all allocations are bracketed by // them: [guardblock][allocation][guardblock]. numBytes is how // much memory the caller asked for. allocationSize is the total // size including guard blocks. In release build, // guardBlockSize=0 and this all gets optimized away. size_t allocationSize = TAllocation::allocationSize(numBytes); // // Just keep some interesting statistics. // ++numCalls; totalBytes += numBytes; // // Do the allocation, most likely case first, for efficiency. // This step could be moved to be inline sometime. // if (currentPageOffset + allocationSize <= pageSize) { // // Safe to allocate from currentPageOffset. // unsigned char* memory = reinterpret_cast(inUseList) + currentPageOffset; currentPageOffset += allocationSize; currentPageOffset = (currentPageOffset + alignmentMask) & ~alignmentMask; return initializeAllocation(inUseList, memory, numBytes); } if (allocationSize + headerSkip > pageSize) { // // Do a multi-page allocation. Don't mix these with the others. // The OS is efficient and allocating and free-ing multiple pages. // size_t numBytesToAlloc = allocationSize + headerSkip; tHeader* memory = reinterpret_cast(::new char[numBytesToAlloc]); if (memory == nullptr) return nullptr; // Use placement-new to initialize header new(memory) tHeader(inUseList, (numBytesToAlloc + pageSize - 1) / pageSize); inUseList = memory; currentPageOffset = pageSize; // make next allocation come from a new page // No guard blocks for multi-page allocations (yet) return reinterpret_cast(reinterpret_cast(memory) + headerSkip); } // // Need a simple page to allocate from. // tHeader* memory; if (freeList) { memory = freeList; freeList = freeList->nextPage; } else { memory = reinterpret_cast(::new char[pageSize]); if (memory == nullptr) return nullptr; } // Use placement-new to initialize header new(memory) tHeader(inUseList, 1); inUseList = memory; unsigned char* ret = reinterpret_cast(inUseList) + headerSkip; currentPageOffset = (headerSkip + allocationSize + alignmentMask) & ~alignmentMask; return initializeAllocation(inUseList, ret, numBytes); } // // Check all allocations in a list for damage by calling check on each. // void TAllocation::checkAllocList() const { for (const TAllocation* alloc = this; alloc != nullptr; alloc = alloc->prevAlloc) alloc->check(); } } // end namespace glslang ================================================ FILE: src/libraries/glslang/glslang/MachineIndependent/RemoveTree.cpp ================================================ // // Copyright (C) 2002-2005 3Dlabs Inc. Ltd. // Copyright (C) 2013 LunarG, Inc. // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following // disclaimer in the documentation and/or other materials provided // with the distribution. // // Neither the name of 3Dlabs Inc. Ltd. nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // #include "../Include/intermediate.h" #include "RemoveTree.h" namespace glslang { // // Code to recursively delete the intermediate tree. // struct TRemoveTraverser : TIntermTraverser { TRemoveTraverser() : TIntermTraverser(false, false, true, false) {} virtual void visitSymbol(TIntermSymbol* node) { delete node; } virtual bool visitBinary(TVisit /* visit*/ , TIntermBinary* node) { delete node; return true; } virtual bool visitUnary(TVisit /* visit */, TIntermUnary* node) { delete node; return true; } virtual bool visitAggregate(TVisit /* visit*/ , TIntermAggregate* node) { delete node; return true; } virtual bool visitSelection(TVisit /* visit*/ , TIntermSelection* node) { delete node; return true; } virtual bool visitSwitch(TVisit /* visit*/ , TIntermSwitch* node) { delete node; return true; } virtual void visitConstantUnion(TIntermConstantUnion* node) { delete node; } virtual bool visitLoop(TVisit /* visit*/ , TIntermLoop* node) { delete node; return true; } virtual bool visitBranch(TVisit /* visit*/ , TIntermBranch* node) { delete node; return true; } }; // // Entry point. // void RemoveAllTreeNodes(TIntermNode* root) { TRemoveTraverser it; root->traverse(&it); } } // end namespace glslang ================================================ FILE: src/libraries/glslang/glslang/MachineIndependent/RemoveTree.h ================================================ // // Copyright (C) 2002-2005 3Dlabs Inc. Ltd. // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following // disclaimer in the documentation and/or other materials provided // with the distribution. // // Neither the name of 3Dlabs Inc. Ltd. nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // #pragma once namespace glslang { void RemoveAllTreeNodes(TIntermNode*); } // end namespace glslang ================================================ FILE: src/libraries/glslang/glslang/MachineIndependent/Scan.cpp ================================================ // // Copyright (C) 2002-2005 3Dlabs Inc. Ltd. // Copyright (C) 2013 LunarG, Inc. // Copyright (C) 2017 ARM Limited. // Copyright (C) 2020 Google, Inc. // Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights reserved. // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following // disclaimer in the documentation and/or other materials provided // with the distribution. // // Neither the name of 3Dlabs Inc. Ltd. nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // // // GLSL scanning, leveraging the scanning done by the preprocessor. // #include #include #include #include "../Include/Types.h" #include "SymbolTable.h" #include "ParseHelper.h" #include "attribute.h" #include "glslang_tab.cpp.h" #include "ScanContext.h" #include "Scan.h" // preprocessor includes #include "preprocessor/PpContext.h" #include "preprocessor/PpTokens.h" // Required to avoid missing prototype warnings for some compilers int yylex(YYSTYPE*, glslang::TParseContext&); namespace glslang { // read past any white space void TInputScanner::consumeWhiteSpace(bool& foundNonSpaceTab) { int c = peek(); // don't accidentally consume anything other than whitespace while (c == ' ' || c == '\t' || c == '\r' || c == '\n') { if (c == '\r' || c == '\n') foundNonSpaceTab = true; get(); c = peek(); } } // return true if a comment was actually consumed bool TInputScanner::consumeComment() { if (peek() != '/') return false; get(); // consume the '/' int c = peek(); if (c == '/') { // a '//' style comment get(); // consume the second '/' c = get(); do { while (c != EndOfInput && c != '\\' && c != '\r' && c != '\n') c = get(); if (c == EndOfInput || c == '\r' || c == '\n') { while (c == '\r' || c == '\n') c = get(); // we reached the end of the comment break; } else { // it's a '\', so we need to keep going, after skipping what's escaped // read the skipped character c = get(); // if it's a two-character newline, skip both characters if (c == '\r' && peek() == '\n') get(); c = get(); } } while (true); // put back the last non-comment character if (c != EndOfInput) unget(); return true; } else if (c == '*') { // a '/*' style comment get(); // consume the '*' c = get(); do { while (c != EndOfInput && c != '*') c = get(); if (c == '*') { c = get(); if (c == '/') break; // end of comment // not end of comment } else // end of input break; } while (true); return true; } else { // it's not a comment, put the '/' back unget(); return false; } } // skip whitespace, then skip a comment, rinse, repeat void TInputScanner::consumeWhitespaceComment(bool& foundNonSpaceTab) { do { consumeWhiteSpace(foundNonSpaceTab); // if not starting a comment now, then done int c = peek(); if (c != '/' || c == EndOfInput) return; // skip potential comment foundNonSpaceTab = true; if (! consumeComment()) return; } while (true); } // Returns true if there was non-white space (e.g., a comment, newline) before the #version // or no #version was found; otherwise, returns false. There is no error case, it always // succeeds, but will leave version == 0 if no #version was found. // // Sets notFirstToken based on whether tokens (beyond white space and comments) // appeared before the #version. // // N.B. does not attempt to leave input in any particular known state. The assumption // is that scanning will start anew, following the rules for the chosen version/profile, // and with a corresponding parsing context. // bool TInputScanner::scanVersion(int& version, EProfile& profile, bool& notFirstToken) { // This function doesn't have to get all the semantics correct, // just find the #version if there is a correct one present. // The preprocessor will have the responsibility of getting all the semantics right. bool versionNotFirst = false; // means not first WRT comments and white space, nothing more notFirstToken = false; // means not first WRT to real tokens version = 0; // means not found profile = ENoProfile; bool foundNonSpaceTab = false; bool lookingInMiddle = false; int c; do { if (lookingInMiddle) { notFirstToken = true; // make forward progress by finishing off the current line plus extra new lines if (peek() != '\n' && peek() != '\r') { do { c = get(); } while (c != EndOfInput && c != '\n' && c != '\r'); } while (peek() == '\n' || peek() == '\r') get(); if (peek() == EndOfInput) return true; } lookingInMiddle = true; // Nominal start, skipping the desktop allowed comments and white space, but tracking if // something else was found for ES: consumeWhitespaceComment(foundNonSpaceTab); if (foundNonSpaceTab) versionNotFirst = true; // "#" if (get() != '#') { versionNotFirst = true; continue; } // whitespace do { c = get(); } while (c == ' ' || c == '\t'); // "version" if ( c != 'v' || get() != 'e' || get() != 'r' || get() != 's' || get() != 'i' || get() != 'o' || get() != 'n') { versionNotFirst = true; continue; } // whitespace do { c = get(); } while (c == ' ' || c == '\t'); // version number while (c >= '0' && c <= '9') { version = 10 * version + (c - '0'); c = get(); } if (version == 0) { versionNotFirst = true; continue; } // whitespace while (c == ' ' || c == '\t') c = get(); // profile const int maxProfileLength = 13; // not including any 0 char profileString[maxProfileLength]; int profileLength; for (profileLength = 0; profileLength < maxProfileLength; ++profileLength) { if (c == EndOfInput || c == ' ' || c == '\t' || c == '\n' || c == '\r') break; profileString[profileLength] = (char)c; c = get(); } if (c != EndOfInput && c != ' ' && c != '\t' && c != '\n' && c != '\r') { versionNotFirst = true; continue; } if (profileLength == 2 && strncmp(profileString, "es", profileLength) == 0) profile = EEsProfile; else if (profileLength == 4 && strncmp(profileString, "core", profileLength) == 0) profile = ECoreProfile; else if (profileLength == 13 && strncmp(profileString, "compatibility", profileLength) == 0) profile = ECompatibilityProfile; return versionNotFirst; } while (true); } // Fill this in when doing glslang-level scanning, to hand back to the parser. class TParserToken { public: explicit TParserToken(YYSTYPE& b) : sType(b) { } YYSTYPE& sType; protected: TParserToken(TParserToken&); TParserToken& operator=(TParserToken&); }; } // end namespace glslang // This is the function the glslang parser (i.e., bison) calls to get its next token int yylex(YYSTYPE* glslangTokenDesc, glslang::TParseContext& parseContext) { glslang::TParserToken token(*glslangTokenDesc); return parseContext.getScanContext()->tokenize(parseContext.getPpContext(), token); } namespace { struct str_eq { bool operator()(const char* lhs, const char* rhs) const { return strcmp(lhs, rhs) == 0; } }; struct str_hash { size_t operator()(const char* str) const { // djb2 unsigned long hash = 5381; int c; while ((c = *str++) != 0) hash = ((hash << 5) + hash) + c; return hash; } }; // A single global usable by all threads, by all versions, by all languages. const std::unordered_map KeywordMap { {"const",CONST}, {"uniform",UNIFORM}, {"tileImageEXT",TILEIMAGEEXT}, {"buffer",BUFFER}, {"in",IN}, {"out",OUT}, {"smooth",SMOOTH}, {"flat",FLAT}, {"centroid",CENTROID}, {"invariant",INVARIANT}, {"packed",PACKED}, {"resource",RESOURCE}, {"inout",INOUT}, {"struct",STRUCT}, {"break",BREAK}, {"continue",CONTINUE}, {"do",DO}, {"for",FOR}, {"while",WHILE}, {"switch",SWITCH}, {"case",CASE}, {"default",DEFAULT}, {"if",IF}, {"else",ELSE}, {"discard",DISCARD}, {"terminateInvocation",TERMINATE_INVOCATION}, {"terminateRayEXT",TERMINATE_RAY}, {"ignoreIntersectionEXT",IGNORE_INTERSECTION}, {"return",RETURN}, {"void",VOID}, {"bool",BOOL}, {"float",FLOAT}, {"int",INT}, {"bvec2",BVEC2}, {"bvec3",BVEC3}, {"bvec4",BVEC4}, {"vec2",VEC2}, {"vec3",VEC3}, {"vec4",VEC4}, {"ivec2",IVEC2}, {"ivec3",IVEC3}, {"ivec4",IVEC4}, {"mat2",MAT2}, {"mat3",MAT3}, {"mat4",MAT4}, {"true",BOOLCONSTANT}, {"false",BOOLCONSTANT}, {"layout",LAYOUT}, {"shared",SHARED}, {"highp",HIGH_PRECISION}, {"mediump",MEDIUM_PRECISION}, {"lowp",LOW_PRECISION}, {"superp",SUPERP}, {"precision",PRECISION}, {"mat2x2",MAT2X2}, {"mat2x3",MAT2X3}, {"mat2x4",MAT2X4}, {"mat3x2",MAT3X2}, {"mat3x3",MAT3X3}, {"mat3x4",MAT3X4}, {"mat4x2",MAT4X2}, {"mat4x3",MAT4X3}, {"mat4x4",MAT4X4}, {"uint",UINT}, {"uvec2",UVEC2}, {"uvec3",UVEC3}, {"uvec4",UVEC4}, {"nonuniformEXT",NONUNIFORM}, {"demote",DEMOTE}, {"attribute",ATTRIBUTE}, {"varying",VARYING}, {"noperspective",NOPERSPECTIVE}, {"coherent",COHERENT}, {"devicecoherent",DEVICECOHERENT}, {"queuefamilycoherent",QUEUEFAMILYCOHERENT}, {"workgroupcoherent",WORKGROUPCOHERENT}, {"subgroupcoherent",SUBGROUPCOHERENT}, {"shadercallcoherent",SHADERCALLCOHERENT}, {"nonprivate",NONPRIVATE}, {"restrict",RESTRICT}, {"readonly",READONLY}, {"writeonly",WRITEONLY}, {"atomic_uint",ATOMIC_UINT}, {"volatile",VOLATILE}, {"nontemporal",NONTEMPORAL}, {"patch",PATCH}, {"sample",SAMPLE}, {"subroutine",SUBROUTINE}, {"dmat2",DMAT2}, {"dmat3",DMAT3}, {"dmat4",DMAT4}, {"dmat2x2",DMAT2X2}, {"dmat2x3",DMAT2X3}, {"dmat2x4",DMAT2X4}, {"dmat3x2",DMAT3X2}, {"dmat3x3",DMAT3X3}, {"dmat3x4",DMAT3X4}, {"dmat4x2",DMAT4X2}, {"dmat4x3",DMAT4X3}, {"dmat4x4",DMAT4X4}, {"image1D",IMAGE1D}, {"iimage1D",IIMAGE1D}, {"uimage1D",UIMAGE1D}, {"image2D",IMAGE2D}, {"iimage2D",IIMAGE2D}, {"uimage2D",UIMAGE2D}, {"image3D",IMAGE3D}, {"iimage3D",IIMAGE3D}, {"uimage3D",UIMAGE3D}, {"image2DRect",IMAGE2DRECT}, {"iimage2DRect",IIMAGE2DRECT}, {"uimage2DRect",UIMAGE2DRECT}, {"imageCube",IMAGECUBE}, {"iimageCube",IIMAGECUBE}, {"uimageCube",UIMAGECUBE}, {"imageBuffer",IMAGEBUFFER}, {"iimageBuffer",IIMAGEBUFFER}, {"uimageBuffer",UIMAGEBUFFER}, {"image1DArray",IMAGE1DARRAY}, {"iimage1DArray",IIMAGE1DARRAY}, {"uimage1DArray",UIMAGE1DARRAY}, {"image2DArray",IMAGE2DARRAY}, {"iimage2DArray",IIMAGE2DARRAY}, {"uimage2DArray",UIMAGE2DARRAY}, {"imageCubeArray",IMAGECUBEARRAY}, {"iimageCubeArray",IIMAGECUBEARRAY}, {"uimageCubeArray",UIMAGECUBEARRAY}, {"image2DMS",IMAGE2DMS}, {"iimage2DMS",IIMAGE2DMS}, {"uimage2DMS",UIMAGE2DMS}, {"image2DMSArray",IMAGE2DMSARRAY}, {"iimage2DMSArray",IIMAGE2DMSARRAY}, {"uimage2DMSArray",UIMAGE2DMSARRAY}, {"i64image1D",I64IMAGE1D}, {"u64image1D",U64IMAGE1D}, {"i64image2D",I64IMAGE2D}, {"u64image2D",U64IMAGE2D}, {"i64image3D",I64IMAGE3D}, {"u64image3D",U64IMAGE3D}, {"i64image2DRect",I64IMAGE2DRECT}, {"u64image2DRect",U64IMAGE2DRECT}, {"i64imageCube",I64IMAGECUBE}, {"u64imageCube",U64IMAGECUBE}, {"i64imageBuffer",I64IMAGEBUFFER}, {"u64imageBuffer",U64IMAGEBUFFER}, {"i64image1DArray",I64IMAGE1DARRAY}, {"u64image1DArray",U64IMAGE1DARRAY}, {"i64image2DArray",I64IMAGE2DARRAY}, {"u64image2DArray",U64IMAGE2DARRAY}, {"i64imageCubeArray",I64IMAGECUBEARRAY}, {"u64imageCubeArray",U64IMAGECUBEARRAY}, {"i64image2DMS",I64IMAGE2DMS}, {"u64image2DMS",U64IMAGE2DMS}, {"i64image2DMSArray",I64IMAGE2DMSARRAY}, {"u64image2DMSArray",U64IMAGE2DMSARRAY}, {"double",DOUBLE}, {"dvec2",DVEC2}, {"dvec3",DVEC3}, {"dvec4",DVEC4}, {"int64_t",INT64_T}, {"uint64_t",UINT64_T}, {"i64vec2",I64VEC2}, {"i64vec3",I64VEC3}, {"i64vec4",I64VEC4}, {"u64vec2",U64VEC2}, {"u64vec3",U64VEC3}, {"u64vec4",U64VEC4}, // GL_EXT_shader_explicit_arithmetic_types {"int8_t",INT8_T}, {"i8vec2",I8VEC2}, {"i8vec3",I8VEC3}, {"i8vec4",I8VEC4}, {"uint8_t",UINT8_T}, {"u8vec2",U8VEC2}, {"u8vec3",U8VEC3}, {"u8vec4",U8VEC4}, {"int16_t",INT16_T}, {"i16vec2",I16VEC2}, {"i16vec3",I16VEC3}, {"i16vec4",I16VEC4}, {"uint16_t",UINT16_T}, {"u16vec2",U16VEC2}, {"u16vec3",U16VEC3}, {"u16vec4",U16VEC4}, {"int32_t",INT32_T}, {"i32vec2",I32VEC2}, {"i32vec3",I32VEC3}, {"i32vec4",I32VEC4}, {"uint32_t",UINT32_T}, {"u32vec2",U32VEC2}, {"u32vec3",U32VEC3}, {"u32vec4",U32VEC4}, {"float16_t",FLOAT16_T}, {"f16vec2",F16VEC2}, {"f16vec3",F16VEC3}, {"f16vec4",F16VEC4}, {"f16mat2",F16MAT2}, {"f16mat3",F16MAT3}, {"f16mat4",F16MAT4}, {"f16mat2x2",F16MAT2X2}, {"f16mat2x3",F16MAT2X3}, {"f16mat2x4",F16MAT2X4}, {"f16mat3x2",F16MAT3X2}, {"f16mat3x3",F16MAT3X3}, {"f16mat3x4",F16MAT3X4}, {"f16mat4x2",F16MAT4X2}, {"f16mat4x3",F16MAT4X3}, {"f16mat4x4",F16MAT4X4}, {"bfloat16_t",BFLOAT16_T}, {"bf16vec2",BF16VEC2}, {"bf16vec3",BF16VEC3}, {"bf16vec4",BF16VEC4}, {"floate5m2_t",FLOATE5M2_T}, {"fe5m2vec2",FE5M2VEC2}, {"fe5m2vec3",FE5M2VEC3}, {"fe5m2vec4",FE5M2VEC4}, {"floate4m3_t",FLOATE4M3_T}, {"fe4m3vec2",FE4M3VEC2}, {"fe4m3vec3",FE4M3VEC3}, {"fe4m3vec4",FE4M3VEC4}, {"float32_t",FLOAT32_T}, {"f32vec2",F32VEC2}, {"f32vec3",F32VEC3}, {"f32vec4",F32VEC4}, {"f32mat2",F32MAT2}, {"f32mat3",F32MAT3}, {"f32mat4",F32MAT4}, {"f32mat2x2",F32MAT2X2}, {"f32mat2x3",F32MAT2X3}, {"f32mat2x4",F32MAT2X4}, {"f32mat3x2",F32MAT3X2}, {"f32mat3x3",F32MAT3X3}, {"f32mat3x4",F32MAT3X4}, {"f32mat4x2",F32MAT4X2}, {"f32mat4x3",F32MAT4X3}, {"f32mat4x4",F32MAT4X4}, {"float64_t",FLOAT64_T}, {"f64vec2",F64VEC2}, {"f64vec3",F64VEC3}, {"f64vec4",F64VEC4}, {"f64mat2",F64MAT2}, {"f64mat3",F64MAT3}, {"f64mat4",F64MAT4}, {"f64mat2x2",F64MAT2X2}, {"f64mat2x3",F64MAT2X3}, {"f64mat2x4",F64MAT2X4}, {"f64mat3x2",F64MAT3X2}, {"f64mat3x3",F64MAT3X3}, {"f64mat3x4",F64MAT3X4}, {"f64mat4x2",F64MAT4X2}, {"f64mat4x3",F64MAT4X3}, {"f64mat4x4",F64MAT4X4}, // GL_EXT_spirv_intrinsics {"spirv_instruction",SPIRV_INSTRUCTION}, {"spirv_execution_mode",SPIRV_EXECUTION_MODE}, {"spirv_execution_mode_id",SPIRV_EXECUTION_MODE_ID}, {"spirv_decorate",SPIRV_DECORATE}, {"spirv_decorate_id",SPIRV_DECORATE_ID}, {"spirv_decorate_string",SPIRV_DECORATE_STRING}, {"spirv_type",SPIRV_TYPE}, {"spirv_storage_class",SPIRV_STORAGE_CLASS}, {"spirv_by_reference",SPIRV_BY_REFERENCE}, {"spirv_literal",SPIRV_LITERAL}, {"sampler2D",SAMPLER2D}, {"samplerCube",SAMPLERCUBE}, {"samplerCubeShadow",SAMPLERCUBESHADOW}, {"sampler2DArray",SAMPLER2DARRAY}, {"sampler2DArrayShadow",SAMPLER2DARRAYSHADOW}, {"isampler2D",ISAMPLER2D}, {"isampler3D",ISAMPLER3D}, {"isamplerCube",ISAMPLERCUBE}, {"isampler2DArray",ISAMPLER2DARRAY}, {"usampler2D",USAMPLER2D}, {"usampler3D",USAMPLER3D}, {"usamplerCube",USAMPLERCUBE}, {"usampler2DArray",USAMPLER2DARRAY}, {"sampler3D",SAMPLER3D}, {"sampler2DShadow",SAMPLER2DSHADOW}, {"texture2D",TEXTURE2D}, {"textureCube",TEXTURECUBE}, {"texture2DArray",TEXTURE2DARRAY}, {"itexture2D",ITEXTURE2D}, {"itexture3D",ITEXTURE3D}, {"itextureCube",ITEXTURECUBE}, {"itexture2DArray",ITEXTURE2DARRAY}, {"utexture2D",UTEXTURE2D}, {"utexture3D",UTEXTURE3D}, {"utextureCube",UTEXTURECUBE}, {"utexture2DArray",UTEXTURE2DARRAY}, {"texture3D",TEXTURE3D}, {"sampler",SAMPLER}, {"samplerShadow",SAMPLERSHADOW}, {"textureCubeArray",TEXTURECUBEARRAY}, {"itextureCubeArray",ITEXTURECUBEARRAY}, {"utextureCubeArray",UTEXTURECUBEARRAY}, {"samplerCubeArray",SAMPLERCUBEARRAY}, {"samplerCubeArrayShadow",SAMPLERCUBEARRAYSHADOW}, {"isamplerCubeArray",ISAMPLERCUBEARRAY}, {"usamplerCubeArray",USAMPLERCUBEARRAY}, {"sampler1DArrayShadow",SAMPLER1DARRAYSHADOW}, {"isampler1DArray",ISAMPLER1DARRAY}, {"usampler1D",USAMPLER1D}, {"isampler1D",ISAMPLER1D}, {"usampler1DArray",USAMPLER1DARRAY}, {"samplerBuffer",SAMPLERBUFFER}, {"isampler2DRect",ISAMPLER2DRECT}, {"usampler2DRect",USAMPLER2DRECT}, {"isamplerBuffer",ISAMPLERBUFFER}, {"usamplerBuffer",USAMPLERBUFFER}, {"sampler2DMS",SAMPLER2DMS}, {"isampler2DMS",ISAMPLER2DMS}, {"usampler2DMS",USAMPLER2DMS}, {"sampler2DMSArray",SAMPLER2DMSARRAY}, {"isampler2DMSArray",ISAMPLER2DMSARRAY}, {"usampler2DMSArray",USAMPLER2DMSARRAY}, {"sampler1D",SAMPLER1D}, {"sampler1DShadow",SAMPLER1DSHADOW}, {"sampler2DRect",SAMPLER2DRECT}, {"sampler2DRectShadow",SAMPLER2DRECTSHADOW}, {"sampler1DArray",SAMPLER1DARRAY}, {"samplerExternalOES", SAMPLEREXTERNALOES}, // GL_OES_EGL_image_external {"__samplerExternal2DY2YEXT", SAMPLEREXTERNAL2DY2YEXT}, // GL_EXT_YUV_target {"itexture1DArray",ITEXTURE1DARRAY}, {"utexture1D",UTEXTURE1D}, {"itexture1D",ITEXTURE1D}, {"utexture1DArray",UTEXTURE1DARRAY}, {"textureBuffer",TEXTUREBUFFER}, {"itexture2DRect",ITEXTURE2DRECT}, {"utexture2DRect",UTEXTURE2DRECT}, {"itextureBuffer",ITEXTUREBUFFER}, {"utextureBuffer",UTEXTUREBUFFER}, {"texture2DMS",TEXTURE2DMS}, {"itexture2DMS",ITEXTURE2DMS}, {"utexture2DMS",UTEXTURE2DMS}, {"texture2DMSArray",TEXTURE2DMSARRAY}, {"itexture2DMSArray",ITEXTURE2DMSARRAY}, {"utexture2DMSArray",UTEXTURE2DMSARRAY}, {"texture1D",TEXTURE1D}, {"texture2DRect",TEXTURE2DRECT}, {"texture1DArray",TEXTURE1DARRAY}, {"attachmentEXT",ATTACHMENTEXT}, {"iattachmentEXT",IATTACHMENTEXT}, {"uattachmentEXT",UATTACHMENTEXT}, {"subpassInput",SUBPASSINPUT}, {"subpassInputMS",SUBPASSINPUTMS}, {"isubpassInput",ISUBPASSINPUT}, {"isubpassInputMS",ISUBPASSINPUTMS}, {"usubpassInput",USUBPASSINPUT}, {"usubpassInputMS",USUBPASSINPUTMS}, {"f16sampler1D",F16SAMPLER1D}, {"f16sampler2D",F16SAMPLER2D}, {"f16sampler3D",F16SAMPLER3D}, {"f16sampler2DRect",F16SAMPLER2DRECT}, {"f16samplerCube",F16SAMPLERCUBE}, {"f16sampler1DArray",F16SAMPLER1DARRAY}, {"f16sampler2DArray",F16SAMPLER2DARRAY}, {"f16samplerCubeArray",F16SAMPLERCUBEARRAY}, {"f16samplerBuffer",F16SAMPLERBUFFER}, {"f16sampler2DMS",F16SAMPLER2DMS}, {"f16sampler2DMSArray",F16SAMPLER2DMSARRAY}, {"f16sampler1DShadow",F16SAMPLER1DSHADOW}, {"f16sampler2DShadow",F16SAMPLER2DSHADOW}, {"f16sampler2DRectShadow",F16SAMPLER2DRECTSHADOW}, {"f16samplerCubeShadow",F16SAMPLERCUBESHADOW}, {"f16sampler1DArrayShadow",F16SAMPLER1DARRAYSHADOW}, {"f16sampler2DArrayShadow",F16SAMPLER2DARRAYSHADOW}, {"f16samplerCubeArrayShadow",F16SAMPLERCUBEARRAYSHADOW}, {"f16image1D",F16IMAGE1D}, {"f16image2D",F16IMAGE2D}, {"f16image3D",F16IMAGE3D}, {"f16image2DRect",F16IMAGE2DRECT}, {"f16imageCube",F16IMAGECUBE}, {"f16image1DArray",F16IMAGE1DARRAY}, {"f16image2DArray",F16IMAGE2DARRAY}, {"f16imageCubeArray",F16IMAGECUBEARRAY}, {"f16imageBuffer",F16IMAGEBUFFER}, {"f16image2DMS",F16IMAGE2DMS}, {"f16image2DMSArray",F16IMAGE2DMSARRAY}, {"f16texture1D",F16TEXTURE1D}, {"f16texture2D",F16TEXTURE2D}, {"f16texture3D",F16TEXTURE3D}, {"f16texture2DRect",F16TEXTURE2DRECT}, {"f16textureCube",F16TEXTURECUBE}, {"f16texture1DArray",F16TEXTURE1DARRAY}, {"f16texture2DArray",F16TEXTURE2DARRAY}, {"f16textureCubeArray",F16TEXTURECUBEARRAY}, {"f16textureBuffer",F16TEXTUREBUFFER}, {"f16texture2DMS",F16TEXTURE2DMS}, {"f16texture2DMSArray",F16TEXTURE2DMSARRAY}, {"f16subpassInput",F16SUBPASSINPUT}, {"f16subpassInputMS",F16SUBPASSINPUTMS}, {"__explicitInterpAMD",EXPLICITINTERPAMD}, {"pervertexNV",PERVERTEXNV}, {"pervertexEXT",PERVERTEXEXT}, {"precise",PRECISE}, {"rayPayloadNV",PAYLOADNV}, {"rayPayloadEXT",PAYLOADEXT}, {"rayPayloadInNV",PAYLOADINNV}, {"rayPayloadInEXT",PAYLOADINEXT}, {"hitAttributeNV",HITATTRNV}, {"hitAttributeEXT",HITATTREXT}, {"callableDataNV",CALLDATANV}, {"callableDataEXT",CALLDATAEXT}, {"callableDataInNV",CALLDATAINNV}, {"callableDataInEXT",CALLDATAINEXT}, {"accelerationStructureNV",ACCSTRUCTNV}, {"accelerationStructureEXT",ACCSTRUCTEXT}, {"rayQueryEXT",RAYQUERYEXT}, {"perprimitiveNV",PERPRIMITIVENV}, {"perviewNV",PERVIEWNV}, {"taskNV",PERTASKNV}, {"perprimitiveEXT",PERPRIMITIVEEXT}, {"taskPayloadSharedEXT",TASKPAYLOADWORKGROUPEXT}, {"fcoopmatNV",FCOOPMATNV}, {"icoopmatNV",ICOOPMATNV}, {"ucoopmatNV",UCOOPMATNV}, {"coopmat",COOPMAT}, {"hitObjectNV",HITOBJECTNV}, {"hitObjectAttributeNV",HITOBJECTATTRNV}, {"__function",FUNCTION}, {"tensorLayoutNV",TENSORLAYOUTNV}, {"tensorViewNV",TENSORVIEWNV}, {"coopvecNV",COOPVECNV}, }; const std::unordered_set ReservedSet { "common", "partition", "active", "asm", "class", "union", "enum", "typedef", "template", "this", "goto", "inline", "noinline", "public", "static", "extern", "external", "interface", "long", "short", "half", "fixed", "unsigned", "input", "output", "hvec2", "hvec3", "hvec4", "fvec2", "fvec3", "fvec4", "sampler3DRect", "filter", "sizeof", "cast", "namespace", "using", }; } namespace glslang { // Called by yylex to get the next token. // Returning 0 implies end of input. int TScanContext::tokenize(TPpContext* pp, TParserToken& token) { do { parserToken = &token; TPpToken ppToken; int token = pp->tokenize(ppToken); if (token == EndOfInput) return 0; tokenText = ppToken.name; loc = ppToken.loc; parserToken->sType.lex.loc = loc; switch (token) { case ';': afterType = false; afterBuffer = false; return SEMICOLON; case ',': afterType = false; return COMMA; case ':': return COLON; case '=': afterType = false; return EQUAL; case '(': afterType = false; return LEFT_PAREN; case ')': afterType = false; return RIGHT_PAREN; case '.': field = true; return DOT; case '!': return BANG; case '-': return DASH; case '~': return TILDE; case '+': return PLUS; case '*': return STAR; case '/': return SLASH; case '%': return PERCENT; case '<': return LEFT_ANGLE; case '>': return RIGHT_ANGLE; case '|': return VERTICAL_BAR; case '^': return CARET; case '&': return AMPERSAND; case '?': return QUESTION; case '[': return LEFT_BRACKET; case ']': return RIGHT_BRACKET; case '{': afterStruct = false; afterBuffer = false; return LEFT_BRACE; case '}': return RIGHT_BRACE; case '\\': parseContext.error(loc, "illegal use of escape character", "\\", ""); break; case PPAtomAddAssign: return ADD_ASSIGN; case PPAtomSubAssign: return SUB_ASSIGN; case PPAtomMulAssign: return MUL_ASSIGN; case PPAtomDivAssign: return DIV_ASSIGN; case PPAtomModAssign: return MOD_ASSIGN; case PpAtomRight: return RIGHT_OP; case PpAtomLeft: return LEFT_OP; case PpAtomRightAssign: return RIGHT_ASSIGN; case PpAtomLeftAssign: return LEFT_ASSIGN; case PpAtomAndAssign: return AND_ASSIGN; case PpAtomOrAssign: return OR_ASSIGN; case PpAtomXorAssign: return XOR_ASSIGN; case PpAtomAnd: return AND_OP; case PpAtomOr: return OR_OP; case PpAtomXor: return XOR_OP; case PpAtomEQ: return EQ_OP; case PpAtomGE: return GE_OP; case PpAtomNE: return NE_OP; case PpAtomLE: return LE_OP; case PpAtomDecrement: return DEC_OP; case PpAtomIncrement: return INC_OP; case PpAtomColonColon: parseContext.error(loc, "not supported", "::", ""); break; case PpAtomConstString: parserToken->sType.lex.string = NewPoolTString(tokenText); return STRING_LITERAL; case PpAtomConstInt: parserToken->sType.lex.i = ppToken.ival; return INTCONSTANT; case PpAtomConstUint: parserToken->sType.lex.i = ppToken.ival; return UINTCONSTANT; case PpAtomConstFloat: parserToken->sType.lex.d = ppToken.dval; return FLOATCONSTANT; case PpAtomConstInt16: parserToken->sType.lex.i = ppToken.ival; return INT16CONSTANT; case PpAtomConstUint16: parserToken->sType.lex.i = ppToken.ival; return UINT16CONSTANT; case PpAtomConstInt64: parserToken->sType.lex.i64 = ppToken.i64val; return INT64CONSTANT; case PpAtomConstUint64: parserToken->sType.lex.i64 = ppToken.i64val; return UINT64CONSTANT; case PpAtomConstDouble: parserToken->sType.lex.d = ppToken.dval; return DOUBLECONSTANT; case PpAtomConstFloat16: parserToken->sType.lex.d = ppToken.dval; return FLOAT16CONSTANT; case PpAtomIdentifier: { int token = tokenizeIdentifier(); field = false; return token; } case EndOfInput: return 0; default: char buf[2]; buf[0] = (char)token; buf[1] = 0; parseContext.error(loc, "unexpected token", buf, ""); break; } } while (true); } int TScanContext::tokenizeIdentifier() { if (ReservedSet.find(tokenText) != ReservedSet.end()) return reservedWord(); auto it = KeywordMap.find(tokenText); if (it == KeywordMap.end()) { // Should have an identifier of some sort return identifierOrType(); } keyword = it->second; switch (keyword) { case CONST: case UNIFORM: case TILEIMAGEEXT: case IN: case OUT: case INOUT: case BREAK: case CONTINUE: case DO: case FOR: case WHILE: case IF: case ELSE: case DISCARD: case RETURN: case CASE: return keyword; case TERMINATE_INVOCATION: if (!parseContext.extensionTurnedOn(E_GL_EXT_terminate_invocation)) return identifierOrType(); return keyword; case TERMINATE_RAY: case IGNORE_INTERSECTION: if (!parseContext.extensionTurnedOn(E_GL_EXT_ray_tracing)) return identifierOrType(); return keyword; case BUFFER: afterBuffer = true; if ((parseContext.isEsProfile() && parseContext.version < 310) || (!parseContext.isEsProfile() && (parseContext.version < 430 && !parseContext.extensionTurnedOn(E_GL_ARB_shader_storage_buffer_object)))) return identifierOrType(); return keyword; case STRUCT: afterStruct = true; return keyword; case SWITCH: case DEFAULT: if ((parseContext.isEsProfile() && parseContext.version < 300) || (!parseContext.isEsProfile() && parseContext.version < 130)) reservedWord(); return keyword; case VOID: case BOOL: case FLOAT: case INT: case BVEC2: case BVEC3: case BVEC4: case VEC2: case VEC3: case VEC4: case IVEC2: case IVEC3: case IVEC4: case MAT2: case MAT3: case MAT4: case SAMPLER2D: case SAMPLERCUBE: afterType = true; return keyword; case BOOLCONSTANT: if (strcmp("true", tokenText) == 0) parserToken->sType.lex.b = true; else parserToken->sType.lex.b = false; return keyword; case SMOOTH: if ((parseContext.isEsProfile() && parseContext.version < 300) || (!parseContext.isEsProfile() && parseContext.version < 130)) return identifierOrType(); return keyword; case FLAT: if (parseContext.isEsProfile() && parseContext.version < 300) reservedWord(); else if (!parseContext.isEsProfile() && parseContext.version < 130) return identifierOrType(); return keyword; case CENTROID: if (parseContext.version < 120) return identifierOrType(); return keyword; case INVARIANT: if (!parseContext.isEsProfile() && parseContext.version < 120) return identifierOrType(); return keyword; case PACKED: if ((parseContext.isEsProfile() && parseContext.version < 300) || (!parseContext.isEsProfile() && parseContext.version < 140)) return reservedWord(); return identifierOrType(); case RESOURCE: { bool reserved = (parseContext.isEsProfile() && parseContext.version >= 300) || (!parseContext.isEsProfile() && parseContext.version >= 420); return identifierOrReserved(reserved); } case SUPERP: { bool reserved = parseContext.isEsProfile() || parseContext.version >= 130; return identifierOrReserved(reserved); } case NOPERSPECTIVE: if (parseContext.extensionTurnedOn(E_GL_NV_shader_noperspective_interpolation)) return keyword; return es30ReservedFromGLSL(130); case NONUNIFORM: if (parseContext.extensionTurnedOn(E_GL_EXT_nonuniform_qualifier)) return keyword; else return identifierOrType(); case ATTRIBUTE: case VARYING: if (parseContext.isEsProfile() && parseContext.version >= 300) reservedWord(); return keyword; case PAYLOADNV: case PAYLOADINNV: case HITATTRNV: case CALLDATANV: case CALLDATAINNV: case ACCSTRUCTNV: if (parseContext.symbolTable.atBuiltInLevel() || parseContext.extensionTurnedOn(E_GL_NV_ray_tracing)) return keyword; return identifierOrType(); case ACCSTRUCTEXT: if (parseContext.symbolTable.atBuiltInLevel() || parseContext.extensionTurnedOn(E_GL_EXT_ray_tracing) || parseContext.extensionTurnedOn(E_GL_EXT_ray_query) || parseContext.extensionTurnedOn(E_GL_NV_displacement_micromap)) return keyword; return identifierOrType(); case PAYLOADEXT: case PAYLOADINEXT: case HITATTREXT: case CALLDATAEXT: case CALLDATAINEXT: if (parseContext.symbolTable.atBuiltInLevel() || parseContext.extensionTurnedOn(E_GL_EXT_ray_tracing) || parseContext.extensionTurnedOn(E_GL_EXT_ray_query)) return keyword; return identifierOrType(); case RAYQUERYEXT: if (parseContext.symbolTable.atBuiltInLevel() || (!parseContext.isEsProfile() && parseContext.version >= 460 && parseContext.extensionTurnedOn(E_GL_EXT_ray_query))) return keyword; return identifierOrType(); case ATOMIC_UINT: if ((parseContext.isEsProfile() && parseContext.version >= 310) || parseContext.extensionTurnedOn(E_GL_ARB_shader_atomic_counters)) return keyword; return es30ReservedFromGLSL(420); case COHERENT: case DEVICECOHERENT: case QUEUEFAMILYCOHERENT: case WORKGROUPCOHERENT: case SUBGROUPCOHERENT: case SHADERCALLCOHERENT: case NONPRIVATE: case RESTRICT: case READONLY: case WRITEONLY: if (parseContext.isEsProfile() && parseContext.version >= 310) return keyword; return es30ReservedFromGLSL(parseContext.extensionTurnedOn(E_GL_ARB_shader_image_load_store) ? 130 : 420); case VOLATILE: if (parseContext.isEsProfile() && parseContext.version >= 310) return keyword; if (! parseContext.symbolTable.atBuiltInLevel() && (parseContext.isEsProfile() || (parseContext.version < 420 && ! parseContext.extensionTurnedOn(E_GL_ARB_shader_image_load_store)))) reservedWord(); return keyword; case NONTEMPORAL: if (parseContext.symbolTable.atBuiltInLevel()) return keyword; if (parseContext.extensionTurnedOn(E_GL_EXT_nontemporal_keyword)) { if (!parseContext.intermediate.usingVulkanMemoryModel()) parseContext.warn(loc, "Nontemporal without the Vulkan Memory Model is ignored", tokenText, ""); return keyword; } return identifierOrType(); case PATCH: if (parseContext.symbolTable.atBuiltInLevel() || (parseContext.isEsProfile() && (parseContext.version >= 320 || parseContext.extensionsTurnedOn(Num_AEP_tessellation_shader, AEP_tessellation_shader))) || (!parseContext.isEsProfile() && parseContext.extensionTurnedOn(E_GL_ARB_tessellation_shader))) return keyword; return es30ReservedFromGLSL(400); case SAMPLE: { const int numLayoutExts = 3; const char* layoutExts[numLayoutExts] = {E_GL_OES_shader_multisample_interpolation, E_GL_ARB_gpu_shader5, E_GL_NV_gpu_shader5}; if ((parseContext.isEsProfile() && parseContext.version >= 320) || parseContext.extensionsTurnedOn(numLayoutExts, layoutExts)) return keyword; return es30ReservedFromGLSL(400); } case SUBROUTINE: return es30ReservedFromGLSL(400); case SHARED: if ((parseContext.isEsProfile() && parseContext.version < 300) || (!parseContext.isEsProfile() && parseContext.version < 140)) return identifierOrType(); return keyword; case LAYOUT: { const int numLayoutExts = 2; const char* layoutExts[numLayoutExts] = { E_GL_ARB_shading_language_420pack, E_GL_ARB_explicit_attrib_location }; if ((parseContext.isEsProfile() && parseContext.version < 300) || (!parseContext.isEsProfile() && parseContext.version < 140 && ! parseContext.extensionsTurnedOn(numLayoutExts, layoutExts))) return identifierOrType(); return keyword; } case HIGH_PRECISION: case MEDIUM_PRECISION: case LOW_PRECISION: case PRECISION: return precisionKeyword(); case MAT2X2: case MAT2X3: case MAT2X4: case MAT3X2: case MAT3X3: case MAT3X4: case MAT4X2: case MAT4X3: case MAT4X4: return matNxM(); case DMAT2: case DMAT3: case DMAT4: case DMAT2X2: case DMAT2X3: case DMAT2X4: case DMAT3X2: case DMAT3X3: case DMAT3X4: case DMAT4X2: case DMAT4X3: case DMAT4X4: return dMat(); case IMAGE1D: case IIMAGE1D: case UIMAGE1D: case IMAGE1DARRAY: case IIMAGE1DARRAY: case UIMAGE1DARRAY: case IMAGE2DRECT: case IIMAGE2DRECT: case UIMAGE2DRECT: afterType = true; return firstGenerationImage(false); case I64IMAGE1D: case U64IMAGE1D: case I64IMAGE1DARRAY: case U64IMAGE1DARRAY: case I64IMAGE2DRECT: case U64IMAGE2DRECT: afterType = true; if (parseContext.symbolTable.atBuiltInLevel() || parseContext.extensionTurnedOn(E_GL_EXT_shader_image_int64)) { return firstGenerationImage(false); } return identifierOrType(); case IMAGEBUFFER: case IIMAGEBUFFER: case UIMAGEBUFFER: afterType = true; if ((parseContext.isEsProfile() && parseContext.version >= 320) || parseContext.extensionsTurnedOn(Num_AEP_texture_buffer, AEP_texture_buffer)) return keyword; return firstGenerationImage(false); case I64IMAGEBUFFER: case U64IMAGEBUFFER: afterType = true; if (parseContext.symbolTable.atBuiltInLevel() || parseContext.extensionTurnedOn(E_GL_EXT_shader_image_int64)) { if ((parseContext.isEsProfile() && parseContext.version >= 320) || parseContext.extensionsTurnedOn(Num_AEP_texture_buffer, AEP_texture_buffer)) return keyword; return firstGenerationImage(false); } return identifierOrType(); case IMAGE2D: case IIMAGE2D: case UIMAGE2D: case IMAGE3D: case IIMAGE3D: case UIMAGE3D: case IMAGECUBE: case IIMAGECUBE: case UIMAGECUBE: case IMAGE2DARRAY: case IIMAGE2DARRAY: case UIMAGE2DARRAY: afterType = true; return firstGenerationImage(true); case I64IMAGE2D: case U64IMAGE2D: case I64IMAGE3D: case U64IMAGE3D: case I64IMAGECUBE: case U64IMAGECUBE: case I64IMAGE2DARRAY: case U64IMAGE2DARRAY: afterType = true; if (parseContext.symbolTable.atBuiltInLevel() || parseContext.extensionTurnedOn(E_GL_EXT_shader_image_int64)) return firstGenerationImage(true); return identifierOrType(); case IMAGECUBEARRAY: case IIMAGECUBEARRAY: case UIMAGECUBEARRAY: afterType = true; if ((parseContext.isEsProfile() && parseContext.version >= 320) || parseContext.extensionsTurnedOn(Num_AEP_texture_cube_map_array, AEP_texture_cube_map_array)) return keyword; return secondGenerationImage(); case I64IMAGECUBEARRAY: case U64IMAGECUBEARRAY: afterType = true; if (parseContext.symbolTable.atBuiltInLevel() || parseContext.extensionTurnedOn(E_GL_EXT_shader_image_int64)) { if ((parseContext.isEsProfile() && parseContext.version >= 320) || parseContext.extensionsTurnedOn(Num_AEP_texture_cube_map_array, AEP_texture_cube_map_array)) return keyword; return secondGenerationImage(); } return identifierOrType(); case IMAGE2DMS: case IIMAGE2DMS: case UIMAGE2DMS: case IMAGE2DMSARRAY: case IIMAGE2DMSARRAY: case UIMAGE2DMSARRAY: afterType = true; return secondGenerationImage(); case I64IMAGE2DMS: case U64IMAGE2DMS: case I64IMAGE2DMSARRAY: case U64IMAGE2DMSARRAY: afterType = true; if (parseContext.symbolTable.atBuiltInLevel() || parseContext.extensionTurnedOn(E_GL_EXT_shader_image_int64)) { return secondGenerationImage(); } return identifierOrType(); case DOUBLE: case DVEC2: case DVEC3: case DVEC4: afterType = true; if (parseContext.isEsProfile() || parseContext.version < 150 || (!parseContext.symbolTable.atBuiltInLevel() && (parseContext.version < 400 && !parseContext.extensionTurnedOn(E_GL_ARB_gpu_shader_fp64) && (parseContext.version < 410 && !parseContext.extensionTurnedOn(E_GL_ARB_vertex_attrib_64bit))))) reservedWord(); return keyword; case INT64_T: case UINT64_T: case I64VEC2: case I64VEC3: case I64VEC4: case U64VEC2: case U64VEC3: case U64VEC4: afterType = true; if (parseContext.symbolTable.atBuiltInLevel() || parseContext.extensionTurnedOn(E_GL_ARB_gpu_shader_int64) || parseContext.extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types) || parseContext.extensionTurnedOn(E_GL_NV_gpu_shader5) || parseContext.extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types_int64)) return keyword; return identifierOrType(); case INT8_T: case UINT8_T: case I8VEC2: case I8VEC3: case I8VEC4: case U8VEC2: case U8VEC3: case U8VEC4: afterType = true; if (parseContext.symbolTable.atBuiltInLevel() || parseContext.extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types) || parseContext.extensionTurnedOn(E_GL_EXT_shader_8bit_storage) || parseContext.extensionTurnedOn(E_GL_NV_gpu_shader5) || parseContext.extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types_int8)) return keyword; return identifierOrType(); case INT16_T: case UINT16_T: case I16VEC2: case I16VEC3: case I16VEC4: case U16VEC2: case U16VEC3: case U16VEC4: afterType = true; if (parseContext.symbolTable.atBuiltInLevel() || parseContext.extensionTurnedOn(E_GL_AMD_gpu_shader_int16) || parseContext.extensionTurnedOn(E_GL_EXT_shader_16bit_storage) || parseContext.extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types) || parseContext.extensionTurnedOn(E_GL_NV_gpu_shader5) || parseContext.extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types_int16)) return keyword; return identifierOrType(); case INT32_T: case UINT32_T: case I32VEC2: case I32VEC3: case I32VEC4: case U32VEC2: case U32VEC3: case U32VEC4: afterType = true; if (parseContext.symbolTable.atBuiltInLevel() || parseContext.extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types) || parseContext.extensionTurnedOn(E_GL_NV_gpu_shader5) || parseContext.extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types_int32)) return keyword; return identifierOrType(); case FLOAT32_T: case F32VEC2: case F32VEC3: case F32VEC4: afterType = true; if (parseContext.symbolTable.atBuiltInLevel() || parseContext.extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types) || parseContext.extensionTurnedOn(E_GL_NV_gpu_shader5) || parseContext.extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types_float32)) return keyword; return identifierOrType(); case F32MAT2: case F32MAT3: case F32MAT4: case F32MAT2X2: case F32MAT2X3: case F32MAT2X4: case F32MAT3X2: case F32MAT3X3: case F32MAT3X4: case F32MAT4X2: case F32MAT4X3: case F32MAT4X4: afterType = true; if (parseContext.symbolTable.atBuiltInLevel() || parseContext.extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types) || parseContext.extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types_float32)) return keyword; return identifierOrType(); case FLOAT64_T: case F64VEC2: case F64VEC3: case F64VEC4: afterType = true; if (parseContext.symbolTable.atBuiltInLevel() || parseContext.extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types) || (parseContext.extensionTurnedOn(E_GL_NV_gpu_shader5) && parseContext.extensionTurnedOn(E_GL_ARB_gpu_shader_fp64)) || parseContext.extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types_float64)) return keyword; return identifierOrType(); case F64MAT2: case F64MAT3: case F64MAT4: case F64MAT2X2: case F64MAT2X3: case F64MAT2X4: case F64MAT3X2: case F64MAT3X3: case F64MAT3X4: case F64MAT4X2: case F64MAT4X3: case F64MAT4X4: afterType = true; if (parseContext.symbolTable.atBuiltInLevel() || parseContext.extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types) || parseContext.extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types_float64)) return keyword; return identifierOrType(); case FLOAT16_T: case F16VEC2: case F16VEC3: case F16VEC4: afterType = true; if (parseContext.symbolTable.atBuiltInLevel() || parseContext.extensionTurnedOn(E_GL_AMD_gpu_shader_half_float) || parseContext.extensionTurnedOn(E_GL_EXT_shader_16bit_storage) || parseContext.extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types) || parseContext.extensionTurnedOn(E_GL_NV_gpu_shader5) || parseContext.extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types_float16)) return keyword; return identifierOrType(); case F16MAT2: case F16MAT3: case F16MAT4: case F16MAT2X2: case F16MAT2X3: case F16MAT2X4: case F16MAT3X2: case F16MAT3X3: case F16MAT3X4: case F16MAT4X2: case F16MAT4X3: case F16MAT4X4: afterType = true; if (parseContext.symbolTable.atBuiltInLevel() || parseContext.extensionTurnedOn(E_GL_AMD_gpu_shader_half_float) || parseContext.extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types) || parseContext.extensionTurnedOn(E_GL_EXT_shader_explicit_arithmetic_types_float16)) return keyword; return identifierOrType(); case BFLOAT16_T: case BF16VEC2: case BF16VEC3: case BF16VEC4: afterType = true; if (parseContext.symbolTable.atBuiltInLevel() || parseContext.extensionTurnedOn(E_GL_EXT_bfloat16)) return keyword; return identifierOrType(); case FLOATE5M2_T: case FE5M2VEC2: case FE5M2VEC3: case FE5M2VEC4: afterType = true; if (parseContext.symbolTable.atBuiltInLevel() || parseContext.extensionTurnedOn(E_GL_EXT_float_e5m2)) return keyword; return identifierOrType(); case FLOATE4M3_T: case FE4M3VEC2: case FE4M3VEC3: case FE4M3VEC4: afterType = true; if (parseContext.symbolTable.atBuiltInLevel() || parseContext.extensionTurnedOn(E_GL_EXT_float_e4m3)) return keyword; return identifierOrType(); case SAMPLERCUBEARRAY: case SAMPLERCUBEARRAYSHADOW: case ISAMPLERCUBEARRAY: case USAMPLERCUBEARRAY: afterType = true; if ((parseContext.isEsProfile() && parseContext.version >= 320) || parseContext.extensionsTurnedOn(Num_AEP_texture_cube_map_array, AEP_texture_cube_map_array)) return keyword; if (parseContext.isEsProfile() || (parseContext.version < 400 && ! parseContext.extensionTurnedOn(E_GL_ARB_texture_cube_map_array) && ! parseContext.extensionsTurnedOn(Num_AEP_core_gpu_shader5, AEP_core_gpu_shader5))) reservedWord(); return keyword; case TEXTURECUBEARRAY: case ITEXTURECUBEARRAY: case UTEXTURECUBEARRAY: if (parseContext.spvVersion.vulkan > 0) return keyword; else return identifierOrType(); case UINT: case UVEC2: case UVEC3: case UVEC4: case SAMPLERCUBESHADOW: case SAMPLER2DARRAY: case SAMPLER2DARRAYSHADOW: case ISAMPLER2D: case ISAMPLER3D: case ISAMPLERCUBE: case ISAMPLER2DARRAY: case USAMPLER2D: case USAMPLER3D: case USAMPLERCUBE: case USAMPLER2DARRAY: afterType = true; if (keyword == SAMPLER2DARRAY || keyword == SAMPLER2DARRAYSHADOW) { if (!parseContext.isEsProfile() && (parseContext.extensionTurnedOn(E_GL_EXT_texture_array) || parseContext.symbolTable.atBuiltInLevel())) { return keyword; } } return nonreservedKeyword(300, 130); case SAMPLER3D: afterType = true; if (parseContext.isEsProfile() && parseContext.version < 300) { if (!parseContext.extensionTurnedOn(E_GL_OES_texture_3D)) reservedWord(); } return keyword; case SAMPLER2DSHADOW: afterType = true; if (parseContext.isEsProfile() && parseContext.version < 300) { if (!parseContext.extensionTurnedOn(E_GL_EXT_shadow_samplers)) reservedWord(); } return keyword; case TEXTURE2D: case TEXTURECUBE: case TEXTURE2DARRAY: case ITEXTURE2D: case ITEXTURE3D: case ITEXTURECUBE: case ITEXTURE2DARRAY: case UTEXTURE2D: case UTEXTURE3D: case UTEXTURECUBE: case UTEXTURE2DARRAY: case TEXTURE3D: case SAMPLER: case SAMPLERSHADOW: if (parseContext.spvVersion.vulkan > 0) return keyword; else return identifierOrType(); case ISAMPLER1D: case ISAMPLER1DARRAY: case SAMPLER1DARRAYSHADOW: case USAMPLER1D: case USAMPLER1DARRAY: afterType = true; if (keyword == SAMPLER1DARRAYSHADOW) { if (!parseContext.isEsProfile() && (parseContext.extensionTurnedOn(E_GL_EXT_texture_array) || parseContext.symbolTable.atBuiltInLevel())) { return keyword; } } return es30ReservedFromGLSL(130); case ISAMPLER2DRECT: case USAMPLER2DRECT: afterType = true; return es30ReservedFromGLSL(140); case SAMPLERBUFFER: afterType = true; if ((parseContext.isEsProfile() && parseContext.version >= 320) || parseContext.extensionsTurnedOn(Num_AEP_texture_buffer, AEP_texture_buffer)) return keyword; return es30ReservedFromGLSL(130); case ISAMPLERBUFFER: case USAMPLERBUFFER: afterType = true; if ((parseContext.isEsProfile() && parseContext.version >= 320) || parseContext.extensionsTurnedOn(Num_AEP_texture_buffer, AEP_texture_buffer)) return keyword; return es30ReservedFromGLSL(140); case SAMPLER2DMS: case ISAMPLER2DMS: case USAMPLER2DMS: afterType = true; if (parseContext.isEsProfile() && parseContext.version >= 310) return keyword; if (!parseContext.isEsProfile() && (parseContext.version > 140 || (parseContext.version == 140 && parseContext.extensionsTurnedOn(1, &E_GL_ARB_texture_multisample)))) return keyword; return es30ReservedFromGLSL(150); case SAMPLER2DMSARRAY: case ISAMPLER2DMSARRAY: case USAMPLER2DMSARRAY: afterType = true; if ((parseContext.isEsProfile() && parseContext.version >= 320) || parseContext.extensionsTurnedOn(1, &E_GL_OES_texture_storage_multisample_2d_array)) return keyword; if (!parseContext.isEsProfile() && (parseContext.version > 140 || (parseContext.version == 140 && parseContext.extensionsTurnedOn(1, &E_GL_ARB_texture_multisample)))) return keyword; return es30ReservedFromGLSL(150); case SAMPLER1D: case SAMPLER1DSHADOW: afterType = true; if (parseContext.isEsProfile()) reservedWord(); return keyword; case SAMPLER2DRECT: case SAMPLER2DRECTSHADOW: afterType = true; if (parseContext.isEsProfile()) reservedWord(); else if (parseContext.version < 140 && ! parseContext.symbolTable.atBuiltInLevel() && ! parseContext.extensionTurnedOn(E_GL_ARB_texture_rectangle)) { if (parseContext.relaxedErrors()) parseContext.requireExtensions(loc, 1, &E_GL_ARB_texture_rectangle, "texture-rectangle sampler keyword"); else reservedWord(); } return keyword; case SAMPLER1DARRAY: afterType = true; if (parseContext.isEsProfile() && parseContext.version == 300) reservedWord(); else if ((parseContext.isEsProfile() && parseContext.version < 300) || ((!parseContext.isEsProfile() && parseContext.version < 130) && !parseContext.symbolTable.atBuiltInLevel() && !parseContext.extensionTurnedOn(E_GL_EXT_texture_array))) return identifierOrType(); return keyword; case SAMPLEREXTERNALOES: afterType = true; if (parseContext.symbolTable.atBuiltInLevel() || parseContext.extensionTurnedOn(E_GL_OES_EGL_image_external) || parseContext.extensionTurnedOn(E_GL_OES_EGL_image_external_essl3)) return keyword; return identifierOrType(); case SAMPLEREXTERNAL2DY2YEXT: afterType = true; if (parseContext.symbolTable.atBuiltInLevel() || parseContext.extensionTurnedOn(E_GL_EXT_YUV_target)) return keyword; return identifierOrType(); case ITEXTURE1DARRAY: case UTEXTURE1D: case ITEXTURE1D: case UTEXTURE1DARRAY: case TEXTUREBUFFER: case ITEXTURE2DRECT: case UTEXTURE2DRECT: case ITEXTUREBUFFER: case UTEXTUREBUFFER: case TEXTURE2DMS: case ITEXTURE2DMS: case UTEXTURE2DMS: case TEXTURE2DMSARRAY: case ITEXTURE2DMSARRAY: case UTEXTURE2DMSARRAY: case TEXTURE1D: case TEXTURE2DRECT: case TEXTURE1DARRAY: if (parseContext.spvVersion.vulkan > 0) return keyword; else return identifierOrType(); case SUBPASSINPUT: case SUBPASSINPUTMS: case ISUBPASSINPUT: case ISUBPASSINPUTMS: case USUBPASSINPUT: case USUBPASSINPUTMS: case ATTACHMENTEXT: case IATTACHMENTEXT: case UATTACHMENTEXT: if (parseContext.spvVersion.vulkan > 0) return keyword; else return identifierOrType(); case F16SAMPLER1D: case F16SAMPLER2D: case F16SAMPLER3D: case F16SAMPLER2DRECT: case F16SAMPLERCUBE: case F16SAMPLER1DARRAY: case F16SAMPLER2DARRAY: case F16SAMPLERCUBEARRAY: case F16SAMPLERBUFFER: case F16SAMPLER2DMS: case F16SAMPLER2DMSARRAY: case F16SAMPLER1DSHADOW: case F16SAMPLER2DSHADOW: case F16SAMPLER1DARRAYSHADOW: case F16SAMPLER2DARRAYSHADOW: case F16SAMPLER2DRECTSHADOW: case F16SAMPLERCUBESHADOW: case F16SAMPLERCUBEARRAYSHADOW: case F16IMAGE1D: case F16IMAGE2D: case F16IMAGE3D: case F16IMAGE2DRECT: case F16IMAGECUBE: case F16IMAGE1DARRAY: case F16IMAGE2DARRAY: case F16IMAGECUBEARRAY: case F16IMAGEBUFFER: case F16IMAGE2DMS: case F16IMAGE2DMSARRAY: case F16TEXTURE1D: case F16TEXTURE2D: case F16TEXTURE3D: case F16TEXTURE2DRECT: case F16TEXTURECUBE: case F16TEXTURE1DARRAY: case F16TEXTURE2DARRAY: case F16TEXTURECUBEARRAY: case F16TEXTUREBUFFER: case F16TEXTURE2DMS: case F16TEXTURE2DMSARRAY: case F16SUBPASSINPUT: case F16SUBPASSINPUTMS: afterType = true; if (parseContext.symbolTable.atBuiltInLevel() || parseContext.extensionTurnedOn(E_GL_AMD_gpu_shader_half_float_fetch)) return keyword; return identifierOrType(); case EXPLICITINTERPAMD: if (parseContext.extensionTurnedOn(E_GL_AMD_shader_explicit_vertex_parameter)) return keyword; return identifierOrType(); case PERVERTEXNV: if ((!parseContext.isEsProfile() && parseContext.version >= 450) || parseContext.extensionTurnedOn(E_GL_NV_fragment_shader_barycentric)) return keyword; return identifierOrType(); case PERVERTEXEXT: if ((!parseContext.isEsProfile() && parseContext.version >= 450) || parseContext.extensionTurnedOn(E_GL_EXT_fragment_shader_barycentric)) return keyword; return identifierOrType(); case PRECISE: if ((parseContext.isEsProfile() && (parseContext.version >= 320 || parseContext.extensionsTurnedOn(Num_AEP_gpu_shader5, AEP_gpu_shader5))) || (!parseContext.isEsProfile() && (parseContext.version >= 400 || parseContext.extensionsTurnedOn(Num_AEP_core_gpu_shader5, AEP_core_gpu_shader5)))) return keyword; if (parseContext.isEsProfile() && parseContext.version == 310) { reservedWord(); return keyword; } return identifierOrType(); case PERPRIMITIVENV: case PERVIEWNV: case PERTASKNV: if (parseContext.symbolTable.atBuiltInLevel() || parseContext.extensionTurnedOn(E_GL_NV_mesh_shader)) return keyword; return identifierOrType(); case PERPRIMITIVEEXT: case TASKPAYLOADWORKGROUPEXT: if (parseContext.symbolTable.atBuiltInLevel() || parseContext.extensionTurnedOn(E_GL_EXT_mesh_shader)) return keyword; return identifierOrType(); case FCOOPMATNV: afterType = true; if (parseContext.symbolTable.atBuiltInLevel() || parseContext.extensionTurnedOn(E_GL_NV_cooperative_matrix)) return keyword; return identifierOrType(); case UCOOPMATNV: case ICOOPMATNV: afterType = true; if (parseContext.symbolTable.atBuiltInLevel() || parseContext.extensionTurnedOn(E_GL_NV_integer_cooperative_matrix)) return keyword; return identifierOrType(); case COOPMAT: afterType = true; if (parseContext.symbolTable.atBuiltInLevel() || parseContext.extensionTurnedOn(E_GL_KHR_cooperative_matrix)) return keyword; return identifierOrType(); case COOPVECNV: afterType = true; if (parseContext.symbolTable.atBuiltInLevel() || parseContext.extensionTurnedOn(E_GL_NV_cooperative_vector)) return keyword; return identifierOrType(); case DEMOTE: if (parseContext.extensionTurnedOn(E_GL_EXT_demote_to_helper_invocation)) return keyword; else return identifierOrType(); case SPIRV_INSTRUCTION: case SPIRV_EXECUTION_MODE: case SPIRV_EXECUTION_MODE_ID: case SPIRV_DECORATE: case SPIRV_DECORATE_ID: case SPIRV_DECORATE_STRING: case SPIRV_TYPE: case SPIRV_STORAGE_CLASS: case SPIRV_BY_REFERENCE: case SPIRV_LITERAL: if (parseContext.symbolTable.atBuiltInLevel() || parseContext.extensionTurnedOn(E_GL_EXT_spirv_intrinsics)) return keyword; return identifierOrType(); case HITOBJECTNV: if (parseContext.symbolTable.atBuiltInLevel() || (!parseContext.isEsProfile() && parseContext.version >= 460 && parseContext.extensionTurnedOn(E_GL_NV_shader_invocation_reorder))) return keyword; return identifierOrType(); case HITOBJECTATTRNV: if (parseContext.symbolTable.atBuiltInLevel() || (!parseContext.isEsProfile() && parseContext.version >= 460 && parseContext.extensionTurnedOn(E_GL_NV_shader_invocation_reorder))) return keyword; return identifierOrType(); case FUNCTION: case TENSORLAYOUTNV: case TENSORVIEWNV: afterType = true; if (parseContext.symbolTable.atBuiltInLevel() || parseContext.extensionTurnedOn(E_GL_NV_cooperative_matrix2)) return keyword; return identifierOrType(); default: parseContext.infoSink.info.message(EPrefixInternalError, "Unknown glslang keyword", loc); return 0; } } int TScanContext::identifierOrType() { parserToken->sType.lex.string = NewPoolTString(tokenText); if (field) return IDENTIFIER; parserToken->sType.lex.symbol = parseContext.symbolTable.find(*parserToken->sType.lex.string); if ((afterType == false && afterStruct == false) && parserToken->sType.lex.symbol != nullptr) { if (const TVariable* variable = parserToken->sType.lex.symbol->getAsVariable()) { if (variable->isUserType() && // treat redeclaration of forward-declared buffer/uniform reference as an identifier !(variable->getType().isReference() && afterBuffer)) { afterType = true; return TYPE_NAME; } } } return IDENTIFIER; } // Give an error for use of a reserved symbol. // However, allow built-in declarations to use reserved words, to allow // extension support before the extension is enabled. int TScanContext::reservedWord() { if (! parseContext.symbolTable.atBuiltInLevel()) parseContext.error(loc, "Reserved word.", tokenText, "", ""); return 0; } int TScanContext::identifierOrReserved(bool reserved) { if (reserved) { reservedWord(); return 0; } if (parseContext.isForwardCompatible()) parseContext.warn(loc, "using future reserved keyword", tokenText, ""); return identifierOrType(); } // For keywords that suddenly showed up on non-ES (not previously reserved) // but then got reserved by ES 3.0. int TScanContext::es30ReservedFromGLSL(int version) { if (parseContext.symbolTable.atBuiltInLevel()) return keyword; if ((parseContext.isEsProfile() && parseContext.version < 300) || (!parseContext.isEsProfile() && parseContext.version < version)) { if (parseContext.isForwardCompatible()) parseContext.warn(loc, "future reserved word in ES 300 and keyword in GLSL", tokenText, ""); return identifierOrType(); } else if (parseContext.isEsProfile() && parseContext.version >= 300) reservedWord(); return keyword; } // For a keyword that was never reserved, until it suddenly // showed up, both in an es version and a non-ES version. int TScanContext::nonreservedKeyword(int esVersion, int nonEsVersion) { if ((parseContext.isEsProfile() && parseContext.version < esVersion) || (!parseContext.isEsProfile() && parseContext.version < nonEsVersion)) { if (parseContext.isForwardCompatible()) parseContext.warn(loc, "using future keyword", tokenText, ""); return identifierOrType(); } return keyword; } int TScanContext::precisionKeyword() { if (parseContext.isEsProfile() || parseContext.version >= 130) return keyword; if (parseContext.isForwardCompatible()) parseContext.warn(loc, "using ES precision qualifier keyword", tokenText, ""); return identifierOrType(); } int TScanContext::matNxM() { afterType = true; if (parseContext.version > 110) return keyword; if (parseContext.isForwardCompatible()) parseContext.warn(loc, "using future non-square matrix type keyword", tokenText, ""); return identifierOrType(); } int TScanContext::dMat() { afterType = true; if (parseContext.isEsProfile() && parseContext.version >= 300) { reservedWord(); return keyword; } if (!parseContext.isEsProfile() && (parseContext.version >= 400 || parseContext.symbolTable.atBuiltInLevel() || (parseContext.version >= 150 && parseContext.extensionTurnedOn(E_GL_ARB_gpu_shader_fp64)) || (parseContext.version >= 150 && parseContext.extensionTurnedOn(E_GL_ARB_vertex_attrib_64bit) && parseContext.language == EShLangVertex))) return keyword; if (parseContext.isForwardCompatible()) parseContext.warn(loc, "using future type keyword", tokenText, ""); return identifierOrType(); } int TScanContext::firstGenerationImage(bool inEs310) { if (parseContext.symbolTable.atBuiltInLevel() || (!parseContext.isEsProfile() && (parseContext.version >= 420 || parseContext.extensionTurnedOn(E_GL_ARB_shader_image_load_store))) || (inEs310 && parseContext.isEsProfile() && parseContext.version >= 310)) return keyword; if ((parseContext.isEsProfile() && parseContext.version >= 300) || (!parseContext.isEsProfile() && parseContext.version >= 130)) { reservedWord(); return keyword; } if (parseContext.isForwardCompatible()) parseContext.warn(loc, "using future type keyword", tokenText, ""); return identifierOrType(); } int TScanContext::secondGenerationImage() { if (parseContext.isEsProfile() && parseContext.version >= 310) { reservedWord(); return keyword; } if (parseContext.symbolTable.atBuiltInLevel() || (!parseContext.isEsProfile() && (parseContext.version >= 420 || parseContext.extensionTurnedOn(E_GL_ARB_shader_image_load_store)))) return keyword; if (parseContext.isForwardCompatible()) parseContext.warn(loc, "using future type keyword", tokenText, ""); return identifierOrType(); } } // end namespace glslang ================================================ FILE: src/libraries/glslang/glslang/MachineIndependent/Scan.h ================================================ // // Copyright (C) 2002-2005 3Dlabs Inc. Ltd. // Copyright (C) 2013 LunarG, Inc. // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following // disclaimer in the documentation and/or other materials provided // with the distribution. // // Neither the name of 3Dlabs Inc. Ltd. nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // #ifndef _GLSLANG_SCAN_INCLUDED_ #define _GLSLANG_SCAN_INCLUDED_ #include "Versions.h" namespace glslang { // Use a global end-of-input character, so no translation is needed across // layers of encapsulation. Characters are all 8 bit, and positive, so there is // no aliasing of character 255 onto -1, for example. const int EndOfInput = -1; // // A character scanner that seamlessly, on read-only strings, reads across an // array of strings without assuming null termination. // class TInputScanner { public: TInputScanner(int n, const char* const s[], size_t L[], const char* const* names = nullptr, int b = 0, int f = 0, bool single = false) : numSources(n), // up to this point, common usage is "char*", but now we need positive 8-bit characters sources(reinterpret_cast(s)), lengths(L), currentSource(0), currentChar(0), stringBias(b), finale(f), singleLogical(single), endOfFileReached(false) { loc = new TSourceLoc[numSources]; for (int i = 0; i < numSources; ++i) { loc[i].init(i - stringBias); } if (names != nullptr) { for (int i = 0; i < numSources; ++i) loc[i].name = names[i] != nullptr ? NewPoolTString(names[i]) : nullptr; } loc[currentSource].line = 1; logicalSourceLoc.init(1); logicalSourceLoc.name = loc[0].name; } virtual ~TInputScanner() { delete [] loc; } // retrieve the next character and advance one character int get() { int ret = peek(); if (ret == EndOfInput) return ret; ++loc[currentSource].column; ++logicalSourceLoc.column; if (ret == '\n') { ++loc[currentSource].line; ++logicalSourceLoc.line; logicalSourceLoc.column = 0; loc[currentSource].column = 0; } advance(); return ret; } // retrieve the next character, no advance int peek() { if (currentSource >= numSources) { endOfFileReached = true; return EndOfInput; } // Make sure we do not read off the end of a string. // N.B. Sources can have a length of 0. int sourceToRead = currentSource; size_t charToRead = currentChar; while(charToRead >= lengths[sourceToRead]) { charToRead = 0; sourceToRead += 1; if (sourceToRead >= numSources) { return EndOfInput; } } // Here, we care about making negative valued characters positive return sources[sourceToRead][charToRead]; } // go back one character void unget() { // Do not roll back once we've reached the end of the file. if (endOfFileReached) return; if (currentChar > 0) { --currentChar; --loc[currentSource].column; --logicalSourceLoc.column; if (loc[currentSource].column < 0) { // We've moved back past a new line. Find the // previous newline (or start of the file) to compute // the column count on the now current line. size_t chIndex = currentChar; while (chIndex > 0) { if (sources[currentSource][chIndex] == '\n') { break; } --chIndex; } logicalSourceLoc.column = (int)(currentChar - chIndex); loc[currentSource].column = (int)(currentChar - chIndex); } } else { do { --currentSource; } while (currentSource > 0 && lengths[currentSource] == 0); if (lengths[currentSource] == 0) { // set to 0 if we've backed up to the start of an empty string currentChar = 0; } else currentChar = lengths[currentSource] - 1; } if (peek() == '\n') { --loc[currentSource].line; --logicalSourceLoc.line; } } // for #line override void setLine(int newLine) { logicalSourceLoc.line = newLine; loc[getLastValidSourceIndex()].line = newLine; } // for #line override in filename based parsing void setFile(const char* filename) { TString* fn_tstr = NewPoolTString(filename); logicalSourceLoc.name = fn_tstr; loc[getLastValidSourceIndex()].name = fn_tstr; } void setFile(const char* filename, int i) { TString* fn_tstr = NewPoolTString(filename); if (i == getLastValidSourceIndex()) { logicalSourceLoc.name = fn_tstr; } loc[i].name = fn_tstr; } void setString(int newString) { logicalSourceLoc.string = newString; loc[getLastValidSourceIndex()].string = newString; logicalSourceLoc.name = nullptr; loc[getLastValidSourceIndex()].name = nullptr; } // for #include content indentation void setColumn(int col) { logicalSourceLoc.column = col; loc[getLastValidSourceIndex()].column = col; } void setEndOfInput() { endOfFileReached = true; currentSource = numSources; } bool atEndOfInput() const { return endOfFileReached; } const TSourceLoc& getSourceLoc() const { if (singleLogical) { return logicalSourceLoc; } else { return loc[std::max(0, std::min(currentSource, numSources - finale - 1))]; } } // Returns the index (starting from 0) of the most recent valid source string we are reading from. int getLastValidSourceIndex() const { return std::min(currentSource, numSources - 1); } void consumeWhiteSpace(bool& foundNonSpaceTab); bool consumeComment(); void consumeWhitespaceComment(bool& foundNonSpaceTab); bool scanVersion(int& version, EProfile& profile, bool& notFirstToken); protected: // advance one character void advance() { ++currentChar; if (currentChar >= lengths[currentSource]) { ++currentSource; if (currentSource < numSources) { loc[currentSource].string = loc[currentSource - 1].string + 1; loc[currentSource].line = 1; loc[currentSource].column = 0; } while (currentSource < numSources && lengths[currentSource] == 0) { ++currentSource; if (currentSource < numSources) { loc[currentSource].string = loc[currentSource - 1].string + 1; loc[currentSource].line = 1; loc[currentSource].column = 0; } } currentChar = 0; } } int numSources; // number of strings in source const unsigned char* const *sources; // array of strings; must be converted to positive values on use, to avoid aliasing with -1 as EndOfInput const size_t *lengths; // length of each string int currentSource; size_t currentChar; // This is for reporting what string/line an error occurred on, and can be overridden by #line. // It remembers the last state of each source string as it is left for the next one, so unget() // can restore that state. TSourceLoc* loc; // an array int stringBias; // the first string that is the user's string number 0 int finale; // number of internal strings after user's last string TSourceLoc logicalSourceLoc; bool singleLogical; // treats the strings as a single logical string. // locations will be reported from the first string. // Set to true once peek() returns EndOfFile, so that we won't roll back // once we've reached EndOfFile. bool endOfFileReached; }; } // end namespace glslang #endif // _GLSLANG_SCAN_INCLUDED_ ================================================ FILE: src/libraries/glslang/glslang/MachineIndependent/ScanContext.h ================================================ // // Copyright (C) 2013 LunarG, Inc. // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following // disclaimer in the documentation and/or other materials provided // with the distribution. // // Neither the name of 3Dlabs Inc. Ltd. nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // // // This holds context specific to the GLSL scanner, which // sits between the preprocessor scanner and parser. // #pragma once #include "ParseHelper.h" namespace glslang { class TPpContext; class TPpToken; class TParserToken; class TScanContext { public: explicit TScanContext(TParseContextBase& pc) : parseContext(pc), afterType(false), afterStruct(false), field(false), afterBuffer(false) { } virtual ~TScanContext() { } static void fillInKeywordMap(); static void deleteKeywordMap(); int tokenize(TPpContext*, TParserToken&); protected: TScanContext(TScanContext&); TScanContext& operator=(TScanContext&); int tokenizeIdentifier(); int identifierOrType(); int reservedWord(); int identifierOrReserved(bool reserved); int es30ReservedFromGLSL(int version); int nonreservedKeyword(int esVersion, int nonEsVersion); int precisionKeyword(); int matNxM(); int dMat(); int firstGenerationImage(bool inEs310); int secondGenerationImage(); TParseContextBase& parseContext; bool afterType; // true if we've recognized a type, so can only be looking for an identifier bool afterStruct; // true if we've recognized the STRUCT keyword, so can only be looking for an identifier bool field; // true if we're on a field, right after a '.' bool afterBuffer; // true if we've recognized the BUFFER keyword TSourceLoc loc; TParserToken* parserToken; TPpToken* ppToken; const char* tokenText; int keyword; }; } // end namespace glslang ================================================ FILE: src/libraries/glslang/glslang/MachineIndependent/ShaderLang.cpp ================================================ // // Copyright (C) 2002-2005 3Dlabs Inc. Ltd. // Copyright (C) 2013-2016 LunarG, Inc. // Copyright (C) 2015-2020 Google, Inc. // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following // disclaimer in the documentation and/or other materials provided // with the distribution. // // Neither the name of 3Dlabs Inc. Ltd. nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // // // Implement the top-level of interface to the compiler/linker, // as defined in ShaderLang.h // This is the platform independent interface between an OGL driver // and the shading language compiler/linker. // #include #include #include #include #include #include "SymbolTable.h" #include "ParseHelper.h" #include "Scan.h" #include "ScanContext.h" #ifdef ENABLE_HLSL #include "../HLSL/hlslParseHelper.h" #include "../HLSL/hlslParseables.h" #include "../HLSL/hlslScanContext.h" #endif #include "../Include/ShHandle.h" #include "preprocessor/PpContext.h" #define SH_EXPORTING #include "../Public/ShaderLang.h" #include "reflection.h" #include "iomapper.h" #include "Initialize.h" // TODO: this really shouldn't be here, it is only because of the trial addition // of printing pre-processed tokens, which requires knowing the string literal // token to print ", but none of that seems appropriate for this file. #include "preprocessor/PpTokens.h" // Build-time generated includes #include "../../glslang/build_info.h" namespace { // anonymous namespace for file-local functions and symbols // Total number of successful initializers of glslang: a refcount // Shared global; access should be protected by a global mutex/critical section. int NumberOfClients = 0; // global initialization lock #ifndef DISABLE_THREAD_SUPPORT std::mutex init_lock; #endif using namespace glslang; // Create a language specific version of parseables. TBuiltInParseables* CreateBuiltInParseables(TInfoSink& infoSink, EShSource source) { switch (source) { case EShSourceGlsl: return new TBuiltIns(); // GLSL builtIns #ifdef ENABLE_HLSL case EShSourceHlsl: return new TBuiltInParseablesHlsl(); // HLSL intrinsics #endif default: infoSink.info.message(EPrefixInternalError, "Unable to determine source language"); return nullptr; } } // Create a language specific version of a parse context. TParseContextBase* CreateParseContext(TSymbolTable& symbolTable, TIntermediate& intermediate, int version, EProfile profile, EShSource source, EShLanguage language, TInfoSink& infoSink, SpvVersion spvVersion, bool forwardCompatible, EShMessages messages, bool parsingBuiltIns, std::string sourceEntryPointName = "") { switch (source) { case EShSourceGlsl: { if (sourceEntryPointName.size() == 0) intermediate.setEntryPointName("main"); TString entryPoint = sourceEntryPointName.c_str(); return new TParseContext(symbolTable, intermediate, parsingBuiltIns, version, profile, spvVersion, language, infoSink, forwardCompatible, messages, &entryPoint); } #ifdef ENABLE_HLSL case EShSourceHlsl: return new HlslParseContext(symbolTable, intermediate, parsingBuiltIns, version, profile, spvVersion, language, infoSink, sourceEntryPointName.c_str(), forwardCompatible, messages); #endif default: infoSink.info.message(EPrefixInternalError, "Unable to determine source language"); return nullptr; } } // Local mapping functions for making arrays of symbol tables.... const int VersionCount = 17; // index range in MapVersionToIndex int MapVersionToIndex(int version) { int index = 0; switch (version) { case 100: index = 0; break; case 110: index = 1; break; case 120: index = 2; break; case 130: index = 3; break; case 140: index = 4; break; case 150: index = 5; break; case 300: index = 6; break; case 330: index = 7; break; case 400: index = 8; break; case 410: index = 9; break; case 420: index = 10; break; case 430: index = 11; break; case 440: index = 12; break; case 310: index = 13; break; case 450: index = 14; break; case 500: index = 0; break; // HLSL case 320: index = 15; break; case 460: index = 16; break; default: assert(0); break; } assert(index < VersionCount); return index; } const int SpvVersionCount = 4; // index range in MapSpvVersionToIndex int MapSpvVersionToIndex(const SpvVersion& spvVersion) { int index = 0; if (spvVersion.openGl > 0) index = 1; else if (spvVersion.vulkan > 0) { if (!spvVersion.vulkanRelaxed) index = 2; else index = 3; } assert(index < SpvVersionCount); return index; } const int ProfileCount = 4; // index range in MapProfileToIndex int MapProfileToIndex(EProfile profile) { int index = 0; switch (profile) { case ENoProfile: index = 0; break; case ECoreProfile: index = 1; break; case ECompatibilityProfile: index = 2; break; case EEsProfile: index = 3; break; default: break; } assert(index < ProfileCount); return index; } const int SourceCount = 2; int MapSourceToIndex(EShSource source) { int index = 0; switch (source) { case EShSourceGlsl: index = 0; break; case EShSourceHlsl: index = 1; break; default: break; } assert(index < SourceCount); return index; } // only one of these needed for non-ES; ES needs 2 for different precision defaults of built-ins enum EPrecisionClass { EPcGeneral, EPcFragment, EPcCount }; // A process-global symbol table per version per profile for built-ins common // to multiple stages (languages), and a process-global symbol table per version // per profile per stage for built-ins unique to each stage. They will be sparsely // populated, so they will only be generated as needed. // // Each has a different set of built-ins, and we want to preserve that from // compile to compile. // TSymbolTable* CommonSymbolTable[VersionCount][SpvVersionCount][ProfileCount][SourceCount][EPcCount] = {}; TSymbolTable* SharedSymbolTables[VersionCount][SpvVersionCount][ProfileCount][SourceCount][EShLangCount] = {}; TPoolAllocator* PerProcessGPA = nullptr; // // Parse and add to the given symbol table the content of the given shader string. // bool InitializeSymbolTable(const TString& builtIns, int version, EProfile profile, const SpvVersion& spvVersion, EShLanguage language, EShSource source, TInfoSink& infoSink, TSymbolTable& symbolTable) { TIntermediate intermediate(language, version, profile); intermediate.setSource(source); std::unique_ptr parseContext(CreateParseContext(symbolTable, intermediate, version, profile, source, language, infoSink, spvVersion, true, EShMsgDefault, true)); TShader::ForbidIncluder includer; TPpContext ppContext(*parseContext, "", includer); TScanContext scanContext(*parseContext); parseContext->setScanContext(&scanContext); parseContext->setPpContext(&ppContext); // // Push the symbol table to give it an initial scope. This // push should not have a corresponding pop, so that built-ins // are preserved, and the test for an empty table fails. // symbolTable.push(); const char* builtInShaders[2]; size_t builtInLengths[2]; builtInShaders[0] = builtIns.c_str(); builtInLengths[0] = builtIns.size(); if (builtInLengths[0] == 0) return true; TInputScanner input(1, builtInShaders, builtInLengths); if (! parseContext->parseShaderStrings(ppContext, input) != 0) { infoSink.info.message(EPrefixInternalError, "Unable to parse built-ins"); printf("Unable to parse built-ins\n%s\n", infoSink.info.c_str()); printf("%s\n", builtInShaders[0]); return false; } return true; } int CommonIndex(EProfile profile, EShLanguage language) { return (profile == EEsProfile && language == EShLangFragment) ? EPcFragment : EPcGeneral; } // // To initialize per-stage shared tables, with the common table already complete. // bool InitializeStageSymbolTable(TBuiltInParseables& builtInParseables, int version, EProfile profile, const SpvVersion& spvVersion, EShLanguage language, EShSource source, TInfoSink& infoSink, TSymbolTable** commonTable, TSymbolTable** symbolTables) { (*symbolTables[language]).adoptLevels(*commonTable[CommonIndex(profile, language)]); if (!InitializeSymbolTable(builtInParseables.getStageString(language), version, profile, spvVersion, language, source, infoSink, *symbolTables[language])) return false; builtInParseables.identifyBuiltIns(version, profile, spvVersion, language, *symbolTables[language]); if (profile == EEsProfile && version >= 300) (*symbolTables[language]).setNoBuiltInRedeclarations(); if (version == 110) (*symbolTables[language]).setSeparateNameSpaces(); return true; } // // Initialize the full set of shareable symbol tables; // The common (cross-stage) and those shareable per-stage. // bool InitializeSymbolTables(TInfoSink& infoSink, TSymbolTable** commonTable, TSymbolTable** symbolTables, int version, EProfile profile, const SpvVersion& spvVersion, EShSource source) { bool success = true; std::unique_ptr builtInParseables(CreateBuiltInParseables(infoSink, source)); if (builtInParseables == nullptr) return false; builtInParseables->initialize(version, profile, spvVersion); // do the common tables success &= InitializeSymbolTable(builtInParseables->getCommonString(), version, profile, spvVersion, EShLangVertex, source, infoSink, *commonTable[EPcGeneral]); if (profile == EEsProfile) success &= InitializeSymbolTable(builtInParseables->getCommonString(), version, profile, spvVersion, EShLangFragment, source, infoSink, *commonTable[EPcFragment]); // do the per-stage tables // always have vertex and fragment success &= InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangVertex, source, infoSink, commonTable, symbolTables); success &= InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangFragment, source, infoSink, commonTable, symbolTables); // check for tessellation if ((profile != EEsProfile && version >= 150) || (profile == EEsProfile && version >= 310)) { success &= InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangTessControl, source, infoSink, commonTable, symbolTables); success &= InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangTessEvaluation, source, infoSink, commonTable, symbolTables); } // check for geometry if ((profile != EEsProfile && version >= 150) || (profile == EEsProfile && version >= 310)) success &= InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangGeometry, source, infoSink, commonTable, symbolTables); // check for compute if ((profile != EEsProfile && version >= 420) || (profile == EEsProfile && version >= 310)) success &= InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangCompute, source, infoSink, commonTable, symbolTables); // check for ray tracing stages if (profile != EEsProfile && version >= 450) { success &= InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangRayGen, source, infoSink, commonTable, symbolTables); success &= InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangIntersect, source, infoSink, commonTable, symbolTables); success &= InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangAnyHit, source, infoSink, commonTable, symbolTables); success &= InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangClosestHit, source, infoSink, commonTable, symbolTables); success &= InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangMiss, source, infoSink, commonTable, symbolTables); success &= InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangCallable, source, infoSink, commonTable, symbolTables); } // check for mesh if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 320)) success &= InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangMesh, source, infoSink, commonTable, symbolTables); // check for task if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 320)) success &= InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangTask, source, infoSink, commonTable, symbolTables); return success; } bool AddContextSpecificSymbols(const TBuiltInResource* resources, TInfoSink& infoSink, TSymbolTable& symbolTable, int version, EProfile profile, const SpvVersion& spvVersion, EShLanguage language, EShSource source) { std::unique_ptr builtInParseables(CreateBuiltInParseables(infoSink, source)); if (builtInParseables == nullptr) return false; builtInParseables->initialize(*resources, version, profile, spvVersion, language); if (!InitializeSymbolTable(builtInParseables->getCommonString(), version, profile, spvVersion, language, source, infoSink, symbolTable)) return false; builtInParseables->identifyBuiltIns(version, profile, spvVersion, language, symbolTable, *resources); return true; } // // To do this on the fly, we want to leave the current state of our thread's // pool allocator intact, so: // - Switch to a new pool for parsing the built-ins // - Do the parsing, which builds the symbol table, using the new pool // - Switch to the process-global pool to save a copy of the resulting symbol table // - Free up the new pool used to parse the built-ins // - Switch back to the original thread's pool // // This only gets done the first time any thread needs a particular symbol table // (lazy evaluation). // bool SetupBuiltinSymbolTable(int version, EProfile profile, const SpvVersion& spvVersion, EShSource source) { TInfoSink infoSink; bool success; // Make sure only one thread tries to do this at a time #ifndef DISABLE_THREAD_SUPPORT const std::lock_guard lock(init_lock); #endif // See if it's already been done for this version/profile combination int versionIndex = MapVersionToIndex(version); int spvVersionIndex = MapSpvVersionToIndex(spvVersion); int profileIndex = MapProfileToIndex(profile); int sourceIndex = MapSourceToIndex(source); if (CommonSymbolTable[versionIndex][spvVersionIndex][profileIndex][sourceIndex][EPcGeneral]) { return true; } // Switch to a new pool TPoolAllocator& previousAllocator = GetThreadPoolAllocator(); TPoolAllocator* builtInPoolAllocator = new TPoolAllocator; SetThreadPoolAllocator(builtInPoolAllocator); // Dynamically allocate the local symbol tables so we can control when they are deallocated WRT when the pool is popped. TSymbolTable* commonTable[EPcCount]; TSymbolTable* stageTables[EShLangCount]; for (int precClass = 0; precClass < EPcCount; ++precClass) commonTable[precClass] = new TSymbolTable; for (int stage = 0; stage < EShLangCount; ++stage) stageTables[stage] = new TSymbolTable; // Generate the local symbol tables using the new pool if (!InitializeSymbolTables(infoSink, commonTable, stageTables, version, profile, spvVersion, source)) { success = false; goto cleanup; } // Switch to the process-global pool SetThreadPoolAllocator(PerProcessGPA); // Copy the local symbol tables from the new pool to the global tables using the process-global pool for (int precClass = 0; precClass < EPcCount; ++precClass) { if (! commonTable[precClass]->isEmpty()) { CommonSymbolTable[versionIndex][spvVersionIndex][profileIndex][sourceIndex][precClass] = new TSymbolTable; CommonSymbolTable[versionIndex][spvVersionIndex][profileIndex][sourceIndex][precClass]->copyTable(*commonTable[precClass]); CommonSymbolTable[versionIndex][spvVersionIndex][profileIndex][sourceIndex][precClass]->readOnly(); } } for (int stage = 0; stage < EShLangCount; ++stage) { if (! stageTables[stage]->isEmpty()) { SharedSymbolTables[versionIndex][spvVersionIndex][profileIndex][sourceIndex][stage] = new TSymbolTable; SharedSymbolTables[versionIndex][spvVersionIndex][profileIndex][sourceIndex][stage]->adoptLevels(*CommonSymbolTable [versionIndex][spvVersionIndex][profileIndex][sourceIndex][CommonIndex(profile, (EShLanguage)stage)]); SharedSymbolTables[versionIndex][spvVersionIndex][profileIndex][sourceIndex][stage]->copyTable(*stageTables[stage]); SharedSymbolTables[versionIndex][spvVersionIndex][profileIndex][sourceIndex][stage]->readOnly(); } } success = true; cleanup: // Clean up the local tables before deleting the pool they used. for (int precClass = 0; precClass < EPcCount; ++precClass) delete commonTable[precClass]; for (int stage = 0; stage < EShLangCount; ++stage) delete stageTables[stage]; delete builtInPoolAllocator; SetThreadPoolAllocator(&previousAllocator); return success; } // Function to Print all builtins void DumpBuiltinSymbolTable(TInfoSink& infoSink, const TSymbolTable& symbolTable) { infoSink.debug << "BuiltinSymbolTable {\n"; symbolTable.dump(infoSink, true); infoSink.debug << "}\n"; } // Return true if the shader was correctly specified for version/profile/stage. bool DeduceVersionProfile(TInfoSink& infoSink, EShLanguage stage, bool versionNotFirst, int defaultVersion, EShSource source, int& version, EProfile& profile, const SpvVersion& spvVersion) { const int FirstProfileVersion = 150; bool correct = true; if (source == EShSourceHlsl) { version = 500; // shader model; currently a characteristic of glslang, not the input profile = ECoreProfile; // allow doubles in prototype parsing return correct; } // Get a version... if (version == 0) { version = defaultVersion; // infoSink.info.message(EPrefixWarning, "#version: statement missing; use #version on first line of shader"); } // Get a good profile... if (profile == ENoProfile) { if (version == 300 || version == 310 || version == 320) { correct = false; infoSink.info.message(EPrefixError, "#version: versions 300, 310, and 320 require specifying the 'es' profile"); profile = EEsProfile; } else if (version == 100) profile = EEsProfile; else if (version >= FirstProfileVersion) profile = ECoreProfile; else profile = ENoProfile; } else { // a profile was provided... if (version < 150) { correct = false; infoSink.info.message(EPrefixError, "#version: versions before 150 do not allow a profile token"); if (version == 100) profile = EEsProfile; else profile = ENoProfile; } else if (version == 300 || version == 310 || version == 320) { if (profile != EEsProfile) { correct = false; infoSink.info.message(EPrefixError, "#version: versions 300, 310, and 320 support only the es profile"); } profile = EEsProfile; } else { if (profile == EEsProfile) { correct = false; infoSink.info.message(EPrefixError, "#version: only version 300, 310, and 320 support the es profile"); if (version >= FirstProfileVersion) profile = ECoreProfile; else profile = ENoProfile; } // else: typical desktop case... e.g., "#version 410 core" } } // Fix version... switch (version) { // ES versions case 100: break; case 300: break; case 310: break; case 320: break; // desktop versions case 110: break; case 120: break; case 130: break; case 140: break; case 150: break; case 330: break; case 400: break; case 410: break; case 420: break; case 430: break; case 440: break; case 450: break; case 460: break; // unknown version default: correct = false; infoSink.info.message(EPrefixError, "version not supported"); if (profile == EEsProfile) version = 310; else { version = 450; profile = ECoreProfile; } break; } // Correct for stage type... switch (stage) { case EShLangGeometry: if ((profile == EEsProfile && version < 310) || (profile != EEsProfile && version < 150)) { correct = false; infoSink.info.message(EPrefixError, "#version: geometry shaders require es profile with version 310 or non-es profile with version 150 or above"); version = (profile == EEsProfile) ? 310 : 150; if (profile == EEsProfile || profile == ENoProfile) profile = ECoreProfile; } break; case EShLangTessControl: case EShLangTessEvaluation: if ((profile == EEsProfile && version < 310) || (profile != EEsProfile && version < 150)) { correct = false; infoSink.info.message(EPrefixError, "#version: tessellation shaders require es profile with version 310 or non-es profile with version 150 or above"); version = (profile == EEsProfile) ? 310 : 400; // 150 supports the extension, correction is to 400 which does not if (profile == EEsProfile || profile == ENoProfile) profile = ECoreProfile; } break; case EShLangCompute: if ((profile == EEsProfile && version < 310) || (profile != EEsProfile && version < 420)) { correct = false; infoSink.info.message(EPrefixError, "#version: compute shaders require es profile with version 310 or above, or non-es profile with version 420 or above"); version = profile == EEsProfile ? 310 : 420; } break; case EShLangRayGen: case EShLangIntersect: case EShLangAnyHit: case EShLangClosestHit: case EShLangMiss: case EShLangCallable: if (profile == EEsProfile || version < 460) { correct = false; infoSink.info.message(EPrefixError, "#version: ray tracing shaders require non-es profile with version 460 or above"); version = 460; } break; case EShLangMesh: case EShLangTask: if ((profile == EEsProfile && version < 320) || (profile != EEsProfile && version < 450)) { correct = false; infoSink.info.message(EPrefixError, "#version: mesh/task shaders require es profile with version 320 or above, or non-es profile with version 450 or above"); version = profile == EEsProfile ? 320 : 450; } break; default: break; } if (profile == EEsProfile && version >= 300 && versionNotFirst) { correct = false; infoSink.info.message(EPrefixError, "#version: statement must appear first in es-profile shader; before comments or newlines"); } // Check for SPIR-V compatibility if (spvVersion.spv != 0) { switch (profile) { case EEsProfile: if (version < 310) { correct = false; infoSink.info.message(EPrefixError, "#version: ES shaders for SPIR-V require version 310 or higher"); version = 310; } break; case ECompatibilityProfile: infoSink.info.message(EPrefixError, "#version: compilation for SPIR-V does not support the compatibility profile"); break; default: if (spvVersion.vulkan > 0 && version < 140) { correct = false; infoSink.info.message(EPrefixError, "#version: Desktop shaders for Vulkan SPIR-V require version 140 or higher"); version = 140; } if (spvVersion.openGl >= 100 && version < 330) { correct = false; infoSink.info.message(EPrefixError, "#version: Desktop shaders for OpenGL SPIR-V require version 330 or higher"); version = 330; } break; } } return correct; } // There are multiple paths in for setting environment stuff. // TEnvironment takes precedence, for what it sets, so sort all this out. // Ideally, the internal code could be made to use TEnvironment, but for // now, translate it to the historically used parameters. void TranslateEnvironment(const TEnvironment* environment, EShMessages& messages, EShSource& source, EShLanguage& stage, SpvVersion& spvVersion) { // Set up environmental defaults, first ignoring 'environment'. if (messages & EShMsgSpvRules) spvVersion.spv = EShTargetSpv_1_0; if (messages & EShMsgVulkanRules) { spvVersion.vulkan = EShTargetVulkan_1_0; spvVersion.vulkanGlsl = 100; } else if (spvVersion.spv != 0) spvVersion.openGl = 100; // Now, override, based on any content set in 'environment'. // 'environment' must be cleared to ESh*None settings when items // are not being set. if (environment != nullptr) { // input language if (environment->input.languageFamily != EShSourceNone) { stage = environment->input.stage; switch (environment->input.dialect) { case EShClientNone: break; case EShClientVulkan: spvVersion.vulkanGlsl = environment->input.dialectVersion; spvVersion.vulkanRelaxed = environment->input.vulkanRulesRelaxed; break; case EShClientOpenGL: spvVersion.openGl = environment->input.dialectVersion; break; case EShClientCount: assert(0); break; } switch (environment->input.languageFamily) { case EShSourceNone: break; case EShSourceGlsl: source = EShSourceGlsl; messages = static_cast(messages & ~EShMsgReadHlsl); break; case EShSourceHlsl: source = EShSourceHlsl; messages = static_cast(messages | EShMsgReadHlsl); break; case EShSourceCount: assert(0); break; } } // client switch (environment->client.client) { case EShClientVulkan: spvVersion.vulkan = environment->client.version; break; default: break; } // generated code switch (environment->target.language) { case EshTargetSpv: spvVersion.spv = environment->target.version; break; default: break; } } } // Most processes are recorded when set in the intermediate representation, // These are the few that are not. void RecordProcesses(TIntermediate& intermediate, EShMessages messages, const std::string& sourceEntryPointName) { if ((messages & EShMsgRelaxedErrors) != 0) intermediate.addProcess("relaxed-errors"); if ((messages & EShMsgSuppressWarnings) != 0) intermediate.addProcess("suppress-warnings"); if ((messages & EShMsgKeepUncalled) != 0) intermediate.addProcess("keep-uncalled"); if (sourceEntryPointName.size() > 0) { intermediate.addProcess("source-entrypoint"); intermediate.addProcessArgument(sourceEntryPointName); } } // This is the common setup and cleanup code for PreprocessDeferred and // CompileDeferred. // It takes any callable with a signature of // bool (TParseContextBase& parseContext, TPpContext& ppContext, // TInputScanner& input, bool versionWillBeError, // TSymbolTable& , TIntermediate& , // EShOptimizationLevel , EShMessages ); // Which returns false if a failure was detected and true otherwise. // template bool ProcessDeferred( TCompiler* compiler, const char* const shaderStrings[], const int numStrings, const int* inputLengths, const char* const stringNames[], const char* customPreamble, const EShOptimizationLevel optLevel, const TBuiltInResource* resources, int defaultVersion, // use 100 for ES environment, 110 for desktop; this is the GLSL version, not SPIR-V or Vulkan EProfile defaultProfile, // set version/profile to defaultVersion/defaultProfile regardless of the #version // directive in the source code bool forceDefaultVersionAndProfile, int overrideVersion, // overrides version specified by #version or default version bool forwardCompatible, // give errors for use of deprecated features EShMessages messages, // warnings/errors/AST; things to print out TIntermediate& intermediate, // returned tree, etc. ProcessingContext& processingContext, bool requireNonempty, TShader::Includer& includer, const std::string sourceEntryPointName = "", const TEnvironment* environment = nullptr, // optional way of fully setting all versions, overriding the above bool compileOnly = false) { // This must be undone (.pop()) by the caller, after it finishes consuming the created tree. GetThreadPoolAllocator().push(); if (numStrings == 0) return true; // Move to length-based strings, rather than null-terminated strings. // Also, add strings to include the preamble and to ensure the shader is not null, // which lets the grammar accept what was a null (post preprocessing) shader. // // Shader will look like // string 0: system preamble // string 1: custom preamble // string 2...numStrings+1: user's shader // string numStrings+2: "int;" const int numPre = 2; const int numPost = requireNonempty? 1 : 0; const int numTotal = numPre + numStrings + numPost; std::unique_ptr lengths(new size_t[numTotal]); std::unique_ptr strings(new const char*[numTotal]); std::unique_ptr names(new const char*[numTotal]); for (int s = 0; s < numStrings; ++s) { strings[s + numPre] = shaderStrings[s]; if (inputLengths == nullptr || inputLengths[s] < 0) lengths[s + numPre] = strlen(shaderStrings[s]); else lengths[s + numPre] = inputLengths[s]; } if (stringNames != nullptr) { for (int s = 0; s < numStrings; ++s) names[s + numPre] = stringNames[s]; } else { for (int s = 0; s < numStrings; ++s) names[s + numPre] = nullptr; } // Get all the stages, languages, clients, and other environment // stuff sorted out. EShSource sourceGuess = (messages & EShMsgReadHlsl) != 0 ? EShSourceHlsl : EShSourceGlsl; SpvVersion spvVersion; EShLanguage stage = compiler->getLanguage(); TranslateEnvironment(environment, messages, sourceGuess, stage, spvVersion); #ifdef ENABLE_HLSL EShSource source = sourceGuess; if (environment != nullptr && environment->target.hlslFunctionality1) intermediate.setHlslFunctionality1(); #else const EShSource source = EShSourceGlsl; #endif // First, without using the preprocessor or parser, find the #version, so we know what // symbol tables, processing rules, etc. to set up. This does not need the extra strings // outlined above, just the user shader, after the system and user preambles. glslang::TInputScanner userInput(numStrings, &strings[numPre], &lengths[numPre]); int version = 0; EProfile profile = ENoProfile; bool versionNotFirstToken = false; bool versionNotFirst = (source == EShSourceHlsl) ? true : userInput.scanVersion(version, profile, versionNotFirstToken); bool versionNotFound = version == 0; if (forceDefaultVersionAndProfile && source == EShSourceGlsl) { if (! (messages & EShMsgSuppressWarnings) && ! versionNotFound && (version != defaultVersion || profile != defaultProfile)) { compiler->infoSink.info << "Warning, (version, profile) forced to be (" << defaultVersion << ", " << ProfileName(defaultProfile) << "), while in source code it is (" << version << ", " << ProfileName(profile) << ")\n"; } if (versionNotFound) { versionNotFirstToken = false; versionNotFirst = false; versionNotFound = false; } version = defaultVersion; profile = defaultProfile; } if (source == EShSourceGlsl && overrideVersion != 0) { version = overrideVersion; } bool goodVersion = DeduceVersionProfile(compiler->infoSink, stage, versionNotFirst, defaultVersion, source, version, profile, spvVersion); bool versionWillBeError = (versionNotFound || (profile == EEsProfile && version >= 300 && versionNotFirst)); bool warnVersionNotFirst = false; if (! versionWillBeError && versionNotFirstToken) { if (messages & EShMsgRelaxedErrors) warnVersionNotFirst = true; else versionWillBeError = true; } intermediate.setSource(source); intermediate.setVersion(version); intermediate.setProfile(profile); intermediate.setSpv(spvVersion); RecordProcesses(intermediate, messages, sourceEntryPointName); if (spvVersion.vulkan > 0) intermediate.setOriginUpperLeft(); #ifdef ENABLE_HLSL if ((messages & EShMsgHlslOffsets) || source == EShSourceHlsl) intermediate.setHlslOffsets(); #endif if (messages & EShMsgDebugInfo) { intermediate.setSourceFile(names[numPre]); for (int s = 0; s < numStrings; ++s) { // The string may not be null-terminated, so make sure we provide // the length along with the string. intermediate.addSourceText(strings[numPre + s], lengths[numPre + s]); } } if (!SetupBuiltinSymbolTable(version, profile, spvVersion, source)) { return false; } TSymbolTable* cachedTable = SharedSymbolTables[MapVersionToIndex(version)] [MapSpvVersionToIndex(spvVersion)] [MapProfileToIndex(profile)] [MapSourceToIndex(source)] [stage]; // Dynamically allocate the symbol table so we can control when it is deallocated WRT the pool. std::unique_ptr symbolTable(new TSymbolTable); if (cachedTable) symbolTable->adoptLevels(*cachedTable); if (intermediate.getUniqueId() != 0) symbolTable->overwriteUniqueId(intermediate.getUniqueId()); // Add built-in symbols that are potentially context dependent; // they get popped again further down. if (! AddContextSpecificSymbols(resources, compiler->infoSink, *symbolTable, version, profile, spvVersion, stage, source)) { return false; } if (messages & EShMsgBuiltinSymbolTable) DumpBuiltinSymbolTable(compiler->infoSink, *symbolTable); // // Now we can process the full shader under proper symbols and rules. // std::unique_ptr parseContext(CreateParseContext(*symbolTable, intermediate, version, profile, source, stage, compiler->infoSink, spvVersion, forwardCompatible, messages, false, sourceEntryPointName)); parseContext->compileOnly = compileOnly; TPpContext ppContext(*parseContext, names[numPre] ? names[numPre] : "", includer); // only GLSL (bison triggered, really) needs an externally set scan context glslang::TScanContext scanContext(*parseContext); if (source == EShSourceGlsl) parseContext->setScanContext(&scanContext); parseContext->setPpContext(&ppContext); parseContext->setLimits(*resources); if (! goodVersion) parseContext->addError(); if (warnVersionNotFirst) { TSourceLoc loc; loc.init(); parseContext->warn(loc, "Illegal to have non-comment, non-whitespace tokens before #version", "#version", ""); } parseContext->initializeExtensionBehavior(); // Fill in the strings as outlined above. std::string preamble; parseContext->getPreamble(preamble); strings[0] = preamble.c_str(); lengths[0] = strlen(strings[0]); names[0] = nullptr; strings[1] = customPreamble; lengths[1] = strlen(strings[1]); names[1] = nullptr; assert(2 == numPre); if (requireNonempty) { const int postIndex = numStrings + numPre; strings[postIndex] = "\n int;"; lengths[postIndex] = strlen(strings[numStrings + numPre]); names[postIndex] = nullptr; } TInputScanner fullInput(numStrings + numPre + numPost, strings.get(), lengths.get(), names.get(), numPre, numPost); // Push a new symbol allocation scope that will get used for the shader's globals. symbolTable->push(); bool success = processingContext(*parseContext, ppContext, fullInput, versionWillBeError, *symbolTable, intermediate, optLevel, messages); intermediate.setUniqueId(symbolTable->getMaxSymbolId()); return success; } // Responsible for keeping track of the most recent source string and line in // the preprocessor and outputting newlines appropriately if the source string // or line changes. class SourceLineSynchronizer { public: SourceLineSynchronizer(const std::function& lastSourceIndex, std::string* output) : getLastSourceIndex(lastSourceIndex), output(output), lastSource(-1), lastLine(0) {} // SourceLineSynchronizer(const SourceLineSynchronizer&) = delete; // SourceLineSynchronizer& operator=(const SourceLineSynchronizer&) = delete; // Sets the internally tracked source string index to that of the most // recently read token. If we switched to a new source string, returns // true and inserts a newline. Otherwise, returns false and outputs nothing. bool syncToMostRecentString() { if (getLastSourceIndex() != lastSource) { // After switching to a new source string, we need to reset lastLine // because line number resets every time a new source string is // used. We also need to output a newline to separate the output // from the previous source string (if there is one). if (lastSource != -1 || lastLine != 0) *output += '\n'; lastSource = getLastSourceIndex(); lastLine = -1; return true; } return false; } // Calls syncToMostRecentString() and then sets the internally tracked line // number to tokenLine. If we switched to a new line, returns true and inserts // newlines appropriately. Otherwise, returns false and outputs nothing. bool syncToLine(int tokenLine) { syncToMostRecentString(); const bool newLineStarted = lastLine < tokenLine; for (; lastLine < tokenLine; ++lastLine) { if (lastLine > 0) *output += '\n'; } return newLineStarted; } // Sets the internally tracked line number to newLineNum. void setLineNum(int newLineNum) { lastLine = newLineNum; } private: SourceLineSynchronizer& operator=(const SourceLineSynchronizer&); // A function for getting the index of the last valid source string we've // read tokens from. const std::function getLastSourceIndex; // output string for newlines. std::string* output; // lastSource is the source string index (starting from 0) of the last token // processed. It is tracked in order for newlines to be inserted when a new // source string starts. -1 means we haven't started processing any source // string. int lastSource; // lastLine is the line number (starting from 1) of the last token processed. // It is tracked in order for newlines to be inserted when a token appears // on a new line. 0 means we haven't started processing any line in the // current source string. int lastLine; }; // DoPreprocessing is a valid ProcessingContext template argument, // which only performs the preprocessing step of compilation. // It places the result in the "string" argument to its constructor. // // This is not an officially supported or fully working path. struct DoPreprocessing { explicit DoPreprocessing(std::string* string): outputString(string) {} bool operator()(TParseContextBase& parseContext, TPpContext& ppContext, TInputScanner& input, bool versionWillBeError, TSymbolTable&, TIntermediate&, EShOptimizationLevel, EShMessages) { // This is a list of tokens that do not require a space before or after. static const std::string noNeededSpaceBeforeTokens = ";)[].,"; static const std::string noNeededSpaceAfterTokens = ".(["; glslang::TPpToken ppToken; parseContext.setScanner(&input); ppContext.setInput(input, versionWillBeError); std::string outputBuffer; SourceLineSynchronizer lineSync( std::bind(&TInputScanner::getLastValidSourceIndex, &input), &outputBuffer); parseContext.setExtensionCallback([&lineSync, &outputBuffer]( int line, const char* extension, const char* behavior) { lineSync.syncToLine(line); outputBuffer += "#extension "; outputBuffer += extension; outputBuffer += " : "; outputBuffer += behavior; }); parseContext.setLineCallback([&lineSync, &outputBuffer, &parseContext]( int curLineNum, int newLineNum, bool hasSource, int sourceNum, const char* sourceName) { // SourceNum is the number of the source-string that is being parsed. lineSync.syncToLine(curLineNum); outputBuffer += "#line "; outputBuffer += std::to_string(newLineNum); if (hasSource) { outputBuffer += ' '; if (sourceName != nullptr) { outputBuffer += '\"'; outputBuffer += sourceName; outputBuffer += '\"'; } else { outputBuffer += std::to_string(sourceNum); } } if (parseContext.lineDirectiveShouldSetNextLine()) { // newLineNum is the new line number for the line following the #line // directive. So the new line number for the current line is newLineNum -= 1; } outputBuffer += '\n'; // And we are at the next line of the #line directive now. lineSync.setLineNum(newLineNum + 1); }); parseContext.setVersionCallback( [&lineSync, &outputBuffer](int line, int version, const char* str) { lineSync.syncToLine(line); outputBuffer += "#version "; outputBuffer += std::to_string(version); if (str) { outputBuffer += ' '; outputBuffer += str; } }); parseContext.setPragmaCallback([&lineSync, &outputBuffer]( int line, const glslang::TVector& ops) { lineSync.syncToLine(line); outputBuffer += "#pragma "; for(size_t i = 0; i < ops.size(); ++i) { outputBuffer += ops[i].c_str(); } }); parseContext.setErrorCallback([&lineSync, &outputBuffer]( int line, const char* errorMessage) { lineSync.syncToLine(line); outputBuffer += "#error "; outputBuffer += errorMessage; }); int lastToken = EndOfInput; // lastToken records the last token processed. std::string lastTokenName; do { int token = ppContext.tokenize(ppToken); if (token == EndOfInput) break; bool isNewString = lineSync.syncToMostRecentString(); bool isNewLine = lineSync.syncToLine(ppToken.loc.line); if (isNewLine) { // Don't emit whitespace onto empty lines. // Copy any whitespace characters at the start of a line // from the input to the output. outputBuffer += std::string(ppToken.loc.column - 1, ' '); } // Output a space in between tokens, but not at the start of a line, // and also not around special tokens. This helps with readability // and consistency. if (!isNewString && !isNewLine && lastToken != EndOfInput) { // left parenthesis need a leading space, except it is in a function-call-like context. // examples: `for (xxx)`, `a * (b + c)`, `vec(2.0)`, `foo(x, y, z)` if (token == '(') { if (lastToken != PpAtomIdentifier || lastTokenName == "if" || lastTokenName == "for" || lastTokenName == "while" || lastTokenName == "switch") outputBuffer += ' '; } else if ((noNeededSpaceBeforeTokens.find((char)token) == std::string::npos) && (noNeededSpaceAfterTokens.find((char)lastToken) == std::string::npos)) { outputBuffer += ' '; } } if (token == PpAtomIdentifier) lastTokenName = ppToken.name; lastToken = token; if (token == PpAtomConstString) outputBuffer += "\""; outputBuffer += ppToken.name; if (token == PpAtomConstString) outputBuffer += "\""; } while (true); outputBuffer += '\n'; *outputString = std::move(outputBuffer); bool success = true; if (parseContext.getNumErrors() > 0) { success = false; parseContext.infoSink.info.prefix(EPrefixError); parseContext.infoSink.info << parseContext.getNumErrors() << " compilation errors. No code generated.\n\n"; } return success; } std::string* outputString; }; // DoFullParse is a valid ProcessingConext template argument for fully // parsing the shader. It populates the "intermediate" with the AST. struct DoFullParse{ bool operator()(TParseContextBase& parseContext, TPpContext& ppContext, TInputScanner& fullInput, bool versionWillBeError, TSymbolTable&, TIntermediate& intermediate, EShOptimizationLevel optLevel, EShMessages messages) { bool success = true; // Parse the full shader. if (! parseContext.parseShaderStrings(ppContext, fullInput, versionWillBeError)) success = false; if (success && intermediate.getTreeRoot()) { if (optLevel == EShOptNoGeneration) parseContext.infoSink.info.message(EPrefixNone, "No errors. No code generation or linking was requested."); else success = intermediate.postProcess(intermediate.getTreeRoot(), parseContext.getLanguage()); } else if (! success) { parseContext.infoSink.info.prefix(EPrefixError); parseContext.infoSink.info << parseContext.getNumErrors() << " compilation errors. No code generated.\n\n"; } if (messages & EShMsgAST) intermediate.output(parseContext.infoSink, true); return success; } }; // Take a single compilation unit, and run the preprocessor on it. // Return: True if there were no issues found in preprocessing, // False if during preprocessing any unknown version, pragmas or // extensions were found. // // NOTE: Doing just preprocessing to obtain a correct preprocessed shader string // is not an officially supported or fully working path. bool PreprocessDeferred( TCompiler* compiler, const char* const shaderStrings[], const int numStrings, const int* inputLengths, const char* const stringNames[], const char* preamble, const EShOptimizationLevel optLevel, const TBuiltInResource* resources, int defaultVersion, // use 100 for ES environment, 110 for desktop EProfile defaultProfile, bool forceDefaultVersionAndProfile, int overrideVersion, // use 0 if not overriding GLSL version bool forwardCompatible, // give errors for use of deprecated features EShMessages messages, // warnings/errors/AST; things to print out TShader::Includer& includer, TIntermediate& intermediate, // returned tree, etc. std::string* outputString, TEnvironment* environment = nullptr) { DoPreprocessing parser(outputString); return ProcessDeferred(compiler, shaderStrings, numStrings, inputLengths, stringNames, preamble, optLevel, resources, defaultVersion, defaultProfile, forceDefaultVersionAndProfile, overrideVersion, forwardCompatible, messages, intermediate, parser, false, includer, "", environment); } // // do a partial compile on the given strings for a single compilation unit // for a potential deferred link into a single stage (and deferred full compile of that // stage through machine-dependent compilation). // // all preprocessing, parsing, semantic checks, etc. for a single compilation unit // are done here. // // return: the tree and other information is filled into the intermediate argument, // and true is returned by the function for success. // bool CompileDeferred( TCompiler* compiler, const char* const shaderStrings[], const int numStrings, const int* inputLengths, const char* const stringNames[], const char* preamble, const EShOptimizationLevel optLevel, const TBuiltInResource* resources, int defaultVersion, // use 100 for ES environment, 110 for desktop EProfile defaultProfile, bool forceDefaultVersionAndProfile, int overrideVersion, // use 0 if not overriding GLSL version bool forwardCompatible, // give errors for use of deprecated features EShMessages messages, // warnings/errors/AST; things to print out TIntermediate& intermediate,// returned tree, etc. TShader::Includer& includer, const std::string sourceEntryPointName = "", TEnvironment* environment = nullptr, bool compileOnly = false) { DoFullParse parser; return ProcessDeferred(compiler, shaderStrings, numStrings, inputLengths, stringNames, preamble, optLevel, resources, defaultVersion, defaultProfile, forceDefaultVersionAndProfile, overrideVersion, forwardCompatible, messages, intermediate, parser, true, includer, sourceEntryPointName, environment, compileOnly); } } // end anonymous namespace for local functions // // ShInitialize() should be called exactly once per process, not per thread. // int ShInitialize() { #ifndef DISABLE_THREAD_SUPPORT const std::lock_guard lock(init_lock); #endif ++NumberOfClients; if (PerProcessGPA == nullptr) PerProcessGPA = new TPoolAllocator(); return 1; } // // Driver calls these to create and destroy compiler/linker // objects. // ShHandle ShConstructCompiler(const EShLanguage language, int /*debugOptions unused*/) { TShHandleBase* base = static_cast(ConstructCompiler(language, 0)); return reinterpret_cast(base); } ShHandle ShConstructLinker(const EShExecutable executable, int /*debugOptions unused*/) { TShHandleBase* base = static_cast(ConstructLinker(executable, 0)); return reinterpret_cast(base); } ShHandle ShConstructUniformMap() { TShHandleBase* base = static_cast(ConstructUniformMap()); return reinterpret_cast(base); } void ShDestruct(ShHandle handle) { if (handle == nullptr) return; TShHandleBase* base = static_cast(handle); if (base->getAsCompiler()) DeleteCompiler(base->getAsCompiler()); else if (base->getAsLinker()) DeleteLinker(base->getAsLinker()); else if (base->getAsUniformMap()) DeleteUniformMap(base->getAsUniformMap()); } // // Cleanup symbol tables // int ShFinalize() { #ifndef DISABLE_THREAD_SUPPORT const std::lock_guard lock(init_lock); #endif --NumberOfClients; assert(NumberOfClients >= 0); if (NumberOfClients > 0) return 1; for (int version = 0; version < VersionCount; ++version) { for (int spvVersion = 0; spvVersion < SpvVersionCount; ++spvVersion) { for (int p = 0; p < ProfileCount; ++p) { for (int source = 0; source < SourceCount; ++source) { for (int stage = 0; stage < EShLangCount; ++stage) { delete SharedSymbolTables[version][spvVersion][p][source][stage]; SharedSymbolTables[version][spvVersion][p][source][stage] = nullptr; } } } } } for (int version = 0; version < VersionCount; ++version) { for (int spvVersion = 0; spvVersion < SpvVersionCount; ++spvVersion) { for (int p = 0; p < ProfileCount; ++p) { for (int source = 0; source < SourceCount; ++source) { for (int pc = 0; pc < EPcCount; ++pc) { delete CommonSymbolTable[version][spvVersion][p][source][pc]; CommonSymbolTable[version][spvVersion][p][source][pc] = nullptr; } } } } } if (PerProcessGPA != nullptr) { delete PerProcessGPA; PerProcessGPA = nullptr; } return 1; } // // Do a full compile on the given strings for a single compilation unit // forming a complete stage. The result of the machine dependent compilation // is left in the provided compile object. // // Return: The return value is really boolean, indicating // success (1) or failure (0). // int ShCompile( const ShHandle handle, const char* const shaderStrings[], const int numStrings, const int* inputLengths, const EShOptimizationLevel optLevel, const TBuiltInResource* resources, int /*debugOptions*/, int defaultVersion, // use 100 for ES environment, 110 for desktop bool forwardCompatible, // give errors for use of deprecated features EShMessages messages, // warnings/errors/AST; things to print out, const char *shaderFileName // the filename ) { // Map the generic handle to the C++ object if (handle == nullptr) return 0; TShHandleBase* base = reinterpret_cast(handle); TCompiler* compiler = base->getAsCompiler(); if (compiler == nullptr) return 0; SetThreadPoolAllocator(compiler->getPool()); compiler->infoSink.info.erase(); compiler->infoSink.debug.erase(); compiler->infoSink.info.setShaderFileName(shaderFileName); compiler->infoSink.debug.setShaderFileName(shaderFileName); TIntermediate intermediate(compiler->getLanguage()); TShader::ForbidIncluder includer; bool success = CompileDeferred(compiler, shaderStrings, numStrings, inputLengths, nullptr, "", optLevel, resources, defaultVersion, ENoProfile, false, 0, forwardCompatible, messages, intermediate, includer); // // Call the machine dependent compiler // if (success && intermediate.getTreeRoot() && optLevel != EShOptNoGeneration) success = compiler->compile(intermediate.getTreeRoot(), intermediate.getVersion(), intermediate.getProfile()); intermediate.removeTree(); // Throw away all the temporary memory used by the compilation process. // The push was done in the CompileDeferred() call above. GetThreadPoolAllocator().pop(); return success ? 1 : 0; } // // Link the given compile objects. // // Return: The return value of is really boolean, indicating // success or failure. // int ShLinkExt( const ShHandle linkHandle, const ShHandle compHandles[], const int numHandles) { if (linkHandle == nullptr || numHandles == 0) return 0; THandleList cObjects; for (int i = 0; i < numHandles; ++i) { if (compHandles[i] == nullptr) return 0; TShHandleBase* base = reinterpret_cast(compHandles[i]); if (base->getAsLinker()) { cObjects.push_back(base->getAsLinker()); } if (base->getAsCompiler()) cObjects.push_back(base->getAsCompiler()); if (cObjects[i] == nullptr) return 0; } TShHandleBase* base = reinterpret_cast(linkHandle); TLinker* linker = static_cast(base->getAsLinker()); if (linker == nullptr) return 0; SetThreadPoolAllocator(linker->getPool()); linker->infoSink.info.erase(); for (int i = 0; i < numHandles; ++i) { if (cObjects[i]->getAsCompiler()) { if (! cObjects[i]->getAsCompiler()->linkable()) { linker->infoSink.info.message(EPrefixError, "Not all shaders have valid object code."); return 0; } } } bool ret = linker->link(cObjects); return ret ? 1 : 0; } // // ShSetEncrpytionMethod is a place-holder for specifying // how source code is encrypted. // void ShSetEncryptionMethod(ShHandle handle) { if (handle == nullptr) return; } // // Return any compiler/linker/uniformmap log of messages for the application. // const char* ShGetInfoLog(const ShHandle handle) { if (handle == nullptr) return nullptr; TShHandleBase* base = static_cast(handle); TInfoSink* infoSink; if (base->getAsCompiler()) infoSink = &(base->getAsCompiler()->getInfoSink()); else if (base->getAsLinker()) infoSink = &(base->getAsLinker()->getInfoSink()); else return nullptr; infoSink->info << infoSink->debug.c_str(); return infoSink->info.c_str(); } // // Return the resulting binary code from the link process. Structure // is machine dependent. // const void* ShGetExecutable(const ShHandle handle) { if (handle == nullptr) return nullptr; TShHandleBase* base = reinterpret_cast(handle); TLinker* linker = static_cast(base->getAsLinker()); if (linker == nullptr) return nullptr; return linker->getObjectCode(); } // // Let the linker know where the application said it's attributes are bound. // The linker does not use these values, they are remapped by the ICD or // hardware. It just needs them to know what's aliased. // // Return: The return value of is really boolean, indicating // success or failure. // int ShSetVirtualAttributeBindings(const ShHandle handle, const ShBindingTable* table) { if (handle == nullptr) return 0; TShHandleBase* base = reinterpret_cast(handle); TLinker* linker = static_cast(base->getAsLinker()); if (linker == nullptr) return 0; linker->setAppAttributeBindings(table); return 1; } // // Let the linker know where the predefined attributes have to live. // int ShSetFixedAttributeBindings(const ShHandle handle, const ShBindingTable* table) { if (handle == nullptr) return 0; TShHandleBase* base = reinterpret_cast(handle); TLinker* linker = static_cast(base->getAsLinker()); if (linker == nullptr) return 0; linker->setFixedAttributeBindings(table); return 1; } // // Some attribute locations are off-limits to the linker... // int ShExcludeAttributes(const ShHandle handle, int *attributes, int count) { if (handle == nullptr) return 0; TShHandleBase* base = reinterpret_cast(handle); TLinker* linker = static_cast(base->getAsLinker()); if (linker == nullptr) return 0; linker->setExcludedAttributes(attributes, count); return 1; } // // Return the index for OpenGL to use for knowing where a uniform lives. // // Return: The return value of is really boolean, indicating // success or failure. // int ShGetUniformLocation(const ShHandle handle, const char* name) { if (handle == nullptr) return -1; TShHandleBase* base = reinterpret_cast(handle); TUniformMap* uniformMap= base->getAsUniformMap(); if (uniformMap == nullptr) return -1; return uniformMap->getLocation(name); } //////////////////////////////////////////////////////////////////////////////////////////// // // Deferred-Lowering C++ Interface // ----------------------------------- // // Below is a new alternate C++ interface that might potentially replace the above // opaque handle-based interface. // // See more detailed comment in ShaderLang.h // namespace glslang { Version GetVersion() { Version version; version.major = GLSLANG_VERSION_MAJOR; version.minor = GLSLANG_VERSION_MINOR; version.patch = GLSLANG_VERSION_PATCH; version.flavor = GLSLANG_VERSION_FLAVOR; return version; } #define QUOTE(s) #s #define STR(n) QUOTE(n) const char* GetEsslVersionString() { return "OpenGL ES GLSL 3.20 glslang Khronos. " STR(GLSLANG_VERSION_MAJOR) "." STR(GLSLANG_VERSION_MINOR) "." STR( GLSLANG_VERSION_PATCH) GLSLANG_VERSION_FLAVOR; } const char* GetGlslVersionString() { return "4.60 glslang Khronos. " STR(GLSLANG_VERSION_MAJOR) "." STR(GLSLANG_VERSION_MINOR) "." STR( GLSLANG_VERSION_PATCH) GLSLANG_VERSION_FLAVOR; } int GetKhronosToolId() { return 8; } bool InitializeProcess() { return ShInitialize() != 0; } void FinalizeProcess() { ShFinalize(); } class TDeferredCompiler : public TCompiler { public: TDeferredCompiler(EShLanguage s, TInfoSink& i) : TCompiler(s, i) { } virtual bool compile(TIntermNode*, int = 0, EProfile = ENoProfile) { return true; } }; TIoMapper* GetGlslIoMapper() { return static_cast(new TGlslIoMapper()); } TShader::TShader(EShLanguage s) : stage(s), lengths(nullptr), stringNames(nullptr), preamble(""), overrideVersion(0) { pool = new TPoolAllocator; infoSink = new TInfoSink; compiler = new TDeferredCompiler(stage, *infoSink); intermediate = new TIntermediate(s); // clear environment (avoid constructors in them for use in a C interface) environment.input.languageFamily = EShSourceNone; environment.input.dialect = EShClientNone; environment.input.vulkanRulesRelaxed = false; environment.client.client = EShClientNone; environment.target.language = EShTargetNone; environment.target.hlslFunctionality1 = false; } TShader::~TShader() { delete infoSink; delete compiler; delete intermediate; delete pool; } void TShader::setStrings(const char* const* s, int n) { strings = s; numStrings = n; lengths = nullptr; } void TShader::setStringsWithLengths(const char* const* s, const int* l, int n) { strings = s; numStrings = n; lengths = l; } void TShader::setStringsWithLengthsAndNames( const char* const* s, const int* l, const char* const* names, int n) { strings = s; numStrings = n; lengths = l; stringNames = names; } void TShader::setEntryPoint(const char* entryPoint) { intermediate->setEntryPointName(entryPoint); } void TShader::setSourceEntryPoint(const char* name) { sourceEntryPointName = name; } // Log initial settings and transforms. // See comment for class TProcesses. void TShader::addProcesses(const std::vector& p) { intermediate->addProcesses(p); } void TShader::setUniqueId(unsigned long long id) { intermediate->setUniqueId(id); } void TShader::setOverrideVersion(int version) { overrideVersion = version; } void TShader::setDebugInfo(bool debugInfo) { intermediate->setDebugInfo(debugInfo); } void TShader::setInvertY(bool invert) { intermediate->setInvertY(invert); } void TShader::setDxPositionW(bool invert) { intermediate->setDxPositionW(invert); } void TShader::setEnhancedMsgs() { intermediate->setEnhancedMsgs(); } void TShader::setNanMinMaxClamp(bool useNonNan) { intermediate->setNanMinMaxClamp(useNonNan); } // Set binding base for given resource type void TShader::setShiftBinding(TResourceType res, unsigned int base) { intermediate->setShiftBinding(res, base); } // Set binding base for given resource type for a given binding set. void TShader::setShiftBindingForSet(TResourceType res, unsigned int base, unsigned int set) { intermediate->setShiftBindingForSet(res, base, set); } // Set binding base for sampler types void TShader::setShiftSamplerBinding(unsigned int base) { setShiftBinding(EResSampler, base); } // Set binding base for texture types (SRV) void TShader::setShiftTextureBinding(unsigned int base) { setShiftBinding(EResTexture, base); } // Set binding base for image types void TShader::setShiftImageBinding(unsigned int base) { setShiftBinding(EResImage, base); } // Set binding base for uniform buffer objects (CBV) void TShader::setShiftUboBinding(unsigned int base) { setShiftBinding(EResUbo, base); } // Synonym for setShiftUboBinding, to match HLSL language. void TShader::setShiftCbufferBinding(unsigned int base) { setShiftBinding(EResUbo, base); } // Set binding base for UAV (unordered access view) void TShader::setShiftUavBinding(unsigned int base) { setShiftBinding(EResUav, base); } // Set binding base for SSBOs void TShader::setShiftSsboBinding(unsigned int base) { setShiftBinding(EResSsbo, base); } // Enables binding automapping using TIoMapper void TShader::setAutoMapBindings(bool map) { intermediate->setAutoMapBindings(map); } // Enables position.Y output negation in vertex shader // Fragile: currently within one stage: simple auto-assignment of location void TShader::setAutoMapLocations(bool map) { intermediate->setAutoMapLocations(map); } void TShader::addUniformLocationOverride(const char* name, int loc) { intermediate->addUniformLocationOverride(name, loc); } void TShader::setUniformLocationBase(int base) { intermediate->setUniformLocationBase(base); } void TShader::setNoStorageFormat(bool useUnknownFormat) { intermediate->setNoStorageFormat(useUnknownFormat); } void TShader::setResourceSetBinding(const std::vector& base) { intermediate->setResourceSetBinding(base); } void TShader::setTextureSamplerTransformMode(EShTextureSamplerTransformMode mode) { intermediate->setTextureSamplerTransformMode(mode); } void TShader::addBlockStorageOverride(const char* nameStr, TBlockStorageClass backing) { intermediate->addBlockStorageOverride(nameStr, backing); } void TShader::setGlobalUniformBlockName(const char* name) { intermediate->setGlobalUniformBlockName(name); } void TShader::setGlobalUniformSet(unsigned int set) { intermediate->setGlobalUniformSet(set); } void TShader::setGlobalUniformBinding(unsigned int binding) { intermediate->setGlobalUniformBinding(binding); } void TShader::setAtomicCounterBlockName(const char* name) { intermediate->setAtomicCounterBlockName(name); } void TShader::setAtomicCounterBlockSet(unsigned int set) { intermediate->setAtomicCounterBlockSet(set); } void TShader::addSourceText(const char* text, size_t len) { intermediate->addSourceText(text, len); } void TShader::setSourceFile(const char* file) { intermediate->setSourceFile(file); } #ifdef ENABLE_HLSL // See comment above TDefaultHlslIoMapper in iomapper.cpp: void TShader::setHlslIoMapping(bool hlslIoMap) { intermediate->setHlslIoMapping(hlslIoMap); } void TShader::setFlattenUniformArrays(bool flatten) { intermediate->setFlattenUniformArrays(flatten); } #endif // // Turn the shader strings into a parse tree in the TIntermediate. // // Returns true for success. // bool TShader::parse(const TBuiltInResource* builtInResources, int defaultVersion, EProfile defaultProfile, bool forceDefaultVersionAndProfile, bool forwardCompatible, EShMessages messages, Includer& includer) { SetThreadPoolAllocator(pool); if (! preamble) preamble = ""; return CompileDeferred(compiler, strings, numStrings, lengths, stringNames, preamble, EShOptNone, builtInResources, defaultVersion, defaultProfile, forceDefaultVersionAndProfile, overrideVersion, forwardCompatible, messages, *intermediate, includer, sourceEntryPointName, &environment, compileOnly); } // Fill in a string with the result of preprocessing ShaderStrings // Returns true if all extensions, pragmas and version strings were valid. // // NOTE: Doing just preprocessing to obtain a correct preprocessed shader string // is not an officially supported or fully working path. bool TShader::preprocess(const TBuiltInResource* builtInResources, int defaultVersion, EProfile defaultProfile, bool forceDefaultVersionAndProfile, bool forwardCompatible, EShMessages message, std::string* output_string, Includer& includer) { SetThreadPoolAllocator(pool); if (! preamble) preamble = ""; return PreprocessDeferred(compiler, strings, numStrings, lengths, stringNames, preamble, EShOptNone, builtInResources, defaultVersion, defaultProfile, forceDefaultVersionAndProfile, overrideVersion, forwardCompatible, message, includer, *intermediate, output_string, &environment); } const char* TShader::getInfoLog() { return infoSink->info.c_str(); } const char* TShader::getInfoDebugLog() { return infoSink->debug.c_str(); } TProgram::TProgram() : reflection(nullptr), linked(false) { pool = new TPoolAllocator; infoSink = new TInfoSink; for (int s = 0; s < EShLangCount; ++s) { intermediate[s] = nullptr; newedIntermediate[s] = false; } } TProgram::~TProgram() { delete infoSink; delete reflection; for (int s = 0; s < EShLangCount; ++s) if (newedIntermediate[s]) delete intermediate[s]; delete pool; } // // Merge the compilation units within each stage into a single TIntermediate. // All starting compilation units need to be the result of calling TShader::parse(). // // Return true for success. // bool TProgram::link(EShMessages messages) { if (linked) return false; linked = true; bool error = false; SetThreadPoolAllocator(pool); for (int s = 0; s < EShLangCount; ++s) { if (! linkStage((EShLanguage)s, messages)) error = true; } if (!error) { if (! crossStageCheck(messages)) error = true; } if (messages & EShMsgAST) { for (int s = 0; s < EShLangCount; ++s) { if (intermediate[s] == nullptr) continue; intermediate[s]->output(*infoSink, true); } } return ! error; } // // Merge the compilation units within the given stage into a single TIntermediate. // // Return true for success. // bool TProgram::linkStage(EShLanguage stage, EShMessages messages) { if (stages[stage].size() == 0) return true; int numEsShaders = 0, numNonEsShaders = 0; for (auto it = stages[stage].begin(); it != stages[stage].end(); ++it) { if ((*it)->intermediate->getProfile() == EEsProfile) { numEsShaders++; } else { numNonEsShaders++; } } if (numEsShaders > 0 && numNonEsShaders > 0) { infoSink->info.message(EPrefixError, "Cannot mix ES profile with non-ES profile shaders"); return false; } else if (numEsShaders > 1) { infoSink->info.message(EPrefixError, "Cannot attach multiple ES shaders of the same type to a single program"); return false; } // // Be efficient for the common single compilation unit per stage case, // reusing it's TIntermediate instead of merging into a new one. // TIntermediate *firstIntermediate = stages[stage].front()->intermediate; if (stages[stage].size() == 1) intermediate[stage] = firstIntermediate; else { intermediate[stage] = new TIntermediate(stage, firstIntermediate->getVersion(), firstIntermediate->getProfile()); intermediate[stage]->setLimits(firstIntermediate->getLimits()); if (firstIntermediate->getEnhancedMsgs()) intermediate[stage]->setEnhancedMsgs(); // The new TIntermediate must use the same origin as the original TIntermediates. // Otherwise linking will fail due to different coordinate systems. if (firstIntermediate->getOriginUpperLeft()) { intermediate[stage]->setOriginUpperLeft(); } intermediate[stage]->setSpv(firstIntermediate->getSpv()); newedIntermediate[stage] = true; } if (messages & EShMsgAST) infoSink->info << "\nLinked " << StageName(stage) << " stage:\n\n"; if (stages[stage].size() > 1) { std::list::const_iterator it; for (it = stages[stage].begin(); it != stages[stage].end(); ++it) intermediate[stage]->merge(*infoSink, *(*it)->intermediate); } intermediate[stage]->finalCheck(*infoSink, (messages & EShMsgKeepUncalled) != 0); return intermediate[stage]->getNumErrors() == 0; } // // Check that there are no errors in linker objects accross stages // // Return true if no errors. // bool TProgram::crossStageCheck(EShMessages messages) { // make temporary intermediates to hold the linkage symbols for each linking interface // while we do the checks // Independent interfaces are: // all uniform variables and blocks // all buffer blocks // all in/out on a stage boundary TVector activeStages; for (int s = 0; s < EShLangCount; ++s) { if (intermediate[s]) activeStages.push_back(intermediate[s]); } class TFinalLinkTraverser : public TIntermTraverser { public: TFinalLinkTraverser() { } virtual ~TFinalLinkTraverser() { } virtual void visitSymbol(TIntermSymbol* symbol) { // Implicitly size arrays. // If an unsized array is left as unsized, it effectively // becomes run-time sized. symbol->getWritableType().adoptImplicitArraySizes(false); } } finalLinkTraverser; // no extra linking if there is only one stage if (! (activeStages.size() > 1)) { if (activeStages.size() == 1 && activeStages[0]->getTreeRoot()) { activeStages[0]->getTreeRoot()->traverse(&finalLinkTraverser); } return true; } // setup temporary tree to hold unfirom objects from different stages TIntermediate* firstIntermediate = activeStages.front(); TIntermediate uniforms(EShLangCount, firstIntermediate->getVersion(), firstIntermediate->getProfile()); uniforms.setSpv(firstIntermediate->getSpv()); TIntermAggregate uniformObjects(EOpLinkerObjects); TIntermAggregate root(EOpSequence); root.getSequence().push_back(&uniformObjects); uniforms.setTreeRoot(&root); bool error = false; // merge uniforms from all stages into a single intermediate for (unsigned int i = 0; i < activeStages.size(); ++i) { uniforms.mergeUniformObjects(*infoSink, *activeStages[i]); } error |= uniforms.getNumErrors() != 0; // update implicit array sizes across shader stages for (unsigned int i = 0; i < activeStages.size(); ++i) { activeStages[i]->mergeImplicitArraySizes(*infoSink, uniforms); activeStages[i]->getTreeRoot()->traverse(&finalLinkTraverser); } // copy final definition of global block back into each stage for (unsigned int i = 0; i < activeStages.size(); ++i) { // We only want to merge into already existing global uniform blocks. // A stage that doesn't already know about the global doesn't care about it's content. // Otherwise we end up pointing to the same object between different stages // and that will break binding/set remappings bool mergeExistingOnly = true; activeStages[i]->mergeGlobalUniformBlocks(*infoSink, uniforms, mergeExistingOnly); } // compare cross stage symbols for each stage boundary for (unsigned int i = 1; i < activeStages.size(); ++i) { activeStages[i - 1]->checkStageIO(*infoSink, *activeStages[i], messages); error |= (activeStages[i - 1]->getNumErrors() != 0 || activeStages[i]->getNumErrors() != 0); } // if requested, optimize cross stage IO if (messages & EShMsgLinkTimeOptimization) { for (unsigned int i = 1; i < activeStages.size(); ++i) { activeStages[i - 1]->optimizeStageIO(*infoSink, *activeStages[i]); } } return !error; } const char* TProgram::getInfoLog() { return infoSink->info.c_str(); } const char* TProgram::getInfoDebugLog() { return infoSink->debug.c_str(); } // // Reflection implementation. // unsigned int TObjectReflection::layoutLocation() const { return type->getQualifier().layoutLocation; } bool TProgram::buildReflection(int opts) { if (! linked || reflection != nullptr) return false; SetThreadPoolAllocator(pool); int firstStage = EShLangVertex, lastStage = EShLangFragment; if (opts & EShReflectionIntermediateIO) { // if we're reflecting intermediate I/O, determine the first and last stage linked and use those as the // boundaries for which stages generate pipeline inputs/outputs firstStage = EShLangCount; lastStage = 0; for (int s = 0; s < EShLangCount; ++s) { if (intermediate[s]) { firstStage = std::min(firstStage, s); lastStage = std::max(lastStage, s); } } } reflection = new TReflection((EShReflectionOptions)opts, (EShLanguage)firstStage, (EShLanguage)lastStage); for (int s = 0; s < EShLangCount; ++s) { if (intermediate[s]) { if (! reflection->addStage((EShLanguage)s, *intermediate[s])) return false; } } return true; } unsigned TProgram::getLocalSize(int dim) const { return reflection->getLocalSize(dim); } unsigned TProgram::getTileShadingRateQCOM(int dim) const { return reflection->getTileShadingRateQCOM(dim); } int TProgram::getReflectionIndex(const char* name) const { return reflection->getIndex(name); } int TProgram::getReflectionPipeIOIndex(const char* name, const bool inOrOut) const { return reflection->getPipeIOIndex(name, inOrOut); } int TProgram::getNumUniformVariables() const { return reflection->getNumUniforms(); } const TObjectReflection& TProgram::getUniform(int index) const { return reflection->getUniform(index); } int TProgram::getNumUniformBlocks() const { return reflection->getNumUniformBlocks(); } const TObjectReflection& TProgram::getUniformBlock(int index) const { return reflection->getUniformBlock(index); } int TProgram::getNumPipeInputs() const { return reflection->getNumPipeInputs(); } const TObjectReflection& TProgram::getPipeInput(int index) const { return reflection->getPipeInput(index); } int TProgram::getNumPipeOutputs() const { return reflection->getNumPipeOutputs(); } const TObjectReflection& TProgram::getPipeOutput(int index) const { return reflection->getPipeOutput(index); } int TProgram::getNumBufferVariables() const { return reflection->getNumBufferVariables(); } const TObjectReflection& TProgram::getBufferVariable(int index) const { return reflection->getBufferVariable(index); } int TProgram::getNumBufferBlocks() const { return reflection->getNumStorageBuffers(); } const TObjectReflection& TProgram::getBufferBlock(int index) const { return reflection->getStorageBufferBlock(index); } int TProgram::getNumAtomicCounters() const { return reflection->getNumAtomicCounters(); } const TObjectReflection& TProgram::getAtomicCounter(int index) const { return reflection->getAtomicCounter(index); } void TProgram::dumpReflection() { if (reflection != nullptr) reflection->dump(); } TIoMapResolver* TProgram::getGlslIoResolver(EShLanguage stage) { auto *intermediate = getIntermediate(stage); if (!intermediate) return NULL; return static_cast(new TDefaultGlslIoResolver(*intermediate)); } // // I/O mapping implementation. // bool TProgram::mapIO(TIoMapResolver* pResolver, TIoMapper* pIoMapper) { if (! linked) return false; SetThreadPoolAllocator(pool); TIoMapper* ioMapper = nullptr; TIoMapper defaultIOMapper; if (pIoMapper == nullptr) ioMapper = &defaultIOMapper; else ioMapper = pIoMapper; for (int s = 0; s < EShLangCount; ++s) { if (intermediate[s]) { if (! ioMapper->addStage((EShLanguage)s, *intermediate[s], *infoSink, pResolver)) return false; } } return ioMapper->doMap(pResolver, *infoSink); } } // end namespace glslang ================================================ FILE: src/libraries/glslang/glslang/MachineIndependent/SpirvIntrinsics.cpp ================================================ // // Copyright(C) 2021 Advanced Micro Devices, Inc. // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following // disclaimer in the documentation and/or other materials provided // with the distribution. // // Neither the name of 3Dlabs Inc. Ltd. nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // // // GL_EXT_spirv_intrinsics // #include "../Include/intermediate.h" #include "../Include/SpirvIntrinsics.h" #include "../Include/Types.h" #include "ParseHelper.h" namespace glslang { bool TSpirvTypeParameter::operator==(const TSpirvTypeParameter& rhs) const { if (getAsConstant() != nullptr) return getAsConstant()->getConstArray() == rhs.getAsConstant()->getConstArray(); assert(getAsType() != nullptr); return *getAsType() == *rhs.getAsType(); } // // Handle SPIR-V requirements // TSpirvRequirement* TParseContext::makeSpirvRequirement(const TSourceLoc& loc, const TString& name, const TIntermAggregate* extensions, const TIntermAggregate* capabilities) { TSpirvRequirement* spirvReq = new TSpirvRequirement; if (name == "extensions") { assert(extensions); for (auto extension : extensions->getSequence()) { assert(extension->getAsConstantUnion()); spirvReq->extensions.insert(*extension->getAsConstantUnion()->getConstArray()[0].getSConst()); } } else if (name == "capabilities") { assert(capabilities); for (auto capability : capabilities->getSequence()) { assert(capability->getAsConstantUnion()); spirvReq->capabilities.insert(capability->getAsConstantUnion()->getConstArray()[0].getIConst()); } } else error(loc, "unknown SPIR-V requirement", name.c_str(), ""); return spirvReq; } TSpirvRequirement* TParseContext::mergeSpirvRequirements(const TSourceLoc& loc, TSpirvRequirement* spirvReq1, TSpirvRequirement* spirvReq2) { // Merge the second SPIR-V requirement to the first one if (!spirvReq2->extensions.empty()) { if (spirvReq1->extensions.empty()) spirvReq1->extensions = spirvReq2->extensions; else error(loc, "too many SPIR-V requirements", "extensions", ""); } if (!spirvReq2->capabilities.empty()) { if (spirvReq1->capabilities.empty()) spirvReq1->capabilities = spirvReq2->capabilities; else error(loc, "too many SPIR-V requirements", "capabilities", ""); } return spirvReq1; } void TIntermediate::insertSpirvRequirement(const TSpirvRequirement* spirvReq) { if (!spirvRequirement) spirvRequirement = new TSpirvRequirement; for (auto extension : spirvReq->extensions) spirvRequirement->extensions.insert(extension); for (auto capability : spirvReq->capabilities) spirvRequirement->capabilities.insert(capability); } // // Handle SPIR-V execution modes // void TIntermediate::insertSpirvExecutionMode(int executionMode, const TIntermAggregate* args) { if (!spirvExecutionMode) spirvExecutionMode = new TSpirvExecutionMode; TVector extraOperands; if (args) { for (auto arg : args->getSequence()) { auto extraOperand = arg->getAsConstantUnion(); assert(extraOperand != nullptr); extraOperands.push_back(extraOperand); } } spirvExecutionMode->modes[executionMode] = extraOperands; } void TIntermediate::insertSpirvExecutionModeId(int executionMode, const TIntermAggregate* args) { if (!spirvExecutionMode) spirvExecutionMode = new TSpirvExecutionMode; assert(args); TVector extraOperands; for (auto arg : args->getSequence()) { auto extraOperand = arg->getAsTyped(); assert(extraOperand != nullptr && extraOperand->getQualifier().isConstant()); extraOperands.push_back(extraOperand); } spirvExecutionMode->modeIds[executionMode] = extraOperands; } // // Handle SPIR-V decorate qualifiers // void TQualifier::setSpirvDecorate(int decoration, const TIntermAggregate* args) { if (!spirvDecorate) spirvDecorate = new TSpirvDecorate; TVector extraOperands; if (args) { for (auto arg : args->getSequence()) { auto extraOperand = arg->getAsConstantUnion(); assert(extraOperand != nullptr); extraOperands.push_back(extraOperand); } } spirvDecorate->decorates[decoration] = extraOperands; } void TQualifier::setSpirvDecorateId(int decoration, const TIntermAggregate* args) { if (!spirvDecorate) spirvDecorate = new TSpirvDecorate; assert(args); TVector extraOperands; for (auto arg : args->getSequence()) { auto extraOperand = arg->getAsTyped(); assert(extraOperand != nullptr); extraOperands.push_back(extraOperand); } spirvDecorate->decorateIds[decoration] = extraOperands; } void TQualifier::setSpirvDecorateString(int decoration, const TIntermAggregate* args) { if (!spirvDecorate) spirvDecorate = new TSpirvDecorate; assert(args); TVector extraOperands; for (auto arg : args->getSequence()) { auto extraOperand = arg->getAsConstantUnion(); assert(extraOperand != nullptr); extraOperands.push_back(extraOperand); } spirvDecorate->decorateStrings[decoration] = extraOperands; } TString TQualifier::getSpirvDecorateQualifierString() const { assert(spirvDecorate); TString qualifierString; const auto appendFloat = [&](float f) { qualifierString.append(std::to_string(f).c_str()); }; const auto appendInt = [&](int i) { qualifierString.append(std::to_string(i).c_str()); }; const auto appendUint = [&](unsigned int u) { qualifierString.append(std::to_string(u).c_str()); }; const auto appendBool = [&](bool b) { qualifierString.append(std::to_string(b).c_str()); }; const auto appendStr = [&](const char* s) { qualifierString.append(s); }; const auto appendDecorate = [&](const TIntermTyped* constant) { if (constant->getAsConstantUnion()) { auto& constArray = constant->getAsConstantUnion()->getConstArray(); if (constant->getBasicType() == EbtFloat) { float value = static_cast(constArray[0].getDConst()); appendFloat(value); } else if (constant->getBasicType() == EbtInt) { int value = constArray[0].getIConst(); appendInt(value); } else if (constant->getBasicType() == EbtUint) { unsigned value = constArray[0].getUConst(); appendUint(value); } else if (constant->getBasicType() == EbtBool) { bool value = constArray[0].getBConst(); appendBool(value); } else if (constant->getBasicType() == EbtString) { const TString* value = constArray[0].getSConst(); appendStr(value->c_str()); } else assert(0); } else { assert(constant->getAsSymbolNode()); appendStr(constant->getAsSymbolNode()->getName().c_str()); } }; for (auto& decorate : spirvDecorate->decorates) { appendStr("spirv_decorate("); appendInt(decorate.first); for (auto extraOperand : decorate.second) { appendStr(", "); appendDecorate(extraOperand); } appendStr(") "); } for (auto& decorateId : spirvDecorate->decorateIds) { appendStr("spirv_decorate_id("); appendInt(decorateId.first); for (auto extraOperand : decorateId.second) { appendStr(", "); appendDecorate(extraOperand); } appendStr(") "); } for (auto& decorateString : spirvDecorate->decorateStrings) { appendStr("spirv_decorate_string("); appendInt(decorateString.first); for (auto extraOperand : decorateString.second) { appendStr(", "); appendDecorate(extraOperand); } appendStr(") "); } return qualifierString; } // // Handle SPIR-V type specifiers // void TPublicType::setSpirvType(const TSpirvInstruction& spirvInst, const TSpirvTypeParameters* typeParams) { if (!spirvType) spirvType = new TSpirvType; basicType = EbtSpirvType; spirvType->spirvInst = spirvInst; if (typeParams) spirvType->typeParams = *typeParams; } TSpirvTypeParameters* TParseContext::makeSpirvTypeParameters(const TSourceLoc& loc, const TIntermConstantUnion* constant) { TSpirvTypeParameters* spirvTypeParams = new TSpirvTypeParameters; if (constant->getBasicType() != EbtFloat && constant->getBasicType() != EbtInt && constant->getBasicType() != EbtUint && constant->getBasicType() != EbtBool && constant->getBasicType() != EbtString) error(loc, "this type not allowed", constant->getType().getBasicString(), ""); else spirvTypeParams->push_back(TSpirvTypeParameter(constant)); return spirvTypeParams; } TSpirvTypeParameters* TParseContext::makeSpirvTypeParameters(const TSourceLoc& /* loc */, const TPublicType& type) { TSpirvTypeParameters* spirvTypeParams = new TSpirvTypeParameters; spirvTypeParams->push_back(TSpirvTypeParameter(new TType(type))); return spirvTypeParams; } TSpirvTypeParameters* TParseContext::mergeSpirvTypeParameters(TSpirvTypeParameters* spirvTypeParams1, TSpirvTypeParameters* spirvTypeParams2) { // Merge SPIR-V type parameters of the second one to the first one for (const auto& spirvTypeParam : *spirvTypeParams2) spirvTypeParams1->push_back(spirvTypeParam); return spirvTypeParams1; } // // Handle SPIR-V instruction qualifiers // TSpirvInstruction* TParseContext::makeSpirvInstruction(const TSourceLoc& loc, const TString& name, const TString& value) { TSpirvInstruction* spirvInst = new TSpirvInstruction; if (name == "set") spirvInst->set = value; else error(loc, "unknown SPIR-V instruction qualifier", name.c_str(), ""); return spirvInst; } TSpirvInstruction* TParseContext::makeSpirvInstruction(const TSourceLoc& loc, const TString& name, int value) { TSpirvInstruction* spirvInstuction = new TSpirvInstruction; if (name == "id") spirvInstuction->id = value; else error(loc, "unknown SPIR-V instruction qualifier", name.c_str(), ""); return spirvInstuction; } TSpirvInstruction* TParseContext::mergeSpirvInstruction(const TSourceLoc& loc, TSpirvInstruction* spirvInst1, TSpirvInstruction* spirvInst2) { // Merge qualifiers of the second SPIR-V instruction to those of the first one if (!spirvInst2->set.empty()) { if (spirvInst1->set.empty()) spirvInst1->set = spirvInst2->set; else error(loc, "too many SPIR-V instruction qualifiers", "spirv_instruction", "(set)"); } if (spirvInst2->id != -1) { if (spirvInst1->id == -1) spirvInst1->id = spirvInst2->id; else error(loc, "too many SPIR-V instruction qualifiers", "spirv_instruction", "(id)"); } return spirvInst1; } } // end namespace glslang ================================================ FILE: src/libraries/glslang/glslang/MachineIndependent/SymbolTable.cpp ================================================ // // Copyright (C) 2002-2005 3Dlabs Inc. Ltd. // Copyright (C) 2012-2013 LunarG, Inc. // Copyright (C) 2017 ARM Limited. // Copyright (C) 2015-2018 Google, Inc. // Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights reserved. // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following // disclaimer in the documentation and/or other materials provided // with the distribution. // // Neither the name of 3Dlabs Inc. Ltd. nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // // // Symbol table for parsing. Most functionality and main ideas // are documented in the header file. // #include "SymbolTable.h" namespace glslang { // // TType helper function needs a place to live. // // // Recursively generate mangled names. // void TType::buildMangledName(TString& mangledName) const { if (isMatrix()) mangledName += 'm'; else if (isVector()) mangledName += 'v'; if (isCoopVecNV()) mangledName += "coopvec"; switch (basicType) { case EbtFloat: mangledName += 'f'; break; case EbtInt: mangledName += 'i'; break; case EbtUint: mangledName += 'u'; break; case EbtBool: mangledName += 'b'; break; case EbtDouble: mangledName += 'd'; break; case EbtFloat16: mangledName += "f16"; break; case EbtBFloat16: mangledName += "bf16"; break; case EbtFloatE5M2: mangledName += "fe5m2"; break; case EbtFloatE4M3: mangledName += "fe4m3"; break; case EbtInt8: mangledName += "i8"; break; case EbtUint8: mangledName += "u8"; break; case EbtInt16: mangledName += "i16"; break; case EbtUint16: mangledName += "u16"; break; case EbtInt64: mangledName += "i64"; break; case EbtUint64: mangledName += "u64"; break; case EbtAtomicUint: mangledName += "au"; break; case EbtAccStruct: mangledName += "as"; break; case EbtRayQuery: mangledName += "rq"; break; case EbtSpirvType: mangledName += "spv-t"; break; case EbtHitObjectNV: mangledName += "ho"; break; case EbtTensorLayoutNV: mangledName += "tl"; break; case EbtTensorViewNV: mangledName += "tv"; break; case EbtSampler: switch (sampler.type) { case EbtFloat16: mangledName += "f16"; break; case EbtInt: mangledName += "i"; break; case EbtUint: mangledName += "u"; break; case EbtInt64: mangledName += "i64"; break; case EbtUint64: mangledName += "u64"; break; default: break; // some compilers want this } if (sampler.isImageClass()) mangledName += "I"; // a normal image or subpass else if (sampler.isPureSampler()) mangledName += "p"; // a "pure" sampler else if (!sampler.isCombined()) mangledName += "t"; // a "pure" texture else mangledName += "s"; // traditional combined sampler if (sampler.isArrayed()) mangledName += "A"; if (sampler.isShadow()) mangledName += "S"; if (sampler.isExternal()) mangledName += "E"; if (sampler.isYuv()) mangledName += "Y"; switch (sampler.dim) { case Esd2D: mangledName += "2"; break; case Esd3D: mangledName += "3"; break; case EsdCube: mangledName += "C"; break; case Esd1D: mangledName += "1"; break; case EsdRect: mangledName += "R2"; break; case EsdBuffer: mangledName += "B"; break; case EsdSubpass: mangledName += "P"; break; default: break; // some compilers want this } #ifdef ENABLE_HLSL if (sampler.hasReturnStruct()) { // Name mangle for sampler return struct uses struct table index. mangledName += "-tx-struct"; char text[16]; // plenty enough space for the small integers. snprintf(text, sizeof(text), "%u-", sampler.getStructReturnIndex()); mangledName += text; } else { switch (sampler.getVectorSize()) { case 1: mangledName += "1"; break; case 2: mangledName += "2"; break; case 3: mangledName += "3"; break; case 4: break; // default to prior name mangle behavior } } #endif if (sampler.isMultiSample()) mangledName += "M"; break; case EbtStruct: case EbtBlock: if (basicType == EbtStruct) mangledName += "struct-"; else mangledName += "block-"; if (typeName) mangledName += *typeName; for (unsigned int i = 0; i < structure->size(); ++i) { if ((*structure)[i].type->getBasicType() == EbtVoid) continue; mangledName += '-'; (*structure)[i].type->buildMangledName(mangledName); } break; default: break; } if (getVectorSize() > 0) mangledName += static_cast('0' + getVectorSize()); else { mangledName += static_cast('0' + getMatrixCols()); mangledName += static_cast('0' + getMatrixRows()); } if (typeParameters) { const int maxSize = 11; char buf[maxSize]; for (int i = 0; i < typeParameters->arraySizes->getNumDims(); ++i) { if (typeParameters->arraySizes->getDimNode(i)) { if (typeParameters->arraySizes->getDimNode(i)->getAsSymbolNode()) snprintf(buf, maxSize, "s%lld", typeParameters->arraySizes->getDimNode(i)->getAsSymbolNode()->getId()); else snprintf(buf, maxSize, "s%p", typeParameters->arraySizes->getDimNode(i)); } else snprintf(buf, maxSize, "%d", typeParameters->arraySizes->getDimSize(i)); mangledName += '<'; mangledName += buf; mangledName += '>'; } } if (arraySizes) { const int maxSize = 11; char buf[maxSize]; for (int i = 0; i < arraySizes->getNumDims(); ++i) { if (arraySizes->getDimNode(i)) { if (arraySizes->getDimNode(i)->getAsSymbolNode()) snprintf(buf, maxSize, "s%lld", arraySizes->getDimNode(i)->getAsSymbolNode()->getId()); else snprintf(buf, maxSize, "s%p", (void*)(arraySizes->getDimNode(i))); } else snprintf(buf, maxSize, "%d", arraySizes->getDimSize(i)); mangledName += '['; mangledName += buf; mangledName += ']'; } } } // // Dump functions. // void TSymbol::dumpExtensions(TInfoSink& infoSink) const { int numExtensions = getNumExtensions(); if (numExtensions) { infoSink.debug << " <"; for (int i = 0; i < numExtensions; i++) infoSink.debug << getExtensions()[i] << ","; infoSink.debug << ">"; } } void TVariable::dump(TInfoSink& infoSink, bool complete) const { if (complete) { infoSink.debug << getName().c_str() << ": " << type.getCompleteString(); dumpExtensions(infoSink); } else { infoSink.debug << getName().c_str() << ": " << type.getStorageQualifierString() << " " << type.getBasicTypeString(); if (type.isArray()) infoSink.debug << "[0]"; } infoSink.debug << "\n"; } void TFunction::dump(TInfoSink& infoSink, bool complete) const { if (complete) { infoSink.debug << getName().c_str() << ": " << returnType.getCompleteString() << " " << getName().c_str() << "("; int numParams = getParamCount(); for (int i = 0; i < numParams; i++) { const TParameter ¶m = parameters[i]; infoSink.debug << param.type->getCompleteString() << " " << (param.type->isStruct() ? "of " + param.type->getTypeName() + " " : "") << (param.name ? *param.name : "") << (i < numParams - 1 ? "," : ""); } infoSink.debug << ")"; dumpExtensions(infoSink); } else { infoSink.debug << getName().c_str() << ": " << returnType.getBasicTypeString() << " " << getMangledName().c_str() << "n"; } infoSink.debug << "\n"; } void TAnonMember::dump(TInfoSink& TInfoSink, bool) const { TInfoSink.debug << "anonymous member " << getMemberNumber() << " of " << getAnonContainer().getName().c_str() << "\n"; } void TSymbolTableLevel::dump(TInfoSink& infoSink, bool complete) const { tLevel::const_iterator it; for (it = level.begin(); it != level.end(); ++it) (*it).second->dump(infoSink, complete); } void TSymbolTable::dump(TInfoSink& infoSink, bool complete) const { for (int level = currentLevel(); level >= 0; --level) { infoSink.debug << "LEVEL " << level << "\n"; table[level]->dump(infoSink, complete); } } // // Functions have buried pointers to delete. // TFunction::~TFunction() { for (TParamList::iterator i = parameters.begin(); i != parameters.end(); ++i) delete (*i).type; } // // Symbol table levels are a map of pointers to symbols that have to be deleted. // TSymbolTableLevel::~TSymbolTableLevel() { for (tLevel::iterator it = level.begin(); it != level.end(); ++it) { const TString& name = it->first; auto retargetIter = std::find_if(retargetedSymbols.begin(), retargetedSymbols.end(), [&name](const std::pair& i) { return i.first == name; }); if (retargetIter == retargetedSymbols.end()) delete (*it).second; } delete [] defaultPrecision; } // // Change all function entries in the table with the non-mangled name // to be related to the provided built-in operation. // void TSymbolTableLevel::relateToOperator(const char* name, TOperator op) { tLevel::const_iterator candidate = level.lower_bound(name); while (candidate != level.end()) { const TString& candidateName = (*candidate).first; TString::size_type parenAt = candidateName.find_first_of('('); if (parenAt != candidateName.npos && candidateName.compare(0, parenAt, name) == 0) { TFunction* function = (*candidate).second->getAsFunction(); function->relateToOperator(op); } else break; ++candidate; } } // Make all function overloads of the given name require an extension(s). // Should only be used for a version/profile that actually needs the extension(s). void TSymbolTableLevel::setFunctionExtensions(const char* name, int num, const char* const extensions[]) { tLevel::const_iterator candidate = level.lower_bound(name); while (candidate != level.end()) { const TString& candidateName = (*candidate).first; TString::size_type parenAt = candidateName.find_first_of('('); if (parenAt != candidateName.npos && candidateName.compare(0, parenAt, name) == 0) { TSymbol* symbol = candidate->second; symbol->setExtensions(num, extensions); } else break; ++candidate; } } // Make a single function require an extension(s). i.e., this will only set the extensions for the symbol that matches 'name' exactly. // This is different from setFunctionExtensions, which uses std::map::lower_bound to effectively set all symbols that start with 'name'. // Should only be used for a version/profile that actually needs the extension(s). void TSymbolTableLevel::setSingleFunctionExtensions(const char* name, int num, const char* const extensions[]) { if (auto candidate = level.find(name); candidate != level.end()) { candidate->second->setExtensions(num, extensions); } } // // Make all symbols in this table level read only. // void TSymbolTableLevel::readOnly() { for (tLevel::iterator it = level.begin(); it != level.end(); ++it) (*it).second->makeReadOnly(); } // // Copy a symbol, but the copy is writable; call readOnly() afterward if that's not desired. // TSymbol::TSymbol(const TSymbol& copyOf) { name = NewPoolTString(copyOf.name->c_str()); mangledName = NewPoolTString(copyOf.mangledName->c_str()); uniqueId = copyOf.uniqueId; writable = true; } TVariable::TVariable(const TVariable& copyOf) : TSymbol(copyOf) { type.deepCopy(copyOf.type); userType = copyOf.userType; // we don't support specialization-constant subtrees in cloned tables, only extensions constSubtree = nullptr; extensions = nullptr; memberExtensions = nullptr; if (copyOf.getNumExtensions() > 0) setExtensions(copyOf.getNumExtensions(), copyOf.getExtensions()); if (copyOf.hasMemberExtensions()) { for (int m = 0; m < (int)copyOf.type.getStruct()->size(); ++m) { if (copyOf.getNumMemberExtensions(m) > 0) setMemberExtensions(m, copyOf.getNumMemberExtensions(m), copyOf.getMemberExtensions(m)); } } if (! copyOf.constArray.empty()) { assert(! copyOf.type.isStruct()); TConstUnionArray newArray(copyOf.constArray, 0, copyOf.constArray.size()); constArray = newArray; } } TVariable* TVariable::clone() const { TVariable *variable = new TVariable(*this); return variable; } TFunction::TFunction(const TFunction& copyOf) : TSymbol(copyOf) { for (unsigned int i = 0; i < copyOf.parameters.size(); ++i) { TParameter param{}; parameters.push_back(param); (void)parameters.back().copyParam(copyOf.parameters[i]); } extensions = nullptr; if (copyOf.getNumExtensions() > 0) setExtensions(copyOf.getNumExtensions(), copyOf.getExtensions()); returnType.deepCopy(copyOf.returnType); mangledName = copyOf.mangledName; op = copyOf.op; defined = copyOf.defined; prototyped = copyOf.prototyped; implicitThis = copyOf.implicitThis; illegalImplicitThis = copyOf.illegalImplicitThis; defaultParamCount = copyOf.defaultParamCount; spirvInst = copyOf.spirvInst; } TFunction* TFunction::clone() const { TFunction *function = new TFunction(*this); return function; } TAnonMember* TAnonMember::clone() const { // Anonymous members of a given block should be cloned at a higher level, // where they can all be assured to still end up pointing to a single // copy of the original container. assert(0); return nullptr; } TSymbolTableLevel* TSymbolTableLevel::clone() const { TSymbolTableLevel *symTableLevel = new TSymbolTableLevel(); symTableLevel->anonId = anonId; symTableLevel->thisLevel = thisLevel; symTableLevel->retargetedSymbols.clear(); for (auto &s : retargetedSymbols) { symTableLevel->retargetedSymbols.push_back({s.first, s.second}); } std::vector containerCopied(anonId, false); tLevel::const_iterator iter; for (iter = level.begin(); iter != level.end(); ++iter) { const TAnonMember* anon = iter->second->getAsAnonMember(); if (anon) { // Insert all the anonymous members of this same container at once, // avoid inserting the remaining members in the future, once this has been done, // allowing them to all be part of the same new container. if (! containerCopied[anon->getAnonId()]) { TVariable* container = anon->getAnonContainer().clone(); container->changeName(NewPoolTString("")); // insert the container and all its members symTableLevel->insert(*container, false); containerCopied[anon->getAnonId()] = true; } } else { const TString& name = iter->first; auto retargetIter = std::find_if(retargetedSymbols.begin(), retargetedSymbols.end(), [&name](const std::pair& i) { return i.first == name; }); if (retargetIter != retargetedSymbols.end()) continue; symTableLevel->insert(*iter->second->clone(), false); } } // Now point retargeted symbols to the newly created versions of them for (auto &s : retargetedSymbols) { TSymbol* sym = symTableLevel->find(s.second); if (!sym) continue; symTableLevel->insert(s.first, sym); } return symTableLevel; } void TSymbolTable::copyTable(const TSymbolTable& copyOf) { assert(adoptedLevels == copyOf.adoptedLevels); uniqueId = copyOf.uniqueId; noBuiltInRedeclarations = copyOf.noBuiltInRedeclarations; separateNameSpaces = copyOf.separateNameSpaces; for (unsigned int i = copyOf.adoptedLevels; i < copyOf.table.size(); ++i) table.push_back(copyOf.table[i]->clone()); } } // end namespace glslang ================================================ FILE: src/libraries/glslang/glslang/MachineIndependent/SymbolTable.h ================================================ // // Copyright (C) 2002-2005 3Dlabs Inc. Ltd. // Copyright (C) 2013 LunarG, Inc. // Copyright (C) 2015-2018 Google, Inc. // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following // disclaimer in the documentation and/or other materials provided // with the distribution. // // Neither the name of 3Dlabs Inc. Ltd. nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // #ifndef _SYMBOL_TABLE_INCLUDED_ #define _SYMBOL_TABLE_INCLUDED_ // // Symbol table for parsing. Has these design characteristics: // // * Same symbol table can be used to compile many shaders, to preserve // effort of creating and loading with the large numbers of built-in // symbols. // // --> This requires a copy mechanism, so initial pools used to create // the shared information can be popped. Done through "clone" // methods. // // * Name mangling will be used to give each function a unique name // so that symbol table lookups are never ambiguous. This allows // a simpler symbol table structure. // // * Pushing and popping of scope, so symbol table will really be a stack // of symbol tables. Searched from the top, with new inserts going into // the top. // // * Constants: Compile time constant symbols will keep their values // in the symbol table. The parser can substitute constants at parse // time, including doing constant folding and constant propagation. // // * No temporaries: Temporaries made from operations (+, --, .xy, etc.) // are tracked in the intermediate representation, not the symbol table. // #include "../Include/Common.h" #include "../Include/intermediate.h" #include "../Include/InfoSink.h" namespace glslang { // // Symbol base class. (Can build functions or variables out of these...) // class TVariable; class TFunction; class TAnonMember; typedef TVector TExtensionList; class TSymbol { public: POOL_ALLOCATOR_NEW_DELETE(GetThreadPoolAllocator()) explicit TSymbol(const TString *n, const TString *mn) : name(n), mangledName(mn), uniqueId(0), extensions(nullptr), writable(true) { } explicit TSymbol(const TString *n) : TSymbol(n, n) { } virtual TSymbol* clone() const = 0; virtual ~TSymbol() { } // rely on all symbol owned memory coming from the pool virtual const TString& getName() const { return *name; } virtual void changeName(const TString* newName) { name = newName; } virtual void addPrefix(const char* prefix) { TString newName(prefix); newName.append(*name); changeName(NewPoolTString(newName.c_str())); } virtual const TString& getMangledName() const { return *mangledName; } virtual TFunction* getAsFunction() { return nullptr; } virtual const TFunction* getAsFunction() const { return nullptr; } virtual TVariable* getAsVariable() { return nullptr; } virtual const TVariable* getAsVariable() const { return nullptr; } virtual const TAnonMember* getAsAnonMember() const { return nullptr; } virtual const TType& getType() const = 0; virtual TType& getWritableType() = 0; virtual void setUniqueId(long long id) { uniqueId = id; } virtual long long getUniqueId() const { return uniqueId; } virtual void setExtensions(int numExts, const char* const exts[]) { assert(extensions == nullptr); assert(numExts > 0); extensions = NewPoolObject(extensions); for (int e = 0; e < numExts; ++e) extensions->push_back(exts[e]); } virtual int getNumExtensions() const { return extensions == nullptr ? 0 : (int)extensions->size(); } virtual const char** getExtensions() const { return extensions->data(); } virtual void dump(TInfoSink& infoSink, bool complete = false) const = 0; void dumpExtensions(TInfoSink& infoSink) const; virtual bool isReadOnly() const { return ! writable; } virtual void makeReadOnly() { writable = false; } protected: explicit TSymbol(const TSymbol&); TSymbol& operator=(const TSymbol&); const TString *name; const TString *mangledName; unsigned long long uniqueId; // For cross-scope comparing during code generation // For tracking what extensions must be present // (don't use if correct version/profile is present). TExtensionList* extensions; // an array of pointers to existing constant char strings // // N.B.: Non-const functions that will be generally used should assert on this, // to avoid overwriting shared symbol-table information. // bool writable; }; // // Variable class, meaning a symbol that's not a function. // // There could be a separate class hierarchy for Constant variables; // Only one of int, bool, or float, (or none) is correct for // any particular use, but it's easy to do this way, and doesn't // seem worth having separate classes, and "getConst" can't simply return // different values for different types polymorphically, so this is // just simple and pragmatic. // class TVariable : public TSymbol { public: TVariable(const TString *name, const TType& t, bool uT = false ) : TVariable(name, name, t, uT) {} TVariable(const TString *name, const TString *mangledName, const TType& t, bool uT = false ) : TSymbol(name, mangledName), userType(uT), constSubtree(nullptr), memberExtensions(nullptr), anonId(-1) { type.shallowCopy(t); } virtual TVariable* clone() const; virtual ~TVariable() { } virtual TVariable* getAsVariable() { return this; } virtual const TVariable* getAsVariable() const { return this; } virtual const TType& getType() const { return type; } virtual TType& getWritableType() { assert(writable); return type; } virtual bool isUserType() const { return userType; } virtual const TConstUnionArray& getConstArray() const { return constArray; } virtual TConstUnionArray& getWritableConstArray() { assert(writable); return constArray; } virtual void setConstArray(const TConstUnionArray& array) { constArray = array; } virtual void setConstSubtree(TIntermTyped* subtree) { constSubtree = subtree; } virtual TIntermTyped* getConstSubtree() const { return constSubtree; } virtual void setAnonId(int i) { anonId = i; } virtual int getAnonId() const { return anonId; } virtual void setMemberExtensions(int member, int numExts, const char* const exts[]) { assert(type.isStruct()); assert(numExts > 0); if (memberExtensions == nullptr) { memberExtensions = NewPoolObject(memberExtensions); memberExtensions->resize(type.getStruct()->size()); } for (int e = 0; e < numExts; ++e) (*memberExtensions)[member].push_back(exts[e]); } virtual bool hasMemberExtensions() const { return memberExtensions != nullptr; } virtual int getNumMemberExtensions(int member) const { return memberExtensions == nullptr ? 0 : (int)(*memberExtensions)[member].size(); } virtual const char** getMemberExtensions(int member) const { return (*memberExtensions)[member].data(); } virtual void dump(TInfoSink& infoSink, bool complete = false) const; protected: explicit TVariable(const TVariable&); TVariable& operator=(const TVariable&); TType type; bool userType; // we are assuming that Pool Allocator will free the memory allocated to unionArray // when this object is destroyed TConstUnionArray constArray; // for compile-time constant value TIntermTyped* constSubtree; // for specialization constant computation TVector* memberExtensions; // per-member extension list, allocated only when needed int anonId; // the ID used for anonymous blocks: TODO: see if uniqueId could serve a dual purpose }; // // The function sub-class of symbols and the parser will need to // share this definition of a function parameter. // struct TParameter { TString *name; TType* type; TIntermTyped* defaultValue; TParameter& copyParam(const TParameter& param) { if (param.name) name = NewPoolTString(param.name->c_str()); else name = nullptr; type = param.type->clone(); defaultValue = param.defaultValue; return *this; } TBuiltInVariable getDeclaredBuiltIn() const { return type->getQualifier().declaredBuiltIn; } }; // // The function sub-class of a symbol. // class TFunction : public TSymbol { public: explicit TFunction(TOperator o) : TSymbol(nullptr), op(o), defined(false), prototyped(false), implicitThis(false), illegalImplicitThis(false), defaultParamCount(0) { } TFunction(const TString *name, const TType& retType, TOperator tOp = EOpNull) : TSymbol(name), mangledName(*name + '('), op(tOp), defined(false), prototyped(false), implicitThis(false), illegalImplicitThis(false), defaultParamCount(0), linkType(ELinkNone) { returnType.shallowCopy(retType); declaredBuiltIn = retType.getQualifier().builtIn; } virtual TFunction* clone() const override; virtual ~TFunction(); virtual TFunction* getAsFunction() override { return this; } virtual const TFunction* getAsFunction() const override { return this; } // Install 'p' as the (non-'this') last parameter. // Non-'this' parameters are reflected in both the list of parameters and the // mangled name. virtual void addParameter(TParameter& p) { assert(writable); parameters.push_back(p); p.type->appendMangledName(mangledName); if (p.defaultValue != nullptr) defaultParamCount++; } // Install 'this' as the first parameter. // 'this' is reflected in the list of parameters, but not the mangled name. virtual void addThisParameter(TType& type, const char* name) { TParameter p = { NewPoolTString(name), new TType, nullptr }; p.type->shallowCopy(type); parameters.insert(parameters.begin(), p); } virtual void addPrefix(const char* prefix) override { TSymbol::addPrefix(prefix); mangledName.insert(0, prefix); } virtual void removePrefix(const TString& prefix) { assert(mangledName.compare(0, prefix.size(), prefix) == 0); mangledName.erase(0, prefix.size()); } virtual const TString& getMangledName() const override { return mangledName; } virtual const TType& getType() const override { return returnType; } virtual TBuiltInVariable getDeclaredBuiltInType() const { return declaredBuiltIn; } virtual TType& getWritableType() override { return returnType; } virtual void relateToOperator(TOperator o) { assert(writable); op = o; } virtual TOperator getBuiltInOp() const { return op; } virtual void setDefined() { assert(writable); defined = true; } virtual bool isDefined() const { return defined; } virtual void setPrototyped() { assert(writable); prototyped = true; } virtual bool isPrototyped() const { return prototyped; } virtual void setImplicitThis() { assert(writable); implicitThis = true; } virtual bool hasImplicitThis() const { return implicitThis; } virtual void setIllegalImplicitThis() { assert(writable); illegalImplicitThis = true; } virtual bool hasIllegalImplicitThis() const { return illegalImplicitThis; } // Return total number of parameters virtual int getParamCount() const { return static_cast(parameters.size()); } // Return number of parameters with default values. virtual int getDefaultParamCount() const { return defaultParamCount; } // Return number of fixed parameters (without default values) virtual int getFixedParamCount() const { return getParamCount() - getDefaultParamCount(); } virtual TParameter& operator[](int i) { assert(writable); return parameters[i]; } virtual const TParameter& operator[](int i) const { return parameters[i]; } const TQualifier& getQualifier() const { return returnType.getQualifier(); } virtual void setSpirvInstruction(const TSpirvInstruction& inst) { relateToOperator(EOpSpirvInst); spirvInst = inst; } virtual const TSpirvInstruction& getSpirvInstruction() const { return spirvInst; } virtual void dump(TInfoSink& infoSink, bool complete = false) const override; void setExport() { linkType = ELinkExport; } TLinkType getLinkType() const { return linkType; } protected: explicit TFunction(const TFunction&); TFunction& operator=(const TFunction&); typedef TVector TParamList; TParamList parameters; TType returnType; TBuiltInVariable declaredBuiltIn; TString mangledName; TOperator op; bool defined; bool prototyped; bool implicitThis; // True if this function is allowed to see all members of 'this' bool illegalImplicitThis; // True if this function is not supposed to have access to dynamic members of 'this', // even if it finds member variables in the symbol table. // This is important for a static member function that has member variables in scope, // but is not allowed to use them, or see hidden symbols instead. int defaultParamCount; TSpirvInstruction spirvInst; // SPIR-V instruction qualifiers TLinkType linkType; }; // // Members of anonymous blocks are a kind of TSymbol. They are not hidden in // the symbol table behind a container; rather they are visible and point to // their anonymous container. (The anonymous container is found through the // member, not the other way around.) // class TAnonMember : public TSymbol { public: TAnonMember(const TString* n, unsigned int m, TVariable& a, int an) : TSymbol(n), anonContainer(a), memberNumber(m), anonId(an) { } virtual TAnonMember* clone() const override; virtual ~TAnonMember() { } virtual const TAnonMember* getAsAnonMember() const override { return this; } virtual const TVariable& getAnonContainer() const { return anonContainer; } virtual unsigned int getMemberNumber() const { return memberNumber; } virtual const TType& getType() const override { const TTypeList& types = *anonContainer.getType().getStruct(); return *types[memberNumber].type; } virtual TType& getWritableType() override { assert(writable); const TTypeList& types = *anonContainer.getType().getStruct(); return *types[memberNumber].type; } virtual void setExtensions(int numExts, const char* const exts[]) override { anonContainer.setMemberExtensions(memberNumber, numExts, exts); } virtual int getNumExtensions() const override { return anonContainer.getNumMemberExtensions(memberNumber); } virtual const char** getExtensions() const override { return anonContainer.getMemberExtensions(memberNumber); } virtual int getAnonId() const { return anonId; } virtual void dump(TInfoSink& infoSink, bool complete = false) const override; protected: explicit TAnonMember(const TAnonMember&); TAnonMember& operator=(const TAnonMember&); TVariable& anonContainer; unsigned int memberNumber; int anonId; }; class TSymbolTableLevel { public: POOL_ALLOCATOR_NEW_DELETE(GetThreadPoolAllocator()) TSymbolTableLevel() : defaultPrecision(nullptr), anonId(0), thisLevel(false) { } ~TSymbolTableLevel(); bool insert(const TString& name, TSymbol* symbol) { return level.insert(tLevelPair(name, symbol)).second; } bool insert(TSymbol& symbol, bool separateNameSpaces, const TString& forcedKeyName = TString()) { // // returning true means symbol was added to the table with no semantic errors // const TString& name = symbol.getName(); if (forcedKeyName.length()) { return level.insert(tLevelPair(forcedKeyName, &symbol)).second; } else if (name == "") { symbol.getAsVariable()->setAnonId(anonId++); // An empty name means an anonymous container, exposing its members to the external scope. // Give it a name and insert its members in the symbol table, pointing to the container. char buf[20]; snprintf(buf, 20, "%s%d", AnonymousPrefix, symbol.getAsVariable()->getAnonId()); symbol.changeName(NewPoolTString(buf)); return insertAnonymousMembers(symbol, 0); } else { // Check for redefinition errors: // - STL itself will tell us if there is a direct name collision, with name mangling, at this level // - additionally, check for function-redefining-variable name collisions const TString& insertName = symbol.getMangledName(); if (symbol.getAsFunction()) { // make sure there isn't a variable of this name if (! separateNameSpaces && level.find(name) != level.end()) return false; // insert, and whatever happens is okay level.insert(tLevelPair(insertName, &symbol)); return true; } else return level.insert(tLevelPair(insertName, &symbol)).second; } } // Add more members to an already inserted aggregate object bool amend(TSymbol& symbol, int firstNewMember) { // See insert() for comments on basic explanation of insert. // This operates similarly, but more simply. // Only supporting amend of anonymous blocks so far. if (IsAnonymous(symbol.getName())) return insertAnonymousMembers(symbol, firstNewMember); else return false; } bool insertAnonymousMembers(TSymbol& symbol, int firstMember) { const TTypeList& types = *symbol.getAsVariable()->getType().getStruct(); for (unsigned int m = firstMember; m < types.size(); ++m) { TAnonMember* member = new TAnonMember(&types[m].type->getFieldName(), m, *symbol.getAsVariable(), symbol.getAsVariable()->getAnonId()); if (! level.insert(tLevelPair(member->getMangledName(), member)).second) return false; } return true; } void retargetSymbol(const TString& from, const TString& to) { tLevel::const_iterator fromIt = level.find(from); tLevel::const_iterator toIt = level.find(to); if (fromIt == level.end() || toIt == level.end()) return; delete fromIt->second; level[from] = toIt->second; retargetedSymbols.push_back({from, to}); } TSymbol* find(const TString& name) const { tLevel::const_iterator it = level.find(name); if (it == level.end()) return nullptr; else return (*it).second; } void findFunctionNameList(const TString& name, TVector& list) { size_t parenAt = name.find_first_of('('); TString base(name, 0, parenAt + 1); tLevel::const_iterator begin = level.lower_bound(base); base[parenAt] = ')'; // assume ')' is lexically after '(' tLevel::const_iterator end = level.upper_bound(base); for (tLevel::const_iterator it = begin; it != end; ++it) list.push_back(it->second->getAsFunction()); } // See if there is already a function in the table having the given non-function-style name. bool hasFunctionName(const TString& name) const { tLevel::const_iterator candidate = level.lower_bound(name); if (candidate != level.end()) { const TString& candidateName = (*candidate).first; TString::size_type parenAt = candidateName.find_first_of('('); if (parenAt != candidateName.npos && candidateName.compare(0, parenAt, name) == 0) return true; } return false; } // See if there is a variable at this level having the given non-function-style name. // Return true if name is found, and set variable to true if the name was a variable. bool findFunctionVariableName(const TString& name, bool& variable) const { tLevel::const_iterator candidate = level.lower_bound(name); if (candidate != level.end()) { const TString& candidateName = (*candidate).first; TString::size_type parenAt = candidateName.find_first_of('('); if (parenAt == candidateName.npos) { // not a mangled name if (candidateName == name) { // found a variable name match variable = true; return true; } } else { // a mangled name if (candidateName.compare(0, parenAt, name) == 0) { // found a function name match variable = false; return true; } } } return false; } // Use this to do a lazy 'push' of precision defaults the first time // a precision statement is seen in a new scope. Leave it at 0 for // when no push was needed. Thus, it is not the current defaults, // it is what to restore the defaults to when popping a level. void setPreviousDefaultPrecisions(const TPrecisionQualifier *p) { // can call multiple times at one scope, will only latch on first call, // as we're tracking the previous scope's values, not the current values if (defaultPrecision != nullptr) return; defaultPrecision = new TPrecisionQualifier[EbtNumTypes]; for (int t = 0; t < EbtNumTypes; ++t) defaultPrecision[t] = p[t]; } void getPreviousDefaultPrecisions(TPrecisionQualifier *p) { // can be called for table level pops that didn't set the // defaults if (defaultPrecision == nullptr || p == nullptr) return; for (int t = 0; t < EbtNumTypes; ++t) p[t] = defaultPrecision[t]; } void relateToOperator(const char* name, TOperator op); void setFunctionExtensions(const char* name, int num, const char* const extensions[]); void setSingleFunctionExtensions(const char* name, int num, const char* const extensions[]); void dump(TInfoSink& infoSink, bool complete = false) const; TSymbolTableLevel* clone() const; void readOnly(); void setThisLevel() { thisLevel = true; } bool isThisLevel() const { return thisLevel; } protected: explicit TSymbolTableLevel(TSymbolTableLevel&); TSymbolTableLevel& operator=(TSymbolTableLevel&); typedef std::map, pool_allocator > > tLevel; typedef const tLevel::value_type tLevelPair; typedef std::pair tInsertResult; tLevel level; // named mappings TPrecisionQualifier *defaultPrecision; // pair TVector> retargetedSymbols; int anonId; bool thisLevel; // True if this level of the symbol table is a structure scope containing member function // that are supposed to see anonymous access to member variables. }; class TSymbolTable { public: TSymbolTable() : uniqueId(0), noBuiltInRedeclarations(false), separateNameSpaces(false), adoptedLevels(0) { // // This symbol table cannot be used until push() is called. // } ~TSymbolTable() { // this can be called explicitly; safest to code it so it can be called multiple times // don't deallocate levels passed in from elsewhere while (table.size() > adoptedLevels) pop(nullptr); } void adoptLevels(TSymbolTable& symTable) { for (unsigned int level = 0; level < symTable.table.size(); ++level) { table.push_back(symTable.table[level]); ++adoptedLevels; } uniqueId = symTable.uniqueId; noBuiltInRedeclarations = symTable.noBuiltInRedeclarations; separateNameSpaces = symTable.separateNameSpaces; } // // While level adopting is generic, the methods below enact a the following // convention for levels: // 0: common built-ins shared across all stages, all compiles, only one copy for all symbol tables // 1: per-stage built-ins, shared across all compiles, but a different copy per stage // 2: built-ins specific to a compile, like resources that are context-dependent, or redeclared built-ins // 3: user-shader globals // protected: static const uint32_t LevelFlagBitOffset = 56; static const int globalLevel = 3; static bool isSharedLevel(int level) { return level <= 1; } // exclude all per-compile levels static bool isBuiltInLevel(int level) { return level <= 2; } // exclude user globals static bool isGlobalLevel(int level) { return level <= globalLevel; } // include user globals public: bool isEmpty() { return table.size() == 0; } bool atBuiltInLevel() { return isBuiltInLevel(currentLevel()); } bool atGlobalLevel() { return isGlobalLevel(currentLevel()); } static bool isBuiltInSymbol(long long uniqueId) { int level = static_cast(uniqueId >> LevelFlagBitOffset); return isBuiltInLevel(level); } static constexpr uint64_t uniqueIdMask = (1LL << LevelFlagBitOffset) - 1; static const uint32_t MaxLevelInUniqueID = 127; void setNoBuiltInRedeclarations() { noBuiltInRedeclarations = true; } void setSeparateNameSpaces() { separateNameSpaces = true; } void push() { table.push_back(new TSymbolTableLevel); updateUniqueIdLevelFlag(); } // Make a new symbol-table level to represent the scope introduced by a structure // containing member functions, such that the member functions can find anonymous // references to member variables. // // 'thisSymbol' should have a name of "" to trigger anonymous structure-member // symbol finds. void pushThis(TSymbol& thisSymbol) { assert(thisSymbol.getName().size() == 0); table.push_back(new TSymbolTableLevel); updateUniqueIdLevelFlag(); table.back()->setThisLevel(); insert(thisSymbol); } void pop(TPrecisionQualifier *p) { table[currentLevel()]->getPreviousDefaultPrecisions(p); delete table.back(); table.pop_back(); updateUniqueIdLevelFlag(); } // // Insert a visible symbol into the symbol table so it can // be found later by name. // // Returns false if the was a name collision. // bool insert(TSymbol& symbol) { symbol.setUniqueId(++uniqueId); // make sure there isn't a function of this variable name if (! separateNameSpaces && ! symbol.getAsFunction() && table[currentLevel()]->hasFunctionName(symbol.getName())) return false; // check for not overloading or redefining a built-in function if (noBuiltInRedeclarations) { if (atGlobalLevel() && currentLevel() > 0) { if (table[0]->hasFunctionName(symbol.getName())) return false; if (currentLevel() > 1 && table[1]->hasFunctionName(symbol.getName())) return false; } } return table[currentLevel()]->insert(symbol, separateNameSpaces); } // Add more members to an already inserted aggregate object bool amend(TSymbol& symbol, int firstNewMember) { // See insert() for comments on basic explanation of insert. // This operates similarly, but more simply. return table[currentLevel()]->amend(symbol, firstNewMember); } // Update the level info in symbol's unique ID to current level void amendSymbolIdLevel(TSymbol& symbol) { // clamp level to avoid overflow uint64_t level = (uint32_t)currentLevel() > MaxLevelInUniqueID ? MaxLevelInUniqueID : currentLevel(); uint64_t symbolId = symbol.getUniqueId(); symbolId &= uniqueIdMask; symbolId |= (level << LevelFlagBitOffset); symbol.setUniqueId(symbolId); } // // To allocate an internal temporary, which will need to be uniquely // identified by the consumer of the AST, but never need to // found by doing a symbol table search by name, hence allowed an // arbitrary name in the symbol with no worry of collision. // void makeInternalVariable(TSymbol& symbol) { symbol.setUniqueId(++uniqueId); } // // Copy a variable or anonymous member's structure from a shared level so that // it can be added (soon after return) to the symbol table where it can be // modified without impacting other users of the shared table. // TSymbol* copyUpDeferredInsert(TSymbol* shared) { if (shared->getAsVariable()) { TSymbol* copy = shared->clone(); copy->setUniqueId(shared->getUniqueId()); return copy; } else { const TAnonMember* anon = shared->getAsAnonMember(); assert(anon); TVariable* container = anon->getAnonContainer().clone(); container->changeName(NewPoolTString("")); container->setUniqueId(anon->getAnonContainer().getUniqueId()); return container; } } TSymbol* copyUp(TSymbol* shared) { TSymbol* copy = copyUpDeferredInsert(shared); table[globalLevel]->insert(*copy, separateNameSpaces); if (shared->getAsVariable()) return copy; else { // return the copy of the anonymous member return table[globalLevel]->find(shared->getName()); } } // Normal find of a symbol, that can optionally say whether the symbol was found // at a built-in level or the current top-scope level. TSymbol* find(const TString& name, bool* builtIn = nullptr, bool* currentScope = nullptr, int* thisDepthP = nullptr) { int level = currentLevel(); TSymbol* symbol; int thisDepth = 0; do { if (table[level]->isThisLevel()) ++thisDepth; symbol = table[level]->find(name); --level; } while (symbol == nullptr && level >= 0); level++; if (builtIn) *builtIn = isBuiltInLevel(level); if (currentScope) *currentScope = isGlobalLevel(currentLevel()) || level == currentLevel(); // consider shared levels as "current scope" WRT user globals if (thisDepthP != nullptr) { if (! table[level]->isThisLevel()) thisDepth = 0; *thisDepthP = thisDepth; } return symbol; } void retargetSymbol(const TString& from, const TString& to) { int level = currentLevel(); table[level]->retargetSymbol(from, to); } // Find of a symbol that returns how many layers deep of nested // structures-with-member-functions ('this' scopes) deep the symbol was // found in. TSymbol* find(const TString& name, int& thisDepth) { int level = currentLevel(); TSymbol* symbol; thisDepth = 0; do { if (table[level]->isThisLevel()) ++thisDepth; symbol = table[level]->find(name); --level; } while (symbol == nullptr && level >= 0); if (! table[level + 1]->isThisLevel()) thisDepth = 0; return symbol; } bool isFunctionNameVariable(const TString& name) const { if (separateNameSpaces) return false; int level = currentLevel(); do { bool variable; bool found = table[level]->findFunctionVariableName(name, variable); if (found) return variable; --level; } while (level >= 0); return false; } void findFunctionNameList(const TString& name, TVector& list, bool& builtIn) { // For user levels, return the set found in the first scope with a match builtIn = false; int level = currentLevel(); do { table[level]->findFunctionNameList(name, list); --level; } while (list.empty() && level >= globalLevel); if (! list.empty()) return; // Gather across all built-in levels; they don't hide each other builtIn = true; do { table[level]->findFunctionNameList(name, list); --level; } while (level >= 0); } void relateToOperator(const char* name, TOperator op) { for (unsigned int level = 0; level < table.size(); ++level) table[level]->relateToOperator(name, op); } void setFunctionExtensions(const char* name, int num, const char* const extensions[]) { for (unsigned int level = 0; level < table.size(); ++level) table[level]->setFunctionExtensions(name, num, extensions); } void setSingleFunctionExtensions(const char* name, int num, const char* const extensions[]) { for (unsigned int level = 0; level < table.size(); ++level) table[level]->setSingleFunctionExtensions(name, num, extensions); } void setVariableExtensions(const char* name, int numExts, const char* const extensions[]) { TSymbol* symbol = find(TString(name)); if (symbol == nullptr) return; symbol->setExtensions(numExts, extensions); } void setVariableExtensions(const char* blockName, const char* name, int numExts, const char* const extensions[]) { TSymbol* symbol = find(TString(blockName)); if (symbol == nullptr) return; TVariable* variable = symbol->getAsVariable(); assert(variable != nullptr); const TTypeList& structure = *variable->getAsVariable()->getType().getStruct(); for (int member = 0; member < (int)structure.size(); ++member) { if (structure[member].type->getFieldName().compare(name) == 0) { variable->setMemberExtensions(member, numExts, extensions); return; } } } long long getMaxSymbolId() { return uniqueId; } void dump(TInfoSink& infoSink, bool complete = false) const; void copyTable(const TSymbolTable& copyOf); void setPreviousDefaultPrecisions(TPrecisionQualifier *p) { table[currentLevel()]->setPreviousDefaultPrecisions(p); } void readOnly() { for (unsigned int level = 0; level < table.size(); ++level) table[level]->readOnly(); } // Add current level in the high-bits of unique id void updateUniqueIdLevelFlag() { // clamp level to avoid overflow uint64_t level = (uint32_t)currentLevel() > MaxLevelInUniqueID ? MaxLevelInUniqueID : currentLevel(); uniqueId &= uniqueIdMask; uniqueId |= (level << LevelFlagBitOffset); } void overwriteUniqueId(long long id) { uniqueId = id; updateUniqueIdLevelFlag(); } protected: TSymbolTable(TSymbolTable&); TSymbolTable& operator=(TSymbolTableLevel&); int currentLevel() const { return static_cast(table.size()) - 1; } std::vector table; long long uniqueId; // for unique identification in code generation bool noBuiltInRedeclarations; bool separateNameSpaces; unsigned int adoptedLevels; }; } // end namespace glslang #endif // _SYMBOL_TABLE_INCLUDED_ ================================================ FILE: src/libraries/glslang/glslang/MachineIndependent/Versions.cpp ================================================ // // Copyright (C) 2002-2005 3Dlabs Inc. Ltd. // Copyright (C) 2012-2013 LunarG, Inc. // Copyright (C) 2017, 2022-2024 Arm Limited. // Copyright (C) 2015-2020 Google, Inc. // Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights reserved. // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following // disclaimer in the documentation and/or other materials provided // with the distribution. // // Neither the name of 3Dlabs Inc. Ltd. nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // // // Help manage multiple profiles, versions, extensions etc. // // These don't return error codes, as the presumption is parsing will // always continue as if the tested feature were enabled, and thus there // is no error recovery needed. // // // HOW TO add a feature enabled by an extension. // // To add a new hypothetical "Feature F" to the front end, where an extension // "XXX_extension_X" can be used to enable the feature, do the following. // // OVERVIEW: Specific features are what are error-checked for, not // extensions: A specific Feature F might be enabled by an extension, or a // particular version in a particular profile, or a stage, or combinations, etc. // // The basic mechanism is to use the following to "declare" all the things that // enable/disable Feature F, in a code path that implements Feature F: // // requireProfile() // profileRequires() // requireStage() // checkDeprecated() // requireNotRemoved() // requireExtensions() // extensionRequires() // // Typically, only the first two calls are needed. They go into a code path that // implements Feature F, and will log the proper error/warning messages. Parsing // will then always continue as if the tested feature was enabled. // // There is typically no if-testing or conditional parsing, just insertion of the calls above. // However, if symbols specific to the extension are added (step 5), they will // only be added under tests that the minimum version and profile are present. // // 1) Add a symbol name for the extension string at the bottom of Versions.h: // // const char* const XXX_extension_X = "XXX_extension_X"; // // 2) Add extension initialization to TParseVersions::initializeExtensionBehavior(), // the first function below and optionally a entry to extensionData for additional // error checks: // // extensionBehavior[XXX_extension_X] = EBhDisable; // (Optional) exts[] = {XXX_extension_X, EShTargetSpv_1_4} // // 3) Add any preprocessor directives etc. in the next function, TParseVersions::getPreamble(): // // "#define XXX_extension_X 1\n" // // The new-line is important, as that ends preprocess tokens. // // 4) Insert a profile check in the feature's path (unless all profiles support the feature, // for some version level). That is, call requireProfile() to constrain the profiles, e.g.: // // // ... in a path specific to Feature F... // requireProfile(loc, // ECoreProfile | ECompatibilityProfile, // "Feature F"); // // 5) For each profile that supports the feature, insert version/extension checks: // // The mostly likely scenario is that Feature F can only be used with a // particular profile if XXX_extension_X is present or the version is // high enough that the core specification already incorporated it. // // // following the requireProfile() call... // profileRequires(loc, // ECoreProfile | ECompatibilityProfile, // 420, // 0 if no version incorporated the feature into the core spec. // XXX_extension_X, // can be a list of extensions that all add the feature // "Feature F Description"); // // This allows the feature if either A) one of the extensions is enabled or // B) the version is high enough. If no version yet incorporates the feature // into core, pass in 0. // // This can be called multiple times, if different profiles support the // feature starting at different version numbers or with different // extensions. // // This must be called for each profile allowed by the initial call to requireProfile(). // // Profiles are all masks, which can be "or"-ed together. // // ENoProfile // ECoreProfile // ECompatibilityProfile // EEsProfile // // The ENoProfile profile is only for desktop, before profiles showed up in version 150; // All other #version with no profile default to either es or core, and so have profiles. // // You can select all but a particular profile using ~. The following basically means "desktop": // // ~EEsProfile // // 6) If built-in symbols are added by the extension, add them in Initialize.cpp: Their use // will be automatically error checked against the extensions enabled at that moment. // see the comment at the top of Initialize.cpp for where to put them. Establish them at // the earliest release that supports the extension. Then, tag them with the // set of extensions that both enable them and are necessary, given the version of the symbol // table. (There is a different symbol table for each version.) // // 7) If the extension has additional requirements like minimum SPIR-V version required, add them // to extensionRequires() #include "parseVersions.h" #include "localintermediate.h" namespace glslang { // // Initialize all extensions, almost always to 'disable', as once their features // are incorporated into a core version, their features are supported through allowing that // core version, not through a pseudo-enablement of the extension. // void TParseVersions::initializeExtensionBehavior() { typedef struct { const char *const extensionName; EShTargetLanguageVersion minSpvVersion; } extensionData; const extensionData exts[] = { {E_GL_EXT_ray_tracing, EShTargetSpv_1_4}, {E_GL_NV_ray_tracing_motion_blur, EShTargetSpv_1_4}, {E_GL_EXT_mesh_shader, EShTargetSpv_1_4}, {E_GL_NV_cooperative_matrix2, EShTargetSpv_1_6} }; for (size_t ii = 0; ii < sizeof(exts) / sizeof(exts[0]); ii++) { // Add only extensions which require > spv1.0 to save space in map if (exts[ii].minSpvVersion > EShTargetSpv_1_0) { extensionMinSpv[exts[ii].extensionName] = exts[ii].minSpvVersion; } } extensionBehavior[E_GL_OES_texture_3D] = EBhDisable; extensionBehavior[E_GL_OES_standard_derivatives] = EBhDisable; extensionBehavior[E_GL_EXT_frag_depth] = EBhDisable; extensionBehavior[E_GL_OES_EGL_image_external] = EBhDisable; extensionBehavior[E_GL_OES_EGL_image_external_essl3] = EBhDisable; extensionBehavior[E_GL_EXT_YUV_target] = EBhDisable; extensionBehavior[E_GL_EXT_shader_texture_lod] = EBhDisable; extensionBehavior[E_GL_EXT_shadow_samplers] = EBhDisable; extensionBehavior[E_GL_ARB_texture_rectangle] = EBhDisable; extensionBehavior[E_GL_3DL_array_objects] = EBhDisable; extensionBehavior[E_GL_ARB_shading_language_420pack] = EBhDisable; extensionBehavior[E_GL_ARB_texture_gather] = EBhDisable; extensionBehavior[E_GL_ARB_gpu_shader5] = EBhDisable; extensionBehavior[E_GL_ARB_separate_shader_objects] = EBhDisable; extensionBehavior[E_GL_ARB_compute_shader] = EBhDisable; extensionBehavior[E_GL_ARB_tessellation_shader] = EBhDisable; extensionBehavior[E_GL_ARB_enhanced_layouts] = EBhDisable; extensionBehavior[E_GL_ARB_texture_cube_map_array] = EBhDisable; extensionBehavior[E_GL_ARB_texture_multisample] = EBhDisable; extensionBehavior[E_GL_ARB_shader_texture_lod] = EBhDisable; extensionBehavior[E_GL_ARB_explicit_attrib_location] = EBhDisable; extensionBehavior[E_GL_ARB_explicit_uniform_location] = EBhDisable; extensionBehavior[E_GL_ARB_shader_image_load_store] = EBhDisable; extensionBehavior[E_GL_ARB_shader_atomic_counters] = EBhDisable; extensionBehavior[E_GL_ARB_shader_atomic_counter_ops] = EBhDisable; extensionBehavior[E_GL_ARB_shader_draw_parameters] = EBhDisable; extensionBehavior[E_GL_ARB_shader_group_vote] = EBhDisable; extensionBehavior[E_GL_ARB_derivative_control] = EBhDisable; extensionBehavior[E_GL_ARB_shader_texture_image_samples] = EBhDisable; extensionBehavior[E_GL_ARB_viewport_array] = EBhDisable; extensionBehavior[E_GL_ARB_gpu_shader_int64] = EBhDisable; extensionBehavior[E_GL_ARB_gpu_shader_fp64] = EBhDisable; extensionBehavior[E_GL_ARB_shader_ballot] = EBhDisable; extensionBehavior[E_GL_ARB_sparse_texture2] = EBhDisable; extensionBehavior[E_GL_ARB_sparse_texture_clamp] = EBhDisable; extensionBehavior[E_GL_ARB_shader_stencil_export] = EBhDisable; // extensionBehavior[E_GL_ARB_cull_distance] = EBhDisable; // present for 4.5, but need extension control over block members extensionBehavior[E_GL_ARB_post_depth_coverage] = EBhDisable; extensionBehavior[E_GL_ARB_shader_viewport_layer_array] = EBhDisable; extensionBehavior[E_GL_ARB_fragment_shader_interlock] = EBhDisable; extensionBehavior[E_GL_ARB_shader_clock] = EBhDisable; extensionBehavior[E_GL_ARB_uniform_buffer_object] = EBhDisable; extensionBehavior[E_GL_ARB_sample_shading] = EBhDisable; extensionBehavior[E_GL_ARB_shader_bit_encoding] = EBhDisable; extensionBehavior[E_GL_ARB_shader_image_size] = EBhDisable; extensionBehavior[E_GL_ARB_shader_storage_buffer_object] = EBhDisable; extensionBehavior[E_GL_ARB_shading_language_packing] = EBhDisable; extensionBehavior[E_GL_ARB_texture_query_lod] = EBhDisable; extensionBehavior[E_GL_ARB_vertex_attrib_64bit] = EBhDisable; extensionBehavior[E_GL_NV_gpu_shader5] = EBhDisable; extensionBehavior[E_GL_ARB_draw_instanced] = EBhDisable; extensionBehavior[E_GL_ARB_bindless_texture] = EBhDisable; extensionBehavior[E_GL_ARB_fragment_coord_conventions] = EBhDisable; extensionBehavior[E_GL_KHR_shader_subgroup_basic] = EBhDisable; extensionBehavior[E_GL_KHR_shader_subgroup_vote] = EBhDisable; extensionBehavior[E_GL_KHR_shader_subgroup_arithmetic] = EBhDisable; extensionBehavior[E_GL_KHR_shader_subgroup_ballot] = EBhDisable; extensionBehavior[E_GL_KHR_shader_subgroup_shuffle] = EBhDisable; extensionBehavior[E_GL_KHR_shader_subgroup_shuffle_relative] = EBhDisable; extensionBehavior[E_GL_KHR_shader_subgroup_rotate] = EBhDisable; extensionBehavior[E_GL_KHR_shader_subgroup_clustered] = EBhDisable; extensionBehavior[E_GL_KHR_shader_subgroup_quad] = EBhDisable; extensionBehavior[E_GL_KHR_memory_scope_semantics] = EBhDisable; extensionBehavior[E_GL_EXT_shader_atomic_int64] = EBhDisable; extensionBehavior[E_GL_EXT_shader_non_constant_global_initializers] = EBhDisable; extensionBehavior[E_GL_EXT_shader_image_load_formatted] = EBhDisable; extensionBehavior[E_GL_EXT_post_depth_coverage] = EBhDisable; extensionBehavior[E_GL_EXT_control_flow_attributes] = EBhDisable; extensionBehavior[E_GL_EXT_nonuniform_qualifier] = EBhDisable; extensionBehavior[E_GL_EXT_samplerless_texture_functions] = EBhDisable; extensionBehavior[E_GL_EXT_scalar_block_layout] = EBhDisable; extensionBehavior[E_GL_EXT_fragment_invocation_density] = EBhDisable; extensionBehavior[E_GL_EXT_buffer_reference] = EBhDisable; extensionBehavior[E_GL_EXT_buffer_reference2] = EBhDisable; extensionBehavior[E_GL_EXT_buffer_reference_uvec2] = EBhDisable; extensionBehavior[E_GL_EXT_demote_to_helper_invocation] = EBhDisable; extensionBehavior[E_GL_EXT_debug_printf] = EBhDisable; extensionBehavior[E_GL_EXT_shader_16bit_storage] = EBhDisable; extensionBehavior[E_GL_EXT_shader_8bit_storage] = EBhDisable; extensionBehavior[E_GL_EXT_subgroup_uniform_control_flow] = EBhDisable; extensionBehavior[E_GL_EXT_maximal_reconvergence] = EBhDisable; extensionBehavior[E_GL_EXT_fragment_shader_barycentric] = EBhDisable; extensionBehavior[E_GL_EXT_expect_assume] = EBhDisable; extensionBehavior[E_GL_EXT_control_flow_attributes2] = EBhDisable; extensionBehavior[E_GL_EXT_spec_constant_composites] = EBhDisable; extensionBehavior[E_GL_KHR_cooperative_matrix] = EBhDisable; extensionBehavior[E_GL_NV_cooperative_vector] = EBhDisable; // #line and #include extensionBehavior[E_GL_GOOGLE_cpp_style_line_directive] = EBhDisable; extensionBehavior[E_GL_GOOGLE_include_directive] = EBhDisable; extensionBehavior[E_GL_ARB_shading_language_include] = EBhDisable; extensionBehavior[E_GL_AMD_shader_ballot] = EBhDisable; extensionBehavior[E_GL_AMD_shader_trinary_minmax] = EBhDisable; extensionBehavior[E_GL_AMD_shader_explicit_vertex_parameter] = EBhDisable; extensionBehavior[E_GL_AMD_gcn_shader] = EBhDisable; extensionBehavior[E_GL_AMD_gpu_shader_half_float] = EBhDisable; extensionBehavior[E_GL_AMD_texture_gather_bias_lod] = EBhDisable; extensionBehavior[E_GL_AMD_gpu_shader_int16] = EBhDisable; extensionBehavior[E_GL_AMD_shader_image_load_store_lod] = EBhDisable; extensionBehavior[E_GL_AMD_shader_fragment_mask] = EBhDisable; extensionBehavior[E_GL_AMD_gpu_shader_half_float_fetch] = EBhDisable; extensionBehavior[E_GL_AMD_shader_early_and_late_fragment_tests] = EBhDisable; extensionBehavior[E_GL_INTEL_shader_integer_functions2] = EBhDisable; extensionBehavior[E_GL_NV_sample_mask_override_coverage] = EBhDisable; extensionBehavior[E_SPV_NV_geometry_shader_passthrough] = EBhDisable; extensionBehavior[E_GL_NV_viewport_array2] = EBhDisable; extensionBehavior[E_GL_NV_stereo_view_rendering] = EBhDisable; extensionBehavior[E_GL_NVX_multiview_per_view_attributes] = EBhDisable; extensionBehavior[E_GL_NV_shader_atomic_int64] = EBhDisable; extensionBehavior[E_GL_NV_conservative_raster_underestimation] = EBhDisable; extensionBehavior[E_GL_NV_shader_noperspective_interpolation] = EBhDisable; extensionBehavior[E_GL_NV_shader_subgroup_partitioned] = EBhDisable; extensionBehavior[E_GL_NV_shading_rate_image] = EBhDisable; extensionBehavior[E_GL_NV_ray_tracing] = EBhDisable; extensionBehavior[E_GL_NV_ray_tracing_motion_blur] = EBhDisable; extensionBehavior[E_GL_NV_fragment_shader_barycentric] = EBhDisable; extensionBehavior[E_GL_NV_compute_shader_derivatives] = EBhDisable; extensionBehavior[E_GL_NV_shader_texture_footprint] = EBhDisable; extensionBehavior[E_GL_NV_mesh_shader] = EBhDisable; extensionBehavior[E_GL_NV_cooperative_matrix] = EBhDisable; extensionBehavior[E_GL_NV_shader_sm_builtins] = EBhDisable; extensionBehavior[E_GL_NV_integer_cooperative_matrix] = EBhDisable; extensionBehavior[E_GL_NV_shader_invocation_reorder] = EBhDisable; extensionBehavior[E_GL_NV_displacement_micromap] = EBhDisable; extensionBehavior[E_GL_NV_shader_atomic_fp16_vector] = EBhDisable; extensionBehavior[E_GL_NV_cooperative_matrix2] = EBhDisable; extensionBehavior[E_GL_NV_cluster_acceleration_structure] = EBhDisable; extensionBehavior[E_GL_NV_linear_swept_spheres] = EBhDisable; // ARM extensionBehavior[E_GL_ARM_shader_core_builtins] = EBhDisable; // QCOM extensionBehavior[E_GL_QCOM_image_processing] = EBhDisable; extensionBehavior[E_GL_QCOM_image_processing2] = EBhDisable; extensionBehavior[E_GL_QCOM_tile_shading] = EBhDisable; // AEP extensionBehavior[E_GL_ANDROID_extension_pack_es31a] = EBhDisable; extensionBehavior[E_GL_KHR_blend_equation_advanced] = EBhDisable; extensionBehavior[E_GL_OES_sample_variables] = EBhDisable; extensionBehavior[E_GL_OES_shader_image_atomic] = EBhDisable; extensionBehavior[E_GL_OES_shader_multisample_interpolation] = EBhDisable; extensionBehavior[E_GL_OES_texture_storage_multisample_2d_array] = EBhDisable; extensionBehavior[E_GL_EXT_geometry_shader] = EBhDisable; extensionBehavior[E_GL_EXT_geometry_point_size] = EBhDisable; extensionBehavior[E_GL_EXT_gpu_shader5] = EBhDisable; extensionBehavior[E_GL_EXT_primitive_bounding_box] = EBhDisable; extensionBehavior[E_GL_EXT_shader_io_blocks] = EBhDisable; extensionBehavior[E_GL_EXT_tessellation_shader] = EBhDisable; extensionBehavior[E_GL_EXT_tessellation_point_size] = EBhDisable; extensionBehavior[E_GL_EXT_texture_buffer] = EBhDisable; extensionBehavior[E_GL_EXT_texture_cube_map_array] = EBhDisable; extensionBehavior[E_GL_EXT_null_initializer] = EBhDisable; // OES matching AEP extensionBehavior[E_GL_OES_geometry_shader] = EBhDisable; extensionBehavior[E_GL_OES_geometry_point_size] = EBhDisable; extensionBehavior[E_GL_OES_gpu_shader5] = EBhDisable; extensionBehavior[E_GL_OES_primitive_bounding_box] = EBhDisable; extensionBehavior[E_GL_OES_shader_io_blocks] = EBhDisable; extensionBehavior[E_GL_OES_tessellation_shader] = EBhDisable; extensionBehavior[E_GL_OES_tessellation_point_size] = EBhDisable; extensionBehavior[E_GL_OES_texture_buffer] = EBhDisable; extensionBehavior[E_GL_OES_texture_cube_map_array] = EBhDisable; extensionBehavior[E_GL_EXT_shader_integer_mix] = EBhDisable; // EXT extensions extensionBehavior[E_GL_EXT_device_group] = EBhDisable; extensionBehavior[E_GL_EXT_multiview] = EBhDisable; extensionBehavior[E_GL_EXT_shader_realtime_clock] = EBhDisable; extensionBehavior[E_GL_EXT_ray_tracing] = EBhDisable; extensionBehavior[E_GL_EXT_ray_query] = EBhDisable; extensionBehavior[E_GL_EXT_ray_flags_primitive_culling] = EBhDisable; extensionBehavior[E_GL_EXT_ray_cull_mask] = EBhDisable; extensionBehavior[E_GL_EXT_blend_func_extended] = EBhDisable; extensionBehavior[E_GL_EXT_shader_implicit_conversions] = EBhDisable; extensionBehavior[E_GL_EXT_fragment_shading_rate] = EBhDisable; extensionBehavior[E_GL_EXT_shader_image_int64] = EBhDisable; extensionBehavior[E_GL_EXT_terminate_invocation] = EBhDisable; extensionBehavior[E_GL_EXT_shared_memory_block] = EBhDisable; extensionBehavior[E_GL_EXT_spirv_intrinsics] = EBhDisable; extensionBehavior[E_GL_EXT_mesh_shader] = EBhDisable; extensionBehavior[E_GL_EXT_opacity_micromap] = EBhDisable; extensionBehavior[E_GL_EXT_shader_quad_control] = EBhDisable; extensionBehavior[E_GL_EXT_ray_tracing_position_fetch] = EBhDisable; extensionBehavior[E_GL_EXT_shader_tile_image] = EBhDisable; extensionBehavior[E_GL_EXT_texture_shadow_lod] = EBhDisable; extensionBehavior[E_GL_EXT_draw_instanced] = EBhDisable; extensionBehavior[E_GL_EXT_texture_array] = EBhDisable; extensionBehavior[E_GL_EXT_texture_offset_non_const] = EBhDisable; extensionBehavior[E_GL_EXT_nontemporal_keyword] = EBhDisable; extensionBehavior[E_GL_EXT_bfloat16] = EBhDisable; extensionBehavior[E_GL_EXT_float_e4m3] = EBhDisable; extensionBehavior[E_GL_EXT_float_e5m2] = EBhDisable; // OVR extensions extensionBehavior[E_GL_OVR_multiview] = EBhDisable; extensionBehavior[E_GL_OVR_multiview2] = EBhDisable; // explicit types extensionBehavior[E_GL_EXT_shader_explicit_arithmetic_types] = EBhDisable; extensionBehavior[E_GL_EXT_shader_explicit_arithmetic_types_int8] = EBhDisable; extensionBehavior[E_GL_EXT_shader_explicit_arithmetic_types_int16] = EBhDisable; extensionBehavior[E_GL_EXT_shader_explicit_arithmetic_types_int32] = EBhDisable; extensionBehavior[E_GL_EXT_shader_explicit_arithmetic_types_int64] = EBhDisable; extensionBehavior[E_GL_EXT_shader_explicit_arithmetic_types_float16] = EBhDisable; extensionBehavior[E_GL_EXT_shader_explicit_arithmetic_types_float32] = EBhDisable; extensionBehavior[E_GL_EXT_shader_explicit_arithmetic_types_float64] = EBhDisable; // subgroup extended types extensionBehavior[E_GL_EXT_shader_subgroup_extended_types_int8] = EBhDisable; extensionBehavior[E_GL_EXT_shader_subgroup_extended_types_int16] = EBhDisable; extensionBehavior[E_GL_EXT_shader_subgroup_extended_types_int64] = EBhDisable; extensionBehavior[E_GL_EXT_shader_subgroup_extended_types_float16] = EBhDisable; extensionBehavior[E_GL_EXT_shader_atomic_float] = EBhDisable; extensionBehavior[E_GL_EXT_shader_atomic_float2] = EBhDisable; extensionBehavior[E_GL_EXT_integer_dot_product] = EBhDisable; // Record extensions not for spv. spvUnsupportedExt.push_back(E_GL_ARB_bindless_texture); } // Get code that is not part of a shared symbol table, is specific to this shader, // or needed by the preprocessor (which does not use a shared symbol table). void TParseVersions::getPreamble(std::string& preamble) { if (isEsProfile()) { preamble = "#define GL_ES 1\n" "#define GL_FRAGMENT_PRECISION_HIGH 1\n" "#define GL_OES_texture_3D 1\n" "#define GL_OES_standard_derivatives 1\n" "#define GL_EXT_frag_depth 1\n" "#define GL_OES_EGL_image_external 1\n" "#define GL_OES_EGL_image_external_essl3 1\n" "#define GL_EXT_YUV_target 1\n" "#define GL_EXT_shader_texture_lod 1\n" "#define GL_EXT_shadow_samplers 1\n" "#define GL_EXT_fragment_shading_rate 1\n" // AEP "#define GL_ANDROID_extension_pack_es31a 1\n" "#define GL_OES_sample_variables 1\n" "#define GL_OES_shader_image_atomic 1\n" "#define GL_OES_shader_multisample_interpolation 1\n" "#define GL_OES_texture_storage_multisample_2d_array 1\n" "#define GL_EXT_geometry_shader 1\n" "#define GL_EXT_geometry_point_size 1\n" "#define GL_EXT_gpu_shader5 1\n" "#define GL_EXT_primitive_bounding_box 1\n" "#define GL_EXT_shader_io_blocks 1\n" "#define GL_EXT_tessellation_shader 1\n" "#define GL_EXT_tessellation_point_size 1\n" "#define GL_EXT_texture_buffer 1\n" "#define GL_EXT_texture_cube_map_array 1\n" "#define GL_EXT_shader_implicit_conversions 1\n" "#define GL_EXT_shader_integer_mix 1\n" "#define GL_EXT_blend_func_extended 1\n" // OES matching AEP "#define GL_OES_geometry_shader 1\n" "#define GL_OES_geometry_point_size 1\n" "#define GL_OES_gpu_shader5 1\n" "#define GL_OES_primitive_bounding_box 1\n" "#define GL_OES_shader_io_blocks 1\n" "#define GL_OES_tessellation_shader 1\n" "#define GL_OES_tessellation_point_size 1\n" "#define GL_OES_texture_buffer 1\n" "#define GL_OES_texture_cube_map_array 1\n" "#define GL_EXT_shader_non_constant_global_initializers 1\n" "#define GL_QCOM_image_processing 1\n" "#define GL_QCOM_image_processing2 1\n" "#define GL_QCOM_tile_shading 1\n" ; if (version >= 300) { preamble += "#define GL_NV_shader_noperspective_interpolation 1\n"; } if (version >= 310) { preamble += "#define GL_EXT_null_initializer 1\n"; preamble += "#define GL_EXT_subgroup_uniform_control_flow 1\n"; preamble += "#define GL_EXT_maximal_reconvergence 1\n"; } } else { // !isEsProfile() preamble = "#define GL_ARB_texture_rectangle 1\n" "#define GL_ARB_shading_language_420pack 1\n" "#define GL_ARB_texture_gather 1\n" "#define GL_ARB_gpu_shader5 1\n" "#define GL_ARB_separate_shader_objects 1\n" "#define GL_ARB_compute_shader 1\n" "#define GL_ARB_tessellation_shader 1\n" "#define GL_ARB_enhanced_layouts 1\n" "#define GL_ARB_texture_cube_map_array 1\n" "#define GL_ARB_texture_multisample 1\n" "#define GL_ARB_shader_texture_lod 1\n" "#define GL_ARB_explicit_attrib_location 1\n" "#define GL_ARB_explicit_uniform_location 1\n" "#define GL_ARB_shader_image_load_store 1\n" "#define GL_ARB_shader_atomic_counters 1\n" "#define GL_ARB_shader_draw_parameters 1\n" "#define GL_ARB_shader_group_vote 1\n" "#define GL_ARB_derivative_control 1\n" "#define GL_ARB_shader_texture_image_samples 1\n" "#define GL_ARB_viewport_array 1\n" "#define GL_ARB_gpu_shader_int64 1\n" "#define GL_ARB_gpu_shader_fp64 1\n" "#define GL_ARB_shader_ballot 1\n" "#define GL_ARB_sparse_texture2 1\n" "#define GL_ARB_sparse_texture_clamp 1\n" "#define GL_ARB_shader_stencil_export 1\n" "#define GL_ARB_sample_shading 1\n" "#define GL_ARB_shader_image_size 1\n" "#define GL_ARB_shading_language_packing 1\n" // "#define GL_ARB_cull_distance 1\n" // present for 4.5, but need extension control over block members "#define GL_ARB_post_depth_coverage 1\n" "#define GL_ARB_fragment_shader_interlock 1\n" "#define GL_ARB_uniform_buffer_object 1\n" "#define GL_ARB_shader_bit_encoding 1\n" "#define GL_ARB_shader_storage_buffer_object 1\n" "#define GL_ARB_texture_query_lod 1\n" "#define GL_ARB_vertex_attrib_64bit 1\n" "#define GL_NV_gpu_shader5 1\n" "#define GL_ARB_draw_instanced 1\n" "#define GL_ARB_fragment_coord_conventions 1\n" "#define GL_EXT_shader_non_constant_global_initializers 1\n" "#define GL_EXT_shader_image_load_formatted 1\n" "#define GL_EXT_post_depth_coverage 1\n" "#define GL_EXT_control_flow_attributes 1\n" "#define GL_EXT_nonuniform_qualifier 1\n" "#define GL_EXT_shader_16bit_storage 1\n" "#define GL_EXT_shader_8bit_storage 1\n" "#define GL_EXT_samplerless_texture_functions 1\n" "#define GL_EXT_scalar_block_layout 1\n" "#define GL_EXT_fragment_invocation_density 1\n" "#define GL_EXT_buffer_reference 1\n" "#define GL_EXT_buffer_reference2 1\n" "#define GL_EXT_buffer_reference_uvec2 1\n" "#define GL_EXT_demote_to_helper_invocation 1\n" "#define GL_EXT_debug_printf 1\n" "#define GL_EXT_fragment_shading_rate 1\n" "#define GL_EXT_shared_memory_block 1\n" "#define GL_EXT_shader_integer_mix 1\n" "#define GL_EXT_spec_constant_composites 1\n" // GL_KHR_shader_subgroup "#define GL_KHR_shader_subgroup_basic 1\n" "#define GL_KHR_shader_subgroup_vote 1\n" "#define GL_KHR_shader_subgroup_arithmetic 1\n" "#define GL_KHR_shader_subgroup_ballot 1\n" "#define GL_KHR_shader_subgroup_shuffle 1\n" "#define GL_KHR_shader_subgroup_shuffle_relative 1\n" "#define GL_KHR_shader_subgroup_clustered 1\n" "#define GL_KHR_shader_subgroup_quad 1\n" "#define GL_KHR_cooperative_matrix 1\n" "#define GL_EXT_shader_image_int64 1\n" "#define GL_EXT_shader_atomic_int64 1\n" "#define GL_EXT_shader_realtime_clock 1\n" "#define GL_EXT_ray_tracing 1\n" "#define GL_EXT_ray_query 1\n" "#define GL_EXT_ray_flags_primitive_culling 1\n" "#define GL_EXT_ray_cull_mask 1\n" "#define GL_EXT_ray_tracing_position_fetch 1\n" "#define GL_EXT_spirv_intrinsics 1\n" "#define GL_EXT_mesh_shader 1\n" "#define GL_AMD_shader_ballot 1\n" "#define GL_AMD_shader_trinary_minmax 1\n" "#define GL_AMD_shader_explicit_vertex_parameter 1\n" "#define GL_AMD_gcn_shader 1\n" "#define GL_AMD_gpu_shader_half_float 1\n" "#define GL_AMD_texture_gather_bias_lod 1\n" "#define GL_AMD_gpu_shader_int16 1\n" "#define GL_AMD_shader_image_load_store_lod 1\n" "#define GL_AMD_shader_fragment_mask 1\n" "#define GL_AMD_gpu_shader_half_float_fetch 1\n" "#define GL_INTEL_shader_integer_functions2 1\n" "#define GL_NV_sample_mask_override_coverage 1\n" "#define GL_NV_geometry_shader_passthrough 1\n" "#define GL_NV_viewport_array2 1\n" "#define GL_NV_shader_atomic_int64 1\n" "#define GL_NV_conservative_raster_underestimation 1\n" "#define GL_NV_shader_subgroup_partitioned 1\n" "#define GL_NV_shading_rate_image 1\n" "#define GL_NV_ray_tracing 1\n" "#define GL_NV_ray_tracing_motion_blur 1\n" "#define GL_NV_fragment_shader_barycentric 1\n" "#define GL_NV_compute_shader_derivatives 1\n" "#define GL_NV_shader_texture_footprint 1\n" "#define GL_NV_mesh_shader 1\n" "#define GL_NV_cooperative_matrix 1\n" "#define GL_NV_integer_cooperative_matrix 1\n" "#define GL_NV_shader_invocation_reorder 1\n" "#define GL_NV_cooperative_matrix2 1\n" "#define GL_QCOM_image_processing 1\n" "#define GL_QCOM_image_processing2 1\n" "#define GL_QCOM_tile_shading 1\n" "#define GL_EXT_shader_explicit_arithmetic_types 1\n" "#define GL_EXT_shader_explicit_arithmetic_types_int8 1\n" "#define GL_EXT_shader_explicit_arithmetic_types_int16 1\n" "#define GL_EXT_shader_explicit_arithmetic_types_int32 1\n" "#define GL_EXT_shader_explicit_arithmetic_types_int64 1\n" "#define GL_EXT_shader_explicit_arithmetic_types_float16 1\n" "#define GL_EXT_shader_explicit_arithmetic_types_float32 1\n" "#define GL_EXT_shader_explicit_arithmetic_types_float64 1\n" "#define GL_EXT_shader_subgroup_extended_types_int8 1\n" "#define GL_EXT_shader_subgroup_extended_types_int16 1\n" "#define GL_EXT_shader_subgroup_extended_types_int64 1\n" "#define GL_EXT_shader_subgroup_extended_types_float16 1\n" "#define GL_EXT_shader_atomic_float 1\n" "#define GL_EXT_shader_atomic_float2 1\n" "#define GL_EXT_fragment_shader_barycentric 1\n" "#define GL_EXT_shader_quad_control 1\n" "#define GL_EXT_texture_array 1\n" "#define GL_EXT_control_flow_attributes2 1\n" "#define GL_EXT_integer_dot_product 1\n" "#define GL_EXT_bfloat16 1\n" "#define GL_EXT_float_e5m2 1\n" "#define GL_EXT_float_e4m3 1\n" ; if (spvVersion.spv == 0) { preamble += "#define GL_ARB_bindless_texture 1\n"; } if (version >= 150) { // define GL_core_profile and GL_compatibility_profile preamble += "#define GL_core_profile 1\n"; if (profile == ECompatibilityProfile) preamble += "#define GL_compatibility_profile 1\n"; } if (version >= 140) { preamble += "#define GL_EXT_null_initializer 1\n"; preamble += "#define GL_EXT_subgroup_uniform_control_flow 1\n"; preamble += "#define GL_EXT_maximal_reconvergence 1\n"; } if (version >= 130) { preamble +="#define GL_FRAGMENT_PRECISION_HIGH 1\n"; } } if ((!isEsProfile() && version >= 140) || (isEsProfile() && version >= 310)) { preamble += "#define GL_EXT_device_group 1\n" "#define GL_EXT_multiview 1\n" "#define GL_NV_shader_sm_builtins 1\n" ; } if ((!isEsProfile() && version >= 130) || (isEsProfile() && version >= 300)) { preamble += "#define GL_EXT_texture_offset_non_const 1\n"; } if (version >= 300 /* both ES and non-ES */) { preamble += "#define GL_OVR_multiview 1\n" "#define GL_OVR_multiview2 1\n" ; } // #line and #include preamble += "#define GL_GOOGLE_cpp_style_line_directive 1\n" "#define GL_GOOGLE_include_directive 1\n" "#define GL_KHR_blend_equation_advanced 1\n" ; // other general extensions preamble += "#define GL_EXT_terminate_invocation 1\n" ; // #define VULKAN XXXX const int numberBufSize = 12; char numberBuf[numberBufSize]; if (spvVersion.vulkanGlsl > 0) { preamble += "#define VULKAN "; snprintf(numberBuf, numberBufSize, "%d", spvVersion.vulkanGlsl); preamble += numberBuf; preamble += "\n"; } // #define GL_SPIRV XXXX if (spvVersion.openGl > 0) { preamble += "#define GL_SPIRV "; snprintf(numberBuf, numberBufSize, "%d", spvVersion.openGl); preamble += numberBuf; preamble += "\n"; } // GL_EXT_spirv_intrinsics if (!isEsProfile()) { switch (language) { case EShLangVertex: preamble += "#define GL_VERTEX_SHADER 1 \n"; break; case EShLangTessControl: preamble += "#define GL_TESSELLATION_CONTROL_SHADER 1 \n"; break; case EShLangTessEvaluation: preamble += "#define GL_TESSELLATION_EVALUATION_SHADER 1 \n"; break; case EShLangGeometry: preamble += "#define GL_GEOMETRY_SHADER 1 \n"; break; case EShLangFragment: preamble += "#define GL_FRAGMENT_SHADER 1 \n"; break; case EShLangCompute: preamble += "#define GL_COMPUTE_SHADER 1 \n"; break; case EShLangRayGen: preamble += "#define GL_RAY_GENERATION_SHADER_EXT 1 \n"; break; case EShLangIntersect: preamble += "#define GL_INTERSECTION_SHADER_EXT 1 \n"; break; case EShLangAnyHit: preamble += "#define GL_ANY_HIT_SHADER_EXT 1 \n"; break; case EShLangClosestHit: preamble += "#define GL_CLOSEST_HIT_SHADER_EXT 1 \n"; break; case EShLangMiss: preamble += "#define GL_MISS_SHADER_EXT 1 \n"; break; case EShLangCallable: preamble += "#define GL_CALLABLE_SHADER_EXT 1 \n"; break; case EShLangTask: preamble += "#define GL_TASK_SHADER_NV 1 \n"; break; case EShLangMesh: preamble += "#define GL_MESH_SHADER_NV 1 \n"; break; default: break; } } } // // Map from stage enum to externally readable text name. // const char* StageName(EShLanguage stage) { switch(stage) { case EShLangVertex: return "vertex"; case EShLangFragment: return "fragment"; case EShLangCompute: return "compute"; case EShLangTessControl: return "tessellation control"; case EShLangTessEvaluation: return "tessellation evaluation"; case EShLangGeometry: return "geometry"; case EShLangRayGen: return "ray-generation"; case EShLangIntersect: return "intersection"; case EShLangAnyHit: return "any-hit"; case EShLangClosestHit: return "closest-hit"; case EShLangMiss: return "miss"; case EShLangCallable: return "callable"; case EShLangMesh: return "mesh"; case EShLangTask: return "task"; default: return "unknown stage"; } } // // When to use requireStage() // // If only some stages support a feature. // // Operation: If the current stage is not present, give an error message. // void TParseVersions::requireStage(const TSourceLoc& loc, EShLanguageMask languageMask, const char* featureDesc) { if (((1 << language) & languageMask) == 0) error(loc, "not supported in this stage:", featureDesc, StageName(language)); } // If only one stage supports a feature, this can be called. But, all supporting stages // must be specified with one call. void TParseVersions::requireStage(const TSourceLoc& loc, EShLanguage stage, const char* featureDesc) { requireStage(loc, static_cast(1 << stage), featureDesc); } // // When to use requireProfile(): // // Use if only some profiles support a feature. However, if within a profile the feature // is version or extension specific, follow this call with calls to profileRequires(). // // Operation: If the current profile is not one of the profileMask, // give an error message. // void TParseVersions::requireProfile(const TSourceLoc& loc, int profileMask, const char* featureDesc) { if (! (profile & profileMask)) error(loc, "not supported with this profile:", featureDesc, ProfileName(profile)); } // // When to use profileRequires(): // // If a set of profiles have the same requirements for what version or extensions // are needed to support a feature. // // It must be called for each profile that needs protection. Use requireProfile() first // to reduce that set of profiles. // // Operation: Will issue warnings/errors based on the current profile, version, and extension // behaviors. It only checks extensions when the current profile is one of the profileMask. // // A minVersion of 0 means no version of the profileMask support this in core, // the extension must be present. // // entry point that takes multiple extensions void TParseVersions::profileRequires(const TSourceLoc& loc, int profileMask, int minVersion, int numExtensions, const char* const extensions[], const char* featureDesc) { if (profile & profileMask) { bool okay = minVersion > 0 && version >= minVersion; for (int i = 0; i < numExtensions; ++i) { switch (getExtensionBehavior(extensions[i])) { case EBhWarn: infoSink.info.message(EPrefixWarning, ("extension " + TString(extensions[i]) + " is being used for " + featureDesc).c_str(), loc, messages & EShMsgAbsolutePath, messages & EShMsgDisplayErrorColumn); [[fallthrough]]; case EBhRequire: case EBhEnable: okay = true; break; default: break; // some compilers want this } } if (! okay) error(loc, "not supported for this version or the enabled extensions", featureDesc, ""); } } // entry point for the above that takes a single extension void TParseVersions::profileRequires(const TSourceLoc& loc, int profileMask, int minVersion, const char* extension, const char* featureDesc) { profileRequires(loc, profileMask, minVersion, extension ? 1 : 0, &extension, featureDesc); } void TParseVersions::unimplemented(const TSourceLoc& loc, const char* featureDesc) { error(loc, "feature not yet implemented", featureDesc, ""); } // // Within a set of profiles, see if a feature is deprecated and give an error or warning based on whether // a future compatibility context is being use. // void TParseVersions::checkDeprecated(const TSourceLoc& loc, int profileMask, int depVersion, const char* featureDesc) { if (profile & profileMask) { if (version >= depVersion) { if (forwardCompatible) error(loc, "deprecated, may be removed in future release", featureDesc, ""); else if (! suppressWarnings()) infoSink.info.message(EPrefixWarning, (TString(featureDesc) + " deprecated in version " + String(depVersion) + "; may be removed in future release").c_str(), loc, messages & EShMsgAbsolutePath, messages & EShMsgDisplayErrorColumn); } } } // // Within a set of profiles, see if a feature has now been removed and if so, give an error. // The version argument is the first version no longer having the feature. // void TParseVersions::requireNotRemoved(const TSourceLoc& loc, int profileMask, int removedVersion, const char* featureDesc) { if (profile & profileMask) { if (version >= removedVersion) { const int maxSize = 60; char buf[maxSize]; snprintf(buf, maxSize, "%s profile; removed in version %d", ProfileName(profile), removedVersion); error(loc, "no longer supported in", featureDesc, buf); } } } // Returns true if at least one of the extensions in the extensions parameter is requested. Otherwise, returns false. // Warns appropriately if the requested behavior of an extension is "warn". bool TParseVersions::checkExtensionsRequested(const TSourceLoc& loc, int numExtensions, const char* const extensions[], const char* featureDesc) { // First, see if any of the extensions are enabled for (int i = 0; i < numExtensions; ++i) { TExtensionBehavior behavior = getExtensionBehavior(extensions[i]); if (behavior == EBhEnable || behavior == EBhRequire) return true; } // See if any extensions want to give a warning on use; give warnings for all such extensions bool warned = false; for (int i = 0; i < numExtensions; ++i) { TExtensionBehavior behavior = getExtensionBehavior(extensions[i]); if (behavior == EBhDisable && relaxedErrors()) { infoSink.info.message(EPrefixWarning, "The following extension must be enabled to use this feature:", loc, messages & EShMsgAbsolutePath, messages & EShMsgDisplayErrorColumn); behavior = EBhWarn; } if (behavior == EBhWarn) { infoSink.info.message(EPrefixWarning, ("extension " + TString(extensions[i]) + " is being used for " + featureDesc).c_str(), loc, messages & EShMsgAbsolutePath, messages & EShMsgDisplayErrorColumn); warned = true; } } if (warned) return true; return false; } // // Use when there are no profile/version to check, it's just an error if one of the // extensions is not present. // void TParseVersions::requireExtensions(const TSourceLoc& loc, int numExtensions, const char* const extensions[], const char* featureDesc) { if (checkExtensionsRequested(loc, numExtensions, extensions, featureDesc)) return; // If we get this far, give errors explaining what extensions are needed if (numExtensions == 1) error(loc, "required extension not requested:", featureDesc, extensions[0]); else { error(loc, "required extension not requested:", featureDesc, "Possible extensions include:"); for (int i = 0; i < numExtensions; ++i) infoSink.info.message(EPrefixNone, extensions[i]); } } // // Use by preprocessor when there are no profile/version to check, it's just an error if one of the // extensions is not present. // void TParseVersions::ppRequireExtensions(const TSourceLoc& loc, int numExtensions, const char* const extensions[], const char* featureDesc) { if (checkExtensionsRequested(loc, numExtensions, extensions, featureDesc)) return; // If we get this far, give errors explaining what extensions are needed if (numExtensions == 1) ppError(loc, "required extension not requested:", featureDesc, extensions[0]); else { ppError(loc, "required extension not requested:", featureDesc, "Possible extensions include:"); for (int i = 0; i < numExtensions; ++i) infoSink.info.message(EPrefixNone, extensions[i]); } } TExtensionBehavior TParseVersions::getExtensionBehavior(const char* extension) { auto iter = extensionBehavior.find(TString(extension)); if (iter == extensionBehavior.end()) return EBhMissing; else return iter->second; } // Returns true if the given extension is set to enable, require, or warn. bool TParseVersions::extensionTurnedOn(const char* const extension) { switch (getExtensionBehavior(extension)) { case EBhEnable: case EBhRequire: case EBhWarn: return true; default: break; } return false; } // See if any of the extensions are set to enable, require, or warn. bool TParseVersions::extensionsTurnedOn(int numExtensions, const char* const extensions[]) { for (int i = 0; i < numExtensions; ++i) { if (extensionTurnedOn(extensions[i])) return true; } return false; } // // Change the current state of an extension's behavior. // void TParseVersions::updateExtensionBehavior(int line, const char* extension, const char* behaviorString) { // Translate from text string of extension's behavior to an enum. TExtensionBehavior behavior = EBhDisable; if (! strcmp("require", behaviorString)) behavior = EBhRequire; else if (! strcmp("enable", behaviorString)) behavior = EBhEnable; else if (! strcmp("disable", behaviorString)) behavior = EBhDisable; else if (! strcmp("warn", behaviorString)) behavior = EBhWarn; else { error(getCurrentLoc(), "behavior not supported:", "#extension", behaviorString); return; } bool on = behavior != EBhDisable; // check if extension is used with correct shader stage checkExtensionStage(getCurrentLoc(), extension); // check if extension has additional requirements extensionRequires(getCurrentLoc(), extension, behaviorString); // update the requested extension updateExtensionBehavior(extension, behavior); // see if need to propagate to implicitly modified things if (strcmp(extension, "GL_ANDROID_extension_pack_es31a") == 0) { // to everything in AEP updateExtensionBehavior(line, "GL_KHR_blend_equation_advanced", behaviorString); updateExtensionBehavior(line, "GL_OES_sample_variables", behaviorString); updateExtensionBehavior(line, "GL_OES_shader_image_atomic", behaviorString); updateExtensionBehavior(line, "GL_OES_shader_multisample_interpolation", behaviorString); updateExtensionBehavior(line, "GL_OES_texture_storage_multisample_2d_array", behaviorString); updateExtensionBehavior(line, "GL_EXT_geometry_shader", behaviorString); updateExtensionBehavior(line, "GL_EXT_gpu_shader5", behaviorString); updateExtensionBehavior(line, "GL_EXT_primitive_bounding_box", behaviorString); updateExtensionBehavior(line, "GL_EXT_shader_io_blocks", behaviorString); updateExtensionBehavior(line, "GL_EXT_tessellation_shader", behaviorString); updateExtensionBehavior(line, "GL_EXT_texture_buffer", behaviorString); updateExtensionBehavior(line, "GL_EXT_texture_cube_map_array", behaviorString); } // geometry to io_blocks else if (strcmp(extension, "GL_EXT_geometry_shader") == 0) updateExtensionBehavior(line, "GL_EXT_shader_io_blocks", behaviorString); else if (strcmp(extension, "GL_OES_geometry_shader") == 0) updateExtensionBehavior(line, "GL_OES_shader_io_blocks", behaviorString); // tessellation to io_blocks else if (strcmp(extension, "GL_EXT_tessellation_shader") == 0) updateExtensionBehavior(line, "GL_EXT_shader_io_blocks", behaviorString); else if (strcmp(extension, "GL_OES_tessellation_shader") == 0) updateExtensionBehavior(line, "GL_OES_shader_io_blocks", behaviorString); else if (strcmp(extension, "GL_GOOGLE_include_directive") == 0) updateExtensionBehavior(line, "GL_GOOGLE_cpp_style_line_directive", behaviorString); else if (strcmp(extension, "GL_ARB_shading_language_include") == 0) updateExtensionBehavior(line, "GL_GOOGLE_cpp_style_line_directive", behaviorString); // subgroup_* to subgroup_basic else if (strcmp(extension, "GL_KHR_shader_subgroup_vote") == 0) updateExtensionBehavior(line, "GL_KHR_shader_subgroup_basic", behaviorString); else if (strcmp(extension, "GL_KHR_shader_subgroup_arithmetic") == 0) updateExtensionBehavior(line, "GL_KHR_shader_subgroup_basic", behaviorString); else if (strcmp(extension, "GL_KHR_shader_subgroup_ballot") == 0) updateExtensionBehavior(line, "GL_KHR_shader_subgroup_basic", behaviorString); else if (strcmp(extension, "GL_KHR_shader_subgroup_shuffle") == 0) updateExtensionBehavior(line, "GL_KHR_shader_subgroup_basic", behaviorString); else if (strcmp(extension, "GL_KHR_shader_subgroup_shuffle_relative") == 0) updateExtensionBehavior(line, "GL_KHR_shader_subgroup_basic", behaviorString); else if (strcmp(extension, "GL_KHR_shader_subgroup_clustered") == 0) updateExtensionBehavior(line, "GL_KHR_shader_subgroup_basic", behaviorString); else if (strcmp(extension, "GL_KHR_shader_subgroup_quad") == 0) updateExtensionBehavior(line, "GL_KHR_shader_subgroup_basic", behaviorString); else if (strcmp(extension, "GL_NV_shader_subgroup_partitioned") == 0) updateExtensionBehavior(line, "GL_KHR_shader_subgroup_basic", behaviorString); else if (strcmp(extension, "GL_EXT_buffer_reference2") == 0 || strcmp(extension, "GL_EXT_buffer_reference_uvec2") == 0) updateExtensionBehavior(line, "GL_EXT_buffer_reference", behaviorString); else if (strcmp(extension, "GL_NV_integer_cooperative_matrix") == 0) updateExtensionBehavior(line, "GL_NV_cooperative_matrix", behaviorString); else if (strcmp(extension, "GL_NV_cooperative_matrix2") == 0) updateExtensionBehavior(line, "GL_KHR_cooperative_matrix", behaviorString); // subgroup extended types to explicit types else if (strcmp(extension, "GL_EXT_shader_subgroup_extended_types_int8") == 0) updateExtensionBehavior(line, "GL_EXT_shader_explicit_arithmetic_types_int8", behaviorString); else if (strcmp(extension, "GL_EXT_shader_subgroup_extended_types_int16") == 0) updateExtensionBehavior(line, "GL_EXT_shader_explicit_arithmetic_types_int16", behaviorString); else if (strcmp(extension, "GL_EXT_shader_subgroup_extended_types_int64") == 0) updateExtensionBehavior(line, "GL_EXT_shader_explicit_arithmetic_types_int64", behaviorString); else if (strcmp(extension, "GL_EXT_shader_subgroup_extended_types_float16") == 0) updateExtensionBehavior(line, "GL_EXT_shader_explicit_arithmetic_types_float16", behaviorString); // see if we need to update the numeric features else if (strcmp(extension, "GL_EXT_shader_explicit_arithmetic_types") == 0) intermediate.updateNumericFeature(TNumericFeatures::shader_explicit_arithmetic_types, on); else if (strcmp(extension, "GL_EXT_shader_explicit_arithmetic_types_int8") == 0) intermediate.updateNumericFeature(TNumericFeatures::shader_explicit_arithmetic_types_int8, on); else if (strcmp(extension, "GL_EXT_shader_explicit_arithmetic_types_int16") == 0) intermediate.updateNumericFeature(TNumericFeatures::shader_explicit_arithmetic_types_int16, on); else if (strcmp(extension, "GL_EXT_shader_explicit_arithmetic_types_int32") == 0) intermediate.updateNumericFeature(TNumericFeatures::shader_explicit_arithmetic_types_int32, on); else if (strcmp(extension, "GL_EXT_shader_explicit_arithmetic_types_int64") == 0) intermediate.updateNumericFeature(TNumericFeatures::shader_explicit_arithmetic_types_int64, on); else if (strcmp(extension, "GL_EXT_shader_explicit_arithmetic_types_float16") == 0) intermediate.updateNumericFeature(TNumericFeatures::shader_explicit_arithmetic_types_float16, on); else if (strcmp(extension, "GL_EXT_shader_explicit_arithmetic_types_float32") == 0) intermediate.updateNumericFeature(TNumericFeatures::shader_explicit_arithmetic_types_float32, on); else if (strcmp(extension, "GL_EXT_shader_explicit_arithmetic_types_float64") == 0) intermediate.updateNumericFeature(TNumericFeatures::shader_explicit_arithmetic_types_float64, on); else if (strcmp(extension, "GL_EXT_shader_implicit_conversions") == 0) intermediate.updateNumericFeature(TNumericFeatures::shader_implicit_conversions, on); else if (strcmp(extension, "GL_ARB_gpu_shader_fp64") == 0) intermediate.updateNumericFeature(TNumericFeatures::gpu_shader_fp64, on); else if (strcmp(extension, "GL_AMD_gpu_shader_int16") == 0) intermediate.updateNumericFeature(TNumericFeatures::gpu_shader_int16, on); else if (strcmp(extension, "GL_AMD_gpu_shader_half_float") == 0) intermediate.updateNumericFeature(TNumericFeatures::gpu_shader_half_float, on); else if (strcmp(extension, "GL_NV_gpu_shader5") == 0) { intermediate.updateNumericFeature(TNumericFeatures::nv_gpu_shader5_types, on); } } void TParseVersions::updateExtensionBehavior(const char* extension, TExtensionBehavior behavior) { // Update the current behavior if (strcmp(extension, "all") == 0) { // special case for the 'all' extension; apply it to every extension present if (behavior == EBhRequire || behavior == EBhEnable) { error(getCurrentLoc(), "extension 'all' cannot have 'require' or 'enable' behavior", "#extension", ""); return; } else { for (auto iter = extensionBehavior.begin(); iter != extensionBehavior.end(); ++iter) iter->second = behavior; } } else { // Do the update for this single extension auto iter = extensionBehavior.find(TString(extension)); if (iter == extensionBehavior.end()) { switch (behavior) { case EBhRequire: error(getCurrentLoc(), "extension not supported:", "#extension", extension); break; case EBhEnable: case EBhWarn: case EBhDisable: warn(getCurrentLoc(), "extension not supported:", "#extension", extension); break; default: assert(0 && "unexpected behavior"); } return; } else { if (iter->second == EBhDisablePartial) warn(getCurrentLoc(), "extension is only partially supported:", "#extension", extension); if (behavior != EBhDisable) intermediate.addRequestedExtension(extension); iter->second = behavior; } } } // Check if extension is used with correct shader stage. void TParseVersions::checkExtensionStage(const TSourceLoc& loc, const char * const extension) { // GL_NV_mesh_shader extension is only allowed in task/mesh shaders if (strcmp(extension, "GL_NV_mesh_shader") == 0) { requireStage(loc, (EShLanguageMask)(EShLangTaskMask | EShLangMeshMask | EShLangFragmentMask), "#extension GL_NV_mesh_shader"); profileRequires(loc, ECoreProfile, 450, nullptr, "#extension GL_NV_mesh_shader"); profileRequires(loc, EEsProfile, 320, nullptr, "#extension GL_NV_mesh_shader"); if (extensionTurnedOn(E_GL_EXT_mesh_shader)) { error(loc, "GL_EXT_mesh_shader is already turned on, and not allowed with", "#extension", extension); } } else if (strcmp(extension, "GL_EXT_mesh_shader") == 0) { requireStage(loc, (EShLanguageMask)(EShLangTaskMask | EShLangMeshMask | EShLangFragmentMask), "#extension GL_EXT_mesh_shader"); profileRequires(loc, ECoreProfile, 450, nullptr, "#extension GL_EXT_mesh_shader"); profileRequires(loc, EEsProfile, 320, nullptr, "#extension GL_EXT_mesh_shader"); if (extensionTurnedOn(E_GL_NV_mesh_shader)) { error(loc, "GL_NV_mesh_shader is already turned on, and not allowed with", "#extension", extension); } } } // Check if extension has additional requirements void TParseVersions::extensionRequires(const TSourceLoc &loc, const char * const extension, const char *behaviorString) { bool isEnabled = false; if (!strcmp("require", behaviorString)) isEnabled = true; else if (!strcmp("enable", behaviorString)) isEnabled = true; if (isEnabled) { unsigned int minSpvVersion = 0; auto iter = extensionMinSpv.find(TString(extension)); if (iter != extensionMinSpv.end()) minSpvVersion = iter->second; requireSpv(loc, extension, minSpvVersion); } if (spvVersion.spv != 0){ for (auto ext : spvUnsupportedExt){ if (strcmp(extension, ext.c_str()) == 0) error(loc, "not allowed when using generating SPIR-V codes", extension, ""); } } } // Call for any operation needing full GLSL integer data-type support. void TParseVersions::fullIntegerCheck(const TSourceLoc& loc, const char* op) { profileRequires(loc, ENoProfile, 130, nullptr, op); profileRequires(loc, EEsProfile, 300, nullptr, op); } // Call for any operation needing GLSL double data-type support. void TParseVersions::doubleCheck(const TSourceLoc& loc, const char* op) { //requireProfile(loc, ECoreProfile | ECompatibilityProfile, op); if (language == EShLangVertex) { const char* const f64_Extensions[] = {E_GL_ARB_gpu_shader_fp64, E_GL_ARB_vertex_attrib_64bit}; profileRequires(loc, ECoreProfile | ECompatibilityProfile, 400, 2, f64_Extensions, op); } else profileRequires(loc, ECoreProfile | ECompatibilityProfile, 400, E_GL_ARB_gpu_shader_fp64, op); } // Call for any operation needing GLSL float16 data-type support. void TParseVersions::float16Check(const TSourceLoc& loc, const char* op, bool builtIn) { if (!builtIn) { const char* const extensions[] = { E_GL_AMD_gpu_shader_half_float, E_GL_EXT_shader_explicit_arithmetic_types, E_GL_EXT_shader_explicit_arithmetic_types_float16}; requireExtensions(loc, sizeof(extensions)/sizeof(extensions[0]), extensions, op); } } bool TParseVersions::float16Arithmetic() { const char* const extensions[] = { E_GL_AMD_gpu_shader_half_float, E_GL_EXT_shader_explicit_arithmetic_types, E_GL_NV_gpu_shader5, E_GL_EXT_shader_explicit_arithmetic_types_float16}; return extensionsTurnedOn(sizeof(extensions)/sizeof(extensions[0]), extensions); } bool TParseVersions::int16Arithmetic() { const char* const extensions[] = { E_GL_AMD_gpu_shader_int16, E_GL_EXT_shader_explicit_arithmetic_types, E_GL_NV_gpu_shader5, E_GL_EXT_shader_explicit_arithmetic_types_int16}; return extensionsTurnedOn(sizeof(extensions)/sizeof(extensions[0]), extensions); } bool TParseVersions::int8Arithmetic() { const char* const extensions[] = { E_GL_EXT_shader_explicit_arithmetic_types, E_GL_NV_gpu_shader5, E_GL_EXT_shader_explicit_arithmetic_types_int8}; return extensionsTurnedOn(sizeof(extensions)/sizeof(extensions[0]), extensions); } void TParseVersions::requireFloat16Arithmetic(const TSourceLoc& loc, const char* op, const char* featureDesc) { TString combined; combined = op; combined += ": "; combined += featureDesc; const char* const extensions[] = { E_GL_AMD_gpu_shader_half_float, E_GL_EXT_shader_explicit_arithmetic_types, E_GL_NV_gpu_shader5, E_GL_EXT_shader_explicit_arithmetic_types_float16}; requireExtensions(loc, sizeof(extensions)/sizeof(extensions[0]), extensions, combined.c_str()); } void TParseVersions::requireInt16Arithmetic(const TSourceLoc& loc, const char* op, const char* featureDesc) { TString combined; combined = op; combined += ": "; combined += featureDesc; const char* const extensions[] = { E_GL_AMD_gpu_shader_int16, E_GL_EXT_shader_explicit_arithmetic_types, E_GL_NV_gpu_shader5, E_GL_EXT_shader_explicit_arithmetic_types_int16}; requireExtensions(loc, sizeof(extensions)/sizeof(extensions[0]), extensions, combined.c_str()); } void TParseVersions::requireInt8Arithmetic(const TSourceLoc& loc, const char* op, const char* featureDesc) { TString combined; combined = op; combined += ": "; combined += featureDesc; const char* const extensions[] = { E_GL_EXT_shader_explicit_arithmetic_types, E_GL_NV_gpu_shader5, E_GL_EXT_shader_explicit_arithmetic_types_int8}; requireExtensions(loc, sizeof(extensions)/sizeof(extensions[0]), extensions, combined.c_str()); } void TParseVersions::float16ScalarVectorCheck(const TSourceLoc& loc, const char* op, bool builtIn) { if (!builtIn) { const char* const extensions[] = { E_GL_AMD_gpu_shader_half_float, E_GL_EXT_shader_16bit_storage, E_GL_EXT_shader_explicit_arithmetic_types, E_GL_NV_gpu_shader5, E_GL_EXT_shader_explicit_arithmetic_types_float16}; requireExtensions(loc, sizeof(extensions)/sizeof(extensions[0]), extensions, op); } } void TParseVersions::bfloat16ScalarVectorCheck(const TSourceLoc& loc, const char* op, bool builtIn) { if (!builtIn) { const char* const extensions[] = { E_GL_EXT_bfloat16, }; requireExtensions(loc, sizeof(extensions)/sizeof(extensions[0]), extensions, op); } } void TParseVersions::floate5m2ScalarVectorCheck(const TSourceLoc& loc, const char* op, bool builtIn) { if (!builtIn) { const char* const extensions[] = { E_GL_EXT_float_e5m2, }; requireExtensions(loc, sizeof(extensions)/sizeof(extensions[0]), extensions, op); } } void TParseVersions::floate4m3ScalarVectorCheck(const TSourceLoc& loc, const char* op, bool builtIn) { if (!builtIn) { const char* const extensions[] = { E_GL_EXT_float_e4m3, }; requireExtensions(loc, sizeof(extensions)/sizeof(extensions[0]), extensions, op); } } // Call for any operation needing GLSL float32 data-type support. void TParseVersions::explicitFloat32Check(const TSourceLoc& loc, const char* op, bool builtIn) { if (!builtIn) { const char* const extensions[] = {E_GL_EXT_shader_explicit_arithmetic_types, E_GL_NV_gpu_shader5, E_GL_EXT_shader_explicit_arithmetic_types_float32}; requireExtensions(loc, sizeof(extensions) / sizeof(extensions[0]), extensions, op); } } // Call for any operation needing GLSL float64 data-type support. void TParseVersions::explicitFloat64Check(const TSourceLoc& loc, const char* op, bool builtIn) { if (!builtIn) { const char* const extensions[] = {E_GL_EXT_shader_explicit_arithmetic_types, E_GL_NV_gpu_shader5, E_GL_EXT_shader_explicit_arithmetic_types_float64}; requireExtensions(loc, sizeof(extensions) / sizeof(extensions[0]), extensions, op); requireProfile(loc, ECoreProfile | ECompatibilityProfile, op); if(extensionTurnedOn(E_GL_ARB_gpu_shader_fp64) && extensionTurnedOn(E_GL_NV_gpu_shader5)) profileRequires(loc, ECoreProfile | ECompatibilityProfile, 150, nullptr, op); else profileRequires(loc, ECoreProfile | ECompatibilityProfile, 400, nullptr, op); } } // Call for any operation needing GLSL explicit int8 data-type support. void TParseVersions::explicitInt8Check(const TSourceLoc& loc, const char* op, bool builtIn) { if (! builtIn) { const char* const extensions[2] = {E_GL_EXT_shader_explicit_arithmetic_types, E_GL_EXT_shader_explicit_arithmetic_types_int8}; requireExtensions(loc, 2, extensions, op); } } // Call for any operation needing GLSL float16 opaque-type support void TParseVersions::float16OpaqueCheck(const TSourceLoc& loc, const char* op, bool builtIn) { if (! builtIn) { requireExtensions(loc, 1, &E_GL_AMD_gpu_shader_half_float_fetch, op); requireProfile(loc, ECoreProfile | ECompatibilityProfile, op); profileRequires(loc, ECoreProfile | ECompatibilityProfile, 400, nullptr, op); } } // Call for any operation needing GLSL explicit int16 data-type support. void TParseVersions::explicitInt16Check(const TSourceLoc& loc, const char* op, bool builtIn) { if (! builtIn) { const char* const extensions[] = { E_GL_AMD_gpu_shader_int16, E_GL_EXT_shader_explicit_arithmetic_types, E_GL_EXT_shader_explicit_arithmetic_types_int16}; requireExtensions(loc, sizeof(extensions)/sizeof(extensions[0]), extensions, op); } } void TParseVersions::int16ScalarVectorCheck(const TSourceLoc& loc, const char* op, bool builtIn) { if (! builtIn) { const char* const extensions[] = { E_GL_AMD_gpu_shader_int16, E_GL_EXT_shader_16bit_storage, E_GL_EXT_shader_explicit_arithmetic_types, E_GL_NV_gpu_shader5, E_GL_EXT_shader_explicit_arithmetic_types_int16}; requireExtensions(loc, sizeof(extensions)/sizeof(extensions[0]), extensions, op); } } void TParseVersions::int8ScalarVectorCheck(const TSourceLoc& loc, const char* op, bool builtIn) { if (! builtIn) { const char* const extensions[] = { E_GL_EXT_shader_8bit_storage, E_GL_EXT_shader_explicit_arithmetic_types, E_GL_NV_gpu_shader5, E_GL_EXT_shader_explicit_arithmetic_types_int8}; requireExtensions(loc, sizeof(extensions)/sizeof(extensions[0]), extensions, op); } } // Call for any operation needing GLSL explicit int32 data-type support. void TParseVersions::explicitInt32Check(const TSourceLoc& loc, const char* op, bool builtIn) { if (! builtIn) { const char* const extensions[] = {E_GL_EXT_shader_explicit_arithmetic_types, E_GL_NV_gpu_shader5, E_GL_EXT_shader_explicit_arithmetic_types_int32}; requireExtensions(loc, sizeof(extensions) / sizeof(extensions[0]), extensions, op); } } // Call for any operation needing GLSL 64-bit integer data-type support. void TParseVersions::int64Check(const TSourceLoc& loc, const char* op, bool builtIn) { if (! builtIn) { const char* const extensions[] = {E_GL_ARB_gpu_shader_int64, E_GL_EXT_shader_explicit_arithmetic_types, E_GL_NV_gpu_shader5, E_GL_EXT_shader_explicit_arithmetic_types_int64}; requireExtensions(loc, sizeof(extensions) / sizeof(extensions[0]), extensions, op); requireProfile(loc, ECoreProfile | ECompatibilityProfile, op); if (extensionTurnedOn(E_GL_NV_gpu_shader5)) profileRequires(loc, ECoreProfile | ECompatibilityProfile, 150, nullptr, op); else profileRequires(loc, ECoreProfile | ECompatibilityProfile, 400, nullptr, op); } } void TParseVersions::fcoopmatCheckNV(const TSourceLoc& loc, const char* op, bool builtIn) { if (!builtIn) { const char* const extensions[] = {E_GL_NV_cooperative_matrix}; requireExtensions(loc, sizeof(extensions)/sizeof(extensions[0]), extensions, op); } } void TParseVersions::intcoopmatCheckNV(const TSourceLoc& loc, const char* op, bool builtIn) { if (!builtIn) { const char* const extensions[] = {E_GL_NV_integer_cooperative_matrix}; requireExtensions(loc, sizeof(extensions)/sizeof(extensions[0]), extensions, op); } } void TParseVersions::coopmatCheck(const TSourceLoc& loc, const char* op, bool builtIn) { if (!builtIn) { const char* const extensions[] = {E_GL_KHR_cooperative_matrix}; requireExtensions(loc, sizeof(extensions)/sizeof(extensions[0]), extensions, op); } } void TParseVersions::tensorLayoutViewCheck(const TSourceLoc& loc, const char* op, bool builtIn) { if (!builtIn) { const char* const extensions[] = {E_GL_NV_cooperative_matrix2}; requireExtensions(loc, sizeof(extensions)/sizeof(extensions[0]), extensions, op); } } void TParseVersions::coopvecCheck(const TSourceLoc& loc, const char* op, bool builtIn) { if (!builtIn) { const char* const extensions[] = {E_GL_NV_cooperative_vector}; requireExtensions(loc, sizeof(extensions)/sizeof(extensions[0]), extensions, op); } } void TParseVersions::intattachmentCheck(const TSourceLoc& loc, const char* op, bool builtIn) { if (!builtIn) { const char* const extensions[] = {E_GL_QCOM_tile_shading}; requireExtensions(loc, sizeof(extensions)/sizeof(extensions[0]), extensions, op); } } // Call for any operation removed because SPIR-V is in use. void TParseVersions::spvRemoved(const TSourceLoc& loc, const char* op) { if (spvVersion.spv != 0) error(loc, "not allowed when generating SPIR-V", op, ""); } // Call for any operation removed because Vulkan SPIR-V is being generated. void TParseVersions::vulkanRemoved(const TSourceLoc& loc, const char* op) { if (spvVersion.vulkan > 0 && !spvVersion.vulkanRelaxed) error(loc, "not allowed when using GLSL for Vulkan", op, ""); } // Call for any operation that requires Vulkan. void TParseVersions::requireVulkan(const TSourceLoc& loc, const char* op) { if (spvVersion.vulkan == 0) error(loc, "only allowed when using GLSL for Vulkan", op, ""); } // Call for any operation that requires SPIR-V. void TParseVersions::requireSpv(const TSourceLoc& loc, const char* op) { if (spvVersion.spv == 0) error(loc, "only allowed when generating SPIR-V", op, ""); } void TParseVersions::requireSpv(const TSourceLoc& loc, const char *op, unsigned int version) { if (spvVersion.spv < version) error(loc, "not supported for current targeted SPIR-V version", op, ""); } } // end namespace glslang ================================================ FILE: src/libraries/glslang/glslang/MachineIndependent/Versions.h ================================================ // // Copyright (C) 2002-2005 3Dlabs Inc. Ltd. // Copyright (C) 2012-2013 LunarG, Inc. // Copyright (C) 2017, 2022-2024 Arm Limited. // Copyright (C) 2015-2018 Google, Inc. // Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights reserved. // Modifications Copyright (C) 2024 Valve Corporation. // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following // disclaimer in the documentation and/or other materials provided // with the distribution. // // Neither the name of 3Dlabs Inc. Ltd. nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // #ifndef _VERSIONS_INCLUDED_ #define _VERSIONS_INCLUDED_ #define LAST_ELEMENT_MARKER(x) x // // Help manage multiple profiles, versions, extensions etc. // // // Profiles are set up for masking operations, so queries can be done on multiple // profiles at the same time. // // Don't maintain an ordinal set of enums (0,1,2,3...) to avoid all possible // defects from mixing the two different forms. // typedef enum : unsigned { EBadProfile = 0, ENoProfile = (1 << 0), // only for desktop, before profiles showed up ECoreProfile = (1 << 1), ECompatibilityProfile = (1 << 2), EEsProfile = (1 << 3), LAST_ELEMENT_MARKER(EProfileCount), } EProfile; namespace glslang { // // Map from profile enum to externally readable text name. // inline const char* ProfileName(EProfile profile) { switch (profile) { case ENoProfile: return "none"; case ECoreProfile: return "core"; case ECompatibilityProfile: return "compatibility"; case EEsProfile: return "es"; default: return "unknown profile"; } } // // What source rules, validation rules, target language, etc. are needed or // desired for SPIR-V? // // 0 means a target or rule set is not enabled (ignore rules from that entity). // Non-0 means to apply semantic rules arising from that version of its rule set. // The union of all requested rule sets will be applied. // struct SpvVersion { SpvVersion() : spv(0), vulkanGlsl(0), vulkan(0), openGl(0), vulkanRelaxed(false) {} unsigned int spv; // the version of SPIR-V to target, as defined by "word 1" of the SPIR-V binary header int vulkanGlsl; // the version of GLSL semantics for Vulkan, from GL_KHR_vulkan_glsl, for "#define VULKAN XXX" int vulkan; // the version of Vulkan, for which SPIR-V execution environment rules to use int openGl; // the version of GLSL semantics for OpenGL, from GL_ARB_gl_spirv, for "#define GL_SPIRV XXX" bool vulkanRelaxed; // relax changes to GLSL for Vulkan, allowing some GL-specific to be compiled to Vulkan SPIR-V target }; // // The behaviors from the GLSL "#extension extension_name : behavior" // typedef enum { EBhMissing = 0, EBhRequire, EBhEnable, EBhWarn, EBhDisable, EBhDisablePartial // use as initial state of an extension that is only partially implemented } TExtensionBehavior; // // Symbolic names for extensions. Strings may be directly used when calling the // functions, but better to have the compiler do spelling checks. // const char* const E_GL_OES_texture_3D = "GL_OES_texture_3D"; const char* const E_GL_OES_standard_derivatives = "GL_OES_standard_derivatives"; const char* const E_GL_EXT_frag_depth = "GL_EXT_frag_depth"; const char* const E_GL_OES_EGL_image_external = "GL_OES_EGL_image_external"; const char* const E_GL_OES_EGL_image_external_essl3 = "GL_OES_EGL_image_external_essl3"; const char* const E_GL_EXT_YUV_target = "GL_EXT_YUV_target"; const char* const E_GL_EXT_shader_texture_lod = "GL_EXT_shader_texture_lod"; const char* const E_GL_EXT_shadow_samplers = "GL_EXT_shadow_samplers"; const char* const E_GL_ARB_texture_rectangle = "GL_ARB_texture_rectangle"; const char* const E_GL_3DL_array_objects = "GL_3DL_array_objects"; const char* const E_GL_ARB_shading_language_420pack = "GL_ARB_shading_language_420pack"; const char* const E_GL_ARB_texture_gather = "GL_ARB_texture_gather"; const char* const E_GL_ARB_gpu_shader5 = "GL_ARB_gpu_shader5"; const char* const E_GL_ARB_separate_shader_objects = "GL_ARB_separate_shader_objects"; const char* const E_GL_ARB_compute_shader = "GL_ARB_compute_shader"; const char* const E_GL_ARB_tessellation_shader = "GL_ARB_tessellation_shader"; const char* const E_GL_ARB_enhanced_layouts = "GL_ARB_enhanced_layouts"; const char* const E_GL_ARB_texture_cube_map_array = "GL_ARB_texture_cube_map_array"; const char* const E_GL_ARB_texture_multisample = "GL_ARB_texture_multisample"; const char* const E_GL_ARB_shader_texture_lod = "GL_ARB_shader_texture_lod"; const char* const E_GL_ARB_explicit_attrib_location = "GL_ARB_explicit_attrib_location"; const char* const E_GL_ARB_explicit_uniform_location = "GL_ARB_explicit_uniform_location"; const char* const E_GL_ARB_shader_image_load_store = "GL_ARB_shader_image_load_store"; const char* const E_GL_ARB_shader_atomic_counters = "GL_ARB_shader_atomic_counters"; const char* const E_GL_ARB_shader_atomic_counter_ops = "GL_ARB_shader_atomic_counter_ops"; const char* const E_GL_ARB_shader_draw_parameters = "GL_ARB_shader_draw_parameters"; const char* const E_GL_ARB_shader_group_vote = "GL_ARB_shader_group_vote"; const char* const E_GL_ARB_derivative_control = "GL_ARB_derivative_control"; const char* const E_GL_ARB_shader_texture_image_samples = "GL_ARB_shader_texture_image_samples"; const char* const E_GL_ARB_viewport_array = "GL_ARB_viewport_array"; const char* const E_GL_ARB_gpu_shader_int64 = "GL_ARB_gpu_shader_int64"; const char* const E_GL_ARB_gpu_shader_fp64 = "GL_ARB_gpu_shader_fp64"; const char* const E_GL_ARB_shader_ballot = "GL_ARB_shader_ballot"; const char* const E_GL_ARB_sparse_texture2 = "GL_ARB_sparse_texture2"; const char* const E_GL_ARB_sparse_texture_clamp = "GL_ARB_sparse_texture_clamp"; const char* const E_GL_ARB_shader_stencil_export = "GL_ARB_shader_stencil_export"; // const char* const E_GL_ARB_cull_distance = "GL_ARB_cull_distance"; // present for 4.5, but need extension control over block members const char* const E_GL_ARB_post_depth_coverage = "GL_ARB_post_depth_coverage"; const char* const E_GL_ARB_shader_viewport_layer_array = "GL_ARB_shader_viewport_layer_array"; const char* const E_GL_ARB_fragment_shader_interlock = "GL_ARB_fragment_shader_interlock"; const char* const E_GL_ARB_shader_clock = "GL_ARB_shader_clock"; const char* const E_GL_ARB_uniform_buffer_object = "GL_ARB_uniform_buffer_object"; const char* const E_GL_ARB_sample_shading = "GL_ARB_sample_shading"; const char* const E_GL_ARB_shader_bit_encoding = "GL_ARB_shader_bit_encoding"; const char* const E_GL_ARB_shader_image_size = "GL_ARB_shader_image_size"; const char* const E_GL_ARB_shader_storage_buffer_object = "GL_ARB_shader_storage_buffer_object"; const char* const E_GL_ARB_shading_language_packing = "GL_ARB_shading_language_packing"; const char* const E_GL_ARB_texture_query_lod = "GL_ARB_texture_query_lod"; const char* const E_GL_ARB_vertex_attrib_64bit = "GL_ARB_vertex_attrib_64bit"; const char* const E_GL_ARB_draw_instanced = "GL_ARB_draw_instanced"; const char* const E_GL_ARB_fragment_coord_conventions = "GL_ARB_fragment_coord_conventions"; const char* const E_GL_ARB_bindless_texture = "GL_ARB_bindless_texture"; const char* const E_GL_KHR_shader_subgroup_basic = "GL_KHR_shader_subgroup_basic"; const char* const E_GL_KHR_shader_subgroup_vote = "GL_KHR_shader_subgroup_vote"; const char* const E_GL_KHR_shader_subgroup_arithmetic = "GL_KHR_shader_subgroup_arithmetic"; const char* const E_GL_KHR_shader_subgroup_ballot = "GL_KHR_shader_subgroup_ballot"; const char* const E_GL_KHR_shader_subgroup_shuffle = "GL_KHR_shader_subgroup_shuffle"; const char* const E_GL_KHR_shader_subgroup_shuffle_relative = "GL_KHR_shader_subgroup_shuffle_relative"; const char* const E_GL_KHR_shader_subgroup_rotate = "GL_KHR_shader_subgroup_rotate"; const char* const E_GL_KHR_shader_subgroup_clustered = "GL_KHR_shader_subgroup_clustered"; const char* const E_GL_KHR_shader_subgroup_quad = "GL_KHR_shader_subgroup_quad"; const char* const E_GL_KHR_memory_scope_semantics = "GL_KHR_memory_scope_semantics"; const char* const E_GL_KHR_cooperative_matrix = "GL_KHR_cooperative_matrix"; const char* const E_GL_EXT_shader_atomic_int64 = "GL_EXT_shader_atomic_int64"; const char* const E_GL_EXT_shader_non_constant_global_initializers = "GL_EXT_shader_non_constant_global_initializers"; const char* const E_GL_EXT_shader_image_load_formatted = "GL_EXT_shader_image_load_formatted"; const char* const E_GL_EXT_shader_16bit_storage = "GL_EXT_shader_16bit_storage"; const char* const E_GL_EXT_shader_8bit_storage = "GL_EXT_shader_8bit_storage"; // EXT extensions const char* const E_GL_EXT_device_group = "GL_EXT_device_group"; const char* const E_GL_EXT_multiview = "GL_EXT_multiview"; const char* const E_GL_EXT_post_depth_coverage = "GL_EXT_post_depth_coverage"; const char* const E_GL_EXT_control_flow_attributes = "GL_EXT_control_flow_attributes"; const char* const E_GL_EXT_nonuniform_qualifier = "GL_EXT_nonuniform_qualifier"; const char* const E_GL_EXT_samplerless_texture_functions = "GL_EXT_samplerless_texture_functions"; const char* const E_GL_EXT_scalar_block_layout = "GL_EXT_scalar_block_layout"; const char* const E_GL_EXT_fragment_invocation_density = "GL_EXT_fragment_invocation_density"; const char* const E_GL_EXT_buffer_reference = "GL_EXT_buffer_reference"; const char* const E_GL_EXT_buffer_reference2 = "GL_EXT_buffer_reference2"; const char* const E_GL_EXT_buffer_reference_uvec2 = "GL_EXT_buffer_reference_uvec2"; const char* const E_GL_EXT_demote_to_helper_invocation = "GL_EXT_demote_to_helper_invocation"; const char* const E_GL_EXT_shader_realtime_clock = "GL_EXT_shader_realtime_clock"; const char* const E_GL_EXT_debug_printf = "GL_EXT_debug_printf"; const char* const E_GL_EXT_ray_tracing = "GL_EXT_ray_tracing"; const char* const E_GL_EXT_ray_query = "GL_EXT_ray_query"; const char* const E_GL_EXT_ray_flags_primitive_culling = "GL_EXT_ray_flags_primitive_culling"; const char* const E_GL_EXT_ray_cull_mask = "GL_EXT_ray_cull_mask"; const char* const E_GL_EXT_blend_func_extended = "GL_EXT_blend_func_extended"; const char* const E_GL_EXT_shader_implicit_conversions = "GL_EXT_shader_implicit_conversions"; const char* const E_GL_EXT_fragment_shading_rate = "GL_EXT_fragment_shading_rate"; const char* const E_GL_EXT_shader_image_int64 = "GL_EXT_shader_image_int64"; const char* const E_GL_EXT_null_initializer = "GL_EXT_null_initializer"; const char* const E_GL_EXT_shared_memory_block = "GL_EXT_shared_memory_block"; const char* const E_GL_EXT_subgroup_uniform_control_flow = "GL_EXT_subgroup_uniform_control_flow"; const char* const E_GL_EXT_spirv_intrinsics = "GL_EXT_spirv_intrinsics"; const char* const E_GL_EXT_fragment_shader_barycentric = "GL_EXT_fragment_shader_barycentric"; const char* const E_GL_EXT_mesh_shader = "GL_EXT_mesh_shader"; const char* const E_GL_EXT_opacity_micromap = "GL_EXT_opacity_micromap"; const char* const E_GL_EXT_shader_quad_control = "GL_EXT_shader_quad_control"; const char* const E_GL_EXT_draw_instanced = "GL_EXT_draw_instanced"; const char* const E_GL_EXT_texture_array = "GL_EXT_texture_array"; const char* const E_GL_EXT_maximal_reconvergence = "GL_EXT_maximal_reconvergence"; const char* const E_GL_EXT_expect_assume = "GL_EXT_expect_assume"; const char* const E_GL_EXT_control_flow_attributes2 = "GL_EXT_control_flow_attributes2"; const char* const E_GL_EXT_spec_constant_composites = "GL_EXT_spec_constant_composites"; const char* const E_GL_EXT_texture_offset_non_const = "GL_EXT_texture_offset_non_const"; const char* const E_GL_EXT_nontemporal_keyword = "GL_EXT_nontemporal_keyword"; // Arrays of extensions for the above viewportEXTs duplications const char* const post_depth_coverageEXTs[] = { E_GL_ARB_post_depth_coverage, E_GL_EXT_post_depth_coverage }; const int Num_post_depth_coverageEXTs = sizeof(post_depth_coverageEXTs) / sizeof(post_depth_coverageEXTs[0]); // Array of extensions to cover both extensions providing ray tracing capabilities. const char* const ray_tracing_EXTs[] = { E_GL_EXT_ray_query, E_GL_EXT_ray_tracing }; const int Num_ray_tracing_EXTs = sizeof(ray_tracing_EXTs) / sizeof(ray_tracing_EXTs[0]); // OVR extensions const char* const E_GL_OVR_multiview = "GL_OVR_multiview"; const char* const E_GL_OVR_multiview2 = "GL_OVR_multiview2"; const char* const OVR_multiview_EXTs[] = { E_GL_OVR_multiview, E_GL_OVR_multiview2 }; const int Num_OVR_multiview_EXTs = sizeof(OVR_multiview_EXTs) / sizeof(OVR_multiview_EXTs[0]); // #line and #include const char* const E_GL_GOOGLE_cpp_style_line_directive = "GL_GOOGLE_cpp_style_line_directive"; const char* const E_GL_GOOGLE_include_directive = "GL_GOOGLE_include_directive"; const char* const E_GL_ARB_shading_language_include = "GL_ARB_shading_language_include"; const char* const E_GL_AMD_shader_ballot = "GL_AMD_shader_ballot"; const char* const E_GL_AMD_shader_trinary_minmax = "GL_AMD_shader_trinary_minmax"; const char* const E_GL_AMD_shader_explicit_vertex_parameter = "GL_AMD_shader_explicit_vertex_parameter"; const char* const E_GL_AMD_gcn_shader = "GL_AMD_gcn_shader"; const char* const E_GL_AMD_gpu_shader_half_float = "GL_AMD_gpu_shader_half_float"; const char* const E_GL_AMD_texture_gather_bias_lod = "GL_AMD_texture_gather_bias_lod"; const char* const E_GL_AMD_gpu_shader_int16 = "GL_AMD_gpu_shader_int16"; const char* const E_GL_AMD_shader_image_load_store_lod = "GL_AMD_shader_image_load_store_lod"; const char* const E_GL_AMD_shader_fragment_mask = "GL_AMD_shader_fragment_mask"; const char* const E_GL_AMD_gpu_shader_half_float_fetch = "GL_AMD_gpu_shader_half_float_fetch"; const char* const E_GL_AMD_shader_early_and_late_fragment_tests = "GL_AMD_shader_early_and_late_fragment_tests"; const char* const E_GL_INTEL_shader_integer_functions2 = "GL_INTEL_shader_integer_functions2"; const char* const E_GL_NV_sample_mask_override_coverage = "GL_NV_sample_mask_override_coverage"; const char* const E_SPV_NV_geometry_shader_passthrough = "GL_NV_geometry_shader_passthrough"; const char* const E_GL_NV_viewport_array2 = "GL_NV_viewport_array2"; const char* const E_GL_NV_stereo_view_rendering = "GL_NV_stereo_view_rendering"; const char* const E_GL_NVX_multiview_per_view_attributes = "GL_NVX_multiview_per_view_attributes"; const char* const E_GL_NV_shader_atomic_int64 = "GL_NV_shader_atomic_int64"; const char* const E_GL_NV_conservative_raster_underestimation = "GL_NV_conservative_raster_underestimation"; const char* const E_GL_NV_shader_noperspective_interpolation = "GL_NV_shader_noperspective_interpolation"; const char* const E_GL_NV_shader_subgroup_partitioned = "GL_NV_shader_subgroup_partitioned"; const char* const E_GL_NV_shading_rate_image = "GL_NV_shading_rate_image"; const char* const E_GL_NV_ray_tracing = "GL_NV_ray_tracing"; const char* const E_GL_NV_ray_tracing_motion_blur = "GL_NV_ray_tracing_motion_blur"; const char* const E_GL_NV_fragment_shader_barycentric = "GL_NV_fragment_shader_barycentric"; const char* const E_GL_NV_compute_shader_derivatives = "GL_NV_compute_shader_derivatives"; const char* const E_GL_NV_shader_texture_footprint = "GL_NV_shader_texture_footprint"; const char* const E_GL_NV_mesh_shader = "GL_NV_mesh_shader"; const char* const E_GL_NV_cooperative_matrix = "GL_NV_cooperative_matrix"; const char* const E_GL_NV_shader_sm_builtins = "GL_NV_shader_sm_builtins"; const char* const E_GL_NV_integer_cooperative_matrix = "GL_NV_integer_cooperative_matrix"; const char* const E_GL_NV_shader_invocation_reorder = "GL_NV_shader_invocation_reorder"; const char* const E_GL_EXT_ray_tracing_position_fetch = "GL_EXT_ray_tracing_position_fetch"; const char* const E_GL_NV_displacement_micromap = "GL_NV_displacement_micromap"; const char* const E_GL_NV_shader_atomic_fp16_vector = "GL_NV_shader_atomic_fp16_vector"; const char* const E_GL_NV_cooperative_matrix2 = "GL_NV_cooperative_matrix2"; const char* const E_GL_NV_cooperative_vector = "GL_NV_cooperative_vector"; const char* const E_GL_NV_cluster_acceleration_structure = "GL_NV_cluster_acceleration_structure"; const char* const E_GL_NV_linear_swept_spheres = "GL_NV_linear_swept_spheres"; const char* const E_GL_NV_gpu_shader5 = "GL_NV_gpu_shader5"; // ARM const char* const E_GL_ARM_shader_core_builtins = "GL_ARM_shader_core_builtins"; // Arrays of extensions for the above viewportEXTs duplications const char* const viewportEXTs[] = { E_GL_ARB_shader_viewport_layer_array, E_GL_NV_viewport_array2 }; const int Num_viewportEXTs = sizeof(viewportEXTs) / sizeof(viewportEXTs[0]); const char* const E_GL_QCOM_image_processing = "GL_QCOM_image_processing"; const char* const E_GL_QCOM_image_processing2 = "GL_QCOM_image_processing2"; const char* const E_GL_QCOM_tile_shading = "GL_QCOM_tile_shading"; // AEP const char* const E_GL_ANDROID_extension_pack_es31a = "GL_ANDROID_extension_pack_es31a"; const char* const E_GL_KHR_blend_equation_advanced = "GL_KHR_blend_equation_advanced"; const char* const E_GL_OES_sample_variables = "GL_OES_sample_variables"; const char* const E_GL_OES_shader_image_atomic = "GL_OES_shader_image_atomic"; const char* const E_GL_OES_shader_multisample_interpolation = "GL_OES_shader_multisample_interpolation"; const char* const E_GL_OES_texture_storage_multisample_2d_array = "GL_OES_texture_storage_multisample_2d_array"; const char* const E_GL_EXT_geometry_shader = "GL_EXT_geometry_shader"; const char* const E_GL_EXT_geometry_point_size = "GL_EXT_geometry_point_size"; const char* const E_GL_EXT_gpu_shader5 = "GL_EXT_gpu_shader5"; const char* const E_GL_EXT_primitive_bounding_box = "GL_EXT_primitive_bounding_box"; const char* const E_GL_EXT_shader_io_blocks = "GL_EXT_shader_io_blocks"; const char* const E_GL_EXT_tessellation_shader = "GL_EXT_tessellation_shader"; const char* const E_GL_EXT_tessellation_point_size = "GL_EXT_tessellation_point_size"; const char* const E_GL_EXT_texture_buffer = "GL_EXT_texture_buffer"; const char* const E_GL_EXT_texture_cube_map_array = "GL_EXT_texture_cube_map_array"; const char* const E_GL_EXT_shader_integer_mix = "GL_EXT_shader_integer_mix"; // OES matching AEP const char* const E_GL_OES_geometry_shader = "GL_OES_geometry_shader"; const char* const E_GL_OES_geometry_point_size = "GL_OES_geometry_point_size"; const char* const E_GL_OES_gpu_shader5 = "GL_OES_gpu_shader5"; const char* const E_GL_OES_primitive_bounding_box = "GL_OES_primitive_bounding_box"; const char* const E_GL_OES_shader_io_blocks = "GL_OES_shader_io_blocks"; const char* const E_GL_OES_tessellation_shader = "GL_OES_tessellation_shader"; const char* const E_GL_OES_tessellation_point_size = "GL_OES_tessellation_point_size"; const char* const E_GL_OES_texture_buffer = "GL_OES_texture_buffer"; const char* const E_GL_OES_texture_cube_map_array = "GL_OES_texture_cube_map_array"; // EXT const char* const E_GL_EXT_shader_explicit_arithmetic_types = "GL_EXT_shader_explicit_arithmetic_types"; const char* const E_GL_EXT_shader_explicit_arithmetic_types_int8 = "GL_EXT_shader_explicit_arithmetic_types_int8"; const char* const E_GL_EXT_shader_explicit_arithmetic_types_int16 = "GL_EXT_shader_explicit_arithmetic_types_int16"; const char* const E_GL_EXT_shader_explicit_arithmetic_types_int32 = "GL_EXT_shader_explicit_arithmetic_types_int32"; const char* const E_GL_EXT_shader_explicit_arithmetic_types_int64 = "GL_EXT_shader_explicit_arithmetic_types_int64"; const char* const E_GL_EXT_shader_explicit_arithmetic_types_float16 = "GL_EXT_shader_explicit_arithmetic_types_float16"; const char* const E_GL_EXT_shader_explicit_arithmetic_types_float32 = "GL_EXT_shader_explicit_arithmetic_types_float32"; const char* const E_GL_EXT_shader_explicit_arithmetic_types_float64 = "GL_EXT_shader_explicit_arithmetic_types_float64"; const char* const E_GL_EXT_shader_subgroup_extended_types_int8 = "GL_EXT_shader_subgroup_extended_types_int8"; const char* const E_GL_EXT_shader_subgroup_extended_types_int16 = "GL_EXT_shader_subgroup_extended_types_int16"; const char* const E_GL_EXT_shader_subgroup_extended_types_int64 = "GL_EXT_shader_subgroup_extended_types_int64"; const char* const E_GL_EXT_shader_subgroup_extended_types_float16 = "GL_EXT_shader_subgroup_extended_types_float16"; const char* const E_GL_EXT_terminate_invocation = "GL_EXT_terminate_invocation"; const char* const E_GL_EXT_shader_atomic_float = "GL_EXT_shader_atomic_float"; const char* const E_GL_EXT_shader_atomic_float2 = "GL_EXT_shader_atomic_float2"; const char* const E_GL_EXT_shader_tile_image = "GL_EXT_shader_tile_image"; const char* const E_GL_EXT_texture_shadow_lod = "GL_EXT_texture_shadow_lod"; const char* const E_GL_EXT_integer_dot_product = "GL_EXT_integer_dot_product"; const char* const E_GL_EXT_bfloat16 = "GL_EXT_bfloat16"; const char* const E_GL_EXT_float_e5m2 = "GL_EXT_float_e5m2"; const char* const E_GL_EXT_float_e4m3 = "GL_EXT_float_e4m3"; // Arrays of extensions for the above AEP duplications const char* const AEP_geometry_shader[] = { E_GL_EXT_geometry_shader, E_GL_OES_geometry_shader }; const int Num_AEP_geometry_shader = sizeof(AEP_geometry_shader)/sizeof(AEP_geometry_shader[0]); const char* const AEP_geometry_point_size[] = { E_GL_EXT_geometry_point_size, E_GL_OES_geometry_point_size }; const int Num_AEP_geometry_point_size = sizeof(AEP_geometry_point_size)/sizeof(AEP_geometry_point_size[0]); const char* const AEP_gpu_shader5[] = { E_GL_EXT_gpu_shader5, E_GL_OES_gpu_shader5 }; const int Num_AEP_gpu_shader5 = sizeof(AEP_gpu_shader5)/sizeof(AEP_gpu_shader5[0]); const char* const AEP_core_gpu_shader5[] = { E_GL_ARB_gpu_shader5, E_GL_NV_gpu_shader5}; const int Num_AEP_core_gpu_shader5 = sizeof(AEP_core_gpu_shader5)/sizeof(AEP_core_gpu_shader5[0]); const char* const AEP_primitive_bounding_box[] = { E_GL_EXT_primitive_bounding_box, E_GL_OES_primitive_bounding_box }; const int Num_AEP_primitive_bounding_box = sizeof(AEP_primitive_bounding_box)/sizeof(AEP_primitive_bounding_box[0]); const char* const AEP_shader_io_blocks[] = { E_GL_EXT_shader_io_blocks, E_GL_OES_shader_io_blocks }; const int Num_AEP_shader_io_blocks = sizeof(AEP_shader_io_blocks)/sizeof(AEP_shader_io_blocks[0]); const char* const AEP_tessellation_shader[] = { E_GL_EXT_tessellation_shader, E_GL_OES_tessellation_shader }; const int Num_AEP_tessellation_shader = sizeof(AEP_tessellation_shader)/sizeof(AEP_tessellation_shader[0]); const char* const AEP_tessellation_point_size[] = { E_GL_EXT_tessellation_point_size, E_GL_OES_tessellation_point_size }; const int Num_AEP_tessellation_point_size = sizeof(AEP_tessellation_point_size)/sizeof(AEP_tessellation_point_size[0]); const char* const AEP_texture_buffer[] = { E_GL_EXT_texture_buffer, E_GL_OES_texture_buffer }; const int Num_AEP_texture_buffer = sizeof(AEP_texture_buffer)/sizeof(AEP_texture_buffer[0]); const char* const AEP_texture_cube_map_array[] = { E_GL_EXT_texture_cube_map_array, E_GL_OES_texture_cube_map_array }; const int Num_AEP_texture_cube_map_array = sizeof(AEP_texture_cube_map_array)/sizeof(AEP_texture_cube_map_array[0]); const char* const AEP_mesh_shader[] = { E_GL_NV_mesh_shader, E_GL_EXT_mesh_shader }; const int Num_AEP_mesh_shader = sizeof(AEP_mesh_shader)/sizeof(AEP_mesh_shader[0]); } // end namespace glslang #endif // _VERSIONS_INCLUDED_ ================================================ FILE: src/libraries/glslang/glslang/MachineIndependent/attribute.cpp ================================================ // // Copyright (C) 2017 LunarG, Inc. // Copyright (C) 2018 Google, Inc. // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following // disclaimer in the documentation and/or other materials provided // with the distribution. // // Neither the name of Google, Inc., nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // #include "attribute.h" #include "../Include/intermediate.h" #include "ParseHelper.h" namespace glslang { // extract integers out of attribute arguments stored in attribute aggregate bool TAttributeArgs::getInt(int& value, int argNum) const { const TConstUnion* intConst = getConstUnion(EbtInt, argNum); if (intConst == nullptr) return false; value = intConst->getIConst(); return true; } // extract strings out of attribute arguments stored in attribute aggregate. // convert to lower case if converToLower is true (for case-insensitive compare convenience) bool TAttributeArgs::getString(TString& value, int argNum, bool convertToLower) const { const TConstUnion* stringConst = getConstUnion(EbtString, argNum); if (stringConst == nullptr) return false; value = *stringConst->getSConst(); // Convenience. if (convertToLower) std::transform(value.begin(), value.end(), value.begin(), ::tolower); return true; } // How many arguments were supplied? int TAttributeArgs::size() const { return args == nullptr ? 0 : (int)args->getSequence().size(); } // Helper to get attribute const union. Returns nullptr on failure. const TConstUnion* TAttributeArgs::getConstUnion(TBasicType basicType, int argNum) const { if (args == nullptr) return nullptr; if (argNum >= (int)args->getSequence().size()) return nullptr; if (args->getSequence()[argNum]->getAsConstantUnion() == nullptr) return nullptr; const TConstUnion* constVal = &args->getSequence()[argNum]->getAsConstantUnion()->getConstArray()[0]; if (constVal == nullptr || constVal->getType() != basicType) return nullptr; return constVal; } // Implementation of TParseContext parts of attributes TAttributeType TParseContext::attributeFromName(const TString& name) const { if (name == "branch" || name == "dont_flatten") return EatBranch; else if (name == "flatten") return EatFlatten; else if (name == "unroll") return EatUnroll; else if (name == "loop" || name == "dont_unroll") return EatLoop; else if (name == "dependency_infinite") return EatDependencyInfinite; else if (name == "dependency_length") return EatDependencyLength; else if (name == "min_iterations") return EatMinIterations; else if (name == "max_iterations") return EatMaxIterations; else if (name == "iteration_multiple") return EatIterationMultiple; else if (name == "peel_count") return EatPeelCount; else if (name == "partial_count") return EatPartialCount; else if (name == "subgroup_uniform_control_flow") return EatSubgroupUniformControlFlow; else if (name == "export") return EatExport; else if (name == "maximally_reconverges") return EatMaximallyReconverges; else return EatNone; } // Make an initial leaf for the grammar from a no-argument attribute TAttributes* TParseContext::makeAttributes(const TString& identifier) const { TAttributes *attributes = nullptr; attributes = NewPoolObject(attributes); TAttributeArgs args = { attributeFromName(identifier), nullptr }; attributes->push_back(args); return attributes; } // Make an initial leaf for the grammar from a one-argument attribute TAttributes* TParseContext::makeAttributes(const TString& identifier, TIntermNode* node) const { TAttributes *attributes = nullptr; attributes = NewPoolObject(attributes); // for now, node is always a simple single expression, but other code expects // a list, so make it so TIntermAggregate* agg = intermediate.makeAggregate(node); TAttributeArgs args = { attributeFromName(identifier), agg }; attributes->push_back(args); return attributes; } // Merge two sets of attributes into a single set. // The second argument is destructively consumed. TAttributes* TParseContext::mergeAttributes(TAttributes* attr1, TAttributes* attr2) const { attr1->splice(attr1->end(), *attr2); return attr1; } // // Selection attributes // void TParseContext::handleSelectionAttributes(const TAttributes& attributes, TIntermNode* node) { TIntermSelection* selection = node->getAsSelectionNode(); if (selection == nullptr) return; for (auto it = attributes.begin(); it != attributes.end(); ++it) { if (it->size() > 0) { warn(node->getLoc(), "attribute with arguments not recognized, skipping", "", ""); continue; } switch (it->name) { case EatFlatten: selection->setFlatten(); break; case EatBranch: selection->setDontFlatten(); break; default: warn(node->getLoc(), "attribute does not apply to a selection", "", ""); break; } } } // // Switch attributes // void TParseContext::handleSwitchAttributes(const TAttributes& attributes, TIntermNode* node) { TIntermSwitch* selection = node->getAsSwitchNode(); if (selection == nullptr) return; for (auto it = attributes.begin(); it != attributes.end(); ++it) { if (it->size() > 0) { warn(node->getLoc(), "attribute with arguments not recognized, skipping", "", ""); continue; } switch (it->name) { case EatFlatten: selection->setFlatten(); break; case EatBranch: selection->setDontFlatten(); break; default: warn(node->getLoc(), "attribute does not apply to a switch", "", ""); break; } } } // // Loop attributes // void TParseContext::handleLoopAttributes(const TAttributes& attributes, TIntermNode* node) { TIntermLoop* loop = node->getAsLoopNode(); if (loop == nullptr) { // the actual loop might be part of a sequence TIntermAggregate* agg = node->getAsAggregate(); if (agg == nullptr) return; for (auto it = agg->getSequence().begin(); it != agg->getSequence().end(); ++it) { loop = (*it)->getAsLoopNode(); if (loop != nullptr) break; } if (loop == nullptr) return; } for (auto it = attributes.begin(); it != attributes.end(); ++it) { const auto noArgument = [&](const char* feature) { if (it->size() > 0) { warn(node->getLoc(), "expected no arguments", feature, ""); return false; } return true; }; const auto positiveSignedArgument = [&](const char* feature, int& value) { if (it->size() == 1 && it->getInt(value)) { if (value <= 0) { error(node->getLoc(), "must be positive", feature, ""); return false; } } else { warn(node->getLoc(), "expected a single integer argument", feature, ""); return false; } return true; }; const auto unsignedArgument = [&](const char* feature, unsigned int& uiValue) { int value; if (!(it->size() == 1 && it->getInt(value))) { warn(node->getLoc(), "expected a single integer argument", feature, ""); return false; } uiValue = (unsigned int)value; return true; }; const auto positiveUnsignedArgument = [&](const char* feature, unsigned int& uiValue) { int value; if (it->size() == 1 && it->getInt(value)) { if (value == 0) { error(node->getLoc(), "must be greater than or equal to 1", feature, ""); return false; } } else { warn(node->getLoc(), "expected a single integer argument", feature, ""); return false; } uiValue = (unsigned int)value; return true; }; const auto spirv14 = [&](const char* feature) { if (spvVersion.spv > 0 && spvVersion.spv < EShTargetSpv_1_4) warn(node->getLoc(), "attribute requires a SPIR-V 1.4 target-env", feature, ""); }; int value = 0; unsigned uiValue = 0; switch (it->name) { case EatUnroll: if (noArgument("unroll")) loop->setUnroll(); break; case EatLoop: if (noArgument("dont_unroll")) loop->setDontUnroll(); break; case EatDependencyInfinite: if (noArgument("dependency_infinite")) loop->setLoopDependency(TIntermLoop::dependencyInfinite); break; case EatDependencyLength: if (positiveSignedArgument("dependency_length", value)) loop->setLoopDependency(value); break; case EatMinIterations: spirv14("min_iterations"); if (unsignedArgument("min_iterations", uiValue)) loop->setMinIterations(uiValue); break; case EatMaxIterations: spirv14("max_iterations"); if (unsignedArgument("max_iterations", uiValue)) loop->setMaxIterations(uiValue); break; case EatIterationMultiple: spirv14("iteration_multiple"); if (positiveUnsignedArgument("iteration_multiple", uiValue)) loop->setIterationMultiple(uiValue); break; case EatPeelCount: spirv14("peel_count"); if (unsignedArgument("peel_count", uiValue)) loop->setPeelCount(uiValue); break; case EatPartialCount: spirv14("partial_count"); if (unsignedArgument("partial_count", uiValue)) loop->setPartialCount(uiValue); break; default: warn(node->getLoc(), "attribute does not apply to a loop", "", ""); break; } } } // // Function attributes // void TParseContext::handleFunctionAttributes(const TSourceLoc& loc, const TAttributes& attributes) { for (auto it = attributes.begin(); it != attributes.end(); ++it) { if (it->size() > 0) { warn(loc, "attribute with arguments not recognized, skipping", "", ""); continue; } switch (it->name) { case EatSubgroupUniformControlFlow: requireExtensions(loc, 1, &E_GL_EXT_subgroup_uniform_control_flow, "attribute"); intermediate.setSubgroupUniformControlFlow(); break; case EatMaximallyReconverges: requireExtensions(loc, 1, &E_GL_EXT_maximal_reconvergence, "attribute"); intermediate.setMaximallyReconverges(); break; default: warn(loc, "attribute does not apply to a function", "", ""); break; } } } } // end namespace glslang ================================================ FILE: src/libraries/glslang/glslang/MachineIndependent/attribute.h ================================================ // // Copyright (C) 2017 LunarG, Inc. // Copyright (C) 2018 Google, Inc. // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following // disclaimer in the documentation and/or other materials provided // with the distribution. // // Neither the name of 3Dlabs Inc. Ltd. nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // #ifndef _ATTRIBUTE_INCLUDED_ #define _ATTRIBUTE_INCLUDED_ #include "../Include/Common.h" #include "../Include/ConstantUnion.h" namespace glslang { enum TAttributeType { EatNone, EatAllow_uav_condition, EatBranch, EatCall, EatDomain, EatEarlyDepthStencil, EatFastOpt, EatFlatten, EatForceCase, EatInstance, EatMaxTessFactor, EatNumThreads, EatMaxVertexCount, EatOutputControlPoints, EatOutputTopology, EatPartitioning, EatPatchConstantFunc, EatPatchSize, EatUnroll, EatLoop, EatBinding, EatGlobalBinding, EatLocation, EatInputAttachment, EatBuiltIn, EatPushConstant, EatConstantId, EatDependencyInfinite, EatDependencyLength, EatMinIterations, EatMaxIterations, EatIterationMultiple, EatPeelCount, EatPartialCount, EatFormatRgba32f, EatFormatRgba16f, EatFormatR32f, EatFormatRgba8, EatFormatRgba8Snorm, EatFormatRg32f, EatFormatRg16f, EatFormatR11fG11fB10f, EatFormatR16f, EatFormatRgba16, EatFormatRgb10A2, EatFormatRg16, EatFormatRg8, EatFormatR16, EatFormatR8, EatFormatRgba16Snorm, EatFormatRg16Snorm, EatFormatRg8Snorm, EatFormatR16Snorm, EatFormatR8Snorm, EatFormatRgba32i, EatFormatRgba16i, EatFormatRgba8i, EatFormatR32i, EatFormatRg32i, EatFormatRg16i, EatFormatRg8i, EatFormatR16i, EatFormatR8i, EatFormatRgba32ui, EatFormatRgba16ui, EatFormatRgba8ui, EatFormatR32ui, EatFormatRgb10a2ui, EatFormatRg32ui, EatFormatRg16ui, EatFormatRg8ui, EatFormatR16ui, EatFormatR8ui, EatFormatUnknown, EatNonWritable, EatNonReadable, EatSubgroupUniformControlFlow, EatExport, EatMaximallyReconverges, }; class TIntermAggregate; struct TAttributeArgs { TAttributeType name; const TIntermAggregate* args; // Obtain attribute as integer // Return false if it cannot be obtained bool getInt(int& value, int argNum = 0) const; // Obtain attribute as string, with optional to-lower transform // Return false if it cannot be obtained bool getString(TString& value, int argNum = 0, bool convertToLower = true) const; // How many arguments were provided to the attribute? int size() const; protected: const TConstUnion* getConstUnion(TBasicType basicType, int argNum) const; }; typedef TList TAttributes; } // end namespace glslang #endif // _ATTRIBUTE_INCLUDED_ ================================================ FILE: src/libraries/glslang/glslang/MachineIndependent/gl_types.h ================================================ /* ** Copyright (c) 2013 The Khronos Group Inc. ** ** Permission is hereby granted, free of charge, to any person obtaining a ** copy of this software and/or associated documentation files (the ** "Materials"), to deal in the Materials without restriction, including ** without limitation the rights to use, copy, modify, merge, publish, ** distribute, sublicense, and/or sell copies of the Materials, and to ** permit persons to whom the Materials are furnished to do so, subject to ** the following conditions: ** ** The above copyright notice and this permission notice shall be included ** in all copies or substantial portions of the Materials. ** ** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. ** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY ** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, ** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE ** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. */ #pragma once #define GL_FLOAT 0x1406 #define GL_FLOAT_VEC2 0x8B50 #define GL_FLOAT_VEC3 0x8B51 #define GL_FLOAT_VEC4 0x8B52 #define GL_DOUBLE 0x140A #define GL_DOUBLE_VEC2 0x8FFC #define GL_DOUBLE_VEC3 0x8FFD #define GL_DOUBLE_VEC4 0x8FFE #define GL_INT 0x1404 #define GL_INT_VEC2 0x8B53 #define GL_INT_VEC3 0x8B54 #define GL_INT_VEC4 0x8B55 #define GL_UNSIGNED_INT 0x1405 #define GL_UNSIGNED_INT_VEC2 0x8DC6 #define GL_UNSIGNED_INT_VEC3 0x8DC7 #define GL_UNSIGNED_INT_VEC4 0x8DC8 #define GL_INT64_ARB 0x140E #define GL_INT64_VEC2_ARB 0x8FE9 #define GL_INT64_VEC3_ARB 0x8FEA #define GL_INT64_VEC4_ARB 0x8FEB #define GL_UNSIGNED_INT64_ARB 0x140F #define GL_UNSIGNED_INT64_VEC2_ARB 0x8FF5 #define GL_UNSIGNED_INT64_VEC3_ARB 0x8FF6 #define GL_UNSIGNED_INT64_VEC4_ARB 0x8FF7 #define GL_UNSIGNED_INT16_VEC2_NV 0x8FF1 #define GL_UNSIGNED_INT16_VEC3_NV 0x8FF2 #define GL_UNSIGNED_INT16_VEC4_NV 0x8FF3 #define GL_INT16_NV 0x8FE4 #define GL_INT16_VEC2_NV 0x8FE5 #define GL_INT16_VEC3_NV 0x8FE6 #define GL_INT16_VEC4_NV 0x8FE7 #define GL_BOOL 0x8B56 #define GL_BOOL_VEC2 0x8B57 #define GL_BOOL_VEC3 0x8B58 #define GL_BOOL_VEC4 0x8B59 #define GL_FLOAT_MAT2 0x8B5A #define GL_FLOAT_MAT3 0x8B5B #define GL_FLOAT_MAT4 0x8B5C #define GL_FLOAT_MAT2x3 0x8B65 #define GL_FLOAT_MAT2x4 0x8B66 #define GL_FLOAT_MAT3x2 0x8B67 #define GL_FLOAT_MAT3x4 0x8B68 #define GL_FLOAT_MAT4x2 0x8B69 #define GL_FLOAT_MAT4x3 0x8B6A #define GL_DOUBLE_MAT2 0x8F46 #define GL_DOUBLE_MAT3 0x8F47 #define GL_DOUBLE_MAT4 0x8F48 #define GL_DOUBLE_MAT2x3 0x8F49 #define GL_DOUBLE_MAT2x4 0x8F4A #define GL_DOUBLE_MAT3x2 0x8F4B #define GL_DOUBLE_MAT3x4 0x8F4C #define GL_DOUBLE_MAT4x2 0x8F4D #define GL_DOUBLE_MAT4x3 0x8F4E // Those constants are borrowed from extension NV_gpu_shader5 #define GL_FLOAT16_NV 0x8FF8 #define GL_FLOAT16_VEC2_NV 0x8FF9 #define GL_FLOAT16_VEC3_NV 0x8FFA #define GL_FLOAT16_VEC4_NV 0x8FFB #define GL_FLOAT16_MAT2_AMD 0x91C5 #define GL_FLOAT16_MAT3_AMD 0x91C6 #define GL_FLOAT16_MAT4_AMD 0x91C7 #define GL_FLOAT16_MAT2x3_AMD 0x91C8 #define GL_FLOAT16_MAT2x4_AMD 0x91C9 #define GL_FLOAT16_MAT3x2_AMD 0x91CA #define GL_FLOAT16_MAT3x4_AMD 0x91CB #define GL_FLOAT16_MAT4x2_AMD 0x91CC #define GL_FLOAT16_MAT4x3_AMD 0x91CD #define GL_SAMPLER_1D 0x8B5D #define GL_SAMPLER_2D 0x8B5E #define GL_SAMPLER_3D 0x8B5F #define GL_SAMPLER_CUBE 0x8B60 #define GL_SAMPLER_BUFFER 0x8DC2 #define GL_SAMPLER_1D_ARRAY 0x8DC0 #define GL_SAMPLER_2D_ARRAY 0x8DC1 #define GL_SAMPLER_1D_ARRAY_SHADOW 0x8DC3 #define GL_SAMPLER_2D_ARRAY_SHADOW 0x8DC4 #define GL_SAMPLER_CUBE_SHADOW 0x8DC5 #define GL_SAMPLER_1D_SHADOW 0x8B61 #define GL_SAMPLER_2D_SHADOW 0x8B62 #define GL_SAMPLER_2D_RECT 0x8B63 #define GL_SAMPLER_2D_RECT_SHADOW 0x8B64 #define GL_SAMPLER_2D_MULTISAMPLE 0x9108 #define GL_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910B #define GL_SAMPLER_CUBE_MAP_ARRAY 0x900C #define GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW 0x900D #define GL_SAMPLER_CUBE_MAP_ARRAY_ARB 0x900C #define GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW_ARB 0x900D #define GL_FLOAT16_SAMPLER_1D_AMD 0x91CE #define GL_FLOAT16_SAMPLER_2D_AMD 0x91CF #define GL_FLOAT16_SAMPLER_3D_AMD 0x91D0 #define GL_FLOAT16_SAMPLER_CUBE_AMD 0x91D1 #define GL_FLOAT16_SAMPLER_2D_RECT_AMD 0x91D2 #define GL_FLOAT16_SAMPLER_1D_ARRAY_AMD 0x91D3 #define GL_FLOAT16_SAMPLER_2D_ARRAY_AMD 0x91D4 #define GL_FLOAT16_SAMPLER_CUBE_MAP_ARRAY_AMD 0x91D5 #define GL_FLOAT16_SAMPLER_BUFFER_AMD 0x91D6 #define GL_FLOAT16_SAMPLER_2D_MULTISAMPLE_AMD 0x91D7 #define GL_FLOAT16_SAMPLER_2D_MULTISAMPLE_ARRAY_AMD 0x91D8 #define GL_FLOAT16_SAMPLER_1D_SHADOW_AMD 0x91D9 #define GL_FLOAT16_SAMPLER_2D_SHADOW_AMD 0x91DA #define GL_FLOAT16_SAMPLER_2D_RECT_SHADOW_AMD 0x91DB #define GL_FLOAT16_SAMPLER_1D_ARRAY_SHADOW_AMD 0x91DC #define GL_FLOAT16_SAMPLER_2D_ARRAY_SHADOW_AMD 0x91DD #define GL_FLOAT16_SAMPLER_CUBE_SHADOW_AMD 0x91DE #define GL_FLOAT16_SAMPLER_CUBE_MAP_ARRAY_SHADOW_AMD 0x91DF #define GL_FLOAT16_IMAGE_1D_AMD 0x91E0 #define GL_FLOAT16_IMAGE_2D_AMD 0x91E1 #define GL_FLOAT16_IMAGE_3D_AMD 0x91E2 #define GL_FLOAT16_IMAGE_2D_RECT_AMD 0x91E3 #define GL_FLOAT16_IMAGE_CUBE_AMD 0x91E4 #define GL_FLOAT16_IMAGE_1D_ARRAY_AMD 0x91E5 #define GL_FLOAT16_IMAGE_2D_ARRAY_AMD 0x91E6 #define GL_FLOAT16_IMAGE_CUBE_MAP_ARRAY_AMD 0x91E7 #define GL_FLOAT16_IMAGE_BUFFER_AMD 0x91E8 #define GL_FLOAT16_IMAGE_2D_MULTISAMPLE_AMD 0x91E9 #define GL_FLOAT16_IMAGE_2D_MULTISAMPLE_ARRAY_AMD 0x91EA #define GL_INT_SAMPLER_1D 0x8DC9 #define GL_INT_SAMPLER_2D 0x8DCA #define GL_INT_SAMPLER_3D 0x8DCB #define GL_INT_SAMPLER_CUBE 0x8DCC #define GL_INT_SAMPLER_1D_ARRAY 0x8DCE #define GL_INT_SAMPLER_2D_ARRAY 0x8DCF #define GL_INT_SAMPLER_2D_RECT 0x8DCD #define GL_INT_SAMPLER_BUFFER 0x8DD0 #define GL_INT_SAMPLER_2D_MULTISAMPLE 0x9109 #define GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910C #define GL_INT_SAMPLER_CUBE_MAP_ARRAY 0x900E #define GL_INT_SAMPLER_CUBE_MAP_ARRAY_ARB 0x900E #define GL_UNSIGNED_INT_SAMPLER_1D 0x8DD1 #define GL_UNSIGNED_INT_SAMPLER_2D 0x8DD2 #define GL_UNSIGNED_INT_SAMPLER_3D 0x8DD3 #define GL_UNSIGNED_INT_SAMPLER_CUBE 0x8DD4 #define GL_UNSIGNED_INT_SAMPLER_1D_ARRAY 0x8DD6 #define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY 0x8DD7 #define GL_UNSIGNED_INT_SAMPLER_2D_RECT 0x8DD5 #define GL_UNSIGNED_INT_SAMPLER_BUFFER 0x8DD8 #define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910D #define GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY 0x900F #define GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY_ARB 0x900F #define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE 0x910A #define GL_IMAGE_1D 0x904C #define GL_IMAGE_2D 0x904D #define GL_IMAGE_3D 0x904E #define GL_IMAGE_2D_RECT 0x904F #define GL_IMAGE_CUBE 0x9050 #define GL_IMAGE_BUFFER 0x9051 #define GL_IMAGE_1D_ARRAY 0x9052 #define GL_IMAGE_2D_ARRAY 0x9053 #define GL_IMAGE_CUBE_MAP_ARRAY 0x9054 #define GL_IMAGE_2D_MULTISAMPLE 0x9055 #define GL_IMAGE_2D_MULTISAMPLE_ARRAY 0x9056 #define GL_INT_IMAGE_1D 0x9057 #define GL_INT_IMAGE_2D 0x9058 #define GL_INT_IMAGE_3D 0x9059 #define GL_INT_IMAGE_2D_RECT 0x905A #define GL_INT_IMAGE_CUBE 0x905B #define GL_INT_IMAGE_BUFFER 0x905C #define GL_INT_IMAGE_1D_ARRAY 0x905D #define GL_INT_IMAGE_2D_ARRAY 0x905E #define GL_INT_IMAGE_CUBE_MAP_ARRAY 0x905F #define GL_INT_IMAGE_2D_MULTISAMPLE 0x9060 #define GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY 0x9061 #define GL_UNSIGNED_INT_IMAGE_1D 0x9062 #define GL_UNSIGNED_INT_IMAGE_2D 0x9063 #define GL_UNSIGNED_INT_IMAGE_3D 0x9064 #define GL_UNSIGNED_INT_IMAGE_2D_RECT 0x9065 #define GL_UNSIGNED_INT_IMAGE_CUBE 0x9066 #define GL_UNSIGNED_INT_IMAGE_BUFFER 0x9067 #define GL_UNSIGNED_INT_IMAGE_1D_ARRAY 0x9068 #define GL_UNSIGNED_INT_IMAGE_2D_ARRAY 0x9069 #define GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY 0x906A #define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE 0x906B #define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY 0x906C #define GL_UNSIGNED_INT_ATOMIC_COUNTER 0x92DB ================================================ FILE: src/libraries/glslang/glslang/MachineIndependent/glslang_tab.cpp ================================================ /* A Bison parser, made by GNU Bison 3.8.2. */ /* Bison implementation for Yacc-like parsers in C Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work under terms of your choice, so long as that work isn't itself a parser generator using the skeleton or a modified version thereof as a parser skeleton. Alternatively, if you modify or redistribute the parser skeleton itself, you may (at your option) remove this special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ /* C LALR(1) parser skeleton written by Richard Stallman, by simplifying the original so-called "semantic" parser. */ /* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual, especially those whose name start with YY_ or yy_. They are private implementation details that can be changed or removed. */ /* All symbols defined below should begin with yy or YY, to avoid infringing on user name space. This should be done even for local variables, as they might otherwise be expanded by user macros. There are some unavoidable exceptions within include files to define necessary library symbols; they are noted "INFRINGES ON USER NAME SPACE" below. */ /* Identify Bison output, and Bison version. */ #define YYBISON 30802 /* Bison version string. */ #define YYBISON_VERSION "3.8.2" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" /* Pure parsers. */ #define YYPURE 1 /* Push parsers. */ #define YYPUSH 0 /* Pull parsers. */ #define YYPULL 1 /* First part of user prologue. */ #line 44 "MachineIndependent/glslang.y" /* Based on: ANSI C Yacc grammar In 1985, Jeff Lee published his Yacc grammar (which is accompanied by a matching Lex specification) for the April 30, 1985 draft version of the ANSI C standard. Tom Stockfisch reposted it to net.sources in 1987; that original, as mentioned in the answer to question 17.25 of the comp.lang.c FAQ, can be ftp'ed from ftp.uu.net, file usenet/net.sources/ansi.c.grammar.Z. I intend to keep this version as close to the current C Standard grammar as possible; please let me know if you discover discrepancies. Jutta Degener, 1995 */ #include "SymbolTable.h" #include "ParseHelper.h" #include "../Public/ShaderLang.h" #include "attribute.h" using namespace glslang; #line 97 "MachineIndependent/glslang_tab.cpp" # ifndef YY_CAST # ifdef __cplusplus # define YY_CAST(Type, Val) static_cast (Val) # define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast (Val) # else # define YY_CAST(Type, Val) ((Type) (Val)) # define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val)) # endif # endif # ifndef YY_NULLPTR # if defined __cplusplus # if 201103L <= __cplusplus # define YY_NULLPTR nullptr # else # define YY_NULLPTR 0 # endif # else # define YY_NULLPTR ((void*)0) # endif # endif #include "glslang_tab.cpp.h" /* Symbol kind. */ enum yysymbol_kind_t { YYSYMBOL_YYEMPTY = -2, YYSYMBOL_YYEOF = 0, /* "end of file" */ YYSYMBOL_YYerror = 1, /* error */ YYSYMBOL_YYUNDEF = 2, /* "invalid token" */ YYSYMBOL_CONST = 3, /* CONST */ YYSYMBOL_BOOL = 4, /* BOOL */ YYSYMBOL_INT = 5, /* INT */ YYSYMBOL_UINT = 6, /* UINT */ YYSYMBOL_FLOAT = 7, /* FLOAT */ YYSYMBOL_BVEC2 = 8, /* BVEC2 */ YYSYMBOL_BVEC3 = 9, /* BVEC3 */ YYSYMBOL_BVEC4 = 10, /* BVEC4 */ YYSYMBOL_IVEC2 = 11, /* IVEC2 */ YYSYMBOL_IVEC3 = 12, /* IVEC3 */ YYSYMBOL_IVEC4 = 13, /* IVEC4 */ YYSYMBOL_UVEC2 = 14, /* UVEC2 */ YYSYMBOL_UVEC3 = 15, /* UVEC3 */ YYSYMBOL_UVEC4 = 16, /* UVEC4 */ YYSYMBOL_VEC2 = 17, /* VEC2 */ YYSYMBOL_VEC3 = 18, /* VEC3 */ YYSYMBOL_VEC4 = 19, /* VEC4 */ YYSYMBOL_MAT2 = 20, /* MAT2 */ YYSYMBOL_MAT3 = 21, /* MAT3 */ YYSYMBOL_MAT4 = 22, /* MAT4 */ YYSYMBOL_MAT2X2 = 23, /* MAT2X2 */ YYSYMBOL_MAT2X3 = 24, /* MAT2X3 */ YYSYMBOL_MAT2X4 = 25, /* MAT2X4 */ YYSYMBOL_MAT3X2 = 26, /* MAT3X2 */ YYSYMBOL_MAT3X3 = 27, /* MAT3X3 */ YYSYMBOL_MAT3X4 = 28, /* MAT3X4 */ YYSYMBOL_MAT4X2 = 29, /* MAT4X2 */ YYSYMBOL_MAT4X3 = 30, /* MAT4X3 */ YYSYMBOL_MAT4X4 = 31, /* MAT4X4 */ YYSYMBOL_SAMPLER2D = 32, /* SAMPLER2D */ YYSYMBOL_SAMPLER3D = 33, /* SAMPLER3D */ YYSYMBOL_SAMPLERCUBE = 34, /* SAMPLERCUBE */ YYSYMBOL_SAMPLER2DSHADOW = 35, /* SAMPLER2DSHADOW */ YYSYMBOL_SAMPLERCUBESHADOW = 36, /* SAMPLERCUBESHADOW */ YYSYMBOL_SAMPLER2DARRAY = 37, /* SAMPLER2DARRAY */ YYSYMBOL_SAMPLER2DARRAYSHADOW = 38, /* SAMPLER2DARRAYSHADOW */ YYSYMBOL_ISAMPLER2D = 39, /* ISAMPLER2D */ YYSYMBOL_ISAMPLER3D = 40, /* ISAMPLER3D */ YYSYMBOL_ISAMPLERCUBE = 41, /* ISAMPLERCUBE */ YYSYMBOL_ISAMPLER2DARRAY = 42, /* ISAMPLER2DARRAY */ YYSYMBOL_USAMPLER2D = 43, /* USAMPLER2D */ YYSYMBOL_USAMPLER3D = 44, /* USAMPLER3D */ YYSYMBOL_USAMPLERCUBE = 45, /* USAMPLERCUBE */ YYSYMBOL_USAMPLER2DARRAY = 46, /* USAMPLER2DARRAY */ YYSYMBOL_SAMPLER = 47, /* SAMPLER */ YYSYMBOL_SAMPLERSHADOW = 48, /* SAMPLERSHADOW */ YYSYMBOL_TEXTURE2D = 49, /* TEXTURE2D */ YYSYMBOL_TEXTURE3D = 50, /* TEXTURE3D */ YYSYMBOL_TEXTURECUBE = 51, /* TEXTURECUBE */ YYSYMBOL_TEXTURE2DARRAY = 52, /* TEXTURE2DARRAY */ YYSYMBOL_ITEXTURE2D = 53, /* ITEXTURE2D */ YYSYMBOL_ITEXTURE3D = 54, /* ITEXTURE3D */ YYSYMBOL_ITEXTURECUBE = 55, /* ITEXTURECUBE */ YYSYMBOL_ITEXTURE2DARRAY = 56, /* ITEXTURE2DARRAY */ YYSYMBOL_UTEXTURE2D = 57, /* UTEXTURE2D */ YYSYMBOL_UTEXTURE3D = 58, /* UTEXTURE3D */ YYSYMBOL_UTEXTURECUBE = 59, /* UTEXTURECUBE */ YYSYMBOL_UTEXTURE2DARRAY = 60, /* UTEXTURE2DARRAY */ YYSYMBOL_ATTRIBUTE = 61, /* ATTRIBUTE */ YYSYMBOL_VARYING = 62, /* VARYING */ YYSYMBOL_FLOATE5M2_T = 63, /* FLOATE5M2_T */ YYSYMBOL_FLOATE4M3_T = 64, /* FLOATE4M3_T */ YYSYMBOL_BFLOAT16_T = 65, /* BFLOAT16_T */ YYSYMBOL_FLOAT16_T = 66, /* FLOAT16_T */ YYSYMBOL_FLOAT32_T = 67, /* FLOAT32_T */ YYSYMBOL_DOUBLE = 68, /* DOUBLE */ YYSYMBOL_FLOAT64_T = 69, /* FLOAT64_T */ YYSYMBOL_INT64_T = 70, /* INT64_T */ YYSYMBOL_UINT64_T = 71, /* UINT64_T */ YYSYMBOL_INT32_T = 72, /* INT32_T */ YYSYMBOL_UINT32_T = 73, /* UINT32_T */ YYSYMBOL_INT16_T = 74, /* INT16_T */ YYSYMBOL_UINT16_T = 75, /* UINT16_T */ YYSYMBOL_INT8_T = 76, /* INT8_T */ YYSYMBOL_UINT8_T = 77, /* UINT8_T */ YYSYMBOL_I64VEC2 = 78, /* I64VEC2 */ YYSYMBOL_I64VEC3 = 79, /* I64VEC3 */ YYSYMBOL_I64VEC4 = 80, /* I64VEC4 */ YYSYMBOL_U64VEC2 = 81, /* U64VEC2 */ YYSYMBOL_U64VEC3 = 82, /* U64VEC3 */ YYSYMBOL_U64VEC4 = 83, /* U64VEC4 */ YYSYMBOL_I32VEC2 = 84, /* I32VEC2 */ YYSYMBOL_I32VEC3 = 85, /* I32VEC3 */ YYSYMBOL_I32VEC4 = 86, /* I32VEC4 */ YYSYMBOL_U32VEC2 = 87, /* U32VEC2 */ YYSYMBOL_U32VEC3 = 88, /* U32VEC3 */ YYSYMBOL_U32VEC4 = 89, /* U32VEC4 */ YYSYMBOL_I16VEC2 = 90, /* I16VEC2 */ YYSYMBOL_I16VEC3 = 91, /* I16VEC3 */ YYSYMBOL_I16VEC4 = 92, /* I16VEC4 */ YYSYMBOL_U16VEC2 = 93, /* U16VEC2 */ YYSYMBOL_U16VEC3 = 94, /* U16VEC3 */ YYSYMBOL_U16VEC4 = 95, /* U16VEC4 */ YYSYMBOL_I8VEC2 = 96, /* I8VEC2 */ YYSYMBOL_I8VEC3 = 97, /* I8VEC3 */ YYSYMBOL_I8VEC4 = 98, /* I8VEC4 */ YYSYMBOL_U8VEC2 = 99, /* U8VEC2 */ YYSYMBOL_U8VEC3 = 100, /* U8VEC3 */ YYSYMBOL_U8VEC4 = 101, /* U8VEC4 */ YYSYMBOL_DVEC2 = 102, /* DVEC2 */ YYSYMBOL_DVEC3 = 103, /* DVEC3 */ YYSYMBOL_DVEC4 = 104, /* DVEC4 */ YYSYMBOL_DMAT2 = 105, /* DMAT2 */ YYSYMBOL_DMAT3 = 106, /* DMAT3 */ YYSYMBOL_DMAT4 = 107, /* DMAT4 */ YYSYMBOL_BF16VEC2 = 108, /* BF16VEC2 */ YYSYMBOL_BF16VEC3 = 109, /* BF16VEC3 */ YYSYMBOL_BF16VEC4 = 110, /* BF16VEC4 */ YYSYMBOL_FE5M2VEC2 = 111, /* FE5M2VEC2 */ YYSYMBOL_FE5M2VEC3 = 112, /* FE5M2VEC3 */ YYSYMBOL_FE5M2VEC4 = 113, /* FE5M2VEC4 */ YYSYMBOL_FE4M3VEC2 = 114, /* FE4M3VEC2 */ YYSYMBOL_FE4M3VEC3 = 115, /* FE4M3VEC3 */ YYSYMBOL_FE4M3VEC4 = 116, /* FE4M3VEC4 */ YYSYMBOL_F16VEC2 = 117, /* F16VEC2 */ YYSYMBOL_F16VEC3 = 118, /* F16VEC3 */ YYSYMBOL_F16VEC4 = 119, /* F16VEC4 */ YYSYMBOL_F16MAT2 = 120, /* F16MAT2 */ YYSYMBOL_F16MAT3 = 121, /* F16MAT3 */ YYSYMBOL_F16MAT4 = 122, /* F16MAT4 */ YYSYMBOL_F32VEC2 = 123, /* F32VEC2 */ YYSYMBOL_F32VEC3 = 124, /* F32VEC3 */ YYSYMBOL_F32VEC4 = 125, /* F32VEC4 */ YYSYMBOL_F32MAT2 = 126, /* F32MAT2 */ YYSYMBOL_F32MAT3 = 127, /* F32MAT3 */ YYSYMBOL_F32MAT4 = 128, /* F32MAT4 */ YYSYMBOL_F64VEC2 = 129, /* F64VEC2 */ YYSYMBOL_F64VEC3 = 130, /* F64VEC3 */ YYSYMBOL_F64VEC4 = 131, /* F64VEC4 */ YYSYMBOL_F64MAT2 = 132, /* F64MAT2 */ YYSYMBOL_F64MAT3 = 133, /* F64MAT3 */ YYSYMBOL_F64MAT4 = 134, /* F64MAT4 */ YYSYMBOL_DMAT2X2 = 135, /* DMAT2X2 */ YYSYMBOL_DMAT2X3 = 136, /* DMAT2X3 */ YYSYMBOL_DMAT2X4 = 137, /* DMAT2X4 */ YYSYMBOL_DMAT3X2 = 138, /* DMAT3X2 */ YYSYMBOL_DMAT3X3 = 139, /* DMAT3X3 */ YYSYMBOL_DMAT3X4 = 140, /* DMAT3X4 */ YYSYMBOL_DMAT4X2 = 141, /* DMAT4X2 */ YYSYMBOL_DMAT4X3 = 142, /* DMAT4X3 */ YYSYMBOL_DMAT4X4 = 143, /* DMAT4X4 */ YYSYMBOL_F16MAT2X2 = 144, /* F16MAT2X2 */ YYSYMBOL_F16MAT2X3 = 145, /* F16MAT2X3 */ YYSYMBOL_F16MAT2X4 = 146, /* F16MAT2X4 */ YYSYMBOL_F16MAT3X2 = 147, /* F16MAT3X2 */ YYSYMBOL_F16MAT3X3 = 148, /* F16MAT3X3 */ YYSYMBOL_F16MAT3X4 = 149, /* F16MAT3X4 */ YYSYMBOL_F16MAT4X2 = 150, /* F16MAT4X2 */ YYSYMBOL_F16MAT4X3 = 151, /* F16MAT4X3 */ YYSYMBOL_F16MAT4X4 = 152, /* F16MAT4X4 */ YYSYMBOL_F32MAT2X2 = 153, /* F32MAT2X2 */ YYSYMBOL_F32MAT2X3 = 154, /* F32MAT2X3 */ YYSYMBOL_F32MAT2X4 = 155, /* F32MAT2X4 */ YYSYMBOL_F32MAT3X2 = 156, /* F32MAT3X2 */ YYSYMBOL_F32MAT3X3 = 157, /* F32MAT3X3 */ YYSYMBOL_F32MAT3X4 = 158, /* F32MAT3X4 */ YYSYMBOL_F32MAT4X2 = 159, /* F32MAT4X2 */ YYSYMBOL_F32MAT4X3 = 160, /* F32MAT4X3 */ YYSYMBOL_F32MAT4X4 = 161, /* F32MAT4X4 */ YYSYMBOL_F64MAT2X2 = 162, /* F64MAT2X2 */ YYSYMBOL_F64MAT2X3 = 163, /* F64MAT2X3 */ YYSYMBOL_F64MAT2X4 = 164, /* F64MAT2X4 */ YYSYMBOL_F64MAT3X2 = 165, /* F64MAT3X2 */ YYSYMBOL_F64MAT3X3 = 166, /* F64MAT3X3 */ YYSYMBOL_F64MAT3X4 = 167, /* F64MAT3X4 */ YYSYMBOL_F64MAT4X2 = 168, /* F64MAT4X2 */ YYSYMBOL_F64MAT4X3 = 169, /* F64MAT4X3 */ YYSYMBOL_F64MAT4X4 = 170, /* F64MAT4X4 */ YYSYMBOL_ATOMIC_UINT = 171, /* ATOMIC_UINT */ YYSYMBOL_ACCSTRUCTNV = 172, /* ACCSTRUCTNV */ YYSYMBOL_ACCSTRUCTEXT = 173, /* ACCSTRUCTEXT */ YYSYMBOL_RAYQUERYEXT = 174, /* RAYQUERYEXT */ YYSYMBOL_FCOOPMATNV = 175, /* FCOOPMATNV */ YYSYMBOL_ICOOPMATNV = 176, /* ICOOPMATNV */ YYSYMBOL_UCOOPMATNV = 177, /* UCOOPMATNV */ YYSYMBOL_COOPMAT = 178, /* COOPMAT */ YYSYMBOL_COOPVECNV = 179, /* COOPVECNV */ YYSYMBOL_HITOBJECTNV = 180, /* HITOBJECTNV */ YYSYMBOL_HITOBJECTATTRNV = 181, /* HITOBJECTATTRNV */ YYSYMBOL_TENSORLAYOUTNV = 182, /* TENSORLAYOUTNV */ YYSYMBOL_TENSORVIEWNV = 183, /* TENSORVIEWNV */ YYSYMBOL_SAMPLERCUBEARRAY = 184, /* SAMPLERCUBEARRAY */ YYSYMBOL_SAMPLERCUBEARRAYSHADOW = 185, /* SAMPLERCUBEARRAYSHADOW */ YYSYMBOL_ISAMPLERCUBEARRAY = 186, /* ISAMPLERCUBEARRAY */ YYSYMBOL_USAMPLERCUBEARRAY = 187, /* USAMPLERCUBEARRAY */ YYSYMBOL_SAMPLER1D = 188, /* SAMPLER1D */ YYSYMBOL_SAMPLER1DARRAY = 189, /* SAMPLER1DARRAY */ YYSYMBOL_SAMPLER1DARRAYSHADOW = 190, /* SAMPLER1DARRAYSHADOW */ YYSYMBOL_ISAMPLER1D = 191, /* ISAMPLER1D */ YYSYMBOL_SAMPLER1DSHADOW = 192, /* SAMPLER1DSHADOW */ YYSYMBOL_SAMPLER2DRECT = 193, /* SAMPLER2DRECT */ YYSYMBOL_SAMPLER2DRECTSHADOW = 194, /* SAMPLER2DRECTSHADOW */ YYSYMBOL_ISAMPLER2DRECT = 195, /* ISAMPLER2DRECT */ YYSYMBOL_USAMPLER2DRECT = 196, /* USAMPLER2DRECT */ YYSYMBOL_SAMPLERBUFFER = 197, /* SAMPLERBUFFER */ YYSYMBOL_ISAMPLERBUFFER = 198, /* ISAMPLERBUFFER */ YYSYMBOL_USAMPLERBUFFER = 199, /* USAMPLERBUFFER */ YYSYMBOL_SAMPLER2DMS = 200, /* SAMPLER2DMS */ YYSYMBOL_ISAMPLER2DMS = 201, /* ISAMPLER2DMS */ YYSYMBOL_USAMPLER2DMS = 202, /* USAMPLER2DMS */ YYSYMBOL_SAMPLER2DMSARRAY = 203, /* SAMPLER2DMSARRAY */ YYSYMBOL_ISAMPLER2DMSARRAY = 204, /* ISAMPLER2DMSARRAY */ YYSYMBOL_USAMPLER2DMSARRAY = 205, /* USAMPLER2DMSARRAY */ YYSYMBOL_SAMPLEREXTERNALOES = 206, /* SAMPLEREXTERNALOES */ YYSYMBOL_SAMPLEREXTERNAL2DY2YEXT = 207, /* SAMPLEREXTERNAL2DY2YEXT */ YYSYMBOL_ISAMPLER1DARRAY = 208, /* ISAMPLER1DARRAY */ YYSYMBOL_USAMPLER1D = 209, /* USAMPLER1D */ YYSYMBOL_USAMPLER1DARRAY = 210, /* USAMPLER1DARRAY */ YYSYMBOL_F16SAMPLER1D = 211, /* F16SAMPLER1D */ YYSYMBOL_F16SAMPLER2D = 212, /* F16SAMPLER2D */ YYSYMBOL_F16SAMPLER3D = 213, /* F16SAMPLER3D */ YYSYMBOL_F16SAMPLER2DRECT = 214, /* F16SAMPLER2DRECT */ YYSYMBOL_F16SAMPLERCUBE = 215, /* F16SAMPLERCUBE */ YYSYMBOL_F16SAMPLER1DARRAY = 216, /* F16SAMPLER1DARRAY */ YYSYMBOL_F16SAMPLER2DARRAY = 217, /* F16SAMPLER2DARRAY */ YYSYMBOL_F16SAMPLERCUBEARRAY = 218, /* F16SAMPLERCUBEARRAY */ YYSYMBOL_F16SAMPLERBUFFER = 219, /* F16SAMPLERBUFFER */ YYSYMBOL_F16SAMPLER2DMS = 220, /* F16SAMPLER2DMS */ YYSYMBOL_F16SAMPLER2DMSARRAY = 221, /* F16SAMPLER2DMSARRAY */ YYSYMBOL_F16SAMPLER1DSHADOW = 222, /* F16SAMPLER1DSHADOW */ YYSYMBOL_F16SAMPLER2DSHADOW = 223, /* F16SAMPLER2DSHADOW */ YYSYMBOL_F16SAMPLER1DARRAYSHADOW = 224, /* F16SAMPLER1DARRAYSHADOW */ YYSYMBOL_F16SAMPLER2DARRAYSHADOW = 225, /* F16SAMPLER2DARRAYSHADOW */ YYSYMBOL_F16SAMPLER2DRECTSHADOW = 226, /* F16SAMPLER2DRECTSHADOW */ YYSYMBOL_F16SAMPLERCUBESHADOW = 227, /* F16SAMPLERCUBESHADOW */ YYSYMBOL_F16SAMPLERCUBEARRAYSHADOW = 228, /* F16SAMPLERCUBEARRAYSHADOW */ YYSYMBOL_IMAGE1D = 229, /* IMAGE1D */ YYSYMBOL_IIMAGE1D = 230, /* IIMAGE1D */ YYSYMBOL_UIMAGE1D = 231, /* UIMAGE1D */ YYSYMBOL_IMAGE2D = 232, /* IMAGE2D */ YYSYMBOL_IIMAGE2D = 233, /* IIMAGE2D */ YYSYMBOL_UIMAGE2D = 234, /* UIMAGE2D */ YYSYMBOL_IMAGE3D = 235, /* IMAGE3D */ YYSYMBOL_IIMAGE3D = 236, /* IIMAGE3D */ YYSYMBOL_UIMAGE3D = 237, /* UIMAGE3D */ YYSYMBOL_IMAGE2DRECT = 238, /* IMAGE2DRECT */ YYSYMBOL_IIMAGE2DRECT = 239, /* IIMAGE2DRECT */ YYSYMBOL_UIMAGE2DRECT = 240, /* UIMAGE2DRECT */ YYSYMBOL_IMAGECUBE = 241, /* IMAGECUBE */ YYSYMBOL_IIMAGECUBE = 242, /* IIMAGECUBE */ YYSYMBOL_UIMAGECUBE = 243, /* UIMAGECUBE */ YYSYMBOL_IMAGEBUFFER = 244, /* IMAGEBUFFER */ YYSYMBOL_IIMAGEBUFFER = 245, /* IIMAGEBUFFER */ YYSYMBOL_UIMAGEBUFFER = 246, /* UIMAGEBUFFER */ YYSYMBOL_IMAGE1DARRAY = 247, /* IMAGE1DARRAY */ YYSYMBOL_IIMAGE1DARRAY = 248, /* IIMAGE1DARRAY */ YYSYMBOL_UIMAGE1DARRAY = 249, /* UIMAGE1DARRAY */ YYSYMBOL_IMAGE2DARRAY = 250, /* IMAGE2DARRAY */ YYSYMBOL_IIMAGE2DARRAY = 251, /* IIMAGE2DARRAY */ YYSYMBOL_UIMAGE2DARRAY = 252, /* UIMAGE2DARRAY */ YYSYMBOL_IMAGECUBEARRAY = 253, /* IMAGECUBEARRAY */ YYSYMBOL_IIMAGECUBEARRAY = 254, /* IIMAGECUBEARRAY */ YYSYMBOL_UIMAGECUBEARRAY = 255, /* UIMAGECUBEARRAY */ YYSYMBOL_IMAGE2DMS = 256, /* IMAGE2DMS */ YYSYMBOL_IIMAGE2DMS = 257, /* IIMAGE2DMS */ YYSYMBOL_UIMAGE2DMS = 258, /* UIMAGE2DMS */ YYSYMBOL_IMAGE2DMSARRAY = 259, /* IMAGE2DMSARRAY */ YYSYMBOL_IIMAGE2DMSARRAY = 260, /* IIMAGE2DMSARRAY */ YYSYMBOL_UIMAGE2DMSARRAY = 261, /* UIMAGE2DMSARRAY */ YYSYMBOL_F16IMAGE1D = 262, /* F16IMAGE1D */ YYSYMBOL_F16IMAGE2D = 263, /* F16IMAGE2D */ YYSYMBOL_F16IMAGE3D = 264, /* F16IMAGE3D */ YYSYMBOL_F16IMAGE2DRECT = 265, /* F16IMAGE2DRECT */ YYSYMBOL_F16IMAGECUBE = 266, /* F16IMAGECUBE */ YYSYMBOL_F16IMAGE1DARRAY = 267, /* F16IMAGE1DARRAY */ YYSYMBOL_F16IMAGE2DARRAY = 268, /* F16IMAGE2DARRAY */ YYSYMBOL_F16IMAGECUBEARRAY = 269, /* F16IMAGECUBEARRAY */ YYSYMBOL_F16IMAGEBUFFER = 270, /* F16IMAGEBUFFER */ YYSYMBOL_F16IMAGE2DMS = 271, /* F16IMAGE2DMS */ YYSYMBOL_F16IMAGE2DMSARRAY = 272, /* F16IMAGE2DMSARRAY */ YYSYMBOL_I64IMAGE1D = 273, /* I64IMAGE1D */ YYSYMBOL_U64IMAGE1D = 274, /* U64IMAGE1D */ YYSYMBOL_I64IMAGE2D = 275, /* I64IMAGE2D */ YYSYMBOL_U64IMAGE2D = 276, /* U64IMAGE2D */ YYSYMBOL_I64IMAGE3D = 277, /* I64IMAGE3D */ YYSYMBOL_U64IMAGE3D = 278, /* U64IMAGE3D */ YYSYMBOL_I64IMAGE2DRECT = 279, /* I64IMAGE2DRECT */ YYSYMBOL_U64IMAGE2DRECT = 280, /* U64IMAGE2DRECT */ YYSYMBOL_I64IMAGECUBE = 281, /* I64IMAGECUBE */ YYSYMBOL_U64IMAGECUBE = 282, /* U64IMAGECUBE */ YYSYMBOL_I64IMAGEBUFFER = 283, /* I64IMAGEBUFFER */ YYSYMBOL_U64IMAGEBUFFER = 284, /* U64IMAGEBUFFER */ YYSYMBOL_I64IMAGE1DARRAY = 285, /* I64IMAGE1DARRAY */ YYSYMBOL_U64IMAGE1DARRAY = 286, /* U64IMAGE1DARRAY */ YYSYMBOL_I64IMAGE2DARRAY = 287, /* I64IMAGE2DARRAY */ YYSYMBOL_U64IMAGE2DARRAY = 288, /* U64IMAGE2DARRAY */ YYSYMBOL_I64IMAGECUBEARRAY = 289, /* I64IMAGECUBEARRAY */ YYSYMBOL_U64IMAGECUBEARRAY = 290, /* U64IMAGECUBEARRAY */ YYSYMBOL_I64IMAGE2DMS = 291, /* I64IMAGE2DMS */ YYSYMBOL_U64IMAGE2DMS = 292, /* U64IMAGE2DMS */ YYSYMBOL_I64IMAGE2DMSARRAY = 293, /* I64IMAGE2DMSARRAY */ YYSYMBOL_U64IMAGE2DMSARRAY = 294, /* U64IMAGE2DMSARRAY */ YYSYMBOL_TEXTURECUBEARRAY = 295, /* TEXTURECUBEARRAY */ YYSYMBOL_ITEXTURECUBEARRAY = 296, /* ITEXTURECUBEARRAY */ YYSYMBOL_UTEXTURECUBEARRAY = 297, /* UTEXTURECUBEARRAY */ YYSYMBOL_TEXTURE1D = 298, /* TEXTURE1D */ YYSYMBOL_ITEXTURE1D = 299, /* ITEXTURE1D */ YYSYMBOL_UTEXTURE1D = 300, /* UTEXTURE1D */ YYSYMBOL_TEXTURE1DARRAY = 301, /* TEXTURE1DARRAY */ YYSYMBOL_ITEXTURE1DARRAY = 302, /* ITEXTURE1DARRAY */ YYSYMBOL_UTEXTURE1DARRAY = 303, /* UTEXTURE1DARRAY */ YYSYMBOL_TEXTURE2DRECT = 304, /* TEXTURE2DRECT */ YYSYMBOL_ITEXTURE2DRECT = 305, /* ITEXTURE2DRECT */ YYSYMBOL_UTEXTURE2DRECT = 306, /* UTEXTURE2DRECT */ YYSYMBOL_TEXTUREBUFFER = 307, /* TEXTUREBUFFER */ YYSYMBOL_ITEXTUREBUFFER = 308, /* ITEXTUREBUFFER */ YYSYMBOL_UTEXTUREBUFFER = 309, /* UTEXTUREBUFFER */ YYSYMBOL_TEXTURE2DMS = 310, /* TEXTURE2DMS */ YYSYMBOL_ITEXTURE2DMS = 311, /* ITEXTURE2DMS */ YYSYMBOL_UTEXTURE2DMS = 312, /* UTEXTURE2DMS */ YYSYMBOL_TEXTURE2DMSARRAY = 313, /* TEXTURE2DMSARRAY */ YYSYMBOL_ITEXTURE2DMSARRAY = 314, /* ITEXTURE2DMSARRAY */ YYSYMBOL_UTEXTURE2DMSARRAY = 315, /* UTEXTURE2DMSARRAY */ YYSYMBOL_F16TEXTURE1D = 316, /* F16TEXTURE1D */ YYSYMBOL_F16TEXTURE2D = 317, /* F16TEXTURE2D */ YYSYMBOL_F16TEXTURE3D = 318, /* F16TEXTURE3D */ YYSYMBOL_F16TEXTURE2DRECT = 319, /* F16TEXTURE2DRECT */ YYSYMBOL_F16TEXTURECUBE = 320, /* F16TEXTURECUBE */ YYSYMBOL_F16TEXTURE1DARRAY = 321, /* F16TEXTURE1DARRAY */ YYSYMBOL_F16TEXTURE2DARRAY = 322, /* F16TEXTURE2DARRAY */ YYSYMBOL_F16TEXTURECUBEARRAY = 323, /* F16TEXTURECUBEARRAY */ YYSYMBOL_F16TEXTUREBUFFER = 324, /* F16TEXTUREBUFFER */ YYSYMBOL_F16TEXTURE2DMS = 325, /* F16TEXTURE2DMS */ YYSYMBOL_F16TEXTURE2DMSARRAY = 326, /* F16TEXTURE2DMSARRAY */ YYSYMBOL_SUBPASSINPUT = 327, /* SUBPASSINPUT */ YYSYMBOL_SUBPASSINPUTMS = 328, /* SUBPASSINPUTMS */ YYSYMBOL_ISUBPASSINPUT = 329, /* ISUBPASSINPUT */ YYSYMBOL_ISUBPASSINPUTMS = 330, /* ISUBPASSINPUTMS */ YYSYMBOL_USUBPASSINPUT = 331, /* USUBPASSINPUT */ YYSYMBOL_USUBPASSINPUTMS = 332, /* USUBPASSINPUTMS */ YYSYMBOL_F16SUBPASSINPUT = 333, /* F16SUBPASSINPUT */ YYSYMBOL_F16SUBPASSINPUTMS = 334, /* F16SUBPASSINPUTMS */ YYSYMBOL_SPIRV_INSTRUCTION = 335, /* SPIRV_INSTRUCTION */ YYSYMBOL_SPIRV_EXECUTION_MODE = 336, /* SPIRV_EXECUTION_MODE */ YYSYMBOL_SPIRV_EXECUTION_MODE_ID = 337, /* SPIRV_EXECUTION_MODE_ID */ YYSYMBOL_SPIRV_DECORATE = 338, /* SPIRV_DECORATE */ YYSYMBOL_SPIRV_DECORATE_ID = 339, /* SPIRV_DECORATE_ID */ YYSYMBOL_SPIRV_DECORATE_STRING = 340, /* SPIRV_DECORATE_STRING */ YYSYMBOL_SPIRV_TYPE = 341, /* SPIRV_TYPE */ YYSYMBOL_SPIRV_STORAGE_CLASS = 342, /* SPIRV_STORAGE_CLASS */ YYSYMBOL_SPIRV_BY_REFERENCE = 343, /* SPIRV_BY_REFERENCE */ YYSYMBOL_SPIRV_LITERAL = 344, /* SPIRV_LITERAL */ YYSYMBOL_ATTACHMENTEXT = 345, /* ATTACHMENTEXT */ YYSYMBOL_IATTACHMENTEXT = 346, /* IATTACHMENTEXT */ YYSYMBOL_UATTACHMENTEXT = 347, /* UATTACHMENTEXT */ YYSYMBOL_LEFT_OP = 348, /* LEFT_OP */ YYSYMBOL_RIGHT_OP = 349, /* RIGHT_OP */ YYSYMBOL_INC_OP = 350, /* INC_OP */ YYSYMBOL_DEC_OP = 351, /* DEC_OP */ YYSYMBOL_LE_OP = 352, /* LE_OP */ YYSYMBOL_GE_OP = 353, /* GE_OP */ YYSYMBOL_EQ_OP = 354, /* EQ_OP */ YYSYMBOL_NE_OP = 355, /* NE_OP */ YYSYMBOL_AND_OP = 356, /* AND_OP */ YYSYMBOL_OR_OP = 357, /* OR_OP */ YYSYMBOL_XOR_OP = 358, /* XOR_OP */ YYSYMBOL_MUL_ASSIGN = 359, /* MUL_ASSIGN */ YYSYMBOL_DIV_ASSIGN = 360, /* DIV_ASSIGN */ YYSYMBOL_ADD_ASSIGN = 361, /* ADD_ASSIGN */ YYSYMBOL_MOD_ASSIGN = 362, /* MOD_ASSIGN */ YYSYMBOL_LEFT_ASSIGN = 363, /* LEFT_ASSIGN */ YYSYMBOL_RIGHT_ASSIGN = 364, /* RIGHT_ASSIGN */ YYSYMBOL_AND_ASSIGN = 365, /* AND_ASSIGN */ YYSYMBOL_XOR_ASSIGN = 366, /* XOR_ASSIGN */ YYSYMBOL_OR_ASSIGN = 367, /* OR_ASSIGN */ YYSYMBOL_SUB_ASSIGN = 368, /* SUB_ASSIGN */ YYSYMBOL_STRING_LITERAL = 369, /* STRING_LITERAL */ YYSYMBOL_LEFT_PAREN = 370, /* LEFT_PAREN */ YYSYMBOL_RIGHT_PAREN = 371, /* RIGHT_PAREN */ YYSYMBOL_LEFT_BRACKET = 372, /* LEFT_BRACKET */ YYSYMBOL_RIGHT_BRACKET = 373, /* RIGHT_BRACKET */ YYSYMBOL_LEFT_BRACE = 374, /* LEFT_BRACE */ YYSYMBOL_RIGHT_BRACE = 375, /* RIGHT_BRACE */ YYSYMBOL_DOT = 376, /* DOT */ YYSYMBOL_COMMA = 377, /* COMMA */ YYSYMBOL_COLON = 378, /* COLON */ YYSYMBOL_EQUAL = 379, /* EQUAL */ YYSYMBOL_SEMICOLON = 380, /* SEMICOLON */ YYSYMBOL_BANG = 381, /* BANG */ YYSYMBOL_DASH = 382, /* DASH */ YYSYMBOL_TILDE = 383, /* TILDE */ YYSYMBOL_PLUS = 384, /* PLUS */ YYSYMBOL_STAR = 385, /* STAR */ YYSYMBOL_SLASH = 386, /* SLASH */ YYSYMBOL_PERCENT = 387, /* PERCENT */ YYSYMBOL_LEFT_ANGLE = 388, /* LEFT_ANGLE */ YYSYMBOL_RIGHT_ANGLE = 389, /* RIGHT_ANGLE */ YYSYMBOL_VERTICAL_BAR = 390, /* VERTICAL_BAR */ YYSYMBOL_CARET = 391, /* CARET */ YYSYMBOL_AMPERSAND = 392, /* AMPERSAND */ YYSYMBOL_QUESTION = 393, /* QUESTION */ YYSYMBOL_INVARIANT = 394, /* INVARIANT */ YYSYMBOL_HIGH_PRECISION = 395, /* HIGH_PRECISION */ YYSYMBOL_MEDIUM_PRECISION = 396, /* MEDIUM_PRECISION */ YYSYMBOL_LOW_PRECISION = 397, /* LOW_PRECISION */ YYSYMBOL_PRECISION = 398, /* PRECISION */ YYSYMBOL_PACKED = 399, /* PACKED */ YYSYMBOL_RESOURCE = 400, /* RESOURCE */ YYSYMBOL_SUPERP = 401, /* SUPERP */ YYSYMBOL_FLOATCONSTANT = 402, /* FLOATCONSTANT */ YYSYMBOL_INTCONSTANT = 403, /* INTCONSTANT */ YYSYMBOL_UINTCONSTANT = 404, /* UINTCONSTANT */ YYSYMBOL_BOOLCONSTANT = 405, /* BOOLCONSTANT */ YYSYMBOL_IDENTIFIER = 406, /* IDENTIFIER */ YYSYMBOL_TYPE_NAME = 407, /* TYPE_NAME */ YYSYMBOL_CENTROID = 408, /* CENTROID */ YYSYMBOL_IN = 409, /* IN */ YYSYMBOL_OUT = 410, /* OUT */ YYSYMBOL_INOUT = 411, /* INOUT */ YYSYMBOL_STRUCT = 412, /* STRUCT */ YYSYMBOL_VOID = 413, /* VOID */ YYSYMBOL_WHILE = 414, /* WHILE */ YYSYMBOL_BREAK = 415, /* BREAK */ YYSYMBOL_CONTINUE = 416, /* CONTINUE */ YYSYMBOL_DO = 417, /* DO */ YYSYMBOL_ELSE = 418, /* ELSE */ YYSYMBOL_FOR = 419, /* FOR */ YYSYMBOL_IF = 420, /* IF */ YYSYMBOL_DISCARD = 421, /* DISCARD */ YYSYMBOL_RETURN = 422, /* RETURN */ YYSYMBOL_SWITCH = 423, /* SWITCH */ YYSYMBOL_CASE = 424, /* CASE */ YYSYMBOL_DEFAULT = 425, /* DEFAULT */ YYSYMBOL_TERMINATE_INVOCATION = 426, /* TERMINATE_INVOCATION */ YYSYMBOL_TERMINATE_RAY = 427, /* TERMINATE_RAY */ YYSYMBOL_IGNORE_INTERSECTION = 428, /* IGNORE_INTERSECTION */ YYSYMBOL_UNIFORM = 429, /* UNIFORM */ YYSYMBOL_SHARED = 430, /* SHARED */ YYSYMBOL_BUFFER = 431, /* BUFFER */ YYSYMBOL_TILEIMAGEEXT = 432, /* TILEIMAGEEXT */ YYSYMBOL_FLAT = 433, /* FLAT */ YYSYMBOL_SMOOTH = 434, /* SMOOTH */ YYSYMBOL_LAYOUT = 435, /* LAYOUT */ YYSYMBOL_DOUBLECONSTANT = 436, /* DOUBLECONSTANT */ YYSYMBOL_INT16CONSTANT = 437, /* INT16CONSTANT */ YYSYMBOL_UINT16CONSTANT = 438, /* UINT16CONSTANT */ YYSYMBOL_FLOAT16CONSTANT = 439, /* FLOAT16CONSTANT */ YYSYMBOL_INT32CONSTANT = 440, /* INT32CONSTANT */ YYSYMBOL_UINT32CONSTANT = 441, /* UINT32CONSTANT */ YYSYMBOL_INT64CONSTANT = 442, /* INT64CONSTANT */ YYSYMBOL_UINT64CONSTANT = 443, /* UINT64CONSTANT */ YYSYMBOL_SUBROUTINE = 444, /* SUBROUTINE */ YYSYMBOL_DEMOTE = 445, /* DEMOTE */ YYSYMBOL_FUNCTION = 446, /* FUNCTION */ YYSYMBOL_PAYLOADNV = 447, /* PAYLOADNV */ YYSYMBOL_PAYLOADINNV = 448, /* PAYLOADINNV */ YYSYMBOL_HITATTRNV = 449, /* HITATTRNV */ YYSYMBOL_CALLDATANV = 450, /* CALLDATANV */ YYSYMBOL_CALLDATAINNV = 451, /* CALLDATAINNV */ YYSYMBOL_PAYLOADEXT = 452, /* PAYLOADEXT */ YYSYMBOL_PAYLOADINEXT = 453, /* PAYLOADINEXT */ YYSYMBOL_HITATTREXT = 454, /* HITATTREXT */ YYSYMBOL_CALLDATAEXT = 455, /* CALLDATAEXT */ YYSYMBOL_CALLDATAINEXT = 456, /* CALLDATAINEXT */ YYSYMBOL_PATCH = 457, /* PATCH */ YYSYMBOL_SAMPLE = 458, /* SAMPLE */ YYSYMBOL_NONUNIFORM = 459, /* NONUNIFORM */ YYSYMBOL_COHERENT = 460, /* COHERENT */ YYSYMBOL_VOLATILE = 461, /* VOLATILE */ YYSYMBOL_RESTRICT = 462, /* RESTRICT */ YYSYMBOL_READONLY = 463, /* READONLY */ YYSYMBOL_WRITEONLY = 464, /* WRITEONLY */ YYSYMBOL_NONTEMPORAL = 465, /* NONTEMPORAL */ YYSYMBOL_DEVICECOHERENT = 466, /* DEVICECOHERENT */ YYSYMBOL_QUEUEFAMILYCOHERENT = 467, /* QUEUEFAMILYCOHERENT */ YYSYMBOL_WORKGROUPCOHERENT = 468, /* WORKGROUPCOHERENT */ YYSYMBOL_SUBGROUPCOHERENT = 469, /* SUBGROUPCOHERENT */ YYSYMBOL_NONPRIVATE = 470, /* NONPRIVATE */ YYSYMBOL_SHADERCALLCOHERENT = 471, /* SHADERCALLCOHERENT */ YYSYMBOL_NOPERSPECTIVE = 472, /* NOPERSPECTIVE */ YYSYMBOL_EXPLICITINTERPAMD = 473, /* EXPLICITINTERPAMD */ YYSYMBOL_PERVERTEXEXT = 474, /* PERVERTEXEXT */ YYSYMBOL_PERVERTEXNV = 475, /* PERVERTEXNV */ YYSYMBOL_PERPRIMITIVENV = 476, /* PERPRIMITIVENV */ YYSYMBOL_PERVIEWNV = 477, /* PERVIEWNV */ YYSYMBOL_PERTASKNV = 478, /* PERTASKNV */ YYSYMBOL_PERPRIMITIVEEXT = 479, /* PERPRIMITIVEEXT */ YYSYMBOL_TASKPAYLOADWORKGROUPEXT = 480, /* TASKPAYLOADWORKGROUPEXT */ YYSYMBOL_PRECISE = 481, /* PRECISE */ YYSYMBOL_YYACCEPT = 482, /* $accept */ YYSYMBOL_variable_identifier = 483, /* variable_identifier */ YYSYMBOL_primary_expression = 484, /* primary_expression */ YYSYMBOL_postfix_expression = 485, /* postfix_expression */ YYSYMBOL_integer_expression = 486, /* integer_expression */ YYSYMBOL_function_call = 487, /* function_call */ YYSYMBOL_function_call_or_method = 488, /* function_call_or_method */ YYSYMBOL_function_call_generic = 489, /* function_call_generic */ YYSYMBOL_function_call_header_no_parameters = 490, /* function_call_header_no_parameters */ YYSYMBOL_function_call_header_with_parameters = 491, /* function_call_header_with_parameters */ YYSYMBOL_function_call_header = 492, /* function_call_header */ YYSYMBOL_function_identifier = 493, /* function_identifier */ YYSYMBOL_unary_expression = 494, /* unary_expression */ YYSYMBOL_unary_operator = 495, /* unary_operator */ YYSYMBOL_multiplicative_expression = 496, /* multiplicative_expression */ YYSYMBOL_additive_expression = 497, /* additive_expression */ YYSYMBOL_shift_expression = 498, /* shift_expression */ YYSYMBOL_relational_expression = 499, /* relational_expression */ YYSYMBOL_equality_expression = 500, /* equality_expression */ YYSYMBOL_and_expression = 501, /* and_expression */ YYSYMBOL_exclusive_or_expression = 502, /* exclusive_or_expression */ YYSYMBOL_inclusive_or_expression = 503, /* inclusive_or_expression */ YYSYMBOL_logical_and_expression = 504, /* logical_and_expression */ YYSYMBOL_logical_xor_expression = 505, /* logical_xor_expression */ YYSYMBOL_logical_or_expression = 506, /* logical_or_expression */ YYSYMBOL_conditional_expression = 507, /* conditional_expression */ YYSYMBOL_508_1 = 508, /* $@1 */ YYSYMBOL_assignment_expression = 509, /* assignment_expression */ YYSYMBOL_assignment_operator = 510, /* assignment_operator */ YYSYMBOL_expression = 511, /* expression */ YYSYMBOL_constant_expression = 512, /* constant_expression */ YYSYMBOL_declaration = 513, /* declaration */ YYSYMBOL_block_structure = 514, /* block_structure */ YYSYMBOL_515_2 = 515, /* $@2 */ YYSYMBOL_identifier_list = 516, /* identifier_list */ YYSYMBOL_function_prototype = 517, /* function_prototype */ YYSYMBOL_function_declarator = 518, /* function_declarator */ YYSYMBOL_function_header_with_parameters = 519, /* function_header_with_parameters */ YYSYMBOL_function_header = 520, /* function_header */ YYSYMBOL_parameter_declarator = 521, /* parameter_declarator */ YYSYMBOL_parameter_declaration = 522, /* parameter_declaration */ YYSYMBOL_parameter_type_specifier = 523, /* parameter_type_specifier */ YYSYMBOL_init_declarator_list = 524, /* init_declarator_list */ YYSYMBOL_single_declaration = 525, /* single_declaration */ YYSYMBOL_fully_specified_type = 526, /* fully_specified_type */ YYSYMBOL_invariant_qualifier = 527, /* invariant_qualifier */ YYSYMBOL_interpolation_qualifier = 528, /* interpolation_qualifier */ YYSYMBOL_layout_qualifier = 529, /* layout_qualifier */ YYSYMBOL_layout_qualifier_id_list = 530, /* layout_qualifier_id_list */ YYSYMBOL_layout_qualifier_id = 531, /* layout_qualifier_id */ YYSYMBOL_precise_qualifier = 532, /* precise_qualifier */ YYSYMBOL_type_qualifier = 533, /* type_qualifier */ YYSYMBOL_single_type_qualifier = 534, /* single_type_qualifier */ YYSYMBOL_storage_qualifier = 535, /* storage_qualifier */ YYSYMBOL_non_uniform_qualifier = 536, /* non_uniform_qualifier */ YYSYMBOL_type_name_list = 537, /* type_name_list */ YYSYMBOL_type_specifier = 538, /* type_specifier */ YYSYMBOL_array_specifier = 539, /* array_specifier */ YYSYMBOL_type_parameter_specifier_opt = 540, /* type_parameter_specifier_opt */ YYSYMBOL_type_parameter_specifier = 541, /* type_parameter_specifier */ YYSYMBOL_type_parameter_specifier_list = 542, /* type_parameter_specifier_list */ YYSYMBOL_type_specifier_nonarray = 543, /* type_specifier_nonarray */ YYSYMBOL_precision_qualifier = 544, /* precision_qualifier */ YYSYMBOL_struct_specifier = 545, /* struct_specifier */ YYSYMBOL_546_3 = 546, /* $@3 */ YYSYMBOL_547_4 = 547, /* $@4 */ YYSYMBOL_struct_declaration_list = 548, /* struct_declaration_list */ YYSYMBOL_struct_declaration = 549, /* struct_declaration */ YYSYMBOL_struct_declarator_list = 550, /* struct_declarator_list */ YYSYMBOL_struct_declarator = 551, /* struct_declarator */ YYSYMBOL_initializer = 552, /* initializer */ YYSYMBOL_initializer_list = 553, /* initializer_list */ YYSYMBOL_declaration_statement = 554, /* declaration_statement */ YYSYMBOL_statement = 555, /* statement */ YYSYMBOL_simple_statement = 556, /* simple_statement */ YYSYMBOL_demote_statement = 557, /* demote_statement */ YYSYMBOL_compound_statement = 558, /* compound_statement */ YYSYMBOL_559_5 = 559, /* $@5 */ YYSYMBOL_560_6 = 560, /* $@6 */ YYSYMBOL_statement_no_new_scope = 561, /* statement_no_new_scope */ YYSYMBOL_statement_scoped = 562, /* statement_scoped */ YYSYMBOL_563_7 = 563, /* $@7 */ YYSYMBOL_564_8 = 564, /* $@8 */ YYSYMBOL_compound_statement_no_new_scope = 565, /* compound_statement_no_new_scope */ YYSYMBOL_statement_list = 566, /* statement_list */ YYSYMBOL_expression_statement = 567, /* expression_statement */ YYSYMBOL_selection_statement = 568, /* selection_statement */ YYSYMBOL_selection_statement_nonattributed = 569, /* selection_statement_nonattributed */ YYSYMBOL_selection_rest_statement = 570, /* selection_rest_statement */ YYSYMBOL_condition = 571, /* condition */ YYSYMBOL_switch_statement = 572, /* switch_statement */ YYSYMBOL_switch_statement_nonattributed = 573, /* switch_statement_nonattributed */ YYSYMBOL_574_9 = 574, /* $@9 */ YYSYMBOL_switch_statement_list = 575, /* switch_statement_list */ YYSYMBOL_case_label = 576, /* case_label */ YYSYMBOL_iteration_statement = 577, /* iteration_statement */ YYSYMBOL_iteration_statement_nonattributed = 578, /* iteration_statement_nonattributed */ YYSYMBOL_579_10 = 579, /* $@10 */ YYSYMBOL_580_11 = 580, /* $@11 */ YYSYMBOL_581_12 = 581, /* $@12 */ YYSYMBOL_for_init_statement = 582, /* for_init_statement */ YYSYMBOL_conditionopt = 583, /* conditionopt */ YYSYMBOL_for_rest_statement = 584, /* for_rest_statement */ YYSYMBOL_jump_statement = 585, /* jump_statement */ YYSYMBOL_translation_unit = 586, /* translation_unit */ YYSYMBOL_external_declaration = 587, /* external_declaration */ YYSYMBOL_function_definition = 588, /* function_definition */ YYSYMBOL_589_13 = 589, /* $@13 */ YYSYMBOL_attribute = 590, /* attribute */ YYSYMBOL_attribute_list = 591, /* attribute_list */ YYSYMBOL_single_attribute = 592, /* single_attribute */ YYSYMBOL_spirv_requirements_list = 593, /* spirv_requirements_list */ YYSYMBOL_spirv_requirements_parameter = 594, /* spirv_requirements_parameter */ YYSYMBOL_spirv_extension_list = 595, /* spirv_extension_list */ YYSYMBOL_spirv_capability_list = 596, /* spirv_capability_list */ YYSYMBOL_spirv_execution_mode_qualifier = 597, /* spirv_execution_mode_qualifier */ YYSYMBOL_spirv_execution_mode_parameter_list = 598, /* spirv_execution_mode_parameter_list */ YYSYMBOL_spirv_execution_mode_parameter = 599, /* spirv_execution_mode_parameter */ YYSYMBOL_spirv_execution_mode_id_parameter_list = 600, /* spirv_execution_mode_id_parameter_list */ YYSYMBOL_spirv_storage_class_qualifier = 601, /* spirv_storage_class_qualifier */ YYSYMBOL_spirv_decorate_qualifier = 602, /* spirv_decorate_qualifier */ YYSYMBOL_spirv_decorate_parameter_list = 603, /* spirv_decorate_parameter_list */ YYSYMBOL_spirv_decorate_parameter = 604, /* spirv_decorate_parameter */ YYSYMBOL_spirv_decorate_id_parameter_list = 605, /* spirv_decorate_id_parameter_list */ YYSYMBOL_spirv_decorate_id_parameter = 606, /* spirv_decorate_id_parameter */ YYSYMBOL_spirv_decorate_string_parameter_list = 607, /* spirv_decorate_string_parameter_list */ YYSYMBOL_spirv_type_specifier = 608, /* spirv_type_specifier */ YYSYMBOL_spirv_type_parameter_list = 609, /* spirv_type_parameter_list */ YYSYMBOL_spirv_type_parameter = 610, /* spirv_type_parameter */ YYSYMBOL_spirv_instruction_qualifier = 611, /* spirv_instruction_qualifier */ YYSYMBOL_spirv_instruction_qualifier_list = 612, /* spirv_instruction_qualifier_list */ YYSYMBOL_spirv_instruction_qualifier_id = 613 /* spirv_instruction_qualifier_id */ }; typedef enum yysymbol_kind_t yysymbol_kind_t; /* Second part of user prologue. */ #line 111 "MachineIndependent/glslang.y" #define parseContext (*pParseContext) #define yyerror(context, msg) context->parserError(msg) extern int yylex(YYSTYPE*, TParseContext&); #line 753 "MachineIndependent/glslang_tab.cpp" #ifdef short # undef short #endif /* On compilers that do not define __PTRDIFF_MAX__ etc., make sure and (if available) are included so that the code can choose integer types of a good width. */ #ifndef __PTRDIFF_MAX__ # include /* INFRINGES ON USER NAME SPACE */ # if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ # include /* INFRINGES ON USER NAME SPACE */ # define YY_STDINT_H # endif #endif /* Narrow types that promote to a signed type and that can represent a signed or unsigned integer of at least N bits. In tables they can save space and decrease cache pressure. Promoting to a signed type helps avoid bugs in integer arithmetic. */ #ifdef __INT_LEAST8_MAX__ typedef __INT_LEAST8_TYPE__ yytype_int8; #elif defined YY_STDINT_H typedef int_least8_t yytype_int8; #else typedef signed char yytype_int8; #endif #ifdef __INT_LEAST16_MAX__ typedef __INT_LEAST16_TYPE__ yytype_int16; #elif defined YY_STDINT_H typedef int_least16_t yytype_int16; #else typedef short yytype_int16; #endif /* Work around bug in HP-UX 11.23, which defines these macros incorrectly for preprocessor constants. This workaround can likely be removed in 2023, as HPE has promised support for HP-UX 11.23 (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of . */ #ifdef __hpux # undef UINT_LEAST8_MAX # undef UINT_LEAST16_MAX # define UINT_LEAST8_MAX 255 # define UINT_LEAST16_MAX 65535 #endif #if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__ typedef __UINT_LEAST8_TYPE__ yytype_uint8; #elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \ && UINT_LEAST8_MAX <= INT_MAX) typedef uint_least8_t yytype_uint8; #elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX typedef unsigned char yytype_uint8; #else typedef short yytype_uint8; #endif #if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__ typedef __UINT_LEAST16_TYPE__ yytype_uint16; #elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \ && UINT_LEAST16_MAX <= INT_MAX) typedef uint_least16_t yytype_uint16; #elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX typedef unsigned short yytype_uint16; #else typedef int yytype_uint16; #endif #ifndef YYPTRDIFF_T # if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__ # define YYPTRDIFF_T __PTRDIFF_TYPE__ # define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__ # elif defined PTRDIFF_MAX # ifndef ptrdiff_t # include /* INFRINGES ON USER NAME SPACE */ # endif # define YYPTRDIFF_T ptrdiff_t # define YYPTRDIFF_MAXIMUM PTRDIFF_MAX # else # define YYPTRDIFF_T long # define YYPTRDIFF_MAXIMUM LONG_MAX # endif #endif #ifndef YYSIZE_T # ifdef __SIZE_TYPE__ # define YYSIZE_T __SIZE_TYPE__ # elif defined size_t # define YYSIZE_T size_t # elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ # include /* INFRINGES ON USER NAME SPACE */ # define YYSIZE_T size_t # else # define YYSIZE_T unsigned # endif #endif #define YYSIZE_MAXIMUM \ YY_CAST (YYPTRDIFF_T, \ (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \ ? YYPTRDIFF_MAXIMUM \ : YY_CAST (YYSIZE_T, -1))) #define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X)) /* Stored state numbers (used for stacks). */ typedef yytype_int16 yy_state_t; /* State numbers in computations. */ typedef int yy_state_fast_t; #ifndef YY_ # if defined YYENABLE_NLS && YYENABLE_NLS # if ENABLE_NLS # include /* INFRINGES ON USER NAME SPACE */ # define YY_(Msgid) dgettext ("bison-runtime", Msgid) # endif # endif # ifndef YY_ # define YY_(Msgid) Msgid # endif #endif #ifndef YY_ATTRIBUTE_PURE # if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__) # define YY_ATTRIBUTE_PURE __attribute__ ((__pure__)) # else # define YY_ATTRIBUTE_PURE # endif #endif #ifndef YY_ATTRIBUTE_UNUSED # if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__) # define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) # else # define YY_ATTRIBUTE_UNUSED # endif #endif /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ # define YY_USE(E) ((void) (E)) #else # define YY_USE(E) /* empty */ #endif /* Suppress an incorrect diagnostic about yylval being uninitialized. */ #if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__ # if __GNUC__ * 100 + __GNUC_MINOR__ < 407 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ _Pragma ("GCC diagnostic push") \ _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") # else # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ _Pragma ("GCC diagnostic push") \ _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \ _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") # endif # define YY_IGNORE_MAYBE_UNINITIALIZED_END \ _Pragma ("GCC diagnostic pop") #else # define YY_INITIAL_VALUE(Value) Value #endif #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN # define YY_IGNORE_MAYBE_UNINITIALIZED_END #endif #ifndef YY_INITIAL_VALUE # define YY_INITIAL_VALUE(Value) /* Nothing. */ #endif #if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__ # define YY_IGNORE_USELESS_CAST_BEGIN \ _Pragma ("GCC diagnostic push") \ _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"") # define YY_IGNORE_USELESS_CAST_END \ _Pragma ("GCC diagnostic pop") #endif #ifndef YY_IGNORE_USELESS_CAST_BEGIN # define YY_IGNORE_USELESS_CAST_BEGIN # define YY_IGNORE_USELESS_CAST_END #endif #define YY_ASSERT(E) ((void) (0 && (E))) #if 1 /* The parser invokes alloca or malloc; define the necessary symbols. */ # ifdef YYSTACK_USE_ALLOCA # if YYSTACK_USE_ALLOCA # ifdef __GNUC__ # define YYSTACK_ALLOC __builtin_alloca # elif defined __BUILTIN_VA_ARG_INCR # include /* INFRINGES ON USER NAME SPACE */ # elif defined _AIX # define YYSTACK_ALLOC __alloca # elif defined _MSC_VER # include /* INFRINGES ON USER NAME SPACE */ # define alloca _alloca # else # define YYSTACK_ALLOC alloca # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS # include /* INFRINGES ON USER NAME SPACE */ /* Use EXIT_SUCCESS as a witness for stdlib.h. */ # ifndef EXIT_SUCCESS # define EXIT_SUCCESS 0 # endif # endif # endif # endif # endif # ifdef YYSTACK_ALLOC /* Pacify GCC's 'empty if-body' warning. */ # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) # ifndef YYSTACK_ALLOC_MAXIMUM /* The OS might guarantee only one guard page at the bottom of the stack, and a page size can be as small as 4096 bytes. So we cannot safely invoke alloca (N) if N exceeds 4096. Use a slightly smaller number to allow for a few compiler-allocated temporary stack slots. */ # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ # endif # else # define YYSTACK_ALLOC YYMALLOC # define YYSTACK_FREE YYFREE # ifndef YYSTACK_ALLOC_MAXIMUM # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM # endif # if (defined __cplusplus && ! defined EXIT_SUCCESS \ && ! ((defined YYMALLOC || defined malloc) \ && (defined YYFREE || defined free))) # include /* INFRINGES ON USER NAME SPACE */ # ifndef EXIT_SUCCESS # define EXIT_SUCCESS 0 # endif # endif # ifndef YYMALLOC # define YYMALLOC malloc # if ! defined malloc && ! defined EXIT_SUCCESS void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ # endif # endif # ifndef YYFREE # define YYFREE free # if ! defined free && ! defined EXIT_SUCCESS void free (void *); /* INFRINGES ON USER NAME SPACE */ # endif # endif # endif #endif /* 1 */ #if (! defined yyoverflow \ && (! defined __cplusplus \ || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc { yy_state_t yyss_alloc; YYSTYPE yyvs_alloc; }; /* The size of the maximum gap between one aligned stack and the next. */ # define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1) /* The size of an array large to enough to hold all stacks, each with N elements. */ # define YYSTACK_BYTES(N) \ ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE)) \ + YYSTACK_GAP_MAXIMUM) # define YYCOPY_NEEDED 1 /* Relocate STACK from its old location to the new one. The local variables YYSIZE and YYSTACKSIZE give the old and new number of elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ # define YYSTACK_RELOCATE(Stack_alloc, Stack) \ do \ { \ YYPTRDIFF_T yynewbytes; \ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ Stack = &yyptr->Stack_alloc; \ yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \ yyptr += yynewbytes / YYSIZEOF (*yyptr); \ } \ while (0) #endif #if defined YYCOPY_NEEDED && YYCOPY_NEEDED /* Copy COUNT objects from SRC to DST. The source and destination do not overlap. */ # ifndef YYCOPY # if defined __GNUC__ && 1 < __GNUC__ # define YYCOPY(Dst, Src, Count) \ __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src))) # else # define YYCOPY(Dst, Src, Count) \ do \ { \ YYPTRDIFF_T yyi; \ for (yyi = 0; yyi < (Count); yyi++) \ (Dst)[yyi] = (Src)[yyi]; \ } \ while (0) # endif # endif #endif /* !YYCOPY_NEEDED */ /* YYFINAL -- State number of the termination state. */ #define YYFINAL 469 /* YYLAST -- Last index in YYTABLE. */ #define YYLAST 13182 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 482 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 132 /* YYNRULES -- Number of rules. */ #define YYNRULES 717 /* YYNSTATES -- Number of states. */ #define YYNSTATES 963 /* YYMAXUTOK -- Last valid token kind. */ #define YYMAXUTOK 736 /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM as returned by yylex, with out-of-bounds checking. */ #define YYTRANSLATE(YYX) \ (0 <= (YYX) && (YYX) <= YYMAXUTOK \ ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \ : YYSYMBOL_YYUNDEF) /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM as returned by yylex. */ static const yytype_int16 yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481 }; #if YYDEBUG /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_int16 yyrline[] = { 0, 360, 360, 366, 369, 374, 377, 380, 384, 387, 390, 394, 398, 402, 406, 410, 414, 420, 427, 430, 433, 436, 439, 444, 452, 459, 466, 472, 476, 483, 486, 492, 510, 535, 543, 548, 575, 583, 589, 593, 597, 617, 618, 619, 620, 626, 627, 632, 637, 646, 647, 652, 660, 661, 667, 676, 677, 682, 687, 692, 700, 701, 710, 722, 723, 732, 733, 742, 743, 752, 753, 761, 762, 770, 771, 779, 780, 780, 798, 799, 815, 819, 823, 827, 832, 836, 840, 844, 848, 852, 856, 863, 866, 877, 884, 889, 896, 901, 906, 913, 917, 921, 925, 930, 935, 944, 944, 955, 959, 966, 971, 979, 987, 999, 1002, 1009, 1022, 1045, 1068, 1083, 1108, 1119, 1129, 1139, 1149, 1158, 1161, 1165, 1169, 1174, 1182, 1187, 1192, 1197, 1202, 1211, 1221, 1248, 1257, 1264, 1271, 1278, 1285, 1293, 1301, 1311, 1321, 1328, 1338, 1344, 1347, 1354, 1358, 1362, 1370, 1379, 1382, 1393, 1396, 1399, 1403, 1407, 1411, 1415, 1418, 1423, 1427, 1432, 1440, 1444, 1449, 1455, 1461, 1468, 1473, 1478, 1486, 1491, 1503, 1517, 1523, 1528, 1536, 1544, 1552, 1560, 1568, 1576, 1584, 1592, 1600, 1607, 1614, 1618, 1623, 1628, 1633, 1638, 1643, 1648, 1652, 1656, 1660, 1664, 1668, 1674, 1680, 1690, 1697, 1700, 1708, 1715, 1726, 1731, 1739, 1743, 1753, 1756, 1762, 1768, 1774, 1782, 1792, 1796, 1800, 1804, 1809, 1813, 1818, 1823, 1828, 1833, 1838, 1843, 1848, 1853, 1858, 1864, 1870, 1876, 1881, 1886, 1891, 1896, 1901, 1906, 1911, 1916, 1921, 1926, 1931, 1936, 1943, 1948, 1953, 1958, 1963, 1968, 1973, 1978, 1983, 1988, 1993, 1998, 2003, 2008, 2013, 2021, 2029, 2037, 2043, 2049, 2055, 2061, 2067, 2073, 2079, 2085, 2091, 2097, 2103, 2109, 2115, 2121, 2127, 2133, 2139, 2145, 2151, 2157, 2163, 2169, 2175, 2181, 2187, 2193, 2199, 2205, 2211, 2217, 2223, 2229, 2235, 2241, 2247, 2253, 2259, 2265, 2271, 2277, 2283, 2289, 2297, 2305, 2313, 2321, 2329, 2337, 2345, 2353, 2361, 2369, 2377, 2385, 2391, 2397, 2403, 2409, 2415, 2421, 2427, 2433, 2439, 2445, 2451, 2457, 2463, 2469, 2475, 2481, 2487, 2493, 2499, 2505, 2511, 2517, 2523, 2529, 2535, 2541, 2547, 2553, 2559, 2565, 2571, 2577, 2583, 2589, 2595, 2601, 2605, 2609, 2613, 2618, 2623, 2628, 2633, 2638, 2643, 2648, 2653, 2658, 2663, 2668, 2673, 2678, 2683, 2689, 2695, 2701, 2707, 2713, 2719, 2725, 2731, 2737, 2743, 2749, 2755, 2761, 2766, 2771, 2776, 2781, 2786, 2791, 2796, 2801, 2806, 2811, 2816, 2821, 2826, 2831, 2836, 2841, 2846, 2851, 2856, 2861, 2866, 2871, 2876, 2881, 2886, 2891, 2896, 2901, 2906, 2911, 2916, 2921, 2926, 2932, 2938, 2943, 2948, 2953, 2959, 2964, 2969, 2974, 2980, 2985, 2990, 2995, 3001, 3006, 3011, 3016, 3022, 3028, 3034, 3040, 3045, 3051, 3057, 3063, 3068, 3073, 3078, 3083, 3088, 3094, 3099, 3104, 3109, 3115, 3120, 3125, 3130, 3136, 3141, 3146, 3151, 3157, 3162, 3167, 3172, 3178, 3183, 3188, 3193, 3199, 3204, 3209, 3214, 3220, 3225, 3230, 3235, 3241, 3246, 3251, 3256, 3262, 3267, 3272, 3277, 3283, 3288, 3293, 3298, 3304, 3309, 3314, 3319, 3325, 3330, 3335, 3340, 3346, 3351, 3356, 3361, 3367, 3372, 3377, 3382, 3388, 3393, 3398, 3403, 3408, 3413, 3418, 3423, 3428, 3433, 3438, 3443, 3448, 3453, 3458, 3463, 3468, 3473, 3478, 3483, 3488, 3493, 3498, 3503, 3508, 3514, 3520, 3526, 3532, 3538, 3544, 3550, 3557, 3564, 3570, 3576, 3582, 3588, 3595, 3602, 3609, 3616, 3621, 3626, 3630, 3636, 3640, 3644, 3649, 3665, 3670, 3675, 3683, 3683, 3700, 3700, 3710, 3713, 3726, 3748, 3775, 3779, 3785, 3790, 3801, 3804, 3810, 3816, 3825, 3828, 3834, 3838, 3839, 3845, 3846, 3847, 3848, 3849, 3850, 3851, 3852, 3856, 3864, 3865, 3869, 3865, 3883, 3884, 3888, 3888, 3895, 3895, 3909, 3912, 3922, 3930, 3941, 3942, 3946, 3949, 3956, 3963, 3967, 3975, 3979, 3992, 3995, 4002, 4002, 4022, 4025, 4031, 4043, 4055, 4058, 4066, 4066, 4081, 4081, 4099, 4099, 4120, 4123, 4129, 4132, 4138, 4142, 4149, 4154, 4159, 4166, 4169, 4173, 4177, 4181, 4190, 4194, 4203, 4206, 4209, 4217, 4217, 4259, 4264, 4267, 4272, 4275, 4280, 4283, 4288, 4291, 4296, 4299, 4304, 4307, 4312, 4316, 4321, 4325, 4330, 4334, 4341, 4344, 4349, 4352, 4355, 4358, 4361, 4366, 4375, 4386, 4391, 4399, 4403, 4408, 4412, 4417, 4421, 4426, 4430, 4437, 4440, 4445, 4448, 4451, 4454, 4459, 4462, 4467, 4473, 4476, 4479, 4482, 4487, 4491, 4496, 4500, 4505, 4509, 4516, 4519, 4524, 4527, 4532, 4535, 4541, 4544, 4549, 4552 }; #endif /** Accessing symbol of state STATE. */ #define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State]) #if 1 /* The user-facing name of the symbol whose (internal) number is YYSYMBOL. No bounds checking. */ static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED; /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = { "\"end of file\"", "error", "\"invalid token\"", "CONST", "BOOL", "INT", "UINT", "FLOAT", "BVEC2", "BVEC3", "BVEC4", "IVEC2", "IVEC3", "IVEC4", "UVEC2", "UVEC3", "UVEC4", "VEC2", "VEC3", "VEC4", "MAT2", "MAT3", "MAT4", "MAT2X2", "MAT2X3", "MAT2X4", "MAT3X2", "MAT3X3", "MAT3X4", "MAT4X2", "MAT4X3", "MAT4X4", "SAMPLER2D", "SAMPLER3D", "SAMPLERCUBE", "SAMPLER2DSHADOW", "SAMPLERCUBESHADOW", "SAMPLER2DARRAY", "SAMPLER2DARRAYSHADOW", "ISAMPLER2D", "ISAMPLER3D", "ISAMPLERCUBE", "ISAMPLER2DARRAY", "USAMPLER2D", "USAMPLER3D", "USAMPLERCUBE", "USAMPLER2DARRAY", "SAMPLER", "SAMPLERSHADOW", "TEXTURE2D", "TEXTURE3D", "TEXTURECUBE", "TEXTURE2DARRAY", "ITEXTURE2D", "ITEXTURE3D", "ITEXTURECUBE", "ITEXTURE2DARRAY", "UTEXTURE2D", "UTEXTURE3D", "UTEXTURECUBE", "UTEXTURE2DARRAY", "ATTRIBUTE", "VARYING", "FLOATE5M2_T", "FLOATE4M3_T", "BFLOAT16_T", "FLOAT16_T", "FLOAT32_T", "DOUBLE", "FLOAT64_T", "INT64_T", "UINT64_T", "INT32_T", "UINT32_T", "INT16_T", "UINT16_T", "INT8_T", "UINT8_T", "I64VEC2", "I64VEC3", "I64VEC4", "U64VEC2", "U64VEC3", "U64VEC4", "I32VEC2", "I32VEC3", "I32VEC4", "U32VEC2", "U32VEC3", "U32VEC4", "I16VEC2", "I16VEC3", "I16VEC4", "U16VEC2", "U16VEC3", "U16VEC4", "I8VEC2", "I8VEC3", "I8VEC4", "U8VEC2", "U8VEC3", "U8VEC4", "DVEC2", "DVEC3", "DVEC4", "DMAT2", "DMAT3", "DMAT4", "BF16VEC2", "BF16VEC3", "BF16VEC4", "FE5M2VEC2", "FE5M2VEC3", "FE5M2VEC4", "FE4M3VEC2", "FE4M3VEC3", "FE4M3VEC4", "F16VEC2", "F16VEC3", "F16VEC4", "F16MAT2", "F16MAT3", "F16MAT4", "F32VEC2", "F32VEC3", "F32VEC4", "F32MAT2", "F32MAT3", "F32MAT4", "F64VEC2", "F64VEC3", "F64VEC4", "F64MAT2", "F64MAT3", "F64MAT4", "DMAT2X2", "DMAT2X3", "DMAT2X4", "DMAT3X2", "DMAT3X3", "DMAT3X4", "DMAT4X2", "DMAT4X3", "DMAT4X4", "F16MAT2X2", "F16MAT2X3", "F16MAT2X4", "F16MAT3X2", "F16MAT3X3", "F16MAT3X4", "F16MAT4X2", "F16MAT4X3", "F16MAT4X4", "F32MAT2X2", "F32MAT2X3", "F32MAT2X4", "F32MAT3X2", "F32MAT3X3", "F32MAT3X4", "F32MAT4X2", "F32MAT4X3", "F32MAT4X4", "F64MAT2X2", "F64MAT2X3", "F64MAT2X4", "F64MAT3X2", "F64MAT3X3", "F64MAT3X4", "F64MAT4X2", "F64MAT4X3", "F64MAT4X4", "ATOMIC_UINT", "ACCSTRUCTNV", "ACCSTRUCTEXT", "RAYQUERYEXT", "FCOOPMATNV", "ICOOPMATNV", "UCOOPMATNV", "COOPMAT", "COOPVECNV", "HITOBJECTNV", "HITOBJECTATTRNV", "TENSORLAYOUTNV", "TENSORVIEWNV", "SAMPLERCUBEARRAY", "SAMPLERCUBEARRAYSHADOW", "ISAMPLERCUBEARRAY", "USAMPLERCUBEARRAY", "SAMPLER1D", "SAMPLER1DARRAY", "SAMPLER1DARRAYSHADOW", "ISAMPLER1D", "SAMPLER1DSHADOW", "SAMPLER2DRECT", "SAMPLER2DRECTSHADOW", "ISAMPLER2DRECT", "USAMPLER2DRECT", "SAMPLERBUFFER", "ISAMPLERBUFFER", "USAMPLERBUFFER", "SAMPLER2DMS", "ISAMPLER2DMS", "USAMPLER2DMS", "SAMPLER2DMSARRAY", "ISAMPLER2DMSARRAY", "USAMPLER2DMSARRAY", "SAMPLEREXTERNALOES", "SAMPLEREXTERNAL2DY2YEXT", "ISAMPLER1DARRAY", "USAMPLER1D", "USAMPLER1DARRAY", "F16SAMPLER1D", "F16SAMPLER2D", "F16SAMPLER3D", "F16SAMPLER2DRECT", "F16SAMPLERCUBE", "F16SAMPLER1DARRAY", "F16SAMPLER2DARRAY", "F16SAMPLERCUBEARRAY", "F16SAMPLERBUFFER", "F16SAMPLER2DMS", "F16SAMPLER2DMSARRAY", "F16SAMPLER1DSHADOW", "F16SAMPLER2DSHADOW", "F16SAMPLER1DARRAYSHADOW", "F16SAMPLER2DARRAYSHADOW", "F16SAMPLER2DRECTSHADOW", "F16SAMPLERCUBESHADOW", "F16SAMPLERCUBEARRAYSHADOW", "IMAGE1D", "IIMAGE1D", "UIMAGE1D", "IMAGE2D", "IIMAGE2D", "UIMAGE2D", "IMAGE3D", "IIMAGE3D", "UIMAGE3D", "IMAGE2DRECT", "IIMAGE2DRECT", "UIMAGE2DRECT", "IMAGECUBE", "IIMAGECUBE", "UIMAGECUBE", "IMAGEBUFFER", "IIMAGEBUFFER", "UIMAGEBUFFER", "IMAGE1DARRAY", "IIMAGE1DARRAY", "UIMAGE1DARRAY", "IMAGE2DARRAY", "IIMAGE2DARRAY", "UIMAGE2DARRAY", "IMAGECUBEARRAY", "IIMAGECUBEARRAY", "UIMAGECUBEARRAY", "IMAGE2DMS", "IIMAGE2DMS", "UIMAGE2DMS", "IMAGE2DMSARRAY", "IIMAGE2DMSARRAY", "UIMAGE2DMSARRAY", "F16IMAGE1D", "F16IMAGE2D", "F16IMAGE3D", "F16IMAGE2DRECT", "F16IMAGECUBE", "F16IMAGE1DARRAY", "F16IMAGE2DARRAY", "F16IMAGECUBEARRAY", "F16IMAGEBUFFER", "F16IMAGE2DMS", "F16IMAGE2DMSARRAY", "I64IMAGE1D", "U64IMAGE1D", "I64IMAGE2D", "U64IMAGE2D", "I64IMAGE3D", "U64IMAGE3D", "I64IMAGE2DRECT", "U64IMAGE2DRECT", "I64IMAGECUBE", "U64IMAGECUBE", "I64IMAGEBUFFER", "U64IMAGEBUFFER", "I64IMAGE1DARRAY", "U64IMAGE1DARRAY", "I64IMAGE2DARRAY", "U64IMAGE2DARRAY", "I64IMAGECUBEARRAY", "U64IMAGECUBEARRAY", "I64IMAGE2DMS", "U64IMAGE2DMS", "I64IMAGE2DMSARRAY", "U64IMAGE2DMSARRAY", "TEXTURECUBEARRAY", "ITEXTURECUBEARRAY", "UTEXTURECUBEARRAY", "TEXTURE1D", "ITEXTURE1D", "UTEXTURE1D", "TEXTURE1DARRAY", "ITEXTURE1DARRAY", "UTEXTURE1DARRAY", "TEXTURE2DRECT", "ITEXTURE2DRECT", "UTEXTURE2DRECT", "TEXTUREBUFFER", "ITEXTUREBUFFER", "UTEXTUREBUFFER", "TEXTURE2DMS", "ITEXTURE2DMS", "UTEXTURE2DMS", "TEXTURE2DMSARRAY", "ITEXTURE2DMSARRAY", "UTEXTURE2DMSARRAY", "F16TEXTURE1D", "F16TEXTURE2D", "F16TEXTURE3D", "F16TEXTURE2DRECT", "F16TEXTURECUBE", "F16TEXTURE1DARRAY", "F16TEXTURE2DARRAY", "F16TEXTURECUBEARRAY", "F16TEXTUREBUFFER", "F16TEXTURE2DMS", "F16TEXTURE2DMSARRAY", "SUBPASSINPUT", "SUBPASSINPUTMS", "ISUBPASSINPUT", "ISUBPASSINPUTMS", "USUBPASSINPUT", "USUBPASSINPUTMS", "F16SUBPASSINPUT", "F16SUBPASSINPUTMS", "SPIRV_INSTRUCTION", "SPIRV_EXECUTION_MODE", "SPIRV_EXECUTION_MODE_ID", "SPIRV_DECORATE", "SPIRV_DECORATE_ID", "SPIRV_DECORATE_STRING", "SPIRV_TYPE", "SPIRV_STORAGE_CLASS", "SPIRV_BY_REFERENCE", "SPIRV_LITERAL", "ATTACHMENTEXT", "IATTACHMENTEXT", "UATTACHMENTEXT", "LEFT_OP", "RIGHT_OP", "INC_OP", "DEC_OP", "LE_OP", "GE_OP", "EQ_OP", "NE_OP", "AND_OP", "OR_OP", "XOR_OP", "MUL_ASSIGN", "DIV_ASSIGN", "ADD_ASSIGN", "MOD_ASSIGN", "LEFT_ASSIGN", "RIGHT_ASSIGN", "AND_ASSIGN", "XOR_ASSIGN", "OR_ASSIGN", "SUB_ASSIGN", "STRING_LITERAL", "LEFT_PAREN", "RIGHT_PAREN", "LEFT_BRACKET", "RIGHT_BRACKET", "LEFT_BRACE", "RIGHT_BRACE", "DOT", "COMMA", "COLON", "EQUAL", "SEMICOLON", "BANG", "DASH", "TILDE", "PLUS", "STAR", "SLASH", "PERCENT", "LEFT_ANGLE", "RIGHT_ANGLE", "VERTICAL_BAR", "CARET", "AMPERSAND", "QUESTION", "INVARIANT", "HIGH_PRECISION", "MEDIUM_PRECISION", "LOW_PRECISION", "PRECISION", "PACKED", "RESOURCE", "SUPERP", "FLOATCONSTANT", "INTCONSTANT", "UINTCONSTANT", "BOOLCONSTANT", "IDENTIFIER", "TYPE_NAME", "CENTROID", "IN", "OUT", "INOUT", "STRUCT", "VOID", "WHILE", "BREAK", "CONTINUE", "DO", "ELSE", "FOR", "IF", "DISCARD", "RETURN", "SWITCH", "CASE", "DEFAULT", "TERMINATE_INVOCATION", "TERMINATE_RAY", "IGNORE_INTERSECTION", "UNIFORM", "SHARED", "BUFFER", "TILEIMAGEEXT", "FLAT", "SMOOTH", "LAYOUT", "DOUBLECONSTANT", "INT16CONSTANT", "UINT16CONSTANT", "FLOAT16CONSTANT", "INT32CONSTANT", "UINT32CONSTANT", "INT64CONSTANT", "UINT64CONSTANT", "SUBROUTINE", "DEMOTE", "FUNCTION", "PAYLOADNV", "PAYLOADINNV", "HITATTRNV", "CALLDATANV", "CALLDATAINNV", "PAYLOADEXT", "PAYLOADINEXT", "HITATTREXT", "CALLDATAEXT", "CALLDATAINEXT", "PATCH", "SAMPLE", "NONUNIFORM", "COHERENT", "VOLATILE", "RESTRICT", "READONLY", "WRITEONLY", "NONTEMPORAL", "DEVICECOHERENT", "QUEUEFAMILYCOHERENT", "WORKGROUPCOHERENT", "SUBGROUPCOHERENT", "NONPRIVATE", "SHADERCALLCOHERENT", "NOPERSPECTIVE", "EXPLICITINTERPAMD", "PERVERTEXEXT", "PERVERTEXNV", "PERPRIMITIVENV", "PERVIEWNV", "PERTASKNV", "PERPRIMITIVEEXT", "TASKPAYLOADWORKGROUPEXT", "PRECISE", "$accept", "variable_identifier", "primary_expression", "postfix_expression", "integer_expression", "function_call", "function_call_or_method", "function_call_generic", "function_call_header_no_parameters", "function_call_header_with_parameters", "function_call_header", "function_identifier", "unary_expression", "unary_operator", "multiplicative_expression", "additive_expression", "shift_expression", "relational_expression", "equality_expression", "and_expression", "exclusive_or_expression", "inclusive_or_expression", "logical_and_expression", "logical_xor_expression", "logical_or_expression", "conditional_expression", "$@1", "assignment_expression", "assignment_operator", "expression", "constant_expression", "declaration", "block_structure", "$@2", "identifier_list", "function_prototype", "function_declarator", "function_header_with_parameters", "function_header", "parameter_declarator", "parameter_declaration", "parameter_type_specifier", "init_declarator_list", "single_declaration", "fully_specified_type", "invariant_qualifier", "interpolation_qualifier", "layout_qualifier", "layout_qualifier_id_list", "layout_qualifier_id", "precise_qualifier", "type_qualifier", "single_type_qualifier", "storage_qualifier", "non_uniform_qualifier", "type_name_list", "type_specifier", "array_specifier", "type_parameter_specifier_opt", "type_parameter_specifier", "type_parameter_specifier_list", "type_specifier_nonarray", "precision_qualifier", "struct_specifier", "$@3", "$@4", "struct_declaration_list", "struct_declaration", "struct_declarator_list", "struct_declarator", "initializer", "initializer_list", "declaration_statement", "statement", "simple_statement", "demote_statement", "compound_statement", "$@5", "$@6", "statement_no_new_scope", "statement_scoped", "$@7", "$@8", "compound_statement_no_new_scope", "statement_list", "expression_statement", "selection_statement", "selection_statement_nonattributed", "selection_rest_statement", "condition", "switch_statement", "switch_statement_nonattributed", "$@9", "switch_statement_list", "case_label", "iteration_statement", "iteration_statement_nonattributed", "$@10", "$@11", "$@12", "for_init_statement", "conditionopt", "for_rest_statement", "jump_statement", "translation_unit", "external_declaration", "function_definition", "$@13", "attribute", "attribute_list", "single_attribute", "spirv_requirements_list", "spirv_requirements_parameter", "spirv_extension_list", "spirv_capability_list", "spirv_execution_mode_qualifier", "spirv_execution_mode_parameter_list", "spirv_execution_mode_parameter", "spirv_execution_mode_id_parameter_list", "spirv_storage_class_qualifier", "spirv_decorate_qualifier", "spirv_decorate_parameter_list", "spirv_decorate_parameter", "spirv_decorate_id_parameter_list", "spirv_decorate_id_parameter", "spirv_decorate_string_parameter_list", "spirv_type_specifier", "spirv_type_parameter_list", "spirv_type_parameter", "spirv_instruction_qualifier", "spirv_instruction_qualifier_list", "spirv_instruction_qualifier_id", YY_NULLPTR }; static const char * yysymbol_name (yysymbol_kind_t yysymbol) { return yytname[yysymbol]; } #endif #define YYPACT_NINF (-894) #define yypact_value_is_default(Yyn) \ ((Yyn) == YYPACT_NINF) #define YYTABLE_NINF (-712) #define yytable_value_is_error(Yyn) \ 0 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ static const yytype_int16 yypact[] = { 4801, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -279, -215, -187, -167, -155, -120, -116, -95, -894, -894, -894, -894, -894, -330, -894, -894, -894, -894, -894, -68, -894, -894, -894, -894, -894, -336, -894, -894, -894, -894, -894, -894, -894, -91, -85, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -327, -179, -319, -227, 8154, -235, -894, -178, -894, -894, -894, -894, 5759, -894, -894, -894, -894, -97, -894, -894, 969, -894, -894, 8154, -63, -894, -894, -894, 6238, -82, -174, -164, -163, -142, -141, -82, -140, -67, 12736, -894, -30, -373, -57, -894, -286, -894, -24, -18, 8154, -894, -894, -894, 8154, -51, -49, -894, -269, -894, -250, -894, -894, 11368, -16, -894, -894, -894, -13, -47, 8154, -894, -20, -17, -14, -894, -334, -894, -245, -15, -12, -11, -10, -243, -9, -8, -7, -6, -5, -4, -240, 3, -2, 7, -244, -894, -19, 8154, -894, -1, -894, -233, -894, -894, -231, 9544, -894, -267, 1448, -894, -894, -894, -894, -894, -16, -321, -894, 10000, -265, -894, -27, -894, -110, 11368, 11368, -894, 11368, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -296, -894, -894, -894, 9, -230, 11824, 11, -894, 11368, -894, 14, -329, 13, -18, 16, -894, -322, -82, -894, -3, -894, -341, 15, -135, 11368, -134, -894, -156, -130, -181, -129, 19, -113, -82, -894, 12280, -894, -111, 11368, 17, -67, -894, 8154, 1, 6717, -894, 8154, 11368, -894, -373, -894, 4, -894, -894, -50, -220, -237, -317, -121, 8, 10, 21, 33, 34, -325, 20, -894, 10456, -894, 23, -894, -894, 24, 22, 25, -894, 26, 29, 32, 10912, 36, 11368, 35, 39, 40, 42, 44, -170, -894, -894, -61, -894, -179, 45, 14, -894, -894, -894, -894, -894, 1927, -894, -894, -894, -894, -894, -894, -894, -894, -894, 5280, 13, 10000, -264, 8632, -894, -894, 10000, 8154, -894, 28, -894, -894, -894, -228, -894, -894, 11368, 30, -894, -894, 11368, 43, -894, -894, -894, 11368, -894, -894, -894, -338, -894, -894, -217, 37, -894, -894, -894, -894, -894, -894, -214, -894, -212, -894, -894, -205, 49, -894, -894, -894, -894, -204, -894, -202, -894, -894, -894, -894, -894, -197, -894, 62, -894, -195, 64, -193, 37, -894, -288, -192, -894, 71, 73, -894, -894, 1, -16, -59, -894, -894, -894, 7196, -894, -894, -894, 11368, 11368, 11368, 11368, 11368, 11368, 11368, 11368, 11368, 11368, 11368, 11368, 11368, 11368, 11368, 11368, 11368, 11368, 11368, -894, -894, -894, 74, -894, 2406, -894, -894, -894, 2406, -894, 11368, -894, -894, -55, 11368, -133, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, 11368, 11368, -894, -894, -894, -894, -894, -894, -894, 10000, -894, -894, -37, -894, 7675, -894, -894, 75, 69, -894, -894, -894, -894, -894, -147, -146, -894, -328, -894, -341, -894, -341, -894, 11368, 11368, -894, -156, -894, -156, -894, -181, -181, -894, 80, 19, -894, 12280, -894, 11368, -894, -894, -54, 13, 1, -894, -894, -894, -894, -894, -50, -50, -220, -220, -237, -237, -237, -237, -317, -317, -121, 8, 10, 21, 33, 34, 11368, -894, 2406, 4322, 38, 3843, -190, -894, -172, -894, -894, -894, -894, -894, 9088, -894, -894, -894, 81, -894, 52, -894, -171, -894, -169, -894, -161, -894, -160, -894, -159, -158, -894, -894, -894, -45, 83, 69, 50, 88, 90, -894, -894, 4322, 87, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, 11368, -894, 84, 2885, 11368, -894, 82, 93, 53, 96, 3364, -894, 98, -894, 10000, -894, -894, -894, -157, 11368, 2885, 87, -894, -894, 2406, -894, 94, 69, -894, -894, 2406, 92, -894, -894 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. Performed when YYTABLE does not specify something else to do. Zero means the default is an error. */ static const yytype_int16 yydefact[] = { 0, 168, 226, 224, 225, 223, 230, 231, 232, 233, 234, 235, 236, 237, 238, 227, 228, 229, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 364, 365, 366, 367, 368, 369, 370, 390, 391, 392, 393, 394, 395, 396, 405, 418, 419, 406, 407, 409, 408, 410, 411, 412, 413, 414, 415, 416, 417, 177, 178, 253, 254, 252, 255, 256, 251, 257, 264, 265, 262, 263, 260, 261, 258, 259, 296, 297, 298, 308, 309, 310, 293, 294, 295, 305, 306, 307, 290, 291, 292, 302, 303, 304, 287, 288, 289, 299, 300, 301, 266, 267, 268, 311, 312, 313, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 323, 324, 325, 281, 282, 283, 335, 336, 337, 284, 285, 286, 347, 348, 349, 314, 315, 316, 317, 318, 319, 320, 321, 322, 326, 327, 328, 329, 330, 331, 332, 333, 334, 338, 339, 340, 341, 342, 343, 344, 345, 346, 350, 351, 352, 353, 354, 355, 356, 357, 358, 362, 359, 360, 361, 546, 547, 548, 549, 553, 555, 182, 550, 551, 374, 375, 398, 401, 363, 372, 373, 389, 371, 420, 421, 424, 425, 426, 428, 429, 430, 432, 433, 434, 436, 437, 533, 534, 397, 399, 400, 376, 377, 378, 422, 379, 383, 384, 387, 427, 431, 435, 380, 381, 385, 386, 423, 382, 388, 467, 469, 470, 471, 473, 474, 475, 477, 478, 479, 481, 482, 483, 485, 486, 487, 489, 490, 491, 493, 494, 495, 497, 498, 499, 501, 502, 503, 505, 506, 507, 509, 510, 468, 472, 476, 480, 484, 492, 496, 500, 488, 504, 508, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 402, 403, 404, 438, 447, 449, 443, 448, 450, 451, 453, 454, 455, 457, 458, 459, 461, 462, 463, 465, 466, 439, 440, 441, 452, 442, 444, 445, 446, 456, 460, 464, 538, 539, 542, 543, 544, 545, 540, 541, 0, 0, 0, 0, 0, 0, 0, 0, 166, 167, 535, 536, 537, 0, 648, 137, 558, 559, 560, 0, 557, 172, 170, 171, 169, 0, 222, 173, 175, 176, 174, 139, 138, 0, 204, 552, 184, 186, 181, 188, 190, 185, 187, 183, 189, 191, 179, 180, 207, 192, 199, 200, 201, 202, 203, 193, 194, 195, 196, 197, 198, 140, 141, 143, 142, 144, 146, 147, 145, 206, 154, 647, 0, 649, 0, 114, 113, 0, 125, 130, 161, 160, 158, 162, 0, 155, 157, 163, 135, 217, 159, 556, 0, 644, 646, 0, 0, 164, 165, 554, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 563, 0, 0, 0, 99, 0, 94, 0, 109, 0, 121, 115, 123, 0, 124, 0, 97, 131, 102, 0, 156, 136, 0, 210, 216, 1, 645, 0, 0, 0, 96, 0, 0, 0, 656, 0, 714, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 654, 0, 652, 0, 0, 561, 151, 153, 0, 149, 208, 0, 0, 100, 0, 0, 650, 110, 116, 120, 122, 118, 126, 117, 0, 132, 105, 0, 103, 0, 0, 0, 9, 0, 43, 42, 44, 41, 5, 6, 7, 8, 2, 16, 14, 15, 17, 10, 11, 12, 13, 3, 18, 37, 20, 25, 26, 0, 0, 30, 0, 220, 0, 36, 219, 0, 211, 111, 0, 95, 0, 0, 712, 0, 664, 0, 0, 0, 0, 0, 681, 0, 0, 0, 0, 0, 0, 0, 706, 0, 679, 0, 0, 0, 0, 98, 0, 0, 0, 565, 0, 0, 148, 0, 205, 0, 212, 45, 49, 52, 55, 60, 63, 65, 67, 69, 71, 73, 75, 0, 34, 0, 101, 592, 601, 605, 0, 0, 0, 626, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 45, 78, 91, 0, 579, 0, 163, 135, 582, 603, 581, 589, 580, 0, 583, 584, 607, 585, 614, 586, 587, 622, 588, 0, 119, 0, 127, 0, 573, 134, 0, 0, 107, 0, 104, 38, 39, 0, 22, 23, 0, 0, 28, 27, 0, 222, 31, 33, 40, 0, 218, 112, 716, 0, 717, 657, 0, 0, 715, 676, 672, 673, 674, 675, 0, 670, 0, 93, 677, 0, 0, 691, 692, 693, 694, 0, 689, 0, 698, 699, 700, 701, 697, 0, 695, 0, 702, 0, 0, 0, 2, 710, 217, 0, 708, 0, 0, 651, 653, 0, 571, 0, 569, 564, 566, 0, 152, 150, 209, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 76, 213, 214, 0, 591, 0, 624, 637, 636, 0, 628, 0, 640, 638, 0, 0, 0, 621, 641, 642, 643, 590, 81, 82, 84, 83, 86, 87, 88, 89, 90, 85, 80, 0, 0, 606, 602, 604, 608, 615, 623, 129, 0, 576, 577, 0, 133, 0, 108, 4, 0, 24, 21, 32, 221, 660, 662, 0, 0, 713, 0, 666, 0, 665, 0, 668, 0, 0, 683, 0, 682, 0, 685, 0, 0, 687, 0, 0, 707, 0, 704, 0, 680, 655, 0, 572, 0, 567, 562, 46, 47, 48, 51, 50, 53, 54, 58, 59, 56, 57, 61, 62, 64, 66, 68, 70, 72, 74, 0, 215, 593, 0, 0, 0, 0, 639, 0, 620, 79, 92, 128, 574, 0, 106, 19, 658, 0, 659, 0, 671, 0, 678, 0, 690, 0, 696, 0, 703, 0, 0, 709, 568, 570, 0, 0, 612, 0, 0, 0, 631, 630, 633, 599, 616, 575, 578, 661, 663, 667, 669, 684, 686, 688, 705, 0, 594, 0, 0, 0, 632, 0, 0, 611, 0, 0, 609, 0, 77, 0, 596, 625, 595, 0, 634, 0, 599, 598, 600, 618, 613, 0, 635, 629, 610, 619, 0, 627, 617 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { -894, -557, -894, -894, -894, -894, -894, -894, -894, -894, -894, -894, -449, -894, -403, -410, -497, -405, -284, -283, -285, -282, -281, -280, -894, -501, -894, -511, -894, -525, -548, 6, -894, -894, -894, 5, -407, -894, -894, 31, 41, 46, -894, -894, -425, -894, -894, -894, -894, -118, -894, -408, -388, -894, 12, -894, 0, -451, -894, -894, -894, -566, 126, -894, -894, -894, -569, -571, -257, -368, -649, -894, -392, -639, -893, -894, -448, -894, -894, -462, -461, -894, -894, 47, -746, -386, -894, -165, -894, -423, -894, -154, -894, -894, -894, -894, -153, -894, -894, -894, -894, -894, -894, -894, -894, 72, -894, -894, 2, -894, -94, -318, -485, -894, -894, -894, -324, -326, -333, -894, -894, -332, -320, -337, -323, -316, -894, -335, -315, -894, -406, -555 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { 0, 547, 548, 549, 815, 550, 551, 552, 553, 554, 555, 556, 637, 558, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 638, 873, 639, 798, 640, 728, 641, 405, 668, 525, 642, 407, 408, 409, 454, 455, 456, 410, 411, 412, 413, 414, 415, 504, 505, 416, 417, 418, 419, 559, 507, 616, 510, 467, 468, 561, 422, 423, 424, 596, 500, 594, 595, 738, 739, 666, 810, 645, 646, 647, 648, 649, 770, 909, 945, 937, 938, 939, 946, 650, 651, 652, 653, 940, 912, 654, 655, 941, 960, 656, 657, 658, 876, 774, 878, 916, 935, 936, 659, 425, 426, 427, 451, 660, 497, 498, 477, 478, 822, 823, 429, 701, 702, 706, 430, 431, 712, 713, 720, 721, 724, 432, 730, 731, 433, 479, 480 }; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule whose number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_int16 yytable[] = { 421, 457, 428, 472, 674, 406, 404, 615, 472, 665, 521, 802, 420, 806, 695, 809, 562, 557, 811, 729, 473, 471, 719, 741, 875, 473, 705, 742, 696, 464, 695, 820, 764, 502, 493, 753, 754, 568, 444, 944, 733, 689, 442, 569, 683, 457, 952, 689, 686, 743, 690, 508, 452, 448, 675, 676, 944, 503, 662, 603, 687, 697, 698, 699, 700, 821, 661, 663, 765, 464, 445, 755, 756, 704, -35, 691, 677, 672, 673, 449, 678, 691, 692, -711, 704, 464, 508, 704, 692, -711, 692, 434, 592, 692, 509, 692, 704, 692, 692, 812, 466, 519, 692, 508, 779, 617, 781, 617, 617, 685, 520, 751, 752, 618, 667, 807, 768, 483, 485, 487, 489, 491, 492, 495, 522, 603, 570, 523, 576, 589, 524, 584, 571, 590, 577, 877, 603, 585, 598, 603, 600, 680, 459, 814, 599, 460, 601, 681, 603, 799, 453, 665, 816, 665, 824, 435, 665, 826, 885, 828, 569, 693, 749, 827, 750, 829, 830, 833, 603, 835, 818, 741, 831, 834, 837, 836, 840, 726, 843, 845, 838, 917, 841, 436, 844, 846, 592, 799, 592, 787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 918, 923, 450, 924, 437, 464, 799, 827, 959, 831, 797, 925, 926, 927, 928, 955, 438, 834, 838, 841, 846, 799, 715, 716, 717, 718, 538, 890, 892, 461, 481, 891, 893, 482, 757, 758, 472, 802, 819, 920, 484, 486, 741, 482, 482, 799, 882, 708, 709, 710, 711, 439, 879, 473, 471, 440, 881, 861, 862, 863, 864, 592, 488, 490, 494, 482, 482, 482, 670, 703, 707, 671, 482, 482, 714, 722, 441, 482, 482, 729, 446, 729, 719, 719, 896, 705, 447, 850, 883, 884, 695, 725, 466, 732, 482, 954, 482, 665, 854, 855, 856, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 799, 474, 851, 800, 802, 852, 799, 851, 476, 880, 906, 349, 350, 351, 704, 704, 799, 929, 592, 746, 747, 748, 886, 496, 887, 859, 860, 704, 501, 704, 857, 858, 908, 506, 511, 910, 865, 866, 346, 517, 508, 518, 563, 564, 565, 591, 566, 567, 572, 573, 574, 575, 578, 579, 580, 581, 582, 583, 586, 587, 665, 588, 597, 669, 679, 684, 603, 603, -34, 617, 519, 690, 723, 762, 734, 910, 763, 766, 771, 603, 775, 603, 769, 776, 759, 760, 772, 694, 592, 773, 780, 737, 947, 458, 745, 761, 777, 782, -29, -36, 825, 465, 942, 783, 784, 420, 785, 956, 786, 421, 832, 428, 421, 420, 406, 404, 665, 421, 813, 428, 817, 420, 475, 839, 420, 842, 847, 499, 848, 420, 799, 874, 889, 902, 921, 911, 913, 458, 513, 922, 931, 458, 930, 932, 933, -597, 948, 943, 949, 420, 560, 962, 473, 420, 619, 950, 953, 465, 961, 867, 869, 868, 443, 849, 870, 744, 871, 907, 872, 420, 914, 957, 515, 958, 951, 911, 915, 934, 514, 803, 735, 470, 512, 897, 593, 894, 901, 516, 899, 895, 804, 805, 473, 904, 0, 644, 420, 0, 898, 900, 0, 0, 0, 0, 0, 0, 0, 643, 0, 0, 903, 0, 0, 0, 0, 905, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 688, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 736, 0, 593, 0, 593, 0, 0, 0, 0, 0, 0, 0, 420, 0, 420, 0, 420, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 644, 0, 0, 0, 0, 0, 0, 0, 0, 0, 421, 0, 643, 0, 0, 0, 0, 0, 593, 0, 0, 0, 420, 0, 0, 0, 0, 0, 0, 0, 420, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 593, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 420, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 644, 0, 0, 0, 644, 0, 0, 0, 0, 0, 0, 0, 643, 0, 0, 0, 643, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 593, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 420, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 644, 644, 0, 644, 0, 428, 0, 0, 0, 0, 0, 0, 643, 643, 0, 643, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 644, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 643, 0, 0, 0, 644, 0, 0, 0, 0, 0, 0, 644, 0, 0, 0, 0, 643, 0, 0, 0, 0, 644, 0, 643, 0, 644, 0, 0, 0, 0, 0, 644, 0, 643, 0, 0, 0, 643, 0, 0, 0, 469, 0, 643, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 346, 0, 0, 0, 0, 0, 0, 0, 347, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 348, 349, 350, 351, 352, 0, 0, 0, 0, 0, 0, 0, 0, 353, 354, 355, 356, 357, 358, 359, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 360, 361, 362, 363, 364, 365, 366, 0, 0, 0, 0, 0, 0, 0, 0, 367, 0, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 0, 0, 526, 527, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 528, 529, 0, 346, 0, 619, 620, 0, 0, 0, 0, 621, 530, 531, 532, 533, 0, 0, 0, 0, 0, 0, 0, 0, 0, 348, 349, 350, 351, 352, 0, 0, 0, 534, 535, 536, 537, 538, 353, 354, 355, 356, 357, 358, 359, 622, 623, 624, 625, 0, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 360, 361, 362, 363, 364, 365, 366, 539, 540, 541, 542, 543, 544, 545, 546, 367, 636, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 0, 0, 526, 527, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 528, 529, 0, 346, 0, 619, 801, 0, 0, 0, 0, 621, 530, 531, 532, 533, 0, 0, 0, 0, 0, 0, 0, 0, 0, 348, 349, 350, 351, 352, 0, 0, 0, 534, 535, 536, 537, 538, 353, 354, 355, 356, 357, 358, 359, 622, 623, 624, 625, 0, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 360, 361, 362, 363, 364, 365, 366, 539, 540, 541, 542, 543, 544, 545, 546, 367, 636, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 0, 0, 526, 527, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 528, 529, 0, 346, 0, 619, 0, 0, 0, 0, 0, 621, 530, 531, 532, 533, 0, 0, 0, 0, 0, 0, 0, 0, 0, 348, 349, 350, 351, 352, 0, 0, 0, 534, 535, 536, 537, 538, 353, 354, 355, 356, 357, 358, 359, 622, 623, 624, 625, 0, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 360, 361, 362, 363, 364, 365, 366, 539, 540, 541, 542, 543, 544, 545, 546, 367, 636, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 0, 0, 526, 527, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 528, 529, 0, 346, 0, 511, 0, 0, 0, 0, 0, 621, 530, 531, 532, 533, 0, 0, 0, 0, 0, 0, 0, 0, 0, 348, 349, 350, 351, 352, 0, 0, 0, 534, 535, 536, 537, 538, 353, 354, 355, 356, 357, 358, 359, 622, 623, 624, 625, 0, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 360, 361, 362, 363, 364, 365, 366, 539, 540, 541, 542, 543, 544, 545, 546, 367, 636, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 0, 0, 526, 527, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 528, 529, 0, 346, 0, 0, 0, 0, 0, 0, 0, 621, 530, 531, 532, 533, 0, 0, 0, 0, 0, 0, 0, 0, 0, 348, 349, 350, 351, 352, 0, 0, 0, 534, 535, 536, 537, 538, 353, 354, 355, 356, 357, 358, 359, 622, 623, 624, 625, 0, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 360, 361, 362, 363, 364, 365, 366, 539, 540, 541, 542, 543, 544, 545, 546, 367, 636, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 0, 0, 526, 527, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 528, 529, 0, 346, 0, 0, 0, 0, 0, 0, 0, 621, 530, 531, 532, 533, 0, 0, 0, 0, 0, 0, 0, 0, 0, 348, 349, 350, 351, 352, 0, 0, 0, 534, 535, 536, 537, 538, 353, 354, 355, 356, 357, 358, 359, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 360, 361, 362, 363, 364, 365, 366, 539, 540, 541, 542, 543, 544, 545, 546, 367, 0, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 0, 0, 0, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 0, 0, 526, 527, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 528, 529, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 530, 531, 532, 533, 0, 0, 0, 0, 0, 0, 0, 0, 0, 348, 349, 350, 351, 0, 0, 0, 0, 534, 535, 536, 537, 538, 353, 354, 355, 356, 357, 358, 359, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 360, 361, 362, 363, 364, 365, 366, 539, 540, 541, 542, 543, 544, 545, 546, 367, 0, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 346, 0, 0, 0, 0, 0, 0, 0, 347, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 348, 349, 350, 351, 352, 0, 0, 0, 0, 0, 0, 0, 0, 353, 354, 355, 356, 357, 358, 359, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 360, 361, 362, 363, 364, 365, 366, 0, 0, 0, 0, 0, 0, 0, 0, 367, 0, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 0, 0, 0, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 348, 349, 350, 351, 0, 0, 0, 0, 0, 0, 0, 0, 0, 353, 354, 355, 356, 357, 358, 359, 622, 0, 0, 625, 0, 626, 627, 0, 0, 630, 0, 0, 0, 0, 0, 360, 361, 362, 363, 364, 365, 366, 0, 0, 0, 0, 0, 0, 0, 0, 367, 0, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 0, 0, 0, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 462, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 348, 349, 350, 351, 0, 0, 0, 0, 0, 0, 0, 0, 463, 353, 354, 355, 356, 357, 358, 359, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 360, 361, 362, 363, 364, 365, 366, 0, 0, 0, 0, 0, 0, 0, 0, 367, 0, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 0, 0, 0, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 346, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 348, 349, 350, 351, 0, 0, 0, 0, 0, 0, 0, 0, 0, 353, 354, 355, 356, 357, 358, 359, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 360, 361, 362, 363, 364, 365, 366, 0, 0, 0, 0, 0, 0, 0, 0, 367, 0, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 0, 0, 0, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 740, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 348, 349, 350, 351, 0, 0, 0, 0, 0, 0, 0, 0, 0, 353, 354, 355, 356, 357, 358, 359, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 360, 361, 362, 363, 364, 365, 366, 0, 0, 0, 0, 0, 0, 0, 0, 367, 0, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 0, 0, 0, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 853, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 348, 349, 350, 351, 0, 0, 0, 0, 0, 0, 0, 0, 0, 353, 354, 355, 356, 357, 358, 359, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 360, 361, 362, 363, 364, 365, 366, 0, 0, 0, 0, 0, 0, 0, 0, 367, 0, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 0, 0, 0, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 888, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 348, 349, 350, 351, 0, 0, 0, 0, 0, 0, 0, 0, 0, 353, 354, 355, 356, 357, 358, 359, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 360, 361, 362, 363, 364, 365, 366, 0, 0, 0, 0, 0, 0, 0, 0, 367, 0, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 0, 0, 0, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 348, 349, 350, 351, 0, 0, 0, 0, 0, 0, 0, 0, 0, 353, 354, 355, 356, 357, 358, 359, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 360, 361, 362, 363, 364, 365, 366, 0, 0, 0, 0, 0, 0, 0, 0, 367, 0, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 0, 0, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 0, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 0, 0, 0, 0, 0, 0, 339, 0, 0, 0, 343, 344, 345, 0, 0, 526, 527, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 528, 529, 0, 0, 0, 664, 808, 0, 0, 0, 0, 0, 530, 531, 532, 533, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 534, 535, 536, 537, 538, 353, 0, 0, 0, 0, 358, 359, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 539, 540, 541, 542, 543, 544, 545, 546, 0, 0, 368, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 381, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 0, 0, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 0, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 0, 0, 0, 0, 0, 0, 339, 0, 0, 0, 343, 344, 345, 0, 0, 526, 527, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 528, 529, 0, 0, 0, 664, 919, 0, 0, 0, 0, 0, 530, 531, 532, 533, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 534, 535, 536, 537, 538, 353, 0, 0, 0, 0, 358, 359, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 539, 540, 541, 542, 543, 544, 545, 546, 0, 0, 368, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 381, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 0, 0, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 0, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 0, 0, 0, 0, 0, 0, 339, 0, 0, 0, 343, 344, 345, 0, 0, 526, 527, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 528, 529, 0, 0, 602, 0, 0, 0, 0, 0, 0, 0, 530, 531, 532, 533, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 534, 535, 536, 537, 538, 353, 0, 0, 0, 0, 358, 359, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 539, 540, 541, 542, 543, 544, 545, 546, 0, 0, 368, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 381, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 0, 0, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 0, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 0, 0, 0, 0, 0, 0, 339, 0, 0, 0, 343, 344, 345, 0, 0, 526, 527, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 528, 529, 0, 0, 0, 664, 0, 0, 0, 0, 0, 0, 530, 531, 532, 533, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 534, 535, 536, 537, 538, 353, 0, 0, 0, 0, 358, 359, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 539, 540, 541, 542, 543, 544, 545, 546, 0, 0, 368, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 381, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 0, 0, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 0, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 0, 0, 0, 0, 0, 0, 339, 0, 0, 0, 343, 344, 345, 0, 0, 526, 527, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 528, 529, 0, 0, 767, 0, 0, 0, 0, 0, 0, 0, 530, 531, 532, 533, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 534, 535, 536, 537, 538, 353, 0, 0, 0, 0, 358, 359, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 539, 540, 541, 542, 543, 544, 545, 546, 0, 0, 368, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 381, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 0, 0, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 0, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 0, 0, 0, 0, 0, 0, 339, 0, 0, 0, 343, 344, 345, 0, 0, 526, 527, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 528, 529, 0, 0, 0, 0, 0, 0, 0, 0, 0, 778, 530, 531, 532, 533, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 534, 535, 536, 537, 538, 353, 0, 0, 0, 0, 358, 359, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 539, 540, 541, 542, 543, 544, 545, 546, 0, 0, 368, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 381, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 0, 0, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 0, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 0, 0, 0, 0, 0, 0, 339, 0, 0, 0, 343, 344, 345, 0, 0, 526, 527, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 528, 529, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 530, 531, 532, 533, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 534, 535, 536, 537, 538, 353, 0, 0, 0, 0, 358, 359, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 539, 540, 541, 542, 543, 544, 545, 546, 0, 0, 368, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 381, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 0, 0, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 0, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 0, 0, 0, 0, 0, 0, 339, 0, 0, 0, 343, 344, 345, 0, 0, 526, 527, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 528, 529, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 530, 531, 532, 533, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 534, 535, 536, 537, 538, 353, 0, 0, 0, 0, 358, 682, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 539, 540, 541, 542, 543, 544, 545, 546, 0, 0, 368, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 381, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 0, 0, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 0, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 0, 0, 0, 0, 0, 0, 339, 0, 0, 0, 343, 344, 345, 0, 0, 526, 527, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 528, 529, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 530, 531, 532, 533, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 534, 535, 536, 537, 727, 353, 0, 0, 0, 0, 358, 359, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 539, 540, 541, 542, 543, 544, 545, 546, 0, 0, 368, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 381, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 0, 0, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 0, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 0, 0, 0, 0, 0, 0, 339, 0, 0, 0, 343, 344, 345, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 353, 0, 0, 0, 0, 358, 359, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 368 }; static const yytype_int16 yycheck[] = { 0, 409, 0, 428, 529, 0, 0, 508, 433, 520, 461, 650, 0, 662, 569, 664, 467, 466, 667, 585, 428, 428, 579, 594, 770, 433, 574, 596, 369, 417, 585, 369, 357, 406, 440, 352, 353, 371, 374, 932, 588, 369, 372, 377, 555, 453, 939, 369, 377, 597, 372, 372, 371, 380, 350, 351, 949, 430, 379, 508, 389, 402, 403, 404, 405, 403, 517, 518, 393, 457, 406, 388, 389, 574, 370, 403, 372, 526, 527, 406, 376, 403, 567, 371, 585, 473, 372, 588, 573, 377, 575, 370, 500, 578, 380, 580, 597, 582, 583, 668, 388, 370, 587, 372, 629, 372, 631, 372, 372, 558, 379, 348, 349, 380, 379, 379, 617, 435, 436, 437, 438, 439, 440, 441, 374, 574, 371, 377, 371, 373, 380, 371, 377, 377, 377, 774, 585, 377, 371, 588, 371, 371, 377, 371, 377, 380, 377, 377, 597, 377, 377, 662, 677, 664, 371, 370, 667, 371, 807, 371, 377, 567, 382, 377, 384, 377, 371, 371, 617, 371, 681, 742, 377, 377, 371, 377, 371, 583, 371, 371, 377, 371, 377, 370, 377, 377, 594, 377, 596, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 371, 371, 380, 371, 370, 592, 377, 377, 953, 377, 379, 371, 371, 371, 371, 371, 370, 377, 377, 377, 377, 377, 402, 403, 404, 405, 406, 373, 373, 406, 403, 377, 377, 406, 354, 355, 660, 875, 686, 887, 403, 403, 812, 406, 406, 377, 378, 402, 403, 404, 405, 370, 776, 660, 660, 370, 780, 753, 754, 755, 756, 668, 403, 403, 403, 406, 406, 406, 377, 403, 403, 380, 406, 406, 403, 403, 370, 406, 406, 844, 370, 846, 838, 839, 831, 832, 370, 737, 798, 799, 844, 403, 388, 403, 406, 943, 406, 807, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, 377, 380, 377, 380, 959, 380, 377, 377, 406, 380, 380, 395, 396, 397, 831, 832, 377, 378, 742, 385, 386, 387, 375, 406, 377, 751, 752, 844, 374, 846, 749, 750, 873, 406, 374, 876, 757, 758, 372, 406, 372, 406, 371, 406, 380, 380, 379, 377, 379, 377, 377, 377, 377, 377, 377, 377, 377, 377, 371, 377, 887, 370, 379, 406, 371, 370, 831, 832, 370, 372, 370, 372, 369, 356, 373, 916, 358, 373, 370, 844, 370, 846, 375, 370, 392, 391, 380, 406, 812, 380, 370, 406, 933, 409, 406, 390, 380, 378, 371, 370, 379, 417, 929, 380, 380, 409, 380, 948, 380, 425, 377, 425, 428, 417, 425, 425, 943, 433, 406, 433, 406, 425, 433, 377, 428, 377, 371, 443, 371, 433, 377, 373, 373, 369, 369, 876, 414, 453, 452, 403, 406, 457, 375, 371, 370, 374, 380, 379, 371, 453, 466, 375, 876, 457, 374, 418, 374, 473, 380, 759, 761, 760, 352, 736, 762, 599, 763, 851, 764, 473, 878, 949, 457, 950, 938, 916, 878, 916, 453, 660, 590, 425, 451, 832, 500, 827, 839, 457, 836, 829, 660, 660, 916, 844, -1, 511, 500, -1, 834, 838, -1, -1, -1, -1, -1, -1, -1, 511, -1, -1, 842, -1, -1, -1, -1, 846, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 563, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 592, -1, 594, -1, 596, -1, -1, -1, -1, -1, -1, -1, 592, -1, 594, -1, 596, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 650, -1, -1, -1, -1, -1, -1, -1, -1, -1, 660, -1, 650, -1, -1, -1, -1, -1, 668, -1, -1, -1, 660, -1, -1, -1, -1, -1, -1, -1, 668, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 742, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 742, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 770, -1, -1, -1, 774, -1, -1, -1, -1, -1, -1, -1, 770, -1, -1, -1, 774, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 812, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 812, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 875, 876, -1, 878, -1, 878, -1, -1, -1, -1, -1, -1, 875, 876, -1, 878, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 916, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 916, -1, -1, -1, 932, -1, -1, -1, -1, -1, -1, 939, -1, -1, -1, -1, 932, -1, -1, -1, -1, 949, -1, 939, -1, 953, -1, -1, -1, -1, -1, 959, -1, 949, -1, -1, -1, 953, -1, -1, -1, 0, -1, 959, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 372, -1, -1, -1, -1, -1, -1, -1, 380, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 394, 395, 396, 397, 398, -1, -1, -1, -1, -1, -1, -1, -1, 407, 408, 409, 410, 411, 412, 413, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 429, 430, 431, 432, 433, 434, 435, -1, -1, -1, -1, -1, -1, -1, -1, 444, -1, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, -1, -1, 350, 351, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 369, 370, -1, 372, -1, 374, 375, -1, -1, -1, -1, 380, 381, 382, 383, 384, -1, -1, -1, -1, -1, -1, -1, -1, -1, 394, 395, 396, 397, 398, -1, -1, -1, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, -1, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, -1, -1, 350, 351, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 369, 370, -1, 372, -1, 374, 375, -1, -1, -1, -1, 380, 381, 382, 383, 384, -1, -1, -1, -1, -1, -1, -1, -1, -1, 394, 395, 396, 397, 398, -1, -1, -1, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, -1, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, -1, -1, 350, 351, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 369, 370, -1, 372, -1, 374, -1, -1, -1, -1, -1, 380, 381, 382, 383, 384, -1, -1, -1, -1, -1, -1, -1, -1, -1, 394, 395, 396, 397, 398, -1, -1, -1, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, -1, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, -1, -1, 350, 351, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 369, 370, -1, 372, -1, 374, -1, -1, -1, -1, -1, 380, 381, 382, 383, 384, -1, -1, -1, -1, -1, -1, -1, -1, -1, 394, 395, 396, 397, 398, -1, -1, -1, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, -1, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, -1, -1, 350, 351, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 369, 370, -1, 372, -1, -1, -1, -1, -1, -1, -1, 380, 381, 382, 383, 384, -1, -1, -1, -1, -1, -1, -1, -1, -1, 394, 395, 396, 397, 398, -1, -1, -1, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, -1, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, -1, -1, 350, 351, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 369, 370, -1, 372, -1, -1, -1, -1, -1, -1, -1, 380, 381, 382, 383, 384, -1, -1, -1, -1, -1, -1, -1, -1, -1, 394, 395, 396, 397, 398, -1, -1, -1, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, -1, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, -1, -1, -1, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, -1, -1, 350, 351, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 369, 370, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 381, 382, 383, 384, -1, -1, -1, -1, -1, -1, -1, -1, -1, 394, 395, 396, 397, -1, -1, -1, -1, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, -1, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 372, -1, -1, -1, -1, -1, -1, -1, 380, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 394, 395, 396, 397, 398, -1, -1, -1, -1, -1, -1, -1, -1, 407, 408, 409, 410, 411, 412, 413, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 429, 430, 431, 432, 433, 434, 435, -1, -1, -1, -1, -1, -1, -1, -1, 444, -1, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, -1, -1, -1, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 394, 395, 396, 397, -1, -1, -1, -1, -1, -1, -1, -1, -1, 407, 408, 409, 410, 411, 412, 413, 414, -1, -1, 417, -1, 419, 420, -1, -1, 423, -1, -1, -1, -1, -1, 429, 430, 431, 432, 433, 434, 435, -1, -1, -1, -1, -1, -1, -1, -1, 444, -1, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, -1, -1, -1, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 380, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 394, 395, 396, 397, -1, -1, -1, -1, -1, -1, -1, -1, 406, 407, 408, 409, 410, 411, 412, 413, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 429, 430, 431, 432, 433, 434, 435, -1, -1, -1, -1, -1, -1, -1, -1, 444, -1, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, -1, -1, -1, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 372, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 394, 395, 396, 397, -1, -1, -1, -1, -1, -1, -1, -1, -1, 407, 408, 409, 410, 411, 412, 413, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 429, 430, 431, 432, 433, 434, 435, -1, -1, -1, -1, -1, -1, -1, -1, 444, -1, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, -1, -1, -1, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 375, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 394, 395, 396, 397, -1, -1, -1, -1, -1, -1, -1, -1, -1, 407, 408, 409, 410, 411, 412, 413, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 429, 430, 431, 432, 433, 434, 435, -1, -1, -1, -1, -1, -1, -1, -1, 444, -1, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, -1, -1, -1, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 375, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 394, 395, 396, 397, -1, -1, -1, -1, -1, -1, -1, -1, -1, 407, 408, 409, 410, 411, 412, 413, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 429, 430, 431, 432, 433, 434, 435, -1, -1, -1, -1, -1, -1, -1, -1, 444, -1, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, -1, -1, -1, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 375, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 394, 395, 396, 397, -1, -1, -1, -1, -1, -1, -1, -1, -1, 407, 408, 409, 410, 411, 412, 413, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 429, 430, 431, 432, 433, 434, 435, -1, -1, -1, -1, -1, -1, -1, -1, 444, -1, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, -1, -1, -1, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 394, 395, 396, 397, -1, -1, -1, -1, -1, -1, -1, -1, -1, 407, 408, 409, 410, 411, 412, 413, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 429, 430, 431, 432, 433, 434, 435, -1, -1, -1, -1, -1, -1, -1, -1, 444, -1, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, -1, -1, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, -1, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, -1, -1, -1, -1, -1, -1, 341, -1, -1, -1, 345, 346, 347, -1, -1, 350, 351, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 369, 370, -1, -1, -1, 374, 375, -1, -1, -1, -1, -1, 381, 382, 383, 384, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 402, 403, 404, 405, 406, 407, -1, -1, -1, -1, 412, 413, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 436, 437, 438, 439, 440, 441, 442, 443, -1, -1, 446, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 459, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, -1, -1, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, -1, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, -1, -1, -1, -1, -1, -1, 341, -1, -1, -1, 345, 346, 347, -1, -1, 350, 351, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 369, 370, -1, -1, -1, 374, 375, -1, -1, -1, -1, -1, 381, 382, 383, 384, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 402, 403, 404, 405, 406, 407, -1, -1, -1, -1, 412, 413, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 436, 437, 438, 439, 440, 441, 442, 443, -1, -1, 446, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 459, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, -1, -1, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, -1, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, -1, -1, -1, -1, -1, -1, 341, -1, -1, -1, 345, 346, 347, -1, -1, 350, 351, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 369, 370, -1, -1, 373, -1, -1, -1, -1, -1, -1, -1, 381, 382, 383, 384, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 402, 403, 404, 405, 406, 407, -1, -1, -1, -1, 412, 413, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 436, 437, 438, 439, 440, 441, 442, 443, -1, -1, 446, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 459, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, -1, -1, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, -1, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, -1, -1, -1, -1, -1, -1, 341, -1, -1, -1, 345, 346, 347, -1, -1, 350, 351, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 369, 370, -1, -1, -1, 374, -1, -1, -1, -1, -1, -1, 381, 382, 383, 384, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 402, 403, 404, 405, 406, 407, -1, -1, -1, -1, 412, 413, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 436, 437, 438, 439, 440, 441, 442, 443, -1, -1, 446, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 459, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, -1, -1, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, -1, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, -1, -1, -1, -1, -1, -1, 341, -1, -1, -1, 345, 346, 347, -1, -1, 350, 351, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 369, 370, -1, -1, 373, -1, -1, -1, -1, -1, -1, -1, 381, 382, 383, 384, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 402, 403, 404, 405, 406, 407, -1, -1, -1, -1, 412, 413, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 436, 437, 438, 439, 440, 441, 442, 443, -1, -1, 446, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 459, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, -1, -1, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, -1, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, -1, -1, -1, -1, -1, -1, 341, -1, -1, -1, 345, 346, 347, -1, -1, 350, 351, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 369, 370, -1, -1, -1, -1, -1, -1, -1, -1, -1, 380, 381, 382, 383, 384, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 402, 403, 404, 405, 406, 407, -1, -1, -1, -1, 412, 413, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 436, 437, 438, 439, 440, 441, 442, 443, -1, -1, 446, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 459, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, -1, -1, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, -1, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, -1, -1, -1, -1, -1, -1, 341, -1, -1, -1, 345, 346, 347, -1, -1, 350, 351, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 369, 370, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 381, 382, 383, 384, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 402, 403, 404, 405, 406, 407, -1, -1, -1, -1, 412, 413, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 436, 437, 438, 439, 440, 441, 442, 443, -1, -1, 446, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 459, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, -1, -1, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, -1, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, -1, -1, -1, -1, -1, -1, 341, -1, -1, -1, 345, 346, 347, -1, -1, 350, 351, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 369, 370, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 381, 382, 383, 384, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 402, 403, 404, 405, 406, 407, -1, -1, -1, -1, 412, 413, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 436, 437, 438, 439, 440, 441, 442, 443, -1, -1, 446, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 459, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, -1, -1, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, -1, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, -1, -1, -1, -1, -1, -1, 341, -1, -1, -1, 345, 346, 347, -1, -1, 350, 351, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 369, 370, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 381, 382, 383, 384, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 402, 403, 404, 405, 406, 407, -1, -1, -1, -1, 412, 413, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 436, 437, 438, 439, 440, 441, 442, 443, -1, -1, 446, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 459, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, -1, -1, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, -1, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, -1, -1, -1, -1, -1, -1, 341, -1, -1, -1, 345, 346, 347, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 407, -1, -1, -1, -1, 412, 413, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 446 }; /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of state STATE-NUM. */ static const yytype_int16 yystos[] = { 0, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 372, 380, 394, 395, 396, 397, 398, 407, 408, 409, 410, 411, 412, 413, 429, 430, 431, 432, 433, 434, 435, 444, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 513, 514, 517, 518, 519, 520, 524, 525, 526, 527, 528, 529, 532, 533, 534, 535, 536, 538, 543, 544, 545, 586, 587, 588, 590, 597, 601, 602, 608, 611, 370, 370, 370, 370, 370, 370, 370, 370, 372, 544, 374, 406, 370, 370, 380, 406, 380, 589, 371, 377, 521, 522, 523, 533, 538, 377, 380, 406, 380, 406, 534, 538, 388, 540, 541, 0, 587, 518, 526, 533, 380, 517, 406, 593, 594, 612, 613, 403, 406, 593, 403, 593, 403, 593, 403, 593, 403, 593, 593, 612, 403, 593, 406, 591, 592, 538, 547, 374, 406, 430, 530, 531, 406, 537, 372, 380, 539, 374, 565, 590, 522, 521, 523, 406, 406, 370, 379, 539, 374, 377, 380, 516, 350, 351, 369, 370, 381, 382, 383, 384, 402, 403, 404, 405, 406, 436, 437, 438, 439, 440, 441, 442, 443, 483, 484, 485, 487, 488, 489, 490, 491, 492, 493, 494, 495, 536, 538, 542, 539, 371, 406, 380, 379, 377, 371, 377, 371, 377, 379, 377, 377, 377, 371, 377, 377, 377, 377, 377, 377, 377, 371, 377, 371, 377, 370, 373, 377, 380, 533, 538, 548, 549, 546, 379, 371, 377, 371, 377, 373, 494, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 538, 372, 380, 374, 375, 380, 414, 415, 416, 417, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 445, 494, 507, 509, 511, 513, 517, 536, 538, 554, 555, 556, 557, 558, 566, 567, 568, 569, 572, 573, 576, 577, 578, 585, 590, 539, 379, 539, 374, 509, 552, 379, 515, 406, 377, 380, 494, 494, 511, 350, 351, 372, 376, 371, 371, 377, 413, 509, 370, 494, 377, 389, 590, 369, 372, 403, 594, 612, 406, 613, 369, 402, 403, 404, 405, 598, 599, 403, 507, 512, 600, 403, 402, 403, 404, 405, 603, 604, 403, 402, 403, 404, 405, 483, 605, 606, 403, 369, 607, 403, 612, 406, 512, 543, 609, 610, 403, 512, 373, 592, 538, 406, 550, 551, 375, 549, 548, 512, 531, 406, 385, 386, 387, 382, 384, 348, 349, 352, 353, 388, 389, 354, 355, 392, 391, 390, 356, 358, 357, 393, 373, 373, 507, 375, 559, 370, 380, 380, 580, 370, 370, 380, 380, 511, 370, 511, 378, 380, 380, 380, 380, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 379, 510, 377, 380, 375, 555, 569, 573, 578, 552, 379, 375, 552, 553, 552, 548, 406, 371, 486, 511, 406, 509, 494, 369, 403, 595, 596, 371, 379, 371, 377, 371, 377, 371, 377, 377, 371, 377, 371, 377, 371, 377, 377, 371, 377, 377, 371, 377, 371, 377, 371, 371, 550, 539, 377, 380, 375, 494, 494, 494, 496, 496, 497, 497, 498, 498, 498, 498, 499, 499, 500, 501, 502, 503, 504, 505, 508, 373, 566, 579, 555, 581, 511, 380, 511, 378, 509, 509, 552, 375, 377, 375, 373, 373, 377, 373, 377, 599, 598, 512, 600, 604, 603, 606, 605, 369, 607, 609, 610, 380, 551, 511, 560, 511, 526, 571, 414, 554, 567, 582, 371, 371, 375, 552, 369, 403, 371, 371, 371, 371, 371, 371, 378, 375, 406, 371, 370, 571, 583, 584, 562, 563, 564, 570, 574, 509, 379, 556, 561, 565, 511, 380, 371, 418, 558, 556, 374, 552, 371, 511, 561, 562, 566, 575, 380, 375 }; /* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */ static const yytype_int16 yyr1[] = { 0, 482, 483, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 485, 485, 485, 485, 485, 485, 486, 487, 488, 489, 489, 490, 490, 491, 491, 492, 493, 493, 493, 494, 494, 494, 494, 495, 495, 495, 495, 496, 496, 496, 496, 497, 497, 497, 498, 498, 498, 499, 499, 499, 499, 499, 500, 500, 500, 501, 501, 502, 502, 503, 503, 504, 504, 505, 505, 506, 506, 507, 508, 507, 509, 509, 510, 510, 510, 510, 510, 510, 510, 510, 510, 510, 510, 511, 511, 512, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 515, 514, 516, 516, 517, 517, 517, 517, 518, 518, 519, 519, 520, 521, 521, 522, 522, 522, 522, 523, 524, 524, 524, 524, 524, 525, 525, 525, 525, 525, 526, 526, 527, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 529, 530, 530, 531, 531, 531, 532, 533, 533, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 535, 535, 535, 535, 535, 535, 535, 535, 535, 535, 535, 535, 535, 535, 535, 535, 535, 535, 535, 535, 535, 535, 535, 535, 535, 535, 535, 535, 535, 535, 535, 535, 535, 535, 535, 535, 535, 535, 535, 536, 537, 537, 538, 538, 539, 539, 539, 539, 540, 540, 541, 542, 542, 542, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 543, 544, 544, 544, 546, 545, 547, 545, 548, 548, 549, 549, 550, 550, 551, 551, 552, 552, 552, 552, 553, 553, 554, 555, 555, 556, 556, 556, 556, 556, 556, 556, 556, 557, 558, 559, 560, 558, 561, 561, 563, 562, 564, 562, 565, 565, 566, 566, 567, 567, 568, 568, 569, 570, 570, 571, 571, 572, 572, 574, 573, 575, 575, 576, 576, 577, 577, 579, 578, 580, 578, 581, 578, 582, 582, 583, 583, 584, 584, 585, 585, 585, 585, 585, 585, 585, 585, 586, 586, 587, 587, 587, 589, 588, 590, 591, 591, 592, 592, 593, 593, 594, 594, 595, 595, 596, 596, 597, 597, 597, 597, 597, 597, 598, 598, 599, 599, 599, 599, 599, 600, 600, 601, 601, 602, 602, 602, 602, 602, 602, 602, 602, 603, 603, 604, 604, 604, 604, 605, 605, 606, 606, 606, 606, 606, 607, 607, 608, 608, 608, 608, 609, 609, 610, 610, 611, 611, 612, 612, 613, 613 }; /* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */ static const yytype_int8 yyr2[] = { 0, 2, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 1, 3, 2, 2, 1, 1, 1, 2, 2, 2, 1, 2, 3, 2, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 3, 3, 3, 1, 3, 3, 1, 3, 3, 1, 3, 3, 3, 3, 1, 3, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 0, 6, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 2, 3, 2, 2, 4, 2, 3, 4, 2, 3, 4, 0, 6, 2, 3, 2, 3, 3, 4, 1, 1, 2, 3, 3, 2, 3, 2, 1, 2, 1, 1, 1, 3, 4, 6, 5, 1, 2, 3, 5, 4, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 1, 3, 1, 3, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 3, 2, 3, 2, 3, 3, 4, 1, 0, 3, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 6, 0, 5, 1, 2, 3, 4, 1, 3, 1, 2, 1, 3, 4, 2, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 0, 0, 5, 1, 1, 0, 2, 0, 2, 2, 3, 1, 2, 1, 2, 1, 2, 5, 3, 1, 1, 4, 1, 2, 0, 8, 0, 1, 3, 2, 1, 2, 0, 6, 0, 8, 0, 7, 1, 1, 1, 0, 2, 3, 2, 2, 2, 3, 2, 2, 2, 2, 1, 2, 1, 1, 1, 0, 3, 5, 1, 3, 1, 4, 1, 3, 5, 5, 1, 3, 1, 3, 4, 6, 6, 8, 6, 8, 1, 3, 1, 1, 1, 1, 1, 1, 3, 4, 6, 4, 6, 6, 8, 6, 8, 6, 8, 1, 3, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 3, 6, 8, 4, 6, 1, 3, 1, 1, 4, 6, 1, 3, 3, 3 }; enum { YYENOMEM = -2 }; #define yyerrok (yyerrstatus = 0) #define yyclearin (yychar = YYEMPTY) #define YYACCEPT goto yyacceptlab #define YYABORT goto yyabortlab #define YYERROR goto yyerrorlab #define YYNOMEM goto yyexhaustedlab #define YYRECOVERING() (!!yyerrstatus) #define YYBACKUP(Token, Value) \ do \ if (yychar == YYEMPTY) \ { \ yychar = (Token); \ yylval = (Value); \ YYPOPSTACK (yylen); \ yystate = *yyssp; \ goto yybackup; \ } \ else \ { \ yyerror (pParseContext, YY_("syntax error: cannot back up")); \ YYERROR; \ } \ while (0) /* Backward compatibility with an undocumented macro. Use YYerror or YYUNDEF. */ #define YYERRCODE YYUNDEF /* Enable debugging if requested. */ #if YYDEBUG # ifndef YYFPRINTF # include /* INFRINGES ON USER NAME SPACE */ # define YYFPRINTF fprintf # endif # define YYDPRINTF(Args) \ do { \ if (yydebug) \ YYFPRINTF Args; \ } while (0) # define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \ do { \ if (yydebug) \ { \ YYFPRINTF (stderr, "%s ", Title); \ yy_symbol_print (stderr, \ Kind, Value, pParseContext); \ YYFPRINTF (stderr, "\n"); \ } \ } while (0) /*-----------------------------------. | Print this symbol's value on YYO. | `-----------------------------------*/ static void yy_symbol_value_print (FILE *yyo, yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, glslang::TParseContext* pParseContext) { FILE *yyoutput = yyo; YY_USE (yyoutput); YY_USE (pParseContext); if (!yyvaluep) return; YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN YY_USE (yykind); YY_IGNORE_MAYBE_UNINITIALIZED_END } /*---------------------------. | Print this symbol on YYO. | `---------------------------*/ static void yy_symbol_print (FILE *yyo, yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, glslang::TParseContext* pParseContext) { YYFPRINTF (yyo, "%s %s (", yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind)); yy_symbol_value_print (yyo, yykind, yyvaluep, pParseContext); YYFPRINTF (yyo, ")"); } /*------------------------------------------------------------------. | yy_stack_print -- Print the state stack from its BOTTOM up to its | | TOP (included). | `------------------------------------------------------------------*/ static void yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop) { YYFPRINTF (stderr, "Stack now"); for (; yybottom <= yytop; yybottom++) { int yybot = *yybottom; YYFPRINTF (stderr, " %d", yybot); } YYFPRINTF (stderr, "\n"); } # define YY_STACK_PRINT(Bottom, Top) \ do { \ if (yydebug) \ yy_stack_print ((Bottom), (Top)); \ } while (0) /*------------------------------------------------. | Report that the YYRULE is going to be reduced. | `------------------------------------------------*/ static void yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, int yyrule, glslang::TParseContext* pParseContext) { int yylno = yyrline[yyrule]; int yynrhs = yyr2[yyrule]; int yyi; YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n", yyrule - 1, yylno); /* The symbols being reduced. */ for (yyi = 0; yyi < yynrhs; yyi++) { YYFPRINTF (stderr, " $%d = ", yyi + 1); yy_symbol_print (stderr, YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]), &yyvsp[(yyi + 1) - (yynrhs)], pParseContext); YYFPRINTF (stderr, "\n"); } } # define YY_REDUCE_PRINT(Rule) \ do { \ if (yydebug) \ yy_reduce_print (yyssp, yyvsp, Rule, pParseContext); \ } while (0) /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ int yydebug; #else /* !YYDEBUG */ # define YYDPRINTF(Args) ((void) 0) # define YY_SYMBOL_PRINT(Title, Kind, Value, Location) # define YY_STACK_PRINT(Bottom, Top) # define YY_REDUCE_PRINT(Rule) #endif /* !YYDEBUG */ /* YYINITDEPTH -- initial size of the parser's stacks. */ #ifndef YYINITDEPTH # define YYINITDEPTH 200 #endif /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only if the built-in stack extension method is used). Do not make this value too large; the results are undefined if YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) evaluated with infinite-precision integer arithmetic. */ #ifndef YYMAXDEPTH # define YYMAXDEPTH 10000 #endif /* Context of a parse error. */ typedef struct { yy_state_t *yyssp; yysymbol_kind_t yytoken; } yypcontext_t; /* Put in YYARG at most YYARGN of the expected tokens given the current YYCTX, and return the number of tokens stored in YYARG. If YYARG is null, return the number of expected tokens (guaranteed to be less than YYNTOKENS). Return YYENOMEM on memory exhaustion. Return 0 if there are more than YYARGN expected tokens, yet fill YYARG up to YYARGN. */ static int yypcontext_expected_tokens (const yypcontext_t *yyctx, yysymbol_kind_t yyarg[], int yyargn) { /* Actual size of YYARG. */ int yycount = 0; int yyn = yypact[+*yyctx->yyssp]; if (!yypact_value_is_default (yyn)) { /* Start YYX at -YYN if negative to avoid negative indexes in YYCHECK. In other words, skip the first -YYN actions for this state because they are default actions. */ int yyxbegin = yyn < 0 ? -yyn : 0; /* Stay within bounds of both yycheck and yytname. */ int yychecklim = YYLAST - yyn + 1; int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; int yyx; for (yyx = yyxbegin; yyx < yyxend; ++yyx) if (yycheck[yyx + yyn] == yyx && yyx != YYSYMBOL_YYerror && !yytable_value_is_error (yytable[yyx + yyn])) { if (!yyarg) ++yycount; else if (yycount == yyargn) return 0; else yyarg[yycount++] = YY_CAST (yysymbol_kind_t, yyx); } } if (yyarg && yycount == 0 && 0 < yyargn) yyarg[0] = YYSYMBOL_YYEMPTY; return yycount; } #ifndef yystrlen # if defined __GLIBC__ && defined _STRING_H # define yystrlen(S) (YY_CAST (YYPTRDIFF_T, strlen (S))) # else /* Return the length of YYSTR. */ static YYPTRDIFF_T yystrlen (const char *yystr) { YYPTRDIFF_T yylen; for (yylen = 0; yystr[yylen]; yylen++) continue; return yylen; } # endif #endif #ifndef yystpcpy # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE # define yystpcpy stpcpy # else /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in YYDEST. */ static char * yystpcpy (char *yydest, const char *yysrc) { char *yyd = yydest; const char *yys = yysrc; while ((*yyd++ = *yys++) != '\0') continue; return yyd - 1; } # endif #endif #ifndef yytnamerr /* Copy to YYRES the contents of YYSTR after stripping away unnecessary quotes and backslashes, so that it's suitable for yyerror. The heuristic is that double-quoting is unnecessary unless the string contains an apostrophe, a comma, or backslash (other than backslash-backslash). YYSTR is taken from yytname. If YYRES is null, do not copy; instead, return the length of what the result would have been. */ static YYPTRDIFF_T yytnamerr (char *yyres, const char *yystr) { if (*yystr == '"') { YYPTRDIFF_T yyn = 0; char const *yyp = yystr; for (;;) switch (*++yyp) { case '\'': case ',': goto do_not_strip_quotes; case '\\': if (*++yyp != '\\') goto do_not_strip_quotes; else goto append; append: default: if (yyres) yyres[yyn] = *yyp; yyn++; break; case '"': if (yyres) yyres[yyn] = '\0'; return yyn; } do_not_strip_quotes: ; } if (yyres) return yystpcpy (yyres, yystr) - yyres; else return yystrlen (yystr); } #endif static int yy_syntax_error_arguments (const yypcontext_t *yyctx, yysymbol_kind_t yyarg[], int yyargn) { /* Actual size of YYARG. */ int yycount = 0; /* There are many possibilities here to consider: - If this state is a consistent state with a default action, then the only way this function was invoked is if the default action is an error action. In that case, don't check for expected tokens because there are none. - The only way there can be no lookahead present (in yychar) is if this state is a consistent state with a default action. Thus, detecting the absence of a lookahead is sufficient to determine that there is no unexpected or expected token to report. In that case, just report a simple "syntax error". - Don't assume there isn't a lookahead just because this state is a consistent state with a default action. There might have been a previous inconsistent state, consistent state with a non-default action, or user semantic action that manipulated yychar. - Of course, the expected token list depends on states to have correct lookahead information, and it depends on the parser not to perform extra reductions after fetching a lookahead from the scanner and before detecting a syntax error. Thus, state merging (from LALR or IELR) and default reductions corrupt the expected token list. However, the list is correct for canonical LR with one exception: it will still contain any token that will not be accepted due to an error action in a later state. */ if (yyctx->yytoken != YYSYMBOL_YYEMPTY) { int yyn; if (yyarg) yyarg[yycount] = yyctx->yytoken; ++yycount; yyn = yypcontext_expected_tokens (yyctx, yyarg ? yyarg + 1 : yyarg, yyargn - 1); if (yyn == YYENOMEM) return YYENOMEM; else yycount += yyn; } return yycount; } /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message about the unexpected token YYTOKEN for the state stack whose top is YYSSP. Return 0 if *YYMSG was successfully written. Return -1 if *YYMSG is not large enough to hold the message. In that case, also set *YYMSG_ALLOC to the required number of bytes. Return YYENOMEM if the required number of bytes is too large to store. */ static int yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg, const yypcontext_t *yyctx) { enum { YYARGS_MAX = 5 }; /* Internationalized format string. */ const char *yyformat = YY_NULLPTR; /* Arguments of yyformat: reported tokens (one for the "unexpected", one per "expected"). */ yysymbol_kind_t yyarg[YYARGS_MAX]; /* Cumulated lengths of YYARG. */ YYPTRDIFF_T yysize = 0; /* Actual size of YYARG. */ int yycount = yy_syntax_error_arguments (yyctx, yyarg, YYARGS_MAX); if (yycount == YYENOMEM) return YYENOMEM; switch (yycount) { #define YYCASE_(N, S) \ case N: \ yyformat = S; \ break default: /* Avoid compiler warnings. */ YYCASE_(0, YY_("syntax error")); YYCASE_(1, YY_("syntax error, unexpected %s")); YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); #undef YYCASE_ } /* Compute error message size. Don't count the "%s"s, but reserve room for the terminator. */ yysize = yystrlen (yyformat) - 2 * yycount + 1; { int yyi; for (yyi = 0; yyi < yycount; ++yyi) { YYPTRDIFF_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyarg[yyi]]); if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) yysize = yysize1; else return YYENOMEM; } } if (*yymsg_alloc < yysize) { *yymsg_alloc = 2 * yysize; if (! (yysize <= *yymsg_alloc && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; return -1; } /* Avoid sprintf, as that infringes on the user's name space. Don't have undefined behavior even if the translation produced a string with the wrong number of "%s"s. */ { char *yyp = *yymsg; int yyi = 0; while ((*yyp = *yyformat) != '\0') if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) { yyp += yytnamerr (yyp, yytname[yyarg[yyi++]]); yyformat += 2; } else { ++yyp; ++yyformat; } } return 0; } /*-----------------------------------------------. | Release the memory associated to this symbol. | `-----------------------------------------------*/ static void yydestruct (const char *yymsg, yysymbol_kind_t yykind, YYSTYPE *yyvaluep, glslang::TParseContext* pParseContext) { YY_USE (yyvaluep); YY_USE (pParseContext); if (!yymsg) yymsg = "Deleting"; YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp); YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN YY_USE (yykind); YY_IGNORE_MAYBE_UNINITIALIZED_END } /*----------. | yyparse. | `----------*/ int yyparse (glslang::TParseContext* pParseContext) { /* Lookahead token kind. */ int yychar; /* The semantic value of the lookahead symbol. */ /* Default value used for initialization, for pacifying older GCCs or non-GCC compilers. */ YY_INITIAL_VALUE (static YYSTYPE yyval_default;) YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); /* Number of syntax errors so far. */ int yynerrs = 0; yy_state_fast_t yystate = 0; /* Number of tokens to shift before error messages enabled. */ int yyerrstatus = 0; /* Refer to the stacks through separate pointers, to allow yyoverflow to reallocate them elsewhere. */ /* Their size. */ YYPTRDIFF_T yystacksize = YYINITDEPTH; /* The state stack: array, bottom, top. */ yy_state_t yyssa[YYINITDEPTH]; yy_state_t *yyss = yyssa; yy_state_t *yyssp = yyss; /* The semantic value stack: array, bottom, top. */ YYSTYPE yyvsa[YYINITDEPTH]; YYSTYPE *yyvs = yyvsa; YYSTYPE *yyvsp = yyvs; int yyn; /* The return value of yyparse. */ int yyresult; /* Lookahead symbol kind. */ yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; /* Buffer for error messages, and its allocated size. */ char yymsgbuf[128]; char *yymsg = yymsgbuf; YYPTRDIFF_T yymsg_alloc = sizeof yymsgbuf; #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) /* The number of symbols on the RHS of the reduced rule. Keep to zero when no symbol should be popped. */ int yylen = 0; YYDPRINTF ((stderr, "Starting parse\n")); yychar = YYEMPTY; /* Cause a token to be read. */ goto yysetstate; /*------------------------------------------------------------. | yynewstate -- push a new state, which is found in yystate. | `------------------------------------------------------------*/ yynewstate: /* In all cases, when you get here, the value and location stacks have just been pushed. So pushing a state here evens the stacks. */ yyssp++; /*--------------------------------------------------------------------. | yysetstate -- set current state (the top of the stack) to yystate. | `--------------------------------------------------------------------*/ yysetstate: YYDPRINTF ((stderr, "Entering state %d\n", yystate)); YY_ASSERT (0 <= yystate && yystate < YYNSTATES); YY_IGNORE_USELESS_CAST_BEGIN *yyssp = YY_CAST (yy_state_t, yystate); YY_IGNORE_USELESS_CAST_END YY_STACK_PRINT (yyss, yyssp); if (yyss + yystacksize - 1 <= yyssp) #if !defined yyoverflow && !defined YYSTACK_RELOCATE YYNOMEM; #else { /* Get the current used size of the three stacks, in elements. */ YYPTRDIFF_T yysize = yyssp - yyss + 1; # if defined yyoverflow { /* Give user a chance to reallocate the stack. Use copies of these so that the &'s don't force the real ones into memory. */ yy_state_t *yyss1 = yyss; YYSTYPE *yyvs1 = yyvs; /* Each stack pointer address is followed by the size of the data in use in that stack, in bytes. This used to be a conditional around just the two extra args, but that might be undefined if yyoverflow is a macro. */ yyoverflow (YY_("memory exhausted"), &yyss1, yysize * YYSIZEOF (*yyssp), &yyvs1, yysize * YYSIZEOF (*yyvsp), &yystacksize); yyss = yyss1; yyvs = yyvs1; } # else /* defined YYSTACK_RELOCATE */ /* Extend the stack our own way. */ if (YYMAXDEPTH <= yystacksize) YYNOMEM; yystacksize *= 2; if (YYMAXDEPTH < yystacksize) yystacksize = YYMAXDEPTH; { yy_state_t *yyss1 = yyss; union yyalloc *yyptr = YY_CAST (union yyalloc *, YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize)))); if (! yyptr) YYNOMEM; YYSTACK_RELOCATE (yyss_alloc, yyss); YYSTACK_RELOCATE (yyvs_alloc, yyvs); # undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); } # endif yyssp = yyss + yysize - 1; yyvsp = yyvs + yysize - 1; YY_IGNORE_USELESS_CAST_BEGIN YYDPRINTF ((stderr, "Stack size increased to %ld\n", YY_CAST (long, yystacksize))); YY_IGNORE_USELESS_CAST_END if (yyss + yystacksize - 1 <= yyssp) YYABORT; } #endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */ if (yystate == YYFINAL) YYACCEPT; goto yybackup; /*-----------. | yybackup. | `-----------*/ yybackup: /* Do appropriate processing given the current state. Read a lookahead token if we need one and don't already have one. */ /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; if (yypact_value_is_default (yyn)) goto yydefault; /* Not known => get a lookahead token if don't already have one. */ /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */ if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token\n")); yychar = yylex (&yylval, parseContext); } if (yychar <= YYEOF) { yychar = YYEOF; yytoken = YYSYMBOL_YYEOF; YYDPRINTF ((stderr, "Now at end of input.\n")); } else if (yychar == YYerror) { /* The scanner already issued an error message, process directly to error recovery. But do not keep the error token as lookahead, it is too special and may lead us to an endless loop in error recovery. */ yychar = YYUNDEF; yytoken = YYSYMBOL_YYerror; goto yyerrlab1; } else { yytoken = YYTRANSLATE (yychar); YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); } /* If the proper action on seeing token YYTOKEN is to reduce or to detect an error, take that action. */ yyn += yytoken; if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) goto yydefault; yyn = yytable[yyn]; if (yyn <= 0) { if (yytable_value_is_error (yyn)) goto yyerrlab; yyn = -yyn; goto yyreduce; } /* Count tokens shifted since error; after three, turn off error status. */ if (yyerrstatus) yyerrstatus--; /* Shift the lookahead token. */ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); yystate = yyn; YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; YY_IGNORE_MAYBE_UNINITIALIZED_END /* Discard the shifted token. */ yychar = YYEMPTY; goto yynewstate; /*-----------------------------------------------------------. | yydefault -- do the default action for the current state. | `-----------------------------------------------------------*/ yydefault: yyn = yydefact[yystate]; if (yyn == 0) goto yyerrlab; goto yyreduce; /*-----------------------------. | yyreduce -- do a reduction. | `-----------------------------*/ yyreduce: /* yyn is the number of a rule to reduce with. */ yylen = yyr2[yyn]; /* If YYLEN is nonzero, implement the default value of the action: '$$ = $1'. Otherwise, the following line sets YYVAL to garbage. This behavior is undocumented and Bison users should not rely upon it. Assigning to YYVAL unconditionally makes the parser a bit smaller, and it avoids a GCC warning that YYVAL may be used uninitialized. */ yyval = yyvsp[1-yylen]; YY_REDUCE_PRINT (yyn); switch (yyn) { case 2: /* variable_identifier: IDENTIFIER */ #line 360 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.handleVariable((yyvsp[0].lex).loc, (yyvsp[0].lex).symbol, (yyvsp[0].lex).string); } #line 5339 "MachineIndependent/glslang_tab.cpp" break; case 3: /* primary_expression: variable_identifier */ #line 366 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } #line 5347 "MachineIndependent/glslang_tab.cpp" break; case 4: /* primary_expression: LEFT_PAREN expression RIGHT_PAREN */ #line 369 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[-1].interm.intermTypedNode); if ((yyval.interm.intermTypedNode)->getAsConstantUnion()) (yyval.interm.intermTypedNode)->getAsConstantUnion()->setExpression(); } #line 5357 "MachineIndependent/glslang_tab.cpp" break; case 5: /* primary_expression: FLOATCONSTANT */ #line 374 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).d, EbtFloat, (yyvsp[0].lex).loc, true); } #line 5365 "MachineIndependent/glslang_tab.cpp" break; case 6: /* primary_expression: INTCONSTANT */ #line 377 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).i, (yyvsp[0].lex).loc, true); } #line 5373 "MachineIndependent/glslang_tab.cpp" break; case 7: /* primary_expression: UINTCONSTANT */ #line 380 "MachineIndependent/glslang.y" { parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "unsigned literal"); (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).u, (yyvsp[0].lex).loc, true); } #line 5382 "MachineIndependent/glslang_tab.cpp" break; case 8: /* primary_expression: BOOLCONSTANT */ #line 384 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).b, (yyvsp[0].lex).loc, true); } #line 5390 "MachineIndependent/glslang_tab.cpp" break; case 9: /* primary_expression: STRING_LITERAL */ #line 387 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).string, (yyvsp[0].lex).loc, true); } #line 5398 "MachineIndependent/glslang_tab.cpp" break; case 10: /* primary_expression: INT32CONSTANT */ #line 390 "MachineIndependent/glslang.y" { parseContext.explicitInt32Check((yyvsp[0].lex).loc, "32-bit signed literal"); (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).i, (yyvsp[0].lex).loc, true); } #line 5407 "MachineIndependent/glslang_tab.cpp" break; case 11: /* primary_expression: UINT32CONSTANT */ #line 394 "MachineIndependent/glslang.y" { parseContext.explicitInt32Check((yyvsp[0].lex).loc, "32-bit signed literal"); (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).u, (yyvsp[0].lex).loc, true); } #line 5416 "MachineIndependent/glslang_tab.cpp" break; case 12: /* primary_expression: INT64CONSTANT */ #line 398 "MachineIndependent/glslang.y" { parseContext.int64Check((yyvsp[0].lex).loc, "64-bit integer literal"); (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).i64, (yyvsp[0].lex).loc, true); } #line 5425 "MachineIndependent/glslang_tab.cpp" break; case 13: /* primary_expression: UINT64CONSTANT */ #line 402 "MachineIndependent/glslang.y" { parseContext.int64Check((yyvsp[0].lex).loc, "64-bit unsigned integer literal"); (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).u64, (yyvsp[0].lex).loc, true); } #line 5434 "MachineIndependent/glslang_tab.cpp" break; case 14: /* primary_expression: INT16CONSTANT */ #line 406 "MachineIndependent/glslang.y" { parseContext.explicitInt16Check((yyvsp[0].lex).loc, "16-bit integer literal"); (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((short)(yyvsp[0].lex).i, (yyvsp[0].lex).loc, true); } #line 5443 "MachineIndependent/glslang_tab.cpp" break; case 15: /* primary_expression: UINT16CONSTANT */ #line 410 "MachineIndependent/glslang.y" { parseContext.explicitInt16Check((yyvsp[0].lex).loc, "16-bit unsigned integer literal"); (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((unsigned short)(yyvsp[0].lex).u, (yyvsp[0].lex).loc, true); } #line 5452 "MachineIndependent/glslang_tab.cpp" break; case 16: /* primary_expression: DOUBLECONSTANT */ #line 414 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double literal"); if (! parseContext.symbolTable.atBuiltInLevel()) parseContext.doubleCheck((yyvsp[0].lex).loc, "double literal"); (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).d, EbtDouble, (yyvsp[0].lex).loc, true); } #line 5463 "MachineIndependent/glslang_tab.cpp" break; case 17: /* primary_expression: FLOAT16CONSTANT */ #line 420 "MachineIndependent/glslang.y" { parseContext.float16Check((yyvsp[0].lex).loc, "half float literal"); (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).d, EbtFloat16, (yyvsp[0].lex).loc, true); } #line 5472 "MachineIndependent/glslang_tab.cpp" break; case 18: /* postfix_expression: primary_expression */ #line 427 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } #line 5480 "MachineIndependent/glslang_tab.cpp" break; case 19: /* postfix_expression: postfix_expression LEFT_BRACKET integer_expression RIGHT_BRACKET */ #line 430 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.handleBracketDereference((yyvsp[-2].lex).loc, (yyvsp[-3].interm.intermTypedNode), (yyvsp[-1].interm.intermTypedNode)); } #line 5488 "MachineIndependent/glslang_tab.cpp" break; case 20: /* postfix_expression: function_call */ #line 433 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } #line 5496 "MachineIndependent/glslang_tab.cpp" break; case 21: /* postfix_expression: postfix_expression DOT IDENTIFIER */ #line 436 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.handleDotDereference((yyvsp[0].lex).loc, (yyvsp[-2].interm.intermTypedNode), *(yyvsp[0].lex).string); } #line 5504 "MachineIndependent/glslang_tab.cpp" break; case 22: /* postfix_expression: postfix_expression INC_OP */ #line 439 "MachineIndependent/glslang.y" { parseContext.variableCheck((yyvsp[-1].interm.intermTypedNode)); parseContext.lValueErrorCheck((yyvsp[0].lex).loc, "++", (yyvsp[-1].interm.intermTypedNode)); (yyval.interm.intermTypedNode) = parseContext.handleUnaryMath((yyvsp[0].lex).loc, "++", EOpPostIncrement, (yyvsp[-1].interm.intermTypedNode)); } #line 5514 "MachineIndependent/glslang_tab.cpp" break; case 23: /* postfix_expression: postfix_expression DEC_OP */ #line 444 "MachineIndependent/glslang.y" { parseContext.variableCheck((yyvsp[-1].interm.intermTypedNode)); parseContext.lValueErrorCheck((yyvsp[0].lex).loc, "--", (yyvsp[-1].interm.intermTypedNode)); (yyval.interm.intermTypedNode) = parseContext.handleUnaryMath((yyvsp[0].lex).loc, "--", EOpPostDecrement, (yyvsp[-1].interm.intermTypedNode)); } #line 5524 "MachineIndependent/glslang_tab.cpp" break; case 24: /* integer_expression: expression */ #line 452 "MachineIndependent/glslang.y" { parseContext.integerCheck((yyvsp[0].interm.intermTypedNode), "[]"); (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } #line 5533 "MachineIndependent/glslang_tab.cpp" break; case 25: /* function_call: function_call_or_method */ #line 459 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.handleFunctionCall((yyvsp[0].interm).loc, (yyvsp[0].interm).function, (yyvsp[0].interm).intermNode); delete (yyvsp[0].interm).function; } #line 5542 "MachineIndependent/glslang_tab.cpp" break; case 26: /* function_call_or_method: function_call_generic */ #line 466 "MachineIndependent/glslang.y" { (yyval.interm) = (yyvsp[0].interm); } #line 5550 "MachineIndependent/glslang_tab.cpp" break; case 27: /* function_call_generic: function_call_header_with_parameters RIGHT_PAREN */ #line 472 "MachineIndependent/glslang.y" { (yyval.interm) = (yyvsp[-1].interm); (yyval.interm).loc = (yyvsp[0].lex).loc; } #line 5559 "MachineIndependent/glslang_tab.cpp" break; case 28: /* function_call_generic: function_call_header_no_parameters RIGHT_PAREN */ #line 476 "MachineIndependent/glslang.y" { (yyval.interm) = (yyvsp[-1].interm); (yyval.interm).loc = (yyvsp[0].lex).loc; } #line 5568 "MachineIndependent/glslang_tab.cpp" break; case 29: /* function_call_header_no_parameters: function_call_header VOID */ #line 483 "MachineIndependent/glslang.y" { (yyval.interm) = (yyvsp[-1].interm); } #line 5576 "MachineIndependent/glslang_tab.cpp" break; case 30: /* function_call_header_no_parameters: function_call_header */ #line 486 "MachineIndependent/glslang.y" { (yyval.interm) = (yyvsp[0].interm); } #line 5584 "MachineIndependent/glslang_tab.cpp" break; case 31: /* function_call_header_with_parameters: function_call_header assignment_expression */ #line 492 "MachineIndependent/glslang.y" { if (parseContext.spvVersion.vulkan > 0 && parseContext.spvVersion.vulkanRelaxed && (yyvsp[0].interm.intermTypedNode)->getType().containsOpaque()) { (yyval.interm).intermNode = parseContext.vkRelaxedRemapFunctionArgument((yyval.interm).loc, (yyvsp[-1].interm).function, (yyvsp[0].interm.intermTypedNode)); (yyval.interm).function = (yyvsp[-1].interm).function; } else { TParameter param = { 0, new TType, {} }; param.type->shallowCopy((yyvsp[0].interm.intermTypedNode)->getType()); (yyvsp[-1].interm).function->addParameter(param); (yyval.interm).function = (yyvsp[-1].interm).function; (yyval.interm).intermNode = (yyvsp[0].interm.intermTypedNode); } } #line 5607 "MachineIndependent/glslang_tab.cpp" break; case 32: /* function_call_header_with_parameters: function_call_header_with_parameters COMMA assignment_expression */ #line 510 "MachineIndependent/glslang.y" { if (parseContext.spvVersion.vulkan > 0 && parseContext.spvVersion.vulkanRelaxed && (yyvsp[0].interm.intermTypedNode)->getType().containsOpaque()) { TIntermNode* remappedNode = parseContext.vkRelaxedRemapFunctionArgument((yyvsp[-1].lex).loc, (yyvsp[-2].interm).function, (yyvsp[0].interm.intermTypedNode)); if (remappedNode == (yyvsp[0].interm.intermTypedNode)) (yyval.interm).intermNode = parseContext.intermediate.growAggregate((yyvsp[-2].interm).intermNode, (yyvsp[0].interm.intermTypedNode), (yyvsp[-1].lex).loc); else (yyval.interm).intermNode = parseContext.intermediate.mergeAggregate((yyvsp[-2].interm).intermNode, remappedNode, (yyvsp[-1].lex).loc); (yyval.interm).function = (yyvsp[-2].interm).function; } else { TParameter param = { 0, new TType, {} }; param.type->shallowCopy((yyvsp[0].interm.intermTypedNode)->getType()); (yyvsp[-2].interm).function->addParameter(param); (yyval.interm).function = (yyvsp[-2].interm).function; (yyval.interm).intermNode = parseContext.intermediate.growAggregate((yyvsp[-2].interm).intermNode, (yyvsp[0].interm.intermTypedNode), (yyvsp[-1].lex).loc); } } #line 5634 "MachineIndependent/glslang_tab.cpp" break; case 33: /* function_call_header: function_identifier LEFT_PAREN */ #line 535 "MachineIndependent/glslang.y" { (yyval.interm) = (yyvsp[-1].interm); } #line 5642 "MachineIndependent/glslang_tab.cpp" break; case 34: /* function_identifier: type_specifier */ #line 543 "MachineIndependent/glslang.y" { // Constructor (yyval.interm).intermNode = 0; (yyval.interm).function = parseContext.handleConstructorCall((yyvsp[0].interm.type).loc, (yyvsp[0].interm.type)); } #line 5652 "MachineIndependent/glslang_tab.cpp" break; case 35: /* function_identifier: postfix_expression */ #line 548 "MachineIndependent/glslang.y" { // // Should be a method or subroutine call, but we haven't recognized the arguments yet. // (yyval.interm).function = 0; (yyval.interm).intermNode = 0; TIntermMethod* method = (yyvsp[0].interm.intermTypedNode)->getAsMethodNode(); if (method) { (yyval.interm).function = new TFunction(&method->getMethodName(), TType(EbtInt), EOpArrayLength); (yyval.interm).intermNode = method->getObject(); } else { TIntermSymbol* symbol = (yyvsp[0].interm.intermTypedNode)->getAsSymbolNode(); if (symbol) { parseContext.reservedErrorCheck(symbol->getLoc(), symbol->getName()); TFunction *function = new TFunction(&symbol->getName(), TType(EbtVoid)); (yyval.interm).function = function; } else parseContext.error((yyvsp[0].interm.intermTypedNode)->getLoc(), "function call, method, or subroutine call expected", "", ""); } if ((yyval.interm).function == 0) { // error recover TString* empty = NewPoolTString(""); (yyval.interm).function = new TFunction(empty, TType(EbtVoid), EOpNull); } } #line 5684 "MachineIndependent/glslang_tab.cpp" break; case 36: /* function_identifier: non_uniform_qualifier */ #line 575 "MachineIndependent/glslang.y" { // Constructor (yyval.interm).intermNode = 0; (yyval.interm).function = parseContext.handleConstructorCall((yyvsp[0].interm.type).loc, (yyvsp[0].interm.type)); } #line 5694 "MachineIndependent/glslang_tab.cpp" break; case 37: /* unary_expression: postfix_expression */ #line 583 "MachineIndependent/glslang.y" { parseContext.variableCheck((yyvsp[0].interm.intermTypedNode)); (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); if (TIntermMethod* method = (yyvsp[0].interm.intermTypedNode)->getAsMethodNode()) parseContext.error((yyvsp[0].interm.intermTypedNode)->getLoc(), "incomplete method syntax", method->getMethodName().c_str(), ""); } #line 5705 "MachineIndependent/glslang_tab.cpp" break; case 38: /* unary_expression: INC_OP unary_expression */ #line 589 "MachineIndependent/glslang.y" { parseContext.lValueErrorCheck((yyvsp[-1].lex).loc, "++", (yyvsp[0].interm.intermTypedNode)); (yyval.interm.intermTypedNode) = parseContext.handleUnaryMath((yyvsp[-1].lex).loc, "++", EOpPreIncrement, (yyvsp[0].interm.intermTypedNode)); } #line 5714 "MachineIndependent/glslang_tab.cpp" break; case 39: /* unary_expression: DEC_OP unary_expression */ #line 593 "MachineIndependent/glslang.y" { parseContext.lValueErrorCheck((yyvsp[-1].lex).loc, "--", (yyvsp[0].interm.intermTypedNode)); (yyval.interm.intermTypedNode) = parseContext.handleUnaryMath((yyvsp[-1].lex).loc, "--", EOpPreDecrement, (yyvsp[0].interm.intermTypedNode)); } #line 5723 "MachineIndependent/glslang_tab.cpp" break; case 40: /* unary_expression: unary_operator unary_expression */ #line 597 "MachineIndependent/glslang.y" { if ((yyvsp[-1].interm).op != EOpNull) { char errorOp[2] = {0, 0}; switch((yyvsp[-1].interm).op) { case EOpNegative: errorOp[0] = '-'; break; case EOpLogicalNot: errorOp[0] = '!'; break; case EOpBitwiseNot: errorOp[0] = '~'; break; default: break; // some compilers want this } (yyval.interm.intermTypedNode) = parseContext.handleUnaryMath((yyvsp[-1].interm).loc, errorOp, (yyvsp[-1].interm).op, (yyvsp[0].interm.intermTypedNode)); } else { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); if ((yyval.interm.intermTypedNode)->getAsConstantUnion()) (yyval.interm.intermTypedNode)->getAsConstantUnion()->setExpression(); } } #line 5744 "MachineIndependent/glslang_tab.cpp" break; case 41: /* unary_operator: PLUS */ #line 617 "MachineIndependent/glslang.y" { (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpNull; } #line 5750 "MachineIndependent/glslang_tab.cpp" break; case 42: /* unary_operator: DASH */ #line 618 "MachineIndependent/glslang.y" { (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpNegative; } #line 5756 "MachineIndependent/glslang_tab.cpp" break; case 43: /* unary_operator: BANG */ #line 619 "MachineIndependent/glslang.y" { (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpLogicalNot; } #line 5762 "MachineIndependent/glslang_tab.cpp" break; case 44: /* unary_operator: TILDE */ #line 620 "MachineIndependent/glslang.y" { (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpBitwiseNot; parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "bitwise not"); } #line 5769 "MachineIndependent/glslang_tab.cpp" break; case 45: /* multiplicative_expression: unary_expression */ #line 626 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } #line 5775 "MachineIndependent/glslang_tab.cpp" break; case 46: /* multiplicative_expression: multiplicative_expression STAR unary_expression */ #line 627 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "*", EOpMul, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); } #line 5785 "MachineIndependent/glslang_tab.cpp" break; case 47: /* multiplicative_expression: multiplicative_expression SLASH unary_expression */ #line 632 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "/", EOpDiv, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); } #line 5795 "MachineIndependent/glslang_tab.cpp" break; case 48: /* multiplicative_expression: multiplicative_expression PERCENT unary_expression */ #line 637 "MachineIndependent/glslang.y" { parseContext.fullIntegerCheck((yyvsp[-1].lex).loc, "%"); (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "%", EOpMod, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); } #line 5806 "MachineIndependent/glslang_tab.cpp" break; case 49: /* additive_expression: multiplicative_expression */ #line 646 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } #line 5812 "MachineIndependent/glslang_tab.cpp" break; case 50: /* additive_expression: additive_expression PLUS multiplicative_expression */ #line 647 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "+", EOpAdd, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); } #line 5822 "MachineIndependent/glslang_tab.cpp" break; case 51: /* additive_expression: additive_expression DASH multiplicative_expression */ #line 652 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "-", EOpSub, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); } #line 5832 "MachineIndependent/glslang_tab.cpp" break; case 52: /* shift_expression: additive_expression */ #line 660 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } #line 5838 "MachineIndependent/glslang_tab.cpp" break; case 53: /* shift_expression: shift_expression LEFT_OP additive_expression */ #line 661 "MachineIndependent/glslang.y" { parseContext.fullIntegerCheck((yyvsp[-1].lex).loc, "bit shift left"); (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "<<", EOpLeftShift, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); } #line 5849 "MachineIndependent/glslang_tab.cpp" break; case 54: /* shift_expression: shift_expression RIGHT_OP additive_expression */ #line 667 "MachineIndependent/glslang.y" { parseContext.fullIntegerCheck((yyvsp[-1].lex).loc, "bit shift right"); (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, ">>", EOpRightShift, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); } #line 5860 "MachineIndependent/glslang_tab.cpp" break; case 55: /* relational_expression: shift_expression */ #line 676 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } #line 5866 "MachineIndependent/glslang_tab.cpp" break; case 56: /* relational_expression: relational_expression LEFT_ANGLE shift_expression */ #line 677 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "<", EOpLessThan, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc); } #line 5876 "MachineIndependent/glslang_tab.cpp" break; case 57: /* relational_expression: relational_expression RIGHT_ANGLE shift_expression */ #line 682 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, ">", EOpGreaterThan, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc); } #line 5886 "MachineIndependent/glslang_tab.cpp" break; case 58: /* relational_expression: relational_expression LE_OP shift_expression */ #line 687 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "<=", EOpLessThanEqual, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc); } #line 5896 "MachineIndependent/glslang_tab.cpp" break; case 59: /* relational_expression: relational_expression GE_OP shift_expression */ #line 692 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, ">=", EOpGreaterThanEqual, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc); } #line 5906 "MachineIndependent/glslang_tab.cpp" break; case 60: /* equality_expression: relational_expression */ #line 700 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } #line 5912 "MachineIndependent/glslang_tab.cpp" break; case 61: /* equality_expression: equality_expression EQ_OP relational_expression */ #line 701 "MachineIndependent/glslang.y" { parseContext.arrayObjectCheck((yyvsp[-1].lex).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "array comparison"); parseContext.opaqueCheck((yyvsp[-1].lex).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "=="); parseContext.specializationCheck((yyvsp[-1].lex).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "=="); parseContext.referenceCheck((yyvsp[-1].lex).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "=="); (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "==", EOpEqual, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc); } #line 5926 "MachineIndependent/glslang_tab.cpp" break; case 62: /* equality_expression: equality_expression NE_OP relational_expression */ #line 710 "MachineIndependent/glslang.y" { parseContext.arrayObjectCheck((yyvsp[-1].lex).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "array comparison"); parseContext.opaqueCheck((yyvsp[-1].lex).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "!="); parseContext.specializationCheck((yyvsp[-1].lex).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "!="); parseContext.referenceCheck((yyvsp[-1].lex).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "!="); (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "!=", EOpNotEqual, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc); } #line 5940 "MachineIndependent/glslang_tab.cpp" break; case 63: /* and_expression: equality_expression */ #line 722 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } #line 5946 "MachineIndependent/glslang_tab.cpp" break; case 64: /* and_expression: and_expression AMPERSAND equality_expression */ #line 723 "MachineIndependent/glslang.y" { parseContext.fullIntegerCheck((yyvsp[-1].lex).loc, "bitwise and"); (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "&", EOpAnd, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); } #line 5957 "MachineIndependent/glslang_tab.cpp" break; case 65: /* exclusive_or_expression: and_expression */ #line 732 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } #line 5963 "MachineIndependent/glslang_tab.cpp" break; case 66: /* exclusive_or_expression: exclusive_or_expression CARET and_expression */ #line 733 "MachineIndependent/glslang.y" { parseContext.fullIntegerCheck((yyvsp[-1].lex).loc, "bitwise exclusive or"); (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "^", EOpExclusiveOr, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); } #line 5974 "MachineIndependent/glslang_tab.cpp" break; case 67: /* inclusive_or_expression: exclusive_or_expression */ #line 742 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } #line 5980 "MachineIndependent/glslang_tab.cpp" break; case 68: /* inclusive_or_expression: inclusive_or_expression VERTICAL_BAR exclusive_or_expression */ #line 743 "MachineIndependent/glslang.y" { parseContext.fullIntegerCheck((yyvsp[-1].lex).loc, "bitwise inclusive or"); (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "|", EOpInclusiveOr, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); } #line 5991 "MachineIndependent/glslang_tab.cpp" break; case 69: /* logical_and_expression: inclusive_or_expression */ #line 752 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } #line 5997 "MachineIndependent/glslang_tab.cpp" break; case 70: /* logical_and_expression: logical_and_expression AND_OP inclusive_or_expression */ #line 753 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "&&", EOpLogicalAnd, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc); } #line 6007 "MachineIndependent/glslang_tab.cpp" break; case 71: /* logical_xor_expression: logical_and_expression */ #line 761 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } #line 6013 "MachineIndependent/glslang_tab.cpp" break; case 72: /* logical_xor_expression: logical_xor_expression XOR_OP logical_and_expression */ #line 762 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "^^", EOpLogicalXor, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc); } #line 6023 "MachineIndependent/glslang_tab.cpp" break; case 73: /* logical_or_expression: logical_xor_expression */ #line 770 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } #line 6029 "MachineIndependent/glslang_tab.cpp" break; case 74: /* logical_or_expression: logical_or_expression OR_OP logical_xor_expression */ #line 771 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "||", EOpLogicalOr, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc); } #line 6039 "MachineIndependent/glslang_tab.cpp" break; case 75: /* conditional_expression: logical_or_expression */ #line 779 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } #line 6045 "MachineIndependent/glslang_tab.cpp" break; case 76: /* $@1: %empty */ #line 780 "MachineIndependent/glslang.y" { ++parseContext.controlFlowNestingLevel; } #line 6053 "MachineIndependent/glslang_tab.cpp" break; case 77: /* conditional_expression: logical_or_expression QUESTION $@1 expression COLON assignment_expression */ #line 783 "MachineIndependent/glslang.y" { --parseContext.controlFlowNestingLevel; parseContext.boolCheck((yyvsp[-4].lex).loc, (yyvsp[-5].interm.intermTypedNode)); parseContext.rValueErrorCheck((yyvsp[-4].lex).loc, "?", (yyvsp[-5].interm.intermTypedNode)); parseContext.rValueErrorCheck((yyvsp[-1].lex).loc, ":", (yyvsp[-2].interm.intermTypedNode)); parseContext.rValueErrorCheck((yyvsp[-1].lex).loc, ":", (yyvsp[0].interm.intermTypedNode)); (yyval.interm.intermTypedNode) = parseContext.intermediate.addSelection((yyvsp[-5].interm.intermTypedNode), (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yyvsp[-4].lex).loc); if ((yyval.interm.intermTypedNode) == 0) { parseContext.binaryOpError((yyvsp[-4].lex).loc, ":", (yyvsp[-2].interm.intermTypedNode)->getCompleteString(parseContext.intermediate.getEnhancedMsgs()), (yyvsp[0].interm.intermTypedNode)->getCompleteString(parseContext.intermediate.getEnhancedMsgs())); (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } } #line 6070 "MachineIndependent/glslang_tab.cpp" break; case 78: /* assignment_expression: conditional_expression */ #line 798 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } #line 6076 "MachineIndependent/glslang_tab.cpp" break; case 79: /* assignment_expression: unary_expression assignment_operator assignment_expression */ #line 799 "MachineIndependent/glslang.y" { parseContext.arrayObjectCheck((yyvsp[-1].interm).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "array assignment"); parseContext.opaqueCheck((yyvsp[-1].interm).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "="); parseContext.storage16BitAssignmentCheck((yyvsp[-1].interm).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "="); parseContext.specializationCheck((yyvsp[-1].interm).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "="); parseContext.lValueErrorCheck((yyvsp[-1].interm).loc, "assign", (yyvsp[-2].interm.intermTypedNode)); parseContext.rValueErrorCheck((yyvsp[-1].interm).loc, "assign", (yyvsp[0].interm.intermTypedNode)); (yyval.interm.intermTypedNode) = parseContext.addAssign((yyvsp[-1].interm).loc, (yyvsp[-1].interm).op, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); if ((yyval.interm.intermTypedNode) == 0) { parseContext.assignError((yyvsp[-1].interm).loc, "assign", (yyvsp[-2].interm.intermTypedNode)->getCompleteString(parseContext.intermediate.getEnhancedMsgs()), (yyvsp[0].interm.intermTypedNode)->getCompleteString(parseContext.intermediate.getEnhancedMsgs())); (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); } } #line 6094 "MachineIndependent/glslang_tab.cpp" break; case 80: /* assignment_operator: EQUAL */ #line 815 "MachineIndependent/glslang.y" { (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpAssign; } #line 6103 "MachineIndependent/glslang_tab.cpp" break; case 81: /* assignment_operator: MUL_ASSIGN */ #line 819 "MachineIndependent/glslang.y" { (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpMulAssign; } #line 6112 "MachineIndependent/glslang_tab.cpp" break; case 82: /* assignment_operator: DIV_ASSIGN */ #line 823 "MachineIndependent/glslang.y" { (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpDivAssign; } #line 6121 "MachineIndependent/glslang_tab.cpp" break; case 83: /* assignment_operator: MOD_ASSIGN */ #line 827 "MachineIndependent/glslang.y" { parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "%="); (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpModAssign; } #line 6131 "MachineIndependent/glslang_tab.cpp" break; case 84: /* assignment_operator: ADD_ASSIGN */ #line 832 "MachineIndependent/glslang.y" { (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpAddAssign; } #line 6140 "MachineIndependent/glslang_tab.cpp" break; case 85: /* assignment_operator: SUB_ASSIGN */ #line 836 "MachineIndependent/glslang.y" { (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpSubAssign; } #line 6149 "MachineIndependent/glslang_tab.cpp" break; case 86: /* assignment_operator: LEFT_ASSIGN */ #line 840 "MachineIndependent/glslang.y" { parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "bit-shift left assign"); (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpLeftShiftAssign; } #line 6158 "MachineIndependent/glslang_tab.cpp" break; case 87: /* assignment_operator: RIGHT_ASSIGN */ #line 844 "MachineIndependent/glslang.y" { parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "bit-shift right assign"); (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpRightShiftAssign; } #line 6167 "MachineIndependent/glslang_tab.cpp" break; case 88: /* assignment_operator: AND_ASSIGN */ #line 848 "MachineIndependent/glslang.y" { parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "bitwise-and assign"); (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpAndAssign; } #line 6176 "MachineIndependent/glslang_tab.cpp" break; case 89: /* assignment_operator: XOR_ASSIGN */ #line 852 "MachineIndependent/glslang.y" { parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "bitwise-xor assign"); (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpExclusiveOrAssign; } #line 6185 "MachineIndependent/glslang_tab.cpp" break; case 90: /* assignment_operator: OR_ASSIGN */ #line 856 "MachineIndependent/glslang.y" { parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "bitwise-or assign"); (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpInclusiveOrAssign; } #line 6194 "MachineIndependent/glslang_tab.cpp" break; case 91: /* expression: assignment_expression */ #line 863 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } #line 6202 "MachineIndependent/glslang_tab.cpp" break; case 92: /* expression: expression COMMA assignment_expression */ #line 866 "MachineIndependent/glslang.y" { parseContext.samplerConstructorLocationCheck((yyvsp[-1].lex).loc, ",", (yyvsp[0].interm.intermTypedNode)); (yyval.interm.intermTypedNode) = parseContext.intermediate.addComma((yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yyvsp[-1].lex).loc); if ((yyval.interm.intermTypedNode) == 0) { parseContext.binaryOpError((yyvsp[-1].lex).loc, ",", (yyvsp[-2].interm.intermTypedNode)->getCompleteString(parseContext.intermediate.getEnhancedMsgs()), (yyvsp[0].interm.intermTypedNode)->getCompleteString(parseContext.intermediate.getEnhancedMsgs())); (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } } #line 6215 "MachineIndependent/glslang_tab.cpp" break; case 93: /* constant_expression: conditional_expression */ #line 877 "MachineIndependent/glslang.y" { parseContext.constantValueCheck((yyvsp[0].interm.intermTypedNode), ""); (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } #line 6224 "MachineIndependent/glslang_tab.cpp" break; case 94: /* declaration: function_prototype SEMICOLON */ #line 884 "MachineIndependent/glslang.y" { parseContext.handleFunctionDeclarator((yyvsp[-1].interm).loc, *(yyvsp[-1].interm).function, true /* prototype */); (yyval.interm.intermNode) = 0; // TODO: 4.0 functionality: subroutines: make the identifier a user type for this signature } #line 6234 "MachineIndependent/glslang_tab.cpp" break; case 95: /* declaration: spirv_instruction_qualifier function_prototype SEMICOLON */ #line 889 "MachineIndependent/glslang.y" { parseContext.requireExtensions((yyvsp[-1].interm).loc, 1, &E_GL_EXT_spirv_intrinsics, "SPIR-V instruction qualifier"); (yyvsp[-1].interm).function->setSpirvInstruction(*(yyvsp[-2].interm.spirvInst)); // Attach SPIR-V intruction qualifier parseContext.handleFunctionDeclarator((yyvsp[-1].interm).loc, *(yyvsp[-1].interm).function, true /* prototype */); (yyval.interm.intermNode) = 0; // TODO: 4.0 functionality: subroutines: make the identifier a user type for this signature } #line 6246 "MachineIndependent/glslang_tab.cpp" break; case 96: /* declaration: spirv_execution_mode_qualifier SEMICOLON */ #line 896 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "SPIR-V execution mode qualifier"); parseContext.requireExtensions((yyvsp[0].lex).loc, 1, &E_GL_EXT_spirv_intrinsics, "SPIR-V execution mode qualifier"); (yyval.interm.intermNode) = 0; } #line 6256 "MachineIndependent/glslang_tab.cpp" break; case 97: /* declaration: init_declarator_list SEMICOLON */ #line 901 "MachineIndependent/glslang.y" { if ((yyvsp[-1].interm).intermNode && (yyvsp[-1].interm).intermNode->getAsAggregate()) (yyvsp[-1].interm).intermNode->getAsAggregate()->setOperator(EOpSequence); (yyval.interm.intermNode) = (yyvsp[-1].interm).intermNode; } #line 6266 "MachineIndependent/glslang_tab.cpp" break; case 98: /* declaration: PRECISION precision_qualifier type_specifier SEMICOLON */ #line 906 "MachineIndependent/glslang.y" { parseContext.profileRequires((yyvsp[-3].lex).loc, ENoProfile, 130, 0, "precision statement"); // lazy setting of the previous scope's defaults, has effect only the first time it is called in a particular scope parseContext.symbolTable.setPreviousDefaultPrecisions(&parseContext.defaultPrecision[0]); parseContext.setDefaultPrecision((yyvsp[-3].lex).loc, (yyvsp[-1].interm.type), (yyvsp[-2].interm.type).qualifier.precision); (yyval.interm.intermNode) = 0; } #line 6278 "MachineIndependent/glslang_tab.cpp" break; case 99: /* declaration: block_structure SEMICOLON */ #line 913 "MachineIndependent/glslang.y" { parseContext.declareBlock((yyvsp[-1].interm).loc, *(yyvsp[-1].interm).typeList); (yyval.interm.intermNode) = 0; } #line 6287 "MachineIndependent/glslang_tab.cpp" break; case 100: /* declaration: block_structure IDENTIFIER SEMICOLON */ #line 917 "MachineIndependent/glslang.y" { parseContext.declareBlock((yyvsp[-2].interm).loc, *(yyvsp[-2].interm).typeList, (yyvsp[-1].lex).string); (yyval.interm.intermNode) = 0; } #line 6296 "MachineIndependent/glslang_tab.cpp" break; case 101: /* declaration: block_structure IDENTIFIER array_specifier SEMICOLON */ #line 921 "MachineIndependent/glslang.y" { parseContext.declareBlock((yyvsp[-3].interm).loc, *(yyvsp[-3].interm).typeList, (yyvsp[-2].lex).string, (yyvsp[-1].interm).arraySizes); (yyval.interm.intermNode) = 0; } #line 6305 "MachineIndependent/glslang_tab.cpp" break; case 102: /* declaration: type_qualifier SEMICOLON */ #line 925 "MachineIndependent/glslang.y" { parseContext.globalQualifierFixCheck((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type).qualifier); parseContext.updateStandaloneQualifierDefaults((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type)); (yyval.interm.intermNode) = 0; } #line 6315 "MachineIndependent/glslang_tab.cpp" break; case 103: /* declaration: type_qualifier IDENTIFIER SEMICOLON */ #line 930 "MachineIndependent/glslang.y" { parseContext.checkNoShaderLayouts((yyvsp[-2].interm.type).loc, (yyvsp[-2].interm.type).shaderQualifiers); parseContext.addQualifierToExisting((yyvsp[-2].interm.type).loc, (yyvsp[-2].interm.type).qualifier, *(yyvsp[-1].lex).string); (yyval.interm.intermNode) = 0; } #line 6325 "MachineIndependent/glslang_tab.cpp" break; case 104: /* declaration: type_qualifier IDENTIFIER identifier_list SEMICOLON */ #line 935 "MachineIndependent/glslang.y" { parseContext.checkNoShaderLayouts((yyvsp[-3].interm.type).loc, (yyvsp[-3].interm.type).shaderQualifiers); (yyvsp[-1].interm.identifierList)->push_back((yyvsp[-2].lex).string); parseContext.addQualifierToExisting((yyvsp[-3].interm.type).loc, (yyvsp[-3].interm.type).qualifier, *(yyvsp[-1].interm.identifierList)); (yyval.interm.intermNode) = 0; } #line 6336 "MachineIndependent/glslang_tab.cpp" break; case 105: /* $@2: %empty */ #line 944 "MachineIndependent/glslang.y" { parseContext.nestedBlockCheck((yyvsp[-2].interm.type).loc); } #line 6342 "MachineIndependent/glslang_tab.cpp" break; case 106: /* block_structure: type_qualifier IDENTIFIER LEFT_BRACE $@2 struct_declaration_list RIGHT_BRACE */ #line 944 "MachineIndependent/glslang.y" { --parseContext.blockNestingLevel; parseContext.blockName = (yyvsp[-4].lex).string; parseContext.globalQualifierFixCheck((yyvsp[-5].interm.type).loc, (yyvsp[-5].interm.type).qualifier); parseContext.checkNoShaderLayouts((yyvsp[-5].interm.type).loc, (yyvsp[-5].interm.type).shaderQualifiers); parseContext.currentBlockQualifier = (yyvsp[-5].interm.type).qualifier; (yyval.interm).loc = (yyvsp[-5].interm.type).loc; (yyval.interm).typeList = (yyvsp[-1].interm.typeList); } #line 6356 "MachineIndependent/glslang_tab.cpp" break; case 107: /* identifier_list: COMMA IDENTIFIER */ #line 955 "MachineIndependent/glslang.y" { (yyval.interm.identifierList) = new TIdentifierList; (yyval.interm.identifierList)->push_back((yyvsp[0].lex).string); } #line 6365 "MachineIndependent/glslang_tab.cpp" break; case 108: /* identifier_list: identifier_list COMMA IDENTIFIER */ #line 959 "MachineIndependent/glslang.y" { (yyval.interm.identifierList) = (yyvsp[-2].interm.identifierList); (yyval.interm.identifierList)->push_back((yyvsp[0].lex).string); } #line 6374 "MachineIndependent/glslang_tab.cpp" break; case 109: /* function_prototype: function_declarator RIGHT_PAREN */ #line 966 "MachineIndependent/glslang.y" { (yyval.interm).function = (yyvsp[-1].interm.function); if (parseContext.compileOnly) (yyval.interm).function->setExport(); (yyval.interm).loc = (yyvsp[0].lex).loc; } #line 6384 "MachineIndependent/glslang_tab.cpp" break; case 110: /* function_prototype: function_declarator RIGHT_PAREN attribute */ #line 971 "MachineIndependent/glslang.y" { (yyval.interm).function = (yyvsp[-2].interm.function); if (parseContext.compileOnly) (yyval.interm).function->setExport(); (yyval.interm).loc = (yyvsp[-1].lex).loc; const char * extensions[2] = { E_GL_EXT_subgroup_uniform_control_flow, E_GL_EXT_maximal_reconvergence }; parseContext.requireExtensions((yyvsp[-1].lex).loc, 2, extensions, "attribute"); parseContext.handleFunctionAttributes((yyvsp[-1].lex).loc, *(yyvsp[0].interm.attributes)); } #line 6397 "MachineIndependent/glslang_tab.cpp" break; case 111: /* function_prototype: attribute function_declarator RIGHT_PAREN */ #line 979 "MachineIndependent/glslang.y" { (yyval.interm).function = (yyvsp[-1].interm.function); if (parseContext.compileOnly) (yyval.interm).function->setExport(); (yyval.interm).loc = (yyvsp[0].lex).loc; const char * extensions[2] = { E_GL_EXT_subgroup_uniform_control_flow, E_GL_EXT_maximal_reconvergence }; parseContext.requireExtensions((yyvsp[0].lex).loc, 2, extensions, "attribute"); parseContext.handleFunctionAttributes((yyvsp[0].lex).loc, *(yyvsp[-2].interm.attributes)); } #line 6410 "MachineIndependent/glslang_tab.cpp" break; case 112: /* function_prototype: attribute function_declarator RIGHT_PAREN attribute */ #line 987 "MachineIndependent/glslang.y" { (yyval.interm).function = (yyvsp[-2].interm.function); if (parseContext.compileOnly) (yyval.interm).function->setExport(); (yyval.interm).loc = (yyvsp[-1].lex).loc; const char * extensions[2] = { E_GL_EXT_subgroup_uniform_control_flow, E_GL_EXT_maximal_reconvergence }; parseContext.requireExtensions((yyvsp[-1].lex).loc, 2, extensions, "attribute"); parseContext.handleFunctionAttributes((yyvsp[-1].lex).loc, *(yyvsp[-3].interm.attributes)); parseContext.handleFunctionAttributes((yyvsp[-1].lex).loc, *(yyvsp[0].interm.attributes)); } #line 6424 "MachineIndependent/glslang_tab.cpp" break; case 113: /* function_declarator: function_header */ #line 999 "MachineIndependent/glslang.y" { (yyval.interm.function) = (yyvsp[0].interm.function); } #line 6432 "MachineIndependent/glslang_tab.cpp" break; case 114: /* function_declarator: function_header_with_parameters */ #line 1002 "MachineIndependent/glslang.y" { (yyval.interm.function) = (yyvsp[0].interm.function); } #line 6440 "MachineIndependent/glslang_tab.cpp" break; case 115: /* function_header_with_parameters: function_header parameter_declaration */ #line 1009 "MachineIndependent/glslang.y" { // Add the parameter (yyval.interm.function) = (yyvsp[-1].interm.function); if ((yyvsp[0].interm).param.type->getBasicType() != EbtVoid) { if (!(parseContext.spvVersion.vulkan > 0 && parseContext.spvVersion.vulkanRelaxed)) (yyvsp[-1].interm.function)->addParameter((yyvsp[0].interm).param); else parseContext.vkRelaxedRemapFunctionParameter((yyvsp[-1].interm.function), (yyvsp[0].interm).param); } else delete (yyvsp[0].interm).param.type; } #line 6458 "MachineIndependent/glslang_tab.cpp" break; case 116: /* function_header_with_parameters: function_header_with_parameters COMMA parameter_declaration */ #line 1022 "MachineIndependent/glslang.y" { // // Only first parameter of one-parameter functions can be void // The check for named parameters not being void is done in parameter_declarator // if ((yyvsp[0].interm).param.type->getBasicType() == EbtVoid) { // // This parameter > first is void // parseContext.error((yyvsp[-1].lex).loc, "cannot be an argument type except for '(void)'", "void", ""); delete (yyvsp[0].interm).param.type; } else { // Add the parameter (yyval.interm.function) = (yyvsp[-2].interm.function); if (!(parseContext.spvVersion.vulkan > 0 && parseContext.spvVersion.vulkanRelaxed)) (yyvsp[-2].interm.function)->addParameter((yyvsp[0].interm).param); else parseContext.vkRelaxedRemapFunctionParameter((yyvsp[-2].interm.function), (yyvsp[0].interm).param); } } #line 6483 "MachineIndependent/glslang_tab.cpp" break; case 117: /* function_header: fully_specified_type IDENTIFIER LEFT_PAREN */ #line 1045 "MachineIndependent/glslang.y" { if ((yyvsp[-2].interm.type).qualifier.storage != EvqGlobal && (yyvsp[-2].interm.type).qualifier.storage != EvqTemporary) { parseContext.error((yyvsp[-1].lex).loc, "no qualifiers allowed for function return", GetStorageQualifierString((yyvsp[-2].interm.type).qualifier.storage), ""); } if ((yyvsp[-2].interm.type).arraySizes) parseContext.arraySizeRequiredCheck((yyvsp[-2].interm.type).loc, *(yyvsp[-2].interm.type).arraySizes); // Add the function as a prototype after parsing it (we do not support recursion) TFunction *function; TType type((yyvsp[-2].interm.type)); // Potentially rename shader entry point function. No-op most of the time. parseContext.renameShaderFunction((yyvsp[-1].lex).string); // Make the function function = new TFunction((yyvsp[-1].lex).string, type); (yyval.interm.function) = function; } #line 6507 "MachineIndependent/glslang_tab.cpp" break; case 118: /* parameter_declarator: type_specifier IDENTIFIER */ #line 1068 "MachineIndependent/glslang.y" { if ((yyvsp[-1].interm.type).arraySizes) { parseContext.profileRequires((yyvsp[-1].interm.type).loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type"); parseContext.profileRequires((yyvsp[-1].interm.type).loc, EEsProfile, 300, 0, "arrayed type"); parseContext.arraySizeRequiredCheck((yyvsp[-1].interm.type).loc, *(yyvsp[-1].interm.type).arraySizes); } if ((yyvsp[-1].interm.type).basicType == EbtVoid) { parseContext.error((yyvsp[0].lex).loc, "illegal use of type 'void'", (yyvsp[0].lex).string->c_str(), ""); } parseContext.reservedErrorCheck((yyvsp[0].lex).loc, *(yyvsp[0].lex).string); TParameter param = {(yyvsp[0].lex).string, new TType((yyvsp[-1].interm.type)), {}}; (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).param = param; } #line 6527 "MachineIndependent/glslang_tab.cpp" break; case 119: /* parameter_declarator: type_specifier IDENTIFIER array_specifier */ #line 1083 "MachineIndependent/glslang.y" { if ((yyvsp[-2].interm.type).arraySizes) { parseContext.profileRequires((yyvsp[-2].interm.type).loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type"); parseContext.profileRequires((yyvsp[-2].interm.type).loc, EEsProfile, 300, 0, "arrayed type"); parseContext.arraySizeRequiredCheck((yyvsp[-2].interm.type).loc, *(yyvsp[-2].interm.type).arraySizes); } TType* type = new TType((yyvsp[-2].interm.type)); type->transferArraySizes((yyvsp[0].interm).arraySizes); type->copyArrayInnerSizes((yyvsp[-2].interm.type).arraySizes); parseContext.arrayOfArrayVersionCheck((yyvsp[-1].lex).loc, type->getArraySizes()); parseContext.arraySizeRequiredCheck((yyvsp[0].interm).loc, *(yyvsp[0].interm).arraySizes); parseContext.reservedErrorCheck((yyvsp[-1].lex).loc, *(yyvsp[-1].lex).string); TParameter param = { (yyvsp[-1].lex).string, type, {} }; (yyval.interm).loc = (yyvsp[-1].lex).loc; (yyval.interm).param = param; } #line 6551 "MachineIndependent/glslang_tab.cpp" break; case 120: /* parameter_declaration: type_qualifier parameter_declarator */ #line 1108 "MachineIndependent/glslang.y" { (yyval.interm) = (yyvsp[0].interm); if ((yyvsp[-1].interm.type).qualifier.precision != EpqNone) (yyval.interm).param.type->getQualifier().precision = (yyvsp[-1].interm.type).qualifier.precision; parseContext.precisionQualifierCheck((yyval.interm).loc, (yyval.interm).param.type->getBasicType(), (yyval.interm).param.type->getQualifier(), (yyval.interm).param.type->isCoopMatOrVec()); parseContext.checkNoShaderLayouts((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type).shaderQualifiers); parseContext.parameterTypeCheck((yyvsp[0].interm).loc, (yyvsp[-1].interm.type).qualifier.storage, *(yyval.interm).param.type); parseContext.paramCheckFix((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type).qualifier, *(yyval.interm).param.type); } #line 6567 "MachineIndependent/glslang_tab.cpp" break; case 121: /* parameter_declaration: parameter_declarator */ #line 1119 "MachineIndependent/glslang.y" { (yyval.interm) = (yyvsp[0].interm); parseContext.parameterTypeCheck((yyvsp[0].interm).loc, EvqIn, *(yyvsp[0].interm).param.type); parseContext.paramCheckFixStorage((yyvsp[0].interm).loc, EvqTemporary, *(yyval.interm).param.type); parseContext.precisionQualifierCheck((yyval.interm).loc, (yyval.interm).param.type->getBasicType(), (yyval.interm).param.type->getQualifier(), (yyval.interm).param.type->isCoopMatOrVec()); } #line 6579 "MachineIndependent/glslang_tab.cpp" break; case 122: /* parameter_declaration: type_qualifier parameter_type_specifier */ #line 1129 "MachineIndependent/glslang.y" { (yyval.interm) = (yyvsp[0].interm); if ((yyvsp[-1].interm.type).qualifier.precision != EpqNone) (yyval.interm).param.type->getQualifier().precision = (yyvsp[-1].interm.type).qualifier.precision; parseContext.precisionQualifierCheck((yyvsp[-1].interm.type).loc, (yyval.interm).param.type->getBasicType(), (yyval.interm).param.type->getQualifier(), (yyval.interm).param.type->isCoopMatOrVec()); parseContext.checkNoShaderLayouts((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type).shaderQualifiers); parseContext.parameterTypeCheck((yyvsp[0].interm).loc, (yyvsp[-1].interm.type).qualifier.storage, *(yyval.interm).param.type); parseContext.paramCheckFix((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type).qualifier, *(yyval.interm).param.type); } #line 6594 "MachineIndependent/glslang_tab.cpp" break; case 123: /* parameter_declaration: parameter_type_specifier */ #line 1139 "MachineIndependent/glslang.y" { (yyval.interm) = (yyvsp[0].interm); parseContext.parameterTypeCheck((yyvsp[0].interm).loc, EvqIn, *(yyvsp[0].interm).param.type); parseContext.paramCheckFixStorage((yyvsp[0].interm).loc, EvqTemporary, *(yyval.interm).param.type); parseContext.precisionQualifierCheck((yyval.interm).loc, (yyval.interm).param.type->getBasicType(), (yyval.interm).param.type->getQualifier(), (yyval.interm).param.type->isCoopMatOrVec()); } #line 6606 "MachineIndependent/glslang_tab.cpp" break; case 124: /* parameter_type_specifier: type_specifier */ #line 1149 "MachineIndependent/glslang.y" { TParameter param = { 0, new TType((yyvsp[0].interm.type)), {} }; (yyval.interm).param = param; if ((yyvsp[0].interm.type).arraySizes) parseContext.arraySizeRequiredCheck((yyvsp[0].interm.type).loc, *(yyvsp[0].interm.type).arraySizes); } #line 6617 "MachineIndependent/glslang_tab.cpp" break; case 125: /* init_declarator_list: single_declaration */ #line 1158 "MachineIndependent/glslang.y" { (yyval.interm) = (yyvsp[0].interm); } #line 6625 "MachineIndependent/glslang_tab.cpp" break; case 126: /* init_declarator_list: init_declarator_list COMMA IDENTIFIER */ #line 1161 "MachineIndependent/glslang.y" { (yyval.interm) = (yyvsp[-2].interm); parseContext.declareVariable((yyvsp[0].lex).loc, *(yyvsp[0].lex).string, (yyvsp[-2].interm).type); } #line 6634 "MachineIndependent/glslang_tab.cpp" break; case 127: /* init_declarator_list: init_declarator_list COMMA IDENTIFIER array_specifier */ #line 1165 "MachineIndependent/glslang.y" { (yyval.interm) = (yyvsp[-3].interm); parseContext.declareVariable((yyvsp[-1].lex).loc, *(yyvsp[-1].lex).string, (yyvsp[-3].interm).type, (yyvsp[0].interm).arraySizes); } #line 6643 "MachineIndependent/glslang_tab.cpp" break; case 128: /* init_declarator_list: init_declarator_list COMMA IDENTIFIER array_specifier EQUAL initializer */ #line 1169 "MachineIndependent/glslang.y" { (yyval.interm).type = (yyvsp[-5].interm).type; TIntermNode* initNode = parseContext.declareVariable((yyvsp[-3].lex).loc, *(yyvsp[-3].lex).string, (yyvsp[-5].interm).type, (yyvsp[-2].interm).arraySizes, (yyvsp[0].interm.intermTypedNode)); (yyval.interm).intermNode = parseContext.intermediate.growAggregate((yyvsp[-5].interm).intermNode, initNode, (yyvsp[-1].lex).loc); } #line 6653 "MachineIndependent/glslang_tab.cpp" break; case 129: /* init_declarator_list: init_declarator_list COMMA IDENTIFIER EQUAL initializer */ #line 1174 "MachineIndependent/glslang.y" { (yyval.interm).type = (yyvsp[-4].interm).type; TIntermNode* initNode = parseContext.declareVariable((yyvsp[-2].lex).loc, *(yyvsp[-2].lex).string, (yyvsp[-4].interm).type, 0, (yyvsp[0].interm.intermTypedNode)); (yyval.interm).intermNode = parseContext.intermediate.growAggregate((yyvsp[-4].interm).intermNode, initNode, (yyvsp[-1].lex).loc); } #line 6663 "MachineIndependent/glslang_tab.cpp" break; case 130: /* single_declaration: fully_specified_type */ #line 1182 "MachineIndependent/glslang.y" { (yyval.interm).type = (yyvsp[0].interm.type); (yyval.interm).intermNode = 0; parseContext.declareTypeDefaults((yyval.interm).loc, (yyval.interm).type); } #line 6673 "MachineIndependent/glslang_tab.cpp" break; case 131: /* single_declaration: fully_specified_type IDENTIFIER */ #line 1187 "MachineIndependent/glslang.y" { (yyval.interm).type = (yyvsp[-1].interm.type); (yyval.interm).intermNode = 0; parseContext.declareVariable((yyvsp[0].lex).loc, *(yyvsp[0].lex).string, (yyvsp[-1].interm.type)); } #line 6683 "MachineIndependent/glslang_tab.cpp" break; case 132: /* single_declaration: fully_specified_type IDENTIFIER array_specifier */ #line 1192 "MachineIndependent/glslang.y" { (yyval.interm).type = (yyvsp[-2].interm.type); (yyval.interm).intermNode = 0; parseContext.declareVariable((yyvsp[-1].lex).loc, *(yyvsp[-1].lex).string, (yyvsp[-2].interm.type), (yyvsp[0].interm).arraySizes); } #line 6693 "MachineIndependent/glslang_tab.cpp" break; case 133: /* single_declaration: fully_specified_type IDENTIFIER array_specifier EQUAL initializer */ #line 1197 "MachineIndependent/glslang.y" { (yyval.interm).type = (yyvsp[-4].interm.type); TIntermNode* initNode = parseContext.declareVariable((yyvsp[-3].lex).loc, *(yyvsp[-3].lex).string, (yyvsp[-4].interm.type), (yyvsp[-2].interm).arraySizes, (yyvsp[0].interm.intermTypedNode)); (yyval.interm).intermNode = parseContext.intermediate.growAggregate(0, initNode, (yyvsp[-1].lex).loc); } #line 6703 "MachineIndependent/glslang_tab.cpp" break; case 134: /* single_declaration: fully_specified_type IDENTIFIER EQUAL initializer */ #line 1202 "MachineIndependent/glslang.y" { (yyval.interm).type = (yyvsp[-3].interm.type); TIntermNode* initNode = parseContext.declareVariable((yyvsp[-2].lex).loc, *(yyvsp[-2].lex).string, (yyvsp[-3].interm.type), 0, (yyvsp[0].interm.intermTypedNode)); (yyval.interm).intermNode = parseContext.intermediate.growAggregate(0, initNode, (yyvsp[-1].lex).loc); } #line 6713 "MachineIndependent/glslang_tab.cpp" break; case 135: /* fully_specified_type: type_specifier */ #line 1211 "MachineIndependent/glslang.y" { (yyval.interm.type) = (yyvsp[0].interm.type); parseContext.globalQualifierTypeCheck((yyvsp[0].interm.type).loc, (yyvsp[0].interm.type).qualifier, (yyval.interm.type)); if ((yyvsp[0].interm.type).arraySizes) { parseContext.profileRequires((yyvsp[0].interm.type).loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type"); parseContext.profileRequires((yyvsp[0].interm.type).loc, EEsProfile, 300, 0, "arrayed type"); } parseContext.precisionQualifierCheck((yyval.interm.type).loc, (yyval.interm.type).basicType, (yyval.interm.type).qualifier, (yyval.interm.type).isCoopmatOrvec()); } #line 6728 "MachineIndependent/glslang_tab.cpp" break; case 136: /* fully_specified_type: type_qualifier type_specifier */ #line 1221 "MachineIndependent/glslang.y" { parseContext.globalQualifierFixCheck((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type).qualifier, false, &(yyvsp[0].interm.type)); parseContext.globalQualifierTypeCheck((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type).qualifier, (yyvsp[0].interm.type)); if ((yyvsp[0].interm.type).arraySizes) { parseContext.profileRequires((yyvsp[0].interm.type).loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type"); parseContext.profileRequires((yyvsp[0].interm.type).loc, EEsProfile, 300, 0, "arrayed type"); } if ((yyvsp[0].interm.type).arraySizes && parseContext.arrayQualifierError((yyvsp[0].interm.type).loc, (yyvsp[-1].interm.type).qualifier)) (yyvsp[0].interm.type).arraySizes = nullptr; parseContext.checkNoShaderLayouts((yyvsp[0].interm.type).loc, (yyvsp[-1].interm.type).shaderQualifiers); (yyvsp[0].interm.type).shaderQualifiers.merge((yyvsp[-1].interm.type).shaderQualifiers); parseContext.mergeQualifiers((yyvsp[0].interm.type).loc, (yyvsp[0].interm.type).qualifier, (yyvsp[-1].interm.type).qualifier, true); parseContext.precisionQualifierCheck((yyvsp[0].interm.type).loc, (yyvsp[0].interm.type).basicType, (yyvsp[0].interm.type).qualifier, (yyvsp[0].interm.type).isCoopmatOrvec()); (yyval.interm.type) = (yyvsp[0].interm.type); if (! (yyval.interm.type).qualifier.isInterpolation() && ((parseContext.language == EShLangVertex && (yyval.interm.type).qualifier.storage == EvqVaryingOut) || (parseContext.language == EShLangFragment && (yyval.interm.type).qualifier.storage == EvqVaryingIn))) (yyval.interm.type).qualifier.smooth = true; } #line 6757 "MachineIndependent/glslang_tab.cpp" break; case 137: /* invariant_qualifier: INVARIANT */ #line 1248 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "invariant"); parseContext.profileRequires((yyval.interm.type).loc, ENoProfile, 120, 0, "invariant"); (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.invariant = true; } #line 6768 "MachineIndependent/glslang_tab.cpp" break; case 138: /* interpolation_qualifier: SMOOTH */ #line 1257 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "smooth"); parseContext.profileRequires((yyvsp[0].lex).loc, ENoProfile, 130, 0, "smooth"); parseContext.profileRequires((yyvsp[0].lex).loc, EEsProfile, 300, 0, "smooth"); (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.smooth = true; } #line 6780 "MachineIndependent/glslang_tab.cpp" break; case 139: /* interpolation_qualifier: FLAT */ #line 1264 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "flat"); parseContext.profileRequires((yyvsp[0].lex).loc, ENoProfile, 130, 0, "flat"); parseContext.profileRequires((yyvsp[0].lex).loc, EEsProfile, 300, 0, "flat"); (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.flat = true; } #line 6792 "MachineIndependent/glslang_tab.cpp" break; case 140: /* interpolation_qualifier: NOPERSPECTIVE */ #line 1271 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "noperspective"); parseContext.profileRequires((yyvsp[0].lex).loc, EEsProfile, 0, E_GL_NV_shader_noperspective_interpolation, "noperspective"); parseContext.profileRequires((yyvsp[0].lex).loc, ENoProfile, 130, 0, "noperspective"); (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.nopersp = true; } #line 6804 "MachineIndependent/glslang_tab.cpp" break; case 141: /* interpolation_qualifier: EXPLICITINTERPAMD */ #line 1278 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "__explicitInterpAMD"); parseContext.profileRequires((yyvsp[0].lex).loc, ECoreProfile, 450, E_GL_AMD_shader_explicit_vertex_parameter, "explicit interpolation"); parseContext.profileRequires((yyvsp[0].lex).loc, ECompatibilityProfile, 450, E_GL_AMD_shader_explicit_vertex_parameter, "explicit interpolation"); (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.explicitInterp = true; } #line 6816 "MachineIndependent/glslang_tab.cpp" break; case 142: /* interpolation_qualifier: PERVERTEXNV */ #line 1285 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "pervertexNV"); parseContext.profileRequires((yyvsp[0].lex).loc, ECoreProfile, 0, E_GL_NV_fragment_shader_barycentric, "fragment shader barycentric"); parseContext.profileRequires((yyvsp[0].lex).loc, ECompatibilityProfile, 0, E_GL_NV_fragment_shader_barycentric, "fragment shader barycentric"); parseContext.profileRequires((yyvsp[0].lex).loc, EEsProfile, 0, E_GL_NV_fragment_shader_barycentric, "fragment shader barycentric"); (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.pervertexNV = true; } #line 6829 "MachineIndependent/glslang_tab.cpp" break; case 143: /* interpolation_qualifier: PERVERTEXEXT */ #line 1293 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "pervertexEXT"); parseContext.profileRequires((yyvsp[0].lex).loc, ECoreProfile, 0, E_GL_EXT_fragment_shader_barycentric, "fragment shader barycentric"); parseContext.profileRequires((yyvsp[0].lex).loc, ECompatibilityProfile, 0, E_GL_EXT_fragment_shader_barycentric, "fragment shader barycentric"); parseContext.profileRequires((yyvsp[0].lex).loc, EEsProfile, 0, E_GL_EXT_fragment_shader_barycentric, "fragment shader barycentric"); (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.pervertexEXT = true; } #line 6842 "MachineIndependent/glslang_tab.cpp" break; case 144: /* interpolation_qualifier: PERPRIMITIVENV */ #line 1301 "MachineIndependent/glslang.y" { // No need for profile version or extension check. Shader stage already checks both. parseContext.globalCheck((yyvsp[0].lex).loc, "perprimitiveNV"); parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangFragmentMask | EShLangMeshMask), "perprimitiveNV"); // Fragment shader stage doesn't check for extension. So we explicitly add below extension check. if (parseContext.language == EShLangFragment) parseContext.requireExtensions((yyvsp[0].lex).loc, 1, &E_GL_NV_mesh_shader, "perprimitiveNV"); (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.perPrimitiveNV = true; } #line 6857 "MachineIndependent/glslang_tab.cpp" break; case 145: /* interpolation_qualifier: PERPRIMITIVEEXT */ #line 1311 "MachineIndependent/glslang.y" { // No need for profile version or extension check. Shader stage already checks both. parseContext.globalCheck((yyvsp[0].lex).loc, "perprimitiveEXT"); parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangFragmentMask | EShLangMeshMask), "perprimitiveEXT"); // Fragment shader stage doesn't check for extension. So we explicitly add below extension check. if (parseContext.language == EShLangFragment) parseContext.requireExtensions((yyvsp[0].lex).loc, 1, &E_GL_EXT_mesh_shader, "perprimitiveEXT"); (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.perPrimitiveNV = true; } #line 6872 "MachineIndependent/glslang_tab.cpp" break; case 146: /* interpolation_qualifier: PERVIEWNV */ #line 1321 "MachineIndependent/glslang.y" { // No need for profile version or extension check. Shader stage already checks both. parseContext.globalCheck((yyvsp[0].lex).loc, "perviewNV"); parseContext.requireStage((yyvsp[0].lex).loc, EShLangMesh, "perviewNV"); (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.perViewNV = true; } #line 6884 "MachineIndependent/glslang_tab.cpp" break; case 147: /* interpolation_qualifier: PERTASKNV */ #line 1328 "MachineIndependent/glslang.y" { // No need for profile version or extension check. Shader stage already checks both. parseContext.globalCheck((yyvsp[0].lex).loc, "taskNV"); parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangTaskMask | EShLangMeshMask), "taskNV"); (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.perTaskNV = true; } #line 6896 "MachineIndependent/glslang_tab.cpp" break; case 148: /* layout_qualifier: LAYOUT LEFT_PAREN layout_qualifier_id_list RIGHT_PAREN */ #line 1338 "MachineIndependent/glslang.y" { (yyval.interm.type) = (yyvsp[-1].interm.type); } #line 6904 "MachineIndependent/glslang_tab.cpp" break; case 149: /* layout_qualifier_id_list: layout_qualifier_id */ #line 1344 "MachineIndependent/glslang.y" { (yyval.interm.type) = (yyvsp[0].interm.type); } #line 6912 "MachineIndependent/glslang_tab.cpp" break; case 150: /* layout_qualifier_id_list: layout_qualifier_id_list COMMA layout_qualifier_id */ #line 1347 "MachineIndependent/glslang.y" { (yyval.interm.type) = (yyvsp[-2].interm.type); (yyval.interm.type).shaderQualifiers.merge((yyvsp[0].interm.type).shaderQualifiers); parseContext.mergeObjectLayoutQualifiers((yyval.interm.type).qualifier, (yyvsp[0].interm.type).qualifier, false); } #line 6922 "MachineIndependent/glslang_tab.cpp" break; case 151: /* layout_qualifier_id: IDENTIFIER */ #line 1354 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc); parseContext.setLayoutQualifier((yyvsp[0].lex).loc, (yyval.interm.type), *(yyvsp[0].lex).string); } #line 6931 "MachineIndependent/glslang_tab.cpp" break; case 152: /* layout_qualifier_id: IDENTIFIER EQUAL constant_expression */ #line 1358 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[-2].lex).loc); parseContext.setLayoutQualifier((yyvsp[-2].lex).loc, (yyval.interm.type), *(yyvsp[-2].lex).string, (yyvsp[0].interm.intermTypedNode)); } #line 6940 "MachineIndependent/glslang_tab.cpp" break; case 153: /* layout_qualifier_id: SHARED */ #line 1362 "MachineIndependent/glslang.y" { // because "shared" is both an identifier and a keyword (yyval.interm.type).init((yyvsp[0].lex).loc); TString strShared("shared"); parseContext.setLayoutQualifier((yyvsp[0].lex).loc, (yyval.interm.type), strShared); } #line 6950 "MachineIndependent/glslang_tab.cpp" break; case 154: /* precise_qualifier: PRECISE */ #line 1370 "MachineIndependent/glslang.y" { parseContext.profileRequires((yyval.interm.type).loc, ECoreProfile | ECompatibilityProfile, 400, E_GL_ARB_gpu_shader5, "precise"); parseContext.profileRequires((yyvsp[0].lex).loc, EEsProfile, 320, Num_AEP_gpu_shader5, AEP_gpu_shader5, "precise"); (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.noContraction = true; } #line 6961 "MachineIndependent/glslang_tab.cpp" break; case 155: /* type_qualifier: single_type_qualifier */ #line 1379 "MachineIndependent/glslang.y" { (yyval.interm.type) = (yyvsp[0].interm.type); } #line 6969 "MachineIndependent/glslang_tab.cpp" break; case 156: /* type_qualifier: type_qualifier single_type_qualifier */ #line 1382 "MachineIndependent/glslang.y" { (yyval.interm.type) = (yyvsp[-1].interm.type); if ((yyval.interm.type).basicType == EbtVoid) (yyval.interm.type).basicType = (yyvsp[0].interm.type).basicType; (yyval.interm.type).shaderQualifiers.merge((yyvsp[0].interm.type).shaderQualifiers); parseContext.mergeQualifiers((yyval.interm.type).loc, (yyval.interm.type).qualifier, (yyvsp[0].interm.type).qualifier, false); } #line 6982 "MachineIndependent/glslang_tab.cpp" break; case 157: /* single_type_qualifier: storage_qualifier */ #line 1393 "MachineIndependent/glslang.y" { (yyval.interm.type) = (yyvsp[0].interm.type); } #line 6990 "MachineIndependent/glslang_tab.cpp" break; case 158: /* single_type_qualifier: layout_qualifier */ #line 1396 "MachineIndependent/glslang.y" { (yyval.interm.type) = (yyvsp[0].interm.type); } #line 6998 "MachineIndependent/glslang_tab.cpp" break; case 159: /* single_type_qualifier: precision_qualifier */ #line 1399 "MachineIndependent/glslang.y" { parseContext.checkPrecisionQualifier((yyvsp[0].interm.type).loc, (yyvsp[0].interm.type).qualifier.precision); (yyval.interm.type) = (yyvsp[0].interm.type); } #line 7007 "MachineIndependent/glslang_tab.cpp" break; case 160: /* single_type_qualifier: interpolation_qualifier */ #line 1403 "MachineIndependent/glslang.y" { // allow inheritance of storage qualifier from block declaration (yyval.interm.type) = (yyvsp[0].interm.type); } #line 7016 "MachineIndependent/glslang_tab.cpp" break; case 161: /* single_type_qualifier: invariant_qualifier */ #line 1407 "MachineIndependent/glslang.y" { // allow inheritance of storage qualifier from block declaration (yyval.interm.type) = (yyvsp[0].interm.type); } #line 7025 "MachineIndependent/glslang_tab.cpp" break; case 162: /* single_type_qualifier: precise_qualifier */ #line 1411 "MachineIndependent/glslang.y" { // allow inheritance of storage qualifier from block declaration (yyval.interm.type) = (yyvsp[0].interm.type); } #line 7034 "MachineIndependent/glslang_tab.cpp" break; case 163: /* single_type_qualifier: non_uniform_qualifier */ #line 1415 "MachineIndependent/glslang.y" { (yyval.interm.type) = (yyvsp[0].interm.type); } #line 7042 "MachineIndependent/glslang_tab.cpp" break; case 164: /* single_type_qualifier: spirv_storage_class_qualifier */ #line 1418 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].interm.type).loc, "spirv_storage_class"); parseContext.requireExtensions((yyvsp[0].interm.type).loc, 1, &E_GL_EXT_spirv_intrinsics, "SPIR-V storage class qualifier"); (yyval.interm.type) = (yyvsp[0].interm.type); } #line 7052 "MachineIndependent/glslang_tab.cpp" break; case 165: /* single_type_qualifier: spirv_decorate_qualifier */ #line 1423 "MachineIndependent/glslang.y" { parseContext.requireExtensions((yyvsp[0].interm.type).loc, 1, &E_GL_EXT_spirv_intrinsics, "SPIR-V decorate qualifier"); (yyval.interm.type) = (yyvsp[0].interm.type); } #line 7061 "MachineIndependent/glslang_tab.cpp" break; case 166: /* single_type_qualifier: SPIRV_BY_REFERENCE */ #line 1427 "MachineIndependent/glslang.y" { parseContext.requireExtensions((yyvsp[0].lex).loc, 1, &E_GL_EXT_spirv_intrinsics, "spirv_by_reference"); (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.setSpirvByReference(); } #line 7071 "MachineIndependent/glslang_tab.cpp" break; case 167: /* single_type_qualifier: SPIRV_LITERAL */ #line 1432 "MachineIndependent/glslang.y" { parseContext.requireExtensions((yyvsp[0].lex).loc, 1, &E_GL_EXT_spirv_intrinsics, "spirv_by_literal"); (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.setSpirvLiteral(); } #line 7081 "MachineIndependent/glslang_tab.cpp" break; case 168: /* storage_qualifier: CONST */ #line 1440 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqConst; // will later turn into EvqConstReadOnly, if the initializer is not constant } #line 7090 "MachineIndependent/glslang_tab.cpp" break; case 169: /* storage_qualifier: INOUT */ #line 1444 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "inout"); (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqInOut; } #line 7100 "MachineIndependent/glslang_tab.cpp" break; case 170: /* storage_qualifier: IN */ #line 1449 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "in"); (yyval.interm.type).init((yyvsp[0].lex).loc); // whether this is a parameter "in" or a pipeline "in" will get sorted out a bit later (yyval.interm.type).qualifier.storage = EvqIn; } #line 7111 "MachineIndependent/glslang_tab.cpp" break; case 171: /* storage_qualifier: OUT */ #line 1455 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "out"); (yyval.interm.type).init((yyvsp[0].lex).loc); // whether this is a parameter "out" or a pipeline "out" will get sorted out a bit later (yyval.interm.type).qualifier.storage = EvqOut; } #line 7122 "MachineIndependent/glslang_tab.cpp" break; case 172: /* storage_qualifier: CENTROID */ #line 1461 "MachineIndependent/glslang.y" { parseContext.profileRequires((yyvsp[0].lex).loc, ENoProfile, 120, 0, "centroid"); parseContext.profileRequires((yyvsp[0].lex).loc, EEsProfile, 300, 0, "centroid"); parseContext.globalCheck((yyvsp[0].lex).loc, "centroid"); (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.centroid = true; } #line 7134 "MachineIndependent/glslang_tab.cpp" break; case 173: /* storage_qualifier: UNIFORM */ #line 1468 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "uniform"); (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqUniform; } #line 7144 "MachineIndependent/glslang_tab.cpp" break; case 174: /* storage_qualifier: TILEIMAGEEXT */ #line 1473 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "tileImageEXT"); (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqTileImageEXT; } #line 7154 "MachineIndependent/glslang_tab.cpp" break; case 175: /* storage_qualifier: SHARED */ #line 1478 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "shared"); parseContext.profileRequires((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, 430, E_GL_ARB_compute_shader, "shared"); parseContext.profileRequires((yyvsp[0].lex).loc, EEsProfile, 310, 0, "shared"); parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangComputeMask | EShLangMeshMask | EShLangTaskMask), "shared"); (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqShared; } #line 7167 "MachineIndependent/glslang_tab.cpp" break; case 176: /* storage_qualifier: BUFFER */ #line 1486 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "buffer"); (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqBuffer; } #line 7177 "MachineIndependent/glslang_tab.cpp" break; case 177: /* storage_qualifier: ATTRIBUTE */ #line 1491 "MachineIndependent/glslang.y" { parseContext.requireStage((yyvsp[0].lex).loc, EShLangVertex, "attribute"); parseContext.checkDeprecated((yyvsp[0].lex).loc, ECoreProfile, 130, "attribute"); parseContext.checkDeprecated((yyvsp[0].lex).loc, ENoProfile, 130, "attribute"); parseContext.requireNotRemoved((yyvsp[0].lex).loc, ECoreProfile, 420, "attribute"); parseContext.requireNotRemoved((yyvsp[0].lex).loc, EEsProfile, 300, "attribute"); parseContext.globalCheck((yyvsp[0].lex).loc, "attribute"); (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqVaryingIn; } #line 7194 "MachineIndependent/glslang_tab.cpp" break; case 178: /* storage_qualifier: VARYING */ #line 1503 "MachineIndependent/glslang.y" { parseContext.checkDeprecated((yyvsp[0].lex).loc, ENoProfile, 130, "varying"); parseContext.checkDeprecated((yyvsp[0].lex).loc, ECoreProfile, 130, "varying"); parseContext.requireNotRemoved((yyvsp[0].lex).loc, ECoreProfile, 420, "varying"); parseContext.requireNotRemoved((yyvsp[0].lex).loc, EEsProfile, 300, "varying"); parseContext.globalCheck((yyvsp[0].lex).loc, "varying"); (yyval.interm.type).init((yyvsp[0].lex).loc); if (parseContext.language == EShLangVertex) (yyval.interm.type).qualifier.storage = EvqVaryingOut; else (yyval.interm.type).qualifier.storage = EvqVaryingIn; } #line 7213 "MachineIndependent/glslang_tab.cpp" break; case 179: /* storage_qualifier: PATCH */ #line 1517 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "patch"); parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangTessControlMask | EShLangTessEvaluationMask), "patch"); (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.patch = true; } #line 7224 "MachineIndependent/glslang_tab.cpp" break; case 180: /* storage_qualifier: SAMPLE */ #line 1523 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "sample"); (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.sample = true; } #line 7234 "MachineIndependent/glslang_tab.cpp" break; case 181: /* storage_qualifier: HITATTRNV */ #line 1528 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "hitAttributeNV"); parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangIntersectMask | EShLangClosestHitMask | EShLangAnyHitMask), "hitAttributeNV"); parseContext.profileRequires((yyvsp[0].lex).loc, ECoreProfile, 460, E_GL_NV_ray_tracing, "hitAttributeNV"); (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqHitAttr; } #line 7247 "MachineIndependent/glslang_tab.cpp" break; case 182: /* storage_qualifier: HITOBJECTATTRNV */ #line 1536 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "hitAttributeNV"); parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangRayGenMask | EShLangClosestHitMask | EShLangMissMask), "hitObjectAttributeNV"); parseContext.profileRequires((yyvsp[0].lex).loc, ECoreProfile, 460, E_GL_NV_shader_invocation_reorder, "hitObjectAttributeNV"); (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqHitObjectAttrNV; } #line 7260 "MachineIndependent/glslang_tab.cpp" break; case 183: /* storage_qualifier: HITATTREXT */ #line 1544 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "hitAttributeEXT"); parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangIntersectMask | EShLangClosestHitMask | EShLangAnyHitMask), "hitAttributeEXT"); parseContext.profileRequires((yyvsp[0].lex).loc, ECoreProfile, 460, E_GL_EXT_ray_tracing, "hitAttributeNV"); (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqHitAttr; } #line 7273 "MachineIndependent/glslang_tab.cpp" break; case 184: /* storage_qualifier: PAYLOADNV */ #line 1552 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "rayPayloadNV"); parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangRayGenMask | EShLangClosestHitMask | EShLangAnyHitMask | EShLangMissMask), "rayPayloadNV"); parseContext.profileRequires((yyvsp[0].lex).loc, ECoreProfile, 460, E_GL_NV_ray_tracing, "rayPayloadNV"); (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqPayload; } #line 7286 "MachineIndependent/glslang_tab.cpp" break; case 185: /* storage_qualifier: PAYLOADEXT */ #line 1560 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "rayPayloadEXT"); parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangRayGenMask | EShLangClosestHitMask | EShLangAnyHitMask | EShLangMissMask), "rayPayloadEXT"); parseContext.profileRequires((yyvsp[0].lex).loc, ECoreProfile, 460, E_GL_EXT_ray_tracing, "rayPayloadEXT"); (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqPayload; } #line 7299 "MachineIndependent/glslang_tab.cpp" break; case 186: /* storage_qualifier: PAYLOADINNV */ #line 1568 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "rayPayloadInNV"); parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangClosestHitMask | EShLangAnyHitMask | EShLangMissMask), "rayPayloadInNV"); parseContext.profileRequires((yyvsp[0].lex).loc, ECoreProfile, 460, E_GL_NV_ray_tracing, "rayPayloadInNV"); (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqPayloadIn; } #line 7312 "MachineIndependent/glslang_tab.cpp" break; case 187: /* storage_qualifier: PAYLOADINEXT */ #line 1576 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "rayPayloadInEXT"); parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangClosestHitMask | EShLangAnyHitMask | EShLangMissMask), "rayPayloadInEXT"); parseContext.profileRequires((yyvsp[0].lex).loc, ECoreProfile, 460, E_GL_EXT_ray_tracing, "rayPayloadInEXT"); (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqPayloadIn; } #line 7325 "MachineIndependent/glslang_tab.cpp" break; case 188: /* storage_qualifier: CALLDATANV */ #line 1584 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "callableDataNV"); parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangRayGenMask | EShLangClosestHitMask | EShLangMissMask | EShLangCallableMask), "callableDataNV"); parseContext.profileRequires((yyvsp[0].lex).loc, ECoreProfile, 460, E_GL_NV_ray_tracing, "callableDataNV"); (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqCallableData; } #line 7338 "MachineIndependent/glslang_tab.cpp" break; case 189: /* storage_qualifier: CALLDATAEXT */ #line 1592 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "callableDataEXT"); parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangRayGenMask | EShLangClosestHitMask | EShLangMissMask | EShLangCallableMask), "callableDataEXT"); parseContext.profileRequires((yyvsp[0].lex).loc, ECoreProfile, 460, E_GL_EXT_ray_tracing, "callableDataEXT"); (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqCallableData; } #line 7351 "MachineIndependent/glslang_tab.cpp" break; case 190: /* storage_qualifier: CALLDATAINNV */ #line 1600 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "callableDataInNV"); parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangCallableMask), "callableDataInNV"); parseContext.profileRequires((yyvsp[0].lex).loc, ECoreProfile, 460, E_GL_NV_ray_tracing, "callableDataInNV"); (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqCallableDataIn; } #line 7363 "MachineIndependent/glslang_tab.cpp" break; case 191: /* storage_qualifier: CALLDATAINEXT */ #line 1607 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "callableDataInEXT"); parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangCallableMask), "callableDataInEXT"); parseContext.profileRequires((yyvsp[0].lex).loc, ECoreProfile, 460, E_GL_EXT_ray_tracing, "callableDataInEXT"); (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqCallableDataIn; } #line 7375 "MachineIndependent/glslang_tab.cpp" break; case 192: /* storage_qualifier: COHERENT */ #line 1614 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.coherent = true; } #line 7384 "MachineIndependent/glslang_tab.cpp" break; case 193: /* storage_qualifier: DEVICECOHERENT */ #line 1618 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc); parseContext.requireExtensions((yyvsp[0].lex).loc, 1, &E_GL_KHR_memory_scope_semantics, "devicecoherent"); (yyval.interm.type).qualifier.devicecoherent = true; } #line 7394 "MachineIndependent/glslang_tab.cpp" break; case 194: /* storage_qualifier: QUEUEFAMILYCOHERENT */ #line 1623 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc); parseContext.requireExtensions((yyvsp[0].lex).loc, 1, &E_GL_KHR_memory_scope_semantics, "queuefamilycoherent"); (yyval.interm.type).qualifier.queuefamilycoherent = true; } #line 7404 "MachineIndependent/glslang_tab.cpp" break; case 195: /* storage_qualifier: WORKGROUPCOHERENT */ #line 1628 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc); parseContext.requireExtensions((yyvsp[0].lex).loc, 1, &E_GL_KHR_memory_scope_semantics, "workgroupcoherent"); (yyval.interm.type).qualifier.workgroupcoherent = true; } #line 7414 "MachineIndependent/glslang_tab.cpp" break; case 196: /* storage_qualifier: SUBGROUPCOHERENT */ #line 1633 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc); parseContext.requireExtensions((yyvsp[0].lex).loc, 1, &E_GL_KHR_memory_scope_semantics, "subgroupcoherent"); (yyval.interm.type).qualifier.subgroupcoherent = true; } #line 7424 "MachineIndependent/glslang_tab.cpp" break; case 197: /* storage_qualifier: NONPRIVATE */ #line 1638 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc); parseContext.requireExtensions((yyvsp[0].lex).loc, 1, &E_GL_KHR_memory_scope_semantics, "nonprivate"); (yyval.interm.type).qualifier.nonprivate = true; } #line 7434 "MachineIndependent/glslang_tab.cpp" break; case 198: /* storage_qualifier: SHADERCALLCOHERENT */ #line 1643 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc); parseContext.requireExtensions((yyvsp[0].lex).loc, 1, &E_GL_EXT_ray_tracing, "shadercallcoherent"); (yyval.interm.type).qualifier.shadercallcoherent = true; } #line 7444 "MachineIndependent/glslang_tab.cpp" break; case 199: /* storage_qualifier: VOLATILE */ #line 1648 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.volatil = true; } #line 7453 "MachineIndependent/glslang_tab.cpp" break; case 200: /* storage_qualifier: RESTRICT */ #line 1652 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.restrict = true; } #line 7462 "MachineIndependent/glslang_tab.cpp" break; case 201: /* storage_qualifier: READONLY */ #line 1656 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.readonly = true; } #line 7471 "MachineIndependent/glslang_tab.cpp" break; case 202: /* storage_qualifier: WRITEONLY */ #line 1660 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.writeonly = true; } #line 7480 "MachineIndependent/glslang_tab.cpp" break; case 203: /* storage_qualifier: NONTEMPORAL */ #line 1664 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.nontemporal = true; } #line 7489 "MachineIndependent/glslang_tab.cpp" break; case 204: /* storage_qualifier: SUBROUTINE */ #line 1668 "MachineIndependent/glslang.y" { parseContext.spvRemoved((yyvsp[0].lex).loc, "subroutine"); parseContext.globalCheck((yyvsp[0].lex).loc, "subroutine"); parseContext.unimplemented((yyvsp[0].lex).loc, "subroutine"); (yyval.interm.type).init((yyvsp[0].lex).loc); } #line 7500 "MachineIndependent/glslang_tab.cpp" break; case 205: /* storage_qualifier: SUBROUTINE LEFT_PAREN type_name_list RIGHT_PAREN */ #line 1674 "MachineIndependent/glslang.y" { parseContext.spvRemoved((yyvsp[-3].lex).loc, "subroutine"); parseContext.globalCheck((yyvsp[-3].lex).loc, "subroutine"); parseContext.unimplemented((yyvsp[-3].lex).loc, "subroutine"); (yyval.interm.type).init((yyvsp[-3].lex).loc); } #line 7511 "MachineIndependent/glslang_tab.cpp" break; case 206: /* storage_qualifier: TASKPAYLOADWORKGROUPEXT */ #line 1680 "MachineIndependent/glslang.y" { // No need for profile version or extension check. Shader stage already checks both. parseContext.globalCheck((yyvsp[0].lex).loc, "taskPayloadSharedEXT"); parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangTaskMask | EShLangMeshMask), "taskPayloadSharedEXT "); (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqtaskPayloadSharedEXT; } #line 7523 "MachineIndependent/glslang_tab.cpp" break; case 207: /* non_uniform_qualifier: NONUNIFORM */ #line 1690 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.nonUniform = true; } #line 7532 "MachineIndependent/glslang_tab.cpp" break; case 208: /* type_name_list: IDENTIFIER */ #line 1697 "MachineIndependent/glslang.y" { // TODO } #line 7540 "MachineIndependent/glslang_tab.cpp" break; case 209: /* type_name_list: type_name_list COMMA IDENTIFIER */ #line 1700 "MachineIndependent/glslang.y" { // TODO: 4.0 semantics: subroutines // 1) make sure each identifier is a type declared earlier with SUBROUTINE // 2) save all of the identifiers for future comparison with the declared function } #line 7550 "MachineIndependent/glslang_tab.cpp" break; case 210: /* type_specifier: type_specifier_nonarray type_parameter_specifier_opt */ #line 1708 "MachineIndependent/glslang.y" { (yyval.interm.type) = (yyvsp[-1].interm.type); (yyval.interm.type).qualifier.precision = parseContext.getDefaultPrecision((yyval.interm.type)); (yyval.interm.type).typeParameters = (yyvsp[0].interm.typeParameters); parseContext.typeParametersCheck((yyvsp[-1].interm.type).loc, (yyval.interm.type)); } #line 7562 "MachineIndependent/glslang_tab.cpp" break; case 211: /* type_specifier: type_specifier_nonarray type_parameter_specifier_opt array_specifier */ #line 1715 "MachineIndependent/glslang.y" { parseContext.arrayOfArrayVersionCheck((yyvsp[0].interm).loc, (yyvsp[0].interm).arraySizes); (yyval.interm.type) = (yyvsp[-2].interm.type); (yyval.interm.type).qualifier.precision = parseContext.getDefaultPrecision((yyval.interm.type)); (yyval.interm.type).typeParameters = (yyvsp[-1].interm.typeParameters); (yyval.interm.type).arraySizes = (yyvsp[0].interm).arraySizes; parseContext.typeParametersCheck((yyvsp[-2].interm.type).loc, (yyval.interm.type)); } #line 7575 "MachineIndependent/glslang_tab.cpp" break; case 212: /* array_specifier: LEFT_BRACKET RIGHT_BRACKET */ #line 1726 "MachineIndependent/glslang.y" { (yyval.interm).loc = (yyvsp[-1].lex).loc; (yyval.interm).arraySizes = new TArraySizes; (yyval.interm).arraySizes->addInnerSize(); } #line 7585 "MachineIndependent/glslang_tab.cpp" break; case 213: /* array_specifier: LEFT_BRACKET conditional_expression RIGHT_BRACKET */ #line 1731 "MachineIndependent/glslang.y" { (yyval.interm).loc = (yyvsp[-2].lex).loc; (yyval.interm).arraySizes = new TArraySizes; TArraySize size; parseContext.arraySizeCheck((yyvsp[-1].interm.intermTypedNode)->getLoc(), (yyvsp[-1].interm.intermTypedNode), size, "array size"); (yyval.interm).arraySizes->addInnerSize(size); } #line 7598 "MachineIndependent/glslang_tab.cpp" break; case 214: /* array_specifier: array_specifier LEFT_BRACKET RIGHT_BRACKET */ #line 1739 "MachineIndependent/glslang.y" { (yyval.interm) = (yyvsp[-2].interm); (yyval.interm).arraySizes->addInnerSize(); } #line 7607 "MachineIndependent/glslang_tab.cpp" break; case 215: /* array_specifier: array_specifier LEFT_BRACKET conditional_expression RIGHT_BRACKET */ #line 1743 "MachineIndependent/glslang.y" { (yyval.interm) = (yyvsp[-3].interm); TArraySize size; parseContext.arraySizeCheck((yyvsp[-1].interm.intermTypedNode)->getLoc(), (yyvsp[-1].interm.intermTypedNode), size, "array size"); (yyval.interm).arraySizes->addInnerSize(size); } #line 7619 "MachineIndependent/glslang_tab.cpp" break; case 216: /* type_parameter_specifier_opt: type_parameter_specifier */ #line 1753 "MachineIndependent/glslang.y" { (yyval.interm.typeParameters) = (yyvsp[0].interm.typeParameters); } #line 7627 "MachineIndependent/glslang_tab.cpp" break; case 217: /* type_parameter_specifier_opt: %empty */ #line 1756 "MachineIndependent/glslang.y" { (yyval.interm.typeParameters) = 0; } #line 7635 "MachineIndependent/glslang_tab.cpp" break; case 218: /* type_parameter_specifier: LEFT_ANGLE type_parameter_specifier_list RIGHT_ANGLE */ #line 1762 "MachineIndependent/glslang.y" { (yyval.interm.typeParameters) = (yyvsp[-1].interm.typeParameters); } #line 7643 "MachineIndependent/glslang_tab.cpp" break; case 219: /* type_parameter_specifier_list: type_specifier */ #line 1768 "MachineIndependent/glslang.y" { (yyval.interm.typeParameters) = new TTypeParameters; (yyval.interm.typeParameters)->arraySizes = new TArraySizes; (yyval.interm.typeParameters)->spirvType = (yyvsp[0].interm.type).spirvType; (yyval.interm.typeParameters)->basicType = (yyvsp[0].interm.type).basicType; } #line 7654 "MachineIndependent/glslang_tab.cpp" break; case 220: /* type_parameter_specifier_list: unary_expression */ #line 1774 "MachineIndependent/glslang.y" { (yyval.interm.typeParameters) = new TTypeParameters; (yyval.interm.typeParameters)->arraySizes = new TArraySizes; TArraySize size; parseContext.arraySizeCheck((yyvsp[0].interm.intermTypedNode)->getLoc(), (yyvsp[0].interm.intermTypedNode), size, "type parameter", true); (yyval.interm.typeParameters)->arraySizes->addInnerSize(size); } #line 7667 "MachineIndependent/glslang_tab.cpp" break; case 221: /* type_parameter_specifier_list: type_parameter_specifier_list COMMA unary_expression */ #line 1782 "MachineIndependent/glslang.y" { (yyval.interm.typeParameters) = (yyvsp[-2].interm.typeParameters); TArraySize size; parseContext.arraySizeCheck((yyvsp[0].interm.intermTypedNode)->getLoc(), (yyvsp[0].interm.intermTypedNode), size, "type parameter", true); (yyval.interm.typeParameters)->arraySizes->addInnerSize(size); } #line 7679 "MachineIndependent/glslang_tab.cpp" break; case 222: /* type_specifier_nonarray: VOID */ #line 1792 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtVoid; } #line 7688 "MachineIndependent/glslang_tab.cpp" break; case 223: /* type_specifier_nonarray: FLOAT */ #line 1796 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; } #line 7697 "MachineIndependent/glslang_tab.cpp" break; case 224: /* type_specifier_nonarray: INT */ #line 1800 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtInt; } #line 7706 "MachineIndependent/glslang_tab.cpp" break; case 225: /* type_specifier_nonarray: UINT */ #line 1804 "MachineIndependent/glslang.y" { parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "unsigned integer"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtUint; } #line 7716 "MachineIndependent/glslang_tab.cpp" break; case 226: /* type_specifier_nonarray: BOOL */ #line 1809 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtBool; } #line 7725 "MachineIndependent/glslang_tab.cpp" break; case 227: /* type_specifier_nonarray: VEC2 */ #line 1813 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setVector(2); } #line 7735 "MachineIndependent/glslang_tab.cpp" break; case 228: /* type_specifier_nonarray: VEC3 */ #line 1818 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setVector(3); } #line 7745 "MachineIndependent/glslang_tab.cpp" break; case 229: /* type_specifier_nonarray: VEC4 */ #line 1823 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setVector(4); } #line 7755 "MachineIndependent/glslang_tab.cpp" break; case 230: /* type_specifier_nonarray: BVEC2 */ #line 1828 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtBool; (yyval.interm.type).setVector(2); } #line 7765 "MachineIndependent/glslang_tab.cpp" break; case 231: /* type_specifier_nonarray: BVEC3 */ #line 1833 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtBool; (yyval.interm.type).setVector(3); } #line 7775 "MachineIndependent/glslang_tab.cpp" break; case 232: /* type_specifier_nonarray: BVEC4 */ #line 1838 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtBool; (yyval.interm.type).setVector(4); } #line 7785 "MachineIndependent/glslang_tab.cpp" break; case 233: /* type_specifier_nonarray: IVEC2 */ #line 1843 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtInt; (yyval.interm.type).setVector(2); } #line 7795 "MachineIndependent/glslang_tab.cpp" break; case 234: /* type_specifier_nonarray: IVEC3 */ #line 1848 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtInt; (yyval.interm.type).setVector(3); } #line 7805 "MachineIndependent/glslang_tab.cpp" break; case 235: /* type_specifier_nonarray: IVEC4 */ #line 1853 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtInt; (yyval.interm.type).setVector(4); } #line 7815 "MachineIndependent/glslang_tab.cpp" break; case 236: /* type_specifier_nonarray: UVEC2 */ #line 1858 "MachineIndependent/glslang.y" { parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "unsigned integer vector"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtUint; (yyval.interm.type).setVector(2); } #line 7826 "MachineIndependent/glslang_tab.cpp" break; case 237: /* type_specifier_nonarray: UVEC3 */ #line 1864 "MachineIndependent/glslang.y" { parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "unsigned integer vector"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtUint; (yyval.interm.type).setVector(3); } #line 7837 "MachineIndependent/glslang_tab.cpp" break; case 238: /* type_specifier_nonarray: UVEC4 */ #line 1870 "MachineIndependent/glslang.y" { parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "unsigned integer vector"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtUint; (yyval.interm.type).setVector(4); } #line 7848 "MachineIndependent/glslang_tab.cpp" break; case 239: /* type_specifier_nonarray: MAT2 */ #line 1876 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setMatrix(2, 2); } #line 7858 "MachineIndependent/glslang_tab.cpp" break; case 240: /* type_specifier_nonarray: MAT3 */ #line 1881 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setMatrix(3, 3); } #line 7868 "MachineIndependent/glslang_tab.cpp" break; case 241: /* type_specifier_nonarray: MAT4 */ #line 1886 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setMatrix(4, 4); } #line 7878 "MachineIndependent/glslang_tab.cpp" break; case 242: /* type_specifier_nonarray: MAT2X2 */ #line 1891 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setMatrix(2, 2); } #line 7888 "MachineIndependent/glslang_tab.cpp" break; case 243: /* type_specifier_nonarray: MAT2X3 */ #line 1896 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setMatrix(2, 3); } #line 7898 "MachineIndependent/glslang_tab.cpp" break; case 244: /* type_specifier_nonarray: MAT2X4 */ #line 1901 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setMatrix(2, 4); } #line 7908 "MachineIndependent/glslang_tab.cpp" break; case 245: /* type_specifier_nonarray: MAT3X2 */ #line 1906 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setMatrix(3, 2); } #line 7918 "MachineIndependent/glslang_tab.cpp" break; case 246: /* type_specifier_nonarray: MAT3X3 */ #line 1911 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setMatrix(3, 3); } #line 7928 "MachineIndependent/glslang_tab.cpp" break; case 247: /* type_specifier_nonarray: MAT3X4 */ #line 1916 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setMatrix(3, 4); } #line 7938 "MachineIndependent/glslang_tab.cpp" break; case 248: /* type_specifier_nonarray: MAT4X2 */ #line 1921 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setMatrix(4, 2); } #line 7948 "MachineIndependent/glslang_tab.cpp" break; case 249: /* type_specifier_nonarray: MAT4X3 */ #line 1926 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setMatrix(4, 3); } #line 7958 "MachineIndependent/glslang_tab.cpp" break; case 250: /* type_specifier_nonarray: MAT4X4 */ #line 1931 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setMatrix(4, 4); } #line 7968 "MachineIndependent/glslang_tab.cpp" break; case 251: /* type_specifier_nonarray: DOUBLE */ #line 1936 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double"); if (! parseContext.symbolTable.atBuiltInLevel()) parseContext.doubleCheck((yyvsp[0].lex).loc, "double"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtDouble; } #line 7980 "MachineIndependent/glslang_tab.cpp" break; case 252: /* type_specifier_nonarray: BFLOAT16_T */ #line 1943 "MachineIndependent/glslang.y" { parseContext.bfloat16ScalarVectorCheck((yyvsp[0].lex).loc, "bfloat16_t", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtBFloat16; } #line 7990 "MachineIndependent/glslang_tab.cpp" break; case 253: /* type_specifier_nonarray: FLOATE5M2_T */ #line 1948 "MachineIndependent/glslang.y" { parseContext.floate5m2ScalarVectorCheck((yyvsp[0].lex).loc, "floate5m2_t", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloatE5M2; } #line 8000 "MachineIndependent/glslang_tab.cpp" break; case 254: /* type_specifier_nonarray: FLOATE4M3_T */ #line 1953 "MachineIndependent/glslang.y" { parseContext.floate4m3ScalarVectorCheck((yyvsp[0].lex).loc, "floate4m3_t", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloatE4M3; } #line 8010 "MachineIndependent/glslang_tab.cpp" break; case 255: /* type_specifier_nonarray: FLOAT16_T */ #line 1958 "MachineIndependent/glslang.y" { parseContext.float16ScalarVectorCheck((yyvsp[0].lex).loc, "float16_t", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat16; } #line 8020 "MachineIndependent/glslang_tab.cpp" break; case 256: /* type_specifier_nonarray: FLOAT32_T */ #line 1963 "MachineIndependent/glslang.y" { parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; } #line 8030 "MachineIndependent/glslang_tab.cpp" break; case 257: /* type_specifier_nonarray: FLOAT64_T */ #line 1968 "MachineIndependent/glslang.y" { parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtDouble; } #line 8040 "MachineIndependent/glslang_tab.cpp" break; case 258: /* type_specifier_nonarray: INT8_T */ #line 1973 "MachineIndependent/glslang.y" { parseContext.int8ScalarVectorCheck((yyvsp[0].lex).loc, "8-bit signed integer", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtInt8; } #line 8050 "MachineIndependent/glslang_tab.cpp" break; case 259: /* type_specifier_nonarray: UINT8_T */ #line 1978 "MachineIndependent/glslang.y" { parseContext.int8ScalarVectorCheck((yyvsp[0].lex).loc, "8-bit unsigned integer", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtUint8; } #line 8060 "MachineIndependent/glslang_tab.cpp" break; case 260: /* type_specifier_nonarray: INT16_T */ #line 1983 "MachineIndependent/glslang.y" { parseContext.int16ScalarVectorCheck((yyvsp[0].lex).loc, "16-bit signed integer", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtInt16; } #line 8070 "MachineIndependent/glslang_tab.cpp" break; case 261: /* type_specifier_nonarray: UINT16_T */ #line 1988 "MachineIndependent/glslang.y" { parseContext.int16ScalarVectorCheck((yyvsp[0].lex).loc, "16-bit unsigned integer", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtUint16; } #line 8080 "MachineIndependent/glslang_tab.cpp" break; case 262: /* type_specifier_nonarray: INT32_T */ #line 1993 "MachineIndependent/glslang.y" { parseContext.explicitInt32Check((yyvsp[0].lex).loc, "32-bit signed integer", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtInt; } #line 8090 "MachineIndependent/glslang_tab.cpp" break; case 263: /* type_specifier_nonarray: UINT32_T */ #line 1998 "MachineIndependent/glslang.y" { parseContext.explicitInt32Check((yyvsp[0].lex).loc, "32-bit unsigned integer", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtUint; } #line 8100 "MachineIndependent/glslang_tab.cpp" break; case 264: /* type_specifier_nonarray: INT64_T */ #line 2003 "MachineIndependent/glslang.y" { parseContext.int64Check((yyvsp[0].lex).loc, "64-bit integer", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtInt64; } #line 8110 "MachineIndependent/glslang_tab.cpp" break; case 265: /* type_specifier_nonarray: UINT64_T */ #line 2008 "MachineIndependent/glslang.y" { parseContext.int64Check((yyvsp[0].lex).loc, "64-bit unsigned integer", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtUint64; } #line 8120 "MachineIndependent/glslang_tab.cpp" break; case 266: /* type_specifier_nonarray: DVEC2 */ #line 2013 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double vector"); if (! parseContext.symbolTable.atBuiltInLevel()) parseContext.doubleCheck((yyvsp[0].lex).loc, "double vector"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setVector(2); } #line 8133 "MachineIndependent/glslang_tab.cpp" break; case 267: /* type_specifier_nonarray: DVEC3 */ #line 2021 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double vector"); if (! parseContext.symbolTable.atBuiltInLevel()) parseContext.doubleCheck((yyvsp[0].lex).loc, "double vector"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setVector(3); } #line 8146 "MachineIndependent/glslang_tab.cpp" break; case 268: /* type_specifier_nonarray: DVEC4 */ #line 2029 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double vector"); if (! parseContext.symbolTable.atBuiltInLevel()) parseContext.doubleCheck((yyvsp[0].lex).loc, "double vector"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setVector(4); } #line 8159 "MachineIndependent/glslang_tab.cpp" break; case 269: /* type_specifier_nonarray: BF16VEC2 */ #line 2037 "MachineIndependent/glslang.y" { parseContext.bfloat16ScalarVectorCheck((yyvsp[0].lex).loc, "half float vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtBFloat16; (yyval.interm.type).setVector(2); } #line 8170 "MachineIndependent/glslang_tab.cpp" break; case 270: /* type_specifier_nonarray: BF16VEC3 */ #line 2043 "MachineIndependent/glslang.y" { parseContext.bfloat16ScalarVectorCheck((yyvsp[0].lex).loc, "half float vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtBFloat16; (yyval.interm.type).setVector(3); } #line 8181 "MachineIndependent/glslang_tab.cpp" break; case 271: /* type_specifier_nonarray: BF16VEC4 */ #line 2049 "MachineIndependent/glslang.y" { parseContext.bfloat16ScalarVectorCheck((yyvsp[0].lex).loc, "half float vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtBFloat16; (yyval.interm.type).setVector(4); } #line 8192 "MachineIndependent/glslang_tab.cpp" break; case 272: /* type_specifier_nonarray: FE5M2VEC2 */ #line 2055 "MachineIndependent/glslang.y" { parseContext.floate5m2ScalarVectorCheck((yyvsp[0].lex).loc, "fe5m2 vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloatE5M2; (yyval.interm.type).setVector(2); } #line 8203 "MachineIndependent/glslang_tab.cpp" break; case 273: /* type_specifier_nonarray: FE5M2VEC3 */ #line 2061 "MachineIndependent/glslang.y" { parseContext.floate5m2ScalarVectorCheck((yyvsp[0].lex).loc, "fe5m2 vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloatE5M2; (yyval.interm.type).setVector(3); } #line 8214 "MachineIndependent/glslang_tab.cpp" break; case 274: /* type_specifier_nonarray: FE5M2VEC4 */ #line 2067 "MachineIndependent/glslang.y" { parseContext.floate5m2ScalarVectorCheck((yyvsp[0].lex).loc, "fe5m2 vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloatE5M2; (yyval.interm.type).setVector(4); } #line 8225 "MachineIndependent/glslang_tab.cpp" break; case 275: /* type_specifier_nonarray: FE4M3VEC2 */ #line 2073 "MachineIndependent/glslang.y" { parseContext.floate4m3ScalarVectorCheck((yyvsp[0].lex).loc, "fe4m3 vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloatE4M3; (yyval.interm.type).setVector(2); } #line 8236 "MachineIndependent/glslang_tab.cpp" break; case 276: /* type_specifier_nonarray: FE4M3VEC3 */ #line 2079 "MachineIndependent/glslang.y" { parseContext.floate4m3ScalarVectorCheck((yyvsp[0].lex).loc, "fe4m3 vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloatE4M3; (yyval.interm.type).setVector(3); } #line 8247 "MachineIndependent/glslang_tab.cpp" break; case 277: /* type_specifier_nonarray: FE4M3VEC4 */ #line 2085 "MachineIndependent/glslang.y" { parseContext.floate4m3ScalarVectorCheck((yyvsp[0].lex).loc, "fe4m3 vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloatE4M3; (yyval.interm.type).setVector(4); } #line 8258 "MachineIndependent/glslang_tab.cpp" break; case 278: /* type_specifier_nonarray: F16VEC2 */ #line 2091 "MachineIndependent/glslang.y" { parseContext.float16ScalarVectorCheck((yyvsp[0].lex).loc, "half float vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat16; (yyval.interm.type).setVector(2); } #line 8269 "MachineIndependent/glslang_tab.cpp" break; case 279: /* type_specifier_nonarray: F16VEC3 */ #line 2097 "MachineIndependent/glslang.y" { parseContext.float16ScalarVectorCheck((yyvsp[0].lex).loc, "half float vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat16; (yyval.interm.type).setVector(3); } #line 8280 "MachineIndependent/glslang_tab.cpp" break; case 280: /* type_specifier_nonarray: F16VEC4 */ #line 2103 "MachineIndependent/glslang.y" { parseContext.float16ScalarVectorCheck((yyvsp[0].lex).loc, "half float vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat16; (yyval.interm.type).setVector(4); } #line 8291 "MachineIndependent/glslang_tab.cpp" break; case 281: /* type_specifier_nonarray: F32VEC2 */ #line 2109 "MachineIndependent/glslang.y" { parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setVector(2); } #line 8302 "MachineIndependent/glslang_tab.cpp" break; case 282: /* type_specifier_nonarray: F32VEC3 */ #line 2115 "MachineIndependent/glslang.y" { parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setVector(3); } #line 8313 "MachineIndependent/glslang_tab.cpp" break; case 283: /* type_specifier_nonarray: F32VEC4 */ #line 2121 "MachineIndependent/glslang.y" { parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setVector(4); } #line 8324 "MachineIndependent/glslang_tab.cpp" break; case 284: /* type_specifier_nonarray: F64VEC2 */ #line 2127 "MachineIndependent/glslang.y" { parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setVector(2); } #line 8335 "MachineIndependent/glslang_tab.cpp" break; case 285: /* type_specifier_nonarray: F64VEC3 */ #line 2133 "MachineIndependent/glslang.y" { parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setVector(3); } #line 8346 "MachineIndependent/glslang_tab.cpp" break; case 286: /* type_specifier_nonarray: F64VEC4 */ #line 2139 "MachineIndependent/glslang.y" { parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setVector(4); } #line 8357 "MachineIndependent/glslang_tab.cpp" break; case 287: /* type_specifier_nonarray: I8VEC2 */ #line 2145 "MachineIndependent/glslang.y" { parseContext.int8ScalarVectorCheck((yyvsp[0].lex).loc, "8-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtInt8; (yyval.interm.type).setVector(2); } #line 8368 "MachineIndependent/glslang_tab.cpp" break; case 288: /* type_specifier_nonarray: I8VEC3 */ #line 2151 "MachineIndependent/glslang.y" { parseContext.int8ScalarVectorCheck((yyvsp[0].lex).loc, "8-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtInt8; (yyval.interm.type).setVector(3); } #line 8379 "MachineIndependent/glslang_tab.cpp" break; case 289: /* type_specifier_nonarray: I8VEC4 */ #line 2157 "MachineIndependent/glslang.y" { parseContext.int8ScalarVectorCheck((yyvsp[0].lex).loc, "8-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtInt8; (yyval.interm.type).setVector(4); } #line 8390 "MachineIndependent/glslang_tab.cpp" break; case 290: /* type_specifier_nonarray: I16VEC2 */ #line 2163 "MachineIndependent/glslang.y" { parseContext.int16ScalarVectorCheck((yyvsp[0].lex).loc, "16-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtInt16; (yyval.interm.type).setVector(2); } #line 8401 "MachineIndependent/glslang_tab.cpp" break; case 291: /* type_specifier_nonarray: I16VEC3 */ #line 2169 "MachineIndependent/glslang.y" { parseContext.int16ScalarVectorCheck((yyvsp[0].lex).loc, "16-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtInt16; (yyval.interm.type).setVector(3); } #line 8412 "MachineIndependent/glslang_tab.cpp" break; case 292: /* type_specifier_nonarray: I16VEC4 */ #line 2175 "MachineIndependent/glslang.y" { parseContext.int16ScalarVectorCheck((yyvsp[0].lex).loc, "16-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtInt16; (yyval.interm.type).setVector(4); } #line 8423 "MachineIndependent/glslang_tab.cpp" break; case 293: /* type_specifier_nonarray: I32VEC2 */ #line 2181 "MachineIndependent/glslang.y" { parseContext.explicitInt32Check((yyvsp[0].lex).loc, "32-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtInt; (yyval.interm.type).setVector(2); } #line 8434 "MachineIndependent/glslang_tab.cpp" break; case 294: /* type_specifier_nonarray: I32VEC3 */ #line 2187 "MachineIndependent/glslang.y" { parseContext.explicitInt32Check((yyvsp[0].lex).loc, "32-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtInt; (yyval.interm.type).setVector(3); } #line 8445 "MachineIndependent/glslang_tab.cpp" break; case 295: /* type_specifier_nonarray: I32VEC4 */ #line 2193 "MachineIndependent/glslang.y" { parseContext.explicitInt32Check((yyvsp[0].lex).loc, "32-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtInt; (yyval.interm.type).setVector(4); } #line 8456 "MachineIndependent/glslang_tab.cpp" break; case 296: /* type_specifier_nonarray: I64VEC2 */ #line 2199 "MachineIndependent/glslang.y" { parseContext.int64Check((yyvsp[0].lex).loc, "64-bit integer vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtInt64; (yyval.interm.type).setVector(2); } #line 8467 "MachineIndependent/glslang_tab.cpp" break; case 297: /* type_specifier_nonarray: I64VEC3 */ #line 2205 "MachineIndependent/glslang.y" { parseContext.int64Check((yyvsp[0].lex).loc, "64-bit integer vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtInt64; (yyval.interm.type).setVector(3); } #line 8478 "MachineIndependent/glslang_tab.cpp" break; case 298: /* type_specifier_nonarray: I64VEC4 */ #line 2211 "MachineIndependent/glslang.y" { parseContext.int64Check((yyvsp[0].lex).loc, "64-bit integer vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtInt64; (yyval.interm.type).setVector(4); } #line 8489 "MachineIndependent/glslang_tab.cpp" break; case 299: /* type_specifier_nonarray: U8VEC2 */ #line 2217 "MachineIndependent/glslang.y" { parseContext.int8ScalarVectorCheck((yyvsp[0].lex).loc, "8-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtUint8; (yyval.interm.type).setVector(2); } #line 8500 "MachineIndependent/glslang_tab.cpp" break; case 300: /* type_specifier_nonarray: U8VEC3 */ #line 2223 "MachineIndependent/glslang.y" { parseContext.int8ScalarVectorCheck((yyvsp[0].lex).loc, "8-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtUint8; (yyval.interm.type).setVector(3); } #line 8511 "MachineIndependent/glslang_tab.cpp" break; case 301: /* type_specifier_nonarray: U8VEC4 */ #line 2229 "MachineIndependent/glslang.y" { parseContext.int8ScalarVectorCheck((yyvsp[0].lex).loc, "8-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtUint8; (yyval.interm.type).setVector(4); } #line 8522 "MachineIndependent/glslang_tab.cpp" break; case 302: /* type_specifier_nonarray: U16VEC2 */ #line 2235 "MachineIndependent/glslang.y" { parseContext.int16ScalarVectorCheck((yyvsp[0].lex).loc, "16-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtUint16; (yyval.interm.type).setVector(2); } #line 8533 "MachineIndependent/glslang_tab.cpp" break; case 303: /* type_specifier_nonarray: U16VEC3 */ #line 2241 "MachineIndependent/glslang.y" { parseContext.int16ScalarVectorCheck((yyvsp[0].lex).loc, "16-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtUint16; (yyval.interm.type).setVector(3); } #line 8544 "MachineIndependent/glslang_tab.cpp" break; case 304: /* type_specifier_nonarray: U16VEC4 */ #line 2247 "MachineIndependent/glslang.y" { parseContext.int16ScalarVectorCheck((yyvsp[0].lex).loc, "16-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtUint16; (yyval.interm.type).setVector(4); } #line 8555 "MachineIndependent/glslang_tab.cpp" break; case 305: /* type_specifier_nonarray: U32VEC2 */ #line 2253 "MachineIndependent/glslang.y" { parseContext.explicitInt32Check((yyvsp[0].lex).loc, "32-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtUint; (yyval.interm.type).setVector(2); } #line 8566 "MachineIndependent/glslang_tab.cpp" break; case 306: /* type_specifier_nonarray: U32VEC3 */ #line 2259 "MachineIndependent/glslang.y" { parseContext.explicitInt32Check((yyvsp[0].lex).loc, "32-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtUint; (yyval.interm.type).setVector(3); } #line 8577 "MachineIndependent/glslang_tab.cpp" break; case 307: /* type_specifier_nonarray: U32VEC4 */ #line 2265 "MachineIndependent/glslang.y" { parseContext.explicitInt32Check((yyvsp[0].lex).loc, "32-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtUint; (yyval.interm.type).setVector(4); } #line 8588 "MachineIndependent/glslang_tab.cpp" break; case 308: /* type_specifier_nonarray: U64VEC2 */ #line 2271 "MachineIndependent/glslang.y" { parseContext.int64Check((yyvsp[0].lex).loc, "64-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtUint64; (yyval.interm.type).setVector(2); } #line 8599 "MachineIndependent/glslang_tab.cpp" break; case 309: /* type_specifier_nonarray: U64VEC3 */ #line 2277 "MachineIndependent/glslang.y" { parseContext.int64Check((yyvsp[0].lex).loc, "64-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtUint64; (yyval.interm.type).setVector(3); } #line 8610 "MachineIndependent/glslang_tab.cpp" break; case 310: /* type_specifier_nonarray: U64VEC4 */ #line 2283 "MachineIndependent/glslang.y" { parseContext.int64Check((yyvsp[0].lex).loc, "64-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtUint64; (yyval.interm.type).setVector(4); } #line 8621 "MachineIndependent/glslang_tab.cpp" break; case 311: /* type_specifier_nonarray: DMAT2 */ #line 2289 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix"); if (! parseContext.symbolTable.atBuiltInLevel()) parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(2, 2); } #line 8634 "MachineIndependent/glslang_tab.cpp" break; case 312: /* type_specifier_nonarray: DMAT3 */ #line 2297 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix"); if (! parseContext.symbolTable.atBuiltInLevel()) parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(3, 3); } #line 8647 "MachineIndependent/glslang_tab.cpp" break; case 313: /* type_specifier_nonarray: DMAT4 */ #line 2305 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix"); if (! parseContext.symbolTable.atBuiltInLevel()) parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(4, 4); } #line 8660 "MachineIndependent/glslang_tab.cpp" break; case 314: /* type_specifier_nonarray: DMAT2X2 */ #line 2313 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix"); if (! parseContext.symbolTable.atBuiltInLevel()) parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(2, 2); } #line 8673 "MachineIndependent/glslang_tab.cpp" break; case 315: /* type_specifier_nonarray: DMAT2X3 */ #line 2321 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix"); if (! parseContext.symbolTable.atBuiltInLevel()) parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(2, 3); } #line 8686 "MachineIndependent/glslang_tab.cpp" break; case 316: /* type_specifier_nonarray: DMAT2X4 */ #line 2329 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix"); if (! parseContext.symbolTable.atBuiltInLevel()) parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(2, 4); } #line 8699 "MachineIndependent/glslang_tab.cpp" break; case 317: /* type_specifier_nonarray: DMAT3X2 */ #line 2337 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix"); if (! parseContext.symbolTable.atBuiltInLevel()) parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(3, 2); } #line 8712 "MachineIndependent/glslang_tab.cpp" break; case 318: /* type_specifier_nonarray: DMAT3X3 */ #line 2345 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix"); if (! parseContext.symbolTable.atBuiltInLevel()) parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(3, 3); } #line 8725 "MachineIndependent/glslang_tab.cpp" break; case 319: /* type_specifier_nonarray: DMAT3X4 */ #line 2353 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix"); if (! parseContext.symbolTable.atBuiltInLevel()) parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(3, 4); } #line 8738 "MachineIndependent/glslang_tab.cpp" break; case 320: /* type_specifier_nonarray: DMAT4X2 */ #line 2361 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix"); if (! parseContext.symbolTable.atBuiltInLevel()) parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(4, 2); } #line 8751 "MachineIndependent/glslang_tab.cpp" break; case 321: /* type_specifier_nonarray: DMAT4X3 */ #line 2369 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix"); if (! parseContext.symbolTable.atBuiltInLevel()) parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(4, 3); } #line 8764 "MachineIndependent/glslang_tab.cpp" break; case 322: /* type_specifier_nonarray: DMAT4X4 */ #line 2377 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix"); if (! parseContext.symbolTable.atBuiltInLevel()) parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(4, 4); } #line 8777 "MachineIndependent/glslang_tab.cpp" break; case 323: /* type_specifier_nonarray: F16MAT2 */ #line 2385 "MachineIndependent/glslang.y" { parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat16; (yyval.interm.type).setMatrix(2, 2); } #line 8788 "MachineIndependent/glslang_tab.cpp" break; case 324: /* type_specifier_nonarray: F16MAT3 */ #line 2391 "MachineIndependent/glslang.y" { parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat16; (yyval.interm.type).setMatrix(3, 3); } #line 8799 "MachineIndependent/glslang_tab.cpp" break; case 325: /* type_specifier_nonarray: F16MAT4 */ #line 2397 "MachineIndependent/glslang.y" { parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat16; (yyval.interm.type).setMatrix(4, 4); } #line 8810 "MachineIndependent/glslang_tab.cpp" break; case 326: /* type_specifier_nonarray: F16MAT2X2 */ #line 2403 "MachineIndependent/glslang.y" { parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat16; (yyval.interm.type).setMatrix(2, 2); } #line 8821 "MachineIndependent/glslang_tab.cpp" break; case 327: /* type_specifier_nonarray: F16MAT2X3 */ #line 2409 "MachineIndependent/glslang.y" { parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat16; (yyval.interm.type).setMatrix(2, 3); } #line 8832 "MachineIndependent/glslang_tab.cpp" break; case 328: /* type_specifier_nonarray: F16MAT2X4 */ #line 2415 "MachineIndependent/glslang.y" { parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat16; (yyval.interm.type).setMatrix(2, 4); } #line 8843 "MachineIndependent/glslang_tab.cpp" break; case 329: /* type_specifier_nonarray: F16MAT3X2 */ #line 2421 "MachineIndependent/glslang.y" { parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat16; (yyval.interm.type).setMatrix(3, 2); } #line 8854 "MachineIndependent/glslang_tab.cpp" break; case 330: /* type_specifier_nonarray: F16MAT3X3 */ #line 2427 "MachineIndependent/glslang.y" { parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat16; (yyval.interm.type).setMatrix(3, 3); } #line 8865 "MachineIndependent/glslang_tab.cpp" break; case 331: /* type_specifier_nonarray: F16MAT3X4 */ #line 2433 "MachineIndependent/glslang.y" { parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat16; (yyval.interm.type).setMatrix(3, 4); } #line 8876 "MachineIndependent/glslang_tab.cpp" break; case 332: /* type_specifier_nonarray: F16MAT4X2 */ #line 2439 "MachineIndependent/glslang.y" { parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat16; (yyval.interm.type).setMatrix(4, 2); } #line 8887 "MachineIndependent/glslang_tab.cpp" break; case 333: /* type_specifier_nonarray: F16MAT4X3 */ #line 2445 "MachineIndependent/glslang.y" { parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat16; (yyval.interm.type).setMatrix(4, 3); } #line 8898 "MachineIndependent/glslang_tab.cpp" break; case 334: /* type_specifier_nonarray: F16MAT4X4 */ #line 2451 "MachineIndependent/glslang.y" { parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat16; (yyval.interm.type).setMatrix(4, 4); } #line 8909 "MachineIndependent/glslang_tab.cpp" break; case 335: /* type_specifier_nonarray: F32MAT2 */ #line 2457 "MachineIndependent/glslang.y" { parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setMatrix(2, 2); } #line 8920 "MachineIndependent/glslang_tab.cpp" break; case 336: /* type_specifier_nonarray: F32MAT3 */ #line 2463 "MachineIndependent/glslang.y" { parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setMatrix(3, 3); } #line 8931 "MachineIndependent/glslang_tab.cpp" break; case 337: /* type_specifier_nonarray: F32MAT4 */ #line 2469 "MachineIndependent/glslang.y" { parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setMatrix(4, 4); } #line 8942 "MachineIndependent/glslang_tab.cpp" break; case 338: /* type_specifier_nonarray: F32MAT2X2 */ #line 2475 "MachineIndependent/glslang.y" { parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setMatrix(2, 2); } #line 8953 "MachineIndependent/glslang_tab.cpp" break; case 339: /* type_specifier_nonarray: F32MAT2X3 */ #line 2481 "MachineIndependent/glslang.y" { parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setMatrix(2, 3); } #line 8964 "MachineIndependent/glslang_tab.cpp" break; case 340: /* type_specifier_nonarray: F32MAT2X4 */ #line 2487 "MachineIndependent/glslang.y" { parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setMatrix(2, 4); } #line 8975 "MachineIndependent/glslang_tab.cpp" break; case 341: /* type_specifier_nonarray: F32MAT3X2 */ #line 2493 "MachineIndependent/glslang.y" { parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setMatrix(3, 2); } #line 8986 "MachineIndependent/glslang_tab.cpp" break; case 342: /* type_specifier_nonarray: F32MAT3X3 */ #line 2499 "MachineIndependent/glslang.y" { parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setMatrix(3, 3); } #line 8997 "MachineIndependent/glslang_tab.cpp" break; case 343: /* type_specifier_nonarray: F32MAT3X4 */ #line 2505 "MachineIndependent/glslang.y" { parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setMatrix(3, 4); } #line 9008 "MachineIndependent/glslang_tab.cpp" break; case 344: /* type_specifier_nonarray: F32MAT4X2 */ #line 2511 "MachineIndependent/glslang.y" { parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setMatrix(4, 2); } #line 9019 "MachineIndependent/glslang_tab.cpp" break; case 345: /* type_specifier_nonarray: F32MAT4X3 */ #line 2517 "MachineIndependent/glslang.y" { parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setMatrix(4, 3); } #line 9030 "MachineIndependent/glslang_tab.cpp" break; case 346: /* type_specifier_nonarray: F32MAT4X4 */ #line 2523 "MachineIndependent/glslang.y" { parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setMatrix(4, 4); } #line 9041 "MachineIndependent/glslang_tab.cpp" break; case 347: /* type_specifier_nonarray: F64MAT2 */ #line 2529 "MachineIndependent/glslang.y" { parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(2, 2); } #line 9052 "MachineIndependent/glslang_tab.cpp" break; case 348: /* type_specifier_nonarray: F64MAT3 */ #line 2535 "MachineIndependent/glslang.y" { parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(3, 3); } #line 9063 "MachineIndependent/glslang_tab.cpp" break; case 349: /* type_specifier_nonarray: F64MAT4 */ #line 2541 "MachineIndependent/glslang.y" { parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(4, 4); } #line 9074 "MachineIndependent/glslang_tab.cpp" break; case 350: /* type_specifier_nonarray: F64MAT2X2 */ #line 2547 "MachineIndependent/glslang.y" { parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(2, 2); } #line 9085 "MachineIndependent/glslang_tab.cpp" break; case 351: /* type_specifier_nonarray: F64MAT2X3 */ #line 2553 "MachineIndependent/glslang.y" { parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(2, 3); } #line 9096 "MachineIndependent/glslang_tab.cpp" break; case 352: /* type_specifier_nonarray: F64MAT2X4 */ #line 2559 "MachineIndependent/glslang.y" { parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(2, 4); } #line 9107 "MachineIndependent/glslang_tab.cpp" break; case 353: /* type_specifier_nonarray: F64MAT3X2 */ #line 2565 "MachineIndependent/glslang.y" { parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(3, 2); } #line 9118 "MachineIndependent/glslang_tab.cpp" break; case 354: /* type_specifier_nonarray: F64MAT3X3 */ #line 2571 "MachineIndependent/glslang.y" { parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(3, 3); } #line 9129 "MachineIndependent/glslang_tab.cpp" break; case 355: /* type_specifier_nonarray: F64MAT3X4 */ #line 2577 "MachineIndependent/glslang.y" { parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(3, 4); } #line 9140 "MachineIndependent/glslang_tab.cpp" break; case 356: /* type_specifier_nonarray: F64MAT4X2 */ #line 2583 "MachineIndependent/glslang.y" { parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(4, 2); } #line 9151 "MachineIndependent/glslang_tab.cpp" break; case 357: /* type_specifier_nonarray: F64MAT4X3 */ #line 2589 "MachineIndependent/glslang.y" { parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(4, 3); } #line 9162 "MachineIndependent/glslang_tab.cpp" break; case 358: /* type_specifier_nonarray: F64MAT4X4 */ #line 2595 "MachineIndependent/glslang.y" { parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(4, 4); } #line 9173 "MachineIndependent/glslang_tab.cpp" break; case 359: /* type_specifier_nonarray: ACCSTRUCTNV */ #line 2601 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtAccStruct; } #line 9182 "MachineIndependent/glslang_tab.cpp" break; case 360: /* type_specifier_nonarray: ACCSTRUCTEXT */ #line 2605 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtAccStruct; } #line 9191 "MachineIndependent/glslang_tab.cpp" break; case 361: /* type_specifier_nonarray: RAYQUERYEXT */ #line 2609 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtRayQuery; } #line 9200 "MachineIndependent/glslang_tab.cpp" break; case 362: /* type_specifier_nonarray: ATOMIC_UINT */ #line 2613 "MachineIndependent/glslang.y" { parseContext.vulkanRemoved((yyvsp[0].lex).loc, "atomic counter types"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtAtomicUint; } #line 9210 "MachineIndependent/glslang_tab.cpp" break; case 363: /* type_specifier_nonarray: SAMPLER1D */ #line 2618 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat, Esd1D); } #line 9220 "MachineIndependent/glslang_tab.cpp" break; case 364: /* type_specifier_nonarray: SAMPLER2D */ #line 2623 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat, Esd2D); } #line 9230 "MachineIndependent/glslang_tab.cpp" break; case 365: /* type_specifier_nonarray: SAMPLER3D */ #line 2628 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat, Esd3D); } #line 9240 "MachineIndependent/glslang_tab.cpp" break; case 366: /* type_specifier_nonarray: SAMPLERCUBE */ #line 2633 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat, EsdCube); } #line 9250 "MachineIndependent/glslang_tab.cpp" break; case 367: /* type_specifier_nonarray: SAMPLER2DSHADOW */ #line 2638 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat, Esd2D, false, true); } #line 9260 "MachineIndependent/glslang_tab.cpp" break; case 368: /* type_specifier_nonarray: SAMPLERCUBESHADOW */ #line 2643 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat, EsdCube, false, true); } #line 9270 "MachineIndependent/glslang_tab.cpp" break; case 369: /* type_specifier_nonarray: SAMPLER2DARRAY */ #line 2648 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat, Esd2D, true); } #line 9280 "MachineIndependent/glslang_tab.cpp" break; case 370: /* type_specifier_nonarray: SAMPLER2DARRAYSHADOW */ #line 2653 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat, Esd2D, true, true); } #line 9290 "MachineIndependent/glslang_tab.cpp" break; case 371: /* type_specifier_nonarray: SAMPLER1DSHADOW */ #line 2658 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat, Esd1D, false, true); } #line 9300 "MachineIndependent/glslang_tab.cpp" break; case 372: /* type_specifier_nonarray: SAMPLER1DARRAY */ #line 2663 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat, Esd1D, true); } #line 9310 "MachineIndependent/glslang_tab.cpp" break; case 373: /* type_specifier_nonarray: SAMPLER1DARRAYSHADOW */ #line 2668 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat, Esd1D, true, true); } #line 9320 "MachineIndependent/glslang_tab.cpp" break; case 374: /* type_specifier_nonarray: SAMPLERCUBEARRAY */ #line 2673 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat, EsdCube, true); } #line 9330 "MachineIndependent/glslang_tab.cpp" break; case 375: /* type_specifier_nonarray: SAMPLERCUBEARRAYSHADOW */ #line 2678 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat, EsdCube, true, true); } #line 9340 "MachineIndependent/glslang_tab.cpp" break; case 376: /* type_specifier_nonarray: F16SAMPLER1D */ #line 2683 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat16, Esd1D); } #line 9351 "MachineIndependent/glslang_tab.cpp" break; case 377: /* type_specifier_nonarray: F16SAMPLER2D */ #line 2689 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat16, Esd2D); } #line 9362 "MachineIndependent/glslang_tab.cpp" break; case 378: /* type_specifier_nonarray: F16SAMPLER3D */ #line 2695 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat16, Esd3D); } #line 9373 "MachineIndependent/glslang_tab.cpp" break; case 379: /* type_specifier_nonarray: F16SAMPLERCUBE */ #line 2701 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat16, EsdCube); } #line 9384 "MachineIndependent/glslang_tab.cpp" break; case 380: /* type_specifier_nonarray: F16SAMPLER1DSHADOW */ #line 2707 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat16, Esd1D, false, true); } #line 9395 "MachineIndependent/glslang_tab.cpp" break; case 381: /* type_specifier_nonarray: F16SAMPLER2DSHADOW */ #line 2713 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat16, Esd2D, false, true); } #line 9406 "MachineIndependent/glslang_tab.cpp" break; case 382: /* type_specifier_nonarray: F16SAMPLERCUBESHADOW */ #line 2719 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat16, EsdCube, false, true); } #line 9417 "MachineIndependent/glslang_tab.cpp" break; case 383: /* type_specifier_nonarray: F16SAMPLER1DARRAY */ #line 2725 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat16, Esd1D, true); } #line 9428 "MachineIndependent/glslang_tab.cpp" break; case 384: /* type_specifier_nonarray: F16SAMPLER2DARRAY */ #line 2731 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat16, Esd2D, true); } #line 9439 "MachineIndependent/glslang_tab.cpp" break; case 385: /* type_specifier_nonarray: F16SAMPLER1DARRAYSHADOW */ #line 2737 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat16, Esd1D, true, true); } #line 9450 "MachineIndependent/glslang_tab.cpp" break; case 386: /* type_specifier_nonarray: F16SAMPLER2DARRAYSHADOW */ #line 2743 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat16, Esd2D, true, true); } #line 9461 "MachineIndependent/glslang_tab.cpp" break; case 387: /* type_specifier_nonarray: F16SAMPLERCUBEARRAY */ #line 2749 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat16, EsdCube, true); } #line 9472 "MachineIndependent/glslang_tab.cpp" break; case 388: /* type_specifier_nonarray: F16SAMPLERCUBEARRAYSHADOW */ #line 2755 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat16, EsdCube, true, true); } #line 9483 "MachineIndependent/glslang_tab.cpp" break; case 389: /* type_specifier_nonarray: ISAMPLER1D */ #line 2761 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtInt, Esd1D); } #line 9493 "MachineIndependent/glslang_tab.cpp" break; case 390: /* type_specifier_nonarray: ISAMPLER2D */ #line 2766 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtInt, Esd2D); } #line 9503 "MachineIndependent/glslang_tab.cpp" break; case 391: /* type_specifier_nonarray: ISAMPLER3D */ #line 2771 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtInt, Esd3D); } #line 9513 "MachineIndependent/glslang_tab.cpp" break; case 392: /* type_specifier_nonarray: ISAMPLERCUBE */ #line 2776 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtInt, EsdCube); } #line 9523 "MachineIndependent/glslang_tab.cpp" break; case 393: /* type_specifier_nonarray: ISAMPLER2DARRAY */ #line 2781 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtInt, Esd2D, true); } #line 9533 "MachineIndependent/glslang_tab.cpp" break; case 394: /* type_specifier_nonarray: USAMPLER2D */ #line 2786 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtUint, Esd2D); } #line 9543 "MachineIndependent/glslang_tab.cpp" break; case 395: /* type_specifier_nonarray: USAMPLER3D */ #line 2791 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtUint, Esd3D); } #line 9553 "MachineIndependent/glslang_tab.cpp" break; case 396: /* type_specifier_nonarray: USAMPLERCUBE */ #line 2796 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtUint, EsdCube); } #line 9563 "MachineIndependent/glslang_tab.cpp" break; case 397: /* type_specifier_nonarray: ISAMPLER1DARRAY */ #line 2801 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtInt, Esd1D, true); } #line 9573 "MachineIndependent/glslang_tab.cpp" break; case 398: /* type_specifier_nonarray: ISAMPLERCUBEARRAY */ #line 2806 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtInt, EsdCube, true); } #line 9583 "MachineIndependent/glslang_tab.cpp" break; case 399: /* type_specifier_nonarray: USAMPLER1D */ #line 2811 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtUint, Esd1D); } #line 9593 "MachineIndependent/glslang_tab.cpp" break; case 400: /* type_specifier_nonarray: USAMPLER1DARRAY */ #line 2816 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtUint, Esd1D, true); } #line 9603 "MachineIndependent/glslang_tab.cpp" break; case 401: /* type_specifier_nonarray: USAMPLERCUBEARRAY */ #line 2821 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtUint, EsdCube, true); } #line 9613 "MachineIndependent/glslang_tab.cpp" break; case 402: /* type_specifier_nonarray: TEXTURECUBEARRAY */ #line 2826 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtFloat, EsdCube, true); } #line 9623 "MachineIndependent/glslang_tab.cpp" break; case 403: /* type_specifier_nonarray: ITEXTURECUBEARRAY */ #line 2831 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtInt, EsdCube, true); } #line 9633 "MachineIndependent/glslang_tab.cpp" break; case 404: /* type_specifier_nonarray: UTEXTURECUBEARRAY */ #line 2836 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtUint, EsdCube, true); } #line 9643 "MachineIndependent/glslang_tab.cpp" break; case 405: /* type_specifier_nonarray: USAMPLER2DARRAY */ #line 2841 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtUint, Esd2D, true); } #line 9653 "MachineIndependent/glslang_tab.cpp" break; case 406: /* type_specifier_nonarray: TEXTURE2D */ #line 2846 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtFloat, Esd2D); } #line 9663 "MachineIndependent/glslang_tab.cpp" break; case 407: /* type_specifier_nonarray: TEXTURE3D */ #line 2851 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtFloat, Esd3D); } #line 9673 "MachineIndependent/glslang_tab.cpp" break; case 408: /* type_specifier_nonarray: TEXTURE2DARRAY */ #line 2856 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtFloat, Esd2D, true); } #line 9683 "MachineIndependent/glslang_tab.cpp" break; case 409: /* type_specifier_nonarray: TEXTURECUBE */ #line 2861 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtFloat, EsdCube); } #line 9693 "MachineIndependent/glslang_tab.cpp" break; case 410: /* type_specifier_nonarray: ITEXTURE2D */ #line 2866 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtInt, Esd2D); } #line 9703 "MachineIndependent/glslang_tab.cpp" break; case 411: /* type_specifier_nonarray: ITEXTURE3D */ #line 2871 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtInt, Esd3D); } #line 9713 "MachineIndependent/glslang_tab.cpp" break; case 412: /* type_specifier_nonarray: ITEXTURECUBE */ #line 2876 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtInt, EsdCube); } #line 9723 "MachineIndependent/glslang_tab.cpp" break; case 413: /* type_specifier_nonarray: ITEXTURE2DARRAY */ #line 2881 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtInt, Esd2D, true); } #line 9733 "MachineIndependent/glslang_tab.cpp" break; case 414: /* type_specifier_nonarray: UTEXTURE2D */ #line 2886 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtUint, Esd2D); } #line 9743 "MachineIndependent/glslang_tab.cpp" break; case 415: /* type_specifier_nonarray: UTEXTURE3D */ #line 2891 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtUint, Esd3D); } #line 9753 "MachineIndependent/glslang_tab.cpp" break; case 416: /* type_specifier_nonarray: UTEXTURECUBE */ #line 2896 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtUint, EsdCube); } #line 9763 "MachineIndependent/glslang_tab.cpp" break; case 417: /* type_specifier_nonarray: UTEXTURE2DARRAY */ #line 2901 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtUint, Esd2D, true); } #line 9773 "MachineIndependent/glslang_tab.cpp" break; case 418: /* type_specifier_nonarray: SAMPLER */ #line 2906 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setPureSampler(false); } #line 9783 "MachineIndependent/glslang_tab.cpp" break; case 419: /* type_specifier_nonarray: SAMPLERSHADOW */ #line 2911 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setPureSampler(true); } #line 9793 "MachineIndependent/glslang_tab.cpp" break; case 420: /* type_specifier_nonarray: SAMPLER2DRECT */ #line 2916 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat, EsdRect); } #line 9803 "MachineIndependent/glslang_tab.cpp" break; case 421: /* type_specifier_nonarray: SAMPLER2DRECTSHADOW */ #line 2921 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat, EsdRect, false, true); } #line 9813 "MachineIndependent/glslang_tab.cpp" break; case 422: /* type_specifier_nonarray: F16SAMPLER2DRECT */ #line 2926 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat16, EsdRect); } #line 9824 "MachineIndependent/glslang_tab.cpp" break; case 423: /* type_specifier_nonarray: F16SAMPLER2DRECTSHADOW */ #line 2932 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat16, EsdRect, false, true); } #line 9835 "MachineIndependent/glslang_tab.cpp" break; case 424: /* type_specifier_nonarray: ISAMPLER2DRECT */ #line 2938 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtInt, EsdRect); } #line 9845 "MachineIndependent/glslang_tab.cpp" break; case 425: /* type_specifier_nonarray: USAMPLER2DRECT */ #line 2943 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtUint, EsdRect); } #line 9855 "MachineIndependent/glslang_tab.cpp" break; case 426: /* type_specifier_nonarray: SAMPLERBUFFER */ #line 2948 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat, EsdBuffer); } #line 9865 "MachineIndependent/glslang_tab.cpp" break; case 427: /* type_specifier_nonarray: F16SAMPLERBUFFER */ #line 2953 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat16, EsdBuffer); } #line 9876 "MachineIndependent/glslang_tab.cpp" break; case 428: /* type_specifier_nonarray: ISAMPLERBUFFER */ #line 2959 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtInt, EsdBuffer); } #line 9886 "MachineIndependent/glslang_tab.cpp" break; case 429: /* type_specifier_nonarray: USAMPLERBUFFER */ #line 2964 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtUint, EsdBuffer); } #line 9896 "MachineIndependent/glslang_tab.cpp" break; case 430: /* type_specifier_nonarray: SAMPLER2DMS */ #line 2969 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat, Esd2D, false, false, true); } #line 9906 "MachineIndependent/glslang_tab.cpp" break; case 431: /* type_specifier_nonarray: F16SAMPLER2DMS */ #line 2974 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat16, Esd2D, false, false, true); } #line 9917 "MachineIndependent/glslang_tab.cpp" break; case 432: /* type_specifier_nonarray: ISAMPLER2DMS */ #line 2980 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtInt, Esd2D, false, false, true); } #line 9927 "MachineIndependent/glslang_tab.cpp" break; case 433: /* type_specifier_nonarray: USAMPLER2DMS */ #line 2985 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtUint, Esd2D, false, false, true); } #line 9937 "MachineIndependent/glslang_tab.cpp" break; case 434: /* type_specifier_nonarray: SAMPLER2DMSARRAY */ #line 2990 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat, Esd2D, true, false, true); } #line 9947 "MachineIndependent/glslang_tab.cpp" break; case 435: /* type_specifier_nonarray: F16SAMPLER2DMSARRAY */ #line 2995 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat16, Esd2D, true, false, true); } #line 9958 "MachineIndependent/glslang_tab.cpp" break; case 436: /* type_specifier_nonarray: ISAMPLER2DMSARRAY */ #line 3001 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtInt, Esd2D, true, false, true); } #line 9968 "MachineIndependent/glslang_tab.cpp" break; case 437: /* type_specifier_nonarray: USAMPLER2DMSARRAY */ #line 3006 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtUint, Esd2D, true, false, true); } #line 9978 "MachineIndependent/glslang_tab.cpp" break; case 438: /* type_specifier_nonarray: TEXTURE1D */ #line 3011 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtFloat, Esd1D); } #line 9988 "MachineIndependent/glslang_tab.cpp" break; case 439: /* type_specifier_nonarray: F16TEXTURE1D */ #line 3016 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtFloat16, Esd1D); } #line 9999 "MachineIndependent/glslang_tab.cpp" break; case 440: /* type_specifier_nonarray: F16TEXTURE2D */ #line 3022 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtFloat16, Esd2D); } #line 10010 "MachineIndependent/glslang_tab.cpp" break; case 441: /* type_specifier_nonarray: F16TEXTURE3D */ #line 3028 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtFloat16, Esd3D); } #line 10021 "MachineIndependent/glslang_tab.cpp" break; case 442: /* type_specifier_nonarray: F16TEXTURECUBE */ #line 3034 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtFloat16, EsdCube); } #line 10032 "MachineIndependent/glslang_tab.cpp" break; case 443: /* type_specifier_nonarray: TEXTURE1DARRAY */ #line 3040 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtFloat, Esd1D, true); } #line 10042 "MachineIndependent/glslang_tab.cpp" break; case 444: /* type_specifier_nonarray: F16TEXTURE1DARRAY */ #line 3045 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtFloat16, Esd1D, true); } #line 10053 "MachineIndependent/glslang_tab.cpp" break; case 445: /* type_specifier_nonarray: F16TEXTURE2DARRAY */ #line 3051 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtFloat16, Esd2D, true); } #line 10064 "MachineIndependent/glslang_tab.cpp" break; case 446: /* type_specifier_nonarray: F16TEXTURECUBEARRAY */ #line 3057 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtFloat16, EsdCube, true); } #line 10075 "MachineIndependent/glslang_tab.cpp" break; case 447: /* type_specifier_nonarray: ITEXTURE1D */ #line 3063 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtInt, Esd1D); } #line 10085 "MachineIndependent/glslang_tab.cpp" break; case 448: /* type_specifier_nonarray: ITEXTURE1DARRAY */ #line 3068 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtInt, Esd1D, true); } #line 10095 "MachineIndependent/glslang_tab.cpp" break; case 449: /* type_specifier_nonarray: UTEXTURE1D */ #line 3073 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtUint, Esd1D); } #line 10105 "MachineIndependent/glslang_tab.cpp" break; case 450: /* type_specifier_nonarray: UTEXTURE1DARRAY */ #line 3078 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtUint, Esd1D, true); } #line 10115 "MachineIndependent/glslang_tab.cpp" break; case 451: /* type_specifier_nonarray: TEXTURE2DRECT */ #line 3083 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtFloat, EsdRect); } #line 10125 "MachineIndependent/glslang_tab.cpp" break; case 452: /* type_specifier_nonarray: F16TEXTURE2DRECT */ #line 3088 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtFloat16, EsdRect); } #line 10136 "MachineIndependent/glslang_tab.cpp" break; case 453: /* type_specifier_nonarray: ITEXTURE2DRECT */ #line 3094 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtInt, EsdRect); } #line 10146 "MachineIndependent/glslang_tab.cpp" break; case 454: /* type_specifier_nonarray: UTEXTURE2DRECT */ #line 3099 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtUint, EsdRect); } #line 10156 "MachineIndependent/glslang_tab.cpp" break; case 455: /* type_specifier_nonarray: TEXTUREBUFFER */ #line 3104 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtFloat, EsdBuffer); } #line 10166 "MachineIndependent/glslang_tab.cpp" break; case 456: /* type_specifier_nonarray: F16TEXTUREBUFFER */ #line 3109 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtFloat16, EsdBuffer); } #line 10177 "MachineIndependent/glslang_tab.cpp" break; case 457: /* type_specifier_nonarray: ITEXTUREBUFFER */ #line 3115 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtInt, EsdBuffer); } #line 10187 "MachineIndependent/glslang_tab.cpp" break; case 458: /* type_specifier_nonarray: UTEXTUREBUFFER */ #line 3120 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtUint, EsdBuffer); } #line 10197 "MachineIndependent/glslang_tab.cpp" break; case 459: /* type_specifier_nonarray: TEXTURE2DMS */ #line 3125 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtFloat, Esd2D, false, false, true); } #line 10207 "MachineIndependent/glslang_tab.cpp" break; case 460: /* type_specifier_nonarray: F16TEXTURE2DMS */ #line 3130 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtFloat16, Esd2D, false, false, true); } #line 10218 "MachineIndependent/glslang_tab.cpp" break; case 461: /* type_specifier_nonarray: ITEXTURE2DMS */ #line 3136 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtInt, Esd2D, false, false, true); } #line 10228 "MachineIndependent/glslang_tab.cpp" break; case 462: /* type_specifier_nonarray: UTEXTURE2DMS */ #line 3141 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtUint, Esd2D, false, false, true); } #line 10238 "MachineIndependent/glslang_tab.cpp" break; case 463: /* type_specifier_nonarray: TEXTURE2DMSARRAY */ #line 3146 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtFloat, Esd2D, true, false, true); } #line 10248 "MachineIndependent/glslang_tab.cpp" break; case 464: /* type_specifier_nonarray: F16TEXTURE2DMSARRAY */ #line 3151 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtFloat16, Esd2D, true, false, true); } #line 10259 "MachineIndependent/glslang_tab.cpp" break; case 465: /* type_specifier_nonarray: ITEXTURE2DMSARRAY */ #line 3157 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtInt, Esd2D, true, false, true); } #line 10269 "MachineIndependent/glslang_tab.cpp" break; case 466: /* type_specifier_nonarray: UTEXTURE2DMSARRAY */ #line 3162 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtUint, Esd2D, true, false, true); } #line 10279 "MachineIndependent/glslang_tab.cpp" break; case 467: /* type_specifier_nonarray: IMAGE1D */ #line 3167 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtFloat, Esd1D); } #line 10289 "MachineIndependent/glslang_tab.cpp" break; case 468: /* type_specifier_nonarray: F16IMAGE1D */ #line 3172 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtFloat16, Esd1D); } #line 10300 "MachineIndependent/glslang_tab.cpp" break; case 469: /* type_specifier_nonarray: IIMAGE1D */ #line 3178 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt, Esd1D); } #line 10310 "MachineIndependent/glslang_tab.cpp" break; case 470: /* type_specifier_nonarray: UIMAGE1D */ #line 3183 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint, Esd1D); } #line 10320 "MachineIndependent/glslang_tab.cpp" break; case 471: /* type_specifier_nonarray: IMAGE2D */ #line 3188 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtFloat, Esd2D); } #line 10330 "MachineIndependent/glslang_tab.cpp" break; case 472: /* type_specifier_nonarray: F16IMAGE2D */ #line 3193 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtFloat16, Esd2D); } #line 10341 "MachineIndependent/glslang_tab.cpp" break; case 473: /* type_specifier_nonarray: IIMAGE2D */ #line 3199 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt, Esd2D); } #line 10351 "MachineIndependent/glslang_tab.cpp" break; case 474: /* type_specifier_nonarray: UIMAGE2D */ #line 3204 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint, Esd2D); } #line 10361 "MachineIndependent/glslang_tab.cpp" break; case 475: /* type_specifier_nonarray: IMAGE3D */ #line 3209 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtFloat, Esd3D); } #line 10371 "MachineIndependent/glslang_tab.cpp" break; case 476: /* type_specifier_nonarray: F16IMAGE3D */ #line 3214 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtFloat16, Esd3D); } #line 10382 "MachineIndependent/glslang_tab.cpp" break; case 477: /* type_specifier_nonarray: IIMAGE3D */ #line 3220 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt, Esd3D); } #line 10392 "MachineIndependent/glslang_tab.cpp" break; case 478: /* type_specifier_nonarray: UIMAGE3D */ #line 3225 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint, Esd3D); } #line 10402 "MachineIndependent/glslang_tab.cpp" break; case 479: /* type_specifier_nonarray: IMAGE2DRECT */ #line 3230 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtFloat, EsdRect); } #line 10412 "MachineIndependent/glslang_tab.cpp" break; case 480: /* type_specifier_nonarray: F16IMAGE2DRECT */ #line 3235 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtFloat16, EsdRect); } #line 10423 "MachineIndependent/glslang_tab.cpp" break; case 481: /* type_specifier_nonarray: IIMAGE2DRECT */ #line 3241 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt, EsdRect); } #line 10433 "MachineIndependent/glslang_tab.cpp" break; case 482: /* type_specifier_nonarray: UIMAGE2DRECT */ #line 3246 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint, EsdRect); } #line 10443 "MachineIndependent/glslang_tab.cpp" break; case 483: /* type_specifier_nonarray: IMAGECUBE */ #line 3251 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtFloat, EsdCube); } #line 10453 "MachineIndependent/glslang_tab.cpp" break; case 484: /* type_specifier_nonarray: F16IMAGECUBE */ #line 3256 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtFloat16, EsdCube); } #line 10464 "MachineIndependent/glslang_tab.cpp" break; case 485: /* type_specifier_nonarray: IIMAGECUBE */ #line 3262 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt, EsdCube); } #line 10474 "MachineIndependent/glslang_tab.cpp" break; case 486: /* type_specifier_nonarray: UIMAGECUBE */ #line 3267 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint, EsdCube); } #line 10484 "MachineIndependent/glslang_tab.cpp" break; case 487: /* type_specifier_nonarray: IMAGEBUFFER */ #line 3272 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtFloat, EsdBuffer); } #line 10494 "MachineIndependent/glslang_tab.cpp" break; case 488: /* type_specifier_nonarray: F16IMAGEBUFFER */ #line 3277 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtFloat16, EsdBuffer); } #line 10505 "MachineIndependent/glslang_tab.cpp" break; case 489: /* type_specifier_nonarray: IIMAGEBUFFER */ #line 3283 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt, EsdBuffer); } #line 10515 "MachineIndependent/glslang_tab.cpp" break; case 490: /* type_specifier_nonarray: UIMAGEBUFFER */ #line 3288 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint, EsdBuffer); } #line 10525 "MachineIndependent/glslang_tab.cpp" break; case 491: /* type_specifier_nonarray: IMAGE1DARRAY */ #line 3293 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtFloat, Esd1D, true); } #line 10535 "MachineIndependent/glslang_tab.cpp" break; case 492: /* type_specifier_nonarray: F16IMAGE1DARRAY */ #line 3298 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtFloat16, Esd1D, true); } #line 10546 "MachineIndependent/glslang_tab.cpp" break; case 493: /* type_specifier_nonarray: IIMAGE1DARRAY */ #line 3304 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt, Esd1D, true); } #line 10556 "MachineIndependent/glslang_tab.cpp" break; case 494: /* type_specifier_nonarray: UIMAGE1DARRAY */ #line 3309 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint, Esd1D, true); } #line 10566 "MachineIndependent/glslang_tab.cpp" break; case 495: /* type_specifier_nonarray: IMAGE2DARRAY */ #line 3314 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtFloat, Esd2D, true); } #line 10576 "MachineIndependent/glslang_tab.cpp" break; case 496: /* type_specifier_nonarray: F16IMAGE2DARRAY */ #line 3319 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtFloat16, Esd2D, true); } #line 10587 "MachineIndependent/glslang_tab.cpp" break; case 497: /* type_specifier_nonarray: IIMAGE2DARRAY */ #line 3325 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt, Esd2D, true); } #line 10597 "MachineIndependent/glslang_tab.cpp" break; case 498: /* type_specifier_nonarray: UIMAGE2DARRAY */ #line 3330 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint, Esd2D, true); } #line 10607 "MachineIndependent/glslang_tab.cpp" break; case 499: /* type_specifier_nonarray: IMAGECUBEARRAY */ #line 3335 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtFloat, EsdCube, true); } #line 10617 "MachineIndependent/glslang_tab.cpp" break; case 500: /* type_specifier_nonarray: F16IMAGECUBEARRAY */ #line 3340 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtFloat16, EsdCube, true); } #line 10628 "MachineIndependent/glslang_tab.cpp" break; case 501: /* type_specifier_nonarray: IIMAGECUBEARRAY */ #line 3346 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt, EsdCube, true); } #line 10638 "MachineIndependent/glslang_tab.cpp" break; case 502: /* type_specifier_nonarray: UIMAGECUBEARRAY */ #line 3351 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint, EsdCube, true); } #line 10648 "MachineIndependent/glslang_tab.cpp" break; case 503: /* type_specifier_nonarray: IMAGE2DMS */ #line 3356 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtFloat, Esd2D, false, false, true); } #line 10658 "MachineIndependent/glslang_tab.cpp" break; case 504: /* type_specifier_nonarray: F16IMAGE2DMS */ #line 3361 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtFloat16, Esd2D, false, false, true); } #line 10669 "MachineIndependent/glslang_tab.cpp" break; case 505: /* type_specifier_nonarray: IIMAGE2DMS */ #line 3367 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt, Esd2D, false, false, true); } #line 10679 "MachineIndependent/glslang_tab.cpp" break; case 506: /* type_specifier_nonarray: UIMAGE2DMS */ #line 3372 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint, Esd2D, false, false, true); } #line 10689 "MachineIndependent/glslang_tab.cpp" break; case 507: /* type_specifier_nonarray: IMAGE2DMSARRAY */ #line 3377 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtFloat, Esd2D, true, false, true); } #line 10699 "MachineIndependent/glslang_tab.cpp" break; case 508: /* type_specifier_nonarray: F16IMAGE2DMSARRAY */ #line 3382 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtFloat16, Esd2D, true, false, true); } #line 10710 "MachineIndependent/glslang_tab.cpp" break; case 509: /* type_specifier_nonarray: IIMAGE2DMSARRAY */ #line 3388 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt, Esd2D, true, false, true); } #line 10720 "MachineIndependent/glslang_tab.cpp" break; case 510: /* type_specifier_nonarray: UIMAGE2DMSARRAY */ #line 3393 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint, Esd2D, true, false, true); } #line 10730 "MachineIndependent/glslang_tab.cpp" break; case 511: /* type_specifier_nonarray: I64IMAGE1D */ #line 3398 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt64, Esd1D); } #line 10740 "MachineIndependent/glslang_tab.cpp" break; case 512: /* type_specifier_nonarray: U64IMAGE1D */ #line 3403 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint64, Esd1D); } #line 10750 "MachineIndependent/glslang_tab.cpp" break; case 513: /* type_specifier_nonarray: I64IMAGE2D */ #line 3408 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt64, Esd2D); } #line 10760 "MachineIndependent/glslang_tab.cpp" break; case 514: /* type_specifier_nonarray: U64IMAGE2D */ #line 3413 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint64, Esd2D); } #line 10770 "MachineIndependent/glslang_tab.cpp" break; case 515: /* type_specifier_nonarray: I64IMAGE3D */ #line 3418 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt64, Esd3D); } #line 10780 "MachineIndependent/glslang_tab.cpp" break; case 516: /* type_specifier_nonarray: U64IMAGE3D */ #line 3423 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint64, Esd3D); } #line 10790 "MachineIndependent/glslang_tab.cpp" break; case 517: /* type_specifier_nonarray: I64IMAGE2DRECT */ #line 3428 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt64, EsdRect); } #line 10800 "MachineIndependent/glslang_tab.cpp" break; case 518: /* type_specifier_nonarray: U64IMAGE2DRECT */ #line 3433 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint64, EsdRect); } #line 10810 "MachineIndependent/glslang_tab.cpp" break; case 519: /* type_specifier_nonarray: I64IMAGECUBE */ #line 3438 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt64, EsdCube); } #line 10820 "MachineIndependent/glslang_tab.cpp" break; case 520: /* type_specifier_nonarray: U64IMAGECUBE */ #line 3443 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint64, EsdCube); } #line 10830 "MachineIndependent/glslang_tab.cpp" break; case 521: /* type_specifier_nonarray: I64IMAGEBUFFER */ #line 3448 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt64, EsdBuffer); } #line 10840 "MachineIndependent/glslang_tab.cpp" break; case 522: /* type_specifier_nonarray: U64IMAGEBUFFER */ #line 3453 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint64, EsdBuffer); } #line 10850 "MachineIndependent/glslang_tab.cpp" break; case 523: /* type_specifier_nonarray: I64IMAGE1DARRAY */ #line 3458 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt64, Esd1D, true); } #line 10860 "MachineIndependent/glslang_tab.cpp" break; case 524: /* type_specifier_nonarray: U64IMAGE1DARRAY */ #line 3463 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint64, Esd1D, true); } #line 10870 "MachineIndependent/glslang_tab.cpp" break; case 525: /* type_specifier_nonarray: I64IMAGE2DARRAY */ #line 3468 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt64, Esd2D, true); } #line 10880 "MachineIndependent/glslang_tab.cpp" break; case 526: /* type_specifier_nonarray: U64IMAGE2DARRAY */ #line 3473 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint64, Esd2D, true); } #line 10890 "MachineIndependent/glslang_tab.cpp" break; case 527: /* type_specifier_nonarray: I64IMAGECUBEARRAY */ #line 3478 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt64, EsdCube, true); } #line 10900 "MachineIndependent/glslang_tab.cpp" break; case 528: /* type_specifier_nonarray: U64IMAGECUBEARRAY */ #line 3483 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint64, EsdCube, true); } #line 10910 "MachineIndependent/glslang_tab.cpp" break; case 529: /* type_specifier_nonarray: I64IMAGE2DMS */ #line 3488 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt64, Esd2D, false, false, true); } #line 10920 "MachineIndependent/glslang_tab.cpp" break; case 530: /* type_specifier_nonarray: U64IMAGE2DMS */ #line 3493 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint64, Esd2D, false, false, true); } #line 10930 "MachineIndependent/glslang_tab.cpp" break; case 531: /* type_specifier_nonarray: I64IMAGE2DMSARRAY */ #line 3498 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt64, Esd2D, true, false, true); } #line 10940 "MachineIndependent/glslang_tab.cpp" break; case 532: /* type_specifier_nonarray: U64IMAGE2DMSARRAY */ #line 3503 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint64, Esd2D, true, false, true); } #line 10950 "MachineIndependent/glslang_tab.cpp" break; case 533: /* type_specifier_nonarray: SAMPLEREXTERNALOES */ #line 3508 "MachineIndependent/glslang.y" { // GL_OES_EGL_image_external (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat, Esd2D); (yyval.interm.type).sampler.external = true; } #line 10961 "MachineIndependent/glslang_tab.cpp" break; case 534: /* type_specifier_nonarray: SAMPLEREXTERNAL2DY2YEXT */ #line 3514 "MachineIndependent/glslang.y" { // GL_EXT_YUV_target (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat, Esd2D); (yyval.interm.type).sampler.yuv = true; } #line 10972 "MachineIndependent/glslang_tab.cpp" break; case 535: /* type_specifier_nonarray: ATTACHMENTEXT */ #line 3520 "MachineIndependent/glslang.y" { parseContext.requireStage((yyvsp[0].lex).loc, EShLangFragment, "attachmentEXT input"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setAttachmentEXT(EbtFloat); } #line 10983 "MachineIndependent/glslang_tab.cpp" break; case 536: /* type_specifier_nonarray: IATTACHMENTEXT */ #line 3526 "MachineIndependent/glslang.y" { parseContext.requireStage((yyvsp[0].lex).loc, EShLangFragment, "attachmentEXT input"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setAttachmentEXT(EbtInt); } #line 10994 "MachineIndependent/glslang_tab.cpp" break; case 537: /* type_specifier_nonarray: UATTACHMENTEXT */ #line 3532 "MachineIndependent/glslang.y" { parseContext.requireStage((yyvsp[0].lex).loc, EShLangFragment, "attachmentEXT input"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setAttachmentEXT(EbtUint); } #line 11005 "MachineIndependent/glslang_tab.cpp" break; case 538: /* type_specifier_nonarray: SUBPASSINPUT */ #line 3538 "MachineIndependent/glslang.y" { parseContext.requireStage((yyvsp[0].lex).loc, EShLangFragment, "subpass input"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setSubpass(EbtFloat); } #line 11016 "MachineIndependent/glslang_tab.cpp" break; case 539: /* type_specifier_nonarray: SUBPASSINPUTMS */ #line 3544 "MachineIndependent/glslang.y" { parseContext.requireStage((yyvsp[0].lex).loc, EShLangFragment, "subpass input"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setSubpass(EbtFloat, true); } #line 11027 "MachineIndependent/glslang_tab.cpp" break; case 540: /* type_specifier_nonarray: F16SUBPASSINPUT */ #line 3550 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float subpass input", parseContext.symbolTable.atBuiltInLevel()); parseContext.requireStage((yyvsp[0].lex).loc, EShLangFragment, "subpass input"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setSubpass(EbtFloat16); } #line 11039 "MachineIndependent/glslang_tab.cpp" break; case 541: /* type_specifier_nonarray: F16SUBPASSINPUTMS */ #line 3557 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float subpass input", parseContext.symbolTable.atBuiltInLevel()); parseContext.requireStage((yyvsp[0].lex).loc, EShLangFragment, "subpass input"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setSubpass(EbtFloat16, true); } #line 11051 "MachineIndependent/glslang_tab.cpp" break; case 542: /* type_specifier_nonarray: ISUBPASSINPUT */ #line 3564 "MachineIndependent/glslang.y" { parseContext.requireStage((yyvsp[0].lex).loc, EShLangFragment, "subpass input"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setSubpass(EbtInt); } #line 11062 "MachineIndependent/glslang_tab.cpp" break; case 543: /* type_specifier_nonarray: ISUBPASSINPUTMS */ #line 3570 "MachineIndependent/glslang.y" { parseContext.requireStage((yyvsp[0].lex).loc, EShLangFragment, "subpass input"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setSubpass(EbtInt, true); } #line 11073 "MachineIndependent/glslang_tab.cpp" break; case 544: /* type_specifier_nonarray: USUBPASSINPUT */ #line 3576 "MachineIndependent/glslang.y" { parseContext.requireStage((yyvsp[0].lex).loc, EShLangFragment, "subpass input"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setSubpass(EbtUint); } #line 11084 "MachineIndependent/glslang_tab.cpp" break; case 545: /* type_specifier_nonarray: USUBPASSINPUTMS */ #line 3582 "MachineIndependent/glslang.y" { parseContext.requireStage((yyvsp[0].lex).loc, EShLangFragment, "subpass input"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setSubpass(EbtUint, true); } #line 11095 "MachineIndependent/glslang_tab.cpp" break; case 546: /* type_specifier_nonarray: FCOOPMATNV */ #line 3588 "MachineIndependent/glslang.y" { parseContext.fcoopmatCheckNV((yyvsp[0].lex).loc, "fcoopmatNV", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).coopmatNV = true; (yyval.interm.type).coopmatKHR = false; } #line 11107 "MachineIndependent/glslang_tab.cpp" break; case 547: /* type_specifier_nonarray: ICOOPMATNV */ #line 3595 "MachineIndependent/glslang.y" { parseContext.intcoopmatCheckNV((yyvsp[0].lex).loc, "icoopmatNV", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtInt; (yyval.interm.type).coopmatNV = true; (yyval.interm.type).coopmatKHR = false; } #line 11119 "MachineIndependent/glslang_tab.cpp" break; case 548: /* type_specifier_nonarray: UCOOPMATNV */ #line 3602 "MachineIndependent/glslang.y" { parseContext.intcoopmatCheckNV((yyvsp[0].lex).loc, "ucoopmatNV", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtUint; (yyval.interm.type).coopmatNV = true; (yyval.interm.type).coopmatKHR = false; } #line 11131 "MachineIndependent/glslang_tab.cpp" break; case 549: /* type_specifier_nonarray: COOPMAT */ #line 3609 "MachineIndependent/glslang.y" { parseContext.coopmatCheck((yyvsp[0].lex).loc, "coopmat", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtCoopmat; (yyval.interm.type).coopmatNV = false; (yyval.interm.type).coopmatKHR = true; } #line 11143 "MachineIndependent/glslang_tab.cpp" break; case 550: /* type_specifier_nonarray: TENSORLAYOUTNV */ #line 3616 "MachineIndependent/glslang.y" { parseContext.tensorLayoutViewCheck((yyvsp[0].lex).loc, "tensorLayoutNV", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtTensorLayoutNV; } #line 11153 "MachineIndependent/glslang_tab.cpp" break; case 551: /* type_specifier_nonarray: TENSORVIEWNV */ #line 3621 "MachineIndependent/glslang.y" { parseContext.tensorLayoutViewCheck((yyvsp[0].lex).loc, "tensorViewNV", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtTensorViewNV; } #line 11163 "MachineIndependent/glslang_tab.cpp" break; case 552: /* type_specifier_nonarray: FUNCTION */ #line 3626 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).basicType = EbtFunction; } #line 11172 "MachineIndependent/glslang_tab.cpp" break; case 553: /* type_specifier_nonarray: COOPVECNV */ #line 3630 "MachineIndependent/glslang.y" { parseContext.coopvecCheck((yyvsp[0].lex).loc, "coopvecNV", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtCoopvecNV; (yyval.interm.type).coopvecNV = true; } #line 11183 "MachineIndependent/glslang_tab.cpp" break; case 554: /* type_specifier_nonarray: spirv_type_specifier */ #line 3636 "MachineIndependent/glslang.y" { parseContext.requireExtensions((yyvsp[0].interm.type).loc, 1, &E_GL_EXT_spirv_intrinsics, "SPIR-V type specifier"); (yyval.interm.type) = (yyvsp[0].interm.type); } #line 11192 "MachineIndependent/glslang_tab.cpp" break; case 555: /* type_specifier_nonarray: HITOBJECTNV */ #line 3640 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtHitObjectNV; } #line 11201 "MachineIndependent/glslang_tab.cpp" break; case 556: /* type_specifier_nonarray: struct_specifier */ #line 3644 "MachineIndependent/glslang.y" { (yyval.interm.type) = (yyvsp[0].interm.type); (yyval.interm.type).qualifier.storage = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; parseContext.structTypeCheck((yyval.interm.type).loc, (yyval.interm.type)); } #line 11211 "MachineIndependent/glslang_tab.cpp" break; case 557: /* type_specifier_nonarray: TYPE_NAME */ #line 3649 "MachineIndependent/glslang.y" { // // This is for user defined type names. The lexical phase looked up the // type. // if (const TVariable* variable = ((yyvsp[0].lex).symbol)->getAsVariable()) { const TType& structure = variable->getType(); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtStruct; (yyval.interm.type).userDef = &structure; } else parseContext.error((yyvsp[0].lex).loc, "expected type name", (yyvsp[0].lex).string->c_str(), ""); } #line 11229 "MachineIndependent/glslang_tab.cpp" break; case 558: /* precision_qualifier: HIGH_PRECISION */ #line 3665 "MachineIndependent/glslang.y" { parseContext.profileRequires((yyvsp[0].lex).loc, ENoProfile, 130, 0, "highp precision qualifier"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); parseContext.handlePrecisionQualifier((yyvsp[0].lex).loc, (yyval.interm.type).qualifier, EpqHigh); } #line 11239 "MachineIndependent/glslang_tab.cpp" break; case 559: /* precision_qualifier: MEDIUM_PRECISION */ #line 3670 "MachineIndependent/glslang.y" { parseContext.profileRequires((yyvsp[0].lex).loc, ENoProfile, 130, 0, "mediump precision qualifier"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); parseContext.handlePrecisionQualifier((yyvsp[0].lex).loc, (yyval.interm.type).qualifier, EpqMedium); } #line 11249 "MachineIndependent/glslang_tab.cpp" break; case 560: /* precision_qualifier: LOW_PRECISION */ #line 3675 "MachineIndependent/glslang.y" { parseContext.profileRequires((yyvsp[0].lex).loc, ENoProfile, 130, 0, "lowp precision qualifier"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); parseContext.handlePrecisionQualifier((yyvsp[0].lex).loc, (yyval.interm.type).qualifier, EpqLow); } #line 11259 "MachineIndependent/glslang_tab.cpp" break; case 561: /* $@3: %empty */ #line 3683 "MachineIndependent/glslang.y" { parseContext.nestedStructCheck((yyvsp[-2].lex).loc); } #line 11265 "MachineIndependent/glslang_tab.cpp" break; case 562: /* struct_specifier: STRUCT IDENTIFIER LEFT_BRACE $@3 struct_declaration_list RIGHT_BRACE */ #line 3683 "MachineIndependent/glslang.y" { TType* structure = new TType((yyvsp[-1].interm.typeList), *(yyvsp[-4].lex).string); parseContext.structArrayCheck((yyvsp[-4].lex).loc, *structure); TVariable* userTypeDef = new TVariable((yyvsp[-4].lex).string, *structure, true); if (! parseContext.symbolTable.insert(*userTypeDef)) parseContext.error((yyvsp[-4].lex).loc, "redefinition", (yyvsp[-4].lex).string->c_str(), "struct"); else if (parseContext.spvVersion.vulkanRelaxed && structure->containsOpaque()) parseContext.relaxedSymbols.push_back(structure->getTypeName()); (yyval.interm.type).init((yyvsp[-5].lex).loc); (yyval.interm.type).basicType = EbtStruct; (yyval.interm.type).userDef = structure; --parseContext.structNestingLevel; } #line 11287 "MachineIndependent/glslang_tab.cpp" break; case 563: /* $@4: %empty */ #line 3700 "MachineIndependent/glslang.y" { parseContext.nestedStructCheck((yyvsp[-1].lex).loc); } #line 11293 "MachineIndependent/glslang_tab.cpp" break; case 564: /* struct_specifier: STRUCT LEFT_BRACE $@4 struct_declaration_list RIGHT_BRACE */ #line 3700 "MachineIndependent/glslang.y" { TType* structure = new TType((yyvsp[-1].interm.typeList), TString("")); (yyval.interm.type).init((yyvsp[-4].lex).loc); (yyval.interm.type).basicType = EbtStruct; (yyval.interm.type).userDef = structure; --parseContext.structNestingLevel; } #line 11305 "MachineIndependent/glslang_tab.cpp" break; case 565: /* struct_declaration_list: struct_declaration */ #line 3710 "MachineIndependent/glslang.y" { (yyval.interm.typeList) = (yyvsp[0].interm.typeList); } #line 11313 "MachineIndependent/glslang_tab.cpp" break; case 566: /* struct_declaration_list: struct_declaration_list struct_declaration */ #line 3713 "MachineIndependent/glslang.y" { (yyval.interm.typeList) = (yyvsp[-1].interm.typeList); for (unsigned int i = 0; i < (yyvsp[0].interm.typeList)->size(); ++i) { for (unsigned int j = 0; j < (yyval.interm.typeList)->size(); ++j) { if ((*(yyval.interm.typeList))[j].type->getFieldName() == (*(yyvsp[0].interm.typeList))[i].type->getFieldName()) parseContext.error((*(yyvsp[0].interm.typeList))[i].loc, "duplicate member name:", "", (*(yyvsp[0].interm.typeList))[i].type->getFieldName().c_str()); } (yyval.interm.typeList)->push_back((*(yyvsp[0].interm.typeList))[i]); } } #line 11328 "MachineIndependent/glslang_tab.cpp" break; case 567: /* struct_declaration: type_specifier struct_declarator_list SEMICOLON */ #line 3726 "MachineIndependent/glslang.y" { if ((yyvsp[-2].interm.type).arraySizes) { parseContext.profileRequires((yyvsp[-2].interm.type).loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type"); parseContext.profileRequires((yyvsp[-2].interm.type).loc, EEsProfile, 300, 0, "arrayed type"); if (parseContext.isEsProfile()) parseContext.arraySizeRequiredCheck((yyvsp[-2].interm.type).loc, *(yyvsp[-2].interm.type).arraySizes); } (yyval.interm.typeList) = (yyvsp[-1].interm.typeList); parseContext.voidErrorCheck((yyvsp[-2].interm.type).loc, (*(yyvsp[-1].interm.typeList))[0].type->getFieldName(), (yyvsp[-2].interm.type).basicType); parseContext.precisionQualifierCheck((yyvsp[-2].interm.type).loc, (yyvsp[-2].interm.type).basicType, (yyvsp[-2].interm.type).qualifier, (yyvsp[-2].interm.type).isCoopmatOrvec()); for (unsigned int i = 0; i < (yyval.interm.typeList)->size(); ++i) { TType type((yyvsp[-2].interm.type)); type.setFieldName((*(yyval.interm.typeList))[i].type->getFieldName()); type.transferArraySizes((*(yyval.interm.typeList))[i].type->getArraySizes()); type.copyArrayInnerSizes((yyvsp[-2].interm.type).arraySizes); parseContext.arrayOfArrayVersionCheck((*(yyval.interm.typeList))[i].loc, type.getArraySizes()); (*(yyval.interm.typeList))[i].type->shallowCopy(type); } } #line 11355 "MachineIndependent/glslang_tab.cpp" break; case 568: /* struct_declaration: type_qualifier type_specifier struct_declarator_list SEMICOLON */ #line 3748 "MachineIndependent/glslang.y" { if ((yyvsp[-2].interm.type).arraySizes) { parseContext.profileRequires((yyvsp[-2].interm.type).loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type"); parseContext.profileRequires((yyvsp[-2].interm.type).loc, EEsProfile, 300, 0, "arrayed type"); if (parseContext.isEsProfile()) parseContext.arraySizeRequiredCheck((yyvsp[-2].interm.type).loc, *(yyvsp[-2].interm.type).arraySizes); } (yyval.interm.typeList) = (yyvsp[-1].interm.typeList); parseContext.memberQualifierCheck((yyvsp[-3].interm.type)); parseContext.voidErrorCheck((yyvsp[-2].interm.type).loc, (*(yyvsp[-1].interm.typeList))[0].type->getFieldName(), (yyvsp[-2].interm.type).basicType); parseContext.mergeQualifiers((yyvsp[-2].interm.type).loc, (yyvsp[-2].interm.type).qualifier, (yyvsp[-3].interm.type).qualifier, true); parseContext.precisionQualifierCheck((yyvsp[-2].interm.type).loc, (yyvsp[-2].interm.type).basicType, (yyvsp[-2].interm.type).qualifier, (yyvsp[-2].interm.type).isCoopmatOrvec()); for (unsigned int i = 0; i < (yyval.interm.typeList)->size(); ++i) { TType type((yyvsp[-2].interm.type)); type.setFieldName((*(yyval.interm.typeList))[i].type->getFieldName()); type.transferArraySizes((*(yyval.interm.typeList))[i].type->getArraySizes()); type.copyArrayInnerSizes((yyvsp[-2].interm.type).arraySizes); parseContext.arrayOfArrayVersionCheck((*(yyval.interm.typeList))[i].loc, type.getArraySizes()); (*(yyval.interm.typeList))[i].type->shallowCopy(type); } } #line 11384 "MachineIndependent/glslang_tab.cpp" break; case 569: /* struct_declarator_list: struct_declarator */ #line 3775 "MachineIndependent/glslang.y" { (yyval.interm.typeList) = new TTypeList; (yyval.interm.typeList)->push_back((yyvsp[0].interm.typeLine)); } #line 11393 "MachineIndependent/glslang_tab.cpp" break; case 570: /* struct_declarator_list: struct_declarator_list COMMA struct_declarator */ #line 3779 "MachineIndependent/glslang.y" { (yyval.interm.typeList)->push_back((yyvsp[0].interm.typeLine)); } #line 11401 "MachineIndependent/glslang_tab.cpp" break; case 571: /* struct_declarator: IDENTIFIER */ #line 3785 "MachineIndependent/glslang.y" { (yyval.interm.typeLine).type = new TType(EbtVoid); (yyval.interm.typeLine).loc = (yyvsp[0].lex).loc; (yyval.interm.typeLine).type->setFieldName(*(yyvsp[0].lex).string); } #line 11411 "MachineIndependent/glslang_tab.cpp" break; case 572: /* struct_declarator: IDENTIFIER array_specifier */ #line 3790 "MachineIndependent/glslang.y" { parseContext.arrayOfArrayVersionCheck((yyvsp[-1].lex).loc, (yyvsp[0].interm).arraySizes); (yyval.interm.typeLine).type = new TType(EbtVoid); (yyval.interm.typeLine).loc = (yyvsp[-1].lex).loc; (yyval.interm.typeLine).type->setFieldName(*(yyvsp[-1].lex).string); (yyval.interm.typeLine).type->transferArraySizes((yyvsp[0].interm).arraySizes); } #line 11424 "MachineIndependent/glslang_tab.cpp" break; case 573: /* initializer: assignment_expression */ #line 3801 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } #line 11432 "MachineIndependent/glslang_tab.cpp" break; case 574: /* initializer: LEFT_BRACE initializer_list RIGHT_BRACE */ #line 3804 "MachineIndependent/glslang.y" { const char* initFeature = "{ } style initializers"; parseContext.requireProfile((yyvsp[-2].lex).loc, ~EEsProfile, initFeature); parseContext.profileRequires((yyvsp[-2].lex).loc, ~EEsProfile, 420, E_GL_ARB_shading_language_420pack, initFeature); (yyval.interm.intermTypedNode) = (yyvsp[-1].interm.intermTypedNode); } #line 11443 "MachineIndependent/glslang_tab.cpp" break; case 575: /* initializer: LEFT_BRACE initializer_list COMMA RIGHT_BRACE */ #line 3810 "MachineIndependent/glslang.y" { const char* initFeature = "{ } style initializers"; parseContext.requireProfile((yyvsp[-3].lex).loc, ~EEsProfile, initFeature); parseContext.profileRequires((yyvsp[-3].lex).loc, ~EEsProfile, 420, E_GL_ARB_shading_language_420pack, initFeature); (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); } #line 11454 "MachineIndependent/glslang_tab.cpp" break; case 576: /* initializer: LEFT_BRACE RIGHT_BRACE */ #line 3816 "MachineIndependent/glslang.y" { const char* initFeature = "empty { } initializer"; parseContext.profileRequires((yyvsp[-1].lex).loc, EEsProfile, 0, E_GL_EXT_null_initializer, initFeature); parseContext.profileRequires((yyvsp[-1].lex).loc, ~EEsProfile, 0, E_GL_EXT_null_initializer, initFeature); (yyval.interm.intermTypedNode) = parseContext.intermediate.makeAggregate((yyvsp[-1].lex).loc); } #line 11465 "MachineIndependent/glslang_tab.cpp" break; case 577: /* initializer_list: initializer */ #line 3825 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.intermediate.growAggregate(0, (yyvsp[0].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)->getLoc()); } #line 11473 "MachineIndependent/glslang_tab.cpp" break; case 578: /* initializer_list: initializer_list COMMA initializer */ #line 3828 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.intermediate.growAggregate((yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); } #line 11481 "MachineIndependent/glslang_tab.cpp" break; case 579: /* declaration_statement: declaration */ #line 3834 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } #line 11487 "MachineIndependent/glslang_tab.cpp" break; case 580: /* statement: compound_statement */ #line 3838 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } #line 11493 "MachineIndependent/glslang_tab.cpp" break; case 581: /* statement: simple_statement */ #line 3839 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } #line 11499 "MachineIndependent/glslang_tab.cpp" break; case 582: /* simple_statement: declaration_statement */ #line 3845 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } #line 11505 "MachineIndependent/glslang_tab.cpp" break; case 583: /* simple_statement: expression_statement */ #line 3846 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } #line 11511 "MachineIndependent/glslang_tab.cpp" break; case 584: /* simple_statement: selection_statement */ #line 3847 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } #line 11517 "MachineIndependent/glslang_tab.cpp" break; case 585: /* simple_statement: switch_statement */ #line 3848 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } #line 11523 "MachineIndependent/glslang_tab.cpp" break; case 586: /* simple_statement: case_label */ #line 3849 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } #line 11529 "MachineIndependent/glslang_tab.cpp" break; case 587: /* simple_statement: iteration_statement */ #line 3850 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } #line 11535 "MachineIndependent/glslang_tab.cpp" break; case 588: /* simple_statement: jump_statement */ #line 3851 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } #line 11541 "MachineIndependent/glslang_tab.cpp" break; case 589: /* simple_statement: demote_statement */ #line 3852 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } #line 11547 "MachineIndependent/glslang_tab.cpp" break; case 590: /* demote_statement: DEMOTE SEMICOLON */ #line 3856 "MachineIndependent/glslang.y" { parseContext.requireStage((yyvsp[-1].lex).loc, EShLangFragment, "demote"); parseContext.requireExtensions((yyvsp[-1].lex).loc, 1, &E_GL_EXT_demote_to_helper_invocation, "demote"); (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpDemote, (yyvsp[-1].lex).loc); } #line 11557 "MachineIndependent/glslang_tab.cpp" break; case 591: /* compound_statement: LEFT_BRACE RIGHT_BRACE */ #line 3864 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = 0; } #line 11563 "MachineIndependent/glslang_tab.cpp" break; case 592: /* $@5: %empty */ #line 3865 "MachineIndependent/glslang.y" { parseContext.symbolTable.push(); ++parseContext.statementNestingLevel; } #line 11572 "MachineIndependent/glslang_tab.cpp" break; case 593: /* $@6: %empty */ #line 3869 "MachineIndependent/glslang.y" { parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]); --parseContext.statementNestingLevel; } #line 11581 "MachineIndependent/glslang_tab.cpp" break; case 594: /* compound_statement: LEFT_BRACE $@5 statement_list $@6 RIGHT_BRACE */ #line 3873 "MachineIndependent/glslang.y" { if ((yyvsp[-2].interm.intermNode) && (yyvsp[-2].interm.intermNode)->getAsAggregate()) { (yyvsp[-2].interm.intermNode)->getAsAggregate()->setOperator(parseContext.intermediate.getDebugInfo() ? EOpScope : EOpSequence); (yyvsp[-2].interm.intermNode)->getAsAggregate()->setEndLoc((yyvsp[0].lex).loc); } (yyval.interm.intermNode) = (yyvsp[-2].interm.intermNode); } #line 11593 "MachineIndependent/glslang_tab.cpp" break; case 595: /* statement_no_new_scope: compound_statement_no_new_scope */ #line 3883 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } #line 11599 "MachineIndependent/glslang_tab.cpp" break; case 596: /* statement_no_new_scope: simple_statement */ #line 3884 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } #line 11605 "MachineIndependent/glslang_tab.cpp" break; case 597: /* $@7: %empty */ #line 3888 "MachineIndependent/glslang.y" { ++parseContext.controlFlowNestingLevel; } #line 11613 "MachineIndependent/glslang_tab.cpp" break; case 598: /* statement_scoped: $@7 compound_statement */ #line 3891 "MachineIndependent/glslang.y" { --parseContext.controlFlowNestingLevel; (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } #line 11622 "MachineIndependent/glslang_tab.cpp" break; case 599: /* $@8: %empty */ #line 3895 "MachineIndependent/glslang.y" { parseContext.symbolTable.push(); ++parseContext.statementNestingLevel; ++parseContext.controlFlowNestingLevel; } #line 11632 "MachineIndependent/glslang_tab.cpp" break; case 600: /* statement_scoped: $@8 simple_statement */ #line 3900 "MachineIndependent/glslang.y" { parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]); --parseContext.statementNestingLevel; --parseContext.controlFlowNestingLevel; (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } #line 11643 "MachineIndependent/glslang_tab.cpp" break; case 601: /* compound_statement_no_new_scope: LEFT_BRACE RIGHT_BRACE */ #line 3909 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = 0; } #line 11651 "MachineIndependent/glslang_tab.cpp" break; case 602: /* compound_statement_no_new_scope: LEFT_BRACE statement_list RIGHT_BRACE */ #line 3912 "MachineIndependent/glslang.y" { if ((yyvsp[-1].interm.intermNode) && (yyvsp[-1].interm.intermNode)->getAsAggregate()) { (yyvsp[-1].interm.intermNode)->getAsAggregate()->setOperator(EOpSequence); (yyvsp[-1].interm.intermNode)->getAsAggregate()->setEndLoc((yyvsp[0].lex).loc); } (yyval.interm.intermNode) = (yyvsp[-1].interm.intermNode); } #line 11663 "MachineIndependent/glslang_tab.cpp" break; case 603: /* statement_list: statement */ #line 3922 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.makeAggregate((yyvsp[0].interm.intermNode)); if ((yyvsp[0].interm.intermNode) && (yyvsp[0].interm.intermNode)->getAsBranchNode() && ((yyvsp[0].interm.intermNode)->getAsBranchNode()->getFlowOp() == EOpCase || (yyvsp[0].interm.intermNode)->getAsBranchNode()->getFlowOp() == EOpDefault)) { parseContext.wrapupSwitchSubsequence(0, (yyvsp[0].interm.intermNode)); (yyval.interm.intermNode) = 0; // start a fresh subsequence for what's after this case } } #line 11676 "MachineIndependent/glslang_tab.cpp" break; case 604: /* statement_list: statement_list statement */ #line 3930 "MachineIndependent/glslang.y" { if ((yyvsp[0].interm.intermNode) && (yyvsp[0].interm.intermNode)->getAsBranchNode() && ((yyvsp[0].interm.intermNode)->getAsBranchNode()->getFlowOp() == EOpCase || (yyvsp[0].interm.intermNode)->getAsBranchNode()->getFlowOp() == EOpDefault)) { parseContext.wrapupSwitchSubsequence((yyvsp[-1].interm.intermNode) ? (yyvsp[-1].interm.intermNode)->getAsAggregate() : 0, (yyvsp[0].interm.intermNode)); (yyval.interm.intermNode) = 0; // start a fresh subsequence for what's after this case } else (yyval.interm.intermNode) = parseContext.intermediate.growAggregate((yyvsp[-1].interm.intermNode), (yyvsp[0].interm.intermNode)); } #line 11689 "MachineIndependent/glslang_tab.cpp" break; case 605: /* expression_statement: SEMICOLON */ #line 3941 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = 0; } #line 11695 "MachineIndependent/glslang_tab.cpp" break; case 606: /* expression_statement: expression SEMICOLON */ #line 3942 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = static_cast((yyvsp[-1].interm.intermTypedNode)); } #line 11701 "MachineIndependent/glslang_tab.cpp" break; case 607: /* selection_statement: selection_statement_nonattributed */ #line 3946 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } #line 11709 "MachineIndependent/glslang_tab.cpp" break; case 608: /* selection_statement: attribute selection_statement_nonattributed */ #line 3949 "MachineIndependent/glslang.y" { parseContext.requireExtensions((yyvsp[0].interm.intermNode)->getLoc(), 1, &E_GL_EXT_control_flow_attributes, "attribute"); parseContext.handleSelectionAttributes(*(yyvsp[-1].interm.attributes), (yyvsp[0].interm.intermNode)); (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } #line 11719 "MachineIndependent/glslang_tab.cpp" break; case 609: /* selection_statement_nonattributed: IF LEFT_PAREN expression RIGHT_PAREN selection_rest_statement */ #line 3956 "MachineIndependent/glslang.y" { parseContext.boolCheck((yyvsp[-4].lex).loc, (yyvsp[-2].interm.intermTypedNode)); (yyval.interm.intermNode) = parseContext.intermediate.addSelection((yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.nodePair), (yyvsp[-4].lex).loc); } #line 11728 "MachineIndependent/glslang_tab.cpp" break; case 610: /* selection_rest_statement: statement_scoped ELSE statement_scoped */ #line 3963 "MachineIndependent/glslang.y" { (yyval.interm.nodePair).node1 = (yyvsp[-2].interm.intermNode); (yyval.interm.nodePair).node2 = (yyvsp[0].interm.intermNode); } #line 11737 "MachineIndependent/glslang_tab.cpp" break; case 611: /* selection_rest_statement: statement_scoped */ #line 3967 "MachineIndependent/glslang.y" { (yyval.interm.nodePair).node1 = (yyvsp[0].interm.intermNode); (yyval.interm.nodePair).node2 = 0; } #line 11746 "MachineIndependent/glslang_tab.cpp" break; case 612: /* condition: expression */ #line 3975 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); parseContext.boolCheck((yyvsp[0].interm.intermTypedNode)->getLoc(), (yyvsp[0].interm.intermTypedNode)); } #line 11755 "MachineIndependent/glslang_tab.cpp" break; case 613: /* condition: fully_specified_type IDENTIFIER EQUAL initializer */ #line 3979 "MachineIndependent/glslang.y" { parseContext.boolCheck((yyvsp[-2].lex).loc, (yyvsp[-3].interm.type)); TType type((yyvsp[-3].interm.type)); TIntermNode* initNode = parseContext.declareVariable((yyvsp[-2].lex).loc, *(yyvsp[-2].lex).string, (yyvsp[-3].interm.type), 0, (yyvsp[0].interm.intermTypedNode)); if (initNode) (yyval.interm.intermTypedNode) = initNode->getAsTyped(); else (yyval.interm.intermTypedNode) = 0; } #line 11770 "MachineIndependent/glslang_tab.cpp" break; case 614: /* switch_statement: switch_statement_nonattributed */ #line 3992 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } #line 11778 "MachineIndependent/glslang_tab.cpp" break; case 615: /* switch_statement: attribute switch_statement_nonattributed */ #line 3995 "MachineIndependent/glslang.y" { parseContext.requireExtensions((yyvsp[0].interm.intermNode)->getLoc(), 1, &E_GL_EXT_control_flow_attributes, "attribute"); parseContext.handleSwitchAttributes(*(yyvsp[-1].interm.attributes), (yyvsp[0].interm.intermNode)); (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } #line 11788 "MachineIndependent/glslang_tab.cpp" break; case 616: /* $@9: %empty */ #line 4002 "MachineIndependent/glslang.y" { // start new switch sequence on the switch stack ++parseContext.controlFlowNestingLevel; ++parseContext.statementNestingLevel; parseContext.switchSequenceStack.push_back(new TIntermSequence); parseContext.switchLevel.push_back(parseContext.statementNestingLevel); parseContext.symbolTable.push(); } #line 11801 "MachineIndependent/glslang_tab.cpp" break; case 617: /* switch_statement_nonattributed: SWITCH LEFT_PAREN expression RIGHT_PAREN $@9 LEFT_BRACE switch_statement_list RIGHT_BRACE */ #line 4010 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.addSwitch((yyvsp[-7].lex).loc, (yyvsp[-5].interm.intermTypedNode), (yyvsp[-1].interm.intermNode) ? (yyvsp[-1].interm.intermNode)->getAsAggregate() : 0); delete parseContext.switchSequenceStack.back(); parseContext.switchSequenceStack.pop_back(); parseContext.switchLevel.pop_back(); parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]); --parseContext.statementNestingLevel; --parseContext.controlFlowNestingLevel; } #line 11815 "MachineIndependent/glslang_tab.cpp" break; case 618: /* switch_statement_list: %empty */ #line 4022 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = 0; } #line 11823 "MachineIndependent/glslang_tab.cpp" break; case 619: /* switch_statement_list: statement_list */ #line 4025 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } #line 11831 "MachineIndependent/glslang_tab.cpp" break; case 620: /* case_label: CASE expression COLON */ #line 4031 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = 0; if (parseContext.switchLevel.size() == 0) parseContext.error((yyvsp[-2].lex).loc, "cannot appear outside switch statement", "case", ""); else if (parseContext.switchLevel.back() != parseContext.statementNestingLevel) parseContext.error((yyvsp[-2].lex).loc, "cannot be nested inside control flow", "case", ""); else { parseContext.constantValueCheck((yyvsp[-1].interm.intermTypedNode), "case"); parseContext.integerCheck((yyvsp[-1].interm.intermTypedNode), "case"); (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpCase, (yyvsp[-1].interm.intermTypedNode), (yyvsp[-2].lex).loc); } } #line 11848 "MachineIndependent/glslang_tab.cpp" break; case 621: /* case_label: DEFAULT COLON */ #line 4043 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = 0; if (parseContext.switchLevel.size() == 0) parseContext.error((yyvsp[-1].lex).loc, "cannot appear outside switch statement", "default", ""); else if (parseContext.switchLevel.back() != parseContext.statementNestingLevel) parseContext.error((yyvsp[-1].lex).loc, "cannot be nested inside control flow", "default", ""); else (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpDefault, (yyvsp[-1].lex).loc); } #line 11862 "MachineIndependent/glslang_tab.cpp" break; case 622: /* iteration_statement: iteration_statement_nonattributed */ #line 4055 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } #line 11870 "MachineIndependent/glslang_tab.cpp" break; case 623: /* iteration_statement: attribute iteration_statement_nonattributed */ #line 4058 "MachineIndependent/glslang.y" { const char * extensions[2] = { E_GL_EXT_control_flow_attributes, E_GL_EXT_control_flow_attributes2 }; parseContext.requireExtensions((yyvsp[0].interm.intermNode)->getLoc(), 2, extensions, "attribute"); parseContext.handleLoopAttributes(*(yyvsp[-1].interm.attributes), (yyvsp[0].interm.intermNode)); (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } #line 11881 "MachineIndependent/glslang_tab.cpp" break; case 624: /* $@10: %empty */ #line 4066 "MachineIndependent/glslang.y" { if (! parseContext.limits.whileLoops) parseContext.error((yyvsp[-1].lex).loc, "while loops not available", "limitation", ""); parseContext.symbolTable.push(); ++parseContext.loopNestingLevel; ++parseContext.statementNestingLevel; ++parseContext.controlFlowNestingLevel; } #line 11894 "MachineIndependent/glslang_tab.cpp" break; case 625: /* iteration_statement_nonattributed: WHILE LEFT_PAREN $@10 condition RIGHT_PAREN statement_no_new_scope */ #line 4074 "MachineIndependent/glslang.y" { parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]); (yyval.interm.intermNode) = parseContext.intermediate.addLoop((yyvsp[0].interm.intermNode), (yyvsp[-2].interm.intermTypedNode), 0, true, (yyvsp[-5].lex).loc); --parseContext.loopNestingLevel; --parseContext.statementNestingLevel; --parseContext.controlFlowNestingLevel; } #line 11906 "MachineIndependent/glslang_tab.cpp" break; case 626: /* $@11: %empty */ #line 4081 "MachineIndependent/glslang.y" { parseContext.symbolTable.push(); ++parseContext.loopNestingLevel; ++parseContext.statementNestingLevel; ++parseContext.controlFlowNestingLevel; } #line 11917 "MachineIndependent/glslang_tab.cpp" break; case 627: /* iteration_statement_nonattributed: DO $@11 statement WHILE LEFT_PAREN expression RIGHT_PAREN SEMICOLON */ #line 4087 "MachineIndependent/glslang.y" { if (! parseContext.limits.whileLoops) parseContext.error((yyvsp[-7].lex).loc, "do-while loops not available", "limitation", ""); parseContext.boolCheck((yyvsp[0].lex).loc, (yyvsp[-2].interm.intermTypedNode)); (yyval.interm.intermNode) = parseContext.intermediate.addLoop((yyvsp[-5].interm.intermNode), (yyvsp[-2].interm.intermTypedNode), 0, false, (yyvsp[-4].lex).loc); parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]); --parseContext.loopNestingLevel; --parseContext.statementNestingLevel; --parseContext.controlFlowNestingLevel; } #line 11934 "MachineIndependent/glslang_tab.cpp" break; case 628: /* $@12: %empty */ #line 4099 "MachineIndependent/glslang.y" { parseContext.symbolTable.push(); ++parseContext.loopNestingLevel; ++parseContext.statementNestingLevel; ++parseContext.controlFlowNestingLevel; } #line 11945 "MachineIndependent/glslang_tab.cpp" break; case 629: /* iteration_statement_nonattributed: FOR LEFT_PAREN $@12 for_init_statement for_rest_statement RIGHT_PAREN statement_no_new_scope */ #line 4105 "MachineIndependent/glslang.y" { parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]); (yyval.interm.intermNode) = parseContext.intermediate.makeAggregate((yyvsp[-3].interm.intermNode), (yyvsp[-5].lex).loc); TIntermLoop* forLoop = parseContext.intermediate.addLoop((yyvsp[0].interm.intermNode), reinterpret_cast((yyvsp[-2].interm.nodePair).node1), reinterpret_cast((yyvsp[-2].interm.nodePair).node2), true, (yyvsp[-6].lex).loc); if (! parseContext.limits.nonInductiveForLoops) parseContext.inductiveLoopCheck((yyvsp[-6].lex).loc, (yyvsp[-3].interm.intermNode), forLoop); (yyval.interm.intermNode) = parseContext.intermediate.growAggregate((yyval.interm.intermNode), forLoop, (yyvsp[-6].lex).loc); (yyval.interm.intermNode)->getAsAggregate()->setOperator(EOpSequence); --parseContext.loopNestingLevel; --parseContext.statementNestingLevel; --parseContext.controlFlowNestingLevel; } #line 11962 "MachineIndependent/glslang_tab.cpp" break; case 630: /* for_init_statement: expression_statement */ #line 4120 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } #line 11970 "MachineIndependent/glslang_tab.cpp" break; case 631: /* for_init_statement: declaration_statement */ #line 4123 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } #line 11978 "MachineIndependent/glslang_tab.cpp" break; case 632: /* conditionopt: condition */ #line 4129 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } #line 11986 "MachineIndependent/glslang_tab.cpp" break; case 633: /* conditionopt: %empty */ #line 4132 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = 0; } #line 11994 "MachineIndependent/glslang_tab.cpp" break; case 634: /* for_rest_statement: conditionopt SEMICOLON */ #line 4138 "MachineIndependent/glslang.y" { (yyval.interm.nodePair).node1 = (yyvsp[-1].interm.intermTypedNode); (yyval.interm.nodePair).node2 = 0; } #line 12003 "MachineIndependent/glslang_tab.cpp" break; case 635: /* for_rest_statement: conditionopt SEMICOLON expression */ #line 4142 "MachineIndependent/glslang.y" { (yyval.interm.nodePair).node1 = (yyvsp[-2].interm.intermTypedNode); (yyval.interm.nodePair).node2 = (yyvsp[0].interm.intermTypedNode); } #line 12012 "MachineIndependent/glslang_tab.cpp" break; case 636: /* jump_statement: CONTINUE SEMICOLON */ #line 4149 "MachineIndependent/glslang.y" { if (parseContext.loopNestingLevel <= 0) parseContext.error((yyvsp[-1].lex).loc, "continue statement only allowed in loops", "", ""); (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpContinue, (yyvsp[-1].lex).loc); } #line 12022 "MachineIndependent/glslang_tab.cpp" break; case 637: /* jump_statement: BREAK SEMICOLON */ #line 4154 "MachineIndependent/glslang.y" { if (parseContext.loopNestingLevel + parseContext.switchSequenceStack.size() <= 0) parseContext.error((yyvsp[-1].lex).loc, "break statement only allowed in switch and loops", "", ""); (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpBreak, (yyvsp[-1].lex).loc); } #line 12032 "MachineIndependent/glslang_tab.cpp" break; case 638: /* jump_statement: RETURN SEMICOLON */ #line 4159 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpReturn, (yyvsp[-1].lex).loc); if (parseContext.currentFunctionType->getBasicType() != EbtVoid) parseContext.error((yyvsp[-1].lex).loc, "non-void function must return a value", "return", ""); if (parseContext.inMain) parseContext.postEntryPointReturn = true; } #line 12044 "MachineIndependent/glslang_tab.cpp" break; case 639: /* jump_statement: RETURN expression SEMICOLON */ #line 4166 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.handleReturnValue((yyvsp[-2].lex).loc, (yyvsp[-1].interm.intermTypedNode)); } #line 12052 "MachineIndependent/glslang_tab.cpp" break; case 640: /* jump_statement: DISCARD SEMICOLON */ #line 4169 "MachineIndependent/glslang.y" { parseContext.requireStage((yyvsp[-1].lex).loc, EShLangFragment, "discard"); (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpKill, (yyvsp[-1].lex).loc); } #line 12061 "MachineIndependent/glslang_tab.cpp" break; case 641: /* jump_statement: TERMINATE_INVOCATION SEMICOLON */ #line 4173 "MachineIndependent/glslang.y" { parseContext.requireStage((yyvsp[-1].lex).loc, EShLangFragment, "terminateInvocation"); (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpTerminateInvocation, (yyvsp[-1].lex).loc); } #line 12070 "MachineIndependent/glslang_tab.cpp" break; case 642: /* jump_statement: TERMINATE_RAY SEMICOLON */ #line 4177 "MachineIndependent/glslang.y" { parseContext.requireStage((yyvsp[-1].lex).loc, EShLangAnyHit, "terminateRayEXT"); (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpTerminateRayKHR, (yyvsp[-1].lex).loc); } #line 12079 "MachineIndependent/glslang_tab.cpp" break; case 643: /* jump_statement: IGNORE_INTERSECTION SEMICOLON */ #line 4181 "MachineIndependent/glslang.y" { parseContext.requireStage((yyvsp[-1].lex).loc, EShLangAnyHit, "ignoreIntersectionEXT"); (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpIgnoreIntersectionKHR, (yyvsp[-1].lex).loc); } #line 12088 "MachineIndependent/glslang_tab.cpp" break; case 644: /* translation_unit: external_declaration */ #line 4190 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); parseContext.intermediate.setTreeRoot((yyval.interm.intermNode)); } #line 12097 "MachineIndependent/glslang_tab.cpp" break; case 645: /* translation_unit: translation_unit external_declaration */ #line 4194 "MachineIndependent/glslang.y" { if ((yyvsp[0].interm.intermNode) != nullptr) { (yyval.interm.intermNode) = parseContext.intermediate.growAggregate((yyvsp[-1].interm.intermNode), (yyvsp[0].interm.intermNode)); parseContext.intermediate.setTreeRoot((yyval.interm.intermNode)); } } #line 12108 "MachineIndependent/glslang_tab.cpp" break; case 646: /* external_declaration: function_definition */ #line 4203 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } #line 12116 "MachineIndependent/glslang_tab.cpp" break; case 647: /* external_declaration: declaration */ #line 4206 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } #line 12124 "MachineIndependent/glslang_tab.cpp" break; case 648: /* external_declaration: SEMICOLON */ #line 4209 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ~EEsProfile, "extraneous semicolon"); parseContext.profileRequires((yyvsp[0].lex).loc, ~EEsProfile, 460, nullptr, "extraneous semicolon"); (yyval.interm.intermNode) = nullptr; } #line 12134 "MachineIndependent/glslang_tab.cpp" break; case 649: /* $@13: %empty */ #line 4217 "MachineIndependent/glslang.y" { (yyvsp[0].interm).function = parseContext.handleFunctionDeclarator((yyvsp[0].interm).loc, *(yyvsp[0].interm).function, false /* not prototype */); (yyvsp[0].interm).intermNode = parseContext.handleFunctionDefinition((yyvsp[0].interm).loc, *(yyvsp[0].interm).function); // For ES 100 only, according to ES shading language 100 spec: A function // body has a scope nested inside the function's definition. if (parseContext.profile == EEsProfile && parseContext.version == 100) { parseContext.symbolTable.push(); ++parseContext.statementNestingLevel; } } #line 12151 "MachineIndependent/glslang_tab.cpp" break; case 650: /* function_definition: function_prototype $@13 compound_statement_no_new_scope */ #line 4229 "MachineIndependent/glslang.y" { // May be best done as post process phase on intermediate code if (parseContext.currentFunctionType->getBasicType() != EbtVoid && ! parseContext.functionReturnsValue) parseContext.error((yyvsp[-2].interm).loc, "function does not return a value:", "", (yyvsp[-2].interm).function->getName().c_str()); parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]); (yyval.interm.intermNode) = parseContext.intermediate.growAggregate((yyvsp[-2].interm).intermNode, (yyvsp[0].interm.intermNode)); (yyval.interm.intermNode)->getAsAggregate()->setLinkType((yyvsp[-2].interm).function->getLinkType()); parseContext.intermediate.setAggregateOperator((yyval.interm.intermNode), EOpFunction, (yyvsp[-2].interm).function->getType(), (yyvsp[-2].interm).loc); (yyval.interm.intermNode)->getAsAggregate()->setName((yyvsp[-2].interm).function->getMangledName().c_str()); // store the pragma information for debug and optimize and other vendor specific // information. This information can be queried from the parse tree (yyval.interm.intermNode)->getAsAggregate()->setOptimize(parseContext.contextPragma.optimize); (yyval.interm.intermNode)->getAsAggregate()->setDebug(parseContext.contextPragma.debug); (yyval.interm.intermNode)->getAsAggregate()->setPragmaTable(parseContext.contextPragma.pragmaTable); // Set currentFunctionType to empty pointer when goes outside of the function parseContext.currentFunctionType = nullptr; // For ES 100 only, according to ES shading language 100 spec: A function // body has a scope nested inside the function's definition. if (parseContext.profile == EEsProfile && parseContext.version == 100) { parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]); --parseContext.statementNestingLevel; } } #line 12183 "MachineIndependent/glslang_tab.cpp" break; case 651: /* attribute: LEFT_BRACKET LEFT_BRACKET attribute_list RIGHT_BRACKET RIGHT_BRACKET */ #line 4259 "MachineIndependent/glslang.y" { (yyval.interm.attributes) = (yyvsp[-2].interm.attributes); } #line 12191 "MachineIndependent/glslang_tab.cpp" break; case 652: /* attribute_list: single_attribute */ #line 4264 "MachineIndependent/glslang.y" { (yyval.interm.attributes) = (yyvsp[0].interm.attributes); } #line 12199 "MachineIndependent/glslang_tab.cpp" break; case 653: /* attribute_list: attribute_list COMMA single_attribute */ #line 4267 "MachineIndependent/glslang.y" { (yyval.interm.attributes) = parseContext.mergeAttributes((yyvsp[-2].interm.attributes), (yyvsp[0].interm.attributes)); } #line 12207 "MachineIndependent/glslang_tab.cpp" break; case 654: /* single_attribute: IDENTIFIER */ #line 4272 "MachineIndependent/glslang.y" { (yyval.interm.attributes) = parseContext.makeAttributes(*(yyvsp[0].lex).string); } #line 12215 "MachineIndependent/glslang_tab.cpp" break; case 655: /* single_attribute: IDENTIFIER LEFT_PAREN constant_expression RIGHT_PAREN */ #line 4275 "MachineIndependent/glslang.y" { (yyval.interm.attributes) = parseContext.makeAttributes(*(yyvsp[-3].lex).string, (yyvsp[-1].interm.intermTypedNode)); } #line 12223 "MachineIndependent/glslang_tab.cpp" break; case 656: /* spirv_requirements_list: spirv_requirements_parameter */ #line 4280 "MachineIndependent/glslang.y" { (yyval.interm.spirvReq) = (yyvsp[0].interm.spirvReq); } #line 12231 "MachineIndependent/glslang_tab.cpp" break; case 657: /* spirv_requirements_list: spirv_requirements_list COMMA spirv_requirements_parameter */ #line 4283 "MachineIndependent/glslang.y" { (yyval.interm.spirvReq) = parseContext.mergeSpirvRequirements((yyvsp[-1].lex).loc, (yyvsp[-2].interm.spirvReq), (yyvsp[0].interm.spirvReq)); } #line 12239 "MachineIndependent/glslang_tab.cpp" break; case 658: /* spirv_requirements_parameter: IDENTIFIER EQUAL LEFT_BRACKET spirv_extension_list RIGHT_BRACKET */ #line 4288 "MachineIndependent/glslang.y" { (yyval.interm.spirvReq) = parseContext.makeSpirvRequirement((yyvsp[-3].lex).loc, *(yyvsp[-4].lex).string, (yyvsp[-1].interm.intermNode)->getAsAggregate(), nullptr); } #line 12247 "MachineIndependent/glslang_tab.cpp" break; case 659: /* spirv_requirements_parameter: IDENTIFIER EQUAL LEFT_BRACKET spirv_capability_list RIGHT_BRACKET */ #line 4291 "MachineIndependent/glslang.y" { (yyval.interm.spirvReq) = parseContext.makeSpirvRequirement((yyvsp[-3].lex).loc, *(yyvsp[-4].lex).string, nullptr, (yyvsp[-1].interm.intermNode)->getAsAggregate()); } #line 12255 "MachineIndependent/glslang_tab.cpp" break; case 660: /* spirv_extension_list: STRING_LITERAL */ #line 4296 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.makeAggregate(parseContext.intermediate.addConstantUnion((yyvsp[0].lex).string, (yyvsp[0].lex).loc, true)); } #line 12263 "MachineIndependent/glslang_tab.cpp" break; case 661: /* spirv_extension_list: spirv_extension_list COMMA STRING_LITERAL */ #line 4299 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.growAggregate((yyvsp[-2].interm.intermNode), parseContext.intermediate.addConstantUnion((yyvsp[0].lex).string, (yyvsp[0].lex).loc, true)); } #line 12271 "MachineIndependent/glslang_tab.cpp" break; case 662: /* spirv_capability_list: INTCONSTANT */ #line 4304 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.makeAggregate(parseContext.intermediate.addConstantUnion((yyvsp[0].lex).i, (yyvsp[0].lex).loc, true)); } #line 12279 "MachineIndependent/glslang_tab.cpp" break; case 663: /* spirv_capability_list: spirv_capability_list COMMA INTCONSTANT */ #line 4307 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.growAggregate((yyvsp[-2].interm.intermNode), parseContext.intermediate.addConstantUnion((yyvsp[0].lex).i, (yyvsp[0].lex).loc, true)); } #line 12287 "MachineIndependent/glslang_tab.cpp" break; case 664: /* spirv_execution_mode_qualifier: SPIRV_EXECUTION_MODE LEFT_PAREN INTCONSTANT RIGHT_PAREN */ #line 4312 "MachineIndependent/glslang.y" { parseContext.intermediate.insertSpirvExecutionMode((yyvsp[-1].lex).i); (yyval.interm.intermNode) = 0; } #line 12296 "MachineIndependent/glslang_tab.cpp" break; case 665: /* spirv_execution_mode_qualifier: SPIRV_EXECUTION_MODE LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT RIGHT_PAREN */ #line 4316 "MachineIndependent/glslang.y" { parseContext.intermediate.insertSpirvRequirement((yyvsp[-3].interm.spirvReq)); parseContext.intermediate.insertSpirvExecutionMode((yyvsp[-1].lex).i); (yyval.interm.intermNode) = 0; } #line 12306 "MachineIndependent/glslang_tab.cpp" break; case 666: /* spirv_execution_mode_qualifier: SPIRV_EXECUTION_MODE LEFT_PAREN INTCONSTANT COMMA spirv_execution_mode_parameter_list RIGHT_PAREN */ #line 4321 "MachineIndependent/glslang.y" { parseContext.intermediate.insertSpirvExecutionMode((yyvsp[-3].lex).i, (yyvsp[-1].interm.intermNode)->getAsAggregate()); (yyval.interm.intermNode) = 0; } #line 12315 "MachineIndependent/glslang_tab.cpp" break; case 667: /* spirv_execution_mode_qualifier: SPIRV_EXECUTION_MODE LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT COMMA spirv_execution_mode_parameter_list RIGHT_PAREN */ #line 4325 "MachineIndependent/glslang.y" { parseContext.intermediate.insertSpirvRequirement((yyvsp[-5].interm.spirvReq)); parseContext.intermediate.insertSpirvExecutionMode((yyvsp[-3].lex).i, (yyvsp[-1].interm.intermNode)->getAsAggregate()); (yyval.interm.intermNode) = 0; } #line 12325 "MachineIndependent/glslang_tab.cpp" break; case 668: /* spirv_execution_mode_qualifier: SPIRV_EXECUTION_MODE_ID LEFT_PAREN INTCONSTANT COMMA spirv_execution_mode_id_parameter_list RIGHT_PAREN */ #line 4330 "MachineIndependent/glslang.y" { parseContext.intermediate.insertSpirvExecutionModeId((yyvsp[-3].lex).i, (yyvsp[-1].interm.intermNode)->getAsAggregate()); (yyval.interm.intermNode) = 0; } #line 12334 "MachineIndependent/glslang_tab.cpp" break; case 669: /* spirv_execution_mode_qualifier: SPIRV_EXECUTION_MODE_ID LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT COMMA spirv_execution_mode_id_parameter_list RIGHT_PAREN */ #line 4334 "MachineIndependent/glslang.y" { parseContext.intermediate.insertSpirvRequirement((yyvsp[-5].interm.spirvReq)); parseContext.intermediate.insertSpirvExecutionModeId((yyvsp[-3].lex).i, (yyvsp[-1].interm.intermNode)->getAsAggregate()); (yyval.interm.intermNode) = 0; } #line 12344 "MachineIndependent/glslang_tab.cpp" break; case 670: /* spirv_execution_mode_parameter_list: spirv_execution_mode_parameter */ #line 4341 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.makeAggregate((yyvsp[0].interm.intermNode)); } #line 12352 "MachineIndependent/glslang_tab.cpp" break; case 671: /* spirv_execution_mode_parameter_list: spirv_execution_mode_parameter_list COMMA spirv_execution_mode_parameter */ #line 4344 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.growAggregate((yyvsp[-2].interm.intermNode), (yyvsp[0].interm.intermNode)); } #line 12360 "MachineIndependent/glslang_tab.cpp" break; case 672: /* spirv_execution_mode_parameter: FLOATCONSTANT */ #line 4349 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).d, EbtFloat, (yyvsp[0].lex).loc, true); } #line 12368 "MachineIndependent/glslang_tab.cpp" break; case 673: /* spirv_execution_mode_parameter: INTCONSTANT */ #line 4352 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).i, (yyvsp[0].lex).loc, true); } #line 12376 "MachineIndependent/glslang_tab.cpp" break; case 674: /* spirv_execution_mode_parameter: UINTCONSTANT */ #line 4355 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).u, (yyvsp[0].lex).loc, true); } #line 12384 "MachineIndependent/glslang_tab.cpp" break; case 675: /* spirv_execution_mode_parameter: BOOLCONSTANT */ #line 4358 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).b, (yyvsp[0].lex).loc, true); } #line 12392 "MachineIndependent/glslang_tab.cpp" break; case 676: /* spirv_execution_mode_parameter: STRING_LITERAL */ #line 4361 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).string, (yyvsp[0].lex).loc, true); } #line 12400 "MachineIndependent/glslang_tab.cpp" break; case 677: /* spirv_execution_mode_id_parameter_list: constant_expression */ #line 4366 "MachineIndependent/glslang.y" { if ((yyvsp[0].interm.intermTypedNode)->getBasicType() != EbtFloat && (yyvsp[0].interm.intermTypedNode)->getBasicType() != EbtInt && (yyvsp[0].interm.intermTypedNode)->getBasicType() != EbtUint && (yyvsp[0].interm.intermTypedNode)->getBasicType() != EbtBool && (yyvsp[0].interm.intermTypedNode)->getBasicType() != EbtString) parseContext.error((yyvsp[0].interm.intermTypedNode)->getLoc(), "this type not allowed", (yyvsp[0].interm.intermTypedNode)->getType().getBasicString(), ""); (yyval.interm.intermNode) = parseContext.intermediate.makeAggregate((yyvsp[0].interm.intermTypedNode)); } #line 12414 "MachineIndependent/glslang_tab.cpp" break; case 678: /* spirv_execution_mode_id_parameter_list: spirv_execution_mode_id_parameter_list COMMA constant_expression */ #line 4375 "MachineIndependent/glslang.y" { if ((yyvsp[0].interm.intermTypedNode)->getBasicType() != EbtFloat && (yyvsp[0].interm.intermTypedNode)->getBasicType() != EbtInt && (yyvsp[0].interm.intermTypedNode)->getBasicType() != EbtUint && (yyvsp[0].interm.intermTypedNode)->getBasicType() != EbtBool && (yyvsp[0].interm.intermTypedNode)->getBasicType() != EbtString) parseContext.error((yyvsp[0].interm.intermTypedNode)->getLoc(), "this type not allowed", (yyvsp[0].interm.intermTypedNode)->getType().getBasicString(), ""); (yyval.interm.intermNode) = parseContext.intermediate.growAggregate((yyvsp[-2].interm.intermNode), (yyvsp[0].interm.intermTypedNode)); } #line 12428 "MachineIndependent/glslang_tab.cpp" break; case 679: /* spirv_storage_class_qualifier: SPIRV_STORAGE_CLASS LEFT_PAREN INTCONSTANT RIGHT_PAREN */ #line 4386 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[-3].lex).loc); (yyval.interm.type).qualifier.storage = EvqSpirvStorageClass; (yyval.interm.type).qualifier.spirvStorageClass = (yyvsp[-1].lex).i; } #line 12438 "MachineIndependent/glslang_tab.cpp" break; case 680: /* spirv_storage_class_qualifier: SPIRV_STORAGE_CLASS LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT RIGHT_PAREN */ #line 4391 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[-5].lex).loc); parseContext.intermediate.insertSpirvRequirement((yyvsp[-3].interm.spirvReq)); (yyval.interm.type).qualifier.storage = EvqSpirvStorageClass; (yyval.interm.type).qualifier.spirvStorageClass = (yyvsp[-1].lex).i; } #line 12449 "MachineIndependent/glslang_tab.cpp" break; case 681: /* spirv_decorate_qualifier: SPIRV_DECORATE LEFT_PAREN INTCONSTANT RIGHT_PAREN */ #line 4399 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[-3].lex).loc); (yyval.interm.type).qualifier.setSpirvDecorate((yyvsp[-1].lex).i); } #line 12458 "MachineIndependent/glslang_tab.cpp" break; case 682: /* spirv_decorate_qualifier: SPIRV_DECORATE LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT RIGHT_PAREN */ #line 4403 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[-5].lex).loc); parseContext.intermediate.insertSpirvRequirement((yyvsp[-3].interm.spirvReq)); (yyval.interm.type).qualifier.setSpirvDecorate((yyvsp[-1].lex).i); } #line 12468 "MachineIndependent/glslang_tab.cpp" break; case 683: /* spirv_decorate_qualifier: SPIRV_DECORATE LEFT_PAREN INTCONSTANT COMMA spirv_decorate_parameter_list RIGHT_PAREN */ #line 4408 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[-5].lex).loc); (yyval.interm.type).qualifier.setSpirvDecorate((yyvsp[-3].lex).i, (yyvsp[-1].interm.intermNode)->getAsAggregate()); } #line 12477 "MachineIndependent/glslang_tab.cpp" break; case 684: /* spirv_decorate_qualifier: SPIRV_DECORATE LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT COMMA spirv_decorate_parameter_list RIGHT_PAREN */ #line 4412 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[-7].lex).loc); parseContext.intermediate.insertSpirvRequirement((yyvsp[-5].interm.spirvReq)); (yyval.interm.type).qualifier.setSpirvDecorate((yyvsp[-3].lex).i, (yyvsp[-1].interm.intermNode)->getAsAggregate()); } #line 12487 "MachineIndependent/glslang_tab.cpp" break; case 685: /* spirv_decorate_qualifier: SPIRV_DECORATE_ID LEFT_PAREN INTCONSTANT COMMA spirv_decorate_id_parameter_list RIGHT_PAREN */ #line 4417 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[-5].lex).loc); (yyval.interm.type).qualifier.setSpirvDecorateId((yyvsp[-3].lex).i, (yyvsp[-1].interm.intermNode)->getAsAggregate()); } #line 12496 "MachineIndependent/glslang_tab.cpp" break; case 686: /* spirv_decorate_qualifier: SPIRV_DECORATE_ID LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT COMMA spirv_decorate_id_parameter_list RIGHT_PAREN */ #line 4421 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[-7].lex).loc); parseContext.intermediate.insertSpirvRequirement((yyvsp[-5].interm.spirvReq)); (yyval.interm.type).qualifier.setSpirvDecorateId((yyvsp[-3].lex).i, (yyvsp[-1].interm.intermNode)->getAsAggregate()); } #line 12506 "MachineIndependent/glslang_tab.cpp" break; case 687: /* spirv_decorate_qualifier: SPIRV_DECORATE_STRING LEFT_PAREN INTCONSTANT COMMA spirv_decorate_string_parameter_list RIGHT_PAREN */ #line 4426 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[-5].lex).loc); (yyval.interm.type).qualifier.setSpirvDecorateString((yyvsp[-3].lex).i, (yyvsp[-1].interm.intermNode)->getAsAggregate()); } #line 12515 "MachineIndependent/glslang_tab.cpp" break; case 688: /* spirv_decorate_qualifier: SPIRV_DECORATE_STRING LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT COMMA spirv_decorate_string_parameter_list RIGHT_PAREN */ #line 4430 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[-7].lex).loc); parseContext.intermediate.insertSpirvRequirement((yyvsp[-5].interm.spirvReq)); (yyval.interm.type).qualifier.setSpirvDecorateString((yyvsp[-3].lex).i, (yyvsp[-1].interm.intermNode)->getAsAggregate()); } #line 12525 "MachineIndependent/glslang_tab.cpp" break; case 689: /* spirv_decorate_parameter_list: spirv_decorate_parameter */ #line 4437 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.makeAggregate((yyvsp[0].interm.intermNode)); } #line 12533 "MachineIndependent/glslang_tab.cpp" break; case 690: /* spirv_decorate_parameter_list: spirv_decorate_parameter_list COMMA spirv_decorate_parameter */ #line 4440 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.growAggregate((yyvsp[-2].interm.intermNode), (yyvsp[0].interm.intermNode)); } #line 12541 "MachineIndependent/glslang_tab.cpp" break; case 691: /* spirv_decorate_parameter: FLOATCONSTANT */ #line 4445 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).d, EbtFloat, (yyvsp[0].lex).loc, true); } #line 12549 "MachineIndependent/glslang_tab.cpp" break; case 692: /* spirv_decorate_parameter: INTCONSTANT */ #line 4448 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).i, (yyvsp[0].lex).loc, true); } #line 12557 "MachineIndependent/glslang_tab.cpp" break; case 693: /* spirv_decorate_parameter: UINTCONSTANT */ #line 4451 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).u, (yyvsp[0].lex).loc, true); } #line 12565 "MachineIndependent/glslang_tab.cpp" break; case 694: /* spirv_decorate_parameter: BOOLCONSTANT */ #line 4454 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).b, (yyvsp[0].lex).loc, true); } #line 12573 "MachineIndependent/glslang_tab.cpp" break; case 695: /* spirv_decorate_id_parameter_list: spirv_decorate_id_parameter */ #line 4459 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.makeAggregate((yyvsp[0].interm.intermNode)); } #line 12581 "MachineIndependent/glslang_tab.cpp" break; case 696: /* spirv_decorate_id_parameter_list: spirv_decorate_id_parameter_list COMMA spirv_decorate_id_parameter */ #line 4462 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.growAggregate((yyvsp[-2].interm.intermNode), (yyvsp[0].interm.intermNode)); } #line 12589 "MachineIndependent/glslang_tab.cpp" break; case 697: /* spirv_decorate_id_parameter: variable_identifier */ #line 4467 "MachineIndependent/glslang.y" { if ((yyvsp[0].interm.intermTypedNode)->getAsConstantUnion() || (yyvsp[0].interm.intermTypedNode)->getAsSymbolNode()) (yyval.interm.intermNode) = (yyvsp[0].interm.intermTypedNode); else parseContext.error((yyvsp[0].interm.intermTypedNode)->getLoc(), "only allow constants or variables which are not elements of a composite", "", ""); } #line 12600 "MachineIndependent/glslang_tab.cpp" break; case 698: /* spirv_decorate_id_parameter: FLOATCONSTANT */ #line 4473 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).d, EbtFloat, (yyvsp[0].lex).loc, true); } #line 12608 "MachineIndependent/glslang_tab.cpp" break; case 699: /* spirv_decorate_id_parameter: INTCONSTANT */ #line 4476 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).i, (yyvsp[0].lex).loc, true); } #line 12616 "MachineIndependent/glslang_tab.cpp" break; case 700: /* spirv_decorate_id_parameter: UINTCONSTANT */ #line 4479 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).u, (yyvsp[0].lex).loc, true); } #line 12624 "MachineIndependent/glslang_tab.cpp" break; case 701: /* spirv_decorate_id_parameter: BOOLCONSTANT */ #line 4482 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).b, (yyvsp[0].lex).loc, true); } #line 12632 "MachineIndependent/glslang_tab.cpp" break; case 702: /* spirv_decorate_string_parameter_list: STRING_LITERAL */ #line 4487 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.makeAggregate( parseContext.intermediate.addConstantUnion((yyvsp[0].lex).string, (yyvsp[0].lex).loc, true)); } #line 12641 "MachineIndependent/glslang_tab.cpp" break; case 703: /* spirv_decorate_string_parameter_list: spirv_decorate_string_parameter_list COMMA STRING_LITERAL */ #line 4491 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.growAggregate((yyvsp[-2].interm.intermNode), parseContext.intermediate.addConstantUnion((yyvsp[0].lex).string, (yyvsp[0].lex).loc, true)); } #line 12649 "MachineIndependent/glslang_tab.cpp" break; case 704: /* spirv_type_specifier: SPIRV_TYPE LEFT_PAREN spirv_instruction_qualifier_list COMMA spirv_type_parameter_list RIGHT_PAREN */ #line 4496 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[-5].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).setSpirvType(*(yyvsp[-3].interm.spirvInst), (yyvsp[-1].interm.spirvTypeParams)); } #line 12658 "MachineIndependent/glslang_tab.cpp" break; case 705: /* spirv_type_specifier: SPIRV_TYPE LEFT_PAREN spirv_requirements_list COMMA spirv_instruction_qualifier_list COMMA spirv_type_parameter_list RIGHT_PAREN */ #line 4500 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[-7].lex).loc, parseContext.symbolTable.atGlobalLevel()); parseContext.intermediate.insertSpirvRequirement((yyvsp[-5].interm.spirvReq)); (yyval.interm.type).setSpirvType(*(yyvsp[-3].interm.spirvInst), (yyvsp[-1].interm.spirvTypeParams)); } #line 12668 "MachineIndependent/glslang_tab.cpp" break; case 706: /* spirv_type_specifier: SPIRV_TYPE LEFT_PAREN spirv_instruction_qualifier_list RIGHT_PAREN */ #line 4505 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[-3].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).setSpirvType(*(yyvsp[-1].interm.spirvInst)); } #line 12677 "MachineIndependent/glslang_tab.cpp" break; case 707: /* spirv_type_specifier: SPIRV_TYPE LEFT_PAREN spirv_requirements_list COMMA spirv_instruction_qualifier_list RIGHT_PAREN */ #line 4509 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[-5].lex).loc, parseContext.symbolTable.atGlobalLevel()); parseContext.intermediate.insertSpirvRequirement((yyvsp[-3].interm.spirvReq)); (yyval.interm.type).setSpirvType(*(yyvsp[-1].interm.spirvInst)); } #line 12687 "MachineIndependent/glslang_tab.cpp" break; case 708: /* spirv_type_parameter_list: spirv_type_parameter */ #line 4516 "MachineIndependent/glslang.y" { (yyval.interm.spirvTypeParams) = (yyvsp[0].interm.spirvTypeParams); } #line 12695 "MachineIndependent/glslang_tab.cpp" break; case 709: /* spirv_type_parameter_list: spirv_type_parameter_list COMMA spirv_type_parameter */ #line 4519 "MachineIndependent/glslang.y" { (yyval.interm.spirvTypeParams) = parseContext.mergeSpirvTypeParameters((yyvsp[-2].interm.spirvTypeParams), (yyvsp[0].interm.spirvTypeParams)); } #line 12703 "MachineIndependent/glslang_tab.cpp" break; case 710: /* spirv_type_parameter: constant_expression */ #line 4524 "MachineIndependent/glslang.y" { (yyval.interm.spirvTypeParams) = parseContext.makeSpirvTypeParameters((yyvsp[0].interm.intermTypedNode)->getLoc(), (yyvsp[0].interm.intermTypedNode)->getAsConstantUnion()); } #line 12711 "MachineIndependent/glslang_tab.cpp" break; case 711: /* spirv_type_parameter: type_specifier_nonarray */ #line 4527 "MachineIndependent/glslang.y" { (yyval.interm.spirvTypeParams) = parseContext.makeSpirvTypeParameters((yyvsp[0].interm.type).loc, (yyvsp[0].interm.type)); } #line 12719 "MachineIndependent/glslang_tab.cpp" break; case 712: /* spirv_instruction_qualifier: SPIRV_INSTRUCTION LEFT_PAREN spirv_instruction_qualifier_list RIGHT_PAREN */ #line 4532 "MachineIndependent/glslang.y" { (yyval.interm.spirvInst) = (yyvsp[-1].interm.spirvInst); } #line 12727 "MachineIndependent/glslang_tab.cpp" break; case 713: /* spirv_instruction_qualifier: SPIRV_INSTRUCTION LEFT_PAREN spirv_requirements_list COMMA spirv_instruction_qualifier_list RIGHT_PAREN */ #line 4535 "MachineIndependent/glslang.y" { parseContext.intermediate.insertSpirvRequirement((yyvsp[-3].interm.spirvReq)); (yyval.interm.spirvInst) = (yyvsp[-1].interm.spirvInst); } #line 12736 "MachineIndependent/glslang_tab.cpp" break; case 714: /* spirv_instruction_qualifier_list: spirv_instruction_qualifier_id */ #line 4541 "MachineIndependent/glslang.y" { (yyval.interm.spirvInst) = (yyvsp[0].interm.spirvInst); } #line 12744 "MachineIndependent/glslang_tab.cpp" break; case 715: /* spirv_instruction_qualifier_list: spirv_instruction_qualifier_list COMMA spirv_instruction_qualifier_id */ #line 4544 "MachineIndependent/glslang.y" { (yyval.interm.spirvInst) = parseContext.mergeSpirvInstruction((yyvsp[-1].lex).loc, (yyvsp[-2].interm.spirvInst), (yyvsp[0].interm.spirvInst)); } #line 12752 "MachineIndependent/glslang_tab.cpp" break; case 716: /* spirv_instruction_qualifier_id: IDENTIFIER EQUAL STRING_LITERAL */ #line 4549 "MachineIndependent/glslang.y" { (yyval.interm.spirvInst) = parseContext.makeSpirvInstruction((yyvsp[-1].lex).loc, *(yyvsp[-2].lex).string, *(yyvsp[0].lex).string); } #line 12760 "MachineIndependent/glslang_tab.cpp" break; case 717: /* spirv_instruction_qualifier_id: IDENTIFIER EQUAL INTCONSTANT */ #line 4552 "MachineIndependent/glslang.y" { (yyval.interm.spirvInst) = parseContext.makeSpirvInstruction((yyvsp[-1].lex).loc, *(yyvsp[-2].lex).string, (yyvsp[0].lex).i); } #line 12768 "MachineIndependent/glslang_tab.cpp" break; #line 12772 "MachineIndependent/glslang_tab.cpp" default: break; } /* User semantic actions sometimes alter yychar, and that requires that yytoken be updated with the new translation. We take the approach of translating immediately before every use of yytoken. One alternative is translating here after every semantic action, but that translation would be missed if the semantic action invokes YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an incorrect destructor might then be invoked immediately. In the case of YYERROR or YYBACKUP, subsequent parser actions might lead to an incorrect destructor call or verbose syntax error message before the lookahead is translated. */ YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc); YYPOPSTACK (yylen); yylen = 0; *++yyvsp = yyval; /* Now 'shift' the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ { const int yylhs = yyr1[yyn] - YYNTOKENS; const int yyi = yypgoto[yylhs] + *yyssp; yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp ? yytable[yyi] : yydefgoto[yylhs]); } goto yynewstate; /*--------------------------------------. | yyerrlab -- here on detecting error. | `--------------------------------------*/ yyerrlab: /* Make sure we have latest lookahead translation. See comments at user semantic actions for why this is necessary. */ yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar); /* If not already recovering from an error, report this error. */ if (!yyerrstatus) { ++yynerrs; { yypcontext_t yyctx = {yyssp, yytoken}; char const *yymsgp = YY_("syntax error"); int yysyntax_error_status; yysyntax_error_status = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx); if (yysyntax_error_status == 0) yymsgp = yymsg; else if (yysyntax_error_status == -1) { if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); yymsg = YY_CAST (char *, YYSTACK_ALLOC (YY_CAST (YYSIZE_T, yymsg_alloc))); if (yymsg) { yysyntax_error_status = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx); yymsgp = yymsg; } else { yymsg = yymsgbuf; yymsg_alloc = sizeof yymsgbuf; yysyntax_error_status = YYENOMEM; } } yyerror (pParseContext, yymsgp); if (yysyntax_error_status == YYENOMEM) YYNOMEM; } } if (yyerrstatus == 3) { /* If just tried and failed to reuse lookahead token after an error, discard it. */ if (yychar <= YYEOF) { /* Return failure if at end of input. */ if (yychar == YYEOF) YYABORT; } else { yydestruct ("Error: discarding", yytoken, &yylval, pParseContext); yychar = YYEMPTY; } } /* Else will try to reuse lookahead token after shifting the error token. */ goto yyerrlab1; /*---------------------------------------------------. | yyerrorlab -- error raised explicitly by YYERROR. | `---------------------------------------------------*/ yyerrorlab: /* Pacify compilers when the user code never invokes YYERROR and the label yyerrorlab therefore never appears in user code. */ if (0) YYERROR; ++yynerrs; /* Do not reclaim the symbols of the rule whose action triggered this YYERROR. */ YYPOPSTACK (yylen); yylen = 0; YY_STACK_PRINT (yyss, yyssp); yystate = *yyssp; goto yyerrlab1; /*-------------------------------------------------------------. | yyerrlab1 -- common code for both syntax error and YYERROR. | `-------------------------------------------------------------*/ yyerrlab1: yyerrstatus = 3; /* Each real token shifted decrements this. */ /* Pop stack until we find a state that shifts the error token. */ for (;;) { yyn = yypact[yystate]; if (!yypact_value_is_default (yyn)) { yyn += YYSYMBOL_YYerror; if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) { yyn = yytable[yyn]; if (0 < yyn) break; } } /* Pop the current state because it cannot handle the error token. */ if (yyssp == yyss) YYABORT; yydestruct ("Error: popping", YY_ACCESSING_SYMBOL (yystate), yyvsp, pParseContext); YYPOPSTACK (1); yystate = *yyssp; YY_STACK_PRINT (yyss, yyssp); } YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; YY_IGNORE_MAYBE_UNINITIALIZED_END /* Shift the error token. */ YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp); yystate = yyn; goto yynewstate; /*-------------------------------------. | yyacceptlab -- YYACCEPT comes here. | `-------------------------------------*/ yyacceptlab: yyresult = 0; goto yyreturnlab; /*-----------------------------------. | yyabortlab -- YYABORT comes here. | `-----------------------------------*/ yyabortlab: yyresult = 1; goto yyreturnlab; /*-----------------------------------------------------------. | yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here. | `-----------------------------------------------------------*/ yyexhaustedlab: yyerror (pParseContext, YY_("memory exhausted")); yyresult = 2; goto yyreturnlab; /*----------------------------------------------------------. | yyreturnlab -- parsing is finished, clean up and return. | `----------------------------------------------------------*/ yyreturnlab: if (yychar != YYEMPTY) { /* Make sure we have latest lookahead translation. See comments at user semantic actions for why this is necessary. */ yytoken = YYTRANSLATE (yychar); yydestruct ("Cleanup: discarding lookahead", yytoken, &yylval, pParseContext); } /* Do not reclaim the symbols of the rule whose action triggered this YYABORT or YYACCEPT. */ YYPOPSTACK (yylen); YY_STACK_PRINT (yyss, yyssp); while (yyssp != yyss) { yydestruct ("Cleanup: popping", YY_ACCESSING_SYMBOL (+*yyssp), yyvsp, pParseContext); YYPOPSTACK (1); } #ifndef yyoverflow if (yyss != yyssa) YYSTACK_FREE (yyss); #endif if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); return yyresult; } #line 4556 "MachineIndependent/glslang.y" ================================================ FILE: src/libraries/glslang/glslang/MachineIndependent/glslang_tab.cpp.h ================================================ /* A Bison parser, made by GNU Bison 3.8.2. */ /* Bison interface for Yacc-like parsers in C Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work under terms of your choice, so long as that work isn't itself a parser generator using the skeleton or a modified version thereof as a parser skeleton. Alternatively, if you modify or redistribute the parser skeleton itself, you may (at your option) remove this special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ /* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual, especially those whose name start with YY_ or yy_. They are private implementation details that can be changed or removed. */ #ifndef YY_YY_MACHINEINDEPENDENT_GLSLANG_TAB_CPP_H_INCLUDED # define YY_YY_MACHINEINDEPENDENT_GLSLANG_TAB_CPP_H_INCLUDED /* Debug traces. */ #ifndef YYDEBUG # define YYDEBUG 1 #endif #if YYDEBUG extern int yydebug; #endif /* Token kinds. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE enum yytokentype { YYEMPTY = -2, YYEOF = 0, /* "end of file" */ YYerror = 256, /* error */ YYUNDEF = 257, /* "invalid token" */ CONST = 258, /* CONST */ BOOL = 259, /* BOOL */ INT = 260, /* INT */ UINT = 261, /* UINT */ FLOAT = 262, /* FLOAT */ BVEC2 = 263, /* BVEC2 */ BVEC3 = 264, /* BVEC3 */ BVEC4 = 265, /* BVEC4 */ IVEC2 = 266, /* IVEC2 */ IVEC3 = 267, /* IVEC3 */ IVEC4 = 268, /* IVEC4 */ UVEC2 = 269, /* UVEC2 */ UVEC3 = 270, /* UVEC3 */ UVEC4 = 271, /* UVEC4 */ VEC2 = 272, /* VEC2 */ VEC3 = 273, /* VEC3 */ VEC4 = 274, /* VEC4 */ MAT2 = 275, /* MAT2 */ MAT3 = 276, /* MAT3 */ MAT4 = 277, /* MAT4 */ MAT2X2 = 278, /* MAT2X2 */ MAT2X3 = 279, /* MAT2X3 */ MAT2X4 = 280, /* MAT2X4 */ MAT3X2 = 281, /* MAT3X2 */ MAT3X3 = 282, /* MAT3X3 */ MAT3X4 = 283, /* MAT3X4 */ MAT4X2 = 284, /* MAT4X2 */ MAT4X3 = 285, /* MAT4X3 */ MAT4X4 = 286, /* MAT4X4 */ SAMPLER2D = 287, /* SAMPLER2D */ SAMPLER3D = 288, /* SAMPLER3D */ SAMPLERCUBE = 289, /* SAMPLERCUBE */ SAMPLER2DSHADOW = 290, /* SAMPLER2DSHADOW */ SAMPLERCUBESHADOW = 291, /* SAMPLERCUBESHADOW */ SAMPLER2DARRAY = 292, /* SAMPLER2DARRAY */ SAMPLER2DARRAYSHADOW = 293, /* SAMPLER2DARRAYSHADOW */ ISAMPLER2D = 294, /* ISAMPLER2D */ ISAMPLER3D = 295, /* ISAMPLER3D */ ISAMPLERCUBE = 296, /* ISAMPLERCUBE */ ISAMPLER2DARRAY = 297, /* ISAMPLER2DARRAY */ USAMPLER2D = 298, /* USAMPLER2D */ USAMPLER3D = 299, /* USAMPLER3D */ USAMPLERCUBE = 300, /* USAMPLERCUBE */ USAMPLER2DARRAY = 301, /* USAMPLER2DARRAY */ SAMPLER = 302, /* SAMPLER */ SAMPLERSHADOW = 303, /* SAMPLERSHADOW */ TEXTURE2D = 304, /* TEXTURE2D */ TEXTURE3D = 305, /* TEXTURE3D */ TEXTURECUBE = 306, /* TEXTURECUBE */ TEXTURE2DARRAY = 307, /* TEXTURE2DARRAY */ ITEXTURE2D = 308, /* ITEXTURE2D */ ITEXTURE3D = 309, /* ITEXTURE3D */ ITEXTURECUBE = 310, /* ITEXTURECUBE */ ITEXTURE2DARRAY = 311, /* ITEXTURE2DARRAY */ UTEXTURE2D = 312, /* UTEXTURE2D */ UTEXTURE3D = 313, /* UTEXTURE3D */ UTEXTURECUBE = 314, /* UTEXTURECUBE */ UTEXTURE2DARRAY = 315, /* UTEXTURE2DARRAY */ ATTRIBUTE = 316, /* ATTRIBUTE */ VARYING = 317, /* VARYING */ FLOATE5M2_T = 318, /* FLOATE5M2_T */ FLOATE4M3_T = 319, /* FLOATE4M3_T */ BFLOAT16_T = 320, /* BFLOAT16_T */ FLOAT16_T = 321, /* FLOAT16_T */ FLOAT32_T = 322, /* FLOAT32_T */ DOUBLE = 323, /* DOUBLE */ FLOAT64_T = 324, /* FLOAT64_T */ INT64_T = 325, /* INT64_T */ UINT64_T = 326, /* UINT64_T */ INT32_T = 327, /* INT32_T */ UINT32_T = 328, /* UINT32_T */ INT16_T = 329, /* INT16_T */ UINT16_T = 330, /* UINT16_T */ INT8_T = 331, /* INT8_T */ UINT8_T = 332, /* UINT8_T */ I64VEC2 = 333, /* I64VEC2 */ I64VEC3 = 334, /* I64VEC3 */ I64VEC4 = 335, /* I64VEC4 */ U64VEC2 = 336, /* U64VEC2 */ U64VEC3 = 337, /* U64VEC3 */ U64VEC4 = 338, /* U64VEC4 */ I32VEC2 = 339, /* I32VEC2 */ I32VEC3 = 340, /* I32VEC3 */ I32VEC4 = 341, /* I32VEC4 */ U32VEC2 = 342, /* U32VEC2 */ U32VEC3 = 343, /* U32VEC3 */ U32VEC4 = 344, /* U32VEC4 */ I16VEC2 = 345, /* I16VEC2 */ I16VEC3 = 346, /* I16VEC3 */ I16VEC4 = 347, /* I16VEC4 */ U16VEC2 = 348, /* U16VEC2 */ U16VEC3 = 349, /* U16VEC3 */ U16VEC4 = 350, /* U16VEC4 */ I8VEC2 = 351, /* I8VEC2 */ I8VEC3 = 352, /* I8VEC3 */ I8VEC4 = 353, /* I8VEC4 */ U8VEC2 = 354, /* U8VEC2 */ U8VEC3 = 355, /* U8VEC3 */ U8VEC4 = 356, /* U8VEC4 */ DVEC2 = 357, /* DVEC2 */ DVEC3 = 358, /* DVEC3 */ DVEC4 = 359, /* DVEC4 */ DMAT2 = 360, /* DMAT2 */ DMAT3 = 361, /* DMAT3 */ DMAT4 = 362, /* DMAT4 */ BF16VEC2 = 363, /* BF16VEC2 */ BF16VEC3 = 364, /* BF16VEC3 */ BF16VEC4 = 365, /* BF16VEC4 */ FE5M2VEC2 = 366, /* FE5M2VEC2 */ FE5M2VEC3 = 367, /* FE5M2VEC3 */ FE5M2VEC4 = 368, /* FE5M2VEC4 */ FE4M3VEC2 = 369, /* FE4M3VEC2 */ FE4M3VEC3 = 370, /* FE4M3VEC3 */ FE4M3VEC4 = 371, /* FE4M3VEC4 */ F16VEC2 = 372, /* F16VEC2 */ F16VEC3 = 373, /* F16VEC3 */ F16VEC4 = 374, /* F16VEC4 */ F16MAT2 = 375, /* F16MAT2 */ F16MAT3 = 376, /* F16MAT3 */ F16MAT4 = 377, /* F16MAT4 */ F32VEC2 = 378, /* F32VEC2 */ F32VEC3 = 379, /* F32VEC3 */ F32VEC4 = 380, /* F32VEC4 */ F32MAT2 = 381, /* F32MAT2 */ F32MAT3 = 382, /* F32MAT3 */ F32MAT4 = 383, /* F32MAT4 */ F64VEC2 = 384, /* F64VEC2 */ F64VEC3 = 385, /* F64VEC3 */ F64VEC4 = 386, /* F64VEC4 */ F64MAT2 = 387, /* F64MAT2 */ F64MAT3 = 388, /* F64MAT3 */ F64MAT4 = 389, /* F64MAT4 */ DMAT2X2 = 390, /* DMAT2X2 */ DMAT2X3 = 391, /* DMAT2X3 */ DMAT2X4 = 392, /* DMAT2X4 */ DMAT3X2 = 393, /* DMAT3X2 */ DMAT3X3 = 394, /* DMAT3X3 */ DMAT3X4 = 395, /* DMAT3X4 */ DMAT4X2 = 396, /* DMAT4X2 */ DMAT4X3 = 397, /* DMAT4X3 */ DMAT4X4 = 398, /* DMAT4X4 */ F16MAT2X2 = 399, /* F16MAT2X2 */ F16MAT2X3 = 400, /* F16MAT2X3 */ F16MAT2X4 = 401, /* F16MAT2X4 */ F16MAT3X2 = 402, /* F16MAT3X2 */ F16MAT3X3 = 403, /* F16MAT3X3 */ F16MAT3X4 = 404, /* F16MAT3X4 */ F16MAT4X2 = 405, /* F16MAT4X2 */ F16MAT4X3 = 406, /* F16MAT4X3 */ F16MAT4X4 = 407, /* F16MAT4X4 */ F32MAT2X2 = 408, /* F32MAT2X2 */ F32MAT2X3 = 409, /* F32MAT2X3 */ F32MAT2X4 = 410, /* F32MAT2X4 */ F32MAT3X2 = 411, /* F32MAT3X2 */ F32MAT3X3 = 412, /* F32MAT3X3 */ F32MAT3X4 = 413, /* F32MAT3X4 */ F32MAT4X2 = 414, /* F32MAT4X2 */ F32MAT4X3 = 415, /* F32MAT4X3 */ F32MAT4X4 = 416, /* F32MAT4X4 */ F64MAT2X2 = 417, /* F64MAT2X2 */ F64MAT2X3 = 418, /* F64MAT2X3 */ F64MAT2X4 = 419, /* F64MAT2X4 */ F64MAT3X2 = 420, /* F64MAT3X2 */ F64MAT3X3 = 421, /* F64MAT3X3 */ F64MAT3X4 = 422, /* F64MAT3X4 */ F64MAT4X2 = 423, /* F64MAT4X2 */ F64MAT4X3 = 424, /* F64MAT4X3 */ F64MAT4X4 = 425, /* F64MAT4X4 */ ATOMIC_UINT = 426, /* ATOMIC_UINT */ ACCSTRUCTNV = 427, /* ACCSTRUCTNV */ ACCSTRUCTEXT = 428, /* ACCSTRUCTEXT */ RAYQUERYEXT = 429, /* RAYQUERYEXT */ FCOOPMATNV = 430, /* FCOOPMATNV */ ICOOPMATNV = 431, /* ICOOPMATNV */ UCOOPMATNV = 432, /* UCOOPMATNV */ COOPMAT = 433, /* COOPMAT */ COOPVECNV = 434, /* COOPVECNV */ HITOBJECTNV = 435, /* HITOBJECTNV */ HITOBJECTATTRNV = 436, /* HITOBJECTATTRNV */ TENSORLAYOUTNV = 437, /* TENSORLAYOUTNV */ TENSORVIEWNV = 438, /* TENSORVIEWNV */ SAMPLERCUBEARRAY = 439, /* SAMPLERCUBEARRAY */ SAMPLERCUBEARRAYSHADOW = 440, /* SAMPLERCUBEARRAYSHADOW */ ISAMPLERCUBEARRAY = 441, /* ISAMPLERCUBEARRAY */ USAMPLERCUBEARRAY = 442, /* USAMPLERCUBEARRAY */ SAMPLER1D = 443, /* SAMPLER1D */ SAMPLER1DARRAY = 444, /* SAMPLER1DARRAY */ SAMPLER1DARRAYSHADOW = 445, /* SAMPLER1DARRAYSHADOW */ ISAMPLER1D = 446, /* ISAMPLER1D */ SAMPLER1DSHADOW = 447, /* SAMPLER1DSHADOW */ SAMPLER2DRECT = 448, /* SAMPLER2DRECT */ SAMPLER2DRECTSHADOW = 449, /* SAMPLER2DRECTSHADOW */ ISAMPLER2DRECT = 450, /* ISAMPLER2DRECT */ USAMPLER2DRECT = 451, /* USAMPLER2DRECT */ SAMPLERBUFFER = 452, /* SAMPLERBUFFER */ ISAMPLERBUFFER = 453, /* ISAMPLERBUFFER */ USAMPLERBUFFER = 454, /* USAMPLERBUFFER */ SAMPLER2DMS = 455, /* SAMPLER2DMS */ ISAMPLER2DMS = 456, /* ISAMPLER2DMS */ USAMPLER2DMS = 457, /* USAMPLER2DMS */ SAMPLER2DMSARRAY = 458, /* SAMPLER2DMSARRAY */ ISAMPLER2DMSARRAY = 459, /* ISAMPLER2DMSARRAY */ USAMPLER2DMSARRAY = 460, /* USAMPLER2DMSARRAY */ SAMPLEREXTERNALOES = 461, /* SAMPLEREXTERNALOES */ SAMPLEREXTERNAL2DY2YEXT = 462, /* SAMPLEREXTERNAL2DY2YEXT */ ISAMPLER1DARRAY = 463, /* ISAMPLER1DARRAY */ USAMPLER1D = 464, /* USAMPLER1D */ USAMPLER1DARRAY = 465, /* USAMPLER1DARRAY */ F16SAMPLER1D = 466, /* F16SAMPLER1D */ F16SAMPLER2D = 467, /* F16SAMPLER2D */ F16SAMPLER3D = 468, /* F16SAMPLER3D */ F16SAMPLER2DRECT = 469, /* F16SAMPLER2DRECT */ F16SAMPLERCUBE = 470, /* F16SAMPLERCUBE */ F16SAMPLER1DARRAY = 471, /* F16SAMPLER1DARRAY */ F16SAMPLER2DARRAY = 472, /* F16SAMPLER2DARRAY */ F16SAMPLERCUBEARRAY = 473, /* F16SAMPLERCUBEARRAY */ F16SAMPLERBUFFER = 474, /* F16SAMPLERBUFFER */ F16SAMPLER2DMS = 475, /* F16SAMPLER2DMS */ F16SAMPLER2DMSARRAY = 476, /* F16SAMPLER2DMSARRAY */ F16SAMPLER1DSHADOW = 477, /* F16SAMPLER1DSHADOW */ F16SAMPLER2DSHADOW = 478, /* F16SAMPLER2DSHADOW */ F16SAMPLER1DARRAYSHADOW = 479, /* F16SAMPLER1DARRAYSHADOW */ F16SAMPLER2DARRAYSHADOW = 480, /* F16SAMPLER2DARRAYSHADOW */ F16SAMPLER2DRECTSHADOW = 481, /* F16SAMPLER2DRECTSHADOW */ F16SAMPLERCUBESHADOW = 482, /* F16SAMPLERCUBESHADOW */ F16SAMPLERCUBEARRAYSHADOW = 483, /* F16SAMPLERCUBEARRAYSHADOW */ IMAGE1D = 484, /* IMAGE1D */ IIMAGE1D = 485, /* IIMAGE1D */ UIMAGE1D = 486, /* UIMAGE1D */ IMAGE2D = 487, /* IMAGE2D */ IIMAGE2D = 488, /* IIMAGE2D */ UIMAGE2D = 489, /* UIMAGE2D */ IMAGE3D = 490, /* IMAGE3D */ IIMAGE3D = 491, /* IIMAGE3D */ UIMAGE3D = 492, /* UIMAGE3D */ IMAGE2DRECT = 493, /* IMAGE2DRECT */ IIMAGE2DRECT = 494, /* IIMAGE2DRECT */ UIMAGE2DRECT = 495, /* UIMAGE2DRECT */ IMAGECUBE = 496, /* IMAGECUBE */ IIMAGECUBE = 497, /* IIMAGECUBE */ UIMAGECUBE = 498, /* UIMAGECUBE */ IMAGEBUFFER = 499, /* IMAGEBUFFER */ IIMAGEBUFFER = 500, /* IIMAGEBUFFER */ UIMAGEBUFFER = 501, /* UIMAGEBUFFER */ IMAGE1DARRAY = 502, /* IMAGE1DARRAY */ IIMAGE1DARRAY = 503, /* IIMAGE1DARRAY */ UIMAGE1DARRAY = 504, /* UIMAGE1DARRAY */ IMAGE2DARRAY = 505, /* IMAGE2DARRAY */ IIMAGE2DARRAY = 506, /* IIMAGE2DARRAY */ UIMAGE2DARRAY = 507, /* UIMAGE2DARRAY */ IMAGECUBEARRAY = 508, /* IMAGECUBEARRAY */ IIMAGECUBEARRAY = 509, /* IIMAGECUBEARRAY */ UIMAGECUBEARRAY = 510, /* UIMAGECUBEARRAY */ IMAGE2DMS = 511, /* IMAGE2DMS */ IIMAGE2DMS = 512, /* IIMAGE2DMS */ UIMAGE2DMS = 513, /* UIMAGE2DMS */ IMAGE2DMSARRAY = 514, /* IMAGE2DMSARRAY */ IIMAGE2DMSARRAY = 515, /* IIMAGE2DMSARRAY */ UIMAGE2DMSARRAY = 516, /* UIMAGE2DMSARRAY */ F16IMAGE1D = 517, /* F16IMAGE1D */ F16IMAGE2D = 518, /* F16IMAGE2D */ F16IMAGE3D = 519, /* F16IMAGE3D */ F16IMAGE2DRECT = 520, /* F16IMAGE2DRECT */ F16IMAGECUBE = 521, /* F16IMAGECUBE */ F16IMAGE1DARRAY = 522, /* F16IMAGE1DARRAY */ F16IMAGE2DARRAY = 523, /* F16IMAGE2DARRAY */ F16IMAGECUBEARRAY = 524, /* F16IMAGECUBEARRAY */ F16IMAGEBUFFER = 525, /* F16IMAGEBUFFER */ F16IMAGE2DMS = 526, /* F16IMAGE2DMS */ F16IMAGE2DMSARRAY = 527, /* F16IMAGE2DMSARRAY */ I64IMAGE1D = 528, /* I64IMAGE1D */ U64IMAGE1D = 529, /* U64IMAGE1D */ I64IMAGE2D = 530, /* I64IMAGE2D */ U64IMAGE2D = 531, /* U64IMAGE2D */ I64IMAGE3D = 532, /* I64IMAGE3D */ U64IMAGE3D = 533, /* U64IMAGE3D */ I64IMAGE2DRECT = 534, /* I64IMAGE2DRECT */ U64IMAGE2DRECT = 535, /* U64IMAGE2DRECT */ I64IMAGECUBE = 536, /* I64IMAGECUBE */ U64IMAGECUBE = 537, /* U64IMAGECUBE */ I64IMAGEBUFFER = 538, /* I64IMAGEBUFFER */ U64IMAGEBUFFER = 539, /* U64IMAGEBUFFER */ I64IMAGE1DARRAY = 540, /* I64IMAGE1DARRAY */ U64IMAGE1DARRAY = 541, /* U64IMAGE1DARRAY */ I64IMAGE2DARRAY = 542, /* I64IMAGE2DARRAY */ U64IMAGE2DARRAY = 543, /* U64IMAGE2DARRAY */ I64IMAGECUBEARRAY = 544, /* I64IMAGECUBEARRAY */ U64IMAGECUBEARRAY = 545, /* U64IMAGECUBEARRAY */ I64IMAGE2DMS = 546, /* I64IMAGE2DMS */ U64IMAGE2DMS = 547, /* U64IMAGE2DMS */ I64IMAGE2DMSARRAY = 548, /* I64IMAGE2DMSARRAY */ U64IMAGE2DMSARRAY = 549, /* U64IMAGE2DMSARRAY */ TEXTURECUBEARRAY = 550, /* TEXTURECUBEARRAY */ ITEXTURECUBEARRAY = 551, /* ITEXTURECUBEARRAY */ UTEXTURECUBEARRAY = 552, /* UTEXTURECUBEARRAY */ TEXTURE1D = 553, /* TEXTURE1D */ ITEXTURE1D = 554, /* ITEXTURE1D */ UTEXTURE1D = 555, /* UTEXTURE1D */ TEXTURE1DARRAY = 556, /* TEXTURE1DARRAY */ ITEXTURE1DARRAY = 557, /* ITEXTURE1DARRAY */ UTEXTURE1DARRAY = 558, /* UTEXTURE1DARRAY */ TEXTURE2DRECT = 559, /* TEXTURE2DRECT */ ITEXTURE2DRECT = 560, /* ITEXTURE2DRECT */ UTEXTURE2DRECT = 561, /* UTEXTURE2DRECT */ TEXTUREBUFFER = 562, /* TEXTUREBUFFER */ ITEXTUREBUFFER = 563, /* ITEXTUREBUFFER */ UTEXTUREBUFFER = 564, /* UTEXTUREBUFFER */ TEXTURE2DMS = 565, /* TEXTURE2DMS */ ITEXTURE2DMS = 566, /* ITEXTURE2DMS */ UTEXTURE2DMS = 567, /* UTEXTURE2DMS */ TEXTURE2DMSARRAY = 568, /* TEXTURE2DMSARRAY */ ITEXTURE2DMSARRAY = 569, /* ITEXTURE2DMSARRAY */ UTEXTURE2DMSARRAY = 570, /* UTEXTURE2DMSARRAY */ F16TEXTURE1D = 571, /* F16TEXTURE1D */ F16TEXTURE2D = 572, /* F16TEXTURE2D */ F16TEXTURE3D = 573, /* F16TEXTURE3D */ F16TEXTURE2DRECT = 574, /* F16TEXTURE2DRECT */ F16TEXTURECUBE = 575, /* F16TEXTURECUBE */ F16TEXTURE1DARRAY = 576, /* F16TEXTURE1DARRAY */ F16TEXTURE2DARRAY = 577, /* F16TEXTURE2DARRAY */ F16TEXTURECUBEARRAY = 578, /* F16TEXTURECUBEARRAY */ F16TEXTUREBUFFER = 579, /* F16TEXTUREBUFFER */ F16TEXTURE2DMS = 580, /* F16TEXTURE2DMS */ F16TEXTURE2DMSARRAY = 581, /* F16TEXTURE2DMSARRAY */ SUBPASSINPUT = 582, /* SUBPASSINPUT */ SUBPASSINPUTMS = 583, /* SUBPASSINPUTMS */ ISUBPASSINPUT = 584, /* ISUBPASSINPUT */ ISUBPASSINPUTMS = 585, /* ISUBPASSINPUTMS */ USUBPASSINPUT = 586, /* USUBPASSINPUT */ USUBPASSINPUTMS = 587, /* USUBPASSINPUTMS */ F16SUBPASSINPUT = 588, /* F16SUBPASSINPUT */ F16SUBPASSINPUTMS = 589, /* F16SUBPASSINPUTMS */ SPIRV_INSTRUCTION = 590, /* SPIRV_INSTRUCTION */ SPIRV_EXECUTION_MODE = 591, /* SPIRV_EXECUTION_MODE */ SPIRV_EXECUTION_MODE_ID = 592, /* SPIRV_EXECUTION_MODE_ID */ SPIRV_DECORATE = 593, /* SPIRV_DECORATE */ SPIRV_DECORATE_ID = 594, /* SPIRV_DECORATE_ID */ SPIRV_DECORATE_STRING = 595, /* SPIRV_DECORATE_STRING */ SPIRV_TYPE = 596, /* SPIRV_TYPE */ SPIRV_STORAGE_CLASS = 597, /* SPIRV_STORAGE_CLASS */ SPIRV_BY_REFERENCE = 598, /* SPIRV_BY_REFERENCE */ SPIRV_LITERAL = 599, /* SPIRV_LITERAL */ ATTACHMENTEXT = 600, /* ATTACHMENTEXT */ IATTACHMENTEXT = 601, /* IATTACHMENTEXT */ UATTACHMENTEXT = 602, /* UATTACHMENTEXT */ LEFT_OP = 603, /* LEFT_OP */ RIGHT_OP = 604, /* RIGHT_OP */ INC_OP = 605, /* INC_OP */ DEC_OP = 606, /* DEC_OP */ LE_OP = 607, /* LE_OP */ GE_OP = 608, /* GE_OP */ EQ_OP = 609, /* EQ_OP */ NE_OP = 610, /* NE_OP */ AND_OP = 611, /* AND_OP */ OR_OP = 612, /* OR_OP */ XOR_OP = 613, /* XOR_OP */ MUL_ASSIGN = 614, /* MUL_ASSIGN */ DIV_ASSIGN = 615, /* DIV_ASSIGN */ ADD_ASSIGN = 616, /* ADD_ASSIGN */ MOD_ASSIGN = 617, /* MOD_ASSIGN */ LEFT_ASSIGN = 618, /* LEFT_ASSIGN */ RIGHT_ASSIGN = 619, /* RIGHT_ASSIGN */ AND_ASSIGN = 620, /* AND_ASSIGN */ XOR_ASSIGN = 621, /* XOR_ASSIGN */ OR_ASSIGN = 622, /* OR_ASSIGN */ SUB_ASSIGN = 623, /* SUB_ASSIGN */ STRING_LITERAL = 624, /* STRING_LITERAL */ LEFT_PAREN = 625, /* LEFT_PAREN */ RIGHT_PAREN = 626, /* RIGHT_PAREN */ LEFT_BRACKET = 627, /* LEFT_BRACKET */ RIGHT_BRACKET = 628, /* RIGHT_BRACKET */ LEFT_BRACE = 629, /* LEFT_BRACE */ RIGHT_BRACE = 630, /* RIGHT_BRACE */ DOT = 631, /* DOT */ COMMA = 632, /* COMMA */ COLON = 633, /* COLON */ EQUAL = 634, /* EQUAL */ SEMICOLON = 635, /* SEMICOLON */ BANG = 636, /* BANG */ DASH = 637, /* DASH */ TILDE = 638, /* TILDE */ PLUS = 639, /* PLUS */ STAR = 640, /* STAR */ SLASH = 641, /* SLASH */ PERCENT = 642, /* PERCENT */ LEFT_ANGLE = 643, /* LEFT_ANGLE */ RIGHT_ANGLE = 644, /* RIGHT_ANGLE */ VERTICAL_BAR = 645, /* VERTICAL_BAR */ CARET = 646, /* CARET */ AMPERSAND = 647, /* AMPERSAND */ QUESTION = 648, /* QUESTION */ INVARIANT = 649, /* INVARIANT */ HIGH_PRECISION = 650, /* HIGH_PRECISION */ MEDIUM_PRECISION = 651, /* MEDIUM_PRECISION */ LOW_PRECISION = 652, /* LOW_PRECISION */ PRECISION = 653, /* PRECISION */ PACKED = 654, /* PACKED */ RESOURCE = 655, /* RESOURCE */ SUPERP = 656, /* SUPERP */ FLOATCONSTANT = 657, /* FLOATCONSTANT */ INTCONSTANT = 658, /* INTCONSTANT */ UINTCONSTANT = 659, /* UINTCONSTANT */ BOOLCONSTANT = 660, /* BOOLCONSTANT */ IDENTIFIER = 661, /* IDENTIFIER */ TYPE_NAME = 662, /* TYPE_NAME */ CENTROID = 663, /* CENTROID */ IN = 664, /* IN */ OUT = 665, /* OUT */ INOUT = 666, /* INOUT */ STRUCT = 667, /* STRUCT */ VOID = 668, /* VOID */ WHILE = 669, /* WHILE */ BREAK = 670, /* BREAK */ CONTINUE = 671, /* CONTINUE */ DO = 672, /* DO */ ELSE = 673, /* ELSE */ FOR = 674, /* FOR */ IF = 675, /* IF */ DISCARD = 676, /* DISCARD */ RETURN = 677, /* RETURN */ SWITCH = 678, /* SWITCH */ CASE = 679, /* CASE */ DEFAULT = 680, /* DEFAULT */ TERMINATE_INVOCATION = 681, /* TERMINATE_INVOCATION */ TERMINATE_RAY = 682, /* TERMINATE_RAY */ IGNORE_INTERSECTION = 683, /* IGNORE_INTERSECTION */ UNIFORM = 684, /* UNIFORM */ SHARED = 685, /* SHARED */ BUFFER = 686, /* BUFFER */ TILEIMAGEEXT = 687, /* TILEIMAGEEXT */ FLAT = 688, /* FLAT */ SMOOTH = 689, /* SMOOTH */ LAYOUT = 690, /* LAYOUT */ DOUBLECONSTANT = 691, /* DOUBLECONSTANT */ INT16CONSTANT = 692, /* INT16CONSTANT */ UINT16CONSTANT = 693, /* UINT16CONSTANT */ FLOAT16CONSTANT = 694, /* FLOAT16CONSTANT */ INT32CONSTANT = 695, /* INT32CONSTANT */ UINT32CONSTANT = 696, /* UINT32CONSTANT */ INT64CONSTANT = 697, /* INT64CONSTANT */ UINT64CONSTANT = 698, /* UINT64CONSTANT */ SUBROUTINE = 699, /* SUBROUTINE */ DEMOTE = 700, /* DEMOTE */ FUNCTION = 701, /* FUNCTION */ PAYLOADNV = 702, /* PAYLOADNV */ PAYLOADINNV = 703, /* PAYLOADINNV */ HITATTRNV = 704, /* HITATTRNV */ CALLDATANV = 705, /* CALLDATANV */ CALLDATAINNV = 706, /* CALLDATAINNV */ PAYLOADEXT = 707, /* PAYLOADEXT */ PAYLOADINEXT = 708, /* PAYLOADINEXT */ HITATTREXT = 709, /* HITATTREXT */ CALLDATAEXT = 710, /* CALLDATAEXT */ CALLDATAINEXT = 711, /* CALLDATAINEXT */ PATCH = 712, /* PATCH */ SAMPLE = 713, /* SAMPLE */ NONUNIFORM = 714, /* NONUNIFORM */ COHERENT = 715, /* COHERENT */ VOLATILE = 716, /* VOLATILE */ RESTRICT = 717, /* RESTRICT */ READONLY = 718, /* READONLY */ WRITEONLY = 719, /* WRITEONLY */ NONTEMPORAL = 720, /* NONTEMPORAL */ DEVICECOHERENT = 721, /* DEVICECOHERENT */ QUEUEFAMILYCOHERENT = 722, /* QUEUEFAMILYCOHERENT */ WORKGROUPCOHERENT = 723, /* WORKGROUPCOHERENT */ SUBGROUPCOHERENT = 724, /* SUBGROUPCOHERENT */ NONPRIVATE = 725, /* NONPRIVATE */ SHADERCALLCOHERENT = 726, /* SHADERCALLCOHERENT */ NOPERSPECTIVE = 727, /* NOPERSPECTIVE */ EXPLICITINTERPAMD = 728, /* EXPLICITINTERPAMD */ PERVERTEXEXT = 729, /* PERVERTEXEXT */ PERVERTEXNV = 730, /* PERVERTEXNV */ PERPRIMITIVENV = 731, /* PERPRIMITIVENV */ PERVIEWNV = 732, /* PERVIEWNV */ PERTASKNV = 733, /* PERTASKNV */ PERPRIMITIVEEXT = 734, /* PERPRIMITIVEEXT */ TASKPAYLOADWORKGROUPEXT = 735, /* TASKPAYLOADWORKGROUPEXT */ PRECISE = 736 /* PRECISE */ }; typedef enum yytokentype yytoken_kind_t; #endif /* Value type. */ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED union YYSTYPE { #line 72 "MachineIndependent/glslang.y" struct { glslang::TSourceLoc loc; union { glslang::TString *string; int i; unsigned int u; long long i64; unsigned long long u64; bool b; double d; }; glslang::TSymbol* symbol; } lex; struct { glslang::TSourceLoc loc; glslang::TOperator op; union { TIntermNode* intermNode; glslang::TIntermNodePair nodePair; glslang::TIntermTyped* intermTypedNode; glslang::TAttributes* attributes; glslang::TSpirvRequirement* spirvReq; glslang::TSpirvInstruction* spirvInst; glslang::TSpirvTypeParameters* spirvTypeParams; }; union { glslang::TPublicType type; glslang::TFunction* function; glslang::TParameter param; glslang::TTypeLoc typeLine; glslang::TTypeList* typeList; glslang::TArraySizes* arraySizes; glslang::TIdentifierList* identifierList; }; glslang::TTypeParameters* typeParameters; } interm; #line 584 "MachineIndependent/glslang_tab.cpp.h" }; typedef union YYSTYPE YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define YYSTYPE_IS_DECLARED 1 #endif int yyparse (glslang::TParseContext* pParseContext); #endif /* !YY_YY_MACHINEINDEPENDENT_GLSLANG_TAB_CPP_H_INCLUDED */ ================================================ FILE: src/libraries/glslang/glslang/MachineIndependent/intermOut.cpp ================================================ // // Copyright (C) 2002-2005 3Dlabs Inc. Ltd. // Copyright (C) 2012-2016 LunarG, Inc. // Copyright (C) 2017, 2022-2024 Arm Limited. // Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights reserved. // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following // disclaimer in the documentation and/or other materials provided // with the distribution. // // Neither the name of 3Dlabs Inc. Ltd. nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // #include "localintermediate.h" #include "../Include/InfoSink.h" #ifdef _MSC_VER #include #else #include #endif #include namespace glslang { // // Two purposes: // 1. Show an example of how to iterate tree. Functions can // also directly call Traverse() on children themselves to // have finer grained control over the process than shown here. // See the last function for how to get started. // 2. Print out a text based description of the tree. // // // Use this class to carry along data from node to node in // the traversal // class TOutputTraverser : public TIntermTraverser { public: TOutputTraverser(TInfoSink& i) : infoSink(i), extraOutput(NoExtraOutput) { } enum EExtraOutput { NoExtraOutput, BinaryDoubleOutput }; void setDoubleOutput(EExtraOutput extra) { extraOutput = extra; } virtual bool visitBinary(TVisit, TIntermBinary* node); virtual bool visitUnary(TVisit, TIntermUnary* node); virtual bool visitAggregate(TVisit, TIntermAggregate* node); virtual bool visitSelection(TVisit, TIntermSelection* node); virtual void visitConstantUnion(TIntermConstantUnion* node); virtual void visitSymbol(TIntermSymbol* node); virtual bool visitLoop(TVisit, TIntermLoop* node); virtual bool visitBranch(TVisit, TIntermBranch* node); virtual bool visitSwitch(TVisit, TIntermSwitch* node); TInfoSink& infoSink; protected: TOutputTraverser(TOutputTraverser&); TOutputTraverser& operator=(TOutputTraverser&); EExtraOutput extraOutput; }; // // Helper functions for printing, not part of traversing. // static void OutputTreeText(TInfoSink& infoSink, const TIntermNode* node, const int depth) { int i; infoSink.debug << node->getLoc().string << ":"; if (node->getLoc().line) infoSink.debug << node->getLoc().line; else infoSink.debug << "? "; for (i = 0; i < depth; ++i) infoSink.debug << " "; } // // The rest of the file are the traversal functions. The last one // is the one that starts the traversal. // // Return true from interior nodes to have the external traversal // continue on to children. If you process children yourself, // return false. // bool TOutputTraverser::visitBinary(TVisit /* visit */, TIntermBinary* node) { TInfoSink& out = infoSink; OutputTreeText(out, node, depth); switch (node->getOp()) { case EOpAssign: out.debug << "move second child to first child"; break; case EOpAddAssign: out.debug << "add second child into first child"; break; case EOpSubAssign: out.debug << "subtract second child into first child"; break; case EOpMulAssign: out.debug << "multiply second child into first child"; break; case EOpVectorTimesMatrixAssign: out.debug << "matrix mult second child into first child"; break; case EOpVectorTimesScalarAssign: out.debug << "vector scale second child into first child"; break; case EOpMatrixTimesScalarAssign: out.debug << "matrix scale second child into first child"; break; case EOpMatrixTimesMatrixAssign: out.debug << "matrix mult second child into first child"; break; case EOpDivAssign: out.debug << "divide second child into first child"; break; case EOpModAssign: out.debug << "mod second child into first child"; break; case EOpAndAssign: out.debug << "and second child into first child"; break; case EOpInclusiveOrAssign: out.debug << "or second child into first child"; break; case EOpExclusiveOrAssign: out.debug << "exclusive or second child into first child"; break; case EOpLeftShiftAssign: out.debug << "left shift second child into first child"; break; case EOpRightShiftAssign: out.debug << "right shift second child into first child"; break; case EOpIndexDirect: out.debug << "direct index"; break; case EOpIndexIndirect: out.debug << "indirect index"; break; case EOpIndexDirectStruct: { bool reference = node->getLeft()->getType().isReference(); const TTypeList *members = reference ? node->getLeft()->getType().getReferentType()->getStruct() : node->getLeft()->getType().getStruct(); out.debug << (*members)[node->getRight()->getAsConstantUnion()->getConstArray()[0].getIConst()].type->getFieldName(); out.debug << ": direct index for structure"; break; } case EOpVectorSwizzle: out.debug << "vector swizzle"; break; case EOpMatrixSwizzle: out.debug << "matrix swizzle"; break; case EOpAdd: out.debug << "add"; break; case EOpSub: out.debug << "subtract"; break; case EOpMul: out.debug << "component-wise multiply"; break; case EOpDiv: out.debug << "divide"; break; case EOpMod: out.debug << "mod"; break; case EOpRightShift: out.debug << "right-shift"; break; case EOpLeftShift: out.debug << "left-shift"; break; case EOpAnd: out.debug << "bitwise and"; break; case EOpInclusiveOr: out.debug << "inclusive-or"; break; case EOpExclusiveOr: out.debug << "exclusive-or"; break; case EOpEqual: out.debug << "Compare Equal"; break; case EOpNotEqual: out.debug << "Compare Not Equal"; break; case EOpLessThan: out.debug << "Compare Less Than"; break; case EOpGreaterThan: out.debug << "Compare Greater Than"; break; case EOpLessThanEqual: out.debug << "Compare Less Than or Equal"; break; case EOpGreaterThanEqual: out.debug << "Compare Greater Than or Equal"; break; case EOpVectorEqual: out.debug << "Equal"; break; case EOpVectorNotEqual: out.debug << "NotEqual"; break; case EOpVectorTimesScalar: out.debug << "vector-scale"; break; case EOpVectorTimesMatrix: out.debug << "vector-times-matrix"; break; case EOpMatrixTimesVector: out.debug << "matrix-times-vector"; break; case EOpMatrixTimesScalar: out.debug << "matrix-scale"; break; case EOpMatrixTimesMatrix: out.debug << "matrix-multiply"; break; case EOpLogicalOr: out.debug << "logical-or"; break; case EOpLogicalXor: out.debug << "logical-xor"; break; case EOpLogicalAnd: out.debug << "logical-and"; break; case EOpAbsDifference: out.debug << "absoluteDifference"; break; case EOpAddSaturate: out.debug << "addSaturate"; break; case EOpSubSaturate: out.debug << "subtractSaturate"; break; case EOpAverage: out.debug << "average"; break; case EOpAverageRounded: out.debug << "averageRounded"; break; case EOpMul32x16: out.debug << "multiply32x16"; break; default: out.debug << ""; } out.debug << " (" << node->getCompleteString() << ")"; out.debug << "\n"; return true; } bool TOutputTraverser::visitUnary(TVisit /* visit */, TIntermUnary* node) { TInfoSink& out = infoSink; OutputTreeText(out, node, depth); if (IsOpNumericConv(node->getAsOperator()->getOp())) { out.debug << "Convert " << TType::getBasicString(node->getOperand()->getType().getBasicType()) << " to " << TType::getBasicString(node->getType().getBasicType()); out.debug << " (" << node->getCompleteString() << ")"; out.debug << "\n"; return true; } switch (node->getOp()) { case EOpNegative: out.debug << "Negate value"; break; case EOpVectorLogicalNot: case EOpLogicalNot: out.debug << "Negate conditional"; break; case EOpBitwiseNot: out.debug << "Bitwise not"; break; case EOpPostIncrement: out.debug << "Post-Increment"; break; case EOpPostDecrement: out.debug << "Post-Decrement"; break; case EOpPreIncrement: out.debug << "Pre-Increment"; break; case EOpPreDecrement: out.debug << "Pre-Decrement"; break; case EOpCopyObject: out.debug << "copy object"; break; case EOpConvUint64ToPtr: out.debug << "Convert uint64_t to pointer"; break; case EOpConvPtrToUint64: out.debug << "Convert pointer to uint64_t"; break; case EOpConvUint64ToAccStruct: out.debug << "Convert uint64_t to acceleration structure"; break; case EOpConvUvec2ToAccStruct: out.debug << "Convert uvec2 to acceleration strucuture "; break; case EOpRadians: out.debug << "radians"; break; case EOpDegrees: out.debug << "degrees"; break; case EOpSin: out.debug << "sine"; break; case EOpCos: out.debug << "cosine"; break; case EOpTan: out.debug << "tangent"; break; case EOpAsin: out.debug << "arc sine"; break; case EOpAcos: out.debug << "arc cosine"; break; case EOpAtan: out.debug << "arc tangent"; break; case EOpSinh: out.debug << "hyp. sine"; break; case EOpCosh: out.debug << "hyp. cosine"; break; case EOpTanh: out.debug << "hyp. tangent"; break; case EOpAsinh: out.debug << "arc hyp. sine"; break; case EOpAcosh: out.debug << "arc hyp. cosine"; break; case EOpAtanh: out.debug << "arc hyp. tangent"; break; case EOpExp: out.debug << "exp"; break; case EOpLog: out.debug << "log"; break; case EOpExp2: out.debug << "exp2"; break; case EOpLog2: out.debug << "log2"; break; case EOpSqrt: out.debug << "sqrt"; break; case EOpInverseSqrt: out.debug << "inverse sqrt"; break; case EOpAbs: out.debug << "Absolute value"; break; case EOpSign: out.debug << "Sign"; break; case EOpFloor: out.debug << "Floor"; break; case EOpTrunc: out.debug << "trunc"; break; case EOpRound: out.debug << "round"; break; case EOpRoundEven: out.debug << "roundEven"; break; case EOpCeil: out.debug << "Ceiling"; break; case EOpFract: out.debug << "Fraction"; break; case EOpIsNan: out.debug << "isnan"; break; case EOpIsInf: out.debug << "isinf"; break; case EOpFloatBitsToInt: out.debug << "floatBitsToInt"; break; case EOpFloatBitsToUint:out.debug << "floatBitsToUint"; break; case EOpIntBitsToFloat: out.debug << "intBitsToFloat"; break; case EOpUintBitsToFloat:out.debug << "uintBitsToFloat"; break; case EOpDoubleBitsToInt64: out.debug << "doubleBitsToInt64"; break; case EOpDoubleBitsToUint64: out.debug << "doubleBitsToUint64"; break; case EOpInt64BitsToDouble: out.debug << "int64BitsToDouble"; break; case EOpUint64BitsToDouble: out.debug << "uint64BitsToDouble"; break; case EOpFloat16BitsToInt16: out.debug << "float16BitsToInt16"; break; case EOpFloat16BitsToUint16: out.debug << "float16BitsToUint16"; break; case EOpInt16BitsToFloat16: out.debug << "int16BitsToFloat16"; break; case EOpUint16BitsToFloat16: out.debug << "uint16BitsToFloat16"; break; case EOpPackSnorm2x16: out.debug << "packSnorm2x16"; break; case EOpUnpackSnorm2x16:out.debug << "unpackSnorm2x16"; break; case EOpPackUnorm2x16: out.debug << "packUnorm2x16"; break; case EOpUnpackUnorm2x16:out.debug << "unpackUnorm2x16"; break; case EOpPackHalf2x16: out.debug << "packHalf2x16"; break; case EOpUnpackHalf2x16: out.debug << "unpackHalf2x16"; break; case EOpPack16: out.debug << "pack16"; break; case EOpPack32: out.debug << "pack32"; break; case EOpPack64: out.debug << "pack64"; break; case EOpUnpack32: out.debug << "unpack32"; break; case EOpUnpack16: out.debug << "unpack16"; break; case EOpUnpack8: out.debug << "unpack8"; break; case EOpPackSnorm4x8: out.debug << "PackSnorm4x8"; break; case EOpUnpackSnorm4x8: out.debug << "UnpackSnorm4x8"; break; case EOpPackUnorm4x8: out.debug << "PackUnorm4x8"; break; case EOpUnpackUnorm4x8: out.debug << "UnpackUnorm4x8"; break; case EOpPackDouble2x32: out.debug << "PackDouble2x32"; break; case EOpUnpackDouble2x32: out.debug << "UnpackDouble2x32"; break; case EOpPackInt2x32: out.debug << "packInt2x32"; break; case EOpUnpackInt2x32: out.debug << "unpackInt2x32"; break; case EOpPackUint2x32: out.debug << "packUint2x32"; break; case EOpUnpackUint2x32: out.debug << "unpackUint2x32"; break; case EOpPackInt2x16: out.debug << "packInt2x16"; break; case EOpUnpackInt2x16: out.debug << "unpackInt2x16"; break; case EOpPackUint2x16: out.debug << "packUint2x16"; break; case EOpUnpackUint2x16: out.debug << "unpackUint2x16"; break; case EOpPackInt4x16: out.debug << "packInt4x16"; break; case EOpUnpackInt4x16: out.debug << "unpackInt4x16"; break; case EOpPackUint4x16: out.debug << "packUint4x16"; break; case EOpUnpackUint4x16: out.debug << "unpackUint4x16"; break; case EOpPackFloat2x16: out.debug << "packFloat2x16"; break; case EOpUnpackFloat2x16: out.debug << "unpackFloat2x16"; break; case EOpLength: out.debug << "length"; break; case EOpNormalize: out.debug << "normalize"; break; case EOpDPdx: out.debug << "dPdx"; break; case EOpDPdy: out.debug << "dPdy"; break; case EOpFwidth: out.debug << "fwidth"; break; case EOpDPdxFine: out.debug << "dPdxFine"; break; case EOpDPdyFine: out.debug << "dPdyFine"; break; case EOpFwidthFine: out.debug << "fwidthFine"; break; case EOpDPdxCoarse: out.debug << "dPdxCoarse"; break; case EOpDPdyCoarse: out.debug << "dPdyCoarse"; break; case EOpFwidthCoarse: out.debug << "fwidthCoarse"; break; case EOpInterpolateAtCentroid: out.debug << "interpolateAtCentroid"; break; case EOpDeterminant: out.debug << "determinant"; break; case EOpMatrixInverse: out.debug << "inverse"; break; case EOpTranspose: out.debug << "transpose"; break; case EOpAny: out.debug << "any"; break; case EOpAll: out.debug << "all"; break; case EOpArrayLength: out.debug << "array length"; break; case EOpEmitStreamVertex: out.debug << "EmitStreamVertex"; break; case EOpEndStreamPrimitive: out.debug << "EndStreamPrimitive"; break; case EOpAtomicCounterIncrement: out.debug << "AtomicCounterIncrement";break; case EOpAtomicCounterDecrement: out.debug << "AtomicCounterDecrement";break; case EOpAtomicCounter: out.debug << "AtomicCounter"; break; case EOpTextureQuerySize: out.debug << "textureSize"; break; case EOpTextureQueryLod: out.debug << "textureQueryLod"; break; case EOpTextureQueryLevels: out.debug << "textureQueryLevels"; break; case EOpTextureQuerySamples: out.debug << "textureSamples"; break; case EOpImageQuerySize: out.debug << "imageQuerySize"; break; case EOpImageQuerySamples: out.debug << "imageQuerySamples"; break; case EOpImageLoad: out.debug << "imageLoad"; break; case EOpBitFieldReverse: out.debug << "bitFieldReverse"; break; case EOpBitCount: out.debug << "bitCount"; break; case EOpFindLSB: out.debug << "findLSB"; break; case EOpFindMSB: out.debug << "findMSB"; break; case EOpCountLeadingZeros: out.debug << "countLeadingZeros"; break; case EOpCountTrailingZeros: out.debug << "countTrailingZeros"; break; case EOpNoise: out.debug << "noise"; break; case EOpBallot: out.debug << "ballot"; break; case EOpReadFirstInvocation: out.debug << "readFirstInvocation"; break; case EOpAnyInvocation: out.debug << "anyInvocation"; break; case EOpAllInvocations: out.debug << "allInvocations"; break; case EOpAllInvocationsEqual: out.debug << "allInvocationsEqual"; break; case EOpSubgroupElect: out.debug << "subgroupElect"; break; case EOpSubgroupAll: out.debug << "subgroupAll"; break; case EOpSubgroupAny: out.debug << "subgroupAny"; break; case EOpSubgroupAllEqual: out.debug << "subgroupAllEqual"; break; case EOpSubgroupBroadcast: out.debug << "subgroupBroadcast"; break; case EOpSubgroupBroadcastFirst: out.debug << "subgroupBroadcastFirst"; break; case EOpSubgroupBallot: out.debug << "subgroupBallot"; break; case EOpSubgroupInverseBallot: out.debug << "subgroupInverseBallot"; break; case EOpSubgroupBallotBitExtract: out.debug << "subgroupBallotBitExtract"; break; case EOpSubgroupBallotBitCount: out.debug << "subgroupBallotBitCount"; break; case EOpSubgroupBallotInclusiveBitCount: out.debug << "subgroupBallotInclusiveBitCount"; break; case EOpSubgroupBallotExclusiveBitCount: out.debug << "subgroupBallotExclusiveBitCount"; break; case EOpSubgroupBallotFindLSB: out.debug << "subgroupBallotFindLSB"; break; case EOpSubgroupBallotFindMSB: out.debug << "subgroupBallotFindMSB"; break; case EOpSubgroupShuffle: out.debug << "subgroupShuffle"; break; case EOpSubgroupShuffleXor: out.debug << "subgroupShuffleXor"; break; case EOpSubgroupShuffleUp: out.debug << "subgroupShuffleUp"; break; case EOpSubgroupShuffleDown: out.debug << "subgroupShuffleDown"; break; case EOpSubgroupRotate: out.debug << "subgroupRotate"; break; case EOpSubgroupClusteredRotate: out.debug << "subgroupClusteredRotate"; break; case EOpSubgroupAdd: out.debug << "subgroupAdd"; break; case EOpSubgroupMul: out.debug << "subgroupMul"; break; case EOpSubgroupMin: out.debug << "subgroupMin"; break; case EOpSubgroupMax: out.debug << "subgroupMax"; break; case EOpSubgroupAnd: out.debug << "subgroupAnd"; break; case EOpSubgroupOr: out.debug << "subgroupOr"; break; case EOpSubgroupXor: out.debug << "subgroupXor"; break; case EOpSubgroupInclusiveAdd: out.debug << "subgroupInclusiveAdd"; break; case EOpSubgroupInclusiveMul: out.debug << "subgroupInclusiveMul"; break; case EOpSubgroupInclusiveMin: out.debug << "subgroupInclusiveMin"; break; case EOpSubgroupInclusiveMax: out.debug << "subgroupInclusiveMax"; break; case EOpSubgroupInclusiveAnd: out.debug << "subgroupInclusiveAnd"; break; case EOpSubgroupInclusiveOr: out.debug << "subgroupInclusiveOr"; break; case EOpSubgroupInclusiveXor: out.debug << "subgroupInclusiveXor"; break; case EOpSubgroupExclusiveAdd: out.debug << "subgroupExclusiveAdd"; break; case EOpSubgroupExclusiveMul: out.debug << "subgroupExclusiveMul"; break; case EOpSubgroupExclusiveMin: out.debug << "subgroupExclusiveMin"; break; case EOpSubgroupExclusiveMax: out.debug << "subgroupExclusiveMax"; break; case EOpSubgroupExclusiveAnd: out.debug << "subgroupExclusiveAnd"; break; case EOpSubgroupExclusiveOr: out.debug << "subgroupExclusiveOr"; break; case EOpSubgroupExclusiveXor: out.debug << "subgroupExclusiveXor"; break; case EOpSubgroupClusteredAdd: out.debug << "subgroupClusteredAdd"; break; case EOpSubgroupClusteredMul: out.debug << "subgroupClusteredMul"; break; case EOpSubgroupClusteredMin: out.debug << "subgroupClusteredMin"; break; case EOpSubgroupClusteredMax: out.debug << "subgroupClusteredMax"; break; case EOpSubgroupClusteredAnd: out.debug << "subgroupClusteredAnd"; break; case EOpSubgroupClusteredOr: out.debug << "subgroupClusteredOr"; break; case EOpSubgroupClusteredXor: out.debug << "subgroupClusteredXor"; break; case EOpSubgroupQuadBroadcast: out.debug << "subgroupQuadBroadcast"; break; case EOpSubgroupQuadSwapHorizontal: out.debug << "subgroupQuadSwapHorizontal"; break; case EOpSubgroupQuadSwapVertical: out.debug << "subgroupQuadSwapVertical"; break; case EOpSubgroupQuadSwapDiagonal: out.debug << "subgroupQuadSwapDiagonal"; break; case EOpSubgroupQuadAll: out.debug << "subgroupQuadAll"; break; case EOpSubgroupQuadAny: out.debug << "subgroupQuadAny"; break; case EOpSubgroupPartition: out.debug << "subgroupPartitionNV"; break; case EOpSubgroupPartitionedAdd: out.debug << "subgroupPartitionedAddNV"; break; case EOpSubgroupPartitionedMul: out.debug << "subgroupPartitionedMulNV"; break; case EOpSubgroupPartitionedMin: out.debug << "subgroupPartitionedMinNV"; break; case EOpSubgroupPartitionedMax: out.debug << "subgroupPartitionedMaxNV"; break; case EOpSubgroupPartitionedAnd: out.debug << "subgroupPartitionedAndNV"; break; case EOpSubgroupPartitionedOr: out.debug << "subgroupPartitionedOrNV"; break; case EOpSubgroupPartitionedXor: out.debug << "subgroupPartitionedXorNV"; break; case EOpSubgroupPartitionedInclusiveAdd: out.debug << "subgroupPartitionedInclusiveAddNV"; break; case EOpSubgroupPartitionedInclusiveMul: out.debug << "subgroupPartitionedInclusiveMulNV"; break; case EOpSubgroupPartitionedInclusiveMin: out.debug << "subgroupPartitionedInclusiveMinNV"; break; case EOpSubgroupPartitionedInclusiveMax: out.debug << "subgroupPartitionedInclusiveMaxNV"; break; case EOpSubgroupPartitionedInclusiveAnd: out.debug << "subgroupPartitionedInclusiveAndNV"; break; case EOpSubgroupPartitionedInclusiveOr: out.debug << "subgroupPartitionedInclusiveOrNV"; break; case EOpSubgroupPartitionedInclusiveXor: out.debug << "subgroupPartitionedInclusiveXorNV"; break; case EOpSubgroupPartitionedExclusiveAdd: out.debug << "subgroupPartitionedExclusiveAddNV"; break; case EOpSubgroupPartitionedExclusiveMul: out.debug << "subgroupPartitionedExclusiveMulNV"; break; case EOpSubgroupPartitionedExclusiveMin: out.debug << "subgroupPartitionedExclusiveMinNV"; break; case EOpSubgroupPartitionedExclusiveMax: out.debug << "subgroupPartitionedExclusiveMaxNV"; break; case EOpSubgroupPartitionedExclusiveAnd: out.debug << "subgroupPartitionedExclusiveAndNV"; break; case EOpSubgroupPartitionedExclusiveOr: out.debug << "subgroupPartitionedExclusiveOrNV"; break; case EOpSubgroupPartitionedExclusiveXor: out.debug << "subgroupPartitionedExclusiveXorNV"; break; case EOpClip: out.debug << "clip"; break; case EOpIsFinite: out.debug << "isfinite"; break; case EOpLog10: out.debug << "log10"; break; case EOpRcp: out.debug << "rcp"; break; case EOpSaturate: out.debug << "saturate"; break; case EOpSparseTexelsResident: out.debug << "sparseTexelsResident"; break; case EOpMinInvocations: out.debug << "minInvocations"; break; case EOpMaxInvocations: out.debug << "maxInvocations"; break; case EOpAddInvocations: out.debug << "addInvocations"; break; case EOpMinInvocationsNonUniform: out.debug << "minInvocationsNonUniform"; break; case EOpMaxInvocationsNonUniform: out.debug << "maxInvocationsNonUniform"; break; case EOpAddInvocationsNonUniform: out.debug << "addInvocationsNonUniform"; break; case EOpMinInvocationsInclusiveScan: out.debug << "minInvocationsInclusiveScan"; break; case EOpMaxInvocationsInclusiveScan: out.debug << "maxInvocationsInclusiveScan"; break; case EOpAddInvocationsInclusiveScan: out.debug << "addInvocationsInclusiveScan"; break; case EOpMinInvocationsInclusiveScanNonUniform: out.debug << "minInvocationsInclusiveScanNonUniform"; break; case EOpMaxInvocationsInclusiveScanNonUniform: out.debug << "maxInvocationsInclusiveScanNonUniform"; break; case EOpAddInvocationsInclusiveScanNonUniform: out.debug << "addInvocationsInclusiveScanNonUniform"; break; case EOpMinInvocationsExclusiveScan: out.debug << "minInvocationsExclusiveScan"; break; case EOpMaxInvocationsExclusiveScan: out.debug << "maxInvocationsExclusiveScan"; break; case EOpAddInvocationsExclusiveScan: out.debug << "addInvocationsExclusiveScan"; break; case EOpMinInvocationsExclusiveScanNonUniform: out.debug << "minInvocationsExclusiveScanNonUniform"; break; case EOpMaxInvocationsExclusiveScanNonUniform: out.debug << "maxInvocationsExclusiveScanNonUniform"; break; case EOpAddInvocationsExclusiveScanNonUniform: out.debug << "addInvocationsExclusiveScanNonUniform"; break; case EOpMbcnt: out.debug << "mbcnt"; break; case EOpFragmentMaskFetch: out.debug << "fragmentMaskFetchAMD"; break; case EOpFragmentFetch: out.debug << "fragmentFetchAMD"; break; case EOpCubeFaceIndex: out.debug << "cubeFaceIndex"; break; case EOpCubeFaceCoord: out.debug << "cubeFaceCoord"; break; case EOpSubpassLoad: out.debug << "subpassLoad"; break; case EOpSubpassLoadMS: out.debug << "subpassLoadMS"; break; case EOpColorAttachmentReadEXT: out.debug << "colorAttachmentReadEXT"; break; case EOpConstructReference: out.debug << "Construct reference type"; break; case EOpDeclare: out.debug << "Declare"; break; case EOpSpirvInst: out.debug << "spirv_instruction"; break; case EOpCreateTensorLayoutNV: out.debug << "createTensorLayoutNV"; break; case EOpTensorLayoutSetBlockSizeNV: out.debug << "setTensorLayoutBlockSizeNV"; break; case EOpTensorLayoutSetDimensionNV: out.debug << "setTensorLayoutDimensionNV"; break; case EOpTensorLayoutSetStrideNV: out.debug << "setTensorLayoutStrideNV"; break; case EOpTensorLayoutSliceNV: out.debug << "sliceTensorLayoutNV"; break; case EOpTensorLayoutSetClampValueNV: out.debug << "setTensorLayoutClampValueNV"; break; case EOpCreateTensorViewNV: out.debug << "createTensorViewNV"; break; case EOpTensorViewSetDimensionNV: out.debug << "setTensorViewDimensionsNV"; break; case EOpTensorViewSetStrideNV: out.debug << "setTensorViewStrideNV"; break; case EOpTensorViewSetClipNV: out.debug << "setTensorViewClipNV"; break; default: out.debug.message(EPrefixError, "Bad unary op"); } out.debug << " (" << node->getCompleteString() << ")"; out.debug << "\n"; return true; } bool TOutputTraverser::visitAggregate(TVisit /* visit */, TIntermAggregate* node) { TInfoSink& out = infoSink; if (node->getOp() == EOpNull) { out.debug.message(EPrefixError, "node is still EOpNull!"); return true; } OutputTreeText(out, node, depth); switch (node->getOp()) { case EOpSequence: out.debug << "Sequence\n"; return true; case EOpScope: out.debug << "Scope\n"; return true; case EOpLinkerObjects: out.debug << "Linker Objects\n"; return true; case EOpComma: out.debug << "Comma"; break; case EOpFunction: out.debug << "Function Definition: " << node->getName(); break; case EOpFunctionCall: out.debug << "Function Call: " << node->getName(); break; case EOpParameters: out.debug << "Function Parameters: "; break; case EOpConstructFloat: out.debug << "Construct float"; break; case EOpConstructDouble:out.debug << "Construct double"; break; case EOpConstructVec2: out.debug << "Construct vec2"; break; case EOpConstructVec3: out.debug << "Construct vec3"; break; case EOpConstructVec4: out.debug << "Construct vec4"; break; case EOpConstructDVec2: out.debug << "Construct dvec2"; break; case EOpConstructDVec3: out.debug << "Construct dvec3"; break; case EOpConstructDVec4: out.debug << "Construct dvec4"; break; case EOpConstructBool: out.debug << "Construct bool"; break; case EOpConstructBVec2: out.debug << "Construct bvec2"; break; case EOpConstructBVec3: out.debug << "Construct bvec3"; break; case EOpConstructBVec4: out.debug << "Construct bvec4"; break; case EOpConstructInt8: out.debug << "Construct int8_t"; break; case EOpConstructI8Vec2: out.debug << "Construct i8vec2"; break; case EOpConstructI8Vec3: out.debug << "Construct i8vec3"; break; case EOpConstructI8Vec4: out.debug << "Construct i8vec4"; break; case EOpConstructInt: out.debug << "Construct int"; break; case EOpConstructIVec2: out.debug << "Construct ivec2"; break; case EOpConstructIVec3: out.debug << "Construct ivec3"; break; case EOpConstructIVec4: out.debug << "Construct ivec4"; break; case EOpConstructUint8: out.debug << "Construct uint8_t"; break; case EOpConstructU8Vec2: out.debug << "Construct u8vec2"; break; case EOpConstructU8Vec3: out.debug << "Construct u8vec3"; break; case EOpConstructU8Vec4: out.debug << "Construct u8vec4"; break; case EOpConstructUint: out.debug << "Construct uint"; break; case EOpConstructUVec2: out.debug << "Construct uvec2"; break; case EOpConstructUVec3: out.debug << "Construct uvec3"; break; case EOpConstructUVec4: out.debug << "Construct uvec4"; break; case EOpConstructInt64: out.debug << "Construct int64"; break; case EOpConstructI64Vec2: out.debug << "Construct i64vec2"; break; case EOpConstructI64Vec3: out.debug << "Construct i64vec3"; break; case EOpConstructI64Vec4: out.debug << "Construct i64vec4"; break; case EOpConstructUint64: out.debug << "Construct uint64"; break; case EOpConstructU64Vec2: out.debug << "Construct u64vec2"; break; case EOpConstructU64Vec3: out.debug << "Construct u64vec3"; break; case EOpConstructU64Vec4: out.debug << "Construct u64vec4"; break; case EOpConstructInt16: out.debug << "Construct int16_t"; break; case EOpConstructI16Vec2: out.debug << "Construct i16vec2"; break; case EOpConstructI16Vec3: out.debug << "Construct i16vec3"; break; case EOpConstructI16Vec4: out.debug << "Construct i16vec4"; break; case EOpConstructUint16: out.debug << "Construct uint16_t"; break; case EOpConstructU16Vec2: out.debug << "Construct u16vec2"; break; case EOpConstructU16Vec3: out.debug << "Construct u16vec3"; break; case EOpConstructU16Vec4: out.debug << "Construct u16vec4"; break; case EOpConstructMat2x2: out.debug << "Construct mat2"; break; case EOpConstructMat2x3: out.debug << "Construct mat2x3"; break; case EOpConstructMat2x4: out.debug << "Construct mat2x4"; break; case EOpConstructMat3x2: out.debug << "Construct mat3x2"; break; case EOpConstructMat3x3: out.debug << "Construct mat3"; break; case EOpConstructMat3x4: out.debug << "Construct mat3x4"; break; case EOpConstructMat4x2: out.debug << "Construct mat4x2"; break; case EOpConstructMat4x3: out.debug << "Construct mat4x3"; break; case EOpConstructMat4x4: out.debug << "Construct mat4"; break; case EOpConstructDMat2x2: out.debug << "Construct dmat2"; break; case EOpConstructDMat2x3: out.debug << "Construct dmat2x3"; break; case EOpConstructDMat2x4: out.debug << "Construct dmat2x4"; break; case EOpConstructDMat3x2: out.debug << "Construct dmat3x2"; break; case EOpConstructDMat3x3: out.debug << "Construct dmat3"; break; case EOpConstructDMat3x4: out.debug << "Construct dmat3x4"; break; case EOpConstructDMat4x2: out.debug << "Construct dmat4x2"; break; case EOpConstructDMat4x3: out.debug << "Construct dmat4x3"; break; case EOpConstructDMat4x4: out.debug << "Construct dmat4"; break; case EOpConstructIMat2x2: out.debug << "Construct imat2"; break; case EOpConstructIMat2x3: out.debug << "Construct imat2x3"; break; case EOpConstructIMat2x4: out.debug << "Construct imat2x4"; break; case EOpConstructIMat3x2: out.debug << "Construct imat3x2"; break; case EOpConstructIMat3x3: out.debug << "Construct imat3"; break; case EOpConstructIMat3x4: out.debug << "Construct imat3x4"; break; case EOpConstructIMat4x2: out.debug << "Construct imat4x2"; break; case EOpConstructIMat4x3: out.debug << "Construct imat4x3"; break; case EOpConstructIMat4x4: out.debug << "Construct imat4"; break; case EOpConstructUMat2x2: out.debug << "Construct umat2"; break; case EOpConstructUMat2x3: out.debug << "Construct umat2x3"; break; case EOpConstructUMat2x4: out.debug << "Construct umat2x4"; break; case EOpConstructUMat3x2: out.debug << "Construct umat3x2"; break; case EOpConstructUMat3x3: out.debug << "Construct umat3"; break; case EOpConstructUMat3x4: out.debug << "Construct umat3x4"; break; case EOpConstructUMat4x2: out.debug << "Construct umat4x2"; break; case EOpConstructUMat4x3: out.debug << "Construct umat4x3"; break; case EOpConstructUMat4x4: out.debug << "Construct umat4"; break; case EOpConstructBMat2x2: out.debug << "Construct bmat2"; break; case EOpConstructBMat2x3: out.debug << "Construct bmat2x3"; break; case EOpConstructBMat2x4: out.debug << "Construct bmat2x4"; break; case EOpConstructBMat3x2: out.debug << "Construct bmat3x2"; break; case EOpConstructBMat3x3: out.debug << "Construct bmat3"; break; case EOpConstructBMat3x4: out.debug << "Construct bmat3x4"; break; case EOpConstructBMat4x2: out.debug << "Construct bmat4x2"; break; case EOpConstructBMat4x3: out.debug << "Construct bmat4x3"; break; case EOpConstructBMat4x4: out.debug << "Construct bmat4"; break; case EOpConstructBFloat16: out.debug << "Construct bfloat16_t"; break; case EOpConstructBF16Vec2: out.debug << "Construct bf16vec2"; break; case EOpConstructBF16Vec3: out.debug << "Construct bf16vec3"; break; case EOpConstructBF16Vec4: out.debug << "Construct bf16vec4"; break; case EOpConstructFloatE5M2: out.debug << "Construct floate5m2_t"; break; case EOpConstructFloatE5M2Vec2: out.debug << "Construct fe5m2vec2"; break; case EOpConstructFloatE5M2Vec3: out.debug << "Construct fe5m2vec3"; break; case EOpConstructFloatE5M2Vec4: out.debug << "Construct fe5m2vec4"; break; case EOpConstructFloatE4M3: out.debug << "Construct floate4m3_t"; break; case EOpConstructFloatE4M3Vec2: out.debug << "Construct fe4m3vec2"; break; case EOpConstructFloatE4M3Vec3: out.debug << "Construct fe4m3vec3"; break; case EOpConstructFloatE4M3Vec4: out.debug << "Construct fe4m3vec4"; break; case EOpConstructFloat16: out.debug << "Construct float16_t"; break; case EOpConstructF16Vec2: out.debug << "Construct f16vec2"; break; case EOpConstructF16Vec3: out.debug << "Construct f16vec3"; break; case EOpConstructF16Vec4: out.debug << "Construct f16vec4"; break; case EOpConstructF16Mat2x2: out.debug << "Construct f16mat2"; break; case EOpConstructF16Mat2x3: out.debug << "Construct f16mat2x3"; break; case EOpConstructF16Mat2x4: out.debug << "Construct f16mat2x4"; break; case EOpConstructF16Mat3x2: out.debug << "Construct f16mat3x2"; break; case EOpConstructF16Mat3x3: out.debug << "Construct f16mat3"; break; case EOpConstructF16Mat3x4: out.debug << "Construct f16mat3x4"; break; case EOpConstructF16Mat4x2: out.debug << "Construct f16mat4x2"; break; case EOpConstructF16Mat4x3: out.debug << "Construct f16mat4x3"; break; case EOpConstructF16Mat4x4: out.debug << "Construct f16mat4"; break; case EOpConstructStruct: out.debug << "Construct structure"; break; case EOpConstructTextureSampler: out.debug << "Construct combined texture-sampler"; break; case EOpConstructReference: out.debug << "Construct reference"; break; case EOpConstructCooperativeMatrixNV: out.debug << "Construct cooperative matrix NV"; break; case EOpConstructCooperativeMatrixKHR: out.debug << "Construct cooperative matrix KHR"; break; case EOpConstructCooperativeVectorNV: out.debug << "Construct cooperative vector NV"; break; case EOpConstructAccStruct: out.debug << "Construct acceleration structure"; break; case EOpLessThan: out.debug << "Compare Less Than"; break; case EOpGreaterThan: out.debug << "Compare Greater Than"; break; case EOpLessThanEqual: out.debug << "Compare Less Than or Equal"; break; case EOpGreaterThanEqual: out.debug << "Compare Greater Than or Equal"; break; case EOpVectorEqual: out.debug << "Equal"; break; case EOpVectorNotEqual: out.debug << "NotEqual"; break; case EOpMod: out.debug << "mod"; break; case EOpModf: out.debug << "modf"; break; case EOpPow: out.debug << "pow"; break; case EOpAtan: out.debug << "arc tangent"; break; case EOpMin: out.debug << "min"; break; case EOpMax: out.debug << "max"; break; case EOpClamp: out.debug << "clamp"; break; case EOpMix: out.debug << "mix"; break; case EOpStep: out.debug << "step"; break; case EOpSmoothStep: out.debug << "smoothstep"; break; case EOpDistance: out.debug << "distance"; break; case EOpDot: out.debug << "dot-product"; break; case EOpDotPackedEXT: out.debug << "dot-product-packed";break; case EOpDotAccSatEXT: out.debug << "dot-product-accumulate-saturate";break; case EOpDotPackedAccSatEXT: out.debug << "dot-product-packed-accumulate-saturate";break; case EOpCross: out.debug << "cross-product"; break; case EOpFaceForward: out.debug << "face-forward"; break; case EOpReflect: out.debug << "reflect"; break; case EOpRefract: out.debug << "refract"; break; case EOpMul: out.debug << "component-wise multiply"; break; case EOpOuterProduct: out.debug << "outer product"; break; case EOpEmitVertex: out.debug << "EmitVertex"; break; case EOpEndPrimitive: out.debug << "EndPrimitive"; break; case EOpBarrier: out.debug << "Barrier"; break; case EOpMemoryBarrier: out.debug << "MemoryBarrier"; break; case EOpMemoryBarrierAtomicCounter: out.debug << "MemoryBarrierAtomicCounter"; break; case EOpMemoryBarrierBuffer: out.debug << "MemoryBarrierBuffer"; break; case EOpMemoryBarrierImage: out.debug << "MemoryBarrierImage"; break; case EOpMemoryBarrierShared: out.debug << "MemoryBarrierShared"; break; case EOpGroupMemoryBarrier: out.debug << "GroupMemoryBarrier"; break; case EOpReadInvocation: out.debug << "readInvocation"; break; case EOpSwizzleInvocations: out.debug << "swizzleInvocations"; break; case EOpSwizzleInvocationsMasked: out.debug << "swizzleInvocationsMasked"; break; case EOpWriteInvocation: out.debug << "writeInvocation"; break; case EOpMin3: out.debug << "min3"; break; case EOpMax3: out.debug << "max3"; break; case EOpMid3: out.debug << "mid3"; break; case EOpTime: out.debug << "time"; break; case EOpAtomicAdd: out.debug << "AtomicAdd"; break; case EOpAtomicSubtract: out.debug << "AtomicSubtract"; break; case EOpAtomicMin: out.debug << "AtomicMin"; break; case EOpAtomicMax: out.debug << "AtomicMax"; break; case EOpAtomicAnd: out.debug << "AtomicAnd"; break; case EOpAtomicOr: out.debug << "AtomicOr"; break; case EOpAtomicXor: out.debug << "AtomicXor"; break; case EOpAtomicExchange: out.debug << "AtomicExchange"; break; case EOpAtomicCompSwap: out.debug << "AtomicCompSwap"; break; case EOpAtomicLoad: out.debug << "AtomicLoad"; break; case EOpAtomicStore: out.debug << "AtomicStore"; break; case EOpAtomicCounterAdd: out.debug << "AtomicCounterAdd"; break; case EOpAtomicCounterSubtract: out.debug << "AtomicCounterSubtract"; break; case EOpAtomicCounterMin: out.debug << "AtomicCounterMin"; break; case EOpAtomicCounterMax: out.debug << "AtomicCounterMax"; break; case EOpAtomicCounterAnd: out.debug << "AtomicCounterAnd"; break; case EOpAtomicCounterOr: out.debug << "AtomicCounterOr"; break; case EOpAtomicCounterXor: out.debug << "AtomicCounterXor"; break; case EOpAtomicCounterExchange: out.debug << "AtomicCounterExchange"; break; case EOpAtomicCounterCompSwap: out.debug << "AtomicCounterCompSwap"; break; case EOpImageQuerySize: out.debug << "imageQuerySize"; break; case EOpImageQuerySamples: out.debug << "imageQuerySamples"; break; case EOpImageLoad: out.debug << "imageLoad"; break; case EOpImageStore: out.debug << "imageStore"; break; case EOpImageAtomicAdd: out.debug << "imageAtomicAdd"; break; case EOpImageAtomicMin: out.debug << "imageAtomicMin"; break; case EOpImageAtomicMax: out.debug << "imageAtomicMax"; break; case EOpImageAtomicAnd: out.debug << "imageAtomicAnd"; break; case EOpImageAtomicOr: out.debug << "imageAtomicOr"; break; case EOpImageAtomicXor: out.debug << "imageAtomicXor"; break; case EOpImageAtomicExchange: out.debug << "imageAtomicExchange"; break; case EOpImageAtomicCompSwap: out.debug << "imageAtomicCompSwap"; break; case EOpImageAtomicLoad: out.debug << "imageAtomicLoad"; break; case EOpImageAtomicStore: out.debug << "imageAtomicStore"; break; case EOpImageLoadLod: out.debug << "imageLoadLod"; break; case EOpImageStoreLod: out.debug << "imageStoreLod"; break; case EOpTextureQuerySize: out.debug << "textureSize"; break; case EOpTextureQueryLod: out.debug << "textureQueryLod"; break; case EOpTextureQueryLevels: out.debug << "textureQueryLevels"; break; case EOpTextureQuerySamples: out.debug << "textureSamples"; break; case EOpTexture: out.debug << "texture"; break; case EOpTextureProj: out.debug << "textureProj"; break; case EOpTextureLod: out.debug << "textureLod"; break; case EOpTextureOffset: out.debug << "textureOffset"; break; case EOpTextureFetch: out.debug << "textureFetch"; break; case EOpTextureFetchOffset: out.debug << "textureFetchOffset"; break; case EOpTextureProjOffset: out.debug << "textureProjOffset"; break; case EOpTextureLodOffset: out.debug << "textureLodOffset"; break; case EOpTextureProjLod: out.debug << "textureProjLod"; break; case EOpTextureProjLodOffset: out.debug << "textureProjLodOffset"; break; case EOpTextureGrad: out.debug << "textureGrad"; break; case EOpTextureGradOffset: out.debug << "textureGradOffset"; break; case EOpTextureProjGrad: out.debug << "textureProjGrad"; break; case EOpTextureProjGradOffset: out.debug << "textureProjGradOffset"; break; case EOpTextureGather: out.debug << "textureGather"; break; case EOpTextureGatherOffset: out.debug << "textureGatherOffset"; break; case EOpTextureGatherOffsets: out.debug << "textureGatherOffsets"; break; case EOpTextureClamp: out.debug << "textureClamp"; break; case EOpTextureOffsetClamp: out.debug << "textureOffsetClamp"; break; case EOpTextureGradClamp: out.debug << "textureGradClamp"; break; case EOpTextureGradOffsetClamp: out.debug << "textureGradOffsetClamp"; break; case EOpTextureGatherLod: out.debug << "textureGatherLod"; break; case EOpTextureGatherLodOffset: out.debug << "textureGatherLodOffset"; break; case EOpTextureGatherLodOffsets: out.debug << "textureGatherLodOffsets"; break; case EOpSparseTexture: out.debug << "sparseTexture"; break; case EOpSparseTextureOffset: out.debug << "sparseTextureOffset"; break; case EOpSparseTextureLod: out.debug << "sparseTextureLod"; break; case EOpSparseTextureLodOffset: out.debug << "sparseTextureLodOffset"; break; case EOpSparseTextureFetch: out.debug << "sparseTexelFetch"; break; case EOpSparseTextureFetchOffset: out.debug << "sparseTexelFetchOffset"; break; case EOpSparseTextureGrad: out.debug << "sparseTextureGrad"; break; case EOpSparseTextureGradOffset: out.debug << "sparseTextureGradOffset"; break; case EOpSparseTextureGather: out.debug << "sparseTextureGather"; break; case EOpSparseTextureGatherOffset: out.debug << "sparseTextureGatherOffset"; break; case EOpSparseTextureGatherOffsets: out.debug << "sparseTextureGatherOffsets"; break; case EOpSparseImageLoad: out.debug << "sparseImageLoad"; break; case EOpSparseTextureClamp: out.debug << "sparseTextureClamp"; break; case EOpSparseTextureOffsetClamp: out.debug << "sparseTextureOffsetClamp"; break; case EOpSparseTextureGradClamp: out.debug << "sparseTextureGradClamp"; break; case EOpSparseTextureGradOffsetClamp: out.debug << "sparseTextureGradOffsetClam"; break; case EOpSparseTextureGatherLod: out.debug << "sparseTextureGatherLod"; break; case EOpSparseTextureGatherLodOffset: out.debug << "sparseTextureGatherLodOffset"; break; case EOpSparseTextureGatherLodOffsets: out.debug << "sparseTextureGatherLodOffsets"; break; case EOpSparseImageLoadLod: out.debug << "sparseImageLoadLod"; break; case EOpImageSampleFootprintNV: out.debug << "imageSampleFootprintNV"; break; case EOpImageSampleFootprintClampNV: out.debug << "imageSampleFootprintClampNV"; break; case EOpImageSampleFootprintLodNV: out.debug << "imageSampleFootprintLodNV"; break; case EOpImageSampleFootprintGradNV: out.debug << "imageSampleFootprintGradNV"; break; case EOpImageSampleFootprintGradClampNV: out.debug << "mageSampleFootprintGradClampNV"; break; case EOpAddCarry: out.debug << "addCarry"; break; case EOpSubBorrow: out.debug << "subBorrow"; break; case EOpUMulExtended: out.debug << "uMulExtended"; break; case EOpIMulExtended: out.debug << "iMulExtended"; break; case EOpBitfieldExtract: out.debug << "bitfieldExtract"; break; case EOpBitfieldInsert: out.debug << "bitfieldInsert"; break; case EOpFma: out.debug << "fma"; break; case EOpFrexp: out.debug << "frexp"; break; case EOpLdexp: out.debug << "ldexp"; break; case EOpInterpolateAtSample: out.debug << "interpolateAtSample"; break; case EOpInterpolateAtOffset: out.debug << "interpolateAtOffset"; break; case EOpInterpolateAtVertex: out.debug << "interpolateAtVertex"; break; case EOpSinCos: out.debug << "sincos"; break; case EOpGenMul: out.debug << "mul"; break; case EOpAllMemoryBarrierWithGroupSync: out.debug << "AllMemoryBarrierWithGroupSync"; break; case EOpDeviceMemoryBarrier: out.debug << "DeviceMemoryBarrier"; break; case EOpDeviceMemoryBarrierWithGroupSync: out.debug << "DeviceMemoryBarrierWithGroupSync"; break; case EOpWorkgroupMemoryBarrier: out.debug << "WorkgroupMemoryBarrier"; break; case EOpWorkgroupMemoryBarrierWithGroupSync: out.debug << "WorkgroupMemoryBarrierWithGroupSync"; break; case EOpSubgroupBarrier: out.debug << "subgroupBarrier"; break; case EOpSubgroupMemoryBarrier: out.debug << "subgroupMemoryBarrier"; break; case EOpSubgroupMemoryBarrierBuffer: out.debug << "subgroupMemoryBarrierBuffer"; break; case EOpSubgroupMemoryBarrierImage: out.debug << "subgroupMemoryBarrierImage"; break; case EOpSubgroupMemoryBarrierShared: out.debug << "subgroupMemoryBarrierShared"; break; case EOpSubgroupElect: out.debug << "subgroupElect"; break; case EOpSubgroupAll: out.debug << "subgroupAll"; break; case EOpSubgroupAny: out.debug << "subgroupAny"; break; case EOpSubgroupAllEqual: out.debug << "subgroupAllEqual"; break; case EOpSubgroupBroadcast: out.debug << "subgroupBroadcast"; break; case EOpSubgroupBroadcastFirst: out.debug << "subgroupBroadcastFirst"; break; case EOpSubgroupBallot: out.debug << "subgroupBallot"; break; case EOpSubgroupInverseBallot: out.debug << "subgroupInverseBallot"; break; case EOpSubgroupBallotBitExtract: out.debug << "subgroupBallotBitExtract"; break; case EOpSubgroupBallotBitCount: out.debug << "subgroupBallotBitCount"; break; case EOpSubgroupBallotInclusiveBitCount: out.debug << "subgroupBallotInclusiveBitCount"; break; case EOpSubgroupBallotExclusiveBitCount: out.debug << "subgroupBallotExclusiveBitCount"; break; case EOpSubgroupBallotFindLSB: out.debug << "subgroupBallotFindLSB"; break; case EOpSubgroupBallotFindMSB: out.debug << "subgroupBallotFindMSB"; break; case EOpSubgroupShuffle: out.debug << "subgroupShuffle"; break; case EOpSubgroupShuffleXor: out.debug << "subgroupShuffleXor"; break; case EOpSubgroupShuffleUp: out.debug << "subgroupShuffleUp"; break; case EOpSubgroupShuffleDown: out.debug << "subgroupShuffleDown"; break; case EOpSubgroupRotate: out.debug << "subgroupRotate"; break; case EOpSubgroupClusteredRotate: out.debug << "subgroupClusteredRotate"; break; case EOpSubgroupAdd: out.debug << "subgroupAdd"; break; case EOpSubgroupMul: out.debug << "subgroupMul"; break; case EOpSubgroupMin: out.debug << "subgroupMin"; break; case EOpSubgroupMax: out.debug << "subgroupMax"; break; case EOpSubgroupAnd: out.debug << "subgroupAnd"; break; case EOpSubgroupOr: out.debug << "subgroupOr"; break; case EOpSubgroupXor: out.debug << "subgroupXor"; break; case EOpSubgroupInclusiveAdd: out.debug << "subgroupInclusiveAdd"; break; case EOpSubgroupInclusiveMul: out.debug << "subgroupInclusiveMul"; break; case EOpSubgroupInclusiveMin: out.debug << "subgroupInclusiveMin"; break; case EOpSubgroupInclusiveMax: out.debug << "subgroupInclusiveMax"; break; case EOpSubgroupInclusiveAnd: out.debug << "subgroupInclusiveAnd"; break; case EOpSubgroupInclusiveOr: out.debug << "subgroupInclusiveOr"; break; case EOpSubgroupInclusiveXor: out.debug << "subgroupInclusiveXor"; break; case EOpSubgroupExclusiveAdd: out.debug << "subgroupExclusiveAdd"; break; case EOpSubgroupExclusiveMul: out.debug << "subgroupExclusiveMul"; break; case EOpSubgroupExclusiveMin: out.debug << "subgroupExclusiveMin"; break; case EOpSubgroupExclusiveMax: out.debug << "subgroupExclusiveMax"; break; case EOpSubgroupExclusiveAnd: out.debug << "subgroupExclusiveAnd"; break; case EOpSubgroupExclusiveOr: out.debug << "subgroupExclusiveOr"; break; case EOpSubgroupExclusiveXor: out.debug << "subgroupExclusiveXor"; break; case EOpSubgroupClusteredAdd: out.debug << "subgroupClusteredAdd"; break; case EOpSubgroupClusteredMul: out.debug << "subgroupClusteredMul"; break; case EOpSubgroupClusteredMin: out.debug << "subgroupClusteredMin"; break; case EOpSubgroupClusteredMax: out.debug << "subgroupClusteredMax"; break; case EOpSubgroupClusteredAnd: out.debug << "subgroupClusteredAnd"; break; case EOpSubgroupClusteredOr: out.debug << "subgroupClusteredOr"; break; case EOpSubgroupClusteredXor: out.debug << "subgroupClusteredXor"; break; case EOpSubgroupQuadBroadcast: out.debug << "subgroupQuadBroadcast"; break; case EOpSubgroupQuadSwapHorizontal: out.debug << "subgroupQuadSwapHorizontal"; break; case EOpSubgroupQuadSwapVertical: out.debug << "subgroupQuadSwapVertical"; break; case EOpSubgroupQuadSwapDiagonal: out.debug << "subgroupQuadSwapDiagonal"; break; case EOpSubgroupQuadAll: out.debug << "subgroupQuadAll"; break; case EOpSubgroupQuadAny: out.debug << "subgroupQuadAny"; break; case EOpSubgroupPartition: out.debug << "subgroupPartitionNV"; break; case EOpSubgroupPartitionedAdd: out.debug << "subgroupPartitionedAddNV"; break; case EOpSubgroupPartitionedMul: out.debug << "subgroupPartitionedMulNV"; break; case EOpSubgroupPartitionedMin: out.debug << "subgroupPartitionedMinNV"; break; case EOpSubgroupPartitionedMax: out.debug << "subgroupPartitionedMaxNV"; break; case EOpSubgroupPartitionedAnd: out.debug << "subgroupPartitionedAndNV"; break; case EOpSubgroupPartitionedOr: out.debug << "subgroupPartitionedOrNV"; break; case EOpSubgroupPartitionedXor: out.debug << "subgroupPartitionedXorNV"; break; case EOpSubgroupPartitionedInclusiveAdd: out.debug << "subgroupPartitionedInclusiveAddNV"; break; case EOpSubgroupPartitionedInclusiveMul: out.debug << "subgroupPartitionedInclusiveMulNV"; break; case EOpSubgroupPartitionedInclusiveMin: out.debug << "subgroupPartitionedInclusiveMinNV"; break; case EOpSubgroupPartitionedInclusiveMax: out.debug << "subgroupPartitionedInclusiveMaxNV"; break; case EOpSubgroupPartitionedInclusiveAnd: out.debug << "subgroupPartitionedInclusiveAndNV"; break; case EOpSubgroupPartitionedInclusiveOr: out.debug << "subgroupPartitionedInclusiveOrNV"; break; case EOpSubgroupPartitionedInclusiveXor: out.debug << "subgroupPartitionedInclusiveXorNV"; break; case EOpSubgroupPartitionedExclusiveAdd: out.debug << "subgroupPartitionedExclusiveAddNV"; break; case EOpSubgroupPartitionedExclusiveMul: out.debug << "subgroupPartitionedExclusiveMulNV"; break; case EOpSubgroupPartitionedExclusiveMin: out.debug << "subgroupPartitionedExclusiveMinNV"; break; case EOpSubgroupPartitionedExclusiveMax: out.debug << "subgroupPartitionedExclusiveMaxNV"; break; case EOpSubgroupPartitionedExclusiveAnd: out.debug << "subgroupPartitionedExclusiveAndNV"; break; case EOpSubgroupPartitionedExclusiveOr: out.debug << "subgroupPartitionedExclusiveOrNV"; break; case EOpSubgroupPartitionedExclusiveXor: out.debug << "subgroupPartitionedExclusiveXorNV"; break; case EOpSubpassLoad: out.debug << "subpassLoad"; break; case EOpSubpassLoadMS: out.debug << "subpassLoadMS"; break; case EOpColorAttachmentReadEXT: out.debug << "colorAttachmentReadEXT"; break; case EOpTraceNV: out.debug << "traceNV"; break; case EOpTraceRayMotionNV: out.debug << "traceRayMotionNV"; break; case EOpTraceKHR: out.debug << "traceRayKHR"; break; case EOpReportIntersection: out.debug << "reportIntersectionNV"; break; case EOpIgnoreIntersectionNV: out.debug << "ignoreIntersectionNV"; break; case EOpIgnoreIntersectionKHR: out.debug << "ignoreIntersectionKHR"; break; case EOpTerminateRayNV: out.debug << "terminateRayNV"; break; case EOpTerminateRayKHR: out.debug << "terminateRayKHR"; break; case EOpExecuteCallableNV: out.debug << "executeCallableNV"; break; case EOpExecuteCallableKHR: out.debug << "executeCallableKHR"; break; case EOpWritePackedPrimitiveIndices4x8NV: out.debug << "writePackedPrimitiveIndices4x8NV"; break; case EOpEmitMeshTasksEXT: out.debug << "EmitMeshTasksEXT"; break; case EOpSetMeshOutputsEXT: out.debug << "SetMeshOutputsEXT"; break; case EOpRayQueryInitialize: out.debug << "rayQueryInitializeEXT"; break; case EOpRayQueryTerminate: out.debug << "rayQueryTerminateEXT"; break; case EOpRayQueryGenerateIntersection: out.debug << "rayQueryGenerateIntersectionEXT"; break; case EOpRayQueryConfirmIntersection: out.debug << "rayQueryConfirmIntersectionEXT"; break; case EOpRayQueryProceed: out.debug << "rayQueryProceedEXT"; break; case EOpRayQueryGetIntersectionType: out.debug << "rayQueryGetIntersectionTypeEXT"; break; case EOpRayQueryGetRayTMin: out.debug << "rayQueryGetRayTMinEXT"; break; case EOpRayQueryGetRayFlags: out.debug << "rayQueryGetRayFlagsEXT"; break; case EOpRayQueryGetIntersectionT: out.debug << "rayQueryGetIntersectionTEXT"; break; case EOpRayQueryGetIntersectionInstanceCustomIndex: out.debug << "rayQueryGetIntersectionInstanceCustomIndexEXT"; break; case EOpRayQueryGetIntersectionInstanceId: out.debug << "rayQueryGetIntersectionInstanceIdEXT"; break; case EOpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffset: out.debug << "rayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetEXT"; break; case EOpRayQueryGetIntersectionGeometryIndex: out.debug << "rayQueryGetIntersectionGeometryIndexEXT"; break; case EOpRayQueryGetIntersectionPrimitiveIndex: out.debug << "rayQueryGetIntersectionPrimitiveIndexEXT"; break; case EOpRayQueryGetIntersectionBarycentrics: out.debug << "rayQueryGetIntersectionBarycentricsEXT"; break; case EOpRayQueryGetIntersectionFrontFace: out.debug << "rayQueryGetIntersectionFrontFaceEXT"; break; case EOpRayQueryGetIntersectionCandidateAABBOpaque: out.debug << "rayQueryGetIntersectionCandidateAABBOpaqueEXT"; break; case EOpRayQueryGetIntersectionObjectRayDirection: out.debug << "rayQueryGetIntersectionObjectRayDirectionEXT"; break; case EOpRayQueryGetIntersectionObjectRayOrigin: out.debug << "rayQueryGetIntersectionObjectRayOriginEXT"; break; case EOpRayQueryGetWorldRayDirection: out.debug << "rayQueryGetWorldRayDirectionEXT"; break; case EOpRayQueryGetWorldRayOrigin: out.debug << "rayQueryGetWorldRayOriginEXT"; break; case EOpRayQueryGetIntersectionObjectToWorld: out.debug << "rayQueryGetIntersectionObjectToWorldEXT"; break; case EOpRayQueryGetIntersectionWorldToObject: out.debug << "rayQueryGetIntersectionWorldToObjectEXT"; break; case EOpRayQueryGetIntersectionTriangleVertexPositionsEXT: out.debug << "rayQueryGetIntersectionTriangleVertexPositionsEXT"; break; case EOpRayQueryGetIntersectionClusterIdNV: out.debug << "rayQueryGetIntersectionClusterIdNV"; break; case EOpRayQueryGetIntersectionSpherePositionNV: out.debug << "rayQueryGetIntersectionSpherePositionNV"; break; case EOpRayQueryGetIntersectionSphereRadiusNV: out.debug << "rayQueryGetIntersectionSphereRadiusNV"; break; case EOpRayQueryGetIntersectionLSSHitValueNV: out.debug << "rayQueryGetIntersectionLSSHitValueNV"; break; case EOpRayQueryGetIntersectionLSSPositionsNV: out.debug << "rayQueryGetIntersectionLSSPositionsNV"; break; case EOpRayQueryGetIntersectionLSSRadiiNV: out.debug << "rayQueryGetIntersectionLSSRadiiNV"; break; case EOpRayQueryIsSphereHitNV: out.debug << "rayQueryIsSphereHitNV"; break; case EOpRayQueryIsLSSHitNV: out.debug << "rayQueryIsLSSHitNV"; break; case EOpCooperativeMatrixLoad: out.debug << "Load cooperative matrix KHR"; break; case EOpCooperativeMatrixStore: out.debug << "Store cooperative matrix KHR"; break; case EOpCooperativeMatrixMulAdd: out.debug << "MulAdd cooperative matrices KHR"; break; case EOpCooperativeMatrixLoadNV: out.debug << "Load cooperative matrix NV"; break; case EOpCooperativeMatrixStoreNV: out.debug << "Store cooperative matrix NV"; break; case EOpCooperativeMatrixLoadTensorNV: out.debug << "Load cooperative matrix tensor NV"; break; case EOpCooperativeMatrixStoreTensorNV: out.debug << "Store cooperative matrix tensor NV"; break; case EOpCooperativeMatrixMulAddNV: out.debug << "MulAdd cooperative matrices NV"; break; case EOpCooperativeMatrixReduceNV: out.debug << "Reduce cooperative matrices"; break; case EOpCooperativeMatrixPerElementOpNV: out.debug << "cooperative matrix per element op"; break; case EOpCooperativeMatrixTransposeNV: out.debug << "Transpose cooperative matrix"; break; case EOpCooperativeVectorMatMulNV: out.debug << "Cooperative vector matrix multiply NV"; break; case EOpCooperativeVectorMatMulAddNV: out.debug << "Cooperative vector matrix multiply add NV"; break; case EOpCooperativeVectorLoadNV: out.debug << "Load cooperative vector NV"; break; case EOpCooperativeVectorStoreNV: out.debug << "Store cooperative vector NV"; break; case EOpCooperativeVectorOuterProductAccumulateNV: out.debug << "Cooperative vector outer product accumulate NV"; break; case EOpCooperativeVectorReduceSumAccumulateNV: out.debug << "Cooperative vector reduce sum accumulate NV"; break; case EOpIsHelperInvocation: out.debug << "IsHelperInvocation"; break; case EOpDebugPrintf: out.debug << "Debug printf"; break; case EOpHitObjectTraceRayNV: out.debug << "HitObjectTraceRayNV"; break; case EOpHitObjectTraceRayMotionNV: out.debug << "HitObjectTraceRayMotionNV"; break; case EOpHitObjectRecordHitNV: out.debug << "HitObjectRecordHitNV"; break; case EOpHitObjectRecordHitMotionNV: out.debug << "HitObjectRecordHitMotionNV"; break; case EOpHitObjectRecordHitWithIndexNV: out.debug << "HitObjectRecordHitWithIndexNV"; break; case EOpHitObjectRecordHitWithIndexMotionNV: out.debug << "HitObjectRecordHitWithIndexMotionNV"; break; case EOpHitObjectRecordMissNV: out.debug << "HitObjectRecordMissNV"; break; case EOpHitObjectRecordMissMotionNV: out.debug << "HitObjectRecordMissMotionNV"; break; case EOpHitObjectRecordEmptyNV: out.debug << "HitObjectRecordEmptyNV"; break; case EOpHitObjectExecuteShaderNV: out.debug << "HitObjectExecuteShaderNV"; break; case EOpHitObjectIsEmptyNV: out.debug << "HitObjectIsEmptyNV"; break; case EOpHitObjectIsMissNV: out.debug << "HitObjectIsMissNV"; break; case EOpHitObjectIsHitNV: out.debug << "HitObjectIsHitNV"; break; case EOpHitObjectGetRayTMinNV: out.debug << "HitObjectGetRayTMinNV"; break; case EOpHitObjectGetRayTMaxNV: out.debug << "HitObjectGetRayTMaxNV"; break; case EOpHitObjectGetObjectRayOriginNV: out.debug << "HitObjectGetObjectRayOriginNV"; break; case EOpHitObjectGetObjectRayDirectionNV: out.debug << "HitObjectGetObjectRayDirectionNV"; break; case EOpHitObjectGetWorldRayOriginNV: out.debug << "HitObjectGetWorldRayOriginNV"; break; case EOpHitObjectGetWorldRayDirectionNV: out.debug << "HitObjectGetWorldRayDirectionNV"; break; case EOpHitObjectGetObjectToWorldNV: out.debug << "HitObjectGetObjectToWorldNV"; break; case EOpHitObjectGetWorldToObjectNV: out.debug << "HitObjectGetWorldToObjectNV"; break; case EOpHitObjectGetInstanceCustomIndexNV: out.debug<< "HitObjectGetInstanceCustomIndexNV"; break; case EOpHitObjectGetInstanceIdNV: out.debug << "HitObjectGetInstaneIdNV"; break; case EOpHitObjectGetGeometryIndexNV: out.debug << "HitObjectGetGeometryIndexNV"; break; case EOpHitObjectGetPrimitiveIndexNV: out.debug << "HitObjectGetPrimitiveIndexNV"; break; case EOpHitObjectGetHitKindNV: out.debug << "HitObjectGetHitKindNV"; break; case EOpHitObjectGetAttributesNV: out.debug << "HitObjectGetAttributesNV"; break; case EOpHitObjectGetCurrentTimeNV: out.debug << "HitObjectGetCurrentTimeNV"; break; case EOpHitObjectGetShaderBindingTableRecordIndexNV: out.debug << "HitObjectGetShaderBindingTableRecordIndexNV"; break; case EOpHitObjectGetShaderRecordBufferHandleNV: out.debug << "HitObjectReadShaderRecordBufferHandleNV"; break; case EOpHitObjectGetClusterIdNV: out.debug << "HitObjectGetClusterIdNV"; break; case EOpReorderThreadNV: out.debug << "ReorderThreadNV"; break; case EOpFetchMicroTriangleVertexPositionNV: out.debug << "MicroTriangleVertexPositionNV"; break; case EOpFetchMicroTriangleVertexBarycentricNV: out.debug << "MicroTriangleVertexBarycentricNV"; break; case EOpHitObjectGetSpherePositionNV: out.debug << "HitObjectGetSpherePositionNV"; break; case EOpHitObjectGetSphereRadiusNV: out.debug << "HitObjectGetSphereRadiusNV"; break; case EOpHitObjectGetLSSPositionsNV: out.debug << "HitObjectGetLSSPositionsNV"; break; case EOpHitObjectGetLSSRadiiNV: out.debug << "HitObjectGetLSSRadiiNV"; break; case EOpHitObjectIsSphereHitNV: out.debug << "HitObjectIsSphereHitNV"; break; case EOpHitObjectIsLSSHitNV: out.debug << "HitObjectIsLSSHitNV"; break; case EOpSpirvInst: out.debug << "spirv_instruction"; break; case EOpStencilAttachmentReadEXT: out.debug << "stencilAttachmentReadEXT"; break; case EOpDepthAttachmentReadEXT: out.debug << "depthAttachmentReadEXT"; break; case EOpCreateTensorLayoutNV: out.debug << "createTensorLayout"; break; case EOpTensorLayoutSetBlockSizeNV: out.debug << "setBlockSize"; break; case EOpTensorLayoutSetDimensionNV: out.debug << "setDimension"; break; case EOpTensorLayoutSetStrideNV: out.debug << "setStride"; break; case EOpTensorLayoutSliceNV: out.debug << "slice"; break; case EOpTensorLayoutSetClampValueNV: out.debug << "setClampValue"; break; case EOpCreateTensorViewNV: out.debug << "createTensorView"; break; case EOpTensorViewSetDimensionNV: out.debug << "setTensorViewDimensions"; break; case EOpTensorViewSetStrideNV: out.debug << "setTensorViewStride"; break; case EOpTensorViewSetClipNV: out.debug << "clipTensorView"; break; default: out.debug.message(EPrefixError, "Bad aggregation op"); } if (node->getOp() != EOpSequence && node->getOp() != EOpScope && node->getOp() != EOpParameters) out.debug << " (" << node->getCompleteString() << ")"; out.debug << "\n"; return true; } bool TOutputTraverser::visitSelection(TVisit /* visit */, TIntermSelection* node) { TInfoSink& out = infoSink; OutputTreeText(out, node, depth); out.debug << "Test condition and select"; out.debug << " (" << node->getCompleteString() << ")"; if (node->getShortCircuit() == false) out.debug << ": no shortcircuit"; if (node->getFlatten()) out.debug << ": Flatten"; if (node->getDontFlatten()) out.debug << ": DontFlatten"; out.debug << "\n"; ++depth; OutputTreeText(out, node, depth); out.debug << "Condition\n"; node->getCondition()->traverse(this); OutputTreeText(out, node, depth); if (node->getTrueBlock()) { out.debug << "true case\n"; node->getTrueBlock()->traverse(this); } else out.debug << "true case is null\n"; if (node->getFalseBlock()) { OutputTreeText(out, node, depth); out.debug << "false case\n"; node->getFalseBlock()->traverse(this); } --depth; return false; } // Print infinities and NaNs, and numbers in a portable way. // Goals: // - portable (across IEEE 754 platforms) // - shows all possible IEEE values // - shows simple numbers in a simple way, e.g., no leading/trailing 0s // - shows all digits, no premature rounding static void OutputDouble(TInfoSink& out, double value, TOutputTraverser::EExtraOutput extra) { if (std::isinf(value)) { if (value < 0) out.debug << "-1.#INF"; else out.debug << "+1.#INF"; } else if (std::isnan(value)) out.debug << "1.#IND"; else { const int maxSize = 340; char buf[maxSize]; const char* format = "%f"; if (fabs(value) > 0.0 && (fabs(value) < 1e-5 || fabs(value) > 1e12)) format = "%-.13e"; int len = snprintf(buf, maxSize, format, value); assert(len < maxSize); // remove a leading zero in the 100s slot in exponent; it is not portable // pattern: XX...XXXe+0XX or XX...XXXe-0XX if (len > 5) { if (buf[len-5] == 'e' && (buf[len-4] == '+' || buf[len-4] == '-') && buf[len-3] == '0') { buf[len-3] = buf[len-2]; buf[len-2] = buf[len-1]; buf[len-1] = '\0'; } } out.debug << buf; switch (extra) { case TOutputTraverser::BinaryDoubleOutput: { uint64_t b; static_assert(sizeof(b) == sizeof(value), "sizeof(uint64_t) != sizeof(double)"); memcpy(&b, &value, sizeof(b)); out.debug << " : "; for (size_t i = 0; i < 8 * sizeof(value); ++i, ++b) { out.debug << ((b & 0x8000000000000000) != 0 ? "1" : "0"); b <<= 1; } break; } default: break; } } } static void OutputConstantUnion(TInfoSink& out, const TIntermTyped* node, const TConstUnionArray& constUnion, TOutputTraverser::EExtraOutput extra, int depth) { int size = node->getType().computeNumComponents(); for (int i = 0; i < size; i++) { OutputTreeText(out, node, depth); switch (constUnion[i].getType()) { case EbtBool: if (constUnion[i].getBConst()) out.debug << "true"; else out.debug << "false"; out.debug << " (" << "const bool" << ")"; out.debug << "\n"; break; case EbtFloat: case EbtDouble: case EbtFloat16: case EbtBFloat16: case EbtFloatE5M2: case EbtFloatE4M3: OutputDouble(out, constUnion[i].getDConst(), extra); out.debug << "\n"; break; case EbtInt8: { const int maxSize = 300; char buf[maxSize]; snprintf(buf, maxSize, "%d (%s)", constUnion[i].getI8Const(), "const int8_t"); out.debug << buf << "\n"; } break; case EbtUint8: { const int maxSize = 300; char buf[maxSize]; snprintf(buf, maxSize, "%u (%s)", constUnion[i].getU8Const(), "const uint8_t"); out.debug << buf << "\n"; } break; case EbtInt16: { const int maxSize = 300; char buf[maxSize]; snprintf(buf, maxSize, "%d (%s)", constUnion[i].getI16Const(), "const int16_t"); out.debug << buf << "\n"; } break; case EbtUint16: { const int maxSize = 300; char buf[maxSize]; snprintf(buf, maxSize, "%u (%s)", constUnion[i].getU16Const(), "const uint16_t"); out.debug << buf << "\n"; } break; case EbtInt: { const int maxSize = 300; char buf[maxSize]; snprintf(buf, maxSize, "%d (%s)", constUnion[i].getIConst(), "const int"); out.debug << buf << "\n"; } break; case EbtUint: { const int maxSize = 300; char buf[maxSize]; snprintf(buf, maxSize, "%u (%s)", constUnion[i].getUConst(), "const uint"); out.debug << buf << "\n"; } break; case EbtInt64: { const int maxSize = 300; char buf[maxSize]; snprintf(buf, maxSize, "%lld (%s)", constUnion[i].getI64Const(), "const int64_t"); out.debug << buf << "\n"; } break; case EbtUint64: { const int maxSize = 300; char buf[maxSize]; snprintf(buf, maxSize, "%llu (%s)", constUnion[i].getU64Const(), "const uint64_t"); out.debug << buf << "\n"; } break; case EbtString: out.debug << "\"" << constUnion[i].getSConst()->c_str() << "\"\n"; break; default: out.info.message(EPrefixInternalError, "Unknown constant", node->getLoc()); break; } } } void TOutputTraverser::visitConstantUnion(TIntermConstantUnion* node) { OutputTreeText(infoSink, node, depth); infoSink.debug << "Constant:\n"; OutputConstantUnion(infoSink, node, node->getConstArray(), extraOutput, depth + 1); } void TOutputTraverser::visitSymbol(TIntermSymbol* node) { OutputTreeText(infoSink, node, depth); infoSink.debug << "'" << node->getName() << "' (" << node->getCompleteString() << ")\n"; if (! node->getConstArray().empty()) OutputConstantUnion(infoSink, node, node->getConstArray(), extraOutput, depth + 1); else if (node->getConstSubtree()) { incrementDepth(node); node->getConstSubtree()->traverse(this); decrementDepth(); } } bool TOutputTraverser::visitLoop(TVisit /* visit */, TIntermLoop* node) { TInfoSink& out = infoSink; OutputTreeText(out, node, depth); out.debug << "Loop with condition "; if (! node->testFirst()) out.debug << "not "; out.debug << "tested first"; if (node->getUnroll()) out.debug << ": Unroll"; if (node->getDontUnroll()) out.debug << ": DontUnroll"; if (node->getLoopDependency()) { out.debug << ": Dependency "; out.debug << node->getLoopDependency(); } out.debug << "\n"; ++depth; OutputTreeText(infoSink, node, depth); if (node->getTest()) { out.debug << "Loop Condition\n"; node->getTest()->traverse(this); } else out.debug << "No loop condition\n"; OutputTreeText(infoSink, node, depth); if (node->getBody()) { out.debug << "Loop Body\n"; node->getBody()->traverse(this); } else out.debug << "No loop body\n"; if (node->getTerminal()) { OutputTreeText(infoSink, node, depth); out.debug << "Loop Terminal Expression\n"; node->getTerminal()->traverse(this); } --depth; return false; } bool TOutputTraverser::visitBranch(TVisit /* visit*/, TIntermBranch* node) { TInfoSink& out = infoSink; OutputTreeText(out, node, depth); switch (node->getFlowOp()) { case EOpKill: out.debug << "Branch: Kill"; break; case EOpTerminateInvocation: out.debug << "Branch: TerminateInvocation"; break; case EOpIgnoreIntersectionKHR: out.debug << "Branch: IgnoreIntersectionKHR"; break; case EOpTerminateRayKHR: out.debug << "Branch: TerminateRayKHR"; break; case EOpBreak: out.debug << "Branch: Break"; break; case EOpContinue: out.debug << "Branch: Continue"; break; case EOpReturn: out.debug << "Branch: Return"; break; case EOpCase: out.debug << "case: "; break; case EOpDemote: out.debug << "Demote"; break; case EOpDefault: out.debug << "default: "; break; default: out.debug << "Branch: Unknown Branch"; break; } if (node->getExpression()) { out.debug << " with expression\n"; ++depth; node->getExpression()->traverse(this); --depth; } else out.debug << "\n"; return false; } bool TOutputTraverser::visitSwitch(TVisit /* visit */, TIntermSwitch* node) { TInfoSink& out = infoSink; OutputTreeText(out, node, depth); out.debug << "switch"; if (node->getFlatten()) out.debug << ": Flatten"; if (node->getDontFlatten()) out.debug << ": DontFlatten"; out.debug << "\n"; OutputTreeText(out, node, depth); out.debug << "condition\n"; ++depth; node->getCondition()->traverse(this); --depth; OutputTreeText(out, node, depth); out.debug << "body\n"; ++depth; node->getBody()->traverse(this); --depth; return false; } // // This function is the one to call externally to start the traversal. // Individual functions can be initialized to 0 to skip processing of that // type of node. It's children will still be processed. // void TIntermediate::output(TInfoSink& infoSink, bool tree) { infoSink.debug << "Shader version: " << version << "\n"; if (requestedExtensions.size() > 0) { for (auto extIt = requestedExtensions.begin(); extIt != requestedExtensions.end(); ++extIt) infoSink.debug << "Requested " << *extIt << "\n"; } if (xfbMode) infoSink.debug << "in xfb mode\n"; if (getSubgroupUniformControlFlow()) infoSink.debug << "subgroup_uniform_control_flow\n"; if (getMaximallyReconverges()) infoSink.debug << "maximally_reconverges\n"; switch (language) { case EShLangVertex: break; case EShLangTessControl: infoSink.debug << "vertices = " << vertices << "\n"; if (inputPrimitive != ElgNone) infoSink.debug << "input primitive = " << TQualifier::getGeometryString(inputPrimitive) << "\n"; if (vertexSpacing != EvsNone) infoSink.debug << "vertex spacing = " << TQualifier::getVertexSpacingString(vertexSpacing) << "\n"; if (vertexOrder != EvoNone) infoSink.debug << "triangle order = " << TQualifier::getVertexOrderString(vertexOrder) << "\n"; break; case EShLangTessEvaluation: infoSink.debug << "input primitive = " << TQualifier::getGeometryString(inputPrimitive) << "\n"; infoSink.debug << "vertex spacing = " << TQualifier::getVertexSpacingString(vertexSpacing) << "\n"; infoSink.debug << "triangle order = " << TQualifier::getVertexOrderString(vertexOrder) << "\n"; if (pointMode) infoSink.debug << "using point mode\n"; break; case EShLangGeometry: infoSink.debug << "invocations = " << invocations << "\n"; infoSink.debug << "max_vertices = " << vertices << "\n"; infoSink.debug << "input primitive = " << TQualifier::getGeometryString(inputPrimitive) << "\n"; infoSink.debug << "output primitive = " << TQualifier::getGeometryString(outputPrimitive) << "\n"; break; case EShLangFragment: if (pixelCenterInteger) infoSink.debug << "gl_FragCoord pixel center is integer\n"; if (originUpperLeft) infoSink.debug << "gl_FragCoord origin is upper left\n"; if (earlyFragmentTests) infoSink.debug << "using early_fragment_tests\n"; if (postDepthCoverage) infoSink.debug << "using post_depth_coverage\n"; if (nonCoherentColorAttachmentReadEXT) infoSink.debug << "using non_coherent_color_attachment_readEXT\n"; if (nonCoherentDepthAttachmentReadEXT) infoSink.debug << "using non_coherent_depth_attachment_readEXT\n"; if (nonCoherentStencilAttachmentReadEXT) infoSink.debug << "using non_coherent_stencil_attachment_readEXT\n"; if (nonCoherentTileAttachmentReadQCOM) infoSink.debug << "using non_coherent_attachment_readQCOM\n"; if (depthLayout != EldNone) infoSink.debug << "using " << TQualifier::getLayoutDepthString(depthLayout) << "\n"; if (blendEquations != 0) { infoSink.debug << "using"; // blendEquations is a mask, decode it for (TBlendEquationShift be = (TBlendEquationShift)0; be < EBlendCount; be = (TBlendEquationShift)(be + 1)) { if (blendEquations & (1 << be)) infoSink.debug << " " << TQualifier::getBlendEquationString(be); } infoSink.debug << "\n"; } if (interlockOrdering != EioNone) infoSink.debug << "interlock ordering = " << TQualifier::getInterlockOrderingString(interlockOrdering) << "\n"; break; case EShLangMesh: infoSink.debug << "max_vertices = " << vertices << "\n"; infoSink.debug << "max_primitives = " << primitives << "\n"; infoSink.debug << "output primitive = " << TQualifier::getGeometryString(outputPrimitive) << "\n"; [[fallthrough]]; case EShLangTask: // Fall through case EShLangCompute: infoSink.debug << "local_size = (" << localSize[0] << ", " << localSize[1] << ", " << localSize[2] << ")\n"; { if (localSizeSpecId[0] != TQualifier::layoutNotSet || localSizeSpecId[1] != TQualifier::layoutNotSet || localSizeSpecId[2] != TQualifier::layoutNotSet) { infoSink.debug << "local_size ids = (" << localSizeSpecId[0] << ", " << localSizeSpecId[1] << ", " << localSizeSpecId[2] << ")\n"; } } if (nonCoherentTileAttachmentReadQCOM) infoSink.debug << "using non_coherent_attachment_readQCOM\n"; if (isTileShadingRateQCOMSet()) { infoSink.debug << "shading_rateQCOM = (" << tileShadingRateQCOM[0] << ", " << tileShadingRateQCOM[1] << ", " << tileShadingRateQCOM[2] << ")\n"; } break; default: break; } if (treeRoot == nullptr || ! tree) return; TOutputTraverser it(infoSink); if (getBinaryDoubleOutput()) it.setDoubleOutput(TOutputTraverser::BinaryDoubleOutput); treeRoot->traverse(&it); } } // end namespace glslang ================================================ FILE: src/libraries/glslang/glslang/MachineIndependent/iomapper.cpp ================================================ // // Copyright (C) 2016-2017 LunarG, Inc. // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following // disclaimer in the documentation and/or other materials provided // with the distribution. // // Neither the name of 3Dlabs Inc. Ltd. nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // #include "../Include/Common.h" #include "../Include/InfoSink.h" #include "../Include/Types.h" #include "gl_types.h" #include "iomapper.h" #include "LiveTraverser.h" #include "SymbolTable.h" // // Map IO bindings. // // High-level algorithm for one stage: // // 1. Traverse all code (live+dead) to find the explicitly provided bindings. // // 2. Traverse (just) the live code to determine which non-provided bindings // require auto-numbering. We do not auto-number dead ones. // // 3. Traverse all the code to apply the bindings: // a. explicitly given bindings are offset according to their type // b. implicit live bindings are auto-numbered into the holes, using // any open binding slot. // c. implicit dead bindings are left un-bound. // namespace glslang { struct TVarEntryInfo { long long id; TIntermSymbol* symbol; bool live; TLayoutPacking upgradedToPushConstantPacking; // ElpNone means it hasn't been upgraded int newBinding; int newSet; int newLocation; int newComponent; int newIndex; EShLanguage stage; void clearNewAssignments() { upgradedToPushConstantPacking = ElpNone; newBinding = -1; newSet = -1; newLocation = -1; newComponent = -1; newIndex = -1; } struct TOrderById { inline bool operator()(const TVarEntryInfo& l, const TVarEntryInfo& r) { return l.id < r.id; } }; struct TOrderByPriority { // ordering: // 1) has both binding and set // 2) has binding but no set // 3) has no binding but set // 4) has no binding and no set inline bool operator()(const TVarEntryInfo& l, const TVarEntryInfo& r) { const TQualifier& lq = l.symbol->getQualifier(); const TQualifier& rq = r.symbol->getQualifier(); // simple rules: // has binding gives 2 points // has set gives 1 point // who has the most points is more important. int lPoints = (lq.hasBinding() ? 2 : 0) + (lq.hasSet() ? 1 : 0); int rPoints = (rq.hasBinding() ? 2 : 0) + (rq.hasSet() ? 1 : 0); if (lPoints == rPoints) return l.id < r.id; return lPoints > rPoints; } }; struct TOrderByPriorityAndLive { // ordering: // 1) do live variables first // 2) has both binding and set // 3) has binding but no set // 4) has no binding but set // 5) has no binding and no set inline bool operator()(const TVarEntryInfo& l, const TVarEntryInfo& r) { const TQualifier& lq = l.symbol->getQualifier(); const TQualifier& rq = r.symbol->getQualifier(); // simple rules: // has binding gives 2 points // has set gives 1 point // who has the most points is more important. int lPoints = (lq.hasBinding() ? 2 : 0) + (lq.hasSet() ? 1 : 0); int rPoints = (rq.hasBinding() ? 2 : 0) + (rq.hasSet() ? 1 : 0); if (l.live != r.live) return l.live > r.live; if (lPoints != rPoints) return lPoints > rPoints; return l.id < r.id; } }; }; // override function "operator=", if a vector being sort, // when use vc++, the sort function will call : // pair& operator=(const pair<_Other1, _Other2>& _Right) // { // first = _Right.first; // second = _Right.second; // return (*this); // } // that will make a const type handing on left. // override this function can avoid a compiler error. // In the future, if the vc++ compiler can handle such a situation, // this part of the code will be removed. struct TVarLivePair : std::pair { TVarLivePair(const std::pair& _Right) : pair(_Right.first, _Right.second) {} TVarLivePair& operator=(const TVarLivePair& _Right) { const_cast(first) = _Right.first; second = _Right.second; return (*this); } TVarLivePair(const TVarLivePair& src) : pair(src) { } }; typedef std::vector TVarLiveVector; class TVarGatherTraverser : public TLiveTraverser { public: TVarGatherTraverser(const TIntermediate& i, bool traverseDeadCode, TVarLiveMap& inList, TVarLiveMap& outList, TVarLiveMap& uniformList) : TLiveTraverser(i, traverseDeadCode, true, true, false) , inputList(inList) , outputList(outList) , uniformList(uniformList) { } virtual void visitSymbol(TIntermSymbol* base) { TVarLiveMap* target = nullptr; if (base->getQualifier().storage == EvqVaryingIn) target = &inputList; else if (base->getQualifier().storage == EvqVaryingOut) target = &outputList; else if (base->getQualifier().isUniformOrBuffer() && !base->getQualifier().isPushConstant() && !base->getQualifier().isShaderRecord()) target = &uniformList; // If a global is being visited, then we should also traverse it incase it's evaluation // ends up visiting inputs we want to tag as live else if (base->getQualifier().storage == EvqGlobal) addGlobalReference(base->getAccessName()); if (target) { TVarEntryInfo ent = {base->getId(), base, ! traverseAll, {}, {}, {}, {}, {}, {}, {}}; ent.stage = intermediate.getStage(); TVarLiveMap::iterator at = target->find( ent.symbol->getAccessName()); // std::lower_bound(target->begin(), target->end(), ent, TVarEntryInfo::TOrderById()); if (at != target->end() && at->second.id == ent.id) at->second.live = at->second.live || ! traverseAll; // update live state else (*target)[ent.symbol->getAccessName()] = ent; } } private: TVarLiveMap& inputList; TVarLiveMap& outputList; TVarLiveMap& uniformList; }; class TVarSetTraverser : public TLiveTraverser { public: TVarSetTraverser(const TIntermediate& i, const TVarLiveMap& inList, const TVarLiveMap& outList, const TVarLiveMap& uniformList) : TLiveTraverser(i, true, true, true, false) , inputList(inList) , outputList(outList) , uniformList(uniformList) { } virtual void visitSymbol(TIntermSymbol* base) { const TVarLiveMap* source; if (base->getQualifier().storage == EvqVaryingIn) source = &inputList; else if (base->getQualifier().storage == EvqVaryingOut) source = &outputList; else if (base->getQualifier().isUniformOrBuffer()) source = &uniformList; else return; TVarEntryInfo ent = { base->getId(), {}, {}, {}, {}, {}, {}, {}, {}, {} }; // Fix a defect, when block has no instance name, we need to find its block name TVarLiveMap::const_iterator at = source->find(base->getAccessName()); if (at == source->end()) return; if (at->second.id != ent.id) return; if (at->second.newBinding != -1) base->getWritableType().getQualifier().layoutBinding = at->second.newBinding; if (at->second.newSet != -1) base->getWritableType().getQualifier().layoutSet = at->second.newSet; if (at->second.newLocation != -1) base->getWritableType().getQualifier().layoutLocation = at->second.newLocation; if (at->second.newComponent != -1) base->getWritableType().getQualifier().layoutComponent = at->second.newComponent; if (at->second.newIndex != -1) base->getWritableType().getQualifier().layoutIndex = at->second.newIndex; if (at->second.upgradedToPushConstantPacking != ElpNone) { base->getWritableType().getQualifier().layoutPushConstant = true; base->getWritableType().getQualifier().setBlockStorage(EbsPushConstant); base->getWritableType().getQualifier().layoutPacking = at->second.upgradedToPushConstantPacking; } } private: const TVarLiveMap& inputList; const TVarLiveMap& outputList; const TVarLiveMap& uniformList; }; struct TNotifyUniformAdaptor { EShLanguage stage; TIoMapResolver& resolver; inline TNotifyUniformAdaptor(EShLanguage s, TIoMapResolver& r) : stage(s) , resolver(r) { } inline void operator()(std::pair& entKey) { resolver.notifyBinding(stage, entKey.second); } private: TNotifyUniformAdaptor& operator=(TNotifyUniformAdaptor&) = delete; }; struct TNotifyInOutAdaptor { EShLanguage stage; TIoMapResolver& resolver; inline TNotifyInOutAdaptor(EShLanguage s, TIoMapResolver& r) : stage(s) , resolver(r) { } inline void operator()(std::pair& entKey) { resolver.notifyInOut(entKey.second.stage, entKey.second); } private: TNotifyInOutAdaptor& operator=(TNotifyInOutAdaptor&) = delete; }; struct TResolverUniformAdaptor { TResolverUniformAdaptor(EShLanguage s, TIoMapResolver& r, TVarLiveMap* uniform[EShLangCount], TInfoSink& i, bool& e) : stage(s) , resolver(r) , infoSink(i) , error(e) { memcpy(uniformVarMap, uniform, EShLangCount * (sizeof(TVarLiveMap*))); } inline void operator()(std::pair& entKey) { TVarEntryInfo& ent = entKey.second; ent.clearNewAssignments(); const bool isValid = resolver.validateBinding(stage, ent); if (isValid) { resolver.resolveSet(ent.stage, ent); resolver.resolveBinding(ent.stage, ent); resolver.resolveUniformLocation(ent.stage, ent); if (ent.newBinding != -1) { if (ent.newBinding >= int(TQualifier::layoutBindingEnd)) { TString err = "mapped binding out of range: " + entKey.first; infoSink.info.message(EPrefixInternalError, err.c_str()); error = true; } if (ent.symbol->getQualifier().hasBinding()) { for (uint32_t idx = EShLangVertex; idx < EShLangCount; ++idx) { if (idx == ent.stage || uniformVarMap[idx] == nullptr) continue; auto entKey2 = uniformVarMap[idx]->find(entKey.first); if (entKey2 != uniformVarMap[idx]->end()) { entKey2->second.newBinding = ent.newBinding; } } } } if (ent.newSet != -1) { if (ent.newSet >= int(TQualifier::layoutSetEnd)) { TString err = "mapped set out of range: " + entKey.first; infoSink.info.message(EPrefixInternalError, err.c_str()); error = true; } if (ent.symbol->getQualifier().hasSet()) { for (uint32_t idx = EShLangVertex; idx < EShLangCount; ++idx) { if ((idx == stage) || (uniformVarMap[idx] == nullptr)) continue; auto entKey2 = uniformVarMap[idx]->find(entKey.first); if (entKey2 != uniformVarMap[idx]->end()) { entKey2->second.newSet = ent.newSet; } } } } } else { TString errorMsg = "Invalid binding: " + entKey.first; infoSink.info.message(EPrefixInternalError, errorMsg.c_str()); error = true; } } inline void setStage(EShLanguage s) { stage = s; } EShLanguage stage; TIoMapResolver& resolver; TInfoSink& infoSink; bool& error; TVarLiveMap* uniformVarMap[EShLangCount]; private: TResolverUniformAdaptor& operator=(TResolverUniformAdaptor&) = delete; }; struct TResolverInOutAdaptor { TResolverInOutAdaptor(EShLanguage s, TIoMapResolver& r, TInfoSink& i, bool& e) : stage(s) , resolver(r) , infoSink(i) , error(e) { } inline void operator()(std::pair& entKey) { TVarEntryInfo& ent = entKey.second; ent.clearNewAssignments(); const bool isValid = resolver.validateInOut(ent.stage, ent); if (isValid) { resolver.resolveInOutLocation(stage, ent); resolver.resolveInOutComponent(stage, ent); resolver.resolveInOutIndex(stage, ent); } else { TString errorMsg; if (ent.symbol->getType().getQualifier().semanticName != nullptr) { errorMsg = "Invalid shader In/Out variable semantic: "; errorMsg += ent.symbol->getType().getQualifier().semanticName; } else { errorMsg = "Invalid shader In/Out variable: "; errorMsg += ent.symbol->getName(); } infoSink.info.message(EPrefixInternalError, errorMsg.c_str()); error = true; } } inline void setStage(EShLanguage s) { stage = s; } EShLanguage stage; TIoMapResolver& resolver; TInfoSink& infoSink; bool& error; private: TResolverInOutAdaptor& operator=(TResolverInOutAdaptor&) = delete; }; // The class is used for reserving explicit uniform locations and ubo/ssbo/opaque bindings // xxTODO: maybe this logic should be moved into the resolver's "validateInOut" and "validateUniform" struct TSymbolValidater { TSymbolValidater(TIoMapResolver& r, TInfoSink& i, TVarLiveMap* in[EShLangCount], TVarLiveMap* out[EShLangCount], TVarLiveMap* uniform[EShLangCount], bool& hadError, EProfile profile, int version) : resolver(r) , infoSink(i) , hadError(hadError) , profile(profile) , version(version) { memcpy(inVarMaps, in, EShLangCount * (sizeof(TVarLiveMap*))); memcpy(outVarMaps, out, EShLangCount * (sizeof(TVarLiveMap*))); memcpy(uniformVarMap, uniform, EShLangCount * (sizeof(TVarLiveMap*))); std::map anonymousMemberMap; std::vector usedUniformLocation; std::vector usedUniformName; usedUniformLocation.clear(); usedUniformName.clear(); for (int i = 0; i < EShLangCount; i++) { if (uniformVarMap[i]) { for (auto uniformVar : *uniformVarMap[i]) { TIntermSymbol* pSymbol = uniformVar.second.symbol; TQualifier qualifier = uniformVar.second.symbol->getQualifier(); TString symbolName = pSymbol->getAccessName(); // All the uniform needs multi-stage location check (block/default) int uniformLocation = qualifier.layoutLocation; if (uniformLocation != TQualifier::layoutLocationEnd) { // Total size of current uniform, could be block, struct or other types. int size = TIntermediate::computeTypeUniformLocationSize(pSymbol->getType()); TRange locationRange(uniformLocation, uniformLocation + size - 1); // Combine location and component ranges int overlapLocation = -1; bool diffLocation = false; // Check for collisions, except for vertex inputs on desktop targeting OpenGL overlapLocation = checkLocationOverlap(locationRange, usedUniformLocation, symbolName, usedUniformName, diffLocation); // Overlap locations of uniforms, regardless of components (multi stages) if (overlapLocation == -1) { usedUniformLocation.push_back(locationRange); usedUniformName.push_back(symbolName); } else if (overlapLocation >= 0) { if (diffLocation == true) { TString err = ("Uniform location should be equal for same uniforms: " +std::to_string(overlapLocation)).c_str(); infoSink.info.message(EPrefixInternalError, err.c_str()); hadError = true; break; } else { TString err = ("Uniform location overlaps across stages: " + std::to_string(overlapLocation)).c_str(); infoSink.info.message(EPrefixInternalError, err.c_str()); hadError = true; break; } } } if ((uniformVar.second.symbol->getBasicType() == EbtBlock) && IsAnonymous(uniformVar.second.symbol->getName())) { auto blockType = uniformVar.second.symbol->getType().getStruct(); for (size_t memberIdx = 0; memberIdx < blockType->size(); ++memberIdx) { auto memberName = (*blockType)[memberIdx].type->getFieldName(); if (anonymousMemberMap.find(memberName) != anonymousMemberMap.end()) { if (anonymousMemberMap[memberName] != uniformVar.second.symbol->getType().getTypeName()) { TString err = "Invalid block member name: " + memberName; infoSink.info.message(EPrefixInternalError, err.c_str()); hadError = true; break; } } else { anonymousMemberMap[memberName] = uniformVar.second.symbol->getType().getTypeName(); } } } if (hadError) break; } } } } // In case we need to new an intermediate, which costs too much int checkLocationOverlap(const TRange& locationRange, std::vector& usedUniformLocation, const TString symbolName, std::vector& usedUniformName, bool& diffLocation) { for (size_t r = 0; r < usedUniformLocation.size(); ++r) { if (usedUniformName[r] == symbolName) { diffLocation = true; return (usedUniformLocation[r].start == locationRange.start && usedUniformLocation[r].last == locationRange.last) ? -2 : std::max(locationRange.start, usedUniformLocation[r].start); } if (locationRange.overlap(usedUniformLocation[r])) { // there is a collision; pick one return std::max(locationRange.start, usedUniformLocation[r].start); } } return -1; // no collision } inline void operator()(std::pair& entKey) { TVarEntryInfo& ent1 = entKey.second; TIntermSymbol* base = ent1.symbol; const TType& type = ent1.symbol->getType(); const TString& name = entKey.first; TString mangleName1, mangleName2; EShLanguage stage = ent1.stage; EShLanguage preStage, currentStage, nextStage; preStage = EShLangCount; for (int i = stage - 1; i >= 0; i--) { if (inVarMaps[i] != nullptr) { preStage = static_cast(i); break; } } currentStage = stage; nextStage = EShLangCount; for (int i = stage + 1; i < EShLangCount; i++) { if (inVarMaps[i] != nullptr) { nextStage = static_cast(i); break; } } if (type.getQualifier().isArrayedIo(stage)) { TType subType(type, 0); subType.appendMangledName(mangleName1); } else { type.appendMangledName(mangleName1); } // basic checking that symbols match // more extensive checking in the link stage if (base->getQualifier().storage == EvqVaryingIn) { // validate stage in; if (preStage == EShLangCount) return; if (TSymbolTable::isBuiltInSymbol(base->getId())) return; if (outVarMaps[preStage] != nullptr) { auto ent2 = outVarMaps[preStage]->find(name); uint32_t location = base->getType().getQualifier().layoutLocation; if (ent2 == outVarMaps[preStage]->end() && location != glslang::TQualifier::layoutLocationEnd) { for (auto var = outVarMaps[preStage]->begin(); var != ent2; var++) { if (var->second.symbol->getType().getQualifier().layoutLocation == location) { ent2 = var; break; } } } if (ent2 != outVarMaps[preStage]->end()) { auto& type1 = base->getType(); auto& type2 = ent2->second.symbol->getType(); hadError = hadError || typeCheck(&type1, &type2, name.c_str(), false); if (ent2->second.symbol->getType().getQualifier().isArrayedIo(preStage)) { TType subType(ent2->second.symbol->getType(), 0); subType.appendMangledName(mangleName2); } else { ent2->second.symbol->getType().appendMangledName(mangleName2); } if (mangleName1 == mangleName2) { // For ES 3.0 only, other versions have no such restrictions // According to ES 3.0 spec: The type and presence of the interpolation qualifiers and // storage qualifiers of variables with the same name declared in all linked shaders must // match, otherwise the link command will fail. if (profile == EEsProfile && version == 300) { // Don't need to check smooth qualifier, as it uses the default interpolation mode if (ent1.stage == EShLangFragment && type1.isBuiltIn() == false) { if (type1.getQualifier().flat != type2.getQualifier().flat || type1.getQualifier().nopersp != type2.getQualifier().nopersp) { TString err = "Interpolation qualifier mismatch : " + entKey.first; infoSink.info.message(EPrefixInternalError, err.c_str()); hadError = true; } } } return; } else { // Deal with input/output pairs where one is a block member but the other is loose, // e.g. with ARB_separate_shader_objects if (type1.getBasicType() == EbtBlock && type1.isStruct() && !type2.isStruct()) { // Iterate through block members tracking layout glslang::TString name; type1.getStruct()->begin()->type->appendMangledName(name); if (name == mangleName2 && type1.getQualifier().layoutLocation == type2.getQualifier().layoutLocation) return; } if (type2.getBasicType() == EbtBlock && type2.isStruct() && !type1.isStruct()) { // Iterate through block members tracking layout glslang::TString name; type2.getStruct()->begin()->type->appendMangledName(name); if (name == mangleName1 && type1.getQualifier().layoutLocation == type2.getQualifier().layoutLocation) return; } TString err = "Invalid In/Out variable type : " + entKey.first; infoSink.info.message(EPrefixInternalError, err.c_str()); hadError = true; } } else if (!base->getType().isBuiltIn()) { // According to spec: A link error is generated if any statically referenced input variable // or block does not have a matching output if (profile == EEsProfile && ent1.live) { hadError = true; TString errorStr = name + ": not been declare as a output variable in pre shader stage."; infoSink.info.message(EPrefixError, errorStr.c_str()); } } return; } } else if (base->getQualifier().storage == EvqVaryingOut) { // validate stage out; if (nextStage == EShLangCount) return; if (TSymbolTable::isBuiltInSymbol(base->getId())) return; if (inVarMaps[nextStage] != nullptr) { auto ent2 = inVarMaps[nextStage]->find(name); if (ent2 != inVarMaps[nextStage]->end()) { if (ent2->second.symbol->getType().getQualifier().isArrayedIo(nextStage)) { TType subType(ent2->second.symbol->getType(), 0); subType.appendMangledName(mangleName2); } else { ent2->second.symbol->getType().appendMangledName(mangleName2); } if (mangleName1 == mangleName2) return; else { TString err = "Invalid In/Out variable type : " + entKey.first; infoSink.info.message(EPrefixInternalError, err.c_str()); hadError = true; } } return; } } else if (base->getQualifier().isUniformOrBuffer() && !base->getQualifier().isPushConstant()) { // validate uniform type; for (int i = 0; i < EShLangCount; i++) { if (i != currentStage && outVarMaps[i] != nullptr) { auto ent2 = uniformVarMap[i]->find(name); if (ent2 != uniformVarMap[i]->end()) { ent2->second.symbol->getType().appendMangledName(mangleName2); if (mangleName1 != mangleName2) { ent2->second.symbol->getType().sameElementType(type); TString err = "Invalid Uniform variable type : " + entKey.first; infoSink.info.message(EPrefixInternalError, err.c_str()); hadError = true; } mangleName2.clear(); // validate instance name of blocks if (hadError == false && base->getType().getBasicType() == EbtBlock && IsAnonymous(base->getName()) != IsAnonymous(ent2->second.symbol->getName())) { TString err = "Matched uniform block names must also either all be lacking " "an instance name or all having an instance name: " + entKey.first; infoSink.info.message(EPrefixInternalError, err.c_str()); hadError = true; } // validate uniform block member qualifier and member names auto& type1 = base->getType(); auto& type2 = ent2->second.symbol->getType(); if (hadError == false && base->getType().getBasicType() == EbtBlock) { hadError = hadError || typeCheck(&type1, &type2, name.c_str(), true); } else { hadError = hadError || typeCheck(&type1, &type2, name.c_str(), false); } } else if (base->getBasicType() == EbtBlock) { if (IsAnonymous(base->getName())) { // The name of anonymous block member can't same with default uniform variable. auto blockType1 = base->getType().getStruct(); for (size_t memberIdx = 0; memberIdx < blockType1->size(); ++memberIdx) { auto memberName = (*blockType1)[memberIdx].type->getFieldName(); if (uniformVarMap[i]->find(memberName) != uniformVarMap[i]->end()) { TString err = "Invalid Uniform variable name : " + memberName; infoSink.info.message(EPrefixInternalError, err.c_str()); hadError = true; break; } } } } } } } } TVarLiveMap *inVarMaps[EShLangCount], *outVarMaps[EShLangCount], *uniformVarMap[EShLangCount]; // Use for mark current shader stage for resolver TIoMapResolver& resolver; TInfoSink& infoSink; bool& hadError; EProfile profile; int version; private: TSymbolValidater& operator=(TSymbolValidater&) = delete; bool qualifierCheck(const TType* const type1, const TType* const type2, const std::string& name, bool isBlock) { bool hasError = false; const TQualifier& qualifier1 = type1->getQualifier(); const TQualifier& qualifier2 = type2->getQualifier(); if (((isBlock == false) && (type1->getQualifier().storage == EvqUniform && type2->getQualifier().storage == EvqUniform)) || (type1->getQualifier().storage == EvqGlobal && type2->getQualifier().storage == EvqGlobal)) { if (qualifier1.precision != qualifier2.precision) { hasError = true; std::string errorStr = name + ": have precision conflict cross stage."; infoSink.info.message(EPrefixError, errorStr.c_str()); } if (qualifier1.hasFormat() && qualifier2.hasFormat()) { if (qualifier1.layoutFormat != qualifier2.layoutFormat) { hasError = true; std::string errorStr = name + ": have layout format conflict cross stage."; infoSink.info.message(EPrefixError, errorStr.c_str()); } } } if (isBlock == true) { if (qualifier1.layoutPacking != qualifier2.layoutPacking) { hasError = true; std::string errorStr = name + ": have layoutPacking conflict cross stage."; infoSink.info.message(EPrefixError, errorStr.c_str()); } if (qualifier1.layoutMatrix != qualifier2.layoutMatrix) { hasError = true; std::string errorStr = name + ": have layoutMatrix conflict cross stage."; infoSink.info.message(EPrefixError, errorStr.c_str()); } if (qualifier1.layoutOffset != qualifier2.layoutOffset) { hasError = true; std::string errorStr = name + ": have layoutOffset conflict cross stage."; infoSink.info.message(EPrefixError, errorStr.c_str()); } if (qualifier1.layoutAlign != qualifier2.layoutAlign) { hasError = true; std::string errorStr = name + ": have layoutAlign conflict cross stage."; infoSink.info.message(EPrefixError, errorStr.c_str()); } } return hasError; } bool typeCheck(const TType* const type1, const TType* const type2, const std::string& name, bool isBlock) { bool hasError = false; if (!(type1->isStruct() && type2->isStruct())) { hasError = hasError || qualifierCheck(type1, type2, name, isBlock); } else { if (type1->getBasicType() == EbtBlock && type2->getBasicType() == EbtBlock) isBlock = true; const TTypeList* typeList1 = type1->getStruct(); const TTypeList* typeList2 = type2->getStruct(); std::string newName = name; size_t memberCount = typeList1->size(); size_t index2 = 0; for (size_t index = 0; index < memberCount; index++, index2++) { // Skip inactive member if (typeList1->at(index).type->getBasicType() == EbtVoid) continue; while (index2 < typeList2->size() && typeList2->at(index2).type->getBasicType() == EbtVoid) { ++index2; } // TypeList1 has more members in list if (index2 == typeList2->size()) { std::string errorStr = name + ": struct mismatch."; infoSink.info.message(EPrefixError, errorStr.c_str()); hasError = true; break; } if (typeList1->at(index).type->getFieldName() != typeList2->at(index2).type->getFieldName()) { std::string errorStr = name + ": member name mismatch."; infoSink.info.message(EPrefixError, errorStr.c_str()); hasError = true; } else { newName = typeList1->at(index).type->getFieldName().c_str(); } hasError = hasError || typeCheck(typeList1->at(index).type, typeList2->at(index2).type, newName, isBlock); } while (index2 < typeList2->size()) { // TypeList2 has more members if (typeList2->at(index2).type->getBasicType() != EbtVoid) { std::string errorStr = name + ": struct mismatch."; infoSink.info.message(EPrefixError, errorStr.c_str()); hasError = true; break; } ++index2; } } return hasError; } }; struct TSlotCollector { TSlotCollector(TIoMapResolver& r, TInfoSink& i) : resolver(r), infoSink(i) { } inline void operator()(std::pair& entKey) { resolver.reserverStorageSlot(entKey.second, infoSink); resolver.reserverResourceSlot(entKey.second, infoSink); } TIoMapResolver& resolver; TInfoSink& infoSink; private: TSlotCollector& operator=(TSlotCollector&) = delete; }; TDefaultIoResolverBase::TDefaultIoResolverBase(const TIntermediate& intermediate) : referenceIntermediate(intermediate) , nextUniformLocation(intermediate.getUniformLocationBase()) , nextInputLocation(0) , nextOutputLocation(0) { memset(stageMask, false, sizeof(bool) * (EShLangCount + 1)); memset(stageIntermediates, 0, sizeof(TIntermediate*) * (EShLangCount)); stageIntermediates[intermediate.getStage()] = &intermediate; } int TDefaultIoResolverBase::getBaseBinding(EShLanguage stage, TResourceType res, unsigned int set) const { return stageIntermediates[stage] ? selectBaseBinding(stageIntermediates[stage]->getShiftBinding(res), stageIntermediates[stage]->getShiftBindingForSet(res, set)) : selectBaseBinding(referenceIntermediate.getShiftBinding(res), referenceIntermediate.getShiftBindingForSet(res, set)); } const std::vector& TDefaultIoResolverBase::getResourceSetBinding(EShLanguage stage) const { return stageIntermediates[stage] ? stageIntermediates[stage]->getResourceSetBinding() : referenceIntermediate.getResourceSetBinding(); } bool TDefaultIoResolverBase::doAutoBindingMapping() const { return referenceIntermediate.getAutoMapBindings(); } bool TDefaultIoResolverBase::doAutoLocationMapping() const { return referenceIntermediate.getAutoMapLocations(); } TDefaultIoResolverBase::TSlotSet::iterator TDefaultIoResolverBase::findSlot(int set, int slot) { return std::lower_bound(slots[set].begin(), slots[set].end(), slot); } bool TDefaultIoResolverBase::checkEmpty(int set, int slot) { TSlotSet::iterator at = findSlot(set, slot); return ! (at != slots[set].end() && *at == slot); } int TDefaultIoResolverBase::reserveSlot(int set, int slot, int size) { TSlotSet::iterator at = findSlot(set, slot); // tolerate aliasing, by not double-recording aliases // (policy about appropriateness of the alias is higher up) for (int i = 0; i < size; i++) { if (at == slots[set].end() || *at != slot + i) at = slots[set].insert(at, slot + i); ++at; } return slot; } int TDefaultIoResolverBase::getFreeSlot(int set, int base, int size) { TSlotSet::iterator at = findSlot(set, base); if (at == slots[set].end()) return reserveSlot(set, base, size); // look for a big enough gap for (; at != slots[set].end(); ++at) { if (*at - base >= size) break; base = *at + 1; } return reserveSlot(set, base, size); } int TDefaultIoResolverBase::resolveSet(EShLanguage stage, TVarEntryInfo& ent) { const TType& type = ent.symbol->getType(); if (type.getQualifier().hasSet()) { return ent.newSet = type.getQualifier().layoutSet; } // If a command line or API option requested a single descriptor set, use that (if not overrided by spaceN) if (getResourceSetBinding(stage).size() == 1) { return ent.newSet = atoi(getResourceSetBinding(stage)[0].c_str()); } return ent.newSet = 0; } int TDefaultIoResolverBase::resolveUniformLocation(EShLanguage /*stage*/, TVarEntryInfo& ent) { const TType& type = ent.symbol->getType(); const char* name = ent.symbol->getAccessName().c_str(); // kick out of not doing this if (! doAutoLocationMapping()) { return ent.newLocation = -1; } // no locations added if already present, a built-in variable, a block, or an opaque if (type.getQualifier().hasLocation() || type.isBuiltIn() || type.getBasicType() == EbtBlock || type.isAtomic() || type.isSpirvType() || (type.containsOpaque() && referenceIntermediate.getSpv().openGl == 0)) { return ent.newLocation = -1; } // no locations on blocks of built-in variables if (type.isStruct()) { if (type.getStruct()->size() < 1) { return ent.newLocation = -1; } if ((*type.getStruct())[0].type->isBuiltIn()) { return ent.newLocation = -1; } } int location = referenceIntermediate.getUniformLocationOverride(name); if (location != -1) { return ent.newLocation = location; } location = nextUniformLocation; nextUniformLocation += TIntermediate::computeTypeUniformLocationSize(type); return ent.newLocation = location; } int TDefaultIoResolverBase::resolveInOutLocation(EShLanguage stage, TVarEntryInfo& ent) { const TType& type = ent.symbol->getType(); // kick out of not doing this if (! doAutoLocationMapping()) { return ent.newLocation = -1; } // no locations added if already present, a built-in variable, or a variable with SPIR-V decorate if (type.getQualifier().hasLocation() || type.isBuiltIn() || type.getQualifier().hasSpirvDecorate()) { return ent.newLocation = -1; } // no locations on blocks of built-in variables if (type.isStruct()) { if (type.getStruct()->size() < 1) { return ent.newLocation = -1; } if ((*type.getStruct())[0].type->isBuiltIn()) { return ent.newLocation = -1; } } // point to the right input or output location counter int& nextLocation = type.getQualifier().isPipeInput() ? nextInputLocation : nextOutputLocation; // Placeholder. This does not do proper cross-stage lining up, nor // work with mixed location/no-location declarations. int location = nextLocation; int typeLocationSize; // Don’t take into account the outer-most array if the stage’s // interface is automatically an array. typeLocationSize = computeTypeLocationSize(type, stage); nextLocation += typeLocationSize; return ent.newLocation = location; } int TDefaultIoResolverBase::resolveInOutComponent(EShLanguage /*stage*/, TVarEntryInfo& ent) { return ent.newComponent = -1; } int TDefaultIoResolverBase::resolveInOutIndex(EShLanguage /*stage*/, TVarEntryInfo& ent) { return ent.newIndex = -1; } uint32_t TDefaultIoResolverBase::computeTypeLocationSize(const TType& type, EShLanguage stage) { int typeLocationSize; // Don’t take into account the outer-most array if the stage’s // interface is automatically an array. if (type.getQualifier().isArrayedIo(stage)) { TType elementType(type, 0); typeLocationSize = TIntermediate::computeTypeLocationSize(elementType, stage); } else { typeLocationSize = TIntermediate::computeTypeLocationSize(type, stage); } return typeLocationSize; } //TDefaultGlslIoResolver TResourceType TDefaultGlslIoResolver::getResourceType(const glslang::TType& type) { if (isImageType(type)) { return EResImage; } if (isTextureType(type)) { return EResTexture; } if (isSsboType(type)) { return EResSsbo; } if (isSamplerType(type)) { return EResSampler; } if (isUboType(type)) { return EResUbo; } return EResCount; } TDefaultGlslIoResolver::TDefaultGlslIoResolver(const TIntermediate& intermediate) : TDefaultIoResolverBase(intermediate) , preStage(EShLangCount) , currentStage(EShLangCount) { } int TDefaultGlslIoResolver::resolveInOutLocation(EShLanguage stage, TVarEntryInfo& ent) { const TType& type = ent.symbol->getType(); const TString& name = ent.symbol->getAccessName(); if (currentStage != stage) { preStage = currentStage; currentStage = stage; } // kick out if not doing this if (! doAutoLocationMapping()) { return ent.newLocation = -1; } // expand the location to each element if the symbol is a struct or array if (type.getQualifier().hasLocation()) { return ent.newLocation = type.getQualifier().layoutLocation; } // no locations added if already present, a built-in variable, or a variable with SPIR-V decorate if (type.isBuiltIn() || type.getQualifier().hasSpirvDecorate()) { return ent.newLocation = -1; } // no locations on blocks of built-in variables if (type.isStruct()) { if (type.getStruct()->size() < 1) { return ent.newLocation = -1; } if ((*type.getStruct())[0].type->isBuiltIn()) { return ent.newLocation = -1; } } int typeLocationSize = computeTypeLocationSize(type, stage); int location = type.getQualifier().layoutLocation; bool hasLocation = false; EShLanguage keyStage(EShLangCount); TStorageQualifier storage; storage = EvqInOut; if (type.getQualifier().isPipeInput()) { // If this symbol is a input, search pre stage's out keyStage = preStage; } if (type.getQualifier().isPipeOutput()) { // If this symbol is a output, search next stage's in keyStage = currentStage; } // The in/out in current stage is not declared with location, but it is possible declared // with explicit location in other stages, find the storageSlotMap firstly to check whether // the in/out has location int resourceKey = buildStorageKey(keyStage, storage); if (! storageSlotMap[resourceKey].empty()) { TVarSlotMap::iterator iter = storageSlotMap[resourceKey].find(name); if (iter != storageSlotMap[resourceKey].end()) { // If interface resource be found, set it has location and this symbol's new location // equal the symbol's explicit location declaration in pre or next stage. // // vs: out vec4 a; // fs: layout(..., location = 3,...) in vec4 a; hasLocation = true; location = iter->second; // if we want deal like that: // vs: layout(location=4) out vec4 a; // out vec4 b; // // fs: in vec4 a; // layout(location = 4) in vec4 b; // we need retraverse the map. } if (! hasLocation) { // If interface resource note found, It's mean the location in two stage are both implicit declarat. // So we should find a new slot for this interface. // // vs: out vec4 a; // fs: in vec4 a; location = getFreeSlot(resourceKey, 0, typeLocationSize); storageSlotMap[resourceKey][name] = location; } } else { // the first interface declarated in a program. TVarSlotMap varSlotMap; location = getFreeSlot(resourceKey, 0, typeLocationSize); varSlotMap[name] = location; storageSlotMap[resourceKey] = varSlotMap; } //Update location return ent.newLocation = location; } int TDefaultGlslIoResolver::resolveUniformLocation(EShLanguage /*stage*/, TVarEntryInfo& ent) { const TType& type = ent.symbol->getType(); const TString& name = ent.symbol->getAccessName(); // kick out of not doing this if (! doAutoLocationMapping()) { return ent.newLocation = -1; } // expand the location to each element if the symbol is a struct or array if (type.getQualifier().hasLocation() && (type.isStruct() || type.isArray())) { return ent.newLocation = type.getQualifier().layoutLocation; } else { // no locations added if already present, a built-in variable, a block, or an opaque if (type.getQualifier().hasLocation() || type.isBuiltIn() || type.getBasicType() == EbtBlock || type.isAtomic() || type.isSpirvType() || (type.containsOpaque() && referenceIntermediate.getSpv().openGl == 0)) { return ent.newLocation = -1; } // no locations on blocks of built-in variables if (type.isStruct()) { if (type.getStruct()->size() < 1) { return ent.newLocation = -1; } if ((*type.getStruct())[0].type->isBuiltIn()) { return ent.newLocation = -1; } } } int location = referenceIntermediate.getUniformLocationOverride(name.c_str()); if (location != -1) { return ent.newLocation = location; } int size = TIntermediate::computeTypeUniformLocationSize(type); // The uniform in current stage is not declared with location, but it is possible declared // with explicit location in other stages, find the storageSlotMap firstly to check whether // the uniform has location bool hasLocation = false; int resourceKey = buildStorageKey(EShLangCount, EvqUniform); TVarSlotMap& slotMap = storageSlotMap[resourceKey]; // Check dose shader program has uniform resource if (! slotMap.empty()) { // If uniform resource not empty, try find a same name uniform TVarSlotMap::iterator iter = slotMap.find(name); if (iter != slotMap.end()) { // If uniform resource be found, set it has location and this symbol's new location // equal the uniform's explicit location declaration in other stage. // // vs: uniform vec4 a; // fs: layout(..., location = 3,...) uniform vec4 a; hasLocation = true; location = iter->second; } if (! hasLocation) { // No explicit location declaration in other stage. // So we should find a new slot for this uniform. // // vs: uniform vec4 a; // fs: uniform vec4 a; location = getFreeSlot(resourceKey, 0, computeTypeLocationSize(type, currentStage)); storageSlotMap[resourceKey][name] = location; } } else { // the first uniform declaration in a program. TVarSlotMap varSlotMap; location = getFreeSlot(resourceKey, 0, size); varSlotMap[name] = location; storageSlotMap[resourceKey] = varSlotMap; } return ent.newLocation = location; } int TDefaultGlslIoResolver::resolveBinding(EShLanguage stage, TVarEntryInfo& ent) { const TType& type = ent.symbol->getType(); const TString& name = ent.symbol->getAccessName(); // On OpenGL arrays of opaque types take a separate binding for each element int numBindings = referenceIntermediate.getSpv().openGl != 0 && type.isSizedArray() ? type.getCumulativeArraySize() : 1; TResourceType resource = getResourceType(type); // don't need to handle uniform symbol, it will be handled in resolveUniformLocation if (resource == EResUbo && type.getBasicType() != EbtBlock) { return ent.newBinding = -1; } // There is no 'set' qualifier in OpenGL shading language, each resource has its own // binding name space, so remap the 'set' to resource type which make each resource // binding is valid from 0 to MAX_XXRESOURCE_BINDINGS int set = referenceIntermediate.getSpv().openGl != 0 ? resource : ent.newSet; int resourceKey = set; if (resource < EResCount) { if (type.getQualifier().hasBinding()) { int newBinding = reserveSlot(resourceKey, getBaseBinding(stage, resource, set) + type.getQualifier().layoutBinding, numBindings); return ent.newBinding = newBinding; } else { // The resource in current stage is not declared with binding, but it is possible declared // with explicit binding in other stages, find the resourceSlotMap firstly to check whether // the resource has binding, don't need to allocate if it already has a binding bool hasBinding = false; ent.newBinding = -1; // leave as -1 if it isn't set below if (! resourceSlotMap[resourceKey].empty()) { TVarSlotMap::iterator iter = resourceSlotMap[resourceKey].find(name); if (iter != resourceSlotMap[resourceKey].end()) { hasBinding = true; ent.newBinding = iter->second; } } if (!hasBinding && (ent.live && doAutoBindingMapping())) { // find free slot, the caller did make sure it passes all vars with binding // first and now all are passed that do not have a binding and needs one int binding = getFreeSlot(resourceKey, getBaseBinding(stage, resource, set), numBindings); resourceSlotMap[resourceKey][name] = binding; ent.newBinding = binding; } return ent.newBinding; } } return ent.newBinding = -1; } void TDefaultGlslIoResolver::beginResolve(EShLanguage stage) { // reset stage state if (stage == EShLangCount) preStage = currentStage = stage; // update stage state else if (currentStage != stage) { preStage = currentStage; currentStage = stage; } } void TDefaultGlslIoResolver::endResolve(EShLanguage /*stage*/) { // TODO nothing } void TDefaultGlslIoResolver::beginCollect(EShLanguage stage) { // reset stage state if (stage == EShLangCount) preStage = currentStage = stage; // update stage state else if (currentStage != stage) { preStage = currentStage; currentStage = stage; } } void TDefaultGlslIoResolver::endCollect(EShLanguage /*stage*/) { // TODO nothing } void TDefaultGlslIoResolver::reserverStorageSlot(TVarEntryInfo& ent, TInfoSink& infoSink) { const TType& type = ent.symbol->getType(); const TString& name = ent.symbol->getAccessName(); TStorageQualifier storage = type.getQualifier().storage; EShLanguage stage(EShLangCount); switch (storage) { case EvqUniform: if (type.getBasicType() != EbtBlock && type.getQualifier().hasLocation()) { // // Reserve the slots for the uniforms who has explicit location int storageKey = buildStorageKey(EShLangCount, EvqUniform); int location = type.getQualifier().layoutLocation; TVarSlotMap& varSlotMap = storageSlotMap[storageKey]; TVarSlotMap::iterator iter = varSlotMap.find(name); if (iter == varSlotMap.end()) { int numLocations = TIntermediate::computeTypeUniformLocationSize(type); reserveSlot(storageKey, location, numLocations); varSlotMap[name] = location; } else { // Allocate location by name for OpenGL driver, so the uniform in different // stages should be declared with the same location if (iter->second != location) { TString errorMsg = "Invalid location: " + name; infoSink.info.message(EPrefixInternalError, errorMsg.c_str()); hasError = true; } } } break; case EvqVaryingIn: case EvqVaryingOut: // // Reserve the slots for the inout who has explicit location if (type.getQualifier().hasLocation()) { stage = storage == EvqVaryingIn ? preStage : stage; stage = storage == EvqVaryingOut ? currentStage : stage; int storageKey = buildStorageKey(stage, EvqInOut); int location = type.getQualifier().layoutLocation; TVarSlotMap& varSlotMap = storageSlotMap[storageKey]; TVarSlotMap::iterator iter = varSlotMap.find(name); if (iter == varSlotMap.end()) { int numLocations = TIntermediate::computeTypeUniformLocationSize(type); reserveSlot(storageKey, location, numLocations); varSlotMap[name] = location; } else { // Allocate location by name for OpenGL driver, so the uniform in different // stages should be declared with the same location if (iter->second != location) { TString errorMsg = "Invalid location: " + name; infoSink.info.message(EPrefixInternalError, errorMsg.c_str()); hasError = true; } } } break; default: break; } } void TDefaultGlslIoResolver::reserverResourceSlot(TVarEntryInfo& ent, TInfoSink& infoSink) { const TType& type = ent.symbol->getType(); const TString& name = ent.symbol->getAccessName(); TResourceType resource = getResourceType(type); int set = referenceIntermediate.getSpv().openGl != 0 ? resource : resolveSet(ent.stage, ent); int resourceKey = set; if (type.getQualifier().hasBinding()) { TVarSlotMap& varSlotMap = resourceSlotMap[resourceKey]; TVarSlotMap::iterator iter = varSlotMap.find(name); int binding = type.getQualifier().layoutBinding + getBaseBinding(ent.stage, resource, set); if (iter == varSlotMap.end()) { // Reserve the slots for the ubo, ssbo and opaques who has explicit binding int numBindings = referenceIntermediate.getSpv().openGl != 0 && type.isSizedArray() ? type.getCumulativeArraySize() : 1; varSlotMap[name] = binding; reserveSlot(resourceKey, binding, numBindings); } else { // Allocate binding by name for OpenGL driver, so the resource in different // stages should be declared with the same binding if (iter->second != binding) { TString errorMsg = "Invalid binding: " + name; infoSink.info.message(EPrefixInternalError, errorMsg.c_str()); hasError = true; } } } } //TDefaultGlslIoResolver end /* * Basic implementation of glslang::TIoMapResolver that replaces the * previous offset behavior. * It does the same, uses the offsets for the corresponding uniform * types. Also respects the EOptionAutoMapBindings flag and binds * them if needed. */ /* * Default resolver */ struct TDefaultIoResolver : public TDefaultIoResolverBase { TDefaultIoResolver(const TIntermediate& intermediate) : TDefaultIoResolverBase(intermediate) { } bool validateBinding(EShLanguage /*stage*/, TVarEntryInfo& /*ent*/) override { return true; } TResourceType getResourceType(const glslang::TType& type) override { if (isImageType(type)) { return EResImage; } if (isTextureType(type)) { return EResTexture; } if (isSsboType(type)) { return EResSsbo; } if (isSamplerType(type)) { return EResSampler; } if (isUboType(type)) { return EResUbo; } return EResCount; } int resolveBinding(EShLanguage stage, TVarEntryInfo& ent) override { const TType& type = ent.symbol->getType(); const int set = getLayoutSet(type); // On OpenGL arrays of opaque types take a seperate binding for each element int numBindings = referenceIntermediate.getSpv().openGl != 0 && type.isSizedArray() ? type.getCumulativeArraySize() : 1; TResourceType resource = getResourceType(type); if (resource < EResCount) { if (type.getQualifier().hasBinding()) { return ent.newBinding = reserveSlot( set, getBaseBinding(stage, resource, set) + type.getQualifier().layoutBinding, numBindings); } else if (ent.live && doAutoBindingMapping()) { // find free slot, the caller did make sure it passes all vars with binding // first and now all are passed that do not have a binding and needs one return ent.newBinding = getFreeSlot(set, getBaseBinding(stage, resource, set), numBindings); } } return ent.newBinding = -1; } }; #ifdef ENABLE_HLSL /******************************************************************************** The following IO resolver maps types in HLSL register space, as follows: t - for shader resource views (SRV) TEXTURE1D TEXTURE1DARRAY TEXTURE2D TEXTURE2DARRAY TEXTURE3D TEXTURECUBE TEXTURECUBEARRAY TEXTURE2DMS TEXTURE2DMSARRAY STRUCTUREDBUFFER BYTEADDRESSBUFFER BUFFER TBUFFER s - for samplers SAMPLER SAMPLER1D SAMPLER2D SAMPLER3D SAMPLERCUBE SAMPLERSTATE SAMPLERCOMPARISONSTATE u - for unordered access views (UAV) RWBYTEADDRESSBUFFER RWSTRUCTUREDBUFFER APPENDSTRUCTUREDBUFFER CONSUMESTRUCTUREDBUFFER RWBUFFER RWTEXTURE1D RWTEXTURE1DARRAY RWTEXTURE2D RWTEXTURE2DARRAY RWTEXTURE3D b - for constant buffer views (CBV) CBUFFER CONSTANTBUFFER ********************************************************************************/ struct TDefaultHlslIoResolver : public TDefaultIoResolverBase { TDefaultHlslIoResolver(const TIntermediate& intermediate) : TDefaultIoResolverBase(intermediate) { } bool validateBinding(EShLanguage /*stage*/, TVarEntryInfo& /*ent*/) override { return true; } TResourceType getResourceType(const glslang::TType& type) override { if (isUavType(type)) { return EResUav; } if (isSrvType(type)) { return EResTexture; } if (isSamplerType(type)) { return EResSampler; } if (isUboType(type)) { return EResUbo; } return EResCount; } int resolveBinding(EShLanguage stage, TVarEntryInfo& ent) override { const TType& type = ent.symbol->getType(); const int set = getLayoutSet(type); TResourceType resource = getResourceType(type); if (resource < EResCount) { if (type.getQualifier().hasBinding()) { return ent.newBinding = reserveSlot(set, getBaseBinding(stage, resource, set) + type.getQualifier().layoutBinding); } else if (ent.live && doAutoBindingMapping()) { // find free slot, the caller did make sure it passes all vars with binding // first and now all are passed that do not have a binding and needs one return ent.newBinding = getFreeSlot(set, getBaseBinding(stage, resource, set)); } } return ent.newBinding = -1; } }; #endif // Map I/O variables to provided offsets, and make bindings for // unbound but live variables. // // Returns false if the input is too malformed to do this. bool TIoMapper::addStage(EShLanguage stage, TIntermediate& intermediate, TInfoSink& infoSink, TIoMapResolver* resolver) { bool somethingToDo = ! intermediate.getResourceSetBinding().empty() || intermediate.getAutoMapBindings() || intermediate.getAutoMapLocations(); // Restrict the stricter condition to further check 'somethingToDo' only if 'somethingToDo' has not been set, reduce // unnecessary or insignificant for-loop operation after 'somethingToDo' have been true. for (int res = 0; (res < EResCount && !somethingToDo); ++res) { somethingToDo = somethingToDo || (intermediate.getShiftBinding(TResourceType(res)) != 0) || intermediate.hasShiftBindingForSet(TResourceType(res)); } if (! somethingToDo && resolver == nullptr) return true; if (intermediate.getNumEntryPoints() != 1 || intermediate.isRecursive()) return false; TIntermNode* root = intermediate.getTreeRoot(); if (root == nullptr) return false; // if no resolver is provided, use the default resolver with the given shifts and auto map settings TDefaultIoResolver defaultResolver(intermediate); #ifdef ENABLE_HLSL TDefaultHlslIoResolver defaultHlslResolver(intermediate); if (resolver == nullptr) { // TODO: use a passed in IO mapper for this if (intermediate.usingHlslIoMapping()) resolver = &defaultHlslResolver; else resolver = &defaultResolver; } #else resolver = &defaultResolver; #endif resolver->addStage(stage, intermediate); TVarLiveMap inVarMap, outVarMap, uniformVarMap; TVarLiveVector inVector, outVector, uniformVector; TVarGatherTraverser iter_binding_all(intermediate, true, inVarMap, outVarMap, uniformVarMap); TVarGatherTraverser iter_binding_live(intermediate, false, inVarMap, outVarMap, uniformVarMap); root->traverse(&iter_binding_all); iter_binding_live.pushFunction(intermediate.getEntryPointMangledName().c_str()); while (! iter_binding_live.destinations.empty()) { TIntermNode* destination = iter_binding_live.destinations.back(); iter_binding_live.destinations.pop_back(); destination->traverse(&iter_binding_live); } // sort entries by priority. see TVarEntryInfo::TOrderByPriority for info. for (auto& var : inVarMap) { inVector.push_back(var); } std::sort(inVector.begin(), inVector.end(), [](const TVarLivePair& p1, const TVarLivePair& p2) -> bool { return TVarEntryInfo::TOrderByPriority()(p1.second, p2.second); }); for (auto& var : outVarMap) { outVector.push_back(var); } std::sort(outVector.begin(), outVector.end(), [](const TVarLivePair& p1, const TVarLivePair& p2) -> bool { return TVarEntryInfo::TOrderByPriority()(p1.second, p2.second); }); for (auto& var : uniformVarMap) { uniformVector.push_back(var); } std::sort(uniformVector.begin(), uniformVector.end(), [](const TVarLivePair& p1, const TVarLivePair& p2) -> bool { return TVarEntryInfo::TOrderByPriority()(p1.second, p2.second); }); bool hadError = false; TVarLiveMap* dummyUniformVarMap[EShLangCount] = {}; TNotifyInOutAdaptor inOutNotify(stage, *resolver); TNotifyUniformAdaptor uniformNotify(stage, *resolver); TResolverUniformAdaptor uniformResolve(stage, *resolver, dummyUniformVarMap, infoSink, hadError); TResolverInOutAdaptor inOutResolve(stage, *resolver, infoSink, hadError); resolver->beginNotifications(stage); std::for_each(inVector.begin(), inVector.end(), inOutNotify); std::for_each(outVector.begin(), outVector.end(), inOutNotify); std::for_each(uniformVector.begin(), uniformVector.end(), uniformNotify); resolver->endNotifications(stage); resolver->beginResolve(stage); for (auto& var : inVector) { inOutResolve(var); } std::for_each(inVector.begin(), inVector.end(), [&inVarMap](TVarLivePair p) { auto at = inVarMap.find(p.second.symbol->getAccessName()); if (at != inVarMap.end() && p.second.id == at->second.id) at->second = p.second; }); for (auto& var : outVector) { inOutResolve(var); } std::for_each(outVector.begin(), outVector.end(), [&outVarMap](TVarLivePair p) { auto at = outVarMap.find(p.second.symbol->getAccessName()); if (at != outVarMap.end() && p.second.id == at->second.id) at->second = p.second; }); std::for_each(uniformVector.begin(), uniformVector.end(), uniformResolve); std::for_each(uniformVector.begin(), uniformVector.end(), [&uniformVarMap](TVarLivePair p) { auto at = uniformVarMap.find(p.second.symbol->getAccessName()); if (at != uniformVarMap.end() && p.second.id == at->second.id) at->second = p.second; }); resolver->endResolve(stage); if (!hadError) { TVarSetTraverser iter_iomap(intermediate, inVarMap, outVarMap, uniformVarMap); root->traverse(&iter_iomap); } return !hadError; } TGlslIoMapper::TGlslIoMapper() { memset(inVarMaps, 0, sizeof(TVarLiveMap*) * EShLangCount); memset(outVarMaps, 0, sizeof(TVarLiveMap*) * EShLangCount); memset(uniformVarMap, 0, sizeof(TVarLiveMap*) * EShLangCount); memset(intermediates, 0, sizeof(TIntermediate*) * EShLangCount); profile = ENoProfile; version = 0; autoPushConstantMaxSize = 128; autoPushConstantBlockPacking = ElpStd430; } TGlslIoMapper::~TGlslIoMapper() { for (size_t stage = 0; stage < EShLangCount; stage++) { if (inVarMaps[stage] != nullptr) { delete inVarMaps[stage]; inVarMaps[stage] = nullptr; } if (outVarMaps[stage] != nullptr) { delete outVarMaps[stage]; outVarMaps[stage] = nullptr; } if (uniformVarMap[stage] != nullptr) { delete uniformVarMap[stage]; uniformVarMap[stage] = nullptr; } if (intermediates[stage] != nullptr) intermediates[stage] = nullptr; } } // Map I/O variables to provided offsets, and make bindings for // unbound but live variables. // // Returns false if the input is too malformed to do this. bool TGlslIoMapper::addStage(EShLanguage stage, TIntermediate& intermediate, TInfoSink& infoSink, TIoMapResolver* resolver) { bool somethingToDo = !intermediate.getResourceSetBinding().empty() || intermediate.getAutoMapBindings() || intermediate.getAutoMapLocations(); // Profile and version are use for symbol validate. profile = intermediate.getProfile(); version = intermediate.getVersion(); // Restrict the stricter condition to further check 'somethingToDo' only if 'somethingToDo' has not been set, reduce // unnecessary or insignificant for-loop operation after 'somethingToDo' have been true. for (int res = 0; (res < EResCount && !somethingToDo); ++res) { somethingToDo = somethingToDo || (intermediate.getShiftBinding(TResourceType(res)) != 0) || intermediate.hasShiftBindingForSet(TResourceType(res)); } if (! somethingToDo && resolver == nullptr) { return true; } if (intermediate.getNumEntryPoints() != 1 || intermediate.isRecursive()) { return false; } TIntermNode* root = intermediate.getTreeRoot(); if (root == nullptr) { return false; } // if no resolver is provided, use the default resolver with the given shifts and auto map settings TDefaultGlslIoResolver defaultResolver(intermediate); #ifdef ENABLE_HLSL TDefaultHlslIoResolver defaultHlslResolver(intermediate); if (resolver == nullptr) { // TODO: use a passed in IO mapper for this if (intermediate.usingHlslIoMapping()) resolver = &defaultHlslResolver; else resolver = &defaultResolver; } #else if (resolver == nullptr) { resolver = &defaultResolver; } #endif resolver->addStage(stage, intermediate); inVarMaps[stage] = new TVarLiveMap(); outVarMaps[stage] = new TVarLiveMap(); uniformVarMap[stage] = new TVarLiveMap(); TVarGatherTraverser iter_binding_all(intermediate, true, *inVarMaps[stage], *outVarMaps[stage], *uniformVarMap[stage]); TVarGatherTraverser iter_binding_live(intermediate, false, *inVarMaps[stage], *outVarMaps[stage], *uniformVarMap[stage]); root->traverse(&iter_binding_all); iter_binding_live.pushFunction(intermediate.getEntryPointMangledName().c_str()); while (! iter_binding_live.destinations.empty()) { TIntermNode* destination = iter_binding_live.destinations.back(); iter_binding_live.destinations.pop_back(); destination->traverse(&iter_binding_live); } TNotifyInOutAdaptor inOutNotify(stage, *resolver); TNotifyUniformAdaptor uniformNotify(stage, *resolver); // Resolve current stage input symbol location with previous stage output here, // uniform symbol, ubo, ssbo and opaque symbols are per-program resource, // will resolve uniform symbol location and ubo/ssbo/opaque binding in doMap() resolver->beginNotifications(stage); std::for_each(inVarMaps[stage]->begin(), inVarMaps[stage]->end(), inOutNotify); std::for_each(outVarMaps[stage]->begin(), outVarMaps[stage]->end(), inOutNotify); std::for_each(uniformVarMap[stage]->begin(), uniformVarMap[stage]->end(), uniformNotify); resolver->endNotifications(stage); TSlotCollector slotCollector(*resolver, infoSink); resolver->beginCollect(stage); std::for_each(inVarMaps[stage]->begin(), inVarMaps[stage]->end(), slotCollector); std::for_each(outVarMaps[stage]->begin(), outVarMaps[stage]->end(), slotCollector); std::for_each(uniformVarMap[stage]->begin(), uniformVarMap[stage]->end(), slotCollector); resolver->endCollect(stage); intermediates[stage] = &intermediate; return !hadError; } bool TGlslIoMapper::doMap(TIoMapResolver* resolver, TInfoSink& infoSink) { resolver->endResolve(EShLangCount); if (!hadError) { //Resolve uniform location, ubo/ssbo/opaque bindings across stages TResolverUniformAdaptor uniformResolve(EShLangCount, *resolver, uniformVarMap, infoSink, hadError); TResolverInOutAdaptor inOutResolve(EShLangCount, *resolver, infoSink, hadError); TSymbolValidater symbolValidater(*resolver, infoSink, inVarMaps, outVarMaps, uniformVarMap, hadError, profile, version); TVarLiveVector inVectors[EShLangCount]; TVarLiveVector outVectors[EShLangCount]; TVarLiveVector uniformVector; resolver->beginResolve(EShLangCount); for (int stage = EShLangVertex; stage < EShLangCount; stage++) { if (inVarMaps[stage] != nullptr) { inOutResolve.setStage(EShLanguage(stage)); // copy vars into a sorted list std::for_each(inVarMaps[stage]->begin(), inVarMaps[stage]->end(), [&inVectors, stage](TVarLivePair p) { inVectors[stage].push_back(p); }); std::sort(inVectors[stage].begin(), inVectors[stage].end(), [](const TVarLivePair& p1, const TVarLivePair& p2) -> bool { return TVarEntryInfo::TOrderByPriority()(p1.second, p2.second); }); std::for_each(outVarMaps[stage]->begin(), outVarMaps[stage]->end(), [&outVectors, stage](TVarLivePair p) { outVectors[stage].push_back(p); }); std::sort(outVectors[stage].begin(), outVectors[stage].end(), [](const TVarLivePair& p1, const TVarLivePair& p2) -> bool { return TVarEntryInfo::TOrderByPriority()(p1.second, p2.second); }); for (auto& var : inVectors[stage]) { symbolValidater(var); } for (auto& var : inVectors[stage]) { inOutResolve(var); } for (auto& var : outVectors[stage]) { symbolValidater(var); } for (auto& var : outVectors[stage]) { inOutResolve(var); } // copy results back into maps std::for_each(inVectors[stage].begin(), inVectors[stage].end(), [this, stage](TVarLivePair p) { auto at = inVarMaps[stage]->find(p.first); if (at != inVarMaps[stage]->end()) at->second = p.second; }); std::for_each(outVectors[stage].begin(), outVectors[stage].end(), [this, stage](TVarLivePair p) { auto at = outVarMaps[stage]->find(p.first); if (at != outVarMaps[stage]->end()) at->second = p.second; }); } if (uniformVarMap[stage] != nullptr) { uniformResolve.setStage(EShLanguage(stage)); for (auto& var : *(uniformVarMap[stage])) { uniformVector.push_back(var); } } } std::sort(uniformVector.begin(), uniformVector.end(), [](const TVarLivePair& p1, const TVarLivePair& p2) -> bool { return TVarEntryInfo::TOrderByPriorityAndLive()(p1.second, p2.second); }); for (auto& var : uniformVector) { symbolValidater(var); } for (auto& var : uniformVector) { uniformResolve(var); } std::sort(uniformVector.begin(), uniformVector.end(), [](const TVarLivePair& p1, const TVarLivePair& p2) -> bool { return TVarEntryInfo::TOrderByPriority()(p1.second, p2.second); }); resolver->endResolve(EShLangCount); if (autoPushConstantBlockName.length()) { bool upgraded = false; for (size_t stage = 0; stage < EShLangCount; stage++) { if (intermediates[stage] != nullptr) { TVarLiveMap** pUniformVarMap = uniformResolve.uniformVarMap; auto at = pUniformVarMap[stage]->find(autoPushConstantBlockName); if (at == pUniformVarMap[stage]->end()) continue; TQualifier& qualifier = at->second.symbol->getQualifier(); if (!qualifier.isUniform()) continue; TType& t = at->second.symbol->getWritableType(); int size, stride; TIntermediate::getBaseAlignment(t, size, stride, autoPushConstantBlockPacking, qualifier.layoutMatrix == ElmRowMajor); if (size <= int(autoPushConstantMaxSize)) { qualifier.setBlockStorage(EbsPushConstant); qualifier.layoutPacking = autoPushConstantBlockPacking; // Push constants don't have set/binding etc. decorations, remove those. qualifier.layoutSet = TQualifier::layoutSetEnd; at->second.clearNewAssignments(); upgraded = true; } } } // If it's been upgraded to push_constant, then set the flag so when its traversed // in the next for loop, all references to this symbol will get their flag changed. // so it doesn't get a set/binding assigned to it. if (upgraded) { std::for_each(uniformVector.begin(), uniformVector.end(), [this](TVarLivePair& p) { if (p.first == autoPushConstantBlockName) { p.second.upgradedToPushConstantPacking = autoPushConstantBlockPacking; p.second.newSet = TQualifier::layoutSetEnd; } }); } } for (size_t stage = 0; stage < EShLangCount; stage++) { if (intermediates[stage] != nullptr) { // traverse each stage, set new location to each input/output and unifom symbol, set new binding to // ubo, ssbo and opaque symbols. Assign push_constant upgrades as well. TVarLiveMap** pUniformVarMap = uniformResolve.uniformVarMap; std::for_each(uniformVector.begin(), uniformVector.end(), [pUniformVarMap, stage](TVarLivePair p) { auto at = pUniformVarMap[stage]->find(p.second.symbol->getAccessName()); if (at != pUniformVarMap[stage]->end() && at->second.id == p.second.id){ if (p.second.upgradedToPushConstantPacking != ElpNone) { at->second.upgradedToPushConstantPacking = p.second.upgradedToPushConstantPacking; } else { int resolvedBinding = at->second.newBinding; at->second = p.second; if (resolvedBinding > 0) at->second.newBinding = resolvedBinding; } } }); TVarSetTraverser iter_iomap(*intermediates[stage], *inVarMaps[stage], *outVarMaps[stage], *uniformResolve.uniformVarMap[stage]); intermediates[stage]->getTreeRoot()->traverse(&iter_iomap); } } return !hadError; } else { return false; } } } // end namespace glslang ================================================ FILE: src/libraries/glslang/glslang/MachineIndependent/iomapper.h ================================================ // // Copyright (C) 2016 LunarG, Inc. // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following // disclaimer in the documentation and/or other materials provided // with the distribution. // // Neither the name of 3Dlabs Inc. Ltd. nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // #ifndef _IOMAPPER_INCLUDED #define _IOMAPPER_INCLUDED #include #include #include // // A reflection database and its interface, consistent with the OpenGL API reflection queries. // class TInfoSink; namespace glslang { class TIntermediate; struct TVarEntryInfo; // Base class for shared TIoMapResolver services, used by several derivations. struct TDefaultIoResolverBase : public glslang::TIoMapResolver { public: TDefaultIoResolverBase(const TIntermediate& intermediate); typedef std::vector TSlotSet; typedef std::unordered_map TSlotSetMap; // grow the reflection stage by stage void notifyBinding(EShLanguage, TVarEntryInfo& /*ent*/) override {} void notifyInOut(EShLanguage, TVarEntryInfo& /*ent*/) override {} void beginNotifications(EShLanguage) override {} void endNotifications(EShLanguage) override {} void beginResolve(EShLanguage) override {} void endResolve(EShLanguage) override {} void beginCollect(EShLanguage) override {} void endCollect(EShLanguage) override {} void reserverResourceSlot(TVarEntryInfo& /*ent*/, TInfoSink& /*infoSink*/) override {} void reserverStorageSlot(TVarEntryInfo& /*ent*/, TInfoSink& /*infoSink*/) override {} int getBaseBinding(EShLanguage stage, TResourceType res, unsigned int set) const; const std::vector& getResourceSetBinding(EShLanguage stage) const; virtual TResourceType getResourceType(const glslang::TType& type) = 0; bool doAutoBindingMapping() const; bool doAutoLocationMapping() const; TSlotSet::iterator findSlot(int set, int slot); bool checkEmpty(int set, int slot); bool validateInOut(EShLanguage /*stage*/, TVarEntryInfo& /*ent*/) override { return true; } int reserveSlot(int set, int slot, int size = 1); int getFreeSlot(int set, int base, int size = 1); int resolveSet(EShLanguage /*stage*/, TVarEntryInfo& ent) override; int resolveUniformLocation(EShLanguage /*stage*/, TVarEntryInfo& ent) override; int resolveInOutLocation(EShLanguage stage, TVarEntryInfo& ent) override; int resolveInOutComponent(EShLanguage /*stage*/, TVarEntryInfo& ent) override; int resolveInOutIndex(EShLanguage /*stage*/, TVarEntryInfo& ent) override; void addStage(EShLanguage stage, TIntermediate& stageIntermediate) override { if (stage < EShLangCount) { stageMask[stage] = true; stageIntermediates[stage] = &stageIntermediate; } } uint32_t computeTypeLocationSize(const TType& type, EShLanguage stage); TSlotSetMap slots; bool hasError = false; protected: TDefaultIoResolverBase(TDefaultIoResolverBase&); TDefaultIoResolverBase& operator=(TDefaultIoResolverBase&); const TIntermediate& referenceIntermediate; int nextUniformLocation; int nextInputLocation; int nextOutputLocation; bool stageMask[EShLangCount + 1]; const TIntermediate* stageIntermediates[EShLangCount]; // Return descriptor set specific base if there is one, and the generic base otherwise. int selectBaseBinding(int base, int descriptorSetBase) const { return descriptorSetBase != -1 ? descriptorSetBase : base; } static int getLayoutSet(const glslang::TType& type) { if (type.getQualifier().hasSet()) return type.getQualifier().layoutSet; else return 0; } static bool isSamplerType(const glslang::TType& type) { return type.getBasicType() == glslang::EbtSampler && type.getSampler().isPureSampler(); } static bool isTextureType(const glslang::TType& type) { return (type.getBasicType() == glslang::EbtSampler && (type.getSampler().isTexture() || type.getSampler().isSubpass())); } static bool isUboType(const glslang::TType& type) { return type.getQualifier().storage == EvqUniform; } static bool isImageType(const glslang::TType& type) { return type.getBasicType() == glslang::EbtSampler && type.getSampler().isImage(); } static bool isSsboType(const glslang::TType& type) { return type.getQualifier().storage == EvqBuffer; } // Return true if this is a SRV (shader resource view) type: static bool isSrvType(const glslang::TType& type) { return isTextureType(type) || type.getQualifier().storage == EvqBuffer; } // Return true if this is a UAV (unordered access view) type: static bool isUavType(const glslang::TType& type) { if (type.getQualifier().isReadOnly()) return false; return (type.getBasicType() == glslang::EbtSampler && type.getSampler().isImage()) || (type.getQualifier().storage == EvqBuffer); } }; // Default I/O resolver for OpenGL struct TDefaultGlslIoResolver : public TDefaultIoResolverBase { public: typedef std::map TVarSlotMap; // typedef std::map TSlotMap; // TDefaultGlslIoResolver(const TIntermediate& intermediate); bool validateBinding(EShLanguage /*stage*/, TVarEntryInfo& /*ent*/) override { return true; } TResourceType getResourceType(const glslang::TType& type) override; int resolveInOutLocation(EShLanguage stage, TVarEntryInfo& ent) override; int resolveUniformLocation(EShLanguage /*stage*/, TVarEntryInfo& ent) override; int resolveBinding(EShLanguage /*stage*/, TVarEntryInfo& ent) override; void beginResolve(EShLanguage /*stage*/) override; void endResolve(EShLanguage stage) override; void beginCollect(EShLanguage) override; void endCollect(EShLanguage) override; void reserverStorageSlot(TVarEntryInfo& ent, TInfoSink& infoSink) override; void reserverResourceSlot(TVarEntryInfo& ent, TInfoSink& infoSink) override; // in/out symbol and uniform symbol are stored in the same resourceSlotMap, the storage key is used to identify each type of symbol. // We use stage and storage qualifier to construct a storage key. it can help us identify the same storage resource used in different stage. // if a resource is a program resource and we don't need know it usage stage, we can use same stage to build storage key. // Note: both stage and type must less then 0xffff. int buildStorageKey(EShLanguage stage, TStorageQualifier type) { assert(static_cast(stage) <= 0x0000ffff && static_cast(type) <= 0x0000ffff); return (stage << 16) | type; } protected: // Use for mark pre stage, to get more interface symbol information. EShLanguage preStage; // Use for mark current shader stage for resolver EShLanguage currentStage; // Slot map for storage resource(location of uniform and interface symbol) It's a program share slot TSlotMap resourceSlotMap; // Slot map for other resource(image, ubo, ssbo), It's a program share slot. TSlotMap storageSlotMap; }; typedef std::map TVarLiveMap; // I/O mapper for GLSL class TGlslIoMapper : public TIoMapper { public: TGlslIoMapper(); virtual ~TGlslIoMapper(); // If set, the uniform block with the given name will be changed to be backed by // push_constant if it's size is <= maxSize bool setAutoPushConstantBlock(const char* name, unsigned int maxSize, TLayoutPacking packing) override { autoPushConstantBlockName = name; autoPushConstantMaxSize = maxSize; autoPushConstantBlockPacking = packing; return true; } // grow the reflection stage by stage bool addStage(EShLanguage, TIntermediate&, TInfoSink&, TIoMapResolver*) override; bool doMap(TIoMapResolver*, TInfoSink&) override; TIntermediate* intermediates[EShLangCount]; bool hadError = false; EProfile profile; int version; private: TString autoPushConstantBlockName; unsigned int autoPushConstantMaxSize; TLayoutPacking autoPushConstantBlockPacking; TVarLiveMap *inVarMaps[EShLangCount], *outVarMaps[EShLangCount], *uniformVarMap[EShLangCount]; }; } // end namespace glslang #endif // _IOMAPPER_INCLUDED ================================================ FILE: src/libraries/glslang/glslang/MachineIndependent/limits.cpp ================================================ // // Copyright (C) 2013 LunarG, Inc. // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following // disclaimer in the documentation and/or other materials provided // with the distribution. // // Neither the name of 3Dlabs Inc. Ltd. nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // // // Do sub tree walks for // 1) inductive loop bodies to see if the inductive variable is modified // 2) array-index expressions to see if they are "constant-index-expression" // // These are per Appendix A of ES 2.0: // // "Within the body of the loop, the loop index is not statically assigned to nor is it used as the // argument to a function out or inout parameter." // // "The following are constant-index-expressions: // - Constant expressions // - Loop indices as defined in section 4 // - Expressions composed of both of the above" // // N.B.: assuming the last rule excludes function calls // #include "ParseHelper.h" namespace glslang { // // The inductive loop-body traverser. // // Just look at things that might modify the loop index. // class TInductiveTraverser : public TIntermTraverser { public: TInductiveTraverser(long long id, TSymbolTable& st) : loopId(id), symbolTable(st), bad(false) { } virtual bool visitBinary(TVisit, TIntermBinary* node); virtual bool visitUnary(TVisit, TIntermUnary* node); virtual bool visitAggregate(TVisit, TIntermAggregate* node); long long loopId; // unique ID of the symbol that's the loop inductive variable TSymbolTable& symbolTable; bool bad; TSourceLoc badLoc; protected: TInductiveTraverser(TInductiveTraverser&); TInductiveTraverser& operator=(TInductiveTraverser&); }; // check binary operations for those modifying the loop index bool TInductiveTraverser::visitBinary(TVisit /* visit */, TIntermBinary* node) { if (node->modifiesState() && node->getLeft()->getAsSymbolNode() && node->getLeft()->getAsSymbolNode()->getId() == loopId) { bad = true; badLoc = node->getLoc(); } return true; } // check unary operations for those modifying the loop index bool TInductiveTraverser::visitUnary(TVisit /* visit */, TIntermUnary* node) { if (node->modifiesState() && node->getOperand()->getAsSymbolNode() && node->getOperand()->getAsSymbolNode()->getId() == loopId) { bad = true; badLoc = node->getLoc(); } return true; } // check function calls for arguments modifying the loop index bool TInductiveTraverser::visitAggregate(TVisit /* visit */, TIntermAggregate* node) { if (node->getOp() == EOpFunctionCall) { // see if an out or inout argument is the loop index const TIntermSequence& args = node->getSequence(); for (int i = 0; i < (int)args.size(); ++i) { if (args[i]->getAsSymbolNode() && args[i]->getAsSymbolNode()->getId() == loopId) { TSymbol* function = symbolTable.find(node->getName()); const TType* type = (*function->getAsFunction())[i].type; if (type->getQualifier().storage == EvqOut || type->getQualifier().storage == EvqInOut) { bad = true; badLoc = node->getLoc(); } } } } return true; } // // External function to call for loop check. // void TParseContext::inductiveLoopBodyCheck(TIntermNode* body, long long loopId, TSymbolTable& symbolTable) { TInductiveTraverser it(loopId, symbolTable); if (body == nullptr) return; body->traverse(&it); if (it.bad) error(it.badLoc, "inductive loop index modified", "limitations", ""); } // // The "constant-index-expression" tranverser. // // Just look at things that can form an index. // class TIndexTraverser : public TIntermTraverser { public: TIndexTraverser(const TIdSetType& ids) : inductiveLoopIds(ids), bad(false) { } virtual void visitSymbol(TIntermSymbol* symbol); virtual bool visitAggregate(TVisit, TIntermAggregate* node); const TIdSetType& inductiveLoopIds; bool bad; TSourceLoc badLoc; protected: TIndexTraverser(TIndexTraverser&); TIndexTraverser& operator=(TIndexTraverser&); }; // make sure symbols are inductive-loop indexes void TIndexTraverser::visitSymbol(TIntermSymbol* symbol) { if (inductiveLoopIds.find(symbol->getId()) == inductiveLoopIds.end()) { bad = true; badLoc = symbol->getLoc(); } } // check for function calls, assuming they are bad; spec. doesn't really say bool TIndexTraverser::visitAggregate(TVisit /* visit */, TIntermAggregate* node) { if (node->getOp() == EOpFunctionCall) { bad = true; badLoc = node->getLoc(); } return true; } // // External function to call for loop check. // void TParseContext::constantIndexExpressionCheck(TIntermNode* index) { TIndexTraverser it(inductiveLoopIds); index->traverse(&it); if (it.bad) error(it.badLoc, "Non-constant-index-expression", "limitations", ""); } } // end namespace glslang ================================================ FILE: src/libraries/glslang/glslang/MachineIndependent/linkValidate.cpp ================================================ // // Copyright (C) 2013 LunarG, Inc. // Copyright (C) 2017 ARM Limited. // Copyright (C) 2015-2018 Google, Inc. // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following // disclaimer in the documentation and/or other materials provided // with the distribution. // // Neither the name of 3Dlabs Inc. Ltd. nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // // // Do link-time merging and validation of intermediate representations. // // Basic model is that during compilation, each compilation unit (shader) is // compiled into one TIntermediate instance. Then, at link time, multiple // units for the same stage can be merged together, which can generate errors. // Then, after all merging, a single instance of TIntermediate represents // the whole stage. A final error check can be done on the resulting stage, // even if no merging was done (i.e., the stage was only one compilation unit). // #include "../../glslang/Public/ShaderLang.h" #include "localintermediate.h" #include "../Include/InfoSink.h" #include "SymbolTable.h" #include "LiveTraverser.h" namespace glslang { // // Link-time error emitter. // void TIntermediate::error(TInfoSink& infoSink, const TSourceLoc* loc, EShMessages messages, const char* message, EShLanguage unitStage) { infoSink.info.prefix(EPrefixError); if (loc) infoSink.info.location(*loc, messages & EShMsgAbsolutePath, messages & EShMsgDisplayErrorColumn); if (unitStage == EShLangCount) infoSink.info << "Linking " << StageName(language) << " stage: " << message << "\n"; else if (language == EShLangCount) infoSink.info << "Linking " << StageName(unitStage) << " stage: " << message << "\n"; else infoSink.info << "Linking " << StageName(language) << " and " << StageName(unitStage) << " stages: " << message << "\n"; ++numErrors; } // Link-time warning. void TIntermediate::warn(TInfoSink& infoSink, const TSourceLoc* loc, EShMessages messages, const char* message, EShLanguage unitStage) { infoSink.info.prefix(EPrefixWarning); if (loc) infoSink.info.location(*loc, messages & EShMsgAbsolutePath, messages & EShMsgDisplayErrorColumn); if (unitStage == EShLangCount) infoSink.info << "Linking " << StageName(language) << " stage: " << message << "\n"; else if (language == EShLangCount) infoSink.info << "Linking " << StageName(unitStage) << " stage: " << message << "\n"; else infoSink.info << "Linking " << StageName(language) << " and " << StageName(unitStage) << " stages: " << message << "\n"; } // TODO: 4.4 offset/align: "Two blocks linked together in the same program with the same block // name must have the exact same set of members qualified with offset and their integral-constant // expression values must be the same, or a link-time error results." // // Merge the information from 'unit' into 'this' // void TIntermediate::merge(TInfoSink& infoSink, TIntermediate& unit) { mergeCallGraphs(infoSink, unit); mergeModes(infoSink, unit); mergeTrees(infoSink, unit); } // // check that link objects between stages // void TIntermediate::mergeUniformObjects(TInfoSink& infoSink, TIntermediate& unit) { if (unit.treeRoot == nullptr || treeRoot == nullptr) return; // Get the linker-object lists TIntermSequence& linkerObjects = findLinkerObjects()->getSequence(); TIntermSequence unitLinkerObjects = unit.findLinkerObjects()->getSequence(); // filter unitLinkerObjects to only contain uniforms auto end = std::remove_if(unitLinkerObjects.begin(), unitLinkerObjects.end(), [](TIntermNode* node) {return node->getAsSymbolNode()->getQualifier().storage != EvqUniform && node->getAsSymbolNode()->getQualifier().storage != EvqBuffer; }); unitLinkerObjects.resize(end - unitLinkerObjects.begin()); // merge uniforms and do error checking bool mergeExistingOnly = false; mergeGlobalUniformBlocks(infoSink, unit, mergeExistingOnly); mergeLinkerObjects(infoSink, linkerObjects, unitLinkerObjects, unit.getStage()); } static inline bool isSameInterface(TIntermSymbol* symbol, TIntermSymbol* unitSymbol) { EShLanguage stage = symbol->getStage(); EShLanguage unitStage = unitSymbol->getStage(); return // 1) same stage and same shader interface (stage == unitStage && symbol->getType().getShaderInterface() == unitSymbol->getType().getShaderInterface()) || // 2) accross stages and both are uniform or buffer (symbol->getQualifier().storage == EvqUniform && unitSymbol->getQualifier().storage == EvqUniform) || (symbol->getQualifier().storage == EvqBuffer && unitSymbol->getQualifier().storage == EvqBuffer) || // 3) in/out matched across stage boundary (stage < unitStage && symbol->getQualifier().storage == EvqVaryingOut && unitSymbol->getQualifier().storage == EvqVaryingIn) || (unitStage < stage && symbol->getQualifier().storage == EvqVaryingIn && unitSymbol->getQualifier().storage == EvqVaryingOut); } static bool isSameSymbol(TIntermSymbol* symbol1, TIntermSymbol* symbol2) { // If they are both blocks in the same shader interface, // match by the block-name, not the identifier name. if (symbol1->getType().getBasicType() == EbtBlock && symbol2->getType().getBasicType() == EbtBlock) { if (isSameInterface(symbol1, symbol2)) { return symbol1->getType().getTypeName() == symbol2->getType().getTypeName(); } } else if (symbol1->getName() == symbol2->getName()) return true; return false; } // // merge implicit array sizes for uniform/buffer objects // void TIntermediate::mergeImplicitArraySizes(TInfoSink&, TIntermediate& unit) { if (unit.treeRoot == nullptr || treeRoot == nullptr) return; // Get the linker-object lists TIntermSequence& linkerObjects = findLinkerObjects()->getSequence(); TIntermSequence unitLinkerObjects = unit.findLinkerObjects()->getSequence(); // filter unitLinkerObjects to only contain uniforms auto end = std::remove_if(unitLinkerObjects.begin(), unitLinkerObjects.end(), [](TIntermNode* node) {return node->getAsSymbolNode()->getQualifier().storage != EvqUniform && node->getAsSymbolNode()->getQualifier().storage != EvqBuffer; }); unitLinkerObjects.resize(end - unitLinkerObjects.begin()); std::size_t initialNumLinkerObjects = linkerObjects.size(); for (unsigned int unitLinkObj = 0; unitLinkObj < unitLinkerObjects.size(); ++unitLinkObj) { for (std::size_t linkObj = 0; linkObj < initialNumLinkerObjects; ++linkObj) { TIntermSymbol* symbol = linkerObjects[linkObj]->getAsSymbolNode(); TIntermSymbol* unitSymbol = unitLinkerObjects[unitLinkObj]->getAsSymbolNode(); assert(symbol && unitSymbol); if (isSameSymbol(symbol, unitSymbol)) { // Update implicit array sizes mergeImplicitArraySizes(symbol->getWritableType(), unitSymbol->getType()); } } } } // // do error checking on the shader boundary in / out vars // void TIntermediate::checkStageIO(TInfoSink& infoSink, TIntermediate& unit, EShMessages messages) { if (unit.treeRoot == nullptr || treeRoot == nullptr) return; // Get copies of the linker-object lists TIntermSequence linkerObjects = findLinkerObjects()->getSequence(); TIntermSequence unitLinkerObjects = unit.findLinkerObjects()->getSequence(); // filter linkerObjects to only contain out variables auto end = std::remove_if(linkerObjects.begin(), linkerObjects.end(), [](TIntermNode* node) {return node->getAsSymbolNode()->getQualifier().storage != EvqVaryingOut; }); linkerObjects.resize(end - linkerObjects.begin()); // filter unitLinkerObjects to only contain in variables auto unitEnd = std::remove_if(unitLinkerObjects.begin(), unitLinkerObjects.end(), [](TIntermNode* node) {return node->getAsSymbolNode()->getQualifier().storage != EvqVaryingIn; }); unitLinkerObjects.resize(unitEnd - unitLinkerObjects.begin()); // do matching and error checking mergeLinkerObjects(infoSink, linkerObjects, unitLinkerObjects, unit.getStage()); if ((messages & EShMsgValidateCrossStageIO) == 0) return; // The OpenGL Shading Language, Version 4.60.8 (https://registry.khronos.org/OpenGL/specs/gl/GLSLangSpec.4.60.pdf) // 4.3.4 Input Variables // Only the input variables that are statically read need to be written by the previous stage; it is // allowed to have superfluous declarations of input variables. This is shown in the following table. // +------------------------------------------------------------------------------------------------+ // | Treatment of Mismatched Input | Consuming Shader (input variables) | // | Variables |---------------------------------------------------------| // | | No | Declared but no | Declared and Static Use | // | | Declaration | Static Use | | // |--------------------------------------+-------------+-----------------+-------------------------| // | Generating Shader | No Declaration | Allowed | Allowed | Link-Time Error | // | (output variables) |-----------------+-------------+-----------------+-------------------------| // | | Declared but no | Allowed | Allowed | Allowed (values are | // | | Static Use | | | undefined) | // | |-----------------+-------------+-----------------+-------------------------| // | | Declared and | Allowed | Allowed | Allowed (values are | // | | Static Use | | | potentially undefined) | // +------------------------------------------------------------------------------------------------+ // Consumption errors are based on static use only. Compilation may generate a warning, but not an // error, for any dynamic use the compiler can deduce that might cause consumption of undefined values. // TODO: implement support for geometry passthrough if (getGeoPassthroughEXT()) { unit.warn(infoSink, "GL_NV_geometry_shader_passthrough is enabled, skipping cross-stage IO validation", getStage()); return; } class TIOTraverser : public TLiveTraverser { public: TIOTraverser(TIntermediate& i, bool all, TIntermSequence& sequence, TStorageQualifier storage) : TLiveTraverser(i, all, true, false, false), sequence(sequence), storage(storage) { } virtual void visitSymbol(TIntermSymbol* symbol) { if (symbol->getQualifier().storage == storage) sequence.push_back(symbol); } private: TIntermSequence& sequence; TStorageQualifier storage; }; // live symbols only TIntermSequence unitLiveInputs; TIOTraverser unitTraverser(unit, false, unitLiveInputs, EvqVaryingIn); unitTraverser.pushFunction(unit.getEntryPointMangledName().c_str()); while (! unitTraverser.destinations.empty()) { TIntermNode* destination = unitTraverser.destinations.back(); unitTraverser.destinations.pop_back(); destination->traverse(&unitTraverser); } // all symbols TIntermSequence allOutputs; TIOTraverser traverser(*this, true, allOutputs, EvqVaryingOut); getTreeRoot()->traverse(&traverser); std::unordered_set outputLocations; for (auto& output : allOutputs) { if (output->getAsSymbolNode()->getBasicType() == EbtBlock) { int lastLocation = -1; if (output->getAsSymbolNode()->getQualifier().hasLocation()) lastLocation = output->getAsSymbolNode()->getQualifier().layoutLocation; const TTypeList* members = output->getAsSymbolNode()->getType().getStruct(); for (auto& member : *members) { int location = lastLocation; if (member.type->getQualifier().hasLocation()) location = member.type->getQualifier().layoutLocation; if (location != -1) { int locationSize = TIntermediate::computeTypeLocationSize(*member.type, getStage()); for (int i = 0; i < locationSize; ++i) outputLocations.insert(location + i); lastLocation = location + locationSize; } } } else { int locationSize = TIntermediate::computeTypeLocationSize(output->getAsSymbolNode()->getType(), getStage()); for (int i = 0; i < locationSize; ++i) outputLocations.insert(output->getAsSymbolNode()->getQualifier().layoutLocation + i); } } // remove unitStage inputs with matching outputs in the current stage auto liveEnd = std::remove_if( unitLiveInputs.begin(), unitLiveInputs.end(), [this, &allOutputs, &outputLocations](TIntermNode* input) { // ignore built-ins if (input->getAsSymbolNode()->getAccessName().compare(0, 3, "gl_") == 0) return true; // try to match by location if (input->getAsSymbolNode()->getQualifier().hasLocation() && outputLocations.find(input->getAsSymbolNode()->getQualifier().layoutLocation) != outputLocations.end()) return true; if (input->getAsSymbolNode()->getBasicType() == EbtBlock) { int lastLocation = -1; if (input->getAsSymbolNode()->getQualifier().hasLocation()) lastLocation = input->getAsSymbolNode()->getQualifier().layoutLocation; const TTypeList* members = input->getAsSymbolNode()->getType().getStruct(); for (auto& member : *members) { int location = lastLocation; if (member.type->getQualifier().hasLocation()) location = member.type->getQualifier().layoutLocation; if (location != -1) { int locationSize = TIntermediate::computeTypeLocationSize(*member.type, getStage()); for (int i = 0; i < locationSize; ++i) if (outputLocations.find(location + i) != outputLocations.end()) return true; lastLocation = location + locationSize; } } } // otherwise, try to match by name return std::any_of(allOutputs.begin(), allOutputs.end(), [input](TIntermNode* output) { return output->getAsSymbolNode()->getAccessName() == input->getAsSymbolNode()->getAccessName(); }); }); unitLiveInputs.resize(liveEnd - unitLiveInputs.begin()); // check remaining loose unitStage inputs for a matching output block member liveEnd = std::remove_if(unitLiveInputs.begin(), unitLiveInputs.end(), [&allOutputs](TIntermNode* input) { return std::any_of(allOutputs.begin(), allOutputs.end(), [input](TIntermNode* output) { if (output->getAsSymbolNode()->getBasicType() != EbtBlock) return false; const TTypeList* members = output->getAsSymbolNode()->getType().getStruct(); return std::any_of(members->begin(), members->end(), [input](TTypeLoc type) { return type.type->getFieldName() == input->getAsSymbolNode()->getName(); }); }); }); unitLiveInputs.resize(liveEnd - unitLiveInputs.begin()); // finally, check remaining unitStage block inputs for a matching loose output liveEnd = std::remove_if( unitLiveInputs.begin(), unitLiveInputs.end(), [&allOutputs](TIntermNode* input) { if (input->getAsSymbolNode()->getBasicType() != EbtBlock) return false; // liveness isn't tracked per member so finding any one live member is the best we can do const TTypeList* members = input->getAsSymbolNode()->getType().getStruct(); return std::any_of(members->begin(), members->end(), [allOutputs](TTypeLoc type) { return std::any_of(allOutputs.begin(), allOutputs.end(), [&type](TIntermNode* output) { return type.type->getFieldName() == output->getAsSymbolNode()->getName(); }); }); }); unitLiveInputs.resize(liveEnd - unitLiveInputs.begin()); // any remaining unitStage inputs have no matching output std::for_each(unitLiveInputs.begin(), unitLiveInputs.end(), [&](TIntermNode* input) { unit.error(infoSink, &input->getLoc(), messages, "Preceding stage has no matching declaration for statically used input:", getStage()); infoSink.info << " " << input->getAsSymbolNode()->getType().getCompleteString( true, true, false, true, input->getAsSymbolNode()->getAccessName()) << "\n"; }); // TODO: warn about statically read inputs with outputs declared but not written to } void TIntermediate::optimizeStageIO(TInfoSink&, TIntermediate& unit) { // don't do any input/output demotion on compute, raytracing, or task/mesh stages // TODO: support task/mesh if (getStage() > EShLangFragment || unit.getStage() > EShLangFragment) { return; } class TIOTraverser : public TLiveTraverser { public: TIOTraverser(TIntermediate& i, bool all, TIntermSequence& sequence, TStorageQualifier storage) : TLiveTraverser(i, all, true, false, false), sequence(sequence), storage(storage) { } virtual void visitSymbol(TIntermSymbol* symbol) { if (symbol->getQualifier().storage == storage) { sequence.push_back(symbol); } } private: TIntermSequence& sequence; TStorageQualifier storage; }; // live symbols only TIntermSequence unitLiveInputs; TIOTraverser unitTraverser(unit, false, unitLiveInputs, EvqVaryingIn); unitTraverser.pushFunction(unit.getEntryPointMangledName().c_str()); while (! unitTraverser.destinations.empty()) { TIntermNode* destination = unitTraverser.destinations.back(); unitTraverser.destinations.pop_back(); destination->traverse(&unitTraverser); } TIntermSequence allOutputs; TIntermSequence unitAllInputs; TIOTraverser allTraverser(*this, true, allOutputs, EvqVaryingOut); getTreeRoot()->traverse(&allTraverser); TIOTraverser unitAllTraverser(unit, true, unitAllInputs, EvqVaryingIn); unit.getTreeRoot()->traverse(&unitAllTraverser); // find outputs not consumed by the next stage std::for_each(allOutputs.begin(), allOutputs.end(), [&unitLiveInputs, &unitAllInputs](TIntermNode* output) { // don't do anything to builtins if (output->getAsSymbolNode()->getAccessName().compare(0, 3, "gl_") == 0) return; // don't demote block outputs (for now) if (output->getAsSymbolNode()->getBasicType() == EbtBlock) return; // check if the (loose) output has a matching loose input auto isMatchingInput = [output](TIntermNode* input) { return output->getAsSymbolNode()->getAccessName() == input->getAsSymbolNode()->getAccessName(); }; // check if the (loose) output has a matching block member input auto isMatchingInputBlockMember = [output](TIntermNode* input) { // ignore loose inputs if (input->getAsSymbolNode()->getBasicType() != EbtBlock) return false; // don't demote loose outputs with matching input block members auto isMatchingBlockMember = [output](TTypeLoc type) { return type.type->getFieldName() == output->getAsSymbolNode()->getName(); }; const TTypeList* members = input->getAsSymbolNode()->getType().getStruct(); return std::any_of(members->begin(), members->end(), isMatchingBlockMember); }; // determine if the input/output pair should be demoted // do the faster (and more likely) loose-loose check first if (std::none_of(unitLiveInputs.begin(), unitLiveInputs.end(), isMatchingInput) && std::none_of(unitAllInputs.begin(), unitAllInputs.end(), isMatchingInputBlockMember)) { // demote any input matching the output auto demoteMatchingInputs = [output](TIntermNode* input) { if (output->getAsSymbolNode()->getAccessName() == input->getAsSymbolNode()->getAccessName()) { // demote input to a plain variable TIntermSymbol* symbol = input->getAsSymbolNode(); symbol->getQualifier().storage = EvqGlobal; symbol->getQualifier().clearInterstage(); symbol->getQualifier().clearLayout(); } }; // demote all matching outputs to a plain variable TIntermSymbol* symbol = output->getAsSymbolNode(); symbol->getQualifier().storage = EvqGlobal; symbol->getQualifier().clearInterstage(); symbol->getQualifier().clearLayout(); std::for_each(unitAllInputs.begin(), unitAllInputs.end(), demoteMatchingInputs); } }); } void TIntermediate::mergeCallGraphs(TInfoSink& infoSink, TIntermediate& unit) { if (unit.getNumEntryPoints() > 0) { if (getNumEntryPoints() > 0) error(infoSink, "can't handle multiple entry points per stage"); else { entryPointName = unit.getEntryPointName(); entryPointMangledName = unit.getEntryPointMangledName(); } } numEntryPoints += unit.getNumEntryPoints(); callGraph.insert(callGraph.end(), unit.callGraph.begin(), unit.callGraph.end()); } #define MERGE_MAX(member) member = std::max(member, unit.member) #define MERGE_TRUE(member) if (unit.member) member = unit.member; void TIntermediate::mergeModes(TInfoSink& infoSink, TIntermediate& unit) { if (language != unit.language) error(infoSink, "stages must match when linking into a single stage"); if (getSource() == EShSourceNone) setSource(unit.getSource()); if (getSource() != unit.getSource()) error(infoSink, "can't link compilation units from different source languages"); if (treeRoot == nullptr) { profile = unit.profile; version = unit.version; requestedExtensions = unit.requestedExtensions; } else { if ((isEsProfile()) != (unit.isEsProfile())) error(infoSink, "Cannot cross link ES and desktop profiles"); else if (unit.profile == ECompatibilityProfile) profile = ECompatibilityProfile; version = std::max(version, unit.version); requestedExtensions.insert(unit.requestedExtensions.begin(), unit.requestedExtensions.end()); } MERGE_MAX(spvVersion.spv); MERGE_MAX(spvVersion.vulkanGlsl); MERGE_MAX(spvVersion.vulkan); MERGE_MAX(spvVersion.openGl); MERGE_TRUE(spvVersion.vulkanRelaxed); numErrors += unit.getNumErrors(); // Only one push_constant is allowed, mergeLinkerObjects() will ensure the push_constant // is the same for all units. if (numPushConstants > 1 || unit.numPushConstants > 1) error(infoSink, "Only one push_constant block is allowed per stage"); numPushConstants = std::min(numPushConstants + unit.numPushConstants, 1); if (unit.invocations != TQualifier::layoutNotSet) { if (invocations == TQualifier::layoutNotSet) invocations = unit.invocations; else if (invocations != unit.invocations) error(infoSink, "number of invocations must match between compilation units"); } if (vertices == TQualifier::layoutNotSet) vertices = unit.vertices; else if (unit.vertices != TQualifier::layoutNotSet && vertices != unit.vertices) { if (language == EShLangGeometry || language == EShLangMesh) error(infoSink, "Contradictory layout max_vertices values"); else if (language == EShLangTessControl) error(infoSink, "Contradictory layout vertices values"); else assert(0); } if (primitives == TQualifier::layoutNotSet) primitives = unit.primitives; else if (primitives != unit.primitives) { if (language == EShLangMesh) error(infoSink, "Contradictory layout max_primitives values"); else assert(0); } if (inputPrimitive == ElgNone) inputPrimitive = unit.inputPrimitive; else if (unit.inputPrimitive != ElgNone && inputPrimitive != unit.inputPrimitive) error(infoSink, "Contradictory input layout primitives"); if (outputPrimitive == ElgNone) outputPrimitive = unit.outputPrimitive; else if (unit.outputPrimitive != ElgNone && outputPrimitive != unit.outputPrimitive) error(infoSink, "Contradictory output layout primitives"); if (originUpperLeft != unit.originUpperLeft || pixelCenterInteger != unit.pixelCenterInteger) error(infoSink, "gl_FragCoord redeclarations must match across shaders"); if (vertexSpacing == EvsNone) vertexSpacing = unit.vertexSpacing; else if (vertexSpacing != unit.vertexSpacing) error(infoSink, "Contradictory input vertex spacing"); if (vertexOrder == EvoNone) vertexOrder = unit.vertexOrder; else if (vertexOrder != unit.vertexOrder) error(infoSink, "Contradictory triangle ordering"); MERGE_TRUE(pointMode); for (int i = 0; i < 3; ++i) { if (unit.localSizeNotDefault[i]) { if (!localSizeNotDefault[i]) { localSize[i] = unit.localSize[i]; localSizeNotDefault[i] = true; } else if (localSize[i] != unit.localSize[i]) error(infoSink, "Contradictory local size"); } if (localSizeSpecId[i] == TQualifier::layoutNotSet) localSizeSpecId[i] = unit.localSizeSpecId[i]; else if (localSizeSpecId[i] != unit.localSizeSpecId[i]) error(infoSink, "Contradictory local size specialization ids"); } MERGE_TRUE(earlyFragmentTests); MERGE_TRUE(postDepthCoverage); MERGE_TRUE(nonCoherentColorAttachmentReadEXT); MERGE_TRUE(nonCoherentDepthAttachmentReadEXT); MERGE_TRUE(nonCoherentStencilAttachmentReadEXT); MERGE_TRUE(nonCoherentTileAttachmentReadQCOM); if (depthLayout == EldNone) depthLayout = unit.depthLayout; else if (depthLayout != unit.depthLayout) error(infoSink, "Contradictory depth layouts"); MERGE_TRUE(depthReplacing); MERGE_TRUE(hlslFunctionality1); blendEquations |= unit.blendEquations; MERGE_TRUE(xfbMode); for (size_t b = 0; b < xfbBuffers.size(); ++b) { if (xfbBuffers[b].stride == TQualifier::layoutXfbStrideEnd) xfbBuffers[b].stride = unit.xfbBuffers[b].stride; else if (xfbBuffers[b].stride != unit.xfbBuffers[b].stride) error(infoSink, "Contradictory xfb_stride"); xfbBuffers[b].implicitStride = std::max(xfbBuffers[b].implicitStride, unit.xfbBuffers[b].implicitStride); if (unit.xfbBuffers[b].contains64BitType) xfbBuffers[b].contains64BitType = true; if (unit.xfbBuffers[b].contains32BitType) xfbBuffers[b].contains32BitType = true; if (unit.xfbBuffers[b].contains16BitType) xfbBuffers[b].contains16BitType = true; // TODO: 4.4 link: enhanced layouts: compare ranges } MERGE_TRUE(multiStream); MERGE_TRUE(layoutOverrideCoverage); MERGE_TRUE(geoPassthroughEXT); for (unsigned int i = 0; i < unit.shiftBinding.size(); ++i) { if (unit.shiftBinding[i] > 0) setShiftBinding((TResourceType)i, unit.shiftBinding[i]); } for (unsigned int i = 0; i < unit.shiftBindingForSet.size(); ++i) { for (auto it = unit.shiftBindingForSet[i].begin(); it != unit.shiftBindingForSet[i].end(); ++it) setShiftBindingForSet((TResourceType)i, it->second, it->first); } resourceSetBinding.insert(resourceSetBinding.end(), unit.resourceSetBinding.begin(), unit.resourceSetBinding.end()); MERGE_TRUE(autoMapBindings); MERGE_TRUE(autoMapLocations); MERGE_TRUE(invertY); MERGE_TRUE(dxPositionW); MERGE_TRUE(debugInfo); MERGE_TRUE(flattenUniformArrays); MERGE_TRUE(useUnknownFormat); MERGE_TRUE(hlslOffsets); MERGE_TRUE(useStorageBuffer); MERGE_TRUE(invariantAll); MERGE_TRUE(hlslIoMapping); // TODO: sourceFile // TODO: sourceText // TODO: processes MERGE_TRUE(needToLegalize); MERGE_TRUE(binaryDoubleOutput); MERGE_TRUE(usePhysicalStorageBuffer); } // // Merge the 'unit' AST into 'this' AST. // That includes rationalizing the unique IDs, which were set up independently, // and might have overlaps that are not the same symbol, or might have different // IDs for what should be the same shared symbol. // void TIntermediate::mergeTrees(TInfoSink& infoSink, TIntermediate& unit) { if (unit.treeRoot == nullptr) return; if (treeRoot == nullptr) { treeRoot = unit.treeRoot; return; } // Getting this far means we have two existing trees to merge... numShaderRecordBlocks += unit.numShaderRecordBlocks; numTaskNVBlocks += unit.numTaskNVBlocks; // Get the top-level globals of each unit TIntermSequence& globals = treeRoot->getAsAggregate()->getSequence(); TIntermSequence& unitGlobals = unit.treeRoot->getAsAggregate()->getSequence(); // Get the linker-object lists TIntermSequence& linkerObjects = findLinkerObjects()->getSequence(); const TIntermSequence& unitLinkerObjects = unit.findLinkerObjects()->getSequence(); // Map by global name to unique ID to rationalize the same object having // differing IDs in different trees. TIdMaps idMaps; long long idShift; seedIdMap(idMaps, idShift); remapIds(idMaps, idShift + 1, unit); mergeBodies(infoSink, globals, unitGlobals); bool mergeExistingOnly = false; mergeGlobalUniformBlocks(infoSink, unit, mergeExistingOnly); mergeLinkerObjects(infoSink, linkerObjects, unitLinkerObjects, unit.getStage()); ioAccessed.insert(unit.ioAccessed.begin(), unit.ioAccessed.end()); } static const TString& getNameForIdMap(TIntermSymbol* symbol) { TShaderInterface si = symbol->getType().getShaderInterface(); if (si == EsiNone) return symbol->getName(); else return symbol->getType().getTypeName(); } // Traverser that seeds an ID map with all built-ins, and tracks the // maximum ID used, currently using (maximum ID + 1) as new symbol id shift seed. // Level id will keep same after shifting. // (It would be nice to put this in a function, but that causes warnings // on having no bodies for the copy-constructor/operator=.) class TBuiltInIdTraverser : public TIntermTraverser { public: TBuiltInIdTraverser(TIdMaps& idMaps) : idMaps(idMaps), idShift(0) { } // If it's a built in, add it to the map. virtual void visitSymbol(TIntermSymbol* symbol) { const TQualifier& qualifier = symbol->getType().getQualifier(); if (qualifier.builtIn != EbvNone) { TShaderInterface si = symbol->getType().getShaderInterface(); idMaps[si][getNameForIdMap(symbol)] = symbol->getId(); } idShift = (symbol->getId() & ~TSymbolTable::uniqueIdMask) | std::max(idShift & TSymbolTable::uniqueIdMask, symbol->getId() & TSymbolTable::uniqueIdMask); } long long getIdShift() const { return idShift; } protected: TBuiltInIdTraverser(TBuiltInIdTraverser&); TBuiltInIdTraverser& operator=(TBuiltInIdTraverser&); TIdMaps& idMaps; long long idShift; }; // Traverser that seeds an ID map with non-builtins. // (It would be nice to put this in a function, but that causes warnings // on having no bodies for the copy-constructor/operator=.) class TUserIdTraverser : public TIntermTraverser { public: TUserIdTraverser(TIdMaps& idMaps) : idMaps(idMaps) { } // If its a non-built-in global, add it to the map. virtual void visitSymbol(TIntermSymbol* symbol) { const TQualifier& qualifier = symbol->getType().getQualifier(); if (qualifier.builtIn == EbvNone) { TShaderInterface si = symbol->getType().getShaderInterface(); idMaps[si][getNameForIdMap(symbol)] = symbol->getId(); } } protected: TUserIdTraverser(TUserIdTraverser&); TUserIdTraverser& operator=(TUserIdTraverser&); TIdMaps& idMaps; // over biggest id }; // Initialize the the ID map with what we know of 'this' AST. void TIntermediate::seedIdMap(TIdMaps& idMaps, long long& idShift) { // all built-ins everywhere need to align on IDs and contribute to the max ID TBuiltInIdTraverser builtInIdTraverser(idMaps); treeRoot->traverse(&builtInIdTraverser); idShift = builtInIdTraverser.getIdShift() & TSymbolTable::uniqueIdMask; // user variables in the linker object list need to align on ids TUserIdTraverser userIdTraverser(idMaps); findLinkerObjects()->traverse(&userIdTraverser); } // Traverser to map an AST ID to what was known from the seeding AST. // (It would be nice to put this in a function, but that causes warnings // on having no bodies for the copy-constructor/operator=.) class TRemapIdTraverser : public TIntermTraverser { public: TRemapIdTraverser(const TIdMaps& idMaps, long long idShift) : idMaps(idMaps), idShift(idShift) { } // Do the mapping: // - if the same symbol, adopt the 'this' ID // - otherwise, ensure a unique ID by shifting to a new space virtual void visitSymbol(TIntermSymbol* symbol) { const TQualifier& qualifier = symbol->getType().getQualifier(); bool remapped = false; if (qualifier.isLinkable() || qualifier.builtIn != EbvNone) { TShaderInterface si = symbol->getType().getShaderInterface(); auto it = idMaps[si].find(getNameForIdMap(symbol)); if (it != idMaps[si].end()) { uint64_t id = (symbol->getId() & ~TSymbolTable::uniqueIdMask) | (it->second & TSymbolTable::uniqueIdMask); symbol->changeId(id); remapped = true; } } if (!remapped) symbol->changeId(symbol->getId() + idShift); } protected: TRemapIdTraverser(TRemapIdTraverser&); TRemapIdTraverser& operator=(TRemapIdTraverser&); const TIdMaps& idMaps; long long idShift; }; void TIntermediate::remapIds(const TIdMaps& idMaps, long long idShift, TIntermediate& unit) { // Remap all IDs to either share or be unique, as dictated by the idMap and idShift. TRemapIdTraverser idTraverser(idMaps, idShift); unit.getTreeRoot()->traverse(&idTraverser); } // // Merge the function bodies and global-level initializers from unitGlobals into globals. // Will error check duplication of function bodies for the same signature. // void TIntermediate::mergeBodies(TInfoSink& infoSink, TIntermSequence& globals, const TIntermSequence& unitGlobals) { // TODO: link-time performance: Processing in alphabetical order will be faster // Error check the global objects, not including the linker objects for (unsigned int child = 0; child < globals.size() - 1; ++child) { for (unsigned int unitChild = 0; unitChild < unitGlobals.size() - 1; ++unitChild) { TIntermAggregate* body = globals[child]->getAsAggregate(); TIntermAggregate* unitBody = unitGlobals[unitChild]->getAsAggregate(); if (body && unitBody && body->getOp() == EOpFunction && unitBody->getOp() == EOpFunction && body->getName() == unitBody->getName()) { error(infoSink, "Multiple function bodies in multiple compilation units for the same signature in the same stage:"); infoSink.info << " " << globals[child]->getAsAggregate()->getName() << "\n"; } } } // Merge the global objects, just in front of the linker objects globals.insert(globals.end() - 1, unitGlobals.begin(), unitGlobals.end() - 1); } // // Global Unfiform block stores any default uniforms (i.e. uniforms without a block) // If two linked stages declare the same member, they are meant to be the same uniform // and need to be in the same block // merge the members of different stages to allow them to be linked properly // as a single block // void TIntermediate::mergeGlobalUniformBlocks(TInfoSink& infoSink, TIntermediate& unit, bool mergeExistingOnly) { TIntermSequence& linkerObjects = findLinkerObjects()->getSequence(); TIntermSequence& unitLinkerObjects = unit.findLinkerObjects()->getSequence(); // build lists of default blocks from the intermediates TIntermSequence defaultBlocks; TIntermSequence unitDefaultBlocks; auto filter = [](TIntermSequence& list, TIntermNode* node) { if (node->getAsSymbolNode()->getQualifier().defaultBlock) { list.push_back(node); } }; std::for_each(linkerObjects.begin(), linkerObjects.end(), [&defaultBlocks, &filter](TIntermNode* node) { filter(defaultBlocks, node); }); std::for_each(unitLinkerObjects.begin(), unitLinkerObjects.end(), [&unitDefaultBlocks, &filter](TIntermNode* node) { filter(unitDefaultBlocks, node); }); auto itUnitBlock = unitDefaultBlocks.begin(); for (; itUnitBlock != unitDefaultBlocks.end(); itUnitBlock++) { bool add = !mergeExistingOnly; auto itBlock = defaultBlocks.begin(); for (; itBlock != defaultBlocks.end(); itBlock++) { TIntermSymbol* block = (*itBlock)->getAsSymbolNode(); TIntermSymbol* unitBlock = (*itUnitBlock)->getAsSymbolNode(); assert(block && unitBlock); // if the two default blocks match, then merge their definitions if (block->getType().getTypeName() == unitBlock->getType().getTypeName() && block->getQualifier().storage == unitBlock->getQualifier().storage) { add = false; mergeBlockDefinitions(infoSink, block, unitBlock, &unit); } } if (add) { // push back on original list; won't change the size of the list we're iterating over linkerObjects.push_back(*itUnitBlock); } } } void TIntermediate::mergeBlockDefinitions(TInfoSink& infoSink, TIntermSymbol* block, TIntermSymbol* unitBlock, TIntermediate* unit) { if (block->getType().getTypeName() != unitBlock->getType().getTypeName() || block->getType().getBasicType() != unitBlock->getType().getBasicType() || block->getQualifier().storage != unitBlock->getQualifier().storage || block->getQualifier().layoutSet != unitBlock->getQualifier().layoutSet) { // different block names likely means different blocks return; } // merge the struct // order of declarations doesn't matter and they matched based on member name TTypeList* memberList = block->getType().getWritableStruct(); TTypeList* unitMemberList = unitBlock->getType().getWritableStruct(); // keep track of which members have changed position // so we don't have to search the array again std::map memberIndexUpdates; size_t memberListStartSize = memberList->size(); for (unsigned int i = 0; i < unitMemberList->size(); ++i) { bool merge = true; for (unsigned int j = 0; j < memberListStartSize; ++j) { if ((*memberList)[j].type->getFieldName() == (*unitMemberList)[i].type->getFieldName()) { merge = false; const TType* memberType = (*memberList)[j].type; const TType* unitMemberType = (*unitMemberList)[i].type; // compare types // don't need as many checks as when merging symbols, since // initializers and most qualifiers are stripped when the member is moved into the block if ((*memberType) != (*unitMemberType)) { error(infoSink, "Types must match:", unitBlock->getStage()); infoSink.info << " " << memberType->getFieldName() << ": "; infoSink.info << "\"" << memberType->getCompleteString() << "\" in stage " << StageName(block->getStage()) << " versus "; infoSink.info << "\"" << unitMemberType->getCompleteString() << "\" in stage " << StageName(unitBlock->getStage()) << "\n"; } memberIndexUpdates[i] = j; } } if (merge) { memberList->push_back((*unitMemberList)[i]); memberIndexUpdates[i] = (unsigned int)memberList->size() - 1; } } // update symbol node in unit tree, // and other nodes that may reference it class TMergeBlockTraverser : public TIntermTraverser { public: TMergeBlockTraverser(const TIntermSymbol* newSym) : newSymbol(newSym), newType(nullptr), unit(nullptr), memberIndexUpdates(nullptr) { } TMergeBlockTraverser(const TIntermSymbol* newSym, const glslang::TType* unitType, glslang::TIntermediate* unit, const std::map* memberIdxUpdates) : TIntermTraverser(false, true), newSymbol(newSym), newType(unitType), unit(unit), memberIndexUpdates(memberIdxUpdates) { } virtual ~TMergeBlockTraverser() {} const TIntermSymbol* newSymbol; const glslang::TType* newType; // shallow copy of the new type glslang::TIntermediate* unit; // intermediate that is being updated const std::map* memberIndexUpdates; virtual void visitSymbol(TIntermSymbol* symbol) { if (newSymbol->getAccessName() == symbol->getAccessName() && newSymbol->getQualifier().getBlockStorage() == symbol->getQualifier().getBlockStorage()) { // Each symbol node may have a local copy of the block structure. // Update those structures to match the new one post-merge *(symbol->getWritableType().getWritableStruct()) = *(newSymbol->getType().getStruct()); } } virtual bool visitBinary(TVisit, glslang::TIntermBinary* node) { if (!unit || !newType || !memberIndexUpdates || memberIndexUpdates->empty()) return true; if (node->getOp() == EOpIndexDirectStruct && node->getLeft()->getType() == *newType) { // this is a dereference to a member of the block since the // member list changed, need to update this to point to the // right index assert(node->getRight()->getAsConstantUnion()); glslang::TIntermConstantUnion* constNode = node->getRight()->getAsConstantUnion(); unsigned int memberIdx = constNode->getConstArray()[0].getUConst(); unsigned int newIdx = memberIndexUpdates->at(memberIdx); TIntermTyped* newConstNode = unit->addConstantUnion(newIdx, node->getRight()->getLoc()); node->setRight(newConstNode); delete constNode; return true; } return true; } }; // 'this' may have symbols that are using the old block structure, so traverse the tree to update those // in 'visitSymbol' TMergeBlockTraverser finalLinkTraverser(block); getTreeRoot()->traverse(&finalLinkTraverser); // The 'unit' intermediate needs the block structures update, but also structure entry indices // may have changed from the old block to the new one that it was merged into, so update those // in 'visitBinary' TType newType; newType.shallowCopy(block->getType()); TMergeBlockTraverser unitFinalLinkTraverser(block, &newType, unit, &memberIndexUpdates); unit->getTreeRoot()->traverse(&unitFinalLinkTraverser); // update the member list (*unitMemberList) = (*memberList); } // // Merge the linker objects from unitLinkerObjects into linkerObjects. // Duplication is expected and filtered out, but contradictions are an error. // void TIntermediate::mergeLinkerObjects(TInfoSink& infoSink, TIntermSequence& linkerObjects, const TIntermSequence& unitLinkerObjects, EShLanguage unitStage) { // Error check and merge the linker objects (duplicates should not be created) std::size_t initialNumLinkerObjects = linkerObjects.size(); for (unsigned int unitLinkObj = 0; unitLinkObj < unitLinkerObjects.size(); ++unitLinkObj) { bool merge = true; for (std::size_t linkObj = 0; linkObj < initialNumLinkerObjects; ++linkObj) { TIntermSymbol* symbol = linkerObjects[linkObj]->getAsSymbolNode(); TIntermSymbol* unitSymbol = unitLinkerObjects[unitLinkObj]->getAsSymbolNode(); assert(symbol && unitSymbol); if (isSameSymbol(symbol, unitSymbol)) { // filter out copy merge = false; // but if one has an initializer and the other does not, update // the initializer if (symbol->getConstArray().empty() && ! unitSymbol->getConstArray().empty()) symbol->setConstArray(unitSymbol->getConstArray()); // Similarly for binding if (! symbol->getQualifier().hasBinding() && unitSymbol->getQualifier().hasBinding()) symbol->getQualifier().layoutBinding = unitSymbol->getQualifier().layoutBinding; // Similarly for location if (!symbol->getQualifier().hasLocation() && unitSymbol->getQualifier().hasLocation()) { symbol->getQualifier().layoutLocation = unitSymbol->getQualifier().layoutLocation; } // Update implicit array sizes if (symbol->getWritableType().isImplicitlySizedArray() && unitSymbol->getType().isImplicitlySizedArray()) { if (unitSymbol->getType().getImplicitArraySize() > symbol->getType().getImplicitArraySize()){ symbol->getWritableType().updateImplicitArraySize(unitSymbol->getType().getImplicitArraySize()); } } else if (symbol->getWritableType().isImplicitlySizedArray() && unitSymbol->getType().isSizedArray()) { if (symbol->getWritableType().getImplicitArraySize() > unitSymbol->getType().getOuterArraySize()) error(infoSink, "Implicit size of unsized array doesn't match same symbol among multiple shaders.", unitStage); } else if (unitSymbol->getType().isImplicitlySizedArray() && symbol->getWritableType().isSizedArray()) { if (unitSymbol->getType().getImplicitArraySize() > symbol->getWritableType().getOuterArraySize()) error(infoSink, "Implicit size of unsized array doesn't match same symbol among multiple shaders.", unitStage); } if (symbol->getType().isStruct() && unitSymbol->getType().isStruct() && symbol->getType().getStruct()->size() == unitSymbol->getType().getStruct()->size()) { for (int i = 0; i < (int)symbol->getType().getStruct()->size(); ++i) { auto& type = (*symbol->getWritableType().getStruct())[i]; auto& unitType = (*unitSymbol->getWritableType().getStruct())[i]; if (type.type->isImplicitlySizedArray() && unitType.type->isImplicitlySizedArray()) { if (unitType.type->getImplicitArraySize() > type.type->getImplicitArraySize()) type.type->updateImplicitArraySize(unitType.type->getImplicitArraySize()); } else if (type.type->isImplicitlySizedArray() && unitType.type->isSizedArray()) { if (type.type->getImplicitArraySize() > unitType.type->getOuterArraySize()) error(infoSink, "Implicit size of unsized array doesn't match same symbol among multiple shaders.", unitStage); } else if (type.type->isSizedArray() && unitType.type->isImplicitlySizedArray()) { if (type.type->getOuterArraySize() < unitType.type->getImplicitArraySize()) error(infoSink, "Implicit size of unsized array doesn't match same symbol among multiple shaders.", unitStage); } } } // Update implicit array sizes mergeImplicitArraySizes(symbol->getWritableType(), unitSymbol->getType()); // Check for consistent types/qualification/initializers etc. mergeErrorCheck(infoSink, *symbol, *unitSymbol); } // If different symbols, verify they arn't push_constant since there can only be one per stage else if (symbol->getQualifier().isPushConstant() && unitSymbol->getQualifier().isPushConstant() && getStage() == unitStage) error(infoSink, "Only one push_constant block is allowed per stage"); } // Check conflicts between preset primitives and sizes of I/O variables among multiple geometry shaders if (language == EShLangGeometry && unitStage == EShLangGeometry) { TIntermSymbol* unitSymbol = unitLinkerObjects[unitLinkObj]->getAsSymbolNode(); if (unitSymbol->isArray() && unitSymbol->getQualifier().storage == EvqVaryingIn && unitSymbol->getQualifier().builtIn == EbvNone) if ((unitSymbol->getArraySizes()->isImplicitlySized() && unitSymbol->getArraySizes()->getImplicitSize() != TQualifier::mapGeometryToSize(getInputPrimitive())) || (! unitSymbol->getArraySizes()->isImplicitlySized() && unitSymbol->getArraySizes()->getDimSize(0) != TQualifier::mapGeometryToSize(getInputPrimitive()))) error(infoSink, "Not all array sizes match across all geometry shaders in the program"); } if (merge) { linkerObjects.push_back(unitLinkerObjects[unitLinkObj]); // for anonymous blocks, check that their members don't conflict with other names if (unitLinkerObjects[unitLinkObj]->getAsSymbolNode()->getBasicType() == EbtBlock && IsAnonymous(unitLinkerObjects[unitLinkObj]->getAsSymbolNode()->getName())) { for (std::size_t linkObj = 0; linkObj < initialNumLinkerObjects; ++linkObj) { TIntermSymbol* symbol = linkerObjects[linkObj]->getAsSymbolNode(); TIntermSymbol* unitSymbol = unitLinkerObjects[unitLinkObj]->getAsSymbolNode(); assert(symbol && unitSymbol); auto checkName = [this, unitSymbol, &infoSink](const TString& name) { for (unsigned int i = 0; i < unitSymbol->getType().getStruct()->size(); ++i) { if (name == (*unitSymbol->getType().getStruct())[i].type->getFieldName() && !((*unitSymbol->getType().getStruct())[i].type->getQualifier().hasLocation() || unitSymbol->getType().getQualifier().hasLocation()) ) { error(infoSink, "Anonymous member name used for global variable or other anonymous member: "); infoSink.info << (*unitSymbol->getType().getStruct())[i].type->getCompleteString() << "\n"; } } }; if (isSameInterface(symbol, unitSymbol)) { checkName(symbol->getName()); // check members of other anonymous blocks if (symbol->getBasicType() == EbtBlock && IsAnonymous(symbol->getName())) { for (unsigned int i = 0; i < symbol->getType().getStruct()->size(); ++i) { checkName((*symbol->getType().getStruct())[i].type->getFieldName()); } } } } } } } } // TODO 4.5 link functionality: cull distance array size checking // Recursively merge the implicit array sizes through the objects' respective type trees. void TIntermediate::mergeImplicitArraySizes(TType& type, const TType& unitType) { if (type.isUnsizedArray()) { if (unitType.isUnsizedArray()) { type.updateImplicitArraySize(unitType.getImplicitArraySize()); if (unitType.isArrayVariablyIndexed()) type.setArrayVariablyIndexed(); } else if (unitType.isSizedArray()) type.changeOuterArraySize(unitType.getOuterArraySize()); } // Type mismatches are caught and reported after this, just be careful for now. if (! type.isStruct() || ! unitType.isStruct() || type.getStruct()->size() != unitType.getStruct()->size()) return; for (int i = 0; i < (int)type.getStruct()->size(); ++i) mergeImplicitArraySizes(*(*type.getStruct())[i].type, *(*unitType.getStruct())[i].type); } // // Compare two global objects from two compilation units and see if they match // well enough. Rules can be different for intra- vs. cross-stage matching. // // This function only does one of intra- or cross-stage matching per call. // void TIntermediate::mergeErrorCheck(TInfoSink& infoSink, const TIntermSymbol& symbol, const TIntermSymbol& unitSymbol) { EShLanguage stage = symbol.getStage(); EShLanguage unitStage = unitSymbol.getStage(); bool crossStage = stage != unitStage; bool writeTypeComparison = false; bool errorReported = false; bool printQualifiers = false; bool printPrecision = false; bool printType = false; // Types have to match { // but, we make an exception if one is an implicit array and the other is sized // or if the array sizes differ because of the extra array dimension on some in/out boundaries bool arraysMatch = false; if (isIoResizeArray(symbol.getType(), stage) || isIoResizeArray(unitSymbol.getType(), unitStage)) { // if the arrays have an extra dimension because of the stage. // compare dimensions while ignoring the outer dimension unsigned int firstDim = isIoResizeArray(symbol.getType(), stage) ? 1 : 0; unsigned int numDim = symbol.getArraySizes() ? symbol.getArraySizes()->getNumDims() : 0; unsigned int unitFirstDim = isIoResizeArray(unitSymbol.getType(), unitStage) ? 1 : 0; unsigned int unitNumDim = unitSymbol.getArraySizes() ? unitSymbol.getArraySizes()->getNumDims() : 0; arraysMatch = (numDim - firstDim) == (unitNumDim - unitFirstDim); // check that array sizes match as well for (unsigned int i = 0; i < (numDim - firstDim) && arraysMatch; i++) { if (symbol.getArraySizes()->getDimSize(firstDim + i) != unitSymbol.getArraySizes()->getDimSize(unitFirstDim + i)) { arraysMatch = false; break; } } } else { arraysMatch = symbol.getType().sameArrayness(unitSymbol.getType()) || (symbol.getType().isArray() && unitSymbol.getType().isArray() && (symbol.getType().isImplicitlySizedArray() || unitSymbol.getType().isImplicitlySizedArray() || symbol.getType().isUnsizedArray() || unitSymbol.getType().isUnsizedArray())); } int lpidx = -1; int rpidx = -1; if (!symbol.getType().sameElementType(unitSymbol.getType(), &lpidx, &rpidx)) { if (lpidx >= 0 && rpidx >= 0) { error(infoSink, "Member names and types must match:", unitStage); infoSink.info << " Block: " << symbol.getType().getTypeName() << "\n"; infoSink.info << " " << StageName(stage) << " stage: \"" << (*symbol.getType().getStruct())[lpidx].type->getCompleteString(true, false, false, true, (*symbol.getType().getStruct())[lpidx].type->getFieldName()) << "\"\n"; infoSink.info << " " << StageName(unitStage) << " stage: \"" << (*unitSymbol.getType().getStruct())[rpidx].type->getCompleteString(true, false, false, true, (*unitSymbol.getType().getStruct())[rpidx].type->getFieldName()) << "\"\n"; errorReported = true; } else if (lpidx >= 0 && rpidx == -1) { TString errmsg = StageName(stage); errmsg.append(" block member has no corresponding member in ").append(StageName(unitStage)).append(" block:"); error(infoSink, errmsg.c_str(), unitStage); infoSink.info << " " << StageName(stage) << " stage: Block: " << symbol.getType().getTypeName() << ", Member: " << (*symbol.getType().getStruct())[lpidx].type->getFieldName() << "\n"; infoSink.info << " " << StageName(unitStage) << " stage: Block: " << unitSymbol.getType().getTypeName() << ", Member: n/a \n"; errorReported = true; } else if (lpidx == -1 && rpidx >= 0) { TString errmsg = StageName(unitStage); errmsg.append(" block member has no corresponding member in ").append(StageName(stage)).append(" block:"); error(infoSink, errmsg.c_str(), unitStage); infoSink.info << " " << StageName(unitStage) << " stage: Block: " << unitSymbol.getType().getTypeName() << ", Member: " << (*unitSymbol.getType().getStruct())[rpidx].type->getFieldName() << "\n"; infoSink.info << " " << StageName(stage) << " stage: Block: " << symbol.getType().getTypeName() << ", Member: n/a \n"; errorReported = true; } else { error(infoSink, "Types must match:", unitStage); writeTypeComparison = true; printType = true; } } else if (!arraysMatch) { error(infoSink, "Array sizes must be compatible:", unitStage); writeTypeComparison = true; printType = true; } else if (!symbol.getType().sameTypeParameters(unitSymbol.getType())) { error(infoSink, "Type parameters must match:", unitStage); writeTypeComparison = true; printType = true; } } // Interface block member-wise layout qualifiers have to match if (symbol.getType().getBasicType() == EbtBlock && unitSymbol.getType().getBasicType() == EbtBlock && symbol.getType().getStruct() && unitSymbol.getType().getStruct() && symbol.getType().sameStructType(unitSymbol.getType())) { unsigned int li = 0; unsigned int ri = 0; while (li < symbol.getType().getStruct()->size() && ri < unitSymbol.getType().getStruct()->size()) { if ((*symbol.getType().getStruct())[li].type->hiddenMember()) { ++li; continue; } if ((*unitSymbol.getType().getStruct())[ri].type->hiddenMember()) { ++ri; continue; } const TQualifier& qualifier = (*symbol.getType().getStruct())[li].type->getQualifier(); const TQualifier & unitQualifier = (*unitSymbol.getType().getStruct())[ri].type->getQualifier(); bool layoutQualifierError = false; if (qualifier.layoutMatrix != unitQualifier.layoutMatrix) { error(infoSink, "Interface block member layout matrix qualifier must match:", unitStage); layoutQualifierError = true; } if (qualifier.layoutOffset != unitQualifier.layoutOffset) { error(infoSink, "Interface block member layout offset qualifier must match:", unitStage); layoutQualifierError = true; } if (qualifier.layoutAlign != unitQualifier.layoutAlign) { error(infoSink, "Interface block member layout align qualifier must match:", unitStage); layoutQualifierError = true; } if (qualifier.layoutLocation != unitQualifier.layoutLocation) { error(infoSink, "Interface block member layout location qualifier must match:", unitStage); layoutQualifierError = true; } if (qualifier.layoutComponent != unitQualifier.layoutComponent) { error(infoSink, "Interface block member layout component qualifier must match:", unitStage); layoutQualifierError = true; } if (layoutQualifierError) { infoSink.info << " " << StageName(stage) << " stage: Block: " << symbol.getType().getTypeName() << ", Member: " << (*symbol.getType().getStruct())[li].type->getFieldName() << " \"" << (*symbol.getType().getStruct())[li].type->getCompleteString(true, true, false, false) << "\"\n"; infoSink.info << " " << StageName(unitStage) << " stage: Block: " << unitSymbol.getType().getTypeName() << ", Member: " << (*unitSymbol.getType().getStruct())[ri].type->getFieldName() << " \"" << (*unitSymbol.getType().getStruct())[ri].type->getCompleteString(true, true, false, false) << "\"\n"; errorReported = true; } ++li; ++ri; } } bool isInOut = crossStage && ((symbol.getQualifier().storage == EvqVaryingIn && unitSymbol.getQualifier().storage == EvqVaryingOut) || (symbol.getQualifier().storage == EvqVaryingOut && unitSymbol.getQualifier().storage == EvqVaryingIn)); // Qualifiers have to (almost) match // Storage... if (!isInOut && symbol.getQualifier().storage != unitSymbol.getQualifier().storage) { error(infoSink, "Storage qualifiers must match:", unitStage); writeTypeComparison = true; printQualifiers = true; } // Uniform and buffer blocks must either both have an instance name, or // must both be anonymous. The names don't need to match though. if (symbol.getQualifier().isUniformOrBuffer() && (IsAnonymous(symbol.getName()) != IsAnonymous(unitSymbol.getName()))) { error(infoSink, "Matched Uniform or Storage blocks must all be anonymous," " or all be named:", unitStage); writeTypeComparison = true; } if (symbol.getQualifier().storage == unitSymbol.getQualifier().storage && (IsAnonymous(symbol.getName()) != IsAnonymous(unitSymbol.getName()) || (!IsAnonymous(symbol.getName()) && symbol.getName() != unitSymbol.getName()))) { warn(infoSink, "Matched shader interfaces are using different instance names.", unitStage); writeTypeComparison = true; } // Precision... if (!isInOut && symbol.getQualifier().precision != unitSymbol.getQualifier().precision) { error(infoSink, "Precision qualifiers must match:", unitStage); writeTypeComparison = true; printPrecision = true; } // Invariance... if (! crossStage && symbol.getQualifier().invariant != unitSymbol.getQualifier().invariant) { error(infoSink, "Presence of invariant qualifier must match:", unitStage); writeTypeComparison = true; printQualifiers = true; } // Precise... if (! crossStage && symbol.getQualifier().isNoContraction() != unitSymbol.getQualifier().isNoContraction()) { error(infoSink, "Presence of precise qualifier must match:", unitStage); writeTypeComparison = true; printPrecision = true; } // Auxiliary and interpolation... // "interpolation qualification (e.g., flat) and auxiliary qualification (e.g. centroid) may differ. // These mismatches are allowed between any pair of stages ... // those provided in the fragment shader supersede those provided in previous stages." if (!crossStage && (symbol.getQualifier().centroid != unitSymbol.getQualifier().centroid || symbol.getQualifier().smooth != unitSymbol.getQualifier().smooth || symbol.getQualifier().flat != unitSymbol.getQualifier().flat || symbol.getQualifier().isSample()!= unitSymbol.getQualifier().isSample() || symbol.getQualifier().isPatch() != unitSymbol.getQualifier().isPatch() || symbol.getQualifier().isNonPerspective() != unitSymbol.getQualifier().isNonPerspective())) { error(infoSink, "Interpolation and auxiliary storage qualifiers must match:", unitStage); writeTypeComparison = true; printQualifiers = true; } // Memory... bool memoryQualifierError = false; if (symbol.getQualifier().coherent != unitSymbol.getQualifier().coherent) { error(infoSink, "Memory coherent qualifier must match:", unitStage); memoryQualifierError = true; } if (symbol.getQualifier().devicecoherent != unitSymbol.getQualifier().devicecoherent) { error(infoSink, "Memory devicecoherent qualifier must match:", unitStage); memoryQualifierError = true; } if (symbol.getQualifier().queuefamilycoherent != unitSymbol.getQualifier().queuefamilycoherent) { error(infoSink, "Memory queuefamilycoherent qualifier must match:", unitStage); memoryQualifierError = true; } if (symbol.getQualifier().workgroupcoherent != unitSymbol.getQualifier().workgroupcoherent) { error(infoSink, "Memory workgroupcoherent qualifier must match:", unitStage); memoryQualifierError = true; } if (symbol.getQualifier().subgroupcoherent != unitSymbol.getQualifier().subgroupcoherent) { error(infoSink, "Memory subgroupcoherent qualifier must match:", unitStage); memoryQualifierError = true; } if (symbol.getQualifier().shadercallcoherent != unitSymbol.getQualifier().shadercallcoherent) { error(infoSink, "Memory shadercallcoherent qualifier must match:", unitStage); memoryQualifierError = true; } if (symbol.getQualifier().nonprivate != unitSymbol.getQualifier().nonprivate) { error(infoSink, "Memory nonprivate qualifier must match:", unitStage); memoryQualifierError = true; } if (symbol.getQualifier().volatil != unitSymbol.getQualifier().volatil) { error(infoSink, "Memory volatil qualifier must match:", unitStage); memoryQualifierError = true; } if (symbol.getQualifier().nontemporal != unitSymbol.getQualifier().nontemporal) { error(infoSink, "Memory nontemporal qualifier must match:", unitStage); memoryQualifierError = true; } if (symbol.getQualifier().restrict != unitSymbol.getQualifier().restrict) { error(infoSink, "Memory restrict qualifier must match:", unitStage); memoryQualifierError = true; } if (symbol.getQualifier().readonly != unitSymbol.getQualifier().readonly) { error(infoSink, "Memory readonly qualifier must match:", unitStage); memoryQualifierError = true; } if (symbol.getQualifier().writeonly != unitSymbol.getQualifier().writeonly) { error(infoSink, "Memory writeonly qualifier must match:", unitStage); memoryQualifierError = true; } if (memoryQualifierError) { writeTypeComparison = true; printQualifiers = true; } // Layouts... // TODO: 4.4 enhanced layouts: Generalize to include offset/align: current spec // requires separate user-supplied offset from actual computed offset, but // current implementation only has one offset. bool layoutQualifierError = false; if (symbol.getQualifier().layoutMatrix != unitSymbol.getQualifier().layoutMatrix) { error(infoSink, "Layout matrix qualifier must match:", unitStage); layoutQualifierError = true; } if (symbol.getQualifier().layoutPacking != unitSymbol.getQualifier().layoutPacking) { error(infoSink, "Layout packing qualifier must match:", unitStage); layoutQualifierError = true; } if (symbol.getQualifier().hasLocation() && unitSymbol.getQualifier().hasLocation() && symbol.getQualifier().layoutLocation != unitSymbol.getQualifier().layoutLocation) { error(infoSink, "Layout location qualifier must match:", unitStage); layoutQualifierError = true; } if (symbol.getQualifier().layoutComponent != unitSymbol.getQualifier().layoutComponent) { error(infoSink, "Layout component qualifier must match:", unitStage); layoutQualifierError = true; } if (symbol.getQualifier().layoutIndex != unitSymbol.getQualifier().layoutIndex) { error(infoSink, "Layout index qualifier must match:", unitStage); layoutQualifierError = true; } if (symbol.getQualifier().hasBinding() && unitSymbol.getQualifier().hasBinding() && symbol.getQualifier().layoutBinding != unitSymbol.getQualifier().layoutBinding) { error(infoSink, "Layout binding qualifier must match:", unitStage); layoutQualifierError = true; } if (symbol.getQualifier().hasBinding() && (symbol.getQualifier().layoutOffset != unitSymbol.getQualifier().layoutOffset)) { error(infoSink, "Layout offset qualifier must match:", unitStage); layoutQualifierError = true; } if (layoutQualifierError) { writeTypeComparison = true; printQualifiers = true; } // Initializers have to match, if both are present, and if we don't already know the types don't match if (! writeTypeComparison && ! errorReported) { if (! symbol.getConstArray().empty() && ! unitSymbol.getConstArray().empty()) { if (symbol.getConstArray() != unitSymbol.getConstArray()) { error(infoSink, "Initializers must match:", unitStage); infoSink.info << " " << symbol.getName() << "\n"; } } } if (writeTypeComparison) { if (symbol.getType().getBasicType() == EbtBlock && unitSymbol.getType().getBasicType() == EbtBlock && symbol.getType().getStruct() && unitSymbol.getType().getStruct()) { if (printType) { infoSink.info << " " << StageName(stage) << " stage: \"" << symbol.getType().getCompleteString(true, printQualifiers, printPrecision, printType, symbol.getName(), symbol.getType().getTypeName()) << "\"\n"; infoSink.info << " " << StageName(unitStage) << " stage: \"" << unitSymbol.getType().getCompleteString(true, printQualifiers, printPrecision, printType, unitSymbol.getName(), unitSymbol.getType().getTypeName()) << "\"\n"; } else { infoSink.info << " " << StageName(stage) << " stage: Block: " << symbol.getType().getTypeName() << " Instance: " << symbol.getName() << ": \"" << symbol.getType().getCompleteString(true, printQualifiers, printPrecision, printType) << "\"\n"; infoSink.info << " " << StageName(unitStage) << " stage: Block: " << unitSymbol.getType().getTypeName() << " Instance: " << unitSymbol.getName() << ": \"" << unitSymbol.getType().getCompleteString(true, printQualifiers, printPrecision, printType) << "\"\n"; } } else { if (printType) { infoSink.info << " " << StageName(stage) << " stage: \"" << symbol.getType().getCompleteString(true, printQualifiers, printPrecision, printType, symbol.getName()) << "\"\n"; infoSink.info << " " << StageName(unitStage) << " stage: \"" << unitSymbol.getType().getCompleteString(true, printQualifiers, printPrecision, printType, unitSymbol.getName()) << "\"\n"; } else { infoSink.info << " " << StageName(stage) << " stage: " << symbol.getName() << " \"" << symbol.getType().getCompleteString(true, printQualifiers, printPrecision, printType) << "\"\n"; infoSink.info << " " << StageName(unitStage) << " stage: " << unitSymbol.getName() << " \"" << unitSymbol.getType().getCompleteString(true, printQualifiers, printPrecision, printType) << "\"\n"; } } } } void TIntermediate::sharedBlockCheck(TInfoSink& infoSink) { bool has_shared_block = false; bool has_shared_non_block = false; TIntermSequence& linkObjects = findLinkerObjects()->getSequence(); for (size_t i = 0; i < linkObjects.size(); ++i) { const TType& type = linkObjects[i]->getAsTyped()->getType(); const TQualifier& qualifier = type.getQualifier(); if (qualifier.storage == glslang::EvqShared) { if (type.getBasicType() == glslang::EbtBlock) has_shared_block = true; else has_shared_non_block = true; } } if (has_shared_block && has_shared_non_block) error(infoSink, "cannot mix use of shared variables inside and outside blocks"); } // // Do final link-time error checking of a complete (merged) intermediate representation. // (Much error checking was done during merging). // // Also, lock in defaults of things not set. // Defer adopting implicit array sizes to later, after all stages are merged. // void TIntermediate::finalCheck(TInfoSink& infoSink, bool keepUncalled) { if (getTreeRoot() == nullptr) return; if (numEntryPoints < 1) { if (getSource() == EShSourceGlsl) error(infoSink, "Missing entry point: Each stage requires one entry point"); else warn(infoSink, "Entry point not found"); } // recursion and missing body checking checkCallGraphCycles(infoSink); checkCallGraphBodies(infoSink, keepUncalled); // overlap/alias/missing I/O, etc. inOutLocationCheck(infoSink); if (getNumPushConstants() > 1) error(infoSink, "Only one push_constant block is allowed per stage"); // invocations if (invocations == TQualifier::layoutNotSet) invocations = 1; if (inIoAccessed("gl_ClipDistance") && inIoAccessed("gl_ClipVertex")) error(infoSink, "Can only use one of gl_ClipDistance or gl_ClipVertex (gl_ClipDistance is preferred)"); if (inIoAccessed("gl_CullDistance") && inIoAccessed("gl_ClipVertex")) error(infoSink, "Can only use one of gl_CullDistance or gl_ClipVertex (gl_ClipDistance is preferred)"); if (userOutputUsed() && (inIoAccessed("gl_FragColor") || inIoAccessed("gl_FragData"))) error(infoSink, "Cannot use gl_FragColor or gl_FragData when using user-defined outputs"); if (inIoAccessed("gl_FragColor") && inIoAccessed("gl_FragData")) error(infoSink, "Cannot use both gl_FragColor and gl_FragData"); for (size_t b = 0; b < xfbBuffers.size(); ++b) { if (xfbBuffers[b].contains64BitType) RoundToPow2(xfbBuffers[b].implicitStride, 8); else if (xfbBuffers[b].contains32BitType) RoundToPow2(xfbBuffers[b].implicitStride, 4); else if (xfbBuffers[b].contains16BitType) RoundToPow2(xfbBuffers[b].implicitStride, 2); // "It is a compile-time or link-time error to have // any xfb_offset that overflows xfb_stride, whether stated on declarations before or after the xfb_stride, or // in different compilation units. While xfb_stride can be declared multiple times for the same buffer, it is a // compile-time or link-time error to have different values specified for the stride for the same buffer." if (xfbBuffers[b].stride != TQualifier::layoutXfbStrideEnd && xfbBuffers[b].implicitStride > xfbBuffers[b].stride) { error(infoSink, "xfb_stride is too small to hold all buffer entries:"); infoSink.info.prefix(EPrefixError); infoSink.info << " xfb_buffer " << (unsigned int)b << ", xfb_stride " << xfbBuffers[b].stride << ", minimum stride needed: " << xfbBuffers[b].implicitStride << "\n"; } if (xfbBuffers[b].stride == TQualifier::layoutXfbStrideEnd) xfbBuffers[b].stride = xfbBuffers[b].implicitStride; // "If the buffer is capturing any // outputs with double-precision or 64-bit integer components, the stride must be a multiple of 8, otherwise it must be a // multiple of 4, or a compile-time or link-time error results." if (xfbBuffers[b].contains64BitType && ! IsMultipleOfPow2(xfbBuffers[b].stride, 8)) { error(infoSink, "xfb_stride must be multiple of 8 for buffer holding a double or 64-bit integer:"); infoSink.info.prefix(EPrefixError); infoSink.info << " xfb_buffer " << (unsigned int)b << ", xfb_stride " << xfbBuffers[b].stride << "\n"; } else if (xfbBuffers[b].contains32BitType && ! IsMultipleOfPow2(xfbBuffers[b].stride, 4)) { error(infoSink, "xfb_stride must be multiple of 4:"); infoSink.info.prefix(EPrefixError); infoSink.info << " xfb_buffer " << (unsigned int)b << ", xfb_stride " << xfbBuffers[b].stride << "\n"; } // "If the buffer is capturing any // outputs with half-precision or 16-bit integer components, the stride must be a multiple of 2" else if (xfbBuffers[b].contains16BitType && ! IsMultipleOfPow2(xfbBuffers[b].stride, 2)) { error(infoSink, "xfb_stride must be multiple of 2 for buffer holding a half float or 16-bit integer:"); infoSink.info.prefix(EPrefixError); infoSink.info << " xfb_buffer " << (unsigned int)b << ", xfb_stride " << xfbBuffers[b].stride << "\n"; } // "The resulting stride (implicit or explicit), when divided by 4, must be less than or equal to the // implementation-dependent constant gl_MaxTransformFeedbackInterleavedComponents." if (xfbBuffers[b].stride > (unsigned int)(4 * resources->maxTransformFeedbackInterleavedComponents)) { error(infoSink, "xfb_stride is too large:"); infoSink.info.prefix(EPrefixError); infoSink.info << " xfb_buffer " << (unsigned int)b << ", components (1/4 stride) needed are " << xfbBuffers[b].stride/4 << ", gl_MaxTransformFeedbackInterleavedComponents is " << resources->maxTransformFeedbackInterleavedComponents << "\n"; } } switch (language) { case EShLangVertex: break; case EShLangTessControl: if (vertices == TQualifier::layoutNotSet) error(infoSink, "At least one shader must specify an output layout(vertices=...)"); break; case EShLangTessEvaluation: if (getSource() == EShSourceGlsl) { if (inputPrimitive == ElgNone) error(infoSink, "At least one shader must specify an input layout primitive"); if (vertexSpacing == EvsNone) vertexSpacing = EvsEqual; if (vertexOrder == EvoNone) vertexOrder = EvoCcw; } break; case EShLangGeometry: if (inputPrimitive == ElgNone) error(infoSink, "At least one shader must specify an input layout primitive"); if (outputPrimitive == ElgNone) error(infoSink, "At least one shader must specify an output layout primitive"); if (vertices == TQualifier::layoutNotSet) error(infoSink, "At least one shader must specify a layout(max_vertices = value)"); break; case EShLangFragment: // for GL_ARB_post_depth_coverage, EarlyFragmentTest is set automatically in // ParseHelper.cpp. So if we reach here, this must be GL_EXT_post_depth_coverage // requiring explicit early_fragment_tests if (getPostDepthCoverage() && !getEarlyFragmentTests()) error(infoSink, "post_depth_coverage requires early_fragment_tests"); break; case EShLangCompute: sharedBlockCheck(infoSink); break; case EShLangRayGen: case EShLangIntersect: case EShLangAnyHit: case EShLangClosestHit: case EShLangMiss: case EShLangCallable: if (numShaderRecordBlocks > 1) error(infoSink, "Only one shaderRecordNV buffer block is allowed per stage"); break; case EShLangMesh: // NV_mesh_shader doesn't allow use of both single-view and per-view builtins. if (inIoAccessed("gl_Position") && inIoAccessed("gl_PositionPerViewNV")) error(infoSink, "Can only use one of gl_Position or gl_PositionPerViewNV"); if (inIoAccessed("gl_ClipDistance") && inIoAccessed("gl_ClipDistancePerViewNV")) error(infoSink, "Can only use one of gl_ClipDistance or gl_ClipDistancePerViewNV"); if (inIoAccessed("gl_CullDistance") && inIoAccessed("gl_CullDistancePerViewNV")) error(infoSink, "Can only use one of gl_CullDistance or gl_CullDistancePerViewNV"); if (inIoAccessed("gl_Layer") && inIoAccessed("gl_LayerPerViewNV")) error(infoSink, "Can only use one of gl_Layer or gl_LayerPerViewNV"); if (inIoAccessed("gl_ViewportMask") && inIoAccessed("gl_ViewportMaskPerViewNV")) error(infoSink, "Can only use one of gl_ViewportMask or gl_ViewportMaskPerViewNV"); if (outputPrimitive == ElgNone) error(infoSink, "At least one shader must specify an output layout primitive"); if (vertices == TQualifier::layoutNotSet) error(infoSink, "At least one shader must specify a layout(max_vertices = value)"); if (primitives == TQualifier::layoutNotSet) error(infoSink, "At least one shader must specify a layout(max_primitives = value)"); [[fallthrough]]; case EShLangTask: if (numTaskNVBlocks > 1) error(infoSink, "Only one taskNV interface block is allowed per shader"); if (numTaskEXTPayloads > 1) error(infoSink, "Only single variable of type taskPayloadSharedEXT is allowed per shader"); sharedBlockCheck(infoSink); break; default: error(infoSink, "Unknown Stage."); break; } } // // See if the call graph contains any static recursion, which is disallowed // by the specification. // void TIntermediate::checkCallGraphCycles(TInfoSink& infoSink) { // Clear fields we'll use for this. for (TGraph::iterator call = callGraph.begin(); call != callGraph.end(); ++call) { call->visited = false; call->currentPath = false; call->errorGiven = false; } // // Loop, looking for a new connected subgraph. One subgraph is handled per loop iteration. // TCall* newRoot; do { // See if we have unvisited parts of the graph. newRoot = nullptr; for (TGraph::iterator call = callGraph.begin(); call != callGraph.end(); ++call) { if (! call->visited) { newRoot = &(*call); break; } } // If not, we are done. if (! newRoot) break; // Otherwise, we found a new subgraph, process it: // See what all can be reached by this new root, and if any of // that is recursive. This is done by depth-first traversals, seeing // if a new call is found that was already in the currentPath (a back edge), // thereby detecting recursion. std::list stack; newRoot->currentPath = true; // currentPath will be true iff it is on the stack stack.push_back(newRoot); while (! stack.empty()) { // get a caller TCall* call = stack.back(); // Add to the stack just one callee. // This algorithm always terminates, because only !visited and !currentPath causes a push // and all pushes change currentPath to true, and all pops change visited to true. TGraph::iterator child = callGraph.begin(); for (; child != callGraph.end(); ++child) { // If we already visited this node, its whole subgraph has already been processed, so skip it. if (child->visited) continue; if (call->callee == child->caller) { if (child->currentPath) { // Then, we found a back edge if (! child->errorGiven) { error(infoSink, "Recursion detected:"); infoSink.info << " " << call->callee << " calling " << child->callee << "\n"; child->errorGiven = true; recursive = true; } } else { child->currentPath = true; stack.push_back(&(*child)); break; } } } if (child == callGraph.end()) { // no more callees, we bottomed out, never look at this node again stack.back()->currentPath = false; stack.back()->visited = true; stack.pop_back(); } } // end while, meaning nothing left to process in this subtree } while (newRoot); // redundant loop check; should always exit via the 'break' above } // // See which functions are reachable from the entry point and which have bodies. // Reachable ones with missing bodies are errors. // Unreachable bodies are dead code. // void TIntermediate::checkCallGraphBodies(TInfoSink& infoSink, bool keepUncalled) { // Clear fields we'll use for this. for (TGraph::iterator call = callGraph.begin(); call != callGraph.end(); ++call) { call->visited = false; call->calleeBodyPosition = -1; } // The top level of the AST includes function definitions (bodies). // Compare these to function calls in the call graph. // We'll end up knowing which have bodies, and if so, // how to map the call-graph node to the location in the AST. TIntermSequence &functionSequence = getTreeRoot()->getAsAggregate()->getSequence(); std::vector reachable(functionSequence.size(), true); // so that non-functions are reachable for (int f = 0; f < (int)functionSequence.size(); ++f) { glslang::TIntermAggregate* node = functionSequence[f]->getAsAggregate(); if (node && (node->getOp() == glslang::EOpFunction)) { if (node->getName().compare(getEntryPointMangledName().c_str()) != 0) reachable[f] = false; // so that function bodies are unreachable, until proven otherwise for (TGraph::iterator call = callGraph.begin(); call != callGraph.end(); ++call) { if (call->callee == node->getName()) call->calleeBodyPosition = f; } } } // Start call-graph traversal by visiting the entry point nodes. for (TGraph::iterator call = callGraph.begin(); call != callGraph.end(); ++call) { if (call->caller.compare(getEntryPointMangledName().c_str()) == 0) call->visited = true; } // Propagate 'visited' through the call-graph to every part of the graph it // can reach (seeded with the entry-point setting above). bool changed; do { changed = false; for (auto call1 = callGraph.begin(); call1 != callGraph.end(); ++call1) { if (call1->visited) { for (TGraph::iterator call2 = callGraph.begin(); call2 != callGraph.end(); ++call2) { if (! call2->visited) { if (call1->callee == call2->caller) { changed = true; call2->visited = true; } } } } } } while (changed); // Any call-graph node set to visited but without a callee body is an error. for (TGraph::iterator call = callGraph.begin(); call != callGraph.end(); ++call) { if (call->visited) { if (call->calleeBodyPosition == -1) { error(infoSink, "No function definition (body) found: "); infoSink.info << " " << call->callee << "\n"; } else reachable[call->calleeBodyPosition] = true; } } // Bodies in the AST not reached by the call graph are dead; // clear them out, since they can't be reached and also can't // be translated further due to possibility of being ill defined. if (! keepUncalled) { for (int f = 0; f < (int)functionSequence.size(); ++f) { if (! reachable[f]) { resetTopLevelUncalledStatus(functionSequence[f]->getAsAggregate()->getName()); functionSequence[f] = nullptr; } } functionSequence.erase(std::remove(functionSequence.begin(), functionSequence.end(), nullptr), functionSequence.end()); } } // // Satisfy rules for location qualifiers on inputs and outputs // void TIntermediate::inOutLocationCheck(TInfoSink& infoSink) { // ES 3.0 requires all outputs to have location qualifiers if there is more than one output bool fragOutWithNoLocation = false; int numFragOut = 0; // TODO: linker functionality: location collision checking TIntermSequence& linkObjects = findLinkerObjects()->getSequence(); for (size_t i = 0; i < linkObjects.size(); ++i) { const TType& type = linkObjects[i]->getAsTyped()->getType(); const TQualifier& qualifier = type.getQualifier(); if (language == EShLangFragment) { if (qualifier.storage == EvqVaryingOut && qualifier.builtIn == EbvNone) { ++numFragOut; if (!qualifier.hasAnyLocation()) fragOutWithNoLocation = true; } } } if (isEsProfile()) { if (numFragOut > 1 && fragOutWithNoLocation) error(infoSink, "when more than one fragment shader output, all must have location qualifiers"); } } TIntermAggregate* TIntermediate::findLinkerObjects() const { // Get the top-level globals TIntermSequence& globals = treeRoot->getAsAggregate()->getSequence(); // Get the last member of the sequences, expected to be the linker-object lists assert(globals.back()->getAsAggregate()->getOp() == EOpLinkerObjects); return globals.back()->getAsAggregate(); } // See if a variable was both a user-declared output and used. // Note: the spec discusses writing to one, but this looks at read or write, which // is more useful, and perhaps the spec should be changed to reflect that. bool TIntermediate::userOutputUsed() const { const TIntermSequence& linkerObjects = findLinkerObjects()->getSequence(); bool found = false; for (size_t i = 0; i < linkerObjects.size(); ++i) { const TIntermSymbol& symbolNode = *linkerObjects[i]->getAsSymbolNode(); if (symbolNode.getQualifier().storage == EvqVaryingOut && symbolNode.getName().compare(0, 3, "gl_") != 0 && inIoAccessed(symbolNode.getName())) { found = true; break; } } return found; } // Accumulate locations used for inputs, outputs, and uniforms, payload, callable data, and tileImageEXT // and check for collisions as the accumulation is done. // // Returns < 0 if no collision, >= 0 if collision and the value returned is a colliding value. // // typeCollision is set to true if there is no direct collision, but the types in the same location // are different. // int TIntermediate::addUsedLocation(EShMessages messages, const TQualifier& qualifier, const TType& type, bool& typeCollision) { typeCollision = false; int set; if (qualifier.isPipeInput()) set = 0; else if (qualifier.isPipeOutput()) set = 1; else if (qualifier.storage == EvqUniform) set = 2; else if (qualifier.storage == EvqBuffer) set = 3; else if (qualifier.storage == EvqTileImageEXT) set = 4; else if (qualifier.isAnyPayload()) set = 0; else if (qualifier.isAnyCallable()) set = 1; else if (qualifier.isHitObjectAttrNV()) set = 2; else return -1; int size; if (qualifier.isAnyPayload() || qualifier.isAnyCallable()) { size = 1; } else if (qualifier.isUniformOrBuffer() || qualifier.isTaskMemory()) { if (type.isSizedArray()) size = type.getCumulativeArraySize(); else size = 1; } else { // Strip off the outer array dimension for those having an extra one. if (type.isArray() && qualifier.isArrayedIo(language)) { TType elementType(type, 0); size = computeTypeLocationSize(elementType, language); } else size = computeTypeLocationSize(type, language); } // Locations, and components within locations. // // Almost always, dealing with components means a single location is involved. // The exception is a dvec3. From the spec: // // "A dvec3 will consume all four components of the first location and components 0 and 1 of // the second location. This leaves components 2 and 3 available for other component-qualified // declarations." // // That means, without ever mentioning a component, a component range // for a different location gets specified, if it's not a vertex shader input. (!) // (A vertex shader input will show using only one location, even for a dvec3/4.) // // So, for the case of dvec3, we need two independent ioRanges. // // For raytracing IO (payloads and callabledata) each declaration occupies a single // slot irrespective of type. int collision = -1; // no collision if (qualifier.isAnyPayload() || qualifier.isAnyCallable() || qualifier.isHitObjectAttrNV()) { TRange range(qualifier.layoutLocation, qualifier.layoutLocation); collision = checkLocationRT(set, qualifier.layoutLocation); if (collision < 0) usedIoRT[set].push_back(range); return collision; } if (size == 2 && type.getBasicType() == EbtDouble && type.getVectorSize() == 3 && (qualifier.isPipeInput() || qualifier.isPipeOutput())) { // Dealing with dvec3 in/out split across two locations. // Need two io-ranges. // The case where the dvec3 doesn't start at component 0 was previously caught as overflow. // First range: TRange locationRange(qualifier.layoutLocation, qualifier.layoutLocation); TRange componentRange(0, 3); TIoRange range(locationRange, componentRange, type.getBasicType(), 0, qualifier.centroid, qualifier.smooth, qualifier.flat, qualifier.sample, qualifier.patch); // check for collisions collision = checkLocationRange(set, range, type, typeCollision); if (collision < 0) { usedIo[set].push_back(range); // Second range: TRange locationRange2(qualifier.layoutLocation + 1, qualifier.layoutLocation + 1); TRange componentRange2(0, 1); TIoRange range2(locationRange2, componentRange2, type.getBasicType(), 0, qualifier.centroid, qualifier.smooth, qualifier.flat, qualifier.sample, qualifier.patch); // check for collisions collision = checkLocationRange(set, range2, type, typeCollision); if (collision < 0) usedIo[set].push_back(range2); } return collision; } // Not a dvec3 in/out split across two locations, generic path. // Need a single IO-range block. TRange locationRange(qualifier.layoutLocation, qualifier.layoutLocation + size - 1); TRange componentRange(0, 3); if (qualifier.hasComponent() || type.getVectorSize() > 0) { int consumedComponents = type.getVectorSize() * (type.getBasicType() == EbtDouble ? 2 : 1); if (qualifier.hasComponent()) componentRange.start = qualifier.layoutComponent; componentRange.last = componentRange.start + consumedComponents - 1; } // combine location and component ranges TBasicType basicTy = type.getBasicType(); if (basicTy == EbtSampler && type.getSampler().isAttachmentEXT()) basicTy = type.getSampler().type; TIoRange range(locationRange, componentRange, basicTy, qualifier.hasIndex() ? qualifier.getIndex() : 0, qualifier.centroid, qualifier.smooth, qualifier.flat, qualifier.sample, qualifier.patch); // check for collisions, except for vertex inputs on desktop targeting OpenGL if (! (!isEsProfile() && language == EShLangVertex && qualifier.isPipeInput()) || spvVersion.vulkan > 0 || (messages & EshMsgOverlappingLocations) != 0) collision = checkLocationRange(set, range, type, typeCollision); if (collision < 0) usedIo[set].push_back(range); return collision; } // Check that two types can be stored in different components in the same location. // They must be the same type, except signed/unsigned integers are considered compatible. static bool checkCompatibleTypes(TBasicType t1, TBasicType t2) { if (t1 != t2) { if ((t1 == EbtInt8 && t2 == EbtUint8) || (t2 == EbtInt8 && t1 == EbtUint8) || (t1 == EbtInt16 && t2 == EbtUint16) || (t2 == EbtInt16 && t1 == EbtUint16)|| (t1 == EbtInt && t2 == EbtUint) || (t2 == EbtInt && t1 == EbtUint)|| (t1 == EbtInt64 && t2 == EbtUint64) || (t2 == EbtInt64 && t1 == EbtUint64)) { return true; } } return t1 == t2; } // Compare a new (the passed in) 'range' against the existing set, and see // if there are any collisions. // // Returns < 0 if no collision, >= 0 if collision and the value returned is a colliding value. // int TIntermediate::checkLocationRange(int set, const TIoRange& range, const TType& type, bool& typeCollision) { for (size_t r = 0; r < usedIo[set].size(); ++r) { if (range.overlap(usedIo[set][r])) { // there is a collision; pick one return std::max(range.location.start, usedIo[set][r].location.start); } else if (range.location.overlap(usedIo[set][r].location) && (!checkCompatibleTypes(type.getBasicType(), usedIo[set][r].basicType) || type.getQualifier().centroid != usedIo[set][r].centroid || type.getQualifier().smooth != usedIo[set][r].smooth || type.getQualifier().flat != usedIo[set][r].flat || type.getQualifier().sample != usedIo[set][r].sample || type.getQualifier().patch != usedIo[set][r].patch)) { // aliased-type mismatch typeCollision = true; return std::max(range.location.start, usedIo[set][r].location.start); } } // check typeCollision between tileImageEXT and out if (set == 4 || set == 1) { // if the set is "tileImageEXT", check against "out" and vice versa int againstSet = (set == 4) ? 1 : 4; for (size_t r = 0; r < usedIo[againstSet].size(); ++r) { if (range.location.overlap(usedIo[againstSet][r].location) && type.getBasicType() != usedIo[againstSet][r].basicType) { // aliased-type mismatch typeCollision = true; return std::max(range.location.start, usedIo[againstSet][r].location.start); } } } return -1; // no collision } int TIntermediate::checkLocationRT(int set, int location) { TRange range(location, location); for (size_t r = 0; r < usedIoRT[set].size(); ++r) { if (range.overlap(usedIoRT[set][r])) { return range.start; } } return -1; // no collision } // Accumulate bindings and offsets, and check for collisions // as the accumulation is done. // // Returns < 0 if no collision, >= 0 if collision and the value returned is a colliding value. // int TIntermediate::addUsedOffsets(int binding, int offset, int numOffsets) { TRange bindingRange(binding, binding); TRange offsetRange(offset, offset + numOffsets - 1); TOffsetRange range(bindingRange, offsetRange); // check for collisions, except for vertex inputs on desktop for (size_t r = 0; r < usedAtomics.size(); ++r) { if (range.overlap(usedAtomics[r])) { // there is a collision; pick one return std::max(offset, usedAtomics[r].offset.start); } } usedAtomics.push_back(range); return -1; // no collision } // Accumulate used constant_id values. // // Return false is one was already used. bool TIntermediate::addUsedConstantId(int id) { if (usedConstantId.find(id) != usedConstantId.end()) return false; usedConstantId.insert(id); return true; } // Recursively figure out how many locations are used up by an input or output type. // Return the size of type, as measured by "locations". int TIntermediate::computeTypeLocationSize(const TType& type, EShLanguage stage) { // "If the declared input is an array of size n and each element takes m locations, it will be assigned m * n // consecutive locations..." if (type.isArray()) { // TODO: perf: this can be flattened by using getCumulativeArraySize(), and a deref that discards all arrayness // TODO: are there valid cases of having an unsized array with a location? If so, running this code too early. TType elementType(type, 0); if (type.isSizedArray() && !type.getQualifier().isPerView()) return type.getOuterArraySize() * computeTypeLocationSize(elementType, stage); else { // unset perViewNV attributes for arrayed per-view outputs: "perviewNV vec4 v[MAX_VIEWS][3];" elementType.getQualifier().perViewNV = false; return computeTypeLocationSize(elementType, stage); } } // "The locations consumed by block and structure members are determined by applying the rules above // recursively..." if (type.isStruct()) { int size = 0; for (int member = 0; member < (int)type.getStruct()->size(); ++member) { TType memberType(type, member); size += computeTypeLocationSize(memberType, stage); } return size; } // ES: "If a shader input is any scalar or vector type, it will consume a single location." // Desktop: "If a vertex shader input is any scalar or vector type, it will consume a single location. If a non-vertex // shader input is a scalar or vector type other than dvec3 or dvec4, it will consume a single location, while // types dvec3 or dvec4 will consume two consecutive locations. Inputs of type double and dvec2 will // consume only a single location, in all stages." if (type.isScalar()) return 1; if (type.isVector()) { if (stage == EShLangVertex && type.getQualifier().isPipeInput()) return 1; if (type.getBasicType() == EbtDouble && type.getVectorSize() > 2) return 2; else return 1; } // "If the declared input is an n x m single- or double-precision matrix, ... // The number of locations assigned for each matrix will be the same as // for an n-element array of m-component vectors..." if (type.isMatrix()) { TType columnType(type, 0); return type.getMatrixCols() * computeTypeLocationSize(columnType, stage); } assert(0); return 1; } // Same as computeTypeLocationSize but for uniforms int TIntermediate::computeTypeUniformLocationSize(const TType& type) { // "Individual elements of a uniform array are assigned // consecutive locations with the first element taking location // location." if (type.isArray()) { // TODO: perf: this can be flattened by using getCumulativeArraySize(), and a deref that discards all arrayness TType elementType(type, 0); if (type.isSizedArray()) { return type.getOuterArraySize() * computeTypeUniformLocationSize(elementType); } else { // TODO: are there valid cases of having an implicitly-sized array with a location? If so, running this code too early. return computeTypeUniformLocationSize(elementType); } } // "Each subsequent inner-most member or element gets incremental // locations for the entire structure or array." if (type.isStruct()) { int size = 0; for (int member = 0; member < (int)type.getStruct()->size(); ++member) { TType memberType(type, member); size += computeTypeUniformLocationSize(memberType); } return size; } return 1; } // Accumulate xfb buffer ranges and check for collisions as the accumulation is done. // // Returns < 0 if no collision, >= 0 if collision and the value returned is a colliding value. // int TIntermediate::addXfbBufferOffset(const TType& type) { const TQualifier& qualifier = type.getQualifier(); assert(qualifier.hasXfbOffset() && qualifier.hasXfbBuffer()); TXfbBuffer& buffer = xfbBuffers[qualifier.layoutXfbBuffer]; // compute the range unsigned int size = computeTypeXfbSize(type, buffer.contains64BitType, buffer.contains32BitType, buffer.contains16BitType); buffer.implicitStride = std::max(buffer.implicitStride, qualifier.layoutXfbOffset + size); TRange range(qualifier.layoutXfbOffset, qualifier.layoutXfbOffset + size - 1); // check for collisions for (size_t r = 0; r < buffer.ranges.size(); ++r) { if (range.overlap(buffer.ranges[r])) { // there is a collision; pick an example to return return std::max(range.start, buffer.ranges[r].start); } } buffer.ranges.push_back(range); return -1; // no collision } // Recursively figure out how many bytes of xfb buffer are used by the given type. // Return the size of type, in bytes. // Sets contains64BitType to true if the type contains a 64-bit data type. // Sets contains32BitType to true if the type contains a 32-bit data type. // Sets contains16BitType to true if the type contains a 16-bit data type. // N.B. Caller must set contains64BitType, contains32BitType, and contains16BitType to false before calling. unsigned int TIntermediate::computeTypeXfbSize(const TType& type, bool& contains64BitType, bool& contains32BitType, bool& contains16BitType) const { // "...if applied to an aggregate containing a double or 64-bit integer, the offset must also be a multiple of 8, // and the space taken in the buffer will be a multiple of 8. // ...within the qualified entity, subsequent components are each // assigned, in order, to the next available offset aligned to a multiple of // that component's size. Aggregate types are flattened down to the component // level to get this sequence of components." if (type.isSizedArray()) { // TODO: perf: this can be flattened by using getCumulativeArraySize(), and a deref that discards all arrayness // Unsized array use to xfb should be a compile error. TType elementType(type, 0); return type.getOuterArraySize() * computeTypeXfbSize(elementType, contains64BitType, contains16BitType, contains16BitType); } if (type.isStruct()) { unsigned int size = 0; bool structContains64BitType = false; bool structContains32BitType = false; bool structContains16BitType = false; for (int member = 0; member < (int)type.getStruct()->size(); ++member) { TType memberType(type, member); // "... if applied to // an aggregate containing a double or 64-bit integer, the offset must also be a multiple of 8, // and the space taken in the buffer will be a multiple of 8." bool memberContains64BitType = false; bool memberContains32BitType = false; bool memberContains16BitType = false; int memberSize = computeTypeXfbSize(memberType, memberContains64BitType, memberContains32BitType, memberContains16BitType); if (memberContains64BitType) { structContains64BitType = true; RoundToPow2(size, 8); } else if (memberContains32BitType) { structContains32BitType = true; RoundToPow2(size, 4); } else if (memberContains16BitType) { structContains16BitType = true; RoundToPow2(size, 2); } size += memberSize; } if (structContains64BitType) { contains64BitType = true; RoundToPow2(size, 8); } else if (structContains32BitType) { contains32BitType = true; RoundToPow2(size, 4); } else if (structContains16BitType) { contains16BitType = true; RoundToPow2(size, 2); } return size; } int numComponents {0}; if (type.isScalar()) numComponents = 1; else if (type.isVector()) numComponents = type.getVectorSize(); else if (type.isMatrix()) numComponents = type.getMatrixCols() * type.getMatrixRows(); else { assert(0); numComponents = 1; } if (type.getBasicType() == EbtDouble || type.getBasicType() == EbtInt64 || type.getBasicType() == EbtUint64) { contains64BitType = true; return 8 * numComponents; } else if (type.getBasicType() == EbtFloat16 || type.getBasicType() == EbtInt16 || type.getBasicType() == EbtUint16) { contains16BitType = true; return 2 * numComponents; } else if (type.getBasicType() == EbtInt8 || type.getBasicType() == EbtUint8) return numComponents; else { contains32BitType = true; return 4 * numComponents; } } const int baseAlignmentVec4Std140 = 16; // Return the size and alignment of a component of the given type. // The size is returned in the 'size' parameter // Return value is the alignment.. int TIntermediate::getBaseAlignmentScalar(const TType& type, int& size) { switch (type.getBasicType()) { case EbtInt64: case EbtUint64: case EbtDouble: size = 8; return 8; case EbtFloat16: size = 2; return 2; case EbtBFloat16: size = 2; return 2; case EbtFloatE5M2: case EbtFloatE4M3: case EbtInt8: case EbtUint8: size = 1; return 1; case EbtInt16: case EbtUint16: size = 2; return 2; case EbtReference: size = 8; return 8; case EbtSampler: { if (type.isBindlessImage() || type.isBindlessTexture()) { size = 8; return 8; } else { size = 4; return 4; } } default: size = 4; return 4; } } // Implement base-alignment and size rules from section 7.6.2.2 Standard Uniform Block Layout // Operates recursively. // // If std140 is true, it does the rounding up to vec4 size required by std140, // otherwise it does not, yielding std430 rules. // // The size is returned in the 'size' parameter // // The stride is only non-0 for arrays or matrices, and is the stride of the // top-level object nested within the type. E.g., for an array of matrices, // it is the distances needed between matrices, despite the rules saying the // stride comes from the flattening down to vectors. // // Return value is the alignment of the type. int TIntermediate::getBaseAlignment(const TType& type, int& size, int& stride, TLayoutPacking layoutPacking, bool rowMajor) { int alignment; bool std140 = layoutPacking == glslang::ElpStd140; // When using the std140 storage layout, structures will be laid out in buffer // storage with its members stored in monotonically increasing order based on their // location in the declaration. A structure and each structure member have a base // offset and a base alignment, from which an aligned offset is computed by rounding // the base offset up to a multiple of the base alignment. The base offset of the first // member of a structure is taken from the aligned offset of the structure itself. The // base offset of all other structure members is derived by taking the offset of the // last basic machine unit consumed by the previous member and adding one. Each // structure member is stored in memory at its aligned offset. The members of a top- // level uniform block are laid out in buffer storage by treating the uniform block as // a structure with a base offset of zero. // // 1. If the member is a scalar consuming N basic machine units, the base alignment is N. // // 2. If the member is a two- or four-component vector with components consuming N basic // machine units, the base alignment is 2N or 4N, respectively. // // 3. If the member is a three-component vector with components consuming N // basic machine units, the base alignment is 4N. // // 4. If the member is an array of scalars or vectors, the base alignment and array // stride are set to match the base alignment of a single array element, according // to rules (1), (2), and (3), and rounded up to the base alignment of a vec4. The // array may have padding at the end; the base offset of the member following // the array is rounded up to the next multiple of the base alignment. // // 5. If the member is a column-major matrix with C columns and R rows, the // matrix is stored identically to an array of C column vectors with R // components each, according to rule (4). // // 6. If the member is an array of S column-major matrices with C columns and // R rows, the matrix is stored identically to a row of S X C column vectors // with R components each, according to rule (4). // // 7. If the member is a row-major matrix with C columns and R rows, the matrix // is stored identically to an array of R row vectors with C components each, // according to rule (4). // // 8. If the member is an array of S row-major matrices with C columns and R // rows, the matrix is stored identically to a row of S X R row vectors with C // components each, according to rule (4). // // 9. If the member is a structure, the base alignment of the structure is N , where // N is the largest base alignment value of any of its members, and rounded // up to the base alignment of a vec4. The individual members of this substructure // are then assigned offsets by applying this set of rules recursively, // where the base offset of the first member of the sub-structure is equal to the // aligned offset of the structure. The structure may have padding at the end; // the base offset of the member following the sub-structure is rounded up to // the next multiple of the base alignment of the structure. // // 10. If the member is an array of S structures, the S elements of the array are laid // out in order, according to rule (9). // // Assuming, for rule 10: The stride is the same as the size of an element. stride = 0; int dummyStride; // rules 4, 6, 8, and 10 if (type.isArray()) { // TODO: perf: this might be flattened by using getCumulativeArraySize(), and a deref that discards all arrayness TType derefType(type, 0); alignment = getBaseAlignment(derefType, size, dummyStride, layoutPacking, rowMajor); if (std140) alignment = std::max(baseAlignmentVec4Std140, alignment); RoundToPow2(size, alignment); stride = size; // uses full matrix size for stride of an array of matrices (not quite what rule 6/8, but what's expected) // uses the assumption for rule 10 in the comment above // use one element to represent the last member of SSBO which is unsized array int arraySize = (type.isUnsizedArray() && (type.getOuterArraySize() == 0)) ? 1 : type.getOuterArraySize(); size = stride * arraySize; return alignment; } // rule 9 if (type.getBasicType() == EbtStruct || type.getBasicType() == EbtBlock) { const TTypeList& memberList = *type.getStruct(); size = 0; int maxAlignment = std140 ? baseAlignmentVec4Std140 : 0; for (size_t m = 0; m < memberList.size(); ++m) { int memberSize; // modify just the children's view of matrix layout, if there is one for this member TLayoutMatrix subMatrixLayout = memberList[m].type->getQualifier().layoutMatrix; int memberAlignment = getBaseAlignment(*memberList[m].type, memberSize, dummyStride, layoutPacking, (subMatrixLayout != ElmNone) ? (subMatrixLayout == ElmRowMajor) : rowMajor); maxAlignment = std::max(maxAlignment, memberAlignment); RoundToPow2(size, memberAlignment); size += memberSize; } // The structure may have padding at the end; the base offset of // the member following the sub-structure is rounded up to the next // multiple of the base alignment of the structure. RoundToPow2(size, maxAlignment); return maxAlignment; } // rule 1 if (type.isScalar()) return getBaseAlignmentScalar(type, size); // rules 2 and 3 if (type.isVector()) { int scalarAlign = getBaseAlignmentScalar(type, size); switch (type.getVectorSize()) { case 1: // HLSL has this, GLSL does not return scalarAlign; case 2: size *= 2; return 2 * scalarAlign; default: size *= type.getVectorSize(); return 4 * scalarAlign; } } // rules 5 and 7 if (type.isMatrix()) { // rule 5: deref to row, not to column, meaning the size of vector is num columns instead of num rows TType derefType(type, 0, rowMajor); alignment = getBaseAlignment(derefType, size, dummyStride, layoutPacking, rowMajor); if (std140) alignment = std::max(baseAlignmentVec4Std140, alignment); RoundToPow2(size, alignment); stride = size; // use intra-matrix stride for stride of a just a matrix if (rowMajor) size = stride * type.getMatrixRows(); else size = stride * type.getMatrixCols(); return alignment; } assert(0); // all cases should be covered above size = baseAlignmentVec4Std140; return baseAlignmentVec4Std140; } // To aid the basic HLSL rule about crossing vec4 boundaries. bool TIntermediate::improperStraddle(const TType& type, int size, int offset, bool vectorLike) { if (! vectorLike || type.isArray()) return false; return size <= 16 ? offset / 16 != (offset + size - 1) / 16 : offset % 16 != 0; } int TIntermediate::getScalarAlignment(const TType& type, int& size, int& stride, bool rowMajor) { int alignment; stride = 0; int dummyStride; if (type.isArray()) { TType derefType(type, 0); alignment = getScalarAlignment(derefType, size, dummyStride, rowMajor); stride = size; RoundToPow2(stride, alignment); size = stride * (type.getOuterArraySize() - 1) + size; return alignment; } if (type.getBasicType() == EbtStruct) { const TTypeList& memberList = *type.getStruct(); size = 0; int maxAlignment = 0; for (size_t m = 0; m < memberList.size(); ++m) { int memberSize; // modify just the children's view of matrix layout, if there is one for this member TLayoutMatrix subMatrixLayout = memberList[m].type->getQualifier().layoutMatrix; int memberAlignment = getScalarAlignment(*memberList[m].type, memberSize, dummyStride, (subMatrixLayout != ElmNone) ? (subMatrixLayout == ElmRowMajor) : rowMajor); maxAlignment = std::max(maxAlignment, memberAlignment); RoundToPow2(size, memberAlignment); size += memberSize; } return maxAlignment; } if (type.isScalar()) return getBaseAlignmentScalar(type, size); if (type.isVector()) { int scalarAlign = getBaseAlignmentScalar(type, size); size *= type.getVectorSize(); return scalarAlign; } if (type.isMatrix()) { TType derefType(type, 0, rowMajor); alignment = getScalarAlignment(derefType, size, dummyStride, rowMajor); stride = size; // use intra-matrix stride for stride of a just a matrix if (rowMajor) size = stride * type.getMatrixRows(); else size = stride * type.getMatrixCols(); return alignment; } assert(0); // all cases should be covered above size = 1; return 1; } int TIntermediate::getMemberAlignment(const TType& type, int& size, int& stride, TLayoutPacking layoutPacking, bool rowMajor) { if (layoutPacking == glslang::ElpScalar) { return getScalarAlignment(type, size, stride, rowMajor); } else { return getBaseAlignment(type, size, stride, layoutPacking, rowMajor); } } // shared calculation by getOffset and getOffsets void TIntermediate::updateOffset(const TType& parentType, const TType& memberType, int& offset, int& memberSize) { int dummyStride; // modify just the children's view of matrix layout, if there is one for this member TLayoutMatrix subMatrixLayout = memberType.getQualifier().layoutMatrix; int memberAlignment = getMemberAlignment(memberType, memberSize, dummyStride, parentType.getQualifier().layoutPacking, subMatrixLayout != ElmNone ? subMatrixLayout == ElmRowMajor : parentType.getQualifier().layoutMatrix == ElmRowMajor); RoundToPow2(offset, memberAlignment); } // Lookup or calculate the offset of a block member, using the recursively // defined block offset rules. int TIntermediate::getOffset(const TType& type, int index) { const TTypeList& memberList = *type.getStruct(); // Don't calculate offset if one is present, it could be user supplied // and different than what would be calculated. That is, this is faster, // but not just an optimization. if (memberList[index].type->getQualifier().hasOffset()) return memberList[index].type->getQualifier().layoutOffset; int memberSize = 0; int offset = 0; for (int m = 0; m <= index; ++m) { updateOffset(type, *memberList[m].type, offset, memberSize); if (m < index) offset += memberSize; } return offset; } // Calculate the block data size. // Block arrayness is not taken into account, each element is backed by a separate buffer. int TIntermediate::getBlockSize(const TType& blockType) { const TTypeList& memberList = *blockType.getStruct(); int lastIndex = (int)memberList.size() - 1; int lastOffset = getOffset(blockType, lastIndex); int lastMemberSize; int dummyStride; getMemberAlignment(*memberList[lastIndex].type, lastMemberSize, dummyStride, blockType.getQualifier().layoutPacking, blockType.getQualifier().layoutMatrix == ElmRowMajor); return lastOffset + lastMemberSize; } int TIntermediate::computeBufferReferenceTypeSize(const TType& type) { assert(type.isReference()); int size = getBlockSize(*type.getReferentType()); int align = type.getBufferReferenceAlignment(); if (align) { size = (size + align - 1) & ~(align-1); } return size; } bool TIntermediate::isIoResizeArray(const TType& type, EShLanguage language) { return type.isArray() && ((language == EShLangGeometry && type.getQualifier().storage == EvqVaryingIn) || (language == EShLangTessControl && (type.getQualifier().storage == EvqVaryingIn || type.getQualifier().storage == EvqVaryingOut) && ! type.getQualifier().patch) || (language == EShLangTessEvaluation && type.getQualifier().storage == EvqVaryingIn) || (language == EShLangFragment && type.getQualifier().storage == EvqVaryingIn && (type.getQualifier().pervertexNV || type.getQualifier().pervertexEXT)) || (language == EShLangMesh && type.getQualifier().storage == EvqVaryingOut && !type.getQualifier().perTaskNV)); } } // end namespace glslang ================================================ FILE: src/libraries/glslang/glslang/MachineIndependent/localintermediate.h ================================================ // // Copyright (C) 2002-2005 3Dlabs Inc. Ltd. // Copyright (C) 2016 LunarG, Inc. // Copyright (C) 2017 ARM Limited. // Copyright (C) 2015-2018 Google, Inc. // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following // disclaimer in the documentation and/or other materials provided // with the distribution. // // Neither the name of 3Dlabs Inc. Ltd. nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // #ifndef _LOCAL_INTERMEDIATE_INCLUDED_ #define _LOCAL_INTERMEDIATE_INCLUDED_ #include "../Include/intermediate.h" #include "../Public/ShaderLang.h" #include "Versions.h" #include #include #include #include #include #include class TInfoSink; namespace glslang { struct TMatrixSelector { int coord1; // stay agnostic about column/row; this is parse order int coord2; }; typedef int TVectorSelector; const int MaxSwizzleSelectors = 4; template class TSwizzleSelectors { public: TSwizzleSelectors() : size_(0) { } void push_back(selectorType comp) { if (size_ < MaxSwizzleSelectors) components[size_++] = comp; } void resize(int s) { assert(s <= size_); size_ = s; } int size() const { return size_; } selectorType operator[](int i) const { assert(i < MaxSwizzleSelectors); return components[i]; } private: int size_; selectorType components[MaxSwizzleSelectors]; }; // // Some helper structures for TIntermediate. Their contents are encapsulated // by TIntermediate. // // Used for call-graph algorithms for detecting recursion, missing bodies, and dead bodies. // A "call" is a pair: . // There can be duplicates. General assumption is the list is small. struct TCall { TCall(const TString& pCaller, const TString& pCallee) : caller(pCaller), callee(pCallee), visited(false), currentPath(false), errorGiven(false) { } TString caller; TString callee; bool visited; bool currentPath; bool errorGiven; int calleeBodyPosition; }; // A generic 1-D range. struct TRange { TRange(int start, int last) : start(start), last(last) { } bool overlap(const TRange& rhs) const { return last >= rhs.start && start <= rhs.last; } int start; int last; }; // An IO range is a 3-D rectangle; the set of (location, component, index) triples all lying // within the same location range, component range, and index value. Locations don't alias unless // all other dimensions of their range overlap. struct TIoRange { TIoRange(TRange location, TRange component, TBasicType basicType, int index, bool centroid, bool smooth, bool flat, bool sample, bool patch) : location(location), component(component), basicType(basicType), index(index), centroid(centroid), smooth(smooth), flat(flat), sample(sample), patch(patch) { } bool overlap(const TIoRange& rhs) const { return location.overlap(rhs.location) && component.overlap(rhs.component) && index == rhs.index; } TRange location; TRange component; TBasicType basicType; int index; bool centroid; bool smooth; bool flat; bool sample; bool patch; }; // An offset range is a 2-D rectangle; the set of (binding, offset) pairs all lying // within the same binding and offset range. struct TOffsetRange { TOffsetRange(TRange binding, TRange offset) : binding(binding), offset(offset) { } bool overlap(const TOffsetRange& rhs) const { return binding.overlap(rhs.binding) && offset.overlap(rhs.offset); } TRange binding; TRange offset; }; // Things that need to be tracked per xfb buffer. struct TXfbBuffer { TXfbBuffer() : stride(TQualifier::layoutXfbStrideEnd), implicitStride(0), contains64BitType(false), contains32BitType(false), contains16BitType(false) { } std::vector ranges; // byte offsets that have already been assigned unsigned int stride; unsigned int implicitStride; bool contains64BitType; bool contains32BitType; bool contains16BitType; }; // Track a set of strings describing how the module was processed. // This includes command line options, transforms, etc., ideally inclusive enough // to reproduce the steps used to transform the input source to the output. // E.g., see SPIR-V OpModuleProcessed. // Each "process" or "transform" uses is expressed in the form: // process arg0 arg1 arg2 ... // process arg0 arg1 arg2 ... // where everything is textual, and there can be zero or more arguments class TProcesses { public: TProcesses() {} ~TProcesses() {} void addProcess(const char* process) { processes.push_back(process); } void addProcess(const std::string& process) { processes.push_back(process); } void addArgument(int arg) { processes.back().append(" "); std::string argString = std::to_string(arg); processes.back().append(argString); } void addArgument(const char* arg) { processes.back().append(" "); processes.back().append(arg); } void addArgument(const std::string& arg) { processes.back().append(" "); processes.back().append(arg); } void addIfNonZero(const char* process, int value) { if (value != 0) { addProcess(process); addArgument(value); } } const std::vector& getProcesses() const { return processes; } private: std::vector processes; }; class TSymbolTable; class TSymbol; class TVariable; // // Texture and Sampler transformation mode. // enum ComputeDerivativeMode { LayoutDerivativeNone, // default layout as SPV_NV_compute_shader_derivatives not enabled LayoutDerivativeGroupQuads, // derivative_group_quadsNV LayoutDerivativeGroupLinear, // derivative_group_linearNV }; // // Status type on AST level. Some uncalled status or functions would be reset in call graph. // Currently we will keep status set by explicitly declared layout or variable decl. // enum AstRefType { AstRefTypeVar, // Status set by variable decl AstRefTypeFunc, // Status set by function decl AstRefTypeLayout, // Status set by layout decl }; class TIdMaps { public: TMap& operator[](long long i) { return maps[i]; } const TMap& operator[](long long i) const { return maps[i]; } private: TMap maps[EsiCount]; }; class TNumericFeatures { public: TNumericFeatures() : features(0) { } TNumericFeatures(const TNumericFeatures&) = delete; TNumericFeatures& operator=(const TNumericFeatures&) = delete; typedef enum : unsigned int { shader_explicit_arithmetic_types = 1 << 0, shader_explicit_arithmetic_types_int8 = 1 << 1, shader_explicit_arithmetic_types_int16 = 1 << 2, shader_explicit_arithmetic_types_int32 = 1 << 3, shader_explicit_arithmetic_types_int64 = 1 << 4, shader_explicit_arithmetic_types_float16 = 1 << 5, shader_explicit_arithmetic_types_float32 = 1 << 6, shader_explicit_arithmetic_types_float64 = 1 << 7, shader_implicit_conversions = 1 << 8, gpu_shader_fp64 = 1 << 9, gpu_shader_int16 = 1 << 10, gpu_shader_half_float = 1 << 11, nv_gpu_shader5_types = 1 << 12, } feature; void insert(feature f) { features |= f; } void erase(feature f) { features &= ~f; } bool contains(feature f) const { return (features & f) != 0; } private: unsigned int features; }; // MustBeAssigned wraps a T, asserting that it has been assigned with // operator =() before attempting to read with operator T() or operator ->(). // Used to catch cases where fields are read before they have been assigned. template class MustBeAssigned { public: MustBeAssigned() = default; MustBeAssigned(const T& v) : value(v) {} operator const T&() const { assert(isSet); return value; } const T* operator ->() const { assert(isSet); return &value; } MustBeAssigned& operator = (const T& v) { value = v; isSet = true; return *this; } private: T value; bool isSet = false; }; // // Set of helper functions to help parse and build the tree. // class TIntermediate { public: explicit TIntermediate(EShLanguage l, int v = 0, EProfile p = ENoProfile) : language(l), profile(p), version(v), treeRoot(nullptr), resources(TBuiltInResource{}), numEntryPoints(0), numErrors(0), numPushConstants(0), recursive(false), invertY(false), dxPositionW(false), enhancedMsgs(false), debugInfo(false), useStorageBuffer(false), invariantAll(false), nanMinMaxClamp(false), depthReplacing(false), stencilReplacing(false), uniqueId(0), globalUniformBlockName(""), atomicCounterBlockName(""), globalUniformBlockSet(TQualifier::layoutSetEnd), globalUniformBlockBinding(TQualifier::layoutBindingEnd), atomicCounterBlockSet(TQualifier::layoutSetEnd), implicitThisName("@this"), implicitCounterName("@count"), source(EShSourceNone), useVulkanMemoryModel(false), invocations(TQualifier::layoutNotSet), vertices(TQualifier::layoutNotSet), inputPrimitive(ElgNone), outputPrimitive(ElgNone), pixelCenterInteger(false), originUpperLeft(false),texCoordBuiltinRedeclared(false), vertexSpacing(EvsNone), vertexOrder(EvoNone), interlockOrdering(EioNone), pointMode(false), earlyFragmentTests(false), postDepthCoverage(false), earlyAndLateFragmentTestsAMD(false), nonCoherentColorAttachmentReadEXT(false), nonCoherentDepthAttachmentReadEXT(false), nonCoherentStencilAttachmentReadEXT(false), depthLayout(EldNone), stencilLayout(ElsNone), hlslFunctionality1(false), blendEquations(0), xfbMode(false), multiStream(false), layoutOverrideCoverage(false), geoPassthroughEXT(false), numShaderRecordBlocks(0), computeDerivativeMode(LayoutDerivativeNone), primitives(TQualifier::layoutNotSet), numTaskNVBlocks(0), layoutPrimitiveCulling(false), numTaskEXTPayloads(0), nonCoherentTileAttachmentReadQCOM(false), autoMapBindings(false), autoMapLocations(false), flattenUniformArrays(false), useUnknownFormat(false), hlslOffsets(false), hlslIoMapping(false), useVariablePointers(false), textureSamplerTransformMode(EShTexSampTransKeep), needToLegalize(false), binaryDoubleOutput(false), subgroupUniformControlFlow(false), maximallyReconverges(false), usePhysicalStorageBuffer(false), spirvRequirement(nullptr), spirvExecutionMode(nullptr), uniformLocationBase(0), quadDerivMode(false), reqFullQuadsMode(false) { localSize[0] = 1; localSize[1] = 1; localSize[2] = 1; localSizeNotDefault[0] = false; localSizeNotDefault[1] = false; localSizeNotDefault[2] = false; localSizeSpecId[0] = TQualifier::layoutNotSet; localSizeSpecId[1] = TQualifier::layoutNotSet; localSizeSpecId[2] = TQualifier::layoutNotSet; xfbBuffers.resize(TQualifier::layoutXfbBufferEnd); tileShadingRateQCOM[0] = 0; tileShadingRateQCOM[1] = 0; tileShadingRateQCOM[2] = 0; tileShadingRateQCOMNotDefault[0] = false; tileShadingRateQCOMNotDefault[1] = false; tileShadingRateQCOMNotDefault[2] = false; shiftBinding.fill(0); } void setVersion(int v) { version = v; } void setProfile(EProfile p) { profile = p; } int getVersion() const { return version; } EProfile getProfile() const { return profile; } void setSpv(const SpvVersion& s) { spvVersion = s; // client processes if (spvVersion.vulkan > 0) processes.addProcess("client vulkan100"); if (spvVersion.openGl > 0) processes.addProcess("client opengl100"); // target SPV switch (spvVersion.spv) { case 0: break; case EShTargetSpv_1_0: break; case EShTargetSpv_1_1: processes.addProcess("target-env spirv1.1"); break; case EShTargetSpv_1_2: processes.addProcess("target-env spirv1.2"); break; case EShTargetSpv_1_3: processes.addProcess("target-env spirv1.3"); break; case EShTargetSpv_1_4: processes.addProcess("target-env spirv1.4"); break; case EShTargetSpv_1_5: processes.addProcess("target-env spirv1.5"); break; case EShTargetSpv_1_6: processes.addProcess("target-env spirv1.6"); break; default: processes.addProcess("target-env spirvUnknown"); break; } // target-environment processes switch (spvVersion.vulkan) { case 0: break; case EShTargetVulkan_1_0: processes.addProcess("target-env vulkan1.0"); break; case EShTargetVulkan_1_1: processes.addProcess("target-env vulkan1.1"); break; case EShTargetVulkan_1_2: processes.addProcess("target-env vulkan1.2"); break; case EShTargetVulkan_1_3: processes.addProcess("target-env vulkan1.3"); break; case EShTargetVulkan_1_4: processes.addProcess("target-env vulkan1.4"); break; default: processes.addProcess("target-env vulkanUnknown"); break; } if (spvVersion.openGl > 0) processes.addProcess("target-env opengl"); } const SpvVersion& getSpv() const { return spvVersion; } EShLanguage getStage() const { return language; } void addRequestedExtension(const char* extension) { requestedExtensions.insert(extension); } const std::set& getRequestedExtensions() const { return requestedExtensions; } bool isRayTracingStage() const { return language >= EShLangRayGen && language <= EShLangCallableNV; } void setTreeRoot(TIntermNode* r) { treeRoot = r; } TIntermNode* getTreeRoot() const { return treeRoot; } void incrementEntryPointCount() { ++numEntryPoints; } int getNumEntryPoints() const { return numEntryPoints; } int getNumErrors() const { return numErrors; } void addPushConstantCount() { ++numPushConstants; } void setLimits(const TBuiltInResource& r) { resources = r; } const TBuiltInResource& getLimits() const { return resources; } bool postProcess(TIntermNode*, EShLanguage); void removeTree(); void setEntryPointName(const char* ep) { entryPointName = ep; processes.addProcess("entry-point"); processes.addArgument(entryPointName); } void setEntryPointMangledName(const char* ep) { entryPointMangledName = ep; } const std::string& getEntryPointName() const { return entryPointName; } const std::string& getEntryPointMangledName() const { return entryPointMangledName; } void setDebugInfo(bool debuginfo) { debugInfo = debuginfo; } bool getDebugInfo() const { return debugInfo; } void setInvertY(bool invert) { invertY = invert; if (invertY) processes.addProcess("invert-y"); } bool getInvertY() const { return invertY; } void setDxPositionW(bool dxPosW) { dxPositionW = dxPosW; if (dxPositionW) processes.addProcess("dx-position-w"); } bool getDxPositionW() const { return dxPositionW; } void setEnhancedMsgs() { enhancedMsgs = true; } bool getEnhancedMsgs() const { return enhancedMsgs && getSource() == EShSourceGlsl; } #ifdef ENABLE_HLSL void setSource(EShSource s) { source = s; } EShSource getSource() const { return source; } #else void setSource(EShSource s) { assert(s == EShSourceGlsl); (void)s; } EShSource getSource() const { return EShSourceGlsl; } #endif bool isRecursive() const { return recursive; } TIntermSymbol* addSymbol(const TVariable&); TIntermSymbol* addSymbol(const TVariable&, const TSourceLoc&); TIntermSymbol* addSymbol(const TType&, const TSourceLoc&); TIntermSymbol* addSymbol(const TIntermSymbol&); TIntermTyped* addConversion(TOperator, const TType&, TIntermTyped*); std::tuple addPairConversion(TOperator op, TIntermTyped* node0, TIntermTyped* node1); TIntermTyped* addUniShapeConversion(TOperator, const TType&, TIntermTyped*); TIntermTyped* addConversion(TBasicType convertTo, TIntermTyped* node) const; void addBiShapeConversion(TOperator, TIntermTyped*& lhsNode, TIntermTyped*& rhsNode); TIntermTyped* addShapeConversion(const TType&, TIntermTyped*); TIntermTyped* addBinaryMath(TOperator, TIntermTyped* left, TIntermTyped* right, const TSourceLoc&); TIntermTyped* addAssign(TOperator op, TIntermTyped* left, TIntermTyped* right, const TSourceLoc&); TIntermTyped* addIndex(TOperator op, TIntermTyped* base, TIntermTyped* index, const TSourceLoc&); TIntermTyped* addUnaryMath(TOperator, TIntermTyped* child, const TSourceLoc&); TIntermTyped* addBuiltInFunctionCall(const TSourceLoc& line, TOperator, bool unary, TIntermNode*, const TType& returnType); bool canImplicitlyPromote(TBasicType from, TBasicType to, TOperator op = EOpNull) const; bool isIntegralPromotion(TBasicType from, TBasicType to) const; bool isFPPromotion(TBasicType from, TBasicType to) const; bool isIntegralConversion(TBasicType from, TBasicType to) const; bool isFPConversion(TBasicType from, TBasicType to) const; bool isFPIntegralConversion(TBasicType from, TBasicType to) const; TOperator mapTypeToConstructorOp(const TType&) const; TIntermAggregate* growAggregate(TIntermNode* left, TIntermNode* right); TIntermAggregate* growAggregate(TIntermNode* left, TIntermNode* right, const TSourceLoc&); TIntermAggregate* mergeAggregate(TIntermNode* left, TIntermNode* right); TIntermAggregate* mergeAggregate(TIntermNode* left, TIntermNode* right, const TSourceLoc&); TIntermAggregate* makeAggregate(TIntermNode* node); TIntermAggregate* makeAggregate(TIntermNode* node, const TSourceLoc&); TIntermAggregate* makeAggregate(const TSourceLoc&); TIntermTyped* setAggregateOperator(TIntermNode*, TOperator, const TType& type, const TSourceLoc&); bool areAllChildConst(TIntermAggregate* aggrNode); TIntermSelection* addSelection(TIntermTyped* cond, TIntermNodePair code, const TSourceLoc&); TIntermTyped* addSelection(TIntermTyped* cond, TIntermTyped* trueBlock, TIntermTyped* falseBlock, const TSourceLoc&); TIntermTyped* addComma(TIntermTyped* left, TIntermTyped* right, const TSourceLoc&); TIntermTyped* addMethod(TIntermTyped*, const TType&, const TString*, const TSourceLoc&); TIntermConstantUnion* addConstantUnion(const TConstUnionArray&, const TType&, const TSourceLoc&, bool literal = false) const; TIntermConstantUnion* addConstantUnion(signed char, const TSourceLoc&, bool literal = false) const; TIntermConstantUnion* addConstantUnion(unsigned char, const TSourceLoc&, bool literal = false) const; TIntermConstantUnion* addConstantUnion(signed short, const TSourceLoc&, bool literal = false) const; TIntermConstantUnion* addConstantUnion(unsigned short, const TSourceLoc&, bool literal = false) const; TIntermConstantUnion* addConstantUnion(int, const TSourceLoc&, bool literal = false) const; TIntermConstantUnion* addConstantUnion(unsigned int, const TSourceLoc&, bool literal = false) const; TIntermConstantUnion* addConstantUnion(long long, const TSourceLoc&, bool literal = false) const; TIntermConstantUnion* addConstantUnion(unsigned long long, const TSourceLoc&, bool literal = false) const; TIntermConstantUnion* addConstantUnion(bool, const TSourceLoc&, bool literal = false) const; TIntermConstantUnion* addConstantUnion(double, TBasicType, const TSourceLoc&, bool literal = false) const; TIntermConstantUnion* addConstantUnion(const TString*, const TSourceLoc&, bool literal = false) const; TIntermTyped* promoteConstantUnion(TBasicType, TIntermConstantUnion*) const; bool parseConstTree(TIntermNode*, TConstUnionArray, TOperator, const TType&, bool singleConstantParam = false); TIntermLoop* addLoop(TIntermNode*, TIntermTyped*, TIntermTyped*, bool testFirst, const TSourceLoc&); TIntermAggregate* addForLoop(TIntermNode*, TIntermNode*, TIntermTyped*, TIntermTyped*, bool testFirst, const TSourceLoc&, TIntermLoop*&); TIntermBranch* addBranch(TOperator, const TSourceLoc&); TIntermBranch* addBranch(TOperator, TIntermTyped*, const TSourceLoc&); template TIntermTyped* addSwizzle(TSwizzleSelectors&, const TSourceLoc&); // Low level functions to add nodes (no conversions or other higher level transformations) // If a type is provided, the node's type will be set to it. TIntermBinary* addBinaryNode(TOperator op, TIntermTyped* left, TIntermTyped* right, const TSourceLoc&) const; TIntermBinary* addBinaryNode(TOperator op, TIntermTyped* left, TIntermTyped* right, const TSourceLoc&, const TType&) const; TIntermUnary* addUnaryNode(TOperator op, TIntermTyped* child, const TSourceLoc&) const; TIntermUnary* addUnaryNode(TOperator op, TIntermTyped* child, const TSourceLoc&, const TType&) const; // Constant folding (in Constant.cpp) TIntermTyped* fold(TIntermAggregate* aggrNode); TIntermTyped* foldConstructor(TIntermAggregate* aggrNode); TIntermTyped* foldDereference(TIntermTyped* node, int index, const TSourceLoc&); TIntermTyped* foldSwizzle(TIntermTyped* node, TSwizzleSelectors& fields, const TSourceLoc&); // Tree ops static const TIntermTyped* traverseLValueBase(const TIntermTyped*, bool swizzleOkay, bool bufferReferenceOk = false, std::function proc = {}); // Linkage related void addSymbolLinkageNodes(TIntermAggregate*& linkage, EShLanguage, TSymbolTable&); void addSymbolLinkageNode(TIntermAggregate*& linkage, const TSymbol&); TIntermAggregate* findLinkerObjects() const; void setGlobalUniformBlockName(const char* name) { globalUniformBlockName = std::string(name); } const char* getGlobalUniformBlockName() const { return globalUniformBlockName.c_str(); } void setGlobalUniformSet(unsigned int set) { globalUniformBlockSet = set; } unsigned int getGlobalUniformSet() const { return globalUniformBlockSet; } void setGlobalUniformBinding(unsigned int binding) { globalUniformBlockBinding = binding; } unsigned int getGlobalUniformBinding() const { return globalUniformBlockBinding; } void setAtomicCounterBlockName(const char* name) { atomicCounterBlockName = std::string(name); } const char* getAtomicCounterBlockName() const { return atomicCounterBlockName.c_str(); } void setAtomicCounterBlockSet(unsigned int set) { atomicCounterBlockSet = set; } unsigned int getAtomicCounterBlockSet() const { return atomicCounterBlockSet; } void setUseStorageBuffer() { useStorageBuffer = true; } bool usingStorageBuffer() const { return useStorageBuffer; } void setInvariantAll() { invariantAll = true; } bool isInvariantAll() const { return invariantAll; } void setDepthReplacing() { depthReplacing = true; } bool isDepthReplacing() const { return depthReplacing; } void setStencilReplacing() { stencilReplacing = true; } bool isStencilReplacing() const { return stencilReplacing; } bool setLocalSize(int dim, int size) { if (localSizeNotDefault[dim]) return size == localSize[dim]; localSizeNotDefault[dim] = true; localSize[dim] = size; return true; } unsigned int getLocalSize(int dim) const { return localSize[dim]; } bool isLocalSizeSet() const { // Return true if any component has been set (i.e. any component is not default). return localSizeNotDefault[0] || localSizeNotDefault[1] || localSizeNotDefault[2]; } bool setLocalSizeSpecId(int dim, int id) { if (localSizeSpecId[dim] != TQualifier::layoutNotSet) return id == localSizeSpecId[dim]; localSizeSpecId[dim] = id; return true; } int getLocalSizeSpecId(int dim) const { return localSizeSpecId[dim]; } bool isLocalSizeSpecialized() const { // Return true if any component has been specialized. return localSizeSpecId[0] != TQualifier::layoutNotSet || localSizeSpecId[1] != TQualifier::layoutNotSet || localSizeSpecId[2] != TQualifier::layoutNotSet; } void output(TInfoSink&, bool tree); bool isEsProfile() const { return profile == EEsProfile; } bool setTileShadingRateQCOM(int dim, int size) { if (tileShadingRateQCOMNotDefault[dim]) return size == tileShadingRateQCOM[dim]; tileShadingRateQCOMNotDefault[dim] = true; tileShadingRateQCOM[dim] = size; return true; } unsigned int getTileShadingRateQCOM(int dim) const { return tileShadingRateQCOM[dim]; } bool isTileShadingRateQCOMSet() const { // Return true if any component has been set (i.e. any component is not default). return tileShadingRateQCOMNotDefault[0] || tileShadingRateQCOMNotDefault[1] || tileShadingRateQCOMNotDefault[2]; } void setShiftBinding(TResourceType res, unsigned int shift) { shiftBinding[res] = shift; const char* name = getResourceName(res); if (name != nullptr) processes.addIfNonZero(name, shift); } unsigned int getShiftBinding(TResourceType res) const { return shiftBinding[res]; } void setShiftBindingForSet(TResourceType res, unsigned int shift, unsigned int set) { if (shift == 0) // ignore if there's no shift: it's a no-op. return; shiftBindingForSet[res][set] = shift; const char* name = getResourceName(res); if (name != nullptr) { processes.addProcess(name); processes.addArgument(shift); processes.addArgument(set); } } int getShiftBindingForSet(TResourceType res, unsigned int set) const { const auto shift = shiftBindingForSet[res].find(set); return shift == shiftBindingForSet[res].end() ? -1 : shift->second; } bool hasShiftBindingForSet(TResourceType res) const { return !shiftBindingForSet[res].empty(); } void setResourceSetBinding(const std::vector& shift) { resourceSetBinding = shift; if (shift.size() > 0) { processes.addProcess("resource-set-binding"); for (int s = 0; s < (int)shift.size(); ++s) processes.addArgument(shift[s]); } } const std::vector& getResourceSetBinding() const { return resourceSetBinding; } void setAutoMapBindings(bool map) { autoMapBindings = map; if (autoMapBindings) processes.addProcess("auto-map-bindings"); } bool getAutoMapBindings() const { return autoMapBindings; } void setAutoMapLocations(bool map) { autoMapLocations = map; if (autoMapLocations) processes.addProcess("auto-map-locations"); } bool getAutoMapLocations() const { return autoMapLocations; } #ifdef ENABLE_HLSL void setFlattenUniformArrays(bool flatten) { flattenUniformArrays = flatten; if (flattenUniformArrays) processes.addProcess("flatten-uniform-arrays"); } bool getFlattenUniformArrays() const { return flattenUniformArrays; } #endif void setNoStorageFormat(bool b) { useUnknownFormat = b; if (useUnknownFormat) processes.addProcess("no-storage-format"); } bool getNoStorageFormat() const { return useUnknownFormat; } void setUseVulkanMemoryModel() { useVulkanMemoryModel = true; processes.addProcess("use-vulkan-memory-model"); } bool usingVulkanMemoryModel() const { return useVulkanMemoryModel; } void setUsePhysicalStorageBuffer() { usePhysicalStorageBuffer = true; } bool usingPhysicalStorageBuffer() const { return usePhysicalStorageBuffer; } void setReplicatedComposites() { useReplicatedComposites = true; } bool usingReplicatedComposites() const { return useReplicatedComposites; } void setUseVariablePointers() { useVariablePointers = true; processes.addProcess("use-variable-pointers"); } // Set the global flag for bindless texture void setBindlessTextureMode(const TString& currentCaller, AstRefType type) { // When type is not func, currentCaller should be "" (empty string) bindlessTextureModeCaller[currentCaller] = type; } // Get the global flag for bindless texture bool getBindlessTextureMode() const { return (bindlessTextureModeCaller.size() > 0); } // Set the global flag for bindless image void setBindlessImageMode(const TString& currentCaller, AstRefType type) { // When type is not func, currentCaller should be "" (empty string) bindlessImageModeCaller[currentCaller] = type; } // Get the global flag for bindless image bool getBindlessImageMode() const { return (bindlessImageModeCaller.size() > 0); } // Get the global flag for bindless texture bool resetTopLevelUncalledStatus(const TString& deadCaller) { // For reflection collection purpose, currently uniform layout setting and some // flags introduced by variables (IO, global, etc,.) won't be reset here. // Remove each global status (AST top level) introduced by uncalled functions. // If a status is set by several functions, keep those which in call graph. bool result = false; // For two types of bindless mode flag, we would only reset which is set by an uncalled function. // If one status flag's key in caller vec is empty, it should be come from a non-function setting. if (!bindlessTextureModeCaller.empty()) { auto caller = bindlessTextureModeCaller.find(deadCaller); if (caller != bindlessTextureModeCaller.end() && bindlessTextureModeCaller[deadCaller] == AstRefTypeFunc) { bindlessTextureModeCaller.erase(caller); result = true; } } if (!bindlessImageModeCaller.empty()) { auto caller = bindlessImageModeCaller.find(deadCaller); if (caller != bindlessImageModeCaller.end() && bindlessImageModeCaller[deadCaller] == AstRefTypeFunc) { bindlessImageModeCaller.erase(caller); result = true; } } return result; } bool getBindlessMode() const { return getBindlessTextureMode() || getBindlessImageMode(); } bool usingVariablePointers() const { return useVariablePointers; } #ifdef ENABLE_HLSL template T addCounterBufferName(const T& name) const { return name + implicitCounterName; } bool hasCounterBufferName(const TString& name) const { size_t len = strlen(implicitCounterName); return name.size() > len && name.compare(name.size() - len, len, implicitCounterName) == 0; } #endif void setTextureSamplerTransformMode(EShTextureSamplerTransformMode mode) { textureSamplerTransformMode = mode; } int getNumPushConstants() const { return numPushConstants; } void addShaderRecordCount() { ++numShaderRecordBlocks; } void addTaskNVCount() { ++numTaskNVBlocks; } void addTaskPayloadEXTCount() { ++numTaskEXTPayloads; } bool setInvocations(int i) { if (invocations != TQualifier::layoutNotSet) return invocations == i; invocations = i; return true; } int getInvocations() const { return invocations; } bool setVertices(int m) { if (vertices != TQualifier::layoutNotSet) return vertices == m; vertices = m; return true; } int getVertices() const { return vertices; } bool setInputPrimitive(TLayoutGeometry p) { if (inputPrimitive != ElgNone) return inputPrimitive == p; inputPrimitive = p; return true; } TLayoutGeometry getInputPrimitive() const { return inputPrimitive; } bool setVertexSpacing(TVertexSpacing s) { if (vertexSpacing != EvsNone) return vertexSpacing == s; vertexSpacing = s; return true; } TVertexSpacing getVertexSpacing() const { return vertexSpacing; } bool setVertexOrder(TVertexOrder o) { if (vertexOrder != EvoNone) return vertexOrder == o; vertexOrder = o; return true; } TVertexOrder getVertexOrder() const { return vertexOrder; } void setPointMode() { pointMode = true; } bool getPointMode() const { return pointMode; } bool setInterlockOrdering(TInterlockOrdering o) { if (interlockOrdering != EioNone) return interlockOrdering == o; interlockOrdering = o; return true; } TInterlockOrdering getInterlockOrdering() const { return interlockOrdering; } void setXfbMode() { xfbMode = true; } bool getXfbMode() const { return xfbMode; } void setQuadDerivMode(bool mode = true) { quadDerivMode = mode; } bool getQuadDerivMode() const { return quadDerivMode; } void setReqFullQuadsMode(bool mode = true) { reqFullQuadsMode = mode; } bool getReqFullQuadsMode() const { return reqFullQuadsMode; } void setMultiStream() { multiStream = true; } bool isMultiStream() const { return multiStream; } bool setOutputPrimitive(TLayoutGeometry p) { if (outputPrimitive != ElgNone) return outputPrimitive == p; outputPrimitive = p; return true; } TLayoutGeometry getOutputPrimitive() const { return outputPrimitive; } void setNonCoherentColorAttachmentReadEXT() { nonCoherentColorAttachmentReadEXT = true; } bool getNonCoherentColorAttachmentReadEXT() const { return nonCoherentColorAttachmentReadEXT; } void setNonCoherentDepthAttachmentReadEXT() { nonCoherentDepthAttachmentReadEXT = true; } bool getNonCoherentDepthAttachmentReadEXT() const { return nonCoherentDepthAttachmentReadEXT; } void setNonCoherentStencilAttachmentReadEXT() { nonCoherentStencilAttachmentReadEXT = true; } bool getNonCoherentStencilAttachmentReadEXT() const { return nonCoherentStencilAttachmentReadEXT; } void setNonCoherentTileAttachmentReadQCOM() { nonCoherentTileAttachmentReadQCOM = true; } bool getNonCoherentTileAttachmentReadQCOM() const { return nonCoherentTileAttachmentReadQCOM; } void setPostDepthCoverage() { postDepthCoverage = true; } bool getPostDepthCoverage() const { return postDepthCoverage; } void setEarlyFragmentTests() { earlyFragmentTests = true; } void setEarlyAndLateFragmentTestsAMD() { earlyAndLateFragmentTestsAMD = true; } bool getEarlyFragmentTests() const { return earlyFragmentTests; } bool getEarlyAndLateFragmentTestsAMD() const { return earlyAndLateFragmentTestsAMD; } bool setDepth(TLayoutDepth d) { if (depthLayout != EldNone) return depthLayout == d; depthLayout = d; return true; } bool setStencil(TLayoutStencil s) { if (stencilLayout != ElsNone) return stencilLayout == s; stencilLayout = s; return true; } TLayoutDepth getDepth() const { return depthLayout; } TLayoutStencil getStencil() const { return stencilLayout; } void setOriginUpperLeft() { originUpperLeft = true; } bool getOriginUpperLeft() const { return originUpperLeft; } void setPixelCenterInteger() { pixelCenterInteger = true; } bool getPixelCenterInteger() const { return pixelCenterInteger; } void setTexCoordRedeclared() { texCoordBuiltinRedeclared = true; } bool getTexCoordRedeclared() const { return texCoordBuiltinRedeclared; } void addBlendEquation(TBlendEquationShift b) { blendEquations |= (1 << b); } unsigned int getBlendEquations() const { return blendEquations; } bool setXfbBufferStride(int buffer, unsigned stride) { if (xfbBuffers[buffer].stride != TQualifier::layoutXfbStrideEnd) return xfbBuffers[buffer].stride == stride; xfbBuffers[buffer].stride = stride; return true; } unsigned getXfbStride(int buffer) const { return xfbBuffers[buffer].stride; } int addXfbBufferOffset(const TType&); unsigned int computeTypeXfbSize(const TType&, bool& contains64BitType, bool& contains32BitType, bool& contains16BitType) const; unsigned int computeTypeXfbSize(const TType&, bool& contains64BitType) const; void setLayoutOverrideCoverage() { layoutOverrideCoverage = true; } bool getLayoutOverrideCoverage() const { return layoutOverrideCoverage; } void setGeoPassthroughEXT() { geoPassthroughEXT = true; } bool getGeoPassthroughEXT() const { return geoPassthroughEXT; } void setLayoutDerivativeMode(ComputeDerivativeMode mode) { computeDerivativeMode = mode; } bool hasLayoutDerivativeModeNone() const { return computeDerivativeMode != LayoutDerivativeNone; } ComputeDerivativeMode getLayoutDerivativeModeNone() const { return computeDerivativeMode; } void setLayoutPrimitiveCulling() { layoutPrimitiveCulling = true; } bool getLayoutPrimitiveCulling() const { return layoutPrimitiveCulling; } bool setPrimitives(int m) { if (primitives != TQualifier::layoutNotSet) return primitives == m; primitives = m; return true; } int getPrimitives() const { return primitives; } const char* addSemanticName(const TString& name) { return semanticNameSet.insert(name).first->c_str(); } void addUniformLocationOverride(const char* nameStr, int location) { std::string name = nameStr; uniformLocationOverrides[name] = location; } int getUniformLocationOverride(const char* nameStr) const { std::string name = nameStr; auto pos = uniformLocationOverrides.find(name); if (pos == uniformLocationOverrides.end()) return -1; else return pos->second; } void setUniformLocationBase(int base) { uniformLocationBase = base; } int getUniformLocationBase() const { return uniformLocationBase; } void setNeedsLegalization() { needToLegalize = true; } bool needsLegalization() const { return needToLegalize; } void setBinaryDoubleOutput() { binaryDoubleOutput = true; } bool getBinaryDoubleOutput() { return binaryDoubleOutput; } void setSubgroupUniformControlFlow() { subgroupUniformControlFlow = true; } bool getSubgroupUniformControlFlow() const { return subgroupUniformControlFlow; } void setMaximallyReconverges() { maximallyReconverges = true; } bool getMaximallyReconverges() const { return maximallyReconverges; } // GL_EXT_spirv_intrinsics void insertSpirvRequirement(const TSpirvRequirement* spirvReq); bool hasSpirvRequirement() const { return spirvRequirement != nullptr; } const TSpirvRequirement& getSpirvRequirement() const { return *spirvRequirement; } void insertSpirvExecutionMode(int executionMode, const TIntermAggregate* args = nullptr); void insertSpirvExecutionModeId(int executionMode, const TIntermAggregate* args); bool hasSpirvExecutionMode() const { return spirvExecutionMode != nullptr; } const TSpirvExecutionMode& getSpirvExecutionMode() const { return *spirvExecutionMode; } void addBlockStorageOverride(const char* nameStr, TBlockStorageClass backing) { std::string name(nameStr); blockBackingOverrides[name] = backing; } TBlockStorageClass getBlockStorageOverride(const char* nameStr) const { std::string name = nameStr; auto pos = blockBackingOverrides.find(name); if (pos == blockBackingOverrides.end()) return EbsNone; else return pos->second; } #ifdef ENABLE_HLSL void setHlslFunctionality1() { hlslFunctionality1 = true; } bool getHlslFunctionality1() const { return hlslFunctionality1; } void setHlslOffsets() { hlslOffsets = true; if (hlslOffsets) processes.addProcess("hlsl-offsets"); } bool usingHlslOffsets() const { return hlslOffsets; } void setHlslIoMapping(bool b) { hlslIoMapping = b; if (hlslIoMapping) processes.addProcess("hlsl-iomap"); } bool usingHlslIoMapping() { return hlslIoMapping; } #else bool getHlslFunctionality1() const { return false; } bool usingHlslOffsets() const { return false; } bool usingHlslIoMapping() { return false; } #endif bool usingScalarBlockLayout() const { return IsRequestedExtension(E_GL_EXT_scalar_block_layout); } bool usingTextureOffsetNonConst() const { return IsRequestedExtension(E_GL_EXT_texture_offset_non_const); } bool IsRequestedExtension(const char* extension) const { return (requestedExtensions.find(extension) != requestedExtensions.end()); } void addToCallGraph(TInfoSink&, const TString& caller, const TString& callee); void merge(TInfoSink&, TIntermediate&); void finalCheck(TInfoSink&, bool keepUncalled); void mergeGlobalUniformBlocks(TInfoSink& infoSink, TIntermediate& unit, bool mergeExistingOnly); void mergeUniformObjects(TInfoSink& infoSink, TIntermediate& unit); void mergeImplicitArraySizes(TInfoSink& infoSink, TIntermediate& unit); void checkStageIO(TInfoSink&, TIntermediate&, EShMessages); void optimizeStageIO(TInfoSink&, TIntermediate&); bool buildConvertOp(TBasicType dst, TBasicType src, TOperator& convertOp) const; TIntermTyped* createConversion(TBasicType convertTo, TIntermTyped* node) const; void addIoAccessed(const TString& name) { ioAccessed.insert(name); } bool inIoAccessed(const TString& name) const { return ioAccessed.find(name) != ioAccessed.end(); } int addUsedLocation(EShMessages, const TQualifier&, const TType&, bool& typeCollision); int checkLocationRange(int set, const TIoRange& range, const TType&, bool& typeCollision); int checkLocationRT(int set, int location); int addUsedOffsets(int binding, int offset, int numOffsets); bool addUsedConstantId(int id); GLSLANG_EXPORT_FOR_TESTS static int computeTypeLocationSize(const TType&, EShLanguage); static int computeTypeUniformLocationSize(const TType&); static int getBaseAlignmentScalar(const TType&, int& size); static int getBaseAlignment(const TType&, int& size, int& stride, TLayoutPacking layoutPacking, bool rowMajor); static int getScalarAlignment(const TType&, int& size, int& stride, bool rowMajor); static int getMemberAlignment(const TType&, int& size, int& stride, TLayoutPacking layoutPacking, bool rowMajor); static bool improperStraddle(const TType& type, int size, int offset, bool vectorLike); static void updateOffset(const TType& parentType, const TType& memberType, int& offset, int& memberSize); static int getOffset(const TType& type, int index); static int getBlockSize(const TType& blockType); static int computeBufferReferenceTypeSize(const TType&); static bool isIoResizeArray(const TType& type, EShLanguage language); bool promote(TIntermOperator*); void setNanMinMaxClamp(bool setting) { nanMinMaxClamp = setting; } bool getNanMinMaxClamp() const { return nanMinMaxClamp; } void setSourceFile(const char* file) { if (file != nullptr) sourceFile = file; } const std::string& getSourceFile() const { return sourceFile; } void addSourceText(const char* text, size_t len) { sourceText.append(text, len); } const std::string& getSourceText() const { return sourceText; } const std::map& getIncludeText() const { return includeText; } void addIncludeText(const char* name, const char* text, size_t len) { includeText[name].assign(text,len); } void addProcesses(const std::vector& p) { for (int i = 0; i < (int)p.size(); ++i) processes.addProcess(p[i]); } void addProcess(const std::string& process) { processes.addProcess(process); } void addProcessArgument(const std::string& arg) { processes.addArgument(arg); } const std::vector& getProcesses() const { return processes.getProcesses(); } unsigned long long getUniqueId() const { return uniqueId; } void setUniqueId(unsigned long long id) { uniqueId = id; } // Certain explicit conversions are allowed conditionally bool getArithemeticInt8Enabled() const { return numericFeatures.contains(TNumericFeatures::shader_explicit_arithmetic_types) || numericFeatures.contains(TNumericFeatures::nv_gpu_shader5_types) || numericFeatures.contains(TNumericFeatures::shader_explicit_arithmetic_types_int8); } bool getArithemeticInt16Enabled() const { return numericFeatures.contains(TNumericFeatures::shader_explicit_arithmetic_types) || numericFeatures.contains(TNumericFeatures::gpu_shader_int16) || numericFeatures.contains(TNumericFeatures::nv_gpu_shader5_types) || numericFeatures.contains(TNumericFeatures::shader_explicit_arithmetic_types_int16); } bool getArithemeticFloat16Enabled() const { return numericFeatures.contains(TNumericFeatures::shader_explicit_arithmetic_types) || numericFeatures.contains(TNumericFeatures::gpu_shader_half_float) || numericFeatures.contains(TNumericFeatures::nv_gpu_shader5_types) || numericFeatures.contains(TNumericFeatures::shader_explicit_arithmetic_types_float16); } void updateNumericFeature(TNumericFeatures::feature f, bool on) { on ? numericFeatures.insert(f) : numericFeatures.erase(f); } protected: TIntermSymbol* addSymbol(long long Id, const TString&, const TString&, const TType&, const TConstUnionArray&, TIntermTyped* subtree, const TSourceLoc&); void error(TInfoSink& infoSink, const TSourceLoc* loc, EShMessages messages, const char*, EShLanguage unitStage = EShLangCount); void error(TInfoSink& infoSink, const char* message, EShLanguage unitStage = EShLangCount) { error(infoSink, nullptr, EShMsgDefault, message, unitStage); } void warn(TInfoSink& infoSink, const TSourceLoc* loc, EShMessages, const char*, EShLanguage unitStage = EShLangCount); void warn(TInfoSink& infoSink, const char* message, EShLanguage unitStage = EShLangCount) { warn(infoSink, nullptr, EShMsgDefault, message, unitStage); } void mergeCallGraphs(TInfoSink&, TIntermediate&); void mergeModes(TInfoSink&, TIntermediate&); void mergeTrees(TInfoSink&, TIntermediate&); void seedIdMap(TIdMaps& idMaps, long long& IdShift); void remapIds(const TIdMaps& idMaps, long long idShift, TIntermediate&); void mergeBodies(TInfoSink&, TIntermSequence& globals, const TIntermSequence& unitGlobals); void mergeLinkerObjects(TInfoSink&, TIntermSequence& linkerObjects, const TIntermSequence& unitLinkerObjects, EShLanguage); void mergeBlockDefinitions(TInfoSink&, TIntermSymbol* block, TIntermSymbol* unitBlock, TIntermediate* unitRoot); void mergeImplicitArraySizes(TType&, const TType&); void mergeErrorCheck(TInfoSink&, const TIntermSymbol&, const TIntermSymbol&); void checkCallGraphCycles(TInfoSink&); void checkCallGraphBodies(TInfoSink&, bool keepUncalled); void inOutLocationCheck(TInfoSink&); void sharedBlockCheck(TInfoSink&); bool userOutputUsed() const; bool isSpecializationOperation(const TIntermOperator&) const; bool isNonuniformPropagating(TOperator) const; bool promoteUnary(TIntermUnary&); bool promoteBinary(TIntermBinary&); void addSymbolLinkageNode(TIntermAggregate*& linkage, TSymbolTable&, const TString&); bool promoteAggregate(TIntermAggregate&); void pushSelector(TIntermSequence&, const TVectorSelector&, const TSourceLoc&); void pushSelector(TIntermSequence&, const TMatrixSelector&, const TSourceLoc&); bool specConstantPropagates(const TIntermTyped&, const TIntermTyped&); void performTextureUpgradeAndSamplerRemovalTransformation(TIntermNode* root); bool isConversionAllowed(TOperator op, TIntermTyped* node) const; std::tuple getConversionDestinationType(TBasicType type0, TBasicType type1, TOperator op) const; static const char* getResourceName(TResourceType); const EShLanguage language; // stage, known at construction time std::string entryPointName; std::string entryPointMangledName; typedef std::list TGraph; TGraph callGraph; EProfile profile; // source profile int version; // source version SpvVersion spvVersion; TIntermNode* treeRoot; std::set requestedExtensions; // cumulation of all enabled or required extensions; not connected to what subset of the shader used them MustBeAssigned resources; int numEntryPoints; int numErrors; int numPushConstants; bool recursive; bool invertY; bool dxPositionW; bool enhancedMsgs; bool debugInfo; bool useStorageBuffer; bool invariantAll; bool nanMinMaxClamp; // true if desiring min/max/clamp to favor non-NaN over NaN bool depthReplacing; bool stencilReplacing; int localSize[3]; bool localSizeNotDefault[3]; int localSizeSpecId[3]; unsigned long long uniqueId; std::string globalUniformBlockName; std::string atomicCounterBlockName; unsigned int globalUniformBlockSet; unsigned int globalUniformBlockBinding; unsigned int atomicCounterBlockSet; public: const char* const implicitThisName; const char* const implicitCounterName; protected: EShSource source; // source language, known a bit later bool useVulkanMemoryModel; int invocations; int vertices; TLayoutGeometry inputPrimitive; TLayoutGeometry outputPrimitive; bool pixelCenterInteger; bool originUpperLeft; bool texCoordBuiltinRedeclared; TVertexSpacing vertexSpacing; TVertexOrder vertexOrder; TInterlockOrdering interlockOrdering; bool pointMode; bool earlyFragmentTests; bool postDepthCoverage; bool earlyAndLateFragmentTestsAMD; bool nonCoherentColorAttachmentReadEXT; bool nonCoherentDepthAttachmentReadEXT; bool nonCoherentStencilAttachmentReadEXT; TLayoutDepth depthLayout; TLayoutStencil stencilLayout; bool hlslFunctionality1; int blendEquations; // an 'or'ing of masks of shifts of TBlendEquationShift bool xfbMode; std::vector xfbBuffers; // all the data we need to track per xfb buffer bool multiStream; bool layoutOverrideCoverage; bool geoPassthroughEXT; int numShaderRecordBlocks; ComputeDerivativeMode computeDerivativeMode; int primitives; int numTaskNVBlocks; bool layoutPrimitiveCulling; int numTaskEXTPayloads; bool nonCoherentTileAttachmentReadQCOM; int tileShadingRateQCOM[3]; bool tileShadingRateQCOMNotDefault[3]; // Base shift values std::array shiftBinding; // Per-descriptor-set shift values std::array, EResCount> shiftBindingForSet; std::vector resourceSetBinding; bool autoMapBindings; bool autoMapLocations; bool flattenUniformArrays; bool useUnknownFormat; bool hlslOffsets; bool hlslIoMapping; bool useVariablePointers; std::set semanticNameSet; EShTextureSamplerTransformMode textureSamplerTransformMode; bool needToLegalize; bool binaryDoubleOutput; bool subgroupUniformControlFlow; bool maximallyReconverges; bool usePhysicalStorageBuffer; bool useReplicatedComposites { false }; TSpirvRequirement* spirvRequirement; TSpirvExecutionMode* spirvExecutionMode; std::map bindlessTextureModeCaller; std::map bindlessImageModeCaller; std::unordered_map uniformLocationOverrides; int uniformLocationBase; bool quadDerivMode; bool reqFullQuadsMode; TNumericFeatures numericFeatures; std::unordered_map blockBackingOverrides; std::unordered_set usedConstantId; // specialization constant ids used std::vector usedAtomics; // sets of bindings used by atomic counters std::vector usedIo[5]; // sets of used locations, one for each of in, out, uniform, and buffers std::vector usedIoRT[4]; // sets of used location, one for rayPayload/rayPayloadIN, // one for callableData/callableDataIn, one for hitObjectAttributeNV and // one for shaderrecordhitobjectNV // set of names of statically read/written I/O that might need extra checking std::set ioAccessed; // source code of shader, useful as part of debug information std::string sourceFile; std::string sourceText; // Included text. First string is a name, second is the included text std::map includeText; // for OpModuleProcessed, or equivalent TProcesses processes; private: void operator=(TIntermediate&); // prevent assignments }; } // end namespace glslang #endif // _LOCAL_INTERMEDIATE_INCLUDED_ ================================================ FILE: src/libraries/glslang/glslang/MachineIndependent/parseConst.cpp ================================================ // // Copyright (C) 2002-2005 3Dlabs Inc. Ltd. // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following // disclaimer in the documentation and/or other materials provided // with the distribution. // // Neither the name of 3Dlabs Inc. Ltd. nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // // // Traverse a tree of constants to create a single folded constant. // It should only be used when the whole tree is known to be constant. // #include "ParseHelper.h" namespace glslang { class TConstTraverser : public TIntermTraverser { public: TConstTraverser(const TConstUnionArray& cUnion, bool singleConstParam, TOperator constructType, const TType& t) : unionArray(cUnion), type(t), constructorType(constructType), singleConstantParam(singleConstParam), error(false), isMatrix(false), matrixCols(0), matrixRows(0) { index = 0; tOp = EOpNull; } virtual void visitConstantUnion(TIntermConstantUnion* node); virtual bool visitAggregate(TVisit, TIntermAggregate* node); int index; TConstUnionArray unionArray; TOperator tOp; const TType& type; TOperator constructorType; bool singleConstantParam; bool error; int size; // size of the constructor ( 4 for vec4) bool isMatrix; int matrixCols; int matrixRows; protected: TConstTraverser(TConstTraverser&); TConstTraverser& operator=(TConstTraverser&); }; bool TConstTraverser::visitAggregate(TVisit /* visit */, TIntermAggregate* node) { if (! node->isConstructor() && node->getOp() != EOpComma) { error = true; return false; } bool flag = node->getSequence().size() == 1 && node->getSequence()[0]->getAsTyped()->getAsConstantUnion(); if (flag) { singleConstantParam = true; constructorType = node->getOp(); size = node->getType().computeNumComponents(); if (node->getType().isMatrix()) { isMatrix = true; matrixCols = node->getType().getMatrixCols(); matrixRows = node->getType().getMatrixRows(); } } for (TIntermSequence::iterator p = node->getSequence().begin(); p != node->getSequence().end(); p++) { if (node->getOp() == EOpComma) index = 0; (*p)->traverse(this); } if (flag) { singleConstantParam = false; constructorType = EOpNull; size = 0; isMatrix = false; matrixCols = 0; matrixRows = 0; } return false; } void TConstTraverser::visitConstantUnion(TIntermConstantUnion* node) { TConstUnionArray leftUnionArray(unionArray); int instanceSize = type.computeNumComponents(); if (index >= instanceSize) return; if (! singleConstantParam) { int rightUnionSize = node->getType().computeNumComponents(); const TConstUnionArray& rightUnionArray = node->getConstArray(); for (int i = 0; i < rightUnionSize; i++) { if (index >= instanceSize) return; leftUnionArray[index] = rightUnionArray[i]; index++; } } else { int endIndex = index + size; const TConstUnionArray& rightUnionArray = node->getConstArray(); if (! isMatrix) { int count = 0; int nodeComps = node->getType().computeNumComponents(); for (int i = index; i < endIndex; i++) { if (i >= instanceSize) return; leftUnionArray[i] = rightUnionArray[count]; (index)++; if (nodeComps > 1) count++; } } else { // constructing a matrix, but from what? if (node->isMatrix()) { // Matrix from a matrix; this has the outer matrix, node is the argument matrix. // Traverse the outer, potentially bigger matrix, fill in missing pieces with the // identity matrix. for (int c = 0; c < matrixCols; ++c) { for (int r = 0; r < matrixRows; ++r) { int targetOffset = index + c * matrixRows + r; if (r < node->getType().getMatrixRows() && c < node->getType().getMatrixCols()) { int srcOffset = c * node->getType().getMatrixRows() + r; leftUnionArray[targetOffset] = rightUnionArray[srcOffset]; } else if (r == c) leftUnionArray[targetOffset].setDConst(1.0); else leftUnionArray[targetOffset].setDConst(0.0); } } } else { // matrix from vector or scalar int nodeComps = node->getType().computeNumComponents(); if (nodeComps == 1) { for (int c = 0; c < matrixCols; ++c) { for (int r = 0; r < matrixRows; ++r) { if (r == c) leftUnionArray[index] = rightUnionArray[0]; else leftUnionArray[index].setDConst(0.0); index++; } } } else { int count = 0; for (int i = index; i < endIndex; i++) { if (i >= instanceSize) return; // construct the matrix in column-major order, from // the components provided, in order leftUnionArray[i] = rightUnionArray[count]; index++; count++; } } } } } } bool TIntermediate::parseConstTree(TIntermNode* root, TConstUnionArray unionArray, TOperator constructorType, const TType& t, bool singleConstantParam) { if (root == nullptr) return false; TConstTraverser it(unionArray, singleConstantParam, constructorType, t); root->traverse(&it); if (it.error) return true; else return false; } } // end namespace glslang ================================================ FILE: src/libraries/glslang/glslang/MachineIndependent/parseVersions.h ================================================ // // Copyright (C) 2015-2018 Google, Inc. // Copyright (C) 2017 ARM Limited. // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following // disclaimer in the documentation and/or other materials provided // with the distribution. // // Neither the name of 3Dlabs Inc. Ltd. nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // // This is implemented in Versions.cpp #ifndef _PARSE_VERSIONS_INCLUDED_ #define _PARSE_VERSIONS_INCLUDED_ #include "../Public/ShaderLang.h" #include "../Include/InfoSink.h" #include "Scan.h" #include namespace glslang { // // Base class for parse helpers. // This just has version-related information and checking. // This class should be sufficient for preprocessing. // class TParseVersions { public: TParseVersions(TIntermediate& interm, int version, EProfile profile, const SpvVersion& spvVersion, EShLanguage language, TInfoSink& infoSink, bool forwardCompatible, EShMessages messages) : forwardCompatible(forwardCompatible), profile(profile), infoSink(infoSink), version(version), language(language), spvVersion(spvVersion), intermediate(interm), messages(messages), numErrors(0), currentScanner(nullptr) { } virtual ~TParseVersions() { } void requireStage(const TSourceLoc&, EShLanguageMask, const char* featureDesc); void requireStage(const TSourceLoc&, EShLanguage, const char* featureDesc); bool forwardCompatible; // true if errors are to be given for use of deprecated features EProfile profile; // the declared profile in the shader (core by default) bool isEsProfile() const { return profile == EEsProfile; } void requireProfile(const TSourceLoc& loc, int profileMask, const char* featureDesc); void profileRequires(const TSourceLoc& loc, int profileMask, int minVersion, int numExtensions, const char* const extensions[], const char* featureDesc); void profileRequires(const TSourceLoc& loc, int profileMask, int minVersion, const char* extension, const char* featureDesc); virtual void initializeExtensionBehavior(); virtual void checkDeprecated(const TSourceLoc&, int queryProfiles, int depVersion, const char* featureDesc); virtual void requireNotRemoved(const TSourceLoc&, int queryProfiles, int removedVersion, const char* featureDesc); virtual void requireExtensions(const TSourceLoc&, int numExtensions, const char* const extensions[], const char* featureDesc); virtual void ppRequireExtensions(const TSourceLoc&, int numExtensions, const char* const extensions[], const char* featureDesc); template constexpr void ppRequireExtensions(const TSourceLoc& loc, Container extensions, const char* featureDesc) { ppRequireExtensions(loc, static_cast(extensions.size()), extensions.data(), featureDesc); } virtual TExtensionBehavior getExtensionBehavior(const char*); virtual bool extensionTurnedOn(const char* const extension); virtual bool extensionsTurnedOn(int numExtensions, const char* const extensions[]); virtual void updateExtensionBehavior(int line, const char* const extension, const char* behavior); virtual void updateExtensionBehavior(const char* const extension, TExtensionBehavior); virtual bool checkExtensionsRequested(const TSourceLoc&, int numExtensions, const char* const extensions[], const char* featureDesc); virtual void checkExtensionStage(const TSourceLoc&, const char* const extension); virtual void extensionRequires(const TSourceLoc&, const char* const extension, const char* behavior); virtual void fullIntegerCheck(const TSourceLoc&, const char* op); virtual void unimplemented(const TSourceLoc&, const char* featureDesc); virtual void doubleCheck(const TSourceLoc&, const char* op); virtual void float16Check(const TSourceLoc&, const char* op, bool builtIn = false); virtual void float16ScalarVectorCheck(const TSourceLoc&, const char* op, bool builtIn = false); virtual void bfloat16ScalarVectorCheck(const TSourceLoc&, const char* op, bool builtIn = false); virtual void floate5m2ScalarVectorCheck(const TSourceLoc&, const char* op, bool builtIn = false); virtual void floate4m3ScalarVectorCheck(const TSourceLoc&, const char* op, bool builtIn = false); virtual bool float16Arithmetic(); virtual void requireFloat16Arithmetic(const TSourceLoc& loc, const char* op, const char* featureDesc); virtual void int16ScalarVectorCheck(const TSourceLoc&, const char* op, bool builtIn = false); virtual bool int16Arithmetic(); virtual void requireInt16Arithmetic(const TSourceLoc& loc, const char* op, const char* featureDesc); virtual void int8ScalarVectorCheck(const TSourceLoc&, const char* op, bool builtIn = false); virtual bool int8Arithmetic(); virtual void requireInt8Arithmetic(const TSourceLoc& loc, const char* op, const char* featureDesc); virtual void float16OpaqueCheck(const TSourceLoc&, const char* op, bool builtIn = false); virtual void int64Check(const TSourceLoc&, const char* op, bool builtIn = false); virtual void explicitInt8Check(const TSourceLoc&, const char* op, bool builtIn = false); virtual void explicitInt16Check(const TSourceLoc&, const char* op, bool builtIn = false); virtual void explicitInt32Check(const TSourceLoc&, const char* op, bool builtIn = false); virtual void explicitFloat32Check(const TSourceLoc&, const char* op, bool builtIn = false); virtual void explicitFloat64Check(const TSourceLoc&, const char* op, bool builtIn = false); virtual void fcoopmatCheckNV(const TSourceLoc&, const char* op, bool builtIn = false); virtual void intcoopmatCheckNV(const TSourceLoc&, const char *op, bool builtIn = false); virtual void coopmatCheck(const TSourceLoc&, const char* op, bool builtIn = false); virtual void tensorLayoutViewCheck(const TSourceLoc&, const char* op, bool builtIn = false); virtual void coopvecCheck(const TSourceLoc&, const char* op, bool builtIn = false); virtual void intattachmentCheck(const TSourceLoc&, const char *op, bool builtIn = false); bool relaxedErrors() const { return (messages & EShMsgRelaxedErrors) != 0; } bool suppressWarnings() const { return (messages & EShMsgSuppressWarnings) != 0; } bool isForwardCompatible() const { return forwardCompatible; } virtual void spvRemoved(const TSourceLoc&, const char* op); virtual void vulkanRemoved(const TSourceLoc&, const char* op); virtual void requireVulkan(const TSourceLoc&, const char* op); virtual void requireSpv(const TSourceLoc&, const char* op); virtual void requireSpv(const TSourceLoc&, const char *op, unsigned int version); virtual void C_DECL error(const TSourceLoc&, const char* szReason, const char* szToken, const char* szExtraInfoFormat, ...) = 0; virtual void C_DECL warn(const TSourceLoc&, const char* szReason, const char* szToken, const char* szExtraInfoFormat, ...) = 0; virtual void C_DECL ppError(const TSourceLoc&, const char* szReason, const char* szToken, const char* szExtraInfoFormat, ...) = 0; virtual void C_DECL ppWarn(const TSourceLoc&, const char* szReason, const char* szToken, const char* szExtraInfoFormat, ...) = 0; void addError() { ++numErrors; } int getNumErrors() const { return numErrors; } void setScanner(TInputScanner* scanner) { currentScanner = scanner; } TInputScanner* getScanner() const { return currentScanner; } const TSourceLoc& getCurrentLoc() const { return currentScanner->getSourceLoc(); } void setCurrentLine(int line) { currentScanner->setLine(line); } void setCurrentColumn(int col) { currentScanner->setColumn(col); } void setCurrentSourceName(const char* name) { currentScanner->setFile(name); } void setCurrentString(int string) { currentScanner->setString(string); } void getPreamble(std::string&); #ifdef ENABLE_HLSL bool isReadingHLSL() const { return (messages & EShMsgReadHlsl) == EShMsgReadHlsl; } bool hlslEnable16BitTypes() const { return (messages & EShMsgHlslEnable16BitTypes) != 0; } bool hlslDX9Compatible() const { return (messages & EShMsgHlslDX9Compatible) != 0; } #else bool isReadingHLSL() const { return false; } #endif TInfoSink& infoSink; // compilation mode int version; // version, updated by #version in the shader EShLanguage language; // really the stage SpvVersion spvVersion; TIntermediate& intermediate; // helper for making and hooking up pieces of the parse tree protected: TMap extensionBehavior; // for each extension string, what its current behavior is TMap extensionMinSpv; // for each extension string, store minimum spirv required TVector spvUnsupportedExt; // for extensions reserved for spv usage. EShMessages messages; // errors/warnings/rule-sets int numErrors; // number of compile-time errors encountered TInputScanner* currentScanner; private: explicit TParseVersions(const TParseVersions&); TParseVersions& operator=(const TParseVersions&); }; } // end namespace glslang #endif // _PARSE_VERSIONS_INCLUDED_ ================================================ FILE: src/libraries/glslang/glslang/MachineIndependent/pch.h ================================================ #ifndef _PCH_H #define _PCH_H // // Copyright (C) 2018 The Khronos Group Inc. // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following // disclaimer in the documentation and/or other materials provided // with the distribution. // // Neither the name of 3Dlabs Inc. Ltd. nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // #include #include #include #include #include #include #include #include #include "SymbolTable.h" #include "ParseHelper.h" #include "Scan.h" #include "ScanContext.h" #endif /* _PCH_H */ ================================================ FILE: src/libraries/glslang/glslang/MachineIndependent/preprocessor/Pp.cpp ================================================ // // Copyright (C) 2002-2005 3Dlabs Inc. Ltd. // Copyright (C) 2013 LunarG, Inc. // Copyright (C) 2015-2018 Google, Inc. // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following // disclaimer in the documentation and/or other materials provided // with the distribution. // // Neither the name of 3Dlabs Inc. Ltd. nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // /****************************************************************************\ Copyright (c) 2002, NVIDIA Corporation. NVIDIA Corporation("NVIDIA") supplies this software to you in consideration of your agreement to the following terms, and your use, installation, modification or redistribution of this NVIDIA software constitutes acceptance of these terms. If you do not agree with these terms, please do not use, install, modify or redistribute this NVIDIA software. In consideration of your agreement to abide by the following terms, and subject to these terms, NVIDIA grants you a personal, non-exclusive license, under NVIDIA's copyrights in this original NVIDIA software (the "NVIDIA Software"), to use, reproduce, modify and redistribute the NVIDIA Software, with or without modifications, in source and/or binary forms; provided that if you redistribute the NVIDIA Software, you must retain the copyright notice of NVIDIA, this notice and the following text and disclaimers in all such redistributions of the NVIDIA Software. Neither the name, trademarks, service marks nor logos of NVIDIA Corporation may be used to endorse or promote products derived from the NVIDIA Software without specific prior written permission from NVIDIA. Except as expressly stated in this notice, no other rights or licenses express or implied, are granted by NVIDIA herein, including but not limited to any patent rights that may be infringed by your derivative works or by other works in which the NVIDIA Software may be incorporated. No hardware is licensed hereunder. THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR ITS USE AND OPERATION EITHER ALONE OR IN COMBINATION WITH OTHER PRODUCTS. IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL, EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, LOST PROFITS; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) OR ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE NVIDIA SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \****************************************************************************/ #ifndef _CRT_SECURE_NO_WARNINGS #define _CRT_SECURE_NO_WARNINGS #endif #include #include #include #include #include #include "PpContext.h" #include "PpTokens.h" namespace glslang { // Handle #define int TPpContext::CPPdefine(TPpToken* ppToken) { MacroSymbol mac; // get the macro name int token = scanToken(ppToken); if (token != PpAtomIdentifier) { parseContext.ppError(ppToken->loc, "must be followed by macro name", "#define", ""); return token; } if (ppToken->loc.string >= 0) { // We are in user code; check for reserved name use: parseContext.reservedPpErrorCheck(ppToken->loc, ppToken->name, "#define"); } // save the macro name const int defAtom = atomStrings.getAddAtom(ppToken->name); TSourceLoc defineLoc = ppToken->loc; // because ppToken might go to the next line before we report errors // gather parameters to the macro, between (...) token = scanToken(ppToken); if (token == '(' && !ppToken->space) { mac.functionLike = 1; do { token = scanToken(ppToken); if (mac.args.size() == 0 && token == ')') break; if (token != PpAtomIdentifier) { parseContext.ppError(ppToken->loc, "bad argument", "#define", ""); return token; } const int argAtom = atomStrings.getAddAtom(ppToken->name); // check for duplication of parameter name bool duplicate = false; for (size_t a = 0; a < mac.args.size(); ++a) { if (mac.args[a] == argAtom) { parseContext.ppError(ppToken->loc, "duplicate macro parameter", "#define", ""); duplicate = true; break; } } if (! duplicate) mac.args.push_back(argAtom); token = scanToken(ppToken); } while (token == ','); if (token != ')') { parseContext.ppError(ppToken->loc, "missing parenthesis", "#define", ""); return token; } token = scanToken(ppToken); } else if (token != '\n' && token != EndOfInput && !ppToken->space) { parseContext.ppWarn(ppToken->loc, "missing space after macro name", "#define", ""); return token; } // record the definition of the macro while (token != '\n' && token != EndOfInput) { mac.body.putToken(token, ppToken); token = scanToken(ppToken); if (token != '\n' && ppToken->space) mac.body.putToken(' ', ppToken); } // check for duplicate definition MacroSymbol* existing = lookupMacroDef(defAtom); if (existing != nullptr) { if (! existing->undef) { // Already defined -- need to make sure they are identical: // "Two replacement lists are identical if and only if the // preprocessing tokens in both have the same number, // ordering, spelling, and white-space separation, where all // white-space separations are considered identical." if (existing->functionLike != mac.functionLike) { parseContext.ppError(defineLoc, "Macro redefined; function-like versus object-like:", "#define", atomStrings.getString(defAtom)); } else if (existing->args.size() != mac.args.size()) { parseContext.ppError(defineLoc, "Macro redefined; different number of arguments:", "#define", atomStrings.getString(defAtom)); } else { if (existing->args != mac.args) { parseContext.ppError(defineLoc, "Macro redefined; different argument names:", "#define", atomStrings.getString(defAtom)); } // set up to compare the two existing->body.reset(); mac.body.reset(); int newToken; bool firstToken = true; do { int oldToken; TPpToken oldPpToken; TPpToken newPpToken; oldToken = existing->body.getToken(parseContext, &oldPpToken); newToken = mac.body.getToken(parseContext, &newPpToken); // for the first token, preceding spaces don't matter if (firstToken) { newPpToken.space = oldPpToken.space; firstToken = false; } if (oldToken != newToken || oldPpToken != newPpToken) { parseContext.ppError(defineLoc, "Macro redefined; different substitutions:", "#define", atomStrings.getString(defAtom)); break; } } while (newToken != EndOfInput); } } *existing = mac; } else addMacroDef(defAtom, mac); return '\n'; } // Handle #undef int TPpContext::CPPundef(TPpToken* ppToken) { int token = scanToken(ppToken); if (token != PpAtomIdentifier) { parseContext.ppError(ppToken->loc, "must be followed by macro name", "#undef", ""); return token; } parseContext.reservedPpErrorCheck(ppToken->loc, ppToken->name, "#undef"); MacroSymbol* macro = lookupMacroDef(atomStrings.getAtom(ppToken->name)); if (macro != nullptr) macro->undef = 1; token = scanToken(ppToken); if (token != '\n') parseContext.ppError(ppToken->loc, "can only be followed by a single macro name", "#undef", ""); return token; } // Handle #else /* Skip forward to appropriate spot. This is used both ** to skip to a #endif after seeing an #else, AND to skip to a #else, ** #elif, or #endif after a #if/#ifdef/#ifndef/#elif test was false. */ int TPpContext::CPPelse(int matchelse, TPpToken* ppToken) { inElseSkip = true; int depth = 0; int token = scanToken(ppToken); while (token != EndOfInput) { if (token != '#') { while (token != '\n' && token != EndOfInput) token = scanToken(ppToken); if (token == EndOfInput) return token; token = scanToken(ppToken); continue; } if ((token = scanToken(ppToken)) != PpAtomIdentifier) continue; int nextAtom = atomStrings.getAtom(ppToken->name); if (nextAtom == PpAtomIf || nextAtom == PpAtomIfdef || nextAtom == PpAtomIfndef) { depth++; if (ifdepth >= maxIfNesting || elsetracker >= maxIfNesting) { parseContext.ppError(ppToken->loc, "maximum nesting depth exceeded", "#if/#ifdef/#ifndef", ""); return EndOfInput; } else { ifdepth++; elsetracker++; } } else if (nextAtom == PpAtomEndif) { token = extraTokenCheck(nextAtom, ppToken, scanToken(ppToken)); elseSeen[elsetracker] = false; --elsetracker; if (depth == 0) { // found the #endif we are looking for if (ifdepth > 0) --ifdepth; break; } --depth; --ifdepth; } else if (matchelse && depth == 0) { if (nextAtom == PpAtomElse) { elseSeen[elsetracker] = true; token = extraTokenCheck(nextAtom, ppToken, scanToken(ppToken)); // found the #else we are looking for break; } else if (nextAtom == PpAtomElif) { if (elseSeen[elsetracker]) parseContext.ppError(ppToken->loc, "#elif after #else", "#elif", ""); /* we decrement ifdepth here, because CPPif will increment * it and we really want to leave it alone */ if (ifdepth > 0) { --ifdepth; elseSeen[elsetracker] = false; --elsetracker; } inElseSkip = false; return CPPif(ppToken); } } else if (nextAtom == PpAtomElse) { if (elseSeen[elsetracker]) parseContext.ppError(ppToken->loc, "#else after #else", "#else", ""); else elseSeen[elsetracker] = true; token = extraTokenCheck(nextAtom, ppToken, scanToken(ppToken)); } else if (nextAtom == PpAtomElif) { if (elseSeen[elsetracker]) parseContext.ppError(ppToken->loc, "#elif after #else", "#elif", ""); } } inElseSkip = false; return token; } // Call when there should be no more tokens left on a line. int TPpContext::extraTokenCheck(int contextAtom, TPpToken* ppToken, int token) { if (token != '\n' && token != EndOfInput) { static const char* message = "unexpected tokens following directive"; const char* label; if (contextAtom == PpAtomElse) label = "#else"; else if (contextAtom == PpAtomElif) label = "#elif"; else if (contextAtom == PpAtomEndif) label = "#endif"; else if (contextAtom == PpAtomIf) label = "#if"; else if (contextAtom == PpAtomLine) label = "#line"; else label = ""; if (parseContext.relaxedErrors()) parseContext.ppWarn(ppToken->loc, message, label, ""); else parseContext.ppError(ppToken->loc, message, label, ""); while (token != '\n' && token != EndOfInput) token = scanToken(ppToken); } return token; } enum eval_prec { MIN_PRECEDENCE, COND, LOGOR, LOGAND, OR, XOR, AND, EQUAL, RELATION, SHIFT, ADD, MUL, UNARY, MAX_PRECEDENCE }; namespace { int op_logor(int a, int b) { return a || b; } int op_logand(int a, int b) { return a && b; } int op_or(int a, int b) { return a | b; } int op_xor(int a, int b) { return a ^ b; } int op_and(int a, int b) { return a & b; } int op_eq(int a, int b) { return a == b; } int op_ne(int a, int b) { return a != b; } int op_ge(int a, int b) { return a >= b; } int op_le(int a, int b) { return a <= b; } int op_gt(int a, int b) { return a > b; } int op_lt(int a, int b) { return a < b; } int op_shl(int a, int b) { return a << b; } int op_shr(int a, int b) { return a >> b; } int op_add(int a, int b) { return a + b; } int op_sub(int a, int b) { return a - b; } int op_mul(int a, int b) { return a * b; } int op_div(int a, int b) { return a == INT_MIN && b == -1 ? 0 : a / b; } int op_mod(int a, int b) { return a == INT_MIN && b == -1 ? 0 : a % b; } int op_pos(int a) { return a; } int op_neg(int a) { return a == INT_MIN ? INT_MIN : -a; } int op_cmpl(int a) { return ~a; } int op_not(int a) { return !a; } struct TBinop { int token, precedence, (*op)(int, int); } binop[] = { { PpAtomOr, LOGOR, op_logor }, { PpAtomAnd, LOGAND, op_logand }, { '|', OR, op_or }, { '^', XOR, op_xor }, { '&', AND, op_and }, { PpAtomEQ, EQUAL, op_eq }, { PpAtomNE, EQUAL, op_ne }, { '>', RELATION, op_gt }, { PpAtomGE, RELATION, op_ge }, { '<', RELATION, op_lt }, { PpAtomLE, RELATION, op_le }, { PpAtomLeft, SHIFT, op_shl }, { PpAtomRight, SHIFT, op_shr }, { '+', ADD, op_add }, { '-', ADD, op_sub }, { '*', MUL, op_mul }, { '/', MUL, op_div }, { '%', MUL, op_mod }, }; struct TUnop { int token, (*op)(int); } unop[] = { { '+', op_pos }, { '-', op_neg }, { '~', op_cmpl }, { '!', op_not }, }; } // anonymous namespace #define NUM_ELEMENTS(A) (sizeof(A) / sizeof(A[0])) int TPpContext::eval(int token, int precedence, bool shortCircuit, int& res, bool& err, TPpToken* ppToken) { TSourceLoc loc = ppToken->loc; // because we sometimes read the newline before reporting the error if (token == PpAtomIdentifier) { if (strcmp("defined", ppToken->name) == 0) { if (! parseContext.isReadingHLSL() && isMacroInput()) { if (parseContext.relaxedErrors()) parseContext.ppWarn(ppToken->loc, "nonportable when expanded from macros for preprocessor expression", "defined", ""); else parseContext.ppError(ppToken->loc, "cannot use in preprocessor expression when expanded from macros", "defined", ""); } bool needclose = 0; token = scanToken(ppToken); if (token == '(') { needclose = true; token = scanToken(ppToken); } if (token != PpAtomIdentifier) { parseContext.ppError(loc, "incorrect directive, expected identifier", "preprocessor evaluation", ""); err = true; res = 0; return token; } MacroSymbol* macro = lookupMacroDef(atomStrings.getAtom(ppToken->name)); res = macro != nullptr ? !macro->undef : 0; token = scanToken(ppToken); if (needclose) { if (token != ')') { parseContext.ppError(loc, "expected ')'", "preprocessor evaluation", ""); err = true; res = 0; return token; } token = scanToken(ppToken); } } else { token = tokenPaste(token, *ppToken); token = evalToToken(token, shortCircuit, res, err, ppToken); return eval(token, precedence, shortCircuit, res, err, ppToken); } } else if (token == PpAtomConstInt) { res = ppToken->ival; token = scanToken(ppToken); } else if (token == '(') { token = scanToken(ppToken); token = eval(token, MIN_PRECEDENCE, shortCircuit, res, err, ppToken); if (! err) { if (token != ')') { parseContext.ppError(loc, "expected ')'", "preprocessor evaluation", ""); err = true; res = 0; return token; } token = scanToken(ppToken); } } else { int op = NUM_ELEMENTS(unop) - 1; for (; op >= 0; op--) { if (unop[op].token == token) break; } if (op >= 0) { token = scanToken(ppToken); token = eval(token, UNARY, shortCircuit, res, err, ppToken); res = unop[op].op(res); } else { parseContext.ppError(loc, "bad expression", "preprocessor evaluation", ""); err = true; res = 0; return token; } } token = evalToToken(token, shortCircuit, res, err, ppToken); // Perform evaluation of binary operation, if there is one, otherwise we are done. while (! err) { if (token == ')' || token == '\n') break; int op; for (op = NUM_ELEMENTS(binop) - 1; op >= 0; op--) { if (binop[op].token == token) break; } if (op < 0 || binop[op].precedence <= precedence) break; int leftSide = res; // Setup short-circuiting, needed for ES, unless already in a short circuit. // (Once in a short-circuit, can't turn off again, until that whole subexpression is done. if (! shortCircuit) { if ((token == PpAtomOr && leftSide == 1) || (token == PpAtomAnd && leftSide == 0)) shortCircuit = true; } token = scanToken(ppToken); token = eval(token, binop[op].precedence, shortCircuit, res, err, ppToken); if (binop[op].op == op_div || binop[op].op == op_mod) { if (res == 0) { parseContext.ppError(loc, "division by 0", "preprocessor evaluation", ""); res = 1; } } res = binop[op].op(leftSide, res); } return token; } // Expand macros, skipping empty expansions, to get to the first real token in those expansions. int TPpContext::evalToToken(int token, bool shortCircuit, int& res, bool& err, TPpToken* ppToken) { while (token == PpAtomIdentifier && strcmp("defined", ppToken->name) != 0) { switch (MacroExpand(ppToken, true, false)) { case MacroExpandNotStarted: case MacroExpandError: parseContext.ppError(ppToken->loc, "can't evaluate expression", "preprocessor evaluation", ""); err = true; res = 0; break; case MacroExpandStarted: break; case MacroExpandUndef: if (! shortCircuit && parseContext.isEsProfile()) { const char* message = "undefined macro in expression not allowed in es profile"; if (parseContext.relaxedErrors()) parseContext.ppWarn(ppToken->loc, message, "preprocessor evaluation", ppToken->name); else parseContext.ppError(ppToken->loc, message, "preprocessor evaluation", ppToken->name); } break; } token = scanToken(ppToken); if (err) break; } return token; } // Handle #if int TPpContext::CPPif(TPpToken* ppToken) { int token = scanToken(ppToken); if (ifdepth >= maxIfNesting || elsetracker >= maxIfNesting) { parseContext.ppError(ppToken->loc, "maximum nesting depth exceeded", "#if", ""); return EndOfInput; } else { elsetracker++; ifdepth++; } int res = 0; bool err = false; token = eval(token, MIN_PRECEDENCE, false, res, err, ppToken); token = extraTokenCheck(PpAtomIf, ppToken, token); if (!res && !err) token = CPPelse(1, ppToken); return token; } // Handle #ifdef int TPpContext::CPPifdef(int defined, TPpToken* ppToken) { int token = scanToken(ppToken); if (ifdepth > maxIfNesting || elsetracker > maxIfNesting) { parseContext.ppError(ppToken->loc, "maximum nesting depth exceeded", "#ifdef", ""); return EndOfInput; } else { elsetracker++; ifdepth++; } if (token != PpAtomIdentifier) { if (defined) parseContext.ppError(ppToken->loc, "must be followed by macro name", "#ifdef", ""); else parseContext.ppError(ppToken->loc, "must be followed by macro name", "#ifndef", ""); } else { MacroSymbol* macro = lookupMacroDef(atomStrings.getAtom(ppToken->name)); token = scanToken(ppToken); if (token != '\n') { parseContext.ppError(ppToken->loc, "unexpected tokens following #ifdef directive - expected a newline", "#ifdef", ""); while (token != '\n' && token != EndOfInput) token = scanToken(ppToken); } if (((macro != nullptr && !macro->undef) ? 1 : 0) != defined) token = CPPelse(1, ppToken); } return token; } // Handle #include ... // TODO: Handle macro expansions for the header name int TPpContext::CPPinclude(TPpToken* ppToken) { const TSourceLoc directiveLoc = ppToken->loc; bool startWithLocalSearch = true; // to additionally include the extra "" paths int token; // Find the first non-whitespace char after #include int ch = getChar(); while (ch == ' ' || ch == '\t') { ch = getChar(); } if (ch == '<') { // style startWithLocalSearch = false; token = scanHeaderName(ppToken, '>'); } else if (ch == '"') { // "header-name" style token = scanHeaderName(ppToken, '"'); } else { // unexpected, get the full token to generate the error ungetChar(); token = scanToken(ppToken); } if (token != PpAtomConstString) { parseContext.ppError(directiveLoc, "must be followed by a header name", "#include", ""); return token; } // Make a copy of the name because it will be overwritten by the next token scan. const std::string filename = ppToken->name; // See if the directive was well formed token = scanToken(ppToken); if (token != '\n') { if (token == EndOfInput) parseContext.ppError(ppToken->loc, "expected newline after header name:", "#include", "%s", filename.c_str()); else parseContext.ppError(ppToken->loc, "extra content after header name:", "#include", "%s", filename.c_str()); return token; } // Process well-formed directive // Find the inclusion, first look in "Local" ("") paths, if requested, // otherwise, only search the "System" (<>) paths. TShader::Includer::IncludeResult* res = nullptr; if (startWithLocalSearch) res = includer.includeLocal(filename.c_str(), currentSourceFile.c_str(), includeStack.size() + 1); if (res == nullptr || res->headerName.empty()) { includer.releaseInclude(res); res = includer.includeSystem(filename.c_str(), currentSourceFile.c_str(), includeStack.size() + 1); } // Process the results if (res != nullptr && !res->headerName.empty()) { if (res->headerData != nullptr && res->headerLength > 0) { // path for processing one or more tokens from an included header, hand off 'res' const bool forNextLine = parseContext.lineDirectiveShouldSetNextLine(); std::ostringstream prologue; std::ostringstream epilogue; prologue << "#line " << forNextLine << " " << "\"" << res->headerName << "\"\n"; epilogue << (res->headerData[res->headerLength - 1] == '\n'? "" : "\n") << "#line " << directiveLoc.line + forNextLine << " " << directiveLoc.getStringNameOrNum() << "\n"; pushInput(new TokenizableIncludeFile(directiveLoc, prologue.str(), res, epilogue.str(), this)); parseContext.intermediate.addIncludeText(res->headerName.c_str(), res->headerData, res->headerLength); // There's no "current" location anymore. parseContext.setCurrentColumn(0); } else { // things are okay, but there is nothing to process includer.releaseInclude(res); } } else { // error path, clean up std::string message = res != nullptr ? std::string(res->headerData, res->headerLength) : std::string("Could not process include directive"); parseContext.ppError(directiveLoc, message.c_str(), "#include", "for header name: %s", filename.c_str()); includer.releaseInclude(res); } return token; } // Handle #line int TPpContext::CPPline(TPpToken* ppToken) { // "#line must have, after macro substitution, one of the following forms: // "#line line // "#line line source-string-number" int token = scanToken(ppToken); const TSourceLoc directiveLoc = ppToken->loc; if (token == '\n') { parseContext.ppError(ppToken->loc, "must by followed by an integral literal", "#line", ""); return token; } int lineRes = 0; // Line number after macro expansion. int lineToken = 0; bool hasFile = false; int fileRes = 0; // Source file number after macro expansion. const char* sourceName = nullptr; // Optional source file name. bool lineErr = false; bool fileErr = false; disableEscapeSequences = true; token = eval(token, MIN_PRECEDENCE, false, lineRes, lineErr, ppToken); disableEscapeSequences = false; if (! lineErr) { lineToken = lineRes; if (token == '\n') ++lineRes; if (parseContext.lineDirectiveShouldSetNextLine()) --lineRes; parseContext.setCurrentLine(lineRes); if (token != '\n') { if (token == PpAtomConstString) { parseContext.ppRequireExtensions(directiveLoc, 1, &E_GL_GOOGLE_cpp_style_line_directive, "filename-based #line"); // We need to save a copy of the string instead of pointing // to the name field of the token since the name field // will likely be overwritten by the next token scan. sourceName = atomStrings.getString(atomStrings.getAddAtom(ppToken->name)); parseContext.setCurrentSourceName(sourceName); hasFile = true; token = scanToken(ppToken); } else { token = eval(token, MIN_PRECEDENCE, false, fileRes, fileErr, ppToken); if (! fileErr) { parseContext.setCurrentString(fileRes); hasFile = true; } } } } if (!fileErr && !lineErr) { parseContext.notifyLineDirective(directiveLoc.line, lineToken, hasFile, fileRes, sourceName); } token = extraTokenCheck(PpAtomLine, ppToken, token); return token; } // Handle #error int TPpContext::CPPerror(TPpToken* ppToken) { disableEscapeSequences = true; int token = scanToken(ppToken); disableEscapeSequences = false; std::string message; TSourceLoc loc = ppToken->loc; while (token != '\n' && token != EndOfInput) { if (token == PpAtomConstInt16 || token == PpAtomConstUint16 || token == PpAtomConstInt || token == PpAtomConstUint || token == PpAtomConstInt64 || token == PpAtomConstUint64 || token == PpAtomConstFloat16 || token == PpAtomConstFloat || token == PpAtomConstDouble) { message.append(ppToken->name); } else if (token == PpAtomIdentifier || token == PpAtomConstString) { message.append(ppToken->name); } else { message.append(atomStrings.getString(token)); } message.append(" "); token = scanToken(ppToken); } parseContext.notifyErrorDirective(loc.line, message.c_str()); // store this msg into the shader's information log..set the Compile Error flag!!!! parseContext.ppError(loc, message.c_str(), "#error", ""); return '\n'; } // Handle #pragma int TPpContext::CPPpragma(TPpToken* ppToken) { char SrcStrName[2]; TVector tokens; TSourceLoc loc = ppToken->loc; // because we go to the next line before processing int token = scanToken(ppToken); while (token != '\n' && token != EndOfInput) { switch (token) { case PpAtomIdentifier: case PpAtomConstInt: case PpAtomConstUint: case PpAtomConstInt64: case PpAtomConstUint64: case PpAtomConstInt16: case PpAtomConstUint16: case PpAtomConstFloat: case PpAtomConstDouble: case PpAtomConstFloat16: tokens.push_back(ppToken->name); break; default: SrcStrName[0] = (char)token; SrcStrName[1] = '\0'; tokens.push_back(SrcStrName); } token = scanToken(ppToken); } if (token == EndOfInput) parseContext.ppError(loc, "directive must end with a newline", "#pragma", ""); else parseContext.handlePragma(loc, tokens); return token; } // #version: This is just for error checking: the version and profile are decided before preprocessing starts int TPpContext::CPPversion(TPpToken* ppToken) { int token = scanToken(ppToken); if (errorOnVersion || versionSeen) { if (parseContext.isReadingHLSL()) parseContext.ppError(ppToken->loc, "invalid preprocessor command", "#version", ""); else parseContext.ppError(ppToken->loc, "must occur first in shader", "#version", ""); } versionSeen = true; if (token == '\n') { parseContext.ppError(ppToken->loc, "must be followed by version number", "#version", ""); return token; } if (token != PpAtomConstInt) parseContext.ppError(ppToken->loc, "must be followed by version number", "#version", ""); ppToken->ival = atoi(ppToken->name); int versionNumber = ppToken->ival; int line = ppToken->loc.line; token = scanToken(ppToken); if (token == '\n') { parseContext.notifyVersion(line, versionNumber, nullptr); return token; } else { int profileAtom = atomStrings.getAtom(ppToken->name); if (profileAtom != PpAtomCore && profileAtom != PpAtomCompatibility && profileAtom != PpAtomEs) parseContext.ppError(ppToken->loc, "bad profile name; use es, core, or compatibility", "#version", ""); parseContext.notifyVersion(line, versionNumber, ppToken->name); token = scanToken(ppToken); if (token == '\n') return token; else parseContext.ppError(ppToken->loc, "bad tokens following profile -- expected newline", "#version", ""); } return token; } // Handle #extension int TPpContext::CPPextension(TPpToken* ppToken) { int line = ppToken->loc.line; int token = scanToken(ppToken); char extensionName[MaxTokenLength + 1]; if (token=='\n') { parseContext.ppError(ppToken->loc, "extension name not specified", "#extension", ""); return token; } if (token != PpAtomIdentifier) parseContext.ppError(ppToken->loc, "extension name expected", "#extension", ""); snprintf(extensionName, sizeof(extensionName), "%s", ppToken->name); token = scanToken(ppToken); if (token != ':') { parseContext.ppError(ppToken->loc, "':' missing after extension name", "#extension", ""); return token; } token = scanToken(ppToken); if (token != PpAtomIdentifier) { parseContext.ppError(ppToken->loc, "behavior for extension not specified", "#extension", ""); return token; } parseContext.updateExtensionBehavior(line, extensionName, ppToken->name); parseContext.notifyExtensionDirective(line, extensionName, ppToken->name); token = scanToken(ppToken); if (token == '\n') return token; else parseContext.ppError(ppToken->loc, "extra tokens -- expected newline", "#extension",""); return token; } int TPpContext::readCPPline(TPpToken* ppToken) { int token = scanToken(ppToken); if (token == PpAtomIdentifier) { switch (atomStrings.getAtom(ppToken->name)) { case PpAtomDefine: token = CPPdefine(ppToken); break; case PpAtomElse: if (elseSeen[elsetracker]) parseContext.ppError(ppToken->loc, "#else after #else", "#else", ""); elseSeen[elsetracker] = true; if (ifdepth == 0) parseContext.ppError(ppToken->loc, "mismatched statements", "#else", ""); token = extraTokenCheck(PpAtomElse, ppToken, scanToken(ppToken)); token = CPPelse(0, ppToken); break; case PpAtomElif: if (ifdepth == 0) parseContext.ppError(ppToken->loc, "mismatched statements", "#elif", ""); if (elseSeen[elsetracker]) parseContext.ppError(ppToken->loc, "#elif after #else", "#elif", ""); // this token is really a dont care, but we still need to eat the tokens token = scanToken(ppToken); while (token != '\n' && token != EndOfInput) token = scanToken(ppToken); token = CPPelse(0, ppToken); break; case PpAtomEndif: if (ifdepth == 0) parseContext.ppError(ppToken->loc, "mismatched statements", "#endif", ""); else { elseSeen[elsetracker] = false; --elsetracker; --ifdepth; } token = extraTokenCheck(PpAtomEndif, ppToken, scanToken(ppToken)); break; case PpAtomIf: token = CPPif(ppToken); break; case PpAtomIfdef: token = CPPifdef(1, ppToken); break; case PpAtomIfndef: token = CPPifdef(0, ppToken); break; case PpAtomLine: token = CPPline(ppToken); break; case PpAtomInclude: if(!parseContext.isReadingHLSL()) { const std::array exts = { E_GL_GOOGLE_include_directive, E_GL_ARB_shading_language_include }; parseContext.ppRequireExtensions(ppToken->loc, exts, "#include"); } token = CPPinclude(ppToken); break; case PpAtomPragma: token = CPPpragma(ppToken); break; case PpAtomUndef: token = CPPundef(ppToken); break; case PpAtomError: token = CPPerror(ppToken); break; case PpAtomVersion: token = CPPversion(ppToken); break; case PpAtomExtension: token = CPPextension(ppToken); break; default: parseContext.ppError(ppToken->loc, "invalid directive:", "#", ppToken->name); break; } } else if (token != '\n' && token != EndOfInput) parseContext.ppError(ppToken->loc, "invalid directive", "#", ""); while (token != '\n' && token != EndOfInput) token = scanToken(ppToken); return token; } // Context-dependent parsing of a #include . // Assumes no macro expansions etc. are being done; the name is just on the current input. // Always creates a name and returns PpAtomicConstString, unless we run out of input. int TPpContext::scanHeaderName(TPpToken* ppToken, char delimit) { bool tooLong = false; if (inputStack.empty()) return EndOfInput; int len = 0; ppToken->name[0] = '\0'; do { int ch = inputStack.back()->getch(); // done yet? if (ch == delimit) { ppToken->name[len] = '\0'; if (tooLong) parseContext.ppError(ppToken->loc, "header name too long", "", ""); return PpAtomConstString; } else if (ch == EndOfInput) return EndOfInput; // found a character to expand the name with if (len < MaxTokenLength) ppToken->name[len++] = (char)ch; else tooLong = true; } while (true); } // Macro-expand a macro argument 'arg' to create 'expandedArg'. // Does not replace 'arg'. // Returns nullptr if no expanded argument is created. TPpContext::TokenStream* TPpContext::PrescanMacroArg(TokenStream& arg, TPpToken* ppToken, bool newLineOkay) { // expand the argument TokenStream* expandedArg = new TokenStream; pushInput(new tMarkerInput(this)); pushTokenStreamInput(arg); int token; while ((token = scanToken(ppToken)) != tMarkerInput::marker && token != EndOfInput) { token = tokenPaste(token, *ppToken); if (token == PpAtomIdentifier) { switch (MacroExpand(ppToken, false, newLineOkay)) { case MacroExpandNotStarted: break; case MacroExpandError: // toss the rest of the pushed-input argument by scanning until tMarkerInput while ((token = scanToken(ppToken)) != tMarkerInput::marker && token != EndOfInput) ; break; case MacroExpandStarted: case MacroExpandUndef: continue; } } if (token == tMarkerInput::marker || token == EndOfInput) break; expandedArg->putToken(token, ppToken); } if (token != tMarkerInput::marker) { // Error, or MacroExpand ate the marker, so had bad input, recover delete expandedArg; expandedArg = nullptr; } return expandedArg; } // // Return the next token for a macro expansion, handling macro arguments, // whose semantics are dependent on being adjacent to ##. // int TPpContext::tMacroInput::scan(TPpToken* ppToken) { int token; do { token = mac->body.getToken(pp->parseContext, ppToken); } while (token == ' '); // handle white space in macro // Hash operators basically turn off a round of macro substitution // (the round done on the argument before the round done on the RHS of the // macro definition): // // "A parameter in the replacement list, unless preceded by a # or ## // preprocessing token or followed by a ## preprocessing token (see below), // is replaced by the corresponding argument after all macros contained // therein have been expanded." // // "If, in the replacement list, a parameter is immediately preceded or // followed by a ## preprocessing token, the parameter is replaced by the // corresponding argument's preprocessing token sequence." bool pasting = false; if (postpaste) { // don't expand next token pasting = true; postpaste = false; } if (prepaste) { // already know we should be on a ##, verify assert(token == PpAtomPaste); prepaste = false; postpaste = true; } // see if are preceding a ## if (mac->body.peekUntokenizedPasting()) { prepaste = true; pasting = true; } // TODO: preprocessor: properly handle whitespace (or lack of it) between tokens when expanding if (token == PpAtomIdentifier) { int i; for (i = (int)mac->args.size() - 1; i >= 0; i--) if (strcmp(pp->atomStrings.getString(mac->args[i]), ppToken->name) == 0) break; if (i >= 0) { TokenStream* arg = expandedArgs[i]; bool expanded = !!arg && !pasting; // HLSL does expand macros before concatenation if (arg == nullptr || (pasting && !pp->parseContext.isReadingHLSL()) ) { arg = args[i]; } pp->pushTokenStreamInput(*arg, prepaste, expanded); return pp->scanToken(ppToken); } } if (token == EndOfInput) mac->busy = 0; return token; } // return a textual zero, for scanning a macro that was never defined int TPpContext::tZeroInput::scan(TPpToken* ppToken) { if (done) return EndOfInput; ppToken->name[0] = '0'; ppToken->name[1] = 0; ppToken->ival = 0; ppToken->space = false; done = true; return PpAtomConstInt; } // // Check a token to see if it is a macro that should be expanded: // - If it is, and defined, push a tInput that will produce the appropriate // expansion and return MacroExpandStarted. // - If it is, but undefined, and expandUndef is requested, push a tInput // that will expand to 0 and return MacroExpandUndef. // - Otherwise, there is no expansion, and there are two cases: // * It might be okay there is no expansion, and no specific error was // detected. Returns MacroExpandNotStarted. // * The expansion was started, but could not be completed, due to an error // that cannot be recovered from. Returns MacroExpandError. // MacroExpandResult TPpContext::MacroExpand(TPpToken* ppToken, bool expandUndef, bool newLineOkay) { ppToken->space = false; int macroAtom = atomStrings.getAtom(ppToken->name); if (ppToken->fullyExpanded) return MacroExpandNotStarted; switch (macroAtom) { case PpAtomLineMacro: // Arguments which are macro have been replaced in the first stage. if (ppToken->ival == 0) ppToken->ival = parseContext.getCurrentLoc().line; snprintf(ppToken->name, sizeof(ppToken->name), "%d", ppToken->ival); UngetToken(PpAtomConstInt, ppToken); return MacroExpandStarted; case PpAtomFileMacro: { if (parseContext.getCurrentLoc().name) parseContext.ppRequireExtensions(ppToken->loc, 1, &E_GL_GOOGLE_cpp_style_line_directive, "filename-based __FILE__"); ppToken->ival = parseContext.getCurrentLoc().string; snprintf(ppToken->name, sizeof(ppToken->name), "%s", ppToken->loc.getStringNameOrNum().c_str()); UngetToken(PpAtomConstInt, ppToken); return MacroExpandStarted; } case PpAtomVersionMacro: ppToken->ival = parseContext.version; snprintf(ppToken->name, sizeof(ppToken->name), "%d", ppToken->ival); UngetToken(PpAtomConstInt, ppToken); return MacroExpandStarted; default: break; } MacroSymbol* macro = macroAtom == 0 ? nullptr : lookupMacroDef(macroAtom); // no recursive expansions if (macro != nullptr && macro->busy) { ppToken->fullyExpanded = true; return MacroExpandNotStarted; } // not expanding undefined macros if ((macro == nullptr || macro->undef) && ! expandUndef) return MacroExpandNotStarted; // 0 is the value of an undefined macro if ((macro == nullptr || macro->undef) && expandUndef) { pushInput(new tZeroInput(this)); return MacroExpandUndef; } tMacroInput *in = new tMacroInput(this); TSourceLoc loc = ppToken->loc; // in case we go to the next line before discovering the error in->mac = macro; if (macro->functionLike) { // We don't know yet if this will be a successful call of a // function-like macro; need to look for a '(', but without trashing // the passed in ppToken, until we know we are no longer speculative. TPpToken parenToken; int token = scanToken(&parenToken); if (newLineOkay) { while (token == '\n') token = scanToken(&parenToken); } if (token != '(') { // Function-like macro called with object-like syntax: okay, don't expand. // (We ate exactly one token that might not be white space; put it back. UngetToken(token, &parenToken); delete in; return MacroExpandNotStarted; } in->args.resize(in->mac->args.size()); for (size_t i = 0; i < in->mac->args.size(); i++) in->args[i] = new TokenStream; in->expandedArgs.resize(in->mac->args.size()); for (size_t i = 0; i < in->mac->args.size(); i++) in->expandedArgs[i] = nullptr; size_t arg = 0; bool tokenRecorded = false; do { TVector nestStack; while (true) { token = scanToken(ppToken); if (token == EndOfInput || token == tMarkerInput::marker) { parseContext.ppError(loc, "End of input in macro", "macro expansion", atomStrings.getString(macroAtom)); delete in; return MacroExpandError; } if (token == '\n') { if (! newLineOkay) { parseContext.ppError(loc, "End of line in macro substitution:", "macro expansion", atomStrings.getString(macroAtom)); delete in; return MacroExpandError; } continue; } if (token == '#') { parseContext.ppError(ppToken->loc, "unexpected '#'", "macro expansion", atomStrings.getString(macroAtom)); delete in; return MacroExpandError; } if (in->mac->args.size() == 0 && token != ')') break; if (nestStack.size() == 0 && (token == ',' || token == ')')) break; if (token == '(') nestStack.push_back(')'); else if (token == '{' && parseContext.isReadingHLSL()) nestStack.push_back('}'); else if (nestStack.size() > 0 && token == nestStack.back()) nestStack.pop_back(); //Macro replacement list is expanded in the last stage. if (atomStrings.getAtom(ppToken->name) == PpAtomLineMacro) ppToken->ival = parseContext.getCurrentLoc().line; in->args[arg]->putToken(token, ppToken); tokenRecorded = true; } // end of single argument scan if (token == ')') { // closing paren of call if (in->mac->args.size() == 1 && !tokenRecorded) break; arg++; break; } arg++; } while (arg < in->mac->args.size()); // end of all arguments scan if (arg < in->mac->args.size()) parseContext.ppError(loc, "Too few args in Macro", "macro expansion", atomStrings.getString(macroAtom)); else if (token != ')') { // Error recover code; find end of call, if possible int depth = 0; while (token != EndOfInput && (depth > 0 || token != ')')) { if (token == ')' || token == '}') depth--; token = scanToken(ppToken); if (token == '(' || token == '{') depth++; } if (token == EndOfInput) { parseContext.ppError(loc, "End of input in macro", "macro expansion", atomStrings.getString(macroAtom)); delete in; return MacroExpandError; } parseContext.ppError(loc, "Too many args in macro", "macro expansion", atomStrings.getString(macroAtom)); } // We need both expanded and non-expanded forms of the argument, for whether or // not token pasting will be applied later when the argument is consumed next to ##. for (size_t i = 0; i < in->mac->args.size(); i++) in->expandedArgs[i] = PrescanMacroArg(*in->args[i], ppToken, newLineOkay); } pushInput(in); macro->busy = 1; macro->body.reset(); return MacroExpandStarted; } } // end namespace glslang ================================================ FILE: src/libraries/glslang/glslang/MachineIndependent/preprocessor/PpAtom.cpp ================================================ // // Copyright (C) 2002-2005 3Dlabs Inc. Ltd. // Copyright (C) 2013 LunarG, Inc. // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following // disclaimer in the documentation and/or other materials provided // with the distribution. // // Neither the name of 3Dlabs Inc. Ltd. nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // /****************************************************************************\ Copyright (c) 2002, NVIDIA Corporation. NVIDIA Corporation("NVIDIA") supplies this software to you in consideration of your agreement to the following terms, and your use, installation, modification or redistribution of this NVIDIA software constitutes acceptance of these terms. If you do not agree with these terms, please do not use, install, modify or redistribute this NVIDIA software. In consideration of your agreement to abide by the following terms, and subject to these terms, NVIDIA grants you a personal, non-exclusive license, under NVIDIA's copyrights in this original NVIDIA software (the "NVIDIA Software"), to use, reproduce, modify and redistribute the NVIDIA Software, with or without modifications, in source and/or binary forms; provided that if you redistribute the NVIDIA Software, you must retain the copyright notice of NVIDIA, this notice and the following text and disclaimers in all such redistributions of the NVIDIA Software. Neither the name, trademarks, service marks nor logos of NVIDIA Corporation may be used to endorse or promote products derived from the NVIDIA Software without specific prior written permission from NVIDIA. Except as expressly stated in this notice, no other rights or licenses express or implied, are granted by NVIDIA herein, including but not limited to any patent rights that may be infringed by your derivative works or by other works in which the NVIDIA Software may be incorporated. No hardware is licensed hereunder. THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR ITS USE AND OPERATION EITHER ALONE OR IN COMBINATION WITH OTHER PRODUCTS. IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL, EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, LOST PROFITS; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) OR ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE NVIDIA SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \****************************************************************************/ #ifndef _CRT_SECURE_NO_WARNINGS #define _CRT_SECURE_NO_WARNINGS #endif #include #include #include #include "PpContext.h" #include "PpTokens.h" namespace { using namespace glslang; const struct { int val; const char* str; } tokens[] = { { PPAtomAddAssign, "+=" }, { PPAtomSubAssign, "-=" }, { PPAtomMulAssign, "*=" }, { PPAtomDivAssign, "/=" }, { PPAtomModAssign, "%=" }, { PpAtomRight, ">>" }, { PpAtomLeft, "<<" }, { PpAtomAnd, "&&" }, { PpAtomOr, "||" }, { PpAtomXor, "^^" }, { PpAtomRightAssign, ">>=" }, { PpAtomLeftAssign, "<<=" }, { PpAtomAndAssign, "&=" }, { PpAtomOrAssign, "|=" }, { PpAtomXorAssign, "^=" }, { PpAtomEQ, "==" }, { PpAtomNE, "!=" }, { PpAtomGE, ">=" }, { PpAtomLE, "<=" }, { PpAtomDecrement, "--" }, { PpAtomIncrement, "++" }, { PpAtomColonColon, "::" }, { PpAtomDefine, "define" }, { PpAtomUndef, "undef" }, { PpAtomIf, "if" }, { PpAtomElif, "elif" }, { PpAtomElse, "else" }, { PpAtomEndif, "endif" }, { PpAtomIfdef, "ifdef" }, { PpAtomIfndef, "ifndef" }, { PpAtomLine, "line" }, { PpAtomPragma, "pragma" }, { PpAtomError, "error" }, { PpAtomVersion, "version" }, { PpAtomCore, "core" }, { PpAtomCompatibility, "compatibility" }, { PpAtomEs, "es" }, { PpAtomExtension, "extension" }, { PpAtomLineMacro, "__LINE__" }, { PpAtomFileMacro, "__FILE__" }, { PpAtomVersionMacro, "__VERSION__" }, { PpAtomInclude, "include" }, }; } // end anonymous namespace namespace glslang { // // Initialize the atom table. // TStringAtomMap::TStringAtomMap() { badToken.assign(""); // Add single character tokens to the atom table: const char* s = "~!%^&*()-+=|,.<>/?;:[]{}#\\"; char t[2]; t[1] = '\0'; while (*s) { t[0] = *s; addAtomFixed(t, s[0]); s++; } // Add multiple character scanner tokens : for (size_t ii = 0; ii < sizeof(tokens)/sizeof(tokens[0]); ii++) addAtomFixed(tokens[ii].str, tokens[ii].val); nextAtom = PpAtomLast; } } // end namespace glslang ================================================ FILE: src/libraries/glslang/glslang/MachineIndependent/preprocessor/PpContext.cpp ================================================ // // Copyright (C) 2002-2005 3Dlabs Inc. Ltd. // Copyright (C) 2013 LunarG, Inc. // Copyright (C) 2015-2018 Google, Inc. // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following // disclaimer in the documentation and/or other materials provided // with the distribution. // // Neither the name of 3Dlabs Inc. Ltd. nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // /****************************************************************************\ Copyright (c) 2002, NVIDIA Corporation. NVIDIA Corporation("NVIDIA") supplies this software to you in consideration of your agreement to the following terms, and your use, installation, modification or redistribution of this NVIDIA software constitutes acceptance of these terms. If you do not agree with these terms, please do not use, install, modify or redistribute this NVIDIA software. In consideration of your agreement to abide by the following terms, and subject to these terms, NVIDIA grants you a personal, non-exclusive license, under NVIDIA's copyrights in this original NVIDIA software (the "NVIDIA Software"), to use, reproduce, modify and redistribute the NVIDIA Software, with or without modifications, in source and/or binary forms; provided that if you redistribute the NVIDIA Software, you must retain the copyright notice of NVIDIA, this notice and the following text and disclaimers in all such redistributions of the NVIDIA Software. Neither the name, trademarks, service marks nor logos of NVIDIA Corporation may be used to endorse or promote products derived from the NVIDIA Software without specific prior written permission from NVIDIA. Except as expressly stated in this notice, no other rights or licenses express or implied, are granted by NVIDIA herein, including but not limited to any patent rights that may be infringed by your derivative works or by other works in which the NVIDIA Software may be incorporated. No hardware is licensed hereunder. THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR ITS USE AND OPERATION EITHER ALONE OR IN COMBINATION WITH OTHER PRODUCTS. IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL, EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, LOST PROFITS; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) OR ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE NVIDIA SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \****************************************************************************/ #include #include #include "PpContext.h" namespace glslang { TPpContext::TPpContext(TParseContextBase& pc, const std::string& rootFileName, TShader::Includer& inclr) : preamble(nullptr), strings(nullptr), previous_token('\n'), parseContext(pc), includer(inclr), inComment(false), rootFileName(rootFileName), currentSourceFile(rootFileName), disableEscapeSequences(false), inElseSkip(false) { ifdepth = 0; for (elsetracker = 0; elsetracker < maxIfNesting; elsetracker++) elseSeen[elsetracker] = false; elsetracker = 0; strtodStream.imbue(std::locale::classic()); } TPpContext::~TPpContext() { delete [] preamble; // free up the inputStack while (! inputStack.empty()) popInput(); } void TPpContext::setInput(TInputScanner& input, bool versionWillBeError) { assert(inputStack.size() == 0); pushInput(new tStringInput(this, input)); errorOnVersion = versionWillBeError; versionSeen = false; } } // end namespace glslang ================================================ FILE: src/libraries/glslang/glslang/MachineIndependent/preprocessor/PpContext.h ================================================ // // Copyright (C) 2013 LunarG, Inc. // Copyright (C) 2015-2018 Google, Inc. // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following // disclaimer in the documentation and/or other materials provided // with the distribution. // // Neither the name of 3Dlabs Inc. Ltd. nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // /****************************************************************************\ Copyright (c) 2002, NVIDIA Corporation. NVIDIA Corporation("NVIDIA") supplies this software to you in consideration of your agreement to the following terms, and your use, installation, modification or redistribution of this NVIDIA software constitutes acceptance of these terms. If you do not agree with these terms, please do not use, install, modify or redistribute this NVIDIA software. In consideration of your agreement to abide by the following terms, and subject to these terms, NVIDIA grants you a personal, non-exclusive license, under NVIDIA's copyrights in this original NVIDIA software (the "NVIDIA Software"), to use, reproduce, modify and redistribute the NVIDIA Software, with or without modifications, in source and/or binary forms; provided that if you redistribute the NVIDIA Software, you must retain the copyright notice of NVIDIA, this notice and the following text and disclaimers in all such redistributions of the NVIDIA Software. Neither the name, trademarks, service marks nor logos of NVIDIA Corporation may be used to endorse or promote products derived from the NVIDIA Software without specific prior written permission from NVIDIA. Except as expressly stated in this notice, no other rights or licenses express or implied, are granted by NVIDIA herein, including but not limited to any patent rights that may be infringed by your derivative works or by other works in which the NVIDIA Software may be incorporated. No hardware is licensed hereunder. THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR ITS USE AND OPERATION EITHER ALONE OR IN COMBINATION WITH OTHER PRODUCTS. IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL, EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, LOST PROFITS; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) OR ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE NVIDIA SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \****************************************************************************/ #ifndef PPCONTEXT_H #define PPCONTEXT_H #include #include #include #include "../ParseHelper.h" #include "PpTokens.h" namespace glslang { class TPpToken { public: TPpToken() { clear(); } void clear() { space = false; i64val = 0; loc.init(); name[0] = 0; fullyExpanded = false; } // Used for comparing macro definitions, so checks what is relevant for that. bool operator==(const TPpToken& right) const { return space == right.space && ival == right.ival && dval == right.dval && i64val == right.i64val && strncmp(name, right.name, MaxTokenLength) == 0; } bool operator!=(const TPpToken& right) const { return ! operator==(right); } TSourceLoc loc; // True if a space (for white space or a removed comment) should also be // recognized, in front of the token returned: bool space; bool fullyExpanded; // Numeric value of the token: union { int ival; double dval; long long i64val; }; // Text string of the token: char name[MaxTokenLength + 1]; }; class TStringAtomMap { // // Implementation is in PpAtom.cpp // // Maintain a bi-directional mapping between relevant preprocessor strings and // "atoms" which a unique integers (small, contiguous, not hash-like) per string. // public: TStringAtomMap(); // Map string -> atom. // Return 0 if no existing string. int getAtom(const char* s) const { auto it = atomMap.find(s); return it == atomMap.end() ? 0 : it->second; } // Map a new or existing string -> atom, inventing a new atom if necessary. int getAddAtom(const char* s) { int atom = getAtom(s); if (atom == 0) { atom = nextAtom++; addAtomFixed(s, atom); } return atom; } // Map atom -> string. const char* getString(int atom) const { return stringMap[atom]->c_str(); } protected: TStringAtomMap(TStringAtomMap&); TStringAtomMap& operator=(TStringAtomMap&); TUnorderedMap atomMap; TVector stringMap; // these point into the TString in atomMap int nextAtom; // Bad source characters can lead to bad atoms, so gracefully handle those by // pre-filling the table with them (to avoid if tests later). TString badToken; // Add bi-directional mappings: // - string -> atom // - atom -> string void addAtomFixed(const char* s, int atom) { auto it = atomMap.insert(std::pair(s, atom)).first; if (stringMap.size() < (size_t)atom + 1) stringMap.resize(atom + 100, &badToken); stringMap[atom] = &it->first; } }; class TInputScanner; enum MacroExpandResult { MacroExpandNotStarted, // macro not expanded, which might not be an error MacroExpandError, // a clear error occurred while expanding, no expansion MacroExpandStarted, // macro expansion process has started MacroExpandUndef // macro is undefined and will be expanded }; // This class is the result of turning a huge pile of C code communicating through globals // into a class. This was done to allowing instancing to attain thread safety. // Don't expect too much in terms of OO design. class TPpContext { public: TPpContext(TParseContextBase&, const std::string& rootFileName, TShader::Includer&); virtual ~TPpContext(); void setPreamble(const char* preamble, size_t length); int tokenize(TPpToken& ppToken); int tokenPaste(int token, TPpToken&); class tInput { public: tInput(TPpContext* p) : done(false), pp(p) { } virtual ~tInput() { } virtual int scan(TPpToken*) = 0; virtual int getch() = 0; virtual void ungetch() = 0; virtual bool peekPasting() { return false; } // true when about to see ## virtual bool peekContinuedPasting(int) { return false; } // true when non-spaced tokens can paste virtual bool endOfReplacementList() { return false; } // true when at the end of a macro replacement list (RHS of #define) virtual bool isMacroInput() { return false; } virtual bool isStringInput() { return false; } // Will be called when we start reading tokens from this instance virtual void notifyActivated() {} // Will be called when we do not read tokens from this instance anymore virtual void notifyDeleted() {} protected: bool done; TPpContext* pp; }; void setInput(TInputScanner& input, bool versionWillBeError); void pushInput(tInput* in) { inputStack.push_back(in); in->notifyActivated(); } void popInput() { inputStack.back()->notifyDeleted(); delete inputStack.back(); inputStack.pop_back(); } // // From PpTokens.cpp // // Capture the needed parts of a token stream for macro recording/playback. class TokenStream { public: // Manage a stream of these 'Token', which capture the relevant parts // of a TPpToken, plus its atom. class Token { public: Token(int atom, const TPpToken& ppToken) : atom(atom), space(ppToken.space), i64val(ppToken.i64val), name(ppToken.name) { } int get(TPpToken& ppToken) { ppToken.clear(); ppToken.space = space; ppToken.i64val = i64val; snprintf(ppToken.name, sizeof(ppToken.name), "%s", name.c_str()); return atom; } bool isAtom(int a) const { return atom == a; } int getAtom() const { return atom; } bool nonSpaced() const { return !space; } protected: Token() {} int atom; bool space; // did a space precede the token? long long i64val; TString name; }; TokenStream() : currentPos(0) { } void putToken(int token, TPpToken* ppToken); bool peekToken(int atom) { return !atEnd() && stream[currentPos].isAtom(atom); } bool peekContinuedPasting(int atom) { // This is basically necessary because, for example, the PP // tokenizer only accepts valid numeric-literals plus suffixes, so // separates numeric-literals plus bad suffix into two tokens, which // should get both pasted together as one token when token pasting. // // The following code is a bit more generalized than the above example. if (!atEnd() && atom == PpAtomIdentifier && stream[currentPos].nonSpaced()) { switch(stream[currentPos].getAtom()) { case PpAtomConstInt: case PpAtomConstUint: case PpAtomConstInt64: case PpAtomConstUint64: case PpAtomConstInt16: case PpAtomConstUint16: case PpAtomConstFloat: case PpAtomConstDouble: case PpAtomConstFloat16: case PpAtomConstString: case PpAtomIdentifier: return true; default: break; } } return false; } int getToken(TParseContextBase&, TPpToken*); bool atEnd() { return currentPos >= stream.size(); } bool peekTokenizedPasting(bool lastTokenPastes); bool peekUntokenizedPasting(); void reset() { currentPos = 0; } protected: TVector stream; size_t currentPos; }; // // From Pp.cpp // struct MacroSymbol { MacroSymbol() : functionLike(0), busy(0), undef(0) { } TVector args; TokenStream body; unsigned functionLike : 1; // 0 means object-like, 1 means function-like unsigned busy : 1; unsigned undef : 1; }; typedef TMap TSymbolMap; TSymbolMap macroDefs; // map atoms to macro definitions MacroSymbol* lookupMacroDef(int atom) { auto existingMacroIt = macroDefs.find(atom); return (existingMacroIt == macroDefs.end()) ? nullptr : &(existingMacroIt->second); } void addMacroDef(int atom, MacroSymbol& macroDef) { macroDefs[atom] = macroDef; } protected: TPpContext(TPpContext&); TPpContext& operator=(TPpContext&); TStringAtomMap atomStrings; char* preamble; // string to parse, all before line 1 of string 0, it is 0 if no preamble int preambleLength; char** strings; // official strings of shader, starting a string 0 line 1 size_t* lengths; int numStrings; // how many official strings there are int currentString; // which string we're currently parsing (-1 for preamble) // Scanner data: int previous_token; TParseContextBase& parseContext; std::vector lastLineTokens; std::vector lastLineTokenLocs; // Get the next token from *stack* of input sources, popping input sources // that are out of tokens, down until an input source is found that has a token. // Return EndOfInput when there are no more tokens to be found by doing this. int scanToken(TPpToken* ppToken) { int token = EndOfInput; while (! inputStack.empty()) { token = inputStack.back()->scan(ppToken); if (token != EndOfInput || inputStack.empty()) break; popInput(); } if (!inputStack.empty() && inputStack.back()->isStringInput() && !inElseSkip) { if (token == '\n') { bool seenNumSign = false; for (int i = 0; i < (int)lastLineTokens.size() - 1;) { int curPos = i; int curToken = lastLineTokens[i++]; if (curToken == '#' && lastLineTokens[i] == '#') { curToken = PpAtomPaste; i++; } if (curToken == '#') { if (seenNumSign) { parseContext.ppError(lastLineTokenLocs[curPos], "(#) can be preceded in its line only by spaces or horizontal tabs", "#", ""); } else { seenNumSign = true; } } } lastLineTokens.clear(); lastLineTokenLocs.clear(); } else { lastLineTokens.push_back(token); lastLineTokenLocs.push_back(ppToken->loc); } } return token; } int getChar() { return inputStack.back()->getch(); } void ungetChar() { inputStack.back()->ungetch(); } bool peekPasting() { return !inputStack.empty() && inputStack.back()->peekPasting(); } bool peekContinuedPasting(int a) { return !inputStack.empty() && inputStack.back()->peekContinuedPasting(a); } bool endOfReplacementList() { return inputStack.empty() || inputStack.back()->endOfReplacementList(); } bool isMacroInput() { return inputStack.size() > 0 && inputStack.back()->isMacroInput(); } static const int maxIfNesting = 65; int ifdepth; // current #if-#else-#endif nesting in the cpp.c file (pre-processor) bool elseSeen[maxIfNesting]; // Keep a track of whether an else has been seen at a particular depth int elsetracker; // #if-#else and #endif constructs...Counter. class tMacroInput : public tInput { public: tMacroInput(TPpContext* pp) : tInput(pp), prepaste(false), postpaste(false) { } virtual ~tMacroInput() { for (size_t i = 0; i < args.size(); ++i) delete args[i]; for (size_t i = 0; i < expandedArgs.size(); ++i) delete expandedArgs[i]; } virtual int scan(TPpToken*) override; virtual int getch() override { assert(0); return EndOfInput; } virtual void ungetch() override { assert(0); } bool peekPasting() override { return prepaste; } bool peekContinuedPasting(int a) override { return mac->body.peekContinuedPasting(a); } bool endOfReplacementList() override { return mac->body.atEnd(); } bool isMacroInput() override { return true; } MacroSymbol *mac; TVector args; TVector expandedArgs; protected: bool prepaste; // true if we are just before ## bool postpaste; // true if we are right after ## }; class tMarkerInput : public tInput { public: tMarkerInput(TPpContext* pp) : tInput(pp) { } virtual int scan(TPpToken*) override { if (done) return EndOfInput; done = true; return marker; } virtual int getch() override { assert(0); return EndOfInput; } virtual void ungetch() override { assert(0); } static const int marker = -3; }; class tZeroInput : public tInput { public: tZeroInput(TPpContext* pp) : tInput(pp) { } virtual int scan(TPpToken*) override; virtual int getch() override { assert(0); return EndOfInput; } virtual void ungetch() override { assert(0); } }; std::vector inputStack; bool errorOnVersion; bool versionSeen; // // from Pp.cpp // // Used to obtain #include content. TShader::Includer& includer; int CPPdefine(TPpToken * ppToken); int CPPundef(TPpToken * ppToken); int CPPelse(int matchelse, TPpToken * ppToken); int extraTokenCheck(int atom, TPpToken* ppToken, int token); int eval(int token, int precedence, bool shortCircuit, int& res, bool& err, TPpToken * ppToken); int evalToToken(int token, bool shortCircuit, int& res, bool& err, TPpToken * ppToken); int CPPif (TPpToken * ppToken); int CPPifdef(int defined, TPpToken * ppToken); int CPPinclude(TPpToken * ppToken); int CPPline(TPpToken * ppToken); int CPPerror(TPpToken * ppToken); int CPPpragma(TPpToken * ppToken); int CPPversion(TPpToken * ppToken); int CPPextension(TPpToken * ppToken); int readCPPline(TPpToken * ppToken); int scanHeaderName(TPpToken* ppToken, char delimit); TokenStream* PrescanMacroArg(TokenStream&, TPpToken*, bool newLineOkay); MacroExpandResult MacroExpand(TPpToken* ppToken, bool expandUndef, bool newLineOkay); // // From PpTokens.cpp // void pushTokenStreamInput(TokenStream&, bool pasting = false, bool expanded = false); void UngetToken(int token, TPpToken*); class tTokenInput : public tInput { public: tTokenInput(TPpContext* pp, TokenStream* t, bool prepasting, bool expanded) : tInput(pp), tokens(t), lastTokenPastes(prepasting), preExpanded(expanded) { } virtual int scan(TPpToken *ppToken) override { int token = tokens->getToken(pp->parseContext, ppToken); ppToken->fullyExpanded = preExpanded; if (tokens->atEnd() && token == PpAtomIdentifier) { int macroAtom = pp->atomStrings.getAtom(ppToken->name); MacroSymbol* macro = macroAtom == 0 ? nullptr : pp->lookupMacroDef(macroAtom); if (macro && macro->functionLike) ppToken->fullyExpanded = false; } return token; } virtual int getch() override { assert(0); return EndOfInput; } virtual void ungetch() override { assert(0); } virtual bool peekPasting() override { return tokens->peekTokenizedPasting(lastTokenPastes); } bool peekContinuedPasting(int a) override { return tokens->peekContinuedPasting(a); } protected: TokenStream* tokens; bool lastTokenPastes; // true if the last token in the input is to be pasted, rather than consumed as a token bool preExpanded; }; class tUngotTokenInput : public tInput { public: tUngotTokenInput(TPpContext* pp, int t, TPpToken* p) : tInput(pp), token(t), lval(*p) { } virtual int scan(TPpToken *) override; virtual int getch() override { assert(0); return EndOfInput; } virtual void ungetch() override { assert(0); } protected: int token; TPpToken lval; }; // // From PpScanner.cpp // class tStringInput : public tInput { public: tStringInput(TPpContext* pp, TInputScanner& i) : tInput(pp), input(&i) { } virtual int scan(TPpToken*) override; bool isStringInput() override { return true; } // Scanner used to get source stream characters. // - Escaped newlines are handled here, invisibly to the caller. // - All forms of newline are handled, and turned into just a '\n'. int getch() override { int ch = input->get(); if (ch == '\\') { // Move past escaped newlines, as many as sequentially exist do { if (input->peek() == '\r' || input->peek() == '\n') { bool allowed = pp->parseContext.lineContinuationCheck(input->getSourceLoc(), pp->inComment); if (! allowed && pp->inComment) return '\\'; // escape one newline now ch = input->get(); int nextch = input->get(); if (ch == '\r' && nextch == '\n') ch = input->get(); else ch = nextch; } else return '\\'; } while (ch == '\\'); } // handle any non-escaped newline if (ch == '\r' || ch == '\n') { if (ch == '\r' && input->peek() == '\n') input->get(); return '\n'; } return ch; } // Scanner used to backup the source stream characters. Newlines are // handled here, invisibly to the caller, meaning have to undo exactly // what getch() above does (e.g., don't leave things in the middle of a // sequence of escaped newlines). void ungetch() override { input->unget(); do { int ch = input->peek(); if (ch == '\r' || ch == '\n') { if (ch == '\n') { // correct for two-character newline input->unget(); if (input->peek() != '\r') input->get(); } // now in front of a complete newline, move past an escape character input->unget(); if (input->peek() == '\\') input->unget(); else { input->get(); break; } } else break; } while (true); } protected: TInputScanner* input; }; // Holds a reference to included file data, as well as a // prologue and an epilogue string. This can be scanned using the tInput // interface and acts as a single source string. class TokenizableIncludeFile : public tInput { public: // Copies prologue and epilogue. The includedFile must remain valid // until this TokenizableIncludeFile is no longer used. TokenizableIncludeFile(const TSourceLoc& startLoc, const std::string& prologue, TShader::Includer::IncludeResult* includedFile, const std::string& epilogue, TPpContext* pp) : tInput(pp), prologue_(prologue), epilogue_(epilogue), includedFile_(includedFile), scanner(3, strings, lengths, nullptr, 0, 0, true), prevScanner(nullptr), stringInput(pp, scanner) { strings[0] = prologue_.data(); strings[1] = includedFile_->headerData; strings[2] = epilogue_.data(); lengths[0] = prologue_.size(); lengths[1] = includedFile_->headerLength; lengths[2] = epilogue_.size(); scanner.setLine(startLoc.line); scanner.setString(startLoc.string); scanner.setFile(startLoc.getFilenameStr(), 0); scanner.setFile(startLoc.getFilenameStr(), 1); scanner.setFile(startLoc.getFilenameStr(), 2); } // tInput methods: int scan(TPpToken* t) override { return stringInput.scan(t); } int getch() override { return stringInput.getch(); } void ungetch() override { stringInput.ungetch(); } void notifyActivated() override { prevScanner = pp->parseContext.getScanner(); pp->parseContext.setScanner(&scanner); pp->push_include(includedFile_); } void notifyDeleted() override { pp->parseContext.setScanner(prevScanner); pp->pop_include(); } private: TokenizableIncludeFile& operator=(const TokenizableIncludeFile&); // Stores the prologue for this string. const std::string prologue_; // Stores the epilogue for this string. const std::string epilogue_; // Points to the IncludeResult that this TokenizableIncludeFile represents. TShader::Includer::IncludeResult* includedFile_; // Will point to prologue_, includedFile_->headerData and epilogue_ // This is passed to scanner constructor. // These do not own the storage and it must remain valid until this // object has been destroyed. const char* strings[3]; // Length of str_, passed to scanner constructor. size_t lengths[3]; // Scans over str_. TInputScanner scanner; // The previous effective scanner before the scanner in this instance // has been activated. TInputScanner* prevScanner; // Delegate object implementing the tInput interface. tStringInput stringInput; }; int ScanFromString(char* s); void missingEndifCheck(); int lFloatConst(int len, int ch, TPpToken* ppToken); int characterLiteral(TPpToken* ppToken); void push_include(TShader::Includer::IncludeResult* result) { currentSourceFile = result->headerName; includeStack.push(result); } void pop_include() { TShader::Includer::IncludeResult* include = includeStack.top(); includeStack.pop(); includer.releaseInclude(include); if (includeStack.empty()) { currentSourceFile = rootFileName; } else { currentSourceFile = includeStack.top()->headerName; } } bool inComment; std::string rootFileName; std::stack includeStack; std::string currentSourceFile; std::istringstream strtodStream; bool disableEscapeSequences; // True if we're skipping a section enclosed by #if/#ifdef/#elif/#else which was evaluated to // be inactive, e.g. #if 0 bool inElseSkip; }; } // end namespace glslang #endif // PPCONTEXT_H ================================================ FILE: src/libraries/glslang/glslang/MachineIndependent/preprocessor/PpScanner.cpp ================================================ // // Copyright (C) 2002-2005 3Dlabs Inc. Ltd. // Copyright (C) 2013 LunarG, Inc. // Copyright (C) 2017 ARM Limited. // Copyright (C) 2015-2018 Google, Inc. // Copyright (c) 2023, Mobica Limited // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following // disclaimer in the documentation and/or other materials provided // with the distribution. // // Neither the name of 3Dlabs Inc. Ltd. nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // /****************************************************************************\ Copyright (c) 2002, NVIDIA Corporation. NVIDIA Corporation("NVIDIA") supplies this software to you in consideration of your agreement to the following terms, and your use, installation, modification or redistribution of this NVIDIA software constitutes acceptance of these terms. If you do not agree with these terms, please do not use, install, modify or redistribute this NVIDIA software. In consideration of your agreement to abide by the following terms, and subject to these terms, NVIDIA grants you a personal, non-exclusive license, under NVIDIA's copyrights in this original NVIDIA software (the "NVIDIA Software"), to use, reproduce, modify and redistribute the NVIDIA Software, with or without modifications, in source and/or binary forms; provided that if you redistribute the NVIDIA Software, you must retain the copyright notice of NVIDIA, this notice and the following text and disclaimers in all such redistributions of the NVIDIA Software. Neither the name, trademarks, service marks nor logos of NVIDIA Corporation may be used to endorse or promote products derived from the NVIDIA Software without specific prior written permission from NVIDIA. Except as expressly stated in this notice, no other rights or licenses express or implied, are granted by NVIDIA herein, including but not limited to any patent rights that may be infringed by your derivative works or by other works in which the NVIDIA Software may be incorporated. No hardware is licensed hereunder. THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR ITS USE AND OPERATION EITHER ALONE OR IN COMBINATION WITH OTHER PRODUCTS. IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL, EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, LOST PROFITS; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) OR ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE NVIDIA SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \****************************************************************************/ #ifndef _CRT_SECURE_NO_WARNINGS #define _CRT_SECURE_NO_WARNINGS #endif #include #include #include "PpContext.h" #include "PpTokens.h" #include "../Scan.h" namespace glslang { /////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////// Floating point constants: ///////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////// // // Scan a single- or double-precision floating point constant. // Assumes that the scanner has seen at least one digit, // followed by either a decimal '.' or the letter 'e', or a // precision ending (e.g., F or LF). // // This is technically not correct, as the preprocessor should just // accept the numeric literal along with whatever suffix it has, but // currently, it stops on seeing a bad suffix, treating that as the // next token. This effects things like token pasting, where it is // relevant how many tokens something was broken into. // // See peekContinuedPasting(). int TPpContext::lFloatConst(int len, int ch, TPpToken* ppToken) { const auto saveName = [&](int ch) { if (len <= MaxTokenLength) ppToken->name[len++] = static_cast(ch); }; // find the range of non-zero digits before the decimal point int startNonZero = 0; while (startNonZero < len && ppToken->name[startNonZero] == '0') ++startNonZero; int endNonZero = len; while (endNonZero > startNonZero && ppToken->name[endNonZero-1] == '0') --endNonZero; int numWholeNumberDigits = endNonZero - startNonZero; // accumulate the range's value bool fastPath = numWholeNumberDigits <= 15; // when the number gets too complex, set to false unsigned long long wholeNumber = 0; if (fastPath) { for (int i = startNonZero; i < endNonZero; ++i) wholeNumber = wholeNumber * 10 + (ppToken->name[i] - '0'); } int decimalShift = len - endNonZero; // Decimal point: bool hasDecimalOrExponent = false; if (ch == '.') { hasDecimalOrExponent = true; saveName(ch); ch = getChar(); int firstDecimal = len; #ifdef ENABLE_HLSL // 1.#INF or -1.#INF if (ch == '#' && (ifdepth > 0 || parseContext.intermediate.getSource() == EShSourceHlsl)) { if ((len < 2) || (len == 2 && ppToken->name[0] != '1') || (len == 3 && ppToken->name[1] != '1' && !(ppToken->name[0] == '-' || ppToken->name[0] == '+')) || (len > 3)) parseContext.ppError(ppToken->loc, "unexpected use of", "#", ""); else { // we have 1.# or -1.# or +1.#, check for 'INF' if ((ch = getChar()) != 'I' || (ch = getChar()) != 'N' || (ch = getChar()) != 'F') parseContext.ppError(ppToken->loc, "expected 'INF'", "#", ""); else { // we have [+-].#INF, and we are targeting IEEE 754, so wrap it up: saveName('I'); saveName('N'); saveName('F'); ppToken->name[len] = '\0'; if (ppToken->name[0] == '-') ppToken->i64val = 0xfff0000000000000; // -Infinity else ppToken->i64val = 0x7ff0000000000000; // +Infinity return PpAtomConstFloat; } } } #endif // Consume leading-zero digits after the decimal point while (ch == '0') { saveName(ch); ch = getChar(); } int startNonZeroDecimal = len; int endNonZeroDecimal = len; // Consume remaining digits, up to the exponent while (ch >= '0' && ch <= '9') { saveName(ch); if (ch != '0') endNonZeroDecimal = len; ch = getChar(); } // Compute accumulation up to the last non-zero digit if (endNonZeroDecimal > startNonZeroDecimal) { numWholeNumberDigits += endNonZeroDecimal - endNonZero - 1; // don't include the "." if (numWholeNumberDigits > 15) fastPath = false; if (fastPath) { for (int i = endNonZero; i < endNonZeroDecimal; ++i) { if (ppToken->name[i] != '.') wholeNumber = wholeNumber * 10 + (ppToken->name[i] - '0'); } } decimalShift = firstDecimal - endNonZeroDecimal; } } // Exponent: bool negativeExponent = false; double exponentValue = 0.0; int exponent = 0; { if (ch == 'e' || ch == 'E') { hasDecimalOrExponent = true; saveName(ch); ch = getChar(); if (ch == '+' || ch == '-') { negativeExponent = ch == '-'; saveName(ch); ch = getChar(); } if (ch >= '0' && ch <= '9') { while (ch >= '0' && ch <= '9') { if (exponent < 500) { exponent = exponent * 10 + (ch - '0'); } saveName(ch); ch = getChar(); } } else { parseContext.ppError(ppToken->loc, "bad character in float exponent", "", ""); } } // Compensate for location of decimal if (negativeExponent) exponent -= decimalShift; else { exponent += decimalShift; if (exponent < 0) { negativeExponent = true; exponent = -exponent; } } if (exponent > 22) fastPath = false; if (fastPath) { // Compute the floating-point value of the exponent exponentValue = 1.0; if (exponent > 0) { double expFactor = 10; while (exponent > 0) { if (exponent & 0x1) exponentValue *= expFactor; expFactor *= expFactor; exponent >>= 1; } } } } // Suffix: bool isDouble = false; bool isFloat16 = false; if (ch == 'l' || ch == 'L') { if (ifdepth == 0 && parseContext.intermediate.getSource() == EShSourceGlsl) parseContext.doubleCheck(ppToken->loc, "double floating-point suffix"); if (ifdepth == 0 && !hasDecimalOrExponent) parseContext.ppError(ppToken->loc, "float literal needs a decimal point or exponent", "", ""); if (parseContext.intermediate.getSource() == EShSourceGlsl) { int ch2 = getChar(); if (ch2 != 'f' && ch2 != 'F') { ungetChar(); ungetChar(); } else { saveName(ch); saveName(ch2); isDouble = true; } } else if (parseContext.intermediate.getSource() == EShSourceHlsl) { saveName(ch); isDouble = true; } } else if (ch == 'h' || ch == 'H') { if (ifdepth == 0 && parseContext.intermediate.getSource() == EShSourceGlsl) parseContext.float16Check(ppToken->loc, "half floating-point suffix"); if (ifdepth == 0 && !hasDecimalOrExponent) parseContext.ppError(ppToken->loc, "float literal needs a decimal point or exponent", "", ""); if (parseContext.intermediate.getSource() == EShSourceGlsl) { int ch2 = getChar(); if (ch2 != 'f' && ch2 != 'F') { ungetChar(); ungetChar(); } else { saveName(ch); saveName(ch2); isFloat16 = true; } } else if (parseContext.intermediate.getSource() == EShSourceHlsl) { saveName(ch); isFloat16 = true; } } else if (ch == 'f' || ch == 'F') { if (ifdepth == 0) parseContext.profileRequires(ppToken->loc, EEsProfile, 300, nullptr, "floating-point suffix"); if (ifdepth == 0 && !parseContext.relaxedErrors()) parseContext.profileRequires(ppToken->loc, ~EEsProfile, 120, nullptr, "floating-point suffix"); if (ifdepth == 0 && !hasDecimalOrExponent) parseContext.ppError(ppToken->loc, "float literal needs a decimal point or exponent", "", ""); saveName(ch); } else ungetChar(); // Patch up the name and length for overflow if (len > MaxTokenLength) { len = MaxTokenLength; parseContext.ppError(ppToken->loc, "float literal too long", "", ""); } ppToken->name[len] = '\0'; // Compute the numerical value if (fastPath) { // compute the floating-point value of the exponent if (exponentValue == 0.0) ppToken->dval = (double)wholeNumber; else if (negativeExponent) ppToken->dval = (double)wholeNumber / exponentValue; else ppToken->dval = (double)wholeNumber * exponentValue; } else { // slow path ppToken->dval = 0.0; // remove suffix TString numstr(ppToken->name); if (numstr.back() == 'f' || numstr.back() == 'F') numstr.pop_back(); if (numstr.back() == 'h' || numstr.back() == 'H') numstr.pop_back(); if (numstr.back() == 'l' || numstr.back() == 'L') numstr.pop_back(); // use platform library strtodStream.clear(); strtodStream.str(numstr.c_str()); strtodStream >> ppToken->dval; if (strtodStream.fail()) { // Assume failure combined with a large exponent was overflow, in // an attempt to set INF. if (!negativeExponent && exponent + numWholeNumberDigits > 300) ppToken->i64val = 0x7ff0000000000000; // +Infinity // Assume failure combined with a small exponent was overflow. if (negativeExponent && exponent + numWholeNumberDigits > 300) ppToken->dval = 0.0; // Unknown reason for failure. Theory is that either // - the 0.0 is still there, or // - something reasonable was written that is better than 0.0 } } // Return the right token type if (isDouble) return PpAtomConstDouble; else if (isFloat16) return PpAtomConstFloat16; else return PpAtomConstFloat; } // Recognize a character literal. // // The first ' has already been accepted, read the rest, through the closing '. // // Always returns PpAtomConstInt. // int TPpContext::characterLiteral(TPpToken* ppToken) { ppToken->name[0] = 0; ppToken->ival = 0; if (parseContext.intermediate.getSource() != EShSourceHlsl) { // illegal, except in macro definition, for which case we report the character return '\''; } int ch = getChar(); switch (ch) { case '\'': // As empty sequence: '' parseContext.ppError(ppToken->loc, "unexpected", "\'", ""); return PpAtomConstInt; case '\\': // As escape sequence: '\XXX' switch (ch = getChar()) { case 'a': ppToken->ival = 7; break; case 'b': ppToken->ival = 8; break; case 't': ppToken->ival = 9; break; case 'n': ppToken->ival = 10; break; case 'v': ppToken->ival = 11; break; case 'f': ppToken->ival = 12; break; case 'r': ppToken->ival = 13; break; case 'x': case '0': parseContext.ppError(ppToken->loc, "octal and hex sequences not supported", "\\", ""); break; default: // This catches '\'', '\"', '\?', etc. // Also, things like '\C' mean the same thing as 'C' // (after the above cases are filtered out). ppToken->ival = ch; break; } break; default: ppToken->ival = ch; break; } ppToken->name[0] = (char)ppToken->ival; ppToken->name[1] = '\0'; ch = getChar(); if (ch != '\'') { parseContext.ppError(ppToken->loc, "expected", "\'", ""); // Look ahead for a closing ' do { ch = getChar(); } while (ch != '\'' && ch != EndOfInput && ch != '\n'); } return PpAtomConstInt; } // // Scanner used to tokenize source stream. // // N.B. Invalid numeric suffixes are not consumed.// // This is technically not correct, as the preprocessor should just // accept the numeric literal along with whatever suffix it has, but // currently, it stops on seeing a bad suffix, treating that as the // next token. This effects things like token pasting, where it is // relevant how many tokens something was broken into. // See peekContinuedPasting(). // int TPpContext::tStringInput::scan(TPpToken* ppToken) { int AlreadyComplained = 0; int len = 0; int ch = 0; int ii = 0; unsigned long long ival = 0; const auto floatingPointChar = [&](int ch) { return ch == '.' || ch == 'e' || ch == 'E' || ch == 'f' || ch == 'F' || ch == 'h' || ch == 'H'; }; static const char* const Int64_Extensions[] = { E_GL_ARB_gpu_shader_int64, E_GL_EXT_shader_explicit_arithmetic_types, E_GL_NV_gpu_shader5, E_GL_EXT_shader_explicit_arithmetic_types_int64 }; static const int Num_Int64_Extensions = sizeof(Int64_Extensions) / sizeof(Int64_Extensions[0]); static const char* const Int16_Extensions[] = { E_GL_AMD_gpu_shader_int16, E_GL_EXT_shader_explicit_arithmetic_types, E_GL_EXT_shader_explicit_arithmetic_types_int16 }; static const int Num_Int16_Extensions = sizeof(Int16_Extensions) / sizeof(Int16_Extensions[0]); ppToken->clear(); ch = getch(); for (;;) { while (ch == ' ' || ch == '\t') { ppToken->space = true; ch = getch(); } ppToken->loc = pp->parseContext.getCurrentLoc(); len = 0; switch (ch) { default: // Single character token, including EndOfInput, '#' and '\' (escaped newlines are handled at a lower level, so this is just a '\' token) if (ch > PpAtomMaxSingle) ch = PpAtomBadToken; return ch; case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': case 'Y': case 'Z': case '_': case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': case 's': case 't': case 'u': case 'v': case 'w': case 'x': case 'y': case 'z': do { if (len < MaxTokenLength) { ppToken->name[len++] = (char)ch; ch = getch(); } else { if (! AlreadyComplained) { pp->parseContext.ppError(ppToken->loc, "name too long", "", ""); AlreadyComplained = 1; } ch = getch(); } } while ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') || (ch >= '0' && ch <= '9') || ch == '_'); // line continuation with no token before or after makes len == 0, and need to start over skipping white space, etc. if (len == 0) continue; ppToken->name[len] = '\0'; ungetch(); return PpAtomIdentifier; case '0': ppToken->name[len++] = (char)ch; ch = getch(); if (ch == 'x' || ch == 'X') { // must be hexadecimal bool isUnsigned = false; bool isInt64 = false; bool isInt16 = false; ppToken->name[len++] = (char)ch; ch = getch(); if ((ch >= '0' && ch <= '9') || (ch >= 'A' && ch <= 'F') || (ch >= 'a' && ch <= 'f')) { ival = 0; do { if (len < MaxTokenLength && ival <= 0x7fffffffffffffffull) { ppToken->name[len++] = (char)ch; if (ch >= '0' && ch <= '9') { ii = ch - '0'; } else if (ch >= 'A' && ch <= 'F') { ii = ch - 'A' + 10; } else if (ch >= 'a' && ch <= 'f') { ii = ch - 'a' + 10; } else pp->parseContext.ppError(ppToken->loc, "bad digit in hexadecimal literal", "", ""); ival = (ival << 4) | ii; } else { if (! AlreadyComplained) { if(len < MaxTokenLength) pp->parseContext.ppError(ppToken->loc, "hexadecimal literal too big", "", ""); else pp->parseContext.ppError(ppToken->loc, "hexadecimal literal too long", "", ""); AlreadyComplained = 1; } ival = 0xffffffffffffffffull; } ch = getch(); } while ((ch >= '0' && ch <= '9') || (ch >= 'A' && ch <= 'F') || (ch >= 'a' && ch <= 'f')); } else { pp->parseContext.ppError(ppToken->loc, "bad digit in hexadecimal literal", "", ""); } if (ch == 'u' || ch == 'U') { if (len < MaxTokenLength) ppToken->name[len++] = (char)ch; isUnsigned = true; int nextCh = getch(); if (nextCh == 'l' || nextCh == 'L') { if (len < MaxTokenLength) ppToken->name[len++] = (char)nextCh; isInt64 = true; } else ungetch(); nextCh = getch(); if ((nextCh == 's' || nextCh == 'S') && pp->parseContext.intermediate.getSource() == EShSourceGlsl) { if (len < MaxTokenLength) ppToken->name[len++] = (char)nextCh; isInt16 = true; } else ungetch(); } else if (ch == 'l' || ch == 'L') { if (len < MaxTokenLength) ppToken->name[len++] = (char)ch; isInt64 = true; } else if ((ch == 's' || ch == 'S') && pp->parseContext.intermediate.getSource() == EShSourceGlsl) { if (len < MaxTokenLength) ppToken->name[len++] = (char)ch; isInt16 = true; } else ungetch(); ppToken->name[len] = '\0'; if (isInt64 && pp->parseContext.intermediate.getSource() == EShSourceGlsl) { if (pp->ifdepth == 0) { pp->parseContext.requireProfile(ppToken->loc, ~EEsProfile, "64-bit hexadecimal literal"); pp->parseContext.profileRequires(ppToken->loc, ~EEsProfile, 0, Num_Int64_Extensions, Int64_Extensions, "64-bit hexadecimal literal"); } ppToken->i64val = ival; return isUnsigned ? PpAtomConstUint64 : PpAtomConstInt64; } else if (isInt16) { if (pp->ifdepth == 0) { if (pp->parseContext.intermediate.getSource() == EShSourceGlsl) { pp->parseContext.requireProfile(ppToken->loc, ~EEsProfile, "16-bit hexadecimal literal"); pp->parseContext.profileRequires(ppToken->loc, ~EEsProfile, 0, Num_Int16_Extensions, Int16_Extensions, "16-bit hexadecimal literal"); } } ppToken->ival = (int)ival; return isUnsigned ? PpAtomConstUint16 : PpAtomConstInt16; } else { if (ival > 0xffffffffu && !AlreadyComplained) pp->parseContext.ppError(ppToken->loc, "hexadecimal literal too big", "", ""); ppToken->ival = (int)ival; return isUnsigned ? PpAtomConstUint : PpAtomConstInt; } } else if ((ch == 'b' || ch == 'B') && pp->parseContext.intermediate.getSource() == EShSourceHlsl) { // must be binary bool isUnsigned = false; bool isInt64 = false; bool isInt16 = false; ppToken->name[len++] = (char)ch; ch = getch(); // Check value if ((ch == '0' || ch == '1')) { ival = 0; do { if (len < MaxTokenLength && ival <= 0x7fffffffffffffffull) { ppToken->name[len++] = (char)ch; if (ch == '0' || ch == '1') { ii = ch - '0'; } else { pp->parseContext.ppError(ppToken->loc, "bad digit in binary literal", "", ""); } ival = (ival << 1) | ii; } else { if (! AlreadyComplained) { if(len < MaxTokenLength) pp->parseContext.ppError(ppToken->loc, "binary literal too big", "", ""); else pp->parseContext.ppError(ppToken->loc, "binary literal too long", "", ""); AlreadyComplained = 1; } ival = 0xffffffffffffffffull; } ch = getch(); } while (ch == '0' || ch == '1'); } else { pp->parseContext.ppError(ppToken->loc, "bad digit in binary literal", "", ""); } // check type if (ch == 'u' || ch == 'U') { if (len < MaxTokenLength) ppToken->name[len++] = (char)ch; isUnsigned = true; int nextCh = getch(); if (nextCh == 'l' || nextCh == 'L') { if (len < MaxTokenLength) ppToken->name[len++] = (char)nextCh; isInt64 = true; } else ungetch(); nextCh = getch(); if ((nextCh == 's' || nextCh == 'S') && pp->parseContext.intermediate.getSource() == EShSourceGlsl) { if (len < MaxTokenLength) ppToken->name[len++] = (char)nextCh; isInt16 = true; } else ungetch(); } else if (ch == 'l' || ch == 'L') { if (len < MaxTokenLength) ppToken->name[len++] = (char)ch; isInt64 = true; } else if ((ch == 's' || ch == 'S') && pp->parseContext.intermediate.getSource() == EShSourceGlsl) { if (len < MaxTokenLength) ppToken->name[len++] = (char)ch; isInt16 = true; } else { ungetch(); } ppToken->name[len] = '\0'; // Assign value if (isInt64 && pp->parseContext.intermediate.getSource() == EShSourceGlsl) { if (pp->ifdepth == 0) { pp->parseContext.requireProfile(ppToken->loc, ~EEsProfile, "64-bit binary literal"); pp->parseContext.profileRequires(ppToken->loc, ~EEsProfile, 0, Num_Int64_Extensions, Int64_Extensions, "64-bit binary literal"); } ppToken->i64val = ival; return isUnsigned ? PpAtomConstUint64 : PpAtomConstInt64; } else if (isInt16) { if (pp->ifdepth == 0) { if (pp->parseContext.intermediate.getSource() == EShSourceGlsl) { pp->parseContext.requireProfile(ppToken->loc, ~EEsProfile, "16-bit binary literal"); pp->parseContext.profileRequires(ppToken->loc, ~EEsProfile, 0, Num_Int16_Extensions, Int16_Extensions, "16-bit binary literal"); } } ppToken->ival = (int)ival; return isUnsigned ? PpAtomConstUint16 : PpAtomConstInt16; } else { ppToken->ival = (int)ival; return isUnsigned ? PpAtomConstUint : PpAtomConstInt; } } else { // could be octal integer or floating point, speculative pursue octal until it must be floating point bool isUnsigned = false; bool isInt64 = false; bool isInt16 = false; bool octalOverflow = false; bool nonOctal = false; ival = 0; // see how much octal-like stuff we can read while (ch >= '0' && ch <= '7') { if (len < MaxTokenLength) ppToken->name[len++] = (char)ch; else if (! AlreadyComplained) { pp->parseContext.ppError(ppToken->loc, "numeric literal too long", "", ""); AlreadyComplained = 1; } if (ival <= 0x1fffffffffffffffull) { ii = ch - '0'; ival = (ival << 3) | ii; } else octalOverflow = true; ch = getch(); } // could be part of a float... if (ch == '8' || ch == '9') { nonOctal = true; do { if (len < MaxTokenLength) ppToken->name[len++] = (char)ch; else if (! AlreadyComplained) { pp->parseContext.ppError(ppToken->loc, "numeric literal too long", "", ""); AlreadyComplained = 1; } ch = getch(); } while (ch >= '0' && ch <= '9'); } if (floatingPointChar(ch)) return pp->lFloatConst(len, ch, ppToken); // wasn't a float, so must be octal... if (nonOctal) pp->parseContext.ppError(ppToken->loc, "octal literal digit too large", "", ""); if (ch == 'u' || ch == 'U') { if (len < MaxTokenLength) ppToken->name[len++] = (char)ch; isUnsigned = true; int nextCh = getch(); if (nextCh == 'l' || nextCh == 'L') { if (len < MaxTokenLength) ppToken->name[len++] = (char)nextCh; isInt64 = true; } else ungetch(); nextCh = getch(); if ((nextCh == 's' || nextCh == 'S') && pp->parseContext.intermediate.getSource() == EShSourceGlsl) { if (len < MaxTokenLength) ppToken->name[len++] = (char)nextCh; isInt16 = true; } else ungetch(); } else if (ch == 'l' || ch == 'L') { if (len < MaxTokenLength) ppToken->name[len++] = (char)ch; isInt64 = true; } else if ((ch == 's' || ch == 'S') && pp->parseContext.intermediate.getSource() == EShSourceGlsl) { if (len < MaxTokenLength) ppToken->name[len++] = (char)ch; isInt16 = true; } else ungetch(); ppToken->name[len] = '\0'; if (!isInt64 && ival > 0xffffffffu) octalOverflow = true; if (octalOverflow) pp->parseContext.ppError(ppToken->loc, "octal literal too big", "", ""); if (isInt64 && pp->parseContext.intermediate.getSource() == EShSourceGlsl) { if (pp->ifdepth == 0) { pp->parseContext.requireProfile(ppToken->loc, ~EEsProfile, "64-bit octal literal"); pp->parseContext.profileRequires(ppToken->loc, ~EEsProfile, 0, Num_Int64_Extensions, Int64_Extensions, "64-bit octal literal"); } ppToken->i64val = ival; return isUnsigned ? PpAtomConstUint64 : PpAtomConstInt64; } else if (isInt16) { if (pp->ifdepth == 0) { if (pp->parseContext.intermediate.getSource() == EShSourceGlsl) { pp->parseContext.requireProfile(ppToken->loc, ~EEsProfile, "16-bit octal literal"); pp->parseContext.profileRequires(ppToken->loc, ~EEsProfile, 0, Num_Int16_Extensions, Int16_Extensions, "16-bit octal literal"); } } ppToken->ival = (int)ival; return isUnsigned ? PpAtomConstUint16 : PpAtomConstInt16; } else { ppToken->ival = (int)ival; return isUnsigned ? PpAtomConstUint : PpAtomConstInt; } } break; case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': // can't be hexadecimal or octal, is either decimal or floating point do { if (len < MaxTokenLength) ppToken->name[len++] = (char)ch; else if (! AlreadyComplained) { pp->parseContext.ppError(ppToken->loc, "numeric literal too long", "", ""); AlreadyComplained = 1; } ch = getch(); } while (ch >= '0' && ch <= '9'); if (floatingPointChar(ch)) return pp->lFloatConst(len, ch, ppToken); else { // Finish handling signed and unsigned integers int numericLen = len; bool isUnsigned = false; bool isInt64 = false; bool isInt16 = false; if (ch == 'u' || ch == 'U') { if (len < MaxTokenLength) ppToken->name[len++] = (char)ch; isUnsigned = true; int nextCh = getch(); if (nextCh == 'l' || nextCh == 'L') { if (len < MaxTokenLength) ppToken->name[len++] = (char)nextCh; isInt64 = true; } else ungetch(); nextCh = getch(); if ((nextCh == 's' || nextCh == 'S') && pp->parseContext.intermediate.getSource() == EShSourceGlsl) { if (len < MaxTokenLength) ppToken->name[len++] = (char)nextCh; isInt16 = true; } else ungetch(); } else if (ch == 'l' || ch == 'L') { if (len < MaxTokenLength) ppToken->name[len++] = (char)ch; isInt64 = true; } else if ((ch == 's' || ch == 'S') && pp->parseContext.intermediate.getSource() == EShSourceGlsl) { if (len < MaxTokenLength) ppToken->name[len++] = (char)ch; isInt16 = true; } else ungetch(); ppToken->name[len] = '\0'; ival = 0; const unsigned oneTenthMaxInt = 0xFFFFFFFFu / 10; const unsigned remainderMaxInt = 0xFFFFFFFFu - 10 * oneTenthMaxInt; const unsigned long long oneTenthMaxInt64 = 0xFFFFFFFFFFFFFFFFull / 10; const unsigned long long remainderMaxInt64 = 0xFFFFFFFFFFFFFFFFull - 10 * oneTenthMaxInt64; const unsigned short oneTenthMaxInt16 = 0xFFFFu / 10; const unsigned short remainderMaxInt16 = 0xFFFFu - 10 * oneTenthMaxInt16; for (int i = 0; i < numericLen; i++) { ch = ppToken->name[i] - '0'; bool overflow = false; if (isInt64) overflow = (ival > oneTenthMaxInt64 || (ival == oneTenthMaxInt64 && (unsigned long long)ch > remainderMaxInt64)); else if (isInt16) overflow = (ival > oneTenthMaxInt16 || (ival == oneTenthMaxInt16 && (unsigned short)ch > remainderMaxInt16)); else overflow = (ival > oneTenthMaxInt || (ival == oneTenthMaxInt && (unsigned)ch > remainderMaxInt)); if (overflow) { pp->parseContext.ppError(ppToken->loc, "numeric literal too big", "", ""); ival = 0xFFFFFFFFFFFFFFFFull; break; } else ival = ival * 10 + ch; } if (isInt64 && pp->parseContext.intermediate.getSource() == EShSourceGlsl) { if (pp->ifdepth == 0) { pp->parseContext.requireProfile(ppToken->loc, ~EEsProfile, "64-bit literal"); pp->parseContext.profileRequires(ppToken->loc, ~EEsProfile, 0, Num_Int64_Extensions, Int64_Extensions, "64-bit literal"); } ppToken->i64val = ival; return isUnsigned ? PpAtomConstUint64 : PpAtomConstInt64; } else if (isInt16) { if (pp->ifdepth == 0 && pp->parseContext.intermediate.getSource() == EShSourceGlsl) { pp->parseContext.requireProfile(ppToken->loc, ~EEsProfile, "16-bit literal"); pp->parseContext.profileRequires(ppToken->loc, ~EEsProfile, 0, Num_Int16_Extensions, Int16_Extensions, "16-bit literal"); } ppToken->ival = (int)ival; return isUnsigned ? PpAtomConstUint16 : PpAtomConstInt16; } else { ppToken->ival = (int)ival; return isUnsigned ? PpAtomConstUint : PpAtomConstInt; } } break; case '-': ch = getch(); if (ch == '-') { return PpAtomDecrement; } else if (ch == '=') { return PPAtomSubAssign; } else { ungetch(); return '-'; } case '+': ch = getch(); if (ch == '+') { return PpAtomIncrement; } else if (ch == '=') { return PPAtomAddAssign; } else { ungetch(); return '+'; } case '*': ch = getch(); if (ch == '=') { return PPAtomMulAssign; } else { ungetch(); return '*'; } case '%': ch = getch(); if (ch == '=') { return PPAtomModAssign; } else { ungetch(); return '%'; } case '^': ch = getch(); if (ch == '^') { return PpAtomXor; } else { if (ch == '=') return PpAtomXorAssign; else{ ungetch(); return '^'; } } case '=': ch = getch(); if (ch == '=') { return PpAtomEQ; } else { ungetch(); return '='; } case '!': ch = getch(); if (ch == '=') { return PpAtomNE; } else { ungetch(); return '!'; } case '|': ch = getch(); if (ch == '|') { return PpAtomOr; } else if (ch == '=') { return PpAtomOrAssign; } else { ungetch(); return '|'; } case '&': ch = getch(); if (ch == '&') { return PpAtomAnd; } else if (ch == '=') { return PpAtomAndAssign; } else { ungetch(); return '&'; } case '<': ch = getch(); if (ch == '<') { ch = getch(); if (ch == '=') return PpAtomLeftAssign; else { ungetch(); return PpAtomLeft; } } else if (ch == '=') { return PpAtomLE; } else { ungetch(); return '<'; } case '>': ch = getch(); if (ch == '>') { ch = getch(); if (ch == '=') return PpAtomRightAssign; else { ungetch(); return PpAtomRight; } } else if (ch == '=') { return PpAtomGE; } else { ungetch(); return '>'; } case '.': ch = getch(); if (ch >= '0' && ch <= '9') { ungetch(); return pp->lFloatConst(0, '.', ppToken); } else { ungetch(); return '.'; } case '/': ch = getch(); if (ch == '/') { pp->inComment = true; do { ch = getch(); } while (ch != '\n' && ch != EndOfInput); ppToken->space = true; pp->inComment = false; return ch; } else if (ch == '*') { ch = getch(); do { while (ch != '*') { if (ch == EndOfInput) { pp->parseContext.ppError(ppToken->loc, "End of input in comment", "comment", ""); return ch; } ch = getch(); } ch = getch(); if (ch == EndOfInput) { pp->parseContext.ppError(ppToken->loc, "End of input in comment", "comment", ""); return ch; } } while (ch != '/'); ppToken->space = true; // loop again to get the next token... break; } else if (ch == '=') { return PPAtomDivAssign; } else { ungetch(); return '/'; } break; case '\'': return pp->characterLiteral(ppToken); case '"': // #include uses scanHeaderName() to ignore these escape sequences. ch = getch(); while (ch != '"' && ch != '\n' && ch != EndOfInput) { if (len < MaxTokenLength) { if (ch == '\\' && !pp->disableEscapeSequences) { int nextCh = getch(); switch (nextCh) { case '\'': ch = 0x27; break; case '"': ch = 0x22; break; case '?': ch = 0x3f; break; case '\\': ch = 0x5c; break; case 'a': ch = 0x07; break; case 'b': ch = 0x08; break; case 'f': ch = 0x0c; break; case 'n': ch = 0x0a; break; case 'r': ch = 0x0d; break; case 't': ch = 0x09; break; case 'v': ch = 0x0b; break; case 'x': // Hex value, arbitrary number of characters. Terminated by the first // non-hex digit { int numDigits = 0; ch = 0; while (true) { nextCh = getch(); if (nextCh >= '0' && nextCh <= '9') nextCh -= '0'; else if (nextCh >= 'A' && nextCh <= 'F') nextCh -= 'A' - 10; else if (nextCh >= 'a' && nextCh <= 'f') nextCh -= 'a' - 10; else { ungetch(); break; } numDigits++; ch = ch * 0x10 + nextCh; } if (numDigits == 0) { pp->parseContext.ppError(ppToken->loc, "Expected hex value in escape sequence", "string", ""); } break; } case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': // Octal value, up to three octal digits { int numDigits = 1; ch = nextCh - '0'; while (numDigits < 3) { nextCh = getch(); if (nextCh >= '0' && nextCh <= '7') nextCh -= '0'; else { ungetch(); break; } numDigits++; ch = ch * 8 + nextCh; } break; } default: pp->parseContext.ppError(ppToken->loc, "Invalid escape sequence", "string", ""); break; } } ppToken->name[len] = (char)ch; len++; ch = getch(); } else break; }; ppToken->name[len] = '\0'; if (ch != '"') { ungetch(); pp->parseContext.ppError(ppToken->loc, "End of line in string", "string", ""); } return PpAtomConstString; case ':': ch = getch(); if (ch == ':') return PpAtomColonColon; ungetch(); return ':'; } ch = getch(); } } // // The main functional entry point into the preprocessor, which will // scan the source strings to figure out and return the next processing token. // // Return the token, or EndOfInput when no more tokens. // int TPpContext::tokenize(TPpToken& ppToken) { for(;;) { int token = scanToken(&ppToken); // Handle token-pasting logic token = tokenPaste(token, ppToken); if (token == EndOfInput) { missingEndifCheck(); return EndOfInput; } if (token == '#') { if (previous_token == '\n') { token = readCPPline(&ppToken); if (token == EndOfInput) { missingEndifCheck(); return EndOfInput; } continue; } else { parseContext.ppError(ppToken.loc, "preprocessor directive cannot be preceded by another token", "#", ""); return EndOfInput; } } previous_token = token; if (token == '\n') continue; // expand macros if (token == PpAtomIdentifier) { switch (MacroExpand(&ppToken, false, true)) { case MacroExpandNotStarted: break; case MacroExpandError: return EndOfInput; case MacroExpandStarted: case MacroExpandUndef: continue; } } switch (token) { case PpAtomIdentifier: case PpAtomConstInt: case PpAtomConstUint: case PpAtomConstFloat: case PpAtomConstInt64: case PpAtomConstUint64: case PpAtomConstInt16: case PpAtomConstUint16: case PpAtomConstDouble: case PpAtomConstFloat16: if (ppToken.name[0] == '\0') continue; break; case PpAtomConstString: // HLSL allows string literals. // GLSL allows string literals with GL_EXT_debug_printf. if (ifdepth == 0 && parseContext.intermediate.getSource() != EShSourceHlsl) { const char* const string_literal_EXTs[] = { E_GL_EXT_debug_printf, E_GL_EXT_spirv_intrinsics }; parseContext.requireExtensions(ppToken.loc, 2, string_literal_EXTs, "string literal"); if (!parseContext.extensionTurnedOn(E_GL_EXT_debug_printf) && !parseContext.extensionTurnedOn(E_GL_EXT_spirv_intrinsics)) continue; } break; case '\'': parseContext.ppError(ppToken.loc, "character literals not supported", "\'", ""); continue; default: snprintf(ppToken.name, sizeof(ppToken.name), "%s", atomStrings.getString(token)); break; } return token; } } // // Do all token-pasting related combining of two pasted tokens when getting a // stream of tokens from a replacement list. Degenerates to no processing if a // replacement list is not the source of the token stream. // int TPpContext::tokenPaste(int token, TPpToken& ppToken) { // starting with ## is illegal, skip to next token if (token == PpAtomPaste) { parseContext.ppError(ppToken.loc, "unexpected location", "##", ""); return scanToken(&ppToken); } int resultToken = token; // "foo" pasted with "35" is an identifier, not a number // ## can be chained, process all in the chain at once while (peekPasting()) { TPpToken pastedPpToken; // next token has to be ## token = scanToken(&pastedPpToken); assert(token == PpAtomPaste); // This covers end of macro expansion if (endOfReplacementList()) { parseContext.ppError(ppToken.loc, "unexpected location; end of replacement list", "##", ""); break; } // Get the token(s) after the ##. // Because of "space" semantics, and prior tokenization, what // appeared a single token, e.g. "3A", might have been tokenized // into two tokens "3" and "A", but the "A" will have 'space' set to // false. Accumulate all of these to recreate the original lexical // appearing token. do { token = scanToken(&pastedPpToken); // This covers end of argument expansion if (token == tMarkerInput::marker) { parseContext.ppError(ppToken.loc, "unexpected location; end of argument", "##", ""); return resultToken; } // get the token text switch (resultToken) { case PpAtomIdentifier: // already have the correct text in token.names break; case '=': case '!': case '-': case '~': case '+': case '*': case '/': case '%': case '<': case '>': case '|': case '^': case '&': case PpAtomRight: case PpAtomLeft: case PpAtomAnd: case PpAtomOr: case PpAtomXor: snprintf(ppToken.name, sizeof(ppToken.name), "%s", atomStrings.getString(resultToken)); snprintf(pastedPpToken.name, sizeof(pastedPpToken.name), "%s", atomStrings.getString(token)); break; default: parseContext.ppError(ppToken.loc, "not supported for these tokens", "##", ""); return resultToken; } // combine the tokens if (strlen(ppToken.name) + strlen(pastedPpToken.name) > MaxTokenLength) { parseContext.ppError(ppToken.loc, "combined tokens are too long", "##", ""); return resultToken; } snprintf(&ppToken.name[0] + strlen(ppToken.name), sizeof(ppToken.name) - strlen(ppToken.name), "%s", pastedPpToken.name); // correct the kind of token we are making, if needed (identifiers stay identifiers) if (resultToken != PpAtomIdentifier) { int newToken = atomStrings.getAtom(ppToken.name); if (newToken > 0) resultToken = newToken; else parseContext.ppError(ppToken.loc, "combined token is invalid", "##", ""); } } while (peekContinuedPasting(resultToken)); } return resultToken; } // Checks if we've seen balanced #if...#endif void TPpContext::missingEndifCheck() { if (ifdepth > 0) parseContext.ppError(parseContext.getCurrentLoc(), "missing #endif", "", ""); } } // end namespace glslang ================================================ FILE: src/libraries/glslang/glslang/MachineIndependent/preprocessor/PpTokens.cpp ================================================ // // Copyright (C) 2002-2005 3Dlabs Inc. Ltd. // Copyright (C) 2013 LunarG, Inc. // Copyright (C) 2015-2018 Google, Inc. // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following // disclaimer in the documentation and/or other materials provided // with the distribution. // // Neither the name of 3Dlabs Inc. Ltd. nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // /****************************************************************************\ Copyright (c) 2002, NVIDIA Corporation. NVIDIA Corporation("NVIDIA") supplies this software to you in consideration of your agreement to the following terms, and your use, installation, modification or redistribution of this NVIDIA software constitutes acceptance of these terms. If you do not agree with these terms, please do not use, install, modify or redistribute this NVIDIA software. In consideration of your agreement to abide by the following terms, and subject to these terms, NVIDIA grants you a personal, non-exclusive license, under NVIDIA's copyrights in this original NVIDIA software (the "NVIDIA Software"), to use, reproduce, modify and redistribute the NVIDIA Software, with or without modifications, in source and/or binary forms; provided that if you redistribute the NVIDIA Software, you must retain the copyright notice of NVIDIA, this notice and the following text and disclaimers in all such redistributions of the NVIDIA Software. Neither the name, trademarks, service marks nor logos of NVIDIA Corporation may be used to endorse or promote products derived from the NVIDIA Software without specific prior written permission from NVIDIA. Except as expressly stated in this notice, no other rights or licenses express or implied, are granted by NVIDIA herein, including but not limited to any patent rights that may be infringed by your derivative works or by other works in which the NVIDIA Software may be incorporated. No hardware is licensed hereunder. THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR ITS USE AND OPERATION EITHER ALONE OR IN COMBINATION WITH OTHER PRODUCTS. IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL, EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, LOST PROFITS; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) OR ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE NVIDIA SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \****************************************************************************/ // // For recording and playing back the stream of tokens in a macro definition. // #ifndef _CRT_SECURE_NO_WARNINGS #define _CRT_SECURE_NO_WARNINGS #endif #include #include #include #include #include "PpContext.h" #include "PpTokens.h" namespace glslang { // Add a token (including backing string) to the end of a macro // token stream, for later playback. void TPpContext::TokenStream::putToken(int atom, TPpToken* ppToken) { TokenStream::Token streamToken(atom, *ppToken); stream.push_back(streamToken); } // Read the next token from a macro token stream. int TPpContext::TokenStream::getToken(TParseContextBase& parseContext, TPpToken *ppToken) { if (atEnd()) return EndOfInput; int atom = stream[currentPos++].get(*ppToken); ppToken->loc = parseContext.getCurrentLoc(); // Check for ##, unless the current # is the last character if (atom == '#') { if (peekToken('#')) { parseContext.requireProfile(ppToken->loc, ~EEsProfile, "token pasting (##)"); parseContext.profileRequires(ppToken->loc, ~EEsProfile, 130, nullptr, "token pasting (##)"); currentPos++; atom = PpAtomPaste; } } return atom; } // We are pasting if // 1. we are preceding a pasting operator within this stream // or // 2. the entire macro is preceding a pasting operator (lastTokenPastes) // and we are also on the last token bool TPpContext::TokenStream::peekTokenizedPasting(bool lastTokenPastes) { // 1. preceding ##? size_t savePos = currentPos; // skip white space while (peekToken(' ')) ++currentPos; if (peekToken(PpAtomPaste)) { currentPos = savePos; return true; } // 2. last token and we've been told after this there will be a ## if (! lastTokenPastes) return false; // Getting here means the last token will be pasted, after this // Are we at the last non-whitespace token? savePos = currentPos; bool moreTokens = false; do { if (atEnd()) break; if (!peekToken(' ')) { moreTokens = true; break; } ++currentPos; } while (true); currentPos = savePos; return !moreTokens; } // See if the next non-white-space tokens are two consecutive # bool TPpContext::TokenStream::peekUntokenizedPasting() { // don't return early, have to restore this size_t savePos = currentPos; // skip white-space while (peekToken(' ')) ++currentPos; // check for ## bool pasting = false; if (peekToken('#')) { ++currentPos; if (peekToken('#')) pasting = true; } currentPos = savePos; return pasting; } void TPpContext::pushTokenStreamInput(TokenStream& ts, bool prepasting, bool expanded) { pushInput(new tTokenInput(this, &ts, prepasting, expanded)); ts.reset(); } int TPpContext::tUngotTokenInput::scan(TPpToken* ppToken) { if (done) return EndOfInput; int ret = token; *ppToken = lval; done = true; return ret; } void TPpContext::UngetToken(int token, TPpToken* ppToken) { pushInput(new tUngotTokenInput(this, token, ppToken)); } } // end namespace glslang ================================================ FILE: src/libraries/glslang/glslang/MachineIndependent/preprocessor/PpTokens.h ================================================ // // Copyright (C) 2002-2005 3Dlabs Inc. Ltd. // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following // disclaimer in the documentation and/or other materials provided // with the distribution. // // Neither the name of 3Dlabs Inc. Ltd. nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // /****************************************************************************\ Copyright (c) 2002, NVIDIA Corporation. NVIDIA Corporation("NVIDIA") supplies this software to you in consideration of your agreement to the following terms, and your use, installation, modification or redistribution of this NVIDIA software constitutes acceptance of these terms. If you do not agree with these terms, please do not use, install, modify or redistribute this NVIDIA software. In consideration of your agreement to abide by the following terms, and subject to these terms, NVIDIA grants you a personal, non-exclusive license, under NVIDIA's copyrights in this original NVIDIA software (the "NVIDIA Software"), to use, reproduce, modify and redistribute the NVIDIA Software, with or without modifications, in source and/or binary forms; provided that if you redistribute the NVIDIA Software, you must retain the copyright notice of NVIDIA, this notice and the following text and disclaimers in all such redistributions of the NVIDIA Software. Neither the name, trademarks, service marks nor logos of NVIDIA Corporation may be used to endorse or promote products derived from the NVIDIA Software without specific prior written permission from NVIDIA. Except as expressly stated in this notice, no other rights or licenses express or implied, are granted by NVIDIA herein, including but not limited to any patent rights that may be infringed by your derivative works or by other works in which the NVIDIA Software may be incorporated. No hardware is licensed hereunder. THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR ITS USE AND OPERATION EITHER ALONE OR IN COMBINATION WITH OTHER PRODUCTS. IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL, EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, LOST PROFITS; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) OR ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE NVIDIA SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \****************************************************************************/ #ifndef PARSER_H #define PARSER_H namespace glslang { // Multi-character tokens enum EFixedAtoms { // single character tokens get their own char value as their token; start here for multi-character tokens PpAtomMaxSingle = 127, // replace bad character tokens with this, to avoid accidental aliasing with the below PpAtomBadToken, // Operators PPAtomAddAssign, PPAtomSubAssign, PPAtomMulAssign, PPAtomDivAssign, PPAtomModAssign, PpAtomRight, PpAtomLeft, PpAtomRightAssign, PpAtomLeftAssign, PpAtomAndAssign, PpAtomOrAssign, PpAtomXorAssign, PpAtomAnd, PpAtomOr, PpAtomXor, PpAtomEQ, PpAtomNE, PpAtomGE, PpAtomLE, PpAtomDecrement, PpAtomIncrement, PpAtomColonColon, PpAtomPaste, // Constants PpAtomConstInt, PpAtomConstUint, PpAtomConstInt64, PpAtomConstUint64, PpAtomConstInt16, PpAtomConstUint16, PpAtomConstFloat, PpAtomConstDouble, PpAtomConstFloat16, PpAtomConstString, // Identifiers PpAtomIdentifier, // preprocessor "keywords" PpAtomDefine, PpAtomUndef, PpAtomIf, PpAtomIfdef, PpAtomIfndef, PpAtomElse, PpAtomElif, PpAtomEndif, PpAtomLine, PpAtomPragma, PpAtomError, // #version ... PpAtomVersion, PpAtomCore, PpAtomCompatibility, PpAtomEs, // #extension PpAtomExtension, // __LINE__, __FILE__, __VERSION__ PpAtomLineMacro, PpAtomFileMacro, PpAtomVersionMacro, // #include PpAtomInclude, PpAtomLast, }; } // end namespace glslang #endif /* not PARSER_H */ ================================================ FILE: src/libraries/glslang/glslang/MachineIndependent/propagateNoContraction.cpp ================================================ // // Copyright (C) 2015-2016 Google, Inc. // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following // disclaimer in the documentation and/or other materials provided // with the distribution. // // Neither the name of Google Inc. nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // // Visit the nodes in the glslang intermediate tree representation to // propagate the 'noContraction' qualifier. // #include "propagateNoContraction.h" #include #include #include #include #include #include "localintermediate.h" namespace { // Use a string to hold the access chain information, as in most cases the // access chain is short and may contain only one element, which is the symbol // ID. // Example: struct {float a; float b;} s; // Object s.a will be represented with: /0 // Object s.b will be represented with: /1 // Object s will be represented with: // For members of vector, matrix and arrays, they will be represented with the // same symbol ID of their container symbol objects. This is because their // preciseness is always the same as their container symbol objects. typedef std::string ObjectAccessChain; // The delimiter used in the ObjectAccessChain string to separate symbol ID and // different level of struct indices. const char ObjectAccesschainDelimiter = '/'; // Mapping from Symbol IDs of symbol nodes, to their defining operation // nodes. typedef std::unordered_multimap NodeMapping; // Mapping from object nodes to their access chain info string. typedef std::unordered_map AccessChainMapping; // Set of object IDs. typedef std::unordered_set ObjectAccesschainSet; // Set of return branch nodes. typedef std::unordered_set ReturnBranchNodeSet; // A helper function to tell whether a node is 'noContraction'. Returns true if // the node has 'noContraction' qualifier, otherwise false. bool isPreciseObjectNode(glslang::TIntermTyped* node) { return node->getType().getQualifier().isNoContraction(); } // Returns true if the opcode is a dereferencing one. bool isDereferenceOperation(glslang::TOperator op) { switch (op) { case glslang::EOpIndexDirect: case glslang::EOpIndexDirectStruct: case glslang::EOpIndexIndirect: case glslang::EOpVectorSwizzle: case glslang::EOpMatrixSwizzle: return true; default: return false; } } // Returns true if the opcode leads to an assignment operation. bool isAssignOperation(glslang::TOperator op) { switch (op) { case glslang::EOpAssign: case glslang::EOpAddAssign: case glslang::EOpSubAssign: case glslang::EOpMulAssign: case glslang::EOpVectorTimesMatrixAssign: case glslang::EOpVectorTimesScalarAssign: case glslang::EOpMatrixTimesScalarAssign: case glslang::EOpMatrixTimesMatrixAssign: case glslang::EOpDivAssign: case glslang::EOpModAssign: case glslang::EOpAndAssign: case glslang::EOpLeftShiftAssign: case glslang::EOpRightShiftAssign: case glslang::EOpInclusiveOrAssign: case glslang::EOpExclusiveOrAssign: case glslang::EOpPostIncrement: case glslang::EOpPostDecrement: case glslang::EOpPreIncrement: case glslang::EOpPreDecrement: return true; default: return false; } } // A helper function to get the unsigned int from a given constant union node. // Note the node should only hold a uint scalar. unsigned getStructIndexFromConstantUnion(glslang::TIntermTyped* node) { assert(node->getAsConstantUnion() && node->getAsConstantUnion()->isScalar()); unsigned struct_dereference_index = node->getAsConstantUnion()->getConstArray()[0].getUConst(); return struct_dereference_index; } // A helper function to generate symbol_label. ObjectAccessChain generateSymbolLabel(glslang::TIntermSymbol* node) { ObjectAccessChain symbol_id = std::to_string(node->getId()) + "(" + node->getName().c_str() + ")"; return symbol_id; } // Returns true if the operation is an arithmetic operation and valid for // the 'NoContraction' decoration. bool isArithmeticOperation(glslang::TOperator op) { switch (op) { case glslang::EOpAddAssign: case glslang::EOpSubAssign: case glslang::EOpMulAssign: case glslang::EOpVectorTimesMatrixAssign: case glslang::EOpVectorTimesScalarAssign: case glslang::EOpMatrixTimesScalarAssign: case glslang::EOpMatrixTimesMatrixAssign: case glslang::EOpDivAssign: case glslang::EOpModAssign: case glslang::EOpNegative: case glslang::EOpAdd: case glslang::EOpSub: case glslang::EOpMul: case glslang::EOpDiv: case glslang::EOpMod: case glslang::EOpVectorTimesScalar: case glslang::EOpVectorTimesMatrix: case glslang::EOpMatrixTimesVector: case glslang::EOpMatrixTimesScalar: case glslang::EOpMatrixTimesMatrix: case glslang::EOpDot: case glslang::EOpDotPackedEXT: case glslang::EOpDotAccSatEXT: case glslang::EOpDotPackedAccSatEXT: case glslang::EOpPostIncrement: case glslang::EOpPostDecrement: case glslang::EOpPreIncrement: case glslang::EOpPreDecrement: return true; default: return false; } } // A helper class to help manage the populating_initial_no_contraction_ flag. template class StateSettingGuard { public: StateSettingGuard(T* state_ptr, T new_state_value) : state_ptr_(state_ptr), previous_state_(*state_ptr) { *state_ptr = new_state_value; } StateSettingGuard(T* state_ptr) : state_ptr_(state_ptr), previous_state_(*state_ptr) {} void setState(T new_state_value) { *state_ptr_ = new_state_value; } ~StateSettingGuard() { *state_ptr_ = previous_state_; } private: T* state_ptr_; T previous_state_; }; // A helper function to get the front element from a given ObjectAccessChain ObjectAccessChain getFrontElement(const ObjectAccessChain& chain) { size_t pos_delimiter = chain.find(ObjectAccesschainDelimiter); return pos_delimiter == std::string::npos ? chain : chain.substr(0, pos_delimiter); } // A helper function to get the access chain starting from the second element. ObjectAccessChain subAccessChainFromSecondElement(const ObjectAccessChain& chain) { size_t pos_delimiter = chain.find(ObjectAccesschainDelimiter); return pos_delimiter == std::string::npos ? "" : chain.substr(pos_delimiter + 1); } // A helper function to get the access chain after removing a given prefix. ObjectAccessChain getSubAccessChainAfterPrefix(const ObjectAccessChain& chain, const ObjectAccessChain& prefix) { size_t pos = chain.find(prefix); if (pos != 0) return chain; return chain.substr(prefix.length() + sizeof(ObjectAccesschainDelimiter)); } // // A traverser which traverses the whole AST and populates: // 1) A mapping from symbol nodes' IDs to their defining operation nodes. // 2) A set of access chains of the initial precise object nodes. // class TSymbolDefinitionCollectingTraverser : public glslang::TIntermTraverser { public: TSymbolDefinitionCollectingTraverser(NodeMapping* symbol_definition_mapping, AccessChainMapping* accesschain_mapping, ObjectAccesschainSet* precise_objects, ReturnBranchNodeSet* precise_return_nodes); bool visitUnary(glslang::TVisit, glslang::TIntermUnary*) override; bool visitBinary(glslang::TVisit, glslang::TIntermBinary*) override; void visitSymbol(glslang::TIntermSymbol*) override; bool visitAggregate(glslang::TVisit, glslang::TIntermAggregate*) override; bool visitBranch(glslang::TVisit, glslang::TIntermBranch*) override; protected: TSymbolDefinitionCollectingTraverser& operator=(const TSymbolDefinitionCollectingTraverser&); // The mapping from symbol node IDs to their defining nodes. This should be // populated along traversing the AST. NodeMapping& symbol_definition_mapping_; // The set of symbol node IDs for precise symbol nodes, the ones marked as // 'noContraction'. ObjectAccesschainSet& precise_objects_; // The set of precise return nodes. ReturnBranchNodeSet& precise_return_nodes_; // A temporary cache of the symbol node whose defining node is to be found // currently along traversing the AST. ObjectAccessChain current_object_; // A map from object node to its access chain. This traverser stores // the built access chains into this map for each object node it has // visited. AccessChainMapping& accesschain_mapping_; // The pointer to the Function Definition node, so we can get the // preciseness of the return expression from it when we traverse the // return branch node. glslang::TIntermAggregate* current_function_definition_node_; }; TSymbolDefinitionCollectingTraverser::TSymbolDefinitionCollectingTraverser( NodeMapping* symbol_definition_mapping, AccessChainMapping* accesschain_mapping, ObjectAccesschainSet* precise_objects, std::unordered_set* precise_return_nodes) : TIntermTraverser(true, false, false), symbol_definition_mapping_(*symbol_definition_mapping), precise_objects_(*precise_objects), precise_return_nodes_(*precise_return_nodes), current_object_(), accesschain_mapping_(*accesschain_mapping), current_function_definition_node_(nullptr) {} // Visits a symbol node, set the current_object_ to the // current node symbol ID, and record a mapping from this node to the current // current_object_, which is the just obtained symbol // ID. void TSymbolDefinitionCollectingTraverser::visitSymbol(glslang::TIntermSymbol* node) { current_object_ = generateSymbolLabel(node); accesschain_mapping_[node] = current_object_; } // Visits an aggregate node, traverses all of its children. bool TSymbolDefinitionCollectingTraverser::visitAggregate(glslang::TVisit, glslang::TIntermAggregate* node) { // This aggregate node might be a function definition node, in which case we need to // cache this node, so we can get the preciseness information of the return value // of this function later. StateSettingGuard current_function_definition_node_setting_guard( ¤t_function_definition_node_); if (node->getOp() == glslang::EOpFunction) { // This is function definition node, we need to cache this node so that we can // get the preciseness of the return value later. current_function_definition_node_setting_guard.setState(node); } // Traverse the items in the sequence. glslang::TIntermSequence& seq = node->getSequence(); for (int i = 0; i < (int)seq.size(); ++i) { current_object_.clear(); seq[i]->traverse(this); } return false; } bool TSymbolDefinitionCollectingTraverser::visitBranch(glslang::TVisit, glslang::TIntermBranch* node) { if (node->getFlowOp() == glslang::EOpReturn && node->getExpression() && current_function_definition_node_ && current_function_definition_node_->getType().getQualifier().noContraction) { // This node is a return node with an expression, and its function has a // precise return value. We need to find the involved objects in its // expression and add them to the set of initial precise objects. precise_return_nodes_.insert(node); node->getExpression()->traverse(this); } return false; } // Visits a unary node. This might be an implicit assignment like i++, i--. etc. bool TSymbolDefinitionCollectingTraverser::visitUnary(glslang::TVisit /* visit */, glslang::TIntermUnary* node) { current_object_.clear(); node->getOperand()->traverse(this); if (isAssignOperation(node->getOp())) { // We should always be able to get an access chain of the operand node. assert(!current_object_.empty()); // If the operand node object is 'precise', we collect its access chain // for the initial set of 'precise' objects. if (isPreciseObjectNode(node->getOperand())) { // The operand node is an 'precise' object node, add its // access chain to the set of 'precise' objects. This is to collect // the initial set of 'precise' objects. precise_objects_.insert(current_object_); } // Gets the symbol ID from the object's access chain. ObjectAccessChain id_symbol = getFrontElement(current_object_); // Add a mapping from the symbol ID to this assignment operation node. symbol_definition_mapping_.insert(std::make_pair(id_symbol, node)); } // A unary node is not a dereference node, so we clear the access chain which // is under construction. current_object_.clear(); return false; } // Visits a binary node and updates the mapping from symbol IDs to the definition // nodes. Also collects the access chains for the initial precise objects. bool TSymbolDefinitionCollectingTraverser::visitBinary(glslang::TVisit /* visit */, glslang::TIntermBinary* node) { // Traverses the left node to build the access chain info for the object. current_object_.clear(); node->getLeft()->traverse(this); if (isAssignOperation(node->getOp())) { // We should always be able to get an access chain for the left node. assert(!current_object_.empty()); // If the left node object is 'precise', it is an initial precise object // specified in the shader source. Adds it to the initial work list to // process later. if (isPreciseObjectNode(node->getLeft())) { // The left node is an 'precise' object node, add its access chain to // the set of 'precise' objects. This is to collect the initial set // of 'precise' objects. precise_objects_.insert(current_object_); } // Gets the symbol ID from the object access chain, which should be the // first element recorded in the access chain. ObjectAccessChain id_symbol = getFrontElement(current_object_); // Adds a mapping from the symbol ID to this assignment operation node. symbol_definition_mapping_.insert(std::make_pair(id_symbol, node)); // Traverses the right node, there may be other 'assignment' // operations in the right. current_object_.clear(); node->getRight()->traverse(this); } else if (isDereferenceOperation(node->getOp())) { // The left node (parent node) is a struct type object. We need to // record the access chain information of the current node into its // object id. if (node->getOp() == glslang::EOpIndexDirectStruct) { unsigned struct_dereference_index = getStructIndexFromConstantUnion(node->getRight()); current_object_.push_back(ObjectAccesschainDelimiter); current_object_.append(std::to_string(struct_dereference_index)); } accesschain_mapping_[node] = current_object_; // For a dereference node, there is no need to traverse the right child // node as the right node should always be an integer type object. } else { // For other binary nodes, still traverse the right node. current_object_.clear(); node->getRight()->traverse(this); } return false; } // Traverses the AST and returns a tuple of four members: // 1) a mapping from symbol IDs to the definition nodes (aka. assignment nodes) of these symbols. // 2) a mapping from object nodes in the AST to the access chains of these objects. // 3) a set of access chains of precise objects. // 4) a set of return nodes with precise expressions. std::tuple getSymbolToDefinitionMappingAndPreciseSymbolIDs(const glslang::TIntermediate& intermediate) { auto result_tuple = std::make_tuple(NodeMapping(), AccessChainMapping(), ObjectAccesschainSet(), ReturnBranchNodeSet()); TIntermNode* root = intermediate.getTreeRoot(); if (root == nullptr) return result_tuple; NodeMapping& symbol_definition_mapping = std::get<0>(result_tuple); AccessChainMapping& accesschain_mapping = std::get<1>(result_tuple); ObjectAccesschainSet& precise_objects = std::get<2>(result_tuple); ReturnBranchNodeSet& precise_return_nodes = std::get<3>(result_tuple); // Traverses the AST and populate the results. TSymbolDefinitionCollectingTraverser collector(&symbol_definition_mapping, &accesschain_mapping, &precise_objects, &precise_return_nodes); root->traverse(&collector); return result_tuple; } // // A traverser that determine whether the left node (or operand node for unary // node) of an assignment node is 'precise', containing 'precise' or not, // according to the access chain a given precise object which share the same // symbol as the left node. // // Post-orderly traverses the left node subtree of an binary assignment node and: // // 1) Propagates the 'precise' from the left object nodes to this object node. // // 2) Builds object access chain along the traversal, and also compares with // the access chain of the given 'precise' object along with the traversal to // tell if the node to be defined is 'precise' or not. // class TNoContractionAssigneeCheckingTraverser : public glslang::TIntermTraverser { enum DecisionStatus { // The object node to be assigned to may contain 'precise' objects and also not 'precise' objects. Mixed = 0, // The object node to be assigned to is either a 'precise' object or a struct objects whose members are all 'precise'. Precise = 1, // The object node to be assigned to is not a 'precise' object. NotPreicse = 2, }; public: TNoContractionAssigneeCheckingTraverser(const AccessChainMapping& accesschain_mapping) : TIntermTraverser(true, false, false), accesschain_mapping_(accesschain_mapping), precise_object_(nullptr) {} // Checks the preciseness of a given assignment node with a precise object // represented as access chain. The precise object shares the same symbol // with the assignee of the given assignment node. Return a tuple of two: // // 1) The preciseness of the assignee node of this assignment node. True // if the assignee contains 'precise' objects or is 'precise', false if // the assignee is not 'precise' according to the access chain of the given // precise object. // // 2) The incremental access chain from the assignee node to its nested // 'precise' object, according to the access chain of the given precise // object. This incremental access chain can be empty, which means the // assignee is 'precise'. Otherwise it shows the path to the nested // precise object. std::tuple getPrecisenessAndRemainedAccessChain(glslang::TIntermOperator* node, const ObjectAccessChain& precise_object) { assert(isAssignOperation(node->getOp())); precise_object_ = &precise_object; ObjectAccessChain assignee_object; if (glslang::TIntermBinary* BN = node->getAsBinaryNode()) { // This is a binary assignment node, we need to check the // preciseness of the left node. assert(accesschain_mapping_.count(BN->getLeft())); // The left node (assignee node) is an object node, traverse the // node to let the 'precise' of nesting objects being transfered to // nested objects. BN->getLeft()->traverse(this); // After traversing the left node, if the left node is 'precise', // we can conclude this assignment should propagate 'precise'. if (isPreciseObjectNode(BN->getLeft())) { return make_tuple(true, ObjectAccessChain()); } // If the preciseness of the left node (assignee node) can not // be determined by now, we need to compare the access chain string // of the assignee object with the given precise object. assignee_object = accesschain_mapping_.at(BN->getLeft()); } else if (glslang::TIntermUnary* UN = node->getAsUnaryNode()) { // This is a unary assignment node, we need to check the // preciseness of the operand node. For unary assignment node, the // operand node should always be an object node. assert(accesschain_mapping_.count(UN->getOperand())); // Traverse the operand node to let the 'precise' being propagated // from lower nodes to upper nodes. UN->getOperand()->traverse(this); // After traversing the operand node, if the operand node is // 'precise', this assignment should propagate 'precise'. if (isPreciseObjectNode(UN->getOperand())) { return make_tuple(true, ObjectAccessChain()); } // If the preciseness of the operand node (assignee node) can not // be determined by now, we need to compare the access chain string // of the assignee object with the given precise object. assignee_object = accesschain_mapping_.at(UN->getOperand()); } else { // Not a binary or unary node, should not happen. assert(false); } // Compare the access chain string of the assignee node with the given // precise object to determine if this assignment should propagate // 'precise'. if (assignee_object.find(precise_object) == 0) { // The access chain string of the given precise object is a prefix // of assignee's access chain string. The assignee should be // 'precise'. return make_tuple(true, ObjectAccessChain()); } else if (precise_object.find(assignee_object) == 0) { // The assignee's access chain string is a prefix of the given // precise object, the assignee object contains 'precise' object, // and we need to pass the remained access chain to the object nodes // in the right. return make_tuple(true, getSubAccessChainAfterPrefix(precise_object, assignee_object)); } else { // The access chain strings do not match, the assignee object can // not be labeled as 'precise' according to the given precise // object. return make_tuple(false, ObjectAccessChain()); } } protected: TNoContractionAssigneeCheckingTraverser& operator=(const TNoContractionAssigneeCheckingTraverser&); bool visitBinary(glslang::TVisit, glslang::TIntermBinary* node) override; void visitSymbol(glslang::TIntermSymbol* node) override; // A map from object nodes to their access chain string (used as object ID). const AccessChainMapping& accesschain_mapping_; // A given precise object, represented in it access chain string. This // precise object is used to be compared with the assignee node to tell if // the assignee node is 'precise', contains 'precise' object or not // 'precise'. const ObjectAccessChain* precise_object_; }; // Visits a binary node. If the node is an object node, it must be a dereference // node. In such cases, if the left node is 'precise', this node should also be // 'precise'. bool TNoContractionAssigneeCheckingTraverser::visitBinary(glslang::TVisit, glslang::TIntermBinary* node) { // Traverses the left so that we transfer the 'precise' from nesting object // to its nested object. node->getLeft()->traverse(this); // If this binary node is an object node, we should have it in the // accesschain_mapping_. if (accesschain_mapping_.count(node)) { // A binary object node must be a dereference node. assert(isDereferenceOperation(node->getOp())); // If the left node is 'precise', this node should also be precise, // otherwise, compare with the given precise_object_. If the // access chain of this node matches with the given precise_object_, // this node should be marked as 'precise'. if (isPreciseObjectNode(node->getLeft())) { node->getWritableType().getQualifier().noContraction = true; } else if (accesschain_mapping_.at(node) == *precise_object_) { node->getWritableType().getQualifier().noContraction = true; } } return false; } // Visits a symbol node, if the symbol node ID (its access chain string) matches // with the given precise object, this node should be 'precise'. void TNoContractionAssigneeCheckingTraverser::visitSymbol(glslang::TIntermSymbol* node) { // A symbol node should always be an object node, and should have been added // to the map from object nodes to their access chain strings. assert(accesschain_mapping_.count(node)); if (accesschain_mapping_.at(node) == *precise_object_) { node->getWritableType().getQualifier().noContraction = true; } } // // A traverser that only traverses the right side of binary assignment nodes // and the operand node of unary assignment nodes. // // 1) Marks arithmetic operations as 'NoContraction'. // // 2) Find the object which should be marked as 'precise' in the right and // update the 'precise' object work list. // class TNoContractionPropagator : public glslang::TIntermTraverser { public: TNoContractionPropagator(ObjectAccesschainSet* precise_objects, const AccessChainMapping& accesschain_mapping) : TIntermTraverser(true, false, false), precise_objects_(*precise_objects), added_precise_object_ids_(), remained_accesschain_(), accesschain_mapping_(accesschain_mapping) {} // Propagates 'precise' in the right nodes of a given assignment node with // access chain record from the assignee node to a 'precise' object it // contains. void propagateNoContractionInOneExpression(glslang::TIntermTyped* defining_node, const ObjectAccessChain& assignee_remained_accesschain) { remained_accesschain_ = assignee_remained_accesschain; if (glslang::TIntermBinary* BN = defining_node->getAsBinaryNode()) { assert(isAssignOperation(BN->getOp())); BN->getRight()->traverse(this); if (isArithmeticOperation(BN->getOp())) { BN->getWritableType().getQualifier().noContraction = true; } } else if (glslang::TIntermUnary* UN = defining_node->getAsUnaryNode()) { assert(isAssignOperation(UN->getOp())); UN->getOperand()->traverse(this); if (isArithmeticOperation(UN->getOp())) { UN->getWritableType().getQualifier().noContraction = true; } } } // Propagates 'precise' in a given precise return node. void propagateNoContractionInReturnNode(glslang::TIntermBranch* return_node) { remained_accesschain_ = ""; assert(return_node->getFlowOp() == glslang::EOpReturn && return_node->getExpression()); return_node->getExpression()->traverse(this); } protected: TNoContractionPropagator& operator=(const TNoContractionPropagator&); // Visits an aggregate node. The node can be a initializer list, in which // case we need to find the 'precise' or 'precise' containing object node // with the access chain record. In other cases, just need to traverse all // the children nodes. bool visitAggregate(glslang::TVisit, glslang::TIntermAggregate* node) override { if (!remained_accesschain_.empty() && node->getOp() == glslang::EOpConstructStruct) { // This is a struct initializer node, and the remained // access chain is not empty, we need to refer to the // assignee_remained_access_chain_ to find the nested // 'precise' object. And we don't need to visit other nodes in this // aggregate node. // Gets the struct dereference index that leads to 'precise' object. ObjectAccessChain precise_accesschain_index_str = getFrontElement(remained_accesschain_); unsigned precise_accesschain_index = (unsigned)strtoul(precise_accesschain_index_str.c_str(), nullptr, 10); // Gets the node pointed by the access chain index extracted before. glslang::TIntermTyped* potential_precise_node = node->getSequence()[precise_accesschain_index]->getAsTyped(); assert(potential_precise_node); // Pop the front access chain index from the path, and visit the nested node. { ObjectAccessChain next_level_accesschain = subAccessChainFromSecondElement(remained_accesschain_); StateSettingGuard setup_remained_accesschain_for_next_level( &remained_accesschain_, next_level_accesschain); potential_precise_node->traverse(this); } return false; } return true; } // Visits a binary node. A binary node can be an object node, e.g. a dereference node. // As only the top object nodes in the right side of an assignment needs to be visited // and added to 'precise' work list, this traverser won't visit the children nodes of // an object node. If the binary node does not represent an object node, it should // go on to traverse its children nodes and if it is an arithmetic operation node, this // operation should be marked as 'noContraction'. bool visitBinary(glslang::TVisit, glslang::TIntermBinary* node) override { if (isDereferenceOperation(node->getOp())) { // This binary node is an object node. Need to update the precise // object set with the access chain of this node + remained // access chain . ObjectAccessChain new_precise_accesschain = accesschain_mapping_.at(node); if (remained_accesschain_.empty()) { node->getWritableType().getQualifier().noContraction = true; } else { new_precise_accesschain += ObjectAccesschainDelimiter + remained_accesschain_; } // Cache the access chain as added precise object, so we won't add the // same object to the work list again. if (!added_precise_object_ids_.count(new_precise_accesschain)) { precise_objects_.insert(new_precise_accesschain); added_precise_object_ids_.insert(new_precise_accesschain); } // Only the upper-most object nodes should be visited, so do not // visit children of this object node. return false; } // If this is an arithmetic operation, marks this node as 'noContraction'. if (isArithmeticOperation(node->getOp()) && node->getBasicType() != glslang::EbtInt) { node->getWritableType().getQualifier().noContraction = true; } // As this node is not an object node, need to traverse the children nodes. return true; } // Visits a unary node. A unary node can not be an object node. If the operation // is an arithmetic operation, need to mark this node as 'noContraction'. bool visitUnary(glslang::TVisit /* visit */, glslang::TIntermUnary* node) override { // If this is an arithmetic operation, marks this with 'noContraction' if (isArithmeticOperation(node->getOp())) { node->getWritableType().getQualifier().noContraction = true; } return true; } // Visits a symbol node. A symbol node is always an object node. So we // should always be able to find its in our collected mapping from object // nodes to access chains. As an object node, a symbol node can be either // 'precise' or containing 'precise' objects according to unused // access chain information we have when we visit this node. void visitSymbol(glslang::TIntermSymbol* node) override { // Symbol nodes are object nodes and should always have an // access chain collected before matches with it. assert(accesschain_mapping_.count(node)); ObjectAccessChain new_precise_accesschain = accesschain_mapping_.at(node); // If the unused access chain is empty, this symbol node should be // marked as 'precise'. Otherwise, the unused access chain should be // appended to the symbol ID to build a new access chain which points to // the nested 'precise' object in this symbol object. if (remained_accesschain_.empty()) { node->getWritableType().getQualifier().noContraction = true; } else { new_precise_accesschain += ObjectAccesschainDelimiter + remained_accesschain_; } // Add the new 'precise' access chain to the work list and make sure we // don't visit it again. if (!added_precise_object_ids_.count(new_precise_accesschain)) { precise_objects_.insert(new_precise_accesschain); added_precise_object_ids_.insert(new_precise_accesschain); } } // A set of precise objects, represented as access chains. ObjectAccesschainSet& precise_objects_; // Visited symbol nodes, should not revisit these nodes. ObjectAccesschainSet added_precise_object_ids_; // The left node of an assignment operation might be an parent of 'precise' objects. // This means the left node might not be an 'precise' object node, but it may contains // 'precise' qualifier which should be propagated to the corresponding child node in // the right. So we need the path from the left node to its nested 'precise' node to // tell us how to find the corresponding 'precise' node in the right. ObjectAccessChain remained_accesschain_; // A map from node pointers to their access chains. const AccessChainMapping& accesschain_mapping_; }; } namespace glslang { void PropagateNoContraction(const glslang::TIntermediate& intermediate) { // First, traverses the AST, records symbols with their defining operations // and collects the initial set of precise symbols (symbol nodes that marked // as 'noContraction') and precise return nodes. auto mappings_and_precise_objects = getSymbolToDefinitionMappingAndPreciseSymbolIDs(intermediate); // The mapping of symbol node IDs to their defining nodes. This enables us // to get the defining node directly from a given symbol ID without // traversing the tree again. NodeMapping& symbol_definition_mapping = std::get<0>(mappings_and_precise_objects); // The mapping of object nodes to their access chains recorded. AccessChainMapping& accesschain_mapping = std::get<1>(mappings_and_precise_objects); // The initial set of 'precise' objects which are represented as the // access chain toward them. ObjectAccesschainSet& precise_object_accesschains = std::get<2>(mappings_and_precise_objects); // The set of 'precise' return nodes. ReturnBranchNodeSet& precise_return_nodes = std::get<3>(mappings_and_precise_objects); // Second, uses the initial set of precise objects as a work list, pops an // access chain, extract the symbol ID from it. Then: // 1) Check the assignee object, see if it is 'precise' object node or // contains 'precise' object. Obtain the incremental access chain from the // assignee node to its nested 'precise' node (if any). // 2) If the assignee object node is 'precise' or it contains 'precise' // objects, traverses the right side of the assignment operation // expression to mark arithmetic operations as 'noContration' and update // 'precise' access chain work list with new found object nodes. // Repeat above steps until the work list is empty. TNoContractionAssigneeCheckingTraverser checker(accesschain_mapping); TNoContractionPropagator propagator(&precise_object_accesschains, accesschain_mapping); // We have two initial precise work lists to handle: // 1) precise return nodes // 2) precise object access chains // We should process the precise return nodes first and the involved // objects in the return expression should be added to the precise object // access chain set. while (!precise_return_nodes.empty()) { glslang::TIntermBranch* precise_return_node = *precise_return_nodes.begin(); propagator.propagateNoContractionInReturnNode(precise_return_node); precise_return_nodes.erase(precise_return_node); } while (!precise_object_accesschains.empty()) { // Get the access chain of a precise object from the work list. ObjectAccessChain precise_object_accesschain = *precise_object_accesschains.begin(); // Get the symbol id from the access chain. ObjectAccessChain symbol_id = getFrontElement(precise_object_accesschain); // Get all the defining nodes of that symbol ID. std::pair range = symbol_definition_mapping.equal_range(symbol_id); // Visits all the assignment nodes of that symbol ID and // 1) Check if the assignee node is 'precise' or contains 'precise' // objects. // 2) Propagate the 'precise' to the top layer object nodes // in the right side of the assignment operation, update the 'precise' // work list with new access chains representing the new 'precise' // objects, and mark arithmetic operations as 'noContraction'. for (NodeMapping::iterator defining_node_iter = range.first; defining_node_iter != range.second; defining_node_iter++) { TIntermOperator* defining_node = defining_node_iter->second; // Check the assignee node. auto checker_result = checker.getPrecisenessAndRemainedAccessChain( defining_node, precise_object_accesschain); bool& contain_precise = std::get<0>(checker_result); ObjectAccessChain& remained_accesschain = std::get<1>(checker_result); // If the assignee node is 'precise' or contains 'precise', propagate the // 'precise' to the right. Otherwise just skip this assignment node. if (contain_precise) { propagator.propagateNoContractionInOneExpression(defining_node, remained_accesschain); } } // Remove the last processed 'precise' object from the work list. precise_object_accesschains.erase(precise_object_accesschain); } } } ================================================ FILE: src/libraries/glslang/glslang/MachineIndependent/propagateNoContraction.h ================================================ // // Copyright (C) 2015-2016 Google, Inc. // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following // disclaimer in the documentation and/or other materials provided // with the distribution. // // Neither the name of Google Inc. nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // // Visit the nodes in the glslang intermediate tree representation to // propagate 'noContraction' qualifier. // #pragma once #include "../Include/intermediate.h" namespace glslang { // Propagates the 'precise' qualifier for objects (objects marked with // 'noContraction' qualifier) from the shader source specified 'precise' // variables to all the involved objects, and add 'noContraction' qualifier for // the involved arithmetic operations. // Note that the same qualifier: 'noContraction' is used in both object nodes // and arithmetic operation nodes, but has different meaning. For object nodes, // 'noContraction' means the object is 'precise'; and for arithmetic operation // nodes, it means the operation should not be contracted. void PropagateNoContraction(const glslang::TIntermediate& intermediate); } // end namespace glslang ================================================ FILE: src/libraries/glslang/glslang/MachineIndependent/reflection.cpp ================================================ // // Copyright (C) 2013-2016 LunarG, Inc. // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following // disclaimer in the documentation and/or other materials provided // with the distribution. // // Neither the name of 3Dlabs Inc. Ltd. nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // #include "../Include/Common.h" #include "reflection.h" #include "LiveTraverser.h" #include "localintermediate.h" #include "gl_types.h" // // Grow the reflection database through a friend traverser class of TReflection and a // collection of functions to do a liveness traversal that note what uniforms are used // in semantically non-dead code. // // Can be used multiple times, once per stage, to grow a program reflection. // // High-level algorithm for one stage: // // 1. Put the entry point on the list of live functions. // // 2. Traverse any live function, while skipping if-tests with a compile-time constant // condition of false, and while adding any encountered function calls to the live // function list. // // Repeat until the live function list is empty. // // 3. Add any encountered uniform variables and blocks to the reflection database. // // Can be attempted with a failed link, but will return false if recursion had been detected, or // there wasn't exactly one entry point. // namespace glslang { // // The traverser: mostly pass through, except // - processing binary nodes to see if they are dereferences of an aggregates to track // - processing symbol nodes to see if they are non-aggregate objects to track // // This ignores semantically dead code by using TLiveTraverser. // // This is in the glslang namespace directly so it can be a friend of TReflection. // class TReflectionTraverser : public TIntermTraverser { public: TReflectionTraverser(const TIntermediate& i, TReflection& r) : TIntermTraverser(), intermediate(i), reflection(r), updateStageMasks(true) { } virtual bool visitBinary(TVisit, TIntermBinary* node); virtual void visitSymbol(TIntermSymbol* base); // Add a simple reference to a uniform variable to the uniform database, no dereference involved. // However, no dereference doesn't mean simple... it could be a complex aggregate. void addUniform(const TIntermSymbol& base) { if (processedDerefs.find(&base) == processedDerefs.end()) { processedDerefs.insert(&base); int blockIndex = -1; int offset = -1; TList derefs; TString baseName = base.getName(); if (base.getType().getBasicType() == EbtBlock) { offset = 0; bool anonymous = IsAnonymous(baseName); const TString& blockName = base.getType().getTypeName(); if (!anonymous) baseName = blockName; else baseName = ""; blockIndex = addBlockName(blockName, base.getType(), intermediate.getBlockSize(base.getType())); } // Use a degenerate (empty) set of dereferences to immediately put as at the end of // the dereference change expected by blowUpActiveAggregate. blowUpActiveAggregate(base.getType(), baseName, derefs, derefs.end(), offset, blockIndex, 0, -1, 0, base.getQualifier().storage, updateStageMasks, &base.getConstArray()); } } void addPipeIOVariable(const TIntermSymbol& base) { if (processedDerefs.find(&base) == processedDerefs.end()) { processedDerefs.insert(&base); const TString &name = base.getName(); const TType &type = base.getType(); const bool input = base.getQualifier().isPipeInput(); TReflection::TMapIndexToReflection &ioItems = input ? reflection.indexToPipeInput : reflection.indexToPipeOutput; TReflection::TNameToIndex &ioMapper = input ? reflection.pipeInNameToIndex : reflection.pipeOutNameToIndex; if (reflection.options & EShReflectionUnwrapIOBlocks) { bool anonymous = IsAnonymous(name); TString baseName; if (type.getBasicType() == EbtBlock) { baseName = anonymous ? TString() : type.getTypeName(); } else { baseName = anonymous ? TString() : name; } // by convention if this is an arrayed block we ignore the array in the reflection if (type.isArray() && type.getBasicType() == EbtBlock) { blowUpIOAggregate(input, baseName, TType(type, 0)); } else { blowUpIOAggregate(input, baseName, type); } } else { TReflection::TNameToIndex::const_iterator it = ioMapper.find(name.c_str()); if (it == ioMapper.end()) { // seperate pipe i/o params from uniforms and blocks // in is only for input in first stage as out is only for last stage. check traverse in call stack. ioMapper[name.c_str()] = static_cast(ioItems.size()); ioItems.push_back( TObjectReflection(name.c_str(), type, 0, mapToGlType(type), mapToGlArraySize(type), 0)); EShLanguageMask& stages = ioItems.back().stages; stages = static_cast(stages | 1 << intermediate.getStage()); } else { EShLanguageMask& stages = ioItems[it->second].stages; stages = static_cast(stages | 1 << intermediate.getStage()); } } } } // Lookup or calculate the offset of all block members at once, using the recursively // defined block offset rules. void getOffsets(const TType& type, TVector& offsets) { const TTypeList& memberList = *type.getStruct(); int memberSize = 0; int offset = 0; for (size_t m = 0; m < offsets.size(); ++m) { // if the user supplied an offset, snap to it now if (memberList[m].type->getQualifier().hasOffset()) offset = memberList[m].type->getQualifier().layoutOffset; // calculate the offset of the next member and align the current offset to this member intermediate.updateOffset(type, *memberList[m].type, offset, memberSize); // save the offset of this member offsets[m] = offset; // update for the next member offset += memberSize; } } // Calculate the stride of an array type int getArrayStride(const TType& baseType, const TType& type) { int dummySize; int stride; // consider blocks to have 0 stride, so that all offsets are relative to the start of their block if (type.getBasicType() == EbtBlock) return 0; TLayoutMatrix subMatrixLayout = type.getQualifier().layoutMatrix; intermediate.getMemberAlignment(type, dummySize, stride, baseType.getQualifier().layoutPacking, subMatrixLayout != ElmNone ? subMatrixLayout == ElmRowMajor : baseType.getQualifier().layoutMatrix == ElmRowMajor); return stride; } // count the total number of leaf members from iterating out of a block type int countAggregateMembers(const TType& parentType) { if (! parentType.isStruct()) return 1; const bool strictArraySuffix = (reflection.options & EShReflectionStrictArraySuffix); bool blockParent = (parentType.getBasicType() == EbtBlock && parentType.getQualifier().storage == EvqBuffer); const TTypeList &memberList = *parentType.getStruct(); int ret = 0; for (size_t i = 0; i < memberList.size(); i++) { const TType &memberType = *memberList[i].type; int numMembers = countAggregateMembers(memberType); // for sized arrays of structs, apply logic to expand out the same as we would below in // blowUpActiveAggregate if (memberType.isArray() && ! memberType.getArraySizes()->hasUnsized() && memberType.isStruct()) { if (! strictArraySuffix || ! blockParent) numMembers *= memberType.getArraySizes()->getCumulativeSize(); } ret += numMembers; } return ret; } // Traverse the provided deref chain, including the base, and // - build a full reflection-granularity name, array size, etc. entry out of it, if it goes down to that granularity // - recursively expand any variable array index in the middle of that traversal // - recursively expand what's left at the end if the deref chain did not reach down to reflection granularity // // arraySize tracks, just for the final dereference in the chain, if there was a specific known size. // A value of 0 for arraySize will mean to use the full array's size. void blowUpActiveAggregate(const TType& baseType, const TString& baseName, const TList& derefs, TList::const_iterator deref, int offset, int blockIndex, int arraySize, int topLevelArraySize, int topLevelArrayStride, TStorageQualifier baseStorage, bool active, const TConstUnionArray* constArray = nullptr) { // when strictArraySuffix is enabled, we closely follow the rules from ARB_program_interface_query. // Broadly: // * arrays-of-structs always have a [x] suffix. // * with array-of-struct variables in the root of a buffer block, only ever return [0]. // * otherwise, array suffixes are added whenever we iterate, even if that means expanding out an array. const bool strictArraySuffix = (reflection.options & EShReflectionStrictArraySuffix); // is this variable inside a buffer block. This flag is set back to false after we iterate inside the first array element. bool blockParent = (baseType.getBasicType() == EbtBlock && baseType.getQualifier().storage == EvqBuffer); // process the part of the dereference chain that was explicit in the shader TString name = baseName; const TType* terminalType = &baseType; const TConstUnionArray* terminalConstArray = constArray; for (; deref != derefs.end(); ++deref) { TIntermBinary* visitNode = *deref; terminalType = &visitNode->getType(); if (visitNode->getAsSymbolNode()) terminalConstArray = &visitNode->getAsSymbolNode()->getConstArray(); else if (visitNode->getAsConstantUnion()) terminalConstArray = &visitNode->getAsConstantUnion()->getConstArray(); else if (visitNode->getLeft() != nullptr && visitNode->getLeft()->getAsSymbolNode()) terminalConstArray = &visitNode->getLeft()->getAsSymbolNode()->getConstArray(); else terminalConstArray = nullptr; int index; switch (visitNode->getOp()) { case EOpIndexIndirect: { int stride = getArrayStride(baseType, visitNode->getLeft()->getType()); if (topLevelArrayStride == 0) topLevelArrayStride = stride; // Visit all the indices of this array, and for each one add on the remaining dereferencing for (int i = 0; i < std::max(visitNode->getLeft()->getType().getOuterArraySize(), 1); ++i) { TString newBaseName = name; if (terminalType->getBasicType() == EbtBlock) {} else if (strictArraySuffix && blockParent) newBaseName.append(TString("[0]")); else if (strictArraySuffix || baseType.getBasicType() != EbtBlock) newBaseName.append(TString("[") + String(i) + "]"); TList::const_iterator nextDeref = deref; ++nextDeref; blowUpActiveAggregate(*terminalType, newBaseName, derefs, nextDeref, offset, blockIndex, arraySize, topLevelArraySize, topLevelArrayStride, baseStorage, active); if (offset >= 0) offset += stride; } // it was all completed in the recursive calls above return; } case EOpIndexDirect: { int stride = getArrayStride(baseType, visitNode->getLeft()->getType()); index = visitNode->getRight()->getAsConstantUnion()->getConstArray()[0].getIConst(); if (terminalType->getBasicType() == EbtBlock) {} else if (strictArraySuffix && blockParent) name.append(TString("[0]")); else if (strictArraySuffix || baseType.getBasicType() != EbtBlock) { name.append(TString("[") + String(index) + "]"); if (offset >= 0) offset += stride * index; } if (topLevelArrayStride == 0) topLevelArrayStride = stride; // expand top-level arrays in blocks with [0] suffix if (topLevelArrayStride != 0 && visitNode->getLeft()->getType().isArray()) { blockParent = false; } break; } case EOpIndexDirectStruct: index = visitNode->getRight()->getAsConstantUnion()->getConstArray()[0].getIConst(); if (offset >= 0) offset += intermediate.getOffset(visitNode->getLeft()->getType(), index); if (name.size() > 0) name.append("."); name.append((*visitNode->getLeft()->getType().getStruct())[index].type->getFieldName()); // expand non top-level arrays with [x] suffix if (visitNode->getLeft()->getType().getBasicType() != EbtBlock && terminalType->isArray()) { blockParent = false; } break; default: break; } } // if the terminalType is still too coarse a granularity, this is still an aggregate to expand, expand it... if (! isReflectionGranularity(*terminalType)) { // the base offset of this node, that children are relative to int baseOffset = offset; if (terminalType->isArray()) { // Visit all the indices of this array, and for each one, // fully explode the remaining aggregate to dereference int stride = 0; if (offset >= 0) stride = getArrayStride(baseType, *terminalType); int arrayIterateSize = std::max(terminalType->getOuterArraySize(), 1); // for top-level arrays in blocks, only expand [0] to avoid explosion of items if ((strictArraySuffix && blockParent) || ((topLevelArraySize == arrayIterateSize) && (topLevelArrayStride == 0))) { arrayIterateSize = 1; } if (topLevelArrayStride == 0) topLevelArrayStride = stride; for (int i = 0; i < arrayIterateSize; ++i) { TString newBaseName = name; if (terminalType->getBasicType() != EbtBlock) newBaseName.append(TString("[") + String(i) + "]"); TType derefType(*terminalType, 0); if (offset >= 0) offset = baseOffset + stride * i; blowUpActiveAggregate(derefType, newBaseName, derefs, derefs.end(), offset, blockIndex, 0, topLevelArraySize, topLevelArrayStride, baseStorage, active); } } else { // Visit all members of this aggregate, and for each one, // fully explode the remaining aggregate to dereference const TTypeList& typeList = *terminalType->getStruct(); TVector memberOffsets; if (baseOffset >= 0) { memberOffsets.resize(typeList.size()); getOffsets(*terminalType, memberOffsets); } for (int i = 0; i < (int)typeList.size(); ++i) { TString newBaseName = name; if (newBaseName.size() > 0) newBaseName.append("."); newBaseName.append(typeList[i].type->getFieldName()); TType derefType(*terminalType, i); if (offset >= 0) offset = baseOffset + memberOffsets[i]; int arrayStride = topLevelArrayStride; if (terminalType->getBasicType() == EbtBlock && terminalType->getQualifier().storage == EvqBuffer && derefType.isArray()) { arrayStride = getArrayStride(baseType, derefType); } if (topLevelArraySize == -1 && arrayStride == 0 && blockParent) topLevelArraySize = 1; if (strictArraySuffix && blockParent) { // if this member is an array, store the top-level array stride but start the explosion from // the inner struct type. if (derefType.isArray() && derefType.isStruct()) { newBaseName.append("[0]"); auto dimSize = derefType.isUnsizedArray() ? 0 : derefType.getArraySizes()->getDimSize(0); blowUpActiveAggregate(TType(derefType, 0), newBaseName, derefs, derefs.end(), memberOffsets[i], blockIndex, 0, dimSize, arrayStride, terminalType->getQualifier().storage, false); } else if (derefType.isArray()) { auto dimSize = derefType.isUnsizedArray() ? 0 : derefType.getArraySizes()->getDimSize(0); blowUpActiveAggregate(derefType, newBaseName, derefs, derefs.end(), memberOffsets[i], blockIndex, 0, dimSize, 0, terminalType->getQualifier().storage, false); } else { blowUpActiveAggregate(derefType, newBaseName, derefs, derefs.end(), memberOffsets[i], blockIndex, 0, 1, 0, terminalType->getQualifier().storage, false); } } else { blowUpActiveAggregate(derefType, newBaseName, derefs, derefs.end(), offset, blockIndex, 0, topLevelArraySize, arrayStride, baseStorage, active); } } } // it was all completed in the recursive calls above return; } if ((reflection.options & EShReflectionBasicArraySuffix) && terminalType->isArray()) { name.append(TString("[0]")); } // Finally, add a full string to the reflection database, and update the array size if necessary. // If the dereferenced entity to record is an array, compute the size and update the maximum size. // there might not be a final array dereference, it could have been copied as an array object if (arraySize == 0) arraySize = mapToGlArraySize(*terminalType); TReflection::TMapIndexToReflection& variables = reflection.GetVariableMapForStorage(baseStorage); TReflection::TNameToIndex::const_iterator it = reflection.nameToIndex.find(name.c_str()); if (it == reflection.nameToIndex.end()) { int uniformIndex = (int)variables.size(); reflection.nameToIndex[name.c_str()] = uniformIndex; variables.push_back(TObjectReflection(name.c_str(), *terminalType, offset, mapToGlType(*terminalType), arraySize, blockIndex, terminalConstArray)); if (terminalType->isArray()) { variables.back().arrayStride = getArrayStride(baseType, *terminalType); if (topLevelArrayStride == 0) topLevelArrayStride = variables.back().arrayStride; } if ((reflection.options & EShReflectionSeparateBuffers) && terminalType->isAtomic()) reflection.atomicCounterUniformIndices.push_back(uniformIndex); variables.back().topLevelArraySize = topLevelArraySize; variables.back().topLevelArrayStride = topLevelArrayStride; if ((reflection.options & EShReflectionAllBlockVariables) && active) { EShLanguageMask& stages = variables.back().stages; stages = static_cast(stages | 1 << intermediate.getStage()); } } else { if (arraySize > 1) { int& reflectedArraySize = variables[it->second].size; reflectedArraySize = std::max(arraySize, reflectedArraySize); } if ((reflection.options & EShReflectionAllBlockVariables) && active) { EShLanguageMask& stages = variables[it->second].stages; stages = static_cast(stages | 1 << intermediate.getStage()); } } } // similar to blowUpActiveAggregate, but with simpler rules and no dereferences to follow. void blowUpIOAggregate(bool input, const TString &baseName, const TType &type) { TString name = baseName; // if the type is still too coarse a granularity, this is still an aggregate to expand, expand it... if (! isReflectionGranularity(type)) { if (type.isArray()) { // Visit all the indices of this array, and for each one, // fully explode the remaining aggregate to dereference for (int i = 0; i < std::max(type.getOuterArraySize(), 1); ++i) { TString newBaseName = name; newBaseName.append(TString("[") + String(i) + "]"); TType derefType(type, 0); blowUpIOAggregate(input, newBaseName, derefType); } } else { // Visit all members of this aggregate, and for each one, // fully explode the remaining aggregate to dereference const TTypeList& typeList = *type.getStruct(); for (int i = 0; i < (int)typeList.size(); ++i) { TString newBaseName = name; if (newBaseName.size() > 0) newBaseName.append("."); newBaseName.append(typeList[i].type->getFieldName()); TType derefType(type, i); blowUpIOAggregate(input, newBaseName, derefType); } } // it was all completed in the recursive calls above return; } if ((reflection.options & EShReflectionBasicArraySuffix) && type.isArray()) { name.append(TString("[0]")); } TReflection::TMapIndexToReflection &ioItems = input ? reflection.indexToPipeInput : reflection.indexToPipeOutput; std::string namespacedName = input ? "in " : "out "; namespacedName += name.c_str(); TReflection::TNameToIndex::const_iterator it = reflection.nameToIndex.find(namespacedName); if (it == reflection.nameToIndex.end()) { reflection.nameToIndex[namespacedName] = (int)ioItems.size(); ioItems.push_back( TObjectReflection(name.c_str(), type, 0, mapToGlType(type), mapToGlArraySize(type), 0)); EShLanguageMask& stages = ioItems.back().stages; stages = static_cast(stages | 1 << intermediate.getStage()); } else { EShLanguageMask& stages = ioItems[it->second].stages; stages = static_cast(stages | 1 << intermediate.getStage()); } } // Add a uniform dereference where blocks/struct/arrays are involved in the access. // Handles the situation where the left node is at the correct or too coarse a // granularity for reflection. (That is, further dereferences up the tree will be // skipped.) Earlier dereferences, down the tree, will be handled // at the same time, and logged to prevent reprocessing as the tree is traversed. // // Note: Other things like the following must be caught elsewhere: // - a simple non-array, non-struct variable (no dereference even conceivable) // - an aggregrate consumed en masse, without a dereference // // So, this code is for cases like // - a struct/block dereferencing a member (whether the member is array or not) // - an array of struct // - structs/arrays containing the above // void addDereferencedUniform(TIntermBinary* topNode) { // See if too fine-grained to process (wait to get further down the tree) const TType& leftType = topNode->getLeft()->getType(); if ((leftType.isVector() || leftType.isMatrix()) && ! leftType.isArray()) return; // We have an array or structure or block dereference, see if it's a uniform // based dereference (if not, skip it). TIntermSymbol* base = findBase(topNode); if (! base || ! base->getQualifier().isUniformOrBuffer()) return; // See if we've already processed this (e.g., in the middle of something // we did earlier), and if so skip it if (processedDerefs.find(topNode) != processedDerefs.end()) return; // Process this uniform dereference int offset = -1; int blockIndex = -1; bool anonymous = false; // See if we need to record the block itself bool block = base->getBasicType() == EbtBlock; if (block) { offset = 0; anonymous = IsAnonymous(base->getName()); const TString& blockName = base->getType().getTypeName(); TString baseName; if (! anonymous) baseName = blockName; blockIndex = addBlockName(blockName, base->getType(), intermediate.getBlockSize(base->getType())); if (reflection.options & EShReflectionAllBlockVariables) { // Use a degenerate (empty) set of dereferences to immediately put as at the end of // the dereference change expected by blowUpActiveAggregate. TList derefs; // otherwise - if we're not using strict array suffix rules, or this isn't a block so we are // expanding root arrays anyway, just start the iteration from the base block type. blowUpActiveAggregate(base->getType(), baseName, derefs, derefs.end(), 0, blockIndex, 0, -1, 0, base->getQualifier().storage, false, &base->getConstArray()); } } // Process the dereference chain, backward, accumulating the pieces for later forward traversal. // If the topNode is a reflection-granularity-array dereference, don't include that last dereference. TList derefs; for (TIntermBinary* visitNode = topNode; visitNode; visitNode = visitNode->getLeft()->getAsBinaryNode()) { if (isReflectionGranularity(visitNode->getLeft()->getType())) continue; derefs.push_front(visitNode); processedDerefs.insert(visitNode); } processedDerefs.insert(base); // See if we have a specific array size to stick to while enumerating the explosion of the aggregate int arraySize = 0; if (isReflectionGranularity(topNode->getLeft()->getType()) && topNode->getLeft()->isArray()) { if (topNode->getOp() == EOpIndexDirect) arraySize = topNode->getRight()->getAsConstantUnion()->getConstArray()[0].getIConst() + 1; } // Put the dereference chain together, forward TString baseName; if (! anonymous) { if (block) baseName = base->getType().getTypeName(); else baseName = base->getName(); } blowUpActiveAggregate(base->getType(), baseName, derefs, derefs.begin(), offset, blockIndex, arraySize, -1, 0, base->getQualifier().storage, true, &base->getConstArray()); } int addBlockName(const TString& name, const TType& type, int size) { int blockIndex = 0; if (type.isArray()) { TType derefType(type, 0); for (int e = 0; e < type.getOuterArraySize(); ++e) { int memberBlockIndex = addBlockName(name + "[" + String(e) + "]", derefType, size); if (e == 0) blockIndex = memberBlockIndex; } } else { TReflection::TMapIndexToReflection& blocks = reflection.GetBlockMapForStorage(type.getQualifier().storage); TReflection::TNameToIndex::const_iterator it = reflection.nameToIndex.find(name.c_str()); if (reflection.nameToIndex.find(name.c_str()) == reflection.nameToIndex.end()) { blockIndex = (int)blocks.size(); reflection.nameToIndex[name.c_str()] = blockIndex; blocks.push_back(TObjectReflection(name.c_str(), type, -1, -1, size, blockIndex)); blocks.back().numMembers = countAggregateMembers(type); if (updateStageMasks) { EShLanguageMask& stages = blocks.back().stages; stages = static_cast(stages | 1 << intermediate.getStage()); } } else { blockIndex = it->second; if (updateStageMasks) { EShLanguageMask& stages = blocks[blockIndex].stages; stages = static_cast(stages | 1 << intermediate.getStage()); } } } return blockIndex; } // Are we at a level in a dereference chain at which individual active uniform queries are made? bool isReflectionGranularity(const TType& type) { return type.getBasicType() != EbtBlock && type.getBasicType() != EbtStruct && !type.isArrayOfArrays(); } // For a binary operation indexing into an aggregate, chase down the base of the aggregate. // Return nullptr if the topology does not fit this situation. TIntermSymbol* findBase(const TIntermBinary* node) { TIntermSymbol *base = node->getLeft()->getAsSymbolNode(); if (base) return base; TIntermBinary* left = node->getLeft()->getAsBinaryNode(); if (! left) return nullptr; return findBase(left); } // // Translate a glslang sampler type into the GL API #define number. // int mapSamplerToGlType(TSampler sampler) { if (! sampler.image) { // a sampler... switch (sampler.type) { case EbtFloat: switch ((int)sampler.dim) { case Esd1D: if (sampler.shadow) return sampler.arrayed ? GL_SAMPLER_1D_ARRAY_SHADOW : GL_SAMPLER_1D_SHADOW; else return sampler.arrayed ? GL_SAMPLER_1D_ARRAY : GL_SAMPLER_1D; case Esd2D: if (sampler.ms) { return sampler.arrayed ? GL_SAMPLER_2D_MULTISAMPLE_ARRAY : GL_SAMPLER_2D_MULTISAMPLE; } else { if (sampler.shadow) return sampler.arrayed ? GL_SAMPLER_2D_ARRAY_SHADOW : GL_SAMPLER_2D_SHADOW; else return sampler.arrayed ? GL_SAMPLER_2D_ARRAY : GL_SAMPLER_2D; } case Esd3D: return GL_SAMPLER_3D; case EsdCube: if (sampler.shadow) return sampler.arrayed ? GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW : GL_SAMPLER_CUBE_SHADOW; else return sampler.arrayed ? GL_SAMPLER_CUBE_MAP_ARRAY : GL_SAMPLER_CUBE; case EsdRect: return sampler.shadow ? GL_SAMPLER_2D_RECT_SHADOW : GL_SAMPLER_2D_RECT; case EsdBuffer: return GL_SAMPLER_BUFFER; default: return 0; } case EbtFloat16: switch ((int)sampler.dim) { case Esd1D: if (sampler.shadow) return sampler.arrayed ? GL_FLOAT16_SAMPLER_1D_ARRAY_SHADOW_AMD : GL_FLOAT16_SAMPLER_1D_SHADOW_AMD; else return sampler.arrayed ? GL_FLOAT16_SAMPLER_1D_ARRAY_AMD : GL_FLOAT16_SAMPLER_1D_AMD; case Esd2D: if (sampler.ms) { return sampler.arrayed ? GL_FLOAT16_SAMPLER_2D_MULTISAMPLE_ARRAY_AMD : GL_FLOAT16_SAMPLER_2D_MULTISAMPLE_AMD; } else { if (sampler.shadow) return sampler.arrayed ? GL_FLOAT16_SAMPLER_2D_ARRAY_SHADOW_AMD : GL_FLOAT16_SAMPLER_2D_SHADOW_AMD; else return sampler.arrayed ? GL_FLOAT16_SAMPLER_2D_ARRAY_AMD : GL_FLOAT16_SAMPLER_2D_AMD; } case Esd3D: return GL_FLOAT16_SAMPLER_3D_AMD; case EsdCube: if (sampler.shadow) return sampler.arrayed ? GL_FLOAT16_SAMPLER_CUBE_MAP_ARRAY_SHADOW_AMD : GL_FLOAT16_SAMPLER_CUBE_SHADOW_AMD; else return sampler.arrayed ? GL_FLOAT16_SAMPLER_CUBE_MAP_ARRAY_AMD : GL_FLOAT16_SAMPLER_CUBE_AMD; case EsdRect: return sampler.shadow ? GL_FLOAT16_SAMPLER_2D_RECT_SHADOW_AMD : GL_FLOAT16_SAMPLER_2D_RECT_AMD; case EsdBuffer: return GL_FLOAT16_SAMPLER_BUFFER_AMD; default: return 0; } case EbtInt: switch ((int)sampler.dim) { case Esd1D: return sampler.arrayed ? GL_INT_SAMPLER_1D_ARRAY : GL_INT_SAMPLER_1D; case Esd2D: if (sampler.ms) return sampler.arrayed ? GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY : GL_INT_SAMPLER_2D_MULTISAMPLE; else return sampler.arrayed ? GL_INT_SAMPLER_2D_ARRAY : GL_INT_SAMPLER_2D; case Esd3D: return GL_INT_SAMPLER_3D; case EsdCube: return sampler.arrayed ? GL_INT_SAMPLER_CUBE_MAP_ARRAY : GL_INT_SAMPLER_CUBE; case EsdRect: return GL_INT_SAMPLER_2D_RECT; case EsdBuffer: return GL_INT_SAMPLER_BUFFER; default: return 0; } case EbtUint: switch ((int)sampler.dim) { case Esd1D: return sampler.arrayed ? GL_UNSIGNED_INT_SAMPLER_1D_ARRAY : GL_UNSIGNED_INT_SAMPLER_1D; case Esd2D: if (sampler.ms) return sampler.arrayed ? GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY : GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE; else return sampler.arrayed ? GL_UNSIGNED_INT_SAMPLER_2D_ARRAY : GL_UNSIGNED_INT_SAMPLER_2D; case Esd3D: return GL_UNSIGNED_INT_SAMPLER_3D; case EsdCube: return sampler.arrayed ? GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY : GL_UNSIGNED_INT_SAMPLER_CUBE; case EsdRect: return GL_UNSIGNED_INT_SAMPLER_2D_RECT; case EsdBuffer: return GL_UNSIGNED_INT_SAMPLER_BUFFER; default: return 0; } default: return 0; } } else { // an image... switch (sampler.type) { case EbtFloat: switch ((int)sampler.dim) { case Esd1D: return sampler.arrayed ? GL_IMAGE_1D_ARRAY : GL_IMAGE_1D; case Esd2D: if (sampler.ms) return sampler.arrayed ? GL_IMAGE_2D_MULTISAMPLE_ARRAY : GL_IMAGE_2D_MULTISAMPLE; else return sampler.arrayed ? GL_IMAGE_2D_ARRAY : GL_IMAGE_2D; case Esd3D: return GL_IMAGE_3D; case EsdCube: return sampler.arrayed ? GL_IMAGE_CUBE_MAP_ARRAY : GL_IMAGE_CUBE; case EsdRect: return GL_IMAGE_2D_RECT; case EsdBuffer: return GL_IMAGE_BUFFER; default: return 0; } case EbtFloat16: switch ((int)sampler.dim) { case Esd1D: return sampler.arrayed ? GL_FLOAT16_IMAGE_1D_ARRAY_AMD : GL_FLOAT16_IMAGE_1D_AMD; case Esd2D: if (sampler.ms) return sampler.arrayed ? GL_FLOAT16_IMAGE_2D_MULTISAMPLE_ARRAY_AMD : GL_FLOAT16_IMAGE_2D_MULTISAMPLE_AMD; else return sampler.arrayed ? GL_FLOAT16_IMAGE_2D_ARRAY_AMD : GL_FLOAT16_IMAGE_2D_AMD; case Esd3D: return GL_FLOAT16_IMAGE_3D_AMD; case EsdCube: return sampler.arrayed ? GL_FLOAT16_IMAGE_CUBE_MAP_ARRAY_AMD : GL_FLOAT16_IMAGE_CUBE_AMD; case EsdRect: return GL_FLOAT16_IMAGE_2D_RECT_AMD; case EsdBuffer: return GL_FLOAT16_IMAGE_BUFFER_AMD; default: return 0; } case EbtInt: switch ((int)sampler.dim) { case Esd1D: return sampler.arrayed ? GL_INT_IMAGE_1D_ARRAY : GL_INT_IMAGE_1D; case Esd2D: if (sampler.ms) return sampler.arrayed ? GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY : GL_INT_IMAGE_2D_MULTISAMPLE; else return sampler.arrayed ? GL_INT_IMAGE_2D_ARRAY : GL_INT_IMAGE_2D; case Esd3D: return GL_INT_IMAGE_3D; case EsdCube: return sampler.arrayed ? GL_INT_IMAGE_CUBE_MAP_ARRAY : GL_INT_IMAGE_CUBE; case EsdRect: return GL_INT_IMAGE_2D_RECT; case EsdBuffer: return GL_INT_IMAGE_BUFFER; default: return 0; } case EbtUint: switch ((int)sampler.dim) { case Esd1D: return sampler.arrayed ? GL_UNSIGNED_INT_IMAGE_1D_ARRAY : GL_UNSIGNED_INT_IMAGE_1D; case Esd2D: if (sampler.ms) return sampler.arrayed ? GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY : GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE; else return sampler.arrayed ? GL_UNSIGNED_INT_IMAGE_2D_ARRAY : GL_UNSIGNED_INT_IMAGE_2D; case Esd3D: return GL_UNSIGNED_INT_IMAGE_3D; case EsdCube: return sampler.arrayed ? GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY : GL_UNSIGNED_INT_IMAGE_CUBE; case EsdRect: return GL_UNSIGNED_INT_IMAGE_2D_RECT; case EsdBuffer: return GL_UNSIGNED_INT_IMAGE_BUFFER; default: return 0; } default: return 0; } } } // // Translate a glslang type into the GL API #define number. // Ignores arrayness. // int mapToGlType(const TType& type) { switch (type.getBasicType()) { case EbtSampler: return mapSamplerToGlType(type.getSampler()); case EbtStruct: case EbtBlock: case EbtVoid: return 0; default: break; } if (type.isVector()) { int offset = type.getVectorSize() - 2; switch (type.getBasicType()) { case EbtFloat: return GL_FLOAT_VEC2 + offset; case EbtDouble: return GL_DOUBLE_VEC2 + offset; case EbtFloat16: return GL_FLOAT16_VEC2_NV + offset; case EbtInt: return GL_INT_VEC2 + offset; case EbtUint: return GL_UNSIGNED_INT_VEC2 + offset; case EbtInt64: return GL_INT64_VEC2_ARB + offset; case EbtUint64: return GL_UNSIGNED_INT64_VEC2_ARB + offset; case EbtBool: return GL_BOOL_VEC2 + offset; case EbtAtomicUint: return GL_UNSIGNED_INT_ATOMIC_COUNTER + offset; default: return 0; } } if (type.isMatrix()) { switch (type.getBasicType()) { case EbtFloat: switch (type.getMatrixCols()) { case 2: switch (type.getMatrixRows()) { case 2: return GL_FLOAT_MAT2; case 3: return GL_FLOAT_MAT2x3; case 4: return GL_FLOAT_MAT2x4; default: return 0; } case 3: switch (type.getMatrixRows()) { case 2: return GL_FLOAT_MAT3x2; case 3: return GL_FLOAT_MAT3; case 4: return GL_FLOAT_MAT3x4; default: return 0; } case 4: switch (type.getMatrixRows()) { case 2: return GL_FLOAT_MAT4x2; case 3: return GL_FLOAT_MAT4x3; case 4: return GL_FLOAT_MAT4; default: return 0; } default: return 0; } case EbtDouble: switch (type.getMatrixCols()) { case 2: switch (type.getMatrixRows()) { case 2: return GL_DOUBLE_MAT2; case 3: return GL_DOUBLE_MAT2x3; case 4: return GL_DOUBLE_MAT2x4; default: return 0; } case 3: switch (type.getMatrixRows()) { case 2: return GL_DOUBLE_MAT3x2; case 3: return GL_DOUBLE_MAT3; case 4: return GL_DOUBLE_MAT3x4; default: return 0; } case 4: switch (type.getMatrixRows()) { case 2: return GL_DOUBLE_MAT4x2; case 3: return GL_DOUBLE_MAT4x3; case 4: return GL_DOUBLE_MAT4; default: return 0; } default: return 0; } case EbtFloat16: switch (type.getMatrixCols()) { case 2: switch (type.getMatrixRows()) { case 2: return GL_FLOAT16_MAT2_AMD; case 3: return GL_FLOAT16_MAT2x3_AMD; case 4: return GL_FLOAT16_MAT2x4_AMD; default: return 0; } case 3: switch (type.getMatrixRows()) { case 2: return GL_FLOAT16_MAT3x2_AMD; case 3: return GL_FLOAT16_MAT3_AMD; case 4: return GL_FLOAT16_MAT3x4_AMD; default: return 0; } case 4: switch (type.getMatrixRows()) { case 2: return GL_FLOAT16_MAT4x2_AMD; case 3: return GL_FLOAT16_MAT4x3_AMD; case 4: return GL_FLOAT16_MAT4_AMD; default: return 0; } default: return 0; } default: return 0; } } if (type.getVectorSize() == 1) { switch (type.getBasicType()) { case EbtFloat: return GL_FLOAT; case EbtDouble: return GL_DOUBLE; case EbtFloat16: return GL_FLOAT16_NV; case EbtInt: return GL_INT; case EbtUint: return GL_UNSIGNED_INT; case EbtInt64: return GL_INT64_ARB; case EbtUint64: return GL_UNSIGNED_INT64_ARB; case EbtBool: return GL_BOOL; case EbtAtomicUint: return GL_UNSIGNED_INT_ATOMIC_COUNTER; default: return 0; } } return 0; } int mapToGlArraySize(const TType& type) { return type.isArray() ? type.getOuterArraySize() : 1; } const TIntermediate& intermediate; TReflection& reflection; std::set processedDerefs; bool updateStageMasks; protected: TReflectionTraverser(TReflectionTraverser&); TReflectionTraverser& operator=(TReflectionTraverser&); }; // // Implement the traversal functions of interest. // // To catch dereferenced aggregates that must be reflected. // This catches them at the highest level possible in the tree. bool TReflectionTraverser::visitBinary(TVisit /* visit */, TIntermBinary* node) { switch (node->getOp()) { case EOpIndexDirect: case EOpIndexIndirect: case EOpIndexDirectStruct: addDereferencedUniform(node); break; default: break; } // still need to visit everything below, which could contain sub-expressions // containing different uniforms return true; } // To reflect non-dereferenced objects. void TReflectionTraverser::visitSymbol(TIntermSymbol* base) { if (base->getQualifier().storage == EvqUniform) { if (base->getBasicType() == EbtBlock) { if (reflection.options & EShReflectionSharedStd140UBO) { addUniform(*base); } } else { addUniform(*base); } } // #TODO add std140/layout active rules for ssbo, same with ubo. // Storage buffer blocks will be collected and expanding in this part. if((reflection.options & EShReflectionSharedStd140SSBO) && (base->getQualifier().storage == EvqBuffer && base->getBasicType() == EbtBlock && (base->getQualifier().layoutPacking == ElpStd140 || base->getQualifier().layoutPacking == ElpShared))) addUniform(*base); if ((intermediate.getStage() == reflection.firstStage && base->getQualifier().isPipeInput()) || (intermediate.getStage() == reflection.lastStage && base->getQualifier().isPipeOutput())) addPipeIOVariable(*base); } // // Implement TObjectReflection methods. // TObjectReflection::TObjectReflection(const std::string &pName, const TType &pType, int pOffset, int pGLDefineType, int pSize, int pIndex, const TConstUnionArray* pConstArray) : name(pName), offset(pOffset), glDefineType(pGLDefineType), size(pSize), index(pIndex), counterIndex(-1), numMembers(-1), arrayStride(0), topLevelArrayStride(0), stages(EShLanguageMask(0)), type(pType.clone()), constArray(pConstArray) { } int TObjectReflection::getBinding() const { if (type == nullptr || !type->getQualifier().hasBinding()) return -1; return type->getQualifier().layoutBinding; } void TObjectReflection::dump() const { printf("%s: offset %d, type %x, size %d, index %d, binding %d, stages %d", name.c_str(), offset, glDefineType, size, index, getBinding(), stages); if (counterIndex != -1) printf(", counter %d", counterIndex); if (numMembers != -1) printf(", numMembers %d", numMembers); if (arrayStride != 0) printf(", arrayStride %d", arrayStride); if (topLevelArrayStride != 0) printf(", topLevelArrayStride %d", topLevelArrayStride); printf("\n"); } // // Implement TReflection methods. // // Track any required attribute reflection, such as compute shader numthreads. // void TReflection::buildAttributeReflection(EShLanguage stage, const TIntermediate& intermediate) { if (stage == EShLangCompute) { // Remember thread dimensions for (int dim=0; dim<3; ++dim) { localSize[dim] = intermediate.getLocalSize(dim); tileShadingRateQCOM[dim] = intermediate.getTileShadingRateQCOM(dim); } } } // build counter block index associations for buffers void TReflection::buildCounterIndices(const TIntermediate& intermediate) { #ifdef ENABLE_HLSL // search for ones that have counters for (int i = 0; i < int(indexToUniformBlock.size()); ++i) { const TString counterName(intermediate.addCounterBufferName(indexToUniformBlock[i].name).c_str()); const int index = getIndex(counterName); if (index >= 0) indexToUniformBlock[i].counterIndex = index; } #else (void)intermediate; #endif } // build Shader Stages mask for all uniforms void TReflection::buildUniformStageMask(const TIntermediate& intermediate) { if (options & EShReflectionAllBlockVariables) return; for (int i = 0; i < int(indexToUniform.size()); ++i) { indexToUniform[i].stages = static_cast(indexToUniform[i].stages | 1 << intermediate.getStage()); } for (int i = 0; i < int(indexToBufferVariable.size()); ++i) { indexToBufferVariable[i].stages = static_cast(indexToBufferVariable[i].stages | 1 << intermediate.getStage()); } } // Merge live symbols from 'intermediate' into the existing reflection database. // // Returns false if the input is too malformed to do this. bool TReflection::addStage(EShLanguage stage, const TIntermediate& intermediate) { if (intermediate.getTreeRoot() == nullptr || intermediate.getNumEntryPoints() != 1 || intermediate.isRecursive()) return false; buildAttributeReflection(stage, intermediate); TReflectionTraverser it(intermediate, *this); for (auto& sequnence : intermediate.getTreeRoot()->getAsAggregate()->getSequence()) { if (sequnence->getAsAggregate() != nullptr) { if (sequnence->getAsAggregate()->getOp() == glslang::EOpLinkerObjects) { it.updateStageMasks = false; TIntermAggregate* linkerObjects = sequnence->getAsAggregate(); for (auto& sequnence : linkerObjects->getSequence()) { auto pNode = sequnence->getAsSymbolNode(); if (pNode != nullptr) { if ((pNode->getQualifier().storage == EvqUniform && (options & EShReflectionSharedStd140UBO)) || (pNode->getQualifier().storage == EvqBuffer && (options & EShReflectionSharedStd140SSBO))) { // collect std140 and shared uniform block form AST if ((pNode->getBasicType() == EbtBlock) && ((pNode->getQualifier().layoutPacking == ElpStd140) || (pNode->getQualifier().layoutPacking == ElpShared))) { pNode->traverse(&it); } } else if ((options & EShReflectionAllIOVariables) && (pNode->getQualifier().isPipeInput() || pNode->getQualifier().isPipeOutput())) { pNode->traverse(&it); } } } } else { // This traverser will travers all function in AST. // If we want reflect uncalled function, we need set linke message EShMsgKeepUncalled. // When EShMsgKeepUncalled been set to true, all function will be keep in AST, even it is a uncalled function. // This will keep some uniform variables in reflection, if those uniform variables is used in these uncalled function. // // If we just want reflect only live node, we can use a default link message or set EShMsgKeepUncalled false. // When linke message not been set EShMsgKeepUncalled, linker won't keep uncalled function in AST. // So, travers all function node can equivalent to travers live function. it.updateStageMasks = true; sequnence->getAsAggregate()->traverse(&it); } } } it.updateStageMasks = true; buildCounterIndices(intermediate); buildUniformStageMask(intermediate); return true; } void TReflection::dump() { printf("Uniform reflection:\n"); for (size_t i = 0; i < indexToUniform.size(); ++i) indexToUniform[i].dump(); printf("\n"); printf("Uniform block reflection:\n"); for (size_t i = 0; i < indexToUniformBlock.size(); ++i) indexToUniformBlock[i].dump(); printf("\n"); printf("Buffer variable reflection:\n"); for (size_t i = 0; i < indexToBufferVariable.size(); ++i) indexToBufferVariable[i].dump(); printf("\n"); printf("Buffer block reflection:\n"); for (size_t i = 0; i < indexToBufferBlock.size(); ++i) indexToBufferBlock[i].dump(); printf("\n"); printf("Pipeline input reflection:\n"); for (size_t i = 0; i < indexToPipeInput.size(); ++i) indexToPipeInput[i].dump(); printf("\n"); printf("Pipeline output reflection:\n"); for (size_t i = 0; i < indexToPipeOutput.size(); ++i) indexToPipeOutput[i].dump(); printf("\n"); static const char* axis[] = { "X", "Y", "Z" }; if (getLocalSize(0) > 1) { for (int dim=0; dim<3; ++dim) if (getLocalSize(dim) > 1) printf("Local size %s: %u\n", axis[dim], getLocalSize(dim)); printf("\n"); } if (getTileShadingRateQCOM(0) > 1 || getTileShadingRateQCOM(1) > 1) { for (int dim=0; dim<3; ++dim) printf("Tile shading rate QCOM %s: %u\n", axis[dim], getTileShadingRateQCOM(dim)); printf("\n"); } // printf("Live names\n"); // for (TNameToIndex::const_iterator it = nameToIndex.begin(); it != nameToIndex.end(); ++it) // printf("%s: %d\n", it->first.c_str(), it->second); // printf("\n"); } } // end namespace glslang ================================================ FILE: src/libraries/glslang/glslang/MachineIndependent/reflection.h ================================================ // // Copyright (C) 2013-2016 LunarG, Inc. // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following // disclaimer in the documentation and/or other materials provided // with the distribution. // // Neither the name of 3Dlabs Inc. Ltd. nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // #ifndef _REFLECTION_INCLUDED #define _REFLECTION_INCLUDED #include "../Public/ShaderLang.h" #include "../Include/BaseTypes.h" #include "../Include/visibility.h" #include #include // // A reflection database and its interface, consistent with the OpenGL API reflection queries. // namespace glslang { class TIntermediate; class TIntermAggregate; class TReflectionTraverser; // The full reflection database class TReflection { public: TReflection(EShReflectionOptions opts, EShLanguage first, EShLanguage last) : options(opts), firstStage(first), lastStage(last), badReflection(TObjectReflection::badReflection()) { for (int dim=0; dim<3; ++dim) { localSize[dim] = 0; tileShadingRateQCOM[dim] = 0; } } virtual ~TReflection() {} // grow the reflection stage by stage GLSLANG_EXPORT_FOR_TESTS bool addStage(EShLanguage, const TIntermediate&); // for mapping a uniform index to a uniform object's description int getNumUniforms() { return (int)indexToUniform.size(); } const TObjectReflection& getUniform(int i) const { if (i >= 0 && i < (int)indexToUniform.size()) return indexToUniform[i]; else return badReflection; } // for mapping a block index to the block's description int getNumUniformBlocks() const { return (int)indexToUniformBlock.size(); } const TObjectReflection& getUniformBlock(int i) const { if (i >= 0 && i < (int)indexToUniformBlock.size()) return indexToUniformBlock[i]; else return badReflection; } // for mapping an pipeline input index to the input's description int getNumPipeInputs() { return (int)indexToPipeInput.size(); } const TObjectReflection& getPipeInput(int i) const { if (i >= 0 && i < (int)indexToPipeInput.size()) return indexToPipeInput[i]; else return badReflection; } // for mapping an pipeline output index to the output's description int getNumPipeOutputs() { return (int)indexToPipeOutput.size(); } const TObjectReflection& getPipeOutput(int i) const { if (i >= 0 && i < (int)indexToPipeOutput.size()) return indexToPipeOutput[i]; else return badReflection; } // for mapping from an atomic counter to the uniform index int getNumAtomicCounters() const { return (int)atomicCounterUniformIndices.size(); } const TObjectReflection& getAtomicCounter(int i) const { if (i >= 0 && i < (int)atomicCounterUniformIndices.size()) return getUniform(atomicCounterUniformIndices[i]); else return badReflection; } // for mapping a buffer variable index to a buffer variable object's description int getNumBufferVariables() { return (int)indexToBufferVariable.size(); } const TObjectReflection& getBufferVariable(int i) const { if (i >= 0 && i < (int)indexToBufferVariable.size()) return indexToBufferVariable[i]; else return badReflection; } // for mapping a storage block index to the storage block's description int getNumStorageBuffers() const { return (int)indexToBufferBlock.size(); } const TObjectReflection& getStorageBufferBlock(int i) const { if (i >= 0 && i < (int)indexToBufferBlock.size()) return indexToBufferBlock[i]; else return badReflection; } // for mapping any name to its index (block names, uniform names and input/output names) int getIndex(const char* name) const { TNameToIndex::const_iterator it = nameToIndex.find(name); if (it == nameToIndex.end()) return -1; else return it->second; } // see getIndex(const char*) int getIndex(const TString& name) const { return getIndex(name.c_str()); } // for mapping any name to its index (only pipe input/output names) int getPipeIOIndex(const char* name, const bool inOrOut) const { TNameToIndex::const_iterator it = inOrOut ? pipeInNameToIndex.find(name) : pipeOutNameToIndex.find(name); if (it == (inOrOut ? pipeInNameToIndex.end() : pipeOutNameToIndex.end())) return -1; else return it->second; } // see gePipeIOIndex(const char*, const bool) int getPipeIOIndex(const TString& name, const bool inOrOut) const { return getPipeIOIndex(name.c_str(), inOrOut); } // Thread local size unsigned getLocalSize(int dim) const { return dim <= 2 ? localSize[dim] : 0; } // Tile shading rate QCOM unsigned getTileShadingRateQCOM(int dim) const { return dim <= 2 ? tileShadingRateQCOM[dim] : 0; } void dump(); protected: friend class glslang::TReflectionTraverser; void buildCounterIndices(const TIntermediate&); void buildUniformStageMask(const TIntermediate& intermediate); void buildAttributeReflection(EShLanguage, const TIntermediate&); // Need a TString hash: typedef std::unordered_map TNameToIndex; typedef std::map TNameToIndex; typedef std::vector TMapIndexToReflection; typedef std::vector TIndices; TMapIndexToReflection& GetBlockMapForStorage(TStorageQualifier storage) { if ((options & EShReflectionSeparateBuffers) && storage == EvqBuffer) return indexToBufferBlock; return indexToUniformBlock; } TMapIndexToReflection& GetVariableMapForStorage(TStorageQualifier storage) { if ((options & EShReflectionSeparateBuffers) && storage == EvqBuffer) return indexToBufferVariable; return indexToUniform; } EShReflectionOptions options; EShLanguage firstStage; EShLanguage lastStage; TObjectReflection badReflection; // return for queries of -1 or generally out of range; has expected descriptions with in it for this TNameToIndex nameToIndex; // maps names to indexes; can hold all types of data: uniform/buffer and which function names have been processed TNameToIndex pipeInNameToIndex; // maps pipe in names to indexes, this is a fix to seperate pipe I/O from uniforms and buffers. TNameToIndex pipeOutNameToIndex; // maps pipe out names to indexes, this is a fix to seperate pipe I/O from uniforms and buffers. TMapIndexToReflection indexToUniform; TMapIndexToReflection indexToUniformBlock; TMapIndexToReflection indexToBufferVariable; TMapIndexToReflection indexToBufferBlock; TMapIndexToReflection indexToPipeInput; TMapIndexToReflection indexToPipeOutput; TIndices atomicCounterUniformIndices; unsigned int localSize[3]; unsigned int tileShadingRateQCOM[3]; }; } // end namespace glslang #endif // _REFLECTION_INCLUDED ================================================ FILE: src/libraries/glslang/glslang/MachineIndependent/span.h ================================================ #pragma once // // Copyright (C) 2023 LunarG, Inc. // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following // disclaimer in the documentation and/or other materials provided // with the distribution. // // Neither the name of 3Dlabs Inc. Ltd. nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // // Partial implementation of std::span for C++11 // Replace with std::span if repo standard is bumped to C++20 // // This code was copied from https://github.com/KhronosGroup/Vulkan-ValidationLayers/blob/main/layers/containers/custom_containers.h template class span { public: using pointer = T *; using const_pointer = T const *; using iterator = pointer; using const_iterator = const_pointer; span() = default; span(pointer start, size_t n) : data_(start), count_(n) {} template span(Iterator start, Iterator end) : data_(&(*start)), count_(end - start) {} template span(Container &c) : data_(c.data()), count_(c.size()) {} iterator begin() { return data_; } const_iterator begin() const { return data_; } iterator end() { return data_ + count_; } const_iterator end() const { return data_ + count_; } T &operator[](int i) { return data_[i]; } const T &operator[](int i) const { return data_[i]; } T &front() { return *data_; } const T &front() const { return *data_; } T &back() { return *(data_ + (count_ - 1)); } const T &back() const { return *(data_ + (count_ - 1)); } size_t size() const { return count_; } bool empty() const { return count_ == 0; } pointer data() { return data_; } const_pointer data() const { return data_; } private: pointer data_ = {}; size_t count_ = 0; }; // // Allow type inference that using the constructor doesn't allow in C++11 template span make_span(T *begin, size_t count) { return span(begin, count); } template span make_span(T *begin, T *end) { return make_span(begin, end); } ================================================ FILE: src/libraries/glslang/glslang/OSDependent/Unix/ossource.cpp ================================================ // // Copyright (C) 2002-2005 3Dlabs Inc. Ltd. // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following // disclaimer in the documentation and/or other materials provided // with the distribution. // // Neither the name of 3Dlabs Inc. Ltd. nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // // // This file contains the Linux-specific functions // #include "../osinclude.h" #include #if !defined(__Fuchsia__) #include #endif namespace glslang { // #define DUMP_COUNTERS void OS_DumpMemoryCounters() { #ifdef DUMP_COUNTERS struct rusage usage; if (getrusage(RUSAGE_SELF, &usage) == 0) printf("Working set size: %ld\n", usage.ru_maxrss * 1024); #else printf("Recompile with DUMP_COUNTERS defined to see counters.\n"); #endif } } // end namespace glslang ================================================ FILE: src/libraries/glslang/glslang/OSDependent/Web/glslang.after.js ================================================ export default (() => { const initialize = () => { return new Promise(resolve => { Module({ locateFile() { const i = import.meta.url.lastIndexOf('/') return import.meta.url.substring(0, i) + '/glslang.wasm'; }, onRuntimeInitialized() { resolve({ compileGLSLZeroCopy: this.compileGLSLZeroCopy, compileGLSL: this.compileGLSL, }); }, }); }); }; let instance; return () => { if (!instance) { instance = initialize(); } return instance; }; })(); ================================================ FILE: src/libraries/glslang/glslang/OSDependent/Web/glslang.js.cpp ================================================ // // Copyright (C) 2019 Google, Inc. // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following // disclaimer in the documentation and/or other materials provided // with the distribution. // // Neither the name of 3Dlabs Inc. Ltd. nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // #include #include #include #ifdef __EMSCRIPTEN__ #include #endif #include "../../../SPIRV/GlslangToSpv.h" #include "../../../glslang/Public/ShaderLang.h" #ifndef __EMSCRIPTEN__ #define EMSCRIPTEN_KEEPALIVE #endif const TBuiltInResource DefaultTBuiltInResource = { /* .MaxLights = */ 32, /* .MaxClipPlanes = */ 6, /* .MaxTextureUnits = */ 32, /* .MaxTextureCoords = */ 32, /* .MaxVertexAttribs = */ 64, /* .MaxVertexUniformComponents = */ 4096, /* .MaxVaryingFloats = */ 64, /* .MaxVertexTextureImageUnits = */ 32, /* .MaxCombinedTextureImageUnits = */ 80, /* .MaxTextureImageUnits = */ 32, /* .MaxFragmentUniformComponents = */ 4096, /* .MaxDrawBuffers = */ 32, /* .MaxVertexUniformVectors = */ 128, /* .MaxVaryingVectors = */ 8, /* .MaxFragmentUniformVectors = */ 16, /* .MaxVertexOutputVectors = */ 16, /* .MaxFragmentInputVectors = */ 15, /* .MinProgramTexelOffset = */ -8, /* .MaxProgramTexelOffset = */ 7, /* .MaxClipDistances = */ 8, /* .MaxComputeWorkGroupCountX = */ 65535, /* .MaxComputeWorkGroupCountY = */ 65535, /* .MaxComputeWorkGroupCountZ = */ 65535, /* .MaxComputeWorkGroupSizeX = */ 1024, /* .MaxComputeWorkGroupSizeY = */ 1024, /* .MaxComputeWorkGroupSizeZ = */ 64, /* .MaxComputeUniformComponents = */ 1024, /* .MaxComputeTextureImageUnits = */ 16, /* .MaxComputeImageUniforms = */ 8, /* .MaxComputeAtomicCounters = */ 8, /* .MaxComputeAtomicCounterBuffers = */ 1, /* .MaxVaryingComponents = */ 60, /* .MaxVertexOutputComponents = */ 64, /* .MaxGeometryInputComponents = */ 64, /* .MaxGeometryOutputComponents = */ 128, /* .MaxFragmentInputComponents = */ 128, /* .MaxImageUnits = */ 8, /* .MaxCombinedImageUnitsAndFragmentOutputs = */ 8, /* .MaxCombinedShaderOutputResources = */ 8, /* .MaxImageSamples = */ 0, /* .MaxVertexImageUniforms = */ 0, /* .MaxTessControlImageUniforms = */ 0, /* .MaxTessEvaluationImageUniforms = */ 0, /* .MaxGeometryImageUniforms = */ 0, /* .MaxFragmentImageUniforms = */ 8, /* .MaxCombinedImageUniforms = */ 8, /* .MaxGeometryTextureImageUnits = */ 16, /* .MaxGeometryOutputVertices = */ 256, /* .MaxGeometryTotalOutputComponents = */ 1024, /* .MaxGeometryUniformComponents = */ 1024, /* .MaxGeometryVaryingComponents = */ 64, /* .MaxTessControlInputComponents = */ 128, /* .MaxTessControlOutputComponents = */ 128, /* .MaxTessControlTextureImageUnits = */ 16, /* .MaxTessControlUniformComponents = */ 1024, /* .MaxTessControlTotalOutputComponents = */ 4096, /* .MaxTessEvaluationInputComponents = */ 128, /* .MaxTessEvaluationOutputComponents = */ 128, /* .MaxTessEvaluationTextureImageUnits = */ 16, /* .MaxTessEvaluationUniformComponents = */ 1024, /* .MaxTessPatchComponents = */ 120, /* .MaxPatchVertices = */ 32, /* .MaxTessGenLevel = */ 64, /* .MaxViewports = */ 16, /* .MaxVertexAtomicCounters = */ 0, /* .MaxTessControlAtomicCounters = */ 0, /* .MaxTessEvaluationAtomicCounters = */ 0, /* .MaxGeometryAtomicCounters = */ 0, /* .MaxFragmentAtomicCounters = */ 8, /* .MaxCombinedAtomicCounters = */ 8, /* .MaxAtomicCounterBindings = */ 1, /* .MaxVertexAtomicCounterBuffers = */ 0, /* .MaxTessControlAtomicCounterBuffers = */ 0, /* .MaxTessEvaluationAtomicCounterBuffers = */ 0, /* .MaxGeometryAtomicCounterBuffers = */ 0, /* .MaxFragmentAtomicCounterBuffers = */ 1, /* .MaxCombinedAtomicCounterBuffers = */ 1, /* .MaxAtomicCounterBufferSize = */ 16384, /* .MaxTransformFeedbackBuffers = */ 4, /* .MaxTransformFeedbackInterleavedComponents = */ 64, /* .MaxCullDistances = */ 8, /* .MaxCombinedClipAndCullDistances = */ 8, /* .MaxSamples = */ 4, /* .maxMeshOutputVerticesNV = */ 256, /* .maxMeshOutputPrimitivesNV = */ 512, /* .maxMeshWorkGroupSizeX_NV = */ 32, /* .maxMeshWorkGroupSizeY_NV = */ 1, /* .maxMeshWorkGroupSizeZ_NV = */ 1, /* .maxTaskWorkGroupSizeX_NV = */ 32, /* .maxTaskWorkGroupSizeY_NV = */ 1, /* .maxTaskWorkGroupSizeZ_NV = */ 1, /* .maxMeshViewCountNV = */ 4, /* .maxMeshOutputVerticesEXT = */ 256, /* .maxMeshOutputPrimitivesEXT = */ 512, /* .maxMeshWorkGroupSizeX_EXT = */ 32, /* .maxMeshWorkGroupSizeY_EXT = */ 1, /* .maxMeshWorkGroupSizeZ_EXT = */ 1, /* .maxTaskWorkGroupSizeX_EXT = */ 32, /* .maxTaskWorkGroupSizeY_EXT = */ 1, /* .maxTaskWorkGroupSizeZ_EXT = */ 1, /* .maxMeshViewCountEXT = */ 4, /* .maxDualSourceDrawBuffersEXT = */ 1, /* .limits = */ { /* .nonInductiveForLoops = */ 1, /* .whileLoops = */ 1, /* .doWhileLoops = */ 1, /* .generalUniformIndexing = */ 1, /* .generalAttributeMatrixVectorIndexing = */ 1, /* .generalVaryingIndexing = */ 1, /* .generalSamplerIndexing = */ 1, /* .generalVariableIndexing = */ 1, /* .generalConstantMatrixVectorIndexing = */ 1, }}; static bool initialized = false; extern "C" { /* * Takes in a GLSL shader as a string and converts it to SPIR-V in binary form. * * |glsl| Null-terminated string containing the shader to be converted. * |stage_int| Magic number indicating the type of shader being processed. * Legal values are as follows: * Vertex = 0 * Fragment = 4 * Compute = 5 * |gen_debug| Flag to indicate if debug information should be generated. * |spirv| Output parameter for a pointer to the resulting SPIR-V data. * |spirv_len| Output parameter for the length of the output binary buffer. * * Returns a void* pointer which, if not null, must be destroyed by * destroy_output_buffer.o. (This is not the same pointer returned in |spirv|.) * If null, the compilation failed. */ EMSCRIPTEN_KEEPALIVE void* convert_glsl_to_spirv(const char* glsl, int stage_int, bool gen_debug, glslang::EShTargetLanguageVersion spirv_version, uint32_t** spirv, size_t* spirv_len) { if (glsl == nullptr) { fprintf(stderr, "Input pointer null\n"); return nullptr; } if (spirv == nullptr || spirv_len == nullptr) { fprintf(stderr, "Output pointer null\n"); return nullptr; } *spirv = nullptr; *spirv_len = 0; if (stage_int != 0 && stage_int != 4 && stage_int != 5) { fprintf(stderr, "Invalid shader stage\n"); return nullptr; } EShLanguage stage = static_cast(stage_int); switch (spirv_version) { case glslang::EShTargetSpv_1_0: case glslang::EShTargetSpv_1_1: case glslang::EShTargetSpv_1_2: case glslang::EShTargetSpv_1_3: case glslang::EShTargetSpv_1_4: case glslang::EShTargetSpv_1_5: break; default: fprintf(stderr, "Invalid SPIR-V version number\n"); return nullptr; } if (!initialized) { glslang::InitializeProcess(); initialized = true; } glslang::TShader shader(stage); shader.setStrings(&glsl, 1); shader.setEnvInput(glslang::EShSourceGlsl, stage, glslang::EShClientVulkan, 100); shader.setEnvClient(glslang::EShClientVulkan, glslang::EShTargetVulkan_1_0); shader.setEnvTarget(glslang::EShTargetSpv, spirv_version); if (!shader.parse(&DefaultTBuiltInResource, 100, true, EShMsgDefault)) { fprintf(stderr, "Parse failed\n"); fprintf(stderr, "%s\n", shader.getInfoLog()); return nullptr; } glslang::TProgram program; program.addShader(&shader); if (!program.link(EShMsgDefault)) { fprintf(stderr, "Link failed\n"); fprintf(stderr, "%s\n", program.getInfoLog()); return nullptr; } glslang::SpvOptions spvOptions; spvOptions.generateDebugInfo = gen_debug; spvOptions.optimizeSize = false; spvOptions.disassemble = false; spvOptions.validate = false; std::vector* output = new std::vector; glslang::GlslangToSpv(*program.getIntermediate(stage), *output, nullptr, &spvOptions); *spirv_len = output->size(); *spirv = output->data(); return output; } /* * Destroys a buffer created by convert_glsl_to_spirv */ EMSCRIPTEN_KEEPALIVE void destroy_output_buffer(void* p) { delete static_cast*>(p); } } // extern "C" /* * For non-Emscripten builds we supply a generic main, so that the glslang.js * build target can generate an executable with a trivial use case instead of * generating a WASM binary. This is done so that there is a target that can be * built and output analyzed using desktop tools, since WASM binaries are * specific to the Emscripten toolchain. */ #ifndef __EMSCRIPTEN__ int main() { const char* input = R"(#version 310 es void main() { })"; uint32_t* output; size_t output_len; void* id = convert_glsl_to_spirv(input, 4, false, glslang::EShTargetSpv_1_0, &output, &output_len); assert(output != nullptr); assert(output_len != 0); destroy_output_buffer(id); return 0; } #endif // ifndef __EMSCRIPTEN__ ================================================ FILE: src/libraries/glslang/glslang/OSDependent/Web/glslang.pre.js ================================================ Module['compileGLSLZeroCopy'] = function(glsl, shader_stage, gen_debug, spirv_version) { gen_debug = !!gen_debug; var shader_stage_int; // EShLanguage switch (shader_stage) { case 'vertex': shader_stage_int = 0; break; case 'fragment': shader_stage_int = 4; break; case 'compute': shader_stage_int = 5; break; default: throw new Error("shader_stage must be 'vertex', 'fragment', or 'compute'."); } spirv_version = spirv_version || '1.0'; var spirv_version_int; // EShTargetLanguageVersion switch (spirv_version) { case '1.0': spirv_version_int = (1 << 16) | (0 << 8); break; case '1.1': spirv_version_int = (1 << 16) | (1 << 8); break; case '1.2': spirv_version_int = (1 << 16) | (2 << 8); break; case '1.3': spirv_version_int = (1 << 16) | (3 << 8); break; case '1.4': spirv_version_int = (1 << 16) | (4 << 8); break; case '1.5': spirv_version_int = (1 << 16) | (5 << 8); break; default: throw new Error("spirv_version must be '1.0' ~ '1.5'."); } var p_output = Module['_malloc'](4); var p_output_len = Module['_malloc'](4); var id = Module['ccall']('convert_glsl_to_spirv', 'number', ['string', 'number', 'boolean', 'number', 'number', 'number'], [glsl, shader_stage_int, gen_debug, spirv_version_int, p_output, p_output_len]); var output = getValue(p_output, 'i32'); var output_len = getValue(p_output_len, 'i32'); Module['_free'](p_output); Module['_free'](p_output_len); if (id === 0) { throw new Error('GLSL compilation failed'); } var ret = {}; var outputIndexU32 = output / 4; ret['data'] = Module['HEAPU32'].subarray(outputIndexU32, outputIndexU32 + output_len); ret['free'] = function() { Module['_destroy_output_buffer'](id); }; return ret; }; Module['compileGLSL'] = function(glsl, shader_stage, gen_debug, spirv_version) { var compiled = Module['compileGLSLZeroCopy'](glsl, shader_stage, gen_debug, spirv_version); var ret = compiled['data'].slice() compiled['free'](); return ret; }; ================================================ FILE: src/libraries/glslang/glslang/OSDependent/Windows/ossource.cpp ================================================ // // Copyright (C) 2002-2005 3Dlabs Inc. Ltd. // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following // disclaimer in the documentation and/or other materials provided // with the distribution. // // Neither the name of 3Dlabs Inc. Ltd. nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // #include "../osinclude.h" #define STRICT #define VC_EXTRALEAN 1 #include #include #include #include // // This file contains the Window-OS-specific functions // #if !(defined(_WIN32) || defined(_WIN64)) #error Trying to build a windows specific file in a non windows build. #endif namespace glslang { //#define DUMP_COUNTERS void OS_DumpMemoryCounters() { #ifdef DUMP_COUNTERS PROCESS_MEMORY_COUNTERS counters; GetProcessMemoryInfo(GetCurrentProcess(), &counters, sizeof(counters)); printf("Working set size: %d\n", counters.WorkingSetSize); #else printf("Recompile with DUMP_COUNTERS defined to see counters.\n"); #endif } } // namespace glslang ================================================ FILE: src/libraries/glslang/glslang/OSDependent/osinclude.h ================================================ // // Copyright (C) 2002-2005 3Dlabs Inc. Ltd. // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following // disclaimer in the documentation and/or other materials provided // with the distribution. // // Neither the name of 3Dlabs Inc. Ltd. nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // #ifndef __OSINCLUDE_H #define __OSINCLUDE_H #include "../Include/visibility.h" namespace glslang { GLSLANG_EXPORT void OS_DumpMemoryCounters(); } // end namespace glslang #endif // __OSINCLUDE_H ================================================ FILE: src/libraries/glslang/glslang/Public/ResourceLimits.h ================================================ // // Copyright (C) 2016 Google, Inc. // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following // disclaimer in the documentation and/or other materials provided // with the distribution. // // Neither the name of Google Inc. nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. #ifndef _STAND_ALONE_RESOURCE_LIMITS_INCLUDED_ #define _STAND_ALONE_RESOURCE_LIMITS_INCLUDED_ #include #include "../Include/ResourceLimits.h" #include "../Include/visibility.h" // Return pointer to user-writable Resource to pass through API in // future-proof way. GLSLANG_EXPORT extern TBuiltInResource* GetResources(); // These are the default resources for TBuiltInResources, used for both // - parsing this string for the case where the user didn't supply one, // - dumping out a template for user construction of a config file. GLSLANG_EXPORT extern const TBuiltInResource* GetDefaultResources(); // Returns the DefaultTBuiltInResource as a human-readable string. GLSLANG_EXPORT std::string GetDefaultTBuiltInResourceString(); // Decodes the resource limits from |config| to |resources|. GLSLANG_EXPORT void DecodeResourceLimits(TBuiltInResource* resources, char* config); #endif // _STAND_ALONE_RESOURCE_LIMITS_INCLUDED_ ================================================ FILE: src/libraries/glslang/glslang/Public/ShaderLang.h ================================================ // // Copyright (C) 2002-2005 3Dlabs Inc. Ltd. // Copyright (C) 2013-2016 LunarG, Inc. // Copyright (C) 2015-2018 Google, Inc. // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following // disclaimer in the documentation and/or other materials provided // with the distribution. // // Neither the name of 3Dlabs Inc. Ltd. nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // #ifndef _COMPILER_INTERFACE_INCLUDED_ #define _COMPILER_INTERFACE_INCLUDED_ #include "../Include/ResourceLimits.h" #include "../Include/visibility.h" #include "../MachineIndependent/Versions.h" #include #include #ifdef _WIN32 #define C_DECL __cdecl #else #define C_DECL #endif // // This is the platform independent interface between an OGL driver // and the shading language compiler/linker. // #ifdef __cplusplus extern "C" { #endif // // Call before doing any other compiler/linker operations. // // (Call once per process, not once per thread.) // GLSLANG_EXPORT int ShInitialize(); // // Call this at process shutdown to clean up memory. // GLSLANG_EXPORT int ShFinalize(); // // Types of languages the compiler can consume. // typedef enum { EShLangVertex, EShLangTessControl, EShLangTessEvaluation, EShLangGeometry, EShLangFragment, EShLangCompute, EShLangRayGen, EShLangRayGenNV = EShLangRayGen, EShLangIntersect, EShLangIntersectNV = EShLangIntersect, EShLangAnyHit, EShLangAnyHitNV = EShLangAnyHit, EShLangClosestHit, EShLangClosestHitNV = EShLangClosestHit, EShLangMiss, EShLangMissNV = EShLangMiss, EShLangCallable, EShLangCallableNV = EShLangCallable, EShLangTask, EShLangTaskNV = EShLangTask, EShLangMesh, EShLangMeshNV = EShLangMesh, LAST_ELEMENT_MARKER(EShLangCount), } EShLanguage; // would be better as stage, but this is ancient now typedef enum : unsigned { EShLangVertexMask = (1 << EShLangVertex), EShLangTessControlMask = (1 << EShLangTessControl), EShLangTessEvaluationMask = (1 << EShLangTessEvaluation), EShLangGeometryMask = (1 << EShLangGeometry), EShLangFragmentMask = (1 << EShLangFragment), EShLangComputeMask = (1 << EShLangCompute), EShLangRayGenMask = (1 << EShLangRayGen), EShLangRayGenNVMask = EShLangRayGenMask, EShLangIntersectMask = (1 << EShLangIntersect), EShLangIntersectNVMask = EShLangIntersectMask, EShLangAnyHitMask = (1 << EShLangAnyHit), EShLangAnyHitNVMask = EShLangAnyHitMask, EShLangClosestHitMask = (1 << EShLangClosestHit), EShLangClosestHitNVMask = EShLangClosestHitMask, EShLangMissMask = (1 << EShLangMiss), EShLangMissNVMask = EShLangMissMask, EShLangCallableMask = (1 << EShLangCallable), EShLangCallableNVMask = EShLangCallableMask, EShLangTaskMask = (1 << EShLangTask), EShLangTaskNVMask = EShLangTaskMask, EShLangMeshMask = (1 << EShLangMesh), EShLangMeshNVMask = EShLangMeshMask, LAST_ELEMENT_MARKER(EShLanguageMaskCount), } EShLanguageMask; namespace glslang { class TType; class TConstUnionArray; typedef enum { EShSourceNone, EShSourceGlsl, // GLSL, includes ESSL (OpenGL ES GLSL) EShSourceHlsl, // HLSL LAST_ELEMENT_MARKER(EShSourceCount), } EShSource; // if EShLanguage were EShStage, this could be EShLanguage instead typedef enum { EShClientNone, // use when there is no client, e.g. for validation EShClientVulkan, // as GLSL dialect, specifies KHR_vulkan_glsl extension EShClientOpenGL, // as GLSL dialect, specifies ARB_gl_spirv extension LAST_ELEMENT_MARKER(EShClientCount), } EShClient; typedef enum { EShTargetNone, EShTargetSpv, // SPIR-V (preferred spelling) EshTargetSpv = EShTargetSpv, // legacy spelling LAST_ELEMENT_MARKER(EShTargetCount), } EShTargetLanguage; typedef enum { EShTargetVulkan_1_0 = (1 << 22), // Vulkan 1.0 EShTargetVulkan_1_1 = (1 << 22) | (1 << 12), // Vulkan 1.1 EShTargetVulkan_1_2 = (1 << 22) | (2 << 12), // Vulkan 1.2 EShTargetVulkan_1_3 = (1 << 22) | (3 << 12), // Vulkan 1.3 EShTargetVulkan_1_4 = (1 << 22) | (4 << 12), // Vulkan 1.4 EShTargetOpenGL_450 = 450, // OpenGL LAST_ELEMENT_MARKER(EShTargetClientVersionCount = 6), } EShTargetClientVersion; typedef EShTargetClientVersion EshTargetClientVersion; typedef enum { EShTargetSpv_1_0 = (1 << 16), // SPIR-V 1.0 EShTargetSpv_1_1 = (1 << 16) | (1 << 8), // SPIR-V 1.1 EShTargetSpv_1_2 = (1 << 16) | (2 << 8), // SPIR-V 1.2 EShTargetSpv_1_3 = (1 << 16) | (3 << 8), // SPIR-V 1.3 EShTargetSpv_1_4 = (1 << 16) | (4 << 8), // SPIR-V 1.4 EShTargetSpv_1_5 = (1 << 16) | (5 << 8), // SPIR-V 1.5 EShTargetSpv_1_6 = (1 << 16) | (6 << 8), // SPIR-V 1.6 LAST_ELEMENT_MARKER(EShTargetLanguageVersionCount = 7), } EShTargetLanguageVersion; // // Following are a series of helper enums for managing layouts and qualifiers, // used for TPublicType, TType, others. // enum TLayoutPacking { ElpNone, ElpShared, // default, but different than saying nothing ElpStd140, ElpStd430, ElpPacked, ElpScalar, ElpCount // If expanding, see bitfield width below }; struct TInputLanguage { EShSource languageFamily; // redundant information with other input, this one overrides when not EShSourceNone EShLanguage stage; // redundant information with other input, this one overrides when not EShSourceNone EShClient dialect; int dialectVersion; // version of client's language definition, not the client (when not EShClientNone) bool vulkanRulesRelaxed; }; struct TClient { EShClient client; EShTargetClientVersion version; // version of client itself (not the client's input dialect) }; struct TTarget { EShTargetLanguage language; EShTargetLanguageVersion version; // version to target, if SPIR-V, defined by "word 1" of the SPIR-V header bool hlslFunctionality1; // can target hlsl_functionality1 extension(s) }; // All source/client/target versions and settings. // Can override previous methods of setting, when items are set here. // Expected to grow, as more are added, rather than growing parameter lists. struct TEnvironment { TInputLanguage input; // definition of the input language TClient client; // what client is the overall compilation being done for? TTarget target; // what to generate }; GLSLANG_EXPORT const char* StageName(EShLanguage); } // end namespace glslang // // Types of output the linker will create. // typedef enum { EShExVertexFragment, EShExFragment } EShExecutable; // // Optimization level for the compiler. // typedef enum { EShOptNoGeneration, EShOptNone, EShOptSimple, // Optimizations that can be done quickly EShOptFull, // Optimizations that will take more time LAST_ELEMENT_MARKER(EshOptLevelCount), } EShOptimizationLevel; // // Texture and Sampler transformation mode. // typedef enum { EShTexSampTransKeep, // keep textures and samplers as is (default) EShTexSampTransUpgradeTextureRemoveSampler, // change texture w/o embeded sampler into sampled texture and throw away all samplers LAST_ELEMENT_MARKER(EShTexSampTransCount), } EShTextureSamplerTransformMode; // // Message choices for what errors and warnings are given. // enum EShMessages : unsigned { EShMsgDefault = 0, // default is to give all required errors and extra warnings EShMsgRelaxedErrors = (1 << 0), // be liberal in accepting input EShMsgSuppressWarnings = (1 << 1), // suppress all warnings, except those required by the specification EShMsgAST = (1 << 2), // print the AST intermediate representation EShMsgSpvRules = (1 << 3), // issue messages for SPIR-V generation EShMsgVulkanRules = (1 << 4), // issue messages for Vulkan-requirements of GLSL for SPIR-V EShMsgOnlyPreprocessor = (1 << 5), // only print out errors produced by the preprocessor EShMsgReadHlsl = (1 << 6), // use HLSL parsing rules and semantics EShMsgCascadingErrors = (1 << 7), // get cascading errors; risks error-recovery issues, instead of an early exit EShMsgKeepUncalled = (1 << 8), // for testing, don't eliminate uncalled functions EShMsgHlslOffsets = (1 << 9), // allow block offsets to follow HLSL rules instead of GLSL rules EShMsgDebugInfo = (1 << 10), // save debug information EShMsgHlslEnable16BitTypes = (1 << 11), // enable use of 16-bit types in SPIR-V for HLSL EShMsgHlslLegalization = (1 << 12), // enable HLSL Legalization messages EShMsgHlslDX9Compatible = (1 << 13), // enable HLSL DX9 compatible mode (for samplers and semantics) EShMsgBuiltinSymbolTable = (1 << 14), // print the builtin symbol table EShMsgEnhanced = (1 << 15), // enhanced message readability EShMsgAbsolutePath = (1 << 16), // Output Absolute path for messages EShMsgDisplayErrorColumn = (1 << 17), // Display error message column aswell as line EShMsgLinkTimeOptimization = (1 << 18), // perform cross-stage optimizations during linking EShMsgValidateCrossStageIO = (1 << 19), // validate shader inputs have matching outputs in previous stage EshMsgOverlappingLocations = (1 << 29), // Always validate overlapping layout locations LAST_ELEMENT_MARKER(EShMsgCount), }; // // Options for building reflection // typedef enum { EShReflectionDefault = 0, // default is original behaviour before options were added EShReflectionStrictArraySuffix = (1 << 0), // reflection will follow stricter rules for array-of-structs suffixes EShReflectionBasicArraySuffix = (1 << 1), // arrays of basic types will be appended with [0] as in GL reflection EShReflectionIntermediateIO = (1 << 2), // reflect inputs and outputs to program, even with no vertex shader EShReflectionSeparateBuffers = (1 << 3), // buffer variables and buffer blocks are reflected separately EShReflectionAllBlockVariables = (1 << 4), // reflect all variables in blocks, even if they are inactive EShReflectionUnwrapIOBlocks = (1 << 5), // unwrap input/output blocks the same as with uniform blocks EShReflectionAllIOVariables = (1 << 6), // reflect all input/output variables, even if they are inactive EShReflectionSharedStd140SSBO = (1 << 7), // Apply std140/shared rules for ubo to ssbo EShReflectionSharedStd140UBO = (1 << 8), // Apply std140/shared rules for ubo to ssbo LAST_ELEMENT_MARKER(EShReflectionCount), } EShReflectionOptions; // // Build a table for bindings. This can be used for locating // attributes, uniforms, globals, etc., as needed. // typedef struct { const char* name; int binding; } ShBinding; typedef struct { int numBindings; ShBinding* bindings; // array of bindings } ShBindingTable; // // ShHandle held by but opaque to the driver. It is allocated, // managed, and de-allocated by the compiler/linker. Its contents // are defined by and used by the compiler and linker. For example, // symbol table information and object code passed from the compiler // to the linker can be stored where ShHandle points. // // If handle creation fails, 0 will be returned. // typedef void* ShHandle; // // Driver calls these to create and destroy compiler/linker // objects. // GLSLANG_EXPORT ShHandle ShConstructCompiler(const EShLanguage, int /*debugOptions unused*/); // one per shader GLSLANG_EXPORT ShHandle ShConstructLinker(const EShExecutable, int /*debugOptions unused*/); // one per shader pair GLSLANG_EXPORT ShHandle ShConstructUniformMap(); // one per uniform namespace (currently entire program object) GLSLANG_EXPORT void ShDestruct(ShHandle); // // The return value of ShCompile is boolean, non-zero indicating // success. // // The info-log should be written by ShCompile into // ShHandle, so it can answer future queries. // GLSLANG_EXPORT int ShCompile(const ShHandle, const char* const shaderStrings[], const int numStrings, const int* lengths, const EShOptimizationLevel, const TBuiltInResource* resources, int, // debugOptions unused int defaultVersion = 110, // use 100 for ES environment, overridden by #version in shader bool forwardCompatible = false, // give errors for use of deprecated features EShMessages messages = EShMsgDefault, // warnings and errors const char* fileName = nullptr ); GLSLANG_EXPORT int ShLinkExt( const ShHandle, // linker object const ShHandle h[], // compiler objects to link together const int numHandles); // // ShSetEncrpytionMethod is a place-holder for specifying // how source code is encrypted. // GLSLANG_EXPORT void ShSetEncryptionMethod(ShHandle); // // All the following return 0 if the information is not // available in the object passed down, or the object is bad. // GLSLANG_EXPORT const char* ShGetInfoLog(const ShHandle); GLSLANG_EXPORT const void* ShGetExecutable(const ShHandle); GLSLANG_EXPORT int ShSetVirtualAttributeBindings(const ShHandle, const ShBindingTable*); // to detect user aliasing GLSLANG_EXPORT int ShSetFixedAttributeBindings(const ShHandle, const ShBindingTable*); // to force any physical mappings // // Tell the linker to never assign a vertex attribute to this list of physical attributes // GLSLANG_EXPORT int ShExcludeAttributes(const ShHandle, int *attributes, int count); // // Returns the location ID of the named uniform. // Returns -1 if error. // GLSLANG_EXPORT int ShGetUniformLocation(const ShHandle uniformMap, const char* name); #ifdef __cplusplus } // end extern "C" #endif //////////////////////////////////////////////////////////////////////////////////////////// // // Deferred-Lowering C++ Interface // ----------------------------------- // // Below is a new alternate C++ interface, which deprecates the above // opaque handle-based interface. // // The below is further designed to handle multiple compilation units per stage, where // the intermediate results, including the parse tree, are preserved until link time, // rather than the above interface which is designed to have each compilation unit // lowered at compile time. In the above model, linking occurs on the lowered results, // whereas in this model intra-stage linking can occur at the parse tree // (treeRoot in TIntermediate) level, and then a full stage can be lowered. // #include #include #include class TCompiler; class TInfoSink; namespace glslang { struct Version { int major; int minor; int patch; const char* flavor; }; GLSLANG_EXPORT Version GetVersion(); GLSLANG_EXPORT const char* GetEsslVersionString(); GLSLANG_EXPORT const char* GetGlslVersionString(); GLSLANG_EXPORT int GetKhronosToolId(); class TIntermediate; class TProgram; class TPoolAllocator; class TIoMapResolver; // Call this exactly once per process before using anything else GLSLANG_EXPORT bool InitializeProcess(); // Call once per process to tear down everything GLSLANG_EXPORT void FinalizeProcess(); // Resource type for IO resolver enum TResourceType { EResSampler, EResTexture, EResImage, EResUbo, EResSsbo, EResUav, EResCount }; enum TBlockStorageClass { EbsUniform = 0, EbsStorageBuffer, EbsPushConstant, EbsNone, // not a uniform or buffer variable EbsCount, }; // Make one TShader per shader that you will link into a program. Then // - provide the shader through setStrings() or setStringsWithLengths() // - optionally call setEnv*(), see below for more detail // - optionally use setPreamble() to set a special shader string that will be // processed before all others but won't affect the validity of #version // - optionally call addProcesses() for each setting/transform, // see comment for class TProcesses // - call parse(): source language and target environment must be selected // either by correct setting of EShMessages sent to parse(), or by // explicitly calling setEnv*() // - query the info logs // // N.B.: Does not yet support having the same TShader instance being linked into // multiple programs. // // N.B.: Destruct a linked program *before* destructing the shaders linked into it. // class TShader { public: GLSLANG_EXPORT explicit TShader(EShLanguage); GLSLANG_EXPORT virtual ~TShader(); GLSLANG_EXPORT void setStrings(const char* const* s, int n); GLSLANG_EXPORT void setStringsWithLengths( const char* const* s, const int* l, int n); GLSLANG_EXPORT void setStringsWithLengthsAndNames( const char* const* s, const int* l, const char* const* names, int n); void setPreamble(const char* s) { preamble = s; } GLSLANG_EXPORT void setEntryPoint(const char* entryPoint); GLSLANG_EXPORT void setSourceEntryPoint(const char* sourceEntryPointName); GLSLANG_EXPORT void addProcesses(const std::vector&); GLSLANG_EXPORT void setUniqueId(unsigned long long id); GLSLANG_EXPORT void setOverrideVersion(int version); GLSLANG_EXPORT void setDebugInfo(bool debugInfo); // IO resolver binding data: see comments in ShaderLang.cpp GLSLANG_EXPORT void setShiftBinding(TResourceType res, unsigned int base); GLSLANG_EXPORT void setShiftSamplerBinding(unsigned int base); // DEPRECATED: use setShiftBinding GLSLANG_EXPORT void setShiftTextureBinding(unsigned int base); // DEPRECATED: use setShiftBinding GLSLANG_EXPORT void setShiftImageBinding(unsigned int base); // DEPRECATED: use setShiftBinding GLSLANG_EXPORT void setShiftUboBinding(unsigned int base); // DEPRECATED: use setShiftBinding GLSLANG_EXPORT void setShiftUavBinding(unsigned int base); // DEPRECATED: use setShiftBinding GLSLANG_EXPORT void setShiftCbufferBinding(unsigned int base); // synonym for setShiftUboBinding GLSLANG_EXPORT void setShiftSsboBinding(unsigned int base); // DEPRECATED: use setShiftBinding GLSLANG_EXPORT void setShiftBindingForSet(TResourceType res, unsigned int base, unsigned int set); GLSLANG_EXPORT void setResourceSetBinding(const std::vector& base); GLSLANG_EXPORT void setAutoMapBindings(bool map); GLSLANG_EXPORT void setAutoMapLocations(bool map); GLSLANG_EXPORT void addUniformLocationOverride(const char* name, int loc); GLSLANG_EXPORT void setUniformLocationBase(int base); GLSLANG_EXPORT void setInvertY(bool invert); GLSLANG_EXPORT void setDxPositionW(bool dxPosW); GLSLANG_EXPORT void setEnhancedMsgs(); #ifdef ENABLE_HLSL GLSLANG_EXPORT void setHlslIoMapping(bool hlslIoMap); GLSLANG_EXPORT void setFlattenUniformArrays(bool flatten); #endif GLSLANG_EXPORT void setNoStorageFormat(bool useUnknownFormat); GLSLANG_EXPORT void setNanMinMaxClamp(bool nanMinMaxClamp); GLSLANG_EXPORT void setTextureSamplerTransformMode(EShTextureSamplerTransformMode mode); GLSLANG_EXPORT void addBlockStorageOverride(const char* nameStr, glslang::TBlockStorageClass backing); GLSLANG_EXPORT void setGlobalUniformBlockName(const char* name); GLSLANG_EXPORT void setAtomicCounterBlockName(const char* name); GLSLANG_EXPORT void setGlobalUniformSet(unsigned int set); GLSLANG_EXPORT void setGlobalUniformBinding(unsigned int binding); GLSLANG_EXPORT void setAtomicCounterBlockSet(unsigned int set); GLSLANG_EXPORT void setAtomicCounterBlockBinding(unsigned int binding); GLSLANG_EXPORT void addSourceText(const char* text, size_t len); GLSLANG_EXPORT void setSourceFile(const char* file); // For setting up the environment (cleared to nothingness in the constructor). // These must be called so that parsing is done for the right source language and // target environment, either indirectly through TranslateEnvironment() based on // EShMessages et. al., or directly by the user. // // setEnvInput: The input source language and stage. If generating code for a // specific client, the input client semantics to use and the // version of that client's input semantics to use, otherwise // use EShClientNone and version of 0, e.g. for validation mode. // Note 'version' does not describe the target environment, // just the version of the source dialect to compile under. // For example, to choose the Vulkan dialect of GLSL defined by // version 100 of the KHR_vulkan_glsl extension: lang = EShSourceGlsl, // dialect = EShClientVulkan, and version = 100. // // See the definitions of TEnvironment, EShSource, EShLanguage, // and EShClient for choices and more detail. // // setEnvClient: The client that will be hosting the execution, and its version. // Note 'version' is not the version of the languages involved, but // the version of the client environment. // Use EShClientNone and version of 0 if there is no client, e.g. // for validation mode. // // See EShTargetClientVersion for choices. // // setEnvTarget: The language to translate to when generating code, and that // language's version. // Use EShTargetNone and version of 0 if there is no client, e.g. // for validation mode. // void setEnvInput(EShSource lang, EShLanguage envStage, EShClient client, int version) { environment.input.languageFamily = lang; environment.input.stage = envStage; environment.input.dialect = client; environment.input.dialectVersion = version; } void setEnvClient(EShClient client, EShTargetClientVersion version) { environment.client.client = client; environment.client.version = version; } void setEnvTarget(EShTargetLanguage lang, EShTargetLanguageVersion version) { environment.target.language = lang; environment.target.version = version; } void getStrings(const char* const* &s, int& n) { s = strings; n = numStrings; } #ifdef ENABLE_HLSL void setEnvTargetHlslFunctionality1() { environment.target.hlslFunctionality1 = true; } bool getEnvTargetHlslFunctionality1() const { return environment.target.hlslFunctionality1; } #else bool getEnvTargetHlslFunctionality1() const { return false; } #endif void setEnvInputVulkanRulesRelaxed() { environment.input.vulkanRulesRelaxed = true; } bool getEnvInputVulkanRulesRelaxed() const { return environment.input.vulkanRulesRelaxed; } void setCompileOnly() { compileOnly = true; } bool getCompileOnly() const { return compileOnly; } // Interface to #include handlers. // // To support #include, a client of Glslang does the following: // 1. Call setStringsWithNames to set the source strings and associated // names. For example, the names could be the names of the files // containing the shader sources. // 2. Call parse with an Includer. // // When the Glslang parser encounters an #include directive, it calls // the Includer's include method with the requested include name // together with the current string name. The returned IncludeResult // contains the fully resolved name of the included source, together // with the source text that should replace the #include directive // in the source stream. After parsing that source, Glslang will // release the IncludeResult object. class Includer { public: // An IncludeResult contains the resolved name and content of a source // inclusion. struct IncludeResult { IncludeResult(const std::string& headerName, const char* const headerData, const size_t headerLength, void* userData) : headerName(headerName), headerData(headerData), headerLength(headerLength), userData(userData) { } // For a successful inclusion, the fully resolved name of the requested // include. For example, in a file system-based includer, full resolution // should convert a relative path name into an absolute path name. // For a failed inclusion, this is an empty string. const std::string headerName; // The content and byte length of the requested inclusion. The // Includer producing this IncludeResult retains ownership of the // storage. // For a failed inclusion, the header // field points to a string containing error details. const char* const headerData; const size_t headerLength; // Include resolver's context. void* userData; protected: IncludeResult& operator=(const IncludeResult&); IncludeResult(); }; // For both include methods below: // // Resolves an inclusion request by name, current source name, // and include depth. // On success, returns an IncludeResult containing the resolved name // and content of the include. // On failure, returns a nullptr, or an IncludeResult // with an empty string for the headerName and error details in the // header field. // The Includer retains ownership of the contents // of the returned IncludeResult value, and those contents must // remain valid until the releaseInclude method is called on that // IncludeResult object. // // Note "local" vs. "system" is not an "either/or": "local" is an // extra thing to do over "system". Both might get called, as per // the C++ specification. // For the "system" or <>-style includes; search the "system" paths. virtual IncludeResult* includeSystem(const char* /*headerName*/, const char* /*includerName*/, size_t /*inclusionDepth*/) { return nullptr; } // For the "local"-only aspect of a "" include. Should not search in the // "system" paths, because on returning a failure, the parser will // call includeSystem() to look in the "system" locations. virtual IncludeResult* includeLocal(const char* /*headerName*/, const char* /*includerName*/, size_t /*inclusionDepth*/) { return nullptr; } // Signals that the parser will no longer use the contents of the // specified IncludeResult. virtual void releaseInclude(IncludeResult*) = 0; virtual ~Includer() {} }; // Fail all Includer searches class ForbidIncluder : public Includer { public: virtual void releaseInclude(IncludeResult*) override { } }; GLSLANG_EXPORT bool parse( const TBuiltInResource*, int defaultVersion, EProfile defaultProfile, bool forceDefaultVersionAndProfile, bool forwardCompatible, EShMessages, Includer&); bool parse(const TBuiltInResource* res, int defaultVersion, EProfile defaultProfile, bool forceDefaultVersionAndProfile, bool forwardCompatible, EShMessages messages) { TShader::ForbidIncluder includer; return parse(res, defaultVersion, defaultProfile, forceDefaultVersionAndProfile, forwardCompatible, messages, includer); } // Equivalent to parse() without a default profile and without forcing defaults. bool parse(const TBuiltInResource* builtInResources, int defaultVersion, bool forwardCompatible, EShMessages messages) { return parse(builtInResources, defaultVersion, ENoProfile, false, forwardCompatible, messages); } bool parse(const TBuiltInResource* builtInResources, int defaultVersion, bool forwardCompatible, EShMessages messages, Includer& includer) { return parse(builtInResources, defaultVersion, ENoProfile, false, forwardCompatible, messages, includer); } // NOTE: Doing just preprocessing to obtain a correct preprocessed shader string // is not an officially supported or fully working path. GLSLANG_EXPORT bool preprocess( const TBuiltInResource* builtInResources, int defaultVersion, EProfile defaultProfile, bool forceDefaultVersionAndProfile, bool forwardCompatible, EShMessages message, std::string* outputString, Includer& includer); GLSLANG_EXPORT const char* getInfoLog(); GLSLANG_EXPORT const char* getInfoDebugLog(); EShLanguage getStage() const { return stage; } TIntermediate* getIntermediate() const { return intermediate; } protected: TPoolAllocator* pool; EShLanguage stage; TCompiler* compiler; TIntermediate* intermediate; TInfoSink* infoSink; // strings and lengths follow the standard for glShaderSource: // strings is an array of numStrings pointers to string data. // lengths can be null, but if not it is an array of numStrings // integers containing the length of the associated strings. // if lengths is null or lengths[n] < 0 the associated strings[n] is // assumed to be null-terminated. // stringNames is the optional names for all the strings. If stringNames // is null, then none of the strings has name. If a certain element in // stringNames is null, then the corresponding string does not have name. const char* const* strings; // explicit code to compile, see previous comment const int* lengths; const char* const* stringNames; int numStrings; // size of the above arrays const char* preamble; // string of implicit code to compile before the explicitly provided code // a function in the source string can be renamed FROM this TO the name given in setEntryPoint. std::string sourceEntryPointName; // overrides #version in shader source or default version if #version isn't present int overrideVersion; TEnvironment environment; // Indicates this shader is meant to be used without linking bool compileOnly = false; friend class TProgram; private: TShader& operator=(TShader&); }; // // A reflection database and its interface, consistent with the OpenGL API reflection queries. // // Data needed for just a single object at the granularity exchanged by the reflection API class TObjectReflection { public: GLSLANG_EXPORT TObjectReflection(const std::string& pName, const TType& pType, int pOffset, int pGLDefineType, int pSize, int pIndex, const TConstUnionArray* pConstArray = nullptr); const TType* getType() const { return type; } const TConstUnionArray* getConstArray() const { return constArray; } GLSLANG_EXPORT int getBinding() const; GLSLANG_EXPORT void dump() const; static TObjectReflection badReflection() { return TObjectReflection(); } GLSLANG_EXPORT unsigned int layoutLocation() const; std::string name; int offset; int glDefineType; int size; // data size in bytes for a block, array size for a (non-block) object that's an array int index; int counterIndex; int numMembers; int arrayStride; // stride of an array variable int topLevelArraySize; // size of the top-level variable in a storage buffer member int topLevelArrayStride; // stride of the top-level variable in a storage buffer member EShLanguageMask stages; protected: TObjectReflection() : offset(-1), glDefineType(-1), size(-1), index(-1), counterIndex(-1), numMembers(-1), arrayStride(0), topLevelArrayStride(0), stages(EShLanguageMask(0)), type(nullptr), constArray(nullptr) { } const TType* type; const TConstUnionArray* constArray; }; class TReflection; class TIoMapper; struct TVarEntryInfo; // Allows to customize the binding layout after linking. // All used uniform variables will invoke at least validateBinding. // If validateBinding returned true then the other resolveBinding, // resolveSet, and resolveLocation are invoked to resolve the binding // and descriptor set index respectively. // // Invocations happen in a particular order: // 1) all shader inputs // 2) all shader outputs // 3) all uniforms with binding and set already defined // 4) all uniforms with binding but no set defined // 5) all uniforms with set but no binding defined // 6) all uniforms with no binding and no set defined // // mapIO will use this resolver in two phases. The first // phase is a notification phase, calling the corresponging // notifiy callbacks, this phase ends with a call to endNotifications. // Phase two starts directly after the call to endNotifications // and calls all other callbacks to validate and to get the // bindings, sets, locations, component and color indices. // // NOTE: that still limit checks are applied to bindings and sets // and may result in an error. class TIoMapResolver { public: virtual ~TIoMapResolver() {} // Should return true if the resulting/current binding would be okay. // Basic idea is to do aliasing binding checks with this. virtual bool validateBinding(EShLanguage stage, TVarEntryInfo& ent) = 0; // Should return a value >= 0 if the current binding should be overridden. // Return -1 if the current binding (including no binding) should be kept. virtual int resolveBinding(EShLanguage stage, TVarEntryInfo& ent) = 0; // Should return a value >= 0 if the current set should be overridden. // Return -1 if the current set (including no set) should be kept. virtual int resolveSet(EShLanguage stage, TVarEntryInfo& ent) = 0; // Should return a value >= 0 if the current location should be overridden. // Return -1 if the current location (including no location) should be kept. virtual int resolveUniformLocation(EShLanguage stage, TVarEntryInfo& ent) = 0; // Should return true if the resulting/current setup would be okay. // Basic idea is to do aliasing checks and reject invalid semantic names. virtual bool validateInOut(EShLanguage stage, TVarEntryInfo& ent) = 0; // Should return a value >= 0 if the current location should be overridden. // Return -1 if the current location (including no location) should be kept. virtual int resolveInOutLocation(EShLanguage stage, TVarEntryInfo& ent) = 0; // Should return a value >= 0 if the current component index should be overridden. // Return -1 if the current component index (including no index) should be kept. virtual int resolveInOutComponent(EShLanguage stage, TVarEntryInfo& ent) = 0; // Should return a value >= 0 if the current color index should be overridden. // Return -1 if the current color index (including no index) should be kept. virtual int resolveInOutIndex(EShLanguage stage, TVarEntryInfo& ent) = 0; // Notification of a uniform variable virtual void notifyBinding(EShLanguage stage, TVarEntryInfo& ent) = 0; // Notification of a in or out variable virtual void notifyInOut(EShLanguage stage, TVarEntryInfo& ent) = 0; // Called by mapIO when it starts its notify pass for the given stage virtual void beginNotifications(EShLanguage stage) = 0; // Called by mapIO when it has finished the notify pass virtual void endNotifications(EShLanguage stage) = 0; // Called by mipIO when it starts its resolve pass for the given stage virtual void beginResolve(EShLanguage stage) = 0; // Called by mapIO when it has finished the resolve pass virtual void endResolve(EShLanguage stage) = 0; // Called by mapIO when it starts its symbol collect for teh given stage virtual void beginCollect(EShLanguage stage) = 0; // Called by mapIO when it has finished the symbol collect virtual void endCollect(EShLanguage stage) = 0; // Called by TSlotCollector to resolve storage locations or bindings virtual void reserverStorageSlot(TVarEntryInfo& ent, TInfoSink& infoSink) = 0; // Called by TSlotCollector to resolve resource locations or bindings virtual void reserverResourceSlot(TVarEntryInfo& ent, TInfoSink& infoSink) = 0; // Called by mapIO.addStage to set shader stage mask to mark a stage be added to this pipeline virtual void addStage(EShLanguage stage, TIntermediate& stageIntermediate) = 0; }; // I/O mapper class TIoMapper { public: TIoMapper() {} virtual ~TIoMapper() {} // grow the reflection stage by stage bool virtual addStage(EShLanguage, TIntermediate&, TInfoSink&, TIoMapResolver*); bool virtual doMap(TIoMapResolver*, TInfoSink&) { return true; } bool virtual setAutoPushConstantBlock(const char*, unsigned int, TLayoutPacking) { return false; } }; // Get the default GLSL IO mapper GLSLANG_EXPORT TIoMapper* GetGlslIoMapper(); // Make one TProgram per set of shaders that will get linked together. Add all // the shaders that are to be linked together. After calling shader.parse() // for all shaders, call link(). // // N.B.: Destruct a linked program *before* destructing the shaders linked into it. // class TProgram { public: GLSLANG_EXPORT TProgram(); GLSLANG_EXPORT virtual ~TProgram(); void addShader(TShader* shader) { stages[shader->stage].push_back(shader); } std::list& getShaders(EShLanguage stage) { return stages[stage]; } // Link Validation interface GLSLANG_EXPORT bool link(EShMessages); GLSLANG_EXPORT const char* getInfoLog(); GLSLANG_EXPORT const char* getInfoDebugLog(); TIntermediate* getIntermediate(EShLanguage stage) const { return intermediate[stage]; } // Reflection Interface // call first, to do liveness analysis, index mapping, etc.; returns false on failure GLSLANG_EXPORT bool buildReflection(int opts = EShReflectionDefault); GLSLANG_EXPORT unsigned getLocalSize(int dim) const; // return dim'th local size GLSLANG_EXPORT unsigned getTileShadingRateQCOM(int dim) const; // return dim'th tile shading rate QCOM GLSLANG_EXPORT int getReflectionIndex(const char *name) const; GLSLANG_EXPORT int getReflectionPipeIOIndex(const char* name, const bool inOrOut) const; GLSLANG_EXPORT int getNumUniformVariables() const; GLSLANG_EXPORT const TObjectReflection& getUniform(int index) const; GLSLANG_EXPORT int getNumUniformBlocks() const; GLSLANG_EXPORT const TObjectReflection& getUniformBlock(int index) const; GLSLANG_EXPORT int getNumPipeInputs() const; GLSLANG_EXPORT const TObjectReflection& getPipeInput(int index) const; GLSLANG_EXPORT int getNumPipeOutputs() const; GLSLANG_EXPORT const TObjectReflection& getPipeOutput(int index) const; GLSLANG_EXPORT int getNumBufferVariables() const; GLSLANG_EXPORT const TObjectReflection& getBufferVariable(int index) const; GLSLANG_EXPORT int getNumBufferBlocks() const; GLSLANG_EXPORT const TObjectReflection& getBufferBlock(int index) const; GLSLANG_EXPORT int getNumAtomicCounters() const; GLSLANG_EXPORT const TObjectReflection& getAtomicCounter(int index) const; // Legacy Reflection Interface - expressed in terms of above interface // can be used for glGetProgramiv(GL_ACTIVE_UNIFORMS) int getNumLiveUniformVariables() const { return getNumUniformVariables(); } // can be used for glGetProgramiv(GL_ACTIVE_UNIFORM_BLOCKS) int getNumLiveUniformBlocks() const { return getNumUniformBlocks(); } // can be used for glGetProgramiv(GL_ACTIVE_ATTRIBUTES) int getNumLiveAttributes() const { return getNumPipeInputs(); } // can be used for glGetUniformIndices() int getUniformIndex(const char *name) const { return getReflectionIndex(name); } int getPipeIOIndex(const char *name, const bool inOrOut) const { return getReflectionPipeIOIndex(name, inOrOut); } // can be used for "name" part of glGetActiveUniform() const char *getUniformName(int index) const { return getUniform(index).name.c_str(); } // returns the binding number int getUniformBinding(int index) const { return getUniform(index).getBinding(); } // returns Shaders Stages where a Uniform is present EShLanguageMask getUniformStages(int index) const { return getUniform(index).stages; } // can be used for glGetActiveUniformsiv(GL_UNIFORM_BLOCK_INDEX) int getUniformBlockIndex(int index) const { return getUniform(index).index; } // can be used for glGetActiveUniformsiv(GL_UNIFORM_TYPE) int getUniformType(int index) const { return getUniform(index).glDefineType; } // can be used for glGetActiveUniformsiv(GL_UNIFORM_OFFSET) int getUniformBufferOffset(int index) const { return getUniform(index).offset; } // can be used for glGetActiveUniformsiv(GL_UNIFORM_SIZE) int getUniformArraySize(int index) const { return getUniform(index).size; } // returns a TType* const TType *getUniformTType(int index) const { return getUniform(index).getType(); } // can be used for glGetActiveUniformBlockName() const char *getUniformBlockName(int index) const { return getUniformBlock(index).name.c_str(); } // can be used for glGetActiveUniformBlockiv(UNIFORM_BLOCK_DATA_SIZE) int getUniformBlockSize(int index) const { return getUniformBlock(index).size; } // returns the block binding number int getUniformBlockBinding(int index) const { return getUniformBlock(index).getBinding(); } // returns block index of associated counter. int getUniformBlockCounterIndex(int index) const { return getUniformBlock(index).counterIndex; } // returns a TType* const TType *getUniformBlockTType(int index) const { return getUniformBlock(index).getType(); } // can be used for glGetActiveAttrib() const char *getAttributeName(int index) const { return getPipeInput(index).name.c_str(); } // can be used for glGetActiveAttrib() int getAttributeType(int index) const { return getPipeInput(index).glDefineType; } // returns a TType* const TType *getAttributeTType(int index) const { return getPipeInput(index).getType(); } GLSLANG_EXPORT void dumpReflection(); // Get the IO resolver to use for mapIO GLSLANG_EXPORT TIoMapResolver* getGlslIoResolver(EShLanguage stage); // I/O mapping: apply base offsets and map live unbound variables // If resolver is not provided it uses the previous approach // and respects auto assignment and offsets. GLSLANG_EXPORT bool mapIO(TIoMapResolver* pResolver = nullptr, TIoMapper* pIoMapper = nullptr); protected: GLSLANG_EXPORT bool linkStage(EShLanguage, EShMessages); GLSLANG_EXPORT bool crossStageCheck(EShMessages); TPoolAllocator* pool; std::list stages[EShLangCount]; TIntermediate* intermediate[EShLangCount]; bool newedIntermediate[EShLangCount]; // track which intermediate were "new" versus reusing a singleton unit in a stage TInfoSink* infoSink; TReflection* reflection; bool linked; private: TProgram(TProgram&); TProgram& operator=(TProgram&); }; } // end namespace glslang #endif // _COMPILER_INTERFACE_INCLUDED_ ================================================ FILE: src/libraries/glslang/glslang/ResourceLimits/ResourceLimits.cpp ================================================ // // Copyright (C) 2016 Google, Inc. // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following // disclaimer in the documentation and/or other materials provided // with the distribution. // // Neither the name of Google Inc. nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. #include #include #include #include #include "../../glslang/Public/ResourceLimits.h" TBuiltInResource Resources; const TBuiltInResource DefaultTBuiltInResource = { /* .MaxLights = */ 32, /* .MaxClipPlanes = */ 6, /* .MaxTextureUnits = */ 32, /* .MaxTextureCoords = */ 32, /* .MaxVertexAttribs = */ 64, /* .MaxVertexUniformComponents = */ 4096, /* .MaxVaryingFloats = */ 64, /* .MaxVertexTextureImageUnits = */ 32, /* .MaxCombinedTextureImageUnits = */ 80, /* .MaxTextureImageUnits = */ 32, /* .MaxFragmentUniformComponents = */ 4096, /* .MaxDrawBuffers = */ 32, /* .MaxVertexUniformVectors = */ 128, /* .MaxVaryingVectors = */ 8, /* .MaxFragmentUniformVectors = */ 16, /* .MaxVertexOutputVectors = */ 16, /* .MaxFragmentInputVectors = */ 15, /* .MinProgramTexelOffset = */ -8, /* .MaxProgramTexelOffset = */ 7, /* .MaxClipDistances = */ 8, /* .MaxComputeWorkGroupCountX = */ 65535, /* .MaxComputeWorkGroupCountY = */ 65535, /* .MaxComputeWorkGroupCountZ = */ 65535, /* .MaxComputeWorkGroupSizeX = */ 1024, /* .MaxComputeWorkGroupSizeY = */ 1024, /* .MaxComputeWorkGroupSizeZ = */ 64, /* .MaxComputeUniformComponents = */ 1024, /* .MaxComputeTextureImageUnits = */ 16, /* .MaxComputeImageUniforms = */ 8, /* .MaxComputeAtomicCounters = */ 8, /* .MaxComputeAtomicCounterBuffers = */ 1, /* .MaxVaryingComponents = */ 60, /* .MaxVertexOutputComponents = */ 64, /* .MaxGeometryInputComponents = */ 64, /* .MaxGeometryOutputComponents = */ 128, /* .MaxFragmentInputComponents = */ 128, /* .MaxImageUnits = */ 8, /* .MaxCombinedImageUnitsAndFragmentOutputs = */ 8, /* .MaxCombinedShaderOutputResources = */ 8, /* .MaxImageSamples = */ 0, /* .MaxVertexImageUniforms = */ 0, /* .MaxTessControlImageUniforms = */ 0, /* .MaxTessEvaluationImageUniforms = */ 0, /* .MaxGeometryImageUniforms = */ 0, /* .MaxFragmentImageUniforms = */ 8, /* .MaxCombinedImageUniforms = */ 8, /* .MaxGeometryTextureImageUnits = */ 16, /* .MaxGeometryOutputVertices = */ 256, /* .MaxGeometryTotalOutputComponents = */ 1024, /* .MaxGeometryUniformComponents = */ 1024, /* .MaxGeometryVaryingComponents = */ 64, /* .MaxTessControlInputComponents = */ 128, /* .MaxTessControlOutputComponents = */ 128, /* .MaxTessControlTextureImageUnits = */ 16, /* .MaxTessControlUniformComponents = */ 1024, /* .MaxTessControlTotalOutputComponents = */ 4096, /* .MaxTessEvaluationInputComponents = */ 128, /* .MaxTessEvaluationOutputComponents = */ 128, /* .MaxTessEvaluationTextureImageUnits = */ 16, /* .MaxTessEvaluationUniformComponents = */ 1024, /* .MaxTessPatchComponents = */ 120, /* .MaxPatchVertices = */ 32, /* .MaxTessGenLevel = */ 64, /* .MaxViewports = */ 16, /* .MaxVertexAtomicCounters = */ 0, /* .MaxTessControlAtomicCounters = */ 0, /* .MaxTessEvaluationAtomicCounters = */ 0, /* .MaxGeometryAtomicCounters = */ 0, /* .MaxFragmentAtomicCounters = */ 8, /* .MaxCombinedAtomicCounters = */ 8, /* .MaxAtomicCounterBindings = */ 1, /* .MaxVertexAtomicCounterBuffers = */ 0, /* .MaxTessControlAtomicCounterBuffers = */ 0, /* .MaxTessEvaluationAtomicCounterBuffers = */ 0, /* .MaxGeometryAtomicCounterBuffers = */ 0, /* .MaxFragmentAtomicCounterBuffers = */ 1, /* .MaxCombinedAtomicCounterBuffers = */ 1, /* .MaxAtomicCounterBufferSize = */ 16384, /* .MaxTransformFeedbackBuffers = */ 4, /* .MaxTransformFeedbackInterleavedComponents = */ 64, /* .MaxCullDistances = */ 8, /* .MaxCombinedClipAndCullDistances = */ 8, /* .MaxSamples = */ 4, /* .maxMeshOutputVerticesNV = */ 256, /* .maxMeshOutputPrimitivesNV = */ 512, /* .maxMeshWorkGroupSizeX_NV = */ 32, /* .maxMeshWorkGroupSizeY_NV = */ 1, /* .maxMeshWorkGroupSizeZ_NV = */ 1, /* .maxTaskWorkGroupSizeX_NV = */ 32, /* .maxTaskWorkGroupSizeY_NV = */ 1, /* .maxTaskWorkGroupSizeZ_NV = */ 1, /* .maxMeshViewCountNV = */ 4, /* .maxMeshOutputVerticesEXT = */ 256, /* .maxMeshOutputPrimitivesEXT = */ 256, /* .maxMeshWorkGroupSizeX_EXT = */ 128, /* .maxMeshWorkGroupSizeY_EXT = */ 128, /* .maxMeshWorkGroupSizeZ_EXT = */ 128, /* .maxTaskWorkGroupSizeX_EXT = */ 128, /* .maxTaskWorkGroupSizeY_EXT = */ 128, /* .maxTaskWorkGroupSizeZ_EXT = */ 128, /* .maxMeshViewCountEXT = */ 4, /* .maxDualSourceDrawBuffersEXT = */ 1, /* .limits = */ { /* .nonInductiveForLoops = */ 1, /* .whileLoops = */ 1, /* .doWhileLoops = */ 1, /* .generalUniformIndexing = */ 1, /* .generalAttributeMatrixVectorIndexing = */ 1, /* .generalVaryingIndexing = */ 1, /* .generalSamplerIndexing = */ 1, /* .generalVariableIndexing = */ 1, /* .generalConstantMatrixVectorIndexing = */ 1, }}; std::string GetDefaultTBuiltInResourceString() { std::ostringstream ostream; ostream << "MaxLights " << DefaultTBuiltInResource.maxLights << "\n" << "MaxClipPlanes " << DefaultTBuiltInResource.maxClipPlanes << "\n" << "MaxTextureUnits " << DefaultTBuiltInResource.maxTextureUnits << "\n" << "MaxTextureCoords " << DefaultTBuiltInResource.maxTextureCoords << "\n" << "MaxVertexAttribs " << DefaultTBuiltInResource.maxVertexAttribs << "\n" << "MaxVertexUniformComponents " << DefaultTBuiltInResource.maxVertexUniformComponents << "\n" << "MaxVaryingFloats " << DefaultTBuiltInResource.maxVaryingFloats << "\n" << "MaxVertexTextureImageUnits " << DefaultTBuiltInResource.maxVertexTextureImageUnits << "\n" << "MaxCombinedTextureImageUnits " << DefaultTBuiltInResource.maxCombinedTextureImageUnits << "\n" << "MaxTextureImageUnits " << DefaultTBuiltInResource.maxTextureImageUnits << "\n" << "MaxFragmentUniformComponents " << DefaultTBuiltInResource.maxFragmentUniformComponents << "\n" << "MaxDrawBuffers " << DefaultTBuiltInResource.maxDrawBuffers << "\n" << "MaxVertexUniformVectors " << DefaultTBuiltInResource.maxVertexUniformVectors << "\n" << "MaxVaryingVectors " << DefaultTBuiltInResource.maxVaryingVectors << "\n" << "MaxFragmentUniformVectors " << DefaultTBuiltInResource.maxFragmentUniformVectors << "\n" << "MaxVertexOutputVectors " << DefaultTBuiltInResource.maxVertexOutputVectors << "\n" << "MaxFragmentInputVectors " << DefaultTBuiltInResource.maxFragmentInputVectors << "\n" << "MinProgramTexelOffset " << DefaultTBuiltInResource.minProgramTexelOffset << "\n" << "MaxProgramTexelOffset " << DefaultTBuiltInResource.maxProgramTexelOffset << "\n" << "MaxClipDistances " << DefaultTBuiltInResource.maxClipDistances << "\n" << "MaxComputeWorkGroupCountX " << DefaultTBuiltInResource.maxComputeWorkGroupCountX << "\n" << "MaxComputeWorkGroupCountY " << DefaultTBuiltInResource.maxComputeWorkGroupCountY << "\n" << "MaxComputeWorkGroupCountZ " << DefaultTBuiltInResource.maxComputeWorkGroupCountZ << "\n" << "MaxComputeWorkGroupSizeX " << DefaultTBuiltInResource.maxComputeWorkGroupSizeX << "\n" << "MaxComputeWorkGroupSizeY " << DefaultTBuiltInResource.maxComputeWorkGroupSizeY << "\n" << "MaxComputeWorkGroupSizeZ " << DefaultTBuiltInResource.maxComputeWorkGroupSizeZ << "\n" << "MaxComputeUniformComponents " << DefaultTBuiltInResource.maxComputeUniformComponents << "\n" << "MaxComputeTextureImageUnits " << DefaultTBuiltInResource.maxComputeTextureImageUnits << "\n" << "MaxComputeImageUniforms " << DefaultTBuiltInResource.maxComputeImageUniforms << "\n" << "MaxComputeAtomicCounters " << DefaultTBuiltInResource.maxComputeAtomicCounters << "\n" << "MaxComputeAtomicCounterBuffers " << DefaultTBuiltInResource.maxComputeAtomicCounterBuffers << "\n" << "MaxVaryingComponents " << DefaultTBuiltInResource.maxVaryingComponents << "\n" << "MaxVertexOutputComponents " << DefaultTBuiltInResource.maxVertexOutputComponents << "\n" << "MaxGeometryInputComponents " << DefaultTBuiltInResource.maxGeometryInputComponents << "\n" << "MaxGeometryOutputComponents " << DefaultTBuiltInResource.maxGeometryOutputComponents << "\n" << "MaxFragmentInputComponents " << DefaultTBuiltInResource.maxFragmentInputComponents << "\n" << "MaxImageUnits " << DefaultTBuiltInResource.maxImageUnits << "\n" << "MaxCombinedImageUnitsAndFragmentOutputs " << DefaultTBuiltInResource.maxCombinedImageUnitsAndFragmentOutputs << "\n" << "MaxCombinedShaderOutputResources " << DefaultTBuiltInResource.maxCombinedShaderOutputResources << "\n" << "MaxImageSamples " << DefaultTBuiltInResource.maxImageSamples << "\n" << "MaxVertexImageUniforms " << DefaultTBuiltInResource.maxVertexImageUniforms << "\n" << "MaxTessControlImageUniforms " << DefaultTBuiltInResource.maxTessControlImageUniforms << "\n" << "MaxTessEvaluationImageUniforms " << DefaultTBuiltInResource.maxTessEvaluationImageUniforms << "\n" << "MaxGeometryImageUniforms " << DefaultTBuiltInResource.maxGeometryImageUniforms << "\n" << "MaxFragmentImageUniforms " << DefaultTBuiltInResource.maxFragmentImageUniforms << "\n" << "MaxCombinedImageUniforms " << DefaultTBuiltInResource.maxCombinedImageUniforms << "\n" << "MaxGeometryTextureImageUnits " << DefaultTBuiltInResource.maxGeometryTextureImageUnits << "\n" << "MaxGeometryOutputVertices " << DefaultTBuiltInResource.maxGeometryOutputVertices << "\n" << "MaxGeometryTotalOutputComponents " << DefaultTBuiltInResource.maxGeometryTotalOutputComponents << "\n" << "MaxGeometryUniformComponents " << DefaultTBuiltInResource.maxGeometryUniformComponents << "\n" << "MaxGeometryVaryingComponents " << DefaultTBuiltInResource.maxGeometryVaryingComponents << "\n" << "MaxTessControlInputComponents " << DefaultTBuiltInResource.maxTessControlInputComponents << "\n" << "MaxTessControlOutputComponents " << DefaultTBuiltInResource.maxTessControlOutputComponents << "\n" << "MaxTessControlTextureImageUnits " << DefaultTBuiltInResource.maxTessControlTextureImageUnits << "\n" << "MaxTessControlUniformComponents " << DefaultTBuiltInResource.maxTessControlUniformComponents << "\n" << "MaxTessControlTotalOutputComponents " << DefaultTBuiltInResource.maxTessControlTotalOutputComponents << "\n" << "MaxTessEvaluationInputComponents " << DefaultTBuiltInResource.maxTessEvaluationInputComponents << "\n" << "MaxTessEvaluationOutputComponents " << DefaultTBuiltInResource.maxTessEvaluationOutputComponents << "\n" << "MaxTessEvaluationTextureImageUnits " << DefaultTBuiltInResource.maxTessEvaluationTextureImageUnits << "\n" << "MaxTessEvaluationUniformComponents " << DefaultTBuiltInResource.maxTessEvaluationUniformComponents << "\n" << "MaxTessPatchComponents " << DefaultTBuiltInResource.maxTessPatchComponents << "\n" << "MaxPatchVertices " << DefaultTBuiltInResource.maxPatchVertices << "\n" << "MaxTessGenLevel " << DefaultTBuiltInResource.maxTessGenLevel << "\n" << "MaxViewports " << DefaultTBuiltInResource.maxViewports << "\n" << "MaxVertexAtomicCounters " << DefaultTBuiltInResource.maxVertexAtomicCounters << "\n" << "MaxTessControlAtomicCounters " << DefaultTBuiltInResource.maxTessControlAtomicCounters << "\n" << "MaxTessEvaluationAtomicCounters " << DefaultTBuiltInResource.maxTessEvaluationAtomicCounters << "\n" << "MaxGeometryAtomicCounters " << DefaultTBuiltInResource.maxGeometryAtomicCounters << "\n" << "MaxFragmentAtomicCounters " << DefaultTBuiltInResource.maxFragmentAtomicCounters << "\n" << "MaxCombinedAtomicCounters " << DefaultTBuiltInResource.maxCombinedAtomicCounters << "\n" << "MaxAtomicCounterBindings " << DefaultTBuiltInResource.maxAtomicCounterBindings << "\n" << "MaxVertexAtomicCounterBuffers " << DefaultTBuiltInResource.maxVertexAtomicCounterBuffers << "\n" << "MaxTessControlAtomicCounterBuffers " << DefaultTBuiltInResource.maxTessControlAtomicCounterBuffers << "\n" << "MaxTessEvaluationAtomicCounterBuffers " << DefaultTBuiltInResource.maxTessEvaluationAtomicCounterBuffers << "\n" << "MaxGeometryAtomicCounterBuffers " << DefaultTBuiltInResource.maxGeometryAtomicCounterBuffers << "\n" << "MaxFragmentAtomicCounterBuffers " << DefaultTBuiltInResource.maxFragmentAtomicCounterBuffers << "\n" << "MaxCombinedAtomicCounterBuffers " << DefaultTBuiltInResource.maxCombinedAtomicCounterBuffers << "\n" << "MaxAtomicCounterBufferSize " << DefaultTBuiltInResource.maxAtomicCounterBufferSize << "\n" << "MaxTransformFeedbackBuffers " << DefaultTBuiltInResource.maxTransformFeedbackBuffers << "\n" << "MaxTransformFeedbackInterleavedComponents " << DefaultTBuiltInResource.maxTransformFeedbackInterleavedComponents << "\n" << "MaxCullDistances " << DefaultTBuiltInResource.maxCullDistances << "\n" << "MaxCombinedClipAndCullDistances " << DefaultTBuiltInResource.maxCombinedClipAndCullDistances << "\n" << "MaxSamples " << DefaultTBuiltInResource.maxSamples << "\n" << "MaxMeshOutputVerticesNV " << DefaultTBuiltInResource.maxMeshOutputVerticesNV << "\n" << "MaxMeshOutputPrimitivesNV " << DefaultTBuiltInResource.maxMeshOutputPrimitivesNV << "\n" << "MaxMeshWorkGroupSizeX_NV " << DefaultTBuiltInResource.maxMeshWorkGroupSizeX_NV << "\n" << "MaxMeshWorkGroupSizeY_NV " << DefaultTBuiltInResource.maxMeshWorkGroupSizeY_NV << "\n" << "MaxMeshWorkGroupSizeZ_NV " << DefaultTBuiltInResource.maxMeshWorkGroupSizeZ_NV << "\n" << "MaxTaskWorkGroupSizeX_NV " << DefaultTBuiltInResource.maxTaskWorkGroupSizeX_NV << "\n" << "MaxTaskWorkGroupSizeY_NV " << DefaultTBuiltInResource.maxTaskWorkGroupSizeY_NV << "\n" << "MaxTaskWorkGroupSizeZ_NV " << DefaultTBuiltInResource.maxTaskWorkGroupSizeZ_NV << "\n" << "MaxMeshViewCountNV " << DefaultTBuiltInResource.maxMeshViewCountNV << "\n" << "MaxMeshOutputVerticesEXT " << DefaultTBuiltInResource.maxMeshOutputVerticesEXT << "\n" << "MaxMeshOutputPrimitivesEXT " << DefaultTBuiltInResource.maxMeshOutputPrimitivesEXT << "\n" << "MaxMeshWorkGroupSizeX_EXT " << DefaultTBuiltInResource.maxMeshWorkGroupSizeX_EXT << "\n" << "MaxMeshWorkGroupSizeY_EXT " << DefaultTBuiltInResource.maxMeshWorkGroupSizeY_EXT << "\n" << "MaxMeshWorkGroupSizeZ_EXT " << DefaultTBuiltInResource.maxMeshWorkGroupSizeZ_EXT << "\n" << "MaxTaskWorkGroupSizeX_EXT " << DefaultTBuiltInResource.maxTaskWorkGroupSizeX_EXT << "\n" << "MaxTaskWorkGroupSizeY_EXT " << DefaultTBuiltInResource.maxTaskWorkGroupSizeY_EXT << "\n" << "MaxTaskWorkGroupSizeZ_EXT " << DefaultTBuiltInResource.maxTaskWorkGroupSizeZ_EXT << "\n" << "MaxMeshViewCountEXT " << DefaultTBuiltInResource.maxMeshViewCountEXT << "\n" << "MaxDualSourceDrawBuffersEXT " << DefaultTBuiltInResource.maxDualSourceDrawBuffersEXT << "\n" << "nonInductiveForLoops " << DefaultTBuiltInResource.limits.nonInductiveForLoops << "\n" << "whileLoops " << DefaultTBuiltInResource.limits.whileLoops << "\n" << "doWhileLoops " << DefaultTBuiltInResource.limits.doWhileLoops << "\n" << "generalUniformIndexing " << DefaultTBuiltInResource.limits.generalUniformIndexing << "\n" << "generalAttributeMatrixVectorIndexing " << DefaultTBuiltInResource.limits.generalAttributeMatrixVectorIndexing << "\n" << "generalVaryingIndexing " << DefaultTBuiltInResource.limits.generalVaryingIndexing << "\n" << "generalSamplerIndexing " << DefaultTBuiltInResource.limits.generalSamplerIndexing << "\n" << "generalVariableIndexing " << DefaultTBuiltInResource.limits.generalVariableIndexing << "\n" << "generalConstantMatrixVectorIndexing " << DefaultTBuiltInResource.limits.generalConstantMatrixVectorIndexing << "\n" ; return ostream.str(); } void DecodeResourceLimits(TBuiltInResource* resources, char* config) { static const char* delims = " \t\n\r"; size_t pos = 0; std::string configStr(config); while ((pos = configStr.find_first_not_of(delims, pos)) != std::string::npos) { const size_t token_s = pos; const size_t token_e = configStr.find_first_of(delims, token_s); const size_t value_s = configStr.find_first_not_of(delims, token_e); const size_t value_e = configStr.find_first_of(delims, value_s); pos = value_e; // Faster to use compare(), but prefering readability. const std::string tokenStr = configStr.substr(token_s, token_e-token_s); const std::string valueStr = configStr.substr(value_s, value_e-value_s); if (value_s == std::string::npos || ! (valueStr[0] == '-' || isdigit(valueStr[0]))) { printf("Error: '%s' bad .conf file. Each name must be followed by one number.\n", valueStr.c_str()); return; } const int value = std::atoi(valueStr.c_str()); if (tokenStr == "MaxLights") resources->maxLights = value; else if (tokenStr == "MaxClipPlanes") resources->maxClipPlanes = value; else if (tokenStr == "MaxTextureUnits") resources->maxTextureUnits = value; else if (tokenStr == "MaxTextureCoords") resources->maxTextureCoords = value; else if (tokenStr == "MaxVertexAttribs") resources->maxVertexAttribs = value; else if (tokenStr == "MaxVertexUniformComponents") resources->maxVertexUniformComponents = value; else if (tokenStr == "MaxVaryingFloats") resources->maxVaryingFloats = value; else if (tokenStr == "MaxVertexTextureImageUnits") resources->maxVertexTextureImageUnits = value; else if (tokenStr == "MaxCombinedTextureImageUnits") resources->maxCombinedTextureImageUnits = value; else if (tokenStr == "MaxTextureImageUnits") resources->maxTextureImageUnits = value; else if (tokenStr == "MaxFragmentUniformComponents") resources->maxFragmentUniformComponents = value; else if (tokenStr == "MaxDrawBuffers") resources->maxDrawBuffers = value; else if (tokenStr == "MaxVertexUniformVectors") resources->maxVertexUniformVectors = value; else if (tokenStr == "MaxVaryingVectors") resources->maxVaryingVectors = value; else if (tokenStr == "MaxFragmentUniformVectors") resources->maxFragmentUniformVectors = value; else if (tokenStr == "MaxVertexOutputVectors") resources->maxVertexOutputVectors = value; else if (tokenStr == "MaxFragmentInputVectors") resources->maxFragmentInputVectors = value; else if (tokenStr == "MinProgramTexelOffset") resources->minProgramTexelOffset = value; else if (tokenStr == "MaxProgramTexelOffset") resources->maxProgramTexelOffset = value; else if (tokenStr == "MaxClipDistances") resources->maxClipDistances = value; else if (tokenStr == "MaxComputeWorkGroupCountX") resources->maxComputeWorkGroupCountX = value; else if (tokenStr == "MaxComputeWorkGroupCountY") resources->maxComputeWorkGroupCountY = value; else if (tokenStr == "MaxComputeWorkGroupCountZ") resources->maxComputeWorkGroupCountZ = value; else if (tokenStr == "MaxComputeWorkGroupSizeX") resources->maxComputeWorkGroupSizeX = value; else if (tokenStr == "MaxComputeWorkGroupSizeY") resources->maxComputeWorkGroupSizeY = value; else if (tokenStr == "MaxComputeWorkGroupSizeZ") resources->maxComputeWorkGroupSizeZ = value; else if (tokenStr == "MaxComputeUniformComponents") resources->maxComputeUniformComponents = value; else if (tokenStr == "MaxComputeTextureImageUnits") resources->maxComputeTextureImageUnits = value; else if (tokenStr == "MaxComputeImageUniforms") resources->maxComputeImageUniforms = value; else if (tokenStr == "MaxComputeAtomicCounters") resources->maxComputeAtomicCounters = value; else if (tokenStr == "MaxComputeAtomicCounterBuffers") resources->maxComputeAtomicCounterBuffers = value; else if (tokenStr == "MaxVaryingComponents") resources->maxVaryingComponents = value; else if (tokenStr == "MaxVertexOutputComponents") resources->maxVertexOutputComponents = value; else if (tokenStr == "MaxGeometryInputComponents") resources->maxGeometryInputComponents = value; else if (tokenStr == "MaxGeometryOutputComponents") resources->maxGeometryOutputComponents = value; else if (tokenStr == "MaxFragmentInputComponents") resources->maxFragmentInputComponents = value; else if (tokenStr == "MaxImageUnits") resources->maxImageUnits = value; else if (tokenStr == "MaxCombinedImageUnitsAndFragmentOutputs") resources->maxCombinedImageUnitsAndFragmentOutputs = value; else if (tokenStr == "MaxCombinedShaderOutputResources") resources->maxCombinedShaderOutputResources = value; else if (tokenStr == "MaxImageSamples") resources->maxImageSamples = value; else if (tokenStr == "MaxVertexImageUniforms") resources->maxVertexImageUniforms = value; else if (tokenStr == "MaxTessControlImageUniforms") resources->maxTessControlImageUniforms = value; else if (tokenStr == "MaxTessEvaluationImageUniforms") resources->maxTessEvaluationImageUniforms = value; else if (tokenStr == "MaxGeometryImageUniforms") resources->maxGeometryImageUniforms = value; else if (tokenStr == "MaxFragmentImageUniforms") resources->maxFragmentImageUniforms = value; else if (tokenStr == "MaxCombinedImageUniforms") resources->maxCombinedImageUniforms = value; else if (tokenStr == "MaxGeometryTextureImageUnits") resources->maxGeometryTextureImageUnits = value; else if (tokenStr == "MaxGeometryOutputVertices") resources->maxGeometryOutputVertices = value; else if (tokenStr == "MaxGeometryTotalOutputComponents") resources->maxGeometryTotalOutputComponents = value; else if (tokenStr == "MaxGeometryUniformComponents") resources->maxGeometryUniformComponents = value; else if (tokenStr == "MaxGeometryVaryingComponents") resources->maxGeometryVaryingComponents = value; else if (tokenStr == "MaxTessControlInputComponents") resources->maxTessControlInputComponents = value; else if (tokenStr == "MaxTessControlOutputComponents") resources->maxTessControlOutputComponents = value; else if (tokenStr == "MaxTessControlTextureImageUnits") resources->maxTessControlTextureImageUnits = value; else if (tokenStr == "MaxTessControlUniformComponents") resources->maxTessControlUniformComponents = value; else if (tokenStr == "MaxTessControlTotalOutputComponents") resources->maxTessControlTotalOutputComponents = value; else if (tokenStr == "MaxTessEvaluationInputComponents") resources->maxTessEvaluationInputComponents = value; else if (tokenStr == "MaxTessEvaluationOutputComponents") resources->maxTessEvaluationOutputComponents = value; else if (tokenStr == "MaxTessEvaluationTextureImageUnits") resources->maxTessEvaluationTextureImageUnits = value; else if (tokenStr == "MaxTessEvaluationUniformComponents") resources->maxTessEvaluationUniformComponents = value; else if (tokenStr == "MaxTessPatchComponents") resources->maxTessPatchComponents = value; else if (tokenStr == "MaxPatchVertices") resources->maxPatchVertices = value; else if (tokenStr == "MaxTessGenLevel") resources->maxTessGenLevel = value; else if (tokenStr == "MaxViewports") resources->maxViewports = value; else if (tokenStr == "MaxVertexAtomicCounters") resources->maxVertexAtomicCounters = value; else if (tokenStr == "MaxTessControlAtomicCounters") resources->maxTessControlAtomicCounters = value; else if (tokenStr == "MaxTessEvaluationAtomicCounters") resources->maxTessEvaluationAtomicCounters = value; else if (tokenStr == "MaxGeometryAtomicCounters") resources->maxGeometryAtomicCounters = value; else if (tokenStr == "MaxFragmentAtomicCounters") resources->maxFragmentAtomicCounters = value; else if (tokenStr == "MaxCombinedAtomicCounters") resources->maxCombinedAtomicCounters = value; else if (tokenStr == "MaxAtomicCounterBindings") resources->maxAtomicCounterBindings = value; else if (tokenStr == "MaxVertexAtomicCounterBuffers") resources->maxVertexAtomicCounterBuffers = value; else if (tokenStr == "MaxTessControlAtomicCounterBuffers") resources->maxTessControlAtomicCounterBuffers = value; else if (tokenStr == "MaxTessEvaluationAtomicCounterBuffers") resources->maxTessEvaluationAtomicCounterBuffers = value; else if (tokenStr == "MaxGeometryAtomicCounterBuffers") resources->maxGeometryAtomicCounterBuffers = value; else if (tokenStr == "MaxFragmentAtomicCounterBuffers") resources->maxFragmentAtomicCounterBuffers = value; else if (tokenStr == "MaxCombinedAtomicCounterBuffers") resources->maxCombinedAtomicCounterBuffers = value; else if (tokenStr == "MaxAtomicCounterBufferSize") resources->maxAtomicCounterBufferSize = value; else if (tokenStr == "MaxTransformFeedbackBuffers") resources->maxTransformFeedbackBuffers = value; else if (tokenStr == "MaxTransformFeedbackInterleavedComponents") resources->maxTransformFeedbackInterleavedComponents = value; else if (tokenStr == "MaxCullDistances") resources->maxCullDistances = value; else if (tokenStr == "MaxCombinedClipAndCullDistances") resources->maxCombinedClipAndCullDistances = value; else if (tokenStr == "MaxSamples") resources->maxSamples = value; else if (tokenStr == "MaxMeshOutputVerticesNV") resources->maxMeshOutputVerticesNV = value; else if (tokenStr == "MaxMeshOutputPrimitivesNV") resources->maxMeshOutputPrimitivesNV = value; else if (tokenStr == "MaxMeshWorkGroupSizeX_NV") resources->maxMeshWorkGroupSizeX_NV = value; else if (tokenStr == "MaxMeshWorkGroupSizeY_NV") resources->maxMeshWorkGroupSizeY_NV = value; else if (tokenStr == "MaxMeshWorkGroupSizeZ_NV") resources->maxMeshWorkGroupSizeZ_NV = value; else if (tokenStr == "MaxTaskWorkGroupSizeX_NV") resources->maxTaskWorkGroupSizeX_NV = value; else if (tokenStr == "MaxTaskWorkGroupSizeY_NV") resources->maxTaskWorkGroupSizeY_NV = value; else if (tokenStr == "MaxTaskWorkGroupSizeZ_NV") resources->maxTaskWorkGroupSizeZ_NV = value; else if (tokenStr == "MaxMeshViewCountNV") resources->maxMeshViewCountNV = value; else if (tokenStr == "MaxMeshOutputVerticesEXT") resources->maxMeshOutputVerticesEXT = value; else if (tokenStr == "MaxMeshOutputPrimitivesEXT") resources->maxMeshOutputPrimitivesEXT = value; else if (tokenStr == "MaxMeshWorkGroupSizeX_EXT") resources->maxMeshWorkGroupSizeX_EXT = value; else if (tokenStr == "MaxMeshWorkGroupSizeY_EXT") resources->maxMeshWorkGroupSizeY_EXT = value; else if (tokenStr == "MaxMeshWorkGroupSizeZ_EXT") resources->maxMeshWorkGroupSizeZ_EXT = value; else if (tokenStr == "MaxTaskWorkGroupSizeX_EXT") resources->maxTaskWorkGroupSizeX_EXT = value; else if (tokenStr == "MaxTaskWorkGroupSizeY_EXT") resources->maxTaskWorkGroupSizeY_EXT = value; else if (tokenStr == "MaxTaskWorkGroupSizeZ_EXT") resources->maxTaskWorkGroupSizeZ_EXT = value; else if (tokenStr == "MaxMeshViewCountEXT") resources->maxMeshViewCountEXT = value; else if (tokenStr == "MaxDualSourceDrawBuffersEXT") resources->maxDualSourceDrawBuffersEXT = value; else if (tokenStr == "nonInductiveForLoops") resources->limits.nonInductiveForLoops = (value != 0); else if (tokenStr == "whileLoops") resources->limits.whileLoops = (value != 0); else if (tokenStr == "doWhileLoops") resources->limits.doWhileLoops = (value != 0); else if (tokenStr == "generalUniformIndexing") resources->limits.generalUniformIndexing = (value != 0); else if (tokenStr == "generalAttributeMatrixVectorIndexing") resources->limits.generalAttributeMatrixVectorIndexing = (value != 0); else if (tokenStr == "generalVaryingIndexing") resources->limits.generalVaryingIndexing = (value != 0); else if (tokenStr == "generalSamplerIndexing") resources->limits.generalSamplerIndexing = (value != 0); else if (tokenStr == "generalVariableIndexing") resources->limits.generalVariableIndexing = (value != 0); else if (tokenStr == "generalConstantMatrixVectorIndexing") resources->limits.generalConstantMatrixVectorIndexing = (value != 0); else printf("Warning: unrecognized limit (%s) in configuration file.\n", tokenStr.c_str()); } } TBuiltInResource* GetResources() { return &Resources; } const TBuiltInResource* GetDefaultResources() { return &DefaultTBuiltInResource; } ================================================ FILE: src/libraries/glslang/glslang/build_info.h ================================================ // Copyright (C) 2020 The Khronos Group Inc. // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following // disclaimer in the documentation and/or other materials provided // with the distribution. // // Neither the name of The Khronos Group Inc. nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. #ifndef GLSLANG_BUILD_INFO #define GLSLANG_BUILD_INFO #define GLSLANG_VERSION_MAJOR 15 #define GLSLANG_VERSION_MINOR 3 #define GLSLANG_VERSION_PATCH 0 #define GLSLANG_VERSION_FLAVOR "" #define GLSLANG_VERSION_GREATER_THAN(major, minor, patch) \ ((GLSLANG_VERSION_MAJOR) > (major) || ((major) == GLSLANG_VERSION_MAJOR && \ ((GLSLANG_VERSION_MINOR) > (minor) || ((minor) == GLSLANG_VERSION_MINOR && \ (GLSLANG_VERSION_PATCH) > (patch))))) #define GLSLANG_VERSION_GREATER_OR_EQUAL_TO(major, minor, patch) \ ((GLSLANG_VERSION_MAJOR) > (major) || ((major) == GLSLANG_VERSION_MAJOR && \ ((GLSLANG_VERSION_MINOR) > (minor) || ((minor) == GLSLANG_VERSION_MINOR && \ (GLSLANG_VERSION_PATCH >= (patch)))))) #define GLSLANG_VERSION_LESS_THAN(major, minor, patch) \ ((GLSLANG_VERSION_MAJOR) < (major) || ((major) == GLSLANG_VERSION_MAJOR && \ ((GLSLANG_VERSION_MINOR) < (minor) || ((minor) == GLSLANG_VERSION_MINOR && \ (GLSLANG_VERSION_PATCH) < (patch))))) #define GLSLANG_VERSION_LESS_OR_EQUAL_TO(major, minor, patch) \ ((GLSLANG_VERSION_MAJOR) < (major) || ((major) == GLSLANG_VERSION_MAJOR && \ ((GLSLANG_VERSION_MINOR) < (minor) || ((minor) == GLSLANG_VERSION_MINOR && \ (GLSLANG_VERSION_PATCH <= (patch)))))) #endif // GLSLANG_BUILD_INFO ================================================ FILE: src/libraries/lodepng/lodepng.cpp ================================================ /* LodePNG version 20210627 Copyright (c) 2005-2021 Lode Vandevenne This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ /* The manual and changelog are in the header file "lodepng.h" Rename this file to lodepng.cpp to use it for C++, or to lodepng.c to use it for C. */ #include "lodepng.h" #ifdef LODEPNG_COMPILE_DISK #include /* LONG_MAX */ #include /* file handling */ #endif /* LODEPNG_COMPILE_DISK */ #ifdef LODEPNG_COMPILE_ALLOCATORS #include /* allocations */ #endif /* LODEPNG_COMPILE_ALLOCATORS */ #if defined(_MSC_VER) && (_MSC_VER >= 1310) /*Visual Studio: A few warning types are not desired here.*/ #pragma warning( disable : 4244 ) /*implicit conversions: not warned by gcc -Wall -Wextra and requires too much casts*/ #pragma warning( disable : 4996 ) /*VS does not like fopen, but fopen_s is not standard C so unusable here*/ #endif /*_MSC_VER */ const char* LODEPNG_VERSION_STRING = "20210627"; /* This source file is built up in the following large parts. The code sections with the "LODEPNG_COMPILE_" #defines divide this up further in an intermixed way. -Tools for C and common code for PNG and Zlib -C Code for Zlib (huffman, deflate, ...) -C Code for PNG (file format chunks, adam7, PNG filters, color conversions, ...) -The C++ wrapper around all of the above */ /* ////////////////////////////////////////////////////////////////////////// */ /* ////////////////////////////////////////////////////////////////////////// */ /* // Tools for C, and common code for PNG and Zlib. // */ /* ////////////////////////////////////////////////////////////////////////// */ /* ////////////////////////////////////////////////////////////////////////// */ /*The malloc, realloc and free functions defined here with "lodepng_" in front of the name, so that you can easily change them to others related to your platform if needed. Everything else in the code calls these. Pass -DLODEPNG_NO_COMPILE_ALLOCATORS to the compiler, or comment out #define LODEPNG_COMPILE_ALLOCATORS in the header, to disable the ones here and define them in your own project's source files without needing to change lodepng source code. Don't forget to remove "static" if you copypaste them from here.*/ #ifdef LODEPNG_COMPILE_ALLOCATORS static void* lodepng_malloc(size_t size) { #ifdef LODEPNG_MAX_ALLOC if(size > LODEPNG_MAX_ALLOC) return 0; #endif return malloc(size); } /* NOTE: when realloc returns NULL, it leaves the original memory untouched */ static void* lodepng_realloc(void* ptr, size_t new_size) { #ifdef LODEPNG_MAX_ALLOC if(new_size > LODEPNG_MAX_ALLOC) return 0; #endif return realloc(ptr, new_size); } static void lodepng_free(void* ptr) { free(ptr); } #else /*LODEPNG_COMPILE_ALLOCATORS*/ /* TODO: support giving additional void* payload to the custom allocators */ void* lodepng_malloc(size_t size); void* lodepng_realloc(void* ptr, size_t new_size); void lodepng_free(void* ptr); #endif /*LODEPNG_COMPILE_ALLOCATORS*/ /* convince the compiler to inline a function, for use when this measurably improves performance */ /* inline is not available in C90, but use it when supported by the compiler */ #if (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) || (defined(__cplusplus) && (__cplusplus >= 199711L)) #define LODEPNG_INLINE inline #else #define LODEPNG_INLINE /* not available */ #endif /* restrict is not available in C90, but use it when supported by the compiler */ #if (defined(__GNUC__) && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1))) ||\ (defined(_MSC_VER) && (_MSC_VER >= 1400)) || \ (defined(__WATCOMC__) && (__WATCOMC__ >= 1250) && !defined(__cplusplus)) #define LODEPNG_RESTRICT __restrict #else #define LODEPNG_RESTRICT /* not available */ #endif /* Replacements for C library functions such as memcpy and strlen, to support platforms where a full C library is not available. The compiler can recognize them and compile to something as fast. */ static void lodepng_memcpy(void* LODEPNG_RESTRICT dst, const void* LODEPNG_RESTRICT src, size_t size) { size_t i; for(i = 0; i < size; i++) ((char*)dst)[i] = ((const char*)src)[i]; } static void lodepng_memset(void* LODEPNG_RESTRICT dst, int value, size_t num) { size_t i; for(i = 0; i < num; i++) ((char*)dst)[i] = (char)value; } /* does not check memory out of bounds, do not use on untrusted data */ static size_t lodepng_strlen(const char* a) { const char* orig = a; /* avoid warning about unused function in case of disabled COMPILE... macros */ (void)(&lodepng_strlen); while(*a) a++; return (size_t)(a - orig); } #define LODEPNG_MAX(a, b) (((a) > (b)) ? (a) : (b)) #define LODEPNG_MIN(a, b) (((a) < (b)) ? (a) : (b)) #define LODEPNG_ABS(x) ((x) < 0 ? -(x) : (x)) #if defined(LODEPNG_COMPILE_PNG) || defined(LODEPNG_COMPILE_DECODER) /* Safely check if adding two integers will overflow (no undefined behavior, compiler removing the code, etc...) and output result. */ static int lodepng_addofl(size_t a, size_t b, size_t* result) { *result = a + b; /* Unsigned addition is well defined and safe in C90 */ return *result < a; } #endif /*defined(LODEPNG_COMPILE_PNG) || defined(LODEPNG_COMPILE_DECODER)*/ #ifdef LODEPNG_COMPILE_DECODER /* Safely check if multiplying two integers will overflow (no undefined behavior, compiler removing the code, etc...) and output result. */ static int lodepng_mulofl(size_t a, size_t b, size_t* result) { *result = a * b; /* Unsigned multiplication is well defined and safe in C90 */ return (a != 0 && *result / a != b); } #ifdef LODEPNG_COMPILE_ZLIB /* Safely check if a + b > c, even if overflow could happen. */ static int lodepng_gtofl(size_t a, size_t b, size_t c) { size_t d; if(lodepng_addofl(a, b, &d)) return 1; return d > c; } #endif /*LODEPNG_COMPILE_ZLIB*/ #endif /*LODEPNG_COMPILE_DECODER*/ /* Often in case of an error a value is assigned to a variable and then it breaks out of a loop (to go to the cleanup phase of a function). This macro does that. It makes the error handling code shorter and more readable. Example: if(!uivector_resize(&lz77_encoded, datasize)) ERROR_BREAK(83); */ #define CERROR_BREAK(errorvar, code){\ errorvar = code;\ break;\ } /*version of CERROR_BREAK that assumes the common case where the error variable is named "error"*/ #define ERROR_BREAK(code) CERROR_BREAK(error, code) /*Set error var to the error code, and return it.*/ #define CERROR_RETURN_ERROR(errorvar, code){\ errorvar = code;\ return code;\ } /*Try the code, if it returns error, also return the error.*/ #define CERROR_TRY_RETURN(call){\ unsigned error = call;\ if(error) return error;\ } /*Set error var to the error code, and return from the void function.*/ #define CERROR_RETURN(errorvar, code){\ errorvar = code;\ return;\ } /* About uivector, ucvector and string: -All of them wrap dynamic arrays or text strings in a similar way. -LodePNG was originally written in C++. The vectors replace the std::vectors that were used in the C++ version. -The string tools are made to avoid problems with compilers that declare things like strncat as deprecated. -They're not used in the interface, only internally in this file as static functions. -As with many other structs in this file, the init and cleanup functions serve as ctor and dtor. */ #ifdef LODEPNG_COMPILE_ZLIB #ifdef LODEPNG_COMPILE_ENCODER /*dynamic vector of unsigned ints*/ typedef struct uivector { unsigned* data; size_t size; /*size in number of unsigned longs*/ size_t allocsize; /*allocated size in bytes*/ } uivector; static void uivector_cleanup(void* p) { ((uivector*)p)->size = ((uivector*)p)->allocsize = 0; lodepng_free(((uivector*)p)->data); ((uivector*)p)->data = NULL; } /*returns 1 if success, 0 if failure ==> nothing done*/ static unsigned uivector_resize(uivector* p, size_t size) { size_t allocsize = size * sizeof(unsigned); if(allocsize > p->allocsize) { size_t newsize = allocsize + (p->allocsize >> 1u); void* data = lodepng_realloc(p->data, newsize); if(data) { p->allocsize = newsize; p->data = (unsigned*)data; } else return 0; /*error: not enough memory*/ } p->size = size; return 1; /*success*/ } static void uivector_init(uivector* p) { p->data = NULL; p->size = p->allocsize = 0; } /*returns 1 if success, 0 if failure ==> nothing done*/ static unsigned uivector_push_back(uivector* p, unsigned c) { if(!uivector_resize(p, p->size + 1)) return 0; p->data[p->size - 1] = c; return 1; } #endif /*LODEPNG_COMPILE_ENCODER*/ #endif /*LODEPNG_COMPILE_ZLIB*/ /* /////////////////////////////////////////////////////////////////////////// */ /*dynamic vector of unsigned chars*/ typedef struct ucvector { unsigned char* data; size_t size; /*used size*/ size_t allocsize; /*allocated size*/ } ucvector; /*returns 1 if success, 0 if failure ==> nothing done*/ static unsigned ucvector_resize(ucvector* p, size_t size) { if(size > p->allocsize) { size_t newsize = size + (p->allocsize >> 1u); void* data = lodepng_realloc(p->data, newsize); if(data) { p->allocsize = newsize; p->data = (unsigned char*)data; } else return 0; /*error: not enough memory*/ } p->size = size; return 1; /*success*/ } static ucvector ucvector_init(unsigned char* buffer, size_t size) { ucvector v; v.data = buffer; v.allocsize = v.size = size; return v; } /* ////////////////////////////////////////////////////////////////////////// */ #ifdef LODEPNG_COMPILE_PNG #ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS /*free string pointer and set it to NULL*/ static void string_cleanup(char** out) { lodepng_free(*out); *out = NULL; } /*also appends null termination character*/ static char* alloc_string_sized(const char* in, size_t insize) { char* out = (char*)lodepng_malloc(insize + 1); if(out) { lodepng_memcpy(out, in, insize); out[insize] = 0; } return out; } /* dynamically allocates a new string with a copy of the null terminated input text */ static char* alloc_string(const char* in) { return alloc_string_sized(in, lodepng_strlen(in)); } #endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ #endif /*LODEPNG_COMPILE_PNG*/ /* ////////////////////////////////////////////////////////////////////////// */ #if defined(LODEPNG_COMPILE_DECODER) || defined(LODEPNG_COMPILE_PNG) static unsigned lodepng_read32bitInt(const unsigned char* buffer) { return (((unsigned)buffer[0] << 24u) | ((unsigned)buffer[1] << 16u) | ((unsigned)buffer[2] << 8u) | (unsigned)buffer[3]); } #endif /*defined(LODEPNG_COMPILE_DECODER) || defined(LODEPNG_COMPILE_PNG)*/ #if defined(LODEPNG_COMPILE_PNG) || defined(LODEPNG_COMPILE_ENCODER) /*buffer must have at least 4 allocated bytes available*/ static void lodepng_set32bitInt(unsigned char* buffer, unsigned value) { buffer[0] = (unsigned char)((value >> 24) & 0xff); buffer[1] = (unsigned char)((value >> 16) & 0xff); buffer[2] = (unsigned char)((value >> 8) & 0xff); buffer[3] = (unsigned char)((value ) & 0xff); } #endif /*defined(LODEPNG_COMPILE_PNG) || defined(LODEPNG_COMPILE_ENCODER)*/ /* ////////////////////////////////////////////////////////////////////////// */ /* / File IO / */ /* ////////////////////////////////////////////////////////////////////////// */ #ifdef LODEPNG_COMPILE_DISK /* returns negative value on error. This should be pure C compatible, so no fstat. */ static long lodepng_filesize(const char* filename) { FILE* file; long size; file = fopen(filename, "rb"); if(!file) return -1; if(fseek(file, 0, SEEK_END) != 0) { fclose(file); return -1; } size = ftell(file); /* It may give LONG_MAX as directory size, this is invalid for us. */ if(size == LONG_MAX) size = -1; fclose(file); return size; } /* load file into buffer that already has the correct allocated size. Returns error code.*/ static unsigned lodepng_buffer_file(unsigned char* out, size_t size, const char* filename) { FILE* file; size_t readsize; file = fopen(filename, "rb"); if(!file) return 78; readsize = fread(out, 1, size, file); fclose(file); if(readsize != size) return 78; return 0; } unsigned lodepng_load_file(unsigned char** out, size_t* outsize, const char* filename) { long size = lodepng_filesize(filename); if(size < 0) return 78; *outsize = (size_t)size; *out = (unsigned char*)lodepng_malloc((size_t)size); if(!(*out) && size > 0) return 83; /*the above malloc failed*/ return lodepng_buffer_file(*out, (size_t)size, filename); } /*write given buffer to the file, overwriting the file, it doesn't append to it.*/ unsigned lodepng_save_file(const unsigned char* buffer, size_t buffersize, const char* filename) { FILE* file; file = fopen(filename, "wb" ); if(!file) return 79; fwrite(buffer, 1, buffersize, file); fclose(file); return 0; } #endif /*LODEPNG_COMPILE_DISK*/ /* ////////////////////////////////////////////////////////////////////////// */ /* ////////////////////////////////////////////////////////////////////////// */ /* // End of common code and tools. Begin of Zlib related code. // */ /* ////////////////////////////////////////////////////////////////////////// */ /* ////////////////////////////////////////////////////////////////////////// */ #ifdef LODEPNG_COMPILE_ZLIB #ifdef LODEPNG_COMPILE_ENCODER typedef struct { ucvector* data; unsigned char bp; /*ok to overflow, indicates bit pos inside byte*/ } LodePNGBitWriter; static void LodePNGBitWriter_init(LodePNGBitWriter* writer, ucvector* data) { writer->data = data; writer->bp = 0; } /*TODO: this ignores potential out of memory errors*/ #define WRITEBIT(writer, bit){\ /* append new byte */\ if(((writer->bp) & 7u) == 0) {\ if(!ucvector_resize(writer->data, writer->data->size + 1)) return;\ writer->data->data[writer->data->size - 1] = 0;\ }\ (writer->data->data[writer->data->size - 1]) |= (bit << ((writer->bp) & 7u));\ ++writer->bp;\ } /* LSB of value is written first, and LSB of bytes is used first */ static void writeBits(LodePNGBitWriter* writer, unsigned value, size_t nbits) { if(nbits == 1) { /* compiler should statically compile this case if nbits == 1 */ WRITEBIT(writer, value); } else { /* TODO: increase output size only once here rather than in each WRITEBIT */ size_t i; for(i = 0; i != nbits; ++i) { WRITEBIT(writer, (unsigned char)((value >> i) & 1)); } } } /* This one is to use for adding huffman symbol, the value bits are written MSB first */ static void writeBitsReversed(LodePNGBitWriter* writer, unsigned value, size_t nbits) { size_t i; for(i = 0; i != nbits; ++i) { /* TODO: increase output size only once here rather than in each WRITEBIT */ WRITEBIT(writer, (unsigned char)((value >> (nbits - 1u - i)) & 1u)); } } #endif /*LODEPNG_COMPILE_ENCODER*/ #ifdef LODEPNG_COMPILE_DECODER typedef struct { const unsigned char* data; size_t size; /*size of data in bytes*/ size_t bitsize; /*size of data in bits, end of valid bp values, should be 8*size*/ size_t bp; unsigned buffer; /*buffer for reading bits. NOTE: 'unsigned' must support at least 32 bits*/ } LodePNGBitReader; /* data size argument is in bytes. Returns error if size too large causing overflow */ static unsigned LodePNGBitReader_init(LodePNGBitReader* reader, const unsigned char* data, size_t size) { size_t temp; reader->data = data; reader->size = size; /* size in bits, return error if overflow (if size_t is 32 bit this supports up to 500MB) */ if(lodepng_mulofl(size, 8u, &reader->bitsize)) return 105; /*ensure incremented bp can be compared to bitsize without overflow even when it would be incremented 32 too much and trying to ensure 32 more bits*/ if(lodepng_addofl(reader->bitsize, 64u, &temp)) return 105; reader->bp = 0; reader->buffer = 0; return 0; /*ok*/ } /* ensureBits functions: Ensures the reader can at least read nbits bits in one or more readBits calls, safely even if not enough bits are available. Returns 1 if there are enough bits available, 0 if not. */ /*See ensureBits documentation above. This one ensures exactly 1 bit */ /*static unsigned ensureBits1(LodePNGBitReader* reader) { if(reader->bp >= reader->bitsize) return 0; reader->buffer = (unsigned)reader->data[reader->bp >> 3u] >> (reader->bp & 7u); return 1; }*/ /*See ensureBits documentation above. This one ensures up to 9 bits */ static unsigned ensureBits9(LodePNGBitReader* reader, size_t nbits) { size_t start = reader->bp >> 3u; size_t size = reader->size; if(start + 1u < size) { reader->buffer = (unsigned)reader->data[start + 0] | ((unsigned)reader->data[start + 1] << 8u); reader->buffer >>= (reader->bp & 7u); return 1; } else { reader->buffer = 0; if(start + 0u < size) reader->buffer |= reader->data[start + 0]; reader->buffer >>= (reader->bp & 7u); return reader->bp + nbits <= reader->bitsize; } } /*See ensureBits documentation above. This one ensures up to 17 bits */ static unsigned ensureBits17(LodePNGBitReader* reader, size_t nbits) { size_t start = reader->bp >> 3u; size_t size = reader->size; if(start + 2u < size) { reader->buffer = (unsigned)reader->data[start + 0] | ((unsigned)reader->data[start + 1] << 8u) | ((unsigned)reader->data[start + 2] << 16u); reader->buffer >>= (reader->bp & 7u); return 1; } else { reader->buffer = 0; if(start + 0u < size) reader->buffer |= reader->data[start + 0]; if(start + 1u < size) reader->buffer |= ((unsigned)reader->data[start + 1] << 8u); reader->buffer >>= (reader->bp & 7u); return reader->bp + nbits <= reader->bitsize; } } /*See ensureBits documentation above. This one ensures up to 25 bits */ static LODEPNG_INLINE unsigned ensureBits25(LodePNGBitReader* reader, size_t nbits) { size_t start = reader->bp >> 3u; size_t size = reader->size; if(start + 3u < size) { reader->buffer = (unsigned)reader->data[start + 0] | ((unsigned)reader->data[start + 1] << 8u) | ((unsigned)reader->data[start + 2] << 16u) | ((unsigned)reader->data[start + 3] << 24u); reader->buffer >>= (reader->bp & 7u); return 1; } else { reader->buffer = 0; if(start + 0u < size) reader->buffer |= reader->data[start + 0]; if(start + 1u < size) reader->buffer |= ((unsigned)reader->data[start + 1] << 8u); if(start + 2u < size) reader->buffer |= ((unsigned)reader->data[start + 2] << 16u); reader->buffer >>= (reader->bp & 7u); return reader->bp + nbits <= reader->bitsize; } } /*See ensureBits documentation above. This one ensures up to 32 bits */ static LODEPNG_INLINE unsigned ensureBits32(LodePNGBitReader* reader, size_t nbits) { size_t start = reader->bp >> 3u; size_t size = reader->size; if(start + 4u < size) { reader->buffer = (unsigned)reader->data[start + 0] | ((unsigned)reader->data[start + 1] << 8u) | ((unsigned)reader->data[start + 2] << 16u) | ((unsigned)reader->data[start + 3] << 24u); reader->buffer >>= (reader->bp & 7u); reader->buffer |= (((unsigned)reader->data[start + 4] << 24u) << (8u - (reader->bp & 7u))); return 1; } else { reader->buffer = 0; if(start + 0u < size) reader->buffer |= reader->data[start + 0]; if(start + 1u < size) reader->buffer |= ((unsigned)reader->data[start + 1] << 8u); if(start + 2u < size) reader->buffer |= ((unsigned)reader->data[start + 2] << 16u); if(start + 3u < size) reader->buffer |= ((unsigned)reader->data[start + 3] << 24u); reader->buffer >>= (reader->bp & 7u); return reader->bp + nbits <= reader->bitsize; } } /* Get bits without advancing the bit pointer. Must have enough bits available with ensureBits. Max nbits is 31. */ static unsigned peekBits(LodePNGBitReader* reader, size_t nbits) { /* The shift allows nbits to be only up to 31. */ return reader->buffer & ((1u << nbits) - 1u); } /* Must have enough bits available with ensureBits */ static void advanceBits(LodePNGBitReader* reader, size_t nbits) { reader->buffer >>= nbits; reader->bp += nbits; } /* Must have enough bits available with ensureBits */ static unsigned readBits(LodePNGBitReader* reader, size_t nbits) { unsigned result = peekBits(reader, nbits); advanceBits(reader, nbits); return result; } /* Public for testing only. steps and result must have numsteps values. */ unsigned lode_png_test_bitreader(const unsigned char* data, size_t size, size_t numsteps, const size_t* steps, unsigned* result) { size_t i; LodePNGBitReader reader; unsigned error = LodePNGBitReader_init(&reader, data, size); if(error) return 0; for(i = 0; i < numsteps; i++) { size_t step = steps[i]; unsigned ok; if(step > 25) ok = ensureBits32(&reader, step); else if(step > 17) ok = ensureBits25(&reader, step); else if(step > 9) ok = ensureBits17(&reader, step); else ok = ensureBits9(&reader, step); if(!ok) return 0; result[i] = readBits(&reader, step); } return 1; } #endif /*LODEPNG_COMPILE_DECODER*/ static unsigned reverseBits(unsigned bits, unsigned num) { /*TODO: implement faster lookup table based version when needed*/ unsigned i, result = 0; for(i = 0; i < num; i++) result |= ((bits >> (num - i - 1u)) & 1u) << i; return result; } /* ////////////////////////////////////////////////////////////////////////// */ /* / Deflate - Huffman / */ /* ////////////////////////////////////////////////////////////////////////// */ #define FIRST_LENGTH_CODE_INDEX 257 #define LAST_LENGTH_CODE_INDEX 285 /*256 literals, the end code, some length codes, and 2 unused codes*/ #define NUM_DEFLATE_CODE_SYMBOLS 288 /*the distance codes have their own symbols, 30 used, 2 unused*/ #define NUM_DISTANCE_SYMBOLS 32 /*the code length codes. 0-15: code lengths, 16: copy previous 3-6 times, 17: 3-10 zeros, 18: 11-138 zeros*/ #define NUM_CODE_LENGTH_CODES 19 /*the base lengths represented by codes 257-285*/ static const unsigned LENGTHBASE[29] = {3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258}; /*the extra bits used by codes 257-285 (added to base length)*/ static const unsigned LENGTHEXTRA[29] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0}; /*the base backwards distances (the bits of distance codes appear after length codes and use their own huffman tree)*/ static const unsigned DISTANCEBASE[30] = {1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577}; /*the extra bits of backwards distances (added to base)*/ static const unsigned DISTANCEEXTRA[30] = {0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13}; /*the order in which "code length alphabet code lengths" are stored as specified by deflate, out of this the huffman tree of the dynamic huffman tree lengths is generated*/ static const unsigned CLCL_ORDER[NUM_CODE_LENGTH_CODES] = {16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15}; /* ////////////////////////////////////////////////////////////////////////// */ /* Huffman tree struct, containing multiple representations of the tree */ typedef struct HuffmanTree { unsigned* codes; /*the huffman codes (bit patterns representing the symbols)*/ unsigned* lengths; /*the lengths of the huffman codes*/ unsigned maxbitlen; /*maximum number of bits a single code can get*/ unsigned numcodes; /*number of symbols in the alphabet = number of codes*/ /* for reading only */ unsigned char* table_len; /*length of symbol from lookup table, or max length if secondary lookup needed*/ unsigned short* table_value; /*value of symbol from lookup table, or pointer to secondary table if needed*/ } HuffmanTree; static void HuffmanTree_init(HuffmanTree* tree) { tree->codes = 0; tree->lengths = 0; tree->table_len = 0; tree->table_value = 0; } static void HuffmanTree_cleanup(HuffmanTree* tree) { lodepng_free(tree->codes); lodepng_free(tree->lengths); lodepng_free(tree->table_len); lodepng_free(tree->table_value); } /* amount of bits for first huffman table lookup (aka root bits), see HuffmanTree_makeTable and huffmanDecodeSymbol.*/ /* values 8u and 9u work the fastest */ #define FIRSTBITS 9u /* a symbol value too big to represent any valid symbol, to indicate reading disallowed huffman bits combination, which is possible in case of only 0 or 1 present symbols. */ #define INVALIDSYMBOL 65535u /* make table for huffman decoding */ static unsigned HuffmanTree_makeTable(HuffmanTree* tree) { static const unsigned headsize = 1u << FIRSTBITS; /*size of the first table*/ static const unsigned mask = (1u << FIRSTBITS) /*headsize*/ - 1u; size_t i, numpresent, pointer, size; /*total table size*/ unsigned* maxlens = (unsigned*)lodepng_malloc(headsize * sizeof(unsigned)); if(!maxlens) return 83; /*alloc fail*/ /* compute maxlens: max total bit length of symbols sharing prefix in the first table*/ lodepng_memset(maxlens, 0, headsize * sizeof(*maxlens)); for(i = 0; i < tree->numcodes; i++) { unsigned symbol = tree->codes[i]; unsigned l = tree->lengths[i]; unsigned index; if(l <= FIRSTBITS) continue; /*symbols that fit in first table don't increase secondary table size*/ /*get the FIRSTBITS MSBs, the MSBs of the symbol are encoded first. See later comment about the reversing*/ index = reverseBits(symbol >> (l - FIRSTBITS), FIRSTBITS); maxlens[index] = LODEPNG_MAX(maxlens[index], l); } /* compute total table size: size of first table plus all secondary tables for symbols longer than FIRSTBITS */ size = headsize; for(i = 0; i < headsize; ++i) { unsigned l = maxlens[i]; if(l > FIRSTBITS) size += (1u << (l - FIRSTBITS)); } tree->table_len = (unsigned char*)lodepng_malloc(size * sizeof(*tree->table_len)); tree->table_value = (unsigned short*)lodepng_malloc(size * sizeof(*tree->table_value)); if(!tree->table_len || !tree->table_value) { lodepng_free(maxlens); /* freeing tree->table values is done at a higher scope */ return 83; /*alloc fail*/ } /*initialize with an invalid length to indicate unused entries*/ for(i = 0; i < size; ++i) tree->table_len[i] = 16; /*fill in the first table for long symbols: max prefix size and pointer to secondary tables*/ pointer = headsize; for(i = 0; i < headsize; ++i) { unsigned l = maxlens[i]; if(l <= FIRSTBITS) continue; tree->table_len[i] = l; tree->table_value[i] = pointer; pointer += (1u << (l - FIRSTBITS)); } lodepng_free(maxlens); /*fill in the first table for short symbols, or secondary table for long symbols*/ numpresent = 0; for(i = 0; i < tree->numcodes; ++i) { unsigned l = tree->lengths[i]; unsigned symbol = tree->codes[i]; /*the huffman bit pattern. i itself is the value.*/ /*reverse bits, because the huffman bits are given in MSB first order but the bit reader reads LSB first*/ unsigned reverse = reverseBits(symbol, l); if(l == 0) continue; numpresent++; if(l <= FIRSTBITS) { /*short symbol, fully in first table, replicated num times if l < FIRSTBITS*/ unsigned num = 1u << (FIRSTBITS - l); unsigned j; for(j = 0; j < num; ++j) { /*bit reader will read the l bits of symbol first, the remaining FIRSTBITS - l bits go to the MSB's*/ unsigned index = reverse | (j << l); if(tree->table_len[index] != 16) return 55; /*invalid tree: long symbol shares prefix with short symbol*/ tree->table_len[index] = l; tree->table_value[index] = i; } } else { /*long symbol, shares prefix with other long symbols in first lookup table, needs second lookup*/ /*the FIRSTBITS MSBs of the symbol are the first table index*/ unsigned index = reverse & mask; unsigned maxlen = tree->table_len[index]; /*log2 of secondary table length, should be >= l - FIRSTBITS*/ unsigned tablelen = maxlen - FIRSTBITS; unsigned start = tree->table_value[index]; /*starting index in secondary table*/ unsigned num = 1u << (tablelen - (l - FIRSTBITS)); /*amount of entries of this symbol in secondary table*/ unsigned j; if(maxlen < l) return 55; /*invalid tree: long symbol shares prefix with short symbol*/ for(j = 0; j < num; ++j) { unsigned reverse2 = reverse >> FIRSTBITS; /* l - FIRSTBITS bits */ unsigned index2 = start + (reverse2 | (j << (l - FIRSTBITS))); tree->table_len[index2] = l; tree->table_value[index2] = i; } } } if(numpresent < 2) { /* In case of exactly 1 symbol, in theory the huffman symbol needs 0 bits, but deflate uses 1 bit instead. In case of 0 symbols, no symbols can appear at all, but such huffman tree could still exist (e.g. if distance codes are never used). In both cases, not all symbols of the table will be filled in. Fill them in with an invalid symbol value so returning them from huffmanDecodeSymbol will cause error. */ for(i = 0; i < size; ++i) { if(tree->table_len[i] == 16) { /* As length, use a value smaller than FIRSTBITS for the head table, and a value larger than FIRSTBITS for the secondary table, to ensure valid behavior for advanceBits when reading this symbol. */ tree->table_len[i] = (i < headsize) ? 1 : (FIRSTBITS + 1); tree->table_value[i] = INVALIDSYMBOL; } } } else { /* A good huffman tree has N * 2 - 1 nodes, of which N - 1 are internal nodes. If that is not the case (due to too long length codes), the table will not have been fully used, and this is an error (not all bit combinations can be decoded): an oversubscribed huffman tree, indicated by error 55. */ for(i = 0; i < size; ++i) { if(tree->table_len[i] == 16) return 55; } } return 0; } /* Second step for the ...makeFromLengths and ...makeFromFrequencies functions. numcodes, lengths and maxbitlen must already be filled in correctly. return value is error. */ static unsigned HuffmanTree_makeFromLengths2(HuffmanTree* tree) { unsigned* blcount; unsigned* nextcode; unsigned error = 0; unsigned bits, n; tree->codes = (unsigned*)lodepng_malloc(tree->numcodes * sizeof(unsigned)); blcount = (unsigned*)lodepng_malloc((tree->maxbitlen + 1) * sizeof(unsigned)); nextcode = (unsigned*)lodepng_malloc((tree->maxbitlen + 1) * sizeof(unsigned)); if(!tree->codes || !blcount || !nextcode) error = 83; /*alloc fail*/ if(!error) { for(n = 0; n != tree->maxbitlen + 1; n++) blcount[n] = nextcode[n] = 0; /*step 1: count number of instances of each code length*/ for(bits = 0; bits != tree->numcodes; ++bits) ++blcount[tree->lengths[bits]]; /*step 2: generate the nextcode values*/ for(bits = 1; bits <= tree->maxbitlen; ++bits) { nextcode[bits] = (nextcode[bits - 1] + blcount[bits - 1]) << 1u; } /*step 3: generate all the codes*/ for(n = 0; n != tree->numcodes; ++n) { if(tree->lengths[n] != 0) { tree->codes[n] = nextcode[tree->lengths[n]]++; /*remove superfluous bits from the code*/ tree->codes[n] &= ((1u << tree->lengths[n]) - 1u); } } } lodepng_free(blcount); lodepng_free(nextcode); if(!error) error = HuffmanTree_makeTable(tree); return error; } /* given the code lengths (as stored in the PNG file), generate the tree as defined by Deflate. maxbitlen is the maximum bits that a code in the tree can have. return value is error. */ static unsigned HuffmanTree_makeFromLengths(HuffmanTree* tree, const unsigned* bitlen, size_t numcodes, unsigned maxbitlen) { unsigned i; tree->lengths = (unsigned*)lodepng_malloc(numcodes * sizeof(unsigned)); if(!tree->lengths) return 83; /*alloc fail*/ for(i = 0; i != numcodes; ++i) tree->lengths[i] = bitlen[i]; tree->numcodes = (unsigned)numcodes; /*number of symbols*/ tree->maxbitlen = maxbitlen; return HuffmanTree_makeFromLengths2(tree); } #ifdef LODEPNG_COMPILE_ENCODER /*BPM: Boundary Package Merge, see "A Fast and Space-Economical Algorithm for Length-Limited Coding", Jyrki Katajainen, Alistair Moffat, Andrew Turpin, 1995.*/ /*chain node for boundary package merge*/ typedef struct BPMNode { int weight; /*the sum of all weights in this chain*/ unsigned index; /*index of this leaf node (called "count" in the paper)*/ struct BPMNode* tail; /*the next nodes in this chain (null if last)*/ int in_use; } BPMNode; /*lists of chains*/ typedef struct BPMLists { /*memory pool*/ unsigned memsize; BPMNode* memory; unsigned numfree; unsigned nextfree; BPMNode** freelist; /*two heads of lookahead chains per list*/ unsigned listsize; BPMNode** chains0; BPMNode** chains1; } BPMLists; /*creates a new chain node with the given parameters, from the memory in the lists */ static BPMNode* bpmnode_create(BPMLists* lists, int weight, unsigned index, BPMNode* tail) { unsigned i; BPMNode* result; /*memory full, so garbage collect*/ if(lists->nextfree >= lists->numfree) { /*mark only those that are in use*/ for(i = 0; i != lists->memsize; ++i) lists->memory[i].in_use = 0; for(i = 0; i != lists->listsize; ++i) { BPMNode* node; for(node = lists->chains0[i]; node != 0; node = node->tail) node->in_use = 1; for(node = lists->chains1[i]; node != 0; node = node->tail) node->in_use = 1; } /*collect those that are free*/ lists->numfree = 0; for(i = 0; i != lists->memsize; ++i) { if(!lists->memory[i].in_use) lists->freelist[lists->numfree++] = &lists->memory[i]; } lists->nextfree = 0; } result = lists->freelist[lists->nextfree++]; result->weight = weight; result->index = index; result->tail = tail; return result; } /*sort the leaves with stable mergesort*/ static void bpmnode_sort(BPMNode* leaves, size_t num) { BPMNode* mem = (BPMNode*)lodepng_malloc(sizeof(*leaves) * num); size_t width, counter = 0; for(width = 1; width < num; width *= 2) { BPMNode* a = (counter & 1) ? mem : leaves; BPMNode* b = (counter & 1) ? leaves : mem; size_t p; for(p = 0; p < num; p += 2 * width) { size_t q = (p + width > num) ? num : (p + width); size_t r = (p + 2 * width > num) ? num : (p + 2 * width); size_t i = p, j = q, k; for(k = p; k < r; k++) { if(i < q && (j >= r || a[i].weight <= a[j].weight)) b[k] = a[i++]; else b[k] = a[j++]; } } counter++; } if(counter & 1) lodepng_memcpy(leaves, mem, sizeof(*leaves) * num); lodepng_free(mem); } /*Boundary Package Merge step, numpresent is the amount of leaves, and c is the current chain.*/ static void boundaryPM(BPMLists* lists, BPMNode* leaves, size_t numpresent, int c, int num) { unsigned lastindex = lists->chains1[c]->index; if(c == 0) { if(lastindex >= numpresent) return; lists->chains0[c] = lists->chains1[c]; lists->chains1[c] = bpmnode_create(lists, leaves[lastindex].weight, lastindex + 1, 0); } else { /*sum of the weights of the head nodes of the previous lookahead chains.*/ int sum = lists->chains0[c - 1]->weight + lists->chains1[c - 1]->weight; lists->chains0[c] = lists->chains1[c]; if(lastindex < numpresent && sum > leaves[lastindex].weight) { lists->chains1[c] = bpmnode_create(lists, leaves[lastindex].weight, lastindex + 1, lists->chains1[c]->tail); return; } lists->chains1[c] = bpmnode_create(lists, sum, lastindex, lists->chains1[c - 1]); /*in the end we are only interested in the chain of the last list, so no need to recurse if we're at the last one (this gives measurable speedup)*/ if(num + 1 < (int)(2 * numpresent - 2)) { boundaryPM(lists, leaves, numpresent, c - 1, num); boundaryPM(lists, leaves, numpresent, c - 1, num); } } } unsigned lodepng_huffman_code_lengths(unsigned* lengths, const unsigned* frequencies, size_t numcodes, unsigned maxbitlen) { unsigned error = 0; unsigned i; size_t numpresent = 0; /*number of symbols with non-zero frequency*/ BPMNode* leaves; /*the symbols, only those with > 0 frequency*/ if(numcodes == 0) return 80; /*error: a tree of 0 symbols is not supposed to be made*/ if((1u << maxbitlen) < (unsigned)numcodes) return 80; /*error: represent all symbols*/ leaves = (BPMNode*)lodepng_malloc(numcodes * sizeof(*leaves)); if(!leaves) return 83; /*alloc fail*/ for(i = 0; i != numcodes; ++i) { if(frequencies[i] > 0) { leaves[numpresent].weight = (int)frequencies[i]; leaves[numpresent].index = i; ++numpresent; } } lodepng_memset(lengths, 0, numcodes * sizeof(*lengths)); /*ensure at least two present symbols. There should be at least one symbol according to RFC 1951 section 3.2.7. Some decoders incorrectly require two. To make these work as well ensure there are at least two symbols. The Package-Merge code below also doesn't work correctly if there's only one symbol, it'd give it the theoretical 0 bits but in practice zlib wants 1 bit*/ if(numpresent == 0) { lengths[0] = lengths[1] = 1; /*note that for RFC 1951 section 3.2.7, only lengths[0] = 1 is needed*/ } else if(numpresent == 1) { lengths[leaves[0].index] = 1; lengths[leaves[0].index == 0 ? 1 : 0] = 1; } else { BPMLists lists; BPMNode* node; bpmnode_sort(leaves, numpresent); lists.listsize = maxbitlen; lists.memsize = 2 * maxbitlen * (maxbitlen + 1); lists.nextfree = 0; lists.numfree = lists.memsize; lists.memory = (BPMNode*)lodepng_malloc(lists.memsize * sizeof(*lists.memory)); lists.freelist = (BPMNode**)lodepng_malloc(lists.memsize * sizeof(BPMNode*)); lists.chains0 = (BPMNode**)lodepng_malloc(lists.listsize * sizeof(BPMNode*)); lists.chains1 = (BPMNode**)lodepng_malloc(lists.listsize * sizeof(BPMNode*)); if(!lists.memory || !lists.freelist || !lists.chains0 || !lists.chains1) error = 83; /*alloc fail*/ if(!error) { for(i = 0; i != lists.memsize; ++i) lists.freelist[i] = &lists.memory[i]; bpmnode_create(&lists, leaves[0].weight, 1, 0); bpmnode_create(&lists, leaves[1].weight, 2, 0); for(i = 0; i != lists.listsize; ++i) { lists.chains0[i] = &lists.memory[0]; lists.chains1[i] = &lists.memory[1]; } /*each boundaryPM call adds one chain to the last list, and we need 2 * numpresent - 2 chains.*/ for(i = 2; i != 2 * numpresent - 2; ++i) boundaryPM(&lists, leaves, numpresent, (int)maxbitlen - 1, (int)i); for(node = lists.chains1[maxbitlen - 1]; node; node = node->tail) { for(i = 0; i != node->index; ++i) ++lengths[leaves[i].index]; } } lodepng_free(lists.memory); lodepng_free(lists.freelist); lodepng_free(lists.chains0); lodepng_free(lists.chains1); } lodepng_free(leaves); return error; } /*Create the Huffman tree given the symbol frequencies*/ static unsigned HuffmanTree_makeFromFrequencies(HuffmanTree* tree, const unsigned* frequencies, size_t mincodes, size_t numcodes, unsigned maxbitlen) { unsigned error = 0; while(!frequencies[numcodes - 1] && numcodes > mincodes) --numcodes; /*trim zeroes*/ tree->lengths = (unsigned*)lodepng_malloc(numcodes * sizeof(unsigned)); if(!tree->lengths) return 83; /*alloc fail*/ tree->maxbitlen = maxbitlen; tree->numcodes = (unsigned)numcodes; /*number of symbols*/ error = lodepng_huffman_code_lengths(tree->lengths, frequencies, numcodes, maxbitlen); if(!error) error = HuffmanTree_makeFromLengths2(tree); return error; } #endif /*LODEPNG_COMPILE_ENCODER*/ /*get the literal and length code tree of a deflated block with fixed tree, as per the deflate specification*/ static unsigned generateFixedLitLenTree(HuffmanTree* tree) { unsigned i, error = 0; unsigned* bitlen = (unsigned*)lodepng_malloc(NUM_DEFLATE_CODE_SYMBOLS * sizeof(unsigned)); if(!bitlen) return 83; /*alloc fail*/ /*288 possible codes: 0-255=literals, 256=endcode, 257-285=lengthcodes, 286-287=unused*/ for(i = 0; i <= 143; ++i) bitlen[i] = 8; for(i = 144; i <= 255; ++i) bitlen[i] = 9; for(i = 256; i <= 279; ++i) bitlen[i] = 7; for(i = 280; i <= 287; ++i) bitlen[i] = 8; error = HuffmanTree_makeFromLengths(tree, bitlen, NUM_DEFLATE_CODE_SYMBOLS, 15); lodepng_free(bitlen); return error; } /*get the distance code tree of a deflated block with fixed tree, as specified in the deflate specification*/ static unsigned generateFixedDistanceTree(HuffmanTree* tree) { unsigned i, error = 0; unsigned* bitlen = (unsigned*)lodepng_malloc(NUM_DISTANCE_SYMBOLS * sizeof(unsigned)); if(!bitlen) return 83; /*alloc fail*/ /*there are 32 distance codes, but 30-31 are unused*/ for(i = 0; i != NUM_DISTANCE_SYMBOLS; ++i) bitlen[i] = 5; error = HuffmanTree_makeFromLengths(tree, bitlen, NUM_DISTANCE_SYMBOLS, 15); lodepng_free(bitlen); return error; } #ifdef LODEPNG_COMPILE_DECODER /* returns the code. The bit reader must already have been ensured at least 15 bits */ static unsigned huffmanDecodeSymbol(LodePNGBitReader* reader, const HuffmanTree* codetree) { unsigned short code = peekBits(reader, FIRSTBITS); unsigned short l = codetree->table_len[code]; unsigned short value = codetree->table_value[code]; if(l <= FIRSTBITS) { advanceBits(reader, l); return value; } else { unsigned index2; advanceBits(reader, FIRSTBITS); index2 = value + peekBits(reader, l - FIRSTBITS); advanceBits(reader, codetree->table_len[index2] - FIRSTBITS); return codetree->table_value[index2]; } } #endif /*LODEPNG_COMPILE_DECODER*/ #ifdef LODEPNG_COMPILE_DECODER /* ////////////////////////////////////////////////////////////////////////// */ /* / Inflator (Decompressor) / */ /* ////////////////////////////////////////////////////////////////////////// */ /*get the tree of a deflated block with fixed tree, as specified in the deflate specification Returns error code.*/ static unsigned getTreeInflateFixed(HuffmanTree* tree_ll, HuffmanTree* tree_d) { unsigned error = generateFixedLitLenTree(tree_ll); if(error) return error; return generateFixedDistanceTree(tree_d); } /*get the tree of a deflated block with dynamic tree, the tree itself is also Huffman compressed with a known tree*/ static unsigned getTreeInflateDynamic(HuffmanTree* tree_ll, HuffmanTree* tree_d, LodePNGBitReader* reader) { /*make sure that length values that aren't filled in will be 0, or a wrong tree will be generated*/ unsigned error = 0; unsigned n, HLIT, HDIST, HCLEN, i; /*see comments in deflateDynamic for explanation of the context and these variables, it is analogous*/ unsigned* bitlen_ll = 0; /*lit,len code lengths*/ unsigned* bitlen_d = 0; /*dist code lengths*/ /*code length code lengths ("clcl"), the bit lengths of the huffman tree used to compress bitlen_ll and bitlen_d*/ unsigned* bitlen_cl = 0; HuffmanTree tree_cl; /*the code tree for code length codes (the huffman tree for compressed huffman trees)*/ if(!ensureBits17(reader, 14)) return 49; /*error: the bit pointer is or will go past the memory*/ /*number of literal/length codes + 257. Unlike the spec, the value 257 is added to it here already*/ HLIT = readBits(reader, 5) + 257; /*number of distance codes. Unlike the spec, the value 1 is added to it here already*/ HDIST = readBits(reader, 5) + 1; /*number of code length codes. Unlike the spec, the value 4 is added to it here already*/ HCLEN = readBits(reader, 4) + 4; bitlen_cl = (unsigned*)lodepng_malloc(NUM_CODE_LENGTH_CODES * sizeof(unsigned)); if(!bitlen_cl) return 83 /*alloc fail*/; HuffmanTree_init(&tree_cl); while(!error) { /*read the code length codes out of 3 * (amount of code length codes) bits*/ if(lodepng_gtofl(reader->bp, HCLEN * 3, reader->bitsize)) { ERROR_BREAK(50); /*error: the bit pointer is or will go past the memory*/ } for(i = 0; i != HCLEN; ++i) { ensureBits9(reader, 3); /*out of bounds already checked above */ bitlen_cl[CLCL_ORDER[i]] = readBits(reader, 3); } for(i = HCLEN; i != NUM_CODE_LENGTH_CODES; ++i) { bitlen_cl[CLCL_ORDER[i]] = 0; } error = HuffmanTree_makeFromLengths(&tree_cl, bitlen_cl, NUM_CODE_LENGTH_CODES, 7); if(error) break; /*now we can use this tree to read the lengths for the tree that this function will return*/ bitlen_ll = (unsigned*)lodepng_malloc(NUM_DEFLATE_CODE_SYMBOLS * sizeof(unsigned)); bitlen_d = (unsigned*)lodepng_malloc(NUM_DISTANCE_SYMBOLS * sizeof(unsigned)); if(!bitlen_ll || !bitlen_d) ERROR_BREAK(83 /*alloc fail*/); lodepng_memset(bitlen_ll, 0, NUM_DEFLATE_CODE_SYMBOLS * sizeof(*bitlen_ll)); lodepng_memset(bitlen_d, 0, NUM_DISTANCE_SYMBOLS * sizeof(*bitlen_d)); /*i is the current symbol we're reading in the part that contains the code lengths of lit/len and dist codes*/ i = 0; while(i < HLIT + HDIST) { unsigned code; ensureBits25(reader, 22); /* up to 15 bits for huffman code, up to 7 extra bits below*/ code = huffmanDecodeSymbol(reader, &tree_cl); if(code <= 15) /*a length code*/ { if(i < HLIT) bitlen_ll[i] = code; else bitlen_d[i - HLIT] = code; ++i; } else if(code == 16) /*repeat previous*/ { unsigned replength = 3; /*read in the 2 bits that indicate repeat length (3-6)*/ unsigned value; /*set value to the previous code*/ if(i == 0) ERROR_BREAK(54); /*can't repeat previous if i is 0*/ replength += readBits(reader, 2); if(i < HLIT + 1) value = bitlen_ll[i - 1]; else value = bitlen_d[i - HLIT - 1]; /*repeat this value in the next lengths*/ for(n = 0; n < replength; ++n) { if(i >= HLIT + HDIST) ERROR_BREAK(13); /*error: i is larger than the amount of codes*/ if(i < HLIT) bitlen_ll[i] = value; else bitlen_d[i - HLIT] = value; ++i; } } else if(code == 17) /*repeat "0" 3-10 times*/ { unsigned replength = 3; /*read in the bits that indicate repeat length*/ replength += readBits(reader, 3); /*repeat this value in the next lengths*/ for(n = 0; n < replength; ++n) { if(i >= HLIT + HDIST) ERROR_BREAK(14); /*error: i is larger than the amount of codes*/ if(i < HLIT) bitlen_ll[i] = 0; else bitlen_d[i - HLIT] = 0; ++i; } } else if(code == 18) /*repeat "0" 11-138 times*/ { unsigned replength = 11; /*read in the bits that indicate repeat length*/ replength += readBits(reader, 7); /*repeat this value in the next lengths*/ for(n = 0; n < replength; ++n) { if(i >= HLIT + HDIST) ERROR_BREAK(15); /*error: i is larger than the amount of codes*/ if(i < HLIT) bitlen_ll[i] = 0; else bitlen_d[i - HLIT] = 0; ++i; } } else /*if(code == INVALIDSYMBOL)*/ { ERROR_BREAK(16); /*error: tried to read disallowed huffman symbol*/ } /*check if any of the ensureBits above went out of bounds*/ if(reader->bp > reader->bitsize) { /*return error code 10 or 11 depending on the situation that happened in huffmanDecodeSymbol (10=no endcode, 11=wrong jump outside of tree)*/ /* TODO: revise error codes 10,11,50: the above comment is no longer valid */ ERROR_BREAK(50); /*error, bit pointer jumps past memory*/ } } if(error) break; if(bitlen_ll[256] == 0) ERROR_BREAK(64); /*the length of the end code 256 must be larger than 0*/ /*now we've finally got HLIT and HDIST, so generate the code trees, and the function is done*/ error = HuffmanTree_makeFromLengths(tree_ll, bitlen_ll, NUM_DEFLATE_CODE_SYMBOLS, 15); if(error) break; error = HuffmanTree_makeFromLengths(tree_d, bitlen_d, NUM_DISTANCE_SYMBOLS, 15); break; /*end of error-while*/ } lodepng_free(bitlen_cl); lodepng_free(bitlen_ll); lodepng_free(bitlen_d); HuffmanTree_cleanup(&tree_cl); return error; } /*inflate a block with dynamic of fixed Huffman tree. btype must be 1 or 2.*/ static unsigned inflateHuffmanBlock(ucvector* out, LodePNGBitReader* reader, unsigned btype, size_t max_output_size) { unsigned error = 0; HuffmanTree tree_ll; /*the huffman tree for literal and length codes*/ HuffmanTree tree_d; /*the huffman tree for distance codes*/ HuffmanTree_init(&tree_ll); HuffmanTree_init(&tree_d); if(btype == 1) error = getTreeInflateFixed(&tree_ll, &tree_d); else /*if(btype == 2)*/ error = getTreeInflateDynamic(&tree_ll, &tree_d, reader); while(!error) /*decode all symbols until end reached, breaks at end code*/ { /*code_ll is literal, length or end code*/ unsigned code_ll; ensureBits25(reader, 20); /* up to 15 for the huffman symbol, up to 5 for the length extra bits */ code_ll = huffmanDecodeSymbol(reader, &tree_ll); if(code_ll <= 255) /*literal symbol*/ { if(!ucvector_resize(out, out->size + 1)) ERROR_BREAK(83 /*alloc fail*/); out->data[out->size - 1] = (unsigned char)code_ll; } else if(code_ll >= FIRST_LENGTH_CODE_INDEX && code_ll <= LAST_LENGTH_CODE_INDEX) /*length code*/ { unsigned code_d, distance; unsigned numextrabits_l, numextrabits_d; /*extra bits for length and distance*/ size_t start, backward, length; /*part 1: get length base*/ length = LENGTHBASE[code_ll - FIRST_LENGTH_CODE_INDEX]; /*part 2: get extra bits and add the value of that to length*/ numextrabits_l = LENGTHEXTRA[code_ll - FIRST_LENGTH_CODE_INDEX]; if(numextrabits_l != 0) { /* bits already ensured above */ length += readBits(reader, numextrabits_l); } /*part 3: get distance code*/ ensureBits32(reader, 28); /* up to 15 for the huffman symbol, up to 13 for the extra bits */ code_d = huffmanDecodeSymbol(reader, &tree_d); if(code_d > 29) { if(code_d <= 31) { ERROR_BREAK(18); /*error: invalid distance code (30-31 are never used)*/ } else /* if(code_d == INVALIDSYMBOL) */{ ERROR_BREAK(16); /*error: tried to read disallowed huffman symbol*/ } } distance = DISTANCEBASE[code_d]; /*part 4: get extra bits from distance*/ numextrabits_d = DISTANCEEXTRA[code_d]; if(numextrabits_d != 0) { /* bits already ensured above */ distance += readBits(reader, numextrabits_d); } /*part 5: fill in all the out[n] values based on the length and dist*/ start = out->size; if(distance > start) ERROR_BREAK(52); /*too long backward distance*/ backward = start - distance; if(!ucvector_resize(out, out->size + length)) ERROR_BREAK(83 /*alloc fail*/); if(distance < length) { size_t forward; lodepng_memcpy(out->data + start, out->data + backward, distance); start += distance; for(forward = distance; forward < length; ++forward) { out->data[start++] = out->data[backward++]; } } else { lodepng_memcpy(out->data + start, out->data + backward, length); } } else if(code_ll == 256) { break; /*end code, break the loop*/ } else /*if(code_ll == INVALIDSYMBOL)*/ { ERROR_BREAK(16); /*error: tried to read disallowed huffman symbol*/ } /*check if any of the ensureBits above went out of bounds*/ if(reader->bp > reader->bitsize) { /*return error code 10 or 11 depending on the situation that happened in huffmanDecodeSymbol (10=no endcode, 11=wrong jump outside of tree)*/ /* TODO: revise error codes 10,11,50: the above comment is no longer valid */ ERROR_BREAK(51); /*error, bit pointer jumps past memory*/ } if(max_output_size && out->size > max_output_size) { ERROR_BREAK(109); /*error, larger than max size*/ } } HuffmanTree_cleanup(&tree_ll); HuffmanTree_cleanup(&tree_d); return error; } static unsigned inflateNoCompression(ucvector* out, LodePNGBitReader* reader, const LodePNGDecompressSettings* settings) { size_t bytepos; size_t size = reader->size; unsigned LEN, NLEN, error = 0; /*go to first boundary of byte*/ bytepos = (reader->bp + 7u) >> 3u; /*read LEN (2 bytes) and NLEN (2 bytes)*/ if(bytepos + 4 >= size) return 52; /*error, bit pointer will jump past memory*/ LEN = (unsigned)reader->data[bytepos] + ((unsigned)reader->data[bytepos + 1] << 8u); bytepos += 2; NLEN = (unsigned)reader->data[bytepos] + ((unsigned)reader->data[bytepos + 1] << 8u); bytepos += 2; /*check if 16-bit NLEN is really the one's complement of LEN*/ if(!settings->ignore_nlen && LEN + NLEN != 65535) { return 21; /*error: NLEN is not one's complement of LEN*/ } if(!ucvector_resize(out, out->size + LEN)) return 83; /*alloc fail*/ /*read the literal data: LEN bytes are now stored in the out buffer*/ if(bytepos + LEN > size) return 23; /*error: reading outside of in buffer*/ lodepng_memcpy(out->data + out->size - LEN, reader->data + bytepos, LEN); bytepos += LEN; reader->bp = bytepos << 3u; return error; } static unsigned lodepng_inflatev(ucvector* out, const unsigned char* in, size_t insize, const LodePNGDecompressSettings* settings) { unsigned BFINAL = 0; LodePNGBitReader reader; unsigned error = LodePNGBitReader_init(&reader, in, insize); if(error) return error; while(!BFINAL) { unsigned BTYPE; if(!ensureBits9(&reader, 3)) return 52; /*error, bit pointer will jump past memory*/ BFINAL = readBits(&reader, 1); BTYPE = readBits(&reader, 2); if(BTYPE == 3) return 20; /*error: invalid BTYPE*/ else if(BTYPE == 0) error = inflateNoCompression(out, &reader, settings); /*no compression*/ else error = inflateHuffmanBlock(out, &reader, BTYPE, settings->max_output_size); /*compression, BTYPE 01 or 10*/ if(!error && settings->max_output_size && out->size > settings->max_output_size) error = 109; if(error) break; } return error; } unsigned lodepng_inflate(unsigned char** out, size_t* outsize, const unsigned char* in, size_t insize, const LodePNGDecompressSettings* settings) { ucvector v = ucvector_init(*out, *outsize); unsigned error = lodepng_inflatev(&v, in, insize, settings); *out = v.data; *outsize = v.size; return error; } static unsigned inflatev(ucvector* out, const unsigned char* in, size_t insize, const LodePNGDecompressSettings* settings) { if(settings->custom_inflate) { unsigned error = settings->custom_inflate(&out->data, &out->size, in, insize, settings); out->allocsize = out->size; if(error) { /*the custom inflate is allowed to have its own error codes, however, we translate it to code 110*/ error = 110; /*if there's a max output size, and the custom zlib returned error, then indicate that error instead*/ if(settings->max_output_size && out->size > settings->max_output_size) error = 109; } return error; } else { return lodepng_inflatev(out, in, insize, settings); } } #endif /*LODEPNG_COMPILE_DECODER*/ #ifdef LODEPNG_COMPILE_ENCODER /* ////////////////////////////////////////////////////////////////////////// */ /* / Deflator (Compressor) / */ /* ////////////////////////////////////////////////////////////////////////// */ static const size_t MAX_SUPPORTED_DEFLATE_LENGTH = 258; /*search the index in the array, that has the largest value smaller than or equal to the given value, given array must be sorted (if no value is smaller, it returns the size of the given array)*/ static size_t searchCodeIndex(const unsigned* array, size_t array_size, size_t value) { /*binary search (only small gain over linear). TODO: use CPU log2 instruction for getting symbols instead*/ size_t left = 1; size_t right = array_size - 1; while(left <= right) { size_t mid = (left + right) >> 1; if(array[mid] >= value) right = mid - 1; else left = mid + 1; } if(left >= array_size || array[left] > value) left--; return left; } static void addLengthDistance(uivector* values, size_t length, size_t distance) { /*values in encoded vector are those used by deflate: 0-255: literal bytes 256: end 257-285: length/distance pair (length code, followed by extra length bits, distance code, extra distance bits) 286-287: invalid*/ unsigned length_code = (unsigned)searchCodeIndex(LENGTHBASE, 29, length); unsigned extra_length = (unsigned)(length - LENGTHBASE[length_code]); unsigned dist_code = (unsigned)searchCodeIndex(DISTANCEBASE, 30, distance); unsigned extra_distance = (unsigned)(distance - DISTANCEBASE[dist_code]); size_t pos = values->size; /*TODO: return error when this fails (out of memory)*/ unsigned ok = uivector_resize(values, values->size + 4); if(ok) { values->data[pos + 0] = length_code + FIRST_LENGTH_CODE_INDEX; values->data[pos + 1] = extra_length; values->data[pos + 2] = dist_code; values->data[pos + 3] = extra_distance; } } /*3 bytes of data get encoded into two bytes. The hash cannot use more than 3 bytes as input because 3 is the minimum match length for deflate*/ static const unsigned HASH_NUM_VALUES = 65536; static const unsigned HASH_BIT_MASK = 65535; /*HASH_NUM_VALUES - 1, but C90 does not like that as initializer*/ typedef struct Hash { int* head; /*hash value to head circular pos - can be outdated if went around window*/ /*circular pos to prev circular pos*/ unsigned short* chain; int* val; /*circular pos to hash value*/ /*TODO: do this not only for zeros but for any repeated byte. However for PNG it's always going to be the zeros that dominate, so not important for PNG*/ int* headz; /*similar to head, but for chainz*/ unsigned short* chainz; /*those with same amount of zeros*/ unsigned short* zeros; /*length of zeros streak, used as a second hash chain*/ } Hash; static unsigned hash_init(Hash* hash, unsigned windowsize) { unsigned i; hash->head = (int*)lodepng_malloc(sizeof(int) * HASH_NUM_VALUES); hash->val = (int*)lodepng_malloc(sizeof(int) * windowsize); hash->chain = (unsigned short*)lodepng_malloc(sizeof(unsigned short) * windowsize); hash->zeros = (unsigned short*)lodepng_malloc(sizeof(unsigned short) * windowsize); hash->headz = (int*)lodepng_malloc(sizeof(int) * (MAX_SUPPORTED_DEFLATE_LENGTH + 1)); hash->chainz = (unsigned short*)lodepng_malloc(sizeof(unsigned short) * windowsize); if(!hash->head || !hash->chain || !hash->val || !hash->headz|| !hash->chainz || !hash->zeros) { return 83; /*alloc fail*/ } /*initialize hash table*/ for(i = 0; i != HASH_NUM_VALUES; ++i) hash->head[i] = -1; for(i = 0; i != windowsize; ++i) hash->val[i] = -1; for(i = 0; i != windowsize; ++i) hash->chain[i] = i; /*same value as index indicates uninitialized*/ for(i = 0; i <= MAX_SUPPORTED_DEFLATE_LENGTH; ++i) hash->headz[i] = -1; for(i = 0; i != windowsize; ++i) hash->chainz[i] = i; /*same value as index indicates uninitialized*/ return 0; } static void hash_cleanup(Hash* hash) { lodepng_free(hash->head); lodepng_free(hash->val); lodepng_free(hash->chain); lodepng_free(hash->zeros); lodepng_free(hash->headz); lodepng_free(hash->chainz); } static unsigned getHash(const unsigned char* data, size_t size, size_t pos) { unsigned result = 0; if(pos + 2 < size) { /*A simple shift and xor hash is used. Since the data of PNGs is dominated by zeroes due to the filters, a better hash does not have a significant effect on speed in traversing the chain, and causes more time spend on calculating the hash.*/ result ^= ((unsigned)data[pos + 0] << 0u); result ^= ((unsigned)data[pos + 1] << 4u); result ^= ((unsigned)data[pos + 2] << 8u); } else { size_t amount, i; if(pos >= size) return 0; amount = size - pos; for(i = 0; i != amount; ++i) result ^= ((unsigned)data[pos + i] << (i * 8u)); } return result & HASH_BIT_MASK; } static unsigned countZeros(const unsigned char* data, size_t size, size_t pos) { const unsigned char* start = data + pos; const unsigned char* end = start + MAX_SUPPORTED_DEFLATE_LENGTH; if(end > data + size) end = data + size; data = start; while(data != end && *data == 0) ++data; /*subtracting two addresses returned as 32-bit number (max value is MAX_SUPPORTED_DEFLATE_LENGTH)*/ return (unsigned)(data - start); } /*wpos = pos & (windowsize - 1)*/ static void updateHashChain(Hash* hash, size_t wpos, unsigned hashval, unsigned short numzeros) { hash->val[wpos] = (int)hashval; if(hash->head[hashval] != -1) hash->chain[wpos] = hash->head[hashval]; hash->head[hashval] = (int)wpos; hash->zeros[wpos] = numzeros; if(hash->headz[numzeros] != -1) hash->chainz[wpos] = hash->headz[numzeros]; hash->headz[numzeros] = (int)wpos; } /* LZ77-encode the data. Return value is error code. The input are raw bytes, the output is in the form of unsigned integers with codes representing for example literal bytes, or length/distance pairs. It uses a hash table technique to let it encode faster. When doing LZ77 encoding, a sliding window (of windowsize) is used, and all past bytes in that window can be used as the "dictionary". A brute force search through all possible distances would be slow, and this hash technique is one out of several ways to speed this up. */ static unsigned encodeLZ77(uivector* out, Hash* hash, const unsigned char* in, size_t inpos, size_t insize, unsigned windowsize, unsigned minmatch, unsigned nicematch, unsigned lazymatching) { size_t pos; unsigned i, error = 0; /*for large window lengths, assume the user wants no compression loss. Otherwise, max hash chain length speedup.*/ unsigned maxchainlength = windowsize >= 8192 ? windowsize : windowsize / 8u; unsigned maxlazymatch = windowsize >= 8192 ? MAX_SUPPORTED_DEFLATE_LENGTH : 64; unsigned usezeros = 1; /*not sure if setting it to false for windowsize < 8192 is better or worse*/ unsigned numzeros = 0; unsigned offset; /*the offset represents the distance in LZ77 terminology*/ unsigned length; unsigned lazy = 0; unsigned lazylength = 0, lazyoffset = 0; unsigned hashval; unsigned current_offset, current_length; unsigned prev_offset; const unsigned char *lastptr, *foreptr, *backptr; unsigned hashpos; if(windowsize == 0 || windowsize > 32768) return 60; /*error: windowsize smaller/larger than allowed*/ if((windowsize & (windowsize - 1)) != 0) return 90; /*error: must be power of two*/ if(nicematch > MAX_SUPPORTED_DEFLATE_LENGTH) nicematch = MAX_SUPPORTED_DEFLATE_LENGTH; for(pos = inpos; pos < insize; ++pos) { size_t wpos = pos & (windowsize - 1); /*position for in 'circular' hash buffers*/ unsigned chainlength = 0; hashval = getHash(in, insize, pos); if(usezeros && hashval == 0) { if(numzeros == 0) numzeros = countZeros(in, insize, pos); else if(pos + numzeros > insize || in[pos + numzeros - 1] != 0) --numzeros; } else { numzeros = 0; } updateHashChain(hash, wpos, hashval, numzeros); /*the length and offset found for the current position*/ length = 0; offset = 0; hashpos = hash->chain[wpos]; lastptr = &in[insize < pos + MAX_SUPPORTED_DEFLATE_LENGTH ? insize : pos + MAX_SUPPORTED_DEFLATE_LENGTH]; /*search for the longest string*/ prev_offset = 0; for(;;) { if(chainlength++ >= maxchainlength) break; current_offset = (unsigned)(hashpos <= wpos ? wpos - hashpos : wpos - hashpos + windowsize); if(current_offset < prev_offset) break; /*stop when went completely around the circular buffer*/ prev_offset = current_offset; if(current_offset > 0) { /*test the next characters*/ foreptr = &in[pos]; backptr = &in[pos - current_offset]; /*common case in PNGs is lots of zeros. Quickly skip over them as a speedup*/ if(numzeros >= 3) { unsigned skip = hash->zeros[hashpos]; if(skip > numzeros) skip = numzeros; backptr += skip; foreptr += skip; } while(foreptr != lastptr && *backptr == *foreptr) /*maximum supported length by deflate is max length*/ { ++backptr; ++foreptr; } current_length = (unsigned)(foreptr - &in[pos]); if(current_length > length) { length = current_length; /*the longest length*/ offset = current_offset; /*the offset that is related to this longest length*/ /*jump out once a length of max length is found (speed gain). This also jumps out if length is MAX_SUPPORTED_DEFLATE_LENGTH*/ if(current_length >= nicematch) break; } } if(hashpos == hash->chain[hashpos]) break; if(numzeros >= 3 && length > numzeros) { hashpos = hash->chainz[hashpos]; if(hash->zeros[hashpos] != numzeros) break; } else { hashpos = hash->chain[hashpos]; /*outdated hash value, happens if particular value was not encountered in whole last window*/ if(hash->val[hashpos] != (int)hashval) break; } } if(lazymatching) { if(!lazy && length >= 3 && length <= maxlazymatch && length < MAX_SUPPORTED_DEFLATE_LENGTH) { lazy = 1; lazylength = length; lazyoffset = offset; continue; /*try the next byte*/ } if(lazy) { lazy = 0; if(pos == 0) ERROR_BREAK(81); if(length > lazylength + 1) { /*push the previous character as literal*/ if(!uivector_push_back(out, in[pos - 1])) ERROR_BREAK(83 /*alloc fail*/); } else { length = lazylength; offset = lazyoffset; hash->head[hashval] = -1; /*the same hashchain update will be done, this ensures no wrong alteration*/ hash->headz[numzeros] = -1; /*idem*/ --pos; } } } if(length >= 3 && offset > windowsize) ERROR_BREAK(86 /*too big (or overflown negative) offset*/); /*encode it as length/distance pair or literal value*/ if(length < 3) /*only lengths of 3 or higher are supported as length/distance pair*/ { if(!uivector_push_back(out, in[pos])) ERROR_BREAK(83 /*alloc fail*/); } else if(length < minmatch || (length == 3 && offset > 4096)) { /*compensate for the fact that longer offsets have more extra bits, a length of only 3 may be not worth it then*/ if(!uivector_push_back(out, in[pos])) ERROR_BREAK(83 /*alloc fail*/); } else { addLengthDistance(out, length, offset); for(i = 1; i < length; ++i) { ++pos; wpos = pos & (windowsize - 1); hashval = getHash(in, insize, pos); if(usezeros && hashval == 0) { if(numzeros == 0) numzeros = countZeros(in, insize, pos); else if(pos + numzeros > insize || in[pos + numzeros - 1] != 0) --numzeros; } else { numzeros = 0; } updateHashChain(hash, wpos, hashval, numzeros); } } } /*end of the loop through each character of input*/ return error; } /* /////////////////////////////////////////////////////////////////////////// */ static unsigned deflateNoCompression(ucvector* out, const unsigned char* data, size_t datasize) { /*non compressed deflate block data: 1 bit BFINAL,2 bits BTYPE,(5 bits): it jumps to start of next byte, 2 bytes LEN, 2 bytes NLEN, LEN bytes literal DATA*/ size_t i, numdeflateblocks = (datasize + 65534u) / 65535u; unsigned datapos = 0; for(i = 0; i != numdeflateblocks; ++i) { unsigned BFINAL, BTYPE, LEN, NLEN; unsigned char firstbyte; size_t pos = out->size; BFINAL = (i == numdeflateblocks - 1); BTYPE = 0; LEN = 65535; if(datasize - datapos < 65535u) LEN = (unsigned)datasize - datapos; NLEN = 65535 - LEN; if(!ucvector_resize(out, out->size + LEN + 5)) return 83; /*alloc fail*/ firstbyte = (unsigned char)(BFINAL + ((BTYPE & 1u) << 1u) + ((BTYPE & 2u) << 1u)); out->data[pos + 0] = firstbyte; out->data[pos + 1] = (unsigned char)(LEN & 255); out->data[pos + 2] = (unsigned char)(LEN >> 8u); out->data[pos + 3] = (unsigned char)(NLEN & 255); out->data[pos + 4] = (unsigned char)(NLEN >> 8u); lodepng_memcpy(out->data + pos + 5, data + datapos, LEN); datapos += LEN; } return 0; } /* write the lz77-encoded data, which has lit, len and dist codes, to compressed stream using huffman trees. tree_ll: the tree for lit and len codes. tree_d: the tree for distance codes. */ static void writeLZ77data(LodePNGBitWriter* writer, const uivector* lz77_encoded, const HuffmanTree* tree_ll, const HuffmanTree* tree_d) { size_t i = 0; for(i = 0; i != lz77_encoded->size; ++i) { unsigned val = lz77_encoded->data[i]; writeBitsReversed(writer, tree_ll->codes[val], tree_ll->lengths[val]); if(val > 256) /*for a length code, 3 more things have to be added*/ { unsigned length_index = val - FIRST_LENGTH_CODE_INDEX; unsigned n_length_extra_bits = LENGTHEXTRA[length_index]; unsigned length_extra_bits = lz77_encoded->data[++i]; unsigned distance_code = lz77_encoded->data[++i]; unsigned distance_index = distance_code; unsigned n_distance_extra_bits = DISTANCEEXTRA[distance_index]; unsigned distance_extra_bits = lz77_encoded->data[++i]; writeBits(writer, length_extra_bits, n_length_extra_bits); writeBitsReversed(writer, tree_d->codes[distance_code], tree_d->lengths[distance_code]); writeBits(writer, distance_extra_bits, n_distance_extra_bits); } } } /*Deflate for a block of type "dynamic", that is, with freely, optimally, created huffman trees*/ static unsigned deflateDynamic(LodePNGBitWriter* writer, Hash* hash, const unsigned char* data, size_t datapos, size_t dataend, const LodePNGCompressSettings* settings, unsigned final) { unsigned error = 0; /* A block is compressed as follows: The PNG data is lz77 encoded, resulting in literal bytes and length/distance pairs. This is then huffman compressed with two huffman trees. One huffman tree is used for the lit and len values ("ll"), another huffman tree is used for the dist values ("d"). These two trees are stored using their code lengths, and to compress even more these code lengths are also run-length encoded and huffman compressed. This gives a huffman tree of code lengths "cl". The code lengths used to describe this third tree are the code length code lengths ("clcl"). */ /*The lz77 encoded data, represented with integers since there will also be length and distance codes in it*/ uivector lz77_encoded; HuffmanTree tree_ll; /*tree for lit,len values*/ HuffmanTree tree_d; /*tree for distance codes*/ HuffmanTree tree_cl; /*tree for encoding the code lengths representing tree_ll and tree_d*/ unsigned* frequencies_ll = 0; /*frequency of lit,len codes*/ unsigned* frequencies_d = 0; /*frequency of dist codes*/ unsigned* frequencies_cl = 0; /*frequency of code length codes*/ unsigned* bitlen_lld = 0; /*lit,len,dist code lengths (int bits), literally (without repeat codes).*/ unsigned* bitlen_lld_e = 0; /*bitlen_lld encoded with repeat codes (this is a rudimentary run length compression)*/ size_t datasize = dataend - datapos; /* If we could call "bitlen_cl" the the code length code lengths ("clcl"), that is the bit lengths of codes to represent tree_cl in CLCL_ORDER, then due to the huffman compression of huffman tree representations ("two levels"), there are some analogies: bitlen_lld is to tree_cl what data is to tree_ll and tree_d. bitlen_lld_e is to bitlen_lld what lz77_encoded is to data. bitlen_cl is to bitlen_lld_e what bitlen_lld is to lz77_encoded. */ unsigned BFINAL = final; size_t i; size_t numcodes_ll, numcodes_d, numcodes_lld, numcodes_lld_e, numcodes_cl; unsigned HLIT, HDIST, HCLEN; uivector_init(&lz77_encoded); HuffmanTree_init(&tree_ll); HuffmanTree_init(&tree_d); HuffmanTree_init(&tree_cl); /* could fit on stack, but >1KB is on the larger side so allocate instead */ frequencies_ll = (unsigned*)lodepng_malloc(286 * sizeof(*frequencies_ll)); frequencies_d = (unsigned*)lodepng_malloc(30 * sizeof(*frequencies_d)); frequencies_cl = (unsigned*)lodepng_malloc(NUM_CODE_LENGTH_CODES * sizeof(*frequencies_cl)); if(!frequencies_ll || !frequencies_d || !frequencies_cl) error = 83; /*alloc fail*/ /*This while loop never loops due to a break at the end, it is here to allow breaking out of it to the cleanup phase on error conditions.*/ while(!error) { lodepng_memset(frequencies_ll, 0, 286 * sizeof(*frequencies_ll)); lodepng_memset(frequencies_d, 0, 30 * sizeof(*frequencies_d)); lodepng_memset(frequencies_cl, 0, NUM_CODE_LENGTH_CODES * sizeof(*frequencies_cl)); if(settings->use_lz77) { error = encodeLZ77(&lz77_encoded, hash, data, datapos, dataend, settings->windowsize, settings->minmatch, settings->nicematch, settings->lazymatching); if(error) break; } else { if(!uivector_resize(&lz77_encoded, datasize)) ERROR_BREAK(83 /*alloc fail*/); for(i = datapos; i < dataend; ++i) lz77_encoded.data[i - datapos] = data[i]; /*no LZ77, but still will be Huffman compressed*/ } /*Count the frequencies of lit, len and dist codes*/ for(i = 0; i != lz77_encoded.size; ++i) { unsigned symbol = lz77_encoded.data[i]; ++frequencies_ll[symbol]; if(symbol > 256) { unsigned dist = lz77_encoded.data[i + 2]; ++frequencies_d[dist]; i += 3; } } frequencies_ll[256] = 1; /*there will be exactly 1 end code, at the end of the block*/ /*Make both huffman trees, one for the lit and len codes, one for the dist codes*/ error = HuffmanTree_makeFromFrequencies(&tree_ll, frequencies_ll, 257, 286, 15); if(error) break; /*2, not 1, is chosen for mincodes: some buggy PNG decoders require at least 2 symbols in the dist tree*/ error = HuffmanTree_makeFromFrequencies(&tree_d, frequencies_d, 2, 30, 15); if(error) break; numcodes_ll = LODEPNG_MIN(tree_ll.numcodes, 286); numcodes_d = LODEPNG_MIN(tree_d.numcodes, 30); /*store the code lengths of both generated trees in bitlen_lld*/ numcodes_lld = numcodes_ll + numcodes_d; bitlen_lld = (unsigned*)lodepng_malloc(numcodes_lld * sizeof(*bitlen_lld)); /*numcodes_lld_e never needs more size than bitlen_lld*/ bitlen_lld_e = (unsigned*)lodepng_malloc(numcodes_lld * sizeof(*bitlen_lld_e)); if(!bitlen_lld || !bitlen_lld_e) ERROR_BREAK(83); /*alloc fail*/ numcodes_lld_e = 0; for(i = 0; i != numcodes_ll; ++i) bitlen_lld[i] = tree_ll.lengths[i]; for(i = 0; i != numcodes_d; ++i) bitlen_lld[numcodes_ll + i] = tree_d.lengths[i]; /*run-length compress bitlen_ldd into bitlen_lld_e by using repeat codes 16 (copy length 3-6 times), 17 (3-10 zeroes), 18 (11-138 zeroes)*/ for(i = 0; i != numcodes_lld; ++i) { unsigned j = 0; /*amount of repetitions*/ while(i + j + 1 < numcodes_lld && bitlen_lld[i + j + 1] == bitlen_lld[i]) ++j; if(bitlen_lld[i] == 0 && j >= 2) /*repeat code for zeroes*/ { ++j; /*include the first zero*/ if(j <= 10) /*repeat code 17 supports max 10 zeroes*/ { bitlen_lld_e[numcodes_lld_e++] = 17; bitlen_lld_e[numcodes_lld_e++] = j - 3; } else /*repeat code 18 supports max 138 zeroes*/ { if(j > 138) j = 138; bitlen_lld_e[numcodes_lld_e++] = 18; bitlen_lld_e[numcodes_lld_e++] = j - 11; } i += (j - 1); } else if(j >= 3) /*repeat code for value other than zero*/ { size_t k; unsigned num = j / 6u, rest = j % 6u; bitlen_lld_e[numcodes_lld_e++] = bitlen_lld[i]; for(k = 0; k < num; ++k) { bitlen_lld_e[numcodes_lld_e++] = 16; bitlen_lld_e[numcodes_lld_e++] = 6 - 3; } if(rest >= 3) { bitlen_lld_e[numcodes_lld_e++] = 16; bitlen_lld_e[numcodes_lld_e++] = rest - 3; } else j -= rest; i += j; } else /*too short to benefit from repeat code*/ { bitlen_lld_e[numcodes_lld_e++] = bitlen_lld[i]; } } /*generate tree_cl, the huffmantree of huffmantrees*/ for(i = 0; i != numcodes_lld_e; ++i) { ++frequencies_cl[bitlen_lld_e[i]]; /*after a repeat code come the bits that specify the number of repetitions, those don't need to be in the frequencies_cl calculation*/ if(bitlen_lld_e[i] >= 16) ++i; } error = HuffmanTree_makeFromFrequencies(&tree_cl, frequencies_cl, NUM_CODE_LENGTH_CODES, NUM_CODE_LENGTH_CODES, 7); if(error) break; /*compute amount of code-length-code-lengths to output*/ numcodes_cl = NUM_CODE_LENGTH_CODES; /*trim zeros at the end (using CLCL_ORDER), but minimum size must be 4 (see HCLEN below)*/ while(numcodes_cl > 4u && tree_cl.lengths[CLCL_ORDER[numcodes_cl - 1u]] == 0) { numcodes_cl--; } /* Write everything into the output After the BFINAL and BTYPE, the dynamic block consists out of the following: - 5 bits HLIT, 5 bits HDIST, 4 bits HCLEN - (HCLEN+4)*3 bits code lengths of code length alphabet - HLIT + 257 code lengths of lit/length alphabet (encoded using the code length alphabet, + possible repetition codes 16, 17, 18) - HDIST + 1 code lengths of distance alphabet (encoded using the code length alphabet, + possible repetition codes 16, 17, 18) - compressed data - 256 (end code) */ /*Write block type*/ writeBits(writer, BFINAL, 1); writeBits(writer, 0, 1); /*first bit of BTYPE "dynamic"*/ writeBits(writer, 1, 1); /*second bit of BTYPE "dynamic"*/ /*write the HLIT, HDIST and HCLEN values*/ /*all three sizes take trimmed ending zeroes into account, done either by HuffmanTree_makeFromFrequencies or in the loop for numcodes_cl above, which saves space. */ HLIT = (unsigned)(numcodes_ll - 257); HDIST = (unsigned)(numcodes_d - 1); HCLEN = (unsigned)(numcodes_cl - 4); writeBits(writer, HLIT, 5); writeBits(writer, HDIST, 5); writeBits(writer, HCLEN, 4); /*write the code lengths of the code length alphabet ("bitlen_cl")*/ for(i = 0; i != numcodes_cl; ++i) writeBits(writer, tree_cl.lengths[CLCL_ORDER[i]], 3); /*write the lengths of the lit/len AND the dist alphabet*/ for(i = 0; i != numcodes_lld_e; ++i) { writeBitsReversed(writer, tree_cl.codes[bitlen_lld_e[i]], tree_cl.lengths[bitlen_lld_e[i]]); /*extra bits of repeat codes*/ if(bitlen_lld_e[i] == 16) writeBits(writer, bitlen_lld_e[++i], 2); else if(bitlen_lld_e[i] == 17) writeBits(writer, bitlen_lld_e[++i], 3); else if(bitlen_lld_e[i] == 18) writeBits(writer, bitlen_lld_e[++i], 7); } /*write the compressed data symbols*/ writeLZ77data(writer, &lz77_encoded, &tree_ll, &tree_d); /*error: the length of the end code 256 must be larger than 0*/ if(tree_ll.lengths[256] == 0) ERROR_BREAK(64); /*write the end code*/ writeBitsReversed(writer, tree_ll.codes[256], tree_ll.lengths[256]); break; /*end of error-while*/ } /*cleanup*/ uivector_cleanup(&lz77_encoded); HuffmanTree_cleanup(&tree_ll); HuffmanTree_cleanup(&tree_d); HuffmanTree_cleanup(&tree_cl); lodepng_free(frequencies_ll); lodepng_free(frequencies_d); lodepng_free(frequencies_cl); lodepng_free(bitlen_lld); lodepng_free(bitlen_lld_e); return error; } static unsigned deflateFixed(LodePNGBitWriter* writer, Hash* hash, const unsigned char* data, size_t datapos, size_t dataend, const LodePNGCompressSettings* settings, unsigned final) { HuffmanTree tree_ll; /*tree for literal values and length codes*/ HuffmanTree tree_d; /*tree for distance codes*/ unsigned BFINAL = final; unsigned error = 0; size_t i; HuffmanTree_init(&tree_ll); HuffmanTree_init(&tree_d); error = generateFixedLitLenTree(&tree_ll); if(!error) error = generateFixedDistanceTree(&tree_d); if(!error) { writeBits(writer, BFINAL, 1); writeBits(writer, 1, 1); /*first bit of BTYPE*/ writeBits(writer, 0, 1); /*second bit of BTYPE*/ if(settings->use_lz77) /*LZ77 encoded*/ { uivector lz77_encoded; uivector_init(&lz77_encoded); error = encodeLZ77(&lz77_encoded, hash, data, datapos, dataend, settings->windowsize, settings->minmatch, settings->nicematch, settings->lazymatching); if(!error) writeLZ77data(writer, &lz77_encoded, &tree_ll, &tree_d); uivector_cleanup(&lz77_encoded); } else /*no LZ77, but still will be Huffman compressed*/ { for(i = datapos; i < dataend; ++i) { writeBitsReversed(writer, tree_ll.codes[data[i]], tree_ll.lengths[data[i]]); } } /*add END code*/ if(!error) writeBitsReversed(writer,tree_ll.codes[256], tree_ll.lengths[256]); } /*cleanup*/ HuffmanTree_cleanup(&tree_ll); HuffmanTree_cleanup(&tree_d); return error; } static unsigned lodepng_deflatev(ucvector* out, const unsigned char* in, size_t insize, const LodePNGCompressSettings* settings) { unsigned error = 0; size_t i, blocksize, numdeflateblocks; Hash hash; LodePNGBitWriter writer; LodePNGBitWriter_init(&writer, out); if(settings->btype > 2) return 61; else if(settings->btype == 0) return deflateNoCompression(out, in, insize); else if(settings->btype == 1) blocksize = insize; else /*if(settings->btype == 2)*/ { /*on PNGs, deflate blocks of 65-262k seem to give most dense encoding*/ blocksize = insize / 8u + 8; if(blocksize < 65536) blocksize = 65536; if(blocksize > 262144) blocksize = 262144; } numdeflateblocks = (insize + blocksize - 1) / blocksize; if(numdeflateblocks == 0) numdeflateblocks = 1; error = hash_init(&hash, settings->windowsize); if(!error) { for(i = 0; i != numdeflateblocks && !error; ++i) { unsigned final = (i == numdeflateblocks - 1); size_t start = i * blocksize; size_t end = start + blocksize; if(end > insize) end = insize; if(settings->btype == 1) error = deflateFixed(&writer, &hash, in, start, end, settings, final); else if(settings->btype == 2) error = deflateDynamic(&writer, &hash, in, start, end, settings, final); } } hash_cleanup(&hash); return error; } unsigned lodepng_deflate(unsigned char** out, size_t* outsize, const unsigned char* in, size_t insize, const LodePNGCompressSettings* settings) { ucvector v = ucvector_init(*out, *outsize); unsigned error = lodepng_deflatev(&v, in, insize, settings); *out = v.data; *outsize = v.size; return error; } static unsigned deflate(unsigned char** out, size_t* outsize, const unsigned char* in, size_t insize, const LodePNGCompressSettings* settings) { if(settings->custom_deflate) { unsigned error = settings->custom_deflate(out, outsize, in, insize, settings); /*the custom deflate is allowed to have its own error codes, however, we translate it to code 111*/ return error ? 111 : 0; } else { return lodepng_deflate(out, outsize, in, insize, settings); } } #endif /*LODEPNG_COMPILE_DECODER*/ /* ////////////////////////////////////////////////////////////////////////// */ /* / Adler32 / */ /* ////////////////////////////////////////////////////////////////////////// */ static unsigned update_adler32(unsigned adler, const unsigned char* data, unsigned len) { unsigned s1 = adler & 0xffffu; unsigned s2 = (adler >> 16u) & 0xffffu; while(len != 0u) { unsigned i; /*at least 5552 sums can be done before the sums overflow, saving a lot of module divisions*/ unsigned amount = len > 5552u ? 5552u : len; len -= amount; for(i = 0; i != amount; ++i) { s1 += (*data++); s2 += s1; } s1 %= 65521u; s2 %= 65521u; } return (s2 << 16u) | s1; } /*Return the adler32 of the bytes data[0..len-1]*/ static unsigned adler32(const unsigned char* data, unsigned len) { return update_adler32(1u, data, len); } /* ////////////////////////////////////////////////////////////////////////// */ /* / Zlib / */ /* ////////////////////////////////////////////////////////////////////////// */ #ifdef LODEPNG_COMPILE_DECODER static unsigned lodepng_zlib_decompressv(ucvector* out, const unsigned char* in, size_t insize, const LodePNGDecompressSettings* settings) { unsigned error = 0; unsigned CM, CINFO, FDICT; if(insize < 2) return 53; /*error, size of zlib data too small*/ /*read information from zlib header*/ if((in[0] * 256 + in[1]) % 31 != 0) { /*error: 256 * in[0] + in[1] must be a multiple of 31, the FCHECK value is supposed to be made that way*/ return 24; } CM = in[0] & 15; CINFO = (in[0] >> 4) & 15; /*FCHECK = in[1] & 31;*/ /*FCHECK is already tested above*/ FDICT = (in[1] >> 5) & 1; /*FLEVEL = (in[1] >> 6) & 3;*/ /*FLEVEL is not used here*/ if(CM != 8 || CINFO > 7) { /*error: only compression method 8: inflate with sliding window of 32k is supported by the PNG spec*/ return 25; } if(FDICT != 0) { /*error: the specification of PNG says about the zlib stream: "The additional flags shall not specify a preset dictionary."*/ return 26; } error = inflatev(out, in + 2, insize - 2, settings); if(error) return error; if(!settings->ignore_adler32) { unsigned ADLER32 = lodepng_read32bitInt(&in[insize - 4]); unsigned checksum = adler32(out->data, (unsigned)(out->size)); if(checksum != ADLER32) return 58; /*error, adler checksum not correct, data must be corrupted*/ } return 0; /*no error*/ } unsigned lodepng_zlib_decompress(unsigned char** out, size_t* outsize, const unsigned char* in, size_t insize, const LodePNGDecompressSettings* settings) { ucvector v = ucvector_init(*out, *outsize); unsigned error = lodepng_zlib_decompressv(&v, in, insize, settings); *out = v.data; *outsize = v.size; return error; } /*expected_size is expected output size, to avoid intermediate allocations. Set to 0 if not known. */ static unsigned zlib_decompress(unsigned char** out, size_t* outsize, size_t expected_size, const unsigned char* in, size_t insize, const LodePNGDecompressSettings* settings) { unsigned error; if(settings->custom_zlib) { error = settings->custom_zlib(out, outsize, in, insize, settings); if(error) { /*the custom zlib is allowed to have its own error codes, however, we translate it to code 110*/ error = 110; /*if there's a max output size, and the custom zlib returned error, then indicate that error instead*/ if(settings->max_output_size && *outsize > settings->max_output_size) error = 109; } } else { ucvector v = ucvector_init(*out, *outsize); if(expected_size) { /*reserve the memory to avoid intermediate reallocations*/ ucvector_resize(&v, *outsize + expected_size); v.size = *outsize; } error = lodepng_zlib_decompressv(&v, in, insize, settings); *out = v.data; *outsize = v.size; } return error; } #endif /*LODEPNG_COMPILE_DECODER*/ #ifdef LODEPNG_COMPILE_ENCODER unsigned lodepng_zlib_compress(unsigned char** out, size_t* outsize, const unsigned char* in, size_t insize, const LodePNGCompressSettings* settings) { size_t i; unsigned error; unsigned char* deflatedata = 0; size_t deflatesize = 0; error = deflate(&deflatedata, &deflatesize, in, insize, settings); *out = NULL; *outsize = 0; if(!error) { *outsize = deflatesize + 6; *out = (unsigned char*)lodepng_malloc(*outsize); if(!*out) error = 83; /*alloc fail*/ } if(!error) { unsigned ADLER32 = adler32(in, (unsigned)insize); /*zlib data: 1 byte CMF (CM+CINFO), 1 byte FLG, deflate data, 4 byte ADLER32 checksum of the Decompressed data*/ unsigned CMF = 120; /*0b01111000: CM 8, CINFO 7. With CINFO 7, any window size up to 32768 can be used.*/ unsigned FLEVEL = 0; unsigned FDICT = 0; unsigned CMFFLG = 256 * CMF + FDICT * 32 + FLEVEL * 64; unsigned FCHECK = 31 - CMFFLG % 31; CMFFLG += FCHECK; (*out)[0] = (unsigned char)(CMFFLG >> 8); (*out)[1] = (unsigned char)(CMFFLG & 255); for(i = 0; i != deflatesize; ++i) (*out)[i + 2] = deflatedata[i]; lodepng_set32bitInt(&(*out)[*outsize - 4], ADLER32); } lodepng_free(deflatedata); return error; } /* compress using the default or custom zlib function */ static unsigned zlib_compress(unsigned char** out, size_t* outsize, const unsigned char* in, size_t insize, const LodePNGCompressSettings* settings) { if(settings->custom_zlib) { unsigned error = settings->custom_zlib(out, outsize, in, insize, settings); /*the custom zlib is allowed to have its own error codes, however, we translate it to code 111*/ return error ? 111 : 0; } else { return lodepng_zlib_compress(out, outsize, in, insize, settings); } } #endif /*LODEPNG_COMPILE_ENCODER*/ #else /*no LODEPNG_COMPILE_ZLIB*/ #ifdef LODEPNG_COMPILE_DECODER static unsigned zlib_decompress(unsigned char** out, size_t* outsize, size_t expected_size, const unsigned char* in, size_t insize, const LodePNGDecompressSettings* settings) { if(!settings->custom_zlib) return 87; /*no custom zlib function provided */ (void)expected_size; return settings->custom_zlib(out, outsize, in, insize, settings); } #endif /*LODEPNG_COMPILE_DECODER*/ #ifdef LODEPNG_COMPILE_ENCODER static unsigned zlib_compress(unsigned char** out, size_t* outsize, const unsigned char* in, size_t insize, const LodePNGCompressSettings* settings) { if(!settings->custom_zlib) return 87; /*no custom zlib function provided */ return settings->custom_zlib(out, outsize, in, insize, settings); } #endif /*LODEPNG_COMPILE_ENCODER*/ #endif /*LODEPNG_COMPILE_ZLIB*/ /* ////////////////////////////////////////////////////////////////////////// */ #ifdef LODEPNG_COMPILE_ENCODER /*this is a good tradeoff between speed and compression ratio*/ #define DEFAULT_WINDOWSIZE 2048 void lodepng_compress_settings_init(LodePNGCompressSettings* settings) { /*compress with dynamic huffman tree (not in the mathematical sense, just not the predefined one)*/ settings->btype = 2; settings->use_lz77 = 1; settings->windowsize = DEFAULT_WINDOWSIZE; settings->minmatch = 3; settings->nicematch = 128; settings->lazymatching = 1; settings->custom_zlib = 0; settings->custom_deflate = 0; settings->custom_context = 0; } const LodePNGCompressSettings lodepng_default_compress_settings = {2, 1, DEFAULT_WINDOWSIZE, 3, 128, 1, 0, 0, 0}; #endif /*LODEPNG_COMPILE_ENCODER*/ #ifdef LODEPNG_COMPILE_DECODER void lodepng_decompress_settings_init(LodePNGDecompressSettings* settings) { settings->ignore_adler32 = 0; settings->ignore_nlen = 0; settings->max_output_size = 0; settings->custom_zlib = 0; settings->custom_inflate = 0; settings->custom_context = 0; } const LodePNGDecompressSettings lodepng_default_decompress_settings = {0, 0, 0, 0, 0, 0}; #endif /*LODEPNG_COMPILE_DECODER*/ /* ////////////////////////////////////////////////////////////////////////// */ /* ////////////////////////////////////////////////////////////////////////// */ /* // End of Zlib related code. Begin of PNG related code. // */ /* ////////////////////////////////////////////////////////////////////////// */ /* ////////////////////////////////////////////////////////////////////////// */ #ifdef LODEPNG_COMPILE_PNG /* ////////////////////////////////////////////////////////////////////////// */ /* / CRC32 / */ /* ////////////////////////////////////////////////////////////////////////// */ #ifndef LODEPNG_NO_COMPILE_CRC /* CRC polynomial: 0xedb88320 */ static unsigned lodepng_crc32_table[256] = { 0u, 1996959894u, 3993919788u, 2567524794u, 124634137u, 1886057615u, 3915621685u, 2657392035u, 249268274u, 2044508324u, 3772115230u, 2547177864u, 162941995u, 2125561021u, 3887607047u, 2428444049u, 498536548u, 1789927666u, 4089016648u, 2227061214u, 450548861u, 1843258603u, 4107580753u, 2211677639u, 325883990u, 1684777152u, 4251122042u, 2321926636u, 335633487u, 1661365465u, 4195302755u, 2366115317u, 997073096u, 1281953886u, 3579855332u, 2724688242u, 1006888145u, 1258607687u, 3524101629u, 2768942443u, 901097722u, 1119000684u, 3686517206u, 2898065728u, 853044451u, 1172266101u, 3705015759u, 2882616665u, 651767980u, 1373503546u, 3369554304u, 3218104598u, 565507253u, 1454621731u, 3485111705u, 3099436303u, 671266974u, 1594198024u, 3322730930u, 2970347812u, 795835527u, 1483230225u, 3244367275u, 3060149565u, 1994146192u, 31158534u, 2563907772u, 4023717930u, 1907459465u, 112637215u, 2680153253u, 3904427059u, 2013776290u, 251722036u, 2517215374u, 3775830040u, 2137656763u, 141376813u, 2439277719u, 3865271297u, 1802195444u, 476864866u, 2238001368u, 4066508878u, 1812370925u, 453092731u, 2181625025u, 4111451223u, 1706088902u, 314042704u, 2344532202u, 4240017532u, 1658658271u, 366619977u, 2362670323u, 4224994405u, 1303535960u, 984961486u, 2747007092u, 3569037538u, 1256170817u, 1037604311u, 2765210733u, 3554079995u, 1131014506u, 879679996u, 2909243462u, 3663771856u, 1141124467u, 855842277u, 2852801631u, 3708648649u, 1342533948u, 654459306u, 3188396048u, 3373015174u, 1466479909u, 544179635u, 3110523913u, 3462522015u, 1591671054u, 702138776u, 2966460450u, 3352799412u, 1504918807u, 783551873u, 3082640443u, 3233442989u, 3988292384u, 2596254646u, 62317068u, 1957810842u, 3939845945u, 2647816111u, 81470997u, 1943803523u, 3814918930u, 2489596804u, 225274430u, 2053790376u, 3826175755u, 2466906013u, 167816743u, 2097651377u, 4027552580u, 2265490386u, 503444072u, 1762050814u, 4150417245u, 2154129355u, 426522225u, 1852507879u, 4275313526u, 2312317920u, 282753626u, 1742555852u, 4189708143u, 2394877945u, 397917763u, 1622183637u, 3604390888u, 2714866558u, 953729732u, 1340076626u, 3518719985u, 2797360999u, 1068828381u, 1219638859u, 3624741850u, 2936675148u, 906185462u, 1090812512u, 3747672003u, 2825379669u, 829329135u, 1181335161u, 3412177804u, 3160834842u, 628085408u, 1382605366u, 3423369109u, 3138078467u, 570562233u, 1426400815u, 3317316542u, 2998733608u, 733239954u, 1555261956u, 3268935591u, 3050360625u, 752459403u, 1541320221u, 2607071920u, 3965973030u, 1969922972u, 40735498u, 2617837225u, 3943577151u, 1913087877u, 83908371u, 2512341634u, 3803740692u, 2075208622u, 213261112u, 2463272603u, 3855990285u, 2094854071u, 198958881u, 2262029012u, 4057260610u, 1759359992u, 534414190u, 2176718541u, 4139329115u, 1873836001u, 414664567u, 2282248934u, 4279200368u, 1711684554u, 285281116u, 2405801727u, 4167216745u, 1634467795u, 376229701u, 2685067896u, 3608007406u, 1308918612u, 956543938u, 2808555105u, 3495958263u, 1231636301u, 1047427035u, 2932959818u, 3654703836u, 1088359270u, 936918000u, 2847714899u, 3736837829u, 1202900863u, 817233897u, 3183342108u, 3401237130u, 1404277552u, 615818150u, 3134207493u, 3453421203u, 1423857449u, 601450431u, 3009837614u, 3294710456u, 1567103746u, 711928724u, 3020668471u, 3272380065u, 1510334235u, 755167117u }; /*Return the CRC of the bytes buf[0..len-1].*/ unsigned lodepng_crc32(const unsigned char* data, size_t length) { unsigned r = 0xffffffffu; size_t i; for(i = 0; i < length; ++i) { r = lodepng_crc32_table[(r ^ data[i]) & 0xffu] ^ (r >> 8u); } return r ^ 0xffffffffu; } #else /* !LODEPNG_NO_COMPILE_CRC */ unsigned lodepng_crc32(const unsigned char* data, size_t length); #endif /* !LODEPNG_NO_COMPILE_CRC */ /* ////////////////////////////////////////////////////////////////////////// */ /* / Reading and writing PNG color channel bits / */ /* ////////////////////////////////////////////////////////////////////////// */ /* The color channel bits of less-than-8-bit pixels are read with the MSB of bytes first, so LodePNGBitWriter and LodePNGBitReader can't be used for those. */ static unsigned char readBitFromReversedStream(size_t* bitpointer, const unsigned char* bitstream) { unsigned char result = (unsigned char)((bitstream[(*bitpointer) >> 3] >> (7 - ((*bitpointer) & 0x7))) & 1); ++(*bitpointer); return result; } /* TODO: make this faster */ static unsigned readBitsFromReversedStream(size_t* bitpointer, const unsigned char* bitstream, size_t nbits) { unsigned result = 0; size_t i; for(i = 0 ; i < nbits; ++i) { result <<= 1u; result |= (unsigned)readBitFromReversedStream(bitpointer, bitstream); } return result; } static void setBitOfReversedStream(size_t* bitpointer, unsigned char* bitstream, unsigned char bit) { /*the current bit in bitstream may be 0 or 1 for this to work*/ if(bit == 0) bitstream[(*bitpointer) >> 3u] &= (unsigned char)(~(1u << (7u - ((*bitpointer) & 7u)))); else bitstream[(*bitpointer) >> 3u] |= (1u << (7u - ((*bitpointer) & 7u))); ++(*bitpointer); } /* ////////////////////////////////////////////////////////////////////////// */ /* / PNG chunks / */ /* ////////////////////////////////////////////////////////////////////////// */ unsigned lodepng_chunk_length(const unsigned char* chunk) { return lodepng_read32bitInt(&chunk[0]); } void lodepng_chunk_type(char type[5], const unsigned char* chunk) { unsigned i; for(i = 0; i != 4; ++i) type[i] = (char)chunk[4 + i]; type[4] = 0; /*null termination char*/ } unsigned char lodepng_chunk_type_equals(const unsigned char* chunk, const char* type) { if(lodepng_strlen(type) != 4) return 0; return (chunk[4] == type[0] && chunk[5] == type[1] && chunk[6] == type[2] && chunk[7] == type[3]); } unsigned char lodepng_chunk_ancillary(const unsigned char* chunk) { return((chunk[4] & 32) != 0); } unsigned char lodepng_chunk_private(const unsigned char* chunk) { return((chunk[6] & 32) != 0); } unsigned char lodepng_chunk_safetocopy(const unsigned char* chunk) { return((chunk[7] & 32) != 0); } unsigned char* lodepng_chunk_data(unsigned char* chunk) { return &chunk[8]; } const unsigned char* lodepng_chunk_data_const(const unsigned char* chunk) { return &chunk[8]; } unsigned lodepng_chunk_check_crc(const unsigned char* chunk) { unsigned length = lodepng_chunk_length(chunk); unsigned CRC = lodepng_read32bitInt(&chunk[length + 8]); /*the CRC is taken of the data and the 4 chunk type letters, not the length*/ unsigned checksum = lodepng_crc32(&chunk[4], length + 4); if(CRC != checksum) return 1; else return 0; } void lodepng_chunk_generate_crc(unsigned char* chunk) { unsigned length = lodepng_chunk_length(chunk); unsigned CRC = lodepng_crc32(&chunk[4], length + 4); lodepng_set32bitInt(chunk + 8 + length, CRC); } unsigned char* lodepng_chunk_next(unsigned char* chunk, unsigned char* end) { if(chunk >= end || end - chunk < 12) return end; /*too small to contain a chunk*/ if(chunk[0] == 0x89 && chunk[1] == 0x50 && chunk[2] == 0x4e && chunk[3] == 0x47 && chunk[4] == 0x0d && chunk[5] == 0x0a && chunk[6] == 0x1a && chunk[7] == 0x0a) { /* Is PNG magic header at start of PNG file. Jump to first actual chunk. */ return chunk + 8; } else { size_t total_chunk_length; unsigned char* result; if(lodepng_addofl(lodepng_chunk_length(chunk), 12, &total_chunk_length)) return end; result = chunk + total_chunk_length; if(result < chunk) return end; /*pointer overflow*/ return result; } } const unsigned char* lodepng_chunk_next_const(const unsigned char* chunk, const unsigned char* end) { if(chunk >= end || end - chunk < 12) return end; /*too small to contain a chunk*/ if(chunk[0] == 0x89 && chunk[1] == 0x50 && chunk[2] == 0x4e && chunk[3] == 0x47 && chunk[4] == 0x0d && chunk[5] == 0x0a && chunk[6] == 0x1a && chunk[7] == 0x0a) { /* Is PNG magic header at start of PNG file. Jump to first actual chunk. */ return chunk + 8; } else { size_t total_chunk_length; const unsigned char* result; if(lodepng_addofl(lodepng_chunk_length(chunk), 12, &total_chunk_length)) return end; result = chunk + total_chunk_length; if(result < chunk) return end; /*pointer overflow*/ return result; } } unsigned char* lodepng_chunk_find(unsigned char* chunk, unsigned char* end, const char type[5]) { for(;;) { if(chunk >= end || end - chunk < 12) return 0; /* past file end: chunk + 12 > end */ if(lodepng_chunk_type_equals(chunk, type)) return chunk; chunk = lodepng_chunk_next(chunk, end); } } const unsigned char* lodepng_chunk_find_const(const unsigned char* chunk, const unsigned char* end, const char type[5]) { for(;;) { if(chunk >= end || end - chunk < 12) return 0; /* past file end: chunk + 12 > end */ if(lodepng_chunk_type_equals(chunk, type)) return chunk; chunk = lodepng_chunk_next_const(chunk, end); } } unsigned lodepng_chunk_append(unsigned char** out, size_t* outsize, const unsigned char* chunk) { unsigned i; size_t total_chunk_length, new_length; unsigned char *chunk_start, *new_buffer; if(lodepng_addofl(lodepng_chunk_length(chunk), 12, &total_chunk_length)) return 77; if(lodepng_addofl(*outsize, total_chunk_length, &new_length)) return 77; new_buffer = (unsigned char*)lodepng_realloc(*out, new_length); if(!new_buffer) return 83; /*alloc fail*/ (*out) = new_buffer; (*outsize) = new_length; chunk_start = &(*out)[new_length - total_chunk_length]; for(i = 0; i != total_chunk_length; ++i) chunk_start[i] = chunk[i]; return 0; } /*Sets length and name and allocates the space for data and crc but does not set data or crc yet. Returns the start of the chunk in chunk. The start of the data is at chunk + 8. To finalize chunk, add the data, then use lodepng_chunk_generate_crc */ static unsigned lodepng_chunk_init(unsigned char** chunk, ucvector* out, unsigned length, const char* type) { size_t new_length = out->size; if(lodepng_addofl(new_length, length, &new_length)) return 77; if(lodepng_addofl(new_length, 12, &new_length)) return 77; if(!ucvector_resize(out, new_length)) return 83; /*alloc fail*/ *chunk = out->data + new_length - length - 12u; /*1: length*/ lodepng_set32bitInt(*chunk, length); /*2: chunk name (4 letters)*/ lodepng_memcpy(*chunk + 4, type, 4); return 0; } /* like lodepng_chunk_create but with custom allocsize */ static unsigned lodepng_chunk_createv(ucvector* out, unsigned length, const char* type, const unsigned char* data) { unsigned char* chunk; CERROR_TRY_RETURN(lodepng_chunk_init(&chunk, out, length, type)); /*3: the data*/ lodepng_memcpy(chunk + 8, data, length); /*4: CRC (of the chunkname characters and the data)*/ lodepng_chunk_generate_crc(chunk); return 0; } unsigned lodepng_chunk_create(unsigned char** out, size_t* outsize, unsigned length, const char* type, const unsigned char* data) { ucvector v = ucvector_init(*out, *outsize); unsigned error = lodepng_chunk_createv(&v, length, type, data); *out = v.data; *outsize = v.size; return error; } /* ////////////////////////////////////////////////////////////////////////// */ /* / Color types, channels, bits / */ /* ////////////////////////////////////////////////////////////////////////// */ /*checks if the colortype is valid and the bitdepth bd is allowed for this colortype. Return value is a LodePNG error code.*/ static unsigned checkColorValidity(LodePNGColorType colortype, unsigned bd) { switch(colortype) { case LCT_GREY: if(!(bd == 1 || bd == 2 || bd == 4 || bd == 8 || bd == 16)) return 37; break; case LCT_RGB: if(!( bd == 8 || bd == 16)) return 37; break; case LCT_PALETTE: if(!(bd == 1 || bd == 2 || bd == 4 || bd == 8 )) return 37; break; case LCT_GREY_ALPHA: if(!( bd == 8 || bd == 16)) return 37; break; case LCT_RGBA: if(!( bd == 8 || bd == 16)) return 37; break; case LCT_MAX_OCTET_VALUE: return 31; /* invalid color type */ default: return 31; /* invalid color type */ } return 0; /*allowed color type / bits combination*/ } static unsigned getNumColorChannels(LodePNGColorType colortype) { switch(colortype) { case LCT_GREY: return 1; case LCT_RGB: return 3; case LCT_PALETTE: return 1; case LCT_GREY_ALPHA: return 2; case LCT_RGBA: return 4; case LCT_MAX_OCTET_VALUE: return 0; /* invalid color type */ default: return 0; /*invalid color type*/ } } static unsigned lodepng_get_bpp_lct(LodePNGColorType colortype, unsigned bitdepth) { /*bits per pixel is amount of channels * bits per channel*/ return getNumColorChannels(colortype) * bitdepth; } /* ////////////////////////////////////////////////////////////////////////// */ void lodepng_color_mode_init(LodePNGColorMode* info) { info->key_defined = 0; info->key_r = info->key_g = info->key_b = 0; info->colortype = LCT_RGBA; info->bitdepth = 8; info->palette = 0; info->palettesize = 0; } /*allocates palette memory if needed, and initializes all colors to black*/ static void lodepng_color_mode_alloc_palette(LodePNGColorMode* info) { size_t i; /*if the palette is already allocated, it will have size 1024 so no reallocation needed in that case*/ /*the palette must have room for up to 256 colors with 4 bytes each.*/ if(!info->palette) info->palette = (unsigned char*)lodepng_malloc(1024); if(!info->palette) return; /*alloc fail*/ for(i = 0; i != 256; ++i) { /*Initialize all unused colors with black, the value used for invalid palette indices. This is an error according to the PNG spec, but common PNG decoders make it black instead. That makes color conversion slightly faster due to no error handling needed.*/ info->palette[i * 4 + 0] = 0; info->palette[i * 4 + 1] = 0; info->palette[i * 4 + 2] = 0; info->palette[i * 4 + 3] = 255; } } void lodepng_color_mode_cleanup(LodePNGColorMode* info) { lodepng_palette_clear(info); } unsigned lodepng_color_mode_copy(LodePNGColorMode* dest, const LodePNGColorMode* source) { lodepng_color_mode_cleanup(dest); lodepng_memcpy(dest, source, sizeof(LodePNGColorMode)); if(source->palette) { dest->palette = (unsigned char*)lodepng_malloc(1024); if(!dest->palette && source->palettesize) return 83; /*alloc fail*/ lodepng_memcpy(dest->palette, source->palette, source->palettesize * 4); } return 0; } LodePNGColorMode lodepng_color_mode_make(LodePNGColorType colortype, unsigned bitdepth) { LodePNGColorMode result; lodepng_color_mode_init(&result); result.colortype = colortype; result.bitdepth = bitdepth; return result; } static int lodepng_color_mode_equal(const LodePNGColorMode* a, const LodePNGColorMode* b) { size_t i; if(a->colortype != b->colortype) return 0; if(a->bitdepth != b->bitdepth) return 0; if(a->key_defined != b->key_defined) return 0; if(a->key_defined) { if(a->key_r != b->key_r) return 0; if(a->key_g != b->key_g) return 0; if(a->key_b != b->key_b) return 0; } if(a->palettesize != b->palettesize) return 0; for(i = 0; i != a->palettesize * 4; ++i) { if(a->palette[i] != b->palette[i]) return 0; } return 1; } void lodepng_palette_clear(LodePNGColorMode* info) { if(info->palette) lodepng_free(info->palette); info->palette = 0; info->palettesize = 0; } unsigned lodepng_palette_add(LodePNGColorMode* info, unsigned char r, unsigned char g, unsigned char b, unsigned char a) { if(!info->palette) /*allocate palette if empty*/ { lodepng_color_mode_alloc_palette(info); if(!info->palette) return 83; /*alloc fail*/ } if(info->palettesize >= 256) { return 108; /*too many palette values*/ } info->palette[4 * info->palettesize + 0] = r; info->palette[4 * info->palettesize + 1] = g; info->palette[4 * info->palettesize + 2] = b; info->palette[4 * info->palettesize + 3] = a; ++info->palettesize; return 0; } /*calculate bits per pixel out of colortype and bitdepth*/ unsigned lodepng_get_bpp(const LodePNGColorMode* info) { return lodepng_get_bpp_lct(info->colortype, info->bitdepth); } unsigned lodepng_get_channels(const LodePNGColorMode* info) { return getNumColorChannels(info->colortype); } unsigned lodepng_is_greyscale_type(const LodePNGColorMode* info) { return info->colortype == LCT_GREY || info->colortype == LCT_GREY_ALPHA; } unsigned lodepng_is_alpha_type(const LodePNGColorMode* info) { return (info->colortype & 4) != 0; /*4 or 6*/ } unsigned lodepng_is_palette_type(const LodePNGColorMode* info) { return info->colortype == LCT_PALETTE; } unsigned lodepng_has_palette_alpha(const LodePNGColorMode* info) { size_t i; for(i = 0; i != info->palettesize; ++i) { if(info->palette[i * 4 + 3] < 255) return 1; } return 0; } unsigned lodepng_can_have_alpha(const LodePNGColorMode* info) { return info->key_defined || lodepng_is_alpha_type(info) || lodepng_has_palette_alpha(info); } static size_t lodepng_get_raw_size_lct(unsigned w, unsigned h, LodePNGColorType colortype, unsigned bitdepth) { size_t bpp = lodepng_get_bpp_lct(colortype, bitdepth); size_t n = (size_t)w * (size_t)h; return ((n / 8u) * bpp) + ((n & 7u) * bpp + 7u) / 8u; } size_t lodepng_get_raw_size(unsigned w, unsigned h, const LodePNGColorMode* color) { return lodepng_get_raw_size_lct(w, h, color->colortype, color->bitdepth); } #ifdef LODEPNG_COMPILE_PNG /*in an idat chunk, each scanline is a multiple of 8 bits, unlike the lodepng output buffer, and in addition has one extra byte per line: the filter byte. So this gives a larger result than lodepng_get_raw_size. Set h to 1 to get the size of 1 row including filter byte. */ static size_t lodepng_get_raw_size_idat(unsigned w, unsigned h, unsigned bpp) { /* + 1 for the filter byte, and possibly plus padding bits per line. */ /* Ignoring casts, the expression is equal to (w * bpp + 7) / 8 + 1, but avoids overflow of w * bpp */ size_t line = ((size_t)(w / 8u) * bpp) + 1u + ((w & 7u) * bpp + 7u) / 8u; return (size_t)h * line; } #ifdef LODEPNG_COMPILE_DECODER /*Safely checks whether size_t overflow can be caused due to amount of pixels. This check is overcautious rather than precise. If this check indicates no overflow, you can safely compute in a size_t (but not an unsigned): -(size_t)w * (size_t)h * 8 -amount of bytes in IDAT (including filter, padding and Adam7 bytes) -amount of bytes in raw color model Returns 1 if overflow possible, 0 if not. */ static int lodepng_pixel_overflow(unsigned w, unsigned h, const LodePNGColorMode* pngcolor, const LodePNGColorMode* rawcolor) { size_t bpp = LODEPNG_MAX(lodepng_get_bpp(pngcolor), lodepng_get_bpp(rawcolor)); size_t numpixels, total; size_t line; /* bytes per line in worst case */ if(lodepng_mulofl((size_t)w, (size_t)h, &numpixels)) return 1; if(lodepng_mulofl(numpixels, 8, &total)) return 1; /* bit pointer with 8-bit color, or 8 bytes per channel color */ /* Bytes per scanline with the expression "(w / 8u) * bpp) + ((w & 7u) * bpp + 7u) / 8u" */ if(lodepng_mulofl((size_t)(w / 8u), bpp, &line)) return 1; if(lodepng_addofl(line, ((w & 7u) * bpp + 7u) / 8u, &line)) return 1; if(lodepng_addofl(line, 5, &line)) return 1; /* 5 bytes overhead per line: 1 filterbyte, 4 for Adam7 worst case */ if(lodepng_mulofl(line, h, &total)) return 1; /* Total bytes in worst case */ return 0; /* no overflow */ } #endif /*LODEPNG_COMPILE_DECODER*/ #endif /*LODEPNG_COMPILE_PNG*/ #ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS static void LodePNGUnknownChunks_init(LodePNGInfo* info) { unsigned i; for(i = 0; i != 3; ++i) info->unknown_chunks_data[i] = 0; for(i = 0; i != 3; ++i) info->unknown_chunks_size[i] = 0; } static void LodePNGUnknownChunks_cleanup(LodePNGInfo* info) { unsigned i; for(i = 0; i != 3; ++i) lodepng_free(info->unknown_chunks_data[i]); } static unsigned LodePNGUnknownChunks_copy(LodePNGInfo* dest, const LodePNGInfo* src) { unsigned i; LodePNGUnknownChunks_cleanup(dest); for(i = 0; i != 3; ++i) { size_t j; dest->unknown_chunks_size[i] = src->unknown_chunks_size[i]; dest->unknown_chunks_data[i] = (unsigned char*)lodepng_malloc(src->unknown_chunks_size[i]); if(!dest->unknown_chunks_data[i] && dest->unknown_chunks_size[i]) return 83; /*alloc fail*/ for(j = 0; j < src->unknown_chunks_size[i]; ++j) { dest->unknown_chunks_data[i][j] = src->unknown_chunks_data[i][j]; } } return 0; } /******************************************************************************/ static void LodePNGText_init(LodePNGInfo* info) { info->text_num = 0; info->text_keys = NULL; info->text_strings = NULL; } static void LodePNGText_cleanup(LodePNGInfo* info) { size_t i; for(i = 0; i != info->text_num; ++i) { string_cleanup(&info->text_keys[i]); string_cleanup(&info->text_strings[i]); } lodepng_free(info->text_keys); lodepng_free(info->text_strings); } static unsigned LodePNGText_copy(LodePNGInfo* dest, const LodePNGInfo* source) { size_t i = 0; dest->text_keys = NULL; dest->text_strings = NULL; dest->text_num = 0; for(i = 0; i != source->text_num; ++i) { CERROR_TRY_RETURN(lodepng_add_text(dest, source->text_keys[i], source->text_strings[i])); } return 0; } static unsigned lodepng_add_text_sized(LodePNGInfo* info, const char* key, const char* str, size_t size) { char** new_keys = (char**)(lodepng_realloc(info->text_keys, sizeof(char*) * (info->text_num + 1))); char** new_strings = (char**)(lodepng_realloc(info->text_strings, sizeof(char*) * (info->text_num + 1))); if(new_keys) info->text_keys = new_keys; if(new_strings) info->text_strings = new_strings; if(!new_keys || !new_strings) return 83; /*alloc fail*/ ++info->text_num; info->text_keys[info->text_num - 1] = alloc_string(key); info->text_strings[info->text_num - 1] = alloc_string_sized(str, size); if(!info->text_keys[info->text_num - 1] || !info->text_strings[info->text_num - 1]) return 83; /*alloc fail*/ return 0; } unsigned lodepng_add_text(LodePNGInfo* info, const char* key, const char* str) { return lodepng_add_text_sized(info, key, str, lodepng_strlen(str)); } void lodepng_clear_text(LodePNGInfo* info) { LodePNGText_cleanup(info); } /******************************************************************************/ static void LodePNGIText_init(LodePNGInfo* info) { info->itext_num = 0; info->itext_keys = NULL; info->itext_langtags = NULL; info->itext_transkeys = NULL; info->itext_strings = NULL; } static void LodePNGIText_cleanup(LodePNGInfo* info) { size_t i; for(i = 0; i != info->itext_num; ++i) { string_cleanup(&info->itext_keys[i]); string_cleanup(&info->itext_langtags[i]); string_cleanup(&info->itext_transkeys[i]); string_cleanup(&info->itext_strings[i]); } lodepng_free(info->itext_keys); lodepng_free(info->itext_langtags); lodepng_free(info->itext_transkeys); lodepng_free(info->itext_strings); } static unsigned LodePNGIText_copy(LodePNGInfo* dest, const LodePNGInfo* source) { size_t i = 0; dest->itext_keys = NULL; dest->itext_langtags = NULL; dest->itext_transkeys = NULL; dest->itext_strings = NULL; dest->itext_num = 0; for(i = 0; i != source->itext_num; ++i) { CERROR_TRY_RETURN(lodepng_add_itext(dest, source->itext_keys[i], source->itext_langtags[i], source->itext_transkeys[i], source->itext_strings[i])); } return 0; } void lodepng_clear_itext(LodePNGInfo* info) { LodePNGIText_cleanup(info); } static unsigned lodepng_add_itext_sized(LodePNGInfo* info, const char* key, const char* langtag, const char* transkey, const char* str, size_t size) { char** new_keys = (char**)(lodepng_realloc(info->itext_keys, sizeof(char*) * (info->itext_num + 1))); char** new_langtags = (char**)(lodepng_realloc(info->itext_langtags, sizeof(char*) * (info->itext_num + 1))); char** new_transkeys = (char**)(lodepng_realloc(info->itext_transkeys, sizeof(char*) * (info->itext_num + 1))); char** new_strings = (char**)(lodepng_realloc(info->itext_strings, sizeof(char*) * (info->itext_num + 1))); if(new_keys) info->itext_keys = new_keys; if(new_langtags) info->itext_langtags = new_langtags; if(new_transkeys) info->itext_transkeys = new_transkeys; if(new_strings) info->itext_strings = new_strings; if(!new_keys || !new_langtags || !new_transkeys || !new_strings) return 83; /*alloc fail*/ ++info->itext_num; info->itext_keys[info->itext_num - 1] = alloc_string(key); info->itext_langtags[info->itext_num - 1] = alloc_string(langtag); info->itext_transkeys[info->itext_num - 1] = alloc_string(transkey); info->itext_strings[info->itext_num - 1] = alloc_string_sized(str, size); return 0; } unsigned lodepng_add_itext(LodePNGInfo* info, const char* key, const char* langtag, const char* transkey, const char* str) { return lodepng_add_itext_sized(info, key, langtag, transkey, str, lodepng_strlen(str)); } /* same as set but does not delete */ static unsigned lodepng_assign_icc(LodePNGInfo* info, const char* name, const unsigned char* profile, unsigned profile_size) { if(profile_size == 0) return 100; /*invalid ICC profile size*/ info->iccp_name = alloc_string(name); info->iccp_profile = (unsigned char*)lodepng_malloc(profile_size); if(!info->iccp_name || !info->iccp_profile) return 83; /*alloc fail*/ lodepng_memcpy(info->iccp_profile, profile, profile_size); info->iccp_profile_size = profile_size; return 0; /*ok*/ } unsigned lodepng_set_icc(LodePNGInfo* info, const char* name, const unsigned char* profile, unsigned profile_size) { if(info->iccp_name) lodepng_clear_icc(info); info->iccp_defined = 1; return lodepng_assign_icc(info, name, profile, profile_size); } void lodepng_clear_icc(LodePNGInfo* info) { string_cleanup(&info->iccp_name); lodepng_free(info->iccp_profile); info->iccp_profile = NULL; info->iccp_profile_size = 0; info->iccp_defined = 0; } #endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ void lodepng_info_init(LodePNGInfo* info) { lodepng_color_mode_init(&info->color); info->interlace_method = 0; info->compression_method = 0; info->filter_method = 0; #ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS info->background_defined = 0; info->background_r = info->background_g = info->background_b = 0; LodePNGText_init(info); LodePNGIText_init(info); info->time_defined = 0; info->phys_defined = 0; info->gama_defined = 0; info->chrm_defined = 0; info->srgb_defined = 0; info->iccp_defined = 0; info->iccp_name = NULL; info->iccp_profile = NULL; LodePNGUnknownChunks_init(info); #endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ } void lodepng_info_cleanup(LodePNGInfo* info) { lodepng_color_mode_cleanup(&info->color); #ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS LodePNGText_cleanup(info); LodePNGIText_cleanup(info); lodepng_clear_icc(info); LodePNGUnknownChunks_cleanup(info); #endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ } unsigned lodepng_info_copy(LodePNGInfo* dest, const LodePNGInfo* source) { lodepng_info_cleanup(dest); lodepng_memcpy(dest, source, sizeof(LodePNGInfo)); lodepng_color_mode_init(&dest->color); CERROR_TRY_RETURN(lodepng_color_mode_copy(&dest->color, &source->color)); #ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS CERROR_TRY_RETURN(LodePNGText_copy(dest, source)); CERROR_TRY_RETURN(LodePNGIText_copy(dest, source)); if(source->iccp_defined) { CERROR_TRY_RETURN(lodepng_assign_icc(dest, source->iccp_name, source->iccp_profile, source->iccp_profile_size)); } LodePNGUnknownChunks_init(dest); CERROR_TRY_RETURN(LodePNGUnknownChunks_copy(dest, source)); #endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ return 0; } /* ////////////////////////////////////////////////////////////////////////// */ /*index: bitgroup index, bits: bitgroup size(1, 2 or 4), in: bitgroup value, out: octet array to add bits to*/ static void addColorBits(unsigned char* out, size_t index, unsigned bits, unsigned in) { unsigned m = bits == 1 ? 7 : bits == 2 ? 3 : 1; /*8 / bits - 1*/ /*p = the partial index in the byte, e.g. with 4 palettebits it is 0 for first half or 1 for second half*/ unsigned p = index & m; in &= (1u << bits) - 1u; /*filter out any other bits of the input value*/ in = in << (bits * (m - p)); if(p == 0) out[index * bits / 8u] = in; else out[index * bits / 8u] |= in; } typedef struct ColorTree ColorTree; /* One node of a color tree This is the data structure used to count the number of unique colors and to get a palette index for a color. It's like an octree, but because the alpha channel is used too, each node has 16 instead of 8 children. */ struct ColorTree { ColorTree* children[16]; /*up to 16 pointers to ColorTree of next level*/ int index; /*the payload. Only has a meaningful value if this is in the last level*/ }; static void color_tree_init(ColorTree* tree) { lodepng_memset(tree->children, 0, 16 * sizeof(*tree->children)); tree->index = -1; } static void color_tree_cleanup(ColorTree* tree) { int i; for(i = 0; i != 16; ++i) { if(tree->children[i]) { color_tree_cleanup(tree->children[i]); lodepng_free(tree->children[i]); } } } /*returns -1 if color not present, its index otherwise*/ static int color_tree_get(ColorTree* tree, unsigned char r, unsigned char g, unsigned char b, unsigned char a) { int bit = 0; for(bit = 0; bit < 8; ++bit) { int i = 8 * ((r >> bit) & 1) + 4 * ((g >> bit) & 1) + 2 * ((b >> bit) & 1) + 1 * ((a >> bit) & 1); if(!tree->children[i]) return -1; else tree = tree->children[i]; } return tree ? tree->index : -1; } #ifdef LODEPNG_COMPILE_ENCODER static int color_tree_has(ColorTree* tree, unsigned char r, unsigned char g, unsigned char b, unsigned char a) { return color_tree_get(tree, r, g, b, a) >= 0; } #endif /*LODEPNG_COMPILE_ENCODER*/ /*color is not allowed to already exist. Index should be >= 0 (it's signed to be compatible with using -1 for "doesn't exist") Returns error code, or 0 if ok*/ static unsigned color_tree_add(ColorTree* tree, unsigned char r, unsigned char g, unsigned char b, unsigned char a, unsigned index) { int bit; for(bit = 0; bit < 8; ++bit) { int i = 8 * ((r >> bit) & 1) + 4 * ((g >> bit) & 1) + 2 * ((b >> bit) & 1) + 1 * ((a >> bit) & 1); if(!tree->children[i]) { tree->children[i] = (ColorTree*)lodepng_malloc(sizeof(ColorTree)); if(!tree->children[i]) return 83; /*alloc fail*/ color_tree_init(tree->children[i]); } tree = tree->children[i]; } tree->index = (int)index; return 0; } /*put a pixel, given its RGBA color, into image of any color type*/ static unsigned rgba8ToPixel(unsigned char* out, size_t i, const LodePNGColorMode* mode, ColorTree* tree /*for palette*/, unsigned char r, unsigned char g, unsigned char b, unsigned char a) { if(mode->colortype == LCT_GREY) { unsigned char gray = r; /*((unsigned short)r + g + b) / 3u;*/ if(mode->bitdepth == 8) out[i] = gray; else if(mode->bitdepth == 16) out[i * 2 + 0] = out[i * 2 + 1] = gray; else { /*take the most significant bits of gray*/ gray = ((unsigned)gray >> (8u - mode->bitdepth)) & ((1u << mode->bitdepth) - 1u); addColorBits(out, i, mode->bitdepth, gray); } } else if(mode->colortype == LCT_RGB) { if(mode->bitdepth == 8) { out[i * 3 + 0] = r; out[i * 3 + 1] = g; out[i * 3 + 2] = b; } else { out[i * 6 + 0] = out[i * 6 + 1] = r; out[i * 6 + 2] = out[i * 6 + 3] = g; out[i * 6 + 4] = out[i * 6 + 5] = b; } } else if(mode->colortype == LCT_PALETTE) { int index = color_tree_get(tree, r, g, b, a); if(index < 0) return 82; /*color not in palette*/ if(mode->bitdepth == 8) out[i] = index; else addColorBits(out, i, mode->bitdepth, (unsigned)index); } else if(mode->colortype == LCT_GREY_ALPHA) { unsigned char gray = r; /*((unsigned short)r + g + b) / 3u;*/ if(mode->bitdepth == 8) { out[i * 2 + 0] = gray; out[i * 2 + 1] = a; } else if(mode->bitdepth == 16) { out[i * 4 + 0] = out[i * 4 + 1] = gray; out[i * 4 + 2] = out[i * 4 + 3] = a; } } else if(mode->colortype == LCT_RGBA) { if(mode->bitdepth == 8) { out[i * 4 + 0] = r; out[i * 4 + 1] = g; out[i * 4 + 2] = b; out[i * 4 + 3] = a; } else { out[i * 8 + 0] = out[i * 8 + 1] = r; out[i * 8 + 2] = out[i * 8 + 3] = g; out[i * 8 + 4] = out[i * 8 + 5] = b; out[i * 8 + 6] = out[i * 8 + 7] = a; } } return 0; /*no error*/ } /*put a pixel, given its RGBA16 color, into image of any color 16-bitdepth type*/ static void rgba16ToPixel(unsigned char* out, size_t i, const LodePNGColorMode* mode, unsigned short r, unsigned short g, unsigned short b, unsigned short a) { if(mode->colortype == LCT_GREY) { unsigned short gray = r; /*((unsigned)r + g + b) / 3u;*/ out[i * 2 + 0] = (gray >> 8) & 255; out[i * 2 + 1] = gray & 255; } else if(mode->colortype == LCT_RGB) { out[i * 6 + 0] = (r >> 8) & 255; out[i * 6 + 1] = r & 255; out[i * 6 + 2] = (g >> 8) & 255; out[i * 6 + 3] = g & 255; out[i * 6 + 4] = (b >> 8) & 255; out[i * 6 + 5] = b & 255; } else if(mode->colortype == LCT_GREY_ALPHA) { unsigned short gray = r; /*((unsigned)r + g + b) / 3u;*/ out[i * 4 + 0] = (gray >> 8) & 255; out[i * 4 + 1] = gray & 255; out[i * 4 + 2] = (a >> 8) & 255; out[i * 4 + 3] = a & 255; } else if(mode->colortype == LCT_RGBA) { out[i * 8 + 0] = (r >> 8) & 255; out[i * 8 + 1] = r & 255; out[i * 8 + 2] = (g >> 8) & 255; out[i * 8 + 3] = g & 255; out[i * 8 + 4] = (b >> 8) & 255; out[i * 8 + 5] = b & 255; out[i * 8 + 6] = (a >> 8) & 255; out[i * 8 + 7] = a & 255; } } /*Get RGBA8 color of pixel with index i (y * width + x) from the raw image with given color type.*/ static void getPixelColorRGBA8(unsigned char* r, unsigned char* g, unsigned char* b, unsigned char* a, const unsigned char* in, size_t i, const LodePNGColorMode* mode) { if(mode->colortype == LCT_GREY) { if(mode->bitdepth == 8) { *r = *g = *b = in[i]; if(mode->key_defined && *r == mode->key_r) *a = 0; else *a = 255; } else if(mode->bitdepth == 16) { *r = *g = *b = in[i * 2 + 0]; if(mode->key_defined && 256U * in[i * 2 + 0] + in[i * 2 + 1] == mode->key_r) *a = 0; else *a = 255; } else { unsigned highest = ((1U << mode->bitdepth) - 1U); /*highest possible value for this bit depth*/ size_t j = i * mode->bitdepth; unsigned value = readBitsFromReversedStream(&j, in, mode->bitdepth); *r = *g = *b = (value * 255) / highest; if(mode->key_defined && value == mode->key_r) *a = 0; else *a = 255; } } else if(mode->colortype == LCT_RGB) { if(mode->bitdepth == 8) { *r = in[i * 3 + 0]; *g = in[i * 3 + 1]; *b = in[i * 3 + 2]; if(mode->key_defined && *r == mode->key_r && *g == mode->key_g && *b == mode->key_b) *a = 0; else *a = 255; } else { *r = in[i * 6 + 0]; *g = in[i * 6 + 2]; *b = in[i * 6 + 4]; if(mode->key_defined && 256U * in[i * 6 + 0] + in[i * 6 + 1] == mode->key_r && 256U * in[i * 6 + 2] + in[i * 6 + 3] == mode->key_g && 256U * in[i * 6 + 4] + in[i * 6 + 5] == mode->key_b) *a = 0; else *a = 255; } } else if(mode->colortype == LCT_PALETTE) { unsigned index; if(mode->bitdepth == 8) index = in[i]; else { size_t j = i * mode->bitdepth; index = readBitsFromReversedStream(&j, in, mode->bitdepth); } /*out of bounds of palette not checked: see lodepng_color_mode_alloc_palette.*/ *r = mode->palette[index * 4 + 0]; *g = mode->palette[index * 4 + 1]; *b = mode->palette[index * 4 + 2]; *a = mode->palette[index * 4 + 3]; } else if(mode->colortype == LCT_GREY_ALPHA) { if(mode->bitdepth == 8) { *r = *g = *b = in[i * 2 + 0]; *a = in[i * 2 + 1]; } else { *r = *g = *b = in[i * 4 + 0]; *a = in[i * 4 + 2]; } } else if(mode->colortype == LCT_RGBA) { if(mode->bitdepth == 8) { *r = in[i * 4 + 0]; *g = in[i * 4 + 1]; *b = in[i * 4 + 2]; *a = in[i * 4 + 3]; } else { *r = in[i * 8 + 0]; *g = in[i * 8 + 2]; *b = in[i * 8 + 4]; *a = in[i * 8 + 6]; } } } /*Similar to getPixelColorRGBA8, but with all the for loops inside of the color mode test cases, optimized to convert the colors much faster, when converting to the common case of RGBA with 8 bit per channel. buffer must be RGBA with enough memory.*/ static void getPixelColorsRGBA8(unsigned char* LODEPNG_RESTRICT buffer, size_t numpixels, const unsigned char* LODEPNG_RESTRICT in, const LodePNGColorMode* mode) { unsigned num_channels = 4; size_t i; if(mode->colortype == LCT_GREY) { if(mode->bitdepth == 8) { for(i = 0; i != numpixels; ++i, buffer += num_channels) { buffer[0] = buffer[1] = buffer[2] = in[i]; buffer[3] = 255; } if(mode->key_defined) { buffer -= numpixels * num_channels; for(i = 0; i != numpixels; ++i, buffer += num_channels) { if(buffer[0] == mode->key_r) buffer[3] = 0; } } } else if(mode->bitdepth == 16) { for(i = 0; i != numpixels; ++i, buffer += num_channels) { buffer[0] = buffer[1] = buffer[2] = in[i * 2]; buffer[3] = mode->key_defined && 256U * in[i * 2 + 0] + in[i * 2 + 1] == mode->key_r ? 0 : 255; } } else { unsigned highest = ((1U << mode->bitdepth) - 1U); /*highest possible value for this bit depth*/ size_t j = 0; for(i = 0; i != numpixels; ++i, buffer += num_channels) { unsigned value = readBitsFromReversedStream(&j, in, mode->bitdepth); buffer[0] = buffer[1] = buffer[2] = (value * 255) / highest; buffer[3] = mode->key_defined && value == mode->key_r ? 0 : 255; } } } else if(mode->colortype == LCT_RGB) { if(mode->bitdepth == 8) { for(i = 0; i != numpixels; ++i, buffer += num_channels) { lodepng_memcpy(buffer, &in[i * 3], 3); buffer[3] = 255; } if(mode->key_defined) { buffer -= numpixels * num_channels; for(i = 0; i != numpixels; ++i, buffer += num_channels) { if(buffer[0] == mode->key_r && buffer[1]== mode->key_g && buffer[2] == mode->key_b) buffer[3] = 0; } } } else { for(i = 0; i != numpixels; ++i, buffer += num_channels) { buffer[0] = in[i * 6 + 0]; buffer[1] = in[i * 6 + 2]; buffer[2] = in[i * 6 + 4]; buffer[3] = mode->key_defined && 256U * in[i * 6 + 0] + in[i * 6 + 1] == mode->key_r && 256U * in[i * 6 + 2] + in[i * 6 + 3] == mode->key_g && 256U * in[i * 6 + 4] + in[i * 6 + 5] == mode->key_b ? 0 : 255; } } } else if(mode->colortype == LCT_PALETTE) { if(mode->bitdepth == 8) { for(i = 0; i != numpixels; ++i, buffer += num_channels) { unsigned index = in[i]; /*out of bounds of palette not checked: see lodepng_color_mode_alloc_palette.*/ lodepng_memcpy(buffer, &mode->palette[index * 4], 4); } } else { size_t j = 0; for(i = 0; i != numpixels; ++i, buffer += num_channels) { unsigned index = readBitsFromReversedStream(&j, in, mode->bitdepth); /*out of bounds of palette not checked: see lodepng_color_mode_alloc_palette.*/ lodepng_memcpy(buffer, &mode->palette[index * 4], 4); } } } else if(mode->colortype == LCT_GREY_ALPHA) { if(mode->bitdepth == 8) { for(i = 0; i != numpixels; ++i, buffer += num_channels) { buffer[0] = buffer[1] = buffer[2] = in[i * 2 + 0]; buffer[3] = in[i * 2 + 1]; } } else { for(i = 0; i != numpixels; ++i, buffer += num_channels) { buffer[0] = buffer[1] = buffer[2] = in[i * 4 + 0]; buffer[3] = in[i * 4 + 2]; } } } else if(mode->colortype == LCT_RGBA) { if(mode->bitdepth == 8) { lodepng_memcpy(buffer, in, numpixels * 4); } else { for(i = 0; i != numpixels; ++i, buffer += num_channels) { buffer[0] = in[i * 8 + 0]; buffer[1] = in[i * 8 + 2]; buffer[2] = in[i * 8 + 4]; buffer[3] = in[i * 8 + 6]; } } } } /*Similar to getPixelColorsRGBA8, but with 3-channel RGB output.*/ static void getPixelColorsRGB8(unsigned char* LODEPNG_RESTRICT buffer, size_t numpixels, const unsigned char* LODEPNG_RESTRICT in, const LodePNGColorMode* mode) { const unsigned num_channels = 3; size_t i; if(mode->colortype == LCT_GREY) { if(mode->bitdepth == 8) { for(i = 0; i != numpixels; ++i, buffer += num_channels) { buffer[0] = buffer[1] = buffer[2] = in[i]; } } else if(mode->bitdepth == 16) { for(i = 0; i != numpixels; ++i, buffer += num_channels) { buffer[0] = buffer[1] = buffer[2] = in[i * 2]; } } else { unsigned highest = ((1U << mode->bitdepth) - 1U); /*highest possible value for this bit depth*/ size_t j = 0; for(i = 0; i != numpixels; ++i, buffer += num_channels) { unsigned value = readBitsFromReversedStream(&j, in, mode->bitdepth); buffer[0] = buffer[1] = buffer[2] = (value * 255) / highest; } } } else if(mode->colortype == LCT_RGB) { if(mode->bitdepth == 8) { lodepng_memcpy(buffer, in, numpixels * 3); } else { for(i = 0; i != numpixels; ++i, buffer += num_channels) { buffer[0] = in[i * 6 + 0]; buffer[1] = in[i * 6 + 2]; buffer[2] = in[i * 6 + 4]; } } } else if(mode->colortype == LCT_PALETTE) { if(mode->bitdepth == 8) { for(i = 0; i != numpixels; ++i, buffer += num_channels) { unsigned index = in[i]; /*out of bounds of palette not checked: see lodepng_color_mode_alloc_palette.*/ lodepng_memcpy(buffer, &mode->palette[index * 4], 3); } } else { size_t j = 0; for(i = 0; i != numpixels; ++i, buffer += num_channels) { unsigned index = readBitsFromReversedStream(&j, in, mode->bitdepth); /*out of bounds of palette not checked: see lodepng_color_mode_alloc_palette.*/ lodepng_memcpy(buffer, &mode->palette[index * 4], 3); } } } else if(mode->colortype == LCT_GREY_ALPHA) { if(mode->bitdepth == 8) { for(i = 0; i != numpixels; ++i, buffer += num_channels) { buffer[0] = buffer[1] = buffer[2] = in[i * 2 + 0]; } } else { for(i = 0; i != numpixels; ++i, buffer += num_channels) { buffer[0] = buffer[1] = buffer[2] = in[i * 4 + 0]; } } } else if(mode->colortype == LCT_RGBA) { if(mode->bitdepth == 8) { for(i = 0; i != numpixels; ++i, buffer += num_channels) { lodepng_memcpy(buffer, &in[i * 4], 3); } } else { for(i = 0; i != numpixels; ++i, buffer += num_channels) { buffer[0] = in[i * 8 + 0]; buffer[1] = in[i * 8 + 2]; buffer[2] = in[i * 8 + 4]; } } } } /*Get RGBA16 color of pixel with index i (y * width + x) from the raw image with given color type, but the given color type must be 16-bit itself.*/ static void getPixelColorRGBA16(unsigned short* r, unsigned short* g, unsigned short* b, unsigned short* a, const unsigned char* in, size_t i, const LodePNGColorMode* mode) { if(mode->colortype == LCT_GREY) { *r = *g = *b = 256 * in[i * 2 + 0] + in[i * 2 + 1]; if(mode->key_defined && 256U * in[i * 2 + 0] + in[i * 2 + 1] == mode->key_r) *a = 0; else *a = 65535; } else if(mode->colortype == LCT_RGB) { *r = 256u * in[i * 6 + 0] + in[i * 6 + 1]; *g = 256u * in[i * 6 + 2] + in[i * 6 + 3]; *b = 256u * in[i * 6 + 4] + in[i * 6 + 5]; if(mode->key_defined && 256u * in[i * 6 + 0] + in[i * 6 + 1] == mode->key_r && 256u * in[i * 6 + 2] + in[i * 6 + 3] == mode->key_g && 256u * in[i * 6 + 4] + in[i * 6 + 5] == mode->key_b) *a = 0; else *a = 65535; } else if(mode->colortype == LCT_GREY_ALPHA) { *r = *g = *b = 256u * in[i * 4 + 0] + in[i * 4 + 1]; *a = 256u * in[i * 4 + 2] + in[i * 4 + 3]; } else if(mode->colortype == LCT_RGBA) { *r = 256u * in[i * 8 + 0] + in[i * 8 + 1]; *g = 256u * in[i * 8 + 2] + in[i * 8 + 3]; *b = 256u * in[i * 8 + 4] + in[i * 8 + 5]; *a = 256u * in[i * 8 + 6] + in[i * 8 + 7]; } } unsigned lodepng_convert(unsigned char* out, const unsigned char* in, const LodePNGColorMode* mode_out, const LodePNGColorMode* mode_in, unsigned w, unsigned h) { size_t i; ColorTree tree; size_t numpixels = (size_t)w * (size_t)h; unsigned error = 0; if(mode_in->colortype == LCT_PALETTE && !mode_in->palette) { return 107; /* error: must provide palette if input mode is palette */ } if(lodepng_color_mode_equal(mode_out, mode_in)) { size_t numbytes = lodepng_get_raw_size(w, h, mode_in); lodepng_memcpy(out, in, numbytes); return 0; } if(mode_out->colortype == LCT_PALETTE) { size_t palettesize = mode_out->palettesize; const unsigned char* palette = mode_out->palette; size_t palsize = (size_t)1u << mode_out->bitdepth; /*if the user specified output palette but did not give the values, assume they want the values of the input color type (assuming that one is palette). Note that we never create a new palette ourselves.*/ if(palettesize == 0) { palettesize = mode_in->palettesize; palette = mode_in->palette; /*if the input was also palette with same bitdepth, then the color types are also equal, so copy literally. This to preserve the exact indices that were in the PNG even in case there are duplicate colors in the palette.*/ if(mode_in->colortype == LCT_PALETTE && mode_in->bitdepth == mode_out->bitdepth) { size_t numbytes = lodepng_get_raw_size(w, h, mode_in); lodepng_memcpy(out, in, numbytes); return 0; } } if(palettesize < palsize) palsize = palettesize; color_tree_init(&tree); for(i = 0; i != palsize; ++i) { const unsigned char* p = &palette[i * 4]; error = color_tree_add(&tree, p[0], p[1], p[2], p[3], (unsigned)i); if(error) break; } } if(!error) { if(mode_in->bitdepth == 16 && mode_out->bitdepth == 16) { for(i = 0; i != numpixels; ++i) { unsigned short r = 0, g = 0, b = 0, a = 0; getPixelColorRGBA16(&r, &g, &b, &a, in, i, mode_in); rgba16ToPixel(out, i, mode_out, r, g, b, a); } } else if(mode_out->bitdepth == 8 && mode_out->colortype == LCT_RGBA) { getPixelColorsRGBA8(out, numpixels, in, mode_in); } else if(mode_out->bitdepth == 8 && mode_out->colortype == LCT_RGB) { getPixelColorsRGB8(out, numpixels, in, mode_in); } else { unsigned char r = 0, g = 0, b = 0, a = 0; for(i = 0; i != numpixels; ++i) { getPixelColorRGBA8(&r, &g, &b, &a, in, i, mode_in); error = rgba8ToPixel(out, i, mode_out, &tree, r, g, b, a); if(error) break; } } } if(mode_out->colortype == LCT_PALETTE) { color_tree_cleanup(&tree); } return error; } /* Converts a single rgb color without alpha from one type to another, color bits truncated to their bitdepth. In case of single channel (gray or palette), only the r channel is used. Slow function, do not use to process all pixels of an image. Alpha channel not supported on purpose: this is for bKGD, supporting alpha may prevent it from finding a color in the palette, from the specification it looks like bKGD should ignore the alpha values of the palette since it can use any palette index but doesn't have an alpha channel. Idem with ignoring color key. */ unsigned lodepng_convert_rgb( unsigned* r_out, unsigned* g_out, unsigned* b_out, unsigned r_in, unsigned g_in, unsigned b_in, const LodePNGColorMode* mode_out, const LodePNGColorMode* mode_in) { unsigned r = 0, g = 0, b = 0; unsigned mul = 65535 / ((1u << mode_in->bitdepth) - 1u); /*65535, 21845, 4369, 257, 1*/ unsigned shift = 16 - mode_out->bitdepth; if(mode_in->colortype == LCT_GREY || mode_in->colortype == LCT_GREY_ALPHA) { r = g = b = r_in * mul; } else if(mode_in->colortype == LCT_RGB || mode_in->colortype == LCT_RGBA) { r = r_in * mul; g = g_in * mul; b = b_in * mul; } else if(mode_in->colortype == LCT_PALETTE) { if(r_in >= mode_in->palettesize) return 82; r = mode_in->palette[r_in * 4 + 0] * 257u; g = mode_in->palette[r_in * 4 + 1] * 257u; b = mode_in->palette[r_in * 4 + 2] * 257u; } else { return 31; } /* now convert to output format */ if(mode_out->colortype == LCT_GREY || mode_out->colortype == LCT_GREY_ALPHA) { *r_out = r >> shift ; } else if(mode_out->colortype == LCT_RGB || mode_out->colortype == LCT_RGBA) { *r_out = r >> shift ; *g_out = g >> shift ; *b_out = b >> shift ; } else if(mode_out->colortype == LCT_PALETTE) { unsigned i; /* a 16-bit color cannot be in the palette */ if((r >> 8) != (r & 255) || (g >> 8) != (g & 255) || (b >> 8) != (b & 255)) return 82; for(i = 0; i < mode_out->palettesize; i++) { unsigned j = i * 4; if((r >> 8) == mode_out->palette[j + 0] && (g >> 8) == mode_out->palette[j + 1] && (b >> 8) == mode_out->palette[j + 2]) { *r_out = i; return 0; } } return 82; } else { return 31; } return 0; } #ifdef LODEPNG_COMPILE_ENCODER void lodepng_color_stats_init(LodePNGColorStats* stats) { /*stats*/ stats->colored = 0; stats->key = 0; stats->key_r = stats->key_g = stats->key_b = 0; stats->alpha = 0; stats->numcolors = 0; stats->bits = 1; stats->numpixels = 0; /*settings*/ stats->allow_palette = 1; stats->allow_greyscale = 1; } /*function used for debug purposes with C++*/ /*void printColorStats(LodePNGColorStats* p) { std::cout << "colored: " << (int)p->colored << ", "; std::cout << "key: " << (int)p->key << ", "; std::cout << "key_r: " << (int)p->key_r << ", "; std::cout << "key_g: " << (int)p->key_g << ", "; std::cout << "key_b: " << (int)p->key_b << ", "; std::cout << "alpha: " << (int)p->alpha << ", "; std::cout << "numcolors: " << (int)p->numcolors << ", "; std::cout << "bits: " << (int)p->bits << std::endl; }*/ /*Returns how many bits needed to represent given value (max 8 bit)*/ static unsigned getValueRequiredBits(unsigned char value) { if(value == 0 || value == 255) return 1; /*The scaling of 2-bit and 4-bit values uses multiples of 85 and 17*/ if(value % 17 == 0) return value % 85 == 0 ? 2 : 4; return 8; } /*stats must already have been inited. */ unsigned lodepng_compute_color_stats(LodePNGColorStats* stats, const unsigned char* in, unsigned w, unsigned h, const LodePNGColorMode* mode_in) { size_t i; ColorTree tree; size_t numpixels = (size_t)w * (size_t)h; unsigned error = 0; /* mark things as done already if it would be impossible to have a more expensive case */ unsigned colored_done = lodepng_is_greyscale_type(mode_in) ? 1 : 0; unsigned alpha_done = lodepng_can_have_alpha(mode_in) ? 0 : 1; unsigned numcolors_done = 0; unsigned bpp = lodepng_get_bpp(mode_in); unsigned bits_done = (stats->bits == 1 && bpp == 1) ? 1 : 0; unsigned sixteen = 0; /* whether the input image is 16 bit */ unsigned maxnumcolors = 257; if(bpp <= 8) maxnumcolors = LODEPNG_MIN(257, stats->numcolors + (1u << bpp)); stats->numpixels += numpixels; /*if palette not allowed, no need to compute numcolors*/ if(!stats->allow_palette) numcolors_done = 1; color_tree_init(&tree); /*If the stats was already filled in from previous data, fill its palette in tree and mark things as done already if we know they are the most expensive case already*/ if(stats->alpha) alpha_done = 1; if(stats->colored) colored_done = 1; if(stats->bits == 16) numcolors_done = 1; if(stats->bits >= bpp) bits_done = 1; if(stats->numcolors >= maxnumcolors) numcolors_done = 1; if(!numcolors_done) { for(i = 0; i < stats->numcolors; i++) { const unsigned char* color = &stats->palette[i * 4]; error = color_tree_add(&tree, color[0], color[1], color[2], color[3], i); if(error) goto cleanup; } } /*Check if the 16-bit input is truly 16-bit*/ if(mode_in->bitdepth == 16 && !sixteen) { unsigned short r = 0, g = 0, b = 0, a = 0; for(i = 0; i != numpixels; ++i) { getPixelColorRGBA16(&r, &g, &b, &a, in, i, mode_in); if((r & 255) != ((r >> 8) & 255) || (g & 255) != ((g >> 8) & 255) || (b & 255) != ((b >> 8) & 255) || (a & 255) != ((a >> 8) & 255)) /*first and second byte differ*/ { stats->bits = 16; sixteen = 1; bits_done = 1; numcolors_done = 1; /*counting colors no longer useful, palette doesn't support 16-bit*/ break; } } } if(sixteen) { unsigned short r = 0, g = 0, b = 0, a = 0; for(i = 0; i != numpixels; ++i) { getPixelColorRGBA16(&r, &g, &b, &a, in, i, mode_in); if(!colored_done && (r != g || r != b)) { stats->colored = 1; colored_done = 1; } if(!alpha_done) { unsigned matchkey = (r == stats->key_r && g == stats->key_g && b == stats->key_b); if(a != 65535 && (a != 0 || (stats->key && !matchkey))) { stats->alpha = 1; stats->key = 0; alpha_done = 1; } else if(a == 0 && !stats->alpha && !stats->key) { stats->key = 1; stats->key_r = r; stats->key_g = g; stats->key_b = b; } else if(a == 65535 && stats->key && matchkey) { /* Color key cannot be used if an opaque pixel also has that RGB color. */ stats->alpha = 1; stats->key = 0; alpha_done = 1; } } if(alpha_done && numcolors_done && colored_done && bits_done) break; } if(stats->key && !stats->alpha) { for(i = 0; i != numpixels; ++i) { getPixelColorRGBA16(&r, &g, &b, &a, in, i, mode_in); if(a != 0 && r == stats->key_r && g == stats->key_g && b == stats->key_b) { /* Color key cannot be used if an opaque pixel also has that RGB color. */ stats->alpha = 1; stats->key = 0; alpha_done = 1; } } } } else /* < 16-bit */ { unsigned char r = 0, g = 0, b = 0, a = 0; for(i = 0; i != numpixels; ++i) { getPixelColorRGBA8(&r, &g, &b, &a, in, i, mode_in); if(!bits_done && stats->bits < 8) { /*only r is checked, < 8 bits is only relevant for grayscale*/ unsigned bits = getValueRequiredBits(r); if(bits > stats->bits) stats->bits = bits; } bits_done = (stats->bits >= bpp); if(!colored_done && (r != g || r != b)) { stats->colored = 1; colored_done = 1; if(stats->bits < 8) stats->bits = 8; /*PNG has no colored modes with less than 8-bit per channel*/ } if(!alpha_done) { unsigned matchkey = (r == stats->key_r && g == stats->key_g && b == stats->key_b); if(a != 255 && (a != 0 || (stats->key && !matchkey))) { stats->alpha = 1; stats->key = 0; alpha_done = 1; if(stats->bits < 8) stats->bits = 8; /*PNG has no alphachannel modes with less than 8-bit per channel*/ } else if(a == 0 && !stats->alpha && !stats->key) { stats->key = 1; stats->key_r = r; stats->key_g = g; stats->key_b = b; } else if(a == 255 && stats->key && matchkey) { /* Color key cannot be used if an opaque pixel also has that RGB color. */ stats->alpha = 1; stats->key = 0; alpha_done = 1; if(stats->bits < 8) stats->bits = 8; /*PNG has no alphachannel modes with less than 8-bit per channel*/ } } if(!numcolors_done) { if(!color_tree_has(&tree, r, g, b, a)) { error = color_tree_add(&tree, r, g, b, a, stats->numcolors); if(error) goto cleanup; if(stats->numcolors < 256) { unsigned char* p = stats->palette; unsigned n = stats->numcolors; p[n * 4 + 0] = r; p[n * 4 + 1] = g; p[n * 4 + 2] = b; p[n * 4 + 3] = a; } ++stats->numcolors; numcolors_done = stats->numcolors >= maxnumcolors; } } if(alpha_done && numcolors_done && colored_done && bits_done) break; } if(stats->key && !stats->alpha) { for(i = 0; i != numpixels; ++i) { getPixelColorRGBA8(&r, &g, &b, &a, in, i, mode_in); if(a != 0 && r == stats->key_r && g == stats->key_g && b == stats->key_b) { /* Color key cannot be used if an opaque pixel also has that RGB color. */ stats->alpha = 1; stats->key = 0; alpha_done = 1; if(stats->bits < 8) stats->bits = 8; /*PNG has no alphachannel modes with less than 8-bit per channel*/ } } } /*make the stats's key always 16-bit for consistency - repeat each byte twice*/ stats->key_r += (stats->key_r << 8); stats->key_g += (stats->key_g << 8); stats->key_b += (stats->key_b << 8); } cleanup: color_tree_cleanup(&tree); return error; } #ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS /*Adds a single color to the color stats. The stats must already have been inited. The color must be given as 16-bit (with 2 bytes repeating for 8-bit and 65535 for opaque alpha channel). This function is expensive, do not call it for all pixels of an image but only for a few additional values. */ static unsigned lodepng_color_stats_add(LodePNGColorStats* stats, unsigned r, unsigned g, unsigned b, unsigned a) { unsigned error = 0; unsigned char image[8]; LodePNGColorMode mode; lodepng_color_mode_init(&mode); image[0] = r >> 8; image[1] = r; image[2] = g >> 8; image[3] = g; image[4] = b >> 8; image[5] = b; image[6] = a >> 8; image[7] = a; mode.bitdepth = 16; mode.colortype = LCT_RGBA; error = lodepng_compute_color_stats(stats, image, 1, 1, &mode); lodepng_color_mode_cleanup(&mode); return error; } #endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ /*Computes a minimal PNG color model that can contain all colors as indicated by the stats. The stats should be computed with lodepng_compute_color_stats. mode_in is raw color profile of the image the stats were computed on, to copy palette order from when relevant. Minimal PNG color model means the color type and bit depth that gives smallest amount of bits in the output image, e.g. gray if only grayscale pixels, palette if less than 256 colors, color key if only single transparent color, ... This is used if auto_convert is enabled (it is by default). */ static unsigned auto_choose_color(LodePNGColorMode* mode_out, const LodePNGColorMode* mode_in, const LodePNGColorStats* stats) { unsigned error = 0; unsigned palettebits; size_t i, n; size_t numpixels = stats->numpixels; unsigned palette_ok, gray_ok; unsigned alpha = stats->alpha; unsigned key = stats->key; unsigned bits = stats->bits; mode_out->key_defined = 0; if(key && numpixels <= 16) { alpha = 1; /*too few pixels to justify tRNS chunk overhead*/ key = 0; if(bits < 8) bits = 8; /*PNG has no alphachannel modes with less than 8-bit per channel*/ } gray_ok = !stats->colored; if(!stats->allow_greyscale) gray_ok = 0; if(!gray_ok && bits < 8) bits = 8; n = stats->numcolors; palettebits = n <= 2 ? 1 : (n <= 4 ? 2 : (n <= 16 ? 4 : 8)); palette_ok = n <= 256 && bits <= 8 && n != 0; /*n==0 means likely numcolors wasn't computed*/ if(numpixels < n * 2) palette_ok = 0; /*don't add palette overhead if image has only a few pixels*/ if(gray_ok && !alpha && bits <= palettebits) palette_ok = 0; /*gray is less overhead*/ if(!stats->allow_palette) palette_ok = 0; if(palette_ok) { const unsigned char* p = stats->palette; lodepng_palette_clear(mode_out); /*remove potential earlier palette*/ for(i = 0; i != stats->numcolors; ++i) { error = lodepng_palette_add(mode_out, p[i * 4 + 0], p[i * 4 + 1], p[i * 4 + 2], p[i * 4 + 3]); if(error) break; } mode_out->colortype = LCT_PALETTE; mode_out->bitdepth = palettebits; if(mode_in->colortype == LCT_PALETTE && mode_in->palettesize >= mode_out->palettesize && mode_in->bitdepth == mode_out->bitdepth) { /*If input should have same palette colors, keep original to preserve its order and prevent conversion*/ lodepng_color_mode_cleanup(mode_out); lodepng_color_mode_copy(mode_out, mode_in); } } else /*8-bit or 16-bit per channel*/ { mode_out->bitdepth = bits; mode_out->colortype = alpha ? (gray_ok ? LCT_GREY_ALPHA : LCT_RGBA) : (gray_ok ? LCT_GREY : LCT_RGB); if(key) { unsigned mask = (1u << mode_out->bitdepth) - 1u; /*stats always uses 16-bit, mask converts it*/ mode_out->key_r = stats->key_r & mask; mode_out->key_g = stats->key_g & mask; mode_out->key_b = stats->key_b & mask; mode_out->key_defined = 1; } } return error; } #endif /* #ifdef LODEPNG_COMPILE_ENCODER */ /* Paeth predictor, used by PNG filter type 4 The parameters are of type short, but should come from unsigned chars, the shorts are only needed to make the paeth calculation correct. */ static unsigned char paethPredictor(short a, short b, short c) { short pa = LODEPNG_ABS(b - c); short pb = LODEPNG_ABS(a - c); short pc = LODEPNG_ABS(a + b - c - c); /* return input value associated with smallest of pa, pb, pc (with certain priority if equal) */ if(pb < pa) { a = b; pa = pb; } return (pc < pa) ? c : a; } /*shared values used by multiple Adam7 related functions*/ static const unsigned ADAM7_IX[7] = { 0, 4, 0, 2, 0, 1, 0 }; /*x start values*/ static const unsigned ADAM7_IY[7] = { 0, 0, 4, 0, 2, 0, 1 }; /*y start values*/ static const unsigned ADAM7_DX[7] = { 8, 8, 4, 4, 2, 2, 1 }; /*x delta values*/ static const unsigned ADAM7_DY[7] = { 8, 8, 8, 4, 4, 2, 2 }; /*y delta values*/ /* Outputs various dimensions and positions in the image related to the Adam7 reduced images. passw: output containing the width of the 7 passes passh: output containing the height of the 7 passes filter_passstart: output containing the index of the start and end of each reduced image with filter bytes padded_passstart output containing the index of the start and end of each reduced image when without filter bytes but with padded scanlines passstart: output containing the index of the start and end of each reduced image without padding between scanlines, but still padding between the images w, h: width and height of non-interlaced image bpp: bits per pixel "padded" is only relevant if bpp is less than 8 and a scanline or image does not end at a full byte */ static void Adam7_getpassvalues(unsigned passw[7], unsigned passh[7], size_t filter_passstart[8], size_t padded_passstart[8], size_t passstart[8], unsigned w, unsigned h, unsigned bpp) { /*the passstart values have 8 values: the 8th one indicates the byte after the end of the 7th (= last) pass*/ unsigned i; /*calculate width and height in pixels of each pass*/ for(i = 0; i != 7; ++i) { passw[i] = (w + ADAM7_DX[i] - ADAM7_IX[i] - 1) / ADAM7_DX[i]; passh[i] = (h + ADAM7_DY[i] - ADAM7_IY[i] - 1) / ADAM7_DY[i]; if(passw[i] == 0) passh[i] = 0; if(passh[i] == 0) passw[i] = 0; } filter_passstart[0] = padded_passstart[0] = passstart[0] = 0; for(i = 0; i != 7; ++i) { /*if passw[i] is 0, it's 0 bytes, not 1 (no filtertype-byte)*/ filter_passstart[i + 1] = filter_passstart[i] + ((passw[i] && passh[i]) ? passh[i] * (1u + (passw[i] * bpp + 7u) / 8u) : 0); /*bits padded if needed to fill full byte at end of each scanline*/ padded_passstart[i + 1] = padded_passstart[i] + passh[i] * ((passw[i] * bpp + 7u) / 8u); /*only padded at end of reduced image*/ passstart[i + 1] = passstart[i] + (passh[i] * passw[i] * bpp + 7u) / 8u; } } #ifdef LODEPNG_COMPILE_DECODER /* ////////////////////////////////////////////////////////////////////////// */ /* / PNG Decoder / */ /* ////////////////////////////////////////////////////////////////////////// */ /*read the information from the header and store it in the LodePNGInfo. return value is error*/ unsigned lodepng_inspect(unsigned* w, unsigned* h, LodePNGState* state, const unsigned char* in, size_t insize) { unsigned width, height; LodePNGInfo* info = &state->info_png; if(insize == 0 || in == 0) { CERROR_RETURN_ERROR(state->error, 48); /*error: the given data is empty*/ } if(insize < 33) { CERROR_RETURN_ERROR(state->error, 27); /*error: the data length is smaller than the length of a PNG header*/ } /*when decoding a new PNG image, make sure all parameters created after previous decoding are reset*/ /* TODO: remove this. One should use a new LodePNGState for new sessions */ lodepng_info_cleanup(info); lodepng_info_init(info); if(in[0] != 137 || in[1] != 80 || in[2] != 78 || in[3] != 71 || in[4] != 13 || in[5] != 10 || in[6] != 26 || in[7] != 10) { CERROR_RETURN_ERROR(state->error, 28); /*error: the first 8 bytes are not the correct PNG signature*/ } if(lodepng_chunk_length(in + 8) != 13) { CERROR_RETURN_ERROR(state->error, 94); /*error: header size must be 13 bytes*/ } if(!lodepng_chunk_type_equals(in + 8, "IHDR")) { CERROR_RETURN_ERROR(state->error, 29); /*error: it doesn't start with a IHDR chunk!*/ } /*read the values given in the header*/ width = lodepng_read32bitInt(&in[16]); height = lodepng_read32bitInt(&in[20]); /*TODO: remove the undocumented feature that allows to give null pointers to width or height*/ if(w) *w = width; if(h) *h = height; info->color.bitdepth = in[24]; info->color.colortype = (LodePNGColorType)in[25]; info->compression_method = in[26]; info->filter_method = in[27]; info->interlace_method = in[28]; /*errors returned only after the parsing so other values are still output*/ /*error: invalid image size*/ if(width == 0 || height == 0) CERROR_RETURN_ERROR(state->error, 93); /*error: invalid colortype or bitdepth combination*/ state->error = checkColorValidity(info->color.colortype, info->color.bitdepth); if(state->error) return state->error; /*error: only compression method 0 is allowed in the specification*/ if(info->compression_method != 0) CERROR_RETURN_ERROR(state->error, 32); /*error: only filter method 0 is allowed in the specification*/ if(info->filter_method != 0) CERROR_RETURN_ERROR(state->error, 33); /*error: only interlace methods 0 and 1 exist in the specification*/ if(info->interlace_method > 1) CERROR_RETURN_ERROR(state->error, 34); if(!state->decoder.ignore_crc) { unsigned CRC = lodepng_read32bitInt(&in[29]); unsigned checksum = lodepng_crc32(&in[12], 17); if(CRC != checksum) { CERROR_RETURN_ERROR(state->error, 57); /*invalid CRC*/ } } return state->error; } static unsigned unfilterScanline(unsigned char* recon, const unsigned char* scanline, const unsigned char* precon, size_t bytewidth, unsigned char filterType, size_t length) { /* For PNG filter method 0 unfilter a PNG image scanline by scanline. when the pixels are smaller than 1 byte, the filter works byte per byte (bytewidth = 1) precon is the previous unfiltered scanline, recon the result, scanline the current one the incoming scanlines do NOT include the filtertype byte, that one is given in the parameter filterType instead recon and scanline MAY be the same memory address! precon must be disjoint. */ size_t i; switch(filterType) { case 0: for(i = 0; i != length; ++i) recon[i] = scanline[i]; break; case 1: { size_t j = 0; for(i = 0; i != bytewidth; ++i) recon[i] = scanline[i]; for(i = bytewidth; i != length; ++i, ++j) recon[i] = scanline[i] + recon[j]; break; } case 2: if(precon) { for(i = 0; i != length; ++i) recon[i] = scanline[i] + precon[i]; } else { for(i = 0; i != length; ++i) recon[i] = scanline[i]; } break; case 3: if(precon) { size_t j = 0; for(i = 0; i != bytewidth; ++i) recon[i] = scanline[i] + (precon[i] >> 1u); /* Unroll independent paths of this predictor. A 6x and 8x version is also possible but that adds too much code. Whether this speeds up anything depends on compiler and settings. */ if(bytewidth >= 4) { for(; i + 3 < length; i += 4, j += 4) { unsigned char s0 = scanline[i + 0], r0 = recon[j + 0], p0 = precon[i + 0]; unsigned char s1 = scanline[i + 1], r1 = recon[j + 1], p1 = precon[i + 1]; unsigned char s2 = scanline[i + 2], r2 = recon[j + 2], p2 = precon[i + 2]; unsigned char s3 = scanline[i + 3], r3 = recon[j + 3], p3 = precon[i + 3]; recon[i + 0] = s0 + ((r0 + p0) >> 1u); recon[i + 1] = s1 + ((r1 + p1) >> 1u); recon[i + 2] = s2 + ((r2 + p2) >> 1u); recon[i + 3] = s3 + ((r3 + p3) >> 1u); } } else if(bytewidth >= 3) { for(; i + 2 < length; i += 3, j += 3) { unsigned char s0 = scanline[i + 0], r0 = recon[j + 0], p0 = precon[i + 0]; unsigned char s1 = scanline[i + 1], r1 = recon[j + 1], p1 = precon[i + 1]; unsigned char s2 = scanline[i + 2], r2 = recon[j + 2], p2 = precon[i + 2]; recon[i + 0] = s0 + ((r0 + p0) >> 1u); recon[i + 1] = s1 + ((r1 + p1) >> 1u); recon[i + 2] = s2 + ((r2 + p2) >> 1u); } } else if(bytewidth >= 2) { for(; i + 1 < length; i += 2, j += 2) { unsigned char s0 = scanline[i + 0], r0 = recon[j + 0], p0 = precon[i + 0]; unsigned char s1 = scanline[i + 1], r1 = recon[j + 1], p1 = precon[i + 1]; recon[i + 0] = s0 + ((r0 + p0) >> 1u); recon[i + 1] = s1 + ((r1 + p1) >> 1u); } } for(; i != length; ++i, ++j) recon[i] = scanline[i] + ((recon[j] + precon[i]) >> 1u); } else { size_t j = 0; for(i = 0; i != bytewidth; ++i) recon[i] = scanline[i]; for(i = bytewidth; i != length; ++i, ++j) recon[i] = scanline[i] + (recon[j] >> 1u); } break; case 4: if(precon) { size_t j = 0; for(i = 0; i != bytewidth; ++i) { recon[i] = (scanline[i] + precon[i]); /*paethPredictor(0, precon[i], 0) is always precon[i]*/ } /* Unroll independent paths of the paeth predictor. A 6x and 8x version is also possible but that adds too much code. Whether this speeds up anything depends on compiler and settings. */ if(bytewidth >= 4) { for(; i + 3 < length; i += 4, j += 4) { unsigned char s0 = scanline[i + 0], s1 = scanline[i + 1], s2 = scanline[i + 2], s3 = scanline[i + 3]; unsigned char r0 = recon[j + 0], r1 = recon[j + 1], r2 = recon[j + 2], r3 = recon[j + 3]; unsigned char p0 = precon[i + 0], p1 = precon[i + 1], p2 = precon[i + 2], p3 = precon[i + 3]; unsigned char q0 = precon[j + 0], q1 = precon[j + 1], q2 = precon[j + 2], q3 = precon[j + 3]; recon[i + 0] = s0 + paethPredictor(r0, p0, q0); recon[i + 1] = s1 + paethPredictor(r1, p1, q1); recon[i + 2] = s2 + paethPredictor(r2, p2, q2); recon[i + 3] = s3 + paethPredictor(r3, p3, q3); } } else if(bytewidth >= 3) { for(; i + 2 < length; i += 3, j += 3) { unsigned char s0 = scanline[i + 0], s1 = scanline[i + 1], s2 = scanline[i + 2]; unsigned char r0 = recon[j + 0], r1 = recon[j + 1], r2 = recon[j + 2]; unsigned char p0 = precon[i + 0], p1 = precon[i + 1], p2 = precon[i + 2]; unsigned char q0 = precon[j + 0], q1 = precon[j + 1], q2 = precon[j + 2]; recon[i + 0] = s0 + paethPredictor(r0, p0, q0); recon[i + 1] = s1 + paethPredictor(r1, p1, q1); recon[i + 2] = s2 + paethPredictor(r2, p2, q2); } } else if(bytewidth >= 2) { for(; i + 1 < length; i += 2, j += 2) { unsigned char s0 = scanline[i + 0], s1 = scanline[i + 1]; unsigned char r0 = recon[j + 0], r1 = recon[j + 1]; unsigned char p0 = precon[i + 0], p1 = precon[i + 1]; unsigned char q0 = precon[j + 0], q1 = precon[j + 1]; recon[i + 0] = s0 + paethPredictor(r0, p0, q0); recon[i + 1] = s1 + paethPredictor(r1, p1, q1); } } for(; i != length; ++i, ++j) { recon[i] = (scanline[i] + paethPredictor(recon[i - bytewidth], precon[i], precon[j])); } } else { size_t j = 0; for(i = 0; i != bytewidth; ++i) { recon[i] = scanline[i]; } for(i = bytewidth; i != length; ++i, ++j) { /*paethPredictor(recon[i - bytewidth], 0, 0) is always recon[i - bytewidth]*/ recon[i] = (scanline[i] + recon[j]); } } break; default: return 36; /*error: invalid filter type given*/ } return 0; } static unsigned unfilter(unsigned char* out, const unsigned char* in, unsigned w, unsigned h, unsigned bpp) { /* For PNG filter method 0 this function unfilters a single image (e.g. without interlacing this is called once, with Adam7 seven times) out must have enough bytes allocated already, in must have the scanlines + 1 filtertype byte per scanline w and h are image dimensions or dimensions of reduced image, bpp is bits per pixel in and out are allowed to be the same memory address (but aren't the same size since in has the extra filter bytes) */ unsigned y; unsigned char* prevline = 0; /*bytewidth is used for filtering, is 1 when bpp < 8, number of bytes per pixel otherwise*/ size_t bytewidth = (bpp + 7u) / 8u; /*the width of a scanline in bytes, not including the filter type*/ size_t linebytes = lodepng_get_raw_size_idat(w, 1, bpp) - 1u; for(y = 0; y < h; ++y) { size_t outindex = linebytes * y; size_t inindex = (1 + linebytes) * y; /*the extra filterbyte added to each row*/ unsigned char filterType = in[inindex]; CERROR_TRY_RETURN(unfilterScanline(&out[outindex], &in[inindex + 1], prevline, bytewidth, filterType, linebytes)); prevline = &out[outindex]; } return 0; } /* in: Adam7 interlaced image, with no padding bits between scanlines, but between reduced images so that each reduced image starts at a byte. out: the same pixels, but re-ordered so that they're now a non-interlaced image with size w*h bpp: bits per pixel out has the following size in bits: w * h * bpp. in is possibly bigger due to padding bits between reduced images. out must be big enough AND must be 0 everywhere if bpp < 8 in the current implementation (because that's likely a little bit faster) NOTE: comments about padding bits are only relevant if bpp < 8 */ static void Adam7_deinterlace(unsigned char* out, const unsigned char* in, unsigned w, unsigned h, unsigned bpp) { unsigned passw[7], passh[7]; size_t filter_passstart[8], padded_passstart[8], passstart[8]; unsigned i; Adam7_getpassvalues(passw, passh, filter_passstart, padded_passstart, passstart, w, h, bpp); if(bpp >= 8) { for(i = 0; i != 7; ++i) { unsigned x, y, b; size_t bytewidth = bpp / 8u; for(y = 0; y < passh[i]; ++y) for(x = 0; x < passw[i]; ++x) { size_t pixelinstart = passstart[i] + (y * passw[i] + x) * bytewidth; size_t pixeloutstart = ((ADAM7_IY[i] + (size_t)y * ADAM7_DY[i]) * (size_t)w + ADAM7_IX[i] + (size_t)x * ADAM7_DX[i]) * bytewidth; for(b = 0; b < bytewidth; ++b) { out[pixeloutstart + b] = in[pixelinstart + b]; } } } } else /*bpp < 8: Adam7 with pixels < 8 bit is a bit trickier: with bit pointers*/ { for(i = 0; i != 7; ++i) { unsigned x, y, b; unsigned ilinebits = bpp * passw[i]; unsigned olinebits = bpp * w; size_t obp, ibp; /*bit pointers (for out and in buffer)*/ for(y = 0; y < passh[i]; ++y) for(x = 0; x < passw[i]; ++x) { ibp = (8 * passstart[i]) + (y * ilinebits + x * bpp); obp = (ADAM7_IY[i] + (size_t)y * ADAM7_DY[i]) * olinebits + (ADAM7_IX[i] + (size_t)x * ADAM7_DX[i]) * bpp; for(b = 0; b < bpp; ++b) { unsigned char bit = readBitFromReversedStream(&ibp, in); setBitOfReversedStream(&obp, out, bit); } } } } } static void removePaddingBits(unsigned char* out, const unsigned char* in, size_t olinebits, size_t ilinebits, unsigned h) { /* After filtering there are still padding bits if scanlines have non multiple of 8 bit amounts. They need to be removed (except at last scanline of (Adam7-reduced) image) before working with pure image buffers for the Adam7 code, the color convert code and the output to the user. in and out are allowed to be the same buffer, in may also be higher but still overlapping; in must have >= ilinebits*h bits, out must have >= olinebits*h bits, olinebits must be <= ilinebits also used to move bits after earlier such operations happened, e.g. in a sequence of reduced images from Adam7 only useful if (ilinebits - olinebits) is a value in the range 1..7 */ unsigned y; size_t diff = ilinebits - olinebits; size_t ibp = 0, obp = 0; /*input and output bit pointers*/ for(y = 0; y < h; ++y) { size_t x; for(x = 0; x < olinebits; ++x) { unsigned char bit = readBitFromReversedStream(&ibp, in); setBitOfReversedStream(&obp, out, bit); } ibp += diff; } } /*out must be buffer big enough to contain full image, and in must contain the full decompressed data from the IDAT chunks (with filter index bytes and possible padding bits) return value is error*/ static unsigned postProcessScanlines(unsigned char* out, unsigned char* in, unsigned w, unsigned h, const LodePNGInfo* info_png) { /* This function converts the filtered-padded-interlaced data into pure 2D image buffer with the PNG's colortype. Steps: *) if no Adam7: 1) unfilter 2) remove padding bits (= possible extra bits per scanline if bpp < 8) *) if adam7: 1) 7x unfilter 2) 7x remove padding bits 3) Adam7_deinterlace NOTE: the in buffer will be overwritten with intermediate data! */ unsigned bpp = lodepng_get_bpp(&info_png->color); if(bpp == 0) return 31; /*error: invalid colortype*/ if(info_png->interlace_method == 0) { if(bpp < 8 && w * bpp != ((w * bpp + 7u) / 8u) * 8u) { CERROR_TRY_RETURN(unfilter(in, in, w, h, bpp)); removePaddingBits(out, in, w * bpp, ((w * bpp + 7u) / 8u) * 8u, h); } /*we can immediately filter into the out buffer, no other steps needed*/ else CERROR_TRY_RETURN(unfilter(out, in, w, h, bpp)); } else /*interlace_method is 1 (Adam7)*/ { unsigned passw[7], passh[7]; size_t filter_passstart[8], padded_passstart[8], passstart[8]; unsigned i; Adam7_getpassvalues(passw, passh, filter_passstart, padded_passstart, passstart, w, h, bpp); for(i = 0; i != 7; ++i) { CERROR_TRY_RETURN(unfilter(&in[padded_passstart[i]], &in[filter_passstart[i]], passw[i], passh[i], bpp)); /*TODO: possible efficiency improvement: if in this reduced image the bits fit nicely in 1 scanline, move bytes instead of bits or move not at all*/ if(bpp < 8) { /*remove padding bits in scanlines; after this there still may be padding bits between the different reduced images: each reduced image still starts nicely at a byte*/ removePaddingBits(&in[passstart[i]], &in[padded_passstart[i]], passw[i] * bpp, ((passw[i] * bpp + 7u) / 8u) * 8u, passh[i]); } } Adam7_deinterlace(out, in, w, h, bpp); } return 0; } static unsigned readChunk_PLTE(LodePNGColorMode* color, const unsigned char* data, size_t chunkLength) { unsigned pos = 0, i; color->palettesize = chunkLength / 3u; if(color->palettesize == 0 || color->palettesize > 256) return 38; /*error: palette too small or big*/ lodepng_color_mode_alloc_palette(color); if(!color->palette && color->palettesize) { color->palettesize = 0; return 83; /*alloc fail*/ } for(i = 0; i != color->palettesize; ++i) { color->palette[4 * i + 0] = data[pos++]; /*R*/ color->palette[4 * i + 1] = data[pos++]; /*G*/ color->palette[4 * i + 2] = data[pos++]; /*B*/ color->palette[4 * i + 3] = 255; /*alpha*/ } return 0; /* OK */ } static unsigned readChunk_tRNS(LodePNGColorMode* color, const unsigned char* data, size_t chunkLength) { unsigned i; if(color->colortype == LCT_PALETTE) { /*error: more alpha values given than there are palette entries*/ if(chunkLength > color->palettesize) return 39; for(i = 0; i != chunkLength; ++i) color->palette[4 * i + 3] = data[i]; } else if(color->colortype == LCT_GREY) { /*error: this chunk must be 2 bytes for grayscale image*/ if(chunkLength != 2) return 30; color->key_defined = 1; color->key_r = color->key_g = color->key_b = 256u * data[0] + data[1]; } else if(color->colortype == LCT_RGB) { /*error: this chunk must be 6 bytes for RGB image*/ if(chunkLength != 6) return 41; color->key_defined = 1; color->key_r = 256u * data[0] + data[1]; color->key_g = 256u * data[2] + data[3]; color->key_b = 256u * data[4] + data[5]; } else return 42; /*error: tRNS chunk not allowed for other color models*/ return 0; /* OK */ } #ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS /*background color chunk (bKGD)*/ static unsigned readChunk_bKGD(LodePNGInfo* info, const unsigned char* data, size_t chunkLength) { if(info->color.colortype == LCT_PALETTE) { /*error: this chunk must be 1 byte for indexed color image*/ if(chunkLength != 1) return 43; /*error: invalid palette index, or maybe this chunk appeared before PLTE*/ if(data[0] >= info->color.palettesize) return 103; info->background_defined = 1; info->background_r = info->background_g = info->background_b = data[0]; } else if(info->color.colortype == LCT_GREY || info->color.colortype == LCT_GREY_ALPHA) { /*error: this chunk must be 2 bytes for grayscale image*/ if(chunkLength != 2) return 44; /*the values are truncated to bitdepth in the PNG file*/ info->background_defined = 1; info->background_r = info->background_g = info->background_b = 256u * data[0] + data[1]; } else if(info->color.colortype == LCT_RGB || info->color.colortype == LCT_RGBA) { /*error: this chunk must be 6 bytes for grayscale image*/ if(chunkLength != 6) return 45; /*the values are truncated to bitdepth in the PNG file*/ info->background_defined = 1; info->background_r = 256u * data[0] + data[1]; info->background_g = 256u * data[2] + data[3]; info->background_b = 256u * data[4] + data[5]; } return 0; /* OK */ } /*text chunk (tEXt)*/ static unsigned readChunk_tEXt(LodePNGInfo* info, const unsigned char* data, size_t chunkLength) { unsigned error = 0; char *key = 0, *str = 0; while(!error) /*not really a while loop, only used to break on error*/ { unsigned length, string2_begin; length = 0; while(length < chunkLength && data[length] != 0) ++length; /*even though it's not allowed by the standard, no error is thrown if there's no null termination char, if the text is empty*/ if(length < 1 || length > 79) CERROR_BREAK(error, 89); /*keyword too short or long*/ key = (char*)lodepng_malloc(length + 1); if(!key) CERROR_BREAK(error, 83); /*alloc fail*/ lodepng_memcpy(key, data, length); key[length] = 0; string2_begin = length + 1; /*skip keyword null terminator*/ length = (unsigned)(chunkLength < string2_begin ? 0 : chunkLength - string2_begin); str = (char*)lodepng_malloc(length + 1); if(!str) CERROR_BREAK(error, 83); /*alloc fail*/ lodepng_memcpy(str, data + string2_begin, length); str[length] = 0; error = lodepng_add_text(info, key, str); break; } lodepng_free(key); lodepng_free(str); return error; } /*compressed text chunk (zTXt)*/ static unsigned readChunk_zTXt(LodePNGInfo* info, const LodePNGDecoderSettings* decoder, const unsigned char* data, size_t chunkLength) { unsigned error = 0; /*copy the object to change parameters in it*/ LodePNGDecompressSettings zlibsettings = decoder->zlibsettings; unsigned length, string2_begin; char *key = 0; unsigned char* str = 0; size_t size = 0; while(!error) /*not really a while loop, only used to break on error*/ { for(length = 0; length < chunkLength && data[length] != 0; ++length) ; if(length + 2 >= chunkLength) CERROR_BREAK(error, 75); /*no null termination, corrupt?*/ if(length < 1 || length > 79) CERROR_BREAK(error, 89); /*keyword too short or long*/ key = (char*)lodepng_malloc(length + 1); if(!key) CERROR_BREAK(error, 83); /*alloc fail*/ lodepng_memcpy(key, data, length); key[length] = 0; if(data[length + 1] != 0) CERROR_BREAK(error, 72); /*the 0 byte indicating compression must be 0*/ string2_begin = length + 2; if(string2_begin > chunkLength) CERROR_BREAK(error, 75); /*no null termination, corrupt?*/ length = (unsigned)chunkLength - string2_begin; zlibsettings.max_output_size = decoder->max_text_size; /*will fail if zlib error, e.g. if length is too small*/ error = zlib_decompress(&str, &size, 0, &data[string2_begin], length, &zlibsettings); /*error: compressed text larger than decoder->max_text_size*/ if(error && size > zlibsettings.max_output_size) error = 112; if(error) break; error = lodepng_add_text_sized(info, key, (char*)str, size); break; } lodepng_free(key); lodepng_free(str); return error; } /*international text chunk (iTXt)*/ static unsigned readChunk_iTXt(LodePNGInfo* info, const LodePNGDecoderSettings* decoder, const unsigned char* data, size_t chunkLength) { unsigned error = 0; unsigned i; /*copy the object to change parameters in it*/ LodePNGDecompressSettings zlibsettings = decoder->zlibsettings; unsigned length, begin, compressed; char *key = 0, *langtag = 0, *transkey = 0; while(!error) /*not really a while loop, only used to break on error*/ { /*Quick check if the chunk length isn't too small. Even without check it'd still fail with other error checks below if it's too short. This just gives a different error code.*/ if(chunkLength < 5) CERROR_BREAK(error, 30); /*iTXt chunk too short*/ /*read the key*/ for(length = 0; length < chunkLength && data[length] != 0; ++length) ; if(length + 3 >= chunkLength) CERROR_BREAK(error, 75); /*no null termination char, corrupt?*/ if(length < 1 || length > 79) CERROR_BREAK(error, 89); /*keyword too short or long*/ key = (char*)lodepng_malloc(length + 1); if(!key) CERROR_BREAK(error, 83); /*alloc fail*/ lodepng_memcpy(key, data, length); key[length] = 0; /*read the compression method*/ compressed = data[length + 1]; if(data[length + 2] != 0) CERROR_BREAK(error, 72); /*the 0 byte indicating compression must be 0*/ /*even though it's not allowed by the standard, no error is thrown if there's no null termination char, if the text is empty for the next 3 texts*/ /*read the langtag*/ begin = length + 3; length = 0; for(i = begin; i < chunkLength && data[i] != 0; ++i) ++length; langtag = (char*)lodepng_malloc(length + 1); if(!langtag) CERROR_BREAK(error, 83); /*alloc fail*/ lodepng_memcpy(langtag, data + begin, length); langtag[length] = 0; /*read the transkey*/ begin += length + 1; length = 0; for(i = begin; i < chunkLength && data[i] != 0; ++i) ++length; transkey = (char*)lodepng_malloc(length + 1); if(!transkey) CERROR_BREAK(error, 83); /*alloc fail*/ lodepng_memcpy(transkey, data + begin, length); transkey[length] = 0; /*read the actual text*/ begin += length + 1; length = (unsigned)chunkLength < begin ? 0 : (unsigned)chunkLength - begin; if(compressed) { unsigned char* str = 0; size_t size = 0; zlibsettings.max_output_size = decoder->max_text_size; /*will fail if zlib error, e.g. if length is too small*/ error = zlib_decompress(&str, &size, 0, &data[begin], length, &zlibsettings); /*error: compressed text larger than decoder->max_text_size*/ if(error && size > zlibsettings.max_output_size) error = 112; if(!error) error = lodepng_add_itext_sized(info, key, langtag, transkey, (char*)str, size); lodepng_free(str); } else { error = lodepng_add_itext_sized(info, key, langtag, transkey, (char*)(data + begin), length); } break; } lodepng_free(key); lodepng_free(langtag); lodepng_free(transkey); return error; } static unsigned readChunk_tIME(LodePNGInfo* info, const unsigned char* data, size_t chunkLength) { if(chunkLength != 7) return 73; /*invalid tIME chunk size*/ info->time_defined = 1; info->time.year = 256u * data[0] + data[1]; info->time.month = data[2]; info->time.day = data[3]; info->time.hour = data[4]; info->time.minute = data[5]; info->time.second = data[6]; return 0; /* OK */ } static unsigned readChunk_pHYs(LodePNGInfo* info, const unsigned char* data, size_t chunkLength) { if(chunkLength != 9) return 74; /*invalid pHYs chunk size*/ info->phys_defined = 1; info->phys_x = 16777216u * data[0] + 65536u * data[1] + 256u * data[2] + data[3]; info->phys_y = 16777216u * data[4] + 65536u * data[5] + 256u * data[6] + data[7]; info->phys_unit = data[8]; return 0; /* OK */ } static unsigned readChunk_gAMA(LodePNGInfo* info, const unsigned char* data, size_t chunkLength) { if(chunkLength != 4) return 96; /*invalid gAMA chunk size*/ info->gama_defined = 1; info->gama_gamma = 16777216u * data[0] + 65536u * data[1] + 256u * data[2] + data[3]; return 0; /* OK */ } static unsigned readChunk_cHRM(LodePNGInfo* info, const unsigned char* data, size_t chunkLength) { if(chunkLength != 32) return 97; /*invalid cHRM chunk size*/ info->chrm_defined = 1; info->chrm_white_x = 16777216u * data[ 0] + 65536u * data[ 1] + 256u * data[ 2] + data[ 3]; info->chrm_white_y = 16777216u * data[ 4] + 65536u * data[ 5] + 256u * data[ 6] + data[ 7]; info->chrm_red_x = 16777216u * data[ 8] + 65536u * data[ 9] + 256u * data[10] + data[11]; info->chrm_red_y = 16777216u * data[12] + 65536u * data[13] + 256u * data[14] + data[15]; info->chrm_green_x = 16777216u * data[16] + 65536u * data[17] + 256u * data[18] + data[19]; info->chrm_green_y = 16777216u * data[20] + 65536u * data[21] + 256u * data[22] + data[23]; info->chrm_blue_x = 16777216u * data[24] + 65536u * data[25] + 256u * data[26] + data[27]; info->chrm_blue_y = 16777216u * data[28] + 65536u * data[29] + 256u * data[30] + data[31]; return 0; /* OK */ } static unsigned readChunk_sRGB(LodePNGInfo* info, const unsigned char* data, size_t chunkLength) { if(chunkLength != 1) return 98; /*invalid sRGB chunk size (this one is never ignored)*/ info->srgb_defined = 1; info->srgb_intent = data[0]; return 0; /* OK */ } static unsigned readChunk_iCCP(LodePNGInfo* info, const LodePNGDecoderSettings* decoder, const unsigned char* data, size_t chunkLength) { unsigned error = 0; unsigned i; size_t size = 0; /*copy the object to change parameters in it*/ LodePNGDecompressSettings zlibsettings = decoder->zlibsettings; unsigned length, string2_begin; info->iccp_defined = 1; if(info->iccp_name) lodepng_clear_icc(info); for(length = 0; length < chunkLength && data[length] != 0; ++length) ; if(length + 2 >= chunkLength) return 75; /*no null termination, corrupt?*/ if(length < 1 || length > 79) return 89; /*keyword too short or long*/ info->iccp_name = (char*)lodepng_malloc(length + 1); if(!info->iccp_name) return 83; /*alloc fail*/ info->iccp_name[length] = 0; for(i = 0; i != length; ++i) info->iccp_name[i] = (char)data[i]; if(data[length + 1] != 0) return 72; /*the 0 byte indicating compression must be 0*/ string2_begin = length + 2; if(string2_begin > chunkLength) return 75; /*no null termination, corrupt?*/ length = (unsigned)chunkLength - string2_begin; zlibsettings.max_output_size = decoder->max_icc_size; error = zlib_decompress(&info->iccp_profile, &size, 0, &data[string2_begin], length, &zlibsettings); /*error: ICC profile larger than decoder->max_icc_size*/ if(error && size > zlibsettings.max_output_size) error = 113; info->iccp_profile_size = size; if(!error && !info->iccp_profile_size) error = 100; /*invalid ICC profile size*/ return error; } #endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ unsigned lodepng_inspect_chunk(LodePNGState* state, size_t pos, const unsigned char* in, size_t insize) { const unsigned char* chunk = in + pos; unsigned chunkLength; const unsigned char* data; unsigned unhandled = 0; unsigned error = 0; if(pos + 4 > insize) return 30; chunkLength = lodepng_chunk_length(chunk); if(chunkLength > 2147483647) return 63; data = lodepng_chunk_data_const(chunk); if(data + chunkLength + 4 > in + insize) return 30; if(lodepng_chunk_type_equals(chunk, "PLTE")) { error = readChunk_PLTE(&state->info_png.color, data, chunkLength); } else if(lodepng_chunk_type_equals(chunk, "tRNS")) { error = readChunk_tRNS(&state->info_png.color, data, chunkLength); #ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS } else if(lodepng_chunk_type_equals(chunk, "bKGD")) { error = readChunk_bKGD(&state->info_png, data, chunkLength); } else if(lodepng_chunk_type_equals(chunk, "tEXt")) { error = readChunk_tEXt(&state->info_png, data, chunkLength); } else if(lodepng_chunk_type_equals(chunk, "zTXt")) { error = readChunk_zTXt(&state->info_png, &state->decoder, data, chunkLength); } else if(lodepng_chunk_type_equals(chunk, "iTXt")) { error = readChunk_iTXt(&state->info_png, &state->decoder, data, chunkLength); } else if(lodepng_chunk_type_equals(chunk, "tIME")) { error = readChunk_tIME(&state->info_png, data, chunkLength); } else if(lodepng_chunk_type_equals(chunk, "pHYs")) { error = readChunk_pHYs(&state->info_png, data, chunkLength); } else if(lodepng_chunk_type_equals(chunk, "gAMA")) { error = readChunk_gAMA(&state->info_png, data, chunkLength); } else if(lodepng_chunk_type_equals(chunk, "cHRM")) { error = readChunk_cHRM(&state->info_png, data, chunkLength); } else if(lodepng_chunk_type_equals(chunk, "sRGB")) { error = readChunk_sRGB(&state->info_png, data, chunkLength); } else if(lodepng_chunk_type_equals(chunk, "iCCP")) { error = readChunk_iCCP(&state->info_png, &state->decoder, data, chunkLength); #endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ } else { /* unhandled chunk is ok (is not an error) */ unhandled = 1; } if(!error && !unhandled && !state->decoder.ignore_crc) { if(lodepng_chunk_check_crc(chunk)) return 57; /*invalid CRC*/ } return error; } /*read a PNG, the result will be in the same color type as the PNG (hence "generic")*/ static void decodeGeneric(unsigned char** out, unsigned* w, unsigned* h, LodePNGState* state, const unsigned char* in, size_t insize) { unsigned char IEND = 0; const unsigned char* chunk; unsigned char* idat; /*the data from idat chunks, zlib compressed*/ size_t idatsize = 0; unsigned char* scanlines = 0; size_t scanlines_size = 0, expected_size = 0; size_t outsize = 0; /*for unknown chunk order*/ unsigned unknown = 0; #ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS unsigned critical_pos = 1; /*1 = after IHDR, 2 = after PLTE, 3 = after IDAT*/ #endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ /* safe output values in case error happens */ *out = 0; *w = *h = 0; state->error = lodepng_inspect(w, h, state, in, insize); /*reads header and resets other parameters in state->info_png*/ if(state->error) return; if(lodepng_pixel_overflow(*w, *h, &state->info_png.color, &state->info_raw)) { CERROR_RETURN(state->error, 92); /*overflow possible due to amount of pixels*/ } /*the input filesize is a safe upper bound for the sum of idat chunks size*/ idat = (unsigned char*)lodepng_malloc(insize); if(!idat) CERROR_RETURN(state->error, 83); /*alloc fail*/ chunk = &in[33]; /*first byte of the first chunk after the header*/ /*loop through the chunks, ignoring unknown chunks and stopping at IEND chunk. IDAT data is put at the start of the in buffer*/ while(!IEND && !state->error) { unsigned chunkLength; const unsigned char* data; /*the data in the chunk*/ /*error: size of the in buffer too small to contain next chunk*/ if((size_t)((chunk - in) + 12) > insize || chunk < in) { if(state->decoder.ignore_end) break; /*other errors may still happen though*/ CERROR_BREAK(state->error, 30); } /*length of the data of the chunk, excluding the length bytes, chunk type and CRC bytes*/ chunkLength = lodepng_chunk_length(chunk); /*error: chunk length larger than the max PNG chunk size*/ if(chunkLength > 2147483647) { if(state->decoder.ignore_end) break; /*other errors may still happen though*/ CERROR_BREAK(state->error, 63); } if((size_t)((chunk - in) + chunkLength + 12) > insize || (chunk + chunkLength + 12) < in) { CERROR_BREAK(state->error, 64); /*error: size of the in buffer too small to contain next chunk*/ } data = lodepng_chunk_data_const(chunk); unknown = 0; /*IDAT chunk, containing compressed image data*/ if(lodepng_chunk_type_equals(chunk, "IDAT")) { size_t newsize; if(lodepng_addofl(idatsize, chunkLength, &newsize)) CERROR_BREAK(state->error, 95); if(newsize > insize) CERROR_BREAK(state->error, 95); lodepng_memcpy(idat + idatsize, data, chunkLength); idatsize += chunkLength; #ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS critical_pos = 3; #endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ } else if(lodepng_chunk_type_equals(chunk, "IEND")) { /*IEND chunk*/ IEND = 1; } else if(lodepng_chunk_type_equals(chunk, "PLTE")) { /*palette chunk (PLTE)*/ state->error = readChunk_PLTE(&state->info_png.color, data, chunkLength); if(state->error) break; #ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS critical_pos = 2; #endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ } else if(lodepng_chunk_type_equals(chunk, "tRNS")) { /*palette transparency chunk (tRNS). Even though this one is an ancillary chunk , it is still compiled in without 'LODEPNG_COMPILE_ANCILLARY_CHUNKS' because it contains essential color information that affects the alpha channel of pixels. */ state->error = readChunk_tRNS(&state->info_png.color, data, chunkLength); if(state->error) break; #ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS /*background color chunk (bKGD)*/ } else if(lodepng_chunk_type_equals(chunk, "bKGD")) { state->error = readChunk_bKGD(&state->info_png, data, chunkLength); if(state->error) break; } else if(lodepng_chunk_type_equals(chunk, "tEXt")) { /*text chunk (tEXt)*/ if(state->decoder.read_text_chunks) { state->error = readChunk_tEXt(&state->info_png, data, chunkLength); if(state->error) break; } } else if(lodepng_chunk_type_equals(chunk, "zTXt")) { /*compressed text chunk (zTXt)*/ if(state->decoder.read_text_chunks) { state->error = readChunk_zTXt(&state->info_png, &state->decoder, data, chunkLength); if(state->error) break; } } else if(lodepng_chunk_type_equals(chunk, "iTXt")) { /*international text chunk (iTXt)*/ if(state->decoder.read_text_chunks) { state->error = readChunk_iTXt(&state->info_png, &state->decoder, data, chunkLength); if(state->error) break; } } else if(lodepng_chunk_type_equals(chunk, "tIME")) { state->error = readChunk_tIME(&state->info_png, data, chunkLength); if(state->error) break; } else if(lodepng_chunk_type_equals(chunk, "pHYs")) { state->error = readChunk_pHYs(&state->info_png, data, chunkLength); if(state->error) break; } else if(lodepng_chunk_type_equals(chunk, "gAMA")) { state->error = readChunk_gAMA(&state->info_png, data, chunkLength); if(state->error) break; } else if(lodepng_chunk_type_equals(chunk, "cHRM")) { state->error = readChunk_cHRM(&state->info_png, data, chunkLength); if(state->error) break; } else if(lodepng_chunk_type_equals(chunk, "sRGB")) { state->error = readChunk_sRGB(&state->info_png, data, chunkLength); if(state->error) break; } else if(lodepng_chunk_type_equals(chunk, "iCCP")) { state->error = readChunk_iCCP(&state->info_png, &state->decoder, data, chunkLength); if(state->error) break; #endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ } else /*it's not an implemented chunk type, so ignore it: skip over the data*/ { /*error: unknown critical chunk (5th bit of first byte of chunk type is 0)*/ if(!state->decoder.ignore_critical && !lodepng_chunk_ancillary(chunk)) { CERROR_BREAK(state->error, 69); } unknown = 1; #ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS if(state->decoder.remember_unknown_chunks) { state->error = lodepng_chunk_append(&state->info_png.unknown_chunks_data[critical_pos - 1], &state->info_png.unknown_chunks_size[critical_pos - 1], chunk); if(state->error) break; } #endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ } if(!state->decoder.ignore_crc && !unknown) /*check CRC if wanted, only on known chunk types*/ { if(lodepng_chunk_check_crc(chunk)) CERROR_BREAK(state->error, 57); /*invalid CRC*/ } if(!IEND) chunk = lodepng_chunk_next_const(chunk, in + insize); } if(!state->error && state->info_png.color.colortype == LCT_PALETTE && !state->info_png.color.palette) { state->error = 106; /* error: PNG file must have PLTE chunk if color type is palette */ } if(!state->error) { /*predict output size, to allocate exact size for output buffer to avoid more dynamic allocation. If the decompressed size does not match the prediction, the image must be corrupt.*/ if(state->info_png.interlace_method == 0) { size_t bpp = lodepng_get_bpp(&state->info_png.color); expected_size = lodepng_get_raw_size_idat(*w, *h, bpp); } else { size_t bpp = lodepng_get_bpp(&state->info_png.color); /*Adam-7 interlaced: expected size is the sum of the 7 sub-images sizes*/ expected_size = 0; expected_size += lodepng_get_raw_size_idat((*w + 7) >> 3, (*h + 7) >> 3, bpp); if(*w > 4) expected_size += lodepng_get_raw_size_idat((*w + 3) >> 3, (*h + 7) >> 3, bpp); expected_size += lodepng_get_raw_size_idat((*w + 3) >> 2, (*h + 3) >> 3, bpp); if(*w > 2) expected_size += lodepng_get_raw_size_idat((*w + 1) >> 2, (*h + 3) >> 2, bpp); expected_size += lodepng_get_raw_size_idat((*w + 1) >> 1, (*h + 1) >> 2, bpp); if(*w > 1) expected_size += lodepng_get_raw_size_idat((*w + 0) >> 1, (*h + 1) >> 1, bpp); expected_size += lodepng_get_raw_size_idat((*w + 0), (*h + 0) >> 1, bpp); } state->error = zlib_decompress(&scanlines, &scanlines_size, expected_size, idat, idatsize, &state->decoder.zlibsettings); } if(!state->error && scanlines_size != expected_size) state->error = 91; /*decompressed size doesn't match prediction*/ lodepng_free(idat); if(!state->error) { outsize = lodepng_get_raw_size(*w, *h, &state->info_png.color); *out = (unsigned char*)lodepng_malloc(outsize); if(!*out) state->error = 83; /*alloc fail*/ } if(!state->error) { lodepng_memset(*out, 0, outsize); state->error = postProcessScanlines(*out, scanlines, *w, *h, &state->info_png); } lodepng_free(scanlines); } unsigned lodepng_decode(unsigned char** out, unsigned* w, unsigned* h, LodePNGState* state, const unsigned char* in, size_t insize) { *out = 0; decodeGeneric(out, w, h, state, in, insize); if(state->error) return state->error; if(!state->decoder.color_convert || lodepng_color_mode_equal(&state->info_raw, &state->info_png.color)) { /*same color type, no copying or converting of data needed*/ /*store the info_png color settings on the info_raw so that the info_raw still reflects what colortype the raw image has to the end user*/ if(!state->decoder.color_convert) { state->error = lodepng_color_mode_copy(&state->info_raw, &state->info_png.color); if(state->error) return state->error; } } else { /*color conversion needed*/ unsigned char* data = *out; size_t outsize; /*TODO: check if this works according to the statement in the documentation: "The converter can convert from grayscale input color type, to 8-bit grayscale or grayscale with alpha"*/ if(!(state->info_raw.colortype == LCT_RGB || state->info_raw.colortype == LCT_RGBA) && !(state->info_raw.bitdepth == 8)) { return 56; /*unsupported color mode conversion*/ } outsize = lodepng_get_raw_size(*w, *h, &state->info_raw); *out = (unsigned char*)lodepng_malloc(outsize); if(!(*out)) { state->error = 83; /*alloc fail*/ } else state->error = lodepng_convert(*out, data, &state->info_raw, &state->info_png.color, *w, *h); lodepng_free(data); } return state->error; } unsigned lodepng_decode_memory(unsigned char** out, unsigned* w, unsigned* h, const unsigned char* in, size_t insize, LodePNGColorType colortype, unsigned bitdepth) { unsigned error; LodePNGState state; lodepng_state_init(&state); state.info_raw.colortype = colortype; state.info_raw.bitdepth = bitdepth; #ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS /*disable reading things that this function doesn't output*/ state.decoder.read_text_chunks = 0; state.decoder.remember_unknown_chunks = 0; #endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ error = lodepng_decode(out, w, h, &state, in, insize); lodepng_state_cleanup(&state); return error; } unsigned lodepng_decode32(unsigned char** out, unsigned* w, unsigned* h, const unsigned char* in, size_t insize) { return lodepng_decode_memory(out, w, h, in, insize, LCT_RGBA, 8); } unsigned lodepng_decode24(unsigned char** out, unsigned* w, unsigned* h, const unsigned char* in, size_t insize) { return lodepng_decode_memory(out, w, h, in, insize, LCT_RGB, 8); } #ifdef LODEPNG_COMPILE_DISK unsigned lodepng_decode_file(unsigned char** out, unsigned* w, unsigned* h, const char* filename, LodePNGColorType colortype, unsigned bitdepth) { unsigned char* buffer = 0; size_t buffersize; unsigned error; /* safe output values in case error happens */ *out = 0; *w = *h = 0; error = lodepng_load_file(&buffer, &buffersize, filename); if(!error) error = lodepng_decode_memory(out, w, h, buffer, buffersize, colortype, bitdepth); lodepng_free(buffer); return error; } unsigned lodepng_decode32_file(unsigned char** out, unsigned* w, unsigned* h, const char* filename) { return lodepng_decode_file(out, w, h, filename, LCT_RGBA, 8); } unsigned lodepng_decode24_file(unsigned char** out, unsigned* w, unsigned* h, const char* filename) { return lodepng_decode_file(out, w, h, filename, LCT_RGB, 8); } #endif /*LODEPNG_COMPILE_DISK*/ void lodepng_decoder_settings_init(LodePNGDecoderSettings* settings) { settings->color_convert = 1; #ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS settings->read_text_chunks = 1; settings->remember_unknown_chunks = 0; settings->max_text_size = 16777216; settings->max_icc_size = 16777216; /* 16MB is much more than enough for any reasonable ICC profile */ #endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ settings->ignore_crc = 0; settings->ignore_critical = 0; settings->ignore_end = 0; lodepng_decompress_settings_init(&settings->zlibsettings); } #endif /*LODEPNG_COMPILE_DECODER*/ #if defined(LODEPNG_COMPILE_DECODER) || defined(LODEPNG_COMPILE_ENCODER) void lodepng_state_init(LodePNGState* state) { #ifdef LODEPNG_COMPILE_DECODER lodepng_decoder_settings_init(&state->decoder); #endif /*LODEPNG_COMPILE_DECODER*/ #ifdef LODEPNG_COMPILE_ENCODER lodepng_encoder_settings_init(&state->encoder); #endif /*LODEPNG_COMPILE_ENCODER*/ lodepng_color_mode_init(&state->info_raw); lodepng_info_init(&state->info_png); state->error = 1; } void lodepng_state_cleanup(LodePNGState* state) { lodepng_color_mode_cleanup(&state->info_raw); lodepng_info_cleanup(&state->info_png); } void lodepng_state_copy(LodePNGState* dest, const LodePNGState* source) { lodepng_state_cleanup(dest); *dest = *source; lodepng_color_mode_init(&dest->info_raw); lodepng_info_init(&dest->info_png); dest->error = lodepng_color_mode_copy(&dest->info_raw, &source->info_raw); if(dest->error) return; dest->error = lodepng_info_copy(&dest->info_png, &source->info_png); if(dest->error) return; } #endif /* defined(LODEPNG_COMPILE_DECODER) || defined(LODEPNG_COMPILE_ENCODER) */ #ifdef LODEPNG_COMPILE_ENCODER /* ////////////////////////////////////////////////////////////////////////// */ /* / PNG Encoder / */ /* ////////////////////////////////////////////////////////////////////////// */ static unsigned writeSignature(ucvector* out) { size_t pos = out->size; const unsigned char signature[] = {137, 80, 78, 71, 13, 10, 26, 10}; /*8 bytes PNG signature, aka the magic bytes*/ if(!ucvector_resize(out, out->size + 8)) return 83; /*alloc fail*/ lodepng_memcpy(out->data + pos, signature, 8); return 0; } static unsigned addChunk_IHDR(ucvector* out, unsigned w, unsigned h, LodePNGColorType colortype, unsigned bitdepth, unsigned interlace_method) { unsigned char *chunk, *data; CERROR_TRY_RETURN(lodepng_chunk_init(&chunk, out, 13, "IHDR")); data = chunk + 8; lodepng_set32bitInt(data + 0, w); /*width*/ lodepng_set32bitInt(data + 4, h); /*height*/ data[8] = (unsigned char)bitdepth; /*bit depth*/ data[9] = (unsigned char)colortype; /*color type*/ data[10] = 0; /*compression method*/ data[11] = 0; /*filter method*/ data[12] = interlace_method; /*interlace method*/ lodepng_chunk_generate_crc(chunk); return 0; } /* only adds the chunk if needed (there is a key or palette with alpha) */ static unsigned addChunk_PLTE(ucvector* out, const LodePNGColorMode* info) { unsigned char* chunk; size_t i, j = 8; CERROR_TRY_RETURN(lodepng_chunk_init(&chunk, out, info->palettesize * 3, "PLTE")); for(i = 0; i != info->palettesize; ++i) { /*add all channels except alpha channel*/ chunk[j++] = info->palette[i * 4 + 0]; chunk[j++] = info->palette[i * 4 + 1]; chunk[j++] = info->palette[i * 4 + 2]; } lodepng_chunk_generate_crc(chunk); return 0; } static unsigned addChunk_tRNS(ucvector* out, const LodePNGColorMode* info) { unsigned char* chunk = 0; if(info->colortype == LCT_PALETTE) { size_t i, amount = info->palettesize; /*the tail of palette values that all have 255 as alpha, does not have to be encoded*/ for(i = info->palettesize; i != 0; --i) { if(info->palette[4 * (i - 1) + 3] != 255) break; --amount; } if(amount) { CERROR_TRY_RETURN(lodepng_chunk_init(&chunk, out, amount, "tRNS")); /*add the alpha channel values from the palette*/ for(i = 0; i != amount; ++i) chunk[8 + i] = info->palette[4 * i + 3]; } } else if(info->colortype == LCT_GREY) { if(info->key_defined) { CERROR_TRY_RETURN(lodepng_chunk_init(&chunk, out, 2, "tRNS")); chunk[8] = (unsigned char)(info->key_r >> 8); chunk[9] = (unsigned char)(info->key_r & 255); } } else if(info->colortype == LCT_RGB) { if(info->key_defined) { CERROR_TRY_RETURN(lodepng_chunk_init(&chunk, out, 6, "tRNS")); chunk[8] = (unsigned char)(info->key_r >> 8); chunk[9] = (unsigned char)(info->key_r & 255); chunk[10] = (unsigned char)(info->key_g >> 8); chunk[11] = (unsigned char)(info->key_g & 255); chunk[12] = (unsigned char)(info->key_b >> 8); chunk[13] = (unsigned char)(info->key_b & 255); } } if(chunk) lodepng_chunk_generate_crc(chunk); return 0; } static unsigned addChunk_IDAT(ucvector* out, const unsigned char* data, size_t datasize, LodePNGCompressSettings* zlibsettings) { unsigned error = 0; unsigned char* zlib = 0; size_t zlibsize = 0; error = zlib_compress(&zlib, &zlibsize, data, datasize, zlibsettings); if(!error) { error = lodepng_chunk_createv(out, zlibsize, "IDAT", zlib); } lodepng_free(zlib); return error; } static unsigned addChunk_IEND(ucvector* out) { return lodepng_chunk_createv(out, 0, "IEND", 0); } #ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS static unsigned addChunk_tEXt(ucvector* out, const char* keyword, const char* textstring) { unsigned char* chunk = 0; size_t keysize = lodepng_strlen(keyword), textsize = lodepng_strlen(textstring); size_t size = keysize + 1 + textsize; if(keysize < 1 || keysize > 79) return 89; /*error: invalid keyword size*/ CERROR_TRY_RETURN(lodepng_chunk_init(&chunk, out, size, "tEXt")); lodepng_memcpy(chunk + 8, keyword, keysize); chunk[8 + keysize] = 0; /*null termination char*/ lodepng_memcpy(chunk + 9 + keysize, textstring, textsize); lodepng_chunk_generate_crc(chunk); return 0; } static unsigned addChunk_zTXt(ucvector* out, const char* keyword, const char* textstring, LodePNGCompressSettings* zlibsettings) { unsigned error = 0; unsigned char* chunk = 0; unsigned char* compressed = 0; size_t compressedsize = 0; size_t textsize = lodepng_strlen(textstring); size_t keysize = lodepng_strlen(keyword); if(keysize < 1 || keysize > 79) return 89; /*error: invalid keyword size*/ error = zlib_compress(&compressed, &compressedsize, (const unsigned char*)textstring, textsize, zlibsettings); if(!error) { size_t size = keysize + 2 + compressedsize; error = lodepng_chunk_init(&chunk, out, size, "zTXt"); } if(!error) { lodepng_memcpy(chunk + 8, keyword, keysize); chunk[8 + keysize] = 0; /*null termination char*/ chunk[9 + keysize] = 0; /*compression method: 0*/ lodepng_memcpy(chunk + 10 + keysize, compressed, compressedsize); lodepng_chunk_generate_crc(chunk); } lodepng_free(compressed); return error; } static unsigned addChunk_iTXt(ucvector* out, unsigned compress, const char* keyword, const char* langtag, const char* transkey, const char* textstring, LodePNGCompressSettings* zlibsettings) { unsigned error = 0; unsigned char* chunk = 0; unsigned char* compressed = 0; size_t compressedsize = 0; size_t textsize = lodepng_strlen(textstring); size_t keysize = lodepng_strlen(keyword), langsize = lodepng_strlen(langtag), transsize = lodepng_strlen(transkey); if(keysize < 1 || keysize > 79) return 89; /*error: invalid keyword size*/ if(compress) { error = zlib_compress(&compressed, &compressedsize, (const unsigned char*)textstring, textsize, zlibsettings); } if(!error) { size_t size = keysize + 3 + langsize + 1 + transsize + 1 + (compress ? compressedsize : textsize); error = lodepng_chunk_init(&chunk, out, size, "iTXt"); } if(!error) { size_t pos = 8; lodepng_memcpy(chunk + pos, keyword, keysize); pos += keysize; chunk[pos++] = 0; /*null termination char*/ chunk[pos++] = (compress ? 1 : 0); /*compression flag*/ chunk[pos++] = 0; /*compression method: 0*/ lodepng_memcpy(chunk + pos, langtag, langsize); pos += langsize; chunk[pos++] = 0; /*null termination char*/ lodepng_memcpy(chunk + pos, transkey, transsize); pos += transsize; chunk[pos++] = 0; /*null termination char*/ if(compress) { lodepng_memcpy(chunk + pos, compressed, compressedsize); } else { lodepng_memcpy(chunk + pos, textstring, textsize); } lodepng_chunk_generate_crc(chunk); } lodepng_free(compressed); return error; } static unsigned addChunk_bKGD(ucvector* out, const LodePNGInfo* info) { unsigned char* chunk = 0; if(info->color.colortype == LCT_GREY || info->color.colortype == LCT_GREY_ALPHA) { CERROR_TRY_RETURN(lodepng_chunk_init(&chunk, out, 2, "bKGD")); chunk[8] = (unsigned char)(info->background_r >> 8); chunk[9] = (unsigned char)(info->background_r & 255); } else if(info->color.colortype == LCT_RGB || info->color.colortype == LCT_RGBA) { CERROR_TRY_RETURN(lodepng_chunk_init(&chunk, out, 6, "bKGD")); chunk[8] = (unsigned char)(info->background_r >> 8); chunk[9] = (unsigned char)(info->background_r & 255); chunk[10] = (unsigned char)(info->background_g >> 8); chunk[11] = (unsigned char)(info->background_g & 255); chunk[12] = (unsigned char)(info->background_b >> 8); chunk[13] = (unsigned char)(info->background_b & 255); } else if(info->color.colortype == LCT_PALETTE) { CERROR_TRY_RETURN(lodepng_chunk_init(&chunk, out, 1, "bKGD")); chunk[8] = (unsigned char)(info->background_r & 255); /*palette index*/ } if(chunk) lodepng_chunk_generate_crc(chunk); return 0; } static unsigned addChunk_tIME(ucvector* out, const LodePNGTime* time) { unsigned char* chunk; CERROR_TRY_RETURN(lodepng_chunk_init(&chunk, out, 7, "tIME")); chunk[8] = (unsigned char)(time->year >> 8); chunk[9] = (unsigned char)(time->year & 255); chunk[10] = (unsigned char)time->month; chunk[11] = (unsigned char)time->day; chunk[12] = (unsigned char)time->hour; chunk[13] = (unsigned char)time->minute; chunk[14] = (unsigned char)time->second; lodepng_chunk_generate_crc(chunk); return 0; } static unsigned addChunk_pHYs(ucvector* out, const LodePNGInfo* info) { unsigned char* chunk; CERROR_TRY_RETURN(lodepng_chunk_init(&chunk, out, 9, "pHYs")); lodepng_set32bitInt(chunk + 8, info->phys_x); lodepng_set32bitInt(chunk + 12, info->phys_y); chunk[16] = info->phys_unit; lodepng_chunk_generate_crc(chunk); return 0; } static unsigned addChunk_gAMA(ucvector* out, const LodePNGInfo* info) { unsigned char* chunk; CERROR_TRY_RETURN(lodepng_chunk_init(&chunk, out, 4, "gAMA")); lodepng_set32bitInt(chunk + 8, info->gama_gamma); lodepng_chunk_generate_crc(chunk); return 0; } static unsigned addChunk_cHRM(ucvector* out, const LodePNGInfo* info) { unsigned char* chunk; CERROR_TRY_RETURN(lodepng_chunk_init(&chunk, out, 32, "cHRM")); lodepng_set32bitInt(chunk + 8, info->chrm_white_x); lodepng_set32bitInt(chunk + 12, info->chrm_white_y); lodepng_set32bitInt(chunk + 16, info->chrm_red_x); lodepng_set32bitInt(chunk + 20, info->chrm_red_y); lodepng_set32bitInt(chunk + 24, info->chrm_green_x); lodepng_set32bitInt(chunk + 28, info->chrm_green_y); lodepng_set32bitInt(chunk + 32, info->chrm_blue_x); lodepng_set32bitInt(chunk + 36, info->chrm_blue_y); lodepng_chunk_generate_crc(chunk); return 0; } static unsigned addChunk_sRGB(ucvector* out, const LodePNGInfo* info) { unsigned char data = info->srgb_intent; return lodepng_chunk_createv(out, 1, "sRGB", &data); } static unsigned addChunk_iCCP(ucvector* out, const LodePNGInfo* info, LodePNGCompressSettings* zlibsettings) { unsigned error = 0; unsigned char* chunk = 0; unsigned char* compressed = 0; size_t compressedsize = 0; size_t keysize = lodepng_strlen(info->iccp_name); if(keysize < 1 || keysize > 79) return 89; /*error: invalid keyword size*/ error = zlib_compress(&compressed, &compressedsize, info->iccp_profile, info->iccp_profile_size, zlibsettings); if(!error) { size_t size = keysize + 2 + compressedsize; error = lodepng_chunk_init(&chunk, out, size, "iCCP"); } if(!error) { lodepng_memcpy(chunk + 8, info->iccp_name, keysize); chunk[8 + keysize] = 0; /*null termination char*/ chunk[9 + keysize] = 0; /*compression method: 0*/ lodepng_memcpy(chunk + 10 + keysize, compressed, compressedsize); lodepng_chunk_generate_crc(chunk); } lodepng_free(compressed); return error; } #endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ static void filterScanline(unsigned char* out, const unsigned char* scanline, const unsigned char* prevline, size_t length, size_t bytewidth, unsigned char filterType) { size_t i; switch(filterType) { case 0: /*None*/ for(i = 0; i != length; ++i) out[i] = scanline[i]; break; case 1: /*Sub*/ for(i = 0; i != bytewidth; ++i) out[i] = scanline[i]; for(i = bytewidth; i < length; ++i) out[i] = scanline[i] - scanline[i - bytewidth]; break; case 2: /*Up*/ if(prevline) { for(i = 0; i != length; ++i) out[i] = scanline[i] - prevline[i]; } else { for(i = 0; i != length; ++i) out[i] = scanline[i]; } break; case 3: /*Average*/ if(prevline) { for(i = 0; i != bytewidth; ++i) out[i] = scanline[i] - (prevline[i] >> 1); for(i = bytewidth; i < length; ++i) out[i] = scanline[i] - ((scanline[i - bytewidth] + prevline[i]) >> 1); } else { for(i = 0; i != bytewidth; ++i) out[i] = scanline[i]; for(i = bytewidth; i < length; ++i) out[i] = scanline[i] - (scanline[i - bytewidth] >> 1); } break; case 4: /*Paeth*/ if(prevline) { /*paethPredictor(0, prevline[i], 0) is always prevline[i]*/ for(i = 0; i != bytewidth; ++i) out[i] = (scanline[i] - prevline[i]); for(i = bytewidth; i < length; ++i) { out[i] = (scanline[i] - paethPredictor(scanline[i - bytewidth], prevline[i], prevline[i - bytewidth])); } } else { for(i = 0; i != bytewidth; ++i) out[i] = scanline[i]; /*paethPredictor(scanline[i - bytewidth], 0, 0) is always scanline[i - bytewidth]*/ for(i = bytewidth; i < length; ++i) out[i] = (scanline[i] - scanline[i - bytewidth]); } break; default: return; /*invalid filter type given*/ } } /* integer binary logarithm, max return value is 31 */ static size_t ilog2(size_t i) { size_t result = 0; if(i >= 65536) { result += 16; i >>= 16; } if(i >= 256) { result += 8; i >>= 8; } if(i >= 16) { result += 4; i >>= 4; } if(i >= 4) { result += 2; i >>= 2; } if(i >= 2) { result += 1; /*i >>= 1;*/ } return result; } /* integer approximation for i * log2(i), helper function for LFS_ENTROPY */ static size_t ilog2i(size_t i) { size_t l; if(i == 0) return 0; l = ilog2(i); /* approximate i*log2(i): l is integer logarithm, ((i - (1u << l)) << 1u) linearly approximates the missing fractional part multiplied by i */ return i * l + ((i - (1u << l)) << 1u); } static unsigned filter(unsigned char* out, const unsigned char* in, unsigned w, unsigned h, const LodePNGColorMode* color, const LodePNGEncoderSettings* settings) { /* For PNG filter method 0 out must be a buffer with as size: h + (w * h * bpp + 7u) / 8u, because there are the scanlines with 1 extra byte per scanline */ unsigned bpp = lodepng_get_bpp(color); /*the width of a scanline in bytes, not including the filter type*/ size_t linebytes = lodepng_get_raw_size_idat(w, 1, bpp) - 1u; /*bytewidth is used for filtering, is 1 when bpp < 8, number of bytes per pixel otherwise*/ size_t bytewidth = (bpp + 7u) / 8u; const unsigned char* prevline = 0; unsigned x, y; unsigned error = 0; LodePNGFilterStrategy strategy = settings->filter_strategy; /* There is a heuristic called the minimum sum of absolute differences heuristic, suggested by the PNG standard: * If the image type is Palette, or the bit depth is smaller than 8, then do not filter the image (i.e. use fixed filtering, with the filter None). * (The other case) If the image type is Grayscale or RGB (with or without Alpha), and the bit depth is not smaller than 8, then use adaptive filtering heuristic as follows: independently for each row, apply all five filters and select the filter that produces the smallest sum of absolute values per row. This heuristic is used if filter strategy is LFS_MINSUM and filter_palette_zero is true. If filter_palette_zero is true and filter_strategy is not LFS_MINSUM, the above heuristic is followed, but for "the other case", whatever strategy filter_strategy is set to instead of the minimum sum heuristic is used. */ if(settings->filter_palette_zero && (color->colortype == LCT_PALETTE || color->bitdepth < 8)) strategy = LFS_ZERO; if(bpp == 0) return 31; /*error: invalid color type*/ if(strategy >= LFS_ZERO && strategy <= LFS_FOUR) { unsigned char type = (unsigned char)strategy; for(y = 0; y != h; ++y) { size_t outindex = (1 + linebytes) * y; /*the extra filterbyte added to each row*/ size_t inindex = linebytes * y; out[outindex] = type; /*filter type byte*/ filterScanline(&out[outindex + 1], &in[inindex], prevline, linebytes, bytewidth, type); prevline = &in[inindex]; } } else if(strategy == LFS_MINSUM) { /*adaptive filtering*/ unsigned char* attempt[5]; /*five filtering attempts, one for each filter type*/ size_t smallest = 0; unsigned char type, bestType = 0; for(type = 0; type != 5; ++type) { attempt[type] = (unsigned char*)lodepng_malloc(linebytes); if(!attempt[type]) error = 83; /*alloc fail*/ } if(!error) { for(y = 0; y != h; ++y) { /*try the 5 filter types*/ for(type = 0; type != 5; ++type) { size_t sum = 0; filterScanline(attempt[type], &in[y * linebytes], prevline, linebytes, bytewidth, type); /*calculate the sum of the result*/ if(type == 0) { for(x = 0; x != linebytes; ++x) sum += (unsigned char)(attempt[type][x]); } else { for(x = 0; x != linebytes; ++x) { /*For differences, each byte should be treated as signed, values above 127 are negative (converted to signed char). Filtertype 0 isn't a difference though, so use unsigned there. This means filtertype 0 is almost never chosen, but that is justified.*/ unsigned char s = attempt[type][x]; sum += s < 128 ? s : (255U - s); } } /*check if this is smallest sum (or if type == 0 it's the first case so always store the values)*/ if(type == 0 || sum < smallest) { bestType = type; smallest = sum; } } prevline = &in[y * linebytes]; /*now fill the out values*/ out[y * (linebytes + 1)] = bestType; /*the first byte of a scanline will be the filter type*/ for(x = 0; x != linebytes; ++x) out[y * (linebytes + 1) + 1 + x] = attempt[bestType][x]; } } for(type = 0; type != 5; ++type) lodepng_free(attempt[type]); } else if(strategy == LFS_ENTROPY) { unsigned char* attempt[5]; /*five filtering attempts, one for each filter type*/ size_t bestSum = 0; unsigned type, bestType = 0; unsigned count[256]; for(type = 0; type != 5; ++type) { attempt[type] = (unsigned char*)lodepng_malloc(linebytes); if(!attempt[type]) error = 83; /*alloc fail*/ } if(!error) { for(y = 0; y != h; ++y) { /*try the 5 filter types*/ for(type = 0; type != 5; ++type) { size_t sum = 0; filterScanline(attempt[type], &in[y * linebytes], prevline, linebytes, bytewidth, type); lodepng_memset(count, 0, 256 * sizeof(*count)); for(x = 0; x != linebytes; ++x) ++count[attempt[type][x]]; ++count[type]; /*the filter type itself is part of the scanline*/ for(x = 0; x != 256; ++x) { sum += ilog2i(count[x]); } /*check if this is smallest sum (or if type == 0 it's the first case so always store the values)*/ if(type == 0 || sum > bestSum) { bestType = type; bestSum = sum; } } prevline = &in[y * linebytes]; /*now fill the out values*/ out[y * (linebytes + 1)] = bestType; /*the first byte of a scanline will be the filter type*/ for(x = 0; x != linebytes; ++x) out[y * (linebytes + 1) + 1 + x] = attempt[bestType][x]; } } for(type = 0; type != 5; ++type) lodepng_free(attempt[type]); } else if(strategy == LFS_PREDEFINED) { for(y = 0; y != h; ++y) { size_t outindex = (1 + linebytes) * y; /*the extra filterbyte added to each row*/ size_t inindex = linebytes * y; unsigned char type = settings->predefined_filters[y]; out[outindex] = type; /*filter type byte*/ filterScanline(&out[outindex + 1], &in[inindex], prevline, linebytes, bytewidth, type); prevline = &in[inindex]; } } else if(strategy == LFS_BRUTE_FORCE) { /*brute force filter chooser. deflate the scanline after every filter attempt to see which one deflates best. This is very slow and gives only slightly smaller, sometimes even larger, result*/ size_t size[5]; unsigned char* attempt[5]; /*five filtering attempts, one for each filter type*/ size_t smallest = 0; unsigned type = 0, bestType = 0; unsigned char* dummy; LodePNGCompressSettings zlibsettings; lodepng_memcpy(&zlibsettings, &settings->zlibsettings, sizeof(LodePNGCompressSettings)); /*use fixed tree on the attempts so that the tree is not adapted to the filtertype on purpose, to simulate the true case where the tree is the same for the whole image. Sometimes it gives better result with dynamic tree anyway. Using the fixed tree sometimes gives worse, but in rare cases better compression. It does make this a bit less slow, so it's worth doing this.*/ zlibsettings.btype = 1; /*a custom encoder likely doesn't read the btype setting and is optimized for complete PNG images only, so disable it*/ zlibsettings.custom_zlib = 0; zlibsettings.custom_deflate = 0; for(type = 0; type != 5; ++type) { attempt[type] = (unsigned char*)lodepng_malloc(linebytes); if(!attempt[type]) error = 83; /*alloc fail*/ } if(!error) { for(y = 0; y != h; ++y) /*try the 5 filter types*/ { for(type = 0; type != 5; ++type) { unsigned testsize = (unsigned)linebytes; /*if(testsize > 8) testsize /= 8;*/ /*it already works good enough by testing a part of the row*/ filterScanline(attempt[type], &in[y * linebytes], prevline, linebytes, bytewidth, type); size[type] = 0; dummy = 0; zlib_compress(&dummy, &size[type], attempt[type], testsize, &zlibsettings); lodepng_free(dummy); /*check if this is smallest size (or if type == 0 it's the first case so always store the values)*/ if(type == 0 || size[type] < smallest) { bestType = type; smallest = size[type]; } } prevline = &in[y * linebytes]; out[y * (linebytes + 1)] = bestType; /*the first byte of a scanline will be the filter type*/ for(x = 0; x != linebytes; ++x) out[y * (linebytes + 1) + 1 + x] = attempt[bestType][x]; } } for(type = 0; type != 5; ++type) lodepng_free(attempt[type]); } else return 88; /* unknown filter strategy */ return error; } static void addPaddingBits(unsigned char* out, const unsigned char* in, size_t olinebits, size_t ilinebits, unsigned h) { /*The opposite of the removePaddingBits function olinebits must be >= ilinebits*/ unsigned y; size_t diff = olinebits - ilinebits; size_t obp = 0, ibp = 0; /*bit pointers*/ for(y = 0; y != h; ++y) { size_t x; for(x = 0; x < ilinebits; ++x) { unsigned char bit = readBitFromReversedStream(&ibp, in); setBitOfReversedStream(&obp, out, bit); } /*obp += diff; --> no, fill in some value in the padding bits too, to avoid "Use of uninitialised value of size ###" warning from valgrind*/ for(x = 0; x != diff; ++x) setBitOfReversedStream(&obp, out, 0); } } /* in: non-interlaced image with size w*h out: the same pixels, but re-ordered according to PNG's Adam7 interlacing, with no padding bits between scanlines, but between reduced images so that each reduced image starts at a byte. bpp: bits per pixel there are no padding bits, not between scanlines, not between reduced images in has the following size in bits: w * h * bpp. out is possibly bigger due to padding bits between reduced images NOTE: comments about padding bits are only relevant if bpp < 8 */ static void Adam7_interlace(unsigned char* out, const unsigned char* in, unsigned w, unsigned h, unsigned bpp) { unsigned passw[7], passh[7]; size_t filter_passstart[8], padded_passstart[8], passstart[8]; unsigned i; Adam7_getpassvalues(passw, passh, filter_passstart, padded_passstart, passstart, w, h, bpp); if(bpp >= 8) { for(i = 0; i != 7; ++i) { unsigned x, y, b; size_t bytewidth = bpp / 8u; for(y = 0; y < passh[i]; ++y) for(x = 0; x < passw[i]; ++x) { size_t pixelinstart = ((ADAM7_IY[i] + y * ADAM7_DY[i]) * w + ADAM7_IX[i] + x * ADAM7_DX[i]) * bytewidth; size_t pixeloutstart = passstart[i] + (y * passw[i] + x) * bytewidth; for(b = 0; b < bytewidth; ++b) { out[pixeloutstart + b] = in[pixelinstart + b]; } } } } else /*bpp < 8: Adam7 with pixels < 8 bit is a bit trickier: with bit pointers*/ { for(i = 0; i != 7; ++i) { unsigned x, y, b; unsigned ilinebits = bpp * passw[i]; unsigned olinebits = bpp * w; size_t obp, ibp; /*bit pointers (for out and in buffer)*/ for(y = 0; y < passh[i]; ++y) for(x = 0; x < passw[i]; ++x) { ibp = (ADAM7_IY[i] + y * ADAM7_DY[i]) * olinebits + (ADAM7_IX[i] + x * ADAM7_DX[i]) * bpp; obp = (8 * passstart[i]) + (y * ilinebits + x * bpp); for(b = 0; b < bpp; ++b) { unsigned char bit = readBitFromReversedStream(&ibp, in); setBitOfReversedStream(&obp, out, bit); } } } } } /*out must be buffer big enough to contain uncompressed IDAT chunk data, and in must contain the full image. return value is error**/ static unsigned preProcessScanlines(unsigned char** out, size_t* outsize, const unsigned char* in, unsigned w, unsigned h, const LodePNGInfo* info_png, const LodePNGEncoderSettings* settings) { /* This function converts the pure 2D image with the PNG's colortype, into filtered-padded-interlaced data. Steps: *) if no Adam7: 1) add padding bits (= possible extra bits per scanline if bpp < 8) 2) filter *) if adam7: 1) Adam7_interlace 2) 7x add padding bits 3) 7x filter */ unsigned bpp = lodepng_get_bpp(&info_png->color); unsigned error = 0; if(info_png->interlace_method == 0) { *outsize = h + (h * ((w * bpp + 7u) / 8u)); /*image size plus an extra byte per scanline + possible padding bits*/ *out = (unsigned char*)lodepng_malloc(*outsize); if(!(*out) && (*outsize)) error = 83; /*alloc fail*/ if(!error) { /*non multiple of 8 bits per scanline, padding bits needed per scanline*/ if(bpp < 8 && w * bpp != ((w * bpp + 7u) / 8u) * 8u) { unsigned char* padded = (unsigned char*)lodepng_malloc(h * ((w * bpp + 7u) / 8u)); if(!padded) error = 83; /*alloc fail*/ if(!error) { addPaddingBits(padded, in, ((w * bpp + 7u) / 8u) * 8u, w * bpp, h); error = filter(*out, padded, w, h, &info_png->color, settings); } lodepng_free(padded); } else { /*we can immediately filter into the out buffer, no other steps needed*/ error = filter(*out, in, w, h, &info_png->color, settings); } } } else /*interlace_method is 1 (Adam7)*/ { unsigned passw[7], passh[7]; size_t filter_passstart[8], padded_passstart[8], passstart[8]; unsigned char* adam7; Adam7_getpassvalues(passw, passh, filter_passstart, padded_passstart, passstart, w, h, bpp); *outsize = filter_passstart[7]; /*image size plus an extra byte per scanline + possible padding bits*/ *out = (unsigned char*)lodepng_malloc(*outsize); if(!(*out)) error = 83; /*alloc fail*/ adam7 = (unsigned char*)lodepng_malloc(passstart[7]); if(!adam7 && passstart[7]) error = 83; /*alloc fail*/ if(!error) { unsigned i; Adam7_interlace(adam7, in, w, h, bpp); for(i = 0; i != 7; ++i) { if(bpp < 8) { unsigned char* padded = (unsigned char*)lodepng_malloc(padded_passstart[i + 1] - padded_passstart[i]); if(!padded) ERROR_BREAK(83); /*alloc fail*/ addPaddingBits(padded, &adam7[passstart[i]], ((passw[i] * bpp + 7u) / 8u) * 8u, passw[i] * bpp, passh[i]); error = filter(&(*out)[filter_passstart[i]], padded, passw[i], passh[i], &info_png->color, settings); lodepng_free(padded); } else { error = filter(&(*out)[filter_passstart[i]], &adam7[padded_passstart[i]], passw[i], passh[i], &info_png->color, settings); } if(error) break; } } lodepng_free(adam7); } return error; } #ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS static unsigned addUnknownChunks(ucvector* out, unsigned char* data, size_t datasize) { unsigned char* inchunk = data; while((size_t)(inchunk - data) < datasize) { CERROR_TRY_RETURN(lodepng_chunk_append(&out->data, &out->size, inchunk)); out->allocsize = out->size; /*fix the allocsize again*/ inchunk = lodepng_chunk_next(inchunk, data + datasize); } return 0; } static unsigned isGrayICCProfile(const unsigned char* profile, unsigned size) { /* It is a gray profile if bytes 16-19 are "GRAY", rgb profile if bytes 16-19 are "RGB ". We do not perform any full parsing of the ICC profile here, other than check those 4 bytes to grayscale profile. Other than that, validity of the profile is not checked. This is needed only because the PNG specification requires using a non-gray color model if there is an ICC profile with "RGB " (sadly limiting compression opportunities if the input data is grayscale RGB data), and requires using a gray color model if it is "GRAY". */ if(size < 20) return 0; return profile[16] == 'G' && profile[17] == 'R' && profile[18] == 'A' && profile[19] == 'Y'; } static unsigned isRGBICCProfile(const unsigned char* profile, unsigned size) { /* See comment in isGrayICCProfile*/ if(size < 20) return 0; return profile[16] == 'R' && profile[17] == 'G' && profile[18] == 'B' && profile[19] == ' '; } #endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ unsigned lodepng_encode(unsigned char** out, size_t* outsize, const unsigned char* image, unsigned w, unsigned h, LodePNGState* state) { unsigned char* data = 0; /*uncompressed version of the IDAT chunk data*/ size_t datasize = 0; ucvector outv = ucvector_init(NULL, 0); LodePNGInfo info; const LodePNGInfo* info_png = &state->info_png; lodepng_info_init(&info); /*provide some proper output values if error will happen*/ *out = 0; *outsize = 0; state->error = 0; /*check input values validity*/ if((info_png->color.colortype == LCT_PALETTE || state->encoder.force_palette) && (info_png->color.palettesize == 0 || info_png->color.palettesize > 256)) { state->error = 68; /*invalid palette size, it is only allowed to be 1-256*/ goto cleanup; } if(state->encoder.zlibsettings.btype > 2) { state->error = 61; /*error: invalid btype*/ goto cleanup; } if(info_png->interlace_method > 1) { state->error = 71; /*error: invalid interlace mode*/ goto cleanup; } state->error = checkColorValidity(info_png->color.colortype, info_png->color.bitdepth); if(state->error) goto cleanup; /*error: invalid color type given*/ state->error = checkColorValidity(state->info_raw.colortype, state->info_raw.bitdepth); if(state->error) goto cleanup; /*error: invalid color type given*/ /* color convert and compute scanline filter types */ lodepng_info_copy(&info, &state->info_png); if(state->encoder.auto_convert) { LodePNGColorStats stats; lodepng_color_stats_init(&stats); #ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS if(info_png->iccp_defined && isGrayICCProfile(info_png->iccp_profile, info_png->iccp_profile_size)) { /*the PNG specification does not allow to use palette with a GRAY ICC profile, even if the palette has only gray colors, so disallow it.*/ stats.allow_palette = 0; } if(info_png->iccp_defined && isRGBICCProfile(info_png->iccp_profile, info_png->iccp_profile_size)) { /*the PNG specification does not allow to use grayscale color with RGB ICC profile, so disallow gray.*/ stats.allow_greyscale = 0; } #endif /* LODEPNG_COMPILE_ANCILLARY_CHUNKS */ state->error = lodepng_compute_color_stats(&stats, image, w, h, &state->info_raw); if(state->error) goto cleanup; #ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS if(info_png->background_defined) { /*the background chunk's color must be taken into account as well*/ unsigned r = 0, g = 0, b = 0; LodePNGColorMode mode16 = lodepng_color_mode_make(LCT_RGB, 16); lodepng_convert_rgb(&r, &g, &b, info_png->background_r, info_png->background_g, info_png->background_b, &mode16, &info_png->color); state->error = lodepng_color_stats_add(&stats, r, g, b, 65535); if(state->error) goto cleanup; } #endif /* LODEPNG_COMPILE_ANCILLARY_CHUNKS */ state->error = auto_choose_color(&info.color, &state->info_raw, &stats); if(state->error) goto cleanup; #ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS /*also convert the background chunk*/ if(info_png->background_defined) { if(lodepng_convert_rgb(&info.background_r, &info.background_g, &info.background_b, info_png->background_r, info_png->background_g, info_png->background_b, &info.color, &info_png->color)) { state->error = 104; goto cleanup; } } #endif /* LODEPNG_COMPILE_ANCILLARY_CHUNKS */ } #ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS if(info_png->iccp_defined) { unsigned gray_icc = isGrayICCProfile(info_png->iccp_profile, info_png->iccp_profile_size); unsigned rgb_icc = isRGBICCProfile(info_png->iccp_profile, info_png->iccp_profile_size); unsigned gray_png = info.color.colortype == LCT_GREY || info.color.colortype == LCT_GREY_ALPHA; if(!gray_icc && !rgb_icc) { state->error = 100; /* Disallowed profile color type for PNG */ goto cleanup; } if(gray_icc != gray_png) { /*Not allowed to use RGB/RGBA/palette with GRAY ICC profile or vice versa, or in case of auto_convert, it wasn't possible to find appropriate model*/ state->error = state->encoder.auto_convert ? 102 : 101; goto cleanup; } } #endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ if(!lodepng_color_mode_equal(&state->info_raw, &info.color)) { unsigned char* converted; size_t size = ((size_t)w * (size_t)h * (size_t)lodepng_get_bpp(&info.color) + 7u) / 8u; converted = (unsigned char*)lodepng_malloc(size); if(!converted && size) state->error = 83; /*alloc fail*/ if(!state->error) { state->error = lodepng_convert(converted, image, &info.color, &state->info_raw, w, h); } if(!state->error) { state->error = preProcessScanlines(&data, &datasize, converted, w, h, &info, &state->encoder); } lodepng_free(converted); if(state->error) goto cleanup; } else { state->error = preProcessScanlines(&data, &datasize, image, w, h, &info, &state->encoder); if(state->error) goto cleanup; } /* output all PNG chunks */ { #ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS size_t i; #endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ /*write signature and chunks*/ state->error = writeSignature(&outv); if(state->error) goto cleanup; /*IHDR*/ state->error = addChunk_IHDR(&outv, w, h, info.color.colortype, info.color.bitdepth, info.interlace_method); if(state->error) goto cleanup; #ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS /*unknown chunks between IHDR and PLTE*/ if(info.unknown_chunks_data[0]) { state->error = addUnknownChunks(&outv, info.unknown_chunks_data[0], info.unknown_chunks_size[0]); if(state->error) goto cleanup; } /*color profile chunks must come before PLTE */ if(info.iccp_defined) { state->error = addChunk_iCCP(&outv, &info, &state->encoder.zlibsettings); if(state->error) goto cleanup; } if(info.srgb_defined) { state->error = addChunk_sRGB(&outv, &info); if(state->error) goto cleanup; } if(info.gama_defined) { state->error = addChunk_gAMA(&outv, &info); if(state->error) goto cleanup; } if(info.chrm_defined) { state->error = addChunk_cHRM(&outv, &info); if(state->error) goto cleanup; } #endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ /*PLTE*/ if(info.color.colortype == LCT_PALETTE) { state->error = addChunk_PLTE(&outv, &info.color); if(state->error) goto cleanup; } if(state->encoder.force_palette && (info.color.colortype == LCT_RGB || info.color.colortype == LCT_RGBA)) { /*force_palette means: write suggested palette for truecolor in PLTE chunk*/ state->error = addChunk_PLTE(&outv, &info.color); if(state->error) goto cleanup; } /*tRNS (this will only add if when necessary) */ state->error = addChunk_tRNS(&outv, &info.color); if(state->error) goto cleanup; #ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS /*bKGD (must come between PLTE and the IDAt chunks*/ if(info.background_defined) { state->error = addChunk_bKGD(&outv, &info); if(state->error) goto cleanup; } /*pHYs (must come before the IDAT chunks)*/ if(info.phys_defined) { state->error = addChunk_pHYs(&outv, &info); if(state->error) goto cleanup; } /*unknown chunks between PLTE and IDAT*/ if(info.unknown_chunks_data[1]) { state->error = addUnknownChunks(&outv, info.unknown_chunks_data[1], info.unknown_chunks_size[1]); if(state->error) goto cleanup; } #endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ /*IDAT (multiple IDAT chunks must be consecutive)*/ state->error = addChunk_IDAT(&outv, data, datasize, &state->encoder.zlibsettings); if(state->error) goto cleanup; #ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS /*tIME*/ if(info.time_defined) { state->error = addChunk_tIME(&outv, &info.time); if(state->error) goto cleanup; } /*tEXt and/or zTXt*/ for(i = 0; i != info.text_num; ++i) { if(lodepng_strlen(info.text_keys[i]) > 79) { state->error = 66; /*text chunk too large*/ goto cleanup; } if(lodepng_strlen(info.text_keys[i]) < 1) { state->error = 67; /*text chunk too small*/ goto cleanup; } if(state->encoder.text_compression) { state->error = addChunk_zTXt(&outv, info.text_keys[i], info.text_strings[i], &state->encoder.zlibsettings); if(state->error) goto cleanup; } else { state->error = addChunk_tEXt(&outv, info.text_keys[i], info.text_strings[i]); if(state->error) goto cleanup; } } /*LodePNG version id in text chunk*/ if(state->encoder.add_id) { unsigned already_added_id_text = 0; for(i = 0; i != info.text_num; ++i) { const char* k = info.text_keys[i]; /* Could use strcmp, but we're not calling or reimplementing this C library function for this use only */ if(k[0] == 'L' && k[1] == 'o' && k[2] == 'd' && k[3] == 'e' && k[4] == 'P' && k[5] == 'N' && k[6] == 'G' && k[7] == '\0') { already_added_id_text = 1; break; } } if(already_added_id_text == 0) { state->error = addChunk_tEXt(&outv, "LodePNG", LODEPNG_VERSION_STRING); /*it's shorter as tEXt than as zTXt chunk*/ if(state->error) goto cleanup; } } /*iTXt*/ for(i = 0; i != info.itext_num; ++i) { if(lodepng_strlen(info.itext_keys[i]) > 79) { state->error = 66; /*text chunk too large*/ goto cleanup; } if(lodepng_strlen(info.itext_keys[i]) < 1) { state->error = 67; /*text chunk too small*/ goto cleanup; } state->error = addChunk_iTXt( &outv, state->encoder.text_compression, info.itext_keys[i], info.itext_langtags[i], info.itext_transkeys[i], info.itext_strings[i], &state->encoder.zlibsettings); if(state->error) goto cleanup; } /*unknown chunks between IDAT and IEND*/ if(info.unknown_chunks_data[2]) { state->error = addUnknownChunks(&outv, info.unknown_chunks_data[2], info.unknown_chunks_size[2]); if(state->error) goto cleanup; } #endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ state->error = addChunk_IEND(&outv); if(state->error) goto cleanup; } cleanup: lodepng_info_cleanup(&info); lodepng_free(data); /*instead of cleaning the vector up, give it to the output*/ *out = outv.data; *outsize = outv.size; return state->error; } unsigned lodepng_encode_memory(unsigned char** out, size_t* outsize, const unsigned char* image, unsigned w, unsigned h, LodePNGColorType colortype, unsigned bitdepth) { unsigned error; LodePNGState state; lodepng_state_init(&state); state.info_raw.colortype = colortype; state.info_raw.bitdepth = bitdepth; state.info_png.color.colortype = colortype; state.info_png.color.bitdepth = bitdepth; lodepng_encode(out, outsize, image, w, h, &state); error = state.error; lodepng_state_cleanup(&state); return error; } unsigned lodepng_encode32(unsigned char** out, size_t* outsize, const unsigned char* image, unsigned w, unsigned h) { return lodepng_encode_memory(out, outsize, image, w, h, LCT_RGBA, 8); } unsigned lodepng_encode24(unsigned char** out, size_t* outsize, const unsigned char* image, unsigned w, unsigned h) { return lodepng_encode_memory(out, outsize, image, w, h, LCT_RGB, 8); } #ifdef LODEPNG_COMPILE_DISK unsigned lodepng_encode_file(const char* filename, const unsigned char* image, unsigned w, unsigned h, LodePNGColorType colortype, unsigned bitdepth) { unsigned char* buffer; size_t buffersize; unsigned error = lodepng_encode_memory(&buffer, &buffersize, image, w, h, colortype, bitdepth); if(!error) error = lodepng_save_file(buffer, buffersize, filename); lodepng_free(buffer); return error; } unsigned lodepng_encode32_file(const char* filename, const unsigned char* image, unsigned w, unsigned h) { return lodepng_encode_file(filename, image, w, h, LCT_RGBA, 8); } unsigned lodepng_encode24_file(const char* filename, const unsigned char* image, unsigned w, unsigned h) { return lodepng_encode_file(filename, image, w, h, LCT_RGB, 8); } #endif /*LODEPNG_COMPILE_DISK*/ void lodepng_encoder_settings_init(LodePNGEncoderSettings* settings) { lodepng_compress_settings_init(&settings->zlibsettings); settings->filter_palette_zero = 1; settings->filter_strategy = LFS_MINSUM; settings->auto_convert = 1; settings->force_palette = 0; settings->predefined_filters = 0; #ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS settings->add_id = 0; settings->text_compression = 1; #endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ } #endif /*LODEPNG_COMPILE_ENCODER*/ #endif /*LODEPNG_COMPILE_PNG*/ #ifdef LODEPNG_COMPILE_ERROR_TEXT /* This returns the description of a numerical error code in English. This is also the documentation of all the error codes. */ const char* lodepng_error_text(unsigned code) { switch(code) { case 0: return "no error, everything went ok"; case 1: return "nothing done yet"; /*the Encoder/Decoder has done nothing yet, error checking makes no sense yet*/ case 10: return "end of input memory reached without huffman end code"; /*while huffman decoding*/ case 11: return "error in code tree made it jump outside of huffman tree"; /*while huffman decoding*/ case 13: return "problem while processing dynamic deflate block"; case 14: return "problem while processing dynamic deflate block"; case 15: return "problem while processing dynamic deflate block"; /*this error could happen if there are only 0 or 1 symbols present in the huffman code:*/ case 16: return "invalid code while processing dynamic deflate block"; case 17: return "end of out buffer memory reached while inflating"; case 18: return "invalid distance code while inflating"; case 19: return "end of out buffer memory reached while inflating"; case 20: return "invalid deflate block BTYPE encountered while decoding"; case 21: return "NLEN is not ones complement of LEN in a deflate block"; /*end of out buffer memory reached while inflating: This can happen if the inflated deflate data is longer than the amount of bytes required to fill up all the pixels of the image, given the color depth and image dimensions. Something that doesn't happen in a normal, well encoded, PNG image.*/ case 22: return "end of out buffer memory reached while inflating"; case 23: return "end of in buffer memory reached while inflating"; case 24: return "invalid FCHECK in zlib header"; case 25: return "invalid compression method in zlib header"; case 26: return "FDICT encountered in zlib header while it's not used for PNG"; case 27: return "PNG file is smaller than a PNG header"; /*Checks the magic file header, the first 8 bytes of the PNG file*/ case 28: return "incorrect PNG signature, it's no PNG or corrupted"; case 29: return "first chunk is not the header chunk"; case 30: return "chunk length too large, chunk broken off at end of file"; case 31: return "illegal PNG color type or bpp"; case 32: return "illegal PNG compression method"; case 33: return "illegal PNG filter method"; case 34: return "illegal PNG interlace method"; case 35: return "chunk length of a chunk is too large or the chunk too small"; case 36: return "illegal PNG filter type encountered"; case 37: return "illegal bit depth for this color type given"; case 38: return "the palette is too small or too big"; /*0, or more than 256 colors*/ case 39: return "tRNS chunk before PLTE or has more entries than palette size"; case 40: return "tRNS chunk has wrong size for grayscale image"; case 41: return "tRNS chunk has wrong size for RGB image"; case 42: return "tRNS chunk appeared while it was not allowed for this color type"; case 43: return "bKGD chunk has wrong size for palette image"; case 44: return "bKGD chunk has wrong size for grayscale image"; case 45: return "bKGD chunk has wrong size for RGB image"; case 48: return "empty input buffer given to decoder. Maybe caused by non-existing file?"; case 49: return "jumped past memory while generating dynamic huffman tree"; case 50: return "jumped past memory while generating dynamic huffman tree"; case 51: return "jumped past memory while inflating huffman block"; case 52: return "jumped past memory while inflating"; case 53: return "size of zlib data too small"; case 54: return "repeat symbol in tree while there was no value symbol yet"; /*jumped past tree while generating huffman tree, this could be when the tree will have more leaves than symbols after generating it out of the given lengths. They call this an oversubscribed dynamic bit lengths tree in zlib.*/ case 55: return "jumped past tree while generating huffman tree"; case 56: return "given output image colortype or bitdepth not supported for color conversion"; case 57: return "invalid CRC encountered (checking CRC can be disabled)"; case 58: return "invalid ADLER32 encountered (checking ADLER32 can be disabled)"; case 59: return "requested color conversion not supported"; case 60: return "invalid window size given in the settings of the encoder (must be 0-32768)"; case 61: return "invalid BTYPE given in the settings of the encoder (only 0, 1 and 2 are allowed)"; /*LodePNG leaves the choice of RGB to grayscale conversion formula to the user.*/ case 62: return "conversion from color to grayscale not supported"; /*(2^31-1)*/ case 63: return "length of a chunk too long, max allowed for PNG is 2147483647 bytes per chunk"; /*this would result in the inability of a deflated block to ever contain an end code. It must be at least 1.*/ case 64: return "the length of the END symbol 256 in the Huffman tree is 0"; case 66: return "the length of a text chunk keyword given to the encoder is longer than the maximum of 79 bytes"; case 67: return "the length of a text chunk keyword given to the encoder is smaller than the minimum of 1 byte"; case 68: return "tried to encode a PLTE chunk with a palette that has less than 1 or more than 256 colors"; case 69: return "unknown chunk type with 'critical' flag encountered by the decoder"; case 71: return "invalid interlace mode given to encoder (must be 0 or 1)"; case 72: return "while decoding, invalid compression method encountering in zTXt or iTXt chunk (it must be 0)"; case 73: return "invalid tIME chunk size"; case 74: return "invalid pHYs chunk size"; /*length could be wrong, or data chopped off*/ case 75: return "no null termination char found while decoding text chunk"; case 76: return "iTXt chunk too short to contain required bytes"; case 77: return "integer overflow in buffer size"; case 78: return "failed to open file for reading"; /*file doesn't exist or couldn't be opened for reading*/ case 79: return "failed to open file for writing"; case 80: return "tried creating a tree of 0 symbols"; case 81: return "lazy matching at pos 0 is impossible"; case 82: return "color conversion to palette requested while a color isn't in palette, or index out of bounds"; case 83: return "memory allocation failed"; case 84: return "given image too small to contain all pixels to be encoded"; case 86: return "impossible offset in lz77 encoding (internal bug)"; case 87: return "must provide custom zlib function pointer if LODEPNG_COMPILE_ZLIB is not defined"; case 88: return "invalid filter strategy given for LodePNGEncoderSettings.filter_strategy"; case 89: return "text chunk keyword too short or long: must have size 1-79"; /*the windowsize in the LodePNGCompressSettings. Requiring POT(==> & instead of %) makes encoding 12% faster.*/ case 90: return "windowsize must be a power of two"; case 91: return "invalid decompressed idat size"; case 92: return "integer overflow due to too many pixels"; case 93: return "zero width or height is invalid"; case 94: return "header chunk must have a size of 13 bytes"; case 95: return "integer overflow with combined idat chunk size"; case 96: return "invalid gAMA chunk size"; case 97: return "invalid cHRM chunk size"; case 98: return "invalid sRGB chunk size"; case 99: return "invalid sRGB rendering intent"; case 100: return "invalid ICC profile color type, the PNG specification only allows RGB or GRAY"; case 101: return "PNG specification does not allow RGB ICC profile on gray color types and vice versa"; case 102: return "not allowed to set grayscale ICC profile with colored pixels by PNG specification"; case 103: return "invalid palette index in bKGD chunk. Maybe it came before PLTE chunk?"; case 104: return "invalid bKGD color while encoding (e.g. palette index out of range)"; case 105: return "integer overflow of bitsize"; case 106: return "PNG file must have PLTE chunk if color type is palette"; case 107: return "color convert from palette mode requested without setting the palette data in it"; case 108: return "tried to add more than 256 values to a palette"; /*this limit can be configured in LodePNGDecompressSettings*/ case 109: return "tried to decompress zlib or deflate data larger than desired max_output_size"; case 110: return "custom zlib or inflate decompression failed"; case 111: return "custom zlib or deflate compression failed"; /*max text size limit can be configured in LodePNGDecoderSettings. This error prevents unreasonable memory consumption when decoding due to impossibly large text sizes.*/ case 112: return "compressed text unreasonably large"; /*max ICC size limit can be configured in LodePNGDecoderSettings. This error prevents unreasonable memory consumption when decoding due to impossibly large ICC profile*/ case 113: return "ICC profile unreasonably large"; } return "unknown error code"; } #endif /*LODEPNG_COMPILE_ERROR_TEXT*/ /* ////////////////////////////////////////////////////////////////////////// */ /* ////////////////////////////////////////////////////////////////////////// */ /* // C++ Wrapper // */ /* ////////////////////////////////////////////////////////////////////////// */ /* ////////////////////////////////////////////////////////////////////////// */ #ifdef LODEPNG_COMPILE_CPP namespace lodepng { #ifdef LODEPNG_COMPILE_DISK unsigned load_file(std::vector& buffer, const std::string& filename) { long size = lodepng_filesize(filename.c_str()); if(size < 0) return 78; buffer.resize((size_t)size); return size == 0 ? 0 : lodepng_buffer_file(&buffer[0], (size_t)size, filename.c_str()); } /*write given buffer to the file, overwriting the file, it doesn't append to it.*/ unsigned save_file(const std::vector& buffer, const std::string& filename) { return lodepng_save_file(buffer.empty() ? 0 : &buffer[0], buffer.size(), filename.c_str()); } #endif /* LODEPNG_COMPILE_DISK */ #ifdef LODEPNG_COMPILE_ZLIB #ifdef LODEPNG_COMPILE_DECODER unsigned decompress(std::vector& out, const unsigned char* in, size_t insize, const LodePNGDecompressSettings& settings) { unsigned char* buffer = 0; size_t buffersize = 0; unsigned error = zlib_decompress(&buffer, &buffersize, 0, in, insize, &settings); if(buffer) { out.insert(out.end(), &buffer[0], &buffer[buffersize]); lodepng_free(buffer); } return error; } unsigned decompress(std::vector& out, const std::vector& in, const LodePNGDecompressSettings& settings) { return decompress(out, in.empty() ? 0 : &in[0], in.size(), settings); } #endif /* LODEPNG_COMPILE_DECODER */ #ifdef LODEPNG_COMPILE_ENCODER unsigned compress(std::vector& out, const unsigned char* in, size_t insize, const LodePNGCompressSettings& settings) { unsigned char* buffer = 0; size_t buffersize = 0; unsigned error = zlib_compress(&buffer, &buffersize, in, insize, &settings); if(buffer) { out.insert(out.end(), &buffer[0], &buffer[buffersize]); lodepng_free(buffer); } return error; } unsigned compress(std::vector& out, const std::vector& in, const LodePNGCompressSettings& settings) { return compress(out, in.empty() ? 0 : &in[0], in.size(), settings); } #endif /* LODEPNG_COMPILE_ENCODER */ #endif /* LODEPNG_COMPILE_ZLIB */ #ifdef LODEPNG_COMPILE_PNG State::State() { lodepng_state_init(this); } State::State(const State& other) { lodepng_state_init(this); lodepng_state_copy(this, &other); } State::~State() { lodepng_state_cleanup(this); } State& State::operator=(const State& other) { lodepng_state_copy(this, &other); return *this; } #ifdef LODEPNG_COMPILE_DECODER unsigned decode(std::vector& out, unsigned& w, unsigned& h, const unsigned char* in, size_t insize, LodePNGColorType colortype, unsigned bitdepth) { unsigned char* buffer = 0; unsigned error = lodepng_decode_memory(&buffer, &w, &h, in, insize, colortype, bitdepth); if(buffer && !error) { State state; state.info_raw.colortype = colortype; state.info_raw.bitdepth = bitdepth; size_t buffersize = lodepng_get_raw_size(w, h, &state.info_raw); out.insert(out.end(), &buffer[0], &buffer[buffersize]); } lodepng_free(buffer); return error; } unsigned decode(std::vector& out, unsigned& w, unsigned& h, const std::vector& in, LodePNGColorType colortype, unsigned bitdepth) { return decode(out, w, h, in.empty() ? 0 : &in[0], (unsigned)in.size(), colortype, bitdepth); } unsigned decode(std::vector& out, unsigned& w, unsigned& h, State& state, const unsigned char* in, size_t insize) { unsigned char* buffer = NULL; unsigned error = lodepng_decode(&buffer, &w, &h, &state, in, insize); if(buffer && !error) { size_t buffersize = lodepng_get_raw_size(w, h, &state.info_raw); out.insert(out.end(), &buffer[0], &buffer[buffersize]); } lodepng_free(buffer); return error; } unsigned decode(std::vector& out, unsigned& w, unsigned& h, State& state, const std::vector& in) { return decode(out, w, h, state, in.empty() ? 0 : &in[0], in.size()); } #ifdef LODEPNG_COMPILE_DISK unsigned decode(std::vector& out, unsigned& w, unsigned& h, const std::string& filename, LodePNGColorType colortype, unsigned bitdepth) { std::vector buffer; /* safe output values in case error happens */ w = h = 0; unsigned error = load_file(buffer, filename); if(error) return error; return decode(out, w, h, buffer, colortype, bitdepth); } #endif /* LODEPNG_COMPILE_DECODER */ #endif /* LODEPNG_COMPILE_DISK */ #ifdef LODEPNG_COMPILE_ENCODER unsigned encode(std::vector& out, const unsigned char* in, unsigned w, unsigned h, LodePNGColorType colortype, unsigned bitdepth) { unsigned char* buffer; size_t buffersize; unsigned error = lodepng_encode_memory(&buffer, &buffersize, in, w, h, colortype, bitdepth); if(buffer) { out.insert(out.end(), &buffer[0], &buffer[buffersize]); lodepng_free(buffer); } return error; } unsigned encode(std::vector& out, const std::vector& in, unsigned w, unsigned h, LodePNGColorType colortype, unsigned bitdepth) { if(lodepng_get_raw_size_lct(w, h, colortype, bitdepth) > in.size()) return 84; return encode(out, in.empty() ? 0 : &in[0], w, h, colortype, bitdepth); } unsigned encode(std::vector& out, const unsigned char* in, unsigned w, unsigned h, State& state) { unsigned char* buffer; size_t buffersize; unsigned error = lodepng_encode(&buffer, &buffersize, in, w, h, &state); if(buffer) { out.insert(out.end(), &buffer[0], &buffer[buffersize]); lodepng_free(buffer); } return error; } unsigned encode(std::vector& out, const std::vector& in, unsigned w, unsigned h, State& state) { if(lodepng_get_raw_size(w, h, &state.info_raw) > in.size()) return 84; return encode(out, in.empty() ? 0 : &in[0], w, h, state); } #ifdef LODEPNG_COMPILE_DISK unsigned encode(const std::string& filename, const unsigned char* in, unsigned w, unsigned h, LodePNGColorType colortype, unsigned bitdepth) { std::vector buffer; unsigned error = encode(buffer, in, w, h, colortype, bitdepth); if(!error) error = save_file(buffer, filename); return error; } unsigned encode(const std::string& filename, const std::vector& in, unsigned w, unsigned h, LodePNGColorType colortype, unsigned bitdepth) { if(lodepng_get_raw_size_lct(w, h, colortype, bitdepth) > in.size()) return 84; return encode(filename, in.empty() ? 0 : &in[0], w, h, colortype, bitdepth); } #endif /* LODEPNG_COMPILE_DISK */ #endif /* LODEPNG_COMPILE_ENCODER */ #endif /* LODEPNG_COMPILE_PNG */ } /* namespace lodepng */ #endif /*LODEPNG_COMPILE_CPP*/ ================================================ FILE: src/libraries/lodepng/lodepng.h ================================================ /* LodePNG version 20210627 Copyright (c) 2005-2021 Lode Vandevenne This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ #ifndef LODEPNG_H #define LODEPNG_H #include /*for size_t*/ extern const char* LODEPNG_VERSION_STRING; /* The following #defines are used to create code sections. They can be disabled to disable code sections, which can give faster compile time and smaller binary. The "NO_COMPILE" defines are designed to be used to pass as defines to the compiler command to disable them without modifying this header, e.g. -DLODEPNG_NO_COMPILE_ZLIB for gcc. In addition to those below, you can also define LODEPNG_NO_COMPILE_CRC to allow implementing a custom lodepng_crc32. */ /*deflate & zlib. If disabled, you must specify alternative zlib functions in the custom_zlib field of the compress and decompress settings*/ #ifndef LODEPNG_NO_COMPILE_ZLIB #define LODEPNG_COMPILE_ZLIB #endif /*png encoder and png decoder*/ #ifndef LODEPNG_NO_COMPILE_PNG #define LODEPNG_COMPILE_PNG #endif /*deflate&zlib decoder and png decoder*/ #ifndef LODEPNG_NO_COMPILE_DECODER #define LODEPNG_COMPILE_DECODER #endif /*deflate&zlib encoder and png encoder*/ #ifndef LODEPNG_NO_COMPILE_ENCODER #define LODEPNG_COMPILE_ENCODER #endif /*the optional built in harddisk file loading and saving functions*/ #ifndef LODEPNG_NO_COMPILE_DISK #define LODEPNG_COMPILE_DISK #endif /*support for chunks other than IHDR, IDAT, PLTE, tRNS, IEND: ancillary and unknown chunks*/ #ifndef LODEPNG_NO_COMPILE_ANCILLARY_CHUNKS #define LODEPNG_COMPILE_ANCILLARY_CHUNKS #endif /*ability to convert error numerical codes to English text string*/ #ifndef LODEPNG_NO_COMPILE_ERROR_TEXT #define LODEPNG_COMPILE_ERROR_TEXT #endif /*Compile the default allocators (C's free, malloc and realloc). If you disable this, you can define the functions lodepng_free, lodepng_malloc and lodepng_realloc in your source files with custom allocators.*/ #ifndef LODEPNG_NO_COMPILE_ALLOCATORS #define LODEPNG_COMPILE_ALLOCATORS #endif /*compile the C++ version (you can disable the C++ wrapper here even when compiling for C++)*/ #ifdef __cplusplus #ifndef LODEPNG_NO_COMPILE_CPP #define LODEPNG_COMPILE_CPP #endif #endif #ifdef LODEPNG_COMPILE_CPP #include #include #endif /*LODEPNG_COMPILE_CPP*/ #ifdef LODEPNG_COMPILE_PNG /*The PNG color types (also used for raw image).*/ typedef enum LodePNGColorType { LCT_GREY = 0, /*grayscale: 1,2,4,8,16 bit*/ LCT_RGB = 2, /*RGB: 8,16 bit*/ LCT_PALETTE = 3, /*palette: 1,2,4,8 bit*/ LCT_GREY_ALPHA = 4, /*grayscale with alpha: 8,16 bit*/ LCT_RGBA = 6, /*RGB with alpha: 8,16 bit*/ /*LCT_MAX_OCTET_VALUE lets the compiler allow this enum to represent any invalid byte value from 0 to 255 that could be present in an invalid PNG file header. Do not use, compare with or set the name LCT_MAX_OCTET_VALUE, instead either use the valid color type names above, or numeric values like 1 or 7 when checking for particular disallowed color type byte values, or cast to integer to print it.*/ LCT_MAX_OCTET_VALUE = 255 } LodePNGColorType; #ifdef LODEPNG_COMPILE_DECODER /* Converts PNG data in memory to raw pixel data. out: Output parameter. Pointer to buffer that will contain the raw pixel data. After decoding, its size is w * h * (bytes per pixel) bytes larger than initially. Bytes per pixel depends on colortype and bitdepth. Must be freed after usage with free(*out). Note: for 16-bit per channel colors, uses big endian format like PNG does. w: Output parameter. Pointer to width of pixel data. h: Output parameter. Pointer to height of pixel data. in: Memory buffer with the PNG file. insize: size of the in buffer. colortype: the desired color type for the raw output image. See explanation on PNG color types. bitdepth: the desired bit depth for the raw output image. See explanation on PNG color types. Return value: LodePNG error code (0 means no error). */ unsigned lodepng_decode_memory(unsigned char** out, unsigned* w, unsigned* h, const unsigned char* in, size_t insize, LodePNGColorType colortype, unsigned bitdepth); /*Same as lodepng_decode_memory, but always decodes to 32-bit RGBA raw image*/ unsigned lodepng_decode32(unsigned char** out, unsigned* w, unsigned* h, const unsigned char* in, size_t insize); /*Same as lodepng_decode_memory, but always decodes to 24-bit RGB raw image*/ unsigned lodepng_decode24(unsigned char** out, unsigned* w, unsigned* h, const unsigned char* in, size_t insize); #ifdef LODEPNG_COMPILE_DISK /* Load PNG from disk, from file with given name. Same as the other decode functions, but instead takes a filename as input. NOTE: Wide-character filenames are not supported, you can use an external method to handle such files and decode in-memory.*/ unsigned lodepng_decode_file(unsigned char** out, unsigned* w, unsigned* h, const char* filename, LodePNGColorType colortype, unsigned bitdepth); /*Same as lodepng_decode_file, but always decodes to 32-bit RGBA raw image. NOTE: Wide-character filenames are not supported, you can use an external method to handle such files and decode in-memory.*/ unsigned lodepng_decode32_file(unsigned char** out, unsigned* w, unsigned* h, const char* filename); /*Same as lodepng_decode_file, but always decodes to 24-bit RGB raw image. NOTE: Wide-character filenames are not supported, you can use an external method to handle such files and decode in-memory.*/ unsigned lodepng_decode24_file(unsigned char** out, unsigned* w, unsigned* h, const char* filename); #endif /*LODEPNG_COMPILE_DISK*/ #endif /*LODEPNG_COMPILE_DECODER*/ #ifdef LODEPNG_COMPILE_ENCODER /* Converts raw pixel data into a PNG image in memory. The colortype and bitdepth of the output PNG image cannot be chosen, they are automatically determined by the colortype, bitdepth and content of the input pixel data. Note: for 16-bit per channel colors, needs big endian format like PNG does. out: Output parameter. Pointer to buffer that will contain the PNG image data. Must be freed after usage with free(*out). outsize: Output parameter. Pointer to the size in bytes of the out buffer. image: The raw pixel data to encode. The size of this buffer should be w * h * (bytes per pixel), bytes per pixel depends on colortype and bitdepth. w: width of the raw pixel data in pixels. h: height of the raw pixel data in pixels. colortype: the color type of the raw input image. See explanation on PNG color types. bitdepth: the bit depth of the raw input image. See explanation on PNG color types. Return value: LodePNG error code (0 means no error). */ unsigned lodepng_encode_memory(unsigned char** out, size_t* outsize, const unsigned char* image, unsigned w, unsigned h, LodePNGColorType colortype, unsigned bitdepth); /*Same as lodepng_encode_memory, but always encodes from 32-bit RGBA raw image.*/ unsigned lodepng_encode32(unsigned char** out, size_t* outsize, const unsigned char* image, unsigned w, unsigned h); /*Same as lodepng_encode_memory, but always encodes from 24-bit RGB raw image.*/ unsigned lodepng_encode24(unsigned char** out, size_t* outsize, const unsigned char* image, unsigned w, unsigned h); #ifdef LODEPNG_COMPILE_DISK /* Converts raw pixel data into a PNG file on disk. Same as the other encode functions, but instead takes a filename as output. NOTE: This overwrites existing files without warning! NOTE: Wide-character filenames are not supported, you can use an external method to handle such files and encode in-memory.*/ unsigned lodepng_encode_file(const char* filename, const unsigned char* image, unsigned w, unsigned h, LodePNGColorType colortype, unsigned bitdepth); /*Same as lodepng_encode_file, but always encodes from 32-bit RGBA raw image. NOTE: Wide-character filenames are not supported, you can use an external method to handle such files and encode in-memory.*/ unsigned lodepng_encode32_file(const char* filename, const unsigned char* image, unsigned w, unsigned h); /*Same as lodepng_encode_file, but always encodes from 24-bit RGB raw image. NOTE: Wide-character filenames are not supported, you can use an external method to handle such files and encode in-memory.*/ unsigned lodepng_encode24_file(const char* filename, const unsigned char* image, unsigned w, unsigned h); #endif /*LODEPNG_COMPILE_DISK*/ #endif /*LODEPNG_COMPILE_ENCODER*/ #ifdef LODEPNG_COMPILE_CPP namespace lodepng { #ifdef LODEPNG_COMPILE_DECODER /*Same as lodepng_decode_memory, but decodes to an std::vector. The colortype is the format to output the pixels to. Default is RGBA 8-bit per channel.*/ unsigned decode(std::vector& out, unsigned& w, unsigned& h, const unsigned char* in, size_t insize, LodePNGColorType colortype = LCT_RGBA, unsigned bitdepth = 8); unsigned decode(std::vector& out, unsigned& w, unsigned& h, const std::vector& in, LodePNGColorType colortype = LCT_RGBA, unsigned bitdepth = 8); #ifdef LODEPNG_COMPILE_DISK /* Converts PNG file from disk to raw pixel data in memory. Same as the other decode functions, but instead takes a filename as input. NOTE: Wide-character filenames are not supported, you can use an external method to handle such files and decode in-memory. */ unsigned decode(std::vector& out, unsigned& w, unsigned& h, const std::string& filename, LodePNGColorType colortype = LCT_RGBA, unsigned bitdepth = 8); #endif /* LODEPNG_COMPILE_DISK */ #endif /* LODEPNG_COMPILE_DECODER */ #ifdef LODEPNG_COMPILE_ENCODER /*Same as lodepng_encode_memory, but encodes to an std::vector. colortype is that of the raw input data. The output PNG color type will be auto chosen.*/ unsigned encode(std::vector& out, const unsigned char* in, unsigned w, unsigned h, LodePNGColorType colortype = LCT_RGBA, unsigned bitdepth = 8); unsigned encode(std::vector& out, const std::vector& in, unsigned w, unsigned h, LodePNGColorType colortype = LCT_RGBA, unsigned bitdepth = 8); #ifdef LODEPNG_COMPILE_DISK /* Converts 32-bit RGBA raw pixel data into a PNG file on disk. Same as the other encode functions, but instead takes a filename as output. NOTE: This overwrites existing files without warning! NOTE: Wide-character filenames are not supported, you can use an external method to handle such files and decode in-memory. */ unsigned encode(const std::string& filename, const unsigned char* in, unsigned w, unsigned h, LodePNGColorType colortype = LCT_RGBA, unsigned bitdepth = 8); unsigned encode(const std::string& filename, const std::vector& in, unsigned w, unsigned h, LodePNGColorType colortype = LCT_RGBA, unsigned bitdepth = 8); #endif /* LODEPNG_COMPILE_DISK */ #endif /* LODEPNG_COMPILE_ENCODER */ } /* namespace lodepng */ #endif /*LODEPNG_COMPILE_CPP*/ #endif /*LODEPNG_COMPILE_PNG*/ #ifdef LODEPNG_COMPILE_ERROR_TEXT /*Returns an English description of the numerical error code.*/ const char* lodepng_error_text(unsigned code); #endif /*LODEPNG_COMPILE_ERROR_TEXT*/ #ifdef LODEPNG_COMPILE_DECODER /*Settings for zlib decompression*/ typedef struct LodePNGDecompressSettings LodePNGDecompressSettings; struct LodePNGDecompressSettings { /* Check LodePNGDecoderSettings for more ignorable errors such as ignore_crc */ unsigned ignore_adler32; /*if 1, continue and don't give an error message if the Adler32 checksum is corrupted*/ unsigned ignore_nlen; /*ignore complement of len checksum in uncompressed blocks*/ /*Maximum decompressed size, beyond this the decoder may (and is encouraged to) stop decoding, return an error, output a data size > max_output_size and all the data up to that point. This is not hard limit nor a guarantee, but can prevent excessive memory usage. This setting is ignored by the PNG decoder, but is used by the deflate/zlib decoder and can be used by custom ones. Set to 0 to impose no limit (the default).*/ size_t max_output_size; /*use custom zlib decoder instead of built in one (default: null). Should return 0 if success, any non-0 if error (numeric value not exposed).*/ unsigned (*custom_zlib)(unsigned char**, size_t*, const unsigned char*, size_t, const LodePNGDecompressSettings*); /*use custom deflate decoder instead of built in one (default: null) if custom_zlib is not null, custom_inflate is ignored (the zlib format uses deflate). Should return 0 if success, any non-0 if error (numeric value not exposed).*/ unsigned (*custom_inflate)(unsigned char**, size_t*, const unsigned char*, size_t, const LodePNGDecompressSettings*); const void* custom_context; /*optional custom settings for custom functions*/ }; extern const LodePNGDecompressSettings lodepng_default_decompress_settings; void lodepng_decompress_settings_init(LodePNGDecompressSettings* settings); #endif /*LODEPNG_COMPILE_DECODER*/ #ifdef LODEPNG_COMPILE_ENCODER /* Settings for zlib compression. Tweaking these settings tweaks the balance between speed and compression ratio. */ typedef struct LodePNGCompressSettings LodePNGCompressSettings; struct LodePNGCompressSettings /*deflate = compress*/ { /*LZ77 related settings*/ unsigned btype; /*the block type for LZ (0, 1, 2 or 3, see zlib standard). Should be 2 for proper compression.*/ unsigned use_lz77; /*whether or not to use LZ77. Should be 1 for proper compression.*/ unsigned windowsize; /*must be a power of two <= 32768. higher compresses more but is slower. Default value: 2048.*/ unsigned minmatch; /*minimum lz77 length. 3 is normally best, 6 can be better for some PNGs. Default: 0*/ unsigned nicematch; /*stop searching if >= this length found. Set to 258 for best compression. Default: 128*/ unsigned lazymatching; /*use lazy matching: better compression but a bit slower. Default: true*/ /*use custom zlib encoder instead of built in one (default: null)*/ unsigned (*custom_zlib)(unsigned char**, size_t*, const unsigned char*, size_t, const LodePNGCompressSettings*); /*use custom deflate encoder instead of built in one (default: null) if custom_zlib is used, custom_deflate is ignored since only the built in zlib function will call custom_deflate*/ unsigned (*custom_deflate)(unsigned char**, size_t*, const unsigned char*, size_t, const LodePNGCompressSettings*); const void* custom_context; /*optional custom settings for custom functions*/ }; extern const LodePNGCompressSettings lodepng_default_compress_settings; void lodepng_compress_settings_init(LodePNGCompressSettings* settings); #endif /*LODEPNG_COMPILE_ENCODER*/ #ifdef LODEPNG_COMPILE_PNG /* Color mode of an image. Contains all information required to decode the pixel bits to RGBA colors. This information is the same as used in the PNG file format, and is used both for PNG and raw image data in LodePNG. */ typedef struct LodePNGColorMode { /*header (IHDR)*/ LodePNGColorType colortype; /*color type, see PNG standard or documentation further in this header file*/ unsigned bitdepth; /*bits per sample, see PNG standard or documentation further in this header file*/ /* palette (PLTE and tRNS) Dynamically allocated with the colors of the palette, including alpha. This field may not be allocated directly, use lodepng_color_mode_init first, then lodepng_palette_add per color to correctly initialize it (to ensure size of exactly 1024 bytes). The alpha channels must be set as well, set them to 255 for opaque images. When decoding, by default you can ignore this palette, since LodePNG already fills the palette colors in the pixels of the raw RGBA output. The palette is only supported for color type 3. */ unsigned char* palette; /*palette in RGBARGBA... order. Must be either 0, or when allocated must have 1024 bytes*/ size_t palettesize; /*palette size in number of colors (amount of used bytes is 4 * palettesize)*/ /* transparent color key (tRNS) This color uses the same bit depth as the bitdepth value in this struct, which can be 1-bit to 16-bit. For grayscale PNGs, r, g and b will all 3 be set to the same. When decoding, by default you can ignore this information, since LodePNG sets pixels with this key to transparent already in the raw RGBA output. The color key is only supported for color types 0 and 2. */ unsigned key_defined; /*is a transparent color key given? 0 = false, 1 = true*/ unsigned key_r; /*red/grayscale component of color key*/ unsigned key_g; /*green component of color key*/ unsigned key_b; /*blue component of color key*/ } LodePNGColorMode; /*init, cleanup and copy functions to use with this struct*/ void lodepng_color_mode_init(LodePNGColorMode* info); void lodepng_color_mode_cleanup(LodePNGColorMode* info); /*return value is error code (0 means no error)*/ unsigned lodepng_color_mode_copy(LodePNGColorMode* dest, const LodePNGColorMode* source); /* Makes a temporary LodePNGColorMode that does not need cleanup (no palette) */ LodePNGColorMode lodepng_color_mode_make(LodePNGColorType colortype, unsigned bitdepth); void lodepng_palette_clear(LodePNGColorMode* info); /*add 1 color to the palette*/ unsigned lodepng_palette_add(LodePNGColorMode* info, unsigned char r, unsigned char g, unsigned char b, unsigned char a); /*get the total amount of bits per pixel, based on colortype and bitdepth in the struct*/ unsigned lodepng_get_bpp(const LodePNGColorMode* info); /*get the amount of color channels used, based on colortype in the struct. If a palette is used, it counts as 1 channel.*/ unsigned lodepng_get_channels(const LodePNGColorMode* info); /*is it a grayscale type? (only colortype 0 or 4)*/ unsigned lodepng_is_greyscale_type(const LodePNGColorMode* info); /*has it got an alpha channel? (only colortype 2 or 6)*/ unsigned lodepng_is_alpha_type(const LodePNGColorMode* info); /*has it got a palette? (only colortype 3)*/ unsigned lodepng_is_palette_type(const LodePNGColorMode* info); /*only returns true if there is a palette and there is a value in the palette with alpha < 255. Loops through the palette to check this.*/ unsigned lodepng_has_palette_alpha(const LodePNGColorMode* info); /* Check if the given color info indicates the possibility of having non-opaque pixels in the PNG image. Returns true if the image can have translucent or invisible pixels (it still be opaque if it doesn't use such pixels). Returns false if the image can only have opaque pixels. In detail, it returns true only if it's a color type with alpha, or has a palette with non-opaque values, or if "key_defined" is true. */ unsigned lodepng_can_have_alpha(const LodePNGColorMode* info); /*Returns the byte size of a raw image buffer with given width, height and color mode*/ size_t lodepng_get_raw_size(unsigned w, unsigned h, const LodePNGColorMode* color); #ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS /*The information of a Time chunk in PNG.*/ typedef struct LodePNGTime { unsigned year; /*2 bytes used (0-65535)*/ unsigned month; /*1-12*/ unsigned day; /*1-31*/ unsigned hour; /*0-23*/ unsigned minute; /*0-59*/ unsigned second; /*0-60 (to allow for leap seconds)*/ } LodePNGTime; #endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ /*Information about the PNG image, except pixels, width and height.*/ typedef struct LodePNGInfo { /*header (IHDR), palette (PLTE) and transparency (tRNS) chunks*/ unsigned compression_method;/*compression method of the original file. Always 0.*/ unsigned filter_method; /*filter method of the original file*/ unsigned interlace_method; /*interlace method of the original file: 0=none, 1=Adam7*/ LodePNGColorMode color; /*color type and bits, palette and transparency of the PNG file*/ #ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS /* Suggested background color chunk (bKGD) This uses the same color mode and bit depth as the PNG (except no alpha channel), with values truncated to the bit depth in the unsigned integer. For grayscale and palette PNGs, the value is stored in background_r. The values in background_g and background_b are then unused. So when decoding, you may get these in a different color mode than the one you requested for the raw pixels. When encoding with auto_convert, you must use the color model defined in info_png.color for these values. The encoder normally ignores info_png.color when auto_convert is on, but will use it to interpret these values (and convert copies of them to its chosen color model). When encoding, avoid setting this to an expensive color, such as a non-gray value when the image is gray, or the compression will be worse since it will be forced to write the PNG with a more expensive color mode (when auto_convert is on). The decoder does not use this background color to edit the color of pixels. This is a completely optional metadata feature. */ unsigned background_defined; /*is a suggested background color given?*/ unsigned background_r; /*red/gray/palette component of suggested background color*/ unsigned background_g; /*green component of suggested background color*/ unsigned background_b; /*blue component of suggested background color*/ /* Non-international text chunks (tEXt and zTXt) The char** arrays each contain num strings. The actual messages are in text_strings, while text_keys are keywords that give a short description what the actual text represents, e.g. Title, Author, Description, or anything else. All the string fields below including strings, keys, names and language tags are null terminated. The PNG specification uses null characters for the keys, names and tags, and forbids null characters to appear in the main text which is why we can use null termination everywhere here. A keyword is minimum 1 character and maximum 79 characters long (plus the additional null terminator). It's discouraged to use a single line length longer than 79 characters for texts. Don't allocate these text buffers yourself. Use the init/cleanup functions correctly and use lodepng_add_text and lodepng_clear_text. Standard text chunk keywords and strings are encoded using Latin-1. */ size_t text_num; /*the amount of texts in these char** buffers (there may be more texts in itext)*/ char** text_keys; /*the keyword of a text chunk (e.g. "Comment")*/ char** text_strings; /*the actual text*/ /* International text chunks (iTXt) Similar to the non-international text chunks, but with additional strings "langtags" and "transkeys", and the following text encodings are used: keys: Latin-1, langtags: ASCII, transkeys and strings: UTF-8. keys must be 1-79 characters (plus the additional null terminator), the other strings are any length. */ size_t itext_num; /*the amount of international texts in this PNG*/ char** itext_keys; /*the English keyword of the text chunk (e.g. "Comment")*/ char** itext_langtags; /*language tag for this text's language, ISO/IEC 646 string, e.g. ISO 639 language tag*/ char** itext_transkeys; /*keyword translated to the international language - UTF-8 string*/ char** itext_strings; /*the actual international text - UTF-8 string*/ /*time chunk (tIME)*/ unsigned time_defined; /*set to 1 to make the encoder generate a tIME chunk*/ LodePNGTime time; /*phys chunk (pHYs)*/ unsigned phys_defined; /*if 0, there is no pHYs chunk and the values below are undefined, if 1 else there is one*/ unsigned phys_x; /*pixels per unit in x direction*/ unsigned phys_y; /*pixels per unit in y direction*/ unsigned phys_unit; /*may be 0 (unknown unit) or 1 (metre)*/ /* Color profile related chunks: gAMA, cHRM, sRGB, iCPP LodePNG does not apply any color conversions on pixels in the encoder or decoder and does not interpret these color profile values. It merely passes on the information. If you wish to use color profiles and convert colors, please use these values with a color management library. See the PNG, ICC and sRGB specifications for more information about the meaning of these values. */ /* gAMA chunk: optional, overridden by sRGB or iCCP if those are present. */ unsigned gama_defined; /* Whether a gAMA chunk is present (0 = not present, 1 = present). */ unsigned gama_gamma; /* Gamma exponent times 100000 */ /* cHRM chunk: optional, overridden by sRGB or iCCP if those are present. */ unsigned chrm_defined; /* Whether a cHRM chunk is present (0 = not present, 1 = present). */ unsigned chrm_white_x; /* White Point x times 100000 */ unsigned chrm_white_y; /* White Point y times 100000 */ unsigned chrm_red_x; /* Red x times 100000 */ unsigned chrm_red_y; /* Red y times 100000 */ unsigned chrm_green_x; /* Green x times 100000 */ unsigned chrm_green_y; /* Green y times 100000 */ unsigned chrm_blue_x; /* Blue x times 100000 */ unsigned chrm_blue_y; /* Blue y times 100000 */ /* sRGB chunk: optional. May not appear at the same time as iCCP. If gAMA is also present gAMA must contain value 45455. If cHRM is also present cHRM must contain respectively 31270,32900,64000,33000,30000,60000,15000,6000. */ unsigned srgb_defined; /* Whether an sRGB chunk is present (0 = not present, 1 = present). */ unsigned srgb_intent; /* Rendering intent: 0=perceptual, 1=rel. colorimetric, 2=saturation, 3=abs. colorimetric */ /* iCCP chunk: optional. May not appear at the same time as sRGB. LodePNG does not parse or use the ICC profile (except its color space header field for an edge case), a separate library to handle the ICC data (not included in LodePNG) format is needed to use it for color management and conversions. For encoding, if iCCP is present, gAMA and cHRM are recommended to be added as well with values that match the ICC profile as closely as possible, if you wish to do this you should provide the correct values for gAMA and cHRM and enable their '_defined' flags since LodePNG will not automatically compute them from the ICC profile. For encoding, the ICC profile is required by the PNG specification to be an "RGB" profile for non-gray PNG color types and a "GRAY" profile for gray PNG color types. If you disable auto_convert, you must ensure the ICC profile type matches your requested color type, else the encoder gives an error. If auto_convert is enabled (the default), and the ICC profile is not a good match for the pixel data, this will result in an encoder error if the pixel data has non-gray pixels for a GRAY profile, or a silent less-optimal compression of the pixel data if the pixels could be encoded as grayscale but the ICC profile is RGB. To avoid this do not set an ICC profile in the image unless there is a good reason for it, and when doing so make sure you compute it carefully to avoid the above problems. */ unsigned iccp_defined; /* Whether an iCCP chunk is present (0 = not present, 1 = present). */ char* iccp_name; /* Null terminated string with profile name, 1-79 bytes */ /* The ICC profile in iccp_profile_size bytes. Don't allocate this buffer yourself. Use the init/cleanup functions correctly and use lodepng_set_icc and lodepng_clear_icc. */ unsigned char* iccp_profile; unsigned iccp_profile_size; /* The size of iccp_profile in bytes */ /* End of color profile related chunks */ /* unknown chunks: chunks not known by LodePNG, passed on byte for byte. There are 3 buffers, one for each position in the PNG where unknown chunks can appear. Each buffer contains all unknown chunks for that position consecutively. The 3 positions are: 0: between IHDR and PLTE, 1: between PLTE and IDAT, 2: between IDAT and IEND. For encoding, do not store critical chunks or known chunks that are enabled with a "_defined" flag above in here, since the encoder will blindly follow this and could then encode an invalid PNG file (such as one with two IHDR chunks or the disallowed combination of sRGB with iCCP). But do use this if you wish to store an ancillary chunk that is not supported by LodePNG (such as sPLT or hIST), or any non-standard PNG chunk. Do not allocate or traverse this data yourself. Use the chunk traversing functions declared later, such as lodepng_chunk_next and lodepng_chunk_append, to read/write this struct. */ unsigned char* unknown_chunks_data[3]; size_t unknown_chunks_size[3]; /*size in bytes of the unknown chunks, given for protection*/ #endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ } LodePNGInfo; /*init, cleanup and copy functions to use with this struct*/ void lodepng_info_init(LodePNGInfo* info); void lodepng_info_cleanup(LodePNGInfo* info); /*return value is error code (0 means no error)*/ unsigned lodepng_info_copy(LodePNGInfo* dest, const LodePNGInfo* source); #ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS unsigned lodepng_add_text(LodePNGInfo* info, const char* key, const char* str); /*push back both texts at once*/ void lodepng_clear_text(LodePNGInfo* info); /*use this to clear the texts again after you filled them in*/ unsigned lodepng_add_itext(LodePNGInfo* info, const char* key, const char* langtag, const char* transkey, const char* str); /*push back the 4 texts of 1 chunk at once*/ void lodepng_clear_itext(LodePNGInfo* info); /*use this to clear the itexts again after you filled them in*/ /*replaces if exists*/ unsigned lodepng_set_icc(LodePNGInfo* info, const char* name, const unsigned char* profile, unsigned profile_size); void lodepng_clear_icc(LodePNGInfo* info); /*use this to clear the texts again after you filled them in*/ #endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ /* Converts raw buffer from one color type to another color type, based on LodePNGColorMode structs to describe the input and output color type. See the reference manual at the end of this header file to see which color conversions are supported. return value = LodePNG error code (0 if all went ok, an error if the conversion isn't supported) The out buffer must have size (w * h * bpp + 7) / 8, where bpp is the bits per pixel of the output color type (lodepng_get_bpp). For < 8 bpp images, there should not be padding bits at the end of scanlines. For 16-bit per channel colors, uses big endian format like PNG does. Return value is LodePNG error code */ unsigned lodepng_convert(unsigned char* out, const unsigned char* in, const LodePNGColorMode* mode_out, const LodePNGColorMode* mode_in, unsigned w, unsigned h); #ifdef LODEPNG_COMPILE_DECODER /* Settings for the decoder. This contains settings for the PNG and the Zlib decoder, but not the Info settings from the Info structs. */ typedef struct LodePNGDecoderSettings { LodePNGDecompressSettings zlibsettings; /*in here is the setting to ignore Adler32 checksums*/ /* Check LodePNGDecompressSettings for more ignorable errors such as ignore_adler32 */ unsigned ignore_crc; /*ignore CRC checksums*/ unsigned ignore_critical; /*ignore unknown critical chunks*/ unsigned ignore_end; /*ignore issues at end of file if possible (missing IEND chunk, too large chunk, ...)*/ /* TODO: make a system involving warnings with levels and a strict mode instead. Other potentially recoverable errors: srgb rendering intent value, size of content of ancillary chunks, more than 79 characters for some strings, placement/combination rules for ancillary chunks, crc of unknown chunks, allowed characters in string keys, etc... */ unsigned color_convert; /*whether to convert the PNG to the color type you want. Default: yes*/ #ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS unsigned read_text_chunks; /*if false but remember_unknown_chunks is true, they're stored in the unknown chunks*/ /*store all bytes from unknown chunks in the LodePNGInfo (off by default, useful for a png editor)*/ unsigned remember_unknown_chunks; /* maximum size for decompressed text chunks. If a text chunk's text is larger than this, an error is returned, unless reading text chunks is disabled or this limit is set higher or disabled. Set to 0 to allow any size. By default it is a value that prevents unreasonably large strings from hogging memory. */ size_t max_text_size; /* maximum size for compressed ICC chunks. If the ICC profile is larger than this, an error will be returned. Set to 0 to allow any size. By default this is a value that prevents ICC profiles that would be much larger than any legitimate profile could be to hog memory. */ size_t max_icc_size; #endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ } LodePNGDecoderSettings; void lodepng_decoder_settings_init(LodePNGDecoderSettings* settings); #endif /*LODEPNG_COMPILE_DECODER*/ #ifdef LODEPNG_COMPILE_ENCODER /*automatically use color type with less bits per pixel if losslessly possible. Default: AUTO*/ typedef enum LodePNGFilterStrategy { /*every filter at zero*/ LFS_ZERO = 0, /*every filter at 1, 2, 3 or 4 (paeth), unlike LFS_ZERO not a good choice, but for testing*/ LFS_ONE = 1, LFS_TWO = 2, LFS_THREE = 3, LFS_FOUR = 4, /*Use filter that gives minimum sum, as described in the official PNG filter heuristic.*/ LFS_MINSUM, /*Use the filter type that gives smallest Shannon entropy for this scanline. Depending on the image, this is better or worse than minsum.*/ LFS_ENTROPY, /* Brute-force-search PNG filters by compressing each filter for each scanline. Experimental, very slow, and only rarely gives better compression than MINSUM. */ LFS_BRUTE_FORCE, /*use predefined_filters buffer: you specify the filter type for each scanline*/ LFS_PREDEFINED } LodePNGFilterStrategy; /*Gives characteristics about the integer RGBA colors of the image (count, alpha channel usage, bit depth, ...), which helps decide which color model to use for encoding. Used internally by default if "auto_convert" is enabled. Public because it's useful for custom algorithms.*/ typedef struct LodePNGColorStats { unsigned colored; /*not grayscale*/ unsigned key; /*image is not opaque and color key is possible instead of full alpha*/ unsigned short key_r; /*key values, always as 16-bit, in 8-bit case the byte is duplicated, e.g. 65535 means 255*/ unsigned short key_g; unsigned short key_b; unsigned alpha; /*image is not opaque and alpha channel or alpha palette required*/ unsigned numcolors; /*amount of colors, up to 257. Not valid if bits == 16 or allow_palette is disabled.*/ unsigned char palette[1024]; /*Remembers up to the first 256 RGBA colors, in no particular order, only valid when numcolors is valid*/ unsigned bits; /*bits per channel (not for palette). 1,2 or 4 for grayscale only. 16 if 16-bit per channel required.*/ size_t numpixels; /*user settings for computing/using the stats*/ unsigned allow_palette; /*default 1. if 0, disallow choosing palette colortype in auto_choose_color, and don't count numcolors*/ unsigned allow_greyscale; /*default 1. if 0, choose RGB or RGBA even if the image only has gray colors*/ } LodePNGColorStats; void lodepng_color_stats_init(LodePNGColorStats* stats); /*Get a LodePNGColorStats of the image. The stats must already have been inited. Returns error code (e.g. alloc fail) or 0 if ok.*/ unsigned lodepng_compute_color_stats(LodePNGColorStats* stats, const unsigned char* image, unsigned w, unsigned h, const LodePNGColorMode* mode_in); /*Settings for the encoder.*/ typedef struct LodePNGEncoderSettings { LodePNGCompressSettings zlibsettings; /*settings for the zlib encoder, such as window size, ...*/ unsigned auto_convert; /*automatically choose output PNG color type. Default: true*/ /*If true, follows the official PNG heuristic: if the PNG uses a palette or lower than 8 bit depth, set all filters to zero. Otherwise use the filter_strategy. Note that to completely follow the official PNG heuristic, filter_palette_zero must be true and filter_strategy must be LFS_MINSUM*/ unsigned filter_palette_zero; /*Which filter strategy to use when not using zeroes due to filter_palette_zero. Set filter_palette_zero to 0 to ensure always using your chosen strategy. Default: LFS_MINSUM*/ LodePNGFilterStrategy filter_strategy; /*used if filter_strategy is LFS_PREDEFINED. In that case, this must point to a buffer with the same length as the amount of scanlines in the image, and each value must <= 5. You have to cleanup this buffer, LodePNG will never free it. Don't forget that filter_palette_zero must be set to 0 to ensure this is also used on palette or low bitdepth images.*/ const unsigned char* predefined_filters; /*force creating a PLTE chunk if colortype is 2 or 6 (= a suggested palette). If colortype is 3, PLTE is _always_ created.*/ unsigned force_palette; #ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS /*add LodePNG identifier and version as a text chunk, for debugging*/ unsigned add_id; /*encode text chunks as zTXt chunks instead of tEXt chunks, and use compression in iTXt chunks*/ unsigned text_compression; #endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ } LodePNGEncoderSettings; void lodepng_encoder_settings_init(LodePNGEncoderSettings* settings); #endif /*LODEPNG_COMPILE_ENCODER*/ #if defined(LODEPNG_COMPILE_DECODER) || defined(LODEPNG_COMPILE_ENCODER) /*The settings, state and information for extended encoding and decoding.*/ typedef struct LodePNGState { #ifdef LODEPNG_COMPILE_DECODER LodePNGDecoderSettings decoder; /*the decoding settings*/ #endif /*LODEPNG_COMPILE_DECODER*/ #ifdef LODEPNG_COMPILE_ENCODER LodePNGEncoderSettings encoder; /*the encoding settings*/ #endif /*LODEPNG_COMPILE_ENCODER*/ LodePNGColorMode info_raw; /*specifies the format in which you would like to get the raw pixel buffer*/ LodePNGInfo info_png; /*info of the PNG image obtained after decoding*/ unsigned error; } LodePNGState; /*init, cleanup and copy functions to use with this struct*/ void lodepng_state_init(LodePNGState* state); void lodepng_state_cleanup(LodePNGState* state); void lodepng_state_copy(LodePNGState* dest, const LodePNGState* source); #endif /* defined(LODEPNG_COMPILE_DECODER) || defined(LODEPNG_COMPILE_ENCODER) */ #ifdef LODEPNG_COMPILE_DECODER /* Same as lodepng_decode_memory, but uses a LodePNGState to allow custom settings and getting much more information about the PNG image and color mode. */ unsigned lodepng_decode(unsigned char** out, unsigned* w, unsigned* h, LodePNGState* state, const unsigned char* in, size_t insize); /* Read the PNG header, but not the actual data. This returns only the information that is in the IHDR chunk of the PNG, such as width, height and color type. The information is placed in the info_png field of the LodePNGState. */ unsigned lodepng_inspect(unsigned* w, unsigned* h, LodePNGState* state, const unsigned char* in, size_t insize); #endif /*LODEPNG_COMPILE_DECODER*/ /* Reads one metadata chunk (other than IHDR) of the PNG file and outputs what it read in the state. Returns error code on failure. Use lodepng_inspect first with a new state, then e.g. lodepng_chunk_find_const to find the desired chunk type, and if non null use lodepng_inspect_chunk (with chunk_pointer - start_of_file as pos). Supports most metadata chunks from the PNG standard (gAMA, bKGD, tEXt, ...). Ignores unsupported, unknown, non-metadata or IHDR chunks (without error). Requirements: &in[pos] must point to start of a chunk, must use regular lodepng_inspect first since format of most other chunks depends on IHDR, and if there is a PLTE chunk, that one must be inspected before tRNS or bKGD. */ unsigned lodepng_inspect_chunk(LodePNGState* state, size_t pos, const unsigned char* in, size_t insize); #ifdef LODEPNG_COMPILE_ENCODER /*This function allocates the out buffer with standard malloc and stores the size in *outsize.*/ unsigned lodepng_encode(unsigned char** out, size_t* outsize, const unsigned char* image, unsigned w, unsigned h, LodePNGState* state); #endif /*LODEPNG_COMPILE_ENCODER*/ /* The lodepng_chunk functions are normally not needed, except to traverse the unknown chunks stored in the LodePNGInfo struct, or add new ones to it. It also allows traversing the chunks of an encoded PNG file yourself. The chunk pointer always points to the beginning of the chunk itself, that is the first byte of the 4 length bytes. In the PNG file format, chunks have the following format: -4 bytes length: length of the data of the chunk in bytes (chunk itself is 12 bytes longer) -4 bytes chunk type (ASCII a-z,A-Z only, see below) -length bytes of data (may be 0 bytes if length was 0) -4 bytes of CRC, computed on chunk name + data The first chunk starts at the 8th byte of the PNG file, the entire rest of the file exists out of concatenated chunks with the above format. PNG standard chunk ASCII naming conventions: -First byte: uppercase = critical, lowercase = ancillary -Second byte: uppercase = public, lowercase = private -Third byte: must be uppercase -Fourth byte: uppercase = unsafe to copy, lowercase = safe to copy */ /* Gets the length of the data of the chunk. Total chunk length has 12 bytes more. There must be at least 4 bytes to read from. If the result value is too large, it may be corrupt data. */ unsigned lodepng_chunk_length(const unsigned char* chunk); /*puts the 4-byte type in null terminated string*/ void lodepng_chunk_type(char type[5], const unsigned char* chunk); /*check if the type is the given type*/ unsigned char lodepng_chunk_type_equals(const unsigned char* chunk, const char* type); /*0: it's one of the critical chunk types, 1: it's an ancillary chunk (see PNG standard)*/ unsigned char lodepng_chunk_ancillary(const unsigned char* chunk); /*0: public, 1: private (see PNG standard)*/ unsigned char lodepng_chunk_private(const unsigned char* chunk); /*0: the chunk is unsafe to copy, 1: the chunk is safe to copy (see PNG standard)*/ unsigned char lodepng_chunk_safetocopy(const unsigned char* chunk); /*get pointer to the data of the chunk, where the input points to the header of the chunk*/ unsigned char* lodepng_chunk_data(unsigned char* chunk); const unsigned char* lodepng_chunk_data_const(const unsigned char* chunk); /*returns 0 if the crc is correct, 1 if it's incorrect (0 for OK as usual!)*/ unsigned lodepng_chunk_check_crc(const unsigned char* chunk); /*generates the correct CRC from the data and puts it in the last 4 bytes of the chunk*/ void lodepng_chunk_generate_crc(unsigned char* chunk); /* Iterate to next chunks, allows iterating through all chunks of the PNG file. Input must be at the beginning of a chunk (result of a previous lodepng_chunk_next call, or the 8th byte of a PNG file which always has the first chunk), or alternatively may point to the first byte of the PNG file (which is not a chunk but the magic header, the function will then skip over it and return the first real chunk). Will output pointer to the start of the next chunk, or at or beyond end of the file if there is no more chunk after this or possibly if the chunk is corrupt. Start this process at the 8th byte of the PNG file. In a non-corrupt PNG file, the last chunk should have name "IEND". */ unsigned char* lodepng_chunk_next(unsigned char* chunk, unsigned char* end); const unsigned char* lodepng_chunk_next_const(const unsigned char* chunk, const unsigned char* end); /*Finds the first chunk with the given type in the range [chunk, end), or returns NULL if not found.*/ unsigned char* lodepng_chunk_find(unsigned char* chunk, unsigned char* end, const char type[5]); const unsigned char* lodepng_chunk_find_const(const unsigned char* chunk, const unsigned char* end, const char type[5]); /* Appends chunk to the data in out. The given chunk should already have its chunk header. The out variable and outsize are updated to reflect the new reallocated buffer. Returns error code (0 if it went ok) */ unsigned lodepng_chunk_append(unsigned char** out, size_t* outsize, const unsigned char* chunk); /* Appends new chunk to out. The chunk to append is given by giving its length, type and data separately. The type is a 4-letter string. The out variable and outsize are updated to reflect the new reallocated buffer. Returne error code (0 if it went ok) */ unsigned lodepng_chunk_create(unsigned char** out, size_t* outsize, unsigned length, const char* type, const unsigned char* data); /*Calculate CRC32 of buffer*/ unsigned lodepng_crc32(const unsigned char* buf, size_t len); #endif /*LODEPNG_COMPILE_PNG*/ #ifdef LODEPNG_COMPILE_ZLIB /* This zlib part can be used independently to zlib compress and decompress a buffer. It cannot be used to create gzip files however, and it only supports the part of zlib that is required for PNG, it does not support dictionaries. */ #ifdef LODEPNG_COMPILE_DECODER /*Inflate a buffer. Inflate is the decompression step of deflate. Out buffer must be freed after use.*/ unsigned lodepng_inflate(unsigned char** out, size_t* outsize, const unsigned char* in, size_t insize, const LodePNGDecompressSettings* settings); /* Decompresses Zlib data. Reallocates the out buffer and appends the data. The data must be according to the zlib specification. Either, *out must be NULL and *outsize must be 0, or, *out must be a valid buffer and *outsize its size in bytes. out must be freed by user after usage. */ unsigned lodepng_zlib_decompress(unsigned char** out, size_t* outsize, const unsigned char* in, size_t insize, const LodePNGDecompressSettings* settings); #endif /*LODEPNG_COMPILE_DECODER*/ #ifdef LODEPNG_COMPILE_ENCODER /* Compresses data with Zlib. Reallocates the out buffer and appends the data. Zlib adds a small header and trailer around the deflate data. The data is output in the format of the zlib specification. Either, *out must be NULL and *outsize must be 0, or, *out must be a valid buffer and *outsize its size in bytes. out must be freed by user after usage. */ unsigned lodepng_zlib_compress(unsigned char** out, size_t* outsize, const unsigned char* in, size_t insize, const LodePNGCompressSettings* settings); /* Find length-limited Huffman code for given frequencies. This function is in the public interface only for tests, it's used internally by lodepng_deflate. */ unsigned lodepng_huffman_code_lengths(unsigned* lengths, const unsigned* frequencies, size_t numcodes, unsigned maxbitlen); /*Compress a buffer with deflate. See RFC 1951. Out buffer must be freed after use.*/ unsigned lodepng_deflate(unsigned char** out, size_t* outsize, const unsigned char* in, size_t insize, const LodePNGCompressSettings* settings); #endif /*LODEPNG_COMPILE_ENCODER*/ #endif /*LODEPNG_COMPILE_ZLIB*/ #ifdef LODEPNG_COMPILE_DISK /* Load a file from disk into buffer. The function allocates the out buffer, and after usage you should free it. out: output parameter, contains pointer to loaded buffer. outsize: output parameter, size of the allocated out buffer filename: the path to the file to load return value: error code (0 means ok) NOTE: Wide-character filenames are not supported, you can use an external method to handle such files and decode in-memory. */ unsigned lodepng_load_file(unsigned char** out, size_t* outsize, const char* filename); /* Save a file from buffer to disk. Warning, if it exists, this function overwrites the file without warning! buffer: the buffer to write buffersize: size of the buffer to write filename: the path to the file to save to return value: error code (0 means ok) NOTE: Wide-character filenames are not supported, you can use an external method to handle such files and encode in-memory */ unsigned lodepng_save_file(const unsigned char* buffer, size_t buffersize, const char* filename); #endif /*LODEPNG_COMPILE_DISK*/ #ifdef LODEPNG_COMPILE_CPP /* The LodePNG C++ wrapper uses std::vectors instead of manually allocated memory buffers. */ namespace lodepng { #ifdef LODEPNG_COMPILE_PNG class State : public LodePNGState { public: State(); State(const State& other); ~State(); State& operator=(const State& other); }; #ifdef LODEPNG_COMPILE_DECODER /* Same as other lodepng::decode, but using a State for more settings and information. */ unsigned decode(std::vector& out, unsigned& w, unsigned& h, State& state, const unsigned char* in, size_t insize); unsigned decode(std::vector& out, unsigned& w, unsigned& h, State& state, const std::vector& in); #endif /*LODEPNG_COMPILE_DECODER*/ #ifdef LODEPNG_COMPILE_ENCODER /* Same as other lodepng::encode, but using a State for more settings and information. */ unsigned encode(std::vector& out, const unsigned char* in, unsigned w, unsigned h, State& state); unsigned encode(std::vector& out, const std::vector& in, unsigned w, unsigned h, State& state); #endif /*LODEPNG_COMPILE_ENCODER*/ #ifdef LODEPNG_COMPILE_DISK /* Load a file from disk into an std::vector. return value: error code (0 means ok) NOTE: Wide-character filenames are not supported, you can use an external method to handle such files and decode in-memory */ unsigned load_file(std::vector& buffer, const std::string& filename); /* Save the binary data in an std::vector to a file on disk. The file is overwritten without warning. NOTE: Wide-character filenames are not supported, you can use an external method to handle such files and encode in-memory */ unsigned save_file(const std::vector& buffer, const std::string& filename); #endif /* LODEPNG_COMPILE_DISK */ #endif /* LODEPNG_COMPILE_PNG */ #ifdef LODEPNG_COMPILE_ZLIB #ifdef LODEPNG_COMPILE_DECODER /* Zlib-decompress an unsigned char buffer */ unsigned decompress(std::vector& out, const unsigned char* in, size_t insize, const LodePNGDecompressSettings& settings = lodepng_default_decompress_settings); /* Zlib-decompress an std::vector */ unsigned decompress(std::vector& out, const std::vector& in, const LodePNGDecompressSettings& settings = lodepng_default_decompress_settings); #endif /* LODEPNG_COMPILE_DECODER */ #ifdef LODEPNG_COMPILE_ENCODER /* Zlib-compress an unsigned char buffer */ unsigned compress(std::vector& out, const unsigned char* in, size_t insize, const LodePNGCompressSettings& settings = lodepng_default_compress_settings); /* Zlib-compress an std::vector */ unsigned compress(std::vector& out, const std::vector& in, const LodePNGCompressSettings& settings = lodepng_default_compress_settings); #endif /* LODEPNG_COMPILE_ENCODER */ #endif /* LODEPNG_COMPILE_ZLIB */ } /* namespace lodepng */ #endif /*LODEPNG_COMPILE_CPP*/ /* TODO: [.] test if there are no memory leaks or security exploits - done a lot but needs to be checked often [.] check compatibility with various compilers - done but needs to be redone for every newer version [X] converting color to 16-bit per channel types [X] support color profile chunk types (but never let them touch RGB values by default) [ ] support all public PNG chunk types (almost done except sBIT, sPLT and hIST) [ ] make sure encoder generates no chunks with size > (2^31)-1 [ ] partial decoding (stream processing) [X] let the "isFullyOpaque" function check color keys and transparent palettes too [X] better name for the variables "codes", "codesD", "codelengthcodes", "clcl" and "lldl" [ ] allow treating some errors like warnings, when image is recoverable (e.g. 69, 57, 58) [ ] make warnings like: oob palette, checksum fail, data after iend, wrong/unknown crit chunk, no null terminator in text, ... [ ] error messages with line numbers (and version) [ ] errors in state instead of as return code? [ ] new errors/warnings like suspiciously big decompressed ztxt or iccp chunk [ ] let the C++ wrapper catch exceptions coming from the standard library and return LodePNG error codes [ ] allow user to provide custom color conversion functions, e.g. for premultiplied alpha, padding bits or not, ... [ ] allow user to give data (void*) to custom allocator [X] provide alternatives for C library functions not present on some platforms (memcpy, ...) */ #endif /*LODEPNG_H inclusion guard*/ /* LodePNG Documentation --------------------- 0. table of contents -------------------- 1. about 1.1. supported features 1.2. features not supported 2. C and C++ version 3. security 4. decoding 5. encoding 6. color conversions 6.1. PNG color types 6.2. color conversions 6.3. padding bits 6.4. A note about 16-bits per channel and endianness 7. error values 8. chunks and PNG editing 9. compiler support 10. examples 10.1. decoder C++ example 10.2. decoder C example 11. state settings reference 12. changes 13. contact information 1. about -------- PNG is a file format to store raster images losslessly with good compression, supporting different color types and alpha channel. LodePNG is a PNG codec according to the Portable Network Graphics (PNG) Specification (Second Edition) - W3C Recommendation 10 November 2003. The specifications used are: *) Portable Network Graphics (PNG) Specification (Second Edition): http://www.w3.org/TR/2003/REC-PNG-20031110 *) RFC 1950 ZLIB Compressed Data Format version 3.3: http://www.gzip.org/zlib/rfc-zlib.html *) RFC 1951 DEFLATE Compressed Data Format Specification ver 1.3: http://www.gzip.org/zlib/rfc-deflate.html The most recent version of LodePNG can currently be found at http://lodev.org/lodepng/ LodePNG works both in C (ISO C90) and C++, with a C++ wrapper that adds extra functionality. LodePNG exists out of two files: -lodepng.h: the header file for both C and C++ -lodepng.c(pp): give it the name lodepng.c or lodepng.cpp (or .cc) depending on your usage If you want to start using LodePNG right away without reading this doc, get the examples from the LodePNG website to see how to use it in code, or check the smaller examples in chapter 13 here. LodePNG is simple but only supports the basic requirements. To achieve simplicity, the following design choices were made: There are no dependencies on any external library. There are functions to decode and encode a PNG with a single function call, and extended versions of these functions taking a LodePNGState struct allowing to specify or get more information. By default the colors of the raw image are always RGB or RGBA, no matter what color type the PNG file uses. To read and write files, there are simple functions to convert the files to/from buffers in memory. This all makes LodePNG suitable for loading textures in games, demos and small programs, ... It's less suitable for full fledged image editors, loading PNGs over network (it requires all the image data to be available before decoding can begin), life-critical systems, ... 1.1. supported features ----------------------- The following features are supported by the decoder: *) decoding of PNGs with any color type, bit depth and interlace mode, to a 24- or 32-bit color raw image, or the same color type as the PNG *) encoding of PNGs, from any raw image to 24- or 32-bit color, or the same color type as the raw image *) Adam7 interlace and deinterlace for any color type *) loading the image from harddisk or decoding it from a buffer from other sources than harddisk *) support for alpha channels, including RGBA color model, translucent palettes and color keying *) zlib decompression (inflate) *) zlib compression (deflate) *) CRC32 and ADLER32 checksums *) colorimetric color profile conversions: currently experimentally available in lodepng_util.cpp only, plus alternatively ability to pass on chroma/gamma/ICC profile information to other color management system. *) handling of unknown chunks, allowing making a PNG editor that stores custom and unknown chunks. *) the following chunks are supported by both encoder and decoder: IHDR: header information PLTE: color palette IDAT: pixel data IEND: the final chunk tRNS: transparency for palettized images tEXt: textual information zTXt: compressed textual information iTXt: international textual information bKGD: suggested background color pHYs: physical dimensions tIME: modification time cHRM: RGB chromaticities gAMA: RGB gamma correction iCCP: ICC color profile sRGB: rendering intent 1.2. features not supported --------------------------- The following features are _not_ supported: *) some features needed to make a conformant PNG-Editor might be still missing. *) partial loading/stream processing. All data must be available and is processed in one call. *) The following public chunks are not (yet) supported but treated as unknown chunks by LodePNG: sBIT hIST sPLT 2. C and C++ version -------------------- The C version uses buffers allocated with alloc that you need to free() yourself. You need to use init and cleanup functions for each struct whenever using a struct from the C version to avoid exploits and memory leaks. The C++ version has extra functions with std::vectors in the interface and the lodepng::State class which is a LodePNGState with constructor and destructor. These files work without modification for both C and C++ compilers because all the additional C++ code is in "#ifdef __cplusplus" blocks that make C-compilers ignore it, and the C code is made to compile both with strict ISO C90 and C++. To use the C++ version, you need to rename the source file to lodepng.cpp (instead of lodepng.c), and compile it with a C++ compiler. To use the C version, you need to rename the source file to lodepng.c (instead of lodepng.cpp), and compile it with a C compiler. 3. Security ----------- Even if carefully designed, it's always possible that LodePNG contains possible exploits. If you discover one, please let me know, and it will be fixed. When using LodePNG, care has to be taken with the C version of LodePNG, as well as the C-style structs when working with C++. The following conventions are used for all C-style structs: -if a struct has a corresponding init function, always call the init function when making a new one -if a struct has a corresponding cleanup function, call it before the struct disappears to avoid memory leaks -if a struct has a corresponding copy function, use the copy function instead of "=". The destination must also be inited already. 4. Decoding ----------- Decoding converts a PNG compressed image to a raw pixel buffer. Most documentation on using the decoder is at its declarations in the header above. For C, simple decoding can be done with functions such as lodepng_decode32, and more advanced decoding can be done with the struct LodePNGState and lodepng_decode. For C++, all decoding can be done with the various lodepng::decode functions, and lodepng::State can be used for advanced features. When using the LodePNGState, it uses the following fields for decoding: *) LodePNGInfo info_png: it stores extra information about the PNG (the input) in here *) LodePNGColorMode info_raw: here you can say what color mode of the raw image (the output) you want to get *) LodePNGDecoderSettings decoder: you can specify a few extra settings for the decoder to use LodePNGInfo info_png -------------------- After decoding, this contains extra information of the PNG image, except the actual pixels, width and height because these are already gotten directly from the decoder functions. It contains for example the original color type of the PNG image, text comments, suggested background color, etc... More details about the LodePNGInfo struct are at its declaration documentation. LodePNGColorMode info_raw ------------------------- When decoding, here you can specify which color type you want the resulting raw image to be. If this is different from the colortype of the PNG, then the decoder will automatically convert the result. This conversion always works, except if you want it to convert a color PNG to grayscale or to a palette with missing colors. By default, 32-bit color is used for the result. LodePNGDecoderSettings decoder ------------------------------ The settings can be used to ignore the errors created by invalid CRC and Adler32 chunks, and to disable the decoding of tEXt chunks. There's also a setting color_convert, true by default. If false, no conversion is done, the resulting data will be as it was in the PNG (after decompression) and you'll have to puzzle the colors of the pixels together yourself using the color type information in the LodePNGInfo. 5. Encoding ----------- Encoding converts a raw pixel buffer to a PNG compressed image. Most documentation on using the encoder is at its declarations in the header above. For C, simple encoding can be done with functions such as lodepng_encode32, and more advanced decoding can be done with the struct LodePNGState and lodepng_encode. For C++, all encoding can be done with the various lodepng::encode functions, and lodepng::State can be used for advanced features. Like the decoder, the encoder can also give errors. However it gives less errors since the encoder input is trusted, the decoder input (a PNG image that could be forged by anyone) is not trusted. When using the LodePNGState, it uses the following fields for encoding: *) LodePNGInfo info_png: here you specify how you want the PNG (the output) to be. *) LodePNGColorMode info_raw: here you say what color type of the raw image (the input) has *) LodePNGEncoderSettings encoder: you can specify a few settings for the encoder to use LodePNGInfo info_png -------------------- When encoding, you use this the opposite way as when decoding: for encoding, you fill in the values you want the PNG to have before encoding. By default it's not needed to specify a color type for the PNG since it's automatically chosen, but it's possible to choose it yourself given the right settings. The encoder will not always exactly match the LodePNGInfo struct you give, it tries as close as possible. Some things are ignored by the encoder. The encoder uses, for example, the following settings from it when applicable: colortype and bitdepth, text chunks, time chunk, the color key, the palette, the background color, the interlace method, unknown chunks, ... When encoding to a PNG with colortype 3, the encoder will generate a PLTE chunk. If the palette contains any colors for which the alpha channel is not 255 (so there are translucent colors in the palette), it'll add a tRNS chunk. LodePNGColorMode info_raw ------------------------- You specify the color type of the raw image that you give to the input here, including a possible transparent color key and palette you happen to be using in your raw image data. By default, 32-bit color is assumed, meaning your input has to be in RGBA format with 4 bytes (unsigned chars) per pixel. LodePNGEncoderSettings encoder ------------------------------ The following settings are supported (some are in sub-structs): *) auto_convert: when this option is enabled, the encoder will automatically choose the smallest possible color mode (including color key) that can encode the colors of all pixels without information loss. *) btype: the block type for LZ77. 0 = uncompressed, 1 = fixed huffman tree, 2 = dynamic huffman tree (best compression). Should be 2 for proper compression. *) use_lz77: whether or not to use LZ77 for compressed block types. Should be true for proper compression. *) windowsize: the window size used by the LZ77 encoder (1 - 32768). Has value 2048 by default, but can be set to 32768 for better, but slow, compression. *) force_palette: if colortype is 2 or 6, you can make the encoder write a PLTE chunk if force_palette is true. This can used as suggested palette to convert to by viewers that don't support more than 256 colors (if those still exist) *) add_id: add text chunk "Encoder: LodePNG " to the image. *) text_compression: default 1. If 1, it'll store texts as zTXt instead of tEXt chunks. zTXt chunks use zlib compression on the text. This gives a smaller result on large texts but a larger result on small texts (such as a single program name). It's all tEXt or all zTXt though, there's no separate setting per text yet. 6. color conversions -------------------- An important thing to note about LodePNG, is that the color type of the PNG, and the color type of the raw image, are completely independent. By default, when you decode a PNG, you get the result as a raw image in the color type you want, no matter whether the PNG was encoded with a palette, grayscale or RGBA color. And if you encode an image, by default LodePNG will automatically choose the PNG color type that gives good compression based on the values of colors and amount of colors in the image. It can be configured to let you control it instead as well, though. To be able to do this, LodePNG does conversions from one color mode to another. It can convert from almost any color type to any other color type, except the following conversions: RGB to grayscale is not supported, and converting to a palette when the palette doesn't have a required color is not supported. This is not supported on purpose: this is information loss which requires a color reduction algorithm that is beyond the scope of a PNG encoder (yes, RGB to gray is easy, but there are multiple ways if you want to give some channels more weight). By default, when decoding, you get the raw image in 32-bit RGBA or 24-bit RGB color, no matter what color type the PNG has. And by default when encoding, LodePNG automatically picks the best color model for the output PNG, and expects the input image to be 32-bit RGBA or 24-bit RGB. So, unless you want to control the color format of the images yourself, you can skip this chapter. 6.1. PNG color types -------------------- A PNG image can have many color types, ranging from 1-bit color to 64-bit color, as well as palettized color modes. After the zlib decompression and unfiltering in the PNG image is done, the raw pixel data will have that color type and thus a certain amount of bits per pixel. If you want the output raw image after decoding to have another color type, a conversion is done by LodePNG. The PNG specification gives the following color types: 0: grayscale, bit depths 1, 2, 4, 8, 16 2: RGB, bit depths 8 and 16 3: palette, bit depths 1, 2, 4 and 8 4: grayscale with alpha, bit depths 8 and 16 6: RGBA, bit depths 8 and 16 Bit depth is the amount of bits per pixel per color channel. So the total amount of bits per pixel is: amount of channels * bitdepth. 6.2. color conversions ---------------------- As explained in the sections about the encoder and decoder, you can specify color types and bit depths in info_png and info_raw to change the default behaviour. If, when decoding, you want the raw image to be something else than the default, you need to set the color type and bit depth you want in the LodePNGColorMode, or the parameters colortype and bitdepth of the simple decoding function. If, when encoding, you use another color type than the default in the raw input image, you need to specify its color type and bit depth in the LodePNGColorMode of the raw image, or use the parameters colortype and bitdepth of the simple encoding function. If, when encoding, you don't want LodePNG to choose the output PNG color type but control it yourself, you need to set auto_convert in the encoder settings to false, and specify the color type you want in the LodePNGInfo of the encoder (including palette: it can generate a palette if auto_convert is true, otherwise not). If the input and output color type differ (whether user chosen or auto chosen), LodePNG will do a color conversion, which follows the rules below, and may sometimes result in an error. To avoid some confusion: -the decoder converts from PNG to raw image -the encoder converts from raw image to PNG -the colortype and bitdepth in LodePNGColorMode info_raw, are those of the raw image -the colortype and bitdepth in the color field of LodePNGInfo info_png, are those of the PNG -when encoding, the color type in LodePNGInfo is ignored if auto_convert is enabled, it is automatically generated instead -when decoding, the color type in LodePNGInfo is set by the decoder to that of the original PNG image, but it can be ignored since the raw image has the color type you requested instead -if the color type of the LodePNGColorMode and PNG image aren't the same, a conversion between the color types is done if the color types are supported. If it is not supported, an error is returned. If the types are the same, no conversion is done. -even though some conversions aren't supported, LodePNG supports loading PNGs from any colortype and saving PNGs to any colortype, sometimes it just requires preparing the raw image correctly before encoding. -both encoder and decoder use the same color converter. The function lodepng_convert does the color conversion. It is available in the interface but normally isn't needed since the encoder and decoder already call it. Non supported color conversions: -color to grayscale when non-gray pixels are present: no error is thrown, but the result will look ugly because only the red channel is taken (it assumes all three channels are the same in this case so ignores green and blue). The reason no error is given is to allow converting from three-channel grayscale images to one-channel even if there are numerical imprecisions. -anything to palette when the palette does not have an exact match for a from-color in it: in this case an error is thrown Supported color conversions: -anything to 8-bit RGB, 8-bit RGBA, 16-bit RGB, 16-bit RGBA -any gray or gray+alpha, to gray or gray+alpha -anything to a palette, as long as the palette has the requested colors in it -removing alpha channel -higher to smaller bitdepth, and vice versa If you want no color conversion to be done (e.g. for speed or control): -In the encoder, you can make it save a PNG with any color type by giving the raw color mode and LodePNGInfo the same color mode, and setting auto_convert to false. -In the decoder, you can make it store the pixel data in the same color type as the PNG has, by setting the color_convert setting to false. Settings in info_raw are then ignored. 6.3. padding bits ----------------- In the PNG file format, if a less than 8-bit per pixel color type is used and the scanlines have a bit amount that isn't a multiple of 8, then padding bits are used so that each scanline starts at a fresh byte. But that is NOT true for the LodePNG raw input and output. The raw input image you give to the encoder, and the raw output image you get from the decoder will NOT have these padding bits, e.g. in the case of a 1-bit image with a width of 7 pixels, the first pixel of the second scanline will the 8th bit of the first byte, not the first bit of a new byte. 6.4. A note about 16-bits per channel and endianness ---------------------------------------------------- LodePNG uses unsigned char arrays for 16-bit per channel colors too, just like for any other color format. The 16-bit values are stored in big endian (most significant byte first) in these arrays. This is the opposite order of the little endian used by x86 CPU's. LodePNG always uses big endian because the PNG file format does so internally. Conversions to other formats than PNG uses internally are not supported by LodePNG on purpose, there are myriads of formats, including endianness of 16-bit colors, the order in which you store R, G, B and A, and so on. Supporting and converting to/from all that is outside the scope of LodePNG. This may mean that, depending on your use case, you may want to convert the big endian output of LodePNG to little endian with a for loop. This is certainly not always needed, many applications and libraries support big endian 16-bit colors anyway, but it means you cannot simply cast the unsigned char* buffer to an unsigned short* buffer on x86 CPUs. 7. error values --------------- All functions in LodePNG that return an error code, return 0 if everything went OK, or a non-zero code if there was an error. The meaning of the LodePNG error values can be retrieved with the function lodepng_error_text: given the numerical error code, it returns a description of the error in English as a string. Check the implementation of lodepng_error_text to see the meaning of each code. It is not recommended to use the numerical values to programmatically make different decisions based on error types as the numbers are not guaranteed to stay backwards compatible. They are for human consumption only. Programmatically only 0 or non-0 matter. 8. chunks and PNG editing ------------------------- If you want to add extra chunks to a PNG you encode, or use LodePNG for a PNG editor that should follow the rules about handling of unknown chunks, or if your program is able to read other types of chunks than the ones handled by LodePNG, then that's possible with the chunk functions of LodePNG. A PNG chunk has the following layout: 4 bytes length 4 bytes type name length bytes data 4 bytes CRC 8.1. iterating through chunks ----------------------------- If you have a buffer containing the PNG image data, then the first chunk (the IHDR chunk) starts at byte number 8 of that buffer. The first 8 bytes are the signature of the PNG and are not part of a chunk. But if you start at byte 8 then you have a chunk, and can check the following things of it. NOTE: none of these functions check for memory buffer boundaries. To avoid exploits, always make sure the buffer contains all the data of the chunks. When using lodepng_chunk_next, make sure the returned value is within the allocated memory. unsigned lodepng_chunk_length(const unsigned char* chunk): Get the length of the chunk's data. The total chunk length is this length + 12. void lodepng_chunk_type(char type[5], const unsigned char* chunk): unsigned char lodepng_chunk_type_equals(const unsigned char* chunk, const char* type): Get the type of the chunk or compare if it's a certain type unsigned char lodepng_chunk_critical(const unsigned char* chunk): unsigned char lodepng_chunk_private(const unsigned char* chunk): unsigned char lodepng_chunk_safetocopy(const unsigned char* chunk): Check if the chunk is critical in the PNG standard (only IHDR, PLTE, IDAT and IEND are). Check if the chunk is private (public chunks are part of the standard, private ones not). Check if the chunk is safe to copy. If it's not, then, when modifying data in a critical chunk, unsafe to copy chunks of the old image may NOT be saved in the new one if your program doesn't handle that type of unknown chunk. unsigned char* lodepng_chunk_data(unsigned char* chunk): const unsigned char* lodepng_chunk_data_const(const unsigned char* chunk): Get a pointer to the start of the data of the chunk. unsigned lodepng_chunk_check_crc(const unsigned char* chunk): void lodepng_chunk_generate_crc(unsigned char* chunk): Check if the crc is correct or generate a correct one. unsigned char* lodepng_chunk_next(unsigned char* chunk): const unsigned char* lodepng_chunk_next_const(const unsigned char* chunk): Iterate to the next chunk. This works if you have a buffer with consecutive chunks. Note that these functions do no boundary checking of the allocated data whatsoever, so make sure there is enough data available in the buffer to be able to go to the next chunk. unsigned lodepng_chunk_append(unsigned char** out, size_t* outsize, const unsigned char* chunk): unsigned lodepng_chunk_create(unsigned char** out, size_t* outsize, unsigned length, const char* type, const unsigned char* data): These functions are used to create new chunks that are appended to the data in *out that has length *outsize. The append function appends an existing chunk to the new data. The create function creates a new chunk with the given parameters and appends it. Type is the 4-letter name of the chunk. 8.2. chunks in info_png ----------------------- The LodePNGInfo struct contains fields with the unknown chunk in it. It has 3 buffers (each with size) to contain 3 types of unknown chunks: the ones that come before the PLTE chunk, the ones that come between the PLTE and the IDAT chunks, and the ones that come after the IDAT chunks. It's necessary to make the distinction between these 3 cases because the PNG standard forces to keep the ordering of unknown chunks compared to the critical chunks, but does not force any other ordering rules. info_png.unknown_chunks_data[0] is the chunks before PLTE info_png.unknown_chunks_data[1] is the chunks after PLTE, before IDAT info_png.unknown_chunks_data[2] is the chunks after IDAT The chunks in these 3 buffers can be iterated through and read by using the same way described in the previous subchapter. When using the decoder to decode a PNG, you can make it store all unknown chunks if you set the option settings.remember_unknown_chunks to 1. By default, this option is off (0). The encoder will always encode unknown chunks that are stored in the info_png. If you need it to add a particular chunk that isn't known by LodePNG, you can use lodepng_chunk_append or lodepng_chunk_create to the chunk data in info_png.unknown_chunks_data[x]. Chunks that are known by LodePNG should not be added in that way. E.g. to make LodePNG add a bKGD chunk, set background_defined to true and add the correct parameters there instead. 9. compiler support ------------------- No libraries other than the current standard C library are needed to compile LodePNG. For the C++ version, only the standard C++ library is needed on top. Add the files lodepng.c(pp) and lodepng.h to your project, include lodepng.h where needed, and your program can read/write PNG files. It is compatible with C90 and up, and C++03 and up. If performance is important, use optimization when compiling! For both the encoder and decoder, this makes a large difference. Make sure that LodePNG is compiled with the same compiler of the same version and with the same settings as the rest of the program, or the interfaces with std::vectors and std::strings in C++ can be incompatible. CHAR_BITS must be 8 or higher, because LodePNG uses unsigned chars for octets. *) gcc and g++ LodePNG is developed in gcc so this compiler is natively supported. It gives no warnings with compiler options "-Wall -Wextra -pedantic -ansi", with gcc and g++ version 4.7.1 on Linux, 32-bit and 64-bit. *) Clang Fully supported and warning-free. *) Mingw The Mingw compiler (a port of gcc for Windows) should be fully supported by LodePNG. *) Visual Studio and Visual C++ Express Edition LodePNG should be warning-free with warning level W4. Two warnings were disabled with pragmas though: warning 4244 about implicit conversions, and warning 4996 where it wants to use a non-standard function fopen_s instead of the standard C fopen. Visual Studio may want "stdafx.h" files to be included in each source file and give an error "unexpected end of file while looking for precompiled header". This is not standard C++ and will not be added to the stock LodePNG. You can disable it for lodepng.cpp only by right clicking it, Properties, C/C++, Precompiled Headers, and set it to Not Using Precompiled Headers there. NOTE: Modern versions of VS should be fully supported, but old versions, e.g. VS6, are not guaranteed to work. *) Compilers on Macintosh LodePNG has been reported to work both with gcc and LLVM for Macintosh, both for C and C++. *) Other Compilers If you encounter problems on any compilers, feel free to let me know and I may try to fix it if the compiler is modern and standards compliant. 10. examples ------------ This decoder example shows the most basic usage of LodePNG. More complex examples can be found on the LodePNG website. NOTE: these examples do not support wide-character filenames, you can use an external method to handle such files and encode or decode in-memory 10.1. decoder C++ example ------------------------- #include "lodepng.h" #include int main(int argc, char *argv[]) { const char* filename = argc > 1 ? argv[1] : "test.png"; //load and decode std::vector image; unsigned width, height; unsigned error = lodepng::decode(image, width, height, filename); //if there's an error, display it if(error) std::cout << "decoder error " << error << ": " << lodepng_error_text(error) << std::endl; //the pixels are now in the vector "image", 4 bytes per pixel, ordered RGBARGBA..., use it as texture, draw it, ... } 10.2. decoder C example ----------------------- #include "lodepng.h" int main(int argc, char *argv[]) { unsigned error; unsigned char* image; size_t width, height; const char* filename = argc > 1 ? argv[1] : "test.png"; error = lodepng_decode32_file(&image, &width, &height, filename); if(error) printf("decoder error %u: %s\n", error, lodepng_error_text(error)); / * use image here * / free(image); return 0; } 11. state settings reference ---------------------------- A quick reference of some settings to set on the LodePNGState For decoding: state.decoder.zlibsettings.ignore_adler32: ignore ADLER32 checksums state.decoder.zlibsettings.custom_...: use custom inflate function state.decoder.ignore_crc: ignore CRC checksums state.decoder.ignore_critical: ignore unknown critical chunks state.decoder.ignore_end: ignore missing IEND chunk. May fail if this corruption causes other errors state.decoder.color_convert: convert internal PNG color to chosen one state.decoder.read_text_chunks: whether to read in text metadata chunks state.decoder.remember_unknown_chunks: whether to read in unknown chunks state.info_raw.colortype: desired color type for decoded image state.info_raw.bitdepth: desired bit depth for decoded image state.info_raw....: more color settings, see struct LodePNGColorMode state.info_png....: no settings for decoder but ouput, see struct LodePNGInfo For encoding: state.encoder.zlibsettings.btype: disable compression by setting it to 0 state.encoder.zlibsettings.use_lz77: use LZ77 in compression state.encoder.zlibsettings.windowsize: tweak LZ77 windowsize state.encoder.zlibsettings.minmatch: tweak min LZ77 length to match state.encoder.zlibsettings.nicematch: tweak LZ77 match where to stop searching state.encoder.zlibsettings.lazymatching: try one more LZ77 matching state.encoder.zlibsettings.custom_...: use custom deflate function state.encoder.auto_convert: choose optimal PNG color type, if 0 uses info_png state.encoder.filter_palette_zero: PNG filter strategy for palette state.encoder.filter_strategy: PNG filter strategy to encode with state.encoder.force_palette: add palette even if not encoding to one state.encoder.add_id: add LodePNG identifier and version as a text chunk state.encoder.text_compression: use compressed text chunks for metadata state.info_raw.colortype: color type of raw input image you provide state.info_raw.bitdepth: bit depth of raw input image you provide state.info_raw: more color settings, see struct LodePNGColorMode state.info_png.color.colortype: desired color type if auto_convert is false state.info_png.color.bitdepth: desired bit depth if auto_convert is false state.info_png.color....: more color settings, see struct LodePNGColorMode state.info_png....: more PNG related settings, see struct LodePNGInfo 12. changes ----------- The version number of LodePNG is the date of the change given in the format yyyymmdd. Some changes aren't backwards compatible. Those are indicated with a (!) symbol. Not all changes are listed here, the commit history in github lists more: https://github.com/lvandeve/lodepng *) 27 jun 2021: added warnings that file reading/writing functions don't support wide-character filenames (support for this is not planned, opening files is not the core part of PNG decoding/decoding and is platform dependent). *) 17 okt 2020: prevent decoding too large text/icc chunks by default. *) 06 mar 2020: simplified some of the dynamic memory allocations. *) 12 jan 2020: (!) added 'end' argument to lodepng_chunk_next to allow correct overflow checks. *) 14 aug 2019: around 25% faster decoding thanks to huffman lookup tables. *) 15 jun 2019: (!) auto_choose_color API changed (for bugfix: don't use palette if gray ICC profile) and non-ICC LodePNGColorProfile renamed to LodePNGColorStats. *) 30 dec 2018: code style changes only: removed newlines before opening braces. *) 10 sep 2018: added way to inspect metadata chunks without full decoding. *) 19 aug 2018: (!) fixed color mode bKGD is encoded with and made it use palette index in case of palette. *) 10 aug 2018: (!) added support for gAMA, cHRM, sRGB and iCCP chunks. This change is backwards compatible unless you relied on unknown_chunks for those. *) 11 jun 2018: less restrictive check for pixel size integer overflow *) 14 jan 2018: allow optionally ignoring a few more recoverable errors *) 17 sep 2017: fix memory leak for some encoder input error cases *) 27 nov 2016: grey+alpha auto color model detection bugfix *) 18 apr 2016: Changed qsort to custom stable sort (for platforms w/o qsort). *) 09 apr 2016: Fixed colorkey usage detection, and better file loading (within the limits of pure C90). *) 08 dec 2015: Made load_file function return error if file can't be opened. *) 24 okt 2015: Bugfix with decoding to palette output. *) 18 apr 2015: Boundary PM instead of just package-merge for faster encoding. *) 24 aug 2014: Moved to github *) 23 aug 2014: Reduced needless memory usage of decoder. *) 28 jun 2014: Removed fix_png setting, always support palette OOB for simplicity. Made ColorProfile public. *) 09 jun 2014: Faster encoder by fixing hash bug and more zeros optimization. *) 22 dec 2013: Power of two windowsize required for optimization. *) 15 apr 2013: Fixed bug with LAC_ALPHA and color key. *) 25 mar 2013: Added an optional feature to ignore some PNG errors (fix_png). *) 11 mar 2013: (!) Bugfix with custom free. Changed from "my" to "lodepng_" prefix for the custom allocators and made it possible with a new #define to use custom ones in your project without needing to change lodepng's code. *) 28 jan 2013: Bugfix with color key. *) 27 okt 2012: Tweaks in text chunk keyword length error handling. *) 8 okt 2012: (!) Added new filter strategy (entropy) and new auto color mode. (no palette). Better deflate tree encoding. New compression tweak settings. Faster color conversions while decoding. Some internal cleanups. *) 23 sep 2012: Reduced warnings in Visual Studio a little bit. *) 1 sep 2012: (!) Removed #define's for giving custom (de)compression functions and made it work with function pointers instead. *) 23 jun 2012: Added more filter strategies. Made it easier to use custom alloc and free functions and toggle #defines from compiler flags. Small fixes. *) 6 may 2012: (!) Made plugging in custom zlib/deflate functions more flexible. *) 22 apr 2012: (!) Made interface more consistent, renaming a lot. Removed redundant C++ codec classes. Reduced amount of structs. Everything changed, but it is cleaner now imho and functionality remains the same. Also fixed several bugs and shrunk the implementation code. Made new samples. *) 6 nov 2011: (!) By default, the encoder now automatically chooses the best PNG color model and bit depth, based on the amount and type of colors of the raw image. For this, autoLeaveOutAlphaChannel replaced by auto_choose_color. *) 9 okt 2011: simpler hash chain implementation for the encoder. *) 8 sep 2011: lz77 encoder lazy matching instead of greedy matching. *) 23 aug 2011: tweaked the zlib compression parameters after benchmarking. A bug with the PNG filtertype heuristic was fixed, so that it chooses much better ones (it's quite significant). A setting to do an experimental, slow, brute force search for PNG filter types is added. *) 17 aug 2011: (!) changed some C zlib related function names. *) 16 aug 2011: made the code less wide (max 120 characters per line). *) 17 apr 2011: code cleanup. Bugfixes. Convert low to 16-bit per sample colors. *) 21 feb 2011: fixed compiling for C90. Fixed compiling with sections disabled. *) 11 dec 2010: encoding is made faster, based on suggestion by Peter Eastman to optimize long sequences of zeros. *) 13 nov 2010: added LodePNG_InfoColor_hasPaletteAlpha and LodePNG_InfoColor_canHaveAlpha functions for convenience. *) 7 nov 2010: added LodePNG_error_text function to get error code description. *) 30 okt 2010: made decoding slightly faster *) 26 okt 2010: (!) changed some C function and struct names (more consistent). Reorganized the documentation and the declaration order in the header. *) 08 aug 2010: only changed some comments and external samples. *) 05 jul 2010: fixed bug thanks to warnings in the new gcc version. *) 14 mar 2010: fixed bug where too much memory was allocated for char buffers. *) 02 sep 2008: fixed bug where it could create empty tree that linux apps could read by ignoring the problem but windows apps couldn't. *) 06 jun 2008: added more error checks for out of memory cases. *) 26 apr 2008: added a few more checks here and there to ensure more safety. *) 06 mar 2008: crash with encoding of strings fixed *) 02 feb 2008: support for international text chunks added (iTXt) *) 23 jan 2008: small cleanups, and #defines to divide code in sections *) 20 jan 2008: support for unknown chunks allowing using LodePNG for an editor. *) 18 jan 2008: support for tIME and pHYs chunks added to encoder and decoder. *) 17 jan 2008: ability to encode and decode compressed zTXt chunks added Also various fixes, such as in the deflate and the padding bits code. *) 13 jan 2008: Added ability to encode Adam7-interlaced images. Improved filtering code of encoder. *) 07 jan 2008: (!) changed LodePNG to use ISO C90 instead of C++. A C++ wrapper around this provides an interface almost identical to before. Having LodePNG be pure ISO C90 makes it more portable. The C and C++ code are together in these files but it works both for C and C++ compilers. *) 29 dec 2007: (!) changed most integer types to unsigned int + other tweaks *) 30 aug 2007: bug fixed which makes this Borland C++ compatible *) 09 aug 2007: some VS2005 warnings removed again *) 21 jul 2007: deflate code placed in new namespace separate from zlib code *) 08 jun 2007: fixed bug with 2- and 4-bit color, and small interlaced images *) 04 jun 2007: improved support for Visual Studio 2005: crash with accessing invalid std::vector element [0] fixed, and level 3 and 4 warnings removed *) 02 jun 2007: made the encoder add a tag with version by default *) 27 may 2007: zlib and png code separated (but still in the same file), simple encoder/decoder functions added for more simple usage cases *) 19 may 2007: minor fixes, some code cleaning, new error added (error 69), moved some examples from here to lodepng_examples.cpp *) 12 may 2007: palette decoding bug fixed *) 24 apr 2007: changed the license from BSD to the zlib license *) 11 mar 2007: very simple addition: ability to encode bKGD chunks. *) 04 mar 2007: (!) tEXt chunk related fixes, and support for encoding palettized PNG images. Plus little interface change with palette and texts. *) 03 mar 2007: Made it encode dynamic Huffman shorter with repeat codes. Fixed a bug where the end code of a block had length 0 in the Huffman tree. *) 26 feb 2007: Huffman compression with dynamic trees (BTYPE 2) now implemented and supported by the encoder, resulting in smaller PNGs at the output. *) 27 jan 2007: Made the Adler-32 test faster so that a timewaste is gone. *) 24 jan 2007: gave encoder an error interface. Added color conversion from any greyscale type to 8-bit greyscale with or without alpha. *) 21 jan 2007: (!) Totally changed the interface. It allows more color types to convert to and is more uniform. See the manual for how it works now. *) 07 jan 2007: Some cleanup & fixes, and a few changes over the last days: encode/decode custom tEXt chunks, separate classes for zlib & deflate, and at last made the decoder give errors for incorrect Adler32 or Crc. *) 01 jan 2007: Fixed bug with encoding PNGs with less than 8 bits per channel. *) 29 dec 2006: Added support for encoding images without alpha channel, and cleaned out code as well as making certain parts faster. *) 28 dec 2006: Added "Settings" to the encoder. *) 26 dec 2006: The encoder now does LZ77 encoding and produces much smaller files now. Removed some code duplication in the decoder. Fixed little bug in an example. *) 09 dec 2006: (!) Placed output parameters of public functions as first parameter. Fixed a bug of the decoder with 16-bit per color. *) 15 okt 2006: Changed documentation structure *) 09 okt 2006: Encoder class added. It encodes a valid PNG image from the given image buffer, however for now it's not compressed. *) 08 sep 2006: (!) Changed to interface with a Decoder class *) 30 jul 2006: (!) LodePNG_InfoPng , width and height are now retrieved in different way. Renamed decodePNG to decodePNGGeneric. *) 29 jul 2006: (!) Changed the interface: image info is now returned as a struct of type LodePNG::LodePNG_Info, instead of a vector, which was a bit clumsy. *) 28 jul 2006: Cleaned the code and added new error checks. Corrected terminology "deflate" into "inflate". *) 23 jun 2006: Added SDL example in the documentation in the header, this example allows easy debugging by displaying the PNG and its transparency. *) 22 jun 2006: (!) Changed way to obtain error value. Added loadFile function for convenience. Made decodePNG32 faster. *) 21 jun 2006: (!) Changed type of info vector to unsigned. Changed position of palette in info vector. Fixed an important bug that happened on PNGs with an uncompressed block. *) 16 jun 2006: Internally changed unsigned into unsigned where needed, and performed some optimizations. *) 07 jun 2006: (!) Renamed functions to decodePNG and placed them in LodePNG namespace. Changed the order of the parameters. Rewrote the documentation in the header. Renamed files to lodepng.cpp and lodepng.h *) 22 apr 2006: Optimized and improved some code *) 07 sep 2005: (!) Changed to std::vector interface *) 12 aug 2005: Initial release (C++, decoder only) 13. contact information ----------------------- Feel free to contact me with suggestions, problems, comments, ... concerning LodePNG. If you encounter a PNG image that doesn't work properly with this decoder, feel free to send it and I'll use it to find and fix the problem. My email address is (puzzle the account and domain together with an @ symbol): Domain: gmail dot com. Account: lode dot vandevenne. Copyright (c) 2005-2021 Lode Vandevenne */ ================================================ FILE: src/libraries/lua53/lprefix.h ================================================ /* ** $Id: lprefix.h,v 1.2 2014/12/29 16:54:13 roberto Exp $ ** Definitions for Lua code that must come before any other header file ** See Copyright Notice in lutf8lib.c */ #ifndef lprefix_h #define lprefix_h /* ** Allows POSIX/XSI stuff */ #if !defined(LUA_USE_C89) /* { */ #if !defined(_XOPEN_SOURCE) #define _XOPEN_SOURCE 600 #elif _XOPEN_SOURCE == 0 #undef _XOPEN_SOURCE /* use -D_XOPEN_SOURCE=0 to undefine it */ #endif /* ** Allows manipulation of large files in gcc and some other compilers */ #if !defined(LUA_32BITS) && !defined(_FILE_OFFSET_BITS) #define _LARGEFILE_SOURCE 1 #define _FILE_OFFSET_BITS 64 #endif #endif /* } */ /* ** Windows stuff */ #if defined(_WIN32) /* { */ #if !defined(_CRT_SECURE_NO_WARNINGS) #define _CRT_SECURE_NO_WARNINGS /* avoid warnings about ISO C functions */ #endif #endif /* } */ #endif ================================================ FILE: src/libraries/lua53/lstrlib.c ================================================ /* ** $Id: lstrlib.c,v 1.254 2016/12/22 13:08:50 roberto Exp $ ** Standard library for string operations and pattern-matching ** Modified by the Kepler Project and the LOVE Development Team to work with ** Lua 5.1's API */ /********************************************************************* * The MIT License (MIT) * * Copyright (c) 2015 Kepler Project. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in * the Software without restriction, including without limitation the rights to * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of * the Software, and to permit persons to whom the Software is furnished to do so, * subject to the following conditions: * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *********************************************************************/ /********************************************************************* * This file contains parts of Lua 5.2's and Lua 5.3's source code: * * Copyright (C) 1994-2014 Lua.org, PUC-Rio. * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *********************************************************************/ #include "lprefix.h" #include #include #include #include #include #include #include "lua.h" #include "lauxlib.h" #include "lualib.h" #include "lstrlib.h" #if LUA_VERSION_NUM == 501 typedef size_t lua_Unsigned; #endif #if LUA_VERSION_NUM >= 504 # define LUAL_BUFFER53_BUFFER(B) (B)->b.b #elif LUA_VERSION_NUM == 501 # define LUAL_BUFFER53_BUFFER(B) (B)->b.buffer #else # define LUAL_BUFFER53_BUFFER(B) (B)->b.initb #endif static void luaL_buffinit_53 (lua_State *L, luaL_Buffer_53 *B) { #if LUA_VERSION_NUM == 501 /* make it crash if used via pointer to a 5.1-style luaL_Buffer */ B->b.p = NULL; B->b.L = NULL; B->b.lvl = 0; /* reuse the buffer from the 5.1-style luaL_Buffer though! */ B->ptr = B->b.buffer; B->capacity = LUAL_BUFFERSIZE; B->nelems = 0; B->L2 = L; #else return luaL_buffinit(L, (luaL_Buffer*) B); #endif } static char *luaL_prepbuffsize_53 (luaL_Buffer_53 *B, size_t s) { #if LUA_VERSION_NUM == 501 if (B->capacity - B->nelems < s) { /* needs to grow */ char* newptr = NULL; size_t newcap = B->capacity * 2; if (newcap - B->nelems < s) newcap = B->nelems + s; if (newcap < B->capacity) /* overflow */ luaL_error(B->L2, "buffer too large"); newptr = (char*)lua_newuserdata(B->L2, newcap); memcpy(newptr, B->ptr, B->nelems); if (B->ptr != B->b.buffer) lua_replace(B->L2, -2); /* remove old buffer */ B->ptr = newptr; B->capacity = newcap; } return B->ptr+B->nelems; #else return luaL_prepbuffsize((luaL_Buffer*) B, s); #endif } #define luaL_addsize_53(B, s) \ ((B)->nelems += (s)) #define luaL_addchar_53(B, c) \ ((void)((B)->nelems < (B)->capacity || luaL_prepbuffsize_53((B), 1)), \ ((B)->ptr[(B)->nelems++] = (c))) static void luaL_addlstring_53 (luaL_Buffer_53 *B, const char *s, size_t l) { memcpy(luaL_prepbuffsize_53(B, l), s, l); luaL_addsize_53(B, l); } void lua53_pushresult (luaL_Buffer_53 *B) { lua_pushlstring(B->L2, B->ptr, B->nelems); if (B->ptr != LUAL_BUFFER53_BUFFER(B)) lua_replace(B->L2, -2); /* remove userdata buffer */ } void lua53_cleanupbuffer (luaL_Buffer_53 *B) { if (B->ptr != LUAL_BUFFER53_BUFFER(B)) lua_replace(B->L2, -1); /* remove userdata buffer */ } /* ** Some sizes are better limited to fit in 'int', but must also fit in ** 'size_t'. (We assume that 'lua_Integer' cannot be smaller than 'int'.) */ #define MAX_SIZET ((size_t)(~(size_t)0)) #define MAXSIZE \ (sizeof(size_t) < sizeof(int) ? MAX_SIZET : (size_t)(INT_MAX)) /* translate a relative string position: negative means back from end */ static lua_Integer posrelat (lua_Integer pos, size_t len) { if (pos >= 0) return pos; else if (0u - (size_t)pos > len) return 0; else return (lua_Integer)len + pos + 1; } /* ** {====================================================== ** PACK/UNPACK ** ======================================================= */ /* value used for padding */ #if !defined(LUAL_PACKPADBYTE) #define LUAL_PACKPADBYTE 0x00 #endif /* maximum size for the binary representation of an integer */ #define MAXINTSIZE 16 /* number of bits in a character */ #define NB CHAR_BIT /* mask for one character (NB 1's) */ #define MC ((1 << NB) - 1) /* size of a lua_Integer */ #define SZINT ((int)sizeof(lua_Integer)) /* dummy union to get native endianness */ static const union { int dummy; char little; /* true iff machine is little endian */ } nativeendian = {1}; /* dummy structure to get native alignment requirements */ struct cD { char c; union { double d; void *p; lua_Integer i; lua_Number n; } u; }; #define MAXALIGN (offsetof(struct cD, u)) /* ** Union for serializing floats */ typedef union Ftypes { float f; double d; lua_Number n; char buff[5 * sizeof(lua_Number)]; /* enough for any float type */ } Ftypes; /* ** information to pack/unpack stuff */ typedef struct Header { lua_State *L; int islittle; int maxalign; } Header; /* ** options for pack/unpack */ typedef enum KOption { Kint, /* signed integers */ Kuint, /* unsigned integers */ Kfloat, /* floating-point numbers */ Kchar, /* fixed-length strings */ Kstring, /* strings with prefixed length */ Kzstr, /* zero-terminated strings */ Kpadding, /* padding */ Kpaddalign, /* padding for alignment */ Knop /* no-op (configuration or spaces) */ } KOption; /* ** Read an integer numeral from string 'fmt' or return 'df' if ** there is no numeral */ static int digit (int c) { return '0' <= c && c <= '9'; } static int getnum (const char **fmt, int df) { if (!digit(**fmt)) /* no number? */ return df; /* return default value */ else { int a = 0; do { a = a*10 + (*((*fmt)++) - '0'); } while (digit(**fmt) && a <= ((int)MAXSIZE - 9)/10); return a; } } /* ** Read an integer numeral and raises an error if it is larger ** than the maximum size for integers. */ static int getnumlimit (Header *h, const char **fmt, int df) { int sz = getnum(fmt, df); if (sz > MAXINTSIZE || sz <= 0) luaL_error(h->L, "integral size (%d) out of limits [1,%d]", sz, MAXINTSIZE); return sz; } /* ** Initialize Header */ static void initheader (lua_State *L, Header *h) { h->L = L; h->islittle = nativeendian.little; h->maxalign = 1; } /* ** Read and classify next option. 'size' is filled with option's size. */ static KOption getoption (Header *h, const char **fmt, int *size) { int opt = *((*fmt)++); *size = 0; /* default */ switch (opt) { case 'b': *size = sizeof(char); return Kint; case 'B': *size = sizeof(char); return Kuint; case 'h': *size = sizeof(short); return Kint; case 'H': *size = sizeof(short); return Kuint; case 'l': *size = sizeof(long); return Kint; case 'L': *size = sizeof(long); return Kuint; case 'j': *size = sizeof(lua_Integer); return Kint; case 'J': *size = sizeof(lua_Integer); return Kuint; case 'T': *size = sizeof(size_t); return Kuint; case 'f': *size = sizeof(float); return Kfloat; case 'd': *size = sizeof(double); return Kfloat; case 'n': *size = sizeof(lua_Number); return Kfloat; case 'i': *size = getnumlimit(h, fmt, sizeof(int)); return Kint; case 'I': *size = getnumlimit(h, fmt, sizeof(int)); return Kuint; case 's': *size = getnumlimit(h, fmt, sizeof(size_t)); return Kstring; case 'c': *size = getnum(fmt, -1); if (*size == -1) luaL_error(h->L, "missing size for format option 'c'"); return Kchar; case 'z': return Kzstr; case 'x': *size = 1; return Kpadding; case 'X': return Kpaddalign; case ' ': break; case '<': h->islittle = 1; break; case '>': h->islittle = 0; break; case '=': h->islittle = nativeendian.little; break; case '!': h->maxalign = getnumlimit(h, fmt, MAXALIGN); break; default: luaL_error(h->L, "invalid format option '%c'", opt); } return Knop; } /* ** Read, classify, and fill other details about the next option. ** 'psize' is filled with option's size, 'notoalign' with its ** alignment requirements. ** Local variable 'size' gets the size to be aligned. (Kpadal option ** always gets its full alignment, other options are limited by ** the maximum alignment ('maxalign'). Kchar option needs no alignment ** despite its size. */ static KOption getdetails (Header *h, size_t totalsize, const char **fmt, int *psize, int *ntoalign) { KOption opt = getoption(h, fmt, psize); int align = *psize; /* usually, alignment follows size */ if (opt == Kpaddalign) { /* 'X' gets alignment from following option */ if (**fmt == '\0' || getoption(h, fmt, &align) == Kchar || align == 0) luaL_argerror(h->L, 1, "invalid next option for option 'X'"); } if (align <= 1 || opt == Kchar) /* need no alignment? */ *ntoalign = 0; else { if (align > h->maxalign) /* enforce maximum alignment */ align = h->maxalign; if ((align & (align - 1)) != 0) /* is 'align' not a power of 2? */ luaL_argerror(h->L, 1, "format asks for alignment not power of 2"); *ntoalign = (align - (int)(totalsize & (align - 1))) & (align - 1); } return opt; } /* ** Pack integer 'n' with 'size' bytes and 'islittle' endianness. ** The final 'if' handles the case when 'size' is larger than ** the size of a Lua integer, correcting the extra sign-extension ** bytes if necessary (by default they would be zeros). */ static void packint (luaL_Buffer_53 *b, lua_Unsigned n, int islittle, int size, int neg) { char *buff = luaL_prepbuffsize_53(b, size); int i; buff[islittle ? 0 : size - 1] = (char)(n & MC); /* first byte */ for (i = 1; i < size; i++) { n >>= NB; buff[islittle ? i : size - 1 - i] = (char)(n & MC); } if (neg && size > SZINT) { /* negative number need sign extension? */ for (i = SZINT; i < size; i++) /* correct extra bytes */ buff[islittle ? i : size - 1 - i] = (char)MC; } luaL_addsize_53(b, size); /* add result to buffer */ } /* ** Copy 'size' bytes from 'src' to 'dest', correcting endianness if ** given 'islittle' is different from native endianness. */ static void copywithendian (volatile char *dest, volatile const char *src, int size, int islittle) { if (islittle == nativeendian.little) { while (size-- != 0) *(dest++) = *(src++); } else { dest += size - 1; while (size-- != 0) *(dest--) = *(src++); } } void lua53_str_pack (lua_State *L, const char *fmt, int startidx, luaL_Buffer_53 *b) { Header h; int arg = startidx - 1; /* current argument to pack */ size_t totalsize = 0; /* accumulate total size of result */ initheader(L, &h); lua_pushnil(L); /* mark to separate arguments from string buffer */ luaL_buffinit_53(L, b); while (*fmt != '\0') { int size, ntoalign; KOption opt = getdetails(&h, totalsize, &fmt, &size, &ntoalign); totalsize += ntoalign + size; while (ntoalign-- > 0) luaL_addchar_53(b, LUAL_PACKPADBYTE); /* fill alignment */ arg++; switch (opt) { case Kint: { /* signed integers */ lua_Integer n = luaL_checkinteger(L, arg); if (size < SZINT) { /* need overflow check? */ lua_Integer lim = (lua_Integer)1 << ((size * NB) - 1); luaL_argcheck(L, -lim <= n && n < lim, arg, "integer overflow"); } packint(b, (lua_Unsigned)n, h.islittle, size, (n < 0)); break; } case Kuint: { /* unsigned integers */ lua_Integer n = luaL_checkinteger(L, arg); if (size < SZINT) /* need overflow check? */ luaL_argcheck(L, (lua_Unsigned)n < ((lua_Unsigned)1 << (size * NB)), arg, "unsigned overflow"); packint(b, (lua_Unsigned)n, h.islittle, size, 0); break; } case Kfloat: { /* floating-point options */ volatile Ftypes u; char *buff = luaL_prepbuffsize_53(b, size); lua_Number n = luaL_checknumber(L, arg); /* get argument */ if (size == sizeof(u.f)) u.f = (float)n; /* copy it into 'u' */ else if (size == sizeof(u.d)) u.d = (double)n; else u.n = n; /* move 'u' to final result, correcting endianness if needed */ copywithendian(buff, u.buff, size, h.islittle); luaL_addsize_53(b, size); break; } case Kchar: { /* fixed-size string */ size_t len; const char *s = luaL_checklstring(L, arg, &len); luaL_argcheck(L, len <= (size_t)size, arg, "string longer than given size"); luaL_addlstring_53(b, s, len); /* add string */ while (len++ < (size_t)size) /* pad extra space */ luaL_addchar_53(b, LUAL_PACKPADBYTE); break; } case Kstring: { /* strings with length count */ size_t len; const char *s = luaL_checklstring(L, arg, &len); luaL_argcheck(L, size >= (int)sizeof(size_t) || len < ((size_t)1 << (size * NB)), arg, "string length does not fit in given size"); packint(b, (lua_Unsigned)len, h.islittle, size, 0); /* pack length */ luaL_addlstring_53(b, s, len); totalsize += len; break; } case Kzstr: { /* zero-terminated string */ size_t len; const char *s = luaL_checklstring(L, arg, &len); luaL_argcheck(L, strlen(s) == len, arg, "string contains zeros"); luaL_addlstring_53(b, s, len); luaL_addchar_53(b, '\0'); /* add zero at the end */ totalsize += len + 1; break; } case Kpadding: luaL_addchar_53(b, LUAL_PACKPADBYTE); /* FALLTHROUGH */ case Kpaddalign: case Knop: arg--; /* undo increment */ break; } } } int lua53_str_packsize (lua_State *L) { Header h; const char *fmt = luaL_checkstring(L, 1); /* format string */ size_t totalsize = 0; /* accumulate total size of result */ initheader(L, &h); while (*fmt != '\0') { int size, ntoalign; KOption opt = getdetails(&h, totalsize, &fmt, &size, &ntoalign); size += ntoalign; /* total space used by option */ luaL_argcheck(L, totalsize <= MAXSIZE - size, 1, "format result too large"); totalsize += size; switch (opt) { case Kstring: /* strings with length count */ case Kzstr: /* zero-terminated string */ luaL_argerror(L, 1, "variable-length format"); /* call never return, but to avoid warnings: *//* FALLTHROUGH */ default: break; } } lua_pushinteger(L, (lua_Integer)totalsize); return 1; } /* ** Unpack an integer with 'size' bytes and 'islittle' endianness. ** If size is smaller than the size of a Lua integer and integer ** is signed, must do sign extension (propagating the sign to the ** higher bits); if size is larger than the size of a Lua integer, ** it must check the unread bytes to see whether they do not cause an ** overflow. */ static lua_Integer unpackint (lua_State *L, const char *str, int islittle, int size, int issigned) { lua_Unsigned res = 0; int i; int limit = (size <= SZINT) ? size : SZINT; for (i = limit - 1; i >= 0; i--) { res <<= NB; res |= (lua_Unsigned)(unsigned char)str[islittle ? i : size - 1 - i]; } if (size < SZINT) { /* real size smaller than lua_Integer? */ if (issigned) { /* needs sign extension? */ lua_Unsigned mask = (lua_Unsigned)1 << (size*NB - 1); res = ((res ^ mask) - mask); /* do sign extension */ } } else if (size > SZINT) { /* must check unread bytes */ int mask = (!issigned || (lua_Integer)res >= 0) ? 0 : MC; for (i = limit; i < size; i++) { if ((unsigned char)str[islittle ? i : size - 1 - i] != mask) luaL_error(L, "%d-byte integer does not fit into Lua Integer", size); } } return (lua_Integer)res; } int lua53_str_unpack (lua_State *L, const char *fmt, const char *data, size_t ld, int dataidx, int posidx) { Header h; size_t pos = (size_t)posrelat(luaL_optinteger(L, posidx, 1), ld) - 1; int n = 0; /* number of results */ luaL_argcheck(L, pos <= ld, posidx, "initial position out of string"); initheader(L, &h); while (*fmt != '\0') { int size, ntoalign; KOption opt = getdetails(&h, pos, &fmt, &size, &ntoalign); if ((size_t)ntoalign + size > ~pos || pos + ntoalign + size > ld) luaL_argerror(L, dataidx, "data string too short"); pos += ntoalign; /* skip alignment */ /* stack space for item + next position */ luaL_checkstack(L, dataidx, "too many results"); n++; switch (opt) { case Kint: case Kuint: { lua_Integer res = unpackint(L, data + pos, h.islittle, size, (opt == Kint)); lua_pushinteger(L, res); break; } case Kfloat: { volatile Ftypes u; lua_Number num; copywithendian(u.buff, data + pos, size, h.islittle); if (size == sizeof(u.f)) num = (lua_Number)u.f; else if (size == sizeof(u.d)) num = (lua_Number)u.d; else num = u.n; lua_pushnumber(L, num); break; } case Kchar: { lua_pushlstring(L, data + pos, size); break; } case Kstring: { size_t len = (size_t)unpackint(L, data + pos, h.islittle, size, 0); luaL_argcheck(L, pos + len + size <= ld, dataidx, "data string too short"); lua_pushlstring(L, data + pos + size, len); pos += len; /* skip string */ break; } case Kzstr: { size_t len = (int)strlen(data + pos); lua_pushlstring(L, data + pos, len); pos += len + 1; /* skip string plus final '\0' */ break; } case Kpaddalign: case Kpadding: case Knop: n--; /* undo increment */ break; } pos += size; } lua_pushinteger(L, pos + 1); /* next position */ return n + 1; } /* }====================================================== */ ================================================ FILE: src/libraries/lua53/lstrlib.h ================================================ #ifndef LUA53_LSTRLIB_H #define LUA53_LSTRLIB_H #ifdef __cplusplus extern "C" { #endif #include "lua.h" typedef struct luaL_Buffer_53 { luaL_Buffer b; /* make incorrect code crash! */ char *ptr; size_t nelems; size_t capacity; lua_State *L2; } luaL_Buffer_53; void lua53_pushresult (luaL_Buffer_53 *B); void lua53_cleanupbuffer (luaL_Buffer_53 *B); void lua53_str_pack (lua_State *L, const char *fmt, int startidx, luaL_Buffer_53 *b); int lua53_str_packsize (lua_State *L); int lua53_str_unpack (lua_State *L, const char *fmt, const char *data, size_t ld, int dataidx, int posidx); #ifdef __cplusplus } #endif #endif /* LUA53_LSTRLIB_H */ ================================================ FILE: src/libraries/lua53/lutf8lib.c ================================================ /* ** $Id: lutf8lib.c,v 1.13 2014/11/02 19:19:04 roberto Exp $ ** Standard library for UTF-8 manipulation ** Modified by the LOVE Development Team to work with Lua 5.1's API */ /****************************************************************************** * Copyright (C) 1994-2015 Lua.org, PUC-Rio, 2015 LOVE Development Team. * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ******************************************************************************/ #define lutf8lib_c #include "lprefix.h" #include #include #include #include "lutf8lib.h" #include "lauxlib.h" #include "lualib.h" #define MAXUNICODE 0x10FFFF /* size of buffer for 'utf8esc' function (taken from lobject.h) */ #define UTF8BUFFSZ 8 #define iscont(p) ((*(p) & 0xC0) == 0x80) /* from strlib */ /* translate a relative string position: negative means back from end */ static lua_Integer u_posrelat (lua_Integer pos, size_t len) { if (pos >= 0) return pos; else if (0u - (size_t)pos > len) return 0; else return (lua_Integer)len + pos + 1; } /* ** Decode one UTF-8 sequence, returning NULL if byte sequence is invalid. */ static const char *utf8_decode (const char *o, int *val) { static unsigned int limits[] = {0xFF, 0x7F, 0x7FF, 0xFFFF}; const unsigned char *s = (const unsigned char *)o; unsigned int c = s[0]; unsigned int res = 0; /* final result */ if (c < 0x80) /* ascii? */ res = c; else { int count = 0; /* to count number of continuation bytes */ while (c & 0x40) { /* still have continuation bytes? */ int cc = s[++count]; /* read next byte */ if ((cc & 0xC0) != 0x80) /* not a continuation byte? */ return NULL; /* invalid byte sequence */ res = (res << 6) | (cc & 0x3F); /* add lower 6 bits from cont. byte */ c <<= 1; /* to test next bit */ } res |= ((c & 0x7F) << (count * 5)); /* add first byte */ if (count > 3 || res > MAXUNICODE || res <= limits[count]) return NULL; /* invalid byte sequence */ s += count; /* skip continuation bytes read */ } if (val) *val = res; return (const char *)s + 1; /* +1 to include first byte */ } /* ** utf8len(s [, i [, j]]) --> number of characters that start in the ** range [i,j], or nil + current position if 's' is not well formed in ** that interval */ static int utflen (lua_State *L) { int n = 0; size_t len; const char *s = luaL_checklstring(L, 1, &len); lua_Integer posi = u_posrelat(luaL_optinteger(L, 2, 1), len); lua_Integer posj = u_posrelat(luaL_optinteger(L, 3, -1), len); luaL_argcheck(L, 1 <= posi && --posi <= (lua_Integer)len, 2, "initial position out of string"); luaL_argcheck(L, --posj < (lua_Integer)len, 3, "final position out of string"); while (posi <= posj) { const char *s1 = utf8_decode(s + posi, NULL); if (s1 == NULL) { /* conversion error? */ lua_pushnil(L); /* return nil ... */ lua_pushinteger(L, posi + 1); /* ... and current position */ return 2; } posi = s1 - s; n++; } lua_pushinteger(L, n); return 1; } /* ** codepoint(s, [i, [j]]) -> returns codepoints for all characters ** that start in the range [i,j] */ static int codepoint (lua_State *L) { size_t len; const char *s = luaL_checklstring(L, 1, &len); lua_Integer posi = u_posrelat(luaL_optinteger(L, 2, 1), len); lua_Integer pose = u_posrelat(luaL_optinteger(L, 3, posi), len); int n; const char *se; luaL_argcheck(L, posi >= 1, 2, "out of range"); luaL_argcheck(L, pose <= (lua_Integer)len, 3, "out of range"); if (posi > pose) return 0; /* empty interval; return no values */ n = (int)(pose - posi + 1); if (posi + n <= pose) /* (lua_Integer -> int) overflow? */ return luaL_error(L, "string slice too long"); luaL_checkstack(L, n, "string slice too long"); n = 0; se = s + pose; for (s += posi - 1; s < se;) { int code; s = utf8_decode(s, &code); if (s == NULL) return luaL_error(L, "invalid UTF-8 code"); lua_pushinteger(L, code); n++; } return n; } /* taken from lobject.c */ static int utf8esc (char *buff, unsigned long x) { int n = 1; /* number of bytes put in buffer (backwards) */ lua_assert(x <= 0x10FFFF); if (x < 0x80) /* ascii? */ buff[UTF8BUFFSZ - 1] = (char) x; else { /* need continuation bytes */ unsigned int mfb = 0x3f; /* maximum that fits in first byte */ do { /* add continuation bytes */ buff[UTF8BUFFSZ - (n++)] = (char) (0x80 | (x & 0x3f)); x >>= 6; /* remove added bits */ mfb >>= 1; /* now there is one less bit available in first byte */ } while (x > mfb); /* still needs continuation byte? */ buff[UTF8BUFFSZ - n] = (char) ((~mfb << 1) | x); /* add first byte */ } return n; } static void pushutfchar (lua_State *L, int arg) { lua_Integer code = luaL_checkinteger(L, arg); luaL_argcheck(L, 0 <= code && code <= MAXUNICODE, arg, "value out of range"); /* the %U string format does not exist in lua 5.1 or 5.2, so we emulate it */ /* (code from luaO_pushvfstring in lobject.c) */ char buff[UTF8BUFFSZ]; int l = utf8esc(buff, (long) code); lua_pushlstring(L, buff + UTF8BUFFSZ - l, l); } /* ** utfchar(n1, n2, ...) -> char(n1)..char(n2)... */ static int utfchar (lua_State *L) { int n = lua_gettop(L); /* number of arguments */ if (n == 1) /* optimize common case of single char */ pushutfchar(L, 1); else { int i; luaL_Buffer b; luaL_buffinit(L, &b); for (i = 1; i <= n; i++) { pushutfchar(L, i); luaL_addvalue(&b); } luaL_pushresult(&b); } return 1; } /* ** offset(s, n, [i]) -> index where n-th character counting from ** position 'i' starts; 0 means character at 'i'. */ static int byteoffset (lua_State *L) { size_t len; const char *s = luaL_checklstring(L, 1, &len); lua_Integer n = luaL_checkinteger(L, 2); lua_Integer posi = (n >= 0) ? 1 : len + 1; posi = u_posrelat(luaL_optinteger(L, 3, posi), len); luaL_argcheck(L, 1 <= posi && --posi <= (lua_Integer)len, 3, "position out of range"); if (n == 0) { /* find beginning of current byte sequence */ while (posi > 0 && iscont(s + posi)) posi--; } else { if (iscont(s + posi)) luaL_error(L, "initial position is a continuation byte"); if (n < 0) { while (n < 0 && posi > 0) { /* move back */ do { /* find beginning of previous character */ posi--; } while (posi > 0 && iscont(s + posi)); n++; } } else { n--; /* do not move for 1st character */ while (n > 0 && posi < (lua_Integer)len) { do { /* find beginning of next character */ posi++; } while (iscont(s + posi)); /* (cannot pass final '\0') */ n--; } } } if (n == 0) /* did it find given character? */ lua_pushinteger(L, posi + 1); else /* no such character */ lua_pushnil(L); return 1; } static int iter_aux (lua_State *L) { size_t len; const char *s = luaL_checklstring(L, 1, &len); lua_Integer n = lua_tointeger(L, 2) - 1; if (n < 0) /* first iteration? */ n = 0; /* start from here */ else if (n < (lua_Integer)len) { n++; /* skip current byte */ while (iscont(s + n)) n++; /* and its continuations */ } if (n >= (lua_Integer)len) return 0; /* no more codepoints */ else { int code; const char *next = utf8_decode(s + n, &code); if (next == NULL || iscont(next)) return luaL_error(L, "invalid UTF-8 code"); lua_pushinteger(L, n + 1); lua_pushinteger(L, code); return 2; } } static int iter_codes (lua_State *L) { luaL_checkstring(L, 1); lua_pushcfunction(L, iter_aux); lua_pushvalue(L, 1); lua_pushinteger(L, 0); return 3; } /* pattern to match a single UTF-8 character */ #if LUA_VERSION_NUM >= 502 #define UTF8PATT "[\0-\x7F\xC2-\xF4][\x80-\xBF]*" #else /* lua 5.1 doesn't support literal null bytes in patterns */ #define UTF8PATT "[%z\x01-\x7F\xC2-\xF4][\x80-\xBF]*" #endif static struct luaL_Reg funcs[] = { {"offset", byteoffset}, {"codepoint", codepoint}, {"char", utfchar}, {"len", utflen}, {"codes", iter_codes}, /* placeholders */ {"charpattern", NULL}, {NULL, NULL} }; /* modified version of luaopen_utf8, designed to work with lua 5.1-5.3 */ int luaopen_luautf8 (lua_State *L) { luaL_Reg *l; lua_createtable(L, 0, (int) (sizeof(funcs) / sizeof(luaL_Reg)) - 1); for (l = funcs; l->name != NULL; l++) { if (l->func != NULL) { lua_pushcfunction(L, l->func); lua_setfield(L, -2, l->name); } } lua_pushlstring(L, UTF8PATT, sizeof(UTF8PATT) / sizeof(char) - 1); lua_setfield(L, -2, "charpattern"); return 1; } ================================================ FILE: src/libraries/lua53/lutf8lib.h ================================================ #ifndef LUA53_LUTF8LIB_H #define LUA53_LUTF8LIB_H #ifdef __cplusplus extern "C" { #endif #include "lua.h" LUALIB_API int luaopen_luautf8(lua_State *L); #ifdef __cplusplus } #endif #endif /* LUA53_LUTF8LIB_H */ ================================================ FILE: src/libraries/luahttps/Android.mk ================================================ LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE := https LOCAL_MODULE_FILENAME := https LOCAL_CFLAGS := -DNOMINMAX LOCAL_CPPFLAGS := -std=c++11 LOCAL_ARM_NEON := true LOCAL_C_INCLUDES := \ ${LOCAL_PATH}/src \ ${LOCAL_PATH}/src/android LOCAL_SRC_FILES := \ src/lua/main.cpp \ src/common/HTTPS.cpp \ src/common/HTTPRequest.cpp \ src/common/HTTPSClient.cpp \ src/common/PlaintextConnection.cpp \ src/android/AndroidClient.cpp LOCAL_SHARED_LIBRARIES := liblove include $(BUILD_SHARED_LIBRARY) ================================================ FILE: src/libraries/luahttps/java.txt ================================================ src/android/java ================================================ FILE: src/libraries/luahttps/license.txt ================================================ Copyright (c) 2019-2023 LOVE Development Team This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. ================================================ FILE: src/libraries/luahttps/src/android/AndroidClient.cpp ================================================ #include "AndroidClient.h" #ifdef HTTPS_BACKEND_ANDROID #include #include #include "../common/LibraryLoader.h" // We want std::string that contains null byte, hence length of 1. // NOLINTNEXTLINE static std::string null("", 1); static std::string replace(const std::string &str, const std::string &from, const std::string &to) { std::stringstream ss; size_t oldpos = 0; while (true) { size_t pos = str.find(from, oldpos); if (pos == std::string::npos) { ss << str.substr(oldpos); break; } ss << str.substr(oldpos, pos - oldpos) << to; oldpos = pos + from.length(); } return ss.str(); } static jstring newStringUTF(JNIEnv *env, const std::string &str) { std::string newStr = replace(str, null, "\xC0\x80"); jstring jstr = env->NewStringUTF(newStr.c_str()); return jstr; } static std::string getStringUTF(JNIEnv *env, jstring str) { const char *c = env->GetStringUTFChars(str, nullptr); std::string result = replace(c, "\xC0\x80", null); env->ReleaseStringUTFChars(str, c); return result; } AndroidClient::AndroidClient() : HTTPSClient() { LibraryLoader::handle *library = LibraryLoader::GetCurrentProcessHandle(); // Look for SDL_GetAndroidJNIEnv and SDL_GetAndroidActivity (SDL3) if (!( LibraryLoader::LoadSymbol(SDL_AndroidGetJNIEnv, library, "SDL_GetAndroidJNIEnv") && LibraryLoader::LoadSymbol(SDL_AndroidGetActivity, library, "SDL_GetAndroidActivity") )) { // Probably running SDL2. LibraryLoader::LoadSymbol(SDL_AndroidGetJNIEnv, library, "SDL_AndroidGetJNIEnv"); LibraryLoader::LoadSymbol(SDL_AndroidGetActivity, library, "SDL_AndroidGetActivity"); } } bool AndroidClient::valid() const { if (SDL_AndroidGetJNIEnv && SDL_AndroidGetActivity) { JNIEnv *env = SDL_AndroidGetJNIEnv(); if (env) { jclass httpsClass = getHTTPSClass(); if (env->ExceptionCheck()) { env->ExceptionClear(); return false; } env->DeleteLocalRef(httpsClass); return true; } } return false; } HTTPSClient::Reply AndroidClient::request(const HTTPSClient::Request &req) { JNIEnv *env = SDL_AndroidGetJNIEnv(); jclass httpsClass = getHTTPSClass(); if (httpsClass == nullptr) { env->ExceptionClear(); throw std::runtime_error("Could not find class 'org.love2d.luahttps.LuaHTTPS'"); } jmethodID constructor = env->GetMethodID(httpsClass, "", "()V"); jmethodID setURL = env->GetMethodID(httpsClass, "setUrl", "(Ljava/lang/String;)V"); jmethodID setMethod = env->GetMethodID(httpsClass, "setMethod", "(Ljava/lang/String;)V"); jmethodID request = env->GetMethodID(httpsClass, "request", "()Z"); jmethodID getInterleavedHeaders = env->GetMethodID(httpsClass, "getInterleavedHeaders", "()[Ljava/lang/String;"); jmethodID getResponse = env->GetMethodID(httpsClass, "getResponse", "()[B"); jmethodID getResponseCode = env->GetMethodID(httpsClass, "getResponseCode", "()I"); jobject httpsObject = env->NewObject(httpsClass, constructor); // Set URL jstring url = env->NewStringUTF(req.url.c_str()); env->CallVoidMethod(httpsObject, setURL, url); env->DeleteLocalRef(url); // Set method jstring method = env->NewStringUTF(req.method.c_str()); env->CallVoidMethod(httpsObject, setMethod, method); env->DeleteLocalRef(method); // Set post data if (!req.postdata.empty()) { jmethodID setPostData = env->GetMethodID(httpsClass, "setPostData", "([B)V"); jbyteArray byteArray = env->NewByteArray((jsize) req.postdata.length()); jbyte *byteArrayData = env->GetByteArrayElements(byteArray, nullptr); // The usage of memcpy is intentional. // NOLINTNEXTLINE memcpy(byteArrayData, req.postdata.data(), req.postdata.length()); env->ReleaseByteArrayElements(byteArray, byteArrayData, 0); env->CallVoidMethod(httpsObject, setPostData, byteArray); env->DeleteLocalRef(byteArray); } // Set headers if (!req.headers.empty()) { jmethodID addHeader = env->GetMethodID(httpsClass, "addHeader", "(Ljava/lang/String;Ljava/lang/String;)V"); for (auto &header : req.headers) { jstring headerKey = newStringUTF(env, header.first); jstring headerValue = newStringUTF(env, header.second); env->CallVoidMethod(httpsObject, addHeader, headerKey, headerValue); env->DeleteLocalRef(headerKey); env->DeleteLocalRef(headerValue); } } // Do request HTTPSClient::Reply response; jboolean status = env->CallBooleanMethod(httpsObject, request); // Get response response.responseCode = env->CallIntMethod(httpsObject, getResponseCode); if (status) { // Get headers jobjectArray interleavedHeaders = (jobjectArray) env->CallObjectMethod(httpsObject, getInterleavedHeaders); int headerLen = env->GetArrayLength(interleavedHeaders); for (int i = 0; i < headerLen; i += 2) { jstring key = (jstring) env->GetObjectArrayElement(interleavedHeaders, i); jstring value = (jstring) env->GetObjectArrayElement(interleavedHeaders, i + 1); response.headers[getStringUTF(env, key)] = getStringUTF(env, value); env->DeleteLocalRef(key); env->DeleteLocalRef(value); } env->DeleteLocalRef(interleavedHeaders); // Get response data jbyteArray responseData = (jbyteArray) env->CallObjectMethod(httpsObject, getResponse); if (responseData) { int responseLen = env->GetArrayLength(responseData); jbyte *responseByte = env->GetByteArrayElements(responseData, nullptr); response.body = std::string((char *) responseByte, responseLen); env->DeleteLocalRef(responseData); } } env->DeleteLocalRef(httpsObject); return response; } jclass AndroidClient::getHTTPSClass() const { JNIEnv *env = SDL_AndroidGetJNIEnv(); jclass classLoaderClass = env->FindClass("java/lang/ClassLoader"); jmethodID loadClass = env->GetMethodID(classLoaderClass, "loadClass", "(Ljava/lang/String;)Ljava/lang/Class;"); jobject activity = SDL_AndroidGetActivity(); if (activity == nullptr) return nullptr; jclass gameActivity = env->GetObjectClass(activity); jmethodID getLoader = env->GetMethodID(gameActivity, "getClassLoader", "()Ljava/lang/ClassLoader;"); jobject classLoader = env->CallObjectMethod(activity, getLoader); jstring httpsClassName = env->NewStringUTF("org.love2d.luahttps.LuaHTTPS"); jclass httpsClass = (jclass) env->CallObjectMethod(classLoader, loadClass, httpsClassName); env->DeleteLocalRef(gameActivity); env->DeleteLocalRef(httpsClassName); env->DeleteLocalRef(activity); env->DeleteLocalRef(classLoaderClass); return httpsClass; } #endif // HTTPS_BACKEND_ANDROID ================================================ FILE: src/libraries/luahttps/src/android/AndroidClient.h ================================================ #pragma once #include "../common/config.h" #ifdef HTTPS_BACKEND_ANDROID #include #include "../common/HTTPSClient.h" class AndroidClient: public HTTPSClient { public: AndroidClient(); bool valid() const override; HTTPSClient::Reply request(const HTTPSClient::Request &req) override; private: JNIEnv *(*SDL_AndroidGetJNIEnv)(); jobject (*SDL_AndroidGetActivity)(); jclass getHTTPSClass() const; }; #endif ================================================ FILE: src/libraries/luahttps/src/android/java/org/love2d/luahttps/LuaHTTPS.java ================================================ package org.love2d.luahttps; import android.text.TextUtils; import android.util.Log; import androidx.annotation.Keep; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.net.HttpURLConnection; import java.net.MalformedURLException; import java.net.ProtocolException; import java.net.URL; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; @Keep class LuaHTTPS { static private String TAG = "LuaHTTPS"; private String urlString; private String method; private byte[] postData; private byte[] response; private int responseCode; private HashMap headers; public LuaHTTPS() { headers = new HashMap(); reset(); } public void reset() { urlString = null; method = "GET"; postData = null; response = null; responseCode = 0; headers.clear(); } @Keep public void setUrl(String url) { urlString = url; } @Keep public void setPostData(byte[] postData) { this.postData = postData; } @Keep public void setMethod(String method) { this.method = method.toUpperCase(); } @Keep public void addHeader(String key, String value) { headers.put(key, value); } @Keep public String[] getInterleavedHeaders() { ArrayList resultInterleaved = new ArrayList(); for (Map.Entry header: headers.entrySet()) { String key = header.getKey(); String value = header.getValue(); if (key != null && value != null) { resultInterleaved.add(key); resultInterleaved.add(value); } } String[] result = new String[resultInterleaved.size()]; resultInterleaved.toArray(result); return result; } @Keep public int getResponseCode() { return responseCode; } @Keep public byte[] getResponse() { return response; } @Keep public boolean request() { if (urlString == null) { return false; } URL url; try { url = new URL(urlString); if (!url.getProtocol().equals("http") && !url.getProtocol().equals("https")) { return false; } } catch (MalformedURLException e) { Log.e(TAG, "Error", e); return false; } HttpURLConnection connection; try { connection = (HttpURLConnection) url.openConnection(); } catch (IOException e) { Log.e(TAG, "Error", e); return false; } // Set request method try { connection.setRequestMethod(method); } catch (ProtocolException e) { Log.e(TAG, "Error", e); return false; } // Set header for (Map.Entry headerData: headers.entrySet()) { connection.setRequestProperty(headerData.getKey(), headerData.getValue()); } // Set post data if (postData != null && canSendData()) { connection.setDoOutput(true); try { OutputStream out = connection.getOutputStream(); out.write(postData); } catch (Exception e) { Log.e(TAG, "Error", e); connection.disconnect(); return false; } } // Request try { InputStream in; // Set response code responseCode = connection.getResponseCode(); if (responseCode >= 400) { in = connection.getErrorStream(); } else { in = connection.getInputStream(); } // Read response int readed; byte[] temp = new byte[4096]; ByteArrayOutputStream response = new ByteArrayOutputStream(); while ((readed = in.read(temp)) != -1) { response.write(temp, 0, readed); } this.response = response.toByteArray(); response.close(); // Read headers headers.clear(); for (Map.Entry> header: connection.getHeaderFields().entrySet()) { headers.put(header.getKey(), TextUtils.join(", ", header.getValue())); } } catch (Exception e) { Log.e(TAG, "Error", e); connection.disconnect(); return false; } connection.disconnect(); return true; } private boolean canSendData() { return !method.equals("GET") && !method.equals("HEAD"); } } ================================================ FILE: src/libraries/luahttps/src/apple/NSURLClient.h ================================================ #pragma once #include "../common/config.h" #ifdef HTTPS_BACKEND_NSURL #include "../common/HTTPSClient.h" class NSURLClient : public HTTPSClient { public: virtual bool valid() const override; virtual HTTPSClient::Reply request(const HTTPSClient::Request &req) override; }; #endif // HTTPS_BACKEND_NSURL ================================================ FILE: src/libraries/luahttps/src/apple/NSURLClient.mm ================================================ #include "NSURLClient.h" #ifdef HTTPS_BACKEND_NSURL #import #if ! __has_feature(objc_arc) #error "ARC is off" #endif bool NSURLClient::valid() const { return true; } static std::string toCppString(NSData *data) { return std::string((const char*) data.bytes, (size_t) data.length); } static std::string toCppString(NSString *str) { return std::string([str UTF8String]); } HTTPSClient::Reply NSURLClient::request(const HTTPSClient::Request &req) { @autoreleasepool { NSURL *url = [NSURL URLWithString:@(req.url.c_str())]; NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url]; NSData *bodydata = nil; [request setHTTPMethod:@(req.method.c_str())]; if (req.postdata.size() > 0 && (req.method != "GET" && req.method != "HEAD")) { bodydata = [NSData dataWithBytesNoCopy:(void*) req.postdata.data() length:req.postdata.size() freeWhenDone:NO]; [request setHTTPBody:bodydata]; } for (auto &header : req.headers) [request setValue:@(header.second.c_str()) forHTTPHeaderField:@(header.first.c_str())]; __block NSHTTPURLResponse *response = nil; __block NSError *error = nil; __block NSData *body = nil; dispatch_semaphore_t sem = dispatch_semaphore_create(0); NSURLSessionTask *task = [[NSURLSession sharedSession] dataTaskWithRequest:request completionHandler:^(NSData *data, NSURLResponse *resp, NSError *err) { body = data; response = (NSHTTPURLResponse *)resp; error = err; dispatch_semaphore_signal(sem); }]; [task resume]; dispatch_semaphore_wait(sem, DISPATCH_TIME_FOREVER); HTTPSClient::Reply reply; reply.responseCode = 0; if (body) { reply.body = toCppString(body); } if (response) { reply.responseCode = [response statusCode]; NSDictionary *headers = [response allHeaderFields]; for (NSString *key in headers) { NSString *value = headers[key]; reply.headers[toCppString(key)] = toCppString(value); } } if (reply.responseCode == 0 && body == nil && error != nil) { reply.body = toCppString(error.localizedDescription); } return reply; }} #endif // HTTPS_BACKEND_NSURL ================================================ FILE: src/libraries/luahttps/src/common/Connection.h ================================================ #pragma once #include #include class Connection { public: virtual bool connect(const std::string &hostname, uint16_t port) = 0; virtual size_t read(char *buffer, size_t size) = 0; virtual size_t write(const char *buffer, size_t size) = 0; virtual void close() = 0; virtual ~Connection() {}; }; ================================================ FILE: src/libraries/luahttps/src/common/ConnectionClient.h ================================================ #pragma once #include "HTTPSClient.h" #include "HTTPRequest.h" #include "Connection.h" template class ConnectionClient : public HTTPSClient { public: virtual bool valid() const override; virtual HTTPSClient::Reply request(const HTTPSClient::Request &req) override; private: static Connection *factory(); }; template bool ConnectionClient::valid() const { return Connection::valid(); } template Connection *ConnectionClient::factory() { return new Connection(); } template HTTPSClient::Reply ConnectionClient::request(const HTTPSClient::Request &req) { HTTPRequest request(factory); return request.request(req); } ================================================ FILE: src/libraries/luahttps/src/common/HTTPRequest.cpp ================================================ #include #include #include #include #include #include "HTTPRequest.h" #include "PlaintextConnection.h" HTTPRequest::HTTPRequest(ConnectionFactory factory) : factory(factory) { } HTTPSClient::Reply HTTPRequest::request(const HTTPSClient::Request &req) { HTTPSClient::Reply reply; reply.responseCode = 0; auto info = parseUrl(req.url); if (!info.valid) return reply; std::unique_ptr conn; if (info.schema == "http") conn.reset(new PlaintextConnection()); else if (info.schema == "https") conn.reset(factory()); else throw std::runtime_error("Unknown url schema"); if (!conn->connect(info.hostname, info.port)) return reply; // Build the request { std::stringstream request; std::string method = req.method; bool hasData = req.postdata.length() > 0; if (method.length() == 0) method = hasData ? "POST" : "GET"; request << method << " " << info.query << " HTTP/1.1\r\n"; for (auto &header : req.headers) request << header.first << ": " << header.second << "\r\n"; request << "Connection: Close\r\n"; request << "Host: " << info.hostname << "\r\n"; if (hasData) request << "Content-Length: " << req.postdata.size() << "\r\n"; request << "\r\n"; if (hasData) request << req.postdata; // Send it std::string requestData = request.str(); conn->write(requestData.c_str(), requestData.size()); } // Now receive the reply std::stringstream response; { char buffer[8192]; while (true) { size_t read = conn->read(buffer, sizeof(buffer)); response.write(buffer, read); if (read == 0) break; } conn->close(); } reply.responseCode = 500; // And parse it { std::string protocol; response >> protocol; if (protocol != "HTTP/1.1") return reply; response >> reply.responseCode; response.ignore(std::numeric_limits::max(), '\n'); for (std::string line; getline(response, line, '\n') && line != "\r"; ) { auto sep = line.find(':'); reply.headers[line.substr(0, sep)] = line.substr(sep+1, line.size()-sep-1); } auto begin = std::istreambuf_iterator(response); auto end = std::istreambuf_iterator(); reply.body = std::string(begin, end); } return reply; } HTTPRequest::DissectedURL HTTPRequest::parseUrl(const std::string &url) { DissectedURL dis; dis.valid = false; // Schema auto schemaStart = 0; auto schemaEnd = url.find("://"); dis.schema = url.substr(schemaStart, schemaEnd-schemaStart); // Auth+Hostname+Port auto connStart = schemaEnd+3; auto connEnd = url.find('/', connStart); if (connEnd == std::string::npos) connEnd = url.size(); // TODO: Auth if (url.find("@", connStart, connEnd-connStart) != std::string::npos) return dis; // Port auto portStart = url.find(':', connStart); auto portEnd = connEnd; if (portStart == std::string::npos || portStart > portEnd) { dis.port = dis.schema == "http" ? 80 : 443; portStart = portEnd; } else dis.port = std::stoi(url.substr(portStart+1, portEnd-portStart-1)); // Hostname auto hostnameStart = connStart; auto hostnameEnd = portStart; dis.hostname = url.substr(hostnameStart, hostnameEnd-hostnameStart); // And the query dis.query = url.substr(connEnd); if (dis.query.size() == 0) dis.query = "/"; dis.valid = true; return dis; } ================================================ FILE: src/libraries/luahttps/src/common/HTTPRequest.h ================================================ #pragma once #include #include "HTTPSClient.h" #include "Connection.h" class HTTPRequest { public: struct DissectedURL { bool valid; std::string schema; std::string hostname; uint16_t port; std::string query; // TODO: Auth? }; typedef std::function ConnectionFactory; HTTPRequest(ConnectionFactory factory); HTTPSClient::Reply request(const HTTPSClient::Request &req); static DissectedURL parseUrl(const std::string &url); private: ConnectionFactory factory; }; ================================================ FILE: src/libraries/luahttps/src/common/HTTPS.cpp ================================================ #include "HTTPS.h" #include "config.h" #include "ConnectionClient.h" #include "LibraryLoader.h" #include #ifdef HTTPS_BACKEND_CURL # include "../generic/CurlClient.h" #endif #ifdef HTTPS_BACKEND_OPENSSL # include "../generic/OpenSSLConnection.h" #endif #ifdef HTTPS_BACKEND_SCHANNEL # include "../windows/SChannelConnection.h" #endif #ifdef HTTPS_BACKEND_NSURL # include "../apple/NSURLClient.h" #endif #ifdef HTTPS_BACKEND_ANDROID # include "../android/AndroidClient.h" #endif #ifdef HTTPS_BACKEND_WININET # include "../windows/WinINetClient.h" #endif #ifdef HTTPS_BACKEND_CURL static CurlClient curlclient; #endif #ifdef HTTPS_BACKEND_OPENSSL static ConnectionClient opensslclient; #endif #ifdef HTTPS_BACKEND_SCHANNEL static ConnectionClient schannelclient; #endif #ifdef HTTPS_BACKEND_NSURL static NSURLClient nsurlclient; #endif #ifdef HTTPS_BACKEND_ANDROID static AndroidClient androidclient; #endif #ifdef HTTPS_BACKEND_WININET static WinINetClient wininetclient; #endif static HTTPSClient *clients[] = { #ifdef HTTPS_BACKEND_CURL &curlclient, #endif #ifdef HTTPS_BACKEND_OPENSSL &opensslclient, #endif // WinINet must be above SChannel #ifdef HTTPS_BACKEND_WININET &wininetclient, #endif #ifdef HTTPS_BACKEND_SCHANNEL &schannelclient, #endif #ifdef HTTPS_BACKEND_NSURL &nsurlclient, #endif #ifdef HTTPS_BACKEND_ANDROID &androidclient, #endif nullptr, }; // Call into the library loader to make sure it is linked in static LibraryLoader::handle* dummyProcessHandle = LibraryLoader::GetCurrentProcessHandle(); HTTPSClient::Reply request(const HTTPSClient::Request &req) { for (size_t i = 0; clients[i]; ++i) { HTTPSClient &client = *clients[i]; if (client.valid()) return client.request(req); } throw std::runtime_error("No applicable HTTPS implementation found"); } ================================================ FILE: src/libraries/luahttps/src/common/HTTPS.h ================================================ #pragma once #include "HTTPSClient.h" HTTPSClient::Reply request(const HTTPSClient::Request &req); ================================================ FILE: src/libraries/luahttps/src/common/HTTPSClient.cpp ================================================ #include #include #include "HTTPSClient.h" // This may not be the order you expect, as shorter strings always compare less, // but it's sufficient for our map bool HTTPSClient::ci_string_less::operator()(const std::string &lhs, const std::string &rhs) const { const size_t lhs_size = lhs.size(); const size_t rhs_size = rhs.size(); const size_t steps = std::min(lhs_size, rhs_size); if (lhs_size < rhs_size) return true; else if (lhs_size > rhs_size) return false; for (size_t i = 0; i < steps; ++i) { char l = std::tolower(lhs[i]); char r = std::tolower(rhs[i]); if (l < r) return true; else if (l > r) return false; } return false; } HTTPSClient::Request::Request(const std::string &url) : url(url) , method("GET") { } ================================================ FILE: src/libraries/luahttps/src/common/HTTPSClient.h ================================================ #pragma once #include #include #include class HTTPSClient { public: struct ci_string_less { bool operator()(const std::string &lhs, const std::string &rhs) const; }; using header_map = std::map; struct Request { Request(const std::string &url); header_map headers; std::string url; std::string postdata; std::string method; }; struct Reply { header_map headers; std::string body; int responseCode; }; virtual ~HTTPSClient() {} virtual bool valid() const = 0; virtual Reply request(const Request &req) = 0; }; ================================================ FILE: src/libraries/luahttps/src/common/LibraryLoader.h ================================================ #pragma once namespace LibraryLoader { using handle = void; using function = void(); handle *OpenLibrary(const char *name); void CloseLibrary(handle *handle); handle* GetCurrentProcessHandle(); function *GetFunction(handle *handle, const char *name); template inline bool LoadSymbol(T& var, handle *handle, const char *name) { var = reinterpret_cast(GetFunction(handle, name)); return var != nullptr; } } ================================================ FILE: src/libraries/luahttps/src/common/PlaintextConnection.cpp ================================================ #include "config.h" #include #ifndef HTTPS_USE_WINSOCK # include # include # include # include #else # include # include #endif // HTTPS_USE_WINSOCK #include "PlaintextConnection.h" #ifdef HTTPS_USE_WINSOCK static void close(int fd) { closesocket(fd); } #endif // HTTPS_USE_WINSOCK PlaintextConnection::PlaintextConnection() : fd(-1) { #ifdef HTTPS_USE_WINSOCK static bool wsaInit = false; if (!wsaInit) { WSADATA data; WSAStartup(MAKEWORD(2, 2), &data); } #endif // HTTPS_USE_WINSOCK } PlaintextConnection::~PlaintextConnection() { if (fd != -1) ::close(fd); } bool PlaintextConnection::connect(const std::string &hostname, uint16_t port) { addrinfo hints; std::memset(&hints, 0, sizeof(hints)); hints.ai_flags = hints.ai_protocol = 0; hints.ai_family = AF_UNSPEC; hints.ai_socktype = SOCK_STREAM; addrinfo *addrs = nullptr; std::string portString = std::to_string(port); getaddrinfo(hostname.c_str(), portString.c_str(), &hints, &addrs); // Try all addresses returned bool connected = false; for (addrinfo *addr = addrs; !connected && addr; addr = addr->ai_next) { fd = socket(addr->ai_family, SOCK_STREAM, 0); connected = ::connect(fd, addr->ai_addr, addr->ai_addrlen) == 0; if (!connected) ::close(fd); } freeaddrinfo(addrs); if (!connected) { fd = -1; return false; } return true; } size_t PlaintextConnection::read(char *buffer, size_t size) { auto read = ::recv(fd, buffer, size, 0); if (read < 0) read = 0; return static_cast(read); } size_t PlaintextConnection::write(const char *buffer, size_t size) { auto written = ::send(fd, buffer, size, 0); if (written < 0) written = 0; return static_cast(written); } void PlaintextConnection::close() { ::close(fd); fd = -1; } int PlaintextConnection::getFd() const { return fd; } ================================================ FILE: src/libraries/luahttps/src/common/PlaintextConnection.h ================================================ #pragma once #include "Connection.h" class PlaintextConnection : public Connection { public: PlaintextConnection(); virtual bool connect(const std::string &hostname, uint16_t port); virtual size_t read(char *buffer, size_t size); virtual size_t write(const char *buffer, size_t size); virtual void close(); virtual ~PlaintextConnection(); int getFd() const; private: int fd; }; ================================================ FILE: src/libraries/luahttps/src/common/config.h ================================================ #pragma once // MSVC warnings #if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_WARNINGS) #define _CRT_SECURE_NO_WARNINGS #endif #if defined(HTTPS_HAVE_CONFIG_GENERATED_H) #include "common/config-generated.h" #elif defined(WIN32) || defined(_WIN32) #define HTTPS_BACKEND_SCHANNEL #define HTTPS_USE_WINSOCK #define HTTPS_LIBRARY_LOADER_WINDOWS #include #if !defined(WINAPI_FAMILY) || (WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP) // WinINet is only supported on desktop. #define HTTPS_BACKEND_WININET #endif // Visual Studio 2017 supports __has_include #if defined __has_include #if __has_include() #define HTTPS_BACKEND_CURL #endif #endif #elif defined(__ANDROID__) #define HTTPS_BACKEND_ANDROID #define HTTPS_LIBRARY_LOADER_UNIX #elif defined(__APPLE__) #define HTTPS_BACKEND_NSURL #define HTTPS_LIBRARY_LOADER_UNIX #elif defined(linux) || defined(__linux) || defined(__linux__) #define HTTPS_LIBRARY_LOADER_UNIX #if defined __has_include #if __has_include() #define HTTPS_BACKEND_CURL #endif #if __has_include() #define HTTPS_BACKEND_OPENSSL #endif #else // Hope for the best... #define HTTPS_BACKEND_CURL #define HTTPS_BACKEND_OPENSSL #endif #endif #if defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__) #define HTTPS_DLLEXPORT __declspec(dllexport) #elif defined(__GNUC__) || defined(__clang__) #define HTTPS_DLLEXPORT __attribute__ ((visibility("default"))) #else #define HTTPS_DLLEXPORT #endif ================================================ FILE: src/libraries/luahttps/src/generic/CurlClient.cpp ================================================ #include "CurlClient.h" #ifdef HTTPS_BACKEND_CURL #include #include #include #include typedef struct StringReader { const std::string *str; size_t pos; } StringReader; CurlClient::Curl::Curl() : handle(nullptr) , loaded(false) , global_cleanup(nullptr) , easy_init(nullptr) , easy_cleanup(nullptr) , easy_setopt(nullptr) , easy_perform(nullptr) , easy_getinfo(nullptr) , slist_append(nullptr) , slist_free_all(nullptr) { using namespace LibraryLoader; #ifdef _WIN32 handle = OpenLibrary("libcurl.dll"); #else handle = OpenLibrary("libcurl.so.4"); #endif if (!handle) return; // Load symbols decltype(&curl_global_init) global_init = nullptr; if (!LoadSymbol(global_init, handle, "curl_global_init")) return; if (!LoadSymbol(global_cleanup, handle, "curl_global_cleanup")) return; if (!LoadSymbol(easy_init, handle, "curl_easy_init")) return; if (!LoadSymbol(easy_cleanup, handle, "curl_easy_cleanup")) return; if (!LoadSymbol(easy_setopt, handle, "curl_easy_setopt")) return; if (!LoadSymbol(easy_perform, handle, "curl_easy_perform")) return; if (!LoadSymbol(easy_getinfo, handle, "curl_easy_getinfo")) return; if (!LoadSymbol(slist_append, handle, "curl_slist_append")) return; if (!LoadSymbol(slist_free_all, handle, "curl_slist_free_all")) return; global_init(CURL_GLOBAL_DEFAULT); loaded = true; } CurlClient::Curl::~Curl() { if (loaded) global_cleanup(); if (handle) LibraryLoader::CloseLibrary(handle); } static char toUppercase(char c) { int ch = (unsigned char) c; return toupper(ch); } static size_t stringReader(char *ptr, size_t size, size_t nmemb, StringReader *reader) { const char *data = reader->str->data(); size_t len = reader->str->length(); size_t maxCount = (len - reader->pos) / size; size_t desiredCount = std::min(maxCount, nmemb); size_t desiredBytes = desiredCount * size; std::copy(data + reader->pos, data + desiredBytes, ptr); reader->pos += desiredBytes; return desiredCount; } static size_t stringstreamWriter(char *ptr, size_t size, size_t nmemb, std::stringstream *ss) { size_t count = size*nmemb; ss->write(ptr, count); return count; } static size_t headerWriter(char *ptr, size_t size, size_t nmemb, std::map *userdata) { std::map &headers = *userdata; size_t count = size*nmemb; std::string line(ptr, count); size_t split = line.find(':'); size_t newline = line.find('\r'); if (newline == std::string::npos) newline = line.size(); if (split != std::string::npos) headers[line.substr(0, split)] = line.substr(split+1, newline-split-1); return count; } bool CurlClient::valid() const { return curl.loaded; } HTTPSClient::Reply CurlClient::request(const HTTPSClient::Request &req) { Reply reply; reply.responseCode = 0; // Use sensible default header for later HTTPSClient::header_map newHeaders = req.headers; CURL *handle = curl.easy_init(); if (!handle) throw std::runtime_error("Could not create curl request"); curl.easy_setopt(handle, CURLOPT_URL, req.url.c_str()); curl.easy_setopt(handle, CURLOPT_FOLLOWLOCATION, 1L); curl.easy_setopt(handle, CURLOPT_CUSTOMREQUEST, req.method.c_str()); StringReader reader {}; if (req.postdata.size() > 0 && (req.method != "GET" && req.method != "HEAD")) { reader.str = &req.postdata; reader.pos = 0; curl.easy_setopt(handle, CURLOPT_UPLOAD, 1L); curl.easy_setopt(handle, CURLOPT_READFUNCTION, stringReader); curl.easy_setopt(handle, CURLOPT_READDATA, &reader); curl.easy_setopt(handle, CURLOPT_INFILESIZE_LARGE, (curl_off_t) req.postdata.length()); } if (req.method == "HEAD") curl.easy_setopt(handle, CURLOPT_NOBODY, 1L); // Curl doesn't copy memory, keep the strings around std::vector lines; for (auto &header : newHeaders) { std::stringstream line; line << header.first << ": " << header.second; lines.push_back(line.str()); } curl_slist *sendHeaders = nullptr; for (auto &line : lines) sendHeaders = curl.slist_append(sendHeaders, line.c_str()); if (sendHeaders) curl.easy_setopt(handle, CURLOPT_HTTPHEADER, sendHeaders); std::stringstream body; curl.easy_setopt(handle, CURLOPT_WRITEFUNCTION, stringstreamWriter); curl.easy_setopt(handle, CURLOPT_WRITEDATA, &body); curl.easy_setopt(handle, CURLOPT_HEADERFUNCTION, headerWriter); curl.easy_setopt(handle, CURLOPT_HEADERDATA, &reply.headers); curl.easy_perform(handle); if (sendHeaders) curl.slist_free_all(sendHeaders); { long responseCode; curl.easy_getinfo(handle, CURLINFO_RESPONSE_CODE, &responseCode); reply.responseCode = (int) responseCode; } reply.body = body.str(); curl.easy_cleanup(handle); return reply; } CurlClient::Curl CurlClient::curl; #endif // HTTPS_BACKEND_CURL ================================================ FILE: src/libraries/luahttps/src/generic/CurlClient.h ================================================ #pragma once #include "../common/config.h" #ifdef HTTPS_BACKEND_CURL #include #include "../common/HTTPSClient.h" #include "../common/LibraryLoader.h" class CurlClient : public HTTPSClient { public: virtual bool valid() const override; virtual HTTPSClient::Reply request(const HTTPSClient::Request &req) override; private: static struct Curl { Curl(); ~Curl(); LibraryLoader::handle *handle; bool loaded; decltype(&curl_global_cleanup) global_cleanup; decltype(&curl_easy_init) easy_init; decltype(&curl_easy_cleanup) easy_cleanup; decltype(&curl_easy_setopt) easy_setopt; decltype(&curl_easy_perform) easy_perform; decltype(&curl_easy_getinfo) easy_getinfo; decltype(&curl_slist_append) slist_append; decltype(&curl_slist_free_all) slist_free_all; } curl; }; #endif // HTTPS_BACKEND_CURL ================================================ FILE: src/libraries/luahttps/src/generic/LinktimeLibraryLoader.cpp ================================================ #include "../common/config.h" #include "../common/LibraryLoader.h" #ifdef HTTPS_LIBRARY_LOADER_LINKTIME #include #ifdef HTTPS_BACKEND_CURL #include static char CurlHandle; #endif #if defined(HTTPS_BACKEND_OPENSSL) || defined(HTTPS_BACKEND_ANDROID) # error "Selected backends that are not compatible with this loader" #endif namespace LibraryLoader { handle *OpenLibrary(const char *name) { #ifdef HTTPS_BACKEND_CURL if (strstr(name, "libcurl") == name) return reinterpret_cast(&CurlHandle); #endif return nullptr; } void CloseLibrary(handle *) { } handle* GetCurrentProcessHandle() { return nullptr; } function *GetFunction(handle *handle, const char *name) { #define RETURN_MATCHING_FUNCTION(func) \ if (strcmp(name, #func) == 0) \ return reinterpret_cast(&func); #ifdef HTTPS_BACKEND_CURL if (handle == &CurlHandle) { RETURN_MATCHING_FUNCTION(curl_global_init); RETURN_MATCHING_FUNCTION(curl_global_cleanup); RETURN_MATCHING_FUNCTION(curl_easy_init); RETURN_MATCHING_FUNCTION(curl_easy_cleanup); RETURN_MATCHING_FUNCTION(curl_easy_setopt); RETURN_MATCHING_FUNCTION(curl_easy_perform); RETURN_MATCHING_FUNCTION(curl_easy_getinfo); RETURN_MATCHING_FUNCTION(curl_slist_append); RETURN_MATCHING_FUNCTION(curl_slist_free_all); } #endif #undef RETURN_MATCHING_FUNCTION return nullptr; } } #endif // HTTPS_LIBRARY_LOADER_LINKTIME ================================================ FILE: src/libraries/luahttps/src/generic/OpenSSLConnection.cpp ================================================ #include "OpenSSLConnection.h" #ifdef HTTPS_BACKEND_OPENSSL #include "../common/LibraryLoader.h" // Not present in openssl 1.1 headers #define SSL_CTRL_OPTIONS 32 static bool TryOpenLibraries(const char *sslName, LibraryLoader::handle *& sslHandle, const char *cryptoName, LibraryLoader::handle *&cryptoHandle) { sslHandle = LibraryLoader::OpenLibrary(sslName); cryptoHandle = LibraryLoader::OpenLibrary(cryptoName); if (sslHandle && cryptoHandle) return true; if (sslHandle) LibraryLoader::CloseLibrary(sslHandle); if (cryptoHandle) LibraryLoader::CloseLibrary(cryptoHandle); return false; } OpenSSLConnection::SSLFuncs::SSLFuncs() { using namespace LibraryLoader; handle *sslhandle = nullptr; handle *cryptohandle = nullptr; valid = TryOpenLibraries("libssl.so.3", sslhandle, "libcrypto.so.3", cryptohandle) || TryOpenLibraries("libssl.so.1.1", sslhandle, "libcrypto.so.1.1", cryptohandle) || TryOpenLibraries("libssl.so.1.0.0", sslhandle, "libcrypto.so.1.0.0", cryptohandle) // Try the version-less name last, it may not be compatible or tested || TryOpenLibraries("libssl.so", sslhandle, "libcrypto.so", cryptohandle); if (!valid) return; valid = true; valid = valid && ( LoadSymbol(init_ssl, sslhandle, "OPENSSL_init_ssl") || LoadSymbol(library_init, sslhandle, "SSL_library_init")); valid = valid && LoadSymbol(CTX_new, sslhandle, "SSL_CTX_new"); valid = valid && LoadSymbol(CTX_ctrl, sslhandle, "SSL_CTX_ctrl"); if (valid) LoadSymbol(CTX_set_options, sslhandle, "SSL_CTX_set_options"); valid = valid && LoadSymbol(CTX_set_verify, sslhandle, "SSL_CTX_set_verify"); valid = valid && LoadSymbol(CTX_set_default_verify_paths, sslhandle, "SSL_CTX_set_default_verify_paths"); valid = valid && LoadSymbol(CTX_free, sslhandle, "SSL_CTX_free"); valid = valid && LoadSymbol(SSL_new, sslhandle, "SSL_new"); valid = valid && LoadSymbol(SSL_free, sslhandle, "SSL_free"); valid = valid && LoadSymbol(set_fd, sslhandle, "SSL_set_fd"); valid = valid && LoadSymbol(connect, sslhandle, "SSL_connect"); valid = valid && LoadSymbol(read, sslhandle, "SSL_read"); valid = valid && LoadSymbol(write, sslhandle, "SSL_write"); valid = valid && LoadSymbol(shutdown, sslhandle, "SSL_shutdown"); valid = valid && LoadSymbol(get_verify_result, sslhandle, "SSL_get_verify_result"); valid = valid && (LoadSymbol(get_peer_certificate, sslhandle, "SSL_get1_peer_certificate") || LoadSymbol(get_peer_certificate, sslhandle, "SSL_get_peer_certificate")); valid = valid && ( LoadSymbol(SSLv23_method, sslhandle, "TLS_client_method") || LoadSymbol(SSLv23_method, sslhandle, "TLS_method") || LoadSymbol(SSLv23_method, sslhandle, "SSLv23_method")); valid = valid && LoadSymbol(check_host, cryptohandle, "X509_check_host"); valid = valid && LoadSymbol(X509_free, cryptohandle, "X509_free"); if (library_init) library_init(); else if(init_ssl) init_ssl(0, nullptr); // else not valid } bool OpenSSLConnection::valid() { return ssl.valid; } OpenSSLConnection::OpenSSLConnection() : conn(nullptr) { context = ssl.CTX_new(ssl.SSLv23_method()); if (!context) return; if (ssl.CTX_set_options) ssl.CTX_set_options(context, SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3); else ssl.CTX_ctrl(context, SSL_CTRL_OPTIONS, SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3, nullptr); ssl.CTX_set_verify(context, SSL_VERIFY_PEER, nullptr); ssl.CTX_set_default_verify_paths(context); } OpenSSLConnection::~OpenSSLConnection() { if (conn) ssl.SSL_free(conn); if (context) ssl.CTX_free(context); } bool OpenSSLConnection::connect(const std::string &hostname, uint16_t port) { if (!context) return false; if (!socket.connect(hostname, port)) return false; conn = ssl.SSL_new(context); if (!conn) { socket.close(); return false; } ssl.set_fd(conn, socket.getFd()); if (ssl.connect(conn) != 1 || ssl.get_verify_result(conn) != X509_V_OK) { socket.close(); return false; } X509 *cert = ssl.get_peer_certificate(conn); if (ssl.check_host(cert, hostname.c_str(), hostname.size(), 0, nullptr) != 1) { close(); return false; } ssl.X509_free(cert); return true; } size_t OpenSSLConnection::read(char *buffer, size_t size) { return ssl.read(conn, buffer, (int) size); } size_t OpenSSLConnection::write(const char *buffer, size_t size) { return ssl.write(conn, buffer, (int) size); } void OpenSSLConnection::close() { ssl.shutdown(conn); socket.close(); } OpenSSLConnection::SSLFuncs OpenSSLConnection::ssl; #endif // HTTPS_BACKEND_OPENSSL ================================================ FILE: src/libraries/luahttps/src/generic/OpenSSLConnection.h ================================================ #pragma once #include "../common/config.h" #ifdef HTTPS_BACKEND_OPENSSL #include #include "../common/Connection.h" #include "../common/PlaintextConnection.h" class OpenSSLConnection : public Connection { public: OpenSSLConnection(); virtual bool connect(const std::string &hostname, uint16_t port) override; virtual size_t read(char *buffer, size_t size) override; virtual size_t write(const char *buffer, size_t size) override; virtual void close() override; virtual ~OpenSSLConnection(); static bool valid(); private: PlaintextConnection socket; SSL_CTX *context; SSL *conn; struct SSLFuncs { SSLFuncs(); bool valid; int (*library_init)(); int (*init_ssl)(uint64_t opts, const void *settings); SSL_CTX *(*CTX_new)(const SSL_METHOD *method); long (*CTX_ctrl)(SSL_CTX *ctx, int cmd, long larg, void *parg); long (*CTX_set_options)(SSL_CTX *ctx, long options); void (*CTX_set_verify)(SSL_CTX *ctx, int mode, void *verify_callback); int (*CTX_set_default_verify_paths)(SSL_CTX *ctx); void (*CTX_free)(SSL_CTX *ctx); SSL *(*SSL_new)(SSL_CTX *ctx); void (*SSL_free)(SSL *ctx); int (*set_fd)(SSL *ssl, int fd); int (*connect)(SSL *ssl); int (*read)(SSL *ssl, void *buf, int num); int (*write)(SSL *ssl, const void *buf, int num); int (*shutdown)(SSL *ssl); long (*get_verify_result)(const SSL *ssl); X509 *(*get_peer_certificate)(const SSL *ssl); const SSL_METHOD *(*SSLv23_method)(); int (*check_host)(X509 *cert, const char *name, size_t namelen, unsigned int flags, char **peername); void (*X509_free)(X509* cert); }; static SSLFuncs ssl; }; #endif // HTTPS_BACKEND_OPENSSL ================================================ FILE: src/libraries/luahttps/src/generic/UnixLibraryLoader.cpp ================================================ #include "../common/config.h" #include "../common/LibraryLoader.h" #ifdef HTTPS_LIBRARY_LOADER_UNIX #include namespace LibraryLoader { handle *OpenLibrary(const char *name) { return dlopen(name, RTLD_LAZY); } void CloseLibrary(handle *handle) { if (handle) dlclose(handle); } handle* GetCurrentProcessHandle() { return RTLD_DEFAULT; } function *GetFunction(handle *handle, const char *name) { return reinterpret_cast(dlsym(handle, name)); } } #endif // HTTPS_LIBRARY_LOADER_UNIX ================================================ FILE: src/libraries/luahttps/src/lua/main.cpp ================================================ #include #include extern "C" { #include #include } #include "../common/HTTPS.h" #include "../common/config.h" static std::string validMethod[] = {"GET", "HEAD", "POST", "PUT", "DELETE", "PATCH"}; static int str_toupper(char c) { unsigned char uc = (unsigned char) c; return toupper(uc); } static std::string w_checkstring(lua_State *L, int idx) { size_t len; const char *str = luaL_checklstring(L, idx, &len); return std::string(str, len); } static void w_pushstring(lua_State *L, const std::string &str) { lua_pushlstring(L, str.data(), str.size()); } static void w_readheaders(lua_State *L, int idx, HTTPSClient::header_map &headers) { if (idx < 0) idx += lua_gettop(L) + 1; lua_pushnil(L); while (lua_next(L, idx)) { auto header = w_checkstring(L, -2); headers[header] = w_checkstring(L, -1); lua_pop(L, 1); } lua_pop(L, 1); } static std::string w_optmethod(lua_State *L, int idx, const std::string &defaultMethod) { std::string *const validMethodEnd = validMethod + sizeof(validMethod) / sizeof(std::string); if (lua_isnoneornil(L, idx)) return defaultMethod; std::string str = w_checkstring(L, idx); std::transform(str.begin(), str.end(), str.begin(), str_toupper); if (std::find(validMethod, validMethodEnd, str) == validMethodEnd) luaL_argerror(L, idx, "expected one of \"get\", \"head\", \"post\", \"put\", \"delete\", or \"patch\""); return str; } static int w_request(lua_State *L) { auto url = w_checkstring(L, 1); HTTPSClient::Request req(url); bool advanced = false; if (lua_istable(L, 2)) { advanced = true; std::string defaultMethod = "GET"; lua_getfield(L, 2, "data"); if (!lua_isnoneornil(L, -1)) { req.postdata = w_checkstring(L, -1); req.headers["Content-Type"] = "application/x-www-form-urlencoded"; defaultMethod = "POST"; } lua_pop(L, 1); lua_getfield(L, 2, "method"); req.method = w_optmethod(L, -1, defaultMethod); lua_pop(L, 1); lua_getfield(L, 2, "headers"); if (!lua_isnoneornil(L, -1)) w_readheaders(L, -1, req.headers); lua_pop(L, 1); } HTTPSClient::Reply reply; try { reply = request(req); } catch (const std::exception& e) { std::string errorMessage = e.what(); lua_pushnil(L); lua_pushstring(L, errorMessage.c_str()); return 2; } lua_pushinteger(L, reply.responseCode); w_pushstring(L, reply.body); if (advanced) { lua_newtable(L); for (const auto &header : reply.headers) { w_pushstring(L, header.first); w_pushstring(L, header.second); lua_settable(L, -3); } } return advanced ? 3 : 2; } extern "C" int HTTPS_DLLEXPORT luaopen_https(lua_State *L) { lua_newtable(L); lua_pushcfunction(L, w_request); lua_setfield(L, -2, "request"); return 1; } ================================================ FILE: src/libraries/luahttps/src/windows/SChannelConnection.cpp ================================================ #define SECURITY_WIN32 #define NOMINMAX #include "SChannelConnection.h" #ifdef HTTPS_BACKEND_SCHANNEL #include #include #include #include #include #include #include #ifndef SCH_USE_STRONG_CRYPTO # define SCH_USE_STRONG_CRYPTO 0x00400000 #endif #ifndef SP_PROT_TLS1_1_CLIENT # define SP_PROT_TLS1_1_CLIENT 0x00000200 #endif #ifndef SP_PROT_TLS1_2_CLIENT # define SP_PROT_TLS1_2_CLIENT 0x00000800 #endif #ifdef DEBUG_SCHANNEL #include std::ostream &debug = std::cout; #else struct Debug { template Debug &operator<<(const T&) { return *this; } } debug; #endif static void enqueue(std::vector &buffer, char *data, size_t size) { size_t oldSize = buffer.size(); buffer.resize(oldSize + size); memcpy(&buffer[oldSize], data, size); } static void enqueue_prepend(std::vector &buffer, char *data, size_t size) { size_t oldSize = buffer.size(); buffer.resize(oldSize + size); if (oldSize > 0) memmove(&buffer[size], &buffer[0], oldSize); memcpy(&buffer[0], data, size); } static size_t dequeue(std::vector &buffer, char *data, size_t size) { size = std::min(size, buffer.size()); size_t remaining = buffer.size() - size; memcpy(data, &buffer[0], size); if (remaining > 0) { memmove(&buffer[0], &buffer[size], remaining); buffer.resize(remaining); } else { buffer.resize(0); } return size; } SChannelConnection::SChannelConnection() : context(nullptr) { } SChannelConnection::~SChannelConnection() { destroyContext(); } SECURITY_STATUS InitializeSecurityContext(CredHandle *phCredential, std::unique_ptr& phContext, const std::string& szTargetName, ULONG fContextReq, std::vector& inputBuffer, std::vector& outputBuffer, ULONG *pfContextAttr) { std::array recvBuffers; recvBuffers[0].BufferType = SECBUFFER_TOKEN; recvBuffers[0].pvBuffer = outputBuffer.data(); recvBuffers[0].cbBuffer = outputBuffer.size(); std::array sendBuffers; sendBuffers[0].BufferType = SECBUFFER_TOKEN; sendBuffers[0].pvBuffer = inputBuffer.data(); sendBuffers[0].cbBuffer = inputBuffer.size(); sendBuffers[1].BufferType = SECBUFFER_EMPTY; sendBuffers[1].pvBuffer = nullptr; sendBuffers[1].cbBuffer = 0; SecBufferDesc recvBufferDesc, sendBufferDesc; recvBufferDesc.ulVersion = sendBufferDesc.ulVersion = SECBUFFER_VERSION; recvBufferDesc.pBuffers = &recvBuffers[0]; recvBufferDesc.cBuffers = recvBuffers.size(); if (!inputBuffer.empty()) { sendBufferDesc.pBuffers = &sendBuffers[0]; sendBufferDesc.cBuffers = sendBuffers.size(); } else { sendBufferDesc.pBuffers = nullptr; sendBufferDesc.cBuffers = 0; } CtxtHandle* phOldContext = nullptr; CtxtHandle* phNewContext = nullptr; if (!phContext) { phContext = std::make_unique(); phNewContext = phContext.get(); } else { phOldContext = phContext.get(); } auto ret = InitializeSecurityContext(phCredential, phOldContext, const_cast(szTargetName.c_str()), fContextReq, 0, 0, &sendBufferDesc, 0, phNewContext, &recvBufferDesc, pfContextAttr, nullptr); outputBuffer.resize(recvBuffers[0].cbBuffer); // Clear the input buffer, so the reader can append // If we have unprocessed data, leave it in the buffer size_t unprocessed = 0; if (sendBuffers[1].BufferType == SECBUFFER_EXTRA) unprocessed = sendBuffers[1].cbBuffer; if (unprocessed > 0) memmove(inputBuffer.data(), inputBuffer.data() + inputBuffer.size() - unprocessed, unprocessed); inputBuffer.resize(unprocessed); return ret; } bool SChannelConnection::connect(const std::string &hostname, uint16_t port) { debug << "Trying to connect to " << hostname << ":" << port << "\n"; if (!socket.connect(hostname, port)) return false; debug << "Connected\n"; SCHANNEL_CRED cred; memset(&cred, 0, sizeof(cred)); cred.dwVersion = SCHANNEL_CRED_VERSION; cred.grbitEnabledProtocols = SP_PROT_TLS1_CLIENT | SP_PROT_TLS1_1_CLIENT | SP_PROT_TLS1_2_CLIENT; cred.dwFlags = SCH_CRED_AUTO_CRED_VALIDATION | SCH_CRED_NO_DEFAULT_CREDS | SCH_USE_STRONG_CRYPTO | SCH_CRED_REVOCATION_CHECK_CHAIN; CredHandle credHandle; if (AcquireCredentialsHandle(nullptr, (char*) UNISP_NAME, SECPKG_CRED_OUTBOUND, nullptr, &cred, nullptr, nullptr, &credHandle, nullptr) != SEC_E_OK) { debug << "Failed to acquire handle\n"; socket.close(); return false; } debug << "Acquired handle\n"; static constexpr size_t bufferSize = 8192; bool done = false, success = false, contextCreated = false; ULONG contextAttr; std::unique_ptr context; std::vector inputBuffer; std::vector outputBuffer; do { outputBuffer.resize(bufferSize); bool recvData = false; bool sendData = false; auto ret = InitializeSecurityContext(&credHandle, context, hostname, ISC_REQ_STREAM, inputBuffer, outputBuffer, &contextAttr); switch (ret) { /*case SEC_I_COMPLETE_NEEDED: case SEC_I_COMPLETE_AND_CONTINUE: if (CompleteAuthToken(context.get(), &outputBuffer) != SEC_E_OK) done = true; else if (ret == SEC_I_COMPLETE_NEEDED) success = done = true; break;*/ case SEC_I_CONTINUE_NEEDED: debug << "Initialize: continue needed\n"; recvData = true; sendData = true; break; case SEC_E_INCOMPLETE_CREDENTIALS: debug << "Initialize failed: incomplete credentials\n"; done = true; break; case SEC_E_INCOMPLETE_MESSAGE: debug << "Initialize: incomplete message\n"; recvData = true; break; case SEC_E_OK: debug << "Initialize succeeded\n"; success = done = true; sendData = true; break; default: debug << "Initialize done: " << outputBuffer.size() << " bytes of output and unknown status " << ret << "\n"; done = true; success = false; break; } if (!done) contextCreated = true; if (sendData && !outputBuffer.empty()) { socket.write(outputBuffer.data(), outputBuffer.size()); debug << "Sent " << outputBuffer.size() << " bytes of data\n"; } if (recvData) { size_t unprocessed = inputBuffer.size(); inputBuffer.resize(unprocessed + bufferSize); size_t actual = socket.read(inputBuffer.data() + unprocessed, bufferSize); inputBuffer.resize(actual + unprocessed); debug << "Received " << actual << " bytes of data\n"; if (unprocessed > 0) debug << " had " << unprocessed << " bytes of remaining, unprocessed data\n"; if (actual + unprocessed == 0) { debug << "No data to submit, break\n"; break; } } } while (!done); debug << "Done!\n"; if (success) { SecPkgContext_Flags resultFlags; QueryContextAttributes(context.get(), SECPKG_ATTR_FLAGS, &resultFlags); if (resultFlags.Flags & ISC_REQ_CONFIDENTIALITY == 0) { debug << "Resulting context is not encrypted, marking as failed\n"; success = false; } if (resultFlags.Flags & ISC_REQ_INTEGRITY == 0) { debug << "Resulting context is not signed, marking as failed\n"; success = false; } } if (success) this->context = context.release(); else if (contextCreated) DeleteSecurityContext(context.get()); return success; } size_t SChannelConnection::read(char *buffer, size_t size) { if (decRecvBuffer.size() > 0) { size = dequeue(decRecvBuffer, buffer, size); debug << "Read " << size << " bytes of previously decoded data\n"; return size; } else if (encRecvBuffer.size() > 0) { size = dequeue(encRecvBuffer, buffer, size); debug << "Read " << size << " bytes of extra data\n"; } else { size = socket.read(buffer, size); debug << "Received " << size << " bytes of data\n"; } return decrypt(buffer, size); } size_t SChannelConnection::decrypt(char *buffer, size_t size, bool recurse) { if (size == 0) return 0; SecBuffer secBuffers[4]; secBuffers[0].cbBuffer = size; secBuffers[0].BufferType = SECBUFFER_DATA; secBuffers[0].pvBuffer = buffer; for (size_t i = 1; i < 4; ++i) { secBuffers[i].BufferType = SECBUFFER_EMPTY; secBuffers[i].pvBuffer = nullptr; secBuffers[i].cbBuffer = 0; } SecBufferDesc secBufferDesc; secBufferDesc.ulVersion = SECBUFFER_VERSION; secBufferDesc.cBuffers = 4; secBufferDesc.pBuffers = &secBuffers[0]; auto ret = DecryptMessage(static_cast(context), &secBufferDesc, 0, nullptr); // FIXME debug << "DecryptMessage returns: " << ret << "\n"; switch (ret) { case SEC_E_OK: { void *actualDataStart = buffer; for (size_t i = 0; i < 4; ++i) { auto &buffer = secBuffers[i]; if (buffer.BufferType == SECBUFFER_DATA) { actualDataStart = buffer.pvBuffer; size = buffer.cbBuffer; } else if (buffer.BufferType == SECBUFFER_EXTRA) { debug << "\tExtra data in buffer " << i << " (" << buffer.cbBuffer << " bytes)\n"; enqueue(encRecvBuffer, static_cast(buffer.pvBuffer), buffer.cbBuffer); } else if (buffer.BufferType != SECBUFFER_EMPTY) debug << "\tBuffer of type " << buffer.BufferType << "\n"; } if (actualDataStart) memmove(buffer, actualDataStart, size); break; } case SEC_E_INCOMPLETE_MESSAGE: { // Move all our current data to encRecvBuffer enqueue(encRecvBuffer, buffer, size); // Now try to read some more data from the socket size_t bufferSize = encRecvBuffer.size() + 8192; char *recvBuffer = new char[bufferSize]; size_t recvd = socket.read(recvBuffer+encRecvBuffer.size(), 8192); debug << recvd << " bytes of extra data read from socket\n"; if (recvd == 0 && !recurse) { debug << "Recursion prevented, bailing\n"; return 0; } // Fill our buffer with the queued data and the newly received data size_t totalSize = encRecvBuffer.size() + recvd; dequeue(encRecvBuffer, recvBuffer, encRecvBuffer.size()); debug << "Trying to decrypt with " << totalSize << " bytes of data\n"; // Now try to decrypt that size_t decrypted = decrypt(recvBuffer, totalSize, false); debug << "\tObtained " << decrypted << " bytes of decrypted data\n"; // Copy the first size bytes to the output buffer size = std::min(size, decrypted); memcpy(buffer, recvBuffer, size); // And write the remainder to our queued decrypted data... // Note: we prepend, since our recursive call may already have written // something and we can be sure decrypt wasn't called if the buffer was // non-empty in read enqueue_prepend(decRecvBuffer, recvBuffer+size, decrypted-size); debug << "\tStoring " << decrypted-size << " bytes of extra decrypted data\n"; return size; } // TODO: More? default: size = 0; break; } debug << "\tDecrypted " << size << " bytes of data\n"; return size; } size_t SChannelConnection::write(const char *buffer, size_t size) { static constexpr size_t bufferSize = 8192; assert(size <= bufferSize); SecPkgContext_StreamSizes Sizes; QueryContextAttributes( static_cast(context), SECPKG_ATTR_STREAM_SIZES, &Sizes); debug << "stream sizes:\n\theader: " << Sizes.cbHeader << "\n\tfooter: " << Sizes.cbTrailer << "\n"; char *sendBuffer = new char[bufferSize + Sizes.cbHeader + Sizes.cbTrailer]; memcpy(sendBuffer+Sizes.cbHeader, buffer, size); SecBuffer secBuffers[4]; secBuffers[0].cbBuffer = Sizes.cbHeader; secBuffers[0].BufferType = SECBUFFER_STREAM_HEADER; secBuffers[0].pvBuffer = sendBuffer; secBuffers[1].cbBuffer = size; secBuffers[1].BufferType = SECBUFFER_DATA; secBuffers[1].pvBuffer = sendBuffer+Sizes.cbHeader; secBuffers[2].cbBuffer = Sizes.cbTrailer; secBuffers[2].pvBuffer = sendBuffer+Sizes.cbHeader+size; secBuffers[2].BufferType = SECBUFFER_STREAM_TRAILER; secBuffers[3].cbBuffer = 0; secBuffers[3].BufferType = SECBUFFER_EMPTY; secBuffers[3].pvBuffer = nullptr; SecBufferDesc secBufferDesc; secBufferDesc.ulVersion = SECBUFFER_VERSION; secBufferDesc.cBuffers = 4; secBufferDesc.pBuffers = secBuffers; auto ret = EncryptMessage(static_cast(context), 0, &secBufferDesc, 0); // FIXME debug << "Send:\n\tHeader size: " << secBuffers[0].cbBuffer << "\n\t\ttype: " << secBuffers[0].BufferType << "\n\tData size: " << secBuffers[1].cbBuffer << "\n\t\ttype: " << secBuffers[1].BufferType << "\n\tFooter size: " << secBuffers[2].cbBuffer << "\n\t\ttype: " << secBuffers[2].BufferType << "\n"; size_t sendSize = 0; for (size_t i = 0; i < 4; ++i) if (secBuffers[i].cbBuffer != bufferSize) sendSize += secBuffers[i].cbBuffer; debug << "\tReal length? " << sendSize << "\n"; switch (ret) { case SEC_E_OK: socket.write(sendBuffer, sendSize); break; // TODO: More? default: size = 0; break; } delete[] sendBuffer; return size; } void SChannelConnection::destroyContext() { if (context) { DeleteSecurityContext(context); delete context; context = nullptr; } } void SChannelConnection::close() { destroyContext(); socket.close(); } bool SChannelConnection::valid() { return true; } #endif // HTTPS_BACKEND_SCHANNEL ================================================ FILE: src/libraries/luahttps/src/windows/SChannelConnection.h ================================================ #pragma once #include "../common/config.h" #ifdef HTTPS_BACKEND_SCHANNEL #include "../common/Connection.h" #include "../common/PlaintextConnection.h" #include struct _SecHandle; using CtxtHandle = _SecHandle; class SChannelConnection : public Connection { public: SChannelConnection(); virtual bool connect(const std::string &hostname, uint16_t port) override; virtual size_t read(char *buffer, size_t size) override; virtual size_t write(const char *buffer, size_t size) override; virtual void close() override; virtual ~SChannelConnection(); static bool valid(); private: PlaintextConnection socket; CtxtHandle *context; std::vector encRecvBuffer; std::vector decRecvBuffer; size_t decrypt(char *buffer, size_t size, bool recurse = true); void destroyContext(); }; #endif // HTTPS_BACKEND_SCHANNEL ================================================ FILE: src/libraries/luahttps/src/windows/WinINetClient.cpp ================================================ #include "WinINetClient.h" #ifdef HTTPS_BACKEND_WININET #include #include #include #include #include #include #include "../common/HTTPRequest.h" class LazyHInternetLoader final { public: LazyHInternetLoader(): hInternet(nullptr) { } ~LazyHInternetLoader() { if (hInternet) InternetCloseHandle(hInternet); } HINTERNET getInstance() { if (!init) { hInternet = InternetOpenA("", INTERNET_OPEN_TYPE_PRECONFIG, nullptr, nullptr, 0); if (hInternet) { // Try to enable HTTP2 DWORD httpProtocol = HTTP_PROTOCOL_FLAG_HTTP2; InternetSetOptionA(hInternet, INTERNET_OPTION_ENABLE_HTTP_PROTOCOL, &httpProtocol, sizeof(DWORD)); SetLastError(0); // If it errors, ignore. } } return hInternet; } private: bool init; HINTERNET hInternet; }; static thread_local LazyHInternetLoader hInternetCache; bool WinINetClient::valid() const { // Allow disablement of WinINet backend. const char *disabler = getenv("LUAHTTPS_DISABLE_WININET"); if (disabler && strcmp(disabler, "1") == 0) return false; return hInternetCache.getInstance() != nullptr; } HTTPSClient::Reply WinINetClient::request(const HTTPSClient::Request &req) { Reply reply; reply.responseCode = 0; // Parse URL auto parsedUrl = HTTPRequest::parseUrl(req.url); // Default flags DWORD inetFlags = INTERNET_FLAG_NO_AUTH | INTERNET_FLAG_NO_CACHE_WRITE | INTERNET_FLAG_NO_COOKIES | INTERNET_FLAG_NO_UI; if (parsedUrl.schema == "https") inetFlags |= INTERNET_FLAG_SECURE; else if (parsedUrl.schema != "http") return reply; // Keep-Alive auto connectHeader = req.headers.find("Connection"); auto headerEnd = req.headers.end(); if ((connectHeader != headerEnd && connectHeader->second != "close") || connectHeader == headerEnd) inetFlags |= INTERNET_FLAG_KEEP_CONNECTION; // Open internet HINTERNET hInternet = hInternetCache.getInstance(); if (hInternet == nullptr) return reply; // Connect HINTERNET hConnect = InternetConnectA( hInternet, parsedUrl.hostname.c_str(), parsedUrl.port, nullptr, nullptr, INTERNET_SERVICE_HTTP, INTERNET_FLAG_EXISTING_CONNECT, (DWORD_PTR) this ); if (!hConnect) return reply; std::string httpMethod = req.method; std::transform( httpMethod.begin(), httpMethod.end(), httpMethod.begin(), [](char c) {return (char)toupper((unsigned char) c); } ); // Open HTTP request HINTERNET hHTTP = HttpOpenRequestA( hConnect, httpMethod.c_str(), parsedUrl.query.c_str(), nullptr, nullptr, nullptr, inetFlags, (DWORD_PTR) this ); if (!hHTTP) { InternetCloseHandle(hConnect); return reply; } // Send additional headers HttpAddRequestHeadersA(hHTTP, "User-Agent:", 0, HTTP_ADDREQ_FLAG_REPLACE); for (const auto &header: req.headers) { std::string headerString = header.first + ": " + header.second + "\r\n"; HttpAddRequestHeadersA(hHTTP, headerString.c_str(), headerString.length(), HTTP_ADDREQ_FLAG_ADD | HTTP_ADDREQ_FLAG_REPLACE); } // POST data const char *postData = nullptr; if (req.postdata.length() > 0 && (httpMethod != "GET" && httpMethod != "HEAD")) { char temp[48]; int len = sprintf(temp, "Content-Length: %u\r\n", (unsigned int) req.postdata.length()); postData = req.postdata.c_str(); HttpAddRequestHeadersA(hHTTP, temp, len, HTTP_ADDREQ_FLAG_ADD | HTTP_ADDREQ_FLAG_REPLACE); } // Send away! BOOL result = HttpSendRequestA(hHTTP, nullptr, 0, (void *) postData, (DWORD) req.postdata.length()); if (!result) { InternetCloseHandle(hHTTP); InternetCloseHandle(hConnect); return reply; } DWORD bufferLength = sizeof(DWORD); DWORD headerCounter = 0; // Status code DWORD statusCode = 0; if (!HttpQueryInfoA(hHTTP, HTTP_QUERY_STATUS_CODE | HTTP_QUERY_FLAG_NUMBER, &statusCode, &bufferLength, &headerCounter)) { InternetCloseHandle(hHTTP); InternetCloseHandle(hConnect); return reply; } // Query headers std::vector responseHeaders; bufferLength = 0; HttpQueryInfoA(hHTTP, HTTP_QUERY_RAW_HEADERS, responseHeaders.data(), &bufferLength, &headerCounter); if (GetLastError() != ERROR_INSUFFICIENT_BUFFER) { InternetCloseHandle(hHTTP); InternetCloseHandle(hConnect); return reply; } responseHeaders.resize(bufferLength); if (!HttpQueryInfoA(hHTTP, HTTP_QUERY_RAW_HEADERS, responseHeaders.data(), &bufferLength, &headerCounter)) { InternetCloseHandle(hHTTP); InternetCloseHandle(hConnect); return reply; } for (const char *headerData = responseHeaders.data(); *headerData; headerData += strlen(headerData) + 1) { const char *value = strchr(headerData, ':'); if (value) { ptrdiff_t keyLen = (ptrdiff_t) (value - headerData); reply.headers[std::string(headerData, keyLen)] = value + 2; // +2, colon and 1 space character. } } responseHeaders.resize(1); // Read response std::stringstream responseData; for (;;) { constexpr DWORD BUFFER_SIZE = 4096; char buffer[BUFFER_SIZE]; DWORD readed = 0; BOOL ret = InternetQueryDataAvailable(hHTTP, &readed, 0, 0); if (!ret || readed == 0) break; if (!InternetReadFile(hHTTP, buffer, BUFFER_SIZE, &readed)) break; responseData.write(buffer, readed); } reply.body = responseData.str(); reply.responseCode = statusCode; InternetCloseHandle(hHTTP); InternetCloseHandle(hConnect); return reply; } #endif // HTTPS_BACKEND_WININET ================================================ FILE: src/libraries/luahttps/src/windows/WinINetClient.h ================================================ #pragma once #include "../common/config.h" #ifdef HTTPS_BACKEND_WININET #include "../common/HTTPSClient.h" class WinINetClient: public HTTPSClient { public: bool valid() const override; HTTPSClient::Reply request(const HTTPSClient::Request &req) override; }; #endif // HTTPS_BACKEND_WININET ================================================ FILE: src/libraries/luahttps/src/windows/WindowsLibraryLoader.cpp ================================================ #include "../common/config.h" #include "../common/LibraryLoader.h" #ifdef HTTPS_LIBRARY_LOADER_WINDOWS #define NOMINMAX #define WIN32_LEAN_AND_MEAN #include namespace LibraryLoader { handle *OpenLibrary(const char *name) { return reinterpret_cast(LoadLibraryA(name)); } void CloseLibrary(handle *handle) { if (handle) FreeLibrary(reinterpret_cast(handle)); } handle* GetCurrentProcessHandle() { return reinterpret_cast(GetModuleHandle(nullptr)); } function *GetFunction(handle *handle, const char *name) { HMODULE nativeHandle = reinterpret_cast(handle); return reinterpret_cast(GetProcAddress(nativeHandle, name)); } } #endif // HTTPS_LIBRARY_LOADER_WINDOWS ================================================ FILE: src/libraries/luasocket/libluasocket/auxiliar.c ================================================ /*=========================================================================*\ * Auxiliar routines for class hierarchy manipulation * LuaSocket toolkit \*=========================================================================*/ #include "luasocket.h" #include "auxiliar.h" #include #include /*-------------------------------------------------------------------------*\ * Initializes the module \*-------------------------------------------------------------------------*/ int auxiliar_open(lua_State *L) { (void) L; return 0; } /*-------------------------------------------------------------------------*\ * Creates a new class with given methods * Methods whose names start with __ are passed directly to the metatable. \*-------------------------------------------------------------------------*/ void auxiliar_newclass(lua_State *L, const char *classname, luaL_Reg *func) { luaL_newmetatable(L, classname); /* mt */ /* create __index table to place methods */ lua_pushstring(L, "__index"); /* mt,"__index" */ lua_newtable(L); /* mt,"__index",it */ /* put class name into class metatable */ lua_pushstring(L, "class"); /* mt,"__index",it,"class" */ lua_pushstring(L, classname); /* mt,"__index",it,"class",classname */ lua_rawset(L, -3); /* mt,"__index",it */ /* pass all methods that start with _ to the metatable, and all others * to the index table */ for (; func->name; func++) { /* mt,"__index",it */ lua_pushstring(L, func->name); lua_pushcfunction(L, func->func); lua_rawset(L, func->name[0] == '_' ? -5: -3); } lua_rawset(L, -3); /* mt */ lua_pop(L, 1); } /*-------------------------------------------------------------------------*\ * Prints the value of a class in a nice way \*-------------------------------------------------------------------------*/ int auxiliar_tostring(lua_State *L) { char buf[32]; if (!lua_getmetatable(L, 1)) goto error; lua_pushstring(L, "__index"); lua_gettable(L, -2); if (!lua_istable(L, -1)) goto error; lua_pushstring(L, "class"); lua_gettable(L, -2); if (!lua_isstring(L, -1)) goto error; sprintf(buf, "%p", lua_touserdata(L, 1)); lua_pushfstring(L, "%s: %s", lua_tostring(L, -1), buf); return 1; error: lua_pushstring(L, "invalid object passed to 'auxiliar.c:__tostring'"); lua_error(L); return 1; } /*-------------------------------------------------------------------------*\ * Insert class into group \*-------------------------------------------------------------------------*/ void auxiliar_add2group(lua_State *L, const char *classname, const char *groupname) { luaL_getmetatable(L, classname); lua_pushstring(L, groupname); lua_pushboolean(L, 1); lua_rawset(L, -3); lua_pop(L, 1); } /*-------------------------------------------------------------------------*\ * Make sure argument is a boolean \*-------------------------------------------------------------------------*/ int auxiliar_checkboolean(lua_State *L, int objidx) { if (!lua_isboolean(L, objidx)) auxiliar_typeerror(L, objidx, lua_typename(L, LUA_TBOOLEAN)); return lua_toboolean(L, objidx); } /*-------------------------------------------------------------------------*\ * Return userdata pointer if object belongs to a given class, abort with * error otherwise \*-------------------------------------------------------------------------*/ void *auxiliar_checkclass(lua_State *L, const char *classname, int objidx) { void *data = auxiliar_getclassudata(L, classname, objidx); if (!data) { char msg[45]; sprintf(msg, "%.35s expected", classname); luaL_argerror(L, objidx, msg); } return data; } /*-------------------------------------------------------------------------*\ * Return userdata pointer if object belongs to a given group, abort with * error otherwise \*-------------------------------------------------------------------------*/ void *auxiliar_checkgroup(lua_State *L, const char *groupname, int objidx) { void *data = auxiliar_getgroupudata(L, groupname, objidx); if (!data) { char msg[45]; sprintf(msg, "%.35s expected", groupname); luaL_argerror(L, objidx, msg); } return data; } /*-------------------------------------------------------------------------*\ * Set object class \*-------------------------------------------------------------------------*/ void auxiliar_setclass(lua_State *L, const char *classname, int objidx) { luaL_getmetatable(L, classname); if (objidx < 0) objidx--; lua_setmetatable(L, objidx); } /*-------------------------------------------------------------------------*\ * Get a userdata pointer if object belongs to a given group. Return NULL * otherwise \*-------------------------------------------------------------------------*/ void *auxiliar_getgroupudata(lua_State *L, const char *groupname, int objidx) { if (!lua_getmetatable(L, objidx)) return NULL; lua_pushstring(L, groupname); lua_rawget(L, -2); if (lua_isnil(L, -1)) { lua_pop(L, 2); return NULL; } else { lua_pop(L, 2); return lua_touserdata(L, objidx); } } /*-------------------------------------------------------------------------*\ * Get a userdata pointer if object belongs to a given class. Return NULL * otherwise \*-------------------------------------------------------------------------*/ void *auxiliar_getclassudata(lua_State *L, const char *classname, int objidx) { return luaL_testudata(L, objidx, classname); } /*-------------------------------------------------------------------------*\ * Throws error when argument does not have correct type. * Used to be part of lauxlib in Lua 5.1, was dropped from 5.2. \*-------------------------------------------------------------------------*/ int auxiliar_typeerror (lua_State *L, int narg, const char *tname) { const char *msg = lua_pushfstring(L, "%s expected, got %s", tname, luaL_typename(L, narg)); return luaL_argerror(L, narg, msg); } ================================================ FILE: src/libraries/luasocket/libluasocket/auxiliar.h ================================================ #ifndef AUXILIAR_H #define AUXILIAR_H /*=========================================================================*\ * Auxiliar routines for class hierarchy manipulation * LuaSocket toolkit (but completely independent of other LuaSocket modules) * * A LuaSocket class is a name associated with Lua metatables. A LuaSocket * group is a name associated with a class. A class can belong to any number * of groups. This module provides the functionality to: * * - create new classes * - add classes to groups * - set the class of objects * - check if an object belongs to a given class or group * - get the userdata associated to objects * - print objects in a pretty way * * LuaSocket class names follow the convention {}. Modules * can define any number of classes and groups. The module tcp.c, for * example, defines the classes tcp{master}, tcp{client} and tcp{server} and * the groups tcp{client,server} and tcp{any}. Module functions can then * perform type-checking on their arguments by either class or group. * * LuaSocket metatables define the __index metamethod as being a table. This * table has one field for each method supported by the class, and a field * "class" with the class name. * * The mapping from class name to the corresponding metatable and the * reverse mapping are done using lauxlib. \*=========================================================================*/ #include "luasocket.h" #ifndef _WIN32 #pragma GCC visibility push(hidden) #endif int auxiliar_open(lua_State *L); void auxiliar_newclass(lua_State *L, const char *classname, luaL_Reg *func); int auxiliar_tostring(lua_State *L); void auxiliar_add2group(lua_State *L, const char *classname, const char *group); int auxiliar_checkboolean(lua_State *L, int objidx); void *auxiliar_checkclass(lua_State *L, const char *classname, int objidx); void *auxiliar_checkgroup(lua_State *L, const char *groupname, int objidx); void auxiliar_setclass(lua_State *L, const char *classname, int objidx); void *auxiliar_getgroupudata(lua_State *L, const char *groupname, int objidx); void *auxiliar_getclassudata(lua_State *L, const char *groupname, int objidx); int auxiliar_typeerror(lua_State *L, int narg, const char *tname); #ifndef _WIN32 #pragma GCC visibility pop #endif #endif /* AUXILIAR_H */ ================================================ FILE: src/libraries/luasocket/libluasocket/buffer.c ================================================ /*=========================================================================*\ * Input/Output interface for Lua programs * LuaSocket toolkit \*=========================================================================*/ #include "luasocket.h" #include "buffer.h" /*=========================================================================*\ * Internal function prototypes \*=========================================================================*/ static int recvraw(p_buffer buf, size_t wanted, luaL_Buffer *b); static int recvline(p_buffer buf, luaL_Buffer *b); static int recvall(p_buffer buf, luaL_Buffer *b); static int buffer_get(p_buffer buf, const char **data, size_t *count); static void buffer_skip(p_buffer buf, size_t count); static int sendraw(p_buffer buf, const char *data, size_t count, size_t *sent); /* min and max macros */ #ifndef MIN #define MIN(x, y) ((x) < (y) ? x : y) #endif #ifndef MAX #define MAX(x, y) ((x) > (y) ? x : y) #endif /*=========================================================================*\ * Exported functions \*=========================================================================*/ /*-------------------------------------------------------------------------*\ * Initializes module \*-------------------------------------------------------------------------*/ int buffer_open(lua_State *L) { (void) L; return 0; } /*-------------------------------------------------------------------------*\ * Initializes C structure \*-------------------------------------------------------------------------*/ void buffer_init(p_buffer buf, p_io io, p_timeout tm) { buf->first = buf->last = 0; buf->io = io; buf->tm = tm; buf->received = buf->sent = 0; buf->birthday = timeout_gettime(); } /*-------------------------------------------------------------------------*\ * object:getstats() interface \*-------------------------------------------------------------------------*/ int buffer_meth_getstats(lua_State *L, p_buffer buf) { lua_pushnumber(L, (lua_Number) buf->received); lua_pushnumber(L, (lua_Number) buf->sent); lua_pushnumber(L, timeout_gettime() - buf->birthday); return 3; } /*-------------------------------------------------------------------------*\ * object:setstats() interface \*-------------------------------------------------------------------------*/ int buffer_meth_setstats(lua_State *L, p_buffer buf) { buf->received = (long) luaL_optnumber(L, 2, (lua_Number) buf->received); buf->sent = (long) luaL_optnumber(L, 3, (lua_Number) buf->sent); if (lua_isnumber(L, 4)) buf->birthday = timeout_gettime() - lua_tonumber(L, 4); lua_pushnumber(L, 1); return 1; } /*-------------------------------------------------------------------------*\ * object:send() interface \*-------------------------------------------------------------------------*/ int buffer_meth_send(lua_State *L, p_buffer buf) { int top = lua_gettop(L); int err = IO_DONE; size_t size = 0, sent = 0; const char *data = luaL_checklstring(L, 2, &size); long start = (long) luaL_optnumber(L, 3, 1); long end = (long) luaL_optnumber(L, 4, -1); timeout_markstart(buf->tm); if (start < 0) start = (long) (size+start+1); if (end < 0) end = (long) (size+end+1); if (start < 1) start = (long) 1; if (end > (long) size) end = (long) size; if (start <= end) err = sendraw(buf, data+start-1, end-start+1, &sent); /* check if there was an error */ if (err != IO_DONE) { lua_pushnil(L); lua_pushstring(L, buf->io->error(buf->io->ctx, err)); lua_pushnumber(L, (lua_Number) (sent+start-1)); } else { lua_pushnumber(L, (lua_Number) (sent+start-1)); lua_pushnil(L); lua_pushnil(L); } #ifdef LUASOCKET_DEBUG /* push time elapsed during operation as the last return value */ lua_pushnumber(L, timeout_gettime() - timeout_getstart(buf->tm)); #endif return lua_gettop(L) - top; } /*-------------------------------------------------------------------------*\ * object:receive() interface \*-------------------------------------------------------------------------*/ int buffer_meth_receive(lua_State *L, p_buffer buf) { int err = IO_DONE, top; luaL_Buffer b; size_t size; const char *part = luaL_optlstring(L, 3, "", &size); timeout_markstart(buf->tm); /* make sure we don't confuse buffer stuff with arguments */ lua_settop(L, 3); top = lua_gettop(L); /* initialize buffer with optional extra prefix * (useful for concatenating previous partial results) */ luaL_buffinit(L, &b); luaL_addlstring(&b, part, size); /* receive new patterns */ if (!lua_isnumber(L, 2)) { const char *p= luaL_optstring(L, 2, "*l"); if (p[0] == '*' && p[1] == 'l') err = recvline(buf, &b); else if (p[0] == '*' && p[1] == 'a') err = recvall(buf, &b); else luaL_argcheck(L, 0, 2, "invalid receive pattern"); /* get a fixed number of bytes (minus what was already partially * received) */ } else { double n = lua_tonumber(L, 2); size_t wanted = (size_t) n; luaL_argcheck(L, n >= 0, 2, "invalid receive pattern"); if (size == 0 || wanted > size) err = recvraw(buf, wanted-size, &b); } /* check if there was an error */ if (err != IO_DONE) { /* we can't push anyting in the stack before pushing the * contents of the buffer. this is the reason for the complication */ luaL_pushresult(&b); lua_pushstring(L, buf->io->error(buf->io->ctx, err)); lua_pushvalue(L, -2); lua_pushnil(L); lua_replace(L, -4); } else { luaL_pushresult(&b); lua_pushnil(L); lua_pushnil(L); } #ifdef LUASOCKET_DEBUG /* push time elapsed during operation as the last return value */ lua_pushnumber(L, timeout_gettime() - timeout_getstart(buf->tm)); #endif return lua_gettop(L) - top; } /*-------------------------------------------------------------------------*\ * Determines if there is any data in the read buffer \*-------------------------------------------------------------------------*/ int buffer_isempty(p_buffer buf) { return buf->first >= buf->last; } /*=========================================================================*\ * Internal functions \*=========================================================================*/ /*-------------------------------------------------------------------------*\ * Sends a block of data (unbuffered) \*-------------------------------------------------------------------------*/ #define STEPSIZE 8192 static int sendraw(p_buffer buf, const char *data, size_t count, size_t *sent) { p_io io = buf->io; p_timeout tm = buf->tm; size_t total = 0; int err = IO_DONE; while (total < count && err == IO_DONE) { size_t done = 0; size_t step = (count-total <= STEPSIZE)? count-total: STEPSIZE; err = io->send(io->ctx, data+total, step, &done, tm); total += done; } *sent = total; buf->sent += total; return err; } /*-------------------------------------------------------------------------*\ * Reads a fixed number of bytes (buffered) \*-------------------------------------------------------------------------*/ static int recvraw(p_buffer buf, size_t wanted, luaL_Buffer *b) { int err = IO_DONE; size_t total = 0; while (err == IO_DONE) { size_t count; const char *data; err = buffer_get(buf, &data, &count); count = MIN(count, wanted - total); luaL_addlstring(b, data, count); buffer_skip(buf, count); total += count; if (total >= wanted) break; } return err; } /*-------------------------------------------------------------------------*\ * Reads everything until the connection is closed (buffered) \*-------------------------------------------------------------------------*/ static int recvall(p_buffer buf, luaL_Buffer *b) { int err = IO_DONE; size_t total = 0; while (err == IO_DONE) { const char *data; size_t count; err = buffer_get(buf, &data, &count); total += count; luaL_addlstring(b, data, count); buffer_skip(buf, count); } if (err == IO_CLOSED) { if (total > 0) return IO_DONE; else return IO_CLOSED; } else return err; } /*-------------------------------------------------------------------------*\ * Reads a line terminated by a CR LF pair or just by a LF. The CR and LF * are not returned by the function and are discarded from the buffer \*-------------------------------------------------------------------------*/ static int recvline(p_buffer buf, luaL_Buffer *b) { int err = IO_DONE; while (err == IO_DONE) { size_t count, pos; const char *data; err = buffer_get(buf, &data, &count); pos = 0; while (pos < count && data[pos] != '\n') { /* we ignore all \r's */ if (data[pos] != '\r') luaL_addchar(b, data[pos]); pos++; } if (pos < count) { /* found '\n' */ buffer_skip(buf, pos+1); /* skip '\n' too */ break; /* we are done */ } else /* reached the end of the buffer */ buffer_skip(buf, pos); } return err; } /*-------------------------------------------------------------------------*\ * Skips a given number of bytes from read buffer. No data is read from the * transport layer \*-------------------------------------------------------------------------*/ static void buffer_skip(p_buffer buf, size_t count) { buf->received += count; buf->first += count; if (buffer_isempty(buf)) buf->first = buf->last = 0; } /*-------------------------------------------------------------------------*\ * Return any data available in buffer, or get more data from transport layer * if buffer is empty \*-------------------------------------------------------------------------*/ static int buffer_get(p_buffer buf, const char **data, size_t *count) { int err = IO_DONE; p_io io = buf->io; p_timeout tm = buf->tm; if (buffer_isempty(buf)) { size_t got; err = io->recv(io->ctx, buf->data, BUF_SIZE, &got, tm); buf->first = 0; buf->last = got; } *count = buf->last - buf->first; *data = buf->data + buf->first; return err; } ================================================ FILE: src/libraries/luasocket/libluasocket/buffer.h ================================================ #ifndef BUF_H #define BUF_H /*=========================================================================*\ * Input/Output interface for Lua programs * LuaSocket toolkit * * Line patterns require buffering. Reading one character at a time involves * too many system calls and is very slow. This module implements the * LuaSocket interface for input/output on connected objects, as seen by * Lua programs. * * Input is buffered. Output is *not* buffered because there was no simple * way of making sure the buffered output data would ever be sent. * * The module is built on top of the I/O abstraction defined in io.h and the * timeout management is done with the timeout.h interface. \*=========================================================================*/ #include "luasocket.h" #include "io.h" #include "timeout.h" /* buffer size in bytes */ #define BUF_SIZE 8192 /* buffer control structure */ typedef struct t_buffer_ { double birthday; /* throttle support info: creation time, */ size_t sent, received; /* bytes sent, and bytes received */ p_io io; /* IO driver used for this buffer */ p_timeout tm; /* timeout management for this buffer */ size_t first, last; /* index of first and last bytes of stored data */ char data[BUF_SIZE]; /* storage space for buffer data */ } t_buffer; typedef t_buffer *p_buffer; #ifndef _WIN32 #pragma GCC visibility push(hidden) #endif int buffer_open(lua_State *L); void buffer_init(p_buffer buf, p_io io, p_timeout tm); int buffer_meth_getstats(lua_State *L, p_buffer buf); int buffer_meth_setstats(lua_State *L, p_buffer buf); int buffer_meth_send(lua_State *L, p_buffer buf); int buffer_meth_receive(lua_State *L, p_buffer buf); int buffer_isempty(p_buffer buf); #ifndef _WIN32 #pragma GCC visibility pop #endif #endif /* BUF_H */ ================================================ FILE: src/libraries/luasocket/libluasocket/compat.c ================================================ #include "luasocket.h" #include "compat.h" #if LUA_VERSION_NUM==501 /* ** Adapted from Lua 5.2 */ void luasocket_setfuncs (lua_State *L, const luaL_Reg *l, int nup) { luaL_checkstack(L, nup+1, "too many upvalues"); for (; l->name != NULL; l++) { /* fill the table with given functions */ int i; lua_pushstring(L, l->name); for (i = 0; i < nup; i++) /* copy upvalues to the top */ lua_pushvalue(L, -(nup+1)); lua_pushcclosure(L, l->func, nup); /* closure with those upvalues */ lua_settable(L, -(nup + 3)); } lua_pop(L, nup); /* remove upvalues */ } /* ** Duplicated from Lua 5.2 */ void *luasocket_testudata (lua_State *L, int ud, const char *tname) { void *p = lua_touserdata(L, ud); if (p != NULL) { /* value is a userdata? */ if (lua_getmetatable(L, ud)) { /* does it have a metatable? */ luaL_getmetatable(L, tname); /* get correct metatable */ if (!lua_rawequal(L, -1, -2)) /* not the same? */ p = NULL; /* value is a userdata with wrong metatable */ lua_pop(L, 2); /* remove both metatables */ return p; } } return NULL; /* value is not a userdata with a metatable */ } #endif ================================================ FILE: src/libraries/luasocket/libluasocket/compat.h ================================================ #ifndef COMPAT_H #define COMPAT_H #if LUA_VERSION_NUM==501 #ifndef _WIN32 #pragma GCC visibility push(hidden) #endif void luasocket_setfuncs (lua_State *L, const luaL_Reg *l, int nup); void *luasocket_testudata ( lua_State *L, int arg, const char *tname); #ifndef _WIN32 #pragma GCC visibility pop #endif #define luaL_setfuncs luasocket_setfuncs #define luaL_testudata luasocket_testudata #endif #endif ================================================ FILE: src/libraries/luasocket/libluasocket/except.c ================================================ /*=========================================================================*\ * Simple exception support * LuaSocket toolkit \*=========================================================================*/ #include "luasocket.h" #include "except.h" #include #if LUA_VERSION_NUM < 502 #define lua_pcallk(L, na, nr, err, ctx, cont) \ (((void)ctx),((void)cont),lua_pcall(L, na, nr, err)) #endif #if LUA_VERSION_NUM < 503 typedef int lua_KContext; #endif /*=========================================================================*\ * Internal function prototypes. \*=========================================================================*/ static int global_protect(lua_State *L); static int global_newtry(lua_State *L); static int protected_(lua_State *L); static int finalize(lua_State *L); static int do_nothing(lua_State *L); /* except functions */ static luaL_Reg func[] = { {"newtry", global_newtry}, {"protect", global_protect}, {NULL, NULL} }; /*-------------------------------------------------------------------------*\ * Try factory \*-------------------------------------------------------------------------*/ static void wrap(lua_State *L) { lua_createtable(L, 1, 0); lua_pushvalue(L, -2); lua_rawseti(L, -2, 1); lua_pushvalue(L, lua_upvalueindex(1)); lua_setmetatable(L, -2); } static int finalize(lua_State *L) { if (!lua_toboolean(L, 1)) { lua_pushvalue(L, lua_upvalueindex(2)); lua_call(L, 0, 0); lua_settop(L, 2); wrap(L); lua_error(L); return 0; } else return lua_gettop(L); } static int do_nothing(lua_State *L) { (void) L; return 0; } static int global_newtry(lua_State *L) { lua_settop(L, 1); if (lua_isnil(L, 1)) lua_pushcfunction(L, do_nothing); lua_pushvalue(L, lua_upvalueindex(1)); lua_insert(L, -2); lua_pushcclosure(L, finalize, 2); return 1; } /*-------------------------------------------------------------------------*\ * Protect factory \*-------------------------------------------------------------------------*/ static int unwrap(lua_State *L) { if (lua_istable(L, -1) && lua_getmetatable(L, -1)) { int r = lua_rawequal(L, -1, lua_upvalueindex(1)); lua_pop(L, 1); if (r) { lua_pushnil(L); lua_rawgeti(L, -2, 1); return 1; } } return 0; } static int protected_finish(lua_State *L, int status, lua_KContext ctx) { (void)ctx; if (status != 0 && status != LUA_YIELD) { if (unwrap(L)) return 2; else return lua_error(L); } else return lua_gettop(L); } #if LUA_VERSION_NUM == 502 static int protected_cont(lua_State *L) { int ctx = 0; int status = lua_getctx(L, &ctx); return protected_finish(L, status, ctx); } #else #define protected_cont protected_finish #endif static int protected_(lua_State *L) { int status; lua_pushvalue(L, lua_upvalueindex(2)); lua_insert(L, 1); status = lua_pcallk(L, lua_gettop(L) - 1, LUA_MULTRET, 0, 0, protected_cont); return protected_finish(L, status, 0); } static int global_protect(lua_State *L) { lua_settop(L, 1); lua_pushvalue(L, lua_upvalueindex(1)); lua_insert(L, 1); lua_pushcclosure(L, protected_, 2); return 1; } /*-------------------------------------------------------------------------*\ * Init module \*-------------------------------------------------------------------------*/ int except_open(lua_State *L) { lua_newtable(L); /* metatable for wrapped exceptions */ lua_pushboolean(L, 0); lua_setfield(L, -2, "__metatable"); luaL_setfuncs(L, func, 1); return 0; } ================================================ FILE: src/libraries/luasocket/libluasocket/except.h ================================================ #ifndef EXCEPT_H #define EXCEPT_H /*=========================================================================*\ * Exception control * LuaSocket toolkit (but completely independent from other modules) * * This provides support for simple exceptions in Lua. During the * development of the HTTP/FTP/SMTP support, it became aparent that * error checking was taking a substantial amount of the coding. These * function greatly simplify the task of checking errors. * * The main idea is that functions should return nil as their first return * values when they find an error, and return an error message (or value) * following nil. In case of success, as long as the first value is not nil, * the other values don't matter. * * The idea is to nest function calls with the "try" function. This function * checks the first value, and, if it's falsy, wraps the second value in a * table with metatable and calls "error" on it. Otherwise, it returns all * values it received. Basically, it works like the Lua "assert" function, * but it creates errors targeted specifically at "protect". * * The "newtry" function is a factory for "try" functions that call a * finalizer in protected mode before calling "error". * * The "protect" function returns a new function that behaves exactly like * the function it receives, but the new function catches exceptions thrown * by "try" functions and returns nil followed by the error message instead. * * With these three functions, it's easy to write functions that throw * exceptions on error, but that don't interrupt the user script. \*=========================================================================*/ #include "luasocket.h" #ifndef _WIN32 #pragma GCC visibility push(hidden) #endif int except_open(lua_State *L); #ifndef _WIN32 #pragma GCC visibility pop #endif #endif ================================================ FILE: src/libraries/luasocket/libluasocket/ftp.lua ================================================ ----------------------------------------------------------------------------- -- FTP support for the Lua language -- LuaSocket toolkit. -- Author: Diego Nehab ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- -- Declare module and import dependencies ----------------------------------------------------------------------------- local base = _G local table = require("table") local string = require("string") local math = require("math") local socket = require("socket") local url = require("socket.url") local tp = require("socket.tp") local ltn12 = require("ltn12") socket.ftp = {} local _M = socket.ftp ----------------------------------------------------------------------------- -- Program constants ----------------------------------------------------------------------------- -- timeout in seconds before the program gives up on a connection _M.TIMEOUT = 60 -- default port for ftp service local PORT = 21 -- this is the default anonymous password. used when no password is -- provided in url. should be changed to your e-mail. _M.USER = "ftp" _M.PASSWORD = "anonymous@anonymous.org" ----------------------------------------------------------------------------- -- Low level FTP API ----------------------------------------------------------------------------- local metat = { __index = {} } function _M.open(server, port, create) local tp = socket.try(tp.connect(server, port or PORT, _M.TIMEOUT, create)) local f = base.setmetatable({ tp = tp }, metat) -- make sure everything gets closed in an exception f.try = socket.newtry(function() f:close() end) return f end function metat.__index:portconnect() self.try(self.server:settimeout(_M.TIMEOUT)) self.data = self.try(self.server:accept()) self.try(self.data:settimeout(_M.TIMEOUT)) end function metat.__index:pasvconnect() self.data = self.try(socket.tcp()) self.try(self.data:settimeout(_M.TIMEOUT)) self.try(self.data:connect(self.pasvt.address, self.pasvt.port)) end function metat.__index:login(user, password) self.try(self.tp:command("user", user or _M.USER)) local code, _ = self.try(self.tp:check{"2..", 331}) if code == 331 then self.try(self.tp:command("pass", password or _M.PASSWORD)) self.try(self.tp:check("2..")) end return 1 end function metat.__index:pasv() self.try(self.tp:command("pasv")) local _, reply = self.try(self.tp:check("2..")) local pattern = "(%d+)%D(%d+)%D(%d+)%D(%d+)%D(%d+)%D(%d+)" local a, b, c, d, p1, p2 = socket.skip(2, string.find(reply, pattern)) self.try(a and b and c and d and p1 and p2, reply) self.pasvt = { address = string.format("%d.%d.%d.%d", a, b, c, d), port = p1*256 + p2 } if self.server then self.server:close() self.server = nil end return self.pasvt.address, self.pasvt.port end function metat.__index:epsv() self.try(self.tp:command("epsv")) local _, reply = self.try(self.tp:check("229")) local pattern = "%((.)(.-)%1(.-)%1(.-)%1%)" local _, _, _, port = string.match(reply, pattern) self.try(port, "invalid epsv response") self.pasvt = { address = self.tp:getpeername(), port = port } if self.server then self.server:close() self.server = nil end return self.pasvt.address, self.pasvt.port end function metat.__index:port(address, port) self.pasvt = nil if not address then address = self.try(self.tp:getsockname()) self.server = self.try(socket.bind(address, 0)) address, port = self.try(self.server:getsockname()) self.try(self.server:settimeout(_M.TIMEOUT)) end local pl = math.mod(port, 256) local ph = (port - pl)/256 local arg = string.gsub(string.format("%s,%d,%d", address, ph, pl), "%.", ",") self.try(self.tp:command("port", arg)) self.try(self.tp:check("2..")) return 1 end function metat.__index:eprt(family, address, port) self.pasvt = nil if not address then address = self.try(self.tp:getsockname()) self.server = self.try(socket.bind(address, 0)) address, port = self.try(self.server:getsockname()) self.try(self.server:settimeout(_M.TIMEOUT)) end local arg = string.format("|%s|%s|%d|", family, address, port) self.try(self.tp:command("eprt", arg)) self.try(self.tp:check("2..")) return 1 end function metat.__index:send(sendt) self.try(self.pasvt or self.server, "need port or pasv first") -- if there is a pasvt table, we already sent a PASV command -- we just get the data connection into self.data if self.pasvt then self:pasvconnect() end -- get the transfer argument and command local argument = sendt.argument or url.unescape(string.gsub(sendt.path or "", "^[/\\]", "")) if argument == "" then argument = nil end local command = sendt.command or "stor" -- send the transfer command and check the reply self.try(self.tp:command(command, argument)) local code, _ = self.try(self.tp:check{"2..", "1.."}) -- if there is not a pasvt table, then there is a server -- and we already sent a PORT command if not self.pasvt then self:portconnect() end -- get the sink, source and step for the transfer local step = sendt.step or ltn12.pump.step local readt = { self.tp } local checkstep = function(src, snk) -- check status in control connection while downloading local readyt = socket.select(readt, nil, 0) if readyt[tp] then code = self.try(self.tp:check("2..")) end return step(src, snk) end local sink = socket.sink("close-when-done", self.data) -- transfer all data and check error self.try(ltn12.pump.all(sendt.source, sink, checkstep)) if string.find(code, "1..") then self.try(self.tp:check("2..")) end -- done with data connection self.data:close() -- find out how many bytes were sent local sent = socket.skip(1, self.data:getstats()) self.data = nil return sent end function metat.__index:receive(recvt) self.try(self.pasvt or self.server, "need port or pasv first") if self.pasvt then self:pasvconnect() end local argument = recvt.argument or url.unescape(string.gsub(recvt.path or "", "^[/\\]", "")) if argument == "" then argument = nil end local command = recvt.command or "retr" self.try(self.tp:command(command, argument)) local code,reply = self.try(self.tp:check{"1..", "2.."}) if (code >= 200) and (code <= 299) then recvt.sink(reply) return 1 end if not self.pasvt then self:portconnect() end local source = socket.source("until-closed", self.data) local step = recvt.step or ltn12.pump.step self.try(ltn12.pump.all(source, recvt.sink, step)) if string.find(code, "1..") then self.try(self.tp:check("2..")) end self.data:close() self.data = nil return 1 end function metat.__index:cwd(dir) self.try(self.tp:command("cwd", dir)) self.try(self.tp:check(250)) return 1 end function metat.__index:type(type) self.try(self.tp:command("type", type)) self.try(self.tp:check(200)) return 1 end function metat.__index:greet() local code = self.try(self.tp:check{"1..", "2.."}) if string.find(code, "1..") then self.try(self.tp:check("2..")) end return 1 end function metat.__index:quit() self.try(self.tp:command("quit")) self.try(self.tp:check("2..")) return 1 end function metat.__index:close() if self.data then self.data:close() end if self.server then self.server:close() end return self.tp:close() end ----------------------------------------------------------------------------- -- High level FTP API ----------------------------------------------------------------------------- local function override(t) if t.url then local u = url.parse(t.url) for i,v in base.pairs(t) do u[i] = v end return u else return t end end local function tput(putt) putt = override(putt) socket.try(putt.host, "missing hostname") local f = _M.open(putt.host, putt.port, putt.create) f:greet() f:login(putt.user, putt.password) if putt.type then f:type(putt.type) end f:epsv() local sent = f:send(putt) f:quit() f:close() return sent end local default = { path = "/", scheme = "ftp" } local function genericform(u) local t = socket.try(url.parse(u, default)) socket.try(t.scheme == "ftp", "wrong scheme '" .. t.scheme .. "'") socket.try(t.host, "missing hostname") local pat = "^type=(.)$" if t.params then t.type = socket.skip(2, string.find(t.params, pat)) socket.try(t.type == "a" or t.type == "i", "invalid type '" .. t.type .. "'") end return t end _M.genericform = genericform local function sput(u, body) local putt = genericform(u) putt.source = ltn12.source.string(body) return tput(putt) end _M.put = socket.protect(function(putt, body) if base.type(putt) == "string" then return sput(putt, body) else return tput(putt) end end) local function tget(gett) gett = override(gett) socket.try(gett.host, "missing hostname") local f = _M.open(gett.host, gett.port, gett.create) f:greet() f:login(gett.user, gett.password) if gett.type then f:type(gett.type) end f:epsv() f:receive(gett) f:quit() return f:close() end local function sget(u) local gett = genericform(u) local t = {} gett.sink = ltn12.sink.table(t) tget(gett) return table.concat(t) end _M.command = socket.protect(function(cmdt) cmdt = override(cmdt) socket.try(cmdt.host, "missing hostname") socket.try(cmdt.command, "missing command") local f = _M.open(cmdt.host, cmdt.port, cmdt.create) f:greet() f:login(cmdt.user, cmdt.password) if type(cmdt.command) == "table" then local argument = cmdt.argument or {} local check = cmdt.check or {} for i,cmd in ipairs(cmdt.command) do f.try(f.tp:command(cmd, argument[i])) if check[i] then f.try(f.tp:check(check[i])) end end else f.try(f.tp:command(cmdt.command, cmdt.argument)) if cmdt.check then f.try(f.tp:check(cmdt.check)) end end f:quit() return f:close() end) _M.get = socket.protect(function(gett) if base.type(gett) == "string" then return sget(gett) else return tget(gett) end end) return _M ================================================ FILE: src/libraries/luasocket/libluasocket/ftp.lua.h ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ namespace love { // [ftp.lua] const unsigned char ftp_lua[] = { 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x2d, 0x2d, 0x20, 0x46, 0x54, 0x50, 0x20, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x4c, 0x75, 0x61, 0x20, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x0a, 0x2d, 0x2d, 0x20, 0x4c, 0x75, 0x61, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x20, 0x74, 0x6f, 0x6f, 0x6c, 0x6b, 0x69, 0x74, 0x2e, 0x0a, 0x2d, 0x2d, 0x20, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x3a, 0x20, 0x44, 0x69, 0x65, 0x67, 0x6f, 0x20, 0x4e, 0x65, 0x68, 0x61, 0x62, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x2d, 0x2d, 0x20, 0x44, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x20, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x20, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x62, 0x61, 0x73, 0x65, 0x20, 0x3d, 0x20, 0x5f, 0x47, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x3d, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x28, 0x22, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x22, 0x29, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x3d, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x28, 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0x29, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x6d, 0x61, 0x74, 0x68, 0x20, 0x3d, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x28, 0x22, 0x6d, 0x61, 0x74, 0x68, 0x22, 0x29, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x20, 0x3d, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x28, 0x22, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x22, 0x29, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x75, 0x72, 0x6c, 0x20, 0x3d, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x28, 0x22, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x75, 0x72, 0x6c, 0x22, 0x29, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x74, 0x70, 0x20, 0x3d, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x28, 0x22, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x74, 0x70, 0x22, 0x29, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x6c, 0x74, 0x6e, 0x31, 0x32, 0x20, 0x3d, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x28, 0x22, 0x6c, 0x74, 0x6e, 0x31, 0x32, 0x22, 0x29, 0x0a, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x66, 0x74, 0x70, 0x20, 0x3d, 0x20, 0x7b, 0x7d, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x5f, 0x4d, 0x20, 0x3d, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x66, 0x74, 0x70, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x2d, 0x2d, 0x20, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x73, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x2d, 0x2d, 0x20, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x20, 0x69, 0x6e, 0x20, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x20, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x20, 0x67, 0x69, 0x76, 0x65, 0x73, 0x20, 0x75, 0x70, 0x20, 0x6f, 0x6e, 0x20, 0x61, 0x20, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x0a, 0x5f, 0x4d, 0x2e, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x20, 0x3d, 0x20, 0x36, 0x30, 0x0a, 0x2d, 0x2d, 0x20, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x20, 0x70, 0x6f, 0x72, 0x74, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x66, 0x74, 0x70, 0x20, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x50, 0x4f, 0x52, 0x54, 0x20, 0x3d, 0x20, 0x32, 0x31, 0x0a, 0x2d, 0x2d, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x20, 0x61, 0x6e, 0x6f, 0x6e, 0x79, 0x6d, 0x6f, 0x75, 0x73, 0x20, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x2e, 0x20, 0x75, 0x73, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x6e, 0x6f, 0x20, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x20, 0x69, 0x73, 0x0a, 0x2d, 0x2d, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x75, 0x72, 0x6c, 0x2e, 0x20, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x20, 0x62, 0x65, 0x20, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x79, 0x6f, 0x75, 0x72, 0x20, 0x65, 0x2d, 0x6d, 0x61, 0x69, 0x6c, 0x2e, 0x0a, 0x5f, 0x4d, 0x2e, 0x55, 0x53, 0x45, 0x52, 0x20, 0x3d, 0x20, 0x22, 0x66, 0x74, 0x70, 0x22, 0x0a, 0x5f, 0x4d, 0x2e, 0x50, 0x41, 0x53, 0x53, 0x57, 0x4f, 0x52, 0x44, 0x20, 0x3d, 0x20, 0x22, 0x61, 0x6e, 0x6f, 0x6e, 0x79, 0x6d, 0x6f, 0x75, 0x73, 0x40, 0x61, 0x6e, 0x6f, 0x6e, 0x79, 0x6d, 0x6f, 0x75, 0x73, 0x2e, 0x6f, 0x72, 0x67, 0x22, 0x0a, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x2d, 0x2d, 0x20, 0x4c, 0x6f, 0x77, 0x20, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x20, 0x46, 0x54, 0x50, 0x20, 0x41, 0x50, 0x49, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x74, 0x20, 0x3d, 0x20, 0x7b, 0x20, 0x5f, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x20, 0x3d, 0x20, 0x7b, 0x7d, 0x20, 0x7d, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x5f, 0x4d, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x28, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2c, 0x20, 0x70, 0x6f, 0x72, 0x74, 0x2c, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x74, 0x70, 0x20, 0x3d, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x74, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x28, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2c, 0x20, 0x70, 0x6f, 0x72, 0x74, 0x20, 0x6f, 0x72, 0x20, 0x50, 0x4f, 0x52, 0x54, 0x2c, 0x20, 0x5f, 0x4d, 0x2e, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x2c, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x66, 0x20, 0x3d, 0x20, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x65, 0x74, 0x6d, 0x65, 0x74, 0x61, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x28, 0x7b, 0x20, 0x74, 0x70, 0x20, 0x3d, 0x20, 0x74, 0x70, 0x20, 0x7d, 0x2c, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x74, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x6d, 0x61, 0x6b, 0x65, 0x20, 0x73, 0x75, 0x72, 0x65, 0x20, 0x65, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x20, 0x67, 0x65, 0x74, 0x73, 0x20, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x61, 0x6e, 0x20, 0x65, 0x78, 0x63, 0x65, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x2e, 0x74, 0x72, 0x79, 0x20, 0x3d, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x6e, 0x65, 0x77, 0x74, 0x72, 0x79, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x20, 0x66, 0x3a, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x28, 0x29, 0x20, 0x65, 0x6e, 0x64, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x66, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x74, 0x2e, 0x5f, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x3a, 0x70, 0x6f, 0x72, 0x74, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x3a, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x28, 0x5f, 0x4d, 0x2e, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x20, 0x3d, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x3a, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x28, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x3a, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x28, 0x5f, 0x4d, 0x2e, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x29, 0x29, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x74, 0x2e, 0x5f, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x3a, 0x70, 0x61, 0x73, 0x76, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x20, 0x3d, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x74, 0x63, 0x70, 0x28, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x3a, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x28, 0x5f, 0x4d, 0x2e, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x3a, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x28, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x70, 0x61, 0x73, 0x76, 0x74, 0x2e, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2c, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x70, 0x61, 0x73, 0x76, 0x74, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x29, 0x29, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x74, 0x2e, 0x5f, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x3a, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x28, 0x75, 0x73, 0x65, 0x72, 0x2c, 0x20, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x70, 0x3a, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x28, 0x22, 0x75, 0x73, 0x65, 0x72, 0x22, 0x2c, 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, 0x6f, 0x72, 0x20, 0x5f, 0x4d, 0x2e, 0x55, 0x53, 0x45, 0x52, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x2c, 0x20, 0x5f, 0x20, 0x3d, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x70, 0x3a, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x7b, 0x22, 0x32, 0x2e, 0x2e, 0x22, 0x2c, 0x20, 0x33, 0x33, 0x31, 0x7d, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x3d, 0x3d, 0x20, 0x33, 0x33, 0x31, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x70, 0x3a, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x28, 0x22, 0x70, 0x61, 0x73, 0x73, 0x22, 0x2c, 0x20, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x20, 0x6f, 0x72, 0x20, 0x5f, 0x4d, 0x2e, 0x50, 0x41, 0x53, 0x53, 0x57, 0x4f, 0x52, 0x44, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x70, 0x3a, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x28, 0x22, 0x32, 0x2e, 0x2e, 0x22, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x31, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x74, 0x2e, 0x5f, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x3a, 0x70, 0x61, 0x73, 0x76, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x70, 0x3a, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x28, 0x22, 0x70, 0x61, 0x73, 0x76, 0x22, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x5f, 0x2c, 0x20, 0x72, 0x65, 0x70, 0x6c, 0x79, 0x20, 0x3d, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x70, 0x3a, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x28, 0x22, 0x32, 0x2e, 0x2e, 0x22, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x20, 0x3d, 0x20, 0x22, 0x28, 0x25, 0x64, 0x2b, 0x29, 0x25, 0x44, 0x28, 0x25, 0x64, 0x2b, 0x29, 0x25, 0x44, 0x28, 0x25, 0x64, 0x2b, 0x29, 0x25, 0x44, 0x28, 0x25, 0x64, 0x2b, 0x29, 0x25, 0x44, 0x28, 0x25, 0x64, 0x2b, 0x29, 0x25, 0x44, 0x28, 0x25, 0x64, 0x2b, 0x29, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x61, 0x2c, 0x20, 0x62, 0x2c, 0x20, 0x63, 0x2c, 0x20, 0x64, 0x2c, 0x20, 0x70, 0x31, 0x2c, 0x20, 0x70, 0x32, 0x20, 0x3d, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x73, 0x6b, 0x69, 0x70, 0x28, 0x32, 0x2c, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x66, 0x69, 0x6e, 0x64, 0x28, 0x72, 0x65, 0x70, 0x6c, 0x79, 0x2c, 0x20, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x61, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x62, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x63, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x64, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x70, 0x31, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x70, 0x32, 0x2c, 0x20, 0x72, 0x65, 0x70, 0x6c, 0x79, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x70, 0x61, 0x73, 0x76, 0x74, 0x20, 0x3d, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x20, 0x3d, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x22, 0x25, 0x64, 0x2e, 0x25, 0x64, 0x2e, 0x25, 0x64, 0x2e, 0x25, 0x64, 0x22, 0x2c, 0x20, 0x61, 0x2c, 0x20, 0x62, 0x2c, 0x20, 0x63, 0x2c, 0x20, 0x64, 0x29, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x70, 0x6f, 0x72, 0x74, 0x20, 0x3d, 0x20, 0x70, 0x31, 0x2a, 0x32, 0x35, 0x36, 0x20, 0x2b, 0x20, 0x70, 0x32, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x3a, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x3d, 0x20, 0x6e, 0x69, 0x6c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x70, 0x61, 0x73, 0x76, 0x74, 0x2e, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2c, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x70, 0x61, 0x73, 0x76, 0x74, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x74, 0x2e, 0x5f, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x3a, 0x65, 0x70, 0x73, 0x76, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x70, 0x3a, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x28, 0x22, 0x65, 0x70, 0x73, 0x76, 0x22, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x5f, 0x2c, 0x20, 0x72, 0x65, 0x70, 0x6c, 0x79, 0x20, 0x3d, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x70, 0x3a, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x28, 0x22, 0x32, 0x32, 0x39, 0x22, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x20, 0x3d, 0x20, 0x22, 0x25, 0x28, 0x28, 0x2e, 0x29, 0x28, 0x2e, 0x2d, 0x29, 0x25, 0x31, 0x28, 0x2e, 0x2d, 0x29, 0x25, 0x31, 0x28, 0x2e, 0x2d, 0x29, 0x25, 0x31, 0x25, 0x29, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x5f, 0x2c, 0x20, 0x5f, 0x2c, 0x20, 0x5f, 0x2c, 0x20, 0x70, 0x6f, 0x72, 0x74, 0x20, 0x3d, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x28, 0x72, 0x65, 0x70, 0x6c, 0x79, 0x2c, 0x20, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x70, 0x6f, 0x72, 0x74, 0x2c, 0x20, 0x22, 0x69, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x65, 0x70, 0x73, 0x76, 0x20, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x70, 0x61, 0x73, 0x76, 0x74, 0x20, 0x3d, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x20, 0x3d, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x70, 0x3a, 0x67, 0x65, 0x74, 0x70, 0x65, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x28, 0x29, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x70, 0x6f, 0x72, 0x74, 0x20, 0x3d, 0x20, 0x70, 0x6f, 0x72, 0x74, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x3a, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x3d, 0x20, 0x6e, 0x69, 0x6c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x70, 0x61, 0x73, 0x76, 0x74, 0x2e, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2c, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x70, 0x61, 0x73, 0x76, 0x74, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x74, 0x2e, 0x5f, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x3a, 0x70, 0x6f, 0x72, 0x74, 0x28, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2c, 0x20, 0x70, 0x6f, 0x72, 0x74, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x70, 0x61, 0x73, 0x76, 0x74, 0x20, 0x3d, 0x20, 0x6e, 0x69, 0x6c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x20, 0x3d, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x70, 0x3a, 0x67, 0x65, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x28, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x3d, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x62, 0x69, 0x6e, 0x64, 0x28, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2c, 0x20, 0x30, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2c, 0x20, 0x70, 0x6f, 0x72, 0x74, 0x20, 0x3d, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x3a, 0x67, 0x65, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x28, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x3a, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x28, 0x5f, 0x4d, 0x2e, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x70, 0x6c, 0x20, 0x3d, 0x20, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x6d, 0x6f, 0x64, 0x28, 0x70, 0x6f, 0x72, 0x74, 0x2c, 0x20, 0x32, 0x35, 0x36, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x70, 0x68, 0x20, 0x3d, 0x20, 0x28, 0x70, 0x6f, 0x72, 0x74, 0x20, 0x2d, 0x20, 0x70, 0x6c, 0x29, 0x2f, 0x32, 0x35, 0x36, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x61, 0x72, 0x67, 0x20, 0x3d, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x67, 0x73, 0x75, 0x62, 0x28, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x22, 0x25, 0x73, 0x2c, 0x25, 0x64, 0x2c, 0x25, 0x64, 0x22, 0x2c, 0x20, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2c, 0x20, 0x70, 0x68, 0x2c, 0x20, 0x70, 0x6c, 0x29, 0x2c, 0x20, 0x22, 0x25, 0x2e, 0x22, 0x2c, 0x20, 0x22, 0x2c, 0x22, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x70, 0x3a, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x28, 0x22, 0x70, 0x6f, 0x72, 0x74, 0x22, 0x2c, 0x20, 0x61, 0x72, 0x67, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x70, 0x3a, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x28, 0x22, 0x32, 0x2e, 0x2e, 0x22, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x31, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x74, 0x2e, 0x5f, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x3a, 0x65, 0x70, 0x72, 0x74, 0x28, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x2c, 0x20, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2c, 0x20, 0x70, 0x6f, 0x72, 0x74, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x70, 0x61, 0x73, 0x76, 0x74, 0x20, 0x3d, 0x20, 0x6e, 0x69, 0x6c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x20, 0x3d, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x70, 0x3a, 0x67, 0x65, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x28, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x3d, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x62, 0x69, 0x6e, 0x64, 0x28, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2c, 0x20, 0x30, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2c, 0x20, 0x70, 0x6f, 0x72, 0x74, 0x20, 0x3d, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x3a, 0x67, 0x65, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x28, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x3a, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x28, 0x5f, 0x4d, 0x2e, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x61, 0x72, 0x67, 0x20, 0x3d, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x22, 0x7c, 0x25, 0x73, 0x7c, 0x25, 0x73, 0x7c, 0x25, 0x64, 0x7c, 0x22, 0x2c, 0x20, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x2c, 0x20, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2c, 0x20, 0x70, 0x6f, 0x72, 0x74, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x70, 0x3a, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x28, 0x22, 0x65, 0x70, 0x72, 0x74, 0x22, 0x2c, 0x20, 0x61, 0x72, 0x67, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x70, 0x3a, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x28, 0x22, 0x32, 0x2e, 0x2e, 0x22, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x31, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x74, 0x2e, 0x5f, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x3a, 0x73, 0x65, 0x6e, 0x64, 0x28, 0x73, 0x65, 0x6e, 0x64, 0x74, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x70, 0x61, 0x73, 0x76, 0x74, 0x20, 0x6f, 0x72, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2c, 0x20, 0x22, 0x6e, 0x65, 0x65, 0x64, 0x20, 0x70, 0x6f, 0x72, 0x74, 0x20, 0x6f, 0x72, 0x20, 0x70, 0x61, 0x73, 0x76, 0x20, 0x66, 0x69, 0x72, 0x73, 0x74, 0x22, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x69, 0x66, 0x20, 0x74, 0x68, 0x65, 0x72, 0x65, 0x20, 0x69, 0x73, 0x20, 0x61, 0x20, 0x70, 0x61, 0x73, 0x76, 0x74, 0x20, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x2c, 0x20, 0x77, 0x65, 0x20, 0x61, 0x6c, 0x72, 0x65, 0x61, 0x64, 0x79, 0x20, 0x73, 0x65, 0x6e, 0x74, 0x20, 0x61, 0x20, 0x50, 0x41, 0x53, 0x56, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x77, 0x65, 0x20, 0x6a, 0x75, 0x73, 0x74, 0x20, 0x67, 0x65, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x64, 0x61, 0x74, 0x61, 0x20, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x6e, 0x74, 0x6f, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x70, 0x61, 0x73, 0x76, 0x74, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x3a, 0x70, 0x61, 0x73, 0x76, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x28, 0x29, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x67, 0x65, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x20, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x3d, 0x20, 0x73, 0x65, 0x6e, 0x64, 0x74, 0x2e, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x6f, 0x72, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x75, 0x72, 0x6c, 0x2e, 0x75, 0x6e, 0x65, 0x73, 0x63, 0x61, 0x70, 0x65, 0x28, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x67, 0x73, 0x75, 0x62, 0x28, 0x73, 0x65, 0x6e, 0x64, 0x74, 0x2e, 0x70, 0x61, 0x74, 0x68, 0x20, 0x6f, 0x72, 0x20, 0x22, 0x22, 0x2c, 0x20, 0x22, 0x5e, 0x5b, 0x2f, 0x5c, 0x5c, 0x5d, 0x22, 0x2c, 0x20, 0x22, 0x22, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x3d, 0x3d, 0x20, 0x22, 0x22, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x3d, 0x20, 0x6e, 0x69, 0x6c, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x20, 0x3d, 0x20, 0x73, 0x65, 0x6e, 0x64, 0x74, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x20, 0x6f, 0x72, 0x20, 0x22, 0x73, 0x74, 0x6f, 0x72, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x73, 0x65, 0x6e, 0x64, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x70, 0x6c, 0x79, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x70, 0x3a, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x28, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x2c, 0x20, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x2c, 0x20, 0x5f, 0x20, 0x3d, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x70, 0x3a, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x7b, 0x22, 0x32, 0x2e, 0x2e, 0x22, 0x2c, 0x20, 0x22, 0x31, 0x2e, 0x2e, 0x22, 0x7d, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x69, 0x66, 0x20, 0x74, 0x68, 0x65, 0x72, 0x65, 0x20, 0x69, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x61, 0x20, 0x70, 0x61, 0x73, 0x76, 0x74, 0x20, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x72, 0x65, 0x20, 0x69, 0x73, 0x20, 0x61, 0x20, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x77, 0x65, 0x20, 0x61, 0x6c, 0x72, 0x65, 0x61, 0x64, 0x79, 0x20, 0x73, 0x65, 0x6e, 0x74, 0x20, 0x61, 0x20, 0x50, 0x4f, 0x52, 0x54, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x70, 0x61, 0x73, 0x76, 0x74, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x3a, 0x70, 0x6f, 0x72, 0x74, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x28, 0x29, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x67, 0x65, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x69, 0x6e, 0x6b, 0x2c, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x73, 0x74, 0x65, 0x70, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x73, 0x74, 0x65, 0x70, 0x20, 0x3d, 0x20, 0x73, 0x65, 0x6e, 0x64, 0x74, 0x2e, 0x73, 0x74, 0x65, 0x70, 0x20, 0x6f, 0x72, 0x20, 0x6c, 0x74, 0x6e, 0x31, 0x32, 0x2e, 0x70, 0x75, 0x6d, 0x70, 0x2e, 0x73, 0x74, 0x65, 0x70, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x72, 0x65, 0x61, 0x64, 0x74, 0x20, 0x3d, 0x20, 0x7b, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x70, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x74, 0x65, 0x70, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x73, 0x72, 0x63, 0x2c, 0x20, 0x73, 0x6e, 0x6b, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x20, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x20, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x77, 0x68, 0x69, 0x6c, 0x65, 0x20, 0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x72, 0x65, 0x61, 0x64, 0x79, 0x74, 0x20, 0x3d, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x28, 0x72, 0x65, 0x61, 0x64, 0x74, 0x2c, 0x20, 0x6e, 0x69, 0x6c, 0x2c, 0x20, 0x30, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x72, 0x65, 0x61, 0x64, 0x79, 0x74, 0x5b, 0x74, 0x70, 0x5d, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x3d, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x70, 0x3a, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x28, 0x22, 0x32, 0x2e, 0x2e, 0x22, 0x29, 0x29, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x73, 0x74, 0x65, 0x70, 0x28, 0x73, 0x72, 0x63, 0x2c, 0x20, 0x73, 0x6e, 0x6b, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x73, 0x69, 0x6e, 0x6b, 0x20, 0x3d, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x73, 0x69, 0x6e, 0x6b, 0x28, 0x22, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x2d, 0x77, 0x68, 0x65, 0x6e, 0x2d, 0x64, 0x6f, 0x6e, 0x65, 0x22, 0x2c, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x20, 0x61, 0x6c, 0x6c, 0x20, 0x64, 0x61, 0x74, 0x61, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x20, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x6c, 0x74, 0x6e, 0x31, 0x32, 0x2e, 0x70, 0x75, 0x6d, 0x70, 0x2e, 0x61, 0x6c, 0x6c, 0x28, 0x73, 0x65, 0x6e, 0x64, 0x74, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2c, 0x20, 0x73, 0x69, 0x6e, 0x6b, 0x2c, 0x20, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x74, 0x65, 0x70, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x66, 0x69, 0x6e, 0x64, 0x28, 0x63, 0x6f, 0x64, 0x65, 0x2c, 0x20, 0x22, 0x31, 0x2e, 0x2e, 0x22, 0x29, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x70, 0x3a, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x28, 0x22, 0x32, 0x2e, 0x2e, 0x22, 0x29, 0x29, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x64, 0x6f, 0x6e, 0x65, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x64, 0x61, 0x74, 0x61, 0x20, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x3a, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x66, 0x69, 0x6e, 0x64, 0x20, 0x6f, 0x75, 0x74, 0x20, 0x68, 0x6f, 0x77, 0x20, 0x6d, 0x61, 0x6e, 0x79, 0x20, 0x62, 0x79, 0x74, 0x65, 0x73, 0x20, 0x77, 0x65, 0x72, 0x65, 0x20, 0x73, 0x65, 0x6e, 0x74, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x73, 0x65, 0x6e, 0x74, 0x20, 0x3d, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x73, 0x6b, 0x69, 0x70, 0x28, 0x31, 0x2c, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x3a, 0x67, 0x65, 0x74, 0x73, 0x74, 0x61, 0x74, 0x73, 0x28, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x20, 0x3d, 0x20, 0x6e, 0x69, 0x6c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x73, 0x65, 0x6e, 0x74, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x74, 0x2e, 0x5f, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x3a, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x28, 0x72, 0x65, 0x63, 0x76, 0x74, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x70, 0x61, 0x73, 0x76, 0x74, 0x20, 0x6f, 0x72, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2c, 0x20, 0x22, 0x6e, 0x65, 0x65, 0x64, 0x20, 0x70, 0x6f, 0x72, 0x74, 0x20, 0x6f, 0x72, 0x20, 0x70, 0x61, 0x73, 0x76, 0x20, 0x66, 0x69, 0x72, 0x73, 0x74, 0x22, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x70, 0x61, 0x73, 0x76, 0x74, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x3a, 0x70, 0x61, 0x73, 0x76, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x28, 0x29, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x3d, 0x20, 0x72, 0x65, 0x63, 0x76, 0x74, 0x2e, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x6f, 0x72, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x75, 0x72, 0x6c, 0x2e, 0x75, 0x6e, 0x65, 0x73, 0x63, 0x61, 0x70, 0x65, 0x28, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x67, 0x73, 0x75, 0x62, 0x28, 0x72, 0x65, 0x63, 0x76, 0x74, 0x2e, 0x70, 0x61, 0x74, 0x68, 0x20, 0x6f, 0x72, 0x20, 0x22, 0x22, 0x2c, 0x20, 0x22, 0x5e, 0x5b, 0x2f, 0x5c, 0x5c, 0x5d, 0x22, 0x2c, 0x20, 0x22, 0x22, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x3d, 0x3d, 0x20, 0x22, 0x22, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x3d, 0x20, 0x6e, 0x69, 0x6c, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x20, 0x3d, 0x20, 0x72, 0x65, 0x63, 0x76, 0x74, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x20, 0x6f, 0x72, 0x20, 0x22, 0x72, 0x65, 0x74, 0x72, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x70, 0x3a, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x28, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x2c, 0x20, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x2c, 0x72, 0x65, 0x70, 0x6c, 0x79, 0x20, 0x3d, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x70, 0x3a, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x7b, 0x22, 0x31, 0x2e, 0x2e, 0x22, 0x2c, 0x20, 0x22, 0x32, 0x2e, 0x2e, 0x22, 0x7d, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x3e, 0x3d, 0x20, 0x32, 0x30, 0x30, 0x29, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x28, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x3c, 0x3d, 0x20, 0x32, 0x39, 0x39, 0x29, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x63, 0x76, 0x74, 0x2e, 0x73, 0x69, 0x6e, 0x6b, 0x28, 0x72, 0x65, 0x70, 0x6c, 0x79, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x31, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x70, 0x61, 0x73, 0x76, 0x74, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x3a, 0x70, 0x6f, 0x72, 0x74, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x28, 0x29, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x3d, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x28, 0x22, 0x75, 0x6e, 0x74, 0x69, 0x6c, 0x2d, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x22, 0x2c, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x73, 0x74, 0x65, 0x70, 0x20, 0x3d, 0x20, 0x72, 0x65, 0x63, 0x76, 0x74, 0x2e, 0x73, 0x74, 0x65, 0x70, 0x20, 0x6f, 0x72, 0x20, 0x6c, 0x74, 0x6e, 0x31, 0x32, 0x2e, 0x70, 0x75, 0x6d, 0x70, 0x2e, 0x73, 0x74, 0x65, 0x70, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x6c, 0x74, 0x6e, 0x31, 0x32, 0x2e, 0x70, 0x75, 0x6d, 0x70, 0x2e, 0x61, 0x6c, 0x6c, 0x28, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2c, 0x20, 0x72, 0x65, 0x63, 0x76, 0x74, 0x2e, 0x73, 0x69, 0x6e, 0x6b, 0x2c, 0x20, 0x73, 0x74, 0x65, 0x70, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x66, 0x69, 0x6e, 0x64, 0x28, 0x63, 0x6f, 0x64, 0x65, 0x2c, 0x20, 0x22, 0x31, 0x2e, 0x2e, 0x22, 0x29, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x70, 0x3a, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x28, 0x22, 0x32, 0x2e, 0x2e, 0x22, 0x29, 0x29, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x3a, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x20, 0x3d, 0x20, 0x6e, 0x69, 0x6c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x31, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x74, 0x2e, 0x5f, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x3a, 0x63, 0x77, 0x64, 0x28, 0x64, 0x69, 0x72, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x70, 0x3a, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x28, 0x22, 0x63, 0x77, 0x64, 0x22, 0x2c, 0x20, 0x64, 0x69, 0x72, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x70, 0x3a, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x28, 0x32, 0x35, 0x30, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x31, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x74, 0x2e, 0x5f, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x3a, 0x74, 0x79, 0x70, 0x65, 0x28, 0x74, 0x79, 0x70, 0x65, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x70, 0x3a, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x28, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x2c, 0x20, 0x74, 0x79, 0x70, 0x65, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x70, 0x3a, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x28, 0x32, 0x30, 0x30, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x31, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x74, 0x2e, 0x5f, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x3a, 0x67, 0x72, 0x65, 0x65, 0x74, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x3d, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x70, 0x3a, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x7b, 0x22, 0x31, 0x2e, 0x2e, 0x22, 0x2c, 0x20, 0x22, 0x32, 0x2e, 0x2e, 0x22, 0x7d, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x66, 0x69, 0x6e, 0x64, 0x28, 0x63, 0x6f, 0x64, 0x65, 0x2c, 0x20, 0x22, 0x31, 0x2e, 0x2e, 0x22, 0x29, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x70, 0x3a, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x28, 0x22, 0x32, 0x2e, 0x2e, 0x22, 0x29, 0x29, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x31, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x74, 0x2e, 0x5f, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x3a, 0x71, 0x75, 0x69, 0x74, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x70, 0x3a, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x28, 0x22, 0x71, 0x75, 0x69, 0x74, 0x22, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x70, 0x3a, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x28, 0x22, 0x32, 0x2e, 0x2e, 0x22, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x31, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x74, 0x2e, 0x5f, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x3a, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x3a, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x28, 0x29, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x3a, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x28, 0x29, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x70, 0x3a, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x28, 0x29, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x2d, 0x2d, 0x20, 0x48, 0x69, 0x67, 0x68, 0x20, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x20, 0x46, 0x54, 0x50, 0x20, 0x41, 0x50, 0x49, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x28, 0x74, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x74, 0x2e, 0x75, 0x72, 0x6c, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x75, 0x20, 0x3d, 0x20, 0x75, 0x72, 0x6c, 0x2e, 0x70, 0x61, 0x72, 0x73, 0x65, 0x28, 0x74, 0x2e, 0x75, 0x72, 0x6c, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x69, 0x2c, 0x76, 0x20, 0x69, 0x6e, 0x20, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x61, 0x69, 0x72, 0x73, 0x28, 0x74, 0x29, 0x20, 0x64, 0x6f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x75, 0x5b, 0x69, 0x5d, 0x20, 0x3d, 0x20, 0x76, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x75, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x74, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x70, 0x75, 0x74, 0x28, 0x70, 0x75, 0x74, 0x74, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x70, 0x75, 0x74, 0x74, 0x20, 0x3d, 0x20, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x28, 0x70, 0x75, 0x74, 0x74, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x70, 0x75, 0x74, 0x74, 0x2e, 0x68, 0x6f, 0x73, 0x74, 0x2c, 0x20, 0x22, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x66, 0x20, 0x3d, 0x20, 0x5f, 0x4d, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x28, 0x70, 0x75, 0x74, 0x74, 0x2e, 0x68, 0x6f, 0x73, 0x74, 0x2c, 0x20, 0x70, 0x75, 0x74, 0x74, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x2c, 0x20, 0x70, 0x75, 0x74, 0x74, 0x2e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x3a, 0x67, 0x72, 0x65, 0x65, 0x74, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x3a, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x28, 0x70, 0x75, 0x74, 0x74, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2c, 0x20, 0x70, 0x75, 0x74, 0x74, 0x2e, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x70, 0x75, 0x74, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x66, 0x3a, 0x74, 0x79, 0x70, 0x65, 0x28, 0x70, 0x75, 0x74, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x29, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x3a, 0x65, 0x70, 0x73, 0x76, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x73, 0x65, 0x6e, 0x74, 0x20, 0x3d, 0x20, 0x66, 0x3a, 0x73, 0x65, 0x6e, 0x64, 0x28, 0x70, 0x75, 0x74, 0x74, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x3a, 0x71, 0x75, 0x69, 0x74, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x3a, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x73, 0x65, 0x6e, 0x74, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x20, 0x3d, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x70, 0x61, 0x74, 0x68, 0x20, 0x3d, 0x20, 0x22, 0x2f, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x22, 0x66, 0x74, 0x70, 0x22, 0x0a, 0x7d, 0x0a, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x66, 0x6f, 0x72, 0x6d, 0x28, 0x75, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x74, 0x20, 0x3d, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x75, 0x72, 0x6c, 0x2e, 0x70, 0x61, 0x72, 0x73, 0x65, 0x28, 0x75, 0x2c, 0x20, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x74, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x20, 0x3d, 0x3d, 0x20, 0x22, 0x66, 0x74, 0x70, 0x22, 0x2c, 0x20, 0x22, 0x77, 0x72, 0x6f, 0x6e, 0x67, 0x20, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x20, 0x27, 0x22, 0x20, 0x2e, 0x2e, 0x20, 0x74, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x20, 0x2e, 0x2e, 0x20, 0x22, 0x27, 0x22, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x74, 0x2e, 0x68, 0x6f, 0x73, 0x74, 0x2c, 0x20, 0x22, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x70, 0x61, 0x74, 0x20, 0x3d, 0x20, 0x22, 0x5e, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x28, 0x2e, 0x29, 0x24, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x74, 0x2e, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x20, 0x3d, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x73, 0x6b, 0x69, 0x70, 0x28, 0x32, 0x2c, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x66, 0x69, 0x6e, 0x64, 0x28, 0x74, 0x2e, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2c, 0x20, 0x70, 0x61, 0x74, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x20, 0x3d, 0x3d, 0x20, 0x22, 0x61, 0x22, 0x20, 0x6f, 0x72, 0x20, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x20, 0x3d, 0x3d, 0x20, 0x22, 0x69, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x69, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x74, 0x79, 0x70, 0x65, 0x20, 0x27, 0x22, 0x20, 0x2e, 0x2e, 0x20, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x20, 0x2e, 0x2e, 0x20, 0x22, 0x27, 0x22, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x74, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x5f, 0x4d, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x3d, 0x20, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x66, 0x6f, 0x72, 0x6d, 0x0a, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x73, 0x70, 0x75, 0x74, 0x28, 0x75, 0x2c, 0x20, 0x62, 0x6f, 0x64, 0x79, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x70, 0x75, 0x74, 0x74, 0x20, 0x3d, 0x20, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x66, 0x6f, 0x72, 0x6d, 0x28, 0x75, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x70, 0x75, 0x74, 0x74, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x3d, 0x20, 0x6c, 0x74, 0x6e, 0x31, 0x32, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x28, 0x62, 0x6f, 0x64, 0x79, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x74, 0x70, 0x75, 0x74, 0x28, 0x70, 0x75, 0x74, 0x74, 0x29, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x5f, 0x4d, 0x2e, 0x70, 0x75, 0x74, 0x20, 0x3d, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x70, 0x75, 0x74, 0x74, 0x2c, 0x20, 0x62, 0x6f, 0x64, 0x79, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x28, 0x70, 0x75, 0x74, 0x74, 0x29, 0x20, 0x3d, 0x3d, 0x20, 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x73, 0x70, 0x75, 0x74, 0x28, 0x70, 0x75, 0x74, 0x74, 0x2c, 0x20, 0x62, 0x6f, 0x64, 0x79, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x74, 0x70, 0x75, 0x74, 0x28, 0x70, 0x75, 0x74, 0x74, 0x29, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x65, 0x6e, 0x64, 0x29, 0x0a, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x67, 0x65, 0x74, 0x28, 0x67, 0x65, 0x74, 0x74, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x67, 0x65, 0x74, 0x74, 0x20, 0x3d, 0x20, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x28, 0x67, 0x65, 0x74, 0x74, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x67, 0x65, 0x74, 0x74, 0x2e, 0x68, 0x6f, 0x73, 0x74, 0x2c, 0x20, 0x22, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x66, 0x20, 0x3d, 0x20, 0x5f, 0x4d, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x28, 0x67, 0x65, 0x74, 0x74, 0x2e, 0x68, 0x6f, 0x73, 0x74, 0x2c, 0x20, 0x67, 0x65, 0x74, 0x74, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x2c, 0x20, 0x67, 0x65, 0x74, 0x74, 0x2e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x3a, 0x67, 0x72, 0x65, 0x65, 0x74, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x3a, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x28, 0x67, 0x65, 0x74, 0x74, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2c, 0x20, 0x67, 0x65, 0x74, 0x74, 0x2e, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x67, 0x65, 0x74, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x66, 0x3a, 0x74, 0x79, 0x70, 0x65, 0x28, 0x67, 0x65, 0x74, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x29, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x3a, 0x65, 0x70, 0x73, 0x76, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x3a, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x28, 0x67, 0x65, 0x74, 0x74, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x3a, 0x71, 0x75, 0x69, 0x74, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x66, 0x3a, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x28, 0x29, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x73, 0x67, 0x65, 0x74, 0x28, 0x75, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x67, 0x65, 0x74, 0x74, 0x20, 0x3d, 0x20, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x66, 0x6f, 0x72, 0x6d, 0x28, 0x75, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x74, 0x20, 0x3d, 0x20, 0x7b, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x67, 0x65, 0x74, 0x74, 0x2e, 0x73, 0x69, 0x6e, 0x6b, 0x20, 0x3d, 0x20, 0x6c, 0x74, 0x6e, 0x31, 0x32, 0x2e, 0x73, 0x69, 0x6e, 0x6b, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x28, 0x74, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x74, 0x67, 0x65, 0x74, 0x28, 0x67, 0x65, 0x74, 0x74, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6e, 0x63, 0x61, 0x74, 0x28, 0x74, 0x29, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x5f, 0x4d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x20, 0x3d, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x63, 0x6d, 0x64, 0x74, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x63, 0x6d, 0x64, 0x74, 0x20, 0x3d, 0x20, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x28, 0x63, 0x6d, 0x64, 0x74, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x63, 0x6d, 0x64, 0x74, 0x2e, 0x68, 0x6f, 0x73, 0x74, 0x2c, 0x20, 0x22, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x63, 0x6d, 0x64, 0x74, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x2c, 0x20, 0x22, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x22, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x66, 0x20, 0x3d, 0x20, 0x5f, 0x4d, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x28, 0x63, 0x6d, 0x64, 0x74, 0x2e, 0x68, 0x6f, 0x73, 0x74, 0x2c, 0x20, 0x63, 0x6d, 0x64, 0x74, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x2c, 0x20, 0x63, 0x6d, 0x64, 0x74, 0x2e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x3a, 0x67, 0x72, 0x65, 0x65, 0x74, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x3a, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x28, 0x63, 0x6d, 0x64, 0x74, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2c, 0x20, 0x63, 0x6d, 0x64, 0x74, 0x2e, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x74, 0x79, 0x70, 0x65, 0x28, 0x63, 0x6d, 0x64, 0x74, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x29, 0x20, 0x3d, 0x3d, 0x20, 0x22, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x22, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x3d, 0x20, 0x63, 0x6d, 0x64, 0x74, 0x2e, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x6f, 0x72, 0x20, 0x7b, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x20, 0x3d, 0x20, 0x63, 0x6d, 0x64, 0x74, 0x2e, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x20, 0x6f, 0x72, 0x20, 0x7b, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x69, 0x2c, 0x63, 0x6d, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x69, 0x70, 0x61, 0x69, 0x72, 0x73, 0x28, 0x63, 0x6d, 0x64, 0x74, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x29, 0x20, 0x64, 0x6f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x66, 0x2e, 0x74, 0x70, 0x3a, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x28, 0x63, 0x6d, 0x64, 0x2c, 0x20, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x5b, 0x69, 0x5d, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5b, 0x69, 0x5d, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x66, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x66, 0x2e, 0x74, 0x70, 0x3a, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x28, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5b, 0x69, 0x5d, 0x29, 0x29, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x66, 0x2e, 0x74, 0x70, 0x3a, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x28, 0x63, 0x6d, 0x64, 0x74, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x2c, 0x20, 0x63, 0x6d, 0x64, 0x74, 0x2e, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x63, 0x6d, 0x64, 0x74, 0x2e, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x66, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x66, 0x2e, 0x74, 0x70, 0x3a, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x28, 0x63, 0x6d, 0x64, 0x74, 0x2e, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x29, 0x29, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x3a, 0x71, 0x75, 0x69, 0x74, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x66, 0x3a, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x28, 0x29, 0x0a, 0x65, 0x6e, 0x64, 0x29, 0x0a, 0x0a, 0x5f, 0x4d, 0x2e, 0x67, 0x65, 0x74, 0x20, 0x3d, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x67, 0x65, 0x74, 0x74, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x28, 0x67, 0x65, 0x74, 0x74, 0x29, 0x20, 0x3d, 0x3d, 0x20, 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x73, 0x67, 0x65, 0x74, 0x28, 0x67, 0x65, 0x74, 0x74, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x74, 0x67, 0x65, 0x74, 0x28, 0x67, 0x65, 0x74, 0x74, 0x29, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x65, 0x6e, 0x64, 0x29, 0x0a, 0x0a, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x4d, 0x0a, }; // [ftp.lua] } // love ================================================ FILE: src/libraries/luasocket/libluasocket/headers.lua ================================================ ----------------------------------------------------------------------------- -- Canonic header field capitalization -- LuaSocket toolkit. -- Author: Diego Nehab ----------------------------------------------------------------------------- local socket = require("socket") socket.headers = {} local _M = socket.headers _M.canonic = { ["accept"] = "Accept", ["accept-charset"] = "Accept-Charset", ["accept-encoding"] = "Accept-Encoding", ["accept-language"] = "Accept-Language", ["accept-ranges"] = "Accept-Ranges", ["action"] = "Action", ["alternate-recipient"] = "Alternate-Recipient", ["age"] = "Age", ["allow"] = "Allow", ["arrival-date"] = "Arrival-Date", ["authorization"] = "Authorization", ["bcc"] = "Bcc", ["cache-control"] = "Cache-Control", ["cc"] = "Cc", ["comments"] = "Comments", ["connection"] = "Connection", ["content-description"] = "Content-Description", ["content-disposition"] = "Content-Disposition", ["content-encoding"] = "Content-Encoding", ["content-id"] = "Content-ID", ["content-language"] = "Content-Language", ["content-length"] = "Content-Length", ["content-location"] = "Content-Location", ["content-md5"] = "Content-MD5", ["content-range"] = "Content-Range", ["content-transfer-encoding"] = "Content-Transfer-Encoding", ["content-type"] = "Content-Type", ["cookie"] = "Cookie", ["date"] = "Date", ["diagnostic-code"] = "Diagnostic-Code", ["dsn-gateway"] = "DSN-Gateway", ["etag"] = "ETag", ["expect"] = "Expect", ["expires"] = "Expires", ["final-log-id"] = "Final-Log-ID", ["final-recipient"] = "Final-Recipient", ["from"] = "From", ["host"] = "Host", ["if-match"] = "If-Match", ["if-modified-since"] = "If-Modified-Since", ["if-none-match"] = "If-None-Match", ["if-range"] = "If-Range", ["if-unmodified-since"] = "If-Unmodified-Since", ["in-reply-to"] = "In-Reply-To", ["keywords"] = "Keywords", ["last-attempt-date"] = "Last-Attempt-Date", ["last-modified"] = "Last-Modified", ["location"] = "Location", ["max-forwards"] = "Max-Forwards", ["message-id"] = "Message-ID", ["mime-version"] = "MIME-Version", ["original-envelope-id"] = "Original-Envelope-ID", ["original-recipient"] = "Original-Recipient", ["pragma"] = "Pragma", ["proxy-authenticate"] = "Proxy-Authenticate", ["proxy-authorization"] = "Proxy-Authorization", ["range"] = "Range", ["received"] = "Received", ["received-from-mta"] = "Received-From-MTA", ["references"] = "References", ["referer"] = "Referer", ["remote-mta"] = "Remote-MTA", ["reply-to"] = "Reply-To", ["reporting-mta"] = "Reporting-MTA", ["resent-bcc"] = "Resent-Bcc", ["resent-cc"] = "Resent-Cc", ["resent-date"] = "Resent-Date", ["resent-from"] = "Resent-From", ["resent-message-id"] = "Resent-Message-ID", ["resent-reply-to"] = "Resent-Reply-To", ["resent-sender"] = "Resent-Sender", ["resent-to"] = "Resent-To", ["retry-after"] = "Retry-After", ["return-path"] = "Return-Path", ["sender"] = "Sender", ["server"] = "Server", ["smtp-remote-recipient"] = "SMTP-Remote-Recipient", ["status"] = "Status", ["subject"] = "Subject", ["te"] = "TE", ["to"] = "To", ["trailer"] = "Trailer", ["transfer-encoding"] = "Transfer-Encoding", ["upgrade"] = "Upgrade", ["user-agent"] = "User-Agent", ["vary"] = "Vary", ["via"] = "Via", ["warning"] = "Warning", ["will-retry-until"] = "Will-Retry-Until", ["www-authenticate"] = "WWW-Authenticate", ["x-mailer"] = "X-Mailer", } return _M ================================================ FILE: src/libraries/luasocket/libluasocket/headers.lua.h ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ namespace love { // [headers.lua] const unsigned char headers_lua[] = { 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x2d, 0x2d, 0x20, 0x43, 0x61, 0x6e, 0x6f, 0x6e, 0x69, 0x63, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x63, 0x61, 0x70, 0x69, 0x74, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x0a, 0x2d, 0x2d, 0x20, 0x4c, 0x75, 0x61, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x20, 0x74, 0x6f, 0x6f, 0x6c, 0x6b, 0x69, 0x74, 0x2e, 0x0a, 0x2d, 0x2d, 0x20, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x3a, 0x20, 0x44, 0x69, 0x65, 0x67, 0x6f, 0x20, 0x4e, 0x65, 0x68, 0x61, 0x62, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x20, 0x3d, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x28, 0x22, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x22, 0x29, 0x0a, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x20, 0x3d, 0x20, 0x7b, 0x7d, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x5f, 0x4d, 0x20, 0x3d, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x0a, 0x0a, 0x5f, 0x4d, 0x2e, 0x63, 0x61, 0x6e, 0x6f, 0x6e, 0x69, 0x63, 0x20, 0x3d, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d, 0x63, 0x68, 0x61, 0x72, 0x73, 0x65, 0x74, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d, 0x43, 0x68, 0x61, 0x72, 0x73, 0x65, 0x74, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d, 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x61, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74, 0x65, 0x2d, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x41, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74, 0x65, 0x2d, 0x52, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x61, 0x67, 0x65, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x41, 0x67, 0x65, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x61, 0x72, 0x72, 0x69, 0x76, 0x61, 0x6c, 0x2d, 0x64, 0x61, 0x74, 0x65, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x41, 0x72, 0x72, 0x69, 0x76, 0x61, 0x6c, 0x2d, 0x44, 0x61, 0x74, 0x65, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x62, 0x63, 0x63, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x42, 0x63, 0x63, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x63, 0x61, 0x63, 0x68, 0x65, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x43, 0x61, 0x63, 0x68, 0x65, 0x2d, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x63, 0x63, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x43, 0x63, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x64, 0x69, 0x73, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x44, 0x69, 0x73, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x69, 0x64, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x49, 0x44, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x6d, 0x64, 0x35, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4d, 0x44, 0x35, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x2d, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x2d, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79, 0x70, 0x65, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x63, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x43, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x64, 0x61, 0x74, 0x65, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x44, 0x61, 0x74, 0x65, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x64, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x2d, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x44, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x2d, 0x43, 0x6f, 0x64, 0x65, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x64, 0x73, 0x6e, 0x2d, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x44, 0x53, 0x4e, 0x2d, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x65, 0x74, 0x61, 0x67, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x45, 0x54, 0x61, 0x67, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x45, 0x78, 0x70, 0x65, 0x63, 0x74, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x2d, 0x6c, 0x6f, 0x67, 0x2d, 0x69, 0x64, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x2d, 0x4c, 0x6f, 0x67, 0x2d, 0x49, 0x44, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x2d, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x2d, 0x52, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x66, 0x72, 0x6f, 0x6d, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x46, 0x72, 0x6f, 0x6d, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x68, 0x6f, 0x73, 0x74, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x48, 0x6f, 0x73, 0x74, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x69, 0x66, 0x2d, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x49, 0x66, 0x2d, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x69, 0x66, 0x2d, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x2d, 0x73, 0x69, 0x6e, 0x63, 0x65, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x49, 0x66, 0x2d, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x2d, 0x53, 0x69, 0x6e, 0x63, 0x65, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x69, 0x66, 0x2d, 0x6e, 0x6f, 0x6e, 0x65, 0x2d, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x49, 0x66, 0x2d, 0x4e, 0x6f, 0x6e, 0x65, 0x2d, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x69, 0x66, 0x2d, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x49, 0x66, 0x2d, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x69, 0x66, 0x2d, 0x75, 0x6e, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x2d, 0x73, 0x69, 0x6e, 0x63, 0x65, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x49, 0x66, 0x2d, 0x55, 0x6e, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x2d, 0x53, 0x69, 0x6e, 0x63, 0x65, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x69, 0x6e, 0x2d, 0x72, 0x65, 0x70, 0x6c, 0x79, 0x2d, 0x74, 0x6f, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x49, 0x6e, 0x2d, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x2d, 0x54, 0x6f, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x6b, 0x65, 0x79, 0x77, 0x6f, 0x72, 0x64, 0x73, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x4b, 0x65, 0x79, 0x77, 0x6f, 0x72, 0x64, 0x73, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x6c, 0x61, 0x73, 0x74, 0x2d, 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x2d, 0x64, 0x61, 0x74, 0x65, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x41, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x2d, 0x44, 0x61, 0x74, 0x65, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x6c, 0x61, 0x73, 0x74, 0x2d, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x6d, 0x61, 0x78, 0x2d, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x73, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x4d, 0x61, 0x78, 0x2d, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x73, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2d, 0x69, 0x64, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2d, 0x49, 0x44, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x6d, 0x69, 0x6d, 0x65, 0x2d, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x4d, 0x49, 0x4d, 0x45, 0x2d, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x2d, 0x65, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x2d, 0x69, 0x64, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x2d, 0x45, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x2d, 0x49, 0x44, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x2d, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x2d, 0x52, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x70, 0x72, 0x61, 0x67, 0x6d, 0x61, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x50, 0x72, 0x61, 0x67, 0x6d, 0x61, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2d, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x2d, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2d, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x2d, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x2d, 0x66, 0x72, 0x6f, 0x6d, 0x2d, 0x6d, 0x74, 0x61, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x2d, 0x46, 0x72, 0x6f, 0x6d, 0x2d, 0x4d, 0x54, 0x41, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x72, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x72, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x2d, 0x6d, 0x74, 0x61, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x2d, 0x4d, 0x54, 0x41, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x72, 0x65, 0x70, 0x6c, 0x79, 0x2d, 0x74, 0x6f, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x2d, 0x54, 0x6f, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x2d, 0x6d, 0x74, 0x61, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x2d, 0x4d, 0x54, 0x41, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x2d, 0x62, 0x63, 0x63, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x52, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x2d, 0x42, 0x63, 0x63, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x2d, 0x63, 0x63, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x52, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x2d, 0x43, 0x63, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x2d, 0x64, 0x61, 0x74, 0x65, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x52, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x2d, 0x44, 0x61, 0x74, 0x65, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x2d, 0x66, 0x72, 0x6f, 0x6d, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x52, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x2d, 0x46, 0x72, 0x6f, 0x6d, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x2d, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2d, 0x69, 0x64, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x52, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x2d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2d, 0x49, 0x44, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x2d, 0x72, 0x65, 0x70, 0x6c, 0x79, 0x2d, 0x74, 0x6f, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x52, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x2d, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x2d, 0x54, 0x6f, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x2d, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x52, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x2d, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x2d, 0x74, 0x6f, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x52, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x6f, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x72, 0x65, 0x74, 0x72, 0x79, 0x2d, 0x61, 0x66, 0x74, 0x65, 0x72, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x52, 0x65, 0x74, 0x72, 0x79, 0x2d, 0x41, 0x66, 0x74, 0x65, 0x72, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x2d, 0x70, 0x61, 0x74, 0x68, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x2d, 0x50, 0x61, 0x74, 0x68, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x73, 0x6d, 0x74, 0x70, 0x2d, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x2d, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x53, 0x4d, 0x54, 0x50, 0x2d, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x2d, 0x52, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x74, 0x65, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x54, 0x45, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x74, 0x6f, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x54, 0x6f, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x54, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x2d, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x2d, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x75, 0x73, 0x65, 0x72, 0x2d, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x55, 0x73, 0x65, 0x72, 0x2d, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x76, 0x61, 0x72, 0x79, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x56, 0x61, 0x72, 0x79, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x76, 0x69, 0x61, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x56, 0x69, 0x61, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x77, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x57, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x77, 0x69, 0x6c, 0x6c, 0x2d, 0x72, 0x65, 0x74, 0x72, 0x79, 0x2d, 0x75, 0x6e, 0x74, 0x69, 0x6c, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x57, 0x69, 0x6c, 0x6c, 0x2d, 0x52, 0x65, 0x74, 0x72, 0x79, 0x2d, 0x55, 0x6e, 0x74, 0x69, 0x6c, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x77, 0x77, 0x77, 0x2d, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x57, 0x57, 0x57, 0x2d, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x78, 0x2d, 0x6d, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x58, 0x2d, 0x4d, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x22, 0x2c, 0x0a, 0x7d, 0x0a, 0x0a, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x4d, 0x0a, }; // [headers.lua] } // love ================================================ FILE: src/libraries/luasocket/libluasocket/http.lua ================================================ ----------------------------------------------------------------------------- -- HTTP/1.1 client support for the Lua language. -- LuaSocket toolkit. -- Author: Diego Nehab ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- -- Declare module and import dependencies ------------------------------------------------------------------------------- local socket = require("socket") local url = require("socket.url") local ltn12 = require("ltn12") local mime = require("mime") local string = require("string") local headers = require("socket.headers") local base = _G local table = require("table") socket.http = {} local _M = socket.http ----------------------------------------------------------------------------- -- Program constants ----------------------------------------------------------------------------- -- connection timeout in seconds _M.TIMEOUT = 60 -- user agent field sent in request _M.USERAGENT = socket._VERSION -- supported schemes and their particulars local SCHEMES = { http = { port = 80 , create = function(t) return socket.tcp end } , https = { port = 443 , create = function(t) local https = assert( require("ssl.https"), 'LuaSocket: LuaSec not found') local tcp = assert( https.tcp, 'LuaSocket: Function tcp() not available from LuaSec') return tcp(t) end }} ----------------------------------------------------------------------------- -- Reads MIME headers from a connection, unfolding where needed ----------------------------------------------------------------------------- local function receiveheaders(sock, headers) local line, name, value, err headers = headers or {} -- get first line line, err = sock:receive() if err then return nil, err end -- headers go until a blank line is found while line ~= "" do -- get field-name and value name, value = socket.skip(2, string.find(line, "^(.-):%s*(.*)")) if not (name and value) then return nil, "malformed response headers" end name = string.lower(name) -- get next line (value might be folded) line, err = sock:receive() if err then return nil, err end -- unfold any folded values while string.find(line, "^%s") do value = value .. line line, err = sock:receive() if err then return nil, err end end -- save pair in table if headers[name] then headers[name] = headers[name] .. ", " .. value else headers[name] = value end end return headers end ----------------------------------------------------------------------------- -- Extra sources and sinks ----------------------------------------------------------------------------- socket.sourcet["http-chunked"] = function(sock, headers) return base.setmetatable({ getfd = function() return sock:getfd() end, dirty = function() return sock:dirty() end }, { __call = function() -- get chunk size, skip extension local line, err = sock:receive() if err then return nil, err end local size = base.tonumber(string.gsub(line, ";.*", ""), 16) if not size then return nil, "invalid chunk size" end -- was it the last chunk? if size > 0 then -- if not, get chunk and skip terminating CRLF local chunk, err, _ = sock:receive(size) if chunk then sock:receive() end return chunk, err else -- if it was, read trailers into headers table headers, err = receiveheaders(sock, headers) if not headers then return nil, err end end end }) end socket.sinkt["http-chunked"] = function(sock) return base.setmetatable({ getfd = function() return sock:getfd() end, dirty = function() return sock:dirty() end }, { __call = function(self, chunk, err) if not chunk then return sock:send("0\r\n\r\n") end local size = string.format("%X\r\n", string.len(chunk)) return sock:send(size .. chunk .. "\r\n") end }) end ----------------------------------------------------------------------------- -- Low level HTTP API ----------------------------------------------------------------------------- local metat = { __index = {} } function _M.open(host, port, create) -- create socket with user connect function, or with default local c = socket.try(create()) local h = base.setmetatable({ c = c }, metat) -- create finalized try h.try = socket.newtry(function() h:close() end) -- set timeout before connecting h.try(c:settimeout(_M.TIMEOUT)) h.try(c:connect(host, port)) -- here everything worked return h end function metat.__index:sendrequestline(method, uri) local reqline = string.format("%s %s HTTP/1.1\r\n", method or "GET", uri) return self.try(self.c:send(reqline)) end function metat.__index:sendheaders(tosend) local canonic = headers.canonic local h = "\r\n" for f, v in base.pairs(tosend) do h = (canonic[f] or f) .. ": " .. v .. "\r\n" .. h end self.try(self.c:send(h)) return 1 end function metat.__index:sendbody(headers, source, step) source = source or ltn12.source.empty() step = step or ltn12.pump.step -- if we don't know the size in advance, send chunked and hope for the best local mode = "http-chunked" if headers["content-length"] then mode = "keep-open" end return self.try(ltn12.pump.all(source, socket.sink(mode, self.c), step)) end function metat.__index:receivestatusline() local status,ec = self.try(self.c:receive(5)) -- identify HTTP/0.9 responses, which do not contain a status line -- this is just a heuristic, but is what the RFC recommends if status ~= "HTTP/" then if ec == "timeout" then return 408 end return nil, status end -- otherwise proceed reading a status line status = self.try(self.c:receive("*l", status)) local code = socket.skip(2, string.find(status, "HTTP/%d*%.%d* (%d%d%d)")) return self.try(base.tonumber(code), status) end function metat.__index:receiveheaders() return self.try(receiveheaders(self.c)) end function metat.__index:receivebody(headers, sink, step) sink = sink or ltn12.sink.null() step = step or ltn12.pump.step local length = base.tonumber(headers["content-length"]) local t = headers["transfer-encoding"] -- shortcut local mode = "default" -- connection close if t and t ~= "identity" then mode = "http-chunked" elseif base.tonumber(headers["content-length"]) then mode = "by-length" end return self.try(ltn12.pump.all(socket.source(mode, self.c, length), sink, step)) end function metat.__index:receive09body(status, sink, step) local source = ltn12.source.rewind(socket.source("until-closed", self.c)) source(status) return self.try(ltn12.pump.all(source, sink, step)) end function metat.__index:close() return self.c:close() end ----------------------------------------------------------------------------- -- High level HTTP API ----------------------------------------------------------------------------- local function adjusturi(reqt) local u = reqt -- if there is a proxy, we need the full url. otherwise, just a part. if not reqt.proxy and not _M.PROXY then u = { path = socket.try(reqt.path, "invalid path 'nil'"), params = reqt.params, query = reqt.query, fragment = reqt.fragment } end return url.build(u) end local function adjustproxy(reqt) local proxy = reqt.proxy or _M.PROXY if proxy then proxy = url.parse(proxy) proxy.port = proxy.port or 3128 proxy.create = SCHEMES[proxy.scheme].create(reqt) return proxy.host, proxy.port, proxy.create else return reqt.host, reqt.port, reqt.create end end local function adjustheaders(reqt) -- default headers local host = reqt.host local port = tostring(reqt.port) if port ~= tostring(SCHEMES[reqt.scheme].port) then host = host .. ':' .. port end local lower = { ["user-agent"] = _M.USERAGENT, ["host"] = host, ["connection"] = "close, TE", ["te"] = "trailers" } -- if we have authentication information, pass it along if reqt.user and reqt.password then lower["authorization"] = "Basic " .. (mime.b64(reqt.user .. ":" .. url.unescape(reqt.password))) end -- if we have proxy authentication information, pass it along local proxy = reqt.proxy or _M.PROXY if proxy then proxy = url.parse(proxy) if proxy.user and proxy.password then lower["proxy-authorization"] = "Basic " .. (mime.b64(proxy.user .. ":" .. proxy.password)) end end -- override with user headers for i,v in base.pairs(reqt.headers or lower) do lower[string.lower(i)] = v end return lower end -- default url parts local default = { path ="/" , scheme = "http" } local function adjustrequest(reqt) -- parse url if provided local nreqt = reqt.url and url.parse(reqt.url, default) or {} -- explicit components override url for i,v in base.pairs(reqt) do nreqt[i] = v end -- default to scheme particulars local schemedefs, host, port, method = SCHEMES[nreqt.scheme], nreqt.host, nreqt.port, nreqt.method if not nreqt.create then nreqt.create = schemedefs.create(nreqt) end if not (port and port ~= '') then nreqt.port = schemedefs.port end if not (method and method ~= '') then nreqt.method = 'GET' end if not (host and host ~= "") then socket.try(nil, "invalid host '" .. base.tostring(nreqt.host) .. "'") end -- compute uri if user hasn't overridden nreqt.uri = reqt.uri or adjusturi(nreqt) -- adjust headers in request nreqt.headers = adjustheaders(nreqt) if nreqt.source and not nreqt.headers["content-length"] and not nreqt.headers["transfer-encoding"] then nreqt.headers["transfer-encoding"] = "chunked" end -- ajust host and port if there is a proxy local proxy_create nreqt.host, nreqt.port, proxy_create = adjustproxy(nreqt) if not reqt.create then nreqt.create = proxy_create end return nreqt end local function shouldredirect(reqt, code, headers) local location = headers.location if not location then return false end location = string.gsub(location, "%s", "") if location == "" then return false end -- the RFC says the redirect URL may be relative location = url.absolute(reqt.url, location) local scheme = url.parse(location).scheme if scheme and (not SCHEMES[scheme]) then return false end -- avoid https downgrades if ('https' == reqt.scheme) and ('https' ~= scheme) then return false end return (reqt.redirect ~= false) and (code == 301 or code == 302 or code == 303 or code == 307) and (not reqt.method or reqt.method == "GET" or reqt.method == "HEAD") and ((false == reqt.maxredirects) or ((reqt.nredirects or 0) < (reqt.maxredirects or 5))) end local function shouldreceivebody(reqt, code) if reqt.method == "HEAD" then return nil end if code == 204 or code == 304 then return nil end if code >= 100 and code < 200 then return nil end return 1 end -- forward declarations local trequest, tredirect --[[local]] function tredirect(reqt, location) -- the RFC says the redirect URL may be relative local newurl = url.absolute(reqt.url, location) -- if switching schemes, reset port and create function if url.parse(newurl).scheme ~= reqt.scheme then reqt.port = nil reqt.create = nil end -- make new request local result, code, headers, status = trequest { url = newurl, source = reqt.source, sink = reqt.sink, headers = reqt.headers, proxy = reqt.proxy, maxredirects = reqt.maxredirects, nredirects = (reqt.nredirects or 0) + 1, create = reqt.create } -- pass location header back as a hint we redirected headers = headers or {} headers.location = headers.location or location return result, code, headers, status end --[[local]] function trequest(reqt) -- we loop until we get what we want, or -- until we are sure there is no way to get it local nreqt = adjustrequest(reqt) local h = _M.open(nreqt.host, nreqt.port, nreqt.create) -- send request line and headers h:sendrequestline(nreqt.method, nreqt.uri) h:sendheaders(nreqt.headers) -- if there is a body, send it if nreqt.source then h:sendbody(nreqt.headers, nreqt.source, nreqt.step) end local code, status = h:receivestatusline() -- if it is an HTTP/0.9 server, simply get the body and we are done if not code then h:receive09body(status, nreqt.sink, nreqt.step) return 1, 200 elseif code == 408 then return 1, code end local headers -- ignore any 100-continue messages while code == 100 do h:receiveheaders() code, status = h:receivestatusline() end headers = h:receiveheaders() -- at this point we should have a honest reply from the server -- we can't redirect if we already used the source, so we report the error if shouldredirect(nreqt, code, headers) and not nreqt.source then h:close() return tredirect(reqt, headers.location) end -- here we are finally done if shouldreceivebody(nreqt, code) then h:receivebody(headers, nreqt.sink, nreqt.step) end h:close() return 1, code, headers, status end -- turns an url and a body into a generic request local function genericform(u, b) local t = {} local reqt = { url = u, sink = ltn12.sink.table(t), target = t } if b then reqt.source = ltn12.source.string(b) reqt.headers = { ["content-length"] = string.len(b), ["content-type"] = "application/x-www-form-urlencoded" } reqt.method = "POST" end return reqt end _M.genericform = genericform local function srequest(u, b) local reqt = genericform(u, b) local _, code, headers, status = trequest(reqt) return table.concat(reqt.target), code, headers, status end _M.request = socket.protect(function(reqt, body) if base.type(reqt) == "string" then return srequest(reqt, body) else return trequest(reqt) end end) _M.schemes = SCHEMES return _M ================================================ FILE: src/libraries/luasocket/libluasocket/http.lua.h ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ namespace love { // [http.lua] const unsigned char http_lua[] = { 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x2d, 0x2d, 0x20, 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31, 0x20, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x20, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x4c, 0x75, 0x61, 0x20, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x2e, 0x0a, 0x2d, 0x2d, 0x20, 0x4c, 0x75, 0x61, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x20, 0x74, 0x6f, 0x6f, 0x6c, 0x6b, 0x69, 0x74, 0x2e, 0x0a, 0x2d, 0x2d, 0x20, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x3a, 0x20, 0x44, 0x69, 0x65, 0x67, 0x6f, 0x20, 0x4e, 0x65, 0x68, 0x61, 0x62, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x2d, 0x2d, 0x20, 0x44, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x20, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x20, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x20, 0x3d, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x28, 0x22, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x22, 0x29, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x75, 0x72, 0x6c, 0x20, 0x3d, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x28, 0x22, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x75, 0x72, 0x6c, 0x22, 0x29, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x6c, 0x74, 0x6e, 0x31, 0x32, 0x20, 0x3d, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x28, 0x22, 0x6c, 0x74, 0x6e, 0x31, 0x32, 0x22, 0x29, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x6d, 0x69, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x28, 0x22, 0x6d, 0x69, 0x6d, 0x65, 0x22, 0x29, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x3d, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x28, 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0x29, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x20, 0x3d, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x28, 0x22, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x22, 0x29, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x62, 0x61, 0x73, 0x65, 0x20, 0x3d, 0x20, 0x5f, 0x47, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x3d, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x28, 0x22, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x22, 0x29, 0x0a, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x20, 0x3d, 0x20, 0x7b, 0x7d, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x5f, 0x4d, 0x20, 0x3d, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x0a, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x2d, 0x2d, 0x20, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x73, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x2d, 0x2d, 0x20, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x20, 0x69, 0x6e, 0x20, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x0a, 0x5f, 0x4d, 0x2e, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x20, 0x3d, 0x20, 0x36, 0x30, 0x0a, 0x2d, 0x2d, 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x73, 0x65, 0x6e, 0x74, 0x20, 0x69, 0x6e, 0x20, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x0a, 0x5f, 0x4d, 0x2e, 0x55, 0x53, 0x45, 0x52, 0x41, 0x47, 0x45, 0x4e, 0x54, 0x20, 0x3d, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x5f, 0x56, 0x45, 0x52, 0x53, 0x49, 0x4f, 0x4e, 0x0a, 0x0a, 0x2d, 0x2d, 0x20, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x20, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x74, 0x68, 0x65, 0x69, 0x72, 0x20, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x75, 0x6c, 0x61, 0x72, 0x73, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x53, 0x43, 0x48, 0x45, 0x4d, 0x45, 0x53, 0x20, 0x3d, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x68, 0x74, 0x74, 0x70, 0x20, 0x3d, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x70, 0x6f, 0x72, 0x74, 0x20, 0x3d, 0x20, 0x38, 0x30, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2c, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x74, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x74, 0x63, 0x70, 0x20, 0x65, 0x6e, 0x64, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2c, 0x20, 0x68, 0x74, 0x74, 0x70, 0x73, 0x20, 0x3d, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x70, 0x6f, 0x72, 0x74, 0x20, 0x3d, 0x20, 0x34, 0x34, 0x33, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2c, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x74, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x68, 0x74, 0x74, 0x70, 0x73, 0x20, 0x3d, 0x20, 0x61, 0x73, 0x73, 0x65, 0x72, 0x74, 0x28, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x28, 0x22, 0x73, 0x73, 0x6c, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x73, 0x22, 0x29, 0x2c, 0x20, 0x27, 0x4c, 0x75, 0x61, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x3a, 0x20, 0x4c, 0x75, 0x61, 0x53, 0x65, 0x63, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x27, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x74, 0x63, 0x70, 0x20, 0x3d, 0x20, 0x61, 0x73, 0x73, 0x65, 0x72, 0x74, 0x28, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x68, 0x74, 0x74, 0x70, 0x73, 0x2e, 0x74, 0x63, 0x70, 0x2c, 0x20, 0x27, 0x4c, 0x75, 0x61, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x3a, 0x20, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x63, 0x70, 0x28, 0x29, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x4c, 0x75, 0x61, 0x53, 0x65, 0x63, 0x27, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x74, 0x63, 0x70, 0x28, 0x74, 0x29, 0x20, 0x65, 0x6e, 0x64, 0x20, 0x7d, 0x7d, 0x0a, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x2d, 0x2d, 0x20, 0x52, 0x65, 0x61, 0x64, 0x73, 0x20, 0x4d, 0x49, 0x4d, 0x45, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x61, 0x20, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x75, 0x6e, 0x66, 0x6f, 0x6c, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x77, 0x68, 0x65, 0x72, 0x65, 0x20, 0x6e, 0x65, 0x65, 0x64, 0x65, 0x64, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x28, 0x73, 0x6f, 0x63, 0x6b, 0x2c, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x6c, 0x69, 0x6e, 0x65, 0x2c, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2c, 0x20, 0x65, 0x72, 0x72, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x20, 0x3d, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x20, 0x6f, 0x72, 0x20, 0x7b, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x67, 0x65, 0x74, 0x20, 0x66, 0x69, 0x72, 0x73, 0x74, 0x20, 0x6c, 0x69, 0x6e, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x69, 0x6e, 0x65, 0x2c, 0x20, 0x65, 0x72, 0x72, 0x20, 0x3d, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x3a, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x65, 0x72, 0x72, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6e, 0x69, 0x6c, 0x2c, 0x20, 0x65, 0x72, 0x72, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x20, 0x67, 0x6f, 0x20, 0x75, 0x6e, 0x74, 0x69, 0x6c, 0x20, 0x61, 0x20, 0x62, 0x6c, 0x61, 0x6e, 0x6b, 0x20, 0x6c, 0x69, 0x6e, 0x65, 0x20, 0x69, 0x73, 0x20, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x77, 0x68, 0x69, 0x6c, 0x65, 0x20, 0x6c, 0x69, 0x6e, 0x65, 0x20, 0x7e, 0x3d, 0x20, 0x22, 0x22, 0x20, 0x64, 0x6f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x67, 0x65, 0x74, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x2d, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x3d, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x73, 0x6b, 0x69, 0x70, 0x28, 0x32, 0x2c, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x66, 0x69, 0x6e, 0x64, 0x28, 0x6c, 0x69, 0x6e, 0x65, 0x2c, 0x20, 0x22, 0x5e, 0x28, 0x2e, 0x2d, 0x29, 0x3a, 0x25, 0x73, 0x2a, 0x28, 0x2e, 0x2a, 0x29, 0x22, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x28, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x29, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6e, 0x69, 0x6c, 0x2c, 0x20, 0x22, 0x6d, 0x61, 0x6c, 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x64, 0x20, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x22, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x6c, 0x6f, 0x77, 0x65, 0x72, 0x28, 0x6e, 0x61, 0x6d, 0x65, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x67, 0x65, 0x74, 0x20, 0x6e, 0x65, 0x78, 0x74, 0x20, 0x6c, 0x69, 0x6e, 0x65, 0x20, 0x28, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x69, 0x67, 0x68, 0x74, 0x20, 0x62, 0x65, 0x20, 0x66, 0x6f, 0x6c, 0x64, 0x65, 0x64, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x69, 0x6e, 0x65, 0x2c, 0x20, 0x65, 0x72, 0x72, 0x20, 0x20, 0x3d, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x3a, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x65, 0x72, 0x72, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6e, 0x69, 0x6c, 0x2c, 0x20, 0x65, 0x72, 0x72, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x75, 0x6e, 0x66, 0x6f, 0x6c, 0x64, 0x20, 0x61, 0x6e, 0x79, 0x20, 0x66, 0x6f, 0x6c, 0x64, 0x65, 0x64, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x77, 0x68, 0x69, 0x6c, 0x65, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x66, 0x69, 0x6e, 0x64, 0x28, 0x6c, 0x69, 0x6e, 0x65, 0x2c, 0x20, 0x22, 0x5e, 0x25, 0x73, 0x22, 0x29, 0x20, 0x64, 0x6f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x3d, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x2e, 0x2e, 0x20, 0x6c, 0x69, 0x6e, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x69, 0x6e, 0x65, 0x2c, 0x20, 0x65, 0x72, 0x72, 0x20, 0x3d, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x3a, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x65, 0x72, 0x72, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6e, 0x69, 0x6c, 0x2c, 0x20, 0x65, 0x72, 0x72, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x73, 0x61, 0x76, 0x65, 0x20, 0x70, 0x61, 0x69, 0x72, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5b, 0x6e, 0x61, 0x6d, 0x65, 0x5d, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5b, 0x6e, 0x61, 0x6d, 0x65, 0x5d, 0x20, 0x3d, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5b, 0x6e, 0x61, 0x6d, 0x65, 0x5d, 0x20, 0x2e, 0x2e, 0x20, 0x22, 0x2c, 0x20, 0x22, 0x20, 0x2e, 0x2e, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5b, 0x6e, 0x61, 0x6d, 0x65, 0x5d, 0x20, 0x3d, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x2d, 0x2d, 0x20, 0x45, 0x78, 0x74, 0x72, 0x61, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x73, 0x69, 0x6e, 0x6b, 0x73, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x74, 0x5b, 0x22, 0x68, 0x74, 0x74, 0x70, 0x2d, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x65, 0x64, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x73, 0x6f, 0x63, 0x6b, 0x2c, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x65, 0x74, 0x6d, 0x65, 0x74, 0x61, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x28, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x67, 0x65, 0x74, 0x66, 0x64, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x3a, 0x67, 0x65, 0x74, 0x66, 0x64, 0x28, 0x29, 0x20, 0x65, 0x6e, 0x64, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x64, 0x69, 0x72, 0x74, 0x79, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x3a, 0x64, 0x69, 0x72, 0x74, 0x79, 0x28, 0x29, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5f, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x67, 0x65, 0x74, 0x20, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x20, 0x73, 0x69, 0x7a, 0x65, 0x2c, 0x20, 0x73, 0x6b, 0x69, 0x70, 0x20, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x6c, 0x69, 0x6e, 0x65, 0x2c, 0x20, 0x65, 0x72, 0x72, 0x20, 0x3d, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x3a, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x65, 0x72, 0x72, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6e, 0x69, 0x6c, 0x2c, 0x20, 0x65, 0x72, 0x72, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x73, 0x69, 0x7a, 0x65, 0x20, 0x3d, 0x20, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x74, 0x6f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x28, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x67, 0x73, 0x75, 0x62, 0x28, 0x6c, 0x69, 0x6e, 0x65, 0x2c, 0x20, 0x22, 0x3b, 0x2e, 0x2a, 0x22, 0x2c, 0x20, 0x22, 0x22, 0x29, 0x2c, 0x20, 0x31, 0x36, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x73, 0x69, 0x7a, 0x65, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6e, 0x69, 0x6c, 0x2c, 0x20, 0x22, 0x69, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x20, 0x73, 0x69, 0x7a, 0x65, 0x22, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x77, 0x61, 0x73, 0x20, 0x69, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6c, 0x61, 0x73, 0x74, 0x20, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x3f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x73, 0x69, 0x7a, 0x65, 0x20, 0x3e, 0x20, 0x30, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x2c, 0x20, 0x67, 0x65, 0x74, 0x20, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x73, 0x6b, 0x69, 0x70, 0x20, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x43, 0x52, 0x4c, 0x46, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x2c, 0x20, 0x65, 0x72, 0x72, 0x2c, 0x20, 0x5f, 0x20, 0x3d, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x3a, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x28, 0x73, 0x69, 0x7a, 0x65, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x3a, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x28, 0x29, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x2c, 0x20, 0x65, 0x72, 0x72, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x69, 0x66, 0x20, 0x69, 0x74, 0x20, 0x77, 0x61, 0x73, 0x2c, 0x20, 0x72, 0x65, 0x61, 0x64, 0x20, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x20, 0x69, 0x6e, 0x74, 0x6f, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x20, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2c, 0x20, 0x65, 0x72, 0x72, 0x20, 0x3d, 0x20, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x28, 0x73, 0x6f, 0x63, 0x6b, 0x2c, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6e, 0x69, 0x6c, 0x2c, 0x20, 0x65, 0x72, 0x72, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x29, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x73, 0x69, 0x6e, 0x6b, 0x74, 0x5b, 0x22, 0x68, 0x74, 0x74, 0x70, 0x2d, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x65, 0x64, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x73, 0x6f, 0x63, 0x6b, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x65, 0x74, 0x6d, 0x65, 0x74, 0x61, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x28, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x67, 0x65, 0x74, 0x66, 0x64, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x3a, 0x67, 0x65, 0x74, 0x66, 0x64, 0x28, 0x29, 0x20, 0x65, 0x6e, 0x64, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x64, 0x69, 0x72, 0x74, 0x79, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x3a, 0x64, 0x69, 0x72, 0x74, 0x79, 0x28, 0x29, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5f, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x73, 0x65, 0x6c, 0x66, 0x2c, 0x20, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x2c, 0x20, 0x65, 0x72, 0x72, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x3a, 0x73, 0x65, 0x6e, 0x64, 0x28, 0x22, 0x30, 0x5c, 0x72, 0x5c, 0x6e, 0x5c, 0x72, 0x5c, 0x6e, 0x22, 0x29, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x73, 0x69, 0x7a, 0x65, 0x20, 0x3d, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x22, 0x25, 0x58, 0x5c, 0x72, 0x5c, 0x6e, 0x22, 0x2c, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x6c, 0x65, 0x6e, 0x28, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x3a, 0x73, 0x65, 0x6e, 0x64, 0x28, 0x73, 0x69, 0x7a, 0x65, 0x20, 0x2e, 0x2e, 0x20, 0x20, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x20, 0x2e, 0x2e, 0x20, 0x22, 0x5c, 0x72, 0x5c, 0x6e, 0x22, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x29, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x2d, 0x2d, 0x20, 0x4c, 0x6f, 0x77, 0x20, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x20, 0x48, 0x54, 0x54, 0x50, 0x20, 0x41, 0x50, 0x49, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x74, 0x20, 0x3d, 0x20, 0x7b, 0x20, 0x5f, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x20, 0x3d, 0x20, 0x7b, 0x7d, 0x20, 0x7d, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x5f, 0x4d, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x28, 0x68, 0x6f, 0x73, 0x74, 0x2c, 0x20, 0x70, 0x6f, 0x72, 0x74, 0x2c, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x6f, 0x72, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x63, 0x20, 0x3d, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x28, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x68, 0x20, 0x3d, 0x20, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x65, 0x74, 0x6d, 0x65, 0x74, 0x61, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x28, 0x7b, 0x20, 0x63, 0x20, 0x3d, 0x20, 0x63, 0x20, 0x7d, 0x2c, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x74, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x20, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x20, 0x74, 0x72, 0x79, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x68, 0x2e, 0x74, 0x72, 0x79, 0x20, 0x3d, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x6e, 0x65, 0x77, 0x74, 0x72, 0x79, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x20, 0x68, 0x3a, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x28, 0x29, 0x20, 0x65, 0x6e, 0x64, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x73, 0x65, 0x74, 0x20, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x20, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x20, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6e, 0x67, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x68, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x63, 0x3a, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x28, 0x5f, 0x4d, 0x2e, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x68, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x63, 0x3a, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x28, 0x68, 0x6f, 0x73, 0x74, 0x2c, 0x20, 0x70, 0x6f, 0x72, 0x74, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x68, 0x65, 0x72, 0x65, 0x20, 0x65, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x68, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x74, 0x2e, 0x5f, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x3a, 0x73, 0x65, 0x6e, 0x64, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x6c, 0x69, 0x6e, 0x65, 0x28, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x2c, 0x20, 0x75, 0x72, 0x69, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x72, 0x65, 0x71, 0x6c, 0x69, 0x6e, 0x65, 0x20, 0x3d, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x22, 0x25, 0x73, 0x20, 0x25, 0x73, 0x20, 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31, 0x5c, 0x72, 0x5c, 0x6e, 0x22, 0x2c, 0x20, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x20, 0x6f, 0x72, 0x20, 0x22, 0x47, 0x45, 0x54, 0x22, 0x2c, 0x20, 0x75, 0x72, 0x69, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x63, 0x3a, 0x73, 0x65, 0x6e, 0x64, 0x28, 0x72, 0x65, 0x71, 0x6c, 0x69, 0x6e, 0x65, 0x29, 0x29, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x74, 0x2e, 0x5f, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x3a, 0x73, 0x65, 0x6e, 0x64, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x28, 0x74, 0x6f, 0x73, 0x65, 0x6e, 0x64, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x63, 0x61, 0x6e, 0x6f, 0x6e, 0x69, 0x63, 0x20, 0x3d, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2e, 0x63, 0x61, 0x6e, 0x6f, 0x6e, 0x69, 0x63, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x68, 0x20, 0x3d, 0x20, 0x22, 0x5c, 0x72, 0x5c, 0x6e, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x66, 0x2c, 0x20, 0x76, 0x20, 0x69, 0x6e, 0x20, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x61, 0x69, 0x72, 0x73, 0x28, 0x74, 0x6f, 0x73, 0x65, 0x6e, 0x64, 0x29, 0x20, 0x64, 0x6f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x68, 0x20, 0x3d, 0x20, 0x28, 0x63, 0x61, 0x6e, 0x6f, 0x6e, 0x69, 0x63, 0x5b, 0x66, 0x5d, 0x20, 0x6f, 0x72, 0x20, 0x66, 0x29, 0x20, 0x2e, 0x2e, 0x20, 0x22, 0x3a, 0x20, 0x22, 0x20, 0x2e, 0x2e, 0x20, 0x76, 0x20, 0x2e, 0x2e, 0x20, 0x22, 0x5c, 0x72, 0x5c, 0x6e, 0x22, 0x20, 0x2e, 0x2e, 0x20, 0x68, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x63, 0x3a, 0x73, 0x65, 0x6e, 0x64, 0x28, 0x68, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x31, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x74, 0x2e, 0x5f, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x3a, 0x73, 0x65, 0x6e, 0x64, 0x62, 0x6f, 0x64, 0x79, 0x28, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2c, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2c, 0x20, 0x73, 0x74, 0x65, 0x70, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x3d, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x6f, 0x72, 0x20, 0x6c, 0x74, 0x6e, 0x31, 0x32, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x74, 0x65, 0x70, 0x20, 0x3d, 0x20, 0x73, 0x74, 0x65, 0x70, 0x20, 0x6f, 0x72, 0x20, 0x6c, 0x74, 0x6e, 0x31, 0x32, 0x2e, 0x70, 0x75, 0x6d, 0x70, 0x2e, 0x73, 0x74, 0x65, 0x70, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x69, 0x66, 0x20, 0x77, 0x65, 0x20, 0x64, 0x6f, 0x6e, 0x27, 0x74, 0x20, 0x6b, 0x6e, 0x6f, 0x77, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x69, 0x7a, 0x65, 0x20, 0x69, 0x6e, 0x20, 0x61, 0x64, 0x76, 0x61, 0x6e, 0x63, 0x65, 0x2c, 0x20, 0x73, 0x65, 0x6e, 0x64, 0x20, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x65, 0x64, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x68, 0x6f, 0x70, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x65, 0x73, 0x74, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x6d, 0x6f, 0x64, 0x65, 0x20, 0x3d, 0x20, 0x22, 0x68, 0x74, 0x74, 0x70, 0x2d, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x65, 0x64, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5b, 0x22, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0x5d, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x6d, 0x6f, 0x64, 0x65, 0x20, 0x3d, 0x20, 0x22, 0x6b, 0x65, 0x65, 0x70, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x22, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x6c, 0x74, 0x6e, 0x31, 0x32, 0x2e, 0x70, 0x75, 0x6d, 0x70, 0x2e, 0x61, 0x6c, 0x6c, 0x28, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2c, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x73, 0x69, 0x6e, 0x6b, 0x28, 0x6d, 0x6f, 0x64, 0x65, 0x2c, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x63, 0x29, 0x2c, 0x20, 0x73, 0x74, 0x65, 0x70, 0x29, 0x29, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x74, 0x2e, 0x5f, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x3a, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x6c, 0x69, 0x6e, 0x65, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2c, 0x65, 0x63, 0x20, 0x3d, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x63, 0x3a, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x28, 0x35, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x79, 0x20, 0x48, 0x54, 0x54, 0x50, 0x2f, 0x30, 0x2e, 0x39, 0x20, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x2c, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x64, 0x6f, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x20, 0x61, 0x20, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x20, 0x6c, 0x69, 0x6e, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, 0x6a, 0x75, 0x73, 0x74, 0x20, 0x61, 0x20, 0x68, 0x65, 0x75, 0x72, 0x69, 0x73, 0x74, 0x69, 0x63, 0x2c, 0x20, 0x62, 0x75, 0x74, 0x20, 0x69, 0x73, 0x20, 0x77, 0x68, 0x61, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x52, 0x46, 0x43, 0x20, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x64, 0x73, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x20, 0x7e, 0x3d, 0x20, 0x22, 0x48, 0x54, 0x54, 0x50, 0x2f, 0x22, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x65, 0x63, 0x20, 0x3d, 0x3d, 0x20, 0x22, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x22, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x34, 0x30, 0x38, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6e, 0x69, 0x6c, 0x2c, 0x20, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x77, 0x69, 0x73, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x65, 0x64, 0x20, 0x72, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x61, 0x20, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x20, 0x6c, 0x69, 0x6e, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x20, 0x3d, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x63, 0x3a, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x28, 0x22, 0x2a, 0x6c, 0x22, 0x2c, 0x20, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x3d, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x73, 0x6b, 0x69, 0x70, 0x28, 0x32, 0x2c, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x66, 0x69, 0x6e, 0x64, 0x28, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2c, 0x20, 0x22, 0x48, 0x54, 0x54, 0x50, 0x2f, 0x25, 0x64, 0x2a, 0x25, 0x2e, 0x25, 0x64, 0x2a, 0x20, 0x28, 0x25, 0x64, 0x25, 0x64, 0x25, 0x64, 0x29, 0x22, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x74, 0x6f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x28, 0x63, 0x6f, 0x64, 0x65, 0x29, 0x2c, 0x20, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x29, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x74, 0x2e, 0x5f, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x3a, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x28, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x63, 0x29, 0x29, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x74, 0x2e, 0x5f, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x3a, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x62, 0x6f, 0x64, 0x79, 0x28, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2c, 0x20, 0x73, 0x69, 0x6e, 0x6b, 0x2c, 0x20, 0x73, 0x74, 0x65, 0x70, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x69, 0x6e, 0x6b, 0x20, 0x3d, 0x20, 0x73, 0x69, 0x6e, 0x6b, 0x20, 0x6f, 0x72, 0x20, 0x6c, 0x74, 0x6e, 0x31, 0x32, 0x2e, 0x73, 0x69, 0x6e, 0x6b, 0x2e, 0x6e, 0x75, 0x6c, 0x6c, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x74, 0x65, 0x70, 0x20, 0x3d, 0x20, 0x73, 0x74, 0x65, 0x70, 0x20, 0x6f, 0x72, 0x20, 0x6c, 0x74, 0x6e, 0x31, 0x32, 0x2e, 0x70, 0x75, 0x6d, 0x70, 0x2e, 0x73, 0x74, 0x65, 0x70, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x20, 0x3d, 0x20, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x74, 0x6f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x28, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5b, 0x22, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0x5d, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x74, 0x20, 0x3d, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5b, 0x22, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x2d, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x22, 0x5d, 0x20, 0x2d, 0x2d, 0x20, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x6d, 0x6f, 0x64, 0x65, 0x20, 0x3d, 0x20, 0x22, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x22, 0x20, 0x2d, 0x2d, 0x20, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x74, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x74, 0x20, 0x7e, 0x3d, 0x20, 0x22, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x22, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x6d, 0x6f, 0x64, 0x65, 0x20, 0x3d, 0x20, 0x22, 0x68, 0x74, 0x74, 0x70, 0x2d, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x65, 0x64, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x69, 0x66, 0x20, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x74, 0x6f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x28, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5b, 0x22, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0x5d, 0x29, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x6d, 0x6f, 0x64, 0x65, 0x20, 0x3d, 0x20, 0x22, 0x62, 0x79, 0x2d, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x6c, 0x74, 0x6e, 0x31, 0x32, 0x2e, 0x70, 0x75, 0x6d, 0x70, 0x2e, 0x61, 0x6c, 0x6c, 0x28, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x28, 0x6d, 0x6f, 0x64, 0x65, 0x2c, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x63, 0x2c, 0x20, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x29, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x69, 0x6e, 0x6b, 0x2c, 0x20, 0x73, 0x74, 0x65, 0x70, 0x29, 0x29, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x74, 0x2e, 0x5f, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x3a, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x30, 0x39, 0x62, 0x6f, 0x64, 0x79, 0x28, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2c, 0x20, 0x73, 0x69, 0x6e, 0x6b, 0x2c, 0x20, 0x73, 0x74, 0x65, 0x70, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x3d, 0x20, 0x6c, 0x74, 0x6e, 0x31, 0x32, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x72, 0x65, 0x77, 0x69, 0x6e, 0x64, 0x28, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x28, 0x22, 0x75, 0x6e, 0x74, 0x69, 0x6c, 0x2d, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x22, 0x2c, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x63, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x28, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x6c, 0x74, 0x6e, 0x31, 0x32, 0x2e, 0x70, 0x75, 0x6d, 0x70, 0x2e, 0x61, 0x6c, 0x6c, 0x28, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2c, 0x20, 0x73, 0x69, 0x6e, 0x6b, 0x2c, 0x20, 0x73, 0x74, 0x65, 0x70, 0x29, 0x29, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x74, 0x2e, 0x5f, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x3a, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x63, 0x3a, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x28, 0x29, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x2d, 0x2d, 0x20, 0x48, 0x69, 0x67, 0x68, 0x20, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x20, 0x48, 0x54, 0x54, 0x50, 0x20, 0x41, 0x50, 0x49, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x61, 0x64, 0x6a, 0x75, 0x73, 0x74, 0x75, 0x72, 0x69, 0x28, 0x72, 0x65, 0x71, 0x74, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x75, 0x20, 0x3d, 0x20, 0x72, 0x65, 0x71, 0x74, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x69, 0x66, 0x20, 0x74, 0x68, 0x65, 0x72, 0x65, 0x20, 0x69, 0x73, 0x20, 0x61, 0x20, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2c, 0x20, 0x77, 0x65, 0x20, 0x6e, 0x65, 0x65, 0x64, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x75, 0x6c, 0x6c, 0x20, 0x75, 0x72, 0x6c, 0x2e, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x77, 0x69, 0x73, 0x65, 0x2c, 0x20, 0x6a, 0x75, 0x73, 0x74, 0x20, 0x61, 0x20, 0x70, 0x61, 0x72, 0x74, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x72, 0x65, 0x71, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x5f, 0x4d, 0x2e, 0x50, 0x52, 0x4f, 0x58, 0x59, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x75, 0x20, 0x3d, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x70, 0x61, 0x74, 0x68, 0x20, 0x3d, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x72, 0x65, 0x71, 0x74, 0x2e, 0x70, 0x61, 0x74, 0x68, 0x2c, 0x20, 0x22, 0x69, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x70, 0x61, 0x74, 0x68, 0x20, 0x27, 0x6e, 0x69, 0x6c, 0x27, 0x22, 0x29, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x20, 0x3d, 0x20, 0x72, 0x65, 0x71, 0x74, 0x2e, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x71, 0x75, 0x65, 0x72, 0x79, 0x20, 0x3d, 0x20, 0x72, 0x65, 0x71, 0x74, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x3d, 0x20, 0x72, 0x65, 0x71, 0x74, 0x2e, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x75, 0x72, 0x6c, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x28, 0x75, 0x29, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x61, 0x64, 0x6a, 0x75, 0x73, 0x74, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x28, 0x72, 0x65, 0x71, 0x74, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x20, 0x3d, 0x20, 0x72, 0x65, 0x71, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x20, 0x6f, 0x72, 0x20, 0x5f, 0x4d, 0x2e, 0x50, 0x52, 0x4f, 0x58, 0x59, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x20, 0x3d, 0x20, 0x75, 0x72, 0x6c, 0x2e, 0x70, 0x61, 0x72, 0x73, 0x65, 0x28, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x20, 0x3d, 0x20, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x20, 0x6f, 0x72, 0x20, 0x33, 0x31, 0x32, 0x38, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x20, 0x3d, 0x20, 0x53, 0x43, 0x48, 0x45, 0x4d, 0x45, 0x53, 0x5b, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x5d, 0x2e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x28, 0x72, 0x65, 0x71, 0x74, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x68, 0x6f, 0x73, 0x74, 0x2c, 0x20, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x2c, 0x20, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x72, 0x65, 0x71, 0x74, 0x2e, 0x68, 0x6f, 0x73, 0x74, 0x2c, 0x20, 0x72, 0x65, 0x71, 0x74, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x2c, 0x20, 0x72, 0x65, 0x71, 0x74, 0x2e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x61, 0x64, 0x6a, 0x75, 0x73, 0x74, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x28, 0x72, 0x65, 0x71, 0x74, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x68, 0x6f, 0x73, 0x74, 0x20, 0x3d, 0x20, 0x72, 0x65, 0x71, 0x74, 0x2e, 0x68, 0x6f, 0x73, 0x74, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x70, 0x6f, 0x72, 0x74, 0x20, 0x3d, 0x20, 0x74, 0x6f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x28, 0x72, 0x65, 0x71, 0x74, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x70, 0x6f, 0x72, 0x74, 0x20, 0x7e, 0x3d, 0x20, 0x74, 0x6f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x28, 0x53, 0x43, 0x48, 0x45, 0x4d, 0x45, 0x53, 0x5b, 0x72, 0x65, 0x71, 0x74, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x5d, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x29, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x68, 0x6f, 0x73, 0x74, 0x20, 0x3d, 0x20, 0x68, 0x6f, 0x73, 0x74, 0x20, 0x2e, 0x2e, 0x20, 0x27, 0x3a, 0x27, 0x20, 0x2e, 0x2e, 0x20, 0x70, 0x6f, 0x72, 0x74, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x6c, 0x6f, 0x77, 0x65, 0x72, 0x20, 0x3d, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x75, 0x73, 0x65, 0x72, 0x2d, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x5f, 0x4d, 0x2e, 0x55, 0x53, 0x45, 0x52, 0x41, 0x47, 0x45, 0x4e, 0x54, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x68, 0x6f, 0x73, 0x74, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x68, 0x6f, 0x73, 0x74, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x2c, 0x20, 0x54, 0x45, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x74, 0x65, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x69, 0x66, 0x20, 0x77, 0x65, 0x20, 0x68, 0x61, 0x76, 0x65, 0x20, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x70, 0x61, 0x73, 0x73, 0x20, 0x69, 0x74, 0x20, 0x61, 0x6c, 0x6f, 0x6e, 0x67, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x72, 0x65, 0x71, 0x74, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x72, 0x65, 0x71, 0x74, 0x2e, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x77, 0x65, 0x72, 0x5b, 0x22, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x5d, 0x20, 0x3d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x42, 0x61, 0x73, 0x69, 0x63, 0x20, 0x22, 0x20, 0x2e, 0x2e, 0x20, 0x20, 0x28, 0x6d, 0x69, 0x6d, 0x65, 0x2e, 0x62, 0x36, 0x34, 0x28, 0x72, 0x65, 0x71, 0x74, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x20, 0x2e, 0x2e, 0x20, 0x22, 0x3a, 0x22, 0x20, 0x2e, 0x2e, 0x0a, 0x09, 0x09, 0x75, 0x72, 0x6c, 0x2e, 0x75, 0x6e, 0x65, 0x73, 0x63, 0x61, 0x70, 0x65, 0x28, 0x72, 0x65, 0x71, 0x74, 0x2e, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x29, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x69, 0x66, 0x20, 0x77, 0x65, 0x20, 0x68, 0x61, 0x76, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x20, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x70, 0x61, 0x73, 0x73, 0x20, 0x69, 0x74, 0x20, 0x61, 0x6c, 0x6f, 0x6e, 0x67, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x20, 0x3d, 0x20, 0x72, 0x65, 0x71, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x20, 0x6f, 0x72, 0x20, 0x5f, 0x4d, 0x2e, 0x50, 0x52, 0x4f, 0x58, 0x59, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x20, 0x3d, 0x20, 0x75, 0x72, 0x6c, 0x2e, 0x70, 0x61, 0x72, 0x73, 0x65, 0x28, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x77, 0x65, 0x72, 0x5b, 0x22, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2d, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x5d, 0x20, 0x3d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x42, 0x61, 0x73, 0x69, 0x63, 0x20, 0x22, 0x20, 0x2e, 0x2e, 0x20, 0x20, 0x28, 0x6d, 0x69, 0x6d, 0x65, 0x2e, 0x62, 0x36, 0x34, 0x28, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x20, 0x2e, 0x2e, 0x20, 0x22, 0x3a, 0x22, 0x20, 0x2e, 0x2e, 0x20, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x69, 0x2c, 0x76, 0x20, 0x69, 0x6e, 0x20, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x61, 0x69, 0x72, 0x73, 0x28, 0x72, 0x65, 0x71, 0x74, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x20, 0x6f, 0x72, 0x20, 0x6c, 0x6f, 0x77, 0x65, 0x72, 0x29, 0x20, 0x64, 0x6f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x77, 0x65, 0x72, 0x5b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x6c, 0x6f, 0x77, 0x65, 0x72, 0x28, 0x69, 0x29, 0x5d, 0x20, 0x3d, 0x20, 0x76, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6c, 0x6f, 0x77, 0x65, 0x72, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x2d, 0x2d, 0x20, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x20, 0x75, 0x72, 0x6c, 0x20, 0x70, 0x61, 0x72, 0x74, 0x73, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x20, 0x3d, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x70, 0x61, 0x74, 0x68, 0x20, 0x3d, 0x22, 0x2f, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2c, 0x20, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x22, 0x68, 0x74, 0x74, 0x70, 0x22, 0x0a, 0x7d, 0x0a, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x61, 0x64, 0x6a, 0x75, 0x73, 0x74, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x28, 0x72, 0x65, 0x71, 0x74, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, 0x20, 0x75, 0x72, 0x6c, 0x20, 0x69, 0x66, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x6e, 0x72, 0x65, 0x71, 0x74, 0x20, 0x3d, 0x20, 0x72, 0x65, 0x71, 0x74, 0x2e, 0x75, 0x72, 0x6c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x75, 0x72, 0x6c, 0x2e, 0x70, 0x61, 0x72, 0x73, 0x65, 0x28, 0x72, 0x65, 0x71, 0x74, 0x2e, 0x75, 0x72, 0x6c, 0x2c, 0x20, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x29, 0x20, 0x6f, 0x72, 0x20, 0x7b, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x65, 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x20, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x20, 0x75, 0x72, 0x6c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x69, 0x2c, 0x76, 0x20, 0x69, 0x6e, 0x20, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x61, 0x69, 0x72, 0x73, 0x28, 0x72, 0x65, 0x71, 0x74, 0x29, 0x20, 0x64, 0x6f, 0x20, 0x6e, 0x72, 0x65, 0x71, 0x74, 0x5b, 0x69, 0x5d, 0x20, 0x3d, 0x20, 0x76, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x20, 0x74, 0x6f, 0x20, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x20, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x75, 0x6c, 0x61, 0x72, 0x73, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x64, 0x65, 0x66, 0x73, 0x2c, 0x20, 0x68, 0x6f, 0x73, 0x74, 0x2c, 0x20, 0x70, 0x6f, 0x72, 0x74, 0x2c, 0x20, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3d, 0x20, 0x53, 0x43, 0x48, 0x45, 0x4d, 0x45, 0x53, 0x5b, 0x6e, 0x72, 0x65, 0x71, 0x74, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x5d, 0x2c, 0x20, 0x6e, 0x72, 0x65, 0x71, 0x74, 0x2e, 0x68, 0x6f, 0x73, 0x74, 0x2c, 0x20, 0x6e, 0x72, 0x65, 0x71, 0x74, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x2c, 0x20, 0x6e, 0x72, 0x65, 0x71, 0x74, 0x2e, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x6e, 0x72, 0x65, 0x71, 0x74, 0x2e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x6e, 0x72, 0x65, 0x71, 0x74, 0x2e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x20, 0x3d, 0x20, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x64, 0x65, 0x66, 0x73, 0x2e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x28, 0x6e, 0x72, 0x65, 0x71, 0x74, 0x29, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x28, 0x70, 0x6f, 0x72, 0x74, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x70, 0x6f, 0x72, 0x74, 0x20, 0x7e, 0x3d, 0x20, 0x27, 0x27, 0x29, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x6e, 0x72, 0x65, 0x71, 0x74, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x20, 0x3d, 0x20, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x64, 0x65, 0x66, 0x73, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x28, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x20, 0x7e, 0x3d, 0x20, 0x27, 0x27, 0x29, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x6e, 0x72, 0x65, 0x71, 0x74, 0x2e, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x20, 0x3d, 0x20, 0x27, 0x47, 0x45, 0x54, 0x27, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x28, 0x68, 0x6f, 0x73, 0x74, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x68, 0x6f, 0x73, 0x74, 0x20, 0x7e, 0x3d, 0x20, 0x22, 0x22, 0x29, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x6e, 0x69, 0x6c, 0x2c, 0x20, 0x22, 0x69, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x68, 0x6f, 0x73, 0x74, 0x20, 0x27, 0x22, 0x20, 0x2e, 0x2e, 0x20, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x74, 0x6f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x28, 0x6e, 0x72, 0x65, 0x71, 0x74, 0x2e, 0x68, 0x6f, 0x73, 0x74, 0x29, 0x20, 0x2e, 0x2e, 0x20, 0x22, 0x27, 0x22, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x20, 0x75, 0x72, 0x69, 0x20, 0x69, 0x66, 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, 0x68, 0x61, 0x73, 0x6e, 0x27, 0x74, 0x20, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6e, 0x72, 0x65, 0x71, 0x74, 0x2e, 0x75, 0x72, 0x69, 0x20, 0x3d, 0x20, 0x72, 0x65, 0x71, 0x74, 0x2e, 0x75, 0x72, 0x69, 0x20, 0x6f, 0x72, 0x20, 0x61, 0x64, 0x6a, 0x75, 0x73, 0x74, 0x75, 0x72, 0x69, 0x28, 0x6e, 0x72, 0x65, 0x71, 0x74, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x61, 0x64, 0x6a, 0x75, 0x73, 0x74, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6e, 0x72, 0x65, 0x71, 0x74, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x20, 0x3d, 0x20, 0x61, 0x64, 0x6a, 0x75, 0x73, 0x74, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x28, 0x6e, 0x72, 0x65, 0x71, 0x74, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x72, 0x65, 0x71, 0x74, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x6e, 0x72, 0x65, 0x71, 0x74, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5b, 0x22, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0x5d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x6e, 0x72, 0x65, 0x71, 0x74, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5b, 0x22, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x2d, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x22, 0x5d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6e, 0x72, 0x65, 0x71, 0x74, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5b, 0x22, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x2d, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x65, 0x64, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x61, 0x6a, 0x75, 0x73, 0x74, 0x20, 0x68, 0x6f, 0x73, 0x74, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x70, 0x6f, 0x72, 0x74, 0x20, 0x69, 0x66, 0x20, 0x74, 0x68, 0x65, 0x72, 0x65, 0x20, 0x69, 0x73, 0x20, 0x61, 0x20, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6e, 0x72, 0x65, 0x71, 0x74, 0x2e, 0x68, 0x6f, 0x73, 0x74, 0x2c, 0x20, 0x6e, 0x72, 0x65, 0x71, 0x74, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x2c, 0x20, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x20, 0x3d, 0x20, 0x61, 0x64, 0x6a, 0x75, 0x73, 0x74, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x28, 0x6e, 0x72, 0x65, 0x71, 0x74, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x72, 0x65, 0x71, 0x74, 0x2e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x6e, 0x72, 0x65, 0x71, 0x74, 0x2e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x20, 0x3d, 0x20, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6e, 0x72, 0x65, 0x71, 0x74, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x28, 0x72, 0x65, 0x71, 0x74, 0x2c, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x2c, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2e, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x67, 0x73, 0x75, 0x62, 0x28, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x22, 0x25, 0x73, 0x22, 0x2c, 0x20, 0x22, 0x22, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x3d, 0x20, 0x22, 0x22, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x74, 0x68, 0x65, 0x20, 0x52, 0x46, 0x43, 0x20, 0x73, 0x61, 0x79, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x20, 0x55, 0x52, 0x4c, 0x20, 0x6d, 0x61, 0x79, 0x20, 0x62, 0x65, 0x20, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x75, 0x72, 0x6c, 0x2e, 0x61, 0x62, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x65, 0x28, 0x72, 0x65, 0x71, 0x74, 0x2e, 0x75, 0x72, 0x6c, 0x2c, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x75, 0x72, 0x6c, 0x2e, 0x70, 0x61, 0x72, 0x73, 0x65, 0x28, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x29, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x28, 0x6e, 0x6f, 0x74, 0x20, 0x53, 0x43, 0x48, 0x45, 0x4d, 0x45, 0x53, 0x5b, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x5d, 0x29, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x61, 0x76, 0x6f, 0x69, 0x64, 0x20, 0x68, 0x74, 0x74, 0x70, 0x73, 0x20, 0x64, 0x6f, 0x77, 0x6e, 0x67, 0x72, 0x61, 0x64, 0x65, 0x73, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x27, 0x68, 0x74, 0x74, 0x70, 0x73, 0x27, 0x20, 0x3d, 0x3d, 0x20, 0x72, 0x65, 0x71, 0x74, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x29, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x28, 0x27, 0x68, 0x74, 0x74, 0x70, 0x73, 0x27, 0x20, 0x7e, 0x3d, 0x20, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x29, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x28, 0x72, 0x65, 0x71, 0x74, 0x2e, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x20, 0x7e, 0x3d, 0x20, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x29, 0x20, 0x61, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x28, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x3d, 0x3d, 0x20, 0x33, 0x30, 0x31, 0x20, 0x6f, 0x72, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x3d, 0x3d, 0x20, 0x33, 0x30, 0x32, 0x20, 0x6f, 0x72, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x3d, 0x3d, 0x20, 0x33, 0x30, 0x33, 0x20, 0x6f, 0x72, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x3d, 0x3d, 0x20, 0x33, 0x30, 0x37, 0x29, 0x20, 0x61, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x28, 0x6e, 0x6f, 0x74, 0x20, 0x72, 0x65, 0x71, 0x74, 0x2e, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x20, 0x6f, 0x72, 0x20, 0x72, 0x65, 0x71, 0x74, 0x2e, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x20, 0x3d, 0x3d, 0x20, 0x22, 0x47, 0x45, 0x54, 0x22, 0x20, 0x6f, 0x72, 0x20, 0x72, 0x65, 0x71, 0x74, 0x2e, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x20, 0x3d, 0x3d, 0x20, 0x22, 0x48, 0x45, 0x41, 0x44, 0x22, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x28, 0x28, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x20, 0x3d, 0x3d, 0x20, 0x72, 0x65, 0x71, 0x74, 0x2e, 0x6d, 0x61, 0x78, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x73, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6f, 0x72, 0x20, 0x28, 0x28, 0x72, 0x65, 0x71, 0x74, 0x2e, 0x6e, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x73, 0x20, 0x6f, 0x72, 0x20, 0x30, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x20, 0x28, 0x72, 0x65, 0x71, 0x74, 0x2e, 0x6d, 0x61, 0x78, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x73, 0x20, 0x6f, 0x72, 0x20, 0x35, 0x29, 0x29, 0x29, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x62, 0x6f, 0x64, 0x79, 0x28, 0x72, 0x65, 0x71, 0x74, 0x2c, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x72, 0x65, 0x71, 0x74, 0x2e, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x20, 0x3d, 0x3d, 0x20, 0x22, 0x48, 0x45, 0x41, 0x44, 0x22, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6e, 0x69, 0x6c, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x3d, 0x3d, 0x20, 0x32, 0x30, 0x34, 0x20, 0x6f, 0x72, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x3d, 0x3d, 0x20, 0x33, 0x30, 0x34, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6e, 0x69, 0x6c, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x3e, 0x3d, 0x20, 0x31, 0x30, 0x30, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x3c, 0x20, 0x32, 0x30, 0x30, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6e, 0x69, 0x6c, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x31, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x2d, 0x2d, 0x20, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x20, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x74, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2c, 0x20, 0x74, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x0a, 0x0a, 0x2d, 0x2d, 0x5b, 0x5b, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5d, 0x5d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x28, 0x72, 0x65, 0x71, 0x74, 0x2c, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x74, 0x68, 0x65, 0x20, 0x52, 0x46, 0x43, 0x20, 0x73, 0x61, 0x79, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x20, 0x55, 0x52, 0x4c, 0x20, 0x6d, 0x61, 0x79, 0x20, 0x62, 0x65, 0x20, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x6e, 0x65, 0x77, 0x75, 0x72, 0x6c, 0x20, 0x3d, 0x20, 0x75, 0x72, 0x6c, 0x2e, 0x61, 0x62, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x65, 0x28, 0x72, 0x65, 0x71, 0x74, 0x2e, 0x75, 0x72, 0x6c, 0x2c, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x69, 0x66, 0x20, 0x73, 0x77, 0x69, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x20, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x73, 0x2c, 0x20, 0x72, 0x65, 0x73, 0x65, 0x74, 0x20, 0x70, 0x6f, 0x72, 0x74, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x75, 0x72, 0x6c, 0x2e, 0x70, 0x61, 0x72, 0x73, 0x65, 0x28, 0x6e, 0x65, 0x77, 0x75, 0x72, 0x6c, 0x29, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x20, 0x7e, 0x3d, 0x20, 0x72, 0x65, 0x71, 0x74, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x71, 0x74, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x20, 0x3d, 0x20, 0x6e, 0x69, 0x6c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x71, 0x74, 0x2e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x20, 0x3d, 0x20, 0x6e, 0x69, 0x6c, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x6d, 0x61, 0x6b, 0x65, 0x20, 0x6e, 0x65, 0x77, 0x20, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2c, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x2c, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2c, 0x20, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x20, 0x3d, 0x20, 0x74, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x75, 0x72, 0x6c, 0x20, 0x3d, 0x20, 0x6e, 0x65, 0x77, 0x75, 0x72, 0x6c, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x3d, 0x20, 0x72, 0x65, 0x71, 0x74, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x69, 0x6e, 0x6b, 0x20, 0x3d, 0x20, 0x72, 0x65, 0x71, 0x74, 0x2e, 0x73, 0x69, 0x6e, 0x6b, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x20, 0x3d, 0x20, 0x72, 0x65, 0x71, 0x74, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x20, 0x3d, 0x20, 0x72, 0x65, 0x71, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6d, 0x61, 0x78, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x73, 0x20, 0x3d, 0x20, 0x72, 0x65, 0x71, 0x74, 0x2e, 0x6d, 0x61, 0x78, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x73, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6e, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x73, 0x20, 0x3d, 0x20, 0x28, 0x72, 0x65, 0x71, 0x74, 0x2e, 0x6e, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x73, 0x20, 0x6f, 0x72, 0x20, 0x30, 0x29, 0x20, 0x2b, 0x20, 0x31, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x20, 0x3d, 0x20, 0x72, 0x65, 0x71, 0x74, 0x2e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x70, 0x61, 0x73, 0x73, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x20, 0x62, 0x61, 0x63, 0x6b, 0x20, 0x61, 0x73, 0x20, 0x61, 0x20, 0x68, 0x69, 0x6e, 0x74, 0x20, 0x77, 0x65, 0x20, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x65, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x20, 0x3d, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x20, 0x6f, 0x72, 0x20, 0x7b, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2e, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2e, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2c, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x2c, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2c, 0x20, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x2d, 0x2d, 0x5b, 0x5b, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5d, 0x5d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x28, 0x72, 0x65, 0x71, 0x74, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x77, 0x65, 0x20, 0x6c, 0x6f, 0x6f, 0x70, 0x20, 0x75, 0x6e, 0x74, 0x69, 0x6c, 0x20, 0x77, 0x65, 0x20, 0x67, 0x65, 0x74, 0x20, 0x77, 0x68, 0x61, 0x74, 0x20, 0x77, 0x65, 0x20, 0x77, 0x61, 0x6e, 0x74, 0x2c, 0x20, 0x6f, 0x72, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x75, 0x6e, 0x74, 0x69, 0x6c, 0x20, 0x77, 0x65, 0x20, 0x61, 0x72, 0x65, 0x20, 0x73, 0x75, 0x72, 0x65, 0x20, 0x74, 0x68, 0x65, 0x72, 0x65, 0x20, 0x69, 0x73, 0x20, 0x6e, 0x6f, 0x20, 0x77, 0x61, 0x79, 0x20, 0x74, 0x6f, 0x20, 0x67, 0x65, 0x74, 0x20, 0x69, 0x74, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x6e, 0x72, 0x65, 0x71, 0x74, 0x20, 0x3d, 0x20, 0x61, 0x64, 0x6a, 0x75, 0x73, 0x74, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x28, 0x72, 0x65, 0x71, 0x74, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x68, 0x20, 0x3d, 0x20, 0x5f, 0x4d, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x28, 0x6e, 0x72, 0x65, 0x71, 0x74, 0x2e, 0x68, 0x6f, 0x73, 0x74, 0x2c, 0x20, 0x6e, 0x72, 0x65, 0x71, 0x74, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x2c, 0x20, 0x6e, 0x72, 0x65, 0x71, 0x74, 0x2e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x73, 0x65, 0x6e, 0x64, 0x20, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x20, 0x6c, 0x69, 0x6e, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x68, 0x3a, 0x73, 0x65, 0x6e, 0x64, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x6c, 0x69, 0x6e, 0x65, 0x28, 0x6e, 0x72, 0x65, 0x71, 0x74, 0x2e, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x2c, 0x20, 0x6e, 0x72, 0x65, 0x71, 0x74, 0x2e, 0x75, 0x72, 0x69, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x68, 0x3a, 0x73, 0x65, 0x6e, 0x64, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x28, 0x6e, 0x72, 0x65, 0x71, 0x74, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x69, 0x66, 0x20, 0x74, 0x68, 0x65, 0x72, 0x65, 0x20, 0x69, 0x73, 0x20, 0x61, 0x20, 0x62, 0x6f, 0x64, 0x79, 0x2c, 0x20, 0x73, 0x65, 0x6e, 0x64, 0x20, 0x69, 0x74, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x72, 0x65, 0x71, 0x74, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x68, 0x3a, 0x73, 0x65, 0x6e, 0x64, 0x62, 0x6f, 0x64, 0x79, 0x28, 0x6e, 0x72, 0x65, 0x71, 0x74, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2c, 0x20, 0x6e, 0x72, 0x65, 0x71, 0x74, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2c, 0x20, 0x6e, 0x72, 0x65, 0x71, 0x74, 0x2e, 0x73, 0x74, 0x65, 0x70, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x2c, 0x20, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x20, 0x3d, 0x20, 0x68, 0x3a, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x6c, 0x69, 0x6e, 0x65, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x69, 0x66, 0x20, 0x69, 0x74, 0x20, 0x69, 0x73, 0x20, 0x61, 0x6e, 0x20, 0x48, 0x54, 0x54, 0x50, 0x2f, 0x30, 0x2e, 0x39, 0x20, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2c, 0x20, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x79, 0x20, 0x67, 0x65, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x6f, 0x64, 0x79, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x77, 0x65, 0x20, 0x61, 0x72, 0x65, 0x20, 0x64, 0x6f, 0x6e, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x68, 0x3a, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x30, 0x39, 0x62, 0x6f, 0x64, 0x79, 0x28, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2c, 0x20, 0x6e, 0x72, 0x65, 0x71, 0x74, 0x2e, 0x73, 0x69, 0x6e, 0x6b, 0x2c, 0x20, 0x6e, 0x72, 0x65, 0x71, 0x74, 0x2e, 0x73, 0x74, 0x65, 0x70, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x31, 0x2c, 0x20, 0x32, 0x30, 0x30, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x69, 0x66, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x3d, 0x3d, 0x20, 0x34, 0x30, 0x38, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x31, 0x2c, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x20, 0x61, 0x6e, 0x79, 0x20, 0x31, 0x30, 0x30, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x65, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x77, 0x68, 0x69, 0x6c, 0x65, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x3d, 0x3d, 0x20, 0x31, 0x30, 0x30, 0x20, 0x64, 0x6f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x68, 0x3a, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x2c, 0x20, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x20, 0x3d, 0x20, 0x68, 0x3a, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x6c, 0x69, 0x6e, 0x65, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x20, 0x3d, 0x20, 0x68, 0x3a, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x61, 0x74, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x20, 0x77, 0x65, 0x20, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x20, 0x68, 0x61, 0x76, 0x65, 0x20, 0x61, 0x20, 0x68, 0x6f, 0x6e, 0x65, 0x73, 0x74, 0x20, 0x72, 0x65, 0x70, 0x6c, 0x79, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x77, 0x65, 0x20, 0x63, 0x61, 0x6e, 0x27, 0x74, 0x20, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x20, 0x69, 0x66, 0x20, 0x77, 0x65, 0x20, 0x61, 0x6c, 0x72, 0x65, 0x61, 0x64, 0x79, 0x20, 0x75, 0x73, 0x65, 0x64, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2c, 0x20, 0x73, 0x6f, 0x20, 0x77, 0x65, 0x20, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x28, 0x6e, 0x72, 0x65, 0x71, 0x74, 0x2c, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x2c, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x29, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x6e, 0x72, 0x65, 0x71, 0x74, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x68, 0x3a, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x74, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x28, 0x72, 0x65, 0x71, 0x74, 0x2c, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2e, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x68, 0x65, 0x72, 0x65, 0x20, 0x77, 0x65, 0x20, 0x61, 0x72, 0x65, 0x20, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x6c, 0x79, 0x20, 0x64, 0x6f, 0x6e, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x62, 0x6f, 0x64, 0x79, 0x28, 0x6e, 0x72, 0x65, 0x71, 0x74, 0x2c, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x29, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x68, 0x3a, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x62, 0x6f, 0x64, 0x79, 0x28, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2c, 0x20, 0x6e, 0x72, 0x65, 0x71, 0x74, 0x2e, 0x73, 0x69, 0x6e, 0x6b, 0x2c, 0x20, 0x6e, 0x72, 0x65, 0x71, 0x74, 0x2e, 0x73, 0x74, 0x65, 0x70, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x68, 0x3a, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x31, 0x2c, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x2c, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2c, 0x20, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x2d, 0x2d, 0x20, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, 0x61, 0x6e, 0x20, 0x75, 0x72, 0x6c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x61, 0x20, 0x62, 0x6f, 0x64, 0x79, 0x20, 0x69, 0x6e, 0x74, 0x6f, 0x20, 0x61, 0x20, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x20, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x66, 0x6f, 0x72, 0x6d, 0x28, 0x75, 0x2c, 0x20, 0x62, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x74, 0x20, 0x3d, 0x20, 0x7b, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x72, 0x65, 0x71, 0x74, 0x20, 0x3d, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x75, 0x72, 0x6c, 0x20, 0x3d, 0x20, 0x75, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x69, 0x6e, 0x6b, 0x20, 0x3d, 0x20, 0x6c, 0x74, 0x6e, 0x31, 0x32, 0x2e, 0x73, 0x69, 0x6e, 0x6b, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x28, 0x74, 0x29, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x20, 0x3d, 0x20, 0x74, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x62, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x71, 0x74, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x3d, 0x20, 0x6c, 0x74, 0x6e, 0x31, 0x32, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x28, 0x62, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x71, 0x74, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x20, 0x3d, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x6c, 0x65, 0x6e, 0x28, 0x62, 0x29, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x22, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x77, 0x77, 0x77, 0x2d, 0x66, 0x6f, 0x72, 0x6d, 0x2d, 0x75, 0x72, 0x6c, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x71, 0x74, 0x2e, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x20, 0x3d, 0x20, 0x22, 0x50, 0x4f, 0x53, 0x54, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x72, 0x65, 0x71, 0x74, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x5f, 0x4d, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x3d, 0x20, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x66, 0x6f, 0x72, 0x6d, 0x0a, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x73, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x28, 0x75, 0x2c, 0x20, 0x62, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x72, 0x65, 0x71, 0x74, 0x20, 0x3d, 0x20, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x66, 0x6f, 0x72, 0x6d, 0x28, 0x75, 0x2c, 0x20, 0x62, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x5f, 0x2c, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x2c, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2c, 0x20, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x20, 0x3d, 0x20, 0x74, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x28, 0x72, 0x65, 0x71, 0x74, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6e, 0x63, 0x61, 0x74, 0x28, 0x72, 0x65, 0x71, 0x74, 0x2e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x29, 0x2c, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x2c, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2c, 0x20, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x5f, 0x4d, 0x2e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x20, 0x3d, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x72, 0x65, 0x71, 0x74, 0x2c, 0x20, 0x62, 0x6f, 0x64, 0x79, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x28, 0x72, 0x65, 0x71, 0x74, 0x29, 0x20, 0x3d, 0x3d, 0x20, 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x73, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x28, 0x72, 0x65, 0x71, 0x74, 0x2c, 0x20, 0x62, 0x6f, 0x64, 0x79, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x74, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x28, 0x72, 0x65, 0x71, 0x74, 0x29, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x65, 0x6e, 0x64, 0x29, 0x0a, 0x0a, 0x5f, 0x4d, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x73, 0x20, 0x3d, 0x20, 0x53, 0x43, 0x48, 0x45, 0x4d, 0x45, 0x53, 0x0a, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x4d, 0x0a, }; // [http.lua] } // love ================================================ FILE: src/libraries/luasocket/libluasocket/inet.c ================================================ /*=========================================================================*\ * Internet domain functions * LuaSocket toolkit \*=========================================================================*/ #include "luasocket.h" #include "inet.h" #include #include #include /*=========================================================================*\ * Internal function prototypes. \*=========================================================================*/ static int inet_global_toip(lua_State *L); static int inet_global_getaddrinfo(lua_State *L); static int inet_global_tohostname(lua_State *L); static int inet_global_getnameinfo(lua_State *L); static void inet_pushresolved(lua_State *L, struct hostent *hp); static int inet_global_gethostname(lua_State *L); /* DNS functions */ static luaL_Reg func[] = { { "toip", inet_global_toip}, { "getaddrinfo", inet_global_getaddrinfo}, { "tohostname", inet_global_tohostname}, { "getnameinfo", inet_global_getnameinfo}, { "gethostname", inet_global_gethostname}, { NULL, NULL} }; /*-------------------------------------------------------------------------*\ * Initializes module \*-------------------------------------------------------------------------*/ int inet_open(lua_State *L) { lua_pushstring(L, "dns"); lua_newtable(L); luaL_setfuncs(L, func, 0); lua_settable(L, -3); return 0; } /*=========================================================================*\ * Global Lua functions \*=========================================================================*/ /*-------------------------------------------------------------------------*\ * Returns all information provided by the resolver given a host name * or ip address \*-------------------------------------------------------------------------*/ static int inet_gethost(const char *address, struct hostent **hp) { struct in_addr addr; if (inet_aton(address, &addr)) return socket_gethostbyaddr((char *) &addr, sizeof(addr), hp); else return socket_gethostbyname(address, hp); } /*-------------------------------------------------------------------------*\ * Returns all information provided by the resolver given a host name * or ip address \*-------------------------------------------------------------------------*/ static int inet_global_tohostname(lua_State *L) { const char *address = luaL_checkstring(L, 1); struct hostent *hp = NULL; int err = inet_gethost(address, &hp); if (err != IO_DONE) { lua_pushnil(L); lua_pushstring(L, socket_hoststrerror(err)); return 2; } lua_pushstring(L, hp->h_name); inet_pushresolved(L, hp); return 2; } static int inet_global_getnameinfo(lua_State *L) { char hbuf[NI_MAXHOST]; char sbuf[NI_MAXSERV]; int i, ret; struct addrinfo hints; struct addrinfo *resolved, *iter; const char *host = luaL_optstring(L, 1, NULL); const char *serv = luaL_optstring(L, 2, NULL); if (!(host || serv)) luaL_error(L, "host and serv cannot be both nil"); memset(&hints, 0, sizeof(hints)); hints.ai_socktype = SOCK_STREAM; hints.ai_family = AF_UNSPEC; ret = getaddrinfo(host, serv, &hints, &resolved); if (ret != 0) { lua_pushnil(L); lua_pushstring(L, socket_gaistrerror(ret)); return 2; } lua_newtable(L); for (i = 1, iter = resolved; iter; i++, iter = iter->ai_next) { getnameinfo(iter->ai_addr, (socklen_t) iter->ai_addrlen, hbuf, host? (socklen_t) sizeof(hbuf): 0, sbuf, serv? (socklen_t) sizeof(sbuf): 0, 0); if (host) { lua_pushnumber(L, i); lua_pushstring(L, hbuf); lua_settable(L, -3); } } freeaddrinfo(resolved); if (serv) { lua_pushstring(L, sbuf); return 2; } else { return 1; } } /*-------------------------------------------------------------------------*\ * Returns all information provided by the resolver given a host name * or ip address \*-------------------------------------------------------------------------*/ static int inet_global_toip(lua_State *L) { const char *address = luaL_checkstring(L, 1); struct hostent *hp = NULL; int err = inet_gethost(address, &hp); if (err != IO_DONE) { lua_pushnil(L); lua_pushstring(L, socket_hoststrerror(err)); return 2; } lua_pushstring(L, inet_ntoa(*((struct in_addr *) hp->h_addr))); inet_pushresolved(L, hp); return 2; } int inet_optfamily(lua_State* L, int narg, const char* def) { static const char* optname[] = { "unspec", "inet", "inet6", NULL }; static int optvalue[] = { AF_UNSPEC, AF_INET, AF_INET6, 0 }; return optvalue[luaL_checkoption(L, narg, def, optname)]; } int inet_optsocktype(lua_State* L, int narg, const char* def) { static const char* optname[] = { "stream", "dgram", NULL }; static int optvalue[] = { SOCK_STREAM, SOCK_DGRAM, 0 }; return optvalue[luaL_checkoption(L, narg, def, optname)]; } static int inet_global_getaddrinfo(lua_State *L) { const char *hostname = luaL_checkstring(L, 1); struct addrinfo *iterator = NULL, *resolved = NULL; struct addrinfo hints; int i = 1, ret = 0; memset(&hints, 0, sizeof(hints)); hints.ai_socktype = SOCK_STREAM; hints.ai_family = AF_UNSPEC; ret = getaddrinfo(hostname, NULL, &hints, &resolved); if (ret != 0) { lua_pushnil(L); lua_pushstring(L, socket_gaistrerror(ret)); return 2; } lua_newtable(L); for (iterator = resolved; iterator; iterator = iterator->ai_next) { char hbuf[NI_MAXHOST]; ret = getnameinfo(iterator->ai_addr, (socklen_t) iterator->ai_addrlen, hbuf, (socklen_t) sizeof(hbuf), NULL, 0, NI_NUMERICHOST); if (ret){ freeaddrinfo(resolved); lua_pushnil(L); lua_pushstring(L, socket_gaistrerror(ret)); return 2; } lua_pushnumber(L, i); lua_newtable(L); switch (iterator->ai_family) { case AF_INET: lua_pushliteral(L, "family"); lua_pushliteral(L, "inet"); lua_settable(L, -3); break; case AF_INET6: lua_pushliteral(L, "family"); lua_pushliteral(L, "inet6"); lua_settable(L, -3); break; case AF_UNSPEC: lua_pushliteral(L, "family"); lua_pushliteral(L, "unspec"); lua_settable(L, -3); break; default: lua_pushliteral(L, "family"); lua_pushliteral(L, "unknown"); lua_settable(L, -3); break; } lua_pushliteral(L, "addr"); lua_pushstring(L, hbuf); lua_settable(L, -3); lua_settable(L, -3); i++; } freeaddrinfo(resolved); return 1; } /*-------------------------------------------------------------------------*\ * Gets the host name \*-------------------------------------------------------------------------*/ static int inet_global_gethostname(lua_State *L) { char name[257]; name[256] = '\0'; if (gethostname(name, 256) < 0) { lua_pushnil(L); lua_pushstring(L, socket_strerror(errno)); return 2; } else { lua_pushstring(L, name); return 1; } } /*=========================================================================*\ * Lua methods \*=========================================================================*/ /*-------------------------------------------------------------------------*\ * Retrieves socket peer name \*-------------------------------------------------------------------------*/ int inet_meth_getpeername(lua_State *L, p_socket ps, int family) { int err; struct sockaddr_storage peer; socklen_t peer_len = sizeof(peer); char name[INET6_ADDRSTRLEN]; char port[6]; /* 65535 = 5 bytes + 0 to terminate it */ if (getpeername(*ps, (SA *) &peer, &peer_len) < 0) { lua_pushnil(L); lua_pushstring(L, socket_strerror(errno)); return 2; } err = getnameinfo((struct sockaddr *) &peer, peer_len, name, INET6_ADDRSTRLEN, port, sizeof(port), NI_NUMERICHOST | NI_NUMERICSERV); if (err) { lua_pushnil(L); lua_pushstring(L, LUA_GAI_STRERROR(err)); return 2; } lua_pushstring(L, name); lua_pushinteger(L, (int) strtol(port, (char **) NULL, 10)); switch (family) { case AF_INET: lua_pushliteral(L, "inet"); break; case AF_INET6: lua_pushliteral(L, "inet6"); break; case AF_UNSPEC: lua_pushliteral(L, "unspec"); break; default: lua_pushliteral(L, "unknown"); break; } return 3; } /*-------------------------------------------------------------------------*\ * Retrieves socket local name \*-------------------------------------------------------------------------*/ int inet_meth_getsockname(lua_State *L, p_socket ps, int family) { int err; struct sockaddr_storage peer; socklen_t peer_len = sizeof(peer); char name[INET6_ADDRSTRLEN]; char port[6]; /* 65535 = 5 bytes + 0 to terminate it */ if (getsockname(*ps, (SA *) &peer, &peer_len) < 0) { lua_pushnil(L); lua_pushstring(L, socket_strerror(errno)); return 2; } err=getnameinfo((struct sockaddr *)&peer, peer_len, name, INET6_ADDRSTRLEN, port, 6, NI_NUMERICHOST | NI_NUMERICSERV); if (err) { lua_pushnil(L); lua_pushstring(L, LUA_GAI_STRERROR(err)); return 2; } lua_pushstring(L, name); lua_pushinteger(L, (int) strtol(port, (char **) NULL, 10)); switch (family) { case AF_INET: lua_pushliteral(L, "inet"); break; case AF_INET6: lua_pushliteral(L, "inet6"); break; case AF_UNSPEC: lua_pushliteral(L, "unspec"); break; default: lua_pushliteral(L, "unknown"); break; } return 3; } /*=========================================================================*\ * Internal functions \*=========================================================================*/ /*-------------------------------------------------------------------------*\ * Passes all resolver information to Lua as a table \*-------------------------------------------------------------------------*/ static void inet_pushresolved(lua_State *L, struct hostent *hp) { char **alias; struct in_addr **addr; int i, resolved; lua_newtable(L); resolved = lua_gettop(L); lua_pushstring(L, "name"); lua_pushstring(L, hp->h_name); lua_settable(L, resolved); lua_pushstring(L, "ip"); lua_pushstring(L, "alias"); i = 1; alias = hp->h_aliases; lua_newtable(L); if (alias) { while (*alias) { lua_pushnumber(L, i); lua_pushstring(L, *alias); lua_settable(L, -3); i++; alias++; } } lua_settable(L, resolved); i = 1; lua_newtable(L); addr = (struct in_addr **) hp->h_addr_list; if (addr) { while (*addr) { lua_pushnumber(L, i); lua_pushstring(L, inet_ntoa(**addr)); lua_settable(L, -3); i++; addr++; } } lua_settable(L, resolved); } /*-------------------------------------------------------------------------*\ * Tries to create a new inet socket \*-------------------------------------------------------------------------*/ const char *inet_trycreate(p_socket ps, int family, int type, int protocol) { const char *err = socket_strerror(socket_create(ps, family, type, protocol)); if (err == NULL && family == AF_INET6) { int yes = 1; setsockopt(*ps, IPPROTO_IPV6, IPV6_V6ONLY, (void *)&yes, sizeof(yes)); } return err; } /*-------------------------------------------------------------------------*\ * "Disconnects" a DGRAM socket \*-------------------------------------------------------------------------*/ const char *inet_trydisconnect(p_socket ps, int family, p_timeout tm) { switch (family) { case AF_INET: { struct sockaddr_in sin; memset((char *) &sin, 0, sizeof(sin)); sin.sin_family = AF_UNSPEC; sin.sin_addr.s_addr = INADDR_ANY; return socket_strerror(socket_connect(ps, (SA *) &sin, sizeof(sin), tm)); } case AF_INET6: { struct sockaddr_in6 sin6; struct in6_addr addrany = IN6ADDR_ANY_INIT; memset((char *) &sin6, 0, sizeof(sin6)); sin6.sin6_family = AF_UNSPEC; sin6.sin6_addr = addrany; return socket_strerror(socket_connect(ps, (SA *) &sin6, sizeof(sin6), tm)); } } return NULL; } /*-------------------------------------------------------------------------*\ * Tries to connect to remote address (address, port) \*-------------------------------------------------------------------------*/ const char *inet_tryconnect(p_socket ps, int *family, const char *address, const char *serv, p_timeout tm, struct addrinfo *connecthints) { struct addrinfo *iterator = NULL, *resolved = NULL; const char *err = NULL; int current_family = *family; /* try resolving */ err = socket_gaistrerror(getaddrinfo(address, serv, connecthints, &resolved)); if (err != NULL) { if (resolved) freeaddrinfo(resolved); return err; } for (iterator = resolved; iterator; iterator = iterator->ai_next) { timeout_markstart(tm); /* create new socket if necessary. if there was no * bind, we need to create one for every new family * that shows up while iterating. if there was a * bind, all families will be the same and we will * not enter this branch. */ if (current_family != iterator->ai_family || *ps == SOCKET_INVALID) { socket_destroy(ps); err = inet_trycreate(ps, iterator->ai_family, iterator->ai_socktype, iterator->ai_protocol); if (err) continue; current_family = iterator->ai_family; /* set non-blocking before connect */ socket_setnonblocking(ps); } /* try connecting to remote address */ err = socket_strerror(socket_connect(ps, (SA *) iterator->ai_addr, (socklen_t) iterator->ai_addrlen, tm)); /* if success or timeout is zero, break out of loop */ if (err == NULL || timeout_iszero(tm)) { *family = current_family; break; } } freeaddrinfo(resolved); /* here, if err is set, we failed */ return err; } /*-------------------------------------------------------------------------*\ * Tries to accept a socket \*-------------------------------------------------------------------------*/ const char *inet_tryaccept(p_socket server, int family, p_socket client, p_timeout tm) { socklen_t len; t_sockaddr_storage addr; switch (family) { case AF_INET6: len = sizeof(struct sockaddr_in6); break; case AF_INET: len = sizeof(struct sockaddr_in); break; default: len = sizeof(addr); break; } return socket_strerror(socket_accept(server, client, (SA *) &addr, &len, tm)); } /*-------------------------------------------------------------------------*\ * Tries to bind socket to (address, port) \*-------------------------------------------------------------------------*/ const char *inet_trybind(p_socket ps, int *family, const char *address, const char *serv, struct addrinfo *bindhints) { struct addrinfo *iterator = NULL, *resolved = NULL; const char *err = NULL; int current_family = *family; /* translate luasocket special values to C */ if (strcmp(address, "*") == 0) address = NULL; if (!serv) serv = "0"; /* try resolving */ err = socket_gaistrerror(getaddrinfo(address, serv, bindhints, &resolved)); if (err) { if (resolved) freeaddrinfo(resolved); return err; } /* iterate over resolved addresses until one is good */ for (iterator = resolved; iterator; iterator = iterator->ai_next) { if (current_family != iterator->ai_family || *ps == SOCKET_INVALID) { socket_destroy(ps); err = inet_trycreate(ps, iterator->ai_family, iterator->ai_socktype, iterator->ai_protocol); if (err) continue; current_family = iterator->ai_family; } /* try binding to local address */ err = socket_strerror(socket_bind(ps, (SA *) iterator->ai_addr, (socklen_t) iterator->ai_addrlen)); /* keep trying unless bind succeeded */ if (err == NULL) { *family = current_family; /* set to non-blocking after bind */ socket_setnonblocking(ps); break; } } /* cleanup and return error */ freeaddrinfo(resolved); /* here, if err is set, we failed */ return err; } /*-------------------------------------------------------------------------*\ * Some systems do not provide these so that we provide our own. \*-------------------------------------------------------------------------*/ #ifdef LUASOCKET_INET_ATON int inet_aton(const char *cp, struct in_addr *inp) { unsigned int a = 0, b = 0, c = 0, d = 0; int n = 0, r; unsigned long int addr = 0; r = sscanf(cp, "%u.%u.%u.%u%n", &a, &b, &c, &d, &n); if (r == 0 || n == 0) return 0; cp += n; if (*cp) return 0; if (a > 255 || b > 255 || c > 255 || d > 255) return 0; if (inp) { addr += a; addr <<= 8; addr += b; addr <<= 8; addr += c; addr <<= 8; addr += d; inp->s_addr = htonl(addr); } return 1; } #endif #ifdef LUASOCKET_INET_PTON int inet_pton(int af, const char *src, void *dst) { struct addrinfo hints, *res; int ret = 1; memset(&hints, 0, sizeof(struct addrinfo)); hints.ai_family = af; hints.ai_flags = AI_NUMERICHOST; if (getaddrinfo(src, NULL, &hints, &res) != 0) return -1; if (af == AF_INET) { struct sockaddr_in *in = (struct sockaddr_in *) res->ai_addr; memcpy(dst, &in->sin_addr, sizeof(in->sin_addr)); } else if (af == AF_INET6) { struct sockaddr_in6 *in = (struct sockaddr_in6 *) res->ai_addr; memcpy(dst, &in->sin6_addr, sizeof(in->sin6_addr)); } else { ret = -1; } freeaddrinfo(res); return ret; } #endif ================================================ FILE: src/libraries/luasocket/libluasocket/inet.h ================================================ #ifndef INET_H #define INET_H /*=========================================================================*\ * Internet domain functions * LuaSocket toolkit * * This module implements the creation and connection of internet domain * sockets, on top of the socket.h interface, and the interface of with the * resolver. * * The function inet_aton is provided for the platforms where it is not * available. The module also implements the interface of the internet * getpeername and getsockname functions as seen by Lua programs. * * The Lua functions toip and tohostname are also implemented here. \*=========================================================================*/ #include "luasocket.h" #include "socket.h" #include "timeout.h" #ifdef _WIN32 #define LUASOCKET_INET_ATON #endif #ifndef _WIN32 #pragma GCC visibility push(hidden) #endif int inet_open(lua_State *L); int inet_optfamily(lua_State* L, int narg, const char* def); int inet_optsocktype(lua_State* L, int narg, const char* def); int inet_meth_getpeername(lua_State *L, p_socket ps, int family); int inet_meth_getsockname(lua_State *L, p_socket ps, int family); const char *inet_trycreate(p_socket ps, int family, int type, int protocol); const char *inet_trydisconnect(p_socket ps, int family, p_timeout tm); const char *inet_tryconnect(p_socket ps, int *family, const char *address, const char *serv, p_timeout tm, struct addrinfo *connecthints); const char *inet_tryaccept(p_socket server, int family, p_socket client, p_timeout tm); const char *inet_trybind(p_socket ps, int *family, const char *address, const char *serv, struct addrinfo *bindhints); #ifdef LUASOCKET_INET_ATON int inet_aton(const char *cp, struct in_addr *inp); #endif #ifdef LUASOCKET_INET_PTON const char *inet_ntop(int af, const void *src, char *dst, socklen_t cnt); int inet_pton(int af, const char *src, void *dst); #endif #ifndef _WIN32 #pragma GCC visibility pop #endif #endif /* INET_H */ ================================================ FILE: src/libraries/luasocket/libluasocket/io.c ================================================ /*=========================================================================*\ * Input/Output abstraction * LuaSocket toolkit \*=========================================================================*/ #include "luasocket.h" #include "io.h" /*-------------------------------------------------------------------------*\ * Initializes C structure \*-------------------------------------------------------------------------*/ void io_init(p_io io, p_send send, p_recv recv, p_error error, void *ctx) { io->send = send; io->recv = recv; io->error = error; io->ctx = ctx; } /*-------------------------------------------------------------------------*\ * I/O error strings \*-------------------------------------------------------------------------*/ const char *io_strerror(int err) { switch (err) { case IO_DONE: return NULL; case IO_CLOSED: return "closed"; case IO_TIMEOUT: return "timeout"; default: return "unknown error"; } } ================================================ FILE: src/libraries/luasocket/libluasocket/io.h ================================================ #ifndef IO_H #define IO_H /*=========================================================================*\ * Input/Output abstraction * LuaSocket toolkit * * This module defines the interface that LuaSocket expects from the * transport layer for streamed input/output. The idea is that if any * transport implements this interface, then the buffer.c functions * automatically work on it. * * The module socket.h implements this interface, and thus the module tcp.h * is very simple. \*=========================================================================*/ #include "luasocket.h" #include "timeout.h" /* IO error codes */ enum { IO_DONE = 0, /* operation completed successfully */ IO_TIMEOUT = -1, /* operation timed out */ IO_CLOSED = -2, /* the connection has been closed */ IO_UNKNOWN = -3 }; /* interface to error message function */ typedef const char *(*p_error) ( void *ctx, /* context needed by send */ int err /* error code */ ); /* interface to send function */ typedef int (*p_send) ( void *ctx, /* context needed by send */ const char *data, /* pointer to buffer with data to send */ size_t count, /* number of bytes to send from buffer */ size_t *sent, /* number of bytes sent uppon return */ p_timeout tm /* timeout control */ ); /* interface to recv function */ typedef int (*p_recv) ( void *ctx, /* context needed by recv */ char *data, /* pointer to buffer where data will be writen */ size_t count, /* number of bytes to receive into buffer */ size_t *got, /* number of bytes received uppon return */ p_timeout tm /* timeout control */ ); /* IO driver definition */ typedef struct t_io_ { void *ctx; /* context needed by send/recv */ p_send send; /* send function pointer */ p_recv recv; /* receive function pointer */ p_error error; /* strerror function */ } t_io; typedef t_io *p_io; #ifndef _WIN32 #pragma GCC visibility push(hidden) #endif void io_init(p_io io, p_send send, p_recv recv, p_error error, void *ctx); const char *io_strerror(int err); #ifndef _WIN32 #pragma GCC visibility pop #endif #endif /* IO_H */ ================================================ FILE: src/libraries/luasocket/libluasocket/ltn12.lua ================================================ ----------------------------------------------------------------------------- -- LTN12 - Filters, sources, sinks and pumps. -- LuaSocket toolkit. -- Author: Diego Nehab ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- -- Declare module ----------------------------------------------------------------------------- local string = require("string") local table = require("table") local unpack = unpack or table.unpack local base = _G local select = select local _M = {} if module then -- heuristic for exporting a global package table ltn12 = _M -- luacheck: ignore end local filter,source,sink,pump = {},{},{},{} _M.filter = filter _M.source = source _M.sink = sink _M.pump = pump -- 2048 seems to be better in windows... _M.BLOCKSIZE = 2048 _M._VERSION = "LTN12 1.0.3" ----------------------------------------------------------------------------- -- Filter stuff ----------------------------------------------------------------------------- -- returns a high level filter that cycles a low-level filter function filter.cycle(low, ctx, extra) base.assert(low) return function(chunk) local ret ret, ctx = low(ctx, chunk, extra) return ret end end -- chains a bunch of filters together -- (thanks to Wim Couwenberg) function filter.chain(...) local arg = {...} local n = select('#',...) local top, index = 1, 1 local retry = "" return function(chunk) retry = chunk and retry while true do if index == top then chunk = arg[index](chunk) if chunk == "" or top == n then return chunk elseif chunk then index = index + 1 else top = top+1 index = top end else chunk = arg[index](chunk or "") if chunk == "" then index = index - 1 chunk = retry elseif chunk then if index == n then return chunk else index = index + 1 end else base.error("filter returned inappropriate nil") end end end end end ----------------------------------------------------------------------------- -- Source stuff ----------------------------------------------------------------------------- -- create an empty source local function empty() return nil end function source.empty() return empty end -- returns a source that just outputs an error function source.error(err) return function() return nil, err end end -- creates a file source function source.file(handle, io_err) if handle then return function() local chunk = handle:read(_M.BLOCKSIZE) if not chunk then handle:close() end return chunk end else return source.error(io_err or "unable to open file") end end -- turns a fancy source into a simple source function source.simplify(src) base.assert(src) return function() local chunk, err_or_new = src() src = err_or_new or src if not chunk then return nil, err_or_new else return chunk end end end -- creates string source function source.string(s) if s then local i = 1 return function() local chunk = string.sub(s, i, i+_M.BLOCKSIZE-1) i = i + _M.BLOCKSIZE if chunk ~= "" then return chunk else return nil end end else return source.empty() end end -- creates table source function source.table(t) base.assert('table' == type(t)) local i = 0 return function() i = i + 1 return t[i] end end -- creates rewindable source function source.rewind(src) base.assert(src) local t = {} return function(chunk) if not chunk then chunk = table.remove(t) if not chunk then return src() else return chunk end else table.insert(t, chunk) end end end -- chains a source with one or several filter(s) function source.chain(src, f, ...) if ... then f=filter.chain(f, ...) end base.assert(src and f) local last_in, last_out = "", "" local state = "feeding" local err return function() if not last_out then base.error('source is empty!', 2) end while true do if state == "feeding" then last_in, err = src() if err then return nil, err end last_out = f(last_in) if not last_out then if last_in then base.error('filter returned inappropriate nil') else return nil end elseif last_out ~= "" then state = "eating" if last_in then last_in = "" end return last_out end else last_out = f(last_in) if last_out == "" then if last_in == "" then state = "feeding" else base.error('filter returned ""') end elseif not last_out then if last_in then base.error('filter returned inappropriate nil') else return nil end else return last_out end end end end end -- creates a source that produces contents of several sources, one after the -- other, as if they were concatenated -- (thanks to Wim Couwenberg) function source.cat(...) local arg = {...} local src = table.remove(arg, 1) return function() while src do local chunk, err = src() if chunk then return chunk end if err then return nil, err end src = table.remove(arg, 1) end end end ----------------------------------------------------------------------------- -- Sink stuff ----------------------------------------------------------------------------- -- creates a sink that stores into a table function sink.table(t) t = t or {} local f = function(chunk, err) if chunk then table.insert(t, chunk) end return 1 end return f, t end -- turns a fancy sink into a simple sink function sink.simplify(snk) base.assert(snk) return function(chunk, err) local ret, err_or_new = snk(chunk, err) if not ret then return nil, err_or_new end snk = err_or_new or snk return 1 end end -- creates a file sink function sink.file(handle, io_err) if handle then return function(chunk, err) if not chunk then handle:close() return 1 else return handle:write(chunk) end end else return sink.error(io_err or "unable to open file") end end -- creates a sink that discards data local function null() return 1 end function sink.null() return null end -- creates a sink that just returns an error function sink.error(err) return function() return nil, err end end -- chains a sink with one or several filter(s) function sink.chain(f, snk, ...) if ... then local args = { f, snk, ... } snk = table.remove(args, #args) f = filter.chain(unpack(args)) end base.assert(f and snk) return function(chunk, err) if chunk ~= "" then local filtered = f(chunk) local done = chunk and "" while true do local ret, snkerr = snk(filtered, err) if not ret then return nil, snkerr end if filtered == done then return 1 end filtered = f(done) end else return 1 end end end ----------------------------------------------------------------------------- -- Pump stuff ----------------------------------------------------------------------------- -- pumps one chunk from the source to the sink function pump.step(src, snk) local chunk, src_err = src() local ret, snk_err = snk(chunk, src_err) if chunk and ret then return 1 else return nil, src_err or snk_err end end -- pumps all data from a source to a sink, using a step function function pump.all(src, snk, step) base.assert(src and snk) step = step or pump.step while true do local ret, err = step(src, snk) if not ret then if err then return nil, err else return 1 end end end end return _M ================================================ FILE: src/libraries/luasocket/libluasocket/ltn12.lua.h ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ namespace love { // [ltn12.lua] const unsigned char ltn12_lua[] = { 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x2d, 0x2d, 0x20, 0x4c, 0x54, 0x4e, 0x31, 0x32, 0x20, 0x2d, 0x20, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2c, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2c, 0x20, 0x73, 0x69, 0x6e, 0x6b, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x70, 0x75, 0x6d, 0x70, 0x73, 0x2e, 0x0a, 0x2d, 0x2d, 0x20, 0x4c, 0x75, 0x61, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x20, 0x74, 0x6f, 0x6f, 0x6c, 0x6b, 0x69, 0x74, 0x2e, 0x0a, 0x2d, 0x2d, 0x20, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x3a, 0x20, 0x44, 0x69, 0x65, 0x67, 0x6f, 0x20, 0x4e, 0x65, 0x68, 0x61, 0x62, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x2d, 0x2d, 0x20, 0x44, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x20, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x3d, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x28, 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0x29, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x3d, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x28, 0x22, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x22, 0x29, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x75, 0x6e, 0x70, 0x61, 0x63, 0x6b, 0x20, 0x3d, 0x20, 0x75, 0x6e, 0x70, 0x61, 0x63, 0x6b, 0x20, 0x6f, 0x72, 0x20, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x75, 0x6e, 0x70, 0x61, 0x63, 0x6b, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x62, 0x61, 0x73, 0x65, 0x20, 0x3d, 0x20, 0x5f, 0x47, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x20, 0x3d, 0x20, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x0a, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x5f, 0x4d, 0x20, 0x3d, 0x20, 0x7b, 0x7d, 0x0a, 0x69, 0x66, 0x20, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x2d, 0x2d, 0x20, 0x68, 0x65, 0x75, 0x72, 0x69, 0x73, 0x74, 0x69, 0x63, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x61, 0x20, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x20, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x20, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x74, 0x6e, 0x31, 0x32, 0x20, 0x3d, 0x20, 0x5f, 0x4d, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x6c, 0x75, 0x61, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x3a, 0x20, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2c, 0x73, 0x69, 0x6e, 0x6b, 0x2c, 0x70, 0x75, 0x6d, 0x70, 0x20, 0x3d, 0x20, 0x7b, 0x7d, 0x2c, 0x7b, 0x7d, 0x2c, 0x7b, 0x7d, 0x2c, 0x7b, 0x7d, 0x0a, 0x0a, 0x5f, 0x4d, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x20, 0x3d, 0x20, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x0a, 0x5f, 0x4d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x3d, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x0a, 0x5f, 0x4d, 0x2e, 0x73, 0x69, 0x6e, 0x6b, 0x20, 0x3d, 0x20, 0x73, 0x69, 0x6e, 0x6b, 0x0a, 0x5f, 0x4d, 0x2e, 0x70, 0x75, 0x6d, 0x70, 0x20, 0x3d, 0x20, 0x70, 0x75, 0x6d, 0x70, 0x0a, 0x0a, 0x2d, 0x2d, 0x20, 0x32, 0x30, 0x34, 0x38, 0x20, 0x73, 0x65, 0x65, 0x6d, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x62, 0x65, 0x20, 0x62, 0x65, 0x74, 0x74, 0x65, 0x72, 0x20, 0x69, 0x6e, 0x20, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x73, 0x2e, 0x2e, 0x2e, 0x0a, 0x5f, 0x4d, 0x2e, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x53, 0x49, 0x5a, 0x45, 0x20, 0x3d, 0x20, 0x32, 0x30, 0x34, 0x38, 0x0a, 0x5f, 0x4d, 0x2e, 0x5f, 0x56, 0x45, 0x52, 0x53, 0x49, 0x4f, 0x4e, 0x20, 0x3d, 0x20, 0x22, 0x4c, 0x54, 0x4e, 0x31, 0x32, 0x20, 0x31, 0x2e, 0x30, 0x2e, 0x33, 0x22, 0x0a, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x2d, 0x2d, 0x20, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x20, 0x73, 0x74, 0x75, 0x66, 0x66, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x2d, 0x2d, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, 0x61, 0x20, 0x68, 0x69, 0x67, 0x68, 0x20, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x20, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x73, 0x20, 0x61, 0x20, 0x6c, 0x6f, 0x77, 0x2d, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x20, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x28, 0x6c, 0x6f, 0x77, 0x2c, 0x20, 0x63, 0x74, 0x78, 0x2c, 0x20, 0x65, 0x78, 0x74, 0x72, 0x61, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x72, 0x74, 0x28, 0x6c, 0x6f, 0x77, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x72, 0x65, 0x74, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x2c, 0x20, 0x63, 0x74, 0x78, 0x20, 0x3d, 0x20, 0x6c, 0x6f, 0x77, 0x28, 0x63, 0x74, 0x78, 0x2c, 0x20, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x2c, 0x20, 0x65, 0x78, 0x74, 0x72, 0x61, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x72, 0x65, 0x74, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x2d, 0x2d, 0x20, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x73, 0x20, 0x61, 0x20, 0x62, 0x75, 0x6e, 0x63, 0x68, 0x20, 0x6f, 0x66, 0x20, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x20, 0x74, 0x6f, 0x67, 0x65, 0x74, 0x68, 0x65, 0x72, 0x0a, 0x2d, 0x2d, 0x20, 0x28, 0x74, 0x68, 0x61, 0x6e, 0x6b, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x57, 0x69, 0x6d, 0x20, 0x43, 0x6f, 0x75, 0x77, 0x65, 0x6e, 0x62, 0x65, 0x72, 0x67, 0x29, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x28, 0x2e, 0x2e, 0x2e, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x61, 0x72, 0x67, 0x20, 0x3d, 0x20, 0x7b, 0x2e, 0x2e, 0x2e, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x6e, 0x20, 0x3d, 0x20, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x28, 0x27, 0x23, 0x27, 0x2c, 0x2e, 0x2e, 0x2e, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x70, 0x2c, 0x20, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x20, 0x3d, 0x20, 0x31, 0x2c, 0x20, 0x31, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x72, 0x65, 0x74, 0x72, 0x79, 0x20, 0x3d, 0x20, 0x22, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x72, 0x79, 0x20, 0x3d, 0x20, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x72, 0x65, 0x74, 0x72, 0x79, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x77, 0x68, 0x69, 0x6c, 0x65, 0x20, 0x74, 0x72, 0x75, 0x65, 0x20, 0x64, 0x6f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x20, 0x3d, 0x3d, 0x20, 0x74, 0x6f, 0x70, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x20, 0x3d, 0x20, 0x61, 0x72, 0x67, 0x5b, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5d, 0x28, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x20, 0x3d, 0x3d, 0x20, 0x22, 0x22, 0x20, 0x6f, 0x72, 0x20, 0x74, 0x6f, 0x70, 0x20, 0x3d, 0x3d, 0x20, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x69, 0x66, 0x20, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x20, 0x3d, 0x20, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x20, 0x2b, 0x20, 0x31, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x74, 0x6f, 0x70, 0x20, 0x3d, 0x20, 0x74, 0x6f, 0x70, 0x2b, 0x31, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x20, 0x3d, 0x20, 0x74, 0x6f, 0x70, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x20, 0x3d, 0x20, 0x61, 0x72, 0x67, 0x5b, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5d, 0x28, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x20, 0x6f, 0x72, 0x20, 0x22, 0x22, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x20, 0x3d, 0x3d, 0x20, 0x22, 0x22, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x20, 0x3d, 0x20, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x20, 0x2d, 0x20, 0x31, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x20, 0x3d, 0x20, 0x72, 0x65, 0x74, 0x72, 0x79, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x69, 0x66, 0x20, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x20, 0x3d, 0x3d, 0x20, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x20, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x20, 0x3d, 0x20, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x20, 0x2b, 0x20, 0x31, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x20, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x28, 0x22, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x70, 0x72, 0x69, 0x61, 0x74, 0x65, 0x20, 0x6e, 0x69, 0x6c, 0x22, 0x29, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x2d, 0x2d, 0x20, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x73, 0x74, 0x75, 0x66, 0x66, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x2d, 0x2d, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x20, 0x61, 0x6e, 0x20, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6e, 0x69, 0x6c, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x2d, 0x2d, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, 0x61, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x6a, 0x75, 0x73, 0x74, 0x20, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x20, 0x61, 0x6e, 0x20, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x28, 0x65, 0x72, 0x72, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6e, 0x69, 0x6c, 0x2c, 0x20, 0x65, 0x72, 0x72, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x2d, 0x2d, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x73, 0x20, 0x61, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x28, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x2c, 0x20, 0x69, 0x6f, 0x5f, 0x65, 0x72, 0x72, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x20, 0x3d, 0x20, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x3a, 0x72, 0x65, 0x61, 0x64, 0x28, 0x5f, 0x4d, 0x2e, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x53, 0x49, 0x5a, 0x45, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x3a, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x28, 0x29, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x28, 0x69, 0x6f, 0x5f, 0x65, 0x72, 0x72, 0x20, 0x6f, 0x72, 0x20, 0x22, 0x75, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x6f, 0x70, 0x65, 0x6e, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x22, 0x29, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x2d, 0x2d, 0x20, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, 0x61, 0x20, 0x66, 0x61, 0x6e, 0x63, 0x79, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x69, 0x6e, 0x74, 0x6f, 0x20, 0x61, 0x20, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x69, 0x66, 0x79, 0x28, 0x73, 0x72, 0x63, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x72, 0x74, 0x28, 0x73, 0x72, 0x63, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x2c, 0x20, 0x65, 0x72, 0x72, 0x5f, 0x6f, 0x72, 0x5f, 0x6e, 0x65, 0x77, 0x20, 0x3d, 0x20, 0x73, 0x72, 0x63, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x72, 0x63, 0x20, 0x3d, 0x20, 0x65, 0x72, 0x72, 0x5f, 0x6f, 0x72, 0x5f, 0x6e, 0x65, 0x77, 0x20, 0x6f, 0x72, 0x20, 0x73, 0x72, 0x63, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6e, 0x69, 0x6c, 0x2c, 0x20, 0x65, 0x72, 0x72, 0x5f, 0x6f, 0x72, 0x5f, 0x6e, 0x65, 0x77, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x2d, 0x2d, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x73, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x28, 0x73, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x73, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x69, 0x20, 0x3d, 0x20, 0x31, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x20, 0x3d, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x73, 0x75, 0x62, 0x28, 0x73, 0x2c, 0x20, 0x69, 0x2c, 0x20, 0x69, 0x2b, 0x5f, 0x4d, 0x2e, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x53, 0x49, 0x5a, 0x45, 0x2d, 0x31, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x20, 0x3d, 0x20, 0x69, 0x20, 0x2b, 0x20, 0x5f, 0x4d, 0x2e, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x53, 0x49, 0x5a, 0x45, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x20, 0x7e, 0x3d, 0x20, 0x22, 0x22, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6e, 0x69, 0x6c, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x28, 0x29, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x2d, 0x2d, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x73, 0x20, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x28, 0x74, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x72, 0x74, 0x28, 0x27, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x27, 0x20, 0x3d, 0x3d, 0x20, 0x74, 0x79, 0x70, 0x65, 0x28, 0x74, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x69, 0x20, 0x3d, 0x20, 0x30, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x20, 0x3d, 0x20, 0x69, 0x20, 0x2b, 0x20, 0x31, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x74, 0x5b, 0x69, 0x5d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x2d, 0x2d, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x73, 0x20, 0x72, 0x65, 0x77, 0x69, 0x6e, 0x64, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x72, 0x65, 0x77, 0x69, 0x6e, 0x64, 0x28, 0x73, 0x72, 0x63, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x72, 0x74, 0x28, 0x73, 0x72, 0x63, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x74, 0x20, 0x3d, 0x20, 0x7b, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x20, 0x3d, 0x20, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x28, 0x74, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x73, 0x72, 0x63, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x28, 0x74, 0x2c, 0x20, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x2d, 0x2d, 0x20, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x73, 0x20, 0x61, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x6f, 0x6e, 0x65, 0x20, 0x6f, 0x72, 0x20, 0x73, 0x65, 0x76, 0x65, 0x72, 0x61, 0x6c, 0x20, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x28, 0x73, 0x29, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x28, 0x73, 0x72, 0x63, 0x2c, 0x20, 0x66, 0x2c, 0x20, 0x2e, 0x2e, 0x2e, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x2e, 0x2e, 0x2e, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x66, 0x3d, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x28, 0x66, 0x2c, 0x20, 0x2e, 0x2e, 0x2e, 0x29, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x72, 0x74, 0x28, 0x73, 0x72, 0x63, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x66, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x69, 0x6e, 0x2c, 0x20, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x6f, 0x75, 0x74, 0x20, 0x3d, 0x20, 0x22, 0x22, 0x2c, 0x20, 0x22, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x73, 0x74, 0x61, 0x74, 0x65, 0x20, 0x3d, 0x20, 0x22, 0x66, 0x65, 0x65, 0x64, 0x69, 0x6e, 0x67, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x65, 0x72, 0x72, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x6f, 0x75, 0x74, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x28, 0x27, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x69, 0x73, 0x20, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x21, 0x27, 0x2c, 0x20, 0x32, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x77, 0x68, 0x69, 0x6c, 0x65, 0x20, 0x74, 0x72, 0x75, 0x65, 0x20, 0x64, 0x6f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x73, 0x74, 0x61, 0x74, 0x65, 0x20, 0x3d, 0x3d, 0x20, 0x22, 0x66, 0x65, 0x65, 0x64, 0x69, 0x6e, 0x67, 0x22, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x69, 0x6e, 0x2c, 0x20, 0x65, 0x72, 0x72, 0x20, 0x3d, 0x20, 0x73, 0x72, 0x63, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x65, 0x72, 0x72, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6e, 0x69, 0x6c, 0x2c, 0x20, 0x65, 0x72, 0x72, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x6f, 0x75, 0x74, 0x20, 0x3d, 0x20, 0x66, 0x28, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x69, 0x6e, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x6f, 0x75, 0x74, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x28, 0x27, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x70, 0x72, 0x69, 0x61, 0x74, 0x65, 0x20, 0x6e, 0x69, 0x6c, 0x27, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6e, 0x69, 0x6c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x69, 0x66, 0x20, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x6f, 0x75, 0x74, 0x20, 0x7e, 0x3d, 0x20, 0x22, 0x22, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x74, 0x61, 0x74, 0x65, 0x20, 0x3d, 0x20, 0x22, 0x65, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x69, 0x6e, 0x20, 0x3d, 0x20, 0x22, 0x22, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x6f, 0x75, 0x74, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x6f, 0x75, 0x74, 0x20, 0x3d, 0x20, 0x66, 0x28, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x69, 0x6e, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x6f, 0x75, 0x74, 0x20, 0x3d, 0x3d, 0x20, 0x22, 0x22, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x69, 0x6e, 0x20, 0x3d, 0x3d, 0x20, 0x22, 0x22, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x74, 0x61, 0x74, 0x65, 0x20, 0x3d, 0x20, 0x22, 0x66, 0x65, 0x65, 0x64, 0x69, 0x6e, 0x67, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x28, 0x27, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x22, 0x22, 0x27, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x6f, 0x75, 0x74, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x28, 0x27, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x70, 0x72, 0x69, 0x61, 0x74, 0x65, 0x20, 0x6e, 0x69, 0x6c, 0x27, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6e, 0x69, 0x6c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x6f, 0x75, 0x74, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x2d, 0x2d, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x73, 0x20, 0x61, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x73, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x73, 0x65, 0x76, 0x65, 0x72, 0x61, 0x6c, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2c, 0x20, 0x6f, 0x6e, 0x65, 0x20, 0x61, 0x66, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x2d, 0x2d, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x2c, 0x20, 0x61, 0x73, 0x20, 0x69, 0x66, 0x20, 0x74, 0x68, 0x65, 0x79, 0x20, 0x77, 0x65, 0x72, 0x65, 0x20, 0x63, 0x6f, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x6e, 0x61, 0x74, 0x65, 0x64, 0x0a, 0x2d, 0x2d, 0x20, 0x28, 0x74, 0x68, 0x61, 0x6e, 0x6b, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x57, 0x69, 0x6d, 0x20, 0x43, 0x6f, 0x75, 0x77, 0x65, 0x6e, 0x62, 0x65, 0x72, 0x67, 0x29, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x63, 0x61, 0x74, 0x28, 0x2e, 0x2e, 0x2e, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x61, 0x72, 0x67, 0x20, 0x3d, 0x20, 0x7b, 0x2e, 0x2e, 0x2e, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x73, 0x72, 0x63, 0x20, 0x3d, 0x20, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x28, 0x61, 0x72, 0x67, 0x2c, 0x20, 0x31, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x77, 0x68, 0x69, 0x6c, 0x65, 0x20, 0x73, 0x72, 0x63, 0x20, 0x64, 0x6f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x2c, 0x20, 0x65, 0x72, 0x72, 0x20, 0x3d, 0x20, 0x73, 0x72, 0x63, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x65, 0x72, 0x72, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6e, 0x69, 0x6c, 0x2c, 0x20, 0x65, 0x72, 0x72, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x72, 0x63, 0x20, 0x3d, 0x20, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x28, 0x61, 0x72, 0x67, 0x2c, 0x20, 0x31, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x2d, 0x2d, 0x20, 0x53, 0x69, 0x6e, 0x6b, 0x20, 0x73, 0x74, 0x75, 0x66, 0x66, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x2d, 0x2d, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x73, 0x20, 0x61, 0x20, 0x73, 0x69, 0x6e, 0x6b, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x73, 0x20, 0x69, 0x6e, 0x74, 0x6f, 0x20, 0x61, 0x20, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x73, 0x69, 0x6e, 0x6b, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x28, 0x74, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x74, 0x20, 0x3d, 0x20, 0x74, 0x20, 0x6f, 0x72, 0x20, 0x7b, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x66, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x2c, 0x20, 0x65, 0x72, 0x72, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x28, 0x74, 0x2c, 0x20, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x29, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x31, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x66, 0x2c, 0x20, 0x74, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x2d, 0x2d, 0x20, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, 0x61, 0x20, 0x66, 0x61, 0x6e, 0x63, 0x79, 0x20, 0x73, 0x69, 0x6e, 0x6b, 0x20, 0x69, 0x6e, 0x74, 0x6f, 0x20, 0x61, 0x20, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x20, 0x73, 0x69, 0x6e, 0x6b, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x73, 0x69, 0x6e, 0x6b, 0x2e, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x69, 0x66, 0x79, 0x28, 0x73, 0x6e, 0x6b, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x72, 0x74, 0x28, 0x73, 0x6e, 0x6b, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x2c, 0x20, 0x65, 0x72, 0x72, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x72, 0x65, 0x74, 0x2c, 0x20, 0x65, 0x72, 0x72, 0x5f, 0x6f, 0x72, 0x5f, 0x6e, 0x65, 0x77, 0x20, 0x3d, 0x20, 0x73, 0x6e, 0x6b, 0x28, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x2c, 0x20, 0x65, 0x72, 0x72, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x72, 0x65, 0x74, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6e, 0x69, 0x6c, 0x2c, 0x20, 0x65, 0x72, 0x72, 0x5f, 0x6f, 0x72, 0x5f, 0x6e, 0x65, 0x77, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x6e, 0x6b, 0x20, 0x3d, 0x20, 0x65, 0x72, 0x72, 0x5f, 0x6f, 0x72, 0x5f, 0x6e, 0x65, 0x77, 0x20, 0x6f, 0x72, 0x20, 0x73, 0x6e, 0x6b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x31, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x2d, 0x2d, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x73, 0x20, 0x61, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x20, 0x73, 0x69, 0x6e, 0x6b, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x73, 0x69, 0x6e, 0x6b, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x28, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x2c, 0x20, 0x69, 0x6f, 0x5f, 0x65, 0x72, 0x72, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x2c, 0x20, 0x65, 0x72, 0x72, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x3a, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x31, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x3a, 0x77, 0x72, 0x69, 0x74, 0x65, 0x28, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x29, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x73, 0x69, 0x6e, 0x6b, 0x2e, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x28, 0x69, 0x6f, 0x5f, 0x65, 0x72, 0x72, 0x20, 0x6f, 0x72, 0x20, 0x22, 0x75, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x6f, 0x70, 0x65, 0x6e, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x22, 0x29, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x2d, 0x2d, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x73, 0x20, 0x61, 0x20, 0x73, 0x69, 0x6e, 0x6b, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x64, 0x69, 0x73, 0x63, 0x61, 0x72, 0x64, 0x73, 0x20, 0x64, 0x61, 0x74, 0x61, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6e, 0x75, 0x6c, 0x6c, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x31, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x73, 0x69, 0x6e, 0x6b, 0x2e, 0x6e, 0x75, 0x6c, 0x6c, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6e, 0x75, 0x6c, 0x6c, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x2d, 0x2d, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x73, 0x20, 0x61, 0x20, 0x73, 0x69, 0x6e, 0x6b, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x6a, 0x75, 0x73, 0x74, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, 0x61, 0x6e, 0x20, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x73, 0x69, 0x6e, 0x6b, 0x2e, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x28, 0x65, 0x72, 0x72, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6e, 0x69, 0x6c, 0x2c, 0x20, 0x65, 0x72, 0x72, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x2d, 0x2d, 0x20, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x73, 0x20, 0x61, 0x20, 0x73, 0x69, 0x6e, 0x6b, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x6f, 0x6e, 0x65, 0x20, 0x6f, 0x72, 0x20, 0x73, 0x65, 0x76, 0x65, 0x72, 0x61, 0x6c, 0x20, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x28, 0x73, 0x29, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x73, 0x69, 0x6e, 0x6b, 0x2e, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x28, 0x66, 0x2c, 0x20, 0x73, 0x6e, 0x6b, 0x2c, 0x20, 0x2e, 0x2e, 0x2e, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x2e, 0x2e, 0x2e, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x61, 0x72, 0x67, 0x73, 0x20, 0x3d, 0x20, 0x7b, 0x20, 0x66, 0x2c, 0x20, 0x73, 0x6e, 0x6b, 0x2c, 0x20, 0x2e, 0x2e, 0x2e, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x6e, 0x6b, 0x20, 0x3d, 0x20, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x28, 0x61, 0x72, 0x67, 0x73, 0x2c, 0x20, 0x23, 0x61, 0x72, 0x67, 0x73, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x20, 0x3d, 0x20, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x28, 0x75, 0x6e, 0x70, 0x61, 0x63, 0x6b, 0x28, 0x61, 0x72, 0x67, 0x73, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x72, 0x74, 0x28, 0x66, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x73, 0x6e, 0x6b, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x2c, 0x20, 0x65, 0x72, 0x72, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x20, 0x7e, 0x3d, 0x20, 0x22, 0x22, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x65, 0x64, 0x20, 0x3d, 0x20, 0x66, 0x28, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x64, 0x6f, 0x6e, 0x65, 0x20, 0x3d, 0x20, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x22, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x77, 0x68, 0x69, 0x6c, 0x65, 0x20, 0x74, 0x72, 0x75, 0x65, 0x20, 0x64, 0x6f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x72, 0x65, 0x74, 0x2c, 0x20, 0x73, 0x6e, 0x6b, 0x65, 0x72, 0x72, 0x20, 0x3d, 0x20, 0x73, 0x6e, 0x6b, 0x28, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x65, 0x64, 0x2c, 0x20, 0x65, 0x72, 0x72, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x72, 0x65, 0x74, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6e, 0x69, 0x6c, 0x2c, 0x20, 0x73, 0x6e, 0x6b, 0x65, 0x72, 0x72, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x65, 0x64, 0x20, 0x3d, 0x3d, 0x20, 0x64, 0x6f, 0x6e, 0x65, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x31, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x65, 0x64, 0x20, 0x3d, 0x20, 0x66, 0x28, 0x64, 0x6f, 0x6e, 0x65, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x31, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x2d, 0x2d, 0x20, 0x50, 0x75, 0x6d, 0x70, 0x20, 0x73, 0x74, 0x75, 0x66, 0x66, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x2d, 0x2d, 0x20, 0x70, 0x75, 0x6d, 0x70, 0x73, 0x20, 0x6f, 0x6e, 0x65, 0x20, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x69, 0x6e, 0x6b, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x70, 0x75, 0x6d, 0x70, 0x2e, 0x73, 0x74, 0x65, 0x70, 0x28, 0x73, 0x72, 0x63, 0x2c, 0x20, 0x73, 0x6e, 0x6b, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x2c, 0x20, 0x73, 0x72, 0x63, 0x5f, 0x65, 0x72, 0x72, 0x20, 0x3d, 0x20, 0x73, 0x72, 0x63, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x72, 0x65, 0x74, 0x2c, 0x20, 0x73, 0x6e, 0x6b, 0x5f, 0x65, 0x72, 0x72, 0x20, 0x3d, 0x20, 0x73, 0x6e, 0x6b, 0x28, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x2c, 0x20, 0x73, 0x72, 0x63, 0x5f, 0x65, 0x72, 0x72, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x72, 0x65, 0x74, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x31, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6e, 0x69, 0x6c, 0x2c, 0x20, 0x73, 0x72, 0x63, 0x5f, 0x65, 0x72, 0x72, 0x20, 0x6f, 0x72, 0x20, 0x73, 0x6e, 0x6b, 0x5f, 0x65, 0x72, 0x72, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x2d, 0x2d, 0x20, 0x70, 0x75, 0x6d, 0x70, 0x73, 0x20, 0x61, 0x6c, 0x6c, 0x20, 0x64, 0x61, 0x74, 0x61, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x61, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x20, 0x73, 0x69, 0x6e, 0x6b, 0x2c, 0x20, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x61, 0x20, 0x73, 0x74, 0x65, 0x70, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x70, 0x75, 0x6d, 0x70, 0x2e, 0x61, 0x6c, 0x6c, 0x28, 0x73, 0x72, 0x63, 0x2c, 0x20, 0x73, 0x6e, 0x6b, 0x2c, 0x20, 0x73, 0x74, 0x65, 0x70, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x72, 0x74, 0x28, 0x73, 0x72, 0x63, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x73, 0x6e, 0x6b, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x74, 0x65, 0x70, 0x20, 0x3d, 0x20, 0x73, 0x74, 0x65, 0x70, 0x20, 0x6f, 0x72, 0x20, 0x70, 0x75, 0x6d, 0x70, 0x2e, 0x73, 0x74, 0x65, 0x70, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x77, 0x68, 0x69, 0x6c, 0x65, 0x20, 0x74, 0x72, 0x75, 0x65, 0x20, 0x64, 0x6f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x72, 0x65, 0x74, 0x2c, 0x20, 0x65, 0x72, 0x72, 0x20, 0x3d, 0x20, 0x73, 0x74, 0x65, 0x70, 0x28, 0x73, 0x72, 0x63, 0x2c, 0x20, 0x73, 0x6e, 0x6b, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x72, 0x65, 0x74, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x65, 0x72, 0x72, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6e, 0x69, 0x6c, 0x2c, 0x20, 0x65, 0x72, 0x72, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x31, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x4d, 0x0a, }; // [ltn12.lua] } // love ================================================ FILE: src/libraries/luasocket/libluasocket/luasocket.c ================================================ /*=========================================================================*\ * LuaSocket toolkit * Networking support for the Lua language * Diego Nehab * 26/11/1999 * * This library is part of an effort to progressively increase the network * connectivity of the Lua language. The Lua interface to networking * functions follows the Sockets API closely, trying to simplify all tasks * involved in setting up both client and server connections. The provided * IO routines, however, follow the Lua style, being very similar to the * standard Lua read and write functions. \*=========================================================================*/ #include "luasocket.h" #include "auxiliar.h" #include "except.h" #include "timeout.h" #include "buffer.h" #include "inet.h" #include "tcp.h" #include "udp.h" #include "select.h" /*-------------------------------------------------------------------------*\ * Internal function prototypes \*-------------------------------------------------------------------------*/ static int global_skip(lua_State *L); static int global_unload(lua_State *L); static int base_open(lua_State *L); /*-------------------------------------------------------------------------*\ * Modules and functions \*-------------------------------------------------------------------------*/ static const luaL_Reg mod[] = { {"auxiliar", auxiliar_open}, {"except", except_open}, {"timeout", timeout_open}, {"buffer", buffer_open}, {"inet", inet_open}, {"tcp", tcp_open}, {"udp", udp_open}, {"select", select_open}, {NULL, NULL} }; static luaL_Reg func[] = { {"skip", global_skip}, {"__unload", global_unload}, {NULL, NULL} }; /*-------------------------------------------------------------------------*\ * Skip a few arguments \*-------------------------------------------------------------------------*/ static int global_skip(lua_State *L) { int amount = (int) luaL_checkinteger(L, 1); int ret = lua_gettop(L) - amount - 1; return ret >= 0 ? ret : 0; } /*-------------------------------------------------------------------------*\ * Unloads the library \*-------------------------------------------------------------------------*/ static int global_unload(lua_State *L) { (void) L; socket_close(); return 0; } /*-------------------------------------------------------------------------*\ * Setup basic stuff. \*-------------------------------------------------------------------------*/ static int base_open(lua_State *L) { if (socket_open()) { /* export functions (and leave namespace table on top of stack) */ lua_newtable(L); luaL_setfuncs(L, func, 0); #ifdef LUASOCKET_DEBUG lua_pushstring(L, "_DEBUG"); lua_pushboolean(L, 1); lua_rawset(L, -3); #endif /* make version string available to scripts */ lua_pushstring(L, "_VERSION"); lua_pushstring(L, LUASOCKET_VERSION); lua_rawset(L, -3); return 1; } else { lua_pushstring(L, "unable to initialize library"); lua_error(L); return 0; } } /*-------------------------------------------------------------------------*\ * Initializes all library modules. \*-------------------------------------------------------------------------*/ LUASOCKET_API int luaopen_socket_core(lua_State *L) { int i; base_open(L); for (i = 0; mod[i].name; i++) mod[i].func(L); return 1; } ================================================ FILE: src/libraries/luasocket/libluasocket/luasocket.h ================================================ #ifndef LUASOCKET_H #define LUASOCKET_H /*=========================================================================*\ * LuaSocket toolkit * Networking support for the Lua language * Diego Nehab * 9/11/1999 \*=========================================================================*/ /*-------------------------------------------------------------------------* \ * Current socket library version \*-------------------------------------------------------------------------*/ #define LUASOCKET_VERSION "LuaSocket 3.1.0" #define LUASOCKET_COPYRIGHT "Copyright (C) 1999-2013 Diego Nehab" /*-------------------------------------------------------------------------*\ * This macro prefixes all exported API functions \*-------------------------------------------------------------------------*/ #ifndef LUASOCKET_API #ifdef _WIN32 #define LUASOCKET_API __declspec(dllexport) #else #define LUASOCKET_API __attribute__ ((visibility ("default"))) #endif #endif #include "lua.h" #include "lauxlib.h" #include "compat.h" /*-------------------------------------------------------------------------*\ * Initializes the library. \*-------------------------------------------------------------------------*/ LUASOCKET_API int luaopen_socket_core(lua_State *L); #endif /* LUASOCKET_H */ ================================================ FILE: src/libraries/luasocket/libluasocket/makefile ================================================ # luasocket src/makefile # # Definitions in this section can be overridden on the command line or in the # environment. # # These are equivalent: # # export PLAT=linux DEBUG=DEBUG LUAV=5.2 prefix=/sw # make # # and # # make PLAT=linux DEBUG=DEBUG LUAV=5.2 prefix=/sw # PLAT: linux macosx win32 win64 mingw # platform to build for PLAT?=linux # LUAV: 5.1 5.2 5.3 5.4 # lua version to build against LUAV?=5.1 # MYCFLAGS: to be set by user if needed MYCFLAGS?= # MYLDFLAGS: to be set by user if needed MYLDFLAGS?= # DEBUG: NODEBUG DEBUG # debug mode causes luasocket to collect and returns timing information useful # for testing and debugging luasocket itself DEBUG?=NODEBUG # where lua headers are found for macosx builds # LUAINC_macosx: # /opt/local/include LUAINC_macosx_base?=/opt/local/include LUAINC_macosx?=$(LUAINC_macosx_base)/lua/$(LUAV) $(LUAINC_macosx_base)/lua$(LUAV) $(LUAINC_macosx_base)/lua-$(LUAV) # FIXME default should this default to fink or to macports? # What happens when more than one Lua version is installed? LUAPREFIX_macosx?=/opt/local CDIR_macosx?=lib/lua/$(LUAV) LDIR_macosx?=share/lua/$(LUAV) # LUAINC_linux: # /usr/include/lua$(LUAV) # /usr/local/include # /usr/local/include/lua$(LUAV) # where lua headers are found for linux builds LUAINC_linux_base?=/usr/include LUAINC_linux?=$(LUAINC_linux_base)/lua/$(LUAV) $(LUAINC_linux_base)/lua$(LUAV) LUAPREFIX_linux?=/usr/local CDIR_linux?=lib/lua/$(LUAV) LDIR_linux?=share/lua/$(LUAV) # LUAINC_freebsd: # /usr/local/include/lua$(LUAV) # where lua headers are found for freebsd builds LUAINC_freebsd_base?=/usr/local/include/ LUAINC_freebsd?=$(LUAINC_freebsd_base)/lua/$(LUAV) $(LUAINC_freebsd_base)/lua$(LUAV) LUAPREFIX_freebsd?=/usr/local/ CDIR_freebsd?=lib/lua/$(LUAV) LDIR_freebsd?=share/lua/$(LUAV) # where lua headers are found for mingw builds # LUAINC_mingw: # /opt/local/include LUAINC_mingw_base?=/usr/include LUAINC_mingw?=$(LUAINC_mingw_base)/lua/$(LUAV) $(LUAINC_mingw_base)/lua$(LUAV) LUALIB_mingw_base?=/usr/bin LUALIB_mingw?=$(LUALIB_mingw_base)/lua/$(LUAV)/lua$(subst .,,$(LUAV)).dll LUAPREFIX_mingw?=/usr CDIR_mingw?=lua/$(LUAV) LDIR_mingw?=lua/$(LUAV)/lua # LUAINC_win32: # LUALIB_win32: # where lua headers and libraries are found for win32 builds LUAPREFIX_win32?= LUAINC_win32?=$(LUAPREFIX_win32)/include/lua/$(LUAV) $(LUAPREFIX_win32)/include/lua$(LUAV) PLATFORM_win32?=Release CDIR_win32?=bin/lua/$(LUAV)/$(PLATFORM_win32) LDIR_win32?=bin/lua/$(LUAV)/$(PLATFORM_win32)/lua LUALIB_win32?=$(LUAPREFIX_win32)/lib/lua/$(LUAV)/$(PLATFORM_win32) LUALIBNAME_win32?=lua$(subst .,,$(LUAV)).lib # LUAINC_win64: # LUALIB_win64: # where lua headers and libraries are found for win64 builds LUAPREFIX_win64?= LUAINC_win64?=$(LUAPREFIX_win64)/include/lua/$(LUAV) $(LUAPREFIX_win64)/include/lua$(LUAV) PLATFORM_win64?=x64/Release CDIR_win64?=bin/lua/$(LUAV)/$(PLATFORM_win64) LDIR_win64?=bin/lua/$(LUAV)/$(PLATFORM_win64)/lua LUALIB_win64?=$(LUAPREFIX_win64)/lib/lua/$(LUAV)/$(PLATFORM_win64) LUALIBNAME_win64?=lua$(subst .,,$(LUAV)).lib # LUAINC_solaris: LUAINC_solaris_base?=/usr/include LUAINC_solaris?=$(LUAINC_solaris_base)/lua/$(LUAV) $(LUAINC_solaris_base)/lua$(LUAV) LUAPREFIX_solaris?=/usr/local CDIR_solaris?=lib/lua/$(LUAV) LDIR_solaris?=share/lua/$(LUAV) # prefix: /usr/local /usr /opt/local /sw # the top of the default install tree prefix?=$(LUAPREFIX_$(PLAT)) CDIR?=$(CDIR_$(PLAT)) LDIR?=$(LDIR_$(PLAT)) # DESTDIR: (no default) # used by package managers to install into a temporary destination DESTDIR?= #------ # Definitions below can be overridden on the make command line, but # shouldn't have to be. #------ # Install directories # INSTALL_DIR=install -d INSTALL_DATA=install -m644 INSTALL_EXEC=install INSTALL_TOP=$(DESTDIR)$(prefix) INSTALL_TOP_LDIR=$(INSTALL_TOP)/$(LDIR) INSTALL_TOP_CDIR=$(INSTALL_TOP)/$(CDIR) INSTALL_SOCKET_LDIR=$(INSTALL_TOP_LDIR)/socket INSTALL_SOCKET_CDIR=$(INSTALL_TOP_CDIR)/socket INSTALL_MIME_LDIR=$(INSTALL_TOP_LDIR)/mime INSTALL_MIME_CDIR=$(INSTALL_TOP_CDIR)/mime print: @echo PLAT=$(PLAT) @echo LUAV=$(LUAV) @echo DEBUG=$(DEBUG) @echo prefix=$(prefix) @echo LUAINC_$(PLAT)=$(LUAINC_$(PLAT)) @echo LUALIB_$(PLAT)=$(LUALIB_$(PLAT)) @echo INSTALL_TOP_CDIR=$(INSTALL_TOP_CDIR) @echo INSTALL_TOP_LDIR=$(INSTALL_TOP_LDIR) @echo CFLAGS=$(CFLAGS) @echo LDFLAGS=$(LDFLAGS) #------ # Supported platforms # PLATS= macosx linux win32 win64 mingw solaris #------ # Compiler and linker settings # for Mac OS X SO_macosx=so O_macosx=o CC_macosx=gcc DEF_macosx= -DLUASOCKET_$(DEBUG) -DUNIX_HAS_SUN_LEN CFLAGS_macosx=$(LUAINC:%=-I%) $(DEF) -Wall -O2 -fno-common LDFLAGS_macosx= -bundle -undefined dynamic_lookup -o LD_macosx=gcc SOCKET_macosx=usocket.o #------ # Compiler and linker settings # for Linux SO_linux=so O_linux=o CC_linux=gcc DEF_linux=-DLUASOCKET_$(DEBUG) CFLAGS_linux=$(LUAINC:%=-I%) $(DEF) -Wall -Wshadow -Wextra \ -Wimplicit -O2 -ggdb3 -fpic LDFLAGS_linux=-O -shared -fpic -o LD_linux=gcc SOCKET_linux=usocket.o #------ # Compiler and linker settings # for FreeBSD SO_freebsd=so O_freebsd=o CC_freebsd=gcc DEF_freebsd=-DLUASOCKET_$(DEBUG) -DUNIX_HAS_SUN_LEN CFLAGS_freebsd=$(LUAINC:%=-I%) $(DEF) -Wall -Wshadow -Wextra \ -Wimplicit -O2 -ggdb3 -fpic LDFLAGS_freebsd=-O -shared -fpic -o LD_freebsd=gcc SOCKET_freebsd=usocket.o #------ # Compiler and linker settings # for Solaris SO_solaris=so O_solaris=o CC_solaris=gcc DEF_solaris=-DLUASOCKET_$(DEBUG) CFLAGS_solaris=$(LUAINC:%=-I%) $(DEF) -Wall -Wshadow -Wextra \ -Wimplicit -O2 -ggdb3 -fpic LDFLAGS_solaris=-lnsl -lsocket -lresolv -O -shared -fpic -o LD_solaris=gcc SOCKET_solaris=usocket.o #------ # Compiler and linker settings # for MingW SO_mingw=dll O_mingw=o CC_mingw=gcc DEF_mingw= -DLUASOCKET_$(DEBUG) \ -DWINVER=0x0501 CFLAGS_mingw=$(LUAINC:%=-I%) $(DEF) -Wall -O2 -fno-common LDFLAGS_mingw= $(LUALIB) -shared -Wl,-s -lws2_32 -o LD_mingw=gcc SOCKET_mingw=wsocket.o #------ # Compiler and linker settings # for Win32 SO_win32=dll O_win32=obj CC_win32=cl DEF_win32= //D "WIN32" //D "NDEBUG" //D "_WINDOWS" //D "_USRDLL" \ //D "_CRT_SECURE_NO_WARNINGS" \ //D "_WINDLL" \ //D "LUASOCKET_$(DEBUG)" CFLAGS_win32=$(LUAINC:%=//I "%") $(DEF) //O2 //Ot //MD //W3 //nologo LDFLAGS_win32= //nologo //link //NOLOGO //DLL //INCREMENTAL:NO \ //MANIFEST //MANIFESTFILE:"intermediate.manifest" \ /MANIFESTUAC:"level='asInvoker' uiAccess='false'" \ //SUBSYSTEM:WINDOWS //OPT:REF //OPT:ICF //DYNAMICBASE:NO \ //MACHINE:X86 /LIBPATH:"$(LUALIB)" \ $(LUALIBNAME_win32) ws2_32.lib //OUT: LD_win32=cl SOCKET_win32=wsocket.obj #------ # Compiler and linker settings # for Win64 SO_win64=dll O_win64=obj CC_win64=cl DEF_win64= //D "WIN32" //D "NDEBUG" //D "_WINDOWS" //D "_USRDLL" \ //D "_CRT_SECURE_NO_WARNINGS" \ //D "_WINDLL" \ //D "LUASOCKET_$(DEBUG)" CFLAGS_win64=$(LUAINC:%=//I "%") $(DEF) //O2 //Ot //MD //W3 //nologo LDFLAGS_win64= //nologo //link //NOLOGO //DLL //INCREMENTAL:NO \ //MANIFEST //MANIFESTFILE:"intermediate.manifest" \ /MANIFESTUAC:"level='asInvoker' uiAccess='false'" \ //SUBSYSTEM:WINDOWS //OPT:REF //OPT:ICF //DYNAMICBASE:NO \ /LIBPATH:"$(LUALIB)" \ $(LUALIBNAME_win64) ws2_32.lib //OUT: LD_win64=cl SOCKET_win64=wsocket.obj .SUFFIXES: .obj .c.obj: $(CC) $(CFLAGS) //Fo"$@" //c $< #------ # Output file names # SO=$(SO_$(PLAT)) O=$(O_$(PLAT)) SOCKET_V=3.1.0 MIME_V=1.0.3 SOCKET_SO=socket-$(SOCKET_V).$(SO) MIME_SO=mime-$(MIME_V).$(SO) UNIX_SO=unix.$(SO) SERIAL_SO=serial.$(SO) SOCKET=$(SOCKET_$(PLAT)) #------ # Settings selected for platform # CC=$(CC_$(PLAT)) DEF=$(DEF_$(PLAT)) CFLAGS=$(MYCFLAGS) $(CFLAGS_$(PLAT)) LDFLAGS=$(MYLDFLAGS) $(LDFLAGS_$(PLAT)) LD=$(LD_$(PLAT)) LUAINC= $(LUAINC_$(PLAT)) LUALIB= $(LUALIB_$(PLAT)) #------ # Modules belonging to socket-core # SOCKET_OBJS= \ luasocket.$(O) \ timeout.$(O) \ buffer.$(O) \ io.$(O) \ auxiliar.$(O) \ compat.$(O) \ options.$(O) \ inet.$(O) \ $(SOCKET) \ except.$(O) \ select.$(O) \ tcp.$(O) \ udp.$(O) #------ # Modules belonging mime-core # MIME_OBJS= \ mime.$(O) \ compat.$(O) #------ # Modules belonging unix (local domain sockets) # UNIX_OBJS=\ buffer.$(O) \ auxiliar.$(O) \ options.$(O) \ timeout.$(O) \ io.$(O) \ usocket.$(O) \ unixstream.$(O) \ unixdgram.$(O) \ compat.$(O) \ unix.$(O) #------ # Modules belonging to serial (device streams) # SERIAL_OBJS=\ buffer.$(O) \ compat.$(O) \ auxiliar.$(O) \ options.$(O) \ timeout.$(O) \ io.$(O) \ usocket.$(O) \ serial.$(O) #------ # Files to install # TO_SOCKET_LDIR= \ http.lua \ url.lua \ tp.lua \ ftp.lua \ headers.lua \ smtp.lua TO_TOP_LDIR= \ ltn12.lua \ socket.lua \ mime.lua #------ # Targets # default: $(PLAT) freebsd: $(MAKE) all-unix PLAT=freebsd macosx: $(MAKE) all-unix PLAT=macosx win32: $(MAKE) all PLAT=win32 win64: $(MAKE) all PLAT=win64 linux: $(MAKE) all-unix PLAT=linux mingw: $(MAKE) all PLAT=mingw solaris: $(MAKE) all-unix PLAT=solaris none: @echo "Please run" @echo " make PLATFORM" @echo "where PLATFORM is one of these:" @echo " $(PLATS)" all: $(SOCKET_SO) $(MIME_SO) $(SOCKET_SO): $(SOCKET_OBJS) $(LD) $(SOCKET_OBJS) $(LDFLAGS)$@ $(MIME_SO): $(MIME_OBJS) $(LD) $(MIME_OBJS) $(LDFLAGS)$@ all-unix: all $(UNIX_SO) $(SERIAL_SO) $(UNIX_SO): $(UNIX_OBJS) $(LD) $(UNIX_OBJS) $(LDFLAGS)$@ $(SERIAL_SO): $(SERIAL_OBJS) $(LD) $(SERIAL_OBJS) $(LDFLAGS)$@ install: $(INSTALL_DIR) $(INSTALL_TOP_LDIR) $(INSTALL_DATA) $(TO_TOP_LDIR) $(INSTALL_TOP_LDIR) $(INSTALL_DIR) $(INSTALL_SOCKET_LDIR) $(INSTALL_DATA) $(TO_SOCKET_LDIR) $(INSTALL_SOCKET_LDIR) $(INSTALL_DIR) $(INSTALL_SOCKET_CDIR) $(INSTALL_EXEC) $(SOCKET_SO) $(INSTALL_SOCKET_CDIR)/core.$(SO) $(INSTALL_DIR) $(INSTALL_MIME_CDIR) $(INSTALL_EXEC) $(MIME_SO) $(INSTALL_MIME_CDIR)/core.$(SO) install-unix: install $(INSTALL_EXEC) $(UNIX_SO) $(INSTALL_SOCKET_CDIR)/$(UNIX_SO) $(INSTALL_EXEC) $(SERIAL_SO) $(INSTALL_SOCKET_CDIR)/$(SERIAL_SO) local: $(MAKE) install INSTALL_TOP_CDIR=.. INSTALL_TOP_LDIR=.. clean: rm -f $(SOCKET_SO) $(SOCKET_OBJS) $(SERIAL_OBJS) rm -f $(MIME_SO) $(UNIX_SO) $(SERIAL_SO) $(MIME_OBJS) $(UNIX_OBJS) .PHONY: all $(PLATS) default clean echo none #------ # List of dependencies # compat.$(O): compat.c compat.h auxiliar.$(O): auxiliar.c auxiliar.h buffer.$(O): buffer.c buffer.h io.h timeout.h except.$(O): except.c except.h inet.$(O): inet.c inet.h socket.h io.h timeout.h usocket.h io.$(O): io.c io.h timeout.h luasocket.$(O): luasocket.c luasocket.h auxiliar.h except.h \ timeout.h buffer.h io.h inet.h socket.h usocket.h tcp.h \ udp.h select.h mime.$(O): mime.c mime.h options.$(O): options.c auxiliar.h options.h socket.h io.h \ timeout.h usocket.h inet.h select.$(O): select.c socket.h io.h timeout.h usocket.h select.h serial.$(O): serial.c auxiliar.h socket.h io.h timeout.h usocket.h \ options.h unix.h buffer.h tcp.$(O): tcp.c auxiliar.h socket.h io.h timeout.h usocket.h \ inet.h options.h tcp.h buffer.h timeout.$(O): timeout.c auxiliar.h timeout.h udp.$(O): udp.c auxiliar.h socket.h io.h timeout.h usocket.h \ inet.h options.h udp.h unix.$(O): unix.c auxiliar.h socket.h io.h timeout.h usocket.h \ options.h unix.h buffer.h usocket.$(O): usocket.c socket.h io.h timeout.h usocket.h wsocket.$(O): wsocket.c socket.h io.h timeout.h usocket.h ================================================ FILE: src/libraries/luasocket/libluasocket/mbox.lua ================================================ local _M = {} if module then mbox = _M -- luacheck: ignore end function _M.split_message(message_s) local message = {} message_s = string.gsub(message_s, "\r\n", "\n") string.gsub(message_s, "^(.-\n)\n", function (h) message.headers = h end) string.gsub(message_s, "^.-\n\n(.*)", function (b) message.body = b end) if not message.body then string.gsub(message_s, "^\n(.*)", function (b) message.body = b end) end if not message.headers and not message.body then message.headers = message_s end return message.headers or "", message.body or "" end function _M.split_headers(headers_s) local headers = {} headers_s = string.gsub(headers_s, "\r\n", "\n") headers_s = string.gsub(headers_s, "\n[ ]+", " ") string.gsub("\n" .. headers_s, "\n([^\n]+)", function (h) table.insert(headers, h) end) return headers end function _M.parse_header(header_s) header_s = string.gsub(header_s, "\n[ ]+", " ") header_s = string.gsub(header_s, "\n+", "") local _, _, name, value = string.find(header_s, "([^%s:]-):%s*(.*)") return name, value end function _M.parse_headers(headers_s) local headers_t = _M.split_headers(headers_s) local headers = {} for i = 1, #headers_t do local name, value = _M.parse_header(headers_t[i]) if name then name = string.lower(name) if headers[name] then headers[name] = headers[name] .. ", " .. value else headers[name] = value end end end return headers end function _M.parse_from(from) local _, _, name, address = string.find(from, "^%s*(.-)%s*%<(.-)%>") if not address then _, _, address = string.find(from, "%s*(.+)%s*") end name = name or "" address = address or "" if name == "" then name = address end name = string.gsub(name, '"', "") return name, address end function _M.split_mbox(mbox_s) local mbox = {} mbox_s = string.gsub(mbox_s, "\r\n", "\n") .."\n\nFrom \n" local nj, i local j = 1 while 1 do i, nj = string.find(mbox_s, "\n\nFrom .-\n", j) if not i then break end local message = string.sub(mbox_s, j, i-1) table.insert(mbox, message) j = nj+1 end return mbox end function _M.parse(mbox_s) local mbox = _M.split_mbox(mbox_s) for i = 1, #mbox do mbox[i] = _M.parse_message(mbox[i]) end return mbox end function _M.parse_message(message_s) local message = {} message.headers, message.body = _M.split_message(message_s) message.headers = _M.parse_headers(message.headers) return message end return _M ================================================ FILE: src/libraries/luasocket/libluasocket/mbox.lua.h ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ namespace love { // [mbox.lua] const unsigned char mbox_lua[] = { 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x5f, 0x4d, 0x20, 0x3d, 0x20, 0x7b, 0x7d, 0x0a, 0x0a, 0x69, 0x66, 0x20, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6d, 0x62, 0x6f, 0x78, 0x20, 0x3d, 0x20, 0x5f, 0x4d, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x6c, 0x75, 0x61, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x3a, 0x20, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x5f, 0x4d, 0x2e, 0x73, 0x70, 0x6c, 0x69, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x28, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x3d, 0x20, 0x7b, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x20, 0x3d, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x67, 0x73, 0x75, 0x62, 0x28, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x2c, 0x20, 0x22, 0x5c, 0x72, 0x5c, 0x6e, 0x22, 0x2c, 0x20, 0x22, 0x5c, 0x6e, 0x22, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x67, 0x73, 0x75, 0x62, 0x28, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x2c, 0x20, 0x22, 0x5e, 0x28, 0x2e, 0x2d, 0x5c, 0x6e, 0x29, 0x5c, 0x6e, 0x22, 0x2c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x28, 0x68, 0x29, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x20, 0x3d, 0x20, 0x68, 0x20, 0x65, 0x6e, 0x64, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x67, 0x73, 0x75, 0x62, 0x28, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x2c, 0x20, 0x22, 0x5e, 0x2e, 0x2d, 0x5c, 0x6e, 0x5c, 0x6e, 0x28, 0x2e, 0x2a, 0x29, 0x22, 0x2c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x28, 0x62, 0x29, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x62, 0x6f, 0x64, 0x79, 0x20, 0x3d, 0x20, 0x62, 0x20, 0x65, 0x6e, 0x64, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x62, 0x6f, 0x64, 0x79, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x67, 0x73, 0x75, 0x62, 0x28, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x2c, 0x20, 0x22, 0x5e, 0x5c, 0x6e, 0x28, 0x2e, 0x2a, 0x29, 0x22, 0x2c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x28, 0x62, 0x29, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x62, 0x6f, 0x64, 0x79, 0x20, 0x3d, 0x20, 0x62, 0x20, 0x65, 0x6e, 0x64, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x62, 0x6f, 0x64, 0x79, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x20, 0x3d, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x20, 0x6f, 0x72, 0x20, 0x22, 0x22, 0x2c, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x62, 0x6f, 0x64, 0x79, 0x20, 0x6f, 0x72, 0x20, 0x22, 0x22, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x5f, 0x4d, 0x2e, 0x73, 0x70, 0x6c, 0x69, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x28, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x73, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x20, 0x3d, 0x20, 0x7b, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x73, 0x20, 0x3d, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x67, 0x73, 0x75, 0x62, 0x28, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x73, 0x2c, 0x20, 0x22, 0x5c, 0x72, 0x5c, 0x6e, 0x22, 0x2c, 0x20, 0x22, 0x5c, 0x6e, 0x22, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x73, 0x20, 0x3d, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x67, 0x73, 0x75, 0x62, 0x28, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x73, 0x2c, 0x20, 0x22, 0x5c, 0x6e, 0x5b, 0x20, 0x5d, 0x2b, 0x22, 0x2c, 0x20, 0x22, 0x20, 0x22, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x67, 0x73, 0x75, 0x62, 0x28, 0x22, 0x5c, 0x6e, 0x22, 0x20, 0x2e, 0x2e, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x73, 0x2c, 0x20, 0x22, 0x5c, 0x6e, 0x28, 0x5b, 0x5e, 0x5c, 0x6e, 0x5d, 0x2b, 0x29, 0x22, 0x2c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x28, 0x68, 0x29, 0x20, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x28, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2c, 0x20, 0x68, 0x29, 0x20, 0x65, 0x6e, 0x64, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x5f, 0x4d, 0x2e, 0x70, 0x61, 0x72, 0x73, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x28, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x73, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x73, 0x20, 0x3d, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x67, 0x73, 0x75, 0x62, 0x28, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x73, 0x2c, 0x20, 0x22, 0x5c, 0x6e, 0x5b, 0x20, 0x5d, 0x2b, 0x22, 0x2c, 0x20, 0x22, 0x20, 0x22, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x73, 0x20, 0x3d, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x67, 0x73, 0x75, 0x62, 0x28, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x73, 0x2c, 0x20, 0x22, 0x5c, 0x6e, 0x2b, 0x22, 0x2c, 0x20, 0x22, 0x22, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x5f, 0x2c, 0x20, 0x5f, 0x2c, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x3d, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x66, 0x69, 0x6e, 0x64, 0x28, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x73, 0x2c, 0x20, 0x22, 0x28, 0x5b, 0x5e, 0x25, 0x73, 0x3a, 0x5d, 0x2d, 0x29, 0x3a, 0x25, 0x73, 0x2a, 0x28, 0x2e, 0x2a, 0x29, 0x22, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x5f, 0x4d, 0x2e, 0x70, 0x61, 0x72, 0x73, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x28, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x73, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, 0x20, 0x3d, 0x20, 0x5f, 0x4d, 0x2e, 0x73, 0x70, 0x6c, 0x69, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x28, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x73, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x20, 0x3d, 0x20, 0x7b, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x69, 0x20, 0x3d, 0x20, 0x31, 0x2c, 0x20, 0x23, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, 0x20, 0x64, 0x6f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x3d, 0x20, 0x5f, 0x4d, 0x2e, 0x70, 0x61, 0x72, 0x73, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x28, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, 0x5b, 0x69, 0x5d, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x6c, 0x6f, 0x77, 0x65, 0x72, 0x28, 0x6e, 0x61, 0x6d, 0x65, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5b, 0x6e, 0x61, 0x6d, 0x65, 0x5d, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5b, 0x6e, 0x61, 0x6d, 0x65, 0x5d, 0x20, 0x3d, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5b, 0x6e, 0x61, 0x6d, 0x65, 0x5d, 0x20, 0x2e, 0x2e, 0x20, 0x22, 0x2c, 0x20, 0x22, 0x20, 0x2e, 0x2e, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5b, 0x6e, 0x61, 0x6d, 0x65, 0x5d, 0x20, 0x3d, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x5f, 0x4d, 0x2e, 0x70, 0x61, 0x72, 0x73, 0x65, 0x5f, 0x66, 0x72, 0x6f, 0x6d, 0x28, 0x66, 0x72, 0x6f, 0x6d, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x5f, 0x2c, 0x20, 0x5f, 0x2c, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x20, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x20, 0x3d, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x66, 0x69, 0x6e, 0x64, 0x28, 0x66, 0x72, 0x6f, 0x6d, 0x2c, 0x20, 0x22, 0x5e, 0x25, 0x73, 0x2a, 0x28, 0x2e, 0x2d, 0x29, 0x25, 0x73, 0x2a, 0x25, 0x3c, 0x28, 0x2e, 0x2d, 0x29, 0x25, 0x3e, 0x22, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5f, 0x2c, 0x20, 0x5f, 0x2c, 0x20, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x20, 0x3d, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x66, 0x69, 0x6e, 0x64, 0x28, 0x66, 0x72, 0x6f, 0x6d, 0x2c, 0x20, 0x22, 0x25, 0x73, 0x2a, 0x28, 0x2e, 0x2b, 0x29, 0x25, 0x73, 0x2a, 0x22, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x6f, 0x72, 0x20, 0x22, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x20, 0x3d, 0x20, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x20, 0x6f, 0x72, 0x20, 0x22, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x3d, 0x20, 0x22, 0x22, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x67, 0x73, 0x75, 0x62, 0x28, 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x20, 0x27, 0x22, 0x27, 0x2c, 0x20, 0x22, 0x22, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x20, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x5f, 0x4d, 0x2e, 0x73, 0x70, 0x6c, 0x69, 0x74, 0x5f, 0x6d, 0x62, 0x6f, 0x78, 0x28, 0x6d, 0x62, 0x6f, 0x78, 0x5f, 0x73, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x6d, 0x62, 0x6f, 0x78, 0x20, 0x3d, 0x20, 0x7b, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6d, 0x62, 0x6f, 0x78, 0x5f, 0x73, 0x20, 0x3d, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x67, 0x73, 0x75, 0x62, 0x28, 0x6d, 0x62, 0x6f, 0x78, 0x5f, 0x73, 0x2c, 0x20, 0x22, 0x5c, 0x72, 0x5c, 0x6e, 0x22, 0x2c, 0x20, 0x22, 0x5c, 0x6e, 0x22, 0x29, 0x20, 0x2e, 0x2e, 0x22, 0x5c, 0x6e, 0x5c, 0x6e, 0x46, 0x72, 0x6f, 0x6d, 0x20, 0x5c, 0x6e, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x6e, 0x6a, 0x2c, 0x20, 0x69, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x6a, 0x20, 0x3d, 0x20, 0x31, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x77, 0x68, 0x69, 0x6c, 0x65, 0x20, 0x31, 0x20, 0x64, 0x6f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x2c, 0x20, 0x6e, 0x6a, 0x20, 0x3d, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x66, 0x69, 0x6e, 0x64, 0x28, 0x6d, 0x62, 0x6f, 0x78, 0x5f, 0x73, 0x2c, 0x20, 0x22, 0x5c, 0x6e, 0x5c, 0x6e, 0x46, 0x72, 0x6f, 0x6d, 0x20, 0x2e, 0x2d, 0x5c, 0x6e, 0x22, 0x2c, 0x20, 0x6a, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x69, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x3d, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x73, 0x75, 0x62, 0x28, 0x6d, 0x62, 0x6f, 0x78, 0x5f, 0x73, 0x2c, 0x20, 0x6a, 0x2c, 0x20, 0x69, 0x2d, 0x31, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x28, 0x6d, 0x62, 0x6f, 0x78, 0x2c, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6a, 0x20, 0x3d, 0x20, 0x6e, 0x6a, 0x2b, 0x31, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6d, 0x62, 0x6f, 0x78, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x5f, 0x4d, 0x2e, 0x70, 0x61, 0x72, 0x73, 0x65, 0x28, 0x6d, 0x62, 0x6f, 0x78, 0x5f, 0x73, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x6d, 0x62, 0x6f, 0x78, 0x20, 0x3d, 0x20, 0x5f, 0x4d, 0x2e, 0x73, 0x70, 0x6c, 0x69, 0x74, 0x5f, 0x6d, 0x62, 0x6f, 0x78, 0x28, 0x6d, 0x62, 0x6f, 0x78, 0x5f, 0x73, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x69, 0x20, 0x3d, 0x20, 0x31, 0x2c, 0x20, 0x23, 0x6d, 0x62, 0x6f, 0x78, 0x20, 0x64, 0x6f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6d, 0x62, 0x6f, 0x78, 0x5b, 0x69, 0x5d, 0x20, 0x3d, 0x20, 0x5f, 0x4d, 0x2e, 0x70, 0x61, 0x72, 0x73, 0x65, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x28, 0x6d, 0x62, 0x6f, 0x78, 0x5b, 0x69, 0x5d, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6d, 0x62, 0x6f, 0x78, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x5f, 0x4d, 0x2e, 0x70, 0x61, 0x72, 0x73, 0x65, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x28, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x3d, 0x20, 0x7b, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2c, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x62, 0x6f, 0x64, 0x79, 0x20, 0x3d, 0x20, 0x5f, 0x4d, 0x2e, 0x73, 0x70, 0x6c, 0x69, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x28, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x20, 0x3d, 0x20, 0x5f, 0x4d, 0x2e, 0x70, 0x61, 0x72, 0x73, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x28, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x4d, 0x0a, }; // [mbox.lua] } // love ================================================ FILE: src/libraries/luasocket/libluasocket/mime.c ================================================ /*=========================================================================*\ * MIME support functions * LuaSocket toolkit \*=========================================================================*/ #include "luasocket.h" #include "mime.h" #include #include /*=========================================================================*\ * Don't want to trust escape character constants \*=========================================================================*/ typedef unsigned char UC; static const char CRLF[] = "\r\n"; static const char EQCRLF[] = "=\r\n"; /*=========================================================================*\ * Internal function prototypes. \*=========================================================================*/ static int mime_global_wrp(lua_State *L); static int mime_global_b64(lua_State *L); static int mime_global_unb64(lua_State *L); static int mime_global_qp(lua_State *L); static int mime_global_unqp(lua_State *L); static int mime_global_qpwrp(lua_State *L); static int mime_global_eol(lua_State *L); static int mime_global_dot(lua_State *L); static size_t dot(int c, size_t state, luaL_Buffer *buffer); /*static void b64setup(UC *base);*/ static size_t b64encode(UC c, UC *input, size_t size, luaL_Buffer *buffer); static size_t b64pad(const UC *input, size_t size, luaL_Buffer *buffer); static size_t b64decode(UC c, UC *input, size_t size, luaL_Buffer *buffer); /*static void qpsetup(UC *class, UC *unbase);*/ static void qpquote(UC c, luaL_Buffer *buffer); static size_t qpdecode(UC c, UC *input, size_t size, luaL_Buffer *buffer); static size_t qpencode(UC c, UC *input, size_t size, const char *marker, luaL_Buffer *buffer); static size_t qppad(UC *input, size_t size, luaL_Buffer *buffer); /* code support functions */ static luaL_Reg func[] = { { "dot", mime_global_dot }, { "b64", mime_global_b64 }, { "eol", mime_global_eol }, { "qp", mime_global_qp }, { "qpwrp", mime_global_qpwrp }, { "unb64", mime_global_unb64 }, { "unqp", mime_global_unqp }, { "wrp", mime_global_wrp }, { NULL, NULL } }; /*-------------------------------------------------------------------------*\ * Quoted-printable globals \*-------------------------------------------------------------------------*/ enum {QP_PLAIN, QP_QUOTED, QP_CR, QP_IF_LAST}; static const UC qpclass[] = { QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_IF_LAST, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_CR, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_IF_LAST, QP_PLAIN, QP_PLAIN, QP_PLAIN, QP_PLAIN, QP_PLAIN, QP_PLAIN, QP_PLAIN, QP_PLAIN, QP_PLAIN, QP_PLAIN, QP_PLAIN, QP_PLAIN, QP_PLAIN, QP_PLAIN, QP_PLAIN, QP_PLAIN, QP_PLAIN, QP_PLAIN, QP_PLAIN, QP_PLAIN, QP_PLAIN, QP_PLAIN, QP_PLAIN, QP_PLAIN, QP_PLAIN, QP_PLAIN, QP_PLAIN, QP_PLAIN, QP_QUOTED, QP_PLAIN, QP_PLAIN, QP_PLAIN, QP_PLAIN, QP_PLAIN, QP_PLAIN, QP_PLAIN, QP_PLAIN, QP_PLAIN, QP_PLAIN, QP_PLAIN, QP_PLAIN, QP_PLAIN, QP_PLAIN, QP_PLAIN, QP_PLAIN, QP_PLAIN, QP_PLAIN, QP_PLAIN, QP_PLAIN, QP_PLAIN, QP_PLAIN, QP_PLAIN, QP_PLAIN, QP_PLAIN, QP_PLAIN, QP_PLAIN, QP_PLAIN, QP_PLAIN, QP_PLAIN, QP_PLAIN, QP_PLAIN, QP_PLAIN, QP_PLAIN, QP_PLAIN, QP_PLAIN, QP_PLAIN, QP_PLAIN, QP_PLAIN, QP_PLAIN, QP_PLAIN, QP_PLAIN, QP_PLAIN, QP_PLAIN, QP_PLAIN, QP_PLAIN, QP_PLAIN, QP_PLAIN, QP_PLAIN, QP_PLAIN, QP_PLAIN, QP_PLAIN, QP_PLAIN, QP_PLAIN, QP_PLAIN, QP_PLAIN, QP_PLAIN, QP_PLAIN, QP_PLAIN, QP_PLAIN, QP_PLAIN, QP_PLAIN, QP_PLAIN, QP_PLAIN, QP_PLAIN, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED, QP_QUOTED }; static const UC qpbase[] = "0123456789ABCDEF"; static const UC qpunbase[] = { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 255, 255, 255, 255, 255, 255, 255, 10, 11, 12, 13, 14, 15, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 10, 11, 12, 13, 14, 15, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }; /*-------------------------------------------------------------------------*\ * Base64 globals \*-------------------------------------------------------------------------*/ static const UC b64base[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; static const UC b64unbase[] = { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 62, 255, 255, 255, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 255, 255, 255, 0, 255, 255, 255, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 255, 255, 255, 255, 255, 255, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }; /*=========================================================================*\ * Exported functions \*=========================================================================*/ /*-------------------------------------------------------------------------*\ * Initializes module \*-------------------------------------------------------------------------*/ LUASOCKET_API int luaopen_mime_core(lua_State *L) { lua_newtable(L); luaL_setfuncs(L, func, 0); /* make version string available to scripts */ lua_pushstring(L, "_VERSION"); lua_pushstring(L, MIME_VERSION); lua_rawset(L, -3); /* initialize lookup tables */ /*qpsetup(qpclass, qpunbase);*/ /*b64setup(b64unbase);*/ return 1; } /*=========================================================================*\ * Global Lua functions \*=========================================================================*/ /*-------------------------------------------------------------------------*\ * Incrementaly breaks a string into lines. The string can have CRLF breaks. * A, n = wrp(l, B, length) * A is a copy of B, broken into lines of at most 'length' bytes. * 'l' is how many bytes are left for the first line of B. * 'n' is the number of bytes left in the last line of A. \*-------------------------------------------------------------------------*/ static int mime_global_wrp(lua_State *L) { size_t size = 0; int left = (int) luaL_checknumber(L, 1); const UC *input = (const UC *) luaL_optlstring(L, 2, NULL, &size); const UC *last = input + size; int length = (int) luaL_optnumber(L, 3, 76); luaL_Buffer buffer; /* end of input black-hole */ if (!input) { /* if last line has not been terminated, add a line break */ if (left < length) lua_pushstring(L, CRLF); /* otherwise, we are done */ else lua_pushnil(L); lua_pushnumber(L, length); return 2; } luaL_buffinit(L, &buffer); while (input < last) { switch (*input) { case '\r': break; case '\n': luaL_addstring(&buffer, CRLF); left = length; break; default: if (left <= 0) { left = length; luaL_addstring(&buffer, CRLF); } luaL_addchar(&buffer, *input); left--; break; } input++; } luaL_pushresult(&buffer); lua_pushnumber(L, left); return 2; } #if 0 /*-------------------------------------------------------------------------*\ * Fill base64 decode map. \*-------------------------------------------------------------------------*/ static void b64setup(UC *unbase) { int i; for (i = 0; i <= 255; i++) unbase[i] = (UC) 255; for (i = 0; i < 64; i++) unbase[b64base[i]] = (UC) i; unbase['='] = 0; printf("static const UC b64unbase[] = {\n"); for (int i = 0; i < 256; i++) { printf("%d, ", unbase[i]); } printf("\n}\n;"); } #endif /*-------------------------------------------------------------------------*\ * Acumulates bytes in input buffer until 3 bytes are available. * Translate the 3 bytes into Base64 form and append to buffer. * Returns new number of bytes in buffer. \*-------------------------------------------------------------------------*/ static size_t b64encode(UC c, UC *input, size_t size, luaL_Buffer *buffer) { input[size++] = c; if (size == 3) { UC code[4]; unsigned long value = 0; value += input[0]; value <<= 8; value += input[1]; value <<= 8; value += input[2]; code[3] = b64base[value & 0x3f]; value >>= 6; code[2] = b64base[value & 0x3f]; value >>= 6; code[1] = b64base[value & 0x3f]; value >>= 6; code[0] = b64base[value]; luaL_addlstring(buffer, (char *) code, 4); size = 0; } return size; } /*-------------------------------------------------------------------------*\ * Encodes the Base64 last 1 or 2 bytes and adds padding '=' * Result, if any, is appended to buffer. * Returns 0. \*-------------------------------------------------------------------------*/ static size_t b64pad(const UC *input, size_t size, luaL_Buffer *buffer) { unsigned long value = 0; UC code[4] = {'=', '=', '=', '='}; switch (size) { case 1: value = input[0] << 4; code[1] = b64base[value & 0x3f]; value >>= 6; code[0] = b64base[value]; luaL_addlstring(buffer, (char *) code, 4); break; case 2: value = input[0]; value <<= 8; value |= input[1]; value <<= 2; code[2] = b64base[value & 0x3f]; value >>= 6; code[1] = b64base[value & 0x3f]; value >>= 6; code[0] = b64base[value]; luaL_addlstring(buffer, (char *) code, 4); break; default: break; } return 0; } /*-------------------------------------------------------------------------*\ * Acumulates bytes in input buffer until 4 bytes are available. * Translate the 4 bytes from Base64 form and append to buffer. * Returns new number of bytes in buffer. \*-------------------------------------------------------------------------*/ static size_t b64decode(UC c, UC *input, size_t size, luaL_Buffer *buffer) { /* ignore invalid characters */ if (b64unbase[c] > 64) return size; input[size++] = c; /* decode atom */ if (size == 4) { UC decoded[3]; int valid, value = 0; value = b64unbase[input[0]]; value <<= 6; value |= b64unbase[input[1]]; value <<= 6; value |= b64unbase[input[2]]; value <<= 6; value |= b64unbase[input[3]]; decoded[2] = (UC) (value & 0xff); value >>= 8; decoded[1] = (UC) (value & 0xff); value >>= 8; decoded[0] = (UC) value; /* take care of paddding */ valid = (input[2] == '=') ? 1 : (input[3] == '=') ? 2 : 3; luaL_addlstring(buffer, (char *) decoded, valid); return 0; /* need more data */ } else return size; } /*-------------------------------------------------------------------------*\ * Incrementally applies the Base64 transfer content encoding to a string * A, B = b64(C, D) * A is the encoded version of the largest prefix of C .. D that is * divisible by 3. B has the remaining bytes of C .. D, *without* encoding. * The easiest thing would be to concatenate the two strings and * encode the result, but we can't afford that or Lua would dupplicate * every chunk we received. \*-------------------------------------------------------------------------*/ static int mime_global_b64(lua_State *L) { UC atom[3]; size_t isize = 0, asize = 0; const UC *input = (const UC *) luaL_optlstring(L, 1, NULL, &isize); const UC *last = input + isize; luaL_Buffer buffer; /* end-of-input blackhole */ if (!input) { lua_pushnil(L); lua_pushnil(L); return 2; } /* make sure we don't confuse buffer stuff with arguments */ lua_settop(L, 2); /* process first part of the input */ luaL_buffinit(L, &buffer); while (input < last) asize = b64encode(*input++, atom, asize, &buffer); input = (const UC *) luaL_optlstring(L, 2, NULL, &isize); /* if second part is nil, we are done */ if (!input) { size_t osize = 0; asize = b64pad(atom, asize, &buffer); luaL_pushresult(&buffer); /* if the output is empty and the input is nil, return nil */ lua_tolstring(L, -1, &osize); if (osize == 0) lua_pushnil(L); lua_pushnil(L); return 2; } /* otherwise process the second part */ last = input + isize; while (input < last) asize = b64encode(*input++, atom, asize, &buffer); luaL_pushresult(&buffer); lua_pushlstring(L, (char *) atom, asize); return 2; } /*-------------------------------------------------------------------------*\ * Incrementally removes the Base64 transfer content encoding from a string * A, B = b64(C, D) * A is the encoded version of the largest prefix of C .. D that is * divisible by 4. B has the remaining bytes of C .. D, *without* encoding. \*-------------------------------------------------------------------------*/ static int mime_global_unb64(lua_State *L) { UC atom[4]; size_t isize = 0, asize = 0; const UC *input = (const UC *) luaL_optlstring(L, 1, NULL, &isize); const UC *last = input + isize; luaL_Buffer buffer; /* end-of-input blackhole */ if (!input) { lua_pushnil(L); lua_pushnil(L); return 2; } /* make sure we don't confuse buffer stuff with arguments */ lua_settop(L, 2); /* process first part of the input */ luaL_buffinit(L, &buffer); while (input < last) asize = b64decode(*input++, atom, asize, &buffer); input = (const UC *) luaL_optlstring(L, 2, NULL, &isize); /* if second is nil, we are done */ if (!input) { size_t osize = 0; luaL_pushresult(&buffer); /* if the output is empty and the input is nil, return nil */ lua_tolstring(L, -1, &osize); if (osize == 0) lua_pushnil(L); lua_pushnil(L); return 2; } /* otherwise, process the rest of the input */ last = input + isize; while (input < last) asize = b64decode(*input++, atom, asize, &buffer); luaL_pushresult(&buffer); lua_pushlstring(L, (char *) atom, asize); return 2; } /*-------------------------------------------------------------------------*\ * Quoted-printable encoding scheme * all (except CRLF in text) can be =XX * CLRL in not text must be =XX=XX * 33 through 60 inclusive can be plain * 62 through 126 inclusive can be plain * 9 and 32 can be plain, unless in the end of a line, where must be =XX * encoded lines must be no longer than 76 not counting CRLF * soft line-break are =CRLF * To encode one byte, we need to see the next two. * Worst case is when we see a space, and wonder if a CRLF is comming \*-------------------------------------------------------------------------*/ #if 0 /*-------------------------------------------------------------------------*\ * Split quoted-printable characters into classes * Precompute reverse map for encoding \*-------------------------------------------------------------------------*/ static void qpsetup(UC *cl, UC *unbase) { int i; for (i = 0; i < 256; i++) cl[i] = QP_QUOTED; for (i = 33; i <= 60; i++) cl[i] = QP_PLAIN; for (i = 62; i <= 126; i++) cl[i] = QP_PLAIN; cl['\t'] = QP_IF_LAST; cl[' '] = QP_IF_LAST; cl['\r'] = QP_CR; for (i = 0; i < 256; i++) unbase[i] = 255; unbase['0'] = 0; unbase['1'] = 1; unbase['2'] = 2; unbase['3'] = 3; unbase['4'] = 4; unbase['5'] = 5; unbase['6'] = 6; unbase['7'] = 7; unbase['8'] = 8; unbase['9'] = 9; unbase['A'] = 10; unbase['a'] = 10; unbase['B'] = 11; unbase['b'] = 11; unbase['C'] = 12; unbase['c'] = 12; unbase['D'] = 13; unbase['d'] = 13; unbase['E'] = 14; unbase['e'] = 14; unbase['F'] = 15; unbase['f'] = 15; printf("static UC qpclass[] = {"); for (int i = 0; i < 256; i++) { if (i % 6 == 0) { printf("\n "); } switch(cl[i]) { case QP_QUOTED: printf("QP_QUOTED, "); break; case QP_PLAIN: printf("QP_PLAIN, "); break; case QP_CR: printf("QP_CR, "); break; case QP_IF_LAST: printf("QP_IF_LAST, "); break; } } printf("\n};\n"); printf("static const UC qpunbase[] = {"); for (int i = 0; i < 256; i++) { int c = qpunbase[i]; printf("%d, ", c); } printf("\";\n"); } #endif /*-------------------------------------------------------------------------*\ * Output one character in form =XX \*-------------------------------------------------------------------------*/ static void qpquote(UC c, luaL_Buffer *buffer) { luaL_addchar(buffer, '='); luaL_addchar(buffer, qpbase[c >> 4]); luaL_addchar(buffer, qpbase[c & 0x0F]); } /*-------------------------------------------------------------------------*\ * Accumulate characters until we are sure about how to deal with them. * Once we are sure, output to the buffer, in the correct form. \*-------------------------------------------------------------------------*/ static size_t qpencode(UC c, UC *input, size_t size, const char *marker, luaL_Buffer *buffer) { input[size++] = c; /* deal with all characters we can have */ while (size > 0) { switch (qpclass[input[0]]) { /* might be the CR of a CRLF sequence */ case QP_CR: if (size < 2) return size; if (input[1] == '\n') { luaL_addstring(buffer, marker); return 0; } else qpquote(input[0], buffer); break; /* might be a space and that has to be quoted if last in line */ case QP_IF_LAST: if (size < 3) return size; /* if it is the last, quote it and we are done */ if (input[1] == '\r' && input[2] == '\n') { qpquote(input[0], buffer); luaL_addstring(buffer, marker); return 0; } else luaL_addchar(buffer, input[0]); break; /* might have to be quoted always */ case QP_QUOTED: qpquote(input[0], buffer); break; /* might never have to be quoted */ default: luaL_addchar(buffer, input[0]); break; } input[0] = input[1]; input[1] = input[2]; size--; } return 0; } /*-------------------------------------------------------------------------*\ * Deal with the final characters \*-------------------------------------------------------------------------*/ static size_t qppad(UC *input, size_t size, luaL_Buffer *buffer) { size_t i; for (i = 0; i < size; i++) { if (qpclass[input[i]] == QP_PLAIN) luaL_addchar(buffer, input[i]); else qpquote(input[i], buffer); } if (size > 0) luaL_addstring(buffer, EQCRLF); return 0; } /*-------------------------------------------------------------------------*\ * Incrementally converts a string to quoted-printable * A, B = qp(C, D, marker) * Marker is the text to be used to replace CRLF sequences found in A. * A is the encoded version of the largest prefix of C .. D that * can be encoded without doubts. * B has the remaining bytes of C .. D, *without* encoding. \*-------------------------------------------------------------------------*/ static int mime_global_qp(lua_State *L) { size_t asize = 0, isize = 0; UC atom[3]; const UC *input = (const UC *) luaL_optlstring(L, 1, NULL, &isize); const UC *last = input + isize; const char *marker = luaL_optstring(L, 3, CRLF); luaL_Buffer buffer; /* end-of-input blackhole */ if (!input) { lua_pushnil(L); lua_pushnil(L); return 2; } /* make sure we don't confuse buffer stuff with arguments */ lua_settop(L, 3); /* process first part of input */ luaL_buffinit(L, &buffer); while (input < last) asize = qpencode(*input++, atom, asize, marker, &buffer); input = (const UC *) luaL_optlstring(L, 2, NULL, &isize); /* if second part is nil, we are done */ if (!input) { asize = qppad(atom, asize, &buffer); luaL_pushresult(&buffer); if (!(*lua_tostring(L, -1))) lua_pushnil(L); lua_pushnil(L); return 2; } /* otherwise process rest of input */ last = input + isize; while (input < last) asize = qpencode(*input++, atom, asize, marker, &buffer); luaL_pushresult(&buffer); lua_pushlstring(L, (char *) atom, asize); return 2; } /*-------------------------------------------------------------------------*\ * Accumulate characters until we are sure about how to deal with them. * Once we are sure, output the to the buffer, in the correct form. \*-------------------------------------------------------------------------*/ static size_t qpdecode(UC c, UC *input, size_t size, luaL_Buffer *buffer) { int d; input[size++] = c; /* deal with all characters we can deal */ switch (input[0]) { /* if we have an escape character */ case '=': if (size < 3) return size; /* eliminate soft line break */ if (input[1] == '\r' && input[2] == '\n') return 0; /* decode quoted representation */ c = qpunbase[input[1]]; d = qpunbase[input[2]]; /* if it is an invalid, do not decode */ if (c > 15 || d > 15) luaL_addlstring(buffer, (char *)input, 3); else luaL_addchar(buffer, (char) ((c << 4) + d)); return 0; case '\r': if (size < 2) return size; if (input[1] == '\n') luaL_addlstring(buffer, (char *)input, 2); return 0; default: if (input[0] == '\t' || (input[0] > 31 && input[0] < 127)) luaL_addchar(buffer, input[0]); return 0; } } /*-------------------------------------------------------------------------*\ * Incrementally decodes a string in quoted-printable * A, B = qp(C, D) * A is the decoded version of the largest prefix of C .. D that * can be decoded without doubts. * B has the remaining bytes of C .. D, *without* decoding. \*-------------------------------------------------------------------------*/ static int mime_global_unqp(lua_State *L) { size_t asize = 0, isize = 0; UC atom[3]; const UC *input = (const UC *) luaL_optlstring(L, 1, NULL, &isize); const UC *last = input + isize; luaL_Buffer buffer; /* end-of-input blackhole */ if (!input) { lua_pushnil(L); lua_pushnil(L); return 2; } /* make sure we don't confuse buffer stuff with arguments */ lua_settop(L, 2); /* process first part of input */ luaL_buffinit(L, &buffer); while (input < last) asize = qpdecode(*input++, atom, asize, &buffer); input = (const UC *) luaL_optlstring(L, 2, NULL, &isize); /* if second part is nil, we are done */ if (!input) { luaL_pushresult(&buffer); if (!(*lua_tostring(L, -1))) lua_pushnil(L); lua_pushnil(L); return 2; } /* otherwise process rest of input */ last = input + isize; while (input < last) asize = qpdecode(*input++, atom, asize, &buffer); luaL_pushresult(&buffer); lua_pushlstring(L, (char *) atom, asize); return 2; } /*-------------------------------------------------------------------------*\ * Incrementally breaks a quoted-printed string into lines * A, n = qpwrp(l, B, length) * A is a copy of B, broken into lines of at most 'length' bytes. * 'l' is how many bytes are left for the first line of B. * 'n' is the number of bytes left in the last line of A. * There are two complications: lines can't be broken in the middle * of an encoded =XX, and there might be line breaks already \*-------------------------------------------------------------------------*/ static int mime_global_qpwrp(lua_State *L) { size_t size = 0; int left = (int) luaL_checknumber(L, 1); const UC *input = (const UC *) luaL_optlstring(L, 2, NULL, &size); const UC *last = input + size; int length = (int) luaL_optnumber(L, 3, 76); luaL_Buffer buffer; /* end-of-input blackhole */ if (!input) { if (left < length) lua_pushstring(L, EQCRLF); else lua_pushnil(L); lua_pushnumber(L, length); return 2; } /* process all input */ luaL_buffinit(L, &buffer); while (input < last) { switch (*input) { case '\r': break; case '\n': left = length; luaL_addstring(&buffer, CRLF); break; case '=': if (left <= 3) { left = length; luaL_addstring(&buffer, EQCRLF); } luaL_addchar(&buffer, *input); left--; break; default: if (left <= 1) { left = length; luaL_addstring(&buffer, EQCRLF); } luaL_addchar(&buffer, *input); left--; break; } input++; } luaL_pushresult(&buffer); lua_pushnumber(L, left); return 2; } /*-------------------------------------------------------------------------*\ * Here is what we do: \n, and \r are considered candidates for line * break. We issue *one* new line marker if any of them is seen alone, or * followed by a different one. That is, \n\n and \r\r will issue two * end of line markers each, but \r\n, \n\r etc will only issue *one* * marker. This covers Mac OS, Mac OS X, VMS, Unix and DOS, as well as * probably other more obscure conventions. * * c is the current character being processed * last is the previous character \*-------------------------------------------------------------------------*/ #define eolcandidate(c) (c == '\r' || c == '\n') static int eolprocess(int c, int last, const char *marker, luaL_Buffer *buffer) { if (eolcandidate(c)) { if (eolcandidate(last)) { if (c == last) luaL_addstring(buffer, marker); return 0; } else { luaL_addstring(buffer, marker); return c; } } else { luaL_addchar(buffer, (char) c); return 0; } } /*-------------------------------------------------------------------------*\ * Converts a string to uniform EOL convention. * A, n = eol(o, B, marker) * A is the converted version of the largest prefix of B that can be * converted unambiguously. 'o' is the context returned by the previous * call. 'n' is the new context. \*-------------------------------------------------------------------------*/ static int mime_global_eol(lua_State *L) { int ctx = (int) luaL_checkinteger(L, 1); size_t isize = 0; const char *input = luaL_optlstring(L, 2, NULL, &isize); const char *last = input + isize; const char *marker = luaL_optstring(L, 3, CRLF); luaL_Buffer buffer; luaL_buffinit(L, &buffer); /* end of input blackhole */ if (!input) { lua_pushnil(L); lua_pushnumber(L, 0); return 2; } /* process all input */ while (input < last) ctx = eolprocess(*input++, ctx, marker, &buffer); luaL_pushresult(&buffer); lua_pushnumber(L, ctx); return 2; } /*-------------------------------------------------------------------------*\ * Takes one byte and stuff it if needed. \*-------------------------------------------------------------------------*/ static size_t dot(int c, size_t state, luaL_Buffer *buffer) { luaL_addchar(buffer, (char) c); switch (c) { case '\r': return 1; case '\n': return (state == 1)? 2: 0; case '.': if (state == 2) luaL_addchar(buffer, '.'); /* Falls through. */ default: return 0; } } /*-------------------------------------------------------------------------*\ * Incrementally applies smtp stuffing to a string * A, n = dot(l, D) \*-------------------------------------------------------------------------*/ static int mime_global_dot(lua_State *L) { size_t isize = 0, state = (size_t) luaL_checknumber(L, 1); const char *input = luaL_optlstring(L, 2, NULL, &isize); const char *last = input + isize; luaL_Buffer buffer; /* end-of-input blackhole */ if (!input) { lua_pushnil(L); lua_pushnumber(L, 2); return 2; } /* process all input */ luaL_buffinit(L, &buffer); while (input < last) state = dot(*input++, state, &buffer); luaL_pushresult(&buffer); lua_pushnumber(L, (lua_Number) state); return 2; } ================================================ FILE: src/libraries/luasocket/libluasocket/mime.h ================================================ #ifndef MIME_H #define MIME_H /*=========================================================================*\ * Core MIME support * LuaSocket toolkit * * This module provides functions to implement transfer content encodings * and formatting conforming to RFC 2045. It is used by mime.lua, which * provide a higher level interface to this functionality. \*=========================================================================*/ #include "luasocket.h" /*-------------------------------------------------------------------------*\ * Current MIME library version \*-------------------------------------------------------------------------*/ #define MIME_VERSION "MIME 1.0.3" #define MIME_COPYRIGHT "Copyright (C) 2004-2013 Diego Nehab" #define MIME_AUTHORS "Diego Nehab" LUASOCKET_API int luaopen_mime_core(lua_State *L); #endif /* MIME_H */ ================================================ FILE: src/libraries/luasocket/libluasocket/mime.lua ================================================ ----------------------------------------------------------------------------- -- MIME support for the Lua language. -- Author: Diego Nehab -- Conforming to RFCs 2045-2049 ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- -- Declare module and import dependencies ----------------------------------------------------------------------------- local base = _G local ltn12 = require("ltn12") local mime = require("mime.core") local _M = mime -- encode, decode and wrap algorithm tables local encodet, decodet, wrapt = {},{},{} _M.encodet = encodet _M.decodet = decodet _M.wrapt = wrapt -- creates a function that chooses a filter by name from a given table local function choose(table) return function(name, opt1, opt2) if base.type(name) ~= "string" then name, opt1, opt2 = "default", name, opt1 end local f = table[name or "nil"] if not f then base.error("unknown key (" .. base.tostring(name) .. ")", 3) else return f(opt1, opt2) end end end -- define the encoding filters encodet['base64'] = function() return ltn12.filter.cycle(_M.b64, "") end encodet['quoted-printable'] = function(mode) return ltn12.filter.cycle(_M.qp, "", (mode == "binary") and "=0D=0A" or "\r\n") end -- define the decoding filters decodet['base64'] = function() return ltn12.filter.cycle(_M.unb64, "") end decodet['quoted-printable'] = function() return ltn12.filter.cycle(_M.unqp, "") end -- define the line-wrap filters wrapt['text'] = function(length) length = length or 76 return ltn12.filter.cycle(_M.wrp, length, length) end wrapt['base64'] = wrapt['text'] wrapt['default'] = wrapt['text'] wrapt['quoted-printable'] = function() return ltn12.filter.cycle(_M.qpwrp, 76, 76) end -- function that choose the encoding, decoding or wrap algorithm _M.encode = choose(encodet) _M.decode = choose(decodet) _M.wrap = choose(wrapt) -- define the end-of-line normalization filter function _M.normalize(marker) return ltn12.filter.cycle(_M.eol, 0, marker) end -- high level stuffing filter function _M.stuff() return ltn12.filter.cycle(_M.dot, 2) end return _M ================================================ FILE: src/libraries/luasocket/libluasocket/mime.lua.h ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ namespace love { // [mime.lua] const unsigned char mime_lua[] = { 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x2d, 0x2d, 0x20, 0x4d, 0x49, 0x4d, 0x45, 0x20, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x4c, 0x75, 0x61, 0x20, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x2e, 0x0a, 0x2d, 0x2d, 0x20, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x3a, 0x20, 0x44, 0x69, 0x65, 0x67, 0x6f, 0x20, 0x4e, 0x65, 0x68, 0x61, 0x62, 0x0a, 0x2d, 0x2d, 0x20, 0x43, 0x6f, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x6f, 0x20, 0x52, 0x46, 0x43, 0x73, 0x20, 0x32, 0x30, 0x34, 0x35, 0x2d, 0x32, 0x30, 0x34, 0x39, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x2d, 0x2d, 0x20, 0x44, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x20, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x20, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x62, 0x61, 0x73, 0x65, 0x20, 0x3d, 0x20, 0x5f, 0x47, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x6c, 0x74, 0x6e, 0x31, 0x32, 0x20, 0x3d, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x28, 0x22, 0x6c, 0x74, 0x6e, 0x31, 0x32, 0x22, 0x29, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x6d, 0x69, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x28, 0x22, 0x6d, 0x69, 0x6d, 0x65, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x22, 0x29, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x5f, 0x4d, 0x20, 0x3d, 0x20, 0x6d, 0x69, 0x6d, 0x65, 0x0a, 0x0a, 0x2d, 0x2d, 0x20, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x2c, 0x20, 0x64, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x77, 0x72, 0x61, 0x70, 0x20, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x20, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x74, 0x2c, 0x20, 0x64, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x74, 0x2c, 0x20, 0x77, 0x72, 0x61, 0x70, 0x74, 0x20, 0x3d, 0x20, 0x7b, 0x7d, 0x2c, 0x7b, 0x7d, 0x2c, 0x7b, 0x7d, 0x0a, 0x0a, 0x5f, 0x4d, 0x2e, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x74, 0x20, 0x3d, 0x20, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x74, 0x0a, 0x5f, 0x4d, 0x2e, 0x64, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x74, 0x20, 0x3d, 0x20, 0x64, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x74, 0x0a, 0x5f, 0x4d, 0x2e, 0x77, 0x72, 0x61, 0x70, 0x74, 0x20, 0x20, 0x20, 0x3d, 0x20, 0x77, 0x72, 0x61, 0x70, 0x74, 0x0a, 0x0a, 0x2d, 0x2d, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x73, 0x20, 0x61, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x63, 0x68, 0x6f, 0x6f, 0x73, 0x65, 0x73, 0x20, 0x61, 0x20, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x20, 0x62, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x61, 0x20, 0x67, 0x69, 0x76, 0x65, 0x6e, 0x20, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x63, 0x68, 0x6f, 0x6f, 0x73, 0x65, 0x28, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x20, 0x6f, 0x70, 0x74, 0x31, 0x2c, 0x20, 0x6f, 0x70, 0x74, 0x32, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x28, 0x6e, 0x61, 0x6d, 0x65, 0x29, 0x20, 0x7e, 0x3d, 0x20, 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x20, 0x6f, 0x70, 0x74, 0x31, 0x2c, 0x20, 0x6f, 0x70, 0x74, 0x32, 0x20, 0x3d, 0x20, 0x22, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x22, 0x2c, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x20, 0x6f, 0x70, 0x74, 0x31, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x66, 0x20, 0x3d, 0x20, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5b, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x6f, 0x72, 0x20, 0x22, 0x6e, 0x69, 0x6c, 0x22, 0x5d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x66, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x28, 0x22, 0x75, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x20, 0x6b, 0x65, 0x79, 0x20, 0x28, 0x22, 0x20, 0x2e, 0x2e, 0x20, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x74, 0x6f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x28, 0x6e, 0x61, 0x6d, 0x65, 0x29, 0x20, 0x2e, 0x2e, 0x20, 0x22, 0x29, 0x22, 0x2c, 0x20, 0x33, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x66, 0x28, 0x6f, 0x70, 0x74, 0x31, 0x2c, 0x20, 0x6f, 0x70, 0x74, 0x32, 0x29, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x2d, 0x2d, 0x20, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x0a, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x74, 0x5b, 0x27, 0x62, 0x61, 0x73, 0x65, 0x36, 0x34, 0x27, 0x5d, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6c, 0x74, 0x6e, 0x31, 0x32, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x28, 0x5f, 0x4d, 0x2e, 0x62, 0x36, 0x34, 0x2c, 0x20, 0x22, 0x22, 0x29, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x74, 0x5b, 0x27, 0x71, 0x75, 0x6f, 0x74, 0x65, 0x64, 0x2d, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x27, 0x5d, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6d, 0x6f, 0x64, 0x65, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6c, 0x74, 0x6e, 0x31, 0x32, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x28, 0x5f, 0x4d, 0x2e, 0x71, 0x70, 0x2c, 0x20, 0x22, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x28, 0x6d, 0x6f, 0x64, 0x65, 0x20, 0x3d, 0x3d, 0x20, 0x22, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x22, 0x29, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x22, 0x3d, 0x30, 0x44, 0x3d, 0x30, 0x41, 0x22, 0x20, 0x6f, 0x72, 0x20, 0x22, 0x5c, 0x72, 0x5c, 0x6e, 0x22, 0x29, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x2d, 0x2d, 0x20, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x64, 0x65, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x0a, 0x64, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x74, 0x5b, 0x27, 0x62, 0x61, 0x73, 0x65, 0x36, 0x34, 0x27, 0x5d, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6c, 0x74, 0x6e, 0x31, 0x32, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x28, 0x5f, 0x4d, 0x2e, 0x75, 0x6e, 0x62, 0x36, 0x34, 0x2c, 0x20, 0x22, 0x22, 0x29, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x64, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x74, 0x5b, 0x27, 0x71, 0x75, 0x6f, 0x74, 0x65, 0x64, 0x2d, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x27, 0x5d, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6c, 0x74, 0x6e, 0x31, 0x32, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x28, 0x5f, 0x4d, 0x2e, 0x75, 0x6e, 0x71, 0x70, 0x2c, 0x20, 0x22, 0x22, 0x29, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x2d, 0x2d, 0x20, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6c, 0x69, 0x6e, 0x65, 0x2d, 0x77, 0x72, 0x61, 0x70, 0x20, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x0a, 0x77, 0x72, 0x61, 0x70, 0x74, 0x5b, 0x27, 0x74, 0x65, 0x78, 0x74, 0x27, 0x5d, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x20, 0x3d, 0x20, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x20, 0x6f, 0x72, 0x20, 0x37, 0x36, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6c, 0x74, 0x6e, 0x31, 0x32, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x28, 0x5f, 0x4d, 0x2e, 0x77, 0x72, 0x70, 0x2c, 0x20, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x2c, 0x20, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x29, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x77, 0x72, 0x61, 0x70, 0x74, 0x5b, 0x27, 0x62, 0x61, 0x73, 0x65, 0x36, 0x34, 0x27, 0x5d, 0x20, 0x3d, 0x20, 0x77, 0x72, 0x61, 0x70, 0x74, 0x5b, 0x27, 0x74, 0x65, 0x78, 0x74, 0x27, 0x5d, 0x0a, 0x77, 0x72, 0x61, 0x70, 0x74, 0x5b, 0x27, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x27, 0x5d, 0x20, 0x3d, 0x20, 0x77, 0x72, 0x61, 0x70, 0x74, 0x5b, 0x27, 0x74, 0x65, 0x78, 0x74, 0x27, 0x5d, 0x0a, 0x0a, 0x77, 0x72, 0x61, 0x70, 0x74, 0x5b, 0x27, 0x71, 0x75, 0x6f, 0x74, 0x65, 0x64, 0x2d, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x27, 0x5d, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6c, 0x74, 0x6e, 0x31, 0x32, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x28, 0x5f, 0x4d, 0x2e, 0x71, 0x70, 0x77, 0x72, 0x70, 0x2c, 0x20, 0x37, 0x36, 0x2c, 0x20, 0x37, 0x36, 0x29, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x2d, 0x2d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x63, 0x68, 0x6f, 0x6f, 0x73, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x2c, 0x20, 0x64, 0x65, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x72, 0x20, 0x77, 0x72, 0x61, 0x70, 0x20, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x0a, 0x5f, 0x4d, 0x2e, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x3d, 0x20, 0x63, 0x68, 0x6f, 0x6f, 0x73, 0x65, 0x28, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x74, 0x29, 0x0a, 0x5f, 0x4d, 0x2e, 0x64, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x3d, 0x20, 0x63, 0x68, 0x6f, 0x6f, 0x73, 0x65, 0x28, 0x64, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x74, 0x29, 0x0a, 0x5f, 0x4d, 0x2e, 0x77, 0x72, 0x61, 0x70, 0x20, 0x3d, 0x20, 0x63, 0x68, 0x6f, 0x6f, 0x73, 0x65, 0x28, 0x77, 0x72, 0x61, 0x70, 0x74, 0x29, 0x0a, 0x0a, 0x2d, 0x2d, 0x20, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x65, 0x6e, 0x64, 0x2d, 0x6f, 0x66, 0x2d, 0x6c, 0x69, 0x6e, 0x65, 0x20, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x5f, 0x4d, 0x2e, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x28, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x72, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6c, 0x74, 0x6e, 0x31, 0x32, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x28, 0x5f, 0x4d, 0x2e, 0x65, 0x6f, 0x6c, 0x2c, 0x20, 0x30, 0x2c, 0x20, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x72, 0x29, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x2d, 0x2d, 0x20, 0x68, 0x69, 0x67, 0x68, 0x20, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x20, 0x73, 0x74, 0x75, 0x66, 0x66, 0x69, 0x6e, 0x67, 0x20, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x5f, 0x4d, 0x2e, 0x73, 0x74, 0x75, 0x66, 0x66, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6c, 0x74, 0x6e, 0x31, 0x32, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x28, 0x5f, 0x4d, 0x2e, 0x64, 0x6f, 0x74, 0x2c, 0x20, 0x32, 0x29, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x4d, 0x0a, }; // [mime.lua] } // love ================================================ FILE: src/libraries/luasocket/libluasocket/options.c ================================================ /*=========================================================================*\ * Common option interface * LuaSocket toolkit \*=========================================================================*/ #include "luasocket.h" #include "auxiliar.h" #include "options.h" #include "inet.h" #include /*=========================================================================*\ * Internal functions prototypes \*=========================================================================*/ static int opt_setmembership(lua_State *L, p_socket ps, int level, int name); static int opt_ip6_setmembership(lua_State *L, p_socket ps, int level, int name); static int opt_setboolean(lua_State *L, p_socket ps, int level, int name); static int opt_getboolean(lua_State *L, p_socket ps, int level, int name); static int opt_setint(lua_State *L, p_socket ps, int level, int name); static int opt_getint(lua_State *L, p_socket ps, int level, int name); static int opt_set(lua_State *L, p_socket ps, int level, int name, void *val, int len); static int opt_get(lua_State *L, p_socket ps, int level, int name, void *val, int* len); /*=========================================================================*\ * Exported functions \*=========================================================================*/ /*-------------------------------------------------------------------------*\ * Calls appropriate option handler \*-------------------------------------------------------------------------*/ int opt_meth_setoption(lua_State *L, p_opt opt, p_socket ps) { const char *name = luaL_checkstring(L, 2); /* obj, name, ... */ while (opt->name && strcmp(name, opt->name)) opt++; if (!opt->func) { char msg[57]; sprintf(msg, "unsupported option `%.35s'", name); luaL_argerror(L, 2, msg); } return opt->func(L, ps); } int opt_meth_getoption(lua_State *L, p_opt opt, p_socket ps) { const char *name = luaL_checkstring(L, 2); /* obj, name, ... */ while (opt->name && strcmp(name, opt->name)) opt++; if (!opt->func) { char msg[57]; sprintf(msg, "unsupported option `%.35s'", name); luaL_argerror(L, 2, msg); } return opt->func(L, ps); } /*------------------------------------------------------*/ /* binds socket to network interface */ int opt_set_bindtodevice(lua_State *L, p_socket ps) { #ifndef SO_BINDTODEVICE return luaL_error(L, "SO_BINDTODEVICE is not supported on this operating system"); #else const char *dev = luaL_checkstring(L, 3); return opt_set(L, ps, SOL_SOCKET, SO_BINDTODEVICE, (char*)dev, strlen(dev)+1); #endif } int opt_get_bindtodevice(lua_State *L, p_socket ps) { #ifndef SO_BINDTODEVICE return luaL_error(L, "SO_BINDTODEVICE is not supported on this operating system"); #else char dev[IFNAMSIZ]; int len = sizeof(dev); int err = opt_get(L, ps, SOL_SOCKET, SO_BINDTODEVICE, &dev, &len); if (err) return err; lua_pushstring(L, dev); return 1; #endif } /*------------------------------------------------------*/ /* enables reuse of local address */ int opt_set_reuseaddr(lua_State *L, p_socket ps) { return opt_setboolean(L, ps, SOL_SOCKET, SO_REUSEADDR); } int opt_get_reuseaddr(lua_State *L, p_socket ps) { return opt_getboolean(L, ps, SOL_SOCKET, SO_REUSEADDR); } /*------------------------------------------------------*/ /* enables reuse of local port */ int opt_set_reuseport(lua_State *L, p_socket ps) { return opt_setboolean(L, ps, SOL_SOCKET, SO_REUSEPORT); } int opt_get_reuseport(lua_State *L, p_socket ps) { return opt_getboolean(L, ps, SOL_SOCKET, SO_REUSEPORT); } /*------------------------------------------------------*/ /* disables the Nagle algorithm */ int opt_set_tcp_nodelay(lua_State *L, p_socket ps) { return opt_setboolean(L, ps, IPPROTO_TCP, TCP_NODELAY); } int opt_get_tcp_nodelay(lua_State *L, p_socket ps) { return opt_getboolean(L, ps, IPPROTO_TCP, TCP_NODELAY); } /*------------------------------------------------------*/ #ifdef TCP_KEEPIDLE int opt_get_tcp_keepidle(lua_State *L, p_socket ps) { return opt_getint(L, ps, IPPROTO_TCP, TCP_KEEPIDLE); } int opt_set_tcp_keepidle(lua_State *L, p_socket ps) { return opt_setint(L, ps, IPPROTO_TCP, TCP_KEEPIDLE); } #endif /*------------------------------------------------------*/ #ifdef TCP_KEEPCNT int opt_get_tcp_keepcnt(lua_State *L, p_socket ps) { return opt_getint(L, ps, IPPROTO_TCP, TCP_KEEPCNT); } int opt_set_tcp_keepcnt(lua_State *L, p_socket ps) { return opt_setint(L, ps, IPPROTO_TCP, TCP_KEEPCNT); } #endif /*------------------------------------------------------*/ #ifdef TCP_KEEPINTVL int opt_get_tcp_keepintvl(lua_State *L, p_socket ps) { return opt_getint(L, ps, IPPROTO_TCP, TCP_KEEPINTVL); } int opt_set_tcp_keepintvl(lua_State *L, p_socket ps) { return opt_setint(L, ps, IPPROTO_TCP, TCP_KEEPINTVL); } #endif /*------------------------------------------------------*/ int opt_set_keepalive(lua_State *L, p_socket ps) { return opt_setboolean(L, ps, SOL_SOCKET, SO_KEEPALIVE); } int opt_get_keepalive(lua_State *L, p_socket ps) { return opt_getboolean(L, ps, SOL_SOCKET, SO_KEEPALIVE); } /*------------------------------------------------------*/ int opt_set_dontroute(lua_State *L, p_socket ps) { return opt_setboolean(L, ps, SOL_SOCKET, SO_DONTROUTE); } int opt_get_dontroute(lua_State *L, p_socket ps) { return opt_getboolean(L, ps, SOL_SOCKET, SO_DONTROUTE); } /*------------------------------------------------------*/ int opt_set_broadcast(lua_State *L, p_socket ps) { return opt_setboolean(L, ps, SOL_SOCKET, SO_BROADCAST); } int opt_get_broadcast(lua_State *L, p_socket ps) { return opt_getboolean(L, ps, SOL_SOCKET, SO_BROADCAST); } /*------------------------------------------------------*/ int opt_set_recv_buf_size(lua_State *L, p_socket ps) { return opt_setint(L, ps, SOL_SOCKET, SO_RCVBUF); } int opt_get_recv_buf_size(lua_State *L, p_socket ps) { return opt_getint(L, ps, SOL_SOCKET, SO_RCVBUF); } /*------------------------------------------------------*/ int opt_get_send_buf_size(lua_State *L, p_socket ps) { return opt_getint(L, ps, SOL_SOCKET, SO_SNDBUF); } int opt_set_send_buf_size(lua_State *L, p_socket ps) { return opt_setint(L, ps, SOL_SOCKET, SO_SNDBUF); } /*------------------------------------------------------*/ #ifdef TCP_FASTOPEN int opt_set_tcp_fastopen(lua_State *L, p_socket ps) { return opt_setint(L, ps, IPPROTO_TCP, TCP_FASTOPEN); } #endif #ifdef TCP_FASTOPEN_CONNECT int opt_set_tcp_fastopen_connect(lua_State *L, p_socket ps) { return opt_setint(L, ps, IPPROTO_TCP, TCP_FASTOPEN_CONNECT); } #endif /*------------------------------------------------------*/ #ifdef TCP_DEFER_ACCEPT int opt_set_tcp_defer_accept(lua_State *L, p_socket ps) { return opt_setint(L, ps, IPPROTO_TCP, TCP_DEFER_ACCEPT); } #endif /*------------------------------------------------------*/ int opt_set_ip6_unicast_hops(lua_State *L, p_socket ps) { return opt_setint(L, ps, IPPROTO_IPV6, IPV6_UNICAST_HOPS); } int opt_get_ip6_unicast_hops(lua_State *L, p_socket ps) { return opt_getint(L, ps, IPPROTO_IPV6, IPV6_UNICAST_HOPS); } /*------------------------------------------------------*/ int opt_set_ip6_multicast_hops(lua_State *L, p_socket ps) { return opt_setint(L, ps, IPPROTO_IPV6, IPV6_MULTICAST_HOPS); } int opt_get_ip6_multicast_hops(lua_State *L, p_socket ps) { return opt_getint(L, ps, IPPROTO_IPV6, IPV6_MULTICAST_HOPS); } /*------------------------------------------------------*/ int opt_set_ip_multicast_loop(lua_State *L, p_socket ps) { return opt_setboolean(L, ps, IPPROTO_IP, IP_MULTICAST_LOOP); } int opt_get_ip_multicast_loop(lua_State *L, p_socket ps) { return opt_getboolean(L, ps, IPPROTO_IP, IP_MULTICAST_LOOP); } /*------------------------------------------------------*/ int opt_set_ip6_multicast_loop(lua_State *L, p_socket ps) { return opt_setboolean(L, ps, IPPROTO_IPV6, IPV6_MULTICAST_LOOP); } int opt_get_ip6_multicast_loop(lua_State *L, p_socket ps) { return opt_getboolean(L, ps, IPPROTO_IPV6, IPV6_MULTICAST_LOOP); } /*------------------------------------------------------*/ int opt_set_linger(lua_State *L, p_socket ps) { struct linger li; /* obj, name, table */ if (!lua_istable(L, 3)) auxiliar_typeerror(L,3,lua_typename(L, LUA_TTABLE)); lua_pushstring(L, "on"); lua_gettable(L, 3); if (!lua_isboolean(L, -1)) luaL_argerror(L, 3, "boolean 'on' field expected"); li.l_onoff = (u_short) lua_toboolean(L, -1); lua_pushstring(L, "timeout"); lua_gettable(L, 3); if (!lua_isnumber(L, -1)) luaL_argerror(L, 3, "number 'timeout' field expected"); li.l_linger = (u_short) lua_tonumber(L, -1); return opt_set(L, ps, SOL_SOCKET, SO_LINGER, (char *) &li, sizeof(li)); } int opt_get_linger(lua_State *L, p_socket ps) { struct linger li; /* obj, name */ int len = sizeof(li); int err = opt_get(L, ps, SOL_SOCKET, SO_LINGER, (char *) &li, &len); if (err) return err; lua_newtable(L); lua_pushboolean(L, li.l_onoff); lua_setfield(L, -2, "on"); lua_pushinteger(L, li.l_linger); lua_setfield(L, -2, "timeout"); return 1; } /*------------------------------------------------------*/ int opt_set_ip_multicast_ttl(lua_State *L, p_socket ps) { return opt_setint(L, ps, IPPROTO_IP, IP_MULTICAST_TTL); } /*------------------------------------------------------*/ int opt_set_ip_multicast_if(lua_State *L, p_socket ps) { const char *address = luaL_checkstring(L, 3); /* obj, name, ip */ struct in_addr val; val.s_addr = htonl(INADDR_ANY); if (strcmp(address, "*") && !inet_aton(address, &val)) luaL_argerror(L, 3, "ip expected"); return opt_set(L, ps, IPPROTO_IP, IP_MULTICAST_IF, (char *) &val, sizeof(val)); } int opt_get_ip_multicast_if(lua_State *L, p_socket ps) { struct in_addr val; socklen_t len = sizeof(val); if (getsockopt(*ps, IPPROTO_IP, IP_MULTICAST_IF, (char *) &val, &len) < 0) { lua_pushnil(L); lua_pushstring(L, "getsockopt failed"); return 2; } lua_pushstring(L, inet_ntoa(val)); return 1; } /*------------------------------------------------------*/ int opt_set_ip_add_membership(lua_State *L, p_socket ps) { return opt_setmembership(L, ps, IPPROTO_IP, IP_ADD_MEMBERSHIP); } int opt_set_ip_drop_membersip(lua_State *L, p_socket ps) { return opt_setmembership(L, ps, IPPROTO_IP, IP_DROP_MEMBERSHIP); } /*------------------------------------------------------*/ int opt_set_ip6_add_membership(lua_State *L, p_socket ps) { return opt_ip6_setmembership(L, ps, IPPROTO_IPV6, IPV6_ADD_MEMBERSHIP); } int opt_set_ip6_drop_membersip(lua_State *L, p_socket ps) { return opt_ip6_setmembership(L, ps, IPPROTO_IPV6, IPV6_DROP_MEMBERSHIP); } /*------------------------------------------------------*/ int opt_get_ip6_v6only(lua_State *L, p_socket ps) { return opt_getboolean(L, ps, IPPROTO_IPV6, IPV6_V6ONLY); } int opt_set_ip6_v6only(lua_State *L, p_socket ps) { return opt_setboolean(L, ps, IPPROTO_IPV6, IPV6_V6ONLY); } /*------------------------------------------------------*/ int opt_get_error(lua_State *L, p_socket ps) { int val = 0; socklen_t len = sizeof(val); if (getsockopt(*ps, SOL_SOCKET, SO_ERROR, (char *) &val, &len) < 0) { lua_pushnil(L); lua_pushstring(L, "getsockopt failed"); return 2; } lua_pushstring(L, socket_strerror(val)); return 1; } /*=========================================================================*\ * Auxiliar functions \*=========================================================================*/ static int opt_setmembership(lua_State *L, p_socket ps, int level, int name) { struct ip_mreq val; /* obj, name, table */ if (!lua_istable(L, 3)) auxiliar_typeerror(L,3,lua_typename(L, LUA_TTABLE)); lua_pushstring(L, "multiaddr"); lua_gettable(L, 3); if (!lua_isstring(L, -1)) luaL_argerror(L, 3, "string 'multiaddr' field expected"); if (!inet_aton(lua_tostring(L, -1), &val.imr_multiaddr)) luaL_argerror(L, 3, "invalid 'multiaddr' ip address"); lua_pushstring(L, "interface"); lua_gettable(L, 3); if (!lua_isstring(L, -1)) luaL_argerror(L, 3, "string 'interface' field expected"); val.imr_interface.s_addr = htonl(INADDR_ANY); if (strcmp(lua_tostring(L, -1), "*") && !inet_aton(lua_tostring(L, -1), &val.imr_interface)) luaL_argerror(L, 3, "invalid 'interface' ip address"); return opt_set(L, ps, level, name, (char *) &val, sizeof(val)); } static int opt_ip6_setmembership(lua_State *L, p_socket ps, int level, int name) { struct ipv6_mreq val; /* obj, opt-name, table */ memset(&val, 0, sizeof(val)); if (!lua_istable(L, 3)) auxiliar_typeerror(L,3,lua_typename(L, LUA_TTABLE)); lua_pushstring(L, "multiaddr"); lua_gettable(L, 3); if (!lua_isstring(L, -1)) luaL_argerror(L, 3, "string 'multiaddr' field expected"); if (!inet_pton(AF_INET6, lua_tostring(L, -1), &val.ipv6mr_multiaddr)) luaL_argerror(L, 3, "invalid 'multiaddr' ip address"); lua_pushstring(L, "interface"); lua_gettable(L, 3); /* By default we listen to interface on default route * (sigh). However, interface= can override it. We should * support either number, or name for it. Waiting for * windows port of if_nametoindex */ if (!lua_isnil(L, -1)) { if (lua_isnumber(L, -1)) { val.ipv6mr_interface = (unsigned int) lua_tonumber(L, -1); } else luaL_argerror(L, -1, "number 'interface' field expected"); } return opt_set(L, ps, level, name, (char *) &val, sizeof(val)); } static int opt_get(lua_State *L, p_socket ps, int level, int name, void *val, int* len) { socklen_t socklen = *len; if (getsockopt(*ps, level, name, (char *) val, &socklen) < 0) { lua_pushnil(L); lua_pushstring(L, "getsockopt failed"); return 2; } *len = socklen; return 0; } static int opt_set(lua_State *L, p_socket ps, int level, int name, void *val, int len) { if (setsockopt(*ps, level, name, (char *) val, len) < 0) { lua_pushnil(L); lua_pushstring(L, "setsockopt failed"); return 2; } lua_pushnumber(L, 1); return 1; } static int opt_getboolean(lua_State *L, p_socket ps, int level, int name) { int val = 0; int len = sizeof(val); int err = opt_get(L, ps, level, name, (char *) &val, &len); if (err) return err; lua_pushboolean(L, val); return 1; } static int opt_setboolean(lua_State *L, p_socket ps, int level, int name) { int val = auxiliar_checkboolean(L, 3); /* obj, name, bool */ return opt_set(L, ps, level, name, (char *) &val, sizeof(val)); } static int opt_getint(lua_State *L, p_socket ps, int level, int name) { int val = 0; int len = sizeof(val); int err = opt_get(L, ps, level, name, (char *) &val, &len); if (err) return err; lua_pushnumber(L, val); return 1; } static int opt_setint(lua_State *L, p_socket ps, int level, int name) { int val = (int) lua_tonumber(L, 3); /* obj, name, int */ return opt_set(L, ps, level, name, (char *) &val, sizeof(val)); } ================================================ FILE: src/libraries/luasocket/libluasocket/options.h ================================================ #ifndef OPTIONS_H #define OPTIONS_H /*=========================================================================*\ * Common option interface * LuaSocket toolkit * * This module provides a common interface to socket options, used mainly by * modules UDP and TCP. \*=========================================================================*/ #include "luasocket.h" #include "socket.h" /* option registry */ typedef struct t_opt { const char *name; int (*func)(lua_State *L, p_socket ps); } t_opt; typedef t_opt *p_opt; #ifndef _WIN32 #pragma GCC visibility push(hidden) #endif int opt_meth_setoption(lua_State *L, p_opt opt, p_socket ps); int opt_meth_getoption(lua_State *L, p_opt opt, p_socket ps); int opt_set_reuseaddr(lua_State *L, p_socket ps); int opt_get_reuseaddr(lua_State *L, p_socket ps); int opt_set_reuseport(lua_State *L, p_socket ps); int opt_get_reuseport(lua_State *L, p_socket ps); int opt_set_tcp_nodelay(lua_State *L, p_socket ps); int opt_get_tcp_nodelay(lua_State *L, p_socket ps); #ifdef TCP_KEEPIDLE int opt_set_tcp_keepidle(lua_State *L, p_socket ps); int opt_get_tcp_keepidle(lua_State *L, p_socket ps); #endif #ifdef TCP_KEEPCNT int opt_set_tcp_keepcnt(lua_State *L, p_socket ps); int opt_get_tcp_keepcnt(lua_State *L, p_socket ps); #endif #ifdef TCP_KEEPINTVL int opt_set_tcp_keepintvl(lua_State *L, p_socket ps); int opt_get_tcp_keepintvl(lua_State *L, p_socket ps); #endif #ifdef TCP_DEFER_ACCEPT int opt_set_tcp_defer_accept(lua_State *L, p_socket ps); #endif int opt_set_bindtodevice(lua_State *L, p_socket ps); int opt_get_bindtodevice(lua_State *L, p_socket ps); int opt_set_keepalive(lua_State *L, p_socket ps); int opt_get_keepalive(lua_State *L, p_socket ps); int opt_set_dontroute(lua_State *L, p_socket ps); int opt_get_dontroute(lua_State *L, p_socket ps); int opt_set_broadcast(lua_State *L, p_socket ps); int opt_get_broadcast(lua_State *L, p_socket ps); int opt_set_recv_buf_size(lua_State *L, p_socket ps); int opt_get_recv_buf_size(lua_State *L, p_socket ps); int opt_set_send_buf_size(lua_State *L, p_socket ps); int opt_get_send_buf_size(lua_State *L, p_socket ps); #ifdef TCP_FASTOPEN int opt_set_tcp_fastopen(lua_State *L, p_socket ps); #endif #ifdef TCP_FASTOPEN_CONNECT int opt_set_tcp_fastopen_connect(lua_State *L, p_socket ps); #endif int opt_set_ip6_unicast_hops(lua_State *L, p_socket ps); int opt_get_ip6_unicast_hops(lua_State *L, p_socket ps); int opt_set_ip6_multicast_hops(lua_State *L, p_socket ps); int opt_get_ip6_multicast_hops(lua_State *L, p_socket ps); int opt_set_ip_multicast_loop(lua_State *L, p_socket ps); int opt_get_ip_multicast_loop(lua_State *L, p_socket ps); int opt_set_ip6_multicast_loop(lua_State *L, p_socket ps); int opt_get_ip6_multicast_loop(lua_State *L, p_socket ps); int opt_set_linger(lua_State *L, p_socket ps); int opt_get_linger(lua_State *L, p_socket ps); int opt_set_ip_multicast_ttl(lua_State *L, p_socket ps); int opt_set_ip_multicast_if(lua_State *L, p_socket ps); int opt_get_ip_multicast_if(lua_State *L, p_socket ps); int opt_set_ip_add_membership(lua_State *L, p_socket ps); int opt_set_ip_drop_membersip(lua_State *L, p_socket ps); int opt_set_ip6_add_membership(lua_State *L, p_socket ps); int opt_set_ip6_drop_membersip(lua_State *L, p_socket ps); int opt_set_ip6_v6only(lua_State *L, p_socket ps); int opt_get_ip6_v6only(lua_State *L, p_socket ps); int opt_get_error(lua_State *L, p_socket ps); #ifndef _WIN32 #pragma GCC visibility pop #endif #endif ================================================ FILE: src/libraries/luasocket/libluasocket/pierror.h ================================================ #ifndef PIERROR_H #define PIERROR_H /*=========================================================================*\ * Error messages * Defines platform independent error messages \*=========================================================================*/ #define PIE_HOST_NOT_FOUND "host not found" #define PIE_ADDRINUSE "address already in use" #define PIE_ISCONN "already connected" #define PIE_ACCESS "permission denied" #define PIE_CONNREFUSED "connection refused" #define PIE_CONNABORTED "closed" #define PIE_CONNRESET "closed" #define PIE_TIMEDOUT "timeout" #define PIE_AGAIN "temporary failure in name resolution" #define PIE_BADFLAGS "invalid value for ai_flags" #define PIE_BADHINTS "invalid value for hints" #define PIE_FAIL "non-recoverable failure in name resolution" #define PIE_FAMILY "ai_family not supported" #define PIE_MEMORY "memory allocation failure" #define PIE_NONAME "host or service not provided, or not known" #define PIE_OVERFLOW "argument buffer overflow" #define PIE_PROTOCOL "resolved protocol is unknown" #define PIE_SERVICE "service not supported for socket type" #define PIE_SOCKTYPE "ai_socktype not supported" #endif ================================================ FILE: src/libraries/luasocket/libluasocket/select.c ================================================ /*=========================================================================*\ * Select implementation * LuaSocket toolkit \*=========================================================================*/ #include "luasocket.h" #include "socket.h" #include "timeout.h" #include "select.h" #include /*=========================================================================*\ * Internal function prototypes. \*=========================================================================*/ static t_socket getfd(lua_State *L); static int dirty(lua_State *L); static void collect_fd(lua_State *L, int tab, int itab, fd_set *set, t_socket *max_fd); static int check_dirty(lua_State *L, int tab, int dtab, fd_set *set); static void return_fd(lua_State *L, fd_set *set, t_socket max_fd, int itab, int tab, int start); static void make_assoc(lua_State *L, int tab); static int global_select(lua_State *L); /* functions in library namespace */ static luaL_Reg func[] = { {"select", global_select}, {NULL, NULL} }; /*-------------------------------------------------------------------------*\ * Initializes module \*-------------------------------------------------------------------------*/ int select_open(lua_State *L) { lua_pushstring(L, "_SETSIZE"); lua_pushinteger(L, FD_SETSIZE); lua_rawset(L, -3); lua_pushstring(L, "_SOCKETINVALID"); lua_pushinteger(L, SOCKET_INVALID); lua_rawset(L, -3); luaL_setfuncs(L, func, 0); return 0; } /*=========================================================================*\ * Global Lua functions \*=========================================================================*/ /*-------------------------------------------------------------------------*\ * Waits for a set of sockets until a condition is met or timeout. \*-------------------------------------------------------------------------*/ static int global_select(lua_State *L) { int rtab, wtab, itab, ret, ndirty; t_socket max_fd = SOCKET_INVALID; fd_set rset, wset; t_timeout tm; double t = luaL_optnumber(L, 3, -1); FD_ZERO(&rset); FD_ZERO(&wset); lua_settop(L, 3); lua_newtable(L); itab = lua_gettop(L); lua_newtable(L); rtab = lua_gettop(L); lua_newtable(L); wtab = lua_gettop(L); collect_fd(L, 1, itab, &rset, &max_fd); collect_fd(L, 2, itab, &wset, &max_fd); ndirty = check_dirty(L, 1, rtab, &rset); t = ndirty > 0? 0.0: t; timeout_init(&tm, t, -1); timeout_markstart(&tm); ret = socket_select(max_fd+1, &rset, &wset, NULL, &tm); if (ret > 0 || ndirty > 0) { return_fd(L, &rset, max_fd+1, itab, rtab, ndirty); return_fd(L, &wset, max_fd+1, itab, wtab, 0); make_assoc(L, rtab); make_assoc(L, wtab); return 2; } else if (ret == 0) { lua_pushstring(L, "timeout"); return 3; } else { luaL_error(L, "select failed"); return 3; } } /*=========================================================================*\ * Internal functions \*=========================================================================*/ static t_socket getfd(lua_State *L) { t_socket fd = SOCKET_INVALID; lua_pushstring(L, "getfd"); lua_gettable(L, -2); if (!lua_isnil(L, -1)) { lua_pushvalue(L, -2); lua_call(L, 1, 1); if (lua_isnumber(L, -1)) { double numfd = lua_tonumber(L, -1); fd = (numfd >= 0.0)? (t_socket) numfd: SOCKET_INVALID; } } lua_pop(L, 1); return fd; } static int dirty(lua_State *L) { int is = 0; lua_pushstring(L, "dirty"); lua_gettable(L, -2); if (!lua_isnil(L, -1)) { lua_pushvalue(L, -2); lua_call(L, 1, 1); is = lua_toboolean(L, -1); } lua_pop(L, 1); return is; } static void collect_fd(lua_State *L, int tab, int itab, fd_set *set, t_socket *max_fd) { int i = 1, n = 0; /* nil is the same as an empty table */ if (lua_isnil(L, tab)) return; /* otherwise we need it to be a table */ luaL_checktype(L, tab, LUA_TTABLE); for ( ;; ) { t_socket fd; lua_pushnumber(L, i); lua_gettable(L, tab); if (lua_isnil(L, -1)) { lua_pop(L, 1); break; } /* getfd figures out if this is a socket */ fd = getfd(L); if (fd != SOCKET_INVALID) { /* make sure we don't overflow the fd_set */ #ifdef _WIN32 if (n >= FD_SETSIZE) luaL_argerror(L, tab, "too many sockets"); #else if (fd >= FD_SETSIZE) luaL_argerror(L, tab, "descriptor too large for set size"); #endif FD_SET(fd, set); n++; /* keep track of the largest descriptor so far */ if (*max_fd == SOCKET_INVALID || *max_fd < fd) *max_fd = fd; /* make sure we can map back from descriptor to the object */ lua_pushnumber(L, (lua_Number) fd); lua_pushvalue(L, -2); lua_settable(L, itab); } lua_pop(L, 1); i = i + 1; } } static int check_dirty(lua_State *L, int tab, int dtab, fd_set *set) { int ndirty = 0, i = 1; if (lua_isnil(L, tab)) return 0; for ( ;; ) { t_socket fd; lua_pushnumber(L, i); lua_gettable(L, tab); if (lua_isnil(L, -1)) { lua_pop(L, 1); break; } fd = getfd(L); if (fd != SOCKET_INVALID && dirty(L)) { lua_pushnumber(L, ++ndirty); lua_pushvalue(L, -2); lua_settable(L, dtab); FD_CLR(fd, set); } lua_pop(L, 1); i = i + 1; } return ndirty; } static void return_fd(lua_State *L, fd_set *set, t_socket max_fd, int itab, int tab, int start) { t_socket fd; for (fd = 0; fd < max_fd; fd++) { if (FD_ISSET(fd, set)) { lua_pushnumber(L, ++start); lua_pushnumber(L, (lua_Number) fd); lua_gettable(L, itab); lua_settable(L, tab); } } } static void make_assoc(lua_State *L, int tab) { int i = 1, atab; lua_newtable(L); atab = lua_gettop(L); for ( ;; ) { lua_pushnumber(L, i); lua_gettable(L, tab); if (!lua_isnil(L, -1)) { lua_pushnumber(L, i); lua_pushvalue(L, -2); lua_settable(L, atab); lua_pushnumber(L, i); lua_settable(L, atab); } else { lua_pop(L, 1); break; } i = i+1; } } ================================================ FILE: src/libraries/luasocket/libluasocket/select.h ================================================ #ifndef SELECT_H #define SELECT_H /*=========================================================================*\ * Select implementation * LuaSocket toolkit * * Each object that can be passed to the select function has to export * method getfd() which returns the descriptor to be passed to the * underlying select function. Another method, dirty(), should return * true if there is data ready for reading (required for buffered input). \*=========================================================================*/ #ifndef _WIN32 #pragma GCC visibility push(hidden) #endif int select_open(lua_State *L); #ifndef _WIN32 #pragma GCC visibility pop #endif #endif /* SELECT_H */ ================================================ FILE: src/libraries/luasocket/libluasocket/serial.c ================================================ /*=========================================================================*\ * Serial stream * LuaSocket toolkit \*=========================================================================*/ #include "luasocket.h" #include "auxiliar.h" #include "socket.h" #include "options.h" #include "unix.h" #include #include /* Reuses userdata definition from unix.h, since it is useful for all stream-like objects. If we stored the serial path for use in error messages or userdata printing, we might need our own userdata definition. Group usage is semi-inherited from unix.c, but unnecessary since we have only one object type. */ /*=========================================================================*\ * Internal function prototypes \*=========================================================================*/ static int global_create(lua_State *L); static int meth_send(lua_State *L); static int meth_receive(lua_State *L); static int meth_close(lua_State *L); static int meth_settimeout(lua_State *L); static int meth_getfd(lua_State *L); static int meth_setfd(lua_State *L); static int meth_dirty(lua_State *L); static int meth_getstats(lua_State *L); static int meth_setstats(lua_State *L); /* serial object methods */ static luaL_Reg serial_methods[] = { {"__gc", meth_close}, {"__tostring", auxiliar_tostring}, {"close", meth_close}, {"dirty", meth_dirty}, {"getfd", meth_getfd}, {"getstats", meth_getstats}, {"setstats", meth_setstats}, {"receive", meth_receive}, {"send", meth_send}, {"setfd", meth_setfd}, {"settimeout", meth_settimeout}, {NULL, NULL} }; /*-------------------------------------------------------------------------*\ * Initializes module \*-------------------------------------------------------------------------*/ LUASOCKET_API int luaopen_socket_serial(lua_State *L) { /* create classes */ auxiliar_newclass(L, "serial{client}", serial_methods); /* create class groups */ auxiliar_add2group(L, "serial{client}", "serial{any}"); lua_pushcfunction(L, global_create); return 1; } /*=========================================================================*\ * Lua methods \*=========================================================================*/ /*-------------------------------------------------------------------------*\ * Just call buffered IO methods \*-------------------------------------------------------------------------*/ static int meth_send(lua_State *L) { p_unix un = (p_unix) auxiliar_checkclass(L, "serial{client}", 1); return buffer_meth_send(L, &un->buf); } static int meth_receive(lua_State *L) { p_unix un = (p_unix) auxiliar_checkclass(L, "serial{client}", 1); return buffer_meth_receive(L, &un->buf); } static int meth_getstats(lua_State *L) { p_unix un = (p_unix) auxiliar_checkclass(L, "serial{client}", 1); return buffer_meth_getstats(L, &un->buf); } static int meth_setstats(lua_State *L) { p_unix un = (p_unix) auxiliar_checkclass(L, "serial{client}", 1); return buffer_meth_setstats(L, &un->buf); } /*-------------------------------------------------------------------------*\ * Select support methods \*-------------------------------------------------------------------------*/ static int meth_getfd(lua_State *L) { p_unix un = (p_unix) auxiliar_checkgroup(L, "serial{any}", 1); lua_pushnumber(L, (int) un->sock); return 1; } /* this is very dangerous, but can be handy for those that are brave enough */ static int meth_setfd(lua_State *L) { p_unix un = (p_unix) auxiliar_checkgroup(L, "serial{any}", 1); un->sock = (t_socket) luaL_checknumber(L, 2); return 0; } static int meth_dirty(lua_State *L) { p_unix un = (p_unix) auxiliar_checkgroup(L, "serial{any}", 1); lua_pushboolean(L, !buffer_isempty(&un->buf)); return 1; } /*-------------------------------------------------------------------------*\ * Closes socket used by object \*-------------------------------------------------------------------------*/ static int meth_close(lua_State *L) { p_unix un = (p_unix) auxiliar_checkgroup(L, "serial{any}", 1); socket_destroy(&un->sock); lua_pushnumber(L, 1); return 1; } /*-------------------------------------------------------------------------*\ * Just call tm methods \*-------------------------------------------------------------------------*/ static int meth_settimeout(lua_State *L) { p_unix un = (p_unix) auxiliar_checkgroup(L, "serial{any}", 1); return timeout_meth_settimeout(L, &un->tm); } /*=========================================================================*\ * Library functions \*=========================================================================*/ /*-------------------------------------------------------------------------*\ * Creates a serial object \*-------------------------------------------------------------------------*/ static int global_create(lua_State *L) { const char* path = luaL_checkstring(L, 1); /* allocate unix object */ p_unix un = (p_unix) lua_newuserdata(L, sizeof(t_unix)); /* open serial device */ t_socket sock = open(path, O_NOCTTY|O_RDWR); /*printf("open %s on %d\n", path, sock);*/ if (sock < 0) { lua_pushnil(L); lua_pushstring(L, socket_strerror(errno)); lua_pushnumber(L, errno); return 3; } /* set its type as client object */ auxiliar_setclass(L, "serial{client}", -1); /* initialize remaining structure fields */ socket_setnonblocking(&sock); un->sock = sock; io_init(&un->io, (p_send) socket_write, (p_recv) socket_read, (p_error) socket_ioerror, &un->sock); timeout_init(&un->tm, -1, -1); buffer_init(&un->buf, &un->io, &un->tm); return 1; } ================================================ FILE: src/libraries/luasocket/libluasocket/smtp.lua ================================================ ----------------------------------------------------------------------------- -- SMTP client support for the Lua language. -- LuaSocket toolkit. -- Author: Diego Nehab ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- -- Declare module and import dependencies ----------------------------------------------------------------------------- local base = _G local coroutine = require("coroutine") local string = require("string") local math = require("math") local os = require("os") local socket = require("socket") local tp = require("socket.tp") local ltn12 = require("ltn12") local headers = require("socket.headers") local mime = require("mime") socket.smtp = {} local _M = socket.smtp ----------------------------------------------------------------------------- -- Program constants ----------------------------------------------------------------------------- -- timeout for connection _M.TIMEOUT = 60 -- default server used to send e-mails _M.SERVER = "localhost" -- default port _M.PORT = 25 -- domain used in HELO command and default sendmail -- If we are under a CGI, try to get from environment _M.DOMAIN = os.getenv("SERVER_NAME") or "localhost" -- default time zone (means we don't know) _M.ZONE = "-0000" --------------------------------------------------------------------------- -- Low level SMTP API ----------------------------------------------------------------------------- local metat = { __index = {} } function metat.__index:greet(domain) self.try(self.tp:check("2..")) self.try(self.tp:command("EHLO", domain or _M.DOMAIN)) return socket.skip(1, self.try(self.tp:check("2.."))) end function metat.__index:mail(from) self.try(self.tp:command("MAIL", "FROM:" .. from)) return self.try(self.tp:check("2..")) end function metat.__index:rcpt(to) self.try(self.tp:command("RCPT", "TO:" .. to)) return self.try(self.tp:check("2..")) end function metat.__index:data(src, step) self.try(self.tp:command("DATA")) self.try(self.tp:check("3..")) self.try(self.tp:source(src, step)) self.try(self.tp:send("\r\n.\r\n")) return self.try(self.tp:check("2..")) end function metat.__index:quit() self.try(self.tp:command("QUIT")) return self.try(self.tp:check("2..")) end function metat.__index:close() return self.tp:close() end function metat.__index:login(user, password) self.try(self.tp:command("AUTH", "LOGIN")) self.try(self.tp:check("3..")) self.try(self.tp:send(mime.b64(user) .. "\r\n")) self.try(self.tp:check("3..")) self.try(self.tp:send(mime.b64(password) .. "\r\n")) return self.try(self.tp:check("2..")) end function metat.__index:plain(user, password) local auth = "PLAIN " .. mime.b64("\0" .. user .. "\0" .. password) self.try(self.tp:command("AUTH", auth)) return self.try(self.tp:check("2..")) end function metat.__index:auth(user, password, ext) if not user or not password then return 1 end if string.find(ext, "AUTH[^\n]+LOGIN") then return self:login(user, password) elseif string.find(ext, "AUTH[^\n]+PLAIN") then return self:plain(user, password) else self.try(nil, "authentication not supported") end end -- send message or throw an exception function metat.__index:send(mailt) self:mail(mailt.from) if base.type(mailt.rcpt) == "table" then for i,v in base.ipairs(mailt.rcpt) do self:rcpt(v) end else self:rcpt(mailt.rcpt) end self:data(ltn12.source.chain(mailt.source, mime.stuff()), mailt.step) end function _M.open(server, port, create) local tp = socket.try(tp.connect(server or _M.SERVER, port or _M.PORT, _M.TIMEOUT, create)) local s = base.setmetatable({tp = tp}, metat) -- make sure tp is closed if we get an exception s.try = socket.newtry(function() s:close() end) return s end -- convert headers to lowercase local function lower_headers(headers) local lower = {} for i,v in base.pairs(headers or lower) do lower[string.lower(i)] = v end return lower end --------------------------------------------------------------------------- -- Multipart message source ----------------------------------------------------------------------------- -- returns a hopefully unique mime boundary local seqno = 0 local function newboundary() seqno = seqno + 1 return string.format('%s%05d==%05u', os.date('%d%m%Y%H%M%S'), math.random(0, 99999), seqno) end -- send_message forward declaration local send_message -- yield the headers all at once, it's faster local function send_headers(tosend) local canonic = headers.canonic local h = "\r\n" for f,v in base.pairs(tosend) do h = (canonic[f] or f) .. ': ' .. v .. "\r\n" .. h end coroutine.yield(h) end -- yield multipart message body from a multipart message table local function send_multipart(mesgt) -- make sure we have our boundary and send headers local bd = newboundary() local headers = lower_headers(mesgt.headers or {}) headers['content-type'] = headers['content-type'] or 'multipart/mixed' headers['content-type'] = headers['content-type'] .. '; boundary="' .. bd .. '"' send_headers(headers) -- send preamble if mesgt.body.preamble then coroutine.yield(mesgt.body.preamble) coroutine.yield("\r\n") end -- send each part separated by a boundary for i, m in base.ipairs(mesgt.body) do coroutine.yield("\r\n--" .. bd .. "\r\n") send_message(m) end -- send last boundary coroutine.yield("\r\n--" .. bd .. "--\r\n\r\n") -- send epilogue if mesgt.body.epilogue then coroutine.yield(mesgt.body.epilogue) coroutine.yield("\r\n") end end -- yield message body from a source local function send_source(mesgt) -- make sure we have a content-type local headers = lower_headers(mesgt.headers or {}) headers['content-type'] = headers['content-type'] or 'text/plain; charset="iso-8859-1"' send_headers(headers) -- send body from source while true do local chunk, err = mesgt.body() if err then coroutine.yield(nil, err) elseif chunk then coroutine.yield(chunk) else break end end end -- yield message body from a string local function send_string(mesgt) -- make sure we have a content-type local headers = lower_headers(mesgt.headers or {}) headers['content-type'] = headers['content-type'] or 'text/plain; charset="iso-8859-1"' send_headers(headers) -- send body from string coroutine.yield(mesgt.body) end -- message source function send_message(mesgt) if base.type(mesgt.body) == "table" then send_multipart(mesgt) elseif base.type(mesgt.body) == "function" then send_source(mesgt) else send_string(mesgt) end end -- set defaul headers local function adjust_headers(mesgt) local lower = lower_headers(mesgt.headers) lower["date"] = lower["date"] or os.date("!%a, %d %b %Y %H:%M:%S ") .. (mesgt.zone or _M.ZONE) lower["x-mailer"] = lower["x-mailer"] or socket._VERSION -- this can't be overridden lower["mime-version"] = "1.0" return lower end function _M.message(mesgt) mesgt.headers = adjust_headers(mesgt) -- create and return message source local co = coroutine.create(function() send_message(mesgt) end) return function() local ret, a, b = coroutine.resume(co) if ret then return a, b else return nil, a end end end --------------------------------------------------------------------------- -- High level SMTP API ----------------------------------------------------------------------------- _M.send = socket.protect(function(mailt) local s = _M.open(mailt.server, mailt.port, mailt.create) local ext = s:greet(mailt.domain) s:auth(mailt.user, mailt.password, ext) s:send(mailt) s:quit() return s:close() end) return _M ================================================ FILE: src/libraries/luasocket/libluasocket/smtp.lua.h ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ namespace love { // [smtp.lua] const unsigned char smtp_lua[] = { 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x2d, 0x2d, 0x20, 0x53, 0x4d, 0x54, 0x50, 0x20, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x20, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x4c, 0x75, 0x61, 0x20, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x2e, 0x0a, 0x2d, 0x2d, 0x20, 0x4c, 0x75, 0x61, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x20, 0x74, 0x6f, 0x6f, 0x6c, 0x6b, 0x69, 0x74, 0x2e, 0x0a, 0x2d, 0x2d, 0x20, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x3a, 0x20, 0x44, 0x69, 0x65, 0x67, 0x6f, 0x20, 0x4e, 0x65, 0x68, 0x61, 0x62, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x2d, 0x2d, 0x20, 0x44, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x20, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x20, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x62, 0x61, 0x73, 0x65, 0x20, 0x3d, 0x20, 0x5f, 0x47, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x63, 0x6f, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x65, 0x20, 0x3d, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x28, 0x22, 0x63, 0x6f, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x65, 0x22, 0x29, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x3d, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x28, 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0x29, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x6d, 0x61, 0x74, 0x68, 0x20, 0x3d, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x28, 0x22, 0x6d, 0x61, 0x74, 0x68, 0x22, 0x29, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x6f, 0x73, 0x20, 0x3d, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x28, 0x22, 0x6f, 0x73, 0x22, 0x29, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x20, 0x3d, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x28, 0x22, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x22, 0x29, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x74, 0x70, 0x20, 0x3d, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x28, 0x22, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x74, 0x70, 0x22, 0x29, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x6c, 0x74, 0x6e, 0x31, 0x32, 0x20, 0x3d, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x28, 0x22, 0x6c, 0x74, 0x6e, 0x31, 0x32, 0x22, 0x29, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x20, 0x3d, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x28, 0x22, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x22, 0x29, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x6d, 0x69, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x28, 0x22, 0x6d, 0x69, 0x6d, 0x65, 0x22, 0x29, 0x0a, 0x0a, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x73, 0x6d, 0x74, 0x70, 0x20, 0x3d, 0x20, 0x7b, 0x7d, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x5f, 0x4d, 0x20, 0x3d, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x73, 0x6d, 0x74, 0x70, 0x0a, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x2d, 0x2d, 0x20, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x73, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x2d, 0x2d, 0x20, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x0a, 0x5f, 0x4d, 0x2e, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x20, 0x3d, 0x20, 0x36, 0x30, 0x0a, 0x2d, 0x2d, 0x20, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x20, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x75, 0x73, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x73, 0x65, 0x6e, 0x64, 0x20, 0x65, 0x2d, 0x6d, 0x61, 0x69, 0x6c, 0x73, 0x0a, 0x5f, 0x4d, 0x2e, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x20, 0x3d, 0x20, 0x22, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73, 0x74, 0x22, 0x0a, 0x2d, 0x2d, 0x20, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x20, 0x70, 0x6f, 0x72, 0x74, 0x0a, 0x5f, 0x4d, 0x2e, 0x50, 0x4f, 0x52, 0x54, 0x20, 0x3d, 0x20, 0x32, 0x35, 0x0a, 0x2d, 0x2d, 0x20, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x20, 0x75, 0x73, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x48, 0x45, 0x4c, 0x4f, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x20, 0x73, 0x65, 0x6e, 0x64, 0x6d, 0x61, 0x69, 0x6c, 0x0a, 0x2d, 0x2d, 0x20, 0x49, 0x66, 0x20, 0x77, 0x65, 0x20, 0x61, 0x72, 0x65, 0x20, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x20, 0x61, 0x20, 0x43, 0x47, 0x49, 0x2c, 0x20, 0x74, 0x72, 0x79, 0x20, 0x74, 0x6f, 0x20, 0x67, 0x65, 0x74, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x0a, 0x5f, 0x4d, 0x2e, 0x44, 0x4f, 0x4d, 0x41, 0x49, 0x4e, 0x20, 0x3d, 0x20, 0x6f, 0x73, 0x2e, 0x67, 0x65, 0x74, 0x65, 0x6e, 0x76, 0x28, 0x22, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x5f, 0x4e, 0x41, 0x4d, 0x45, 0x22, 0x29, 0x20, 0x6f, 0x72, 0x20, 0x22, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73, 0x74, 0x22, 0x0a, 0x2d, 0x2d, 0x20, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x20, 0x74, 0x69, 0x6d, 0x65, 0x20, 0x7a, 0x6f, 0x6e, 0x65, 0x20, 0x28, 0x6d, 0x65, 0x61, 0x6e, 0x73, 0x20, 0x77, 0x65, 0x20, 0x64, 0x6f, 0x6e, 0x27, 0x74, 0x20, 0x6b, 0x6e, 0x6f, 0x77, 0x29, 0x0a, 0x5f, 0x4d, 0x2e, 0x5a, 0x4f, 0x4e, 0x45, 0x20, 0x3d, 0x20, 0x22, 0x2d, 0x30, 0x30, 0x30, 0x30, 0x22, 0x0a, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x2d, 0x2d, 0x20, 0x4c, 0x6f, 0x77, 0x20, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x20, 0x53, 0x4d, 0x54, 0x50, 0x20, 0x41, 0x50, 0x49, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x74, 0x20, 0x3d, 0x20, 0x7b, 0x20, 0x5f, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x20, 0x3d, 0x20, 0x7b, 0x7d, 0x20, 0x7d, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x74, 0x2e, 0x5f, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x3a, 0x67, 0x72, 0x65, 0x65, 0x74, 0x28, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x70, 0x3a, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x28, 0x22, 0x32, 0x2e, 0x2e, 0x22, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x70, 0x3a, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x28, 0x22, 0x45, 0x48, 0x4c, 0x4f, 0x22, 0x2c, 0x20, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x5f, 0x4d, 0x2e, 0x44, 0x4f, 0x4d, 0x41, 0x49, 0x4e, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x73, 0x6b, 0x69, 0x70, 0x28, 0x31, 0x2c, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x70, 0x3a, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x28, 0x22, 0x32, 0x2e, 0x2e, 0x22, 0x29, 0x29, 0x29, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x74, 0x2e, 0x5f, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x3a, 0x6d, 0x61, 0x69, 0x6c, 0x28, 0x66, 0x72, 0x6f, 0x6d, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x70, 0x3a, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x28, 0x22, 0x4d, 0x41, 0x49, 0x4c, 0x22, 0x2c, 0x20, 0x22, 0x46, 0x52, 0x4f, 0x4d, 0x3a, 0x22, 0x20, 0x2e, 0x2e, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x70, 0x3a, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x28, 0x22, 0x32, 0x2e, 0x2e, 0x22, 0x29, 0x29, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x74, 0x2e, 0x5f, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x3a, 0x72, 0x63, 0x70, 0x74, 0x28, 0x74, 0x6f, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x70, 0x3a, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x28, 0x22, 0x52, 0x43, 0x50, 0x54, 0x22, 0x2c, 0x20, 0x22, 0x54, 0x4f, 0x3a, 0x22, 0x20, 0x2e, 0x2e, 0x20, 0x74, 0x6f, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x70, 0x3a, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x28, 0x22, 0x32, 0x2e, 0x2e, 0x22, 0x29, 0x29, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x74, 0x2e, 0x5f, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x3a, 0x64, 0x61, 0x74, 0x61, 0x28, 0x73, 0x72, 0x63, 0x2c, 0x20, 0x73, 0x74, 0x65, 0x70, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x70, 0x3a, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x28, 0x22, 0x44, 0x41, 0x54, 0x41, 0x22, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x70, 0x3a, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x28, 0x22, 0x33, 0x2e, 0x2e, 0x22, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x70, 0x3a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x28, 0x73, 0x72, 0x63, 0x2c, 0x20, 0x73, 0x74, 0x65, 0x70, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x70, 0x3a, 0x73, 0x65, 0x6e, 0x64, 0x28, 0x22, 0x5c, 0x72, 0x5c, 0x6e, 0x2e, 0x5c, 0x72, 0x5c, 0x6e, 0x22, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x70, 0x3a, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x28, 0x22, 0x32, 0x2e, 0x2e, 0x22, 0x29, 0x29, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x74, 0x2e, 0x5f, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x3a, 0x71, 0x75, 0x69, 0x74, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x70, 0x3a, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x28, 0x22, 0x51, 0x55, 0x49, 0x54, 0x22, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x70, 0x3a, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x28, 0x22, 0x32, 0x2e, 0x2e, 0x22, 0x29, 0x29, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x74, 0x2e, 0x5f, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x3a, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x70, 0x3a, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x28, 0x29, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x74, 0x2e, 0x5f, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x3a, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x28, 0x75, 0x73, 0x65, 0x72, 0x2c, 0x20, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x70, 0x3a, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x28, 0x22, 0x41, 0x55, 0x54, 0x48, 0x22, 0x2c, 0x20, 0x22, 0x4c, 0x4f, 0x47, 0x49, 0x4e, 0x22, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x70, 0x3a, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x28, 0x22, 0x33, 0x2e, 0x2e, 0x22, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x70, 0x3a, 0x73, 0x65, 0x6e, 0x64, 0x28, 0x6d, 0x69, 0x6d, 0x65, 0x2e, 0x62, 0x36, 0x34, 0x28, 0x75, 0x73, 0x65, 0x72, 0x29, 0x20, 0x2e, 0x2e, 0x20, 0x22, 0x5c, 0x72, 0x5c, 0x6e, 0x22, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x70, 0x3a, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x28, 0x22, 0x33, 0x2e, 0x2e, 0x22, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x70, 0x3a, 0x73, 0x65, 0x6e, 0x64, 0x28, 0x6d, 0x69, 0x6d, 0x65, 0x2e, 0x62, 0x36, 0x34, 0x28, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x29, 0x20, 0x2e, 0x2e, 0x20, 0x22, 0x5c, 0x72, 0x5c, 0x6e, 0x22, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x70, 0x3a, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x28, 0x22, 0x32, 0x2e, 0x2e, 0x22, 0x29, 0x29, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x74, 0x2e, 0x5f, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x3a, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x28, 0x75, 0x73, 0x65, 0x72, 0x2c, 0x20, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x61, 0x75, 0x74, 0x68, 0x20, 0x3d, 0x20, 0x22, 0x50, 0x4c, 0x41, 0x49, 0x4e, 0x20, 0x22, 0x20, 0x2e, 0x2e, 0x20, 0x6d, 0x69, 0x6d, 0x65, 0x2e, 0x62, 0x36, 0x34, 0x28, 0x22, 0x5c, 0x30, 0x22, 0x20, 0x2e, 0x2e, 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, 0x2e, 0x2e, 0x20, 0x22, 0x5c, 0x30, 0x22, 0x20, 0x2e, 0x2e, 0x20, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x70, 0x3a, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x28, 0x22, 0x41, 0x55, 0x54, 0x48, 0x22, 0x2c, 0x20, 0x61, 0x75, 0x74, 0x68, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x70, 0x3a, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x28, 0x22, 0x32, 0x2e, 0x2e, 0x22, 0x29, 0x29, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x74, 0x2e, 0x5f, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x3a, 0x61, 0x75, 0x74, 0x68, 0x28, 0x75, 0x73, 0x65, 0x72, 0x2c, 0x20, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x2c, 0x20, 0x65, 0x78, 0x74, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, 0x6f, 0x72, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x31, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x66, 0x69, 0x6e, 0x64, 0x28, 0x65, 0x78, 0x74, 0x2c, 0x20, 0x22, 0x41, 0x55, 0x54, 0x48, 0x5b, 0x5e, 0x5c, 0x6e, 0x5d, 0x2b, 0x4c, 0x4f, 0x47, 0x49, 0x4e, 0x22, 0x29, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x3a, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x28, 0x75, 0x73, 0x65, 0x72, 0x2c, 0x20, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x69, 0x66, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x66, 0x69, 0x6e, 0x64, 0x28, 0x65, 0x78, 0x74, 0x2c, 0x20, 0x22, 0x41, 0x55, 0x54, 0x48, 0x5b, 0x5e, 0x5c, 0x6e, 0x5d, 0x2b, 0x50, 0x4c, 0x41, 0x49, 0x4e, 0x22, 0x29, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x3a, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x28, 0x75, 0x73, 0x65, 0x72, 0x2c, 0x20, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x6e, 0x69, 0x6c, 0x2c, 0x20, 0x22, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x22, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x2d, 0x2d, 0x20, 0x73, 0x65, 0x6e, 0x64, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x72, 0x6f, 0x77, 0x20, 0x61, 0x6e, 0x20, 0x65, 0x78, 0x63, 0x65, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x74, 0x2e, 0x5f, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x3a, 0x73, 0x65, 0x6e, 0x64, 0x28, 0x6d, 0x61, 0x69, 0x6c, 0x74, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x3a, 0x6d, 0x61, 0x69, 0x6c, 0x28, 0x6d, 0x61, 0x69, 0x6c, 0x74, 0x2e, 0x66, 0x72, 0x6f, 0x6d, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x28, 0x6d, 0x61, 0x69, 0x6c, 0x74, 0x2e, 0x72, 0x63, 0x70, 0x74, 0x29, 0x20, 0x3d, 0x3d, 0x20, 0x22, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x22, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x69, 0x2c, 0x76, 0x20, 0x69, 0x6e, 0x20, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x69, 0x70, 0x61, 0x69, 0x72, 0x73, 0x28, 0x6d, 0x61, 0x69, 0x6c, 0x74, 0x2e, 0x72, 0x63, 0x70, 0x74, 0x29, 0x20, 0x64, 0x6f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x3a, 0x72, 0x63, 0x70, 0x74, 0x28, 0x76, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x3a, 0x72, 0x63, 0x70, 0x74, 0x28, 0x6d, 0x61, 0x69, 0x6c, 0x74, 0x2e, 0x72, 0x63, 0x70, 0x74, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x3a, 0x64, 0x61, 0x74, 0x61, 0x28, 0x6c, 0x74, 0x6e, 0x31, 0x32, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x28, 0x6d, 0x61, 0x69, 0x6c, 0x74, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2c, 0x20, 0x6d, 0x69, 0x6d, 0x65, 0x2e, 0x73, 0x74, 0x75, 0x66, 0x66, 0x28, 0x29, 0x29, 0x2c, 0x20, 0x6d, 0x61, 0x69, 0x6c, 0x74, 0x2e, 0x73, 0x74, 0x65, 0x70, 0x29, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x5f, 0x4d, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x28, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2c, 0x20, 0x70, 0x6f, 0x72, 0x74, 0x2c, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x74, 0x70, 0x20, 0x3d, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x74, 0x72, 0x79, 0x28, 0x74, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x28, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x6f, 0x72, 0x20, 0x5f, 0x4d, 0x2e, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x2c, 0x20, 0x70, 0x6f, 0x72, 0x74, 0x20, 0x6f, 0x72, 0x20, 0x5f, 0x4d, 0x2e, 0x50, 0x4f, 0x52, 0x54, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5f, 0x4d, 0x2e, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x2c, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x73, 0x20, 0x3d, 0x20, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x65, 0x74, 0x6d, 0x65, 0x74, 0x61, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x28, 0x7b, 0x74, 0x70, 0x20, 0x3d, 0x20, 0x74, 0x70, 0x7d, 0x2c, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x74, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x6d, 0x61, 0x6b, 0x65, 0x20, 0x73, 0x75, 0x72, 0x65, 0x20, 0x74, 0x70, 0x20, 0x69, 0x73, 0x20, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x20, 0x69, 0x66, 0x20, 0x77, 0x65, 0x20, 0x67, 0x65, 0x74, 0x20, 0x61, 0x6e, 0x20, 0x65, 0x78, 0x63, 0x65, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x2e, 0x74, 0x72, 0x79, 0x20, 0x3d, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x6e, 0x65, 0x77, 0x74, 0x72, 0x79, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x3a, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x73, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x2d, 0x2d, 0x20, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x6c, 0x6f, 0x77, 0x65, 0x72, 0x63, 0x61, 0x73, 0x65, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6c, 0x6f, 0x77, 0x65, 0x72, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x28, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x6c, 0x6f, 0x77, 0x65, 0x72, 0x20, 0x3d, 0x20, 0x7b, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x69, 0x2c, 0x76, 0x20, 0x69, 0x6e, 0x20, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x61, 0x69, 0x72, 0x73, 0x28, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x20, 0x6f, 0x72, 0x20, 0x6c, 0x6f, 0x77, 0x65, 0x72, 0x29, 0x20, 0x64, 0x6f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x77, 0x65, 0x72, 0x5b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x6c, 0x6f, 0x77, 0x65, 0x72, 0x28, 0x69, 0x29, 0x5d, 0x20, 0x3d, 0x20, 0x76, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6c, 0x6f, 0x77, 0x65, 0x72, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x2d, 0x2d, 0x20, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x61, 0x72, 0x74, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x2d, 0x2d, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, 0x61, 0x20, 0x68, 0x6f, 0x70, 0x65, 0x66, 0x75, 0x6c, 0x6c, 0x79, 0x20, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x20, 0x6d, 0x69, 0x6d, 0x65, 0x20, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x72, 0x79, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x73, 0x65, 0x71, 0x6e, 0x6f, 0x20, 0x3d, 0x20, 0x30, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6e, 0x65, 0x77, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x72, 0x79, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x65, 0x71, 0x6e, 0x6f, 0x20, 0x3d, 0x20, 0x73, 0x65, 0x71, 0x6e, 0x6f, 0x20, 0x2b, 0x20, 0x31, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x27, 0x25, 0x73, 0x25, 0x30, 0x35, 0x64, 0x3d, 0x3d, 0x25, 0x30, 0x35, 0x75, 0x27, 0x2c, 0x20, 0x6f, 0x73, 0x2e, 0x64, 0x61, 0x74, 0x65, 0x28, 0x27, 0x25, 0x64, 0x25, 0x6d, 0x25, 0x59, 0x25, 0x48, 0x25, 0x4d, 0x25, 0x53, 0x27, 0x29, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x28, 0x30, 0x2c, 0x20, 0x39, 0x39, 0x39, 0x39, 0x39, 0x29, 0x2c, 0x20, 0x73, 0x65, 0x71, 0x6e, 0x6f, 0x29, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x2d, 0x2d, 0x20, 0x73, 0x65, 0x6e, 0x64, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x20, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x73, 0x65, 0x6e, 0x64, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x0a, 0x0a, 0x2d, 0x2d, 0x20, 0x79, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x74, 0x68, 0x65, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x20, 0x61, 0x6c, 0x6c, 0x20, 0x61, 0x74, 0x20, 0x6f, 0x6e, 0x63, 0x65, 0x2c, 0x20, 0x69, 0x74, 0x27, 0x73, 0x20, 0x66, 0x61, 0x73, 0x74, 0x65, 0x72, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x73, 0x65, 0x6e, 0x64, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x28, 0x74, 0x6f, 0x73, 0x65, 0x6e, 0x64, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x63, 0x61, 0x6e, 0x6f, 0x6e, 0x69, 0x63, 0x20, 0x3d, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2e, 0x63, 0x61, 0x6e, 0x6f, 0x6e, 0x69, 0x63, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x68, 0x20, 0x3d, 0x20, 0x22, 0x5c, 0x72, 0x5c, 0x6e, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x66, 0x2c, 0x76, 0x20, 0x69, 0x6e, 0x20, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x61, 0x69, 0x72, 0x73, 0x28, 0x74, 0x6f, 0x73, 0x65, 0x6e, 0x64, 0x29, 0x20, 0x64, 0x6f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x68, 0x20, 0x3d, 0x20, 0x28, 0x63, 0x61, 0x6e, 0x6f, 0x6e, 0x69, 0x63, 0x5b, 0x66, 0x5d, 0x20, 0x6f, 0x72, 0x20, 0x66, 0x29, 0x20, 0x2e, 0x2e, 0x20, 0x27, 0x3a, 0x20, 0x27, 0x20, 0x2e, 0x2e, 0x20, 0x76, 0x20, 0x2e, 0x2e, 0x20, 0x22, 0x5c, 0x72, 0x5c, 0x6e, 0x22, 0x20, 0x2e, 0x2e, 0x20, 0x68, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x63, 0x6f, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x65, 0x2e, 0x79, 0x69, 0x65, 0x6c, 0x64, 0x28, 0x68, 0x29, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x2d, 0x2d, 0x20, 0x79, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x61, 0x72, 0x74, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x62, 0x6f, 0x64, 0x79, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x61, 0x20, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x61, 0x72, 0x74, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x73, 0x65, 0x6e, 0x64, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x61, 0x72, 0x74, 0x28, 0x6d, 0x65, 0x73, 0x67, 0x74, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x6d, 0x61, 0x6b, 0x65, 0x20, 0x73, 0x75, 0x72, 0x65, 0x20, 0x77, 0x65, 0x20, 0x68, 0x61, 0x76, 0x65, 0x20, 0x6f, 0x75, 0x72, 0x20, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x72, 0x79, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x73, 0x65, 0x6e, 0x64, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x62, 0x64, 0x20, 0x3d, 0x20, 0x6e, 0x65, 0x77, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x72, 0x79, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x20, 0x3d, 0x20, 0x6c, 0x6f, 0x77, 0x65, 0x72, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x28, 0x6d, 0x65, 0x73, 0x67, 0x74, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x20, 0x6f, 0x72, 0x20, 0x7b, 0x7d, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5b, 0x27, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x27, 0x5d, 0x20, 0x3d, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5b, 0x27, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x27, 0x5d, 0x20, 0x6f, 0x72, 0x20, 0x27, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x61, 0x72, 0x74, 0x2f, 0x6d, 0x69, 0x78, 0x65, 0x64, 0x27, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5b, 0x27, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x27, 0x5d, 0x20, 0x3d, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5b, 0x27, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x27, 0x5d, 0x20, 0x2e, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x27, 0x3b, 0x20, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x72, 0x79, 0x3d, 0x22, 0x27, 0x20, 0x2e, 0x2e, 0x20, 0x20, 0x62, 0x64, 0x20, 0x2e, 0x2e, 0x20, 0x27, 0x22, 0x27, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x65, 0x6e, 0x64, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x28, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x73, 0x65, 0x6e, 0x64, 0x20, 0x70, 0x72, 0x65, 0x61, 0x6d, 0x62, 0x6c, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6d, 0x65, 0x73, 0x67, 0x74, 0x2e, 0x62, 0x6f, 0x64, 0x79, 0x2e, 0x70, 0x72, 0x65, 0x61, 0x6d, 0x62, 0x6c, 0x65, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x63, 0x6f, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x65, 0x2e, 0x79, 0x69, 0x65, 0x6c, 0x64, 0x28, 0x6d, 0x65, 0x73, 0x67, 0x74, 0x2e, 0x62, 0x6f, 0x64, 0x79, 0x2e, 0x70, 0x72, 0x65, 0x61, 0x6d, 0x62, 0x6c, 0x65, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x63, 0x6f, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x65, 0x2e, 0x79, 0x69, 0x65, 0x6c, 0x64, 0x28, 0x22, 0x5c, 0x72, 0x5c, 0x6e, 0x22, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x73, 0x65, 0x6e, 0x64, 0x20, 0x65, 0x61, 0x63, 0x68, 0x20, 0x70, 0x61, 0x72, 0x74, 0x20, 0x73, 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x61, 0x20, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x72, 0x79, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x69, 0x2c, 0x20, 0x6d, 0x20, 0x69, 0x6e, 0x20, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x69, 0x70, 0x61, 0x69, 0x72, 0x73, 0x28, 0x6d, 0x65, 0x73, 0x67, 0x74, 0x2e, 0x62, 0x6f, 0x64, 0x79, 0x29, 0x20, 0x64, 0x6f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x63, 0x6f, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x65, 0x2e, 0x79, 0x69, 0x65, 0x6c, 0x64, 0x28, 0x22, 0x5c, 0x72, 0x5c, 0x6e, 0x2d, 0x2d, 0x22, 0x20, 0x2e, 0x2e, 0x20, 0x62, 0x64, 0x20, 0x2e, 0x2e, 0x20, 0x22, 0x5c, 0x72, 0x5c, 0x6e, 0x22, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x65, 0x6e, 0x64, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x28, 0x6d, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x73, 0x65, 0x6e, 0x64, 0x20, 0x6c, 0x61, 0x73, 0x74, 0x20, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x72, 0x79, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x63, 0x6f, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x65, 0x2e, 0x79, 0x69, 0x65, 0x6c, 0x64, 0x28, 0x22, 0x5c, 0x72, 0x5c, 0x6e, 0x2d, 0x2d, 0x22, 0x20, 0x2e, 0x2e, 0x20, 0x62, 0x64, 0x20, 0x2e, 0x2e, 0x20, 0x22, 0x2d, 0x2d, 0x5c, 0x72, 0x5c, 0x6e, 0x5c, 0x72, 0x5c, 0x6e, 0x22, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x73, 0x65, 0x6e, 0x64, 0x20, 0x65, 0x70, 0x69, 0x6c, 0x6f, 0x67, 0x75, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6d, 0x65, 0x73, 0x67, 0x74, 0x2e, 0x62, 0x6f, 0x64, 0x79, 0x2e, 0x65, 0x70, 0x69, 0x6c, 0x6f, 0x67, 0x75, 0x65, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x63, 0x6f, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x65, 0x2e, 0x79, 0x69, 0x65, 0x6c, 0x64, 0x28, 0x6d, 0x65, 0x73, 0x67, 0x74, 0x2e, 0x62, 0x6f, 0x64, 0x79, 0x2e, 0x65, 0x70, 0x69, 0x6c, 0x6f, 0x67, 0x75, 0x65, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x63, 0x6f, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x65, 0x2e, 0x79, 0x69, 0x65, 0x6c, 0x64, 0x28, 0x22, 0x5c, 0x72, 0x5c, 0x6e, 0x22, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x2d, 0x2d, 0x20, 0x79, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x62, 0x6f, 0x64, 0x79, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x61, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x73, 0x65, 0x6e, 0x64, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x28, 0x6d, 0x65, 0x73, 0x67, 0x74, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x6d, 0x61, 0x6b, 0x65, 0x20, 0x73, 0x75, 0x72, 0x65, 0x20, 0x77, 0x65, 0x20, 0x68, 0x61, 0x76, 0x65, 0x20, 0x61, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x20, 0x3d, 0x20, 0x6c, 0x6f, 0x77, 0x65, 0x72, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x28, 0x6d, 0x65, 0x73, 0x67, 0x74, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x20, 0x6f, 0x72, 0x20, 0x7b, 0x7d, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5b, 0x27, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x27, 0x5d, 0x20, 0x3d, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5b, 0x27, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x27, 0x5d, 0x20, 0x6f, 0x72, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x27, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x3b, 0x20, 0x63, 0x68, 0x61, 0x72, 0x73, 0x65, 0x74, 0x3d, 0x22, 0x69, 0x73, 0x6f, 0x2d, 0x38, 0x38, 0x35, 0x39, 0x2d, 0x31, 0x22, 0x27, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x65, 0x6e, 0x64, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x28, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x73, 0x65, 0x6e, 0x64, 0x20, 0x62, 0x6f, 0x64, 0x79, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x77, 0x68, 0x69, 0x6c, 0x65, 0x20, 0x74, 0x72, 0x75, 0x65, 0x20, 0x64, 0x6f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x2c, 0x20, 0x65, 0x72, 0x72, 0x20, 0x3d, 0x20, 0x6d, 0x65, 0x73, 0x67, 0x74, 0x2e, 0x62, 0x6f, 0x64, 0x79, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x65, 0x72, 0x72, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x63, 0x6f, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x65, 0x2e, 0x79, 0x69, 0x65, 0x6c, 0x64, 0x28, 0x6e, 0x69, 0x6c, 0x2c, 0x20, 0x65, 0x72, 0x72, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x69, 0x66, 0x20, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x63, 0x6f, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x65, 0x2e, 0x79, 0x69, 0x65, 0x6c, 0x64, 0x28, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x20, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x2d, 0x2d, 0x20, 0x79, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x62, 0x6f, 0x64, 0x79, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x61, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x73, 0x65, 0x6e, 0x64, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x28, 0x6d, 0x65, 0x73, 0x67, 0x74, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x6d, 0x61, 0x6b, 0x65, 0x20, 0x73, 0x75, 0x72, 0x65, 0x20, 0x77, 0x65, 0x20, 0x68, 0x61, 0x76, 0x65, 0x20, 0x61, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x20, 0x3d, 0x20, 0x6c, 0x6f, 0x77, 0x65, 0x72, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x28, 0x6d, 0x65, 0x73, 0x67, 0x74, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x20, 0x6f, 0x72, 0x20, 0x7b, 0x7d, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5b, 0x27, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x27, 0x5d, 0x20, 0x3d, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5b, 0x27, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x27, 0x5d, 0x20, 0x6f, 0x72, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x27, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x3b, 0x20, 0x63, 0x68, 0x61, 0x72, 0x73, 0x65, 0x74, 0x3d, 0x22, 0x69, 0x73, 0x6f, 0x2d, 0x38, 0x38, 0x35, 0x39, 0x2d, 0x31, 0x22, 0x27, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x65, 0x6e, 0x64, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x28, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x73, 0x65, 0x6e, 0x64, 0x20, 0x62, 0x6f, 0x64, 0x79, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x63, 0x6f, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x65, 0x2e, 0x79, 0x69, 0x65, 0x6c, 0x64, 0x28, 0x6d, 0x65, 0x73, 0x67, 0x74, 0x2e, 0x62, 0x6f, 0x64, 0x79, 0x29, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x2d, 0x2d, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x73, 0x65, 0x6e, 0x64, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x28, 0x6d, 0x65, 0x73, 0x67, 0x74, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x28, 0x6d, 0x65, 0x73, 0x67, 0x74, 0x2e, 0x62, 0x6f, 0x64, 0x79, 0x29, 0x20, 0x3d, 0x3d, 0x20, 0x22, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x22, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x73, 0x65, 0x6e, 0x64, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x61, 0x72, 0x74, 0x28, 0x6d, 0x65, 0x73, 0x67, 0x74, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x69, 0x66, 0x20, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x28, 0x6d, 0x65, 0x73, 0x67, 0x74, 0x2e, 0x62, 0x6f, 0x64, 0x79, 0x29, 0x20, 0x3d, 0x3d, 0x20, 0x22, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x73, 0x65, 0x6e, 0x64, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x28, 0x6d, 0x65, 0x73, 0x67, 0x74, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x20, 0x73, 0x65, 0x6e, 0x64, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x28, 0x6d, 0x65, 0x73, 0x67, 0x74, 0x29, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x2d, 0x2d, 0x20, 0x73, 0x65, 0x74, 0x20, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x61, 0x64, 0x6a, 0x75, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x28, 0x6d, 0x65, 0x73, 0x67, 0x74, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x6c, 0x6f, 0x77, 0x65, 0x72, 0x20, 0x3d, 0x20, 0x6c, 0x6f, 0x77, 0x65, 0x72, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x28, 0x6d, 0x65, 0x73, 0x67, 0x74, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x77, 0x65, 0x72, 0x5b, 0x22, 0x64, 0x61, 0x74, 0x65, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x6c, 0x6f, 0x77, 0x65, 0x72, 0x5b, 0x22, 0x64, 0x61, 0x74, 0x65, 0x22, 0x5d, 0x20, 0x6f, 0x72, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6f, 0x73, 0x2e, 0x64, 0x61, 0x74, 0x65, 0x28, 0x22, 0x21, 0x25, 0x61, 0x2c, 0x20, 0x25, 0x64, 0x20, 0x25, 0x62, 0x20, 0x25, 0x59, 0x20, 0x25, 0x48, 0x3a, 0x25, 0x4d, 0x3a, 0x25, 0x53, 0x20, 0x22, 0x29, 0x20, 0x2e, 0x2e, 0x20, 0x28, 0x6d, 0x65, 0x73, 0x67, 0x74, 0x2e, 0x7a, 0x6f, 0x6e, 0x65, 0x20, 0x6f, 0x72, 0x20, 0x5f, 0x4d, 0x2e, 0x5a, 0x4f, 0x4e, 0x45, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x77, 0x65, 0x72, 0x5b, 0x22, 0x78, 0x2d, 0x6d, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x6c, 0x6f, 0x77, 0x65, 0x72, 0x5b, 0x22, 0x78, 0x2d, 0x6d, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x22, 0x5d, 0x20, 0x6f, 0x72, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x5f, 0x56, 0x45, 0x52, 0x53, 0x49, 0x4f, 0x4e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x63, 0x61, 0x6e, 0x27, 0x74, 0x20, 0x62, 0x65, 0x20, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x77, 0x65, 0x72, 0x5b, 0x22, 0x6d, 0x69, 0x6d, 0x65, 0x2d, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x22, 0x31, 0x2e, 0x30, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6c, 0x6f, 0x77, 0x65, 0x72, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x5f, 0x4d, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x28, 0x6d, 0x65, 0x73, 0x67, 0x74, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6d, 0x65, 0x73, 0x67, 0x74, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x20, 0x3d, 0x20, 0x61, 0x64, 0x6a, 0x75, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x28, 0x6d, 0x65, 0x73, 0x67, 0x74, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x63, 0x6f, 0x20, 0x3d, 0x20, 0x63, 0x6f, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x65, 0x2e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x20, 0x73, 0x65, 0x6e, 0x64, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x28, 0x6d, 0x65, 0x73, 0x67, 0x74, 0x29, 0x20, 0x65, 0x6e, 0x64, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x72, 0x65, 0x74, 0x2c, 0x20, 0x61, 0x2c, 0x20, 0x62, 0x20, 0x3d, 0x20, 0x63, 0x6f, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x65, 0x2e, 0x72, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x28, 0x63, 0x6f, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x72, 0x65, 0x74, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x61, 0x2c, 0x20, 0x62, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6e, 0x69, 0x6c, 0x2c, 0x20, 0x61, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x2d, 0x2d, 0x20, 0x48, 0x69, 0x67, 0x68, 0x20, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x20, 0x53, 0x4d, 0x54, 0x50, 0x20, 0x41, 0x50, 0x49, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x5f, 0x4d, 0x2e, 0x73, 0x65, 0x6e, 0x64, 0x20, 0x3d, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6d, 0x61, 0x69, 0x6c, 0x74, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x73, 0x20, 0x3d, 0x20, 0x5f, 0x4d, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x28, 0x6d, 0x61, 0x69, 0x6c, 0x74, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2c, 0x20, 0x6d, 0x61, 0x69, 0x6c, 0x74, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x2c, 0x20, 0x6d, 0x61, 0x69, 0x6c, 0x74, 0x2e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x65, 0x78, 0x74, 0x20, 0x3d, 0x20, 0x73, 0x3a, 0x67, 0x72, 0x65, 0x65, 0x74, 0x28, 0x6d, 0x61, 0x69, 0x6c, 0x74, 0x2e, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x3a, 0x61, 0x75, 0x74, 0x68, 0x28, 0x6d, 0x61, 0x69, 0x6c, 0x74, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2c, 0x20, 0x6d, 0x61, 0x69, 0x6c, 0x74, 0x2e, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x2c, 0x20, 0x65, 0x78, 0x74, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x3a, 0x73, 0x65, 0x6e, 0x64, 0x28, 0x6d, 0x61, 0x69, 0x6c, 0x74, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x3a, 0x71, 0x75, 0x69, 0x74, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x73, 0x3a, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x28, 0x29, 0x0a, 0x65, 0x6e, 0x64, 0x29, 0x0a, 0x0a, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x4d, 0x0a, }; // [smtp.lua] } // love ================================================ FILE: src/libraries/luasocket/libluasocket/socket.h ================================================ #ifndef SOCKET_H #define SOCKET_H /*=========================================================================*\ * Socket compatibilization module * LuaSocket toolkit * * BSD Sockets and WinSock are similar, but there are a few irritating * differences. Also, not all *nix platforms behave the same. This module * (and the associated usocket.h and wsocket.h) factor these differences and * creates a interface compatible with the io.h module. \*=========================================================================*/ #include "io.h" /*=========================================================================*\ * Platform specific compatibilization \*=========================================================================*/ #ifdef _WIN32 #include "wsocket.h" #define LUA_GAI_STRERROR gai_strerrorA #else #include "usocket.h" #define LUA_GAI_STRERROR gai_strerror #endif /*=========================================================================*\ * The connect and accept functions accept a timeout and their * implementations are somewhat complicated. We chose to move * the timeout control into this module for these functions in * order to simplify the modules that use them. \*=========================================================================*/ #include "timeout.h" /* convenient shorthand */ typedef struct sockaddr SA; /*=========================================================================*\ * Functions bellow implement a comfortable platform independent * interface to sockets \*=========================================================================*/ #ifndef _WIN32 #pragma GCC visibility push(hidden) #endif int socket_waitfd(p_socket ps, int sw, p_timeout tm); int socket_open(void); int socket_close(void); void socket_destroy(p_socket ps); int socket_select(t_socket n, fd_set *rfds, fd_set *wfds, fd_set *efds, p_timeout tm); int socket_create(p_socket ps, int domain, int type, int protocol); int socket_bind(p_socket ps, SA *addr, socklen_t addr_len); int socket_listen(p_socket ps, int backlog); void socket_shutdown(p_socket ps, int how); int socket_connect(p_socket ps, SA *addr, socklen_t addr_len, p_timeout tm); int socket_accept(p_socket ps, p_socket pa, SA *addr, socklen_t *addr_len, p_timeout tm); int socket_send(p_socket ps, const char *data, size_t count, size_t *sent, p_timeout tm); int socket_sendto(p_socket ps, const char *data, size_t count, size_t *sent, SA *addr, socklen_t addr_len, p_timeout tm); int socket_recv(p_socket ps, char *data, size_t count, size_t *got, p_timeout tm); int socket_recvfrom(p_socket ps, char *data, size_t count, size_t *got, SA *addr, socklen_t *addr_len, p_timeout tm); int socket_write(p_socket ps, const char *data, size_t count, size_t *sent, p_timeout tm); int socket_read(p_socket ps, char *data, size_t count, size_t *got, p_timeout tm); void socket_setblocking(p_socket ps); void socket_setnonblocking(p_socket ps); int socket_gethostbyaddr(const char *addr, socklen_t len, struct hostent **hp); int socket_gethostbyname(const char *addr, struct hostent **hp); const char *socket_hoststrerror(int err); const char *socket_strerror(int err); const char *socket_ioerror(p_socket ps, int err); const char *socket_gaistrerror(int err); #ifndef _WIN32 #pragma GCC visibility pop #endif #endif /* SOCKET_H */ ================================================ FILE: src/libraries/luasocket/libluasocket/socket.lua ================================================ ----------------------------------------------------------------------------- -- LuaSocket helper module -- Author: Diego Nehab ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- -- Declare module and import dependencies ----------------------------------------------------------------------------- local base = _G local string = require("string") local math = require("math") local socket = require("socket.core") local _M = socket ----------------------------------------------------------------------------- -- Exported auxiliar functions ----------------------------------------------------------------------------- function _M.connect4(address, port, laddress, lport) return socket.connect(address, port, laddress, lport, "inet") end function _M.connect6(address, port, laddress, lport) return socket.connect(address, port, laddress, lport, "inet6") end function _M.bind(host, port, backlog) if host == "*" then host = "0.0.0.0" end local addrinfo, err = socket.dns.getaddrinfo(host); if not addrinfo then return nil, err end local sock, res err = "no info on address" for i, alt in base.ipairs(addrinfo) do if alt.family == "inet" then sock, err = socket.tcp4() else sock, err = socket.tcp6() end if not sock then return nil, err end sock:setoption("reuseaddr", true) res, err = sock:bind(alt.addr, port) if not res then sock:close() else res, err = sock:listen(backlog) if not res then sock:close() else return sock end end end return nil, err end _M.try = _M.newtry() function _M.choose(table) return function(name, opt1, opt2) if base.type(name) ~= "string" then name, opt1, opt2 = "default", name, opt1 end local f = table[name or "nil"] if not f then base.error("unknown key (".. base.tostring(name) ..")", 3) else return f(opt1, opt2) end end end ----------------------------------------------------------------------------- -- Socket sources and sinks, conforming to LTN12 ----------------------------------------------------------------------------- -- create namespaces inside LuaSocket namespace local sourcet, sinkt = {}, {} _M.sourcet = sourcet _M.sinkt = sinkt _M.BLOCKSIZE = 2048 sinkt["close-when-done"] = function(sock) return base.setmetatable({ getfd = function() return sock:getfd() end, dirty = function() return sock:dirty() end }, { __call = function(self, chunk, err) if not chunk then sock:close() return 1 else return sock:send(chunk) end end }) end sinkt["keep-open"] = function(sock) return base.setmetatable({ getfd = function() return sock:getfd() end, dirty = function() return sock:dirty() end }, { __call = function(self, chunk, err) if chunk then return sock:send(chunk) else return 1 end end }) end sinkt["default"] = sinkt["keep-open"] _M.sink = _M.choose(sinkt) sourcet["by-length"] = function(sock, length) return base.setmetatable({ getfd = function() return sock:getfd() end, dirty = function() return sock:dirty() end }, { __call = function() if length <= 0 then return nil end local size = math.min(socket.BLOCKSIZE, length) local chunk, err = sock:receive(size) if err then return nil, err end length = length - string.len(chunk) return chunk end }) end sourcet["until-closed"] = function(sock) local done return base.setmetatable({ getfd = function() return sock:getfd() end, dirty = function() return sock:dirty() end }, { __call = function() if done then return nil end local chunk, err, partial = sock:receive(socket.BLOCKSIZE) if not err then return chunk elseif err == "closed" then sock:close() done = 1 return partial else return nil, err end end }) end sourcet["default"] = sourcet["until-closed"] _M.source = _M.choose(sourcet) return _M ================================================ FILE: src/libraries/luasocket/libluasocket/socket.lua.h ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ namespace love { // [socket.lua] const unsigned char socket_lua[] = { 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x2d, 0x2d, 0x20, 0x4c, 0x75, 0x61, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x20, 0x68, 0x65, 0x6c, 0x70, 0x65, 0x72, 0x20, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x0a, 0x2d, 0x2d, 0x20, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x3a, 0x20, 0x44, 0x69, 0x65, 0x67, 0x6f, 0x20, 0x4e, 0x65, 0x68, 0x61, 0x62, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x2d, 0x2d, 0x20, 0x44, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x20, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x20, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x62, 0x61, 0x73, 0x65, 0x20, 0x3d, 0x20, 0x5f, 0x47, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x3d, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x28, 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0x29, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x6d, 0x61, 0x74, 0x68, 0x20, 0x3d, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x28, 0x22, 0x6d, 0x61, 0x74, 0x68, 0x22, 0x29, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x20, 0x3d, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x28, 0x22, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x22, 0x29, 0x0a, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x5f, 0x4d, 0x20, 0x3d, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x0a, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x2d, 0x2d, 0x20, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x20, 0x61, 0x75, 0x78, 0x69, 0x6c, 0x69, 0x61, 0x72, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x5f, 0x4d, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x34, 0x28, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2c, 0x20, 0x70, 0x6f, 0x72, 0x74, 0x2c, 0x20, 0x6c, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2c, 0x20, 0x6c, 0x70, 0x6f, 0x72, 0x74, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x28, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2c, 0x20, 0x70, 0x6f, 0x72, 0x74, 0x2c, 0x20, 0x6c, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2c, 0x20, 0x6c, 0x70, 0x6f, 0x72, 0x74, 0x2c, 0x20, 0x22, 0x69, 0x6e, 0x65, 0x74, 0x22, 0x29, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x5f, 0x4d, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x36, 0x28, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2c, 0x20, 0x70, 0x6f, 0x72, 0x74, 0x2c, 0x20, 0x6c, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2c, 0x20, 0x6c, 0x70, 0x6f, 0x72, 0x74, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x28, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2c, 0x20, 0x70, 0x6f, 0x72, 0x74, 0x2c, 0x20, 0x6c, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2c, 0x20, 0x6c, 0x70, 0x6f, 0x72, 0x74, 0x2c, 0x20, 0x22, 0x69, 0x6e, 0x65, 0x74, 0x36, 0x22, 0x29, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x5f, 0x4d, 0x2e, 0x62, 0x69, 0x6e, 0x64, 0x28, 0x68, 0x6f, 0x73, 0x74, 0x2c, 0x20, 0x70, 0x6f, 0x72, 0x74, 0x2c, 0x20, 0x62, 0x61, 0x63, 0x6b, 0x6c, 0x6f, 0x67, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x68, 0x6f, 0x73, 0x74, 0x20, 0x3d, 0x3d, 0x20, 0x22, 0x2a, 0x22, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x68, 0x6f, 0x73, 0x74, 0x20, 0x3d, 0x20, 0x22, 0x30, 0x2e, 0x30, 0x2e, 0x30, 0x2e, 0x30, 0x22, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x61, 0x64, 0x64, 0x72, 0x69, 0x6e, 0x66, 0x6f, 0x2c, 0x20, 0x65, 0x72, 0x72, 0x20, 0x3d, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x64, 0x6e, 0x73, 0x2e, 0x67, 0x65, 0x74, 0x61, 0x64, 0x64, 0x72, 0x69, 0x6e, 0x66, 0x6f, 0x28, 0x68, 0x6f, 0x73, 0x74, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x61, 0x64, 0x64, 0x72, 0x69, 0x6e, 0x66, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6e, 0x69, 0x6c, 0x2c, 0x20, 0x65, 0x72, 0x72, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x2c, 0x20, 0x72, 0x65, 0x73, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x72, 0x72, 0x20, 0x3d, 0x20, 0x22, 0x6e, 0x6f, 0x20, 0x69, 0x6e, 0x66, 0x6f, 0x20, 0x6f, 0x6e, 0x20, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x69, 0x2c, 0x20, 0x61, 0x6c, 0x74, 0x20, 0x69, 0x6e, 0x20, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x69, 0x70, 0x61, 0x69, 0x72, 0x73, 0x28, 0x61, 0x64, 0x64, 0x72, 0x69, 0x6e, 0x66, 0x6f, 0x29, 0x20, 0x64, 0x6f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x61, 0x6c, 0x74, 0x2e, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x20, 0x3d, 0x3d, 0x20, 0x22, 0x69, 0x6e, 0x65, 0x74, 0x22, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x2c, 0x20, 0x65, 0x72, 0x72, 0x20, 0x3d, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x74, 0x63, 0x70, 0x34, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x2c, 0x20, 0x65, 0x72, 0x72, 0x20, 0x3d, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x74, 0x63, 0x70, 0x36, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6e, 0x69, 0x6c, 0x2c, 0x20, 0x65, 0x72, 0x72, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x3a, 0x73, 0x65, 0x74, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x22, 0x72, 0x65, 0x75, 0x73, 0x65, 0x61, 0x64, 0x64, 0x72, 0x22, 0x2c, 0x20, 0x74, 0x72, 0x75, 0x65, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x73, 0x2c, 0x20, 0x65, 0x72, 0x72, 0x20, 0x3d, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x3a, 0x62, 0x69, 0x6e, 0x64, 0x28, 0x61, 0x6c, 0x74, 0x2e, 0x61, 0x64, 0x64, 0x72, 0x2c, 0x20, 0x70, 0x6f, 0x72, 0x74, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x72, 0x65, 0x73, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x3a, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x73, 0x2c, 0x20, 0x65, 0x72, 0x72, 0x20, 0x3d, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x3a, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x28, 0x62, 0x61, 0x63, 0x6b, 0x6c, 0x6f, 0x67, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x72, 0x65, 0x73, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x3a, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6e, 0x69, 0x6c, 0x2c, 0x20, 0x65, 0x72, 0x72, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x5f, 0x4d, 0x2e, 0x74, 0x72, 0x79, 0x20, 0x3d, 0x20, 0x5f, 0x4d, 0x2e, 0x6e, 0x65, 0x77, 0x74, 0x72, 0x79, 0x28, 0x29, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x5f, 0x4d, 0x2e, 0x63, 0x68, 0x6f, 0x6f, 0x73, 0x65, 0x28, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x20, 0x6f, 0x70, 0x74, 0x31, 0x2c, 0x20, 0x6f, 0x70, 0x74, 0x32, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x28, 0x6e, 0x61, 0x6d, 0x65, 0x29, 0x20, 0x7e, 0x3d, 0x20, 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x20, 0x6f, 0x70, 0x74, 0x31, 0x2c, 0x20, 0x6f, 0x70, 0x74, 0x32, 0x20, 0x3d, 0x20, 0x22, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x22, 0x2c, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x20, 0x6f, 0x70, 0x74, 0x31, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x66, 0x20, 0x3d, 0x20, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5b, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x6f, 0x72, 0x20, 0x22, 0x6e, 0x69, 0x6c, 0x22, 0x5d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x66, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x28, 0x22, 0x75, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x20, 0x6b, 0x65, 0x79, 0x20, 0x28, 0x22, 0x2e, 0x2e, 0x20, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x74, 0x6f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x28, 0x6e, 0x61, 0x6d, 0x65, 0x29, 0x20, 0x2e, 0x2e, 0x22, 0x29, 0x22, 0x2c, 0x20, 0x33, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x66, 0x28, 0x6f, 0x70, 0x74, 0x31, 0x2c, 0x20, 0x6f, 0x70, 0x74, 0x32, 0x29, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x2d, 0x2d, 0x20, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x73, 0x69, 0x6e, 0x6b, 0x73, 0x2c, 0x20, 0x63, 0x6f, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x6f, 0x20, 0x4c, 0x54, 0x4e, 0x31, 0x32, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x2d, 0x2d, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x20, 0x69, 0x6e, 0x73, 0x69, 0x64, 0x65, 0x20, 0x4c, 0x75, 0x61, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x74, 0x2c, 0x20, 0x73, 0x69, 0x6e, 0x6b, 0x74, 0x20, 0x3d, 0x20, 0x7b, 0x7d, 0x2c, 0x20, 0x7b, 0x7d, 0x0a, 0x5f, 0x4d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x74, 0x20, 0x3d, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x74, 0x0a, 0x5f, 0x4d, 0x2e, 0x73, 0x69, 0x6e, 0x6b, 0x74, 0x20, 0x3d, 0x20, 0x73, 0x69, 0x6e, 0x6b, 0x74, 0x0a, 0x0a, 0x5f, 0x4d, 0x2e, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x53, 0x49, 0x5a, 0x45, 0x20, 0x3d, 0x20, 0x32, 0x30, 0x34, 0x38, 0x0a, 0x0a, 0x73, 0x69, 0x6e, 0x6b, 0x74, 0x5b, 0x22, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x2d, 0x77, 0x68, 0x65, 0x6e, 0x2d, 0x64, 0x6f, 0x6e, 0x65, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x73, 0x6f, 0x63, 0x6b, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x65, 0x74, 0x6d, 0x65, 0x74, 0x61, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x28, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x67, 0x65, 0x74, 0x66, 0x64, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x3a, 0x67, 0x65, 0x74, 0x66, 0x64, 0x28, 0x29, 0x20, 0x65, 0x6e, 0x64, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x64, 0x69, 0x72, 0x74, 0x79, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x3a, 0x64, 0x69, 0x72, 0x74, 0x79, 0x28, 0x29, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5f, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x73, 0x65, 0x6c, 0x66, 0x2c, 0x20, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x2c, 0x20, 0x65, 0x72, 0x72, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x3a, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x31, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x3a, 0x73, 0x65, 0x6e, 0x64, 0x28, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x29, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x29, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x73, 0x69, 0x6e, 0x6b, 0x74, 0x5b, 0x22, 0x6b, 0x65, 0x65, 0x70, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x73, 0x6f, 0x63, 0x6b, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x65, 0x74, 0x6d, 0x65, 0x74, 0x61, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x28, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x67, 0x65, 0x74, 0x66, 0x64, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x3a, 0x67, 0x65, 0x74, 0x66, 0x64, 0x28, 0x29, 0x20, 0x65, 0x6e, 0x64, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x64, 0x69, 0x72, 0x74, 0x79, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x3a, 0x64, 0x69, 0x72, 0x74, 0x79, 0x28, 0x29, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5f, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x73, 0x65, 0x6c, 0x66, 0x2c, 0x20, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x2c, 0x20, 0x65, 0x72, 0x72, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x3a, 0x73, 0x65, 0x6e, 0x64, 0x28, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x31, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x29, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x73, 0x69, 0x6e, 0x6b, 0x74, 0x5b, 0x22, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x73, 0x69, 0x6e, 0x6b, 0x74, 0x5b, 0x22, 0x6b, 0x65, 0x65, 0x70, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x22, 0x5d, 0x0a, 0x0a, 0x5f, 0x4d, 0x2e, 0x73, 0x69, 0x6e, 0x6b, 0x20, 0x3d, 0x20, 0x5f, 0x4d, 0x2e, 0x63, 0x68, 0x6f, 0x6f, 0x73, 0x65, 0x28, 0x73, 0x69, 0x6e, 0x6b, 0x74, 0x29, 0x0a, 0x0a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x74, 0x5b, 0x22, 0x62, 0x79, 0x2d, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x73, 0x6f, 0x63, 0x6b, 0x2c, 0x20, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x65, 0x74, 0x6d, 0x65, 0x74, 0x61, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x28, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x67, 0x65, 0x74, 0x66, 0x64, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x3a, 0x67, 0x65, 0x74, 0x66, 0x64, 0x28, 0x29, 0x20, 0x65, 0x6e, 0x64, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x64, 0x69, 0x72, 0x74, 0x79, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x3a, 0x64, 0x69, 0x72, 0x74, 0x79, 0x28, 0x29, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5f, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x20, 0x3c, 0x3d, 0x20, 0x30, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6e, 0x69, 0x6c, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x73, 0x69, 0x7a, 0x65, 0x20, 0x3d, 0x20, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x6d, 0x69, 0x6e, 0x28, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x53, 0x49, 0x5a, 0x45, 0x2c, 0x20, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x2c, 0x20, 0x65, 0x72, 0x72, 0x20, 0x3d, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x3a, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x28, 0x73, 0x69, 0x7a, 0x65, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x65, 0x72, 0x72, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6e, 0x69, 0x6c, 0x2c, 0x20, 0x65, 0x72, 0x72, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x20, 0x3d, 0x20, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x20, 0x2d, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x6c, 0x65, 0x6e, 0x28, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x29, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x74, 0x5b, 0x22, 0x75, 0x6e, 0x74, 0x69, 0x6c, 0x2d, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x73, 0x6f, 0x63, 0x6b, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x64, 0x6f, 0x6e, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x65, 0x74, 0x6d, 0x65, 0x74, 0x61, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x28, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x67, 0x65, 0x74, 0x66, 0x64, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x3a, 0x67, 0x65, 0x74, 0x66, 0x64, 0x28, 0x29, 0x20, 0x65, 0x6e, 0x64, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x64, 0x69, 0x72, 0x74, 0x79, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x3a, 0x64, 0x69, 0x72, 0x74, 0x79, 0x28, 0x29, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5f, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x64, 0x6f, 0x6e, 0x65, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6e, 0x69, 0x6c, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x2c, 0x20, 0x65, 0x72, 0x72, 0x2c, 0x20, 0x70, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x20, 0x3d, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x3a, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x28, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x53, 0x49, 0x5a, 0x45, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x65, 0x72, 0x72, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x69, 0x66, 0x20, 0x65, 0x72, 0x72, 0x20, 0x3d, 0x3d, 0x20, 0x22, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x22, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x3a, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x64, 0x6f, 0x6e, 0x65, 0x20, 0x3d, 0x20, 0x31, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x70, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6e, 0x69, 0x6c, 0x2c, 0x20, 0x65, 0x72, 0x72, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x29, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x0a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x74, 0x5b, 0x22, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x22, 0x5d, 0x20, 0x3d, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x74, 0x5b, 0x22, 0x75, 0x6e, 0x74, 0x69, 0x6c, 0x2d, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x22, 0x5d, 0x0a, 0x0a, 0x5f, 0x4d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x3d, 0x20, 0x5f, 0x4d, 0x2e, 0x63, 0x68, 0x6f, 0x6f, 0x73, 0x65, 0x28, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x74, 0x29, 0x0a, 0x0a, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x4d, 0x0a, }; // [socket.lua] } // love ================================================ FILE: src/libraries/luasocket/libluasocket/tcp.c ================================================ /*=========================================================================*\ * TCP object * LuaSocket toolkit \*=========================================================================*/ #include "luasocket.h" #include "auxiliar.h" #include "socket.h" #include "inet.h" #include "options.h" #include "tcp.h" #include /*=========================================================================*\ * Internal function prototypes \*=========================================================================*/ static int global_create(lua_State *L); static int global_create4(lua_State *L); static int global_create6(lua_State *L); static int global_connect(lua_State *L); static int meth_connect(lua_State *L); static int meth_listen(lua_State *L); static int meth_getfamily(lua_State *L); static int meth_bind(lua_State *L); static int meth_send(lua_State *L); static int meth_getstats(lua_State *L); static int meth_setstats(lua_State *L); static int meth_getsockname(lua_State *L); static int meth_getpeername(lua_State *L); static int meth_shutdown(lua_State *L); static int meth_receive(lua_State *L); static int meth_accept(lua_State *L); static int meth_close(lua_State *L); static int meth_getoption(lua_State *L); static int meth_setoption(lua_State *L); static int meth_gettimeout(lua_State *L); static int meth_settimeout(lua_State *L); static int meth_getfd(lua_State *L); static int meth_setfd(lua_State *L); static int meth_dirty(lua_State *L); /* tcp object methods */ static luaL_Reg tcp_methods[] = { {"__gc", meth_close}, {"__tostring", auxiliar_tostring}, {"accept", meth_accept}, {"bind", meth_bind}, {"close", meth_close}, {"connect", meth_connect}, {"dirty", meth_dirty}, {"getfamily", meth_getfamily}, {"getfd", meth_getfd}, {"getoption", meth_getoption}, {"getpeername", meth_getpeername}, {"getsockname", meth_getsockname}, {"getstats", meth_getstats}, {"setstats", meth_setstats}, {"listen", meth_listen}, {"receive", meth_receive}, {"send", meth_send}, {"setfd", meth_setfd}, {"setoption", meth_setoption}, {"setpeername", meth_connect}, {"setsockname", meth_bind}, {"settimeout", meth_settimeout}, {"gettimeout", meth_gettimeout}, {"shutdown", meth_shutdown}, {NULL, NULL} }; /* socket option handlers */ static t_opt optget[] = { {"bindtodevice", opt_get_bindtodevice}, {"keepalive", opt_get_keepalive}, {"reuseaddr", opt_get_reuseaddr}, {"reuseport", opt_get_reuseport}, {"tcp-nodelay", opt_get_tcp_nodelay}, #ifdef TCP_KEEPIDLE {"tcp-keepidle", opt_get_tcp_keepidle}, #endif #ifdef TCP_KEEPCNT {"tcp-keepcnt", opt_get_tcp_keepcnt}, #endif #ifdef TCP_KEEPINTVL {"tcp-keepintvl", opt_get_tcp_keepintvl}, #endif {"linger", opt_get_linger}, {"error", opt_get_error}, {"recv-buffer-size", opt_get_recv_buf_size}, {"send-buffer-size", opt_get_send_buf_size}, {NULL, NULL} }; static t_opt optset[] = { {"bindtodevice", opt_set_bindtodevice}, {"keepalive", opt_set_keepalive}, {"reuseaddr", opt_set_reuseaddr}, {"reuseport", opt_set_reuseport}, {"tcp-nodelay", opt_set_tcp_nodelay}, #ifdef TCP_KEEPIDLE {"tcp-keepidle", opt_set_tcp_keepidle}, #endif #ifdef TCP_KEEPCNT {"tcp-keepcnt", opt_set_tcp_keepcnt}, #endif #ifdef TCP_KEEPINTVL {"tcp-keepintvl", opt_set_tcp_keepintvl}, #endif {"ipv6-v6only", opt_set_ip6_v6only}, {"linger", opt_set_linger}, {"recv-buffer-size", opt_set_recv_buf_size}, {"send-buffer-size", opt_set_send_buf_size}, #ifdef TCP_DEFER_ACCEPT {"tcp-defer-accept", opt_set_tcp_defer_accept}, #endif #ifdef TCP_FASTOPEN {"tcp-fastopen", opt_set_tcp_fastopen}, #endif #ifdef TCP_FASTOPEN_CONNECT {"tcp-fastopen-connect", opt_set_tcp_fastopen_connect}, #endif {NULL, NULL} }; /* functions in library namespace */ static luaL_Reg func[] = { {"tcp", global_create}, {"tcp4", global_create4}, {"tcp6", global_create6}, {"connect", global_connect}, {NULL, NULL} }; /*-------------------------------------------------------------------------*\ * Initializes module \*-------------------------------------------------------------------------*/ int tcp_open(lua_State *L) { /* create classes */ auxiliar_newclass(L, "tcp{master}", tcp_methods); auxiliar_newclass(L, "tcp{client}", tcp_methods); auxiliar_newclass(L, "tcp{server}", tcp_methods); /* create class groups */ auxiliar_add2group(L, "tcp{master}", "tcp{any}"); auxiliar_add2group(L, "tcp{client}", "tcp{any}"); auxiliar_add2group(L, "tcp{server}", "tcp{any}"); /* define library functions */ luaL_setfuncs(L, func, 0); return 0; } /*=========================================================================*\ * Lua methods \*=========================================================================*/ /*-------------------------------------------------------------------------*\ * Just call buffered IO methods \*-------------------------------------------------------------------------*/ static int meth_send(lua_State *L) { p_tcp tcp = (p_tcp) auxiliar_checkclass(L, "tcp{client}", 1); return buffer_meth_send(L, &tcp->buf); } static int meth_receive(lua_State *L) { p_tcp tcp = (p_tcp) auxiliar_checkclass(L, "tcp{client}", 1); return buffer_meth_receive(L, &tcp->buf); } static int meth_getstats(lua_State *L) { p_tcp tcp = (p_tcp) auxiliar_checkclass(L, "tcp{client}", 1); return buffer_meth_getstats(L, &tcp->buf); } static int meth_setstats(lua_State *L) { p_tcp tcp = (p_tcp) auxiliar_checkclass(L, "tcp{client}", 1); return buffer_meth_setstats(L, &tcp->buf); } /*-------------------------------------------------------------------------*\ * Just call option handler \*-------------------------------------------------------------------------*/ static int meth_getoption(lua_State *L) { p_tcp tcp = (p_tcp) auxiliar_checkgroup(L, "tcp{any}", 1); return opt_meth_getoption(L, optget, &tcp->sock); } static int meth_setoption(lua_State *L) { p_tcp tcp = (p_tcp) auxiliar_checkgroup(L, "tcp{any}", 1); return opt_meth_setoption(L, optset, &tcp->sock); } /*-------------------------------------------------------------------------*\ * Select support methods \*-------------------------------------------------------------------------*/ static int meth_getfd(lua_State *L) { p_tcp tcp = (p_tcp) auxiliar_checkgroup(L, "tcp{any}", 1); lua_pushnumber(L, (int) tcp->sock); return 1; } /* this is very dangerous, but can be handy for those that are brave enough */ static int meth_setfd(lua_State *L) { p_tcp tcp = (p_tcp) auxiliar_checkgroup(L, "tcp{any}", 1); tcp->sock = (t_socket) luaL_checknumber(L, 2); return 0; } static int meth_dirty(lua_State *L) { p_tcp tcp = (p_tcp) auxiliar_checkgroup(L, "tcp{any}", 1); lua_pushboolean(L, !buffer_isempty(&tcp->buf)); return 1; } /*-------------------------------------------------------------------------*\ * Waits for and returns a client object attempting connection to the * server object \*-------------------------------------------------------------------------*/ static int meth_accept(lua_State *L) { p_tcp server = (p_tcp) auxiliar_checkclass(L, "tcp{server}", 1); p_timeout tm = timeout_markstart(&server->tm); t_socket sock; const char *err = inet_tryaccept(&server->sock, server->family, &sock, tm); /* if successful, push client socket */ if (err == NULL) { p_tcp clnt = (p_tcp) lua_newuserdata(L, sizeof(t_tcp)); auxiliar_setclass(L, "tcp{client}", -1); /* initialize structure fields */ memset(clnt, 0, sizeof(t_tcp)); socket_setnonblocking(&sock); clnt->sock = sock; io_init(&clnt->io, (p_send) socket_send, (p_recv) socket_recv, (p_error) socket_ioerror, &clnt->sock); timeout_init(&clnt->tm, -1, -1); buffer_init(&clnt->buf, &clnt->io, &clnt->tm); clnt->family = server->family; return 1; } else { lua_pushnil(L); lua_pushstring(L, err); return 2; } } /*-------------------------------------------------------------------------*\ * Binds an object to an address \*-------------------------------------------------------------------------*/ static int meth_bind(lua_State *L) { p_tcp tcp = (p_tcp) auxiliar_checkclass(L, "tcp{master}", 1); const char *address = luaL_checkstring(L, 2); const char *port = luaL_checkstring(L, 3); const char *err; struct addrinfo bindhints; memset(&bindhints, 0, sizeof(bindhints)); bindhints.ai_socktype = SOCK_STREAM; bindhints.ai_family = tcp->family; bindhints.ai_flags = AI_PASSIVE; err = inet_trybind(&tcp->sock, &tcp->family, address, port, &bindhints); if (err) { lua_pushnil(L); lua_pushstring(L, err); return 2; } lua_pushnumber(L, 1); return 1; } /*-------------------------------------------------------------------------*\ * Turns a master tcp object into a client object. \*-------------------------------------------------------------------------*/ static int meth_connect(lua_State *L) { p_tcp tcp = (p_tcp) auxiliar_checkgroup(L, "tcp{any}", 1); const char *address = luaL_checkstring(L, 2); const char *port = luaL_checkstring(L, 3); struct addrinfo connecthints; const char *err; memset(&connecthints, 0, sizeof(connecthints)); connecthints.ai_socktype = SOCK_STREAM; /* make sure we try to connect only to the same family */ connecthints.ai_family = tcp->family; timeout_markstart(&tcp->tm); err = inet_tryconnect(&tcp->sock, &tcp->family, address, port, &tcp->tm, &connecthints); /* have to set the class even if it failed due to non-blocking connects */ auxiliar_setclass(L, "tcp{client}", 1); if (err) { lua_pushnil(L); lua_pushstring(L, err); return 2; } lua_pushnumber(L, 1); return 1; } /*-------------------------------------------------------------------------*\ * Closes socket used by object \*-------------------------------------------------------------------------*/ static int meth_close(lua_State *L) { p_tcp tcp = (p_tcp) auxiliar_checkgroup(L, "tcp{any}", 1); socket_destroy(&tcp->sock); lua_pushnumber(L, 1); return 1; } /*-------------------------------------------------------------------------*\ * Returns family as string \*-------------------------------------------------------------------------*/ static int meth_getfamily(lua_State *L) { p_tcp tcp = (p_tcp) auxiliar_checkgroup(L, "tcp{any}", 1); if (tcp->family == AF_INET6) { lua_pushliteral(L, "inet6"); return 1; } else if (tcp->family == AF_INET) { lua_pushliteral(L, "inet4"); return 1; } else { lua_pushliteral(L, "inet4"); return 1; } } /*-------------------------------------------------------------------------*\ * Puts the sockt in listen mode \*-------------------------------------------------------------------------*/ static int meth_listen(lua_State *L) { p_tcp tcp = (p_tcp) auxiliar_checkclass(L, "tcp{master}", 1); int backlog = (int) luaL_optnumber(L, 2, 32); int err = socket_listen(&tcp->sock, backlog); if (err != IO_DONE) { lua_pushnil(L); lua_pushstring(L, socket_strerror(err)); return 2; } /* turn master object into a server object */ auxiliar_setclass(L, "tcp{server}", 1); lua_pushnumber(L, 1); return 1; } /*-------------------------------------------------------------------------*\ * Shuts the connection down partially \*-------------------------------------------------------------------------*/ static int meth_shutdown(lua_State *L) { /* SHUT_RD, SHUT_WR, SHUT_RDWR have the value 0, 1, 2, so we can use method index directly */ static const char* methods[] = { "receive", "send", "both", NULL }; p_tcp tcp = (p_tcp) auxiliar_checkclass(L, "tcp{client}", 1); int how = luaL_checkoption(L, 2, "both", methods); socket_shutdown(&tcp->sock, how); lua_pushnumber(L, 1); return 1; } /*-------------------------------------------------------------------------*\ * Just call inet methods \*-------------------------------------------------------------------------*/ static int meth_getpeername(lua_State *L) { p_tcp tcp = (p_tcp) auxiliar_checkgroup(L, "tcp{any}", 1); return inet_meth_getpeername(L, &tcp->sock, tcp->family); } static int meth_getsockname(lua_State *L) { p_tcp tcp = (p_tcp) auxiliar_checkgroup(L, "tcp{any}", 1); return inet_meth_getsockname(L, &tcp->sock, tcp->family); } /*-------------------------------------------------------------------------*\ * Just call tm methods \*-------------------------------------------------------------------------*/ static int meth_settimeout(lua_State *L) { p_tcp tcp = (p_tcp) auxiliar_checkgroup(L, "tcp{any}", 1); return timeout_meth_settimeout(L, &tcp->tm); } static int meth_gettimeout(lua_State *L) { p_tcp tcp = (p_tcp) auxiliar_checkgroup(L, "tcp{any}", 1); return timeout_meth_gettimeout(L, &tcp->tm); } /*=========================================================================*\ * Library functions \*=========================================================================*/ /*-------------------------------------------------------------------------*\ * Creates a master tcp object \*-------------------------------------------------------------------------*/ static int tcp_create(lua_State *L, int family) { p_tcp tcp = (p_tcp) lua_newuserdata(L, sizeof(t_tcp)); memset(tcp, 0, sizeof(t_tcp)); /* set its type as master object */ auxiliar_setclass(L, "tcp{master}", -1); /* if family is AF_UNSPEC, we leave the socket invalid and * store AF_UNSPEC into family. This will allow it to later be * replaced with an AF_INET6 or AF_INET socket upon first use. */ tcp->sock = SOCKET_INVALID; tcp->family = family; io_init(&tcp->io, (p_send) socket_send, (p_recv) socket_recv, (p_error) socket_ioerror, &tcp->sock); timeout_init(&tcp->tm, -1, -1); buffer_init(&tcp->buf, &tcp->io, &tcp->tm); if (family != AF_UNSPEC) { const char *err = inet_trycreate(&tcp->sock, family, SOCK_STREAM, 0); if (err != NULL) { lua_pushnil(L); lua_pushstring(L, err); return 2; } socket_setnonblocking(&tcp->sock); } return 1; } static int global_create(lua_State *L) { return tcp_create(L, AF_UNSPEC); } static int global_create4(lua_State *L) { return tcp_create(L, AF_INET); } static int global_create6(lua_State *L) { return tcp_create(L, AF_INET6); } static int global_connect(lua_State *L) { const char *remoteaddr = luaL_checkstring(L, 1); const char *remoteserv = luaL_checkstring(L, 2); const char *localaddr = luaL_optstring(L, 3, NULL); const char *localserv = luaL_optstring(L, 4, "0"); int family = inet_optfamily(L, 5, "unspec"); p_tcp tcp = (p_tcp) lua_newuserdata(L, sizeof(t_tcp)); struct addrinfo bindhints, connecthints; const char *err = NULL; /* initialize tcp structure */ memset(tcp, 0, sizeof(t_tcp)); io_init(&tcp->io, (p_send) socket_send, (p_recv) socket_recv, (p_error) socket_ioerror, &tcp->sock); timeout_init(&tcp->tm, -1, -1); buffer_init(&tcp->buf, &tcp->io, &tcp->tm); tcp->sock = SOCKET_INVALID; tcp->family = AF_UNSPEC; /* allow user to pick local address and port */ memset(&bindhints, 0, sizeof(bindhints)); bindhints.ai_socktype = SOCK_STREAM; bindhints.ai_family = family; bindhints.ai_flags = AI_PASSIVE; if (localaddr) { err = inet_trybind(&tcp->sock, &tcp->family, localaddr, localserv, &bindhints); if (err) { lua_pushnil(L); lua_pushstring(L, err); return 2; } } /* try to connect to remote address and port */ memset(&connecthints, 0, sizeof(connecthints)); connecthints.ai_socktype = SOCK_STREAM; /* make sure we try to connect only to the same family */ connecthints.ai_family = tcp->family; err = inet_tryconnect(&tcp->sock, &tcp->family, remoteaddr, remoteserv, &tcp->tm, &connecthints); if (err) { socket_destroy(&tcp->sock); lua_pushnil(L); lua_pushstring(L, err); return 2; } auxiliar_setclass(L, "tcp{client}", -1); return 1; } ================================================ FILE: src/libraries/luasocket/libluasocket/tcp.h ================================================ #ifndef TCP_H #define TCP_H /*=========================================================================*\ * TCP object * LuaSocket toolkit * * The tcp.h module is basicly a glue that puts together modules buffer.h, * timeout.h socket.h and inet.h to provide the LuaSocket TCP (AF_INET, * SOCK_STREAM) support. * * Three classes are defined: master, client and server. The master class is * a newly created tcp object, that has not been bound or connected. Server * objects are tcp objects bound to some local address. Client objects are * tcp objects either connected to some address or returned by the accept * method of a server object. \*=========================================================================*/ #include "luasocket.h" #include "buffer.h" #include "timeout.h" #include "socket.h" typedef struct t_tcp_ { t_socket sock; t_io io; t_buffer buf; t_timeout tm; int family; } t_tcp; typedef t_tcp *p_tcp; #ifndef _WIN32 #pragma GCC visibility push(hidden) #endif int tcp_open(lua_State *L); #ifndef _WIN32 #pragma GCC visibility pop #endif #endif /* TCP_H */ ================================================ FILE: src/libraries/luasocket/libluasocket/timeout.c ================================================ /*=========================================================================*\ * Timeout management functions * LuaSocket toolkit \*=========================================================================*/ #include "luasocket.h" #include "auxiliar.h" #include "timeout.h" #include #include #include #ifdef _WIN32 #include #else #include #include #endif /* min and max macros */ #ifndef MIN #define MIN(x, y) ((x) < (y) ? x : y) #endif #ifndef MAX #define MAX(x, y) ((x) > (y) ? x : y) #endif /*=========================================================================*\ * Internal function prototypes \*=========================================================================*/ static int timeout_lua_gettime(lua_State *L); static int timeout_lua_sleep(lua_State *L); static luaL_Reg func[] = { { "gettime", timeout_lua_gettime }, { "sleep", timeout_lua_sleep }, { NULL, NULL } }; /*=========================================================================*\ * Exported functions. \*=========================================================================*/ /*-------------------------------------------------------------------------*\ * Initialize structure \*-------------------------------------------------------------------------*/ void timeout_init(p_timeout tm, double block, double total) { tm->block = block; tm->total = total; } /*-------------------------------------------------------------------------*\ * Determines how much time we have left for the next system call, * if the previous call was successful * Input * tm: timeout control structure * Returns * the number of ms left or -1 if there is no time limit \*-------------------------------------------------------------------------*/ double timeout_get(p_timeout tm) { if (tm->block < 0.0 && tm->total < 0.0) { return -1; } else if (tm->block < 0.0) { double t = tm->total - timeout_gettime() + tm->start; return MAX(t, 0.0); } else if (tm->total < 0.0) { return tm->block; } else { double t = tm->total - timeout_gettime() + tm->start; return MIN(tm->block, MAX(t, 0.0)); } } /*-------------------------------------------------------------------------*\ * Returns time since start of operation * Input * tm: timeout control structure * Returns * start field of structure \*-------------------------------------------------------------------------*/ double timeout_getstart(p_timeout tm) { return tm->start; } /*-------------------------------------------------------------------------*\ * Determines how much time we have left for the next system call, * if the previous call was a failure * Input * tm: timeout control structure * Returns * the number of ms left or -1 if there is no time limit \*-------------------------------------------------------------------------*/ double timeout_getretry(p_timeout tm) { if (tm->block < 0.0 && tm->total < 0.0) { return -1; } else if (tm->block < 0.0) { double t = tm->total - timeout_gettime() + tm->start; return MAX(t, 0.0); } else if (tm->total < 0.0) { double t = tm->block - timeout_gettime() + tm->start; return MAX(t, 0.0); } else { double t = tm->total - timeout_gettime() + tm->start; return MIN(tm->block, MAX(t, 0.0)); } } /*-------------------------------------------------------------------------*\ * Marks the operation start time in structure * Input * tm: timeout control structure \*-------------------------------------------------------------------------*/ p_timeout timeout_markstart(p_timeout tm) { tm->start = timeout_gettime(); return tm; } /*-------------------------------------------------------------------------*\ * Gets time in s, relative to January 1, 1970 (UTC) * Returns * time in s. \*-------------------------------------------------------------------------*/ #ifdef _WIN32 double timeout_gettime(void) { FILETIME ft; double t; GetSystemTimeAsFileTime(&ft); /* Windows file time (time since January 1, 1601 (UTC)) */ t = ft.dwLowDateTime/1.0e7 + ft.dwHighDateTime*(4294967296.0/1.0e7); /* convert to Unix Epoch time (time since January 1, 1970 (UTC)) */ return (t - 11644473600.0); } #else double timeout_gettime(void) { struct timeval v; gettimeofday(&v, (struct timezone *) NULL); /* Unix Epoch time (time since January 1, 1970 (UTC)) */ return v.tv_sec + v.tv_usec/1.0e6; } #endif /*-------------------------------------------------------------------------*\ * Initializes module \*-------------------------------------------------------------------------*/ int timeout_open(lua_State *L) { luaL_setfuncs(L, func, 0); return 0; } /*-------------------------------------------------------------------------*\ * Sets timeout values for IO operations * Lua Input: base, time [, mode] * time: time out value in seconds * mode: "b" for block timeout, "t" for total timeout. (default: b) \*-------------------------------------------------------------------------*/ int timeout_meth_settimeout(lua_State *L, p_timeout tm) { double t = luaL_optnumber(L, 2, -1); const char *mode = luaL_optstring(L, 3, "b"); switch (*mode) { case 'b': tm->block = t; break; case 'r': case 't': tm->total = t; break; default: luaL_argcheck(L, 0, 3, "invalid timeout mode"); break; } lua_pushnumber(L, 1); return 1; } /*-------------------------------------------------------------------------*\ * Gets timeout values for IO operations * Lua Output: block, total \*-------------------------------------------------------------------------*/ int timeout_meth_gettimeout(lua_State *L, p_timeout tm) { lua_pushnumber(L, tm->block); lua_pushnumber(L, tm->total); return 2; } /*=========================================================================*\ * Test support functions \*=========================================================================*/ /*-------------------------------------------------------------------------*\ * Returns the time the system has been up, in secconds. \*-------------------------------------------------------------------------*/ static int timeout_lua_gettime(lua_State *L) { lua_pushnumber(L, timeout_gettime()); return 1; } /*-------------------------------------------------------------------------*\ * Sleep for n seconds. \*-------------------------------------------------------------------------*/ #ifdef _WIN32 int timeout_lua_sleep(lua_State *L) { double n = luaL_checknumber(L, 1); if (n < 0.0) n = 0.0; if (n < DBL_MAX/1000.0) n *= 1000.0; if (n > INT_MAX) n = INT_MAX; Sleep((int)n); return 0; } #else int timeout_lua_sleep(lua_State *L) { double n = luaL_checknumber(L, 1); struct timespec t, r; if (n < 0.0) n = 0.0; if (n > INT_MAX) n = INT_MAX; t.tv_sec = (int) n; n -= t.tv_sec; t.tv_nsec = (int) (n * 1000000000); if (t.tv_nsec >= 1000000000) t.tv_nsec = 999999999; while (nanosleep(&t, &r) != 0) { t.tv_sec = r.tv_sec; t.tv_nsec = r.tv_nsec; } return 0; } #endif ================================================ FILE: src/libraries/luasocket/libluasocket/timeout.h ================================================ #ifndef TIMEOUT_H #define TIMEOUT_H /*=========================================================================*\ * Timeout management functions * LuaSocket toolkit \*=========================================================================*/ #include "luasocket.h" /* timeout control structure */ typedef struct t_timeout_ { double block; /* maximum time for blocking calls */ double total; /* total number of miliseconds for operation */ double start; /* time of start of operation */ } t_timeout; typedef t_timeout *p_timeout; #ifndef _WIN32 #pragma GCC visibility push(hidden) #endif void timeout_init(p_timeout tm, double block, double total); double timeout_get(p_timeout tm); double timeout_getstart(p_timeout tm); double timeout_getretry(p_timeout tm); p_timeout timeout_markstart(p_timeout tm); double timeout_gettime(void); int timeout_open(lua_State *L); int timeout_meth_settimeout(lua_State *L, p_timeout tm); int timeout_meth_gettimeout(lua_State *L, p_timeout tm); #ifndef _WIN32 #pragma GCC visibility pop #endif #define timeout_iszero(tm) ((tm)->block == 0.0) #endif /* TIMEOUT_H */ ================================================ FILE: src/libraries/luasocket/libluasocket/tp.lua ================================================ ----------------------------------------------------------------------------- -- Unified SMTP/FTP subsystem -- LuaSocket toolkit. -- Author: Diego Nehab ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- -- Declare module and import dependencies ----------------------------------------------------------------------------- local base = _G local string = require("string") local socket = require("socket") local ltn12 = require("ltn12") socket.tp = {} local _M = socket.tp ----------------------------------------------------------------------------- -- Program constants ----------------------------------------------------------------------------- _M.TIMEOUT = 60 ----------------------------------------------------------------------------- -- Implementation ----------------------------------------------------------------------------- -- gets server reply (works for SMTP and FTP) local function get_reply(c) local code, current, sep local line, err = c:receive() local reply = line if err then return nil, err end code, sep = socket.skip(2, string.find(line, "^(%d%d%d)(.?)")) if not code then return nil, "invalid server reply" end if sep == "-" then -- reply is multiline repeat line, err = c:receive() if err then return nil, err end current, sep = socket.skip(2, string.find(line, "^(%d%d%d)(.?)")) reply = reply .. "\n" .. line -- reply ends with same code until code == current and sep == " " end return code, reply end -- metatable for sock object local metat = { __index = {} } function metat.__index:getpeername() return self.c:getpeername() end function metat.__index:getsockname() return self.c:getpeername() end function metat.__index:check(ok) local code, reply = get_reply(self.c) if not code then return nil, reply end if base.type(ok) ~= "function" then if base.type(ok) == "table" then for i, v in base.ipairs(ok) do if string.find(code, v) then return base.tonumber(code), reply end end return nil, reply else if string.find(code, ok) then return base.tonumber(code), reply else return nil, reply end end else return ok(base.tonumber(code), reply) end end function metat.__index:command(cmd, arg) cmd = string.upper(cmd) if arg then return self.c:send(cmd .. " " .. arg.. "\r\n") else return self.c:send(cmd .. "\r\n") end end function metat.__index:sink(snk, pat) local chunk, err = self.c:receive(pat) return snk(chunk, err) end function metat.__index:send(data) return self.c:send(data) end function metat.__index:receive(pat) return self.c:receive(pat) end function metat.__index:getfd() return self.c:getfd() end function metat.__index:dirty() return self.c:dirty() end function metat.__index:getcontrol() return self.c end function metat.__index:source(source, step) local sink = socket.sink("keep-open", self.c) local ret, err = ltn12.pump.all(source, sink, step or ltn12.pump.step) return ret, err end -- closes the underlying c function metat.__index:close() self.c:close() return 1 end -- connect with server and return c object function _M.connect(host, port, timeout, create) local c, e = (create or socket.tcp)() if not c then return nil, e end c:settimeout(timeout or _M.TIMEOUT) local r, e = c:connect(host, port) if not r then c:close() return nil, e end return base.setmetatable({c = c}, metat) end return _M ================================================ FILE: src/libraries/luasocket/libluasocket/tp.lua.h ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ namespace love { // [tp.lua] const unsigned char tp_lua[] = { 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x2d, 0x2d, 0x20, 0x55, 0x6e, 0x69, 0x66, 0x69, 0x65, 0x64, 0x20, 0x53, 0x4d, 0x54, 0x50, 0x2f, 0x46, 0x54, 0x50, 0x20, 0x73, 0x75, 0x62, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x0a, 0x2d, 0x2d, 0x20, 0x4c, 0x75, 0x61, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x20, 0x74, 0x6f, 0x6f, 0x6c, 0x6b, 0x69, 0x74, 0x2e, 0x0a, 0x2d, 0x2d, 0x20, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x3a, 0x20, 0x44, 0x69, 0x65, 0x67, 0x6f, 0x20, 0x4e, 0x65, 0x68, 0x61, 0x62, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x2d, 0x2d, 0x20, 0x44, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x20, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x20, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x62, 0x61, 0x73, 0x65, 0x20, 0x3d, 0x20, 0x5f, 0x47, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x3d, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x28, 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0x29, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x20, 0x3d, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x28, 0x22, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x22, 0x29, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x6c, 0x74, 0x6e, 0x31, 0x32, 0x20, 0x3d, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x28, 0x22, 0x6c, 0x74, 0x6e, 0x31, 0x32, 0x22, 0x29, 0x0a, 0x0a, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x74, 0x70, 0x20, 0x3d, 0x20, 0x7b, 0x7d, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x5f, 0x4d, 0x20, 0x3d, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x74, 0x70, 0x0a, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x2d, 0x2d, 0x20, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x73, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x5f, 0x4d, 0x2e, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x20, 0x3d, 0x20, 0x36, 0x30, 0x0a, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x2d, 0x2d, 0x20, 0x49, 0x6d, 0x70, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x2d, 0x2d, 0x20, 0x67, 0x65, 0x74, 0x73, 0x20, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x72, 0x65, 0x70, 0x6c, 0x79, 0x20, 0x28, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x53, 0x4d, 0x54, 0x50, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x46, 0x54, 0x50, 0x29, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x67, 0x65, 0x74, 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x79, 0x28, 0x63, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x2c, 0x20, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x20, 0x73, 0x65, 0x70, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x6c, 0x69, 0x6e, 0x65, 0x2c, 0x20, 0x65, 0x72, 0x72, 0x20, 0x3d, 0x20, 0x63, 0x3a, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x72, 0x65, 0x70, 0x6c, 0x79, 0x20, 0x3d, 0x20, 0x6c, 0x69, 0x6e, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x65, 0x72, 0x72, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6e, 0x69, 0x6c, 0x2c, 0x20, 0x65, 0x72, 0x72, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x2c, 0x20, 0x73, 0x65, 0x70, 0x20, 0x3d, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x73, 0x6b, 0x69, 0x70, 0x28, 0x32, 0x2c, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x66, 0x69, 0x6e, 0x64, 0x28, 0x6c, 0x69, 0x6e, 0x65, 0x2c, 0x20, 0x22, 0x5e, 0x28, 0x25, 0x64, 0x25, 0x64, 0x25, 0x64, 0x29, 0x28, 0x2e, 0x3f, 0x29, 0x22, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6e, 0x69, 0x6c, 0x2c, 0x20, 0x22, 0x69, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x72, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x73, 0x65, 0x70, 0x20, 0x3d, 0x3d, 0x20, 0x22, 0x2d, 0x22, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x2d, 0x2d, 0x20, 0x72, 0x65, 0x70, 0x6c, 0x79, 0x20, 0x69, 0x73, 0x20, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x6c, 0x69, 0x6e, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x69, 0x6e, 0x65, 0x2c, 0x20, 0x65, 0x72, 0x72, 0x20, 0x3d, 0x20, 0x63, 0x3a, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x65, 0x72, 0x72, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6e, 0x69, 0x6c, 0x2c, 0x20, 0x65, 0x72, 0x72, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x20, 0x73, 0x65, 0x70, 0x20, 0x3d, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x73, 0x6b, 0x69, 0x70, 0x28, 0x32, 0x2c, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x66, 0x69, 0x6e, 0x64, 0x28, 0x6c, 0x69, 0x6e, 0x65, 0x2c, 0x20, 0x22, 0x5e, 0x28, 0x25, 0x64, 0x25, 0x64, 0x25, 0x64, 0x29, 0x28, 0x2e, 0x3f, 0x29, 0x22, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x70, 0x6c, 0x79, 0x20, 0x3d, 0x20, 0x72, 0x65, 0x70, 0x6c, 0x79, 0x20, 0x2e, 0x2e, 0x20, 0x22, 0x5c, 0x6e, 0x22, 0x20, 0x2e, 0x2e, 0x20, 0x6c, 0x69, 0x6e, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x72, 0x65, 0x70, 0x6c, 0x79, 0x20, 0x65, 0x6e, 0x64, 0x73, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x73, 0x61, 0x6d, 0x65, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x75, 0x6e, 0x74, 0x69, 0x6c, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x3d, 0x3d, 0x20, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x73, 0x65, 0x70, 0x20, 0x3d, 0x3d, 0x20, 0x22, 0x20, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x2c, 0x20, 0x72, 0x65, 0x70, 0x6c, 0x79, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x2d, 0x2d, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x74, 0x20, 0x3d, 0x20, 0x7b, 0x20, 0x5f, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x20, 0x3d, 0x20, 0x7b, 0x7d, 0x20, 0x7d, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x74, 0x2e, 0x5f, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x3a, 0x67, 0x65, 0x74, 0x70, 0x65, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x63, 0x3a, 0x67, 0x65, 0x74, 0x70, 0x65, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x28, 0x29, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x74, 0x2e, 0x5f, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x3a, 0x67, 0x65, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x63, 0x3a, 0x67, 0x65, 0x74, 0x70, 0x65, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x28, 0x29, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x74, 0x2e, 0x5f, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x3a, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x28, 0x6f, 0x6b, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x2c, 0x20, 0x72, 0x65, 0x70, 0x6c, 0x79, 0x20, 0x3d, 0x20, 0x67, 0x65, 0x74, 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x79, 0x28, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x63, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6e, 0x69, 0x6c, 0x2c, 0x20, 0x72, 0x65, 0x70, 0x6c, 0x79, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x28, 0x6f, 0x6b, 0x29, 0x20, 0x7e, 0x3d, 0x20, 0x22, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x28, 0x6f, 0x6b, 0x29, 0x20, 0x3d, 0x3d, 0x20, 0x22, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x22, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x69, 0x2c, 0x20, 0x76, 0x20, 0x69, 0x6e, 0x20, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x69, 0x70, 0x61, 0x69, 0x72, 0x73, 0x28, 0x6f, 0x6b, 0x29, 0x20, 0x64, 0x6f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x66, 0x69, 0x6e, 0x64, 0x28, 0x63, 0x6f, 0x64, 0x65, 0x2c, 0x20, 0x76, 0x29, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x74, 0x6f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x28, 0x63, 0x6f, 0x64, 0x65, 0x29, 0x2c, 0x20, 0x72, 0x65, 0x70, 0x6c, 0x79, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6e, 0x69, 0x6c, 0x2c, 0x20, 0x72, 0x65, 0x70, 0x6c, 0x79, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x66, 0x69, 0x6e, 0x64, 0x28, 0x63, 0x6f, 0x64, 0x65, 0x2c, 0x20, 0x6f, 0x6b, 0x29, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x74, 0x6f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x28, 0x63, 0x6f, 0x64, 0x65, 0x29, 0x2c, 0x20, 0x72, 0x65, 0x70, 0x6c, 0x79, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6e, 0x69, 0x6c, 0x2c, 0x20, 0x72, 0x65, 0x70, 0x6c, 0x79, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6f, 0x6b, 0x28, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x74, 0x6f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x28, 0x63, 0x6f, 0x64, 0x65, 0x29, 0x2c, 0x20, 0x72, 0x65, 0x70, 0x6c, 0x79, 0x29, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x74, 0x2e, 0x5f, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x3a, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x28, 0x63, 0x6d, 0x64, 0x2c, 0x20, 0x61, 0x72, 0x67, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x63, 0x6d, 0x64, 0x20, 0x3d, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x75, 0x70, 0x70, 0x65, 0x72, 0x28, 0x63, 0x6d, 0x64, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x61, 0x72, 0x67, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x63, 0x3a, 0x73, 0x65, 0x6e, 0x64, 0x28, 0x63, 0x6d, 0x64, 0x20, 0x2e, 0x2e, 0x20, 0x22, 0x20, 0x22, 0x20, 0x2e, 0x2e, 0x20, 0x61, 0x72, 0x67, 0x2e, 0x2e, 0x20, 0x22, 0x5c, 0x72, 0x5c, 0x6e, 0x22, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x63, 0x3a, 0x73, 0x65, 0x6e, 0x64, 0x28, 0x63, 0x6d, 0x64, 0x20, 0x2e, 0x2e, 0x20, 0x22, 0x5c, 0x72, 0x5c, 0x6e, 0x22, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x74, 0x2e, 0x5f, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x3a, 0x73, 0x69, 0x6e, 0x6b, 0x28, 0x73, 0x6e, 0x6b, 0x2c, 0x20, 0x70, 0x61, 0x74, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x2c, 0x20, 0x65, 0x72, 0x72, 0x20, 0x3d, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x63, 0x3a, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x28, 0x70, 0x61, 0x74, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x73, 0x6e, 0x6b, 0x28, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x2c, 0x20, 0x65, 0x72, 0x72, 0x29, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x74, 0x2e, 0x5f, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x3a, 0x73, 0x65, 0x6e, 0x64, 0x28, 0x64, 0x61, 0x74, 0x61, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x63, 0x3a, 0x73, 0x65, 0x6e, 0x64, 0x28, 0x64, 0x61, 0x74, 0x61, 0x29, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x74, 0x2e, 0x5f, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x3a, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x28, 0x70, 0x61, 0x74, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x63, 0x3a, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x28, 0x70, 0x61, 0x74, 0x29, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x74, 0x2e, 0x5f, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x3a, 0x67, 0x65, 0x74, 0x66, 0x64, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x63, 0x3a, 0x67, 0x65, 0x74, 0x66, 0x64, 0x28, 0x29, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x74, 0x2e, 0x5f, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x3a, 0x64, 0x69, 0x72, 0x74, 0x79, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x63, 0x3a, 0x64, 0x69, 0x72, 0x74, 0x79, 0x28, 0x29, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x74, 0x2e, 0x5f, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x3a, 0x67, 0x65, 0x74, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x63, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x74, 0x2e, 0x5f, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x3a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x28, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2c, 0x20, 0x73, 0x74, 0x65, 0x70, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x73, 0x69, 0x6e, 0x6b, 0x20, 0x3d, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x73, 0x69, 0x6e, 0x6b, 0x28, 0x22, 0x6b, 0x65, 0x65, 0x70, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x22, 0x2c, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x63, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x72, 0x65, 0x74, 0x2c, 0x20, 0x65, 0x72, 0x72, 0x20, 0x3d, 0x20, 0x6c, 0x74, 0x6e, 0x31, 0x32, 0x2e, 0x70, 0x75, 0x6d, 0x70, 0x2e, 0x61, 0x6c, 0x6c, 0x28, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2c, 0x20, 0x73, 0x69, 0x6e, 0x6b, 0x2c, 0x20, 0x73, 0x74, 0x65, 0x70, 0x20, 0x6f, 0x72, 0x20, 0x6c, 0x74, 0x6e, 0x31, 0x32, 0x2e, 0x70, 0x75, 0x6d, 0x70, 0x2e, 0x73, 0x74, 0x65, 0x70, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x72, 0x65, 0x74, 0x2c, 0x20, 0x65, 0x72, 0x72, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x2d, 0x2d, 0x20, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x6c, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x63, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x74, 0x2e, 0x5f, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x3a, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x63, 0x3a, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x31, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x2d, 0x2d, 0x20, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x63, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x5f, 0x4d, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x28, 0x68, 0x6f, 0x73, 0x74, 0x2c, 0x20, 0x70, 0x6f, 0x72, 0x74, 0x2c, 0x20, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x2c, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x63, 0x2c, 0x20, 0x65, 0x20, 0x3d, 0x20, 0x28, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x20, 0x6f, 0x72, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x74, 0x63, 0x70, 0x29, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x63, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6e, 0x69, 0x6c, 0x2c, 0x20, 0x65, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x63, 0x3a, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x28, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x20, 0x6f, 0x72, 0x20, 0x5f, 0x4d, 0x2e, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x72, 0x2c, 0x20, 0x65, 0x20, 0x3d, 0x20, 0x63, 0x3a, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x28, 0x68, 0x6f, 0x73, 0x74, 0x2c, 0x20, 0x70, 0x6f, 0x72, 0x74, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x72, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x63, 0x3a, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6e, 0x69, 0x6c, 0x2c, 0x20, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x65, 0x74, 0x6d, 0x65, 0x74, 0x61, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x28, 0x7b, 0x63, 0x20, 0x3d, 0x20, 0x63, 0x7d, 0x2c, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x74, 0x29, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x4d, 0x0a, }; // [tp.lua] } // love ================================================ FILE: src/libraries/luasocket/libluasocket/udp.c ================================================ /*=========================================================================*\ * UDP object * LuaSocket toolkit \*=========================================================================*/ #include "luasocket.h" #include "auxiliar.h" #include "socket.h" #include "inet.h" #include "options.h" #include "udp.h" #include #include /* min and max macros */ #ifndef MIN #define MIN(x, y) ((x) < (y) ? x : y) #endif #ifndef MAX #define MAX(x, y) ((x) > (y) ? x : y) #endif /*=========================================================================*\ * Internal function prototypes \*=========================================================================*/ static int global_create(lua_State *L); static int global_create4(lua_State *L); static int global_create6(lua_State *L); static int meth_send(lua_State *L); static int meth_sendto(lua_State *L); static int meth_receive(lua_State *L); static int meth_receivefrom(lua_State *L); static int meth_getfamily(lua_State *L); static int meth_getsockname(lua_State *L); static int meth_getpeername(lua_State *L); static int meth_gettimeout(lua_State *L); static int meth_setsockname(lua_State *L); static int meth_setpeername(lua_State *L); static int meth_close(lua_State *L); static int meth_setoption(lua_State *L); static int meth_getoption(lua_State *L); static int meth_settimeout(lua_State *L); static int meth_getfd(lua_State *L); static int meth_setfd(lua_State *L); static int meth_dirty(lua_State *L); /* udp object methods */ static luaL_Reg udp_methods[] = { {"__gc", meth_close}, {"__tostring", auxiliar_tostring}, {"close", meth_close}, {"dirty", meth_dirty}, {"getfamily", meth_getfamily}, {"getfd", meth_getfd}, {"getpeername", meth_getpeername}, {"getsockname", meth_getsockname}, {"receive", meth_receive}, {"receivefrom", meth_receivefrom}, {"send", meth_send}, {"sendto", meth_sendto}, {"setfd", meth_setfd}, {"setoption", meth_setoption}, {"getoption", meth_getoption}, {"setpeername", meth_setpeername}, {"setsockname", meth_setsockname}, {"settimeout", meth_settimeout}, {"gettimeout", meth_gettimeout}, {NULL, NULL} }; /* socket options for setoption */ static t_opt optset[] = { {"dontroute", opt_set_dontroute}, {"broadcast", opt_set_broadcast}, {"reuseaddr", opt_set_reuseaddr}, {"reuseport", opt_set_reuseport}, {"ip-multicast-if", opt_set_ip_multicast_if}, {"ip-multicast-ttl", opt_set_ip_multicast_ttl}, {"ip-multicast-loop", opt_set_ip_multicast_loop}, {"ip-add-membership", opt_set_ip_add_membership}, {"ip-drop-membership", opt_set_ip_drop_membersip}, {"ipv6-unicast-hops", opt_set_ip6_unicast_hops}, {"ipv6-multicast-hops", opt_set_ip6_unicast_hops}, {"ipv6-multicast-loop", opt_set_ip6_multicast_loop}, {"ipv6-add-membership", opt_set_ip6_add_membership}, {"ipv6-drop-membership", opt_set_ip6_drop_membersip}, {"ipv6-v6only", opt_set_ip6_v6only}, {"recv-buffer-size", opt_set_recv_buf_size}, {"send-buffer-size", opt_set_send_buf_size}, {NULL, NULL} }; /* socket options for getoption */ static t_opt optget[] = { {"dontroute", opt_get_dontroute}, {"broadcast", opt_get_broadcast}, {"reuseaddr", opt_get_reuseaddr}, {"reuseport", opt_get_reuseport}, {"ip-multicast-if", opt_get_ip_multicast_if}, {"ip-multicast-loop", opt_get_ip_multicast_loop}, {"error", opt_get_error}, {"ipv6-unicast-hops", opt_get_ip6_unicast_hops}, {"ipv6-multicast-hops", opt_get_ip6_unicast_hops}, {"ipv6-multicast-loop", opt_get_ip6_multicast_loop}, {"ipv6-v6only", opt_get_ip6_v6only}, {"recv-buffer-size", opt_get_recv_buf_size}, {"send-buffer-size", opt_get_send_buf_size}, {NULL, NULL} }; /* functions in library namespace */ static luaL_Reg func[] = { {"udp", global_create}, {"udp4", global_create4}, {"udp6", global_create6}, {NULL, NULL} }; /*-------------------------------------------------------------------------*\ * Initializes module \*-------------------------------------------------------------------------*/ int udp_open(lua_State *L) { /* create classes */ auxiliar_newclass(L, "udp{connected}", udp_methods); auxiliar_newclass(L, "udp{unconnected}", udp_methods); /* create class groups */ auxiliar_add2group(L, "udp{connected}", "udp{any}"); auxiliar_add2group(L, "udp{unconnected}", "udp{any}"); auxiliar_add2group(L, "udp{connected}", "select{able}"); auxiliar_add2group(L, "udp{unconnected}", "select{able}"); /* define library functions */ luaL_setfuncs(L, func, 0); /* export default UDP size */ lua_pushliteral(L, "_DATAGRAMSIZE"); lua_pushinteger(L, UDP_DATAGRAMSIZE); lua_rawset(L, -3); return 0; } /*=========================================================================*\ * Lua methods \*=========================================================================*/ static const char *udp_strerror(int err) { /* a 'closed' error on an unconnected means the target address was not * accepted by the transport layer */ if (err == IO_CLOSED) return "refused"; else return socket_strerror(err); } /*-------------------------------------------------------------------------*\ * Send data through connected udp socket \*-------------------------------------------------------------------------*/ static int meth_send(lua_State *L) { p_udp udp = (p_udp) auxiliar_checkclass(L, "udp{connected}", 1); p_timeout tm = &udp->tm; size_t count, sent = 0; int err; const char *data = luaL_checklstring(L, 2, &count); timeout_markstart(tm); err = socket_send(&udp->sock, data, count, &sent, tm); if (err != IO_DONE) { lua_pushnil(L); lua_pushstring(L, udp_strerror(err)); return 2; } lua_pushnumber(L, (lua_Number) sent); return 1; } /*-------------------------------------------------------------------------*\ * Send data through unconnected udp socket \*-------------------------------------------------------------------------*/ static int meth_sendto(lua_State *L) { p_udp udp = (p_udp) auxiliar_checkclass(L, "udp{unconnected}", 1); size_t count, sent = 0; const char *data = luaL_checklstring(L, 2, &count); const char *ip = luaL_checkstring(L, 3); const char *port = luaL_checkstring(L, 4); p_timeout tm = &udp->tm; int err; struct addrinfo aihint; struct addrinfo *ai; memset(&aihint, 0, sizeof(aihint)); aihint.ai_family = udp->family; aihint.ai_socktype = SOCK_DGRAM; aihint.ai_flags = AI_NUMERICHOST; #ifdef AI_NUMERICSERV aihint.ai_flags |= AI_NUMERICSERV; #endif err = getaddrinfo(ip, port, &aihint, &ai); if (err) { lua_pushnil(L); lua_pushstring(L, LUA_GAI_STRERROR(err)); return 2; } /* create socket if on first sendto if AF_UNSPEC was set */ if (udp->family == AF_UNSPEC && udp->sock == SOCKET_INVALID) { struct addrinfo *ap; const char *errstr = NULL; for (ap = ai; ap != NULL; ap = ap->ai_next) { errstr = inet_trycreate(&udp->sock, ap->ai_family, SOCK_DGRAM, 0); if (errstr == NULL) { socket_setnonblocking(&udp->sock); udp->family = ap->ai_family; break; } } if (errstr != NULL) { lua_pushnil(L); lua_pushstring(L, errstr); freeaddrinfo(ai); return 2; } } timeout_markstart(tm); err = socket_sendto(&udp->sock, data, count, &sent, ai->ai_addr, (socklen_t) ai->ai_addrlen, tm); freeaddrinfo(ai); if (err != IO_DONE) { lua_pushnil(L); lua_pushstring(L, udp_strerror(err)); return 2; } lua_pushnumber(L, (lua_Number) sent); return 1; } /*-------------------------------------------------------------------------*\ * Receives data from a UDP socket \*-------------------------------------------------------------------------*/ static int meth_receive(lua_State *L) { p_udp udp = (p_udp) auxiliar_checkgroup(L, "udp{any}", 1); char buf[UDP_DATAGRAMSIZE]; size_t got, wanted = (size_t) luaL_optnumber(L, 2, sizeof(buf)); char *dgram = wanted > sizeof(buf)? (char *) malloc(wanted): buf; int err; p_timeout tm = &udp->tm; timeout_markstart(tm); if (!dgram) { lua_pushnil(L); lua_pushliteral(L, "out of memory"); return 2; } err = socket_recv(&udp->sock, dgram, wanted, &got, tm); /* Unlike TCP, recv() of zero is not closed, but a zero-length packet. */ if (err != IO_DONE && err != IO_CLOSED) { lua_pushnil(L); lua_pushstring(L, udp_strerror(err)); if (wanted > sizeof(buf)) free(dgram); return 2; } lua_pushlstring(L, dgram, got); if (wanted > sizeof(buf)) free(dgram); return 1; } /*-------------------------------------------------------------------------*\ * Receives data and sender from a UDP socket \*-------------------------------------------------------------------------*/ static int meth_receivefrom(lua_State *L) { p_udp udp = (p_udp) auxiliar_checkclass(L, "udp{unconnected}", 1); char buf[UDP_DATAGRAMSIZE]; size_t got, wanted = (size_t) luaL_optnumber(L, 2, sizeof(buf)); char *dgram = wanted > sizeof(buf)? (char *) malloc(wanted): buf; struct sockaddr_storage addr; socklen_t addr_len = sizeof(addr); char addrstr[INET6_ADDRSTRLEN]; char portstr[6]; int err; p_timeout tm = &udp->tm; timeout_markstart(tm); if (!dgram) { lua_pushnil(L); lua_pushliteral(L, "out of memory"); return 2; } err = socket_recvfrom(&udp->sock, dgram, wanted, &got, (SA *) &addr, &addr_len, tm); /* Unlike TCP, recv() of zero is not closed, but a zero-length packet. */ if (err != IO_DONE && err != IO_CLOSED) { lua_pushnil(L); lua_pushstring(L, udp_strerror(err)); if (wanted > sizeof(buf)) free(dgram); return 2; } err = getnameinfo((struct sockaddr *)&addr, addr_len, addrstr, INET6_ADDRSTRLEN, portstr, 6, NI_NUMERICHOST | NI_NUMERICSERV); if (err) { lua_pushnil(L); lua_pushstring(L, LUA_GAI_STRERROR(err)); if (wanted > sizeof(buf)) free(dgram); return 2; } lua_pushlstring(L, dgram, got); lua_pushstring(L, addrstr); lua_pushinteger(L, (int) strtol(portstr, (char **) NULL, 10)); if (wanted > sizeof(buf)) free(dgram); return 3; } /*-------------------------------------------------------------------------*\ * Returns family as string \*-------------------------------------------------------------------------*/ static int meth_getfamily(lua_State *L) { p_udp udp = (p_udp) auxiliar_checkgroup(L, "udp{any}", 1); if (udp->family == AF_INET6) { lua_pushliteral(L, "inet6"); return 1; } else { lua_pushliteral(L, "inet4"); return 1; } } /*-------------------------------------------------------------------------*\ * Select support methods \*-------------------------------------------------------------------------*/ static int meth_getfd(lua_State *L) { p_udp udp = (p_udp) auxiliar_checkgroup(L, "udp{any}", 1); lua_pushnumber(L, (int) udp->sock); return 1; } /* this is very dangerous, but can be handy for those that are brave enough */ static int meth_setfd(lua_State *L) { p_udp udp = (p_udp) auxiliar_checkgroup(L, "udp{any}", 1); udp->sock = (t_socket) luaL_checknumber(L, 2); return 0; } static int meth_dirty(lua_State *L) { p_udp udp = (p_udp) auxiliar_checkgroup(L, "udp{any}", 1); (void) udp; lua_pushboolean(L, 0); return 1; } /*-------------------------------------------------------------------------*\ * Just call inet methods \*-------------------------------------------------------------------------*/ static int meth_getpeername(lua_State *L) { p_udp udp = (p_udp) auxiliar_checkclass(L, "udp{connected}", 1); return inet_meth_getpeername(L, &udp->sock, udp->family); } static int meth_getsockname(lua_State *L) { p_udp udp = (p_udp) auxiliar_checkgroup(L, "udp{any}", 1); return inet_meth_getsockname(L, &udp->sock, udp->family); } /*-------------------------------------------------------------------------*\ * Just call option handler \*-------------------------------------------------------------------------*/ static int meth_setoption(lua_State *L) { p_udp udp = (p_udp) auxiliar_checkgroup(L, "udp{any}", 1); return opt_meth_setoption(L, optset, &udp->sock); } /*-------------------------------------------------------------------------*\ * Just call option handler \*-------------------------------------------------------------------------*/ static int meth_getoption(lua_State *L) { p_udp udp = (p_udp) auxiliar_checkgroup(L, "udp{any}", 1); return opt_meth_getoption(L, optget, &udp->sock); } /*-------------------------------------------------------------------------*\ * Just call tm methods \*-------------------------------------------------------------------------*/ static int meth_settimeout(lua_State *L) { p_udp udp = (p_udp) auxiliar_checkgroup(L, "udp{any}", 1); return timeout_meth_settimeout(L, &udp->tm); } static int meth_gettimeout(lua_State *L) { p_udp udp = (p_udp) auxiliar_checkgroup(L, "udp{any}", 1); return timeout_meth_gettimeout(L, &udp->tm); } /*-------------------------------------------------------------------------*\ * Turns a master udp object into a client object. \*-------------------------------------------------------------------------*/ static int meth_setpeername(lua_State *L) { p_udp udp = (p_udp) auxiliar_checkgroup(L, "udp{any}", 1); p_timeout tm = &udp->tm; const char *address = luaL_checkstring(L, 2); int connecting = strcmp(address, "*"); const char *port = connecting? luaL_checkstring(L, 3): "0"; struct addrinfo connecthints; const char *err; memset(&connecthints, 0, sizeof(connecthints)); connecthints.ai_socktype = SOCK_DGRAM; /* make sure we try to connect only to the same family */ connecthints.ai_family = udp->family; if (connecting) { err = inet_tryconnect(&udp->sock, &udp->family, address, port, tm, &connecthints); if (err) { lua_pushnil(L); lua_pushstring(L, err); return 2; } auxiliar_setclass(L, "udp{connected}", 1); } else { /* we ignore possible errors because Mac OS X always * returns EAFNOSUPPORT */ inet_trydisconnect(&udp->sock, udp->family, tm); auxiliar_setclass(L, "udp{unconnected}", 1); } lua_pushnumber(L, 1); return 1; } /*-------------------------------------------------------------------------*\ * Closes socket used by object \*-------------------------------------------------------------------------*/ static int meth_close(lua_State *L) { p_udp udp = (p_udp) auxiliar_checkgroup(L, "udp{any}", 1); socket_destroy(&udp->sock); lua_pushnumber(L, 1); return 1; } /*-------------------------------------------------------------------------*\ * Turns a master object into a server object \*-------------------------------------------------------------------------*/ static int meth_setsockname(lua_State *L) { p_udp udp = (p_udp) auxiliar_checkclass(L, "udp{unconnected}", 1); const char *address = luaL_checkstring(L, 2); const char *port = luaL_checkstring(L, 3); const char *err; struct addrinfo bindhints; memset(&bindhints, 0, sizeof(bindhints)); bindhints.ai_socktype = SOCK_DGRAM; bindhints.ai_family = udp->family; bindhints.ai_flags = AI_PASSIVE; err = inet_trybind(&udp->sock, &udp->family, address, port, &bindhints); if (err) { lua_pushnil(L); lua_pushstring(L, err); return 2; } lua_pushnumber(L, 1); return 1; } /*=========================================================================*\ * Library functions \*=========================================================================*/ /*-------------------------------------------------------------------------*\ * Creates a master udp object \*-------------------------------------------------------------------------*/ static int udp_create(lua_State *L, int family) { /* allocate udp object */ p_udp udp = (p_udp) lua_newuserdata(L, sizeof(t_udp)); auxiliar_setclass(L, "udp{unconnected}", -1); /* if family is AF_UNSPEC, we leave the socket invalid and * store AF_UNSPEC into family. This will allow it to later be * replaced with an AF_INET6 or AF_INET socket upon first use. */ udp->sock = SOCKET_INVALID; timeout_init(&udp->tm, -1, -1); udp->family = family; if (family != AF_UNSPEC) { const char *err = inet_trycreate(&udp->sock, family, SOCK_DGRAM, 0); if (err != NULL) { lua_pushnil(L); lua_pushstring(L, err); return 2; } socket_setnonblocking(&udp->sock); } return 1; } static int global_create(lua_State *L) { return udp_create(L, AF_UNSPEC); } static int global_create4(lua_State *L) { return udp_create(L, AF_INET); } static int global_create6(lua_State *L) { return udp_create(L, AF_INET6); } ================================================ FILE: src/libraries/luasocket/libluasocket/udp.h ================================================ #ifndef UDP_H #define UDP_H /*=========================================================================*\ * UDP object * LuaSocket toolkit * * The udp.h module provides LuaSocket with support for UDP protocol * (AF_INET, SOCK_DGRAM). * * Two classes are defined: connected and unconnected. UDP objects are * originally unconnected. They can be "connected" to a given address * with a call to the setpeername function. The same function can be used to * break the connection. \*=========================================================================*/ #include "luasocket.h" #include "timeout.h" #include "socket.h" #define UDP_DATAGRAMSIZE 8192 typedef struct t_udp_ { t_socket sock; t_timeout tm; int family; } t_udp; typedef t_udp *p_udp; #ifndef _WIN32 #pragma GCC visibility push(hidden) #endif int udp_open(lua_State *L); #ifndef _WIN32 #pragma GCC visibility pop #endif #endif /* UDP_H */ ================================================ FILE: src/libraries/luasocket/libluasocket/unix.c ================================================ /*=========================================================================*\ * Unix domain socket * LuaSocket toolkit \*=========================================================================*/ #include "luasocket.h" #include "unixstream.h" #include "unixdgram.h" /*-------------------------------------------------------------------------*\ * Modules and functions \*-------------------------------------------------------------------------*/ static const luaL_Reg mod[] = { {"stream", unixstream_open}, {"dgram", unixdgram_open}, {NULL, NULL} }; static void add_alias(lua_State *L, int index, const char *name, const char *target) { lua_getfield(L, index, target); lua_setfield(L, index, name); } static int compat_socket_unix_call(lua_State *L) { /* Look up socket.unix.stream in the socket.unix table (which is the first * argument). */ lua_getfield(L, 1, "stream"); /* Replace the stack entry for the socket.unix table with the * socket.unix.stream function. */ lua_replace(L, 1); /* Call socket.unix.stream, passing along any arguments. */ int n = lua_gettop(L); lua_call(L, n-1, LUA_MULTRET); /* Pass along the return values from socket.unix.stream. */ n = lua_gettop(L); return n; } /*-------------------------------------------------------------------------*\ * Initializes module \*-------------------------------------------------------------------------*/ LUASOCKET_API int luaopen_socket_unix(lua_State *L) { int i; lua_newtable(L); int socket_unix_table = lua_gettop(L); for (i = 0; mod[i].name; i++) mod[i].func(L); /* Add backwards compatibility aliases "tcp" and "udp" for the "stream" and * "dgram" functions. */ add_alias(L, socket_unix_table, "tcp", "stream"); add_alias(L, socket_unix_table, "udp", "dgram"); /* Add a backwards compatibility function and a metatable setup to call it * for the old socket.unix() interface. */ lua_pushcfunction(L, compat_socket_unix_call); lua_setfield(L, socket_unix_table, "__call"); lua_pushvalue(L, socket_unix_table); lua_setmetatable(L, socket_unix_table); return 1; } ================================================ FILE: src/libraries/luasocket/libluasocket/unix.h ================================================ #ifndef UNIX_H #define UNIX_H /*=========================================================================*\ * Unix domain object * LuaSocket toolkit * * This module is just an example of how to extend LuaSocket with a new * domain. \*=========================================================================*/ #include "luasocket.h" #include "buffer.h" #include "timeout.h" #include "socket.h" typedef struct t_unix_ { t_socket sock; t_io io; t_buffer buf; t_timeout tm; } t_unix; typedef t_unix *p_unix; LUASOCKET_API int luaopen_socket_unix(lua_State *L); #endif /* UNIX_H */ ================================================ FILE: src/libraries/luasocket/libluasocket/unixdgram.c ================================================ /*=========================================================================*\ * Unix domain socket dgram submodule * LuaSocket toolkit \*=========================================================================*/ #include "luasocket.h" #include "auxiliar.h" #include "socket.h" #include "options.h" #include "unix.h" #include #include #ifdef _WIN32 #include #else #include #endif #define UNIXDGRAM_DATAGRAMSIZE 8192 /* provide a SUN_LEN macro if sys/un.h doesn't (e.g. Android) */ #ifndef SUN_LEN #define SUN_LEN(ptr) \ ((size_t) (((struct sockaddr_un *) 0)->sun_path) \ + strlen ((ptr)->sun_path)) #endif /*=========================================================================*\ * Internal function prototypes \*=========================================================================*/ static int global_create(lua_State *L); static int meth_connect(lua_State *L); static int meth_bind(lua_State *L); static int meth_send(lua_State *L); static int meth_receive(lua_State *L); static int meth_close(lua_State *L); static int meth_setoption(lua_State *L); static int meth_settimeout(lua_State *L); static int meth_gettimeout(lua_State *L); static int meth_getfd(lua_State *L); static int meth_setfd(lua_State *L); static int meth_dirty(lua_State *L); static int meth_receivefrom(lua_State *L); static int meth_sendto(lua_State *L); static int meth_getsockname(lua_State *L); static const char *unixdgram_tryconnect(p_unix un, const char *path); static const char *unixdgram_trybind(p_unix un, const char *path); /* unixdgram object methods */ static luaL_Reg unixdgram_methods[] = { {"__gc", meth_close}, {"__tostring", auxiliar_tostring}, {"bind", meth_bind}, {"close", meth_close}, {"connect", meth_connect}, {"dirty", meth_dirty}, {"getfd", meth_getfd}, {"send", meth_send}, {"sendto", meth_sendto}, {"receive", meth_receive}, {"receivefrom", meth_receivefrom}, {"setfd", meth_setfd}, {"setoption", meth_setoption}, {"setpeername", meth_connect}, {"setsockname", meth_bind}, {"getsockname", meth_getsockname}, {"settimeout", meth_settimeout}, {"gettimeout", meth_gettimeout}, {NULL, NULL} }; /* socket option handlers */ static t_opt optset[] = { {"reuseaddr", opt_set_reuseaddr}, {NULL, NULL} }; /* functions in library namespace */ static luaL_Reg func[] = { {"dgram", global_create}, {NULL, NULL} }; /*-------------------------------------------------------------------------*\ * Initializes module \*-------------------------------------------------------------------------*/ int unixdgram_open(lua_State *L) { /* create classes */ auxiliar_newclass(L, "unixdgram{connected}", unixdgram_methods); auxiliar_newclass(L, "unixdgram{unconnected}", unixdgram_methods); /* create class groups */ auxiliar_add2group(L, "unixdgram{connected}", "unixdgram{any}"); auxiliar_add2group(L, "unixdgram{unconnected}", "unixdgram{any}"); auxiliar_add2group(L, "unixdgram{connected}", "select{able}"); auxiliar_add2group(L, "unixdgram{unconnected}", "select{able}"); luaL_setfuncs(L, func, 0); return 0; } /*=========================================================================*\ * Lua methods \*=========================================================================*/ static const char *unixdgram_strerror(int err) { /* a 'closed' error on an unconnected means the target address was not * accepted by the transport layer */ if (err == IO_CLOSED) return "refused"; else return socket_strerror(err); } static int meth_send(lua_State *L) { p_unix un = (p_unix) auxiliar_checkclass(L, "unixdgram{connected}", 1); p_timeout tm = &un->tm; size_t count, sent = 0; int err; const char *data = luaL_checklstring(L, 2, &count); timeout_markstart(tm); err = socket_send(&un->sock, data, count, &sent, tm); if (err != IO_DONE) { lua_pushnil(L); lua_pushstring(L, unixdgram_strerror(err)); return 2; } lua_pushnumber(L, (lua_Number) sent); return 1; } /*-------------------------------------------------------------------------*\ * Send data through unconnected unixdgram socket \*-------------------------------------------------------------------------*/ static int meth_sendto(lua_State *L) { p_unix un = (p_unix) auxiliar_checkclass(L, "unixdgram{unconnected}", 1); size_t count, sent = 0; const char *data = luaL_checklstring(L, 2, &count); const char *path = luaL_checkstring(L, 3); p_timeout tm = &un->tm; int err; struct sockaddr_un remote; size_t len = strlen(path); if (len >= sizeof(remote.sun_path)) { lua_pushnil(L); lua_pushstring(L, "path too long"); return 2; } memset(&remote, 0, sizeof(remote)); strcpy(remote.sun_path, path); remote.sun_family = AF_UNIX; timeout_markstart(tm); #ifdef UNIX_HAS_SUN_LEN remote.sun_len = sizeof(remote.sun_family) + sizeof(remote.sun_len) + len + 1; err = socket_sendto(&un->sock, data, count, &sent, (SA *) &remote, remote.sun_len, tm); #else err = socket_sendto(&un->sock, data, count, &sent, (SA *) &remote, sizeof(remote.sun_family) + len, tm); #endif if (err != IO_DONE) { lua_pushnil(L); lua_pushstring(L, unixdgram_strerror(err)); return 2; } lua_pushnumber(L, (lua_Number) sent); return 1; } static int meth_receive(lua_State *L) { p_unix un = (p_unix) auxiliar_checkgroup(L, "unixdgram{any}", 1); char buf[UNIXDGRAM_DATAGRAMSIZE]; size_t got, wanted = (size_t) luaL_optnumber(L, 2, sizeof(buf)); char *dgram = wanted > sizeof(buf)? (char *) malloc(wanted): buf; int err; p_timeout tm = &un->tm; timeout_markstart(tm); if (!dgram) { lua_pushnil(L); lua_pushliteral(L, "out of memory"); return 2; } err = socket_recv(&un->sock, dgram, wanted, &got, tm); /* Unlike STREAM, recv() of zero is not closed, but a zero-length packet. */ if (err != IO_DONE && err != IO_CLOSED) { lua_pushnil(L); lua_pushstring(L, unixdgram_strerror(err)); if (wanted > sizeof(buf)) free(dgram); return 2; } lua_pushlstring(L, dgram, got); if (wanted > sizeof(buf)) free(dgram); return 1; } /*-------------------------------------------------------------------------*\ * Receives data and sender from a DGRAM socket \*-------------------------------------------------------------------------*/ static int meth_receivefrom(lua_State *L) { p_unix un = (p_unix) auxiliar_checkclass(L, "unixdgram{unconnected}", 1); char buf[UNIXDGRAM_DATAGRAMSIZE]; size_t got, wanted = (size_t) luaL_optnumber(L, 2, sizeof(buf)); char *dgram = wanted > sizeof(buf)? (char *) malloc(wanted): buf; struct sockaddr_un addr; socklen_t addr_len = sizeof(addr); int err; p_timeout tm = &un->tm; timeout_markstart(tm); if (!dgram) { lua_pushnil(L); lua_pushliteral(L, "out of memory"); return 2; } addr.sun_path[0] = '\0'; err = socket_recvfrom(&un->sock, dgram, wanted, &got, (SA *) &addr, &addr_len, tm); /* Unlike STREAM, recv() of zero is not closed, but a zero-length packet. */ if (err != IO_DONE && err != IO_CLOSED) { lua_pushnil(L); lua_pushstring(L, unixdgram_strerror(err)); if (wanted > sizeof(buf)) free(dgram); return 2; } lua_pushlstring(L, dgram, got); /* the path may be empty, when client send without bind */ lua_pushstring(L, addr.sun_path); if (wanted > sizeof(buf)) free(dgram); return 2; } /*-------------------------------------------------------------------------*\ * Just call option handler \*-------------------------------------------------------------------------*/ static int meth_setoption(lua_State *L) { p_unix un = (p_unix) auxiliar_checkgroup(L, "unixdgram{any}", 1); return opt_meth_setoption(L, optset, &un->sock); } /*-------------------------------------------------------------------------*\ * Select support methods \*-------------------------------------------------------------------------*/ static int meth_getfd(lua_State *L) { p_unix un = (p_unix) auxiliar_checkgroup(L, "unixdgram{any}", 1); lua_pushnumber(L, (int) un->sock); return 1; } /* this is very dangerous, but can be handy for those that are brave enough */ static int meth_setfd(lua_State *L) { p_unix un = (p_unix) auxiliar_checkgroup(L, "unixdgram{any}", 1); un->sock = (t_socket) luaL_checknumber(L, 2); return 0; } static int meth_dirty(lua_State *L) { p_unix un = (p_unix) auxiliar_checkgroup(L, "unixdgram{any}", 1); (void) un; lua_pushboolean(L, 0); return 1; } /*-------------------------------------------------------------------------*\ * Binds an object to an address \*-------------------------------------------------------------------------*/ static const char *unixdgram_trybind(p_unix un, const char *path) { struct sockaddr_un local; size_t len = strlen(path); if (len >= sizeof(local.sun_path)) return "path too long"; memset(&local, 0, sizeof(local)); strcpy(local.sun_path, path); local.sun_family = AF_UNIX; size_t addrlen = SUN_LEN(&local); #ifdef UNIX_HAS_SUN_LEN local.sun_len = addrlen + 1; #endif int err = socket_bind(&un->sock, (SA *) &local, addrlen); if (err != IO_DONE) socket_destroy(&un->sock); return socket_strerror(err); } static int meth_bind(lua_State *L) { p_unix un = (p_unix) auxiliar_checkclass(L, "unixdgram{unconnected}", 1); const char *path = luaL_checkstring(L, 2); const char *err = unixdgram_trybind(un, path); if (err) { lua_pushnil(L); lua_pushstring(L, err); return 2; } lua_pushnumber(L, 1); return 1; } static int meth_getsockname(lua_State *L) { p_unix un = (p_unix) auxiliar_checkgroup(L, "unixdgram{any}", 1); struct sockaddr_un peer = {0}; socklen_t peer_len = sizeof(peer); if (getsockname(un->sock, (SA *) &peer, &peer_len) < 0) { lua_pushnil(L); lua_pushstring(L, socket_strerror(errno)); return 2; } lua_pushstring(L, peer.sun_path); return 1; } /*-------------------------------------------------------------------------*\ * Turns a master unixdgram object into a client object. \*-------------------------------------------------------------------------*/ static const char *unixdgram_tryconnect(p_unix un, const char *path) { struct sockaddr_un remote; size_t len = strlen(path); if (len >= sizeof(remote.sun_path)) return "path too long"; memset(&remote, 0, sizeof(remote)); strcpy(remote.sun_path, path); remote.sun_family = AF_UNIX; timeout_markstart(&un->tm); size_t addrlen = SUN_LEN(&remote); #ifdef UNIX_HAS_SUN_LEN remote.sun_len = addrlen + 1; #endif int err = socket_connect(&un->sock, (SA *) &remote, addrlen, &un->tm); if (err != IO_DONE) socket_destroy(&un->sock); return socket_strerror(err); } static int meth_connect(lua_State *L) { p_unix un = (p_unix) auxiliar_checkgroup(L, "unixdgram{any}", 1); const char *path = luaL_checkstring(L, 2); const char *err = unixdgram_tryconnect(un, path); if (err) { lua_pushnil(L); lua_pushstring(L, err); return 2; } /* turn unconnected object into a connected object */ auxiliar_setclass(L, "unixdgram{connected}", 1); lua_pushnumber(L, 1); return 1; } /*-------------------------------------------------------------------------*\ * Closes socket used by object \*-------------------------------------------------------------------------*/ static int meth_close(lua_State *L) { p_unix un = (p_unix) auxiliar_checkgroup(L, "unixdgram{any}", 1); socket_destroy(&un->sock); lua_pushnumber(L, 1); return 1; } /*-------------------------------------------------------------------------*\ * Just call tm methods \*-------------------------------------------------------------------------*/ static int meth_settimeout(lua_State *L) { p_unix un = (p_unix) auxiliar_checkgroup(L, "unixdgram{any}", 1); return timeout_meth_settimeout(L, &un->tm); } static int meth_gettimeout(lua_State *L) { p_unix un = (p_unix) auxiliar_checkgroup(L, "unixdgram{any}", 1); return timeout_meth_gettimeout(L, &un->tm); } /*=========================================================================*\ * Library functions \*=========================================================================*/ /*-------------------------------------------------------------------------*\ * Creates a master unixdgram object \*-------------------------------------------------------------------------*/ static int global_create(lua_State *L) { t_socket sock; int err = socket_create(&sock, AF_UNIX, SOCK_DGRAM, 0); /* try to allocate a system socket */ if (err == IO_DONE) { /* allocate unixdgram object */ p_unix un = (p_unix) lua_newuserdata(L, sizeof(t_unix)); /* set its type as master object */ auxiliar_setclass(L, "unixdgram{unconnected}", -1); /* initialize remaining structure fields */ socket_setnonblocking(&sock); un->sock = sock; io_init(&un->io, (p_send) socket_send, (p_recv) socket_recv, (p_error) socket_ioerror, &un->sock); timeout_init(&un->tm, -1, -1); buffer_init(&un->buf, &un->io, &un->tm); return 1; } else { lua_pushnil(L); lua_pushstring(L, socket_strerror(err)); return 2; } } ================================================ FILE: src/libraries/luasocket/libluasocket/unixdgram.h ================================================ #ifndef UNIXDGRAM_H #define UNIXDGRAM_H /*=========================================================================*\ * DGRAM object * LuaSocket toolkit * * The dgram.h module provides LuaSocket with support for DGRAM protocol * (AF_INET, SOCK_DGRAM). * * Two classes are defined: connected and unconnected. DGRAM objects are * originally unconnected. They can be "connected" to a given address * with a call to the setpeername function. The same function can be used to * break the connection. \*=========================================================================*/ #include "unix.h" #ifndef _WIN32 #pragma GCC visibility push(hidden) #endif int unixdgram_open(lua_State *L); #ifndef _WIN32 #pragma GCC visibility pop #endif #endif /* UNIXDGRAM_H */ ================================================ FILE: src/libraries/luasocket/libluasocket/unixstream.c ================================================ /*=========================================================================*\ * Unix domain socket stream sub module * LuaSocket toolkit \*=========================================================================*/ #include "luasocket.h" #include "auxiliar.h" #include "socket.h" #include "options.h" #include "unixstream.h" #include #ifdef _WIN32 #include #else #include #endif /*=========================================================================*\ * Internal function prototypes \*=========================================================================*/ static int global_create(lua_State *L); static int meth_connect(lua_State *L); static int meth_listen(lua_State *L); static int meth_bind(lua_State *L); static int meth_send(lua_State *L); static int meth_shutdown(lua_State *L); static int meth_receive(lua_State *L); static int meth_accept(lua_State *L); static int meth_close(lua_State *L); static int meth_setoption(lua_State *L); static int meth_settimeout(lua_State *L); static int meth_getfd(lua_State *L); static int meth_setfd(lua_State *L); static int meth_dirty(lua_State *L); static int meth_getstats(lua_State *L); static int meth_setstats(lua_State *L); static int meth_getsockname(lua_State *L); static const char *unixstream_tryconnect(p_unix un, const char *path); static const char *unixstream_trybind(p_unix un, const char *path); /* unixstream object methods */ static luaL_Reg unixstream_methods[] = { {"__gc", meth_close}, {"__tostring", auxiliar_tostring}, {"accept", meth_accept}, {"bind", meth_bind}, {"close", meth_close}, {"connect", meth_connect}, {"dirty", meth_dirty}, {"getfd", meth_getfd}, {"getstats", meth_getstats}, {"setstats", meth_setstats}, {"listen", meth_listen}, {"receive", meth_receive}, {"send", meth_send}, {"setfd", meth_setfd}, {"setoption", meth_setoption}, {"setpeername", meth_connect}, {"setsockname", meth_bind}, {"getsockname", meth_getsockname}, {"settimeout", meth_settimeout}, {"shutdown", meth_shutdown}, {NULL, NULL} }; /* socket option handlers */ static t_opt optset[] = { {"keepalive", opt_set_keepalive}, {"reuseaddr", opt_set_reuseaddr}, {"linger", opt_set_linger}, {NULL, NULL} }; /* functions in library namespace */ static luaL_Reg func[] = { {"stream", global_create}, {NULL, NULL} }; /*-------------------------------------------------------------------------*\ * Initializes module \*-------------------------------------------------------------------------*/ int unixstream_open(lua_State *L) { /* create classes */ auxiliar_newclass(L, "unixstream{master}", unixstream_methods); auxiliar_newclass(L, "unixstream{client}", unixstream_methods); auxiliar_newclass(L, "unixstream{server}", unixstream_methods); /* create class groups */ auxiliar_add2group(L, "unixstream{master}", "unixstream{any}"); auxiliar_add2group(L, "unixstream{client}", "unixstream{any}"); auxiliar_add2group(L, "unixstream{server}", "unixstream{any}"); luaL_setfuncs(L, func, 0); return 0; } /*=========================================================================*\ * Lua methods \*=========================================================================*/ /*-------------------------------------------------------------------------*\ * Just call buffered IO methods \*-------------------------------------------------------------------------*/ static int meth_send(lua_State *L) { p_unix un = (p_unix) auxiliar_checkclass(L, "unixstream{client}", 1); return buffer_meth_send(L, &un->buf); } static int meth_receive(lua_State *L) { p_unix un = (p_unix) auxiliar_checkclass(L, "unixstream{client}", 1); return buffer_meth_receive(L, &un->buf); } static int meth_getstats(lua_State *L) { p_unix un = (p_unix) auxiliar_checkclass(L, "unixstream{client}", 1); return buffer_meth_getstats(L, &un->buf); } static int meth_setstats(lua_State *L) { p_unix un = (p_unix) auxiliar_checkclass(L, "unixstream{client}", 1); return buffer_meth_setstats(L, &un->buf); } /*-------------------------------------------------------------------------*\ * Just call option handler \*-------------------------------------------------------------------------*/ static int meth_setoption(lua_State *L) { p_unix un = (p_unix) auxiliar_checkgroup(L, "unixstream{any}", 1); return opt_meth_setoption(L, optset, &un->sock); } /*-------------------------------------------------------------------------*\ * Select support methods \*-------------------------------------------------------------------------*/ static int meth_getfd(lua_State *L) { p_unix un = (p_unix) auxiliar_checkgroup(L, "unixstream{any}", 1); lua_pushnumber(L, (int) un->sock); return 1; } /* this is very dangerous, but can be handy for those that are brave enough */ static int meth_setfd(lua_State *L) { p_unix un = (p_unix) auxiliar_checkgroup(L, "unixstream{any}", 1); un->sock = (t_socket) luaL_checknumber(L, 2); return 0; } static int meth_dirty(lua_State *L) { p_unix un = (p_unix) auxiliar_checkgroup(L, "unixstream{any}", 1); lua_pushboolean(L, !buffer_isempty(&un->buf)); return 1; } /*-------------------------------------------------------------------------*\ * Waits for and returns a client object attempting connection to the * server object \*-------------------------------------------------------------------------*/ static int meth_accept(lua_State *L) { p_unix server = (p_unix) auxiliar_checkclass(L, "unixstream{server}", 1); p_timeout tm = timeout_markstart(&server->tm); t_socket sock; int err = socket_accept(&server->sock, &sock, NULL, NULL, tm); /* if successful, push client socket */ if (err == IO_DONE) { p_unix clnt = (p_unix) lua_newuserdata(L, sizeof(t_unix)); auxiliar_setclass(L, "unixstream{client}", -1); /* initialize structure fields */ socket_setnonblocking(&sock); clnt->sock = sock; io_init(&clnt->io, (p_send)socket_send, (p_recv)socket_recv, (p_error) socket_ioerror, &clnt->sock); timeout_init(&clnt->tm, -1, -1); buffer_init(&clnt->buf, &clnt->io, &clnt->tm); return 1; } else { lua_pushnil(L); lua_pushstring(L, socket_strerror(err)); return 2; } } /*-------------------------------------------------------------------------*\ * Binds an object to an address \*-------------------------------------------------------------------------*/ static const char *unixstream_trybind(p_unix un, const char *path) { struct sockaddr_un local; size_t len = strlen(path); int err; if (len >= sizeof(local.sun_path)) return "path too long"; memset(&local, 0, sizeof(local)); strcpy(local.sun_path, path); local.sun_family = AF_UNIX; #ifdef UNIX_HAS_SUN_LEN local.sun_len = sizeof(local.sun_family) + sizeof(local.sun_len) + len + 1; err = socket_bind(&un->sock, (SA *) &local, local.sun_len); #else err = socket_bind(&un->sock, (SA *) &local, sizeof(local.sun_family) + len); #endif if (err != IO_DONE) socket_destroy(&un->sock); return socket_strerror(err); } static int meth_bind(lua_State *L) { p_unix un = (p_unix) auxiliar_checkclass(L, "unixstream{master}", 1); const char *path = luaL_checkstring(L, 2); const char *err = unixstream_trybind(un, path); if (err) { lua_pushnil(L); lua_pushstring(L, err); return 2; } lua_pushnumber(L, 1); return 1; } static int meth_getsockname(lua_State *L) { p_unix un = (p_unix) auxiliar_checkgroup(L, "unixstream{any}", 1); struct sockaddr_un peer = {0}; socklen_t peer_len = sizeof(peer); if (getsockname(un->sock, (SA *) &peer, &peer_len) < 0) { lua_pushnil(L); lua_pushstring(L, socket_strerror(errno)); return 2; } lua_pushstring(L, peer.sun_path); return 1; } /*-------------------------------------------------------------------------*\ * Turns a master unixstream object into a client object. \*-------------------------------------------------------------------------*/ static const char *unixstream_tryconnect(p_unix un, const char *path) { struct sockaddr_un remote; int err; size_t len = strlen(path); if (len >= sizeof(remote.sun_path)) return "path too long"; memset(&remote, 0, sizeof(remote)); strcpy(remote.sun_path, path); remote.sun_family = AF_UNIX; timeout_markstart(&un->tm); #ifdef UNIX_HAS_SUN_LEN remote.sun_len = sizeof(remote.sun_family) + sizeof(remote.sun_len) + len + 1; err = socket_connect(&un->sock, (SA *) &remote, remote.sun_len, &un->tm); #else err = socket_connect(&un->sock, (SA *) &remote, sizeof(remote.sun_family) + len, &un->tm); #endif if (err != IO_DONE) socket_destroy(&un->sock); return socket_strerror(err); } static int meth_connect(lua_State *L) { p_unix un = (p_unix) auxiliar_checkclass(L, "unixstream{master}", 1); const char *path = luaL_checkstring(L, 2); const char *err = unixstream_tryconnect(un, path); if (err) { lua_pushnil(L); lua_pushstring(L, err); return 2; } /* turn master object into a client object */ auxiliar_setclass(L, "unixstream{client}", 1); lua_pushnumber(L, 1); return 1; } /*-------------------------------------------------------------------------*\ * Closes socket used by object \*-------------------------------------------------------------------------*/ static int meth_close(lua_State *L) { p_unix un = (p_unix) auxiliar_checkgroup(L, "unixstream{any}", 1); socket_destroy(&un->sock); lua_pushnumber(L, 1); return 1; } /*-------------------------------------------------------------------------*\ * Puts the sockt in listen mode \*-------------------------------------------------------------------------*/ static int meth_listen(lua_State *L) { p_unix un = (p_unix) auxiliar_checkclass(L, "unixstream{master}", 1); int backlog = (int) luaL_optnumber(L, 2, 32); int err = socket_listen(&un->sock, backlog); if (err != IO_DONE) { lua_pushnil(L); lua_pushstring(L, socket_strerror(err)); return 2; } /* turn master object into a server object */ auxiliar_setclass(L, "unixstream{server}", 1); lua_pushnumber(L, 1); return 1; } /*-------------------------------------------------------------------------*\ * Shuts the connection down partially \*-------------------------------------------------------------------------*/ static int meth_shutdown(lua_State *L) { /* SHUT_RD, SHUT_WR, SHUT_RDWR have the value 0, 1, 2, so we can use method index directly */ static const char* methods[] = { "receive", "send", "both", NULL }; p_unix stream = (p_unix) auxiliar_checkclass(L, "unixstream{client}", 1); int how = luaL_checkoption(L, 2, "both", methods); socket_shutdown(&stream->sock, how); lua_pushnumber(L, 1); return 1; } /*-------------------------------------------------------------------------*\ * Just call tm methods \*-------------------------------------------------------------------------*/ static int meth_settimeout(lua_State *L) { p_unix un = (p_unix) auxiliar_checkgroup(L, "unixstream{any}", 1); return timeout_meth_settimeout(L, &un->tm); } /*=========================================================================*\ * Library functions \*=========================================================================*/ /*-------------------------------------------------------------------------*\ * Creates a master unixstream object \*-------------------------------------------------------------------------*/ static int global_create(lua_State *L) { t_socket sock; int err = socket_create(&sock, AF_UNIX, SOCK_STREAM, 0); /* try to allocate a system socket */ if (err == IO_DONE) { /* allocate unixstream object */ p_unix un = (p_unix) lua_newuserdata(L, sizeof(t_unix)); /* set its type as master object */ auxiliar_setclass(L, "unixstream{master}", -1); /* initialize remaining structure fields */ socket_setnonblocking(&sock); un->sock = sock; io_init(&un->io, (p_send) socket_send, (p_recv) socket_recv, (p_error) socket_ioerror, &un->sock); timeout_init(&un->tm, -1, -1); buffer_init(&un->buf, &un->io, &un->tm); return 1; } else { lua_pushnil(L); lua_pushstring(L, socket_strerror(err)); return 2; } } ================================================ FILE: src/libraries/luasocket/libluasocket/unixstream.h ================================================ #ifndef UNIXSTREAM_H #define UNIXSTREAM_H /*=========================================================================*\ * UNIX STREAM object * LuaSocket toolkit * * The unixstream.h module is basicly a glue that puts together modules buffer.h, * timeout.h socket.h and inet.h to provide the LuaSocket UNIX STREAM (AF_UNIX, * SOCK_STREAM) support. * * Three classes are defined: master, client and server. The master class is * a newly created unixstream object, that has not been bound or connected. Server * objects are unixstream objects bound to some local address. Client objects are * unixstream objects either connected to some address or returned by the accept * method of a server object. \*=========================================================================*/ #include "unix.h" #ifndef _WIN32 #pragma GCC visibility push(hidden) #endif int unixstream_open(lua_State *L); #ifndef _WIN32 #pragma GCC visibility pop #endif #endif /* UNIXSTREAM_H */ ================================================ FILE: src/libraries/luasocket/libluasocket/url.lua ================================================ ----------------------------------------------------------------------------- -- URI parsing, composition and relative URL resolution -- LuaSocket toolkit. -- Author: Diego Nehab ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- -- Declare module ----------------------------------------------------------------------------- local string = require("string") local base = _G local table = require("table") local socket = require("socket") socket.url = {} local _M = socket.url ----------------------------------------------------------------------------- -- Module version ----------------------------------------------------------------------------- _M._VERSION = "URL 1.0.3" ----------------------------------------------------------------------------- -- Encodes a string into its escaped hexadecimal representation -- Input -- s: binary string to be encoded -- Returns -- escaped representation of string binary ----------------------------------------------------------------------------- function _M.escape(s) return (string.gsub(s, "([^A-Za-z0-9_])", function(c) return string.format("%%%02x", string.byte(c)) end)) end ----------------------------------------------------------------------------- -- Protects a path segment, to prevent it from interfering with the -- url parsing. -- Input -- s: binary string to be encoded -- Returns -- escaped representation of string binary ----------------------------------------------------------------------------- local function make_set(t) local s = {} for i,v in base.ipairs(t) do s[t[i]] = 1 end return s end -- these are allowed within a path segment, along with alphanum -- other characters must be escaped local segment_set = make_set { "-", "_", ".", "!", "~", "*", "'", "(", ")", ":", "@", "&", "=", "+", "$", ",", } local function protect_segment(s) return string.gsub(s, "([^A-Za-z0-9_])", function (c) if segment_set[c] then return c else return string.format("%%%02X", string.byte(c)) end end) end ----------------------------------------------------------------------------- -- Unencodes a escaped hexadecimal string into its binary representation -- Input -- s: escaped hexadecimal string to be unencoded -- Returns -- unescaped binary representation of escaped hexadecimal binary ----------------------------------------------------------------------------- function _M.unescape(s) return (string.gsub(s, "%%(%x%x)", function(hex) return string.char(base.tonumber(hex, 16)) end)) end ----------------------------------------------------------------------------- -- Removes '..' and '.' components appropriately from a path. -- Input -- path -- Returns -- dot-normalized path local function remove_dot_components(path) local marker = string.char(1) repeat local was = path path = path:gsub('//', '/'..marker..'/', 1) until path == was repeat local was = path path = path:gsub('/%./', '/', 1) until path == was repeat local was = path path = path:gsub('[^/]+/%.%./([^/]+)', '%1', 1) until path == was path = path:gsub('[^/]+/%.%./*$', '') path = path:gsub('/%.%.$', '/') path = path:gsub('/%.$', '/') path = path:gsub('^/%.%./', '/') path = path:gsub(marker, '') return path end ----------------------------------------------------------------------------- -- Builds a path from a base path and a relative path -- Input -- base_path -- relative_path -- Returns -- corresponding absolute path ----------------------------------------------------------------------------- local function absolute_path(base_path, relative_path) if string.sub(relative_path, 1, 1) == "/" then return remove_dot_components(relative_path) end base_path = base_path:gsub("[^/]*$", "") if not base_path:find'/$' then base_path = base_path .. '/' end local path = base_path .. relative_path path = remove_dot_components(path) return path end ----------------------------------------------------------------------------- -- Parses a url and returns a table with all its parts according to RFC 2396 -- The following grammar describes the names given to the URL parts -- ::= :///;?# -- ::= @: -- ::= [:] -- :: = {/} -- Input -- url: uniform resource locator of request -- default: table with default values for each field -- Returns -- table with the following fields, where RFC naming conventions have -- been preserved: -- scheme, authority, userinfo, user, password, host, port, -- path, params, query, fragment -- Obs: -- the leading '/' in {/} is considered part of ----------------------------------------------------------------------------- function _M.parse(url, default) -- initialize default parameters local parsed = {} for i,v in base.pairs(default or parsed) do parsed[i] = v end -- empty url is parsed to nil if not url or url == "" then return nil, "invalid url" end -- remove whitespace -- url = string.gsub(url, "%s", "") -- get scheme url = string.gsub(url, "^([%w][%w%+%-%.]*)%:", function(s) parsed.scheme = s; return "" end) -- get authority url = string.gsub(url, "^//([^/%?#]*)", function(n) parsed.authority = n return "" end) -- get fragment url = string.gsub(url, "#(.*)$", function(f) parsed.fragment = f return "" end) -- get query string url = string.gsub(url, "%?(.*)", function(q) parsed.query = q return "" end) -- get params url = string.gsub(url, "%;(.*)", function(p) parsed.params = p return "" end) -- path is whatever was left if url ~= "" then parsed.path = url end local authority = parsed.authority if not authority then return parsed end authority = string.gsub(authority,"^([^@]*)@", function(u) parsed.userinfo = u; return "" end) authority = string.gsub(authority, ":([^:%]]*)$", function(p) parsed.port = p; return "" end) if authority ~= "" then -- IPv6? parsed.host = string.match(authority, "^%[(.+)%]$") or authority end local userinfo = parsed.userinfo if not userinfo then return parsed end userinfo = string.gsub(userinfo, ":([^:]*)$", function(p) parsed.password = p; return "" end) parsed.user = userinfo return parsed end ----------------------------------------------------------------------------- -- Rebuilds a parsed URL from its components. -- Components are protected if any reserved or unallowed characters are found -- Input -- parsed: parsed URL, as returned by parse -- Returns -- a stringing with the corresponding URL ----------------------------------------------------------------------------- function _M.build(parsed) --local ppath = _M.parse_path(parsed.path or "") --local url = _M.build_path(ppath) local url = parsed.path or "" if parsed.params then url = url .. ";" .. parsed.params end if parsed.query then url = url .. "?" .. parsed.query end local authority = parsed.authority if parsed.host then authority = parsed.host if string.find(authority, ":") then -- IPv6? authority = "[" .. authority .. "]" end if parsed.port then authority = authority .. ":" .. base.tostring(parsed.port) end local userinfo = parsed.userinfo if parsed.user then userinfo = parsed.user if parsed.password then userinfo = userinfo .. ":" .. parsed.password end end if userinfo then authority = userinfo .. "@" .. authority end end if authority then url = "//" .. authority .. url end if parsed.scheme then url = parsed.scheme .. ":" .. url end if parsed.fragment then url = url .. "#" .. parsed.fragment end -- url = string.gsub(url, "%s", "") return url end ----------------------------------------------------------------------------- -- Builds a absolute URL from a base and a relative URL according to RFC 2396 -- Input -- base_url -- relative_url -- Returns -- corresponding absolute url ----------------------------------------------------------------------------- function _M.absolute(base_url, relative_url) local base_parsed if base.type(base_url) == "table" then base_parsed = base_url base_url = _M.build(base_parsed) else base_parsed = _M.parse(base_url) end local result local relative_parsed = _M.parse(relative_url) if not base_parsed then result = relative_url elseif not relative_parsed then result = base_url elseif relative_parsed.scheme then result = relative_url else relative_parsed.scheme = base_parsed.scheme if not relative_parsed.authority then relative_parsed.authority = base_parsed.authority if not relative_parsed.path then relative_parsed.path = base_parsed.path if not relative_parsed.params then relative_parsed.params = base_parsed.params if not relative_parsed.query then relative_parsed.query = base_parsed.query end end else relative_parsed.path = absolute_path(base_parsed.path or "", relative_parsed.path) end end result = _M.build(relative_parsed) end return remove_dot_components(result) end ----------------------------------------------------------------------------- -- Breaks a path into its segments, unescaping the segments -- Input -- path -- Returns -- segment: a table with one entry per segment ----------------------------------------------------------------------------- function _M.parse_path(path) local parsed = {} path = path or "" --path = string.gsub(path, "%s", "") string.gsub(path, "([^/]+)", function (s) table.insert(parsed, s) end) for i = 1, #parsed do parsed[i] = _M.unescape(parsed[i]) end if string.sub(path, 1, 1) == "/" then parsed.is_absolute = 1 end if string.sub(path, -1, -1) == "/" then parsed.is_directory = 1 end return parsed end ----------------------------------------------------------------------------- -- Builds a path component from its segments, escaping protected characters. -- Input -- parsed: path segments -- unsafe: if true, segments are not protected before path is built -- Returns -- path: corresponding path stringing ----------------------------------------------------------------------------- function _M.build_path(parsed, unsafe) local path = "" local n = #parsed if unsafe then for i = 1, n-1 do path = path .. parsed[i] path = path .. "/" end if n > 0 then path = path .. parsed[n] if parsed.is_directory then path = path .. "/" end end else for i = 1, n-1 do path = path .. protect_segment(parsed[i]) path = path .. "/" end if n > 0 then path = path .. protect_segment(parsed[n]) if parsed.is_directory then path = path .. "/" end end end if parsed.is_absolute then path = "/" .. path end return path end return _M ================================================ FILE: src/libraries/luasocket/libluasocket/url.lua.h ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ namespace love { // [url.lua] const unsigned char url_lua[] = { 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x2d, 0x2d, 0x20, 0x55, 0x52, 0x49, 0x20, 0x70, 0x61, 0x72, 0x73, 0x69, 0x6e, 0x67, 0x2c, 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x20, 0x55, 0x52, 0x4c, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x0a, 0x2d, 0x2d, 0x20, 0x4c, 0x75, 0x61, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x20, 0x74, 0x6f, 0x6f, 0x6c, 0x6b, 0x69, 0x74, 0x2e, 0x0a, 0x2d, 0x2d, 0x20, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x3a, 0x20, 0x44, 0x69, 0x65, 0x67, 0x6f, 0x20, 0x4e, 0x65, 0x68, 0x61, 0x62, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x2d, 0x2d, 0x20, 0x44, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x20, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x3d, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x28, 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0x29, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x62, 0x61, 0x73, 0x65, 0x20, 0x3d, 0x20, 0x5f, 0x47, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x3d, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x28, 0x22, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x22, 0x29, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x20, 0x3d, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x28, 0x22, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x22, 0x29, 0x0a, 0x0a, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x75, 0x72, 0x6c, 0x20, 0x3d, 0x20, 0x7b, 0x7d, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x5f, 0x4d, 0x20, 0x3d, 0x20, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x75, 0x72, 0x6c, 0x0a, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x2d, 0x2d, 0x20, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x5f, 0x4d, 0x2e, 0x5f, 0x56, 0x45, 0x52, 0x53, 0x49, 0x4f, 0x4e, 0x20, 0x3d, 0x20, 0x22, 0x55, 0x52, 0x4c, 0x20, 0x31, 0x2e, 0x30, 0x2e, 0x33, 0x22, 0x0a, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x2d, 0x2d, 0x20, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x73, 0x20, 0x61, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x69, 0x6e, 0x74, 0x6f, 0x20, 0x69, 0x74, 0x73, 0x20, 0x65, 0x73, 0x63, 0x61, 0x70, 0x65, 0x64, 0x20, 0x68, 0x65, 0x78, 0x61, 0x64, 0x65, 0x63, 0x69, 0x6d, 0x61, 0x6c, 0x20, 0x72, 0x65, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x0a, 0x2d, 0x2d, 0x20, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x0a, 0x2d, 0x2d, 0x20, 0x20, 0x20, 0x73, 0x3a, 0x20, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x6f, 0x20, 0x62, 0x65, 0x20, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x0a, 0x2d, 0x2d, 0x20, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x0a, 0x2d, 0x2d, 0x20, 0x20, 0x20, 0x65, 0x73, 0x63, 0x61, 0x70, 0x65, 0x64, 0x20, 0x72, 0x65, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x5f, 0x4d, 0x2e, 0x65, 0x73, 0x63, 0x61, 0x70, 0x65, 0x28, 0x73, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x28, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x67, 0x73, 0x75, 0x62, 0x28, 0x73, 0x2c, 0x20, 0x22, 0x28, 0x5b, 0x5e, 0x41, 0x2d, 0x5a, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5f, 0x5d, 0x29, 0x22, 0x2c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x63, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x22, 0x25, 0x25, 0x25, 0x30, 0x32, 0x78, 0x22, 0x2c, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x28, 0x63, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x29, 0x29, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x2d, 0x2d, 0x20, 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x73, 0x20, 0x61, 0x20, 0x70, 0x61, 0x74, 0x68, 0x20, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x2c, 0x20, 0x74, 0x6f, 0x20, 0x70, 0x72, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x20, 0x69, 0x74, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x65, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x2d, 0x2d, 0x20, 0x75, 0x72, 0x6c, 0x20, 0x70, 0x61, 0x72, 0x73, 0x69, 0x6e, 0x67, 0x2e, 0x0a, 0x2d, 0x2d, 0x20, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x0a, 0x2d, 0x2d, 0x20, 0x20, 0x20, 0x73, 0x3a, 0x20, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x6f, 0x20, 0x62, 0x65, 0x20, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x0a, 0x2d, 0x2d, 0x20, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x0a, 0x2d, 0x2d, 0x20, 0x20, 0x20, 0x65, 0x73, 0x63, 0x61, 0x70, 0x65, 0x64, 0x20, 0x72, 0x65, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6d, 0x61, 0x6b, 0x65, 0x5f, 0x73, 0x65, 0x74, 0x28, 0x74, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x73, 0x20, 0x3d, 0x20, 0x7b, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x69, 0x2c, 0x76, 0x20, 0x69, 0x6e, 0x20, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x69, 0x70, 0x61, 0x69, 0x72, 0x73, 0x28, 0x74, 0x29, 0x20, 0x64, 0x6f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x5b, 0x74, 0x5b, 0x69, 0x5d, 0x5d, 0x20, 0x3d, 0x20, 0x31, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x73, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x2d, 0x2d, 0x20, 0x74, 0x68, 0x65, 0x73, 0x65, 0x20, 0x61, 0x72, 0x65, 0x20, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x69, 0x6e, 0x20, 0x61, 0x20, 0x70, 0x61, 0x74, 0x68, 0x20, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x2c, 0x20, 0x61, 0x6c, 0x6f, 0x6e, 0x67, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x6e, 0x75, 0x6d, 0x0a, 0x2d, 0x2d, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20, 0x63, 0x68, 0x61, 0x72, 0x61, 0x63, 0x74, 0x65, 0x72, 0x73, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x65, 0x73, 0x63, 0x61, 0x70, 0x65, 0x64, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x20, 0x3d, 0x20, 0x6d, 0x61, 0x6b, 0x65, 0x5f, 0x73, 0x65, 0x74, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x22, 0x2d, 0x22, 0x2c, 0x20, 0x22, 0x5f, 0x22, 0x2c, 0x20, 0x22, 0x2e, 0x22, 0x2c, 0x20, 0x22, 0x21, 0x22, 0x2c, 0x20, 0x22, 0x7e, 0x22, 0x2c, 0x20, 0x22, 0x2a, 0x22, 0x2c, 0x20, 0x22, 0x27, 0x22, 0x2c, 0x20, 0x22, 0x28, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x22, 0x29, 0x22, 0x2c, 0x20, 0x22, 0x3a, 0x22, 0x2c, 0x20, 0x22, 0x40, 0x22, 0x2c, 0x20, 0x22, 0x26, 0x22, 0x2c, 0x20, 0x22, 0x3d, 0x22, 0x2c, 0x20, 0x22, 0x2b, 0x22, 0x2c, 0x20, 0x22, 0x24, 0x22, 0x2c, 0x20, 0x22, 0x2c, 0x22, 0x2c, 0x0a, 0x7d, 0x0a, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x28, 0x73, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x67, 0x73, 0x75, 0x62, 0x28, 0x73, 0x2c, 0x20, 0x22, 0x28, 0x5b, 0x5e, 0x41, 0x2d, 0x5a, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5f, 0x5d, 0x29, 0x22, 0x2c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x28, 0x63, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x5b, 0x63, 0x5d, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x63, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x22, 0x25, 0x25, 0x25, 0x30, 0x32, 0x58, 0x22, 0x2c, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x28, 0x63, 0x29, 0x29, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x29, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x2d, 0x2d, 0x20, 0x55, 0x6e, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x73, 0x20, 0x61, 0x20, 0x65, 0x73, 0x63, 0x61, 0x70, 0x65, 0x64, 0x20, 0x68, 0x65, 0x78, 0x61, 0x64, 0x65, 0x63, 0x69, 0x6d, 0x61, 0x6c, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x69, 0x6e, 0x74, 0x6f, 0x20, 0x69, 0x74, 0x73, 0x20, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x20, 0x72, 0x65, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x0a, 0x2d, 0x2d, 0x20, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x0a, 0x2d, 0x2d, 0x20, 0x20, 0x20, 0x73, 0x3a, 0x20, 0x65, 0x73, 0x63, 0x61, 0x70, 0x65, 0x64, 0x20, 0x68, 0x65, 0x78, 0x61, 0x64, 0x65, 0x63, 0x69, 0x6d, 0x61, 0x6c, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x6f, 0x20, 0x62, 0x65, 0x20, 0x75, 0x6e, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x0a, 0x2d, 0x2d, 0x20, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x0a, 0x2d, 0x2d, 0x20, 0x20, 0x20, 0x75, 0x6e, 0x65, 0x73, 0x63, 0x61, 0x70, 0x65, 0x64, 0x20, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x20, 0x72, 0x65, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x65, 0x73, 0x63, 0x61, 0x70, 0x65, 0x64, 0x20, 0x68, 0x65, 0x78, 0x61, 0x64, 0x65, 0x63, 0x69, 0x6d, 0x61, 0x6c, 0x20, 0x20, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x5f, 0x4d, 0x2e, 0x75, 0x6e, 0x65, 0x73, 0x63, 0x61, 0x70, 0x65, 0x28, 0x73, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x28, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x67, 0x73, 0x75, 0x62, 0x28, 0x73, 0x2c, 0x20, 0x22, 0x25, 0x25, 0x28, 0x25, 0x78, 0x25, 0x78, 0x29, 0x22, 0x2c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x68, 0x65, 0x78, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x63, 0x68, 0x61, 0x72, 0x28, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x74, 0x6f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x28, 0x68, 0x65, 0x78, 0x2c, 0x20, 0x31, 0x36, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x29, 0x29, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x2d, 0x2d, 0x20, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x73, 0x20, 0x27, 0x2e, 0x2e, 0x27, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x27, 0x2e, 0x27, 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x20, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x70, 0x72, 0x69, 0x61, 0x74, 0x65, 0x6c, 0x79, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x61, 0x20, 0x70, 0x61, 0x74, 0x68, 0x2e, 0x0a, 0x2d, 0x2d, 0x20, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x0a, 0x2d, 0x2d, 0x20, 0x20, 0x20, 0x70, 0x61, 0x74, 0x68, 0x0a, 0x2d, 0x2d, 0x20, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x0a, 0x2d, 0x2d, 0x20, 0x20, 0x20, 0x64, 0x6f, 0x74, 0x2d, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x20, 0x70, 0x61, 0x74, 0x68, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x5f, 0x64, 0x6f, 0x74, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x28, 0x70, 0x61, 0x74, 0x68, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x72, 0x20, 0x3d, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x63, 0x68, 0x61, 0x72, 0x28, 0x31, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x77, 0x61, 0x73, 0x20, 0x3d, 0x20, 0x70, 0x61, 0x74, 0x68, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x70, 0x61, 0x74, 0x68, 0x20, 0x3d, 0x20, 0x70, 0x61, 0x74, 0x68, 0x3a, 0x67, 0x73, 0x75, 0x62, 0x28, 0x27, 0x2f, 0x2f, 0x27, 0x2c, 0x20, 0x27, 0x2f, 0x27, 0x2e, 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x72, 0x2e, 0x2e, 0x27, 0x2f, 0x27, 0x2c, 0x20, 0x31, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x75, 0x6e, 0x74, 0x69, 0x6c, 0x20, 0x70, 0x61, 0x74, 0x68, 0x20, 0x3d, 0x3d, 0x20, 0x77, 0x61, 0x73, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x77, 0x61, 0x73, 0x20, 0x3d, 0x20, 0x70, 0x61, 0x74, 0x68, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x70, 0x61, 0x74, 0x68, 0x20, 0x3d, 0x20, 0x70, 0x61, 0x74, 0x68, 0x3a, 0x67, 0x73, 0x75, 0x62, 0x28, 0x27, 0x2f, 0x25, 0x2e, 0x2f, 0x27, 0x2c, 0x20, 0x27, 0x2f, 0x27, 0x2c, 0x20, 0x31, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x75, 0x6e, 0x74, 0x69, 0x6c, 0x20, 0x70, 0x61, 0x74, 0x68, 0x20, 0x3d, 0x3d, 0x20, 0x77, 0x61, 0x73, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x77, 0x61, 0x73, 0x20, 0x3d, 0x20, 0x70, 0x61, 0x74, 0x68, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x70, 0x61, 0x74, 0x68, 0x20, 0x3d, 0x20, 0x70, 0x61, 0x74, 0x68, 0x3a, 0x67, 0x73, 0x75, 0x62, 0x28, 0x27, 0x5b, 0x5e, 0x2f, 0x5d, 0x2b, 0x2f, 0x25, 0x2e, 0x25, 0x2e, 0x2f, 0x28, 0x5b, 0x5e, 0x2f, 0x5d, 0x2b, 0x29, 0x27, 0x2c, 0x20, 0x27, 0x25, 0x31, 0x27, 0x2c, 0x20, 0x31, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x75, 0x6e, 0x74, 0x69, 0x6c, 0x20, 0x70, 0x61, 0x74, 0x68, 0x20, 0x3d, 0x3d, 0x20, 0x77, 0x61, 0x73, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x70, 0x61, 0x74, 0x68, 0x20, 0x3d, 0x20, 0x70, 0x61, 0x74, 0x68, 0x3a, 0x67, 0x73, 0x75, 0x62, 0x28, 0x27, 0x5b, 0x5e, 0x2f, 0x5d, 0x2b, 0x2f, 0x25, 0x2e, 0x25, 0x2e, 0x2f, 0x2a, 0x24, 0x27, 0x2c, 0x20, 0x27, 0x27, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x70, 0x61, 0x74, 0x68, 0x20, 0x3d, 0x20, 0x70, 0x61, 0x74, 0x68, 0x3a, 0x67, 0x73, 0x75, 0x62, 0x28, 0x27, 0x2f, 0x25, 0x2e, 0x25, 0x2e, 0x24, 0x27, 0x2c, 0x20, 0x27, 0x2f, 0x27, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x70, 0x61, 0x74, 0x68, 0x20, 0x3d, 0x20, 0x70, 0x61, 0x74, 0x68, 0x3a, 0x67, 0x73, 0x75, 0x62, 0x28, 0x27, 0x2f, 0x25, 0x2e, 0x24, 0x27, 0x2c, 0x20, 0x27, 0x2f, 0x27, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x70, 0x61, 0x74, 0x68, 0x20, 0x3d, 0x20, 0x70, 0x61, 0x74, 0x68, 0x3a, 0x67, 0x73, 0x75, 0x62, 0x28, 0x27, 0x5e, 0x2f, 0x25, 0x2e, 0x25, 0x2e, 0x2f, 0x27, 0x2c, 0x20, 0x27, 0x2f, 0x27, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x70, 0x61, 0x74, 0x68, 0x20, 0x3d, 0x20, 0x70, 0x61, 0x74, 0x68, 0x3a, 0x67, 0x73, 0x75, 0x62, 0x28, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x72, 0x2c, 0x20, 0x27, 0x27, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x70, 0x61, 0x74, 0x68, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x2d, 0x2d, 0x20, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x73, 0x20, 0x61, 0x20, 0x70, 0x61, 0x74, 0x68, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x61, 0x20, 0x62, 0x61, 0x73, 0x65, 0x20, 0x70, 0x61, 0x74, 0x68, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x61, 0x20, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x20, 0x70, 0x61, 0x74, 0x68, 0x0a, 0x2d, 0x2d, 0x20, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x0a, 0x2d, 0x2d, 0x20, 0x20, 0x20, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x0a, 0x2d, 0x2d, 0x20, 0x20, 0x20, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x0a, 0x2d, 0x2d, 0x20, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x0a, 0x2d, 0x2d, 0x20, 0x20, 0x20, 0x63, 0x6f, 0x72, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x61, 0x62, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x65, 0x20, 0x70, 0x61, 0x74, 0x68, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x61, 0x62, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x28, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x2c, 0x20, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x73, 0x75, 0x62, 0x28, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x2c, 0x20, 0x31, 0x2c, 0x20, 0x31, 0x29, 0x20, 0x3d, 0x3d, 0x20, 0x22, 0x2f, 0x22, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x5f, 0x64, 0x6f, 0x74, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x28, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x29, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x20, 0x3d, 0x20, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x3a, 0x67, 0x73, 0x75, 0x62, 0x28, 0x22, 0x5b, 0x5e, 0x2f, 0x5d, 0x2a, 0x24, 0x22, 0x2c, 0x20, 0x22, 0x22, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x3a, 0x66, 0x69, 0x6e, 0x64, 0x27, 0x2f, 0x24, 0x27, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x20, 0x3d, 0x20, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x20, 0x2e, 0x2e, 0x20, 0x27, 0x2f, 0x27, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x70, 0x61, 0x74, 0x68, 0x20, 0x3d, 0x20, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x20, 0x2e, 0x2e, 0x20, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x70, 0x61, 0x74, 0x68, 0x20, 0x3d, 0x20, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x5f, 0x64, 0x6f, 0x74, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x28, 0x70, 0x61, 0x74, 0x68, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x70, 0x61, 0x74, 0x68, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x2d, 0x2d, 0x20, 0x50, 0x61, 0x72, 0x73, 0x65, 0x73, 0x20, 0x61, 0x20, 0x75, 0x72, 0x6c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, 0x61, 0x20, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x61, 0x6c, 0x6c, 0x20, 0x69, 0x74, 0x73, 0x20, 0x70, 0x61, 0x72, 0x74, 0x73, 0x20, 0x61, 0x63, 0x63, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x6f, 0x20, 0x52, 0x46, 0x43, 0x20, 0x32, 0x33, 0x39, 0x36, 0x0a, 0x2d, 0x2d, 0x20, 0x54, 0x68, 0x65, 0x20, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x69, 0x6e, 0x67, 0x20, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x61, 0x72, 0x20, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x20, 0x67, 0x69, 0x76, 0x65, 0x6e, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x55, 0x52, 0x4c, 0x20, 0x70, 0x61, 0x72, 0x74, 0x73, 0x0a, 0x2d, 0x2d, 0x20, 0x3c, 0x75, 0x72, 0x6c, 0x3e, 0x20, 0x3a, 0x3a, 0x3d, 0x20, 0x3c, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x3e, 0x3a, 0x2f, 0x2f, 0x3c, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x3e, 0x2f, 0x3c, 0x70, 0x61, 0x74, 0x68, 0x3e, 0x3b, 0x3c, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3e, 0x3f, 0x3c, 0x71, 0x75, 0x65, 0x72, 0x79, 0x3e, 0x23, 0x3c, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x3e, 0x0a, 0x2d, 0x2d, 0x20, 0x3c, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x3e, 0x20, 0x3a, 0x3a, 0x3d, 0x20, 0x3c, 0x75, 0x73, 0x65, 0x72, 0x69, 0x6e, 0x66, 0x6f, 0x3e, 0x40, 0x3c, 0x68, 0x6f, 0x73, 0x74, 0x3e, 0x3a, 0x3c, 0x70, 0x6f, 0x72, 0x74, 0x3e, 0x0a, 0x2d, 0x2d, 0x20, 0x3c, 0x75, 0x73, 0x65, 0x72, 0x69, 0x6e, 0x66, 0x6f, 0x3e, 0x20, 0x3a, 0x3a, 0x3d, 0x20, 0x3c, 0x75, 0x73, 0x65, 0x72, 0x3e, 0x5b, 0x3a, 0x3c, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x3e, 0x5d, 0x0a, 0x2d, 0x2d, 0x20, 0x3c, 0x70, 0x61, 0x74, 0x68, 0x3e, 0x20, 0x3a, 0x3a, 0x20, 0x3d, 0x20, 0x7b, 0x3c, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x3e, 0x2f, 0x7d, 0x3c, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x3e, 0x0a, 0x2d, 0x2d, 0x20, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x0a, 0x2d, 0x2d, 0x20, 0x20, 0x20, 0x75, 0x72, 0x6c, 0x3a, 0x20, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x20, 0x6f, 0x66, 0x20, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x0a, 0x2d, 0x2d, 0x20, 0x20, 0x20, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x3a, 0x20, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x65, 0x61, 0x63, 0x68, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x0a, 0x2d, 0x2d, 0x20, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x0a, 0x2d, 0x2d, 0x20, 0x20, 0x20, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x69, 0x6e, 0x67, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x2c, 0x20, 0x77, 0x68, 0x65, 0x72, 0x65, 0x20, 0x52, 0x46, 0x43, 0x20, 0x6e, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x20, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x68, 0x61, 0x76, 0x65, 0x0a, 0x2d, 0x2d, 0x20, 0x20, 0x20, 0x62, 0x65, 0x65, 0x6e, 0x20, 0x70, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x3a, 0x0a, 0x2d, 0x2d, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x2c, 0x20, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x2c, 0x20, 0x75, 0x73, 0x65, 0x72, 0x69, 0x6e, 0x66, 0x6f, 0x2c, 0x20, 0x75, 0x73, 0x65, 0x72, 0x2c, 0x20, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x2c, 0x20, 0x68, 0x6f, 0x73, 0x74, 0x2c, 0x20, 0x70, 0x6f, 0x72, 0x74, 0x2c, 0x0a, 0x2d, 0x2d, 0x20, 0x20, 0x20, 0x20, 0x20, 0x70, 0x61, 0x74, 0x68, 0x2c, 0x20, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2c, 0x20, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2c, 0x20, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x0a, 0x2d, 0x2d, 0x20, 0x4f, 0x62, 0x73, 0x3a, 0x0a, 0x2d, 0x2d, 0x20, 0x20, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6c, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x27, 0x2f, 0x27, 0x20, 0x69, 0x6e, 0x20, 0x7b, 0x2f, 0x3c, 0x70, 0x61, 0x74, 0x68, 0x3e, 0x7d, 0x20, 0x69, 0x73, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x69, 0x64, 0x65, 0x72, 0x65, 0x64, 0x20, 0x70, 0x61, 0x72, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x3c, 0x70, 0x61, 0x74, 0x68, 0x3e, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x5f, 0x4d, 0x2e, 0x70, 0x61, 0x72, 0x73, 0x65, 0x28, 0x75, 0x72, 0x6c, 0x2c, 0x20, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x20, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x20, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x20, 0x3d, 0x20, 0x7b, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x69, 0x2c, 0x76, 0x20, 0x69, 0x6e, 0x20, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x61, 0x69, 0x72, 0x73, 0x28, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x20, 0x6f, 0x72, 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x29, 0x20, 0x64, 0x6f, 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x5b, 0x69, 0x5d, 0x20, 0x3d, 0x20, 0x76, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x20, 0x75, 0x72, 0x6c, 0x20, 0x69, 0x73, 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x6e, 0x69, 0x6c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x75, 0x72, 0x6c, 0x20, 0x6f, 0x72, 0x20, 0x75, 0x72, 0x6c, 0x20, 0x3d, 0x3d, 0x20, 0x22, 0x22, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6e, 0x69, 0x6c, 0x2c, 0x20, 0x22, 0x69, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x75, 0x72, 0x6c, 0x22, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x20, 0x77, 0x68, 0x69, 0x74, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x75, 0x72, 0x6c, 0x20, 0x3d, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x67, 0x73, 0x75, 0x62, 0x28, 0x75, 0x72, 0x6c, 0x2c, 0x20, 0x22, 0x25, 0x73, 0x22, 0x2c, 0x20, 0x22, 0x22, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x67, 0x65, 0x74, 0x20, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x75, 0x72, 0x6c, 0x20, 0x3d, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x67, 0x73, 0x75, 0x62, 0x28, 0x75, 0x72, 0x6c, 0x2c, 0x20, 0x22, 0x5e, 0x28, 0x5b, 0x25, 0x77, 0x5d, 0x5b, 0x25, 0x77, 0x25, 0x2b, 0x25, 0x2d, 0x25, 0x2e, 0x5d, 0x2a, 0x29, 0x25, 0x3a, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x73, 0x29, 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x73, 0x3b, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x22, 0x22, 0x20, 0x65, 0x6e, 0x64, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x67, 0x65, 0x74, 0x20, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x75, 0x72, 0x6c, 0x20, 0x3d, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x67, 0x73, 0x75, 0x62, 0x28, 0x75, 0x72, 0x6c, 0x2c, 0x20, 0x22, 0x5e, 0x2f, 0x2f, 0x28, 0x5b, 0x5e, 0x2f, 0x25, 0x3f, 0x23, 0x5d, 0x2a, 0x29, 0x22, 0x2c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x6e, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x20, 0x3d, 0x20, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x22, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x67, 0x65, 0x74, 0x20, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x75, 0x72, 0x6c, 0x20, 0x3d, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x67, 0x73, 0x75, 0x62, 0x28, 0x75, 0x72, 0x6c, 0x2c, 0x20, 0x22, 0x23, 0x28, 0x2e, 0x2a, 0x29, 0x24, 0x22, 0x2c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x66, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x2e, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x3d, 0x20, 0x66, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x22, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x67, 0x65, 0x74, 0x20, 0x71, 0x75, 0x65, 0x72, 0x79, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x75, 0x72, 0x6c, 0x20, 0x3d, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x67, 0x73, 0x75, 0x62, 0x28, 0x75, 0x72, 0x6c, 0x2c, 0x20, 0x22, 0x25, 0x3f, 0x28, 0x2e, 0x2a, 0x29, 0x22, 0x2c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x71, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x20, 0x3d, 0x20, 0x71, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x22, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x67, 0x65, 0x74, 0x20, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x75, 0x72, 0x6c, 0x20, 0x3d, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x67, 0x73, 0x75, 0x62, 0x28, 0x75, 0x72, 0x6c, 0x2c, 0x20, 0x22, 0x25, 0x3b, 0x28, 0x2e, 0x2a, 0x29, 0x22, 0x2c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x70, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x2e, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x20, 0x3d, 0x20, 0x70, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x22, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x70, 0x61, 0x74, 0x68, 0x20, 0x69, 0x73, 0x20, 0x77, 0x68, 0x61, 0x74, 0x65, 0x76, 0x65, 0x72, 0x20, 0x77, 0x61, 0x73, 0x20, 0x6c, 0x65, 0x66, 0x74, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x75, 0x72, 0x6c, 0x20, 0x7e, 0x3d, 0x20, 0x22, 0x22, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x2e, 0x70, 0x61, 0x74, 0x68, 0x20, 0x3d, 0x20, 0x75, 0x72, 0x6c, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x20, 0x3d, 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x20, 0x3d, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x67, 0x73, 0x75, 0x62, 0x28, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x2c, 0x22, 0x5e, 0x28, 0x5b, 0x5e, 0x40, 0x5d, 0x2a, 0x29, 0x40, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x75, 0x29, 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x69, 0x6e, 0x66, 0x6f, 0x20, 0x3d, 0x20, 0x75, 0x3b, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x22, 0x22, 0x20, 0x65, 0x6e, 0x64, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x20, 0x3d, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x67, 0x73, 0x75, 0x62, 0x28, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x2c, 0x20, 0x22, 0x3a, 0x28, 0x5b, 0x5e, 0x3a, 0x25, 0x5d, 0x5d, 0x2a, 0x29, 0x24, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x70, 0x29, 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x20, 0x3d, 0x20, 0x70, 0x3b, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x22, 0x22, 0x20, 0x65, 0x6e, 0x64, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x20, 0x7e, 0x3d, 0x20, 0x22, 0x22, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x49, 0x50, 0x76, 0x36, 0x3f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x2e, 0x68, 0x6f, 0x73, 0x74, 0x20, 0x3d, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x28, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x2c, 0x20, 0x22, 0x5e, 0x25, 0x5b, 0x28, 0x2e, 0x2b, 0x29, 0x25, 0x5d, 0x24, 0x22, 0x29, 0x20, 0x6f, 0x72, 0x20, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x75, 0x73, 0x65, 0x72, 0x69, 0x6e, 0x66, 0x6f, 0x20, 0x3d, 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x69, 0x6e, 0x66, 0x6f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x75, 0x73, 0x65, 0x72, 0x69, 0x6e, 0x66, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x75, 0x73, 0x65, 0x72, 0x69, 0x6e, 0x66, 0x6f, 0x20, 0x3d, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x67, 0x73, 0x75, 0x62, 0x28, 0x75, 0x73, 0x65, 0x72, 0x69, 0x6e, 0x66, 0x6f, 0x2c, 0x20, 0x22, 0x3a, 0x28, 0x5b, 0x5e, 0x3a, 0x5d, 0x2a, 0x29, 0x24, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x70, 0x29, 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x2e, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x20, 0x3d, 0x20, 0x70, 0x3b, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x22, 0x22, 0x20, 0x65, 0x6e, 0x64, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x20, 0x3d, 0x20, 0x75, 0x73, 0x65, 0x72, 0x69, 0x6e, 0x66, 0x6f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x2d, 0x2d, 0x20, 0x52, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x73, 0x20, 0x61, 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x20, 0x55, 0x52, 0x4c, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x69, 0x74, 0x73, 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x0a, 0x2d, 0x2d, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x20, 0x61, 0x72, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x65, 0x64, 0x20, 0x69, 0x66, 0x20, 0x61, 0x6e, 0x79, 0x20, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x20, 0x6f, 0x72, 0x20, 0x75, 0x6e, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x20, 0x63, 0x68, 0x61, 0x72, 0x61, 0x63, 0x74, 0x65, 0x72, 0x73, 0x20, 0x61, 0x72, 0x65, 0x20, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x0a, 0x2d, 0x2d, 0x20, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x0a, 0x2d, 0x2d, 0x20, 0x20, 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x3a, 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x20, 0x55, 0x52, 0x4c, 0x2c, 0x20, 0x61, 0x73, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, 0x0a, 0x2d, 0x2d, 0x20, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x0a, 0x2d, 0x2d, 0x20, 0x20, 0x20, 0x61, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x69, 0x6e, 0x67, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x6f, 0x72, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x55, 0x52, 0x4c, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x5f, 0x4d, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x28, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x70, 0x70, 0x61, 0x74, 0x68, 0x20, 0x3d, 0x20, 0x5f, 0x4d, 0x2e, 0x70, 0x61, 0x72, 0x73, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x28, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x2e, 0x70, 0x61, 0x74, 0x68, 0x20, 0x6f, 0x72, 0x20, 0x22, 0x22, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x75, 0x72, 0x6c, 0x20, 0x3d, 0x20, 0x5f, 0x4d, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x28, 0x70, 0x70, 0x61, 0x74, 0x68, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x75, 0x72, 0x6c, 0x20, 0x3d, 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x2e, 0x70, 0x61, 0x74, 0x68, 0x20, 0x6f, 0x72, 0x20, 0x22, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x2e, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x75, 0x72, 0x6c, 0x20, 0x3d, 0x20, 0x75, 0x72, 0x6c, 0x20, 0x2e, 0x2e, 0x20, 0x22, 0x3b, 0x22, 0x20, 0x2e, 0x2e, 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x2e, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x75, 0x72, 0x6c, 0x20, 0x3d, 0x20, 0x75, 0x72, 0x6c, 0x20, 0x2e, 0x2e, 0x20, 0x22, 0x3f, 0x22, 0x20, 0x2e, 0x2e, 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x20, 0x3d, 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x2e, 0x68, 0x6f, 0x73, 0x74, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x20, 0x3d, 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x2e, 0x68, 0x6f, 0x73, 0x74, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x66, 0x69, 0x6e, 0x64, 0x28, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x2c, 0x20, 0x22, 0x3a, 0x22, 0x29, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x2d, 0x2d, 0x20, 0x49, 0x50, 0x76, 0x36, 0x3f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x20, 0x3d, 0x20, 0x22, 0x5b, 0x22, 0x20, 0x2e, 0x2e, 0x20, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x20, 0x2e, 0x2e, 0x20, 0x22, 0x5d, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x20, 0x3d, 0x20, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x20, 0x2e, 0x2e, 0x20, 0x22, 0x3a, 0x22, 0x20, 0x2e, 0x2e, 0x20, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x74, 0x6f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x28, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x2e, 0x70, 0x6f, 0x72, 0x74, 0x29, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x75, 0x73, 0x65, 0x72, 0x69, 0x6e, 0x66, 0x6f, 0x20, 0x3d, 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x69, 0x6e, 0x66, 0x6f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x75, 0x73, 0x65, 0x72, 0x69, 0x6e, 0x66, 0x6f, 0x20, 0x3d, 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x2e, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x75, 0x73, 0x65, 0x72, 0x69, 0x6e, 0x66, 0x6f, 0x20, 0x3d, 0x20, 0x75, 0x73, 0x65, 0x72, 0x69, 0x6e, 0x66, 0x6f, 0x20, 0x2e, 0x2e, 0x20, 0x22, 0x3a, 0x22, 0x20, 0x2e, 0x2e, 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x2e, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x75, 0x73, 0x65, 0x72, 0x69, 0x6e, 0x66, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x20, 0x3d, 0x20, 0x75, 0x73, 0x65, 0x72, 0x69, 0x6e, 0x66, 0x6f, 0x20, 0x2e, 0x2e, 0x20, 0x22, 0x40, 0x22, 0x20, 0x2e, 0x2e, 0x20, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x75, 0x72, 0x6c, 0x20, 0x3d, 0x20, 0x22, 0x2f, 0x2f, 0x22, 0x20, 0x2e, 0x2e, 0x20, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x20, 0x2e, 0x2e, 0x20, 0x75, 0x72, 0x6c, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x75, 0x72, 0x6c, 0x20, 0x3d, 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x20, 0x2e, 0x2e, 0x20, 0x22, 0x3a, 0x22, 0x20, 0x2e, 0x2e, 0x20, 0x75, 0x72, 0x6c, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x2e, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x75, 0x72, 0x6c, 0x20, 0x3d, 0x20, 0x75, 0x72, 0x6c, 0x20, 0x2e, 0x2e, 0x20, 0x22, 0x23, 0x22, 0x20, 0x2e, 0x2e, 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x2e, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x75, 0x72, 0x6c, 0x20, 0x3d, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x67, 0x73, 0x75, 0x62, 0x28, 0x75, 0x72, 0x6c, 0x2c, 0x20, 0x22, 0x25, 0x73, 0x22, 0x2c, 0x20, 0x22, 0x22, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x75, 0x72, 0x6c, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x2d, 0x2d, 0x20, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x73, 0x20, 0x61, 0x20, 0x61, 0x62, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x65, 0x20, 0x55, 0x52, 0x4c, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x61, 0x20, 0x62, 0x61, 0x73, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x61, 0x20, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x20, 0x55, 0x52, 0x4c, 0x20, 0x61, 0x63, 0x63, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x6f, 0x20, 0x52, 0x46, 0x43, 0x20, 0x32, 0x33, 0x39, 0x36, 0x0a, 0x2d, 0x2d, 0x20, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x0a, 0x2d, 0x2d, 0x20, 0x20, 0x20, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x0a, 0x2d, 0x2d, 0x20, 0x20, 0x20, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x0a, 0x2d, 0x2d, 0x20, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x0a, 0x2d, 0x2d, 0x20, 0x20, 0x20, 0x63, 0x6f, 0x72, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x61, 0x62, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x65, 0x20, 0x75, 0x72, 0x6c, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x5f, 0x4d, 0x2e, 0x61, 0x62, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x65, 0x28, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x2c, 0x20, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x28, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x29, 0x20, 0x3d, 0x3d, 0x20, 0x22, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x22, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x20, 0x3d, 0x20, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x20, 0x3d, 0x20, 0x5f, 0x4d, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x28, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x20, 0x3d, 0x20, 0x5f, 0x4d, 0x2e, 0x70, 0x61, 0x72, 0x73, 0x65, 0x28, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x20, 0x3d, 0x20, 0x5f, 0x4d, 0x2e, 0x70, 0x61, 0x72, 0x73, 0x65, 0x28, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x20, 0x3d, 0x20, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x20, 0x3d, 0x20, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x69, 0x66, 0x20, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x20, 0x3d, 0x20, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x20, 0x3d, 0x20, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x2e, 0x70, 0x61, 0x74, 0x68, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x2e, 0x70, 0x61, 0x74, 0x68, 0x20, 0x3d, 0x20, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x2e, 0x70, 0x61, 0x74, 0x68, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x2e, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x2e, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x20, 0x3d, 0x20, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x2e, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x20, 0x3d, 0x20, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x2e, 0x70, 0x61, 0x74, 0x68, 0x20, 0x3d, 0x20, 0x61, 0x62, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x28, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x2e, 0x70, 0x61, 0x74, 0x68, 0x20, 0x6f, 0x72, 0x20, 0x22, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x2e, 0x70, 0x61, 0x74, 0x68, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x20, 0x3d, 0x20, 0x5f, 0x4d, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x28, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x5f, 0x64, 0x6f, 0x74, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x28, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x29, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x2d, 0x2d, 0x20, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x73, 0x20, 0x61, 0x20, 0x70, 0x61, 0x74, 0x68, 0x20, 0x69, 0x6e, 0x74, 0x6f, 0x20, 0x69, 0x74, 0x73, 0x20, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2c, 0x20, 0x75, 0x6e, 0x65, 0x73, 0x63, 0x61, 0x70, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x0a, 0x2d, 0x2d, 0x20, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x0a, 0x2d, 0x2d, 0x20, 0x20, 0x20, 0x70, 0x61, 0x74, 0x68, 0x0a, 0x2d, 0x2d, 0x20, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x0a, 0x2d, 0x2d, 0x20, 0x20, 0x20, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x61, 0x20, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x6f, 0x6e, 0x65, 0x20, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x20, 0x70, 0x65, 0x72, 0x20, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x5f, 0x4d, 0x2e, 0x70, 0x61, 0x72, 0x73, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x28, 0x70, 0x61, 0x74, 0x68, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x20, 0x3d, 0x20, 0x7b, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x70, 0x61, 0x74, 0x68, 0x20, 0x3d, 0x20, 0x70, 0x61, 0x74, 0x68, 0x20, 0x6f, 0x72, 0x20, 0x22, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x70, 0x61, 0x74, 0x68, 0x20, 0x3d, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x67, 0x73, 0x75, 0x62, 0x28, 0x70, 0x61, 0x74, 0x68, 0x2c, 0x20, 0x22, 0x25, 0x73, 0x22, 0x2c, 0x20, 0x22, 0x22, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x67, 0x73, 0x75, 0x62, 0x28, 0x70, 0x61, 0x74, 0x68, 0x2c, 0x20, 0x22, 0x28, 0x5b, 0x5e, 0x2f, 0x5d, 0x2b, 0x29, 0x22, 0x2c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x28, 0x73, 0x29, 0x20, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x28, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x2c, 0x20, 0x73, 0x29, 0x20, 0x65, 0x6e, 0x64, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x69, 0x20, 0x3d, 0x20, 0x31, 0x2c, 0x20, 0x23, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x20, 0x64, 0x6f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x5b, 0x69, 0x5d, 0x20, 0x3d, 0x20, 0x5f, 0x4d, 0x2e, 0x75, 0x6e, 0x65, 0x73, 0x63, 0x61, 0x70, 0x65, 0x28, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x5b, 0x69, 0x5d, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x73, 0x75, 0x62, 0x28, 0x70, 0x61, 0x74, 0x68, 0x2c, 0x20, 0x31, 0x2c, 0x20, 0x31, 0x29, 0x20, 0x3d, 0x3d, 0x20, 0x22, 0x2f, 0x22, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x2e, 0x69, 0x73, 0x5f, 0x61, 0x62, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x65, 0x20, 0x3d, 0x20, 0x31, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x73, 0x75, 0x62, 0x28, 0x70, 0x61, 0x74, 0x68, 0x2c, 0x20, 0x2d, 0x31, 0x2c, 0x20, 0x2d, 0x31, 0x29, 0x20, 0x3d, 0x3d, 0x20, 0x22, 0x2f, 0x22, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x2e, 0x69, 0x73, 0x5f, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x20, 0x3d, 0x20, 0x31, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x2d, 0x2d, 0x20, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x73, 0x20, 0x61, 0x20, 0x70, 0x61, 0x74, 0x68, 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x69, 0x74, 0x73, 0x20, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2c, 0x20, 0x65, 0x73, 0x63, 0x61, 0x70, 0x69, 0x6e, 0x67, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x65, 0x64, 0x20, 0x63, 0x68, 0x61, 0x72, 0x61, 0x63, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x0a, 0x2d, 0x2d, 0x20, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x0a, 0x2d, 0x2d, 0x20, 0x20, 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x3a, 0x20, 0x70, 0x61, 0x74, 0x68, 0x20, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x0a, 0x2d, 0x2d, 0x20, 0x20, 0x20, 0x75, 0x6e, 0x73, 0x61, 0x66, 0x65, 0x3a, 0x20, 0x69, 0x66, 0x20, 0x74, 0x72, 0x75, 0x65, 0x2c, 0x20, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x20, 0x61, 0x72, 0x65, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x65, 0x64, 0x20, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x20, 0x70, 0x61, 0x74, 0x68, 0x20, 0x69, 0x73, 0x20, 0x62, 0x75, 0x69, 0x6c, 0x74, 0x0a, 0x2d, 0x2d, 0x20, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x0a, 0x2d, 0x2d, 0x20, 0x20, 0x20, 0x70, 0x61, 0x74, 0x68, 0x3a, 0x20, 0x63, 0x6f, 0x72, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x70, 0x61, 0x74, 0x68, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x69, 0x6e, 0x67, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x5f, 0x4d, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x28, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x2c, 0x20, 0x75, 0x6e, 0x73, 0x61, 0x66, 0x65, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x70, 0x61, 0x74, 0x68, 0x20, 0x3d, 0x20, 0x22, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x6e, 0x20, 0x3d, 0x20, 0x23, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x75, 0x6e, 0x73, 0x61, 0x66, 0x65, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x69, 0x20, 0x3d, 0x20, 0x31, 0x2c, 0x20, 0x6e, 0x2d, 0x31, 0x20, 0x64, 0x6f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x70, 0x61, 0x74, 0x68, 0x20, 0x3d, 0x20, 0x70, 0x61, 0x74, 0x68, 0x20, 0x2e, 0x2e, 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x5b, 0x69, 0x5d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x70, 0x61, 0x74, 0x68, 0x20, 0x3d, 0x20, 0x70, 0x61, 0x74, 0x68, 0x20, 0x2e, 0x2e, 0x20, 0x22, 0x2f, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x20, 0x3e, 0x20, 0x30, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x70, 0x61, 0x74, 0x68, 0x20, 0x3d, 0x20, 0x70, 0x61, 0x74, 0x68, 0x20, 0x2e, 0x2e, 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x5b, 0x6e, 0x5d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x2e, 0x69, 0x73, 0x5f, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x70, 0x61, 0x74, 0x68, 0x20, 0x3d, 0x20, 0x70, 0x61, 0x74, 0x68, 0x20, 0x2e, 0x2e, 0x20, 0x22, 0x2f, 0x22, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x69, 0x20, 0x3d, 0x20, 0x31, 0x2c, 0x20, 0x6e, 0x2d, 0x31, 0x20, 0x64, 0x6f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x70, 0x61, 0x74, 0x68, 0x20, 0x3d, 0x20, 0x70, 0x61, 0x74, 0x68, 0x20, 0x2e, 0x2e, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x28, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x5b, 0x69, 0x5d, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x70, 0x61, 0x74, 0x68, 0x20, 0x3d, 0x20, 0x70, 0x61, 0x74, 0x68, 0x20, 0x2e, 0x2e, 0x20, 0x22, 0x2f, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x20, 0x3e, 0x20, 0x30, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x70, 0x61, 0x74, 0x68, 0x20, 0x3d, 0x20, 0x70, 0x61, 0x74, 0x68, 0x20, 0x2e, 0x2e, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x28, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x5b, 0x6e, 0x5d, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x2e, 0x69, 0x73, 0x5f, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x70, 0x61, 0x74, 0x68, 0x20, 0x3d, 0x20, 0x70, 0x61, 0x74, 0x68, 0x20, 0x2e, 0x2e, 0x20, 0x22, 0x2f, 0x22, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x2e, 0x69, 0x73, 0x5f, 0x61, 0x62, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x65, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x70, 0x61, 0x74, 0x68, 0x20, 0x3d, 0x20, 0x22, 0x2f, 0x22, 0x20, 0x2e, 0x2e, 0x20, 0x70, 0x61, 0x74, 0x68, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x70, 0x61, 0x74, 0x68, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x4d, 0x0a, }; // [url.lua] } // love ================================================ FILE: src/libraries/luasocket/libluasocket/usocket.c ================================================ /*=========================================================================*\ * Socket compatibilization module for Unix * LuaSocket toolkit * * The code is now interrupt-safe. * The penalty of calling select to avoid busy-wait is only paid when * the I/O call fail in the first place. \*=========================================================================*/ #include "luasocket.h" #include "socket.h" #include "pierror.h" #include #include /*-------------------------------------------------------------------------*\ * Wait for readable/writable/connected socket with timeout \*-------------------------------------------------------------------------*/ #ifndef SOCKET_SELECT #include #define WAITFD_R POLLIN #define WAITFD_W POLLOUT #define WAITFD_C (POLLIN|POLLOUT) int socket_waitfd(p_socket ps, int sw, p_timeout tm) { int ret; struct pollfd pfd; pfd.fd = *ps; pfd.events = sw; pfd.revents = 0; if (timeout_iszero(tm)) return IO_TIMEOUT; /* optimize timeout == 0 case */ do { int t = (int)(timeout_getretry(tm)*1e3); ret = poll(&pfd, 1, t >= 0? t: -1); } while (ret == -1 && errno == EINTR); if (ret == -1) return errno; if (ret == 0) return IO_TIMEOUT; if (sw == WAITFD_C && (pfd.revents & (POLLIN|POLLERR))) return IO_CLOSED; return IO_DONE; } #else #define WAITFD_R 1 #define WAITFD_W 2 #define WAITFD_C (WAITFD_R|WAITFD_W) int socket_waitfd(p_socket ps, int sw, p_timeout tm) { int ret; fd_set rfds, wfds, *rp, *wp; struct timeval tv, *tp; double t; if (*ps >= FD_SETSIZE) return EINVAL; if (timeout_iszero(tm)) return IO_TIMEOUT; /* optimize timeout == 0 case */ do { /* must set bits within loop, because select may have modifed them */ rp = wp = NULL; if (sw & WAITFD_R) { FD_ZERO(&rfds); FD_SET(*ps, &rfds); rp = &rfds; } if (sw & WAITFD_W) { FD_ZERO(&wfds); FD_SET(*ps, &wfds); wp = &wfds; } t = timeout_getretry(tm); tp = NULL; if (t >= 0.0) { tv.tv_sec = (int)t; tv.tv_usec = (int)((t-tv.tv_sec)*1.0e6); tp = &tv; } ret = select(*ps+1, rp, wp, NULL, tp); } while (ret == -1 && errno == EINTR); if (ret == -1) return errno; if (ret == 0) return IO_TIMEOUT; if (sw == WAITFD_C && FD_ISSET(*ps, &rfds)) return IO_CLOSED; return IO_DONE; } #endif /*-------------------------------------------------------------------------*\ * Initializes module \*-------------------------------------------------------------------------*/ int socket_open(void) { /* installs a handler to ignore sigpipe or it will crash us */ signal(SIGPIPE, SIG_IGN); return 1; } /*-------------------------------------------------------------------------*\ * Close module \*-------------------------------------------------------------------------*/ int socket_close(void) { return 1; } /*-------------------------------------------------------------------------*\ * Close and inutilize socket \*-------------------------------------------------------------------------*/ void socket_destroy(p_socket ps) { if (*ps != SOCKET_INVALID) { close(*ps); *ps = SOCKET_INVALID; } } /*-------------------------------------------------------------------------*\ * Select with timeout control \*-------------------------------------------------------------------------*/ int socket_select(t_socket n, fd_set *rfds, fd_set *wfds, fd_set *efds, p_timeout tm) { int ret; do { struct timeval tv; double t = timeout_getretry(tm); tv.tv_sec = (int) t; tv.tv_usec = (int) ((t - tv.tv_sec) * 1.0e6); /* timeout = 0 means no wait */ ret = select(n, rfds, wfds, efds, t >= 0.0 ? &tv: NULL); } while (ret < 0 && errno == EINTR); return ret; } /*-------------------------------------------------------------------------*\ * Creates and sets up a socket \*-------------------------------------------------------------------------*/ int socket_create(p_socket ps, int domain, int type, int protocol) { *ps = socket(domain, type, protocol); if (*ps != SOCKET_INVALID) return IO_DONE; else return errno; } /*-------------------------------------------------------------------------*\ * Binds or returns error message \*-------------------------------------------------------------------------*/ int socket_bind(p_socket ps, SA *addr, socklen_t len) { int err = IO_DONE; socket_setblocking(ps); if (bind(*ps, addr, len) < 0) err = errno; socket_setnonblocking(ps); return err; } /*-------------------------------------------------------------------------*\ * \*-------------------------------------------------------------------------*/ int socket_listen(p_socket ps, int backlog) { int err = IO_DONE; if (listen(*ps, backlog)) err = errno; return err; } /*-------------------------------------------------------------------------*\ * \*-------------------------------------------------------------------------*/ void socket_shutdown(p_socket ps, int how) { shutdown(*ps, how); } /*-------------------------------------------------------------------------*\ * Connects or returns error message \*-------------------------------------------------------------------------*/ int socket_connect(p_socket ps, SA *addr, socklen_t len, p_timeout tm) { int err; /* avoid calling on closed sockets */ if (*ps == SOCKET_INVALID) return IO_CLOSED; /* call connect until done or failed without being interrupted */ do if (connect(*ps, addr, len) == 0) return IO_DONE; while ((err = errno) == EINTR); /* if connection failed immediately, return error code */ if (err != EINPROGRESS && err != EAGAIN) return err; /* zero timeout case optimization */ if (timeout_iszero(tm)) return IO_TIMEOUT; /* wait until we have the result of the connection attempt or timeout */ err = socket_waitfd(ps, WAITFD_C, tm); if (err == IO_CLOSED) { if (recv(*ps, (char *) &err, 0, 0) == 0) return IO_DONE; else return errno; } else return err; } /*-------------------------------------------------------------------------*\ * Accept with timeout \*-------------------------------------------------------------------------*/ int socket_accept(p_socket ps, p_socket pa, SA *addr, socklen_t *len, p_timeout tm) { if (*ps == SOCKET_INVALID) return IO_CLOSED; for ( ;; ) { int err; if ((*pa = accept(*ps, addr, len)) != SOCKET_INVALID) return IO_DONE; err = errno; if (err == EINTR) continue; if (err != EAGAIN && err != ECONNABORTED) return err; if ((err = socket_waitfd(ps, WAITFD_R, tm)) != IO_DONE) return err; } /* can't reach here */ return IO_UNKNOWN; } /*-------------------------------------------------------------------------*\ * Send with timeout \*-------------------------------------------------------------------------*/ int socket_send(p_socket ps, const char *data, size_t count, size_t *sent, p_timeout tm) { int err; *sent = 0; /* avoid making system calls on closed sockets */ if (*ps == SOCKET_INVALID) return IO_CLOSED; /* loop until we send something or we give up on error */ for ( ;; ) { long put = (long) send(*ps, data, count, 0); /* if we sent anything, we are done */ if (put >= 0) { *sent = put; return IO_DONE; } err = errno; /* EPIPE means the connection was closed */ if (err == EPIPE) return IO_CLOSED; /* EPROTOTYPE means the connection is being closed (on Yosemite!)*/ if (err == EPROTOTYPE) continue; /* we call was interrupted, just try again */ if (err == EINTR) continue; /* if failed fatal reason, report error */ if (err != EAGAIN) return err; /* wait until we can send something or we timeout */ if ((err = socket_waitfd(ps, WAITFD_W, tm)) != IO_DONE) return err; } /* can't reach here */ return IO_UNKNOWN; } /*-------------------------------------------------------------------------*\ * Sendto with timeout \*-------------------------------------------------------------------------*/ int socket_sendto(p_socket ps, const char *data, size_t count, size_t *sent, SA *addr, socklen_t len, p_timeout tm) { int err; *sent = 0; if (*ps == SOCKET_INVALID) return IO_CLOSED; for ( ;; ) { long put = (long) sendto(*ps, data, count, 0, addr, len); if (put >= 0) { *sent = put; return IO_DONE; } err = errno; if (err == EPIPE) return IO_CLOSED; if (err == EPROTOTYPE) continue; if (err == EINTR) continue; if (err != EAGAIN) return err; if ((err = socket_waitfd(ps, WAITFD_W, tm)) != IO_DONE) return err; } return IO_UNKNOWN; } /*-------------------------------------------------------------------------*\ * Receive with timeout \*-------------------------------------------------------------------------*/ int socket_recv(p_socket ps, char *data, size_t count, size_t *got, p_timeout tm) { int err; *got = 0; if (*ps == SOCKET_INVALID) return IO_CLOSED; for ( ;; ) { long taken = (long) recv(*ps, data, count, 0); if (taken > 0) { *got = taken; return IO_DONE; } err = errno; if (taken == 0) return IO_CLOSED; if (err == EINTR) continue; if (err != EAGAIN) return err; if ((err = socket_waitfd(ps, WAITFD_R, tm)) != IO_DONE) return err; } return IO_UNKNOWN; } /*-------------------------------------------------------------------------*\ * Recvfrom with timeout \*-------------------------------------------------------------------------*/ int socket_recvfrom(p_socket ps, char *data, size_t count, size_t *got, SA *addr, socklen_t *len, p_timeout tm) { int err; *got = 0; if (*ps == SOCKET_INVALID) return IO_CLOSED; for ( ;; ) { long taken = (long) recvfrom(*ps, data, count, 0, addr, len); if (taken > 0) { *got = taken; return IO_DONE; } err = errno; if (taken == 0) return IO_CLOSED; if (err == EINTR) continue; if (err != EAGAIN) return err; if ((err = socket_waitfd(ps, WAITFD_R, tm)) != IO_DONE) return err; } return IO_UNKNOWN; } /*-------------------------------------------------------------------------*\ * Write with timeout * * socket_read and socket_write are cut-n-paste of socket_send and socket_recv, * with send/recv replaced with write/read. We can't just use write/read * in the socket version, because behaviour when size is zero is different. \*-------------------------------------------------------------------------*/ int socket_write(p_socket ps, const char *data, size_t count, size_t *sent, p_timeout tm) { int err; *sent = 0; /* avoid making system calls on closed sockets */ if (*ps == SOCKET_INVALID) return IO_CLOSED; /* loop until we send something or we give up on error */ for ( ;; ) { long put = (long) write(*ps, data, count); /* if we sent anything, we are done */ if (put >= 0) { *sent = put; return IO_DONE; } err = errno; /* EPIPE means the connection was closed */ if (err == EPIPE) return IO_CLOSED; /* EPROTOTYPE means the connection is being closed (on Yosemite!)*/ if (err == EPROTOTYPE) continue; /* we call was interrupted, just try again */ if (err == EINTR) continue; /* if failed fatal reason, report error */ if (err != EAGAIN) return err; /* wait until we can send something or we timeout */ if ((err = socket_waitfd(ps, WAITFD_W, tm)) != IO_DONE) return err; } /* can't reach here */ return IO_UNKNOWN; } /*-------------------------------------------------------------------------*\ * Read with timeout * See note for socket_write \*-------------------------------------------------------------------------*/ int socket_read(p_socket ps, char *data, size_t count, size_t *got, p_timeout tm) { int err; *got = 0; if (*ps == SOCKET_INVALID) return IO_CLOSED; for ( ;; ) { long taken = (long) read(*ps, data, count); if (taken > 0) { *got = taken; return IO_DONE; } err = errno; if (taken == 0) return IO_CLOSED; if (err == EINTR) continue; if (err != EAGAIN) return err; if ((err = socket_waitfd(ps, WAITFD_R, tm)) != IO_DONE) return err; } return IO_UNKNOWN; } /*-------------------------------------------------------------------------*\ * Put socket into blocking mode \*-------------------------------------------------------------------------*/ void socket_setblocking(p_socket ps) { int flags = fcntl(*ps, F_GETFL, 0); flags &= (~(O_NONBLOCK)); fcntl(*ps, F_SETFL, flags); } /*-------------------------------------------------------------------------*\ * Put socket into non-blocking mode \*-------------------------------------------------------------------------*/ void socket_setnonblocking(p_socket ps) { int flags = fcntl(*ps, F_GETFL, 0); flags |= O_NONBLOCK; fcntl(*ps, F_SETFL, flags); } /*-------------------------------------------------------------------------*\ * DNS helpers \*-------------------------------------------------------------------------*/ int socket_gethostbyaddr(const char *addr, socklen_t len, struct hostent **hp) { *hp = gethostbyaddr(addr, len, AF_INET); if (*hp) return IO_DONE; else if (h_errno) return h_errno; else if (errno) return errno; else return IO_UNKNOWN; } int socket_gethostbyname(const char *addr, struct hostent **hp) { *hp = gethostbyname(addr); if (*hp) return IO_DONE; else if (h_errno) return h_errno; else if (errno) return errno; else return IO_UNKNOWN; } /*-------------------------------------------------------------------------*\ * Error translation functions * Make sure important error messages are standard \*-------------------------------------------------------------------------*/ const char *socket_hoststrerror(int err) { if (err <= 0) return io_strerror(err); switch (err) { case HOST_NOT_FOUND: return PIE_HOST_NOT_FOUND; default: return hstrerror(err); } } const char *socket_strerror(int err) { if (err <= 0) return io_strerror(err); switch (err) { case EADDRINUSE: return PIE_ADDRINUSE; case EISCONN: return PIE_ISCONN; case EACCES: return PIE_ACCESS; case ECONNREFUSED: return PIE_CONNREFUSED; case ECONNABORTED: return PIE_CONNABORTED; case ECONNRESET: return PIE_CONNRESET; case ETIMEDOUT: return PIE_TIMEDOUT; default: { return strerror(err); } } } const char *socket_ioerror(p_socket ps, int err) { (void) ps; return socket_strerror(err); } const char *socket_gaistrerror(int err) { if (err == 0) return NULL; switch (err) { case EAI_AGAIN: return PIE_AGAIN; case EAI_BADFLAGS: return PIE_BADFLAGS; #ifdef EAI_BADHINTS case EAI_BADHINTS: return PIE_BADHINTS; #endif case EAI_FAIL: return PIE_FAIL; case EAI_FAMILY: return PIE_FAMILY; case EAI_MEMORY: return PIE_MEMORY; case EAI_NONAME: return PIE_NONAME; #ifdef EAI_OVERFLOW case EAI_OVERFLOW: return PIE_OVERFLOW; #endif #ifdef EAI_PROTOCOL case EAI_PROTOCOL: return PIE_PROTOCOL; #endif case EAI_SERVICE: return PIE_SERVICE; case EAI_SOCKTYPE: return PIE_SOCKTYPE; case EAI_SYSTEM: return strerror(errno); default: return LUA_GAI_STRERROR(err); } } ================================================ FILE: src/libraries/luasocket/libluasocket/usocket.h ================================================ #ifndef USOCKET_H #define USOCKET_H /*=========================================================================*\ * Socket compatibilization module for Unix * LuaSocket toolkit \*=========================================================================*/ /*=========================================================================*\ * BSD include files \*=========================================================================*/ /* error codes */ #include /* close function */ #include /* fnctnl function and associated constants */ #include /* struct sockaddr */ #include /* socket function */ #include /* struct timeval */ #include /* gethostbyname and gethostbyaddr functions */ #include /* sigpipe handling */ #include /* IP stuff*/ #include #include /* TCP options (nagle algorithm disable) */ #include #include #ifndef SO_REUSEPORT #define SO_REUSEPORT SO_REUSEADDR #endif /* Some platforms use IPV6_JOIN_GROUP instead if * IPV6_ADD_MEMBERSHIP. The semantics are same, though. */ #ifndef IPV6_ADD_MEMBERSHIP #ifdef IPV6_JOIN_GROUP #define IPV6_ADD_MEMBERSHIP IPV6_JOIN_GROUP #endif /* IPV6_JOIN_GROUP */ #endif /* !IPV6_ADD_MEMBERSHIP */ /* Same with IPV6_DROP_MEMBERSHIP / IPV6_LEAVE_GROUP. */ #ifndef IPV6_DROP_MEMBERSHIP #ifdef IPV6_LEAVE_GROUP #define IPV6_DROP_MEMBERSHIP IPV6_LEAVE_GROUP #endif /* IPV6_LEAVE_GROUP */ #endif /* !IPV6_DROP_MEMBERSHIP */ typedef int t_socket; typedef t_socket *p_socket; typedef struct sockaddr_storage t_sockaddr_storage; #define SOCKET_INVALID (-1) #endif /* USOCKET_H */ ================================================ FILE: src/libraries/luasocket/libluasocket/wsocket.c ================================================ /*=========================================================================*\ * Socket compatibilization module for Win32 * LuaSocket toolkit * * The penalty of calling select to avoid busy-wait is only paid when * the I/O call fail in the first place. \*=========================================================================*/ #include "luasocket.h" #include #include "socket.h" #include "pierror.h" /* WinSock doesn't have a strerror... */ static const char *wstrerror(int err); /*-------------------------------------------------------------------------*\ * Initializes module \*-------------------------------------------------------------------------*/ int socket_open(void) { WSADATA wsaData; WORD wVersionRequested = MAKEWORD(2, 0); int err = WSAStartup(wVersionRequested, &wsaData ); if (err != 0) return 0; if ((LOBYTE(wsaData.wVersion) != 2 || HIBYTE(wsaData.wVersion) != 0) && (LOBYTE(wsaData.wVersion) != 1 || HIBYTE(wsaData.wVersion) != 1)) { WSACleanup(); return 0; } return 1; } /*-------------------------------------------------------------------------*\ * Close module \*-------------------------------------------------------------------------*/ int socket_close(void) { WSACleanup(); return 1; } /*-------------------------------------------------------------------------*\ * Wait for readable/writable/connected socket with timeout \*-------------------------------------------------------------------------*/ #define WAITFD_R 1 #define WAITFD_W 2 #define WAITFD_E 4 #define WAITFD_C (WAITFD_E|WAITFD_W) int socket_waitfd(p_socket ps, int sw, p_timeout tm) { int ret; fd_set rfds, wfds, efds, *rp = NULL, *wp = NULL, *ep = NULL; struct timeval tv, *tp = NULL; double t; if (timeout_iszero(tm)) return IO_TIMEOUT; /* optimize timeout == 0 case */ if (sw & WAITFD_R) { FD_ZERO(&rfds); FD_SET(*ps, &rfds); rp = &rfds; } if (sw & WAITFD_W) { FD_ZERO(&wfds); FD_SET(*ps, &wfds); wp = &wfds; } if (sw & WAITFD_C) { FD_ZERO(&efds); FD_SET(*ps, &efds); ep = &efds; } if ((t = timeout_get(tm)) >= 0.0) { tv.tv_sec = (int) t; tv.tv_usec = (int) ((t-tv.tv_sec)*1.0e6); tp = &tv; } ret = select(0, rp, wp, ep, tp); if (ret == -1) return WSAGetLastError(); if (ret == 0) return IO_TIMEOUT; if (sw == WAITFD_C && FD_ISSET(*ps, &efds)) return IO_CLOSED; return IO_DONE; } /*-------------------------------------------------------------------------*\ * Select with int timeout in ms \*-------------------------------------------------------------------------*/ int socket_select(t_socket n, fd_set *rfds, fd_set *wfds, fd_set *efds, p_timeout tm) { struct timeval tv; double t = timeout_get(tm); tv.tv_sec = (int) t; tv.tv_usec = (int) ((t - tv.tv_sec) * 1.0e6); if (n <= 0) { Sleep((DWORD) (1000*t)); return 0; } else return select(0, rfds, wfds, efds, t >= 0.0? &tv: NULL); } /*-------------------------------------------------------------------------*\ * Close and inutilize socket \*-------------------------------------------------------------------------*/ void socket_destroy(p_socket ps) { if (*ps != SOCKET_INVALID) { socket_setblocking(ps); /* close can take a long time on WIN32 */ closesocket(*ps); *ps = SOCKET_INVALID; } } /*-------------------------------------------------------------------------*\ * \*-------------------------------------------------------------------------*/ void socket_shutdown(p_socket ps, int how) { socket_setblocking(ps); shutdown(*ps, how); socket_setnonblocking(ps); } /*-------------------------------------------------------------------------*\ * Creates and sets up a socket \*-------------------------------------------------------------------------*/ int socket_create(p_socket ps, int domain, int type, int protocol) { *ps = socket(domain, type, protocol); if (*ps != SOCKET_INVALID) return IO_DONE; else return WSAGetLastError(); } /*-------------------------------------------------------------------------*\ * Connects or returns error message \*-------------------------------------------------------------------------*/ int socket_connect(p_socket ps, SA *addr, socklen_t len, p_timeout tm) { int err; /* don't call on closed socket */ if (*ps == SOCKET_INVALID) return IO_CLOSED; /* ask system to connect */ if (connect(*ps, addr, len) == 0) return IO_DONE; /* make sure the system is trying to connect */ err = WSAGetLastError(); if (err != WSAEWOULDBLOCK && err != WSAEINPROGRESS) return err; /* zero timeout case optimization */ if (timeout_iszero(tm)) return IO_TIMEOUT; /* we wait until something happens */ err = socket_waitfd(ps, WAITFD_C, tm); if (err == IO_CLOSED) { int elen = sizeof(err); /* give windows time to set the error (yes, disgusting) */ Sleep(10); /* find out why we failed */ getsockopt(*ps, SOL_SOCKET, SO_ERROR, (char *)&err, &elen); /* we KNOW there was an error. if 'why' is 0, we will return * "unknown error", but it's not really our fault */ return err > 0? err: IO_UNKNOWN; } else return err; } /*-------------------------------------------------------------------------*\ * Binds or returns error message \*-------------------------------------------------------------------------*/ int socket_bind(p_socket ps, SA *addr, socklen_t len) { int err = IO_DONE; socket_setblocking(ps); if (bind(*ps, addr, len) < 0) err = WSAGetLastError(); socket_setnonblocking(ps); return err; } /*-------------------------------------------------------------------------*\ * \*-------------------------------------------------------------------------*/ int socket_listen(p_socket ps, int backlog) { int err = IO_DONE; socket_setblocking(ps); if (listen(*ps, backlog) < 0) err = WSAGetLastError(); socket_setnonblocking(ps); return err; } /*-------------------------------------------------------------------------*\ * Accept with timeout \*-------------------------------------------------------------------------*/ int socket_accept(p_socket ps, p_socket pa, SA *addr, socklen_t *len, p_timeout tm) { if (*ps == SOCKET_INVALID) return IO_CLOSED; for ( ;; ) { int err; /* try to get client socket */ if ((*pa = accept(*ps, addr, len)) != SOCKET_INVALID) return IO_DONE; /* find out why we failed */ err = WSAGetLastError(); /* if we failed because there was no connectoin, keep trying */ if (err != WSAEWOULDBLOCK && err != WSAECONNABORTED) return err; /* call select to avoid busy wait */ if ((err = socket_waitfd(ps, WAITFD_R, tm)) != IO_DONE) return err; } } /*-------------------------------------------------------------------------*\ * Send with timeout * On windows, if you try to send 10MB, the OS will buffer EVERYTHING * this can take an awful lot of time and we will end up blocked. * Therefore, whoever calls this function should not pass a huge buffer. \*-------------------------------------------------------------------------*/ int socket_send(p_socket ps, const char *data, size_t count, size_t *sent, p_timeout tm) { int err; *sent = 0; /* avoid making system calls on closed sockets */ if (*ps == SOCKET_INVALID) return IO_CLOSED; /* loop until we send something or we give up on error */ for ( ;; ) { /* try to send something */ int put = send(*ps, data, (int) count, 0); /* if we sent something, we are done */ if (put > 0) { *sent = put; return IO_DONE; } /* deal with failure */ err = WSAGetLastError(); /* we can only proceed if there was no serious error */ if (err != WSAEWOULDBLOCK) return err; /* avoid busy wait */ if ((err = socket_waitfd(ps, WAITFD_W, tm)) != IO_DONE) return err; } } /*-------------------------------------------------------------------------*\ * Sendto with timeout \*-------------------------------------------------------------------------*/ int socket_sendto(p_socket ps, const char *data, size_t count, size_t *sent, SA *addr, socklen_t len, p_timeout tm) { int err; *sent = 0; if (*ps == SOCKET_INVALID) return IO_CLOSED; for ( ;; ) { int put = sendto(*ps, data, (int) count, 0, addr, len); if (put > 0) { *sent = put; return IO_DONE; } err = WSAGetLastError(); if (err != WSAEWOULDBLOCK) return err; if ((err = socket_waitfd(ps, WAITFD_W, tm)) != IO_DONE) return err; } } /*-------------------------------------------------------------------------*\ * Receive with timeout \*-------------------------------------------------------------------------*/ int socket_recv(p_socket ps, char *data, size_t count, size_t *got, p_timeout tm) { int err, prev = IO_DONE; *got = 0; if (*ps == SOCKET_INVALID) return IO_CLOSED; for ( ;; ) { int taken = recv(*ps, data, (int) count, 0); if (taken > 0) { *got = taken; return IO_DONE; } if (taken == 0) return IO_CLOSED; err = WSAGetLastError(); /* On UDP, a connreset simply means the previous send failed. * So we try again. * On TCP, it means our socket is now useless, so the error passes. * (We will loop again, exiting because the same error will happen) */ if (err != WSAEWOULDBLOCK) { if (err != WSAECONNRESET || prev == WSAECONNRESET) return err; prev = err; continue; } if ((err = socket_waitfd(ps, WAITFD_R, tm)) != IO_DONE) return err; } } /*-------------------------------------------------------------------------*\ * Recvfrom with timeout \*-------------------------------------------------------------------------*/ int socket_recvfrom(p_socket ps, char *data, size_t count, size_t *got, SA *addr, socklen_t *len, p_timeout tm) { int err, prev = IO_DONE; *got = 0; if (*ps == SOCKET_INVALID) return IO_CLOSED; for ( ;; ) { int taken = recvfrom(*ps, data, (int) count, 0, addr, len); if (taken > 0) { *got = taken; return IO_DONE; } if (taken == 0) return IO_CLOSED; err = WSAGetLastError(); /* On UDP, a connreset simply means the previous send failed. * So we try again. * On TCP, it means our socket is now useless, so the error passes. * (We will loop again, exiting because the same error will happen) */ if (err != WSAEWOULDBLOCK) { if (err != WSAECONNRESET || prev == WSAECONNRESET) return err; prev = err; continue; } if ((err = socket_waitfd(ps, WAITFD_R, tm)) != IO_DONE) return err; } } /*-------------------------------------------------------------------------*\ * Put socket into blocking mode \*-------------------------------------------------------------------------*/ void socket_setblocking(p_socket ps) { u_long argp = 0; ioctlsocket(*ps, FIONBIO, &argp); } /*-------------------------------------------------------------------------*\ * Put socket into non-blocking mode \*-------------------------------------------------------------------------*/ void socket_setnonblocking(p_socket ps) { u_long argp = 1; ioctlsocket(*ps, FIONBIO, &argp); } /*-------------------------------------------------------------------------*\ * DNS helpers \*-------------------------------------------------------------------------*/ int socket_gethostbyaddr(const char *addr, socklen_t len, struct hostent **hp) { *hp = gethostbyaddr(addr, len, AF_INET); if (*hp) return IO_DONE; else return WSAGetLastError(); } int socket_gethostbyname(const char *addr, struct hostent **hp) { *hp = gethostbyname(addr); if (*hp) return IO_DONE; else return WSAGetLastError(); } /*-------------------------------------------------------------------------*\ * Error translation functions \*-------------------------------------------------------------------------*/ const char *socket_hoststrerror(int err) { if (err <= 0) return io_strerror(err); switch (err) { case WSAHOST_NOT_FOUND: return PIE_HOST_NOT_FOUND; default: return wstrerror(err); } } const char *socket_strerror(int err) { if (err <= 0) return io_strerror(err); switch (err) { case WSAEADDRINUSE: return PIE_ADDRINUSE; case WSAECONNREFUSED : return PIE_CONNREFUSED; case WSAEISCONN: return PIE_ISCONN; case WSAEACCES: return PIE_ACCESS; case WSAECONNABORTED: return PIE_CONNABORTED; case WSAECONNRESET: return PIE_CONNRESET; case WSAETIMEDOUT: return PIE_TIMEDOUT; default: return wstrerror(err); } } const char *socket_ioerror(p_socket ps, int err) { (void) ps; return socket_strerror(err); } static const char *wstrerror(int err) { switch (err) { case WSAEINTR: return "Interrupted function call"; case WSAEACCES: return PIE_ACCESS; /* "Permission denied"; */ case WSAEFAULT: return "Bad address"; case WSAEINVAL: return "Invalid argument"; case WSAEMFILE: return "Too many open files"; case WSAEWOULDBLOCK: return "Resource temporarily unavailable"; case WSAEINPROGRESS: return "Operation now in progress"; case WSAEALREADY: return "Operation already in progress"; case WSAENOTSOCK: return "Socket operation on nonsocket"; case WSAEDESTADDRREQ: return "Destination address required"; case WSAEMSGSIZE: return "Message too long"; case WSAEPROTOTYPE: return "Protocol wrong type for socket"; case WSAENOPROTOOPT: return "Bad protocol option"; case WSAEPROTONOSUPPORT: return "Protocol not supported"; case WSAESOCKTNOSUPPORT: return PIE_SOCKTYPE; /* "Socket type not supported"; */ case WSAEOPNOTSUPP: return "Operation not supported"; case WSAEPFNOSUPPORT: return "Protocol family not supported"; case WSAEAFNOSUPPORT: return PIE_FAMILY; /* "Address family not supported by protocol family"; */ case WSAEADDRINUSE: return PIE_ADDRINUSE; /* "Address already in use"; */ case WSAEADDRNOTAVAIL: return "Cannot assign requested address"; case WSAENETDOWN: return "Network is down"; case WSAENETUNREACH: return "Network is unreachable"; case WSAENETRESET: return "Network dropped connection on reset"; case WSAECONNABORTED: return "Software caused connection abort"; case WSAECONNRESET: return PIE_CONNRESET; /* "Connection reset by peer"; */ case WSAENOBUFS: return "No buffer space available"; case WSAEISCONN: return PIE_ISCONN; /* "Socket is already connected"; */ case WSAENOTCONN: return "Socket is not connected"; case WSAESHUTDOWN: return "Cannot send after socket shutdown"; case WSAETIMEDOUT: return PIE_TIMEDOUT; /* "Connection timed out"; */ case WSAECONNREFUSED: return PIE_CONNREFUSED; /* "Connection refused"; */ case WSAEHOSTDOWN: return "Host is down"; case WSAEHOSTUNREACH: return "No route to host"; case WSAEPROCLIM: return "Too many processes"; case WSASYSNOTREADY: return "Network subsystem is unavailable"; case WSAVERNOTSUPPORTED: return "Winsock.dll version out of range"; case WSANOTINITIALISED: return "Successful WSAStartup not yet performed"; case WSAEDISCON: return "Graceful shutdown in progress"; case WSAHOST_NOT_FOUND: return PIE_HOST_NOT_FOUND; /* "Host not found"; */ case WSATRY_AGAIN: return "Nonauthoritative host not found"; case WSANO_RECOVERY: return PIE_FAIL; /* "Nonrecoverable name lookup error"; */ case WSANO_DATA: return "Valid name, no data record of requested type"; default: return "Unknown error"; } } const char *socket_gaistrerror(int err) { if (err == 0) return NULL; switch (err) { case EAI_AGAIN: return PIE_AGAIN; case EAI_BADFLAGS: return PIE_BADFLAGS; #ifdef EAI_BADHINTS case EAI_BADHINTS: return PIE_BADHINTS; #endif case EAI_FAIL: return PIE_FAIL; case EAI_FAMILY: return PIE_FAMILY; case EAI_MEMORY: return PIE_MEMORY; case EAI_NONAME: return PIE_NONAME; #ifdef EAI_OVERFLOW case EAI_OVERFLOW: return PIE_OVERFLOW; #endif #ifdef EAI_PROTOCOL case EAI_PROTOCOL: return PIE_PROTOCOL; #endif case EAI_SERVICE: return PIE_SERVICE; case EAI_SOCKTYPE: return PIE_SOCKTYPE; #ifdef EAI_SYSTEM case EAI_SYSTEM: return strerror(errno); #endif default: return LUA_GAI_STRERROR(err); } } ================================================ FILE: src/libraries/luasocket/libluasocket/wsocket.h ================================================ #ifndef WSOCKET_H #define WSOCKET_H /*=========================================================================*\ * Socket compatibilization module for Win32 * LuaSocket toolkit \*=========================================================================*/ /*=========================================================================*\ * WinSock include files \*=========================================================================*/ #include #include typedef int socklen_t; typedef SOCKADDR_STORAGE t_sockaddr_storage; typedef SOCKET t_socket; typedef t_socket *p_socket; #ifndef IPV6_V6ONLY #define IPV6_V6ONLY 27 #endif #define SOCKET_INVALID (INVALID_SOCKET) #ifndef SO_REUSEPORT #define SO_REUSEPORT SO_REUSEADDR #endif #ifndef AI_NUMERICSERV #define AI_NUMERICSERV (0) #endif #endif /* WSOCKET_H */ ================================================ FILE: src/libraries/luasocket/luasocket.cpp ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ #include "luasocket.h" // LuaSocket extern "C" { #include "libluasocket/luasocket.h" #include "libluasocket/mime.h" #include "libluasocket/unix.h" } // Lua files #include "libluasocket/ftp.lua.h" #include "libluasocket/headers.lua.h" #include "libluasocket/http.lua.h" #include "libluasocket/ltn12.lua.h" #include "libluasocket/mbox.lua.h" #include "libluasocket/mime.lua.h" #include "libluasocket/smtp.lua.h" #include "libluasocket/socket.lua.h" #include "libluasocket/tp.lua.h" #include "libluasocket/url.lua.h" static void preload(lua_State* L, const char* name, lua_CFunction func) { lua_getglobal(L, "package"); lua_getfield(L, -1, "preload"); lua_pushcfunction(L, func); lua_setfield(L, -2, name); lua_pop(L, 2); } static void preload(lua_State *L, const char *name, const char *chunkname, const void *lua, size_t size) { if (luaL_loadbuffer(L, (const char *) lua, size, name) != 0) { luaL_loadstring(L, "local name, msg = ... return function() error(name..\": \"..msg) end"); lua_pushstring(L, name); lua_pushvalue(L, -3); // Before: // -1: error message // -2: module name // -3: loadstring function // -4: error message lua_call(L, 2, 1); // After: // -1: function // -2: error message lua_remove(L, -2); } lua_getglobal(L, "package"); lua_getfield(L, -1, "preload"); lua_pushvalue(L, -3); lua_setfield(L, -2, name); lua_pop(L, 3); } namespace love { namespace luasocket { int preload(lua_State * L) { // Preload code from LuaSocket. preload(L, "socket.core", luaopen_socket_core); preload(L, "socket.unix", luaopen_socket_unix); preload(L, "mime.core", luaopen_mime_core); preload(L, "socket", "=[socket \"socket.lua\"]", socket_lua, sizeof(socket_lua)); preload(L, "socket.ftp", "=[socket \"ftp.lua\"]", ftp_lua, sizeof(ftp_lua)); preload(L, "socket.http", "=[socket \"http.lua\"]", http_lua, sizeof(http_lua)); preload(L, "ltn12", "=[socket \"ltn12.lua\"]", ltn12_lua, sizeof(ltn12_lua)); preload(L, "mime", "=[socket \"mime.lua\"]", mime_lua, sizeof(mime_lua)); preload(L, "socket.smtp", "=[socket \"smtp.lua\"]", smtp_lua, sizeof(smtp_lua)); preload(L, "socket.tp", "=[socket \"tp.lua\"]", tp_lua, sizeof(tp_lua)); preload(L, "socket.url", "=[socket \"url.lua\"]", url_lua, sizeof(url_lua)); preload(L, "socket.headers", "=[socket \"headers.lua\"]", headers_lua, sizeof(headers_lua)); preload(L, "mbox", "=[socket \"mbox.lua\"]", mbox_lua, sizeof(mbox_lua)); // No need to register garbage collector function. return 0; } } // luasocket } // love ================================================ FILE: src/libraries/luasocket/luasocket.h ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ #ifndef LOVE_LUASOCKET_LUASOCKET_H #define LOVE_LUASOCKET_LUASOCKET_H // LOVE #include namespace love { namespace luasocket { int preload(lua_State * L); } // luasocket } // love #endif // LOVE_LUASOCKET_LUASOCKET_H ================================================ FILE: src/libraries/lz4/lz4.c ================================================ /* LZ4 - Fast LZ compression algorithm Copyright (C) 2011-2017, Yann Collet. BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php) Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. You can contact the author at : - LZ4 homepage : http://www.lz4.org - LZ4 source repository : https://github.com/lz4/lz4 */ /*-************************************ * Tuning parameters **************************************/ /* * LZ4_HEAPMODE : * Select how default compression functions will allocate memory for their hash table, * in memory stack (0:default, fastest), or in memory heap (1:requires malloc()). */ #ifndef LZ4_HEAPMODE # define LZ4_HEAPMODE 0 #endif /* * ACCELERATION_DEFAULT : * Select "acceleration" for LZ4_compress_fast() when parameter value <= 0 */ #define ACCELERATION_DEFAULT 1 /*-************************************ * CPU Feature Detection **************************************/ /* LZ4_FORCE_MEMORY_ACCESS * By default, access to unaligned memory is controlled by `memcpy()`, which is safe and portable. * Unfortunately, on some target/compiler combinations, the generated assembly is sub-optimal. * The below switch allow to select different access method for improved performance. * Method 0 (default) : use `memcpy()`. Safe and portable. * Method 1 : `__packed` statement. It depends on compiler extension (ie, not portable). * This method is safe if your compiler supports it, and *generally* as fast or faster than `memcpy`. * Method 2 : direct access. This method is portable but violate C standard. * It can generate buggy code on targets which assembly generation depends on alignment. * But in some circumstances, it's the only known way to get the most performance (ie GCC + ARMv6) * See https://fastcompression.blogspot.fr/2015/08/accessing-unaligned-memory.html for details. * Prefer these methods in priority order (0 > 1 > 2) */ #ifndef LZ4_FORCE_MEMORY_ACCESS /* can be defined externally */ # if defined(__GNUC__) && ( defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__) || defined(__ARM_ARCH_6T2__) ) # define LZ4_FORCE_MEMORY_ACCESS 2 # elif defined(__INTEL_COMPILER) || defined(__GNUC__) # define LZ4_FORCE_MEMORY_ACCESS 1 # endif #endif /* * LZ4_FORCE_SW_BITCOUNT * Define this parameter if your target system or compiler does not support hardware bit count */ #if defined(_MSC_VER) && defined(_WIN32_WCE) /* Visual Studio for Windows CE does not support Hardware bit count */ # define LZ4_FORCE_SW_BITCOUNT #endif /*-************************************ * Dependency **************************************/ #include "lz4.h" /* see also "memory routines" below */ /*-************************************ * Compiler Options **************************************/ #ifdef _MSC_VER /* Visual Studio */ # include # pragma warning(disable : 4127) /* disable: C4127: conditional expression is constant */ # pragma warning(disable : 4293) /* disable: C4293: too large shift (32-bits) */ #endif /* _MSC_VER */ #ifndef LZ4_FORCE_INLINE # ifdef _MSC_VER /* Visual Studio */ # define LZ4_FORCE_INLINE static __forceinline # else # if defined (__cplusplus) || defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 */ # ifdef __GNUC__ # define LZ4_FORCE_INLINE static inline __attribute__((always_inline)) # else # define LZ4_FORCE_INLINE static inline # endif # else # define LZ4_FORCE_INLINE static # endif /* __STDC_VERSION__ */ # endif /* _MSC_VER */ #endif /* LZ4_FORCE_INLINE */ /* LZ4_FORCE_O2_GCC_PPC64LE and LZ4_FORCE_O2_INLINE_GCC_PPC64LE * Gcc on ppc64le generates an unrolled SIMDized loop for LZ4_wildCopy, * together with a simple 8-byte copy loop as a fall-back path. * However, this optimization hurts the decompression speed by >30%, * because the execution does not go to the optimized loop * for typical compressible data, and all of the preamble checks * before going to the fall-back path become useless overhead. * This optimization happens only with the -O3 flag, and -O2 generates * a simple 8-byte copy loop. * With gcc on ppc64le, all of the LZ4_decompress_* and LZ4_wildCopy * functions are annotated with __attribute__((optimize("O2"))), * and also LZ4_wildCopy is forcibly inlined, so that the O2 attribute * of LZ4_wildCopy does not affect the compression speed. */ #if defined(__PPC64__) && defined(__LITTLE_ENDIAN__) && defined(__GNUC__) # define LZ4_FORCE_O2_GCC_PPC64LE __attribute__((optimize("O2"))) # define LZ4_FORCE_O2_INLINE_GCC_PPC64LE __attribute__((optimize("O2"))) LZ4_FORCE_INLINE #else # define LZ4_FORCE_O2_GCC_PPC64LE # define LZ4_FORCE_O2_INLINE_GCC_PPC64LE static #endif #if (defined(__GNUC__) && (__GNUC__ >= 3)) || (defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 800)) || defined(__clang__) # define expect(expr,value) (__builtin_expect ((expr),(value)) ) #else # define expect(expr,value) (expr) #endif #define likely(expr) expect((expr) != 0, 1) #define unlikely(expr) expect((expr) != 0, 0) /*-************************************ * Memory routines **************************************/ #include /* malloc, calloc, free */ #define ALLOCATOR(n,s) calloc(n,s) #define FREEMEM free #include /* memset, memcpy */ #define MEM_INIT memset /*-************************************ * Basic Types **************************************/ #if defined(__cplusplus) || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */) # include typedef uint8_t BYTE; typedef uint16_t U16; typedef uint32_t U32; typedef int32_t S32; typedef uint64_t U64; typedef uintptr_t uptrval; #else typedef unsigned char BYTE; typedef unsigned short U16; typedef unsigned int U32; typedef signed int S32; typedef unsigned long long U64; typedef size_t uptrval; /* generally true, except OpenVMS-64 */ #endif #if defined(__x86_64__) typedef U64 reg_t; /* 64-bits in x32 mode */ #else typedef size_t reg_t; /* 32-bits in x32 mode */ #endif /*-************************************ * Reading and writing into memory **************************************/ static unsigned LZ4_isLittleEndian(void) { const union { U32 u; BYTE c[4]; } one = { 1 }; /* don't use static : performance detrimental */ return one.c[0]; } #if defined(LZ4_FORCE_MEMORY_ACCESS) && (LZ4_FORCE_MEMORY_ACCESS==2) /* lie to the compiler about data alignment; use with caution */ static U16 LZ4_read16(const void* memPtr) { return *(const U16*) memPtr; } static U32 LZ4_read32(const void* memPtr) { return *(const U32*) memPtr; } static reg_t LZ4_read_ARCH(const void* memPtr) { return *(const reg_t*) memPtr; } static void LZ4_write16(void* memPtr, U16 value) { *(U16*)memPtr = value; } static void LZ4_write32(void* memPtr, U32 value) { *(U32*)memPtr = value; } #elif defined(LZ4_FORCE_MEMORY_ACCESS) && (LZ4_FORCE_MEMORY_ACCESS==1) /* __pack instructions are safer, but compiler specific, hence potentially problematic for some compilers */ /* currently only defined for gcc and icc */ typedef union { U16 u16; U32 u32; reg_t uArch; } __attribute__((packed)) unalign; static U16 LZ4_read16(const void* ptr) { return ((const unalign*)ptr)->u16; } static U32 LZ4_read32(const void* ptr) { return ((const unalign*)ptr)->u32; } static reg_t LZ4_read_ARCH(const void* ptr) { return ((const unalign*)ptr)->uArch; } static void LZ4_write16(void* memPtr, U16 value) { ((unalign*)memPtr)->u16 = value; } static void LZ4_write32(void* memPtr, U32 value) { ((unalign*)memPtr)->u32 = value; } #else /* safe and portable access through memcpy() */ static U16 LZ4_read16(const void* memPtr) { U16 val; memcpy(&val, memPtr, sizeof(val)); return val; } static U32 LZ4_read32(const void* memPtr) { U32 val; memcpy(&val, memPtr, sizeof(val)); return val; } static reg_t LZ4_read_ARCH(const void* memPtr) { reg_t val; memcpy(&val, memPtr, sizeof(val)); return val; } static void LZ4_write16(void* memPtr, U16 value) { memcpy(memPtr, &value, sizeof(value)); } static void LZ4_write32(void* memPtr, U32 value) { memcpy(memPtr, &value, sizeof(value)); } #endif /* LZ4_FORCE_MEMORY_ACCESS */ static U16 LZ4_readLE16(const void* memPtr) { if (LZ4_isLittleEndian()) { return LZ4_read16(memPtr); } else { const BYTE* p = (const BYTE*)memPtr; return (U16)((U16)p[0] + (p[1]<<8)); } } static void LZ4_writeLE16(void* memPtr, U16 value) { if (LZ4_isLittleEndian()) { LZ4_write16(memPtr, value); } else { BYTE* p = (BYTE*)memPtr; p[0] = (BYTE) value; p[1] = (BYTE)(value>>8); } } static void LZ4_copy8(void* dst, const void* src) { memcpy(dst,src,8); } /* customized variant of memcpy, which can overwrite up to 8 bytes beyond dstEnd */ LZ4_FORCE_O2_INLINE_GCC_PPC64LE void LZ4_wildCopy(void* dstPtr, const void* srcPtr, void* dstEnd) { BYTE* d = (BYTE*)dstPtr; const BYTE* s = (const BYTE*)srcPtr; BYTE* const e = (BYTE*)dstEnd; do { LZ4_copy8(d,s); d+=8; s+=8; } while (d=1) # include #else # ifndef assert # define assert(condition) ((void)0) # endif #endif #define LZ4_STATIC_ASSERT(c) { enum { LZ4_static_assert = 1/(int)(!!(c)) }; } /* use only *after* variable declarations */ #if defined(LZ4_DEBUG) && (LZ4_DEBUG>=2) # include static int g_debuglog_enable = 1; # define DEBUGLOG(l, ...) { \ if ((g_debuglog_enable) && (l<=LZ4_DEBUG)) { \ fprintf(stderr, __FILE__ ": "); \ fprintf(stderr, __VA_ARGS__); \ fprintf(stderr, " \n"); \ } } #else # define DEBUGLOG(l, ...) {} /* disabled */ #endif /*-************************************ * Common functions **************************************/ static unsigned LZ4_NbCommonBytes (reg_t val) { if (LZ4_isLittleEndian()) { if (sizeof(val)==8) { # if defined(_MSC_VER) && defined(_WIN64) && !defined(LZ4_FORCE_SW_BITCOUNT) unsigned long r = 0; _BitScanForward64( &r, (U64)val ); return (int)(r>>3); # elif (defined(__clang__) || (defined(__GNUC__) && (__GNUC__>=3))) && !defined(LZ4_FORCE_SW_BITCOUNT) return (__builtin_ctzll((U64)val) >> 3); # else static const int DeBruijnBytePos[64] = { 0, 0, 0, 0, 0, 1, 1, 2, 0, 3, 1, 3, 1, 4, 2, 7, 0, 2, 3, 6, 1, 5, 3, 5, 1, 3, 4, 4, 2, 5, 6, 7, 7, 0, 1, 2, 3, 3, 4, 6, 2, 6, 5, 5, 3, 4, 5, 6, 7, 1, 2, 4, 6, 4, 4, 5, 7, 2, 6, 5, 7, 6, 7, 7 }; return DeBruijnBytePos[((U64)((val & -(long long)val) * 0x0218A392CDABBD3FULL)) >> 58]; # endif } else /* 32 bits */ { # if defined(_MSC_VER) && !defined(LZ4_FORCE_SW_BITCOUNT) unsigned long r; _BitScanForward( &r, (U32)val ); return (int)(r>>3); # elif (defined(__clang__) || (defined(__GNUC__) && (__GNUC__>=3))) && !defined(LZ4_FORCE_SW_BITCOUNT) return (__builtin_ctz((U32)val) >> 3); # else static const int DeBruijnBytePos[32] = { 0, 0, 3, 0, 3, 1, 3, 0, 3, 2, 2, 1, 3, 2, 0, 1, 3, 3, 1, 2, 2, 2, 2, 0, 3, 1, 2, 0, 1, 0, 1, 1 }; return DeBruijnBytePos[((U32)((val & -(S32)val) * 0x077CB531U)) >> 27]; # endif } } else /* Big Endian CPU */ { if (sizeof(val)==8) { /* 64-bits */ # if defined(_MSC_VER) && defined(_WIN64) && !defined(LZ4_FORCE_SW_BITCOUNT) unsigned long r = 0; _BitScanReverse64( &r, val ); return (unsigned)(r>>3); # elif (defined(__clang__) || (defined(__GNUC__) && (__GNUC__>=3))) && !defined(LZ4_FORCE_SW_BITCOUNT) return (__builtin_clzll((U64)val) >> 3); # else static const U32 by32 = sizeof(val)*4; /* 32 on 64 bits (goal), 16 on 32 bits. Just to avoid some static analyzer complaining about shift by 32 on 32-bits target. Note that this code path is never triggered in 32-bits mode. */ unsigned r; if (!(val>>by32)) { r=4; } else { r=0; val>>=by32; } if (!(val>>16)) { r+=2; val>>=8; } else { val>>=24; } r += (!val); return r; # endif } else /* 32 bits */ { # if defined(_MSC_VER) && !defined(LZ4_FORCE_SW_BITCOUNT) unsigned long r = 0; _BitScanReverse( &r, (unsigned long)val ); return (unsigned)(r>>3); # elif (defined(__clang__) || (defined(__GNUC__) && (__GNUC__>=3))) && !defined(LZ4_FORCE_SW_BITCOUNT) return (__builtin_clz((U32)val) >> 3); # else unsigned r; if (!(val>>16)) { r=2; val>>=8; } else { r=0; val>>=24; } r += (!val); return r; # endif } } } #define STEPSIZE sizeof(reg_t) LZ4_FORCE_INLINE unsigned LZ4_count(const BYTE* pIn, const BYTE* pMatch, const BYTE* pInLimit) { const BYTE* const pStart = pIn; if (likely(pIn < pInLimit-(STEPSIZE-1))) { reg_t const diff = LZ4_read_ARCH(pMatch) ^ LZ4_read_ARCH(pIn); if (!diff) { pIn+=STEPSIZE; pMatch+=STEPSIZE; } else { return LZ4_NbCommonBytes(diff); } } while (likely(pIn < pInLimit-(STEPSIZE-1))) { reg_t const diff = LZ4_read_ARCH(pMatch) ^ LZ4_read_ARCH(pIn); if (!diff) { pIn+=STEPSIZE; pMatch+=STEPSIZE; continue; } pIn += LZ4_NbCommonBytes(diff); return (unsigned)(pIn - pStart); } if ((STEPSIZE==8) && (pIn<(pInLimit-3)) && (LZ4_read32(pMatch) == LZ4_read32(pIn))) { pIn+=4; pMatch+=4; } if ((pIn<(pInLimit-1)) && (LZ4_read16(pMatch) == LZ4_read16(pIn))) { pIn+=2; pMatch+=2; } if ((pIn compression run slower on incompressible data */ /*-************************************ * Local Structures and types **************************************/ typedef enum { notLimited = 0, limitedOutput = 1 } limitedOutput_directive; typedef enum { byPtr, byU32, byU16 } tableType_t; typedef enum { noDict = 0, withPrefix64k, usingExtDict } dict_directive; typedef enum { noDictIssue = 0, dictSmall } dictIssue_directive; typedef enum { endOnOutputSize = 0, endOnInputSize = 1 } endCondition_directive; typedef enum { full = 0, partial = 1 } earlyEnd_directive; /*-************************************ * Local Utils **************************************/ int LZ4_versionNumber (void) { return LZ4_VERSION_NUMBER; } const char* LZ4_versionString(void) { return LZ4_VERSION_STRING; } int LZ4_compressBound(int isize) { return LZ4_COMPRESSBOUND(isize); } int LZ4_sizeofState() { return LZ4_STREAMSIZE; } /*-****************************** * Compression functions ********************************/ static U32 LZ4_hash4(U32 sequence, tableType_t const tableType) { if (tableType == byU16) return ((sequence * 2654435761U) >> ((MINMATCH*8)-(LZ4_HASHLOG+1))); else return ((sequence * 2654435761U) >> ((MINMATCH*8)-LZ4_HASHLOG)); } static U32 LZ4_hash5(U64 sequence, tableType_t const tableType) { static const U64 prime5bytes = 889523592379ULL; static const U64 prime8bytes = 11400714785074694791ULL; const U32 hashLog = (tableType == byU16) ? LZ4_HASHLOG+1 : LZ4_HASHLOG; if (LZ4_isLittleEndian()) return (U32)(((sequence << 24) * prime5bytes) >> (64 - hashLog)); else return (U32)(((sequence >> 24) * prime8bytes) >> (64 - hashLog)); } LZ4_FORCE_INLINE U32 LZ4_hashPosition(const void* const p, tableType_t const tableType) { if ((sizeof(reg_t)==8) && (tableType != byU16)) return LZ4_hash5(LZ4_read_ARCH(p), tableType); return LZ4_hash4(LZ4_read32(p), tableType); } static void LZ4_putPositionOnHash(const BYTE* p, U32 h, void* tableBase, tableType_t const tableType, const BYTE* srcBase) { switch (tableType) { case byPtr: { const BYTE** hashTable = (const BYTE**)tableBase; hashTable[h] = p; return; } case byU32: { U32* hashTable = (U32*) tableBase; hashTable[h] = (U32)(p-srcBase); return; } case byU16: { U16* hashTable = (U16*) tableBase; hashTable[h] = (U16)(p-srcBase); return; } } } LZ4_FORCE_INLINE void LZ4_putPosition(const BYTE* p, void* tableBase, tableType_t tableType, const BYTE* srcBase) { U32 const h = LZ4_hashPosition(p, tableType); LZ4_putPositionOnHash(p, h, tableBase, tableType, srcBase); } static const BYTE* LZ4_getPositionOnHash(U32 h, void* tableBase, tableType_t tableType, const BYTE* srcBase) { if (tableType == byPtr) { const BYTE** hashTable = (const BYTE**) tableBase; return hashTable[h]; } if (tableType == byU32) { const U32* const hashTable = (U32*) tableBase; return hashTable[h] + srcBase; } { const U16* const hashTable = (U16*) tableBase; return hashTable[h] + srcBase; } /* default, to ensure a return */ } LZ4_FORCE_INLINE const BYTE* LZ4_getPosition(const BYTE* p, void* tableBase, tableType_t tableType, const BYTE* srcBase) { U32 const h = LZ4_hashPosition(p, tableType); return LZ4_getPositionOnHash(h, tableBase, tableType, srcBase); } /** LZ4_compress_generic() : inlined, to ensure branches are decided at compilation time */ LZ4_FORCE_INLINE int LZ4_compress_generic( LZ4_stream_t_internal* const cctx, const char* const source, char* const dest, const int inputSize, const int maxOutputSize, const limitedOutput_directive outputLimited, const tableType_t tableType, const dict_directive dict, const dictIssue_directive dictIssue, const U32 acceleration) { const BYTE* ip = (const BYTE*) source; const BYTE* base; const BYTE* lowLimit; const BYTE* const lowRefLimit = ip - cctx->dictSize; const BYTE* const dictionary = cctx->dictionary; const BYTE* const dictEnd = dictionary + cctx->dictSize; const ptrdiff_t dictDelta = dictEnd - (const BYTE*)source; const BYTE* anchor = (const BYTE*) source; const BYTE* const iend = ip + inputSize; const BYTE* const mflimit = iend - MFLIMIT; const BYTE* const matchlimit = iend - LASTLITERALS; BYTE* op = (BYTE*) dest; BYTE* const olimit = op + maxOutputSize; U32 forwardH; /* Init conditions */ if ((U32)inputSize > (U32)LZ4_MAX_INPUT_SIZE) return 0; /* Unsupported inputSize, too large (or negative) */ switch(dict) { case noDict: default: base = (const BYTE*)source; lowLimit = (const BYTE*)source; break; case withPrefix64k: base = (const BYTE*)source - cctx->currentOffset; lowLimit = (const BYTE*)source - cctx->dictSize; break; case usingExtDict: base = (const BYTE*)source - cctx->currentOffset; lowLimit = (const BYTE*)source; break; } if ((tableType == byU16) && (inputSize>=LZ4_64Klimit)) return 0; /* Size too large (not within 64K limit) */ if (inputSizehashTable, tableType, base); ip++; forwardH = LZ4_hashPosition(ip, tableType); /* Main Loop */ for ( ; ; ) { ptrdiff_t refDelta = 0; const BYTE* match; BYTE* token; /* Find a match */ { const BYTE* forwardIp = ip; unsigned step = 1; unsigned searchMatchNb = acceleration << LZ4_skipTrigger; do { U32 const h = forwardH; ip = forwardIp; forwardIp += step; step = (searchMatchNb++ >> LZ4_skipTrigger); if (unlikely(forwardIp > mflimit)) goto _last_literals; match = LZ4_getPositionOnHash(h, cctx->hashTable, tableType, base); if (dict==usingExtDict) { if (match < (const BYTE*)source) { refDelta = dictDelta; lowLimit = dictionary; } else { refDelta = 0; lowLimit = (const BYTE*)source; } } forwardH = LZ4_hashPosition(forwardIp, tableType); LZ4_putPositionOnHash(ip, h, cctx->hashTable, tableType, base); } while ( ((dictIssue==dictSmall) ? (match < lowRefLimit) : 0) || ((tableType==byU16) ? 0 : (match + MAX_DISTANCE < ip)) || (LZ4_read32(match+refDelta) != LZ4_read32(ip)) ); } /* Catch up */ while (((ip>anchor) & (match+refDelta > lowLimit)) && (unlikely(ip[-1]==match[refDelta-1]))) { ip--; match--; } /* Encode Literals */ { unsigned const litLength = (unsigned)(ip - anchor); token = op++; if ((outputLimited) && /* Check output buffer overflow */ (unlikely(op + litLength + (2 + 1 + LASTLITERALS) + (litLength/255) > olimit))) return 0; if (litLength >= RUN_MASK) { int len = (int)litLength-RUN_MASK; *token = (RUN_MASK<= 255 ; len-=255) *op++ = 255; *op++ = (BYTE)len; } else *token = (BYTE)(litLength< matchlimit) limit = matchlimit; matchCode = LZ4_count(ip+MINMATCH, match+MINMATCH, limit); ip += MINMATCH + matchCode; if (ip==limit) { unsigned const more = LZ4_count(ip, (const BYTE*)source, matchlimit); matchCode += more; ip += more; } } else { matchCode = LZ4_count(ip+MINMATCH, match+MINMATCH, matchlimit); ip += MINMATCH + matchCode; } if ( outputLimited && /* Check output buffer overflow */ (unlikely(op + (1 + LASTLITERALS) + (matchCode>>8) > olimit)) ) return 0; if (matchCode >= ML_MASK) { *token += ML_MASK; matchCode -= ML_MASK; LZ4_write32(op, 0xFFFFFFFF); while (matchCode >= 4*255) { op+=4; LZ4_write32(op, 0xFFFFFFFF); matchCode -= 4*255; } op += matchCode / 255; *op++ = (BYTE)(matchCode % 255); } else *token += (BYTE)(matchCode); } anchor = ip; /* Test end of chunk */ if (ip > mflimit) break; /* Fill table */ LZ4_putPosition(ip-2, cctx->hashTable, tableType, base); /* Test next position */ match = LZ4_getPosition(ip, cctx->hashTable, tableType, base); if (dict==usingExtDict) { if (match < (const BYTE*)source) { refDelta = dictDelta; lowLimit = dictionary; } else { refDelta = 0; lowLimit = (const BYTE*)source; } } LZ4_putPosition(ip, cctx->hashTable, tableType, base); if ( ((dictIssue==dictSmall) ? (match>=lowRefLimit) : 1) && (match+MAX_DISTANCE>=ip) && (LZ4_read32(match+refDelta)==LZ4_read32(ip)) ) { token=op++; *token=0; goto _next_match; } /* Prepare next loop */ forwardH = LZ4_hashPosition(++ip, tableType); } _last_literals: /* Encode Last Literals */ { size_t const lastRun = (size_t)(iend - anchor); if ( (outputLimited) && /* Check output buffer overflow */ ((op - (BYTE*)dest) + lastRun + 1 + ((lastRun+255-RUN_MASK)/255) > (U32)maxOutputSize) ) return 0; if (lastRun >= RUN_MASK) { size_t accumulator = lastRun - RUN_MASK; *op++ = RUN_MASK << ML_BITS; for(; accumulator >= 255 ; accumulator-=255) *op++ = 255; *op++ = (BYTE) accumulator; } else { *op++ = (BYTE)(lastRun<internal_donotuse; LZ4_resetStream((LZ4_stream_t*)state); if (acceleration < 1) acceleration = ACCELERATION_DEFAULT; if (maxOutputSize >= LZ4_compressBound(inputSize)) { if (inputSize < LZ4_64Klimit) return LZ4_compress_generic(ctx, source, dest, inputSize, 0, notLimited, byU16, noDict, noDictIssue, acceleration); else return LZ4_compress_generic(ctx, source, dest, inputSize, 0, notLimited, (sizeof(void*)==8) ? byU32 : byPtr, noDict, noDictIssue, acceleration); } else { if (inputSize < LZ4_64Klimit) return LZ4_compress_generic(ctx, source, dest, inputSize, maxOutputSize, limitedOutput, byU16, noDict, noDictIssue, acceleration); else return LZ4_compress_generic(ctx, source, dest, inputSize, maxOutputSize, limitedOutput, (sizeof(void*)==8) ? byU32 : byPtr, noDict, noDictIssue, acceleration); } } int LZ4_compress_fast(const char* source, char* dest, int inputSize, int maxOutputSize, int acceleration) { #if (LZ4_HEAPMODE) void* ctxPtr = ALLOCATOR(1, sizeof(LZ4_stream_t)); /* malloc-calloc always properly aligned */ #else LZ4_stream_t ctx; void* const ctxPtr = &ctx; #endif int const result = LZ4_compress_fast_extState(ctxPtr, source, dest, inputSize, maxOutputSize, acceleration); #if (LZ4_HEAPMODE) FREEMEM(ctxPtr); #endif return result; } int LZ4_compress_default(const char* source, char* dest, int inputSize, int maxOutputSize) { return LZ4_compress_fast(source, dest, inputSize, maxOutputSize, 1); } /* hidden debug function */ /* strangely enough, gcc generates faster code when this function is uncommented, even if unused */ int LZ4_compress_fast_force(const char* source, char* dest, int inputSize, int maxOutputSize, int acceleration) { LZ4_stream_t ctx; LZ4_resetStream(&ctx); if (inputSize < LZ4_64Klimit) return LZ4_compress_generic(&ctx.internal_donotuse, source, dest, inputSize, maxOutputSize, limitedOutput, byU16, noDict, noDictIssue, acceleration); else return LZ4_compress_generic(&ctx.internal_donotuse, source, dest, inputSize, maxOutputSize, limitedOutput, sizeof(void*)==8 ? byU32 : byPtr, noDict, noDictIssue, acceleration); } /*-****************************** * *_destSize() variant ********************************/ static int LZ4_compress_destSize_generic( LZ4_stream_t_internal* const ctx, const char* const src, char* const dst, int* const srcSizePtr, const int targetDstSize, const tableType_t tableType) { const BYTE* ip = (const BYTE*) src; const BYTE* base = (const BYTE*) src; const BYTE* lowLimit = (const BYTE*) src; const BYTE* anchor = ip; const BYTE* const iend = ip + *srcSizePtr; const BYTE* const mflimit = iend - MFLIMIT; const BYTE* const matchlimit = iend - LASTLITERALS; BYTE* op = (BYTE*) dst; BYTE* const oend = op + targetDstSize; BYTE* const oMaxLit = op + targetDstSize - 2 /* offset */ - 8 /* because 8+MINMATCH==MFLIMIT */ - 1 /* token */; BYTE* const oMaxMatch = op + targetDstSize - (LASTLITERALS + 1 /* token */); BYTE* const oMaxSeq = oMaxLit - 1 /* token */; U32 forwardH; /* Init conditions */ if (targetDstSize < 1) return 0; /* Impossible to store anything */ if ((U32)*srcSizePtr > (U32)LZ4_MAX_INPUT_SIZE) return 0; /* Unsupported input size, too large (or negative) */ if ((tableType == byU16) && (*srcSizePtr>=LZ4_64Klimit)) return 0; /* Size too large (not within 64K limit) */ if (*srcSizePtrhashTable, tableType, base); ip++; forwardH = LZ4_hashPosition(ip, tableType); /* Main Loop */ for ( ; ; ) { const BYTE* match; BYTE* token; /* Find a match */ { const BYTE* forwardIp = ip; unsigned step = 1; unsigned searchMatchNb = 1 << LZ4_skipTrigger; do { U32 h = forwardH; ip = forwardIp; forwardIp += step; step = (searchMatchNb++ >> LZ4_skipTrigger); if (unlikely(forwardIp > mflimit)) goto _last_literals; match = LZ4_getPositionOnHash(h, ctx->hashTable, tableType, base); forwardH = LZ4_hashPosition(forwardIp, tableType); LZ4_putPositionOnHash(ip, h, ctx->hashTable, tableType, base); } while ( ((tableType==byU16) ? 0 : (match + MAX_DISTANCE < ip)) || (LZ4_read32(match) != LZ4_read32(ip)) ); } /* Catch up */ while ((ip>anchor) && (match > lowLimit) && (unlikely(ip[-1]==match[-1]))) { ip--; match--; } /* Encode Literal length */ { unsigned litLength = (unsigned)(ip - anchor); token = op++; if (op + ((litLength+240)/255) + litLength > oMaxLit) { /* Not enough space for a last match */ op--; goto _last_literals; } if (litLength>=RUN_MASK) { unsigned len = litLength - RUN_MASK; *token=(RUN_MASK<= 255 ; len-=255) *op++ = 255; *op++ = (BYTE)len; } else *token = (BYTE)(litLength< oMaxMatch) { /* Match description too long : reduce it */ matchLength = (15-1) + (oMaxMatch-op) * 255; } ip += MINMATCH + matchLength; if (matchLength>=ML_MASK) { *token += ML_MASK; matchLength -= ML_MASK; while (matchLength >= 255) { matchLength-=255; *op++ = 255; } *op++ = (BYTE)matchLength; } else *token += (BYTE)(matchLength); } anchor = ip; /* Test end of block */ if (ip > mflimit) break; if (op > oMaxSeq) break; /* Fill table */ LZ4_putPosition(ip-2, ctx->hashTable, tableType, base); /* Test next position */ match = LZ4_getPosition(ip, ctx->hashTable, tableType, base); LZ4_putPosition(ip, ctx->hashTable, tableType, base); if ( (match+MAX_DISTANCE>=ip) && (LZ4_read32(match)==LZ4_read32(ip)) ) { token=op++; *token=0; goto _next_match; } /* Prepare next loop */ forwardH = LZ4_hashPosition(++ip, tableType); } _last_literals: /* Encode Last Literals */ { size_t lastRunSize = (size_t)(iend - anchor); if (op + 1 /* token */ + ((lastRunSize+240)/255) /* litLength */ + lastRunSize /* literals */ > oend) { /* adapt lastRunSize to fill 'dst' */ lastRunSize = (oend-op) - 1; lastRunSize -= (lastRunSize+240)/255; } ip = anchor + lastRunSize; if (lastRunSize >= RUN_MASK) { size_t accumulator = lastRunSize - RUN_MASK; *op++ = RUN_MASK << ML_BITS; for(; accumulator >= 255 ; accumulator-=255) *op++ = 255; *op++ = (BYTE) accumulator; } else { *op++ = (BYTE)(lastRunSize<= LZ4_compressBound(*srcSizePtr)) { /* compression success is guaranteed */ return LZ4_compress_fast_extState(state, src, dst, *srcSizePtr, targetDstSize, 1); } else { if (*srcSizePtr < LZ4_64Klimit) return LZ4_compress_destSize_generic(&state->internal_donotuse, src, dst, srcSizePtr, targetDstSize, byU16); else return LZ4_compress_destSize_generic(&state->internal_donotuse, src, dst, srcSizePtr, targetDstSize, sizeof(void*)==8 ? byU32 : byPtr); } } int LZ4_compress_destSize(const char* src, char* dst, int* srcSizePtr, int targetDstSize) { #if (LZ4_HEAPMODE) LZ4_stream_t* ctx = (LZ4_stream_t*)ALLOCATOR(1, sizeof(LZ4_stream_t)); /* malloc-calloc always properly aligned */ #else LZ4_stream_t ctxBody; LZ4_stream_t* ctx = &ctxBody; #endif int result = LZ4_compress_destSize_extState(ctx, src, dst, srcSizePtr, targetDstSize); #if (LZ4_HEAPMODE) FREEMEM(ctx); #endif return result; } /*-****************************** * Streaming functions ********************************/ LZ4_stream_t* LZ4_createStream(void) { LZ4_stream_t* lz4s = (LZ4_stream_t*)ALLOCATOR(8, LZ4_STREAMSIZE_U64); LZ4_STATIC_ASSERT(LZ4_STREAMSIZE >= sizeof(LZ4_stream_t_internal)); /* A compilation error here means LZ4_STREAMSIZE is not large enough */ LZ4_resetStream(lz4s); return lz4s; } void LZ4_resetStream (LZ4_stream_t* LZ4_stream) { DEBUGLOG(4, "LZ4_resetStream"); MEM_INIT(LZ4_stream, 0, sizeof(LZ4_stream_t)); } int LZ4_freeStream (LZ4_stream_t* LZ4_stream) { if (!LZ4_stream) return 0; /* support free on NULL */ FREEMEM(LZ4_stream); return (0); } #define HASH_UNIT sizeof(reg_t) int LZ4_loadDict (LZ4_stream_t* LZ4_dict, const char* dictionary, int dictSize) { LZ4_stream_t_internal* dict = &LZ4_dict->internal_donotuse; const BYTE* p = (const BYTE*)dictionary; const BYTE* const dictEnd = p + dictSize; const BYTE* base; if ((dict->initCheck) || (dict->currentOffset > 1 GB)) /* Uninitialized structure, or reuse overflow */ LZ4_resetStream(LZ4_dict); if (dictSize < (int)HASH_UNIT) { dict->dictionary = NULL; dict->dictSize = 0; return 0; } if ((dictEnd - p) > 64 KB) p = dictEnd - 64 KB; dict->currentOffset += 64 KB; base = p - dict->currentOffset; dict->dictionary = p; dict->dictSize = (U32)(dictEnd - p); dict->currentOffset += dict->dictSize; while (p <= dictEnd-HASH_UNIT) { LZ4_putPosition(p, dict->hashTable, byU32, base); p+=3; } return dict->dictSize; } static void LZ4_renormDictT(LZ4_stream_t_internal* LZ4_dict, const BYTE* src) { if ((LZ4_dict->currentOffset > 0x80000000) || ((uptrval)LZ4_dict->currentOffset > (uptrval)src)) { /* address space overflow */ /* rescale hash table */ U32 const delta = LZ4_dict->currentOffset - 64 KB; const BYTE* dictEnd = LZ4_dict->dictionary + LZ4_dict->dictSize; int i; for (i=0; ihashTable[i] < delta) LZ4_dict->hashTable[i]=0; else LZ4_dict->hashTable[i] -= delta; } LZ4_dict->currentOffset = 64 KB; if (LZ4_dict->dictSize > 64 KB) LZ4_dict->dictSize = 64 KB; LZ4_dict->dictionary = dictEnd - LZ4_dict->dictSize; } } int LZ4_compress_fast_continue (LZ4_stream_t* LZ4_stream, const char* source, char* dest, int inputSize, int maxOutputSize, int acceleration) { LZ4_stream_t_internal* streamPtr = &LZ4_stream->internal_donotuse; const BYTE* const dictEnd = streamPtr->dictionary + streamPtr->dictSize; const BYTE* smallest = (const BYTE*) source; if (streamPtr->initCheck) return 0; /* Uninitialized structure detected */ if ((streamPtr->dictSize>0) && (smallest>dictEnd)) smallest = dictEnd; LZ4_renormDictT(streamPtr, smallest); if (acceleration < 1) acceleration = ACCELERATION_DEFAULT; /* Check overlapping input/dictionary space */ { const BYTE* sourceEnd = (const BYTE*) source + inputSize; if ((sourceEnd > streamPtr->dictionary) && (sourceEnd < dictEnd)) { streamPtr->dictSize = (U32)(dictEnd - sourceEnd); if (streamPtr->dictSize > 64 KB) streamPtr->dictSize = 64 KB; if (streamPtr->dictSize < 4) streamPtr->dictSize = 0; streamPtr->dictionary = dictEnd - streamPtr->dictSize; } } /* prefix mode : source data follows dictionary */ if (dictEnd == (const BYTE*)source) { int result; if ((streamPtr->dictSize < 64 KB) && (streamPtr->dictSize < streamPtr->currentOffset)) result = LZ4_compress_generic(streamPtr, source, dest, inputSize, maxOutputSize, limitedOutput, byU32, withPrefix64k, dictSmall, acceleration); else result = LZ4_compress_generic(streamPtr, source, dest, inputSize, maxOutputSize, limitedOutput, byU32, withPrefix64k, noDictIssue, acceleration); streamPtr->dictSize += (U32)inputSize; streamPtr->currentOffset += (U32)inputSize; return result; } /* external dictionary mode */ { int result; if ((streamPtr->dictSize < 64 KB) && (streamPtr->dictSize < streamPtr->currentOffset)) result = LZ4_compress_generic(streamPtr, source, dest, inputSize, maxOutputSize, limitedOutput, byU32, usingExtDict, dictSmall, acceleration); else result = LZ4_compress_generic(streamPtr, source, dest, inputSize, maxOutputSize, limitedOutput, byU32, usingExtDict, noDictIssue, acceleration); streamPtr->dictionary = (const BYTE*)source; streamPtr->dictSize = (U32)inputSize; streamPtr->currentOffset += (U32)inputSize; return result; } } /* Hidden debug function, to force external dictionary mode */ int LZ4_compress_forceExtDict (LZ4_stream_t* LZ4_dict, const char* source, char* dest, int inputSize) { LZ4_stream_t_internal* streamPtr = &LZ4_dict->internal_donotuse; int result; const BYTE* const dictEnd = streamPtr->dictionary + streamPtr->dictSize; const BYTE* smallest = dictEnd; if (smallest > (const BYTE*) source) smallest = (const BYTE*) source; LZ4_renormDictT(streamPtr, smallest); result = LZ4_compress_generic(streamPtr, source, dest, inputSize, 0, notLimited, byU32, usingExtDict, noDictIssue, 1); streamPtr->dictionary = (const BYTE*)source; streamPtr->dictSize = (U32)inputSize; streamPtr->currentOffset += (U32)inputSize; return result; } /*! LZ4_saveDict() : * If previously compressed data block is not guaranteed to remain available at its memory location, * save it into a safer place (char* safeBuffer). * Note : you don't need to call LZ4_loadDict() afterwards, * dictionary is immediately usable, you can therefore call LZ4_compress_fast_continue(). * Return : saved dictionary size in bytes (necessarily <= dictSize), or 0 if error. */ int LZ4_saveDict (LZ4_stream_t* LZ4_dict, char* safeBuffer, int dictSize) { LZ4_stream_t_internal* const dict = &LZ4_dict->internal_donotuse; const BYTE* const previousDictEnd = dict->dictionary + dict->dictSize; if ((U32)dictSize > 64 KB) dictSize = 64 KB; /* useless to define a dictionary > 64 KB */ if ((U32)dictSize > dict->dictSize) dictSize = dict->dictSize; memmove(safeBuffer, previousDictEnd - dictSize, dictSize); dict->dictionary = (const BYTE*)safeBuffer; dict->dictSize = (U32)dictSize; return dictSize; } /*-***************************** * Decompression functions *******************************/ /*! LZ4_decompress_generic() : * This generic decompression function covers all use cases. * It shall be instantiated several times, using different sets of directives. * Note that it is important for performance that this function really get inlined, * in order to remove useless branches during compilation optimization. */ LZ4_FORCE_O2_GCC_PPC64LE LZ4_FORCE_INLINE int LZ4_decompress_generic( const char* const src, char* const dst, int srcSize, int outputSize, /* If endOnInput==endOnInputSize, this value is `dstCapacity` */ int endOnInput, /* endOnOutputSize, endOnInputSize */ int partialDecoding, /* full, partial */ int targetOutputSize, /* only used if partialDecoding==partial */ int dict, /* noDict, withPrefix64k, usingExtDict */ const BYTE* const lowPrefix, /* always <= dst, == dst when no prefix */ const BYTE* const dictStart, /* only if dict==usingExtDict */ const size_t dictSize /* note : = 0 if noDict */ ) { const BYTE* ip = (const BYTE*) src; const BYTE* const iend = ip + srcSize; BYTE* op = (BYTE*) dst; BYTE* const oend = op + outputSize; BYTE* cpy; BYTE* oexit = op + targetOutputSize; const BYTE* const dictEnd = (const BYTE*)dictStart + dictSize; const unsigned inc32table[8] = {0, 1, 2, 1, 0, 4, 4, 4}; const int dec64table[8] = {0, 0, 0, -1, -4, 1, 2, 3}; const int safeDecode = (endOnInput==endOnInputSize); const int checkOffset = ((safeDecode) && (dictSize < (int)(64 KB))); /* Special cases */ if ((partialDecoding) && (oexit > oend-MFLIMIT)) oexit = oend-MFLIMIT; /* targetOutputSize too high => just decode everything */ if ((endOnInput) && (unlikely(outputSize==0))) return ((srcSize==1) && (*ip==0)) ? 0 : -1; /* Empty output buffer */ if ((!endOnInput) && (unlikely(outputSize==0))) return (*ip==0?1:-1); /* Main Loop : decode sequences */ while (1) { size_t length; const BYTE* match; size_t offset; unsigned const token = *ip++; /* shortcut for common case : * in most circumstances, we expect to decode small matches (<= 18 bytes) separated by few literals (<= 14 bytes). * this shortcut was tested on x86 and x64, where it improves decoding speed. * it has not yet been benchmarked on ARM, Power, mips, etc. */ if (((ip + 14 /*maxLL*/ + 2 /*offset*/ <= iend) & (op + 14 /*maxLL*/ + 18 /*maxML*/ <= oend)) & ((token < (15<> ML_BITS; size_t const off = LZ4_readLE16(ip+ll); const BYTE* const matchPtr = op + ll - off; /* pointer underflow risk ? */ if ((off >= 18) /* do not deal with overlapping matches */ & (matchPtr >= lowPrefix)) { size_t const ml = (token & ML_MASK) + MINMATCH; memcpy(op, ip, 16); op += ll; ip += ll + 2 /*offset*/; memcpy(op, matchPtr, 18); op += ml; continue; } } /* decode literal length */ if ((length=(token>>ML_BITS)) == RUN_MASK) { unsigned s; do { s = *ip++; length += s; } while ( likely(endOnInput ? ip(partialDecoding?oexit:oend-MFLIMIT)) || (ip+length>iend-(2+1+LASTLITERALS))) ) || ((!endOnInput) && (cpy>oend-WILDCOPYLENGTH)) ) { if (partialDecoding) { if (cpy > oend) goto _output_error; /* Error : write attempt beyond end of output buffer */ if ((endOnInput) && (ip+length > iend)) goto _output_error; /* Error : read attempt beyond end of input buffer */ } else { if ((!endOnInput) && (cpy != oend)) goto _output_error; /* Error : block decoding must stop exactly there */ if ((endOnInput) && ((ip+length != iend) || (cpy > oend))) goto _output_error; /* Error : input must be consumed */ } memcpy(op, ip, length); ip += length; op += length; break; /* Necessarily EOF, due to parsing restrictions */ } LZ4_wildCopy(op, ip, cpy); ip += length; op = cpy; /* get offset */ offset = LZ4_readLE16(ip); ip+=2; match = op - offset; if ((checkOffset) && (unlikely(match + dictSize < lowPrefix))) goto _output_error; /* Error : offset outside buffers */ LZ4_write32(op, (U32)offset); /* costs ~1%; silence an msan warning when offset==0 */ /* get matchlength */ length = token & ML_MASK; if (length == ML_MASK) { unsigned s; do { s = *ip++; if ((endOnInput) && (ip > iend-LASTLITERALS)) goto _output_error; length += s; } while (s==255); if ((safeDecode) && unlikely((uptrval)(op)+length<(uptrval)op)) goto _output_error; /* overflow detection */ } length += MINMATCH; /* check external dictionary */ if ((dict==usingExtDict) && (match < lowPrefix)) { if (unlikely(op+length > oend-LASTLITERALS)) goto _output_error; /* doesn't respect parsing restriction */ if (length <= (size_t)(lowPrefix-match)) { /* match can be copied as a single segment from external dictionary */ memmove(op, dictEnd - (lowPrefix-match), length); op += length; } else { /* match encompass external dictionary and current block */ size_t const copySize = (size_t)(lowPrefix-match); size_t const restSize = length - copySize; memcpy(op, dictEnd - copySize, copySize); op += copySize; if (restSize > (size_t)(op-lowPrefix)) { /* overlap copy */ BYTE* const endOfMatch = op + restSize; const BYTE* copyFrom = lowPrefix; while (op < endOfMatch) *op++ = *copyFrom++; } else { memcpy(op, lowPrefix, restSize); op += restSize; } } continue; } /* copy match within block */ cpy = op + length; if (unlikely(offset<8)) { op[0] = match[0]; op[1] = match[1]; op[2] = match[2]; op[3] = match[3]; match += inc32table[offset]; memcpy(op+4, match, 4); match -= dec64table[offset]; } else { LZ4_copy8(op, match); match+=8; } op += 8; if (unlikely(cpy>oend-12)) { BYTE* const oCopyLimit = oend-(WILDCOPYLENGTH-1); if (cpy > oend-LASTLITERALS) goto _output_error; /* Error : last LASTLITERALS bytes must be literals (uncompressed) */ if (op < oCopyLimit) { LZ4_wildCopy(op, match, oCopyLimit); match += oCopyLimit - op; op = oCopyLimit; } while (op16) LZ4_wildCopy(op+8, match+8, cpy); } op = cpy; /* correction */ } /* end of decoding */ if (endOnInput) return (int) (((char*)op)-dst); /* Nb of output bytes decoded */ else return (int) (((const char*)ip)-src); /* Nb of input bytes read */ /* Overflow error detected */ _output_error: return (int) (-(((const char*)ip)-src))-1; } LZ4_FORCE_O2_GCC_PPC64LE int LZ4_decompress_safe(const char* source, char* dest, int compressedSize, int maxDecompressedSize) { return LZ4_decompress_generic(source, dest, compressedSize, maxDecompressedSize, endOnInputSize, full, 0, noDict, (BYTE*)dest, NULL, 0); } LZ4_FORCE_O2_GCC_PPC64LE int LZ4_decompress_safe_partial(const char* source, char* dest, int compressedSize, int targetOutputSize, int maxDecompressedSize) { return LZ4_decompress_generic(source, dest, compressedSize, maxDecompressedSize, endOnInputSize, partial, targetOutputSize, noDict, (BYTE*)dest, NULL, 0); } LZ4_FORCE_O2_GCC_PPC64LE int LZ4_decompress_fast(const char* source, char* dest, int originalSize) { return LZ4_decompress_generic(source, dest, 0, originalSize, endOnOutputSize, full, 0, withPrefix64k, (BYTE*)(dest - 64 KB), NULL, 64 KB); } /*===== streaming decompression functions =====*/ LZ4_streamDecode_t* LZ4_createStreamDecode(void) { LZ4_streamDecode_t* lz4s = (LZ4_streamDecode_t*) ALLOCATOR(1, sizeof(LZ4_streamDecode_t)); return lz4s; } int LZ4_freeStreamDecode (LZ4_streamDecode_t* LZ4_stream) { if (!LZ4_stream) return 0; /* support free on NULL */ FREEMEM(LZ4_stream); return 0; } /*! * LZ4_setStreamDecode() : * Use this function to instruct where to find the dictionary. * This function is not necessary if previous data is still available where it was decoded. * Loading a size of 0 is allowed (same effect as no dictionary). * Return : 1 if OK, 0 if error */ int LZ4_setStreamDecode (LZ4_streamDecode_t* LZ4_streamDecode, const char* dictionary, int dictSize) { LZ4_streamDecode_t_internal* lz4sd = &LZ4_streamDecode->internal_donotuse; lz4sd->prefixSize = (size_t) dictSize; lz4sd->prefixEnd = (const BYTE*) dictionary + dictSize; lz4sd->externalDict = NULL; lz4sd->extDictSize = 0; return 1; } /* *_continue() : These decoding functions allow decompression of multiple blocks in "streaming" mode. Previously decoded blocks must still be available at the memory position where they were decoded. If it's not possible, save the relevant part of decoded data into a safe buffer, and indicate where it stands using LZ4_setStreamDecode() */ LZ4_FORCE_O2_GCC_PPC64LE int LZ4_decompress_safe_continue (LZ4_streamDecode_t* LZ4_streamDecode, const char* source, char* dest, int compressedSize, int maxOutputSize) { LZ4_streamDecode_t_internal* lz4sd = &LZ4_streamDecode->internal_donotuse; int result; if (lz4sd->prefixEnd == (BYTE*)dest) { result = LZ4_decompress_generic(source, dest, compressedSize, maxOutputSize, endOnInputSize, full, 0, usingExtDict, lz4sd->prefixEnd - lz4sd->prefixSize, lz4sd->externalDict, lz4sd->extDictSize); if (result <= 0) return result; lz4sd->prefixSize += result; lz4sd->prefixEnd += result; } else { lz4sd->extDictSize = lz4sd->prefixSize; lz4sd->externalDict = lz4sd->prefixEnd - lz4sd->extDictSize; result = LZ4_decompress_generic(source, dest, compressedSize, maxOutputSize, endOnInputSize, full, 0, usingExtDict, (BYTE*)dest, lz4sd->externalDict, lz4sd->extDictSize); if (result <= 0) return result; lz4sd->prefixSize = result; lz4sd->prefixEnd = (BYTE*)dest + result; } return result; } LZ4_FORCE_O2_GCC_PPC64LE int LZ4_decompress_fast_continue (LZ4_streamDecode_t* LZ4_streamDecode, const char* source, char* dest, int originalSize) { LZ4_streamDecode_t_internal* lz4sd = &LZ4_streamDecode->internal_donotuse; int result; if (lz4sd->prefixEnd == (BYTE*)dest) { result = LZ4_decompress_generic(source, dest, 0, originalSize, endOnOutputSize, full, 0, usingExtDict, lz4sd->prefixEnd - lz4sd->prefixSize, lz4sd->externalDict, lz4sd->extDictSize); if (result <= 0) return result; lz4sd->prefixSize += originalSize; lz4sd->prefixEnd += originalSize; } else { lz4sd->extDictSize = lz4sd->prefixSize; lz4sd->externalDict = lz4sd->prefixEnd - lz4sd->extDictSize; result = LZ4_decompress_generic(source, dest, 0, originalSize, endOnOutputSize, full, 0, usingExtDict, (BYTE*)dest, lz4sd->externalDict, lz4sd->extDictSize); if (result <= 0) return result; lz4sd->prefixSize = originalSize; lz4sd->prefixEnd = (BYTE*)dest + originalSize; } return result; } /* Advanced decoding functions : *_usingDict() : These decoding functions work the same as "_continue" ones, the dictionary must be explicitly provided within parameters */ LZ4_FORCE_O2_GCC_PPC64LE LZ4_FORCE_INLINE int LZ4_decompress_usingDict_generic(const char* source, char* dest, int compressedSize, int maxOutputSize, int safe, const char* dictStart, int dictSize) { if (dictSize==0) return LZ4_decompress_generic(source, dest, compressedSize, maxOutputSize, safe, full, 0, noDict, (BYTE*)dest, NULL, 0); if (dictStart+dictSize == dest) { if (dictSize >= (int)(64 KB - 1)) return LZ4_decompress_generic(source, dest, compressedSize, maxOutputSize, safe, full, 0, withPrefix64k, (BYTE*)dest-64 KB, NULL, 0); return LZ4_decompress_generic(source, dest, compressedSize, maxOutputSize, safe, full, 0, noDict, (BYTE*)dest-dictSize, NULL, 0); } return LZ4_decompress_generic(source, dest, compressedSize, maxOutputSize, safe, full, 0, usingExtDict, (BYTE*)dest, (const BYTE*)dictStart, dictSize); } LZ4_FORCE_O2_GCC_PPC64LE int LZ4_decompress_safe_usingDict(const char* source, char* dest, int compressedSize, int maxOutputSize, const char* dictStart, int dictSize) { return LZ4_decompress_usingDict_generic(source, dest, compressedSize, maxOutputSize, 1, dictStart, dictSize); } LZ4_FORCE_O2_GCC_PPC64LE int LZ4_decompress_fast_usingDict(const char* source, char* dest, int originalSize, const char* dictStart, int dictSize) { return LZ4_decompress_usingDict_generic(source, dest, 0, originalSize, 0, dictStart, dictSize); } /* debug function */ LZ4_FORCE_O2_GCC_PPC64LE int LZ4_decompress_safe_forceExtDict(const char* source, char* dest, int compressedSize, int maxOutputSize, const char* dictStart, int dictSize) { return LZ4_decompress_generic(source, dest, compressedSize, maxOutputSize, endOnInputSize, full, 0, usingExtDict, (BYTE*)dest, (const BYTE*)dictStart, dictSize); } /*=************************************************* * Obsolete Functions ***************************************************/ /* obsolete compression functions */ int LZ4_compress_limitedOutput(const char* source, char* dest, int inputSize, int maxOutputSize) { return LZ4_compress_default(source, dest, inputSize, maxOutputSize); } int LZ4_compress(const char* source, char* dest, int inputSize) { return LZ4_compress_default(source, dest, inputSize, LZ4_compressBound(inputSize)); } int LZ4_compress_limitedOutput_withState (void* state, const char* src, char* dst, int srcSize, int dstSize) { return LZ4_compress_fast_extState(state, src, dst, srcSize, dstSize, 1); } int LZ4_compress_withState (void* state, const char* src, char* dst, int srcSize) { return LZ4_compress_fast_extState(state, src, dst, srcSize, LZ4_compressBound(srcSize), 1); } int LZ4_compress_limitedOutput_continue (LZ4_stream_t* LZ4_stream, const char* src, char* dst, int srcSize, int maxDstSize) { return LZ4_compress_fast_continue(LZ4_stream, src, dst, srcSize, maxDstSize, 1); } int LZ4_compress_continue (LZ4_stream_t* LZ4_stream, const char* source, char* dest, int inputSize) { return LZ4_compress_fast_continue(LZ4_stream, source, dest, inputSize, LZ4_compressBound(inputSize), 1); } /* These function names are deprecated and should no longer be used. They are only provided here for compatibility with older user programs. - LZ4_uncompress is totally equivalent to LZ4_decompress_fast - LZ4_uncompress_unknownOutputSize is totally equivalent to LZ4_decompress_safe */ int LZ4_uncompress (const char* source, char* dest, int outputSize) { return LZ4_decompress_fast(source, dest, outputSize); } int LZ4_uncompress_unknownOutputSize (const char* source, char* dest, int isize, int maxOutputSize) { return LZ4_decompress_safe(source, dest, isize, maxOutputSize); } /* Obsolete Streaming functions */ int LZ4_sizeofStreamState() { return LZ4_STREAMSIZE; } static void LZ4_init(LZ4_stream_t* lz4ds, BYTE* base) { MEM_INIT(lz4ds, 0, sizeof(LZ4_stream_t)); lz4ds->internal_donotuse.bufferStart = base; } int LZ4_resetStreamState(void* state, char* inputBuffer) { if ((((uptrval)state) & 3) != 0) return 1; /* Error : pointer is not aligned on 4-bytes boundary */ LZ4_init((LZ4_stream_t*)state, (BYTE*)inputBuffer); return 0; } void* LZ4_create (char* inputBuffer) { LZ4_stream_t* lz4ds = (LZ4_stream_t*)ALLOCATOR(8, sizeof(LZ4_stream_t)); LZ4_init (lz4ds, (BYTE*)inputBuffer); return lz4ds; } char* LZ4_slideInputBuffer (void* LZ4_Data) { LZ4_stream_t_internal* ctx = &((LZ4_stream_t*)LZ4_Data)->internal_donotuse; int dictSize = LZ4_saveDict((LZ4_stream_t*)LZ4_Data, (char*)ctx->bufferStart, 64 KB); return (char*)(ctx->bufferStart + dictSize); } /* Obsolete streaming decompression functions */ int LZ4_decompress_safe_withPrefix64k(const char* source, char* dest, int compressedSize, int maxOutputSize) { return LZ4_decompress_generic(source, dest, compressedSize, maxOutputSize, endOnInputSize, full, 0, withPrefix64k, (BYTE*)dest - 64 KB, NULL, 64 KB); } int LZ4_decompress_fast_withPrefix64k(const char* source, char* dest, int originalSize) { return LZ4_decompress_generic(source, dest, 0, originalSize, endOnOutputSize, full, 0, withPrefix64k, (BYTE*)dest - 64 KB, NULL, 64 KB); } #endif /* LZ4_COMMONDEFS_ONLY */ ================================================ FILE: src/libraries/lz4/lz4.h ================================================ /* * LZ4 - Fast LZ compression algorithm * Header File * Copyright (C) 2011-2017, Yann Collet. BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php) Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. You can contact the author at : - LZ4 homepage : http://www.lz4.org - LZ4 source repository : https://github.com/lz4/lz4 */ #if defined (__cplusplus) extern "C" { #endif #ifndef LZ4_H_2983827168210 #define LZ4_H_2983827168210 /* --- Dependency --- */ #include /* size_t */ /** Introduction LZ4 is lossless compression algorithm, providing compression speed at 400 MB/s per core, scalable with multi-cores CPU. It features an extremely fast decoder, with speed in multiple GB/s per core, typically reaching RAM speed limits on multi-core systems. The LZ4 compression library provides in-memory compression and decompression functions. Compression can be done in: - a single step (described as Simple Functions) - a single step, reusing a context (described in Advanced Functions) - unbounded multiple steps (described as Streaming compression) lz4.h provides block compression functions. It gives full buffer control to user. Decompressing an lz4-compressed block also requires metadata (such as compressed size). Each application is free to encode such metadata in whichever way it wants. An additional format, called LZ4 frame specification (doc/lz4_Frame_format.md), take care of encoding standard metadata alongside LZ4-compressed blocks. If your application requires interoperability, it's recommended to use it. A library is provided to take care of it, see lz4frame.h. */ /*^*************************************************************** * Export parameters *****************************************************************/ /* * LZ4_DLL_EXPORT : * Enable exporting of functions when building a Windows DLL * LZ4LIB_VISIBILITY : * Control library symbols visibility. */ #ifndef LZ4LIB_VISIBILITY # if defined(__GNUC__) && (__GNUC__ >= 4) # define LZ4LIB_VISIBILITY __attribute__ ((visibility ("default"))) # else # define LZ4LIB_VISIBILITY # endif #endif #if defined(LZ4_DLL_EXPORT) && (LZ4_DLL_EXPORT==1) # define LZ4LIB_API __declspec(dllexport) LZ4LIB_VISIBILITY #elif defined(LZ4_DLL_IMPORT) && (LZ4_DLL_IMPORT==1) # define LZ4LIB_API __declspec(dllimport) LZ4LIB_VISIBILITY /* It isn't required but allows to generate better code, saving a function pointer load from the IAT and an indirect jump.*/ #else # define LZ4LIB_API LZ4LIB_VISIBILITY #endif /*------ Version ------*/ #define LZ4_VERSION_MAJOR 1 /* for breaking interface changes */ #define LZ4_VERSION_MINOR 8 /* for new (non-breaking) interface capabilities */ #define LZ4_VERSION_RELEASE 0 /* for tweaks, bug-fixes, or development */ #define LZ4_VERSION_NUMBER (LZ4_VERSION_MAJOR *100*100 + LZ4_VERSION_MINOR *100 + LZ4_VERSION_RELEASE) #define LZ4_LIB_VERSION LZ4_VERSION_MAJOR.LZ4_VERSION_MINOR.LZ4_VERSION_RELEASE #define LZ4_QUOTE(str) #str #define LZ4_EXPAND_AND_QUOTE(str) LZ4_QUOTE(str) #define LZ4_VERSION_STRING LZ4_EXPAND_AND_QUOTE(LZ4_LIB_VERSION) LZ4LIB_API int LZ4_versionNumber (void); /**< library version number; to be used when checking dll version */ LZ4LIB_API const char* LZ4_versionString (void); /**< library version string; to be used when checking dll version */ /*-************************************ * Tuning parameter **************************************/ /*! * LZ4_MEMORY_USAGE : * Memory usage formula : N->2^N Bytes (examples : 10 -> 1KB; 12 -> 4KB ; 16 -> 64KB; 20 -> 1MB; etc.) * Increasing memory usage improves compression ratio * Reduced memory usage can improve speed, due to cache effect * Default value is 14, for 16KB, which nicely fits into Intel x86 L1 cache */ #ifndef LZ4_MEMORY_USAGE # define LZ4_MEMORY_USAGE 14 #endif /*-************************************ * Simple Functions **************************************/ /*! LZ4_compress_default() : Compresses 'srcSize' bytes from buffer 'src' into already allocated 'dst' buffer of size 'dstCapacity'. Compression is guaranteed to succeed if 'dstCapacity' >= LZ4_compressBound(srcSize). It also runs faster, so it's a recommended setting. If the function cannot compress 'src' into a limited 'dst' budget, compression stops *immediately*, and the function result is zero. As a consequence, 'dst' content is not valid. This function never writes outside 'dst' buffer, nor read outside 'source' buffer. srcSize : supported max value is LZ4_MAX_INPUT_VALUE dstCapacity : full or partial size of buffer 'dst' (which must be already allocated) return : the number of bytes written into buffer 'dst' (necessarily <= dstCapacity) or 0 if compression fails */ LZ4LIB_API int LZ4_compress_default(const char* src, char* dst, int srcSize, int dstCapacity); /*! LZ4_decompress_safe() : compressedSize : is the exact complete size of the compressed block. dstCapacity : is the size of destination buffer, which must be already allocated. return : the number of bytes decompressed into destination buffer (necessarily <= dstCapacity) If destination buffer is not large enough, decoding will stop and output an error code (negative value). If the source stream is detected malformed, the function will stop decoding and return a negative result. This function is protected against buffer overflow exploits, including malicious data packets. It never writes outside output buffer, nor reads outside input buffer. */ LZ4LIB_API int LZ4_decompress_safe (const char* src, char* dst, int compressedSize, int dstCapacity); /*-************************************ * Advanced Functions **************************************/ #define LZ4_MAX_INPUT_SIZE 0x7E000000 /* 2 113 929 216 bytes */ #define LZ4_COMPRESSBOUND(isize) ((unsigned)(isize) > (unsigned)LZ4_MAX_INPUT_SIZE ? 0 : (isize) + ((isize)/255) + 16) /*! LZ4_compressBound() : Provides the maximum size that LZ4 compression may output in a "worst case" scenario (input data not compressible) This function is primarily useful for memory allocation purposes (destination buffer size). Macro LZ4_COMPRESSBOUND() is also provided for compilation-time evaluation (stack memory allocation for example). Note that LZ4_compress_default() compress faster when dest buffer size is >= LZ4_compressBound(srcSize) inputSize : max supported value is LZ4_MAX_INPUT_SIZE return : maximum output size in a "worst case" scenario or 0, if input size is too large ( > LZ4_MAX_INPUT_SIZE) */ LZ4LIB_API int LZ4_compressBound(int inputSize); /*! LZ4_compress_fast() : Same as LZ4_compress_default(), but allows to select an "acceleration" factor. The larger the acceleration value, the faster the algorithm, but also the lesser the compression. It's a trade-off. It can be fine tuned, with each successive value providing roughly +~3% to speed. An acceleration value of "1" is the same as regular LZ4_compress_default() Values <= 0 will be replaced by ACCELERATION_DEFAULT (see lz4.c), which is 1. */ LZ4LIB_API int LZ4_compress_fast (const char* src, char* dst, int srcSize, int dstCapacity, int acceleration); /*! LZ4_compress_fast_extState() : Same compression function, just using an externally allocated memory space to store compression state. Use LZ4_sizeofState() to know how much memory must be allocated, and allocate it on 8-bytes boundaries (using malloc() typically). Then, provide it as 'void* state' to compression function. */ LZ4LIB_API int LZ4_sizeofState(void); LZ4LIB_API int LZ4_compress_fast_extState (void* state, const char* src, char* dst, int srcSize, int dstCapacity, int acceleration); /*! LZ4_compress_destSize() : Reverse the logic : compresses as much data as possible from 'src' buffer into already allocated buffer 'dst' of size 'targetDestSize'. This function either compresses the entire 'src' content into 'dst' if it's large enough, or fill 'dst' buffer completely with as much data as possible from 'src'. *srcSizePtr : will be modified to indicate how many bytes where read from 'src' to fill 'dst'. New value is necessarily <= old value. return : Nb bytes written into 'dst' (necessarily <= targetDestSize) or 0 if compression fails */ LZ4LIB_API int LZ4_compress_destSize (const char* src, char* dst, int* srcSizePtr, int targetDstSize); /*! LZ4_decompress_fast() : (unsafe!!) originalSize : is the original uncompressed size return : the number of bytes read from the source buffer (in other words, the compressed size) If the source stream is detected malformed, the function will stop decoding and return a negative result. Destination buffer must be already allocated. Its size must be >= 'originalSize' bytes. note : This function respects memory boundaries for *properly formed* compressed data. It is a bit faster than LZ4_decompress_safe(). However, it does not provide any protection against intentionally modified data stream (malicious input). Use this function in trusted environment only (data to decode comes from a trusted source). */ LZ4LIB_API int LZ4_decompress_fast (const char* src, char* dst, int originalSize); /*! LZ4_decompress_safe_partial() : This function decompress a compressed block of size 'srcSize' at position 'src' into destination buffer 'dst' of size 'dstCapacity'. The function will decompress a minimum of 'targetOutputSize' bytes, and stop after that. However, it's not accurate, and may write more than 'targetOutputSize' (but <= dstCapacity). @return : the number of bytes decoded in the destination buffer (necessarily <= dstCapacity) Note : this number can be < 'targetOutputSize' should the compressed block contain less data. Always control how many bytes were decoded. If the source stream is detected malformed, the function will stop decoding and return a negative result. This function never writes outside of output buffer, and never reads outside of input buffer. It is therefore protected against malicious data packets. */ LZ4LIB_API int LZ4_decompress_safe_partial (const char* src, char* dst, int srcSize, int targetOutputSize, int dstCapacity); /*-********************************************* * Streaming Compression Functions ***********************************************/ typedef union LZ4_stream_u LZ4_stream_t; /* incomplete type (defined later) */ /*! LZ4_createStream() and LZ4_freeStream() : * LZ4_createStream() will allocate and initialize an `LZ4_stream_t` structure. * LZ4_freeStream() releases its memory. */ LZ4LIB_API LZ4_stream_t* LZ4_createStream(void); LZ4LIB_API int LZ4_freeStream (LZ4_stream_t* streamPtr); /*! LZ4_resetStream() : * An LZ4_stream_t structure can be allocated once and re-used multiple times. * Use this function to start compressing a new stream. */ LZ4LIB_API void LZ4_resetStream (LZ4_stream_t* streamPtr); /*! LZ4_loadDict() : * Use this function to load a static dictionary into LZ4_stream_t. * Any previous data will be forgotten, only 'dictionary' will remain in memory. * Loading a size of 0 is allowed, and is the same as reset. * @return : dictionary size, in bytes (necessarily <= 64 KB) */ LZ4LIB_API int LZ4_loadDict (LZ4_stream_t* streamPtr, const char* dictionary, int dictSize); /*! LZ4_compress_fast_continue() : * Compress content into 'src' using data from previously compressed blocks, improving compression ratio. * 'dst' buffer must be already allocated. * If dstCapacity >= LZ4_compressBound(srcSize), compression is guaranteed to succeed, and runs faster. * * Important : Up to 64KB of previously compressed data is assumed to remain present and unmodified in memory ! * Special 1 : If input buffer is a double-buffer, it can have any size, including < 64 KB. * Special 2 : If input buffer is a ring-buffer, it can have any size, including < 64 KB. * * @return : size of compressed block * or 0 if there is an error (typically, compressed data cannot fit into 'dst') * After an error, the stream status is invalid, it can only be reset or freed. */ LZ4LIB_API int LZ4_compress_fast_continue (LZ4_stream_t* streamPtr, const char* src, char* dst, int srcSize, int dstCapacity, int acceleration); /*! LZ4_saveDict() : * If previously compressed data block is not guaranteed to remain available at its current memory location, * save it into a safer place (char* safeBuffer). * Note : it's not necessary to call LZ4_loadDict() after LZ4_saveDict(), dictionary is immediately usable. * @return : saved dictionary size in bytes (necessarily <= dictSize), or 0 if error. */ LZ4LIB_API int LZ4_saveDict (LZ4_stream_t* streamPtr, char* safeBuffer, int dictSize); /*-********************************************** * Streaming Decompression Functions * Bufferless synchronous API ************************************************/ typedef union LZ4_streamDecode_u LZ4_streamDecode_t; /* incomplete type (defined later) */ /*! LZ4_createStreamDecode() and LZ4_freeStreamDecode() : * creation / destruction of streaming decompression tracking structure. * A tracking structure can be re-used multiple times sequentially. */ LZ4LIB_API LZ4_streamDecode_t* LZ4_createStreamDecode(void); LZ4LIB_API int LZ4_freeStreamDecode (LZ4_streamDecode_t* LZ4_stream); /*! LZ4_setStreamDecode() : * An LZ4_streamDecode_t structure can be allocated once and re-used multiple times. * Use this function to start decompression of a new stream of blocks. * A dictionary can optionnally be set. Use NULL or size 0 for a simple reset order. * @return : 1 if OK, 0 if error */ LZ4LIB_API int LZ4_setStreamDecode (LZ4_streamDecode_t* LZ4_streamDecode, const char* dictionary, int dictSize); /*! LZ4_decompress_*_continue() : * These decoding functions allow decompression of consecutive blocks in "streaming" mode. * A block is an unsplittable entity, it must be presented entirely to a decompression function. * Decompression functions only accept one block at a time. * Previously decoded blocks *must* remain available at the memory position where they were decoded (up to 64 KB). * * Special : if application sets a ring buffer for decompression, it must respect one of the following conditions : * - Exactly same size as encoding buffer, with same update rule (block boundaries at same positions) * In which case, the decoding & encoding ring buffer can have any size, including very small ones ( < 64 KB). * - Larger than encoding buffer, by a minimum of maxBlockSize more bytes. * maxBlockSize is implementation dependent. It's the maximum size of any single block. * In which case, encoding and decoding buffers do not need to be synchronized, * and encoding ring buffer can have any size, including small ones ( < 64 KB). * - _At least_ 64 KB + 8 bytes + maxBlockSize. * In which case, encoding and decoding buffers do not need to be synchronized, * and encoding ring buffer can have any size, including larger than decoding buffer. * Whenever these conditions are not possible, save the last 64KB of decoded data into a safe buffer, * and indicate where it is saved using LZ4_setStreamDecode() before decompressing next block. */ LZ4LIB_API int LZ4_decompress_safe_continue (LZ4_streamDecode_t* LZ4_streamDecode, const char* src, char* dst, int srcSize, int dstCapacity); LZ4LIB_API int LZ4_decompress_fast_continue (LZ4_streamDecode_t* LZ4_streamDecode, const char* src, char* dst, int originalSize); /*! LZ4_decompress_*_usingDict() : * These decoding functions work the same as * a combination of LZ4_setStreamDecode() followed by LZ4_decompress_*_continue() * They are stand-alone, and don't need an LZ4_streamDecode_t structure. */ LZ4LIB_API int LZ4_decompress_safe_usingDict (const char* src, char* dst, int srcSize, int dstCapcity, const char* dictStart, int dictSize); LZ4LIB_API int LZ4_decompress_fast_usingDict (const char* src, char* dst, int originalSize, const char* dictStart, int dictSize); /*^********************************************** * !!!!!! STATIC LINKING ONLY !!!!!! ***********************************************/ /*-************************************ * Private definitions ************************************** * Do not use these definitions. * They are exposed to allow static allocation of `LZ4_stream_t` and `LZ4_streamDecode_t`. * Using these definitions will expose code to API and/or ABI break in future versions of the library. **************************************/ #define LZ4_HASHLOG (LZ4_MEMORY_USAGE-2) #define LZ4_HASHTABLESIZE (1 << LZ4_MEMORY_USAGE) #define LZ4_HASH_SIZE_U32 (1 << LZ4_HASHLOG) /* required as macro for static allocation */ #if defined(__cplusplus) || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */) #include typedef struct { uint32_t hashTable[LZ4_HASH_SIZE_U32]; uint32_t currentOffset; uint32_t initCheck; const uint8_t* dictionary; uint8_t* bufferStart; /* obsolete, used for slideInputBuffer */ uint32_t dictSize; } LZ4_stream_t_internal; typedef struct { const uint8_t* externalDict; size_t extDictSize; const uint8_t* prefixEnd; size_t prefixSize; } LZ4_streamDecode_t_internal; #else typedef struct { unsigned int hashTable[LZ4_HASH_SIZE_U32]; unsigned int currentOffset; unsigned int initCheck; const unsigned char* dictionary; unsigned char* bufferStart; /* obsolete, used for slideInputBuffer */ unsigned int dictSize; } LZ4_stream_t_internal; typedef struct { const unsigned char* externalDict; size_t extDictSize; const unsigned char* prefixEnd; size_t prefixSize; } LZ4_streamDecode_t_internal; #endif /*! * LZ4_stream_t : * information structure to track an LZ4 stream. * init this structure before first use. * note : only use in association with static linking ! * this definition is not API/ABI safe, * it may change in a future version ! */ #define LZ4_STREAMSIZE_U64 ((1 << (LZ4_MEMORY_USAGE-3)) + 4) #define LZ4_STREAMSIZE (LZ4_STREAMSIZE_U64 * sizeof(unsigned long long)) union LZ4_stream_u { unsigned long long table[LZ4_STREAMSIZE_U64]; LZ4_stream_t_internal internal_donotuse; } ; /* previously typedef'd to LZ4_stream_t */ /*! * LZ4_streamDecode_t : * information structure to track an LZ4 stream during decompression. * init this structure using LZ4_setStreamDecode (or memset()) before first use * note : only use in association with static linking ! * this definition is not API/ABI safe, * and may change in a future version ! */ #define LZ4_STREAMDECODESIZE_U64 4 #define LZ4_STREAMDECODESIZE (LZ4_STREAMDECODESIZE_U64 * sizeof(unsigned long long)) union LZ4_streamDecode_u { unsigned long long table[LZ4_STREAMDECODESIZE_U64]; LZ4_streamDecode_t_internal internal_donotuse; } ; /* previously typedef'd to LZ4_streamDecode_t */ /*-************************************ * Obsolete Functions **************************************/ /*! Deprecation warnings Should deprecation warnings be a problem, it is generally possible to disable them, typically with -Wno-deprecated-declarations for gcc or _CRT_SECURE_NO_WARNINGS in Visual. Otherwise, it's also possible to define LZ4_DISABLE_DEPRECATE_WARNINGS */ #ifdef LZ4_DISABLE_DEPRECATE_WARNINGS # define LZ4_DEPRECATED(message) /* disable deprecation warnings */ #else # define LZ4_GCC_VERSION (__GNUC__ * 100 + __GNUC_MINOR__) # if defined(__clang__) /* clang doesn't handle mixed C++11 and CNU attributes */ # define LZ4_DEPRECATED(message) __attribute__((deprecated(message))) # elif defined (__cplusplus) && (__cplusplus >= 201402) /* C++14 or greater */ # define LZ4_DEPRECATED(message) [[deprecated(message)]] # elif (LZ4_GCC_VERSION >= 405) # define LZ4_DEPRECATED(message) __attribute__((deprecated(message))) # elif (LZ4_GCC_VERSION >= 301) # define LZ4_DEPRECATED(message) __attribute__((deprecated)) # elif defined(_MSC_VER) # define LZ4_DEPRECATED(message) __declspec(deprecated(message)) # else # pragma message("WARNING: You need to implement LZ4_DEPRECATED for this compiler") # define LZ4_DEPRECATED(message) # endif #endif /* LZ4_DISABLE_DEPRECATE_WARNINGS */ /* Obsolete compression functions */ LZ4LIB_API LZ4_DEPRECATED("use LZ4_compress_default() instead") int LZ4_compress (const char* source, char* dest, int sourceSize); LZ4LIB_API LZ4_DEPRECATED("use LZ4_compress_default() instead") int LZ4_compress_limitedOutput (const char* source, char* dest, int sourceSize, int maxOutputSize); LZ4LIB_API LZ4_DEPRECATED("use LZ4_compress_fast_extState() instead") int LZ4_compress_withState (void* state, const char* source, char* dest, int inputSize); LZ4LIB_API LZ4_DEPRECATED("use LZ4_compress_fast_extState() instead") int LZ4_compress_limitedOutput_withState (void* state, const char* source, char* dest, int inputSize, int maxOutputSize); LZ4LIB_API LZ4_DEPRECATED("use LZ4_compress_fast_continue() instead") int LZ4_compress_continue (LZ4_stream_t* LZ4_streamPtr, const char* source, char* dest, int inputSize); LZ4LIB_API LZ4_DEPRECATED("use LZ4_compress_fast_continue() instead") int LZ4_compress_limitedOutput_continue (LZ4_stream_t* LZ4_streamPtr, const char* source, char* dest, int inputSize, int maxOutputSize); /* Obsolete decompression functions */ LZ4LIB_API LZ4_DEPRECATED("use LZ4_decompress_fast() instead") int LZ4_uncompress (const char* source, char* dest, int outputSize); LZ4LIB_API LZ4_DEPRECATED("use LZ4_decompress_safe() instead") int LZ4_uncompress_unknownOutputSize (const char* source, char* dest, int isize, int maxOutputSize); /* Obsolete streaming functions; use new streaming interface whenever possible */ LZ4LIB_API LZ4_DEPRECATED("use LZ4_createStream() instead") void* LZ4_create (char* inputBuffer); LZ4LIB_API LZ4_DEPRECATED("use LZ4_createStream() instead") int LZ4_sizeofStreamState(void); LZ4LIB_API LZ4_DEPRECATED("use LZ4_resetStream() instead") int LZ4_resetStreamState(void* state, char* inputBuffer); LZ4LIB_API LZ4_DEPRECATED("use LZ4_saveDict() instead") char* LZ4_slideInputBuffer (void* state); /* Obsolete streaming decoding functions */ LZ4LIB_API LZ4_DEPRECATED("use LZ4_decompress_safe_usingDict() instead") int LZ4_decompress_safe_withPrefix64k (const char* src, char* dst, int compressedSize, int maxDstSize); LZ4LIB_API LZ4_DEPRECATED("use LZ4_decompress_fast_usingDict() instead") int LZ4_decompress_fast_withPrefix64k (const char* src, char* dst, int originalSize); #endif /* LZ4_H_2983827168210 */ #if defined (__cplusplus) } #endif ================================================ FILE: src/libraries/lz4/lz4hc.c ================================================ /* LZ4 HC - High Compression Mode of LZ4 Copyright (C) 2011-2017, Yann Collet. BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php) Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. You can contact the author at : - LZ4 source repository : https://github.com/lz4/lz4 - LZ4 public forum : https://groups.google.com/forum/#!forum/lz4c */ /* note : lz4hc is not an independent module, it requires lz4.h/lz4.c for proper compilation */ /* ************************************* * Tuning Parameter ***************************************/ /*! HEAPMODE : * Select how default compression function will allocate workplace memory, * in stack (0:fastest), or in heap (1:requires malloc()). * Since workplace is rather large, heap mode is recommended. */ #ifndef LZ4HC_HEAPMODE # define LZ4HC_HEAPMODE 1 #endif /*=== Dependency ===*/ #define LZ4_HC_STATIC_LINKING_ONLY #include "lz4hc.h" /*=== Common LZ4 definitions ===*/ #if defined(__GNUC__) # pragma GCC diagnostic ignored "-Wunused-function" #endif #if defined (__clang__) # pragma clang diagnostic ignored "-Wunused-function" #endif #define LZ4_COMMONDEFS_ONLY #include "lz4.c" /* LZ4_count, constants, mem */ /*=== Constants ===*/ #define OPTIMAL_ML (int)((ML_MASK-1)+MINMATCH) /*=== Macros ===*/ #define MIN(a,b) ( (a) < (b) ? (a) : (b) ) #define MAX(a,b) ( (a) > (b) ? (a) : (b) ) #define HASH_FUNCTION(i) (((i) * 2654435761U) >> ((MINMATCH*8)-LZ4HC_HASH_LOG)) #define DELTANEXTMAXD(p) chainTable[(p) & LZ4HC_MAXD_MASK] /* flexible, LZ4HC_MAXD dependent */ #define DELTANEXTU16(table, pos) table[(U16)(pos)] /* faster */ static U32 LZ4HC_hashPtr(const void* ptr) { return HASH_FUNCTION(LZ4_read32(ptr)); } /************************************** * HC Compression **************************************/ static void LZ4HC_init (LZ4HC_CCtx_internal* hc4, const BYTE* start) { MEM_INIT((void*)hc4->hashTable, 0, sizeof(hc4->hashTable)); MEM_INIT(hc4->chainTable, 0xFF, sizeof(hc4->chainTable)); hc4->nextToUpdate = 64 KB; hc4->base = start - 64 KB; hc4->end = start; hc4->dictBase = start - 64 KB; hc4->dictLimit = 64 KB; hc4->lowLimit = 64 KB; } /* Update chains up to ip (excluded) */ LZ4_FORCE_INLINE void LZ4HC_Insert (LZ4HC_CCtx_internal* hc4, const BYTE* ip) { U16* const chainTable = hc4->chainTable; U32* const hashTable = hc4->hashTable; const BYTE* const base = hc4->base; U32 const target = (U32)(ip - base); U32 idx = hc4->nextToUpdate; while (idx < target) { U32 const h = LZ4HC_hashPtr(base+idx); size_t delta = idx - hashTable[h]; if (delta>MAX_DISTANCE) delta = MAX_DISTANCE; DELTANEXTU16(chainTable, idx) = (U16)delta; hashTable[h] = idx; idx++; } hc4->nextToUpdate = target; } /** LZ4HC_countBack() : * @return : negative value, nb of common bytes before ip/match */ LZ4_FORCE_INLINE int LZ4HC_countBack(const BYTE* const ip, const BYTE* const match, const BYTE* const iMin, const BYTE* const mMin) { int back=0; while ( (ip+back > iMin) && (match+back > mMin) && (ip[back-1] == match[back-1])) back--; return back; } /* LZ4HC_countPattern() : * pattern32 must be a sample of repetitive pattern of length 1, 2 or 4 (but not 3!) */ static unsigned LZ4HC_countPattern(const BYTE* ip, const BYTE* const iEnd, U32 const pattern32) { const BYTE* const iStart = ip; reg_t const pattern = (sizeof(pattern)==8) ? (reg_t)pattern32 + (((reg_t)pattern32) << 32) : pattern32; while (likely(ip < iEnd-(sizeof(pattern)-1))) { reg_t const diff = LZ4_read_ARCH(ip) ^ pattern; if (!diff) { ip+=sizeof(pattern); continue; } ip += LZ4_NbCommonBytes(diff); return (unsigned)(ip - iStart); } if (LZ4_isLittleEndian()) { reg_t patternByte = pattern; while ((ip>= 8; } } else { /* big endian */ U32 bitOffset = (sizeof(pattern)*8) - 8; while (ip < iEnd) { BYTE const byte = (BYTE)(pattern >> bitOffset); if (*ip != byte) break; ip ++; bitOffset -= 8; } } return (unsigned)(ip - iStart); } /* LZ4HC_reverseCountPattern() : * pattern must be a sample of repetitive pattern of length 1, 2 or 4 (but not 3!) * read using natural platform endianess */ static unsigned LZ4HC_reverseCountPattern(const BYTE* ip, const BYTE* const iLow, U32 pattern) { const BYTE* const iStart = ip; while (likely(ip >= iLow+4)) { if (LZ4_read32(ip-4) != pattern) break; ip -= 4; } { const BYTE* bytePtr = (const BYTE*)(&pattern) + 3; /* works for any endianess */ while (likely(ip>iLow)) { if (ip[-1] != *bytePtr) break; ip--; bytePtr--; } } return (unsigned)(iStart - ip); } typedef enum { rep_untested, rep_not, rep_confirmed } repeat_state_e; LZ4_FORCE_INLINE int LZ4HC_InsertAndGetWiderMatch ( LZ4HC_CCtx_internal* hc4, const BYTE* const ip, const BYTE* const iLowLimit, const BYTE* const iHighLimit, int longest, const BYTE** matchpos, const BYTE** startpos, const int maxNbAttempts) { U16* const chainTable = hc4->chainTable; U32* const HashTable = hc4->hashTable; const BYTE* const base = hc4->base; const U32 dictLimit = hc4->dictLimit; const BYTE* const lowPrefixPtr = base + dictLimit; const U32 lowLimit = (hc4->lowLimit + 64 KB > (U32)(ip-base)) ? hc4->lowLimit : (U32)(ip - base) - MAX_DISTANCE; const BYTE* const dictBase = hc4->dictBase; int const delta = (int)(ip-iLowLimit); int nbAttempts = maxNbAttempts; U32 const pattern = LZ4_read32(ip); U32 matchIndex; repeat_state_e repeat = rep_untested; size_t srcPatternLength = 0; DEBUGLOG(7, "LZ4HC_InsertAndGetWiderMatch"); /* First Match */ LZ4HC_Insert(hc4, ip); matchIndex = HashTable[LZ4HC_hashPtr(ip)]; DEBUGLOG(7, "First match at index %u / %u (lowLimit)", matchIndex, lowLimit); while ((matchIndex>=lowLimit) && (nbAttempts)) { DEBUGLOG(7, "remaining attempts : %i", nbAttempts); nbAttempts--; if (matchIndex >= dictLimit) { const BYTE* const matchPtr = base + matchIndex; if (*(iLowLimit + longest) == *(matchPtr - delta + longest)) { if (LZ4_read32(matchPtr) == pattern) { int mlt = MINMATCH + LZ4_count(ip+MINMATCH, matchPtr+MINMATCH, iHighLimit); #if 0 /* more generic but unfortunately slower on clang */ int const back = LZ4HC_countBack(ip, matchPtr, iLowLimit, lowPrefixPtr); #else int back = 0; while ( (ip+back > iLowLimit) && (matchPtr+back > lowPrefixPtr) && (ip[back-1] == matchPtr[back-1])) { back--; } #endif mlt -= back; if (mlt > longest) { longest = mlt; *matchpos = matchPtr+back; *startpos = ip+back; } } } } else { /* matchIndex < dictLimit */ const BYTE* const matchPtr = dictBase + matchIndex; if (LZ4_read32(matchPtr) == pattern) { int mlt; int back = 0; const BYTE* vLimit = ip + (dictLimit - matchIndex); if (vLimit > iHighLimit) vLimit = iHighLimit; mlt = LZ4_count(ip+MINMATCH, matchPtr+MINMATCH, vLimit) + MINMATCH; if ((ip+mlt == vLimit) && (vLimit < iHighLimit)) mlt += LZ4_count(ip+mlt, base+dictLimit, iHighLimit); while ( (ip+back > iLowLimit) && (matchIndex+back > lowLimit) && (ip[back-1] == matchPtr[back-1])) back--; mlt -= back; if (mlt > longest) { longest = mlt; *matchpos = base + matchIndex + back; *startpos = ip + back; } } } { U32 const nextOffset = DELTANEXTU16(chainTable, matchIndex); matchIndex -= nextOffset; if (nextOffset==1) { /* may be a repeated pattern */ if (repeat == rep_untested) { if ( ((pattern & 0xFFFF) == (pattern >> 16)) & ((pattern & 0xFF) == (pattern >> 24)) ) { repeat = rep_confirmed; srcPatternLength = LZ4HC_countPattern(ip+4, iHighLimit, pattern) + 4; } else { repeat = rep_not; } } if ( (repeat == rep_confirmed) && (matchIndex >= dictLimit) ) { /* same segment only */ const BYTE* const matchPtr = base + matchIndex; if (LZ4_read32(matchPtr) == pattern) { /* good candidate */ size_t const forwardPatternLength = LZ4HC_countPattern(matchPtr+sizeof(pattern), iHighLimit, pattern) + sizeof(pattern); const BYTE* const maxLowPtr = (lowPrefixPtr + MAX_DISTANCE >= ip) ? lowPrefixPtr : ip - MAX_DISTANCE; size_t const backLength = LZ4HC_reverseCountPattern(matchPtr, maxLowPtr, pattern); size_t const currentSegmentLength = backLength + forwardPatternLength; if ( (currentSegmentLength >= srcPatternLength) /* current pattern segment large enough to contain full srcPatternLength */ && (forwardPatternLength <= srcPatternLength) ) { /* haven't reached this position yet */ matchIndex += (U32)forwardPatternLength - (U32)srcPatternLength; /* best position, full pattern, might be followed by more match */ } else { matchIndex -= (U32)backLength; /* let's go to farthest segment position, will find a match of length currentSegmentLength + maybe some back */ } } } } } } /* while ((matchIndex>=lowLimit) && (nbAttempts)) */ return longest; } LZ4_FORCE_INLINE int LZ4HC_InsertAndFindBestMatch(LZ4HC_CCtx_internal* const hc4, /* Index table will be updated */ const BYTE* const ip, const BYTE* const iLimit, const BYTE** matchpos, const int maxNbAttempts) { const BYTE* uselessPtr = ip; /* note : LZ4HC_InsertAndGetWiderMatch() is able to modify the starting position of a match (*startpos), * but this won't be the case here, as we define iLowLimit==ip, * so LZ4HC_InsertAndGetWiderMatch() won't be allowed to search past ip */ return LZ4HC_InsertAndGetWiderMatch(hc4, ip, ip, iLimit, MINMATCH-1, matchpos, &uselessPtr, maxNbAttempts); } typedef enum { noLimit = 0, limitedOutput = 1, limitedDestSize = 2, } limitedOutput_directive; /* LZ4HC_encodeSequence() : * @return : 0 if ok, * 1 if buffer issue detected */ LZ4_FORCE_INLINE int LZ4HC_encodeSequence ( const BYTE** ip, BYTE** op, const BYTE** anchor, int matchLength, const BYTE* const match, limitedOutput_directive limit, BYTE* oend) { size_t length; BYTE* const token = (*op)++; #if defined(LZ4_DEBUG) && (LZ4_DEBUG >= 2) static const BYTE* start = NULL; static U32 totalCost = 0; U32 const pos = (start==NULL) ? 0 : (U32)(*anchor - start); U32 const ll = (U32)(*ip - *anchor); U32 const llAdd = (ll>=15) ? ((ll-15) / 255) + 1 : 0; U32 const mlAdd = (matchLength>=19) ? ((matchLength-19) / 255) + 1 : 0; U32 const cost = 1 + llAdd + ll + 2 + mlAdd; if (start==NULL) start = *anchor; /* only works for single segment */ //g_debuglog_enable = (pos >= 2228) & (pos <= 2262); DEBUGLOG(2, "pos:%7u -- literals:%3u, match:%4i, offset:%5u, cost:%3u + %u", pos, (U32)(*ip - *anchor), matchLength, (U32)(*ip-match), cost, totalCost); totalCost += cost; #endif /* Encode Literal length */ length = (size_t)(*ip - *anchor); if ((limit) && ((*op + (length >> 8) + length + (2 + 1 + LASTLITERALS)) > oend)) return 1; /* Check output limit */ if (length >= RUN_MASK) { size_t len = length - RUN_MASK; *token = (RUN_MASK << ML_BITS); for(; len >= 255 ; len -= 255) *(*op)++ = 255; *(*op)++ = (BYTE)len; } else { *token = (BYTE)(length << ML_BITS); } /* Copy Literals */ LZ4_wildCopy(*op, *anchor, (*op) + length); *op += length; /* Encode Offset */ LZ4_writeLE16(*op, (U16)(*ip-match)); *op += 2; /* Encode MatchLength */ assert(matchLength >= MINMATCH); length = (size_t)(matchLength - MINMATCH); if ((limit) && (*op + (length >> 8) + (1 + LASTLITERALS) > oend)) return 1; /* Check output limit */ if (length >= ML_MASK) { *token += ML_MASK; length -= ML_MASK; for(; length >= 510 ; length -= 510) { *(*op)++ = 255; *(*op)++ = 255; } if (length >= 255) { length -= 255; *(*op)++ = 255; } *(*op)++ = (BYTE)length; } else { *token += (BYTE)(length); } /* Prepare next loop */ *ip += matchLength; *anchor = *ip; return 0; } /* btopt */ #include "lz4opt.h" static int LZ4HC_compress_hashChain ( LZ4HC_CCtx_internal* const ctx, const char* const source, char* const dest, int* srcSizePtr, int const maxOutputSize, unsigned maxNbAttempts, limitedOutput_directive limit ) { const int inputSize = *srcSizePtr; const BYTE* ip = (const BYTE*) source; const BYTE* anchor = ip; const BYTE* const iend = ip + inputSize; const BYTE* const mflimit = iend - MFLIMIT; const BYTE* const matchlimit = (iend - LASTLITERALS); BYTE* optr = (BYTE*) dest; BYTE* op = (BYTE*) dest; BYTE* oend = op + maxOutputSize; int ml, ml2, ml3, ml0; const BYTE* ref = NULL; const BYTE* start2 = NULL; const BYTE* ref2 = NULL; const BYTE* start3 = NULL; const BYTE* ref3 = NULL; const BYTE* start0; const BYTE* ref0; /* init */ *srcSizePtr = 0; if (limit == limitedDestSize && maxOutputSize < 1) return 0; /* Impossible to store anything */ if ((U32)inputSize > (U32)LZ4_MAX_INPUT_SIZE) return 0; /* Unsupported input size, too large (or negative) */ if (limit == limitedDestSize) oend -= LASTLITERALS; /* Hack for support limitations LZ4 decompressor */ if (inputSize < LZ4_minLength) goto _last_literals; /* Input too small, no compression (all literals) */ /* Main Loop */ while (ip < mflimit) { ml = LZ4HC_InsertAndFindBestMatch (ctx, ip, matchlimit, &ref, maxNbAttempts); if (ml ml1, and * ip1+3 <= ip2 (usually < ip1+ml1) */ if ((start2 - ip) < OPTIMAL_ML) { int correction; int new_ml = ml; if (new_ml > OPTIMAL_ML) new_ml = OPTIMAL_ML; if (ip+new_ml > start2 + ml2 - MINMATCH) new_ml = (int)(start2 - ip) + ml2 - MINMATCH; correction = new_ml - (int)(start2 - ip); if (correction > 0) { start2 += correction; ref2 += correction; ml2 -= correction; } } /* Now, we have start2 = ip+new_ml, with new_ml = min(ml, OPTIMAL_ML=18) */ if (start2 + ml2 < mflimit) ml3 = LZ4HC_InsertAndGetWiderMatch(ctx, start2 + ml2 - 3, start2, matchlimit, ml2, &ref3, &start3, maxNbAttempts); else ml3 = ml2; if (ml3 == ml2) { /* No better match : 2 sequences to encode */ /* ip & ref are known; Now for ml */ if (start2 < ip+ml) ml = (int)(start2 - ip); /* Now, encode 2 sequences */ optr = op; if (LZ4HC_encodeSequence(&ip, &op, &anchor, ml, ref, limit, oend)) goto _dest_overflow; ip = start2; optr = op; if (LZ4HC_encodeSequence(&ip, &op, &anchor, ml2, ref2, limit, oend)) goto _dest_overflow; continue; } if (start3 < ip+ml+3) { /* Not enough space for match 2 : remove it */ if (start3 >= (ip+ml)) { /* can write Seq1 immediately ==> Seq2 is removed, so Seq3 becomes Seq1 */ if (start2 < ip+ml) { int correction = (int)(ip+ml - start2); start2 += correction; ref2 += correction; ml2 -= correction; if (ml2 < MINMATCH) { start2 = start3; ref2 = ref3; ml2 = ml3; } } optr = op; if (LZ4HC_encodeSequence(&ip, &op, &anchor, ml, ref, limit, oend)) goto _dest_overflow; ip = start3; ref = ref3; ml = ml3; start0 = start2; ref0 = ref2; ml0 = ml2; goto _Search2; } start2 = start3; ref2 = ref3; ml2 = ml3; goto _Search3; } /* * OK, now we have 3 ascending matches; let's write at least the first one * ip & ref are known; Now for ml */ if (start2 < ip+ml) { if ((start2 - ip) < (int)ML_MASK) { int correction; if (ml > OPTIMAL_ML) ml = OPTIMAL_ML; if (ip + ml > start2 + ml2 - MINMATCH) ml = (int)(start2 - ip) + ml2 - MINMATCH; correction = ml - (int)(start2 - ip); if (correction > 0) { start2 += correction; ref2 += correction; ml2 -= correction; } } else { ml = (int)(start2 - ip); } } optr = op; if (LZ4HC_encodeSequence(&ip, &op, &anchor, ml, ref, limit, oend)) goto _dest_overflow; ip = start2; ref = ref2; ml = ml2; start2 = start3; ref2 = ref3; ml2 = ml3; goto _Search3; } _last_literals: /* Encode Last Literals */ { size_t lastRunSize = (size_t)(iend - anchor); /* literals */ size_t litLength = (lastRunSize + 255 - RUN_MASK) / 255; size_t const totalSize = 1 + litLength + lastRunSize; if (limit == limitedDestSize) oend += LASTLITERALS; /* restore correct value */ if (limit && (op + totalSize > oend)) { if (limit == limitedOutput) return 0; /* Check output limit */ /* adapt lastRunSize to fill 'dest' */ lastRunSize = (size_t)(oend - op) - 1; litLength = (lastRunSize + 255 - RUN_MASK) / 255; lastRunSize -= litLength; } ip = anchor + lastRunSize; if (lastRunSize >= RUN_MASK) { size_t accumulator = lastRunSize - RUN_MASK; *op++ = (RUN_MASK << ML_BITS); for(; accumulator >= 255 ; accumulator -= 255) *op++ = 255; *op++ = (BYTE) accumulator; } else { *op++ = (BYTE)(lastRunSize << ML_BITS); } memcpy(op, anchor, lastRunSize); op += lastRunSize; } /* End */ *srcSizePtr = (int) (((const char*)ip) - source); return (int) (((char*)op)-dest); _dest_overflow: if (limit == limitedDestSize) { op = optr; /* restore correct out pointer */ goto _last_literals; } return 0; } static int LZ4HC_compress_generic ( LZ4HC_CCtx_internal* const ctx, const char* const src, char* const dst, int* const srcSizePtr, int const dstCapacity, int cLevel, limitedOutput_directive limit ) { ctx->end += *srcSizePtr; if (cLevel < 1) cLevel = LZ4HC_CLEVEL_DEFAULT; /* note : convention is different from lz4frame, maybe something to review */ if (cLevel > 9) { if (limit == limitedDestSize) cLevel = 10; switch (cLevel) { case 10: return LZ4HC_compress_hashChain(ctx, src, dst, srcSizePtr, dstCapacity, 1<<12, limit); case 11: return LZ4HC_compress_optimal(ctx, src, dst, *srcSizePtr, dstCapacity, limit, 512, 128, 0); default: /* fall-through */ case 12: return LZ4HC_compress_optimal(ctx, src, dst, *srcSizePtr, dstCapacity, limit, 1<<13, LZ4_OPT_NUM, 1); } } return LZ4HC_compress_hashChain(ctx, src, dst, srcSizePtr, dstCapacity, 1 << (cLevel-1), limit); /* levels 1-9 */ } int LZ4_sizeofStateHC(void) { return sizeof(LZ4_streamHC_t); } int LZ4_compress_HC_extStateHC (void* state, const char* src, char* dst, int srcSize, int dstCapacity, int compressionLevel) { LZ4HC_CCtx_internal* const ctx = &((LZ4_streamHC_t*)state)->internal_donotuse; if (((size_t)(state)&(sizeof(void*)-1)) != 0) return 0; /* Error : state is not aligned for pointers (32 or 64 bits) */ LZ4HC_init (ctx, (const BYTE*)src); if (dstCapacity < LZ4_compressBound(srcSize)) return LZ4HC_compress_generic (ctx, src, dst, &srcSize, dstCapacity, compressionLevel, limitedOutput); else return LZ4HC_compress_generic (ctx, src, dst, &srcSize, dstCapacity, compressionLevel, noLimit); } int LZ4_compress_HC(const char* src, char* dst, int srcSize, int dstCapacity, int compressionLevel) { #if defined(LZ4HC_HEAPMODE) && LZ4HC_HEAPMODE==1 LZ4_streamHC_t* const statePtr = (LZ4_streamHC_t*)malloc(sizeof(LZ4_streamHC_t)); #else LZ4_streamHC_t state; LZ4_streamHC_t* const statePtr = &state; #endif int const cSize = LZ4_compress_HC_extStateHC(statePtr, src, dst, srcSize, dstCapacity, compressionLevel); #if defined(LZ4HC_HEAPMODE) && LZ4HC_HEAPMODE==1 free(statePtr); #endif return cSize; } /* LZ4_compress_HC_destSize() : * only compatible with Hash Chain match finder */ int LZ4_compress_HC_destSize(void* LZ4HC_Data, const char* source, char* dest, int* sourceSizePtr, int targetDestSize, int cLevel) { LZ4HC_CCtx_internal* const ctx = &((LZ4_streamHC_t*)LZ4HC_Data)->internal_donotuse; LZ4HC_init(ctx, (const BYTE*) source); return LZ4HC_compress_generic(ctx, source, dest, sourceSizePtr, targetDestSize, cLevel, limitedDestSize); } /************************************** * Streaming Functions **************************************/ /* allocation */ LZ4_streamHC_t* LZ4_createStreamHC(void) { return (LZ4_streamHC_t*)malloc(sizeof(LZ4_streamHC_t)); } int LZ4_freeStreamHC (LZ4_streamHC_t* LZ4_streamHCPtr) { if (!LZ4_streamHCPtr) return 0; /* support free on NULL */ free(LZ4_streamHCPtr); return 0; } /* initialization */ void LZ4_resetStreamHC (LZ4_streamHC_t* LZ4_streamHCPtr, int compressionLevel) { LZ4_STATIC_ASSERT(sizeof(LZ4HC_CCtx_internal) <= sizeof(size_t) * LZ4_STREAMHCSIZE_SIZET); /* if compilation fails here, LZ4_STREAMHCSIZE must be increased */ LZ4_streamHCPtr->internal_donotuse.base = NULL; LZ4_setCompressionLevel(LZ4_streamHCPtr, compressionLevel); } void LZ4_setCompressionLevel(LZ4_streamHC_t* LZ4_streamHCPtr, int compressionLevel) { if (compressionLevel < 1) compressionLevel = 1; if (compressionLevel > LZ4HC_CLEVEL_MAX) compressionLevel = LZ4HC_CLEVEL_MAX; LZ4_streamHCPtr->internal_donotuse.compressionLevel = compressionLevel; } int LZ4_loadDictHC (LZ4_streamHC_t* LZ4_streamHCPtr, const char* dictionary, int dictSize) { LZ4HC_CCtx_internal* const ctxPtr = &LZ4_streamHCPtr->internal_donotuse; if (dictSize > 64 KB) { dictionary += dictSize - 64 KB; dictSize = 64 KB; } LZ4HC_init (ctxPtr, (const BYTE*)dictionary); ctxPtr->end = (const BYTE*)dictionary + dictSize; if (dictSize >= 4) LZ4HC_Insert (ctxPtr, ctxPtr->end-3); return dictSize; } /* compression */ static void LZ4HC_setExternalDict(LZ4HC_CCtx_internal* ctxPtr, const BYTE* newBlock) { if (ctxPtr->end >= ctxPtr->base + 4) LZ4HC_Insert (ctxPtr, ctxPtr->end-3); /* Referencing remaining dictionary content */ /* Only one memory segment for extDict, so any previous extDict is lost at this stage */ ctxPtr->lowLimit = ctxPtr->dictLimit; ctxPtr->dictLimit = (U32)(ctxPtr->end - ctxPtr->base); ctxPtr->dictBase = ctxPtr->base; ctxPtr->base = newBlock - ctxPtr->dictLimit; ctxPtr->end = newBlock; ctxPtr->nextToUpdate = ctxPtr->dictLimit; /* match referencing will resume from there */ } static int LZ4_compressHC_continue_generic (LZ4_streamHC_t* LZ4_streamHCPtr, const char* src, char* dst, int* srcSizePtr, int dstCapacity, limitedOutput_directive limit) { LZ4HC_CCtx_internal* const ctxPtr = &LZ4_streamHCPtr->internal_donotuse; /* auto-init if forgotten */ if (ctxPtr->base == NULL) LZ4HC_init (ctxPtr, (const BYTE*) src); /* Check overflow */ if ((size_t)(ctxPtr->end - ctxPtr->base) > 2 GB) { size_t dictSize = (size_t)(ctxPtr->end - ctxPtr->base) - ctxPtr->dictLimit; if (dictSize > 64 KB) dictSize = 64 KB; LZ4_loadDictHC(LZ4_streamHCPtr, (const char*)(ctxPtr->end) - dictSize, (int)dictSize); } /* Check if blocks follow each other */ if ((const BYTE*)src != ctxPtr->end) LZ4HC_setExternalDict(ctxPtr, (const BYTE*)src); /* Check overlapping input/dictionary space */ { const BYTE* sourceEnd = (const BYTE*) src + *srcSizePtr; const BYTE* const dictBegin = ctxPtr->dictBase + ctxPtr->lowLimit; const BYTE* const dictEnd = ctxPtr->dictBase + ctxPtr->dictLimit; if ((sourceEnd > dictBegin) && ((const BYTE*)src < dictEnd)) { if (sourceEnd > dictEnd) sourceEnd = dictEnd; ctxPtr->lowLimit = (U32)(sourceEnd - ctxPtr->dictBase); if (ctxPtr->dictLimit - ctxPtr->lowLimit < 4) ctxPtr->lowLimit = ctxPtr->dictLimit; } } return LZ4HC_compress_generic (ctxPtr, src, dst, srcSizePtr, dstCapacity, ctxPtr->compressionLevel, limit); } int LZ4_compress_HC_continue (LZ4_streamHC_t* LZ4_streamHCPtr, const char* src, char* dst, int srcSize, int dstCapacity) { if (dstCapacity < LZ4_compressBound(srcSize)) return LZ4_compressHC_continue_generic (LZ4_streamHCPtr, src, dst, &srcSize, dstCapacity, limitedOutput); else return LZ4_compressHC_continue_generic (LZ4_streamHCPtr, src, dst, &srcSize, dstCapacity, noLimit); } int LZ4_compress_HC_continue_destSize (LZ4_streamHC_t* LZ4_streamHCPtr, const char* src, char* dst, int* srcSizePtr, int targetDestSize) { return LZ4_compressHC_continue_generic(LZ4_streamHCPtr, src, dst, srcSizePtr, targetDestSize, limitedDestSize); } /* dictionary saving */ int LZ4_saveDictHC (LZ4_streamHC_t* LZ4_streamHCPtr, char* safeBuffer, int dictSize) { LZ4HC_CCtx_internal* const streamPtr = &LZ4_streamHCPtr->internal_donotuse; int const prefixSize = (int)(streamPtr->end - (streamPtr->base + streamPtr->dictLimit)); if (dictSize > 64 KB) dictSize = 64 KB; if (dictSize < 4) dictSize = 0; if (dictSize > prefixSize) dictSize = prefixSize; memmove(safeBuffer, streamPtr->end - dictSize, dictSize); { U32 const endIndex = (U32)(streamPtr->end - streamPtr->base); streamPtr->end = (const BYTE*)safeBuffer + dictSize; streamPtr->base = streamPtr->end - endIndex; streamPtr->dictLimit = endIndex - dictSize; streamPtr->lowLimit = endIndex - dictSize; if (streamPtr->nextToUpdate < streamPtr->dictLimit) streamPtr->nextToUpdate = streamPtr->dictLimit; } return dictSize; } /*********************************** * Deprecated Functions ***********************************/ /* These functions currently generate deprecation warnings */ /* Deprecated compression functions */ int LZ4_compressHC(const char* src, char* dst, int srcSize) { return LZ4_compress_HC (src, dst, srcSize, LZ4_compressBound(srcSize), 0); } int LZ4_compressHC_limitedOutput(const char* src, char* dst, int srcSize, int maxDstSize) { return LZ4_compress_HC(src, dst, srcSize, maxDstSize, 0); } int LZ4_compressHC2(const char* src, char* dst, int srcSize, int cLevel) { return LZ4_compress_HC (src, dst, srcSize, LZ4_compressBound(srcSize), cLevel); } int LZ4_compressHC2_limitedOutput(const char* src, char* dst, int srcSize, int maxDstSize, int cLevel) { return LZ4_compress_HC(src, dst, srcSize, maxDstSize, cLevel); } int LZ4_compressHC_withStateHC (void* state, const char* src, char* dst, int srcSize) { return LZ4_compress_HC_extStateHC (state, src, dst, srcSize, LZ4_compressBound(srcSize), 0); } int LZ4_compressHC_limitedOutput_withStateHC (void* state, const char* src, char* dst, int srcSize, int maxDstSize) { return LZ4_compress_HC_extStateHC (state, src, dst, srcSize, maxDstSize, 0); } int LZ4_compressHC2_withStateHC (void* state, const char* src, char* dst, int srcSize, int cLevel) { return LZ4_compress_HC_extStateHC(state, src, dst, srcSize, LZ4_compressBound(srcSize), cLevel); } int LZ4_compressHC2_limitedOutput_withStateHC (void* state, const char* src, char* dst, int srcSize, int maxDstSize, int cLevel) { return LZ4_compress_HC_extStateHC(state, src, dst, srcSize, maxDstSize, cLevel); } int LZ4_compressHC_continue (LZ4_streamHC_t* ctx, const char* src, char* dst, int srcSize) { return LZ4_compress_HC_continue (ctx, src, dst, srcSize, LZ4_compressBound(srcSize)); } int LZ4_compressHC_limitedOutput_continue (LZ4_streamHC_t* ctx, const char* src, char* dst, int srcSize, int maxDstSize) { return LZ4_compress_HC_continue (ctx, src, dst, srcSize, maxDstSize); } /* Deprecated streaming functions */ int LZ4_sizeofStreamStateHC(void) { return LZ4_STREAMHCSIZE; } int LZ4_resetStreamStateHC(void* state, char* inputBuffer) { LZ4HC_CCtx_internal *ctx = &((LZ4_streamHC_t*)state)->internal_donotuse; if ((((size_t)state) & (sizeof(void*)-1)) != 0) return 1; /* Error : pointer is not aligned for pointer (32 or 64 bits) */ LZ4HC_init(ctx, (const BYTE*)inputBuffer); ctx->inputBuffer = (BYTE*)inputBuffer; return 0; } void* LZ4_createHC (char* inputBuffer) { LZ4_streamHC_t* hc4 = (LZ4_streamHC_t*)ALLOCATOR(1, sizeof(LZ4_streamHC_t)); if (hc4 == NULL) return NULL; /* not enough memory */ LZ4HC_init (&hc4->internal_donotuse, (const BYTE*)inputBuffer); hc4->internal_donotuse.inputBuffer = (BYTE*)inputBuffer; return hc4; } int LZ4_freeHC (void* LZ4HC_Data) { if (!LZ4HC_Data) return 0; /* support free on NULL */ FREEMEM(LZ4HC_Data); return 0; } int LZ4_compressHC2_continue (void* LZ4HC_Data, const char* src, char* dst, int srcSize, int cLevel) { return LZ4HC_compress_generic (&((LZ4_streamHC_t*)LZ4HC_Data)->internal_donotuse, src, dst, &srcSize, 0, cLevel, noLimit); } int LZ4_compressHC2_limitedOutput_continue (void* LZ4HC_Data, const char* src, char* dst, int srcSize, int dstCapacity, int cLevel) { return LZ4HC_compress_generic (&((LZ4_streamHC_t*)LZ4HC_Data)->internal_donotuse, src, dst, &srcSize, dstCapacity, cLevel, limitedOutput); } char* LZ4_slideInputBufferHC(void* LZ4HC_Data) { LZ4HC_CCtx_internal* const hc4 = &((LZ4_streamHC_t*)LZ4HC_Data)->internal_donotuse; int const dictSize = LZ4_saveDictHC((LZ4_streamHC_t*)LZ4HC_Data, (char*)(hc4->inputBuffer), 64 KB); return (char*)(hc4->inputBuffer + dictSize); } ================================================ FILE: src/libraries/lz4/lz4hc.h ================================================ /* LZ4 HC - High Compression Mode of LZ4 Header File Copyright (C) 2011-2017, Yann Collet. BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php) Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. You can contact the author at : - LZ4 source repository : https://github.com/lz4/lz4 - LZ4 public forum : https://groups.google.com/forum/#!forum/lz4c */ #ifndef LZ4_HC_H_19834876238432 #define LZ4_HC_H_19834876238432 #if defined (__cplusplus) extern "C" { #endif /* --- Dependency --- */ /* note : lz4hc requires lz4.h/lz4.c for compilation */ #include "lz4.h" /* stddef, LZ4LIB_API, LZ4_DEPRECATED */ /* --- Useful constants --- */ #define LZ4HC_CLEVEL_MIN 3 #define LZ4HC_CLEVEL_DEFAULT 9 #define LZ4HC_CLEVEL_OPT_MIN 11 #define LZ4HC_CLEVEL_MAX 12 /*-************************************ * Block Compression **************************************/ /*! LZ4_compress_HC() : * Compress data from `src` into `dst`, using the more powerful but slower "HC" algorithm. * `dst` must be already allocated. * Compression is guaranteed to succeed if `dstCapacity >= LZ4_compressBound(srcSize)` (see "lz4.h") * Max supported `srcSize` value is LZ4_MAX_INPUT_SIZE (see "lz4.h") * `compressionLevel` : any value between 1 and LZ4HC_CLEVEL_MAX will work. * Values > LZ4HC_CLEVEL_MAX behave the same as LZ4HC_CLEVEL_MAX. * @return : the number of bytes written into 'dst' * or 0 if compression fails. */ LZ4LIB_API int LZ4_compress_HC (const char* src, char* dst, int srcSize, int dstCapacity, int compressionLevel); /* Note : * Decompression functions are provided within "lz4.h" (BSD license) */ /*! LZ4_compress_HC_extStateHC() : * Same as LZ4_compress_HC(), but using an externally allocated memory segment for `state`. * `state` size is provided by LZ4_sizeofStateHC(). * Memory segment must be aligned on 8-bytes boundaries (which a normal malloc() should do properly). */ LZ4LIB_API int LZ4_sizeofStateHC(void); LZ4LIB_API int LZ4_compress_HC_extStateHC(void* state, const char* src, char* dst, int srcSize, int maxDstSize, int compressionLevel); /*-************************************ * Streaming Compression * Bufferless synchronous API **************************************/ typedef union LZ4_streamHC_u LZ4_streamHC_t; /* incomplete type (defined later) */ /*! LZ4_createStreamHC() and LZ4_freeStreamHC() : * These functions create and release memory for LZ4 HC streaming state. * Newly created states are automatically initialized. * Existing states can be re-used several times, using LZ4_resetStreamHC(). * These methods are API and ABI stable, they can be used in combination with a DLL. */ LZ4LIB_API LZ4_streamHC_t* LZ4_createStreamHC(void); LZ4LIB_API int LZ4_freeStreamHC (LZ4_streamHC_t* streamHCPtr); LZ4LIB_API void LZ4_resetStreamHC (LZ4_streamHC_t* streamHCPtr, int compressionLevel); LZ4LIB_API int LZ4_loadDictHC (LZ4_streamHC_t* streamHCPtr, const char* dictionary, int dictSize); LZ4LIB_API int LZ4_compress_HC_continue (LZ4_streamHC_t* streamHCPtr, const char* src, char* dst, int srcSize, int maxDstSize); LZ4LIB_API int LZ4_saveDictHC (LZ4_streamHC_t* streamHCPtr, char* safeBuffer, int maxDictSize); /* These functions compress data in successive blocks of any size, using previous blocks as dictionary. One key assumption is that previous blocks (up to 64 KB) remain read-accessible while compressing next blocks. There is an exception for ring buffers, which can be smaller than 64 KB. Ring buffers scenario is automatically detected and handled by LZ4_compress_HC_continue(). Before starting compression, state must be properly initialized, using LZ4_resetStreamHC(). A first "fictional block" can then be designated as initial dictionary, using LZ4_loadDictHC() (Optional). Then, use LZ4_compress_HC_continue() to compress each successive block. Previous memory blocks (including initial dictionary when present) must remain accessible and unmodified during compression. 'dst' buffer should be sized to handle worst case scenarios (see LZ4_compressBound()), to ensure operation success. Because in case of failure, the API does not guarantee context recovery, and context will have to be reset. If `dst` buffer budget cannot be >= LZ4_compressBound(), consider using LZ4_compress_HC_continue_destSize() instead. If, for any reason, previous data block can't be preserved unmodified in memory for next compression block, you can save it to a more stable memory space, using LZ4_saveDictHC(). Return value of LZ4_saveDictHC() is the size of dictionary effectively saved into 'safeBuffer'. */ /*-************************************************************** * PRIVATE DEFINITIONS : * Do not use these definitions. * They are exposed to allow static allocation of `LZ4_streamHC_t`. * Using these definitions makes the code vulnerable to potential API break when upgrading LZ4 ****************************************************************/ #define LZ4HC_DICTIONARY_LOGSIZE 16 #define LZ4HC_MAXD (1<= 199901L) /* C99 */) #include typedef struct { uint32_t hashTable[LZ4HC_HASHTABLESIZE]; uint16_t chainTable[LZ4HC_MAXD]; const uint8_t* end; /* next block here to continue on current prefix */ const uint8_t* base; /* All index relative to this position */ const uint8_t* dictBase; /* alternate base for extDict */ uint8_t* inputBuffer; /* deprecated */ uint32_t dictLimit; /* below that point, need extDict */ uint32_t lowLimit; /* below that point, no more dict */ uint32_t nextToUpdate; /* index from which to continue dictionary update */ int compressionLevel; } LZ4HC_CCtx_internal; #else typedef struct { unsigned int hashTable[LZ4HC_HASHTABLESIZE]; unsigned short chainTable[LZ4HC_MAXD]; const unsigned char* end; /* next block here to continue on current prefix */ const unsigned char* base; /* All index relative to this position */ const unsigned char* dictBase; /* alternate base for extDict */ unsigned char* inputBuffer; /* deprecated */ unsigned int dictLimit; /* below that point, need extDict */ unsigned int lowLimit; /* below that point, no more dict */ unsigned int nextToUpdate; /* index from which to continue dictionary update */ int compressionLevel; } LZ4HC_CCtx_internal; #endif #define LZ4_STREAMHCSIZE (4*LZ4HC_HASHTABLESIZE + 2*LZ4HC_MAXD + 56) /* 262200 */ #define LZ4_STREAMHCSIZE_SIZET (LZ4_STREAMHCSIZE / sizeof(size_t)) union LZ4_streamHC_u { size_t table[LZ4_STREAMHCSIZE_SIZET]; LZ4HC_CCtx_internal internal_donotuse; }; /* previously typedef'd to LZ4_streamHC_t */ /* LZ4_streamHC_t : This structure allows static allocation of LZ4 HC streaming state. State must be initialized using LZ4_resetStreamHC() before first use. Static allocation shall only be used in combination with static linking. When invoking LZ4 from a DLL, use create/free functions instead, which are API and ABI stable. */ /*-************************************ * Deprecated Functions **************************************/ /* see lz4.h LZ4_DISABLE_DEPRECATE_WARNINGS to turn off deprecation warnings */ /* deprecated compression functions */ LZ4LIB_API LZ4_DEPRECATED("use LZ4_compress_HC() instead") int LZ4_compressHC (const char* source, char* dest, int inputSize); LZ4LIB_API LZ4_DEPRECATED("use LZ4_compress_HC() instead") int LZ4_compressHC_limitedOutput (const char* source, char* dest, int inputSize, int maxOutputSize); LZ4LIB_API LZ4_DEPRECATED("use LZ4_compress_HC() instead") int LZ4_compressHC2 (const char* source, char* dest, int inputSize, int compressionLevel); LZ4LIB_API LZ4_DEPRECATED("use LZ4_compress_HC() instead") int LZ4_compressHC2_limitedOutput (const char* source, char* dest, int inputSize, int maxOutputSize, int compressionLevel); LZ4LIB_API LZ4_DEPRECATED("use LZ4_compress_HC_extStateHC() instead") int LZ4_compressHC_withStateHC (void* state, const char* source, char* dest, int inputSize); LZ4LIB_API LZ4_DEPRECATED("use LZ4_compress_HC_extStateHC() instead") int LZ4_compressHC_limitedOutput_withStateHC (void* state, const char* source, char* dest, int inputSize, int maxOutputSize); LZ4LIB_API LZ4_DEPRECATED("use LZ4_compress_HC_extStateHC() instead") int LZ4_compressHC2_withStateHC (void* state, const char* source, char* dest, int inputSize, int compressionLevel); LZ4LIB_API LZ4_DEPRECATED("use LZ4_compress_HC_extStateHC() instead") int LZ4_compressHC2_limitedOutput_withStateHC(void* state, const char* source, char* dest, int inputSize, int maxOutputSize, int compressionLevel); LZ4LIB_API LZ4_DEPRECATED("use LZ4_compress_HC_continue() instead") int LZ4_compressHC_continue (LZ4_streamHC_t* LZ4_streamHCPtr, const char* source, char* dest, int inputSize); LZ4LIB_API LZ4_DEPRECATED("use LZ4_compress_HC_continue() instead") int LZ4_compressHC_limitedOutput_continue (LZ4_streamHC_t* LZ4_streamHCPtr, const char* source, char* dest, int inputSize, int maxOutputSize); /* Deprecated Streaming functions using older model; should no longer be used */ LZ4LIB_API LZ4_DEPRECATED("use LZ4_createStreamHC() instead") void* LZ4_createHC (char* inputBuffer); LZ4LIB_API LZ4_DEPRECATED("use LZ4_saveDictHC() instead") char* LZ4_slideInputBufferHC (void* LZ4HC_Data); LZ4LIB_API LZ4_DEPRECATED("use LZ4_freeStreamHC() instead") int LZ4_freeHC (void* LZ4HC_Data); LZ4LIB_API LZ4_DEPRECATED("use LZ4_compress_HC_continue() instead") int LZ4_compressHC2_continue (void* LZ4HC_Data, const char* source, char* dest, int inputSize, int compressionLevel); LZ4LIB_API LZ4_DEPRECATED("use LZ4_compress_HC_continue() instead") int LZ4_compressHC2_limitedOutput_continue (void* LZ4HC_Data, const char* source, char* dest, int inputSize, int maxOutputSize, int compressionLevel); LZ4LIB_API LZ4_DEPRECATED("use LZ4_createStreamHC() instead") int LZ4_sizeofStreamStateHC(void); LZ4LIB_API LZ4_DEPRECATED("use LZ4_resetStreamHC() instead") int LZ4_resetStreamStateHC(void* state, char* inputBuffer); #if defined (__cplusplus) } #endif #endif /* LZ4_HC_H_19834876238432 */ /*-************************************************** * !!!!! STATIC LINKING ONLY !!!!! * Following definitions are considered experimental. * They should not be linked from DLL, * as there is no guarantee of API stability yet. * Prototypes will be promoted to "stable" status * after successfull usage in real-life scenarios. ***************************************************/ #ifdef LZ4_HC_STATIC_LINKING_ONLY /* protection macro */ #ifndef LZ4_HC_SLO_098092834 #define LZ4_HC_SLO_098092834 /*! LZ4_compress_HC_destSize() : v1.8.0 (experimental) * Will try to compress as much data from `src` as possible * that can fit into `targetDstSize` budget. * Result is provided in 2 parts : * @return : the number of bytes written into 'dst' * or 0 if compression fails. * `srcSizePtr` : value will be updated to indicate how much bytes were read from `src` */ int LZ4_compress_HC_destSize(void* LZ4HC_Data, const char* src, char* dst, int* srcSizePtr, int targetDstSize, int compressionLevel); /*! LZ4_compress_HC_continue_destSize() : v1.8.0 (experimental) * Similar as LZ4_compress_HC_continue(), * but will read a variable nb of bytes from `src` * to fit into `targetDstSize` budget. * Result is provided in 2 parts : * @return : the number of bytes written into 'dst' * or 0 if compression fails. * `srcSizePtr` : value will be updated to indicate how much bytes were read from `src`. */ int LZ4_compress_HC_continue_destSize(LZ4_streamHC_t* LZ4_streamHCPtr, const char* src, char* dst, int* srcSizePtr, int targetDstSize); /*! LZ4_setCompressionLevel() : v1.8.0 (experimental) * It's possible to change compression level between 2 invocations of LZ4_compress_HC_continue*() */ void LZ4_setCompressionLevel(LZ4_streamHC_t* LZ4_streamHCPtr, int compressionLevel); #endif /* LZ4_HC_SLO_098092834 */ #endif /* LZ4_HC_STATIC_LINKING_ONLY */ ================================================ FILE: src/libraries/lz4/lz4opt.h ================================================ /* lz4opt.h - Optimal Mode of LZ4 Copyright (C) 2015-2017, Przemyslaw Skibinski Note : this file is intended to be included within lz4hc.c BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php) Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. You can contact the author at : - LZ4 source repository : https://github.com/lz4/lz4 - LZ4 public forum : https://groups.google.com/forum/#!forum/lz4c */ #define LZ4_OPT_NUM (1<<12) typedef struct { int price; int off; int mlen; int litlen; } LZ4HC_optimal_t; /* price in bytes */ LZ4_FORCE_INLINE int LZ4HC_literalsPrice(int const litlen) { int price = litlen; if (litlen >= (int)RUN_MASK) price += 1 + (litlen-RUN_MASK)/255; return price; } /* requires mlen >= MINMATCH */ LZ4_FORCE_INLINE int LZ4HC_sequencePrice(int litlen, int mlen) { int price = 1 + 2 ; /* token + 16-bit offset */ price += LZ4HC_literalsPrice(litlen); if (mlen >= (int)(ML_MASK+MINMATCH)) price += 1 + (mlen-(ML_MASK+MINMATCH))/255; return price; } /*-************************************* * Match finder ***************************************/ typedef struct { int off; int len; } LZ4HC_match_t; LZ4_FORCE_INLINE LZ4HC_match_t LZ4HC_FindLongerMatch(LZ4HC_CCtx_internal* const ctx, const BYTE* ip, const BYTE* const iHighLimit, int minLen, int nbSearches) { LZ4HC_match_t match = { 0 , 0 }; const BYTE* matchPtr = NULL; /* note : LZ4HC_InsertAndGetWiderMatch() is able to modify the starting position of a match (*startpos), * but this won't be the case here, as we define iLowLimit==ip, * so LZ4HC_InsertAndGetWiderMatch() won't be allowed to search past ip */ int const matchLength = LZ4HC_InsertAndGetWiderMatch(ctx, ip, ip, iHighLimit, minLen, &matchPtr, &ip, nbSearches); if (matchLength <= minLen) return match; match.len = matchLength; match.off = (int)(ip-matchPtr); return match; } static int LZ4HC_compress_optimal ( LZ4HC_CCtx_internal* ctx, const char* const source, char* dst, int inputSize, int dstCapacity, limitedOutput_directive limit, int const nbSearches, size_t sufficient_len, int const fullUpdate ) { #define TRAILING_LITERALS 3 LZ4HC_optimal_t opt[LZ4_OPT_NUM + TRAILING_LITERALS]; /* this uses a bit too much stack memory to my taste ... */ const BYTE* ip = (const BYTE*) source; const BYTE* anchor = ip; const BYTE* const iend = ip + inputSize; const BYTE* const mflimit = iend - MFLIMIT; const BYTE* const matchlimit = iend - LASTLITERALS; BYTE* op = (BYTE*) dst; BYTE* const oend = op + dstCapacity; /* init */ DEBUGLOG(5, "LZ4HC_compress_optimal"); if (sufficient_len >= LZ4_OPT_NUM) sufficient_len = LZ4_OPT_NUM-1; /* Main Loop */ assert(ip - anchor < LZ4_MAX_INPUT_SIZE); while (ip < mflimit) { int const llen = (int)(ip - anchor); int best_mlen, best_off; int cur, last_match_pos = 0; LZ4HC_match_t const firstMatch = LZ4HC_FindLongerMatch(ctx, ip, matchlimit, MINMATCH-1, nbSearches); if (firstMatch.len==0) { ip++; continue; } if ((size_t)firstMatch.len > sufficient_len) { /* good enough solution : immediate encoding */ int const firstML = firstMatch.len; const BYTE* const matchPos = ip - firstMatch.off; if ( LZ4HC_encodeSequence(&ip, &op, &anchor, firstML, matchPos, limit, oend) ) /* updates ip, op and anchor */ return 0; /* error */ continue; } /* set prices for first positions (literals) */ { int rPos; for (rPos = 0 ; rPos < MINMATCH ; rPos++) { int const cost = LZ4HC_literalsPrice(llen + rPos); opt[rPos].mlen = 1; opt[rPos].off = 0; opt[rPos].litlen = llen + rPos; opt[rPos].price = cost; DEBUGLOG(7, "rPos:%3i => price:%3i (litlen=%i) -- initial setup", rPos, cost, opt[rPos].litlen); } } /* set prices using initial match */ { int mlen = MINMATCH; int const matchML = firstMatch.len; /* necessarily < sufficient_len < LZ4_OPT_NUM */ int const offset = firstMatch.off; assert(matchML < LZ4_OPT_NUM); for ( ; mlen <= matchML ; mlen++) { int const cost = LZ4HC_sequencePrice(llen, mlen); opt[mlen].mlen = mlen; opt[mlen].off = offset; opt[mlen].litlen = llen; opt[mlen].price = cost; DEBUGLOG(7, "rPos:%3i => price:%3i (matchlen=%i) -- initial setup", mlen, cost, mlen); } } last_match_pos = firstMatch.len; { int addLit; for (addLit = 1; addLit <= TRAILING_LITERALS; addLit ++) { opt[last_match_pos+addLit].mlen = 1; /* literal */ opt[last_match_pos+addLit].off = 0; opt[last_match_pos+addLit].litlen = addLit; opt[last_match_pos+addLit].price = opt[last_match_pos].price + LZ4HC_literalsPrice(addLit); DEBUGLOG(7, "rPos:%3i => price:%3i (litlen=%i) -- initial setup", last_match_pos+addLit, opt[last_match_pos+addLit].price, addLit); } } /* check further positions */ for (cur = 1; cur < last_match_pos; cur++) { const BYTE* const curPtr = ip + cur; LZ4HC_match_t newMatch; if (curPtr >= mflimit) break; DEBUGLOG(7, "rPos:%u[%u] vs [%u]%u", cur, opt[cur].price, opt[cur+1].price, cur+1); if (fullUpdate) { /* not useful to search here if next position has same (or lower) cost */ if ( (opt[cur+1].price <= opt[cur].price) /* in some cases, next position has same cost, but cost rises sharply after, so a small match would still be beneficial */ && (opt[cur+MINMATCH].price < opt[cur].price + 3/*min seq price*/) ) continue; } else { /* not useful to search here if next position has same (or lower) cost */ if (opt[cur+1].price <= opt[cur].price) continue; } DEBUGLOG(7, "search at rPos:%u", cur); if (fullUpdate) newMatch = LZ4HC_FindLongerMatch(ctx, curPtr, matchlimit, MINMATCH-1, nbSearches); else /* only test matches of minimum length; slightly faster, but misses a few bytes */ newMatch = LZ4HC_FindLongerMatch(ctx, curPtr, matchlimit, last_match_pos - cur, nbSearches); if (!newMatch.len) continue; if ( ((size_t)newMatch.len > sufficient_len) || (newMatch.len + cur >= LZ4_OPT_NUM) ) { /* immediate encoding */ best_mlen = newMatch.len; best_off = newMatch.off; last_match_pos = cur + 1; goto encode; } /* before match : set price with literals at beginning */ { int const baseLitlen = opt[cur].litlen; int litlen; for (litlen = 1; litlen < MINMATCH; litlen++) { int const price = opt[cur].price - LZ4HC_literalsPrice(baseLitlen) + LZ4HC_literalsPrice(baseLitlen+litlen); int const pos = cur + litlen; if (price < opt[pos].price) { opt[pos].mlen = 1; /* literal */ opt[pos].off = 0; opt[pos].litlen = baseLitlen+litlen; opt[pos].price = price; DEBUGLOG(7, "rPos:%3i => price:%3i (litlen=%i)", pos, price, opt[pos].litlen); } } } /* set prices using match at position = cur */ { int const matchML = newMatch.len; int ml = MINMATCH; assert(cur + newMatch.len < LZ4_OPT_NUM); for ( ; ml <= matchML ; ml++) { int const pos = cur + ml; int const offset = newMatch.off; int price; int ll; DEBUGLOG(7, "testing price rPos %i (last_match_pos=%i)", pos, last_match_pos); if (opt[cur].mlen == 1) { ll = opt[cur].litlen; price = ((cur > ll) ? opt[cur - ll].price : 0) + LZ4HC_sequencePrice(ll, ml); } else { ll = 0; price = opt[cur].price + LZ4HC_sequencePrice(0, ml); } if (pos > last_match_pos+TRAILING_LITERALS || price <= opt[pos].price) { DEBUGLOG(7, "rPos:%3i => price:%3i (matchlen=%i)", pos, price, ml); assert(pos < LZ4_OPT_NUM); if ( (ml == matchML) /* last pos of last match */ && (last_match_pos < pos) ) last_match_pos = pos; opt[pos].mlen = ml; opt[pos].off = offset; opt[pos].litlen = ll; opt[pos].price = price; } } } /* complete following positions with literals */ { int addLit; for (addLit = 1; addLit <= TRAILING_LITERALS; addLit ++) { opt[last_match_pos+addLit].mlen = 1; /* literal */ opt[last_match_pos+addLit].off = 0; opt[last_match_pos+addLit].litlen = addLit; opt[last_match_pos+addLit].price = opt[last_match_pos].price + LZ4HC_literalsPrice(addLit); DEBUGLOG(7, "rPos:%3i => price:%3i (litlen=%i)", last_match_pos+addLit, opt[last_match_pos+addLit].price, addLit); } } } /* for (cur = 1; cur <= last_match_pos; cur++) */ best_mlen = opt[last_match_pos].mlen; best_off = opt[last_match_pos].off; cur = last_match_pos - best_mlen; encode: /* cur, last_match_pos, best_mlen, best_off must be set */ assert(cur < LZ4_OPT_NUM); assert(last_match_pos >= 1); /* == 1 when only one candidate */ DEBUGLOG(6, "reverse traversal, looking for shortest path") DEBUGLOG(6, "last_match_pos = %i", last_match_pos); { int candidate_pos = cur; int selected_matchLength = best_mlen; int selected_offset = best_off; while (1) { /* from end to beginning */ int const next_matchLength = opt[candidate_pos].mlen; /* can be 1, means literal */ int const next_offset = opt[candidate_pos].off; DEBUGLOG(6, "pos %i: sequence length %i", candidate_pos, selected_matchLength); opt[candidate_pos].mlen = selected_matchLength; opt[candidate_pos].off = selected_offset; selected_matchLength = next_matchLength; selected_offset = next_offset; if (next_matchLength > candidate_pos) break; /* last match elected, first match to encode */ assert(next_matchLength > 0); /* can be 1, means literal */ candidate_pos -= next_matchLength; } } /* encode all recorded sequences in order */ { int rPos = 0; /* relative position (to ip) */ while (rPos < last_match_pos) { int const ml = opt[rPos].mlen; int const offset = opt[rPos].off; if (ml == 1) { ip++; rPos++; continue; } /* literal; note: can end up with several literals, in which case, skip them */ rPos += ml; assert(ml >= MINMATCH); assert((offset >= 1) && (offset <= MAX_DISTANCE)); if ( LZ4HC_encodeSequence(&ip, &op, &anchor, ml, ip - offset, limit, oend) ) /* updates ip, op and anchor */ return 0; /* error */ } } } /* while (ip < mflimit) */ /* Encode Last Literals */ { int lastRun = (int)(iend - anchor); if ( (limit) && (((char*)op - dst) + lastRun + 1 + ((lastRun+255-RUN_MASK)/255) > (U32)dstCapacity)) return 0; /* Check output limit */ if (lastRun >= (int)RUN_MASK) { *op++=(RUN_MASK< 254 ; lastRun-=255) *op++ = 255; *op++ = (BYTE) lastRun; } else *op++ = (BYTE)(lastRun<0) ? ((int)x) : ((int)x-1 ) ) #define LERP(t, a, b) ((a) + (t)*((b)-(a))) //--------------------------------------------------------------------- // Static data /* * Permutation table. This is just a random jumble of all numbers 0-255, * repeated twice to avoid wrapping the index at 255 for each lookup. * This needs to be exactly the same for all instances on all platforms, * so it's easiest to just keep it as static explicit data. * This also removes the need for any initialisation of this class. * * Note that making this an int[] instead of a char[] might make the * code run faster on platforms with a high penalty for unaligned single * byte addressing. Intel x86 is generally single-byte-friendly, but * some other CPUs are faster with 4-aligned reads. * However, a char[] is smaller, which avoids cache trashing, and that * is probably the most important aspect on most architectures. * This array is accessed a *lot* by the noise functions. * A vector-valued noise over 3D accesses it 96 times, and a * float-valued 4D noise 64 times. We want this to fit in the cache! */ unsigned char Noise1234::perm[] = {151,160,137,91,90,15, 131,13,201,95,96,53,194,233,7,225,140,36,103,30,69,142,8,99,37,240,21,10,23, 190, 6,148,247,120,234,75,0,26,197,62,94,252,219,203,117,35,11,32,57,177,33, 88,237,149,56,87,174,20,125,136,171,168, 68,175,74,165,71,134,139,48,27,166, 77,146,158,231,83,111,229,122,60,211,133,230,220,105,92,41,55,46,245,40,244, 102,143,54, 65,25,63,161, 1,216,80,73,209,76,132,187,208, 89,18,169,200,196, 135,130,116,188,159,86,164,100,109,198,173,186, 3,64,52,217,226,250,124,123, 5,202,38,147,118,126,255,82,85,212,207,206,59,227,47,16,58,17,182,189,28,42, 223,183,170,213,119,248,152, 2,44,154,163, 70,221,153,101,155,167, 43,172,9, 129,22,39,253, 19,98,108,110,79,113,224,232,178,185, 112,104,218,246,97,228, 251,34,242,193,238,210,144,12,191,179,162,241, 81,51,145,235,249,14,239,107, 49,192,214, 31,181,199,106,157,184, 84,204,176,115,121,50,45,127, 4,150,254, 138,236,205,93,222,114,67,29,24,72,243,141,128,195,78,66,215,61,156,180, 151,160,137,91,90,15, 131,13,201,95,96,53,194,233,7,225,140,36,103,30,69,142,8,99,37,240,21,10,23, 190, 6,148,247,120,234,75,0,26,197,62,94,252,219,203,117,35,11,32,57,177,33, 88,237,149,56,87,174,20,125,136,171,168, 68,175,74,165,71,134,139,48,27,166, 77,146,158,231,83,111,229,122,60,211,133,230,220,105,92,41,55,46,245,40,244, 102,143,54, 65,25,63,161, 1,216,80,73,209,76,132,187,208, 89,18,169,200,196, 135,130,116,188,159,86,164,100,109,198,173,186, 3,64,52,217,226,250,124,123, 5,202,38,147,118,126,255,82,85,212,207,206,59,227,47,16,58,17,182,189,28,42, 223,183,170,213,119,248,152, 2,44,154,163, 70,221,153,101,155,167, 43,172,9, 129,22,39,253, 19,98,108,110,79,113,224,232,178,185, 112,104,218,246,97,228, 251,34,242,193,238,210,144,12,191,179,162,241, 81,51,145,235,249,14,239,107, 49,192,214, 31,181,199,106,157,184, 84,204,176,115,121,50,45,127, 4,150,254, 138,236,205,93,222,114,67,29,24,72,243,141,128,195,78,66,215,61,156,180 }; //--------------------------------------------------------------------- /* * Helper functions to compute gradients-dot-residualvectors (1D to 4D) * Note that these generate gradients of more than unit length. To make * a close match with the value range of classic Perlin noise, the final * noise values need to be rescaled. To match the RenderMan noise in a * statistical sense, the approximate scaling values (empirically * determined from test renderings) are: * 1D noise needs rescaling with 0.188 * 2D noise needs rescaling with 0.507 * 3D noise needs rescaling with 0.936 * 4D noise needs rescaling with 0.87 * Note that these noise functions are the most practical and useful * signed version of Perlin noise. To return values according to the * RenderMan specification from the SL noise() and pnoise() functions, * the noise values need to be scaled and offset to [0,1], like this: * float SLnoise = (Noise1234::noise(x,y,z) + 1.0) * 0.5; */ double Noise1234::grad( int hash, double x ) { int h = hash & 15; double grad = 1.0 + (h & 7); // Gradient value 1.0, 2.0, ..., 8.0 if (h&8) grad = -grad; // and a random sign for the gradient return ( grad * x ); // Multiply the gradient with the distance } double Noise1234::grad( int hash, double x, double y ) { int h = hash & 7; // Convert low 3 bits of hash code double u = h<4 ? x : y; // into 8 simple gradient directions, double v = h<4 ? y : x; // and compute the dot product with (x,y). return ((h&1)? -u : u) + ((h&2)? -2.0*v : 2.0*v); } double Noise1234::grad( int hash, double x, double y , double z ) { int h = hash & 15; // Convert low 4 bits of hash code into 12 simple double u = h<8 ? x : y; // gradient directions, and compute dot product. double v = h<4 ? y : h==12||h==14 ? x : z; // Fix repeats at h = 12 to 15 return ((h&1)? -u : u) + ((h&2)? -v : v); } double Noise1234::grad( int hash, double x, double y, double z, double t ) { int h = hash & 31; // Convert low 5 bits of hash code into 32 simple double u = h<24 ? x : y; // gradient directions, and compute dot product. double v = h<16 ? y : z; double w = h<8 ? z : t; return ((h&1)? -u : u) + ((h&2)? -v : v) + ((h&4)? -w : w); } //--------------------------------------------------------------------- /** 1D float Perlin noise, SL "noise()" */ double Noise1234::noise( double x ) { int ix0, ix1; double fx0, fx1; double s, n0, n1; ix0 = FASTFLOOR( x ); // Integer part of x fx0 = x - ix0; // Fractional part of x fx1 = fx0 - 1.0; ix1 = ( ix0+1 ) & 0xff; ix0 = ix0 & 0xff; // Wrap to 0..255 s = FADE( fx0 ); n0 = grad( perm[ ix0 ], fx0 ); n1 = grad( perm[ ix1 ], fx1 ); return 0.188 * ( LERP( s, n0, n1 ) ); } //--------------------------------------------------------------------- /** 1D float Perlin periodic noise, SL "pnoise()" */ double Noise1234::pnoise( double x, int px ) { int ix0, ix1; double fx0, fx1; double s, n0, n1; ix0 = FASTFLOOR( x ); // Integer part of x fx0 = x - ix0; // Fractional part of x fx1 = fx0 - 1.0; ix1 = (( ix0 + 1 ) % px) & 0xff; // Wrap to 0..px-1 *and* wrap to 0..255 ix0 = ( ix0 % px ) & 0xff; // (because px might be greater than 256) s = FADE( fx0 ); n0 = grad( perm[ ix0 ], fx0 ); n1 = grad( perm[ ix1 ], fx1 ); return 0.188 * ( LERP( s, n0, n1 ) ); } //--------------------------------------------------------------------- /** 2D float Perlin noise. */ double Noise1234::noise( double x, double y ) { int ix0, iy0, ix1, iy1; double fx0, fy0, fx1, fy1; double s, t, nx0, nx1, n0, n1; ix0 = FASTFLOOR( x ); // Integer part of x iy0 = FASTFLOOR( y ); // Integer part of y fx0 = x - ix0; // Fractional part of x fy0 = y - iy0; // Fractional part of y fx1 = fx0 - 1.0; fy1 = fy0 - 1.0; ix1 = (ix0 + 1) & 0xff; // Wrap to 0..255 iy1 = (iy0 + 1) & 0xff; ix0 = ix0 & 0xff; iy0 = iy0 & 0xff; t = FADE( fy0 ); s = FADE( fx0 ); nx0 = grad(perm[ix0 + perm[iy0]], fx0, fy0); nx1 = grad(perm[ix0 + perm[iy1]], fx0, fy1); n0 = LERP( t, nx0, nx1 ); nx0 = grad(perm[ix1 + perm[iy0]], fx1, fy0); nx1 = grad(perm[ix1 + perm[iy1]], fx1, fy1); n1 = LERP(t, nx0, nx1); return 0.507 * ( LERP( s, n0, n1 ) ); } //--------------------------------------------------------------------- /** 2D float Perlin periodic noise. */ double Noise1234::pnoise( double x, double y, int px, int py ) { int ix0, iy0, ix1, iy1; double fx0, fy0, fx1, fy1; double s, t, nx0, nx1, n0, n1; ix0 = FASTFLOOR( x ); // Integer part of x iy0 = FASTFLOOR( y ); // Integer part of y fx0 = x - ix0; // Fractional part of x fy0 = y - iy0; // Fractional part of y fx1 = fx0 - 1.0; fy1 = fy0 - 1.0; ix1 = (( ix0 + 1 ) % px) & 0xff; // Wrap to 0..px-1 and wrap to 0..255 iy1 = (( iy0 + 1 ) % py) & 0xff; // Wrap to 0..py-1 and wrap to 0..255 ix0 = ( ix0 % px ) & 0xff; iy0 = ( iy0 % py ) & 0xff; t = FADE( fy0 ); s = FADE( fx0 ); nx0 = grad(perm[ix0 + perm[iy0]], fx0, fy0); nx1 = grad(perm[ix0 + perm[iy1]], fx0, fy1); n0 = LERP( t, nx0, nx1 ); nx0 = grad(perm[ix1 + perm[iy0]], fx1, fy0); nx1 = grad(perm[ix1 + perm[iy1]], fx1, fy1); n1 = LERP(t, nx0, nx1); return 0.507 * ( LERP( s, n0, n1 ) ); } //--------------------------------------------------------------------- /** 3D float Perlin noise. */ double Noise1234::noise( double x, double y, double z ) { int ix0, iy0, ix1, iy1, iz0, iz1; double fx0, fy0, fz0, fx1, fy1, fz1; double s, t, r; double nxy0, nxy1, nx0, nx1, n0, n1; ix0 = FASTFLOOR( x ); // Integer part of x iy0 = FASTFLOOR( y ); // Integer part of y iz0 = FASTFLOOR( z ); // Integer part of z fx0 = x - ix0; // Fractional part of x fy0 = y - iy0; // Fractional part of y fz0 = z - iz0; // Fractional part of z fx1 = fx0 - 1.0; fy1 = fy0 - 1.0; fz1 = fz0 - 1.0; ix1 = ( ix0 + 1 ) & 0xff; // Wrap to 0..255 iy1 = ( iy0 + 1 ) & 0xff; iz1 = ( iz0 + 1 ) & 0xff; ix0 = ix0 & 0xff; iy0 = iy0 & 0xff; iz0 = iz0 & 0xff; r = FADE( fz0 ); t = FADE( fy0 ); s = FADE( fx0 ); nxy0 = grad(perm[ix0 + perm[iy0 + perm[iz0]]], fx0, fy0, fz0); nxy1 = grad(perm[ix0 + perm[iy0 + perm[iz1]]], fx0, fy0, fz1); nx0 = LERP( r, nxy0, nxy1 ); nxy0 = grad(perm[ix0 + perm[iy1 + perm[iz0]]], fx0, fy1, fz0); nxy1 = grad(perm[ix0 + perm[iy1 + perm[iz1]]], fx0, fy1, fz1); nx1 = LERP( r, nxy0, nxy1 ); n0 = LERP( t, nx0, nx1 ); nxy0 = grad(perm[ix1 + perm[iy0 + perm[iz0]]], fx1, fy0, fz0); nxy1 = grad(perm[ix1 + perm[iy0 + perm[iz1]]], fx1, fy0, fz1); nx0 = LERP( r, nxy0, nxy1 ); nxy0 = grad(perm[ix1 + perm[iy1 + perm[iz0]]], fx1, fy1, fz0); nxy1 = grad(perm[ix1 + perm[iy1 + perm[iz1]]], fx1, fy1, fz1); nx1 = LERP( r, nxy0, nxy1 ); n1 = LERP( t, nx0, nx1 ); return 0.936 * ( LERP( s, n0, n1 ) ); } //--------------------------------------------------------------------- /** 3D float Perlin periodic noise. */ double Noise1234::pnoise( double x, double y, double z, int px, int py, int pz ) { int ix0, iy0, ix1, iy1, iz0, iz1; double fx0, fy0, fz0, fx1, fy1, fz1; double s, t, r; double nxy0, nxy1, nx0, nx1, n0, n1; ix0 = FASTFLOOR( x ); // Integer part of x iy0 = FASTFLOOR( y ); // Integer part of y iz0 = FASTFLOOR( z ); // Integer part of z fx0 = x - ix0; // Fractional part of x fy0 = y - iy0; // Fractional part of y fz0 = z - iz0; // Fractional part of z fx1 = fx0 - 1.0; fy1 = fy0 - 1.0; fz1 = fz0 - 1.0; ix1 = (( ix0 + 1 ) % px ) & 0xff; // Wrap to 0..px-1 and wrap to 0..255 iy1 = (( iy0 + 1 ) % py ) & 0xff; // Wrap to 0..py-1 and wrap to 0..255 iz1 = (( iz0 + 1 ) % pz ) & 0xff; // Wrap to 0..pz-1 and wrap to 0..255 ix0 = ( ix0 % px ) & 0xff; iy0 = ( iy0 % py ) & 0xff; iz0 = ( iz0 % pz ) & 0xff; r = FADE( fz0 ); t = FADE( fy0 ); s = FADE( fx0 ); nxy0 = grad(perm[ix0 + perm[iy0 + perm[iz0]]], fx0, fy0, fz0); nxy1 = grad(perm[ix0 + perm[iy0 + perm[iz1]]], fx0, fy0, fz1); nx0 = LERP( r, nxy0, nxy1 ); nxy0 = grad(perm[ix0 + perm[iy1 + perm[iz0]]], fx0, fy1, fz0); nxy1 = grad(perm[ix0 + perm[iy1 + perm[iz1]]], fx0, fy1, fz1); nx1 = LERP( r, nxy0, nxy1 ); n0 = LERP( t, nx0, nx1 ); nxy0 = grad(perm[ix1 + perm[iy0 + perm[iz0]]], fx1, fy0, fz0); nxy1 = grad(perm[ix1 + perm[iy0 + perm[iz1]]], fx1, fy0, fz1); nx0 = LERP( r, nxy0, nxy1 ); nxy0 = grad(perm[ix1 + perm[iy1 + perm[iz0]]], fx1, fy1, fz0); nxy1 = grad(perm[ix1 + perm[iy1 + perm[iz1]]], fx1, fy1, fz1); nx1 = LERP( r, nxy0, nxy1 ); n1 = LERP( t, nx0, nx1 ); return 0.936 * ( LERP( s, n0, n1 ) ); } //--------------------------------------------------------------------- /** 4D float Perlin noise. */ double Noise1234::noise( double x, double y, double z, double w ) { int ix0, iy0, iz0, iw0, ix1, iy1, iz1, iw1; double fx0, fy0, fz0, fw0, fx1, fy1, fz1, fw1; double s, t, r, q; double nxyz0, nxyz1, nxy0, nxy1, nx0, nx1, n0, n1; ix0 = FASTFLOOR( x ); // Integer part of x iy0 = FASTFLOOR( y ); // Integer part of y iz0 = FASTFLOOR( z ); // Integer part of y iw0 = FASTFLOOR( w ); // Integer part of w fx0 = x - ix0; // Fractional part of x fy0 = y - iy0; // Fractional part of y fz0 = z - iz0; // Fractional part of z fw0 = w - iw0; // Fractional part of w fx1 = fx0 - 1.0; fy1 = fy0 - 1.0; fz1 = fz0 - 1.0; fw1 = fw0 - 1.0; ix1 = ( ix0 + 1 ) & 0xff; // Wrap to 0..255 iy1 = ( iy0 + 1 ) & 0xff; iz1 = ( iz0 + 1 ) & 0xff; iw1 = ( iw0 + 1 ) & 0xff; ix0 = ix0 & 0xff; iy0 = iy0 & 0xff; iz0 = iz0 & 0xff; iw0 = iw0 & 0xff; q = FADE( fw0 ); r = FADE( fz0 ); t = FADE( fy0 ); s = FADE( fx0 ); nxyz0 = grad(perm[ix0 + perm[iy0 + perm[iz0 + perm[iw0]]]], fx0, fy0, fz0, fw0); nxyz1 = grad(perm[ix0 + perm[iy0 + perm[iz0 + perm[iw1]]]], fx0, fy0, fz0, fw1); nxy0 = LERP( q, nxyz0, nxyz1 ); nxyz0 = grad(perm[ix0 + perm[iy0 + perm[iz1 + perm[iw0]]]], fx0, fy0, fz1, fw0); nxyz1 = grad(perm[ix0 + perm[iy0 + perm[iz1 + perm[iw1]]]], fx0, fy0, fz1, fw1); nxy1 = LERP( q, nxyz0, nxyz1 ); nx0 = LERP ( r, nxy0, nxy1 ); nxyz0 = grad(perm[ix0 + perm[iy1 + perm[iz0 + perm[iw0]]]], fx0, fy1, fz0, fw0); nxyz1 = grad(perm[ix0 + perm[iy1 + perm[iz0 + perm[iw1]]]], fx0, fy1, fz0, fw1); nxy0 = LERP( q, nxyz0, nxyz1 ); nxyz0 = grad(perm[ix0 + perm[iy1 + perm[iz1 + perm[iw0]]]], fx0, fy1, fz1, fw0); nxyz1 = grad(perm[ix0 + perm[iy1 + perm[iz1 + perm[iw1]]]], fx0, fy1, fz1, fw1); nxy1 = LERP( q, nxyz0, nxyz1 ); nx1 = LERP ( r, nxy0, nxy1 ); n0 = LERP( t, nx0, nx1 ); nxyz0 = grad(perm[ix1 + perm[iy0 + perm[iz0 + perm[iw0]]]], fx1, fy0, fz0, fw0); nxyz1 = grad(perm[ix1 + perm[iy0 + perm[iz0 + perm[iw1]]]], fx1, fy0, fz0, fw1); nxy0 = LERP( q, nxyz0, nxyz1 ); nxyz0 = grad(perm[ix1 + perm[iy0 + perm[iz1 + perm[iw0]]]], fx1, fy0, fz1, fw0); nxyz1 = grad(perm[ix1 + perm[iy0 + perm[iz1 + perm[iw1]]]], fx1, fy0, fz1, fw1); nxy1 = LERP( q, nxyz0, nxyz1 ); nx0 = LERP ( r, nxy0, nxy1 ); nxyz0 = grad(perm[ix1 + perm[iy1 + perm[iz0 + perm[iw0]]]], fx1, fy1, fz0, fw0); nxyz1 = grad(perm[ix1 + perm[iy1 + perm[iz0 + perm[iw1]]]], fx1, fy1, fz0, fw1); nxy0 = LERP( q, nxyz0, nxyz1 ); nxyz0 = grad(perm[ix1 + perm[iy1 + perm[iz1 + perm[iw0]]]], fx1, fy1, fz1, fw0); nxyz1 = grad(perm[ix1 + perm[iy1 + perm[iz1 + perm[iw1]]]], fx1, fy1, fz1, fw1); nxy1 = LERP( q, nxyz0, nxyz1 ); nx1 = LERP ( r, nxy0, nxy1 ); n1 = LERP( t, nx0, nx1 ); return 0.87 * ( LERP( s, n0, n1 ) ); } //--------------------------------------------------------------------- /** 4D float Perlin periodic noise. */ double Noise1234::pnoise( double x, double y, double z, double w, int px, int py, int pz, int pw ) { int ix0, iy0, iz0, iw0, ix1, iy1, iz1, iw1; double fx0, fy0, fz0, fw0, fx1, fy1, fz1, fw1; double s, t, r, q; double nxyz0, nxyz1, nxy0, nxy1, nx0, nx1, n0, n1; ix0 = FASTFLOOR( x ); // Integer part of x iy0 = FASTFLOOR( y ); // Integer part of y iz0 = FASTFLOOR( z ); // Integer part of y iw0 = FASTFLOOR( w ); // Integer part of w fx0 = x - ix0; // Fractional part of x fy0 = y - iy0; // Fractional part of y fz0 = z - iz0; // Fractional part of z fw0 = w - iw0; // Fractional part of w fx1 = fx0 - 1.0; fy1 = fy0 - 1.0; fz1 = fz0 - 1.0; fw1 = fw0 - 1.0; ix1 = (( ix0 + 1 ) % px ) & 0xff; // Wrap to 0..px-1 and wrap to 0..255 iy1 = (( iy0 + 1 ) % py ) & 0xff; // Wrap to 0..py-1 and wrap to 0..255 iz1 = (( iz0 + 1 ) % pz ) & 0xff; // Wrap to 0..pz-1 and wrap to 0..255 iw1 = (( iw0 + 1 ) % pw ) & 0xff; // Wrap to 0..pw-1 and wrap to 0..255 ix0 = ( ix0 % px ) & 0xff; iy0 = ( iy0 % py ) & 0xff; iz0 = ( iz0 % pz ) & 0xff; iw0 = ( iw0 % pw ) & 0xff; q = FADE( fw0 ); r = FADE( fz0 ); t = FADE( fy0 ); s = FADE( fx0 ); nxyz0 = grad(perm[ix0 + perm[iy0 + perm[iz0 + perm[iw0]]]], fx0, fy0, fz0, fw0); nxyz1 = grad(perm[ix0 + perm[iy0 + perm[iz0 + perm[iw1]]]], fx0, fy0, fz0, fw1); nxy0 = LERP( q, nxyz0, nxyz1 ); nxyz0 = grad(perm[ix0 + perm[iy0 + perm[iz1 + perm[iw0]]]], fx0, fy0, fz1, fw0); nxyz1 = grad(perm[ix0 + perm[iy0 + perm[iz1 + perm[iw1]]]], fx0, fy0, fz1, fw1); nxy1 = LERP( q, nxyz0, nxyz1 ); nx0 = LERP ( r, nxy0, nxy1 ); nxyz0 = grad(perm[ix0 + perm[iy1 + perm[iz0 + perm[iw0]]]], fx0, fy1, fz0, fw0); nxyz1 = grad(perm[ix0 + perm[iy1 + perm[iz0 + perm[iw1]]]], fx0, fy1, fz0, fw1); nxy0 = LERP( q, nxyz0, nxyz1 ); nxyz0 = grad(perm[ix0 + perm[iy1 + perm[iz1 + perm[iw0]]]], fx0, fy1, fz1, fw0); nxyz1 = grad(perm[ix0 + perm[iy1 + perm[iz1 + perm[iw1]]]], fx0, fy1, fz1, fw1); nxy1 = LERP( q, nxyz0, nxyz1 ); nx1 = LERP ( r, nxy0, nxy1 ); n0 = LERP( t, nx0, nx1 ); nxyz0 = grad(perm[ix1 + perm[iy0 + perm[iz0 + perm[iw0]]]], fx1, fy0, fz0, fw0); nxyz1 = grad(perm[ix1 + perm[iy0 + perm[iz0 + perm[iw1]]]], fx1, fy0, fz0, fw1); nxy0 = LERP( q, nxyz0, nxyz1 ); nxyz0 = grad(perm[ix1 + perm[iy0 + perm[iz1 + perm[iw0]]]], fx1, fy0, fz1, fw0); nxyz1 = grad(perm[ix1 + perm[iy0 + perm[iz1 + perm[iw1]]]], fx1, fy0, fz1, fw1); nxy1 = LERP( q, nxyz0, nxyz1 ); nx0 = LERP ( r, nxy0, nxy1 ); nxyz0 = grad(perm[ix1 + perm[iy1 + perm[iz0 + perm[iw0]]]], fx1, fy1, fz0, fw0); nxyz1 = grad(perm[ix1 + perm[iy1 + perm[iz0 + perm[iw1]]]], fx1, fy1, fz0, fw1); nxy0 = LERP( q, nxyz0, nxyz1 ); nxyz0 = grad(perm[ix1 + perm[iy1 + perm[iz1 + perm[iw0]]]], fx1, fy1, fz1, fw0); nxyz1 = grad(perm[ix1 + perm[iy1 + perm[iz1 + perm[iw1]]]], fx1, fy1, fz1, fw1); nxy1 = LERP( q, nxyz0, nxyz1 ); nx1 = LERP ( r, nxy0, nxy1 ); n1 = LERP( t, nx0, nx1 ); return 0.87 * ( LERP( s, n0, n1 ) ); } //--------------------------------------------------------------------- ================================================ FILE: src/libraries/noise1234/noise1234.h ================================================ // Noise1234 // Author: Stefan Gustavson (stegu@itn.liu.se) // // This library is public domain software, released by the author // into the public domain in February 2011. You may do anything // you like with it. You may even remove all attributions, // but of course I'd appreciate it if you kept my name somewhere. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // General Public License for more details. // Modified by the LOVE Development Team to use double precision. /** \file \brief Declares the Noise1234 class for producing Perlin noise. \author Stefan Gustavson (stegu@itn.liu.se) */ /* * This is a clean, fast, modern and free Perlin noise class in C++. * Being a stand-alone class with no external dependencies, it is * highly reusable without source code modifications. */ class Noise1234 { public: Noise1234() {} ~Noise1234() {} /** 1D, 2D, 3D and 4D float Perlin noise, SL "noise()" */ static double noise( double x ); static double noise( double x, double y ); static double noise( double x, double y, double z ); static double noise( double x, double y, double z, double w ); /** 1D, 2D, 3D and 4D float Perlin periodic noise, SL "pnoise()" */ static double pnoise( double x, int px ); static double pnoise( double x, double y, int px, int py ); static double pnoise( double x, double y, double z, int px, int py, int pz ); static double pnoise( double x, double y, double z, double w, int px, int py, int pz, int pw ); private: static unsigned char perm[]; static double grad( int hash, double x ); static double grad( int hash, double x, double y ); static double grad( int hash, double x, double y , double z ); static double grad( int hash, double x, double y, double z, double t ); }; ================================================ FILE: src/libraries/noise1234/simplexnoise1234.cpp ================================================ // SimplexNoise1234 // Copyright © 2003-2011, Stefan Gustavson // // Contact: stegu@itn.liu.se // // This library is public domain software, released by the author // into the public domain in February 2011. You may do anything // you like with it. You may even remove all attributions, // but of course I'd appreciate it if you kept my name somewhere. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // General Public License for more details. // Modified by the LOVE Development Team to use double precision. /** \file \brief Implements the SimplexNoise1234 class for producing Perlin simplex noise. \author Stefan Gustavson (stegu@itn.liu.se) */ /* * This implementation is "Simplex Noise" as presented by * Ken Perlin at a relatively obscure and not often cited course * session "Real-Time Shading" at Siggraph 2001 (before real * time shading actually took on), under the title "hardware noise". * The 3D function is numerically equivalent to his Java reference * code available in the PDF course notes, although I re-implemented * it from scratch to get more readable code. The 1D, 2D and 4D cases * were implemented from scratch by me from Ken Perlin's text. * * This is a highly reusable class. It has no dependencies * on any other file, apart from its own header file. */ #include "simplexnoise1234.h" #define FASTFLOOR(x) ( ((x)>0) ? ((int)x) : (((int)x)-1) ) //--------------------------------------------------------------------- // Static data /* * Permutation table. This is just a random jumble of all numbers 0-255, * repeated twice to avoid wrapping the index at 255 for each lookup. * This needs to be exactly the same for all instances on all platforms, * so it's easiest to just keep it as static explicit data. * This also removes the need for any initialisation of this class. * * Note that making this an int[] instead of a char[] might make the * code run faster on platforms with a high penalty for unaligned single * byte addressing. Intel x86 is generally single-byte-friendly, but * some other CPUs are faster with 4-aligned reads. * However, a char[] is smaller, which avoids cache trashing, and that * is probably the most important aspect on most architectures. * This array is accessed a *lot* by the noise functions. * A vector-valued noise over 3D accesses it 96 times, and a * float-valued 4D noise 64 times. We want this to fit in the cache! */ unsigned char SimplexNoise1234::perm[512] = {151,160,137,91,90,15, 131,13,201,95,96,53,194,233,7,225,140,36,103,30,69,142,8,99,37,240,21,10,23, 190, 6,148,247,120,234,75,0,26,197,62,94,252,219,203,117,35,11,32,57,177,33, 88,237,149,56,87,174,20,125,136,171,168, 68,175,74,165,71,134,139,48,27,166, 77,146,158,231,83,111,229,122,60,211,133,230,220,105,92,41,55,46,245,40,244, 102,143,54, 65,25,63,161, 1,216,80,73,209,76,132,187,208, 89,18,169,200,196, 135,130,116,188,159,86,164,100,109,198,173,186, 3,64,52,217,226,250,124,123, 5,202,38,147,118,126,255,82,85,212,207,206,59,227,47,16,58,17,182,189,28,42, 223,183,170,213,119,248,152, 2,44,154,163, 70,221,153,101,155,167, 43,172,9, 129,22,39,253, 19,98,108,110,79,113,224,232,178,185, 112,104,218,246,97,228, 251,34,242,193,238,210,144,12,191,179,162,241, 81,51,145,235,249,14,239,107, 49,192,214, 31,181,199,106,157,184, 84,204,176,115,121,50,45,127, 4,150,254, 138,236,205,93,222,114,67,29,24,72,243,141,128,195,78,66,215,61,156,180, 151,160,137,91,90,15, 131,13,201,95,96,53,194,233,7,225,140,36,103,30,69,142,8,99,37,240,21,10,23, 190, 6,148,247,120,234,75,0,26,197,62,94,252,219,203,117,35,11,32,57,177,33, 88,237,149,56,87,174,20,125,136,171,168, 68,175,74,165,71,134,139,48,27,166, 77,146,158,231,83,111,229,122,60,211,133,230,220,105,92,41,55,46,245,40,244, 102,143,54, 65,25,63,161, 1,216,80,73,209,76,132,187,208, 89,18,169,200,196, 135,130,116,188,159,86,164,100,109,198,173,186, 3,64,52,217,226,250,124,123, 5,202,38,147,118,126,255,82,85,212,207,206,59,227,47,16,58,17,182,189,28,42, 223,183,170,213,119,248,152, 2,44,154,163, 70,221,153,101,155,167, 43,172,9, 129,22,39,253, 19,98,108,110,79,113,224,232,178,185, 112,104,218,246,97,228, 251,34,242,193,238,210,144,12,191,179,162,241, 81,51,145,235,249,14,239,107, 49,192,214, 31,181,199,106,157,184, 84,204,176,115,121,50,45,127, 4,150,254, 138,236,205,93,222,114,67,29,24,72,243,141,128,195,78,66,215,61,156,180 }; //--------------------------------------------------------------------- /* * Helper functions to compute gradients-dot-residualvectors (1D to 4D) * Note that these generate gradients of more than unit length. To make * a close match with the value range of classic Perlin noise, the final * noise values need to be rescaled to fit nicely within [-1,1]. * (The simplex noise functions as such also have different scaling.) * Note also that these noise functions are the most practical and useful * signed version of Perlin noise. To return values according to the * RenderMan specification from the SL noise() and pnoise() functions, * the noise values need to be scaled and offset to [0,1], like this: * float SLnoise = (SimplexNoise1234::noise(x,y,z) + 1.0) * 0.5; */ double SimplexNoise1234::grad( int hash, double x ) { int h = hash & 15; double grad = 1.0 + (h & 7); // Gradient value 1.0, 2.0, ..., 8.0 if (h&8) grad = -grad; // Set a random sign for the gradient return ( grad * x ); // Multiply the gradient with the distance } double SimplexNoise1234::grad( int hash, double x, double y ) { int h = hash & 7; // Convert low 3 bits of hash code double u = h<4 ? x : y; // into 8 simple gradient directions, double v = h<4 ? y : x; // and compute the dot product with (x,y). return ((h&1)? -u : u) + ((h&2)? -2.0*v : 2.0*v); } double SimplexNoise1234::grad( int hash, double x, double y , double z ) { int h = hash & 15; // Convert low 4 bits of hash code into 12 simple double u = h<8 ? x : y; // gradient directions, and compute dot product. double v = h<4 ? y : h==12||h==14 ? x : z; // Fix repeats at h = 12 to 15 return ((h&1)? -u : u) + ((h&2)? -v : v); } double SimplexNoise1234::grad( int hash, double x, double y, double z, double t ) { int h = hash & 31; // Convert low 5 bits of hash code into 32 simple double u = h<24 ? x : y; // gradient directions, and compute dot product. double v = h<16 ? y : z; double w = h<8 ? z : t; return ((h&1)? -u : u) + ((h&2)? -v : v) + ((h&4)? -w : w); } // A lookup table to traverse the simplex around a given point in 4D. // Details can be found where this table is used, in the 4D noise method. /* TODO: This should not be required, backport it from Bill's GLSL code! */ static unsigned char simplex[64][4] = { {0,1,2,3},{0,1,3,2},{0,0,0,0},{0,2,3,1},{0,0,0,0},{0,0,0,0},{0,0,0,0},{1,2,3,0}, {0,2,1,3},{0,0,0,0},{0,3,1,2},{0,3,2,1},{0,0,0,0},{0,0,0,0},{0,0,0,0},{1,3,2,0}, {0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0}, {1,2,0,3},{0,0,0,0},{1,3,0,2},{0,0,0,0},{0,0,0,0},{0,0,0,0},{2,3,0,1},{2,3,1,0}, {1,0,2,3},{1,0,3,2},{0,0,0,0},{0,0,0,0},{0,0,0,0},{2,0,3,1},{0,0,0,0},{2,1,3,0}, {0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0}, {2,0,1,3},{0,0,0,0},{0,0,0,0},{0,0,0,0},{3,0,1,2},{3,0,2,1},{0,0,0,0},{3,1,2,0}, {2,1,0,3},{0,0,0,0},{0,0,0,0},{0,0,0,0},{3,1,0,2},{0,0,0,0},{3,2,0,1},{3,2,1,0}}; // 1D simplex noise double SimplexNoise1234::noise(double x) { int i0 = FASTFLOOR(x); int i1 = i0 + 1; double x0 = x - i0; double x1 = x0 - 1.0; double n0, n1; double t0 = 1.0 - x0*x0; t0 *= t0; n0 = t0 * t0 * grad(perm[i0 & 0xff], x0); double t1 = 1.0 - x1*x1; t1 *= t1; n1 = t1 * t1 * grad(perm[i1 & 0xff], x1); // The maximum value of this noise is 8*(3/4)^4 = 2.53125 // A factor of 0.395 will scale to fit exactly within [-1,1] return 0.395 * (n0 + n1); } // 2D simplex noise double SimplexNoise1234::noise(double x, double y) { #define F2 0.366025403 // F2 = 0.5*(sqrt(3.0)-1.0) #define G2 0.211324865 // G2 = (3.0-Math.sqrt(3.0))/6.0 double n0, n1, n2; // Noise contributions from the three corners // Skew the input space to determine which simplex cell we're in double s = (x+y)*F2; // Hairy factor for 2D double xs = x + s; double ys = y + s; int i = FASTFLOOR(xs); int j = FASTFLOOR(ys); double t = (i+j)*G2; double X0 = i-t; // Unskew the cell origin back to (x,y) space double Y0 = j-t; double x0 = x-X0; // The x,y distances from the cell origin double y0 = y-Y0; // For the 2D case, the simplex shape is an equilateral triangle. // Determine which simplex we are in. int i1, j1; // Offsets for second (middle) corner of simplex in (i,j) coords if(x0>y0) {i1=1; j1=0;} // lower triangle, XY order: (0,0)->(1,0)->(1,1) else {i1=0; j1=1;} // upper triangle, YX order: (0,0)->(0,1)->(1,1) // A step of (1,0) in (i,j) means a step of (1-c,-c) in (x,y), and // a step of (0,1) in (i,j) means a step of (-c,1-c) in (x,y), where // c = (3-sqrt(3))/6 double x1 = x0 - i1 + G2; // Offsets for middle corner in (x,y) unskewed coords double y1 = y0 - j1 + G2; double x2 = x0 - 1.0 + 2.0 * G2; // Offsets for last corner in (x,y) unskewed coords double y2 = y0 - 1.0 + 2.0 * G2; // Wrap the integer indices at 256, to avoid indexing perm[] out of bounds int ii = i & 0xff; int jj = j & 0xff; // Calculate the contribution from the three corners double t0 = 0.5 - x0*x0-y0*y0; if(t0 < 0.0) n0 = 0.0; else { t0 *= t0; n0 = t0 * t0 * grad(perm[ii+perm[jj]], x0, y0); } double t1 = 0.5 - x1*x1-y1*y1; if(t1 < 0.0) n1 = 0.0; else { t1 *= t1; n1 = t1 * t1 * grad(perm[ii+i1+perm[jj+j1]], x1, y1); } double t2 = 0.5 - x2*x2-y2*y2; if(t2 < 0.0) n2 = 0.0; else { t2 *= t2; n2 = t2 * t2 * grad(perm[ii+1+perm[jj+1]], x2, y2); } // Add contributions from each corner to get the final noise value. // The result is scaled to return values in the interval [-1,1]. return 45.23 * (n0 + n1 + n2); // TODO: The scale factor is preliminary! } // 3D simplex noise double SimplexNoise1234::noise(double x, double y, double z) { // Simple skewing factors for the 3D case #define F3 0.333333333 #define G3 0.166666667 double n0, n1, n2, n3; // Noise contributions from the four corners // Skew the input space to determine which simplex cell we're in double s = (x+y+z)*F3; // Very nice and simple skew factor for 3D double xs = x+s; double ys = y+s; double zs = z+s; int i = FASTFLOOR(xs); int j = FASTFLOOR(ys); int k = FASTFLOOR(zs); double t = (float)(i+j+k)*G3; double X0 = i-t; // Unskew the cell origin back to (x,y,z) space double Y0 = j-t; double Z0 = k-t; double x0 = x-X0; // The x,y,z distances from the cell origin double y0 = y-Y0; double z0 = z-Z0; // For the 3D case, the simplex shape is a slightly irregular tetrahedron. // Determine which simplex we are in. int i1, j1, k1; // Offsets for second corner of simplex in (i,j,k) coords int i2, j2, k2; // Offsets for third corner of simplex in (i,j,k) coords /* This code would benefit from a backport from the GLSL version! */ if(x0>=y0) { if(y0>=z0) { i1=1; j1=0; k1=0; i2=1; j2=1; k2=0; } // X Y Z order else if(x0>=z0) { i1=1; j1=0; k1=0; i2=1; j2=0; k2=1; } // X Z Y order else { i1=0; j1=0; k1=1; i2=1; j2=0; k2=1; } // Z X Y order } else { // x0 y0) ? 32 : 0; int c2 = (x0 > z0) ? 16 : 0; int c3 = (y0 > z0) ? 8 : 0; int c4 = (x0 > w0) ? 4 : 0; int c5 = (y0 > w0) ? 2 : 0; int c6 = (z0 > w0) ? 1 : 0; int c = c1 + c2 + c3 + c4 + c5 + c6; int i1, j1, k1, l1; // The integer offsets for the second simplex corner int i2, j2, k2, l2; // The integer offsets for the third simplex corner int i3, j3, k3, l3; // The integer offsets for the fourth simplex corner // simplex[c] is a 4-vector with the numbers 0, 1, 2 and 3 in some order. // Many values of c will never occur, since e.g. x>y>z>w makes x=3 ? 1 : 0; j1 = simplex[c][1]>=3 ? 1 : 0; k1 = simplex[c][2]>=3 ? 1 : 0; l1 = simplex[c][3]>=3 ? 1 : 0; // The number 2 in the "simplex" array is at the second largest coordinate. i2 = simplex[c][0]>=2 ? 1 : 0; j2 = simplex[c][1]>=2 ? 1 : 0; k2 = simplex[c][2]>=2 ? 1 : 0; l2 = simplex[c][3]>=2 ? 1 : 0; // The number 1 in the "simplex" array is at the second smallest coordinate. i3 = simplex[c][0]>=1 ? 1 : 0; j3 = simplex[c][1]>=1 ? 1 : 0; k3 = simplex[c][2]>=1 ? 1 : 0; l3 = simplex[c][3]>=1 ? 1 : 0; // The fifth corner has all coordinate offsets = 1, so no need to look that up. double x1 = x0 - i1 + G4; // Offsets for second corner in (x,y,z,w) coords double y1 = y0 - j1 + G4; double z1 = z0 - k1 + G4; double w1 = w0 - l1 + G4; double x2 = x0 - i2 + 2.0f*G4; // Offsets for third corner in (x,y,z,w) coords double y2 = y0 - j2 + 2.0f*G4; double z2 = z0 - k2 + 2.0f*G4; double w2 = w0 - l2 + 2.0f*G4; double x3 = x0 - i3 + 3.0f*G4; // Offsets for fourth corner in (x,y,z,w) coords double y3 = y0 - j3 + 3.0f*G4; double z3 = z0 - k3 + 3.0f*G4; double w3 = w0 - l3 + 3.0f*G4; double x4 = x0 - 1.0f + 4.0f*G4; // Offsets for last corner in (x,y,z,w) coords double y4 = y0 - 1.0f + 4.0f*G4; double z4 = z0 - 1.0f + 4.0f*G4; double w4 = w0 - 1.0f + 4.0f*G4; // Wrap the integer indices at 256, to avoid indexing perm[] out of bounds int ii = i & 0xff; int jj = j & 0xff; int kk = k & 0xff; int ll = l & 0xff; // Calculate the contribution from the five corners double t0 = 0.6f - x0*x0 - y0*y0 - z0*z0 - w0*w0; if(t0 < 0.0f) n0 = 0.0f; else { t0 *= t0; n0 = t0 * t0 * grad(perm[ii+perm[jj+perm[kk+perm[ll]]]], x0, y0, z0, w0); } double t1 = 0.6f - x1*x1 - y1*y1 - z1*z1 - w1*w1; if(t1 < 0.0f) n1 = 0.0f; else { t1 *= t1; n1 = t1 * t1 * grad(perm[ii+i1+perm[jj+j1+perm[kk+k1+perm[ll+l1]]]], x1, y1, z1, w1); } double t2 = 0.6f - x2*x2 - y2*y2 - z2*z2 - w2*w2; if(t2 < 0.0f) n2 = 0.0f; else { t2 *= t2; n2 = t2 * t2 * grad(perm[ii+i2+perm[jj+j2+perm[kk+k2+perm[ll+l2]]]], x2, y2, z2, w2); } double t3 = 0.6f - x3*x3 - y3*y3 - z3*z3 - w3*w3; if(t3 < 0.0f) n3 = 0.0f; else { t3 *= t3; n3 = t3 * t3 * grad(perm[ii+i3+perm[jj+j3+perm[kk+k3+perm[ll+l3]]]], x3, y3, z3, w3); } double t4 = 0.6f - x4*x4 - y4*y4 - z4*z4 - w4*w4; if(t4 < 0.0f) n4 = 0.0f; else { t4 *= t4; n4 = t4 * t4 * grad(perm[ii+1+perm[jj+1+perm[kk+1+perm[ll+1]]]], x4, y4, z4, w4); } // Sum up and scale the result to cover the range [-1,1] return 27.3 * (n0 + n1 + n2 + n3 + n4); // TODO: The scale factor is preliminary! } //--------------------------------------------------------------------- ================================================ FILE: src/libraries/noise1234/simplexnoise1234.h ================================================ // SimplexNoise1234 // Copyright © 2003-2011, Stefan Gustavson // // Contact: stegu@itn.liu.se // // This library is public domain software, released by the author // into the public domain in February 2011. You may do anything // you like with it. You may even remove all attributions, // but of course I'd appreciate it if you kept my name somewhere. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // General Public License for more details. // Modified by the LOVE Development Team to use double precision. /** \file \brief Declares the SimplexNoise1234 class for producing Perlin simplex noise. \author Stefan Gustavson (stegu@itn.liu.se) */ /* * This is a clean, fast, modern and free Perlin Simplex noise class in C++. * Being a stand-alone class with no external dependencies, it is * highly reusable without source code modifications. */ class SimplexNoise1234 { public: SimplexNoise1234() {} ~SimplexNoise1234() {} /** 1D and 2D float Perlin noise */ static double noise( double x ); static double noise( double x, double y ); static double noise( double x, double y, double z ); static double noise( double x, double y, double z, double w); private: static unsigned char perm[]; static double grad( int hash, double x ); static double grad( int hash, double x, double y ); static double grad( int hash, double x, double y, double z ); static double grad( int hash, double x, double y, double z, double t ); }; ================================================ FILE: src/libraries/physfs/physfs.c ================================================ /** * PhysicsFS; a portable, flexible file i/o abstraction. * * Documentation is in physfs.h. It's verbose, honest. :) * * Please see the file LICENSE.txt in the source's root directory. * * This file written by Ryan C. Gordon. */ #define __PHYSICSFS_INTERNAL__ #include "physfs_internal.h" #if defined(_MSC_VER) /* this code came from https://stackoverflow.com/a/8712996 */ int __PHYSFS_msvc_vsnprintf(char *outBuf, size_t size, const char *format, va_list ap) { int count = -1; if (size != 0) count = _vsnprintf_s(outBuf, size, _TRUNCATE, format, ap); if (count == -1) count = _vscprintf(format, ap); return count; } int __PHYSFS_msvc_snprintf(char *outBuf, size_t size, const char *format, ...) { int count; va_list ap; va_start(ap, format); count = __PHYSFS_msvc_vsnprintf(outBuf, size, format, ap); va_end(ap); return count; } #endif typedef struct __PHYSFS_DIRHANDLE__ { void *opaque; /* Instance data unique to the archiver. */ char *dirName; /* Path to archive in platform-dependent notation. */ char *mountPoint; /* Mountpoint in virtual file tree. */ char *root; /* subdirectory of archiver to use as root of archive (NULL for actual root) */ size_t rootlen; /* subdirectory of archiver to use as root of archive (NULL for actual root) */ const PHYSFS_Archiver *funcs; /* Ptr to archiver info for this handle. */ int forWriting; /* Whether this was opened for writing or not. */ struct __PHYSFS_DIRHANDLE__ *next; /* linked list stuff. */ } DirHandle; typedef struct __PHYSFS_FILEHANDLE__ { PHYSFS_Io *io; /* Instance data unique to the archiver for this file. */ PHYSFS_uint8 forReading; /* Non-zero if reading, zero if write/append */ const DirHandle *dirHandle; /* Archiver instance that created this */ PHYSFS_uint8 *buffer; /* Buffer, if set (NULL otherwise). Don't touch! */ size_t bufsize; /* Bufsize, if set (0 otherwise). Don't touch! */ size_t buffill; /* Buffer fill size. Don't touch! */ size_t bufpos; /* Buffer position. Don't touch! */ struct __PHYSFS_FILEHANDLE__ *next; /* linked list stuff. */ } FileHandle; typedef struct __PHYSFS_ERRSTATETYPE__ { void *tid; PHYSFS_ErrorCode code; struct __PHYSFS_ERRSTATETYPE__ *next; } ErrState; /* General PhysicsFS state ... */ static int initialized = 0; static ErrState *errorStates = NULL; static DirHandle *searchPath = NULL; static DirHandle *writeDir = NULL; static FileHandle *openWriteList = NULL; static FileHandle *openReadList = NULL; static char *baseDir = NULL; static char *userDir = NULL; static char *prefDir = NULL; static int allowSymLinks = 0; static PHYSFS_Archiver **archivers = NULL; static PHYSFS_ArchiveInfo **archiveInfo = NULL; static volatile size_t numArchivers = 0; static size_t longest_root = 0; /* mutexes ... */ static void *errorLock = NULL; /* protects error message list. */ static void *stateLock = NULL; /* protects other PhysFS static state. */ /* allocator ... */ static int externalAllocator = 0; PHYSFS_Allocator allocator; #ifdef PHYSFS_NEED_ATOMIC_OP_FALLBACK static inline int __PHYSFS_atomicAdd(int *ptrval, const int val) { int retval; __PHYSFS_platformGrabMutex(stateLock); *ptrval += val; retval = *ptrval; __PHYSFS_platformReleaseMutex(stateLock); return retval; } /* __PHYSFS_atomicAdd */ int __PHYSFS_ATOMIC_INCR(int *ptrval) { return __PHYSFS_atomicAdd(ptrval, 1); } /* __PHYSFS_ATOMIC_INCR */ int __PHYSFS_ATOMIC_DECR(int *ptrval) { return __PHYSFS_atomicAdd(ptrval, -1); } /* __PHYSFS_ATOMIC_DECR */ #endif /* PHYSFS_Io implementation for i/o to physical filesystem... */ /* !!! FIXME: maybe refcount the paths in a string pool? */ typedef struct __PHYSFS_NativeIoInfo { void *handle; const char *path; int mode; /* 'r', 'w', or 'a' */ } NativeIoInfo; static PHYSFS_sint64 nativeIo_read(PHYSFS_Io *io, void *buf, PHYSFS_uint64 len) { NativeIoInfo *info = (NativeIoInfo *) io->opaque; return __PHYSFS_platformRead(info->handle, buf, len); } /* nativeIo_read */ static PHYSFS_sint64 nativeIo_write(PHYSFS_Io *io, const void *buffer, PHYSFS_uint64 len) { NativeIoInfo *info = (NativeIoInfo *) io->opaque; return __PHYSFS_platformWrite(info->handle, buffer, len); } /* nativeIo_write */ static int nativeIo_seek(PHYSFS_Io *io, PHYSFS_uint64 offset) { NativeIoInfo *info = (NativeIoInfo *) io->opaque; return __PHYSFS_platformSeek(info->handle, offset); } /* nativeIo_seek */ static PHYSFS_sint64 nativeIo_tell(PHYSFS_Io *io) { NativeIoInfo *info = (NativeIoInfo *) io->opaque; return __PHYSFS_platformTell(info->handle); } /* nativeIo_tell */ static PHYSFS_sint64 nativeIo_length(PHYSFS_Io *io) { NativeIoInfo *info = (NativeIoInfo *) io->opaque; return __PHYSFS_platformFileLength(info->handle); } /* nativeIo_length */ static PHYSFS_Io *nativeIo_duplicate(PHYSFS_Io *io) { NativeIoInfo *info = (NativeIoInfo *) io->opaque; return __PHYSFS_createNativeIo(info->path, info->mode); } /* nativeIo_duplicate */ static int nativeIo_flush(PHYSFS_Io *io) { NativeIoInfo *info = (NativeIoInfo *) io->opaque; return __PHYSFS_platformFlush(info->handle); } /* nativeIo_flush */ static void nativeIo_destroy(PHYSFS_Io *io) { NativeIoInfo *info = (NativeIoInfo *) io->opaque; __PHYSFS_platformClose(info->handle); allocator.Free((void *) info->path); allocator.Free(info); allocator.Free(io); } /* nativeIo_destroy */ static const PHYSFS_Io __PHYSFS_nativeIoInterface = { CURRENT_PHYSFS_IO_API_VERSION, NULL, nativeIo_read, nativeIo_write, nativeIo_seek, nativeIo_tell, nativeIo_length, nativeIo_duplicate, nativeIo_flush, nativeIo_destroy }; PHYSFS_Io *__PHYSFS_createNativeIo(const char *path, const int mode) { PHYSFS_Io *io = NULL; NativeIoInfo *info = NULL; void *handle = NULL; char *pathdup = NULL; assert((mode == 'r') || (mode == 'w') || (mode == 'a')); io = (PHYSFS_Io *) allocator.Malloc(sizeof (PHYSFS_Io)); GOTO_IF(!io, PHYSFS_ERR_OUT_OF_MEMORY, createNativeIo_failed); info = (NativeIoInfo *) allocator.Malloc(sizeof (NativeIoInfo)); GOTO_IF(!info, PHYSFS_ERR_OUT_OF_MEMORY, createNativeIo_failed); pathdup = (char *) allocator.Malloc(strlen(path) + 1); GOTO_IF(!pathdup, PHYSFS_ERR_OUT_OF_MEMORY, createNativeIo_failed); if (mode == 'r') handle = __PHYSFS_platformOpenRead(path); else if (mode == 'w') handle = __PHYSFS_platformOpenWrite(path); else if (mode == 'a') handle = __PHYSFS_platformOpenAppend(path); GOTO_IF_ERRPASS(!handle, createNativeIo_failed); strcpy(pathdup, path); info->handle = handle; info->path = pathdup; info->mode = mode; memcpy(io, &__PHYSFS_nativeIoInterface, sizeof (*io)); io->opaque = info; return io; createNativeIo_failed: if (handle != NULL) __PHYSFS_platformClose(handle); if (pathdup != NULL) allocator.Free(pathdup); if (info != NULL) allocator.Free(info); if (io != NULL) allocator.Free(io); return NULL; } /* __PHYSFS_createNativeIo */ /* PHYSFS_Io implementation for i/o to a memory buffer... */ typedef struct __PHYSFS_MemoryIoInfo { const PHYSFS_uint8 *buf; PHYSFS_uint64 len; PHYSFS_uint64 pos; PHYSFS_Io *parent; int refcount; void (*destruct)(void *); } MemoryIoInfo; static PHYSFS_sint64 memoryIo_read(PHYSFS_Io *io, void *buf, PHYSFS_uint64 len) { MemoryIoInfo *info = (MemoryIoInfo *) io->opaque; const PHYSFS_uint64 avail = info->len - info->pos; assert(avail <= info->len); if (avail == 0) return 0; /* we're at EOF; nothing to do. */ if (len > avail) len = avail; memcpy(buf, info->buf + info->pos, (size_t) len); info->pos += len; return len; } /* memoryIo_read */ static PHYSFS_sint64 memoryIo_write(PHYSFS_Io *io, const void *buffer, PHYSFS_uint64 len) { BAIL(PHYSFS_ERR_OPEN_FOR_READING, -1); } /* memoryIo_write */ static int memoryIo_seek(PHYSFS_Io *io, PHYSFS_uint64 offset) { MemoryIoInfo *info = (MemoryIoInfo *) io->opaque; BAIL_IF(offset > info->len, PHYSFS_ERR_PAST_EOF, 0); info->pos = offset; return 1; } /* memoryIo_seek */ static PHYSFS_sint64 memoryIo_tell(PHYSFS_Io *io) { const MemoryIoInfo *info = (MemoryIoInfo *) io->opaque; return (PHYSFS_sint64) info->pos; } /* memoryIo_tell */ static PHYSFS_sint64 memoryIo_length(PHYSFS_Io *io) { const MemoryIoInfo *info = (MemoryIoInfo *) io->opaque; return (PHYSFS_sint64) info->len; } /* memoryIo_length */ static PHYSFS_Io *memoryIo_duplicate(PHYSFS_Io *io) { MemoryIoInfo *info = (MemoryIoInfo *) io->opaque; MemoryIoInfo *newinfo = NULL; PHYSFS_Io *parent = info->parent; PHYSFS_Io *retval = NULL; /* avoid deep copies. */ assert((!parent) || (!((MemoryIoInfo *) parent->opaque)->parent) ); /* share the buffer between duplicates. */ if (parent != NULL) /* dup the parent, increment its refcount. */ return parent->duplicate(parent); /* we're the parent. */ retval = (PHYSFS_Io *) allocator.Malloc(sizeof (PHYSFS_Io)); BAIL_IF(!retval, PHYSFS_ERR_OUT_OF_MEMORY, NULL); newinfo = (MemoryIoInfo *) allocator.Malloc(sizeof (MemoryIoInfo)); if (!newinfo) { allocator.Free(retval); BAIL(PHYSFS_ERR_OUT_OF_MEMORY, NULL); } /* if */ __PHYSFS_ATOMIC_INCR(&info->refcount); memset(newinfo, '\0', sizeof (*info)); newinfo->buf = info->buf; newinfo->len = info->len; newinfo->pos = 0; newinfo->parent = io; newinfo->refcount = 0; newinfo->destruct = NULL; memcpy(retval, io, sizeof (*retval)); retval->opaque = newinfo; return retval; } /* memoryIo_duplicate */ static int memoryIo_flush(PHYSFS_Io *io) { return 1; /* it's read-only. */ } static void memoryIo_destroy(PHYSFS_Io *io) { MemoryIoInfo *info = (MemoryIoInfo *) io->opaque; PHYSFS_Io *parent = info->parent; if (parent != NULL) { assert(info->buf == ((MemoryIoInfo *) info->parent->opaque)->buf); assert(info->len == ((MemoryIoInfo *) info->parent->opaque)->len); assert(info->refcount == 0); assert(info->destruct == NULL); allocator.Free(info); allocator.Free(io); parent->destroy(parent); /* decrements refcount. */ return; } /* if */ /* we _are_ the parent. */ assert(info->refcount > 0); /* even in a race, we hold a reference. */ if (__PHYSFS_ATOMIC_DECR(&info->refcount) == 0) { void (*destruct)(void *) = info->destruct; void *buf = (void *) info->buf; io->opaque = NULL; /* kill this here in case of race. */ allocator.Free(info); allocator.Free(io); if (destruct != NULL) destruct(buf); } /* if */ } /* memoryIo_destroy */ static const PHYSFS_Io __PHYSFS_memoryIoInterface = { CURRENT_PHYSFS_IO_API_VERSION, NULL, memoryIo_read, memoryIo_write, memoryIo_seek, memoryIo_tell, memoryIo_length, memoryIo_duplicate, memoryIo_flush, memoryIo_destroy }; PHYSFS_Io *__PHYSFS_createMemoryIo(const void *buf, PHYSFS_uint64 len, void (*destruct)(void *)) { PHYSFS_Io *io = NULL; MemoryIoInfo *info = NULL; io = (PHYSFS_Io *) allocator.Malloc(sizeof (PHYSFS_Io)); GOTO_IF(!io, PHYSFS_ERR_OUT_OF_MEMORY, createMemoryIo_failed); info = (MemoryIoInfo *) allocator.Malloc(sizeof (MemoryIoInfo)); GOTO_IF(!info, PHYSFS_ERR_OUT_OF_MEMORY, createMemoryIo_failed); memset(info, '\0', sizeof (*info)); info->buf = (const PHYSFS_uint8 *) buf; info->len = len; info->pos = 0; info->parent = NULL; info->refcount = 1; info->destruct = destruct; memcpy(io, &__PHYSFS_memoryIoInterface, sizeof (*io)); io->opaque = info; return io; createMemoryIo_failed: if (info != NULL) allocator.Free(info); if (io != NULL) allocator.Free(io); return NULL; } /* __PHYSFS_createMemoryIo */ /* PHYSFS_Io implementation for i/o to a PHYSFS_File... */ static PHYSFS_sint64 handleIo_read(PHYSFS_Io *io, void *buf, PHYSFS_uint64 len) { return PHYSFS_readBytes((PHYSFS_File *) io->opaque, buf, len); } /* handleIo_read */ static PHYSFS_sint64 handleIo_write(PHYSFS_Io *io, const void *buffer, PHYSFS_uint64 len) { return PHYSFS_writeBytes((PHYSFS_File *) io->opaque, buffer, len); } /* handleIo_write */ static int handleIo_seek(PHYSFS_Io *io, PHYSFS_uint64 offset) { return PHYSFS_seek((PHYSFS_File *) io->opaque, offset); } /* handleIo_seek */ static PHYSFS_sint64 handleIo_tell(PHYSFS_Io *io) { return PHYSFS_tell((PHYSFS_File *) io->opaque); } /* handleIo_tell */ static PHYSFS_sint64 handleIo_length(PHYSFS_Io *io) { return PHYSFS_fileLength((PHYSFS_File *) io->opaque); } /* handleIo_length */ static PHYSFS_Io *handleIo_duplicate(PHYSFS_Io *io) { /* * There's no duplicate at the PHYSFS_File level, so we break the * abstraction. We're allowed to: we're physfs.c! */ FileHandle *origfh = (FileHandle *) io->opaque; FileHandle *newfh = (FileHandle *) allocator.Malloc(sizeof (FileHandle)); PHYSFS_Io *retval = NULL; GOTO_IF(!newfh, PHYSFS_ERR_OUT_OF_MEMORY, handleIo_dupe_failed); memset(newfh, '\0', sizeof (*newfh)); retval = (PHYSFS_Io *) allocator.Malloc(sizeof (PHYSFS_Io)); GOTO_IF(!retval, PHYSFS_ERR_OUT_OF_MEMORY, handleIo_dupe_failed); #if 0 /* we don't buffer the duplicate, at least not at the moment. */ if (origfh->buffer != NULL) { newfh->buffer = (PHYSFS_uint8 *) allocator.Malloc(origfh->bufsize); if (!newfh->buffer) GOTO(PHYSFS_ERR_OUT_OF_MEMORY, handleIo_dupe_failed); newfh->bufsize = origfh->bufsize; } /* if */ #endif newfh->io = origfh->io->duplicate(origfh->io); GOTO_IF_ERRPASS(!newfh->io, handleIo_dupe_failed); newfh->forReading = origfh->forReading; newfh->dirHandle = origfh->dirHandle; __PHYSFS_platformGrabMutex(stateLock); if (newfh->forReading) { newfh->next = openReadList; openReadList = newfh; } /* if */ else { newfh->next = openWriteList; openWriteList = newfh; } /* else */ __PHYSFS_platformReleaseMutex(stateLock); memcpy(retval, io, sizeof (PHYSFS_Io)); retval->opaque = newfh; return retval; handleIo_dupe_failed: if (newfh) { if (newfh->io != NULL) newfh->io->destroy(newfh->io); if (newfh->buffer != NULL) allocator.Free(newfh->buffer); allocator.Free(newfh); } /* if */ return NULL; } /* handleIo_duplicate */ static int handleIo_flush(PHYSFS_Io *io) { return PHYSFS_flush((PHYSFS_File *) io->opaque); } /* handleIo_flush */ static void handleIo_destroy(PHYSFS_Io *io) { if (io->opaque != NULL) PHYSFS_close((PHYSFS_File *) io->opaque); allocator.Free(io); } /* handleIo_destroy */ static const PHYSFS_Io __PHYSFS_handleIoInterface = { CURRENT_PHYSFS_IO_API_VERSION, NULL, handleIo_read, handleIo_write, handleIo_seek, handleIo_tell, handleIo_length, handleIo_duplicate, handleIo_flush, handleIo_destroy }; static PHYSFS_Io *__PHYSFS_createHandleIo(PHYSFS_File *f) { PHYSFS_Io *io = (PHYSFS_Io *) allocator.Malloc(sizeof (PHYSFS_Io)); BAIL_IF(!io, PHYSFS_ERR_OUT_OF_MEMORY, NULL); memcpy(io, &__PHYSFS_handleIoInterface, sizeof (*io)); io->opaque = f; return io; } /* __PHYSFS_createHandleIo */ /* functions ... */ typedef struct { char **list; PHYSFS_uint32 size; PHYSFS_ErrorCode errcode; } EnumStringListCallbackData; static void enumStringListCallback(void *data, const char *str) { void *ptr; char *newstr; EnumStringListCallbackData *pecd = (EnumStringListCallbackData *) data; if (pecd->errcode) return; ptr = allocator.Realloc(pecd->list, (pecd->size + 2) * sizeof (char *)); newstr = (char *) allocator.Malloc(strlen(str) + 1); if (ptr != NULL) pecd->list = (char **) ptr; if ((ptr == NULL) || (newstr == NULL)) { pecd->errcode = PHYSFS_ERR_OUT_OF_MEMORY; pecd->list[pecd->size] = NULL; PHYSFS_freeList(pecd->list); return; } /* if */ strcpy(newstr, str); pecd->list[pecd->size] = newstr; pecd->size++; } /* enumStringListCallback */ static char **doEnumStringList(void (*func)(PHYSFS_StringCallback, void *)) { EnumStringListCallbackData ecd; memset(&ecd, '\0', sizeof (ecd)); ecd.list = (char **) allocator.Malloc(sizeof (char *)); BAIL_IF(!ecd.list, PHYSFS_ERR_OUT_OF_MEMORY, NULL); func(enumStringListCallback, &ecd); if (ecd.errcode) { PHYSFS_setErrorCode(ecd.errcode); return NULL; } /* if */ ecd.list[ecd.size] = NULL; return ecd.list; } /* doEnumStringList */ static void __PHYSFS_bubble_sort(void *a, size_t lo, size_t hi, int (*cmpfn)(void *, size_t, size_t), void (*swapfn)(void *, size_t, size_t)) { size_t i; int sorted; do { sorted = 1; for (i = lo; i < hi; i++) { if (cmpfn(a, i, i + 1) > 0) { swapfn(a, i, i + 1); sorted = 0; } /* if */ } /* for */ } while (!sorted); } /* __PHYSFS_bubble_sort */ static void __PHYSFS_quick_sort(void *a, size_t lo, size_t hi, int (*cmpfn)(void *, size_t, size_t), void (*swapfn)(void *, size_t, size_t)) { size_t i; size_t j; size_t v; if ((hi - lo) <= PHYSFS_QUICKSORT_THRESHOLD) __PHYSFS_bubble_sort(a, lo, hi, cmpfn, swapfn); else { i = (hi + lo) / 2; if (cmpfn(a, lo, i) > 0) swapfn(a, lo, i); if (cmpfn(a, lo, hi) > 0) swapfn(a, lo, hi); if (cmpfn(a, i, hi) > 0) swapfn(a, i, hi); j = hi - 1; swapfn(a, i, j); i = lo; v = j; while (1) { while(cmpfn(a, ++i, v) < 0) { /* do nothing */ } while(cmpfn(a, --j, v) > 0) { /* do nothing */ } if (j < i) break; swapfn(a, i, j); } /* while */ if (i != (hi-1)) swapfn(a, i, hi-1); __PHYSFS_quick_sort(a, lo, j, cmpfn, swapfn); __PHYSFS_quick_sort(a, i+1, hi, cmpfn, swapfn); } /* else */ } /* __PHYSFS_quick_sort */ void __PHYSFS_sort(void *entries, size_t max, int (*cmpfn)(void *, size_t, size_t), void (*swapfn)(void *, size_t, size_t)) { /* * Quicksort w/ Bubblesort fallback algorithm inspired by code from here: * https://www.cs.ubc.ca/spider/harrison/Java/sorting-demo.html */ if (max > 0) __PHYSFS_quick_sort(entries, 0, max - 1, cmpfn, swapfn); } /* __PHYSFS_sort */ static ErrState *findErrorForCurrentThread(void) { ErrState *i; void *tid; if (errorLock != NULL) __PHYSFS_platformGrabMutex(errorLock); if (errorStates != NULL) { tid = __PHYSFS_platformGetThreadID(); for (i = errorStates; i != NULL; i = i->next) { if (i->tid == tid) { if (errorLock != NULL) __PHYSFS_platformReleaseMutex(errorLock); return i; } /* if */ } /* for */ } /* if */ if (errorLock != NULL) __PHYSFS_platformReleaseMutex(errorLock); return NULL; /* no error available. */ } /* findErrorForCurrentThread */ /* this doesn't reset the error state. */ static inline PHYSFS_ErrorCode currentErrorCode(void) { const ErrState *err = findErrorForCurrentThread(); return err ? err->code : PHYSFS_ERR_OK; } /* currentErrorCode */ PHYSFS_ErrorCode PHYSFS_getLastErrorCode(void) { ErrState *err = findErrorForCurrentThread(); const PHYSFS_ErrorCode retval = (err) ? err->code : PHYSFS_ERR_OK; if (err) err->code = PHYSFS_ERR_OK; return retval; } /* PHYSFS_getLastErrorCode */ PHYSFS_DECL const char *PHYSFS_getErrorByCode(PHYSFS_ErrorCode code) { switch (code) { case PHYSFS_ERR_OK: return "no error"; case PHYSFS_ERR_OTHER_ERROR: return "unknown error"; case PHYSFS_ERR_OUT_OF_MEMORY: return "out of memory"; case PHYSFS_ERR_NOT_INITIALIZED: return "not initialized"; case PHYSFS_ERR_IS_INITIALIZED: return "already initialized"; case PHYSFS_ERR_ARGV0_IS_NULL: return "argv[0] is NULL"; case PHYSFS_ERR_UNSUPPORTED: return "unsupported"; case PHYSFS_ERR_PAST_EOF: return "past end of file"; case PHYSFS_ERR_FILES_STILL_OPEN: return "files still open"; case PHYSFS_ERR_INVALID_ARGUMENT: return "invalid argument"; case PHYSFS_ERR_NOT_MOUNTED: return "not mounted"; case PHYSFS_ERR_NOT_FOUND: return "not found"; case PHYSFS_ERR_SYMLINK_FORBIDDEN: return "symlinks are forbidden"; case PHYSFS_ERR_NO_WRITE_DIR: return "write directory is not set"; case PHYSFS_ERR_OPEN_FOR_READING: return "file open for reading"; case PHYSFS_ERR_OPEN_FOR_WRITING: return "file open for writing"; case PHYSFS_ERR_NOT_A_FILE: return "not a file"; case PHYSFS_ERR_READ_ONLY: return "read-only filesystem"; case PHYSFS_ERR_CORRUPT: return "corrupted"; case PHYSFS_ERR_SYMLINK_LOOP: return "infinite symbolic link loop"; case PHYSFS_ERR_IO: return "i/o error"; case PHYSFS_ERR_PERMISSION: return "permission denied"; case PHYSFS_ERR_NO_SPACE: return "no space available for writing"; case PHYSFS_ERR_BAD_FILENAME: return "filename is illegal or insecure"; case PHYSFS_ERR_BUSY: return "tried to modify a file the OS needs"; case PHYSFS_ERR_DIR_NOT_EMPTY: return "directory isn't empty"; case PHYSFS_ERR_OS_ERROR: return "OS reported an error"; case PHYSFS_ERR_DUPLICATE: return "duplicate resource"; case PHYSFS_ERR_BAD_PASSWORD: return "bad password"; case PHYSFS_ERR_APP_CALLBACK: return "app callback reported error"; } /* switch */ return NULL; /* don't know this error code. */ } /* PHYSFS_getErrorByCode */ void PHYSFS_setErrorCode(PHYSFS_ErrorCode errcode) { ErrState *err; if (!errcode) return; err = findErrorForCurrentThread(); if (err == NULL) { err = (ErrState *) allocator.Malloc(sizeof (ErrState)); if (err == NULL) return; /* uhh...? */ memset(err, '\0', sizeof (ErrState)); err->tid = __PHYSFS_platformGetThreadID(); if (errorLock != NULL) __PHYSFS_platformGrabMutex(errorLock); err->next = errorStates; errorStates = err; if (errorLock != NULL) __PHYSFS_platformReleaseMutex(errorLock); } /* if */ err->code = errcode; } /* PHYSFS_setErrorCode */ const char *PHYSFS_getLastError(void) { const PHYSFS_ErrorCode err = PHYSFS_getLastErrorCode(); return (err) ? PHYSFS_getErrorByCode(err) : NULL; } /* PHYSFS_getLastError */ /* MAKE SURE that errorLock is held before calling this! */ static void freeErrorStates(void) { ErrState *i; ErrState *next; for (i = errorStates; i != NULL; i = next) { next = i->next; allocator.Free(i); } /* for */ errorStates = NULL; } /* freeErrorStates */ void PHYSFS_getLinkedVersion(PHYSFS_Version *ver) { if (ver != NULL) { ver->major = PHYSFS_VER_MAJOR; ver->minor = PHYSFS_VER_MINOR; ver->patch = PHYSFS_VER_PATCH; } /* if */ } /* PHYSFS_getLinkedVersion */ static const char *find_filename_extension(const char *fname) { const char *retval = NULL; if (fname != NULL) { const char *p = strchr(fname, '.'); retval = p; while (p != NULL) { p = strchr(p + 1, '.'); if (p != NULL) retval = p; } /* while */ if (retval != NULL) retval++; /* skip '.' */ } /* if */ return retval; } /* find_filename_extension */ static DirHandle *tryOpenDir(PHYSFS_Io *io, const PHYSFS_Archiver *funcs, const char *d, int forWriting, int *_claimed) { DirHandle *retval = NULL; void *opaque = NULL; if (io != NULL) BAIL_IF_ERRPASS(!io->seek(io, 0), NULL); opaque = funcs->openArchive(io, d, forWriting, _claimed); if (opaque != NULL) { retval = (DirHandle *) allocator.Malloc(sizeof (DirHandle)); if (retval == NULL) funcs->closeArchive(opaque); else { memset(retval, '\0', sizeof (DirHandle)); retval->mountPoint = NULL; retval->funcs = funcs; retval->opaque = opaque; retval->forWriting = forWriting; } /* else */ } /* if */ return retval; } /* tryOpenDir */ static DirHandle *openDirectory(PHYSFS_Io *io, const char *d, int forWriting) { DirHandle *retval = NULL; PHYSFS_Archiver **i; const char *ext; int created_io = 0; int claimed = 0; PHYSFS_ErrorCode errcode; assert((io != NULL) || (d != NULL)); if (io == NULL) { /* file doesn't exist, etc? Just fail out. */ PHYSFS_Stat statbuf; BAIL_IF_ERRPASS(!__PHYSFS_platformStat(d, &statbuf, 1), NULL); /* DIR gets first shot (unlike the rest, it doesn't deal with files). */ if (statbuf.filetype == PHYSFS_FILETYPE_DIRECTORY) { retval = tryOpenDir(io, &__PHYSFS_Archiver_DIR, d, forWriting, &claimed); if (retval || claimed) return retval; } /* if */ io = __PHYSFS_createNativeIo(d, forWriting ? 'w' : 'r'); BAIL_IF_ERRPASS(!io, NULL); created_io = 1; } /* if */ ext = find_filename_extension(d); if (ext != NULL) { /* Look for archivers with matching file extensions first... */ for (i = archivers; (*i != NULL) && (retval == NULL) && !claimed; i++) { if (PHYSFS_utf8stricmp(ext, (*i)->info.extension) == 0) retval = tryOpenDir(io, *i, d, forWriting, &claimed); } /* for */ /* failing an exact file extension match, try all the others... */ for (i = archivers; (*i != NULL) && (retval == NULL) && !claimed; i++) { if (PHYSFS_utf8stricmp(ext, (*i)->info.extension) != 0) retval = tryOpenDir(io, *i, d, forWriting, &claimed); } /* for */ } /* if */ else /* no extension? Try them all. */ { for (i = archivers; (*i != NULL) && (retval == NULL) && !claimed; i++) retval = tryOpenDir(io, *i, d, forWriting, &claimed); } /* else */ errcode = claimed ? currentErrorCode() : PHYSFS_ERR_UNSUPPORTED; if ((!retval) && (created_io)) io->destroy(io); BAIL_IF(!retval, errcode, NULL); return retval; } /* openDirectory */ /* * Make a platform-independent path string sane. Doesn't actually check the * file hierarchy, it just cleans up the string. * (dst) must be a buffer at least as big as (src), as this is where the * cleaned up string is deposited. * If there are illegal bits in the path (".." entries, etc) then we * return zero and (dst) is undefined. Non-zero if the path was sanitized. */ static int sanitizePlatformIndependentPath(const char *src, char *dst) { char *prev; char ch; while (*src == '/') /* skip initial '/' chars... */ src++; /* Make sure the entire string isn't "." or ".." */ if ((strcmp(src, ".") == 0) || (strcmp(src, "..") == 0)) BAIL(PHYSFS_ERR_BAD_FILENAME, 0); prev = dst; do { ch = *(src++); if ((ch == ':') || (ch == '\\')) /* illegal chars in a physfs path. */ BAIL(PHYSFS_ERR_BAD_FILENAME, 0); if (ch == '/') /* path separator. */ { *dst = '\0'; /* "." and ".." are illegal pathnames. */ if ((strcmp(prev, ".") == 0) || (strcmp(prev, "..") == 0)) BAIL(PHYSFS_ERR_BAD_FILENAME, 0); while (*src == '/') /* chop out doubles... */ src++; if (*src == '\0') /* ends with a pathsep? */ break; /* we're done, don't add final pathsep to dst. */ prev = dst + 1; } /* if */ *(dst++) = ch; } while (ch != '\0'); return 1; } /* sanitizePlatformIndependentPath */ static inline size_t dirHandleRootLen(const DirHandle *h) { return h ? h->rootlen : 0; } /* dirHandleRootLen */ static inline int sanitizePlatformIndependentPathWithRoot(const DirHandle *h, const char *src, char *dst) { return sanitizePlatformIndependentPath(src, dst + dirHandleRootLen(h)); } /* sanitizePlatformIndependentPathWithRoot */ /* * Figure out if (fname) is part of (h)'s mountpoint. (fname) must be an * output from sanitizePlatformIndependentPath(), so that it is in a known * state. * * This only finds legitimate segments of a mountpoint. If the mountpoint is * "/a/b/c" and (fname) is "/a/b/c", "/", or "/a/b/c/d", then the results are * all zero. "/a/b" will succeed, though. */ static int partOfMountPoint(DirHandle *h, char *fname) { int rc; size_t len, mntpntlen; if (h->mountPoint == NULL) return 0; else if (*fname == '\0') return 1; len = strlen(fname); mntpntlen = strlen(h->mountPoint); if (len > mntpntlen) /* can't be a subset of mountpoint. */ return 0; /* if true, must be not a match or a complete match, but not a subset. */ if ((len + 1) == mntpntlen) return 0; rc = strncmp(fname, h->mountPoint, len); /* !!! FIXME: case insensitive? */ if (rc != 0) return 0; /* not a match. */ /* make sure /a/b matches /a/b/ and not /a/bc ... */ return h->mountPoint[len] == '/'; } /* partOfMountPoint */ static DirHandle *createDirHandle(PHYSFS_Io *io, const char *newDir, const char *mountPoint, int forWriting) { DirHandle *dirHandle = NULL; char *tmpmntpnt = NULL; assert(newDir != NULL); /* should have caught this higher up. */ if (mountPoint != NULL) { const size_t len = strlen(mountPoint) + 1; tmpmntpnt = (char *) __PHYSFS_smallAlloc(len); GOTO_IF(!tmpmntpnt, PHYSFS_ERR_OUT_OF_MEMORY, badDirHandle); if (!sanitizePlatformIndependentPath(mountPoint, tmpmntpnt)) goto badDirHandle; mountPoint = tmpmntpnt; /* sanitized version. */ } /* if */ dirHandle = openDirectory(io, newDir, forWriting); GOTO_IF_ERRPASS(!dirHandle, badDirHandle); dirHandle->dirName = (char *) allocator.Malloc(strlen(newDir) + 1); GOTO_IF(!dirHandle->dirName, PHYSFS_ERR_OUT_OF_MEMORY, badDirHandle); strcpy(dirHandle->dirName, newDir); if ((mountPoint != NULL) && (*mountPoint != '\0')) { dirHandle->mountPoint = (char *)allocator.Malloc(strlen(mountPoint)+2); if (!dirHandle->mountPoint) GOTO(PHYSFS_ERR_OUT_OF_MEMORY, badDirHandle); strcpy(dirHandle->mountPoint, mountPoint); strcat(dirHandle->mountPoint, "/"); } /* if */ __PHYSFS_smallFree(tmpmntpnt); return dirHandle; badDirHandle: if (dirHandle != NULL) { dirHandle->funcs->closeArchive(dirHandle->opaque); allocator.Free(dirHandle->dirName); allocator.Free(dirHandle->mountPoint); allocator.Free(dirHandle); } /* if */ __PHYSFS_smallFree(tmpmntpnt); return NULL; } /* createDirHandle */ /* MAKE SURE you've got the stateLock held before calling this! */ static int freeDirHandle(DirHandle *dh, FileHandle *openList) { FileHandle *i; if (dh == NULL) return 1; for (i = openList; i != NULL; i = i->next) BAIL_IF(i->dirHandle == dh, PHYSFS_ERR_FILES_STILL_OPEN, 0); dh->funcs->closeArchive(dh->opaque); if (dh->root) allocator.Free(dh->root); allocator.Free(dh->dirName); allocator.Free(dh->mountPoint); allocator.Free(dh); return 1; } /* freeDirHandle */ static int dirHandleFilesOpen(DirHandle *dh, FileHandle *openList) { FileHandle *i; if (dh == NULL) return 0; for (i = openList; i != NULL; i = i->next) { if (i->dirHandle == dh) return 1; } return 0; } /* dirHandleFilesOpen */ static char *calculateBaseDir(const char *argv0) { const char dirsep = __PHYSFS_platformDirSeparator; char *retval = NULL; char *ptr = NULL; /* Give the platform layer first shot at this. */ retval = __PHYSFS_platformCalcBaseDir(argv0); if (retval != NULL) return retval; /* We need argv0 to go on. */ BAIL_IF(argv0 == NULL, PHYSFS_ERR_ARGV0_IS_NULL, NULL); ptr = strrchr(argv0, dirsep); if (ptr != NULL) { const size_t size = ((size_t) (ptr - argv0)) + 1; retval = (char *) allocator.Malloc(size + 1); BAIL_IF(!retval, PHYSFS_ERR_OUT_OF_MEMORY, NULL); memcpy(retval, argv0, size); retval[size] = '\0'; return retval; } /* if */ /* argv0 wasn't helpful. */ BAIL(PHYSFS_ERR_INVALID_ARGUMENT, NULL); } /* calculateBaseDir */ static int initializeMutexes(void) { errorLock = __PHYSFS_platformCreateMutex(); if (errorLock == NULL) goto initializeMutexes_failed; stateLock = __PHYSFS_platformCreateMutex(); if (stateLock == NULL) goto initializeMutexes_failed; return 1; /* success. */ initializeMutexes_failed: if (errorLock != NULL) __PHYSFS_platformDestroyMutex(errorLock); if (stateLock != NULL) __PHYSFS_platformDestroyMutex(stateLock); errorLock = stateLock = NULL; return 0; /* failed. */ } /* initializeMutexes */ static int doRegisterArchiver(const PHYSFS_Archiver *_archiver); static int initStaticArchivers(void) { #define REGISTER_STATIC_ARCHIVER(arc) { \ if (!doRegisterArchiver(&__PHYSFS_Archiver_##arc)) { \ return 0; \ } \ } #if PHYSFS_SUPPORTS_ZIP REGISTER_STATIC_ARCHIVER(ZIP); #endif #if PHYSFS_SUPPORTS_7Z SZIP_global_init(); REGISTER_STATIC_ARCHIVER(7Z); #endif #if PHYSFS_SUPPORTS_GRP REGISTER_STATIC_ARCHIVER(GRP); #endif #if PHYSFS_SUPPORTS_QPAK REGISTER_STATIC_ARCHIVER(QPAK); #endif #if PHYSFS_SUPPORTS_HOG REGISTER_STATIC_ARCHIVER(HOG); #endif #if PHYSFS_SUPPORTS_MVL REGISTER_STATIC_ARCHIVER(MVL); #endif #if PHYSFS_SUPPORTS_WAD REGISTER_STATIC_ARCHIVER(WAD); #endif #if PHYSFS_SUPPORTS_SLB REGISTER_STATIC_ARCHIVER(SLB); #endif #if PHYSFS_SUPPORTS_ISO9660 REGISTER_STATIC_ARCHIVER(ISO9660); #endif #if PHYSFS_SUPPORTS_VDF REGISTER_STATIC_ARCHIVER(VDF) #endif #undef REGISTER_STATIC_ARCHIVER return 1; } /* initStaticArchivers */ static void setDefaultAllocator(void); static int doDeinit(void); int PHYSFS_init(const char *argv0) { BAIL_IF(initialized, PHYSFS_ERR_IS_INITIALIZED, 0); if (!externalAllocator) setDefaultAllocator(); if ((allocator.Init != NULL) && (!allocator.Init())) return 0; if (!__PHYSFS_platformInit()) { if (allocator.Deinit != NULL) allocator.Deinit(); return 0; } /* if */ /* everything below here can be cleaned up safely by doDeinit(). */ if (!initializeMutexes()) goto initFailed; baseDir = calculateBaseDir(argv0); if (!baseDir) goto initFailed; userDir = __PHYSFS_platformCalcUserDir(); if (!userDir) goto initFailed; /* Platform layer is required to append a dirsep. */ #ifndef __ANDROID__ /* it's an APK file, not a directory, on Android. */ assert(baseDir[strlen(baseDir) - 1] == __PHYSFS_platformDirSeparator); #endif assert(userDir[strlen(userDir) - 1] == __PHYSFS_platformDirSeparator); if (!initStaticArchivers()) goto initFailed; initialized = 1; /* This makes sure that the error subsystem is initialized. */ PHYSFS_setErrorCode(PHYSFS_getLastErrorCode()); return 1; initFailed: doDeinit(); return 0; } /* PHYSFS_init */ /* MAKE SURE you hold stateLock before calling this! */ static int closeFileHandleList(FileHandle **list) { FileHandle *i; FileHandle *next = NULL; for (i = *list; i != NULL; i = next) { PHYSFS_Io *io = i->io; next = i->next; if (io->flush && !io->flush(io)) { *list = i; return 0; } /* if */ io->destroy(io); allocator.Free(i); } /* for */ *list = NULL; return 1; } /* closeFileHandleList */ /* MAKE SURE you hold the stateLock before calling this! */ static void freeSearchPath(void) { DirHandle *i; DirHandle *next = NULL; closeFileHandleList(&openReadList); if (searchPath != NULL) { for (i = searchPath; i != NULL; i = next) { next = i->next; freeDirHandle(i, openReadList); } /* for */ searchPath = NULL; } /* if */ } /* freeSearchPath */ /* MAKE SURE you hold stateLock before calling this! */ static int archiverInUse(const PHYSFS_Archiver *arc, const DirHandle *list) { const DirHandle *i; for (i = list; i != NULL; i = i->next) { if (i->funcs == arc) return 1; } /* for */ return 0; /* not in use */ } /* archiverInUse */ /* MAKE SURE you hold stateLock before calling this! */ static int doDeregisterArchiver(const size_t idx) { const size_t len = (numArchivers - idx) * sizeof (void *); PHYSFS_ArchiveInfo *info = archiveInfo[idx]; PHYSFS_Archiver *arc = archivers[idx]; /* make sure nothing is still using this archiver */ if (archiverInUse(arc, searchPath) || archiverInUse(arc, writeDir)) BAIL(PHYSFS_ERR_FILES_STILL_OPEN, 0); allocator.Free((void *) info->extension); allocator.Free((void *) info->description); allocator.Free((void *) info->author); allocator.Free((void *) info->url); allocator.Free((void *) arc); memmove(&archiveInfo[idx], &archiveInfo[idx+1], len); memmove(&archivers[idx], &archivers[idx+1], len); assert(numArchivers > 0); numArchivers--; return 1; } /* doDeregisterArchiver */ /* Does NOT hold the state lock; we're shutting down. */ static void freeArchivers(void) { while (numArchivers > 0) { if (!doDeregisterArchiver(numArchivers - 1)) assert(!"nothing should be mounted during shutdown."); } /* while */ allocator.Free(archivers); allocator.Free(archiveInfo); archivers = NULL; archiveInfo = NULL; } /* freeArchivers */ static int doDeinit(void) { closeFileHandleList(&openWriteList); BAIL_IF(!PHYSFS_setWriteDir(NULL), PHYSFS_ERR_FILES_STILL_OPEN, 0); freeSearchPath(); freeArchivers(); freeErrorStates(); if (baseDir != NULL) { allocator.Free(baseDir); baseDir = NULL; } /* if */ if (userDir != NULL) { allocator.Free(userDir); userDir = NULL; } /* if */ if (prefDir != NULL) { allocator.Free(prefDir); prefDir = NULL; } /* if */ if (archiveInfo != NULL) { allocator.Free(archiveInfo); archiveInfo = NULL; } /* if */ if (archivers != NULL) { allocator.Free(archivers); archivers = NULL; } /* if */ longest_root = 0; allowSymLinks = 0; initialized = 0; if (errorLock) __PHYSFS_platformDestroyMutex(errorLock); if (stateLock) __PHYSFS_platformDestroyMutex(stateLock); if (allocator.Deinit != NULL) allocator.Deinit(); errorLock = stateLock = NULL; __PHYSFS_platformDeinit(); return 1; } /* doDeinit */ int PHYSFS_deinit(void) { BAIL_IF(!initialized, PHYSFS_ERR_NOT_INITIALIZED, 0); return doDeinit(); } /* PHYSFS_deinit */ int PHYSFS_isInit(void) { return initialized; } /* PHYSFS_isInit */ char *__PHYSFS_strdup(const char *str) { char *retval = (char *) allocator.Malloc(strlen(str) + 1); if (retval) strcpy(retval, str); return retval; } /* __PHYSFS_strdup */ PHYSFS_uint32 __PHYSFS_hashString(const char *str) { PHYSFS_uint32 hash = 5381; while (1) { const char ch = *(str++); if (ch == 0) break; hash = ((hash << 5) + hash) ^ ch; } /* while */ return hash; } /* __PHYSFS_hashString */ PHYSFS_uint32 __PHYSFS_hashStringCaseFold(const char *str) { PHYSFS_uint32 hash = 5381; while (1) { const PHYSFS_uint32 cp = __PHYSFS_utf8codepoint(&str); if (cp == 0) break; else { PHYSFS_uint32 folded[3]; const int numbytes = (int) (PHYSFS_caseFold(cp, folded) * sizeof (PHYSFS_uint32)); const char *bytes = (const char *) folded; int i; for (i = 0; i < numbytes; i++) hash = ((hash << 5) + hash) ^ *(bytes++); } /* else */ } /* while */ return hash; } /* __PHYSFS_hashStringCaseFold */ PHYSFS_uint32 __PHYSFS_hashStringCaseFoldUSAscii(const char *str) { PHYSFS_uint32 hash = 5381; while (1) { char ch = *(str++); if (ch == 0) break; else if ((ch >= 'A') && (ch <= 'Z')) ch -= ('A' - 'a'); hash = ((hash << 5) + hash) ^ ch; } /* while */ return hash; } /* __PHYSFS_hashStringCaseFoldUSAscii */ /* MAKE SURE you hold stateLock before calling this! */ static int doRegisterArchiver(const PHYSFS_Archiver *_archiver) { const PHYSFS_uint32 maxver = CURRENT_PHYSFS_ARCHIVER_API_VERSION; const size_t len = (numArchivers + 2) * sizeof (void *); PHYSFS_Archiver *archiver = NULL; PHYSFS_ArchiveInfo *info = NULL; const char *ext = NULL; void *ptr = NULL; size_t i; BAIL_IF(!_archiver, PHYSFS_ERR_INVALID_ARGUMENT, 0); BAIL_IF(_archiver->version > maxver, PHYSFS_ERR_UNSUPPORTED, 0); BAIL_IF(!_archiver->info.extension, PHYSFS_ERR_INVALID_ARGUMENT, 0); BAIL_IF(!_archiver->info.description, PHYSFS_ERR_INVALID_ARGUMENT, 0); BAIL_IF(!_archiver->info.author, PHYSFS_ERR_INVALID_ARGUMENT, 0); BAIL_IF(!_archiver->info.url, PHYSFS_ERR_INVALID_ARGUMENT, 0); BAIL_IF(!_archiver->openArchive, PHYSFS_ERR_INVALID_ARGUMENT, 0); BAIL_IF(!_archiver->enumerate, PHYSFS_ERR_INVALID_ARGUMENT, 0); BAIL_IF(!_archiver->openRead, PHYSFS_ERR_INVALID_ARGUMENT, 0); BAIL_IF(!_archiver->openWrite, PHYSFS_ERR_INVALID_ARGUMENT, 0); BAIL_IF(!_archiver->openAppend, PHYSFS_ERR_INVALID_ARGUMENT, 0); BAIL_IF(!_archiver->remove, PHYSFS_ERR_INVALID_ARGUMENT, 0); BAIL_IF(!_archiver->mkdir, PHYSFS_ERR_INVALID_ARGUMENT, 0); BAIL_IF(!_archiver->closeArchive, PHYSFS_ERR_INVALID_ARGUMENT, 0); BAIL_IF(!_archiver->stat, PHYSFS_ERR_INVALID_ARGUMENT, 0); ext = _archiver->info.extension; for (i = 0; i < numArchivers; i++) { if (PHYSFS_utf8stricmp(archiveInfo[i]->extension, ext) == 0) BAIL(PHYSFS_ERR_DUPLICATE, 0); } /* for */ /* make a copy of the data. */ archiver = (PHYSFS_Archiver *) allocator.Malloc(sizeof (*archiver)); GOTO_IF(!archiver, PHYSFS_ERR_OUT_OF_MEMORY, regfailed); /* Must copy sizeof (OLD_VERSION_OF_STRUCT) when version changes! */ memcpy(archiver, _archiver, sizeof (*archiver)); info = (PHYSFS_ArchiveInfo *) &archiver->info; memset(info, '\0', sizeof (*info)); /* NULL in case an alloc fails. */ #define CPYSTR(item) \ info->item = __PHYSFS_strdup(_archiver->info.item); \ GOTO_IF(!info->item, PHYSFS_ERR_OUT_OF_MEMORY, regfailed); CPYSTR(extension); CPYSTR(description); CPYSTR(author); CPYSTR(url); info->supportsSymlinks = _archiver->info.supportsSymlinks; #undef CPYSTR ptr = allocator.Realloc(archiveInfo, len); GOTO_IF(!ptr, PHYSFS_ERR_OUT_OF_MEMORY, regfailed); archiveInfo = (PHYSFS_ArchiveInfo **) ptr; ptr = allocator.Realloc(archivers, len); GOTO_IF(!ptr, PHYSFS_ERR_OUT_OF_MEMORY, regfailed); archivers = (PHYSFS_Archiver **) ptr; archiveInfo[numArchivers] = info; archiveInfo[numArchivers + 1] = NULL; archivers[numArchivers] = archiver; archivers[numArchivers + 1] = NULL; numArchivers++; return 1; regfailed: if (info != NULL) { allocator.Free((void *) info->extension); allocator.Free((void *) info->description); allocator.Free((void *) info->author); allocator.Free((void *) info->url); } /* if */ allocator.Free(archiver); return 0; } /* doRegisterArchiver */ int PHYSFS_registerArchiver(const PHYSFS_Archiver *archiver) { int retval; BAIL_IF(!initialized, PHYSFS_ERR_NOT_INITIALIZED, 0); __PHYSFS_platformGrabMutex(stateLock); retval = doRegisterArchiver(archiver); __PHYSFS_platformReleaseMutex(stateLock); return retval; } /* PHYSFS_registerArchiver */ int PHYSFS_deregisterArchiver(const char *ext) { size_t i; BAIL_IF(!initialized, PHYSFS_ERR_NOT_INITIALIZED, 0); BAIL_IF(!ext, PHYSFS_ERR_INVALID_ARGUMENT, 0); __PHYSFS_platformGrabMutex(stateLock); for (i = 0; i < numArchivers; i++) { if (PHYSFS_utf8stricmp(archiveInfo[i]->extension, ext) == 0) { const int retval = doDeregisterArchiver(i); __PHYSFS_platformReleaseMutex(stateLock); return retval; } /* if */ } /* for */ __PHYSFS_platformReleaseMutex(stateLock); BAIL(PHYSFS_ERR_NOT_FOUND, 0); } /* PHYSFS_deregisterArchiver */ const PHYSFS_ArchiveInfo **PHYSFS_supportedArchiveTypes(void) { BAIL_IF(!initialized, PHYSFS_ERR_NOT_INITIALIZED, NULL); return (const PHYSFS_ArchiveInfo **) archiveInfo; } /* PHYSFS_supportedArchiveTypes */ void PHYSFS_freeList(void *list) { void **i; if (list != NULL) { for (i = (void **) list; *i != NULL; i++) allocator.Free(*i); allocator.Free(list); } /* if */ } /* PHYSFS_freeList */ const char *PHYSFS_getDirSeparator(void) { static char retval[2] = { __PHYSFS_platformDirSeparator, '\0' }; return retval; } /* PHYSFS_getDirSeparator */ char **PHYSFS_getCdRomDirs(void) { return doEnumStringList(__PHYSFS_platformDetectAvailableCDs); } /* PHYSFS_getCdRomDirs */ void PHYSFS_getCdRomDirsCallback(PHYSFS_StringCallback callback, void *data) { __PHYSFS_platformDetectAvailableCDs(callback, data); } /* PHYSFS_getCdRomDirsCallback */ const char *PHYSFS_getPrefDir(const char *org, const char *app) { const char dirsep = __PHYSFS_platformDirSeparator; PHYSFS_Stat statbuf; char *ptr = NULL; char *endstr = NULL; BAIL_IF(!initialized, PHYSFS_ERR_NOT_INITIALIZED, 0); BAIL_IF(!org, PHYSFS_ERR_INVALID_ARGUMENT, NULL); BAIL_IF(*org == '\0', PHYSFS_ERR_INVALID_ARGUMENT, NULL); BAIL_IF(!app, PHYSFS_ERR_INVALID_ARGUMENT, NULL); BAIL_IF(*app == '\0', PHYSFS_ERR_INVALID_ARGUMENT, NULL); allocator.Free(prefDir); prefDir = __PHYSFS_platformCalcPrefDir(org, app); BAIL_IF_ERRPASS(!prefDir, NULL); assert(strlen(prefDir) > 0); endstr = prefDir + (strlen(prefDir) - 1); assert(*endstr == dirsep); *endstr = '\0'; /* mask out the final dirsep for now. */ if (!__PHYSFS_platformStat(prefDir, &statbuf, 1)) { for (ptr = strchr(prefDir, dirsep); ptr; ptr = strchr(ptr+1, dirsep)) { *ptr = '\0'; __PHYSFS_platformMkDir(prefDir); *ptr = dirsep; } /* for */ if (!__PHYSFS_platformMkDir(prefDir)) { allocator.Free(prefDir); prefDir = NULL; } /* if */ } /* if */ *endstr = dirsep; /* readd the final dirsep. */ return prefDir; } /* PHYSFS_getPrefDir */ const char *PHYSFS_getBaseDir(void) { return baseDir; /* this is calculated in PHYSFS_init()... */ } /* PHYSFS_getBaseDir */ const char *__PHYSFS_getUserDir(void) /* not deprecated internal version. */ { return userDir; /* this is calculated in PHYSFS_init()... */ } /* __PHYSFS_getUserDir */ const char *PHYSFS_getUserDir(void) { return __PHYSFS_getUserDir(); } /* PHYSFS_getUserDir */ const char *PHYSFS_getWriteDir(void) { const char *retval = NULL; __PHYSFS_platformGrabMutex(stateLock); if (writeDir != NULL) retval = writeDir->dirName; __PHYSFS_platformReleaseMutex(stateLock); return retval; } /* PHYSFS_getWriteDir */ int PHYSFS_setWriteDir(const char *newDir) { int retval = 1; __PHYSFS_platformGrabMutex(stateLock); if (writeDir != NULL) { BAIL_IF_MUTEX_ERRPASS(!freeDirHandle(writeDir, openWriteList), stateLock, 0); writeDir = NULL; } /* if */ if (newDir != NULL) { writeDir = createDirHandle(NULL, newDir, NULL, 1); retval = (writeDir != NULL); } /* if */ __PHYSFS_platformReleaseMutex(stateLock); return retval; } /* PHYSFS_setWriteDir */ int PHYSFS_setRoot(const char *archive, const char *subdir) { DirHandle *i; BAIL_IF(!archive, PHYSFS_ERR_INVALID_ARGUMENT, 0); __PHYSFS_platformGrabMutex(stateLock); for (i = searchPath; i != NULL; i = i->next) { if ((i->dirName != NULL) && (strcmp(archive, i->dirName) == 0)) { if (!subdir || (strcmp(subdir, "/") == 0)) { if (i->root) allocator.Free(i->root); i->root = NULL; i->rootlen = 0; } /* if */ else { const size_t len = strlen(subdir) + 1; char *ptr = (char *) allocator.Malloc(len); BAIL_IF_MUTEX(!ptr, PHYSFS_ERR_OUT_OF_MEMORY, stateLock, 0); if (!sanitizePlatformIndependentPath(subdir, ptr)) { allocator.Free(ptr); BAIL_MUTEX_ERRPASS(stateLock, 0); } /* if */ if (i->root) allocator.Free(i->root); i->root = ptr; i->rootlen = strlen(i->root); /* in case sanitizePlatformIndependentPath changed subdir */ if (longest_root < i->rootlen) longest_root = i->rootlen; } /* else */ break; } /* if */ } /* for */ __PHYSFS_platformReleaseMutex(stateLock); return 1; } /* PHYSFS_setRoot */ static int doMount(PHYSFS_Io *io, const char *fname, const char *mountPoint, int appendToPath, int forWriting) { DirHandle *dh; DirHandle *prev = NULL; DirHandle *i; BAIL_IF(!fname, PHYSFS_ERR_INVALID_ARGUMENT, 0); if (mountPoint == NULL) mountPoint = "/"; __PHYSFS_platformGrabMutex(stateLock); for (i = searchPath; i != NULL; i = i->next) { /* already in search path? */ if ((i->dirName != NULL) && (strcmp(fname, i->dirName) == 0)) BAIL_MUTEX_ERRPASS(stateLock, 1); prev = i; } /* for */ dh = createDirHandle(io, fname, mountPoint, forWriting); BAIL_IF_MUTEX_ERRPASS(!dh, stateLock, 0); if (appendToPath) { if (prev == NULL) searchPath = dh; else prev->next = dh; } /* if */ else { dh->next = searchPath; searchPath = dh; } /* else */ __PHYSFS_platformReleaseMutex(stateLock); return 1; } /* doMount */ int PHYSFS_mountIo(PHYSFS_Io *io, const char *fname, const char *mountPoint, int appendToPath) { BAIL_IF(!io, PHYSFS_ERR_INVALID_ARGUMENT, 0); BAIL_IF(!fname, PHYSFS_ERR_INVALID_ARGUMENT, 0); BAIL_IF(io->version != 0, PHYSFS_ERR_UNSUPPORTED, 0); return doMount(io, fname, mountPoint, appendToPath, 0); } /* PHYSFS_mountIo */ int PHYSFS_mountMemory(const void *buf, PHYSFS_uint64 len, void (*del)(void *), const char *fname, const char *mountPoint, int appendToPath) { int retval = 0; PHYSFS_Io *io = NULL; BAIL_IF(!buf, PHYSFS_ERR_INVALID_ARGUMENT, 0); BAIL_IF(!fname, PHYSFS_ERR_INVALID_ARGUMENT, 0); io = __PHYSFS_createMemoryIo(buf, len, del); BAIL_IF_ERRPASS(!io, 0); retval = doMount(io, fname, mountPoint, appendToPath, 0); if (!retval) { /* docs say not to call (del) in case of failure, so cheat. */ MemoryIoInfo *info = (MemoryIoInfo *) io->opaque; info->destruct = NULL; io->destroy(io); } /* if */ return retval; } /* PHYSFS_mountMemory */ int PHYSFS_mountHandle(PHYSFS_File *file, const char *fname, const char *mountPoint, int appendToPath) { int retval = 0; PHYSFS_Io *io = NULL; BAIL_IF(!file, PHYSFS_ERR_INVALID_ARGUMENT, 0); BAIL_IF(!fname, PHYSFS_ERR_INVALID_ARGUMENT, 0); io = __PHYSFS_createHandleIo(file); BAIL_IF_ERRPASS(!io, 0); retval = doMount(io, fname, mountPoint, appendToPath, 0); if (!retval) { /* docs say not to destruct in case of failure, so cheat. */ io->opaque = NULL; io->destroy(io); } /* if */ return retval; } /* PHYSFS_mountHandle */ int PHYSFS_mount(const char *newDir, const char *mountPoint, int appendToPath) { BAIL_IF(!newDir, PHYSFS_ERR_INVALID_ARGUMENT, 0); return doMount(NULL, newDir, mountPoint, appendToPath, 0); } /* PHYSFS_mount */ int PHYSFS_mountRW(const char *newDir, const char *mountPoint, int appendToPath) { BAIL_IF(!newDir, PHYSFS_ERR_INVALID_ARGUMENT, 0); return doMount(NULL, newDir, mountPoint, appendToPath, 1); } /* PHYSFS_mount */ int PHYSFS_addToSearchPath(const char *newDir, int appendToPath) { return PHYSFS_mount(newDir, NULL, appendToPath); } /* PHYSFS_addToSearchPath */ int PHYSFS_removeFromSearchPath(const char *oldDir) { return PHYSFS_unmount(oldDir); } /* PHYSFS_removeFromSearchPath */ int PHYSFS_unmount(const char *oldDir) { DirHandle *i; DirHandle *prev = NULL; DirHandle *next = NULL; BAIL_IF(oldDir == NULL, PHYSFS_ERR_INVALID_ARGUMENT, 0); __PHYSFS_platformGrabMutex(stateLock); for (i = searchPath; i != NULL; i = i->next) { if (strcmp(i->dirName, oldDir) == 0) { next = i->next; if (i->forWriting && dirHandleFilesOpen(i, openWriteList)) BAIL_MUTEX(PHYSFS_ERR_FILES_STILL_OPEN, stateLock, 0); BAIL_IF_MUTEX_ERRPASS(!freeDirHandle(i, openReadList), stateLock, 0); if (prev == NULL) searchPath = next; else prev->next = next; BAIL_MUTEX_ERRPASS(stateLock, 1); } /* if */ prev = i; } /* for */ BAIL_MUTEX(PHYSFS_ERR_NOT_MOUNTED, stateLock, 0); } /* PHYSFS_unmount */ int PHYSFS_canUnmount(const char *oldDir) { DirHandle *i; BAIL_IF(oldDir == NULL, PHYSFS_ERR_INVALID_ARGUMENT, 0); __PHYSFS_platformGrabMutex(stateLock); for (i = searchPath; i != NULL; i = i->next) { if (strcmp(i->dirName, oldDir) == 0) { if (i->forWriting && dirHandleFilesOpen(i, openWriteList)) BAIL_MUTEX(PHYSFS_ERR_OK, stateLock, 0); if (dirHandleFilesOpen(i, openReadList)) BAIL_MUTEX(PHYSFS_ERR_OK, stateLock, 0); BAIL_MUTEX(PHYSFS_ERR_OK, stateLock, 1); } } BAIL_MUTEX(PHYSFS_ERR_NOT_MOUNTED, stateLock, 0); } /* PHYSFS_canUnmount */ char **PHYSFS_getSearchPath(void) { return doEnumStringList(PHYSFS_getSearchPathCallback); } /* PHYSFS_getSearchPath */ const char *PHYSFS_getMountPoint(const char *dir) { DirHandle *i; __PHYSFS_platformGrabMutex(stateLock); for (i = searchPath; i != NULL; i = i->next) { if (strcmp(i->dirName, dir) == 0) { const char *retval = ((i->mountPoint) ? i->mountPoint : "/"); __PHYSFS_platformReleaseMutex(stateLock); return retval; } /* if */ } /* for */ __PHYSFS_platformReleaseMutex(stateLock); BAIL(PHYSFS_ERR_NOT_MOUNTED, NULL); } /* PHYSFS_getMountPoint */ void PHYSFS_getSearchPathCallback(PHYSFS_StringCallback callback, void *data) { DirHandle *i; __PHYSFS_platformGrabMutex(stateLock); for (i = searchPath; i != NULL; i = i->next) callback(data, i->dirName); __PHYSFS_platformReleaseMutex(stateLock); } /* PHYSFS_getSearchPathCallback */ typedef struct setSaneCfgEnumData { const char *archiveExt; size_t archiveExtLen; int archivesFirst; PHYSFS_ErrorCode errcode; } setSaneCfgEnumData; static PHYSFS_EnumerateCallbackResult setSaneCfgEnumCallback(void *_data, const char *dir, const char *f) { setSaneCfgEnumData *data = (setSaneCfgEnumData *) _data; const size_t extlen = data->archiveExtLen; const size_t l = strlen(f); const char *ext; if ((l > extlen) && (f[l - extlen - 1] == '.')) { ext = f + (l - extlen); if (PHYSFS_utf8stricmp(ext, data->archiveExt) == 0) { const char dirsep = __PHYSFS_platformDirSeparator; const char *d = PHYSFS_getRealDir(f); const size_t allocsize = strlen(d) + l + 2; char *str = (char *) __PHYSFS_smallAlloc(allocsize); if (str == NULL) data->errcode = PHYSFS_ERR_OUT_OF_MEMORY; else { snprintf(str, allocsize, "%s%c%s", d, dirsep, f); if (!PHYSFS_mount(str, NULL, data->archivesFirst == 0)) data->errcode = currentErrorCode(); __PHYSFS_smallFree(str); } /* else */ } /* if */ } /* if */ /* !!! FIXME: if we want to abort on errors... */ /*return (data->errcode != PHYSFS_ERR_OK) ? PHYSFS_ENUM_ERROR : PHYSFS_ENUM_OK;*/ return PHYSFS_ENUM_OK; /* keep going */ } /* setSaneCfgEnumCallback */ int PHYSFS_setSaneConfig(const char *organization, const char *appName, const char *archiveExt, int includeCdRoms, int archivesFirst) { const char *basedir; const char *prefdir; BAIL_IF(!initialized, PHYSFS_ERR_NOT_INITIALIZED, 0); prefdir = PHYSFS_getPrefDir(organization, appName); BAIL_IF_ERRPASS(!prefdir, 0); basedir = PHYSFS_getBaseDir(); BAIL_IF_ERRPASS(!basedir, 0); BAIL_IF(!PHYSFS_setWriteDir(prefdir), PHYSFS_ERR_NO_WRITE_DIR, 0); /* !!! FIXME: these can fail and we should report that... */ /* Put write dir first in search path... */ PHYSFS_mount(prefdir, NULL, 0); /* Put base path on search path... */ PHYSFS_mount(basedir, NULL, 1); /* handle CD-ROMs... */ if (includeCdRoms) { char **cds = PHYSFS_getCdRomDirs(); char **i; for (i = cds; *i != NULL; i++) PHYSFS_mount(*i, NULL, 1); PHYSFS_freeList(cds); } /* if */ /* Root out archives, and add them to search path... */ if (archiveExt != NULL) { setSaneCfgEnumData data; memset(&data, '\0', sizeof (data)); data.archiveExt = archiveExt; data.archiveExtLen = strlen(archiveExt); data.archivesFirst = archivesFirst; data.errcode = PHYSFS_ERR_OK; if (!PHYSFS_enumerate("/", setSaneCfgEnumCallback, &data)) { /* !!! FIXME: use this if we're reporting errors. PHYSFS_ErrorCode errcode = currentErrorCode(); if (errcode == PHYSFS_ERR_APP_CALLBACK) errcode = data->errcode; */ } /* if */ } /* if */ return 1; } /* PHYSFS_setSaneConfig */ void PHYSFS_permitSymbolicLinks(int allow) { allowSymLinks = allow; } /* PHYSFS_permitSymbolicLinks */ int PHYSFS_symbolicLinksPermitted(void) { return allowSymLinks; } /* PHYSFS_symbolicLinksPermitted */ /* * Verify that (fname) (in platform-independent notation), in relation * to (h) is secure. That means that each element of fname is checked * for symlinks (if they aren't permitted). This also allows for quick * rejection of files that exist outside an archive's mountpoint. * * With some exceptions (like PHYSFS_mkdir(), which builds multiple subdirs * at a time), you should always pass zero for "allowMissing" for efficiency. * * (fname) must point to an output from sanitizePlatformIndependentPath(), * since it will make sure that path names are in the right format for * passing certain checks. It will also do checks for "insecure" pathnames * like ".." which should be done once instead of once per archive. This also * gives us license to treat (fname) as scratch space in this function. * * (fname)'s buffer must have enough space available before it for this * function to prepend any root directory for this DirHandle. * * Returns non-zero if string is safe, zero if there's a security issue. * PHYSFS_getLastError() will specify what was wrong. (*fname) will be * updated to point past any mount point elements so it is prepared to * be used with the archiver directly. */ static int verifyPath(DirHandle *h, char **_fname, int allowMissing) { char *fname = *_fname; int retval = 1; char *start; char *end; if ((*fname == '\0') && (!h->root)) /* quick rejection. */ return 1; /* !!! FIXME: This codeblock sucks. */ if (h->mountPoint != NULL) /* NULL mountpoint means "/". */ { size_t mntpntlen = strlen(h->mountPoint); size_t len = strlen(fname); assert(mntpntlen > 1); /* root mount points should be NULL. */ /* not under the mountpoint, so skip this archive. */ BAIL_IF(len < mntpntlen-1, PHYSFS_ERR_NOT_FOUND, 0); /* !!! FIXME: Case insensitive? */ retval = strncmp(h->mountPoint, fname, mntpntlen-1); BAIL_IF(retval != 0, PHYSFS_ERR_NOT_FOUND, 0); if (len > mntpntlen-1) /* corner case... */ BAIL_IF(fname[mntpntlen-1]!='/', PHYSFS_ERR_NOT_FOUND, 0); fname += mntpntlen-1; /* move to start of actual archive path. */ if (*fname == '/') fname++; *_fname = fname; /* skip mountpoint for later use. */ retval = 1; /* may be reset, below. */ } /* if */ /* prepend the root directory, if any. */ if (h->root) { const int isempty = (*fname == '\0'); fname -= h->rootlen + (isempty ? 0 : 1); strcpy(fname, h->root); if (!isempty) fname[h->rootlen] = '/'; *_fname = fname; } /* if */ start = fname; if (!allowSymLinks) { while (1) { PHYSFS_Stat statbuf; int rc = 0; end = strchr(start, '/'); if (end != NULL) *end = '\0'; rc = h->funcs->stat(h->opaque, fname, &statbuf); if (rc) rc = (statbuf.filetype == PHYSFS_FILETYPE_SYMLINK); else if (currentErrorCode() == PHYSFS_ERR_NOT_FOUND) retval = 0; if (end != NULL) *end = '/'; /* insecure path (has a disallowed symlink in it)? */ BAIL_IF(rc, PHYSFS_ERR_SYMLINK_FORBIDDEN, 0); /* break out early if path element is missing. */ if (!retval) { /* * We need to clear it if it's the last element of the path, * since this might be a non-existant file we're opening * for writing... */ if ((end == NULL) || (allowMissing)) retval = 1; break; } /* if */ if (end == NULL) break; start = end + 1; } /* while */ } /* if */ return retval; } /* verifyPath */ static int countPathComponents(const char *path) { int components = 0; const char *start; const char *end; if (path == NULL) return 0; if (*path != '/') components = 1; start = path; while (1) { end = strchr(start, '/'); if (end == NULL) break; components++; start = end + 1; } return components; } /* countPathComponents */ static DirHandle *findWriteHandle(const char *_fname) { DirHandle *i = NULL; int deepest_path_components = -1; DirHandle *deepest_dirhandle = NULL; char *allocated_fname; char *fname; size_t len; len = strlen(_fname) + longest_root + 1; allocated_fname = (char *) __PHYSFS_smallAlloc(len); BAIL_IF(!allocated_fname, PHYSFS_ERR_OUT_OF_MEMORY, NULL); fname = allocated_fname + longest_root; if (sanitizePlatformIndependentPath(_fname, fname)) { for (i = searchPath; i != NULL; i = i->next) { char *arcfname = fname; if (i->forWriting && verifyPath(i, &arcfname, 0)) { int path_components = 0; if (i->mountPoint != NULL) path_components = countPathComponents(i->mountPoint); if (path_components > deepest_path_components) { deepest_path_components = path_components; deepest_dirhandle = i; } /* if */ } /* if */ } /* for */ } /* if */ __PHYSFS_smallFree(allocated_fname); return deepest_dirhandle != NULL ? deepest_dirhandle : writeDir; } /* findWriteHandle */ /* This must hold the stateLock before calling. */ static int doMkdir(const char *_dname, char *dname, DirHandle *h) { char *start; char *end; int retval = 0; int exists = 1; /* force existance check on first path element. */ assert(h != NULL); BAIL_IF_ERRPASS(!sanitizePlatformIndependentPathWithRoot(h, _dname, dname), 0); BAIL_IF_ERRPASS(!verifyPath(h, &dname, 1), 0); start = dname; while (1) { end = strchr(start, '/'); if (end != NULL) *end = '\0'; /* only check for existance if all parent dirs existed, too... */ if (exists) { PHYSFS_Stat statbuf; const int rc = h->funcs->stat(h->opaque, dname, &statbuf); if ((!rc) && (currentErrorCode() == PHYSFS_ERR_NOT_FOUND)) exists = 0; /* verifyPath made sure that (dname) doesn't have symlinks if they aren't allowed, but it's possible the mounted writeDir itself has symlinks in it, (for example "/var" on iOS is a symlink, and the prefpath will be somewhere under that)...if we mounted that writeDir, we must allow those symlinks here unconditionally. */ retval = ( (rc) && ((statbuf.filetype == PHYSFS_FILETYPE_DIRECTORY) || (statbuf.filetype == PHYSFS_FILETYPE_SYMLINK)) ); } /* if */ if (!exists) retval = h->funcs->mkdir(h->opaque, dname); if (!retval) break; if (end == NULL) break; *end = '/'; start = end + 1; } /* while */ return retval; } /* doMkdir */ int PHYSFS_mkdir(const char *_dname) { int retval = 0; char *dname; size_t len; DirHandle *h = NULL; BAIL_IF(!_dname, PHYSFS_ERR_INVALID_ARGUMENT, 0); __PHYSFS_platformGrabMutex(stateLock); h = findWriteHandle(_dname); BAIL_IF_MUTEX(!h, PHYSFS_ERR_NO_WRITE_DIR, stateLock, 0); len = strlen(_dname) + dirHandleRootLen(h) + 1; dname = (char *) __PHYSFS_smallAlloc(len); BAIL_IF_MUTEX(!dname, PHYSFS_ERR_OUT_OF_MEMORY, stateLock, 0); retval = doMkdir(_dname, dname, h); __PHYSFS_platformReleaseMutex(stateLock); __PHYSFS_smallFree(dname); return retval; } /* PHYSFS_mkdir */ /* This must hold the stateLock before calling. */ static int doDelete(const char *_fname, char *fname, DirHandle *h) { BAIL_IF_ERRPASS(!sanitizePlatformIndependentPathWithRoot(h, _fname, fname), 0); BAIL_IF_ERRPASS(!verifyPath(h, &fname, 0), 0); return h->funcs->remove(h->opaque, fname); } /* doDelete */ int PHYSFS_delete(const char *_fname) { int retval; char *fname; size_t len; DirHandle *h = NULL; __PHYSFS_platformGrabMutex(stateLock); h = findWriteHandle(_fname); BAIL_IF_MUTEX(!h, PHYSFS_ERR_NO_WRITE_DIR, stateLock, 0); len = strlen(_fname) + dirHandleRootLen(h) + 1; fname = (char *) __PHYSFS_smallAlloc(len); BAIL_IF_MUTEX(!fname, PHYSFS_ERR_OUT_OF_MEMORY, stateLock, 0); retval = doDelete(_fname, fname, h); __PHYSFS_platformReleaseMutex(stateLock); __PHYSFS_smallFree(fname); return retval; } /* PHYSFS_delete */ static DirHandle *getRealDirHandle(const char *_fname) { DirHandle *retval = NULL; char *allocated_fname = NULL; char *fname = NULL; size_t len; BAIL_IF(!_fname, PHYSFS_ERR_INVALID_ARGUMENT, NULL); __PHYSFS_platformGrabMutex(stateLock); len = strlen(_fname) + longest_root + 2; allocated_fname = __PHYSFS_smallAlloc(len); BAIL_IF_MUTEX(!allocated_fname, PHYSFS_ERR_OUT_OF_MEMORY, stateLock, NULL); fname = allocated_fname + longest_root + 1; if (sanitizePlatformIndependentPath(_fname, fname)) { DirHandle *i; for (i = searchPath; i != NULL; i = i->next) { char *arcfname = fname; if (partOfMountPoint(i, arcfname)) { retval = i; break; } /* if */ else if (verifyPath(i, &arcfname, 0)) { PHYSFS_Stat statbuf; if (i->funcs->stat(i->opaque, arcfname, &statbuf)) { retval = i; break; } /* if */ } /* if */ } /* for */ } /* if */ __PHYSFS_platformReleaseMutex(stateLock); __PHYSFS_smallFree(allocated_fname); return retval; } /* getRealDirHandle */ const char *PHYSFS_getRealDir(const char *fname) { DirHandle *dh = getRealDirHandle(fname); return dh ? dh->dirName : NULL; } /* PHYSFS_getRealDir */ static int locateInStringList(const char *str, char **list, PHYSFS_uint32 *pos) { PHYSFS_uint32 len = *pos; PHYSFS_uint32 half_len; PHYSFS_uint32 lo = 0; PHYSFS_uint32 middle; int cmp; while (len > 0) { half_len = len >> 1; middle = lo + half_len; cmp = strcmp(list[middle], str); if (cmp == 0) /* it's in the list already. */ return 1; else if (cmp > 0) len = half_len; else { lo = middle + 1; len -= half_len + 1; } /* else */ } /* while */ *pos = lo; return 0; } /* locateInStringList */ static PHYSFS_EnumerateCallbackResult enumFilesCallback(void *data, const char *origdir, const char *str) { PHYSFS_uint32 pos; void *ptr; char *newstr; EnumStringListCallbackData *pecd = (EnumStringListCallbackData *) data; /* * See if file is in the list already, and if not, insert it in there * alphabetically... */ pos = pecd->size; if (locateInStringList(str, pecd->list, &pos)) return PHYSFS_ENUM_OK; /* already in the list, but keep going. */ ptr = allocator.Realloc(pecd->list, (pecd->size + 2) * sizeof (char *)); newstr = (char *) allocator.Malloc(strlen(str) + 1); if (ptr != NULL) pecd->list = (char **) ptr; if ((ptr == NULL) || (newstr == NULL)) { if (newstr) allocator.Free(newstr); pecd->errcode = PHYSFS_ERR_OUT_OF_MEMORY; return PHYSFS_ENUM_ERROR; /* better luck next time. */ } /* if */ strcpy(newstr, str); if (pos != pecd->size) { memmove(&pecd->list[pos+1], &pecd->list[pos], sizeof (char *) * ((pecd->size) - pos)); } /* if */ pecd->list[pos] = newstr; pecd->size++; return PHYSFS_ENUM_OK; } /* enumFilesCallback */ char **PHYSFS_enumerateFiles(const char *path) { EnumStringListCallbackData ecd; memset(&ecd, '\0', sizeof (ecd)); ecd.list = (char **) allocator.Malloc(sizeof (char *)); BAIL_IF(!ecd.list, PHYSFS_ERR_OUT_OF_MEMORY, NULL); if (!PHYSFS_enumerate(path, enumFilesCallback, &ecd)) { const PHYSFS_ErrorCode errcode = currentErrorCode(); PHYSFS_uint32 i; for (i = 0; i < ecd.size; i++) allocator.Free(ecd.list[i]); allocator.Free(ecd.list); BAIL_IF(errcode == PHYSFS_ERR_APP_CALLBACK, ecd.errcode, NULL); return NULL; } /* if */ ecd.list[ecd.size] = NULL; return ecd.list; } /* PHYSFS_enumerateFiles */ /* * Broke out to seperate function so we can use stack allocation gratuitously. */ static PHYSFS_EnumerateCallbackResult enumerateFromMountPoint(DirHandle *i, const char *arcfname, PHYSFS_EnumerateCallback callback, const char *_fname, void *data) { PHYSFS_EnumerateCallbackResult retval; const size_t len = strlen(arcfname); char *ptr = NULL; char *end = NULL; const size_t slen = strlen(i->mountPoint) + 1; char *mountPoint = (char *) __PHYSFS_smallAlloc(slen); BAIL_IF(!mountPoint, PHYSFS_ERR_OUT_OF_MEMORY, PHYSFS_ENUM_ERROR); strcpy(mountPoint, i->mountPoint); ptr = mountPoint + ((len) ? len + 1 : 0); end = strchr(ptr, '/'); assert(end); /* should always find a terminating '/'. */ *end = '\0'; retval = callback(data, _fname, ptr); __PHYSFS_smallFree(mountPoint); BAIL_IF(retval == PHYSFS_ENUM_ERROR, PHYSFS_ERR_APP_CALLBACK, retval); return retval; } /* enumerateFromMountPoint */ typedef struct SymlinkFilterData { PHYSFS_EnumerateCallback callback; void *callbackData; DirHandle *dirhandle; const char *arcfname; PHYSFS_ErrorCode errcode; } SymlinkFilterData; static PHYSFS_EnumerateCallbackResult enumCallbackFilterSymLinks(void *_data, const char *origdir, const char *fname) { SymlinkFilterData *data = (SymlinkFilterData *) _data; const DirHandle *dh = data->dirhandle; const char *arcfname = data->arcfname; PHYSFS_Stat statbuf; const char *trimmedDir = (*arcfname == '/') ? (arcfname + 1) : arcfname; const size_t slen = strlen(trimmedDir) + strlen(fname) + 2; char *path = (char *) __PHYSFS_smallAlloc(slen); PHYSFS_EnumerateCallbackResult retval = PHYSFS_ENUM_OK; if (path == NULL) { data->errcode = PHYSFS_ERR_OUT_OF_MEMORY; return PHYSFS_ENUM_ERROR; } /* if */ snprintf(path, slen, "%s%s%s", trimmedDir, *trimmedDir ? "/" : "", fname); if (!dh->funcs->stat(dh->opaque, path, &statbuf)) { data->errcode = currentErrorCode(); retval = PHYSFS_ENUM_ERROR; } /* if */ else { /* Pass it on to the application if it's not a symlink. */ if (statbuf.filetype != PHYSFS_FILETYPE_SYMLINK) { retval = data->callback(data->callbackData, origdir, fname); if (retval == PHYSFS_ENUM_ERROR) data->errcode = PHYSFS_ERR_APP_CALLBACK; } /* if */ } /* else */ __PHYSFS_smallFree(path); return retval; } /* enumCallbackFilterSymLinks */ int PHYSFS_enumerate(const char *_fn, PHYSFS_EnumerateCallback cb, void *data) { PHYSFS_EnumerateCallbackResult retval = PHYSFS_ENUM_OK; size_t len; char *allocated_fname; char *fname; BAIL_IF(!_fn, PHYSFS_ERR_INVALID_ARGUMENT, 0); BAIL_IF(!cb, PHYSFS_ERR_INVALID_ARGUMENT, 0); __PHYSFS_platformGrabMutex(stateLock); len = strlen(_fn) + longest_root + 2; allocated_fname = (char *) __PHYSFS_smallAlloc(len); BAIL_IF_MUTEX(!allocated_fname, PHYSFS_ERR_OUT_OF_MEMORY, stateLock, 0); fname = allocated_fname + longest_root + 1; if (!sanitizePlatformIndependentPath(_fn, fname)) retval = PHYSFS_ENUM_STOP; else { DirHandle *i; SymlinkFilterData filterdata; if (!allowSymLinks) { memset(&filterdata, '\0', sizeof (filterdata)); filterdata.callback = cb; filterdata.callbackData = data; } /* if */ for (i = searchPath; (retval == PHYSFS_ENUM_OK) && i; i = i->next) { char *arcfname = fname; if (partOfMountPoint(i, arcfname)) retval = enumerateFromMountPoint(i, arcfname, cb, _fn, data); else if (verifyPath(i, &arcfname, 0)) { PHYSFS_Stat statbuf; if (!i->funcs->stat(i->opaque, arcfname, &statbuf)) { if (currentErrorCode() == PHYSFS_ERR_NOT_FOUND) continue; /* no such dir in this archive, skip it. */ } /* if */ if (statbuf.filetype != PHYSFS_FILETYPE_DIRECTORY) continue; /* not a directory in this archive, skip it. */ else if ((!allowSymLinks) && (i->funcs->info.supportsSymlinks)) { filterdata.dirhandle = i; filterdata.arcfname = arcfname; filterdata.errcode = PHYSFS_ERR_OK; retval = i->funcs->enumerate(i->opaque, arcfname, enumCallbackFilterSymLinks, _fn, &filterdata); if (retval == PHYSFS_ENUM_ERROR) { if (currentErrorCode() == PHYSFS_ERR_APP_CALLBACK) PHYSFS_setErrorCode(filterdata.errcode); } /* if */ } /* else if */ else { retval = i->funcs->enumerate(i->opaque, arcfname, cb, _fn, data); } /* else */ } /* else if */ } /* for */ } /* if */ __PHYSFS_platformReleaseMutex(stateLock); __PHYSFS_smallFree(allocated_fname); return (retval == PHYSFS_ENUM_ERROR) ? 0 : 1; } /* PHYSFS_enumerate */ typedef struct { PHYSFS_EnumFilesCallback callback; void *data; } LegacyEnumFilesCallbackData; static PHYSFS_EnumerateCallbackResult enumFilesCallbackAlwaysSucceed(void *d, const char *origdir, const char *fname) { LegacyEnumFilesCallbackData *cbdata = (LegacyEnumFilesCallbackData *) d; cbdata->callback(cbdata->data, origdir, fname); return PHYSFS_ENUM_OK; } /* enumFilesCallbackAlwaysSucceed */ void PHYSFS_enumerateFilesCallback(const char *fname, PHYSFS_EnumFilesCallback callback, void *data) { LegacyEnumFilesCallbackData cbdata; cbdata.callback = callback; cbdata.data = data; (void) PHYSFS_enumerate(fname, enumFilesCallbackAlwaysSucceed, &cbdata); } /* PHYSFS_enumerateFilesCallback */ int PHYSFS_exists(const char *fname) { return (getRealDirHandle(fname) != NULL); } /* PHYSFS_exists */ PHYSFS_sint64 PHYSFS_getLastModTime(const char *fname) { PHYSFS_Stat statbuf; BAIL_IF_ERRPASS(!PHYSFS_stat(fname, &statbuf), -1); return statbuf.modtime; } /* PHYSFS_getLastModTime */ int PHYSFS_isDirectory(const char *fname) { PHYSFS_Stat statbuf; BAIL_IF_ERRPASS(!PHYSFS_stat(fname, &statbuf), 0); return (statbuf.filetype == PHYSFS_FILETYPE_DIRECTORY); } /* PHYSFS_isDirectory */ int PHYSFS_isSymbolicLink(const char *fname) { PHYSFS_Stat statbuf; BAIL_IF_ERRPASS(!PHYSFS_stat(fname, &statbuf), 0); return (statbuf.filetype == PHYSFS_FILETYPE_SYMLINK); } /* PHYSFS_isSymbolicLink */ static PHYSFS_File *doOpenWrite(const char *_fname, const int appending) { FileHandle *fh = NULL; DirHandle *h; size_t len; char *fname; BAIL_IF(!_fname, PHYSFS_ERR_INVALID_ARGUMENT, 0); __PHYSFS_platformGrabMutex(stateLock); h = findWriteHandle(_fname); BAIL_IF_MUTEX(!h, PHYSFS_ERR_NO_WRITE_DIR, stateLock, 0); len = strlen(_fname) + dirHandleRootLen(h) + 1; fname = (char *) __PHYSFS_smallAlloc(len); BAIL_IF_MUTEX(!fname, PHYSFS_ERR_OUT_OF_MEMORY, stateLock, 0); if (sanitizePlatformIndependentPathWithRoot(h, _fname, fname)) { PHYSFS_Io *io = NULL; char *arcfname = fname; if (verifyPath(h, &arcfname, 0)) { const PHYSFS_Archiver *f = h->funcs; if (appending) io = f->openAppend(h->opaque, arcfname); else io = f->openWrite(h->opaque, arcfname); if (io) { fh = (FileHandle *) allocator.Malloc(sizeof (FileHandle)); if (fh == NULL) { io->destroy(io); PHYSFS_setErrorCode(PHYSFS_ERR_OUT_OF_MEMORY); } /* if */ else { memset(fh, '\0', sizeof (FileHandle)); fh->io = io; fh->dirHandle = h; fh->next = openWriteList; openWriteList = fh; } /* else */ } /* if */ } /* if */ } /* if */ __PHYSFS_platformReleaseMutex(stateLock); __PHYSFS_smallFree(fname); return ((PHYSFS_File *) fh); } /* doOpenWrite */ PHYSFS_File *PHYSFS_openWrite(const char *filename) { return doOpenWrite(filename, 0); } /* PHYSFS_openWrite */ PHYSFS_File *PHYSFS_openAppend(const char *filename) { return doOpenWrite(filename, 1); } /* PHYSFS_openAppend */ PHYSFS_File *PHYSFS_openRead(const char *_fname) { FileHandle *fh = NULL; char *allocated_fname; char *fname; size_t len; BAIL_IF(!_fname, PHYSFS_ERR_INVALID_ARGUMENT, 0); __PHYSFS_platformGrabMutex(stateLock); BAIL_IF_MUTEX(!searchPath, PHYSFS_ERR_NOT_FOUND, stateLock, 0); len = strlen(_fname) + longest_root + 2; allocated_fname = (char *) __PHYSFS_smallAlloc(len); BAIL_IF_MUTEX(!allocated_fname, PHYSFS_ERR_OUT_OF_MEMORY, stateLock, 0); fname = allocated_fname + longest_root + 1; if (sanitizePlatformIndependentPath(_fname, fname)) { PHYSFS_Io *io = NULL; DirHandle *i; for (i = searchPath; i != NULL; i = i->next) { char *arcfname = fname; if (verifyPath(i, &arcfname, 0)) { io = i->funcs->openRead(i->opaque, arcfname); if (io) break; } /* if */ } /* for */ if (io) { fh = (FileHandle *) allocator.Malloc(sizeof (FileHandle)); if (fh == NULL) { io->destroy(io); PHYSFS_setErrorCode(PHYSFS_ERR_OUT_OF_MEMORY); } /* if */ else { memset(fh, '\0', sizeof (FileHandle)); fh->io = io; fh->forReading = 1; fh->dirHandle = i; fh->next = openReadList; openReadList = fh; } /* else */ } /* if */ } /* if */ __PHYSFS_platformReleaseMutex(stateLock); __PHYSFS_smallFree(allocated_fname); return ((PHYSFS_File *) fh); } /* PHYSFS_openRead */ static int closeHandleInOpenList(FileHandle **list, FileHandle *handle) { FileHandle *prev = NULL; FileHandle *i; for (i = *list; i != NULL; i = i->next) { if (i == handle) /* handle is in this list? */ { PHYSFS_Io *io = handle->io; PHYSFS_uint8 *tmp = handle->buffer; /* send our buffer to io... */ if (!handle->forReading) { if (!PHYSFS_flush((PHYSFS_File *) handle)) return -1; /* ...then have io send it to the disk... */ else if (io->flush && !io->flush(io)) return -1; } /* if */ /* ...then close the underlying file. */ io->destroy(io); if (tmp != NULL) /* free any associated buffer. */ allocator.Free(tmp); if (prev == NULL) *list = handle->next; else prev->next = handle->next; allocator.Free(handle); return 1; } /* if */ prev = i; } /* for */ return 0; } /* closeHandleInOpenList */ int PHYSFS_close(PHYSFS_File *_handle) { FileHandle *handle = (FileHandle *) _handle; int rc; __PHYSFS_platformGrabMutex(stateLock); /* -1 == close failure. 0 == not found. 1 == success. */ rc = closeHandleInOpenList(&openReadList, handle); BAIL_IF_MUTEX_ERRPASS(rc == -1, stateLock, 0); if (!rc) { rc = closeHandleInOpenList(&openWriteList, handle); BAIL_IF_MUTEX_ERRPASS(rc == -1, stateLock, 0); } /* if */ __PHYSFS_platformReleaseMutex(stateLock); BAIL_IF(!rc, PHYSFS_ERR_INVALID_ARGUMENT, 0); return 1; } /* PHYSFS_close */ static PHYSFS_sint64 doBufferedRead(FileHandle *fh, void *_buffer, size_t len) { PHYSFS_uint8 *buffer = (PHYSFS_uint8 *) _buffer; PHYSFS_sint64 retval = 0; while (len > 0) { const size_t avail = fh->buffill - fh->bufpos; if (avail > 0) /* data available in the buffer. */ { const size_t cpy = (len < avail) ? len : avail; memcpy(buffer, fh->buffer + fh->bufpos, cpy); assert(len >= cpy); buffer += cpy; len -= cpy; fh->bufpos += cpy; retval += cpy; } /* if */ else /* buffer is empty, refill it. */ { PHYSFS_Io *io = fh->io; const PHYSFS_sint64 rc = io->read(io, fh->buffer, fh->bufsize); fh->bufpos = 0; if (rc > 0) fh->buffill = (size_t) rc; else { fh->buffill = 0; if (retval == 0) /* report already-read data, or failure. */ retval = rc; break; } /* else */ } /* else */ } /* while */ return retval; } /* doBufferedRead */ PHYSFS_sint64 PHYSFS_read(PHYSFS_File *handle, void *buffer, PHYSFS_uint32 size, PHYSFS_uint32 count) { const PHYSFS_uint64 len = ((PHYSFS_uint64) size) * ((PHYSFS_uint64) count); const PHYSFS_sint64 retval = PHYSFS_readBytes(handle, buffer, len); return ( (retval <= 0) ? retval : (retval / ((PHYSFS_sint64) size)) ); } /* PHYSFS_read */ PHYSFS_sint64 PHYSFS_readBytes(PHYSFS_File *handle, void *buffer, PHYSFS_uint64 _len) { const size_t len = (size_t) _len; FileHandle *fh = (FileHandle *) handle; #ifdef PHYSFS_NO_64BIT_SUPPORT const PHYSFS_uint64 maxlen = __PHYSFS_UI64(0x7FFFFFFF); #else const PHYSFS_uint64 maxlen = __PHYSFS_UI64(0x7FFFFFFFFFFFFFFF); #endif if (!__PHYSFS_ui64FitsAddressSpace(_len)) BAIL(PHYSFS_ERR_INVALID_ARGUMENT, -1); BAIL_IF(_len > maxlen, PHYSFS_ERR_INVALID_ARGUMENT, -1); BAIL_IF(!fh->forReading, PHYSFS_ERR_OPEN_FOR_WRITING, -1); BAIL_IF_ERRPASS(len == 0, 0); if (fh->buffer) return doBufferedRead(fh, buffer, len); return fh->io->read(fh->io, buffer, len); } /* PHYSFS_readBytes */ static PHYSFS_sint64 doBufferedWrite(PHYSFS_File *handle, const void *buffer, const size_t len) { FileHandle *fh = (FileHandle *) handle; /* whole thing fits in the buffer? */ if ((fh->buffill + len) < fh->bufsize) { memcpy(fh->buffer + fh->buffill, buffer, len); fh->buffill += len; return (PHYSFS_sint64) len; } /* if */ /* would overflow buffer. Flush and then write the new objects, too. */ BAIL_IF_ERRPASS(!PHYSFS_flush(handle), -1); return fh->io->write(fh->io, buffer, len); } /* doBufferedWrite */ PHYSFS_sint64 PHYSFS_write(PHYSFS_File *handle, const void *buffer, PHYSFS_uint32 size, PHYSFS_uint32 count) { const PHYSFS_uint64 len = ((PHYSFS_uint64) size) * ((PHYSFS_uint64) count); const PHYSFS_sint64 retval = PHYSFS_writeBytes(handle, buffer, len); return ( (retval <= 0) ? retval : (retval / ((PHYSFS_sint64) size)) ); } /* PHYSFS_write */ PHYSFS_sint64 PHYSFS_writeBytes(PHYSFS_File *handle, const void *buffer, PHYSFS_uint64 _len) { const size_t len = (size_t) _len; FileHandle *fh = (FileHandle *) handle; #ifdef PHYSFS_NO_64BIT_SUPPORT const PHYSFS_uint64 maxlen = __PHYSFS_UI64(0x7FFFFFFF); #else const PHYSFS_uint64 maxlen = __PHYSFS_UI64(0x7FFFFFFFFFFFFFFF); #endif if (!__PHYSFS_ui64FitsAddressSpace(_len)) BAIL(PHYSFS_ERR_INVALID_ARGUMENT, -1); BAIL_IF(_len > maxlen, PHYSFS_ERR_INVALID_ARGUMENT, -1); BAIL_IF(fh->forReading, PHYSFS_ERR_OPEN_FOR_READING, -1); BAIL_IF_ERRPASS(len == 0, 0); if (fh->buffer) return doBufferedWrite(handle, buffer, len); return fh->io->write(fh->io, buffer, len); } /* PHYSFS_write */ int PHYSFS_eof(PHYSFS_File *handle) { FileHandle *fh = (FileHandle *) handle; if (!fh->forReading) /* never EOF on files opened for write/append. */ return 0; /* can't be eof if buffer isn't empty */ if (fh->bufpos == fh->buffill) { /* check the Io. */ PHYSFS_Io *io = fh->io; const PHYSFS_sint64 pos = io->tell(io); const PHYSFS_sint64 len = io->length(io); if ((pos < 0) || (len < 0)) return 0; /* beats me. */ return (pos >= len); } /* if */ return 0; } /* PHYSFS_eof */ PHYSFS_sint64 PHYSFS_tell(PHYSFS_File *handle) { FileHandle *fh = (FileHandle *) handle; const PHYSFS_sint64 pos = fh->io->tell(fh->io); const PHYSFS_sint64 retval = fh->forReading ? (pos - fh->buffill) + fh->bufpos : (pos + fh->buffill); return retval; } /* PHYSFS_tell */ int PHYSFS_seek(PHYSFS_File *handle, PHYSFS_uint64 pos) { FileHandle *fh = (FileHandle *) handle; BAIL_IF_ERRPASS(!PHYSFS_flush(handle), 0); if (fh->buffer && fh->forReading) { /* avoid throwing away our precious buffer if seeking within it. */ PHYSFS_sint64 offset = pos - PHYSFS_tell(handle); if ( /* seeking within the already-buffered range? */ /* forward? */ ((offset >= 0) && (((size_t)offset) <= fh->buffill-fh->bufpos)) || /* backward? */ ((offset < 0) && (((size_t) -offset) <= fh->bufpos)) ) { fh->bufpos = (size_t) (((PHYSFS_sint64) fh->bufpos) + offset); return 1; /* successful seek */ } /* if */ } /* if */ /* we have to fall back to a 'raw' seek. */ fh->buffill = fh->bufpos = 0; return fh->io->seek(fh->io, pos); } /* PHYSFS_seek */ PHYSFS_sint64 PHYSFS_fileLength(PHYSFS_File *handle) { PHYSFS_Io *io = ((FileHandle *) handle)->io; return io->length(io); } /* PHYSFS_filelength */ int PHYSFS_setBuffer(PHYSFS_File *handle, PHYSFS_uint64 _bufsize) { FileHandle *fh = (FileHandle *) handle; const size_t bufsize = (size_t) _bufsize; if (!__PHYSFS_ui64FitsAddressSpace(_bufsize)) BAIL(PHYSFS_ERR_INVALID_ARGUMENT, 0); BAIL_IF_ERRPASS(!PHYSFS_flush(handle), 0); /* * For reads, we need to move the file pointer to where it would be * if we weren't buffering, so that the next read will get the * right chunk of stuff from the file. PHYSFS_flush() handles writes. */ if ((fh->forReading) && (fh->buffill != fh->bufpos)) { PHYSFS_uint64 pos; const PHYSFS_sint64 curpos = fh->io->tell(fh->io); BAIL_IF_ERRPASS(curpos == -1, 0); pos = ((curpos - fh->buffill) + fh->bufpos); BAIL_IF_ERRPASS(!fh->io->seek(fh->io, pos), 0); } /* if */ if (bufsize == 0) /* delete existing buffer. */ { if (fh->buffer) { allocator.Free(fh->buffer); fh->buffer = NULL; } /* if */ } /* if */ else { PHYSFS_uint8 *newbuf; newbuf = (PHYSFS_uint8 *) allocator.Realloc(fh->buffer, bufsize); BAIL_IF(!newbuf, PHYSFS_ERR_OUT_OF_MEMORY, 0); fh->buffer = newbuf; } /* else */ fh->bufsize = bufsize; fh->buffill = fh->bufpos = 0; return 1; } /* PHYSFS_setBuffer */ int PHYSFS_flush(PHYSFS_File *handle) { FileHandle *fh = (FileHandle *) handle; PHYSFS_Io *io; PHYSFS_sint64 rc; if ((fh->forReading) || (fh->bufpos == fh->buffill)) return 1; /* open for read or buffer empty are successful no-ops. */ /* dump buffer to disk. */ io = fh->io; rc = io->write(io, fh->buffer + fh->bufpos, fh->buffill - fh->bufpos); BAIL_IF_ERRPASS(rc <= 0, 0); fh->bufpos = fh->buffill = 0; return 1; } /* PHYSFS_flush */ int PHYSFS_stat(const char *_fname, PHYSFS_Stat *stat) { int retval = 0; char *allocated_fname; char *fname; size_t len; BAIL_IF(!_fname, PHYSFS_ERR_INVALID_ARGUMENT, 0); BAIL_IF(!stat, PHYSFS_ERR_INVALID_ARGUMENT, 0); /* set some sane defaults... */ stat->filesize = -1; stat->modtime = -1; stat->createtime = -1; stat->accesstime = -1; stat->filetype = PHYSFS_FILETYPE_OTHER; stat->readonly = 1; __PHYSFS_platformGrabMutex(stateLock); len = strlen(_fname) + longest_root + 2; allocated_fname = (char *) __PHYSFS_smallAlloc(len); BAIL_IF_MUTEX(!allocated_fname, PHYSFS_ERR_OUT_OF_MEMORY, stateLock, 0); fname = allocated_fname + longest_root + 1; if (sanitizePlatformIndependentPath(_fname, fname)) { if (*fname == '\0') { stat->filetype = PHYSFS_FILETYPE_DIRECTORY; stat->readonly = !writeDir; /* Writeable if we have a writeDir */ retval = 1; } /* if */ else { DirHandle *i; int exists = 0; for (i = searchPath; ((i != NULL) && (!exists)); i = i->next) { char *arcfname = fname; exists = partOfMountPoint(i, arcfname); if (exists) { stat->filetype = PHYSFS_FILETYPE_DIRECTORY; stat->readonly = !i->forWriting; retval = 1; } /* if */ else if (verifyPath(i, &arcfname, 0)) { retval = i->funcs->stat(i->opaque, arcfname, stat); if ((retval) || (currentErrorCode() != PHYSFS_ERR_NOT_FOUND)) exists = 1; } /* else if */ } /* for */ } /* else */ } /* if */ __PHYSFS_platformReleaseMutex(stateLock); __PHYSFS_smallFree(allocated_fname); return retval; } /* PHYSFS_stat */ int __PHYSFS_readAll(PHYSFS_Io *io, void *buf, const size_t _len) { const PHYSFS_uint64 len = (PHYSFS_uint64) _len; return (io->read(io, buf, len) == len); } /* __PHYSFS_readAll */ void *__PHYSFS_initSmallAlloc(void *ptr, const size_t len) { void *useHeap = ((ptr == NULL) ? ((void *) 1) : ((void *) 0)); if (useHeap) /* too large for stack allocation or alloca() failed. */ ptr = allocator.Malloc(len+sizeof (void *)); if (ptr != NULL) { void **retval = (void **) ptr; /*printf("%s alloc'd (%lld) bytes at (%p).\n", useHeap ? "heap" : "stack", (long long) len, ptr);*/ *retval = useHeap; return retval + 1; } /* if */ return NULL; /* allocation failed. */ } /* __PHYSFS_initSmallAlloc */ void __PHYSFS_smallFree(void *ptr) { if (ptr != NULL) { void **block = ((void **) ptr) - 1; const int useHeap = (*block != NULL); if (useHeap) allocator.Free(block); /*printf("%s free'd (%p).\n", useHeap ? "heap" : "stack", block);*/ } /* if */ } /* __PHYSFS_smallFree */ int PHYSFS_setAllocator(const PHYSFS_Allocator *a) { BAIL_IF(initialized, PHYSFS_ERR_IS_INITIALIZED, 0); externalAllocator = (a != NULL); if (externalAllocator) memcpy(&allocator, a, sizeof (PHYSFS_Allocator)); return 1; } /* PHYSFS_setAllocator */ const PHYSFS_Allocator *PHYSFS_getAllocator(void) { BAIL_IF(!initialized, PHYSFS_ERR_NOT_INITIALIZED, NULL); return &allocator; } /* PHYSFS_getAllocator */ static void *mallocAllocatorMalloc(PHYSFS_uint64 s) { if (!__PHYSFS_ui64FitsAddressSpace(s)) BAIL(PHYSFS_ERR_OUT_OF_MEMORY, NULL); #undef malloc return malloc((size_t) s); } /* mallocAllocatorMalloc */ static void *mallocAllocatorRealloc(void *ptr, PHYSFS_uint64 s) { if (!__PHYSFS_ui64FitsAddressSpace(s)) BAIL(PHYSFS_ERR_OUT_OF_MEMORY, NULL); #undef realloc return realloc(ptr, (size_t) s); } /* mallocAllocatorRealloc */ static void mallocAllocatorFree(void *ptr) { #undef free free(ptr); } /* mallocAllocatorFree */ static void setDefaultAllocator(void) { assert(!externalAllocator); allocator.Init = NULL; allocator.Deinit = NULL; allocator.Malloc = mallocAllocatorMalloc; allocator.Realloc = mallocAllocatorRealloc; allocator.Free = mallocAllocatorFree; } /* setDefaultAllocator */ int __PHYSFS_DirTreeInit(__PHYSFS_DirTree *dt, const size_t entrylen, const int case_sensitive, const int only_usascii) { static char rootpath[2] = { '/', '\0' }; size_t alloclen; assert(entrylen >= sizeof (__PHYSFS_DirTreeEntry)); memset(dt, '\0', sizeof (*dt)); dt->case_sensitive = case_sensitive; dt->only_usascii = only_usascii; dt->root = (__PHYSFS_DirTreeEntry *) allocator.Malloc(entrylen); BAIL_IF(!dt->root, PHYSFS_ERR_OUT_OF_MEMORY, 0); memset(dt->root, '\0', entrylen); dt->root->name = rootpath; dt->root->isdir = 1; dt->hashBuckets = 64; if (!dt->hashBuckets) dt->hashBuckets = 1; dt->entrylen = entrylen; alloclen = dt->hashBuckets * sizeof (__PHYSFS_DirTreeEntry *); dt->hash = (__PHYSFS_DirTreeEntry **) allocator.Malloc(alloclen); BAIL_IF(!dt->hash, PHYSFS_ERR_OUT_OF_MEMORY, 0); memset(dt->hash, '\0', alloclen); return 1; } /* __PHYSFS_DirTreeInit */ static PHYSFS_uint32 hashPathName(__PHYSFS_DirTree *dt, const char *name) { const PHYSFS_uint32 hashval = dt->case_sensitive ? __PHYSFS_hashString(name) : dt->only_usascii ? __PHYSFS_hashStringCaseFoldUSAscii(name) : __PHYSFS_hashStringCaseFold(name); return hashval % dt->hashBuckets; } /* hashPathName */ /* Fill in missing parent directories. */ static __PHYSFS_DirTreeEntry *addAncestors(__PHYSFS_DirTree *dt, char *name) { __PHYSFS_DirTreeEntry *retval = dt->root; char *sep = strrchr(name, '/'); if (sep) { *sep = '\0'; /* chop off last piece. */ retval = (__PHYSFS_DirTreeEntry *) __PHYSFS_DirTreeFind(dt, name); if (retval != NULL) { *sep = '/'; BAIL_IF(!retval->isdir, PHYSFS_ERR_CORRUPT, NULL); return retval; /* already hashed. */ } /* if */ /* okay, this is a new dir. Build and hash us. */ retval = (__PHYSFS_DirTreeEntry*)__PHYSFS_DirTreeAdd(dt, name, 1); *sep = '/'; } /* if */ return retval; } /* addAncestors */ void *__PHYSFS_DirTreeAdd(__PHYSFS_DirTree *dt, char *name, const int isdir) { __PHYSFS_DirTreeEntry *retval = __PHYSFS_DirTreeFind(dt, name); if (!retval) { const size_t alloclen = strlen(name) + 1 + dt->entrylen; PHYSFS_uint32 hashval; __PHYSFS_DirTreeEntry *parent = addAncestors(dt, name); BAIL_IF_ERRPASS(!parent, NULL); assert(dt->entrylen >= sizeof (__PHYSFS_DirTreeEntry)); retval = (__PHYSFS_DirTreeEntry *) allocator.Malloc(alloclen); BAIL_IF(!retval, PHYSFS_ERR_OUT_OF_MEMORY, NULL); memset(retval, '\0', dt->entrylen); retval->name = ((char *) retval) + dt->entrylen; strcpy(retval->name, name); hashval = hashPathName(dt, name); retval->hashnext = dt->hash[hashval]; dt->hash[hashval] = retval; retval->sibling = parent->children; retval->isdir = isdir; parent->children = retval; } /* if */ return retval; } /* __PHYSFS_DirTreeAdd */ /* Find the __PHYSFS_DirTreeEntry for a path in platform-independent notation. */ void *__PHYSFS_DirTreeFind(__PHYSFS_DirTree *dt, const char *path) { const int cs = dt->case_sensitive; PHYSFS_uint32 hashval; __PHYSFS_DirTreeEntry *prev = NULL; __PHYSFS_DirTreeEntry *retval; if (*path == '\0') return dt->root; hashval = hashPathName(dt, path); for (retval = dt->hash[hashval]; retval; retval = retval->hashnext) { const int cmp = cs ? strcmp(retval->name, path) : PHYSFS_utf8stricmp(retval->name, path); if (cmp == 0) { if (prev != NULL) /* move this to the front of the list */ { prev->hashnext = retval->hashnext; retval->hashnext = dt->hash[hashval]; dt->hash[hashval] = retval; } /* if */ return retval; } /* if */ prev = retval; } /* for */ BAIL(PHYSFS_ERR_NOT_FOUND, NULL); } /* __PHYSFS_DirTreeFind */ PHYSFS_EnumerateCallbackResult __PHYSFS_DirTreeEnumerate(void *opaque, const char *dname, PHYSFS_EnumerateCallback cb, const char *origdir, void *callbackdata) { PHYSFS_EnumerateCallbackResult retval = PHYSFS_ENUM_OK; __PHYSFS_DirTree *tree = (__PHYSFS_DirTree *) opaque; const __PHYSFS_DirTreeEntry *entry = __PHYSFS_DirTreeFind(tree, dname); BAIL_IF(!entry, PHYSFS_ERR_NOT_FOUND, PHYSFS_ENUM_ERROR); entry = entry->children; while (entry && (retval == PHYSFS_ENUM_OK)) { const char *name = entry->name; const char *ptr = strrchr(name, '/'); retval = cb(callbackdata, origdir, ptr ? ptr + 1 : name); BAIL_IF(retval == PHYSFS_ENUM_ERROR, PHYSFS_ERR_APP_CALLBACK, retval); entry = entry->sibling; } /* while */ return retval; } /* __PHYSFS_DirTreeEnumerate */ void __PHYSFS_DirTreeDeinit(__PHYSFS_DirTree *dt) { if (!dt) return; if (dt->root) { assert(dt->root->sibling == NULL); assert(dt->hash || (dt->root->children == NULL)); allocator.Free(dt->root); } /* if */ if (dt->hash) { size_t i; for (i = 0; i < dt->hashBuckets; i++) { __PHYSFS_DirTreeEntry *entry; __PHYSFS_DirTreeEntry *next; for (entry = dt->hash[i]; entry; entry = next) { next = entry->hashnext; allocator.Free(entry); } /* for */ } /* for */ allocator.Free(dt->hash); } /* if */ } /* __PHYSFS_DirTreeDeinit */ /* end of physfs.c ... */ ================================================ FILE: src/libraries/physfs/physfs.h ================================================ /** * \file physfs.h * * Main header file for PhysicsFS. */ /** * \mainpage PhysicsFS * * The latest version of PhysicsFS can be found at: * https://icculus.org/physfs/ * * PhysicsFS; a portable, flexible file i/o abstraction. * * This API gives you access to a system file system in ways superior to the * stdio or system i/o calls. The brief benefits: * * - It's portable. * - It's safe. No file access is permitted outside the specified dirs. * - It's flexible. Archives (.ZIP files) can be used transparently as * directory structures. * * With PhysicsFS, you have a single writing directory and multiple * directories (the "search path") for reading. You can think of this as a * filesystem within a filesystem. If (on Windows) you were to set the * writing directory to "C:\MyGame\MyWritingDirectory", then no PHYSFS calls * could touch anything above this directory, including the "C:\MyGame" and * "C:\" directories. This prevents an application's internal scripting * language from piddling over c:\\config.sys, for example. If you'd rather * give PHYSFS full access to the system's REAL file system, set the writing * dir to "C:\", but that's generally A Bad Thing for several reasons. * * Drive letters are hidden in PhysicsFS once you set up your initial paths. * The search path creates a single, hierarchical directory structure. * Not only does this lend itself well to general abstraction with archives, * it also gives better support to operating systems like MacOS and Unix. * Generally speaking, you shouldn't ever hardcode a drive letter; not only * does this hurt portability to non-Microsoft OSes, but it limits your win32 * users to a single drive, too. Use the PhysicsFS abstraction functions and * allow user-defined configuration options, too. When opening a file, you * specify it like it was on a Unix filesystem: if you want to write to * "C:\MyGame\MyConfigFiles\game.cfg", then you might set the write dir to * "C:\MyGame" and then open "MyConfigFiles/game.cfg". This gives an * abstraction across all platforms. Specifying a file in this way is termed * "platform-independent notation" in this documentation. Specifying a * a filename in a form such as "C:\mydir\myfile" or * "MacOS hard drive:My Directory:My File" is termed "platform-dependent * notation". The only time you use platform-dependent notation is when * setting up your write directory and search path; after that, all file * access into those directories are done with platform-independent notation. * * All files opened for writing are opened in relation to the write directory, * which is the root of the writable filesystem. When opening a file for * reading, PhysicsFS goes through the search path. This is NOT the * same thing as the PATH environment variable. An application using * PhysicsFS specifies directories to be searched which may be actual * directories, or archive files that contain files and subdirectories of * their own. See the end of these docs for currently supported archive * formats. * * Once the search path is defined, you may open files for reading. If you've * got the following search path defined (to use a win32 example again): * * - C:\\mygame * - C:\\mygame\\myuserfiles * - D:\\mygamescdromdatafiles * - C:\\mygame\\installeddatafiles.zip * * Then a call to PHYSFS_openRead("textfiles/myfile.txt") (note the directory * separator, lack of drive letter, and lack of dir separator at the start of * the string; this is platform-independent notation) will check for * C:\\mygame\\textfiles\\myfile.txt, then * C:\\mygame\\myuserfiles\\textfiles\\myfile.txt, then * D:\\mygamescdromdatafiles\\textfiles\\myfile.txt, then, finally, for * textfiles\\myfile.txt inside of C:\\mygame\\installeddatafiles.zip. * Remember that most archive types and platform filesystems store their * filenames in a case-sensitive manner, so you should be careful to specify * it correctly. * * Files opened through PhysicsFS may NOT contain "." or ".." or ":" as dir * elements. Not only are these meaningless on MacOS Classic and/or Unix, * they are a security hole. Also, symbolic links (which can be found in * some archive types and directly in the filesystem on Unix platforms) are * NOT followed until you call PHYSFS_permitSymbolicLinks(). That's left to * your own discretion, as following a symlink can allow for access outside * the write dir and search paths. For portability, there is no mechanism for * creating new symlinks in PhysicsFS. * * The write dir is not included in the search path unless you specifically * add it. While you CAN change the write dir as many times as you like, * you should probably set it once and stick to it. Remember that your * program will not have permission to write in every directory on Unix and * NT systems. * * All files are opened in binary mode; there is no endline conversion for * textfiles. Other than that, PhysicsFS has some convenience functions for * platform-independence. There is a function to tell you the current * platform's dir separator ("\\" on windows, "/" on Unix, ":" on MacOS), * which is needed only to set up your search/write paths. There is a * function to tell you what CD-ROM drives contain accessible discs, and a * function to recommend a good search path, etc. * * A recommended order for the search path is the write dir, then the base dir, * then the cdrom dir, then any archives discovered. Quake 3 does something * like this, but moves the archives to the start of the search path. Build * Engine games, like Duke Nukem 3D and Blood, place the archives last, and * use the base dir for both searching and writing. There is a helper * function (PHYSFS_setSaneConfig()) that puts together a basic configuration * for you, based on a few parameters. Also see the comments on * PHYSFS_getBaseDir(), and PHYSFS_getPrefDir() for info on what those * are and how they can help you determine an optimal search path. * * PhysicsFS 2.0 adds the concept of "mounting" archives to arbitrary points * in the search path. If a zipfile contains "maps/level.map" and you mount * that archive at "mods/mymod", then you would have to open * "mods/mymod/maps/level.map" to access the file, even though "mods/mymod" * isn't actually specified in the .zip file. Unlike the Unix mentality of * mounting a filesystem, "mods/mymod" doesn't actually have to exist when * mounting the zipfile. It's a "virtual" directory. The mounting mechanism * allows the developer to seperate archives in the tree and avoid trampling * over files when added new archives, such as including mod support in a * game...keeping external content on a tight leash in this manner can be of * utmost importance to some applications. * * PhysicsFS is mostly thread safe. The errors returned by * PHYSFS_getLastErrorCode() are unique by thread, and library-state-setting * functions are mutex'd. For efficiency, individual file accesses are * not locked, so you can not safely read/write/seek/close/etc the same * file from two threads at the same time. Other race conditions are bugs * that should be reported/patched. * * While you CAN use stdio/syscall file access in a program that has PHYSFS_* * calls, doing so is not recommended, and you can not directly use system * filehandles with PhysicsFS and vice versa (but as of PhysicsFS 2.1, you * can wrap them in a PHYSFS_Io interface yourself if you wanted to). * * Note that archives need not be named as such: if you have a ZIP file and * rename it with a .PKG extension, the file will still be recognized as a * ZIP archive by PhysicsFS; the file's contents are used to determine its * type where possible. * * Currently supported archive types: * - .ZIP (pkZip/WinZip/Info-ZIP compatible) * - .7Z (7zip archives) * - .ISO (ISO9660 files, CD-ROM images) * - .GRP (Build Engine groupfile archives) * - .PAK (Quake I/II archive format) * - .HOG (Descent I/II/III HOG file archives) * - .MVL (Descent II movielib archives) * - .WAD (DOOM engine archives) * - .VDF (Gothic I/II engine archives) * - .SLB (Independence War archives) * * String policy for PhysicsFS 2.0 and later: * * PhysicsFS 1.0 could only deal with null-terminated ASCII strings. All high * ASCII chars resulted in undefined behaviour, and there was no Unicode * support at all. PhysicsFS 2.0 supports Unicode without breaking binary * compatibility with the 1.0 API by using UTF-8 encoding of all strings * passed in and out of the library. * * All strings passed through PhysicsFS are in null-terminated UTF-8 format. * This means that if all you care about is English (ASCII characters <= 127) * then you just use regular C strings. If you care about Unicode (and you * should!) then you need to figure out what your platform wants, needs, and * offers. If you are on Windows before Win2000 and build with Unicode * support, your TCHAR strings are two bytes per character (this is called * "UCS-2 encoding"). Any modern Windows uses UTF-16, which is two bytes * per character for most characters, but some characters are four. You * should convert them to UTF-8 before handing them to PhysicsFS with * PHYSFS_utf8FromUtf16(), which handles both UTF-16 and UCS-2. If you're * using Unix or Mac OS X, your wchar_t strings are four bytes per character * ("UCS-4 encoding", sometimes called "UTF-32"). Use PHYSFS_utf8FromUcs4(). * Mac OS X can give you UTF-8 directly from a CFString or NSString, and many * Unixes generally give you C strings in UTF-8 format everywhere. If you * have a single-byte high ASCII charset, like so-many European "codepages" * you may be out of luck. We'll convert from "Latin1" to UTF-8 only, and * never back to Latin1. If you're above ASCII 127, all bets are off: move * to Unicode or use your platform's facilities. Passing a C string with * high-ASCII data that isn't UTF-8 encoded will NOT do what you expect! * * Naturally, there's also PHYSFS_utf8ToUcs2(), PHYSFS_utf8ToUtf16(), and * PHYSFS_utf8ToUcs4() to get data back into a format you like. Behind the * scenes, PhysicsFS will use Unicode where possible: the UTF-8 strings on * Windows will be converted and used with the multibyte Windows APIs, for * example. * * PhysicsFS offers basic encoding conversion support, but not a whole string * library. Get your stuff into whatever format you can work with. * * Most platforms supported by PhysicsFS 2.1 and later fully support Unicode. * Some older platforms have been dropped (Windows 95, Mac OS 9). Some, like * OS/2, might be able to convert to a local codepage or will just fail to * open/create the file. Modern OSes (macOS, Linux, Windows, etc) should all * be fine. * * Many game-specific archivers are seriously unprepared for Unicode (the * Descent HOG/MVL and Build Engine GRP archivers, for example, only offer a * DOS 8.3 filename, for example). Nothing can be done for these, but they * tend to be legacy formats for existing content that was all ASCII (and * thus, valid UTF-8) anyhow. Other formats, like .ZIP, don't explicitly * offer Unicode support, but unofficially expect filenames to be UTF-8 * encoded, and thus Just Work. Most everything does the right thing without * bothering you, but it's good to be aware of these nuances in case they * don't. * * * Other stuff: * * Please see the file LICENSE.txt in the source's root directory for * licensing and redistribution rights. * * Please see the file CREDITS.txt in the source's "docs" directory for * a more or less complete list of who's responsible for this. * * \author Ryan C. Gordon. */ #ifndef _INCLUDE_PHYSFS_H_ #define _INCLUDE_PHYSFS_H_ #ifdef __cplusplus extern "C" { #endif #if defined(PHYSFS_DECL) /* do nothing. */ #elif defined(PHYSFS_STATIC) #define PHYSFS_DECL /**/ #elif defined(_WIN32) || defined(__OS2__) #define PHYSFS_DECL __declspec(dllexport) #elif defined(__SUNPRO_C) #define PHYSFS_DECL __global #elif ((__GNUC__ >= 3) && (!defined(__EMX__)) && (!defined(sun))) #define PHYSFS_DECL __attribute__((visibility("default"))) #else #define PHYSFS_DECL #endif #if defined(PHYSFS_DEPRECATED) /* do nothing. */ #elif (__GNUC__ >= 4) /* technically, this arrived in gcc 3.1, but oh well. */ #define PHYSFS_DEPRECATED __attribute__((deprecated)) #else #define PHYSFS_DEPRECATED #endif #if 0 /* !!! FIXME: look into this later. */ #if defined(PHYSFS_CALL) /* do nothing. */ #elif defined(__WIN32__) && !defined(__GNUC__) #define PHYSFS_CALL __cdecl #elif defined(__OS2__) || defined(OS2) /* should work across all compilers. */ #define PHYSFS_CALL _System #else #define PHYSFS_CALL #endif #endif /** * \typedef PHYSFS_uint8 * \brief An unsigned, 8-bit integer type. */ typedef unsigned char PHYSFS_uint8; /** * \typedef PHYSFS_sint8 * \brief A signed, 8-bit integer type. */ typedef signed char PHYSFS_sint8; /** * \typedef PHYSFS_uint16 * \brief An unsigned, 16-bit integer type. */ typedef unsigned short PHYSFS_uint16; /** * \typedef PHYSFS_sint16 * \brief A signed, 16-bit integer type. */ typedef signed short PHYSFS_sint16; /** * \typedef PHYSFS_uint32 * \brief An unsigned, 32-bit integer type. */ typedef unsigned int PHYSFS_uint32; /** * \typedef PHYSFS_sint32 * \brief A signed, 32-bit integer type. */ typedef signed int PHYSFS_sint32; /** * \typedef PHYSFS_uint64 * \brief An unsigned, 64-bit integer type. * \warning on platforms without any sort of 64-bit datatype, this is * equivalent to PHYSFS_uint32! */ /** * \typedef PHYSFS_sint64 * \brief A signed, 64-bit integer type. * \warning on platforms without any sort of 64-bit datatype, this is * equivalent to PHYSFS_sint32! */ #if (defined PHYSFS_NO_64BIT_SUPPORT) /* oh well. */ typedef PHYSFS_uint32 PHYSFS_uint64; typedef PHYSFS_sint32 PHYSFS_sint64; #elif (defined _MSC_VER) typedef signed __int64 PHYSFS_sint64; typedef unsigned __int64 PHYSFS_uint64; #else typedef unsigned long long PHYSFS_uint64; typedef signed long long PHYSFS_sint64; #endif #ifndef DOXYGEN_SHOULD_IGNORE_THIS /* Make sure the types really have the right sizes */ #define PHYSFS_COMPILE_TIME_ASSERT(name, x) \ typedef int PHYSFS_compile_time_assert_##name[(x) * 2 - 1] PHYSFS_COMPILE_TIME_ASSERT(uint8IsOneByte, sizeof(PHYSFS_uint8) == 1); PHYSFS_COMPILE_TIME_ASSERT(sint8IsOneByte, sizeof(PHYSFS_sint8) == 1); PHYSFS_COMPILE_TIME_ASSERT(uint16IsTwoBytes, sizeof(PHYSFS_uint16) == 2); PHYSFS_COMPILE_TIME_ASSERT(sint16IsTwoBytes, sizeof(PHYSFS_sint16) == 2); PHYSFS_COMPILE_TIME_ASSERT(uint32IsFourBytes, sizeof(PHYSFS_uint32) == 4); PHYSFS_COMPILE_TIME_ASSERT(sint32IsFourBytes, sizeof(PHYSFS_sint32) == 4); #ifndef PHYSFS_NO_64BIT_SUPPORT PHYSFS_COMPILE_TIME_ASSERT(uint64IsEightBytes, sizeof(PHYSFS_uint64) == 8); PHYSFS_COMPILE_TIME_ASSERT(sint64IsEightBytes, sizeof(PHYSFS_sint64) == 8); #endif #undef PHYSFS_COMPILE_TIME_ASSERT #endif /* DOXYGEN_SHOULD_IGNORE_THIS */ /** * \struct PHYSFS_File * \brief A PhysicsFS file handle. * * You get a pointer to one of these when you open a file for reading, * writing, or appending via PhysicsFS. * * As you can see from the lack of meaningful fields, you should treat this * as opaque data. Don't try to manipulate the file handle, just pass the * pointer you got, unmolested, to various PhysicsFS APIs. * * \sa PHYSFS_openRead * \sa PHYSFS_openWrite * \sa PHYSFS_openAppend * \sa PHYSFS_close * \sa PHYSFS_read * \sa PHYSFS_write * \sa PHYSFS_seek * \sa PHYSFS_tell * \sa PHYSFS_eof * \sa PHYSFS_setBuffer * \sa PHYSFS_flush */ typedef struct PHYSFS_File { void *opaque; /**< That's all you get. Don't touch. */ } PHYSFS_File; /** * \def PHYSFS_file * \brief 1.0 API compatibility define. * * PHYSFS_file is identical to PHYSFS_File. This #define is here for backwards * compatibility with the 1.0 API, which had an inconsistent capitalization * convention in this case. New code should use PHYSFS_File, as this #define * may go away someday. * * \sa PHYSFS_File */ #define PHYSFS_file PHYSFS_File /** * \struct PHYSFS_ArchiveInfo * \brief Information on various PhysicsFS-supported archives. * * This structure gives you details on what sort of archives are supported * by this implementation of PhysicsFS. Archives tend to be things like * ZIP files and such. * * \warning Not all binaries are created equal! PhysicsFS can be built with * or without support for various archives. You can check with * PHYSFS_supportedArchiveTypes() to see if your archive type is * supported. * * \sa PHYSFS_supportedArchiveTypes * \sa PHYSFS_registerArchiver * \sa PHYSFS_deregisterArchiver */ typedef struct PHYSFS_ArchiveInfo { const char *extension; /**< Archive file extension: "ZIP", for example. */ const char *description; /**< Human-readable archive description. */ const char *author; /**< Person who did support for this archive. */ const char *url; /**< URL related to this archive */ int supportsSymlinks; /**< non-zero if archive offers symbolic links. */ } PHYSFS_ArchiveInfo; /** * \struct PHYSFS_Version * \brief Information the version of PhysicsFS in use. * * Represents the library's version as three levels: major revision * (increments with massive changes, additions, and enhancements), * minor revision (increments with backwards-compatible changes to the * major revision), and patchlevel (increments with fixes to the minor * revision). * * \sa PHYSFS_VERSION * \sa PHYSFS_getLinkedVersion */ typedef struct PHYSFS_Version { PHYSFS_uint8 major; /**< major revision */ PHYSFS_uint8 minor; /**< minor revision */ PHYSFS_uint8 patch; /**< patchlevel */ } PHYSFS_Version; #ifndef DOXYGEN_SHOULD_IGNORE_THIS #define PHYSFS_VER_MAJOR 3 #define PHYSFS_VER_MINOR 2 #define PHYSFS_VER_PATCH 0 #endif /* DOXYGEN_SHOULD_IGNORE_THIS */ /* PhysicsFS state stuff ... */ /** * \def PHYSFS_VERSION(x) * \brief Macro to determine PhysicsFS version program was compiled against. * * This macro fills in a PHYSFS_Version structure with the version of the * library you compiled against. This is determined by what header the * compiler uses. Note that if you dynamically linked the library, you might * have a slightly newer or older version at runtime. That version can be * determined with PHYSFS_getLinkedVersion(), which, unlike PHYSFS_VERSION, * is not a macro. * * \param x A pointer to a PHYSFS_Version struct to initialize. * * \sa PHYSFS_Version * \sa PHYSFS_getLinkedVersion */ #define PHYSFS_VERSION(x) \ { \ (x)->major = PHYSFS_VER_MAJOR; \ (x)->minor = PHYSFS_VER_MINOR; \ (x)->patch = PHYSFS_VER_PATCH; \ } /** * \fn void PHYSFS_getLinkedVersion(PHYSFS_Version *ver) * \brief Get the version of PhysicsFS that is linked against your program. * * If you are using a shared library (DLL) version of PhysFS, then it is * possible that it will be different than the version you compiled against. * * This is a real function; the macro PHYSFS_VERSION tells you what version * of PhysFS you compiled against: * * \code * PHYSFS_Version compiled; * PHYSFS_Version linked; * * PHYSFS_VERSION(&compiled); * PHYSFS_getLinkedVersion(&linked); * printf("We compiled against PhysFS version %d.%d.%d ...\n", * compiled.major, compiled.minor, compiled.patch); * printf("But we linked against PhysFS version %d.%d.%d.\n", * linked.major, linked.minor, linked.patch); * \endcode * * This function may be called safely at any time, even before PHYSFS_init(). * * \sa PHYSFS_VERSION */ PHYSFS_DECL void PHYSFS_getLinkedVersion(PHYSFS_Version *ver); #ifdef __ANDROID__ typedef struct PHYSFS_AndroidInit { void *jnienv; void *context; } PHYSFS_AndroidInit; #endif /** * \fn int PHYSFS_init(const char *argv0) * \brief Initialize the PhysicsFS library. * * This must be called before any other PhysicsFS function. * * This should be called prior to any attempts to change your process's * current working directory. * * \warning On Android, argv0 should be a non-NULL pointer to a * PHYSFS_AndroidInit struct. This struct must hold a valid JNIEnv * * and a JNI jobject of a Context (either the application context or * the current Activity is fine). Both are cast to a void * so we * don't need jni.h included wherever physfs.h is. PhysicsFS * uses these objects to query some system details. PhysicsFS does * not hold a reference to the JNIEnv or Context past the call to * PHYSFS_init(). If you pass a NULL here, PHYSFS_init can still * succeed, but PHYSFS_getBaseDir() and PHYSFS_getPrefDir() will be * incorrect. * * \param argv0 the argv[0] string passed to your program's mainline. * This may be NULL on most platforms (such as ones without a * standard main() function), but you should always try to pass * something in here. Many Unix-like systems _need_ to pass argv[0] * from main() in here. See warning about Android, too! * \return nonzero on success, zero on error. Specifics of the error can be * gleaned from PHYSFS_getLastError(). * * \sa PHYSFS_deinit * \sa PHYSFS_isInit */ PHYSFS_DECL int PHYSFS_init(const char *argv0); /** * \fn int PHYSFS_deinit(void) * \brief Deinitialize the PhysicsFS library. * * This closes any files opened via PhysicsFS, blanks the search/write paths, * frees memory, and invalidates all of your file handles. * * Note that this call can FAIL if there's a file open for writing that * refuses to close (for example, the underlying operating system was * buffering writes to network filesystem, and the fileserver has crashed, * or a hard drive has failed, etc). It is usually best to close all write * handles yourself before calling this function, so that you can gracefully * handle a specific failure. * * Once successfully deinitialized, PHYSFS_init() can be called again to * restart the subsystem. All default API states are restored at this * point, with the exception of any custom allocator you might have * specified, which survives between initializations. * * \return nonzero on success, zero on error. Specifics of the error can be * gleaned from PHYSFS_getLastError(). If failure, state of PhysFS is * undefined, and probably badly screwed up. * * \sa PHYSFS_init * \sa PHYSFS_isInit */ PHYSFS_DECL int PHYSFS_deinit(void); /** * \fn const PHYSFS_ArchiveInfo **PHYSFS_supportedArchiveTypes(void) * \brief Get a list of supported archive types. * * Get a list of archive types supported by this implementation of PhysicFS. * These are the file formats usable for search path entries. This is for * informational purposes only. Note that the extension listed is merely * convention: if we list "ZIP", you can open a PkZip-compatible archive * with an extension of "XYZ", if you like. * * The returned value is an array of pointers to PHYSFS_ArchiveInfo structures, * with a NULL entry to signify the end of the list: * * \code * PHYSFS_ArchiveInfo **i; * * for (i = PHYSFS_supportedArchiveTypes(); *i != NULL; i++) * { * printf("Supported archive: [%s], which is [%s].\n", * (*i)->extension, (*i)->description); * } * \endcode * * The return values are pointers to internal memory, and should * be considered READ ONLY, and never freed. The returned values are * valid until the next call to PHYSFS_deinit(), PHYSFS_registerArchiver(), * or PHYSFS_deregisterArchiver(). * * \return READ ONLY Null-terminated array of READ ONLY structures. * * \sa PHYSFS_registerArchiver * \sa PHYSFS_deregisterArchiver */ PHYSFS_DECL const PHYSFS_ArchiveInfo **PHYSFS_supportedArchiveTypes(void); /** * \fn void PHYSFS_freeList(void *listVar) * \brief Deallocate resources of lists returned by PhysicsFS. * * Certain PhysicsFS functions return lists of information that are * dynamically allocated. Use this function to free those resources. * * It is safe to pass a NULL here, but doing so will cause a crash in versions * before PhysicsFS 2.1.0. * * \param listVar List of information specified as freeable by this function. * Passing NULL is safe; it is a valid no-op. * * \sa PHYSFS_getCdRomDirs * \sa PHYSFS_enumerateFiles * \sa PHYSFS_getSearchPath */ PHYSFS_DECL void PHYSFS_freeList(void *listVar); /** * \fn const char *PHYSFS_getLastError(void) * \brief Get human-readable error information. * * \deprecated Use PHYSFS_getLastErrorCode() and PHYSFS_getErrorByCode() instead. * * \warning As of PhysicsFS 2.1, this function has been nerfed. * Before PhysicsFS 2.1, this function was the only way to get * error details beyond a given function's basic return value. * This was meant to be a human-readable string in one of several * languages, and was not useful for application parsing. This was * a problem, because the developer and not the user chose the * language at compile time, and the PhysicsFS maintainers had * to (poorly) maintain a significant amount of localization work. * The app couldn't parse the strings, even if they counted on a * specific language, since some were dynamically generated. * In 2.1 and later, this always returns a static string in * English; you may use it as a key string for your own * localizations if you like, as we'll promise not to change * existing error strings. Also, if your application wants to * look at specific errors, we now offer a better option: * use PHYSFS_getLastErrorCode() instead. * * Get the last PhysicsFS error message as a human-readable, null-terminated * string. This will return NULL if there's been no error since the last call * to this function. The pointer returned by this call points to an internal * buffer. Each thread has a unique error state associated with it, but each * time a new error message is set, it will overwrite the previous one * associated with that thread. It is safe to call this function at anytime, * even before PHYSFS_init(). * * PHYSFS_getLastError() and PHYSFS_getLastErrorCode() both reset the same * thread-specific error state. Calling one will wipe out the other's * data. If you need both, call PHYSFS_getLastErrorCode(), then pass that * value to PHYSFS_getErrorByCode(). * * As of PhysicsFS 2.1, this function only presents text in the English * language, but the strings are static, so you can use them as keys into * your own localization dictionary. These strings are meant to be passed on * directly to the user. * * Generally, applications should only concern themselves with whether a * given function failed; however, if your code require more specifics, you * should use PHYSFS_getLastErrorCode() instead of this function. * * \return READ ONLY string of last error message. * * \sa PHYSFS_getLastErrorCode * \sa PHYSFS_getErrorByCode */ PHYSFS_DECL const char *PHYSFS_getLastError(void) PHYSFS_DEPRECATED; /** * \fn const char *PHYSFS_getDirSeparator(void) * \brief Get platform-dependent dir separator string. * * This returns "\\" on win32, "/" on Unix, and ":" on MacOS. It may be more * than one character, depending on the platform, and your code should take * that into account. Note that this is only useful for setting up the * search/write paths, since access into those dirs always use '/' * (platform-independent notation) to separate directories. This is also * handy for getting platform-independent access when using stdio calls. * * \return READ ONLY null-terminated string of platform's dir separator. */ PHYSFS_DECL const char *PHYSFS_getDirSeparator(void); /** * \fn void PHYSFS_permitSymbolicLinks(int allow) * \brief Enable or disable following of symbolic links. * * Some physical filesystems and archives contain files that are just pointers * to other files. On the physical filesystem, opening such a link will * (transparently) open the file that is pointed to. * * By default, PhysicsFS will check if a file is really a symlink during open * calls and fail if it is. Otherwise, the link could take you outside the * write and search paths, and compromise security. * * If you want to take that risk, call this function with a non-zero parameter. * Note that this is more for sandboxing a program's scripting language, in * case untrusted scripts try to compromise the system. Generally speaking, * a user could very well have a legitimate reason to set up a symlink, so * unless you feel there's a specific danger in allowing them, you should * permit them. * * Symlinks are only explicitly checked when dealing with filenames * in platform-independent notation. That is, when setting up your * search and write paths, etc, symlinks are never checked for. * * Please note that PHYSFS_stat() will always check the path specified; if * that path is a symlink, it will not be followed in any case. If symlinks * aren't permitted through this function, PHYSFS_stat() ignores them, and * would treat the query as if the path didn't exist at all. * * Symbolic link permission can be enabled or disabled at any time after * you've called PHYSFS_init(), and is disabled by default. * * \param allow nonzero to permit symlinks, zero to deny linking. * * \sa PHYSFS_symbolicLinksPermitted */ PHYSFS_DECL void PHYSFS_permitSymbolicLinks(int allow); /** * \fn char **PHYSFS_getCdRomDirs(void) * \brief Get an array of paths to available CD-ROM drives. * * The dirs returned are platform-dependent ("D:\" on Win32, "/cdrom" or * whatnot on Unix). Dirs are only returned if there is a disc ready and * accessible in the drive. So if you've got two drives (D: and E:), and only * E: has a disc in it, then that's all you get. If the user inserts a disc * in D: and you call this function again, you get both drives. If, on a * Unix box, the user unmounts a disc and remounts it elsewhere, the next * call to this function will reflect that change. * * This function refers to "CD-ROM" media, but it really means "inserted disc * media," such as DVD-ROM, HD-DVD, CDRW, and Blu-Ray discs. It looks for * filesystems, and as such won't report an audio CD, unless there's a * mounted filesystem track on it. * * The returned value is an array of strings, with a NULL entry to signify the * end of the list: * * \code * char **cds = PHYSFS_getCdRomDirs(); * char **i; * * for (i = cds; *i != NULL; i++) * printf("cdrom dir [%s] is available.\n", *i); * * PHYSFS_freeList(cds); * \endcode * * This call may block while drives spin up. Be forewarned. * * When you are done with the returned information, you may dispose of the * resources by calling PHYSFS_freeList() with the returned pointer. * * \return Null-terminated array of null-terminated strings. * * \sa PHYSFS_getCdRomDirsCallback */ PHYSFS_DECL char **PHYSFS_getCdRomDirs(void); /** * \fn const char *PHYSFS_getBaseDir(void) * \brief Get the path where the application resides. * * Helper function. * * Get the "base dir". This is the directory where the application was run * from, which is probably the installation directory, and may or may not * be the process's current working directory. * * You should probably use the base dir in your search path. * * \warning On most platforms, this is a directory; on Android, this gives * you the path to the app's package (APK) file. As APK files are * just .zip files, you can mount them in PhysicsFS like regular * directories. You'll probably want to call * PHYSFS_setRoot(basedir, "/assets") after mounting to make your * app's actual data available directly without all the Android * metadata and directory offset. Note that if you passed a NULL to * PHYSFS_init(), you will not get the APK file here. * * \return READ ONLY string of base dir in platform-dependent notation. * * \sa PHYSFS_getPrefDir */ PHYSFS_DECL const char *PHYSFS_getBaseDir(void); /** * \fn const char *PHYSFS_getUserDir(void) * \brief Get the path where user's home directory resides. * * \deprecated As of PhysicsFS 2.1, you probably want PHYSFS_getPrefDir(). * * Helper function. * * Get the "user dir". This is meant to be a suggestion of where a specific * user of the system can store files. On Unix, this is her home directory. * On systems with no concept of multiple home directories (MacOS, win95), * this will default to something like "C:\mybasedir\users\username" * where "username" will either be the login name, or "default" if the * platform doesn't support multiple users, either. * * \return READ ONLY string of user dir in platform-dependent notation. * * \sa PHYSFS_getBaseDir * \sa PHYSFS_getPrefDir */ PHYSFS_DECL const char *PHYSFS_getUserDir(void) PHYSFS_DEPRECATED; /** * \fn const char *PHYSFS_getWriteDir(void) * \brief Get path where PhysicsFS will allow file writing. * * Get the current write dir. The default write dir is NULL. * * \return READ ONLY string of write dir in platform-dependent notation, * OR NULL IF NO WRITE PATH IS CURRENTLY SET. * * \sa PHYSFS_setWriteDir */ PHYSFS_DECL const char *PHYSFS_getWriteDir(void); /** * \fn int PHYSFS_setWriteDir(const char *newDir) * \brief Tell PhysicsFS where it may write files. * * Set a new write dir. This will override the previous setting. * * This call will fail (and fail to change the write dir) if the current * write dir still has files open in it. * * \param newDir The new directory to be the root of the write dir, * specified in platform-dependent notation. Setting to NULL * disables the write dir, so no files can be opened for * writing via PhysicsFS. * \return non-zero on success, zero on failure. All attempts to open a file * for writing via PhysicsFS will fail until this call succeeds. * Use PHYSFS_getLastErrorCode() to obtain the specific error. * * \sa PHYSFS_getWriteDir */ PHYSFS_DECL int PHYSFS_setWriteDir(const char *newDir); /** * \fn int PHYSFS_addToSearchPath(const char *newDir, int appendToPath) * \brief Add an archive or directory to the search path. * * \deprecated As of PhysicsFS 2.0, use PHYSFS_mount() instead. This * function just wraps it anyhow. * * This function is equivalent to: * * \code * PHYSFS_mount(newDir, NULL, appendToPath); * \endcode * * You must use this and not PHYSFS_mount if binary compatibility with * PhysicsFS 1.0 is important (which it may not be for many people). * * \sa PHYSFS_mount * \sa PHYSFS_removeFromSearchPath * \sa PHYSFS_getSearchPath */ PHYSFS_DECL int PHYSFS_addToSearchPath(const char *newDir, int appendToPath) PHYSFS_DEPRECATED; /** * \fn int PHYSFS_removeFromSearchPath(const char *oldDir) * \brief Remove a directory or archive from the search path. * * \deprecated As of PhysicsFS 2.1, use PHYSFS_unmount() instead. This * function just wraps it anyhow. There's no functional difference * except the vocabulary changed from "adding to the search path" * to "mounting" when that functionality was extended, and thus * the preferred way to accomplish this function's work is now * called "unmounting." * * This function is equivalent to: * * \code * PHYSFS_unmount(oldDir); * \endcode * * You must use this and not PHYSFS_unmount if binary compatibility with * PhysicsFS 1.0 is important (which it may not be for many people). * * \sa PHYSFS_addToSearchPath * \sa PHYSFS_getSearchPath * \sa PHYSFS_unmount */ PHYSFS_DECL int PHYSFS_removeFromSearchPath(const char *oldDir) PHYSFS_DEPRECATED; /** * \fn char **PHYSFS_getSearchPath(void) * \brief Get the current search path. * * The default search path is an empty list. * * The returned value is an array of strings, with a NULL entry to signify the * end of the list: * * \code * char **i; * * for (i = PHYSFS_getSearchPath(); *i != NULL; i++) * printf("[%s] is in the search path.\n", *i); * \endcode * * When you are done with the returned information, you may dispose of the * resources by calling PHYSFS_freeList() with the returned pointer. * * \return Null-terminated array of null-terminated strings. NULL if there * was a problem (read: OUT OF MEMORY). * * \sa PHYSFS_getSearchPathCallback * \sa PHYSFS_addToSearchPath * \sa PHYSFS_removeFromSearchPath */ PHYSFS_DECL char **PHYSFS_getSearchPath(void); /** * \fn int PHYSFS_setSaneConfig(const char *organization, const char *appName, const char *archiveExt, int includeCdRoms, int archivesFirst) * \brief Set up sane, default paths. * * Helper function. * * The write dir will be set to the pref dir returned by * \code PHYSFS_getPrefDir(organization, appName) \endcode, which is * created if it doesn't exist. * * The above is sufficient to make sure your program's configuration directory * is separated from other clutter, and platform-independent. * * The search path will be: * * - The Write Dir (created if it doesn't exist) * - The Base Dir (PHYSFS_getBaseDir()) * - All found CD-ROM dirs (optionally) * * These directories are then searched for files ending with the extension * (archiveExt), which, if they are valid and supported archives, will also * be added to the search path. If you specified "PKG" for (archiveExt), and * there's a file named data.PKG in the base dir, it'll be checked. Archives * can either be appended or prepended to the search path in alphabetical * order, regardless of which directories they were found in. All archives * are mounted in the root of the virtual file system ("/"). * * All of this can be accomplished from the application, but this just does it * all for you. Feel free to add more to the search path manually, too. * * \param organization Name of your company/group/etc to be used as a * dirname, so keep it small, and no-frills. * * \param appName Program-specific name of your program, to separate it * from other programs using PhysicsFS. * * \param archiveExt File extension used by your program to specify an * archive. For example, Quake 3 uses "pk3", even though * they are just zipfiles. Specify NULL to not dig out * archives automatically. Do not specify the '.' char; * If you want to look for ZIP files, specify "ZIP" and * not ".ZIP" ... the archive search is case-insensitive. * * \param includeCdRoms Non-zero to include CD-ROMs in the search path, and * (if (archiveExt) != NULL) search them for archives. * This may cause a significant amount of blocking * while discs are accessed, and if there are no discs * in the drive (or even not mounted on Unix systems), * then they may not be made available anyhow. You may * want to specify zero and handle the disc setup * yourself. * * \param archivesFirst Non-zero to prepend the archives to the search path. * Zero to append them. Ignored if !(archiveExt). * * \return nonzero on success, zero on error. Use PHYSFS_getLastErrorCode() * to obtain the specific error. */ PHYSFS_DECL int PHYSFS_setSaneConfig(const char *organization, const char *appName, const char *archiveExt, int includeCdRoms, int archivesFirst); /* Directory management stuff ... */ /** * \fn int PHYSFS_mkdir(const char *dirName) * \brief Create a directory. * * This is specified in platform-independent notation in relation to the * write dir. All missing parent directories are also created if they * don't exist. * * So if you've got the write dir set to "C:\mygame\writedir" and call * PHYSFS_mkdir("downloads/maps") then the directories * "C:\mygame\writedir\downloads" and "C:\mygame\writedir\downloads\maps" * will be created if possible. If the creation of "maps" fails after we * have successfully created "downloads", then the function leaves the * created directory behind and reports failure. * * \param dirName New dir to create. * \return nonzero on success, zero on error. Use * PHYSFS_getLastErrorCode() to obtain the specific error. * * \sa PHYSFS_delete */ PHYSFS_DECL int PHYSFS_mkdir(const char *dirName); /** * \fn int PHYSFS_delete(const char *filename) * \brief Delete a file or directory. * * (filename) is specified in platform-independent notation in relation to the * write dir. * * A directory must be empty before this call can delete it. * * Deleting a symlink will remove the link, not what it points to, regardless * of whether you "permitSymLinks" or not. * * So if you've got the write dir set to "C:\mygame\writedir" and call * PHYSFS_delete("downloads/maps/level1.map") then the file * "C:\mygame\writedir\downloads\maps\level1.map" is removed from the * physical filesystem, if it exists and the operating system permits the * deletion. * * Note that on Unix systems, deleting a file may be successful, but the * actual file won't be removed until all processes that have an open * filehandle to it (including your program) close their handles. * * Chances are, the bits that make up the file still exist, they are just * made available to be written over at a later point. Don't consider this * a security method or anything. :) * * \param filename Filename to delete. * \return nonzero on success, zero on error. Use PHYSFS_getLastErrorCode() * to obtain the specific error. */ PHYSFS_DECL int PHYSFS_delete(const char *filename); /** * \fn const char *PHYSFS_getRealDir(const char *filename) * \brief Figure out where in the search path a file resides. * * The file is specified in platform-independent notation. The returned * filename will be the element of the search path where the file was found, * which may be a directory, or an archive. Even if there are multiple * matches in different parts of the search path, only the first one found * is used, just like when opening a file. * * So, if you look for "maps/level1.map", and C:\\mygame is in your search * path and C:\\mygame\\maps\\level1.map exists, then "C:\mygame" is returned. * * If a any part of a match is a symbolic link, and you've not explicitly * permitted symlinks, then it will be ignored, and the search for a match * will continue. * * If you specify a fake directory that only exists as a mount point, it'll * be associated with the first archive mounted there, even though that * directory isn't necessarily contained in a real archive. * * \warning This will return NULL if there is no real directory associated * with (filename). Specifically, PHYSFS_mountIo(), * PHYSFS_mountMemory(), and PHYSFS_mountHandle() will return NULL * even if the filename is found in the search path. Plan accordingly. * * \param filename file to look for. * \return READ ONLY string of element of search path containing the * the file in question. NULL if not found. */ PHYSFS_DECL const char *PHYSFS_getRealDir(const char *filename); /** * \fn char **PHYSFS_enumerateFiles(const char *dir) * \brief Get a file listing of a search path's directory. * * \warning In PhysicsFS versions prior to 2.1, this function would return * as many items as it could in the face of a failure condition * (out of memory, disk i/o error, etc). Since this meant apps * couldn't distinguish between complete success and partial failure, * and since the function could always return NULL to report * catastrophic failures anyway, in PhysicsFS 2.1 this function's * policy changed: it will either return a list of complete results * or it will return NULL for any failure of any kind, so we can * guarantee that the enumeration ran to completion and has no gaps * in its results. * * Matching directories are interpolated. That is, if "C:\mydir" is in the * search path and contains a directory "savegames" that contains "x.sav", * "y.sav", and "z.sav", and there is also a "C:\userdir" in the search path * that has a "savegames" subdirectory with "w.sav", then the following code: * * \code * char **rc = PHYSFS_enumerateFiles("savegames"); * char **i; * * for (i = rc; *i != NULL; i++) * printf(" * We've got [%s].\n", *i); * * PHYSFS_freeList(rc); * \endcode * * \...will print: * * \verbatim * We've got [x.sav]. * We've got [y.sav]. * We've got [z.sav]. * We've got [w.sav].\endverbatim * * Feel free to sort the list however you like. However, the returned data * will always contain no duplicates, and will be always sorted in alphabetic * (rather: case-sensitive Unicode) order for you. * * Don't forget to call PHYSFS_freeList() with the return value from this * function when you are done with it. * * \param dir directory in platform-independent notation to enumerate. * \return Null-terminated array of null-terminated strings, or NULL for * failure cases. * * \sa PHYSFS_enumerate */ PHYSFS_DECL char **PHYSFS_enumerateFiles(const char *dir); /** * \fn int PHYSFS_exists(const char *fname) * \brief Determine if a file exists in the search path. * * Reports true if there is an entry anywhere in the search path by the * name of (fname). * * Note that entries that are symlinks are ignored if * PHYSFS_permitSymbolicLinks(1) hasn't been called, so you * might end up further down in the search path than expected. * * \param fname filename in platform-independent notation. * \return non-zero if filename exists. zero otherwise. */ PHYSFS_DECL int PHYSFS_exists(const char *fname); /** * \fn int PHYSFS_isDirectory(const char *fname) * \brief Determine if a file in the search path is really a directory. * * \deprecated As of PhysicsFS 2.1, use PHYSFS_stat() instead. This * function just wraps it anyhow. * * Determine if the first occurence of (fname) in the search path is * really a directory entry. * * Note that entries that are symlinks are ignored if * PHYSFS_permitSymbolicLinks(1) hasn't been called, so you * might end up further down in the search path than expected. * * \param fname filename in platform-independent notation. * \return non-zero if filename exists and is a directory. zero otherwise. * * \sa PHYSFS_stat * \sa PHYSFS_exists */ PHYSFS_DECL int PHYSFS_isDirectory(const char *fname) PHYSFS_DEPRECATED; /** * \fn int PHYSFS_isSymbolicLink(const char *fname) * \brief Determine if a file in the search path is really a symbolic link. * * \deprecated As of PhysicsFS 2.1, use PHYSFS_stat() instead. This * function just wraps it anyhow. * * Determine if the first occurence of (fname) in the search path is * really a symbolic link. * * Note that entries that are symlinks are ignored if * PHYSFS_permitSymbolicLinks(1) hasn't been called, and as such, * this function will always return 0 in that case. * * \param fname filename in platform-independent notation. * \return non-zero if filename exists and is a symlink. zero otherwise. * * \sa PHYSFS_stat * \sa PHYSFS_exists */ PHYSFS_DECL int PHYSFS_isSymbolicLink(const char *fname) PHYSFS_DEPRECATED; /** * \fn PHYSFS_sint64 PHYSFS_getLastModTime(const char *filename) * \brief Get the last modification time of a file. * * \deprecated As of PhysicsFS 2.1, use PHYSFS_stat() instead. This * function just wraps it anyhow. * * The modtime is returned as a number of seconds since the Unix epoch * (midnight, Jan 1, 1970). The exact derivation and accuracy of this time * depends on the particular archiver. If there is no reasonable way to * obtain this information for a particular archiver, or there was some sort * of error, this function returns (-1). * * You must use this and not PHYSFS_stat() if binary compatibility with * PhysicsFS 2.0 is important (which it may not be for many people). * * \param filename filename to check, in platform-independent notation. * \return last modified time of the file. -1 if it can't be determined. * * \sa PHYSFS_stat */ PHYSFS_DECL PHYSFS_sint64 PHYSFS_getLastModTime(const char *filename) PHYSFS_DEPRECATED; /* i/o stuff... */ /** * \fn PHYSFS_File *PHYSFS_openWrite(const char *filename) * \brief Open a file for writing. * * Open a file for writing, in platform-independent notation and in relation * to the write dir as the root of the writable filesystem. The specified * file is created if it doesn't exist. If it does exist, it is truncated to * zero bytes, and the writing offset is set to the start. * * Note that entries that are symlinks are ignored if * PHYSFS_permitSymbolicLinks(1) hasn't been called, and opening a * symlink with this function will fail in such a case. * * \param filename File to open. * \return A valid PhysicsFS filehandle on success, NULL on error. Use * PHYSFS_getLastErrorCode() to obtain the specific error. * * \sa PHYSFS_openRead * \sa PHYSFS_openAppend * \sa PHYSFS_write * \sa PHYSFS_close */ PHYSFS_DECL PHYSFS_File *PHYSFS_openWrite(const char *filename); /** * \fn PHYSFS_File *PHYSFS_openAppend(const char *filename) * \brief Open a file for appending. * * Open a file for writing, in platform-independent notation and in relation * to the write dir as the root of the writable filesystem. The specified * file is created if it doesn't exist. If it does exist, the writing offset * is set to the end of the file, so the first write will be the byte after * the end. * * Note that entries that are symlinks are ignored if * PHYSFS_permitSymbolicLinks(1) hasn't been called, and opening a * symlink with this function will fail in such a case. * * \param filename File to open. * \return A valid PhysicsFS filehandle on success, NULL on error. Use * PHYSFS_getLastErrorCode() to obtain the specific error. * * \sa PHYSFS_openRead * \sa PHYSFS_openWrite * \sa PHYSFS_write * \sa PHYSFS_close */ PHYSFS_DECL PHYSFS_File *PHYSFS_openAppend(const char *filename); /** * \fn PHYSFS_File *PHYSFS_openRead(const char *filename) * \brief Open a file for reading. * * Open a file for reading, in platform-independent notation. The search path * is checked one at a time until a matching file is found, in which case an * abstract filehandle is associated with it, and reading may be done. * The reading offset is set to the first byte of the file. * * Note that entries that are symlinks are ignored if * PHYSFS_permitSymbolicLinks(1) hasn't been called, and opening a * symlink with this function will fail in such a case. * * \param filename File to open. * \return A valid PhysicsFS filehandle on success, NULL on error. * Use PHYSFS_getLastErrorCode() to obtain the specific error. * * \sa PHYSFS_openWrite * \sa PHYSFS_openAppend * \sa PHYSFS_read * \sa PHYSFS_close */ PHYSFS_DECL PHYSFS_File *PHYSFS_openRead(const char *filename); /** * \fn int PHYSFS_close(PHYSFS_File *handle) * \brief Close a PhysicsFS filehandle. * * This call is capable of failing if the operating system was buffering * writes to the physical media, and, now forced to write those changes to * physical media, can not store the data for some reason. In such a case, * the filehandle stays open. A well-written program should ALWAYS check the * return value from the close call in addition to every writing call! * * \param handle handle returned from PHYSFS_open*(). * \return nonzero on success, zero on error. Use PHYSFS_getLastErrorCode() * to obtain the specific error. * * \sa PHYSFS_openRead * \sa PHYSFS_openWrite * \sa PHYSFS_openAppend */ PHYSFS_DECL int PHYSFS_close(PHYSFS_File *handle); /** * \fn PHYSFS_sint64 PHYSFS_read(PHYSFS_File *handle, void *buffer, PHYSFS_uint32 objSize, PHYSFS_uint32 objCount) * \brief Read data from a PhysicsFS filehandle * * The file must be opened for reading. * * \deprecated As of PhysicsFS 2.1, use PHYSFS_readBytes() instead. This * function just wraps it anyhow. This function never clarified * what would happen if you managed to read a partial object, so * working at the byte level makes this cleaner for everyone, * especially now that PHYSFS_Io interfaces can be supplied by the * application. * * \param handle handle returned from PHYSFS_openRead(). * \param buffer buffer to store read data into. * \param objSize size in bytes of objects being read from (handle). * \param objCount number of (objSize) objects to read from (handle). * \return number of objects read. PHYSFS_getLastErrorCode() can shed light * on the reason this might be < (objCount), as can PHYSFS_eof(). * -1 if complete failure. * * \sa PHYSFS_readBytes * \sa PHYSFS_eof */ PHYSFS_DECL PHYSFS_sint64 PHYSFS_read(PHYSFS_File *handle, void *buffer, PHYSFS_uint32 objSize, PHYSFS_uint32 objCount) PHYSFS_DEPRECATED; /** * \fn PHYSFS_sint64 PHYSFS_write(PHYSFS_File *handle, const void *buffer, PHYSFS_uint32 objSize, PHYSFS_uint32 objCount) * \brief Write data to a PhysicsFS filehandle * * The file must be opened for writing. * * \deprecated As of PhysicsFS 2.1, use PHYSFS_writeBytes() instead. This * function just wraps it anyhow. This function never clarified * what would happen if you managed to write a partial object, so * working at the byte level makes this cleaner for everyone, * especially now that PHYSFS_Io interfaces can be supplied by the * application. * * \param handle retval from PHYSFS_openWrite() or PHYSFS_openAppend(). * \param buffer buffer of bytes to write to (handle). * \param objSize size in bytes of objects being written to (handle). * \param objCount number of (objSize) objects to write to (handle). * \return number of objects written. PHYSFS_getLastErrorCode() can shed * light on the reason this might be < (objCount). -1 if complete * failure. * * \sa PHYSFS_writeBytes */ PHYSFS_DECL PHYSFS_sint64 PHYSFS_write(PHYSFS_File *handle, const void *buffer, PHYSFS_uint32 objSize, PHYSFS_uint32 objCount) PHYSFS_DEPRECATED; /* File position stuff... */ /** * \fn int PHYSFS_eof(PHYSFS_File *handle) * \brief Check for end-of-file state on a PhysicsFS filehandle. * * Determine if the end of file has been reached in a PhysicsFS filehandle. * * \param handle handle returned from PHYSFS_openRead(). * \return nonzero if EOF, zero if not. * * \sa PHYSFS_read * \sa PHYSFS_tell */ PHYSFS_DECL int PHYSFS_eof(PHYSFS_File *handle); /** * \fn PHYSFS_sint64 PHYSFS_tell(PHYSFS_File *handle) * \brief Determine current position within a PhysicsFS filehandle. * * \param handle handle returned from PHYSFS_open*(). * \return offset in bytes from start of file. -1 if error occurred. * Use PHYSFS_getLastErrorCode() to obtain the specific error. * * \sa PHYSFS_seek */ PHYSFS_DECL PHYSFS_sint64 PHYSFS_tell(PHYSFS_File *handle); /** * \fn int PHYSFS_seek(PHYSFS_File *handle, PHYSFS_uint64 pos) * \brief Seek to a new position within a PhysicsFS filehandle. * * The next read or write will occur at that place. Seeking past the * beginning or end of the file is not allowed, and causes an error. * * \param handle handle returned from PHYSFS_open*(). * \param pos number of bytes from start of file to seek to. * \return nonzero on success, zero on error. Use PHYSFS_getLastErrorCode() * to obtain the specific error. * * \sa PHYSFS_tell */ PHYSFS_DECL int PHYSFS_seek(PHYSFS_File *handle, PHYSFS_uint64 pos); /** * \fn PHYSFS_sint64 PHYSFS_fileLength(PHYSFS_File *handle) * \brief Get total length of a file in bytes. * * Note that if another process/thread is writing to this file at the same * time, then the information this function supplies could be incorrect * before you get it. Use with caution, or better yet, don't use at all. * * \param handle handle returned from PHYSFS_open*(). * \return size in bytes of the file. -1 if can't be determined. * * \sa PHYSFS_tell * \sa PHYSFS_seek */ PHYSFS_DECL PHYSFS_sint64 PHYSFS_fileLength(PHYSFS_File *handle); /* Buffering stuff... */ /** * \fn int PHYSFS_setBuffer(PHYSFS_File *handle, PHYSFS_uint64 bufsize) * \brief Set up buffering for a PhysicsFS file handle. * * Define an i/o buffer for a file handle. A memory block of (bufsize) bytes * will be allocated and associated with (handle). * * For files opened for reading, up to (bufsize) bytes are read from (handle) * and stored in the internal buffer. Calls to PHYSFS_read() will pull * from this buffer until it is empty, and then refill it for more reading. * Note that compressed files, like ZIP archives, will decompress while * buffering, so this can be handy for offsetting CPU-intensive operations. * The buffer isn't filled until you do your next read. * * For files opened for writing, data will be buffered to memory until the * buffer is full or the buffer is flushed. Closing a handle implicitly * causes a flush...check your return values! * * Seeking, etc transparently accounts for buffering. * * You can resize an existing buffer by calling this function more than once * on the same file. Setting the buffer size to zero will free an existing * buffer. * * PhysicsFS file handles are unbuffered by default. * * Please check the return value of this function! Failures can include * not being able to seek backwards in a read-only file when removing the * buffer, not being able to allocate the buffer, and not being able to * flush the buffer to disk, among other unexpected problems. * * \param handle handle returned from PHYSFS_open*(). * \param bufsize size, in bytes, of buffer to allocate. * \return nonzero if successful, zero on error. * * \sa PHYSFS_flush * \sa PHYSFS_read * \sa PHYSFS_write * \sa PHYSFS_close */ PHYSFS_DECL int PHYSFS_setBuffer(PHYSFS_File *handle, PHYSFS_uint64 bufsize); /** * \fn int PHYSFS_flush(PHYSFS_File *handle) * \brief Flush a buffered PhysicsFS file handle. * * For buffered files opened for writing, this will put the current contents * of the buffer to disk and flag the buffer as empty if possible. * * For buffered files opened for reading or unbuffered files, this is a safe * no-op, and will report success. * * \param handle handle returned from PHYSFS_open*(). * \return nonzero if successful, zero on error. * * \sa PHYSFS_setBuffer * \sa PHYSFS_close */ PHYSFS_DECL int PHYSFS_flush(PHYSFS_File *handle); /* Byteorder stuff... */ /** * \fn PHYSFS_sint16 PHYSFS_swapSLE16(PHYSFS_sint16 val) * \brief Swap littleendian signed 16 to platform's native byte order. * * Take a 16-bit signed value in littleendian format and convert it to * the platform's native byte order. * * \param val value to convert * \return converted value. */ PHYSFS_DECL PHYSFS_sint16 PHYSFS_swapSLE16(PHYSFS_sint16 val); /** * \fn PHYSFS_uint16 PHYSFS_swapULE16(PHYSFS_uint16 val) * \brief Swap littleendian unsigned 16 to platform's native byte order. * * Take a 16-bit unsigned value in littleendian format and convert it to * the platform's native byte order. * * \param val value to convert * \return converted value. */ PHYSFS_DECL PHYSFS_uint16 PHYSFS_swapULE16(PHYSFS_uint16 val); /** * \fn PHYSFS_sint32 PHYSFS_swapSLE32(PHYSFS_sint32 val) * \brief Swap littleendian signed 32 to platform's native byte order. * * Take a 32-bit signed value in littleendian format and convert it to * the platform's native byte order. * * \param val value to convert * \return converted value. */ PHYSFS_DECL PHYSFS_sint32 PHYSFS_swapSLE32(PHYSFS_sint32 val); /** * \fn PHYSFS_uint32 PHYSFS_swapULE32(PHYSFS_uint32 val) * \brief Swap littleendian unsigned 32 to platform's native byte order. * * Take a 32-bit unsigned value in littleendian format and convert it to * the platform's native byte order. * * \param val value to convert * \return converted value. */ PHYSFS_DECL PHYSFS_uint32 PHYSFS_swapULE32(PHYSFS_uint32 val); /** * \fn PHYSFS_sint64 PHYSFS_swapSLE64(PHYSFS_sint64 val) * \brief Swap littleendian signed 64 to platform's native byte order. * * Take a 64-bit signed value in littleendian format and convert it to * the platform's native byte order. * * \param val value to convert * \return converted value. * * \warning Remember, PHYSFS_sint64 is only 32 bits on platforms without * any sort of 64-bit support. */ PHYSFS_DECL PHYSFS_sint64 PHYSFS_swapSLE64(PHYSFS_sint64 val); /** * \fn PHYSFS_uint64 PHYSFS_swapULE64(PHYSFS_uint64 val) * \brief Swap littleendian unsigned 64 to platform's native byte order. * * Take a 64-bit unsigned value in littleendian format and convert it to * the platform's native byte order. * * \param val value to convert * \return converted value. * * \warning Remember, PHYSFS_uint64 is only 32 bits on platforms without * any sort of 64-bit support. */ PHYSFS_DECL PHYSFS_uint64 PHYSFS_swapULE64(PHYSFS_uint64 val); /** * \fn PHYSFS_sint16 PHYSFS_swapSBE16(PHYSFS_sint16 val) * \brief Swap bigendian signed 16 to platform's native byte order. * * Take a 16-bit signed value in bigendian format and convert it to * the platform's native byte order. * * \param val value to convert * \return converted value. */ PHYSFS_DECL PHYSFS_sint16 PHYSFS_swapSBE16(PHYSFS_sint16 val); /** * \fn PHYSFS_uint16 PHYSFS_swapUBE16(PHYSFS_uint16 val) * \brief Swap bigendian unsigned 16 to platform's native byte order. * * Take a 16-bit unsigned value in bigendian format and convert it to * the platform's native byte order. * * \param val value to convert * \return converted value. */ PHYSFS_DECL PHYSFS_uint16 PHYSFS_swapUBE16(PHYSFS_uint16 val); /** * \fn PHYSFS_sint32 PHYSFS_swapSBE32(PHYSFS_sint32 val) * \brief Swap bigendian signed 32 to platform's native byte order. * * Take a 32-bit signed value in bigendian format and convert it to * the platform's native byte order. * * \param val value to convert * \return converted value. */ PHYSFS_DECL PHYSFS_sint32 PHYSFS_swapSBE32(PHYSFS_sint32 val); /** * \fn PHYSFS_uint32 PHYSFS_swapUBE32(PHYSFS_uint32 val) * \brief Swap bigendian unsigned 32 to platform's native byte order. * * Take a 32-bit unsigned value in bigendian format and convert it to * the platform's native byte order. * * \param val value to convert * \return converted value. */ PHYSFS_DECL PHYSFS_uint32 PHYSFS_swapUBE32(PHYSFS_uint32 val); /** * \fn PHYSFS_sint64 PHYSFS_swapSBE64(PHYSFS_sint64 val) * \brief Swap bigendian signed 64 to platform's native byte order. * * Take a 64-bit signed value in bigendian format and convert it to * the platform's native byte order. * * \param val value to convert * \return converted value. * * \warning Remember, PHYSFS_sint64 is only 32 bits on platforms without * any sort of 64-bit support. */ PHYSFS_DECL PHYSFS_sint64 PHYSFS_swapSBE64(PHYSFS_sint64 val); /** * \fn PHYSFS_uint64 PHYSFS_swapUBE64(PHYSFS_uint64 val) * \brief Swap bigendian unsigned 64 to platform's native byte order. * * Take a 64-bit unsigned value in bigendian format and convert it to * the platform's native byte order. * * \param val value to convert * \return converted value. * * \warning Remember, PHYSFS_uint64 is only 32 bits on platforms without * any sort of 64-bit support. */ PHYSFS_DECL PHYSFS_uint64 PHYSFS_swapUBE64(PHYSFS_uint64 val); /** * \fn int PHYSFS_readSLE16(PHYSFS_File *file, PHYSFS_sint16 *val) * \brief Read and convert a signed 16-bit littleendian value. * * Convenience function. Read a signed 16-bit littleendian value from a * file and convert it to the platform's native byte order. * * \param file PhysicsFS file handle from which to read. * \param val pointer to where value should be stored. * \return zero on failure, non-zero on success. If successful, (*val) will * store the result. On failure, you can find out what went wrong * from PHYSFS_getLastErrorCode(). */ PHYSFS_DECL int PHYSFS_readSLE16(PHYSFS_File *file, PHYSFS_sint16 *val); /** * \fn int PHYSFS_readULE16(PHYSFS_File *file, PHYSFS_uint16 *val) * \brief Read and convert an unsigned 16-bit littleendian value. * * Convenience function. Read an unsigned 16-bit littleendian value from a * file and convert it to the platform's native byte order. * * \param file PhysicsFS file handle from which to read. * \param val pointer to where value should be stored. * \return zero on failure, non-zero on success. If successful, (*val) will * store the result. On failure, you can find out what went wrong * from PHYSFS_getLastErrorCode(). * */ PHYSFS_DECL int PHYSFS_readULE16(PHYSFS_File *file, PHYSFS_uint16 *val); /** * \fn int PHYSFS_readSBE16(PHYSFS_File *file, PHYSFS_sint16 *val) * \brief Read and convert a signed 16-bit bigendian value. * * Convenience function. Read a signed 16-bit bigendian value from a * file and convert it to the platform's native byte order. * * \param file PhysicsFS file handle from which to read. * \param val pointer to where value should be stored. * \return zero on failure, non-zero on success. If successful, (*val) will * store the result. On failure, you can find out what went wrong * from PHYSFS_getLastErrorCode(). */ PHYSFS_DECL int PHYSFS_readSBE16(PHYSFS_File *file, PHYSFS_sint16 *val); /** * \fn int PHYSFS_readUBE16(PHYSFS_File *file, PHYSFS_uint16 *val) * \brief Read and convert an unsigned 16-bit bigendian value. * * Convenience function. Read an unsigned 16-bit bigendian value from a * file and convert it to the platform's native byte order. * * \param file PhysicsFS file handle from which to read. * \param val pointer to where value should be stored. * \return zero on failure, non-zero on success. If successful, (*val) will * store the result. On failure, you can find out what went wrong * from PHYSFS_getLastErrorCode(). * */ PHYSFS_DECL int PHYSFS_readUBE16(PHYSFS_File *file, PHYSFS_uint16 *val); /** * \fn int PHYSFS_readSLE32(PHYSFS_File *file, PHYSFS_sint32 *val) * \brief Read and convert a signed 32-bit littleendian value. * * Convenience function. Read a signed 32-bit littleendian value from a * file and convert it to the platform's native byte order. * * \param file PhysicsFS file handle from which to read. * \param val pointer to where value should be stored. * \return zero on failure, non-zero on success. If successful, (*val) will * store the result. On failure, you can find out what went wrong * from PHYSFS_getLastErrorCode(). */ PHYSFS_DECL int PHYSFS_readSLE32(PHYSFS_File *file, PHYSFS_sint32 *val); /** * \fn int PHYSFS_readULE32(PHYSFS_File *file, PHYSFS_uint32 *val) * \brief Read and convert an unsigned 32-bit littleendian value. * * Convenience function. Read an unsigned 32-bit littleendian value from a * file and convert it to the platform's native byte order. * * \param file PhysicsFS file handle from which to read. * \param val pointer to where value should be stored. * \return zero on failure, non-zero on success. If successful, (*val) will * store the result. On failure, you can find out what went wrong * from PHYSFS_getLastErrorCode(). * */ PHYSFS_DECL int PHYSFS_readULE32(PHYSFS_File *file, PHYSFS_uint32 *val); /** * \fn int PHYSFS_readSBE32(PHYSFS_File *file, PHYSFS_sint32 *val) * \brief Read and convert a signed 32-bit bigendian value. * * Convenience function. Read a signed 32-bit bigendian value from a * file and convert it to the platform's native byte order. * * \param file PhysicsFS file handle from which to read. * \param val pointer to where value should be stored. * \return zero on failure, non-zero on success. If successful, (*val) will * store the result. On failure, you can find out what went wrong * from PHYSFS_getLastErrorCode(). */ PHYSFS_DECL int PHYSFS_readSBE32(PHYSFS_File *file, PHYSFS_sint32 *val); /** * \fn int PHYSFS_readUBE32(PHYSFS_File *file, PHYSFS_uint32 *val) * \brief Read and convert an unsigned 32-bit bigendian value. * * Convenience function. Read an unsigned 32-bit bigendian value from a * file and convert it to the platform's native byte order. * * \param file PhysicsFS file handle from which to read. * \param val pointer to where value should be stored. * \return zero on failure, non-zero on success. If successful, (*val) will * store the result. On failure, you can find out what went wrong * from PHYSFS_getLastErrorCode(). * */ PHYSFS_DECL int PHYSFS_readUBE32(PHYSFS_File *file, PHYSFS_uint32 *val); /** * \fn int PHYSFS_readSLE64(PHYSFS_File *file, PHYSFS_sint64 *val) * \brief Read and convert a signed 64-bit littleendian value. * * Convenience function. Read a signed 64-bit littleendian value from a * file and convert it to the platform's native byte order. * * \param file PhysicsFS file handle from which to read. * \param val pointer to where value should be stored. * \return zero on failure, non-zero on success. If successful, (*val) will * store the result. On failure, you can find out what went wrong * from PHYSFS_getLastErrorCode(). * * \warning Remember, PHYSFS_sint64 is only 32 bits on platforms without * any sort of 64-bit support. */ PHYSFS_DECL int PHYSFS_readSLE64(PHYSFS_File *file, PHYSFS_sint64 *val); /** * \fn int PHYSFS_readULE64(PHYSFS_File *file, PHYSFS_uint64 *val) * \brief Read and convert an unsigned 64-bit littleendian value. * * Convenience function. Read an unsigned 64-bit littleendian value from a * file and convert it to the platform's native byte order. * * \param file PhysicsFS file handle from which to read. * \param val pointer to where value should be stored. * \return zero on failure, non-zero on success. If successful, (*val) will * store the result. On failure, you can find out what went wrong * from PHYSFS_getLastErrorCode(). * * \warning Remember, PHYSFS_uint64 is only 32 bits on platforms without * any sort of 64-bit support. */ PHYSFS_DECL int PHYSFS_readULE64(PHYSFS_File *file, PHYSFS_uint64 *val); /** * \fn int PHYSFS_readSBE64(PHYSFS_File *file, PHYSFS_sint64 *val) * \brief Read and convert a signed 64-bit bigendian value. * * Convenience function. Read a signed 64-bit bigendian value from a * file and convert it to the platform's native byte order. * * \param file PhysicsFS file handle from which to read. * \param val pointer to where value should be stored. * \return zero on failure, non-zero on success. If successful, (*val) will * store the result. On failure, you can find out what went wrong * from PHYSFS_getLastErrorCode(). * * \warning Remember, PHYSFS_sint64 is only 32 bits on platforms without * any sort of 64-bit support. */ PHYSFS_DECL int PHYSFS_readSBE64(PHYSFS_File *file, PHYSFS_sint64 *val); /** * \fn int PHYSFS_readUBE64(PHYSFS_File *file, PHYSFS_uint64 *val) * \brief Read and convert an unsigned 64-bit bigendian value. * * Convenience function. Read an unsigned 64-bit bigendian value from a * file and convert it to the platform's native byte order. * * \param file PhysicsFS file handle from which to read. * \param val pointer to where value should be stored. * \return zero on failure, non-zero on success. If successful, (*val) will * store the result. On failure, you can find out what went wrong * from PHYSFS_getLastErrorCode(). * * \warning Remember, PHYSFS_uint64 is only 32 bits on platforms without * any sort of 64-bit support. */ PHYSFS_DECL int PHYSFS_readUBE64(PHYSFS_File *file, PHYSFS_uint64 *val); /** * \fn int PHYSFS_writeSLE16(PHYSFS_File *file, PHYSFS_sint16 val) * \brief Convert and write a signed 16-bit littleendian value. * * Convenience function. Convert a signed 16-bit value from the platform's * native byte order to littleendian and write it to a file. * * \param file PhysicsFS file handle to which to write. * \param val Value to convert and write. * \return zero on failure, non-zero on success. On failure, you can * find out what went wrong from PHYSFS_getLastErrorCode(). */ PHYSFS_DECL int PHYSFS_writeSLE16(PHYSFS_File *file, PHYSFS_sint16 val); /** * \fn int PHYSFS_writeULE16(PHYSFS_File *file, PHYSFS_uint16 val) * \brief Convert and write an unsigned 16-bit littleendian value. * * Convenience function. Convert an unsigned 16-bit value from the platform's * native byte order to littleendian and write it to a file. * * \param file PhysicsFS file handle to which to write. * \param val Value to convert and write. * \return zero on failure, non-zero on success. On failure, you can * find out what went wrong from PHYSFS_getLastErrorCode(). */ PHYSFS_DECL int PHYSFS_writeULE16(PHYSFS_File *file, PHYSFS_uint16 val); /** * \fn int PHYSFS_writeSBE16(PHYSFS_File *file, PHYSFS_sint16 val) * \brief Convert and write a signed 16-bit bigendian value. * * Convenience function. Convert a signed 16-bit value from the platform's * native byte order to bigendian and write it to a file. * * \param file PhysicsFS file handle to which to write. * \param val Value to convert and write. * \return zero on failure, non-zero on success. On failure, you can * find out what went wrong from PHYSFS_getLastErrorCode(). */ PHYSFS_DECL int PHYSFS_writeSBE16(PHYSFS_File *file, PHYSFS_sint16 val); /** * \fn int PHYSFS_writeUBE16(PHYSFS_File *file, PHYSFS_uint16 val) * \brief Convert and write an unsigned 16-bit bigendian value. * * Convenience function. Convert an unsigned 16-bit value from the platform's * native byte order to bigendian and write it to a file. * * \param file PhysicsFS file handle to which to write. * \param val Value to convert and write. * \return zero on failure, non-zero on success. On failure, you can * find out what went wrong from PHYSFS_getLastErrorCode(). */ PHYSFS_DECL int PHYSFS_writeUBE16(PHYSFS_File *file, PHYSFS_uint16 val); /** * \fn int PHYSFS_writeSLE32(PHYSFS_File *file, PHYSFS_sint32 val) * \brief Convert and write a signed 32-bit littleendian value. * * Convenience function. Convert a signed 32-bit value from the platform's * native byte order to littleendian and write it to a file. * * \param file PhysicsFS file handle to which to write. * \param val Value to convert and write. * \return zero on failure, non-zero on success. On failure, you can * find out what went wrong from PHYSFS_getLastErrorCode(). */ PHYSFS_DECL int PHYSFS_writeSLE32(PHYSFS_File *file, PHYSFS_sint32 val); /** * \fn int PHYSFS_writeULE32(PHYSFS_File *file, PHYSFS_uint32 val) * \brief Convert and write an unsigned 32-bit littleendian value. * * Convenience function. Convert an unsigned 32-bit value from the platform's * native byte order to littleendian and write it to a file. * * \param file PhysicsFS file handle to which to write. * \param val Value to convert and write. * \return zero on failure, non-zero on success. On failure, you can * find out what went wrong from PHYSFS_getLastErrorCode(). */ PHYSFS_DECL int PHYSFS_writeULE32(PHYSFS_File *file, PHYSFS_uint32 val); /** * \fn int PHYSFS_writeSBE32(PHYSFS_File *file, PHYSFS_sint32 val) * \brief Convert and write a signed 32-bit bigendian value. * * Convenience function. Convert a signed 32-bit value from the platform's * native byte order to bigendian and write it to a file. * * \param file PhysicsFS file handle to which to write. * \param val Value to convert and write. * \return zero on failure, non-zero on success. On failure, you can * find out what went wrong from PHYSFS_getLastErrorCode(). */ PHYSFS_DECL int PHYSFS_writeSBE32(PHYSFS_File *file, PHYSFS_sint32 val); /** * \fn int PHYSFS_writeUBE32(PHYSFS_File *file, PHYSFS_uint32 val) * \brief Convert and write an unsigned 32-bit bigendian value. * * Convenience function. Convert an unsigned 32-bit value from the platform's * native byte order to bigendian and write it to a file. * * \param file PhysicsFS file handle to which to write. * \param val Value to convert and write. * \return zero on failure, non-zero on success. On failure, you can * find out what went wrong from PHYSFS_getLastErrorCode(). */ PHYSFS_DECL int PHYSFS_writeUBE32(PHYSFS_File *file, PHYSFS_uint32 val); /** * \fn int PHYSFS_writeSLE64(PHYSFS_File *file, PHYSFS_sint64 val) * \brief Convert and write a signed 64-bit littleendian value. * * Convenience function. Convert a signed 64-bit value from the platform's * native byte order to littleendian and write it to a file. * * \param file PhysicsFS file handle to which to write. * \param val Value to convert and write. * \return zero on failure, non-zero on success. On failure, you can * find out what went wrong from PHYSFS_getLastErrorCode(). * * \warning Remember, PHYSFS_sint64 is only 32 bits on platforms without * any sort of 64-bit support. */ PHYSFS_DECL int PHYSFS_writeSLE64(PHYSFS_File *file, PHYSFS_sint64 val); /** * \fn int PHYSFS_writeULE64(PHYSFS_File *file, PHYSFS_uint64 val) * \brief Convert and write an unsigned 64-bit littleendian value. * * Convenience function. Convert an unsigned 64-bit value from the platform's * native byte order to littleendian and write it to a file. * * \param file PhysicsFS file handle to which to write. * \param val Value to convert and write. * \return zero on failure, non-zero on success. On failure, you can * find out what went wrong from PHYSFS_getLastErrorCode(). * * \warning Remember, PHYSFS_uint64 is only 32 bits on platforms without * any sort of 64-bit support. */ PHYSFS_DECL int PHYSFS_writeULE64(PHYSFS_File *file, PHYSFS_uint64 val); /** * \fn int PHYSFS_writeSBE64(PHYSFS_File *file, PHYSFS_sint64 val) * \brief Convert and write a signed 64-bit bigending value. * * Convenience function. Convert a signed 64-bit value from the platform's * native byte order to bigendian and write it to a file. * * \param file PhysicsFS file handle to which to write. * \param val Value to convert and write. * \return zero on failure, non-zero on success. On failure, you can * find out what went wrong from PHYSFS_getLastErrorCode(). * * \warning Remember, PHYSFS_sint64 is only 32 bits on platforms without * any sort of 64-bit support. */ PHYSFS_DECL int PHYSFS_writeSBE64(PHYSFS_File *file, PHYSFS_sint64 val); /** * \fn int PHYSFS_writeUBE64(PHYSFS_File *file, PHYSFS_uint64 val) * \brief Convert and write an unsigned 64-bit bigendian value. * * Convenience function. Convert an unsigned 64-bit value from the platform's * native byte order to bigendian and write it to a file. * * \param file PhysicsFS file handle to which to write. * \param val Value to convert and write. * \return zero on failure, non-zero on success. On failure, you can * find out what went wrong from PHYSFS_getLastErrorCode(). * * \warning Remember, PHYSFS_uint64 is only 32 bits on platforms without * any sort of 64-bit support. */ PHYSFS_DECL int PHYSFS_writeUBE64(PHYSFS_File *file, PHYSFS_uint64 val); /* Everything above this line is part of the PhysicsFS 1.0 API. */ /** * \fn int PHYSFS_isInit(void) * \brief Determine if the PhysicsFS library is initialized. * * Once PHYSFS_init() returns successfully, this will return non-zero. * Before a successful PHYSFS_init() and after PHYSFS_deinit() returns * successfully, this will return zero. This function is safe to call at * any time. * * \return non-zero if library is initialized, zero if library is not. * * \sa PHYSFS_init * \sa PHYSFS_deinit */ PHYSFS_DECL int PHYSFS_isInit(void); /** * \fn int PHYSFS_symbolicLinksPermitted(void) * \brief Determine if the symbolic links are permitted. * * This reports the setting from the last call to PHYSFS_permitSymbolicLinks(). * If PHYSFS_permitSymbolicLinks() hasn't been called since the library was * last initialized, symbolic links are implicitly disabled. * * \return non-zero if symlinks are permitted, zero if not. * * \sa PHYSFS_permitSymbolicLinks */ PHYSFS_DECL int PHYSFS_symbolicLinksPermitted(void); /** * \struct PHYSFS_Allocator * \brief PhysicsFS allocation function pointers. * * (This is for limited, hardcore use. If you don't immediately see a need * for it, you can probably ignore this forever.) * * You create one of these structures for use with PHYSFS_setAllocator. * Allocators are assumed to be reentrant by the caller; please mutex * accordingly. * * Allocations are always discussed in 64-bits, for future expansion...we're * on the cusp of a 64-bit transition, and we'll probably be allocating 6 * gigabytes like it's nothing sooner or later, and I don't want to change * this again at that point. If you're on a 32-bit platform and have to * downcast, it's okay to return NULL if the allocation is greater than * 4 gigabytes, since you'd have to do so anyhow. * * \sa PHYSFS_setAllocator */ typedef struct PHYSFS_Allocator { int (*Init)(void); /**< Initialize. Can be NULL. Zero on failure. */ void (*Deinit)(void); /**< Deinitialize your allocator. Can be NULL. */ void *(*Malloc)(PHYSFS_uint64); /**< Allocate like malloc(). */ void *(*Realloc)(void *, PHYSFS_uint64); /**< Reallocate like realloc(). */ void (*Free)(void *); /**< Free memory from Malloc or Realloc. */ } PHYSFS_Allocator; /** * \fn int PHYSFS_setAllocator(const PHYSFS_Allocator *allocator) * \brief Hook your own allocation routines into PhysicsFS. * * (This is for limited, hardcore use. If you don't immediately see a need * for it, you can probably ignore this forever.) * * By default, PhysicsFS will use whatever is reasonable for a platform * to manage dynamic memory (usually ANSI C malloc/realloc/free, but * some platforms might use something else), but in some uncommon cases, the * app might want more control over the library's memory management. This * lets you redirect PhysicsFS to use your own allocation routines instead. * You can only call this function before PHYSFS_init(); if the library is * initialized, it'll reject your efforts to change the allocator mid-stream. * You may call this function after PHYSFS_deinit() if you are willing to * shut down the library and restart it with a new allocator; this is a safe * and supported operation. The allocator remains intact between deinit/init * calls. If you want to return to the platform's default allocator, pass a * NULL in here. * * If you aren't immediately sure what to do with this function, you can * safely ignore it altogether. * * \param allocator Structure containing your allocator's entry points. * \return zero on failure, non-zero on success. This call only fails * when used between PHYSFS_init() and PHYSFS_deinit() calls. */ PHYSFS_DECL int PHYSFS_setAllocator(const PHYSFS_Allocator *allocator); /** * \fn int PHYSFS_mount(const char *newDir, const char *mountPoint, int appendToPath) * \brief Add an archive or directory to the search path. * * If this is a duplicate, the entry is not added again, even though the * function succeeds. You may not add the same archive to two different * mountpoints: duplicate checking is done against the archive and not the * mountpoint. * * When you mount an archive, it is added to a virtual file system...all files * in all of the archives are interpolated into a single hierachical file * tree. Two archives mounted at the same place (or an archive with files * overlapping another mountpoint) may have overlapping files: in such a case, * the file earliest in the search path is selected, and the other files are * inaccessible to the application. This allows archives to be used to * override previous revisions; you can use the mounting mechanism to place * archives at a specific point in the file tree and prevent overlap; this * is useful for downloadable mods that might trample over application data * or each other, for example. * * The mountpoint does not need to exist prior to mounting, which is different * than those familiar with the Unix concept of "mounting" may expect. * As well, more than one archive can be mounted to the same mountpoint, or * mountpoints and archive contents can overlap...the interpolation mechanism * still functions as usual. * * Specifying a symbolic link to an archive or directory is allowed here, * regardless of the state of PHYSFS_permitSymbolicLinks(). That function * only deals with symlinks inside the mounted directory or archive. * * \param newDir directory or archive to add to the path, in * platform-dependent notation. * \param mountPoint Location in the interpolated tree that this archive * will be "mounted", in platform-independent notation. * NULL or "" is equivalent to "/". * \param appendToPath nonzero to append to search path, zero to prepend. * \return nonzero if added to path, zero on failure (bogus archive, dir * missing, etc). Use PHYSFS_getLastErrorCode() to obtain * the specific error. * * \sa PHYSFS_removeFromSearchPath * \sa PHYSFS_getSearchPath * \sa PHYSFS_getMountPoint * \sa PHYSFS_mountIo */ PHYSFS_DECL int PHYSFS_mount(const char *newDir, const char *mountPoint, int appendToPath); /** * Just like mount() but attempts to open the directory for writing as well as * reading. */ PHYSFS_DECL int PHYSFS_mountRW(const char *newDir, const char *mountPoint, int appendToPath); /** * \fn int PHYSFS_getMountPoint(const char *dir) * \brief Determine a mounted archive's mountpoint. * * You give this function the name of an archive or dir you successfully * added to the search path, and it reports the location in the interpolated * tree where it is mounted. Files mounted with a NULL mountpoint or through * PHYSFS_addToSearchPath() will report "/". The return value is READ ONLY * and valid until the archive is removed from the search path. * * \param dir directory or archive previously added to the path, in * platform-dependent notation. This must match the string * used when adding, even if your string would also reference * the same file with a different string of characters. * \return READ-ONLY string of mount point if added to path, NULL on failure * (bogus archive, etc). Use PHYSFS_getLastErrorCode() to obtain the * specific error. * * \sa PHYSFS_removeFromSearchPath * \sa PHYSFS_getSearchPath * \sa PHYSFS_getMountPoint */ PHYSFS_DECL const char *PHYSFS_getMountPoint(const char *dir); /** * \typedef PHYSFS_StringCallback * \brief Function signature for callbacks that report strings. * * These are used to report a list of strings to an original caller, one * string per callback. All strings are UTF-8 encoded. Functions should not * try to modify or free the string's memory. * * These callbacks are used, starting in PhysicsFS 1.1, as an alternative to * functions that would return lists that need to be cleaned up with * PHYSFS_freeList(). The callback means that the library doesn't need to * allocate an entire list and all the strings up front. * * Be aware that promises data ordering in the list versions are not * necessarily so in the callback versions. Check the documentation on * specific APIs, but strings may not be sorted as you expect. * * \param data User-defined data pointer, passed through from the API * that eventually called the callback. * \param str The string data about which the callback is meant to inform. * * \sa PHYSFS_getCdRomDirsCallback * \sa PHYSFS_getSearchPathCallback */ typedef void (*PHYSFS_StringCallback)(void *data, const char *str); /** * \typedef PHYSFS_EnumFilesCallback * \brief Function signature for callbacks that enumerate files. * * \warning As of PhysicsFS 2.1, Use PHYSFS_EnumerateCallback with * PHYSFS_enumerate() instead; it gives you more control over the process. * * These are used to report a list of directory entries to an original caller, * one file/dir/symlink per callback. All strings are UTF-8 encoded. * Functions should not try to modify or free any string's memory. * * These callbacks are used, starting in PhysicsFS 1.1, as an alternative to * functions that would return lists that need to be cleaned up with * PHYSFS_freeList(). The callback means that the library doesn't need to * allocate an entire list and all the strings up front. * * Be aware that promised data ordering in the list versions are not * necessarily so in the callback versions. Check the documentation on * specific APIs, but strings may not be sorted as you expect and you might * get duplicate strings. * * \param data User-defined data pointer, passed through from the API * that eventually called the callback. * \param origdir A string containing the full path, in platform-independent * notation, of the directory containing this file. In most * cases, this is the directory on which you requested * enumeration, passed in the callback for your convenience. * \param fname The filename that is being enumerated. It may not be in * alphabetical order compared to other callbacks that have * fired, and it will not contain the full path. You can * recreate the fullpath with $origdir/$fname ... The file * can be a subdirectory, a file, a symlink, etc. * * \sa PHYSFS_enumerateFilesCallback */ typedef void (*PHYSFS_EnumFilesCallback)(void *data, const char *origdir, const char *fname); /** * \fn void PHYSFS_getCdRomDirsCallback(PHYSFS_StringCallback c, void *d) * \brief Enumerate CD-ROM directories, using an application-defined callback. * * Internally, PHYSFS_getCdRomDirs() just calls this function and then builds * a list before returning to the application, so functionality is identical * except for how the information is represented to the application. * * Unlike PHYSFS_getCdRomDirs(), this function does not return an array. * Rather, it calls a function specified by the application once per * detected disc: * * \code * * static void foundDisc(void *data, const char *cddir) * { * printf("cdrom dir [%s] is available.\n", cddir); * } * * // ... * PHYSFS_getCdRomDirsCallback(foundDisc, NULL); * \endcode * * This call may block while drives spin up. Be forewarned. * * \param c Callback function to notify about detected drives. * \param d Application-defined data passed to callback. Can be NULL. * * \sa PHYSFS_StringCallback * \sa PHYSFS_getCdRomDirs */ PHYSFS_DECL void PHYSFS_getCdRomDirsCallback(PHYSFS_StringCallback c, void *d); /** * \fn void PHYSFS_getSearchPathCallback(PHYSFS_StringCallback c, void *d) * \brief Enumerate the search path, using an application-defined callback. * * Internally, PHYSFS_getSearchPath() just calls this function and then builds * a list before returning to the application, so functionality is identical * except for how the information is represented to the application. * * Unlike PHYSFS_getSearchPath(), this function does not return an array. * Rather, it calls a function specified by the application once per * element of the search path: * * \code * * static void printSearchPath(void *data, const char *pathItem) * { * printf("[%s] is in the search path.\n", pathItem); * } * * // ... * PHYSFS_getSearchPathCallback(printSearchPath, NULL); * \endcode * * Elements of the search path are reported in order search priority, so the * first archive/dir that would be examined when looking for a file is the * first element passed through the callback. * * \param c Callback function to notify about search path elements. * \param d Application-defined data passed to callback. Can be NULL. * * \sa PHYSFS_StringCallback * \sa PHYSFS_getSearchPath */ PHYSFS_DECL void PHYSFS_getSearchPathCallback(PHYSFS_StringCallback c, void *d); /** * \fn void PHYSFS_enumerateFilesCallback(const char *dir, PHYSFS_EnumFilesCallback c, void *d) * \brief Get a file listing of a search path's directory, using an application-defined callback. * * \deprecated As of PhysicsFS 2.1, use PHYSFS_enumerate() instead. This * function has no way to report errors (or to have the callback signal an * error or request a stop), so if data will be lost, your callback has no * way to direct the process, and your calling app has no way to know. * * As of PhysicsFS 2.1, this function just wraps PHYSFS_enumerate() and * ignores errors. Consider using PHYSFS_enumerate() or * PHYSFS_enumerateFiles() instead. * * \sa PHYSFS_enumerate * \sa PHYSFS_enumerateFiles * \sa PHYSFS_EnumFilesCallback */ PHYSFS_DECL void PHYSFS_enumerateFilesCallback(const char *dir, PHYSFS_EnumFilesCallback c, void *d) PHYSFS_DEPRECATED; /** * \fn void PHYSFS_utf8FromUcs4(const PHYSFS_uint32 *src, char *dst, PHYSFS_uint64 len) * \brief Convert a UCS-4 string to a UTF-8 string. * * \warning This function will not report an error if there are invalid UCS-4 * values in the source string. It will replace them with a '?' * character and continue on. * * UCS-4 (aka UTF-32) strings are 32-bits per character: \c wchar_t on Unix. * * To ensure that the destination buffer is large enough for the conversion, * please allocate a buffer that is the same size as the source buffer. UTF-8 * never uses more than 32-bits per character, so while it may shrink a UCS-4 * string, it will never expand it. * * Strings that don't fit in the destination buffer will be truncated, but * will always be null-terminated and never have an incomplete UTF-8 * sequence at the end. If the buffer length is 0, this function does nothing. * * \param src Null-terminated source string in UCS-4 format. * \param dst Buffer to store converted UTF-8 string. * \param len Size, in bytes, of destination buffer. */ PHYSFS_DECL void PHYSFS_utf8FromUcs4(const PHYSFS_uint32 *src, char *dst, PHYSFS_uint64 len); /** * \fn void PHYSFS_utf8ToUcs4(const char *src, PHYSFS_uint32 *dst, PHYSFS_uint64 len) * \brief Convert a UTF-8 string to a UCS-4 string. * * \warning This function will not report an error if there are invalid UTF-8 * sequences in the source string. It will replace them with a '?' * character and continue on. * * UCS-4 (aka UTF-32) strings are 32-bits per character: \c wchar_t on Unix. * * To ensure that the destination buffer is large enough for the conversion, * please allocate a buffer that is four times the size of the source buffer. * UTF-8 uses from one to four bytes per character, but UCS-4 always uses * four, so an entirely low-ASCII string will quadruple in size! * * Strings that don't fit in the destination buffer will be truncated, but * will always be null-terminated and never have an incomplete UCS-4 * sequence at the end. If the buffer length is 0, this function does nothing. * * \param src Null-terminated source string in UTF-8 format. * \param dst Buffer to store converted UCS-4 string. * \param len Size, in bytes, of destination buffer. */ PHYSFS_DECL void PHYSFS_utf8ToUcs4(const char *src, PHYSFS_uint32 *dst, PHYSFS_uint64 len); /** * \fn void PHYSFS_utf8FromUcs2(const PHYSFS_uint16 *src, char *dst, PHYSFS_uint64 len) * \brief Convert a UCS-2 string to a UTF-8 string. * * \warning you almost certainly should use PHYSFS_utf8FromUtf16(), which * became available in PhysicsFS 2.1, unless you know what you're doing. * * \warning This function will not report an error if there are invalid UCS-2 * values in the source string. It will replace them with a '?' * character and continue on. * * UCS-2 strings are 16-bits per character: \c TCHAR on Windows, when building * with Unicode support. Please note that modern versions of Windows use * UTF-16, which is an extended form of UCS-2, and not UCS-2 itself. You * almost certainly want PHYSFS_utf8FromUtf16() instead. * * To ensure that the destination buffer is large enough for the conversion, * please allocate a buffer that is double the size of the source buffer. * UTF-8 never uses more than 32-bits per character, so while it may shrink * a UCS-2 string, it may also expand it. * * Strings that don't fit in the destination buffer will be truncated, but * will always be null-terminated and never have an incomplete UTF-8 * sequence at the end. If the buffer length is 0, this function does nothing. * * \param src Null-terminated source string in UCS-2 format. * \param dst Buffer to store converted UTF-8 string. * \param len Size, in bytes, of destination buffer. * * \sa PHYSFS_utf8FromUtf16 */ PHYSFS_DECL void PHYSFS_utf8FromUcs2(const PHYSFS_uint16 *src, char *dst, PHYSFS_uint64 len); /** * \fn PHYSFS_utf8ToUcs2(const char *src, PHYSFS_uint16 *dst, PHYSFS_uint64 len) * \brief Convert a UTF-8 string to a UCS-2 string. * * \warning you almost certainly should use PHYSFS_utf8ToUtf16(), which * became available in PhysicsFS 2.1, unless you know what you're doing. * * \warning This function will not report an error if there are invalid UTF-8 * sequences in the source string. It will replace them with a '?' * character and continue on. * * UCS-2 strings are 16-bits per character: \c TCHAR on Windows, when building * with Unicode support. Please note that modern versions of Windows use * UTF-16, which is an extended form of UCS-2, and not UCS-2 itself. You * almost certainly want PHYSFS_utf8ToUtf16() instead, but you need to * understand how that changes things, too. * * To ensure that the destination buffer is large enough for the conversion, * please allocate a buffer that is double the size of the source buffer. * UTF-8 uses from one to four bytes per character, but UCS-2 always uses * two, so an entirely low-ASCII string will double in size! * * Strings that don't fit in the destination buffer will be truncated, but * will always be null-terminated and never have an incomplete UCS-2 * sequence at the end. If the buffer length is 0, this function does nothing. * * \param src Null-terminated source string in UTF-8 format. * \param dst Buffer to store converted UCS-2 string. * \param len Size, in bytes, of destination buffer. * * \sa PHYSFS_utf8ToUtf16 */ PHYSFS_DECL void PHYSFS_utf8ToUcs2(const char *src, PHYSFS_uint16 *dst, PHYSFS_uint64 len); /** * \fn void PHYSFS_utf8FromLatin1(const char *src, char *dst, PHYSFS_uint64 len) * \brief Convert a UTF-8 string to a Latin1 string. * * Latin1 strings are 8-bits per character: a popular "high ASCII" encoding. * * To ensure that the destination buffer is large enough for the conversion, * please allocate a buffer that is double the size of the source buffer. * UTF-8 expands latin1 codepoints over 127 from 1 to 2 bytes, so the string * may grow in some cases. * * Strings that don't fit in the destination buffer will be truncated, but * will always be null-terminated and never have an incomplete UTF-8 * sequence at the end. If the buffer length is 0, this function does nothing. * * Please note that we do not supply a UTF-8 to Latin1 converter, since Latin1 * can't express most Unicode codepoints. It's a legacy encoding; you should * be converting away from it at all times. * * \param src Null-terminated source string in Latin1 format. * \param dst Buffer to store converted UTF-8 string. * \param len Size, in bytes, of destination buffer. */ PHYSFS_DECL void PHYSFS_utf8FromLatin1(const char *src, char *dst, PHYSFS_uint64 len); /* Everything above this line is part of the PhysicsFS 2.0 API. */ /** * \fn int PHYSFS_caseFold(const PHYSFS_uint32 from, PHYSFS_uint32 *to) * \brief "Fold" a Unicode codepoint to a lowercase equivalent. * * (This is for limited, hardcore use. If you don't immediately see a need * for it, you can probably ignore this forever.) * * This will convert a Unicode codepoint into its lowercase equivalent. * Bogus codepoints and codepoints without a lowercase equivalent will * be returned unconverted. * * Note that you might get multiple codepoints in return! The German Eszett, * for example, will fold down to two lowercase latin 's' codepoints. The * theory is that if you fold two strings, one with an Eszett and one with * "SS" down, they will match. * * \warning Anyone that is a student of Unicode knows about the "Turkish I" * problem. This API does not handle it. Assume this one letter * in all of Unicode will definitely fold sort of incorrectly. If * you don't know what this is about, you can probably ignore this * problem for most of the planet, but perfection is impossible. * * \param from The codepoint to fold. * \param to Buffer to store the folded codepoint values into. This should * point to space for at least 3 PHYSFS_uint32 slots. * \return The number of codepoints the folding produced. Between 1 and 3. */ PHYSFS_DECL int PHYSFS_caseFold(const PHYSFS_uint32 from, PHYSFS_uint32 *to); /** * \fn int PHYSFS_utf8stricmp(const char *str1, const char *str2) * \brief Case-insensitive compare of two UTF-8 strings. * * This is a strcasecmp/stricmp replacement that expects both strings * to be in UTF-8 encoding. It will do "case folding" to decide if the * Unicode codepoints in the strings match. * * If both strings are exclusively low-ASCII characters, this will do the * right thing, as that is also valid UTF-8. If there are any high-ASCII * chars, this will not do what you expect! * * It will report which string is "greater than" the other, but be aware that * this doesn't necessarily mean anything: 'a' may be "less than" 'b', but * a Japanese kuten has no meaningful alphabetically relationship to * a Greek lambda, but being able to assign a reliable "value" makes sorting * algorithms possible, if not entirely sane. Most cases should treat the * return value as "equal" or "not equal". * * Like stricmp, this expects both strings to be NULL-terminated. * * \param str1 First string to compare. * \param str2 Second string to compare. * \return -1 if str1 is "less than" str2, 1 if "greater than", 0 if equal. */ PHYSFS_DECL int PHYSFS_utf8stricmp(const char *str1, const char *str2); /** * \fn int PHYSFS_utf16stricmp(const PHYSFS_uint16 *str1, const PHYSFS_uint16 *str2) * \brief Case-insensitive compare of two UTF-16 strings. * * This is a strcasecmp/stricmp replacement that expects both strings * to be in UTF-16 encoding. It will do "case folding" to decide if the * Unicode codepoints in the strings match. * * It will report which string is "greater than" the other, but be aware that * this doesn't necessarily mean anything: 'a' may be "less than" 'b', but * a Japanese kuten has no meaningful alphabetically relationship to * a Greek lambda, but being able to assign a reliable "value" makes sorting * algorithms possible, if not entirely sane. Most cases should treat the * return value as "equal" or "not equal". * * Like stricmp, this expects both strings to be NULL-terminated. * * \param str1 First string to compare. * \param str2 Second string to compare. * \return -1 if str1 is "less than" str2, 1 if "greater than", 0 if equal. */ PHYSFS_DECL int PHYSFS_utf16stricmp(const PHYSFS_uint16 *str1, const PHYSFS_uint16 *str2); /** * \fn int PHYSFS_ucs4stricmp(const PHYSFS_uint32 *str1, const PHYSFS_uint32 *str2) * \brief Case-insensitive compare of two UCS-4 strings. * * This is a strcasecmp/stricmp replacement that expects both strings * to be in UCS-4 (aka UTF-32) encoding. It will do "case folding" to decide * if the Unicode codepoints in the strings match. * * It will report which string is "greater than" the other, but be aware that * this doesn't necessarily mean anything: 'a' may be "less than" 'b', but * a Japanese kuten has no meaningful alphabetically relationship to * a Greek lambda, but being able to assign a reliable "value" makes sorting * algorithms possible, if not entirely sane. Most cases should treat the * return value as "equal" or "not equal". * * Like stricmp, this expects both strings to be NULL-terminated. * * \param str1 First string to compare. * \param str2 Second string to compare. * \return -1 if str1 is "less than" str2, 1 if "greater than", 0 if equal. */ PHYSFS_DECL int PHYSFS_ucs4stricmp(const PHYSFS_uint32 *str1, const PHYSFS_uint32 *str2); /** * \typedef PHYSFS_EnumerateCallback * \brief Possible return values from PHYSFS_EnumerateCallback. * * These values dictate if an enumeration callback should continue to fire, * or stop (and why it is stopping). * * \sa PHYSFS_EnumerateCallback * \sa PHYSFS_enumerate */ typedef enum PHYSFS_EnumerateCallbackResult { PHYSFS_ENUM_ERROR = -1, /**< Stop enumerating, report error to app. */ PHYSFS_ENUM_STOP = 0, /**< Stop enumerating, report success to app. */ PHYSFS_ENUM_OK = 1 /**< Keep enumerating, no problems */ } PHYSFS_EnumerateCallbackResult; /** * \typedef PHYSFS_EnumerateCallback * \brief Function signature for callbacks that enumerate and return results. * * This is the same thing as PHYSFS_EnumFilesCallback from PhysicsFS 2.0, * except it can return a result from the callback: namely: if you're looking * for something specific, once you find it, you can tell PhysicsFS to stop * enumerating further. This is used with PHYSFS_enumerate(), which we * hopefully got right this time. :) * * \param data User-defined data pointer, passed through from the API * that eventually called the callback. * \param origdir A string containing the full path, in platform-independent * notation, of the directory containing this file. In most * cases, this is the directory on which you requested * enumeration, passed in the callback for your convenience. * \param fname The filename that is being enumerated. It may not be in * alphabetical order compared to other callbacks that have * fired, and it will not contain the full path. You can * recreate the fullpath with $origdir/$fname ... The file * can be a subdirectory, a file, a symlink, etc. * \return A value from PHYSFS_EnumerateCallbackResult. * All other values are (currently) undefined; don't use them. * * \sa PHYSFS_enumerate * \sa PHYSFS_EnumerateCallbackResult */ typedef PHYSFS_EnumerateCallbackResult (*PHYSFS_EnumerateCallback)(void *data, const char *origdir, const char *fname); /** * \fn int PHYSFS_enumerate(const char *dir, PHYSFS_EnumerateCallback c, void *d) * \brief Get a file listing of a search path's directory, using an application-defined callback, with errors reported. * * Internally, PHYSFS_enumerateFiles() just calls this function and then builds * a list before returning to the application, so functionality is identical * except for how the information is represented to the application. * * Unlike PHYSFS_enumerateFiles(), this function does not return an array. * Rather, it calls a function specified by the application once per * element of the search path: * * \code * * static PHYSFS_EnumerateCallbackResult printDir(void *data, const char *origdir, const char *fname) * { * printf(" * We've got [%s] in [%s].\n", fname, origdir); * return PHYSFS_ENUM_OK; // give me more data, please. * } * * // ... * PHYSFS_enumerate("/some/path", printDir, NULL); * \endcode * * Items sent to the callback are not guaranteed to be in any order whatsoever. * There is no sorting done at this level, and if you need that, you should * probably use PHYSFS_enumerateFiles() instead, which guarantees * alphabetical sorting. This form reports whatever is discovered in each * archive before moving on to the next. Even within one archive, we can't * guarantee what order it will discover data. Any sorting you find in * these callbacks is just pure luck. Do not rely on it. As this walks * the entire list of archives, you may receive duplicate filenames. * * This API and the callbacks themselves are capable of reporting errors. * Prior to this API, callbacks had to accept every enumerated item, even if * they were only looking for a specific thing and wanted to stop after that, * or had a serious error and couldn't alert anyone. Furthermore, if * PhysicsFS itself had a problem (disk error or whatnot), it couldn't report * it to the calling app, it would just have to skip items or stop * enumerating outright, and the caller wouldn't know it had lost some data * along the way. * * Now the caller can be sure it got a complete data set, and its callback has * control if it wants enumeration to stop early. See the documentation for * PHYSFS_EnumerateCallback for details on how your callback should behave. * * \param dir Directory, in platform-independent notation, to enumerate. * \param c Callback function to notify about search path elements. * \param d Application-defined data passed to callback. Can be NULL. * \return non-zero on success, zero on failure. Use * PHYSFS_getLastErrorCode() to obtain the specific error. If the * callback returns PHYSFS_ENUM_STOP to stop early, this will be * considered success. Callbacks returning PHYSFS_ENUM_ERROR will * make this function return zero and set the error code to * PHYSFS_ERR_APP_CALLBACK. * * \sa PHYSFS_EnumerateCallback * \sa PHYSFS_enumerateFiles */ PHYSFS_DECL int PHYSFS_enumerate(const char *dir, PHYSFS_EnumerateCallback c, void *d); /** * \fn int PHYSFS_unmount(const char *oldDir) * \brief Remove a directory or archive from the search path. * * This is functionally equivalent to PHYSFS_removeFromSearchPath(), but that * function is deprecated to keep the vocabulary paired with PHYSFS_mount(). * * This must be a (case-sensitive) match to a dir or archive already in the * search path, specified in platform-dependent notation. * * This call will fail (and fail to remove from the path) if the element still * has files open in it. * * \warning This function wants the path to the archive or directory that was * mounted (the same string used for the "newDir" argument of * PHYSFS_addToSearchPath or any of the mount functions), not the * path where it is mounted in the tree (the "mountPoint" argument * to any of the mount functions). * * \param oldDir dir/archive to remove. * \return nonzero on success, zero on failure. Use * PHYSFS_getLastErrorCode() to obtain the specific error. * * \sa PHYSFS_getSearchPath * \sa PHYSFS_mount */ PHYSFS_DECL int PHYSFS_unmount(const char *oldDir); /** * \fn int PHYSFS_canUnmount(const char *oldDir) * \brief Check whether a directory or archive can be unmounted. */ PHYSFS_DECL int PHYSFS_canUnmount(const char *oldDir); /** * \fn const PHYSFS_Allocator *PHYSFS_getAllocator(void) * \brief Discover the current allocator. * * (This is for limited, hardcore use. If you don't immediately see a need * for it, you can probably ignore this forever.) * * This function exposes the function pointers that make up the currently used * allocator. This can be useful for apps that want to access PhysicsFS's * internal, default allocation routines, as well as for external code that * wants to share the same allocator, even if the application specified their * own. * * This call is only valid between PHYSFS_init() and PHYSFS_deinit() calls; * it will return NULL if the library isn't initialized. As we can't * guarantee the state of the internal allocators unless the library is * initialized, you shouldn't use any allocator returned here after a call * to PHYSFS_deinit(). * * Do not call the returned allocator's Init() or Deinit() methods under any * circumstances. * * If you aren't immediately sure what to do with this function, you can * safely ignore it altogether. * * \return Current allocator, as set by PHYSFS_setAllocator(), or PhysicsFS's * internal, default allocator if no application defined allocator * is currently set. Will return NULL if the library is not * initialized. * * \sa PHYSFS_Allocator * \sa PHYSFS_setAllocator */ PHYSFS_DECL const PHYSFS_Allocator *PHYSFS_getAllocator(void); /** * \enum PHYSFS_FileType * \brief Type of a File * * Possible types of a file. * * \sa PHYSFS_stat */ typedef enum PHYSFS_FileType { PHYSFS_FILETYPE_REGULAR, /**< a normal file */ PHYSFS_FILETYPE_DIRECTORY, /**< a directory */ PHYSFS_FILETYPE_SYMLINK, /**< a symlink */ PHYSFS_FILETYPE_OTHER /**< something completely different like a device */ } PHYSFS_FileType; /** * \struct PHYSFS_Stat * \brief Meta data for a file or directory * * Container for various meta data about a file in the virtual file system. * PHYSFS_stat() uses this structure for returning the information. The time * data will be either the number of seconds since the Unix epoch (midnight, * Jan 1, 1970), or -1 if the information isn't available or applicable. * The (filesize) field is measured in bytes. * The (readonly) field tells you whether the archive thinks a file is * not writable, but tends to be only an estimate (for example, your write * dir might overlap with a .zip file, meaning you _can_ successfully open * that path for writing, as it gets created elsewhere. * * \sa PHYSFS_stat * \sa PHYSFS_FileType */ typedef struct PHYSFS_Stat { PHYSFS_sint64 filesize; /**< size in bytes, -1 for non-files and unknown */ PHYSFS_sint64 modtime; /**< last modification time */ PHYSFS_sint64 createtime; /**< like modtime, but for file creation time */ PHYSFS_sint64 accesstime; /**< like modtime, but for file access time */ PHYSFS_FileType filetype; /**< File? Directory? Symlink? */ int readonly; /**< non-zero if read only, zero if writable. */ } PHYSFS_Stat; /** * \fn int PHYSFS_stat(const char *fname, PHYSFS_Stat *stat) * \brief Get various information about a directory or a file. * * Obtain various information about a file or directory from the meta data. * * This function will never follow symbolic links. If you haven't enabled * symlinks with PHYSFS_permitSymbolicLinks(), stat'ing a symlink will be * treated like stat'ing a non-existant file. If symlinks are enabled, * stat'ing a symlink will give you information on the link itself and not * what it points to. * * \param fname filename to check, in platform-indepedent notation. * \param stat pointer to structure to fill in with data about (fname). * \return non-zero on success, zero on failure. On failure, (stat)'s * contents are undefined. * * \sa PHYSFS_Stat */ PHYSFS_DECL int PHYSFS_stat(const char *fname, PHYSFS_Stat *stat); /** * \fn void PHYSFS_utf8FromUtf16(const PHYSFS_uint16 *src, char *dst, PHYSFS_uint64 len) * \brief Convert a UTF-16 string to a UTF-8 string. * * \warning This function will not report an error if there are invalid UTF-16 * sequences in the source string. It will replace them with a '?' * character and continue on. * * UTF-16 strings are 16-bits per character (except some chars, which are * 32-bits): \c TCHAR on Windows, when building with Unicode support. Modern * Windows releases use UTF-16. Windows releases before 2000 used TCHAR, but * only handled UCS-2. UTF-16 _is_ UCS-2, except for the characters that * are 4 bytes, which aren't representable in UCS-2 at all anyhow. If you * aren't sure, you should be using UTF-16 at this point on Windows. * * To ensure that the destination buffer is large enough for the conversion, * please allocate a buffer that is double the size of the source buffer. * UTF-8 never uses more than 32-bits per character, so while it may shrink * a UTF-16 string, it may also expand it. * * Strings that don't fit in the destination buffer will be truncated, but * will always be null-terminated and never have an incomplete UTF-8 * sequence at the end. If the buffer length is 0, this function does nothing. * * \param src Null-terminated source string in UTF-16 format. * \param dst Buffer to store converted UTF-8 string. * \param len Size, in bytes, of destination buffer. */ PHYSFS_DECL void PHYSFS_utf8FromUtf16(const PHYSFS_uint16 *src, char *dst, PHYSFS_uint64 len); /** * \fn PHYSFS_utf8ToUtf16(const char *src, PHYSFS_uint16 *dst, PHYSFS_uint64 len) * \brief Convert a UTF-8 string to a UTF-16 string. * * \warning This function will not report an error if there are invalid UTF-8 * sequences in the source string. It will replace them with a '?' * character and continue on. * * UTF-16 strings are 16-bits per character (except some chars, which are * 32-bits): \c TCHAR on Windows, when building with Unicode support. Modern * Windows releases use UTF-16. Windows releases before 2000 used TCHAR, but * only handled UCS-2. UTF-16 _is_ UCS-2, except for the characters that * are 4 bytes, which aren't representable in UCS-2 at all anyhow. If you * aren't sure, you should be using UTF-16 at this point on Windows. * * To ensure that the destination buffer is large enough for the conversion, * please allocate a buffer that is double the size of the source buffer. * UTF-8 uses from one to four bytes per character, but UTF-16 always uses * two to four, so an entirely low-ASCII string will double in size! The * UTF-16 characters that would take four bytes also take four bytes in UTF-8, * so you don't need to allocate 4x the space just in case: double will do. * * Strings that don't fit in the destination buffer will be truncated, but * will always be null-terminated and never have an incomplete UTF-16 * surrogate pair at the end. If the buffer length is 0, this function does * nothing. * * \param src Null-terminated source string in UTF-8 format. * \param dst Buffer to store converted UTF-16 string. * \param len Size, in bytes, of destination buffer. * * \sa PHYSFS_utf8ToUtf16 */ PHYSFS_DECL void PHYSFS_utf8ToUtf16(const char *src, PHYSFS_uint16 *dst, PHYSFS_uint64 len); /** * \fn PHYSFS_sint64 PHYSFS_readBytes(PHYSFS_File *handle, void *buffer, PHYSFS_uint64 len) * \brief Read bytes from a PhysicsFS filehandle * * The file must be opened for reading. * * \param handle handle returned from PHYSFS_openRead(). * \param buffer buffer of at least (len) bytes to store read data into. * \param len number of bytes being read from (handle). * \return number of bytes read. This may be less than (len); this does not * signify an error, necessarily (a short read may mean EOF). * PHYSFS_getLastErrorCode() can shed light on the reason this might * be < (len), as can PHYSFS_eof(). -1 if complete failure. * * \sa PHYSFS_eof */ PHYSFS_DECL PHYSFS_sint64 PHYSFS_readBytes(PHYSFS_File *handle, void *buffer, PHYSFS_uint64 len); /** * \fn PHYSFS_sint64 PHYSFS_writeBytes(PHYSFS_File *handle, const void *buffer, PHYSFS_uint64 len) * \brief Write data to a PhysicsFS filehandle * * The file must be opened for writing. * * Please note that while (len) is an unsigned 64-bit integer, you are limited * to 63 bits (9223372036854775807 bytes), so we can return a negative value * on error. If length is greater than 0x7FFFFFFFFFFFFFFF, this function will * immediately fail. For systems without a 64-bit datatype, you are limited * to 31 bits (0x7FFFFFFF, or 2147483647 bytes). We trust most things won't * need to do multiple gigabytes of i/o in one call anyhow, but why limit * things? * * \param handle retval from PHYSFS_openWrite() or PHYSFS_openAppend(). * \param buffer buffer of (len) bytes to write to (handle). * \param len number of bytes being written to (handle). * \return number of bytes written. This may be less than (len); in the case * of an error, the system may try to write as many bytes as possible, * so an incomplete write might occur. PHYSFS_getLastErrorCode() can * shed light on the reason this might be < (len). -1 if complete * failure. */ PHYSFS_DECL PHYSFS_sint64 PHYSFS_writeBytes(PHYSFS_File *handle, const void *buffer, PHYSFS_uint64 len); /** * \struct PHYSFS_Io * \brief An abstract i/o interface. * * \warning This is advanced, hardcore stuff. You don't need this unless you * really know what you're doing. Most apps will not need this. * * Historically, PhysicsFS provided access to the physical filesystem and * archives within that filesystem. However, sometimes you need more power * than this. Perhaps you need to provide an archive that is entirely * contained in RAM, or you need to bridge some other file i/o API to * PhysicsFS, or you need to translate the bits (perhaps you have a * a standard .zip file that's encrypted, and you need to decrypt on the fly * for the unsuspecting zip archiver). * * A PHYSFS_Io is the interface that Archivers use to get archive data. * Historically, this has mapped to file i/o to the physical filesystem, but * as of PhysicsFS 2.1, applications can provide their own i/o implementations * at runtime. * * This interface isn't necessarily a good universal fit for i/o. There are a * few requirements of note: * * - They only do blocking i/o (at least, for now). * - They need to be able to duplicate. If you have a file handle from * fopen(), you need to be able to create a unique clone of it (so we * have two handles to the same file that can both seek/read/etc without * stepping on each other). * - They need to know the size of their entire data set. * - They need to be able to seek and rewind on demand. * * ...in short, you're probably not going to write an HTTP implementation. * * Thread safety: PHYSFS_Io implementations are not guaranteed to be thread * safe in themselves. Under the hood where PhysicsFS uses them, the library * provides its own locks. If you plan to use them directly from separate * threads, you should either use mutexes to protect them, or don't use the * same PHYSFS_Io from two threads at the same time. * * \sa PHYSFS_mountIo */ typedef struct PHYSFS_Io { /** * \brief Binary compatibility information. * * This must be set to zero at this time. Future versions of this * struct will increment this field, so we know what a given * implementation supports. We'll presumably keep supporting older * versions as we offer new features, though. */ PHYSFS_uint32 version; /** * \brief Instance data for this struct. * * Each instance has a pointer associated with it that can be used to * store anything it likes. This pointer is per-instance of the stream, * so presumably it will change when calling duplicate(). This can be * deallocated during the destroy() method. */ void *opaque; /** * \brief Read more data. * * Read (len) bytes from the interface, at the current i/o position, and * store them in (buffer). The current i/o position should move ahead * by the number of bytes successfully read. * * You don't have to implement this; set it to NULL if not implemented. * This will only be used if the file is opened for reading. If set to * NULL, a default implementation that immediately reports failure will * be used. * * \param io The i/o instance to read from. * \param buf The buffer to store data into. It must be at least * (len) bytes long and can't be NULL. * \param len The number of bytes to read from the interface. * \return number of bytes read from file, 0 on EOF, -1 if complete * failure. */ PHYSFS_sint64 (*read)(struct PHYSFS_Io *io, void *buf, PHYSFS_uint64 len); /** * \brief Write more data. * * Write (len) bytes from (buffer) to the interface at the current i/o * position. The current i/o position should move ahead by the number of * bytes successfully written. * * You don't have to implement this; set it to NULL if not implemented. * This will only be used if the file is opened for writing. If set to * NULL, a default implementation that immediately reports failure will * be used. * * You are allowed to buffer; a write can succeed here and then later * fail when flushing. Note that PHYSFS_setBuffer() may be operating a * level above your i/o, so you should usually not implement your * own buffering routines. * * \param io The i/o instance to write to. * \param buffer The buffer to read data from. It must be at least * (len) bytes long and can't be NULL. * \param len The number of bytes to read from (buffer). * \return number of bytes written to file, -1 if complete failure. */ PHYSFS_sint64 (*write)(struct PHYSFS_Io *io, const void *buffer, PHYSFS_uint64 len); /** * \brief Move i/o position to a given byte offset from start. * * This method moves the i/o position, so the next read/write will * be of the byte at (offset) offset. Seeks past the end of file should * be treated as an error condition. * * \param io The i/o instance to seek. * \param offset The new byte offset for the i/o position. * \return non-zero on success, zero on error. */ int (*seek)(struct PHYSFS_Io *io, PHYSFS_uint64 offset); /** * \brief Report current i/o position. * * Return bytes offset, or -1 if you aren't able to determine. A failure * will almost certainly be fatal to further use of this stream, so you * may not leave this unimplemented. * * \param io The i/o instance to query. * \return The current byte offset for the i/o position, -1 if unknown. */ PHYSFS_sint64 (*tell)(struct PHYSFS_Io *io); /** * \brief Determine size of the i/o instance's dataset. * * Return number of bytes available in the file, or -1 if you * aren't able to determine. A failure will almost certainly be fatal * to further use of this stream, so you may not leave this unimplemented. * * \param io The i/o instance to query. * \return Total size, in bytes, of the dataset. */ PHYSFS_sint64 (*length)(struct PHYSFS_Io *io); /** * \brief Duplicate this i/o instance. * * This needs to result in a full copy of this PHYSFS_Io, that can live * completely independently. The copy needs to be able to perform all * its operations without altering the original, including either object * being destroyed separately (so, for example: they can't share a file * handle; they each need their own). * * If you can't duplicate a handle, it's legal to return NULL, but you * almost certainly need this functionality if you want to use this to * PHYSFS_Io to back an archive. * * \param io The i/o instance to duplicate. * \return A new value for a stream's (opaque) field, or NULL on error. */ struct PHYSFS_Io *(*duplicate)(struct PHYSFS_Io *io); /** * \brief Flush resources to media, or wherever. * * This is the chance to report failure for writes that had claimed * success earlier, but still had a chance to actually fail. This method * can be NULL if flushing isn't necessary. * * This function may be called before destroy(), as it can report failure * and destroy() can not. It may be called at other times, too. * * \param io The i/o instance to flush. * \return Zero on error, non-zero on success. */ int (*flush)(struct PHYSFS_Io *io); /** * \brief Cleanup and deallocate i/o instance. * * Free associated resources, including (opaque) if applicable. * * This function must always succeed: as such, it returns void. The * system may call your flush() method before this. You may report * failure there if necessary. This method may still be called if * flush() fails, in which case you'll have to abandon unflushed data * and other failing conditions and clean up. * * Once this method is called for a given instance, the system will assume * it is unsafe to touch that instance again and will discard any * references to it. * * \param s The i/o instance to destroy. */ void (*destroy)(struct PHYSFS_Io *io); } PHYSFS_Io; /** * \fn int PHYSFS_mountIo(PHYSFS_Io *io, const char *newDir, const char *mountPoint, int appendToPath) * \brief Add an archive, built on a PHYSFS_Io, to the search path. * * \warning Unless you have some special, low-level need, you should be using * PHYSFS_mount() instead of this. * * This function operates just like PHYSFS_mount(), but takes a PHYSFS_Io * instead of a pathname. Behind the scenes, PHYSFS_mount() calls this * function with a physical-filesystem-based PHYSFS_Io. * * (newDir) must be a unique string to identify this archive. It is used * to optimize archiver selection (if you name it XXXXX.zip, we might try * the ZIP archiver first, for example, or directly choose an archiver that * can only trust the data is valid by filename extension). It doesn't * need to refer to a real file at all. If the filename extension isn't * helpful, the system will try every archiver until one works or none * of them do. This filename must be unique, as the system won't allow you * to have two archives with the same name. * * (io) must remain until the archive is unmounted. When the archive is * unmounted, the system will call (io)->destroy(io), which will give you * a chance to free your resources. * * If this function fails, (io)->destroy(io) is not called. * * \param io i/o instance for archive to add to the path. * \param newDir Filename that can represent this stream. * \param mountPoint Location in the interpolated tree that this archive * will be "mounted", in platform-independent notation. * NULL or "" is equivalent to "/". * \param appendToPath nonzero to append to search path, zero to prepend. * \return nonzero if added to path, zero on failure (bogus archive, stream * i/o issue, etc). Use PHYSFS_getLastErrorCode() to obtain * the specific error. * * \sa PHYSFS_unmount * \sa PHYSFS_getSearchPath * \sa PHYSFS_getMountPoint */ PHYSFS_DECL int PHYSFS_mountIo(PHYSFS_Io *io, const char *newDir, const char *mountPoint, int appendToPath); /** * \fn int PHYSFS_mountMemory(const void *buf, PHYSFS_uint64 len, void (*del)(void *), const char *newDir, const char *mountPoint, int appendToPath) * \brief Add an archive, contained in a memory buffer, to the search path. * * \warning Unless you have some special, low-level need, you should be using * PHYSFS_mount() instead of this. * * This function operates just like PHYSFS_mount(), but takes a memory buffer * instead of a pathname. This buffer contains all the data of the archive, * and is used instead of a real file in the physical filesystem. * * (newDir) must be a unique string to identify this archive. It is used * to optimize archiver selection (if you name it XXXXX.zip, we might try * the ZIP archiver first, for example, or directly choose an archiver that * can only trust the data is valid by filename extension). It doesn't * need to refer to a real file at all. If the filename extension isn't * helpful, the system will try every archiver until one works or none * of them do. This filename must be unique, as the system won't allow you * to have two archives with the same name. * * (ptr) must remain until the archive is unmounted. When the archive is * unmounted, the system will call (del)(ptr), which will notify you that * the system is done with the buffer, and give you a chance to free your * resources. (del) can be NULL, in which case the system will make no * attempt to free the buffer. * * If this function fails, (del) is not called. * * \param buf Address of the memory buffer containing the archive data. * \param len Size of memory buffer, in bytes. * \param del A callback that triggers upon unmount. Can be NULL. * \param newDir Filename that can represent this stream. * \param mountPoint Location in the interpolated tree that this archive * will be "mounted", in platform-independent notation. * NULL or "" is equivalent to "/". * \param appendToPath nonzero to append to search path, zero to prepend. * \return nonzero if added to path, zero on failure (bogus archive, etc). * Use PHYSFS_getLastErrorCode() to obtain the specific error. * * \sa PHYSFS_unmount * \sa PHYSFS_getSearchPath * \sa PHYSFS_getMountPoint */ PHYSFS_DECL int PHYSFS_mountMemory(const void *buf, PHYSFS_uint64 len, void (*del)(void *), const char *newDir, const char *mountPoint, int appendToPath); /** * \fn int PHYSFS_mountHandle(PHYSFS_File *file, const char *newDir, const char *mountPoint, int appendToPath) * \brief Add an archive, contained in a PHYSFS_File handle, to the search path. * * \warning Unless you have some special, low-level need, you should be using * PHYSFS_mount() instead of this. * * \warning Archives-in-archives may be very slow! While a PHYSFS_File can * seek even when the data is compressed, it may do so by rewinding * to the start and decompressing everything before the seek point. * Normal archive usage may do a lot of seeking behind the scenes. * As such, you might find normal archive usage extremely painful * if mounted this way. Plan accordingly: if you, say, have a * self-extracting .zip file, and want to mount something in it, * compress the contents of the inner archive and make sure the outer * .zip file doesn't compress the inner archive too. * * This function operates just like PHYSFS_mount(), but takes a PHYSFS_File * handle instead of a pathname. This handle contains all the data of the * archive, and is used instead of a real file in the physical filesystem. * The PHYSFS_File may be backed by a real file in the physical filesystem, * but isn't necessarily. The most popular use for this is likely to mount * archives stored inside other archives. * * (newDir) must be a unique string to identify this archive. It is used * to optimize archiver selection (if you name it XXXXX.zip, we might try * the ZIP archiver first, for example, or directly choose an archiver that * can only trust the data is valid by filename extension). It doesn't * need to refer to a real file at all. If the filename extension isn't * helpful, the system will try every archiver until one works or none * of them do. This filename must be unique, as the system won't allow you * to have two archives with the same name. * * (file) must remain until the archive is unmounted. When the archive is * unmounted, the system will call PHYSFS_close(file). If you need this * handle to survive, you will have to wrap this in a PHYSFS_Io and use * PHYSFS_mountIo() instead. * * If this function fails, PHYSFS_close(file) is not called. * * \param file The PHYSFS_File handle containing archive data. * \param newDir Filename that can represent this stream. * \param mountPoint Location in the interpolated tree that this archive * will be "mounted", in platform-independent notation. * NULL or "" is equivalent to "/". * \param appendToPath nonzero to append to search path, zero to prepend. * \return nonzero if added to path, zero on failure (bogus archive, etc). * Use PHYSFS_getLastErrorCode() to obtain the specific error. * * \sa PHYSFS_unmount * \sa PHYSFS_getSearchPath * \sa PHYSFS_getMountPoint */ PHYSFS_DECL int PHYSFS_mountHandle(PHYSFS_File *file, const char *newDir, const char *mountPoint, int appendToPath); /** * \enum PHYSFS_ErrorCode * \brief Values that represent specific causes of failure. * * Most of the time, you should only concern yourself with whether a given * operation failed or not, but there may be occasions where you plan to * handle a specific failure case gracefully, so we provide specific error * codes. * * Most of these errors are a little vague, and most aren't things you can * fix...if there's a permission error, for example, all you can really do * is pass that information on to the user and let them figure out how to * handle it. In most these cases, your program should only care that it * failed to accomplish its goals, and not care specifically why. * * \sa PHYSFS_getLastErrorCode * \sa PHYSFS_getErrorByCode */ typedef enum PHYSFS_ErrorCode { PHYSFS_ERR_OK, /**< Success; no error. */ PHYSFS_ERR_OTHER_ERROR, /**< Error not otherwise covered here. */ PHYSFS_ERR_OUT_OF_MEMORY, /**< Memory allocation failed. */ PHYSFS_ERR_NOT_INITIALIZED, /**< PhysicsFS is not initialized. */ PHYSFS_ERR_IS_INITIALIZED, /**< PhysicsFS is already initialized. */ PHYSFS_ERR_ARGV0_IS_NULL, /**< Needed argv[0], but it is NULL. */ PHYSFS_ERR_UNSUPPORTED, /**< Operation or feature unsupported. */ PHYSFS_ERR_PAST_EOF, /**< Attempted to access past end of file. */ PHYSFS_ERR_FILES_STILL_OPEN, /**< Files still open. */ PHYSFS_ERR_INVALID_ARGUMENT, /**< Bad parameter passed to an function. */ PHYSFS_ERR_NOT_MOUNTED, /**< Requested archive/dir not mounted. */ PHYSFS_ERR_NOT_FOUND, /**< File (or whatever) not found. */ PHYSFS_ERR_SYMLINK_FORBIDDEN,/**< Symlink seen when not permitted. */ PHYSFS_ERR_NO_WRITE_DIR, /**< No write dir has been specified. */ PHYSFS_ERR_OPEN_FOR_READING, /**< Wrote to a file opened for reading. */ PHYSFS_ERR_OPEN_FOR_WRITING, /**< Read from a file opened for writing. */ PHYSFS_ERR_NOT_A_FILE, /**< Needed a file, got a directory (etc). */ PHYSFS_ERR_READ_ONLY, /**< Wrote to a read-only filesystem. */ PHYSFS_ERR_CORRUPT, /**< Corrupted data encountered. */ PHYSFS_ERR_SYMLINK_LOOP, /**< Infinite symbolic link loop. */ PHYSFS_ERR_IO, /**< i/o error (hardware failure, etc). */ PHYSFS_ERR_PERMISSION, /**< Permission denied. */ PHYSFS_ERR_NO_SPACE, /**< No space (disk full, over quota, etc) */ PHYSFS_ERR_BAD_FILENAME, /**< Filename is bogus/insecure. */ PHYSFS_ERR_BUSY, /**< Tried to modify a file the OS needs. */ PHYSFS_ERR_DIR_NOT_EMPTY, /**< Tried to delete dir with files in it. */ PHYSFS_ERR_OS_ERROR, /**< Unspecified OS-level error. */ PHYSFS_ERR_DUPLICATE, /**< Duplicate entry. */ PHYSFS_ERR_BAD_PASSWORD, /**< Bad password. */ PHYSFS_ERR_APP_CALLBACK /**< Application callback reported error. */ } PHYSFS_ErrorCode; /** * \fn PHYSFS_ErrorCode PHYSFS_getLastErrorCode(void) * \brief Get machine-readable error information. * * Get the last PhysicsFS error message as an integer value. This will return * PHYSFS_ERR_OK if there's been no error since the last call to this * function. Each thread has a unique error state associated with it, but * each time a new error message is set, it will overwrite the previous one * associated with that thread. It is safe to call this function at anytime, * even before PHYSFS_init(). * * PHYSFS_getLastError() and PHYSFS_getLastErrorCode() both reset the same * thread-specific error state. Calling one will wipe out the other's * data. If you need both, call PHYSFS_getLastErrorCode(), then pass that * value to PHYSFS_getErrorByCode(). * * Generally, applications should only concern themselves with whether a * given function failed; however, if you require more specifics, you can * try this function to glean information, if there's some specific problem * you're expecting and plan to handle. But with most things that involve * file systems, the best course of action is usually to give up, report the * problem to the user, and let them figure out what should be done about it. * For that, you might prefer PHYSFS_getErrorByCode() instead. * * \return Enumeration value that represents last reported error. * * \sa PHYSFS_getErrorByCode */ PHYSFS_DECL PHYSFS_ErrorCode PHYSFS_getLastErrorCode(void); /** * \fn const char *PHYSFS_getErrorByCode(PHYSFS_ErrorCode code) * \brief Get human-readable description string for a given error code. * * Get a static string, in UTF-8 format, that represents an English * description of a given error code. * * This string is guaranteed to never change (although we may add new strings * for new error codes in later versions of PhysicsFS), so you can use it * for keying a localization dictionary. * * It is safe to call this function at anytime, even before PHYSFS_init(). * * These strings are meant to be passed on directly to the user. * Generally, applications should only concern themselves with whether a * given function failed, but not care about the specifics much. * * Do not attempt to free the returned strings; they are read-only and you * don't own their memory pages. * * \param code Error code to convert to a string. * \return READ ONLY string of requested error message, NULL if this * is not a valid PhysicsFS error code. Always check for NULL if * you might be looking up an error code that didn't exist in an * earlier version of PhysicsFS. * * \sa PHYSFS_getLastErrorCode */ PHYSFS_DECL const char *PHYSFS_getErrorByCode(PHYSFS_ErrorCode code); /** * \fn void PHYSFS_setErrorCode(PHYSFS_ErrorCode code) * \brief Set the current thread's error code. * * This lets you set the value that will be returned by the next call to * PHYSFS_getLastErrorCode(). This will replace any existing error code, * whether set by your application or internally by PhysicsFS. * * Error codes are stored per-thread; what you set here will not be * accessible to another thread. * * Any call into PhysicsFS may change the current error code, so any code you * set here is somewhat fragile, and thus you shouldn't build any serious * error reporting framework on this function. The primary goal of this * function is to allow PHYSFS_Io implementations to set the error state, * which generally will be passed back to your application when PhysicsFS * makes a PHYSFS_Io call that fails internally. * * This function doesn't care if the error code is a value known to PhysicsFS * or not (but PHYSFS_getErrorByCode() will return NULL for unknown values). * The value will be reported unmolested by PHYSFS_getLastErrorCode(). * * \param code Error code to become the current thread's new error state. * * \sa PHYSFS_getLastErrorCode * \sa PHYSFS_getErrorByCode */ PHYSFS_DECL void PHYSFS_setErrorCode(PHYSFS_ErrorCode code); /** * \fn const char *PHYSFS_getPrefDir(const char *org, const char *app) * \brief Get the user-and-app-specific path where files can be written. * * Helper function. * * Get the "pref dir". This is meant to be where users can write personal * files (preferences and save games, etc) that are specific to your * application. This directory is unique per user, per application. * * This function will decide the appropriate location in the native filesystem, * create the directory if necessary, and return a string in * platform-dependent notation, suitable for passing to PHYSFS_setWriteDir(). * * On Windows, this might look like: * "C:\\Users\\bob\\AppData\\Roaming\\My Company\\My Program Name" * * On Linux, this might look like: * "/home/bob/.local/share/My Program Name" * * On Mac OS X, this might look like: * "/Users/bob/Library/Application Support/My Program Name" * * (etc.) * * You should probably use the pref dir for your write dir, and also put it * near the beginning of your search path. Older versions of PhysicsFS * offered only PHYSFS_getUserDir() and left you to figure out where the * files should go under that tree. This finds the correct location * for whatever platform, which not only changes between operating systems, * but also versions of the same operating system. * * You specify the name of your organization (if it's not a real organization, * your name or an Internet domain you own might do) and the name of your * application. These should be proper names. * * Both the (org) and (app) strings may become part of a directory name, so * please follow these rules: * * - Try to use the same org string (including case-sensitivity) for * all your applications that use this function. * - Always use a unique app string for each one, and make sure it never * changes for an app once you've decided on it. * - Unicode characters are legal, as long as it's UTF-8 encoded, but... * - ...only use letters, numbers, and spaces. Avoid punctuation like * "Game Name 2: Bad Guy's Revenge!" ... "Game Name 2" is sufficient. * * The pointer returned by this function remains valid until you call this * function again, or call PHYSFS_deinit(). This is not necessarily a fast * call, though, so you should call this once at startup and copy the string * if you need it. * * You should assume the path returned by this function is the only safe * place to write files (and that PHYSFS_getUserDir() and PHYSFS_getBaseDir(), * while they might be writable, or even parents of the returned path, aren't * where you should be writing things). * * \param org The name of your organization. * \param app The name of your application. * \return READ ONLY string of user dir in platform-dependent notation. NULL * if there's a problem (creating directory failed, etc). * * \sa PHYSFS_getBaseDir * \sa PHYSFS_getUserDir */ PHYSFS_DECL const char *PHYSFS_getPrefDir(const char *org, const char *app); /** * \struct PHYSFS_Archiver * \brief Abstract interface to provide support for user-defined archives. * * \warning This is advanced, hardcore stuff. You don't need this unless you * really know what you're doing. Most apps will not need this. * * Historically, PhysicsFS provided a means to mount various archive file * formats, and physical directories in the native filesystem. However, * applications have been limited to the file formats provided by the * library. This interface allows an application to provide their own * archive file types. * * Conceptually, a PHYSFS_Archiver provides directory entries, while * PHYSFS_Io provides data streams for those directory entries. The most * obvious use of PHYSFS_Archiver is to provide support for an archive * file type that isn't provided by PhysicsFS directly: perhaps some * proprietary format that only your application needs to understand. * * Internally, all the built-in archive support uses this interface, so the * best examples for building a PHYSFS_Archiver is the source code to * PhysicsFS itself. * * An archiver is added to the system with PHYSFS_registerArchiver(), and then * it will be available for use automatically with PHYSFS_mount(); if a * given archive can be handled with your archiver, it will be given control * as appropriate. * * These methods deal with dir handles. You have one instance of your * archiver, and it generates a unique, opaque handle for each opened * archive in its openArchive() method. Since the lifetime of an Archiver * (not an archive) is generally the entire lifetime of the process, and it's * assumed to be a singleton, we do not provide any instance data for the * archiver itself; the app can just use some static variables if necessary. * * Symlinks should always be followed (except in stat()); PhysicsFS will * use the stat() method to check for symlinks and make a judgement on * whether to continue to call other methods based on that. * * Archivers, when necessary, should set the PhysicsFS error state with * PHYSFS_setErrorCode() before returning. PhysicsFS will pass these errors * back to the application unmolested in most cases. * * Thread safety: PHYSFS_Archiver implementations are not guaranteed to be * thread safe in themselves. PhysicsFS provides thread safety when it calls * into a given archiver inside the library, but it does not promise that * using the same PHYSFS_File from two threads at once is thread-safe; as * such, your PHYSFS_Archiver can assume that locking is handled for you * so long as the PHYSFS_Io you return from PHYSFS_open* doesn't change any * of your Archiver state, as the PHYSFS_Io won't be as aggressively * protected. * * \sa PHYSFS_registerArchiver * \sa PHYSFS_deregisterArchiver * \sa PHYSFS_supportedArchiveTypes */ typedef struct PHYSFS_Archiver { /** * \brief Binary compatibility information. * * This must be set to zero at this time. Future versions of this * struct will increment this field, so we know what a given * implementation supports. We'll presumably keep supporting older * versions as we offer new features, though. */ PHYSFS_uint32 version; /** * \brief Basic info about this archiver. * * This is used to identify your archive, and is returned in * PHYSFS_supportedArchiveTypes(). */ PHYSFS_ArchiveInfo info; /** * \brief Open an archive provided by (io). * * This is where resources are allocated and data is parsed when mounting * an archive. * (name) is a filename associated with (io), but doesn't necessarily * map to anything, let alone a real filename. This possibly- * meaningless name is in platform-dependent notation. * (forWrite) is non-zero if this is to be used for * the write directory, and zero if this is to be used for an * element of the search path. * (claimed) should be set to 1 if this is definitely an archive your * archiver implementation can handle, even if it fails. We use to * decide if we should stop trying other archivers if you fail to open * it. For example: the .zip archiver will set this to 1 for something * that's got a .zip file signature, even if it failed because the file * was also truncated. No sense in trying other archivers here, we * already tried to handle it with the appropriate implementation!. * Return NULL on failure and set (claimed) appropriately. If no archiver * opened the archive or set (claimed), PHYSFS_mount() will report * PHYSFS_ERR_UNSUPPORTED. Otherwise, it will report the error from the * archiver that claimed the data through (claimed). * Return non-NULL on success. The pointer returned will be * passed as the "opaque" parameter for later calls. */ void *(*openArchive)(PHYSFS_Io *io, const char *name, int forWrite, int *claimed); /** * \brief List all files in (dirname). * * Each file is passed to (cb), where a copy is made if appropriate, so * you can dispose of it upon return from the callback. (dirname) is in * platform-independent notation. * If you have a failure, call PHYSFS_SetErrorCode() with whatever code * seem appropriate and return PHYSFS_ENUM_ERROR. * If the callback returns PHYSFS_ENUM_ERROR, please call * PHYSFS_SetErrorCode(PHYSFS_ERR_APP_CALLBACK) and then return * PHYSFS_ENUM_ERROR as well. Don't call the callback again in any * circumstances. * If the callback returns PHYSFS_ENUM_STOP, stop enumerating and return * PHYSFS_ENUM_STOP as well. Don't call the callback again in any * circumstances. Don't set an error code in this case. * Callbacks are only supposed to return a value from * PHYSFS_EnumerateCallbackResult. Any other result has undefined * behavior. * As long as the callback returned PHYSFS_ENUM_OK and you haven't * experienced any errors of your own, keep enumerating until you're done * and then return PHYSFS_ENUM_OK without setting an error code. * * \warning PHYSFS_enumerate returns zero or non-zero (success or failure), * so be aware this function pointer returns different values! */ PHYSFS_EnumerateCallbackResult (*enumerate)(void *opaque, const char *dirname, PHYSFS_EnumerateCallback cb, const char *origdir, void *callbackdata); /** * \brief Open a file in this archive for reading. * * This filename, (fnm), is in platform-independent notation. * Fail if the file does not exist. * Returns NULL on failure, and calls PHYSFS_setErrorCode(). * Returns non-NULL on success. The pointer returned will be * passed as the "opaque" parameter for later file calls. */ PHYSFS_Io *(*openRead)(void *opaque, const char *fnm); /** * \brief Open a file in this archive for writing. * * If the file does not exist, it should be created. If it exists, * it should be truncated to zero bytes. The writing offset should * be the start of the file. * If the archive is read-only, this operation should fail. * This filename is in platform-independent notation. * Returns NULL on failure, and calls PHYSFS_setErrorCode(). * Returns non-NULL on success. The pointer returned will be * passed as the "opaque" parameter for later file calls. */ PHYSFS_Io *(*openWrite)(void *opaque, const char *filename); /** * \brief Open a file in this archive for appending. * * If the file does not exist, it should be created. The writing * offset should be the end of the file. * If the archive is read-only, this operation should fail. * This filename is in platform-independent notation. * Returns NULL on failure, and calls PHYSFS_setErrorCode(). * Returns non-NULL on success. The pointer returned will be * passed as the "opaque" parameter for later file calls. */ PHYSFS_Io *(*openAppend)(void *opaque, const char *filename); /** * \brief Delete a file or directory in the archive. * * This same call is used for both files and directories; there is not a * separate rmdir() call. Directories are only meant to be removed if * they are empty. * If the archive is read-only, this operation should fail. * * Return non-zero on success, zero on failure. * This filename is in platform-independent notation. * On failure, call PHYSFS_setErrorCode(). */ int (*remove)(void *opaque, const char *filename); /** * \brief Create a directory in the archive. * * If the application is trying to make multiple dirs, PhysicsFS * will split them up into multiple calls before passing them to * your driver. * If the archive is read-only, this operation should fail. * Return non-zero on success, zero on failure. * This filename is in platform-independent notation. * On failure, call PHYSFS_setErrorCode(). */ int (*mkdir)(void *opaque, const char *filename); /** * \brief Obtain basic file metadata. * * On success, fill in all the fields in (stat), using * reasonable defaults for fields that apply to your archive. * * Returns non-zero on success, zero on failure. * This filename is in platform-independent notation. * On failure, call PHYSFS_setErrorCode(). */ int (*stat)(void *opaque, const char *fn, PHYSFS_Stat *stat); /** * \brief Destruct a previously-opened archive. * * Close this archive, and free any associated memory, * including the original PHYSFS_Io and (opaque) itself, if * applicable. Implementation can assume that it won't be called if * there are still files open from this archive. */ void (*closeArchive)(void *opaque); } PHYSFS_Archiver; /** * \fn int PHYSFS_registerArchiver(const PHYSFS_Archiver *archiver) * \brief Add a new archiver to the system. * * \warning This is advanced, hardcore stuff. You don't need this unless you * really know what you're doing. Most apps will not need this. * * If you want to provide your own archiver (for example, a custom archive * file format, or some virtual thing you want to make look like a filesystem * that you can access through the usual PhysicsFS APIs), this is where you * start. Once an archiver is successfully registered, then you can use * PHYSFS_mount() to add archives that your archiver supports to the * search path, or perhaps use it as the write dir. Internally, PhysicsFS * uses this function to register its own built-in archivers, like .zip * support, etc. * * You may not have two archivers that handle the same extension. If you are * going to have a clash, you can deregister the other archiver (including * built-in ones) with PHYSFS_deregisterArchiver(). * * The data in (archiver) is copied; you may free this pointer when this * function returns. * * Once this function returns successfully, PhysicsFS will be able to support * archives of this type until you deregister the archiver again. * * \param archiver The archiver to register. * \return Zero on error, non-zero on success. * * \sa PHYSFS_Archiver * \sa PHYSFS_deregisterArchiver */ PHYSFS_DECL int PHYSFS_registerArchiver(const PHYSFS_Archiver *archiver); /** * \fn int PHYSFS_deregisterArchiver(const char *ext) * \brief Remove an archiver from the system. * * If for some reason, you only need your previously-registered archiver to * live for a portion of your app's lifetime, you can remove it from the * system once you're done with it through this function. * * This fails if there are any archives still open that use this archiver. * * This function can also remove internally-supplied archivers, like .zip * support or whatnot. This could be useful in some situations, like * disabling support for them outright or overriding them with your own * implementation. Once an internal archiver is disabled like this, * PhysicsFS provides no mechanism to recover them, short of calling * PHYSFS_deinit() and PHYSFS_init() again. * * PHYSFS_deinit() will automatically deregister all archivers, so you don't * need to explicitly deregister yours if you otherwise shut down cleanly. * * \param ext Filename extension that the archiver handles. * \return Zero on error, non-zero on success. * * \sa PHYSFS_Archiver * \sa PHYSFS_registerArchiver */ PHYSFS_DECL int PHYSFS_deregisterArchiver(const char *ext); /* Everything above this line is part of the PhysicsFS 2.1 API. */ /** * \fn int PHYSFS_setRoot(const char *archive, const char *subdir) * \brief Make a subdirectory of an archive its root directory. * * This lets you narrow down the accessible files in a specific archive. For * example, if you have x.zip with a file in y/z.txt, mounted to /a, if you * call PHYSFS_setRoot("x.zip", "/y"), then the call * PHYSFS_openRead("/a/z.txt") will succeed. * * You can change an archive's root at any time, altering the interpolated * file tree (depending on where paths shift, a different archive may be * providing various files). If you set the root to NULL or "/", the * archive will be treated as if no special root was set (as if the archive * was just mounted normally). * * Changing the root only affects future operations on pathnames; a file * that was opened from a path that changed due to a setRoot will not be * affected. * * Setting a new root is not limited to archives in the search path; you may * set one on the write dir, too, which might be useful if you have files * open for write and thus can't change the write dir at the moment. * * It is not an error to set a subdirectory that does not exist to be the * root of an archive; however, no files will be visible in this case. If * the missing directories end up getting created (a mkdir to the physical * filesystem, etc) then this will be reflected in the interpolated tree. * * \param archive dir/archive on which to change root. * \param subdir new subdirectory to make the root of this archive. * \return nonzero on success, zero on failure. Use * PHYSFS_getLastErrorCode() to obtain the specific error. */ PHYSFS_DECL int PHYSFS_setRoot(const char *archive, const char *subdir); /* Everything above this line is part of the PhysicsFS 3.1 API. */ #ifdef __cplusplus } #endif #endif /* !defined _INCLUDE_PHYSFS_H_ */ /* end of physfs.h ... */ ================================================ FILE: src/libraries/physfs/physfs_archiver_7z.c ================================================ /* * 7zip support routines for PhysicsFS. * * Please see the file LICENSE.txt in the source's root directory. * * This file was written by Ryan C. Gordon. */ #define __PHYSICSFS_INTERNAL__ #include "physfs_internal.h" #if PHYSFS_SUPPORTS_7Z #include "physfs_lzmasdk.h" typedef struct { ISeekInStream seekStream; /* lzma sdk i/o interface (lower level). */ PHYSFS_Io *io; /* physfs i/o interface for this archive. */ CLookToRead lookStream; /* lzma sdk i/o interface (higher level). */ } SZIPLookToRead; /* One SZIPentry is kept for each file in an open 7zip archive. */ typedef struct { __PHYSFS_DirTreeEntry tree; /* manages directory tree */ PHYSFS_uint32 dbidx; /* index into lzma sdk database */ } SZIPentry; /* One SZIPinfo is kept for each open 7zip archive. */ typedef struct { __PHYSFS_DirTree tree; /* manages directory tree. */ PHYSFS_Io *io; /* physfs i/o interface for this archive. */ CSzArEx db; /* lzma sdk archive database object. */ } SZIPinfo; static PHYSFS_ErrorCode szipErrorCode(const SRes rc) { switch (rc) { case SZ_OK: return PHYSFS_ERR_OK; case SZ_ERROR_DATA: return PHYSFS_ERR_CORRUPT; case SZ_ERROR_MEM: return PHYSFS_ERR_OUT_OF_MEMORY; case SZ_ERROR_CRC: return PHYSFS_ERR_CORRUPT; case SZ_ERROR_UNSUPPORTED: return PHYSFS_ERR_UNSUPPORTED; case SZ_ERROR_INPUT_EOF: return PHYSFS_ERR_CORRUPT; case SZ_ERROR_OUTPUT_EOF: return PHYSFS_ERR_IO; case SZ_ERROR_READ: return PHYSFS_ERR_IO; case SZ_ERROR_WRITE: return PHYSFS_ERR_IO; case SZ_ERROR_ARCHIVE: return PHYSFS_ERR_CORRUPT; case SZ_ERROR_NO_ARCHIVE: return PHYSFS_ERR_UNSUPPORTED; default: break; } /* switch */ return PHYSFS_ERR_OTHER_ERROR; } /* szipErrorCode */ /* LZMA SDK's ISzAlloc interface ... */ static void *SZIP_ISzAlloc_Alloc(void *p, size_t size) { return allocator.Malloc(size ? size : 1); } /* SZIP_ISzAlloc_Alloc */ static void SZIP_ISzAlloc_Free(void *p, void *address) { if (address) allocator.Free(address); } /* SZIP_ISzAlloc_Free */ static ISzAlloc SZIP_SzAlloc = { SZIP_ISzAlloc_Alloc, SZIP_ISzAlloc_Free }; /* we implement ISeekInStream, and then wrap that in LZMA SDK's CLookToRead, which implements the higher-level ILookInStream on top of that, handling buffering and such for us. */ /* LZMA SDK's ISeekInStream interface ... */ static SRes SZIP_ISeekInStream_Read(void *p, void *buf, size_t *size) { SZIPLookToRead *stream = (SZIPLookToRead *) p; PHYSFS_Io *io = stream->io; const PHYSFS_uint64 len = (PHYSFS_uint64) *size; const PHYSFS_sint64 rc = (len == 0) ? 0 : io->read(io, buf, len); if (rc < 0) { *size = 0; return SZ_ERROR_READ; } /* if */ *size = (size_t) rc; return SZ_OK; } /* SZIP_ISeekInStream_Read */ static SRes SZIP_ISeekInStream_Seek(void *p, Int64 *pos, ESzSeek origin) { SZIPLookToRead *stream = (SZIPLookToRead *) p; PHYSFS_Io *io = stream->io; PHYSFS_sint64 base; PHYSFS_uint64 newpos; switch (origin) { case SZ_SEEK_SET: base = 0; break; case SZ_SEEK_CUR: base = io->tell(io); break; case SZ_SEEK_END: base = io->length(io); break; default: return SZ_ERROR_FAIL; } /* switch */ if (base < 0) return SZ_ERROR_FAIL; else if ((*pos < 0) && (((Int64) base) < -*pos)) return SZ_ERROR_FAIL; newpos = (PHYSFS_uint64) (((Int64) base) + *pos); if (!io->seek(io, newpos)) return SZ_ERROR_FAIL; *pos = (Int64) newpos; return SZ_OK; } /* SZIP_ISeekInStream_Seek */ static void szipInitStream(SZIPLookToRead *stream, PHYSFS_Io *io) { stream->seekStream.Read = SZIP_ISeekInStream_Read; stream->seekStream.Seek = SZIP_ISeekInStream_Seek; stream->io = io; /* !!! FIXME: can we use lookahead? Is there value to it? */ LookToRead_Init(&stream->lookStream); LookToRead_CreateVTable(&stream->lookStream, False); stream->lookStream.realStream = &stream->seekStream; } /* szipInitStream */ /* Do this in a separate function so we can smallAlloc without looping. */ static int szipLoadEntry(SZIPinfo *info, const PHYSFS_uint32 idx) { const size_t utf16len = SzArEx_GetFileNameUtf16(&info->db, idx, NULL); const size_t utf16buflen = utf16len * 2; PHYSFS_uint16 *utf16 = (PHYSFS_uint16 *) __PHYSFS_smallAlloc(utf16buflen); const size_t utf8buflen = utf16len * 4; char *utf8 = (char *) __PHYSFS_smallAlloc(utf8buflen); int retval = 0; if (utf16 && utf8) { const int isdir = SzArEx_IsDir(&info->db, idx) != 0; SZIPentry *entry; SzArEx_GetFileNameUtf16(&info->db, idx, (UInt16 *) utf16); PHYSFS_utf8FromUtf16(utf16, utf8, utf8buflen); entry = (SZIPentry*) __PHYSFS_DirTreeAdd(&info->tree, utf8, isdir); retval = (entry != NULL); if (retval) entry->dbidx = idx; } /* if */ __PHYSFS_smallFree(utf8); __PHYSFS_smallFree(utf16); return retval; } /* szipLoadEntry */ static int szipLoadEntries(SZIPinfo *info) { int retval = 0; if (__PHYSFS_DirTreeInit(&info->tree, sizeof (SZIPentry), 1, 0)) { const PHYSFS_uint32 count = info->db.NumFiles; PHYSFS_uint32 i; for (i = 0; i < count; i++) BAIL_IF_ERRPASS(!szipLoadEntry(info, i), 0); retval = 1; } /* if */ return retval; } /* szipLoadEntries */ static void SZIP_closeArchive(void *opaque) { SZIPinfo *info = (SZIPinfo *) opaque; if (info) { if (info->io) info->io->destroy(info->io); SzArEx_Free(&info->db, &SZIP_SzAlloc); __PHYSFS_DirTreeDeinit(&info->tree); allocator.Free(info); } /* if */ } /* SZIP_closeArchive */ static void *SZIP_openArchive(PHYSFS_Io *io, const char *name, int forWriting, int *claimed) { static const PHYSFS_uint8 wantedsig[] = { '7','z',0xBC,0xAF,0x27,0x1C }; SZIPLookToRead stream; ISzAlloc *alloc = &SZIP_SzAlloc; SZIPinfo *info = NULL; SRes rc; PHYSFS_uint8 sig[6]; PHYSFS_sint64 pos; BAIL_IF(forWriting, PHYSFS_ERR_READ_ONLY, NULL); pos = io->tell(io); BAIL_IF_ERRPASS(pos == -1, NULL); BAIL_IF_ERRPASS(io->read(io, sig, 6) != 6, NULL); *claimed = (memcmp(sig, wantedsig, 6) == 0); BAIL_IF_ERRPASS(!io->seek(io, pos), NULL); info = (SZIPinfo *) allocator.Malloc(sizeof (SZIPinfo)); BAIL_IF(!info, PHYSFS_ERR_OUT_OF_MEMORY, NULL); memset(info, '\0', sizeof (*info)); SzArEx_Init(&info->db); info->io = io; szipInitStream(&stream, io); rc = SzArEx_Open(&info->db, &stream.lookStream.s, alloc, alloc); GOTO_IF(rc != SZ_OK, szipErrorCode(rc), failed); GOTO_IF_ERRPASS(!szipLoadEntries(info), failed); return info; failed: info->io = NULL; /* don't let cleanup destroy the PHYSFS_Io. */ SZIP_closeArchive(info); return NULL; } /* SZIP_openArchive */ static PHYSFS_Io *SZIP_openRead(void *opaque, const char *path) { /* !!! FIXME: the current lzma sdk C API only allows you to decompress !!! FIXME: the entire file at once, which isn't ideal. Fix this in the !!! FIXME: SDK and then convert this all to a streaming interface. */ SZIPinfo *info = (SZIPinfo *) opaque; SZIPentry *entry = (SZIPentry *) __PHYSFS_DirTreeFind(&info->tree, path); ISzAlloc *alloc = &SZIP_SzAlloc; SZIPLookToRead stream; PHYSFS_Io *retval = NULL; PHYSFS_Io *io = NULL; UInt32 blockIndex = 0xFFFFFFFF; Byte *outBuffer = NULL; size_t outBufferSize = 0; size_t offset = 0; size_t outSizeProcessed = 0; void *buf = NULL; SRes rc; BAIL_IF_ERRPASS(!entry, NULL); BAIL_IF(entry->tree.isdir, PHYSFS_ERR_NOT_A_FILE, NULL); io = info->io->duplicate(info->io); GOTO_IF_ERRPASS(!io, SZIP_openRead_failed); szipInitStream(&stream, io); rc = SzArEx_Extract(&info->db, &stream.lookStream.s, entry->dbidx, &blockIndex, &outBuffer, &outBufferSize, &offset, &outSizeProcessed, alloc, alloc); GOTO_IF(rc != SZ_OK, szipErrorCode(rc), SZIP_openRead_failed); GOTO_IF(outBuffer == NULL, PHYSFS_ERR_OUT_OF_MEMORY, SZIP_openRead_failed); io->destroy(io); io = NULL; buf = allocator.Malloc(outSizeProcessed ? outSizeProcessed : 1); GOTO_IF(buf == NULL, PHYSFS_ERR_OUT_OF_MEMORY, SZIP_openRead_failed); if (outSizeProcessed > 0) memcpy(buf, outBuffer + offset, outSizeProcessed); alloc->Free(alloc, outBuffer); outBuffer = NULL; retval = __PHYSFS_createMemoryIo(buf, outSizeProcessed, allocator.Free); GOTO_IF_ERRPASS(!retval, SZIP_openRead_failed); return retval; SZIP_openRead_failed: if (io != NULL) io->destroy(io); if (buf) allocator.Free(buf); if (outBuffer) alloc->Free(alloc, outBuffer); return NULL; } /* SZIP_openRead */ static PHYSFS_Io *SZIP_openWrite(void *opaque, const char *filename) { BAIL(PHYSFS_ERR_READ_ONLY, NULL); } /* SZIP_openWrite */ static PHYSFS_Io *SZIP_openAppend(void *opaque, const char *filename) { BAIL(PHYSFS_ERR_READ_ONLY, NULL); } /* SZIP_openAppend */ static int SZIP_remove(void *opaque, const char *name) { BAIL(PHYSFS_ERR_READ_ONLY, 0); } /* SZIP_remove */ static int SZIP_mkdir(void *opaque, const char *name) { BAIL(PHYSFS_ERR_READ_ONLY, 0); } /* SZIP_mkdir */ static inline PHYSFS_uint64 lzmasdkTimeToPhysfsTime(const CNtfsFileTime *t) { const PHYSFS_uint64 winEpochToUnixEpoch = __PHYSFS_UI64(0x019DB1DED53E8000); const PHYSFS_uint64 nanosecToMillisec = __PHYSFS_UI64(10000000); const PHYSFS_uint64 quad = (((PHYSFS_uint64) t->High) << 32) | t->Low; return (quad - winEpochToUnixEpoch) / nanosecToMillisec; } /* lzmasdkTimeToPhysfsTime */ static int SZIP_stat(void *opaque, const char *path, PHYSFS_Stat *stat) { SZIPinfo *info = (SZIPinfo *) opaque; SZIPentry *entry; PHYSFS_uint32 idx; entry = (SZIPentry *) __PHYSFS_DirTreeFind(&info->tree, path); BAIL_IF_ERRPASS(!entry, 0); idx = entry->dbidx; if (entry->tree.isdir) { stat->filesize = -1; stat->filetype = PHYSFS_FILETYPE_DIRECTORY; } /* if */ else { stat->filesize = (PHYSFS_sint64) SzArEx_GetFileSize(&info->db, idx); stat->filetype = PHYSFS_FILETYPE_REGULAR; } /* else */ if (info->db.MTime.Vals != NULL) stat->modtime = lzmasdkTimeToPhysfsTime(&info->db.MTime.Vals[idx]); else if (info->db.CTime.Vals != NULL) stat->modtime = lzmasdkTimeToPhysfsTime(&info->db.CTime.Vals[idx]); else stat->modtime = -1; if (info->db.CTime.Vals != NULL) stat->createtime = lzmasdkTimeToPhysfsTime(&info->db.CTime.Vals[idx]); else if (info->db.MTime.Vals != NULL) stat->createtime = lzmasdkTimeToPhysfsTime(&info->db.MTime.Vals[idx]); else stat->createtime = -1; stat->accesstime = -1; stat->readonly = 1; return 1; } /* SZIP_stat */ void SZIP_global_init(void) { /* this just needs to calculate some things, so it only ever has to run once, even after a deinit. */ static int generatedTable = 0; if (!generatedTable) { generatedTable = 1; CrcGenerateTable(); } /* if */ } /* SZIP_global_init */ const PHYSFS_Archiver __PHYSFS_Archiver_7Z = { CURRENT_PHYSFS_ARCHIVER_API_VERSION, { "7Z", "7zip archives", "Ryan C. Gordon ", "https://icculus.org/physfs/", 0, /* supportsSymlinks */ }, SZIP_openArchive, __PHYSFS_DirTreeEnumerate, SZIP_openRead, SZIP_openWrite, SZIP_openAppend, SZIP_remove, SZIP_mkdir, SZIP_stat, SZIP_closeArchive }; #endif /* defined PHYSFS_SUPPORTS_7Z */ /* end of physfs_archiver_7z.c ... */ ================================================ FILE: src/libraries/physfs/physfs_archiver_dir.c ================================================ /* * Standard directory I/O support routines for PhysicsFS. * * Please see the file LICENSE.txt in the source's root directory. * * This file written by Ryan C. Gordon. */ #define __PHYSICSFS_INTERNAL__ #include "physfs_internal.h" /* There's no PHYSFS_Io interface here. Use __PHYSFS_createNativeIo(). */ static char *cvtToDependent(const char *prepend, const char *path, char *buf, const size_t buflen) { BAIL_IF(buf == NULL, PHYSFS_ERR_OUT_OF_MEMORY, NULL); snprintf(buf, buflen, "%s%s", prepend ? prepend : "", path); #if !__PHYSFS_STANDARD_DIRSEP assert(__PHYSFS_platformDirSeparator != '/'); { char *p; for (p = strchr(buf, '/'); p != NULL; p = strchr(p + 1, '/')) *p = __PHYSFS_platformDirSeparator; } /* if */ #endif return buf; } /* cvtToDependent */ #define CVT_TO_DEPENDENT(buf, pre, dir) { \ const size_t len = ((pre) ? strlen((char *) pre) : 0) + strlen(dir) + 1; \ buf = cvtToDependent((char*)pre,dir,(char*)__PHYSFS_smallAlloc(len),len); \ } static void *DIR_openArchive(PHYSFS_Io *io, const char *name, int forWriting, int *claimed) { PHYSFS_Stat st; const char dirsep = __PHYSFS_platformDirSeparator; char *retval = NULL; const size_t namelen = strlen(name); const size_t seplen = 1; assert(io == NULL); /* shouldn't create an Io for these. */ BAIL_IF_ERRPASS(!__PHYSFS_platformStat(name, &st, 1), NULL); if (st.filetype != PHYSFS_FILETYPE_DIRECTORY) BAIL(PHYSFS_ERR_UNSUPPORTED, NULL); *claimed = 1; retval = allocator.Malloc(namelen + seplen + 1); BAIL_IF(retval == NULL, PHYSFS_ERR_OUT_OF_MEMORY, NULL); strcpy(retval, name); /* make sure there's a dir separator at the end of the string */ if (retval[namelen - 1] != dirsep) { retval[namelen] = dirsep; retval[namelen + 1] = '\0'; } /* if */ return retval; } /* DIR_openArchive */ static PHYSFS_EnumerateCallbackResult DIR_enumerate(void *opaque, const char *dname, PHYSFS_EnumerateCallback cb, const char *origdir, void *callbackdata) { char *d; PHYSFS_EnumerateCallbackResult retval; CVT_TO_DEPENDENT(d, opaque, dname); BAIL_IF_ERRPASS(!d, PHYSFS_ENUM_ERROR); retval = __PHYSFS_platformEnumerate(d, cb, origdir, callbackdata); __PHYSFS_smallFree(d); return retval; } /* DIR_enumerate */ static PHYSFS_Io *doOpen(void *opaque, const char *name, const int mode) { PHYSFS_Io *io = NULL; char *f = NULL; CVT_TO_DEPENDENT(f, opaque, name); BAIL_IF_ERRPASS(!f, NULL); io = __PHYSFS_createNativeIo(f, mode); if (io == NULL) { const PHYSFS_ErrorCode err = PHYSFS_getLastErrorCode(); PHYSFS_Stat statbuf; __PHYSFS_platformStat(f, &statbuf, 0); /* !!! FIXME: why are we stating here? */ PHYSFS_setErrorCode(err); } /* if */ __PHYSFS_smallFree(f); return io; } /* doOpen */ static PHYSFS_Io *DIR_openRead(void *opaque, const char *filename) { return doOpen(opaque, filename, 'r'); } /* DIR_openRead */ static PHYSFS_Io *DIR_openWrite(void *opaque, const char *filename) { return doOpen(opaque, filename, 'w'); } /* DIR_openWrite */ static PHYSFS_Io *DIR_openAppend(void *opaque, const char *filename) { return doOpen(opaque, filename, 'a'); } /* DIR_openAppend */ static int DIR_remove(void *opaque, const char *name) { int retval; char *f; CVT_TO_DEPENDENT(f, opaque, name); BAIL_IF_ERRPASS(!f, 0); retval = __PHYSFS_platformDelete(f); __PHYSFS_smallFree(f); return retval; } /* DIR_remove */ static int DIR_mkdir(void *opaque, const char *name) { int retval; char *f; CVT_TO_DEPENDENT(f, opaque, name); BAIL_IF_ERRPASS(!f, 0); retval = __PHYSFS_platformMkDir(f); __PHYSFS_smallFree(f); return retval; } /* DIR_mkdir */ static void DIR_closeArchive(void *opaque) { allocator.Free(opaque); } /* DIR_closeArchive */ static int DIR_stat(void *opaque, const char *name, PHYSFS_Stat *stat) { int retval = 0; char *d; CVT_TO_DEPENDENT(d, opaque, name); BAIL_IF_ERRPASS(!d, 0); retval = __PHYSFS_platformStat(d, stat, 0); __PHYSFS_smallFree(d); return retval; } /* DIR_stat */ const PHYSFS_Archiver __PHYSFS_Archiver_DIR = { CURRENT_PHYSFS_ARCHIVER_API_VERSION, { "", "Non-archive, direct filesystem I/O", "Ryan C. Gordon ", "https://icculus.org/physfs/", 1, /* supportsSymlinks */ }, DIR_openArchive, DIR_enumerate, DIR_openRead, DIR_openWrite, DIR_openAppend, DIR_remove, DIR_mkdir, DIR_stat, DIR_closeArchive }; /* end of physfs_archiver_dir.c ... */ ================================================ FILE: src/libraries/physfs/physfs_archiver_grp.c ================================================ /* * GRP support routines for PhysicsFS. * * This driver handles BUILD engine archives ("groupfiles"). This format * (but not this driver) was put together by Ken Silverman. * * The format is simple enough. In Ken's words: * * What's the .GRP file format? * * The ".grp" file format is just a collection of a lot of files stored * into 1 big one. I tried to make the format as simple as possible: The * first 12 bytes contains my name, "KenSilverman". The next 4 bytes is * the number of files that were compacted into the group file. Then for * each file, there is a 16 byte structure, where the first 12 bytes are * the filename, and the last 4 bytes are the file's size. The rest of * the group file is just the raw data packed one after the other in the * same order as the list of files. * * (That info is from http://www.advsys.net/ken/build.htm ...) * * Please see the file LICENSE.txt in the source's root directory. * * This file written by Ryan C. Gordon. */ #define __PHYSICSFS_INTERNAL__ #include "physfs_internal.h" #if PHYSFS_SUPPORTS_GRP static int grpLoadEntries(PHYSFS_Io *io, const PHYSFS_uint32 count, void *arc) { PHYSFS_uint32 pos = 16 + (16 * count); /* past sig+metadata. */ PHYSFS_uint32 i; for (i = 0; i < count; i++) { char *ptr; char name[13]; PHYSFS_uint32 size; BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, name, 12), 0); BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, &size, 4), 0); name[12] = '\0'; /* name isn't null-terminated in file. */ if ((ptr = strchr(name, ' ')) != NULL) *ptr = '\0'; /* trim extra spaces. */ size = PHYSFS_swapULE32(size); BAIL_IF_ERRPASS(!UNPK_addEntry(arc, name, 0, -1, -1, pos, size), 0); pos += size; } /* for */ return 1; } /* grpLoadEntries */ static void *GRP_openArchive(PHYSFS_Io *io, const char *name, int forWriting, int *claimed) { PHYSFS_uint8 buf[12]; PHYSFS_uint32 count = 0; void *unpkarc = NULL; assert(io != NULL); /* shouldn't ever happen. */ BAIL_IF(forWriting, PHYSFS_ERR_READ_ONLY, NULL); BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, buf, sizeof (buf)), NULL); if (memcmp(buf, "KenSilverman", sizeof (buf)) != 0) BAIL(PHYSFS_ERR_UNSUPPORTED, NULL); *claimed = 1; BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, &count, sizeof(count)), NULL); count = PHYSFS_swapULE32(count); unpkarc = UNPK_openArchive(io, 0, 1); BAIL_IF_ERRPASS(!unpkarc, NULL); if (!grpLoadEntries(io, count, unpkarc)) { UNPK_abandonArchive(unpkarc); return NULL; } /* if */ return unpkarc; } /* GRP_openArchive */ const PHYSFS_Archiver __PHYSFS_Archiver_GRP = { CURRENT_PHYSFS_ARCHIVER_API_VERSION, { "GRP", "Build engine Groupfile format", "Ryan C. Gordon ", "https://icculus.org/physfs/", 0, /* supportsSymlinks */ }, GRP_openArchive, UNPK_enumerate, UNPK_openRead, UNPK_openWrite, UNPK_openAppend, UNPK_remove, UNPK_mkdir, UNPK_stat, UNPK_closeArchive }; #endif /* defined PHYSFS_SUPPORTS_GRP */ /* end of physfs_archiver_grp.c ... */ ================================================ FILE: src/libraries/physfs/physfs_archiver_hog.c ================================================ /* * HOG support routines for PhysicsFS. * * This driver handles Descent I/II/III HOG archives. * * The Descent I/II format is very simple: * * The file always starts with the 3-byte signature "DHF" (Descent * HOG file). After that the files of a HOG are just attached after * another, divided by a 17 bytes header, which specifies the name * and length (in bytes) of the forthcoming file! So you just read * the header with its information of how big the following file is, * and then skip exact that number of bytes to get to the next file * in that HOG. * * char sig[3] = {'D', 'H', 'F'}; // "DHF"=Descent HOG File * * struct { * char file_name[13]; // Filename, padded to 13 bytes with 0s * int file_size; // filesize in bytes * char data[file_size]; // The file data * } FILE_STRUCT; // Repeated until the end of the file. * * (That info is from http://www.descent2.com/ddn/specs/hog/) * * Descent 3 moved to HOG2 format, which starts with the chars "HOG2", * then 32-bits for the number of contained files, 32 bits for the offset * to the first file's data, then 56 bytes of 0xFF (reserved?). Then for * each file, there's 36 bytes for filename (null-terminated, rest of bytes * are garbage), 32-bits unknown/reserved (always zero?), 32-bits of length * of file data, 32-bits of time since Unix epoch. Then immediately following, * for each file is their uncompressed content, you can find its offset * by starting at the initial data offset and adding the filesize of each * prior file. * * This information was found at: * https://web.archive.org/web/20020213004051/http://descent-3.com/ddn/specs/hog/ * * * Please see the file LICENSE.txt in the source's root directory. * * This file written by Bradley Bell and Ryan C. Gordon. */ #define __PHYSICSFS_INTERNAL__ #include "physfs_internal.h" #if PHYSFS_SUPPORTS_HOG static int readui32(PHYSFS_Io *io, PHYSFS_uint32 *val) { PHYSFS_uint32 v; BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, &v, sizeof (v)), 0); *val = PHYSFS_swapULE32(v); return 1; } /* readui32 */ static int hog1LoadEntries(PHYSFS_Io *io, void *arc) { const PHYSFS_uint64 iolen = io->length(io); PHYSFS_uint32 pos = 3; while (pos < iolen) { PHYSFS_uint32 size; char name[13]; BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, name, 13), 0); BAIL_IF_ERRPASS(!readui32(io, &size), 0); name[12] = '\0'; /* just in case. */ pos += 13 + 4; BAIL_IF_ERRPASS(!UNPK_addEntry(arc, name, 0, -1, -1, pos, size), 0); pos += size; /* skip over entry */ BAIL_IF_ERRPASS(!io->seek(io, pos), 0); } /* while */ return 1; } /* hogLoadEntries */ static int hog2LoadEntries(PHYSFS_Io *io, void *arc) { PHYSFS_uint32 numfiles; PHYSFS_uint32 pos; PHYSFS_uint32 i; BAIL_IF_ERRPASS(!readui32(io, &numfiles), 0); BAIL_IF_ERRPASS(!readui32(io, &pos), 0); BAIL_IF_ERRPASS(!io->seek(io, 68), 0); /* skip to end of header. */ for (i = 0; i < numfiles; i++) { char name[37]; PHYSFS_uint32 reserved; PHYSFS_uint32 size; PHYSFS_uint32 mtime; BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, name, 36), 0); BAIL_IF_ERRPASS(!readui32(io, &reserved), 0); BAIL_IF_ERRPASS(!readui32(io, &size), 0); BAIL_IF_ERRPASS(!readui32(io, &mtime), 0); name[36] = '\0'; /* just in case */ BAIL_IF_ERRPASS(!UNPK_addEntry(arc, name, 0, mtime, mtime, pos, size), 0); pos += size; } return 1; } /* hog2LoadEntries */ static void *HOG_openArchive(PHYSFS_Io *io, const char *name, int forWriting, int *claimed) { PHYSFS_uint8 buf[3]; void *unpkarc = NULL; int hog1 = 0; assert(io != NULL); /* shouldn't ever happen. */ BAIL_IF(forWriting, PHYSFS_ERR_READ_ONLY, NULL); BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, buf, 3), NULL); if (memcmp(buf, "DHF", 3) == 0) hog1 = 1; /* original HOG (Descent 1 and 2) archive */ else { BAIL_IF(memcmp(buf, "HOG", 3) != 0, PHYSFS_ERR_UNSUPPORTED, NULL); /* Not HOG2 */ BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, buf, 1), NULL); BAIL_IF(buf[0] != '2', PHYSFS_ERR_UNSUPPORTED, NULL); /* Not HOG2 */ } /* else */ *claimed = 1; unpkarc = UNPK_openArchive(io, 0, 1); BAIL_IF_ERRPASS(!unpkarc, NULL); if (!(hog1 ? hog1LoadEntries(io, unpkarc) : hog2LoadEntries(io, unpkarc))) { UNPK_abandonArchive(unpkarc); return NULL; } /* if */ return unpkarc; } /* HOG_openArchive */ const PHYSFS_Archiver __PHYSFS_Archiver_HOG = { CURRENT_PHYSFS_ARCHIVER_API_VERSION, { "HOG", "Descent I/II/III HOG file format", "Bradley Bell ", "https://icculus.org/physfs/", 0, /* supportsSymlinks */ }, HOG_openArchive, UNPK_enumerate, UNPK_openRead, UNPK_openWrite, UNPK_openAppend, UNPK_remove, UNPK_mkdir, UNPK_stat, UNPK_closeArchive }; #endif /* defined PHYSFS_SUPPORTS_HOG */ /* end of physfs_archiver_hog.c ... */ ================================================ FILE: src/libraries/physfs/physfs_archiver_iso9660.c ================================================ /* * ISO9660 support routines for PhysicsFS. * * Please see the file LICENSE.txt in the source's root directory. * * This file originally written by Christoph Nelles, but was largely * rewritten by Ryan C. Gordon (so please harass Ryan about bugs and not * Christoph). */ /* * Handles CD-ROM disk images (and raw CD-ROM devices). * * Not supported: * - Rock Ridge (needed for sparse files, device nodes and symlinks, etc). * - Non 2048 Sectors * - TRANS.TBL (maps 8.3 filenames on old discs to long filenames). * - Multiextents (4gb max file size without it). * - UDF * * Deviations from the standard * - Ignores mandatory sort order * - Allows various invalid file names * * Problems * - Ambiguities in the standard */ #define __PHYSICSFS_INTERNAL__ #include "physfs_internal.h" #if PHYSFS_SUPPORTS_ISO9660 #include /* ISO9660 often stores values in both big and little endian formats: little first, followed by big. While technically there might be different values in each, we just always use the littleendian ones and swap ourselves. The fields aren't aligned anyhow, so you have to serialize them in any case to avoid crashes on many CPU archs in any case. */ static int iso9660LoadEntries(PHYSFS_Io *io, const int joliet, const char *base, const PHYSFS_uint64 dirstart, const PHYSFS_uint64 dirend, void *unpkarc); static int iso9660AddEntry(PHYSFS_Io *io, const int joliet, const int isdir, const char *base, PHYSFS_uint8 *fname, const int fnamelen, const PHYSFS_sint64 ts, const PHYSFS_uint64 pos, const PHYSFS_uint64 len, void *unpkarc) { char *fullpath; char *fnamecpy; size_t baselen; size_t fullpathlen; void *entry; int i; if (fnamelen == 1 && ((fname[0] == 0) || (fname[0] == 1))) return 1; /* Magic that represents "." and "..", ignore */ BAIL_IF(fnamelen == 0, PHYSFS_ERR_CORRUPT, 0); assert(fnamelen > 0); assert(fnamelen <= 255); BAIL_IF(joliet && (fnamelen % 2), PHYSFS_ERR_CORRUPT, 0); /* Joliet is UCS-2, so at most UTF-8 will double the byte size */ baselen = strlen(base); fullpathlen = baselen + (fnamelen * (joliet ? 2 : 1)) + 2; fullpath = (char *) __PHYSFS_smallAlloc(fullpathlen); BAIL_IF(!fullpath, PHYSFS_ERR_OUT_OF_MEMORY, 0); fnamecpy = fullpath; if (baselen > 0) { snprintf(fullpath, fullpathlen, "%s/", base); fnamecpy += baselen + 1; fullpathlen -= baselen - 1; } /* if */ if (joliet) { PHYSFS_uint16 *ucs2 = (PHYSFS_uint16 *) fname; int total = fnamelen / 2; for (i = 0; i < total; i++) ucs2[i] = PHYSFS_swapUBE16(ucs2[i]); ucs2[total] = '\0'; PHYSFS_utf8FromUcs2(ucs2, fnamecpy, fullpathlen); } /* if */ else { for (i = 0; i < fnamelen; i++) { /* We assume the filenames are low-ASCII; consider the archive corrupt if we see something above 127, since we don't know the encoding. (We can change this later if we find out these exist and are intended to be, say, latin-1 or UTF-8 encoding). */ BAIL_IF(fname[i] > 127, PHYSFS_ERR_CORRUPT, 0); fnamecpy[i] = fname[i]; } /* for */ fnamecpy[fnamelen] = '\0'; if (!isdir) { /* find last SEPARATOR2 */ char *ptr = strrchr(fnamecpy, ';'); if (ptr && (ptr != fnamecpy)) *(ptr--) = '\0'; else ptr = fnamecpy + (fnamelen - 1); /* chop out any trailing '.', as done in all implementations */ if (*ptr == '.') *ptr = '\0'; } /* if */ } /* else */ entry = UNPK_addEntry(unpkarc, fullpath, isdir, ts, ts, pos, len); if ((entry) && (isdir)) { if (!iso9660LoadEntries(io, joliet, fullpath, pos, pos + len, unpkarc)) entry = NULL; /* so we report a failure later. */ } /* if */ __PHYSFS_smallFree(fullpath); return entry != NULL; } /* iso9660AddEntry */ static int iso9660LoadEntries(PHYSFS_Io *io, const int joliet, const char *base, const PHYSFS_uint64 dirstart, const PHYSFS_uint64 dirend, void *unpkarc) { PHYSFS_uint64 readpos = dirstart; while (1) { PHYSFS_uint8 recordlen; PHYSFS_uint8 extattrlen; PHYSFS_uint32 extent; PHYSFS_uint32 datalen; PHYSFS_uint8 ignore[4]; PHYSFS_uint8 year, month, day, hour, minute, second, offset; PHYSFS_uint8 flags; PHYSFS_uint8 fnamelen; PHYSFS_uint8 fname[256]; PHYSFS_sint64 timestamp; struct tm t; int isdir; int multiextent; BAIL_IF_ERRPASS(!io->seek(io, readpos), 0); /* recordlen = 0 -> no more entries or fill entry */ BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, &recordlen, 1), 0); if (recordlen > 0) readpos += recordlen; /* ready to seek to next record. */ else { PHYSFS_uint64 nextpos; /* if we are in the last sector of the directory & it's 0 -> end */ if ((dirend - 2048) <= (readpos - 1)) break; /* finished */ /* else skip to the next sector & continue; */ nextpos = (((readpos - 1) / 2048) + 1) * 2048; /* whoops, can't make forward progress! */ BAIL_IF(nextpos == readpos, PHYSFS_ERR_CORRUPT, 0); readpos = nextpos; continue; /* start back at upper loop. */ } /* else */ BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, &extattrlen, 1), 0); BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, &extent, 4), 0); BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, ignore, 4), 0); /* extent be */ BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, &datalen, 4), 0); BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, ignore, 4), 0); /* datalen be */ /* record timestamp */ BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, &year, 1), 0); BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, &month, 1), 0); BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, &day, 1), 0); BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, &hour, 1), 0); BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, &minute, 1), 0); BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, &second, 1), 0); BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, &offset, 1), 0); BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, &flags, 1), 0); isdir = (flags & (1 << 1)) != 0; multiextent = (flags & (1 << 7)) != 0; BAIL_IF(multiextent, PHYSFS_ERR_UNSUPPORTED, 0); /* !!! FIXME */ BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, ignore, 1), 0); /* unit size */ BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, ignore, 1), 0); /* interleave gap */ BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, ignore, 2), 0); /* seqnum le */ BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, ignore, 2), 0); /* seqnum be */ BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, &fnamelen, 1), 0); BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, fname, fnamelen), 0); t.tm_sec = second; t.tm_min = minute; t.tm_hour = hour; t.tm_mday = day; t.tm_mon = month - 1; t.tm_year = year; t.tm_wday = 0; t.tm_yday = 0; t.tm_isdst = -1; timestamp = (PHYSFS_sint64) mktime(&t); extent += extattrlen; /* skip extended attribute record. */ /* infinite loop, corrupt file? */ BAIL_IF((extent * 2048) == dirstart, PHYSFS_ERR_CORRUPT, 0); if (!iso9660AddEntry(io, joliet, isdir, base, fname, fnamelen, timestamp, extent * 2048, datalen, unpkarc)) { return 0; } /* if */ } /* while */ return 1; } /* iso9660LoadEntries */ static int parseVolumeDescriptor(PHYSFS_Io *io, PHYSFS_uint64 *_rootpos, PHYSFS_uint64 *_rootlen, int *_joliet, int *_claimed) { PHYSFS_uint64 pos = 32768; /* start at the Primary Volume Descriptor */ int found = 0; int done = 0; *_joliet = 0; while (!done) { PHYSFS_uint8 type; PHYSFS_uint8 identifier[5]; PHYSFS_uint8 version; PHYSFS_uint8 flags; PHYSFS_uint8 escapeseqs[32]; PHYSFS_uint8 ignore[32]; PHYSFS_uint16 blocksize; PHYSFS_uint32 extent; PHYSFS_uint32 datalen; BAIL_IF_ERRPASS(!io->seek(io, pos), 0); pos += 2048; /* each volume descriptor is 2048 bytes */ BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, &type, 1), 0); BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, identifier, 5), 0); if (memcmp(identifier, "CD001", 5) != 0) /* maybe not an iso? */ { BAIL_IF(!*_claimed, PHYSFS_ERR_UNSUPPORTED, 0); continue; /* just skip this one */ } /* if */ *_claimed = 1; /* okay, this is probably an iso. */ BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, &version, 1), 0); /* version */ BAIL_IF(version != 1, PHYSFS_ERR_UNSUPPORTED, 0); BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, &flags, 1), 0); BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, ignore, 32), 0); /* system id */ BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, ignore, 32), 0); /* volume id */ BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, ignore, 8), 0); /* reserved */ BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, ignore, 4), 0); /* space le */ BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, ignore, 4), 0); /* space be */ BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, escapeseqs, 32), 0); BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, ignore, 2), 0); /* setsize le */ BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, ignore, 2), 0); /* setsize be */ BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, ignore, 2), 0); /* seq num le */ BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, ignore, 2), 0); /* seq num be */ BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, &blocksize, 2), 0); BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, ignore, 2), 0); /* blocklen be */ BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, ignore, 4), 0); /* pthtablen le */ BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, ignore, 4), 0); /* pthtablen be */ BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, ignore, 4), 0); /* pthtabpos le */ BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, ignore, 4), 0); /* optpthtabpos le */ BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, ignore, 4), 0); /* pthtabpos be */ BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, ignore, 4), 0); /* optpthtabpos be */ /* root directory record... */ BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, ignore, 1), 0); /* len */ BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, ignore, 1), 0); /* attr len */ BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, &extent, 4), 0); BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, ignore, 4), 0); /* extent be */ BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, &datalen, 4), 0); BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, ignore, 4), 0); /* datalen be */ /* !!! FIXME: deal with this properly. */ blocksize = PHYSFS_swapULE32(blocksize); BAIL_IF(blocksize && (blocksize != 2048), PHYSFS_ERR_UNSUPPORTED, 0); switch (type) { case 1: /* Primary Volume Descriptor */ case 2: /* Supplementary Volume Descriptor */ if (found < type) { *_rootpos = PHYSFS_swapULE32(extent) * 2048; *_rootlen = PHYSFS_swapULE32(datalen); found = type; if (found == 2) /* possible Joliet volume */ { const PHYSFS_uint8 *s = escapeseqs; *_joliet = !(flags & 1) && (s[0] == 0x25) && (s[1] == 0x2F) && ((s[2] == 0x40) || (s[2] == 0x43) || (s[2] == 0x45)); } /* if */ } /* if */ break; case 255: /* type 255 terminates the volume descriptor list */ done = 1; break; default: break; /* skip unknown types. */ } /* switch */ } /* while */ BAIL_IF(!found, PHYSFS_ERR_CORRUPT, 0); return 1; } /* parseVolumeDescriptor */ static void *ISO9660_openArchive(PHYSFS_Io *io, const char *filename, int forWriting, int *claimed) { PHYSFS_uint64 rootpos = 0; PHYSFS_uint64 len = 0; int joliet = 0; void *unpkarc = NULL; assert(io != NULL); /* shouldn't ever happen. */ BAIL_IF(forWriting, PHYSFS_ERR_READ_ONLY, NULL); if (!parseVolumeDescriptor(io, &rootpos, &len, &joliet, claimed)) return NULL; /* !!! FIXME: check case_sensitive and only_usascii params for this archive. */ unpkarc = UNPK_openArchive(io, 1, 0); BAIL_IF_ERRPASS(!unpkarc, NULL); if (!iso9660LoadEntries(io, joliet, "", rootpos, rootpos + len, unpkarc)) { UNPK_abandonArchive(unpkarc); return NULL; } /* if */ return unpkarc; } /* ISO9660_openArchive */ const PHYSFS_Archiver __PHYSFS_Archiver_ISO9660 = { CURRENT_PHYSFS_ARCHIVER_API_VERSION, { "ISO", "ISO9660 image file", "Ryan C. Gordon ", "https://icculus.org/physfs/", 0, /* supportsSymlinks */ }, ISO9660_openArchive, UNPK_enumerate, UNPK_openRead, UNPK_openWrite, UNPK_openAppend, UNPK_remove, UNPK_mkdir, UNPK_stat, UNPK_closeArchive }; #endif /* defined PHYSFS_SUPPORTS_ISO9660 */ /* end of physfs_archiver_iso9660.c ... */ ================================================ FILE: src/libraries/physfs/physfs_archiver_mvl.c ================================================ /* * MVL support routines for PhysicsFS. * * This driver handles Descent II Movielib archives. * * The file format of MVL is quite easy... * * //MVL File format - Written by Heiko Herrmann * char sig[4] = {'D','M', 'V', 'L'}; // "DMVL"=Descent MoVie Library * * int num_files; // the number of files in this MVL * * struct { * char file_name[13]; // Filename, padded to 13 bytes with 0s * int file_size; // filesize in bytes * }DIR_STRUCT[num_files]; * * struct { * char data[file_size]; // The file data * }FILE_STRUCT[num_files]; * * (That info is from http://www.descent2.com/ddn/specs/mvl/) * * Please see the file LICENSE.txt in the source's root directory. * * This file written by Bradley Bell. * Based on grp.c by Ryan C. Gordon. */ #define __PHYSICSFS_INTERNAL__ #include "physfs_internal.h" #if PHYSFS_SUPPORTS_MVL static int mvlLoadEntries(PHYSFS_Io *io, const PHYSFS_uint32 count, void *arc) { PHYSFS_uint32 pos = 8 + (17 * count); /* past sig+metadata. */ PHYSFS_uint32 i; for (i = 0; i < count; i++) { PHYSFS_uint32 size; char name[13]; BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, name, 13), 0); BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, &size, 4), 0); name[12] = '\0'; /* just in case. */ size = PHYSFS_swapULE32(size); BAIL_IF_ERRPASS(!UNPK_addEntry(arc, name, 0, -1, -1, pos, size), 0); pos += size; } /* for */ return 1; } /* mvlLoadEntries */ static void *MVL_openArchive(PHYSFS_Io *io, const char *name, int forWriting, int *claimed) { PHYSFS_uint8 buf[4]; PHYSFS_uint32 count = 0; void *unpkarc; assert(io != NULL); /* shouldn't ever happen. */ BAIL_IF(forWriting, PHYSFS_ERR_READ_ONLY, NULL); BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, buf, 4), NULL); BAIL_IF(memcmp(buf, "DMVL", 4) != 0, PHYSFS_ERR_UNSUPPORTED, NULL); *claimed = 1; BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, &count, sizeof(count)), NULL); count = PHYSFS_swapULE32(count); unpkarc = UNPK_openArchive(io, 0, 1); BAIL_IF_ERRPASS(!unpkarc, NULL); if (!mvlLoadEntries(io, count, unpkarc)) { UNPK_abandonArchive(unpkarc); return NULL; } /* if */ return unpkarc; } /* MVL_openArchive */ const PHYSFS_Archiver __PHYSFS_Archiver_MVL = { CURRENT_PHYSFS_ARCHIVER_API_VERSION, { "MVL", "Descent II Movielib format", "Bradley Bell ", "https://icculus.org/physfs/", 0, /* supportsSymlinks */ }, MVL_openArchive, UNPK_enumerate, UNPK_openRead, UNPK_openWrite, UNPK_openAppend, UNPK_remove, UNPK_mkdir, UNPK_stat, UNPK_closeArchive }; #endif /* defined PHYSFS_SUPPORTS_MVL */ /* end of physfs_archiver_mvl.c ... */ ================================================ FILE: src/libraries/physfs/physfs_archiver_qpak.c ================================================ /* * QPAK support routines for PhysicsFS. * * This archiver handles the archive format utilized by Quake 1 and 2. * Quake3-based games use the PkZip/Info-Zip format (which our * physfs_archiver_zip.c handles). * * ======================================================================== * * This format info (in more detail) comes from: * https://web.archive.org/web/20040209101748/http://debian.fmi.uni-sofia.bg/~sergei/cgsr/docs/pak.txt * * Quake PAK Format * * Header * (4 bytes) signature = 'PACK' * (4 bytes) directory offset * (4 bytes) directory length * * Directory * (56 bytes) file name * (4 bytes) file position * (4 bytes) file length * * ======================================================================== * * Please see the file LICENSE.txt in the source's root directory. * * This file written by Ryan C. Gordon. */ #define __PHYSICSFS_INTERNAL__ #include "physfs_internal.h" #if PHYSFS_SUPPORTS_QPAK #define QPAK_SIG 0x4B434150 /* "PACK" in ASCII. */ static int qpakLoadEntries(PHYSFS_Io *io, const PHYSFS_uint32 count, void *arc) { PHYSFS_uint32 i; for (i = 0; i < count; i++) { PHYSFS_uint32 size; PHYSFS_uint32 pos; char name[56]; BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, name, 56), 0); BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, &pos, 4), 0); BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, &size, 4), 0); size = PHYSFS_swapULE32(size); pos = PHYSFS_swapULE32(pos); BAIL_IF_ERRPASS(!UNPK_addEntry(arc, name, 0, -1, -1, pos, size), 0); } /* for */ return 1; } /* qpakLoadEntries */ static void *QPAK_openArchive(PHYSFS_Io *io, const char *name, int forWriting, int *claimed) { PHYSFS_uint32 val = 0; PHYSFS_uint32 pos = 0; PHYSFS_uint32 count = 0; void *unpkarc; assert(io != NULL); /* shouldn't ever happen. */ BAIL_IF(forWriting, PHYSFS_ERR_READ_ONLY, NULL); BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, &val, 4), NULL); if (PHYSFS_swapULE32(val) != QPAK_SIG) BAIL(PHYSFS_ERR_UNSUPPORTED, NULL); *claimed = 1; BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, &val, 4), NULL); pos = PHYSFS_swapULE32(val); /* directory table offset. */ BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, &val, 4), NULL); count = PHYSFS_swapULE32(val); /* corrupted archive? */ BAIL_IF((count % 64) != 0, PHYSFS_ERR_CORRUPT, NULL); count /= 64; BAIL_IF_ERRPASS(!io->seek(io, pos), NULL); /* !!! FIXME: check case_sensitive and only_usascii params for this archive. */ unpkarc = UNPK_openArchive(io, 1, 0); BAIL_IF_ERRPASS(!unpkarc, NULL); if (!qpakLoadEntries(io, count, unpkarc)) { UNPK_abandonArchive(unpkarc); return NULL; } /* if */ return unpkarc; } /* QPAK_openArchive */ const PHYSFS_Archiver __PHYSFS_Archiver_QPAK = { CURRENT_PHYSFS_ARCHIVER_API_VERSION, { "PAK", "Quake I/II format", "Ryan C. Gordon ", "https://icculus.org/physfs/", 0, /* supportsSymlinks */ }, QPAK_openArchive, UNPK_enumerate, UNPK_openRead, UNPK_openWrite, UNPK_openAppend, UNPK_remove, UNPK_mkdir, UNPK_stat, UNPK_closeArchive }; #endif /* defined PHYSFS_SUPPORTS_QPAK */ /* end of physfs_archiver_qpak.c ... */ ================================================ FILE: src/libraries/physfs/physfs_archiver_slb.c ================================================ /* * SLB support routines for PhysicsFS. * * This driver handles SLB archives ("slab files"). This uncompressed format * is used in I-War / Independence War and Independence War: Defiance. * * The format begins with four zero bytes (version?), the file count and the * location of the table of contents. Each ToC entry contains a 64-byte buffer * containing a zero-terminated filename, the offset of the data, and its size. * All the filenames begin with the separator character '\'. * * Please see the file LICENSE.txt in the source's root directory. * * This file written by Aleksi Nurmi, based on the GRP archiver by * Ryan C. Gordon. */ #define __PHYSICSFS_INTERNAL__ #include "physfs_internal.h" #if PHYSFS_SUPPORTS_SLB static int slbLoadEntries(PHYSFS_Io *io, const PHYSFS_uint32 count, void *arc) { PHYSFS_uint32 i; for (i = 0; i < count; i++) { PHYSFS_uint32 pos; PHYSFS_uint32 size; char name[64]; char backslash; char *ptr; /* don't include the '\' in the beginning */ BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, &backslash, 1), 0); BAIL_IF(backslash != '\\', PHYSFS_ERR_CORRUPT, 0); /* read the rest of the buffer, 63 bytes */ BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, name, 63), 0); name[63] = '\0'; /* in case the name lacks the null terminator */ /* convert backslashes */ for (ptr = name; *ptr; ptr++) { if (*ptr == '\\') *ptr = '/'; } /* for */ BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, &pos, 4), 0); pos = PHYSFS_swapULE32(pos); BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, &size, 4), 0); size = PHYSFS_swapULE32(size); BAIL_IF_ERRPASS(!UNPK_addEntry(arc, name, 0, -1, -1, pos, size), 0); } /* for */ return 1; } /* slbLoadEntries */ static void *SLB_openArchive(PHYSFS_Io *io, const char *name, int forWriting, int *claimed) { PHYSFS_uint32 version; PHYSFS_uint32 count; PHYSFS_uint32 tocPos; void *unpkarc; /* There's no identifier on an SLB file, so we assume it's _not_ if the file count or tocPos is zero. Beyond that, we'll assume it's bogus/corrupt if the entries' filenames don't start with '\' or the tocPos is past the end of the file (seek will fail). This probably covers all meaningful cases where we would accidentally accept a non-SLB file with this archiver. */ assert(io != NULL); /* shouldn't ever happen. */ BAIL_IF(forWriting, PHYSFS_ERR_READ_ONLY, NULL); BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, &version, sizeof (version)), NULL); version = PHYSFS_swapULE32(version); BAIL_IF(version != 0, PHYSFS_ERR_UNSUPPORTED, NULL); BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, &count, sizeof (count)), NULL); count = PHYSFS_swapULE32(count); BAIL_IF(!count, PHYSFS_ERR_UNSUPPORTED, NULL); /* offset of the table of contents */ BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, &tocPos, sizeof (tocPos)), NULL); tocPos = PHYSFS_swapULE32(tocPos); BAIL_IF(!tocPos, PHYSFS_ERR_UNSUPPORTED, NULL); /* seek to the table of contents */ BAIL_IF_ERRPASS(!io->seek(io, tocPos), NULL); /* !!! FIXME: check case_sensitive and only_usascii params for this archive. */ unpkarc = UNPK_openArchive(io, 1, 0); BAIL_IF_ERRPASS(!unpkarc, NULL); if (!slbLoadEntries(io, count, unpkarc)) { UNPK_abandonArchive(unpkarc); return NULL; } /* if */ *claimed = 1; /* oh well. */ return unpkarc; } /* SLB_openArchive */ const PHYSFS_Archiver __PHYSFS_Archiver_SLB = { CURRENT_PHYSFS_ARCHIVER_API_VERSION, { "SLB", "I-War / Independence War Slab file", "Aleksi Nurmi ", "https://bitbucket.org/ahnurmi/", 0, /* supportsSymlinks */ }, SLB_openArchive, UNPK_enumerate, UNPK_openRead, UNPK_openWrite, UNPK_openAppend, UNPK_remove, UNPK_mkdir, UNPK_stat, UNPK_closeArchive }; #endif /* defined PHYSFS_SUPPORTS_SLB */ /* end of physfs_archiver_slb.c ... */ ================================================ FILE: src/libraries/physfs/physfs_archiver_unpacked.c ================================================ /* * High-level PhysicsFS archiver for simple unpacked file formats. * * This is a framework that basic archivers build on top of. It's for simple * formats that can just hand back a list of files and the offsets of their * uncompressed data. There are an alarming number of formats like this. * * RULES: Archive entries must be uncompressed. Dirs and files allowed, but no * symlinks, etc. We can relax some of these rules as necessary. * * Please see the file LICENSE.txt in the source's root directory. * * This file written by Ryan C. Gordon. */ #define __PHYSICSFS_INTERNAL__ #include "physfs_internal.h" typedef struct { __PHYSFS_DirTree tree; PHYSFS_Io *io; } UNPKinfo; typedef struct { __PHYSFS_DirTreeEntry tree; PHYSFS_uint64 startPos; PHYSFS_uint64 size; PHYSFS_sint64 ctime; PHYSFS_sint64 mtime; } UNPKentry; typedef struct { PHYSFS_Io *io; UNPKentry *entry; PHYSFS_uint32 curPos; } UNPKfileinfo; void UNPK_closeArchive(void *opaque) { UNPKinfo *info = ((UNPKinfo *) opaque); if (info) { __PHYSFS_DirTreeDeinit(&info->tree); if (info->io) info->io->destroy(info->io); allocator.Free(info); } /* if */ } /* UNPK_closeArchive */ void UNPK_abandonArchive(void *opaque) { UNPKinfo *info = ((UNPKinfo *) opaque); if (info) { info->io = NULL; UNPK_closeArchive(info); } /* if */ } /* UNPK_abandonArchive */ static PHYSFS_sint64 UNPK_read(PHYSFS_Io *io, void *buffer, PHYSFS_uint64 len) { UNPKfileinfo *finfo = (UNPKfileinfo *) io->opaque; const UNPKentry *entry = finfo->entry; const PHYSFS_uint64 bytesLeft = (PHYSFS_uint64)(entry->size-finfo->curPos); PHYSFS_sint64 rc; if (bytesLeft < len) len = bytesLeft; rc = finfo->io->read(finfo->io, buffer, len); if (rc > 0) finfo->curPos += (PHYSFS_uint32) rc; return rc; } /* UNPK_read */ static PHYSFS_sint64 UNPK_write(PHYSFS_Io *io, const void *b, PHYSFS_uint64 len) { BAIL(PHYSFS_ERR_READ_ONLY, -1); } /* UNPK_write */ static PHYSFS_sint64 UNPK_tell(PHYSFS_Io *io) { return ((UNPKfileinfo *) io->opaque)->curPos; } /* UNPK_tell */ static int UNPK_seek(PHYSFS_Io *io, PHYSFS_uint64 offset) { UNPKfileinfo *finfo = (UNPKfileinfo *) io->opaque; const UNPKentry *entry = finfo->entry; int rc; BAIL_IF(offset >= entry->size, PHYSFS_ERR_PAST_EOF, 0); rc = finfo->io->seek(finfo->io, entry->startPos + offset); if (rc) finfo->curPos = (PHYSFS_uint32) offset; return rc; } /* UNPK_seek */ static PHYSFS_sint64 UNPK_length(PHYSFS_Io *io) { const UNPKfileinfo *finfo = (UNPKfileinfo *) io->opaque; return ((PHYSFS_sint64) finfo->entry->size); } /* UNPK_length */ static PHYSFS_Io *UNPK_duplicate(PHYSFS_Io *_io) { UNPKfileinfo *origfinfo = (UNPKfileinfo *) _io->opaque; PHYSFS_Io *io = NULL; PHYSFS_Io *retval = (PHYSFS_Io *) allocator.Malloc(sizeof (PHYSFS_Io)); UNPKfileinfo *finfo = (UNPKfileinfo *) allocator.Malloc(sizeof (UNPKfileinfo)); GOTO_IF(!retval, PHYSFS_ERR_OUT_OF_MEMORY, UNPK_duplicate_failed); GOTO_IF(!finfo, PHYSFS_ERR_OUT_OF_MEMORY, UNPK_duplicate_failed); io = origfinfo->io->duplicate(origfinfo->io); if (!io) goto UNPK_duplicate_failed; finfo->io = io; finfo->entry = origfinfo->entry; finfo->curPos = 0; memcpy(retval, _io, sizeof (PHYSFS_Io)); retval->opaque = finfo; return retval; UNPK_duplicate_failed: if (finfo != NULL) allocator.Free(finfo); if (retval != NULL) allocator.Free(retval); if (io != NULL) io->destroy(io); return NULL; } /* UNPK_duplicate */ static int UNPK_flush(PHYSFS_Io *io) { return 1; /* no write support. */ } static void UNPK_destroy(PHYSFS_Io *io) { UNPKfileinfo *finfo = (UNPKfileinfo *) io->opaque; finfo->io->destroy(finfo->io); allocator.Free(finfo); allocator.Free(io); } /* UNPK_destroy */ static const PHYSFS_Io UNPK_Io = { CURRENT_PHYSFS_IO_API_VERSION, NULL, UNPK_read, UNPK_write, UNPK_seek, UNPK_tell, UNPK_length, UNPK_duplicate, UNPK_flush, UNPK_destroy }; static inline UNPKentry *findEntry(UNPKinfo *info, const char *path) { return (UNPKentry *) __PHYSFS_DirTreeFind(&info->tree, path); } /* findEntry */ PHYSFS_Io *UNPK_openRead(void *opaque, const char *name) { PHYSFS_Io *retval = NULL; UNPKinfo *info = (UNPKinfo *) opaque; UNPKfileinfo *finfo = NULL; UNPKentry *entry = findEntry(info, name); BAIL_IF_ERRPASS(!entry, NULL); BAIL_IF(entry->tree.isdir, PHYSFS_ERR_NOT_A_FILE, NULL); retval = (PHYSFS_Io *) allocator.Malloc(sizeof (PHYSFS_Io)); GOTO_IF(!retval, PHYSFS_ERR_OUT_OF_MEMORY, UNPK_openRead_failed); finfo = (UNPKfileinfo *) allocator.Malloc(sizeof (UNPKfileinfo)); GOTO_IF(!finfo, PHYSFS_ERR_OUT_OF_MEMORY, UNPK_openRead_failed); finfo->io = info->io->duplicate(info->io); GOTO_IF_ERRPASS(!finfo->io, UNPK_openRead_failed); if (!finfo->io->seek(finfo->io, entry->startPos)) goto UNPK_openRead_failed; finfo->curPos = 0; finfo->entry = entry; memcpy(retval, &UNPK_Io, sizeof (*retval)); retval->opaque = finfo; return retval; UNPK_openRead_failed: if (finfo != NULL) { if (finfo->io != NULL) finfo->io->destroy(finfo->io); allocator.Free(finfo); } /* if */ if (retval != NULL) allocator.Free(retval); return NULL; } /* UNPK_openRead */ PHYSFS_Io *UNPK_openWrite(void *opaque, const char *name) { BAIL(PHYSFS_ERR_READ_ONLY, NULL); } /* UNPK_openWrite */ PHYSFS_Io *UNPK_openAppend(void *opaque, const char *name) { BAIL(PHYSFS_ERR_READ_ONLY, NULL); } /* UNPK_openAppend */ int UNPK_remove(void *opaque, const char *name) { BAIL(PHYSFS_ERR_READ_ONLY, 0); } /* UNPK_remove */ int UNPK_mkdir(void *opaque, const char *name) { BAIL(PHYSFS_ERR_READ_ONLY, 0); } /* UNPK_mkdir */ int UNPK_stat(void *opaque, const char *path, PHYSFS_Stat *stat) { UNPKinfo *info = (UNPKinfo *) opaque; const UNPKentry *entry = findEntry(info, path); BAIL_IF_ERRPASS(!entry, 0); if (entry->tree.isdir) { stat->filetype = PHYSFS_FILETYPE_DIRECTORY; stat->filesize = 0; } /* if */ else { stat->filetype = PHYSFS_FILETYPE_REGULAR; stat->filesize = entry->size; } /* else */ stat->modtime = entry->mtime; stat->createtime = entry->ctime; stat->accesstime = -1; stat->readonly = 1; return 1; } /* UNPK_stat */ void *UNPK_addEntry(void *opaque, char *name, const int isdir, const PHYSFS_sint64 ctime, const PHYSFS_sint64 mtime, const PHYSFS_uint64 pos, const PHYSFS_uint64 len) { UNPKinfo *info = (UNPKinfo *) opaque; UNPKentry *entry; entry = (UNPKentry *) __PHYSFS_DirTreeAdd(&info->tree, name, isdir); BAIL_IF_ERRPASS(!entry, NULL); entry->startPos = isdir ? 0 : pos; entry->size = isdir ? 0 : len; entry->ctime = ctime; entry->mtime = mtime; return entry; } /* UNPK_addEntry */ void *UNPK_openArchive(PHYSFS_Io *io, const int case_sensitive, const int only_usascii) { UNPKinfo *info = (UNPKinfo *) allocator.Malloc(sizeof (UNPKinfo)); BAIL_IF(!info, PHYSFS_ERR_OUT_OF_MEMORY, NULL); if (!__PHYSFS_DirTreeInit(&info->tree, sizeof (UNPKentry), case_sensitive, only_usascii)) { allocator.Free(info); return NULL; } /* if */ info->io = io; return info; } /* UNPK_openArchive */ /* end of physfs_archiver_unpacked.c ... */ ================================================ FILE: src/libraries/physfs/physfs_archiver_vdf.c ================================================ /* * VDF support routines for PhysicsFS. * * This driver handles Gothic I/II VDF archives. * This format (but not this driver) was designed by Piranha Bytes for * use wih the ZenGin engine. * * This file was written by Francesco Bertolaccini, based on the UNPK archiver * by Ryan C. Gordon and the works of degenerated1123 and Nico Bendlin. */ #define __PHYSICSFS_INTERNAL__ #include "physfs_internal.h" #if PHYSFS_SUPPORTS_VDF #include #define VDF_COMMENT_LENGTH 256 #define VDF_SIGNATURE_LENGTH 16 #define VDF_ENTRY_NAME_LENGTH 64 #define VDF_ENTRY_DIR 0x80000000 static const char* VDF_SIGNATURE_G1 = "PSVDSC_V2.00\r\n\r\n"; static const char* VDF_SIGNATURE_G2 = "PSVDSC_V2.00\n\r\n\r"; static inline int readui32(PHYSFS_Io *io, PHYSFS_uint32 *val) { PHYSFS_uint32 v; BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, &v, sizeof (v)), 0); *val = PHYSFS_swapULE32(v); return 1; } /* readui32 */ static PHYSFS_sint64 vdfDosTimeToEpoch(const PHYSFS_uint32 dostime) { /* VDF stores timestamps as 32bit DOS dates: the seconds are counted in 2-seconds intervals and the years are counted since 1 Jan. 1980 */ struct tm t; memset(&t, '\0', sizeof (t)); t.tm_year = ((int) ((dostime >> 25) & 0x7F)) + 80; /* 1980 to 1900 */ t.tm_mon = ((int) ((dostime >> 21) & 0xF)) - 1; /* 1-12 to 0-11 */ t.tm_mday = (int) ((dostime >> 16) & 0x1F); t.tm_hour = (int) ((dostime >> 11) & 0x1F); t.tm_min = (int) ((dostime >> 5) & 0x3F); t.tm_sec = ((int) ((dostime >> 0) & 0x1F)) * 2; /* 2 seconds to 1. */ return (PHYSFS_sint64) mktime(&t); } /* vdfDosTimeToEpoch */ static int vdfLoadEntries(PHYSFS_Io *io, const PHYSFS_uint32 count, const PHYSFS_sint64 ts, void *arc) { PHYSFS_uint32 i; for (i = 0; i < count; i++) { char name[VDF_ENTRY_NAME_LENGTH + 1]; int namei; PHYSFS_uint32 jump, size, type, attr; BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, name, sizeof (name) - 1), 0); BAIL_IF_ERRPASS(!readui32(io, &jump), 0); BAIL_IF_ERRPASS(!readui32(io, &size), 0); BAIL_IF_ERRPASS(!readui32(io, &type), 0); BAIL_IF_ERRPASS(!readui32(io, &attr), 0); /* Trim whitespace off the end of the filename */ name[VDF_ENTRY_NAME_LENGTH] = '\0'; /* always null-terminated. */ for (namei = VDF_ENTRY_NAME_LENGTH - 1; namei >= 0; namei--) { /* We assume the filenames are low-ASCII; consider the archive corrupt if we see something above 127, since we don't know the encoding. (We can change this later if we find out these exist and are intended to be, say, latin-1 or UTF-8 encoding). */ BAIL_IF(((PHYSFS_uint8) name[namei]) > 127, PHYSFS_ERR_CORRUPT, 0); if (name[namei] == ' ') name[namei] = '\0'; else break; } /* for */ BAIL_IF(!name[0], PHYSFS_ERR_CORRUPT, 0); if (!(type & VDF_ENTRY_DIR)) { BAIL_IF_ERRPASS(!UNPK_addEntry(arc, name, 0, ts, ts, jump, size), 0); } } /* for */ return 1; } /* vdfLoadEntries */ static void *VDF_openArchive(PHYSFS_Io *io, const char *name, int forWriting, int *claimed) { PHYSFS_uint8 ignore[16]; PHYSFS_uint8 sig[VDF_SIGNATURE_LENGTH]; PHYSFS_uint32 count, timestamp, version, dataSize, rootCatOffset; void *unpkarc; assert(io != NULL); /* shouldn't ever happen. */ BAIL_IF(forWriting, PHYSFS_ERR_READ_ONLY, NULL); /* skip the 256-byte comment field. */ BAIL_IF_ERRPASS(!io->seek(io, VDF_COMMENT_LENGTH), NULL); BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, sig, sizeof (sig)), NULL); if ((memcmp(sig, VDF_SIGNATURE_G1, VDF_SIGNATURE_LENGTH) != 0) && (memcmp(sig, VDF_SIGNATURE_G2, VDF_SIGNATURE_LENGTH) != 0)) { BAIL(PHYSFS_ERR_UNSUPPORTED, NULL); } /* if */ *claimed = 1; BAIL_IF_ERRPASS(!readui32(io, &count), NULL); BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, ignore, 4), NULL); /* numFiles */ BAIL_IF_ERRPASS(!readui32(io, ×tamp), NULL); BAIL_IF_ERRPASS(!readui32(io, &dataSize), NULL); /* dataSize */ BAIL_IF_ERRPASS(!readui32(io, &rootCatOffset), NULL); /* rootCatOff */ BAIL_IF_ERRPASS(!readui32(io, &version), NULL); BAIL_IF(version != 0x50, PHYSFS_ERR_UNSUPPORTED, NULL); BAIL_IF_ERRPASS(!io->seek(io, rootCatOffset), NULL); /* !!! FIXME: check case_sensitive and only_usascii params for this archive. */ unpkarc = UNPK_openArchive(io, 1, 0); BAIL_IF_ERRPASS(!unpkarc, NULL); if (!vdfLoadEntries(io, count, vdfDosTimeToEpoch(timestamp), unpkarc)) { UNPK_abandonArchive(unpkarc); return NULL; } /* if */ return unpkarc; } /* VDF_openArchive */ const PHYSFS_Archiver __PHYSFS_Archiver_VDF = { CURRENT_PHYSFS_ARCHIVER_API_VERSION, { "VDF", "Gothic I/II engine format", "Francesco Bertolaccini ", "https://github.com/frabert", 0, /* supportsSymlinks */ }, VDF_openArchive, UNPK_enumerate, UNPK_openRead, UNPK_openWrite, UNPK_openAppend, UNPK_remove, UNPK_mkdir, UNPK_stat, UNPK_closeArchive }; #endif /* defined PHYSFS_SUPPORTS_VDF */ /* end of physfs_archiver_vdf.c ... */ ================================================ FILE: src/libraries/physfs/physfs_archiver_wad.c ================================================ /* * WAD support routines for PhysicsFS. * * This driver handles DOOM engine archives ("wads"). * This format (but not this driver) was designed by id Software for use * with the DOOM engine. * The specs of the format are from the unofficial doom specs v1.666 * found here: http://www.gamers.org/dhs/helpdocs/dmsp1666.html * The format of the archive: (from the specs) * * A WAD file has three parts: * (1) a twelve-byte header * (2) one or more "lumps" * (3) a directory or "info table" that contains the names, offsets, and * sizes of all the lumps in the WAD * * The header consists of three four-byte parts: * (a) an ASCII string which must be either "IWAD" or "PWAD" * (b) a uint32 which is the number of lumps in the wad * (c) a uint32 which is the file offset to the start of * the directory * * The directory has one 16-byte entry for every lump. Each entry consists * of three parts: * * (a) a uint32, the file offset to the start of the lump * (b) a uint32, the size of the lump in bytes * (c) an 8-byte ASCII string, the name of the lump, padded with zeros. * For example, the "DEMO1" entry in hexadecimal would be * (44 45 4D 4F 31 00 00 00) * * Note that there is no way to tell if an opened WAD archive is a * IWAD or PWAD with this archiver. * I couldn't think of a way to provide that information, without being too * hacky. * I don't think it's really that important though. * * * Please see the file LICENSE.txt in the source's root directory. * * This file written by Travis Wells, based on the GRP archiver by * Ryan C. Gordon. */ #define __PHYSICSFS_INTERNAL__ #include "physfs_internal.h" #if PHYSFS_SUPPORTS_WAD static int wadLoadEntries(PHYSFS_Io *io, const PHYSFS_uint32 count, void *arc) { PHYSFS_uint32 i; for (i = 0; i < count; i++) { PHYSFS_uint32 pos; PHYSFS_uint32 size; char name[9]; BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, &pos, 4), 0); BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, &size, 4), 0); BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, name, 8), 0); name[8] = '\0'; /* name might not be null-terminated in file. */ size = PHYSFS_swapULE32(size); pos = PHYSFS_swapULE32(pos); BAIL_IF_ERRPASS(!UNPK_addEntry(arc, name, 0, -1, -1, pos, size), 0); } /* for */ return 1; } /* wadLoadEntries */ static void *WAD_openArchive(PHYSFS_Io *io, const char *name, int forWriting, int *claimed) { PHYSFS_uint8 buf[4]; PHYSFS_uint32 count; PHYSFS_uint32 directoryOffset; void *unpkarc; assert(io != NULL); /* shouldn't ever happen. */ BAIL_IF(forWriting, PHYSFS_ERR_READ_ONLY, NULL); BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, buf, sizeof (buf)), NULL); if ((memcmp(buf, "IWAD", 4) != 0) && (memcmp(buf, "PWAD", 4) != 0)) BAIL(PHYSFS_ERR_UNSUPPORTED, NULL); *claimed = 1; BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, &count, sizeof (count)), NULL); count = PHYSFS_swapULE32(count); BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, &directoryOffset, 4), 0); directoryOffset = PHYSFS_swapULE32(directoryOffset); BAIL_IF_ERRPASS(!io->seek(io, directoryOffset), 0); unpkarc = UNPK_openArchive(io, 0, 1); BAIL_IF_ERRPASS(!unpkarc, NULL); if (!wadLoadEntries(io, count, unpkarc)) { UNPK_abandonArchive(unpkarc); return NULL; } /* if */ return unpkarc; } /* WAD_openArchive */ const PHYSFS_Archiver __PHYSFS_Archiver_WAD = { CURRENT_PHYSFS_ARCHIVER_API_VERSION, { "WAD", "DOOM engine format", "Travis Wells ", "http://www.3dmm2.com/doom/", 0, /* supportsSymlinks */ }, WAD_openArchive, UNPK_enumerate, UNPK_openRead, UNPK_openWrite, UNPK_openAppend, UNPK_remove, UNPK_mkdir, UNPK_stat, UNPK_closeArchive }; #endif /* defined PHYSFS_SUPPORTS_WAD */ /* end of physfs_archiver_wad.c ... */ ================================================ FILE: src/libraries/physfs/physfs_archiver_zip.c ================================================ /* * ZIP support routines for PhysicsFS. * * Please see the file LICENSE.txt in the source's root directory. * * This file written by Ryan C. Gordon, with some peeking at "unzip.c" * by Gilles Vollant. */ #define __PHYSICSFS_INTERNAL__ #include "physfs_internal.h" #if PHYSFS_SUPPORTS_ZIP #include #include #if (PHYSFS_BYTEORDER == PHYSFS_LIL_ENDIAN) #define MINIZ_LITTLE_ENDIAN 1 #else #define MINIZ_LITTLE_ENDIAN 0 #endif #include "physfs_miniz.h" /* * A buffer of ZIP_READBUFSIZE is allocated for each compressed file opened, * and is freed when you close the file; compressed data is read into * this buffer, and then is decompressed into the buffer passed to * PHYSFS_read(). * * Uncompressed entries in a zipfile do not allocate this buffer; they just * read data directly into the buffer passed to PHYSFS_read(). * * Depending on your speed and memory requirements, you should tweak this * value. */ #define ZIP_READBUFSIZE (16 * 1024) /* * Entries are "unresolved" until they are first opened. At that time, * local file headers parsed/validated, data offsets will be updated to look * at the actual file data instead of the header, and symlinks will be * followed and optimized. This means that we don't seek and read around the * archive until forced to do so, and after the first time, we had to do * less reading and parsing, which is very CD-ROM friendly. */ typedef enum { ZIP_UNRESOLVED_FILE, ZIP_UNRESOLVED_SYMLINK, ZIP_RESOLVING, ZIP_RESOLVED, ZIP_DIRECTORY, ZIP_BROKEN_FILE, ZIP_BROKEN_SYMLINK } ZipResolveType; /* * One ZIPentry is kept for each file in an open ZIP archive. */ typedef struct _ZIPentry { __PHYSFS_DirTreeEntry tree; /* manages directory tree */ struct _ZIPentry *symlink; /* NULL or file we symlink to */ ZipResolveType resolved; /* Have we resolved file/symlink? */ PHYSFS_uint64 offset; /* offset of data in archive */ PHYSFS_uint16 version; /* version made by */ PHYSFS_uint16 version_needed; /* version needed to extract */ PHYSFS_uint16 general_bits; /* general purpose bits */ PHYSFS_uint16 compression_method; /* compression method */ PHYSFS_uint32 crc; /* crc-32 */ PHYSFS_uint64 compressed_size; /* compressed size */ PHYSFS_uint64 uncompressed_size; /* uncompressed size */ PHYSFS_sint64 last_mod_time; /* last file mod time */ PHYSFS_uint32 dos_mod_time; /* original MS-DOS style mod time */ } ZIPentry; /* * One ZIPinfo is kept for each open ZIP archive. */ typedef struct { __PHYSFS_DirTree tree; /* manages directory tree. */ PHYSFS_Io *io; /* the i/o interface for this archive. */ int zip64; /* non-zero if this is a Zip64 archive. */ int has_crypto; /* non-zero if any entry uses encryption. */ } ZIPinfo; /* * One ZIPfileinfo is kept for each open file in a ZIP archive. */ typedef struct { ZIPentry *entry; /* Info on file. */ PHYSFS_Io *io; /* physical file handle. */ PHYSFS_uint32 compressed_position; /* offset in compressed data. */ PHYSFS_uint32 uncompressed_position; /* tell() position. */ PHYSFS_uint8 *buffer; /* decompression buffer. */ PHYSFS_uint32 crypto_keys[3]; /* for "traditional" crypto. */ PHYSFS_uint32 initial_crypto_keys[3]; /* for "traditional" crypto. */ z_stream stream; /* zlib stream state. */ } ZIPfileinfo; /* Magic numbers... */ #define ZIP_LOCAL_FILE_SIG 0x04034b50 #define ZIP_CENTRAL_DIR_SIG 0x02014b50 #define ZIP_END_OF_CENTRAL_DIR_SIG 0x06054b50 #define ZIP64_END_OF_CENTRAL_DIR_SIG 0x06064b50 #define ZIP64_END_OF_CENTRAL_DIRECTORY_LOCATOR_SIG 0x07064b50 #define ZIP64_EXTENDED_INFO_EXTRA_FIELD_SIG 0x0001 /* compression methods... */ #define COMPMETH_NONE 0 /* ...and others... */ #define UNIX_FILETYPE_MASK 0170000 #define UNIX_FILETYPE_SYMLINK 0120000 #define ZIP_GENERAL_BITS_TRADITIONAL_CRYPTO (1 << 0) #define ZIP_GENERAL_BITS_IGNORE_LOCAL_HEADER (1 << 3) /* support for "traditional" PKWARE encryption. */ static int zip_entry_is_tradional_crypto(const ZIPentry *entry) { return (entry->general_bits & ZIP_GENERAL_BITS_TRADITIONAL_CRYPTO) != 0; } /* zip_entry_is_traditional_crypto */ static int zip_entry_ignore_local_header(const ZIPentry *entry) { return (entry->general_bits & ZIP_GENERAL_BITS_IGNORE_LOCAL_HEADER) != 0; } /* zip_entry_is_traditional_crypto */ static PHYSFS_uint32 zip_crypto_crc32(const PHYSFS_uint32 crc, const PHYSFS_uint8 val) { int i; PHYSFS_uint32 xorval = (crc ^ ((PHYSFS_uint32) val)) & 0xFF; for (i = 0; i < 8; i++) xorval = ((xorval & 1) ? (0xEDB88320 ^ (xorval >> 1)) : (xorval >> 1)); return xorval ^ (crc >> 8); } /* zip_crc32 */ static void zip_update_crypto_keys(PHYSFS_uint32 *keys, const PHYSFS_uint8 val) { keys[0] = zip_crypto_crc32(keys[0], val); keys[1] = keys[1] + (keys[0] & 0x000000FF); keys[1] = (keys[1] * 134775813) + 1; keys[2] = zip_crypto_crc32(keys[2], (PHYSFS_uint8) ((keys[1] >> 24) & 0xFF)); } /* zip_update_crypto_keys */ static PHYSFS_uint8 zip_decrypt_byte(const PHYSFS_uint32 *keys) { const PHYSFS_uint16 tmp = keys[2] | 2; return (PHYSFS_uint8) ((tmp * (tmp ^ 1)) >> 8); } /* zip_decrypt_byte */ static PHYSFS_sint64 zip_read_decrypt(ZIPfileinfo *finfo, void *buf, PHYSFS_uint64 len) { PHYSFS_Io *io = finfo->io; const PHYSFS_sint64 br = io->read(io, buf, len); /* Decompression the new data if necessary. */ if (zip_entry_is_tradional_crypto(finfo->entry) && (br > 0)) { PHYSFS_uint32 *keys = finfo->crypto_keys; PHYSFS_uint8 *ptr = (PHYSFS_uint8 *) buf; PHYSFS_sint64 i; for (i = 0; i < br; i++, ptr++) { const PHYSFS_uint8 ch = *ptr ^ zip_decrypt_byte(keys); zip_update_crypto_keys(keys, ch); *ptr = ch; } /* for */ } /* if */ return br; } /* zip_read_decrypt */ static int zip_prep_crypto_keys(ZIPfileinfo *finfo, const PHYSFS_uint8 *crypto_header, const PHYSFS_uint8 *password) { /* It doesn't appear to be documented in PKWare's APPNOTE.TXT, but you need to use a different byte in the header to verify the password if general purpose bit 3 is set. Discovered this from Info-Zip. That's what the (verifier) value is doing, below. */ PHYSFS_uint32 *keys = finfo->crypto_keys; const ZIPentry *entry = finfo->entry; const int usedate = zip_entry_ignore_local_header(entry); const PHYSFS_uint8 verifier = (PHYSFS_uint8) ((usedate ? (entry->dos_mod_time >> 8) : (entry->crc >> 24)) & 0xFF); PHYSFS_uint8 finalbyte = 0; int i = 0; /* initialize vector with defaults, then password, then header. */ keys[0] = 305419896; keys[1] = 591751049; keys[2] = 878082192; while (*password) zip_update_crypto_keys(keys, *(password++)); for (i = 0; i < 12; i++) { const PHYSFS_uint8 c = crypto_header[i] ^ zip_decrypt_byte(keys); zip_update_crypto_keys(keys, c); finalbyte = c; } /* for */ /* you have a 1/256 chance of passing this test incorrectly. :/ */ if (finalbyte != verifier) BAIL(PHYSFS_ERR_BAD_PASSWORD, 0); /* save the initial vector for seeking purposes. Not secure!! */ memcpy(finfo->initial_crypto_keys, finfo->crypto_keys, 12); return 1; } /* zip_prep_crypto_keys */ /* * Bridge physfs allocation functions to zlib's format... */ static voidpf zlibPhysfsAlloc(voidpf opaque, uInt items, uInt size) { return ((PHYSFS_Allocator *) opaque)->Malloc(items * size); } /* zlibPhysfsAlloc */ /* * Bridge physfs allocation functions to zlib's format... */ static void zlibPhysfsFree(voidpf opaque, voidpf address) { ((PHYSFS_Allocator *) opaque)->Free(address); } /* zlibPhysfsFree */ /* * Construct a new z_stream to a sane state. */ static void initializeZStream(z_stream *pstr) { memset(pstr, '\0', sizeof (z_stream)); pstr->zalloc = zlibPhysfsAlloc; pstr->zfree = zlibPhysfsFree; pstr->opaque = &allocator; } /* initializeZStream */ static PHYSFS_ErrorCode zlib_error_code(int rc) { switch (rc) { case Z_OK: return PHYSFS_ERR_OK; /* not an error. */ case Z_STREAM_END: return PHYSFS_ERR_OK; /* not an error. */ case Z_ERRNO: return PHYSFS_ERR_IO; case Z_MEM_ERROR: return PHYSFS_ERR_OUT_OF_MEMORY; default: return PHYSFS_ERR_CORRUPT; } /* switch */ } /* zlib_error_string */ /* * Wrap all zlib calls in this, so the physfs error state is set appropriately. */ static int zlib_err(const int rc) { PHYSFS_setErrorCode(zlib_error_code(rc)); return rc; } /* zlib_err */ /* * Read an unsigned 64-bit int and swap to native byte order. */ static int readui64(PHYSFS_Io *io, PHYSFS_uint64 *val) { PHYSFS_uint64 v; BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, &v, sizeof (v)), 0); *val = PHYSFS_swapULE64(v); return 1; } /* readui64 */ /* * Read an unsigned 32-bit int and swap to native byte order. */ static int readui32(PHYSFS_Io *io, PHYSFS_uint32 *val) { PHYSFS_uint32 v; BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, &v, sizeof (v)), 0); *val = PHYSFS_swapULE32(v); return 1; } /* readui32 */ /* * Read an unsigned 16-bit int and swap to native byte order. */ static int readui16(PHYSFS_Io *io, PHYSFS_uint16 *val) { PHYSFS_uint16 v; BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, &v, sizeof (v)), 0); *val = PHYSFS_swapULE16(v); return 1; } /* readui16 */ static PHYSFS_sint64 ZIP_read(PHYSFS_Io *_io, void *buf, PHYSFS_uint64 len) { ZIPfileinfo *finfo = (ZIPfileinfo *) _io->opaque; ZIPentry *entry = finfo->entry; PHYSFS_sint64 retval = 0; PHYSFS_sint64 maxread = (PHYSFS_sint64) len; PHYSFS_sint64 avail = entry->uncompressed_size - finfo->uncompressed_position; if (avail < maxread) maxread = avail; BAIL_IF_ERRPASS(maxread == 0, 0); /* quick rejection. */ if (entry->compression_method == COMPMETH_NONE) retval = zip_read_decrypt(finfo, buf, maxread); else { finfo->stream.next_out = buf; finfo->stream.avail_out = (uInt) maxread; while (retval < maxread) { const PHYSFS_uint32 before = (PHYSFS_uint32) finfo->stream.total_out; int rc; if (finfo->stream.avail_in == 0) { PHYSFS_sint64 br; br = entry->compressed_size - finfo->compressed_position; if (br > 0) { if (br > ZIP_READBUFSIZE) br = ZIP_READBUFSIZE; br = zip_read_decrypt(finfo, finfo->buffer, (PHYSFS_uint64) br); if (br <= 0) break; finfo->compressed_position += (PHYSFS_uint32) br; finfo->stream.next_in = finfo->buffer; finfo->stream.avail_in = (unsigned int) br; } /* if */ } /* if */ rc = zlib_err(inflate(&finfo->stream, Z_SYNC_FLUSH)); retval += (finfo->stream.total_out - before); if (rc != Z_OK) break; } /* while */ } /* else */ if (retval > 0) finfo->uncompressed_position += (PHYSFS_uint32) retval; return retval; } /* ZIP_read */ static PHYSFS_sint64 ZIP_write(PHYSFS_Io *io, const void *b, PHYSFS_uint64 len) { BAIL(PHYSFS_ERR_READ_ONLY, -1); } /* ZIP_write */ static PHYSFS_sint64 ZIP_tell(PHYSFS_Io *io) { return ((ZIPfileinfo *) io->opaque)->uncompressed_position; } /* ZIP_tell */ static int ZIP_seek(PHYSFS_Io *_io, PHYSFS_uint64 offset) { ZIPfileinfo *finfo = (ZIPfileinfo *) _io->opaque; ZIPentry *entry = finfo->entry; PHYSFS_Io *io = finfo->io; const int encrypted = zip_entry_is_tradional_crypto(entry); BAIL_IF(offset > entry->uncompressed_size, PHYSFS_ERR_PAST_EOF, 0); if (!encrypted && (entry->compression_method == COMPMETH_NONE)) { PHYSFS_sint64 newpos = offset + entry->offset; BAIL_IF_ERRPASS(!io->seek(io, newpos), 0); finfo->uncompressed_position = (PHYSFS_uint32) offset; } /* if */ else { /* * If seeking backwards, we need to redecode the file * from the start and throw away the compressed bits until we hit * the offset we need. If seeking forward, we still need to * decode, but we don't rewind first. */ if (offset < finfo->uncompressed_position) { /* we do a copy so state is sane if inflateInit2() fails. */ z_stream str; initializeZStream(&str); if (zlib_err(inflateInit2(&str, -MAX_WBITS)) != Z_OK) return 0; if (!io->seek(io, entry->offset + (encrypted ? 12 : 0))) return 0; inflateEnd(&finfo->stream); memcpy(&finfo->stream, &str, sizeof (z_stream)); finfo->uncompressed_position = finfo->compressed_position = 0; if (encrypted) memcpy(finfo->crypto_keys, finfo->initial_crypto_keys, 12); } /* if */ while (finfo->uncompressed_position != offset) { PHYSFS_uint8 buf[512]; PHYSFS_uint32 maxread; maxread = (PHYSFS_uint32) (offset - finfo->uncompressed_position); if (maxread > sizeof (buf)) maxread = sizeof (buf); if (ZIP_read(_io, buf, maxread) != maxread) return 0; } /* while */ } /* else */ return 1; } /* ZIP_seek */ static PHYSFS_sint64 ZIP_length(PHYSFS_Io *io) { const ZIPfileinfo *finfo = (ZIPfileinfo *) io->opaque; return (PHYSFS_sint64) finfo->entry->uncompressed_size; } /* ZIP_length */ static PHYSFS_Io *zip_get_io(PHYSFS_Io *io, ZIPinfo *inf, ZIPentry *entry); static PHYSFS_Io *ZIP_duplicate(PHYSFS_Io *io) { ZIPfileinfo *origfinfo = (ZIPfileinfo *) io->opaque; PHYSFS_Io *retval = (PHYSFS_Io *) allocator.Malloc(sizeof (PHYSFS_Io)); ZIPfileinfo *finfo = (ZIPfileinfo *) allocator.Malloc(sizeof (ZIPfileinfo)); GOTO_IF(!retval, PHYSFS_ERR_OUT_OF_MEMORY, failed); GOTO_IF(!finfo, PHYSFS_ERR_OUT_OF_MEMORY, failed); memset(finfo, '\0', sizeof (*finfo)); finfo->entry = origfinfo->entry; finfo->io = zip_get_io(origfinfo->io, NULL, finfo->entry); GOTO_IF_ERRPASS(!finfo->io, failed); initializeZStream(&finfo->stream); if (finfo->entry->compression_method != COMPMETH_NONE) { finfo->buffer = (PHYSFS_uint8 *) allocator.Malloc(ZIP_READBUFSIZE); GOTO_IF(!finfo->buffer, PHYSFS_ERR_OUT_OF_MEMORY, failed); if (zlib_err(inflateInit2(&finfo->stream, -MAX_WBITS)) != Z_OK) goto failed; } /* if */ memcpy(retval, io, sizeof (PHYSFS_Io)); retval->opaque = finfo; return retval; failed: if (finfo != NULL) { if (finfo->io != NULL) finfo->io->destroy(finfo->io); if (finfo->buffer != NULL) { allocator.Free(finfo->buffer); inflateEnd(&finfo->stream); } /* if */ allocator.Free(finfo); } /* if */ if (retval != NULL) allocator.Free(retval); return NULL; } /* ZIP_duplicate */ static int ZIP_flush(PHYSFS_Io *io) { return 1; /* no write support. */ } static void ZIP_destroy(PHYSFS_Io *io) { ZIPfileinfo *finfo = (ZIPfileinfo *) io->opaque; finfo->io->destroy(finfo->io); if (finfo->entry->compression_method != COMPMETH_NONE) inflateEnd(&finfo->stream); if (finfo->buffer != NULL) allocator.Free(finfo->buffer); allocator.Free(finfo); allocator.Free(io); } /* ZIP_destroy */ static const PHYSFS_Io ZIP_Io = { CURRENT_PHYSFS_IO_API_VERSION, NULL, ZIP_read, ZIP_write, ZIP_seek, ZIP_tell, ZIP_length, ZIP_duplicate, ZIP_flush, ZIP_destroy }; static PHYSFS_sint64 zip_find_end_of_central_dir(PHYSFS_Io *io, PHYSFS_sint64 *len) { PHYSFS_uint8 buf[256]; PHYSFS_uint8 extra[4] = { 0, 0, 0, 0 }; PHYSFS_sint32 i = 0; PHYSFS_sint64 filelen; PHYSFS_sint64 filepos; PHYSFS_sint32 maxread; PHYSFS_sint32 totalread = 0; int found = 0; filelen = io->length(io); BAIL_IF_ERRPASS(filelen == -1, -1); /* * Jump to the end of the file and start reading backwards. * The last thing in the file is the zipfile comment, which is variable * length, and the field that specifies its size is before it in the * file (argh!)...this means that we need to scan backwards until we * hit the end-of-central-dir signature. We can then sanity check that * the comment was as big as it should be to make sure we're in the * right place. The comment length field is 16 bits, so we can stop * searching for that signature after a little more than 64k at most, * and call it a corrupted zipfile. */ if (sizeof (buf) < filelen) { filepos = filelen - sizeof (buf); maxread = sizeof (buf); } /* if */ else { filepos = 0; maxread = (PHYSFS_uint32) filelen; } /* else */ while ((totalread < filelen) && (totalread < 65557)) { BAIL_IF_ERRPASS(!io->seek(io, filepos), -1); /* make sure we catch a signature between buffers. */ if (totalread != 0) { if (!__PHYSFS_readAll(io, buf, maxread - 4)) return -1; memcpy(&buf[maxread - 4], extra, sizeof (extra)); totalread += maxread - 4; } /* if */ else { if (!__PHYSFS_readAll(io, buf, maxread)) return -1; totalread += maxread; } /* else */ memcpy(extra, buf, sizeof (extra)); for (i = maxread - 4; i > 0; i--) { if ((buf[i + 0] == 0x50) && (buf[i + 1] == 0x4B) && (buf[i + 2] == 0x05) && (buf[i + 3] == 0x06) ) { found = 1; /* that's the signature! */ break; } /* if */ } /* for */ if (found) break; filepos -= (maxread - 4); if (filepos < 0) filepos = 0; } /* while */ BAIL_IF(!found, PHYSFS_ERR_UNSUPPORTED, -1); if (len != NULL) *len = filelen; return (filepos + i); } /* zip_find_end_of_central_dir */ static int isZip(PHYSFS_Io *io) { PHYSFS_uint32 sig = 0; int retval = 0; /* * The first thing in a zip file might be the signature of the * first local file record, so it makes for a quick determination. */ if (readui32(io, &sig)) { retval = (sig == ZIP_LOCAL_FILE_SIG); if (!retval) { /* * No sig...might be a ZIP with data at the start * (a self-extracting executable, etc), so we'll have to do * it the hard way... */ retval = (zip_find_end_of_central_dir(io, NULL) != -1); } /* if */ } /* if */ return retval; } /* isZip */ /* Convert paths from old, buggy DOS zippers... */ static void zip_convert_dos_path(const PHYSFS_uint16 entryversion, char *path) { const PHYSFS_uint8 hosttype = (PHYSFS_uint8) ((entryversion >> 8) & 0xFF); if (hosttype == 0) /* FS_FAT_ */ { while (*path) { if (*path == '\\') *path = '/'; path++; } /* while */ } /* if */ } /* zip_convert_dos_path */ static void zip_expand_symlink_path(char *path) { char *ptr = path; char *prevptr = path; while (1) { ptr = strchr(ptr, '/'); if (ptr == NULL) break; if (*(ptr + 1) == '.') { if (*(ptr + 2) == '/') { /* current dir in middle of string: ditch it. */ memmove(ptr, ptr + 2, strlen(ptr + 2) + 1); } /* else if */ else if (*(ptr + 2) == '\0') { /* current dir at end of string: ditch it. */ *ptr = '\0'; } /* else if */ else if (*(ptr + 2) == '.') { if (*(ptr + 3) == '/') { /* parent dir in middle: move back one, if possible. */ memmove(prevptr, ptr + 4, strlen(ptr + 4) + 1); ptr = prevptr; while (prevptr != path) { prevptr--; if (*prevptr == '/') { prevptr++; break; } /* if */ } /* while */ } /* if */ if (*(ptr + 3) == '\0') { /* parent dir at end: move back one, if possible. */ *prevptr = '\0'; } /* if */ } /* if */ } /* if */ else { prevptr = ptr; ptr++; } /* else */ } /* while */ } /* zip_expand_symlink_path */ static inline ZIPentry *zip_find_entry(ZIPinfo *info, const char *path) { return (ZIPentry *) __PHYSFS_DirTreeFind(&info->tree, path); } /* zip_find_entry */ /* (forward reference: zip_follow_symlink and zip_resolve call each other.) */ static int zip_resolve(PHYSFS_Io *io, ZIPinfo *info, ZIPentry *entry); /* * Look for the entry named by (path). If it exists, resolve it, and return * a pointer to that entry. If it's another symlink, keep resolving until you * hit a real file and then return a pointer to the final non-symlink entry. * If there's a problem, return NULL. */ static ZIPentry *zip_follow_symlink(PHYSFS_Io *io, ZIPinfo *info, char *path) { ZIPentry *entry; zip_expand_symlink_path(path); entry = zip_find_entry(info, path); if (entry != NULL) { if (!zip_resolve(io, info, entry)) /* recursive! */ entry = NULL; else { if (entry->symlink != NULL) entry = entry->symlink; } /* else */ } /* if */ return entry; } /* zip_follow_symlink */ static int zip_resolve_symlink(PHYSFS_Io *io, ZIPinfo *info, ZIPentry *entry) { const size_t size = (size_t) entry->uncompressed_size; char *path = NULL; int rc = 0; /* * We've already parsed the local file header of the symlink at this * point. Now we need to read the actual link from the file data and * follow it. */ BAIL_IF_ERRPASS(!io->seek(io, entry->offset), 0); path = (char *) __PHYSFS_smallAlloc(size + 1); BAIL_IF(!path, PHYSFS_ERR_OUT_OF_MEMORY, 0); if (entry->compression_method == COMPMETH_NONE) rc = __PHYSFS_readAll(io, path, size); else /* symlink target path is compressed... */ { z_stream stream; const size_t complen = (size_t) entry->compressed_size; PHYSFS_uint8 *compressed = (PHYSFS_uint8*) __PHYSFS_smallAlloc(complen); if (compressed != NULL) { if (__PHYSFS_readAll(io, compressed, complen)) { initializeZStream(&stream); stream.next_in = compressed; stream.avail_in = (unsigned int) complen; stream.next_out = (unsigned char *) path; stream.avail_out = (unsigned int) size; if (zlib_err(inflateInit2(&stream, -MAX_WBITS)) == Z_OK) { rc = zlib_err(inflate(&stream, Z_FINISH)); inflateEnd(&stream); /* both are acceptable outcomes... */ rc = ((rc == Z_OK) || (rc == Z_STREAM_END)); } /* if */ } /* if */ __PHYSFS_smallFree(compressed); } /* if */ } /* else */ if (rc) { path[entry->uncompressed_size] = '\0'; /* null-terminate it. */ zip_convert_dos_path(entry->version, path); entry->symlink = zip_follow_symlink(io, info, path); } /* else */ __PHYSFS_smallFree(path); return (entry->symlink != NULL); } /* zip_resolve_symlink */ /* * Parse the local file header of an entry, and update entry->offset. */ static int zip_parse_local(PHYSFS_Io *io, ZIPentry *entry) { PHYSFS_uint32 ui32; PHYSFS_uint16 ui16; PHYSFS_uint16 fnamelen; PHYSFS_uint16 extralen; /* * crc and (un)compressed_size are always zero if this is a "JAR" * archive created with Sun's Java tools, apparently. We only * consider this archive corrupted if those entries don't match and * aren't zero. That seems to work well. * We also ignore a mismatch if the value is 0xFFFFFFFF here, since it's * possible that's a Zip64 thing. */ /* !!! FIXME: apparently these are zero if general purpose bit 3 is set, !!! FIXME: which is probably true for Jar files, fwiw, but we don't !!! FIXME: care about these values anyhow. */ BAIL_IF_ERRPASS(!io->seek(io, entry->offset), 0); BAIL_IF_ERRPASS(!readui32(io, &ui32), 0); BAIL_IF(ui32 != ZIP_LOCAL_FILE_SIG, PHYSFS_ERR_CORRUPT, 0); BAIL_IF_ERRPASS(!readui16(io, &ui16), 0); /* Windows Explorer might rewrite the entire central directory, setting this field to 2.0/MS-DOS for all files, so favor the local version, which it leaves intact if it didn't alter that specific file. */ entry->version_needed = ui16; BAIL_IF_ERRPASS(!readui16(io, &ui16), 0); /* general bits. */ BAIL_IF_ERRPASS(!readui16(io, &ui16), 0); BAIL_IF(ui16 != entry->compression_method, PHYSFS_ERR_CORRUPT, 0); BAIL_IF_ERRPASS(!readui32(io, &ui32), 0); /* date/time */ BAIL_IF_ERRPASS(!readui32(io, &ui32), 0); BAIL_IF(ui32 && (ui32 != entry->crc), PHYSFS_ERR_CORRUPT, 0); BAIL_IF_ERRPASS(!readui32(io, &ui32), 0); BAIL_IF(ui32 && (ui32 != 0xFFFFFFFF) && (ui32 != entry->compressed_size), PHYSFS_ERR_CORRUPT, 0); BAIL_IF_ERRPASS(!readui32(io, &ui32), 0); BAIL_IF(ui32 && (ui32 != 0xFFFFFFFF) && (ui32 != entry->uncompressed_size), PHYSFS_ERR_CORRUPT, 0); BAIL_IF_ERRPASS(!readui16(io, &fnamelen), 0); BAIL_IF_ERRPASS(!readui16(io, &extralen), 0); entry->offset += fnamelen + extralen + 30; return 1; } /* zip_parse_local */ static int zip_resolve(PHYSFS_Io *io, ZIPinfo *info, ZIPentry *entry) { int retval = 1; const ZipResolveType resolve_type = entry->resolved; if (resolve_type == ZIP_DIRECTORY) return 1; /* we're good. */ /* Don't bother if we've failed to resolve this entry before. */ BAIL_IF(resolve_type == ZIP_BROKEN_FILE, PHYSFS_ERR_CORRUPT, 0); BAIL_IF(resolve_type == ZIP_BROKEN_SYMLINK, PHYSFS_ERR_CORRUPT, 0); /* uhoh...infinite symlink loop! */ BAIL_IF(resolve_type == ZIP_RESOLVING, PHYSFS_ERR_SYMLINK_LOOP, 0); /* * We fix up the offset to point to the actual data on the * first open, since we don't want to seek across the whole file on * archive open (can be SLOW on large, CD-stored files), but we * need to check the local file header...not just for corruption, * but since it stores offset info the central directory does not. */ if (resolve_type != ZIP_RESOLVED) { if (entry->tree.isdir) /* an ancestor dir that DirTree filled in? */ { entry->resolved = ZIP_DIRECTORY; return 1; } /* if */ retval = zip_parse_local(io, entry); if (retval) { /* * If it's a symlink, find the original file. This will cause * resolution of other entries (other symlinks and, eventually, * the real file) if all goes well. */ if (resolve_type == ZIP_UNRESOLVED_SYMLINK) retval = zip_resolve_symlink(io, info, entry); } /* if */ if (resolve_type == ZIP_UNRESOLVED_SYMLINK) entry->resolved = ((retval) ? ZIP_RESOLVED : ZIP_BROKEN_SYMLINK); else if (resolve_type == ZIP_UNRESOLVED_FILE) entry->resolved = ((retval) ? ZIP_RESOLVED : ZIP_BROKEN_FILE); } /* if */ return retval; } /* zip_resolve */ static int zip_entry_is_symlink(const ZIPentry *entry) { return ((entry->resolved == ZIP_UNRESOLVED_SYMLINK) || (entry->resolved == ZIP_BROKEN_SYMLINK) || (entry->symlink)); } /* zip_entry_is_symlink */ static int zip_version_does_symlinks(PHYSFS_uint32 version) { int retval = 0; PHYSFS_uint8 hosttype = (PHYSFS_uint8) ((version >> 8) & 0xFF); switch (hosttype) { /* * These are the platforms that can NOT build an archive with * symlinks, according to the Info-ZIP project. */ case 0: /* FS_FAT_ */ case 1: /* AMIGA_ */ case 2: /* VMS_ */ case 4: /* VM_CSM_ */ case 6: /* FS_HPFS_ */ case 11: /* FS_NTFS_ */ case 14: /* FS_VFAT_ */ case 13: /* ACORN_ */ case 15: /* MVS_ */ case 18: /* THEOS_ */ break; /* do nothing. */ default: /* assume the rest to be unix-like. */ retval = 1; break; } /* switch */ return retval; } /* zip_version_does_symlinks */ static inline int zip_has_symlink_attr(const ZIPentry *entry, const PHYSFS_uint32 extern_attr) { PHYSFS_uint16 xattr = ((extern_attr >> 16) & 0xFFFF); return ( (zip_version_does_symlinks(entry->version)) && (entry->uncompressed_size > 0) && ((xattr & UNIX_FILETYPE_MASK) == UNIX_FILETYPE_SYMLINK) ); } /* zip_has_symlink_attr */ static PHYSFS_sint64 zip_dos_time_to_physfs_time(PHYSFS_uint32 dostime) { PHYSFS_uint32 dosdate; struct tm unixtime; memset(&unixtime, '\0', sizeof (unixtime)); dosdate = (PHYSFS_uint32) ((dostime >> 16) & 0xFFFF); dostime &= 0xFFFF; /* dissect date */ unixtime.tm_year = ((dosdate >> 9) & 0x7F) + 80; unixtime.tm_mon = ((dosdate >> 5) & 0x0F) - 1; unixtime.tm_mday = ((dosdate ) & 0x1F); /* dissect time */ unixtime.tm_hour = ((dostime >> 11) & 0x1F); unixtime.tm_min = ((dostime >> 5) & 0x3F); unixtime.tm_sec = ((dostime << 1) & 0x3E); /* let mktime calculate daylight savings time. */ unixtime.tm_isdst = -1; return ((PHYSFS_sint64) mktime(&unixtime)); } /* zip_dos_time_to_physfs_time */ static ZIPentry *zip_load_entry(ZIPinfo *info, const int zip64, const PHYSFS_uint64 ofs_fixup) { PHYSFS_Io *io = info->io; ZIPentry entry; ZIPentry *retval = NULL; PHYSFS_uint16 fnamelen, extralen, commentlen; PHYSFS_uint32 external_attr; PHYSFS_uint32 starting_disk; PHYSFS_uint64 offset; PHYSFS_uint16 ui16; PHYSFS_uint32 ui32; PHYSFS_sint64 si64; char *name = NULL; int isdir = 0; /* sanity check with central directory signature... */ BAIL_IF_ERRPASS(!readui32(io, &ui32), NULL); BAIL_IF(ui32 != ZIP_CENTRAL_DIR_SIG, PHYSFS_ERR_CORRUPT, NULL); memset(&entry, '\0', sizeof (entry)); /* Get the pertinent parts of the record... */ BAIL_IF_ERRPASS(!readui16(io, &entry.version), NULL); BAIL_IF_ERRPASS(!readui16(io, &entry.version_needed), NULL); BAIL_IF_ERRPASS(!readui16(io, &entry.general_bits), NULL); /* general bits */ BAIL_IF_ERRPASS(!readui16(io, &entry.compression_method), NULL); BAIL_IF_ERRPASS(!readui32(io, &entry.dos_mod_time), NULL); entry.last_mod_time = zip_dos_time_to_physfs_time(entry.dos_mod_time); BAIL_IF_ERRPASS(!readui32(io, &entry.crc), NULL); BAIL_IF_ERRPASS(!readui32(io, &ui32), NULL); entry.compressed_size = (PHYSFS_uint64) ui32; BAIL_IF_ERRPASS(!readui32(io, &ui32), NULL); entry.uncompressed_size = (PHYSFS_uint64) ui32; BAIL_IF_ERRPASS(!readui16(io, &fnamelen), NULL); BAIL_IF_ERRPASS(!readui16(io, &extralen), NULL); BAIL_IF_ERRPASS(!readui16(io, &commentlen), NULL); BAIL_IF_ERRPASS(!readui16(io, &ui16), NULL); starting_disk = (PHYSFS_uint32) ui16; BAIL_IF_ERRPASS(!readui16(io, &ui16), NULL); /* internal file attribs */ BAIL_IF_ERRPASS(!readui32(io, &external_attr), NULL); BAIL_IF_ERRPASS(!readui32(io, &ui32), NULL); offset = (PHYSFS_uint64) ui32; name = (char *) __PHYSFS_smallAlloc(fnamelen + 1); BAIL_IF(!name, PHYSFS_ERR_OUT_OF_MEMORY, NULL); if (!__PHYSFS_readAll(io, name, fnamelen)) { __PHYSFS_smallFree(name); return NULL; } /* if */ if (name[fnamelen - 1] == '/') { name[fnamelen - 1] = '\0'; isdir = 1; } /* if */ name[fnamelen] = '\0'; /* null-terminate the filename. */ zip_convert_dos_path(entry.version, name); retval = (ZIPentry *) __PHYSFS_DirTreeAdd(&info->tree, name, isdir); __PHYSFS_smallFree(name); BAIL_IF(!retval, PHYSFS_ERR_OUT_OF_MEMORY, NULL); /* It's okay to BAIL without freeing retval, because it's stored in the __PHYSFS_DirTree and will be freed later anyhow. */ BAIL_IF(retval->last_mod_time != 0, PHYSFS_ERR_CORRUPT, NULL); /* dupe? */ /* Move the data we already read into place in the official object. */ memcpy(((PHYSFS_uint8 *) retval) + sizeof (__PHYSFS_DirTreeEntry), ((PHYSFS_uint8 *) &entry) + sizeof (__PHYSFS_DirTreeEntry), sizeof (*retval) - sizeof (__PHYSFS_DirTreeEntry)); retval->symlink = NULL; /* will be resolved later, if necessary. */ if (isdir) retval->resolved = ZIP_DIRECTORY; else { retval->resolved = (zip_has_symlink_attr(retval, external_attr)) ? ZIP_UNRESOLVED_SYMLINK : ZIP_UNRESOLVED_FILE; } /* else */ si64 = io->tell(io); BAIL_IF_ERRPASS(si64 == -1, NULL); /* If the actual sizes didn't fit in 32-bits, look for the Zip64 extended information extra field... */ if ( (zip64) && ((offset == 0xFFFFFFFF) || (starting_disk == 0xFFFFFFFF) || (retval->compressed_size == 0xFFFFFFFF) || (retval->uncompressed_size == 0xFFFFFFFF)) ) { int found = 0; PHYSFS_uint16 sig = 0; PHYSFS_uint16 len = 0; while (extralen > 4) { BAIL_IF_ERRPASS(!readui16(io, &sig), NULL); BAIL_IF_ERRPASS(!readui16(io, &len), NULL); si64 += 4 + len; extralen -= 4 + len; if (sig != ZIP64_EXTENDED_INFO_EXTRA_FIELD_SIG) { BAIL_IF_ERRPASS(!io->seek(io, si64), NULL); continue; } /* if */ found = 1; break; } /* while */ BAIL_IF(!found, PHYSFS_ERR_CORRUPT, NULL); if (retval->uncompressed_size == 0xFFFFFFFF) { BAIL_IF(len < 8, PHYSFS_ERR_CORRUPT, NULL); BAIL_IF_ERRPASS(!readui64(io, &retval->uncompressed_size), NULL); len -= 8; } /* if */ if (retval->compressed_size == 0xFFFFFFFF) { BAIL_IF(len < 8, PHYSFS_ERR_CORRUPT, NULL); BAIL_IF_ERRPASS(!readui64(io, &retval->compressed_size), NULL); len -= 8; } /* if */ if (offset == 0xFFFFFFFF) { BAIL_IF(len < 8, PHYSFS_ERR_CORRUPT, NULL); BAIL_IF_ERRPASS(!readui64(io, &offset), NULL); len -= 8; } /* if */ if (starting_disk == 0xFFFFFFFF) { BAIL_IF(len < 8, PHYSFS_ERR_CORRUPT, NULL); BAIL_IF_ERRPASS(!readui32(io, &starting_disk), NULL); len -= 4; } /* if */ BAIL_IF(len != 0, PHYSFS_ERR_CORRUPT, NULL); } /* if */ BAIL_IF(starting_disk != 0, PHYSFS_ERR_CORRUPT, NULL); retval->offset = offset + ofs_fixup; /* seek to the start of the next entry in the central directory... */ BAIL_IF_ERRPASS(!io->seek(io, si64 + extralen + commentlen), NULL); return retval; /* success. */ } /* zip_load_entry */ /* This leaves things allocated on error; the caller will clean up the mess. */ static int zip_load_entries(ZIPinfo *info, const PHYSFS_uint64 data_ofs, const PHYSFS_uint64 central_ofs, const PHYSFS_uint64 entry_count) { PHYSFS_Io *io = info->io; const int zip64 = info->zip64; PHYSFS_uint64 i; BAIL_IF_ERRPASS(!io->seek(io, central_ofs), 0); for (i = 0; i < entry_count; i++) { ZIPentry *entry = zip_load_entry(info, zip64, data_ofs); BAIL_IF_ERRPASS(!entry, 0); if (zip_entry_is_tradional_crypto(entry)) info->has_crypto = 1; } /* for */ return 1; } /* zip_load_entries */ static PHYSFS_sint64 zip64_find_end_of_central_dir(PHYSFS_Io *io, PHYSFS_sint64 _pos, PHYSFS_uint64 offset) { /* * Naturally, the offset is useless to us; it is the offset from the * start of file, which is meaningless if we've appended this .zip to * a self-extracting .exe. We need to find this on our own. It should * be directly before the locator record, but the record in question, * like the original end-of-central-directory record, ends with a * variable-length field. Unlike the original, which has to store the * size of that variable-length field in a 16-bit int and thus has to be * within 64k, the new one gets 64-bits. * * Fortunately, the only currently-specified record for that variable * length block is some weird proprietary thing that deals with EBCDIC * and tape backups or something. So we don't seek far. */ PHYSFS_uint32 ui32; const PHYSFS_uint64 pos = (PHYSFS_uint64) _pos; assert(_pos > 0); /* Try offset specified in the Zip64 end of central directory locator. */ /* This works if the entire PHYSFS_Io is the zip file. */ BAIL_IF_ERRPASS(!io->seek(io, offset), -1); BAIL_IF_ERRPASS(!readui32(io, &ui32), -1); if (ui32 == ZIP64_END_OF_CENTRAL_DIR_SIG) return offset; /* Try 56 bytes before the Zip64 end of central directory locator. */ /* This works if the record isn't variable length and is version 1. */ if (pos > 56) { BAIL_IF_ERRPASS(!io->seek(io, pos-56), -1); BAIL_IF_ERRPASS(!readui32(io, &ui32), -1); if (ui32 == ZIP64_END_OF_CENTRAL_DIR_SIG) return pos-56; } /* if */ /* Try 84 bytes before the Zip64 end of central directory locator. */ /* This works if the record isn't variable length and is version 2. */ if (pos > 84) { BAIL_IF_ERRPASS(!io->seek(io, pos-84), -1); BAIL_IF_ERRPASS(!readui32(io, &ui32), -1); if (ui32 == ZIP64_END_OF_CENTRAL_DIR_SIG) return pos-84; } /* if */ /* Ok, brute force: we know it's between (offset) and (pos) somewhere. */ /* Just try moving back at most 256k. Oh well. */ if ((offset < pos) && (pos > 4)) { const size_t maxbuflen = 256 * 1024; size_t len = (size_t) (pos - offset); PHYSFS_uint8 *buf = NULL; PHYSFS_sint32 i; if (len > maxbuflen) len = maxbuflen; buf = (PHYSFS_uint8 *) __PHYSFS_smallAlloc(len); BAIL_IF(!buf, PHYSFS_ERR_OUT_OF_MEMORY, -1); if (!io->seek(io, pos - len) || !__PHYSFS_readAll(io, buf, len)) { __PHYSFS_smallFree(buf); return -1; /* error was set elsewhere. */ } /* if */ for (i = (PHYSFS_sint32) (len - 4); i >= 0; i--) { if ( (buf[i] == 0x50) && (buf[i+1] == 0x4b) && (buf[i+2] == 0x06) && (buf[i+3] == 0x06) ) { __PHYSFS_smallFree(buf); return pos - ((PHYSFS_sint64) (len - i)); } /* if */ } /* for */ __PHYSFS_smallFree(buf); } /* if */ BAIL(PHYSFS_ERR_CORRUPT, -1); /* didn't find it. */ } /* zip64_find_end_of_central_dir */ static int zip64_parse_end_of_central_dir(ZIPinfo *info, PHYSFS_uint64 *data_start, PHYSFS_uint64 *dir_ofs, PHYSFS_uint64 *entry_count, PHYSFS_sint64 pos) { PHYSFS_Io *io = info->io; PHYSFS_uint64 ui64; PHYSFS_uint32 ui32; PHYSFS_uint16 ui16; /* We should be positioned right past the locator signature. */ if ((pos < 0) || (!io->seek(io, pos))) return 0; BAIL_IF_ERRPASS(!readui32(io, &ui32), 0); if (ui32 != ZIP64_END_OF_CENTRAL_DIRECTORY_LOCATOR_SIG) return -1; /* it's not a Zip64 archive. Not an error, though! */ info->zip64 = 1; /* number of the disk with the start of the central directory. */ BAIL_IF_ERRPASS(!readui32(io, &ui32), 0); BAIL_IF(ui32 != 0, PHYSFS_ERR_CORRUPT, 0); /* offset of Zip64 end of central directory record. */ BAIL_IF_ERRPASS(!readui64(io, &ui64), 0); /* total number of disks */ BAIL_IF_ERRPASS(!readui32(io, &ui32), 0); BAIL_IF(ui32 != 1, PHYSFS_ERR_CORRUPT, 0); pos = zip64_find_end_of_central_dir(io, pos, ui64); if (pos < 0) return 0; /* oh well. */ /* * For self-extracting archives, etc, there's crapola in the file * before the zipfile records; we calculate how much data there is * prepended by determining how far the zip64-end-of-central-directory * offset is from where it is supposed to be...the difference in bytes * is how much arbitrary data is at the start of the physical file. */ assert(((PHYSFS_uint64) pos) >= ui64); *data_start = ((PHYSFS_uint64) pos) - ui64; BAIL_IF_ERRPASS(!io->seek(io, pos), 0); /* check signature again, just in case. */ BAIL_IF_ERRPASS(!readui32(io, &ui32), 0); BAIL_IF(ui32 != ZIP64_END_OF_CENTRAL_DIR_SIG, PHYSFS_ERR_CORRUPT, 0); /* size of Zip64 end of central directory record. */ BAIL_IF_ERRPASS(!readui64(io, &ui64), 0); /* version made by. */ BAIL_IF_ERRPASS(!readui16(io, &ui16), 0); /* version needed to extract. */ BAIL_IF_ERRPASS(!readui16(io, &ui16), 0); /* number of this disk. */ BAIL_IF_ERRPASS(!readui32(io, &ui32), 0); BAIL_IF(ui32 != 0, PHYSFS_ERR_CORRUPT, 0); /* number of disk with start of central directory record. */ BAIL_IF_ERRPASS(!readui32(io, &ui32), 0); BAIL_IF(ui32 != 0, PHYSFS_ERR_CORRUPT, 0); /* total number of entries in the central dir on this disk */ BAIL_IF_ERRPASS(!readui64(io, &ui64), 0); /* total number of entries in the central dir */ BAIL_IF_ERRPASS(!readui64(io, entry_count), 0); BAIL_IF(ui64 != *entry_count, PHYSFS_ERR_CORRUPT, 0); /* size of the central directory */ BAIL_IF_ERRPASS(!readui64(io, &ui64), 0); /* offset of central directory */ BAIL_IF_ERRPASS(!readui64(io, dir_ofs), 0); /* Since we know the difference, fix up the central dir offset... */ *dir_ofs += *data_start; /* * There are more fields here, for encryption and feature-specific things, * but we don't care about any of them at the moment. */ return 1; /* made it. */ } /* zip64_parse_end_of_central_dir */ static int zip_parse_end_of_central_dir(ZIPinfo *info, PHYSFS_uint64 *data_start, PHYSFS_uint64 *dir_ofs, PHYSFS_uint64 *entry_count) { PHYSFS_Io *io = info->io; PHYSFS_uint16 entryCount16; PHYSFS_uint32 offset32; PHYSFS_uint32 ui32; PHYSFS_uint16 ui16; PHYSFS_sint64 len; PHYSFS_sint64 pos; int rc; /* find the end-of-central-dir record, and seek to it. */ pos = zip_find_end_of_central_dir(io, &len); BAIL_IF_ERRPASS(pos == -1, 0); BAIL_IF_ERRPASS(!io->seek(io, pos), 0); /* check signature again, just in case. */ BAIL_IF_ERRPASS(!readui32(io, &ui32), 0); BAIL_IF(ui32 != ZIP_END_OF_CENTRAL_DIR_SIG, PHYSFS_ERR_CORRUPT, 0); /* Seek back to see if "Zip64 end of central directory locator" exists. */ /* this record is 20 bytes before end-of-central-dir */ rc = zip64_parse_end_of_central_dir(info, data_start, dir_ofs, entry_count, pos - 20); /* Error or success? Bounce out of here. Keep going if not zip64. */ if ((rc == 0) || (rc == 1)) return rc; assert(rc == -1); /* no error, just not a Zip64 archive. */ /* Not Zip64? Seek back to where we were and keep processing. */ BAIL_IF_ERRPASS(!io->seek(io, pos + 4), 0); /* number of this disk */ BAIL_IF_ERRPASS(!readui16(io, &ui16), 0); BAIL_IF(ui16 != 0, PHYSFS_ERR_CORRUPT, 0); /* number of the disk with the start of the central directory */ BAIL_IF_ERRPASS(!readui16(io, &ui16), 0); BAIL_IF(ui16 != 0, PHYSFS_ERR_CORRUPT, 0); /* total number of entries in the central dir on this disk */ BAIL_IF_ERRPASS(!readui16(io, &ui16), 0); /* total number of entries in the central dir */ BAIL_IF_ERRPASS(!readui16(io, &entryCount16), 0); BAIL_IF(ui16 != entryCount16, PHYSFS_ERR_CORRUPT, 0); *entry_count = entryCount16; /* size of the central directory */ BAIL_IF_ERRPASS(!readui32(io, &ui32), 0); /* offset of central directory */ BAIL_IF_ERRPASS(!readui32(io, &offset32), 0); *dir_ofs = (PHYSFS_uint64) offset32; BAIL_IF(((PHYSFS_uint64) pos) < (*dir_ofs + ui32), PHYSFS_ERR_CORRUPT, 0); /* * For self-extracting archives, etc, there's crapola in the file * before the zipfile records; we calculate how much data there is * prepended by determining how far the central directory offset is * from where it is supposed to be (start of end-of-central-dir minus * sizeof central dir)...the difference in bytes is how much arbitrary * data is at the start of the physical file. */ *data_start = (PHYSFS_uint64) (pos - (*dir_ofs + ui32)); /* Now that we know the difference, fix up the central dir offset... */ *dir_ofs += *data_start; /* zipfile comment length */ BAIL_IF_ERRPASS(!readui16(io, &ui16), 0); /* * Make sure that the comment length matches to the end of file... * If it doesn't, we're either in the wrong part of the file, or the * file is corrupted, but we give up either way. */ BAIL_IF((pos + 22 + ui16) != len, PHYSFS_ERR_CORRUPT, 0); return 1; /* made it. */ } /* zip_parse_end_of_central_dir */ static void ZIP_closeArchive(void *opaque) { ZIPinfo *info = (ZIPinfo *) (opaque); if (!info) return; if (info->io) info->io->destroy(info->io); __PHYSFS_DirTreeDeinit(&info->tree); allocator.Free(info); } /* ZIP_closeArchive */ static void *ZIP_openArchive(PHYSFS_Io *io, const char *name, int forWriting, int *claimed) { ZIPinfo *info = NULL; ZIPentry *root = NULL; PHYSFS_uint64 dstart = 0; /* data start */ PHYSFS_uint64 cdir_ofs; /* central dir offset */ PHYSFS_uint64 count; assert(io != NULL); /* shouldn't ever happen. */ BAIL_IF(forWriting, PHYSFS_ERR_READ_ONLY, NULL); BAIL_IF_ERRPASS(!isZip(io), NULL); *claimed = 1; info = (ZIPinfo *) allocator.Malloc(sizeof (ZIPinfo)); BAIL_IF(!info, PHYSFS_ERR_OUT_OF_MEMORY, NULL); memset(info, '\0', sizeof (ZIPinfo)); info->io = io; if (!zip_parse_end_of_central_dir(info, &dstart, &cdir_ofs, &count)) goto ZIP_openarchive_failed; else if (!__PHYSFS_DirTreeInit(&info->tree, sizeof (ZIPentry), 1, 0)) goto ZIP_openarchive_failed; root = (ZIPentry *) info->tree.root; root->resolved = ZIP_DIRECTORY; if (!zip_load_entries(info, dstart, cdir_ofs, count)) goto ZIP_openarchive_failed; assert(info->tree.root->sibling == NULL); return info; ZIP_openarchive_failed: info->io = NULL; /* don't let ZIP_closeArchive destroy (io). */ ZIP_closeArchive(info); return NULL; } /* ZIP_openArchive */ static PHYSFS_Io *zip_get_io(PHYSFS_Io *io, ZIPinfo *inf, ZIPentry *entry) { int success; PHYSFS_Io *retval = io->duplicate(io); BAIL_IF_ERRPASS(!retval, NULL); assert(!entry->tree.isdir); /* should have been checked before calling. */ /* (inf) can be NULL if we already resolved. */ success = (inf == NULL) || zip_resolve(retval, inf, entry); if (success) { PHYSFS_sint64 offset; offset = ((entry->symlink) ? entry->symlink->offset : entry->offset); success = retval->seek(retval, offset); } /* if */ if (!success) { retval->destroy(retval); retval = NULL; } /* if */ return retval; } /* zip_get_io */ static PHYSFS_Io *ZIP_openRead(void *opaque, const char *filename) { PHYSFS_Io *retval = NULL; ZIPinfo *info = (ZIPinfo *) opaque; ZIPentry *entry = zip_find_entry(info, filename); ZIPfileinfo *finfo = NULL; PHYSFS_Io *io = NULL; PHYSFS_uint8 *password = NULL; /* if not found, see if maybe "$PASSWORD" is appended. */ if ((!entry) && (info->has_crypto)) { const char *ptr = strrchr(filename, '$'); if (ptr != NULL) { const size_t len = (size_t) (ptr - filename); char *str = (char *) __PHYSFS_smallAlloc(len + 1); BAIL_IF(!str, PHYSFS_ERR_OUT_OF_MEMORY, NULL); memcpy(str, filename, len); str[len] = '\0'; entry = zip_find_entry(info, str); __PHYSFS_smallFree(str); password = (PHYSFS_uint8 *) (ptr + 1); } /* if */ } /* if */ BAIL_IF_ERRPASS(!entry, NULL); BAIL_IF_ERRPASS(!zip_resolve(info->io, info, entry), NULL); BAIL_IF(entry->tree.isdir, PHYSFS_ERR_NOT_A_FILE, NULL); retval = (PHYSFS_Io *) allocator.Malloc(sizeof (PHYSFS_Io)); GOTO_IF(!retval, PHYSFS_ERR_OUT_OF_MEMORY, ZIP_openRead_failed); finfo = (ZIPfileinfo *) allocator.Malloc(sizeof (ZIPfileinfo)); GOTO_IF(!finfo, PHYSFS_ERR_OUT_OF_MEMORY, ZIP_openRead_failed); memset(finfo, '\0', sizeof (ZIPfileinfo)); io = zip_get_io(info->io, info, entry); GOTO_IF_ERRPASS(!io, ZIP_openRead_failed); finfo->io = io; finfo->entry = ((entry->symlink != NULL) ? entry->symlink : entry); initializeZStream(&finfo->stream); if (finfo->entry->compression_method != COMPMETH_NONE) { finfo->buffer = (PHYSFS_uint8 *) allocator.Malloc(ZIP_READBUFSIZE); if (!finfo->buffer) GOTO(PHYSFS_ERR_OUT_OF_MEMORY, ZIP_openRead_failed); else if (zlib_err(inflateInit2(&finfo->stream, -MAX_WBITS)) != Z_OK) goto ZIP_openRead_failed; } /* if */ if (!zip_entry_is_tradional_crypto(entry)) GOTO_IF(password != NULL, PHYSFS_ERR_BAD_PASSWORD, ZIP_openRead_failed); else { PHYSFS_uint8 crypto_header[12]; GOTO_IF(password == NULL, PHYSFS_ERR_BAD_PASSWORD, ZIP_openRead_failed); if (io->read(io, crypto_header, 12) != 12) goto ZIP_openRead_failed; else if (!zip_prep_crypto_keys(finfo, crypto_header, password)) goto ZIP_openRead_failed; } /* if */ memcpy(retval, &ZIP_Io, sizeof (PHYSFS_Io)); retval->opaque = finfo; return retval; ZIP_openRead_failed: if (finfo != NULL) { if (finfo->io != NULL) finfo->io->destroy(finfo->io); if (finfo->buffer != NULL) { allocator.Free(finfo->buffer); inflateEnd(&finfo->stream); } /* if */ allocator.Free(finfo); } /* if */ if (retval != NULL) allocator.Free(retval); return NULL; } /* ZIP_openRead */ static PHYSFS_Io *ZIP_openWrite(void *opaque, const char *filename) { BAIL(PHYSFS_ERR_READ_ONLY, NULL); } /* ZIP_openWrite */ static PHYSFS_Io *ZIP_openAppend(void *opaque, const char *filename) { BAIL(PHYSFS_ERR_READ_ONLY, NULL); } /* ZIP_openAppend */ static int ZIP_remove(void *opaque, const char *name) { BAIL(PHYSFS_ERR_READ_ONLY, 0); } /* ZIP_remove */ static int ZIP_mkdir(void *opaque, const char *name) { BAIL(PHYSFS_ERR_READ_ONLY, 0); } /* ZIP_mkdir */ static int ZIP_stat(void *opaque, const char *filename, PHYSFS_Stat *stat) { ZIPinfo *info = (ZIPinfo *) opaque; ZIPentry *entry = zip_find_entry(info, filename); if (entry == NULL) return 0; else if (!zip_resolve(info->io, info, entry)) return 0; else if (entry->resolved == ZIP_DIRECTORY) { stat->filesize = 0; stat->filetype = PHYSFS_FILETYPE_DIRECTORY; } /* if */ else if (zip_entry_is_symlink(entry)) { stat->filesize = 0; stat->filetype = PHYSFS_FILETYPE_SYMLINK; } /* else if */ else { stat->filesize = (PHYSFS_sint64) entry->uncompressed_size; stat->filetype = PHYSFS_FILETYPE_REGULAR; } /* else */ stat->modtime = ((entry) ? entry->last_mod_time : 0); stat->createtime = stat->modtime; stat->accesstime = -1; stat->readonly = 1; /* .zip files are always read only */ return 1; } /* ZIP_stat */ const PHYSFS_Archiver __PHYSFS_Archiver_ZIP = { CURRENT_PHYSFS_ARCHIVER_API_VERSION, { "ZIP", "PkZip/WinZip/Info-Zip compatible", "Ryan C. Gordon ", "https://icculus.org/physfs/", 1, /* supportsSymlinks */ }, ZIP_openArchive, __PHYSFS_DirTreeEnumerate, ZIP_openRead, ZIP_openWrite, ZIP_openAppend, ZIP_remove, ZIP_mkdir, ZIP_stat, ZIP_closeArchive }; #endif /* defined PHYSFS_SUPPORTS_ZIP */ /* end of physfs_archiver_zip.c ... */ ================================================ FILE: src/libraries/physfs/physfs_byteorder.c ================================================ /** * PhysicsFS; a portable, flexible file i/o abstraction. * * Documentation is in physfs.h. It's verbose, honest. :) * * Please see the file LICENSE.txt in the source's root directory. * * This file written by Ryan C. Gordon. */ #define __PHYSICSFS_INTERNAL__ #include "physfs_internal.h" #ifndef PHYSFS_Swap16 static inline PHYSFS_uint16 PHYSFS_Swap16(PHYSFS_uint16 D) { return ((D<<8)|(D>>8)); } #endif #ifndef PHYSFS_Swap32 static inline PHYSFS_uint32 PHYSFS_Swap32(PHYSFS_uint32 D) { return ((D<<24)|((D<<8)&0x00FF0000)|((D>>8)&0x0000FF00)|(D>>24)); } #endif #ifndef PHYSFS_NO_64BIT_SUPPORT #ifndef PHYSFS_Swap64 static inline PHYSFS_uint64 PHYSFS_Swap64(PHYSFS_uint64 val) { PHYSFS_uint32 hi, lo; /* Separate into high and low 32-bit values and swap them */ lo = (PHYSFS_uint32)(val&0xFFFFFFFF); val >>= 32; hi = (PHYSFS_uint32)(val&0xFFFFFFFF); val = PHYSFS_Swap32(lo); val <<= 32; val |= PHYSFS_Swap32(hi); return val; } #endif #else #ifndef PHYSFS_Swap64 /* This is mainly to keep compilers from complaining in PHYSFS code. If there is no real 64-bit datatype, then compilers will complain about the fake 64-bit datatype that PHYSFS provides when it compiles user code. */ #define PHYSFS_Swap64(X) (X) #endif #endif /* PHYSFS_NO_64BIT_SUPPORT */ /* Byteswap item from the specified endianness to the native endianness */ #if PHYSFS_BYTEORDER == PHYSFS_LIL_ENDIAN PHYSFS_uint16 PHYSFS_swapULE16(PHYSFS_uint16 x) { return x; } PHYSFS_sint16 PHYSFS_swapSLE16(PHYSFS_sint16 x) { return x; } PHYSFS_uint32 PHYSFS_swapULE32(PHYSFS_uint32 x) { return x; } PHYSFS_sint32 PHYSFS_swapSLE32(PHYSFS_sint32 x) { return x; } PHYSFS_uint64 PHYSFS_swapULE64(PHYSFS_uint64 x) { return x; } PHYSFS_sint64 PHYSFS_swapSLE64(PHYSFS_sint64 x) { return x; } PHYSFS_uint16 PHYSFS_swapUBE16(PHYSFS_uint16 x) { return PHYSFS_Swap16(x); } PHYSFS_sint16 PHYSFS_swapSBE16(PHYSFS_sint16 x) { return PHYSFS_Swap16(x); } PHYSFS_uint32 PHYSFS_swapUBE32(PHYSFS_uint32 x) { return PHYSFS_Swap32(x); } PHYSFS_sint32 PHYSFS_swapSBE32(PHYSFS_sint32 x) { return PHYSFS_Swap32(x); } PHYSFS_uint64 PHYSFS_swapUBE64(PHYSFS_uint64 x) { return PHYSFS_Swap64(x); } PHYSFS_sint64 PHYSFS_swapSBE64(PHYSFS_sint64 x) { return PHYSFS_Swap64(x); } #else PHYSFS_uint16 PHYSFS_swapULE16(PHYSFS_uint16 x) { return PHYSFS_Swap16(x); } PHYSFS_sint16 PHYSFS_swapSLE16(PHYSFS_sint16 x) { return PHYSFS_Swap16(x); } PHYSFS_uint32 PHYSFS_swapULE32(PHYSFS_uint32 x) { return PHYSFS_Swap32(x); } PHYSFS_sint32 PHYSFS_swapSLE32(PHYSFS_sint32 x) { return PHYSFS_Swap32(x); } PHYSFS_uint64 PHYSFS_swapULE64(PHYSFS_uint64 x) { return PHYSFS_Swap64(x); } PHYSFS_sint64 PHYSFS_swapSLE64(PHYSFS_sint64 x) { return PHYSFS_Swap64(x); } PHYSFS_uint16 PHYSFS_swapUBE16(PHYSFS_uint16 x) { return x; } PHYSFS_sint16 PHYSFS_swapSBE16(PHYSFS_sint16 x) { return x; } PHYSFS_uint32 PHYSFS_swapUBE32(PHYSFS_uint32 x) { return x; } PHYSFS_sint32 PHYSFS_swapSBE32(PHYSFS_sint32 x) { return x; } PHYSFS_uint64 PHYSFS_swapUBE64(PHYSFS_uint64 x) { return x; } PHYSFS_sint64 PHYSFS_swapSBE64(PHYSFS_sint64 x) { return x; } #endif static inline int readAll(PHYSFS_File *file, void *val, const size_t len) { return (PHYSFS_readBytes(file, val, len) == len); } /* readAll */ #define PHYSFS_BYTEORDER_READ(datatype, swaptype) \ int PHYSFS_read##swaptype(PHYSFS_File *file, PHYSFS_##datatype *val) { \ PHYSFS_##datatype in; \ BAIL_IF(val == NULL, PHYSFS_ERR_INVALID_ARGUMENT, 0); \ BAIL_IF_ERRPASS(!readAll(file, &in, sizeof (in)), 0); \ *val = PHYSFS_swap##swaptype(in); \ return 1; \ } PHYSFS_BYTEORDER_READ(sint16, SLE16) PHYSFS_BYTEORDER_READ(uint16, ULE16) PHYSFS_BYTEORDER_READ(sint16, SBE16) PHYSFS_BYTEORDER_READ(uint16, UBE16) PHYSFS_BYTEORDER_READ(sint32, SLE32) PHYSFS_BYTEORDER_READ(uint32, ULE32) PHYSFS_BYTEORDER_READ(sint32, SBE32) PHYSFS_BYTEORDER_READ(uint32, UBE32) PHYSFS_BYTEORDER_READ(sint64, SLE64) PHYSFS_BYTEORDER_READ(uint64, ULE64) PHYSFS_BYTEORDER_READ(sint64, SBE64) PHYSFS_BYTEORDER_READ(uint64, UBE64) static inline int writeAll(PHYSFS_File *f, const void *val, const size_t len) { return (PHYSFS_writeBytes(f, val, len) == len); } /* writeAll */ #define PHYSFS_BYTEORDER_WRITE(datatype, swaptype) \ int PHYSFS_write##swaptype(PHYSFS_File *file, PHYSFS_##datatype val) { \ const PHYSFS_##datatype out = PHYSFS_swap##swaptype(val); \ BAIL_IF_ERRPASS(!writeAll(file, &out, sizeof (out)), 0); \ return 1; \ } PHYSFS_BYTEORDER_WRITE(sint16, SLE16) PHYSFS_BYTEORDER_WRITE(uint16, ULE16) PHYSFS_BYTEORDER_WRITE(sint16, SBE16) PHYSFS_BYTEORDER_WRITE(uint16, UBE16) PHYSFS_BYTEORDER_WRITE(sint32, SLE32) PHYSFS_BYTEORDER_WRITE(uint32, ULE32) PHYSFS_BYTEORDER_WRITE(sint32, SBE32) PHYSFS_BYTEORDER_WRITE(uint32, UBE32) PHYSFS_BYTEORDER_WRITE(sint64, SLE64) PHYSFS_BYTEORDER_WRITE(uint64, ULE64) PHYSFS_BYTEORDER_WRITE(sint64, SBE64) PHYSFS_BYTEORDER_WRITE(uint64, UBE64) /* end of physfs_byteorder.c ... */ ================================================ FILE: src/libraries/physfs/physfs_casefolding.h ================================================ /* * This file is part of PhysicsFS (https://icculus.org/physfs/) * * This data generated by physfs/extras/makecasefoldhashtable.pl ... * Do not manually edit this file! * * Please see the file LICENSE.txt in the source's root directory. */ #ifndef _INCLUDE_PHYSFS_CASEFOLDING_H_ #define _INCLUDE_PHYSFS_CASEFOLDING_H_ #ifndef __PHYSICSFS_INTERNAL__ #error Do not include this header from your applications. #endif /* We build three simple hashmaps here: one that maps Unicode codepoints to a one, two, or three lowercase codepoints. To retrieve this info: look at case_fold_hashX, where X is 1, 2, or 3. Most foldable codepoints fold to one, a few dozen fold to two, and a handful fold to three. If the codepoint isn't in any of these hashes, it doesn't fold (no separate upper and lowercase). Almost all these codepoints fit into 16 bits, so we hash them as such to save memory. If a codepoint is > 0xFFFF, we have separate hashes for them, since there are (currently) only about 120 of them and (currently) all of them map to a single lowercase codepoint. */ typedef struct CaseFoldMapping1_32 { PHYSFS_uint32 from; PHYSFS_uint32 to0; } CaseFoldMapping1_32; typedef struct CaseFoldMapping1_16 { PHYSFS_uint16 from; PHYSFS_uint16 to0; } CaseFoldMapping1_16; typedef struct CaseFoldMapping2_16 { PHYSFS_uint16 from; PHYSFS_uint16 to0; PHYSFS_uint16 to1; } CaseFoldMapping2_16; typedef struct CaseFoldMapping3_16 { PHYSFS_uint16 from; PHYSFS_uint16 to0; PHYSFS_uint16 to1; PHYSFS_uint16 to2; } CaseFoldMapping3_16; typedef struct CaseFoldHashBucket1_16 { const CaseFoldMapping1_16 *list; const PHYSFS_uint8 count; } CaseFoldHashBucket1_16; typedef struct CaseFoldHashBucket1_32 { const CaseFoldMapping1_32 *list; const PHYSFS_uint8 count; } CaseFoldHashBucket1_32; typedef struct CaseFoldHashBucket2_16 { const CaseFoldMapping2_16 *list; const PHYSFS_uint8 count; } CaseFoldHashBucket2_16; typedef struct CaseFoldHashBucket3_16 { const CaseFoldMapping3_16 *list; const PHYSFS_uint8 count; } CaseFoldHashBucket3_16; static const CaseFoldMapping1_16 case_fold1_16_000[] = { { 0x0202, 0x0203 }, { 0x0404, 0x0454 }, { 0x1E1E, 0x1E1F }, { 0x2C2C, 0x2C5C }, { 0xABAB, 0x13DB } }; static const CaseFoldMapping1_16 case_fold1_16_001[] = { { 0x0100, 0x0101 }, { 0x0405, 0x0455 }, { 0x0504, 0x0505 }, { 0x2C2D, 0x2C5D }, { 0xA7A6, 0xA7A7 }, { 0xABAA, 0x13DA } }; static const CaseFoldMapping1_16 case_fold1_16_002[] = { { 0x0200, 0x0201 }, { 0x0406, 0x0456 }, { 0x1E1C, 0x1E1D }, { 0x1F1D, 0x1F15 }, { 0x2C2E, 0x2C5E }, { 0xABA9, 0x13D9 } }; static const CaseFoldMapping1_16 case_fold1_16_003[] = { { 0x0102, 0x0103 }, { 0x0407, 0x0457 }, { 0x0506, 0x0507 }, { 0x1F1C, 0x1F14 }, { 0xA7A4, 0xA7A5 }, { 0xABA8, 0x13D8 } }; static const CaseFoldMapping1_16 case_fold1_16_004[] = { { 0x0206, 0x0207 }, { 0x0400, 0x0450 }, { 0x1E1A, 0x1E1B }, { 0x1F1B, 0x1F13 }, { 0x2C28, 0x2C58 }, { 0xABAF, 0x13DF } }; static const CaseFoldMapping1_16 case_fold1_16_005[] = { { 0x0104, 0x0105 }, { 0x0401, 0x0451 }, { 0x0500, 0x0501 }, { 0x1F1A, 0x1F12 }, { 0x2C29, 0x2C59 }, { 0xA7A2, 0xA7A3 }, { 0xABAE, 0x13DE } }; static const CaseFoldMapping1_16 case_fold1_16_006[] = { { 0x0204, 0x0205 }, { 0x0402, 0x0452 }, { 0x1E18, 0x1E19 }, { 0x1F19, 0x1F11 }, { 0x2C2A, 0x2C5A }, { 0xABAD, 0x13DD } }; static const CaseFoldMapping1_16 case_fold1_16_007[] = { { 0x0106, 0x0107 }, { 0x0403, 0x0453 }, { 0x0502, 0x0503 }, { 0x1F18, 0x1F10 }, { 0x2126, 0x03C9 }, { 0x2C2B, 0x2C5B }, { 0xA7A0, 0xA7A1 }, { 0xABAC, 0x13DC } }; static const CaseFoldMapping1_16 case_fold1_16_008[] = { { 0x020A, 0x020B }, { 0x040C, 0x045C }, { 0x1E16, 0x1E17 }, { 0x2C24, 0x2C54 }, { 0xABA3, 0x13D3 } }; static const CaseFoldMapping1_16 case_fold1_16_009[] = { { 0x0108, 0x0109 }, { 0x040D, 0x045D }, { 0x050C, 0x050D }, { 0x2C25, 0x2C55 }, { 0xABA2, 0x13D2 } }; static const CaseFoldMapping1_16 case_fold1_16_010[] = { { 0x0208, 0x0209 }, { 0x040E, 0x045E }, { 0x1E14, 0x1E15 }, { 0x212B, 0x00E5 }, { 0x2C26, 0x2C56 }, { 0xA7AD, 0x026C }, { 0xABA1, 0x13D1 } }; static const CaseFoldMapping1_16 case_fold1_16_011[] = { { 0x010A, 0x010B }, { 0x040F, 0x045F }, { 0x050E, 0x050F }, { 0x212A, 0x006B }, { 0x2C27, 0x2C57 }, { 0xA7AC, 0x0261 }, { 0xABA0, 0x13D0 } }; static const CaseFoldMapping1_16 case_fold1_16_012[] = { { 0x020E, 0x020F }, { 0x0408, 0x0458 }, { 0x1E12, 0x1E13 }, { 0x2C20, 0x2C50 }, { 0xA7AB, 0x025C }, { 0xABA7, 0x13D7 } }; static const CaseFoldMapping1_16 case_fold1_16_013[] = { { 0x010C, 0x010D }, { 0x0409, 0x0459 }, { 0x0508, 0x0509 }, { 0x2C21, 0x2C51 }, { 0xA7AA, 0x0266 }, { 0xABA6, 0x13D6 } }; static const CaseFoldMapping1_16 case_fold1_16_014[] = { { 0x020C, 0x020D }, { 0x040A, 0x045A }, { 0x1E10, 0x1E11 }, { 0x2C22, 0x2C52 }, { 0xABA5, 0x13D5 } }; static const CaseFoldMapping1_16 case_fold1_16_015[] = { { 0x010E, 0x010F }, { 0x040B, 0x045B }, { 0x050A, 0x050B }, { 0x2C23, 0x2C53 }, { 0xA7A8, 0xA7A9 }, { 0xABA4, 0x13D4 } }; static const CaseFoldMapping1_16 case_fold1_16_016[] = { { 0x0212, 0x0213 }, { 0x0414, 0x0434 }, { 0x1E0E, 0x1E0F }, { 0x1F0F, 0x1F07 }, { 0xABBB, 0x13EB } }; static const CaseFoldMapping1_16 case_fold1_16_017[] = { { 0x0110, 0x0111 }, { 0x0415, 0x0435 }, { 0x0514, 0x0515 }, { 0x1F0E, 0x1F06 }, { 0xA7B6, 0xA7B7 }, { 0xABBA, 0x13EA } }; static const CaseFoldMapping1_16 case_fold1_16_018[] = { { 0x0210, 0x0211 }, { 0x0416, 0x0436 }, { 0x1E0C, 0x1E0D }, { 0x1F0D, 0x1F05 }, { 0xABB9, 0x13E9 } }; static const CaseFoldMapping1_16 case_fold1_16_019[] = { { 0x0112, 0x0113 }, { 0x0417, 0x0437 }, { 0x0516, 0x0517 }, { 0x1F0C, 0x1F04 }, { 0x2132, 0x214E }, { 0xA7B4, 0xA7B5 }, { 0xABB8, 0x13E8 } }; static const CaseFoldMapping1_16 case_fold1_16_020[] = { { 0x0216, 0x0217 }, { 0x0410, 0x0430 }, { 0x1E0A, 0x1E0B }, { 0x1F0B, 0x1F03 }, { 0xA7B3, 0xAB53 }, { 0xABBF, 0x13EF } }; static const CaseFoldMapping1_16 case_fold1_16_021[] = { { 0x0114, 0x0115 }, { 0x0411, 0x0431 }, { 0x0510, 0x0511 }, { 0x1F0A, 0x1F02 }, { 0xA7B2, 0x029D }, { 0xABBE, 0x13EE } }; static const CaseFoldMapping1_16 case_fold1_16_022[] = { { 0x0214, 0x0215 }, { 0x0412, 0x0432 }, { 0x1E08, 0x1E09 }, { 0x1F09, 0x1F01 }, { 0xA7B1, 0x0287 }, { 0xABBD, 0x13ED } }; static const CaseFoldMapping1_16 case_fold1_16_023[] = { { 0x0116, 0x0117 }, { 0x0413, 0x0433 }, { 0x0512, 0x0513 }, { 0x1F08, 0x1F00 }, { 0xA7B0, 0x029E }, { 0xABBC, 0x13EC } }; static const CaseFoldMapping1_16 case_fold1_16_024[] = { { 0x021A, 0x021B }, { 0x041C, 0x043C }, { 0x1E06, 0x1E07 }, { 0xABB3, 0x13E3 } }; static const CaseFoldMapping1_16 case_fold1_16_025[] = { { 0x0118, 0x0119 }, { 0x041D, 0x043D }, { 0x051C, 0x051D }, { 0xABB2, 0x13E2 } }; static const CaseFoldMapping1_16 case_fold1_16_026[] = { { 0x0218, 0x0219 }, { 0x041E, 0x043E }, { 0x1E04, 0x1E05 }, { 0xABB1, 0x13E1 } }; static const CaseFoldMapping1_16 case_fold1_16_027[] = { { 0x011A, 0x011B }, { 0x041F, 0x043F }, { 0x051E, 0x051F }, { 0xABB0, 0x13E0 } }; static const CaseFoldMapping1_16 case_fold1_16_028[] = { { 0x021E, 0x021F }, { 0x0418, 0x0438 }, { 0x1E02, 0x1E03 }, { 0xABB7, 0x13E7 } }; static const CaseFoldMapping1_16 case_fold1_16_029[] = { { 0x011C, 0x011D }, { 0x0419, 0x0439 }, { 0x0518, 0x0519 }, { 0xABB6, 0x13E6 } }; static const CaseFoldMapping1_16 case_fold1_16_030[] = { { 0x021C, 0x021D }, { 0x041A, 0x043A }, { 0x1E00, 0x1E01 }, { 0xABB5, 0x13E5 } }; static const CaseFoldMapping1_16 case_fold1_16_031[] = { { 0x011E, 0x011F }, { 0x041B, 0x043B }, { 0x051A, 0x051B }, { 0xABB4, 0x13E4 } }; static const CaseFoldMapping1_16 case_fold1_16_032[] = { { 0x0222, 0x0223 }, { 0x0424, 0x0444 }, { 0x1E3E, 0x1E3F }, { 0x1F3F, 0x1F37 }, { 0x2C0C, 0x2C3C }, { 0xA686, 0xA687 }, { 0xAB8B, 0x13BB } }; static const CaseFoldMapping1_16 case_fold1_16_033[] = { { 0x0120, 0x0121 }, { 0x0425, 0x0445 }, { 0x0524, 0x0525 }, { 0x1F3E, 0x1F36 }, { 0x2C0D, 0x2C3D }, { 0xA786, 0xA787 }, { 0xAB8A, 0x13BA } }; static const CaseFoldMapping1_16 case_fold1_16_034[] = { { 0x0220, 0x019E }, { 0x0426, 0x0446 }, { 0x1E3C, 0x1E3D }, { 0x1F3D, 0x1F35 }, { 0x2C0E, 0x2C3E }, { 0xA684, 0xA685 }, { 0xAB89, 0x13B9 } }; static const CaseFoldMapping1_16 case_fold1_16_035[] = { { 0x0122, 0x0123 }, { 0x0427, 0x0447 }, { 0x0526, 0x0527 }, { 0x1F3C, 0x1F34 }, { 0x2C0F, 0x2C3F }, { 0xA784, 0xA785 }, { 0xAB88, 0x13B8 } }; static const CaseFoldMapping1_16 case_fold1_16_036[] = { { 0x0226, 0x0227 }, { 0x0420, 0x0440 }, { 0x1E3A, 0x1E3B }, { 0x1F3B, 0x1F33 }, { 0x2C08, 0x2C38 }, { 0xA682, 0xA683 }, { 0xAB8F, 0x13BF } }; static const CaseFoldMapping1_16 case_fold1_16_037[] = { { 0x0124, 0x0125 }, { 0x0421, 0x0441 }, { 0x0520, 0x0521 }, { 0x1F3A, 0x1F32 }, { 0x2C09, 0x2C39 }, { 0xA782, 0xA783 }, { 0xAB8E, 0x13BE } }; static const CaseFoldMapping1_16 case_fold1_16_038[] = { { 0x0224, 0x0225 }, { 0x0422, 0x0442 }, { 0x1E38, 0x1E39 }, { 0x1F39, 0x1F31 }, { 0x2C0A, 0x2C3A }, { 0xA680, 0xA681 }, { 0xAB8D, 0x13BD } }; static const CaseFoldMapping1_16 case_fold1_16_039[] = { { 0x0126, 0x0127 }, { 0x0423, 0x0443 }, { 0x0522, 0x0523 }, { 0x1F38, 0x1F30 }, { 0x2C0B, 0x2C3B }, { 0xA780, 0xA781 }, { 0xAB8C, 0x13BC } }; static const CaseFoldMapping1_16 case_fold1_16_040[] = { { 0x022A, 0x022B }, { 0x042C, 0x044C }, { 0x1E36, 0x1E37 }, { 0x2C04, 0x2C34 }, { 0xA68E, 0xA68F }, { 0xAB83, 0x13B3 } }; static const CaseFoldMapping1_16 case_fold1_16_041[] = { { 0x0128, 0x0129 }, { 0x042D, 0x044D }, { 0x052C, 0x052D }, { 0x2C05, 0x2C35 }, { 0xAB82, 0x13B2 } }; static const CaseFoldMapping1_16 case_fold1_16_042[] = { { 0x0228, 0x0229 }, { 0x042E, 0x044E }, { 0x1E34, 0x1E35 }, { 0x2C06, 0x2C36 }, { 0xA68C, 0xA68D }, { 0xA78D, 0x0265 }, { 0xAB81, 0x13B1 } }; static const CaseFoldMapping1_16 case_fold1_16_043[] = { { 0x012A, 0x012B }, { 0x042F, 0x044F }, { 0x052E, 0x052F }, { 0x2C07, 0x2C37 }, { 0xAB80, 0x13B0 } }; static const CaseFoldMapping1_16 case_fold1_16_044[] = { { 0x022E, 0x022F }, { 0x0428, 0x0448 }, { 0x1E32, 0x1E33 }, { 0x2C00, 0x2C30 }, { 0xA68A, 0xA68B }, { 0xA78B, 0xA78C }, { 0xAB87, 0x13B7 } }; static const CaseFoldMapping1_16 case_fold1_16_045[] = { { 0x012C, 0x012D }, { 0x0429, 0x0449 }, { 0x0528, 0x0529 }, { 0x2C01, 0x2C31 }, { 0xAB86, 0x13B6 } }; static const CaseFoldMapping1_16 case_fold1_16_046[] = { { 0x022C, 0x022D }, { 0x042A, 0x044A }, { 0x1E30, 0x1E31 }, { 0x2C02, 0x2C32 }, { 0xA688, 0xA689 }, { 0xAB85, 0x13B5 } }; static const CaseFoldMapping1_16 case_fold1_16_047[] = { { 0x012E, 0x012F }, { 0x042B, 0x044B }, { 0x052A, 0x052B }, { 0x2C03, 0x2C33 }, { 0xAB84, 0x13B4 } }; static const CaseFoldMapping1_16 case_fold1_16_048[] = { { 0x0232, 0x0233 }, { 0x0535, 0x0565 }, { 0x1E2E, 0x1E2F }, { 0x1F2F, 0x1F27 }, { 0x2C1C, 0x2C4C }, { 0xA696, 0xA697 }, { 0xAB9B, 0x13CB } }; static const CaseFoldMapping1_16 case_fold1_16_049[] = { { 0x0534, 0x0564 }, { 0x1F2E, 0x1F26 }, { 0x2C1D, 0x2C4D }, { 0xA796, 0xA797 }, { 0xAB9A, 0x13CA } }; static const CaseFoldMapping1_16 case_fold1_16_050[] = { { 0x0230, 0x0231 }, { 0x0537, 0x0567 }, { 0x1E2C, 0x1E2D }, { 0x1F2D, 0x1F25 }, { 0x2C1E, 0x2C4E }, { 0xA694, 0xA695 }, { 0xAB99, 0x13C9 } }; static const CaseFoldMapping1_16 case_fold1_16_051[] = { { 0x0132, 0x0133 }, { 0x0536, 0x0566 }, { 0x1F2C, 0x1F24 }, { 0x2C1F, 0x2C4F }, { 0xAB98, 0x13C8 } }; static const CaseFoldMapping1_16 case_fold1_16_052[] = { { 0x0531, 0x0561 }, { 0x1E2A, 0x1E2B }, { 0x1F2B, 0x1F23 }, { 0x2C18, 0x2C48 }, { 0xA692, 0xA693 }, { 0xAB9F, 0x13CF } }; static const CaseFoldMapping1_16 case_fold1_16_053[] = { { 0x0134, 0x0135 }, { 0x1F2A, 0x1F22 }, { 0x2C19, 0x2C49 }, { 0xA792, 0xA793 }, { 0xAB9E, 0x13CE } }; static const CaseFoldMapping1_16 case_fold1_16_054[] = { { 0x0533, 0x0563 }, { 0x1E28, 0x1E29 }, { 0x1F29, 0x1F21 }, { 0x2C1A, 0x2C4A }, { 0xA690, 0xA691 }, { 0xAB9D, 0x13CD } }; static const CaseFoldMapping1_16 case_fold1_16_055[] = { { 0x0136, 0x0137 }, { 0x0532, 0x0562 }, { 0x1F28, 0x1F20 }, { 0x2C1B, 0x2C4B }, { 0xA790, 0xA791 }, { 0xAB9C, 0x13CC } }; static const CaseFoldMapping1_16 case_fold1_16_056[] = { { 0x0139, 0x013A }, { 0x023A, 0x2C65 }, { 0x053D, 0x056D }, { 0x1E26, 0x1E27 }, { 0x2C14, 0x2C44 }, { 0xAB93, 0x13C3 } }; static const CaseFoldMapping1_16 case_fold1_16_057[] = { { 0x023B, 0x023C }, { 0x053C, 0x056C }, { 0x2C15, 0x2C45 }, { 0xA79E, 0xA79F }, { 0xAB92, 0x13C2 } }; static const CaseFoldMapping1_16 case_fold1_16_058[] = { { 0x013B, 0x013C }, { 0x053F, 0x056F }, { 0x1E24, 0x1E25 }, { 0x2C16, 0x2C46 }, { 0xAB91, 0x13C1 } }; static const CaseFoldMapping1_16 case_fold1_16_059[] = { { 0x053E, 0x056E }, { 0x2C17, 0x2C47 }, { 0xA79C, 0xA79D }, { 0xAB90, 0x13C0 } }; static const CaseFoldMapping1_16 case_fold1_16_060[] = { { 0x013D, 0x013E }, { 0x023E, 0x2C66 }, { 0x0539, 0x0569 }, { 0x1E22, 0x1E23 }, { 0x2C10, 0x2C40 }, { 0xA69A, 0xA69B }, { 0xAB97, 0x13C7 } }; static const CaseFoldMapping1_16 case_fold1_16_061[] = { { 0x0538, 0x0568 }, { 0x2C11, 0x2C41 }, { 0xA79A, 0xA79B }, { 0xAB96, 0x13C6 } }; static const CaseFoldMapping1_16 case_fold1_16_062[] = { { 0x013F, 0x0140 }, { 0x053B, 0x056B }, { 0x1E20, 0x1E21 }, { 0x2C12, 0x2C42 }, { 0xA698, 0xA699 }, { 0xAB95, 0x13C5 } }; static const CaseFoldMapping1_16 case_fold1_16_063[] = { { 0x023D, 0x019A }, { 0x053A, 0x056A }, { 0x2C13, 0x2C43 }, { 0xA798, 0xA799 }, { 0xAB94, 0x13C4 } }; static const CaseFoldMapping1_16 case_fold1_16_064[] = { { 0x0141, 0x0142 }, { 0x0545, 0x0575 }, { 0x1E5E, 0x1E5F }, { 0x1F5F, 0x1F57 }, { 0x2161, 0x2171 } }; static const CaseFoldMapping1_16 case_fold1_16_065[] = { { 0x0041, 0x0061 }, { 0x0243, 0x0180 }, { 0x0544, 0x0574 }, { 0x2160, 0x2170 }, { 0x2C6D, 0x0251 } }; static const CaseFoldMapping1_16 case_fold1_16_066[] = { { 0x0042, 0x0062 }, { 0x0143, 0x0144 }, { 0x0547, 0x0577 }, { 0x1E5C, 0x1E5D }, { 0x1F5D, 0x1F55 }, { 0x2163, 0x2173 }, { 0x2C6E, 0x0271 } }; static const CaseFoldMapping1_16 case_fold1_16_067[] = { { 0x0043, 0x0063 }, { 0x0241, 0x0242 }, { 0x0546, 0x0576 }, { 0x2162, 0x2172 }, { 0x2C6F, 0x0250 } }; static const CaseFoldMapping1_16 case_fold1_16_068[] = { { 0x0044, 0x0064 }, { 0x0145, 0x0146 }, { 0x0246, 0x0247 }, { 0x0541, 0x0571 }, { 0x1E5A, 0x1E5B }, { 0x1F5B, 0x1F53 }, { 0x2165, 0x2175 } }; static const CaseFoldMapping1_16 case_fold1_16_069[] = { { 0x0045, 0x0065 }, { 0x0540, 0x0570 }, { 0x2164, 0x2174 }, { 0x2C69, 0x2C6A } }; static const CaseFoldMapping1_16 case_fold1_16_070[] = { { 0x0046, 0x0066 }, { 0x0147, 0x0148 }, { 0x0244, 0x0289 }, { 0x0345, 0x03B9 }, { 0x0543, 0x0573 }, { 0x1E58, 0x1E59 }, { 0x1F59, 0x1F51 }, { 0x2167, 0x2177 } }; static const CaseFoldMapping1_16 case_fold1_16_071[] = { { 0x0047, 0x0067 }, { 0x0245, 0x028C }, { 0x0542, 0x0572 }, { 0x2166, 0x2176 }, { 0x2C6B, 0x2C6C } }; static const CaseFoldMapping1_16 case_fold1_16_072[] = { { 0x0048, 0x0068 }, { 0x024A, 0x024B }, { 0x054D, 0x057D }, { 0x1E56, 0x1E57 }, { 0x2169, 0x2179 }, { 0x2C64, 0x027D } }; static const CaseFoldMapping1_16 case_fold1_16_073[] = { { 0x0049, 0x0069 }, { 0x054C, 0x057C }, { 0x2168, 0x2178 } }; static const CaseFoldMapping1_16 case_fold1_16_074[] = { { 0x004A, 0x006A }, { 0x0248, 0x0249 }, { 0x054F, 0x057F }, { 0x1E54, 0x1E55 }, { 0x216B, 0x217B } }; static const CaseFoldMapping1_16 case_fold1_16_075[] = { { 0x004B, 0x006B }, { 0x014A, 0x014B }, { 0x054E, 0x057E }, { 0x216A, 0x217A }, { 0x2C67, 0x2C68 } }; static const CaseFoldMapping1_16 case_fold1_16_076[] = { { 0x004C, 0x006C }, { 0x024E, 0x024F }, { 0x0549, 0x0579 }, { 0x1E52, 0x1E53 }, { 0x216D, 0x217D }, { 0x2C60, 0x2C61 } }; static const CaseFoldMapping1_16 case_fold1_16_077[] = { { 0x004D, 0x006D }, { 0x014C, 0x014D }, { 0x0548, 0x0578 }, { 0x216C, 0x217C } }; static const CaseFoldMapping1_16 case_fold1_16_078[] = { { 0x004E, 0x006E }, { 0x024C, 0x024D }, { 0x054B, 0x057B }, { 0x1E50, 0x1E51 }, { 0x216F, 0x217F }, { 0x2C62, 0x026B } }; static const CaseFoldMapping1_16 case_fold1_16_079[] = { { 0x004F, 0x006F }, { 0x014E, 0x014F }, { 0x054A, 0x057A }, { 0x216E, 0x217E }, { 0x2C63, 0x1D7D } }; static const CaseFoldMapping1_16 case_fold1_16_080[] = { { 0x0050, 0x0070 }, { 0x0555, 0x0585 }, { 0x1E4E, 0x1E4F } }; static const CaseFoldMapping1_16 case_fold1_16_081[] = { { 0x0051, 0x0071 }, { 0x0150, 0x0151 }, { 0x0554, 0x0584 } }; static const CaseFoldMapping1_16 case_fold1_16_082[] = { { 0x0052, 0x0072 }, { 0x1E4C, 0x1E4D }, { 0x1F4D, 0x1F45 }, { 0x2C7E, 0x023F } }; static const CaseFoldMapping1_16 case_fold1_16_083[] = { { 0x0053, 0x0073 }, { 0x0152, 0x0153 }, { 0x0556, 0x0586 }, { 0x1F4C, 0x1F44 }, { 0x2C7F, 0x0240 } }; static const CaseFoldMapping1_16 case_fold1_16_084[] = { { 0x0054, 0x0074 }, { 0x0551, 0x0581 }, { 0x1E4A, 0x1E4B }, { 0x1F4B, 0x1F43 } }; static const CaseFoldMapping1_16 case_fold1_16_085[] = { { 0x0055, 0x0075 }, { 0x0154, 0x0155 }, { 0x0550, 0x0580 }, { 0x1F4A, 0x1F42 } }; static const CaseFoldMapping1_16 case_fold1_16_086[] = { { 0x0056, 0x0076 }, { 0x0553, 0x0583 }, { 0x1E48, 0x1E49 }, { 0x1F49, 0x1F41 } }; static const CaseFoldMapping1_16 case_fold1_16_087[] = { { 0x0057, 0x0077 }, { 0x0156, 0x0157 }, { 0x0552, 0x0582 }, { 0x1F48, 0x1F40 } }; static const CaseFoldMapping1_16 case_fold1_16_088[] = { { 0x0058, 0x0078 }, { 0x1E46, 0x1E47 } }; static const CaseFoldMapping1_16 case_fold1_16_089[] = { { 0x0059, 0x0079 }, { 0x0158, 0x0159 }, { 0x2C75, 0x2C76 } }; static const CaseFoldMapping1_16 case_fold1_16_090[] = { { 0x005A, 0x007A }, { 0x1E44, 0x1E45 } }; static const CaseFoldMapping1_16 case_fold1_16_091[] = { { 0x015A, 0x015B } }; static const CaseFoldMapping1_16 case_fold1_16_092[] = { { 0x1E42, 0x1E43 }, { 0x2C70, 0x0252 } }; static const CaseFoldMapping1_16 case_fold1_16_093[] = { { 0x015C, 0x015D } }; static const CaseFoldMapping1_16 case_fold1_16_094[] = { { 0x1E40, 0x1E41 }, { 0x2C72, 0x2C73 } }; static const CaseFoldMapping1_16 case_fold1_16_095[] = { { 0x015E, 0x015F } }; static const CaseFoldMapping1_16 case_fold1_16_096[] = { { 0x0464, 0x0465 }, { 0x1E7E, 0x1E7F } }; static const CaseFoldMapping1_16 case_fold1_16_097[] = { { 0x0160, 0x0161 } }; static const CaseFoldMapping1_16 case_fold1_16_098[] = { { 0x0466, 0x0467 }, { 0x1E7C, 0x1E7D } }; static const CaseFoldMapping1_16 case_fold1_16_099[] = { { 0x0162, 0x0163 } }; static const CaseFoldMapping1_16 case_fold1_16_100[] = { { 0x0460, 0x0461 }, { 0x1E7A, 0x1E7B } }; static const CaseFoldMapping1_16 case_fold1_16_101[] = { { 0x0164, 0x0165 } }; static const CaseFoldMapping1_16 case_fold1_16_102[] = { { 0x0462, 0x0463 }, { 0x1E78, 0x1E79 } }; static const CaseFoldMapping1_16 case_fold1_16_103[] = { { 0x0166, 0x0167 } }; static const CaseFoldMapping1_16 case_fold1_16_104[] = { { 0x046C, 0x046D }, { 0x1E76, 0x1E77 } }; static const CaseFoldMapping1_16 case_fold1_16_105[] = { { 0x0168, 0x0169 } }; static const CaseFoldMapping1_16 case_fold1_16_106[] = { { 0x046E, 0x046F }, { 0x1E74, 0x1E75 } }; static const CaseFoldMapping1_16 case_fold1_16_107[] = { { 0x016A, 0x016B } }; static const CaseFoldMapping1_16 case_fold1_16_108[] = { { 0x0468, 0x0469 }, { 0x1E72, 0x1E73 } }; static const CaseFoldMapping1_16 case_fold1_16_109[] = { { 0x016C, 0x016D } }; static const CaseFoldMapping1_16 case_fold1_16_110[] = { { 0x046A, 0x046B }, { 0x1E70, 0x1E71 } }; static const CaseFoldMapping1_16 case_fold1_16_111[] = { { 0x016E, 0x016F } }; static const CaseFoldMapping1_16 case_fold1_16_112[] = { { 0x0474, 0x0475 }, { 0x1E6E, 0x1E6F }, { 0x1F6F, 0x1F67 } }; static const CaseFoldMapping1_16 case_fold1_16_113[] = { { 0x0170, 0x0171 }, { 0x0372, 0x0373 }, { 0x1F6E, 0x1F66 } }; static const CaseFoldMapping1_16 case_fold1_16_114[] = { { 0x0476, 0x0477 }, { 0x1E6C, 0x1E6D }, { 0x1F6D, 0x1F65 } }; static const CaseFoldMapping1_16 case_fold1_16_115[] = { { 0x0172, 0x0173 }, { 0x0370, 0x0371 }, { 0x1F6C, 0x1F64 } }; static const CaseFoldMapping1_16 case_fold1_16_116[] = { { 0x0470, 0x0471 }, { 0x1E6A, 0x1E6B }, { 0x1F6B, 0x1F63 } }; static const CaseFoldMapping1_16 case_fold1_16_117[] = { { 0x0174, 0x0175 }, { 0x0376, 0x0377 }, { 0x1F6A, 0x1F62 } }; static const CaseFoldMapping1_16 case_fold1_16_118[] = { { 0x0472, 0x0473 }, { 0x1E68, 0x1E69 }, { 0x1F69, 0x1F61 } }; static const CaseFoldMapping1_16 case_fold1_16_119[] = { { 0x0176, 0x0177 }, { 0x1F68, 0x1F60 } }; static const CaseFoldMapping1_16 case_fold1_16_120[] = { { 0x0179, 0x017A }, { 0x047C, 0x047D }, { 0x1E66, 0x1E67 } }; static const CaseFoldMapping1_16 case_fold1_16_121[] = { { 0x0178, 0x00FF } }; static const CaseFoldMapping1_16 case_fold1_16_122[] = { { 0x017B, 0x017C }, { 0x047E, 0x047F }, { 0x1E64, 0x1E65 } }; static const CaseFoldMapping1_16 case_fold1_16_124[] = { { 0x017D, 0x017E }, { 0x037F, 0x03F3 }, { 0x0478, 0x0479 }, { 0x1E62, 0x1E63 } }; static const CaseFoldMapping1_16 case_fold1_16_126[] = { { 0x017F, 0x0073 }, { 0x047A, 0x047B }, { 0x1E60, 0x1E61 } }; static const CaseFoldMapping1_16 case_fold1_16_128[] = { { 0x0181, 0x0253 }, { 0x2CAC, 0x2CAD } }; static const CaseFoldMapping1_16 case_fold1_16_129[] = { { 0xA726, 0xA727 } }; static const CaseFoldMapping1_16 case_fold1_16_130[] = { { 0x2CAE, 0x2CAF } }; static const CaseFoldMapping1_16 case_fold1_16_131[] = { { 0x0182, 0x0183 }, { 0xA724, 0xA725 } }; static const CaseFoldMapping1_16 case_fold1_16_132[] = { { 0x0480, 0x0481 }, { 0x2CA8, 0x2CA9 } }; static const CaseFoldMapping1_16 case_fold1_16_133[] = { { 0x0184, 0x0185 }, { 0x0386, 0x03AC }, { 0x1E9B, 0x1E61 }, { 0xA722, 0xA723 } }; static const CaseFoldMapping1_16 case_fold1_16_134[] = { { 0x0187, 0x0188 }, { 0x2CAA, 0x2CAB } }; static const CaseFoldMapping1_16 case_fold1_16_135[] = { { 0x0186, 0x0254 } }; static const CaseFoldMapping1_16 case_fold1_16_136[] = { { 0x0189, 0x0256 }, { 0x048C, 0x048D }, { 0x2CA4, 0x2CA5 } }; static const CaseFoldMapping1_16 case_fold1_16_137[] = { { 0x038A, 0x03AF }, { 0xA72E, 0xA72F } }; static const CaseFoldMapping1_16 case_fold1_16_138[] = { { 0x018B, 0x018C }, { 0x0389, 0x03AE }, { 0x048E, 0x048F }, { 0x1E94, 0x1E95 }, { 0x2CA6, 0x2CA7 } }; static const CaseFoldMapping1_16 case_fold1_16_139[] = { { 0x018A, 0x0257 }, { 0x0388, 0x03AD }, { 0xA72C, 0xA72D } }; static const CaseFoldMapping1_16 case_fold1_16_140[] = { { 0x038F, 0x03CE }, { 0x1E92, 0x1E93 }, { 0x2CA0, 0x2CA1 } }; static const CaseFoldMapping1_16 case_fold1_16_141[] = { { 0x038E, 0x03CD }, { 0xA72A, 0xA72B } }; static const CaseFoldMapping1_16 case_fold1_16_142[] = { { 0x018F, 0x0259 }, { 0x048A, 0x048B }, { 0x1E90, 0x1E91 }, { 0x2CA2, 0x2CA3 } }; static const CaseFoldMapping1_16 case_fold1_16_143[] = { { 0x018E, 0x01DD }, { 0x038C, 0x03CC }, { 0xA728, 0xA729 } }; static const CaseFoldMapping1_16 case_fold1_16_144[] = { { 0x0191, 0x0192 }, { 0x0393, 0x03B3 }, { 0x0494, 0x0495 }, { 0x1E8E, 0x1E8F }, { 0x2CBC, 0x2CBD } }; static const CaseFoldMapping1_16 case_fold1_16_145[] = { { 0x0190, 0x025B }, { 0x0392, 0x03B2 }, { 0xA736, 0xA737 } }; static const CaseFoldMapping1_16 case_fold1_16_146[] = { { 0x0193, 0x0260 }, { 0x0391, 0x03B1 }, { 0x0496, 0x0497 }, { 0x1E8C, 0x1E8D }, { 0x24B6, 0x24D0 }, { 0x2CBE, 0x2CBF } }; static const CaseFoldMapping1_16 case_fold1_16_147[] = { { 0x24B7, 0x24D1 }, { 0xA734, 0xA735 } }; static const CaseFoldMapping1_16 case_fold1_16_148[] = { { 0x0397, 0x03B7 }, { 0x0490, 0x0491 }, { 0x1E8A, 0x1E8B }, { 0x2CB8, 0x2CB9 } }; static const CaseFoldMapping1_16 case_fold1_16_149[] = { { 0x0194, 0x0263 }, { 0x0396, 0x03B6 }, { 0xA732, 0xA733 } }; static const CaseFoldMapping1_16 case_fold1_16_150[] = { { 0x0197, 0x0268 }, { 0x0395, 0x03B5 }, { 0x0492, 0x0493 }, { 0x1E88, 0x1E89 }, { 0x2CBA, 0x2CBB } }; static const CaseFoldMapping1_16 case_fold1_16_151[] = { { 0x0196, 0x0269 }, { 0x0394, 0x03B4 } }; static const CaseFoldMapping1_16 case_fold1_16_152[] = { { 0x039B, 0x03BB }, { 0x049C, 0x049D }, { 0x1E86, 0x1E87 }, { 0x24BC, 0x24D6 }, { 0x2CB4, 0x2CB5 } }; static const CaseFoldMapping1_16 case_fold1_16_153[] = { { 0x0198, 0x0199 }, { 0x039A, 0x03BA }, { 0x24BD, 0x24D7 }, { 0xA73E, 0xA73F } }; static const CaseFoldMapping1_16 case_fold1_16_154[] = { { 0x0399, 0x03B9 }, { 0x049E, 0x049F }, { 0x1E84, 0x1E85 }, { 0x24BE, 0x24D8 }, { 0x2CB6, 0x2CB7 } }; static const CaseFoldMapping1_16 case_fold1_16_155[] = { { 0x0398, 0x03B8 }, { 0x24BF, 0x24D9 }, { 0xA73C, 0xA73D } }; static const CaseFoldMapping1_16 case_fold1_16_156[] = { { 0x019D, 0x0272 }, { 0x039F, 0x03BF }, { 0x0498, 0x0499 }, { 0x1E82, 0x1E83 }, { 0x24B8, 0x24D2 }, { 0x2CB0, 0x2CB1 } }; static const CaseFoldMapping1_16 case_fold1_16_157[] = { { 0x019C, 0x026F }, { 0x039E, 0x03BE }, { 0x24B9, 0x24D3 }, { 0xA73A, 0xA73B } }; static const CaseFoldMapping1_16 case_fold1_16_158[] = { { 0x019F, 0x0275 }, { 0x039D, 0x03BD }, { 0x049A, 0x049B }, { 0x1E80, 0x1E81 }, { 0x24BA, 0x24D4 }, { 0x2CB2, 0x2CB3 } }; static const CaseFoldMapping1_16 case_fold1_16_159[] = { { 0x039C, 0x03BC }, { 0x24BB, 0x24D5 }, { 0xA738, 0xA739 } }; static const CaseFoldMapping1_16 case_fold1_16_160[] = { { 0x03A3, 0x03C3 }, { 0x04A4, 0x04A5 }, { 0x10B0, 0x2D10 }, { 0x1EBE, 0x1EBF }, { 0x2C8C, 0x2C8D } }; static const CaseFoldMapping1_16 case_fold1_16_161[] = { { 0x01A0, 0x01A1 }, { 0x10B1, 0x2D11 }, { 0x1FBE, 0x03B9 } }; static const CaseFoldMapping1_16 case_fold1_16_162[] = { { 0x03A1, 0x03C1 }, { 0x04A6, 0x04A7 }, { 0x10B2, 0x2D12 }, { 0x1EBC, 0x1EBD }, { 0x2183, 0x2184 }, { 0x2C8E, 0x2C8F } }; static const CaseFoldMapping1_16 case_fold1_16_163[] = { { 0x01A2, 0x01A3 }, { 0x03A0, 0x03C0 }, { 0x10B3, 0x2D13 } }; static const CaseFoldMapping1_16 case_fold1_16_164[] = { { 0x03A7, 0x03C7 }, { 0x04A0, 0x04A1 }, { 0x10B4, 0x2D14 }, { 0x1EBA, 0x1EBB }, { 0x1FBB, 0x1F71 }, { 0x2C88, 0x2C89 } }; static const CaseFoldMapping1_16 case_fold1_16_165[] = { { 0x01A4, 0x01A5 }, { 0x03A6, 0x03C6 }, { 0x10B5, 0x2D15 }, { 0x1FBA, 0x1F70 } }; static const CaseFoldMapping1_16 case_fold1_16_166[] = { { 0x01A7, 0x01A8 }, { 0x03A5, 0x03C5 }, { 0x04A2, 0x04A3 }, { 0x10B6, 0x2D16 }, { 0x1EB8, 0x1EB9 }, { 0x1FB9, 0x1FB1 }, { 0x2C8A, 0x2C8B } }; static const CaseFoldMapping1_16 case_fold1_16_167[] = { { 0x01A6, 0x0280 }, { 0x03A4, 0x03C4 }, { 0x10B7, 0x2D17 }, { 0x1FB8, 0x1FB0 } }; static const CaseFoldMapping1_16 case_fold1_16_168[] = { { 0x01A9, 0x0283 }, { 0x03AB, 0x03CB }, { 0x04AC, 0x04AD }, { 0x10B8, 0x2D18 }, { 0x1EB6, 0x1EB7 }, { 0x2C84, 0x2C85 } }; static const CaseFoldMapping1_16 case_fold1_16_169[] = { { 0x03AA, 0x03CA }, { 0x10B9, 0x2D19 } }; static const CaseFoldMapping1_16 case_fold1_16_170[] = { { 0x03A9, 0x03C9 }, { 0x04AE, 0x04AF }, { 0x10BA, 0x2D1A }, { 0x1EB4, 0x1EB5 }, { 0x2C86, 0x2C87 } }; static const CaseFoldMapping1_16 case_fold1_16_171[] = { { 0x03A8, 0x03C8 }, { 0x10BB, 0x2D1B } }; static const CaseFoldMapping1_16 case_fold1_16_172[] = { { 0x04A8, 0x04A9 }, { 0x10BC, 0x2D1C }, { 0x1EB2, 0x1EB3 }, { 0x2C80, 0x2C81 } }; static const CaseFoldMapping1_16 case_fold1_16_173[] = { { 0x01AC, 0x01AD }, { 0x10BD, 0x2D1D } }; static const CaseFoldMapping1_16 case_fold1_16_174[] = { { 0x01AF, 0x01B0 }, { 0x04AA, 0x04AB }, { 0x10BE, 0x2D1E }, { 0x1EB0, 0x1EB1 }, { 0x2C82, 0x2C83 } }; static const CaseFoldMapping1_16 case_fold1_16_175[] = { { 0x01AE, 0x0288 }, { 0x10BF, 0x2D1F } }; static const CaseFoldMapping1_16 case_fold1_16_176[] = { { 0x01B1, 0x028A }, { 0x04B4, 0x04B5 }, { 0x10A0, 0x2D00 }, { 0x1EAE, 0x1EAF }, { 0x2C9C, 0x2C9D } }; static const CaseFoldMapping1_16 case_fold1_16_177[] = { { 0x10A1, 0x2D01 } }; static const CaseFoldMapping1_16 case_fold1_16_178[] = { { 0x01B3, 0x01B4 }, { 0x04B6, 0x04B7 }, { 0x10A2, 0x2D02 }, { 0x1EAC, 0x1EAD }, { 0x2C9E, 0x2C9F } }; static const CaseFoldMapping1_16 case_fold1_16_179[] = { { 0x01B2, 0x028B }, { 0x10A3, 0x2D03 } }; static const CaseFoldMapping1_16 case_fold1_16_180[] = { { 0x01B5, 0x01B6 }, { 0x04B0, 0x04B1 }, { 0x10A4, 0x2D04 }, { 0x1EAA, 0x1EAB }, { 0x2C98, 0x2C99 } }; static const CaseFoldMapping1_16 case_fold1_16_181[] = { { 0x00B5, 0x03BC }, { 0x10A5, 0x2D05 } }; static const CaseFoldMapping1_16 case_fold1_16_182[] = { { 0x01B7, 0x0292 }, { 0x04B2, 0x04B3 }, { 0x10A6, 0x2D06 }, { 0x1EA8, 0x1EA9 }, { 0x2C9A, 0x2C9B } }; static const CaseFoldMapping1_16 case_fold1_16_183[] = { { 0x10A7, 0x2D07 } }; static const CaseFoldMapping1_16 case_fold1_16_184[] = { { 0x04BC, 0x04BD }, { 0x10A8, 0x2D08 }, { 0x1EA6, 0x1EA7 }, { 0x2C94, 0x2C95 } }; static const CaseFoldMapping1_16 case_fold1_16_185[] = { { 0x01B8, 0x01B9 }, { 0x10A9, 0x2D09 } }; static const CaseFoldMapping1_16 case_fold1_16_186[] = { { 0x04BE, 0x04BF }, { 0x10AA, 0x2D0A }, { 0x1EA4, 0x1EA5 }, { 0x2C96, 0x2C97 } }; static const CaseFoldMapping1_16 case_fold1_16_187[] = { { 0x10AB, 0x2D0B } }; static const CaseFoldMapping1_16 case_fold1_16_188[] = { { 0x04B8, 0x04B9 }, { 0x10AC, 0x2D0C }, { 0x1EA2, 0x1EA3 }, { 0x2C90, 0x2C91 } }; static const CaseFoldMapping1_16 case_fold1_16_189[] = { { 0x01BC, 0x01BD }, { 0x10AD, 0x2D0D } }; static const CaseFoldMapping1_16 case_fold1_16_190[] = { { 0x04BA, 0x04BB }, { 0x10AE, 0x2D0E }, { 0x1EA0, 0x1EA1 }, { 0x2C92, 0x2C93 } }; static const CaseFoldMapping1_16 case_fold1_16_191[] = { { 0x10AF, 0x2D0F } }; static const CaseFoldMapping1_16 case_fold1_16_192[] = { { 0x00C0, 0x00E0 }, { 0x1EDE, 0x1EDF }, { 0xA666, 0xA667 } }; static const CaseFoldMapping1_16 case_fold1_16_193[] = { { 0x00C1, 0x00E1 }, { 0x03C2, 0x03C3 }, { 0x04C5, 0x04C6 }, { 0x2CED, 0x2CEE }, { 0xA766, 0xA767 } }; static const CaseFoldMapping1_16 case_fold1_16_194[] = { { 0x00C2, 0x00E2 }, { 0x1EDC, 0x1EDD }, { 0xA664, 0xA665 } }; static const CaseFoldMapping1_16 case_fold1_16_195[] = { { 0x00C3, 0x00E3 }, { 0x04C7, 0x04C8 }, { 0xA764, 0xA765 } }; static const CaseFoldMapping1_16 case_fold1_16_196[] = { { 0x00C4, 0x00E4 }, { 0x01C5, 0x01C6 }, { 0x04C0, 0x04CF }, { 0x1EDA, 0x1EDB }, { 0x1FDB, 0x1F77 }, { 0xA662, 0xA663 } }; static const CaseFoldMapping1_16 case_fold1_16_197[] = { { 0x00C5, 0x00E5 }, { 0x01C4, 0x01C6 }, { 0x04C1, 0x04C2 }, { 0x1FDA, 0x1F76 }, { 0xA762, 0xA763 }, { 0xFF3A, 0xFF5A } }; static const CaseFoldMapping1_16 case_fold1_16_198[] = { { 0x00C6, 0x00E6 }, { 0x01C7, 0x01C9 }, { 0x1ED8, 0x1ED9 }, { 0x1FD9, 0x1FD1 }, { 0xA660, 0xA661 }, { 0xFF39, 0xFF59 } }; static const CaseFoldMapping1_16 case_fold1_16_199[] = { { 0x00C7, 0x00E7 }, { 0x04C3, 0x04C4 }, { 0x1FD8, 0x1FD0 }, { 0x2CEB, 0x2CEC }, { 0xA760, 0xA761 }, { 0xFF38, 0xFF58 } }; static const CaseFoldMapping1_16 case_fold1_16_200[] = { { 0x00C8, 0x00E8 }, { 0x1ED6, 0x1ED7 }, { 0xFF37, 0xFF57 } }; static const CaseFoldMapping1_16 case_fold1_16_201[] = { { 0x00C9, 0x00E9 }, { 0x01C8, 0x01C9 }, { 0x04CD, 0x04CE }, { 0xA76E, 0xA76F }, { 0xFF36, 0xFF56 } }; static const CaseFoldMapping1_16 case_fold1_16_202[] = { { 0x00CA, 0x00EA }, { 0x01CB, 0x01CC }, { 0x1ED4, 0x1ED5 }, { 0xA66C, 0xA66D }, { 0xFF35, 0xFF55 } }; static const CaseFoldMapping1_16 case_fold1_16_203[] = { { 0x00CB, 0x00EB }, { 0x01CA, 0x01CC }, { 0xA76C, 0xA76D }, { 0xFF34, 0xFF54 } }; static const CaseFoldMapping1_16 case_fold1_16_204[] = { { 0x00CC, 0x00EC }, { 0x01CD, 0x01CE }, { 0x03CF, 0x03D7 }, { 0x1ED2, 0x1ED3 }, { 0x2CE0, 0x2CE1 }, { 0xA66A, 0xA66B }, { 0xFF33, 0xFF53 } }; static const CaseFoldMapping1_16 case_fold1_16_205[] = { { 0x00CD, 0x00ED }, { 0x04C9, 0x04CA }, { 0xA76A, 0xA76B }, { 0xFF32, 0xFF52 } }; static const CaseFoldMapping1_16 case_fold1_16_206[] = { { 0x00CE, 0x00EE }, { 0x01CF, 0x01D0 }, { 0x1ED0, 0x1ED1 }, { 0x2CE2, 0x2CE3 }, { 0xA668, 0xA669 }, { 0xFF31, 0xFF51 } }; static const CaseFoldMapping1_16 case_fold1_16_207[] = { { 0x00CF, 0x00EF }, { 0x04CB, 0x04CC }, { 0xA768, 0xA769 }, { 0xFF30, 0xFF50 } }; static const CaseFoldMapping1_16 case_fold1_16_208[] = { { 0x00D0, 0x00F0 }, { 0x01D1, 0x01D2 }, { 0x04D4, 0x04D5 }, { 0x10C0, 0x2D20 }, { 0x1ECE, 0x1ECF }, { 0xAB7B, 0x13AB }, { 0xFF2F, 0xFF4F } }; static const CaseFoldMapping1_16 case_fold1_16_209[] = { { 0x00D1, 0x00F1 }, { 0x10C1, 0x2D21 }, { 0xAB7A, 0x13AA }, { 0xFF2E, 0xFF4E } }; static const CaseFoldMapping1_16 case_fold1_16_210[] = { { 0x00D2, 0x00F2 }, { 0x01D3, 0x01D4 }, { 0x03D1, 0x03B8 }, { 0x04D6, 0x04D7 }, { 0x10C2, 0x2D22 }, { 0x1ECC, 0x1ECD }, { 0xAB79, 0x13A9 }, { 0xFF2D, 0xFF4D } }; static const CaseFoldMapping1_16 case_fold1_16_211[] = { { 0x00D3, 0x00F3 }, { 0x03D0, 0x03B2 }, { 0x10C3, 0x2D23 }, { 0xAB78, 0x13A8 }, { 0xFF2C, 0xFF4C } }; static const CaseFoldMapping1_16 case_fold1_16_212[] = { { 0x00D4, 0x00F4 }, { 0x01D5, 0x01D6 }, { 0x04D0, 0x04D1 }, { 0x10C4, 0x2D24 }, { 0x1ECA, 0x1ECB }, { 0x1FCB, 0x1F75 }, { 0xAB7F, 0x13AF }, { 0xFF2B, 0xFF4B } }; static const CaseFoldMapping1_16 case_fold1_16_213[] = { { 0x00D5, 0x00F5 }, { 0x03D6, 0x03C0 }, { 0x10C5, 0x2D25 }, { 0x1FCA, 0x1F74 }, { 0xAB7E, 0x13AE }, { 0xFF2A, 0xFF4A } }; static const CaseFoldMapping1_16 case_fold1_16_214[] = { { 0x00D6, 0x00F6 }, { 0x01D7, 0x01D8 }, { 0x03D5, 0x03C6 }, { 0x04D2, 0x04D3 }, { 0x1EC8, 0x1EC9 }, { 0x1FC9, 0x1F73 }, { 0xAB7D, 0x13AD }, { 0xFF29, 0xFF49 } }; static const CaseFoldMapping1_16 case_fold1_16_215[] = { { 0x10C7, 0x2D27 }, { 0x1FC8, 0x1F72 }, { 0xAB7C, 0x13AC }, { 0xFF28, 0xFF48 } }; static const CaseFoldMapping1_16 case_fold1_16_216[] = { { 0x00D8, 0x00F8 }, { 0x01D9, 0x01DA }, { 0x04DC, 0x04DD }, { 0x1EC6, 0x1EC7 }, { 0xAB73, 0x13A3 }, { 0xFF27, 0xFF47 } }; static const CaseFoldMapping1_16 case_fold1_16_217[] = { { 0x00D9, 0x00F9 }, { 0x03DA, 0x03DB }, { 0xA77E, 0xA77F }, { 0xAB72, 0x13A2 }, { 0xFF26, 0xFF46 } }; static const CaseFoldMapping1_16 case_fold1_16_218[] = { { 0x00DA, 0x00FA }, { 0x01DB, 0x01DC }, { 0x04DE, 0x04DF }, { 0x1EC4, 0x1EC5 }, { 0xA77D, 0x1D79 }, { 0xAB71, 0x13A1 }, { 0xFF25, 0xFF45 } }; static const CaseFoldMapping1_16 case_fold1_16_219[] = { { 0x00DB, 0x00FB }, { 0x03D8, 0x03D9 }, { 0xAB70, 0x13A0 }, { 0xFF24, 0xFF44 } }; static const CaseFoldMapping1_16 case_fold1_16_220[] = { { 0x00DC, 0x00FC }, { 0x04D8, 0x04D9 }, { 0x1EC2, 0x1EC3 }, { 0xA77B, 0xA77C }, { 0xAB77, 0x13A7 }, { 0xFF23, 0xFF43 } }; static const CaseFoldMapping1_16 case_fold1_16_221[] = { { 0x00DD, 0x00FD }, { 0x03DE, 0x03DF }, { 0x10CD, 0x2D2D }, { 0xAB76, 0x13A6 }, { 0xFF22, 0xFF42 } }; static const CaseFoldMapping1_16 case_fold1_16_222[] = { { 0x00DE, 0x00FE }, { 0x04DA, 0x04DB }, { 0x1EC0, 0x1EC1 }, { 0x2CF2, 0x2CF3 }, { 0xA779, 0xA77A }, { 0xAB75, 0x13A5 }, { 0xFF21, 0xFF41 } }; static const CaseFoldMapping1_16 case_fold1_16_223[] = { { 0x01DE, 0x01DF }, { 0x03DC, 0x03DD }, { 0xAB74, 0x13A4 } }; static const CaseFoldMapping1_16 case_fold1_16_224[] = { { 0x04E4, 0x04E5 }, { 0x1EFE, 0x1EFF }, { 0x24C4, 0x24DE }, { 0x2CCC, 0x2CCD }, { 0xA646, 0xA647 } }; static const CaseFoldMapping1_16 case_fold1_16_225[] = { { 0x01E0, 0x01E1 }, { 0x03E2, 0x03E3 }, { 0x24C5, 0x24DF }, { 0xA746, 0xA747 } }; static const CaseFoldMapping1_16 case_fold1_16_226[] = { { 0x04E6, 0x04E7 }, { 0x1EFC, 0x1EFD }, { 0x24C6, 0x24E0 }, { 0x2CCE, 0x2CCF }, { 0xA644, 0xA645 } }; static const CaseFoldMapping1_16 case_fold1_16_227[] = { { 0x01E2, 0x01E3 }, { 0x03E0, 0x03E1 }, { 0x24C7, 0x24E1 }, { 0xA744, 0xA745 } }; static const CaseFoldMapping1_16 case_fold1_16_228[] = { { 0x04E0, 0x04E1 }, { 0x1EFA, 0x1EFB }, { 0x1FFB, 0x1F7D }, { 0x24C0, 0x24DA }, { 0x2CC8, 0x2CC9 }, { 0xA642, 0xA643 } }; static const CaseFoldMapping1_16 case_fold1_16_229[] = { { 0x01E4, 0x01E5 }, { 0x03E6, 0x03E7 }, { 0x1FFA, 0x1F7C }, { 0x24C1, 0x24DB }, { 0xA742, 0xA743 } }; static const CaseFoldMapping1_16 case_fold1_16_230[] = { { 0x04E2, 0x04E3 }, { 0x1EF8, 0x1EF9 }, { 0x1FF9, 0x1F79 }, { 0x24C2, 0x24DC }, { 0x2CCA, 0x2CCB }, { 0xA640, 0xA641 } }; static const CaseFoldMapping1_16 case_fold1_16_231[] = { { 0x01E6, 0x01E7 }, { 0x03E4, 0x03E5 }, { 0x1FF8, 0x1F78 }, { 0x24C3, 0x24DD }, { 0xA740, 0xA741 } }; static const CaseFoldMapping1_16 case_fold1_16_232[] = { { 0x04EC, 0x04ED }, { 0x13FB, 0x13F3 }, { 0x1EF6, 0x1EF7 }, { 0x24CC, 0x24E6 }, { 0x2CC4, 0x2CC5 }, { 0xA64E, 0xA64F } }; static const CaseFoldMapping1_16 case_fold1_16_233[] = { { 0x01E8, 0x01E9 }, { 0x03EA, 0x03EB }, { 0x13FA, 0x13F2 }, { 0x24CD, 0x24E7 }, { 0xA74E, 0xA74F } }; static const CaseFoldMapping1_16 case_fold1_16_234[] = { { 0x04EE, 0x04EF }, { 0x13F9, 0x13F1 }, { 0x1EF4, 0x1EF5 }, { 0x24CE, 0x24E8 }, { 0x2CC6, 0x2CC7 }, { 0xA64C, 0xA64D } }; static const CaseFoldMapping1_16 case_fold1_16_235[] = { { 0x01EA, 0x01EB }, { 0x03E8, 0x03E9 }, { 0x13F8, 0x13F0 }, { 0x24CF, 0x24E9 }, { 0xA74C, 0xA74D } }; static const CaseFoldMapping1_16 case_fold1_16_236[] = { { 0x04E8, 0x04E9 }, { 0x1EF2, 0x1EF3 }, { 0x24C8, 0x24E2 }, { 0x2CC0, 0x2CC1 }, { 0xA64A, 0xA64B } }; static const CaseFoldMapping1_16 case_fold1_16_237[] = { { 0x01EC, 0x01ED }, { 0x03EE, 0x03EF }, { 0x24C9, 0x24E3 }, { 0xA74A, 0xA74B } }; static const CaseFoldMapping1_16 case_fold1_16_238[] = { { 0x04EA, 0x04EB }, { 0x13FD, 0x13F5 }, { 0x1EF0, 0x1EF1 }, { 0x24CA, 0x24E4 }, { 0x2CC2, 0x2CC3 }, { 0xA648, 0xA649 } }; static const CaseFoldMapping1_16 case_fold1_16_239[] = { { 0x01EE, 0x01EF }, { 0x03EC, 0x03ED }, { 0x13FC, 0x13F4 }, { 0x24CB, 0x24E5 }, { 0xA748, 0xA749 } }; static const CaseFoldMapping1_16 case_fold1_16_240[] = { { 0x01F1, 0x01F3 }, { 0x04F4, 0x04F5 }, { 0x1EEE, 0x1EEF }, { 0x2CDC, 0x2CDD }, { 0xA656, 0xA657 } }; static const CaseFoldMapping1_16 case_fold1_16_241[] = { { 0xA756, 0xA757 } }; static const CaseFoldMapping1_16 case_fold1_16_242[] = { { 0x03F1, 0x03C1 }, { 0x04F6, 0x04F7 }, { 0x1EEC, 0x1EED }, { 0x2CDE, 0x2CDF }, { 0xA654, 0xA655 } }; static const CaseFoldMapping1_16 case_fold1_16_243[] = { { 0x01F2, 0x01F3 }, { 0x03F0, 0x03BA }, { 0x1FEC, 0x1FE5 }, { 0xA754, 0xA755 } }; static const CaseFoldMapping1_16 case_fold1_16_244[] = { { 0x03F7, 0x03F8 }, { 0x04F0, 0x04F1 }, { 0x1EEA, 0x1EEB }, { 0x1FEB, 0x1F7B }, { 0x2CD8, 0x2CD9 }, { 0xA652, 0xA653 } }; static const CaseFoldMapping1_16 case_fold1_16_245[] = { { 0x01F4, 0x01F5 }, { 0x1FEA, 0x1F7A }, { 0xA752, 0xA753 } }; static const CaseFoldMapping1_16 case_fold1_16_246[] = { { 0x01F7, 0x01BF }, { 0x03F5, 0x03B5 }, { 0x04F2, 0x04F3 }, { 0x1EE8, 0x1EE9 }, { 0x1FE9, 0x1FE1 }, { 0x2CDA, 0x2CDB }, { 0xA650, 0xA651 } }; static const CaseFoldMapping1_16 case_fold1_16_247[] = { { 0x01F6, 0x0195 }, { 0x03F4, 0x03B8 }, { 0x1FE8, 0x1FE0 }, { 0xA750, 0xA751 } }; static const CaseFoldMapping1_16 case_fold1_16_248[] = { { 0x04FC, 0x04FD }, { 0x1EE6, 0x1EE7 }, { 0x2CD4, 0x2CD5 }, { 0xA65E, 0xA65F } }; static const CaseFoldMapping1_16 case_fold1_16_249[] = { { 0x01F8, 0x01F9 }, { 0x03FA, 0x03FB }, { 0xA75E, 0xA75F } }; static const CaseFoldMapping1_16 case_fold1_16_250[] = { { 0x03F9, 0x03F2 }, { 0x04FE, 0x04FF }, { 0x1EE4, 0x1EE5 }, { 0x2CD6, 0x2CD7 }, { 0xA65C, 0xA65D } }; static const CaseFoldMapping1_16 case_fold1_16_251[] = { { 0x01FA, 0x01FB }, { 0xA75C, 0xA75D } }; static const CaseFoldMapping1_16 case_fold1_16_252[] = { { 0x03FF, 0x037D }, { 0x04F8, 0x04F9 }, { 0x1EE2, 0x1EE3 }, { 0x2CD0, 0x2CD1 }, { 0xA65A, 0xA65B } }; static const CaseFoldMapping1_16 case_fold1_16_253[] = { { 0x01FC, 0x01FD }, { 0x03FE, 0x037C }, { 0xA75A, 0xA75B } }; static const CaseFoldMapping1_16 case_fold1_16_254[] = { { 0x03FD, 0x037B }, { 0x04FA, 0x04FB }, { 0x1EE0, 0x1EE1 }, { 0x2CD2, 0x2CD3 }, { 0xA658, 0xA659 } }; static const CaseFoldMapping1_16 case_fold1_16_255[] = { { 0x01FE, 0x01FF }, { 0xA758, 0xA759 } }; static const CaseFoldMapping1_32 case_fold1_32_000[] = { { 0x10404, 0x1042C }, { 0x10414, 0x1043C }, { 0x10424, 0x1044C }, { 0x10C8C, 0x10CCC }, { 0x10C9C, 0x10CDC }, { 0x10CAC, 0x10CEC }, { 0x118A8, 0x118C8 }, { 0x118B8, 0x118D8 } }; static const CaseFoldMapping1_32 case_fold1_32_001[] = { { 0x10405, 0x1042D }, { 0x10415, 0x1043D }, { 0x10425, 0x1044D }, { 0x10C8D, 0x10CCD }, { 0x10C9D, 0x10CDD }, { 0x10CAD, 0x10CED }, { 0x118A9, 0x118C9 }, { 0x118B9, 0x118D9 } }; static const CaseFoldMapping1_32 case_fold1_32_002[] = { { 0x10406, 0x1042E }, { 0x10416, 0x1043E }, { 0x10426, 0x1044E }, { 0x10C8E, 0x10CCE }, { 0x10C9E, 0x10CDE }, { 0x10CAE, 0x10CEE }, { 0x118AA, 0x118CA }, { 0x118BA, 0x118DA } }; static const CaseFoldMapping1_32 case_fold1_32_003[] = { { 0x10407, 0x1042F }, { 0x10417, 0x1043F }, { 0x10427, 0x1044F }, { 0x10C8F, 0x10CCF }, { 0x10C9F, 0x10CDF }, { 0x10CAF, 0x10CEF }, { 0x118AB, 0x118CB }, { 0x118BB, 0x118DB } }; static const CaseFoldMapping1_32 case_fold1_32_004[] = { { 0x10400, 0x10428 }, { 0x10410, 0x10438 }, { 0x10420, 0x10448 }, { 0x10C88, 0x10CC8 }, { 0x10C98, 0x10CD8 }, { 0x10CA8, 0x10CE8 }, { 0x118AC, 0x118CC }, { 0x118BC, 0x118DC } }; static const CaseFoldMapping1_32 case_fold1_32_005[] = { { 0x10401, 0x10429 }, { 0x10411, 0x10439 }, { 0x10421, 0x10449 }, { 0x10C89, 0x10CC9 }, { 0x10C99, 0x10CD9 }, { 0x10CA9, 0x10CE9 }, { 0x118AD, 0x118CD }, { 0x118BD, 0x118DD } }; static const CaseFoldMapping1_32 case_fold1_32_006[] = { { 0x10402, 0x1042A }, { 0x10412, 0x1043A }, { 0x10422, 0x1044A }, { 0x10C8A, 0x10CCA }, { 0x10C9A, 0x10CDA }, { 0x10CAA, 0x10CEA }, { 0x118AE, 0x118CE }, { 0x118BE, 0x118DE } }; static const CaseFoldMapping1_32 case_fold1_32_007[] = { { 0x10403, 0x1042B }, { 0x10413, 0x1043B }, { 0x10423, 0x1044B }, { 0x10C8B, 0x10CCB }, { 0x10C9B, 0x10CDB }, { 0x10CAB, 0x10CEB }, { 0x118AF, 0x118CF }, { 0x118BF, 0x118DF } }; static const CaseFoldMapping1_32 case_fold1_32_008[] = { { 0x1040C, 0x10434 }, { 0x1041C, 0x10444 }, { 0x10C84, 0x10CC4 }, { 0x10C94, 0x10CD4 }, { 0x10CA4, 0x10CE4 }, { 0x118A0, 0x118C0 }, { 0x118B0, 0x118D0 } }; static const CaseFoldMapping1_32 case_fold1_32_009[] = { { 0x1040D, 0x10435 }, { 0x1041D, 0x10445 }, { 0x10C85, 0x10CC5 }, { 0x10C95, 0x10CD5 }, { 0x10CA5, 0x10CE5 }, { 0x118A1, 0x118C1 }, { 0x118B1, 0x118D1 } }; static const CaseFoldMapping1_32 case_fold1_32_010[] = { { 0x1040E, 0x10436 }, { 0x1041E, 0x10446 }, { 0x10C86, 0x10CC6 }, { 0x10C96, 0x10CD6 }, { 0x10CA6, 0x10CE6 }, { 0x118A2, 0x118C2 }, { 0x118B2, 0x118D2 } }; static const CaseFoldMapping1_32 case_fold1_32_011[] = { { 0x1040F, 0x10437 }, { 0x1041F, 0x10447 }, { 0x10C87, 0x10CC7 }, { 0x10C97, 0x10CD7 }, { 0x10CA7, 0x10CE7 }, { 0x118A3, 0x118C3 }, { 0x118B3, 0x118D3 } }; static const CaseFoldMapping1_32 case_fold1_32_012[] = { { 0x10408, 0x10430 }, { 0x10418, 0x10440 }, { 0x10C80, 0x10CC0 }, { 0x10C90, 0x10CD0 }, { 0x10CA0, 0x10CE0 }, { 0x10CB0, 0x10CF0 }, { 0x118A4, 0x118C4 }, { 0x118B4, 0x118D4 } }; static const CaseFoldMapping1_32 case_fold1_32_013[] = { { 0x10409, 0x10431 }, { 0x10419, 0x10441 }, { 0x10C81, 0x10CC1 }, { 0x10C91, 0x10CD1 }, { 0x10CA1, 0x10CE1 }, { 0x10CB1, 0x10CF1 }, { 0x118A5, 0x118C5 }, { 0x118B5, 0x118D5 } }; static const CaseFoldMapping1_32 case_fold1_32_014[] = { { 0x1040A, 0x10432 }, { 0x1041A, 0x10442 }, { 0x10C82, 0x10CC2 }, { 0x10C92, 0x10CD2 }, { 0x10CA2, 0x10CE2 }, { 0x10CB2, 0x10CF2 }, { 0x118A6, 0x118C6 }, { 0x118B6, 0x118D6 } }; static const CaseFoldMapping1_32 case_fold1_32_015[] = { { 0x1040B, 0x10433 }, { 0x1041B, 0x10443 }, { 0x10C83, 0x10CC3 }, { 0x10C93, 0x10CD3 }, { 0x10CA3, 0x10CE3 }, { 0x118A7, 0x118C7 }, { 0x118B7, 0x118D7 } }; static const CaseFoldMapping2_16 case_fold2_16_000[] = { { 0x1E9E, 0x0073, 0x0073 }, { 0x1F8F, 0x1F07, 0x03B9 }, { 0x1F9F, 0x1F27, 0x03B9 }, { 0x1FAF, 0x1F67, 0x03B9 } }; static const CaseFoldMapping2_16 case_fold2_16_001[] = { { 0x0130, 0x0069, 0x0307 }, { 0x01F0, 0x006A, 0x030C }, { 0x1F8E, 0x1F06, 0x03B9 }, { 0x1F9E, 0x1F26, 0x03B9 }, { 0x1FAE, 0x1F66, 0x03B9 } }; static const CaseFoldMapping2_16 case_fold2_16_002[] = { { 0x0587, 0x0565, 0x0582 }, { 0x1F8D, 0x1F05, 0x03B9 }, { 0x1F9D, 0x1F25, 0x03B9 }, { 0x1FAD, 0x1F65, 0x03B9 } }; static const CaseFoldMapping2_16 case_fold2_16_003[] = { { 0x1F8C, 0x1F04, 0x03B9 }, { 0x1F9C, 0x1F24, 0x03B9 }, { 0x1FAC, 0x1F64, 0x03B9 }, { 0x1FBC, 0x03B1, 0x03B9 }, { 0x1FCC, 0x03B7, 0x03B9 }, { 0x1FFC, 0x03C9, 0x03B9 } }; static const CaseFoldMapping2_16 case_fold2_16_004[] = { { 0x1E9A, 0x0061, 0x02BE }, { 0x1F8B, 0x1F03, 0x03B9 }, { 0x1F9B, 0x1F23, 0x03B9 }, { 0x1FAB, 0x1F63, 0x03B9 } }; static const CaseFoldMapping2_16 case_fold2_16_005[] = { { 0x1F8A, 0x1F02, 0x03B9 }, { 0x1F9A, 0x1F22, 0x03B9 }, { 0x1FAA, 0x1F62, 0x03B9 } }; static const CaseFoldMapping2_16 case_fold2_16_006[] = { { 0x1E98, 0x0077, 0x030A }, { 0x1F89, 0x1F01, 0x03B9 }, { 0x1F99, 0x1F21, 0x03B9 }, { 0x1FA9, 0x1F61, 0x03B9 } }; static const CaseFoldMapping2_16 case_fold2_16_007[] = { { 0x1E99, 0x0079, 0x030A }, { 0x1F88, 0x1F00, 0x03B9 }, { 0x1F98, 0x1F20, 0x03B9 }, { 0x1FA8, 0x1F60, 0x03B9 } }; static const CaseFoldMapping2_16 case_fold2_16_008[] = { { 0x0149, 0x02BC, 0x006E }, { 0x1E96, 0x0068, 0x0331 }, { 0x1F87, 0x1F07, 0x03B9 }, { 0x1F97, 0x1F27, 0x03B9 }, { 0x1FA7, 0x1F67, 0x03B9 }, { 0xFB13, 0x0574, 0x0576 } }; static const CaseFoldMapping2_16 case_fold2_16_009[] = { { 0x1E97, 0x0074, 0x0308 }, { 0x1F86, 0x1F06, 0x03B9 }, { 0x1F96, 0x1F26, 0x03B9 }, { 0x1FA6, 0x1F66, 0x03B9 }, { 0x1FB6, 0x03B1, 0x0342 }, { 0x1FC6, 0x03B7, 0x0342 }, { 0x1FD6, 0x03B9, 0x0342 }, { 0x1FE6, 0x03C5, 0x0342 }, { 0x1FF6, 0x03C9, 0x0342 }, { 0xFB02, 0x0066, 0x006C } }; static const CaseFoldMapping2_16 case_fold2_16_010[] = { { 0x1F85, 0x1F05, 0x03B9 }, { 0x1F95, 0x1F25, 0x03B9 }, { 0x1FA5, 0x1F65, 0x03B9 }, { 0xFB01, 0x0066, 0x0069 } }; static const CaseFoldMapping2_16 case_fold2_16_011[] = { { 0x1F84, 0x1F04, 0x03B9 }, { 0x1F94, 0x1F24, 0x03B9 }, { 0x1FA4, 0x1F64, 0x03B9 }, { 0x1FB4, 0x03AC, 0x03B9 }, { 0x1FC4, 0x03AE, 0x03B9 }, { 0x1FE4, 0x03C1, 0x0313 }, { 0x1FF4, 0x03CE, 0x03B9 }, { 0xFB00, 0x0066, 0x0066 } }; static const CaseFoldMapping2_16 case_fold2_16_012[] = { { 0x1F83, 0x1F03, 0x03B9 }, { 0x1F93, 0x1F23, 0x03B9 }, { 0x1FA3, 0x1F63, 0x03B9 }, { 0x1FB3, 0x03B1, 0x03B9 }, { 0x1FC3, 0x03B7, 0x03B9 }, { 0x1FF3, 0x03C9, 0x03B9 }, { 0xFB17, 0x0574, 0x056D } }; static const CaseFoldMapping2_16 case_fold2_16_013[] = { { 0x1F82, 0x1F02, 0x03B9 }, { 0x1F92, 0x1F22, 0x03B9 }, { 0x1FA2, 0x1F62, 0x03B9 }, { 0x1FB2, 0x1F70, 0x03B9 }, { 0x1FC2, 0x1F74, 0x03B9 }, { 0x1FF2, 0x1F7C, 0x03B9 }, { 0xFB06, 0x0073, 0x0074 }, { 0xFB16, 0x057E, 0x0576 } }; static const CaseFoldMapping2_16 case_fold2_16_014[] = { { 0x1F81, 0x1F01, 0x03B9 }, { 0x1F91, 0x1F21, 0x03B9 }, { 0x1FA1, 0x1F61, 0x03B9 }, { 0xFB05, 0x0073, 0x0074 }, { 0xFB15, 0x0574, 0x056B } }; static const CaseFoldMapping2_16 case_fold2_16_015[] = { { 0x00DF, 0x0073, 0x0073 }, { 0x1F50, 0x03C5, 0x0313 }, { 0x1F80, 0x1F00, 0x03B9 }, { 0x1F90, 0x1F20, 0x03B9 }, { 0x1FA0, 0x1F60, 0x03B9 }, { 0xFB14, 0x0574, 0x0565 } }; static const CaseFoldMapping3_16 case_fold3_16_000[] = { { 0x1FB7, 0x03B1, 0x0342, 0x03B9 }, { 0x1FC7, 0x03B7, 0x0342, 0x03B9 }, { 0x1FD3, 0x03B9, 0x0308, 0x0301 }, { 0x1FD7, 0x03B9, 0x0308, 0x0342 }, { 0x1FE3, 0x03C5, 0x0308, 0x0301 }, { 0x1FE7, 0x03C5, 0x0308, 0x0342 }, { 0x1FF7, 0x03C9, 0x0342, 0x03B9 }, { 0xFB03, 0x0066, 0x0066, 0x0069 } }; static const CaseFoldMapping3_16 case_fold3_16_001[] = { { 0x1F52, 0x03C5, 0x0313, 0x0300 }, { 0x1F56, 0x03C5, 0x0313, 0x0342 }, { 0x1FD2, 0x03B9, 0x0308, 0x0300 }, { 0x1FE2, 0x03C5, 0x0308, 0x0300 } }; static const CaseFoldMapping3_16 case_fold3_16_003[] = { { 0x0390, 0x03B9, 0x0308, 0x0301 }, { 0x03B0, 0x03C5, 0x0308, 0x0301 }, { 0x1F54, 0x03C5, 0x0313, 0x0301 }, { 0xFB04, 0x0066, 0x0066, 0x006C } }; static const CaseFoldHashBucket1_16 case_fold_hash1_16[] = { { case_fold1_16_000, __PHYSFS_ARRAYLEN(case_fold1_16_000) }, { case_fold1_16_001, __PHYSFS_ARRAYLEN(case_fold1_16_001) }, { case_fold1_16_002, __PHYSFS_ARRAYLEN(case_fold1_16_002) }, { case_fold1_16_003, __PHYSFS_ARRAYLEN(case_fold1_16_003) }, { case_fold1_16_004, __PHYSFS_ARRAYLEN(case_fold1_16_004) }, { case_fold1_16_005, __PHYSFS_ARRAYLEN(case_fold1_16_005) }, { case_fold1_16_006, __PHYSFS_ARRAYLEN(case_fold1_16_006) }, { case_fold1_16_007, __PHYSFS_ARRAYLEN(case_fold1_16_007) }, { case_fold1_16_008, __PHYSFS_ARRAYLEN(case_fold1_16_008) }, { case_fold1_16_009, __PHYSFS_ARRAYLEN(case_fold1_16_009) }, { case_fold1_16_010, __PHYSFS_ARRAYLEN(case_fold1_16_010) }, { case_fold1_16_011, __PHYSFS_ARRAYLEN(case_fold1_16_011) }, { case_fold1_16_012, __PHYSFS_ARRAYLEN(case_fold1_16_012) }, { case_fold1_16_013, __PHYSFS_ARRAYLEN(case_fold1_16_013) }, { case_fold1_16_014, __PHYSFS_ARRAYLEN(case_fold1_16_014) }, { case_fold1_16_015, __PHYSFS_ARRAYLEN(case_fold1_16_015) }, { case_fold1_16_016, __PHYSFS_ARRAYLEN(case_fold1_16_016) }, { case_fold1_16_017, __PHYSFS_ARRAYLEN(case_fold1_16_017) }, { case_fold1_16_018, __PHYSFS_ARRAYLEN(case_fold1_16_018) }, { case_fold1_16_019, __PHYSFS_ARRAYLEN(case_fold1_16_019) }, { case_fold1_16_020, __PHYSFS_ARRAYLEN(case_fold1_16_020) }, { case_fold1_16_021, __PHYSFS_ARRAYLEN(case_fold1_16_021) }, { case_fold1_16_022, __PHYSFS_ARRAYLEN(case_fold1_16_022) }, { case_fold1_16_023, __PHYSFS_ARRAYLEN(case_fold1_16_023) }, { case_fold1_16_024, __PHYSFS_ARRAYLEN(case_fold1_16_024) }, { case_fold1_16_025, __PHYSFS_ARRAYLEN(case_fold1_16_025) }, { case_fold1_16_026, __PHYSFS_ARRAYLEN(case_fold1_16_026) }, { case_fold1_16_027, __PHYSFS_ARRAYLEN(case_fold1_16_027) }, { case_fold1_16_028, __PHYSFS_ARRAYLEN(case_fold1_16_028) }, { case_fold1_16_029, __PHYSFS_ARRAYLEN(case_fold1_16_029) }, { case_fold1_16_030, __PHYSFS_ARRAYLEN(case_fold1_16_030) }, { case_fold1_16_031, __PHYSFS_ARRAYLEN(case_fold1_16_031) }, { case_fold1_16_032, __PHYSFS_ARRAYLEN(case_fold1_16_032) }, { case_fold1_16_033, __PHYSFS_ARRAYLEN(case_fold1_16_033) }, { case_fold1_16_034, __PHYSFS_ARRAYLEN(case_fold1_16_034) }, { case_fold1_16_035, __PHYSFS_ARRAYLEN(case_fold1_16_035) }, { case_fold1_16_036, __PHYSFS_ARRAYLEN(case_fold1_16_036) }, { case_fold1_16_037, __PHYSFS_ARRAYLEN(case_fold1_16_037) }, { case_fold1_16_038, __PHYSFS_ARRAYLEN(case_fold1_16_038) }, { case_fold1_16_039, __PHYSFS_ARRAYLEN(case_fold1_16_039) }, { case_fold1_16_040, __PHYSFS_ARRAYLEN(case_fold1_16_040) }, { case_fold1_16_041, __PHYSFS_ARRAYLEN(case_fold1_16_041) }, { case_fold1_16_042, __PHYSFS_ARRAYLEN(case_fold1_16_042) }, { case_fold1_16_043, __PHYSFS_ARRAYLEN(case_fold1_16_043) }, { case_fold1_16_044, __PHYSFS_ARRAYLEN(case_fold1_16_044) }, { case_fold1_16_045, __PHYSFS_ARRAYLEN(case_fold1_16_045) }, { case_fold1_16_046, __PHYSFS_ARRAYLEN(case_fold1_16_046) }, { case_fold1_16_047, __PHYSFS_ARRAYLEN(case_fold1_16_047) }, { case_fold1_16_048, __PHYSFS_ARRAYLEN(case_fold1_16_048) }, { case_fold1_16_049, __PHYSFS_ARRAYLEN(case_fold1_16_049) }, { case_fold1_16_050, __PHYSFS_ARRAYLEN(case_fold1_16_050) }, { case_fold1_16_051, __PHYSFS_ARRAYLEN(case_fold1_16_051) }, { case_fold1_16_052, __PHYSFS_ARRAYLEN(case_fold1_16_052) }, { case_fold1_16_053, __PHYSFS_ARRAYLEN(case_fold1_16_053) }, { case_fold1_16_054, __PHYSFS_ARRAYLEN(case_fold1_16_054) }, { case_fold1_16_055, __PHYSFS_ARRAYLEN(case_fold1_16_055) }, { case_fold1_16_056, __PHYSFS_ARRAYLEN(case_fold1_16_056) }, { case_fold1_16_057, __PHYSFS_ARRAYLEN(case_fold1_16_057) }, { case_fold1_16_058, __PHYSFS_ARRAYLEN(case_fold1_16_058) }, { case_fold1_16_059, __PHYSFS_ARRAYLEN(case_fold1_16_059) }, { case_fold1_16_060, __PHYSFS_ARRAYLEN(case_fold1_16_060) }, { case_fold1_16_061, __PHYSFS_ARRAYLEN(case_fold1_16_061) }, { case_fold1_16_062, __PHYSFS_ARRAYLEN(case_fold1_16_062) }, { case_fold1_16_063, __PHYSFS_ARRAYLEN(case_fold1_16_063) }, { case_fold1_16_064, __PHYSFS_ARRAYLEN(case_fold1_16_064) }, { case_fold1_16_065, __PHYSFS_ARRAYLEN(case_fold1_16_065) }, { case_fold1_16_066, __PHYSFS_ARRAYLEN(case_fold1_16_066) }, { case_fold1_16_067, __PHYSFS_ARRAYLEN(case_fold1_16_067) }, { case_fold1_16_068, __PHYSFS_ARRAYLEN(case_fold1_16_068) }, { case_fold1_16_069, __PHYSFS_ARRAYLEN(case_fold1_16_069) }, { case_fold1_16_070, __PHYSFS_ARRAYLEN(case_fold1_16_070) }, { case_fold1_16_071, __PHYSFS_ARRAYLEN(case_fold1_16_071) }, { case_fold1_16_072, __PHYSFS_ARRAYLEN(case_fold1_16_072) }, { case_fold1_16_073, __PHYSFS_ARRAYLEN(case_fold1_16_073) }, { case_fold1_16_074, __PHYSFS_ARRAYLEN(case_fold1_16_074) }, { case_fold1_16_075, __PHYSFS_ARRAYLEN(case_fold1_16_075) }, { case_fold1_16_076, __PHYSFS_ARRAYLEN(case_fold1_16_076) }, { case_fold1_16_077, __PHYSFS_ARRAYLEN(case_fold1_16_077) }, { case_fold1_16_078, __PHYSFS_ARRAYLEN(case_fold1_16_078) }, { case_fold1_16_079, __PHYSFS_ARRAYLEN(case_fold1_16_079) }, { case_fold1_16_080, __PHYSFS_ARRAYLEN(case_fold1_16_080) }, { case_fold1_16_081, __PHYSFS_ARRAYLEN(case_fold1_16_081) }, { case_fold1_16_082, __PHYSFS_ARRAYLEN(case_fold1_16_082) }, { case_fold1_16_083, __PHYSFS_ARRAYLEN(case_fold1_16_083) }, { case_fold1_16_084, __PHYSFS_ARRAYLEN(case_fold1_16_084) }, { case_fold1_16_085, __PHYSFS_ARRAYLEN(case_fold1_16_085) }, { case_fold1_16_086, __PHYSFS_ARRAYLEN(case_fold1_16_086) }, { case_fold1_16_087, __PHYSFS_ARRAYLEN(case_fold1_16_087) }, { case_fold1_16_088, __PHYSFS_ARRAYLEN(case_fold1_16_088) }, { case_fold1_16_089, __PHYSFS_ARRAYLEN(case_fold1_16_089) }, { case_fold1_16_090, __PHYSFS_ARRAYLEN(case_fold1_16_090) }, { case_fold1_16_091, __PHYSFS_ARRAYLEN(case_fold1_16_091) }, { case_fold1_16_092, __PHYSFS_ARRAYLEN(case_fold1_16_092) }, { case_fold1_16_093, __PHYSFS_ARRAYLEN(case_fold1_16_093) }, { case_fold1_16_094, __PHYSFS_ARRAYLEN(case_fold1_16_094) }, { case_fold1_16_095, __PHYSFS_ARRAYLEN(case_fold1_16_095) }, { case_fold1_16_096, __PHYSFS_ARRAYLEN(case_fold1_16_096) }, { case_fold1_16_097, __PHYSFS_ARRAYLEN(case_fold1_16_097) }, { case_fold1_16_098, __PHYSFS_ARRAYLEN(case_fold1_16_098) }, { case_fold1_16_099, __PHYSFS_ARRAYLEN(case_fold1_16_099) }, { case_fold1_16_100, __PHYSFS_ARRAYLEN(case_fold1_16_100) }, { case_fold1_16_101, __PHYSFS_ARRAYLEN(case_fold1_16_101) }, { case_fold1_16_102, __PHYSFS_ARRAYLEN(case_fold1_16_102) }, { case_fold1_16_103, __PHYSFS_ARRAYLEN(case_fold1_16_103) }, { case_fold1_16_104, __PHYSFS_ARRAYLEN(case_fold1_16_104) }, { case_fold1_16_105, __PHYSFS_ARRAYLEN(case_fold1_16_105) }, { case_fold1_16_106, __PHYSFS_ARRAYLEN(case_fold1_16_106) }, { case_fold1_16_107, __PHYSFS_ARRAYLEN(case_fold1_16_107) }, { case_fold1_16_108, __PHYSFS_ARRAYLEN(case_fold1_16_108) }, { case_fold1_16_109, __PHYSFS_ARRAYLEN(case_fold1_16_109) }, { case_fold1_16_110, __PHYSFS_ARRAYLEN(case_fold1_16_110) }, { case_fold1_16_111, __PHYSFS_ARRAYLEN(case_fold1_16_111) }, { case_fold1_16_112, __PHYSFS_ARRAYLEN(case_fold1_16_112) }, { case_fold1_16_113, __PHYSFS_ARRAYLEN(case_fold1_16_113) }, { case_fold1_16_114, __PHYSFS_ARRAYLEN(case_fold1_16_114) }, { case_fold1_16_115, __PHYSFS_ARRAYLEN(case_fold1_16_115) }, { case_fold1_16_116, __PHYSFS_ARRAYLEN(case_fold1_16_116) }, { case_fold1_16_117, __PHYSFS_ARRAYLEN(case_fold1_16_117) }, { case_fold1_16_118, __PHYSFS_ARRAYLEN(case_fold1_16_118) }, { case_fold1_16_119, __PHYSFS_ARRAYLEN(case_fold1_16_119) }, { case_fold1_16_120, __PHYSFS_ARRAYLEN(case_fold1_16_120) }, { case_fold1_16_121, __PHYSFS_ARRAYLEN(case_fold1_16_121) }, { case_fold1_16_122, __PHYSFS_ARRAYLEN(case_fold1_16_122) }, { NULL, 0 }, { case_fold1_16_124, __PHYSFS_ARRAYLEN(case_fold1_16_124) }, { NULL, 0 }, { case_fold1_16_126, __PHYSFS_ARRAYLEN(case_fold1_16_126) }, { NULL, 0 }, { case_fold1_16_128, __PHYSFS_ARRAYLEN(case_fold1_16_128) }, { case_fold1_16_129, __PHYSFS_ARRAYLEN(case_fold1_16_129) }, { case_fold1_16_130, __PHYSFS_ARRAYLEN(case_fold1_16_130) }, { case_fold1_16_131, __PHYSFS_ARRAYLEN(case_fold1_16_131) }, { case_fold1_16_132, __PHYSFS_ARRAYLEN(case_fold1_16_132) }, { case_fold1_16_133, __PHYSFS_ARRAYLEN(case_fold1_16_133) }, { case_fold1_16_134, __PHYSFS_ARRAYLEN(case_fold1_16_134) }, { case_fold1_16_135, __PHYSFS_ARRAYLEN(case_fold1_16_135) }, { case_fold1_16_136, __PHYSFS_ARRAYLEN(case_fold1_16_136) }, { case_fold1_16_137, __PHYSFS_ARRAYLEN(case_fold1_16_137) }, { case_fold1_16_138, __PHYSFS_ARRAYLEN(case_fold1_16_138) }, { case_fold1_16_139, __PHYSFS_ARRAYLEN(case_fold1_16_139) }, { case_fold1_16_140, __PHYSFS_ARRAYLEN(case_fold1_16_140) }, { case_fold1_16_141, __PHYSFS_ARRAYLEN(case_fold1_16_141) }, { case_fold1_16_142, __PHYSFS_ARRAYLEN(case_fold1_16_142) }, { case_fold1_16_143, __PHYSFS_ARRAYLEN(case_fold1_16_143) }, { case_fold1_16_144, __PHYSFS_ARRAYLEN(case_fold1_16_144) }, { case_fold1_16_145, __PHYSFS_ARRAYLEN(case_fold1_16_145) }, { case_fold1_16_146, __PHYSFS_ARRAYLEN(case_fold1_16_146) }, { case_fold1_16_147, __PHYSFS_ARRAYLEN(case_fold1_16_147) }, { case_fold1_16_148, __PHYSFS_ARRAYLEN(case_fold1_16_148) }, { case_fold1_16_149, __PHYSFS_ARRAYLEN(case_fold1_16_149) }, { case_fold1_16_150, __PHYSFS_ARRAYLEN(case_fold1_16_150) }, { case_fold1_16_151, __PHYSFS_ARRAYLEN(case_fold1_16_151) }, { case_fold1_16_152, __PHYSFS_ARRAYLEN(case_fold1_16_152) }, { case_fold1_16_153, __PHYSFS_ARRAYLEN(case_fold1_16_153) }, { case_fold1_16_154, __PHYSFS_ARRAYLEN(case_fold1_16_154) }, { case_fold1_16_155, __PHYSFS_ARRAYLEN(case_fold1_16_155) }, { case_fold1_16_156, __PHYSFS_ARRAYLEN(case_fold1_16_156) }, { case_fold1_16_157, __PHYSFS_ARRAYLEN(case_fold1_16_157) }, { case_fold1_16_158, __PHYSFS_ARRAYLEN(case_fold1_16_158) }, { case_fold1_16_159, __PHYSFS_ARRAYLEN(case_fold1_16_159) }, { case_fold1_16_160, __PHYSFS_ARRAYLEN(case_fold1_16_160) }, { case_fold1_16_161, __PHYSFS_ARRAYLEN(case_fold1_16_161) }, { case_fold1_16_162, __PHYSFS_ARRAYLEN(case_fold1_16_162) }, { case_fold1_16_163, __PHYSFS_ARRAYLEN(case_fold1_16_163) }, { case_fold1_16_164, __PHYSFS_ARRAYLEN(case_fold1_16_164) }, { case_fold1_16_165, __PHYSFS_ARRAYLEN(case_fold1_16_165) }, { case_fold1_16_166, __PHYSFS_ARRAYLEN(case_fold1_16_166) }, { case_fold1_16_167, __PHYSFS_ARRAYLEN(case_fold1_16_167) }, { case_fold1_16_168, __PHYSFS_ARRAYLEN(case_fold1_16_168) }, { case_fold1_16_169, __PHYSFS_ARRAYLEN(case_fold1_16_169) }, { case_fold1_16_170, __PHYSFS_ARRAYLEN(case_fold1_16_170) }, { case_fold1_16_171, __PHYSFS_ARRAYLEN(case_fold1_16_171) }, { case_fold1_16_172, __PHYSFS_ARRAYLEN(case_fold1_16_172) }, { case_fold1_16_173, __PHYSFS_ARRAYLEN(case_fold1_16_173) }, { case_fold1_16_174, __PHYSFS_ARRAYLEN(case_fold1_16_174) }, { case_fold1_16_175, __PHYSFS_ARRAYLEN(case_fold1_16_175) }, { case_fold1_16_176, __PHYSFS_ARRAYLEN(case_fold1_16_176) }, { case_fold1_16_177, __PHYSFS_ARRAYLEN(case_fold1_16_177) }, { case_fold1_16_178, __PHYSFS_ARRAYLEN(case_fold1_16_178) }, { case_fold1_16_179, __PHYSFS_ARRAYLEN(case_fold1_16_179) }, { case_fold1_16_180, __PHYSFS_ARRAYLEN(case_fold1_16_180) }, { case_fold1_16_181, __PHYSFS_ARRAYLEN(case_fold1_16_181) }, { case_fold1_16_182, __PHYSFS_ARRAYLEN(case_fold1_16_182) }, { case_fold1_16_183, __PHYSFS_ARRAYLEN(case_fold1_16_183) }, { case_fold1_16_184, __PHYSFS_ARRAYLEN(case_fold1_16_184) }, { case_fold1_16_185, __PHYSFS_ARRAYLEN(case_fold1_16_185) }, { case_fold1_16_186, __PHYSFS_ARRAYLEN(case_fold1_16_186) }, { case_fold1_16_187, __PHYSFS_ARRAYLEN(case_fold1_16_187) }, { case_fold1_16_188, __PHYSFS_ARRAYLEN(case_fold1_16_188) }, { case_fold1_16_189, __PHYSFS_ARRAYLEN(case_fold1_16_189) }, { case_fold1_16_190, __PHYSFS_ARRAYLEN(case_fold1_16_190) }, { case_fold1_16_191, __PHYSFS_ARRAYLEN(case_fold1_16_191) }, { case_fold1_16_192, __PHYSFS_ARRAYLEN(case_fold1_16_192) }, { case_fold1_16_193, __PHYSFS_ARRAYLEN(case_fold1_16_193) }, { case_fold1_16_194, __PHYSFS_ARRAYLEN(case_fold1_16_194) }, { case_fold1_16_195, __PHYSFS_ARRAYLEN(case_fold1_16_195) }, { case_fold1_16_196, __PHYSFS_ARRAYLEN(case_fold1_16_196) }, { case_fold1_16_197, __PHYSFS_ARRAYLEN(case_fold1_16_197) }, { case_fold1_16_198, __PHYSFS_ARRAYLEN(case_fold1_16_198) }, { case_fold1_16_199, __PHYSFS_ARRAYLEN(case_fold1_16_199) }, { case_fold1_16_200, __PHYSFS_ARRAYLEN(case_fold1_16_200) }, { case_fold1_16_201, __PHYSFS_ARRAYLEN(case_fold1_16_201) }, { case_fold1_16_202, __PHYSFS_ARRAYLEN(case_fold1_16_202) }, { case_fold1_16_203, __PHYSFS_ARRAYLEN(case_fold1_16_203) }, { case_fold1_16_204, __PHYSFS_ARRAYLEN(case_fold1_16_204) }, { case_fold1_16_205, __PHYSFS_ARRAYLEN(case_fold1_16_205) }, { case_fold1_16_206, __PHYSFS_ARRAYLEN(case_fold1_16_206) }, { case_fold1_16_207, __PHYSFS_ARRAYLEN(case_fold1_16_207) }, { case_fold1_16_208, __PHYSFS_ARRAYLEN(case_fold1_16_208) }, { case_fold1_16_209, __PHYSFS_ARRAYLEN(case_fold1_16_209) }, { case_fold1_16_210, __PHYSFS_ARRAYLEN(case_fold1_16_210) }, { case_fold1_16_211, __PHYSFS_ARRAYLEN(case_fold1_16_211) }, { case_fold1_16_212, __PHYSFS_ARRAYLEN(case_fold1_16_212) }, { case_fold1_16_213, __PHYSFS_ARRAYLEN(case_fold1_16_213) }, { case_fold1_16_214, __PHYSFS_ARRAYLEN(case_fold1_16_214) }, { case_fold1_16_215, __PHYSFS_ARRAYLEN(case_fold1_16_215) }, { case_fold1_16_216, __PHYSFS_ARRAYLEN(case_fold1_16_216) }, { case_fold1_16_217, __PHYSFS_ARRAYLEN(case_fold1_16_217) }, { case_fold1_16_218, __PHYSFS_ARRAYLEN(case_fold1_16_218) }, { case_fold1_16_219, __PHYSFS_ARRAYLEN(case_fold1_16_219) }, { case_fold1_16_220, __PHYSFS_ARRAYLEN(case_fold1_16_220) }, { case_fold1_16_221, __PHYSFS_ARRAYLEN(case_fold1_16_221) }, { case_fold1_16_222, __PHYSFS_ARRAYLEN(case_fold1_16_222) }, { case_fold1_16_223, __PHYSFS_ARRAYLEN(case_fold1_16_223) }, { case_fold1_16_224, __PHYSFS_ARRAYLEN(case_fold1_16_224) }, { case_fold1_16_225, __PHYSFS_ARRAYLEN(case_fold1_16_225) }, { case_fold1_16_226, __PHYSFS_ARRAYLEN(case_fold1_16_226) }, { case_fold1_16_227, __PHYSFS_ARRAYLEN(case_fold1_16_227) }, { case_fold1_16_228, __PHYSFS_ARRAYLEN(case_fold1_16_228) }, { case_fold1_16_229, __PHYSFS_ARRAYLEN(case_fold1_16_229) }, { case_fold1_16_230, __PHYSFS_ARRAYLEN(case_fold1_16_230) }, { case_fold1_16_231, __PHYSFS_ARRAYLEN(case_fold1_16_231) }, { case_fold1_16_232, __PHYSFS_ARRAYLEN(case_fold1_16_232) }, { case_fold1_16_233, __PHYSFS_ARRAYLEN(case_fold1_16_233) }, { case_fold1_16_234, __PHYSFS_ARRAYLEN(case_fold1_16_234) }, { case_fold1_16_235, __PHYSFS_ARRAYLEN(case_fold1_16_235) }, { case_fold1_16_236, __PHYSFS_ARRAYLEN(case_fold1_16_236) }, { case_fold1_16_237, __PHYSFS_ARRAYLEN(case_fold1_16_237) }, { case_fold1_16_238, __PHYSFS_ARRAYLEN(case_fold1_16_238) }, { case_fold1_16_239, __PHYSFS_ARRAYLEN(case_fold1_16_239) }, { case_fold1_16_240, __PHYSFS_ARRAYLEN(case_fold1_16_240) }, { case_fold1_16_241, __PHYSFS_ARRAYLEN(case_fold1_16_241) }, { case_fold1_16_242, __PHYSFS_ARRAYLEN(case_fold1_16_242) }, { case_fold1_16_243, __PHYSFS_ARRAYLEN(case_fold1_16_243) }, { case_fold1_16_244, __PHYSFS_ARRAYLEN(case_fold1_16_244) }, { case_fold1_16_245, __PHYSFS_ARRAYLEN(case_fold1_16_245) }, { case_fold1_16_246, __PHYSFS_ARRAYLEN(case_fold1_16_246) }, { case_fold1_16_247, __PHYSFS_ARRAYLEN(case_fold1_16_247) }, { case_fold1_16_248, __PHYSFS_ARRAYLEN(case_fold1_16_248) }, { case_fold1_16_249, __PHYSFS_ARRAYLEN(case_fold1_16_249) }, { case_fold1_16_250, __PHYSFS_ARRAYLEN(case_fold1_16_250) }, { case_fold1_16_251, __PHYSFS_ARRAYLEN(case_fold1_16_251) }, { case_fold1_16_252, __PHYSFS_ARRAYLEN(case_fold1_16_252) }, { case_fold1_16_253, __PHYSFS_ARRAYLEN(case_fold1_16_253) }, { case_fold1_16_254, __PHYSFS_ARRAYLEN(case_fold1_16_254) }, { case_fold1_16_255, __PHYSFS_ARRAYLEN(case_fold1_16_255) }, }; static const CaseFoldHashBucket1_32 case_fold_hash1_32[] = { { case_fold1_32_000, __PHYSFS_ARRAYLEN(case_fold1_32_000) }, { case_fold1_32_001, __PHYSFS_ARRAYLEN(case_fold1_32_001) }, { case_fold1_32_002, __PHYSFS_ARRAYLEN(case_fold1_32_002) }, { case_fold1_32_003, __PHYSFS_ARRAYLEN(case_fold1_32_003) }, { case_fold1_32_004, __PHYSFS_ARRAYLEN(case_fold1_32_004) }, { case_fold1_32_005, __PHYSFS_ARRAYLEN(case_fold1_32_005) }, { case_fold1_32_006, __PHYSFS_ARRAYLEN(case_fold1_32_006) }, { case_fold1_32_007, __PHYSFS_ARRAYLEN(case_fold1_32_007) }, { case_fold1_32_008, __PHYSFS_ARRAYLEN(case_fold1_32_008) }, { case_fold1_32_009, __PHYSFS_ARRAYLEN(case_fold1_32_009) }, { case_fold1_32_010, __PHYSFS_ARRAYLEN(case_fold1_32_010) }, { case_fold1_32_011, __PHYSFS_ARRAYLEN(case_fold1_32_011) }, { case_fold1_32_012, __PHYSFS_ARRAYLEN(case_fold1_32_012) }, { case_fold1_32_013, __PHYSFS_ARRAYLEN(case_fold1_32_013) }, { case_fold1_32_014, __PHYSFS_ARRAYLEN(case_fold1_32_014) }, { case_fold1_32_015, __PHYSFS_ARRAYLEN(case_fold1_32_015) }, }; static const CaseFoldHashBucket2_16 case_fold_hash2_16[] = { { case_fold2_16_000, __PHYSFS_ARRAYLEN(case_fold2_16_000) }, { case_fold2_16_001, __PHYSFS_ARRAYLEN(case_fold2_16_001) }, { case_fold2_16_002, __PHYSFS_ARRAYLEN(case_fold2_16_002) }, { case_fold2_16_003, __PHYSFS_ARRAYLEN(case_fold2_16_003) }, { case_fold2_16_004, __PHYSFS_ARRAYLEN(case_fold2_16_004) }, { case_fold2_16_005, __PHYSFS_ARRAYLEN(case_fold2_16_005) }, { case_fold2_16_006, __PHYSFS_ARRAYLEN(case_fold2_16_006) }, { case_fold2_16_007, __PHYSFS_ARRAYLEN(case_fold2_16_007) }, { case_fold2_16_008, __PHYSFS_ARRAYLEN(case_fold2_16_008) }, { case_fold2_16_009, __PHYSFS_ARRAYLEN(case_fold2_16_009) }, { case_fold2_16_010, __PHYSFS_ARRAYLEN(case_fold2_16_010) }, { case_fold2_16_011, __PHYSFS_ARRAYLEN(case_fold2_16_011) }, { case_fold2_16_012, __PHYSFS_ARRAYLEN(case_fold2_16_012) }, { case_fold2_16_013, __PHYSFS_ARRAYLEN(case_fold2_16_013) }, { case_fold2_16_014, __PHYSFS_ARRAYLEN(case_fold2_16_014) }, { case_fold2_16_015, __PHYSFS_ARRAYLEN(case_fold2_16_015) }, }; static const CaseFoldHashBucket3_16 case_fold_hash3_16[] = { { case_fold3_16_000, __PHYSFS_ARRAYLEN(case_fold3_16_000) }, { case_fold3_16_001, __PHYSFS_ARRAYLEN(case_fold3_16_001) }, { NULL, 0 }, { case_fold3_16_003, __PHYSFS_ARRAYLEN(case_fold3_16_003) }, }; #endif /* _INCLUDE_PHYSFS_CASEFOLDING_H_ */ /* end of physfs_casefolding.h ... */ ================================================ FILE: src/libraries/physfs/physfs_internal.h ================================================ /* * Internal function/structure declaration. Do NOT include in your * application. * * Please see the file LICENSE.txt in the source's root directory. * * This file written by Ryan C. Gordon. */ #ifndef _INCLUDE_PHYSFS_INTERNAL_H_ #define _INCLUDE_PHYSFS_INTERNAL_H_ #ifndef __PHYSICSFS_INTERNAL__ #error Do not include this header from your applications. #endif /* Turn off MSVC warnings that are aggressively anti-portability. */ #if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_WARNINGS) #define _CRT_SECURE_NO_WARNINGS 1 #endif #include "physfs.h" /* The holy trinity. */ #include #include #include #include "physfs_platforms.h" #include #define __PHYSFS_COMPILE_TIME_ASSERT(name, x) \ typedef int __PHYSFS_compile_time_assert_##name[(x) * 2 - 1] /* !!! FIXME: remove this when revamping stack allocation code... */ #if defined(_MSC_VER) || defined(__MINGW32__) || defined(__WATCOMC__) #include #endif #if defined(PHYSFS_PLATFORM_SOLARIS) || defined(PHYSFS_PLATFORM_LINUX) #include #endif #ifdef __cplusplus extern "C" { #endif #ifdef __GNUC__ #define PHYSFS_MINIMUM_GCC_VERSION(major, minor) \ ( ((__GNUC__ << 16) + __GNUC_MINOR__) >= (((major) << 16) + (minor)) ) #else #define PHYSFS_MINIMUM_GCC_VERSION(major, minor) (0) #endif #ifdef __cplusplus /* C++ always has a real inline keyword. */ #elif (defined macintosh) && !(defined __MWERKS__) # define inline #elif (defined _MSC_VER) # define inline __inline #endif #if defined(PHYSFS_PLATFORM_LINUX) && !defined(_FILE_OFFSET_BITS) #define _FILE_OFFSET_BITS 64 #endif /* All public APIs need to be in physfs.h with a PHYSFS_DECL. All file-private symbols need to be marked "static". Everything shared between PhysicsFS sources needs to be in this file between the visibility pragma blocks. */ #if !defined(_WIN32) && (PHYSFS_MINIMUM_GCC_VERSION(4,0) || defined(__clang__)) #define PHYSFS_HAVE_PRAGMA_VISIBILITY 1 #endif #if PHYSFS_HAVE_PRAGMA_VISIBILITY #pragma GCC visibility push(hidden) #endif /* These are the build-in archivers. We list them all as "extern" here without #ifdefs to keep it tidy, but obviously you need to make sure these are wrapped in PHYSFS_SUPPORTS_* checks before actually referencing them. */ extern const PHYSFS_Archiver __PHYSFS_Archiver_DIR; extern const PHYSFS_Archiver __PHYSFS_Archiver_ZIP; extern const PHYSFS_Archiver __PHYSFS_Archiver_7Z; extern const PHYSFS_Archiver __PHYSFS_Archiver_GRP; extern const PHYSFS_Archiver __PHYSFS_Archiver_QPAK; extern const PHYSFS_Archiver __PHYSFS_Archiver_HOG; extern const PHYSFS_Archiver __PHYSFS_Archiver_MVL; extern const PHYSFS_Archiver __PHYSFS_Archiver_WAD; extern const PHYSFS_Archiver __PHYSFS_Archiver_SLB; extern const PHYSFS_Archiver __PHYSFS_Archiver_ISO9660; extern const PHYSFS_Archiver __PHYSFS_Archiver_VDF; /* a real C99-compliant snprintf() is in Visual Studio 2015, but just use this everywhere for binary compatibility. */ #if defined(_MSC_VER) #include int __PHYSFS_msvc_vsnprintf(char *outBuf, size_t size, const char *format, va_list ap); int __PHYSFS_msvc_snprintf(char *outBuf, size_t size, const char *format, ...); #define vsnprintf __PHYSFS_msvc_vsnprintf #define snprintf __PHYSFS_msvc_snprintf #endif /* Some simple wrappers around WinRT C++ interfaces we can call from C. */ #ifdef PHYSFS_PLATFORM_WINRT const void *__PHYSFS_winrtCalcBaseDir(void); const void *__PHYSFS_winrtCalcPrefDir(void); #endif /* atomic operations. */ /* increment/decrement operations return the final incremented/decremented value. */ #if defined(_MSC_VER) && (_MSC_VER >= 1500) #include __PHYSFS_COMPILE_TIME_ASSERT(LongEqualsInt, sizeof (int) == sizeof (long)); #define __PHYSFS_ATOMIC_INCR(ptrval) _InterlockedIncrement((long*)(ptrval)) #define __PHYSFS_ATOMIC_DECR(ptrval) _InterlockedDecrement((long*)(ptrval)) #elif defined(__clang__) || (defined(__GNUC__) && (((__GNUC__ * 10000) + (__GNUC_MINOR__ * 100)) >= 40100)) #define __PHYSFS_ATOMIC_INCR(ptrval) __sync_add_and_fetch(ptrval, 1) #define __PHYSFS_ATOMIC_DECR(ptrval) __sync_add_and_fetch(ptrval, -1) #elif defined(__WATCOMC__) && defined(__386__) extern __inline int _xadd_watcom(volatile int *a, int v); #pragma aux _xadd_watcom = \ "lock xadd [ecx], eax" \ parm [ecx] [eax] \ value [eax] \ modify exact [eax]; #define __PHYSFS_ATOMIC_INCR(ptrval) (_xadd_watcom(ptrval, 1)+1) #define __PHYSFS_ATOMIC_DECR(ptrval) (_xadd_watcom(ptrval, -1)-1) #else #define PHYSFS_NEED_ATOMIC_OP_FALLBACK 1 int __PHYSFS_ATOMIC_INCR(int *ptrval); int __PHYSFS_ATOMIC_DECR(int *ptrval); #endif /* * Interface for small allocations. If you need a little scratch space for * a throwaway buffer or string, use this. It will make small allocations * on the stack if possible, and use allocator.Malloc() if they are too * large. This helps reduce malloc pressure. * There are some rules, though: * NEVER return a pointer from this, as stack-allocated buffers go away * when your function returns. * NEVER allocate in a loop, as stack-allocated pointers will pile up. Call * a function that uses smallAlloc from your loop, so the allocation can * free each time. * NEVER call smallAlloc with any complex expression (it's a macro that WILL * have side effects...it references the argument multiple times). Use a * variable or a literal. * NEVER free a pointer from this with anything but smallFree. It will not * be a valid pointer to the allocator, regardless of where the memory came * from. * NEVER realloc a pointer from this. * NEVER forget to use smallFree: it may not be a pointer from the stack. * NEVER forget to check for NULL...allocation can fail here, of course! */ #define __PHYSFS_SMALLALLOCTHRESHOLD 256 void *__PHYSFS_initSmallAlloc(void *ptr, const size_t len); #define __PHYSFS_smallAlloc(bytes) ( \ __PHYSFS_initSmallAlloc( \ (((bytes) < __PHYSFS_SMALLALLOCTHRESHOLD) ? \ alloca((size_t)((bytes)+sizeof(void*))) : NULL), (bytes)) \ ) void __PHYSFS_smallFree(void *ptr); /* Use the allocation hooks. */ #define malloc(x) Do not use malloc() directly. #define realloc(x, y) Do not use realloc() directly. #define free(x) Do not use free() directly. /* !!! FIXME: add alloca check here. */ /* by default, enable things, so builds can opt out of a few things they want to avoid. But you can build with this #defined to 0 if you would like to turn off everything except a handful of things you opt into. */ #ifndef PHYSFS_SUPPORTS_DEFAULT #define PHYSFS_SUPPORTS_DEFAULT 1 #endif #ifndef PHYSFS_SUPPORTS_ZIP #define PHYSFS_SUPPORTS_ZIP PHYSFS_SUPPORTS_DEFAULT #endif #ifndef PHYSFS_SUPPORTS_7Z #define PHYSFS_SUPPORTS_7Z PHYSFS_SUPPORTS_DEFAULT #endif #ifndef PHYSFS_SUPPORTS_GRP #define PHYSFS_SUPPORTS_GRP PHYSFS_SUPPORTS_DEFAULT #endif #ifndef PHYSFS_SUPPORTS_HOG #define PHYSFS_SUPPORTS_HOG PHYSFS_SUPPORTS_DEFAULT #endif #ifndef PHYSFS_SUPPORTS_MVL #define PHYSFS_SUPPORTS_MVL PHYSFS_SUPPORTS_DEFAULT #endif #ifndef PHYSFS_SUPPORTS_WAD #define PHYSFS_SUPPORTS_WAD PHYSFS_SUPPORTS_DEFAULT #endif #ifndef PHYSFS_SUPPORTS_QPAK #define PHYSFS_SUPPORTS_QPAK PHYSFS_SUPPORTS_DEFAULT #endif #ifndef PHYSFS_SUPPORTS_SLB #define PHYSFS_SUPPORTS_SLB PHYSFS_SUPPORTS_DEFAULT #endif #ifndef PHYSFS_SUPPORTS_ISO9660 #define PHYSFS_SUPPORTS_ISO9660 PHYSFS_SUPPORTS_DEFAULT #endif #ifndef PHYSFS_SUPPORTS_VDF #define PHYSFS_SUPPORTS_VDF PHYSFS_SUPPORTS_DEFAULT #endif #if PHYSFS_SUPPORTS_7Z /* 7zip support needs a global init function called at startup (no deinit). */ extern void SZIP_global_init(void); #endif /* The latest supported PHYSFS_Io::version value. */ #define CURRENT_PHYSFS_IO_API_VERSION 0 /* The latest supported PHYSFS_Archiver::version value. */ #define CURRENT_PHYSFS_ARCHIVER_API_VERSION 0 /* This byteorder stuff was lifted from SDL. https://www.libsdl.org/ */ #define PHYSFS_LIL_ENDIAN 1234 #define PHYSFS_BIG_ENDIAN 4321 #ifdef __linux__ #include #define PHYSFS_BYTEORDER __BYTE_ORDER #elif defined(__OpenBSD__) || defined(__DragonFly__) #include #define PHYSFS_BYTEORDER BYTE_ORDER #elif defined(__FreeBSD__) || defined(__NetBSD__) #include #define PHYSFS_BYTEORDER BYTE_ORDER /* predefs from newer gcc and clang versions: */ #elif defined(__ORDER_LITTLE_ENDIAN__) && defined(__ORDER_BIG_ENDIAN__) && defined(__BYTE_ORDER__) #if (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__) #define PHYSFS_BYTEORDER PHYSFS_LIL_ENDIAN #elif (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__) #define PHYSFS_BYTEORDER PHYSFS_BIG_ENDIAN #else #error Unsupported endianness #endif /**/ #else #if defined(__hppa__) || \ defined(__m68k__) || defined(mc68000) || defined(_M_M68K) || \ (defined(__MIPS__) && defined(__MIPSEB__)) || \ defined(__ppc__) || defined(__POWERPC__) || defined(__powerpc__) || defined(__PPC__) || \ defined(__sparc__) #define PHYSFS_BYTEORDER PHYSFS_BIG_ENDIAN #else #define PHYSFS_BYTEORDER PHYSFS_LIL_ENDIAN #endif #endif /* __linux__ */ /* * When sorting the entries in an archive, we use a modified QuickSort. * When there are less then PHYSFS_QUICKSORT_THRESHOLD entries left to sort, * we switch over to a BubbleSort for the remainder. Tweak to taste. * * You can override this setting by defining PHYSFS_QUICKSORT_THRESHOLD * before #including "physfs_internal.h". */ #ifndef PHYSFS_QUICKSORT_THRESHOLD #define PHYSFS_QUICKSORT_THRESHOLD 4 #endif /* * Sort an array (or whatever) of (max) elements. This uses a mixture of * a QuickSort and BubbleSort internally. * (cmpfn) is used to determine ordering, and (swapfn) does the actual * swapping of elements in the list. */ void __PHYSFS_sort(void *entries, size_t max, int (*cmpfn)(void *, size_t, size_t), void (*swapfn)(void *, size_t, size_t)); /* These get used all over for lessening code clutter. */ /* "ERRPASS" means "something else just set the error state for us" and is just to make it clear where the responsibility for the error state lays. */ #define BAIL(e, r) do { if (e) PHYSFS_setErrorCode(e); return r; } while (0) #define BAIL_ERRPASS(r) do { return r; } while (0) #define BAIL_IF(c, e, r) do { if (c) { if (e) PHYSFS_setErrorCode(e); return r; } } while (0) #define BAIL_IF_ERRPASS(c, r) do { if (c) { return r; } } while (0) #define BAIL_MUTEX(e, m, r) do { if (e) PHYSFS_setErrorCode(e); __PHYSFS_platformReleaseMutex(m); return r; } while (0) #define BAIL_MUTEX_ERRPASS(m, r) do { __PHYSFS_platformReleaseMutex(m); return r; } while (0) #define BAIL_IF_MUTEX(c, e, m, r) do { if (c) { if (e) PHYSFS_setErrorCode(e); __PHYSFS_platformReleaseMutex(m); return r; } } while (0) #define BAIL_IF_MUTEX_ERRPASS(c, m, r) do { if (c) { __PHYSFS_platformReleaseMutex(m); return r; } } while (0) #define GOTO(e, g) do { if (e) PHYSFS_setErrorCode(e); goto g; } while (0) #define GOTO_ERRPASS(g) do { goto g; } while (0) #define GOTO_IF(c, e, g) do { if (c) { if (e) PHYSFS_setErrorCode(e); goto g; } } while (0) #define GOTO_IF_ERRPASS(c, g) do { if (c) { goto g; } } while (0) #define GOTO_MUTEX(e, m, g) do { if (e) PHYSFS_setErrorCode(e); __PHYSFS_platformReleaseMutex(m); goto g; } while (0) #define GOTO_MUTEX_ERRPASS(m, g) do { __PHYSFS_platformReleaseMutex(m); goto g; } while (0) #define GOTO_IF_MUTEX(c, e, m, g) do { if (c) { if (e) PHYSFS_setErrorCode(e); __PHYSFS_platformReleaseMutex(m); goto g; } } while (0) #define GOTO_IF_MUTEX_ERRPASS(c, m, g) do { if (c) { __PHYSFS_platformReleaseMutex(m); goto g; } } while (0) #define __PHYSFS_ARRAYLEN(x) ( (sizeof (x)) / (sizeof (x[0])) ) #ifdef PHYSFS_NO_64BIT_SUPPORT #define __PHYSFS_SI64(x) ((PHYSFS_sint64) (x)) #define __PHYSFS_UI64(x) ((PHYSFS_uint64) (x)) #elif (defined __GNUC__) #define __PHYSFS_SI64(x) x##LL #define __PHYSFS_UI64(x) x##ULL #elif (defined _MSC_VER) #define __PHYSFS_SI64(x) x##i64 #define __PHYSFS_UI64(x) x##ui64 #else #define __PHYSFS_SI64(x) ((PHYSFS_sint64) (x)) #define __PHYSFS_UI64(x) ((PHYSFS_uint64) (x)) #endif /* * Check if a ui64 will fit in the platform's address space. * The initial sizeof check will optimize this macro out entirely on * 64-bit (and larger?!) platforms, and the other condition will * return zero or non-zero if the variable will fit in the platform's * size_t, suitable to pass to malloc. This is kinda messy, but effective. */ #define __PHYSFS_ui64FitsAddressSpace(s) ( \ (sizeof (PHYSFS_uint64) <= sizeof (size_t)) || \ ((s) < (__PHYSFS_UI64(0xFFFFFFFFFFFFFFFF) >> (64-(sizeof(size_t)*8)))) \ ) /* * Like strdup(), but uses the current PhysicsFS allocator. */ char *__PHYSFS_strdup(const char *str); /* * Give a hash value for a C string (uses djb's xor hashing algorithm). */ PHYSFS_uint32 __PHYSFS_hashString(const char *str); /* * Give a hash value for a C string (uses djb's xor hashing algorithm), case folding as it goes. */ PHYSFS_uint32 __PHYSFS_hashStringCaseFold(const char *str); /* * Give a hash value for a C string (uses djb's xor hashing algorithm), case folding as it goes, * assuming that this is only US-ASCII chars (one byte per char, only 'A' through 'Z' need folding). */ PHYSFS_uint32 __PHYSFS_hashStringCaseFoldUSAscii(const char *str); /* * The current allocator. Not valid before PHYSFS_init is called! */ extern PHYSFS_Allocator __PHYSFS_AllocatorHooks; /* convenience macro to make this less cumbersome internally... */ #define allocator __PHYSFS_AllocatorHooks /* * Create a PHYSFS_Io for a file in the physical filesystem. * This path is in platform-dependent notation. (mode) must be 'r', 'w', or * 'a' for Read, Write, or Append. */ PHYSFS_Io *__PHYSFS_createNativeIo(const char *path, const int mode); /* * Create a PHYSFS_Io for a buffer of memory (READ-ONLY). If you already * have one of these, just use its duplicate() method, and it'll increment * its refcount without allocating a copy of the buffer. */ PHYSFS_Io *__PHYSFS_createMemoryIo(const void *buf, PHYSFS_uint64 len, void (*destruct)(void *)); /* * Read (len) bytes from (io) into (buf). Returns non-zero on success, * zero on i/o error. Literally: "return (io->read(io, buf, len) == len);" */ int __PHYSFS_readAll(PHYSFS_Io *io, void *buf, const size_t len); /* These are shared between some archivers. */ /* LOTS of legacy formats that only use US ASCII, not actually UTF-8, so let them optimize here. */ void *UNPK_openArchive(PHYSFS_Io *io, const int case_sensitive, const int only_usascii); void UNPK_abandonArchive(void *opaque); void UNPK_closeArchive(void *opaque); void *UNPK_addEntry(void *opaque, char *name, const int isdir, const PHYSFS_sint64 ctime, const PHYSFS_sint64 mtime, const PHYSFS_uint64 pos, const PHYSFS_uint64 len); PHYSFS_Io *UNPK_openRead(void *opaque, const char *name); PHYSFS_Io *UNPK_openWrite(void *opaque, const char *name); PHYSFS_Io *UNPK_openAppend(void *opaque, const char *name); int UNPK_remove(void *opaque, const char *name); int UNPK_mkdir(void *opaque, const char *name); int UNPK_stat(void *opaque, const char *fn, PHYSFS_Stat *st); #define UNPK_enumerate __PHYSFS_DirTreeEnumerate /* Optional API many archivers use this to manage their directory tree. */ /* !!! FIXME: document this better. */ typedef struct __PHYSFS_DirTreeEntry { char *name; /* Full path in archive. */ struct __PHYSFS_DirTreeEntry *hashnext; /* next item in hash bucket. */ struct __PHYSFS_DirTreeEntry *children; /* linked list of kids, if dir. */ struct __PHYSFS_DirTreeEntry *sibling; /* next item in same dir. */ int isdir; } __PHYSFS_DirTreeEntry; typedef struct __PHYSFS_DirTree { __PHYSFS_DirTreeEntry *root; /* root of directory tree. */ __PHYSFS_DirTreeEntry **hash; /* all entries hashed for fast lookup. */ size_t hashBuckets; /* number of buckets in hash. */ size_t entrylen; /* size in bytes of entries (including subclass). */ int case_sensitive; /* non-zero to treat entries as case-sensitive in DirTreeFind */ int only_usascii; /* non-zero to treat paths as US ASCII only (one byte per char, only 'A' through 'Z' are considered for case folding). */ } __PHYSFS_DirTree; /* LOTS of legacy formats that only use US ASCII, not actually UTF-8, so let them optimize here. */ int __PHYSFS_DirTreeInit(__PHYSFS_DirTree *dt, const size_t entrylen, const int case_sensitive, const int only_usascii); void *__PHYSFS_DirTreeAdd(__PHYSFS_DirTree *dt, char *name, const int isdir); void *__PHYSFS_DirTreeFind(__PHYSFS_DirTree *dt, const char *path); PHYSFS_EnumerateCallbackResult __PHYSFS_DirTreeEnumerate(void *opaque, const char *dname, PHYSFS_EnumerateCallback cb, const char *origdir, void *callbackdata); void __PHYSFS_DirTreeDeinit(__PHYSFS_DirTree *dt); /*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/ /*------------ ----------------*/ /*------------ You MUST implement the following functions ----------------*/ /*------------ if porting to a new platform. ----------------*/ /*------------ (see platform/unix.c for an example) ----------------*/ /*------------ ----------------*/ /*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/ /* * The dir separator; '/' on unix, '\\' on win32, ":" on MacOS, etc... * Obviously, this isn't a function. If you need more than one char for this, * you'll need to pull some old pieces of PhysicsFS out of revision control. */ #if defined(PHYSFS_PLATFORM_WINDOWS) || defined(PHYSFS_PLATFORM_OS2) #define __PHYSFS_platformDirSeparator '\\' #else #define __PHYSFS_STANDARD_DIRSEP 1 #define __PHYSFS_platformDirSeparator '/' #endif /* * Initialize the platform. This is called when PHYSFS_init() is called from * the application. * * Return zero if there was a catastrophic failure (which prevents you from * functioning at all), and non-zero otherwise. */ int __PHYSFS_platformInit(void); /* * Deinitialize the platform. This is called when PHYSFS_deinit() is called * from the application. You can use this to clean up anything you've * allocated in your platform driver. */ void __PHYSFS_platformDeinit(void); /* * Open a file for reading. (filename) is in platform-dependent notation. The * file pointer should be positioned on the first byte of the file. * * The return value will be some platform-specific datatype that is opaque to * the caller; it could be a (FILE *) under Unix, or a (HANDLE *) under win32. * * The same file can be opened for read multiple times, and each should have * a unique file handle; this is frequently employed to prevent race * conditions in the archivers. * * Call PHYSFS_setErrorCode() and return (NULL) if the file can't be opened. */ void *__PHYSFS_platformOpenRead(const char *filename); /* * Open a file for writing. (filename) is in platform-dependent notation. If * the file exists, it should be truncated to zero bytes, and if it doesn't * exist, it should be created as a zero-byte file. The file pointer should * be positioned on the first byte of the file. * * The return value will be some platform-specific datatype that is opaque to * the caller; it could be a (FILE *) under Unix, or a (HANDLE *) under win32, * etc. * * Opening a file for write multiple times has undefined results. * * Call PHYSFS_setErrorCode() and return (NULL) if the file can't be opened. */ void *__PHYSFS_platformOpenWrite(const char *filename); /* * Open a file for appending. (filename) is in platform-dependent notation. If * the file exists, the file pointer should be place just past the end of the * file, so that the first write will be one byte after the current end of * the file. If the file doesn't exist, it should be created as a zero-byte * file. The file pointer should be positioned on the first byte of the file. * * The return value will be some platform-specific datatype that is opaque to * the caller; it could be a (FILE *) under Unix, or a (HANDLE *) under win32, * etc. * * Opening a file for append multiple times has undefined results. * * Call PHYSFS_setErrorCode() and return (NULL) if the file can't be opened. */ void *__PHYSFS_platformOpenAppend(const char *filename); /* * Read more data from a platform-specific file handle. (opaque) should be * cast to whatever data type your platform uses. Read a maximum of (len) * 8-bit bytes to the area pointed to by (buf). If there isn't enough data * available, return the number of bytes read, and position the file pointer * immediately after those bytes. * On success, return (len) and position the file pointer immediately past * the end of the last read byte. Return (-1) if there is a catastrophic * error, and call PHYSFS_setErrorCode() to describe the problem; the file * pointer should not move in such a case. A partial read is success; only * return (-1) on total failure; presumably, the next read call after a * partial read will fail as such. */ PHYSFS_sint64 __PHYSFS_platformRead(void *opaque, void *buf, PHYSFS_uint64 len); /* * Write more data to a platform-specific file handle. (opaque) should be * cast to whatever data type your platform uses. Write a maximum of (len) * 8-bit bytes from the area pointed to by (buffer). If there is a problem, * return the number of bytes written, and position the file pointer * immediately after those bytes. Return (-1) if there is a catastrophic * error, and call PHYSFS_setErrorCode() to describe the problem; the file * pointer should not move in such a case. A partial write is success; only * return (-1) on total failure; presumably, the next write call after a * partial write will fail as such. */ PHYSFS_sint64 __PHYSFS_platformWrite(void *opaque, const void *buffer, PHYSFS_uint64 len); /* * Set the file pointer to a new position. (opaque) should be cast to * whatever data type your platform uses. (pos) specifies the number * of 8-bit bytes to seek to from the start of the file. Seeking past the * end of the file is an error condition, and you should check for it. * * Not all file types can seek; this is to be expected by the caller. * * On error, call PHYSFS_setErrorCode() and return zero. On success, return * a non-zero value. */ int __PHYSFS_platformSeek(void *opaque, PHYSFS_uint64 pos); /* * Get the file pointer's position, in an 8-bit byte offset from the start of * the file. (opaque) should be cast to whatever data type your platform * uses. * * Not all file types can "tell"; this is to be expected by the caller. * * On error, call PHYSFS_setErrorCode() and return -1. On success, return >= 0. */ PHYSFS_sint64 __PHYSFS_platformTell(void *opaque); /* * Determine the current size of a file, in 8-bit bytes, from an open file. * * The caller expects that this information may not be available for all * file types on all platforms. * * Return -1 if you can't do it, and call PHYSFS_setErrorCode(). Otherwise, * return the file length in 8-bit bytes. */ PHYSFS_sint64 __PHYSFS_platformFileLength(void *handle); /* * Read filesystem metadata for a specific path. * * This needs to fill in all the fields of (stat). For fields that might not * mean anything on a platform (access time, perhaps), choose a reasonable * default. if (follow), we want to follow symlinks and stat what they * link to and not the link itself. * * Return zero on failure, non-zero on success. */ int __PHYSFS_platformStat(const char *fn, PHYSFS_Stat *stat, const int follow); /* * Flush any pending writes to disk. (opaque) should be cast to whatever data * type your platform uses. Be sure to check for errors; the caller expects * that this function can fail if there was a flushing error, etc. * * Return zero on failure, non-zero on success. */ int __PHYSFS_platformFlush(void *opaque); /* * Close file and deallocate resources. (opaque) should be cast to whatever * data type your platform uses. This should close the file in any scenario: * flushing is a separate function call, and this function should never fail. * * You should clean up all resources associated with (opaque); the pointer * will be considered invalid after this call. */ void __PHYSFS_platformClose(void *opaque); /* * Platform implementation of PHYSFS_getCdRomDirsCallback()... * CD directories are discovered and reported to the callback one at a time. * Pointers passed to the callback are assumed to be invalid to the * application after the callback returns, so you can free them or whatever. * Callback does not assume results will be sorted in any meaningful way. */ void __PHYSFS_platformDetectAvailableCDs(PHYSFS_StringCallback cb, void *data); /* * Calculate the base dir, if your platform needs special consideration. * Just return NULL if the standard routines will suffice. (see * calculateBaseDir() in physfs.c ...) * Your string must end with a dir separator if you don't return NULL. * Caller will allocator.Free() the retval if it's not NULL. */ char *__PHYSFS_platformCalcBaseDir(const char *argv0); /* * Get the platform-specific user dir. * As of PhysicsFS 2.1, returning NULL means fatal error. * Your string must end with a dir separator if you don't return NULL. * Caller will allocator.Free() the retval if it's not NULL. */ char *__PHYSFS_platformCalcUserDir(void); /* This is the cached version from PHYSFS_init(). This is a fast call. */ const char *__PHYSFS_getUserDir(void); /* not deprecated internal version. */ /* * Get the platform-specific pref dir. * Returning NULL means fatal error. * Your string must end with a dir separator if you don't return NULL. * Caller will allocator.Free() the retval if it's not NULL. * Caller will make missing directories if necessary; this just reports * the final path. */ char *__PHYSFS_platformCalcPrefDir(const char *org, const char *app); /* * Return a pointer that uniquely identifies the current thread. * On a platform without threading, (0x1) will suffice. These numbers are * arbitrary; the only requirement is that no two threads have the same * pointer. */ void *__PHYSFS_platformGetThreadID(void); /* * Enumerate a directory of files. This follows the rules for the * PHYSFS_Archiver::enumerate() method, except that the (dirName) that is * passed to this function is converted to platform-DEPENDENT notation by * the caller. The PHYSFS_Archiver version uses platform-independent * notation. Note that ".", "..", and other meta-entries should always * be ignored. */ PHYSFS_EnumerateCallbackResult __PHYSFS_platformEnumerate(const char *dirname, PHYSFS_EnumerateCallback callback, const char *origdir, void *callbackdata); /* * Make a directory in the actual filesystem. (path) is specified in * platform-dependent notation. On error, return zero and set the error * message. Return non-zero on success. */ int __PHYSFS_platformMkDir(const char *path); /* * Remove a file or directory entry in the actual filesystem. (path) is * specified in platform-dependent notation. Note that this deletes files * _and_ directories, so you might need to do some determination. * Non-empty directories should report an error and not delete themselves * or their contents. * * Deleting a symlink should remove the link, not what it points to. * * On error, return zero and set the error message. Return non-zero on success. */ int __PHYSFS_platformDelete(const char *path); /* * Create a platform-specific mutex. This can be whatever datatype your * platform uses for mutexes, but it is cast to a (void *) for abstractness. * * Return (NULL) if you couldn't create one. Systems without threads can * return any arbitrary non-NULL value. */ void *__PHYSFS_platformCreateMutex(void); /* * Destroy a platform-specific mutex, and clean up any resources associated * with it. (mutex) is a value previously returned by * __PHYSFS_platformCreateMutex(). This can be a no-op on single-threaded * platforms. */ void __PHYSFS_platformDestroyMutex(void *mutex); /* * Grab possession of a platform-specific mutex. Mutexes should be recursive; * that is, the same thread should be able to call this function multiple * times in a row without causing a deadlock. This function should block * until a thread can gain possession of the mutex. * * Return non-zero if the mutex was grabbed, zero if there was an * unrecoverable problem grabbing it (this should not be a matter of * timing out! We're talking major system errors; block until the mutex * is available otherwise.) * * _DO NOT_ call PHYSFS_setErrorCode() in here! Since setErrorCode calls this * function, you'll cause an infinite recursion. This means you can't * use the BAIL_*MACRO* macros, either. */ int __PHYSFS_platformGrabMutex(void *mutex); /* * Relinquish possession of the mutex when this method has been called * once for each time that platformGrabMutex was called. Once possession has * been released, the next thread in line to grab the mutex (if any) may * proceed. * * _DO NOT_ call PHYSFS_setErrorCode() in here! Since setErrorCode calls this * function, you'll cause an infinite recursion. This means you can't * use the BAIL_*MACRO* macros, either. */ void __PHYSFS_platformReleaseMutex(void *mutex); /* !!! FIXME: move to public API? */ PHYSFS_uint32 __PHYSFS_utf8codepoint(const char **_str); #if PHYSFS_HAVE_PRAGMA_VISIBILITY #pragma GCC visibility pop #endif #ifdef __cplusplus } #endif #endif /* end of physfs_internal.h ... */ ================================================ FILE: src/libraries/physfs/physfs_lzmasdk.h ================================================ #ifndef _INCLUDE_PHYSFS_LZMASDK_H_ #define _INCLUDE_PHYSFS_LZMASDK_H_ /* This is just a bunch of the LZMA SDK mushed together into one header. This code is all public domain, and mostly (if not entirely) written by Igor Pavlov. http://www.7-zip.org/sdk.html --ryan. */ /* 7zTypes.h -- Basic types 2013-11-12 : Igor Pavlov : Public domain */ #ifndef __7Z_TYPES_H #define __7Z_TYPES_H #ifdef _WIN32 /* #include */ #endif #include #ifndef EXTERN_C_BEGIN #ifdef __cplusplus #define EXTERN_C_BEGIN extern "C" { #define EXTERN_C_END } #else #define EXTERN_C_BEGIN #define EXTERN_C_END #endif #endif EXTERN_C_BEGIN #define SZ_OK 0 #define SZ_ERROR_DATA 1 #define SZ_ERROR_MEM 2 #define SZ_ERROR_CRC 3 #define SZ_ERROR_UNSUPPORTED 4 #define SZ_ERROR_PARAM 5 #define SZ_ERROR_INPUT_EOF 6 #define SZ_ERROR_OUTPUT_EOF 7 #define SZ_ERROR_READ 8 #define SZ_ERROR_WRITE 9 #define SZ_ERROR_PROGRESS 10 #define SZ_ERROR_FAIL 11 #define SZ_ERROR_THREAD 12 #define SZ_ERROR_ARCHIVE 16 #define SZ_ERROR_NO_ARCHIVE 17 typedef int SRes; #ifdef _WIN32 /* typedef DWORD WRes; */ typedef unsigned WRes; #else typedef int WRes; #endif #ifndef RINOK #define RINOK(x) { int __result__ = (x); if (__result__ != 0) return __result__; } #endif typedef unsigned char Byte; typedef short Int16; typedef unsigned short UInt16; #ifdef _LZMA_UINT32_IS_ULONG typedef long Int32; typedef unsigned long UInt32; #else typedef int Int32; typedef unsigned int UInt32; #endif #ifdef _SZ_NO_INT_64 /* define _SZ_NO_INT_64, if your compiler doesn't support 64-bit integers. NOTES: Some code will work incorrectly in that case! */ typedef long Int64; typedef unsigned long UInt64; #else #if defined(_MSC_VER) || defined(__BORLANDC__) || defined(__WATCOMC__) typedef __int64 Int64; typedef unsigned __int64 UInt64; #define UINT64_CONST(n) n ## ui64 #else typedef long long int Int64; typedef unsigned long long int UInt64; #define UINT64_CONST(n) n ## ULL #endif #endif #ifdef _LZMA_NO_SYSTEM_SIZE_T typedef UInt32 SizeT; #else typedef size_t SizeT; #endif typedef int Bool; #define True 1 #define False 0 #ifdef _WIN32 #define MY_STD_CALL __stdcall #else #define MY_STD_CALL #endif #ifdef _MSC_VER #if _MSC_VER >= 1300 #define MY_NO_INLINE __declspec(noinline) #else #define MY_NO_INLINE #endif #define MY_CDECL __cdecl #define MY_FAST_CALL __fastcall #else #define MY_NO_INLINE #define MY_CDECL #define MY_FAST_CALL #endif /* The following interfaces use first parameter as pointer to structure */ typedef struct { Byte (*Read)(void *p); /* reads one byte, returns 0 in case of EOF or error */ } IByteIn; typedef struct { void (*Write)(void *p, Byte b); } IByteOut; typedef struct { SRes (*Read)(void *p, void *buf, size_t *size); /* if (input(*size) != 0 && output(*size) == 0) means end_of_stream. (output(*size) < input(*size)) is allowed */ } ISeqInStream; typedef struct { size_t (*Write)(void *p, const void *buf, size_t size); /* Returns: result - the number of actually written bytes. (result < size) means error */ } ISeqOutStream; typedef enum { SZ_SEEK_SET = 0, SZ_SEEK_CUR = 1, SZ_SEEK_END = 2 } ESzSeek; typedef struct { SRes (*Read)(void *p, void *buf, size_t *size); /* same as ISeqInStream::Read */ SRes (*Seek)(void *p, Int64 *pos, ESzSeek origin); } ISeekInStream; typedef struct { SRes (*Look)(void *p, const void **buf, size_t *size); /* if (input(*size) != 0 && output(*size) == 0) means end_of_stream. (output(*size) > input(*size)) is not allowed (output(*size) < input(*size)) is allowed */ SRes (*Skip)(void *p, size_t offset); /* offset must be <= output(*size) of Look */ SRes (*Read)(void *p, void *buf, size_t *size); /* reads directly (without buffer). It's same as ISeqInStream::Read */ SRes (*Seek)(void *p, Int64 *pos, ESzSeek origin); } ILookInStream; static SRes LookInStream_SeekTo(ILookInStream *stream, UInt64 offset); /* reads via ILookInStream::Read */ static SRes LookInStream_Read2(ILookInStream *stream, void *buf, size_t size, SRes errorType); static SRes LookInStream_Read(ILookInStream *stream, void *buf, size_t size); #define LookToRead_BUF_SIZE (1 << 14) typedef struct { ILookInStream s; ISeekInStream *realStream; size_t pos; size_t size; Byte buf[LookToRead_BUF_SIZE]; } CLookToRead; static void LookToRead_CreateVTable(CLookToRead *p, int lookahead); static void LookToRead_Init(CLookToRead *p); typedef struct { ISeqInStream s; ILookInStream *realStream; } CSecToLook; typedef struct { ISeqInStream s; ILookInStream *realStream; } CSecToRead; typedef struct { SRes (*Progress)(void *p, UInt64 inSize, UInt64 outSize); /* Returns: result. (result != SZ_OK) means break. Value (UInt64)(Int64)-1 for size means unknown value. */ } ICompressProgress; typedef struct { void *(*Alloc)(void *p, size_t size); void (*Free)(void *p, void *address); /* address can be 0 */ } ISzAlloc; #define IAlloc_Alloc(p, size) (p)->Alloc((p), size) #define IAlloc_Free(p, a) (p)->Free((p), a) #ifdef _WIN32 #define CHAR_PATH_SEPARATOR '\\' #define WCHAR_PATH_SEPARATOR L'\\' #define STRING_PATH_SEPARATOR "\\" #define WSTRING_PATH_SEPARATOR L"\\" #else #define CHAR_PATH_SEPARATOR '/' #define WCHAR_PATH_SEPARATOR L'/' #define STRING_PATH_SEPARATOR "/" #define WSTRING_PATH_SEPARATOR L"/" #endif EXTERN_C_END #endif /* 7z.h -- 7z interface 2015-11-18 : Igor Pavlov : Public domain */ #ifndef __7Z_H #define __7Z_H /*#include "7zTypes.h"*/ EXTERN_C_BEGIN #define k7zStartHeaderSize 0x20 #define k7zSignatureSize 6 static const Byte k7zSignature[k7zSignatureSize]; typedef struct { const Byte *Data; size_t Size; } CSzData; /* CSzCoderInfo & CSzFolder support only default methods */ typedef struct { size_t PropsOffset; UInt32 MethodID; Byte NumStreams; Byte PropsSize; } CSzCoderInfo; typedef struct { UInt32 InIndex; UInt32 OutIndex; } CSzBond; #define SZ_NUM_CODERS_IN_FOLDER_MAX 4 #define SZ_NUM_BONDS_IN_FOLDER_MAX 3 #define SZ_NUM_PACK_STREAMS_IN_FOLDER_MAX 4 typedef struct { UInt32 NumCoders; UInt32 NumBonds; UInt32 NumPackStreams; UInt32 UnpackStream; UInt32 PackStreams[SZ_NUM_PACK_STREAMS_IN_FOLDER_MAX]; CSzBond Bonds[SZ_NUM_BONDS_IN_FOLDER_MAX]; CSzCoderInfo Coders[SZ_NUM_CODERS_IN_FOLDER_MAX]; } CSzFolder; static SRes SzGetNextFolderItem(CSzFolder *f, CSzData *sd); typedef struct { UInt32 Low; UInt32 High; } CNtfsFileTime; typedef struct { Byte *Defs; /* MSB 0 bit numbering */ UInt32 *Vals; } CSzBitUi32s; typedef struct { Byte *Defs; /* MSB 0 bit numbering */ /* UInt64 *Vals; */ CNtfsFileTime *Vals; } CSzBitUi64s; #define SzBitArray_Check(p, i) (((p)[(i) >> 3] & (0x80 >> ((i) & 7))) != 0) #define SzBitWithVals_Check(p, i) ((p)->Defs && ((p)->Defs[(i) >> 3] & (0x80 >> ((i) & 7))) != 0) typedef struct { UInt32 NumPackStreams; UInt32 NumFolders; UInt64 *PackPositions; /* NumPackStreams + 1 */ CSzBitUi32s FolderCRCs; /* NumFolders */ size_t *FoCodersOffsets; /* NumFolders + 1 */ UInt32 *FoStartPackStreamIndex; /* NumFolders + 1 */ UInt32 *FoToCoderUnpackSizes; /* NumFolders + 1 */ Byte *FoToMainUnpackSizeIndex; /* NumFolders */ UInt64 *CoderUnpackSizes; /* for all coders in all folders */ Byte *CodersData; } CSzAr; static UInt64 SzAr_GetFolderUnpackSize(const CSzAr *p, UInt32 folderIndex); static SRes SzAr_DecodeFolder(const CSzAr *p, UInt32 folderIndex, ILookInStream *stream, UInt64 startPos, Byte *outBuffer, size_t outSize, ISzAlloc *allocMain); typedef struct { CSzAr db; UInt64 startPosAfterHeader; UInt64 dataPos; UInt32 NumFiles; UInt64 *UnpackPositions; /* NumFiles + 1 */ /* Byte *IsEmptyFiles; */ Byte *IsDirs; CSzBitUi32s CRCs; CSzBitUi32s Attribs; /* CSzBitUi32s Parents; */ CSzBitUi64s MTime; CSzBitUi64s CTime; UInt32 *FolderToFile; /* NumFolders + 1 */ UInt32 *FileToFolder; /* NumFiles */ size_t *FileNameOffsets; /* in 2-byte steps */ Byte *FileNames; /* UTF-16-LE */ } CSzArEx; #define SzArEx_IsDir(p, i) (SzBitArray_Check((p)->IsDirs, i)) #define SzArEx_GetFileSize(p, i) ((p)->UnpackPositions[(i) + 1] - (p)->UnpackPositions[i]) static void SzArEx_Init(CSzArEx *p); static void SzArEx_Free(CSzArEx *p, ISzAlloc *alloc); /* if dest == NULL, the return value specifies the required size of the buffer, in 16-bit characters, including the null-terminating character. if dest != NULL, the return value specifies the number of 16-bit characters that are written to the dest, including the null-terminating character. */ static size_t SzArEx_GetFileNameUtf16(const CSzArEx *p, size_t fileIndex, UInt16 *dest); /* size_t SzArEx_GetFullNameLen(const CSzArEx *p, size_t fileIndex); UInt16 *SzArEx_GetFullNameUtf16_Back(const CSzArEx *p, size_t fileIndex, UInt16 *dest); */ /* SzArEx_Extract extracts file from archive *outBuffer must be 0 before first call for each new archive. Extracting cache: If you need to decompress more than one file, you can send these values from previous call: *blockIndex, *outBuffer, *outBufferSize You can consider "*outBuffer" as cache of solid block. If your archive is solid, it will increase decompression speed. If you use external function, you can declare these 3 cache variables (blockIndex, outBuffer, outBufferSize) as static in that external function. Free *outBuffer and set *outBuffer to 0, if you want to flush cache. */ static SRes SzArEx_Extract( const CSzArEx *db, ILookInStream *inStream, UInt32 fileIndex, /* index of file */ UInt32 *blockIndex, /* index of solid block */ Byte **outBuffer, /* pointer to pointer to output buffer (allocated with allocMain) */ size_t *outBufferSize, /* buffer size for output buffer */ size_t *offset, /* offset of stream for required file in *outBuffer */ size_t *outSizeProcessed, /* size of file in *outBuffer */ ISzAlloc *allocMain, ISzAlloc *allocTemp); /* SzArEx_Open Errors: SZ_ERROR_NO_ARCHIVE SZ_ERROR_ARCHIVE SZ_ERROR_UNSUPPORTED SZ_ERROR_MEM SZ_ERROR_CRC SZ_ERROR_INPUT_EOF SZ_ERROR_FAIL */ static SRes SzArEx_Open(CSzArEx *p, ILookInStream *inStream, ISzAlloc *allocMain, ISzAlloc *allocTemp); EXTERN_C_END #endif /* 7zCrc.h -- CRC32 calculation 2013-01-18 : Igor Pavlov : Public domain */ #ifndef __7Z_CRC_H #define __7Z_CRC_H /*#include "7zTypes.h" */ EXTERN_C_BEGIN /* Call CrcGenerateTable one time before other CRC functions */ static void MY_FAST_CALL CrcGenerateTable(void); #define CRC_INIT_VAL 0xFFFFFFFF #define CRC_GET_DIGEST(crc) ((crc) ^ CRC_INIT_VAL) #define CRC_UPDATE_BYTE(crc, b) (g_CrcTable[((crc) ^ (b)) & 0xFF] ^ ((crc) >> 8)) static UInt32 MY_FAST_CALL CrcCalc(const void *data, size_t size); EXTERN_C_END #endif /* CpuArch.h -- CPU specific code 2016-06-09: Igor Pavlov : Public domain */ #ifndef __CPU_ARCH_H #define __CPU_ARCH_H /*#include "7zTypes.h"*/ EXTERN_C_BEGIN /* MY_CPU_LE means that CPU is LITTLE ENDIAN. MY_CPU_BE means that CPU is BIG ENDIAN. If MY_CPU_LE and MY_CPU_BE are not defined, we don't know about ENDIANNESS of platform. MY_CPU_LE_UNALIGN means that CPU is LITTLE ENDIAN and CPU supports unaligned memory accesses. */ #if defined(_M_X64) \ || defined(_M_AMD64) \ || defined(__x86_64__) \ || defined(__AMD64__) \ || defined(__amd64__) #define MY_CPU_AMD64 #endif #if defined(MY_CPU_AMD64) \ || defined(_M_ARM64) \ || defined(_M_IA64) \ || defined(__AARCH64EL__) \ || defined(__AARCH64EB__) \ || defined(_M_ARM64) #define MY_CPU_64BIT #endif #if defined(_M_IX86) || defined(__i386__) #define MY_CPU_X86 #endif #if defined(MY_CPU_X86) || defined(MY_CPU_AMD64) #define MY_CPU_X86_OR_AMD64 #endif #if defined(MY_CPU_X86) \ || defined(_M_ARM) \ || defined(__ARMEL__) \ || defined(__THUMBEL__) \ || defined(__ARMEB__) \ || defined(__THUMBEB__) #define MY_CPU_32BIT #endif #if defined(_WIN32) && (defined(_M_ARM) || defined(_M_ARM64)) #define MY_CPU_ARM_LE #elif defined(_WIN64) && defined(_M_ARM64) #define MY_CPU_ARM_LE #endif #if defined(_WIN32) && defined(_M_IA64) #define MY_CPU_IA64_LE #endif #if defined(MY_CPU_X86_OR_AMD64) \ || defined(MY_CPU_ARM_LE) \ || defined(MY_CPU_IA64_LE) \ || defined(__LITTLE_ENDIAN__) \ || defined(__ARMEL__) \ || defined(__THUMBEL__) \ || defined(__AARCH64EL__) \ || defined(__MIPSEL__) \ || defined(__MIPSEL) \ || defined(_MIPSEL) \ || defined(__BFIN__) \ || (defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)) #define MY_CPU_LE #endif #if defined(__BIG_ENDIAN__) \ || defined(__ARMEB__) \ || defined(__THUMBEB__) \ || defined(__AARCH64EB__) \ || defined(__MIPSEB__) \ || defined(__MIPSEB) \ || defined(_MIPSEB) \ || defined(__m68k__) \ || defined(__s390__) \ || defined(__s390x__) \ || defined(__zarch__) \ || (defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)) #define MY_CPU_BE #endif #if defined(MY_CPU_LE) && defined(MY_CPU_BE) Stop_Compiling_Bad_Endian #endif #ifdef MY_CPU_LE #if defined(MY_CPU_X86_OR_AMD64) \ /* || defined(__AARCH64EL__) */ /*#define MY_CPU_LE_UNALIGN*/ #endif #endif #ifdef MY_CPU_LE_UNALIGN #define GetUi16(p) (*(const UInt16 *)(const void *)(p)) #define GetUi32(p) (*(const UInt32 *)(const void *)(p)) #define GetUi64(p) (*(const UInt64 *)(const void *)(p)) #define SetUi16(p, v) { *(UInt16 *)(p) = (v); } #define SetUi32(p, v) { *(UInt32 *)(p) = (v); } #define SetUi64(p, v) { *(UInt64 *)(p) = (v); } #else #define GetUi16(p) ( (UInt16) ( \ ((const Byte *)(p))[0] | \ ((UInt16)((const Byte *)(p))[1] << 8) )) #define GetUi32(p) ( \ ((const Byte *)(p))[0] | \ ((UInt32)((const Byte *)(p))[1] << 8) | \ ((UInt32)((const Byte *)(p))[2] << 16) | \ ((UInt32)((const Byte *)(p))[3] << 24)) #define GetUi64(p) (GetUi32(p) | ((UInt64)GetUi32(((const Byte *)(p)) + 4) << 32)) #define SetUi16(p, v) { Byte *_ppp_ = (Byte *)(p); UInt32 _vvv_ = (v); \ _ppp_[0] = (Byte)_vvv_; \ _ppp_[1] = (Byte)(_vvv_ >> 8); } #define SetUi32(p, v) { Byte *_ppp_ = (Byte *)(p); UInt32 _vvv_ = (v); \ _ppp_[0] = (Byte)_vvv_; \ _ppp_[1] = (Byte)(_vvv_ >> 8); \ _ppp_[2] = (Byte)(_vvv_ >> 16); \ _ppp_[3] = (Byte)(_vvv_ >> 24); } #define SetUi64(p, v) { Byte *_ppp2_ = (Byte *)(p); UInt64 _vvv2_ = (v); \ SetUi32(_ppp2_ , (UInt32)_vvv2_); \ SetUi32(_ppp2_ + 4, (UInt32)(_vvv2_ >> 32)); } #endif #if defined(MY_CPU_LE_UNALIGN) && /* defined(_WIN64) && */ (_MSC_VER >= 1300) /* Note: we use bswap instruction, that is unsupported in 386 cpu */ #include #pragma intrinsic(_byteswap_ulong) #pragma intrinsic(_byteswap_uint64) #define GetBe32(p) _byteswap_ulong(*(const UInt32 *)(const Byte *)(p)) #define GetBe64(p) _byteswap_uint64(*(const UInt64 *)(const Byte *)(p)) #define SetBe32(p, v) (*(UInt32 *)(void *)(p)) = _byteswap_ulong(v) #elif defined(MY_CPU_LE_UNALIGN) && defined (__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) #define GetBe32(p) __builtin_bswap32(*(const UInt32 *)(const Byte *)(p)) #define GetBe64(p) __builtin_bswap64(*(const UInt64 *)(const Byte *)(p)) #define SetBe32(p, v) (*(UInt32 *)(void *)(p)) = __builtin_bswap32(v) #else #define GetBe32(p) ( \ ((UInt32)((const Byte *)(p))[0] << 24) | \ ((UInt32)((const Byte *)(p))[1] << 16) | \ ((UInt32)((const Byte *)(p))[2] << 8) | \ ((const Byte *)(p))[3] ) #define GetBe64(p) (((UInt64)GetBe32(p) << 32) | GetBe32(((const Byte *)(p)) + 4)) #define SetBe32(p, v) { Byte *_ppp_ = (Byte *)(p); UInt32 _vvv_ = (v); \ _ppp_[0] = (Byte)(_vvv_ >> 24); \ _ppp_[1] = (Byte)(_vvv_ >> 16); \ _ppp_[2] = (Byte)(_vvv_ >> 8); \ _ppp_[3] = (Byte)_vvv_; } #endif #define GetBe16(p) ( (UInt16) ( \ ((UInt16)((const Byte *)(p))[0] << 8) | \ ((const Byte *)(p))[1] )) #ifdef MY_CPU_X86_OR_AMD64 typedef struct { UInt32 maxFunc; UInt32 vendor[3]; UInt32 ver; UInt32 b; UInt32 c; UInt32 d; } Cx86cpuid; enum { CPU_FIRM_INTEL, CPU_FIRM_AMD, CPU_FIRM_VIA }; static void MyCPUID(UInt32 function, UInt32 *a, UInt32 *b, UInt32 *c, UInt32 *d); static Bool x86cpuid_CheckAndRead(Cx86cpuid *p); static int x86cpuid_GetFirm(const Cx86cpuid *p); #define x86cpuid_GetFamily(ver) (((ver >> 16) & 0xFF0) | ((ver >> 8) & 0xF)) #define x86cpuid_GetModel(ver) (((ver >> 12) & 0xF0) | ((ver >> 4) & 0xF)) #define x86cpuid_GetStepping(ver) (ver & 0xF) static Bool CPU_Is_InOrder(); #endif EXTERN_C_END #endif /* 7zBuf.h -- Byte Buffer 2013-01-18 : Igor Pavlov : Public domain */ #ifndef __7Z_BUF_H #define __7Z_BUF_H /*#include "7zTypes.h" */ EXTERN_C_BEGIN typedef struct { Byte *data; size_t size; } CBuf; static void Buf_Init(CBuf *p); static int Buf_Create(CBuf *p, size_t size, ISzAlloc *alloc); static void Buf_Free(CBuf *p, ISzAlloc *alloc); EXTERN_C_END #endif /* Bcj2.h -- BCJ2 Converter for x86 code 2014-11-10 : Igor Pavlov : Public domain */ #ifndef __BCJ2_H #define __BCJ2_H /*#include "7zTypes.h" */ EXTERN_C_BEGIN #define BCJ2_NUM_STREAMS 4 enum { BCJ2_STREAM_MAIN, BCJ2_STREAM_CALL, BCJ2_STREAM_JUMP, BCJ2_STREAM_RC }; enum { BCJ2_DEC_STATE_ORIG_0 = BCJ2_NUM_STREAMS, BCJ2_DEC_STATE_ORIG_1, BCJ2_DEC_STATE_ORIG_2, BCJ2_DEC_STATE_ORIG_3, BCJ2_DEC_STATE_ORIG, BCJ2_DEC_STATE_OK }; enum { BCJ2_ENC_STATE_ORIG = BCJ2_NUM_STREAMS, BCJ2_ENC_STATE_OK }; #define BCJ2_IS_32BIT_STREAM(s) ((s) == BCJ2_STREAM_CALL || (s) == BCJ2_STREAM_JUMP) /* CBcj2Dec / CBcj2Enc bufs sizes: BUF_SIZE(n) = lims[n] - bufs[n] bufs sizes for BCJ2_STREAM_CALL and BCJ2_STREAM_JUMP must be mutliply of 4: (BUF_SIZE(BCJ2_STREAM_CALL) & 3) == 0 (BUF_SIZE(BCJ2_STREAM_JUMP) & 3) == 0 */ /* CBcj2Dec: dest is allowed to overlap with bufs[BCJ2_STREAM_MAIN], with the following conditions: bufs[BCJ2_STREAM_MAIN] >= dest && bufs[BCJ2_STREAM_MAIN] - dest >= tempReserv + BUF_SIZE(BCJ2_STREAM_CALL) + BUF_SIZE(BCJ2_STREAM_JUMP) tempReserv = 0 : for first call of Bcj2Dec_Decode tempReserv = 4 : for any other calls of Bcj2Dec_Decode overlap with offset = 1 is not allowed */ typedef struct { const Byte *bufs[BCJ2_NUM_STREAMS]; const Byte *lims[BCJ2_NUM_STREAMS]; Byte *dest; const Byte *destLim; unsigned state; /* BCJ2_STREAM_MAIN has more priority than BCJ2_STATE_ORIG */ UInt32 ip; Byte temp[4]; UInt32 range; UInt32 code; UInt16 probs[2 + 256]; } CBcj2Dec; static void Bcj2Dec_Init(CBcj2Dec *p); /* Returns: SZ_OK or SZ_ERROR_DATA */ static SRes Bcj2Dec_Decode(CBcj2Dec *p); #define Bcj2Dec_IsFinished(_p_) ((_p_)->code == 0) #define BCJ2_RELAT_LIMIT_NUM_BITS 26 #define BCJ2_RELAT_LIMIT ((UInt32)1 << BCJ2_RELAT_LIMIT_NUM_BITS) /* limit for CBcj2Enc::fileSize variable */ #define BCJ2_FileSize_MAX ((UInt32)1 << 31) EXTERN_C_END #endif /* Bra.h -- Branch converters for executables 2013-01-18 : Igor Pavlov : Public domain */ #ifndef __BRA_H #define __BRA_H /*#include "7zTypes.h"*/ EXTERN_C_BEGIN /* These functions convert relative addresses to absolute addresses in CALL instructions to increase the compression ratio. In: data - data buffer size - size of data ip - current virtual Instruction Pinter (IP) value state - state variable for x86 converter encoding - 0 (for decoding), 1 (for encoding) Out: state - state variable for x86 converter Returns: The number of processed bytes. If you call these functions with multiple calls, you must start next call with first byte after block of processed bytes. Type Endian Alignment LookAhead x86 little 1 4 ARMT little 2 2 ARM little 4 0 PPC big 4 0 SPARC big 4 0 IA64 little 16 0 size must be >= Alignment + LookAhead, if it's not last block. If (size < Alignment + LookAhead), converter returns 0. Example: UInt32 ip = 0; for () { ; size must be >= Alignment + LookAhead, if it's not last block SizeT processed = Convert(data, size, ip, 1); data += processed; size -= processed; ip += processed; } */ #define x86_Convert_Init(state) { state = 0; } static SizeT x86_Convert(Byte *data, SizeT size, UInt32 ip, UInt32 *state, int encoding); static SizeT ARM_Convert(Byte *data, SizeT size, UInt32 ip, int encoding); static SizeT ARMT_Convert(Byte *data, SizeT size, UInt32 ip, int encoding); static SizeT PPC_Convert(Byte *data, SizeT size, UInt32 ip, int encoding); static SizeT SPARC_Convert(Byte *data, SizeT size, UInt32 ip, int encoding); static SizeT IA64_Convert(Byte *data, SizeT size, UInt32 ip, int encoding); EXTERN_C_END #endif /* Delta.h -- Delta converter 2013-01-18 : Igor Pavlov : Public domain */ #ifndef __DELTA_H #define __DELTA_H /*#include "7zTypes.h" */ EXTERN_C_BEGIN #define DELTA_STATE_SIZE 256 static void Delta_Init(Byte *state); static void Delta_Decode(Byte *state, unsigned delta, Byte *data, SizeT size); EXTERN_C_END #endif /* LzmaDec.h -- LZMA Decoder 2013-01-18 : Igor Pavlov : Public domain */ #ifndef __LZMA_DEC_H #define __LZMA_DEC_H /*#include "7zTypes.h"*/ EXTERN_C_BEGIN /* #define _LZMA_PROB32 */ /* _LZMA_PROB32 can increase the speed on some CPUs, but memory usage for CLzmaDec::probs will be doubled in that case */ #ifdef _LZMA_PROB32 #define CLzmaProb UInt32 #else #define CLzmaProb UInt16 #endif /* ---------- LZMA Properties ---------- */ #define LZMA_PROPS_SIZE 5 typedef struct _CLzmaProps { unsigned lc, lp, pb; UInt32 dicSize; } CLzmaProps; /* LzmaProps_Decode - decodes properties Returns: SZ_OK SZ_ERROR_UNSUPPORTED - Unsupported properties */ static SRes LzmaProps_Decode(CLzmaProps *p, const Byte *data, unsigned size); /* ---------- LZMA Decoder state ---------- */ /* LZMA_REQUIRED_INPUT_MAX = number of required input bytes for worst case. Num bits = log2((2^11 / 31) ^ 22) + 26 < 134 + 26 = 160; */ #define LZMA_REQUIRED_INPUT_MAX 20 typedef struct { CLzmaProps prop; CLzmaProb *probs; Byte *dic; const Byte *buf; UInt32 range, code; SizeT dicPos; SizeT dicBufSize; UInt32 processedPos; UInt32 checkDicSize; unsigned state; UInt32 reps[4]; unsigned remainLen; int needFlush; int needInitState; UInt32 numProbs; unsigned tempBufSize; Byte tempBuf[LZMA_REQUIRED_INPUT_MAX]; } CLzmaDec; #define LzmaDec_Construct(p) { (p)->dic = 0; (p)->probs = 0; } static void LzmaDec_Init(CLzmaDec *p); /* There are two types of LZMA streams: 0) Stream with end mark. That end mark adds about 6 bytes to compressed size. 1) Stream without end mark. You must know exact uncompressed size to decompress such stream. */ typedef enum { LZMA_FINISH_ANY, /* finish at any point */ LZMA_FINISH_END /* block must be finished at the end */ } ELzmaFinishMode; /* ELzmaFinishMode has meaning only if the decoding reaches output limit !!! You must use LZMA_FINISH_END, when you know that current output buffer covers last bytes of block. In other cases you must use LZMA_FINISH_ANY. If LZMA decoder sees end marker before reaching output limit, it returns SZ_OK, and output value of destLen will be less than output buffer size limit. You can check status result also. You can use multiple checks to test data integrity after full decompression: 1) Check Result and "status" variable. 2) Check that output(destLen) = uncompressedSize, if you know real uncompressedSize. 3) Check that output(srcLen) = compressedSize, if you know real compressedSize. You must use correct finish mode in that case. */ typedef enum { LZMA_STATUS_NOT_SPECIFIED, /* use main error code instead */ LZMA_STATUS_FINISHED_WITH_MARK, /* stream was finished with end mark. */ LZMA_STATUS_NOT_FINISHED, /* stream was not finished */ LZMA_STATUS_NEEDS_MORE_INPUT, /* you must provide more input bytes */ LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK /* there is probability that stream was finished without end mark */ } ELzmaStatus; /* ELzmaStatus is used only as output value for function call */ /* ---------- Interfaces ---------- */ /* There are 3 levels of interfaces: 1) Dictionary Interface 2) Buffer Interface 3) One Call Interface You can select any of these interfaces, but don't mix functions from different groups for same object. */ /* There are two variants to allocate state for Dictionary Interface: 1) LzmaDec_Allocate / LzmaDec_Free 2) LzmaDec_AllocateProbs / LzmaDec_FreeProbs You can use variant 2, if you set dictionary buffer manually. For Buffer Interface you must always use variant 1. LzmaDec_Allocate* can return: SZ_OK SZ_ERROR_MEM - Memory allocation error SZ_ERROR_UNSUPPORTED - Unsupported properties */ static SRes LzmaDec_AllocateProbs(CLzmaDec *p, const Byte *props, unsigned propsSize, ISzAlloc *alloc); static void LzmaDec_FreeProbs(CLzmaDec *p, ISzAlloc *alloc); /* ---------- Dictionary Interface ---------- */ /* You can use it, if you want to eliminate the overhead for data copying from dictionary to some other external buffer. You must work with CLzmaDec variables directly in this interface. STEPS: LzmaDec_Constr() LzmaDec_Allocate() for (each new stream) { LzmaDec_Init() while (it needs more decompression) { LzmaDec_DecodeToDic() use data from CLzmaDec::dic and update CLzmaDec::dicPos } } LzmaDec_Free() */ /* LzmaDec_DecodeToDic The decoding to internal dictionary buffer (CLzmaDec::dic). You must manually update CLzmaDec::dicPos, if it reaches CLzmaDec::dicBufSize !!! finishMode: It has meaning only if the decoding reaches output limit (dicLimit). LZMA_FINISH_ANY - Decode just dicLimit bytes. LZMA_FINISH_END - Stream must be finished after dicLimit. Returns: SZ_OK status: LZMA_STATUS_FINISHED_WITH_MARK LZMA_STATUS_NOT_FINISHED LZMA_STATUS_NEEDS_MORE_INPUT LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK SZ_ERROR_DATA - Data error */ static SRes LzmaDec_DecodeToDic(CLzmaDec *p, SizeT dicLimit, const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status); EXTERN_C_END #endif /* Lzma2Dec.h -- LZMA2 Decoder 2015-05-13 : Igor Pavlov : Public domain */ #ifndef __LZMA2_DEC_H #define __LZMA2_DEC_H /*#include "LzmaDec.h"*/ EXTERN_C_BEGIN /* ---------- State Interface ---------- */ typedef struct { CLzmaDec decoder; UInt32 packSize; UInt32 unpackSize; unsigned state; Byte control; Bool needInitDic; Bool needInitState; Bool needInitProp; } CLzma2Dec; #define Lzma2Dec_Construct(p) LzmaDec_Construct(&(p)->decoder) #define Lzma2Dec_FreeProbs(p, alloc) LzmaDec_FreeProbs(&(p)->decoder, alloc); #define Lzma2Dec_Free(p, alloc) LzmaDec_Free(&(p)->decoder, alloc); static SRes Lzma2Dec_AllocateProbs(CLzma2Dec *p, Byte prop, ISzAlloc *alloc); static void Lzma2Dec_Init(CLzma2Dec *p); /* finishMode: It has meaning only if the decoding reaches output limit (*destLen or dicLimit). LZMA_FINISH_ANY - use smallest number of input bytes LZMA_FINISH_END - read EndOfStream marker after decoding Returns: SZ_OK status: LZMA_STATUS_FINISHED_WITH_MARK LZMA_STATUS_NOT_FINISHED LZMA_STATUS_NEEDS_MORE_INPUT SZ_ERROR_DATA - Data error */ static SRes Lzma2Dec_DecodeToDic(CLzma2Dec *p, SizeT dicLimit, const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status); EXTERN_C_END #endif /* END HEADERS */ /* 7zCrc.c -- CRC32 init 2015-03-10 : Igor Pavlov : Public domain */ /* #include "Precomp.h" #include "7zCrc.h" #include "CpuArch.h" */ #define UNUSED_VAR(x) (void)x; #define kCrcPoly 0xEDB88320 #ifdef MY_CPU_LE #define CRC_NUM_TABLES 8 #else #define CRC_NUM_TABLES 9 #define CRC_UINT32_SWAP(v) ((v >> 24) | ((v >> 8) & 0xFF00) | ((v << 8) & 0xFF0000) | (v << 24)) static UInt32 MY_FAST_CALL CrcUpdateT1_BeT4(UInt32 v, const void *data, size_t size, const UInt32 *table); static UInt32 MY_FAST_CALL CrcUpdateT1_BeT8(UInt32 v, const void *data, size_t size, const UInt32 *table); #endif #ifndef MY_CPU_BE static UInt32 MY_FAST_CALL CrcUpdateT4(UInt32 v, const void *data, size_t size, const UInt32 *table); static UInt32 MY_FAST_CALL CrcUpdateT8(UInt32 v, const void *data, size_t size, const UInt32 *table); #endif typedef UInt32 (MY_FAST_CALL *CRC_FUNC)(UInt32 v, const void *data, size_t size, const UInt32 *table); static CRC_FUNC g_CrcUpdateT4; static CRC_FUNC g_CrcUpdateT8; static CRC_FUNC g_CrcUpdate; static UInt32 g_CrcTable[256 * CRC_NUM_TABLES]; static UInt32 MY_FAST_CALL CrcCalc(const void *data, size_t size) { return g_CrcUpdate(CRC_INIT_VAL, data, size, g_CrcTable) ^ CRC_INIT_VAL; } #define CRC_UPDATE_BYTE_2(crc, b) (table[((crc) ^ (b)) & 0xFF] ^ ((crc) >> 8)) #if CRC_NUM_TABLES < 4 static UInt32 MY_FAST_CALL CrcUpdateT1(UInt32 v, const void *data, size_t size, const UInt32 *table) { const Byte *p = (const Byte *)data; const Byte *pEnd = p + size; for (; p != pEnd; p++) v = CRC_UPDATE_BYTE_2(v, *p); return v; } #endif static void MY_FAST_CALL CrcGenerateTable() { UInt32 i; for (i = 0; i < 256; i++) { UInt32 r = i; unsigned j; for (j = 0; j < 8; j++) r = (r >> 1) ^ (kCrcPoly & ~((r & 1) - 1)); g_CrcTable[i] = r; } for (; i < 256 * CRC_NUM_TABLES; i++) { UInt32 r = g_CrcTable[i - 256]; g_CrcTable[i] = g_CrcTable[r & 0xFF] ^ (r >> 8); } #if CRC_NUM_TABLES < 4 g_CrcUpdate = CrcUpdateT1; #else #ifdef MY_CPU_LE g_CrcUpdateT4 = CrcUpdateT4; g_CrcUpdate = CrcUpdateT4; #if CRC_NUM_TABLES >= 8 g_CrcUpdateT8 = CrcUpdateT8; #ifdef MY_CPU_X86_OR_AMD64 if (!CPU_Is_InOrder()) g_CrcUpdate = CrcUpdateT8; #endif #endif #else { #ifndef MY_CPU_BE UInt32 k = 0x01020304; const Byte *p = (const Byte *)&k; if (p[0] == 4 && p[1] == 3) { g_CrcUpdateT4 = CrcUpdateT4; g_CrcUpdate = CrcUpdateT4; #if CRC_NUM_TABLES >= 8 g_CrcUpdateT8 = CrcUpdateT8; /* g_CrcUpdate = CrcUpdateT8; */ #endif } else if (p[0] != 1 || p[1] != 2) g_CrcUpdate = CrcUpdateT1; else #endif { for (i = 256 * CRC_NUM_TABLES - 1; i >= 256; i--) { UInt32 x = g_CrcTable[i - 256]; g_CrcTable[i] = CRC_UINT32_SWAP(x); } g_CrcUpdateT4 = CrcUpdateT1_BeT4; g_CrcUpdate = CrcUpdateT1_BeT4; #if CRC_NUM_TABLES >= 8 g_CrcUpdateT8 = CrcUpdateT1_BeT8; /* g_CrcUpdate = CrcUpdateT1_BeT8; */ #endif } } #endif #endif } /* 7zCrcOpt.c -- CRC32 calculation 2015-03-01 : Igor Pavlov : Public domain */ /* #include "Precomp.h" #include "CpuArch.h" */ #ifndef MY_CPU_BE #define CRC_UPDATE_BYTE_2(crc, b) (table[((crc) ^ (b)) & 0xFF] ^ ((crc) >> 8)) static UInt32 MY_FAST_CALL CrcUpdateT4(UInt32 v, const void *data, size_t size, const UInt32 *table) { const Byte *p = (const Byte *)data; for (; size > 0 && ((unsigned)(ptrdiff_t)p & 3) != 0; size--, p++) v = CRC_UPDATE_BYTE_2(v, *p); for (; size >= 4; size -= 4, p += 4) { v ^= *(const UInt32 *)p; v = table[0x300 + ((v ) & 0xFF)] ^ table[0x200 + ((v >> 8) & 0xFF)] ^ table[0x100 + ((v >> 16) & 0xFF)] ^ table[0x000 + ((v >> 24))]; } for (; size > 0; size--, p++) v = CRC_UPDATE_BYTE_2(v, *p); return v; } static UInt32 MY_FAST_CALL CrcUpdateT8(UInt32 v, const void *data, size_t size, const UInt32 *table) { const Byte *p = (const Byte *)data; for (; size > 0 && ((unsigned)(ptrdiff_t)p & 7) != 0; size--, p++) v = CRC_UPDATE_BYTE_2(v, *p); for (; size >= 8; size -= 8, p += 8) { UInt32 d; v ^= *(const UInt32 *)p; v = table[0x700 + ((v ) & 0xFF)] ^ table[0x600 + ((v >> 8) & 0xFF)] ^ table[0x500 + ((v >> 16) & 0xFF)] ^ table[0x400 + ((v >> 24))]; d = *((const UInt32 *)p + 1); v ^= table[0x300 + ((d ) & 0xFF)] ^ table[0x200 + ((d >> 8) & 0xFF)] ^ table[0x100 + ((d >> 16) & 0xFF)] ^ table[0x000 + ((d >> 24))]; } for (; size > 0; size--, p++) v = CRC_UPDATE_BYTE_2(v, *p); return v; } #endif #ifndef MY_CPU_LE #define CRC_UINT32_SWAP(v) ((v >> 24) | ((v >> 8) & 0xFF00) | ((v << 8) & 0xFF0000) | (v << 24)) #define CRC_UPDATE_BYTE_2_BE(crc, b) (table[(((crc) >> 24) ^ (b))] ^ ((crc) << 8)) static UInt32 MY_FAST_CALL CrcUpdateT1_BeT4(UInt32 v, const void *data, size_t size, const UInt32 *table) { const Byte *p = (const Byte *)data; table += 0x100; v = CRC_UINT32_SWAP(v); for (; size > 0 && ((unsigned)(ptrdiff_t)p & 3) != 0; size--, p++) v = CRC_UPDATE_BYTE_2_BE(v, *p); for (; size >= 4; size -= 4, p += 4) { v ^= *(const UInt32 *)p; v = table[0x000 + ((v ) & 0xFF)] ^ table[0x100 + ((v >> 8) & 0xFF)] ^ table[0x200 + ((v >> 16) & 0xFF)] ^ table[0x300 + ((v >> 24))]; } for (; size > 0; size--, p++) v = CRC_UPDATE_BYTE_2_BE(v, *p); return CRC_UINT32_SWAP(v); } static UInt32 MY_FAST_CALL CrcUpdateT1_BeT8(UInt32 v, const void *data, size_t size, const UInt32 *table) { const Byte *p = (const Byte *)data; table += 0x100; v = CRC_UINT32_SWAP(v); for (; size > 0 && ((unsigned)(ptrdiff_t)p & 7) != 0; size--, p++) v = CRC_UPDATE_BYTE_2_BE(v, *p); for (; size >= 8; size -= 8, p += 8) { UInt32 d; v ^= *(const UInt32 *)p; v = table[0x400 + ((v ) & 0xFF)] ^ table[0x500 + ((v >> 8) & 0xFF)] ^ table[0x600 + ((v >> 16) & 0xFF)] ^ table[0x700 + ((v >> 24))]; d = *((const UInt32 *)p + 1); v ^= table[0x000 + ((d ) & 0xFF)] ^ table[0x100 + ((d >> 8) & 0xFF)] ^ table[0x200 + ((d >> 16) & 0xFF)] ^ table[0x300 + ((d >> 24))]; } for (; size > 0; size--, p++) v = CRC_UPDATE_BYTE_2_BE(v, *p); return CRC_UINT32_SWAP(v); } #endif /* CpuArch.c -- CPU specific code 2016-02-25: Igor Pavlov : Public domain */ /* #include "Precomp.h" #include "CpuArch.h" */ #ifdef MY_CPU_X86_OR_AMD64 #if (defined(_MSC_VER) && !defined(MY_CPU_AMD64)) || defined(__GNUC__) #define USE_ASM #endif #if !defined(USE_ASM) && _MSC_VER >= 1500 #include #endif #if defined(USE_ASM) && !defined(MY_CPU_AMD64) static UInt32 CheckFlag(UInt32 flag) { #ifdef _MSC_VER __asm pushfd; __asm pop EAX; __asm mov EDX, EAX; __asm xor EAX, flag; __asm push EAX; __asm popfd; __asm pushfd; __asm pop EAX; __asm xor EAX, EDX; __asm push EDX; __asm popfd; __asm and flag, EAX; #else __asm__ __volatile__ ( "pushf\n\t" "pop %%EAX\n\t" "movl %%EAX,%%EDX\n\t" "xorl %0,%%EAX\n\t" "push %%EAX\n\t" "popf\n\t" "pushf\n\t" "pop %%EAX\n\t" "xorl %%EDX,%%EAX\n\t" "push %%EDX\n\t" "popf\n\t" "andl %%EAX, %0\n\t": "=c" (flag) : "c" (flag) : "%eax", "%edx"); #endif return flag; } #define CHECK_CPUID_IS_SUPPORTED if (CheckFlag(1 << 18) == 0 || CheckFlag(1 << 21) == 0) return False; #else #define CHECK_CPUID_IS_SUPPORTED #endif #if defined(__WATCOMC__) static void __cpuid(int *cpuinfo, const UInt32 infotype); #pragma aux __cpuid = \ ".586" \ "cpuid" \ "mov [esi+0],eax" \ "mov [esi+4],ebx" \ "mov [esi+8],ecx" \ "mov [esi+12],edx" \ parm [esi] [eax] modify [ebx ecx edx]; #endif static void MyCPUID(UInt32 function, UInt32 *a, UInt32 *b, UInt32 *c, UInt32 *d) { #ifdef USE_ASM #ifdef _MSC_VER UInt32 a2, b2, c2, d2; __asm xor EBX, EBX; __asm xor ECX, ECX; __asm xor EDX, EDX; __asm mov EAX, function; __asm cpuid; __asm mov a2, EAX; __asm mov b2, EBX; __asm mov c2, ECX; __asm mov d2, EDX; *a = a2; *b = b2; *c = c2; *d = d2; #else __asm__ __volatile__ ( #if defined(MY_CPU_AMD64) && defined(__PIC__) "mov %%rbx, %%rdi;" "cpuid;" "xchg %%rbx, %%rdi;" : "=a" (*a) , "=D" (*b) , #elif defined(MY_CPU_X86) && defined(__PIC__) "mov %%ebx, %%edi;" "cpuid;" "xchgl %%ebx, %%edi;" : "=a" (*a) , "=D" (*b) , #else "cpuid" : "=a" (*a) , "=b" (*b) , #endif "=c" (*c) , "=d" (*d) : "0" (function)) ; #endif #else int CPUInfo[4]; __cpuid(CPUInfo, function); *a = CPUInfo[0]; *b = CPUInfo[1]; *c = CPUInfo[2]; *d = CPUInfo[3]; #endif } static Bool x86cpuid_CheckAndRead(Cx86cpuid *p) { CHECK_CPUID_IS_SUPPORTED MyCPUID(0, &p->maxFunc, &p->vendor[0], &p->vendor[2], &p->vendor[1]); MyCPUID(1, &p->ver, &p->b, &p->c, &p->d); return True; } static const UInt32 kVendors[][3] = { { 0x756E6547, 0x49656E69, 0x6C65746E}, { 0x68747541, 0x69746E65, 0x444D4163}, { 0x746E6543, 0x48727561, 0x736C7561} }; static int x86cpuid_GetFirm(const Cx86cpuid *p) { unsigned i; for (i = 0; i < sizeof(kVendors) / sizeof(kVendors[i]); i++) { const UInt32 *v = kVendors[i]; if (v[0] == p->vendor[0] && v[1] == p->vendor[1] && v[2] == p->vendor[2]) return (int)i; } return -1; } static Bool CPU_Is_InOrder() { Cx86cpuid p; int firm; UInt32 family, model; if (!x86cpuid_CheckAndRead(&p)) return True; family = x86cpuid_GetFamily(p.ver); model = x86cpuid_GetModel(p.ver); firm = x86cpuid_GetFirm(&p); switch (firm) { case CPU_FIRM_INTEL: return (family < 6 || (family == 6 && ( /* In-Order Atom CPU */ model == 0x1C /* 45 nm, N4xx, D4xx, N5xx, D5xx, 230, 330 */ || model == 0x26 /* 45 nm, Z6xx */ || model == 0x27 /* 32 nm, Z2460 */ || model == 0x35 /* 32 nm, Z2760 */ || model == 0x36 /* 32 nm, N2xxx, D2xxx */ ))); case CPU_FIRM_AMD: return (family < 5 || (family == 5 && (model < 6 || model == 0xA))); case CPU_FIRM_VIA: return (family < 6 || (family == 6 && model < 0xF)); } return True; } #endif /* 7zStream.c -- 7z Stream functions 2013-11-12 : Igor Pavlov : Public domain */ /*#include "Precomp.h"*/ #include /*#include "7zTypes.h"*/ static SRes LookInStream_SeekTo(ILookInStream *stream, UInt64 offset) { Int64 t = offset; return stream->Seek(stream, &t, SZ_SEEK_SET); } static SRes LookInStream_Read2(ILookInStream *stream, void *buf, size_t size, SRes errorType) { while (size != 0) { size_t processed = size; RINOK(stream->Read(stream, buf, &processed)); if (processed == 0) return errorType; buf = (void *)((Byte *)buf + processed); size -= processed; } return SZ_OK; } static SRes LookInStream_Read(ILookInStream *stream, void *buf, size_t size) { return LookInStream_Read2(stream, buf, size, SZ_ERROR_INPUT_EOF); } static SRes LookToRead_Look_Lookahead(void *pp, const void **buf, size_t *size) { SRes res = SZ_OK; CLookToRead *p = (CLookToRead *)pp; size_t size2 = p->size - p->pos; if (size2 == 0 && *size > 0) { p->pos = 0; size2 = LookToRead_BUF_SIZE; res = p->realStream->Read(p->realStream, p->buf, &size2); p->size = size2; } if (size2 < *size) *size = size2; *buf = p->buf + p->pos; return res; } static SRes LookToRead_Look_Exact(void *pp, const void **buf, size_t *size) { SRes res = SZ_OK; CLookToRead *p = (CLookToRead *)pp; size_t size2 = p->size - p->pos; if (size2 == 0 && *size > 0) { p->pos = 0; if (*size > LookToRead_BUF_SIZE) *size = LookToRead_BUF_SIZE; res = p->realStream->Read(p->realStream, p->buf, size); size2 = p->size = *size; } if (size2 < *size) *size = size2; *buf = p->buf + p->pos; return res; } static SRes LookToRead_Skip(void *pp, size_t offset) { CLookToRead *p = (CLookToRead *)pp; p->pos += offset; return SZ_OK; } static SRes LookToRead_Read(void *pp, void *buf, size_t *size) { CLookToRead *p = (CLookToRead *)pp; size_t rem = p->size - p->pos; if (rem == 0) return p->realStream->Read(p->realStream, buf, size); if (rem > *size) rem = *size; memcpy(buf, p->buf + p->pos, rem); p->pos += rem; *size = rem; return SZ_OK; } static SRes LookToRead_Seek(void *pp, Int64 *pos, ESzSeek origin) { CLookToRead *p = (CLookToRead *)pp; p->pos = p->size = 0; return p->realStream->Seek(p->realStream, pos, origin); } static void LookToRead_CreateVTable(CLookToRead *p, int lookahead) { p->s.Look = lookahead ? LookToRead_Look_Lookahead : LookToRead_Look_Exact; p->s.Skip = LookToRead_Skip; p->s.Read = LookToRead_Read; p->s.Seek = LookToRead_Seek; } static void LookToRead_Init(CLookToRead *p) { p->pos = p->size = 0; } /* 7zArcIn.c -- 7z Input functions 2016-05-16 : Igor Pavlov : Public domain */ /* #include "Precomp.h" #include #include "7z.h" #include "7zBuf.h" #include "7zCrc.h" #include "CpuArch.h" */ #define MY_ALLOC(T, p, size, alloc) { \ if ((p = (T *)IAlloc_Alloc(alloc, (size) * sizeof(T))) == NULL) return SZ_ERROR_MEM; } #define MY_ALLOC_ZE(T, p, size, alloc) { if ((size) == 0) p = NULL; else MY_ALLOC(T, p, size, alloc) } #define MY_ALLOC_AND_CPY(to, size, from, alloc) \ { MY_ALLOC(Byte, to, size, alloc); memcpy(to, from, size); } #define MY_ALLOC_ZE_AND_CPY(to, size, from, alloc) \ { if ((size) == 0) p = NULL; else { MY_ALLOC_AND_CPY(to, size, from, alloc) } } #define k7zMajorVersion 0 enum EIdEnum { k7zIdEnd, k7zIdHeader, k7zIdArchiveProperties, k7zIdAdditionalStreamsInfo, k7zIdMainStreamsInfo, k7zIdFilesInfo, k7zIdPackInfo, k7zIdUnpackInfo, k7zIdSubStreamsInfo, k7zIdSize, k7zIdCRC, k7zIdFolder, k7zIdCodersUnpackSize, k7zIdNumUnpackStream, k7zIdEmptyStream, k7zIdEmptyFile, k7zIdAnti, k7zIdName, k7zIdCTime, k7zIdATime, k7zIdMTime, k7zIdWinAttrib, k7zIdComment, k7zIdEncodedHeader, k7zIdStartPos, k7zIdDummy /* k7zNtSecure, */ /* k7zParent, */ /* k7zIsReal */ }; static const Byte k7zSignature[k7zSignatureSize] = {'7', 'z', 0xBC, 0xAF, 0x27, 0x1C}; #define SzBitUi32s_Init(p) { (p)->Defs = NULL; (p)->Vals = NULL; } static SRes SzBitUi32s_Alloc(CSzBitUi32s *p, size_t num, ISzAlloc *alloc) { if (num == 0) { p->Defs = NULL; p->Vals = NULL; } else { MY_ALLOC(Byte, p->Defs, (num + 7) >> 3, alloc); MY_ALLOC(UInt32, p->Vals, num, alloc); } return SZ_OK; } static void SzBitUi32s_Free(CSzBitUi32s *p, ISzAlloc *alloc) { IAlloc_Free(alloc, p->Defs); p->Defs = NULL; IAlloc_Free(alloc, p->Vals); p->Vals = NULL; } #define SzBitUi64s_Init(p) { (p)->Defs = NULL; (p)->Vals = NULL; } static void SzBitUi64s_Free(CSzBitUi64s *p, ISzAlloc *alloc) { IAlloc_Free(alloc, p->Defs); p->Defs = NULL; IAlloc_Free(alloc, p->Vals); p->Vals = NULL; } static void SzAr_Init(CSzAr *p) { p->NumPackStreams = 0; p->NumFolders = 0; p->PackPositions = NULL; SzBitUi32s_Init(&p->FolderCRCs); p->FoCodersOffsets = NULL; p->FoStartPackStreamIndex = NULL; p->FoToCoderUnpackSizes = NULL; p->FoToMainUnpackSizeIndex = NULL; p->CoderUnpackSizes = NULL; p->CodersData = NULL; } static void SzAr_Free(CSzAr *p, ISzAlloc *alloc) { IAlloc_Free(alloc, p->PackPositions); SzBitUi32s_Free(&p->FolderCRCs, alloc); IAlloc_Free(alloc, p->FoCodersOffsets); IAlloc_Free(alloc, p->FoStartPackStreamIndex); IAlloc_Free(alloc, p->FoToCoderUnpackSizes); IAlloc_Free(alloc, p->FoToMainUnpackSizeIndex); IAlloc_Free(alloc, p->CoderUnpackSizes); IAlloc_Free(alloc, p->CodersData); SzAr_Init(p); } static void SzArEx_Init(CSzArEx *p) { SzAr_Init(&p->db); p->NumFiles = 0; p->dataPos = 0; p->UnpackPositions = NULL; p->IsDirs = NULL; p->FolderToFile = NULL; p->FileToFolder = NULL; p->FileNameOffsets = NULL; p->FileNames = NULL; SzBitUi32s_Init(&p->CRCs); SzBitUi32s_Init(&p->Attribs); /* SzBitUi32s_Init(&p->Parents); */ SzBitUi64s_Init(&p->MTime); SzBitUi64s_Init(&p->CTime); } static void SzArEx_Free(CSzArEx *p, ISzAlloc *alloc) { IAlloc_Free(alloc, p->UnpackPositions); IAlloc_Free(alloc, p->IsDirs); IAlloc_Free(alloc, p->FolderToFile); IAlloc_Free(alloc, p->FileToFolder); IAlloc_Free(alloc, p->FileNameOffsets); IAlloc_Free(alloc, p->FileNames); SzBitUi32s_Free(&p->CRCs, alloc); SzBitUi32s_Free(&p->Attribs, alloc); /* SzBitUi32s_Free(&p->Parents, alloc); */ SzBitUi64s_Free(&p->MTime, alloc); SzBitUi64s_Free(&p->CTime, alloc); SzAr_Free(&p->db, alloc); SzArEx_Init(p); } static int TestSignatureCandidate(const Byte *testBytes) { unsigned i; for (i = 0; i < k7zSignatureSize; i++) if (testBytes[i] != k7zSignature[i]) return 0; return 1; } #define SzData_Clear(p) { (p)->Data = NULL; (p)->Size = 0; } #define SZ_READ_BYTE_SD(_sd_, dest) if ((_sd_)->Size == 0) return SZ_ERROR_ARCHIVE; (_sd_)->Size--; dest = *(_sd_)->Data++; #define SZ_READ_BYTE(dest) SZ_READ_BYTE_SD(sd, dest) #define SZ_READ_BYTE_2(dest) if (sd.Size == 0) return SZ_ERROR_ARCHIVE; sd.Size--; dest = *sd.Data++; #define SKIP_DATA(sd, size) { sd->Size -= (size_t)(size); sd->Data += (size_t)(size); } #define SKIP_DATA2(sd, size) { sd.Size -= (size_t)(size); sd.Data += (size_t)(size); } #define SZ_READ_32(dest) if (sd.Size < 4) return SZ_ERROR_ARCHIVE; \ dest = GetUi32(sd.Data); SKIP_DATA2(sd, 4); static MY_NO_INLINE SRes ReadNumber(CSzData *sd, UInt64 *value) { Byte firstByte, mask; unsigned i; UInt32 v; SZ_READ_BYTE(firstByte); if ((firstByte & 0x80) == 0) { *value = firstByte; return SZ_OK; } SZ_READ_BYTE(v); if ((firstByte & 0x40) == 0) { *value = (((UInt32)firstByte & 0x3F) << 8) | v; return SZ_OK; } SZ_READ_BYTE(mask); *value = v | ((UInt32)mask << 8); mask = 0x20; for (i = 2; i < 8; i++) { Byte b; if ((firstByte & mask) == 0) { UInt64 highPart = (unsigned)firstByte & (unsigned)(mask - 1); *value |= (highPart << (8 * i)); return SZ_OK; } SZ_READ_BYTE(b); *value |= ((UInt64)b << (8 * i)); mask >>= 1; } return SZ_OK; } static MY_NO_INLINE SRes SzReadNumber32(CSzData *sd, UInt32 *value) { Byte firstByte; UInt64 value64; if (sd->Size == 0) return SZ_ERROR_ARCHIVE; firstByte = *sd->Data; if ((firstByte & 0x80) == 0) { *value = firstByte; sd->Data++; sd->Size--; return SZ_OK; } RINOK(ReadNumber(sd, &value64)); if (value64 >= (UInt32)0x80000000 - 1) return SZ_ERROR_UNSUPPORTED; if (value64 >= ((UInt64)(1) << ((sizeof(size_t) - 1) * 8 + 4))) return SZ_ERROR_UNSUPPORTED; *value = (UInt32)value64; return SZ_OK; } #define ReadID(sd, value) ReadNumber(sd, value) static SRes SkipData(CSzData *sd) { UInt64 size; RINOK(ReadNumber(sd, &size)); if (size > sd->Size) return SZ_ERROR_ARCHIVE; SKIP_DATA(sd, size); return SZ_OK; } static SRes WaitId(CSzData *sd, UInt32 id) { for (;;) { UInt64 type; RINOK(ReadID(sd, &type)); if (type == id) return SZ_OK; if (type == k7zIdEnd) return SZ_ERROR_ARCHIVE; RINOK(SkipData(sd)); } } static SRes RememberBitVector(CSzData *sd, UInt32 numItems, const Byte **v) { UInt32 numBytes = (numItems + 7) >> 3; if (numBytes > sd->Size) return SZ_ERROR_ARCHIVE; *v = sd->Data; SKIP_DATA(sd, numBytes); return SZ_OK; } static UInt32 CountDefinedBits(const Byte *bits, UInt32 numItems) { Byte b = 0; unsigned m = 0; UInt32 sum = 0; for (; numItems != 0; numItems--) { if (m == 0) { b = *bits++; m = 8; } m--; sum += ((b >> m) & 1); } return sum; } static MY_NO_INLINE SRes ReadBitVector(CSzData *sd, UInt32 numItems, Byte **v, ISzAlloc *alloc) { Byte allAreDefined; Byte *v2; UInt32 numBytes = (numItems + 7) >> 3; *v = NULL; SZ_READ_BYTE(allAreDefined); if (numBytes == 0) return SZ_OK; if (allAreDefined == 0) { if (numBytes > sd->Size) return SZ_ERROR_ARCHIVE; MY_ALLOC_AND_CPY(*v, numBytes, sd->Data, alloc); SKIP_DATA(sd, numBytes); return SZ_OK; } MY_ALLOC(Byte, *v, numBytes, alloc); v2 = *v; memset(v2, 0xFF, (size_t)numBytes); { unsigned numBits = (unsigned)numItems & 7; if (numBits != 0) v2[numBytes - 1] = (Byte)((((UInt32)1 << numBits) - 1) << (8 - numBits)); } return SZ_OK; } static MY_NO_INLINE SRes ReadUi32s(CSzData *sd2, UInt32 numItems, CSzBitUi32s *crcs, ISzAlloc *alloc) { UInt32 i; CSzData sd; UInt32 *vals; const Byte *defs; MY_ALLOC_ZE(UInt32, crcs->Vals, numItems, alloc); sd = *sd2; defs = crcs->Defs; vals = crcs->Vals; for (i = 0; i < numItems; i++) if (SzBitArray_Check(defs, i)) { SZ_READ_32(vals[i]); } else vals[i] = 0; *sd2 = sd; return SZ_OK; } static SRes ReadBitUi32s(CSzData *sd, UInt32 numItems, CSzBitUi32s *crcs, ISzAlloc *alloc) { SzBitUi32s_Free(crcs, alloc); RINOK(ReadBitVector(sd, numItems, &crcs->Defs, alloc)); return ReadUi32s(sd, numItems, crcs, alloc); } static SRes SkipBitUi32s(CSzData *sd, UInt32 numItems) { Byte allAreDefined; UInt32 numDefined = numItems; SZ_READ_BYTE(allAreDefined); if (!allAreDefined) { size_t numBytes = (numItems + 7) >> 3; if (numBytes > sd->Size) return SZ_ERROR_ARCHIVE; numDefined = CountDefinedBits(sd->Data, numItems); SKIP_DATA(sd, numBytes); } if (numDefined > (sd->Size >> 2)) return SZ_ERROR_ARCHIVE; SKIP_DATA(sd, (size_t)numDefined * 4); return SZ_OK; } static SRes ReadPackInfo(CSzAr *p, CSzData *sd, ISzAlloc *alloc) { RINOK(SzReadNumber32(sd, &p->NumPackStreams)); RINOK(WaitId(sd, k7zIdSize)); MY_ALLOC(UInt64, p->PackPositions, (size_t)p->NumPackStreams + 1, alloc); { UInt64 sum = 0; UInt32 i; UInt32 numPackStreams = p->NumPackStreams; for (i = 0; i < numPackStreams; i++) { UInt64 packSize; p->PackPositions[i] = sum; RINOK(ReadNumber(sd, &packSize)); sum += packSize; if (sum < packSize) return SZ_ERROR_ARCHIVE; } p->PackPositions[i] = sum; } for (;;) { UInt64 type; RINOK(ReadID(sd, &type)); if (type == k7zIdEnd) return SZ_OK; if (type == k7zIdCRC) { /* CRC of packed streams is unused now */ RINOK(SkipBitUi32s(sd, p->NumPackStreams)); continue; } RINOK(SkipData(sd)); } } /* static SRes SzReadSwitch(CSzData *sd) { Byte external; RINOK(SzReadByte(sd, &external)); return (external == 0) ? SZ_OK: SZ_ERROR_UNSUPPORTED; } */ #define k_NumCodersStreams_in_Folder_MAX (SZ_NUM_BONDS_IN_FOLDER_MAX + SZ_NUM_PACK_STREAMS_IN_FOLDER_MAX) static SRes SzGetNextFolderItem(CSzFolder *f, CSzData *sd) { UInt32 numCoders, i; UInt32 numInStreams = 0; const Byte *dataStart = sd->Data; f->NumCoders = 0; f->NumBonds = 0; f->NumPackStreams = 0; f->UnpackStream = 0; RINOK(SzReadNumber32(sd, &numCoders)); if (numCoders == 0 || numCoders > SZ_NUM_CODERS_IN_FOLDER_MAX) return SZ_ERROR_UNSUPPORTED; for (i = 0; i < numCoders; i++) { Byte mainByte; CSzCoderInfo *coder = f->Coders + i; unsigned idSize, j; UInt64 id; SZ_READ_BYTE(mainByte); if ((mainByte & 0xC0) != 0) return SZ_ERROR_UNSUPPORTED; idSize = (unsigned)(mainByte & 0xF); if (idSize > sizeof(id)) return SZ_ERROR_UNSUPPORTED; if (idSize > sd->Size) return SZ_ERROR_ARCHIVE; id = 0; for (j = 0; j < idSize; j++) { id = ((id << 8) | *sd->Data); sd->Data++; sd->Size--; } if (id > UINT64_CONST(0xFFFFFFFF)) return SZ_ERROR_UNSUPPORTED; coder->MethodID = (UInt32)id; coder->NumStreams = 1; coder->PropsOffset = 0; coder->PropsSize = 0; if ((mainByte & 0x10) != 0) { UInt32 numStreams; RINOK(SzReadNumber32(sd, &numStreams)); if (numStreams > k_NumCodersStreams_in_Folder_MAX) return SZ_ERROR_UNSUPPORTED; coder->NumStreams = (Byte)numStreams; RINOK(SzReadNumber32(sd, &numStreams)); if (numStreams != 1) return SZ_ERROR_UNSUPPORTED; } numInStreams += coder->NumStreams; if (numInStreams > k_NumCodersStreams_in_Folder_MAX) return SZ_ERROR_UNSUPPORTED; if ((mainByte & 0x20) != 0) { UInt32 propsSize = 0; RINOK(SzReadNumber32(sd, &propsSize)); if (propsSize > sd->Size) return SZ_ERROR_ARCHIVE; if (propsSize >= 0x80) return SZ_ERROR_UNSUPPORTED; coder->PropsOffset = sd->Data - dataStart; coder->PropsSize = (Byte)propsSize; sd->Data += (size_t)propsSize; sd->Size -= (size_t)propsSize; } } /* if (numInStreams == 1 && numCoders == 1) { f->NumPackStreams = 1; f->PackStreams[0] = 0; } else */ { Byte streamUsed[k_NumCodersStreams_in_Folder_MAX]; UInt32 numBonds, numPackStreams; numBonds = numCoders - 1; if (numInStreams < numBonds) return SZ_ERROR_ARCHIVE; if (numBonds > SZ_NUM_BONDS_IN_FOLDER_MAX) return SZ_ERROR_UNSUPPORTED; f->NumBonds = numBonds; numPackStreams = numInStreams - numBonds; if (numPackStreams > SZ_NUM_PACK_STREAMS_IN_FOLDER_MAX) return SZ_ERROR_UNSUPPORTED; f->NumPackStreams = numPackStreams; for (i = 0; i < numInStreams; i++) streamUsed[i] = False; if (numBonds != 0) { Byte coderUsed[SZ_NUM_CODERS_IN_FOLDER_MAX]; for (i = 0; i < numCoders; i++) coderUsed[i] = False; for (i = 0; i < numBonds; i++) { CSzBond *bp = f->Bonds + i; RINOK(SzReadNumber32(sd, &bp->InIndex)); if (bp->InIndex >= numInStreams || streamUsed[bp->InIndex]) return SZ_ERROR_ARCHIVE; streamUsed[bp->InIndex] = True; RINOK(SzReadNumber32(sd, &bp->OutIndex)); if (bp->OutIndex >= numCoders || coderUsed[bp->OutIndex]) return SZ_ERROR_ARCHIVE; coderUsed[bp->OutIndex] = True; } for (i = 0; i < numCoders; i++) if (!coderUsed[i]) { f->UnpackStream = i; break; } if (i == numCoders) return SZ_ERROR_ARCHIVE; } if (numPackStreams == 1) { for (i = 0; i < numInStreams; i++) if (!streamUsed[i]) break; if (i == numInStreams) return SZ_ERROR_ARCHIVE; f->PackStreams[0] = i; } else for (i = 0; i < numPackStreams; i++) { UInt32 index; RINOK(SzReadNumber32(sd, &index)); if (index >= numInStreams || streamUsed[index]) return SZ_ERROR_ARCHIVE; streamUsed[index] = True; f->PackStreams[i] = index; } } f->NumCoders = numCoders; return SZ_OK; } static MY_NO_INLINE SRes SkipNumbers(CSzData *sd2, UInt32 num) { CSzData sd; sd = *sd2; for (; num != 0; num--) { Byte firstByte, mask; unsigned i; SZ_READ_BYTE_2(firstByte); if ((firstByte & 0x80) == 0) continue; if ((firstByte & 0x40) == 0) { if (sd.Size == 0) return SZ_ERROR_ARCHIVE; sd.Size--; sd.Data++; continue; } mask = 0x20; for (i = 2; i < 8 && (firstByte & mask) != 0; i++) mask >>= 1; if (i > sd.Size) return SZ_ERROR_ARCHIVE; SKIP_DATA2(sd, i); } *sd2 = sd; return SZ_OK; } #define k_Scan_NumCoders_MAX 64 #define k_Scan_NumCodersStreams_in_Folder_MAX 64 static SRes ReadUnpackInfo(CSzAr *p, CSzData *sd2, UInt32 numFoldersMax, const CBuf *tempBufs, UInt32 numTempBufs, ISzAlloc *alloc) { CSzData sd; UInt32 fo, numFolders, numCodersOutStreams, packStreamIndex; const Byte *startBufPtr; Byte external; RINOK(WaitId(sd2, k7zIdFolder)); RINOK(SzReadNumber32(sd2, &numFolders)); if (numFolders > numFoldersMax) return SZ_ERROR_UNSUPPORTED; p->NumFolders = numFolders; SZ_READ_BYTE_SD(sd2, external); if (external == 0) sd = *sd2; else { UInt32 index; RINOK(SzReadNumber32(sd2, &index)); if (index >= numTempBufs) return SZ_ERROR_ARCHIVE; sd.Data = tempBufs[index].data; sd.Size = tempBufs[index].size; } MY_ALLOC(size_t, p->FoCodersOffsets, (size_t)numFolders + 1, alloc); MY_ALLOC(UInt32, p->FoStartPackStreamIndex, (size_t)numFolders + 1, alloc); MY_ALLOC(UInt32, p->FoToCoderUnpackSizes, (size_t)numFolders + 1, alloc); MY_ALLOC(Byte, p->FoToMainUnpackSizeIndex, (size_t)numFolders, alloc); startBufPtr = sd.Data; packStreamIndex = 0; numCodersOutStreams = 0; for (fo = 0; fo < numFolders; fo++) { UInt32 numCoders, ci, numInStreams = 0; p->FoCodersOffsets[fo] = sd.Data - startBufPtr; RINOK(SzReadNumber32(&sd, &numCoders)); if (numCoders == 0 || numCoders > k_Scan_NumCoders_MAX) return SZ_ERROR_UNSUPPORTED; for (ci = 0; ci < numCoders; ci++) { Byte mainByte; unsigned idSize; UInt32 coderInStreams; SZ_READ_BYTE_2(mainByte); if ((mainByte & 0xC0) != 0) return SZ_ERROR_UNSUPPORTED; idSize = (mainByte & 0xF); if (idSize > 8) return SZ_ERROR_UNSUPPORTED; if (idSize > sd.Size) return SZ_ERROR_ARCHIVE; SKIP_DATA2(sd, idSize); coderInStreams = 1; if ((mainByte & 0x10) != 0) { UInt32 coderOutStreams; RINOK(SzReadNumber32(&sd, &coderInStreams)); RINOK(SzReadNumber32(&sd, &coderOutStreams)); if (coderInStreams > k_Scan_NumCodersStreams_in_Folder_MAX || coderOutStreams != 1) return SZ_ERROR_UNSUPPORTED; } numInStreams += coderInStreams; if ((mainByte & 0x20) != 0) { UInt32 propsSize; RINOK(SzReadNumber32(&sd, &propsSize)); if (propsSize > sd.Size) return SZ_ERROR_ARCHIVE; SKIP_DATA2(sd, propsSize); } } { UInt32 indexOfMainStream = 0; UInt32 numPackStreams = 1; if (numCoders != 1 || numInStreams != 1) { Byte streamUsed[k_Scan_NumCodersStreams_in_Folder_MAX]; Byte coderUsed[k_Scan_NumCoders_MAX]; UInt32 i; UInt32 numBonds = numCoders - 1; if (numInStreams < numBonds) return SZ_ERROR_ARCHIVE; if (numInStreams > k_Scan_NumCodersStreams_in_Folder_MAX) return SZ_ERROR_UNSUPPORTED; for (i = 0; i < numInStreams; i++) streamUsed[i] = False; for (i = 0; i < numCoders; i++) coderUsed[i] = False; for (i = 0; i < numBonds; i++) { UInt32 index; RINOK(SzReadNumber32(&sd, &index)); if (index >= numInStreams || streamUsed[index]) return SZ_ERROR_ARCHIVE; streamUsed[index] = True; RINOK(SzReadNumber32(&sd, &index)); if (index >= numCoders || coderUsed[index]) return SZ_ERROR_ARCHIVE; coderUsed[index] = True; } numPackStreams = numInStreams - numBonds; if (numPackStreams != 1) for (i = 0; i < numPackStreams; i++) { UInt32 index; RINOK(SzReadNumber32(&sd, &index)); if (index >= numInStreams || streamUsed[index]) return SZ_ERROR_ARCHIVE; streamUsed[index] = True; } for (i = 0; i < numCoders; i++) if (!coderUsed[i]) { indexOfMainStream = i; break; } if (i == numCoders) return SZ_ERROR_ARCHIVE; } p->FoStartPackStreamIndex[fo] = packStreamIndex; p->FoToCoderUnpackSizes[fo] = numCodersOutStreams; p->FoToMainUnpackSizeIndex[fo] = (Byte)indexOfMainStream; numCodersOutStreams += numCoders; if (numCodersOutStreams < numCoders) return SZ_ERROR_UNSUPPORTED; if (numPackStreams > p->NumPackStreams - packStreamIndex) return SZ_ERROR_ARCHIVE; packStreamIndex += numPackStreams; } } p->FoToCoderUnpackSizes[fo] = numCodersOutStreams; { size_t dataSize = sd.Data - startBufPtr; p->FoStartPackStreamIndex[fo] = packStreamIndex; p->FoCodersOffsets[fo] = dataSize; MY_ALLOC_ZE_AND_CPY(p->CodersData, dataSize, startBufPtr, alloc); } if (external != 0) { if (sd.Size != 0) return SZ_ERROR_ARCHIVE; sd = *sd2; } RINOK(WaitId(&sd, k7zIdCodersUnpackSize)); MY_ALLOC_ZE(UInt64, p->CoderUnpackSizes, (size_t)numCodersOutStreams, alloc); { UInt32 i; for (i = 0; i < numCodersOutStreams; i++) { RINOK(ReadNumber(&sd, p->CoderUnpackSizes + i)); } } for (;;) { UInt64 type; RINOK(ReadID(&sd, &type)); if (type == k7zIdEnd) { *sd2 = sd; return SZ_OK; } if (type == k7zIdCRC) { RINOK(ReadBitUi32s(&sd, numFolders, &p->FolderCRCs, alloc)); continue; } RINOK(SkipData(&sd)); } } static UInt64 SzAr_GetFolderUnpackSize(const CSzAr *p, UInt32 folderIndex) { return p->CoderUnpackSizes[p->FoToCoderUnpackSizes[folderIndex] + p->FoToMainUnpackSizeIndex[folderIndex]]; } typedef struct { UInt32 NumTotalSubStreams; UInt32 NumSubDigests; CSzData sdNumSubStreams; CSzData sdSizes; CSzData sdCRCs; } CSubStreamInfo; static SRes ReadSubStreamsInfo(CSzAr *p, CSzData *sd, CSubStreamInfo *ssi) { UInt64 type = 0; UInt32 numSubDigests = 0; UInt32 numFolders = p->NumFolders; UInt32 numUnpackStreams = numFolders; UInt32 numUnpackSizesInData = 0; for (;;) { RINOK(ReadID(sd, &type)); if (type == k7zIdNumUnpackStream) { UInt32 i; ssi->sdNumSubStreams.Data = sd->Data; numUnpackStreams = 0; numSubDigests = 0; for (i = 0; i < numFolders; i++) { UInt32 numStreams; RINOK(SzReadNumber32(sd, &numStreams)); if (numUnpackStreams > numUnpackStreams + numStreams) return SZ_ERROR_UNSUPPORTED; numUnpackStreams += numStreams; if (numStreams != 0) numUnpackSizesInData += (numStreams - 1); if (numStreams != 1 || !SzBitWithVals_Check(&p->FolderCRCs, i)) numSubDigests += numStreams; } ssi->sdNumSubStreams.Size = sd->Data - ssi->sdNumSubStreams.Data; continue; } if (type == k7zIdCRC || type == k7zIdSize || type == k7zIdEnd) break; RINOK(SkipData(sd)); } if (!ssi->sdNumSubStreams.Data) { numSubDigests = numFolders; if (p->FolderCRCs.Defs) numSubDigests = numFolders - CountDefinedBits(p->FolderCRCs.Defs, numFolders); } ssi->NumTotalSubStreams = numUnpackStreams; ssi->NumSubDigests = numSubDigests; if (type == k7zIdSize) { ssi->sdSizes.Data = sd->Data; RINOK(SkipNumbers(sd, numUnpackSizesInData)); ssi->sdSizes.Size = sd->Data - ssi->sdSizes.Data; RINOK(ReadID(sd, &type)); } for (;;) { if (type == k7zIdEnd) return SZ_OK; if (type == k7zIdCRC) { ssi->sdCRCs.Data = sd->Data; RINOK(SkipBitUi32s(sd, numSubDigests)); ssi->sdCRCs.Size = sd->Data - ssi->sdCRCs.Data; } else { RINOK(SkipData(sd)); } RINOK(ReadID(sd, &type)); } } static SRes SzReadStreamsInfo(CSzAr *p, CSzData *sd, UInt32 numFoldersMax, const CBuf *tempBufs, UInt32 numTempBufs, UInt64 *dataOffset, CSubStreamInfo *ssi, ISzAlloc *alloc) { UInt64 type; SzData_Clear(&ssi->sdSizes); SzData_Clear(&ssi->sdCRCs); SzData_Clear(&ssi->sdNumSubStreams); *dataOffset = 0; RINOK(ReadID(sd, &type)); if (type == k7zIdPackInfo) { RINOK(ReadNumber(sd, dataOffset)); RINOK(ReadPackInfo(p, sd, alloc)); RINOK(ReadID(sd, &type)); } if (type == k7zIdUnpackInfo) { RINOK(ReadUnpackInfo(p, sd, numFoldersMax, tempBufs, numTempBufs, alloc)); RINOK(ReadID(sd, &type)); } if (type == k7zIdSubStreamsInfo) { RINOK(ReadSubStreamsInfo(p, sd, ssi)); RINOK(ReadID(sd, &type)); } else { ssi->NumTotalSubStreams = p->NumFolders; /* ssi->NumSubDigests = 0; */ } return (type == k7zIdEnd ? SZ_OK : SZ_ERROR_UNSUPPORTED); } static SRes SzReadAndDecodePackedStreams( ILookInStream *inStream, CSzData *sd, CBuf *tempBufs, UInt32 numFoldersMax, UInt64 baseOffset, CSzAr *p, ISzAlloc *allocTemp) { UInt64 dataStartPos = 0; UInt32 fo; CSubStreamInfo ssi; UInt32 numFolders; RINOK(SzReadStreamsInfo(p, sd, numFoldersMax, NULL, 0, &dataStartPos, &ssi, allocTemp)); numFolders = p->NumFolders; if (numFolders == 0) return SZ_ERROR_ARCHIVE; else if (numFolders > numFoldersMax) return SZ_ERROR_UNSUPPORTED; dataStartPos += baseOffset; for (fo = 0; fo < numFolders; fo++) Buf_Init(tempBufs + fo); for (fo = 0; fo < numFolders; fo++) { CBuf *tempBuf = tempBufs + fo; UInt64 unpackSize = SzAr_GetFolderUnpackSize(p, fo); if ((size_t)unpackSize != unpackSize) return SZ_ERROR_MEM; if (!Buf_Create(tempBuf, (size_t)unpackSize, allocTemp)) return SZ_ERROR_MEM; } for (fo = 0; fo < numFolders; fo++) { const CBuf *tempBuf = tempBufs + fo; RINOK(LookInStream_SeekTo(inStream, dataStartPos)); RINOK(SzAr_DecodeFolder(p, fo, inStream, dataStartPos, tempBuf->data, tempBuf->size, allocTemp)); } return SZ_OK; } static SRes SzReadFileNames(const Byte *data, size_t size, UInt32 numFiles, size_t *offsets) { size_t pos = 0; *offsets++ = 0; if (numFiles == 0) return (size == 0) ? SZ_OK : SZ_ERROR_ARCHIVE; if (size < 2) return SZ_ERROR_ARCHIVE; if (data[size - 2] != 0 || data[size - 1] != 0) return SZ_ERROR_ARCHIVE; do { const Byte *p; if (pos == size) return SZ_ERROR_ARCHIVE; for (p = data + pos; #ifdef _WIN32 *(const UInt16 *)p != 0 #else p[0] != 0 || p[1] != 0 #endif ; p += 2); pos = p - data + 2; *offsets++ = (pos >> 1); } while (--numFiles); return (pos == size) ? SZ_OK : SZ_ERROR_ARCHIVE; } static MY_NO_INLINE SRes ReadTime(CSzBitUi64s *p, UInt32 num, CSzData *sd2, const CBuf *tempBufs, UInt32 numTempBufs, ISzAlloc *alloc) { CSzData sd; UInt32 i; CNtfsFileTime *vals; Byte *defs; Byte external; RINOK(ReadBitVector(sd2, num, &p->Defs, alloc)); SZ_READ_BYTE_SD(sd2, external); if (external == 0) sd = *sd2; else { UInt32 index; RINOK(SzReadNumber32(sd2, &index)); if (index >= numTempBufs) return SZ_ERROR_ARCHIVE; sd.Data = tempBufs[index].data; sd.Size = tempBufs[index].size; } MY_ALLOC_ZE(CNtfsFileTime, p->Vals, num, alloc); vals = p->Vals; defs = p->Defs; for (i = 0; i < num; i++) if (SzBitArray_Check(defs, i)) { if (sd.Size < 8) return SZ_ERROR_ARCHIVE; vals[i].Low = GetUi32(sd.Data); vals[i].High = GetUi32(sd.Data + 4); SKIP_DATA2(sd, 8); } else vals[i].High = vals[i].Low = 0; if (external == 0) *sd2 = sd; return SZ_OK; } #define NUM_ADDITIONAL_STREAMS_MAX 8 static SRes SzReadHeader2( CSzArEx *p, /* allocMain */ CSzData *sd, ILookInStream *inStream, CBuf *tempBufs, UInt32 *numTempBufs, ISzAlloc *allocMain, ISzAlloc *allocTemp ) { CSubStreamInfo ssi; { UInt64 type; SzData_Clear(&ssi.sdSizes); SzData_Clear(&ssi.sdCRCs); SzData_Clear(&ssi.sdNumSubStreams); ssi.NumSubDigests = 0; ssi.NumTotalSubStreams = 0; RINOK(ReadID(sd, &type)); if (type == k7zIdArchiveProperties) { for (;;) { UInt64 type2; RINOK(ReadID(sd, &type2)); if (type2 == k7zIdEnd) break; RINOK(SkipData(sd)); } RINOK(ReadID(sd, &type)); } if (type == k7zIdAdditionalStreamsInfo) { CSzAr tempAr; SRes res; SzAr_Init(&tempAr); res = SzReadAndDecodePackedStreams(inStream, sd, tempBufs, NUM_ADDITIONAL_STREAMS_MAX, p->startPosAfterHeader, &tempAr, allocTemp); *numTempBufs = tempAr.NumFolders; SzAr_Free(&tempAr, allocTemp); if (res != SZ_OK) return res; RINOK(ReadID(sd, &type)); } if (type == k7zIdMainStreamsInfo) { RINOK(SzReadStreamsInfo(&p->db, sd, (UInt32)1 << 30, tempBufs, *numTempBufs, &p->dataPos, &ssi, allocMain)); p->dataPos += p->startPosAfterHeader; RINOK(ReadID(sd, &type)); } if (type == k7zIdEnd) { return SZ_OK; } if (type != k7zIdFilesInfo) return SZ_ERROR_ARCHIVE; } { UInt32 numFiles = 0; UInt32 numEmptyStreams = 0; const Byte *emptyStreams = NULL; const Byte *emptyFiles = NULL; RINOK(SzReadNumber32(sd, &numFiles)); p->NumFiles = numFiles; for (;;) { UInt64 type; UInt64 size; RINOK(ReadID(sd, &type)); if (type == k7zIdEnd) break; RINOK(ReadNumber(sd, &size)); if (size > sd->Size) return SZ_ERROR_ARCHIVE; if (type >= ((UInt32)1 << 8)) { SKIP_DATA(sd, size); } else switch ((unsigned)type) { case k7zIdName: { size_t namesSize; const Byte *namesData; Byte external; SZ_READ_BYTE(external); if (external == 0) { namesSize = (size_t)size - 1; namesData = sd->Data; } else { UInt32 index; RINOK(SzReadNumber32(sd, &index)); if (index >= *numTempBufs) return SZ_ERROR_ARCHIVE; namesData = (tempBufs)[index].data; namesSize = (tempBufs)[index].size; } if ((namesSize & 1) != 0) return SZ_ERROR_ARCHIVE; MY_ALLOC(size_t, p->FileNameOffsets, numFiles + 1, allocMain); MY_ALLOC_ZE_AND_CPY(p->FileNames, namesSize, namesData, allocMain); RINOK(SzReadFileNames(p->FileNames, namesSize, numFiles, p->FileNameOffsets)) if (external == 0) { SKIP_DATA(sd, namesSize); } break; } case k7zIdEmptyStream: { RINOK(RememberBitVector(sd, numFiles, &emptyStreams)); numEmptyStreams = CountDefinedBits(emptyStreams, numFiles); emptyFiles = NULL; break; } case k7zIdEmptyFile: { RINOK(RememberBitVector(sd, numEmptyStreams, &emptyFiles)); break; } case k7zIdWinAttrib: { Byte external; CSzData sdSwitch; CSzData *sdPtr; SzBitUi32s_Free(&p->Attribs, allocMain); RINOK(ReadBitVector(sd, numFiles, &p->Attribs.Defs, allocMain)); SZ_READ_BYTE(external); if (external == 0) sdPtr = sd; else { UInt32 index; RINOK(SzReadNumber32(sd, &index)); if (index >= *numTempBufs) return SZ_ERROR_ARCHIVE; sdSwitch.Data = (tempBufs)[index].data; sdSwitch.Size = (tempBufs)[index].size; sdPtr = &sdSwitch; } RINOK(ReadUi32s(sdPtr, numFiles, &p->Attribs, allocMain)); break; } /* case k7zParent: { SzBitUi32s_Free(&p->Parents, allocMain); RINOK(ReadBitVector(sd, numFiles, &p->Parents.Defs, allocMain)); RINOK(SzReadSwitch(sd)); RINOK(ReadUi32s(sd, numFiles, &p->Parents, allocMain)); break; } */ case k7zIdMTime: RINOK(ReadTime(&p->MTime, numFiles, sd, tempBufs, *numTempBufs, allocMain)); break; case k7zIdCTime: RINOK(ReadTime(&p->CTime, numFiles, sd, tempBufs, *numTempBufs, allocMain)); break; default: { SKIP_DATA(sd, size); } } } if (numFiles - numEmptyStreams != ssi.NumTotalSubStreams) return SZ_ERROR_ARCHIVE; for (;;) { UInt64 type; RINOK(ReadID(sd, &type)); if (type == k7zIdEnd) break; RINOK(SkipData(sd)); } { UInt32 i; UInt32 emptyFileIndex = 0; UInt32 folderIndex = 0; UInt32 remSubStreams = 0; UInt32 numSubStreams = 0; UInt64 unpackPos = 0; const Byte *digestsDefs = NULL; const Byte *digestsVals = NULL; UInt32 digestsValsIndex = 0; UInt32 digestIndex; Byte allDigestsDefined = 0; Byte isDirMask = 0; Byte crcMask = 0; Byte mask = 0x80; MY_ALLOC(UInt32, p->FolderToFile, p->db.NumFolders + 1, allocMain); MY_ALLOC_ZE(UInt32, p->FileToFolder, p->NumFiles, allocMain); MY_ALLOC(UInt64, p->UnpackPositions, p->NumFiles + 1, allocMain); MY_ALLOC_ZE(Byte, p->IsDirs, (p->NumFiles + 7) >> 3, allocMain); RINOK(SzBitUi32s_Alloc(&p->CRCs, p->NumFiles, allocMain)); if (ssi.sdCRCs.Size != 0) { SZ_READ_BYTE_SD(&ssi.sdCRCs, allDigestsDefined); if (allDigestsDefined) digestsVals = ssi.sdCRCs.Data; else { size_t numBytes = (ssi.NumSubDigests + 7) >> 3; digestsDefs = ssi.sdCRCs.Data; digestsVals = digestsDefs + numBytes; } } digestIndex = 0; for (i = 0; i < numFiles; i++, mask >>= 1) { if (mask == 0) { UInt32 byteIndex = (i - 1) >> 3; p->IsDirs[byteIndex] = isDirMask; p->CRCs.Defs[byteIndex] = crcMask; isDirMask = 0; crcMask = 0; mask = 0x80; } p->UnpackPositions[i] = unpackPos; p->CRCs.Vals[i] = 0; if (emptyStreams && SzBitArray_Check(emptyStreams, i)) { if (emptyFiles) { if (!SzBitArray_Check(emptyFiles, emptyFileIndex)) isDirMask |= mask; emptyFileIndex++; } else isDirMask |= mask; if (remSubStreams == 0) { p->FileToFolder[i] = (UInt32)-1; continue; } } if (remSubStreams == 0) { for (;;) { if (folderIndex >= p->db.NumFolders) return SZ_ERROR_ARCHIVE; p->FolderToFile[folderIndex] = i; numSubStreams = 1; if (ssi.sdNumSubStreams.Data) { RINOK(SzReadNumber32(&ssi.sdNumSubStreams, &numSubStreams)); } remSubStreams = numSubStreams; if (numSubStreams != 0) break; { UInt64 folderUnpackSize = SzAr_GetFolderUnpackSize(&p->db, folderIndex); unpackPos += folderUnpackSize; if (unpackPos < folderUnpackSize) return SZ_ERROR_ARCHIVE; } folderIndex++; } } p->FileToFolder[i] = folderIndex; if (emptyStreams && SzBitArray_Check(emptyStreams, i)) continue; if (--remSubStreams == 0) { UInt64 folderUnpackSize = SzAr_GetFolderUnpackSize(&p->db, folderIndex); UInt64 startFolderUnpackPos = p->UnpackPositions[p->FolderToFile[folderIndex]]; if (folderUnpackSize < unpackPos - startFolderUnpackPos) return SZ_ERROR_ARCHIVE; unpackPos = startFolderUnpackPos + folderUnpackSize; if (unpackPos < folderUnpackSize) return SZ_ERROR_ARCHIVE; if (numSubStreams == 1 && SzBitWithVals_Check(&p->db.FolderCRCs, i)) { p->CRCs.Vals[i] = p->db.FolderCRCs.Vals[folderIndex]; crcMask |= mask; } else if (allDigestsDefined || (digestsDefs && SzBitArray_Check(digestsDefs, digestIndex))) { p->CRCs.Vals[i] = GetUi32(digestsVals + (size_t)digestsValsIndex * 4); digestsValsIndex++; crcMask |= mask; } folderIndex++; } else { UInt64 v; RINOK(ReadNumber(&ssi.sdSizes, &v)); unpackPos += v; if (unpackPos < v) return SZ_ERROR_ARCHIVE; if (allDigestsDefined || (digestsDefs && SzBitArray_Check(digestsDefs, digestIndex))) { p->CRCs.Vals[i] = GetUi32(digestsVals + (size_t)digestsValsIndex * 4); digestsValsIndex++; crcMask |= mask; } } } if (mask != 0x80) { UInt32 byteIndex = (i - 1) >> 3; p->IsDirs[byteIndex] = isDirMask; p->CRCs.Defs[byteIndex] = crcMask; } p->UnpackPositions[i] = unpackPos; if (remSubStreams != 0) return SZ_ERROR_ARCHIVE; for (;;) { p->FolderToFile[folderIndex] = i; if (folderIndex >= p->db.NumFolders) break; if (!ssi.sdNumSubStreams.Data) return SZ_ERROR_ARCHIVE; RINOK(SzReadNumber32(&ssi.sdNumSubStreams, &numSubStreams)); if (numSubStreams != 0) return SZ_ERROR_ARCHIVE; /* { UInt64 folderUnpackSize = SzAr_GetFolderUnpackSize(&p->db, folderIndex); unpackPos += folderUnpackSize; if (unpackPos < folderUnpackSize) return SZ_ERROR_ARCHIVE; } */ folderIndex++; } if (ssi.sdNumSubStreams.Data && ssi.sdNumSubStreams.Size != 0) return SZ_ERROR_ARCHIVE; } } return SZ_OK; } static SRes SzReadHeader( CSzArEx *p, CSzData *sd, ILookInStream *inStream, ISzAlloc *allocMain, ISzAlloc *allocTemp) { UInt32 i; UInt32 numTempBufs = 0; SRes res; CBuf tempBufs[NUM_ADDITIONAL_STREAMS_MAX]; for (i = 0; i < NUM_ADDITIONAL_STREAMS_MAX; i++) Buf_Init(tempBufs + i); res = SzReadHeader2(p, sd, inStream, tempBufs, &numTempBufs, allocMain, allocTemp); for (i = 0; i < NUM_ADDITIONAL_STREAMS_MAX; i++) Buf_Free(tempBufs + i, allocTemp); RINOK(res); if (sd->Size != 0) return SZ_ERROR_FAIL; return res; } static SRes SzArEx_Open2( CSzArEx *p, ILookInStream *inStream, ISzAlloc *allocMain, ISzAlloc *allocTemp) { Byte header[k7zStartHeaderSize]; Int64 startArcPos; UInt64 nextHeaderOffset, nextHeaderSize; size_t nextHeaderSizeT; UInt32 nextHeaderCRC; CBuf buf; SRes res; startArcPos = 0; RINOK(inStream->Seek(inStream, &startArcPos, SZ_SEEK_CUR)); RINOK(LookInStream_Read2(inStream, header, k7zStartHeaderSize, SZ_ERROR_NO_ARCHIVE)); if (!TestSignatureCandidate(header)) return SZ_ERROR_NO_ARCHIVE; if (header[6] != k7zMajorVersion) return SZ_ERROR_UNSUPPORTED; nextHeaderOffset = GetUi64(header + 12); nextHeaderSize = GetUi64(header + 20); nextHeaderCRC = GetUi32(header + 28); p->startPosAfterHeader = startArcPos + k7zStartHeaderSize; if (CrcCalc(header + 12, 20) != GetUi32(header + 8)) return SZ_ERROR_CRC; nextHeaderSizeT = (size_t)nextHeaderSize; if (nextHeaderSizeT != nextHeaderSize) return SZ_ERROR_MEM; if (nextHeaderSizeT == 0) return SZ_OK; if (nextHeaderOffset > nextHeaderOffset + nextHeaderSize || nextHeaderOffset > nextHeaderOffset + nextHeaderSize + k7zStartHeaderSize) return SZ_ERROR_NO_ARCHIVE; { Int64 pos = 0; RINOK(inStream->Seek(inStream, &pos, SZ_SEEK_END)); if ((UInt64)pos < startArcPos + nextHeaderOffset || (UInt64)pos < startArcPos + k7zStartHeaderSize + nextHeaderOffset || (UInt64)pos < startArcPos + k7zStartHeaderSize + nextHeaderOffset + nextHeaderSize) return SZ_ERROR_INPUT_EOF; } RINOK(LookInStream_SeekTo(inStream, startArcPos + k7zStartHeaderSize + nextHeaderOffset)); if (!Buf_Create(&buf, nextHeaderSizeT, allocTemp)) return SZ_ERROR_MEM; res = LookInStream_Read(inStream, buf.data, nextHeaderSizeT); if (res == SZ_OK) { res = SZ_ERROR_ARCHIVE; if (CrcCalc(buf.data, nextHeaderSizeT) == nextHeaderCRC) { CSzData sd; UInt64 type; sd.Data = buf.data; sd.Size = buf.size; res = ReadID(&sd, &type); if (res == SZ_OK && type == k7zIdEncodedHeader) { CSzAr tempAr; CBuf tempBuf; Buf_Init(&tempBuf); SzAr_Init(&tempAr); res = SzReadAndDecodePackedStreams(inStream, &sd, &tempBuf, 1, p->startPosAfterHeader, &tempAr, allocTemp); SzAr_Free(&tempAr, allocTemp); if (res != SZ_OK) { Buf_Free(&tempBuf, allocTemp); } else { Buf_Free(&buf, allocTemp); buf.data = tempBuf.data; buf.size = tempBuf.size; sd.Data = buf.data; sd.Size = buf.size; res = ReadID(&sd, &type); } } if (res == SZ_OK) { if (type == k7zIdHeader) { /* CSzData sd2; unsigned ttt; for (ttt = 0; ttt < 40000; ttt++) { SzArEx_Free(p, allocMain); sd2 = sd; res = SzReadHeader(p, &sd2, inStream, allocMain, allocTemp); if (res != SZ_OK) break; } */ res = SzReadHeader(p, &sd, inStream, allocMain, allocTemp); } else res = SZ_ERROR_UNSUPPORTED; } } } Buf_Free(&buf, allocTemp); return res; } static SRes SzArEx_Open(CSzArEx *p, ILookInStream *inStream, ISzAlloc *allocMain, ISzAlloc *allocTemp) { SRes res = SzArEx_Open2(p, inStream, allocMain, allocTemp); if (res != SZ_OK) SzArEx_Free(p, allocMain); return res; } static SRes SzArEx_Extract( const CSzArEx *p, ILookInStream *inStream, UInt32 fileIndex, UInt32 *blockIndex, Byte **tempBuf, size_t *outBufferSize, size_t *offset, size_t *outSizeProcessed, ISzAlloc *allocMain, ISzAlloc *allocTemp) { UInt32 folderIndex = p->FileToFolder[fileIndex]; SRes res = SZ_OK; *offset = 0; *outSizeProcessed = 0; if (folderIndex == (UInt32)-1) { IAlloc_Free(allocMain, *tempBuf); *blockIndex = folderIndex; *tempBuf = NULL; *outBufferSize = 0; return SZ_OK; } if (*tempBuf == NULL || *blockIndex != folderIndex) { UInt64 unpackSizeSpec = SzAr_GetFolderUnpackSize(&p->db, folderIndex); /* UInt64 unpackSizeSpec = p->UnpackPositions[p->FolderToFile[folderIndex + 1]] - p->UnpackPositions[p->FolderToFile[folderIndex]]; */ size_t unpackSize = (size_t)unpackSizeSpec; if (unpackSize != unpackSizeSpec) return SZ_ERROR_MEM; *blockIndex = folderIndex; IAlloc_Free(allocMain, *tempBuf); *tempBuf = NULL; if (res == SZ_OK) { *outBufferSize = unpackSize; if (unpackSize != 0) { *tempBuf = (Byte *)IAlloc_Alloc(allocMain, unpackSize); if (*tempBuf == NULL) res = SZ_ERROR_MEM; } if (res == SZ_OK) { res = SzAr_DecodeFolder(&p->db, folderIndex, inStream, p->dataPos, *tempBuf, unpackSize, allocTemp); } } } if (res == SZ_OK) { UInt64 unpackPos = p->UnpackPositions[fileIndex]; *offset = (size_t)(unpackPos - p->UnpackPositions[p->FolderToFile[folderIndex]]); *outSizeProcessed = (size_t)(p->UnpackPositions[fileIndex + 1] - unpackPos); if (*offset + *outSizeProcessed > *outBufferSize) return SZ_ERROR_FAIL; if (SzBitWithVals_Check(&p->CRCs, fileIndex)) if (CrcCalc(*tempBuf + *offset, *outSizeProcessed) != p->CRCs.Vals[fileIndex]) res = SZ_ERROR_CRC; } return res; } static size_t SzArEx_GetFileNameUtf16(const CSzArEx *p, size_t fileIndex, UInt16 *dest) { size_t offs = p->FileNameOffsets[fileIndex]; size_t len = p->FileNameOffsets[fileIndex + 1] - offs; if (dest != 0) { size_t i; const Byte *src = p->FileNames + offs * 2; for (i = 0; i < len; i++) dest[i] = GetUi16(src + i * 2); } return len; } /* static size_t SzArEx_GetFullNameLen(const CSzArEx *p, size_t fileIndex) { size_t len; if (!p->FileNameOffsets) return 1; len = 0; for (;;) { UInt32 parent = (UInt32)(Int32)-1; len += p->FileNameOffsets[fileIndex + 1] - p->FileNameOffsets[fileIndex]; if SzBitWithVals_Check(&p->Parents, fileIndex) parent = p->Parents.Vals[fileIndex]; if (parent == (UInt32)(Int32)-1) return len; fileIndex = parent; } } static UInt16 *SzArEx_GetFullNameUtf16_Back(const CSzArEx *p, size_t fileIndex, UInt16 *dest) { Bool needSlash; if (!p->FileNameOffsets) { *(--dest) = 0; return dest; } needSlash = False; for (;;) { UInt32 parent = (UInt32)(Int32)-1; size_t curLen = p->FileNameOffsets[fileIndex + 1] - p->FileNameOffsets[fileIndex]; SzArEx_GetFileNameUtf16(p, fileIndex, dest - curLen); if (needSlash) *(dest - 1) = '/'; needSlash = True; dest -= curLen; if SzBitWithVals_Check(&p->Parents, fileIndex) parent = p->Parents.Vals[fileIndex]; if (parent == (UInt32)(Int32)-1) return dest; fileIndex = parent; } } */ /* 7zBuf.c -- Byte Buffer 2013-01-21 : Igor Pavlov : Public domain */ /* #include "Precomp.h" #include "7zBuf.h" */ static void Buf_Init(CBuf *p) { p->data = 0; p->size = 0; } static int Buf_Create(CBuf *p, size_t size, ISzAlloc *alloc) { p->size = 0; if (size == 0) { p->data = 0; return 1; } p->data = (Byte *)alloc->Alloc(alloc, size); if (p->data != 0) { p->size = size; return 1; } return 0; } static void Buf_Free(CBuf *p, ISzAlloc *alloc) { alloc->Free(alloc, p->data); p->data = 0; p->size = 0; } /* 7zDec.c -- Decoding from 7z folder 2015-11-18 : Igor Pavlov : Public domain */ /* #define _7ZIP_PPMD_SUPPPORT */ /* #include "Precomp.h" #include #include "7z.h" #include "7zCrc.h" #include "Bcj2.h" #include "Bra.h" #include "CpuArch.h" #include "Delta.h" #include "LzmaDec.h" #include "Lzma2Dec.h" #ifdef _7ZIP_PPMD_SUPPPORT #include "Ppmd7.h" #endif */ #define k_Copy 0 #define k_Delta 3 #define k_LZMA2 0x21 #define k_LZMA 0x30101 #define k_BCJ 0x3030103 #define k_BCJ2 0x303011B #define k_PPC 0x3030205 #define k_IA64 0x3030401 #define k_ARM 0x3030501 #define k_ARMT 0x3030701 #define k_SPARC 0x3030805 #ifdef _7ZIP_PPMD_SUPPPORT #define k_PPMD 0x30401 typedef struct { IByteIn p; const Byte *cur; const Byte *end; const Byte *begin; UInt64 processed; Bool extra; SRes res; ILookInStream *inStream; } CByteInToLook; static Byte ReadByte(void *pp) { CByteInToLook *p = (CByteInToLook *)pp; if (p->cur != p->end) return *p->cur++; if (p->res == SZ_OK) { size_t size = p->cur - p->begin; p->processed += size; p->res = p->inStream->Skip(p->inStream, size); size = (1 << 25); p->res = p->inStream->Look(p->inStream, (const void **)&p->begin, &size); p->cur = p->begin; p->end = p->begin + size; if (size != 0) return *p->cur++;; } p->extra = True; return 0; } static SRes SzDecodePpmd(const Byte *props, unsigned propsSize, UInt64 inSize, ILookInStream *inStream, Byte *outBuffer, SizeT outSize, ISzAlloc *allocMain) { CPpmd7 ppmd; CByteInToLook s; SRes res = SZ_OK; s.p.Read = ReadByte; s.inStream = inStream; s.begin = s.end = s.cur = NULL; s.extra = False; s.res = SZ_OK; s.processed = 0; if (propsSize != 5) return SZ_ERROR_UNSUPPORTED; { unsigned order = props[0]; UInt32 memSize = GetUi32(props + 1); if (order < PPMD7_MIN_ORDER || order > PPMD7_MAX_ORDER || memSize < PPMD7_MIN_MEM_SIZE || memSize > PPMD7_MAX_MEM_SIZE) return SZ_ERROR_UNSUPPORTED; Ppmd7_Construct(&ppmd); if (!Ppmd7_Alloc(&ppmd, memSize, allocMain)) return SZ_ERROR_MEM; Ppmd7_Init(&ppmd, order); } { CPpmd7z_RangeDec rc; Ppmd7z_RangeDec_CreateVTable(&rc); rc.Stream = &s.p; if (!Ppmd7z_RangeDec_Init(&rc)) res = SZ_ERROR_DATA; else if (s.extra) res = (s.res != SZ_OK ? s.res : SZ_ERROR_DATA); else { SizeT i; for (i = 0; i < outSize; i++) { int sym = Ppmd7_DecodeSymbol(&ppmd, &rc.p); if (s.extra || sym < 0) break; outBuffer[i] = (Byte)sym; } if (i != outSize) res = (s.res != SZ_OK ? s.res : SZ_ERROR_DATA); else if (s.processed + (s.cur - s.begin) != inSize || !Ppmd7z_RangeDec_IsFinishedOK(&rc)) res = SZ_ERROR_DATA; } } Ppmd7_Free(&ppmd, allocMain); return res; } #endif static SRes SzDecodeLzma(const Byte *props, unsigned propsSize, UInt64 inSize, ILookInStream *inStream, Byte *outBuffer, SizeT outSize, ISzAlloc *allocMain) { CLzmaDec state; SRes res = SZ_OK; LzmaDec_Construct(&state); RINOK(LzmaDec_AllocateProbs(&state, props, propsSize, allocMain)); state.dic = outBuffer; state.dicBufSize = outSize; LzmaDec_Init(&state); for (;;) { const void *inBuf = NULL; size_t lookahead = (1 << 18); if (lookahead > inSize) lookahead = (size_t)inSize; res = inStream->Look(inStream, &inBuf, &lookahead); if (res != SZ_OK) break; { SizeT inProcessed = (SizeT)lookahead, dicPos = state.dicPos; ELzmaStatus status; res = LzmaDec_DecodeToDic(&state, outSize, inBuf, &inProcessed, LZMA_FINISH_END, &status); lookahead -= inProcessed; inSize -= inProcessed; if (res != SZ_OK) break; if (status == LZMA_STATUS_FINISHED_WITH_MARK) { if (outSize != state.dicPos || inSize != 0) res = SZ_ERROR_DATA; break; } if (outSize == state.dicPos && inSize == 0 && status == LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK) break; if (inProcessed == 0 && dicPos == state.dicPos) { res = SZ_ERROR_DATA; break; } res = inStream->Skip((void *)inStream, inProcessed); if (res != SZ_OK) break; } } LzmaDec_FreeProbs(&state, allocMain); return res; } #ifndef _7Z_NO_METHOD_LZMA2 static SRes SzDecodeLzma2(const Byte *props, unsigned propsSize, UInt64 inSize, ILookInStream *inStream, Byte *outBuffer, SizeT outSize, ISzAlloc *allocMain) { CLzma2Dec state; SRes res = SZ_OK; Lzma2Dec_Construct(&state); if (propsSize != 1) return SZ_ERROR_DATA; RINOK(Lzma2Dec_AllocateProbs(&state, props[0], allocMain)); state.decoder.dic = outBuffer; state.decoder.dicBufSize = outSize; Lzma2Dec_Init(&state); for (;;) { const void *inBuf = NULL; size_t lookahead = (1 << 18); if (lookahead > inSize) lookahead = (size_t)inSize; res = inStream->Look(inStream, &inBuf, &lookahead); if (res != SZ_OK) break; { SizeT inProcessed = (SizeT)lookahead, dicPos = state.decoder.dicPos; ELzmaStatus status; res = Lzma2Dec_DecodeToDic(&state, outSize, inBuf, &inProcessed, LZMA_FINISH_END, &status); lookahead -= inProcessed; inSize -= inProcessed; if (res != SZ_OK) break; if (status == LZMA_STATUS_FINISHED_WITH_MARK) { if (outSize != state.decoder.dicPos || inSize != 0) res = SZ_ERROR_DATA; break; } if (inProcessed == 0 && dicPos == state.decoder.dicPos) { res = SZ_ERROR_DATA; break; } res = inStream->Skip((void *)inStream, inProcessed); if (res != SZ_OK) break; } } Lzma2Dec_FreeProbs(&state, allocMain); return res; } #endif static SRes SzDecodeCopy(UInt64 inSize, ILookInStream *inStream, Byte *outBuffer) { while (inSize > 0) { const void *inBuf; size_t curSize = (1 << 18); if (curSize > inSize) curSize = (size_t)inSize; RINOK(inStream->Look(inStream, &inBuf, &curSize)); if (curSize == 0) return SZ_ERROR_INPUT_EOF; memcpy(outBuffer, inBuf, curSize); outBuffer += curSize; inSize -= curSize; RINOK(inStream->Skip((void *)inStream, curSize)); } return SZ_OK; } static Bool IS_MAIN_METHOD(UInt32 m) { switch (m) { case k_Copy: case k_LZMA: #ifndef _7Z_NO_METHOD_LZMA2 case k_LZMA2: #endif #ifdef _7ZIP_PPMD_SUPPPORT case k_PPMD: #endif return True; } return False; } static Bool IS_SUPPORTED_CODER(const CSzCoderInfo *c) { return c->NumStreams == 1 /* && c->MethodID <= (UInt32)0xFFFFFFFF */ && IS_MAIN_METHOD((UInt32)c->MethodID); } #define IS_BCJ2(c) ((c)->MethodID == k_BCJ2 && (c)->NumStreams == 4) static SRes CheckSupportedFolder(const CSzFolder *f) { if (f->NumCoders < 1 || f->NumCoders > 4) return SZ_ERROR_UNSUPPORTED; if (!IS_SUPPORTED_CODER(&f->Coders[0])) return SZ_ERROR_UNSUPPORTED; if (f->NumCoders == 1) { if (f->NumPackStreams != 1 || f->PackStreams[0] != 0 || f->NumBonds != 0) return SZ_ERROR_UNSUPPORTED; return SZ_OK; } #ifndef _7Z_NO_METHODS_FILTERS if (f->NumCoders == 2) { const CSzCoderInfo *c = &f->Coders[1]; if ( /* c->MethodID > (UInt32)0xFFFFFFFF || */ c->NumStreams != 1 || f->NumPackStreams != 1 || f->PackStreams[0] != 0 || f->NumBonds != 1 || f->Bonds[0].InIndex != 1 || f->Bonds[0].OutIndex != 0) return SZ_ERROR_UNSUPPORTED; switch ((UInt32)c->MethodID) { case k_Delta: case k_BCJ: case k_PPC: case k_IA64: case k_SPARC: case k_ARM: case k_ARMT: break; default: return SZ_ERROR_UNSUPPORTED; } return SZ_OK; } #endif if (f->NumCoders == 4) { if (!IS_SUPPORTED_CODER(&f->Coders[1]) || !IS_SUPPORTED_CODER(&f->Coders[2]) || !IS_BCJ2(&f->Coders[3])) return SZ_ERROR_UNSUPPORTED; if (f->NumPackStreams != 4 || f->PackStreams[0] != 2 || f->PackStreams[1] != 6 || f->PackStreams[2] != 1 || f->PackStreams[3] != 0 || f->NumBonds != 3 || f->Bonds[0].InIndex != 5 || f->Bonds[0].OutIndex != 0 || f->Bonds[1].InIndex != 4 || f->Bonds[1].OutIndex != 1 || f->Bonds[2].InIndex != 3 || f->Bonds[2].OutIndex != 2) return SZ_ERROR_UNSUPPORTED; return SZ_OK; } return SZ_ERROR_UNSUPPORTED; } #define CASE_BRA_CONV(isa) case k_ ## isa: isa ## _Convert(outBuffer, outSize, 0, 0); break; static SRes SzFolder_Decode2(const CSzFolder *folder, const Byte *propsData, const UInt64 *unpackSizes, const UInt64 *packPositions, ILookInStream *inStream, UInt64 startPos, Byte *outBuffer, SizeT outSize, ISzAlloc *allocMain, Byte *tempBuf[]) { UInt32 ci; SizeT tempSizes[3] = { 0, 0, 0}; SizeT tempSize3 = 0; Byte *tempBuf3 = 0; RINOK(CheckSupportedFolder(folder)); for (ci = 0; ci < folder->NumCoders; ci++) { const CSzCoderInfo *coder = &folder->Coders[ci]; if (IS_MAIN_METHOD((UInt32)coder->MethodID)) { UInt32 si = 0; UInt64 offset; UInt64 inSize; Byte *outBufCur = outBuffer; SizeT outSizeCur = outSize; if (folder->NumCoders == 4) { UInt32 indices[] = { 3, 2, 0 }; UInt64 unpackSize = unpackSizes[ci]; si = indices[ci]; if (ci < 2) { Byte *temp; outSizeCur = (SizeT)unpackSize; if (outSizeCur != unpackSize) return SZ_ERROR_MEM; temp = (Byte *)IAlloc_Alloc(allocMain, outSizeCur); if (!temp && outSizeCur != 0) return SZ_ERROR_MEM; outBufCur = tempBuf[1 - ci] = temp; tempSizes[1 - ci] = outSizeCur; } else if (ci == 2) { if (unpackSize > outSize) /* check it */ return SZ_ERROR_PARAM; tempBuf3 = outBufCur = outBuffer + (outSize - (size_t)unpackSize); tempSize3 = outSizeCur = (SizeT)unpackSize; } else return SZ_ERROR_UNSUPPORTED; } offset = packPositions[si]; inSize = packPositions[si + 1] - offset; RINOK(LookInStream_SeekTo(inStream, startPos + offset)); if (coder->MethodID == k_Copy) { if (inSize != outSizeCur) /* check it */ return SZ_ERROR_DATA; RINOK(SzDecodeCopy(inSize, inStream, outBufCur)); } else if (coder->MethodID == k_LZMA) { RINOK(SzDecodeLzma(propsData + coder->PropsOffset, coder->PropsSize, inSize, inStream, outBufCur, outSizeCur, allocMain)); } #ifndef _7Z_NO_METHOD_LZMA2 else if (coder->MethodID == k_LZMA2) { RINOK(SzDecodeLzma2(propsData + coder->PropsOffset, coder->PropsSize, inSize, inStream, outBufCur, outSizeCur, allocMain)); } #endif #ifdef _7ZIP_PPMD_SUPPPORT else if (coder->MethodID == k_PPMD) { RINOK(SzDecodePpmd(propsData + coder->PropsOffset, coder->PropsSize, inSize, inStream, outBufCur, outSizeCur, allocMain)); } #endif else return SZ_ERROR_UNSUPPORTED; } else if (coder->MethodID == k_BCJ2) { UInt64 offset = packPositions[1]; UInt64 s3Size = packPositions[2] - offset; if (ci != 3) return SZ_ERROR_UNSUPPORTED; tempSizes[2] = (SizeT)s3Size; if (tempSizes[2] != s3Size) return SZ_ERROR_MEM; tempBuf[2] = (Byte *)IAlloc_Alloc(allocMain, tempSizes[2]); if (!tempBuf[2] && tempSizes[2] != 0) return SZ_ERROR_MEM; RINOK(LookInStream_SeekTo(inStream, startPos + offset)); RINOK(SzDecodeCopy(s3Size, inStream, tempBuf[2])); if ((tempSizes[0] & 3) != 0 || (tempSizes[1] & 3) != 0 || tempSize3 + tempSizes[0] + tempSizes[1] != outSize) return SZ_ERROR_DATA; { CBcj2Dec p; p.bufs[0] = tempBuf3; p.lims[0] = tempBuf3 + tempSize3; p.bufs[1] = tempBuf[0]; p.lims[1] = tempBuf[0] + tempSizes[0]; p.bufs[2] = tempBuf[1]; p.lims[2] = tempBuf[1] + tempSizes[1]; p.bufs[3] = tempBuf[2]; p.lims[3] = tempBuf[2] + tempSizes[2]; p.dest = outBuffer; p.destLim = outBuffer + outSize; Bcj2Dec_Init(&p); RINOK(Bcj2Dec_Decode(&p)); { unsigned i; for (i = 0; i < 4; i++) if (p.bufs[i] != p.lims[i]) return SZ_ERROR_DATA; if (!Bcj2Dec_IsFinished(&p)) return SZ_ERROR_DATA; if (p.dest != p.destLim || p.state != BCJ2_STREAM_MAIN) return SZ_ERROR_DATA; } } } #ifndef _7Z_NO_METHODS_FILTERS else if (ci == 1) { if (coder->MethodID == k_Delta) { if (coder->PropsSize != 1) return SZ_ERROR_UNSUPPORTED; { Byte state[DELTA_STATE_SIZE]; Delta_Init(state); Delta_Decode(state, (unsigned)(propsData[coder->PropsOffset]) + 1, outBuffer, outSize); } } else { if (coder->PropsSize != 0) return SZ_ERROR_UNSUPPORTED; switch (coder->MethodID) { case k_BCJ: { UInt32 state; x86_Convert_Init(state); x86_Convert(outBuffer, outSize, 0, &state, 0); break; } CASE_BRA_CONV(PPC) CASE_BRA_CONV(IA64) CASE_BRA_CONV(SPARC) CASE_BRA_CONV(ARM) CASE_BRA_CONV(ARMT) default: return SZ_ERROR_UNSUPPORTED; } } } #endif else return SZ_ERROR_UNSUPPORTED; } return SZ_OK; } static SRes SzAr_DecodeFolder(const CSzAr *p, UInt32 folderIndex, ILookInStream *inStream, UInt64 startPos, Byte *outBuffer, size_t outSize, ISzAlloc *allocMain) { SRes res; CSzFolder folder; CSzData sd; const Byte *data = p->CodersData + p->FoCodersOffsets[folderIndex]; sd.Data = data; sd.Size = p->FoCodersOffsets[folderIndex + 1] - p->FoCodersOffsets[folderIndex]; res = SzGetNextFolderItem(&folder, &sd); if (res != SZ_OK) return res; if (sd.Size != 0 || folder.UnpackStream != p->FoToMainUnpackSizeIndex[folderIndex] || outSize != SzAr_GetFolderUnpackSize(p, folderIndex)) return SZ_ERROR_FAIL; { unsigned i; Byte *tempBuf[3] = { 0, 0, 0}; res = SzFolder_Decode2(&folder, data, &p->CoderUnpackSizes[p->FoToCoderUnpackSizes[folderIndex]], p->PackPositions + p->FoStartPackStreamIndex[folderIndex], inStream, startPos, outBuffer, (SizeT)outSize, allocMain, tempBuf); for (i = 0; i < 3; i++) IAlloc_Free(allocMain, tempBuf[i]); if (res == SZ_OK) if (SzBitWithVals_Check(&p->FolderCRCs, folderIndex)) if (CrcCalc(outBuffer, outSize) != p->FolderCRCs.Vals[folderIndex]) res = SZ_ERROR_CRC; return res; } } /* Bcj2.c -- BCJ2 Decoder (Converter for x86 code) 2015-08-01 : Igor Pavlov : Public domain */ /* #include "Precomp.h" #include "Bcj2.h" #include "CpuArch.h" */ #define CProb UInt16 #define kTopValue ((UInt32)1 << 24) #define kNumModelBits 11 #define kBitModelTotal (1 << kNumModelBits) #define kNumMoveBits 5 #define _IF_BIT_0 ttt = *prob; bound = (p->range >> kNumModelBits) * ttt; if (p->code < bound) #define _UPDATE_0 p->range = bound; *prob = (CProb)(ttt + ((kBitModelTotal - ttt) >> kNumMoveBits)); #define _UPDATE_1 p->range -= bound; p->code -= bound; *prob = (CProb)(ttt - (ttt >> kNumMoveBits)); static void Bcj2Dec_Init(CBcj2Dec *p) { unsigned i; p->state = BCJ2_DEC_STATE_OK; p->ip = 0; p->temp[3] = 0; p->range = 0; p->code = 0; for (i = 0; i < sizeof(p->probs) / sizeof(p->probs[0]); i++) p->probs[i] = kBitModelTotal >> 1; } static SRes Bcj2Dec_Decode(CBcj2Dec *p) { if (p->range <= 5) { p->state = BCJ2_DEC_STATE_OK; for (; p->range != 5; p->range++) { if (p->range == 1 && p->code != 0) return SZ_ERROR_DATA; if (p->bufs[BCJ2_STREAM_RC] == p->lims[BCJ2_STREAM_RC]) { p->state = BCJ2_STREAM_RC; return SZ_OK; } p->code = (p->code << 8) | *(p->bufs[BCJ2_STREAM_RC])++; } if (p->code == 0xFFFFFFFF) return SZ_ERROR_DATA; p->range = 0xFFFFFFFF; } else if (p->state >= BCJ2_DEC_STATE_ORIG_0) { while (p->state <= BCJ2_DEC_STATE_ORIG_3) { Byte *dest = p->dest; if (dest == p->destLim) return SZ_OK; *dest = p->temp[p->state++ - BCJ2_DEC_STATE_ORIG_0]; p->dest = dest + 1; } } /* if (BCJ2_IS_32BIT_STREAM(p->state)) { const Byte *cur = p->bufs[p->state]; if (cur == p->lims[p->state]) return SZ_OK; p->bufs[p->state] = cur + 4; { UInt32 val; Byte *dest; SizeT rem; p->ip += 4; val = GetBe32(cur) - p->ip; dest = p->dest; rem = p->destLim - dest; if (rem < 4) { SizeT i; SetUi32(p->temp, val); for (i = 0; i < rem; i++) dest[i] = p->temp[i]; p->dest = dest + rem; p->state = BCJ2_DEC_STATE_ORIG_0 + (unsigned)rem; return SZ_OK; } SetUi32(dest, val); p->temp[3] = (Byte)(val >> 24); p->dest = dest + 4; p->state = BCJ2_DEC_STATE_OK; } } */ for (;;) { if (BCJ2_IS_32BIT_STREAM(p->state)) p->state = BCJ2_DEC_STATE_OK; else { if (p->range < kTopValue) { if (p->bufs[BCJ2_STREAM_RC] == p->lims[BCJ2_STREAM_RC]) { p->state = BCJ2_STREAM_RC; return SZ_OK; } p->range <<= 8; p->code = (p->code << 8) | *(p->bufs[BCJ2_STREAM_RC])++; } { const Byte *src = p->bufs[BCJ2_STREAM_MAIN]; const Byte *srcLim; Byte *dest; SizeT num = p->lims[BCJ2_STREAM_MAIN] - src; if (num == 0) { p->state = BCJ2_STREAM_MAIN; return SZ_OK; } dest = p->dest; if (num > (SizeT)(p->destLim - dest)) { num = p->destLim - dest; if (num == 0) { p->state = BCJ2_DEC_STATE_ORIG; return SZ_OK; } } srcLim = src + num; if (p->temp[3] == 0x0F && (src[0] & 0xF0) == 0x80) *dest = src[0]; else for (;;) { Byte b = *src; *dest = b; if (b != 0x0F) { if ((b & 0xFE) == 0xE8) break; dest++; if (++src != srcLim) continue; break; } dest++; if (++src == srcLim) break; if ((*src & 0xF0) != 0x80) continue; *dest = *src; break; } num = src - p->bufs[BCJ2_STREAM_MAIN]; if (src == srcLim) { p->temp[3] = src[-1]; p->bufs[BCJ2_STREAM_MAIN] = src; p->ip += (UInt32)num; p->dest += num; p->state = p->bufs[BCJ2_STREAM_MAIN] == p->lims[BCJ2_STREAM_MAIN] ? (unsigned)BCJ2_STREAM_MAIN : (unsigned)BCJ2_DEC_STATE_ORIG; return SZ_OK; } { UInt32 bound, ttt; CProb *prob; Byte b = src[0]; Byte prev = (Byte)(num == 0 ? p->temp[3] : src[-1]); p->temp[3] = b; p->bufs[BCJ2_STREAM_MAIN] = src + 1; num++; p->ip += (UInt32)num; p->dest += num; prob = p->probs + (unsigned)(b == 0xE8 ? 2 + (unsigned)prev : (b == 0xE9 ? 1 : 0)); _IF_BIT_0 { _UPDATE_0 continue; } _UPDATE_1 } } } { UInt32 val; unsigned cj = (p->temp[3] == 0xE8) ? BCJ2_STREAM_CALL : BCJ2_STREAM_JUMP; const Byte *cur = p->bufs[cj]; Byte *dest; SizeT rem; if (cur == p->lims[cj]) { p->state = cj; break; } val = GetBe32(cur); p->bufs[cj] = cur + 4; p->ip += 4; val -= p->ip; dest = p->dest; rem = p->destLim - dest; if (rem < 4) { SizeT i; SetUi32(p->temp, val); for (i = 0; i < rem; i++) dest[i] = p->temp[i]; p->dest = dest + rem; p->state = BCJ2_DEC_STATE_ORIG_0 + (unsigned)rem; break; } SetUi32(dest, val); p->temp[3] = (Byte)(val >> 24); p->dest = dest + 4; } } if (p->range < kTopValue && p->bufs[BCJ2_STREAM_RC] != p->lims[BCJ2_STREAM_RC]) { p->range <<= 8; p->code = (p->code << 8) | *(p->bufs[BCJ2_STREAM_RC])++; } return SZ_OK; } #undef kTopValue /* reused later. --ryan. */ #undef kBitModelTotal /* reused later. --ryan. */ /* Bra.c -- Converters for RISC code 2010-04-16 : Igor Pavlov : Public domain */ /* #include "Precomp.h" #include "Bra.h" */ static SizeT ARM_Convert(Byte *data, SizeT size, UInt32 ip, int encoding) { SizeT i; if (size < 4) return 0; size -= 4; ip += 8; for (i = 0; i <= size; i += 4) { if (data[i + 3] == 0xEB) { UInt32 dest; UInt32 src = ((UInt32)data[i + 2] << 16) | ((UInt32)data[i + 1] << 8) | (data[i + 0]); src <<= 2; if (encoding) dest = ip + (UInt32)i + src; else dest = src - (ip + (UInt32)i); dest >>= 2; data[i + 2] = (Byte)(dest >> 16); data[i + 1] = (Byte)(dest >> 8); data[i + 0] = (Byte)dest; } } return i; } static SizeT ARMT_Convert(Byte *data, SizeT size, UInt32 ip, int encoding) { SizeT i; if (size < 4) return 0; size -= 4; ip += 4; for (i = 0; i <= size; i += 2) { if ((data[i + 1] & 0xF8) == 0xF0 && (data[i + 3] & 0xF8) == 0xF8) { UInt32 dest; UInt32 src = (((UInt32)data[i + 1] & 0x7) << 19) | ((UInt32)data[i + 0] << 11) | (((UInt32)data[i + 3] & 0x7) << 8) | (data[i + 2]); src <<= 1; if (encoding) dest = ip + (UInt32)i + src; else dest = src - (ip + (UInt32)i); dest >>= 1; data[i + 1] = (Byte)(0xF0 | ((dest >> 19) & 0x7)); data[i + 0] = (Byte)(dest >> 11); data[i + 3] = (Byte)(0xF8 | ((dest >> 8) & 0x7)); data[i + 2] = (Byte)dest; i += 2; } } return i; } static SizeT PPC_Convert(Byte *data, SizeT size, UInt32 ip, int encoding) { SizeT i; if (size < 4) return 0; size -= 4; for (i = 0; i <= size; i += 4) { if ((data[i] >> 2) == 0x12 && (data[i + 3] & 3) == 1) { UInt32 src = ((UInt32)(data[i + 0] & 3) << 24) | ((UInt32)data[i + 1] << 16) | ((UInt32)data[i + 2] << 8) | ((UInt32)data[i + 3] & (~3)); UInt32 dest; if (encoding) dest = ip + (UInt32)i + src; else dest = src - (ip + (UInt32)i); data[i + 0] = (Byte)(0x48 | ((dest >> 24) & 0x3)); data[i + 1] = (Byte)(dest >> 16); data[i + 2] = (Byte)(dest >> 8); data[i + 3] &= 0x3; data[i + 3] |= dest; } } return i; } static SizeT SPARC_Convert(Byte *data, SizeT size, UInt32 ip, int encoding) { UInt32 i; if (size < 4) return 0; size -= 4; for (i = 0; i <= size; i += 4) { if ((data[i] == 0x40 && (data[i + 1] & 0xC0) == 0x00) || (data[i] == 0x7F && (data[i + 1] & 0xC0) == 0xC0)) { UInt32 src = ((UInt32)data[i + 0] << 24) | ((UInt32)data[i + 1] << 16) | ((UInt32)data[i + 2] << 8) | ((UInt32)data[i + 3]); UInt32 dest; src <<= 2; if (encoding) dest = ip + i + src; else dest = src - (ip + i); dest >>= 2; dest = (((0 - ((dest >> 22) & 1)) << 22) & 0x3FFFFFFF) | (dest & 0x3FFFFF) | 0x40000000; data[i + 0] = (Byte)(dest >> 24); data[i + 1] = (Byte)(dest >> 16); data[i + 2] = (Byte)(dest >> 8); data[i + 3] = (Byte)dest; } } return i; } /* Bra86.c -- Converter for x86 code (BCJ) 2013-11-12 : Igor Pavlov : Public domain */ /* #include "Precomp.h" #include "Bra.h" */ #define Test86MSByte(b) ((((b) + 1) & 0xFE) == 0) static SizeT x86_Convert(Byte *data, SizeT size, UInt32 ip, UInt32 *state, int encoding) { SizeT pos = 0; UInt32 mask = *state & 7; if (size < 5) return 0; size -= 4; ip += 5; for (;;) { Byte *p = data + pos; const Byte *limit = data + size; for (; p < limit; p++) if ((*p & 0xFE) == 0xE8) break; { SizeT d = (SizeT)(p - data - pos); pos = (SizeT)(p - data); if (p >= limit) { *state = (d > 2 ? 0 : mask >> (unsigned)d); return pos; } if (d > 2) mask = 0; else { mask >>= (unsigned)d; if (mask != 0 && (mask > 4 || mask == 3 || Test86MSByte(p[(mask >> 1) + 1]))) { mask = (mask >> 1) | 4; pos++; continue; } } } if (Test86MSByte(p[4])) { UInt32 v = ((UInt32)p[4] << 24) | ((UInt32)p[3] << 16) | ((UInt32)p[2] << 8) | ((UInt32)p[1]); UInt32 cur = ip + (UInt32)pos; pos += 5; if (encoding) v += cur; else v -= cur; if (mask != 0) { unsigned sh = (mask & 6) << 2; if (Test86MSByte((Byte)(v >> sh))) { v ^= (((UInt32)0x100 << sh) - 1); if (encoding) v += cur; else v -= cur; } mask = 0; } p[1] = (Byte)v; p[2] = (Byte)(v >> 8); p[3] = (Byte)(v >> 16); p[4] = (Byte)(0 - ((v >> 24) & 1)); } else { mask = (mask >> 1) | 4; pos++; } } } /* BraIA64.c -- Converter for IA-64 code 2013-11-12 : Igor Pavlov : Public domain */ /* #include "Precomp.h" #include "Bra.h" */ static const Byte kBranchTable[32] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 6, 6, 0, 0, 7, 7, 4, 4, 0, 0, 4, 4, 0, 0 }; static SizeT IA64_Convert(Byte *data, SizeT size, UInt32 ip, int encoding) { SizeT i; if (size < 16) return 0; size -= 16; for (i = 0; i <= size; i += 16) { UInt32 instrTemplate = data[i] & 0x1F; UInt32 mask = kBranchTable[instrTemplate]; UInt32 bitPos = 5; int slot; for (slot = 0; slot < 3; slot++, bitPos += 41) { UInt32 bytePos, bitRes; UInt64 instruction, instNorm; int j; if (((mask >> slot) & 1) == 0) continue; bytePos = (bitPos >> 3); bitRes = bitPos & 0x7; instruction = 0; for (j = 0; j < 6; j++) instruction += (UInt64)data[i + j + bytePos] << (8 * j); instNorm = instruction >> bitRes; if (((instNorm >> 37) & 0xF) == 0x5 && ((instNorm >> 9) & 0x7) == 0) { UInt32 src = (UInt32)((instNorm >> 13) & 0xFFFFF); UInt32 dest; src |= ((UInt32)(instNorm >> 36) & 1) << 20; src <<= 4; if (encoding) dest = ip + (UInt32)i + src; else dest = src - (ip + (UInt32)i); dest >>= 4; instNorm &= ~((UInt64)(0x8FFFFF) << 13); instNorm |= ((UInt64)(dest & 0xFFFFF) << 13); instNorm |= ((UInt64)(dest & 0x100000) << (36 - 20)); instruction &= (1 << bitRes) - 1; instruction |= (instNorm << bitRes); for (j = 0; j < 6; j++) data[i + j + bytePos] = (Byte)(instruction >> (8 * j)); } } } return i; } /* Delta.c -- Delta converter 2009-05-26 : Igor Pavlov : Public domain */ /* #include "Precomp.h" #include "Delta.h" */ static void Delta_Init(Byte *state) { unsigned i; for (i = 0; i < DELTA_STATE_SIZE; i++) state[i] = 0; } static void MyMemCpy(Byte *dest, const Byte *src, unsigned size) { unsigned i; for (i = 0; i < size; i++) dest[i] = src[i]; } static void Delta_Decode(Byte *state, unsigned delta, Byte *data, SizeT size) { Byte buf[DELTA_STATE_SIZE]; unsigned j = 0; MyMemCpy(buf, state, delta); { SizeT i; for (i = 0; i < size;) { for (j = 0; j < delta && i < size; i++, j++) { buf[j] = data[i] = (Byte)(buf[j] + data[i]); } } } if (j == delta) j = 0; MyMemCpy(state, buf + j, delta - j); MyMemCpy(state + delta - j, buf, j); } /* LzmaDec.c -- LZMA Decoder 2016-05-16 : Igor Pavlov : Public domain */ /* #include "Precomp.h" #include "LzmaDec.h" #include */ #define kNumTopBits 24 #define kTopValue ((UInt32)1 << kNumTopBits) #define kNumBitModelTotalBits 11 #define kBitModelTotal (1 << kNumBitModelTotalBits) #define kNumMoveBits 5 #define RC_INIT_SIZE 5 #define NORMALIZE if (range < kTopValue) { range <<= 8; code = (code << 8) | (*buf++); } #define IF_BIT_0(p) ttt = *(p); NORMALIZE; bound = (range >> kNumBitModelTotalBits) * ttt; if (code < bound) #define UPDATE_0(p) range = bound; *(p) = (CLzmaProb)(ttt + ((kBitModelTotal - ttt) >> kNumMoveBits)); #define UPDATE_1(p) range -= bound; code -= bound; *(p) = (CLzmaProb)(ttt - (ttt >> kNumMoveBits)); #define GET_BIT2(p, i, A0, A1) IF_BIT_0(p) \ { UPDATE_0(p); i = (i + i); A0; } else \ { UPDATE_1(p); i = (i + i) + 1; A1; } #define GET_BIT(p, i) GET_BIT2(p, i, ; , ;) #define TREE_GET_BIT(probs, i) { GET_BIT((probs + i), i); } #define TREE_DECODE(probs, limit, i) \ { i = 1; do { TREE_GET_BIT(probs, i); } while (i < limit); i -= limit; } /* #define _LZMA_SIZE_OPT */ #ifdef _LZMA_SIZE_OPT #define TREE_6_DECODE(probs, i) TREE_DECODE(probs, (1 << 6), i) #else #define TREE_6_DECODE(probs, i) \ { i = 1; \ TREE_GET_BIT(probs, i); \ TREE_GET_BIT(probs, i); \ TREE_GET_BIT(probs, i); \ TREE_GET_BIT(probs, i); \ TREE_GET_BIT(probs, i); \ TREE_GET_BIT(probs, i); \ i -= 0x40; } #endif #define NORMAL_LITER_DEC GET_BIT(prob + symbol, symbol) #define MATCHED_LITER_DEC \ matchByte <<= 1; \ bit = (matchByte & offs); \ probLit = prob + offs + bit + symbol; \ GET_BIT2(probLit, symbol, offs &= ~bit, offs &= bit) #define NORMALIZE_CHECK if (range < kTopValue) { if (buf >= bufLimit) return DUMMY_ERROR; range <<= 8; code = (code << 8) | (*buf++); } #define IF_BIT_0_CHECK(p) ttt = *(p); NORMALIZE_CHECK; bound = (range >> kNumBitModelTotalBits) * ttt; if (code < bound) #define UPDATE_0_CHECK range = bound; #define UPDATE_1_CHECK range -= bound; code -= bound; #define GET_BIT2_CHECK(p, i, A0, A1) IF_BIT_0_CHECK(p) \ { UPDATE_0_CHECK; i = (i + i); A0; } else \ { UPDATE_1_CHECK; i = (i + i) + 1; A1; } #define GET_BIT_CHECK(p, i) GET_BIT2_CHECK(p, i, ; , ;) #define TREE_DECODE_CHECK(probs, limit, i) \ { i = 1; do { GET_BIT_CHECK(probs + i, i) } while (i < limit); i -= limit; } #define kNumPosBitsMax 4 #define kNumPosStatesMax (1 << kNumPosBitsMax) #define kLenNumLowBits 3 #define kLenNumLowSymbols (1 << kLenNumLowBits) #define kLenNumMidBits 3 #define kLenNumMidSymbols (1 << kLenNumMidBits) #define kLenNumHighBits 8 #define kLenNumHighSymbols (1 << kLenNumHighBits) #define LenChoice 0 #define LenChoice2 (LenChoice + 1) #define LenLow (LenChoice2 + 1) #define LenMid (LenLow + (kNumPosStatesMax << kLenNumLowBits)) #define LenHigh (LenMid + (kNumPosStatesMax << kLenNumMidBits)) #define kNumLenProbs (LenHigh + kLenNumHighSymbols) #define kNumStates 12 #define kNumLitStates 7 #define kStartPosModelIndex 4 #define kEndPosModelIndex 14 #define kNumFullDistances (1 << (kEndPosModelIndex >> 1)) #define kNumPosSlotBits 6 #define kNumLenToPosStates 4 #define kNumAlignBits 4 #define kAlignTableSize (1 << kNumAlignBits) #define kMatchMinLen 2 #define kMatchSpecLenStart (kMatchMinLen + kLenNumLowSymbols + kLenNumMidSymbols + kLenNumHighSymbols) #define IsMatch 0 #define IsRep (IsMatch + (kNumStates << kNumPosBitsMax)) #define IsRepG0 (IsRep + kNumStates) #define IsRepG1 (IsRepG0 + kNumStates) #define IsRepG2 (IsRepG1 + kNumStates) #define IsRep0Long (IsRepG2 + kNumStates) #define PosSlot (IsRep0Long + (kNumStates << kNumPosBitsMax)) #define SpecPos (PosSlot + (kNumLenToPosStates << kNumPosSlotBits)) #define Align (SpecPos + kNumFullDistances - kEndPosModelIndex) #define LenCoder (Align + kAlignTableSize) #define RepLenCoder (LenCoder + kNumLenProbs) #define Literal (RepLenCoder + kNumLenProbs) #define LZMA_BASE_SIZE 1846 #define LZMA_LIT_SIZE 0x300 #if Literal != LZMA_BASE_SIZE StopCompilingDueBUG #endif #define LzmaProps_GetNumProbs(p) (Literal + ((UInt32)LZMA_LIT_SIZE << ((p)->lc + (p)->lp))) #define LZMA_DIC_MIN (1 << 12) /* First LZMA-symbol is always decoded. And it decodes new LZMA-symbols while (buf < bufLimit), but "buf" is without last normalization Out: Result: SZ_OK - OK SZ_ERROR_DATA - Error p->remainLen: < kMatchSpecLenStart : normal remain = kMatchSpecLenStart : finished = kMatchSpecLenStart + 1 : Flush marker (unused now) = kMatchSpecLenStart + 2 : State Init Marker (unused now) */ static int MY_FAST_CALL LzmaDec_DecodeReal(CLzmaDec *p, SizeT limit, const Byte *bufLimit) { CLzmaProb *probs = p->probs; unsigned state = p->state; UInt32 rep0 = p->reps[0], rep1 = p->reps[1], rep2 = p->reps[2], rep3 = p->reps[3]; unsigned pbMask = ((unsigned)1 << (p->prop.pb)) - 1; unsigned lpMask = ((unsigned)1 << (p->prop.lp)) - 1; unsigned lc = p->prop.lc; Byte *dic = p->dic; SizeT dicBufSize = p->dicBufSize; SizeT dicPos = p->dicPos; UInt32 processedPos = p->processedPos; UInt32 checkDicSize = p->checkDicSize; unsigned len = 0; const Byte *buf = p->buf; UInt32 range = p->range; UInt32 code = p->code; do { CLzmaProb *prob; UInt32 bound; unsigned ttt; unsigned posState = processedPos & pbMask; prob = probs + IsMatch + (state << kNumPosBitsMax) + posState; IF_BIT_0(prob) { unsigned symbol; UPDATE_0(prob); prob = probs + Literal; if (processedPos != 0 || checkDicSize != 0) prob += ((UInt32)LZMA_LIT_SIZE * (((processedPos & lpMask) << lc) + (dic[(dicPos == 0 ? dicBufSize : dicPos) - 1] >> (8 - lc)))); processedPos++; if (state < kNumLitStates) { state -= (state < 4) ? state : 3; symbol = 1; #ifdef _LZMA_SIZE_OPT do { NORMAL_LITER_DEC } while (symbol < 0x100); #else NORMAL_LITER_DEC NORMAL_LITER_DEC NORMAL_LITER_DEC NORMAL_LITER_DEC NORMAL_LITER_DEC NORMAL_LITER_DEC NORMAL_LITER_DEC NORMAL_LITER_DEC #endif } else { unsigned matchByte = dic[dicPos - rep0 + (dicPos < rep0 ? dicBufSize : 0)]; unsigned offs = 0x100; state -= (state < 10) ? 3 : 6; symbol = 1; #ifdef _LZMA_SIZE_OPT do { unsigned bit; CLzmaProb *probLit; MATCHED_LITER_DEC } while (symbol < 0x100); #else { unsigned bit; CLzmaProb *probLit; MATCHED_LITER_DEC MATCHED_LITER_DEC MATCHED_LITER_DEC MATCHED_LITER_DEC MATCHED_LITER_DEC MATCHED_LITER_DEC MATCHED_LITER_DEC MATCHED_LITER_DEC } #endif } dic[dicPos++] = (Byte)symbol; continue; } { UPDATE_1(prob); prob = probs + IsRep + state; IF_BIT_0(prob) { UPDATE_0(prob); state += kNumStates; prob = probs + LenCoder; } else { UPDATE_1(prob); if (checkDicSize == 0 && processedPos == 0) return SZ_ERROR_DATA; prob = probs + IsRepG0 + state; IF_BIT_0(prob) { UPDATE_0(prob); prob = probs + IsRep0Long + (state << kNumPosBitsMax) + posState; IF_BIT_0(prob) { UPDATE_0(prob); dic[dicPos] = dic[dicPos - rep0 + (dicPos < rep0 ? dicBufSize : 0)]; dicPos++; processedPos++; state = state < kNumLitStates ? 9 : 11; continue; } UPDATE_1(prob); } else { UInt32 distance; UPDATE_1(prob); prob = probs + IsRepG1 + state; IF_BIT_0(prob) { UPDATE_0(prob); distance = rep1; } else { UPDATE_1(prob); prob = probs + IsRepG2 + state; IF_BIT_0(prob) { UPDATE_0(prob); distance = rep2; } else { UPDATE_1(prob); distance = rep3; rep3 = rep2; } rep2 = rep1; } rep1 = rep0; rep0 = distance; } state = state < kNumLitStates ? 8 : 11; prob = probs + RepLenCoder; } #ifdef _LZMA_SIZE_OPT { unsigned lim, offset; CLzmaProb *probLen = prob + LenChoice; IF_BIT_0(probLen) { UPDATE_0(probLen); probLen = prob + LenLow + (posState << kLenNumLowBits); offset = 0; lim = (1 << kLenNumLowBits); } else { UPDATE_1(probLen); probLen = prob + LenChoice2; IF_BIT_0(probLen) { UPDATE_0(probLen); probLen = prob + LenMid + (posState << kLenNumMidBits); offset = kLenNumLowSymbols; lim = (1 << kLenNumMidBits); } else { UPDATE_1(probLen); probLen = prob + LenHigh; offset = kLenNumLowSymbols + kLenNumMidSymbols; lim = (1 << kLenNumHighBits); } } TREE_DECODE(probLen, lim, len); len += offset; } #else { CLzmaProb *probLen = prob + LenChoice; IF_BIT_0(probLen) { UPDATE_0(probLen); probLen = prob + LenLow + (posState << kLenNumLowBits); len = 1; TREE_GET_BIT(probLen, len); TREE_GET_BIT(probLen, len); TREE_GET_BIT(probLen, len); len -= 8; } else { UPDATE_1(probLen); probLen = prob + LenChoice2; IF_BIT_0(probLen) { UPDATE_0(probLen); probLen = prob + LenMid + (posState << kLenNumMidBits); len = 1; TREE_GET_BIT(probLen, len); TREE_GET_BIT(probLen, len); TREE_GET_BIT(probLen, len); } else { UPDATE_1(probLen); probLen = prob + LenHigh; TREE_DECODE(probLen, (1 << kLenNumHighBits), len); len += kLenNumLowSymbols + kLenNumMidSymbols; } } } #endif if (state >= kNumStates) { UInt32 distance; prob = probs + PosSlot + ((len < kNumLenToPosStates ? len : kNumLenToPosStates - 1) << kNumPosSlotBits); TREE_6_DECODE(prob, distance); if (distance >= kStartPosModelIndex) { unsigned posSlot = (unsigned)distance; unsigned numDirectBits = (unsigned)(((distance >> 1) - 1)); distance = (2 | (distance & 1)); if (posSlot < kEndPosModelIndex) { distance <<= numDirectBits; prob = probs + SpecPos + distance - posSlot - 1; { UInt32 mask = 1; unsigned i = 1; do { GET_BIT2(prob + i, i, ; , distance |= mask); mask <<= 1; } while (--numDirectBits != 0); } } else { numDirectBits -= kNumAlignBits; do { NORMALIZE range >>= 1; { UInt32 t; code -= range; t = (0 - ((UInt32)code >> 31)); /* (UInt32)((Int32)code >> 31) */ distance = (distance << 1) + (t + 1); code += range & t; } /* distance <<= 1; if (code >= range) { code -= range; distance |= 1; } */ } while (--numDirectBits != 0); prob = probs + Align; distance <<= kNumAlignBits; { unsigned i = 1; GET_BIT2(prob + i, i, ; , distance |= 1); GET_BIT2(prob + i, i, ; , distance |= 2); GET_BIT2(prob + i, i, ; , distance |= 4); GET_BIT2(prob + i, i, ; , distance |= 8); } if (distance == (UInt32)0xFFFFFFFF) { len += kMatchSpecLenStart; state -= kNumStates; break; } } } rep3 = rep2; rep2 = rep1; rep1 = rep0; rep0 = distance + 1; if (checkDicSize == 0) { if (distance >= processedPos) { p->dicPos = dicPos; return SZ_ERROR_DATA; } } else if (distance >= checkDicSize) { p->dicPos = dicPos; return SZ_ERROR_DATA; } state = (state < kNumStates + kNumLitStates) ? kNumLitStates : kNumLitStates + 3; } len += kMatchMinLen; { SizeT rem; unsigned curLen; SizeT pos; if ((rem = limit - dicPos) == 0) { p->dicPos = dicPos; return SZ_ERROR_DATA; } curLen = ((rem < len) ? (unsigned)rem : len); pos = dicPos - rep0 + (dicPos < rep0 ? dicBufSize : 0); processedPos += curLen; len -= curLen; if (curLen <= dicBufSize - pos) { Byte *dest = dic + dicPos; ptrdiff_t src = (ptrdiff_t)pos - (ptrdiff_t)dicPos; const Byte *lim = dest + curLen; dicPos += curLen; do *(dest) = (Byte)*(dest + src); while (++dest != lim); } else { do { dic[dicPos++] = dic[pos]; if (++pos == dicBufSize) pos = 0; } while (--curLen != 0); } } } } while (dicPos < limit && buf < bufLimit); NORMALIZE; p->buf = buf; p->range = range; p->code = code; p->remainLen = len; p->dicPos = dicPos; p->processedPos = processedPos; p->reps[0] = rep0; p->reps[1] = rep1; p->reps[2] = rep2; p->reps[3] = rep3; p->state = state; return SZ_OK; } static void MY_FAST_CALL LzmaDec_WriteRem(CLzmaDec *p, SizeT limit) { if (p->remainLen != 0 && p->remainLen < kMatchSpecLenStart) { Byte *dic = p->dic; SizeT dicPos = p->dicPos; SizeT dicBufSize = p->dicBufSize; unsigned len = p->remainLen; SizeT rep0 = p->reps[0]; /* we use SizeT to avoid the BUG of VC14 for AMD64 */ SizeT rem = limit - dicPos; if (rem < len) len = (unsigned)(rem); if (p->checkDicSize == 0 && p->prop.dicSize - p->processedPos <= len) p->checkDicSize = p->prop.dicSize; p->processedPos += len; p->remainLen -= len; while (len != 0) { len--; dic[dicPos] = dic[dicPos - rep0 + (dicPos < rep0 ? dicBufSize : 0)]; dicPos++; } p->dicPos = dicPos; } } static int MY_FAST_CALL LzmaDec_DecodeReal2(CLzmaDec *p, SizeT limit, const Byte *bufLimit) { do { SizeT limit2 = limit; if (p->checkDicSize == 0) { UInt32 rem = p->prop.dicSize - p->processedPos; if (limit - p->dicPos > rem) limit2 = p->dicPos + rem; } RINOK(LzmaDec_DecodeReal(p, limit2, bufLimit)); if (p->checkDicSize == 0 && p->processedPos >= p->prop.dicSize) p->checkDicSize = p->prop.dicSize; LzmaDec_WriteRem(p, limit); } while (p->dicPos < limit && p->buf < bufLimit && p->remainLen < kMatchSpecLenStart); if (p->remainLen > kMatchSpecLenStart) p->remainLen = kMatchSpecLenStart; return 0; } typedef enum { DUMMY_ERROR, /* unexpected end of input stream */ DUMMY_LIT, DUMMY_MATCH, DUMMY_REP } ELzmaDummy; static ELzmaDummy LzmaDec_TryDummy(const CLzmaDec *p, const Byte *buf, SizeT inSize) { UInt32 range = p->range; UInt32 code = p->code; const Byte *bufLimit = buf + inSize; const CLzmaProb *probs = p->probs; unsigned state = p->state; ELzmaDummy res; { const CLzmaProb *prob; UInt32 bound; unsigned ttt; unsigned posState = (p->processedPos) & ((1 << p->prop.pb) - 1); prob = probs + IsMatch + (state << kNumPosBitsMax) + posState; IF_BIT_0_CHECK(prob) { UPDATE_0_CHECK /* if (bufLimit - buf >= 7) return DUMMY_LIT; */ prob = probs + Literal; if (p->checkDicSize != 0 || p->processedPos != 0) prob += ((UInt32)LZMA_LIT_SIZE * ((((p->processedPos) & ((1 << (p->prop.lp)) - 1)) << p->prop.lc) + (p->dic[(p->dicPos == 0 ? p->dicBufSize : p->dicPos) - 1] >> (8 - p->prop.lc)))); if (state < kNumLitStates) { unsigned symbol = 1; do { GET_BIT_CHECK(prob + symbol, symbol) } while (symbol < 0x100); } else { unsigned matchByte = p->dic[p->dicPos - p->reps[0] + (p->dicPos < p->reps[0] ? p->dicBufSize : 0)]; unsigned offs = 0x100; unsigned symbol = 1; do { unsigned bit; const CLzmaProb *probLit; matchByte <<= 1; bit = (matchByte & offs); probLit = prob + offs + bit + symbol; GET_BIT2_CHECK(probLit, symbol, offs &= ~bit, offs &= bit) } while (symbol < 0x100); } res = DUMMY_LIT; } else { unsigned len; UPDATE_1_CHECK; prob = probs + IsRep + state; IF_BIT_0_CHECK(prob) { UPDATE_0_CHECK; state = 0; prob = probs + LenCoder; res = DUMMY_MATCH; } else { UPDATE_1_CHECK; res = DUMMY_REP; prob = probs + IsRepG0 + state; IF_BIT_0_CHECK(prob) { UPDATE_0_CHECK; prob = probs + IsRep0Long + (state << kNumPosBitsMax) + posState; IF_BIT_0_CHECK(prob) { UPDATE_0_CHECK; NORMALIZE_CHECK; return DUMMY_REP; } else { UPDATE_1_CHECK; } } else { UPDATE_1_CHECK; prob = probs + IsRepG1 + state; IF_BIT_0_CHECK(prob) { UPDATE_0_CHECK; } else { UPDATE_1_CHECK; prob = probs + IsRepG2 + state; IF_BIT_0_CHECK(prob) { UPDATE_0_CHECK; } else { UPDATE_1_CHECK; } } } state = kNumStates; prob = probs + RepLenCoder; } { unsigned limit, offset; const CLzmaProb *probLen = prob + LenChoice; IF_BIT_0_CHECK(probLen) { UPDATE_0_CHECK; probLen = prob + LenLow + (posState << kLenNumLowBits); offset = 0; limit = 1 << kLenNumLowBits; } else { UPDATE_1_CHECK; probLen = prob + LenChoice2; IF_BIT_0_CHECK(probLen) { UPDATE_0_CHECK; probLen = prob + LenMid + (posState << kLenNumMidBits); offset = kLenNumLowSymbols; limit = 1 << kLenNumMidBits; } else { UPDATE_1_CHECK; probLen = prob + LenHigh; offset = kLenNumLowSymbols + kLenNumMidSymbols; limit = 1 << kLenNumHighBits; } } TREE_DECODE_CHECK(probLen, limit, len); len += offset; } if (state < 4) { unsigned posSlot; prob = probs + PosSlot + ((len < kNumLenToPosStates ? len : kNumLenToPosStates - 1) << kNumPosSlotBits); TREE_DECODE_CHECK(prob, 1 << kNumPosSlotBits, posSlot); if (posSlot >= kStartPosModelIndex) { unsigned numDirectBits = ((posSlot >> 1) - 1); /* if (bufLimit - buf >= 8) return DUMMY_MATCH; */ if (posSlot < kEndPosModelIndex) { prob = probs + SpecPos + ((2 | (posSlot & 1)) << numDirectBits) - posSlot - 1; } else { numDirectBits -= kNumAlignBits; do { NORMALIZE_CHECK range >>= 1; code -= range & (((code - range) >> 31) - 1); /* if (code >= range) code -= range; */ } while (--numDirectBits != 0); prob = probs + Align; numDirectBits = kNumAlignBits; } { unsigned i = 1; do { GET_BIT_CHECK(prob + i, i); } while (--numDirectBits != 0); } } } } } NORMALIZE_CHECK; return res; } static void LzmaDec_InitDicAndState(CLzmaDec *p, Bool initDic, Bool initState) { p->needFlush = 1; p->remainLen = 0; p->tempBufSize = 0; if (initDic) { p->processedPos = 0; p->checkDicSize = 0; p->needInitState = 1; } if (initState) p->needInitState = 1; } static void LzmaDec_Init(CLzmaDec *p) { p->dicPos = 0; LzmaDec_InitDicAndState(p, True, True); } static void LzmaDec_InitStateReal(CLzmaDec *p) { SizeT numProbs = LzmaProps_GetNumProbs(&p->prop); SizeT i; CLzmaProb *probs = p->probs; for (i = 0; i < numProbs; i++) probs[i] = kBitModelTotal >> 1; p->reps[0] = p->reps[1] = p->reps[2] = p->reps[3] = 1; p->state = 0; p->needInitState = 0; } static SRes LzmaDec_DecodeToDic(CLzmaDec *p, SizeT dicLimit, const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status) { SizeT inSize = *srcLen; (*srcLen) = 0; LzmaDec_WriteRem(p, dicLimit); *status = LZMA_STATUS_NOT_SPECIFIED; while (p->remainLen != kMatchSpecLenStart) { int checkEndMarkNow; if (p->needFlush) { for (; inSize > 0 && p->tempBufSize < RC_INIT_SIZE; (*srcLen)++, inSize--) p->tempBuf[p->tempBufSize++] = *src++; if (p->tempBufSize < RC_INIT_SIZE) { *status = LZMA_STATUS_NEEDS_MORE_INPUT; return SZ_OK; } if (p->tempBuf[0] != 0) return SZ_ERROR_DATA; p->code = ((UInt32)p->tempBuf[1] << 24) | ((UInt32)p->tempBuf[2] << 16) | ((UInt32)p->tempBuf[3] << 8) | ((UInt32)p->tempBuf[4]); p->range = 0xFFFFFFFF; p->needFlush = 0; p->tempBufSize = 0; } checkEndMarkNow = 0; if (p->dicPos >= dicLimit) { if (p->remainLen == 0 && p->code == 0) { *status = LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK; return SZ_OK; } if (finishMode == LZMA_FINISH_ANY) { *status = LZMA_STATUS_NOT_FINISHED; return SZ_OK; } if (p->remainLen != 0) { *status = LZMA_STATUS_NOT_FINISHED; return SZ_ERROR_DATA; } checkEndMarkNow = 1; } if (p->needInitState) LzmaDec_InitStateReal(p); if (p->tempBufSize == 0) { SizeT processed; const Byte *bufLimit; if (inSize < LZMA_REQUIRED_INPUT_MAX || checkEndMarkNow) { int dummyRes = LzmaDec_TryDummy(p, src, inSize); if (dummyRes == DUMMY_ERROR) { memcpy(p->tempBuf, src, inSize); p->tempBufSize = (unsigned)inSize; (*srcLen) += inSize; *status = LZMA_STATUS_NEEDS_MORE_INPUT; return SZ_OK; } if (checkEndMarkNow && dummyRes != DUMMY_MATCH) { *status = LZMA_STATUS_NOT_FINISHED; return SZ_ERROR_DATA; } bufLimit = src; } else bufLimit = src + inSize - LZMA_REQUIRED_INPUT_MAX; p->buf = src; if (LzmaDec_DecodeReal2(p, dicLimit, bufLimit) != 0) return SZ_ERROR_DATA; processed = (SizeT)(p->buf - src); (*srcLen) += processed; src += processed; inSize -= processed; } else { unsigned rem = p->tempBufSize, lookAhead = 0; while (rem < LZMA_REQUIRED_INPUT_MAX && lookAhead < inSize) p->tempBuf[rem++] = src[lookAhead++]; p->tempBufSize = rem; if (rem < LZMA_REQUIRED_INPUT_MAX || checkEndMarkNow) { int dummyRes = LzmaDec_TryDummy(p, p->tempBuf, rem); if (dummyRes == DUMMY_ERROR) { (*srcLen) += lookAhead; *status = LZMA_STATUS_NEEDS_MORE_INPUT; return SZ_OK; } if (checkEndMarkNow && dummyRes != DUMMY_MATCH) { *status = LZMA_STATUS_NOT_FINISHED; return SZ_ERROR_DATA; } } p->buf = p->tempBuf; if (LzmaDec_DecodeReal2(p, dicLimit, p->buf) != 0) return SZ_ERROR_DATA; { unsigned kkk = (unsigned)(p->buf - p->tempBuf); if (rem < kkk) return SZ_ERROR_FAIL; /* some internal error */ rem -= kkk; if (lookAhead < rem) return SZ_ERROR_FAIL; /* some internal error */ lookAhead -= rem; } (*srcLen) += lookAhead; src += lookAhead; inSize -= lookAhead; p->tempBufSize = 0; } } if (p->code == 0) *status = LZMA_STATUS_FINISHED_WITH_MARK; return (p->code == 0) ? SZ_OK : SZ_ERROR_DATA; } static void LzmaDec_FreeProbs(CLzmaDec *p, ISzAlloc *alloc) { alloc->Free(alloc, p->probs); p->probs = NULL; } static SRes LzmaProps_Decode(CLzmaProps *p, const Byte *data, unsigned size) { UInt32 dicSize; Byte d; if (size < LZMA_PROPS_SIZE) return SZ_ERROR_UNSUPPORTED; else dicSize = data[1] | ((UInt32)data[2] << 8) | ((UInt32)data[3] << 16) | ((UInt32)data[4] << 24); if (dicSize < LZMA_DIC_MIN) dicSize = LZMA_DIC_MIN; p->dicSize = dicSize; d = data[0]; if (d >= (9 * 5 * 5)) return SZ_ERROR_UNSUPPORTED; p->lc = d % 9; d /= 9; p->pb = d / 5; p->lp = d % 5; return SZ_OK; } static SRes LzmaDec_AllocateProbs2(CLzmaDec *p, const CLzmaProps *propNew, ISzAlloc *alloc) { UInt32 numProbs = LzmaProps_GetNumProbs(propNew); if (!p->probs || numProbs != p->numProbs) { LzmaDec_FreeProbs(p, alloc); p->probs = (CLzmaProb *)alloc->Alloc(alloc, numProbs * sizeof(CLzmaProb)); p->numProbs = numProbs; if (!p->probs) return SZ_ERROR_MEM; } return SZ_OK; } static SRes LzmaDec_AllocateProbs(CLzmaDec *p, const Byte *props, unsigned propsSize, ISzAlloc *alloc) { CLzmaProps propNew; RINOK(LzmaProps_Decode(&propNew, props, propsSize)); RINOK(LzmaDec_AllocateProbs2(p, &propNew, alloc)); p->prop = propNew; return SZ_OK; } /* Lzma2Dec.c -- LZMA2 Decoder 2015-11-09 : Igor Pavlov : Public domain */ /* #define SHOW_DEBUG_INFO */ /* #include "Precomp.h" #ifdef SHOW_DEBUG_INFO #include #endif #include #include "Lzma2Dec.h" */ /* 00000000 - EOS 00000001 U U - Uncompressed Reset Dic 00000010 U U - Uncompressed No Reset 100uuuuu U U P P - LZMA no reset 101uuuuu U U P P - LZMA reset state 110uuuuu U U P P S - LZMA reset state + new prop 111uuuuu U U P P S - LZMA reset state + new prop + reset dic u, U - Unpack Size P - Pack Size S - Props */ #define LZMA2_CONTROL_LZMA (1 << 7) #define LZMA2_CONTROL_COPY_NO_RESET 2 #define LZMA2_CONTROL_COPY_RESET_DIC 1 #define LZMA2_CONTROL_EOF 0 #define LZMA2_IS_UNCOMPRESSED_STATE(p) (((p)->control & LZMA2_CONTROL_LZMA) == 0) #define LZMA2_GET_LZMA_MODE(p) (((p)->control >> 5) & 3) #define LZMA2_IS_THERE_PROP(mode) ((mode) >= 2) #define LZMA2_LCLP_MAX 4 #define LZMA2_DIC_SIZE_FROM_PROP(p) (((UInt32)2 | ((p) & 1)) << ((p) / 2 + 11)) #ifdef SHOW_DEBUG_INFO #define PRF(x) x #else #define PRF(x) #endif typedef enum { LZMA2_STATE_CONTROL, LZMA2_STATE_UNPACK0, LZMA2_STATE_UNPACK1, LZMA2_STATE_PACK0, LZMA2_STATE_PACK1, LZMA2_STATE_PROP, LZMA2_STATE_DATA, LZMA2_STATE_DATA_CONT, LZMA2_STATE_FINISHED, LZMA2_STATE_ERROR } ELzma2State; static SRes Lzma2Dec_GetOldProps(Byte prop, Byte *props) { UInt32 dicSize; if (prop > 40) return SZ_ERROR_UNSUPPORTED; dicSize = (prop == 40) ? 0xFFFFFFFF : LZMA2_DIC_SIZE_FROM_PROP(prop); props[0] = (Byte)LZMA2_LCLP_MAX; props[1] = (Byte)(dicSize); props[2] = (Byte)(dicSize >> 8); props[3] = (Byte)(dicSize >> 16); props[4] = (Byte)(dicSize >> 24); return SZ_OK; } static SRes Lzma2Dec_AllocateProbs(CLzma2Dec *p, Byte prop, ISzAlloc *alloc) { Byte props[LZMA_PROPS_SIZE]; RINOK(Lzma2Dec_GetOldProps(prop, props)); return LzmaDec_AllocateProbs(&p->decoder, props, LZMA_PROPS_SIZE, alloc); } static void Lzma2Dec_Init(CLzma2Dec *p) { p->state = LZMA2_STATE_CONTROL; p->needInitDic = True; p->needInitState = True; p->needInitProp = True; LzmaDec_Init(&p->decoder); } static ELzma2State Lzma2Dec_UpdateState(CLzma2Dec *p, Byte b) { switch (p->state) { case LZMA2_STATE_CONTROL: p->control = b; PRF(printf("\n %4X ", (unsigned)p->decoder.dicPos)); PRF(printf(" %2X", (unsigned)b)); if (p->control == 0) return LZMA2_STATE_FINISHED; if (LZMA2_IS_UNCOMPRESSED_STATE(p)) { if ((p->control & 0x7F) > 2) return LZMA2_STATE_ERROR; p->unpackSize = 0; } else p->unpackSize = (UInt32)(p->control & 0x1F) << 16; return LZMA2_STATE_UNPACK0; case LZMA2_STATE_UNPACK0: p->unpackSize |= (UInt32)b << 8; return LZMA2_STATE_UNPACK1; case LZMA2_STATE_UNPACK1: p->unpackSize |= (UInt32)b; p->unpackSize++; PRF(printf(" %8u", (unsigned)p->unpackSize)); return (LZMA2_IS_UNCOMPRESSED_STATE(p)) ? LZMA2_STATE_DATA : LZMA2_STATE_PACK0; case LZMA2_STATE_PACK0: p->packSize = (UInt32)b << 8; return LZMA2_STATE_PACK1; case LZMA2_STATE_PACK1: p->packSize |= (UInt32)b; p->packSize++; PRF(printf(" %8u", (unsigned)p->packSize)); return LZMA2_IS_THERE_PROP(LZMA2_GET_LZMA_MODE(p)) ? LZMA2_STATE_PROP: (p->needInitProp ? LZMA2_STATE_ERROR : LZMA2_STATE_DATA); case LZMA2_STATE_PROP: { unsigned lc, lp; if (b >= (9 * 5 * 5)) return LZMA2_STATE_ERROR; lc = b % 9; b /= 9; p->decoder.prop.pb = b / 5; lp = b % 5; if (lc + lp > LZMA2_LCLP_MAX) return LZMA2_STATE_ERROR; p->decoder.prop.lc = lc; p->decoder.prop.lp = lp; p->needInitProp = False; return LZMA2_STATE_DATA; } } return LZMA2_STATE_ERROR; } static void LzmaDec_UpdateWithUncompressed(CLzmaDec *p, const Byte *src, SizeT size) { memcpy(p->dic + p->dicPos, src, size); p->dicPos += size; if (p->checkDicSize == 0 && p->prop.dicSize - p->processedPos <= size) p->checkDicSize = p->prop.dicSize; p->processedPos += (UInt32)size; } static void LzmaDec_InitDicAndState(CLzmaDec *p, Bool initDic, Bool initState); static SRes Lzma2Dec_DecodeToDic(CLzma2Dec *p, SizeT dicLimit, const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status) { SizeT inSize = *srcLen; *srcLen = 0; *status = LZMA_STATUS_NOT_SPECIFIED; while (p->state != LZMA2_STATE_FINISHED) { SizeT dicPos = p->decoder.dicPos; if (p->state == LZMA2_STATE_ERROR) return SZ_ERROR_DATA; if (dicPos == dicLimit && finishMode == LZMA_FINISH_ANY) { *status = LZMA_STATUS_NOT_FINISHED; return SZ_OK; } if (p->state != LZMA2_STATE_DATA && p->state != LZMA2_STATE_DATA_CONT) { if (*srcLen == inSize) { *status = LZMA_STATUS_NEEDS_MORE_INPUT; return SZ_OK; } (*srcLen)++; p->state = Lzma2Dec_UpdateState(p, *src++); if (dicPos == dicLimit && p->state != LZMA2_STATE_FINISHED) { p->state = LZMA2_STATE_ERROR; return SZ_ERROR_DATA; } continue; } { SizeT destSizeCur = dicLimit - dicPos; SizeT srcSizeCur = inSize - *srcLen; ELzmaFinishMode curFinishMode = LZMA_FINISH_ANY; if (p->unpackSize <= destSizeCur) { destSizeCur = (SizeT)p->unpackSize; curFinishMode = LZMA_FINISH_END; } if (LZMA2_IS_UNCOMPRESSED_STATE(p)) { if (*srcLen == inSize) { *status = LZMA_STATUS_NEEDS_MORE_INPUT; return SZ_OK; } if (p->state == LZMA2_STATE_DATA) { Bool initDic = (p->control == LZMA2_CONTROL_COPY_RESET_DIC); if (initDic) p->needInitProp = p->needInitState = True; else if (p->needInitDic) { p->state = LZMA2_STATE_ERROR; return SZ_ERROR_DATA; } p->needInitDic = False; LzmaDec_InitDicAndState(&p->decoder, initDic, False); } if (srcSizeCur > destSizeCur) srcSizeCur = destSizeCur; if (srcSizeCur == 0) { p->state = LZMA2_STATE_ERROR; return SZ_ERROR_DATA; } LzmaDec_UpdateWithUncompressed(&p->decoder, src, srcSizeCur); src += srcSizeCur; *srcLen += srcSizeCur; p->unpackSize -= (UInt32)srcSizeCur; p->state = (p->unpackSize == 0) ? LZMA2_STATE_CONTROL : LZMA2_STATE_DATA_CONT; } else { SizeT outSizeProcessed; SRes res; if (p->state == LZMA2_STATE_DATA) { unsigned mode = LZMA2_GET_LZMA_MODE(p); Bool initDic = (mode == 3); Bool initState = (mode != 0); if ((!initDic && p->needInitDic) || (!initState && p->needInitState)) { p->state = LZMA2_STATE_ERROR; return SZ_ERROR_DATA; } LzmaDec_InitDicAndState(&p->decoder, initDic, initState); p->needInitDic = False; p->needInitState = False; p->state = LZMA2_STATE_DATA_CONT; } if (srcSizeCur > p->packSize) srcSizeCur = (SizeT)p->packSize; res = LzmaDec_DecodeToDic(&p->decoder, dicPos + destSizeCur, src, &srcSizeCur, curFinishMode, status); src += srcSizeCur; *srcLen += srcSizeCur; p->packSize -= (UInt32)srcSizeCur; outSizeProcessed = p->decoder.dicPos - dicPos; p->unpackSize -= (UInt32)outSizeProcessed; RINOK(res); if (*status == LZMA_STATUS_NEEDS_MORE_INPUT) return res; if (srcSizeCur == 0 && outSizeProcessed == 0) { if (*status != LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK || p->unpackSize != 0 || p->packSize != 0) { p->state = LZMA2_STATE_ERROR; return SZ_ERROR_DATA; } p->state = LZMA2_STATE_CONTROL; } if (*status == LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK) *status = LZMA_STATUS_NOT_FINISHED; } } } *status = LZMA_STATUS_FINISHED_WITH_MARK; return SZ_OK; } #endif /* _INCLUDE_PHYSFS_LZMASDK_H_ */ /* end of physfs_lzmasdk.h ... */ ================================================ FILE: src/libraries/physfs/physfs_miniz.h ================================================ /* tinfl.c v1.11 - public domain inflate with zlib header parsing/adler32 checking (inflate-only subset of miniz.c) See "unlicense" statement at the end of this file. Rich Geldreich , last updated May 20, 2011 Implements RFC 1950: https://www.ietf.org/rfc/rfc1950.txt and RFC 1951: https://www.ietf.org/rfc/rfc1951.txt The entire decompressor coroutine is implemented in tinfl_decompress(). The other functions are optional high-level helpers. */ #ifndef TINFL_HEADER_INCLUDED #define TINFL_HEADER_INCLUDED typedef PHYSFS_uint8 mz_uint8; typedef PHYSFS_sint16 mz_int16; typedef PHYSFS_uint16 mz_uint16; typedef PHYSFS_uint32 mz_uint32; typedef unsigned int mz_uint; typedef PHYSFS_uint64 mz_uint64; /* For more compatibility with zlib, miniz.c uses unsigned long for some parameters/struct members. */ typedef unsigned long mz_ulong; /* Heap allocation callbacks. */ typedef void *(*mz_alloc_func)(void *opaque, unsigned int items, unsigned int size); typedef void (*mz_free_func)(void *opaque, void *address); #ifndef MINIZ_LITTLE_ENDIAN /* if not defined by PHYSFS */ #if defined(_M_IX86) || defined(_M_X64) /* Set MINIZ_USE_UNALIGNED_LOADS_AND_STORES to 1 if integer loads and stores to unaligned addresses are acceptable on the target platform (slightly faster). */ #define MINIZ_USE_UNALIGNED_LOADS_AND_STORES 1 /* Set MINIZ_LITTLE_ENDIAN to 1 if the processor is little endian. */ #define MINIZ_LITTLE_ENDIAN 1 #endif #endif /**/ #if defined(_WIN64) || defined(__MINGW64__) || defined(_LP64) || defined(__LP64__) /* Set MINIZ_HAS_64BIT_REGISTERS to 1 if the processor has 64-bit general purpose registers (enables 64-bit bitbuffer in inflator) */ #define MINIZ_HAS_64BIT_REGISTERS 1 #endif /* Works around MSVC's spammy "warning C4127: conditional expression is constant" message. */ #ifdef _MSC_VER #define MZ_MACRO_END while (0, 0) #else #define MZ_MACRO_END while (0) #endif /* Decompression flags. */ enum { TINFL_FLAG_PARSE_ZLIB_HEADER = 1, TINFL_FLAG_HAS_MORE_INPUT = 2, TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF = 4, TINFL_FLAG_COMPUTE_ADLER32 = 8 }; struct tinfl_decompressor_tag; typedef struct tinfl_decompressor_tag tinfl_decompressor; /* Max size of LZ dictionary. */ #define TINFL_LZ_DICT_SIZE 32768 /* Return status. */ typedef enum { TINFL_STATUS_BAD_PARAM = -3, TINFL_STATUS_ADLER32_MISMATCH = -2, TINFL_STATUS_FAILED = -1, TINFL_STATUS_DONE = 0, TINFL_STATUS_NEEDS_MORE_INPUT = 1, TINFL_STATUS_HAS_MORE_OUTPUT = 2 } tinfl_status; /* Initializes the decompressor to its initial state. */ #define tinfl_init(r) do { (r)->m_state = 0; } MZ_MACRO_END #define tinfl_get_adler32(r) (r)->m_check_adler32 /* Main low-level decompressor coroutine function. This is the only function actually needed for decompression. All the other functions are just high-level helpers for improved usability. */ /* This is a universal API, i.e. it can be used as a building block to build any desired higher level decompression API. In the limit case, it can be called once per every byte input or output. */ static tinfl_status tinfl_decompress(tinfl_decompressor *r, const mz_uint8 *pIn_buf_next, size_t *pIn_buf_size, mz_uint8 *pOut_buf_start, mz_uint8 *pOut_buf_next, size_t *pOut_buf_size, const mz_uint32 decomp_flags); /* Internal/private bits follow. */ enum { TINFL_MAX_HUFF_TABLES = 3, TINFL_MAX_HUFF_SYMBOLS_0 = 288, TINFL_MAX_HUFF_SYMBOLS_1 = 32, TINFL_MAX_HUFF_SYMBOLS_2 = 19, TINFL_FAST_LOOKUP_BITS = 10, TINFL_FAST_LOOKUP_SIZE = 1 << TINFL_FAST_LOOKUP_BITS }; typedef struct { mz_uint8 m_code_size[TINFL_MAX_HUFF_SYMBOLS_0]; mz_int16 m_look_up[TINFL_FAST_LOOKUP_SIZE], m_tree[TINFL_MAX_HUFF_SYMBOLS_0 * 2]; } tinfl_huff_table; #if MINIZ_HAS_64BIT_REGISTERS #define TINFL_USE_64BIT_BITBUF 1 #endif #if TINFL_USE_64BIT_BITBUF typedef mz_uint64 tinfl_bit_buf_t; #define TINFL_BITBUF_SIZE (64) #else typedef mz_uint32 tinfl_bit_buf_t; #define TINFL_BITBUF_SIZE (32) #endif struct tinfl_decompressor_tag { mz_uint32 m_state, m_num_bits, m_zhdr0, m_zhdr1, m_z_adler32, m_final, m_type, m_check_adler32, m_dist, m_counter, m_num_extra, m_table_sizes[TINFL_MAX_HUFF_TABLES]; tinfl_bit_buf_t m_bit_buf; size_t m_dist_from_out_buf_start; tinfl_huff_table m_tables[TINFL_MAX_HUFF_TABLES]; mz_uint8 m_raw_header[4], m_len_codes[TINFL_MAX_HUFF_SYMBOLS_0 + TINFL_MAX_HUFF_SYMBOLS_1 + 137]; }; #endif /* #ifdef TINFL_HEADER_INCLUDED */ /* ------------------- End of Header: Implementation follows. (If you only want the header, define MINIZ_HEADER_FILE_ONLY.) */ #ifndef TINFL_HEADER_FILE_ONLY #define MZ_MAX(a,b) (((a)>(b))?(a):(b)) #define MZ_MIN(a,b) (((a)<(b))?(a):(b)) #define MZ_CLEAR_OBJ(obj) memset(&(obj), 0, sizeof(obj)) #define MZ_CLEAR_ARR(obj) memset((obj), 0, sizeof(obj)) #define MZ_CLEAR_PTR(obj) memset((obj), 0, sizeof(*obj)) #if MINIZ_USE_UNALIGNED_LOADS_AND_STORES && MINIZ_LITTLE_ENDIAN #define MZ_READ_LE16(p) *((const mz_uint16 *)(p)) #define MZ_READ_LE32(p) *((const mz_uint32 *)(p)) #else #define MZ_READ_LE16(p) ((mz_uint32)(((const mz_uint8 *)(p))[0]) | ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U)) #define MZ_READ_LE32(p) ((mz_uint32)(((const mz_uint8 *)(p))[0]) | ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U) | ((mz_uint32)(((const mz_uint8 *)(p))[2]) << 16U) | ((mz_uint32)(((const mz_uint8 *)(p))[3]) << 24U)) #endif #define TINFL_MEMCPY(d, s, l) memcpy(d, s, l) #define TINFL_MEMSET(p, c, l) memset(p, c, l) #define TINFL_CR_BEGIN switch(r->m_state) { case 0: #define TINFL_CR_RETURN(state_index, result) do { status = result; r->m_state = state_index; goto common_exit; case state_index:; } MZ_MACRO_END #define TINFL_CR_RETURN_FOREVER(state_index, result) do { for ( ; ; ) { TINFL_CR_RETURN(state_index, result); } } MZ_MACRO_END #define TINFL_CR_FINISH } /* TODO: If the caller has indicated that there's no more input, and we attempt to read beyond the input buf, then something is wrong with the input because the inflator never */ /* reads ahead more than it needs to. Currently TINFL_GET_BYTE() pads the end of the stream with 0's in this scenario. */ #define TINFL_GET_BYTE(state_index, c) do { \ if (pIn_buf_cur >= pIn_buf_end) { \ for ( ; ; ) { \ if (decomp_flags & TINFL_FLAG_HAS_MORE_INPUT) { \ TINFL_CR_RETURN(state_index, TINFL_STATUS_NEEDS_MORE_INPUT); \ if (pIn_buf_cur < pIn_buf_end) { \ c = *pIn_buf_cur++; \ break; \ } \ } else { \ c = 0; \ break; \ } \ } \ } else c = *pIn_buf_cur++; } MZ_MACRO_END #define TINFL_NEED_BITS(state_index, n) do { mz_uint c; TINFL_GET_BYTE(state_index, c); bit_buf |= (((tinfl_bit_buf_t)c) << num_bits); num_bits += 8; } while (num_bits < (mz_uint)(n)) #define TINFL_SKIP_BITS(state_index, n) do { if (num_bits < (mz_uint)(n)) { TINFL_NEED_BITS(state_index, n); } bit_buf >>= (n); num_bits -= (n); } MZ_MACRO_END #define TINFL_GET_BITS(state_index, b, n) do { if (num_bits < (mz_uint)(n)) { TINFL_NEED_BITS(state_index, n); } b = bit_buf & ((1 << (n)) - 1); bit_buf >>= (n); num_bits -= (n); } MZ_MACRO_END /* TINFL_HUFF_BITBUF_FILL() is only used rarely, when the number of bytes remaining in the input buffer falls below 2. */ /* It reads just enough bytes from the input stream that are needed to decode the next Huffman code (and absolutely no more). It works by trying to fully decode a */ /* Huffman code by using whatever bits are currently present in the bit buffer. If this fails, it reads another byte, and tries again until it succeeds or until the */ /* bit buffer contains >=15 bits (deflate's max. Huffman code size). */ #define TINFL_HUFF_BITBUF_FILL(state_index, pHuff) \ do { \ temp = (pHuff)->m_look_up[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]; \ if (temp >= 0) { \ code_len = temp >> 9; \ if ((code_len) && (num_bits >= code_len)) \ break; \ } else if (num_bits > TINFL_FAST_LOOKUP_BITS) { \ code_len = TINFL_FAST_LOOKUP_BITS; \ do { \ temp = (pHuff)->m_tree[~temp + ((bit_buf >> code_len++) & 1)]; \ } while ((temp < 0) && (num_bits >= (code_len + 1))); \ if (temp >= 0) break; \ } \ TINFL_GET_BYTE(state_index, c); \ bit_buf |= (((tinfl_bit_buf_t)c) << num_bits); \ num_bits += 8; \ } while (num_bits < 15); /* TINFL_HUFF_DECODE() decodes the next Huffman coded symbol. It's more complex than you would initially expect because the zlib API expects the decompressor to never read */ /* beyond the final byte of the deflate stream. (In other words, when this macro wants to read another byte from the input, it REALLY needs another byte in order to fully */ /* decode the next Huffman code.) Handling this properly is particularly important on raw deflate (non-zlib) streams, which aren't followed by a byte aligned adler-32. */ /* The slow path is only executed at the very end of the input buffer. */ #define TINFL_HUFF_DECODE(state_index, sym, pHuff) do { \ int temp; mz_uint code_len, c; \ if (num_bits < 15) { \ if ((pIn_buf_end - pIn_buf_cur) < 2) { \ TINFL_HUFF_BITBUF_FILL(state_index, pHuff); \ } else { \ bit_buf |= (((tinfl_bit_buf_t)pIn_buf_cur[0]) << num_bits) | (((tinfl_bit_buf_t)pIn_buf_cur[1]) << (num_bits + 8)); pIn_buf_cur += 2; num_bits += 16; \ } \ } \ if ((temp = (pHuff)->m_look_up[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]) >= 0) \ code_len = temp >> 9, temp &= 511; \ else { \ code_len = TINFL_FAST_LOOKUP_BITS; do { temp = (pHuff)->m_tree[~temp + ((bit_buf >> code_len++) & 1)]; } while (temp < 0); \ } sym = temp; bit_buf >>= code_len; num_bits -= code_len; } MZ_MACRO_END static tinfl_status tinfl_decompress(tinfl_decompressor *r, const mz_uint8 *pIn_buf_next, size_t *pIn_buf_size, mz_uint8 *pOut_buf_start, mz_uint8 *pOut_buf_next, size_t *pOut_buf_size, const mz_uint32 decomp_flags) { static const int s_length_base[31] = { 3,4,5,6,7,8,9,10,11,13, 15,17,19,23,27,31,35,43,51,59, 67,83,99,115,131,163,195,227,258,0,0 }; static const int s_length_extra[31]= { 0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0 }; static const int s_dist_base[32] = { 1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193, 257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0}; static const int s_dist_extra[32] = { 0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13}; static const mz_uint8 s_length_dezigzag[19] = { 16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15 }; static const int s_min_table_sizes[3] = { 257, 1, 4 }; tinfl_status status = TINFL_STATUS_FAILED; mz_uint32 num_bits, dist, counter, num_extra; tinfl_bit_buf_t bit_buf; const mz_uint8 *pIn_buf_cur = pIn_buf_next, *const pIn_buf_end = pIn_buf_next + *pIn_buf_size; mz_uint8 *pOut_buf_cur = pOut_buf_next, *const pOut_buf_end = pOut_buf_next + *pOut_buf_size; size_t out_buf_size_mask = (decomp_flags & TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF) ? (size_t)-1 : ((pOut_buf_next - pOut_buf_start) + *pOut_buf_size) - 1, dist_from_out_buf_start; /* Ensure the output buffer's size is a power of 2, unless the output buffer is large enough to hold the entire output file (in which case it doesn't matter). */ if (((out_buf_size_mask + 1) & out_buf_size_mask) || (pOut_buf_next < pOut_buf_start)) { *pIn_buf_size = *pOut_buf_size = 0; return TINFL_STATUS_BAD_PARAM; } num_bits = r->m_num_bits; bit_buf = r->m_bit_buf; dist = r->m_dist; counter = r->m_counter; num_extra = r->m_num_extra; dist_from_out_buf_start = r->m_dist_from_out_buf_start; TINFL_CR_BEGIN bit_buf = num_bits = dist = counter = num_extra = r->m_zhdr0 = r->m_zhdr1 = 0; r->m_z_adler32 = r->m_check_adler32 = 1; if (decomp_flags & TINFL_FLAG_PARSE_ZLIB_HEADER) { TINFL_GET_BYTE(1, r->m_zhdr0); TINFL_GET_BYTE(2, r->m_zhdr1); counter = (((r->m_zhdr0 * 256 + r->m_zhdr1) % 31 != 0) || (r->m_zhdr1 & 32) || ((r->m_zhdr0 & 15) != 8)); if (!(decomp_flags & TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF)) counter |= (((1U << (8U + (r->m_zhdr0 >> 4))) > 32768U) || ((out_buf_size_mask + 1) < (size_t)(1U << (8U + (r->m_zhdr0 >> 4))))); if (counter) { TINFL_CR_RETURN_FOREVER(36, TINFL_STATUS_FAILED); } } do { TINFL_GET_BITS(3, r->m_final, 3); r->m_type = r->m_final >> 1; if (r->m_type == 0) { TINFL_SKIP_BITS(5, num_bits & 7); for (counter = 0; counter < 4; ++counter) { if (num_bits) TINFL_GET_BITS(6, r->m_raw_header[counter], 8); else TINFL_GET_BYTE(7, r->m_raw_header[counter]); } if ((counter = (r->m_raw_header[0] | (r->m_raw_header[1] << 8))) != (mz_uint)(0xFFFF ^ (r->m_raw_header[2] | (r->m_raw_header[3] << 8)))) { TINFL_CR_RETURN_FOREVER(39, TINFL_STATUS_FAILED); } while ((counter) && (num_bits)) { TINFL_GET_BITS(51, dist, 8); while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(52, TINFL_STATUS_HAS_MORE_OUTPUT); } *pOut_buf_cur++ = (mz_uint8)dist; counter--; } while (counter) { size_t n; while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(9, TINFL_STATUS_HAS_MORE_OUTPUT); } while (pIn_buf_cur >= pIn_buf_end) { if (decomp_flags & TINFL_FLAG_HAS_MORE_INPUT) { TINFL_CR_RETURN(38, TINFL_STATUS_NEEDS_MORE_INPUT); } else { TINFL_CR_RETURN_FOREVER(40, TINFL_STATUS_FAILED); } } n = MZ_MIN(MZ_MIN((size_t)(pOut_buf_end - pOut_buf_cur), (size_t)(pIn_buf_end - pIn_buf_cur)), counter); TINFL_MEMCPY(pOut_buf_cur, pIn_buf_cur, n); pIn_buf_cur += n; pOut_buf_cur += n; counter -= (mz_uint)n; } } else if (r->m_type == 3) { TINFL_CR_RETURN_FOREVER(10, TINFL_STATUS_FAILED); } else { if (r->m_type == 1) { mz_uint8 *p = r->m_tables[0].m_code_size; mz_uint i; r->m_table_sizes[0] = 288; r->m_table_sizes[1] = 32; TINFL_MEMSET(r->m_tables[1].m_code_size, 5, 32); for ( i = 0; i <= 143; ++i) *p++ = 8; for ( ; i <= 255; ++i) *p++ = 9; for ( ; i <= 279; ++i) *p++ = 7; for ( ; i <= 287; ++i) *p++ = 8; } else { for (counter = 0; counter < 3; counter++) { TINFL_GET_BITS(11, r->m_table_sizes[counter], "\05\05\04"[counter]); r->m_table_sizes[counter] += s_min_table_sizes[counter]; } MZ_CLEAR_ARR(r->m_tables[2].m_code_size); for (counter = 0; counter < r->m_table_sizes[2]; counter++) { mz_uint s; TINFL_GET_BITS(14, s, 3); r->m_tables[2].m_code_size[s_length_dezigzag[counter]] = (mz_uint8)s; } r->m_table_sizes[2] = 19; } for ( ; (int)r->m_type >= 0; r->m_type--) { int tree_next, tree_cur; tinfl_huff_table *pTable; mz_uint i, j, used_syms, total, sym_index, next_code[17], total_syms[16]; pTable = &r->m_tables[r->m_type]; MZ_CLEAR_ARR(total_syms); MZ_CLEAR_ARR(pTable->m_look_up); MZ_CLEAR_ARR(pTable->m_tree); for (i = 0; i < r->m_table_sizes[r->m_type]; ++i) total_syms[pTable->m_code_size[i]]++; used_syms = 0, total = 0; next_code[0] = next_code[1] = 0; for (i = 1; i <= 15; ++i) { used_syms += total_syms[i]; next_code[i + 1] = (total = ((total + total_syms[i]) << 1)); } if ((65536 != total) && (used_syms > 1)) { TINFL_CR_RETURN_FOREVER(35, TINFL_STATUS_FAILED); } for (tree_next = -1, sym_index = 0; sym_index < r->m_table_sizes[r->m_type]; ++sym_index) { mz_uint rev_code = 0, l, cur_code, code_size = pTable->m_code_size[sym_index]; if (!code_size) continue; cur_code = next_code[code_size]++; for (l = code_size; l > 0; l--, cur_code >>= 1) rev_code = (rev_code << 1) | (cur_code & 1); if (code_size <= TINFL_FAST_LOOKUP_BITS) { mz_int16 k = (mz_int16)((code_size << 9) | sym_index); while (rev_code < TINFL_FAST_LOOKUP_SIZE) { pTable->m_look_up[rev_code] = k; rev_code += (1 << code_size); } continue; } if (0 == (tree_cur = pTable->m_look_up[rev_code & (TINFL_FAST_LOOKUP_SIZE - 1)])) { pTable->m_look_up[rev_code & (TINFL_FAST_LOOKUP_SIZE - 1)] = (mz_int16)tree_next; tree_cur = tree_next; tree_next -= 2; } rev_code >>= (TINFL_FAST_LOOKUP_BITS - 1); for (j = code_size; j > (TINFL_FAST_LOOKUP_BITS + 1); j--) { tree_cur -= ((rev_code >>= 1) & 1); if (!pTable->m_tree[-tree_cur - 1]) { pTable->m_tree[-tree_cur - 1] = (mz_int16)tree_next; tree_cur = tree_next; tree_next -= 2; } else tree_cur = pTable->m_tree[-tree_cur - 1]; } tree_cur -= ((rev_code >>= 1) & 1); pTable->m_tree[-tree_cur - 1] = (mz_int16)sym_index; } if (r->m_type == 2) { for (counter = 0; counter < (r->m_table_sizes[0] + r->m_table_sizes[1]); ) { mz_uint s; TINFL_HUFF_DECODE(16, dist, &r->m_tables[2]); if (dist < 16) { r->m_len_codes[counter++] = (mz_uint8)dist; continue; } if ((dist == 16) && (!counter)) { TINFL_CR_RETURN_FOREVER(17, TINFL_STATUS_FAILED); } num_extra = "\02\03\07"[dist - 16]; TINFL_GET_BITS(18, s, num_extra); s += "\03\03\013"[dist - 16]; TINFL_MEMSET(r->m_len_codes + counter, (dist == 16) ? r->m_len_codes[counter - 1] : 0, s); counter += s; } if ((r->m_table_sizes[0] + r->m_table_sizes[1]) != counter) { TINFL_CR_RETURN_FOREVER(21, TINFL_STATUS_FAILED); } TINFL_MEMCPY(r->m_tables[0].m_code_size, r->m_len_codes, r->m_table_sizes[0]); TINFL_MEMCPY(r->m_tables[1].m_code_size, r->m_len_codes + r->m_table_sizes[0], r->m_table_sizes[1]); } } for ( ; ; ) { mz_uint8 *pSrc; for ( ; ; ) { if (((pIn_buf_end - pIn_buf_cur) < 4) || ((pOut_buf_end - pOut_buf_cur) < 2)) { TINFL_HUFF_DECODE(23, counter, &r->m_tables[0]); if (counter >= 256) break; while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(24, TINFL_STATUS_HAS_MORE_OUTPUT); } *pOut_buf_cur++ = (mz_uint8)counter; } else { int sym2; mz_uint code_len; #if TINFL_USE_64BIT_BITBUF if (num_bits < 30) { bit_buf |= (((tinfl_bit_buf_t)MZ_READ_LE32(pIn_buf_cur)) << num_bits); pIn_buf_cur += 4; num_bits += 32; } #else if (num_bits < 15) { bit_buf |= (((tinfl_bit_buf_t)MZ_READ_LE16(pIn_buf_cur)) << num_bits); pIn_buf_cur += 2; num_bits += 16; } #endif if ((sym2 = r->m_tables[0].m_look_up[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]) >= 0) code_len = sym2 >> 9; else { code_len = TINFL_FAST_LOOKUP_BITS; do { sym2 = r->m_tables[0].m_tree[~sym2 + ((bit_buf >> code_len++) & 1)]; } while (sym2 < 0); } counter = sym2; bit_buf >>= code_len; num_bits -= code_len; if (counter & 256) break; #if !TINFL_USE_64BIT_BITBUF if (num_bits < 15) { bit_buf |= (((tinfl_bit_buf_t)MZ_READ_LE16(pIn_buf_cur)) << num_bits); pIn_buf_cur += 2; num_bits += 16; } #endif if ((sym2 = r->m_tables[0].m_look_up[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]) >= 0) code_len = sym2 >> 9; else { code_len = TINFL_FAST_LOOKUP_BITS; do { sym2 = r->m_tables[0].m_tree[~sym2 + ((bit_buf >> code_len++) & 1)]; } while (sym2 < 0); } bit_buf >>= code_len; num_bits -= code_len; pOut_buf_cur[0] = (mz_uint8)counter; if (sym2 & 256) { pOut_buf_cur++; counter = sym2; break; } pOut_buf_cur[1] = (mz_uint8)sym2; pOut_buf_cur += 2; } } if ((counter &= 511) == 256) break; num_extra = s_length_extra[counter - 257]; counter = s_length_base[counter - 257]; if (num_extra) { mz_uint extra_bits; TINFL_GET_BITS(25, extra_bits, num_extra); counter += extra_bits; } TINFL_HUFF_DECODE(26, dist, &r->m_tables[1]); num_extra = s_dist_extra[dist]; dist = s_dist_base[dist]; if (num_extra) { mz_uint extra_bits; TINFL_GET_BITS(27, extra_bits, num_extra); dist += extra_bits; } dist_from_out_buf_start = pOut_buf_cur - pOut_buf_start; if ((dist > dist_from_out_buf_start) && (decomp_flags & TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF)) { TINFL_CR_RETURN_FOREVER(37, TINFL_STATUS_FAILED); } pSrc = pOut_buf_start + ((dist_from_out_buf_start - dist) & out_buf_size_mask); if ((MZ_MAX(pOut_buf_cur, pSrc) + counter) > pOut_buf_end) { while (counter--) { while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(53, TINFL_STATUS_HAS_MORE_OUTPUT); } *pOut_buf_cur++ = pOut_buf_start[(dist_from_out_buf_start++ - dist) & out_buf_size_mask]; } continue; } #if MINIZ_USE_UNALIGNED_LOADS_AND_STORES else if ((counter >= 9) && (counter <= dist)) { const mz_uint8 *pSrc_end = pSrc + (counter & ~7); do { ((mz_uint32 *)pOut_buf_cur)[0] = ((const mz_uint32 *)pSrc)[0]; ((mz_uint32 *)pOut_buf_cur)[1] = ((const mz_uint32 *)pSrc)[1]; pOut_buf_cur += 8; } while ((pSrc += 8) < pSrc_end); if ((counter &= 7) < 3) { if (counter) { pOut_buf_cur[0] = pSrc[0]; if (counter > 1) pOut_buf_cur[1] = pSrc[1]; pOut_buf_cur += counter; } continue; } } #endif do { pOut_buf_cur[0] = pSrc[0]; pOut_buf_cur[1] = pSrc[1]; pOut_buf_cur[2] = pSrc[2]; pOut_buf_cur += 3; pSrc += 3; } while ((int)(counter -= 3) > 2); if ((int)counter > 0) { pOut_buf_cur[0] = pSrc[0]; if ((int)counter > 1) pOut_buf_cur[1] = pSrc[1]; pOut_buf_cur += counter; } } } } while (!(r->m_final & 1)); if (decomp_flags & TINFL_FLAG_PARSE_ZLIB_HEADER) { TINFL_SKIP_BITS(32, num_bits & 7); for (counter = 0; counter < 4; ++counter) { mz_uint s; if (num_bits) TINFL_GET_BITS(41, s, 8); else TINFL_GET_BYTE(42, s); r->m_z_adler32 = (r->m_z_adler32 << 8) | s; } } TINFL_CR_RETURN_FOREVER(34, TINFL_STATUS_DONE); TINFL_CR_FINISH common_exit: r->m_num_bits = num_bits; r->m_bit_buf = bit_buf; r->m_dist = dist; r->m_counter = counter; r->m_num_extra = num_extra; r->m_dist_from_out_buf_start = dist_from_out_buf_start; *pIn_buf_size = pIn_buf_cur - pIn_buf_next; *pOut_buf_size = pOut_buf_cur - pOut_buf_next; if ((decomp_flags & (TINFL_FLAG_PARSE_ZLIB_HEADER | TINFL_FLAG_COMPUTE_ADLER32)) && (status >= 0)) { const mz_uint8 *ptr = pOut_buf_next; size_t buf_len = *pOut_buf_size; mz_uint32 i, s1 = r->m_check_adler32 & 0xffff, s2 = r->m_check_adler32 >> 16; size_t block_len = buf_len % 5552; while (buf_len) { for (i = 0; i + 7 < block_len; i += 8, ptr += 8) { s1 += ptr[0], s2 += s1; s1 += ptr[1], s2 += s1; s1 += ptr[2], s2 += s1; s1 += ptr[3], s2 += s1; s1 += ptr[4], s2 += s1; s1 += ptr[5], s2 += s1; s1 += ptr[6], s2 += s1; s1 += ptr[7], s2 += s1; } for ( ; i < block_len; ++i) s1 += *ptr++, s2 += s1; s1 %= 65521U, s2 %= 65521U; buf_len -= block_len; block_len = 5552; } r->m_check_adler32 = (s2 << 16) + s1; if ((status == TINFL_STATUS_DONE) && (decomp_flags & TINFL_FLAG_PARSE_ZLIB_HEADER) && (r->m_check_adler32 != r->m_z_adler32)) status = TINFL_STATUS_ADLER32_MISMATCH; } return status; } /* Flush values. For typical usage you only need MZ_NO_FLUSH and MZ_FINISH. The other stuff is for advanced use. */ enum { MZ_NO_FLUSH = 0, MZ_PARTIAL_FLUSH = 1, MZ_SYNC_FLUSH = 2, MZ_FULL_FLUSH = 3, MZ_FINISH = 4, MZ_BLOCK = 5 }; /* Return status codes. MZ_PARAM_ERROR is non-standard. */ enum { MZ_OK = 0, MZ_STREAM_END = 1, MZ_NEED_DICT = 2, MZ_ERRNO = -1, MZ_STREAM_ERROR = -2, MZ_DATA_ERROR = -3, MZ_MEM_ERROR = -4, MZ_BUF_ERROR = -5, MZ_VERSION_ERROR = -6, MZ_PARAM_ERROR = -10000 }; /* Compression levels. */ enum { MZ_NO_COMPRESSION = 0, MZ_BEST_SPEED = 1, MZ_BEST_COMPRESSION = 9, MZ_DEFAULT_COMPRESSION = -1 }; /* Window bits */ #define MZ_DEFAULT_WINDOW_BITS 15 struct mz_internal_state; /* Compression/decompression stream struct. */ typedef struct mz_stream_s { const unsigned char *next_in; /* pointer to next byte to read */ unsigned int avail_in; /* number of bytes available at next_in */ mz_ulong total_in; /* total number of bytes consumed so far */ unsigned char *next_out; /* pointer to next byte to write */ unsigned int avail_out; /* number of bytes that can be written to next_out */ mz_ulong total_out; /* total number of bytes produced so far */ char *msg; /* error msg (unused) */ struct mz_internal_state *state; /* internal state, allocated by zalloc/zfree */ mz_alloc_func zalloc; /* optional heap allocation function (defaults to malloc) */ mz_free_func zfree; /* optional heap free function (defaults to free) */ void *opaque; /* heap alloc function user pointer */ int data_type; /* data_type (unused) */ mz_ulong adler; /* adler32 of the source or uncompressed data */ mz_ulong reserved; /* not used */ } mz_stream; typedef mz_stream *mz_streamp; typedef struct { tinfl_decompressor m_decomp; mz_uint m_dict_ofs, m_dict_avail, m_first_call, m_has_flushed; int m_window_bits; mz_uint8 m_dict[TINFL_LZ_DICT_SIZE]; tinfl_status m_last_status; } inflate_state; static int mz_inflateInit2(mz_streamp pStream, int window_bits) { inflate_state *pDecomp; if (!pStream) return MZ_STREAM_ERROR; if ((window_bits != MZ_DEFAULT_WINDOW_BITS) && (-window_bits != MZ_DEFAULT_WINDOW_BITS)) return MZ_PARAM_ERROR; pStream->data_type = 0; pStream->adler = 0; pStream->msg = NULL; pStream->total_in = 0; pStream->total_out = 0; pStream->reserved = 0; /* if (!pStream->zalloc) pStream->zalloc = def_alloc_func; */ /* if (!pStream->zfree) pStream->zfree = def_free_func; */ pDecomp = (inflate_state*)pStream->zalloc(pStream->opaque, 1, sizeof(inflate_state)); if (!pDecomp) return MZ_MEM_ERROR; pStream->state = (struct mz_internal_state *)pDecomp; tinfl_init(&pDecomp->m_decomp); pDecomp->m_dict_ofs = 0; pDecomp->m_dict_avail = 0; pDecomp->m_last_status = TINFL_STATUS_NEEDS_MORE_INPUT; pDecomp->m_first_call = 1; pDecomp->m_has_flushed = 0; pDecomp->m_window_bits = window_bits; return MZ_OK; } static int mz_inflate(mz_streamp pStream, int flush) { inflate_state* pState; mz_uint n, first_call, decomp_flags = TINFL_FLAG_COMPUTE_ADLER32; size_t in_bytes, out_bytes, orig_avail_in; tinfl_status status; if ((!pStream) || (!pStream->state)) return MZ_STREAM_ERROR; if (flush == MZ_PARTIAL_FLUSH) flush = MZ_SYNC_FLUSH; if ((flush) && (flush != MZ_SYNC_FLUSH) && (flush != MZ_FINISH)) return MZ_STREAM_ERROR; pState = (inflate_state*)pStream->state; if (pState->m_window_bits > 0) decomp_flags |= TINFL_FLAG_PARSE_ZLIB_HEADER; orig_avail_in = pStream->avail_in; first_call = pState->m_first_call; pState->m_first_call = 0; if (pState->m_last_status < 0) return MZ_DATA_ERROR; if (pState->m_has_flushed && (flush != MZ_FINISH)) return MZ_STREAM_ERROR; pState->m_has_flushed |= (flush == MZ_FINISH); if ((flush == MZ_FINISH) && (first_call)) { /* MZ_FINISH on the first call implies that the input and output buffers are large enough to hold the entire compressed/decompressed file. */ decomp_flags |= TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF; in_bytes = pStream->avail_in; out_bytes = pStream->avail_out; status = tinfl_decompress(&pState->m_decomp, pStream->next_in, &in_bytes, pStream->next_out, pStream->next_out, &out_bytes, decomp_flags); pState->m_last_status = status; pStream->next_in += (mz_uint)in_bytes; pStream->avail_in -= (mz_uint)in_bytes; pStream->total_in += (mz_uint)in_bytes; pStream->adler = tinfl_get_adler32(&pState->m_decomp); pStream->next_out += (mz_uint)out_bytes; pStream->avail_out -= (mz_uint)out_bytes; pStream->total_out += (mz_uint)out_bytes; if (status < 0) return MZ_DATA_ERROR; else if (status != TINFL_STATUS_DONE) { pState->m_last_status = TINFL_STATUS_FAILED; return MZ_BUF_ERROR; } return MZ_STREAM_END; } /* flush != MZ_FINISH then we must assume there's more input. */ if (flush != MZ_FINISH) decomp_flags |= TINFL_FLAG_HAS_MORE_INPUT; if (pState->m_dict_avail) { n = MZ_MIN(pState->m_dict_avail, pStream->avail_out); memcpy(pStream->next_out, pState->m_dict + pState->m_dict_ofs, n); pStream->next_out += n; pStream->avail_out -= n; pStream->total_out += n; pState->m_dict_avail -= n; pState->m_dict_ofs = (pState->m_dict_ofs + n) & (TINFL_LZ_DICT_SIZE - 1); return ((pState->m_last_status == TINFL_STATUS_DONE) && (!pState->m_dict_avail)) ? MZ_STREAM_END : MZ_OK; } for ( ; ; ) { in_bytes = pStream->avail_in; out_bytes = TINFL_LZ_DICT_SIZE - pState->m_dict_ofs; status = tinfl_decompress(&pState->m_decomp, pStream->next_in, &in_bytes, pState->m_dict, pState->m_dict + pState->m_dict_ofs, &out_bytes, decomp_flags); pState->m_last_status = status; pStream->next_in += (mz_uint)in_bytes; pStream->avail_in -= (mz_uint)in_bytes; pStream->total_in += (mz_uint)in_bytes; pStream->adler = tinfl_get_adler32(&pState->m_decomp); pState->m_dict_avail = (mz_uint)out_bytes; n = MZ_MIN(pState->m_dict_avail, pStream->avail_out); memcpy(pStream->next_out, pState->m_dict + pState->m_dict_ofs, n); pStream->next_out += n; pStream->avail_out -= n; pStream->total_out += n; pState->m_dict_avail -= n; pState->m_dict_ofs = (pState->m_dict_ofs + n) & (TINFL_LZ_DICT_SIZE - 1); if (status < 0) return MZ_DATA_ERROR; /* Stream is corrupted (there could be some uncompressed data left in the output dictionary - oh well). */ else if ((status == TINFL_STATUS_NEEDS_MORE_INPUT) && (!orig_avail_in)) return MZ_BUF_ERROR; /* Signal caller that we can't make forward progress without supplying more input or by setting flush to MZ_FINISH. */ else if (flush == MZ_FINISH) { /* The output buffer MUST be large to hold the remaining uncompressed data when flush==MZ_FINISH. */ if (status == TINFL_STATUS_DONE) return pState->m_dict_avail ? MZ_BUF_ERROR : MZ_STREAM_END; /* status here must be TINFL_STATUS_HAS_MORE_OUTPUT, which means there's at least 1 more byte on the way. If there's no more room left in the output buffer then something is wrong. */ else if (!pStream->avail_out) return MZ_BUF_ERROR; } else if ((status == TINFL_STATUS_DONE) || (!pStream->avail_in) || (!pStream->avail_out) || (pState->m_dict_avail)) break; } return ((status == TINFL_STATUS_DONE) && (!pState->m_dict_avail)) ? MZ_STREAM_END : MZ_OK; } static int mz_inflateEnd(mz_streamp pStream) { if (!pStream) return MZ_STREAM_ERROR; if (pStream->state) { pStream->zfree(pStream->opaque, pStream->state); pStream->state = NULL; } return MZ_OK; } /* make this a drop-in replacement for zlib... */ #define voidpf void* #define uInt unsigned int #define z_stream mz_stream #define inflateInit2 mz_inflateInit2 #define inflate mz_inflate #define inflateEnd mz_inflateEnd #define Z_SYNC_FLUSH MZ_SYNC_FLUSH #define Z_FINISH MZ_FINISH #define Z_OK MZ_OK #define Z_STREAM_END MZ_STREAM_END #define Z_NEED_DICT MZ_NEED_DICT #define Z_ERRNO MZ_ERRNO #define Z_STREAM_ERROR MZ_STREAM_ERROR #define Z_DATA_ERROR MZ_DATA_ERROR #define Z_MEM_ERROR MZ_MEM_ERROR #define Z_BUF_ERROR MZ_BUF_ERROR #define Z_VERSION_ERROR MZ_VERSION_ERROR #define MAX_WBITS 15 #endif /* #ifndef TINFL_HEADER_FILE_ONLY */ /* This is free and unencumbered software released into the public domain. Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means. In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. For more information, please refer to */ ================================================ FILE: src/libraries/physfs/physfs_platform_android.c ================================================ /* * Android support routines for PhysicsFS. * * Please see the file LICENSE.txt in the source's root directory. * * This file written by Ryan C. Gordon. */ #define __PHYSICSFS_INTERNAL__ #include "physfs_platforms.h" #ifdef PHYSFS_PLATFORM_ANDROID #include #include #include "physfs_internal.h" static char *prefpath = NULL; int __PHYSFS_platformInit(void) { return 1; /* always succeed. */ } /* __PHYSFS_platformInit */ void __PHYSFS_platformDeinit(void) { if (prefpath) { allocator.Free(prefpath); prefpath = NULL; } /* if */ } /* __PHYSFS_platformDeinit */ void __PHYSFS_platformDetectAvailableCDs(PHYSFS_StringCallback cb, void *data) { /* no-op. */ } /* __PHYSFS_platformDetectAvailableCDs */ char *__PHYSFS_platformCalcBaseDir(const char *argv0) { /* as a cheat, we expect argv0 to be a PHYSFS_AndroidInit* on Android. */ PHYSFS_AndroidInit *ainit = (PHYSFS_AndroidInit *) argv0; char *retval = NULL; JNIEnv *jenv = NULL; jobject jcontext; if (ainit == NULL) return __PHYSFS_strdup("/"); /* oh well. */ jenv = (JNIEnv *) ainit->jnienv; jcontext = (jobject) ainit->context; if ((*jenv)->PushLocalFrame(jenv, 16) >= 0) { jobject jfileobj = 0; jmethodID jmeth = 0; jthrowable jexception = 0; jstring jstr = 0; jmeth = (*jenv)->GetMethodID(jenv, (*jenv)->GetObjectClass(jenv, jcontext), "getPackageResourcePath", "()Ljava/lang/String;"); jstr = (jstring)(*jenv)->CallObjectMethod(jenv, jcontext, jmeth); jexception = (*jenv)->ExceptionOccurred(jenv); /* this can't throw an exception, right? Just in case. */ if (jexception != NULL) (*jenv)->ExceptionClear(jenv); else { const char *path = (*jenv)->GetStringUTFChars(jenv, jstr, NULL); retval = __PHYSFS_strdup(path); (*jenv)->ReleaseStringUTFChars(jenv, jstr, path); } /* else */ /* We only can rely on the Activity being valid during this function call, so go ahead and grab the prefpath too. */ jmeth = (*jenv)->GetMethodID(jenv, (*jenv)->GetObjectClass(jenv, jcontext), "getFilesDir", "()Ljava/io/File;"); jfileobj = (*jenv)->CallObjectMethod(jenv, jcontext, jmeth); if (jfileobj) { jmeth = (*jenv)->GetMethodID(jenv, (*jenv)->GetObjectClass(jenv, jfileobj), "getCanonicalPath", "()Ljava/lang/String;"); jstr = (jstring)(*jenv)->CallObjectMethod(jenv, jfileobj, jmeth); jexception = (*jenv)->ExceptionOccurred(jenv); if (jexception != NULL) (*jenv)->ExceptionClear(jenv); else { const char *path = (*jenv)->GetStringUTFChars(jenv, jstr, NULL); const size_t len = strlen(path) + 2; prefpath = allocator.Malloc(len); if (prefpath) snprintf(prefpath, len, "%s/", path); (*jenv)->ReleaseStringUTFChars(jenv, jstr, path); } /* else */ } /* if */ (*jenv)->PopLocalFrame(jenv, NULL); } /* if */ /* we can't return NULL because then PhysicsFS will treat argv0 as a string, but it's a non-NULL jobject! */ if (retval == NULL) retval = __PHYSFS_strdup("/"); /* we pray this works. */ return retval; } /* __PHYSFS_platformCalcBaseDir */ char *__PHYSFS_platformCalcPrefDir(const char *org, const char *app) { return __PHYSFS_strdup(prefpath ? prefpath : "/"); } /* __PHYSFS_platformCalcPrefDir */ #endif /* PHYSFS_PLATFORM_ANDROID */ /* end of physfs_platform_android.c ... */ ================================================ FILE: src/libraries/physfs/physfs_platform_apple.m ================================================ /* * Apple platform (macOS, iOS, watchOS, etc) support routines for PhysicsFS. * * Please see the file LICENSE.txt in the source's root directory. * * This file written by Ryan C. Gordon. */ #define __PHYSICSFS_INTERNAL__ #include "physfs_platforms.h" #ifdef PHYSFS_PLATFORM_APPLE #include #include #include "physfs_internal.h" int __PHYSFS_platformInit(void) { return 1; /* success. */ } /* __PHYSFS_platformInit */ void __PHYSFS_platformDeinit(void) { /* no-op */ } /* __PHYSFS_platformDeinit */ char *__PHYSFS_platformCalcBaseDir(const char *argv0) { @autoreleasepool { NSString *path = [[NSBundle mainBundle] bundlePath]; BAIL_IF(!path, PHYSFS_ERR_OS_ERROR, NULL); size_t len = [path lengthOfBytesUsingEncoding:NSUTF8StringEncoding]; char *retval = (char *) allocator.Malloc(len + 2); BAIL_IF(!retval, PHYSFS_ERR_OUT_OF_MEMORY, NULL); [path getCString:retval maxLength:len+1 encoding:NSUTF8StringEncoding]; retval[len] = '/'; retval[len+1] = '\0'; return retval; /* whew. */ } /* @autoreleasepool */ } /* __PHYSFS_platformCalcBaseDir */ char *__PHYSFS_platformCalcPrefDir(const char *org, const char *app) { @autoreleasepool { NSArray *paths = NSSearchPathForDirectoriesInDomains(NSApplicationSupportDirectory, NSUserDomainMask, TRUE); BAIL_IF(!paths, PHYSFS_ERR_OS_ERROR, NULL); NSString *path = (NSString *) [paths objectAtIndex:0]; BAIL_IF(!path, PHYSFS_ERR_OS_ERROR, NULL); size_t len = [path lengthOfBytesUsingEncoding:NSUTF8StringEncoding]; const size_t applen = strlen(app); char *retval = (char *) allocator.Malloc(len + applen + 3); BAIL_IF(!retval, PHYSFS_ERR_OUT_OF_MEMORY, NULL); [path getCString:retval maxLength:len+1 encoding:NSUTF8StringEncoding]; snprintf(retval + len, applen + 3, "/%s/", app); return retval; /* whew. */ } /* @autoreleasepool */ } /* __PHYSFS_platformCalcPrefDir */ /* CD-ROM detection code... */ /* * Code based on sample from Apple Developer Connection: * https://developer.apple.com/samplecode/Sample_Code/Devices_and_Hardware/Disks/VolumeToBSDNode/VolumeToBSDNode.c.htm */ #if !defined(PHYSFS_NO_CDROM_SUPPORT) #include #include #include #include #include static int darwinIsWholeMedia(io_service_t service) { int retval = 0; CFTypeRef wholeMedia; if (!IOObjectConformsTo(service, kIOMediaClass)) return 0; wholeMedia = IORegistryEntryCreateCFProperty(service, CFSTR(kIOMediaWholeKey), NULL, 0); if (wholeMedia == NULL) return 0; retval = CFBooleanGetValue(wholeMedia); CFRelease(wholeMedia); return retval; } /* darwinIsWholeMedia */ static int darwinIsMountedDisc(char *bsdName, mach_port_t mainPort) { int retval = 0; CFMutableDictionaryRef matchingDict; kern_return_t rc; io_iterator_t iter; io_service_t service; if ((matchingDict = IOBSDNameMatching(mainPort, 0, bsdName)) == NULL) return 0; rc = IOServiceGetMatchingServices(mainPort, matchingDict, &iter); if ((rc != KERN_SUCCESS) || (!iter)) return 0; service = IOIteratorNext(iter); IOObjectRelease(iter); if (!service) return 0; rc = IORegistryEntryCreateIterator(service, kIOServicePlane, kIORegistryIterateRecursively | kIORegistryIterateParents, &iter); if (!iter) return 0; if (rc != KERN_SUCCESS) { IOObjectRelease(iter); return 0; } /* if */ IOObjectRetain(service); /* add an extra object reference... */ do { if (darwinIsWholeMedia(service)) { if ( (IOObjectConformsTo(service, kIOCDMediaClass)) || (IOObjectConformsTo(service, kIODVDMediaClass)) ) { retval = 1; } /* if */ } /* if */ IOObjectRelease(service); } while ((service = IOIteratorNext(iter)) && (!retval)); IOObjectRelease(iter); IOObjectRelease(service); return retval; } /* darwinIsMountedDisc */ #endif /* !defined(PHYSFS_NO_CDROM_SUPPORT) */ void __PHYSFS_platformDetectAvailableCDs(PHYSFS_StringCallback cb, void *data) { #if !defined(PHYSFS_NO_CDROM_SUPPORT) /* macOS 12.0 changed "master" names to "main". */ typedef kern_return_t (*ioMainPortFn)(mach_port_t, mach_port_t *); static ioMainPortFn ioMainPort = NULL; const char *devPrefix = "/dev/"; const int prefixLen = strlen(devPrefix); mach_port_t mainPort = 0; struct statfs *mntbufp; int i, mounts; if (ioMainPort == NULL) { ioMainPort = (ioMainPortFn) dlsym(RTLD_DEFAULT, "IOMainPort"); if (!ioMainPort) ioMainPort = (ioMainPortFn) dlsym(RTLD_DEFAULT, "IOMasterPort"); if (!ioMainPort) return; /* oh well, no CD-ROMs for you. */ } /* if */ if (ioMainPort(MACH_PORT_NULL, &mainPort) != KERN_SUCCESS) BAIL(PHYSFS_ERR_OS_ERROR, ) /*return void*/; mounts = getmntinfo(&mntbufp, MNT_WAIT); /* NOT THREAD SAFE! */ for (i = 0; i < mounts; i++) { char *dev = mntbufp[i].f_mntfromname; char *mnt = mntbufp[i].f_mntonname; if (strncmp(dev, devPrefix, prefixLen) != 0) /* a virtual device? */ continue; dev += prefixLen; if (darwinIsMountedDisc(dev, mainPort)) cb(data, mnt); } /* for */ #endif /* !defined(PHYSFS_NO_CDROM_SUPPORT) */ } /* __PHYSFS_platformDetectAvailableCDs */ #endif /* PHYSFS_PLATFORM_APPLE */ /* end of physfs_platform_apple.m ... */ ================================================ FILE: src/libraries/physfs/physfs_platform_haiku.cpp ================================================ /* * Haiku platform-dependent support routines for PhysicsFS. * * Please see the file LICENSE.txt in the source's root directory. * * This file written by Ryan C. Gordon. */ #define __PHYSICSFS_INTERNAL__ #include "physfs_platforms.h" #ifdef PHYSFS_PLATFORM_HAIKU #include #include #include #include #include #include #include #include #include #include #include #include "physfs_internal.h" int __PHYSFS_platformInit(void) { return 1; /* always succeed. */ } /* __PHYSFS_platformInit */ void __PHYSFS_platformDeinit(void) { /* no-op */ } /* __PHYSFS_platformDeinit */ static char *getMountPoint(const char *devname, char *buf, size_t bufsize) { BVolumeRoster mounts; BVolume vol; mounts.Rewind(); while (mounts.GetNextVolume(&vol) == B_NO_ERROR) { fs_info fsinfo; fs_stat_dev(vol.Device(), &fsinfo); if (strcmp(devname, fsinfo.device_name) == 0) { BDirectory directory; BEntry entry; BPath path; const char *str; if ( (vol.GetRootDirectory(&directory) < B_OK) || (directory.GetEntry(&entry) < B_OK) || (entry.GetPath(&path) < B_OK) || ( (str = path.Path()) == NULL) ) return NULL; strncpy(buf, str, bufsize-1); buf[bufsize-1] = '\0'; return buf; } /* if */ } /* while */ return NULL; } /* getMountPoint */ /* * This function is lifted from Simple Directmedia Layer (SDL): * https://www.libsdl.org/ ... this is zlib-licensed code, too. */ static void tryDir(const char *d, PHYSFS_StringCallback callback, void *data) { BDirectory dir; dir.SetTo(d); if (dir.InitCheck() != B_NO_ERROR) return; dir.Rewind(); BEntry entry; while (dir.GetNextEntry(&entry) >= 0) { BPath path; const char *name; entry_ref e; if (entry.GetPath(&path) != B_NO_ERROR) continue; name = path.Path(); if (entry.GetRef(&e) != B_NO_ERROR) continue; if (entry.IsDirectory()) { if (strcmp(e.name, "floppy") != 0) tryDir(name, callback, data); continue; } /* if */ const int devfd = open(name, O_RDONLY); if (devfd < 0) continue; device_geometry g; const int rc = ioctl(devfd, B_GET_GEOMETRY, &g, sizeof (g)); close(devfd); if (rc < 0) continue; if (g.device_type != B_CD) continue; char mntpnt[B_FILE_NAME_LENGTH]; if (getMountPoint(name, mntpnt, sizeof (mntpnt))) callback(data, mntpnt); } /* while */ } /* tryDir */ void __PHYSFS_platformDetectAvailableCDs(PHYSFS_StringCallback cb, void *data) { tryDir("/dev/disk", cb, data); } /* __PHYSFS_platformDetectAvailableCDs */ static team_id getTeamID(void) { thread_info info; thread_id tid = find_thread(NULL); get_thread_info(tid, &info); return info.team; } /* getTeamID */ char *__PHYSFS_platformCalcBaseDir(const char *argv0) { image_info info; int32 cookie = 0; while (get_next_image_info(0, &cookie, &info) == B_OK) { if (info.type == B_APP_IMAGE) break; } /* while */ BEntry entry(info.name, true); BPath path; status_t rc = entry.GetPath(&path); /* (path) now has binary's path. */ assert(rc == B_OK); rc = path.GetParent(&path); /* chop filename, keep directory. */ assert(rc == B_OK); const char *str = path.Path(); assert(str != NULL); const size_t len = strlen(str); char *retval = (char *) allocator.Malloc(len + 2); BAIL_IF(!retval, PHYSFS_ERR_OUT_OF_MEMORY, NULL); strcpy(retval, str); retval[len] = '/'; retval[len+1] = '\0'; return retval; } /* __PHYSFS_platformCalcBaseDir */ char *__PHYSFS_platformCalcPrefDir(const char *org, const char *app) { const char *userdir = __PHYSFS_getUserDir(); const char *append = "config/settings/"; const size_t len = strlen(userdir) + strlen(append) + strlen(app) + 2; char *retval = (char *) allocator.Malloc(len); BAIL_IF(!retval, PHYSFS_ERR_OUT_OF_MEMORY, NULL); snprintf(retval, len, "%s%s%s/", userdir, append, app); return retval; } /* __PHYSFS_platformCalcPrefDir */ #endif /* PHYSFS_PLATFORM_HAIKU */ /* end of physfs_platform_haiku.cpp ... */ ================================================ FILE: src/libraries/physfs/physfs_platform_os2.c ================================================ /* * OS/2 support routines for PhysicsFS. * * Please see the file LICENSE.txt in the source's root directory. * * This file written by Ryan C. Gordon. */ #define __PHYSICSFS_INTERNAL__ #include "physfs_platforms.h" #ifdef PHYSFS_PLATFORM_OS2 #define INCL_DOSMODULEMGR #define INCL_DOSSEMAPHORES #define INCL_DOSDATETIME #define INCL_DOSFILEMGR #define INCL_DOSMODULEMGR #define INCL_DOSERRORS #define INCL_DOSPROCESS #define INCL_DOSDEVICES #define INCL_DOSDEVIOCTL #define INCL_DOSMISC #include #include #include #include #include #include "physfs_internal.h" static HMODULE uconvdll = 0; static UconvObject uconv = 0; static int (_System *pUniCreateUconvObject)(UniChar *, UconvObject *) = NULL; static int (_System *pUniFreeUconvObject)(UconvObject *) = NULL; static int (_System *pUniUconvToUcs)(UconvObject,void **,size_t *, UniChar**, size_t *, size_t *) = NULL; static int (_System *pUniUconvFromUcs)(UconvObject,UniChar **,size_t *,void **,size_t *,size_t *) = NULL; static PHYSFS_ErrorCode errcodeFromAPIRET(const APIRET rc) { switch (rc) { case NO_ERROR: return PHYSFS_ERR_OK; /* not an error. */ case ERROR_INTERRUPT: return PHYSFS_ERR_OK; /* not an error. */ case ERROR_TIMEOUT: return PHYSFS_ERR_OK; /* not an error. */ case ERROR_NOT_ENOUGH_MEMORY: return PHYSFS_ERR_OUT_OF_MEMORY; case ERROR_FILE_NOT_FOUND: return PHYSFS_ERR_NOT_FOUND; case ERROR_PATH_NOT_FOUND: return PHYSFS_ERR_NOT_FOUND; case ERROR_ACCESS_DENIED: return PHYSFS_ERR_PERMISSION; case ERROR_NOT_DOS_DISK: return PHYSFS_ERR_NOT_FOUND; case ERROR_SHARING_VIOLATION: return PHYSFS_ERR_PERMISSION; case ERROR_CANNOT_MAKE: return PHYSFS_ERR_IO; /* maybe this is wrong? */ case ERROR_DEVICE_IN_USE: return PHYSFS_ERR_BUSY; case ERROR_OPEN_FAILED: return PHYSFS_ERR_IO; /* maybe this is wrong? */ case ERROR_DISK_FULL: return PHYSFS_ERR_NO_SPACE; case ERROR_PIPE_BUSY: return PHYSFS_ERR_BUSY; case ERROR_SHARING_BUFFER_EXCEEDED: return PHYSFS_ERR_IO; case ERROR_FILENAME_EXCED_RANGE: return PHYSFS_ERR_BAD_FILENAME; case ERROR_META_EXPANSION_TOO_LONG: return PHYSFS_ERR_BAD_FILENAME; case ERROR_TOO_MANY_HANDLES: return PHYSFS_ERR_IO; case ERROR_TOO_MANY_OPEN_FILES: return PHYSFS_ERR_IO; case ERROR_NO_MORE_SEARCH_HANDLES: return PHYSFS_ERR_IO; case ERROR_SEEK_ON_DEVICE: return PHYSFS_ERR_IO; case ERROR_NEGATIVE_SEEK: return PHYSFS_ERR_INVALID_ARGUMENT; case ERROR_WRITE_PROTECT: return PHYSFS_ERR_PERMISSION; case ERROR_WRITE_FAULT: return PHYSFS_ERR_IO; case ERROR_UNCERTAIN_MEDIA: return PHYSFS_ERR_IO; case ERROR_PROTECTION_VIOLATION: return PHYSFS_ERR_IO; case ERROR_BROKEN_PIPE: return PHYSFS_ERR_IO; /* !!! FIXME: some of these might be PHYSFS_ERR_BAD_FILENAME, etc */ case ERROR_LOCK_VIOLATION: case ERROR_GEN_FAILURE: case ERROR_INVALID_PARAMETER: case ERROR_INVALID_NAME: case ERROR_INVALID_DRIVE: case ERROR_INVALID_HANDLE: case ERROR_INVALID_FUNCTION: case ERROR_INVALID_LEVEL: case ERROR_INVALID_CATEGORY: case ERROR_DUPLICATE_NAME: case ERROR_BUFFER_OVERFLOW: case ERROR_BAD_LENGTH: case ERROR_BAD_DRIVER_LEVEL: case ERROR_DIRECT_ACCESS_HANDLE: case ERROR_NOT_OWNER: return PHYSFS_ERR_OS_ERROR; default: break; } /* switch */ return PHYSFS_ERR_OTHER_ERROR; } /* errcodeFromAPIRET */ static char *cvtUtf8ToCodepage(const char *utf8str) { const size_t len = strlen(utf8str) + 1; const size_t uc2buflen = len * sizeof (UniChar); UniChar *uc2ptr = (UniChar *) __PHYSFS_smallAlloc(uc2buflen); UniChar *uc2str = uc2ptr; char *cpptr = NULL; char *cpstr = NULL; size_t subs = 0; size_t unilen; BAIL_IF(!uc2str, PHYSFS_ERR_OUT_OF_MEMORY, NULL); PHYSFS_utf8ToUcs2(utf8str, (PHYSFS_uint16 *) uc2str, uc2buflen); for (unilen = 0; uc2str[unilen]; unilen++) { /* spin */ } unilen++; /* null terminator. */ if (!uconvdll) { /* There's really not much we can do on older OS/2s except pray this is latin1-compatible. */ size_t i; cpptr = (char *) allocator.Malloc(unilen); cpstr = cpptr; GOTO_IF(!cpptr, PHYSFS_ERR_OUT_OF_MEMORY, failed); for (i = 0; i < unilen; i++) { const UniChar ch = uc2str[i]; GOTO_IF(ch > 0xFF, PHYSFS_ERR_BAD_FILENAME, failed); cpptr[i] = (char) ((unsigned char) ch); } /* for */ __PHYSFS_smallFree(uc2ptr); return cpstr; } /* if */ else { int rc; size_t cplen = unilen * 4; /* overallocate, just in case. */ cpptr = (char *) allocator.Malloc(cplen); GOTO_IF(!cpptr, PHYSFS_ERR_OUT_OF_MEMORY, failed); cpstr = cpptr; rc = pUniUconvFromUcs(uconv, &uc2str, &unilen, (void **) &cpstr, &cplen, &subs); GOTO_IF(rc != ULS_SUCCESS, PHYSFS_ERR_BAD_FILENAME, failed); GOTO_IF(subs > 0, PHYSFS_ERR_BAD_FILENAME, failed); assert(unilen == 0); __PHYSFS_smallFree(uc2ptr); return cpptr; } /* else */ failed: __PHYSFS_smallFree(uc2ptr); allocator.Free(cpptr); return NULL; } /* cvtUtf8ToCodepage */ static char *cvtCodepageToUtf8(const char *cpstr) { const size_t len = strlen(cpstr) + 1; char *retvalbuf = (char *) allocator.Malloc(len * 4); char *retval = NULL; BAIL_IF(!retvalbuf, PHYSFS_ERR_OUT_OF_MEMORY, NULL); if (!uconvdll) { /* There's really not much we can do on older OS/2s except pray this is latin1-compatible. */ retval = retvalbuf; PHYSFS_utf8FromLatin1(cpstr, retval, len * 4); } /* if */ else { int rc; size_t cplen = len; size_t unilen = len; size_t subs = 0; UniChar *uc2ptr = __PHYSFS_smallAlloc(len * sizeof (UniChar)); UniChar *uc2str = uc2ptr; BAIL_IF(!uc2ptr, PHYSFS_ERR_OUT_OF_MEMORY, NULL); rc = pUniUconvToUcs(uconv, (void **) &cpstr, &cplen, &uc2str, &unilen, &subs); GOTO_IF(rc != ULS_SUCCESS, PHYSFS_ERR_BAD_FILENAME, done); GOTO_IF(subs > 0, PHYSFS_ERR_BAD_FILENAME, done); assert(cplen == 0); retval = retvalbuf; PHYSFS_utf8FromUcs2((const PHYSFS_uint16 *) uc2ptr, retval, len * 4); done: __PHYSFS_smallFree(uc2ptr); } /* else */ return retval; } /* cvtCodepageToUtf8 */ /* (be gentle, this function isn't very robust.) */ static char *cvtPathToCorrectCase(char *buf) { char *retval = buf; char *fname = buf + 3; /* point to first element. */ char *ptr = strchr(fname, '\\'); /* find end of first element. */ buf[0] = toupper(buf[0]); /* capitalize drive letter. */ /* * Go through each path element, and enumerate its parent dir until * a case-insensitive match is found. If one is (and it SHOULD be) * then overwrite the original element with the correct case. * If there's an error, or the path has vanished for some reason, it * won't hurt to have the original case, so we just keep going. */ while ((fname != NULL) && (*fname != '\0')) { char spec[CCHMAXPATH]; FILEFINDBUF3 fb; HDIR hdir = HDIR_CREATE; ULONG count = 1; APIRET rc; *(fname - 1) = '\0'; /* isolate parent dir string. */ strcpy(spec, buf); /* copy isolated parent dir... */ strcat(spec, "\\*.*"); /* ...and add wildcard search spec. */ if (ptr != NULL) /* isolate element to find (fname is the start). */ *ptr = '\0'; rc = DosFindFirst(spec, &hdir, FILE_DIRECTORY, &fb, sizeof (fb), &count, FIL_STANDARD); if (rc == NO_ERROR) { while (count == 1) /* while still entries to enumerate... */ { int cmp; char *utf8 = cvtCodepageToUtf8(fb.achName); if (!utf8) /* ugh, maybe we'll get lucky with the C runtime. */ cmp = stricmp(fb.achName, fname); else { cmp = PHYSFS_utf8stricmp(utf8, fname); allocator.Free(utf8); } /* else */ if (cmp == 0) { strcpy(fname, fb.achName); break; /* there it is. Overwrite and stop searching. */ } /* if */ DosFindNext(hdir, &fb, sizeof (fb), &count); } /* while */ DosFindClose(hdir); } /* if */ *(fname - 1) = '\\'; /* unisolate parent dir. */ fname = ptr; /* point to next element. */ if (ptr != NULL) { *ptr = '\\'; /* unisolate element. */ ptr = strchr(++fname, '\\'); /* find next element. */ } /* if */ } /* while */ return retval; } /* cvtPathToCorrectCase */ static void prepUnicodeSupport(void) { /* really old OS/2 might not have Unicode support _at all_, so load the system library and do without if it doesn't exist. */ int ok = 0; char buf[CCHMAXPATH]; UniChar defstr[] = { 0 }; if (DosLoadModule(buf, sizeof (buf) - 1, "uconv", &uconvdll) == NO_ERROR) { #define LOAD(x) (DosQueryProcAddr(uconvdll,0,#x,(PFN*)&p##x)==NO_ERROR) ok = LOAD(UniCreateUconvObject) && LOAD(UniFreeUconvObject) && LOAD(UniUconvToUcs) && LOAD(UniUconvFromUcs); #undef LOAD } /* else */ if (!ok || (pUniCreateUconvObject(defstr, &uconv) != ULS_SUCCESS)) { /* oh well, live without it. */ if (uconvdll) { if (uconv) pUniFreeUconvObject(uconv); DosFreeModule(uconvdll); uconvdll = 0; } /* if */ } /* if */ } /* prepUnicodeSupport */ int __PHYSFS_platformInit(void) { prepUnicodeSupport(); return 1; /* ready to go! */ } /* __PHYSFS_platformInit */ void __PHYSFS_platformDeinit(void) { if (uconvdll) { pUniFreeUconvObject(uconv); uconv = 0; DosFreeModule(uconvdll); uconvdll = 0; } /* if */ } /* __PHYSFS_platformDeinit */ static int discIsInserted(ULONG drive) { int rc; char buf[20]; DosError(FERR_DISABLEHARDERR | FERR_DISABLEEXCEPTION); rc = DosQueryFSInfo(drive + 1, FSIL_VOLSER, buf, sizeof (buf)); DosError(FERR_ENABLEHARDERR | FERR_ENABLEEXCEPTION); return (rc == NO_ERROR); } /* is_cdrom_inserted */ /* looks like "CD01" in ASCII (littleendian)...used for an ioctl. */ #define CD01 0x31304443 static int isCdRomDrive(ULONG drive) { PHYSFS_uint32 param, data; ULONG ul1, ul2; APIRET rc; HFILE hfile = NULLHANDLE; char drivename[3] = { 0, ':', '\0' }; drivename[0] = 'A' + drive; rc = DosOpen(drivename, &hfile, &ul1, 0, 0, OPEN_ACTION_OPEN_IF_EXISTS | OPEN_ACTION_FAIL_IF_NEW, OPEN_FLAGS_DASD | OPEN_FLAGS_FAIL_ON_ERROR | OPEN_FLAGS_NOINHERIT | OPEN_SHARE_DENYNONE, NULL); if (rc != NO_ERROR) return 0; data = 0; param = PHYSFS_swapULE32(CD01); ul1 = ul2 = sizeof (PHYSFS_uint32); rc = DosDevIOCtl(hfile, IOCTL_CDROMDISK, CDROMDISK_GETDRIVER, ¶m, sizeof (param), &ul1, &data, sizeof (data), &ul2); DosClose(hfile); return ((rc == NO_ERROR) && (PHYSFS_swapULE32(data) == CD01)); } /* isCdRomDrive */ void __PHYSFS_platformDetectAvailableCDs(PHYSFS_StringCallback cb, void *data) { ULONG dummy = 0; ULONG drivemap = 0; ULONG i, bit; const APIRET rc = DosQueryCurrentDisk(&dummy, &drivemap); BAIL_IF(rc != NO_ERROR, errcodeFromAPIRET(rc),); for (i = 0, bit = 1; i < 26; i++, bit <<= 1) { if (drivemap & bit) /* this logical drive exists. */ { if ((isCdRomDrive(i)) && (discIsInserted(i))) { char drive[4] = "x:\\"; drive[0] = ('A' + i); cb(data, drive); } /* if */ } /* if */ } /* for */ } /* __PHYSFS_platformDetectAvailableCDs */ char *__PHYSFS_platformCalcBaseDir(const char *argv0) { char *retval = NULL; char buf[CCHMAXPATH]; APIRET rc; PTIB ptib; PPIB ppib; PHYSFS_sint32 len; rc = DosGetInfoBlocks(&ptib, &ppib); BAIL_IF(rc != NO_ERROR, errcodeFromAPIRET(rc), 0); rc = DosQueryModuleName(ppib->pib_hmte, sizeof (buf), (PCHAR) buf); BAIL_IF(rc != NO_ERROR, errcodeFromAPIRET(rc), 0); retval = cvtCodepageToUtf8(buf); BAIL_IF_ERRPASS(!retval, NULL); /* chop off filename, leave path. */ for (len = strlen(retval) - 1; len >= 0; len--) { if (retval[len] == '\\') { retval[len + 1] = '\0'; break; } /* if */ } /* for */ assert(len > 0); /* should have been a "x:\\" on the front on string. */ /* The string is capitalized! Figure out the REAL case... */ return cvtPathToCorrectCase(retval); } /* __PHYSFS_platformCalcBaseDir */ char *__PHYSFS_platformCalcUserDir(void) { return __PHYSFS_platformCalcBaseDir(NULL); /* !!! FIXME: ? */ } /* __PHYSFS_platformCalcUserDir */ char *__PHYSFS_platformCalcPrefDir(const char *org, const char *app) { return __PHYSFS_platformCalcBaseDir(NULL); /* !!! FIXME: ? */ } /* __PHYSFS_platformCalcPrefDir */ PHYSFS_EnumerateCallbackResult __PHYSFS_platformEnumerate(const char *dirname, PHYSFS_EnumerateCallback callback, const char *origdir, void *callbackdata) { PHYSFS_EnumerateCallbackResult retval = PHYSFS_ENUM_OK; size_t utf8len = strlen(dirname); char *utf8 = (char *) __PHYSFS_smallAlloc(utf8len + 5); char *cpspec = NULL; FILEFINDBUF3 fb; HDIR hdir = HDIR_CREATE; ULONG count = 1; APIRET rc; BAIL_IF(!utf8, PHYSFS_ERR_OUT_OF_MEMORY, PHYSFS_ENUM_ERROR); strcpy(utf8, dirname); if (utf8[utf8len - 1] != '\\') strcpy(utf8 + utf8len, "\\*.*"); else strcpy(utf8 + utf8len, "*.*"); cpspec = cvtUtf8ToCodepage(utf8); __PHYSFS_smallFree(utf8); BAIL_IF_ERRPASS(!cpspec, PHYSFS_ENUM_ERROR); rc = DosFindFirst(cpspec, &hdir, FILE_DIRECTORY | FILE_ARCHIVED | FILE_READONLY | FILE_HIDDEN | FILE_SYSTEM, &fb, sizeof (fb), &count, FIL_STANDARD); allocator.Free(cpspec); BAIL_IF(rc != NO_ERROR, errcodeFromAPIRET(rc), PHYSFS_ENUM_ERROR); while (count == 1) { if ((strcmp(fb.achName, ".") != 0) && (strcmp(fb.achName, "..") != 0)) { utf8 = cvtCodepageToUtf8(fb.achName); if (!utf8) retval = PHYSFS_ENUM_ERROR; else { retval = callback(callbackdata, origdir, utf8); allocator.Free(utf8); if (retval == PHYSFS_ENUM_ERROR) PHYSFS_setErrorCode(PHYSFS_ERR_APP_CALLBACK); } /* else */ } /* if */ if (retval != PHYSFS_ENUM_OK) break; DosFindNext(hdir, &fb, sizeof (fb), &count); } /* while */ DosFindClose(hdir); return retval; } /* __PHYSFS_platformEnumerate */ char *__PHYSFS_platformCurrentDir(void) { char *retval; char *cpstr; char *utf8; ULONG currentDisk; ULONG dummy; ULONG pathSize = 0; APIRET rc; BYTE byte; rc = DosQueryCurrentDisk(¤tDisk, &dummy); BAIL_IF(rc != NO_ERROR, errcodeFromAPIRET(rc), NULL); /* The first call just tells us how much space we need for the string. */ rc = DosQueryCurrentDir(currentDisk, &byte, &pathSize); pathSize++; /* Add space for null terminator. */ cpstr = (char *) __PHYSFS_smallAlloc(pathSize); BAIL_IF(cpstr == NULL, PHYSFS_ERR_OUT_OF_MEMORY, NULL); /* Actually get the string this time. */ rc = DosQueryCurrentDir(currentDisk, (PBYTE) cpstr, &pathSize); if (rc != NO_ERROR) { __PHYSFS_smallFree(cpstr); BAIL(errcodeFromAPIRET(rc), NULL); } /* if */ utf8 = cvtCodepageToUtf8(cpstr); __PHYSFS_smallFree(cpstr); BAIL_IF_ERRPASS(utf8 == NULL, NULL); /* +4 for "x:\\" drive selector and null terminator. */ retval = (char *) allocator.Malloc(strlen(utf8) + 4); if (retval == NULL) { allocator.Free(utf8); BAIL(PHYSFS_ERR_OUT_OF_MEMORY, NULL); } /* if */ retval[0] = ('A' + (currentDisk - 1)); retval[1] = ':'; retval[2] = '\\'; strcpy(retval + 3, utf8); allocator.Free(utf8); return retval; } /* __PHYSFS_platformCurrentDir */ int __PHYSFS_platformMkDir(const char *filename) { APIRET rc; char *cpstr = cvtUtf8ToCodepage(filename); BAIL_IF_ERRPASS(!cpstr, 0); rc = DosCreateDir(cpstr, NULL); allocator.Free(cpstr); BAIL_IF(rc != NO_ERROR, errcodeFromAPIRET(rc), 0); return 1; } /* __PHYSFS_platformMkDir */ static HFILE openFile(const char *filename, const ULONG flags, const ULONG mode) { char *cpfname = cvtUtf8ToCodepage(filename); ULONG action = 0; HFILE hfile = NULLHANDLE; APIRET rc; BAIL_IF_ERRPASS(!cpfname, 0); rc = DosOpen(cpfname, &hfile, &action, 0, FILE_NORMAL, flags, mode, NULL); allocator.Free(cpfname); BAIL_IF(rc != NO_ERROR, errcodeFromAPIRET(rc), 0); return hfile; } /* openFile */ void *__PHYSFS_platformOpenRead(const char *filename) { /* * File must be opened SHARE_DENYWRITE and ACCESS_READONLY, otherwise * DosQueryFileInfo() will fail if we try to get a file length, etc. */ return (void *) openFile(filename, OPEN_ACTION_OPEN_IF_EXISTS | OPEN_ACTION_FAIL_IF_NEW, OPEN_FLAGS_FAIL_ON_ERROR | OPEN_FLAGS_NO_LOCALITY | OPEN_FLAGS_NOINHERIT | OPEN_SHARE_DENYWRITE | OPEN_ACCESS_READONLY); } /* __PHYSFS_platformOpenRead */ void *__PHYSFS_platformOpenWrite(const char *filename) { return (void *) openFile(filename, OPEN_ACTION_REPLACE_IF_EXISTS | OPEN_ACTION_CREATE_IF_NEW, OPEN_FLAGS_FAIL_ON_ERROR | OPEN_FLAGS_NO_LOCALITY | OPEN_FLAGS_NOINHERIT | OPEN_SHARE_DENYWRITE); } /* __PHYSFS_platformOpenWrite */ void *__PHYSFS_platformOpenAppend(const char *filename) { APIRET rc; ULONG dummy = 0; HFILE hfile; /* * File must be opened SHARE_DENYWRITE and ACCESS_READWRITE, otherwise * DosQueryFileInfo() will fail if we try to get a file length, etc. */ hfile = openFile(filename, OPEN_ACTION_OPEN_IF_EXISTS | OPEN_ACTION_CREATE_IF_NEW, OPEN_FLAGS_FAIL_ON_ERROR | OPEN_FLAGS_NO_LOCALITY | OPEN_FLAGS_NOINHERIT | OPEN_SHARE_DENYWRITE | OPEN_ACCESS_READWRITE); BAIL_IF_ERRPASS(!hfile, NULL); rc = DosSetFilePtr(hfile, 0, FILE_END, &dummy); if (rc != NO_ERROR) { DosClose(hfile); BAIL(errcodeFromAPIRET(rc), NULL); } /* if */ return ((void *) hfile); } /* __PHYSFS_platformOpenAppend */ PHYSFS_sint64 __PHYSFS_platformRead(void *opaque, void *buf, PHYSFS_uint64 len) { ULONG br = 0; APIRET rc; BAIL_IF(!__PHYSFS_ui64FitsAddressSpace(len),PHYSFS_ERR_INVALID_ARGUMENT,-1); rc = DosRead((HFILE) opaque, buf, (ULONG) len, &br); BAIL_IF(rc != NO_ERROR, errcodeFromAPIRET(rc), (br > 0) ? ((PHYSFS_sint64) br) : -1); return (PHYSFS_sint64) br; } /* __PHYSFS_platformRead */ PHYSFS_sint64 __PHYSFS_platformWrite(void *opaque, const void *buf, PHYSFS_uint64 len) { ULONG bw = 0; APIRET rc; BAIL_IF(!__PHYSFS_ui64FitsAddressSpace(len),PHYSFS_ERR_INVALID_ARGUMENT,-1); rc = DosWrite((HFILE) opaque, (void *) buf, (ULONG) len, &bw); BAIL_IF(rc != NO_ERROR, errcodeFromAPIRET(rc), (bw > 0) ? ((PHYSFS_sint64) bw) : -1); return (PHYSFS_sint64) bw; } /* __PHYSFS_platformWrite */ int __PHYSFS_platformSeek(void *opaque, PHYSFS_uint64 pos) { ULONG dummy; HFILE hfile = (HFILE) opaque; LONG dist = (LONG) pos; APIRET rc; /* hooray for 32-bit filesystem limits! :) */ BAIL_IF((PHYSFS_uint64) dist != pos, PHYSFS_ERR_INVALID_ARGUMENT, 0); rc = DosSetFilePtr(hfile, dist, FILE_BEGIN, &dummy); BAIL_IF(rc != NO_ERROR, errcodeFromAPIRET(rc), 0); return 1; } /* __PHYSFS_platformSeek */ PHYSFS_sint64 __PHYSFS_platformTell(void *opaque) { ULONG pos; HFILE hfile = (HFILE) opaque; const APIRET rc = DosSetFilePtr(hfile, 0, FILE_CURRENT, &pos); BAIL_IF(rc != NO_ERROR, errcodeFromAPIRET(rc), -1); return ((PHYSFS_sint64) pos); } /* __PHYSFS_platformTell */ PHYSFS_sint64 __PHYSFS_platformFileLength(void *opaque) { FILESTATUS3 fs; HFILE hfile = (HFILE) opaque; const APIRET rc = DosQueryFileInfo(hfile, FIL_STANDARD, &fs, sizeof (fs)); BAIL_IF(rc != NO_ERROR, errcodeFromAPIRET(rc), -1); return ((PHYSFS_sint64) fs.cbFile); } /* __PHYSFS_platformFileLength */ int __PHYSFS_platformFlush(void *opaque) { const APIRET rc = DosResetBuffer((HFILE) opaque); BAIL_IF(rc != NO_ERROR, errcodeFromAPIRET(rc), 0); return 1; } /* __PHYSFS_platformFlush */ void __PHYSFS_platformClose(void *opaque) { DosClose((HFILE) opaque); /* ignore errors. You should have flushed! */ } /* __PHYSFS_platformClose */ int __PHYSFS_platformDelete(const char *path) { char *cppath = cvtUtf8ToCodepage(path); FILESTATUS3 fs; APIRET rc; int retval = 0; BAIL_IF_ERRPASS(!cppath, 0); rc = DosQueryPathInfo(cppath, FIL_STANDARD, &fs, sizeof (fs)); GOTO_IF(rc != NO_ERROR, errcodeFromAPIRET(rc), done); rc = (fs.attrFile & FILE_DIRECTORY) ? DosDeleteDir(path) : DosDelete(path); GOTO_IF(rc != NO_ERROR, errcodeFromAPIRET(rc), done); retval = 1; /* success */ done: allocator.Free(cppath); return retval; } /* __PHYSFS_platformDelete */ /* Convert to a format PhysicsFS can grok... */ PHYSFS_sint64 os2TimeToUnixTime(const FDATE *date, const FTIME *time) { struct tm tm; tm.tm_sec = ((PHYSFS_uint32) time->twosecs) * 2; tm.tm_min = time->minutes; tm.tm_hour = time->hours; tm.tm_mday = date->day; tm.tm_mon = date->month; tm.tm_year = ((PHYSFS_uint32) date->year) + 80; tm.tm_wday = -1 /*st_localtz.wDayOfWeek*/; tm.tm_yday = -1; tm.tm_isdst = -1; return (PHYSFS_sint64) mktime(&tm); } /* os2TimeToUnixTime */ int __PHYSFS_platformStat(const char *filename, PHYSFS_Stat *stat, const int follow) { char *cpfname = cvtUtf8ToCodepage(filename); FILESTATUS3 fs; int retval = 0; APIRET rc; BAIL_IF_ERRPASS(!cpfname, 0); rc = DosQueryPathInfo(cpfname, FIL_STANDARD, &fs, sizeof (fs)); GOTO_IF(rc != NO_ERROR, errcodeFromAPIRET(rc), done); if (fs.attrFile & FILE_DIRECTORY) { stat->filetype = PHYSFS_FILETYPE_DIRECTORY; stat->filesize = 0; } /* if */ else { stat->filetype = PHYSFS_FILETYPE_REGULAR; stat->filesize = fs.cbFile; } /* else */ stat->modtime = os2TimeToUnixTime(&fs.fdateLastWrite, &fs.ftimeLastWrite); if (stat->modtime < 0) stat->modtime = 0; stat->accesstime = os2TimeToUnixTime(&fs.fdateLastAccess, &fs.ftimeLastAccess); if (stat->accesstime < 0) stat->accesstime = 0; stat->createtime = os2TimeToUnixTime(&fs.fdateCreation, &fs.ftimeCreation); if (stat->createtime < 0) stat->createtime = 0; stat->readonly = ((fs.attrFile & FILE_READONLY) == FILE_READONLY); return 1; /* success */ done: allocator.Free(cpfname); return retval; } /* __PHYSFS_platformStat */ void *__PHYSFS_platformGetThreadID(void) { PTIB ptib; PPIB ppib; /* * Allegedly, this API never fails, but we'll punt and return a * default value (zero might as well do) if it does. */ const APIRET rc = DosGetInfoBlocks(&ptib, &ppib); BAIL_IF(rc != NO_ERROR, errcodeFromAPIRET(rc), 0); return ((void *) ptib->tib_ordinal); } /* __PHYSFS_platformGetThreadID */ void *__PHYSFS_platformCreateMutex(void) { HMTX hmtx = NULLHANDLE; const APIRET rc = DosCreateMutexSem(NULL, &hmtx, 0, 0); BAIL_IF(rc != NO_ERROR, errcodeFromAPIRET(rc), NULL); return ((void *) hmtx); } /* __PHYSFS_platformCreateMutex */ void __PHYSFS_platformDestroyMutex(void *mutex) { DosCloseMutexSem((HMTX) mutex); } /* __PHYSFS_platformDestroyMutex */ int __PHYSFS_platformGrabMutex(void *mutex) { /* Do _NOT_ set the physfs error message in here! */ return (DosRequestMutexSem((HMTX) mutex, SEM_INDEFINITE_WAIT) == NO_ERROR); } /* __PHYSFS_platformGrabMutex */ void __PHYSFS_platformReleaseMutex(void *mutex) { DosReleaseMutexSem((HMTX) mutex); } /* __PHYSFS_platformReleaseMutex */ #endif /* PHYSFS_PLATFORM_OS2 */ /* end of physfs_platform_os2.c ... */ ================================================ FILE: src/libraries/physfs/physfs_platform_posix.c ================================================ /* * Posix-esque support routines for PhysicsFS. * * Please see the file LICENSE.txt in the source's root directory. * * This file written by Ryan C. Gordon. */ #define __PHYSICSFS_INTERNAL__ #include "physfs_platforms.h" #ifdef PHYSFS_PLATFORM_POSIX #include #include #include #include #include #include #include #include #include #include "physfs_internal.h" static PHYSFS_ErrorCode errcodeFromErrnoError(const int err) { switch (err) { case 0: return PHYSFS_ERR_OK; case EACCES: return PHYSFS_ERR_PERMISSION; case EPERM: return PHYSFS_ERR_PERMISSION; case EDQUOT: return PHYSFS_ERR_NO_SPACE; case EIO: return PHYSFS_ERR_IO; case ELOOP: return PHYSFS_ERR_SYMLINK_LOOP; case EMLINK: return PHYSFS_ERR_NO_SPACE; case ENAMETOOLONG: return PHYSFS_ERR_BAD_FILENAME; case ENOENT: return PHYSFS_ERR_NOT_FOUND; case ENOSPC: return PHYSFS_ERR_NO_SPACE; case ENOTDIR: return PHYSFS_ERR_NOT_FOUND; case EISDIR: return PHYSFS_ERR_NOT_A_FILE; case EROFS: return PHYSFS_ERR_READ_ONLY; case ETXTBSY: return PHYSFS_ERR_BUSY; case EBUSY: return PHYSFS_ERR_BUSY; case ENOMEM: return PHYSFS_ERR_OUT_OF_MEMORY; case ENOTEMPTY: return PHYSFS_ERR_DIR_NOT_EMPTY; default: return PHYSFS_ERR_OS_ERROR; } /* switch */ } /* errcodeFromErrnoError */ static inline PHYSFS_ErrorCode errcodeFromErrno(void) { return errcodeFromErrnoError(errno); } /* errcodeFromErrno */ static char *getUserDirByUID(void) { uid_t uid = getuid(); struct passwd *pw; char *retval = NULL; pw = getpwuid(uid); if ((pw != NULL) && (pw->pw_dir != NULL) && (*pw->pw_dir != '\0')) { const size_t dlen = strlen(pw->pw_dir); const size_t add_dirsep = (pw->pw_dir[dlen-1] != '/') ? 1 : 0; retval = (char *) allocator.Malloc(dlen + 1 + add_dirsep); if (retval != NULL) { strcpy(retval, pw->pw_dir); if (add_dirsep) { retval[dlen] = '/'; retval[dlen+1] = '\0'; } /* if */ } /* if */ } /* if */ return retval; } /* getUserDirByUID */ char *__PHYSFS_platformCalcUserDir(void) { char *retval = NULL; char *envr = getenv("HOME"); /* if the environment variable was set, make sure it's really a dir. */ if (envr != NULL) { struct stat statbuf; if ((stat(envr, &statbuf) != -1) && (S_ISDIR(statbuf.st_mode))) { const size_t envrlen = strlen(envr); const size_t add_dirsep = (envr[envrlen-1] != '/') ? 1 : 0; retval = allocator.Malloc(envrlen + 1 + add_dirsep); if (retval) { strcpy(retval, envr); if (add_dirsep) { retval[envrlen] = '/'; retval[envrlen+1] = '\0'; } /* if */ } /* if */ } /* if */ } /* if */ if (retval == NULL) retval = getUserDirByUID(); return retval; } /* __PHYSFS_platformCalcUserDir */ PHYSFS_EnumerateCallbackResult __PHYSFS_platformEnumerate(const char *dirname, PHYSFS_EnumerateCallback callback, const char *origdir, void *callbackdata) { DIR *dir; struct dirent *ent; PHYSFS_EnumerateCallbackResult retval = PHYSFS_ENUM_OK; dir = opendir(dirname); BAIL_IF(dir == NULL, errcodeFromErrno(), PHYSFS_ENUM_ERROR); while ((retval == PHYSFS_ENUM_OK) && ((ent = readdir(dir)) != NULL)) { const char *name = ent->d_name; if (name[0] == '.') /* ignore "." and ".." */ { if ((name[1] == '\0') || ((name[1] == '.') && (name[2] == '\0'))) continue; } /* if */ retval = callback(callbackdata, origdir, name); if (retval == PHYSFS_ENUM_ERROR) PHYSFS_setErrorCode(PHYSFS_ERR_APP_CALLBACK); } /* while */ closedir(dir); return retval; } /* __PHYSFS_platformEnumerate */ int __PHYSFS_platformMkDir(const char *path) { const int rc = mkdir(path, S_IRWXU); BAIL_IF(rc == -1, errcodeFromErrno(), 0); return 1; } /* __PHYSFS_platformMkDir */ #if !defined(O_CLOEXEC) && defined(FD_CLOEXEC) static inline void set_CLOEXEC(int fildes) { int flags = fcntl(fildes, F_GETFD); if (flags != -1) { fcntl(fildes, F_SETFD, flags | FD_CLOEXEC); } } #endif static void *doOpen(const char *filename, int mode) { const int appending = (mode & O_APPEND); int fd; int *retval; errno = 0; /* O_APPEND doesn't actually behave as we'd like. */ mode &= ~O_APPEND; #ifdef O_CLOEXEC /* Add O_CLOEXEC if defined */ mode |= O_CLOEXEC; #endif do { fd = open(filename, mode, S_IRUSR | S_IWUSR); } while ((fd < 0) && (errno == EINTR)); BAIL_IF(fd < 0, errcodeFromErrno(), NULL); #if !defined(O_CLOEXEC) && defined(FD_CLOEXEC) set_CLOEXEC(fd); #endif if (appending) { if (lseek(fd, 0, SEEK_END) < 0) { const int err = errno; close(fd); BAIL(errcodeFromErrnoError(err), NULL); } /* if */ } /* if */ retval = (int *) allocator.Malloc(sizeof (int)); if (!retval) { close(fd); BAIL(PHYSFS_ERR_OUT_OF_MEMORY, NULL); } /* if */ *retval = fd; return ((void *) retval); } /* doOpen */ void *__PHYSFS_platformOpenRead(const char *filename) { return doOpen(filename, O_RDONLY); } /* __PHYSFS_platformOpenRead */ void *__PHYSFS_platformOpenWrite(const char *filename) { return doOpen(filename, O_WRONLY | O_CREAT | O_TRUNC); } /* __PHYSFS_platformOpenWrite */ void *__PHYSFS_platformOpenAppend(const char *filename) { return doOpen(filename, O_WRONLY | O_CREAT | O_APPEND); } /* __PHYSFS_platformOpenAppend */ PHYSFS_sint64 __PHYSFS_platformRead(void *opaque, void *buffer, PHYSFS_uint64 len) { const int fd = *((int *) opaque); ssize_t rc = 0; if (!__PHYSFS_ui64FitsAddressSpace(len)) BAIL(PHYSFS_ERR_INVALID_ARGUMENT, -1); do { rc = read(fd, buffer, (size_t) len); } while ((rc == -1) && (errno == EINTR)); BAIL_IF(rc == -1, errcodeFromErrno(), -1); assert(rc >= 0); assert(rc <= len); return (PHYSFS_sint64) rc; } /* __PHYSFS_platformRead */ PHYSFS_sint64 __PHYSFS_platformWrite(void *opaque, const void *buffer, PHYSFS_uint64 len) { const int fd = *((int *) opaque); ssize_t rc = 0; if (!__PHYSFS_ui64FitsAddressSpace(len)) BAIL(PHYSFS_ERR_INVALID_ARGUMENT, -1); do { rc = write(fd, (void *) buffer, (size_t) len); } while ((rc == -1) && (errno == EINTR)); BAIL_IF(rc == -1, errcodeFromErrno(), rc); assert(rc >= 0); assert(rc <= len); return (PHYSFS_sint64) rc; } /* __PHYSFS_platformWrite */ int __PHYSFS_platformSeek(void *opaque, PHYSFS_uint64 pos) { const int fd = *((int *) opaque); const off_t rc = lseek(fd, (off_t) pos, SEEK_SET); BAIL_IF(rc == -1, errcodeFromErrno(), 0); return 1; } /* __PHYSFS_platformSeek */ PHYSFS_sint64 __PHYSFS_platformTell(void *opaque) { const int fd = *((int *) opaque); PHYSFS_sint64 retval; retval = (PHYSFS_sint64) lseek(fd, 0, SEEK_CUR); BAIL_IF(retval == -1, errcodeFromErrno(), -1); return retval; } /* __PHYSFS_platformTell */ PHYSFS_sint64 __PHYSFS_platformFileLength(void *opaque) { const int fd = *((int *) opaque); struct stat statbuf; BAIL_IF(fstat(fd, &statbuf) == -1, errcodeFromErrno(), -1); return ((PHYSFS_sint64) statbuf.st_size); } /* __PHYSFS_platformFileLength */ int __PHYSFS_platformFlush(void *opaque) { const int fd = *((int *) opaque); int rc = -1; if ((fcntl(fd, F_GETFL) & O_ACCMODE) != O_RDONLY) { do { rc = fsync(fd); } while ((rc == -1) && (errno == EINTR)); BAIL_IF(rc == -1, errcodeFromErrno(), 0); } return 1; } /* __PHYSFS_platformFlush */ void __PHYSFS_platformClose(void *opaque) { const int fd = *((int *) opaque); int rc = -1; do { rc = close(fd); /* we don't check this. You should have used flush! */ } while ((rc == -1) && (errno == EINTR)); allocator.Free(opaque); } /* __PHYSFS_platformClose */ int __PHYSFS_platformDelete(const char *path) { BAIL_IF(remove(path) == -1, errcodeFromErrno(), 0); return 1; } /* __PHYSFS_platformDelete */ int __PHYSFS_platformStat(const char *fname, PHYSFS_Stat *st, const int follow) { struct stat statbuf; const int rc = follow ? stat(fname, &statbuf) : lstat(fname, &statbuf); BAIL_IF(rc == -1, errcodeFromErrno(), 0); if (S_ISREG(statbuf.st_mode)) { st->filetype = PHYSFS_FILETYPE_REGULAR; st->filesize = statbuf.st_size; } /* if */ else if(S_ISDIR(statbuf.st_mode)) { st->filetype = PHYSFS_FILETYPE_DIRECTORY; st->filesize = 0; } /* else if */ else if(S_ISLNK(statbuf.st_mode)) { st->filetype = PHYSFS_FILETYPE_SYMLINK; st->filesize = 0; } /* else if */ else { st->filetype = PHYSFS_FILETYPE_OTHER; st->filesize = statbuf.st_size; } /* else */ st->modtime = statbuf.st_mtime; st->createtime = statbuf.st_ctime; st->accesstime = statbuf.st_atime; st->readonly = (access(fname, W_OK) == -1); return 1; } /* __PHYSFS_platformStat */ typedef struct { pthread_mutex_t mutex; pthread_t owner; PHYSFS_uint32 count; } PthreadMutex; void *__PHYSFS_platformGetThreadID(void) { return ( (void *) ((size_t) pthread_self()) ); } /* __PHYSFS_platformGetThreadID */ void *__PHYSFS_platformCreateMutex(void) { int rc; PthreadMutex *m = (PthreadMutex *) allocator.Malloc(sizeof (PthreadMutex)); BAIL_IF(!m, PHYSFS_ERR_OUT_OF_MEMORY, NULL); rc = pthread_mutex_init(&m->mutex, NULL); if (rc != 0) { allocator.Free(m); BAIL(PHYSFS_ERR_OS_ERROR, NULL); } /* if */ m->count = 0; m->owner = (pthread_t) 0xDEADBEEF; return ((void *) m); } /* __PHYSFS_platformCreateMutex */ void __PHYSFS_platformDestroyMutex(void *mutex) { PthreadMutex *m = (PthreadMutex *) mutex; /* Destroying a locked mutex is a bug, but we'll try to be helpful. */ if ((m->owner == pthread_self()) && (m->count > 0)) pthread_mutex_unlock(&m->mutex); pthread_mutex_destroy(&m->mutex); allocator.Free(m); } /* __PHYSFS_platformDestroyMutex */ int __PHYSFS_platformGrabMutex(void *mutex) { PthreadMutex *m = (PthreadMutex *) mutex; pthread_t tid = pthread_self(); if (m->owner != tid) { if (pthread_mutex_lock(&m->mutex) != 0) return 0; m->owner = tid; } /* if */ m->count++; return 1; } /* __PHYSFS_platformGrabMutex */ void __PHYSFS_platformReleaseMutex(void *mutex) { PthreadMutex *m = (PthreadMutex *) mutex; assert(m->owner == pthread_self()); /* catch programming errors. */ assert(m->count > 0); /* catch programming errors. */ if (m->owner == pthread_self()) { if (--m->count == 0) { m->owner = (pthread_t) 0xDEADBEEF; pthread_mutex_unlock(&m->mutex); } /* if */ } /* if */ } /* __PHYSFS_platformReleaseMutex */ #endif /* PHYSFS_PLATFORM_POSIX */ /* end of physfs_platform_posix.c ... */ ================================================ FILE: src/libraries/physfs/physfs_platform_qnx.c ================================================ /* * QNX support routines for PhysicsFS. * * Please see the file LICENSE.txt in the source's root directory. * * This file written by Ryan C. Gordon. */ /* This is tested against QNX 7 at the moment. */ #define __PHYSICSFS_INTERNAL__ #include "physfs_platforms.h" #ifdef PHYSFS_PLATFORM_QNX #include #include #include #include #include "physfs_internal.h" int __PHYSFS_platformInit(void) { return 1; /* always succeed. */ } /* __PHYSFS_platformInit */ void __PHYSFS_platformDeinit(void) { /* no-op */ } /* __PHYSFS_platformDeinit */ char *__PHYSFS_platformCalcBaseDir(const char *argv0) { char *retval = (char *) allocator.Malloc(PATH_MAX+1); if (retval == NULL) BAIL(PHYSFS_ERR_OUT_OF_MEMORY, NULL); else { const int fd = open("/proc/self/exefile", O_RDONLY); const ssize_t br = (fd == -1) ? -1 : read(fd, retval, PATH_MAX); char *ptr; if (fd != -1) close(fd); if ((br < 0) || (br > PATH_MAX)) { allocator.Free(retval); BAIL(PHYSFS_ERR_OS_ERROR, NULL); } /* if */ retval[br] = '\0'; ptr = strrchr(retval, '/'); if (ptr == NULL) /* uhoh! */ { allocator.Free(retval); BAIL(PHYSFS_ERR_OS_ERROR, NULL); } /* if */ ptr[1] = '\0'; /* chop off filename, leave dirs and '/' */ ptr = (char *) allocator.Realloc(retval, (ptr - retval) + 2); if (ptr != NULL) /* just shrinking buffer; don't care if it failed. */ retval = ptr; } /* else */ return retval; } /* __PHYSFS_platformCalcBaseDir */ char *__PHYSFS_platformCalcPrefDir(const char *org, const char *app) { /* !!! FIXME: this might be wrong; I don't know if there's a better method on QNX, or if it follows XDG specs, etc. */ char *retval = NULL; const char *home = __PHYSFS_getUserDir(); if (home) { const size_t len = strlen(home) + strlen(app) + 3; retval = (char *) allocator.Malloc(len); BAIL_IF(!retval, PHYSFS_ERR_OUT_OF_MEMORY, NULL); snprintf(retval, len, "%s.%s/", home, app); } /* if */ return retval; } /* __PHYSFS_platformCalcPrefDir */ #if !PHYSFS_NO_CDROM_SUPPORT #include #include #include #include #include static void checkPathForCD(const char *path, PHYSFS_StringCallback cb, void *d) { struct stat statbuf; int fd; /* The devctl() thing is QNX-specific. In this case, we query what is probably the mountpoint for the device. statvfs() on that mountpoint will tell use its filesystem type. */ if ( (stat(path, &statbuf) == 0) && (S_ISBLK(statbuf.st_mode)) && ((fd = open(path, O_RDONLY | O_NONBLOCK)) != -1) ) { char mnt[256] = { 0 }; const int rc = devctl(fd, DCMD_FSYS_MOUNTED_BY, mnt, sizeof (mnt), 0); close(fd); if ( (rc == EOK) && (mnt[0]) ) { struct statvfs statvfsbuf; if (statvfs(mnt, &statvfsbuf) == 0) { /* I don't know if this is a complete or accurate list. */ const char *fstype = statvfsbuf.f_basetype; const int iscd = ( (strcmp(fstype, "cd") == 0) || (strcmp(fstype, "udf") == 0) ); if (iscd) cb(d, mnt); } /* if */ } /* if */ } /* if */ } /* checkPathForCD */ static void checkDevForCD(const char *dev, PHYSFS_StringCallback cb, void *d) { size_t len; char *path; if (dev[0] == '.') /* ignore "." and ".." */ { if ((dev[1] == '\0') || ((dev[1] == '.') && (dev[2] == '\0'))) return; } /* if */ len = strlen(dev) + 6; path = (char *) __PHYSFS_smallAlloc(len); if (!path) return; /* oh well. */ snprintf(path, len, "/dev/%s", dev); checkPathForCD(path, cb, d); __PHYSFS_smallFree(path); } /* checkDevForCD */ #endif /* !PHYSFS_NO_CDROM_SUPPORT */ void __PHYSFS_platformDetectAvailableCDs(PHYSFS_StringCallback cb, void *data) { #if !PHYSFS_NO_CDROM_SUPPORT DIR *dirp = opendir("/dev"); if (dirp) { struct dirent *dent; while ((dent = readdir(dirp)) != NULL) checkDevForCD(dent->d_name, cb, data); closedir(dirp); } /* if */ #endif } /* __PHYSFS_platformDetectAvailableCDs */ #endif /* PHYSFS_PLATFORM_QNX */ /* end of physfs_platform_qnx.c ... */ ================================================ FILE: src/libraries/physfs/physfs_platform_unix.c ================================================ /* * Unix support routines for PhysicsFS. * * Please see the file LICENSE.txt in the source's root directory. * * This file written by Ryan C. Gordon. */ #define __PHYSICSFS_INTERNAL__ #include "physfs_platforms.h" #ifdef PHYSFS_PLATFORM_UNIX #include #include #include #include #include #include #include #include #include #include #include #if PHYSFS_NO_CDROM_SUPPORT #elif PHYSFS_PLATFORM_LINUX # define PHYSFS_HAVE_MNTENT_H 1 #elif defined __CYGWIN__ # define PHYSFS_HAVE_MNTENT_H 1 #elif PHYSFS_PLATFORM_SOLARIS # define PHYSFS_HAVE_SYS_MNTTAB_H 1 #elif PHYSFS_PLATFORM_BSD # define PHYSFS_HAVE_SYS_UCRED_H 1 #else # warning No CD-ROM support included. Either define your platform here, # warning or define PHYSFS_NO_CDROM_SUPPORT=1 to confirm this is intentional. #endif #ifdef PHYSFS_HAVE_SYS_UCRED_H # ifdef PHYSFS_HAVE_MNTENT_H # undef PHYSFS_HAVE_MNTENT_H /* don't do both... */ # endif # include # include #endif #ifdef PHYSFS_HAVE_MNTENT_H #include #endif #ifdef PHYSFS_HAVE_SYS_MNTTAB_H #include #endif #ifdef PHYSFS_PLATFORM_FREEBSD #include #endif #include "physfs_internal.h" int __PHYSFS_platformInit(void) { return 1; /* always succeed. */ } /* __PHYSFS_platformInit */ void __PHYSFS_platformDeinit(void) { /* no-op */ } /* __PHYSFS_platformDeinit */ void __PHYSFS_platformDetectAvailableCDs(PHYSFS_StringCallback cb, void *data) { #if (defined PHYSFS_NO_CDROM_SUPPORT) /* no-op. */ #elif (defined PHYSFS_HAVE_SYS_UCRED_H) int i; struct statfs *mntbufp = NULL; int mounts = getmntinfo(&mntbufp, MNT_NOWAIT); for (i = 0; i < mounts; i++) { int add_it = 0; if (strcmp(mntbufp[i].f_fstypename, "iso9660") == 0) add_it = 1; else if (strcmp( mntbufp[i].f_fstypename, "cd9660") == 0) add_it = 1; /* add other mount types here */ if (add_it) cb(data, mntbufp[i].f_mntonname); } /* for */ #elif (defined PHYSFS_HAVE_MNTENT_H) FILE *mounts = NULL; struct mntent *ent = NULL; mounts = setmntent("/etc/mtab", "r"); BAIL_IF(mounts == NULL, PHYSFS_ERR_IO, /*return void*/); while ( (ent = getmntent(mounts)) != NULL ) { int add_it = 0; if (strcmp(ent->mnt_type, "iso9660") == 0) add_it = 1; else if (strcmp(ent->mnt_type, "udf") == 0) add_it = 1; /* !!! FIXME: these might pick up floppy drives, right? */ else if (strcmp(ent->mnt_type, "auto") == 0) add_it = 1; else if (strcmp(ent->mnt_type, "supermount") == 0) add_it = 1; /* add other mount types here */ if (add_it) cb(data, ent->mnt_dir); } /* while */ endmntent(mounts); #elif (defined PHYSFS_HAVE_SYS_MNTTAB_H) FILE *mounts = fopen(MNTTAB, "r"); struct mnttab ent; BAIL_IF(mounts == NULL, PHYSFS_ERR_IO, /*return void*/); while (getmntent(mounts, &ent) == 0) { int add_it = 0; if (strcmp(ent.mnt_fstype, "hsfs") == 0) add_it = 1; /* add other mount types here */ if (add_it) cb(data, ent.mnt_mountp); } /* while */ fclose(mounts); #endif } /* __PHYSFS_platformDetectAvailableCDs */ /* * See where program (bin) resides in the $PATH specified by (envr). * returns a copy of the first element in envr that contains it, or NULL * if it doesn't exist or there were other problems. PHYSFS_SetError() is * called if we have a problem. * * (envr) will be scribbled over, and you are expected to allocator.Free() the * return value when you're done with it. */ static char *findBinaryInPath(const char *bin, char *envr) { size_t alloc_size = 0; char *exe = NULL; char *start = envr; char *ptr; assert(bin != NULL); assert(envr != NULL); do { size_t size; size_t binlen; ptr = strchr(start, ':'); /* find next $PATH separator. */ if (ptr) *ptr = '\0'; binlen = strlen(bin); size = strlen(start) + binlen + 2; if (size >= alloc_size) { char *x = (char *) allocator.Realloc(exe, size); if (!x) { if (exe != NULL) allocator.Free(exe); BAIL(PHYSFS_ERR_OUT_OF_MEMORY, NULL); } /* if */ alloc_size = size; exe = x; } /* if */ /* build full binary path... */ strcpy(exe, start); if ((exe[0] == '\0') || (exe[strlen(exe) - 1] != '/')) strcat(exe, "/"); strcat(exe, bin); if (access(exe, X_OK) == 0) /* Exists as executable? We're done. */ { exe[(size - binlen) - 1] = '\0'; /* chop off filename, leave '/' */ return exe; } /* if */ start = ptr + 1; /* start points to beginning of next element. */ } while (ptr != NULL); if (exe != NULL) allocator.Free(exe); return NULL; /* doesn't exist in path. */ } /* findBinaryInPath */ static char *readSymLink(const char *path) { ssize_t len = 64; ssize_t rc = -1; char *retval = NULL; while (1) { char *ptr = (char *) allocator.Realloc(retval, (size_t) len); if (ptr == NULL) break; /* out of memory. */ retval = ptr; rc = readlink(path, retval, len); if (rc == -1) break; /* not a symlink, i/o error, etc. */ else if (rc < len) { retval[rc] = '\0'; /* readlink doesn't null-terminate. */ return retval; /* we're good to go. */ } /* else if */ len *= 2; /* grow buffer, try again. */ } /* while */ if (retval != NULL) allocator.Free(retval); return NULL; } /* readSymLink */ char *__PHYSFS_platformCalcBaseDir(const char *argv0) { char *retval = NULL; const char *envr = NULL; /* Try to avoid using argv0 unless forced to. Try system-specific stuff. */ #if defined(PHYSFS_PLATFORM_FREEBSD) { char fullpath[PATH_MAX]; size_t buflen = sizeof (fullpath); int mib[4] = { CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1 }; if (sysctl(mib, 4, fullpath, &buflen, NULL, 0) != -1) retval = __PHYSFS_strdup(fullpath); } #endif /* If there's a Linux-like /proc filesystem, you can get the full path to * the current process from a symlink in there. */ if (!retval && (access("/proc", F_OK) == 0)) { retval = readSymLink("/proc/self/exe"); if (!retval) retval = readSymLink("/proc/curproc/file"); if (!retval) retval = readSymLink("/proc/curproc/exe"); if (!retval) retval = readSymLink("/proc/self/path/a.out"); if (retval == NULL) { /* older kernels don't have /proc/self ... try PID version... */ const unsigned long long pid = (unsigned long long) getpid(); char path[64]; const int rc = (int) snprintf(path,sizeof(path),"/proc/%llu/exe",pid); if ( (rc > 0) && (rc < sizeof(path)) ) retval = readSymLink(path); } /* if */ } /* if */ #if defined(PHYSFS_PLATFORM_SOLARIS) if (!retval) /* try getexecname() if /proc didn't pan out. This may not be an absolute path! */ { const char *path = getexecname(); if ((path != NULL) && (path[0] == '/')) /* must be absolute path... */ retval = __PHYSFS_strdup(path); } /* if */ #endif if (retval != NULL) /* chop off filename. */ { char *ptr = strrchr(retval, '/'); if (ptr != NULL) *(ptr+1) = '\0'; else /* shouldn't happen, but just in case... */ { allocator.Free(retval); retval = NULL; } /* else */ } /* if */ /* No /proc/self/exe, etc, but we have an argv[0] we can parse? */ if ((retval == NULL) && (argv0 != NULL)) { /* fast path: default behaviour can handle this. */ if (strchr(argv0, '/') != NULL) return NULL; /* higher level parses out real path from argv0. */ /* If there's no dirsep on argv0, then look through $PATH for it. */ envr = getenv("PATH"); if (envr != NULL) { char *path = (char *) __PHYSFS_smallAlloc(strlen(envr) + 1); BAIL_IF(!path, PHYSFS_ERR_OUT_OF_MEMORY, NULL); strcpy(path, envr); retval = findBinaryInPath(argv0, path); __PHYSFS_smallFree(path); } /* if */ } /* if */ if (retval != NULL) { /* try to shrink buffer... */ char *ptr = (char *) allocator.Realloc(retval, strlen(retval) + 1); if (ptr != NULL) retval = ptr; /* oh well if it failed. */ } /* if */ return retval; } /* __PHYSFS_platformCalcBaseDir */ char *__PHYSFS_platformCalcPrefDir(const char *org, const char *app) { /* * We use XDG's base directory spec, even if you're not on Linux. * This isn't strictly correct, but the results are relatively sane * in any case. * * https://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html */ const char *envr = getenv("XDG_DATA_HOME"); const char *append = "/"; char *retval = NULL; size_t len = 0; if (!envr) { /* You end up with "$HOME/.local/share/Game Name 2" */ envr = __PHYSFS_getUserDir(); BAIL_IF_ERRPASS(!envr, NULL); /* oh well. */ append = ".local/share/"; } /* if */ len = strlen(envr) + strlen(append) + strlen(app) + 2; retval = (char *) allocator.Malloc(len); BAIL_IF(!retval, PHYSFS_ERR_OUT_OF_MEMORY, NULL); snprintf(retval, len, "%s%s%s/", envr, append, app); return retval; } /* __PHYSFS_platformCalcPrefDir */ #endif /* PHYSFS_PLATFORM_UNIX */ /* end of physfs_platform_unix.c ... */ ================================================ FILE: src/libraries/physfs/physfs_platform_windows.c ================================================ /* * Windows support routines for PhysicsFS. * * Please see the file LICENSE.txt in the source's root directory. * * This file written by Ryan C. Gordon, and made sane by Gregory S. Read. */ #define __PHYSICSFS_INTERNAL__ #include "physfs_platforms.h" #ifdef PHYSFS_PLATFORM_WINDOWS /* Forcibly disable UNICODE macro, since we manage this ourselves. */ #ifdef UNICODE #undef UNICODE #endif #if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_WARNINGS) #define _CRT_SECURE_NO_WARNINGS 1 #endif #define WIN32_LEAN_AND_MEAN 1 #include #ifndef PHYSFS_PLATFORM_WINRT #include #include #endif #if !defined(PHYSFS_NO_CDROM_SUPPORT) #include #endif #include #include #include #ifdef allocator /* apparently Windows 10 SDK conflicts here. */ #undef allocator #endif #include "physfs_internal.h" /* * Users without the platform SDK don't have this defined. The original docs * for SetFilePointer() just said to compare with 0xFFFFFFFF, so this should * work as desired. */ #define PHYSFS_INVALID_SET_FILE_POINTER 0xFFFFFFFF /* just in case... */ #define PHYSFS_INVALID_FILE_ATTRIBUTES 0xFFFFFFFF /* Not defined before the Vista SDK. */ #define PHYSFS_FILE_ATTRIBUTE_REPARSE_POINT 0x400 #define PHYSFS_IO_REPARSE_TAG_SYMLINK 0xA000000C #define UTF8_TO_UNICODE_STACK(w_assignto, str) { \ if (str == NULL) \ w_assignto = NULL; \ else { \ const size_t len = (PHYSFS_uint64) ((strlen(str) + 1) * 2); \ w_assignto = (WCHAR *) __PHYSFS_smallAlloc(len); \ if (w_assignto != NULL) \ PHYSFS_utf8ToUtf16(str, (PHYSFS_uint16 *) w_assignto, len); \ } \ } \ /* Note this counts WCHARs, not codepoints! */ static PHYSFS_uint64 wStrLen(const WCHAR *wstr) { PHYSFS_uint64 len = 0; while (*(wstr++)) len++; return len; } /* wStrLen */ static char *unicodeToUtf8Heap(const WCHAR *w_str) { char *retval = NULL; if (w_str != NULL) { void *ptr = NULL; const PHYSFS_uint64 len = (wStrLen(w_str) * 4) + 1; retval = allocator.Malloc(len); BAIL_IF(!retval, PHYSFS_ERR_OUT_OF_MEMORY, NULL); PHYSFS_utf8FromUtf16((const PHYSFS_uint16 *) w_str, retval, len); ptr = allocator.Realloc(retval, strlen(retval) + 1); /* shrink. */ if (ptr != NULL) retval = (char *) ptr; } /* if */ return retval; } /* unicodeToUtf8Heap */ /* Some older APIs aren't in WinRT (only the "Ex" version, etc). Since non-WinRT might not have the "Ex" version, we tapdance to use the perfectly-fine-and-available-even-on-Win95 API on non-WinRT targets. */ static inline HANDLE winFindFirstFileW(const WCHAR *path, LPWIN32_FIND_DATAW d) { #if defined(PHYSFS_PLATFORM_WINRT) || (_WIN32_WINNT >= 0x0501) // Windows XP+ return FindFirstFileExW(path, FindExInfoStandard, d, FindExSearchNameMatch, NULL, 0); #else return FindFirstFileW(path, d); #endif } /* winFindFirstFileW */ static inline BOOL winInitializeCriticalSection(LPCRITICAL_SECTION lpcs) { #if defined(PHYSFS_PLATFORM_WINRT) || (_WIN32_WINNT >= 0x0600) // Windows Vista+ return InitializeCriticalSectionEx(lpcs, 2000, 0); #else InitializeCriticalSection(lpcs); return TRUE; #endif } /* winInitializeCriticalSection */ static inline HANDLE winCreateFileW(const WCHAR *wfname, const DWORD mode, const DWORD creation) { const DWORD share = FILE_SHARE_READ | FILE_SHARE_WRITE; #if defined(PHYSFS_PLATFORM_WINRT) /*|| (_WIN32_WINNT >= 0x0602)*/ // Windows 8+ return CreateFile2(wfname, mode, share, creation, NULL); #else return CreateFileW(wfname, mode, share, NULL, creation, FILE_ATTRIBUTE_NORMAL, NULL); #endif } /* winCreateFileW */ static BOOL winSetFilePointer(HANDLE h, const PHYSFS_sint64 pos, PHYSFS_sint64 *_newpos, const DWORD whence) { #if defined(PHYSFS_PLATFORM_WINRT) || (_WIN32_WINNT >= 0x0501) // Windows XP+ LARGE_INTEGER lipos; LARGE_INTEGER linewpos; BOOL rc; lipos.QuadPart = (LONGLONG) pos; rc = SetFilePointerEx(h, lipos, &linewpos, whence); if (_newpos) *_newpos = (PHYSFS_sint64) linewpos.QuadPart; return rc; #else const LONG low = (LONG) (pos & 0xFFFFFFFF); LONG high = (LONG) ((pos >> 32) & 0xFFFFFFFF); const DWORD rc = SetFilePointer(h, low, &high, whence); /* 0xFFFFFFFF could be valid, so you have to check GetLastError too! */ if (_newpos) *_newpos = ((PHYSFS_sint64) rc) | (((PHYSFS_sint64) high) << 32); if ((rc == PHYSFS_INVALID_SET_FILE_POINTER) && (GetLastError() != NO_ERROR)) return FALSE; return TRUE; #endif } /* winSetFilePointer */ static PHYSFS_sint64 winGetFileSize(HANDLE h) { #if defined(PHYSFS_PLATFORM_WINRT) || (_WIN32_WINNT >= 0x0600) // Windows Vista+ FILE_STANDARD_INFO info; const BOOL rc = GetFileInformationByHandleEx(h, FileStandardInfo, &info, sizeof (info)); return rc ? (PHYSFS_sint64) info.EndOfFile.QuadPart : -1; #else DWORD high = 0; const DWORD rc = GetFileSize(h, &high); if ((rc == PHYSFS_INVALID_SET_FILE_POINTER) && (GetLastError() != NO_ERROR)) return -1; return (PHYSFS_sint64) ((((PHYSFS_uint64) high) << 32) | rc); #endif } /* winGetFileSize */ static PHYSFS_ErrorCode errcodeFromWinApiError(const DWORD err) { /* * win32 error codes are sort of a tricky thing; Microsoft intentionally * doesn't list which ones a given API might trigger, there are several * with overlapping and unclear meanings...and there's 16 thousand of * them in Windows 7. It looks like the ones we care about are in the * first 500, but I can't say this list is perfect; we might miss * important values or misinterpret others. * * Don't treat this list as anything other than a work in progress. */ switch (err) { case ERROR_SUCCESS: return PHYSFS_ERR_OK; case ERROR_ACCESS_DENIED: return PHYSFS_ERR_PERMISSION; case ERROR_NETWORK_ACCESS_DENIED: return PHYSFS_ERR_PERMISSION; case ERROR_NOT_READY: return PHYSFS_ERR_IO; case ERROR_CRC: return PHYSFS_ERR_IO; case ERROR_SEEK: return PHYSFS_ERR_IO; case ERROR_SECTOR_NOT_FOUND: return PHYSFS_ERR_IO; case ERROR_NOT_DOS_DISK: return PHYSFS_ERR_IO; case ERROR_WRITE_FAULT: return PHYSFS_ERR_IO; case ERROR_READ_FAULT: return PHYSFS_ERR_IO; case ERROR_DEV_NOT_EXIST: return PHYSFS_ERR_IO; case ERROR_BUFFER_OVERFLOW: return PHYSFS_ERR_BAD_FILENAME; case ERROR_INVALID_NAME: return PHYSFS_ERR_BAD_FILENAME; case ERROR_BAD_PATHNAME: return PHYSFS_ERR_BAD_FILENAME; case ERROR_DIRECTORY: return PHYSFS_ERR_BAD_FILENAME; case ERROR_FILE_NOT_FOUND: return PHYSFS_ERR_NOT_FOUND; case ERROR_PATH_NOT_FOUND: return PHYSFS_ERR_NOT_FOUND; case ERROR_DELETE_PENDING: return PHYSFS_ERR_NOT_FOUND; case ERROR_INVALID_DRIVE: return PHYSFS_ERR_NOT_FOUND; case ERROR_HANDLE_DISK_FULL: return PHYSFS_ERR_NO_SPACE; case ERROR_DISK_FULL: return PHYSFS_ERR_NO_SPACE; case ERROR_WRITE_PROTECT: return PHYSFS_ERR_READ_ONLY; case ERROR_LOCK_VIOLATION: return PHYSFS_ERR_BUSY; case ERROR_SHARING_VIOLATION: return PHYSFS_ERR_BUSY; case ERROR_CURRENT_DIRECTORY: return PHYSFS_ERR_BUSY; case ERROR_DRIVE_LOCKED: return PHYSFS_ERR_BUSY; case ERROR_PATH_BUSY: return PHYSFS_ERR_BUSY; case ERROR_BUSY: return PHYSFS_ERR_BUSY; case ERROR_NOT_ENOUGH_MEMORY: return PHYSFS_ERR_OUT_OF_MEMORY; case ERROR_OUTOFMEMORY: return PHYSFS_ERR_OUT_OF_MEMORY; case ERROR_DIR_NOT_EMPTY: return PHYSFS_ERR_DIR_NOT_EMPTY; default: return PHYSFS_ERR_OS_ERROR; } /* switch */ } /* errcodeFromWinApiError */ static inline PHYSFS_ErrorCode errcodeFromWinApi(void) { return errcodeFromWinApiError(GetLastError()); } /* errcodeFromWinApi */ #if defined(PHYSFS_NO_CDROM_SUPPORT) #define detectAvailableCDs(cb, data) #define deinitCDThread() #else static HANDLE detectCDThreadHandle = NULL; static HWND detectCDHwnd = NULL; static volatile DWORD drivesWithMediaBitmap = 0; typedef BOOL (WINAPI *fnSTEM)(DWORD, LPDWORD b); static DWORD pollDiscDrives(void) { /* Try to use SetThreadErrorMode(), which showed up in Windows 7. */ HANDLE lib = LoadLibraryA("kernel32.dll"); fnSTEM stem = NULL; char drive[4] = { 'x', ':', '\\', '\0' }; DWORD oldErrorMode = 0; DWORD drives = 0; DWORD i; if (lib) stem = (fnSTEM) GetProcAddress(lib, "SetThreadErrorMode"); if (stem) stem(SEM_FAILCRITICALERRORS, &oldErrorMode); else oldErrorMode = SetErrorMode(SEM_FAILCRITICALERRORS); /* Do detection. This may block if a disc is spinning up. */ for (i = 'A'; i <= 'Z'; i++) { DWORD tmp = 0; drive[0] = (char) i; if (GetDriveTypeA(drive) != DRIVE_CDROM) continue; /* If this function succeeds, there's media in the drive */ if (GetVolumeInformationA(drive, NULL, 0, NULL, NULL, &tmp, NULL, 0)) drives |= (1 << (i - 'A')); } /* for */ if (stem) stem(oldErrorMode, NULL); else SetErrorMode(oldErrorMode); if (lib) FreeLibrary(lib); return drives; } /* pollDiscDrives */ static LRESULT CALLBACK detectCDWndProc(HWND hwnd, UINT msg, WPARAM wp, LPARAM lparam) { PDEV_BROADCAST_HDR lpdb = (PDEV_BROADCAST_HDR) lparam; PDEV_BROADCAST_VOLUME lpdbv = (PDEV_BROADCAST_VOLUME) lparam; const int removed = (wp == DBT_DEVICEREMOVECOMPLETE); if (msg == WM_DESTROY) return 0; else if ((msg != WM_DEVICECHANGE) || ((wp != DBT_DEVICEARRIVAL) && (wp != DBT_DEVICEREMOVECOMPLETE)) || (lpdb->dbch_devicetype != DBT_DEVTYP_VOLUME) || ((lpdbv->dbcv_flags & DBTF_MEDIA) == 0)) { return DefWindowProcW(hwnd, msg, wp, lparam); } /* else if */ if (removed) drivesWithMediaBitmap &= ~lpdbv->dbcv_unitmask; else drivesWithMediaBitmap |= lpdbv->dbcv_unitmask; return TRUE; } /* detectCDWndProc */ static DWORD WINAPI detectCDThread(LPVOID arg) { HANDLE initialDiscDetectionComplete = *((HANDLE *) arg); const char *classname = "PhysicsFSDetectCDCatcher"; const char *winname = "PhysicsFSDetectCDMsgWindow"; HINSTANCE hInstance = GetModuleHandleW(NULL); ATOM class_atom = 0; WNDCLASSEXA wce; MSG msg; memset(&wce, '\0', sizeof (wce)); wce.cbSize = sizeof (wce); wce.lpfnWndProc = detectCDWndProc; wce.lpszClassName = classname; wce.hInstance = hInstance; class_atom = RegisterClassExA(&wce); if (class_atom == 0) { SetEvent(initialDiscDetectionComplete); /* let main thread go on. */ return 0; } /* if */ detectCDHwnd = CreateWindowExA(0, classname, winname, WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, HWND_DESKTOP, NULL, hInstance, NULL); if (detectCDHwnd == NULL) { SetEvent(initialDiscDetectionComplete); /* let main thread go on. */ UnregisterClassA(classname, hInstance); return 0; } /* if */ /* We'll get events when discs come and go from now on. */ /* Do initial detection, possibly blocking awhile... */ drivesWithMediaBitmap = pollDiscDrives(); SetEvent(initialDiscDetectionComplete); /* let main thread go on. */ do { const BOOL rc = GetMessageW(&msg, detectCDHwnd, 0, 0); if ((rc == 0) || (rc == -1)) break; /* don't care if WM_QUIT or error break this loop. */ TranslateMessage(&msg); DispatchMessageW(&msg); } while (1); /* we've been asked to quit. */ DestroyWindow(detectCDHwnd); UnregisterClassA(classname, hInstance); return 0; } /* detectCDThread */ static void detectAvailableCDs(PHYSFS_StringCallback cb, void *data) { char drive_str[4] = { 'x', ':', '\\', '\0' }; DWORD drives = 0; DWORD i; /* * If you poll a drive while a user is inserting a disc, the OS will * block this thread until the drive has spun up. So we swallow the risk * once for initial detection, and spin a thread that will get device * events thereafter, for apps that use this interface to poll for * disc insertion. */ if (!detectCDThreadHandle) { HANDLE initialDetectDone = CreateEvent(NULL, TRUE, FALSE, NULL); if (!initialDetectDone) return; /* oh well. */ detectCDThreadHandle = CreateThread(NULL, 0, detectCDThread, &initialDetectDone, 0, NULL); if (detectCDThreadHandle) WaitForSingleObject(initialDetectDone, INFINITE); CloseHandle(initialDetectDone); if (!detectCDThreadHandle) return; /* oh well. */ } /* if */ drives = drivesWithMediaBitmap; /* whatever the thread has seen, we take. */ for (i = 'A'; i <= 'Z'; i++) { if (drives & (1 << (i - 'A'))) { drive_str[0] = (char) i; cb(data, drive_str); } /* if */ } /* for */ } /* detectAvailableCDs */ static void deinitCDThread(void) { if (detectCDThreadHandle) { if (detectCDHwnd) PostMessageW(detectCDHwnd, WM_QUIT, 0, 0); CloseHandle(detectCDThreadHandle); detectCDThreadHandle = NULL; drivesWithMediaBitmap = 0; } /* if */ } /* deinitCDThread */ #endif void __PHYSFS_platformDetectAvailableCDs(PHYSFS_StringCallback cb, void *data) { detectAvailableCDs(cb, data); } /* __PHYSFS_platformDetectAvailableCDs */ #ifdef PHYSFS_PLATFORM_WINRT static char *calcDirAppendSep(const WCHAR *wdir) { size_t len; void *ptr; char *retval; BAIL_IF(!wdir, errcodeFromWinApi(), NULL); retval = unicodeToUtf8Heap(wdir); BAIL_IF_ERRPASS(!retval, NULL); len = strlen(retval); ptr = allocator.Realloc(retval, len + 2); if (!ptr) { allocator.Free(retval); BAIL(PHYSFS_ERR_OUT_OF_MEMORY, NULL); } /* if */ retval = (char *) ptr; retval[len] = '\\'; retval[len+1] = '\0'; return retval; } /* calcDirAppendSep */ #endif char *__PHYSFS_platformCalcBaseDir(const char *argv0) { #ifdef PHYSFS_PLATFORM_WINRT return calcDirAppendSep((const WCHAR *) __PHYSFS_winrtCalcBaseDir()); #else char *retval = NULL; DWORD buflen = 64; LPWSTR modpath = NULL; while (1) { DWORD rc; void *ptr; if ( (ptr = allocator.Realloc(modpath, buflen*sizeof(WCHAR))) == NULL ) { allocator.Free(modpath); BAIL(PHYSFS_ERR_OUT_OF_MEMORY, NULL); } /* if */ modpath = (LPWSTR) ptr; rc = GetModuleFileNameW(NULL, modpath, buflen); if (rc == 0) { allocator.Free(modpath); BAIL(errcodeFromWinApi(), NULL); } /* if */ if (rc < buflen) { buflen = rc; break; } /* if */ buflen *= 2; } /* while */ if (buflen > 0) /* just in case... */ { WCHAR *ptr = (modpath + buflen) - 1; while (ptr != modpath) { if (*ptr == '\\') break; ptr--; } /* while */ if ((ptr == modpath) && (*ptr != '\\')) PHYSFS_setErrorCode(PHYSFS_ERR_OTHER_ERROR); /* oh well. */ else { *(ptr+1) = '\0'; /* chop off filename. */ retval = unicodeToUtf8Heap(modpath); } /* else */ } /* else */ allocator.Free(modpath); return retval; /* w00t. */ #endif } /* __PHYSFS_platformCalcBaseDir */ char *__PHYSFS_platformCalcPrefDir(const char *org, const char *app) { #ifdef PHYSFS_PLATFORM_WINRT return calcDirAppendSep((const WCHAR *) __PHYSFS_winrtCalcPrefDir()); #else /* * Vista and later has a new API for this, but SHGetFolderPath works there, * and apparently just wraps the new API. This is the new way to do it: * * SHGetKnownFolderPath(FOLDERID_RoamingAppData, KF_FLAG_CREATE, * NULL, &wszPath); */ WCHAR path[MAX_PATH]; char *utf8 = NULL; size_t len = 0; char *retval = NULL; if (!SUCCEEDED(SHGetFolderPathW(NULL, CSIDL_APPDATA | CSIDL_FLAG_CREATE, NULL, 0, path))) BAIL(PHYSFS_ERR_OS_ERROR, NULL); utf8 = unicodeToUtf8Heap(path); BAIL_IF_ERRPASS(!utf8, NULL); len = strlen(utf8) + strlen(org) + strlen(app) + 4; retval = allocator.Malloc(len); if (!retval) { allocator.Free(utf8); BAIL(PHYSFS_ERR_OUT_OF_MEMORY, NULL); } /* if */ snprintf(retval, len, "%s\\%s\\%s\\", utf8, org, app); allocator.Free(utf8); return retval; #endif } /* __PHYSFS_platformCalcPrefDir */ char *__PHYSFS_platformCalcUserDir(void) { #ifdef PHYSFS_PLATFORM_WINRT return calcDirAppendSep((const WCHAR *) __PHYSFS_winrtCalcPrefDir()); #else typedef BOOL (WINAPI *fnGetUserProfDirW)(HANDLE, LPWSTR, LPDWORD); fnGetUserProfDirW pGetDir = NULL; HANDLE lib = NULL; HANDLE accessToken = NULL; /* Security handle to process */ char *retval = NULL; lib = LoadLibraryA("userenv.dll"); BAIL_IF(!lib, errcodeFromWinApi(), NULL); pGetDir=(fnGetUserProfDirW) GetProcAddress(lib,"GetUserProfileDirectoryW"); GOTO_IF(!pGetDir, errcodeFromWinApi(), done); if (!OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &accessToken)) GOTO(errcodeFromWinApi(), done); else { DWORD psize = 0; LPWSTR wstr = NULL; BOOL rc = 0; /* * Should fail. Will write the size of the profile path in * psize. Also note that the second parameter can't be * NULL or the function fails on Windows XP, but has to be NULL on * Windows 10 or it will fail. :( */ rc = pGetDir(accessToken, NULL, &psize); GOTO_IF(rc, PHYSFS_ERR_OS_ERROR, done); /* should have failed! */ if (psize == 0) /* probably on Windows XP, try a different way. */ { WCHAR x = 0; rc = pGetDir(accessToken, &x, &psize); GOTO_IF(rc, PHYSFS_ERR_OS_ERROR, done); /* should have failed! */ GOTO_IF(!psize, PHYSFS_ERR_OS_ERROR, done); /* Uhoh... */ } /* if */ /* Allocate memory for the profile directory */ wstr = (LPWSTR) __PHYSFS_smallAlloc((psize + 1) * sizeof (WCHAR)); if (wstr != NULL) { if (pGetDir(accessToken, wstr, &psize)) { /* Make sure it ends in a dirsep. We allocated +1 for this. */ if (wstr[psize - 2] != '\\') { wstr[psize - 1] = '\\'; wstr[psize - 0] = '\0'; } /* if */ retval = unicodeToUtf8Heap(wstr); } /* if */ __PHYSFS_smallFree(wstr); } /* if */ } /* if */ done: if (accessToken) CloseHandle(accessToken); FreeLibrary(lib); return retval; /* We made it: hit the showers. */ #endif } /* __PHYSFS_platformCalcUserDir */ int __PHYSFS_platformInit(void) { return 1; /* It's all good */ } /* __PHYSFS_platformInit */ void __PHYSFS_platformDeinit(void) { deinitCDThread(); } /* __PHYSFS_platformDeinit */ void *__PHYSFS_platformGetThreadID(void) { return ( (void *) ((size_t) GetCurrentThreadId()) ); } /* __PHYSFS_platformGetThreadID */ PHYSFS_EnumerateCallbackResult __PHYSFS_platformEnumerate(const char *dirname, PHYSFS_EnumerateCallback callback, const char *origdir, void *callbackdata) { PHYSFS_EnumerateCallbackResult retval = PHYSFS_ENUM_OK; HANDLE dir = INVALID_HANDLE_VALUE; WIN32_FIND_DATAW entw; size_t len = strlen(dirname); char *searchPath = NULL; WCHAR *wSearchPath = NULL; /* Allocate a new string for path, maybe '\\', "*", and NULL terminator */ searchPath = (char *) __PHYSFS_smallAlloc(len + 3); BAIL_IF(!searchPath, PHYSFS_ERR_OUT_OF_MEMORY, PHYSFS_ENUM_ERROR); /* Copy current dirname */ strcpy(searchPath, dirname); /* if there's no '\\' at the end of the path, stick one in there. */ if (searchPath[len - 1] != '\\') { searchPath[len++] = '\\'; searchPath[len] = '\0'; } /* if */ /* Append the "*" to the end of the string */ strcat(searchPath, "*"); UTF8_TO_UNICODE_STACK(wSearchPath, searchPath); __PHYSFS_smallFree(searchPath); BAIL_IF_ERRPASS(!wSearchPath, PHYSFS_ENUM_ERROR); dir = winFindFirstFileW(wSearchPath, &entw); __PHYSFS_smallFree(wSearchPath); BAIL_IF(dir==INVALID_HANDLE_VALUE, errcodeFromWinApi(), PHYSFS_ENUM_ERROR); do { const WCHAR *fn = entw.cFileName; char *utf8; if (fn[0] == '.') /* ignore "." and ".." */ { if ((fn[1] == '\0') || ((fn[1] == '.') && (fn[2] == '\0'))) continue; } /* if */ utf8 = unicodeToUtf8Heap(fn); if (utf8 == NULL) retval = -1; else { retval = callback(callbackdata, origdir, utf8); allocator.Free(utf8); if (retval == PHYSFS_ENUM_ERROR) PHYSFS_setErrorCode(PHYSFS_ERR_APP_CALLBACK); } /* else */ } while ((retval == PHYSFS_ENUM_OK) && (FindNextFileW(dir, &entw) != 0)); FindClose(dir); return retval; } /* __PHYSFS_platformEnumerate */ int __PHYSFS_platformMkDir(const char *path) { WCHAR *wpath; DWORD rc; UTF8_TO_UNICODE_STACK(wpath, path); rc = CreateDirectoryW(wpath, NULL); __PHYSFS_smallFree(wpath); BAIL_IF(rc == 0, errcodeFromWinApi(), 0); return 1; } /* __PHYSFS_platformMkDir */ static HANDLE doOpen(const char *fname, DWORD mode, DWORD creation) { HANDLE fileh; WCHAR *wfname; UTF8_TO_UNICODE_STACK(wfname, fname); BAIL_IF(!wfname, PHYSFS_ERR_OUT_OF_MEMORY, NULL); fileh = winCreateFileW(wfname, mode, creation); __PHYSFS_smallFree(wfname); if (fileh == INVALID_HANDLE_VALUE) BAIL(errcodeFromWinApi(), INVALID_HANDLE_VALUE); return fileh; } /* doOpen */ void *__PHYSFS_platformOpenRead(const char *filename) { HANDLE h = doOpen(filename, GENERIC_READ, OPEN_EXISTING); return (h == INVALID_HANDLE_VALUE) ? NULL : (void *) h; } /* __PHYSFS_platformOpenRead */ void *__PHYSFS_platformOpenWrite(const char *filename) { HANDLE h = doOpen(filename, GENERIC_WRITE, CREATE_ALWAYS); return (h == INVALID_HANDLE_VALUE) ? NULL : (void *) h; } /* __PHYSFS_platformOpenWrite */ void *__PHYSFS_platformOpenAppend(const char *filename) { HANDLE h = doOpen(filename, GENERIC_WRITE, OPEN_ALWAYS); BAIL_IF_ERRPASS(h == INVALID_HANDLE_VALUE, NULL); if (!winSetFilePointer(h, 0, NULL, FILE_END)) { const PHYSFS_ErrorCode err = errcodeFromWinApi(); CloseHandle(h); BAIL(err, NULL); } /* if */ return (void *) h; } /* __PHYSFS_platformOpenAppend */ PHYSFS_sint64 __PHYSFS_platformRead(void *opaque, void *buf, PHYSFS_uint64 len) { HANDLE h = (HANDLE) opaque; PHYSFS_sint64 totalRead = 0; if (!__PHYSFS_ui64FitsAddressSpace(len)) BAIL(PHYSFS_ERR_INVALID_ARGUMENT, -1); while (len > 0) { const DWORD thislen = (len > 0xFFFFFFFF) ? 0xFFFFFFFF : (DWORD) len; DWORD numRead = 0; if (!ReadFile(h, buf, thislen, &numRead, NULL)) BAIL(errcodeFromWinApi(), -1); len -= (PHYSFS_uint64) numRead; totalRead += (PHYSFS_sint64) numRead; if (numRead != thislen) break; } /* while */ return totalRead; } /* __PHYSFS_platformRead */ PHYSFS_sint64 __PHYSFS_platformWrite(void *opaque, const void *buffer, PHYSFS_uint64 len) { HANDLE h = (HANDLE) opaque; PHYSFS_sint64 totalWritten = 0; if (!__PHYSFS_ui64FitsAddressSpace(len)) BAIL(PHYSFS_ERR_INVALID_ARGUMENT, -1); while (len > 0) { const DWORD thislen = (len > 0xFFFFFFFF) ? 0xFFFFFFFF : (DWORD) len; DWORD numWritten = 0; if (!WriteFile(h, buffer, thislen, &numWritten, NULL)) BAIL(errcodeFromWinApi(), -1); len -= (PHYSFS_uint64) numWritten; totalWritten += (PHYSFS_sint64) numWritten; if (numWritten != thislen) break; } /* while */ return totalWritten; } /* __PHYSFS_platformWrite */ int __PHYSFS_platformSeek(void *opaque, PHYSFS_uint64 pos) { HANDLE h = (HANDLE) opaque; const PHYSFS_sint64 spos = (PHYSFS_sint64) pos; BAIL_IF(!winSetFilePointer(h,spos,NULL,FILE_BEGIN), errcodeFromWinApi(), 0); return 1; /* No error occured */ } /* __PHYSFS_platformSeek */ PHYSFS_sint64 __PHYSFS_platformTell(void *opaque) { HANDLE h = (HANDLE) opaque; PHYSFS_sint64 pos = 0; BAIL_IF(!winSetFilePointer(h,0,&pos,FILE_CURRENT), errcodeFromWinApi(), -1); return pos; } /* __PHYSFS_platformTell */ PHYSFS_sint64 __PHYSFS_platformFileLength(void *opaque) { HANDLE h = (HANDLE) opaque; const PHYSFS_sint64 retval = winGetFileSize(h); BAIL_IF(retval < 0, errcodeFromWinApi(), -1); return retval; } /* __PHYSFS_platformFileLength */ int __PHYSFS_platformFlush(void *opaque) { HANDLE h = (HANDLE) opaque; BAIL_IF(!FlushFileBuffers(h), errcodeFromWinApi(), 0); return 1; } /* __PHYSFS_platformFlush */ void __PHYSFS_platformClose(void *opaque) { HANDLE h = (HANDLE) opaque; (void) CloseHandle(h); /* ignore errors. You should have flushed! */ } /* __PHYSFS_platformClose */ static int doPlatformDelete(LPWSTR wpath) { WIN32_FILE_ATTRIBUTE_DATA info; if (!GetFileAttributesExW(wpath, GetFileExInfoStandard, &info)) BAIL(errcodeFromWinApi(), 0); else { const int isdir = (info.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY); const BOOL rc = isdir ? RemoveDirectoryW(wpath) : DeleteFileW(wpath); BAIL_IF(!rc, errcodeFromWinApi(), 0); } /* else */ return 1; /* if you made it here, it worked. */ } /* doPlatformDelete */ int __PHYSFS_platformDelete(const char *path) { int retval = 0; LPWSTR wpath = NULL; UTF8_TO_UNICODE_STACK(wpath, path); BAIL_IF(!wpath, PHYSFS_ERR_OUT_OF_MEMORY, 0); retval = doPlatformDelete(wpath); __PHYSFS_smallFree(wpath); return retval; } /* __PHYSFS_platformDelete */ void *__PHYSFS_platformCreateMutex(void) { LPCRITICAL_SECTION lpcs; lpcs = (LPCRITICAL_SECTION) allocator.Malloc(sizeof (CRITICAL_SECTION)); BAIL_IF(!lpcs, PHYSFS_ERR_OUT_OF_MEMORY, NULL); if (!winInitializeCriticalSection(lpcs)) { allocator.Free(lpcs); BAIL(errcodeFromWinApi(), NULL); } /* if */ return lpcs; } /* __PHYSFS_platformCreateMutex */ void __PHYSFS_platformDestroyMutex(void *mutex) { DeleteCriticalSection((LPCRITICAL_SECTION) mutex); allocator.Free(mutex); } /* __PHYSFS_platformDestroyMutex */ int __PHYSFS_platformGrabMutex(void *mutex) { EnterCriticalSection((LPCRITICAL_SECTION) mutex); return 1; } /* __PHYSFS_platformGrabMutex */ void __PHYSFS_platformReleaseMutex(void *mutex) { LeaveCriticalSection((LPCRITICAL_SECTION) mutex); } /* __PHYSFS_platformReleaseMutex */ static PHYSFS_sint64 FileTimeToPhysfsTime(const FILETIME *ft) { SYSTEMTIME st_utc; SYSTEMTIME st_localtz; TIME_ZONE_INFORMATION tzi; DWORD tzid; PHYSFS_sint64 retval; struct tm tm; BOOL rc; BAIL_IF(!FileTimeToSystemTime(ft, &st_utc), errcodeFromWinApi(), -1); tzid = GetTimeZoneInformation(&tzi); BAIL_IF(tzid == TIME_ZONE_ID_INVALID, errcodeFromWinApi(), -1); rc = SystemTimeToTzSpecificLocalTime(&tzi, &st_utc, &st_localtz); BAIL_IF(!rc, errcodeFromWinApi(), -1); /* Convert to a format that mktime() can grok... */ tm.tm_sec = st_localtz.wSecond; tm.tm_min = st_localtz.wMinute; tm.tm_hour = st_localtz.wHour; tm.tm_mday = st_localtz.wDay; tm.tm_mon = st_localtz.wMonth - 1; tm.tm_year = st_localtz.wYear - 1900; tm.tm_wday = -1 /*st_localtz.wDayOfWeek*/; tm.tm_yday = -1; tm.tm_isdst = -1; /* Convert to a format PhysicsFS can grok... */ retval = (PHYSFS_sint64) mktime(&tm); BAIL_IF(retval == -1, PHYSFS_ERR_OS_ERROR, -1); return retval; } /* FileTimeToPhysfsTime */ /* check for symlinks. These exist in NTFS 3.1 (WinXP), even though they aren't really available to userspace before Vista. I wonder what would happen if you put an NTFS disk with a symlink on it into an XP machine, though; would this flag get set? NTFS symlinks are a form of "reparse point" (junction, volume mount, etc), so if the REPARSE_POINT attribute is set, check for the symlink tag thereafter. This assumes you already read in the file attributes. */ static int isSymlink(const WCHAR *wpath, const DWORD attr) { WIN32_FIND_DATAW w32dw; HANDLE h; if ((attr & PHYSFS_FILE_ATTRIBUTE_REPARSE_POINT) == 0) return 0; /* not a reparse point? Definitely not a symlink. */ h = winFindFirstFileW(wpath, &w32dw); if (h == INVALID_HANDLE_VALUE) return 0; /* ...maybe the file just vanished...? */ FindClose(h); return (w32dw.dwReserved0 == PHYSFS_IO_REPARSE_TAG_SYMLINK); } /* isSymlink */ int __PHYSFS_platformStat(const char *filename, PHYSFS_Stat *st, const int follow) { WIN32_FILE_ATTRIBUTE_DATA winstat; WCHAR *wstr = NULL; DWORD err = 0; BOOL rc = 0; int issymlink = 0; UTF8_TO_UNICODE_STACK(wstr, filename); BAIL_IF(!wstr, PHYSFS_ERR_OUT_OF_MEMORY, 0); rc = GetFileAttributesExW(wstr, GetFileExInfoStandard, &winstat); if (!rc) err = GetLastError(); else /* check for symlink while wstr is still available */ issymlink = !follow && isSymlink(wstr, winstat.dwFileAttributes); __PHYSFS_smallFree(wstr); BAIL_IF(!rc, errcodeFromWinApiError(err), 0); st->modtime = FileTimeToPhysfsTime(&winstat.ftLastWriteTime); st->accesstime = FileTimeToPhysfsTime(&winstat.ftLastAccessTime); st->createtime = FileTimeToPhysfsTime(&winstat.ftCreationTime); if (issymlink) { st->filetype = PHYSFS_FILETYPE_SYMLINK; st->filesize = 0; } /* if */ else if (winstat.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) { st->filetype = PHYSFS_FILETYPE_DIRECTORY; st->filesize = 0; } /* else if */ else if (winstat.dwFileAttributes & (FILE_ATTRIBUTE_OFFLINE | FILE_ATTRIBUTE_DEVICE)) { st->filetype = PHYSFS_FILETYPE_OTHER; st->filesize = (((PHYSFS_uint64) winstat.nFileSizeHigh) << 32) | winstat.nFileSizeLow; } /* else if */ else { st->filetype = PHYSFS_FILETYPE_REGULAR; st->filesize = (((PHYSFS_uint64) winstat.nFileSizeHigh) << 32) | winstat.nFileSizeLow; } /* else */ st->readonly = ((winstat.dwFileAttributes & FILE_ATTRIBUTE_READONLY) != 0); return 1; } /* __PHYSFS_platformStat */ #endif /* PHYSFS_PLATFORM_WINDOWS */ /* end of physfs_platform_windows.c ... */ ================================================ FILE: src/libraries/physfs/physfs_platform_winrt.cpp ================================================ /* * Windows Runtime (WinRT) support routines for PhysicsFS. * * Please see the file LICENSE.txt in the source's root directory. * * This file originally written by Martin "T-Bone" Ahrnbom, but was mostly * merged into physfs_platform_windows.c by Ryan C. Gordon (so please harass * Ryan about bugs and not Martin). */ /* (There used to be instructions on how to make a WinRT project, but at this point, either CMake will do it for you or you should just drop PhysicsFS's sources into your existing project. --ryan.) */ #define __PHYSICSFS_INTERNAL__ #include "physfs_platforms.h" #ifdef PHYSFS_PLATFORM_WINRT #if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_WARNINGS) #define _CRT_SECURE_NO_WARNINGS 1 #endif #include #include "physfs_internal.h" const void *__PHYSFS_winrtCalcBaseDir(void) { return Windows::ApplicationModel::Package::Current->InstalledLocation->Path->Data(); } /* __PHYSFS_winrtCalcBaseDir */ const void *__PHYSFS_winrtCalcPrefDir(void) { return Windows::Storage::ApplicationData::Current->LocalFolder->Path->Data(); } /* __PHYSFS_winrtCalcBaseDir */ #endif /* PHYSFS_PLATFORM_WINRT */ /* end of physfs_platform_winrt.cpp ... */ ================================================ FILE: src/libraries/physfs/physfs_platforms.h ================================================ #ifndef _INCL_PHYSFS_PLATFORMS #define _INCL_PHYSFS_PLATFORMS #ifndef __PHYSICSFS_INTERNAL__ #error Do not include this header from your applications. #endif /* * These only define the platforms to determine which files in the platforms * directory should be compiled. For example, technically BeOS can be called * a "unix" system, but since it doesn't use unix.c, we don't define * PHYSFS_PLATFORM_UNIX on that system. */ #if (defined __HAIKU__) # define PHYSFS_PLATFORM_HAIKU 1 # define PHYSFS_PLATFORM_POSIX 1 #elif ((defined __BEOS__) || (defined __beos__)) # error BeOS support was dropped since PhysicsFS 2.1. Sorry. Try Haiku! #elif (defined _WIN32_WCE) || (defined _WIN64_WCE) # error PocketPC support was dropped since PhysicsFS 2.1. Sorry. Try WinRT! #elif (defined(_MSC_VER) && (_MSC_VER >= 1700) && !_USING_V110_SDK71_) /* _MSC_VER==1700 for MSVC 2012 */ # include # define PHYSFS_PLATFORM_WINDOWS 1 # if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) # define PHYSFS_NO_CDROM_SUPPORT 1 # define PHYSFS_PLATFORM_WINRT 1 # endif #elif (((defined _WIN32) || (defined _WIN64)) && (!defined __CYGWIN__)) # define PHYSFS_PLATFORM_WINDOWS 1 #elif defined(__OS2__) || defined(OS2) # define PHYSFS_PLATFORM_OS2 1 #elif ((defined __MACH__) && (defined __APPLE__)) /* To check if iOS or not, we need to include this file */ # include # if ((TARGET_IPHONE_SIMULATOR) || (TARGET_OS_IPHONE)) # define PHYSFS_NO_CDROM_SUPPORT 1 # endif # define PHYSFS_PLATFORM_APPLE 1 # define PHYSFS_PLATFORM_POSIX 1 #elif defined(macintosh) # error Classic Mac OS support was dropped from PhysicsFS 2.0. Move to OS X. #elif defined(__ANDROID__) # define PHYSFS_PLATFORM_LINUX 1 # define PHYSFS_PLATFORM_ANDROID 1 # define PHYSFS_PLATFORM_POSIX 1 # define PHYSFS_NO_CDROM_SUPPORT 1 #elif defined(__linux) # define PHYSFS_PLATFORM_LINUX 1 # define PHYSFS_PLATFORM_UNIX 1 # define PHYSFS_PLATFORM_POSIX 1 #elif defined(__sun) || defined(sun) # define PHYSFS_PLATFORM_SOLARIS 1 # define PHYSFS_PLATFORM_UNIX 1 # define PHYSFS_PLATFORM_POSIX 1 #elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) # define PHYSFS_PLATFORM_FREEBSD 1 # define PHYSFS_PLATFORM_BSD 1 # define PHYSFS_PLATFORM_UNIX 1 # define PHYSFS_PLATFORM_POSIX 1 #elif defined(__NetBSD__) || defined(__OpenBSD__) || defined(__bsdi__) # define PHYSFS_PLATFORM_BSD 1 # define PHYSFS_PLATFORM_UNIX 1 # define PHYSFS_PLATFORM_POSIX 1 #elif defined(__EMSCRIPTEN__) # define PHYSFS_NO_CDROM_SUPPORT 1 # define PHYSFS_PLATFORM_UNIX 1 # define PHYSFS_PLATFORM_POSIX 1 #elif defined(__QNX__) # define PHYSFS_PLATFORM_QNX 1 # define PHYSFS_PLATFORM_POSIX 1 #elif defined(unix) || defined(__unix__) # define PHYSFS_PLATFORM_UNIX 1 # define PHYSFS_PLATFORM_POSIX 1 #else # error Unknown platform. #endif #endif /* include-once blocker. */ ================================================ FILE: src/libraries/physfs/physfs_unicode.c ================================================ #define __PHYSICSFS_INTERNAL__ #include "physfs_internal.h" #include "physfs_casefolding.h" /* * From rfc3629, the UTF-8 spec: * https://www.ietf.org/rfc/rfc3629.txt * * Char. number range | UTF-8 octet sequence * (hexadecimal) | (binary) * --------------------+--------------------------------------------- * 0000 0000-0000 007F | 0xxxxxxx * 0000 0080-0000 07FF | 110xxxxx 10xxxxxx * 0000 0800-0000 FFFF | 1110xxxx 10xxxxxx 10xxxxxx * 0001 0000-0010 FFFF | 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx */ /* * This may not be the best value, but it's one that isn't represented * in Unicode (0x10FFFF is the largest codepoint value). We return this * value from __PHYSFS_utf8codepoint() if there's bogus bits in the * stream. __PHYSFS_utf8codepoint() will turn this value into something * reasonable (like a question mark), for text that wants to try to recover, * whereas utf8valid() will use the value to determine if a string has bad * bits. */ #define UNICODE_BOGUS_CHAR_VALUE 0xFFFFFFFF /* * This is the codepoint we currently return when there was bogus bits in a * UTF-8 string. May not fly in Asian locales? */ #define UNICODE_BOGUS_CHAR_CODEPOINT '?' PHYSFS_uint32 __PHYSFS_utf8codepoint(const char **_str) { const char *str = *_str; PHYSFS_uint32 retval = 0; PHYSFS_uint32 octet = (PHYSFS_uint32) ((PHYSFS_uint8) *str); PHYSFS_uint32 octet2, octet3, octet4; if (octet == 0) /* null terminator, end of string. */ return 0; else if (octet < 128) /* one octet char: 0 to 127 */ { (*_str)++; /* skip to next possible start of codepoint. */ return octet; } /* else if */ else if ((octet > 127) && (octet < 192)) /* bad (starts with 10xxxxxx). */ { /* * Apparently each of these is supposed to be flagged as a bogus * char, instead of just resyncing to the next valid codepoint. */ (*_str)++; /* skip to next possible start of codepoint. */ return UNICODE_BOGUS_CHAR_VALUE; } /* else if */ else if (octet < 224) /* two octets */ { (*_str)++; /* advance at least one byte in case of an error */ octet -= (128+64); octet2 = (PHYSFS_uint32) ((PHYSFS_uint8) *(++str)); if ((octet2 & (128+64)) != 128) /* Format isn't 10xxxxxx? */ return UNICODE_BOGUS_CHAR_VALUE; *_str += 1; /* skip to next possible start of codepoint. */ retval = ((octet << 6) | (octet2 - 128)); if ((retval >= 0x80) && (retval <= 0x7FF)) return retval; } /* else if */ else if (octet < 240) /* three octets */ { (*_str)++; /* advance at least one byte in case of an error */ octet -= (128+64+32); octet2 = (PHYSFS_uint32) ((PHYSFS_uint8) *(++str)); if ((octet2 & (128+64)) != 128) /* Format isn't 10xxxxxx? */ return UNICODE_BOGUS_CHAR_VALUE; octet3 = (PHYSFS_uint32) ((PHYSFS_uint8) *(++str)); if ((octet3 & (128+64)) != 128) /* Format isn't 10xxxxxx? */ return UNICODE_BOGUS_CHAR_VALUE; *_str += 2; /* skip to next possible start of codepoint. */ retval = ( ((octet << 12)) | ((octet2-128) << 6) | ((octet3-128)) ); /* There are seven "UTF-16 surrogates" that are illegal in UTF-8. */ switch (retval) { case 0xD800: case 0xDB7F: case 0xDB80: case 0xDBFF: case 0xDC00: case 0xDF80: case 0xDFFF: return UNICODE_BOGUS_CHAR_VALUE; } /* switch */ /* 0xFFFE and 0xFFFF are illegal, too, so we check them at the edge. */ if ((retval >= 0x800) && (retval <= 0xFFFD)) return retval; } /* else if */ else if (octet < 248) /* four octets */ { (*_str)++; /* advance at least one byte in case of an error */ octet -= (128+64+32+16); octet2 = (PHYSFS_uint32) ((PHYSFS_uint8) *(++str)); if ((octet2 & (128+64)) != 128) /* Format isn't 10xxxxxx? */ return UNICODE_BOGUS_CHAR_VALUE; octet3 = (PHYSFS_uint32) ((PHYSFS_uint8) *(++str)); if ((octet3 & (128+64)) != 128) /* Format isn't 10xxxxxx? */ return UNICODE_BOGUS_CHAR_VALUE; octet4 = (PHYSFS_uint32) ((PHYSFS_uint8) *(++str)); if ((octet4 & (128+64)) != 128) /* Format isn't 10xxxxxx? */ return UNICODE_BOGUS_CHAR_VALUE; *_str += 3; /* skip to next possible start of codepoint. */ retval = ( ((octet << 18)) | ((octet2 - 128) << 12) | ((octet3 - 128) << 6) | ((octet4 - 128)) ); if ((retval >= 0x10000) && (retval <= 0x10FFFF)) return retval; } /* else if */ /* * Five and six octet sequences became illegal in rfc3629. * We throw the codepoint away, but parse them to make sure we move * ahead the right number of bytes and don't overflow the buffer. */ else if (octet < 252) /* five octets */ { (*_str)++; /* advance at least one byte in case of an error */ octet = (PHYSFS_uint32) ((PHYSFS_uint8) *(++str)); if ((octet & (128+64)) != 128) /* Format isn't 10xxxxxx? */ return UNICODE_BOGUS_CHAR_VALUE; octet = (PHYSFS_uint32) ((PHYSFS_uint8) *(++str)); if ((octet & (128+64)) != 128) /* Format isn't 10xxxxxx? */ return UNICODE_BOGUS_CHAR_VALUE; octet = (PHYSFS_uint32) ((PHYSFS_uint8) *(++str)); if ((octet & (128+64)) != 128) /* Format isn't 10xxxxxx? */ return UNICODE_BOGUS_CHAR_VALUE; octet = (PHYSFS_uint32) ((PHYSFS_uint8) *(++str)); if ((octet & (128+64)) != 128) /* Format isn't 10xxxxxx? */ return UNICODE_BOGUS_CHAR_VALUE; *_str += 4; /* skip to next possible start of codepoint. */ return UNICODE_BOGUS_CHAR_VALUE; } /* else if */ else /* six octets */ { (*_str)++; /* advance at least one byte in case of an error */ octet = (PHYSFS_uint32) ((PHYSFS_uint8) *(++str)); if ((octet & (128+64)) != 128) /* Format isn't 10xxxxxx? */ return UNICODE_BOGUS_CHAR_VALUE; octet = (PHYSFS_uint32) ((PHYSFS_uint8) *(++str)); if ((octet & (128+64)) != 128) /* Format isn't 10xxxxxx? */ return UNICODE_BOGUS_CHAR_VALUE; octet = (PHYSFS_uint32) ((PHYSFS_uint8) *(++str)); if ((octet & (128+64)) != 128) /* Format isn't 10xxxxxx? */ return UNICODE_BOGUS_CHAR_VALUE; octet = (PHYSFS_uint32) ((PHYSFS_uint8) *(++str)); if ((octet & (128+64)) != 128) /* Format isn't 10xxxxxx? */ return UNICODE_BOGUS_CHAR_VALUE; octet = (PHYSFS_uint32) ((PHYSFS_uint8) *(++str)); if ((octet & (128+64)) != 128) /* Format isn't 10xxxxxx? */ return UNICODE_BOGUS_CHAR_VALUE; *_str += 6; /* skip to next possible start of codepoint. */ return UNICODE_BOGUS_CHAR_VALUE; } /* else if */ return UNICODE_BOGUS_CHAR_VALUE; } /* __PHYSFS_utf8codepoint */ static inline PHYSFS_uint32 utf8codepoint(const char **_str) { return __PHYSFS_utf8codepoint(_str); } /* utf8codepoint */ static PHYSFS_uint32 utf16codepoint(const PHYSFS_uint16 **_str) { const PHYSFS_uint16 *src = *_str; PHYSFS_uint32 cp = (PHYSFS_uint32) *(src++); if (cp == 0) /* null terminator, end of string. */ return 0; /* Orphaned second half of surrogate pair? */ else if ((cp >= 0xDC00) && (cp <= 0xDFFF)) cp = UNICODE_BOGUS_CHAR_CODEPOINT; else if ((cp >= 0xD800) && (cp <= 0xDBFF)) /* start surrogate pair! */ { const PHYSFS_uint32 pair = (PHYSFS_uint32) *src; if (pair == 0) cp = UNICODE_BOGUS_CHAR_CODEPOINT; else if ((pair < 0xDC00) || (pair > 0xDFFF)) cp = UNICODE_BOGUS_CHAR_CODEPOINT; else { src++; /* eat the other surrogate. */ cp = 0x10000 + (((cp - 0xD800) << 10) | (pair - 0xDC00)); } /* else */ } /* else if */ *_str = src; return cp; } /* utf16codepoint */ static PHYSFS_uint32 utf32codepoint(const PHYSFS_uint32 **_str) { const PHYSFS_uint32 *src = *_str; PHYSFS_uint32 cp = *(src++); if (cp == 0) /* null terminator, end of string. */ return 0; else if (cp > 0x10FFF) cp = UNICODE_BOGUS_CHAR_CODEPOINT; *_str = src; return cp; } /* utf32codepoint */ void PHYSFS_utf8ToUcs4(const char *src, PHYSFS_uint32 *dst, PHYSFS_uint64 len) { len -= sizeof (PHYSFS_uint32); /* save room for null char. */ while (len >= sizeof (PHYSFS_uint32)) { PHYSFS_uint32 cp = __PHYSFS_utf8codepoint(&src); if (cp == 0) break; else if (cp == UNICODE_BOGUS_CHAR_VALUE) cp = UNICODE_BOGUS_CHAR_CODEPOINT; *(dst++) = cp; len -= sizeof (PHYSFS_uint32); } /* while */ *dst = 0; } /* PHYSFS_utf8ToUcs4 */ void PHYSFS_utf8ToUcs2(const char *src, PHYSFS_uint16 *dst, PHYSFS_uint64 len) { len -= sizeof (PHYSFS_uint16); /* save room for null char. */ while (len >= sizeof (PHYSFS_uint16)) { PHYSFS_uint32 cp = __PHYSFS_utf8codepoint(&src); if (cp == 0) break; else if (cp == UNICODE_BOGUS_CHAR_VALUE) cp = UNICODE_BOGUS_CHAR_CODEPOINT; if (cp > 0xFFFF) /* UTF-16 surrogates (bogus chars in UCS-2) */ cp = UNICODE_BOGUS_CHAR_CODEPOINT; *(dst++) = cp; len -= sizeof (PHYSFS_uint16); } /* while */ *dst = 0; } /* PHYSFS_utf8ToUcs2 */ void PHYSFS_utf8ToUtf16(const char *src, PHYSFS_uint16 *dst, PHYSFS_uint64 len) { len -= sizeof (PHYSFS_uint16); /* save room for null char. */ while (len >= sizeof (PHYSFS_uint16)) { PHYSFS_uint32 cp = __PHYSFS_utf8codepoint(&src); if (cp == 0) break; else if (cp == UNICODE_BOGUS_CHAR_VALUE) cp = UNICODE_BOGUS_CHAR_CODEPOINT; if (cp > 0xFFFF) /* encode as surrogate pair */ { if (len < (sizeof (PHYSFS_uint16) * 2)) break; /* not enough room for the pair, stop now. */ cp -= 0x10000; /* Make this a 20-bit value */ *(dst++) = 0xD800 + ((cp >> 10) & 0x3FF); len -= sizeof (PHYSFS_uint16); cp = 0xDC00 + (cp & 0x3FF); } /* if */ *(dst++) = cp; len -= sizeof (PHYSFS_uint16); } /* while */ *dst = 0; } /* PHYSFS_utf8ToUtf16 */ static void utf8fromcodepoint(PHYSFS_uint32 cp, char **_dst, PHYSFS_uint64 *_len) { char *dst = *_dst; PHYSFS_uint64 len = *_len; if (len == 0) return; if (cp > 0x10FFFF) cp = UNICODE_BOGUS_CHAR_CODEPOINT; else if ((cp == 0xFFFE) || (cp == 0xFFFF)) /* illegal values. */ cp = UNICODE_BOGUS_CHAR_CODEPOINT; else { /* There are seven "UTF-16 surrogates" that are illegal in UTF-8. */ switch (cp) { case 0xD800: case 0xDB7F: case 0xDB80: case 0xDBFF: case 0xDC00: case 0xDF80: case 0xDFFF: cp = UNICODE_BOGUS_CHAR_CODEPOINT; } /* switch */ } /* else */ /* Do the encoding... */ if (cp < 0x80) { *(dst++) = (char) cp; len--; } /* if */ else if (cp < 0x800) { if (len < 2) len = 0; else { *(dst++) = (char) ((cp >> 6) | 128 | 64); *(dst++) = (char) (cp & 0x3F) | 128; len -= 2; } /* else */ } /* else if */ else if (cp < 0x10000) { if (len < 3) len = 0; else { *(dst++) = (char) ((cp >> 12) | 128 | 64 | 32); *(dst++) = (char) ((cp >> 6) & 0x3F) | 128; *(dst++) = (char) (cp & 0x3F) | 128; len -= 3; } /* else */ } /* else if */ else { if (len < 4) len = 0; else { *(dst++) = (char) ((cp >> 18) | 128 | 64 | 32 | 16); *(dst++) = (char) ((cp >> 12) & 0x3F) | 128; *(dst++) = (char) ((cp >> 6) & 0x3F) | 128; *(dst++) = (char) (cp & 0x3F) | 128; len -= 4; } /* else if */ } /* else */ *_dst = dst; *_len = len; } /* utf8fromcodepoint */ #define UTF8FROMTYPE(typ, src, dst, len) \ if (len == 0) return; \ len--; \ while (len) \ { \ const PHYSFS_uint32 cp = (PHYSFS_uint32) ((typ) (*(src++))); \ if (cp == 0) break; \ utf8fromcodepoint(cp, &dst, &len); \ } \ *dst = '\0'; \ void PHYSFS_utf8FromUcs4(const PHYSFS_uint32 *src, char *dst, PHYSFS_uint64 len) { UTF8FROMTYPE(PHYSFS_uint32, src, dst, len); } /* PHYSFS_utf8FromUcs4 */ void PHYSFS_utf8FromUcs2(const PHYSFS_uint16 *src, char *dst, PHYSFS_uint64 len) { UTF8FROMTYPE(PHYSFS_uint64, src, dst, len); } /* PHYSFS_utf8FromUcs2 */ /* latin1 maps to unicode codepoints directly, we just utf-8 encode it. */ void PHYSFS_utf8FromLatin1(const char *src, char *dst, PHYSFS_uint64 len) { UTF8FROMTYPE(PHYSFS_uint8, src, dst, len); } /* PHYSFS_utf8FromLatin1 */ #undef UTF8FROMTYPE void PHYSFS_utf8FromUtf16(const PHYSFS_uint16 *src, char *dst, PHYSFS_uint64 len) { if (len == 0) return; len--; while (len) { const PHYSFS_uint32 cp = utf16codepoint(&src); if (!cp) break; utf8fromcodepoint(cp, &dst, &len); } /* while */ *dst = '\0'; } /* PHYSFS_utf8FromUtf16 */ int PHYSFS_caseFold(const PHYSFS_uint32 from, PHYSFS_uint32 *to) { int i; if (from < 128) /* low-ASCII, easy! */ { if ((from >= 'A') && (from <= 'Z')) *to = from - ('A' - 'a'); else *to = from; return 1; } /* if */ else if (from <= 0xFFFF) { const PHYSFS_uint8 hash = ((from ^ (from >> 8)) & 0xFF); const PHYSFS_uint16 from16 = (PHYSFS_uint16) from; { const CaseFoldHashBucket1_16 *bucket = &case_fold_hash1_16[hash]; const int count = (int) bucket->count; for (i = 0; i < count; i++) { const CaseFoldMapping1_16 *mapping = &bucket->list[i]; if (mapping->from == from16) { *to = mapping->to0; return 1; } /* if */ } /* for */ } { const CaseFoldHashBucket2_16 *bucket = &case_fold_hash2_16[hash & 15]; const int count = (int) bucket->count; for (i = 0; i < count; i++) { const CaseFoldMapping2_16 *mapping = &bucket->list[i]; if (mapping->from == from16) { to[0] = mapping->to0; to[1] = mapping->to1; return 2; } /* if */ } /* for */ } { const CaseFoldHashBucket3_16 *bucket = &case_fold_hash3_16[hash & 3]; const int count = (int) bucket->count; for (i = 0; i < count; i++) { const CaseFoldMapping3_16 *mapping = &bucket->list[i]; if (mapping->from == from16) { to[0] = mapping->to0; to[1] = mapping->to1; to[2] = mapping->to2; return 3; } /* if */ } /* for */ } } /* else if */ else /* codepoint that doesn't fit in 16 bits. */ { const PHYSFS_uint8 hash = ((from ^ (from >> 8)) & 0xFF); const CaseFoldHashBucket1_32 *bucket = &case_fold_hash1_32[hash & 15]; const int count = (int) bucket->count; for (i = 0; i < count; i++) { const CaseFoldMapping1_32 *mapping = &bucket->list[i]; if (mapping->from == from) { *to = mapping->to0; return 1; } /* if */ } /* for */ } /* else */ /* Not found...there's no remapping for this codepoint. */ *to = from; return 1; } /* PHYSFS_caseFold */ #define UTFSTRICMP(bits) \ PHYSFS_uint32 folded1[3], folded2[3]; \ int head1 = 0, tail1 = 0, head2 = 0, tail2 = 0; \ while (1) { \ PHYSFS_uint32 cp1, cp2; \ if (head1 != tail1) { \ cp1 = folded1[tail1++]; \ } else { \ head1 = PHYSFS_caseFold(utf##bits##codepoint(&str1), folded1); \ cp1 = folded1[0]; \ tail1 = 1; \ } \ if (head2 != tail2) { \ cp2 = folded2[tail2++]; \ } else { \ head2 = PHYSFS_caseFold(utf##bits##codepoint(&str2), folded2); \ cp2 = folded2[0]; \ tail2 = 1; \ } \ if (cp1 < cp2) { \ return -1; \ } else if (cp1 > cp2) { \ return 1; \ } else if (cp1 == 0) { \ break; /* complete match. */ \ } \ } \ return 0 int PHYSFS_utf8stricmp(const char *str1, const char *str2) { UTFSTRICMP(8); } /* PHYSFS_utf8stricmp */ int PHYSFS_utf16stricmp(const PHYSFS_uint16 *str1, const PHYSFS_uint16 *str2) { UTFSTRICMP(16); } /* PHYSFS_utf16stricmp */ int PHYSFS_ucs4stricmp(const PHYSFS_uint32 *str1, const PHYSFS_uint32 *str2) { UTFSTRICMP(32); } /* PHYSFS_ucs4stricmp */ #undef UTFSTRICMP /* end of physfs_unicode.c ... */ ================================================ FILE: src/libraries/spirv_cross/GLSL.std.450.h ================================================ /* * Copyright 2014-2016,2021 The Khronos Group, Inc. * SPDX-License-Identifier: MIT * * MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS * STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND * HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/ */ #ifndef GLSLstd450_H #define GLSLstd450_H static const int GLSLstd450Version = 100; static const int GLSLstd450Revision = 3; enum GLSLstd450 { GLSLstd450Bad = 0, // Don't use GLSLstd450Round = 1, GLSLstd450RoundEven = 2, GLSLstd450Trunc = 3, GLSLstd450FAbs = 4, GLSLstd450SAbs = 5, GLSLstd450FSign = 6, GLSLstd450SSign = 7, GLSLstd450Floor = 8, GLSLstd450Ceil = 9, GLSLstd450Fract = 10, GLSLstd450Radians = 11, GLSLstd450Degrees = 12, GLSLstd450Sin = 13, GLSLstd450Cos = 14, GLSLstd450Tan = 15, GLSLstd450Asin = 16, GLSLstd450Acos = 17, GLSLstd450Atan = 18, GLSLstd450Sinh = 19, GLSLstd450Cosh = 20, GLSLstd450Tanh = 21, GLSLstd450Asinh = 22, GLSLstd450Acosh = 23, GLSLstd450Atanh = 24, GLSLstd450Atan2 = 25, GLSLstd450Pow = 26, GLSLstd450Exp = 27, GLSLstd450Log = 28, GLSLstd450Exp2 = 29, GLSLstd450Log2 = 30, GLSLstd450Sqrt = 31, GLSLstd450InverseSqrt = 32, GLSLstd450Determinant = 33, GLSLstd450MatrixInverse = 34, GLSLstd450Modf = 35, // second operand needs an OpVariable to write to GLSLstd450ModfStruct = 36, // no OpVariable operand GLSLstd450FMin = 37, GLSLstd450UMin = 38, GLSLstd450SMin = 39, GLSLstd450FMax = 40, GLSLstd450UMax = 41, GLSLstd450SMax = 42, GLSLstd450FClamp = 43, GLSLstd450UClamp = 44, GLSLstd450SClamp = 45, GLSLstd450FMix = 46, GLSLstd450IMix = 47, // Reserved GLSLstd450Step = 48, GLSLstd450SmoothStep = 49, GLSLstd450Fma = 50, GLSLstd450Frexp = 51, // second operand needs an OpVariable to write to GLSLstd450FrexpStruct = 52, // no OpVariable operand GLSLstd450Ldexp = 53, GLSLstd450PackSnorm4x8 = 54, GLSLstd450PackUnorm4x8 = 55, GLSLstd450PackSnorm2x16 = 56, GLSLstd450PackUnorm2x16 = 57, GLSLstd450PackHalf2x16 = 58, GLSLstd450PackDouble2x32 = 59, GLSLstd450UnpackSnorm2x16 = 60, GLSLstd450UnpackUnorm2x16 = 61, GLSLstd450UnpackHalf2x16 = 62, GLSLstd450UnpackSnorm4x8 = 63, GLSLstd450UnpackUnorm4x8 = 64, GLSLstd450UnpackDouble2x32 = 65, GLSLstd450Length = 66, GLSLstd450Distance = 67, GLSLstd450Cross = 68, GLSLstd450Normalize = 69, GLSLstd450FaceForward = 70, GLSLstd450Reflect = 71, GLSLstd450Refract = 72, GLSLstd450FindILsb = 73, GLSLstd450FindSMsb = 74, GLSLstd450FindUMsb = 75, GLSLstd450InterpolateAtCentroid = 76, GLSLstd450InterpolateAtSample = 77, GLSLstd450InterpolateAtOffset = 78, GLSLstd450NMin = 79, GLSLstd450NMax = 80, GLSLstd450NClamp = 81, GLSLstd450Count }; #endif // #ifndef GLSLstd450_H ================================================ FILE: src/libraries/spirv_cross/include/spirv_cross/barrier.hpp ================================================ /* * Copyright 2015-2017 ARM Limited * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef SPIRV_CROSS_BARRIER_HPP #define SPIRV_CROSS_BARRIER_HPP #include #include namespace spirv_cross { class Barrier { public: Barrier() { count.store(0); iteration.store(0); } void set_release_divisor(unsigned divisor) { this->divisor = divisor; } static inline void memoryBarrier() { std::atomic_thread_fence(std::memory_order_seq_cst); } void reset_counter() { count.store(0); iteration.store(0); } void wait() { unsigned target_iteration = iteration.load(std::memory_order_relaxed) + 1; // Overflows cleanly. unsigned target_count = divisor * target_iteration; // Barriers don't enforce memory ordering. // Be as relaxed about the barrier as we possibly can! unsigned c = count.fetch_add(1u, std::memory_order_relaxed); if (c + 1 == target_count) { iteration.store(target_iteration, std::memory_order_relaxed); } else { // If we have more threads than the CPU, don't hog the CPU for very long periods of time. while (iteration.load(std::memory_order_relaxed) != target_iteration) std::this_thread::yield(); } } private: unsigned divisor = 1; std::atomic count; std::atomic iteration; }; } #endif ================================================ FILE: src/libraries/spirv_cross/include/spirv_cross/external_interface.h ================================================ /* * Copyright 2015-2017 ARM Limited * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef SPIRV_CROSS_EXTERNAL_INTERFACE_H #define SPIRV_CROSS_EXTERNAL_INTERFACE_H #ifdef __cplusplus extern "C" { #endif #include typedef struct spirv_cross_shader spirv_cross_shader_t; struct spirv_cross_interface { spirv_cross_shader_t *(*construct)(void); void (*destruct)(spirv_cross_shader_t *thiz); void (*invoke)(spirv_cross_shader_t *thiz); }; void spirv_cross_set_stage_input(spirv_cross_shader_t *thiz, unsigned location, void *data, size_t size); void spirv_cross_set_stage_output(spirv_cross_shader_t *thiz, unsigned location, void *data, size_t size); void spirv_cross_set_push_constant(spirv_cross_shader_t *thiz, void *data, size_t size); void spirv_cross_set_uniform_constant(spirv_cross_shader_t *thiz, unsigned location, void *data, size_t size); void spirv_cross_set_resource(spirv_cross_shader_t *thiz, unsigned set, unsigned binding, void **data, size_t size); const struct spirv_cross_interface *spirv_cross_get_interface(void); typedef enum spirv_cross_builtin { SPIRV_CROSS_BUILTIN_POSITION = 0, SPIRV_CROSS_BUILTIN_FRAG_COORD = 1, SPIRV_CROSS_BUILTIN_WORK_GROUP_ID = 2, SPIRV_CROSS_BUILTIN_NUM_WORK_GROUPS = 3, SPIRV_CROSS_NUM_BUILTINS } spirv_cross_builtin; void spirv_cross_set_builtin(spirv_cross_shader_t *thiz, spirv_cross_builtin builtin, void *data, size_t size); #define SPIRV_CROSS_NUM_DESCRIPTOR_SETS 4 #define SPIRV_CROSS_NUM_DESCRIPTOR_BINDINGS 16 #define SPIRV_CROSS_NUM_STAGE_INPUTS 16 #define SPIRV_CROSS_NUM_STAGE_OUTPUTS 16 #define SPIRV_CROSS_NUM_UNIFORM_CONSTANTS 32 enum spirv_cross_format { SPIRV_CROSS_FORMAT_R8_UNORM = 0, SPIRV_CROSS_FORMAT_R8G8_UNORM = 1, SPIRV_CROSS_FORMAT_R8G8B8_UNORM = 2, SPIRV_CROSS_FORMAT_R8G8B8A8_UNORM = 3, SPIRV_CROSS_NUM_FORMATS }; enum spirv_cross_wrap { SPIRV_CROSS_WRAP_CLAMP_TO_EDGE = 0, SPIRV_CROSS_WRAP_REPEAT = 1, SPIRV_CROSS_NUM_WRAP }; enum spirv_cross_filter { SPIRV_CROSS_FILTER_NEAREST = 0, SPIRV_CROSS_FILTER_LINEAR = 1, SPIRV_CROSS_NUM_FILTER }; enum spirv_cross_mipfilter { SPIRV_CROSS_MIPFILTER_BASE = 0, SPIRV_CROSS_MIPFILTER_NEAREST = 1, SPIRV_CROSS_MIPFILTER_LINEAR = 2, SPIRV_CROSS_NUM_MIPFILTER }; struct spirv_cross_miplevel { const void *data; unsigned width, height; size_t stride; }; struct spirv_cross_sampler_info { const struct spirv_cross_miplevel *mipmaps; unsigned num_mipmaps; enum spirv_cross_format format; enum spirv_cross_wrap wrap_s; enum spirv_cross_wrap wrap_t; enum spirv_cross_filter min_filter; enum spirv_cross_filter mag_filter; enum spirv_cross_mipfilter mip_filter; }; typedef struct spirv_cross_sampler_2d spirv_cross_sampler_2d_t; spirv_cross_sampler_2d_t *spirv_cross_create_sampler_2d(const struct spirv_cross_sampler_info *info); void spirv_cross_destroy_sampler_2d(spirv_cross_sampler_2d_t *samp); #ifdef __cplusplus } #endif #endif ================================================ FILE: src/libraries/spirv_cross/include/spirv_cross/image.hpp ================================================ /* * Copyright 2015-2017 ARM Limited * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef SPIRV_CROSS_IMAGE_HPP #define SPIRV_CROSS_IMAGE_HPP #ifndef GLM_SWIZZLE #define GLM_SWIZZLE #endif #ifndef GLM_FORCE_RADIANS #define GLM_FORCE_RADIANS #endif #include namespace spirv_cross { template struct image2DBase { virtual ~image2DBase() = default; inline virtual T load(glm::ivec2 coord) const { return T(0, 0, 0, 1); } inline virtual void store(glm::ivec2 coord, const T &v) { } }; typedef image2DBase image2D; typedef image2DBase iimage2D; typedef image2DBase uimage2D; template inline T imageLoad(const image2DBase &image, glm::ivec2 coord) { return image.load(coord); } template void imageStore(image2DBase &image, glm::ivec2 coord, const T &value) { image.store(coord, value); } } #endif ================================================ FILE: src/libraries/spirv_cross/include/spirv_cross/internal_interface.hpp ================================================ /* * Copyright 2015-2017 ARM Limited * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef SPIRV_CROSS_INTERNAL_INTERFACE_HPP #define SPIRV_CROSS_INTERNAL_INTERFACE_HPP // This file must only be included by the shader generated by spirv-cross! #ifndef GLM_FORCE_SWIZZLE #define GLM_FORCE_SWIZZLE #endif #ifndef GLM_FORCE_RADIANS #define GLM_FORCE_RADIANS #endif #include #include "barrier.hpp" #include "external_interface.h" #include "image.hpp" #include "sampler.hpp" #include "thread_group.hpp" #include #include namespace internal { // Adaptor helpers to adapt GLSL access chain syntax to C++. // Don't bother with arrays of arrays on uniforms ... // Would likely need horribly complex variadic template munging. template struct Interface { enum { ArraySize = 1, Size = sizeof(T) }; Interface() : ptr(0) { } T &get() { assert(ptr); return *ptr; } T *ptr; }; // For array types, return a pointer instead. template struct Interface { enum { ArraySize = U, Size = U * sizeof(T) }; Interface() : ptr(0) { } T *get() { assert(ptr); return ptr; } T *ptr; }; // For case when array size is 1, avoid double dereference. template struct PointerInterface { enum { ArraySize = 1, Size = sizeof(T *) }; enum { PreDereference = true }; PointerInterface() : ptr(0) { } T &get() { assert(ptr); return *ptr; } T *ptr; }; // Automatically converts a pointer down to reference to match GLSL syntax. template struct DereferenceAdaptor { DereferenceAdaptor(T **ptr) : ptr(ptr) { } T &operator[](unsigned index) const { return *(ptr[index]); } T **ptr; }; // We can't have a linear array of T* since T* can be an abstract type in case of samplers. // We also need a list of pointers since we can have run-time length SSBOs. template struct PointerInterface { enum { ArraySize = U, Size = sizeof(T *) * U }; enum { PreDereference = false }; PointerInterface() : ptr(0) { } DereferenceAdaptor get() { assert(ptr); return DereferenceAdaptor(ptr); } T **ptr; }; // Resources can be more abstract and be unsized, // so we need to have an array of pointers for those cases. template struct Resource : PointerInterface { }; // POD with no unknown sizes, so we can express these as flat arrays. template struct UniformConstant : Interface { }; template struct StageInput : Interface { }; template struct StageOutput : Interface { }; template struct PushConstant : Interface { }; } struct spirv_cross_shader { struct PPSize { PPSize() : ptr(0) , size(0) { } void **ptr; size_t size; }; struct PPSizeResource { PPSizeResource() : ptr(0) , size(0) , pre_dereference(false) { } void **ptr; size_t size; bool pre_dereference; }; PPSizeResource resources[SPIRV_CROSS_NUM_DESCRIPTOR_SETS][SPIRV_CROSS_NUM_DESCRIPTOR_BINDINGS]; PPSize stage_inputs[SPIRV_CROSS_NUM_STAGE_INPUTS]; PPSize stage_outputs[SPIRV_CROSS_NUM_STAGE_OUTPUTS]; PPSize uniform_constants[SPIRV_CROSS_NUM_UNIFORM_CONSTANTS]; PPSize push_constant; PPSize builtins[SPIRV_CROSS_NUM_BUILTINS]; template void register_builtin(spirv_cross_builtin builtin, const U &value) { assert(!builtins[builtin].ptr); builtins[builtin].ptr = (void **)&value.ptr; builtins[builtin].size = sizeof(*value.ptr) * U::ArraySize; } void set_builtin(spirv_cross_builtin builtin, void *data, size_t size) { assert(builtins[builtin].ptr); assert(size >= builtins[builtin].size); *builtins[builtin].ptr = data; } template void register_resource(const internal::Resource &value, unsigned set, unsigned binding) { assert(set < SPIRV_CROSS_NUM_DESCRIPTOR_SETS); assert(binding < SPIRV_CROSS_NUM_DESCRIPTOR_BINDINGS); assert(!resources[set][binding].ptr); resources[set][binding].ptr = (void **)&value.ptr; resources[set][binding].size = internal::Resource::Size; resources[set][binding].pre_dereference = internal::Resource::PreDereference; } template void register_stage_input(const internal::StageInput &value, unsigned location) { assert(location < SPIRV_CROSS_NUM_STAGE_INPUTS); assert(!stage_inputs[location].ptr); stage_inputs[location].ptr = (void **)&value.ptr; stage_inputs[location].size = internal::StageInput::Size; } template void register_stage_output(const internal::StageOutput &value, unsigned location) { assert(location < SPIRV_CROSS_NUM_STAGE_OUTPUTS); assert(!stage_outputs[location].ptr); stage_outputs[location].ptr = (void **)&value.ptr; stage_outputs[location].size = internal::StageOutput::Size; } template void register_uniform_constant(const internal::UniformConstant &value, unsigned location) { assert(location < SPIRV_CROSS_NUM_UNIFORM_CONSTANTS); assert(!uniform_constants[location].ptr); uniform_constants[location].ptr = (void **)&value.ptr; uniform_constants[location].size = internal::UniformConstant::Size; } template void register_push_constant(const internal::PushConstant &value) { assert(!push_constant.ptr); push_constant.ptr = (void **)&value.ptr; push_constant.size = internal::PushConstant::Size; } void set_stage_input(unsigned location, void *data, size_t size) { assert(location < SPIRV_CROSS_NUM_STAGE_INPUTS); assert(stage_inputs[location].ptr); assert(size >= stage_inputs[location].size); *stage_inputs[location].ptr = data; } void set_stage_output(unsigned location, void *data, size_t size) { assert(location < SPIRV_CROSS_NUM_STAGE_OUTPUTS); assert(stage_outputs[location].ptr); assert(size >= stage_outputs[location].size); *stage_outputs[location].ptr = data; } void set_uniform_constant(unsigned location, void *data, size_t size) { assert(location < SPIRV_CROSS_NUM_UNIFORM_CONSTANTS); assert(uniform_constants[location].ptr); assert(size >= uniform_constants[location].size); *uniform_constants[location].ptr = data; } void set_push_constant(void *data, size_t size) { assert(push_constant.ptr); assert(size >= push_constant.size); *push_constant.ptr = data; } void set_resource(unsigned set, unsigned binding, void **data, size_t size) { assert(set < SPIRV_CROSS_NUM_DESCRIPTOR_SETS); assert(binding < SPIRV_CROSS_NUM_DESCRIPTOR_BINDINGS); assert(resources[set][binding].ptr); assert(size >= resources[set][binding].size); // We're using the regular PointerInterface, dereference ahead of time. if (resources[set][binding].pre_dereference) *resources[set][binding].ptr = *data; else *resources[set][binding].ptr = data; } }; namespace spirv_cross { template struct BaseShader : spirv_cross_shader { void invoke() { static_cast(this)->main(); } }; struct FragmentResources { internal::StageOutput gl_FragCoord; void init(spirv_cross_shader &s) { s.register_builtin(SPIRV_CROSS_BUILTIN_FRAG_COORD, gl_FragCoord); } #define gl_FragCoord __res->gl_FragCoord.get() }; template struct FragmentShader : BaseShader> { inline void main() { impl.main(); } FragmentShader() { resources.init(*this); impl.__res = &resources; } T impl; Res resources; }; struct VertexResources { internal::StageOutput gl_Position; void init(spirv_cross_shader &s) { s.register_builtin(SPIRV_CROSS_BUILTIN_POSITION, gl_Position); } #define gl_Position __res->gl_Position.get() }; template struct VertexShader : BaseShader> { inline void main() { impl.main(); } VertexShader() { resources.init(*this); impl.__res = &resources; } T impl; Res resources; }; struct TessEvaluationResources { inline void init(spirv_cross_shader &) { } }; template struct TessEvaluationShader : BaseShader> { inline void main() { impl.main(); } TessEvaluationShader() { resources.init(*this); impl.__res = &resources; } T impl; Res resources; }; struct TessControlResources { inline void init(spirv_cross_shader &) { } }; template struct TessControlShader : BaseShader> { inline void main() { impl.main(); } TessControlShader() { resources.init(*this); impl.__res = &resources; } T impl; Res resources; }; struct GeometryResources { inline void init(spirv_cross_shader &) { } }; template struct GeometryShader : BaseShader> { inline void main() { impl.main(); } GeometryShader() { resources.init(*this); impl.__res = &resources; } T impl; Res resources; }; struct ComputeResources { internal::StageInput gl_WorkGroupID__; internal::StageInput gl_NumWorkGroups__; void init(spirv_cross_shader &s) { s.register_builtin(SPIRV_CROSS_BUILTIN_WORK_GROUP_ID, gl_WorkGroupID__); s.register_builtin(SPIRV_CROSS_BUILTIN_NUM_WORK_GROUPS, gl_NumWorkGroups__); } #define gl_WorkGroupID __res->gl_WorkGroupID__.get() #define gl_NumWorkGroups __res->gl_NumWorkGroups__.get() Barrier barrier__; #define barrier() __res->barrier__.wait() }; struct ComputePrivateResources { uint32_t gl_LocalInvocationIndex__; #define gl_LocalInvocationIndex __priv_res.gl_LocalInvocationIndex__ glm::uvec3 gl_LocalInvocationID__; #define gl_LocalInvocationID __priv_res.gl_LocalInvocationID__ glm::uvec3 gl_GlobalInvocationID__; #define gl_GlobalInvocationID __priv_res.gl_GlobalInvocationID__ }; template struct ComputeShader : BaseShader> { inline void main() { resources.barrier__.reset_counter(); for (unsigned z = 0; z < WorkGroupZ; z++) for (unsigned y = 0; y < WorkGroupY; y++) for (unsigned x = 0; x < WorkGroupX; x++) impl[z][y][x].__priv_res.gl_GlobalInvocationID__ = glm::uvec3(WorkGroupX, WorkGroupY, WorkGroupZ) * resources.gl_WorkGroupID__.get() + glm::uvec3(x, y, z); group.run(); group.wait(); } ComputeShader() : group(&impl[0][0][0]) { resources.init(*this); resources.barrier__.set_release_divisor(WorkGroupX * WorkGroupY * WorkGroupZ); unsigned i = 0; for (unsigned z = 0; z < WorkGroupZ; z++) { for (unsigned y = 0; y < WorkGroupY; y++) { for (unsigned x = 0; x < WorkGroupX; x++) { impl[z][y][x].__priv_res.gl_LocalInvocationID__ = glm::uvec3(x, y, z); impl[z][y][x].__priv_res.gl_LocalInvocationIndex__ = i++; impl[z][y][x].__res = &resources; } } } } T impl[WorkGroupZ][WorkGroupY][WorkGroupX]; ThreadGroup group; Res resources; }; inline void memoryBarrierShared() { Barrier::memoryBarrier(); } inline void memoryBarrier() { Barrier::memoryBarrier(); } // TODO: Rest of the barriers. // Atomics template inline T atomicAdd(T &v, T a) { static_assert(sizeof(std::atomic) == sizeof(T), "Cannot cast properly to std::atomic."); // We need explicit memory barriers in GLSL to enfore any ordering. // FIXME: Can we really cast this? There is no other way I think ... return std::atomic_fetch_add_explicit(reinterpret_cast *>(&v), a, std::memory_order_relaxed); } } void spirv_cross_set_stage_input(spirv_cross_shader_t *shader, unsigned location, void *data, size_t size) { shader->set_stage_input(location, data, size); } void spirv_cross_set_stage_output(spirv_cross_shader_t *shader, unsigned location, void *data, size_t size) { shader->set_stage_output(location, data, size); } void spirv_cross_set_uniform_constant(spirv_cross_shader_t *shader, unsigned location, void *data, size_t size) { shader->set_uniform_constant(location, data, size); } void spirv_cross_set_resource(spirv_cross_shader_t *shader, unsigned set, unsigned binding, void **data, size_t size) { shader->set_resource(set, binding, data, size); } void spirv_cross_set_push_constant(spirv_cross_shader_t *shader, void *data, size_t size) { shader->set_push_constant(data, size); } void spirv_cross_set_builtin(spirv_cross_shader_t *shader, spirv_cross_builtin builtin, void *data, size_t size) { shader->set_builtin(builtin, data, size); } #endif ================================================ FILE: src/libraries/spirv_cross/include/spirv_cross/sampler.hpp ================================================ /* * Copyright 2015-2017 ARM Limited * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef SPIRV_CROSS_SAMPLER_HPP #define SPIRV_CROSS_SAMPLER_HPP #include namespace spirv_cross { struct spirv_cross_sampler_2d { inline virtual ~spirv_cross_sampler_2d() { } }; template struct sampler2DBase : spirv_cross_sampler_2d { sampler2DBase(const spirv_cross_sampler_info *info) { mips.insert(mips.end(), info->mipmaps, info->mipmaps + info->num_mipmaps); format = info->format; wrap_s = info->wrap_s; wrap_t = info->wrap_t; min_filter = info->min_filter; mag_filter = info->mag_filter; mip_filter = info->mip_filter; } inline virtual T sample(glm::vec2 uv, float bias) { return sampleLod(uv, bias); } inline virtual T sampleLod(glm::vec2 uv, float lod) { if (mag_filter == SPIRV_CROSS_FILTER_NEAREST) { uv.x = wrap(uv.x, wrap_s, mips[0].width); uv.y = wrap(uv.y, wrap_t, mips[0].height); glm::vec2 uv_full = uv * glm::vec2(mips[0].width, mips[0].height); int x = int(uv_full.x); int y = int(uv_full.y); return sample(x, y, 0); } else { return T(0, 0, 0, 1); } } inline float wrap(float v, spirv_cross_wrap wrap, unsigned size) { switch (wrap) { case SPIRV_CROSS_WRAP_REPEAT: return v - glm::floor(v); case SPIRV_CROSS_WRAP_CLAMP_TO_EDGE: { float half = 0.5f / size; return glm::clamp(v, half, 1.0f - half); } default: return 0.0f; } } std::vector mips; spirv_cross_format format; spirv_cross_wrap wrap_s; spirv_cross_wrap wrap_t; spirv_cross_filter min_filter; spirv_cross_filter mag_filter; spirv_cross_mipfilter mip_filter; }; typedef sampler2DBase sampler2D; typedef sampler2DBase isampler2D; typedef sampler2DBase usampler2D; template inline T texture(const sampler2DBase &samp, const glm::vec2 &uv, float bias = 0.0f) { return samp.sample(uv, bias); } } #endif ================================================ FILE: src/libraries/spirv_cross/include/spirv_cross/thread_group.hpp ================================================ /* * Copyright 2015-2017 ARM Limited * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef SPIRV_CROSS_THREAD_GROUP_HPP #define SPIRV_CROSS_THREAD_GROUP_HPP #include #include #include namespace spirv_cross { template class ThreadGroup { public: ThreadGroup(T *impl) { for (unsigned i = 0; i < Size; i++) workers[i].start(&impl[i]); } void run() { for (auto &worker : workers) worker.run(); } void wait() { for (auto &worker : workers) worker.wait(); } private: struct Thread { enum State { Idle, Running, Dying }; State state = Idle; void start(T *impl) { worker = std::thread([impl, this] { for (;;) { { std::unique_lock l{ lock }; cond.wait(l, [this] { return state != Idle; }); if (state == Dying) break; } impl->main(); std::lock_guard l{ lock }; state = Idle; cond.notify_one(); } }); } void wait() { std::unique_lock l{ lock }; cond.wait(l, [this] { return state == Idle; }); } void run() { std::lock_guard l{ lock }; state = Running; cond.notify_one(); } ~Thread() { if (worker.joinable()) { { std::lock_guard l{ lock }; state = Dying; cond.notify_one(); } worker.join(); } } std::thread worker; std::condition_variable cond; std::mutex lock; }; Thread workers[Size]; }; } #endif ================================================ FILE: src/libraries/spirv_cross/spirv.hpp ================================================ // Copyright (c) 2014-2020 The Khronos Group Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and/or associated documentation files (the "Materials"), // to deal in the Materials without restriction, including without limitation // the rights to use, copy, modify, merge, publish, distribute, sublicense, // and/or sell copies of the Materials, and to permit persons to whom the // Materials are furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Materials. // // MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS // STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND // HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/ // // THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING // FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS // IN THE MATERIALS. // This header is automatically generated by the same tool that creates // the Binary Section of the SPIR-V specification. // Enumeration tokens for SPIR-V, in various styles: // C, C++, C++11, JSON, Lua, Python, C#, D, Beef // // - C will have tokens with a "Spv" prefix, e.g.: SpvSourceLanguageGLSL // - C++ will have tokens in the "spv" name space, e.g.: spv::SourceLanguageGLSL // - C++11 will use enum classes in the spv namespace, e.g.: spv::SourceLanguage::GLSL // - Lua will use tables, e.g.: spv.SourceLanguage.GLSL // - Python will use dictionaries, e.g.: spv['SourceLanguage']['GLSL'] // - C# will use enum classes in the Specification class located in the "Spv" namespace, // e.g.: Spv.Specification.SourceLanguage.GLSL // - D will have tokens under the "spv" module, e.g: spv.SourceLanguage.GLSL // - Beef will use enum classes in the Specification class located in the "Spv" namespace, // e.g.: Spv.Specification.SourceLanguage.GLSL // // Some tokens act like mask values, which can be OR'd together, // while others are mutually exclusive. The mask-like ones have // "Mask" in their name, and a parallel enum that has the shift // amount (1 << x) for each corresponding enumerant. #ifndef spirv_HPP #define spirv_HPP namespace spv { typedef unsigned int Id; #define SPV_VERSION 0x10600 #define SPV_REVISION 1 static const unsigned int MagicNumber = 0x07230203; static const unsigned int Version = 0x00010600; static const unsigned int Revision = 1; static const unsigned int OpCodeMask = 0xffff; static const unsigned int WordCountShift = 16; enum SourceLanguage { SourceLanguageUnknown = 0, SourceLanguageESSL = 1, SourceLanguageGLSL = 2, SourceLanguageOpenCL_C = 3, SourceLanguageOpenCL_CPP = 4, SourceLanguageHLSL = 5, SourceLanguageCPP_for_OpenCL = 6, SourceLanguageSYCL = 7, SourceLanguageMax = 0x7fffffff, }; enum ExecutionModel { ExecutionModelVertex = 0, ExecutionModelTessellationControl = 1, ExecutionModelTessellationEvaluation = 2, ExecutionModelGeometry = 3, ExecutionModelFragment = 4, ExecutionModelGLCompute = 5, ExecutionModelKernel = 6, ExecutionModelTaskNV = 5267, ExecutionModelMeshNV = 5268, ExecutionModelRayGenerationKHR = 5313, ExecutionModelRayGenerationNV = 5313, ExecutionModelIntersectionKHR = 5314, ExecutionModelIntersectionNV = 5314, ExecutionModelAnyHitKHR = 5315, ExecutionModelAnyHitNV = 5315, ExecutionModelClosestHitKHR = 5316, ExecutionModelClosestHitNV = 5316, ExecutionModelMissKHR = 5317, ExecutionModelMissNV = 5317, ExecutionModelCallableKHR = 5318, ExecutionModelCallableNV = 5318, ExecutionModelTaskEXT = 5364, ExecutionModelMeshEXT = 5365, ExecutionModelMax = 0x7fffffff, }; enum AddressingModel { AddressingModelLogical = 0, AddressingModelPhysical32 = 1, AddressingModelPhysical64 = 2, AddressingModelPhysicalStorageBuffer64 = 5348, AddressingModelPhysicalStorageBuffer64EXT = 5348, AddressingModelMax = 0x7fffffff, }; enum MemoryModel { MemoryModelSimple = 0, MemoryModelGLSL450 = 1, MemoryModelOpenCL = 2, MemoryModelVulkan = 3, MemoryModelVulkanKHR = 3, MemoryModelMax = 0x7fffffff, }; enum ExecutionMode { ExecutionModeInvocations = 0, ExecutionModeSpacingEqual = 1, ExecutionModeSpacingFractionalEven = 2, ExecutionModeSpacingFractionalOdd = 3, ExecutionModeVertexOrderCw = 4, ExecutionModeVertexOrderCcw = 5, ExecutionModePixelCenterInteger = 6, ExecutionModeOriginUpperLeft = 7, ExecutionModeOriginLowerLeft = 8, ExecutionModeEarlyFragmentTests = 9, ExecutionModePointMode = 10, ExecutionModeXfb = 11, ExecutionModeDepthReplacing = 12, ExecutionModeDepthGreater = 14, ExecutionModeDepthLess = 15, ExecutionModeDepthUnchanged = 16, ExecutionModeLocalSize = 17, ExecutionModeLocalSizeHint = 18, ExecutionModeInputPoints = 19, ExecutionModeInputLines = 20, ExecutionModeInputLinesAdjacency = 21, ExecutionModeTriangles = 22, ExecutionModeInputTrianglesAdjacency = 23, ExecutionModeQuads = 24, ExecutionModeIsolines = 25, ExecutionModeOutputVertices = 26, ExecutionModeOutputPoints = 27, ExecutionModeOutputLineStrip = 28, ExecutionModeOutputTriangleStrip = 29, ExecutionModeVecTypeHint = 30, ExecutionModeContractionOff = 31, ExecutionModeInitializer = 33, ExecutionModeFinalizer = 34, ExecutionModeSubgroupSize = 35, ExecutionModeSubgroupsPerWorkgroup = 36, ExecutionModeSubgroupsPerWorkgroupId = 37, ExecutionModeLocalSizeId = 38, ExecutionModeLocalSizeHintId = 39, ExecutionModeSubgroupUniformControlFlowKHR = 4421, ExecutionModePostDepthCoverage = 4446, ExecutionModeDenormPreserve = 4459, ExecutionModeDenormFlushToZero = 4460, ExecutionModeSignedZeroInfNanPreserve = 4461, ExecutionModeRoundingModeRTE = 4462, ExecutionModeRoundingModeRTZ = 4463, ExecutionModeEarlyAndLateFragmentTestsAMD = 5017, ExecutionModeStencilRefReplacingEXT = 5027, ExecutionModeStencilRefUnchangedFrontAMD = 5079, ExecutionModeStencilRefGreaterFrontAMD = 5080, ExecutionModeStencilRefLessFrontAMD = 5081, ExecutionModeStencilRefUnchangedBackAMD = 5082, ExecutionModeStencilRefGreaterBackAMD = 5083, ExecutionModeStencilRefLessBackAMD = 5084, ExecutionModeOutputLinesEXT = 5269, ExecutionModeOutputLinesNV = 5269, ExecutionModeOutputPrimitivesEXT = 5270, ExecutionModeOutputPrimitivesNV = 5270, ExecutionModeDerivativeGroupQuadsNV = 5289, ExecutionModeDerivativeGroupLinearNV = 5290, ExecutionModeOutputTrianglesEXT = 5298, ExecutionModeOutputTrianglesNV = 5298, ExecutionModePixelInterlockOrderedEXT = 5366, ExecutionModePixelInterlockUnorderedEXT = 5367, ExecutionModeSampleInterlockOrderedEXT = 5368, ExecutionModeSampleInterlockUnorderedEXT = 5369, ExecutionModeShadingRateInterlockOrderedEXT = 5370, ExecutionModeShadingRateInterlockUnorderedEXT = 5371, ExecutionModeSharedLocalMemorySizeINTEL = 5618, ExecutionModeRoundingModeRTPINTEL = 5620, ExecutionModeRoundingModeRTNINTEL = 5621, ExecutionModeFloatingPointModeALTINTEL = 5622, ExecutionModeFloatingPointModeIEEEINTEL = 5623, ExecutionModeMaxWorkgroupSizeINTEL = 5893, ExecutionModeMaxWorkDimINTEL = 5894, ExecutionModeNoGlobalOffsetINTEL = 5895, ExecutionModeNumSIMDWorkitemsINTEL = 5896, ExecutionModeSchedulerTargetFmaxMhzINTEL = 5903, ExecutionModeNamedBarrierCountINTEL = 6417, ExecutionModeMax = 0x7fffffff, }; enum StorageClass { StorageClassUniformConstant = 0, StorageClassInput = 1, StorageClassUniform = 2, StorageClassOutput = 3, StorageClassWorkgroup = 4, StorageClassCrossWorkgroup = 5, StorageClassPrivate = 6, StorageClassFunction = 7, StorageClassGeneric = 8, StorageClassPushConstant = 9, StorageClassAtomicCounter = 10, StorageClassImage = 11, StorageClassStorageBuffer = 12, StorageClassCallableDataKHR = 5328, StorageClassCallableDataNV = 5328, StorageClassIncomingCallableDataKHR = 5329, StorageClassIncomingCallableDataNV = 5329, StorageClassRayPayloadKHR = 5338, StorageClassRayPayloadNV = 5338, StorageClassHitAttributeKHR = 5339, StorageClassHitAttributeNV = 5339, StorageClassIncomingRayPayloadKHR = 5342, StorageClassIncomingRayPayloadNV = 5342, StorageClassShaderRecordBufferKHR = 5343, StorageClassShaderRecordBufferNV = 5343, StorageClassPhysicalStorageBuffer = 5349, StorageClassPhysicalStorageBufferEXT = 5349, StorageClassTaskPayloadWorkgroupEXT = 5402, StorageClassCodeSectionINTEL = 5605, StorageClassDeviceOnlyINTEL = 5936, StorageClassHostOnlyINTEL = 5937, StorageClassMax = 0x7fffffff, }; enum Dim { Dim1D = 0, Dim2D = 1, Dim3D = 2, DimCube = 3, DimRect = 4, DimBuffer = 5, DimSubpassData = 6, DimMax = 0x7fffffff, }; enum SamplerAddressingMode { SamplerAddressingModeNone = 0, SamplerAddressingModeClampToEdge = 1, SamplerAddressingModeClamp = 2, SamplerAddressingModeRepeat = 3, SamplerAddressingModeRepeatMirrored = 4, SamplerAddressingModeMax = 0x7fffffff, }; enum SamplerFilterMode { SamplerFilterModeNearest = 0, SamplerFilterModeLinear = 1, SamplerFilterModeMax = 0x7fffffff, }; enum ImageFormat { ImageFormatUnknown = 0, ImageFormatRgba32f = 1, ImageFormatRgba16f = 2, ImageFormatR32f = 3, ImageFormatRgba8 = 4, ImageFormatRgba8Snorm = 5, ImageFormatRg32f = 6, ImageFormatRg16f = 7, ImageFormatR11fG11fB10f = 8, ImageFormatR16f = 9, ImageFormatRgba16 = 10, ImageFormatRgb10A2 = 11, ImageFormatRg16 = 12, ImageFormatRg8 = 13, ImageFormatR16 = 14, ImageFormatR8 = 15, ImageFormatRgba16Snorm = 16, ImageFormatRg16Snorm = 17, ImageFormatRg8Snorm = 18, ImageFormatR16Snorm = 19, ImageFormatR8Snorm = 20, ImageFormatRgba32i = 21, ImageFormatRgba16i = 22, ImageFormatRgba8i = 23, ImageFormatR32i = 24, ImageFormatRg32i = 25, ImageFormatRg16i = 26, ImageFormatRg8i = 27, ImageFormatR16i = 28, ImageFormatR8i = 29, ImageFormatRgba32ui = 30, ImageFormatRgba16ui = 31, ImageFormatRgba8ui = 32, ImageFormatR32ui = 33, ImageFormatRgb10a2ui = 34, ImageFormatRg32ui = 35, ImageFormatRg16ui = 36, ImageFormatRg8ui = 37, ImageFormatR16ui = 38, ImageFormatR8ui = 39, ImageFormatR64ui = 40, ImageFormatR64i = 41, ImageFormatMax = 0x7fffffff, }; enum ImageChannelOrder { ImageChannelOrderR = 0, ImageChannelOrderA = 1, ImageChannelOrderRG = 2, ImageChannelOrderRA = 3, ImageChannelOrderRGB = 4, ImageChannelOrderRGBA = 5, ImageChannelOrderBGRA = 6, ImageChannelOrderARGB = 7, ImageChannelOrderIntensity = 8, ImageChannelOrderLuminance = 9, ImageChannelOrderRx = 10, ImageChannelOrderRGx = 11, ImageChannelOrderRGBx = 12, ImageChannelOrderDepth = 13, ImageChannelOrderDepthStencil = 14, ImageChannelOrdersRGB = 15, ImageChannelOrdersRGBx = 16, ImageChannelOrdersRGBA = 17, ImageChannelOrdersBGRA = 18, ImageChannelOrderABGR = 19, ImageChannelOrderMax = 0x7fffffff, }; enum ImageChannelDataType { ImageChannelDataTypeSnormInt8 = 0, ImageChannelDataTypeSnormInt16 = 1, ImageChannelDataTypeUnormInt8 = 2, ImageChannelDataTypeUnormInt16 = 3, ImageChannelDataTypeUnormShort565 = 4, ImageChannelDataTypeUnormShort555 = 5, ImageChannelDataTypeUnormInt101010 = 6, ImageChannelDataTypeSignedInt8 = 7, ImageChannelDataTypeSignedInt16 = 8, ImageChannelDataTypeSignedInt32 = 9, ImageChannelDataTypeUnsignedInt8 = 10, ImageChannelDataTypeUnsignedInt16 = 11, ImageChannelDataTypeUnsignedInt32 = 12, ImageChannelDataTypeHalfFloat = 13, ImageChannelDataTypeFloat = 14, ImageChannelDataTypeUnormInt24 = 15, ImageChannelDataTypeUnormInt101010_2 = 16, ImageChannelDataTypeMax = 0x7fffffff, }; enum ImageOperandsShift { ImageOperandsBiasShift = 0, ImageOperandsLodShift = 1, ImageOperandsGradShift = 2, ImageOperandsConstOffsetShift = 3, ImageOperandsOffsetShift = 4, ImageOperandsConstOffsetsShift = 5, ImageOperandsSampleShift = 6, ImageOperandsMinLodShift = 7, ImageOperandsMakeTexelAvailableShift = 8, ImageOperandsMakeTexelAvailableKHRShift = 8, ImageOperandsMakeTexelVisibleShift = 9, ImageOperandsMakeTexelVisibleKHRShift = 9, ImageOperandsNonPrivateTexelShift = 10, ImageOperandsNonPrivateTexelKHRShift = 10, ImageOperandsVolatileTexelShift = 11, ImageOperandsVolatileTexelKHRShift = 11, ImageOperandsSignExtendShift = 12, ImageOperandsZeroExtendShift = 13, ImageOperandsNontemporalShift = 14, ImageOperandsOffsetsShift = 16, ImageOperandsMax = 0x7fffffff, }; enum ImageOperandsMask { ImageOperandsMaskNone = 0, ImageOperandsBiasMask = 0x00000001, ImageOperandsLodMask = 0x00000002, ImageOperandsGradMask = 0x00000004, ImageOperandsConstOffsetMask = 0x00000008, ImageOperandsOffsetMask = 0x00000010, ImageOperandsConstOffsetsMask = 0x00000020, ImageOperandsSampleMask = 0x00000040, ImageOperandsMinLodMask = 0x00000080, ImageOperandsMakeTexelAvailableMask = 0x00000100, ImageOperandsMakeTexelAvailableKHRMask = 0x00000100, ImageOperandsMakeTexelVisibleMask = 0x00000200, ImageOperandsMakeTexelVisibleKHRMask = 0x00000200, ImageOperandsNonPrivateTexelMask = 0x00000400, ImageOperandsNonPrivateTexelKHRMask = 0x00000400, ImageOperandsVolatileTexelMask = 0x00000800, ImageOperandsVolatileTexelKHRMask = 0x00000800, ImageOperandsSignExtendMask = 0x00001000, ImageOperandsZeroExtendMask = 0x00002000, ImageOperandsNontemporalMask = 0x00004000, ImageOperandsOffsetsMask = 0x00010000, }; enum FPFastMathModeShift { FPFastMathModeNotNaNShift = 0, FPFastMathModeNotInfShift = 1, FPFastMathModeNSZShift = 2, FPFastMathModeAllowRecipShift = 3, FPFastMathModeFastShift = 4, FPFastMathModeAllowContractFastINTELShift = 16, FPFastMathModeAllowReassocINTELShift = 17, FPFastMathModeMax = 0x7fffffff, }; enum FPFastMathModeMask { FPFastMathModeMaskNone = 0, FPFastMathModeNotNaNMask = 0x00000001, FPFastMathModeNotInfMask = 0x00000002, FPFastMathModeNSZMask = 0x00000004, FPFastMathModeAllowRecipMask = 0x00000008, FPFastMathModeFastMask = 0x00000010, FPFastMathModeAllowContractFastINTELMask = 0x00010000, FPFastMathModeAllowReassocINTELMask = 0x00020000, }; enum FPRoundingMode { FPRoundingModeRTE = 0, FPRoundingModeRTZ = 1, FPRoundingModeRTP = 2, FPRoundingModeRTN = 3, FPRoundingModeMax = 0x7fffffff, }; enum LinkageType { LinkageTypeExport = 0, LinkageTypeImport = 1, LinkageTypeLinkOnceODR = 2, LinkageTypeMax = 0x7fffffff, }; enum AccessQualifier { AccessQualifierReadOnly = 0, AccessQualifierWriteOnly = 1, AccessQualifierReadWrite = 2, AccessQualifierMax = 0x7fffffff, }; enum FunctionParameterAttribute { FunctionParameterAttributeZext = 0, FunctionParameterAttributeSext = 1, FunctionParameterAttributeByVal = 2, FunctionParameterAttributeSret = 3, FunctionParameterAttributeNoAlias = 4, FunctionParameterAttributeNoCapture = 5, FunctionParameterAttributeNoWrite = 6, FunctionParameterAttributeNoReadWrite = 7, FunctionParameterAttributeMax = 0x7fffffff, }; enum Decoration { DecorationRelaxedPrecision = 0, DecorationSpecId = 1, DecorationBlock = 2, DecorationBufferBlock = 3, DecorationRowMajor = 4, DecorationColMajor = 5, DecorationArrayStride = 6, DecorationMatrixStride = 7, DecorationGLSLShared = 8, DecorationGLSLPacked = 9, DecorationCPacked = 10, DecorationBuiltIn = 11, DecorationNoPerspective = 13, DecorationFlat = 14, DecorationPatch = 15, DecorationCentroid = 16, DecorationSample = 17, DecorationInvariant = 18, DecorationRestrict = 19, DecorationAliased = 20, DecorationVolatile = 21, DecorationConstant = 22, DecorationCoherent = 23, DecorationNonWritable = 24, DecorationNonReadable = 25, DecorationUniform = 26, DecorationUniformId = 27, DecorationSaturatedConversion = 28, DecorationStream = 29, DecorationLocation = 30, DecorationComponent = 31, DecorationIndex = 32, DecorationBinding = 33, DecorationDescriptorSet = 34, DecorationOffset = 35, DecorationXfbBuffer = 36, DecorationXfbStride = 37, DecorationFuncParamAttr = 38, DecorationFPRoundingMode = 39, DecorationFPFastMathMode = 40, DecorationLinkageAttributes = 41, DecorationNoContraction = 42, DecorationInputAttachmentIndex = 43, DecorationAlignment = 44, DecorationMaxByteOffset = 45, DecorationAlignmentId = 46, DecorationMaxByteOffsetId = 47, DecorationNoSignedWrap = 4469, DecorationNoUnsignedWrap = 4470, DecorationExplicitInterpAMD = 4999, DecorationOverrideCoverageNV = 5248, DecorationPassthroughNV = 5250, DecorationViewportRelativeNV = 5252, DecorationSecondaryViewportRelativeNV = 5256, DecorationPerPrimitiveEXT = 5271, DecorationPerPrimitiveNV = 5271, DecorationPerViewNV = 5272, DecorationPerTaskNV = 5273, DecorationPerVertexKHR = 5285, DecorationPerVertexNV = 5285, DecorationNonUniform = 5300, DecorationNonUniformEXT = 5300, DecorationRestrictPointer = 5355, DecorationRestrictPointerEXT = 5355, DecorationAliasedPointer = 5356, DecorationAliasedPointerEXT = 5356, DecorationBindlessSamplerNV = 5398, DecorationBindlessImageNV = 5399, DecorationBoundSamplerNV = 5400, DecorationBoundImageNV = 5401, DecorationSIMTCallINTEL = 5599, DecorationReferencedIndirectlyINTEL = 5602, DecorationClobberINTEL = 5607, DecorationSideEffectsINTEL = 5608, DecorationVectorComputeVariableINTEL = 5624, DecorationFuncParamIOKindINTEL = 5625, DecorationVectorComputeFunctionINTEL = 5626, DecorationStackCallINTEL = 5627, DecorationGlobalVariableOffsetINTEL = 5628, DecorationCounterBuffer = 5634, DecorationHlslCounterBufferGOOGLE = 5634, DecorationHlslSemanticGOOGLE = 5635, DecorationUserSemantic = 5635, DecorationUserTypeGOOGLE = 5636, DecorationFunctionRoundingModeINTEL = 5822, DecorationFunctionDenormModeINTEL = 5823, DecorationRegisterINTEL = 5825, DecorationMemoryINTEL = 5826, DecorationNumbanksINTEL = 5827, DecorationBankwidthINTEL = 5828, DecorationMaxPrivateCopiesINTEL = 5829, DecorationSinglepumpINTEL = 5830, DecorationDoublepumpINTEL = 5831, DecorationMaxReplicatesINTEL = 5832, DecorationSimpleDualPortINTEL = 5833, DecorationMergeINTEL = 5834, DecorationBankBitsINTEL = 5835, DecorationForcePow2DepthINTEL = 5836, DecorationBurstCoalesceINTEL = 5899, DecorationCacheSizeINTEL = 5900, DecorationDontStaticallyCoalesceINTEL = 5901, DecorationPrefetchINTEL = 5902, DecorationStallEnableINTEL = 5905, DecorationFuseLoopsInFunctionINTEL = 5907, DecorationAliasScopeINTEL = 5914, DecorationNoAliasINTEL = 5915, DecorationBufferLocationINTEL = 5921, DecorationIOPipeStorageINTEL = 5944, DecorationFunctionFloatingPointModeINTEL = 6080, DecorationSingleElementVectorINTEL = 6085, DecorationVectorComputeCallableFunctionINTEL = 6087, DecorationMediaBlockIOINTEL = 6140, DecorationMax = 0x7fffffff, }; enum BuiltIn { BuiltInPosition = 0, BuiltInPointSize = 1, BuiltInClipDistance = 3, BuiltInCullDistance = 4, BuiltInVertexId = 5, BuiltInInstanceId = 6, BuiltInPrimitiveId = 7, BuiltInInvocationId = 8, BuiltInLayer = 9, BuiltInViewportIndex = 10, BuiltInTessLevelOuter = 11, BuiltInTessLevelInner = 12, BuiltInTessCoord = 13, BuiltInPatchVertices = 14, BuiltInFragCoord = 15, BuiltInPointCoord = 16, BuiltInFrontFacing = 17, BuiltInSampleId = 18, BuiltInSamplePosition = 19, BuiltInSampleMask = 20, BuiltInFragDepth = 22, BuiltInHelperInvocation = 23, BuiltInNumWorkgroups = 24, BuiltInWorkgroupSize = 25, BuiltInWorkgroupId = 26, BuiltInLocalInvocationId = 27, BuiltInGlobalInvocationId = 28, BuiltInLocalInvocationIndex = 29, BuiltInWorkDim = 30, BuiltInGlobalSize = 31, BuiltInEnqueuedWorkgroupSize = 32, BuiltInGlobalOffset = 33, BuiltInGlobalLinearId = 34, BuiltInSubgroupSize = 36, BuiltInSubgroupMaxSize = 37, BuiltInNumSubgroups = 38, BuiltInNumEnqueuedSubgroups = 39, BuiltInSubgroupId = 40, BuiltInSubgroupLocalInvocationId = 41, BuiltInVertexIndex = 42, BuiltInInstanceIndex = 43, BuiltInSubgroupEqMask = 4416, BuiltInSubgroupEqMaskKHR = 4416, BuiltInSubgroupGeMask = 4417, BuiltInSubgroupGeMaskKHR = 4417, BuiltInSubgroupGtMask = 4418, BuiltInSubgroupGtMaskKHR = 4418, BuiltInSubgroupLeMask = 4419, BuiltInSubgroupLeMaskKHR = 4419, BuiltInSubgroupLtMask = 4420, BuiltInSubgroupLtMaskKHR = 4420, BuiltInBaseVertex = 4424, BuiltInBaseInstance = 4425, BuiltInDrawIndex = 4426, BuiltInPrimitiveShadingRateKHR = 4432, BuiltInDeviceIndex = 4438, BuiltInViewIndex = 4440, BuiltInShadingRateKHR = 4444, BuiltInBaryCoordNoPerspAMD = 4992, BuiltInBaryCoordNoPerspCentroidAMD = 4993, BuiltInBaryCoordNoPerspSampleAMD = 4994, BuiltInBaryCoordSmoothAMD = 4995, BuiltInBaryCoordSmoothCentroidAMD = 4996, BuiltInBaryCoordSmoothSampleAMD = 4997, BuiltInBaryCoordPullModelAMD = 4998, BuiltInFragStencilRefEXT = 5014, BuiltInViewportMaskNV = 5253, BuiltInSecondaryPositionNV = 5257, BuiltInSecondaryViewportMaskNV = 5258, BuiltInPositionPerViewNV = 5261, BuiltInViewportMaskPerViewNV = 5262, BuiltInFullyCoveredEXT = 5264, BuiltInTaskCountNV = 5274, BuiltInPrimitiveCountNV = 5275, BuiltInPrimitiveIndicesNV = 5276, BuiltInClipDistancePerViewNV = 5277, BuiltInCullDistancePerViewNV = 5278, BuiltInLayerPerViewNV = 5279, BuiltInMeshViewCountNV = 5280, BuiltInMeshViewIndicesNV = 5281, BuiltInBaryCoordKHR = 5286, BuiltInBaryCoordNV = 5286, BuiltInBaryCoordNoPerspKHR = 5287, BuiltInBaryCoordNoPerspNV = 5287, BuiltInFragSizeEXT = 5292, BuiltInFragmentSizeNV = 5292, BuiltInFragInvocationCountEXT = 5293, BuiltInInvocationsPerPixelNV = 5293, BuiltInPrimitivePointIndicesEXT = 5294, BuiltInPrimitiveLineIndicesEXT = 5295, BuiltInPrimitiveTriangleIndicesEXT = 5296, BuiltInCullPrimitiveEXT = 5299, BuiltInLaunchIdKHR = 5319, BuiltInLaunchIdNV = 5319, BuiltInLaunchSizeKHR = 5320, BuiltInLaunchSizeNV = 5320, BuiltInWorldRayOriginKHR = 5321, BuiltInWorldRayOriginNV = 5321, BuiltInWorldRayDirectionKHR = 5322, BuiltInWorldRayDirectionNV = 5322, BuiltInObjectRayOriginKHR = 5323, BuiltInObjectRayOriginNV = 5323, BuiltInObjectRayDirectionKHR = 5324, BuiltInObjectRayDirectionNV = 5324, BuiltInRayTminKHR = 5325, BuiltInRayTminNV = 5325, BuiltInRayTmaxKHR = 5326, BuiltInRayTmaxNV = 5326, BuiltInInstanceCustomIndexKHR = 5327, BuiltInInstanceCustomIndexNV = 5327, BuiltInObjectToWorldKHR = 5330, BuiltInObjectToWorldNV = 5330, BuiltInWorldToObjectKHR = 5331, BuiltInWorldToObjectNV = 5331, BuiltInHitTNV = 5332, BuiltInHitKindKHR = 5333, BuiltInHitKindNV = 5333, BuiltInCurrentRayTimeNV = 5334, BuiltInIncomingRayFlagsKHR = 5351, BuiltInIncomingRayFlagsNV = 5351, BuiltInRayGeometryIndexKHR = 5352, BuiltInWarpsPerSMNV = 5374, BuiltInSMCountNV = 5375, BuiltInWarpIDNV = 5376, BuiltInSMIDNV = 5377, BuiltInCullMaskKHR = 6021, BuiltInMax = 0x7fffffff, }; enum SelectionControlShift { SelectionControlFlattenShift = 0, SelectionControlDontFlattenShift = 1, SelectionControlMax = 0x7fffffff, }; enum SelectionControlMask { SelectionControlMaskNone = 0, SelectionControlFlattenMask = 0x00000001, SelectionControlDontFlattenMask = 0x00000002, }; enum LoopControlShift { LoopControlUnrollShift = 0, LoopControlDontUnrollShift = 1, LoopControlDependencyInfiniteShift = 2, LoopControlDependencyLengthShift = 3, LoopControlMinIterationsShift = 4, LoopControlMaxIterationsShift = 5, LoopControlIterationMultipleShift = 6, LoopControlPeelCountShift = 7, LoopControlPartialCountShift = 8, LoopControlInitiationIntervalINTELShift = 16, LoopControlMaxConcurrencyINTELShift = 17, LoopControlDependencyArrayINTELShift = 18, LoopControlPipelineEnableINTELShift = 19, LoopControlLoopCoalesceINTELShift = 20, LoopControlMaxInterleavingINTELShift = 21, LoopControlSpeculatedIterationsINTELShift = 22, LoopControlNoFusionINTELShift = 23, LoopControlMax = 0x7fffffff, }; enum LoopControlMask { LoopControlMaskNone = 0, LoopControlUnrollMask = 0x00000001, LoopControlDontUnrollMask = 0x00000002, LoopControlDependencyInfiniteMask = 0x00000004, LoopControlDependencyLengthMask = 0x00000008, LoopControlMinIterationsMask = 0x00000010, LoopControlMaxIterationsMask = 0x00000020, LoopControlIterationMultipleMask = 0x00000040, LoopControlPeelCountMask = 0x00000080, LoopControlPartialCountMask = 0x00000100, LoopControlInitiationIntervalINTELMask = 0x00010000, LoopControlMaxConcurrencyINTELMask = 0x00020000, LoopControlDependencyArrayINTELMask = 0x00040000, LoopControlPipelineEnableINTELMask = 0x00080000, LoopControlLoopCoalesceINTELMask = 0x00100000, LoopControlMaxInterleavingINTELMask = 0x00200000, LoopControlSpeculatedIterationsINTELMask = 0x00400000, LoopControlNoFusionINTELMask = 0x00800000, }; enum FunctionControlShift { FunctionControlInlineShift = 0, FunctionControlDontInlineShift = 1, FunctionControlPureShift = 2, FunctionControlConstShift = 3, FunctionControlOptNoneINTELShift = 16, FunctionControlMax = 0x7fffffff, }; enum FunctionControlMask { FunctionControlMaskNone = 0, FunctionControlInlineMask = 0x00000001, FunctionControlDontInlineMask = 0x00000002, FunctionControlPureMask = 0x00000004, FunctionControlConstMask = 0x00000008, FunctionControlOptNoneINTELMask = 0x00010000, }; enum MemorySemanticsShift { MemorySemanticsAcquireShift = 1, MemorySemanticsReleaseShift = 2, MemorySemanticsAcquireReleaseShift = 3, MemorySemanticsSequentiallyConsistentShift = 4, MemorySemanticsUniformMemoryShift = 6, MemorySemanticsSubgroupMemoryShift = 7, MemorySemanticsWorkgroupMemoryShift = 8, MemorySemanticsCrossWorkgroupMemoryShift = 9, MemorySemanticsAtomicCounterMemoryShift = 10, MemorySemanticsImageMemoryShift = 11, MemorySemanticsOutputMemoryShift = 12, MemorySemanticsOutputMemoryKHRShift = 12, MemorySemanticsMakeAvailableShift = 13, MemorySemanticsMakeAvailableKHRShift = 13, MemorySemanticsMakeVisibleShift = 14, MemorySemanticsMakeVisibleKHRShift = 14, MemorySemanticsVolatileShift = 15, MemorySemanticsMax = 0x7fffffff, }; enum MemorySemanticsMask { MemorySemanticsMaskNone = 0, MemorySemanticsAcquireMask = 0x00000002, MemorySemanticsReleaseMask = 0x00000004, MemorySemanticsAcquireReleaseMask = 0x00000008, MemorySemanticsSequentiallyConsistentMask = 0x00000010, MemorySemanticsUniformMemoryMask = 0x00000040, MemorySemanticsSubgroupMemoryMask = 0x00000080, MemorySemanticsWorkgroupMemoryMask = 0x00000100, MemorySemanticsCrossWorkgroupMemoryMask = 0x00000200, MemorySemanticsAtomicCounterMemoryMask = 0x00000400, MemorySemanticsImageMemoryMask = 0x00000800, MemorySemanticsOutputMemoryMask = 0x00001000, MemorySemanticsOutputMemoryKHRMask = 0x00001000, MemorySemanticsMakeAvailableMask = 0x00002000, MemorySemanticsMakeAvailableKHRMask = 0x00002000, MemorySemanticsMakeVisibleMask = 0x00004000, MemorySemanticsMakeVisibleKHRMask = 0x00004000, MemorySemanticsVolatileMask = 0x00008000, }; enum MemoryAccessShift { MemoryAccessVolatileShift = 0, MemoryAccessAlignedShift = 1, MemoryAccessNontemporalShift = 2, MemoryAccessMakePointerAvailableShift = 3, MemoryAccessMakePointerAvailableKHRShift = 3, MemoryAccessMakePointerVisibleShift = 4, MemoryAccessMakePointerVisibleKHRShift = 4, MemoryAccessNonPrivatePointerShift = 5, MemoryAccessNonPrivatePointerKHRShift = 5, MemoryAccessAliasScopeINTELMaskShift = 16, MemoryAccessNoAliasINTELMaskShift = 17, MemoryAccessMax = 0x7fffffff, }; enum MemoryAccessMask { MemoryAccessMaskNone = 0, MemoryAccessVolatileMask = 0x00000001, MemoryAccessAlignedMask = 0x00000002, MemoryAccessNontemporalMask = 0x00000004, MemoryAccessMakePointerAvailableMask = 0x00000008, MemoryAccessMakePointerAvailableKHRMask = 0x00000008, MemoryAccessMakePointerVisibleMask = 0x00000010, MemoryAccessMakePointerVisibleKHRMask = 0x00000010, MemoryAccessNonPrivatePointerMask = 0x00000020, MemoryAccessNonPrivatePointerKHRMask = 0x00000020, MemoryAccessAliasScopeINTELMaskMask = 0x00010000, MemoryAccessNoAliasINTELMaskMask = 0x00020000, }; enum Scope { ScopeCrossDevice = 0, ScopeDevice = 1, ScopeWorkgroup = 2, ScopeSubgroup = 3, ScopeInvocation = 4, ScopeQueueFamily = 5, ScopeQueueFamilyKHR = 5, ScopeShaderCallKHR = 6, ScopeMax = 0x7fffffff, }; enum GroupOperation { GroupOperationReduce = 0, GroupOperationInclusiveScan = 1, GroupOperationExclusiveScan = 2, GroupOperationClusteredReduce = 3, GroupOperationPartitionedReduceNV = 6, GroupOperationPartitionedInclusiveScanNV = 7, GroupOperationPartitionedExclusiveScanNV = 8, GroupOperationMax = 0x7fffffff, }; enum KernelEnqueueFlags { KernelEnqueueFlagsNoWait = 0, KernelEnqueueFlagsWaitKernel = 1, KernelEnqueueFlagsWaitWorkGroup = 2, KernelEnqueueFlagsMax = 0x7fffffff, }; enum KernelProfilingInfoShift { KernelProfilingInfoCmdExecTimeShift = 0, KernelProfilingInfoMax = 0x7fffffff, }; enum KernelProfilingInfoMask { KernelProfilingInfoMaskNone = 0, KernelProfilingInfoCmdExecTimeMask = 0x00000001, }; enum Capability { CapabilityMatrix = 0, CapabilityShader = 1, CapabilityGeometry = 2, CapabilityTessellation = 3, CapabilityAddresses = 4, CapabilityLinkage = 5, CapabilityKernel = 6, CapabilityVector16 = 7, CapabilityFloat16Buffer = 8, CapabilityFloat16 = 9, CapabilityFloat64 = 10, CapabilityInt64 = 11, CapabilityInt64Atomics = 12, CapabilityImageBasic = 13, CapabilityImageReadWrite = 14, CapabilityImageMipmap = 15, CapabilityPipes = 17, CapabilityGroups = 18, CapabilityDeviceEnqueue = 19, CapabilityLiteralSampler = 20, CapabilityAtomicStorage = 21, CapabilityInt16 = 22, CapabilityTessellationPointSize = 23, CapabilityGeometryPointSize = 24, CapabilityImageGatherExtended = 25, CapabilityStorageImageMultisample = 27, CapabilityUniformBufferArrayDynamicIndexing = 28, CapabilitySampledImageArrayDynamicIndexing = 29, CapabilityStorageBufferArrayDynamicIndexing = 30, CapabilityStorageImageArrayDynamicIndexing = 31, CapabilityClipDistance = 32, CapabilityCullDistance = 33, CapabilityImageCubeArray = 34, CapabilitySampleRateShading = 35, CapabilityImageRect = 36, CapabilitySampledRect = 37, CapabilityGenericPointer = 38, CapabilityInt8 = 39, CapabilityInputAttachment = 40, CapabilitySparseResidency = 41, CapabilityMinLod = 42, CapabilitySampled1D = 43, CapabilityImage1D = 44, CapabilitySampledCubeArray = 45, CapabilitySampledBuffer = 46, CapabilityImageBuffer = 47, CapabilityImageMSArray = 48, CapabilityStorageImageExtendedFormats = 49, CapabilityImageQuery = 50, CapabilityDerivativeControl = 51, CapabilityInterpolationFunction = 52, CapabilityTransformFeedback = 53, CapabilityGeometryStreams = 54, CapabilityStorageImageReadWithoutFormat = 55, CapabilityStorageImageWriteWithoutFormat = 56, CapabilityMultiViewport = 57, CapabilitySubgroupDispatch = 58, CapabilityNamedBarrier = 59, CapabilityPipeStorage = 60, CapabilityGroupNonUniform = 61, CapabilityGroupNonUniformVote = 62, CapabilityGroupNonUniformArithmetic = 63, CapabilityGroupNonUniformBallot = 64, CapabilityGroupNonUniformShuffle = 65, CapabilityGroupNonUniformShuffleRelative = 66, CapabilityGroupNonUniformClustered = 67, CapabilityGroupNonUniformQuad = 68, CapabilityShaderLayer = 69, CapabilityShaderViewportIndex = 70, CapabilityUniformDecoration = 71, CapabilityFragmentShadingRateKHR = 4422, CapabilitySubgroupBallotKHR = 4423, CapabilityDrawParameters = 4427, CapabilityWorkgroupMemoryExplicitLayoutKHR = 4428, CapabilityWorkgroupMemoryExplicitLayout8BitAccessKHR = 4429, CapabilityWorkgroupMemoryExplicitLayout16BitAccessKHR = 4430, CapabilitySubgroupVoteKHR = 4431, CapabilityStorageBuffer16BitAccess = 4433, CapabilityStorageUniformBufferBlock16 = 4433, CapabilityStorageUniform16 = 4434, CapabilityUniformAndStorageBuffer16BitAccess = 4434, CapabilityStoragePushConstant16 = 4435, CapabilityStorageInputOutput16 = 4436, CapabilityDeviceGroup = 4437, CapabilityMultiView = 4439, CapabilityVariablePointersStorageBuffer = 4441, CapabilityVariablePointers = 4442, CapabilityAtomicStorageOps = 4445, CapabilitySampleMaskPostDepthCoverage = 4447, CapabilityStorageBuffer8BitAccess = 4448, CapabilityUniformAndStorageBuffer8BitAccess = 4449, CapabilityStoragePushConstant8 = 4450, CapabilityDenormPreserve = 4464, CapabilityDenormFlushToZero = 4465, CapabilitySignedZeroInfNanPreserve = 4466, CapabilityRoundingModeRTE = 4467, CapabilityRoundingModeRTZ = 4468, CapabilityRayQueryProvisionalKHR = 4471, CapabilityRayQueryKHR = 4472, CapabilityRayTraversalPrimitiveCullingKHR = 4478, CapabilityRayTracingKHR = 4479, CapabilityFloat16ImageAMD = 5008, CapabilityImageGatherBiasLodAMD = 5009, CapabilityFragmentMaskAMD = 5010, CapabilityStencilExportEXT = 5013, CapabilityImageReadWriteLodAMD = 5015, CapabilityInt64ImageEXT = 5016, CapabilityShaderClockKHR = 5055, CapabilitySampleMaskOverrideCoverageNV = 5249, CapabilityGeometryShaderPassthroughNV = 5251, CapabilityShaderViewportIndexLayerEXT = 5254, CapabilityShaderViewportIndexLayerNV = 5254, CapabilityShaderViewportMaskNV = 5255, CapabilityShaderStereoViewNV = 5259, CapabilityPerViewAttributesNV = 5260, CapabilityFragmentFullyCoveredEXT = 5265, CapabilityMeshShadingNV = 5266, CapabilityImageFootprintNV = 5282, CapabilityMeshShadingEXT = 5283, CapabilityFragmentBarycentricKHR = 5284, CapabilityFragmentBarycentricNV = 5284, CapabilityComputeDerivativeGroupQuadsNV = 5288, CapabilityFragmentDensityEXT = 5291, CapabilityShadingRateNV = 5291, CapabilityGroupNonUniformPartitionedNV = 5297, CapabilityShaderNonUniform = 5301, CapabilityShaderNonUniformEXT = 5301, CapabilityRuntimeDescriptorArray = 5302, CapabilityRuntimeDescriptorArrayEXT = 5302, CapabilityInputAttachmentArrayDynamicIndexing = 5303, CapabilityInputAttachmentArrayDynamicIndexingEXT = 5303, CapabilityUniformTexelBufferArrayDynamicIndexing = 5304, CapabilityUniformTexelBufferArrayDynamicIndexingEXT = 5304, CapabilityStorageTexelBufferArrayDynamicIndexing = 5305, CapabilityStorageTexelBufferArrayDynamicIndexingEXT = 5305, CapabilityUniformBufferArrayNonUniformIndexing = 5306, CapabilityUniformBufferArrayNonUniformIndexingEXT = 5306, CapabilitySampledImageArrayNonUniformIndexing = 5307, CapabilitySampledImageArrayNonUniformIndexingEXT = 5307, CapabilityStorageBufferArrayNonUniformIndexing = 5308, CapabilityStorageBufferArrayNonUniformIndexingEXT = 5308, CapabilityStorageImageArrayNonUniformIndexing = 5309, CapabilityStorageImageArrayNonUniformIndexingEXT = 5309, CapabilityInputAttachmentArrayNonUniformIndexing = 5310, CapabilityInputAttachmentArrayNonUniformIndexingEXT = 5310, CapabilityUniformTexelBufferArrayNonUniformIndexing = 5311, CapabilityUniformTexelBufferArrayNonUniformIndexingEXT = 5311, CapabilityStorageTexelBufferArrayNonUniformIndexing = 5312, CapabilityStorageTexelBufferArrayNonUniformIndexingEXT = 5312, CapabilityRayTracingNV = 5340, CapabilityRayTracingMotionBlurNV = 5341, CapabilityVulkanMemoryModel = 5345, CapabilityVulkanMemoryModelKHR = 5345, CapabilityVulkanMemoryModelDeviceScope = 5346, CapabilityVulkanMemoryModelDeviceScopeKHR = 5346, CapabilityPhysicalStorageBufferAddresses = 5347, CapabilityPhysicalStorageBufferAddressesEXT = 5347, CapabilityComputeDerivativeGroupLinearNV = 5350, CapabilityRayTracingProvisionalKHR = 5353, CapabilityCooperativeMatrixNV = 5357, CapabilityFragmentShaderSampleInterlockEXT = 5363, CapabilityFragmentShaderShadingRateInterlockEXT = 5372, CapabilityShaderSMBuiltinsNV = 5373, CapabilityFragmentShaderPixelInterlockEXT = 5378, CapabilityDemoteToHelperInvocation = 5379, CapabilityDemoteToHelperInvocationEXT = 5379, CapabilityBindlessTextureNV = 5390, CapabilitySubgroupShuffleINTEL = 5568, CapabilitySubgroupBufferBlockIOINTEL = 5569, CapabilitySubgroupImageBlockIOINTEL = 5570, CapabilitySubgroupImageMediaBlockIOINTEL = 5579, CapabilityRoundToInfinityINTEL = 5582, CapabilityFloatingPointModeINTEL = 5583, CapabilityIntegerFunctions2INTEL = 5584, CapabilityFunctionPointersINTEL = 5603, CapabilityIndirectReferencesINTEL = 5604, CapabilityAsmINTEL = 5606, CapabilityAtomicFloat32MinMaxEXT = 5612, CapabilityAtomicFloat64MinMaxEXT = 5613, CapabilityAtomicFloat16MinMaxEXT = 5616, CapabilityVectorComputeINTEL = 5617, CapabilityVectorAnyINTEL = 5619, CapabilityExpectAssumeKHR = 5629, CapabilitySubgroupAvcMotionEstimationINTEL = 5696, CapabilitySubgroupAvcMotionEstimationIntraINTEL = 5697, CapabilitySubgroupAvcMotionEstimationChromaINTEL = 5698, CapabilityVariableLengthArrayINTEL = 5817, CapabilityFunctionFloatControlINTEL = 5821, CapabilityFPGAMemoryAttributesINTEL = 5824, CapabilityFPFastMathModeINTEL = 5837, CapabilityArbitraryPrecisionIntegersINTEL = 5844, CapabilityArbitraryPrecisionFloatingPointINTEL = 5845, CapabilityUnstructuredLoopControlsINTEL = 5886, CapabilityFPGALoopControlsINTEL = 5888, CapabilityKernelAttributesINTEL = 5892, CapabilityFPGAKernelAttributesINTEL = 5897, CapabilityFPGAMemoryAccessesINTEL = 5898, CapabilityFPGAClusterAttributesINTEL = 5904, CapabilityLoopFuseINTEL = 5906, CapabilityMemoryAccessAliasingINTEL = 5910, CapabilityFPGABufferLocationINTEL = 5920, CapabilityArbitraryPrecisionFixedPointINTEL = 5922, CapabilityUSMStorageClassesINTEL = 5935, CapabilityIOPipesINTEL = 5943, CapabilityBlockingPipesINTEL = 5945, CapabilityFPGARegINTEL = 5948, CapabilityDotProductInputAll = 6016, CapabilityDotProductInputAllKHR = 6016, CapabilityDotProductInput4x8Bit = 6017, CapabilityDotProductInput4x8BitKHR = 6017, CapabilityDotProductInput4x8BitPacked = 6018, CapabilityDotProductInput4x8BitPackedKHR = 6018, CapabilityDotProduct = 6019, CapabilityDotProductKHR = 6019, CapabilityRayCullMaskKHR = 6020, CapabilityBitInstructions = 6025, CapabilityGroupNonUniformRotateKHR = 6026, CapabilityAtomicFloat32AddEXT = 6033, CapabilityAtomicFloat64AddEXT = 6034, CapabilityLongConstantCompositeINTEL = 6089, CapabilityOptNoneINTEL = 6094, CapabilityAtomicFloat16AddEXT = 6095, CapabilityDebugInfoModuleINTEL = 6114, CapabilitySplitBarrierINTEL = 6141, CapabilityGroupUniformArithmeticKHR = 6400, CapabilityMax = 0x7fffffff, }; enum RayFlagsShift { RayFlagsOpaqueKHRShift = 0, RayFlagsNoOpaqueKHRShift = 1, RayFlagsTerminateOnFirstHitKHRShift = 2, RayFlagsSkipClosestHitShaderKHRShift = 3, RayFlagsCullBackFacingTrianglesKHRShift = 4, RayFlagsCullFrontFacingTrianglesKHRShift = 5, RayFlagsCullOpaqueKHRShift = 6, RayFlagsCullNoOpaqueKHRShift = 7, RayFlagsSkipTrianglesKHRShift = 8, RayFlagsSkipAABBsKHRShift = 9, RayFlagsMax = 0x7fffffff, }; enum RayFlagsMask { RayFlagsMaskNone = 0, RayFlagsOpaqueKHRMask = 0x00000001, RayFlagsNoOpaqueKHRMask = 0x00000002, RayFlagsTerminateOnFirstHitKHRMask = 0x00000004, RayFlagsSkipClosestHitShaderKHRMask = 0x00000008, RayFlagsCullBackFacingTrianglesKHRMask = 0x00000010, RayFlagsCullFrontFacingTrianglesKHRMask = 0x00000020, RayFlagsCullOpaqueKHRMask = 0x00000040, RayFlagsCullNoOpaqueKHRMask = 0x00000080, RayFlagsSkipTrianglesKHRMask = 0x00000100, RayFlagsSkipAABBsKHRMask = 0x00000200, }; enum RayQueryIntersection { RayQueryIntersectionRayQueryCandidateIntersectionKHR = 0, RayQueryIntersectionRayQueryCommittedIntersectionKHR = 1, RayQueryIntersectionMax = 0x7fffffff, }; enum RayQueryCommittedIntersectionType { RayQueryCommittedIntersectionTypeRayQueryCommittedIntersectionNoneKHR = 0, RayQueryCommittedIntersectionTypeRayQueryCommittedIntersectionTriangleKHR = 1, RayQueryCommittedIntersectionTypeRayQueryCommittedIntersectionGeneratedKHR = 2, RayQueryCommittedIntersectionTypeMax = 0x7fffffff, }; enum RayQueryCandidateIntersectionType { RayQueryCandidateIntersectionTypeRayQueryCandidateIntersectionTriangleKHR = 0, RayQueryCandidateIntersectionTypeRayQueryCandidateIntersectionAABBKHR = 1, RayQueryCandidateIntersectionTypeMax = 0x7fffffff, }; enum FragmentShadingRateShift { FragmentShadingRateVertical2PixelsShift = 0, FragmentShadingRateVertical4PixelsShift = 1, FragmentShadingRateHorizontal2PixelsShift = 2, FragmentShadingRateHorizontal4PixelsShift = 3, FragmentShadingRateMax = 0x7fffffff, }; enum FragmentShadingRateMask { FragmentShadingRateMaskNone = 0, FragmentShadingRateVertical2PixelsMask = 0x00000001, FragmentShadingRateVertical4PixelsMask = 0x00000002, FragmentShadingRateHorizontal2PixelsMask = 0x00000004, FragmentShadingRateHorizontal4PixelsMask = 0x00000008, }; enum FPDenormMode { FPDenormModePreserve = 0, FPDenormModeFlushToZero = 1, FPDenormModeMax = 0x7fffffff, }; enum FPOperationMode { FPOperationModeIEEE = 0, FPOperationModeALT = 1, FPOperationModeMax = 0x7fffffff, }; enum QuantizationModes { QuantizationModesTRN = 0, QuantizationModesTRN_ZERO = 1, QuantizationModesRND = 2, QuantizationModesRND_ZERO = 3, QuantizationModesRND_INF = 4, QuantizationModesRND_MIN_INF = 5, QuantizationModesRND_CONV = 6, QuantizationModesRND_CONV_ODD = 7, QuantizationModesMax = 0x7fffffff, }; enum OverflowModes { OverflowModesWRAP = 0, OverflowModesSAT = 1, OverflowModesSAT_ZERO = 2, OverflowModesSAT_SYM = 3, OverflowModesMax = 0x7fffffff, }; enum PackedVectorFormat { PackedVectorFormatPackedVectorFormat4x8Bit = 0, PackedVectorFormatPackedVectorFormat4x8BitKHR = 0, PackedVectorFormatMax = 0x7fffffff, }; enum Op { OpNop = 0, OpUndef = 1, OpSourceContinued = 2, OpSource = 3, OpSourceExtension = 4, OpName = 5, OpMemberName = 6, OpString = 7, OpLine = 8, OpExtension = 10, OpExtInstImport = 11, OpExtInst = 12, OpMemoryModel = 14, OpEntryPoint = 15, OpExecutionMode = 16, OpCapability = 17, OpTypeVoid = 19, OpTypeBool = 20, OpTypeInt = 21, OpTypeFloat = 22, OpTypeVector = 23, OpTypeMatrix = 24, OpTypeImage = 25, OpTypeSampler = 26, OpTypeSampledImage = 27, OpTypeArray = 28, OpTypeRuntimeArray = 29, OpTypeStruct = 30, OpTypeOpaque = 31, OpTypePointer = 32, OpTypeFunction = 33, OpTypeEvent = 34, OpTypeDeviceEvent = 35, OpTypeReserveId = 36, OpTypeQueue = 37, OpTypePipe = 38, OpTypeForwardPointer = 39, OpConstantTrue = 41, OpConstantFalse = 42, OpConstant = 43, OpConstantComposite = 44, OpConstantSampler = 45, OpConstantNull = 46, OpSpecConstantTrue = 48, OpSpecConstantFalse = 49, OpSpecConstant = 50, OpSpecConstantComposite = 51, OpSpecConstantOp = 52, OpFunction = 54, OpFunctionParameter = 55, OpFunctionEnd = 56, OpFunctionCall = 57, OpVariable = 59, OpImageTexelPointer = 60, OpLoad = 61, OpStore = 62, OpCopyMemory = 63, OpCopyMemorySized = 64, OpAccessChain = 65, OpInBoundsAccessChain = 66, OpPtrAccessChain = 67, OpArrayLength = 68, OpGenericPtrMemSemantics = 69, OpInBoundsPtrAccessChain = 70, OpDecorate = 71, OpMemberDecorate = 72, OpDecorationGroup = 73, OpGroupDecorate = 74, OpGroupMemberDecorate = 75, OpVectorExtractDynamic = 77, OpVectorInsertDynamic = 78, OpVectorShuffle = 79, OpCompositeConstruct = 80, OpCompositeExtract = 81, OpCompositeInsert = 82, OpCopyObject = 83, OpTranspose = 84, OpSampledImage = 86, OpImageSampleImplicitLod = 87, OpImageSampleExplicitLod = 88, OpImageSampleDrefImplicitLod = 89, OpImageSampleDrefExplicitLod = 90, OpImageSampleProjImplicitLod = 91, OpImageSampleProjExplicitLod = 92, OpImageSampleProjDrefImplicitLod = 93, OpImageSampleProjDrefExplicitLod = 94, OpImageFetch = 95, OpImageGather = 96, OpImageDrefGather = 97, OpImageRead = 98, OpImageWrite = 99, OpImage = 100, OpImageQueryFormat = 101, OpImageQueryOrder = 102, OpImageQuerySizeLod = 103, OpImageQuerySize = 104, OpImageQueryLod = 105, OpImageQueryLevels = 106, OpImageQuerySamples = 107, OpConvertFToU = 109, OpConvertFToS = 110, OpConvertSToF = 111, OpConvertUToF = 112, OpUConvert = 113, OpSConvert = 114, OpFConvert = 115, OpQuantizeToF16 = 116, OpConvertPtrToU = 117, OpSatConvertSToU = 118, OpSatConvertUToS = 119, OpConvertUToPtr = 120, OpPtrCastToGeneric = 121, OpGenericCastToPtr = 122, OpGenericCastToPtrExplicit = 123, OpBitcast = 124, OpSNegate = 126, OpFNegate = 127, OpIAdd = 128, OpFAdd = 129, OpISub = 130, OpFSub = 131, OpIMul = 132, OpFMul = 133, OpUDiv = 134, OpSDiv = 135, OpFDiv = 136, OpUMod = 137, OpSRem = 138, OpSMod = 139, OpFRem = 140, OpFMod = 141, OpVectorTimesScalar = 142, OpMatrixTimesScalar = 143, OpVectorTimesMatrix = 144, OpMatrixTimesVector = 145, OpMatrixTimesMatrix = 146, OpOuterProduct = 147, OpDot = 148, OpIAddCarry = 149, OpISubBorrow = 150, OpUMulExtended = 151, OpSMulExtended = 152, OpAny = 154, OpAll = 155, OpIsNan = 156, OpIsInf = 157, OpIsFinite = 158, OpIsNormal = 159, OpSignBitSet = 160, OpLessOrGreater = 161, OpOrdered = 162, OpUnordered = 163, OpLogicalEqual = 164, OpLogicalNotEqual = 165, OpLogicalOr = 166, OpLogicalAnd = 167, OpLogicalNot = 168, OpSelect = 169, OpIEqual = 170, OpINotEqual = 171, OpUGreaterThan = 172, OpSGreaterThan = 173, OpUGreaterThanEqual = 174, OpSGreaterThanEqual = 175, OpULessThan = 176, OpSLessThan = 177, OpULessThanEqual = 178, OpSLessThanEqual = 179, OpFOrdEqual = 180, OpFUnordEqual = 181, OpFOrdNotEqual = 182, OpFUnordNotEqual = 183, OpFOrdLessThan = 184, OpFUnordLessThan = 185, OpFOrdGreaterThan = 186, OpFUnordGreaterThan = 187, OpFOrdLessThanEqual = 188, OpFUnordLessThanEqual = 189, OpFOrdGreaterThanEqual = 190, OpFUnordGreaterThanEqual = 191, OpShiftRightLogical = 194, OpShiftRightArithmetic = 195, OpShiftLeftLogical = 196, OpBitwiseOr = 197, OpBitwiseXor = 198, OpBitwiseAnd = 199, OpNot = 200, OpBitFieldInsert = 201, OpBitFieldSExtract = 202, OpBitFieldUExtract = 203, OpBitReverse = 204, OpBitCount = 205, OpDPdx = 207, OpDPdy = 208, OpFwidth = 209, OpDPdxFine = 210, OpDPdyFine = 211, OpFwidthFine = 212, OpDPdxCoarse = 213, OpDPdyCoarse = 214, OpFwidthCoarse = 215, OpEmitVertex = 218, OpEndPrimitive = 219, OpEmitStreamVertex = 220, OpEndStreamPrimitive = 221, OpControlBarrier = 224, OpMemoryBarrier = 225, OpAtomicLoad = 227, OpAtomicStore = 228, OpAtomicExchange = 229, OpAtomicCompareExchange = 230, OpAtomicCompareExchangeWeak = 231, OpAtomicIIncrement = 232, OpAtomicIDecrement = 233, OpAtomicIAdd = 234, OpAtomicISub = 235, OpAtomicSMin = 236, OpAtomicUMin = 237, OpAtomicSMax = 238, OpAtomicUMax = 239, OpAtomicAnd = 240, OpAtomicOr = 241, OpAtomicXor = 242, OpPhi = 245, OpLoopMerge = 246, OpSelectionMerge = 247, OpLabel = 248, OpBranch = 249, OpBranchConditional = 250, OpSwitch = 251, OpKill = 252, OpReturn = 253, OpReturnValue = 254, OpUnreachable = 255, OpLifetimeStart = 256, OpLifetimeStop = 257, OpGroupAsyncCopy = 259, OpGroupWaitEvents = 260, OpGroupAll = 261, OpGroupAny = 262, OpGroupBroadcast = 263, OpGroupIAdd = 264, OpGroupFAdd = 265, OpGroupFMin = 266, OpGroupUMin = 267, OpGroupSMin = 268, OpGroupFMax = 269, OpGroupUMax = 270, OpGroupSMax = 271, OpReadPipe = 274, OpWritePipe = 275, OpReservedReadPipe = 276, OpReservedWritePipe = 277, OpReserveReadPipePackets = 278, OpReserveWritePipePackets = 279, OpCommitReadPipe = 280, OpCommitWritePipe = 281, OpIsValidReserveId = 282, OpGetNumPipePackets = 283, OpGetMaxPipePackets = 284, OpGroupReserveReadPipePackets = 285, OpGroupReserveWritePipePackets = 286, OpGroupCommitReadPipe = 287, OpGroupCommitWritePipe = 288, OpEnqueueMarker = 291, OpEnqueueKernel = 292, OpGetKernelNDrangeSubGroupCount = 293, OpGetKernelNDrangeMaxSubGroupSize = 294, OpGetKernelWorkGroupSize = 295, OpGetKernelPreferredWorkGroupSizeMultiple = 296, OpRetainEvent = 297, OpReleaseEvent = 298, OpCreateUserEvent = 299, OpIsValidEvent = 300, OpSetUserEventStatus = 301, OpCaptureEventProfilingInfo = 302, OpGetDefaultQueue = 303, OpBuildNDRange = 304, OpImageSparseSampleImplicitLod = 305, OpImageSparseSampleExplicitLod = 306, OpImageSparseSampleDrefImplicitLod = 307, OpImageSparseSampleDrefExplicitLod = 308, OpImageSparseSampleProjImplicitLod = 309, OpImageSparseSampleProjExplicitLod = 310, OpImageSparseSampleProjDrefImplicitLod = 311, OpImageSparseSampleProjDrefExplicitLod = 312, OpImageSparseFetch = 313, OpImageSparseGather = 314, OpImageSparseDrefGather = 315, OpImageSparseTexelsResident = 316, OpNoLine = 317, OpAtomicFlagTestAndSet = 318, OpAtomicFlagClear = 319, OpImageSparseRead = 320, OpSizeOf = 321, OpTypePipeStorage = 322, OpConstantPipeStorage = 323, OpCreatePipeFromPipeStorage = 324, OpGetKernelLocalSizeForSubgroupCount = 325, OpGetKernelMaxNumSubgroups = 326, OpTypeNamedBarrier = 327, OpNamedBarrierInitialize = 328, OpMemoryNamedBarrier = 329, OpModuleProcessed = 330, OpExecutionModeId = 331, OpDecorateId = 332, OpGroupNonUniformElect = 333, OpGroupNonUniformAll = 334, OpGroupNonUniformAny = 335, OpGroupNonUniformAllEqual = 336, OpGroupNonUniformBroadcast = 337, OpGroupNonUniformBroadcastFirst = 338, OpGroupNonUniformBallot = 339, OpGroupNonUniformInverseBallot = 340, OpGroupNonUniformBallotBitExtract = 341, OpGroupNonUniformBallotBitCount = 342, OpGroupNonUniformBallotFindLSB = 343, OpGroupNonUniformBallotFindMSB = 344, OpGroupNonUniformShuffle = 345, OpGroupNonUniformShuffleXor = 346, OpGroupNonUniformShuffleUp = 347, OpGroupNonUniformShuffleDown = 348, OpGroupNonUniformIAdd = 349, OpGroupNonUniformFAdd = 350, OpGroupNonUniformIMul = 351, OpGroupNonUniformFMul = 352, OpGroupNonUniformSMin = 353, OpGroupNonUniformUMin = 354, OpGroupNonUniformFMin = 355, OpGroupNonUniformSMax = 356, OpGroupNonUniformUMax = 357, OpGroupNonUniformFMax = 358, OpGroupNonUniformBitwiseAnd = 359, OpGroupNonUniformBitwiseOr = 360, OpGroupNonUniformBitwiseXor = 361, OpGroupNonUniformLogicalAnd = 362, OpGroupNonUniformLogicalOr = 363, OpGroupNonUniformLogicalXor = 364, OpGroupNonUniformQuadBroadcast = 365, OpGroupNonUniformQuadSwap = 366, OpCopyLogical = 400, OpPtrEqual = 401, OpPtrNotEqual = 402, OpPtrDiff = 403, OpTerminateInvocation = 4416, OpSubgroupBallotKHR = 4421, OpSubgroupFirstInvocationKHR = 4422, OpSubgroupAllKHR = 4428, OpSubgroupAnyKHR = 4429, OpSubgroupAllEqualKHR = 4430, OpGroupNonUniformRotateKHR = 4431, OpSubgroupReadInvocationKHR = 4432, OpTraceRayKHR = 4445, OpExecuteCallableKHR = 4446, OpConvertUToAccelerationStructureKHR = 4447, OpIgnoreIntersectionKHR = 4448, OpTerminateRayKHR = 4449, OpSDot = 4450, OpSDotKHR = 4450, OpUDot = 4451, OpUDotKHR = 4451, OpSUDot = 4452, OpSUDotKHR = 4452, OpSDotAccSat = 4453, OpSDotAccSatKHR = 4453, OpUDotAccSat = 4454, OpUDotAccSatKHR = 4454, OpSUDotAccSat = 4455, OpSUDotAccSatKHR = 4455, OpTypeRayQueryKHR = 4472, OpRayQueryInitializeKHR = 4473, OpRayQueryTerminateKHR = 4474, OpRayQueryGenerateIntersectionKHR = 4475, OpRayQueryConfirmIntersectionKHR = 4476, OpRayQueryProceedKHR = 4477, OpRayQueryGetIntersectionTypeKHR = 4479, OpGroupIAddNonUniformAMD = 5000, OpGroupFAddNonUniformAMD = 5001, OpGroupFMinNonUniformAMD = 5002, OpGroupUMinNonUniformAMD = 5003, OpGroupSMinNonUniformAMD = 5004, OpGroupFMaxNonUniformAMD = 5005, OpGroupUMaxNonUniformAMD = 5006, OpGroupSMaxNonUniformAMD = 5007, OpFragmentMaskFetchAMD = 5011, OpFragmentFetchAMD = 5012, OpReadClockKHR = 5056, OpImageSampleFootprintNV = 5283, OpEmitMeshTasksEXT = 5294, OpSetMeshOutputsEXT = 5295, OpGroupNonUniformPartitionNV = 5296, OpWritePackedPrimitiveIndices4x8NV = 5299, OpReportIntersectionKHR = 5334, OpReportIntersectionNV = 5334, OpIgnoreIntersectionNV = 5335, OpTerminateRayNV = 5336, OpTraceNV = 5337, OpTraceMotionNV = 5338, OpTraceRayMotionNV = 5339, OpTypeAccelerationStructureKHR = 5341, OpTypeAccelerationStructureNV = 5341, OpExecuteCallableNV = 5344, OpTypeCooperativeMatrixNV = 5358, OpCooperativeMatrixLoadNV = 5359, OpCooperativeMatrixStoreNV = 5360, OpCooperativeMatrixMulAddNV = 5361, OpCooperativeMatrixLengthNV = 5362, OpBeginInvocationInterlockEXT = 5364, OpEndInvocationInterlockEXT = 5365, OpDemoteToHelperInvocation = 5380, OpDemoteToHelperInvocationEXT = 5380, OpIsHelperInvocationEXT = 5381, OpConvertUToImageNV = 5391, OpConvertUToSamplerNV = 5392, OpConvertImageToUNV = 5393, OpConvertSamplerToUNV = 5394, OpConvertUToSampledImageNV = 5395, OpConvertSampledImageToUNV = 5396, OpSamplerImageAddressingModeNV = 5397, OpSubgroupShuffleINTEL = 5571, OpSubgroupShuffleDownINTEL = 5572, OpSubgroupShuffleUpINTEL = 5573, OpSubgroupShuffleXorINTEL = 5574, OpSubgroupBlockReadINTEL = 5575, OpSubgroupBlockWriteINTEL = 5576, OpSubgroupImageBlockReadINTEL = 5577, OpSubgroupImageBlockWriteINTEL = 5578, OpSubgroupImageMediaBlockReadINTEL = 5580, OpSubgroupImageMediaBlockWriteINTEL = 5581, OpUCountLeadingZerosINTEL = 5585, OpUCountTrailingZerosINTEL = 5586, OpAbsISubINTEL = 5587, OpAbsUSubINTEL = 5588, OpIAddSatINTEL = 5589, OpUAddSatINTEL = 5590, OpIAverageINTEL = 5591, OpUAverageINTEL = 5592, OpIAverageRoundedINTEL = 5593, OpUAverageRoundedINTEL = 5594, OpISubSatINTEL = 5595, OpUSubSatINTEL = 5596, OpIMul32x16INTEL = 5597, OpUMul32x16INTEL = 5598, OpConstantFunctionPointerINTEL = 5600, OpFunctionPointerCallINTEL = 5601, OpAsmTargetINTEL = 5609, OpAsmINTEL = 5610, OpAsmCallINTEL = 5611, OpAtomicFMinEXT = 5614, OpAtomicFMaxEXT = 5615, OpAssumeTrueKHR = 5630, OpExpectKHR = 5631, OpDecorateString = 5632, OpDecorateStringGOOGLE = 5632, OpMemberDecorateString = 5633, OpMemberDecorateStringGOOGLE = 5633, OpVmeImageINTEL = 5699, OpTypeVmeImageINTEL = 5700, OpTypeAvcImePayloadINTEL = 5701, OpTypeAvcRefPayloadINTEL = 5702, OpTypeAvcSicPayloadINTEL = 5703, OpTypeAvcMcePayloadINTEL = 5704, OpTypeAvcMceResultINTEL = 5705, OpTypeAvcImeResultINTEL = 5706, OpTypeAvcImeResultSingleReferenceStreamoutINTEL = 5707, OpTypeAvcImeResultDualReferenceStreamoutINTEL = 5708, OpTypeAvcImeSingleReferenceStreaminINTEL = 5709, OpTypeAvcImeDualReferenceStreaminINTEL = 5710, OpTypeAvcRefResultINTEL = 5711, OpTypeAvcSicResultINTEL = 5712, OpSubgroupAvcMceGetDefaultInterBaseMultiReferencePenaltyINTEL = 5713, OpSubgroupAvcMceSetInterBaseMultiReferencePenaltyINTEL = 5714, OpSubgroupAvcMceGetDefaultInterShapePenaltyINTEL = 5715, OpSubgroupAvcMceSetInterShapePenaltyINTEL = 5716, OpSubgroupAvcMceGetDefaultInterDirectionPenaltyINTEL = 5717, OpSubgroupAvcMceSetInterDirectionPenaltyINTEL = 5718, OpSubgroupAvcMceGetDefaultIntraLumaShapePenaltyINTEL = 5719, OpSubgroupAvcMceGetDefaultInterMotionVectorCostTableINTEL = 5720, OpSubgroupAvcMceGetDefaultHighPenaltyCostTableINTEL = 5721, OpSubgroupAvcMceGetDefaultMediumPenaltyCostTableINTEL = 5722, OpSubgroupAvcMceGetDefaultLowPenaltyCostTableINTEL = 5723, OpSubgroupAvcMceSetMotionVectorCostFunctionINTEL = 5724, OpSubgroupAvcMceGetDefaultIntraLumaModePenaltyINTEL = 5725, OpSubgroupAvcMceGetDefaultNonDcLumaIntraPenaltyINTEL = 5726, OpSubgroupAvcMceGetDefaultIntraChromaModeBasePenaltyINTEL = 5727, OpSubgroupAvcMceSetAcOnlyHaarINTEL = 5728, OpSubgroupAvcMceSetSourceInterlacedFieldPolarityINTEL = 5729, OpSubgroupAvcMceSetSingleReferenceInterlacedFieldPolarityINTEL = 5730, OpSubgroupAvcMceSetDualReferenceInterlacedFieldPolaritiesINTEL = 5731, OpSubgroupAvcMceConvertToImePayloadINTEL = 5732, OpSubgroupAvcMceConvertToImeResultINTEL = 5733, OpSubgroupAvcMceConvertToRefPayloadINTEL = 5734, OpSubgroupAvcMceConvertToRefResultINTEL = 5735, OpSubgroupAvcMceConvertToSicPayloadINTEL = 5736, OpSubgroupAvcMceConvertToSicResultINTEL = 5737, OpSubgroupAvcMceGetMotionVectorsINTEL = 5738, OpSubgroupAvcMceGetInterDistortionsINTEL = 5739, OpSubgroupAvcMceGetBestInterDistortionsINTEL = 5740, OpSubgroupAvcMceGetInterMajorShapeINTEL = 5741, OpSubgroupAvcMceGetInterMinorShapeINTEL = 5742, OpSubgroupAvcMceGetInterDirectionsINTEL = 5743, OpSubgroupAvcMceGetInterMotionVectorCountINTEL = 5744, OpSubgroupAvcMceGetInterReferenceIdsINTEL = 5745, OpSubgroupAvcMceGetInterReferenceInterlacedFieldPolaritiesINTEL = 5746, OpSubgroupAvcImeInitializeINTEL = 5747, OpSubgroupAvcImeSetSingleReferenceINTEL = 5748, OpSubgroupAvcImeSetDualReferenceINTEL = 5749, OpSubgroupAvcImeRefWindowSizeINTEL = 5750, OpSubgroupAvcImeAdjustRefOffsetINTEL = 5751, OpSubgroupAvcImeConvertToMcePayloadINTEL = 5752, OpSubgroupAvcImeSetMaxMotionVectorCountINTEL = 5753, OpSubgroupAvcImeSetUnidirectionalMixDisableINTEL = 5754, OpSubgroupAvcImeSetEarlySearchTerminationThresholdINTEL = 5755, OpSubgroupAvcImeSetWeightedSadINTEL = 5756, OpSubgroupAvcImeEvaluateWithSingleReferenceINTEL = 5757, OpSubgroupAvcImeEvaluateWithDualReferenceINTEL = 5758, OpSubgroupAvcImeEvaluateWithSingleReferenceStreaminINTEL = 5759, OpSubgroupAvcImeEvaluateWithDualReferenceStreaminINTEL = 5760, OpSubgroupAvcImeEvaluateWithSingleReferenceStreamoutINTEL = 5761, OpSubgroupAvcImeEvaluateWithDualReferenceStreamoutINTEL = 5762, OpSubgroupAvcImeEvaluateWithSingleReferenceStreaminoutINTEL = 5763, OpSubgroupAvcImeEvaluateWithDualReferenceStreaminoutINTEL = 5764, OpSubgroupAvcImeConvertToMceResultINTEL = 5765, OpSubgroupAvcImeGetSingleReferenceStreaminINTEL = 5766, OpSubgroupAvcImeGetDualReferenceStreaminINTEL = 5767, OpSubgroupAvcImeStripSingleReferenceStreamoutINTEL = 5768, OpSubgroupAvcImeStripDualReferenceStreamoutINTEL = 5769, OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeMotionVectorsINTEL = 5770, OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeDistortionsINTEL = 5771, OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeReferenceIdsINTEL = 5772, OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeMotionVectorsINTEL = 5773, OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeDistortionsINTEL = 5774, OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeReferenceIdsINTEL = 5775, OpSubgroupAvcImeGetBorderReachedINTEL = 5776, OpSubgroupAvcImeGetTruncatedSearchIndicationINTEL = 5777, OpSubgroupAvcImeGetUnidirectionalEarlySearchTerminationINTEL = 5778, OpSubgroupAvcImeGetWeightingPatternMinimumMotionVectorINTEL = 5779, OpSubgroupAvcImeGetWeightingPatternMinimumDistortionINTEL = 5780, OpSubgroupAvcFmeInitializeINTEL = 5781, OpSubgroupAvcBmeInitializeINTEL = 5782, OpSubgroupAvcRefConvertToMcePayloadINTEL = 5783, OpSubgroupAvcRefSetBidirectionalMixDisableINTEL = 5784, OpSubgroupAvcRefSetBilinearFilterEnableINTEL = 5785, OpSubgroupAvcRefEvaluateWithSingleReferenceINTEL = 5786, OpSubgroupAvcRefEvaluateWithDualReferenceINTEL = 5787, OpSubgroupAvcRefEvaluateWithMultiReferenceINTEL = 5788, OpSubgroupAvcRefEvaluateWithMultiReferenceInterlacedINTEL = 5789, OpSubgroupAvcRefConvertToMceResultINTEL = 5790, OpSubgroupAvcSicInitializeINTEL = 5791, OpSubgroupAvcSicConfigureSkcINTEL = 5792, OpSubgroupAvcSicConfigureIpeLumaINTEL = 5793, OpSubgroupAvcSicConfigureIpeLumaChromaINTEL = 5794, OpSubgroupAvcSicGetMotionVectorMaskINTEL = 5795, OpSubgroupAvcSicConvertToMcePayloadINTEL = 5796, OpSubgroupAvcSicSetIntraLumaShapePenaltyINTEL = 5797, OpSubgroupAvcSicSetIntraLumaModeCostFunctionINTEL = 5798, OpSubgroupAvcSicSetIntraChromaModeCostFunctionINTEL = 5799, OpSubgroupAvcSicSetBilinearFilterEnableINTEL = 5800, OpSubgroupAvcSicSetSkcForwardTransformEnableINTEL = 5801, OpSubgroupAvcSicSetBlockBasedRawSkipSadINTEL = 5802, OpSubgroupAvcSicEvaluateIpeINTEL = 5803, OpSubgroupAvcSicEvaluateWithSingleReferenceINTEL = 5804, OpSubgroupAvcSicEvaluateWithDualReferenceINTEL = 5805, OpSubgroupAvcSicEvaluateWithMultiReferenceINTEL = 5806, OpSubgroupAvcSicEvaluateWithMultiReferenceInterlacedINTEL = 5807, OpSubgroupAvcSicConvertToMceResultINTEL = 5808, OpSubgroupAvcSicGetIpeLumaShapeINTEL = 5809, OpSubgroupAvcSicGetBestIpeLumaDistortionINTEL = 5810, OpSubgroupAvcSicGetBestIpeChromaDistortionINTEL = 5811, OpSubgroupAvcSicGetPackedIpeLumaModesINTEL = 5812, OpSubgroupAvcSicGetIpeChromaModeINTEL = 5813, OpSubgroupAvcSicGetPackedSkcLumaCountThresholdINTEL = 5814, OpSubgroupAvcSicGetPackedSkcLumaSumThresholdINTEL = 5815, OpSubgroupAvcSicGetInterRawSadsINTEL = 5816, OpVariableLengthArrayINTEL = 5818, OpSaveMemoryINTEL = 5819, OpRestoreMemoryINTEL = 5820, OpArbitraryFloatSinCosPiINTEL = 5840, OpArbitraryFloatCastINTEL = 5841, OpArbitraryFloatCastFromIntINTEL = 5842, OpArbitraryFloatCastToIntINTEL = 5843, OpArbitraryFloatAddINTEL = 5846, OpArbitraryFloatSubINTEL = 5847, OpArbitraryFloatMulINTEL = 5848, OpArbitraryFloatDivINTEL = 5849, OpArbitraryFloatGTINTEL = 5850, OpArbitraryFloatGEINTEL = 5851, OpArbitraryFloatLTINTEL = 5852, OpArbitraryFloatLEINTEL = 5853, OpArbitraryFloatEQINTEL = 5854, OpArbitraryFloatRecipINTEL = 5855, OpArbitraryFloatRSqrtINTEL = 5856, OpArbitraryFloatCbrtINTEL = 5857, OpArbitraryFloatHypotINTEL = 5858, OpArbitraryFloatSqrtINTEL = 5859, OpArbitraryFloatLogINTEL = 5860, OpArbitraryFloatLog2INTEL = 5861, OpArbitraryFloatLog10INTEL = 5862, OpArbitraryFloatLog1pINTEL = 5863, OpArbitraryFloatExpINTEL = 5864, OpArbitraryFloatExp2INTEL = 5865, OpArbitraryFloatExp10INTEL = 5866, OpArbitraryFloatExpm1INTEL = 5867, OpArbitraryFloatSinINTEL = 5868, OpArbitraryFloatCosINTEL = 5869, OpArbitraryFloatSinCosINTEL = 5870, OpArbitraryFloatSinPiINTEL = 5871, OpArbitraryFloatCosPiINTEL = 5872, OpArbitraryFloatASinINTEL = 5873, OpArbitraryFloatASinPiINTEL = 5874, OpArbitraryFloatACosINTEL = 5875, OpArbitraryFloatACosPiINTEL = 5876, OpArbitraryFloatATanINTEL = 5877, OpArbitraryFloatATanPiINTEL = 5878, OpArbitraryFloatATan2INTEL = 5879, OpArbitraryFloatPowINTEL = 5880, OpArbitraryFloatPowRINTEL = 5881, OpArbitraryFloatPowNINTEL = 5882, OpLoopControlINTEL = 5887, OpAliasDomainDeclINTEL = 5911, OpAliasScopeDeclINTEL = 5912, OpAliasScopeListDeclINTEL = 5913, OpFixedSqrtINTEL = 5923, OpFixedRecipINTEL = 5924, OpFixedRsqrtINTEL = 5925, OpFixedSinINTEL = 5926, OpFixedCosINTEL = 5927, OpFixedSinCosINTEL = 5928, OpFixedSinPiINTEL = 5929, OpFixedCosPiINTEL = 5930, OpFixedSinCosPiINTEL = 5931, OpFixedLogINTEL = 5932, OpFixedExpINTEL = 5933, OpPtrCastToCrossWorkgroupINTEL = 5934, OpCrossWorkgroupCastToPtrINTEL = 5938, OpReadPipeBlockingINTEL = 5946, OpWritePipeBlockingINTEL = 5947, OpFPGARegINTEL = 5949, OpRayQueryGetRayTMinKHR = 6016, OpRayQueryGetRayFlagsKHR = 6017, OpRayQueryGetIntersectionTKHR = 6018, OpRayQueryGetIntersectionInstanceCustomIndexKHR = 6019, OpRayQueryGetIntersectionInstanceIdKHR = 6020, OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR = 6021, OpRayQueryGetIntersectionGeometryIndexKHR = 6022, OpRayQueryGetIntersectionPrimitiveIndexKHR = 6023, OpRayQueryGetIntersectionBarycentricsKHR = 6024, OpRayQueryGetIntersectionFrontFaceKHR = 6025, OpRayQueryGetIntersectionCandidateAABBOpaqueKHR = 6026, OpRayQueryGetIntersectionObjectRayDirectionKHR = 6027, OpRayQueryGetIntersectionObjectRayOriginKHR = 6028, OpRayQueryGetWorldRayDirectionKHR = 6029, OpRayQueryGetWorldRayOriginKHR = 6030, OpRayQueryGetIntersectionObjectToWorldKHR = 6031, OpRayQueryGetIntersectionWorldToObjectKHR = 6032, OpAtomicFAddEXT = 6035, OpTypeBufferSurfaceINTEL = 6086, OpTypeStructContinuedINTEL = 6090, OpConstantCompositeContinuedINTEL = 6091, OpSpecConstantCompositeContinuedINTEL = 6092, OpControlBarrierArriveINTEL = 6142, OpControlBarrierWaitINTEL = 6143, OpGroupIMulKHR = 6401, OpGroupFMulKHR = 6402, OpGroupBitwiseAndKHR = 6403, OpGroupBitwiseOrKHR = 6404, OpGroupBitwiseXorKHR = 6405, OpGroupLogicalAndKHR = 6406, OpGroupLogicalOrKHR = 6407, OpGroupLogicalXorKHR = 6408, OpMax = 0x7fffffff, }; #ifdef SPV_ENABLE_UTILITY_CODE #ifndef __cplusplus #include #endif inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) { *hasResult = *hasResultType = false; switch (opcode) { default: /* unknown opcode */ break; case OpNop: *hasResult = false; *hasResultType = false; break; case OpUndef: *hasResult = true; *hasResultType = true; break; case OpSourceContinued: *hasResult = false; *hasResultType = false; break; case OpSource: *hasResult = false; *hasResultType = false; break; case OpSourceExtension: *hasResult = false; *hasResultType = false; break; case OpName: *hasResult = false; *hasResultType = false; break; case OpMemberName: *hasResult = false; *hasResultType = false; break; case OpString: *hasResult = true; *hasResultType = false; break; case OpLine: *hasResult = false; *hasResultType = false; break; case OpExtension: *hasResult = false; *hasResultType = false; break; case OpExtInstImport: *hasResult = true; *hasResultType = false; break; case OpExtInst: *hasResult = true; *hasResultType = true; break; case OpMemoryModel: *hasResult = false; *hasResultType = false; break; case OpEntryPoint: *hasResult = false; *hasResultType = false; break; case OpExecutionMode: *hasResult = false; *hasResultType = false; break; case OpCapability: *hasResult = false; *hasResultType = false; break; case OpTypeVoid: *hasResult = true; *hasResultType = false; break; case OpTypeBool: *hasResult = true; *hasResultType = false; break; case OpTypeInt: *hasResult = true; *hasResultType = false; break; case OpTypeFloat: *hasResult = true; *hasResultType = false; break; case OpTypeVector: *hasResult = true; *hasResultType = false; break; case OpTypeMatrix: *hasResult = true; *hasResultType = false; break; case OpTypeImage: *hasResult = true; *hasResultType = false; break; case OpTypeSampler: *hasResult = true; *hasResultType = false; break; case OpTypeSampledImage: *hasResult = true; *hasResultType = false; break; case OpTypeArray: *hasResult = true; *hasResultType = false; break; case OpTypeRuntimeArray: *hasResult = true; *hasResultType = false; break; case OpTypeStruct: *hasResult = true; *hasResultType = false; break; case OpTypeOpaque: *hasResult = true; *hasResultType = false; break; case OpTypePointer: *hasResult = true; *hasResultType = false; break; case OpTypeFunction: *hasResult = true; *hasResultType = false; break; case OpTypeEvent: *hasResult = true; *hasResultType = false; break; case OpTypeDeviceEvent: *hasResult = true; *hasResultType = false; break; case OpTypeReserveId: *hasResult = true; *hasResultType = false; break; case OpTypeQueue: *hasResult = true; *hasResultType = false; break; case OpTypePipe: *hasResult = true; *hasResultType = false; break; case OpTypeForwardPointer: *hasResult = false; *hasResultType = false; break; case OpConstantTrue: *hasResult = true; *hasResultType = true; break; case OpConstantFalse: *hasResult = true; *hasResultType = true; break; case OpConstant: *hasResult = true; *hasResultType = true; break; case OpConstantComposite: *hasResult = true; *hasResultType = true; break; case OpConstantSampler: *hasResult = true; *hasResultType = true; break; case OpConstantNull: *hasResult = true; *hasResultType = true; break; case OpSpecConstantTrue: *hasResult = true; *hasResultType = true; break; case OpSpecConstantFalse: *hasResult = true; *hasResultType = true; break; case OpSpecConstant: *hasResult = true; *hasResultType = true; break; case OpSpecConstantComposite: *hasResult = true; *hasResultType = true; break; case OpSpecConstantOp: *hasResult = true; *hasResultType = true; break; case OpFunction: *hasResult = true; *hasResultType = true; break; case OpFunctionParameter: *hasResult = true; *hasResultType = true; break; case OpFunctionEnd: *hasResult = false; *hasResultType = false; break; case OpFunctionCall: *hasResult = true; *hasResultType = true; break; case OpVariable: *hasResult = true; *hasResultType = true; break; case OpImageTexelPointer: *hasResult = true; *hasResultType = true; break; case OpLoad: *hasResult = true; *hasResultType = true; break; case OpStore: *hasResult = false; *hasResultType = false; break; case OpCopyMemory: *hasResult = false; *hasResultType = false; break; case OpCopyMemorySized: *hasResult = false; *hasResultType = false; break; case OpAccessChain: *hasResult = true; *hasResultType = true; break; case OpInBoundsAccessChain: *hasResult = true; *hasResultType = true; break; case OpPtrAccessChain: *hasResult = true; *hasResultType = true; break; case OpArrayLength: *hasResult = true; *hasResultType = true; break; case OpGenericPtrMemSemantics: *hasResult = true; *hasResultType = true; break; case OpInBoundsPtrAccessChain: *hasResult = true; *hasResultType = true; break; case OpDecorate: *hasResult = false; *hasResultType = false; break; case OpMemberDecorate: *hasResult = false; *hasResultType = false; break; case OpDecorationGroup: *hasResult = true; *hasResultType = false; break; case OpGroupDecorate: *hasResult = false; *hasResultType = false; break; case OpGroupMemberDecorate: *hasResult = false; *hasResultType = false; break; case OpVectorExtractDynamic: *hasResult = true; *hasResultType = true; break; case OpVectorInsertDynamic: *hasResult = true; *hasResultType = true; break; case OpVectorShuffle: *hasResult = true; *hasResultType = true; break; case OpCompositeConstruct: *hasResult = true; *hasResultType = true; break; case OpCompositeExtract: *hasResult = true; *hasResultType = true; break; case OpCompositeInsert: *hasResult = true; *hasResultType = true; break; case OpCopyObject: *hasResult = true; *hasResultType = true; break; case OpTranspose: *hasResult = true; *hasResultType = true; break; case OpSampledImage: *hasResult = true; *hasResultType = true; break; case OpImageSampleImplicitLod: *hasResult = true; *hasResultType = true; break; case OpImageSampleExplicitLod: *hasResult = true; *hasResultType = true; break; case OpImageSampleDrefImplicitLod: *hasResult = true; *hasResultType = true; break; case OpImageSampleDrefExplicitLod: *hasResult = true; *hasResultType = true; break; case OpImageSampleProjImplicitLod: *hasResult = true; *hasResultType = true; break; case OpImageSampleProjExplicitLod: *hasResult = true; *hasResultType = true; break; case OpImageSampleProjDrefImplicitLod: *hasResult = true; *hasResultType = true; break; case OpImageSampleProjDrefExplicitLod: *hasResult = true; *hasResultType = true; break; case OpImageFetch: *hasResult = true; *hasResultType = true; break; case OpImageGather: *hasResult = true; *hasResultType = true; break; case OpImageDrefGather: *hasResult = true; *hasResultType = true; break; case OpImageRead: *hasResult = true; *hasResultType = true; break; case OpImageWrite: *hasResult = false; *hasResultType = false; break; case OpImage: *hasResult = true; *hasResultType = true; break; case OpImageQueryFormat: *hasResult = true; *hasResultType = true; break; case OpImageQueryOrder: *hasResult = true; *hasResultType = true; break; case OpImageQuerySizeLod: *hasResult = true; *hasResultType = true; break; case OpImageQuerySize: *hasResult = true; *hasResultType = true; break; case OpImageQueryLod: *hasResult = true; *hasResultType = true; break; case OpImageQueryLevels: *hasResult = true; *hasResultType = true; break; case OpImageQuerySamples: *hasResult = true; *hasResultType = true; break; case OpConvertFToU: *hasResult = true; *hasResultType = true; break; case OpConvertFToS: *hasResult = true; *hasResultType = true; break; case OpConvertSToF: *hasResult = true; *hasResultType = true; break; case OpConvertUToF: *hasResult = true; *hasResultType = true; break; case OpUConvert: *hasResult = true; *hasResultType = true; break; case OpSConvert: *hasResult = true; *hasResultType = true; break; case OpFConvert: *hasResult = true; *hasResultType = true; break; case OpQuantizeToF16: *hasResult = true; *hasResultType = true; break; case OpConvertPtrToU: *hasResult = true; *hasResultType = true; break; case OpSatConvertSToU: *hasResult = true; *hasResultType = true; break; case OpSatConvertUToS: *hasResult = true; *hasResultType = true; break; case OpConvertUToPtr: *hasResult = true; *hasResultType = true; break; case OpPtrCastToGeneric: *hasResult = true; *hasResultType = true; break; case OpGenericCastToPtr: *hasResult = true; *hasResultType = true; break; case OpGenericCastToPtrExplicit: *hasResult = true; *hasResultType = true; break; case OpBitcast: *hasResult = true; *hasResultType = true; break; case OpSNegate: *hasResult = true; *hasResultType = true; break; case OpFNegate: *hasResult = true; *hasResultType = true; break; case OpIAdd: *hasResult = true; *hasResultType = true; break; case OpFAdd: *hasResult = true; *hasResultType = true; break; case OpISub: *hasResult = true; *hasResultType = true; break; case OpFSub: *hasResult = true; *hasResultType = true; break; case OpIMul: *hasResult = true; *hasResultType = true; break; case OpFMul: *hasResult = true; *hasResultType = true; break; case OpUDiv: *hasResult = true; *hasResultType = true; break; case OpSDiv: *hasResult = true; *hasResultType = true; break; case OpFDiv: *hasResult = true; *hasResultType = true; break; case OpUMod: *hasResult = true; *hasResultType = true; break; case OpSRem: *hasResult = true; *hasResultType = true; break; case OpSMod: *hasResult = true; *hasResultType = true; break; case OpFRem: *hasResult = true; *hasResultType = true; break; case OpFMod: *hasResult = true; *hasResultType = true; break; case OpVectorTimesScalar: *hasResult = true; *hasResultType = true; break; case OpMatrixTimesScalar: *hasResult = true; *hasResultType = true; break; case OpVectorTimesMatrix: *hasResult = true; *hasResultType = true; break; case OpMatrixTimesVector: *hasResult = true; *hasResultType = true; break; case OpMatrixTimesMatrix: *hasResult = true; *hasResultType = true; break; case OpOuterProduct: *hasResult = true; *hasResultType = true; break; case OpDot: *hasResult = true; *hasResultType = true; break; case OpIAddCarry: *hasResult = true; *hasResultType = true; break; case OpISubBorrow: *hasResult = true; *hasResultType = true; break; case OpUMulExtended: *hasResult = true; *hasResultType = true; break; case OpSMulExtended: *hasResult = true; *hasResultType = true; break; case OpAny: *hasResult = true; *hasResultType = true; break; case OpAll: *hasResult = true; *hasResultType = true; break; case OpIsNan: *hasResult = true; *hasResultType = true; break; case OpIsInf: *hasResult = true; *hasResultType = true; break; case OpIsFinite: *hasResult = true; *hasResultType = true; break; case OpIsNormal: *hasResult = true; *hasResultType = true; break; case OpSignBitSet: *hasResult = true; *hasResultType = true; break; case OpLessOrGreater: *hasResult = true; *hasResultType = true; break; case OpOrdered: *hasResult = true; *hasResultType = true; break; case OpUnordered: *hasResult = true; *hasResultType = true; break; case OpLogicalEqual: *hasResult = true; *hasResultType = true; break; case OpLogicalNotEqual: *hasResult = true; *hasResultType = true; break; case OpLogicalOr: *hasResult = true; *hasResultType = true; break; case OpLogicalAnd: *hasResult = true; *hasResultType = true; break; case OpLogicalNot: *hasResult = true; *hasResultType = true; break; case OpSelect: *hasResult = true; *hasResultType = true; break; case OpIEqual: *hasResult = true; *hasResultType = true; break; case OpINotEqual: *hasResult = true; *hasResultType = true; break; case OpUGreaterThan: *hasResult = true; *hasResultType = true; break; case OpSGreaterThan: *hasResult = true; *hasResultType = true; break; case OpUGreaterThanEqual: *hasResult = true; *hasResultType = true; break; case OpSGreaterThanEqual: *hasResult = true; *hasResultType = true; break; case OpULessThan: *hasResult = true; *hasResultType = true; break; case OpSLessThan: *hasResult = true; *hasResultType = true; break; case OpULessThanEqual: *hasResult = true; *hasResultType = true; break; case OpSLessThanEqual: *hasResult = true; *hasResultType = true; break; case OpFOrdEqual: *hasResult = true; *hasResultType = true; break; case OpFUnordEqual: *hasResult = true; *hasResultType = true; break; case OpFOrdNotEqual: *hasResult = true; *hasResultType = true; break; case OpFUnordNotEqual: *hasResult = true; *hasResultType = true; break; case OpFOrdLessThan: *hasResult = true; *hasResultType = true; break; case OpFUnordLessThan: *hasResult = true; *hasResultType = true; break; case OpFOrdGreaterThan: *hasResult = true; *hasResultType = true; break; case OpFUnordGreaterThan: *hasResult = true; *hasResultType = true; break; case OpFOrdLessThanEqual: *hasResult = true; *hasResultType = true; break; case OpFUnordLessThanEqual: *hasResult = true; *hasResultType = true; break; case OpFOrdGreaterThanEqual: *hasResult = true; *hasResultType = true; break; case OpFUnordGreaterThanEqual: *hasResult = true; *hasResultType = true; break; case OpShiftRightLogical: *hasResult = true; *hasResultType = true; break; case OpShiftRightArithmetic: *hasResult = true; *hasResultType = true; break; case OpShiftLeftLogical: *hasResult = true; *hasResultType = true; break; case OpBitwiseOr: *hasResult = true; *hasResultType = true; break; case OpBitwiseXor: *hasResult = true; *hasResultType = true; break; case OpBitwiseAnd: *hasResult = true; *hasResultType = true; break; case OpNot: *hasResult = true; *hasResultType = true; break; case OpBitFieldInsert: *hasResult = true; *hasResultType = true; break; case OpBitFieldSExtract: *hasResult = true; *hasResultType = true; break; case OpBitFieldUExtract: *hasResult = true; *hasResultType = true; break; case OpBitReverse: *hasResult = true; *hasResultType = true; break; case OpBitCount: *hasResult = true; *hasResultType = true; break; case OpDPdx: *hasResult = true; *hasResultType = true; break; case OpDPdy: *hasResult = true; *hasResultType = true; break; case OpFwidth: *hasResult = true; *hasResultType = true; break; case OpDPdxFine: *hasResult = true; *hasResultType = true; break; case OpDPdyFine: *hasResult = true; *hasResultType = true; break; case OpFwidthFine: *hasResult = true; *hasResultType = true; break; case OpDPdxCoarse: *hasResult = true; *hasResultType = true; break; case OpDPdyCoarse: *hasResult = true; *hasResultType = true; break; case OpFwidthCoarse: *hasResult = true; *hasResultType = true; break; case OpEmitVertex: *hasResult = false; *hasResultType = false; break; case OpEndPrimitive: *hasResult = false; *hasResultType = false; break; case OpEmitStreamVertex: *hasResult = false; *hasResultType = false; break; case OpEndStreamPrimitive: *hasResult = false; *hasResultType = false; break; case OpControlBarrier: *hasResult = false; *hasResultType = false; break; case OpMemoryBarrier: *hasResult = false; *hasResultType = false; break; case OpAtomicLoad: *hasResult = true; *hasResultType = true; break; case OpAtomicStore: *hasResult = false; *hasResultType = false; break; case OpAtomicExchange: *hasResult = true; *hasResultType = true; break; case OpAtomicCompareExchange: *hasResult = true; *hasResultType = true; break; case OpAtomicCompareExchangeWeak: *hasResult = true; *hasResultType = true; break; case OpAtomicIIncrement: *hasResult = true; *hasResultType = true; break; case OpAtomicIDecrement: *hasResult = true; *hasResultType = true; break; case OpAtomicIAdd: *hasResult = true; *hasResultType = true; break; case OpAtomicISub: *hasResult = true; *hasResultType = true; break; case OpAtomicSMin: *hasResult = true; *hasResultType = true; break; case OpAtomicUMin: *hasResult = true; *hasResultType = true; break; case OpAtomicSMax: *hasResult = true; *hasResultType = true; break; case OpAtomicUMax: *hasResult = true; *hasResultType = true; break; case OpAtomicAnd: *hasResult = true; *hasResultType = true; break; case OpAtomicOr: *hasResult = true; *hasResultType = true; break; case OpAtomicXor: *hasResult = true; *hasResultType = true; break; case OpPhi: *hasResult = true; *hasResultType = true; break; case OpLoopMerge: *hasResult = false; *hasResultType = false; break; case OpSelectionMerge: *hasResult = false; *hasResultType = false; break; case OpLabel: *hasResult = true; *hasResultType = false; break; case OpBranch: *hasResult = false; *hasResultType = false; break; case OpBranchConditional: *hasResult = false; *hasResultType = false; break; case OpSwitch: *hasResult = false; *hasResultType = false; break; case OpKill: *hasResult = false; *hasResultType = false; break; case OpReturn: *hasResult = false; *hasResultType = false; break; case OpReturnValue: *hasResult = false; *hasResultType = false; break; case OpUnreachable: *hasResult = false; *hasResultType = false; break; case OpLifetimeStart: *hasResult = false; *hasResultType = false; break; case OpLifetimeStop: *hasResult = false; *hasResultType = false; break; case OpGroupAsyncCopy: *hasResult = true; *hasResultType = true; break; case OpGroupWaitEvents: *hasResult = false; *hasResultType = false; break; case OpGroupAll: *hasResult = true; *hasResultType = true; break; case OpGroupAny: *hasResult = true; *hasResultType = true; break; case OpGroupBroadcast: *hasResult = true; *hasResultType = true; break; case OpGroupIAdd: *hasResult = true; *hasResultType = true; break; case OpGroupFAdd: *hasResult = true; *hasResultType = true; break; case OpGroupFMin: *hasResult = true; *hasResultType = true; break; case OpGroupUMin: *hasResult = true; *hasResultType = true; break; case OpGroupSMin: *hasResult = true; *hasResultType = true; break; case OpGroupFMax: *hasResult = true; *hasResultType = true; break; case OpGroupUMax: *hasResult = true; *hasResultType = true; break; case OpGroupSMax: *hasResult = true; *hasResultType = true; break; case OpReadPipe: *hasResult = true; *hasResultType = true; break; case OpWritePipe: *hasResult = true; *hasResultType = true; break; case OpReservedReadPipe: *hasResult = true; *hasResultType = true; break; case OpReservedWritePipe: *hasResult = true; *hasResultType = true; break; case OpReserveReadPipePackets: *hasResult = true; *hasResultType = true; break; case OpReserveWritePipePackets: *hasResult = true; *hasResultType = true; break; case OpCommitReadPipe: *hasResult = false; *hasResultType = false; break; case OpCommitWritePipe: *hasResult = false; *hasResultType = false; break; case OpIsValidReserveId: *hasResult = true; *hasResultType = true; break; case OpGetNumPipePackets: *hasResult = true; *hasResultType = true; break; case OpGetMaxPipePackets: *hasResult = true; *hasResultType = true; break; case OpGroupReserveReadPipePackets: *hasResult = true; *hasResultType = true; break; case OpGroupReserveWritePipePackets: *hasResult = true; *hasResultType = true; break; case OpGroupCommitReadPipe: *hasResult = false; *hasResultType = false; break; case OpGroupCommitWritePipe: *hasResult = false; *hasResultType = false; break; case OpEnqueueMarker: *hasResult = true; *hasResultType = true; break; case OpEnqueueKernel: *hasResult = true; *hasResultType = true; break; case OpGetKernelNDrangeSubGroupCount: *hasResult = true; *hasResultType = true; break; case OpGetKernelNDrangeMaxSubGroupSize: *hasResult = true; *hasResultType = true; break; case OpGetKernelWorkGroupSize: *hasResult = true; *hasResultType = true; break; case OpGetKernelPreferredWorkGroupSizeMultiple: *hasResult = true; *hasResultType = true; break; case OpRetainEvent: *hasResult = false; *hasResultType = false; break; case OpReleaseEvent: *hasResult = false; *hasResultType = false; break; case OpCreateUserEvent: *hasResult = true; *hasResultType = true; break; case OpIsValidEvent: *hasResult = true; *hasResultType = true; break; case OpSetUserEventStatus: *hasResult = false; *hasResultType = false; break; case OpCaptureEventProfilingInfo: *hasResult = false; *hasResultType = false; break; case OpGetDefaultQueue: *hasResult = true; *hasResultType = true; break; case OpBuildNDRange: *hasResult = true; *hasResultType = true; break; case OpImageSparseSampleImplicitLod: *hasResult = true; *hasResultType = true; break; case OpImageSparseSampleExplicitLod: *hasResult = true; *hasResultType = true; break; case OpImageSparseSampleDrefImplicitLod: *hasResult = true; *hasResultType = true; break; case OpImageSparseSampleDrefExplicitLod: *hasResult = true; *hasResultType = true; break; case OpImageSparseSampleProjImplicitLod: *hasResult = true; *hasResultType = true; break; case OpImageSparseSampleProjExplicitLod: *hasResult = true; *hasResultType = true; break; case OpImageSparseSampleProjDrefImplicitLod: *hasResult = true; *hasResultType = true; break; case OpImageSparseSampleProjDrefExplicitLod: *hasResult = true; *hasResultType = true; break; case OpImageSparseFetch: *hasResult = true; *hasResultType = true; break; case OpImageSparseGather: *hasResult = true; *hasResultType = true; break; case OpImageSparseDrefGather: *hasResult = true; *hasResultType = true; break; case OpImageSparseTexelsResident: *hasResult = true; *hasResultType = true; break; case OpNoLine: *hasResult = false; *hasResultType = false; break; case OpAtomicFlagTestAndSet: *hasResult = true; *hasResultType = true; break; case OpAtomicFlagClear: *hasResult = false; *hasResultType = false; break; case OpImageSparseRead: *hasResult = true; *hasResultType = true; break; case OpSizeOf: *hasResult = true; *hasResultType = true; break; case OpTypePipeStorage: *hasResult = true; *hasResultType = false; break; case OpConstantPipeStorage: *hasResult = true; *hasResultType = true; break; case OpCreatePipeFromPipeStorage: *hasResult = true; *hasResultType = true; break; case OpGetKernelLocalSizeForSubgroupCount: *hasResult = true; *hasResultType = true; break; case OpGetKernelMaxNumSubgroups: *hasResult = true; *hasResultType = true; break; case OpTypeNamedBarrier: *hasResult = true; *hasResultType = false; break; case OpNamedBarrierInitialize: *hasResult = true; *hasResultType = true; break; case OpMemoryNamedBarrier: *hasResult = false; *hasResultType = false; break; case OpModuleProcessed: *hasResult = false; *hasResultType = false; break; case OpExecutionModeId: *hasResult = false; *hasResultType = false; break; case OpDecorateId: *hasResult = false; *hasResultType = false; break; case OpGroupNonUniformElect: *hasResult = true; *hasResultType = true; break; case OpGroupNonUniformAll: *hasResult = true; *hasResultType = true; break; case OpGroupNonUniformAny: *hasResult = true; *hasResultType = true; break; case OpGroupNonUniformAllEqual: *hasResult = true; *hasResultType = true; break; case OpGroupNonUniformBroadcast: *hasResult = true; *hasResultType = true; break; case OpGroupNonUniformBroadcastFirst: *hasResult = true; *hasResultType = true; break; case OpGroupNonUniformBallot: *hasResult = true; *hasResultType = true; break; case OpGroupNonUniformInverseBallot: *hasResult = true; *hasResultType = true; break; case OpGroupNonUniformBallotBitExtract: *hasResult = true; *hasResultType = true; break; case OpGroupNonUniformBallotBitCount: *hasResult = true; *hasResultType = true; break; case OpGroupNonUniformBallotFindLSB: *hasResult = true; *hasResultType = true; break; case OpGroupNonUniformBallotFindMSB: *hasResult = true; *hasResultType = true; break; case OpGroupNonUniformShuffle: *hasResult = true; *hasResultType = true; break; case OpGroupNonUniformShuffleXor: *hasResult = true; *hasResultType = true; break; case OpGroupNonUniformShuffleUp: *hasResult = true; *hasResultType = true; break; case OpGroupNonUniformShuffleDown: *hasResult = true; *hasResultType = true; break; case OpGroupNonUniformIAdd: *hasResult = true; *hasResultType = true; break; case OpGroupNonUniformFAdd: *hasResult = true; *hasResultType = true; break; case OpGroupNonUniformIMul: *hasResult = true; *hasResultType = true; break; case OpGroupNonUniformFMul: *hasResult = true; *hasResultType = true; break; case OpGroupNonUniformSMin: *hasResult = true; *hasResultType = true; break; case OpGroupNonUniformUMin: *hasResult = true; *hasResultType = true; break; case OpGroupNonUniformFMin: *hasResult = true; *hasResultType = true; break; case OpGroupNonUniformSMax: *hasResult = true; *hasResultType = true; break; case OpGroupNonUniformUMax: *hasResult = true; *hasResultType = true; break; case OpGroupNonUniformFMax: *hasResult = true; *hasResultType = true; break; case OpGroupNonUniformBitwiseAnd: *hasResult = true; *hasResultType = true; break; case OpGroupNonUniformBitwiseOr: *hasResult = true; *hasResultType = true; break; case OpGroupNonUniformBitwiseXor: *hasResult = true; *hasResultType = true; break; case OpGroupNonUniformLogicalAnd: *hasResult = true; *hasResultType = true; break; case OpGroupNonUniformLogicalOr: *hasResult = true; *hasResultType = true; break; case OpGroupNonUniformLogicalXor: *hasResult = true; *hasResultType = true; break; case OpGroupNonUniformQuadBroadcast: *hasResult = true; *hasResultType = true; break; case OpGroupNonUniformQuadSwap: *hasResult = true; *hasResultType = true; break; case OpCopyLogical: *hasResult = true; *hasResultType = true; break; case OpPtrEqual: *hasResult = true; *hasResultType = true; break; case OpPtrNotEqual: *hasResult = true; *hasResultType = true; break; case OpPtrDiff: *hasResult = true; *hasResultType = true; break; case OpTerminateInvocation: *hasResult = false; *hasResultType = false; break; case OpSubgroupBallotKHR: *hasResult = true; *hasResultType = true; break; case OpSubgroupFirstInvocationKHR: *hasResult = true; *hasResultType = true; break; case OpSubgroupAllKHR: *hasResult = true; *hasResultType = true; break; case OpSubgroupAnyKHR: *hasResult = true; *hasResultType = true; break; case OpSubgroupAllEqualKHR: *hasResult = true; *hasResultType = true; break; case OpGroupNonUniformRotateKHR: *hasResult = true; *hasResultType = true; break; case OpSubgroupReadInvocationKHR: *hasResult = true; *hasResultType = true; break; case OpTraceRayKHR: *hasResult = false; *hasResultType = false; break; case OpExecuteCallableKHR: *hasResult = false; *hasResultType = false; break; case OpConvertUToAccelerationStructureKHR: *hasResult = true; *hasResultType = true; break; case OpIgnoreIntersectionKHR: *hasResult = false; *hasResultType = false; break; case OpTerminateRayKHR: *hasResult = false; *hasResultType = false; break; case OpSDot: *hasResult = true; *hasResultType = true; break; case OpUDot: *hasResult = true; *hasResultType = true; break; case OpSUDot: *hasResult = true; *hasResultType = true; break; case OpSDotAccSat: *hasResult = true; *hasResultType = true; break; case OpUDotAccSat: *hasResult = true; *hasResultType = true; break; case OpSUDotAccSat: *hasResult = true; *hasResultType = true; break; case OpTypeRayQueryKHR: *hasResult = true; *hasResultType = false; break; case OpRayQueryInitializeKHR: *hasResult = false; *hasResultType = false; break; case OpRayQueryTerminateKHR: *hasResult = false; *hasResultType = false; break; case OpRayQueryGenerateIntersectionKHR: *hasResult = false; *hasResultType = false; break; case OpRayQueryConfirmIntersectionKHR: *hasResult = false; *hasResultType = false; break; case OpRayQueryProceedKHR: *hasResult = true; *hasResultType = true; break; case OpRayQueryGetIntersectionTypeKHR: *hasResult = true; *hasResultType = true; break; case OpGroupIAddNonUniformAMD: *hasResult = true; *hasResultType = true; break; case OpGroupFAddNonUniformAMD: *hasResult = true; *hasResultType = true; break; case OpGroupFMinNonUniformAMD: *hasResult = true; *hasResultType = true; break; case OpGroupUMinNonUniformAMD: *hasResult = true; *hasResultType = true; break; case OpGroupSMinNonUniformAMD: *hasResult = true; *hasResultType = true; break; case OpGroupFMaxNonUniformAMD: *hasResult = true; *hasResultType = true; break; case OpGroupUMaxNonUniformAMD: *hasResult = true; *hasResultType = true; break; case OpGroupSMaxNonUniformAMD: *hasResult = true; *hasResultType = true; break; case OpFragmentMaskFetchAMD: *hasResult = true; *hasResultType = true; break; case OpFragmentFetchAMD: *hasResult = true; *hasResultType = true; break; case OpReadClockKHR: *hasResult = true; *hasResultType = true; break; case OpImageSampleFootprintNV: *hasResult = true; *hasResultType = true; break; case OpEmitMeshTasksEXT: *hasResult = false; *hasResultType = false; break; case OpSetMeshOutputsEXT: *hasResult = false; *hasResultType = false; break; case OpGroupNonUniformPartitionNV: *hasResult = true; *hasResultType = true; break; case OpWritePackedPrimitiveIndices4x8NV: *hasResult = false; *hasResultType = false; break; case OpReportIntersectionNV: *hasResult = true; *hasResultType = true; break; case OpIgnoreIntersectionNV: *hasResult = false; *hasResultType = false; break; case OpTerminateRayNV: *hasResult = false; *hasResultType = false; break; case OpTraceNV: *hasResult = false; *hasResultType = false; break; case OpTraceMotionNV: *hasResult = false; *hasResultType = false; break; case OpTraceRayMotionNV: *hasResult = false; *hasResultType = false; break; case OpTypeAccelerationStructureNV: *hasResult = true; *hasResultType = false; break; case OpExecuteCallableNV: *hasResult = false; *hasResultType = false; break; case OpTypeCooperativeMatrixNV: *hasResult = true; *hasResultType = false; break; case OpCooperativeMatrixLoadNV: *hasResult = true; *hasResultType = true; break; case OpCooperativeMatrixStoreNV: *hasResult = false; *hasResultType = false; break; case OpCooperativeMatrixMulAddNV: *hasResult = true; *hasResultType = true; break; case OpCooperativeMatrixLengthNV: *hasResult = true; *hasResultType = true; break; case OpBeginInvocationInterlockEXT: *hasResult = false; *hasResultType = false; break; case OpEndInvocationInterlockEXT: *hasResult = false; *hasResultType = false; break; case OpDemoteToHelperInvocation: *hasResult = false; *hasResultType = false; break; case OpIsHelperInvocationEXT: *hasResult = true; *hasResultType = true; break; case OpConvertUToImageNV: *hasResult = true; *hasResultType = true; break; case OpConvertUToSamplerNV: *hasResult = true; *hasResultType = true; break; case OpConvertImageToUNV: *hasResult = true; *hasResultType = true; break; case OpConvertSamplerToUNV: *hasResult = true; *hasResultType = true; break; case OpConvertUToSampledImageNV: *hasResult = true; *hasResultType = true; break; case OpConvertSampledImageToUNV: *hasResult = true; *hasResultType = true; break; case OpSamplerImageAddressingModeNV: *hasResult = false; *hasResultType = false; break; case OpSubgroupShuffleINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupShuffleDownINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupShuffleUpINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupShuffleXorINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupBlockReadINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupBlockWriteINTEL: *hasResult = false; *hasResultType = false; break; case OpSubgroupImageBlockReadINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupImageBlockWriteINTEL: *hasResult = false; *hasResultType = false; break; case OpSubgroupImageMediaBlockReadINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupImageMediaBlockWriteINTEL: *hasResult = false; *hasResultType = false; break; case OpUCountLeadingZerosINTEL: *hasResult = true; *hasResultType = true; break; case OpUCountTrailingZerosINTEL: *hasResult = true; *hasResultType = true; break; case OpAbsISubINTEL: *hasResult = true; *hasResultType = true; break; case OpAbsUSubINTEL: *hasResult = true; *hasResultType = true; break; case OpIAddSatINTEL: *hasResult = true; *hasResultType = true; break; case OpUAddSatINTEL: *hasResult = true; *hasResultType = true; break; case OpIAverageINTEL: *hasResult = true; *hasResultType = true; break; case OpUAverageINTEL: *hasResult = true; *hasResultType = true; break; case OpIAverageRoundedINTEL: *hasResult = true; *hasResultType = true; break; case OpUAverageRoundedINTEL: *hasResult = true; *hasResultType = true; break; case OpISubSatINTEL: *hasResult = true; *hasResultType = true; break; case OpUSubSatINTEL: *hasResult = true; *hasResultType = true; break; case OpIMul32x16INTEL: *hasResult = true; *hasResultType = true; break; case OpUMul32x16INTEL: *hasResult = true; *hasResultType = true; break; case OpConstantFunctionPointerINTEL: *hasResult = true; *hasResultType = true; break; case OpFunctionPointerCallINTEL: *hasResult = true; *hasResultType = true; break; case OpAsmTargetINTEL: *hasResult = true; *hasResultType = true; break; case OpAsmINTEL: *hasResult = true; *hasResultType = true; break; case OpAsmCallINTEL: *hasResult = true; *hasResultType = true; break; case OpAtomicFMinEXT: *hasResult = true; *hasResultType = true; break; case OpAtomicFMaxEXT: *hasResult = true; *hasResultType = true; break; case OpAssumeTrueKHR: *hasResult = false; *hasResultType = false; break; case OpExpectKHR: *hasResult = true; *hasResultType = true; break; case OpDecorateString: *hasResult = false; *hasResultType = false; break; case OpMemberDecorateString: *hasResult = false; *hasResultType = false; break; case OpVmeImageINTEL: *hasResult = true; *hasResultType = true; break; case OpTypeVmeImageINTEL: *hasResult = true; *hasResultType = false; break; case OpTypeAvcImePayloadINTEL: *hasResult = true; *hasResultType = false; break; case OpTypeAvcRefPayloadINTEL: *hasResult = true; *hasResultType = false; break; case OpTypeAvcSicPayloadINTEL: *hasResult = true; *hasResultType = false; break; case OpTypeAvcMcePayloadINTEL: *hasResult = true; *hasResultType = false; break; case OpTypeAvcMceResultINTEL: *hasResult = true; *hasResultType = false; break; case OpTypeAvcImeResultINTEL: *hasResult = true; *hasResultType = false; break; case OpTypeAvcImeResultSingleReferenceStreamoutINTEL: *hasResult = true; *hasResultType = false; break; case OpTypeAvcImeResultDualReferenceStreamoutINTEL: *hasResult = true; *hasResultType = false; break; case OpTypeAvcImeSingleReferenceStreaminINTEL: *hasResult = true; *hasResultType = false; break; case OpTypeAvcImeDualReferenceStreaminINTEL: *hasResult = true; *hasResultType = false; break; case OpTypeAvcRefResultINTEL: *hasResult = true; *hasResultType = false; break; case OpTypeAvcSicResultINTEL: *hasResult = true; *hasResultType = false; break; case OpSubgroupAvcMceGetDefaultInterBaseMultiReferencePenaltyINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcMceSetInterBaseMultiReferencePenaltyINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcMceGetDefaultInterShapePenaltyINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcMceSetInterShapePenaltyINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcMceGetDefaultInterDirectionPenaltyINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcMceSetInterDirectionPenaltyINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcMceGetDefaultIntraLumaShapePenaltyINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcMceGetDefaultInterMotionVectorCostTableINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcMceGetDefaultHighPenaltyCostTableINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcMceGetDefaultMediumPenaltyCostTableINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcMceGetDefaultLowPenaltyCostTableINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcMceSetMotionVectorCostFunctionINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcMceGetDefaultIntraLumaModePenaltyINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcMceGetDefaultNonDcLumaIntraPenaltyINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcMceGetDefaultIntraChromaModeBasePenaltyINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcMceSetAcOnlyHaarINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcMceSetSourceInterlacedFieldPolarityINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcMceSetSingleReferenceInterlacedFieldPolarityINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcMceSetDualReferenceInterlacedFieldPolaritiesINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcMceConvertToImePayloadINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcMceConvertToImeResultINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcMceConvertToRefPayloadINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcMceConvertToRefResultINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcMceConvertToSicPayloadINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcMceConvertToSicResultINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcMceGetMotionVectorsINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcMceGetInterDistortionsINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcMceGetBestInterDistortionsINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcMceGetInterMajorShapeINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcMceGetInterMinorShapeINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcMceGetInterDirectionsINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcMceGetInterMotionVectorCountINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcMceGetInterReferenceIdsINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcMceGetInterReferenceInterlacedFieldPolaritiesINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcImeInitializeINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcImeSetSingleReferenceINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcImeSetDualReferenceINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcImeRefWindowSizeINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcImeAdjustRefOffsetINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcImeConvertToMcePayloadINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcImeSetMaxMotionVectorCountINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcImeSetUnidirectionalMixDisableINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcImeSetEarlySearchTerminationThresholdINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcImeSetWeightedSadINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcImeEvaluateWithSingleReferenceINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcImeEvaluateWithDualReferenceINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcImeEvaluateWithSingleReferenceStreaminINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcImeEvaluateWithDualReferenceStreaminINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcImeEvaluateWithSingleReferenceStreamoutINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcImeEvaluateWithDualReferenceStreamoutINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcImeEvaluateWithSingleReferenceStreaminoutINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcImeEvaluateWithDualReferenceStreaminoutINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcImeConvertToMceResultINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcImeGetSingleReferenceStreaminINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcImeGetDualReferenceStreaminINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcImeStripSingleReferenceStreamoutINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcImeStripDualReferenceStreamoutINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeMotionVectorsINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeDistortionsINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeReferenceIdsINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeMotionVectorsINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeDistortionsINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeReferenceIdsINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcImeGetBorderReachedINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcImeGetTruncatedSearchIndicationINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcImeGetUnidirectionalEarlySearchTerminationINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcImeGetWeightingPatternMinimumMotionVectorINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcImeGetWeightingPatternMinimumDistortionINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcFmeInitializeINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcBmeInitializeINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcRefConvertToMcePayloadINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcRefSetBidirectionalMixDisableINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcRefSetBilinearFilterEnableINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcRefEvaluateWithSingleReferenceINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcRefEvaluateWithDualReferenceINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcRefEvaluateWithMultiReferenceINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcRefEvaluateWithMultiReferenceInterlacedINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcRefConvertToMceResultINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcSicInitializeINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcSicConfigureSkcINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcSicConfigureIpeLumaINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcSicConfigureIpeLumaChromaINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcSicGetMotionVectorMaskINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcSicConvertToMcePayloadINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcSicSetIntraLumaShapePenaltyINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcSicSetIntraLumaModeCostFunctionINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcSicSetIntraChromaModeCostFunctionINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcSicSetBilinearFilterEnableINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcSicSetSkcForwardTransformEnableINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcSicSetBlockBasedRawSkipSadINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcSicEvaluateIpeINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcSicEvaluateWithSingleReferenceINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcSicEvaluateWithDualReferenceINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcSicEvaluateWithMultiReferenceINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcSicEvaluateWithMultiReferenceInterlacedINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcSicConvertToMceResultINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcSicGetIpeLumaShapeINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcSicGetBestIpeLumaDistortionINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcSicGetBestIpeChromaDistortionINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcSicGetPackedIpeLumaModesINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcSicGetIpeChromaModeINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcSicGetPackedSkcLumaCountThresholdINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcSicGetPackedSkcLumaSumThresholdINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupAvcSicGetInterRawSadsINTEL: *hasResult = true; *hasResultType = true; break; case OpVariableLengthArrayINTEL: *hasResult = true; *hasResultType = true; break; case OpSaveMemoryINTEL: *hasResult = true; *hasResultType = true; break; case OpRestoreMemoryINTEL: *hasResult = false; *hasResultType = false; break; case OpArbitraryFloatSinCosPiINTEL: *hasResult = true; *hasResultType = true; break; case OpArbitraryFloatCastINTEL: *hasResult = true; *hasResultType = true; break; case OpArbitraryFloatCastFromIntINTEL: *hasResult = true; *hasResultType = true; break; case OpArbitraryFloatCastToIntINTEL: *hasResult = true; *hasResultType = true; break; case OpArbitraryFloatAddINTEL: *hasResult = true; *hasResultType = true; break; case OpArbitraryFloatSubINTEL: *hasResult = true; *hasResultType = true; break; case OpArbitraryFloatMulINTEL: *hasResult = true; *hasResultType = true; break; case OpArbitraryFloatDivINTEL: *hasResult = true; *hasResultType = true; break; case OpArbitraryFloatGTINTEL: *hasResult = true; *hasResultType = true; break; case OpArbitraryFloatGEINTEL: *hasResult = true; *hasResultType = true; break; case OpArbitraryFloatLTINTEL: *hasResult = true; *hasResultType = true; break; case OpArbitraryFloatLEINTEL: *hasResult = true; *hasResultType = true; break; case OpArbitraryFloatEQINTEL: *hasResult = true; *hasResultType = true; break; case OpArbitraryFloatRecipINTEL: *hasResult = true; *hasResultType = true; break; case OpArbitraryFloatRSqrtINTEL: *hasResult = true; *hasResultType = true; break; case OpArbitraryFloatCbrtINTEL: *hasResult = true; *hasResultType = true; break; case OpArbitraryFloatHypotINTEL: *hasResult = true; *hasResultType = true; break; case OpArbitraryFloatSqrtINTEL: *hasResult = true; *hasResultType = true; break; case OpArbitraryFloatLogINTEL: *hasResult = true; *hasResultType = true; break; case OpArbitraryFloatLog2INTEL: *hasResult = true; *hasResultType = true; break; case OpArbitraryFloatLog10INTEL: *hasResult = true; *hasResultType = true; break; case OpArbitraryFloatLog1pINTEL: *hasResult = true; *hasResultType = true; break; case OpArbitraryFloatExpINTEL: *hasResult = true; *hasResultType = true; break; case OpArbitraryFloatExp2INTEL: *hasResult = true; *hasResultType = true; break; case OpArbitraryFloatExp10INTEL: *hasResult = true; *hasResultType = true; break; case OpArbitraryFloatExpm1INTEL: *hasResult = true; *hasResultType = true; break; case OpArbitraryFloatSinINTEL: *hasResult = true; *hasResultType = true; break; case OpArbitraryFloatCosINTEL: *hasResult = true; *hasResultType = true; break; case OpArbitraryFloatSinCosINTEL: *hasResult = true; *hasResultType = true; break; case OpArbitraryFloatSinPiINTEL: *hasResult = true; *hasResultType = true; break; case OpArbitraryFloatCosPiINTEL: *hasResult = true; *hasResultType = true; break; case OpArbitraryFloatASinINTEL: *hasResult = true; *hasResultType = true; break; case OpArbitraryFloatASinPiINTEL: *hasResult = true; *hasResultType = true; break; case OpArbitraryFloatACosINTEL: *hasResult = true; *hasResultType = true; break; case OpArbitraryFloatACosPiINTEL: *hasResult = true; *hasResultType = true; break; case OpArbitraryFloatATanINTEL: *hasResult = true; *hasResultType = true; break; case OpArbitraryFloatATanPiINTEL: *hasResult = true; *hasResultType = true; break; case OpArbitraryFloatATan2INTEL: *hasResult = true; *hasResultType = true; break; case OpArbitraryFloatPowINTEL: *hasResult = true; *hasResultType = true; break; case OpArbitraryFloatPowRINTEL: *hasResult = true; *hasResultType = true; break; case OpArbitraryFloatPowNINTEL: *hasResult = true; *hasResultType = true; break; case OpLoopControlINTEL: *hasResult = false; *hasResultType = false; break; case OpAliasDomainDeclINTEL: *hasResult = true; *hasResultType = false; break; case OpAliasScopeDeclINTEL: *hasResult = true; *hasResultType = false; break; case OpAliasScopeListDeclINTEL: *hasResult = true; *hasResultType = false; break; case OpFixedSqrtINTEL: *hasResult = true; *hasResultType = true; break; case OpFixedRecipINTEL: *hasResult = true; *hasResultType = true; break; case OpFixedRsqrtINTEL: *hasResult = true; *hasResultType = true; break; case OpFixedSinINTEL: *hasResult = true; *hasResultType = true; break; case OpFixedCosINTEL: *hasResult = true; *hasResultType = true; break; case OpFixedSinCosINTEL: *hasResult = true; *hasResultType = true; break; case OpFixedSinPiINTEL: *hasResult = true; *hasResultType = true; break; case OpFixedCosPiINTEL: *hasResult = true; *hasResultType = true; break; case OpFixedSinCosPiINTEL: *hasResult = true; *hasResultType = true; break; case OpFixedLogINTEL: *hasResult = true; *hasResultType = true; break; case OpFixedExpINTEL: *hasResult = true; *hasResultType = true; break; case OpPtrCastToCrossWorkgroupINTEL: *hasResult = true; *hasResultType = true; break; case OpCrossWorkgroupCastToPtrINTEL: *hasResult = true; *hasResultType = true; break; case OpReadPipeBlockingINTEL: *hasResult = true; *hasResultType = true; break; case OpWritePipeBlockingINTEL: *hasResult = true; *hasResultType = true; break; case OpFPGARegINTEL: *hasResult = true; *hasResultType = true; break; case OpRayQueryGetRayTMinKHR: *hasResult = true; *hasResultType = true; break; case OpRayQueryGetRayFlagsKHR: *hasResult = true; *hasResultType = true; break; case OpRayQueryGetIntersectionTKHR: *hasResult = true; *hasResultType = true; break; case OpRayQueryGetIntersectionInstanceCustomIndexKHR: *hasResult = true; *hasResultType = true; break; case OpRayQueryGetIntersectionInstanceIdKHR: *hasResult = true; *hasResultType = true; break; case OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR: *hasResult = true; *hasResultType = true; break; case OpRayQueryGetIntersectionGeometryIndexKHR: *hasResult = true; *hasResultType = true; break; case OpRayQueryGetIntersectionPrimitiveIndexKHR: *hasResult = true; *hasResultType = true; break; case OpRayQueryGetIntersectionBarycentricsKHR: *hasResult = true; *hasResultType = true; break; case OpRayQueryGetIntersectionFrontFaceKHR: *hasResult = true; *hasResultType = true; break; case OpRayQueryGetIntersectionCandidateAABBOpaqueKHR: *hasResult = true; *hasResultType = true; break; case OpRayQueryGetIntersectionObjectRayDirectionKHR: *hasResult = true; *hasResultType = true; break; case OpRayQueryGetIntersectionObjectRayOriginKHR: *hasResult = true; *hasResultType = true; break; case OpRayQueryGetWorldRayDirectionKHR: *hasResult = true; *hasResultType = true; break; case OpRayQueryGetWorldRayOriginKHR: *hasResult = true; *hasResultType = true; break; case OpRayQueryGetIntersectionObjectToWorldKHR: *hasResult = true; *hasResultType = true; break; case OpRayQueryGetIntersectionWorldToObjectKHR: *hasResult = true; *hasResultType = true; break; case OpAtomicFAddEXT: *hasResult = true; *hasResultType = true; break; case OpTypeBufferSurfaceINTEL: *hasResult = true; *hasResultType = false; break; case OpTypeStructContinuedINTEL: *hasResult = false; *hasResultType = false; break; case OpConstantCompositeContinuedINTEL: *hasResult = false; *hasResultType = false; break; case OpSpecConstantCompositeContinuedINTEL: *hasResult = false; *hasResultType = false; break; case OpControlBarrierArriveINTEL: *hasResult = false; *hasResultType = false; break; case OpControlBarrierWaitINTEL: *hasResult = false; *hasResultType = false; break; case OpGroupIMulKHR: *hasResult = true; *hasResultType = true; break; case OpGroupFMulKHR: *hasResult = true; *hasResultType = true; break; case OpGroupBitwiseAndKHR: *hasResult = true; *hasResultType = true; break; case OpGroupBitwiseOrKHR: *hasResult = true; *hasResultType = true; break; case OpGroupBitwiseXorKHR: *hasResult = true; *hasResultType = true; break; case OpGroupLogicalAndKHR: *hasResult = true; *hasResultType = true; break; case OpGroupLogicalOrKHR: *hasResult = true; *hasResultType = true; break; case OpGroupLogicalXorKHR: *hasResult = true; *hasResultType = true; break; } } #endif /* SPV_ENABLE_UTILITY_CODE */ // Overload operator| for mask bit combining inline ImageOperandsMask operator|(ImageOperandsMask a, ImageOperandsMask b) { return ImageOperandsMask(unsigned(a) | unsigned(b)); } inline FPFastMathModeMask operator|(FPFastMathModeMask a, FPFastMathModeMask b) { return FPFastMathModeMask(unsigned(a) | unsigned(b)); } inline SelectionControlMask operator|(SelectionControlMask a, SelectionControlMask b) { return SelectionControlMask(unsigned(a) | unsigned(b)); } inline LoopControlMask operator|(LoopControlMask a, LoopControlMask b) { return LoopControlMask(unsigned(a) | unsigned(b)); } inline FunctionControlMask operator|(FunctionControlMask a, FunctionControlMask b) { return FunctionControlMask(unsigned(a) | unsigned(b)); } inline MemorySemanticsMask operator|(MemorySemanticsMask a, MemorySemanticsMask b) { return MemorySemanticsMask(unsigned(a) | unsigned(b)); } inline MemoryAccessMask operator|(MemoryAccessMask a, MemoryAccessMask b) { return MemoryAccessMask(unsigned(a) | unsigned(b)); } inline KernelProfilingInfoMask operator|(KernelProfilingInfoMask a, KernelProfilingInfoMask b) { return KernelProfilingInfoMask(unsigned(a) | unsigned(b)); } inline RayFlagsMask operator|(RayFlagsMask a, RayFlagsMask b) { return RayFlagsMask(unsigned(a) | unsigned(b)); } inline FragmentShadingRateMask operator|(FragmentShadingRateMask a, FragmentShadingRateMask b) { return FragmentShadingRateMask(unsigned(a) | unsigned(b)); } } // end namespace spv #endif // #ifndef spirv_HPP ================================================ FILE: src/libraries/spirv_cross/spirv_cfg.cpp ================================================ /* * Copyright 2016-2021 Arm Limited * SPDX-License-Identifier: Apache-2.0 OR MIT * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* * At your option, you may choose to accept this material under either: * 1. The Apache License, Version 2.0, found at , or * 2. The MIT License, found at . */ #include "spirv_cfg.hpp" #include "spirv_cross.hpp" #include #include using namespace std; namespace SPIRV_CROSS_NAMESPACE { CFG::CFG(Compiler &compiler_, const SPIRFunction &func_) : compiler(compiler_) , func(func_) { build_post_order_visit_order(); build_immediate_dominators(); } uint32_t CFG::find_common_dominator(uint32_t a, uint32_t b) const { while (a != b) { if (get_visit_order(a) < get_visit_order(b)) a = get_immediate_dominator(a); else b = get_immediate_dominator(b); } return a; } void CFG::build_immediate_dominators() { // Traverse the post-order in reverse and build up the immediate dominator tree. immediate_dominators.clear(); immediate_dominators[func.entry_block] = func.entry_block; for (auto i = post_order.size(); i; i--) { uint32_t block = post_order[i - 1]; auto &pred = preceding_edges[block]; if (pred.empty()) // This is for the entry block, but we've already set up the dominators. continue; for (auto &edge : pred) { if (immediate_dominators[block]) { assert(immediate_dominators[edge]); immediate_dominators[block] = find_common_dominator(immediate_dominators[block], edge); } else immediate_dominators[block] = edge; } } } bool CFG::is_back_edge(uint32_t to) const { // We have a back edge if the visit order is set with the temporary magic value 0. // Crossing edges will have already been recorded with a visit order. auto itr = visit_order.find(to); return itr != end(visit_order) && itr->second.get() == 0; } bool CFG::has_visited_forward_edge(uint32_t to) const { // If > 0, we have visited the edge already, and this is not a back edge branch. auto itr = visit_order.find(to); return itr != end(visit_order) && itr->second.get() > 0; } bool CFG::post_order_visit(uint32_t block_id) { // If we have already branched to this block (back edge), stop recursion. // If our branches are back-edges, we do not record them. // We have to record crossing edges however. if (has_visited_forward_edge(block_id)) return true; else if (is_back_edge(block_id)) return false; // Block back-edges from recursively revisiting ourselves. visit_order[block_id].get() = 0; auto &block = compiler.get(block_id); // If this is a loop header, add an implied branch to the merge target. // This is needed to avoid annoying cases with do { ... } while(false) loops often generated by inliners. // To the CFG, this is linear control flow, but we risk picking the do/while scope as our dominating block. // This makes sure that if we are accessing a variable outside the do/while, we choose the loop header as dominator. // We could use has_visited_forward_edge, but this break code-gen where the merge block is unreachable in the CFG. // Make a point out of visiting merge target first. This is to make sure that post visit order outside the loop // is lower than inside the loop, which is going to be key for some traversal algorithms like post-dominance analysis. // For selection constructs true/false blocks will end up visiting the merge block directly and it works out fine, // but for loops, only the header might end up actually branching to merge block. if (block.merge == SPIRBlock::MergeLoop && post_order_visit(block.merge_block)) add_branch(block_id, block.merge_block); // First visit our branch targets. switch (block.terminator) { case SPIRBlock::Direct: if (post_order_visit(block.next_block)) add_branch(block_id, block.next_block); break; case SPIRBlock::Select: if (post_order_visit(block.true_block)) add_branch(block_id, block.true_block); if (post_order_visit(block.false_block)) add_branch(block_id, block.false_block); break; case SPIRBlock::MultiSelect: { const auto &cases = compiler.get_case_list(block); for (const auto &target : cases) { if (post_order_visit(target.block)) add_branch(block_id, target.block); } if (block.default_block && post_order_visit(block.default_block)) add_branch(block_id, block.default_block); break; } default: break; } // If this is a selection merge, add an implied branch to the merge target. // This is needed to avoid cases where an inner branch dominates the outer branch. // This can happen if one of the branches exit early, e.g.: // if (cond) { ...; break; } else { var = 100 } use_var(var); // We can use the variable without a Phi since there is only one possible parent here. // However, in this case, we need to hoist out the inner variable to outside the branch. // Use same strategy as loops. if (block.merge == SPIRBlock::MergeSelection && post_order_visit(block.next_block)) { // If there is only one preceding edge to the merge block and it's not ourselves, we need a fixup. // Add a fake branch so any dominator in either the if (), or else () block, or a lone case statement // will be hoisted out to outside the selection merge. // If size > 1, the variable will be automatically hoisted, so we should not mess with it. // The exception here is switch blocks, where we can have multiple edges to merge block, // all coming from same scope, so be more conservative in this case. // Adding fake branches unconditionally breaks parameter preservation analysis, // which looks at how variables are accessed through the CFG. auto pred_itr = preceding_edges.find(block.next_block); if (pred_itr != end(preceding_edges)) { auto &pred = pred_itr->second; auto succ_itr = succeeding_edges.find(block_id); size_t num_succeeding_edges = 0; if (succ_itr != end(succeeding_edges)) num_succeeding_edges = succ_itr->second.size(); if (block.terminator == SPIRBlock::MultiSelect && num_succeeding_edges == 1) { // Multiple branches can come from the same scope due to "break;", so we need to assume that all branches // come from same case scope in worst case, even if there are multiple preceding edges. // If we have more than one succeeding edge from the block header, it should be impossible // to have a dominator be inside the block. // Only case this can go wrong is if we have 2 or more edges from block header and // 2 or more edges to merge block, and still have dominator be inside a case label. if (!pred.empty()) add_branch(block_id, block.next_block); } else { if (pred.size() == 1 && *pred.begin() != block_id) add_branch(block_id, block.next_block); } } else { // If the merge block does not have any preceding edges, i.e. unreachable, hallucinate it. // We're going to do code-gen for it, and domination analysis requires that we have at least one preceding edge. add_branch(block_id, block.next_block); } } // Then visit ourselves. Start counting at one, to let 0 be a magic value for testing back vs. crossing edges. visit_order[block_id].get() = ++visit_count; post_order.push_back(block_id); return true; } void CFG::build_post_order_visit_order() { uint32_t block = func.entry_block; visit_count = 0; visit_order.clear(); post_order.clear(); post_order_visit(block); } void CFG::add_branch(uint32_t from, uint32_t to) { const auto add_unique = [](SmallVector &l, uint32_t value) { auto itr = find(begin(l), end(l), value); if (itr == end(l)) l.push_back(value); }; add_unique(preceding_edges[to], from); add_unique(succeeding_edges[from], to); } uint32_t CFG::find_loop_dominator(uint32_t block_id) const { while (block_id != SPIRBlock::NoDominator) { auto itr = preceding_edges.find(block_id); if (itr == end(preceding_edges)) return SPIRBlock::NoDominator; if (itr->second.empty()) return SPIRBlock::NoDominator; uint32_t pred_block_id = SPIRBlock::NoDominator; bool ignore_loop_header = false; // If we are a merge block, go directly to the header block. // Only consider a loop dominator if we are branching from inside a block to a loop header. // NOTE: In the CFG we forced an edge from header to merge block always to support variable scopes properly. for (auto &pred : itr->second) { auto &pred_block = compiler.get(pred); if (pred_block.merge == SPIRBlock::MergeLoop && pred_block.merge_block == ID(block_id)) { pred_block_id = pred; ignore_loop_header = true; break; } else if (pred_block.merge == SPIRBlock::MergeSelection && pred_block.next_block == ID(block_id)) { pred_block_id = pred; break; } } // No merge block means we can just pick any edge. Loop headers dominate the inner loop, so any path we // take will lead there. if (pred_block_id == SPIRBlock::NoDominator) pred_block_id = itr->second.front(); block_id = pred_block_id; if (!ignore_loop_header && block_id) { auto &block = compiler.get(block_id); if (block.merge == SPIRBlock::MergeLoop) return block_id; } } return block_id; } bool CFG::node_terminates_control_flow_in_sub_graph(BlockID from, BlockID to) const { // Walk backwards, starting from "to" block. // Only follow pred edges if they have a 1:1 relationship, or a merge relationship. // If we cannot find a path to "from", we must assume that to is inside control flow in some way. auto &from_block = compiler.get(from); BlockID ignore_block_id = 0; if (from_block.merge == SPIRBlock::MergeLoop) ignore_block_id = from_block.merge_block; while (to != from) { auto pred_itr = preceding_edges.find(to); if (pred_itr == end(preceding_edges)) return false; DominatorBuilder builder(*this); for (auto &edge : pred_itr->second) builder.add_block(edge); uint32_t dominator = builder.get_dominator(); if (dominator == 0) return false; auto &dom = compiler.get(dominator); bool true_path_ignore = false; bool false_path_ignore = false; bool merges_to_nothing = dom.merge == SPIRBlock::MergeNone || (dom.merge == SPIRBlock::MergeSelection && dom.next_block && compiler.get(dom.next_block).terminator == SPIRBlock::Unreachable) || (dom.merge == SPIRBlock::MergeLoop && dom.merge_block && compiler.get(dom.merge_block).terminator == SPIRBlock::Unreachable); if (dom.self == from || merges_to_nothing) { // We can only ignore inner branchy paths if there is no merge, // i.e. no code is generated afterwards. E.g. this allows us to elide continue: // for (;;) { if (cond) { continue; } else { break; } }. // Codegen here in SPIR-V will be something like either no merge if one path directly breaks, or // we merge to Unreachable. if (ignore_block_id && dom.terminator == SPIRBlock::Select) { auto &true_block = compiler.get(dom.true_block); auto &false_block = compiler.get(dom.false_block); auto &ignore_block = compiler.get(ignore_block_id); true_path_ignore = compiler.execution_is_branchless(true_block, ignore_block); false_path_ignore = compiler.execution_is_branchless(false_block, ignore_block); } } // Cases where we allow traversal. This serves as a proxy for post-dominance in a loop body. // TODO: Might want to do full post-dominance analysis, but it's a lot of churn for something like this ... // - We're the merge block of a selection construct. Jump to header. // - We're the merge block of a loop. Jump to header. // - Direct branch. Trivial. // - Allow cases inside a branch if the header cannot merge execution before loop exit. if ((dom.merge == SPIRBlock::MergeSelection && dom.next_block == to) || (dom.merge == SPIRBlock::MergeLoop && dom.merge_block == to) || (dom.terminator == SPIRBlock::Direct && dom.next_block == to) || (dom.terminator == SPIRBlock::Select && dom.true_block == to && false_path_ignore) || (dom.terminator == SPIRBlock::Select && dom.false_block == to && true_path_ignore)) { // Allow walking selection constructs if the other branch reaches out of a loop construct. // It cannot be in-scope anymore. to = dominator; } else return false; } return true; } DominatorBuilder::DominatorBuilder(const CFG &cfg_) : cfg(cfg_) { } void DominatorBuilder::add_block(uint32_t block) { if (!cfg.get_immediate_dominator(block)) { // Unreachable block via the CFG, we will never emit this code anyways. return; } if (!dominator) { dominator = block; return; } if (block != dominator) dominator = cfg.find_common_dominator(block, dominator); } void DominatorBuilder::lift_continue_block_dominator() { // It is possible for a continue block to be the dominator of a variable is only accessed inside the while block of a do-while loop. // We cannot safely declare variables inside a continue block, so move any variable declared // in a continue block to the entry block to simplify. // It makes very little sense for a continue block to ever be a dominator, so fall back to the simplest // solution. if (!dominator) return; auto &block = cfg.get_compiler().get(dominator); auto post_order = cfg.get_visit_order(dominator); // If we are branching to a block with a higher post-order traversal index (continue blocks), we have a problem // since we cannot create sensible GLSL code for this, fallback to entry block. bool back_edge_dominator = false; switch (block.terminator) { case SPIRBlock::Direct: if (cfg.get_visit_order(block.next_block) > post_order) back_edge_dominator = true; break; case SPIRBlock::Select: if (cfg.get_visit_order(block.true_block) > post_order) back_edge_dominator = true; if (cfg.get_visit_order(block.false_block) > post_order) back_edge_dominator = true; break; case SPIRBlock::MultiSelect: { auto &cases = cfg.get_compiler().get_case_list(block); for (auto &target : cases) { if (cfg.get_visit_order(target.block) > post_order) back_edge_dominator = true; } if (block.default_block && cfg.get_visit_order(block.default_block) > post_order) back_edge_dominator = true; break; } default: break; } if (back_edge_dominator) dominator = cfg.get_function().entry_block; } } // namespace SPIRV_CROSS_NAMESPACE ================================================ FILE: src/libraries/spirv_cross/spirv_cfg.hpp ================================================ /* * Copyright 2016-2021 Arm Limited * SPDX-License-Identifier: Apache-2.0 OR MIT * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* * At your option, you may choose to accept this material under either: * 1. The Apache License, Version 2.0, found at , or * 2. The MIT License, found at . */ #ifndef SPIRV_CROSS_CFG_HPP #define SPIRV_CROSS_CFG_HPP #include "spirv_common.hpp" #include namespace SPIRV_CROSS_NAMESPACE { class Compiler; class CFG { public: CFG(Compiler &compiler, const SPIRFunction &function); Compiler &get_compiler() { return compiler; } const Compiler &get_compiler() const { return compiler; } const SPIRFunction &get_function() const { return func; } uint32_t get_immediate_dominator(uint32_t block) const { auto itr = immediate_dominators.find(block); if (itr != std::end(immediate_dominators)) return itr->second; else return 0; } bool is_reachable(uint32_t block) const { return visit_order.count(block) != 0; } uint32_t get_visit_order(uint32_t block) const { auto itr = visit_order.find(block); assert(itr != std::end(visit_order)); int v = itr->second.get(); assert(v > 0); return uint32_t(v); } uint32_t find_common_dominator(uint32_t a, uint32_t b) const; const SmallVector &get_preceding_edges(uint32_t block) const { auto itr = preceding_edges.find(block); if (itr != std::end(preceding_edges)) return itr->second; else return empty_vector; } const SmallVector &get_succeeding_edges(uint32_t block) const { auto itr = succeeding_edges.find(block); if (itr != std::end(succeeding_edges)) return itr->second; else return empty_vector; } template void walk_from(std::unordered_set &seen_blocks, uint32_t block, const Op &op) const { if (seen_blocks.count(block)) return; seen_blocks.insert(block); if (op(block)) { for (auto b : get_succeeding_edges(block)) walk_from(seen_blocks, b, op); } } uint32_t find_loop_dominator(uint32_t block) const; bool node_terminates_control_flow_in_sub_graph(BlockID from, BlockID to) const; private: struct VisitOrder { int &get() { return v; } const int &get() const { return v; } int v = -1; }; Compiler &compiler; const SPIRFunction &func; std::unordered_map> preceding_edges; std::unordered_map> succeeding_edges; std::unordered_map immediate_dominators; std::unordered_map visit_order; SmallVector post_order; SmallVector empty_vector; void add_branch(uint32_t from, uint32_t to); void build_post_order_visit_order(); void build_immediate_dominators(); bool post_order_visit(uint32_t block); uint32_t visit_count = 0; bool is_back_edge(uint32_t to) const; bool has_visited_forward_edge(uint32_t to) const; }; class DominatorBuilder { public: DominatorBuilder(const CFG &cfg); void add_block(uint32_t block); uint32_t get_dominator() const { return dominator; } void lift_continue_block_dominator(); private: const CFG &cfg; uint32_t dominator = 0; }; } // namespace SPIRV_CROSS_NAMESPACE #endif ================================================ FILE: src/libraries/spirv_cross/spirv_common.hpp ================================================ /* * Copyright 2015-2021 Arm Limited * SPDX-License-Identifier: Apache-2.0 OR MIT * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* * At your option, you may choose to accept this material under either: * 1. The Apache License, Version 2.0, found at , or * 2. The MIT License, found at . */ #ifndef SPIRV_CROSS_COMMON_HPP #define SPIRV_CROSS_COMMON_HPP #ifndef SPV_ENABLE_UTILITY_CODE #define SPV_ENABLE_UTILITY_CODE #endif #include "spirv.hpp" #include "spirv_cross_containers.hpp" #include "spirv_cross_error_handling.hpp" #include // A bit crude, but allows projects which embed SPIRV-Cross statically to // effectively hide all the symbols from other projects. // There is a case where we have: // - Project A links against SPIRV-Cross statically. // - Project A links against Project B statically. // - Project B links against SPIRV-Cross statically (might be a different version). // This leads to a conflict with extremely bizarre results. // By overriding the namespace in one of the project builds, we can work around this. // If SPIRV-Cross is embedded in dynamic libraries, // prefer using -fvisibility=hidden on GCC/Clang instead. #ifdef SPIRV_CROSS_NAMESPACE_OVERRIDE #define SPIRV_CROSS_NAMESPACE SPIRV_CROSS_NAMESPACE_OVERRIDE #else #define SPIRV_CROSS_NAMESPACE spirv_cross #endif namespace SPIRV_CROSS_NAMESPACE { namespace inner { template void join_helper(StringStream<> &stream, T &&t) { stream << std::forward(t); } template void join_helper(StringStream<> &stream, T &&t, Ts &&... ts) { stream << std::forward(t); join_helper(stream, std::forward(ts)...); } } // namespace inner class Bitset { public: Bitset() = default; explicit inline Bitset(uint64_t lower_) : lower(lower_) { } inline bool get(uint32_t bit) const { if (bit < 64) return (lower & (1ull << bit)) != 0; else return higher.count(bit) != 0; } inline void set(uint32_t bit) { if (bit < 64) lower |= 1ull << bit; else higher.insert(bit); } inline void clear(uint32_t bit) { if (bit < 64) lower &= ~(1ull << bit); else higher.erase(bit); } inline uint64_t get_lower() const { return lower; } inline void reset() { lower = 0; higher.clear(); } inline void merge_and(const Bitset &other) { lower &= other.lower; std::unordered_set tmp_set; for (auto &v : higher) if (other.higher.count(v) != 0) tmp_set.insert(v); higher = std::move(tmp_set); } inline void merge_or(const Bitset &other) { lower |= other.lower; for (auto &v : other.higher) higher.insert(v); } inline bool operator==(const Bitset &other) const { if (lower != other.lower) return false; if (higher.size() != other.higher.size()) return false; for (auto &v : higher) if (other.higher.count(v) == 0) return false; return true; } inline bool operator!=(const Bitset &other) const { return !(*this == other); } template void for_each_bit(const Op &op) const { // TODO: Add ctz-based iteration. for (uint32_t i = 0; i < 64; i++) { if (lower & (1ull << i)) op(i); } if (higher.empty()) return; // Need to enforce an order here for reproducible results, // but hitting this path should happen extremely rarely, so having this slow path is fine. SmallVector bits; bits.reserve(higher.size()); for (auto &v : higher) bits.push_back(v); std::sort(std::begin(bits), std::end(bits)); for (auto &v : bits) op(v); } inline bool empty() const { return lower == 0 && higher.empty(); } private: // The most common bits to set are all lower than 64, // so optimize for this case. Bits spilling outside 64 go into a slower data structure. // In almost all cases, higher data structure will not be used. uint64_t lower = 0; std::unordered_set higher; }; // Helper template to avoid lots of nasty string temporary munging. template std::string join(Ts &&... ts) { StringStream<> stream; inner::join_helper(stream, std::forward(ts)...); return stream.str(); } inline std::string merge(const SmallVector &list, const char *between = ", ") { StringStream<> stream; for (auto &elem : list) { stream << elem; if (&elem != &list.back()) stream << between; } return stream.str(); } // Make sure we don't accidentally call this with float or doubles with SFINAE. // Have to use the radix-aware overload. template ::value, int>::type = 0> inline std::string convert_to_string(const T &t) { return std::to_string(t); } static inline std::string convert_to_string(int32_t value) { // INT_MIN is ... special on some backends. If we use a decimal literal, and negate it, we // could accidentally promote the literal to long first, then negate. // To workaround it, emit int(0x80000000) instead. if (value == std::numeric_limits::min()) return "int(0x80000000)"; else return std::to_string(value); } static inline std::string convert_to_string(int64_t value, const std::string &int64_type, bool long_long_literal_suffix) { // INT64_MIN is ... special on some backends. // If we use a decimal literal, and negate it, we might overflow the representable numbers. // To workaround it, emit int(0x80000000) instead. if (value == std::numeric_limits::min()) return join(int64_type, "(0x8000000000000000u", (long_long_literal_suffix ? "ll" : "l"), ")"); else return std::to_string(value) + (long_long_literal_suffix ? "ll" : "l"); } // Allow implementations to set a convenient standard precision #ifndef SPIRV_CROSS_FLT_FMT #define SPIRV_CROSS_FLT_FMT "%.32g" #endif // Disable sprintf and strcat warnings. // We cannot rely on snprintf and family existing because, ..., MSVC. #if defined(__clang__) || defined(__GNUC__) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" #elif defined(_MSC_VER) #pragma warning(push) #pragma warning(disable : 4996) #endif static inline void fixup_radix_point(char *str, char radix_point) { // Setting locales is a very risky business in multi-threaded program, // so just fixup locales instead. We only need to care about the radix point. if (radix_point != '.') { while (*str != '\0') { if (*str == radix_point) *str = '.'; str++; } } } inline std::string convert_to_string(float t, char locale_radix_point) { // std::to_string for floating point values is broken. // Fallback to something more sane. char buf[64]; sprintf(buf, SPIRV_CROSS_FLT_FMT, t); fixup_radix_point(buf, locale_radix_point); // Ensure that the literal is float. if (!strchr(buf, '.') && !strchr(buf, 'e')) strcat(buf, ".0"); return buf; } inline std::string convert_to_string(double t, char locale_radix_point) { // std::to_string for floating point values is broken. // Fallback to something more sane. char buf[64]; sprintf(buf, SPIRV_CROSS_FLT_FMT, t); fixup_radix_point(buf, locale_radix_point); // Ensure that the literal is float. if (!strchr(buf, '.') && !strchr(buf, 'e')) strcat(buf, ".0"); return buf; } #if defined(__clang__) || defined(__GNUC__) #pragma GCC diagnostic pop #elif defined(_MSC_VER) #pragma warning(pop) #endif class FloatFormatter { public: virtual ~FloatFormatter() = default; virtual std::string format_float(float value) = 0; virtual std::string format_double(double value) = 0; }; template struct ValueSaver { explicit ValueSaver(T ¤t_) : current(current_) , saved(current_) { } void release() { current = saved; } ~ValueSaver() { release(); } T ¤t; T saved; }; struct Instruction { uint16_t op = 0; uint16_t count = 0; // If offset is 0 (not a valid offset into the instruction stream), // we have an instruction stream which is embedded in the object. uint32_t offset = 0; uint32_t length = 0; inline bool is_embedded() const { return offset == 0; } }; struct EmbeddedInstruction : Instruction { SmallVector ops; }; enum Types { TypeNone, TypeType, TypeVariable, TypeConstant, TypeFunction, TypeFunctionPrototype, TypeBlock, TypeExtension, TypeExpression, TypeConstantOp, TypeCombinedImageSampler, TypeAccessChain, TypeUndef, TypeString, TypeCount }; template class TypedID; template <> class TypedID { public: TypedID() = default; TypedID(uint32_t id_) : id(id_) { } template TypedID(const TypedID &other) { *this = other; } template TypedID &operator=(const TypedID &other) { id = uint32_t(other); return *this; } // Implicit conversion to u32 is desired here. // As long as we block implicit conversion between TypedID and TypedID we're good. operator uint32_t() const { return id; } template operator TypedID() const { return TypedID(*this); } private: uint32_t id = 0; }; template class TypedID { public: TypedID() = default; TypedID(uint32_t id_) : id(id_) { } explicit TypedID(const TypedID &other) : id(uint32_t(other)) { } operator uint32_t() const { return id; } private: uint32_t id = 0; }; using VariableID = TypedID; using TypeID = TypedID; using ConstantID = TypedID; using FunctionID = TypedID; using BlockID = TypedID; using ID = TypedID; // Helper for Variant interface. struct IVariant { virtual ~IVariant() = default; virtual IVariant *clone(ObjectPoolBase *pool) = 0; ID self = 0; protected: IVariant() = default; IVariant(const IVariant&) = default; IVariant &operator=(const IVariant&) = default; }; #define SPIRV_CROSS_DECLARE_CLONE(T) \ IVariant *clone(ObjectPoolBase *pool) override \ { \ return static_cast *>(pool)->allocate(*this); \ } struct SPIRUndef : IVariant { enum { type = TypeUndef }; explicit SPIRUndef(TypeID basetype_) : basetype(basetype_) { } TypeID basetype; SPIRV_CROSS_DECLARE_CLONE(SPIRUndef) }; struct SPIRString : IVariant { enum { type = TypeString }; explicit SPIRString(std::string str_) : str(std::move(str_)) { } std::string str; SPIRV_CROSS_DECLARE_CLONE(SPIRString) }; // This type is only used by backends which need to access the combined image and sampler IDs separately after // the OpSampledImage opcode. struct SPIRCombinedImageSampler : IVariant { enum { type = TypeCombinedImageSampler }; SPIRCombinedImageSampler(TypeID type_, VariableID image_, VariableID sampler_) : combined_type(type_) , image(image_) , sampler(sampler_) { } TypeID combined_type; VariableID image; VariableID sampler; SPIRV_CROSS_DECLARE_CLONE(SPIRCombinedImageSampler) }; struct SPIRConstantOp : IVariant { enum { type = TypeConstantOp }; SPIRConstantOp(TypeID result_type, spv::Op op, const uint32_t *args, uint32_t length) : opcode(op) , basetype(result_type) { arguments.reserve(length); for (uint32_t i = 0; i < length; i++) arguments.push_back(args[i]); } spv::Op opcode; SmallVector arguments; TypeID basetype; SPIRV_CROSS_DECLARE_CLONE(SPIRConstantOp) }; struct SPIRType : IVariant { enum { type = TypeType }; spv::Op op = spv::Op::OpNop; explicit SPIRType(spv::Op op_) : op(op_) {} enum BaseType { Unknown, Void, Boolean, SByte, UByte, Short, UShort, Int, UInt, Int64, UInt64, AtomicCounter, Half, Float, Double, Struct, Image, SampledImage, Sampler, AccelerationStructure, RayQuery, // Keep internal types at the end. ControlPointArray, Interpolant, Char }; // Scalar/vector/matrix support. BaseType basetype = Unknown; uint32_t width = 0; uint32_t vecsize = 1; uint32_t columns = 1; // Arrays, support array of arrays by having a vector of array sizes. SmallVector array; // Array elements can be either specialization constants or specialization ops. // This array determines how to interpret the array size. // If an element is true, the element is a literal, // otherwise, it's an expression, which must be resolved on demand. // The actual size is not really known until runtime. SmallVector array_size_literal; // Pointers // Keep track of how many pointer layers we have. uint32_t pointer_depth = 0; bool pointer = false; bool forward_pointer = false; spv::StorageClass storage = spv::StorageClassGeneric; SmallVector member_types; // If member order has been rewritten to handle certain scenarios with Offset, // allow codegen to rewrite the index. SmallVector member_type_index_redirection; struct ImageType { TypeID type; spv::Dim dim; bool depth; bool arrayed; bool ms; uint32_t sampled; spv::ImageFormat format; spv::AccessQualifier access; } image = {}; // Structs can be declared multiple times if they are used as part of interface blocks. // We want to detect this so that we only emit the struct definition once. // Since we cannot rely on OpName to be equal, we need to figure out aliases. TypeID type_alias = 0; // Denotes the type which this type is based on. // Allows the backend to traverse how a complex type is built up during access chains. TypeID parent_type = 0; // Used in backends to avoid emitting members with conflicting names. std::unordered_set member_name_cache; SPIRV_CROSS_DECLARE_CLONE(SPIRType) }; struct SPIRExtension : IVariant { enum { type = TypeExtension }; enum Extension { Unsupported, GLSL, SPV_debug_info, SPV_AMD_shader_ballot, SPV_AMD_shader_explicit_vertex_parameter, SPV_AMD_shader_trinary_minmax, SPV_AMD_gcn_shader, NonSemanticDebugPrintf, NonSemanticShaderDebugInfo, NonSemanticGeneric }; explicit SPIRExtension(Extension ext_) : ext(ext_) { } Extension ext; SPIRV_CROSS_DECLARE_CLONE(SPIRExtension) }; // SPIREntryPoint is not a variant since its IDs are used to decorate OpFunction, // so in order to avoid conflicts, we can't stick them in the ids array. struct SPIREntryPoint { SPIREntryPoint(FunctionID self_, spv::ExecutionModel execution_model, const std::string &entry_name) : self(self_) , name(entry_name) , orig_name(entry_name) , model(execution_model) { } SPIREntryPoint() = default; FunctionID self = 0; std::string name; std::string orig_name; SmallVector interface_variables; Bitset flags; struct WorkgroupSize { uint32_t x = 0, y = 0, z = 0; uint32_t id_x = 0, id_y = 0, id_z = 0; uint32_t constant = 0; // Workgroup size can be expressed as a constant/spec-constant instead. } workgroup_size; uint32_t invocations = 0; uint32_t output_vertices = 0; uint32_t output_primitives = 0; spv::ExecutionModel model = spv::ExecutionModelMax; bool geometry_passthrough = false; }; struct SPIRExpression : IVariant { enum { type = TypeExpression }; // Only created by the backend target to avoid creating tons of temporaries. SPIRExpression(std::string expr, TypeID expression_type_, bool immutable_) : expression(std::move(expr)) , expression_type(expression_type_) , immutable(immutable_) { } // If non-zero, prepend expression with to_expression(base_expression). // Used in amortizing multiple calls to to_expression() // where in certain cases that would quickly force a temporary when not needed. ID base_expression = 0; std::string expression; TypeID expression_type = 0; // If this expression is a forwarded load, // allow us to reference the original variable. ID loaded_from = 0; // If this expression will never change, we can avoid lots of temporaries // in high level source. // An expression being immutable can be speculative, // it is assumed that this is true almost always. bool immutable = false; // Before use, this expression must be transposed. // This is needed for targets which don't support row_major layouts. bool need_transpose = false; // Whether or not this is an access chain expression. bool access_chain = false; // Whether or not gl_MeshVerticesEXT[].gl_Position (as a whole or .y) is referenced bool access_meshlet_position_y = false; // A list of expressions which this expression depends on. SmallVector expression_dependencies; // By reading this expression, we implicitly read these expressions as well. // Used by access chain Store and Load since we read multiple expressions in this case. SmallVector implied_read_expressions; // The expression was emitted at a certain scope. Lets us track when an expression read means multiple reads. uint32_t emitted_loop_level = 0; SPIRV_CROSS_DECLARE_CLONE(SPIRExpression) }; struct SPIRFunctionPrototype : IVariant { enum { type = TypeFunctionPrototype }; explicit SPIRFunctionPrototype(TypeID return_type_) : return_type(return_type_) { } TypeID return_type; SmallVector parameter_types; SPIRV_CROSS_DECLARE_CLONE(SPIRFunctionPrototype) }; struct SPIRBlock : IVariant { enum { type = TypeBlock }; enum Terminator { Unknown, Direct, // Emit next block directly without a particular condition. Select, // Block ends with an if/else block. MultiSelect, // Block ends with switch statement. Return, // Block ends with return. Unreachable, // Noop Kill, // Discard IgnoreIntersection, // Ray Tracing TerminateRay, // Ray Tracing EmitMeshTasks // Mesh shaders }; enum Merge { MergeNone, MergeLoop, MergeSelection }; enum Hints { HintNone, HintUnroll, HintDontUnroll, HintFlatten, HintDontFlatten }; enum Method { MergeToSelectForLoop, MergeToDirectForLoop, MergeToSelectContinueForLoop }; enum ContinueBlockType { ContinueNone, // Continue block is branchless and has at least one instruction. ForLoop, // Noop continue block. WhileLoop, // Continue block is conditional. DoWhileLoop, // Highly unlikely that anything will use this, // since it is really awkward/impossible to express in GLSL. ComplexLoop }; enum : uint32_t { NoDominator = 0xffffffffu }; Terminator terminator = Unknown; Merge merge = MergeNone; Hints hint = HintNone; BlockID next_block = 0; BlockID merge_block = 0; BlockID continue_block = 0; ID return_value = 0; // If 0, return nothing (void). ID condition = 0; BlockID true_block = 0; BlockID false_block = 0; BlockID default_block = 0; // If terminator is EmitMeshTasksEXT. struct { ID groups[3]; ID payload; } mesh = {}; SmallVector ops; struct Phi { ID local_variable; // flush local variable ... BlockID parent; // If we're in from_block and want to branch into this block ... VariableID function_variable; // to this function-global "phi" variable first. }; // Before entering this block flush out local variables to magical "phi" variables. SmallVector phi_variables; // Declare these temporaries before beginning the block. // Used for handling complex continue blocks which have side effects. SmallVector> declare_temporary; // Declare these temporaries, but only conditionally if this block turns out to be // a complex loop header. SmallVector> potential_declare_temporary; struct Case { uint64_t value; BlockID block; }; SmallVector cases_32bit; SmallVector cases_64bit; // If we have tried to optimize code for this block but failed, // keep track of this. bool disable_block_optimization = false; // If the continue block is complex, fallback to "dumb" for loops. bool complex_continue = false; // Do we need a ladder variable to defer breaking out of a loop construct after a switch block? bool need_ladder_break = false; // If marked, we have explicitly handled Phi from this block, so skip any flushes related to that on a branch. // Used to handle an edge case with switch and case-label fallthrough where fall-through writes to Phi. BlockID ignore_phi_from_block = 0; // The dominating block which this block might be within. // Used in continue; blocks to determine if we really need to write continue. BlockID loop_dominator = 0; // All access to these variables are dominated by this block, // so before branching anywhere we need to make sure that we declare these variables. SmallVector dominated_variables; // These are variables which should be declared in a for loop header, if we // fail to use a classic for-loop, // we remove these variables, and fall back to regular variables outside the loop. SmallVector loop_variables; // Some expressions are control-flow dependent, i.e. any instruction which relies on derivatives or // sub-group-like operations. // Make sure that we only use these expressions in the original block. SmallVector invalidate_expressions; SPIRV_CROSS_DECLARE_CLONE(SPIRBlock) }; struct SPIRFunction : IVariant { enum { type = TypeFunction }; SPIRFunction(TypeID return_type_, TypeID function_type_) : return_type(return_type_) , function_type(function_type_) { } struct Parameter { TypeID type; ID id; uint32_t read_count; uint32_t write_count; // Set to true if this parameter aliases a global variable, // used mostly in Metal where global variables // have to be passed down to functions as regular arguments. // However, for this kind of variable, we should not care about // read and write counts as access to the function arguments // is not local to the function in question. bool alias_global_variable; }; // When calling a function, and we're remapping separate image samplers, // resolve these arguments into combined image samplers and pass them // as additional arguments in this order. // It gets more complicated as functions can pull in their own globals // and combine them with parameters, // so we need to distinguish if something is local parameter index // or a global ID. struct CombinedImageSamplerParameter { VariableID id; VariableID image_id; VariableID sampler_id; bool global_image; bool global_sampler; bool depth; }; TypeID return_type; TypeID function_type; SmallVector arguments; // Can be used by backends to add magic arguments. // Currently used by combined image/sampler implementation. SmallVector shadow_arguments; SmallVector local_variables; BlockID entry_block = 0; SmallVector blocks; SmallVector combined_parameters; struct EntryLine { uint32_t file_id = 0; uint32_t line_literal = 0; }; EntryLine entry_line; void add_local_variable(VariableID id) { local_variables.push_back(id); } void add_parameter(TypeID parameter_type, ID id, bool alias_global_variable = false) { // Arguments are read-only until proven otherwise. arguments.push_back({ parameter_type, id, 0u, 0u, alias_global_variable }); } // Hooks to be run when the function returns. // Mostly used for lowering internal data structures onto flattened structures. // Need to defer this, because they might rely on things which change during compilation. // Intentionally not a small vector, this one is rare, and std::function can be large. Vector> fixup_hooks_out; // Hooks to be run when the function begins. // Mostly used for populating internal data structures from flattened structures. // Need to defer this, because they might rely on things which change during compilation. // Intentionally not a small vector, this one is rare, and std::function can be large. Vector> fixup_hooks_in; // On function entry, make sure to copy a constant array into thread addr space to work around // the case where we are passing a constant array by value to a function on backends which do not // consider arrays value types. SmallVector constant_arrays_needed_on_stack; bool active = false; bool flush_undeclared = true; bool do_combined_parameters = true; SPIRV_CROSS_DECLARE_CLONE(SPIRFunction) }; struct SPIRAccessChain : IVariant { enum { type = TypeAccessChain }; SPIRAccessChain(TypeID basetype_, spv::StorageClass storage_, std::string base_, std::string dynamic_index_, int32_t static_index_) : basetype(basetype_) , storage(storage_) , base(std::move(base_)) , dynamic_index(std::move(dynamic_index_)) , static_index(static_index_) { } // The access chain represents an offset into a buffer. // Some backends need more complicated handling of access chains to be able to use buffers, like HLSL // which has no usable buffer type ala GLSL SSBOs. // StructuredBuffer is too limited, so our only option is to deal with ByteAddressBuffer which works with raw addresses. TypeID basetype; spv::StorageClass storage; std::string base; std::string dynamic_index; int32_t static_index; VariableID loaded_from = 0; uint32_t matrix_stride = 0; uint32_t array_stride = 0; bool row_major_matrix = false; bool immutable = false; // By reading this expression, we implicitly read these expressions as well. // Used by access chain Store and Load since we read multiple expressions in this case. SmallVector implied_read_expressions; SPIRV_CROSS_DECLARE_CLONE(SPIRAccessChain) }; struct SPIRVariable : IVariant { enum { type = TypeVariable }; SPIRVariable() = default; SPIRVariable(TypeID basetype_, spv::StorageClass storage_, ID initializer_ = 0, VariableID basevariable_ = 0) : basetype(basetype_) , storage(storage_) , initializer(initializer_) , basevariable(basevariable_) { } TypeID basetype = 0; spv::StorageClass storage = spv::StorageClassGeneric; uint32_t decoration = 0; ID initializer = 0; VariableID basevariable = 0; SmallVector dereference_chain; bool compat_builtin = false; // If a variable is shadowed, we only statically assign to it // and never actually emit a statement for it. // When we read the variable as an expression, just forward // shadowed_id as the expression. bool statically_assigned = false; ID static_expression = 0; // Temporaries which can remain forwarded as long as this variable is not modified. SmallVector dependees; bool deferred_declaration = false; bool phi_variable = false; // Used to deal with Phi variable flushes. See flush_phi(). bool allocate_temporary_copy = false; bool remapped_variable = false; uint32_t remapped_components = 0; // The block which dominates all access to this variable. BlockID dominator = 0; // If true, this variable is a loop variable, when accessing the variable // outside a loop, // we should statically forward it. bool loop_variable = false; // Set to true while we're inside the for loop. bool loop_variable_enable = false; SPIRFunction::Parameter *parameter = nullptr; SPIRV_CROSS_DECLARE_CLONE(SPIRVariable) }; struct SPIRConstant : IVariant { enum { type = TypeConstant }; union Constant { uint32_t u32; int32_t i32; float f32; uint64_t u64; int64_t i64; double f64; }; struct ConstantVector { Constant r[4]; // If != 0, this element is a specialization constant, and we should keep track of it as such. ID id[4]; uint32_t vecsize = 1; ConstantVector() { memset(r, 0, sizeof(r)); } }; struct ConstantMatrix { ConstantVector c[4]; // If != 0, this column is a specialization constant, and we should keep track of it as such. ID id[4]; uint32_t columns = 1; }; static inline float f16_to_f32(uint16_t u16_value) { // Based on the GLM implementation. int s = (u16_value >> 15) & 0x1; int e = (u16_value >> 10) & 0x1f; int m = (u16_value >> 0) & 0x3ff; union { float f32; uint32_t u32; } u; if (e == 0) { if (m == 0) { u.u32 = uint32_t(s) << 31; return u.f32; } else { while ((m & 0x400) == 0) { m <<= 1; e--; } e++; m &= ~0x400; } } else if (e == 31) { if (m == 0) { u.u32 = (uint32_t(s) << 31) | 0x7f800000u; return u.f32; } else { u.u32 = (uint32_t(s) << 31) | 0x7f800000u | (m << 13); return u.f32; } } e += 127 - 15; m <<= 13; u.u32 = (uint32_t(s) << 31) | (e << 23) | m; return u.f32; } inline uint32_t specialization_constant_id(uint32_t col, uint32_t row) const { return m.c[col].id[row]; } inline uint32_t specialization_constant_id(uint32_t col) const { return m.id[col]; } inline uint32_t scalar(uint32_t col = 0, uint32_t row = 0) const { return m.c[col].r[row].u32; } inline int16_t scalar_i16(uint32_t col = 0, uint32_t row = 0) const { return int16_t(m.c[col].r[row].u32 & 0xffffu); } inline uint16_t scalar_u16(uint32_t col = 0, uint32_t row = 0) const { return uint16_t(m.c[col].r[row].u32 & 0xffffu); } inline int8_t scalar_i8(uint32_t col = 0, uint32_t row = 0) const { return int8_t(m.c[col].r[row].u32 & 0xffu); } inline uint8_t scalar_u8(uint32_t col = 0, uint32_t row = 0) const { return uint8_t(m.c[col].r[row].u32 & 0xffu); } inline float scalar_f16(uint32_t col = 0, uint32_t row = 0) const { return f16_to_f32(scalar_u16(col, row)); } inline float scalar_f32(uint32_t col = 0, uint32_t row = 0) const { return m.c[col].r[row].f32; } inline int32_t scalar_i32(uint32_t col = 0, uint32_t row = 0) const { return m.c[col].r[row].i32; } inline double scalar_f64(uint32_t col = 0, uint32_t row = 0) const { return m.c[col].r[row].f64; } inline int64_t scalar_i64(uint32_t col = 0, uint32_t row = 0) const { return m.c[col].r[row].i64; } inline uint64_t scalar_u64(uint32_t col = 0, uint32_t row = 0) const { return m.c[col].r[row].u64; } inline const ConstantVector &vector() const { return m.c[0]; } inline uint32_t vector_size() const { return m.c[0].vecsize; } inline uint32_t columns() const { return m.columns; } inline void make_null(const SPIRType &constant_type_) { m = {}; m.columns = constant_type_.columns; for (auto &c : m.c) c.vecsize = constant_type_.vecsize; } inline bool constant_is_null() const { if (specialization) return false; if (!subconstants.empty()) return false; for (uint32_t col = 0; col < columns(); col++) for (uint32_t row = 0; row < vector_size(); row++) if (scalar_u64(col, row) != 0) return false; return true; } explicit SPIRConstant(uint32_t constant_type_) : constant_type(constant_type_) { } SPIRConstant() = default; SPIRConstant(TypeID constant_type_, const uint32_t *elements, uint32_t num_elements, bool specialized) : constant_type(constant_type_) , specialization(specialized) { subconstants.reserve(num_elements); for (uint32_t i = 0; i < num_elements; i++) subconstants.push_back(elements[i]); specialization = specialized; } // Construct scalar (32-bit). SPIRConstant(TypeID constant_type_, uint32_t v0, bool specialized) : constant_type(constant_type_) , specialization(specialized) { m.c[0].r[0].u32 = v0; m.c[0].vecsize = 1; m.columns = 1; } // Construct scalar (64-bit). SPIRConstant(TypeID constant_type_, uint64_t v0, bool specialized) : constant_type(constant_type_) , specialization(specialized) { m.c[0].r[0].u64 = v0; m.c[0].vecsize = 1; m.columns = 1; } // Construct vectors and matrices. SPIRConstant(TypeID constant_type_, const SPIRConstant *const *vector_elements, uint32_t num_elements, bool specialized) : constant_type(constant_type_) , specialization(specialized) { bool matrix = vector_elements[0]->m.c[0].vecsize > 1; if (matrix) { m.columns = num_elements; for (uint32_t i = 0; i < num_elements; i++) { m.c[i] = vector_elements[i]->m.c[0]; if (vector_elements[i]->specialization) m.id[i] = vector_elements[i]->self; } } else { m.c[0].vecsize = num_elements; m.columns = 1; for (uint32_t i = 0; i < num_elements; i++) { m.c[0].r[i] = vector_elements[i]->m.c[0].r[0]; if (vector_elements[i]->specialization) m.c[0].id[i] = vector_elements[i]->self; } } } TypeID constant_type = 0; ConstantMatrix m; // If this constant is a specialization constant (i.e. created with OpSpecConstant*). bool specialization = false; // If this constant is used as an array length which creates specialization restrictions on some backends. bool is_used_as_array_length = false; // If true, this is a LUT, and should always be declared in the outer scope. bool is_used_as_lut = false; // For composites which are constant arrays, etc. SmallVector subconstants; // Non-Vulkan GLSL, HLSL and sometimes MSL emits defines for each specialization constant, // and uses them to initialize the constant. This allows the user // to still be able to specialize the value by supplying corresponding // preprocessor directives before compiling the shader. std::string specialization_constant_macro_name; SPIRV_CROSS_DECLARE_CLONE(SPIRConstant) }; // Variants have a very specific allocation scheme. struct ObjectPoolGroup { std::unique_ptr pools[TypeCount]; }; class Variant { public: explicit Variant(ObjectPoolGroup *group_) : group(group_) { } ~Variant() { if (holder) group->pools[type]->deallocate_opaque(holder); } // Marking custom move constructor as noexcept is important. Variant(Variant &&other) SPIRV_CROSS_NOEXCEPT { *this = std::move(other); } // We cannot copy from other variant without our own pool group. // Have to explicitly copy. Variant(const Variant &variant) = delete; // Marking custom move constructor as noexcept is important. Variant &operator=(Variant &&other) SPIRV_CROSS_NOEXCEPT { if (this != &other) { if (holder) group->pools[type]->deallocate_opaque(holder); holder = other.holder; group = other.group; type = other.type; allow_type_rewrite = other.allow_type_rewrite; other.holder = nullptr; other.type = TypeNone; } return *this; } // This copy/clone should only be called in the Compiler constructor. // If this is called inside ::compile(), we invalidate any references we took higher in the stack. // This should never happen. Variant &operator=(const Variant &other) { //#define SPIRV_CROSS_COPY_CONSTRUCTOR_SANITIZE #ifdef SPIRV_CROSS_COPY_CONSTRUCTOR_SANITIZE abort(); #endif if (this != &other) { if (holder) group->pools[type]->deallocate_opaque(holder); if (other.holder) holder = other.holder->clone(group->pools[other.type].get()); else holder = nullptr; type = other.type; allow_type_rewrite = other.allow_type_rewrite; } return *this; } void set(IVariant *val, Types new_type) { if (holder) group->pools[type]->deallocate_opaque(holder); holder = nullptr; if (!allow_type_rewrite && type != TypeNone && type != new_type) { if (val) group->pools[new_type]->deallocate_opaque(val); SPIRV_CROSS_THROW("Overwriting a variant with new type."); } holder = val; type = new_type; allow_type_rewrite = false; } template T *allocate_and_set(Types new_type, Ts &&... ts) { T *val = static_cast &>(*group->pools[new_type]).allocate(std::forward(ts)...); set(val, new_type); return val; } template T &get() { if (!holder) SPIRV_CROSS_THROW("nullptr"); if (static_cast(T::type) != type) SPIRV_CROSS_THROW("Bad cast"); return *static_cast(holder); } template const T &get() const { if (!holder) SPIRV_CROSS_THROW("nullptr"); if (static_cast(T::type) != type) SPIRV_CROSS_THROW("Bad cast"); return *static_cast(holder); } Types get_type() const { return type; } ID get_id() const { return holder ? holder->self : ID(0); } bool empty() const { return !holder; } void reset() { if (holder) group->pools[type]->deallocate_opaque(holder); holder = nullptr; type = TypeNone; } void set_allow_type_rewrite() { allow_type_rewrite = true; } private: ObjectPoolGroup *group = nullptr; IVariant *holder = nullptr; Types type = TypeNone; bool allow_type_rewrite = false; }; template T &variant_get(Variant &var) { return var.get(); } template const T &variant_get(const Variant &var) { return var.get(); } template T &variant_set(Variant &var, P &&... args) { auto *ptr = var.allocate_and_set(static_cast(T::type), std::forward

(args)...); return *ptr; } struct AccessChainMeta { uint32_t storage_physical_type = 0; bool need_transpose = false; bool storage_is_packed = false; bool storage_is_invariant = false; bool flattened_struct = false; bool relaxed_precision = false; bool access_meshlet_position_y = false; }; enum ExtendedDecorations { // Marks if a buffer block is re-packed, i.e. member declaration might be subject to PhysicalTypeID remapping and padding. SPIRVCrossDecorationBufferBlockRepacked = 0, // A type in a buffer block might be declared with a different physical type than the logical type. // If this is not set, PhysicalTypeID == the SPIR-V type as declared. SPIRVCrossDecorationPhysicalTypeID, // Marks if the physical type is to be declared with tight packing rules, i.e. packed_floatN on MSL and friends. // If this is set, PhysicalTypeID might also be set. It can be set to same as logical type if all we're doing // is converting float3 to packed_float3 for example. // If this is marked on a struct, it means the struct itself must use only Packed types for all its members. SPIRVCrossDecorationPhysicalTypePacked, // The padding in bytes before declaring this struct member. // If used on a struct type, marks the target size of a struct. SPIRVCrossDecorationPaddingTarget, SPIRVCrossDecorationInterfaceMemberIndex, SPIRVCrossDecorationInterfaceOrigID, SPIRVCrossDecorationResourceIndexPrimary, // Used for decorations like resource indices for samplers when part of combined image samplers. // A variable might need to hold two resource indices in this case. SPIRVCrossDecorationResourceIndexSecondary, // Used for resource indices for multiplanar images when part of combined image samplers. SPIRVCrossDecorationResourceIndexTertiary, SPIRVCrossDecorationResourceIndexQuaternary, // Marks a buffer block for using explicit offsets (GLSL/HLSL). SPIRVCrossDecorationExplicitOffset, // Apply to a variable in the Input storage class; marks it as holding the base group passed to vkCmdDispatchBase(), // or the base vertex and instance indices passed to vkCmdDrawIndexed(). // In MSL, this is used to adjust the WorkgroupId and GlobalInvocationId variables in compute shaders, // and to hold the BaseVertex and BaseInstance variables in vertex shaders. SPIRVCrossDecorationBuiltInDispatchBase, // Apply to a variable that is a function parameter; marks it as being a "dynamic" // combined image-sampler. In MSL, this is used when a function parameter might hold // either a regular combined image-sampler or one that has an attached sampler // Y'CbCr conversion. SPIRVCrossDecorationDynamicImageSampler, // Apply to a variable in the Input storage class; marks it as holding the size of the stage // input grid. // In MSL, this is used to hold the vertex and instance counts in a tessellation pipeline // vertex shader. SPIRVCrossDecorationBuiltInStageInputSize, // Apply to any access chain of a tessellation I/O variable; stores the type of the sub-object // that was chained to, as recorded in the input variable itself. This is used in case the pointer // is itself used as the base of an access chain, to calculate the original type of the sub-object // chained to, in case a swizzle needs to be applied. This should not happen normally with valid // SPIR-V, but the MSL backend can change the type of input variables, necessitating the // addition of swizzles to keep the generated code compiling. SPIRVCrossDecorationTessIOOriginalInputTypeID, // Apply to any access chain of an interface variable used with pull-model interpolation, where the variable is a // vector but the resulting pointer is a scalar; stores the component index that is to be accessed by the chain. // This is used when emitting calls to interpolation functions on the chain in MSL: in this case, the component // must be applied to the result, since pull-model interpolants in MSL cannot be swizzled directly, but the // results of interpolation can. SPIRVCrossDecorationInterpolantComponentExpr, // Apply to any struct type that is used in the Workgroup storage class. // This causes matrices in MSL prior to Metal 3.0 to be emitted using a special // class that is convertible to the standard matrix type, to work around the // lack of constructors in the 'threadgroup' address space. SPIRVCrossDecorationWorkgroupStruct, SPIRVCrossDecorationCount }; struct Meta { struct Decoration { std::string alias; std::string qualified_alias; std::string hlsl_semantic; std::string user_type; Bitset decoration_flags; spv::BuiltIn builtin_type = spv::BuiltInMax; uint32_t location = 0; uint32_t component = 0; uint32_t set = 0; uint32_t binding = 0; uint32_t offset = 0; uint32_t xfb_buffer = 0; uint32_t xfb_stride = 0; uint32_t stream = 0; uint32_t array_stride = 0; uint32_t matrix_stride = 0; uint32_t input_attachment = 0; uint32_t spec_id = 0; uint32_t index = 0; spv::FPRoundingMode fp_rounding_mode = spv::FPRoundingModeMax; bool builtin = false; struct Extended { Extended() { // MSVC 2013 workaround to init like this. for (auto &v : values) v = 0; } Bitset flags; uint32_t values[SPIRVCrossDecorationCount]; } extended; }; Decoration decoration; // Intentionally not a SmallVector. Decoration is large and somewhat rare. Vector members; std::unordered_map decoration_word_offset; // For SPV_GOOGLE_hlsl_functionality1. bool hlsl_is_magic_counter_buffer = false; // ID for the sibling counter buffer. uint32_t hlsl_magic_counter_buffer = 0; }; // A user callback that remaps the type of any variable. // var_name is the declared name of the variable. // name_of_type is the textual name of the type which will be used in the code unless written to by the callback. using VariableTypeRemapCallback = std::function; class Hasher { public: inline void u32(uint32_t value) { h = (h * 0x100000001b3ull) ^ value; } inline uint64_t get() const { return h; } private: uint64_t h = 0xcbf29ce484222325ull; }; static inline bool type_is_floating_point(const SPIRType &type) { return type.basetype == SPIRType::Half || type.basetype == SPIRType::Float || type.basetype == SPIRType::Double; } static inline bool type_is_integral(const SPIRType &type) { return type.basetype == SPIRType::SByte || type.basetype == SPIRType::UByte || type.basetype == SPIRType::Short || type.basetype == SPIRType::UShort || type.basetype == SPIRType::Int || type.basetype == SPIRType::UInt || type.basetype == SPIRType::Int64 || type.basetype == SPIRType::UInt64; } static inline SPIRType::BaseType to_signed_basetype(uint32_t width) { switch (width) { case 8: return SPIRType::SByte; case 16: return SPIRType::Short; case 32: return SPIRType::Int; case 64: return SPIRType::Int64; default: SPIRV_CROSS_THROW("Invalid bit width."); } } static inline SPIRType::BaseType to_unsigned_basetype(uint32_t width) { switch (width) { case 8: return SPIRType::UByte; case 16: return SPIRType::UShort; case 32: return SPIRType::UInt; case 64: return SPIRType::UInt64; default: SPIRV_CROSS_THROW("Invalid bit width."); } } // Returns true if an arithmetic operation does not change behavior depending on signedness. static inline bool opcode_is_sign_invariant(spv::Op opcode) { switch (opcode) { case spv::OpIEqual: case spv::OpINotEqual: case spv::OpISub: case spv::OpIAdd: case spv::OpIMul: case spv::OpShiftLeftLogical: case spv::OpBitwiseOr: case spv::OpBitwiseXor: case spv::OpBitwiseAnd: return true; default: return false; } } static inline bool opcode_can_promote_integer_implicitly(spv::Op opcode) { switch (opcode) { case spv::OpSNegate: case spv::OpNot: case spv::OpBitwiseAnd: case spv::OpBitwiseOr: case spv::OpBitwiseXor: case spv::OpShiftLeftLogical: case spv::OpShiftRightLogical: case spv::OpShiftRightArithmetic: case spv::OpIAdd: case spv::OpISub: case spv::OpIMul: case spv::OpSDiv: case spv::OpUDiv: case spv::OpSRem: case spv::OpUMod: case spv::OpSMod: return true; default: return false; } } struct SetBindingPair { uint32_t desc_set; uint32_t binding; inline bool operator==(const SetBindingPair &other) const { return desc_set == other.desc_set && binding == other.binding; } inline bool operator<(const SetBindingPair &other) const { return desc_set < other.desc_set || (desc_set == other.desc_set && binding < other.binding); } }; struct LocationComponentPair { uint32_t location; uint32_t component; inline bool operator==(const LocationComponentPair &other) const { return location == other.location && component == other.component; } inline bool operator<(const LocationComponentPair &other) const { return location < other.location || (location == other.location && component < other.component); } }; struct StageSetBinding { spv::ExecutionModel model; uint32_t desc_set; uint32_t binding; inline bool operator==(const StageSetBinding &other) const { return model == other.model && desc_set == other.desc_set && binding == other.binding; } }; struct InternalHasher { inline size_t operator()(const SetBindingPair &value) const { // Quality of hash doesn't really matter here. auto hash_set = std::hash()(value.desc_set); auto hash_binding = std::hash()(value.binding); return (hash_set * 0x10001b31) ^ hash_binding; } inline size_t operator()(const LocationComponentPair &value) const { // Quality of hash doesn't really matter here. auto hash_set = std::hash()(value.location); auto hash_binding = std::hash()(value.component); return (hash_set * 0x10001b31) ^ hash_binding; } inline size_t operator()(const StageSetBinding &value) const { // Quality of hash doesn't really matter here. auto hash_model = std::hash()(value.model); auto hash_set = std::hash()(value.desc_set); auto tmp_hash = (hash_model * 0x10001b31) ^ hash_set; return (tmp_hash * 0x10001b31) ^ value.binding; } }; // Special constant used in a {MSL,HLSL}ResourceBinding desc_set // element to indicate the bindings for the push constants. static const uint32_t ResourceBindingPushConstantDescriptorSet = ~(0u); // Special constant used in a {MSL,HLSL}ResourceBinding binding // element to indicate the bindings for the push constants. static const uint32_t ResourceBindingPushConstantBinding = 0; } // namespace SPIRV_CROSS_NAMESPACE namespace std { template struct hash> { size_t operator()(const SPIRV_CROSS_NAMESPACE::TypedID &value) const { return std::hash()(value); } }; } // namespace std #endif ================================================ FILE: src/libraries/spirv_cross/spirv_cpp.cpp ================================================ /* * Copyright 2015-2021 Arm Limited * SPDX-License-Identifier: Apache-2.0 OR MIT * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* * At your option, you may choose to accept this material under either: * 1. The Apache License, Version 2.0, found at , or * 2. The MIT License, found at . */ #include "spirv_cpp.hpp" using namespace spv; using namespace SPIRV_CROSS_NAMESPACE; using namespace std; void CompilerCPP::emit_buffer_block(const SPIRVariable &var) { add_resource_name(var.self); auto &type = get(var.basetype); auto instance_name = to_name(var.self); uint32_t descriptor_set = ir.meta[var.self].decoration.set; uint32_t binding = ir.meta[var.self].decoration.binding; emit_block_struct(type); auto buffer_name = to_name(type.self); statement("internal::Resource<", buffer_name, type_to_array_glsl(type), "> ", instance_name, "__;"); statement_no_indent("#define ", instance_name, " __res->", instance_name, "__.get()"); resource_registrations.push_back( join("s.register_resource(", instance_name, "__", ", ", descriptor_set, ", ", binding, ");")); statement(""); } void CompilerCPP::emit_interface_block(const SPIRVariable &var) { add_resource_name(var.self); auto &type = get(var.basetype); const char *qual = var.storage == StorageClassInput ? "StageInput" : "StageOutput"; const char *lowerqual = var.storage == StorageClassInput ? "stage_input" : "stage_output"; auto instance_name = to_name(var.self); uint32_t location = ir.meta[var.self].decoration.location; string buffer_name; auto flags = ir.meta[type.self].decoration.decoration_flags; if (flags.get(DecorationBlock)) { emit_block_struct(type); buffer_name = to_name(type.self); } else buffer_name = type_to_glsl(type); statement("internal::", qual, "<", buffer_name, type_to_array_glsl(type), "> ", instance_name, "__;"); statement_no_indent("#define ", instance_name, " __res->", instance_name, "__.get()"); resource_registrations.push_back(join("s.register_", lowerqual, "(", instance_name, "__", ", ", location, ");")); statement(""); } void CompilerCPP::emit_shared(const SPIRVariable &var) { add_resource_name(var.self); auto instance_name = to_name(var.self); statement(CompilerGLSL::variable_decl(var), ";"); statement_no_indent("#define ", instance_name, " __res->", instance_name); } void CompilerCPP::emit_uniform(const SPIRVariable &var) { add_resource_name(var.self); auto &type = get(var.basetype); auto instance_name = to_name(var.self); uint32_t descriptor_set = ir.meta[var.self].decoration.set; uint32_t binding = ir.meta[var.self].decoration.binding; uint32_t location = ir.meta[var.self].decoration.location; string type_name = type_to_glsl(type); remap_variable_type_name(type, instance_name, type_name); if (type.basetype == SPIRType::Image || type.basetype == SPIRType::SampledImage || type.basetype == SPIRType::AtomicCounter) { statement("internal::Resource<", type_name, type_to_array_glsl(type), "> ", instance_name, "__;"); statement_no_indent("#define ", instance_name, " __res->", instance_name, "__.get()"); resource_registrations.push_back( join("s.register_resource(", instance_name, "__", ", ", descriptor_set, ", ", binding, ");")); } else { statement("internal::UniformConstant<", type_name, type_to_array_glsl(type), "> ", instance_name, "__;"); statement_no_indent("#define ", instance_name, " __res->", instance_name, "__.get()"); resource_registrations.push_back( join("s.register_uniform_constant(", instance_name, "__", ", ", location, ");")); } statement(""); } void CompilerCPP::emit_push_constant_block(const SPIRVariable &var) { add_resource_name(var.self); auto &type = get(var.basetype); auto &flags = ir.meta[var.self].decoration.decoration_flags; if (flags.get(DecorationBinding) || flags.get(DecorationDescriptorSet)) SPIRV_CROSS_THROW("Push constant blocks cannot be compiled to GLSL with Binding or Set syntax. " "Remap to location with reflection API first or disable these decorations."); emit_block_struct(type); auto buffer_name = to_name(type.self); auto instance_name = to_name(var.self); statement("internal::PushConstant<", buffer_name, type_to_array_glsl(type), "> ", instance_name, ";"); statement_no_indent("#define ", instance_name, " __res->", instance_name, ".get()"); resource_registrations.push_back(join("s.register_push_constant(", instance_name, "__", ");")); statement(""); } void CompilerCPP::emit_block_struct(SPIRType &type) { // C++ can't do interface blocks, so we fake it by emitting a separate struct. // However, these structs are not allowed to alias anything, so remove it before // emitting the struct. // // The type we have here needs to be resolved to the non-pointer type so we can remove aliases. auto &self = get(type.self); self.type_alias = 0; emit_struct(self); } void CompilerCPP::emit_resources() { for (auto &id : ir.ids) { if (id.get_type() == TypeConstant) { auto &c = id.get(); bool needs_declaration = c.specialization || c.is_used_as_lut; if (needs_declaration) { if (!options.vulkan_semantics && c.specialization) { c.specialization_constant_macro_name = constant_value_macro_name(get_decoration(c.self, DecorationSpecId)); } emit_constant(c); } } else if (id.get_type() == TypeConstantOp) { emit_specialization_constant_op(id.get()); } } // Output all basic struct types which are not Block or BufferBlock as these are declared inplace // when such variables are instantiated. for (auto &id : ir.ids) { if (id.get_type() == TypeType) { auto &type = id.get(); if (type.basetype == SPIRType::Struct && type.array.empty() && !type.pointer && (!ir.meta[type.self].decoration.decoration_flags.get(DecorationBlock) && !ir.meta[type.self].decoration.decoration_flags.get(DecorationBufferBlock))) { emit_struct(type); } } } statement("struct Resources : ", resource_type); begin_scope(); // Output UBOs and SSBOs for (auto &id : ir.ids) { if (id.get_type() == TypeVariable) { auto &var = id.get(); auto &type = get(var.basetype); if (var.storage != StorageClassFunction && type.pointer && type.storage == StorageClassUniform && !is_hidden_variable(var) && (ir.meta[type.self].decoration.decoration_flags.get(DecorationBlock) || ir.meta[type.self].decoration.decoration_flags.get(DecorationBufferBlock))) { emit_buffer_block(var); } } } // Output push constant blocks for (auto &id : ir.ids) { if (id.get_type() == TypeVariable) { auto &var = id.get(); auto &type = get(var.basetype); if (!is_hidden_variable(var) && var.storage != StorageClassFunction && type.pointer && type.storage == StorageClassPushConstant) { emit_push_constant_block(var); } } } // Output in/out interfaces. for (auto &id : ir.ids) { if (id.get_type() == TypeVariable) { auto &var = id.get(); auto &type = get(var.basetype); if (var.storage != StorageClassFunction && !is_hidden_variable(var) && type.pointer && (var.storage == StorageClassInput || var.storage == StorageClassOutput) && interface_variable_exists_in_entry_point(var.self)) { emit_interface_block(var); } } } // Output Uniform Constants (values, samplers, images, etc). for (auto &id : ir.ids) { if (id.get_type() == TypeVariable) { auto &var = id.get(); auto &type = get(var.basetype); if (var.storage != StorageClassFunction && !is_hidden_variable(var) && type.pointer && (type.storage == StorageClassUniformConstant || type.storage == StorageClassAtomicCounter)) { emit_uniform(var); } } } // Global variables. bool emitted = false; for (auto global : global_variables) { auto &var = get(global); if (var.storage == StorageClassWorkgroup) { emit_shared(var); emitted = true; } } if (emitted) statement(""); statement("inline void init(spirv_cross_shader& s)"); begin_scope(); statement(resource_type, "::init(s);"); for (auto ® : resource_registrations) statement(reg); end_scope(); resource_registrations.clear(); end_scope_decl(); statement(""); statement("Resources* __res;"); if (get_entry_point().model == ExecutionModelGLCompute) statement("ComputePrivateResources __priv_res;"); statement(""); // Emit regular globals which are allocated per invocation. emitted = false; for (auto global : global_variables) { auto &var = get(global); if (var.storage == StorageClassPrivate) { if (var.storage == StorageClassWorkgroup) emit_shared(var); else statement(CompilerGLSL::variable_decl(var), ";"); emitted = true; } } if (emitted) statement(""); } string CompilerCPP::compile() { ir.fixup_reserved_names(); // Do not deal with ES-isms like precision, older extensions and such. options.es = false; options.version = 450; backend.float_literal_suffix = true; backend.double_literal_suffix = false; backend.long_long_literal_suffix = true; backend.uint32_t_literal_suffix = true; backend.basic_int_type = "int32_t"; backend.basic_uint_type = "uint32_t"; backend.swizzle_is_function = true; backend.shared_is_implied = true; backend.unsized_array_supported = false; backend.explicit_struct_type = true; backend.use_initializer_list = true; fixup_type_alias(); reorder_type_alias(); build_function_control_flow_graphs_and_analyze(); update_active_builtins(); uint32_t pass_count = 0; do { resource_registrations.clear(); reset(pass_count); // Move constructor for this type is broken on GCC 4.9 ... buffer.reset(); emit_header(); emit_resources(); emit_function(get(ir.default_entry_point), Bitset()); pass_count++; } while (is_forcing_recompilation()); // Match opening scope of emit_header(). end_scope_decl(); // namespace end_scope(); // Emit C entry points emit_c_linkage(); // Entry point in CPP is always main() for the time being. get_entry_point().name = "main"; return buffer.str(); } void CompilerCPP::emit_c_linkage() { statement(""); statement("spirv_cross_shader_t *spirv_cross_construct(void)"); begin_scope(); statement("return new ", impl_type, "();"); end_scope(); statement(""); statement("void spirv_cross_destruct(spirv_cross_shader_t *shader)"); begin_scope(); statement("delete static_cast<", impl_type, "*>(shader);"); end_scope(); statement(""); statement("void spirv_cross_invoke(spirv_cross_shader_t *shader)"); begin_scope(); statement("static_cast<", impl_type, "*>(shader)->invoke();"); end_scope(); statement(""); statement("static const struct spirv_cross_interface vtable ="); begin_scope(); statement("spirv_cross_construct,"); statement("spirv_cross_destruct,"); statement("spirv_cross_invoke,"); end_scope_decl(); statement(""); statement("const struct spirv_cross_interface *", interface_name.empty() ? string("spirv_cross_get_interface") : interface_name, "(void)"); begin_scope(); statement("return &vtable;"); end_scope(); } void CompilerCPP::emit_function_prototype(SPIRFunction &func, const Bitset &) { if (func.self != ir.default_entry_point) add_function_overload(func); local_variable_names = resource_names; string decl; auto &type = get(func.return_type); decl += "inline "; decl += type_to_glsl(type); decl += " "; if (func.self == ir.default_entry_point) { decl += "main"; processing_entry_point = true; } else decl += to_name(func.self); decl += "("; for (auto &arg : func.arguments) { add_local_variable_name(arg.id); decl += argument_decl(arg); if (&arg != &func.arguments.back()) decl += ", "; // Hold a pointer to the parameter so we can invalidate the readonly field if needed. auto *var = maybe_get(arg.id); if (var) var->parameter = &arg; } decl += ")"; statement(decl); } string CompilerCPP::argument_decl(const SPIRFunction::Parameter &arg) { auto &type = expression_type(arg.id); bool constref = !type.pointer || arg.write_count == 0; auto &var = get(arg.id); string base = type_to_glsl(type); string variable_name = to_name(var.self); remap_variable_type_name(type, variable_name, base); for (uint32_t i = 0; i < type.array.size(); i++) base = join("std::array<", base, ", ", to_array_size(type, i), ">"); return join(constref ? "const " : "", base, " &", variable_name); } string CompilerCPP::variable_decl(const SPIRType &type, const string &name, uint32_t /* id */) { string base = type_to_glsl(type); remap_variable_type_name(type, name, base); bool runtime = false; for (uint32_t i = 0; i < type.array.size(); i++) { auto &array = type.array[i]; if (!array && type.array_size_literal[i]) { // Avoid using runtime arrays with std::array since this is undefined. // Runtime arrays cannot be passed around as values, so this is fine. runtime = true; } else base = join("std::array<", base, ", ", to_array_size(type, i), ">"); } base += ' '; return base + name + (runtime ? "[1]" : ""); } void CompilerCPP::emit_header() { auto &execution = get_entry_point(); statement("// This C++ shader is autogenerated by spirv-cross."); statement("#include \"spirv_cross/internal_interface.hpp\""); statement("#include \"spirv_cross/external_interface.h\""); // Needed to properly implement GLSL-style arrays. statement("#include "); statement("#include "); statement(""); statement("using namespace spirv_cross;"); statement("using namespace glm;"); statement(""); statement("namespace Impl"); begin_scope(); switch (execution.model) { case ExecutionModelGeometry: case ExecutionModelTessellationControl: case ExecutionModelTessellationEvaluation: case ExecutionModelGLCompute: case ExecutionModelFragment: case ExecutionModelVertex: statement("struct Shader"); begin_scope(); break; default: SPIRV_CROSS_THROW("Unsupported execution model."); } switch (execution.model) { case ExecutionModelGeometry: impl_type = "GeometryShader"; resource_type = "GeometryResources"; break; case ExecutionModelVertex: impl_type = "VertexShader"; resource_type = "VertexResources"; break; case ExecutionModelFragment: impl_type = "FragmentShader"; resource_type = "FragmentResources"; break; case ExecutionModelGLCompute: impl_type = join("ComputeShader"); resource_type = "ComputeResources"; break; case ExecutionModelTessellationControl: impl_type = "TessControlShader"; resource_type = "TessControlResources"; break; case ExecutionModelTessellationEvaluation: impl_type = "TessEvaluationShader"; resource_type = "TessEvaluationResources"; break; default: SPIRV_CROSS_THROW("Unsupported execution model."); } } ================================================ FILE: src/libraries/spirv_cross/spirv_cpp.hpp ================================================ /* * Copyright 2015-2021 Arm Limited * SPDX-License-Identifier: Apache-2.0 OR MIT * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* * At your option, you may choose to accept this material under either: * 1. The Apache License, Version 2.0, found at , or * 2. The MIT License, found at . */ #ifndef SPIRV_CROSS_CPP_HPP #define SPIRV_CROSS_CPP_HPP #include "spirv_glsl.hpp" #include namespace SPIRV_CROSS_NAMESPACE { class CompilerCPP : public CompilerGLSL { public: explicit CompilerCPP(std::vector spirv_) : CompilerGLSL(std::move(spirv_)) { } CompilerCPP(const uint32_t *ir_, size_t word_count) : CompilerGLSL(ir_, word_count) { } explicit CompilerCPP(const ParsedIR &ir_) : CompilerGLSL(ir_) { } explicit CompilerCPP(ParsedIR &&ir_) : CompilerGLSL(std::move(ir_)) { } std::string compile() override; // Sets a custom symbol name that can override // spirv_cross_get_interface. // // Useful when several shader interfaces are linked // statically into the same binary. void set_interface_name(std::string name) { interface_name = std::move(name); } private: void emit_header() override; void emit_c_linkage(); void emit_function_prototype(SPIRFunction &func, const Bitset &return_flags) override; void emit_resources(); void emit_buffer_block(const SPIRVariable &type) override; void emit_push_constant_block(const SPIRVariable &var) override; void emit_interface_block(const SPIRVariable &type); void emit_block_chain(SPIRBlock &block); void emit_uniform(const SPIRVariable &var) override; void emit_shared(const SPIRVariable &var); void emit_block_struct(SPIRType &type); std::string variable_decl(const SPIRType &type, const std::string &name, uint32_t id) override; std::string argument_decl(const SPIRFunction::Parameter &arg); SmallVector resource_registrations; std::string impl_type; std::string resource_type; uint32_t shared_counter = 0; std::string interface_name; }; } // namespace SPIRV_CROSS_NAMESPACE #endif ================================================ FILE: src/libraries/spirv_cross/spirv_cross.cpp ================================================ /* * Copyright 2015-2021 Arm Limited * SPDX-License-Identifier: Apache-2.0 OR MIT * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* * At your option, you may choose to accept this material under either: * 1. The Apache License, Version 2.0, found at , or * 2. The MIT License, found at . */ #include "spirv_cross.hpp" #include "GLSL.std.450.h" #include "spirv_cfg.hpp" #include "spirv_common.hpp" #include "spirv_parser.hpp" #include #include #include using namespace std; using namespace spv; using namespace SPIRV_CROSS_NAMESPACE; Compiler::Compiler(vector ir_) { Parser parser(std::move(ir_)); parser.parse(); set_ir(std::move(parser.get_parsed_ir())); } Compiler::Compiler(const uint32_t *ir_, size_t word_count) { Parser parser(ir_, word_count); parser.parse(); set_ir(std::move(parser.get_parsed_ir())); } Compiler::Compiler(const ParsedIR &ir_) { set_ir(ir_); } Compiler::Compiler(ParsedIR &&ir_) { set_ir(std::move(ir_)); } void Compiler::set_ir(ParsedIR &&ir_) { ir = std::move(ir_); parse_fixup(); } void Compiler::set_ir(const ParsedIR &ir_) { ir = ir_; parse_fixup(); } string Compiler::compile() { return ""; } bool Compiler::variable_storage_is_aliased(const SPIRVariable &v) { auto &type = get(v.basetype); bool ssbo = v.storage == StorageClassStorageBuffer || ir.meta[type.self].decoration.decoration_flags.get(DecorationBufferBlock); bool image = type.basetype == SPIRType::Image; bool counter = type.basetype == SPIRType::AtomicCounter; bool buffer_reference = type.storage == StorageClassPhysicalStorageBufferEXT; bool is_restrict; if (ssbo) is_restrict = ir.get_buffer_block_flags(v).get(DecorationRestrict); else is_restrict = has_decoration(v.self, DecorationRestrict); return !is_restrict && (ssbo || image || counter || buffer_reference); } bool Compiler::block_is_pure(const SPIRBlock &block) { // This is a global side effect of the function. if (block.terminator == SPIRBlock::Kill || block.terminator == SPIRBlock::TerminateRay || block.terminator == SPIRBlock::IgnoreIntersection || block.terminator == SPIRBlock::EmitMeshTasks) return false; for (auto &i : block.ops) { auto ops = stream(i); auto op = static_cast(i.op); switch (op) { case OpFunctionCall: { uint32_t func = ops[2]; if (!function_is_pure(get(func))) return false; break; } case OpCopyMemory: case OpStore: { auto &type = expression_type(ops[0]); if (type.storage != StorageClassFunction) return false; break; } case OpImageWrite: return false; // Atomics are impure. case OpAtomicLoad: case OpAtomicStore: case OpAtomicExchange: case OpAtomicCompareExchange: case OpAtomicCompareExchangeWeak: case OpAtomicIIncrement: case OpAtomicIDecrement: case OpAtomicIAdd: case OpAtomicISub: case OpAtomicSMin: case OpAtomicUMin: case OpAtomicSMax: case OpAtomicUMax: case OpAtomicAnd: case OpAtomicOr: case OpAtomicXor: return false; // Geometry shader builtins modify global state. case OpEndPrimitive: case OpEmitStreamVertex: case OpEndStreamPrimitive: case OpEmitVertex: return false; // Mesh shader functions modify global state. // (EmitMeshTasks is a terminator). case OpSetMeshOutputsEXT: return false; // Barriers disallow any reordering, so we should treat blocks with barrier as writing. case OpControlBarrier: case OpMemoryBarrier: return false; // Ray tracing builtins are impure. case OpReportIntersectionKHR: case OpIgnoreIntersectionNV: case OpTerminateRayNV: case OpTraceNV: case OpTraceRayKHR: case OpExecuteCallableNV: case OpExecuteCallableKHR: case OpRayQueryInitializeKHR: case OpRayQueryTerminateKHR: case OpRayQueryGenerateIntersectionKHR: case OpRayQueryConfirmIntersectionKHR: case OpRayQueryProceedKHR: // There are various getters in ray query, but they are considered pure. return false; // OpExtInst is potentially impure depending on extension, but GLSL builtins are at least pure. case OpDemoteToHelperInvocationEXT: // This is a global side effect of the function. return false; case OpExtInst: { uint32_t extension_set = ops[2]; if (get(extension_set).ext == SPIRExtension::GLSL) { auto op_450 = static_cast(ops[3]); switch (op_450) { case GLSLstd450Modf: case GLSLstd450Frexp: { auto &type = expression_type(ops[5]); if (type.storage != StorageClassFunction) return false; break; } default: break; } } break; } default: break; } } return true; } string Compiler::to_name(uint32_t id, bool allow_alias) const { if (allow_alias && ir.ids[id].get_type() == TypeType) { // If this type is a simple alias, emit the // name of the original type instead. // We don't want to override the meta alias // as that can be overridden by the reflection APIs after parse. auto &type = get(id); if (type.type_alias) { // If the alias master has been specially packed, we will have emitted a clean variant as well, // so skip the name aliasing here. if (!has_extended_decoration(type.type_alias, SPIRVCrossDecorationBufferBlockRepacked)) return to_name(type.type_alias); } } auto &alias = ir.get_name(id); if (alias.empty()) return join("_", id); else return alias; } bool Compiler::function_is_pure(const SPIRFunction &func) { for (auto block : func.blocks) { if (!block_is_pure(get(block))) { //fprintf(stderr, "Function %s is impure!\n", to_name(func.self).c_str()); return false; } } //fprintf(stderr, "Function %s is pure!\n", to_name(func.self).c_str()); return true; } void Compiler::register_global_read_dependencies(const SPIRBlock &block, uint32_t id) { for (auto &i : block.ops) { auto ops = stream(i); auto op = static_cast(i.op); switch (op) { case OpFunctionCall: { uint32_t func = ops[2]; register_global_read_dependencies(get(func), id); break; } case OpLoad: case OpImageRead: { // If we're in a storage class which does not get invalidated, adding dependencies here is no big deal. auto *var = maybe_get_backing_variable(ops[2]); if (var && var->storage != StorageClassFunction) { auto &type = get(var->basetype); // InputTargets are immutable. if (type.basetype != SPIRType::Image && type.image.dim != DimSubpassData) var->dependees.push_back(id); } break; } default: break; } } } void Compiler::register_global_read_dependencies(const SPIRFunction &func, uint32_t id) { for (auto block : func.blocks) register_global_read_dependencies(get(block), id); } SPIRVariable *Compiler::maybe_get_backing_variable(uint32_t chain) { auto *var = maybe_get(chain); if (!var) { auto *cexpr = maybe_get(chain); if (cexpr) var = maybe_get(cexpr->loaded_from); auto *access_chain = maybe_get(chain); if (access_chain) var = maybe_get(access_chain->loaded_from); } return var; } void Compiler::register_read(uint32_t expr, uint32_t chain, bool forwarded) { auto &e = get(expr); auto *var = maybe_get_backing_variable(chain); if (var) { e.loaded_from = var->self; // If the backing variable is immutable, we do not need to depend on the variable. if (forwarded && !is_immutable(var->self)) var->dependees.push_back(e.self); // If we load from a parameter, make sure we create "inout" if we also write to the parameter. // The default is "in" however, so we never invalidate our compilation by reading. if (var && var->parameter) var->parameter->read_count++; } } void Compiler::register_write(uint32_t chain) { auto *var = maybe_get(chain); if (!var) { // If we're storing through an access chain, invalidate the backing variable instead. auto *expr = maybe_get(chain); if (expr && expr->loaded_from) var = maybe_get(expr->loaded_from); auto *access_chain = maybe_get(chain); if (access_chain && access_chain->loaded_from) var = maybe_get(access_chain->loaded_from); } auto &chain_type = expression_type(chain); if (var) { bool check_argument_storage_qualifier = true; auto &type = expression_type(chain); // If our variable is in a storage class which can alias with other buffers, // invalidate all variables which depend on aliased variables. And if this is a // variable pointer, then invalidate all variables regardless. if (get_variable_data_type(*var).pointer) { flush_all_active_variables(); if (type.pointer_depth == 1) { // We have a backing variable which is a pointer-to-pointer type. // We are storing some data through a pointer acquired through that variable, // but we are not writing to the value of the variable itself, // i.e., we are not modifying the pointer directly. // If we are storing a non-pointer type (pointer_depth == 1), // we know that we are storing some unrelated data. // A case here would be // void foo(Foo * const *arg) { // Foo *bar = *arg; // bar->unrelated = 42; // } // arg, the argument is constant. check_argument_storage_qualifier = false; } } if (type.storage == StorageClassPhysicalStorageBufferEXT || variable_storage_is_aliased(*var)) flush_all_aliased_variables(); else if (var) flush_dependees(*var); // We tried to write to a parameter which is not marked with out qualifier, force a recompile. if (check_argument_storage_qualifier && var->parameter && var->parameter->write_count == 0) { var->parameter->write_count++; force_recompile(); } } else if (chain_type.pointer) { // If we stored through a variable pointer, then we don't know which // variable we stored to. So *all* expressions after this point need to // be invalidated. // FIXME: If we can prove that the variable pointer will point to // only certain variables, we can invalidate only those. flush_all_active_variables(); } // If chain_type.pointer is false, we're not writing to memory backed variables, but temporaries instead. // This can happen in copy_logical_type where we unroll complex reads and writes to temporaries. } void Compiler::flush_dependees(SPIRVariable &var) { for (auto expr : var.dependees) invalid_expressions.insert(expr); var.dependees.clear(); } void Compiler::flush_all_aliased_variables() { for (auto aliased : aliased_variables) flush_dependees(get(aliased)); } void Compiler::flush_all_atomic_capable_variables() { for (auto global : global_variables) flush_dependees(get(global)); flush_all_aliased_variables(); } void Compiler::flush_control_dependent_expressions(uint32_t block_id) { auto &block = get(block_id); for (auto &expr : block.invalidate_expressions) invalid_expressions.insert(expr); block.invalidate_expressions.clear(); } void Compiler::flush_all_active_variables() { // Invalidate all temporaries we read from variables in this block since they were forwarded. // Invalidate all temporaries we read from globals. for (auto &v : current_function->local_variables) flush_dependees(get(v)); for (auto &arg : current_function->arguments) flush_dependees(get(arg.id)); for (auto global : global_variables) flush_dependees(get(global)); flush_all_aliased_variables(); } uint32_t Compiler::expression_type_id(uint32_t id) const { switch (ir.ids[id].get_type()) { case TypeVariable: return get(id).basetype; case TypeExpression: return get(id).expression_type; case TypeConstant: return get(id).constant_type; case TypeConstantOp: return get(id).basetype; case TypeUndef: return get(id).basetype; case TypeCombinedImageSampler: return get(id).combined_type; case TypeAccessChain: return get(id).basetype; default: SPIRV_CROSS_THROW("Cannot resolve expression type."); } } const SPIRType &Compiler::expression_type(uint32_t id) const { return get(expression_type_id(id)); } bool Compiler::expression_is_lvalue(uint32_t id) const { auto &type = expression_type(id); switch (type.basetype) { case SPIRType::SampledImage: case SPIRType::Image: case SPIRType::Sampler: return false; default: return true; } } bool Compiler::is_immutable(uint32_t id) const { if (ir.ids[id].get_type() == TypeVariable) { auto &var = get(id); // Anything we load from the UniformConstant address space is guaranteed to be immutable. bool pointer_to_const = var.storage == StorageClassUniformConstant; return pointer_to_const || var.phi_variable || !expression_is_lvalue(id); } else if (ir.ids[id].get_type() == TypeAccessChain) return get(id).immutable; else if (ir.ids[id].get_type() == TypeExpression) return get(id).immutable; else if (ir.ids[id].get_type() == TypeConstant || ir.ids[id].get_type() == TypeConstantOp || ir.ids[id].get_type() == TypeUndef) return true; else return false; } static inline bool storage_class_is_interface(spv::StorageClass storage) { switch (storage) { case StorageClassInput: case StorageClassOutput: case StorageClassUniform: case StorageClassUniformConstant: case StorageClassAtomicCounter: case StorageClassPushConstant: case StorageClassStorageBuffer: return true; default: return false; } } bool Compiler::is_hidden_variable(const SPIRVariable &var, bool include_builtins) const { if ((is_builtin_variable(var) && !include_builtins) || var.remapped_variable) return true; // Combined image samplers are always considered active as they are "magic" variables. if (find_if(begin(combined_image_samplers), end(combined_image_samplers), [&var](const CombinedImageSampler &samp) { return samp.combined_id == var.self; }) != end(combined_image_samplers)) { return false; } // In SPIR-V 1.4 and up we must also use the active variable interface to disable global variables // which are not part of the entry point. if (ir.get_spirv_version() >= 0x10400 && var.storage != spv::StorageClassGeneric && var.storage != spv::StorageClassFunction && !interface_variable_exists_in_entry_point(var.self)) { return true; } return check_active_interface_variables && storage_class_is_interface(var.storage) && active_interface_variables.find(var.self) == end(active_interface_variables); } bool Compiler::is_builtin_type(const SPIRType &type) const { auto *type_meta = ir.find_meta(type.self); // We can have builtin structs as well. If one member of a struct is builtin, the struct must also be builtin. if (type_meta) for (auto &m : type_meta->members) if (m.builtin) return true; return false; } bool Compiler::is_builtin_variable(const SPIRVariable &var) const { auto *m = ir.find_meta(var.self); if (var.compat_builtin || (m && m->decoration.builtin)) return true; else return is_builtin_type(get(var.basetype)); } bool Compiler::is_member_builtin(const SPIRType &type, uint32_t index, BuiltIn *builtin) const { auto *type_meta = ir.find_meta(type.self); if (type_meta) { auto &memb = type_meta->members; if (index < memb.size() && memb[index].builtin) { if (builtin) *builtin = memb[index].builtin_type; return true; } } return false; } bool Compiler::is_scalar(const SPIRType &type) const { return type.basetype != SPIRType::Struct && type.vecsize == 1 && type.columns == 1; } bool Compiler::is_vector(const SPIRType &type) const { return type.vecsize > 1 && type.columns == 1; } bool Compiler::is_matrix(const SPIRType &type) const { return type.vecsize > 1 && type.columns > 1; } bool Compiler::is_array(const SPIRType &type) const { return type.op == OpTypeArray || type.op == OpTypeRuntimeArray; } bool Compiler::is_pointer(const SPIRType &type) const { return type.op == OpTypePointer && type.basetype != SPIRType::Unknown; // Ignore function pointers. } bool Compiler::is_physical_pointer(const SPIRType &type) const { return type.op == OpTypePointer && type.storage == StorageClassPhysicalStorageBuffer; } bool Compiler::is_runtime_size_array(const SPIRType &type) { return type.op == OpTypeRuntimeArray; } ShaderResources Compiler::get_shader_resources() const { return get_shader_resources(nullptr); } ShaderResources Compiler::get_shader_resources(const unordered_set &active_variables) const { return get_shader_resources(&active_variables); } bool Compiler::InterfaceVariableAccessHandler::handle(Op opcode, const uint32_t *args, uint32_t length) { uint32_t variable = 0; switch (opcode) { // Need this first, otherwise, GCC complains about unhandled switch statements. default: break; case OpFunctionCall: { // Invalid SPIR-V. if (length < 3) return false; uint32_t count = length - 3; args += 3; for (uint32_t i = 0; i < count; i++) { auto *var = compiler.maybe_get(args[i]); if (var && storage_class_is_interface(var->storage)) variables.insert(args[i]); } break; } case OpSelect: { // Invalid SPIR-V. if (length < 5) return false; uint32_t count = length - 3; args += 3; for (uint32_t i = 0; i < count; i++) { auto *var = compiler.maybe_get(args[i]); if (var && storage_class_is_interface(var->storage)) variables.insert(args[i]); } break; } case OpPhi: { // Invalid SPIR-V. if (length < 2) return false; uint32_t count = length - 2; args += 2; for (uint32_t i = 0; i < count; i += 2) { auto *var = compiler.maybe_get(args[i]); if (var && storage_class_is_interface(var->storage)) variables.insert(args[i]); } break; } case OpAtomicStore: case OpStore: // Invalid SPIR-V. if (length < 1) return false; variable = args[0]; break; case OpCopyMemory: { if (length < 2) return false; auto *var = compiler.maybe_get(args[0]); if (var && storage_class_is_interface(var->storage)) variables.insert(args[0]); var = compiler.maybe_get(args[1]); if (var && storage_class_is_interface(var->storage)) variables.insert(args[1]); break; } case OpExtInst: { if (length < 3) return false; auto &extension_set = compiler.get(args[2]); switch (extension_set.ext) { case SPIRExtension::GLSL: { auto op = static_cast(args[3]); switch (op) { case GLSLstd450InterpolateAtCentroid: case GLSLstd450InterpolateAtSample: case GLSLstd450InterpolateAtOffset: { auto *var = compiler.maybe_get(args[4]); if (var && storage_class_is_interface(var->storage)) variables.insert(args[4]); break; } case GLSLstd450Modf: case GLSLstd450Fract: { auto *var = compiler.maybe_get(args[5]); if (var && storage_class_is_interface(var->storage)) variables.insert(args[5]); break; } default: break; } break; } case SPIRExtension::SPV_AMD_shader_explicit_vertex_parameter: { enum AMDShaderExplicitVertexParameter { InterpolateAtVertexAMD = 1 }; auto op = static_cast(args[3]); switch (op) { case InterpolateAtVertexAMD: { auto *var = compiler.maybe_get(args[4]); if (var && storage_class_is_interface(var->storage)) variables.insert(args[4]); break; } default: break; } break; } default: break; } break; } case OpAccessChain: case OpInBoundsAccessChain: case OpPtrAccessChain: case OpLoad: case OpCopyObject: case OpImageTexelPointer: case OpAtomicLoad: case OpAtomicExchange: case OpAtomicCompareExchange: case OpAtomicCompareExchangeWeak: case OpAtomicIIncrement: case OpAtomicIDecrement: case OpAtomicIAdd: case OpAtomicISub: case OpAtomicSMin: case OpAtomicUMin: case OpAtomicSMax: case OpAtomicUMax: case OpAtomicAnd: case OpAtomicOr: case OpAtomicXor: case OpArrayLength: // Invalid SPIR-V. if (length < 3) return false; variable = args[2]; break; } if (variable) { auto *var = compiler.maybe_get(variable); if (var && storage_class_is_interface(var->storage)) variables.insert(variable); } return true; } unordered_set Compiler::get_active_interface_variables() const { // Traverse the call graph and find all interface variables which are in use. unordered_set variables; InterfaceVariableAccessHandler handler(*this, variables); traverse_all_reachable_opcodes(get(ir.default_entry_point), handler); ir.for_each_typed_id([&](uint32_t, const SPIRVariable &var) { if (var.storage != StorageClassOutput) return; if (!interface_variable_exists_in_entry_point(var.self)) return; // An output variable which is just declared (but uninitialized) might be read by subsequent stages // so we should force-enable these outputs, // since compilation will fail if a subsequent stage attempts to read from the variable in question. // Also, make sure we preserve output variables which are only initialized, but never accessed by any code. if (var.initializer != ID(0) || get_execution_model() != ExecutionModelFragment) variables.insert(var.self); }); // If we needed to create one, we'll need it. if (dummy_sampler_id) variables.insert(dummy_sampler_id); return variables; } void Compiler::set_enabled_interface_variables(std::unordered_set active_variables) { active_interface_variables = std::move(active_variables); check_active_interface_variables = true; } ShaderResources Compiler::get_shader_resources(const unordered_set *active_variables) const { ShaderResources res; bool ssbo_instance_name = reflection_ssbo_instance_name_is_significant(); ir.for_each_typed_id([&](uint32_t, const SPIRVariable &var) { auto &type = this->get(var.basetype); // It is possible for uniform storage classes to be passed as function parameters, so detect // that. To detect function parameters, check of StorageClass of variable is function scope. if (var.storage == StorageClassFunction || !type.pointer) return; if (active_variables && active_variables->find(var.self) == end(*active_variables)) return; // In SPIR-V 1.4 and up, every global must be present in the entry point interface list, // not just IO variables. bool active_in_entry_point = true; if (ir.get_spirv_version() < 0x10400) { if (var.storage == StorageClassInput || var.storage == StorageClassOutput) active_in_entry_point = interface_variable_exists_in_entry_point(var.self); } else active_in_entry_point = interface_variable_exists_in_entry_point(var.self); if (!active_in_entry_point) return; bool is_builtin = is_builtin_variable(var); if (is_builtin) { if (var.storage != StorageClassInput && var.storage != StorageClassOutput) return; auto &list = var.storage == StorageClassInput ? res.builtin_inputs : res.builtin_outputs; BuiltInResource resource; if (has_decoration(type.self, DecorationBlock)) { resource.resource = { var.self, var.basetype, type.self, get_remapped_declared_block_name(var.self, false) }; for (uint32_t i = 0; i < uint32_t(type.member_types.size()); i++) { resource.value_type_id = type.member_types[i]; resource.builtin = BuiltIn(get_member_decoration(type.self, i, DecorationBuiltIn)); list.push_back(resource); } } else { bool strip_array = !has_decoration(var.self, DecorationPatch) && ( get_execution_model() == ExecutionModelTessellationControl || (get_execution_model() == ExecutionModelTessellationEvaluation && var.storage == StorageClassInput)); resource.resource = { var.self, var.basetype, type.self, get_name(var.self) }; if (strip_array && !type.array.empty()) resource.value_type_id = get_variable_data_type(var).parent_type; else resource.value_type_id = get_variable_data_type_id(var); assert(resource.value_type_id); resource.builtin = BuiltIn(get_decoration(var.self, DecorationBuiltIn)); list.push_back(std::move(resource)); } return; } // Input if (var.storage == StorageClassInput) { if (has_decoration(type.self, DecorationBlock)) { res.stage_inputs.push_back( { var.self, var.basetype, type.self, get_remapped_declared_block_name(var.self, false) }); } else res.stage_inputs.push_back({ var.self, var.basetype, type.self, get_name(var.self) }); } // Subpass inputs else if (var.storage == StorageClassUniformConstant && type.image.dim == DimSubpassData) { res.subpass_inputs.push_back({ var.self, var.basetype, type.self, get_name(var.self) }); } // Outputs else if (var.storage == StorageClassOutput) { if (has_decoration(type.self, DecorationBlock)) { res.stage_outputs.push_back( { var.self, var.basetype, type.self, get_remapped_declared_block_name(var.self, false) }); } else res.stage_outputs.push_back({ var.self, var.basetype, type.self, get_name(var.self) }); } // UBOs else if (type.storage == StorageClassUniform && has_decoration(type.self, DecorationBlock)) { res.uniform_buffers.push_back( { var.self, var.basetype, type.self, get_remapped_declared_block_name(var.self, false) }); } // Old way to declare SSBOs. else if (type.storage == StorageClassUniform && has_decoration(type.self, DecorationBufferBlock)) { res.storage_buffers.push_back( { var.self, var.basetype, type.self, get_remapped_declared_block_name(var.self, ssbo_instance_name) }); } // Modern way to declare SSBOs. else if (type.storage == StorageClassStorageBuffer) { res.storage_buffers.push_back( { var.self, var.basetype, type.self, get_remapped_declared_block_name(var.self, ssbo_instance_name) }); } // Push constant blocks else if (type.storage == StorageClassPushConstant) { // There can only be one push constant block, but keep the vector in case this restriction is lifted // in the future. res.push_constant_buffers.push_back({ var.self, var.basetype, type.self, get_name(var.self) }); } else if (type.storage == StorageClassShaderRecordBufferKHR) { res.shader_record_buffers.push_back({ var.self, var.basetype, type.self, get_remapped_declared_block_name(var.self, ssbo_instance_name) }); } // Atomic counters else if (type.storage == StorageClassAtomicCounter) { res.atomic_counters.push_back({ var.self, var.basetype, type.self, get_name(var.self) }); } else if (type.storage == StorageClassUniformConstant) { if (type.basetype == SPIRType::Image) { // Images if (type.image.sampled == 2) { res.storage_images.push_back({ var.self, var.basetype, type.self, get_name(var.self) }); } // Separate images else if (type.image.sampled == 1) { res.separate_images.push_back({ var.self, var.basetype, type.self, get_name(var.self) }); } } // Separate samplers else if (type.basetype == SPIRType::Sampler) { res.separate_samplers.push_back({ var.self, var.basetype, type.self, get_name(var.self) }); } // Textures else if (type.basetype == SPIRType::SampledImage) { res.sampled_images.push_back({ var.self, var.basetype, type.self, get_name(var.self) }); } // Acceleration structures else if (type.basetype == SPIRType::AccelerationStructure) { res.acceleration_structures.push_back({ var.self, var.basetype, type.self, get_name(var.self) }); } else { res.gl_plain_uniforms.push_back({ var.self, var.basetype, type.self, get_name(var.self) }); } } }); return res; } bool Compiler::type_is_top_level_block(const SPIRType &type) const { if (type.basetype != SPIRType::Struct) return false; return has_decoration(type.self, DecorationBlock) || has_decoration(type.self, DecorationBufferBlock); } bool Compiler::type_is_block_like(const SPIRType &type) const { if (type_is_top_level_block(type)) return true; if (type.basetype == SPIRType::Struct) { // Block-like types may have Offset decorations. for (uint32_t i = 0; i < uint32_t(type.member_types.size()); i++) if (has_member_decoration(type.self, i, DecorationOffset)) return true; } return false; } void Compiler::parse_fixup() { // Figure out specialization constants for work group sizes. for (auto id_ : ir.ids_for_constant_or_variable) { auto &id = ir.ids[id_]; if (id.get_type() == TypeConstant) { auto &c = id.get(); if (has_decoration(c.self, DecorationBuiltIn) && BuiltIn(get_decoration(c.self, DecorationBuiltIn)) == BuiltInWorkgroupSize) { // In current SPIR-V, there can be just one constant like this. // All entry points will receive the constant value. // WorkgroupSize take precedence over LocalSizeId. for (auto &entry : ir.entry_points) { entry.second.workgroup_size.constant = c.self; entry.second.workgroup_size.x = c.scalar(0, 0); entry.second.workgroup_size.y = c.scalar(0, 1); entry.second.workgroup_size.z = c.scalar(0, 2); } } } else if (id.get_type() == TypeVariable) { auto &var = id.get(); if (var.storage == StorageClassPrivate || var.storage == StorageClassWorkgroup || var.storage == StorageClassTaskPayloadWorkgroupEXT || var.storage == StorageClassOutput) { global_variables.push_back(var.self); } if (variable_storage_is_aliased(var)) aliased_variables.push_back(var.self); } } } void Compiler::update_name_cache(unordered_set &cache_primary, const unordered_set &cache_secondary, string &name) { if (name.empty()) return; const auto find_name = [&](const string &n) -> bool { if (cache_primary.find(n) != end(cache_primary)) return true; if (&cache_primary != &cache_secondary) if (cache_secondary.find(n) != end(cache_secondary)) return true; return false; }; const auto insert_name = [&](const string &n) { cache_primary.insert(n); }; if (!find_name(name)) { insert_name(name); return; } uint32_t counter = 0; auto tmpname = name; bool use_linked_underscore = true; if (tmpname == "_") { // We cannot just append numbers, as we will end up creating internally reserved names. // Make it like _0_ instead. tmpname += "0"; } else if (tmpname.back() == '_') { // The last_character is an underscore, so we don't need to link in underscore. // This would violate double underscore rules. use_linked_underscore = false; } // If there is a collision (very rare), // keep tacking on extra identifier until it's unique. do { counter++; name = tmpname + (use_linked_underscore ? "_" : "") + convert_to_string(counter); } while (find_name(name)); insert_name(name); } void Compiler::update_name_cache(unordered_set &cache, string &name) { update_name_cache(cache, cache, name); } void Compiler::set_name(ID id, const std::string &name) { ir.set_name(id, name); } const SPIRType &Compiler::get_type(TypeID id) const { return get(id); } const SPIRType &Compiler::get_type_from_variable(VariableID id) const { return get(get(id).basetype); } uint32_t Compiler::get_pointee_type_id(uint32_t type_id) const { auto *p_type = &get(type_id); if (p_type->pointer) { assert(p_type->parent_type); type_id = p_type->parent_type; } return type_id; } const SPIRType &Compiler::get_pointee_type(const SPIRType &type) const { auto *p_type = &type; if (p_type->pointer) { assert(p_type->parent_type); p_type = &get(p_type->parent_type); } return *p_type; } const SPIRType &Compiler::get_pointee_type(uint32_t type_id) const { return get_pointee_type(get(type_id)); } uint32_t Compiler::get_variable_data_type_id(const SPIRVariable &var) const { if (var.phi_variable) return var.basetype; return get_pointee_type_id(var.basetype); } SPIRType &Compiler::get_variable_data_type(const SPIRVariable &var) { return get(get_variable_data_type_id(var)); } const SPIRType &Compiler::get_variable_data_type(const SPIRVariable &var) const { return get(get_variable_data_type_id(var)); } SPIRType &Compiler::get_variable_element_type(const SPIRVariable &var) { SPIRType *type = &get_variable_data_type(var); if (is_array(*type)) type = &get(type->parent_type); return *type; } const SPIRType &Compiler::get_variable_element_type(const SPIRVariable &var) const { const SPIRType *type = &get_variable_data_type(var); if (is_array(*type)) type = &get(type->parent_type); return *type; } bool Compiler::is_sampled_image_type(const SPIRType &type) { return (type.basetype == SPIRType::Image || type.basetype == SPIRType::SampledImage) && type.image.sampled == 1 && type.image.dim != DimBuffer; } void Compiler::set_member_decoration_string(TypeID id, uint32_t index, spv::Decoration decoration, const std::string &argument) { ir.set_member_decoration_string(id, index, decoration, argument); } void Compiler::set_member_decoration(TypeID id, uint32_t index, Decoration decoration, uint32_t argument) { ir.set_member_decoration(id, index, decoration, argument); } void Compiler::set_member_name(TypeID id, uint32_t index, const std::string &name) { ir.set_member_name(id, index, name); } const std::string &Compiler::get_member_name(TypeID id, uint32_t index) const { return ir.get_member_name(id, index); } void Compiler::set_qualified_name(uint32_t id, const string &name) { ir.meta[id].decoration.qualified_alias = name; } void Compiler::set_member_qualified_name(uint32_t type_id, uint32_t index, const std::string &name) { ir.meta[type_id].members.resize(max(ir.meta[type_id].members.size(), size_t(index) + 1)); ir.meta[type_id].members[index].qualified_alias = name; } const string &Compiler::get_member_qualified_name(TypeID type_id, uint32_t index) const { auto *m = ir.find_meta(type_id); if (m && index < m->members.size()) return m->members[index].qualified_alias; else return ir.get_empty_string(); } uint32_t Compiler::get_member_decoration(TypeID id, uint32_t index, Decoration decoration) const { return ir.get_member_decoration(id, index, decoration); } const Bitset &Compiler::get_member_decoration_bitset(TypeID id, uint32_t index) const { return ir.get_member_decoration_bitset(id, index); } bool Compiler::has_member_decoration(TypeID id, uint32_t index, Decoration decoration) const { return ir.has_member_decoration(id, index, decoration); } void Compiler::unset_member_decoration(TypeID id, uint32_t index, Decoration decoration) { ir.unset_member_decoration(id, index, decoration); } void Compiler::set_decoration_string(ID id, spv::Decoration decoration, const std::string &argument) { ir.set_decoration_string(id, decoration, argument); } void Compiler::set_decoration(ID id, Decoration decoration, uint32_t argument) { ir.set_decoration(id, decoration, argument); } void Compiler::set_extended_decoration(uint32_t id, ExtendedDecorations decoration, uint32_t value) { auto &dec = ir.meta[id].decoration; dec.extended.flags.set(decoration); dec.extended.values[decoration] = value; } void Compiler::set_extended_member_decoration(uint32_t type, uint32_t index, ExtendedDecorations decoration, uint32_t value) { ir.meta[type].members.resize(max(ir.meta[type].members.size(), size_t(index) + 1)); auto &dec = ir.meta[type].members[index]; dec.extended.flags.set(decoration); dec.extended.values[decoration] = value; } static uint32_t get_default_extended_decoration(ExtendedDecorations decoration) { switch (decoration) { case SPIRVCrossDecorationResourceIndexPrimary: case SPIRVCrossDecorationResourceIndexSecondary: case SPIRVCrossDecorationResourceIndexTertiary: case SPIRVCrossDecorationResourceIndexQuaternary: case SPIRVCrossDecorationInterfaceMemberIndex: return ~(0u); default: return 0; } } uint32_t Compiler::get_extended_decoration(uint32_t id, ExtendedDecorations decoration) const { auto *m = ir.find_meta(id); if (!m) return 0; auto &dec = m->decoration; if (!dec.extended.flags.get(decoration)) return get_default_extended_decoration(decoration); return dec.extended.values[decoration]; } uint32_t Compiler::get_extended_member_decoration(uint32_t type, uint32_t index, ExtendedDecorations decoration) const { auto *m = ir.find_meta(type); if (!m) return 0; if (index >= m->members.size()) return 0; auto &dec = m->members[index]; if (!dec.extended.flags.get(decoration)) return get_default_extended_decoration(decoration); return dec.extended.values[decoration]; } bool Compiler::has_extended_decoration(uint32_t id, ExtendedDecorations decoration) const { auto *m = ir.find_meta(id); if (!m) return false; auto &dec = m->decoration; return dec.extended.flags.get(decoration); } bool Compiler::has_extended_member_decoration(uint32_t type, uint32_t index, ExtendedDecorations decoration) const { auto *m = ir.find_meta(type); if (!m) return false; if (index >= m->members.size()) return false; auto &dec = m->members[index]; return dec.extended.flags.get(decoration); } void Compiler::unset_extended_decoration(uint32_t id, ExtendedDecorations decoration) { auto &dec = ir.meta[id].decoration; dec.extended.flags.clear(decoration); dec.extended.values[decoration] = 0; } void Compiler::unset_extended_member_decoration(uint32_t type, uint32_t index, ExtendedDecorations decoration) { ir.meta[type].members.resize(max(ir.meta[type].members.size(), size_t(index) + 1)); auto &dec = ir.meta[type].members[index]; dec.extended.flags.clear(decoration); dec.extended.values[decoration] = 0; } StorageClass Compiler::get_storage_class(VariableID id) const { return get(id).storage; } const std::string &Compiler::get_name(ID id) const { return ir.get_name(id); } const std::string Compiler::get_fallback_name(ID id) const { return join("_", id); } const std::string Compiler::get_block_fallback_name(VariableID id) const { auto &var = get(id); if (get_name(id).empty()) return join("_", get(var.basetype).self, "_", id); else return get_name(id); } const Bitset &Compiler::get_decoration_bitset(ID id) const { return ir.get_decoration_bitset(id); } bool Compiler::has_decoration(ID id, Decoration decoration) const { return ir.has_decoration(id, decoration); } const string &Compiler::get_decoration_string(ID id, Decoration decoration) const { return ir.get_decoration_string(id, decoration); } const string &Compiler::get_member_decoration_string(TypeID id, uint32_t index, Decoration decoration) const { return ir.get_member_decoration_string(id, index, decoration); } uint32_t Compiler::get_decoration(ID id, Decoration decoration) const { return ir.get_decoration(id, decoration); } void Compiler::unset_decoration(ID id, Decoration decoration) { ir.unset_decoration(id, decoration); } bool Compiler::get_binary_offset_for_decoration(VariableID id, spv::Decoration decoration, uint32_t &word_offset) const { auto *m = ir.find_meta(id); if (!m) return false; auto &word_offsets = m->decoration_word_offset; auto itr = word_offsets.find(decoration); if (itr == end(word_offsets)) return false; word_offset = itr->second; return true; } bool Compiler::block_is_noop(const SPIRBlock &block) const { if (block.terminator != SPIRBlock::Direct) return false; auto &child = get(block.next_block); // If this block participates in PHI, the block isn't really noop. for (auto &phi : block.phi_variables) if (phi.parent == block.self || phi.parent == child.self) return false; for (auto &phi : child.phi_variables) if (phi.parent == block.self) return false; // Verify all instructions have no semantic impact. for (auto &i : block.ops) { auto op = static_cast(i.op); switch (op) { // Non-Semantic instructions. case OpLine: case OpNoLine: break; case OpExtInst: { auto *ops = stream(i); auto ext = get(ops[2]).ext; bool ext_is_nonsemantic_only = ext == SPIRExtension::NonSemanticShaderDebugInfo || ext == SPIRExtension::SPV_debug_info || ext == SPIRExtension::NonSemanticGeneric; if (!ext_is_nonsemantic_only) return false; break; } default: return false; } } return true; } bool Compiler::block_is_loop_candidate(const SPIRBlock &block, SPIRBlock::Method method) const { // Tried and failed. if (block.disable_block_optimization || block.complex_continue) return false; if (method == SPIRBlock::MergeToSelectForLoop || method == SPIRBlock::MergeToSelectContinueForLoop) { // Try to detect common for loop pattern // which the code backend can use to create cleaner code. // for(;;) { if (cond) { some_body; } else { break; } } // is the pattern we're looking for. const auto *false_block = maybe_get(block.false_block); const auto *true_block = maybe_get(block.true_block); const auto *merge_block = maybe_get(block.merge_block); bool false_block_is_merge = block.false_block == block.merge_block || (false_block && merge_block && execution_is_noop(*false_block, *merge_block)); bool true_block_is_merge = block.true_block == block.merge_block || (true_block && merge_block && execution_is_noop(*true_block, *merge_block)); bool positive_candidate = block.true_block != block.merge_block && block.true_block != block.self && false_block_is_merge; bool negative_candidate = block.false_block != block.merge_block && block.false_block != block.self && true_block_is_merge; bool ret = block.terminator == SPIRBlock::Select && block.merge == SPIRBlock::MergeLoop && (positive_candidate || negative_candidate); if (ret && positive_candidate && method == SPIRBlock::MergeToSelectContinueForLoop) ret = block.true_block == block.continue_block; else if (ret && negative_candidate && method == SPIRBlock::MergeToSelectContinueForLoop) ret = block.false_block == block.continue_block; // If we have OpPhi which depends on branches which came from our own block, // we need to flush phi variables in else block instead of a trivial break, // so we cannot assume this is a for loop candidate. if (ret) { for (auto &phi : block.phi_variables) if (phi.parent == block.self) return false; auto *merge = maybe_get(block.merge_block); if (merge) for (auto &phi : merge->phi_variables) if (phi.parent == block.self) return false; } return ret; } else if (method == SPIRBlock::MergeToDirectForLoop) { // Empty loop header that just sets up merge target // and branches to loop body. bool ret = block.terminator == SPIRBlock::Direct && block.merge == SPIRBlock::MergeLoop && block_is_noop(block); if (!ret) return false; auto &child = get(block.next_block); const auto *false_block = maybe_get(child.false_block); const auto *true_block = maybe_get(child.true_block); const auto *merge_block = maybe_get(block.merge_block); bool false_block_is_merge = child.false_block == block.merge_block || (false_block && merge_block && execution_is_noop(*false_block, *merge_block)); bool true_block_is_merge = child.true_block == block.merge_block || (true_block && merge_block && execution_is_noop(*true_block, *merge_block)); bool positive_candidate = child.true_block != block.merge_block && child.true_block != block.self && false_block_is_merge; bool negative_candidate = child.false_block != block.merge_block && child.false_block != block.self && true_block_is_merge; ret = child.terminator == SPIRBlock::Select && child.merge == SPIRBlock::MergeNone && (positive_candidate || negative_candidate); if (ret) { auto *merge = maybe_get(block.merge_block); if (merge) for (auto &phi : merge->phi_variables) if (phi.parent == block.self || phi.parent == child.false_block) return false; } return ret; } else return false; } bool Compiler::execution_is_noop(const SPIRBlock &from, const SPIRBlock &to) const { if (!execution_is_branchless(from, to)) return false; auto *start = &from; for (;;) { if (start->self == to.self) return true; if (!block_is_noop(*start)) return false; auto &next = get(start->next_block); start = &next; } } bool Compiler::execution_is_branchless(const SPIRBlock &from, const SPIRBlock &to) const { auto *start = &from; for (;;) { if (start->self == to.self) return true; if (start->terminator == SPIRBlock::Direct && start->merge == SPIRBlock::MergeNone) start = &get(start->next_block); else return false; } } bool Compiler::execution_is_direct_branch(const SPIRBlock &from, const SPIRBlock &to) const { return from.terminator == SPIRBlock::Direct && from.merge == SPIRBlock::MergeNone && from.next_block == to.self; } SPIRBlock::ContinueBlockType Compiler::continue_block_type(const SPIRBlock &block) const { // The block was deemed too complex during code emit, pick conservative fallback paths. if (block.complex_continue) return SPIRBlock::ComplexLoop; // In older glslang output continue block can be equal to the loop header. // In this case, execution is clearly branchless, so just assume a while loop header here. if (block.merge == SPIRBlock::MergeLoop) return SPIRBlock::WhileLoop; if (block.loop_dominator == BlockID(SPIRBlock::NoDominator)) { // Continue block is never reached from CFG. return SPIRBlock::ComplexLoop; } auto &dominator = get(block.loop_dominator); if (execution_is_noop(block, dominator)) return SPIRBlock::WhileLoop; else if (execution_is_branchless(block, dominator)) return SPIRBlock::ForLoop; else { const auto *false_block = maybe_get(block.false_block); const auto *true_block = maybe_get(block.true_block); const auto *merge_block = maybe_get(dominator.merge_block); // If we need to flush Phi in this block, we cannot have a DoWhile loop. bool flush_phi_to_false = false_block && flush_phi_required(block.self, block.false_block); bool flush_phi_to_true = true_block && flush_phi_required(block.self, block.true_block); if (flush_phi_to_false || flush_phi_to_true) return SPIRBlock::ComplexLoop; bool positive_do_while = block.true_block == dominator.self && (block.false_block == dominator.merge_block || (false_block && merge_block && execution_is_noop(*false_block, *merge_block))); bool negative_do_while = block.false_block == dominator.self && (block.true_block == dominator.merge_block || (true_block && merge_block && execution_is_noop(*true_block, *merge_block))); if (block.merge == SPIRBlock::MergeNone && block.terminator == SPIRBlock::Select && (positive_do_while || negative_do_while)) { return SPIRBlock::DoWhileLoop; } else return SPIRBlock::ComplexLoop; } } const SmallVector &Compiler::get_case_list(const SPIRBlock &block) const { uint32_t width = 0; // First we check if we can get the type directly from the block.condition // since it can be a SPIRConstant or a SPIRVariable. if (const auto *constant = maybe_get(block.condition)) { const auto &type = get(constant->constant_type); width = type.width; } else if (const auto *var = maybe_get(block.condition)) { const auto &type = get(var->basetype); width = type.width; } else if (const auto *undef = maybe_get(block.condition)) { const auto &type = get(undef->basetype); width = type.width; } else { auto search = ir.load_type_width.find(block.condition); if (search == ir.load_type_width.end()) { SPIRV_CROSS_THROW("Use of undeclared variable on a switch statement."); } width = search->second; } if (width > 32) return block.cases_64bit; return block.cases_32bit; } bool Compiler::traverse_all_reachable_opcodes(const SPIRBlock &block, OpcodeHandler &handler) const { handler.set_current_block(block); handler.rearm_current_block(block); // Ideally, perhaps traverse the CFG instead of all blocks in order to eliminate dead blocks, // but this shouldn't be a problem in practice unless the SPIR-V is doing insane things like recursing // inside dead blocks ... for (auto &i : block.ops) { auto ops = stream(i); auto op = static_cast(i.op); if (!handler.handle(op, ops, i.length)) return false; if (op == OpFunctionCall) { auto &func = get(ops[2]); if (handler.follow_function_call(func)) { if (!handler.begin_function_scope(ops, i.length)) return false; if (!traverse_all_reachable_opcodes(get(ops[2]), handler)) return false; if (!handler.end_function_scope(ops, i.length)) return false; handler.rearm_current_block(block); } } } if (!handler.handle_terminator(block)) return false; return true; } bool Compiler::traverse_all_reachable_opcodes(const SPIRFunction &func, OpcodeHandler &handler) const { for (auto block : func.blocks) if (!traverse_all_reachable_opcodes(get(block), handler)) return false; return true; } uint32_t Compiler::type_struct_member_offset(const SPIRType &type, uint32_t index) const { auto *type_meta = ir.find_meta(type.self); if (type_meta) { // Decoration must be set in valid SPIR-V, otherwise throw. auto &dec = type_meta->members[index]; if (dec.decoration_flags.get(DecorationOffset)) return dec.offset; else SPIRV_CROSS_THROW("Struct member does not have Offset set."); } else SPIRV_CROSS_THROW("Struct member does not have Offset set."); } uint32_t Compiler::type_struct_member_array_stride(const SPIRType &type, uint32_t index) const { auto *type_meta = ir.find_meta(type.member_types[index]); if (type_meta) { // Decoration must be set in valid SPIR-V, otherwise throw. // ArrayStride is part of the array type not OpMemberDecorate. auto &dec = type_meta->decoration; if (dec.decoration_flags.get(DecorationArrayStride)) return dec.array_stride; else SPIRV_CROSS_THROW("Struct member does not have ArrayStride set."); } else SPIRV_CROSS_THROW("Struct member does not have ArrayStride set."); } uint32_t Compiler::type_struct_member_matrix_stride(const SPIRType &type, uint32_t index) const { auto *type_meta = ir.find_meta(type.self); if (type_meta) { // Decoration must be set in valid SPIR-V, otherwise throw. // MatrixStride is part of OpMemberDecorate. auto &dec = type_meta->members[index]; if (dec.decoration_flags.get(DecorationMatrixStride)) return dec.matrix_stride; else SPIRV_CROSS_THROW("Struct member does not have MatrixStride set."); } else SPIRV_CROSS_THROW("Struct member does not have MatrixStride set."); } size_t Compiler::get_declared_struct_size(const SPIRType &type) const { if (type.member_types.empty()) SPIRV_CROSS_THROW("Declared struct in block cannot be empty."); // Offsets can be declared out of order, so we need to deduce the actual size // based on last member instead. uint32_t member_index = 0; size_t highest_offset = 0; for (uint32_t i = 0; i < uint32_t(type.member_types.size()); i++) { size_t offset = type_struct_member_offset(type, i); if (offset > highest_offset) { highest_offset = offset; member_index = i; } } size_t size = get_declared_struct_member_size(type, member_index); return highest_offset + size; } size_t Compiler::get_declared_struct_size_runtime_array(const SPIRType &type, size_t array_size) const { if (type.member_types.empty()) SPIRV_CROSS_THROW("Declared struct in block cannot be empty."); size_t size = get_declared_struct_size(type); auto &last_type = get(type.member_types.back()); if (!last_type.array.empty() && last_type.array_size_literal[0] && last_type.array[0] == 0) // Runtime array size += array_size * type_struct_member_array_stride(type, uint32_t(type.member_types.size() - 1)); return size; } uint32_t Compiler::evaluate_spec_constant_u32(const SPIRConstantOp &spec) const { auto &result_type = get(spec.basetype); if (result_type.basetype != SPIRType::UInt && result_type.basetype != SPIRType::Int && result_type.basetype != SPIRType::Boolean) { SPIRV_CROSS_THROW( "Only 32-bit integers and booleans are currently supported when evaluating specialization constants.\n"); } if (!is_scalar(result_type)) SPIRV_CROSS_THROW("Spec constant evaluation must be a scalar.\n"); uint32_t value = 0; const auto eval_u32 = [&](uint32_t id) -> uint32_t { auto &type = expression_type(id); if (type.basetype != SPIRType::UInt && type.basetype != SPIRType::Int && type.basetype != SPIRType::Boolean) { SPIRV_CROSS_THROW("Only 32-bit integers and booleans are currently supported when evaluating " "specialization constants.\n"); } if (!is_scalar(type)) SPIRV_CROSS_THROW("Spec constant evaluation must be a scalar.\n"); if (const auto *c = this->maybe_get(id)) return c->scalar(); else return evaluate_spec_constant_u32(this->get(id)); }; #define binary_spec_op(op, binary_op) \ case Op##op: \ value = eval_u32(spec.arguments[0]) binary_op eval_u32(spec.arguments[1]); \ break #define binary_spec_op_cast(op, binary_op, type) \ case Op##op: \ value = uint32_t(type(eval_u32(spec.arguments[0])) binary_op type(eval_u32(spec.arguments[1]))); \ break // Support the basic opcodes which are typically used when computing array sizes. switch (spec.opcode) { binary_spec_op(IAdd, +); binary_spec_op(ISub, -); binary_spec_op(IMul, *); binary_spec_op(BitwiseAnd, &); binary_spec_op(BitwiseOr, |); binary_spec_op(BitwiseXor, ^); binary_spec_op(LogicalAnd, &); binary_spec_op(LogicalOr, |); binary_spec_op(ShiftLeftLogical, <<); binary_spec_op(ShiftRightLogical, >>); binary_spec_op_cast(ShiftRightArithmetic, >>, int32_t); binary_spec_op(LogicalEqual, ==); binary_spec_op(LogicalNotEqual, !=); binary_spec_op(IEqual, ==); binary_spec_op(INotEqual, !=); binary_spec_op(ULessThan, <); binary_spec_op(ULessThanEqual, <=); binary_spec_op(UGreaterThan, >); binary_spec_op(UGreaterThanEqual, >=); binary_spec_op_cast(SLessThan, <, int32_t); binary_spec_op_cast(SLessThanEqual, <=, int32_t); binary_spec_op_cast(SGreaterThan, >, int32_t); binary_spec_op_cast(SGreaterThanEqual, >=, int32_t); #undef binary_spec_op #undef binary_spec_op_cast case OpLogicalNot: value = uint32_t(!eval_u32(spec.arguments[0])); break; case OpNot: value = ~eval_u32(spec.arguments[0]); break; case OpSNegate: value = uint32_t(-int32_t(eval_u32(spec.arguments[0]))); break; case OpSelect: value = eval_u32(spec.arguments[0]) ? eval_u32(spec.arguments[1]) : eval_u32(spec.arguments[2]); break; case OpUMod: { uint32_t a = eval_u32(spec.arguments[0]); uint32_t b = eval_u32(spec.arguments[1]); if (b == 0) SPIRV_CROSS_THROW("Undefined behavior in UMod, b == 0.\n"); value = a % b; break; } case OpSRem: { auto a = int32_t(eval_u32(spec.arguments[0])); auto b = int32_t(eval_u32(spec.arguments[1])); if (b == 0) SPIRV_CROSS_THROW("Undefined behavior in SRem, b == 0.\n"); value = a % b; break; } case OpSMod: { auto a = int32_t(eval_u32(spec.arguments[0])); auto b = int32_t(eval_u32(spec.arguments[1])); if (b == 0) SPIRV_CROSS_THROW("Undefined behavior in SMod, b == 0.\n"); auto v = a % b; // Makes sure we match the sign of b, not a. if ((b < 0 && v > 0) || (b > 0 && v < 0)) v += b; value = v; break; } case OpUDiv: { uint32_t a = eval_u32(spec.arguments[0]); uint32_t b = eval_u32(spec.arguments[1]); if (b == 0) SPIRV_CROSS_THROW("Undefined behavior in UDiv, b == 0.\n"); value = a / b; break; } case OpSDiv: { auto a = int32_t(eval_u32(spec.arguments[0])); auto b = int32_t(eval_u32(spec.arguments[1])); if (b == 0) SPIRV_CROSS_THROW("Undefined behavior in SDiv, b == 0.\n"); value = a / b; break; } default: SPIRV_CROSS_THROW("Unsupported spec constant opcode for evaluation.\n"); } return value; } uint32_t Compiler::evaluate_constant_u32(uint32_t id) const { if (const auto *c = maybe_get(id)) return c->scalar(); else return evaluate_spec_constant_u32(get(id)); } size_t Compiler::get_declared_struct_member_size(const SPIRType &struct_type, uint32_t index) const { if (struct_type.member_types.empty()) SPIRV_CROSS_THROW("Declared struct in block cannot be empty."); auto &flags = get_member_decoration_bitset(struct_type.self, index); auto &type = get(struct_type.member_types[index]); switch (type.basetype) { case SPIRType::Unknown: case SPIRType::Void: case SPIRType::Boolean: // Bools are purely logical, and cannot be used for externally visible types. case SPIRType::AtomicCounter: case SPIRType::Image: case SPIRType::SampledImage: case SPIRType::Sampler: SPIRV_CROSS_THROW("Querying size for object with opaque size."); default: break; } if (type.pointer && type.storage == StorageClassPhysicalStorageBuffer) { // Check if this is a top-level pointer type, and not an array of pointers. if (type.pointer_depth > get(type.parent_type).pointer_depth) return 8; } if (!type.array.empty()) { // For arrays, we can use ArrayStride to get an easy check. bool array_size_literal = type.array_size_literal.back(); uint32_t array_size = array_size_literal ? type.array.back() : evaluate_constant_u32(type.array.back()); return type_struct_member_array_stride(struct_type, index) * array_size; } else if (type.basetype == SPIRType::Struct) { return get_declared_struct_size(type); } else { unsigned vecsize = type.vecsize; unsigned columns = type.columns; // Vectors. if (columns == 1) { size_t component_size = type.width / 8; return vecsize * component_size; } else { uint32_t matrix_stride = type_struct_member_matrix_stride(struct_type, index); // Per SPIR-V spec, matrices must be tightly packed and aligned up for vec3 accesses. if (flags.get(DecorationRowMajor)) return matrix_stride * vecsize; else if (flags.get(DecorationColMajor)) return matrix_stride * columns; else SPIRV_CROSS_THROW("Either row-major or column-major must be declared for matrices."); } } } bool Compiler::BufferAccessHandler::handle(Op opcode, const uint32_t *args, uint32_t length) { if (opcode != OpAccessChain && opcode != OpInBoundsAccessChain && opcode != OpPtrAccessChain) return true; bool ptr_chain = (opcode == OpPtrAccessChain); // Invalid SPIR-V. if (length < (ptr_chain ? 5u : 4u)) return false; if (args[2] != id) return true; // Don't bother traversing the entire access chain tree yet. // If we access a struct member, assume we access the entire member. uint32_t index = compiler.get(args[ptr_chain ? 4 : 3]).scalar(); // Seen this index already. if (seen.find(index) != end(seen)) return true; seen.insert(index); auto &type = compiler.expression_type(id); uint32_t offset = compiler.type_struct_member_offset(type, index); size_t range; // If we have another member in the struct, deduce the range by looking at the next member. // This is okay since structs in SPIR-V can have padding, but Offset decoration must be // monotonically increasing. // Of course, this doesn't take into account if the SPIR-V for some reason decided to add // very large amounts of padding, but that's not really a big deal. if (index + 1 < type.member_types.size()) { range = compiler.type_struct_member_offset(type, index + 1) - offset; } else { // No padding, so just deduce it from the size of the member directly. range = compiler.get_declared_struct_member_size(type, index); } ranges.push_back({ index, offset, range }); return true; } SmallVector Compiler::get_active_buffer_ranges(VariableID id) const { SmallVector ranges; BufferAccessHandler handler(*this, ranges, id); traverse_all_reachable_opcodes(get(ir.default_entry_point), handler); return ranges; } bool Compiler::types_are_logically_equivalent(const SPIRType &a, const SPIRType &b) const { if (a.basetype != b.basetype) return false; if (a.width != b.width) return false; if (a.vecsize != b.vecsize) return false; if (a.columns != b.columns) return false; if (a.array.size() != b.array.size()) return false; size_t array_count = a.array.size(); if (array_count && memcmp(a.array.data(), b.array.data(), array_count * sizeof(uint32_t)) != 0) return false; if (a.basetype == SPIRType::Image || a.basetype == SPIRType::SampledImage) { if (memcmp(&a.image, &b.image, sizeof(SPIRType::Image)) != 0) return false; } if (a.member_types.size() != b.member_types.size()) return false; size_t member_types = a.member_types.size(); for (size_t i = 0; i < member_types; i++) { if (!types_are_logically_equivalent(get(a.member_types[i]), get(b.member_types[i]))) return false; } return true; } const Bitset &Compiler::get_execution_mode_bitset() const { return get_entry_point().flags; } void Compiler::set_execution_mode(ExecutionMode mode, uint32_t arg0, uint32_t arg1, uint32_t arg2) { auto &execution = get_entry_point(); execution.flags.set(mode); switch (mode) { case ExecutionModeLocalSize: execution.workgroup_size.x = arg0; execution.workgroup_size.y = arg1; execution.workgroup_size.z = arg2; break; case ExecutionModeLocalSizeId: execution.workgroup_size.id_x = arg0; execution.workgroup_size.id_y = arg1; execution.workgroup_size.id_z = arg2; break; case ExecutionModeInvocations: execution.invocations = arg0; break; case ExecutionModeOutputVertices: execution.output_vertices = arg0; break; case ExecutionModeOutputPrimitivesEXT: execution.output_primitives = arg0; break; default: break; } } void Compiler::unset_execution_mode(ExecutionMode mode) { auto &execution = get_entry_point(); execution.flags.clear(mode); } uint32_t Compiler::get_work_group_size_specialization_constants(SpecializationConstant &x, SpecializationConstant &y, SpecializationConstant &z) const { auto &execution = get_entry_point(); x = { 0, 0 }; y = { 0, 0 }; z = { 0, 0 }; // WorkgroupSize builtin takes precedence over LocalSize / LocalSizeId. if (execution.workgroup_size.constant != 0) { auto &c = get(execution.workgroup_size.constant); if (c.m.c[0].id[0] != ID(0)) { x.id = c.m.c[0].id[0]; x.constant_id = get_decoration(c.m.c[0].id[0], DecorationSpecId); } if (c.m.c[0].id[1] != ID(0)) { y.id = c.m.c[0].id[1]; y.constant_id = get_decoration(c.m.c[0].id[1], DecorationSpecId); } if (c.m.c[0].id[2] != ID(0)) { z.id = c.m.c[0].id[2]; z.constant_id = get_decoration(c.m.c[0].id[2], DecorationSpecId); } } else if (execution.flags.get(ExecutionModeLocalSizeId)) { auto &cx = get(execution.workgroup_size.id_x); if (cx.specialization) { x.id = execution.workgroup_size.id_x; x.constant_id = get_decoration(execution.workgroup_size.id_x, DecorationSpecId); } auto &cy = get(execution.workgroup_size.id_y); if (cy.specialization) { y.id = execution.workgroup_size.id_y; y.constant_id = get_decoration(execution.workgroup_size.id_y, DecorationSpecId); } auto &cz = get(execution.workgroup_size.id_z); if (cz.specialization) { z.id = execution.workgroup_size.id_z; z.constant_id = get_decoration(execution.workgroup_size.id_z, DecorationSpecId); } } return execution.workgroup_size.constant; } uint32_t Compiler::get_execution_mode_argument(spv::ExecutionMode mode, uint32_t index) const { auto &execution = get_entry_point(); switch (mode) { case ExecutionModeLocalSizeId: if (execution.flags.get(ExecutionModeLocalSizeId)) { switch (index) { case 0: return execution.workgroup_size.id_x; case 1: return execution.workgroup_size.id_y; case 2: return execution.workgroup_size.id_z; default: return 0; } } else return 0; case ExecutionModeLocalSize: switch (index) { case 0: if (execution.flags.get(ExecutionModeLocalSizeId) && execution.workgroup_size.id_x != 0) return get(execution.workgroup_size.id_x).scalar(); else return execution.workgroup_size.x; case 1: if (execution.flags.get(ExecutionModeLocalSizeId) && execution.workgroup_size.id_y != 0) return get(execution.workgroup_size.id_y).scalar(); else return execution.workgroup_size.y; case 2: if (execution.flags.get(ExecutionModeLocalSizeId) && execution.workgroup_size.id_z != 0) return get(execution.workgroup_size.id_z).scalar(); else return execution.workgroup_size.z; default: return 0; } case ExecutionModeInvocations: return execution.invocations; case ExecutionModeOutputVertices: return execution.output_vertices; case ExecutionModeOutputPrimitivesEXT: return execution.output_primitives; default: return 0; } } ExecutionModel Compiler::get_execution_model() const { auto &execution = get_entry_point(); return execution.model; } bool Compiler::is_tessellation_shader(ExecutionModel model) { return model == ExecutionModelTessellationControl || model == ExecutionModelTessellationEvaluation; } bool Compiler::is_vertex_like_shader() const { auto model = get_execution_model(); return model == ExecutionModelVertex || model == ExecutionModelGeometry || model == ExecutionModelTessellationControl || model == ExecutionModelTessellationEvaluation; } bool Compiler::is_tessellation_shader() const { return is_tessellation_shader(get_execution_model()); } bool Compiler::is_tessellating_triangles() const { return get_execution_mode_bitset().get(ExecutionModeTriangles); } void Compiler::set_remapped_variable_state(VariableID id, bool remap_enable) { get(id).remapped_variable = remap_enable; } bool Compiler::get_remapped_variable_state(VariableID id) const { return get(id).remapped_variable; } void Compiler::set_subpass_input_remapped_components(VariableID id, uint32_t components) { get(id).remapped_components = components; } uint32_t Compiler::get_subpass_input_remapped_components(VariableID id) const { return get(id).remapped_components; } void Compiler::add_implied_read_expression(SPIRExpression &e, uint32_t source) { auto itr = find(begin(e.implied_read_expressions), end(e.implied_read_expressions), ID(source)); if (itr == end(e.implied_read_expressions)) e.implied_read_expressions.push_back(source); } void Compiler::add_implied_read_expression(SPIRAccessChain &e, uint32_t source) { auto itr = find(begin(e.implied_read_expressions), end(e.implied_read_expressions), ID(source)); if (itr == end(e.implied_read_expressions)) e.implied_read_expressions.push_back(source); } void Compiler::add_active_interface_variable(uint32_t var_id) { active_interface_variables.insert(var_id); // In SPIR-V 1.4 and up we must also track the interface variable in the entry point. if (ir.get_spirv_version() >= 0x10400) { auto &vars = get_entry_point().interface_variables; if (find(begin(vars), end(vars), VariableID(var_id)) == end(vars)) vars.push_back(var_id); } } void Compiler::inherit_expression_dependencies(uint32_t dst, uint32_t source_expression) { // Don't inherit any expression dependencies if the expression in dst // is not a forwarded temporary. if (forwarded_temporaries.find(dst) == end(forwarded_temporaries) || forced_temporaries.find(dst) != end(forced_temporaries)) { return; } auto &e = get(dst); auto *phi = maybe_get(source_expression); if (phi && phi->phi_variable) { // We have used a phi variable, which can change at the end of the block, // so make sure we take a dependency on this phi variable. phi->dependees.push_back(dst); } auto *s = maybe_get(source_expression); if (!s) return; auto &e_deps = e.expression_dependencies; auto &s_deps = s->expression_dependencies; // If we depend on a expression, we also depend on all sub-dependencies from source. e_deps.push_back(source_expression); e_deps.insert(end(e_deps), begin(s_deps), end(s_deps)); // Eliminate duplicated dependencies. sort(begin(e_deps), end(e_deps)); e_deps.erase(unique(begin(e_deps), end(e_deps)), end(e_deps)); } SmallVector Compiler::get_entry_points_and_stages() const { SmallVector entries; for (auto &entry : ir.entry_points) entries.push_back({ entry.second.orig_name, entry.second.model }); return entries; } void Compiler::rename_entry_point(const std::string &old_name, const std::string &new_name, spv::ExecutionModel model) { auto &entry = get_entry_point(old_name, model); entry.orig_name = new_name; entry.name = new_name; } void Compiler::set_entry_point(const std::string &name, spv::ExecutionModel model) { auto &entry = get_entry_point(name, model); ir.default_entry_point = entry.self; } SPIREntryPoint &Compiler::get_first_entry_point(const std::string &name) { auto itr = find_if( begin(ir.entry_points), end(ir.entry_points), [&](const std::pair &entry) -> bool { return entry.second.orig_name == name; }); if (itr == end(ir.entry_points)) SPIRV_CROSS_THROW("Entry point does not exist."); return itr->second; } const SPIREntryPoint &Compiler::get_first_entry_point(const std::string &name) const { auto itr = find_if( begin(ir.entry_points), end(ir.entry_points), [&](const std::pair &entry) -> bool { return entry.second.orig_name == name; }); if (itr == end(ir.entry_points)) SPIRV_CROSS_THROW("Entry point does not exist."); return itr->second; } SPIREntryPoint &Compiler::get_entry_point(const std::string &name, ExecutionModel model) { auto itr = find_if(begin(ir.entry_points), end(ir.entry_points), [&](const std::pair &entry) -> bool { return entry.second.orig_name == name && entry.second.model == model; }); if (itr == end(ir.entry_points)) SPIRV_CROSS_THROW("Entry point does not exist."); return itr->second; } const SPIREntryPoint &Compiler::get_entry_point(const std::string &name, ExecutionModel model) const { auto itr = find_if(begin(ir.entry_points), end(ir.entry_points), [&](const std::pair &entry) -> bool { return entry.second.orig_name == name && entry.second.model == model; }); if (itr == end(ir.entry_points)) SPIRV_CROSS_THROW("Entry point does not exist."); return itr->second; } const string &Compiler::get_cleansed_entry_point_name(const std::string &name, ExecutionModel model) const { return get_entry_point(name, model).name; } const SPIREntryPoint &Compiler::get_entry_point() const { return ir.entry_points.find(ir.default_entry_point)->second; } SPIREntryPoint &Compiler::get_entry_point() { return ir.entry_points.find(ir.default_entry_point)->second; } bool Compiler::interface_variable_exists_in_entry_point(uint32_t id) const { auto &var = get(id); if (ir.get_spirv_version() < 0x10400) { if (var.storage != StorageClassInput && var.storage != StorageClassOutput && var.storage != StorageClassUniformConstant) SPIRV_CROSS_THROW("Only Input, Output variables and Uniform constants are part of a shader linking interface."); // This is to avoid potential problems with very old glslang versions which did // not emit input/output interfaces properly. // We can assume they only had a single entry point, and single entry point // shaders could easily be assumed to use every interface variable anyways. if (ir.entry_points.size() <= 1) return true; } // In SPIR-V 1.4 and later, all global resource variables must be present. auto &execution = get_entry_point(); return find(begin(execution.interface_variables), end(execution.interface_variables), VariableID(id)) != end(execution.interface_variables); } void Compiler::CombinedImageSamplerHandler::push_remap_parameters(const SPIRFunction &func, const uint32_t *args, uint32_t length) { // If possible, pipe through a remapping table so that parameters know // which variables they actually bind to in this scope. unordered_map remapping; for (uint32_t i = 0; i < length; i++) remapping[func.arguments[i].id] = remap_parameter(args[i]); parameter_remapping.push(std::move(remapping)); } void Compiler::CombinedImageSamplerHandler::pop_remap_parameters() { parameter_remapping.pop(); } uint32_t Compiler::CombinedImageSamplerHandler::remap_parameter(uint32_t id) { auto *var = compiler.maybe_get_backing_variable(id); if (var) id = var->self; if (parameter_remapping.empty()) return id; auto &remapping = parameter_remapping.top(); auto itr = remapping.find(id); if (itr != end(remapping)) return itr->second; else return id; } bool Compiler::CombinedImageSamplerHandler::begin_function_scope(const uint32_t *args, uint32_t length) { if (length < 3) return false; auto &callee = compiler.get(args[2]); args += 3; length -= 3; push_remap_parameters(callee, args, length); functions.push(&callee); return true; } bool Compiler::CombinedImageSamplerHandler::end_function_scope(const uint32_t *args, uint32_t length) { if (length < 3) return false; auto &callee = compiler.get(args[2]); args += 3; // There are two types of cases we have to handle, // a callee might call sampler2D(texture2D, sampler) directly where // one or more parameters originate from parameters. // Alternatively, we need to provide combined image samplers to our callees, // and in this case we need to add those as well. pop_remap_parameters(); // Our callee has now been processed at least once. // No point in doing it again. callee.do_combined_parameters = false; auto ¶ms = functions.top()->combined_parameters; functions.pop(); if (functions.empty()) return true; auto &caller = *functions.top(); if (caller.do_combined_parameters) { for (auto ¶m : params) { VariableID image_id = param.global_image ? param.image_id : VariableID(args[param.image_id]); VariableID sampler_id = param.global_sampler ? param.sampler_id : VariableID(args[param.sampler_id]); auto *i = compiler.maybe_get_backing_variable(image_id); auto *s = compiler.maybe_get_backing_variable(sampler_id); if (i) image_id = i->self; if (s) sampler_id = s->self; register_combined_image_sampler(caller, 0, image_id, sampler_id, param.depth); } } return true; } void Compiler::CombinedImageSamplerHandler::register_combined_image_sampler(SPIRFunction &caller, VariableID combined_module_id, VariableID image_id, VariableID sampler_id, bool depth) { // We now have a texture ID and a sampler ID which will either be found as a global // or a parameter in our own function. If both are global, they will not need a parameter, // otherwise, add it to our list. SPIRFunction::CombinedImageSamplerParameter param = { 0u, image_id, sampler_id, true, true, depth, }; auto texture_itr = find_if(begin(caller.arguments), end(caller.arguments), [image_id](const SPIRFunction::Parameter &p) { return p.id == image_id; }); auto sampler_itr = find_if(begin(caller.arguments), end(caller.arguments), [sampler_id](const SPIRFunction::Parameter &p) { return p.id == sampler_id; }); if (texture_itr != end(caller.arguments)) { param.global_image = false; param.image_id = uint32_t(texture_itr - begin(caller.arguments)); } if (sampler_itr != end(caller.arguments)) { param.global_sampler = false; param.sampler_id = uint32_t(sampler_itr - begin(caller.arguments)); } if (param.global_image && param.global_sampler) return; auto itr = find_if(begin(caller.combined_parameters), end(caller.combined_parameters), [¶m](const SPIRFunction::CombinedImageSamplerParameter &p) { return param.image_id == p.image_id && param.sampler_id == p.sampler_id && param.global_image == p.global_image && param.global_sampler == p.global_sampler; }); if (itr == end(caller.combined_parameters)) { uint32_t id = compiler.ir.increase_bound_by(3); auto type_id = id + 0; auto ptr_type_id = id + 1; auto combined_id = id + 2; auto &base = compiler.expression_type(image_id); auto &type = compiler.set(type_id, OpTypeSampledImage); auto &ptr_type = compiler.set(ptr_type_id, OpTypePointer); type = base; type.self = type_id; type.basetype = SPIRType::SampledImage; type.pointer = false; type.storage = StorageClassGeneric; type.image.depth = depth; ptr_type = type; ptr_type.pointer = true; ptr_type.storage = StorageClassUniformConstant; ptr_type.parent_type = type_id; // Build new variable. compiler.set(combined_id, ptr_type_id, StorageClassFunction, 0); // Inherit RelaxedPrecision. // If any of OpSampledImage, underlying image or sampler are marked, inherit the decoration. bool relaxed_precision = compiler.has_decoration(sampler_id, DecorationRelaxedPrecision) || compiler.has_decoration(image_id, DecorationRelaxedPrecision) || (combined_module_id && compiler.has_decoration(combined_module_id, DecorationRelaxedPrecision)); if (relaxed_precision) compiler.set_decoration(combined_id, DecorationRelaxedPrecision); param.id = combined_id; compiler.set_name(combined_id, join("SPIRV_Cross_Combined", compiler.to_name(image_id), compiler.to_name(sampler_id))); caller.combined_parameters.push_back(param); caller.shadow_arguments.push_back({ ptr_type_id, combined_id, 0u, 0u, true }); } } bool Compiler::DummySamplerForCombinedImageHandler::handle(Op opcode, const uint32_t *args, uint32_t length) { if (need_dummy_sampler) { // No need to traverse further, we know the result. return false; } switch (opcode) { case OpLoad: { if (length < 3) return false; uint32_t result_type = args[0]; auto &type = compiler.get(result_type); bool separate_image = type.basetype == SPIRType::Image && type.image.sampled == 1 && type.image.dim != DimBuffer; // If not separate image, don't bother. if (!separate_image) return true; uint32_t id = args[1]; uint32_t ptr = args[2]; compiler.set(id, "", result_type, true); compiler.register_read(id, ptr, true); break; } case OpImageFetch: case OpImageQuerySizeLod: case OpImageQuerySize: case OpImageQueryLevels: case OpImageQuerySamples: { // If we are fetching or querying LOD from a plain OpTypeImage, we must pre-combine with our dummy sampler. auto *var = compiler.maybe_get_backing_variable(args[2]); if (var) { auto &type = compiler.get(var->basetype); if (type.basetype == SPIRType::Image && type.image.sampled == 1 && type.image.dim != DimBuffer) need_dummy_sampler = true; } break; } case OpInBoundsAccessChain: case OpAccessChain: case OpPtrAccessChain: { if (length < 3) return false; uint32_t result_type = args[0]; auto &type = compiler.get(result_type); bool separate_image = type.basetype == SPIRType::Image && type.image.sampled == 1 && type.image.dim != DimBuffer; if (!separate_image) return true; uint32_t id = args[1]; uint32_t ptr = args[2]; compiler.set(id, "", result_type, true); compiler.register_read(id, ptr, true); // Other backends might use SPIRAccessChain for this later. compiler.ir.ids[id].set_allow_type_rewrite(); break; } default: break; } return true; } bool Compiler::CombinedImageSamplerHandler::handle(Op opcode, const uint32_t *args, uint32_t length) { // We need to figure out where samplers and images are loaded from, so do only the bare bones compilation we need. bool is_fetch = false; switch (opcode) { case OpLoad: { if (length < 3) return false; uint32_t result_type = args[0]; auto &type = compiler.get(result_type); bool separate_image = type.basetype == SPIRType::Image && type.image.sampled == 1; bool separate_sampler = type.basetype == SPIRType::Sampler; // If not separate image or sampler, don't bother. if (!separate_image && !separate_sampler) return true; uint32_t id = args[1]; uint32_t ptr = args[2]; compiler.set(id, "", result_type, true); compiler.register_read(id, ptr, true); return true; } case OpInBoundsAccessChain: case OpAccessChain: case OpPtrAccessChain: { if (length < 3) return false; // Technically, it is possible to have arrays of textures and arrays of samplers and combine them, but this becomes essentially // impossible to implement, since we don't know which concrete sampler we are accessing. // One potential way is to create a combinatorial explosion where N textures and M samplers are combined into N * M sampler2Ds, // but this seems ridiculously complicated for a problem which is easy to work around. // Checking access chains like this assumes we don't have samplers or textures inside uniform structs, but this makes no sense. uint32_t result_type = args[0]; auto &type = compiler.get(result_type); bool separate_image = type.basetype == SPIRType::Image && type.image.sampled == 1; bool separate_sampler = type.basetype == SPIRType::Sampler; if (separate_sampler) SPIRV_CROSS_THROW( "Attempting to use arrays or structs of separate samplers. This is not possible to statically " "remap to plain GLSL."); if (separate_image) { uint32_t id = args[1]; uint32_t ptr = args[2]; compiler.set(id, "", result_type, true); compiler.register_read(id, ptr, true); } return true; } case OpImageFetch: case OpImageQuerySizeLod: case OpImageQuerySize: case OpImageQueryLevels: case OpImageQuerySamples: { // If we are fetching from a plain OpTypeImage or querying LOD, we must pre-combine with our dummy sampler. auto *var = compiler.maybe_get_backing_variable(args[2]); if (!var) return true; auto &type = compiler.get(var->basetype); if (type.basetype == SPIRType::Image && type.image.sampled == 1 && type.image.dim != DimBuffer) { if (compiler.dummy_sampler_id == 0) SPIRV_CROSS_THROW("texelFetch without sampler was found, but no dummy sampler has been created with " "build_dummy_sampler_for_combined_images()."); // Do it outside. is_fetch = true; break; } return true; } case OpSampledImage: // Do it outside. break; default: return true; } // Registers sampler2D calls used in case they are parameters so // that their callees know which combined image samplers to propagate down the call stack. if (!functions.empty()) { auto &callee = *functions.top(); if (callee.do_combined_parameters) { uint32_t image_id = args[2]; auto *image = compiler.maybe_get_backing_variable(image_id); if (image) image_id = image->self; uint32_t sampler_id = is_fetch ? compiler.dummy_sampler_id : args[3]; auto *sampler = compiler.maybe_get_backing_variable(sampler_id); if (sampler) sampler_id = sampler->self; uint32_t combined_id = args[1]; auto &combined_type = compiler.get(args[0]); register_combined_image_sampler(callee, combined_id, image_id, sampler_id, combined_type.image.depth); } } // For function calls, we need to remap IDs which are function parameters into global variables. // This information is statically known from the current place in the call stack. // Function parameters are not necessarily pointers, so if we don't have a backing variable, remapping will know // which backing variable the image/sample came from. VariableID image_id = remap_parameter(args[2]); VariableID sampler_id = is_fetch ? compiler.dummy_sampler_id : remap_parameter(args[3]); auto itr = find_if(begin(compiler.combined_image_samplers), end(compiler.combined_image_samplers), [image_id, sampler_id](const CombinedImageSampler &combined) { return combined.image_id == image_id && combined.sampler_id == sampler_id; }); if (itr == end(compiler.combined_image_samplers)) { uint32_t sampled_type; uint32_t combined_module_id; if (is_fetch) { // Have to invent the sampled image type. sampled_type = compiler.ir.increase_bound_by(1); auto &type = compiler.set(sampled_type, OpTypeSampledImage); type = compiler.expression_type(args[2]); type.self = sampled_type; type.basetype = SPIRType::SampledImage; type.image.depth = false; combined_module_id = 0; } else { sampled_type = args[0]; combined_module_id = args[1]; } auto id = compiler.ir.increase_bound_by(2); auto type_id = id + 0; auto combined_id = id + 1; // Make a new type, pointer to OpTypeSampledImage, so we can make a variable of this type. // We will probably have this type lying around, but it doesn't hurt to make duplicates for internal purposes. auto &type = compiler.set(type_id, OpTypePointer); auto &base = compiler.get(sampled_type); type = base; type.pointer = true; type.storage = StorageClassUniformConstant; type.parent_type = type_id; // Build new variable. compiler.set(combined_id, type_id, StorageClassUniformConstant, 0); // Inherit RelaxedPrecision (and potentially other useful flags if deemed relevant). // If any of OpSampledImage, underlying image or sampler are marked, inherit the decoration. bool relaxed_precision = (sampler_id && compiler.has_decoration(sampler_id, DecorationRelaxedPrecision)) || (image_id && compiler.has_decoration(image_id, DecorationRelaxedPrecision)) || (combined_module_id && compiler.has_decoration(combined_module_id, DecorationRelaxedPrecision)); if (relaxed_precision) compiler.set_decoration(combined_id, DecorationRelaxedPrecision); // Propagate the array type for the original image as well. auto *var = compiler.maybe_get_backing_variable(image_id); if (var) { auto &parent_type = compiler.get(var->basetype); type.array = parent_type.array; type.array_size_literal = parent_type.array_size_literal; } compiler.combined_image_samplers.push_back({ combined_id, image_id, sampler_id }); } return true; } VariableID Compiler::build_dummy_sampler_for_combined_images() { DummySamplerForCombinedImageHandler handler(*this); traverse_all_reachable_opcodes(get(ir.default_entry_point), handler); if (handler.need_dummy_sampler) { uint32_t offset = ir.increase_bound_by(3); auto type_id = offset + 0; auto ptr_type_id = offset + 1; auto var_id = offset + 2; auto &sampler = set(type_id, OpTypeSampler); sampler.basetype = SPIRType::Sampler; auto &ptr_sampler = set(ptr_type_id, OpTypePointer); ptr_sampler = sampler; ptr_sampler.self = type_id; ptr_sampler.storage = StorageClassUniformConstant; ptr_sampler.pointer = true; ptr_sampler.parent_type = type_id; set(var_id, ptr_type_id, StorageClassUniformConstant, 0); set_name(var_id, "SPIRV_Cross_DummySampler"); dummy_sampler_id = var_id; return var_id; } else return 0; } void Compiler::build_combined_image_samplers() { ir.for_each_typed_id([&](uint32_t, SPIRFunction &func) { func.combined_parameters.clear(); func.shadow_arguments.clear(); func.do_combined_parameters = true; }); combined_image_samplers.clear(); CombinedImageSamplerHandler handler(*this); traverse_all_reachable_opcodes(get(ir.default_entry_point), handler); } SmallVector Compiler::get_specialization_constants() const { SmallVector spec_consts; ir.for_each_typed_id([&](uint32_t, const SPIRConstant &c) { if (c.specialization && has_decoration(c.self, DecorationSpecId)) spec_consts.push_back({ c.self, get_decoration(c.self, DecorationSpecId) }); }); return spec_consts; } SPIRConstant &Compiler::get_constant(ConstantID id) { return get(id); } const SPIRConstant &Compiler::get_constant(ConstantID id) const { return get(id); } static bool exists_unaccessed_path_to_return(const CFG &cfg, uint32_t block, const unordered_set &blocks, unordered_set &visit_cache) { // This block accesses the variable. if (blocks.find(block) != end(blocks)) return false; // We are at the end of the CFG. if (cfg.get_succeeding_edges(block).empty()) return true; // If any of our successors have a path to the end, there exists a path from block. for (auto &succ : cfg.get_succeeding_edges(block)) { if (visit_cache.count(succ) == 0) { if (exists_unaccessed_path_to_return(cfg, succ, blocks, visit_cache)) return true; visit_cache.insert(succ); } } return false; } void Compiler::analyze_parameter_preservation( SPIRFunction &entry, const CFG &cfg, const unordered_map> &variable_to_blocks, const unordered_map> &complete_write_blocks) { for (auto &arg : entry.arguments) { // Non-pointers are always inputs. auto &type = get(arg.type); if (!type.pointer) continue; // Opaque argument types are always in bool potential_preserve; switch (type.basetype) { case SPIRType::Sampler: case SPIRType::Image: case SPIRType::SampledImage: case SPIRType::AtomicCounter: potential_preserve = false; break; default: potential_preserve = true; break; } if (!potential_preserve) continue; auto itr = variable_to_blocks.find(arg.id); if (itr == end(variable_to_blocks)) { // Variable is never accessed. continue; } // We have accessed a variable, but there was no complete writes to that variable. // We deduce that we must preserve the argument. itr = complete_write_blocks.find(arg.id); if (itr == end(complete_write_blocks)) { arg.read_count++; continue; } // If there is a path through the CFG where no block completely writes to the variable, the variable will be in an undefined state // when the function returns. We therefore need to implicitly preserve the variable in case there are writers in the function. // Major case here is if a function is // void foo(int &var) { if (cond) var = 10; } // Using read/write counts, we will think it's just an out variable, but it really needs to be inout, // because if we don't write anything whatever we put into the function must return back to the caller. unordered_set visit_cache; if (exists_unaccessed_path_to_return(cfg, entry.entry_block, itr->second, visit_cache)) arg.read_count++; } } Compiler::AnalyzeVariableScopeAccessHandler::AnalyzeVariableScopeAccessHandler(Compiler &compiler_, SPIRFunction &entry_) : compiler(compiler_) , entry(entry_) { } bool Compiler::AnalyzeVariableScopeAccessHandler::follow_function_call(const SPIRFunction &) { // Only analyze within this function. return false; } void Compiler::AnalyzeVariableScopeAccessHandler::set_current_block(const SPIRBlock &block) { current_block = █ // If we're branching to a block which uses OpPhi, in GLSL // this will be a variable write when we branch, // so we need to track access to these variables as well to // have a complete picture. const auto test_phi = [this, &block](uint32_t to) { auto &next = compiler.get(to); for (auto &phi : next.phi_variables) { if (phi.parent == block.self) { accessed_variables_to_block[phi.function_variable].insert(block.self); // Phi variables are also accessed in our target branch block. accessed_variables_to_block[phi.function_variable].insert(next.self); notify_variable_access(phi.local_variable, block.self); } } }; switch (block.terminator) { case SPIRBlock::Direct: notify_variable_access(block.condition, block.self); test_phi(block.next_block); break; case SPIRBlock::Select: notify_variable_access(block.condition, block.self); test_phi(block.true_block); test_phi(block.false_block); break; case SPIRBlock::MultiSelect: { notify_variable_access(block.condition, block.self); auto &cases = compiler.get_case_list(block); for (auto &target : cases) test_phi(target.block); if (block.default_block) test_phi(block.default_block); break; } default: break; } } void Compiler::AnalyzeVariableScopeAccessHandler::notify_variable_access(uint32_t id, uint32_t block) { if (id == 0) return; // Access chains used in multiple blocks mean hoisting all the variables used to construct the access chain as not all backends can use pointers. auto itr = rvalue_forward_children.find(id); if (itr != end(rvalue_forward_children)) for (auto child_id : itr->second) notify_variable_access(child_id, block); if (id_is_phi_variable(id)) accessed_variables_to_block[id].insert(block); else if (id_is_potential_temporary(id)) accessed_temporaries_to_block[id].insert(block); } bool Compiler::AnalyzeVariableScopeAccessHandler::id_is_phi_variable(uint32_t id) const { if (id >= compiler.get_current_id_bound()) return false; auto *var = compiler.maybe_get(id); return var && var->phi_variable; } bool Compiler::AnalyzeVariableScopeAccessHandler::id_is_potential_temporary(uint32_t id) const { if (id >= compiler.get_current_id_bound()) return false; // Temporaries are not created before we start emitting code. return compiler.ir.ids[id].empty() || (compiler.ir.ids[id].get_type() == TypeExpression); } bool Compiler::AnalyzeVariableScopeAccessHandler::handle_terminator(const SPIRBlock &block) { switch (block.terminator) { case SPIRBlock::Return: if (block.return_value) notify_variable_access(block.return_value, block.self); break; case SPIRBlock::Select: case SPIRBlock::MultiSelect: notify_variable_access(block.condition, block.self); break; default: break; } return true; } bool Compiler::AnalyzeVariableScopeAccessHandler::handle(spv::Op op, const uint32_t *args, uint32_t length) { // Keep track of the types of temporaries, so we can hoist them out as necessary. uint32_t result_type, result_id; if (compiler.instruction_to_result_type(result_type, result_id, op, args, length)) { // For some opcodes, we will need to override the result id. // If we need to hoist the temporary, the temporary type is the input, not the result. // FIXME: This will likely break with OpCopyObject + hoisting, but we'll have to // solve it if we ever get there ... if (op == OpConvertUToAccelerationStructureKHR) { auto itr = result_id_to_type.find(args[2]); if (itr != result_id_to_type.end()) result_type = itr->second; } result_id_to_type[result_id] = result_type; } switch (op) { case OpStore: { if (length < 2) return false; ID ptr = args[0]; auto *var = compiler.maybe_get_backing_variable(ptr); // If we store through an access chain, we have a partial write. if (var) { accessed_variables_to_block[var->self].insert(current_block->self); if (var->self == ptr) complete_write_variables_to_block[var->self].insert(current_block->self); else partial_write_variables_to_block[var->self].insert(current_block->self); } // args[0] might be an access chain we have to track use of. notify_variable_access(args[0], current_block->self); // Might try to store a Phi variable here. notify_variable_access(args[1], current_block->self); break; } case OpAccessChain: case OpInBoundsAccessChain: case OpPtrAccessChain: { if (length < 3) return false; // Access chains used in multiple blocks mean hoisting all the variables used to construct the access chain as not all backends can use pointers. uint32_t ptr = args[2]; auto *var = compiler.maybe_get(ptr); if (var) { accessed_variables_to_block[var->self].insert(current_block->self); rvalue_forward_children[args[1]].insert(var->self); } // args[2] might be another access chain we have to track use of. for (uint32_t i = 2; i < length; i++) { notify_variable_access(args[i], current_block->self); rvalue_forward_children[args[1]].insert(args[i]); } // Also keep track of the access chain pointer itself. // In exceptionally rare cases, we can end up with a case where // the access chain is generated in the loop body, but is consumed in continue block. // This means we need complex loop workarounds, and we must detect this via CFG analysis. notify_variable_access(args[1], current_block->self); // The result of an access chain is a fixed expression and is not really considered a temporary. auto &e = compiler.set(args[1], "", args[0], true); auto *backing_variable = compiler.maybe_get_backing_variable(ptr); e.loaded_from = backing_variable ? VariableID(backing_variable->self) : VariableID(0); // Other backends might use SPIRAccessChain for this later. compiler.ir.ids[args[1]].set_allow_type_rewrite(); access_chain_expressions.insert(args[1]); break; } case OpCopyMemory: { if (length < 2) return false; ID lhs = args[0]; ID rhs = args[1]; auto *var = compiler.maybe_get_backing_variable(lhs); // If we store through an access chain, we have a partial write. if (var) { accessed_variables_to_block[var->self].insert(current_block->self); if (var->self == lhs) complete_write_variables_to_block[var->self].insert(current_block->self); else partial_write_variables_to_block[var->self].insert(current_block->self); } // args[0:1] might be access chains we have to track use of. for (uint32_t i = 0; i < 2; i++) notify_variable_access(args[i], current_block->self); var = compiler.maybe_get_backing_variable(rhs); if (var) accessed_variables_to_block[var->self].insert(current_block->self); break; } case OpCopyObject: { if (length < 3) return false; auto *var = compiler.maybe_get_backing_variable(args[2]); if (var) accessed_variables_to_block[var->self].insert(current_block->self); // Might be an access chain which we have to keep track of. notify_variable_access(args[1], current_block->self); if (access_chain_expressions.count(args[2])) access_chain_expressions.insert(args[1]); // Might try to copy a Phi variable here. notify_variable_access(args[2], current_block->self); break; } case OpLoad: { if (length < 3) return false; uint32_t ptr = args[2]; auto *var = compiler.maybe_get_backing_variable(ptr); if (var) accessed_variables_to_block[var->self].insert(current_block->self); // Loaded value is a temporary. notify_variable_access(args[1], current_block->self); // Might be an access chain we have to track use of. notify_variable_access(args[2], current_block->self); // If we're loading an opaque type we cannot lower it to a temporary, // we must defer access of args[2] until it's used. auto &type = compiler.get(args[0]); if (compiler.type_is_opaque_value(type)) rvalue_forward_children[args[1]].insert(args[2]); break; } case OpFunctionCall: { if (length < 3) return false; // Return value may be a temporary. if (compiler.get_type(args[0]).basetype != SPIRType::Void) notify_variable_access(args[1], current_block->self); length -= 3; args += 3; for (uint32_t i = 0; i < length; i++) { auto *var = compiler.maybe_get_backing_variable(args[i]); if (var) { accessed_variables_to_block[var->self].insert(current_block->self); // Assume we can get partial writes to this variable. partial_write_variables_to_block[var->self].insert(current_block->self); } // Cannot easily prove if argument we pass to a function is completely written. // Usually, functions write to a dummy variable, // which is then copied to in full to the real argument. // Might try to copy a Phi variable here. notify_variable_access(args[i], current_block->self); } break; } case OpSelect: { // In case of variable pointers, we might access a variable here. // We cannot prove anything about these accesses however. for (uint32_t i = 1; i < length; i++) { if (i >= 3) { auto *var = compiler.maybe_get_backing_variable(args[i]); if (var) { accessed_variables_to_block[var->self].insert(current_block->self); // Assume we can get partial writes to this variable. partial_write_variables_to_block[var->self].insert(current_block->self); } } // Might try to copy a Phi variable here. notify_variable_access(args[i], current_block->self); } break; } case OpExtInst: { for (uint32_t i = 4; i < length; i++) notify_variable_access(args[i], current_block->self); notify_variable_access(args[1], current_block->self); uint32_t extension_set = args[2]; if (compiler.get(extension_set).ext == SPIRExtension::GLSL) { auto op_450 = static_cast(args[3]); switch (op_450) { case GLSLstd450Modf: case GLSLstd450Frexp: { uint32_t ptr = args[5]; auto *var = compiler.maybe_get_backing_variable(ptr); if (var) { accessed_variables_to_block[var->self].insert(current_block->self); if (var->self == ptr) complete_write_variables_to_block[var->self].insert(current_block->self); else partial_write_variables_to_block[var->self].insert(current_block->self); } break; } default: break; } } break; } case OpArrayLength: // Only result is a temporary. notify_variable_access(args[1], current_block->self); break; case OpLine: case OpNoLine: // Uses literals, but cannot be a phi variable or temporary, so ignore. break; // Atomics shouldn't be able to access function-local variables. // Some GLSL builtins access a pointer. case OpCompositeInsert: case OpVectorShuffle: // Specialize for opcode which contains literals. for (uint32_t i = 1; i < 4; i++) notify_variable_access(args[i], current_block->self); break; case OpCompositeExtract: // Specialize for opcode which contains literals. for (uint32_t i = 1; i < 3; i++) notify_variable_access(args[i], current_block->self); break; case OpImageWrite: for (uint32_t i = 0; i < length; i++) { // Argument 3 is a literal. if (i != 3) notify_variable_access(args[i], current_block->self); } break; case OpImageSampleImplicitLod: case OpImageSampleExplicitLod: case OpImageSparseSampleImplicitLod: case OpImageSparseSampleExplicitLod: case OpImageSampleProjImplicitLod: case OpImageSampleProjExplicitLod: case OpImageSparseSampleProjImplicitLod: case OpImageSparseSampleProjExplicitLod: case OpImageFetch: case OpImageSparseFetch: case OpImageRead: case OpImageSparseRead: for (uint32_t i = 1; i < length; i++) { // Argument 4 is a literal. if (i != 4) notify_variable_access(args[i], current_block->self); } break; case OpImageSampleDrefImplicitLod: case OpImageSampleDrefExplicitLod: case OpImageSparseSampleDrefImplicitLod: case OpImageSparseSampleDrefExplicitLod: case OpImageSampleProjDrefImplicitLod: case OpImageSampleProjDrefExplicitLod: case OpImageSparseSampleProjDrefImplicitLod: case OpImageSparseSampleProjDrefExplicitLod: case OpImageGather: case OpImageSparseGather: case OpImageDrefGather: case OpImageSparseDrefGather: for (uint32_t i = 1; i < length; i++) { // Argument 5 is a literal. if (i != 5) notify_variable_access(args[i], current_block->self); } break; default: { // Rather dirty way of figuring out where Phi variables are used. // As long as only IDs are used, we can scan through instructions and try to find any evidence that // the ID of a variable has been used. // There are potential false positives here where a literal is used in-place of an ID, // but worst case, it does not affect the correctness of the compile. // Exhaustive analysis would be better here, but it's not worth it for now. for (uint32_t i = 0; i < length; i++) notify_variable_access(args[i], current_block->self); break; } } return true; } Compiler::StaticExpressionAccessHandler::StaticExpressionAccessHandler(Compiler &compiler_, uint32_t variable_id_) : compiler(compiler_) , variable_id(variable_id_) { } bool Compiler::StaticExpressionAccessHandler::follow_function_call(const SPIRFunction &) { return false; } bool Compiler::StaticExpressionAccessHandler::handle(spv::Op op, const uint32_t *args, uint32_t length) { switch (op) { case OpStore: if (length < 2) return false; if (args[0] == variable_id) { static_expression = args[1]; write_count++; } break; case OpLoad: if (length < 3) return false; if (args[2] == variable_id && static_expression == 0) // Tried to read from variable before it was initialized. return false; break; case OpAccessChain: case OpInBoundsAccessChain: case OpPtrAccessChain: if (length < 3) return false; if (args[2] == variable_id) // If we try to access chain our candidate variable before we store to it, bail. return false; break; default: break; } return true; } void Compiler::find_function_local_luts(SPIRFunction &entry, const AnalyzeVariableScopeAccessHandler &handler, bool single_function) { auto &cfg = *function_cfgs.find(entry.self)->second; // For each variable which is statically accessed. for (auto &accessed_var : handler.accessed_variables_to_block) { auto &blocks = accessed_var.second; auto &var = get(accessed_var.first); auto &type = expression_type(accessed_var.first); // Only consider function local variables here. // If we only have a single function in our CFG, private storage is also fine, // since it behaves like a function local variable. bool allow_lut = var.storage == StorageClassFunction || (single_function && var.storage == StorageClassPrivate); if (!allow_lut) continue; // We cannot be a phi variable. if (var.phi_variable) continue; // Only consider arrays here. if (type.array.empty()) continue; // If the variable has an initializer, make sure it is a constant expression. uint32_t static_constant_expression = 0; if (var.initializer) { if (ir.ids[var.initializer].get_type() != TypeConstant) continue; static_constant_expression = var.initializer; // There can be no stores to this variable, we have now proved we have a LUT. if (handler.complete_write_variables_to_block.count(var.self) != 0 || handler.partial_write_variables_to_block.count(var.self) != 0) continue; } else { // We can have one, and only one write to the variable, and that write needs to be a constant. // No partial writes allowed. if (handler.partial_write_variables_to_block.count(var.self) != 0) continue; auto itr = handler.complete_write_variables_to_block.find(var.self); // No writes? if (itr == end(handler.complete_write_variables_to_block)) continue; // We write to the variable in more than one block. auto &write_blocks = itr->second; if (write_blocks.size() != 1) continue; // The write needs to happen in the dominating block. DominatorBuilder builder(cfg); for (auto &block : blocks) builder.add_block(block); uint32_t dominator = builder.get_dominator(); // The complete write happened in a branch or similar, cannot deduce static expression. if (write_blocks.count(dominator) == 0) continue; // Find the static expression for this variable. StaticExpressionAccessHandler static_expression_handler(*this, var.self); traverse_all_reachable_opcodes(get(dominator), static_expression_handler); // We want one, and exactly one write if (static_expression_handler.write_count != 1 || static_expression_handler.static_expression == 0) continue; // Is it a constant expression? if (ir.ids[static_expression_handler.static_expression].get_type() != TypeConstant) continue; // We found a LUT! static_constant_expression = static_expression_handler.static_expression; } get(static_constant_expression).is_used_as_lut = true; var.static_expression = static_constant_expression; var.statically_assigned = true; var.remapped_variable = true; } } void Compiler::analyze_variable_scope(SPIRFunction &entry, AnalyzeVariableScopeAccessHandler &handler) { // First, we map out all variable access within a function. // Essentially a map of block -> { variables accessed in the basic block } traverse_all_reachable_opcodes(entry, handler); auto &cfg = *function_cfgs.find(entry.self)->second; // Analyze if there are parameters which need to be implicitly preserved with an "in" qualifier. analyze_parameter_preservation(entry, cfg, handler.accessed_variables_to_block, handler.complete_write_variables_to_block); unordered_map potential_loop_variables; // Find the loop dominator block for each block. for (auto &block_id : entry.blocks) { auto &block = get(block_id); auto itr = ir.continue_block_to_loop_header.find(block_id); if (itr != end(ir.continue_block_to_loop_header) && itr->second != block_id) { // Continue block might be unreachable in the CFG, but we still like to know the loop dominator. // Edge case is when continue block is also the loop header, don't set the dominator in this case. block.loop_dominator = itr->second; } else { uint32_t loop_dominator = cfg.find_loop_dominator(block_id); if (loop_dominator != block_id) block.loop_dominator = loop_dominator; else block.loop_dominator = SPIRBlock::NoDominator; } } // For each variable which is statically accessed. for (auto &var : handler.accessed_variables_to_block) { // Only deal with variables which are considered local variables in this function. if (find(begin(entry.local_variables), end(entry.local_variables), VariableID(var.first)) == end(entry.local_variables)) continue; DominatorBuilder builder(cfg); auto &blocks = var.second; auto &type = expression_type(var.first); BlockID potential_continue_block = 0; // Figure out which block is dominating all accesses of those variables. for (auto &block : blocks) { // If we're accessing a variable inside a continue block, this variable might be a loop variable. // We can only use loop variables with scalars, as we cannot track static expressions for vectors. if (is_continue(block)) { // Potentially awkward case to check for. // We might have a variable inside a loop, which is touched by the continue block, // but is not actually a loop variable. // The continue block is dominated by the inner part of the loop, which does not make sense in high-level // language output because it will be declared before the body, // so we will have to lift the dominator up to the relevant loop header instead. builder.add_block(ir.continue_block_to_loop_header[block]); // Arrays or structs cannot be loop variables. if (type.vecsize == 1 && type.columns == 1 && type.basetype != SPIRType::Struct && type.array.empty()) { // The variable is used in multiple continue blocks, this is not a loop // candidate, signal that by setting block to -1u. if (potential_continue_block == 0) potential_continue_block = block; else potential_continue_block = ~(0u); } } builder.add_block(block); } builder.lift_continue_block_dominator(); // Add it to a per-block list of variables. BlockID dominating_block = builder.get_dominator(); if (dominating_block && potential_continue_block != 0 && potential_continue_block != ~0u) { auto &inner_block = get(dominating_block); BlockID merge_candidate = 0; // Analyze the dominator. If it lives in a different loop scope than the candidate continue // block, reject the loop variable candidate. if (inner_block.merge == SPIRBlock::MergeLoop) merge_candidate = inner_block.merge_block; else if (inner_block.loop_dominator != SPIRBlock::NoDominator) merge_candidate = get(inner_block.loop_dominator).merge_block; if (merge_candidate != 0 && cfg.is_reachable(merge_candidate)) { // If the merge block has a higher post-visit order, we know that continue candidate // cannot reach the merge block, and we have two separate scopes. if (!cfg.is_reachable(potential_continue_block) || cfg.get_visit_order(merge_candidate) > cfg.get_visit_order(potential_continue_block)) { potential_continue_block = 0; } } } if (potential_continue_block != 0 && potential_continue_block != ~0u) potential_loop_variables[var.first] = potential_continue_block; // For variables whose dominating block is inside a loop, there is a risk that these variables // actually need to be preserved across loop iterations. We can express this by adding // a "read" access to the loop header. // In the dominating block, we must see an OpStore or equivalent as the first access of an OpVariable. // Should that fail, we look for the outermost loop header and tack on an access there. // Phi nodes cannot have this problem. if (dominating_block) { auto &variable = get(var.first); if (!variable.phi_variable) { auto *block = &get(dominating_block); bool preserve = may_read_undefined_variable_in_block(*block, var.first); if (preserve) { // Find the outermost loop scope. while (block->loop_dominator != BlockID(SPIRBlock::NoDominator)) block = &get(block->loop_dominator); if (block->self != dominating_block) { builder.add_block(block->self); dominating_block = builder.get_dominator(); } } } } // If all blocks here are dead code, this will be 0, so the variable in question // will be completely eliminated. if (dominating_block) { auto &block = get(dominating_block); block.dominated_variables.push_back(var.first); get(var.first).dominator = dominating_block; } } for (auto &var : handler.accessed_temporaries_to_block) { auto itr = handler.result_id_to_type.find(var.first); if (itr == end(handler.result_id_to_type)) { // We found a false positive ID being used, ignore. // This should probably be an assert. continue; } // There is no point in doing domination analysis for opaque types. auto &type = get(itr->second); if (type_is_opaque_value(type)) continue; DominatorBuilder builder(cfg); bool force_temporary = false; bool used_in_header_hoisted_continue_block = false; // Figure out which block is dominating all accesses of those temporaries. auto &blocks = var.second; for (auto &block : blocks) { builder.add_block(block); if (blocks.size() != 1 && is_continue(block)) { // The risk here is that inner loop can dominate the continue block. // Any temporary we access in the continue block must be declared before the loop. // This is moot for complex loops however. auto &loop_header_block = get(ir.continue_block_to_loop_header[block]); assert(loop_header_block.merge == SPIRBlock::MergeLoop); builder.add_block(loop_header_block.self); used_in_header_hoisted_continue_block = true; } } uint32_t dominating_block = builder.get_dominator(); if (blocks.size() != 1 && is_single_block_loop(dominating_block)) { // Awkward case, because the loop header is also the continue block, // so hoisting to loop header does not help. force_temporary = true; } if (dominating_block) { // If we touch a variable in the dominating block, this is the expected setup. // SPIR-V normally mandates this, but we have extra cases for temporary use inside loops. bool first_use_is_dominator = blocks.count(dominating_block) != 0; if (!first_use_is_dominator || force_temporary) { if (handler.access_chain_expressions.count(var.first)) { // Exceptionally rare case. // We cannot declare temporaries of access chains (except on MSL perhaps with pointers). // Rather than do that, we force the indexing expressions to be declared in the right scope by // tracking their usage to that end. There is no temporary to hoist. // However, we still need to observe declaration order of the access chain. if (used_in_header_hoisted_continue_block) { // For this scenario, we used an access chain inside a continue block where we also registered an access to header block. // This is a problem as we need to declare an access chain properly first with full definition. // We cannot use temporaries for these expressions, // so we must make sure the access chain is declared ahead of time. // Force a complex for loop to deal with this. // TODO: Out-of-order declaring for loops where continue blocks are emitted last might be another option. auto &loop_header_block = get(dominating_block); assert(loop_header_block.merge == SPIRBlock::MergeLoop); loop_header_block.complex_continue = true; } } else { // This should be very rare, but if we try to declare a temporary inside a loop, // and that temporary is used outside the loop as well (spirv-opt inliner likes this) // we should actually emit the temporary outside the loop. hoisted_temporaries.insert(var.first); forced_temporaries.insert(var.first); auto &block_temporaries = get(dominating_block).declare_temporary; block_temporaries.emplace_back(handler.result_id_to_type[var.first], var.first); } } else if (blocks.size() > 1) { // Keep track of the temporary as we might have to declare this temporary. // This can happen if the loop header dominates a temporary, but we have a complex fallback loop. // In this case, the header is actually inside the for (;;) {} block, and we have problems. // What we need to do is hoist the temporaries outside the for (;;) {} block in case the header block // declares the temporary. auto &block_temporaries = get(dominating_block).potential_declare_temporary; block_temporaries.emplace_back(handler.result_id_to_type[var.first], var.first); } } } unordered_set seen_blocks; // Now, try to analyze whether or not these variables are actually loop variables. for (auto &loop_variable : potential_loop_variables) { auto &var = get(loop_variable.first); auto dominator = var.dominator; BlockID block = loop_variable.second; // The variable was accessed in multiple continue blocks, ignore. if (block == BlockID(~(0u)) || block == BlockID(0)) continue; // Dead code. if (dominator == ID(0)) continue; BlockID header = 0; // Find the loop header for this block if we are a continue block. { auto itr = ir.continue_block_to_loop_header.find(block); if (itr != end(ir.continue_block_to_loop_header)) { header = itr->second; } else if (get(block).continue_block == block) { // Also check for self-referential continue block. header = block; } } assert(header); auto &header_block = get(header); auto &blocks = handler.accessed_variables_to_block[loop_variable.first]; // If a loop variable is not used before the loop, it's probably not a loop variable. bool has_accessed_variable = blocks.count(header) != 0; // Now, there are two conditions we need to meet for the variable to be a loop variable. // 1. The dominating block must have a branch-free path to the loop header, // this way we statically know which expression should be part of the loop variable initializer. // Walk from the dominator, if there is one straight edge connecting // dominator and loop header, we statically know the loop initializer. bool static_loop_init = true; while (dominator != header) { if (blocks.count(dominator) != 0) has_accessed_variable = true; auto &succ = cfg.get_succeeding_edges(dominator); if (succ.size() != 1) { static_loop_init = false; break; } auto &pred = cfg.get_preceding_edges(succ.front()); if (pred.size() != 1 || pred.front() != dominator) { static_loop_init = false; break; } dominator = succ.front(); } if (!static_loop_init || !has_accessed_variable) continue; // The second condition we need to meet is that no access after the loop // merge can occur. Walk the CFG to see if we find anything. seen_blocks.clear(); cfg.walk_from(seen_blocks, header_block.merge_block, [&](uint32_t walk_block) -> bool { // We found a block which accesses the variable outside the loop. if (blocks.find(walk_block) != end(blocks)) static_loop_init = false; return true; }); if (!static_loop_init) continue; // We have a loop variable. header_block.loop_variables.push_back(loop_variable.first); // Need to sort here as variables come from an unordered container, and pushing stuff in wrong order // will break reproducability in regression runs. sort(begin(header_block.loop_variables), end(header_block.loop_variables)); get(loop_variable.first).loop_variable = true; } } bool Compiler::may_read_undefined_variable_in_block(const SPIRBlock &block, uint32_t var) { for (auto &op : block.ops) { auto *ops = stream(op); switch (op.op) { case OpStore: case OpCopyMemory: if (ops[0] == var) return false; break; case OpAccessChain: case OpInBoundsAccessChain: case OpPtrAccessChain: // Access chains are generally used to partially read and write. It's too hard to analyze // if all constituents are written fully before continuing, so just assume it's preserved. // This is the same as the parameter preservation analysis. if (ops[2] == var) return true; break; case OpSelect: // Variable pointers. // We might read before writing. if (ops[3] == var || ops[4] == var) return true; break; case OpPhi: { // Variable pointers. // We might read before writing. if (op.length < 2) break; uint32_t count = op.length - 2; for (uint32_t i = 0; i < count; i += 2) if (ops[i + 2] == var) return true; break; } case OpCopyObject: case OpLoad: if (ops[2] == var) return true; break; case OpFunctionCall: { if (op.length < 3) break; // May read before writing. uint32_t count = op.length - 3; for (uint32_t i = 0; i < count; i++) if (ops[i + 3] == var) return true; break; } default: break; } } // Not accessed somehow, at least not in a usual fashion. // It's likely accessed in a branch, so assume we must preserve. return true; } Bitset Compiler::get_buffer_block_flags(VariableID id) const { return ir.get_buffer_block_flags(get(id)); } bool Compiler::get_common_basic_type(const SPIRType &type, SPIRType::BaseType &base_type) { if (type.basetype == SPIRType::Struct) { base_type = SPIRType::Unknown; for (auto &member_type : type.member_types) { SPIRType::BaseType member_base; if (!get_common_basic_type(get(member_type), member_base)) return false; if (base_type == SPIRType::Unknown) base_type = member_base; else if (base_type != member_base) return false; } return true; } else { base_type = type.basetype; return true; } } void Compiler::ActiveBuiltinHandler::handle_builtin(const SPIRType &type, BuiltIn builtin, const Bitset &decoration_flags) { // If used, we will need to explicitly declare a new array size for these builtins. if (builtin == BuiltInClipDistance) { if (!type.array_size_literal[0]) SPIRV_CROSS_THROW("Array size for ClipDistance must be a literal."); uint32_t array_size = type.array[0]; if (array_size == 0) SPIRV_CROSS_THROW("Array size for ClipDistance must not be unsized."); compiler.clip_distance_count = array_size; } else if (builtin == BuiltInCullDistance) { if (!type.array_size_literal[0]) SPIRV_CROSS_THROW("Array size for CullDistance must be a literal."); uint32_t array_size = type.array[0]; if (array_size == 0) SPIRV_CROSS_THROW("Array size for CullDistance must not be unsized."); compiler.cull_distance_count = array_size; } else if (builtin == BuiltInPosition) { if (decoration_flags.get(DecorationInvariant)) compiler.position_invariant = true; } } void Compiler::ActiveBuiltinHandler::add_if_builtin(uint32_t id, bool allow_blocks) { // Only handle plain variables here. // Builtins which are part of a block are handled in AccessChain. // If allow_blocks is used however, this is to handle initializers of blocks, // which implies that all members are written to. auto *var = compiler.maybe_get(id); auto *m = compiler.ir.find_meta(id); if (var && m) { auto &type = compiler.get(var->basetype); auto &decorations = m->decoration; auto &flags = type.storage == StorageClassInput ? compiler.active_input_builtins : compiler.active_output_builtins; if (decorations.builtin) { flags.set(decorations.builtin_type); handle_builtin(type, decorations.builtin_type, decorations.decoration_flags); } else if (allow_blocks && compiler.has_decoration(type.self, DecorationBlock)) { uint32_t member_count = uint32_t(type.member_types.size()); for (uint32_t i = 0; i < member_count; i++) { if (compiler.has_member_decoration(type.self, i, DecorationBuiltIn)) { auto &member_type = compiler.get(type.member_types[i]); BuiltIn builtin = BuiltIn(compiler.get_member_decoration(type.self, i, DecorationBuiltIn)); flags.set(builtin); handle_builtin(member_type, builtin, compiler.get_member_decoration_bitset(type.self, i)); } } } } } void Compiler::ActiveBuiltinHandler::add_if_builtin(uint32_t id) { add_if_builtin(id, false); } void Compiler::ActiveBuiltinHandler::add_if_builtin_or_block(uint32_t id) { add_if_builtin(id, true); } bool Compiler::ActiveBuiltinHandler::handle(spv::Op opcode, const uint32_t *args, uint32_t length) { switch (opcode) { case OpStore: if (length < 1) return false; add_if_builtin(args[0]); break; case OpCopyMemory: if (length < 2) return false; add_if_builtin(args[0]); add_if_builtin(args[1]); break; case OpCopyObject: case OpLoad: if (length < 3) return false; add_if_builtin(args[2]); break; case OpSelect: if (length < 5) return false; add_if_builtin(args[3]); add_if_builtin(args[4]); break; case OpPhi: { if (length < 2) return false; uint32_t count = length - 2; args += 2; for (uint32_t i = 0; i < count; i += 2) add_if_builtin(args[i]); break; } case OpFunctionCall: { if (length < 3) return false; uint32_t count = length - 3; args += 3; for (uint32_t i = 0; i < count; i++) add_if_builtin(args[i]); break; } case OpAccessChain: case OpInBoundsAccessChain: case OpPtrAccessChain: { if (length < 4) return false; // Only consider global variables, cannot consider variables in functions yet, or other // access chains as they have not been created yet. auto *var = compiler.maybe_get(args[2]); if (!var) break; // Required if we access chain into builtins like gl_GlobalInvocationID. add_if_builtin(args[2]); // Start traversing type hierarchy at the proper non-pointer types. auto *type = &compiler.get_variable_data_type(*var); auto &flags = var->storage == StorageClassInput ? compiler.active_input_builtins : compiler.active_output_builtins; uint32_t count = length - 3; args += 3; for (uint32_t i = 0; i < count; i++) { // Pointers if (opcode == OpPtrAccessChain && i == 0) { type = &compiler.get(type->parent_type); continue; } // Arrays if (!type->array.empty()) { type = &compiler.get(type->parent_type); } // Structs else if (type->basetype == SPIRType::Struct) { uint32_t index = compiler.get(args[i]).scalar(); if (index < uint32_t(compiler.ir.meta[type->self].members.size())) { auto &decorations = compiler.ir.meta[type->self].members[index]; if (decorations.builtin) { flags.set(decorations.builtin_type); handle_builtin(compiler.get(type->member_types[index]), decorations.builtin_type, decorations.decoration_flags); } } type = &compiler.get(type->member_types[index]); } else { // No point in traversing further. We won't find any extra builtins. break; } } break; } default: break; } return true; } void Compiler::update_active_builtins() { active_input_builtins.reset(); active_output_builtins.reset(); cull_distance_count = 0; clip_distance_count = 0; ActiveBuiltinHandler handler(*this); traverse_all_reachable_opcodes(get(ir.default_entry_point), handler); ir.for_each_typed_id([&](uint32_t, const SPIRVariable &var) { if (var.storage != StorageClassOutput) return; if (!interface_variable_exists_in_entry_point(var.self)) return; // Also, make sure we preserve output variables which are only initialized, but never accessed by any code. if (var.initializer != ID(0)) handler.add_if_builtin_or_block(var.self); }); } // Returns whether this shader uses a builtin of the storage class bool Compiler::has_active_builtin(BuiltIn builtin, StorageClass storage) const { const Bitset *flags; switch (storage) { case StorageClassInput: flags = &active_input_builtins; break; case StorageClassOutput: flags = &active_output_builtins; break; default: return false; } return flags->get(builtin); } void Compiler::analyze_image_and_sampler_usage() { CombinedImageSamplerDrefHandler dref_handler(*this); traverse_all_reachable_opcodes(get(ir.default_entry_point), dref_handler); CombinedImageSamplerUsageHandler handler(*this, dref_handler.dref_combined_samplers); traverse_all_reachable_opcodes(get(ir.default_entry_point), handler); // Need to run this traversal twice. First time, we propagate any comparison sampler usage from leaf functions // down to main(). // In the second pass, we can propagate up forced depth state coming from main() up into leaf functions. handler.dependency_hierarchy.clear(); traverse_all_reachable_opcodes(get(ir.default_entry_point), handler); comparison_ids = std::move(handler.comparison_ids); need_subpass_input = handler.need_subpass_input; need_subpass_input_ms = handler.need_subpass_input_ms; // Forward information from separate images and samplers into combined image samplers. for (auto &combined : combined_image_samplers) if (comparison_ids.count(combined.sampler_id)) comparison_ids.insert(combined.combined_id); } bool Compiler::CombinedImageSamplerDrefHandler::handle(spv::Op opcode, const uint32_t *args, uint32_t) { // Mark all sampled images which are used with Dref. switch (opcode) { case OpImageSampleDrefExplicitLod: case OpImageSampleDrefImplicitLod: case OpImageSampleProjDrefExplicitLod: case OpImageSampleProjDrefImplicitLod: case OpImageSparseSampleProjDrefImplicitLod: case OpImageSparseSampleDrefImplicitLod: case OpImageSparseSampleProjDrefExplicitLod: case OpImageSparseSampleDrefExplicitLod: case OpImageDrefGather: case OpImageSparseDrefGather: dref_combined_samplers.insert(args[2]); return true; default: break; } return true; } const CFG &Compiler::get_cfg_for_current_function() const { assert(current_function); return get_cfg_for_function(current_function->self); } const CFG &Compiler::get_cfg_for_function(uint32_t id) const { auto cfg_itr = function_cfgs.find(id); assert(cfg_itr != end(function_cfgs)); assert(cfg_itr->second); return *cfg_itr->second; } void Compiler::build_function_control_flow_graphs_and_analyze() { CFGBuilder handler(*this); handler.function_cfgs[ir.default_entry_point].reset(new CFG(*this, get(ir.default_entry_point))); traverse_all_reachable_opcodes(get(ir.default_entry_point), handler); function_cfgs = std::move(handler.function_cfgs); bool single_function = function_cfgs.size() <= 1; for (auto &f : function_cfgs) { auto &func = get(f.first); AnalyzeVariableScopeAccessHandler scope_handler(*this, func); analyze_variable_scope(func, scope_handler); find_function_local_luts(func, scope_handler, single_function); // Check if we can actually use the loop variables we found in analyze_variable_scope. // To use multiple initializers, we need the same type and qualifiers. for (auto block : func.blocks) { auto &b = get(block); if (b.loop_variables.size() < 2) continue; auto &flags = get_decoration_bitset(b.loop_variables.front()); uint32_t type = get(b.loop_variables.front()).basetype; bool invalid_initializers = false; for (auto loop_variable : b.loop_variables) { if (flags != get_decoration_bitset(loop_variable) || type != get(b.loop_variables.front()).basetype) { invalid_initializers = true; break; } } if (invalid_initializers) { for (auto loop_variable : b.loop_variables) get(loop_variable).loop_variable = false; b.loop_variables.clear(); } } } } Compiler::CFGBuilder::CFGBuilder(Compiler &compiler_) : compiler(compiler_) { } bool Compiler::CFGBuilder::handle(spv::Op, const uint32_t *, uint32_t) { return true; } bool Compiler::CFGBuilder::follow_function_call(const SPIRFunction &func) { if (function_cfgs.find(func.self) == end(function_cfgs)) { function_cfgs[func.self].reset(new CFG(compiler, func)); return true; } else return false; } void Compiler::CombinedImageSamplerUsageHandler::add_dependency(uint32_t dst, uint32_t src) { dependency_hierarchy[dst].insert(src); // Propagate up any comparison state if we're loading from one such variable. if (comparison_ids.count(src)) comparison_ids.insert(dst); } bool Compiler::CombinedImageSamplerUsageHandler::begin_function_scope(const uint32_t *args, uint32_t length) { if (length < 3) return false; auto &func = compiler.get(args[2]); const auto *arg = &args[3]; length -= 3; for (uint32_t i = 0; i < length; i++) { auto &argument = func.arguments[i]; add_dependency(argument.id, arg[i]); } return true; } void Compiler::CombinedImageSamplerUsageHandler::add_hierarchy_to_comparison_ids(uint32_t id) { // Traverse the variable dependency hierarchy and tag everything in its path with comparison ids. comparison_ids.insert(id); for (auto &dep_id : dependency_hierarchy[id]) add_hierarchy_to_comparison_ids(dep_id); } bool Compiler::CombinedImageSamplerUsageHandler::handle(Op opcode, const uint32_t *args, uint32_t length) { switch (opcode) { case OpAccessChain: case OpInBoundsAccessChain: case OpPtrAccessChain: case OpLoad: { if (length < 3) return false; add_dependency(args[1], args[2]); // Ideally defer this to OpImageRead, but then we'd need to track loaded IDs. // If we load an image, we're going to use it and there is little harm in declaring an unused gl_FragCoord. auto &type = compiler.get(args[0]); if (type.image.dim == DimSubpassData) { need_subpass_input = true; if (type.image.ms) need_subpass_input_ms = true; } // If we load a SampledImage and it will be used with Dref, propagate the state up. if (dref_combined_samplers.count(args[1]) != 0) add_hierarchy_to_comparison_ids(args[1]); break; } case OpSampledImage: { if (length < 4) return false; // If the underlying resource has been used for comparison then duplicate loads of that resource must be too. // This image must be a depth image. uint32_t result_id = args[1]; uint32_t image = args[2]; uint32_t sampler = args[3]; if (dref_combined_samplers.count(result_id) != 0) { add_hierarchy_to_comparison_ids(image); // This sampler must be a SamplerComparisonState, and not a regular SamplerState. add_hierarchy_to_comparison_ids(sampler); // Mark the OpSampledImage itself as being comparison state. comparison_ids.insert(result_id); } return true; } default: break; } return true; } bool Compiler::buffer_is_hlsl_counter_buffer(VariableID id) const { auto *m = ir.find_meta(id); return m && m->hlsl_is_magic_counter_buffer; } bool Compiler::buffer_get_hlsl_counter_buffer(VariableID id, uint32_t &counter_id) const { auto *m = ir.find_meta(id); // First, check for the proper decoration. if (m && m->hlsl_magic_counter_buffer != 0) { counter_id = m->hlsl_magic_counter_buffer; return true; } else return false; } void Compiler::make_constant_null(uint32_t id, uint32_t type) { auto &constant_type = get(type); if (constant_type.pointer) { auto &constant = set(id, type); constant.make_null(constant_type); } else if (!constant_type.array.empty()) { assert(constant_type.parent_type); uint32_t parent_id = ir.increase_bound_by(1); make_constant_null(parent_id, constant_type.parent_type); if (!constant_type.array_size_literal.back()) SPIRV_CROSS_THROW("Array size of OpConstantNull must be a literal."); SmallVector elements(constant_type.array.back()); for (uint32_t i = 0; i < constant_type.array.back(); i++) elements[i] = parent_id; set(id, type, elements.data(), uint32_t(elements.size()), false); } else if (!constant_type.member_types.empty()) { uint32_t member_ids = ir.increase_bound_by(uint32_t(constant_type.member_types.size())); SmallVector elements(constant_type.member_types.size()); for (uint32_t i = 0; i < constant_type.member_types.size(); i++) { make_constant_null(member_ids + i, constant_type.member_types[i]); elements[i] = member_ids + i; } set(id, type, elements.data(), uint32_t(elements.size()), false); } else { auto &constant = set(id, type); constant.make_null(constant_type); } } const SmallVector &Compiler::get_declared_capabilities() const { return ir.declared_capabilities; } const SmallVector &Compiler::get_declared_extensions() const { return ir.declared_extensions; } std::string Compiler::get_remapped_declared_block_name(VariableID id) const { return get_remapped_declared_block_name(id, false); } std::string Compiler::get_remapped_declared_block_name(uint32_t id, bool fallback_prefer_instance_name) const { auto itr = declared_block_names.find(id); if (itr != end(declared_block_names)) { return itr->second; } else { auto &var = get(id); if (fallback_prefer_instance_name) { return to_name(var.self); } else { auto &type = get(var.basetype); auto *type_meta = ir.find_meta(type.self); auto *block_name = type_meta ? &type_meta->decoration.alias : nullptr; return (!block_name || block_name->empty()) ? get_block_fallback_name(id) : *block_name; } } } bool Compiler::reflection_ssbo_instance_name_is_significant() const { if (ir.source.known) { // UAVs from HLSL source tend to be declared in a way where the type is reused // but the instance name is significant, and that's the name we should report. // For GLSL, SSBOs each have their own block type as that's how GLSL is written. return ir.source.hlsl; } unordered_set ssbo_type_ids; bool aliased_ssbo_types = false; // If we don't have any OpSource information, we need to perform some shaky heuristics. ir.for_each_typed_id([&](uint32_t, const SPIRVariable &var) { auto &type = this->get(var.basetype); if (!type.pointer || var.storage == StorageClassFunction) return; bool ssbo = var.storage == StorageClassStorageBuffer || (var.storage == StorageClassUniform && has_decoration(type.self, DecorationBufferBlock)); if (ssbo) { if (ssbo_type_ids.count(type.self)) aliased_ssbo_types = true; else ssbo_type_ids.insert(type.self); } }); // If the block name is aliased, assume we have HLSL-style UAV declarations. return aliased_ssbo_types; } bool Compiler::instruction_to_result_type(uint32_t &result_type, uint32_t &result_id, spv::Op op, const uint32_t *args, uint32_t length) { if (length < 2) return false; bool has_result_id = false, has_result_type = false; HasResultAndType(op, &has_result_id, &has_result_type); if (has_result_id && has_result_type) { result_type = args[0]; result_id = args[1]; return true; } else return false; } Bitset Compiler::combined_decoration_for_member(const SPIRType &type, uint32_t index) const { Bitset flags; auto *type_meta = ir.find_meta(type.self); if (type_meta) { auto &members = type_meta->members; if (index >= members.size()) return flags; auto &dec = members[index]; flags.merge_or(dec.decoration_flags); auto &member_type = get(type.member_types[index]); // If our member type is a struct, traverse all the child members as well recursively. auto &member_childs = member_type.member_types; for (uint32_t i = 0; i < member_childs.size(); i++) { auto &child_member_type = get(member_childs[i]); if (!child_member_type.pointer) flags.merge_or(combined_decoration_for_member(member_type, i)); } } return flags; } bool Compiler::is_desktop_only_format(spv::ImageFormat format) { switch (format) { // Desktop-only formats case ImageFormatR11fG11fB10f: case ImageFormatR16f: case ImageFormatRgb10A2: case ImageFormatR8: case ImageFormatRg8: case ImageFormatR16: case ImageFormatRg16: case ImageFormatRgba16: case ImageFormatR16Snorm: case ImageFormatRg16Snorm: case ImageFormatRgba16Snorm: case ImageFormatR8Snorm: case ImageFormatRg8Snorm: case ImageFormatR8ui: case ImageFormatRg8ui: case ImageFormatR16ui: case ImageFormatRgb10a2ui: case ImageFormatR8i: case ImageFormatRg8i: case ImageFormatR16i: return true; default: break; } return false; } // An image is determined to be a depth image if it is marked as a depth image and is not also // explicitly marked with a color format, or if there are any sample/gather compare operations on it. bool Compiler::is_depth_image(const SPIRType &type, uint32_t id) const { return (type.image.depth && type.image.format == ImageFormatUnknown) || comparison_ids.count(id); } bool Compiler::type_is_opaque_value(const SPIRType &type) const { return !type.pointer && (type.basetype == SPIRType::SampledImage || type.basetype == SPIRType::Image || type.basetype == SPIRType::Sampler); } // Make these member functions so we can easily break on any force_recompile events. void Compiler::force_recompile() { is_force_recompile = true; } void Compiler::force_recompile_guarantee_forward_progress() { force_recompile(); is_force_recompile_forward_progress = true; } bool Compiler::is_forcing_recompilation() const { return is_force_recompile; } void Compiler::clear_force_recompile() { is_force_recompile = false; is_force_recompile_forward_progress = false; } Compiler::PhysicalStorageBufferPointerHandler::PhysicalStorageBufferPointerHandler(Compiler &compiler_) : compiler(compiler_) { } Compiler::PhysicalBlockMeta *Compiler::PhysicalStorageBufferPointerHandler::find_block_meta(uint32_t id) const { auto chain_itr = access_chain_to_physical_block.find(id); if (chain_itr != access_chain_to_physical_block.end()) return chain_itr->second; else return nullptr; } void Compiler::PhysicalStorageBufferPointerHandler::mark_aligned_access(uint32_t id, const uint32_t *args, uint32_t length) { uint32_t mask = *args; args++; length--; if (length && (mask & MemoryAccessVolatileMask) != 0) { args++; length--; } if (length && (mask & MemoryAccessAlignedMask) != 0) { uint32_t alignment = *args; auto *meta = find_block_meta(id); // This makes the assumption that the application does not rely on insane edge cases like: // Bind buffer with ADDR = 8, use block offset of 8 bytes, load/store with 16 byte alignment. // If we emit the buffer with alignment = 16 here, the first element at offset = 0 should // actually have alignment of 8 bytes, but this is too theoretical and awkward to support. // We could potentially keep track of any offset in the access chain, but it's // practically impossible for high level compilers to emit code like that, // so deducing overall alignment requirement based on maximum observed Alignment value is probably fine. if (meta && alignment > meta->alignment) meta->alignment = alignment; } } bool Compiler::PhysicalStorageBufferPointerHandler::type_is_bda_block_entry(uint32_t type_id) const { auto &type = compiler.get(type_id); return type.storage == StorageClassPhysicalStorageBufferEXT && type.pointer && type.pointer_depth == 1 && !compiler.type_is_array_of_pointers(type); } uint32_t Compiler::PhysicalStorageBufferPointerHandler::get_minimum_scalar_alignment(const SPIRType &type) const { if (type.storage == spv::StorageClassPhysicalStorageBufferEXT) return 8; else if (type.basetype == SPIRType::Struct) { uint32_t alignment = 0; for (auto &member_type : type.member_types) { uint32_t member_align = get_minimum_scalar_alignment(compiler.get(member_type)); if (member_align > alignment) alignment = member_align; } return alignment; } else return type.width / 8; } void Compiler::PhysicalStorageBufferPointerHandler::setup_meta_chain(uint32_t type_id, uint32_t var_id) { if (type_is_bda_block_entry(type_id)) { auto &meta = physical_block_type_meta[type_id]; access_chain_to_physical_block[var_id] = &meta; auto &type = compiler.get(type_id); if (type.basetype != SPIRType::Struct) non_block_types.insert(type_id); if (meta.alignment == 0) meta.alignment = get_minimum_scalar_alignment(compiler.get_pointee_type(type)); } } bool Compiler::PhysicalStorageBufferPointerHandler::handle(Op op, const uint32_t *args, uint32_t length) { // When a BDA pointer comes to life, we need to keep a mapping of SSA ID -> type ID for the pointer type. // For every load and store, we'll need to be able to look up the type ID being accessed and mark any alignment // requirements. switch (op) { case OpConvertUToPtr: case OpBitcast: case OpCompositeExtract: // Extract can begin a new chain if we had a struct or array of pointers as input. // We don't begin chains before we have a pure scalar pointer. setup_meta_chain(args[0], args[1]); break; case OpAccessChain: case OpInBoundsAccessChain: case OpPtrAccessChain: case OpCopyObject: { auto itr = access_chain_to_physical_block.find(args[2]); if (itr != access_chain_to_physical_block.end()) access_chain_to_physical_block[args[1]] = itr->second; break; } case OpLoad: { setup_meta_chain(args[0], args[1]); if (length >= 4) mark_aligned_access(args[2], args + 3, length - 3); break; } case OpStore: { if (length >= 3) mark_aligned_access(args[0], args + 2, length - 2); break; } default: break; } return true; } uint32_t Compiler::PhysicalStorageBufferPointerHandler::get_base_non_block_type_id(uint32_t type_id) const { auto *type = &compiler.get(type_id); while (type->pointer && type->storage == StorageClassPhysicalStorageBufferEXT && !type_is_bda_block_entry(type_id)) { type_id = type->parent_type; type = &compiler.get(type_id); } assert(type_is_bda_block_entry(type_id)); return type_id; } void Compiler::PhysicalStorageBufferPointerHandler::analyze_non_block_types_from_block(const SPIRType &type) { for (auto &member : type.member_types) { auto &subtype = compiler.get(member); if (subtype.basetype != SPIRType::Struct && subtype.pointer && subtype.storage == spv::StorageClassPhysicalStorageBufferEXT) { non_block_types.insert(get_base_non_block_type_id(member)); } else if (subtype.basetype == SPIRType::Struct && !subtype.pointer) analyze_non_block_types_from_block(subtype); } } void Compiler::analyze_non_block_pointer_types() { PhysicalStorageBufferPointerHandler handler(*this); traverse_all_reachable_opcodes(get(ir.default_entry_point), handler); // Analyze any block declaration we have to make. It might contain // physical pointers to POD types which we never used, and thus never added to the list. // We'll need to add those pointer types to the set of types we declare. ir.for_each_typed_id([&](uint32_t, SPIRType &type) { if (has_decoration(type.self, DecorationBlock) || has_decoration(type.self, DecorationBufferBlock)) handler.analyze_non_block_types_from_block(type); }); physical_storage_non_block_pointer_types.reserve(handler.non_block_types.size()); for (auto type : handler.non_block_types) physical_storage_non_block_pointer_types.push_back(type); sort(begin(physical_storage_non_block_pointer_types), end(physical_storage_non_block_pointer_types)); physical_storage_type_to_alignment = std::move(handler.physical_block_type_meta); } bool Compiler::InterlockedResourceAccessPrepassHandler::handle(Op op, const uint32_t *, uint32_t) { if (op == OpBeginInvocationInterlockEXT || op == OpEndInvocationInterlockEXT) { if (interlock_function_id != 0 && interlock_function_id != call_stack.back()) { // Most complex case, we have no sensible way of dealing with this // other than taking the 100% conservative approach, exit early. split_function_case = true; return false; } else { interlock_function_id = call_stack.back(); // If this call is performed inside control flow we have a problem. auto &cfg = compiler.get_cfg_for_function(interlock_function_id); uint32_t from_block_id = compiler.get(interlock_function_id).entry_block; bool outside_control_flow = cfg.node_terminates_control_flow_in_sub_graph(from_block_id, current_block_id); if (!outside_control_flow) control_flow_interlock = true; } } return true; } void Compiler::InterlockedResourceAccessPrepassHandler::rearm_current_block(const SPIRBlock &block) { current_block_id = block.self; } bool Compiler::InterlockedResourceAccessPrepassHandler::begin_function_scope(const uint32_t *args, uint32_t length) { if (length < 3) return false; call_stack.push_back(args[2]); return true; } bool Compiler::InterlockedResourceAccessPrepassHandler::end_function_scope(const uint32_t *, uint32_t) { call_stack.pop_back(); return true; } bool Compiler::InterlockedResourceAccessHandler::begin_function_scope(const uint32_t *args, uint32_t length) { if (length < 3) return false; if (args[2] == interlock_function_id) call_stack_is_interlocked = true; call_stack.push_back(args[2]); return true; } bool Compiler::InterlockedResourceAccessHandler::end_function_scope(const uint32_t *, uint32_t) { if (call_stack.back() == interlock_function_id) call_stack_is_interlocked = false; call_stack.pop_back(); return true; } void Compiler::InterlockedResourceAccessHandler::access_potential_resource(uint32_t id) { if ((use_critical_section && in_crit_sec) || (control_flow_interlock && call_stack_is_interlocked) || split_function_case) { compiler.interlocked_resources.insert(id); } } bool Compiler::InterlockedResourceAccessHandler::handle(Op opcode, const uint32_t *args, uint32_t length) { // Only care about critical section analysis if we have simple case. if (use_critical_section) { if (opcode == OpBeginInvocationInterlockEXT) { in_crit_sec = true; return true; } if (opcode == OpEndInvocationInterlockEXT) { // End critical section--nothing more to do. return false; } } // We need to figure out where images and buffers are loaded from, so do only the bare bones compilation we need. switch (opcode) { case OpLoad: { if (length < 3) return false; uint32_t ptr = args[2]; auto *var = compiler.maybe_get_backing_variable(ptr); // We're only concerned with buffer and image memory here. if (!var) break; switch (var->storage) { default: break; case StorageClassUniformConstant: { uint32_t result_type = args[0]; uint32_t id = args[1]; compiler.set(id, "", result_type, true); compiler.register_read(id, ptr, true); break; } case StorageClassUniform: // Must have BufferBlock; we only care about SSBOs. if (!compiler.has_decoration(compiler.get(var->basetype).self, DecorationBufferBlock)) break; // fallthrough case StorageClassStorageBuffer: access_potential_resource(var->self); break; } break; } case OpInBoundsAccessChain: case OpAccessChain: case OpPtrAccessChain: { if (length < 3) return false; uint32_t result_type = args[0]; auto &type = compiler.get(result_type); if (type.storage == StorageClassUniform || type.storage == StorageClassUniformConstant || type.storage == StorageClassStorageBuffer) { uint32_t id = args[1]; uint32_t ptr = args[2]; compiler.set(id, "", result_type, true); compiler.register_read(id, ptr, true); compiler.ir.ids[id].set_allow_type_rewrite(); } break; } case OpImageTexelPointer: { if (length < 3) return false; uint32_t result_type = args[0]; uint32_t id = args[1]; uint32_t ptr = args[2]; auto &e = compiler.set(id, "", result_type, true); auto *var = compiler.maybe_get_backing_variable(ptr); if (var) e.loaded_from = var->self; break; } case OpStore: case OpImageWrite: case OpAtomicStore: { if (length < 1) return false; uint32_t ptr = args[0]; auto *var = compiler.maybe_get_backing_variable(ptr); if (var && (var->storage == StorageClassUniform || var->storage == StorageClassUniformConstant || var->storage == StorageClassStorageBuffer)) { access_potential_resource(var->self); } break; } case OpCopyMemory: { if (length < 2) return false; uint32_t dst = args[0]; uint32_t src = args[1]; auto *dst_var = compiler.maybe_get_backing_variable(dst); auto *src_var = compiler.maybe_get_backing_variable(src); if (dst_var && (dst_var->storage == StorageClassUniform || dst_var->storage == StorageClassStorageBuffer)) access_potential_resource(dst_var->self); if (src_var) { if (src_var->storage != StorageClassUniform && src_var->storage != StorageClassStorageBuffer) break; if (src_var->storage == StorageClassUniform && !compiler.has_decoration(compiler.get(src_var->basetype).self, DecorationBufferBlock)) { break; } access_potential_resource(src_var->self); } break; } case OpImageRead: case OpAtomicLoad: { if (length < 3) return false; uint32_t ptr = args[2]; auto *var = compiler.maybe_get_backing_variable(ptr); // We're only concerned with buffer and image memory here. if (!var) break; switch (var->storage) { default: break; case StorageClassUniform: // Must have BufferBlock; we only care about SSBOs. if (!compiler.has_decoration(compiler.get(var->basetype).self, DecorationBufferBlock)) break; // fallthrough case StorageClassUniformConstant: case StorageClassStorageBuffer: access_potential_resource(var->self); break; } break; } case OpAtomicExchange: case OpAtomicCompareExchange: case OpAtomicIIncrement: case OpAtomicIDecrement: case OpAtomicIAdd: case OpAtomicISub: case OpAtomicSMin: case OpAtomicUMin: case OpAtomicSMax: case OpAtomicUMax: case OpAtomicAnd: case OpAtomicOr: case OpAtomicXor: { if (length < 3) return false; uint32_t ptr = args[2]; auto *var = compiler.maybe_get_backing_variable(ptr); if (var && (var->storage == StorageClassUniform || var->storage == StorageClassUniformConstant || var->storage == StorageClassStorageBuffer)) { access_potential_resource(var->self); } break; } default: break; } return true; } void Compiler::analyze_interlocked_resource_usage() { if (get_execution_model() == ExecutionModelFragment && (get_entry_point().flags.get(ExecutionModePixelInterlockOrderedEXT) || get_entry_point().flags.get(ExecutionModePixelInterlockUnorderedEXT) || get_entry_point().flags.get(ExecutionModeSampleInterlockOrderedEXT) || get_entry_point().flags.get(ExecutionModeSampleInterlockUnorderedEXT))) { InterlockedResourceAccessPrepassHandler prepass_handler(*this, ir.default_entry_point); traverse_all_reachable_opcodes(get(ir.default_entry_point), prepass_handler); InterlockedResourceAccessHandler handler(*this, ir.default_entry_point); handler.interlock_function_id = prepass_handler.interlock_function_id; handler.split_function_case = prepass_handler.split_function_case; handler.control_flow_interlock = prepass_handler.control_flow_interlock; handler.use_critical_section = !handler.split_function_case && !handler.control_flow_interlock; traverse_all_reachable_opcodes(get(ir.default_entry_point), handler); // For GLSL. If we hit any of these cases, we have to fall back to conservative approach. interlocked_is_complex = !handler.use_critical_section || handler.interlock_function_id != ir.default_entry_point; } } // Helper function bool Compiler::check_internal_recursion(const SPIRType &type, std::unordered_set &checked_ids) { if (type.basetype != SPIRType::Struct) return false; if (checked_ids.count(type.self)) return true; // Recurse into struct members bool is_recursive = false; checked_ids.insert(type.self); uint32_t mbr_cnt = uint32_t(type.member_types.size()); for (uint32_t mbr_idx = 0; !is_recursive && mbr_idx < mbr_cnt; mbr_idx++) { uint32_t mbr_type_id = type.member_types[mbr_idx]; auto &mbr_type = get(mbr_type_id); is_recursive |= check_internal_recursion(mbr_type, checked_ids); } checked_ids.erase(type.self); return is_recursive; } // Return whether the struct type contains a structural recursion nested somewhere within its content. bool Compiler::type_contains_recursion(const SPIRType &type) { std::unordered_set checked_ids; return check_internal_recursion(type, checked_ids); } bool Compiler::type_is_array_of_pointers(const SPIRType &type) const { if (!is_array(type)) return false; // BDA types must have parent type hierarchy. if (!type.parent_type) return false; // Punch through all array layers. auto *parent = &get(type.parent_type); while (is_array(*parent)) parent = &get(parent->parent_type); return is_pointer(*parent); } bool Compiler::flush_phi_required(BlockID from, BlockID to) const { auto &child = get(to); for (auto &phi : child.phi_variables) if (phi.parent == from) return true; return false; } void Compiler::add_loop_level() { current_loop_level++; } ================================================ FILE: src/libraries/spirv_cross/spirv_cross.hpp ================================================ /* * Copyright 2015-2021 Arm Limited * SPDX-License-Identifier: Apache-2.0 OR MIT * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* * At your option, you may choose to accept this material under either: * 1. The Apache License, Version 2.0, found at , or * 2. The MIT License, found at . */ #ifndef SPIRV_CROSS_HPP #define SPIRV_CROSS_HPP #ifndef SPV_ENABLE_UTILITY_CODE #define SPV_ENABLE_UTILITY_CODE #endif #include "spirv.hpp" #include "spirv_cfg.hpp" #include "spirv_cross_parsed_ir.hpp" namespace SPIRV_CROSS_NAMESPACE { struct Resource { // Resources are identified with their SPIR-V ID. // This is the ID of the OpVariable. ID id; // The type ID of the variable which includes arrays and all type modifications. // This type ID is not suitable for parsing OpMemberDecoration of a struct and other decorations in general // since these modifications typically happen on the base_type_id. TypeID type_id; // The base type of the declared resource. // This type is the base type which ignores pointers and arrays of the type_id. // This is mostly useful to parse decorations of the underlying type. // base_type_id can also be obtained with get_type(get_type(type_id).self). TypeID base_type_id; // The declared name (OpName) of the resource. // For Buffer blocks, the name actually reflects the externally // visible Block name. // // This name can be retrieved again by using either // get_name(id) or get_name(base_type_id) depending if it's a buffer block or not. // // This name can be an empty string in which case get_fallback_name(id) can be // used which obtains a suitable fallback identifier for an ID. std::string name; }; struct BuiltInResource { // This is mostly here to support reflection of builtins such as Position/PointSize/CullDistance/ClipDistance. // This needs to be different from Resource since we can collect builtins from blocks. // A builtin present here does not necessarily mean it's considered an active builtin, // since variable ID "activeness" is only tracked on OpVariable level, not Block members. // For that, update_active_builtins() -> has_active_builtin() can be used to further refine the reflection. spv::BuiltIn builtin; // This is the actual value type of the builtin. // Typically float4, float, array for the gl_PerVertex builtins. // If the builtin is a control point, the control point array type will be stripped away here as appropriate. TypeID value_type_id; // This refers to the base resource which contains the builtin. // If resource is a Block, it can hold multiple builtins, or it might not be a block. // For advanced reflection scenarios, all information in builtin/value_type_id can be deduced, // it's just more convenient this way. Resource resource; }; struct ShaderResources { SmallVector uniform_buffers; SmallVector storage_buffers; SmallVector stage_inputs; SmallVector stage_outputs; SmallVector subpass_inputs; SmallVector storage_images; SmallVector sampled_images; SmallVector atomic_counters; SmallVector acceleration_structures; SmallVector gl_plain_uniforms; // There can only be one push constant block, // but keep the vector in case this restriction is lifted in the future. SmallVector push_constant_buffers; SmallVector shader_record_buffers; // For Vulkan GLSL and HLSL source, // these correspond to separate texture2D and samplers respectively. SmallVector separate_images; SmallVector separate_samplers; SmallVector builtin_inputs; SmallVector builtin_outputs; }; struct CombinedImageSampler { // The ID of the sampler2D variable. VariableID combined_id; // The ID of the texture2D variable. VariableID image_id; // The ID of the sampler variable. VariableID sampler_id; }; struct SpecializationConstant { // The ID of the specialization constant. ConstantID id; // The constant ID of the constant, used in Vulkan during pipeline creation. uint32_t constant_id; }; struct BufferRange { unsigned index; size_t offset; size_t range; }; enum BufferPackingStandard { BufferPackingStd140, BufferPackingStd430, BufferPackingStd140EnhancedLayout, BufferPackingStd430EnhancedLayout, BufferPackingHLSLCbuffer, BufferPackingHLSLCbufferPackOffset, BufferPackingScalar, BufferPackingScalarEnhancedLayout }; struct EntryPoint { std::string name; spv::ExecutionModel execution_model; }; class Compiler { public: friend class CFG; friend class DominatorBuilder; // The constructor takes a buffer of SPIR-V words and parses it. // It will create its own parser, parse the SPIR-V and move the parsed IR // as if you had called the constructors taking ParsedIR directly. explicit Compiler(std::vector ir); Compiler(const uint32_t *ir, size_t word_count); // This is more modular. We can also consume a ParsedIR structure directly, either as a move, or copy. // With copy, we can reuse the same parsed IR for multiple Compiler instances. explicit Compiler(const ParsedIR &ir); explicit Compiler(ParsedIR &&ir); virtual ~Compiler() = default; // After parsing, API users can modify the SPIR-V via reflection and call this // to disassemble the SPIR-V into the desired langauage. // Sub-classes actually implement this. virtual std::string compile(); // Gets the identifier (OpName) of an ID. If not defined, an empty string will be returned. const std::string &get_name(ID id) const; // Applies a decoration to an ID. Effectively injects OpDecorate. void set_decoration(ID id, spv::Decoration decoration, uint32_t argument = 0); void set_decoration_string(ID id, spv::Decoration decoration, const std::string &argument); // Overrides the identifier OpName of an ID. // Identifiers beginning with underscores or identifiers which contain double underscores // are reserved by the implementation. void set_name(ID id, const std::string &name); // Gets a bitmask for the decorations which are applied to ID. // I.e. (1ull << spv::DecorationFoo) | (1ull << spv::DecorationBar) const Bitset &get_decoration_bitset(ID id) const; // Returns whether the decoration has been applied to the ID. bool has_decoration(ID id, spv::Decoration decoration) const; // Gets the value for decorations which take arguments. // If the decoration is a boolean (i.e. spv::DecorationNonWritable), // 1 will be returned. // If decoration doesn't exist or decoration is not recognized, // 0 will be returned. uint32_t get_decoration(ID id, spv::Decoration decoration) const; const std::string &get_decoration_string(ID id, spv::Decoration decoration) const; // Removes the decoration for an ID. void unset_decoration(ID id, spv::Decoration decoration); // Gets the SPIR-V type associated with ID. // Mostly used with Resource::type_id and Resource::base_type_id to parse the underlying type of a resource. const SPIRType &get_type(TypeID id) const; // Gets the SPIR-V type of a variable. const SPIRType &get_type_from_variable(VariableID id) const; // Gets the underlying storage class for an OpVariable. spv::StorageClass get_storage_class(VariableID id) const; // If get_name() is an empty string, get the fallback name which will be used // instead in the disassembled source. virtual const std::string get_fallback_name(ID id) const; // If get_name() of a Block struct is an empty string, get the fallback name. // This needs to be per-variable as multiple variables can use the same block type. virtual const std::string get_block_fallback_name(VariableID id) const; // Given an OpTypeStruct in ID, obtain the identifier for member number "index". // This may be an empty string. const std::string &get_member_name(TypeID id, uint32_t index) const; // Given an OpTypeStruct in ID, obtain the OpMemberDecoration for member number "index". uint32_t get_member_decoration(TypeID id, uint32_t index, spv::Decoration decoration) const; const std::string &get_member_decoration_string(TypeID id, uint32_t index, spv::Decoration decoration) const; // Sets the member identifier for OpTypeStruct ID, member number "index". void set_member_name(TypeID id, uint32_t index, const std::string &name); // Returns the qualified member identifier for OpTypeStruct ID, member number "index", // or an empty string if no qualified alias exists const std::string &get_member_qualified_name(TypeID type_id, uint32_t index) const; // Gets the decoration mask for a member of a struct, similar to get_decoration_mask. const Bitset &get_member_decoration_bitset(TypeID id, uint32_t index) const; // Returns whether the decoration has been applied to a member of a struct. bool has_member_decoration(TypeID id, uint32_t index, spv::Decoration decoration) const; // Similar to set_decoration, but for struct members. void set_member_decoration(TypeID id, uint32_t index, spv::Decoration decoration, uint32_t argument = 0); void set_member_decoration_string(TypeID id, uint32_t index, spv::Decoration decoration, const std::string &argument); // Unsets a member decoration, similar to unset_decoration. void unset_member_decoration(TypeID id, uint32_t index, spv::Decoration decoration); // Gets the fallback name for a member, similar to get_fallback_name. virtual const std::string get_fallback_member_name(uint32_t index) const { return join("_", index); } // Returns a vector of which members of a struct are potentially in use by a // SPIR-V shader. The granularity of this analysis is per-member of a struct. // This can be used for Buffer (UBO), BufferBlock/StorageBuffer (SSBO) and PushConstant blocks. // ID is the Resource::id obtained from get_shader_resources(). SmallVector get_active_buffer_ranges(VariableID id) const; // Returns the effective size of a buffer block. size_t get_declared_struct_size(const SPIRType &struct_type) const; // Returns the effective size of a buffer block, with a given array size // for a runtime array. // SSBOs are typically declared as runtime arrays. get_declared_struct_size() will return 0 for the size. // This is not very helpful for applications which might need to know the array stride of its last member. // This can be done through the API, but it is not very intuitive how to accomplish this, so here we provide a helper function // to query the size of the buffer, assuming that the last member has a certain size. // If the buffer does not contain a runtime array, array_size is ignored, and the function will behave as // get_declared_struct_size(). // To get the array stride of the last member, something like: // get_declared_struct_size_runtime_array(type, 1) - get_declared_struct_size_runtime_array(type, 0) will work. size_t get_declared_struct_size_runtime_array(const SPIRType &struct_type, size_t array_size) const; // Returns the effective size of a buffer block struct member. size_t get_declared_struct_member_size(const SPIRType &struct_type, uint32_t index) const; // Returns a set of all global variables which are statically accessed // by the control flow graph from the current entry point. // Only variables which change the interface for a shader are returned, that is, // variables with storage class of Input, Output, Uniform, UniformConstant, PushConstant and AtomicCounter // storage classes are returned. // // To use the returned set as the filter for which variables are used during compilation, // this set can be moved to set_enabled_interface_variables(). std::unordered_set get_active_interface_variables() const; // Sets the interface variables which are used during compilation. // By default, all variables are used. // Once set, compile() will only consider the set in active_variables. void set_enabled_interface_variables(std::unordered_set active_variables); // Query shader resources, use ids with reflection interface to modify or query binding points, etc. ShaderResources get_shader_resources() const; // Query shader resources, but only return the variables which are part of active_variables. // E.g.: get_shader_resources(get_active_variables()) to only return the variables which are statically // accessed. ShaderResources get_shader_resources(const std::unordered_set &active_variables) const; // Remapped variables are considered built-in variables and a backend will // not emit a declaration for this variable. // This is mostly useful for making use of builtins which are dependent on extensions. void set_remapped_variable_state(VariableID id, bool remap_enable); bool get_remapped_variable_state(VariableID id) const; // For subpassInput variables which are remapped to plain variables, // the number of components in the remapped // variable must be specified as the backing type of subpass inputs are opaque. void set_subpass_input_remapped_components(VariableID id, uint32_t components); uint32_t get_subpass_input_remapped_components(VariableID id) const; // All operations work on the current entry point. // Entry points can be swapped out with set_entry_point(). // Entry points should be set right after the constructor completes as some reflection functions traverse the graph from the entry point. // Resource reflection also depends on the entry point. // By default, the current entry point is set to the first OpEntryPoint which appears in the SPIR-V module. // Some shader languages restrict the names that can be given to entry points, and the // corresponding backend will automatically rename an entry point name, during the call // to compile() if it is illegal. For example, the common entry point name main() is // illegal in MSL, and is renamed to an alternate name by the MSL backend. // Given the original entry point name contained in the SPIR-V, this function returns // the name, as updated by the backend during the call to compile(). If the name is not // illegal, and has not been renamed, or if this function is called before compile(), // this function will simply return the same name. // New variants of entry point query and reflection. // Names for entry points in the SPIR-V module may alias if they belong to different execution models. // To disambiguate, we must pass along with the entry point names the execution model. SmallVector get_entry_points_and_stages() const; void set_entry_point(const std::string &entry, spv::ExecutionModel execution_model); // Renames an entry point from old_name to new_name. // If old_name is currently selected as the current entry point, it will continue to be the current entry point, // albeit with a new name. // get_entry_points() is essentially invalidated at this point. void rename_entry_point(const std::string &old_name, const std::string &new_name, spv::ExecutionModel execution_model); const SPIREntryPoint &get_entry_point(const std::string &name, spv::ExecutionModel execution_model) const; SPIREntryPoint &get_entry_point(const std::string &name, spv::ExecutionModel execution_model); const std::string &get_cleansed_entry_point_name(const std::string &name, spv::ExecutionModel execution_model) const; // Traverses all reachable opcodes and sets active_builtins to a bitmask of all builtin variables which are accessed in the shader. void update_active_builtins(); bool has_active_builtin(spv::BuiltIn builtin, spv::StorageClass storage) const; // Query and modify OpExecutionMode. const Bitset &get_execution_mode_bitset() const; void unset_execution_mode(spv::ExecutionMode mode); void set_execution_mode(spv::ExecutionMode mode, uint32_t arg0 = 0, uint32_t arg1 = 0, uint32_t arg2 = 0); // Gets argument for an execution mode (LocalSize, Invocations, OutputVertices). // For LocalSize or LocalSizeId, the index argument is used to select the dimension (X = 0, Y = 1, Z = 2). // For execution modes which do not have arguments, 0 is returned. // LocalSizeId query returns an ID. If LocalSizeId execution mode is not used, it returns 0. // LocalSize always returns a literal. If execution mode is LocalSizeId, // the literal (spec constant or not) is still returned. uint32_t get_execution_mode_argument(spv::ExecutionMode mode, uint32_t index = 0) const; spv::ExecutionModel get_execution_model() const; bool is_tessellation_shader() const; bool is_tessellating_triangles() const; // In SPIR-V, the compute work group size can be represented by a constant vector, in which case // the LocalSize execution mode is ignored. // // This constant vector can be a constant vector, specialization constant vector, or partly specialized constant vector. // To modify and query work group dimensions which are specialization constants, SPIRConstant values must be modified // directly via get_constant() rather than using LocalSize directly. This function will return which constants should be modified. // // To modify dimensions which are *not* specialization constants, set_execution_mode should be used directly. // Arguments to set_execution_mode which are specialization constants are effectively ignored during compilation. // NOTE: This is somewhat different from how SPIR-V works. In SPIR-V, the constant vector will completely replace LocalSize, // while in this interface, LocalSize is only ignored for specialization constants. // // The specialization constant will be written to x, y and z arguments. // If the component is not a specialization constant, a zeroed out struct will be written. // The return value is the constant ID of the builtin WorkGroupSize, but this is not expected to be useful // for most use cases. // If LocalSizeId is used, there is no uvec3 value representing the workgroup size, so the return value is 0, // but x, y and z are written as normal if the components are specialization constants. uint32_t get_work_group_size_specialization_constants(SpecializationConstant &x, SpecializationConstant &y, SpecializationConstant &z) const; // Analyzes all OpImageFetch (texelFetch) opcodes and checks if there are instances where // said instruction is used without a combined image sampler. // GLSL targets do not support the use of texelFetch without a sampler. // To workaround this, we must inject a dummy sampler which can be used to form a sampler2D at the call-site of // texelFetch as necessary. // // This must be called before build_combined_image_samplers(). // build_combined_image_samplers() may refer to the ID returned by this method if the returned ID is non-zero. // The return value will be the ID of a sampler object if a dummy sampler is necessary, or 0 if no sampler object // is required. // // If the returned ID is non-zero, it can be decorated with set/bindings as desired before calling compile(). // Calling this function also invalidates get_active_interface_variables(), so this should be called // before that function. VariableID build_dummy_sampler_for_combined_images(); // Analyzes all separate image and samplers used from the currently selected entry point, // and re-routes them all to a combined image sampler instead. // This is required to "support" separate image samplers in targets which do not natively support // this feature, like GLSL/ESSL. // // This must be called before compile() if such remapping is desired. // This call will add new sampled images to the SPIR-V, // so it will appear in reflection if get_shader_resources() is called after build_combined_image_samplers. // // If any image/sampler remapping was found, no separate image/samplers will appear in the decompiled output, // but will still appear in reflection. // // The resulting samplers will be void of any decorations like name, descriptor sets and binding points, // so this can be added before compile() if desired. // // Combined image samplers originating from this set are always considered active variables. // Arrays of separate samplers are not supported, but arrays of separate images are supported. // Array of images + sampler -> Array of combined image samplers. void build_combined_image_samplers(); // Gets a remapping for the combined image samplers. const SmallVector &get_combined_image_samplers() const { return combined_image_samplers; } // Set a new variable type remap callback. // The type remapping is designed to allow global interface variable to assume more special types. // A typical example here is to remap sampler2D into samplerExternalOES, which currently isn't supported // directly by SPIR-V. // // In compile() while emitting code, // for every variable that is declared, including function parameters, the callback will be called // and the API user has a chance to change the textual representation of the type used to declare the variable. // The API user can detect special patterns in names to guide the remapping. void set_variable_type_remap_callback(VariableTypeRemapCallback cb) { variable_remap_callback = std::move(cb); } // API for querying which specialization constants exist. // To modify a specialization constant before compile(), use get_constant(constant.id), // then update constants directly in the SPIRConstant data structure. // For composite types, the subconstants can be iterated over and modified. // constant_type is the SPIRType for the specialization constant, // which can be queried to determine which fields in the unions should be poked at. SmallVector get_specialization_constants() const; SPIRConstant &get_constant(ConstantID id); const SPIRConstant &get_constant(ConstantID id) const; uint32_t get_current_id_bound() const { return uint32_t(ir.ids.size()); } // API for querying buffer objects. // The type passed in here should be the base type of a resource, i.e. // get_type(resource.base_type_id) // as decorations are set in the basic Block type. // The type passed in here must have these decorations set, or an exception is raised. // Only UBOs and SSBOs or sub-structs which are part of these buffer types will have these decorations set. uint32_t type_struct_member_offset(const SPIRType &type, uint32_t index) const; uint32_t type_struct_member_array_stride(const SPIRType &type, uint32_t index) const; uint32_t type_struct_member_matrix_stride(const SPIRType &type, uint32_t index) const; // Gets the offset in SPIR-V words (uint32_t) for a decoration which was originally declared in the SPIR-V binary. // The offset will point to one or more uint32_t literals which can be modified in-place before using the SPIR-V binary. // Note that adding or removing decorations using the reflection API will not change the behavior of this function. // If the decoration was declared, sets the word_offset to an offset into the provided SPIR-V binary buffer and returns true, // otherwise, returns false. // If the decoration does not have any value attached to it (e.g. DecorationRelaxedPrecision), this function will also return false. bool get_binary_offset_for_decoration(VariableID id, spv::Decoration decoration, uint32_t &word_offset) const; // HLSL counter buffer reflection interface. // Append/Consume/Increment/Decrement in HLSL is implemented as two "neighbor" buffer objects where // one buffer implements the storage, and a single buffer containing just a lone "int" implements the counter. // To SPIR-V these will be exposed as two separate buffers, but glslang HLSL frontend emits a special indentifier // which lets us link the two buffers together. // Queries if a variable ID is a counter buffer which "belongs" to a regular buffer object. // If SPV_GOOGLE_hlsl_functionality1 is used, this can be used even with a stripped SPIR-V module. // Otherwise, this query is purely based on OpName identifiers as found in the SPIR-V module, and will // only return true if OpSource was reported HLSL. // To rely on this functionality, ensure that the SPIR-V module is not stripped. bool buffer_is_hlsl_counter_buffer(VariableID id) const; // Queries if a buffer object has a neighbor "counter" buffer. // If so, the ID of that counter buffer will be returned in counter_id. // If SPV_GOOGLE_hlsl_functionality1 is used, this can be used even with a stripped SPIR-V module. // Otherwise, this query is purely based on OpName identifiers as found in the SPIR-V module, and will // only return true if OpSource was reported HLSL. // To rely on this functionality, ensure that the SPIR-V module is not stripped. bool buffer_get_hlsl_counter_buffer(VariableID id, uint32_t &counter_id) const; // Gets the list of all SPIR-V Capabilities which were declared in the SPIR-V module. const SmallVector &get_declared_capabilities() const; // Gets the list of all SPIR-V extensions which were declared in the SPIR-V module. const SmallVector &get_declared_extensions() const; // When declaring buffer blocks in GLSL, the name declared in the GLSL source // might not be the same as the name declared in the SPIR-V module due to naming conflicts. // In this case, SPIRV-Cross needs to find a fallback-name, and it might only // be possible to know this name after compiling to GLSL. // This is particularly important for HLSL input and UAVs which tends to reuse the same block type // for multiple distinct blocks. For these cases it is not possible to modify the name of the type itself // because it might be unique. Instead, you can use this interface to check after compilation which // name was actually used if your input SPIR-V tends to have this problem. // For other names like remapped names for variables, etc, it's generally enough to query the name of the variables // after compiling, block names are an exception to this rule. // ID is the name of a variable as returned by Resource::id, and must be a variable with a Block-like type. // // This also applies to HLSL cbuffers. std::string get_remapped_declared_block_name(VariableID id) const; // For buffer block variables, get the decorations for that variable. // Sometimes, decorations for buffer blocks are found in member decorations instead // of direct decorations on the variable itself. // The most common use here is to check if a buffer is readonly or writeonly. Bitset get_buffer_block_flags(VariableID id) const; // Returns whether the position output is invariant bool is_position_invariant() const { return position_invariant; } protected: const uint32_t *stream(const Instruction &instr) const { // If we're not going to use any arguments, just return nullptr. // We want to avoid case where we return an out of range pointer // that trips debug assertions on some platforms. if (!instr.length) return nullptr; if (instr.is_embedded()) { auto &embedded = static_cast(instr); assert(embedded.ops.size() == instr.length); return embedded.ops.data(); } else { if (instr.offset + instr.length > ir.spirv.size()) SPIRV_CROSS_THROW("Compiler::stream() out of range."); return &ir.spirv[instr.offset]; } } uint32_t *stream_mutable(const Instruction &instr) const { return const_cast(stream(instr)); } ParsedIR ir; // Marks variables which have global scope and variables which can alias with other variables // (SSBO, image load store, etc) SmallVector global_variables; SmallVector aliased_variables; SPIRFunction *current_function = nullptr; SPIRBlock *current_block = nullptr; uint32_t current_loop_level = 0; std::unordered_set active_interface_variables; bool check_active_interface_variables = false; void add_loop_level(); void set_initializers(SPIRExpression &e) { e.emitted_loop_level = current_loop_level; } template void set_initializers(const T &) { } // If our IDs are out of range here as part of opcodes, throw instead of // undefined behavior. template T &set(uint32_t id, P &&... args) { ir.add_typed_id(static_cast(T::type), id); auto &var = variant_set(ir.ids[id], std::forward

(args)...); var.self = id; set_initializers(var); return var; } template T &get(uint32_t id) { return variant_get(ir.ids[id]); } template T *maybe_get(uint32_t id) { if (id >= ir.ids.size()) return nullptr; else if (ir.ids[id].get_type() == static_cast(T::type)) return &get(id); else return nullptr; } template const T &get(uint32_t id) const { return variant_get(ir.ids[id]); } template const T *maybe_get(uint32_t id) const { if (id >= ir.ids.size()) return nullptr; else if (ir.ids[id].get_type() == static_cast(T::type)) return &get(id); else return nullptr; } // Gets the id of SPIR-V type underlying the given type_id, which might be a pointer. uint32_t get_pointee_type_id(uint32_t type_id) const; // Gets the SPIR-V type underlying the given type, which might be a pointer. const SPIRType &get_pointee_type(const SPIRType &type) const; // Gets the SPIR-V type underlying the given type_id, which might be a pointer. const SPIRType &get_pointee_type(uint32_t type_id) const; // Gets the ID of the SPIR-V type underlying a variable. uint32_t get_variable_data_type_id(const SPIRVariable &var) const; // Gets the SPIR-V type underlying a variable. SPIRType &get_variable_data_type(const SPIRVariable &var); // Gets the SPIR-V type underlying a variable. const SPIRType &get_variable_data_type(const SPIRVariable &var) const; // Gets the SPIR-V element type underlying an array variable. SPIRType &get_variable_element_type(const SPIRVariable &var); // Gets the SPIR-V element type underlying an array variable. const SPIRType &get_variable_element_type(const SPIRVariable &var) const; // Sets the qualified member identifier for OpTypeStruct ID, member number "index". void set_member_qualified_name(uint32_t type_id, uint32_t index, const std::string &name); void set_qualified_name(uint32_t id, const std::string &name); // Returns if the given type refers to a sampled image. bool is_sampled_image_type(const SPIRType &type); const SPIREntryPoint &get_entry_point() const; SPIREntryPoint &get_entry_point(); static bool is_tessellation_shader(spv::ExecutionModel model); virtual std::string to_name(uint32_t id, bool allow_alias = true) const; bool is_builtin_variable(const SPIRVariable &var) const; bool is_builtin_type(const SPIRType &type) const; bool is_hidden_variable(const SPIRVariable &var, bool include_builtins = false) const; bool is_immutable(uint32_t id) const; bool is_member_builtin(const SPIRType &type, uint32_t index, spv::BuiltIn *builtin) const; bool is_scalar(const SPIRType &type) const; bool is_vector(const SPIRType &type) const; bool is_matrix(const SPIRType &type) const; bool is_array(const SPIRType &type) const; bool is_pointer(const SPIRType &type) const; bool is_physical_pointer(const SPIRType &type) const; static bool is_runtime_size_array(const SPIRType &type); uint32_t expression_type_id(uint32_t id) const; const SPIRType &expression_type(uint32_t id) const; bool expression_is_lvalue(uint32_t id) const; bool variable_storage_is_aliased(const SPIRVariable &var); SPIRVariable *maybe_get_backing_variable(uint32_t chain); void register_read(uint32_t expr, uint32_t chain, bool forwarded); void register_write(uint32_t chain); inline bool is_continue(uint32_t next) const { return (ir.block_meta[next] & ParsedIR::BLOCK_META_CONTINUE_BIT) != 0; } inline bool is_single_block_loop(uint32_t next) const { auto &block = get(next); return block.merge == SPIRBlock::MergeLoop && block.continue_block == ID(next); } inline bool is_break(uint32_t next) const { return (ir.block_meta[next] & (ParsedIR::BLOCK_META_LOOP_MERGE_BIT | ParsedIR::BLOCK_META_MULTISELECT_MERGE_BIT)) != 0; } inline bool is_loop_break(uint32_t next) const { return (ir.block_meta[next] & ParsedIR::BLOCK_META_LOOP_MERGE_BIT) != 0; } inline bool is_conditional(uint32_t next) const { return (ir.block_meta[next] & (ParsedIR::BLOCK_META_SELECTION_MERGE_BIT | ParsedIR::BLOCK_META_MULTISELECT_MERGE_BIT)) != 0; } // Dependency tracking for temporaries read from variables. void flush_dependees(SPIRVariable &var); void flush_all_active_variables(); void flush_control_dependent_expressions(uint32_t block); void flush_all_atomic_capable_variables(); void flush_all_aliased_variables(); void register_global_read_dependencies(const SPIRBlock &func, uint32_t id); void register_global_read_dependencies(const SPIRFunction &func, uint32_t id); std::unordered_set invalid_expressions; void update_name_cache(std::unordered_set &cache, std::string &name); // A variant which takes two sets of names. The secondary is only used to verify there are no collisions, // but the set is not updated when we have found a new name. // Used primarily when adding block interface names. void update_name_cache(std::unordered_set &cache_primary, const std::unordered_set &cache_secondary, std::string &name); bool function_is_pure(const SPIRFunction &func); bool block_is_pure(const SPIRBlock &block); bool execution_is_branchless(const SPIRBlock &from, const SPIRBlock &to) const; bool execution_is_direct_branch(const SPIRBlock &from, const SPIRBlock &to) const; bool execution_is_noop(const SPIRBlock &from, const SPIRBlock &to) const; SPIRBlock::ContinueBlockType continue_block_type(const SPIRBlock &continue_block) const; void force_recompile(); void force_recompile_guarantee_forward_progress(); void clear_force_recompile(); bool is_forcing_recompilation() const; bool is_force_recompile = false; bool is_force_recompile_forward_progress = false; bool block_is_noop(const SPIRBlock &block) const; bool block_is_loop_candidate(const SPIRBlock &block, SPIRBlock::Method method) const; bool types_are_logically_equivalent(const SPIRType &a, const SPIRType &b) const; void inherit_expression_dependencies(uint32_t dst, uint32_t source); void add_implied_read_expression(SPIRExpression &e, uint32_t source); void add_implied_read_expression(SPIRAccessChain &e, uint32_t source); void add_active_interface_variable(uint32_t var_id); // For proper multiple entry point support, allow querying if an Input or Output // variable is part of that entry points interface. bool interface_variable_exists_in_entry_point(uint32_t id) const; SmallVector combined_image_samplers; void remap_variable_type_name(const SPIRType &type, const std::string &var_name, std::string &type_name) const { if (variable_remap_callback) variable_remap_callback(type, var_name, type_name); } void set_ir(const ParsedIR &parsed); void set_ir(ParsedIR &&parsed); void parse_fixup(); // Used internally to implement various traversals for queries. struct OpcodeHandler { virtual ~OpcodeHandler() = default; // Return true if traversal should continue. // If false, traversal will end immediately. virtual bool handle(spv::Op opcode, const uint32_t *args, uint32_t length) = 0; virtual bool handle_terminator(const SPIRBlock &) { return true; } virtual bool follow_function_call(const SPIRFunction &) { return true; } virtual void set_current_block(const SPIRBlock &) { } // Called after returning from a function or when entering a block, // can be called multiple times per block, // while set_current_block is only called on block entry. virtual void rearm_current_block(const SPIRBlock &) { } virtual bool begin_function_scope(const uint32_t *, uint32_t) { return true; } virtual bool end_function_scope(const uint32_t *, uint32_t) { return true; } }; struct BufferAccessHandler : OpcodeHandler { BufferAccessHandler(const Compiler &compiler_, SmallVector &ranges_, uint32_t id_) : compiler(compiler_) , ranges(ranges_) , id(id_) { } bool handle(spv::Op opcode, const uint32_t *args, uint32_t length) override; const Compiler &compiler; SmallVector &ranges; uint32_t id; std::unordered_set seen; }; struct InterfaceVariableAccessHandler : OpcodeHandler { InterfaceVariableAccessHandler(const Compiler &compiler_, std::unordered_set &variables_) : compiler(compiler_) , variables(variables_) { } bool handle(spv::Op opcode, const uint32_t *args, uint32_t length) override; const Compiler &compiler; std::unordered_set &variables; }; struct CombinedImageSamplerHandler : OpcodeHandler { CombinedImageSamplerHandler(Compiler &compiler_) : compiler(compiler_) { } bool handle(spv::Op opcode, const uint32_t *args, uint32_t length) override; bool begin_function_scope(const uint32_t *args, uint32_t length) override; bool end_function_scope(const uint32_t *args, uint32_t length) override; Compiler &compiler; // Each function in the call stack needs its own remapping for parameters so we can deduce which global variable each texture/sampler the parameter is statically bound to. std::stack> parameter_remapping; std::stack functions; uint32_t remap_parameter(uint32_t id); void push_remap_parameters(const SPIRFunction &func, const uint32_t *args, uint32_t length); void pop_remap_parameters(); void register_combined_image_sampler(SPIRFunction &caller, VariableID combined_id, VariableID texture_id, VariableID sampler_id, bool depth); }; struct DummySamplerForCombinedImageHandler : OpcodeHandler { DummySamplerForCombinedImageHandler(Compiler &compiler_) : compiler(compiler_) { } bool handle(spv::Op opcode, const uint32_t *args, uint32_t length) override; Compiler &compiler; bool need_dummy_sampler = false; }; struct ActiveBuiltinHandler : OpcodeHandler { ActiveBuiltinHandler(Compiler &compiler_) : compiler(compiler_) { } bool handle(spv::Op opcode, const uint32_t *args, uint32_t length) override; Compiler &compiler; void handle_builtin(const SPIRType &type, spv::BuiltIn builtin, const Bitset &decoration_flags); void add_if_builtin(uint32_t id); void add_if_builtin_or_block(uint32_t id); void add_if_builtin(uint32_t id, bool allow_blocks); }; bool traverse_all_reachable_opcodes(const SPIRBlock &block, OpcodeHandler &handler) const; bool traverse_all_reachable_opcodes(const SPIRFunction &block, OpcodeHandler &handler) const; // This must be an ordered data structure so we always pick the same type aliases. SmallVector global_struct_cache; ShaderResources get_shader_resources(const std::unordered_set *active_variables) const; VariableTypeRemapCallback variable_remap_callback; bool get_common_basic_type(const SPIRType &type, SPIRType::BaseType &base_type); std::unordered_set forced_temporaries; std::unordered_set forwarded_temporaries; std::unordered_set suppressed_usage_tracking; std::unordered_set hoisted_temporaries; std::unordered_set forced_invariant_temporaries; Bitset active_input_builtins; Bitset active_output_builtins; uint32_t clip_distance_count = 0; uint32_t cull_distance_count = 0; bool position_invariant = false; void analyze_parameter_preservation( SPIRFunction &entry, const CFG &cfg, const std::unordered_map> &variable_to_blocks, const std::unordered_map> &complete_write_blocks); // If a variable ID or parameter ID is found in this set, a sampler is actually a shadow/comparison sampler. // SPIR-V does not support this distinction, so we must keep track of this information outside the type system. // There might be unrelated IDs found in this set which do not correspond to actual variables. // This set should only be queried for the existence of samplers which are already known to be variables or parameter IDs. // Similar is implemented for images, as well as if subpass inputs are needed. std::unordered_set comparison_ids; bool need_subpass_input = false; bool need_subpass_input_ms = false; // In certain backends, we will need to use a dummy sampler to be able to emit code. // GLSL does not support texelFetch on texture2D objects, but SPIR-V does, // so we need to workaround by having the application inject a dummy sampler. uint32_t dummy_sampler_id = 0; void analyze_image_and_sampler_usage(); struct CombinedImageSamplerDrefHandler : OpcodeHandler { CombinedImageSamplerDrefHandler(Compiler &compiler_) : compiler(compiler_) { } bool handle(spv::Op opcode, const uint32_t *args, uint32_t length) override; Compiler &compiler; std::unordered_set dref_combined_samplers; }; struct CombinedImageSamplerUsageHandler : OpcodeHandler { CombinedImageSamplerUsageHandler(Compiler &compiler_, const std::unordered_set &dref_combined_samplers_) : compiler(compiler_) , dref_combined_samplers(dref_combined_samplers_) { } bool begin_function_scope(const uint32_t *args, uint32_t length) override; bool handle(spv::Op opcode, const uint32_t *args, uint32_t length) override; Compiler &compiler; const std::unordered_set &dref_combined_samplers; std::unordered_map> dependency_hierarchy; std::unordered_set comparison_ids; void add_hierarchy_to_comparison_ids(uint32_t ids); bool need_subpass_input = false; bool need_subpass_input_ms = false; void add_dependency(uint32_t dst, uint32_t src); }; void build_function_control_flow_graphs_and_analyze(); std::unordered_map> function_cfgs; const CFG &get_cfg_for_current_function() const; const CFG &get_cfg_for_function(uint32_t id) const; struct CFGBuilder : OpcodeHandler { explicit CFGBuilder(Compiler &compiler_); bool follow_function_call(const SPIRFunction &func) override; bool handle(spv::Op op, const uint32_t *args, uint32_t length) override; Compiler &compiler; std::unordered_map> function_cfgs; }; struct AnalyzeVariableScopeAccessHandler : OpcodeHandler { AnalyzeVariableScopeAccessHandler(Compiler &compiler_, SPIRFunction &entry_); bool follow_function_call(const SPIRFunction &) override; void set_current_block(const SPIRBlock &block) override; void notify_variable_access(uint32_t id, uint32_t block); bool id_is_phi_variable(uint32_t id) const; bool id_is_potential_temporary(uint32_t id) const; bool handle(spv::Op op, const uint32_t *args, uint32_t length) override; bool handle_terminator(const SPIRBlock &block) override; Compiler &compiler; SPIRFunction &entry; std::unordered_map> accessed_variables_to_block; std::unordered_map> accessed_temporaries_to_block; std::unordered_map result_id_to_type; std::unordered_map> complete_write_variables_to_block; std::unordered_map> partial_write_variables_to_block; std::unordered_set access_chain_expressions; // Access chains used in multiple blocks mean hoisting all the variables used to construct the access chain as not all backends can use pointers. // This is also relevant when forwarding opaque objects since we cannot lower these to temporaries. std::unordered_map> rvalue_forward_children; const SPIRBlock *current_block = nullptr; }; struct StaticExpressionAccessHandler : OpcodeHandler { StaticExpressionAccessHandler(Compiler &compiler_, uint32_t variable_id_); bool follow_function_call(const SPIRFunction &) override; bool handle(spv::Op op, const uint32_t *args, uint32_t length) override; Compiler &compiler; uint32_t variable_id; uint32_t static_expression = 0; uint32_t write_count = 0; }; struct PhysicalBlockMeta { uint32_t alignment = 0; }; struct PhysicalStorageBufferPointerHandler : OpcodeHandler { explicit PhysicalStorageBufferPointerHandler(Compiler &compiler_); bool handle(spv::Op op, const uint32_t *args, uint32_t length) override; Compiler &compiler; std::unordered_set non_block_types; std::unordered_map physical_block_type_meta; std::unordered_map access_chain_to_physical_block; void mark_aligned_access(uint32_t id, const uint32_t *args, uint32_t length); PhysicalBlockMeta *find_block_meta(uint32_t id) const; bool type_is_bda_block_entry(uint32_t type_id) const; void setup_meta_chain(uint32_t type_id, uint32_t var_id); uint32_t get_minimum_scalar_alignment(const SPIRType &type) const; void analyze_non_block_types_from_block(const SPIRType &type); uint32_t get_base_non_block_type_id(uint32_t type_id) const; }; void analyze_non_block_pointer_types(); SmallVector physical_storage_non_block_pointer_types; std::unordered_map physical_storage_type_to_alignment; void analyze_variable_scope(SPIRFunction &function, AnalyzeVariableScopeAccessHandler &handler); void find_function_local_luts(SPIRFunction &function, const AnalyzeVariableScopeAccessHandler &handler, bool single_function); bool may_read_undefined_variable_in_block(const SPIRBlock &block, uint32_t var); // Finds all resources that are written to from inside the critical section, if present. // The critical section is delimited by OpBeginInvocationInterlockEXT and // OpEndInvocationInterlockEXT instructions. In MSL and HLSL, any resources written // while inside the critical section must be placed in a raster order group. struct InterlockedResourceAccessHandler : OpcodeHandler { InterlockedResourceAccessHandler(Compiler &compiler_, uint32_t entry_point_id) : compiler(compiler_) { call_stack.push_back(entry_point_id); } bool handle(spv::Op op, const uint32_t *args, uint32_t length) override; bool begin_function_scope(const uint32_t *args, uint32_t length) override; bool end_function_scope(const uint32_t *args, uint32_t length) override; Compiler &compiler; bool in_crit_sec = false; uint32_t interlock_function_id = 0; bool split_function_case = false; bool control_flow_interlock = false; bool use_critical_section = false; bool call_stack_is_interlocked = false; SmallVector call_stack; void access_potential_resource(uint32_t id); }; struct InterlockedResourceAccessPrepassHandler : OpcodeHandler { InterlockedResourceAccessPrepassHandler(Compiler &compiler_, uint32_t entry_point_id) : compiler(compiler_) { call_stack.push_back(entry_point_id); } void rearm_current_block(const SPIRBlock &block) override; bool handle(spv::Op op, const uint32_t *args, uint32_t length) override; bool begin_function_scope(const uint32_t *args, uint32_t length) override; bool end_function_scope(const uint32_t *args, uint32_t length) override; Compiler &compiler; uint32_t interlock_function_id = 0; uint32_t current_block_id = 0; bool split_function_case = false; bool control_flow_interlock = false; SmallVector call_stack; }; void analyze_interlocked_resource_usage(); // The set of all resources written while inside the critical section, if present. std::unordered_set interlocked_resources; bool interlocked_is_complex = false; void make_constant_null(uint32_t id, uint32_t type); std::unordered_map declared_block_names; bool instruction_to_result_type(uint32_t &result_type, uint32_t &result_id, spv::Op op, const uint32_t *args, uint32_t length); Bitset combined_decoration_for_member(const SPIRType &type, uint32_t index) const; static bool is_desktop_only_format(spv::ImageFormat format); bool is_depth_image(const SPIRType &type, uint32_t id) const; void set_extended_decoration(uint32_t id, ExtendedDecorations decoration, uint32_t value = 0); uint32_t get_extended_decoration(uint32_t id, ExtendedDecorations decoration) const; bool has_extended_decoration(uint32_t id, ExtendedDecorations decoration) const; void unset_extended_decoration(uint32_t id, ExtendedDecorations decoration); void set_extended_member_decoration(uint32_t type, uint32_t index, ExtendedDecorations decoration, uint32_t value = 0); uint32_t get_extended_member_decoration(uint32_t type, uint32_t index, ExtendedDecorations decoration) const; bool has_extended_member_decoration(uint32_t type, uint32_t index, ExtendedDecorations decoration) const; void unset_extended_member_decoration(uint32_t type, uint32_t index, ExtendedDecorations decoration); bool check_internal_recursion(const SPIRType &type, std::unordered_set &checked_ids); bool type_contains_recursion(const SPIRType &type); bool type_is_array_of_pointers(const SPIRType &type) const; bool type_is_block_like(const SPIRType &type) const; bool type_is_top_level_block(const SPIRType &type) const; bool type_is_opaque_value(const SPIRType &type) const; bool reflection_ssbo_instance_name_is_significant() const; std::string get_remapped_declared_block_name(uint32_t id, bool fallback_prefer_instance_name) const; bool flush_phi_required(BlockID from, BlockID to) const; uint32_t evaluate_spec_constant_u32(const SPIRConstantOp &spec) const; uint32_t evaluate_constant_u32(uint32_t id) const; bool is_vertex_like_shader() const; // Get the correct case list for the OpSwitch, since it can be either a // 32 bit wide condition or a 64 bit, but the type is not embedded in the // instruction itself. const SmallVector &get_case_list(const SPIRBlock &block) const; private: // Used only to implement the old deprecated get_entry_point() interface. const SPIREntryPoint &get_first_entry_point(const std::string &name) const; SPIREntryPoint &get_first_entry_point(const std::string &name); }; } // namespace SPIRV_CROSS_NAMESPACE #endif ================================================ FILE: src/libraries/spirv_cross/spirv_cross_containers.hpp ================================================ /* * Copyright 2019-2021 Hans-Kristian Arntzen * SPDX-License-Identifier: Apache-2.0 OR MIT * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* * At your option, you may choose to accept this material under either: * 1. The Apache License, Version 2.0, found at , or * 2. The MIT License, found at . */ #ifndef SPIRV_CROSS_CONTAINERS_HPP #define SPIRV_CROSS_CONTAINERS_HPP #include "spirv_cross_error_handling.hpp" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #ifdef SPIRV_CROSS_NAMESPACE_OVERRIDE #define SPIRV_CROSS_NAMESPACE SPIRV_CROSS_NAMESPACE_OVERRIDE #else #define SPIRV_CROSS_NAMESPACE spirv_cross #endif namespace SPIRV_CROSS_NAMESPACE { #ifndef SPIRV_CROSS_FORCE_STL_TYPES // std::aligned_storage does not support size == 0, so roll our own. template class AlignedBuffer { public: T *data() { #if defined(_MSC_VER) && _MSC_VER < 1900 // MSVC 2013 workarounds, sigh ... // Only use this workaround on MSVC 2013 due to some confusion around default initialized unions. // Spec seems to suggest the memory will be zero-initialized, which is *not* what we want. return reinterpret_cast(u.aligned_char); #else return reinterpret_cast(aligned_char); #endif } private: #if defined(_MSC_VER) && _MSC_VER < 1900 // MSVC 2013 workarounds, sigh ... union { char aligned_char[sizeof(T) * N]; double dummy_aligner; } u; #else alignas(T) char aligned_char[sizeof(T) * N]; #endif }; template class AlignedBuffer { public: T *data() { return nullptr; } }; // An immutable version of SmallVector which erases type information about storage. template class VectorView { public: T &operator[](size_t i) SPIRV_CROSS_NOEXCEPT { return ptr[i]; } const T &operator[](size_t i) const SPIRV_CROSS_NOEXCEPT { return ptr[i]; } bool empty() const SPIRV_CROSS_NOEXCEPT { return buffer_size == 0; } size_t size() const SPIRV_CROSS_NOEXCEPT { return buffer_size; } T *data() SPIRV_CROSS_NOEXCEPT { return ptr; } const T *data() const SPIRV_CROSS_NOEXCEPT { return ptr; } T *begin() SPIRV_CROSS_NOEXCEPT { return ptr; } T *end() SPIRV_CROSS_NOEXCEPT { return ptr + buffer_size; } const T *begin() const SPIRV_CROSS_NOEXCEPT { return ptr; } const T *end() const SPIRV_CROSS_NOEXCEPT { return ptr + buffer_size; } T &front() SPIRV_CROSS_NOEXCEPT { return ptr[0]; } const T &front() const SPIRV_CROSS_NOEXCEPT { return ptr[0]; } T &back() SPIRV_CROSS_NOEXCEPT { return ptr[buffer_size - 1]; } const T &back() const SPIRV_CROSS_NOEXCEPT { return ptr[buffer_size - 1]; } // Makes it easier to consume SmallVector. #if defined(_MSC_VER) && _MSC_VER < 1900 explicit operator std::vector() const { // Another MSVC 2013 workaround. It does not understand lvalue/rvalue qualified operations. return std::vector(ptr, ptr + buffer_size); } #else // Makes it easier to consume SmallVector. explicit operator std::vector() const & { return std::vector(ptr, ptr + buffer_size); } // If we are converting as an r-value, we can pilfer our elements. explicit operator std::vector() && { return std::vector(std::make_move_iterator(ptr), std::make_move_iterator(ptr + buffer_size)); } #endif // Avoid sliced copies. Base class should only be read as a reference. VectorView(const VectorView &) = delete; void operator=(const VectorView &) = delete; protected: VectorView() = default; T *ptr = nullptr; size_t buffer_size = 0; }; // Simple vector which supports up to N elements inline, without malloc/free. // We use a lot of throwaway vectors all over the place which triggers allocations. // This class only implements the subset of std::vector we need in SPIRV-Cross. // It is *NOT* a drop-in replacement in general projects. template class SmallVector : public VectorView { public: SmallVector() SPIRV_CROSS_NOEXCEPT { this->ptr = stack_storage.data(); buffer_capacity = N; } template SmallVector(const U *arg_list_begin, const U *arg_list_end) SPIRV_CROSS_NOEXCEPT : SmallVector() { auto count = size_t(arg_list_end - arg_list_begin); reserve(count); for (size_t i = 0; i < count; i++, arg_list_begin++) new (&this->ptr[i]) T(*arg_list_begin); this->buffer_size = count; } template SmallVector(std::initializer_list init) SPIRV_CROSS_NOEXCEPT : SmallVector(init.begin(), init.end()) { } template explicit SmallVector(const U (&init)[M]) SPIRV_CROSS_NOEXCEPT : SmallVector(init, init + M) { } SmallVector(SmallVector &&other) SPIRV_CROSS_NOEXCEPT : SmallVector() { *this = std::move(other); } SmallVector &operator=(SmallVector &&other) SPIRV_CROSS_NOEXCEPT { clear(); if (other.ptr != other.stack_storage.data()) { // Pilfer allocated pointer. if (this->ptr != stack_storage.data()) free(this->ptr); this->ptr = other.ptr; this->buffer_size = other.buffer_size; buffer_capacity = other.buffer_capacity; other.ptr = nullptr; other.buffer_size = 0; other.buffer_capacity = 0; } else { // Need to move the stack contents individually. reserve(other.buffer_size); for (size_t i = 0; i < other.buffer_size; i++) { new (&this->ptr[i]) T(std::move(other.ptr[i])); other.ptr[i].~T(); } this->buffer_size = other.buffer_size; other.buffer_size = 0; } return *this; } SmallVector(const SmallVector &other) SPIRV_CROSS_NOEXCEPT : SmallVector() { *this = other; } SmallVector &operator=(const SmallVector &other) SPIRV_CROSS_NOEXCEPT { if (this == &other) return *this; clear(); reserve(other.buffer_size); for (size_t i = 0; i < other.buffer_size; i++) new (&this->ptr[i]) T(other.ptr[i]); this->buffer_size = other.buffer_size; return *this; } explicit SmallVector(size_t count) SPIRV_CROSS_NOEXCEPT : SmallVector() { resize(count); } ~SmallVector() { clear(); if (this->ptr != stack_storage.data()) free(this->ptr); } void clear() SPIRV_CROSS_NOEXCEPT { for (size_t i = 0; i < this->buffer_size; i++) this->ptr[i].~T(); this->buffer_size = 0; } void push_back(const T &t) SPIRV_CROSS_NOEXCEPT { reserve(this->buffer_size + 1); new (&this->ptr[this->buffer_size]) T(t); this->buffer_size++; } void push_back(T &&t) SPIRV_CROSS_NOEXCEPT { reserve(this->buffer_size + 1); new (&this->ptr[this->buffer_size]) T(std::move(t)); this->buffer_size++; } void pop_back() SPIRV_CROSS_NOEXCEPT { // Work around false positive warning on GCC 8.3. // Calling pop_back on empty vector is undefined. if (!this->empty()) resize(this->buffer_size - 1); } template void emplace_back(Ts &&... ts) SPIRV_CROSS_NOEXCEPT { reserve(this->buffer_size + 1); new (&this->ptr[this->buffer_size]) T(std::forward(ts)...); this->buffer_size++; } void reserve(size_t count) SPIRV_CROSS_NOEXCEPT { if ((count > (std::numeric_limits::max)() / sizeof(T)) || (count > (std::numeric_limits::max)() / 2)) { // Only way this should ever happen is with garbage input, terminate. std::terminate(); } if (count > buffer_capacity) { size_t target_capacity = buffer_capacity; if (target_capacity == 0) target_capacity = 1; // Weird parens works around macro issues on Windows if NOMINMAX is not used. target_capacity = (std::max)(target_capacity, N); // Need to ensure there is a POT value of target capacity which is larger than count, // otherwise this will overflow. while (target_capacity < count) target_capacity <<= 1u; T *new_buffer = target_capacity > N ? static_cast(malloc(target_capacity * sizeof(T))) : stack_storage.data(); // If we actually fail this malloc, we are hosed anyways, there is no reason to attempt recovery. if (!new_buffer) std::terminate(); // In case for some reason two allocations both come from same stack. if (new_buffer != this->ptr) { // We don't deal with types which can throw in move constructor. for (size_t i = 0; i < this->buffer_size; i++) { new (&new_buffer[i]) T(std::move(this->ptr[i])); this->ptr[i].~T(); } } if (this->ptr != stack_storage.data()) free(this->ptr); this->ptr = new_buffer; buffer_capacity = target_capacity; } } void insert(T *itr, const T *insert_begin, const T *insert_end) SPIRV_CROSS_NOEXCEPT { auto count = size_t(insert_end - insert_begin); if (itr == this->end()) { reserve(this->buffer_size + count); for (size_t i = 0; i < count; i++, insert_begin++) new (&this->ptr[this->buffer_size + i]) T(*insert_begin); this->buffer_size += count; } else { if (this->buffer_size + count > buffer_capacity) { auto target_capacity = this->buffer_size + count; if (target_capacity == 0) target_capacity = 1; if (target_capacity < N) target_capacity = N; while (target_capacity < count) target_capacity <<= 1u; // Need to allocate new buffer. Move everything to a new buffer. T *new_buffer = target_capacity > N ? static_cast(malloc(target_capacity * sizeof(T))) : stack_storage.data(); // If we actually fail this malloc, we are hosed anyways, there is no reason to attempt recovery. if (!new_buffer) std::terminate(); // First, move elements from source buffer to new buffer. // We don't deal with types which can throw in move constructor. auto *target_itr = new_buffer; auto *original_source_itr = this->begin(); if (new_buffer != this->ptr) { while (original_source_itr != itr) { new (target_itr) T(std::move(*original_source_itr)); original_source_itr->~T(); ++original_source_itr; ++target_itr; } } // Copy-construct new elements. for (auto *source_itr = insert_begin; source_itr != insert_end; ++source_itr, ++target_itr) new (target_itr) T(*source_itr); // Move over the other half. if (new_buffer != this->ptr || insert_begin != insert_end) { while (original_source_itr != this->end()) { new (target_itr) T(std::move(*original_source_itr)); original_source_itr->~T(); ++original_source_itr; ++target_itr; } } if (this->ptr != stack_storage.data()) free(this->ptr); this->ptr = new_buffer; buffer_capacity = target_capacity; } else { // Move in place, need to be a bit careful about which elements are constructed and which are not. // Move the end and construct the new elements. auto *target_itr = this->end() + count; auto *source_itr = this->end(); while (target_itr != this->end() && source_itr != itr) { --target_itr; --source_itr; new (target_itr) T(std::move(*source_itr)); } // For already constructed elements we can move-assign. std::move_backward(itr, source_itr, target_itr); // For the inserts which go to already constructed elements, we can do a plain copy. while (itr != this->end() && insert_begin != insert_end) *itr++ = *insert_begin++; // For inserts into newly allocated memory, we must copy-construct instead. while (insert_begin != insert_end) { new (itr) T(*insert_begin); ++itr; ++insert_begin; } } this->buffer_size += count; } } void insert(T *itr, const T &value) SPIRV_CROSS_NOEXCEPT { insert(itr, &value, &value + 1); } T *erase(T *itr) SPIRV_CROSS_NOEXCEPT { std::move(itr + 1, this->end(), itr); this->ptr[--this->buffer_size].~T(); return itr; } void erase(T *start_erase, T *end_erase) SPIRV_CROSS_NOEXCEPT { if (end_erase == this->end()) { resize(size_t(start_erase - this->begin())); } else { auto new_size = this->buffer_size - (end_erase - start_erase); std::move(end_erase, this->end(), start_erase); resize(new_size); } } void resize(size_t new_size) SPIRV_CROSS_NOEXCEPT { if (new_size < this->buffer_size) { for (size_t i = new_size; i < this->buffer_size; i++) this->ptr[i].~T(); } else if (new_size > this->buffer_size) { reserve(new_size); for (size_t i = this->buffer_size; i < new_size; i++) new (&this->ptr[i]) T(); } this->buffer_size = new_size; } private: size_t buffer_capacity = 0; AlignedBuffer stack_storage; }; // A vector without stack storage. // Could also be a typedef-ed to std::vector, // but might as well use the one we have. template using Vector = SmallVector; #else // SPIRV_CROSS_FORCE_STL_TYPES template using SmallVector = std::vector; template using Vector = std::vector; template using VectorView = std::vector; #endif // SPIRV_CROSS_FORCE_STL_TYPES // An object pool which we use for allocating IVariant-derived objects. // We know we are going to allocate a bunch of objects of each type, // so amortize the mallocs. class ObjectPoolBase { public: virtual ~ObjectPoolBase() = default; virtual void deallocate_opaque(void *ptr) = 0; }; template class ObjectPool : public ObjectPoolBase { public: explicit ObjectPool(unsigned start_object_count_ = 16) : start_object_count(start_object_count_) { } template T *allocate(P &&... p) { if (vacants.empty()) { unsigned num_objects = start_object_count << memory.size(); T *ptr = static_cast(malloc(num_objects * sizeof(T))); if (!ptr) return nullptr; for (unsigned i = 0; i < num_objects; i++) vacants.push_back(&ptr[i]); memory.emplace_back(ptr); } T *ptr = vacants.back(); vacants.pop_back(); new (ptr) T(std::forward

(p)...); return ptr; } void deallocate(T *ptr) { ptr->~T(); vacants.push_back(ptr); } void deallocate_opaque(void *ptr) override { deallocate(static_cast(ptr)); } void clear() { vacants.clear(); memory.clear(); } protected: Vector vacants; struct MallocDeleter { void operator()(T *ptr) { ::free(ptr); } }; SmallVector> memory; unsigned start_object_count; }; template class StringStream { public: StringStream() { reset(); } ~StringStream() { reset(); } // Disable copies and moves. Makes it easier to implement, and we don't need it. StringStream(const StringStream &) = delete; void operator=(const StringStream &) = delete; template ::value, int>::type = 0> StringStream &operator<<(const T &t) { auto s = std::to_string(t); append(s.data(), s.size()); return *this; } // Only overload this to make float/double conversions ambiguous. StringStream &operator<<(uint32_t v) { auto s = std::to_string(v); append(s.data(), s.size()); return *this; } StringStream &operator<<(char c) { append(&c, 1); return *this; } StringStream &operator<<(const std::string &s) { append(s.data(), s.size()); return *this; } StringStream &operator<<(const char *s) { append(s, strlen(s)); return *this; } template StringStream &operator<<(const char (&s)[N]) { append(s, strlen(s)); return *this; } std::string str() const { std::string ret; size_t target_size = 0; for (auto &saved : saved_buffers) target_size += saved.offset; target_size += current_buffer.offset; ret.reserve(target_size); for (auto &saved : saved_buffers) ret.insert(ret.end(), saved.buffer, saved.buffer + saved.offset); ret.insert(ret.end(), current_buffer.buffer, current_buffer.buffer + current_buffer.offset); return ret; } void reset() { for (auto &saved : saved_buffers) if (saved.buffer != stack_buffer) free(saved.buffer); if (current_buffer.buffer != stack_buffer) free(current_buffer.buffer); saved_buffers.clear(); current_buffer.buffer = stack_buffer; current_buffer.offset = 0; current_buffer.size = sizeof(stack_buffer); } private: struct Buffer { char *buffer = nullptr; size_t offset = 0; size_t size = 0; }; Buffer current_buffer; char stack_buffer[StackSize]; SmallVector saved_buffers; void append(const char *s, size_t len) { size_t avail = current_buffer.size - current_buffer.offset; if (avail < len) { if (avail > 0) { memcpy(current_buffer.buffer + current_buffer.offset, s, avail); s += avail; len -= avail; current_buffer.offset += avail; } saved_buffers.push_back(current_buffer); size_t target_size = len > BlockSize ? len : BlockSize; current_buffer.buffer = static_cast(malloc(target_size)); if (!current_buffer.buffer) SPIRV_CROSS_THROW("Out of memory."); memcpy(current_buffer.buffer, s, len); current_buffer.offset = len; current_buffer.size = target_size; } else { memcpy(current_buffer.buffer + current_buffer.offset, s, len); current_buffer.offset += len; } } }; } // namespace SPIRV_CROSS_NAMESPACE #endif ================================================ FILE: src/libraries/spirv_cross/spirv_cross_error_handling.hpp ================================================ /* * Copyright 2015-2021 Arm Limited * SPDX-License-Identifier: Apache-2.0 OR MIT * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* * At your option, you may choose to accept this material under either: * 1. The Apache License, Version 2.0, found at , or * 2. The MIT License, found at . */ #ifndef SPIRV_CROSS_ERROR_HANDLING #define SPIRV_CROSS_ERROR_HANDLING #include #include #include #ifndef SPIRV_CROSS_EXCEPTIONS_TO_ASSERTIONS #include #endif #ifdef SPIRV_CROSS_NAMESPACE_OVERRIDE #define SPIRV_CROSS_NAMESPACE SPIRV_CROSS_NAMESPACE_OVERRIDE #else #define SPIRV_CROSS_NAMESPACE spirv_cross #endif namespace SPIRV_CROSS_NAMESPACE { #ifdef SPIRV_CROSS_EXCEPTIONS_TO_ASSERTIONS #if !defined(_MSC_VER) || defined(__clang__) [[noreturn]] #elif defined(_MSC_VER) __declspec(noreturn) #endif inline void report_and_abort(const std::string &msg) { #ifdef NDEBUG (void)msg; #else fprintf(stderr, "There was a compiler error: %s\n", msg.c_str()); #endif fflush(stderr); abort(); } #define SPIRV_CROSS_THROW(x) report_and_abort(x) #else class CompilerError : public std::runtime_error { public: explicit CompilerError(const std::string &str) : std::runtime_error(str) { } }; #define SPIRV_CROSS_THROW(x) throw CompilerError(x) #endif // MSVC 2013 does not have noexcept. We need this for Variant to get move constructor to work correctly // instead of copy constructor. // MSVC 2013 ignores that move constructors cannot throw in std::vector, so just don't define it. #if defined(_MSC_VER) && _MSC_VER < 1900 #define SPIRV_CROSS_NOEXCEPT #else #define SPIRV_CROSS_NOEXCEPT noexcept #endif #if __cplusplus >= 201402l #define SPIRV_CROSS_DEPRECATED(reason) [[deprecated(reason)]] #elif defined(__GNUC__) #define SPIRV_CROSS_DEPRECATED(reason) __attribute__((deprecated)) #elif defined(_MSC_VER) #define SPIRV_CROSS_DEPRECATED(reason) __declspec(deprecated(reason)) #else #define SPIRV_CROSS_DEPRECATED(reason) #endif } // namespace SPIRV_CROSS_NAMESPACE #endif ================================================ FILE: src/libraries/spirv_cross/spirv_cross_parsed_ir.cpp ================================================ /* * Copyright 2018-2021 Arm Limited * SPDX-License-Identifier: Apache-2.0 OR MIT * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* * At your option, you may choose to accept this material under either: * 1. The Apache License, Version 2.0, found at , or * 2. The MIT License, found at . */ #include "spirv_cross_parsed_ir.hpp" #include #include using namespace std; using namespace spv; namespace SPIRV_CROSS_NAMESPACE { ParsedIR::ParsedIR() { // If we move ParsedIR, we need to make sure the pointer stays fixed since the child Variant objects consume a pointer to this group, // so need an extra pointer here. pool_group.reset(new ObjectPoolGroup); pool_group->pools[TypeType].reset(new ObjectPool); pool_group->pools[TypeVariable].reset(new ObjectPool); pool_group->pools[TypeConstant].reset(new ObjectPool); pool_group->pools[TypeFunction].reset(new ObjectPool); pool_group->pools[TypeFunctionPrototype].reset(new ObjectPool); pool_group->pools[TypeBlock].reset(new ObjectPool); pool_group->pools[TypeExtension].reset(new ObjectPool); pool_group->pools[TypeExpression].reset(new ObjectPool); pool_group->pools[TypeConstantOp].reset(new ObjectPool); pool_group->pools[TypeCombinedImageSampler].reset(new ObjectPool); pool_group->pools[TypeAccessChain].reset(new ObjectPool); pool_group->pools[TypeUndef].reset(new ObjectPool); pool_group->pools[TypeString].reset(new ObjectPool); } // Should have been default-implemented, but need this on MSVC 2013. ParsedIR::ParsedIR(ParsedIR &&other) SPIRV_CROSS_NOEXCEPT { *this = std::move(other); } ParsedIR &ParsedIR::operator=(ParsedIR &&other) SPIRV_CROSS_NOEXCEPT { if (this != &other) { pool_group = std::move(other.pool_group); spirv = std::move(other.spirv); meta = std::move(other.meta); for (int i = 0; i < TypeCount; i++) ids_for_type[i] = std::move(other.ids_for_type[i]); ids_for_constant_undef_or_type = std::move(other.ids_for_constant_undef_or_type); ids_for_constant_or_variable = std::move(other.ids_for_constant_or_variable); declared_capabilities = std::move(other.declared_capabilities); declared_extensions = std::move(other.declared_extensions); block_meta = std::move(other.block_meta); continue_block_to_loop_header = std::move(other.continue_block_to_loop_header); entry_points = std::move(other.entry_points); ids = std::move(other.ids); addressing_model = other.addressing_model; memory_model = other.memory_model; default_entry_point = other.default_entry_point; source = other.source; loop_iteration_depth_hard = other.loop_iteration_depth_hard; loop_iteration_depth_soft = other.loop_iteration_depth_soft; meta_needing_name_fixup = std::move(other.meta_needing_name_fixup); load_type_width = std::move(other.load_type_width); } return *this; } ParsedIR::ParsedIR(const ParsedIR &other) : ParsedIR() { *this = other; } ParsedIR &ParsedIR::operator=(const ParsedIR &other) { if (this != &other) { spirv = other.spirv; meta = other.meta; for (int i = 0; i < TypeCount; i++) ids_for_type[i] = other.ids_for_type[i]; ids_for_constant_undef_or_type = other.ids_for_constant_undef_or_type; ids_for_constant_or_variable = other.ids_for_constant_or_variable; declared_capabilities = other.declared_capabilities; declared_extensions = other.declared_extensions; block_meta = other.block_meta; continue_block_to_loop_header = other.continue_block_to_loop_header; entry_points = other.entry_points; default_entry_point = other.default_entry_point; source = other.source; loop_iteration_depth_hard = other.loop_iteration_depth_hard; loop_iteration_depth_soft = other.loop_iteration_depth_soft; addressing_model = other.addressing_model; memory_model = other.memory_model; meta_needing_name_fixup = other.meta_needing_name_fixup; load_type_width = other.load_type_width; // Very deliberate copying of IDs. There is no default copy constructor, nor a simple default constructor. // Construct object first so we have the correct allocator set-up, then we can copy object into our new pool group. ids.clear(); ids.reserve(other.ids.size()); for (size_t i = 0; i < other.ids.size(); i++) { ids.emplace_back(pool_group.get()); ids.back() = other.ids[i]; } } return *this; } void ParsedIR::set_id_bounds(uint32_t bounds) { ids.reserve(bounds); while (ids.size() < bounds) ids.emplace_back(pool_group.get()); block_meta.resize(bounds); } // Roll our own versions of these functions to avoid potential locale shenanigans. static bool is_alpha(char c) { return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'); } static bool is_numeric(char c) { return c >= '0' && c <= '9'; } static bool is_alphanumeric(char c) { return is_alpha(c) || is_numeric(c); } static bool is_valid_identifier(const string &name) { if (name.empty()) return true; if (is_numeric(name[0])) return false; for (auto c : name) if (!is_alphanumeric(c) && c != '_') return false; bool saw_underscore = false; // Two underscores in a row is not a valid identifier either. // Technically reserved, but it's easier to treat it as invalid. for (auto c : name) { bool is_underscore = c == '_'; if (is_underscore && saw_underscore) return false; saw_underscore = is_underscore; } return true; } static bool is_reserved_prefix(const string &name) { // Generic reserved identifiers used by the implementation. return name.compare(0, 3, "gl_", 3) == 0 || // Ignore this case for now, might rewrite internal code to always use spv prefix. //name.compare(0, 11, "SPIRV_Cross", 11) == 0 || name.compare(0, 3, "spv", 3) == 0; } static bool is_reserved_identifier(const string &name, bool member, bool allow_reserved_prefixes) { if (!allow_reserved_prefixes && is_reserved_prefix(name)) return true; if (member) { // Reserved member identifiers come in one form: // _m[0-9]+$. if (name.size() < 3) return false; if (name.compare(0, 2, "_m", 2) != 0) return false; size_t index = 2; while (index < name.size() && is_numeric(name[index])) index++; return index == name.size(); } else { // Reserved non-member identifiers come in two forms: // _[0-9]+$, used for temporaries which map directly to a SPIR-V ID. // _[0-9]+_, used for auxillary temporaries which derived from a SPIR-V ID. if (name.size() < 2) return false; if (name[0] != '_' || !is_numeric(name[1])) return false; size_t index = 2; while (index < name.size() && is_numeric(name[index])) index++; return index == name.size() || (index < name.size() && name[index] == '_'); } } bool ParsedIR::is_globally_reserved_identifier(std::string &str, bool allow_reserved_prefixes) { return is_reserved_identifier(str, false, allow_reserved_prefixes); } uint32_t ParsedIR::get_spirv_version() const { return spirv[1]; } static string make_unreserved_identifier(const string &name) { if (is_reserved_prefix(name)) return "_RESERVED_IDENTIFIER_FIXUP_" + name; else return "_RESERVED_IDENTIFIER_FIXUP" + name; } void ParsedIR::sanitize_underscores(std::string &str) { // Compact adjacent underscores to make it valid. auto dst = str.begin(); auto src = dst; bool saw_underscore = false; while (src != str.end()) { bool is_underscore = *src == '_'; if (saw_underscore && is_underscore) { src++; } else { if (dst != src) *dst = *src; dst++; src++; saw_underscore = is_underscore; } } str.erase(dst, str.end()); } static string ensure_valid_identifier(const string &name) { // Functions in glslangValidator are mangled with name( stuff. // Normally, we would never see '(' in any legal identifiers, so just strip them out. auto str = name.substr(0, name.find('(')); if (str.empty()) return str; if (is_numeric(str[0])) str[0] = '_'; for (auto &c : str) if (!is_alphanumeric(c) && c != '_') c = '_'; ParsedIR::sanitize_underscores(str); return str; } const string &ParsedIR::get_name(ID id) const { auto *m = find_meta(id); if (m) return m->decoration.alias; else return empty_string; } const string &ParsedIR::get_member_name(TypeID id, uint32_t index) const { auto *m = find_meta(id); if (m) { if (index >= m->members.size()) return empty_string; return m->members[index].alias; } else return empty_string; } void ParsedIR::sanitize_identifier(std::string &name, bool member, bool allow_reserved_prefixes) { if (!is_valid_identifier(name)) name = ensure_valid_identifier(name); if (is_reserved_identifier(name, member, allow_reserved_prefixes)) name = make_unreserved_identifier(name); } void ParsedIR::fixup_reserved_names() { for (uint32_t id : meta_needing_name_fixup) { // Don't rename remapped variables like 'gl_LastFragDepthARM'. if (ids[id].get_type() == TypeVariable && get(id).remapped_variable) continue; auto &m = meta[id]; sanitize_identifier(m.decoration.alias, false, false); for (auto &memb : m.members) sanitize_identifier(memb.alias, true, false); } meta_needing_name_fixup.clear(); } void ParsedIR::set_name(ID id, const string &name) { auto &m = meta[id]; m.decoration.alias = name; if (!is_valid_identifier(name) || is_reserved_identifier(name, false, false)) meta_needing_name_fixup.insert(id); } void ParsedIR::set_member_name(TypeID id, uint32_t index, const string &name) { auto &m = meta[id]; m.members.resize(max(m.members.size(), size_t(index) + 1)); m.members[index].alias = name; if (!is_valid_identifier(name) || is_reserved_identifier(name, true, false)) meta_needing_name_fixup.insert(id); } void ParsedIR::set_decoration_string(ID id, Decoration decoration, const string &argument) { auto &dec = meta[id].decoration; dec.decoration_flags.set(decoration); switch (decoration) { case DecorationHlslSemanticGOOGLE: dec.hlsl_semantic = argument; break; case DecorationUserTypeGOOGLE: dec.user_type = argument; break; default: break; } } void ParsedIR::set_decoration(ID id, Decoration decoration, uint32_t argument) { auto &dec = meta[id].decoration; dec.decoration_flags.set(decoration); switch (decoration) { case DecorationBuiltIn: dec.builtin = true; dec.builtin_type = static_cast(argument); break; case DecorationLocation: dec.location = argument; break; case DecorationComponent: dec.component = argument; break; case DecorationOffset: dec.offset = argument; break; case DecorationXfbBuffer: dec.xfb_buffer = argument; break; case DecorationXfbStride: dec.xfb_stride = argument; break; case DecorationStream: dec.stream = argument; break; case DecorationArrayStride: dec.array_stride = argument; break; case DecorationMatrixStride: dec.matrix_stride = argument; break; case DecorationBinding: dec.binding = argument; break; case DecorationDescriptorSet: dec.set = argument; break; case DecorationInputAttachmentIndex: dec.input_attachment = argument; break; case DecorationSpecId: dec.spec_id = argument; break; case DecorationIndex: dec.index = argument; break; case DecorationHlslCounterBufferGOOGLE: meta[id].hlsl_magic_counter_buffer = argument; meta[argument].hlsl_is_magic_counter_buffer = true; break; case DecorationFPRoundingMode: dec.fp_rounding_mode = static_cast(argument); break; default: break; } } void ParsedIR::set_member_decoration(TypeID id, uint32_t index, Decoration decoration, uint32_t argument) { auto &m = meta[id]; m.members.resize(max(m.members.size(), size_t(index) + 1)); auto &dec = m.members[index]; dec.decoration_flags.set(decoration); switch (decoration) { case DecorationBuiltIn: dec.builtin = true; dec.builtin_type = static_cast(argument); break; case DecorationLocation: dec.location = argument; break; case DecorationComponent: dec.component = argument; break; case DecorationBinding: dec.binding = argument; break; case DecorationOffset: dec.offset = argument; break; case DecorationXfbBuffer: dec.xfb_buffer = argument; break; case DecorationXfbStride: dec.xfb_stride = argument; break; case DecorationStream: dec.stream = argument; break; case DecorationSpecId: dec.spec_id = argument; break; case DecorationMatrixStride: dec.matrix_stride = argument; break; case DecorationIndex: dec.index = argument; break; default: break; } } // Recursively marks any constants referenced by the specified constant instruction as being used // as an array length. The id must be a constant instruction (SPIRConstant or SPIRConstantOp). void ParsedIR::mark_used_as_array_length(ID id) { switch (ids[id].get_type()) { case TypeConstant: get(id).is_used_as_array_length = true; break; case TypeConstantOp: { auto &cop = get(id); if (cop.opcode == OpCompositeExtract) mark_used_as_array_length(cop.arguments[0]); else if (cop.opcode == OpCompositeInsert) { mark_used_as_array_length(cop.arguments[0]); mark_used_as_array_length(cop.arguments[1]); } else for (uint32_t arg_id : cop.arguments) mark_used_as_array_length(arg_id); break; } case TypeUndef: break; default: assert(0); } } Bitset ParsedIR::get_buffer_block_type_flags(const SPIRType &type) const { if (type.member_types.empty()) return {}; Bitset all_members_flags = get_member_decoration_bitset(type.self, 0); for (uint32_t i = 1; i < uint32_t(type.member_types.size()); i++) all_members_flags.merge_and(get_member_decoration_bitset(type.self, i)); return all_members_flags; } Bitset ParsedIR::get_buffer_block_flags(const SPIRVariable &var) const { auto &type = get(var.basetype); assert(type.basetype == SPIRType::Struct); // Some flags like non-writable, non-readable are actually found // as member decorations. If all members have a decoration set, propagate // the decoration up as a regular variable decoration. Bitset base_flags; auto *m = find_meta(var.self); if (m) base_flags = m->decoration.decoration_flags; if (type.member_types.empty()) return base_flags; auto all_members_flags = get_buffer_block_type_flags(type); base_flags.merge_or(all_members_flags); return base_flags; } const Bitset &ParsedIR::get_member_decoration_bitset(TypeID id, uint32_t index) const { auto *m = find_meta(id); if (m) { if (index >= m->members.size()) return cleared_bitset; return m->members[index].decoration_flags; } else return cleared_bitset; } bool ParsedIR::has_decoration(ID id, Decoration decoration) const { return get_decoration_bitset(id).get(decoration); } uint32_t ParsedIR::get_decoration(ID id, Decoration decoration) const { auto *m = find_meta(id); if (!m) return 0; auto &dec = m->decoration; if (!dec.decoration_flags.get(decoration)) return 0; switch (decoration) { case DecorationBuiltIn: return dec.builtin_type; case DecorationLocation: return dec.location; case DecorationComponent: return dec.component; case DecorationOffset: return dec.offset; case DecorationXfbBuffer: return dec.xfb_buffer; case DecorationXfbStride: return dec.xfb_stride; case DecorationStream: return dec.stream; case DecorationBinding: return dec.binding; case DecorationDescriptorSet: return dec.set; case DecorationInputAttachmentIndex: return dec.input_attachment; case DecorationSpecId: return dec.spec_id; case DecorationArrayStride: return dec.array_stride; case DecorationMatrixStride: return dec.matrix_stride; case DecorationIndex: return dec.index; case DecorationFPRoundingMode: return dec.fp_rounding_mode; default: return 1; } } const string &ParsedIR::get_decoration_string(ID id, Decoration decoration) const { auto *m = find_meta(id); if (!m) return empty_string; auto &dec = m->decoration; if (!dec.decoration_flags.get(decoration)) return empty_string; switch (decoration) { case DecorationHlslSemanticGOOGLE: return dec.hlsl_semantic; case DecorationUserTypeGOOGLE: return dec.user_type; default: return empty_string; } } void ParsedIR::unset_decoration(ID id, Decoration decoration) { auto &dec = meta[id].decoration; dec.decoration_flags.clear(decoration); switch (decoration) { case DecorationBuiltIn: dec.builtin = false; break; case DecorationLocation: dec.location = 0; break; case DecorationComponent: dec.component = 0; break; case DecorationOffset: dec.offset = 0; break; case DecorationXfbBuffer: dec.xfb_buffer = 0; break; case DecorationXfbStride: dec.xfb_stride = 0; break; case DecorationStream: dec.stream = 0; break; case DecorationBinding: dec.binding = 0; break; case DecorationDescriptorSet: dec.set = 0; break; case DecorationInputAttachmentIndex: dec.input_attachment = 0; break; case DecorationSpecId: dec.spec_id = 0; break; case DecorationHlslSemanticGOOGLE: dec.hlsl_semantic.clear(); break; case DecorationFPRoundingMode: dec.fp_rounding_mode = FPRoundingModeMax; break; case DecorationHlslCounterBufferGOOGLE: { auto &counter = meta[id].hlsl_magic_counter_buffer; if (counter) { meta[counter].hlsl_is_magic_counter_buffer = false; counter = 0; } break; } default: break; } } bool ParsedIR::has_member_decoration(TypeID id, uint32_t index, Decoration decoration) const { return get_member_decoration_bitset(id, index).get(decoration); } uint32_t ParsedIR::get_member_decoration(TypeID id, uint32_t index, Decoration decoration) const { auto *m = find_meta(id); if (!m) return 0; if (index >= m->members.size()) return 0; auto &dec = m->members[index]; if (!dec.decoration_flags.get(decoration)) return 0; switch (decoration) { case DecorationBuiltIn: return dec.builtin_type; case DecorationLocation: return dec.location; case DecorationComponent: return dec.component; case DecorationBinding: return dec.binding; case DecorationOffset: return dec.offset; case DecorationXfbBuffer: return dec.xfb_buffer; case DecorationXfbStride: return dec.xfb_stride; case DecorationStream: return dec.stream; case DecorationSpecId: return dec.spec_id; case DecorationIndex: return dec.index; default: return 1; } } const Bitset &ParsedIR::get_decoration_bitset(ID id) const { auto *m = find_meta(id); if (m) { auto &dec = m->decoration; return dec.decoration_flags; } else return cleared_bitset; } void ParsedIR::set_member_decoration_string(TypeID id, uint32_t index, Decoration decoration, const string &argument) { auto &m = meta[id]; m.members.resize(max(m.members.size(), size_t(index) + 1)); auto &dec = meta[id].members[index]; dec.decoration_flags.set(decoration); switch (decoration) { case DecorationHlslSemanticGOOGLE: dec.hlsl_semantic = argument; break; default: break; } } const string &ParsedIR::get_member_decoration_string(TypeID id, uint32_t index, Decoration decoration) const { auto *m = find_meta(id); if (m) { if (!has_member_decoration(id, index, decoration)) return empty_string; auto &dec = m->members[index]; switch (decoration) { case DecorationHlslSemanticGOOGLE: return dec.hlsl_semantic; default: return empty_string; } } else return empty_string; } void ParsedIR::unset_member_decoration(TypeID id, uint32_t index, Decoration decoration) { auto &m = meta[id]; if (index >= m.members.size()) return; auto &dec = m.members[index]; dec.decoration_flags.clear(decoration); switch (decoration) { case DecorationBuiltIn: dec.builtin = false; break; case DecorationLocation: dec.location = 0; break; case DecorationComponent: dec.component = 0; break; case DecorationOffset: dec.offset = 0; break; case DecorationXfbBuffer: dec.xfb_buffer = 0; break; case DecorationXfbStride: dec.xfb_stride = 0; break; case DecorationStream: dec.stream = 0; break; case DecorationSpecId: dec.spec_id = 0; break; case DecorationHlslSemanticGOOGLE: dec.hlsl_semantic.clear(); break; default: break; } } uint32_t ParsedIR::increase_bound_by(uint32_t incr_amount) { auto curr_bound = ids.size(); auto new_bound = curr_bound + incr_amount; ids.reserve(ids.size() + incr_amount); for (uint32_t i = 0; i < incr_amount; i++) ids.emplace_back(pool_group.get()); block_meta.resize(new_bound); return uint32_t(curr_bound); } void ParsedIR::remove_typed_id(Types type, ID id) { auto &type_ids = ids_for_type[type]; type_ids.erase(remove(begin(type_ids), end(type_ids), id), end(type_ids)); } void ParsedIR::reset_all_of_type(Types type) { for (auto &id : ids_for_type[type]) if (ids[id].get_type() == type) ids[id].reset(); ids_for_type[type].clear(); } void ParsedIR::add_typed_id(Types type, ID id) { if (loop_iteration_depth_hard != 0) SPIRV_CROSS_THROW("Cannot add typed ID while looping over it."); if (loop_iteration_depth_soft != 0) { if (!ids[id].empty()) SPIRV_CROSS_THROW("Cannot override IDs when loop is soft locked."); return; } if (ids[id].empty() || ids[id].get_type() != type) { switch (type) { case TypeConstant: ids_for_constant_or_variable.push_back(id); ids_for_constant_undef_or_type.push_back(id); break; case TypeVariable: ids_for_constant_or_variable.push_back(id); break; case TypeType: case TypeConstantOp: case TypeUndef: ids_for_constant_undef_or_type.push_back(id); break; default: break; } } if (ids[id].empty()) { ids_for_type[type].push_back(id); } else if (ids[id].get_type() != type) { remove_typed_id(ids[id].get_type(), id); ids_for_type[type].push_back(id); } } const Meta *ParsedIR::find_meta(ID id) const { auto itr = meta.find(id); if (itr != end(meta)) return &itr->second; else return nullptr; } Meta *ParsedIR::find_meta(ID id) { auto itr = meta.find(id); if (itr != end(meta)) return &itr->second; else return nullptr; } ParsedIR::LoopLock ParsedIR::create_loop_hard_lock() const { return ParsedIR::LoopLock(&loop_iteration_depth_hard); } ParsedIR::LoopLock ParsedIR::create_loop_soft_lock() const { return ParsedIR::LoopLock(&loop_iteration_depth_soft); } ParsedIR::LoopLock::~LoopLock() { if (lock) (*lock)--; } ParsedIR::LoopLock::LoopLock(uint32_t *lock_) : lock(lock_) { if (lock) (*lock)++; } ParsedIR::LoopLock::LoopLock(LoopLock &&other) SPIRV_CROSS_NOEXCEPT { *this = std::move(other); } ParsedIR::LoopLock &ParsedIR::LoopLock::operator=(LoopLock &&other) SPIRV_CROSS_NOEXCEPT { if (lock) (*lock)--; lock = other.lock; other.lock = nullptr; return *this; } void ParsedIR::make_constant_null(uint32_t id, uint32_t type, bool add_to_typed_id_set) { auto &constant_type = get(type); if (constant_type.pointer) { if (add_to_typed_id_set) add_typed_id(TypeConstant, id); auto &constant = variant_set(ids[id], type); constant.self = id; constant.make_null(constant_type); } else if (!constant_type.array.empty()) { assert(constant_type.parent_type); uint32_t parent_id = increase_bound_by(1); make_constant_null(parent_id, constant_type.parent_type, add_to_typed_id_set); if (!constant_type.array_size_literal.back()) SPIRV_CROSS_THROW("Array size of OpConstantNull must be a literal."); SmallVector elements(constant_type.array.back()); for (uint32_t i = 0; i < constant_type.array.back(); i++) elements[i] = parent_id; if (add_to_typed_id_set) add_typed_id(TypeConstant, id); variant_set(ids[id], type, elements.data(), uint32_t(elements.size()), false).self = id; } else if (!constant_type.member_types.empty()) { uint32_t member_ids = increase_bound_by(uint32_t(constant_type.member_types.size())); SmallVector elements(constant_type.member_types.size()); for (uint32_t i = 0; i < constant_type.member_types.size(); i++) { make_constant_null(member_ids + i, constant_type.member_types[i], add_to_typed_id_set); elements[i] = member_ids + i; } if (add_to_typed_id_set) add_typed_id(TypeConstant, id); variant_set(ids[id], type, elements.data(), uint32_t(elements.size()), false).self = id; } else { if (add_to_typed_id_set) add_typed_id(TypeConstant, id); auto &constant = variant_set(ids[id], type); constant.self = id; constant.make_null(constant_type); } } } // namespace SPIRV_CROSS_NAMESPACE ================================================ FILE: src/libraries/spirv_cross/spirv_cross_parsed_ir.hpp ================================================ /* * Copyright 2018-2021 Arm Limited * SPDX-License-Identifier: Apache-2.0 OR MIT * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* * At your option, you may choose to accept this material under either: * 1. The Apache License, Version 2.0, found at , or * 2. The MIT License, found at . */ #ifndef SPIRV_CROSS_PARSED_IR_HPP #define SPIRV_CROSS_PARSED_IR_HPP #include "spirv_common.hpp" #include #include namespace SPIRV_CROSS_NAMESPACE { // This data structure holds all information needed to perform cross-compilation and reflection. // It is the output of the Parser, but any implementation could create this structure. // It is intentionally very "open" and struct-like with some helper functions to deal with decorations. // Parser is the reference implementation of how this data structure should be filled in. class ParsedIR { private: // This must be destroyed after the "ids" vector. std::unique_ptr pool_group; public: ParsedIR(); // Due to custom allocations from object pools, we cannot use a default copy constructor. ParsedIR(const ParsedIR &other); ParsedIR &operator=(const ParsedIR &other); // Moves are unproblematic, but we need to implement it anyways, since MSVC 2013 does not understand // how to default-implement these. ParsedIR(ParsedIR &&other) SPIRV_CROSS_NOEXCEPT; ParsedIR &operator=(ParsedIR &&other) SPIRV_CROSS_NOEXCEPT; // Resizes ids, meta and block_meta. void set_id_bounds(uint32_t bounds); // The raw SPIR-V, instructions and opcodes refer to this by offset + count. std::vector spirv; // Holds various data structures which inherit from IVariant. SmallVector ids; // Various meta data for IDs, decorations, names, etc. std::unordered_map meta; // Holds all IDs which have a certain type. // This is needed so we can iterate through a specific kind of resource quickly, // and in-order of module declaration. SmallVector ids_for_type[TypeCount]; // Special purpose lists which contain a union of types. // This is needed so we can declare specialization constants and structs in an interleaved fashion, // among other things. // Constants can be undef or of struct type, and struct array sizes can use specialization constants. SmallVector ids_for_constant_undef_or_type; SmallVector ids_for_constant_or_variable; // We need to keep track of the width the Ops that contains a type for the // OpSwitch instruction, since this one doesn't contains the type in the // instruction itself. And in some case we need to cast the condition to // wider types. We only need the width to do the branch fixup since the // type check itself can be done at runtime std::unordered_map load_type_width; // Declared capabilities and extensions in the SPIR-V module. // Not really used except for reflection at the moment. SmallVector declared_capabilities; SmallVector declared_extensions; // Meta data about blocks. The cross-compiler needs to query if a block is either of these types. // It is a bitset as there can be more than one tag per block. enum BlockMetaFlagBits { BLOCK_META_LOOP_HEADER_BIT = 1 << 0, BLOCK_META_CONTINUE_BIT = 1 << 1, BLOCK_META_LOOP_MERGE_BIT = 1 << 2, BLOCK_META_SELECTION_MERGE_BIT = 1 << 3, BLOCK_META_MULTISELECT_MERGE_BIT = 1 << 4 }; using BlockMetaFlags = uint8_t; SmallVector block_meta; std::unordered_map continue_block_to_loop_header; // Normally, we'd stick SPIREntryPoint in ids array, but it conflicts with SPIRFunction. // Entry points can therefore be seen as some sort of meta structure. std::unordered_map entry_points; FunctionID default_entry_point = 0; struct Source { uint32_t version = 0; bool es = false; bool known = false; bool hlsl = false; Source() = default; }; Source source; spv::AddressingModel addressing_model = spv::AddressingModelMax; spv::MemoryModel memory_model = spv::MemoryModelMax; // Decoration handling methods. // Can be useful for simple "raw" reflection. // However, most members are here because the Parser needs most of these, // and might as well just have the whole suite of decoration/name handling in one place. void set_name(ID id, const std::string &name); const std::string &get_name(ID id) const; void set_decoration(ID id, spv::Decoration decoration, uint32_t argument = 0); void set_decoration_string(ID id, spv::Decoration decoration, const std::string &argument); bool has_decoration(ID id, spv::Decoration decoration) const; uint32_t get_decoration(ID id, spv::Decoration decoration) const; const std::string &get_decoration_string(ID id, spv::Decoration decoration) const; const Bitset &get_decoration_bitset(ID id) const; void unset_decoration(ID id, spv::Decoration decoration); // Decoration handling methods (for members of a struct). void set_member_name(TypeID id, uint32_t index, const std::string &name); const std::string &get_member_name(TypeID id, uint32_t index) const; void set_member_decoration(TypeID id, uint32_t index, spv::Decoration decoration, uint32_t argument = 0); void set_member_decoration_string(TypeID id, uint32_t index, spv::Decoration decoration, const std::string &argument); uint32_t get_member_decoration(TypeID id, uint32_t index, spv::Decoration decoration) const; const std::string &get_member_decoration_string(TypeID id, uint32_t index, spv::Decoration decoration) const; bool has_member_decoration(TypeID id, uint32_t index, spv::Decoration decoration) const; const Bitset &get_member_decoration_bitset(TypeID id, uint32_t index) const; void unset_member_decoration(TypeID id, uint32_t index, spv::Decoration decoration); void mark_used_as_array_length(ID id); uint32_t increase_bound_by(uint32_t count); Bitset get_buffer_block_flags(const SPIRVariable &var) const; Bitset get_buffer_block_type_flags(const SPIRType &type) const; void add_typed_id(Types type, ID id); void remove_typed_id(Types type, ID id); class LoopLock { public: explicit LoopLock(uint32_t *counter); LoopLock(const LoopLock &) = delete; void operator=(const LoopLock &) = delete; LoopLock(LoopLock &&other) SPIRV_CROSS_NOEXCEPT; LoopLock &operator=(LoopLock &&other) SPIRV_CROSS_NOEXCEPT; ~LoopLock(); private: uint32_t *lock; }; // This must be held while iterating over a type ID array. // It is undefined if someone calls set<>() while we're iterating over a data structure, so we must // make sure that this case is avoided. // If we have a hard lock, it is an error to call set<>(), and an exception is thrown. // If we have a soft lock, we silently ignore any additions to the typed arrays. // This should only be used for physical ID remapping where we need to create an ID, but we will never // care about iterating over them. LoopLock create_loop_hard_lock() const; LoopLock create_loop_soft_lock() const; template void for_each_typed_id(const Op &op) { auto loop_lock = create_loop_hard_lock(); for (auto &id : ids_for_type[T::type]) { if (ids[id].get_type() == static_cast(T::type)) op(id, get(id)); } } template void for_each_typed_id(const Op &op) const { auto loop_lock = create_loop_hard_lock(); for (auto &id : ids_for_type[T::type]) { if (ids[id].get_type() == static_cast(T::type)) op(id, get(id)); } } template void reset_all_of_type() { reset_all_of_type(static_cast(T::type)); } void reset_all_of_type(Types type); Meta *find_meta(ID id); const Meta *find_meta(ID id) const; const std::string &get_empty_string() const { return empty_string; } void make_constant_null(uint32_t id, uint32_t type, bool add_to_typed_id_set); void fixup_reserved_names(); static void sanitize_underscores(std::string &str); static void sanitize_identifier(std::string &str, bool member, bool allow_reserved_prefixes); static bool is_globally_reserved_identifier(std::string &str, bool allow_reserved_prefixes); uint32_t get_spirv_version() const; private: template T &get(uint32_t id) { return variant_get(ids[id]); } template const T &get(uint32_t id) const { return variant_get(ids[id]); } mutable uint32_t loop_iteration_depth_hard = 0; mutable uint32_t loop_iteration_depth_soft = 0; std::string empty_string; Bitset cleared_bitset; std::unordered_set meta_needing_name_fixup; }; } // namespace SPIRV_CROSS_NAMESPACE #endif ================================================ FILE: src/libraries/spirv_cross/spirv_cross_util.cpp ================================================ /* * Copyright 2015-2021 Arm Limited * SPDX-License-Identifier: Apache-2.0 OR MIT * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* * At your option, you may choose to accept this material under either: * 1. The Apache License, Version 2.0, found at , or * 2. The MIT License, found at . */ #include "spirv_cross_util.hpp" #include "spirv_common.hpp" using namespace spv; using namespace SPIRV_CROSS_NAMESPACE; namespace spirv_cross_util { void rename_interface_variable(Compiler &compiler, const SmallVector &resources, uint32_t location, const std::string &name) { for (auto &v : resources) { if (!compiler.has_decoration(v.id, spv::DecorationLocation)) continue; auto loc = compiler.get_decoration(v.id, spv::DecorationLocation); if (loc != location) continue; auto &type = compiler.get_type(v.base_type_id); // This is more of a friendly variant. If we need to rename interface variables, we might have to rename // structs as well and make sure all the names match up. if (type.basetype == SPIRType::Struct) { compiler.set_name(v.base_type_id, join("SPIRV_Cross_Interface_Location", location)); for (uint32_t i = 0; i < uint32_t(type.member_types.size()); i++) compiler.set_member_name(v.base_type_id, i, join("InterfaceMember", i)); } compiler.set_name(v.id, name); } } void inherit_combined_sampler_bindings(Compiler &compiler) { auto &samplers = compiler.get_combined_image_samplers(); for (auto &s : samplers) { if (compiler.has_decoration(s.image_id, spv::DecorationDescriptorSet)) { uint32_t set = compiler.get_decoration(s.image_id, spv::DecorationDescriptorSet); compiler.set_decoration(s.combined_id, spv::DecorationDescriptorSet, set); } if (compiler.has_decoration(s.image_id, spv::DecorationBinding)) { uint32_t binding = compiler.get_decoration(s.image_id, spv::DecorationBinding); compiler.set_decoration(s.combined_id, spv::DecorationBinding, binding); } } } } // namespace spirv_cross_util ================================================ FILE: src/libraries/spirv_cross/spirv_cross_util.hpp ================================================ /* * Copyright 2015-2021 Arm Limited * SPDX-License-Identifier: Apache-2.0 OR MIT * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* * At your option, you may choose to accept this material under either: * 1. The Apache License, Version 2.0, found at , or * 2. The MIT License, found at . */ #ifndef SPIRV_CROSS_UTIL_HPP #define SPIRV_CROSS_UTIL_HPP #include "spirv_cross.hpp" namespace spirv_cross_util { void rename_interface_variable(SPIRV_CROSS_NAMESPACE::Compiler &compiler, const SPIRV_CROSS_NAMESPACE::SmallVector &resources, uint32_t location, const std::string &name); void inherit_combined_sampler_bindings(SPIRV_CROSS_NAMESPACE::Compiler &compiler); } // namespace spirv_cross_util #endif ================================================ FILE: src/libraries/spirv_cross/spirv_glsl.cpp ================================================ /* * Copyright 2015-2021 Arm Limited * SPDX-License-Identifier: Apache-2.0 OR MIT * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* * At your option, you may choose to accept this material under either: * 1. The Apache License, Version 2.0, found at , or * 2. The MIT License, found at . */ #include "spirv_glsl.hpp" #include "GLSL.std.450.h" #include "spirv_common.hpp" #include #include #include #include #include #include #include #ifndef _WIN32 #include #endif #include using namespace spv; using namespace SPIRV_CROSS_NAMESPACE; using namespace std; enum ExtraSubExpressionType { // Create masks above any legal ID range to allow multiple address spaces into the extra_sub_expressions map. EXTRA_SUB_EXPRESSION_TYPE_STREAM_OFFSET = 0x10000000, EXTRA_SUB_EXPRESSION_TYPE_AUX = 0x20000000 }; static bool is_unsigned_opcode(Op op) { // Don't have to be exhaustive, only relevant for legacy target checking ... switch (op) { case OpShiftRightLogical: case OpUGreaterThan: case OpUGreaterThanEqual: case OpULessThan: case OpULessThanEqual: case OpUConvert: case OpUDiv: case OpUMod: case OpUMulExtended: case OpConvertUToF: case OpConvertFToU: return true; default: return false; } } static bool is_unsigned_glsl_opcode(GLSLstd450 op) { // Don't have to be exhaustive, only relevant for legacy target checking ... switch (op) { case GLSLstd450UClamp: case GLSLstd450UMin: case GLSLstd450UMax: case GLSLstd450FindUMsb: return true; default: return false; } } static bool packing_is_vec4_padded(BufferPackingStandard packing) { switch (packing) { case BufferPackingHLSLCbuffer: case BufferPackingHLSLCbufferPackOffset: case BufferPackingStd140: case BufferPackingStd140EnhancedLayout: return true; default: return false; } } static bool packing_is_hlsl(BufferPackingStandard packing) { switch (packing) { case BufferPackingHLSLCbuffer: case BufferPackingHLSLCbufferPackOffset: return true; default: return false; } } static bool packing_has_flexible_offset(BufferPackingStandard packing) { switch (packing) { case BufferPackingStd140: case BufferPackingStd430: case BufferPackingScalar: case BufferPackingHLSLCbuffer: return false; default: return true; } } static bool packing_is_scalar(BufferPackingStandard packing) { switch (packing) { case BufferPackingScalar: case BufferPackingScalarEnhancedLayout: return true; default: return false; } } static BufferPackingStandard packing_to_substruct_packing(BufferPackingStandard packing) { switch (packing) { case BufferPackingStd140EnhancedLayout: return BufferPackingStd140; case BufferPackingStd430EnhancedLayout: return BufferPackingStd430; case BufferPackingHLSLCbufferPackOffset: return BufferPackingHLSLCbuffer; case BufferPackingScalarEnhancedLayout: return BufferPackingScalar; default: return packing; } } void CompilerGLSL::init() { if (ir.source.known) { options.es = ir.source.es; options.version = ir.source.version; } // Query the locale to see what the decimal point is. // We'll rely on fixing it up ourselves in the rare case we have a comma-as-decimal locale // rather than setting locales ourselves. Settings locales in a safe and isolated way is rather // tricky. #ifdef _WIN32 // On Windows, localeconv uses thread-local storage, so it should be fine. const struct lconv *conv = localeconv(); if (conv && conv->decimal_point) current_locale_radix_character = *conv->decimal_point; #elif defined(__ANDROID__) && __ANDROID_API__ < 26 // nl_langinfo is not supported on this platform, fall back to the worse alternative. const struct lconv *conv = localeconv(); if (conv && conv->decimal_point) current_locale_radix_character = *conv->decimal_point; #else // localeconv, the portable function is not MT safe ... const char *decimal_point = nl_langinfo(RADIXCHAR); if (decimal_point && *decimal_point != '\0') current_locale_radix_character = *decimal_point; #endif } static const char *to_pls_layout(PlsFormat format) { switch (format) { case PlsR11FG11FB10F: return "layout(r11f_g11f_b10f) "; case PlsR32F: return "layout(r32f) "; case PlsRG16F: return "layout(rg16f) "; case PlsRGB10A2: return "layout(rgb10_a2) "; case PlsRGBA8: return "layout(rgba8) "; case PlsRG16: return "layout(rg16) "; case PlsRGBA8I: return "layout(rgba8i)"; case PlsRG16I: return "layout(rg16i) "; case PlsRGB10A2UI: return "layout(rgb10_a2ui) "; case PlsRGBA8UI: return "layout(rgba8ui) "; case PlsRG16UI: return "layout(rg16ui) "; case PlsR32UI: return "layout(r32ui) "; default: return ""; } } static std::pair pls_format_to_basetype(PlsFormat format) { switch (format) { default: case PlsR11FG11FB10F: case PlsR32F: case PlsRG16F: case PlsRGB10A2: case PlsRGBA8: case PlsRG16: return std::make_pair(spv::OpTypeFloat, SPIRType::Float); case PlsRGBA8I: case PlsRG16I: return std::make_pair(spv::OpTypeInt, SPIRType::Int); case PlsRGB10A2UI: case PlsRGBA8UI: case PlsRG16UI: case PlsR32UI: return std::make_pair(spv::OpTypeInt, SPIRType::UInt); } } static uint32_t pls_format_to_components(PlsFormat format) { switch (format) { default: case PlsR32F: case PlsR32UI: return 1; case PlsRG16F: case PlsRG16: case PlsRG16UI: case PlsRG16I: return 2; case PlsR11FG11FB10F: return 3; case PlsRGB10A2: case PlsRGBA8: case PlsRGBA8I: case PlsRGB10A2UI: case PlsRGBA8UI: return 4; } } const char *CompilerGLSL::vector_swizzle(int vecsize, int index) { static const char *const swizzle[4][4] = { { ".x", ".y", ".z", ".w" }, { ".xy", ".yz", ".zw", nullptr }, { ".xyz", ".yzw", nullptr, nullptr }, #if defined(__GNUC__) && (__GNUC__ == 9) // This works around a GCC 9 bug, see details in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90947. // This array ends up being compiled as all nullptrs, tripping the assertions below. { "", nullptr, nullptr, "$" }, #else { "", nullptr, nullptr, nullptr }, #endif }; assert(vecsize >= 1 && vecsize <= 4); assert(index >= 0 && index < 4); assert(swizzle[vecsize - 1][index]); return swizzle[vecsize - 1][index]; } void CompilerGLSL::reset(uint32_t iteration_count) { // Sanity check the iteration count to be robust against a certain class of bugs where // we keep forcing recompilations without making clear forward progress. // In buggy situations we will loop forever, or loop for an unbounded number of iterations. // Certain types of recompilations are considered to make forward progress, // but in almost all situations, we'll never see more than 3 iterations. // It is highly context-sensitive when we need to force recompilation, // and it is not practical with the current architecture // to resolve everything up front. if (iteration_count >= options.force_recompile_max_debug_iterations && !is_force_recompile_forward_progress) SPIRV_CROSS_THROW("Maximum compilation loops detected and no forward progress was made. Must be a SPIRV-Cross bug!"); // We do some speculative optimizations which should pretty much always work out, // but just in case the SPIR-V is rather weird, recompile until it's happy. // This typically only means one extra pass. clear_force_recompile(); // Clear invalid expression tracking. invalid_expressions.clear(); composite_insert_overwritten.clear(); current_function = nullptr; // Clear temporary usage tracking. expression_usage_counts.clear(); forwarded_temporaries.clear(); suppressed_usage_tracking.clear(); // Ensure that we declare phi-variable copies even if the original declaration isn't deferred flushed_phi_variables.clear(); current_emitting_switch_stack.clear(); reset_name_caches(); ir.for_each_typed_id([&](uint32_t, SPIRFunction &func) { func.active = false; func.flush_undeclared = true; }); ir.for_each_typed_id([&](uint32_t, SPIRVariable &var) { var.dependees.clear(); }); ir.reset_all_of_type(); ir.reset_all_of_type(); statement_count = 0; indent = 0; current_loop_level = 0; } void CompilerGLSL::remap_pls_variables() { for (auto &input : pls_inputs) { auto &var = get(input.id); bool input_is_target = false; if (var.storage == StorageClassUniformConstant) { auto &type = get(var.basetype); input_is_target = type.image.dim == DimSubpassData; } if (var.storage != StorageClassInput && !input_is_target) SPIRV_CROSS_THROW("Can only use in and target variables for PLS inputs."); var.remapped_variable = true; } for (auto &output : pls_outputs) { auto &var = get(output.id); if (var.storage != StorageClassOutput) SPIRV_CROSS_THROW("Can only use out variables for PLS outputs."); var.remapped_variable = true; } } void CompilerGLSL::remap_ext_framebuffer_fetch(uint32_t input_attachment_index, uint32_t color_location, bool coherent) { subpass_to_framebuffer_fetch_attachment.push_back({ input_attachment_index, color_location }); inout_color_attachments.push_back({ color_location, coherent }); } bool CompilerGLSL::location_is_framebuffer_fetch(uint32_t location) const { return std::find_if(begin(inout_color_attachments), end(inout_color_attachments), [&](const std::pair &elem) { return elem.first == location; }) != end(inout_color_attachments); } bool CompilerGLSL::location_is_non_coherent_framebuffer_fetch(uint32_t location) const { return std::find_if(begin(inout_color_attachments), end(inout_color_attachments), [&](const std::pair &elem) { return elem.first == location && !elem.second; }) != end(inout_color_attachments); } void CompilerGLSL::find_static_extensions() { ir.for_each_typed_id([&](uint32_t, const SPIRType &type) { if (type.basetype == SPIRType::Double) { if (options.es) SPIRV_CROSS_THROW("FP64 not supported in ES profile."); if (!options.es && options.version < 400) require_extension_internal("GL_ARB_gpu_shader_fp64"); } else if (type.basetype == SPIRType::Int64 || type.basetype == SPIRType::UInt64) { if (options.es && options.version < 310) // GL_NV_gpu_shader5 fallback requires 310. SPIRV_CROSS_THROW("64-bit integers not supported in ES profile before version 310."); require_extension_internal("GL_ARB_gpu_shader_int64"); } else if (type.basetype == SPIRType::Half) { require_extension_internal("GL_EXT_shader_explicit_arithmetic_types_float16"); if (options.vulkan_semantics) require_extension_internal("GL_EXT_shader_16bit_storage"); } else if (type.basetype == SPIRType::SByte || type.basetype == SPIRType::UByte) { require_extension_internal("GL_EXT_shader_explicit_arithmetic_types_int8"); if (options.vulkan_semantics) require_extension_internal("GL_EXT_shader_8bit_storage"); } else if (type.basetype == SPIRType::Short || type.basetype == SPIRType::UShort) { require_extension_internal("GL_EXT_shader_explicit_arithmetic_types_int16"); if (options.vulkan_semantics) require_extension_internal("GL_EXT_shader_16bit_storage"); } }); auto &execution = get_entry_point(); switch (execution.model) { case ExecutionModelGLCompute: if (!options.es && options.version < 430) require_extension_internal("GL_ARB_compute_shader"); if (options.es && options.version < 310) SPIRV_CROSS_THROW("At least ESSL 3.10 required for compute shaders."); break; case ExecutionModelGeometry: if (options.es && options.version < 320) require_extension_internal("GL_EXT_geometry_shader"); if (!options.es && options.version < 150) require_extension_internal("GL_ARB_geometry_shader4"); if (execution.flags.get(ExecutionModeInvocations) && execution.invocations != 1) { // Instanced GS is part of 400 core or this extension. if (!options.es && options.version < 400) require_extension_internal("GL_ARB_gpu_shader5"); } break; case ExecutionModelTessellationEvaluation: case ExecutionModelTessellationControl: if (options.es && options.version < 320) require_extension_internal("GL_EXT_tessellation_shader"); if (!options.es && options.version < 400) require_extension_internal("GL_ARB_tessellation_shader"); break; case ExecutionModelRayGenerationKHR: case ExecutionModelIntersectionKHR: case ExecutionModelAnyHitKHR: case ExecutionModelClosestHitKHR: case ExecutionModelMissKHR: case ExecutionModelCallableKHR: // NV enums are aliases. if (options.es || options.version < 460) SPIRV_CROSS_THROW("Ray tracing shaders require non-es profile with version 460 or above."); if (!options.vulkan_semantics) SPIRV_CROSS_THROW("Ray tracing requires Vulkan semantics."); // Need to figure out if we should target KHR or NV extension based on capabilities. for (auto &cap : ir.declared_capabilities) { if (cap == CapabilityRayTracingKHR || cap == CapabilityRayQueryKHR || cap == CapabilityRayTraversalPrimitiveCullingKHR) { ray_tracing_is_khr = true; break; } } if (ray_tracing_is_khr) { // In KHR ray tracing we pass payloads by pointer instead of location, // so make sure we assign locations properly. ray_tracing_khr_fixup_locations(); require_extension_internal("GL_EXT_ray_tracing"); } else require_extension_internal("GL_NV_ray_tracing"); break; case ExecutionModelMeshEXT: case ExecutionModelTaskEXT: if (options.es || options.version < 450) SPIRV_CROSS_THROW("Mesh shaders require GLSL 450 or above."); if (!options.vulkan_semantics) SPIRV_CROSS_THROW("Mesh shaders require Vulkan semantics."); require_extension_internal("GL_EXT_mesh_shader"); break; default: break; } if (!pls_inputs.empty() || !pls_outputs.empty()) { if (execution.model != ExecutionModelFragment) SPIRV_CROSS_THROW("Can only use GL_EXT_shader_pixel_local_storage in fragment shaders."); require_extension_internal("GL_EXT_shader_pixel_local_storage"); } if (!inout_color_attachments.empty()) { if (execution.model != ExecutionModelFragment) SPIRV_CROSS_THROW("Can only use GL_EXT_shader_framebuffer_fetch in fragment shaders."); if (options.vulkan_semantics) SPIRV_CROSS_THROW("Cannot use EXT_shader_framebuffer_fetch in Vulkan GLSL."); bool has_coherent = false; bool has_incoherent = false; for (auto &att : inout_color_attachments) { if (att.second) has_coherent = true; else has_incoherent = true; } if (has_coherent) require_extension_internal("GL_EXT_shader_framebuffer_fetch"); if (has_incoherent) require_extension_internal("GL_EXT_shader_framebuffer_fetch_non_coherent"); } if (options.separate_shader_objects && !options.es && options.version < 410) require_extension_internal("GL_ARB_separate_shader_objects"); if (ir.addressing_model == AddressingModelPhysicalStorageBuffer64EXT) { if (!options.vulkan_semantics) SPIRV_CROSS_THROW("GL_EXT_buffer_reference is only supported in Vulkan GLSL."); if (options.es && options.version < 320) SPIRV_CROSS_THROW("GL_EXT_buffer_reference requires ESSL 320."); else if (!options.es && options.version < 450) SPIRV_CROSS_THROW("GL_EXT_buffer_reference requires GLSL 450."); require_extension_internal("GL_EXT_buffer_reference2"); } else if (ir.addressing_model != AddressingModelLogical) { SPIRV_CROSS_THROW("Only Logical and PhysicalStorageBuffer64EXT addressing models are supported."); } // Check for nonuniform qualifier and passthrough. // Instead of looping over all decorations to find this, just look at capabilities. for (auto &cap : ir.declared_capabilities) { switch (cap) { case CapabilityShaderNonUniformEXT: if (!options.vulkan_semantics) require_extension_internal("GL_NV_gpu_shader5"); else require_extension_internal("GL_EXT_nonuniform_qualifier"); break; case CapabilityRuntimeDescriptorArrayEXT: if (!options.vulkan_semantics) SPIRV_CROSS_THROW("GL_EXT_nonuniform_qualifier is only supported in Vulkan GLSL."); require_extension_internal("GL_EXT_nonuniform_qualifier"); break; case CapabilityGeometryShaderPassthroughNV: if (execution.model == ExecutionModelGeometry) { require_extension_internal("GL_NV_geometry_shader_passthrough"); execution.geometry_passthrough = true; } break; case CapabilityVariablePointers: case CapabilityVariablePointersStorageBuffer: SPIRV_CROSS_THROW("VariablePointers capability is not supported in GLSL."); case CapabilityMultiView: if (options.vulkan_semantics) require_extension_internal("GL_EXT_multiview"); else { require_extension_internal("GL_OVR_multiview2"); if (options.ovr_multiview_view_count == 0) SPIRV_CROSS_THROW("ovr_multiview_view_count must be non-zero when using GL_OVR_multiview2."); if (get_execution_model() != ExecutionModelVertex) SPIRV_CROSS_THROW("OVR_multiview2 can only be used with Vertex shaders."); } break; case CapabilityRayQueryKHR: if (options.es || options.version < 460 || !options.vulkan_semantics) SPIRV_CROSS_THROW("RayQuery requires Vulkan GLSL 460."); require_extension_internal("GL_EXT_ray_query"); ray_tracing_is_khr = true; break; case CapabilityRayTraversalPrimitiveCullingKHR: if (options.es || options.version < 460 || !options.vulkan_semantics) SPIRV_CROSS_THROW("RayQuery requires Vulkan GLSL 460."); require_extension_internal("GL_EXT_ray_flags_primitive_culling"); ray_tracing_is_khr = true; break; default: break; } } if (options.ovr_multiview_view_count) { if (options.vulkan_semantics) SPIRV_CROSS_THROW("OVR_multiview2 cannot be used with Vulkan semantics."); if (get_execution_model() != ExecutionModelVertex) SPIRV_CROSS_THROW("OVR_multiview2 can only be used with Vertex shaders."); require_extension_internal("GL_OVR_multiview2"); } // KHR one is likely to get promoted at some point, so if we don't see an explicit SPIR-V extension, assume KHR. for (auto &ext : ir.declared_extensions) if (ext == "SPV_NV_fragment_shader_barycentric") barycentric_is_nv = true; } void CompilerGLSL::require_polyfill(Polyfill polyfill, bool relaxed) { uint32_t &polyfills = (relaxed && options.es) ? required_polyfills_relaxed : required_polyfills; if ((polyfills & polyfill) == 0) { polyfills |= polyfill; force_recompile(); } } void CompilerGLSL::ray_tracing_khr_fixup_locations() { uint32_t location = 0; ir.for_each_typed_id([&](uint32_t, SPIRVariable &var) { // Incoming payload storage can also be used for tracing. if (var.storage != StorageClassRayPayloadKHR && var.storage != StorageClassCallableDataKHR && var.storage != StorageClassIncomingRayPayloadKHR && var.storage != StorageClassIncomingCallableDataKHR) return; if (is_hidden_variable(var)) return; set_decoration(var.self, DecorationLocation, location++); }); } string CompilerGLSL::compile() { ir.fixup_reserved_names(); if (!options.vulkan_semantics) { // only NV_gpu_shader5 supports divergent indexing on OpenGL, and it does so without extra qualifiers backend.nonuniform_qualifier = ""; backend.needs_row_major_load_workaround = options.enable_row_major_load_workaround; } backend.allow_precision_qualifiers = options.vulkan_semantics || options.es; backend.force_gl_in_out_block = true; backend.supports_extensions = true; backend.use_array_constructor = true; backend.workgroup_size_is_hidden = true; backend.requires_relaxed_precision_analysis = options.es || options.vulkan_semantics; backend.support_precise_qualifier = (!options.es && options.version >= 400) || (options.es && options.version >= 320); if (is_legacy_es()) backend.support_case_fallthrough = false; // Scan the SPIR-V to find trivial uses of extensions. fixup_anonymous_struct_names(); fixup_type_alias(); reorder_type_alias(); build_function_control_flow_graphs_and_analyze(); find_static_extensions(); fixup_image_load_store_access(); update_active_builtins(); analyze_image_and_sampler_usage(); analyze_interlocked_resource_usage(); if (!inout_color_attachments.empty()) emit_inout_fragment_outputs_copy_to_subpass_inputs(); // Shaders might cast unrelated data to pointers of non-block types. // Find all such instances and make sure we can cast the pointers to a synthesized block type. if (ir.addressing_model == AddressingModelPhysicalStorageBuffer64EXT) analyze_non_block_pointer_types(); uint32_t pass_count = 0; do { reset(pass_count); buffer.reset(); emit_header(); emit_resources(); emit_extension_workarounds(get_execution_model()); if (required_polyfills != 0) emit_polyfills(required_polyfills, false); if (options.es && required_polyfills_relaxed != 0) emit_polyfills(required_polyfills_relaxed, true); emit_function(get(ir.default_entry_point), Bitset()); pass_count++; } while (is_forcing_recompilation()); // Implement the interlocked wrapper function at the end. // The body was implemented in lieu of main(). if (interlocked_is_complex) { statement("void main()"); begin_scope(); statement("// Interlocks were used in a way not compatible with GLSL, this is very slow."); statement("SPIRV_Cross_beginInvocationInterlock();"); statement("spvMainInterlockedBody();"); statement("SPIRV_Cross_endInvocationInterlock();"); end_scope(); } // Entry point in GLSL is always main(). get_entry_point().name = "main"; return buffer.str(); } std::string CompilerGLSL::get_partial_source() { return buffer.str(); } void CompilerGLSL::build_workgroup_size(SmallVector &arguments, const SpecializationConstant &wg_x, const SpecializationConstant &wg_y, const SpecializationConstant &wg_z) { auto &execution = get_entry_point(); bool builtin_workgroup = execution.workgroup_size.constant != 0; bool use_local_size_id = !builtin_workgroup && execution.flags.get(ExecutionModeLocalSizeId); if (wg_x.id) { if (options.vulkan_semantics) arguments.push_back(join("local_size_x_id = ", wg_x.constant_id)); else arguments.push_back(join("local_size_x = ", get(wg_x.id).specialization_constant_macro_name)); } else if (use_local_size_id && execution.workgroup_size.id_x) arguments.push_back(join("local_size_x = ", get(execution.workgroup_size.id_x).scalar())); else arguments.push_back(join("local_size_x = ", execution.workgroup_size.x)); if (wg_y.id) { if (options.vulkan_semantics) arguments.push_back(join("local_size_y_id = ", wg_y.constant_id)); else arguments.push_back(join("local_size_y = ", get(wg_y.id).specialization_constant_macro_name)); } else if (use_local_size_id && execution.workgroup_size.id_y) arguments.push_back(join("local_size_y = ", get(execution.workgroup_size.id_y).scalar())); else arguments.push_back(join("local_size_y = ", execution.workgroup_size.y)); if (wg_z.id) { if (options.vulkan_semantics) arguments.push_back(join("local_size_z_id = ", wg_z.constant_id)); else arguments.push_back(join("local_size_z = ", get(wg_z.id).specialization_constant_macro_name)); } else if (use_local_size_id && execution.workgroup_size.id_z) arguments.push_back(join("local_size_z = ", get(execution.workgroup_size.id_z).scalar())); else arguments.push_back(join("local_size_z = ", execution.workgroup_size.z)); } void CompilerGLSL::request_subgroup_feature(ShaderSubgroupSupportHelper::Feature feature) { if (options.vulkan_semantics) { auto khr_extension = ShaderSubgroupSupportHelper::get_KHR_extension_for_feature(feature); require_extension_internal(ShaderSubgroupSupportHelper::get_extension_name(khr_extension)); } else { if (!shader_subgroup_supporter.is_feature_requested(feature)) force_recompile(); shader_subgroup_supporter.request_feature(feature); } } void CompilerGLSL::emit_header() { auto &execution = get_entry_point(); statement("#version ", options.version, options.es && options.version > 100 ? " es" : ""); if (!options.es && options.version < 420) { // Needed for binding = # on UBOs, etc. if (options.enable_420pack_extension) { statement("#ifdef GL_ARB_shading_language_420pack"); statement("#extension GL_ARB_shading_language_420pack : require"); statement("#endif"); } // Needed for: layout(early_fragment_tests) in; if (execution.flags.get(ExecutionModeEarlyFragmentTests)) require_extension_internal("GL_ARB_shader_image_load_store"); } // Needed for: layout(post_depth_coverage) in; if (execution.flags.get(ExecutionModePostDepthCoverage)) require_extension_internal("GL_ARB_post_depth_coverage"); // Needed for: layout({pixel,sample}_interlock_[un]ordered) in; bool interlock_used = execution.flags.get(ExecutionModePixelInterlockOrderedEXT) || execution.flags.get(ExecutionModePixelInterlockUnorderedEXT) || execution.flags.get(ExecutionModeSampleInterlockOrderedEXT) || execution.flags.get(ExecutionModeSampleInterlockUnorderedEXT); if (interlock_used) { if (options.es) { if (options.version < 310) SPIRV_CROSS_THROW("At least ESSL 3.10 required for fragment shader interlock."); require_extension_internal("GL_NV_fragment_shader_interlock"); } else { if (options.version < 420) require_extension_internal("GL_ARB_shader_image_load_store"); require_extension_internal("GL_ARB_fragment_shader_interlock"); } } for (auto &ext : forced_extensions) { if (ext == "GL_ARB_gpu_shader_int64") { statement("#if defined(GL_ARB_gpu_shader_int64)"); statement("#extension GL_ARB_gpu_shader_int64 : require"); if (!options.vulkan_semantics || options.es) { statement("#elif defined(GL_NV_gpu_shader5)"); statement("#extension GL_NV_gpu_shader5 : require"); } statement("#else"); statement("#error No extension available for 64-bit integers."); statement("#endif"); } else if (ext == "GL_EXT_shader_explicit_arithmetic_types_float16") { // Special case, this extension has a potential fallback to another vendor extension in normal GLSL. // GL_AMD_gpu_shader_half_float is a superset, so try that first. statement("#if defined(GL_AMD_gpu_shader_half_float)"); statement("#extension GL_AMD_gpu_shader_half_float : require"); if (!options.vulkan_semantics) { statement("#elif defined(GL_NV_gpu_shader5)"); statement("#extension GL_NV_gpu_shader5 : require"); } else { statement("#elif defined(GL_EXT_shader_explicit_arithmetic_types_float16)"); statement("#extension GL_EXT_shader_explicit_arithmetic_types_float16 : require"); } statement("#else"); statement("#error No extension available for FP16."); statement("#endif"); } else if (ext == "GL_EXT_shader_explicit_arithmetic_types_int8") { if (options.vulkan_semantics) statement("#extension GL_EXT_shader_explicit_arithmetic_types_int8 : require"); else { statement("#if defined(GL_EXT_shader_explicit_arithmetic_types_int8)"); statement("#extension GL_EXT_shader_explicit_arithmetic_types_int8 : require"); statement("#elif defined(GL_NV_gpu_shader5)"); statement("#extension GL_NV_gpu_shader5 : require"); statement("#else"); statement("#error No extension available for Int8."); statement("#endif"); } } else if (ext == "GL_EXT_shader_explicit_arithmetic_types_int16") { if (options.vulkan_semantics) statement("#extension GL_EXT_shader_explicit_arithmetic_types_int16 : require"); else { statement("#if defined(GL_EXT_shader_explicit_arithmetic_types_int16)"); statement("#extension GL_EXT_shader_explicit_arithmetic_types_int16 : require"); statement("#elif defined(GL_AMD_gpu_shader_int16)"); statement("#extension GL_AMD_gpu_shader_int16 : require"); statement("#elif defined(GL_NV_gpu_shader5)"); statement("#extension GL_NV_gpu_shader5 : require"); statement("#else"); statement("#error No extension available for Int16."); statement("#endif"); } } else if (ext == "GL_ARB_post_depth_coverage") { if (options.es) statement("#extension GL_EXT_post_depth_coverage : require"); else { statement("#if defined(GL_ARB_post_depth_coverge)"); statement("#extension GL_ARB_post_depth_coverage : require"); statement("#else"); statement("#extension GL_EXT_post_depth_coverage : require"); statement("#endif"); } } else if (!options.vulkan_semantics && ext == "GL_ARB_shader_draw_parameters") { // Soft-enable this extension on plain GLSL. statement("#ifdef ", ext); statement("#extension ", ext, " : enable"); statement("#endif"); } else if (ext == "GL_EXT_control_flow_attributes") { // These are just hints so we can conditionally enable and fallback in the shader. statement("#if defined(GL_EXT_control_flow_attributes)"); statement("#extension GL_EXT_control_flow_attributes : require"); statement("#define SPIRV_CROSS_FLATTEN [[flatten]]"); statement("#define SPIRV_CROSS_BRANCH [[dont_flatten]]"); statement("#define SPIRV_CROSS_UNROLL [[unroll]]"); statement("#define SPIRV_CROSS_LOOP [[dont_unroll]]"); statement("#else"); statement("#define SPIRV_CROSS_FLATTEN"); statement("#define SPIRV_CROSS_BRANCH"); statement("#define SPIRV_CROSS_UNROLL"); statement("#define SPIRV_CROSS_LOOP"); statement("#endif"); } else if (ext == "GL_NV_fragment_shader_interlock") { statement("#extension GL_NV_fragment_shader_interlock : require"); statement("#define SPIRV_Cross_beginInvocationInterlock() beginInvocationInterlockNV()"); statement("#define SPIRV_Cross_endInvocationInterlock() endInvocationInterlockNV()"); } else if (ext == "GL_ARB_fragment_shader_interlock") { statement("#ifdef GL_ARB_fragment_shader_interlock"); statement("#extension GL_ARB_fragment_shader_interlock : enable"); statement("#define SPIRV_Cross_beginInvocationInterlock() beginInvocationInterlockARB()"); statement("#define SPIRV_Cross_endInvocationInterlock() endInvocationInterlockARB()"); statement("#elif defined(GL_INTEL_fragment_shader_ordering)"); statement("#extension GL_INTEL_fragment_shader_ordering : enable"); statement("#define SPIRV_Cross_beginInvocationInterlock() beginFragmentShaderOrderingINTEL()"); statement("#define SPIRV_Cross_endInvocationInterlock()"); statement("#endif"); } else statement("#extension ", ext, " : require"); } if (!options.vulkan_semantics) { using Supp = ShaderSubgroupSupportHelper; auto result = shader_subgroup_supporter.resolve(); for (uint32_t feature_index = 0; feature_index < Supp::FeatureCount; feature_index++) { auto feature = static_cast(feature_index); if (!shader_subgroup_supporter.is_feature_requested(feature)) continue; auto exts = Supp::get_candidates_for_feature(feature, result); if (exts.empty()) continue; statement(""); for (auto &ext : exts) { const char *name = Supp::get_extension_name(ext); const char *extra_predicate = Supp::get_extra_required_extension_predicate(ext); auto extra_names = Supp::get_extra_required_extension_names(ext); statement(&ext != &exts.front() ? "#elif" : "#if", " defined(", name, ")", (*extra_predicate != '\0' ? " && " : ""), extra_predicate); for (const auto &e : extra_names) statement("#extension ", e, " : enable"); statement("#extension ", name, " : require"); } if (!Supp::can_feature_be_implemented_without_extensions(feature)) { statement("#else"); statement("#error No extensions available to emulate requested subgroup feature."); } statement("#endif"); } } for (auto &header : header_lines) statement(header); SmallVector inputs; SmallVector outputs; switch (execution.model) { case ExecutionModelVertex: if (options.ovr_multiview_view_count) inputs.push_back(join("num_views = ", options.ovr_multiview_view_count)); break; case ExecutionModelGeometry: if ((execution.flags.get(ExecutionModeInvocations)) && execution.invocations != 1) inputs.push_back(join("invocations = ", execution.invocations)); if (execution.flags.get(ExecutionModeInputPoints)) inputs.push_back("points"); if (execution.flags.get(ExecutionModeInputLines)) inputs.push_back("lines"); if (execution.flags.get(ExecutionModeInputLinesAdjacency)) inputs.push_back("lines_adjacency"); if (execution.flags.get(ExecutionModeTriangles)) inputs.push_back("triangles"); if (execution.flags.get(ExecutionModeInputTrianglesAdjacency)) inputs.push_back("triangles_adjacency"); if (!execution.geometry_passthrough) { // For passthrough, these are implies and cannot be declared in shader. outputs.push_back(join("max_vertices = ", execution.output_vertices)); if (execution.flags.get(ExecutionModeOutputTriangleStrip)) outputs.push_back("triangle_strip"); if (execution.flags.get(ExecutionModeOutputPoints)) outputs.push_back("points"); if (execution.flags.get(ExecutionModeOutputLineStrip)) outputs.push_back("line_strip"); } break; case ExecutionModelTessellationControl: if (execution.flags.get(ExecutionModeOutputVertices)) outputs.push_back(join("vertices = ", execution.output_vertices)); break; case ExecutionModelTessellationEvaluation: if (execution.flags.get(ExecutionModeQuads)) inputs.push_back("quads"); if (execution.flags.get(ExecutionModeTriangles)) inputs.push_back("triangles"); if (execution.flags.get(ExecutionModeIsolines)) inputs.push_back("isolines"); if (execution.flags.get(ExecutionModePointMode)) inputs.push_back("point_mode"); if (!execution.flags.get(ExecutionModeIsolines)) { if (execution.flags.get(ExecutionModeVertexOrderCw)) inputs.push_back("cw"); if (execution.flags.get(ExecutionModeVertexOrderCcw)) inputs.push_back("ccw"); } if (execution.flags.get(ExecutionModeSpacingFractionalEven)) inputs.push_back("fractional_even_spacing"); if (execution.flags.get(ExecutionModeSpacingFractionalOdd)) inputs.push_back("fractional_odd_spacing"); if (execution.flags.get(ExecutionModeSpacingEqual)) inputs.push_back("equal_spacing"); break; case ExecutionModelGLCompute: case ExecutionModelTaskEXT: case ExecutionModelMeshEXT: { if (execution.workgroup_size.constant != 0 || execution.flags.get(ExecutionModeLocalSizeId)) { SpecializationConstant wg_x, wg_y, wg_z; get_work_group_size_specialization_constants(wg_x, wg_y, wg_z); // If there are any spec constants on legacy GLSL, defer declaration, we need to set up macro // declarations before we can emit the work group size. if (options.vulkan_semantics || ((wg_x.id == ConstantID(0)) && (wg_y.id == ConstantID(0)) && (wg_z.id == ConstantID(0)))) build_workgroup_size(inputs, wg_x, wg_y, wg_z); } else { inputs.push_back(join("local_size_x = ", execution.workgroup_size.x)); inputs.push_back(join("local_size_y = ", execution.workgroup_size.y)); inputs.push_back(join("local_size_z = ", execution.workgroup_size.z)); } if (execution.model == ExecutionModelMeshEXT) { outputs.push_back(join("max_vertices = ", execution.output_vertices)); outputs.push_back(join("max_primitives = ", execution.output_primitives)); if (execution.flags.get(ExecutionModeOutputTrianglesEXT)) outputs.push_back("triangles"); else if (execution.flags.get(ExecutionModeOutputLinesEXT)) outputs.push_back("lines"); else if (execution.flags.get(ExecutionModeOutputPoints)) outputs.push_back("points"); } break; } case ExecutionModelFragment: if (options.es) { switch (options.fragment.default_float_precision) { case Options::Lowp: statement("precision lowp float;"); break; case Options::Mediump: statement("precision mediump float;"); break; case Options::Highp: statement("precision highp float;"); break; default: break; } switch (options.fragment.default_int_precision) { case Options::Lowp: statement("precision lowp int;"); break; case Options::Mediump: statement("precision mediump int;"); break; case Options::Highp: statement("precision highp int;"); break; default: break; } } if (execution.flags.get(ExecutionModeEarlyFragmentTests)) inputs.push_back("early_fragment_tests"); if (execution.flags.get(ExecutionModePostDepthCoverage)) inputs.push_back("post_depth_coverage"); if (interlock_used) statement("#if defined(GL_ARB_fragment_shader_interlock)"); if (execution.flags.get(ExecutionModePixelInterlockOrderedEXT)) statement("layout(pixel_interlock_ordered) in;"); else if (execution.flags.get(ExecutionModePixelInterlockUnorderedEXT)) statement("layout(pixel_interlock_unordered) in;"); else if (execution.flags.get(ExecutionModeSampleInterlockOrderedEXT)) statement("layout(sample_interlock_ordered) in;"); else if (execution.flags.get(ExecutionModeSampleInterlockUnorderedEXT)) statement("layout(sample_interlock_unordered) in;"); if (interlock_used) { statement("#elif !defined(GL_INTEL_fragment_shader_ordering)"); statement("#error Fragment Shader Interlock/Ordering extension missing!"); statement("#endif"); } if (!options.es && execution.flags.get(ExecutionModeDepthGreater)) statement("layout(depth_greater) out float gl_FragDepth;"); else if (!options.es && execution.flags.get(ExecutionModeDepthLess)) statement("layout(depth_less) out float gl_FragDepth;"); break; default: break; } for (auto &cap : ir.declared_capabilities) if (cap == CapabilityRayTraversalPrimitiveCullingKHR) statement("layout(primitive_culling);"); if (!inputs.empty()) statement("layout(", merge(inputs), ") in;"); if (!outputs.empty()) statement("layout(", merge(outputs), ") out;"); statement(""); } bool CompilerGLSL::type_is_empty(const SPIRType &type) { return type.basetype == SPIRType::Struct && type.member_types.empty(); } void CompilerGLSL::emit_struct(SPIRType &type) { // Struct types can be stamped out multiple times // with just different offsets, matrix layouts, etc ... // Type-punning with these types is legal, which complicates things // when we are storing struct and array types in an SSBO for example. // If the type master is packed however, we can no longer assume that the struct declaration will be redundant. if (type.type_alias != TypeID(0) && !has_extended_decoration(type.type_alias, SPIRVCrossDecorationBufferBlockRepacked)) return; add_resource_name(type.self); auto name = type_to_glsl(type); statement(!backend.explicit_struct_type ? "struct " : "", name); begin_scope(); type.member_name_cache.clear(); uint32_t i = 0; bool emitted = false; for (auto &member : type.member_types) { add_member_name(type, i); emit_struct_member(type, member, i); i++; emitted = true; } // Don't declare empty structs in GLSL, this is not allowed. if (type_is_empty(type) && !backend.supports_empty_struct) { statement("int empty_struct_member;"); emitted = true; } if (has_extended_decoration(type.self, SPIRVCrossDecorationPaddingTarget)) emit_struct_padding_target(type); end_scope_decl(); if (emitted) statement(""); } string CompilerGLSL::to_interpolation_qualifiers(const Bitset &flags) { string res; //if (flags & (1ull << DecorationSmooth)) // res += "smooth "; if (flags.get(DecorationFlat)) res += "flat "; if (flags.get(DecorationNoPerspective)) { if (options.es) { if (options.version < 300) SPIRV_CROSS_THROW("noperspective requires ESSL 300."); require_extension_internal("GL_NV_shader_noperspective_interpolation"); } else if (is_legacy_desktop()) require_extension_internal("GL_EXT_gpu_shader4"); res += "noperspective "; } if (flags.get(DecorationCentroid)) res += "centroid "; if (flags.get(DecorationPatch)) res += "patch "; if (flags.get(DecorationSample)) { if (options.es) { if (options.version < 300) SPIRV_CROSS_THROW("sample requires ESSL 300."); else if (options.version < 320) require_extension_internal("GL_OES_shader_multisample_interpolation"); } res += "sample "; } if (flags.get(DecorationInvariant) && (options.es || options.version >= 120)) res += "invariant "; if (flags.get(DecorationPerPrimitiveEXT)) { res += "perprimitiveEXT "; require_extension_internal("GL_EXT_mesh_shader"); } if (flags.get(DecorationExplicitInterpAMD)) { require_extension_internal("GL_AMD_shader_explicit_vertex_parameter"); res += "__explicitInterpAMD "; } if (flags.get(DecorationPerVertexKHR)) { if (options.es && options.version < 320) SPIRV_CROSS_THROW("pervertexEXT requires ESSL 320."); else if (!options.es && options.version < 450) SPIRV_CROSS_THROW("pervertexEXT requires GLSL 450."); if (barycentric_is_nv) { require_extension_internal("GL_NV_fragment_shader_barycentric"); res += "pervertexNV "; } else { require_extension_internal("GL_EXT_fragment_shader_barycentric"); res += "pervertexEXT "; } } return res; } string CompilerGLSL::layout_for_member(const SPIRType &type, uint32_t index) { if (is_legacy()) return ""; bool is_block = has_decoration(type.self, DecorationBlock) || has_decoration(type.self, DecorationBufferBlock); if (!is_block) return ""; auto &memb = ir.meta[type.self].members; if (index >= memb.size()) return ""; auto &dec = memb[index]; SmallVector attr; if (has_member_decoration(type.self, index, DecorationPassthroughNV)) attr.push_back("passthrough"); // We can only apply layouts on members in block interfaces. // This is a bit problematic because in SPIR-V decorations are applied on the struct types directly. // This is not supported on GLSL, so we have to make the assumption that if a struct within our buffer block struct // has a decoration, it was originally caused by a top-level layout() qualifier in GLSL. // // We would like to go from (SPIR-V style): // // struct Foo { layout(row_major) mat4 matrix; }; // buffer UBO { Foo foo; }; // // to // // struct Foo { mat4 matrix; }; // GLSL doesn't support any layout shenanigans in raw struct declarations. // buffer UBO { layout(row_major) Foo foo; }; // Apply the layout on top-level. auto flags = combined_decoration_for_member(type, index); if (flags.get(DecorationRowMajor)) attr.push_back("row_major"); // We don't emit any global layouts, so column_major is default. //if (flags & (1ull << DecorationColMajor)) // attr.push_back("column_major"); if (dec.decoration_flags.get(DecorationLocation) && can_use_io_location(type.storage, true)) attr.push_back(join("location = ", dec.location)); // Can only declare component if we can declare location. if (dec.decoration_flags.get(DecorationComponent) && can_use_io_location(type.storage, true)) { if (!options.es) { if (options.version < 440 && options.version >= 140) require_extension_internal("GL_ARB_enhanced_layouts"); else if (options.version < 140) SPIRV_CROSS_THROW("Component decoration is not supported in targets below GLSL 1.40."); attr.push_back(join("component = ", dec.component)); } else SPIRV_CROSS_THROW("Component decoration is not supported in ES targets."); } // SPIRVCrossDecorationPacked is set by layout_for_variable earlier to mark that we need to emit offset qualifiers. // This is only done selectively in GLSL as needed. if (has_extended_decoration(type.self, SPIRVCrossDecorationExplicitOffset) && dec.decoration_flags.get(DecorationOffset)) attr.push_back(join("offset = ", dec.offset)); else if (type.storage == StorageClassOutput && dec.decoration_flags.get(DecorationOffset)) attr.push_back(join("xfb_offset = ", dec.offset)); if (attr.empty()) return ""; string res = "layout("; res += merge(attr); res += ") "; return res; } const char *CompilerGLSL::format_to_glsl(spv::ImageFormat format) { if (options.es && is_desktop_only_format(format)) SPIRV_CROSS_THROW("Attempting to use image format not supported in ES profile."); switch (format) { case ImageFormatRgba32f: return "rgba32f"; case ImageFormatRgba16f: return "rgba16f"; case ImageFormatR32f: return "r32f"; case ImageFormatRgba8: return "rgba8"; case ImageFormatRgba8Snorm: return "rgba8_snorm"; case ImageFormatRg32f: return "rg32f"; case ImageFormatRg16f: return "rg16f"; case ImageFormatRgba32i: return "rgba32i"; case ImageFormatRgba16i: return "rgba16i"; case ImageFormatR32i: return "r32i"; case ImageFormatRgba8i: return "rgba8i"; case ImageFormatRg32i: return "rg32i"; case ImageFormatRg16i: return "rg16i"; case ImageFormatRgba32ui: return "rgba32ui"; case ImageFormatRgba16ui: return "rgba16ui"; case ImageFormatR32ui: return "r32ui"; case ImageFormatRgba8ui: return "rgba8ui"; case ImageFormatRg32ui: return "rg32ui"; case ImageFormatRg16ui: return "rg16ui"; case ImageFormatR11fG11fB10f: return "r11f_g11f_b10f"; case ImageFormatR16f: return "r16f"; case ImageFormatRgb10A2: return "rgb10_a2"; case ImageFormatR8: return "r8"; case ImageFormatRg8: return "rg8"; case ImageFormatR16: return "r16"; case ImageFormatRg16: return "rg16"; case ImageFormatRgba16: return "rgba16"; case ImageFormatR16Snorm: return "r16_snorm"; case ImageFormatRg16Snorm: return "rg16_snorm"; case ImageFormatRgba16Snorm: return "rgba16_snorm"; case ImageFormatR8Snorm: return "r8_snorm"; case ImageFormatRg8Snorm: return "rg8_snorm"; case ImageFormatR8ui: return "r8ui"; case ImageFormatRg8ui: return "rg8ui"; case ImageFormatR16ui: return "r16ui"; case ImageFormatRgb10a2ui: return "rgb10_a2ui"; case ImageFormatR8i: return "r8i"; case ImageFormatRg8i: return "rg8i"; case ImageFormatR16i: return "r16i"; case ImageFormatR64i: return "r64i"; case ImageFormatR64ui: return "r64ui"; default: case ImageFormatUnknown: return nullptr; } } uint32_t CompilerGLSL::type_to_packed_base_size(const SPIRType &type, BufferPackingStandard) { switch (type.basetype) { case SPIRType::Double: case SPIRType::Int64: case SPIRType::UInt64: return 8; case SPIRType::Float: case SPIRType::Int: case SPIRType::UInt: return 4; case SPIRType::Half: case SPIRType::Short: case SPIRType::UShort: return 2; case SPIRType::SByte: case SPIRType::UByte: return 1; default: SPIRV_CROSS_THROW("Unrecognized type in type_to_packed_base_size."); } } uint32_t CompilerGLSL::type_to_packed_alignment(const SPIRType &type, const Bitset &flags, BufferPackingStandard packing) { // If using PhysicalStorageBufferEXT storage class, this is a pointer, // and is 64-bit. if (is_physical_pointer(type)) { if (!type.pointer) SPIRV_CROSS_THROW("Types in PhysicalStorageBufferEXT must be pointers."); if (ir.addressing_model == AddressingModelPhysicalStorageBuffer64EXT) { if (packing_is_vec4_padded(packing) && type_is_array_of_pointers(type)) return 16; else return 8; } else SPIRV_CROSS_THROW("AddressingModelPhysicalStorageBuffer64EXT must be used for PhysicalStorageBufferEXT."); } else if (is_array(type)) { uint32_t minimum_alignment = 1; if (packing_is_vec4_padded(packing)) minimum_alignment = 16; auto *tmp = &get(type.parent_type); while (!tmp->array.empty()) tmp = &get(tmp->parent_type); // Get the alignment of the base type, then maybe round up. return max(minimum_alignment, type_to_packed_alignment(*tmp, flags, packing)); } if (type.basetype == SPIRType::Struct) { // Rule 9. Structs alignments are maximum alignment of its members. uint32_t alignment = 1; for (uint32_t i = 0; i < type.member_types.size(); i++) { auto member_flags = ir.meta[type.self].members[i].decoration_flags; alignment = max(alignment, type_to_packed_alignment(get(type.member_types[i]), member_flags, packing)); } // In std140, struct alignment is rounded up to 16. if (packing_is_vec4_padded(packing)) alignment = max(alignment, 16u); return alignment; } else { const uint32_t base_alignment = type_to_packed_base_size(type, packing); // Alignment requirement for scalar block layout is always the alignment for the most basic component. if (packing_is_scalar(packing)) return base_alignment; // Vectors are *not* aligned in HLSL, but there's an extra rule where vectors cannot straddle // a vec4, this is handled outside since that part knows our current offset. if (type.columns == 1 && packing_is_hlsl(packing)) return base_alignment; // From 7.6.2.2 in GL 4.5 core spec. // Rule 1 if (type.vecsize == 1 && type.columns == 1) return base_alignment; // Rule 2 if ((type.vecsize == 2 || type.vecsize == 4) && type.columns == 1) return type.vecsize * base_alignment; // Rule 3 if (type.vecsize == 3 && type.columns == 1) return 4 * base_alignment; // Rule 4 implied. Alignment does not change in std430. // Rule 5. Column-major matrices are stored as arrays of // vectors. if (flags.get(DecorationColMajor) && type.columns > 1) { if (packing_is_vec4_padded(packing)) return 4 * base_alignment; else if (type.vecsize == 3) return 4 * base_alignment; else return type.vecsize * base_alignment; } // Rule 6 implied. // Rule 7. if (flags.get(DecorationRowMajor) && type.vecsize > 1) { if (packing_is_vec4_padded(packing)) return 4 * base_alignment; else if (type.columns == 3) return 4 * base_alignment; else return type.columns * base_alignment; } // Rule 8 implied. } SPIRV_CROSS_THROW("Did not find suitable rule for type. Bogus decorations?"); } uint32_t CompilerGLSL::type_to_packed_array_stride(const SPIRType &type, const Bitset &flags, BufferPackingStandard packing) { // Array stride is equal to aligned size of the underlying type. uint32_t parent = type.parent_type; assert(parent); auto &tmp = get(parent); uint32_t size = type_to_packed_size(tmp, flags, packing); uint32_t alignment = type_to_packed_alignment(type, flags, packing); return (size + alignment - 1) & ~(alignment - 1); } uint32_t CompilerGLSL::type_to_packed_size(const SPIRType &type, const Bitset &flags, BufferPackingStandard packing) { // If using PhysicalStorageBufferEXT storage class, this is a pointer, // and is 64-bit. if (is_physical_pointer(type)) { if (!type.pointer) SPIRV_CROSS_THROW("Types in PhysicalStorageBufferEXT must be pointers."); if (ir.addressing_model == AddressingModelPhysicalStorageBuffer64EXT) return 8; else SPIRV_CROSS_THROW("AddressingModelPhysicalStorageBuffer64EXT must be used for PhysicalStorageBufferEXT."); } else if (is_array(type)) { uint32_t packed_size = to_array_size_literal(type) * type_to_packed_array_stride(type, flags, packing); // For arrays of vectors and matrices in HLSL, the last element has a size which depends on its vector size, // so that it is possible to pack other vectors into the last element. if (packing_is_hlsl(packing) && type.basetype != SPIRType::Struct) packed_size -= (4 - type.vecsize) * (type.width / 8); return packed_size; } uint32_t size = 0; if (type.basetype == SPIRType::Struct) { uint32_t pad_alignment = 1; for (uint32_t i = 0; i < type.member_types.size(); i++) { auto member_flags = ir.meta[type.self].members[i].decoration_flags; auto &member_type = get(type.member_types[i]); uint32_t packed_alignment = type_to_packed_alignment(member_type, member_flags, packing); uint32_t alignment = max(packed_alignment, pad_alignment); // The next member following a struct member is aligned to the base alignment of the struct that came before. // GL 4.5 spec, 7.6.2.2. if (member_type.basetype == SPIRType::Struct) pad_alignment = packed_alignment; else pad_alignment = 1; size = (size + alignment - 1) & ~(alignment - 1); size += type_to_packed_size(member_type, member_flags, packing); } } else { const uint32_t base_alignment = type_to_packed_base_size(type, packing); if (packing_is_scalar(packing)) { size = type.vecsize * type.columns * base_alignment; } else { if (type.columns == 1) size = type.vecsize * base_alignment; if (flags.get(DecorationColMajor) && type.columns > 1) { if (packing_is_vec4_padded(packing)) size = type.columns * 4 * base_alignment; else if (type.vecsize == 3) size = type.columns * 4 * base_alignment; else size = type.columns * type.vecsize * base_alignment; } if (flags.get(DecorationRowMajor) && type.vecsize > 1) { if (packing_is_vec4_padded(packing)) size = type.vecsize * 4 * base_alignment; else if (type.columns == 3) size = type.vecsize * 4 * base_alignment; else size = type.vecsize * type.columns * base_alignment; } // For matrices in HLSL, the last element has a size which depends on its vector size, // so that it is possible to pack other vectors into the last element. if (packing_is_hlsl(packing) && type.columns > 1) size -= (4 - type.vecsize) * (type.width / 8); } } return size; } bool CompilerGLSL::buffer_is_packing_standard(const SPIRType &type, BufferPackingStandard packing, uint32_t *failed_validation_index, uint32_t start_offset, uint32_t end_offset) { // This is very tricky and error prone, but try to be exhaustive and correct here. // SPIR-V doesn't directly say if we're using std430 or std140. // SPIR-V communicates this using Offset and ArrayStride decorations (which is what really matters), // so we have to try to infer whether or not the original GLSL source was std140 or std430 based on this information. // We do not have to consider shared or packed since these layouts are not allowed in Vulkan SPIR-V (they are useless anyways, and custom offsets would do the same thing). // // It is almost certain that we're using std430, but it gets tricky with arrays in particular. // We will assume std430, but infer std140 if we can prove the struct is not compliant with std430. // // The only two differences between std140 and std430 are related to padding alignment/array stride // in arrays and structs. In std140 they take minimum vec4 alignment. // std430 only removes the vec4 requirement. uint32_t offset = 0; uint32_t pad_alignment = 1; bool is_top_level_block = has_decoration(type.self, DecorationBlock) || has_decoration(type.self, DecorationBufferBlock); for (uint32_t i = 0; i < type.member_types.size(); i++) { auto &memb_type = get(type.member_types[i]); auto member_flags = ir.meta[type.self].members[i].decoration_flags; // Verify alignment rules. uint32_t packed_alignment = type_to_packed_alignment(memb_type, member_flags, packing); // This is a rather dirty workaround to deal with some cases of OpSpecConstantOp used as array size, e.g: // layout(constant_id = 0) const int s = 10; // const int S = s + 5; // SpecConstantOp // buffer Foo { int data[S]; }; // <-- Very hard for us to deduce a fixed value here, // we would need full implementation of compile-time constant folding. :( // If we are the last member of a struct, there might be cases where the actual size of that member is irrelevant // for our analysis (e.g. unsized arrays). // This lets us simply ignore that there are spec constant op sized arrays in our buffers. // Querying size of this member will fail, so just don't call it unless we have to. // // This is likely "best effort" we can support without going into unacceptably complicated workarounds. bool member_can_be_unsized = is_top_level_block && size_t(i + 1) == type.member_types.size() && !memb_type.array.empty(); uint32_t packed_size = 0; if (!member_can_be_unsized || packing_is_hlsl(packing)) packed_size = type_to_packed_size(memb_type, member_flags, packing); // We only need to care about this if we have non-array types which can straddle the vec4 boundary. uint32_t actual_offset = type_struct_member_offset(type, i); if (packing_is_hlsl(packing)) { // If a member straddles across a vec4 boundary, alignment is actually vec4. uint32_t target_offset; // If we intend to use explicit packing, we must check for improper straddle with that offset. // In implicit packing, we must check with implicit offset, since the explicit offset // might have already accounted for the straddle, and we'd miss the alignment promotion to vec4. // This is important when packing sub-structs that don't support packoffset(). if (packing_has_flexible_offset(packing)) target_offset = actual_offset; else target_offset = offset; uint32_t begin_word = target_offset / 16; uint32_t end_word = (target_offset + packed_size - 1) / 16; if (begin_word != end_word) packed_alignment = max(packed_alignment, 16u); } // Field is not in the specified range anymore and we can ignore any further fields. if (actual_offset >= end_offset) break; uint32_t alignment = max(packed_alignment, pad_alignment); offset = (offset + alignment - 1) & ~(alignment - 1); // The next member following a struct member is aligned to the base alignment of the struct that came before. // GL 4.5 spec, 7.6.2.2. if (memb_type.basetype == SPIRType::Struct && !memb_type.pointer) pad_alignment = packed_alignment; else pad_alignment = 1; // Only care about packing if we are in the given range if (actual_offset >= start_offset) { // We only care about offsets in std140, std430, etc ... // For EnhancedLayout variants, we have the flexibility to choose our own offsets. if (!packing_has_flexible_offset(packing)) { if (actual_offset != offset) // This cannot be the packing we're looking for. { if (failed_validation_index) *failed_validation_index = i; return false; } } else if ((actual_offset & (alignment - 1)) != 0) { // We still need to verify that alignment rules are observed, even if we have explicit offset. if (failed_validation_index) *failed_validation_index = i; return false; } // Verify array stride rules. if (is_array(memb_type) && type_to_packed_array_stride(memb_type, member_flags, packing) != type_struct_member_array_stride(type, i)) { if (failed_validation_index) *failed_validation_index = i; return false; } // Verify that sub-structs also follow packing rules. // We cannot use enhanced layouts on substructs, so they better be up to spec. auto substruct_packing = packing_to_substruct_packing(packing); if (!memb_type.pointer && !memb_type.member_types.empty() && !buffer_is_packing_standard(memb_type, substruct_packing)) { if (failed_validation_index) *failed_validation_index = i; return false; } } // Bump size. offset = actual_offset + packed_size; } return true; } bool CompilerGLSL::can_use_io_location(StorageClass storage, bool block) { // Location specifiers are must have in SPIR-V, but they aren't really supported in earlier versions of GLSL. // Be very explicit here about how to solve the issue. if ((get_execution_model() != ExecutionModelVertex && storage == StorageClassInput) || (get_execution_model() != ExecutionModelFragment && storage == StorageClassOutput)) { uint32_t minimum_desktop_version = block ? 440 : 410; // ARB_enhanced_layouts vs ARB_separate_shader_objects ... if (!options.es && options.version < minimum_desktop_version && !options.separate_shader_objects) return false; else if (options.es && options.version < 310) return false; } if ((get_execution_model() == ExecutionModelVertex && storage == StorageClassInput) || (get_execution_model() == ExecutionModelFragment && storage == StorageClassOutput)) { if (options.es && options.version < 300) return false; else if (!options.es && options.version < 330) return false; } if (storage == StorageClassUniform || storage == StorageClassUniformConstant || storage == StorageClassPushConstant) { if (options.es && options.version < 310) return false; else if (!options.es && options.version < 430) return false; } return true; } string CompilerGLSL::layout_for_variable(const SPIRVariable &var) { // FIXME: Come up with a better solution for when to disable layouts. // Having layouts depend on extensions as well as which types // of layouts are used. For now, the simple solution is to just disable // layouts for legacy versions. if (is_legacy()) return ""; if (subpass_input_is_framebuffer_fetch(var.self)) return ""; SmallVector attr; auto &type = get(var.basetype); auto &flags = get_decoration_bitset(var.self); auto &typeflags = get_decoration_bitset(type.self); if (flags.get(DecorationPassthroughNV)) attr.push_back("passthrough"); if (options.vulkan_semantics && var.storage == StorageClassPushConstant) attr.push_back("push_constant"); else if (var.storage == StorageClassShaderRecordBufferKHR) attr.push_back(ray_tracing_is_khr ? "shaderRecordEXT" : "shaderRecordNV"); if (flags.get(DecorationRowMajor)) attr.push_back("row_major"); if (flags.get(DecorationColMajor)) attr.push_back("column_major"); if (options.vulkan_semantics) { if (flags.get(DecorationInputAttachmentIndex)) attr.push_back(join("input_attachment_index = ", get_decoration(var.self, DecorationInputAttachmentIndex))); } bool is_block = has_decoration(type.self, DecorationBlock); if (flags.get(DecorationLocation) && can_use_io_location(var.storage, is_block)) { Bitset combined_decoration; for (uint32_t i = 0; i < ir.meta[type.self].members.size(); i++) combined_decoration.merge_or(combined_decoration_for_member(type, i)); // If our members have location decorations, we don't need to // emit location decorations at the top as well (looks weird). if (!combined_decoration.get(DecorationLocation)) attr.push_back(join("location = ", get_decoration(var.self, DecorationLocation))); } if (get_execution_model() == ExecutionModelFragment && var.storage == StorageClassOutput && location_is_non_coherent_framebuffer_fetch(get_decoration(var.self, DecorationLocation))) { attr.push_back("noncoherent"); } // Transform feedback bool uses_enhanced_layouts = false; if (is_block && var.storage == StorageClassOutput) { // For blocks, there is a restriction where xfb_stride/xfb_buffer must only be declared on the block itself, // since all members must match the same xfb_buffer. The only thing we will declare for members of the block // is the xfb_offset. uint32_t member_count = uint32_t(type.member_types.size()); bool have_xfb_buffer_stride = false; bool have_any_xfb_offset = false; bool have_geom_stream = false; uint32_t xfb_stride = 0, xfb_buffer = 0, geom_stream = 0; if (flags.get(DecorationXfbBuffer) && flags.get(DecorationXfbStride)) { have_xfb_buffer_stride = true; xfb_buffer = get_decoration(var.self, DecorationXfbBuffer); xfb_stride = get_decoration(var.self, DecorationXfbStride); } if (flags.get(DecorationStream)) { have_geom_stream = true; geom_stream = get_decoration(var.self, DecorationStream); } // Verify that none of the members violate our assumption. for (uint32_t i = 0; i < member_count; i++) { if (has_member_decoration(type.self, i, DecorationStream)) { uint32_t member_geom_stream = get_member_decoration(type.self, i, DecorationStream); if (have_geom_stream && member_geom_stream != geom_stream) SPIRV_CROSS_THROW("IO block member Stream mismatch."); have_geom_stream = true; geom_stream = member_geom_stream; } // Only members with an Offset decoration participate in XFB. if (!has_member_decoration(type.self, i, DecorationOffset)) continue; have_any_xfb_offset = true; if (has_member_decoration(type.self, i, DecorationXfbBuffer)) { uint32_t buffer_index = get_member_decoration(type.self, i, DecorationXfbBuffer); if (have_xfb_buffer_stride && buffer_index != xfb_buffer) SPIRV_CROSS_THROW("IO block member XfbBuffer mismatch."); have_xfb_buffer_stride = true; xfb_buffer = buffer_index; } if (has_member_decoration(type.self, i, DecorationXfbStride)) { uint32_t stride = get_member_decoration(type.self, i, DecorationXfbStride); if (have_xfb_buffer_stride && stride != xfb_stride) SPIRV_CROSS_THROW("IO block member XfbStride mismatch."); have_xfb_buffer_stride = true; xfb_stride = stride; } } if (have_xfb_buffer_stride && have_any_xfb_offset) { attr.push_back(join("xfb_buffer = ", xfb_buffer)); attr.push_back(join("xfb_stride = ", xfb_stride)); uses_enhanced_layouts = true; } if (have_geom_stream) { if (get_execution_model() != ExecutionModelGeometry) SPIRV_CROSS_THROW("Geometry streams can only be used in geometry shaders."); if (options.es) SPIRV_CROSS_THROW("Multiple geometry streams not supported in ESSL."); if (options.version < 400) require_extension_internal("GL_ARB_transform_feedback3"); attr.push_back(join("stream = ", get_decoration(var.self, DecorationStream))); } } else if (var.storage == StorageClassOutput) { if (flags.get(DecorationXfbBuffer) && flags.get(DecorationXfbStride) && flags.get(DecorationOffset)) { // XFB for standalone variables, we can emit all decorations. attr.push_back(join("xfb_buffer = ", get_decoration(var.self, DecorationXfbBuffer))); attr.push_back(join("xfb_stride = ", get_decoration(var.self, DecorationXfbStride))); attr.push_back(join("xfb_offset = ", get_decoration(var.self, DecorationOffset))); uses_enhanced_layouts = true; } if (flags.get(DecorationStream)) { if (get_execution_model() != ExecutionModelGeometry) SPIRV_CROSS_THROW("Geometry streams can only be used in geometry shaders."); if (options.es) SPIRV_CROSS_THROW("Multiple geometry streams not supported in ESSL."); if (options.version < 400) require_extension_internal("GL_ARB_transform_feedback3"); attr.push_back(join("stream = ", get_decoration(var.self, DecorationStream))); } } // Can only declare Component if we can declare location. if (flags.get(DecorationComponent) && can_use_io_location(var.storage, is_block)) { uses_enhanced_layouts = true; attr.push_back(join("component = ", get_decoration(var.self, DecorationComponent))); } if (uses_enhanced_layouts) { if (!options.es) { if (options.version < 440 && options.version >= 140) require_extension_internal("GL_ARB_enhanced_layouts"); else if (options.version < 140) SPIRV_CROSS_THROW("GL_ARB_enhanced_layouts is not supported in targets below GLSL 1.40."); if (!options.es && options.version < 440) require_extension_internal("GL_ARB_enhanced_layouts"); } else if (options.es) SPIRV_CROSS_THROW("GL_ARB_enhanced_layouts is not supported in ESSL."); } if (flags.get(DecorationIndex)) attr.push_back(join("index = ", get_decoration(var.self, DecorationIndex))); // Do not emit set = decoration in regular GLSL output, but // we need to preserve it in Vulkan GLSL mode. if (var.storage != StorageClassPushConstant && var.storage != StorageClassShaderRecordBufferKHR) { if (flags.get(DecorationDescriptorSet) && options.vulkan_semantics) attr.push_back(join("set = ", get_decoration(var.self, DecorationDescriptorSet))); } bool push_constant_block = options.vulkan_semantics && var.storage == StorageClassPushConstant; bool ssbo_block = var.storage == StorageClassStorageBuffer || var.storage == StorageClassShaderRecordBufferKHR || (var.storage == StorageClassUniform && typeflags.get(DecorationBufferBlock)); bool emulated_ubo = var.storage == StorageClassPushConstant && options.emit_push_constant_as_uniform_buffer; bool ubo_block = var.storage == StorageClassUniform && typeflags.get(DecorationBlock); // GL 3.0/GLSL 1.30 is not considered legacy, but it doesn't have UBOs ... bool can_use_buffer_blocks = (options.es && options.version >= 300) || (!options.es && options.version >= 140); // pretend no UBOs when options say so if (ubo_block && options.emit_uniform_buffer_as_plain_uniforms) can_use_buffer_blocks = false; bool can_use_binding; if (options.es) can_use_binding = options.version >= 310; else can_use_binding = options.enable_420pack_extension || (options.version >= 420); // Make sure we don't emit binding layout for a classic uniform on GLSL 1.30. if (!can_use_buffer_blocks && var.storage == StorageClassUniform) can_use_binding = false; if (var.storage == StorageClassShaderRecordBufferKHR) can_use_binding = false; if (can_use_binding && flags.get(DecorationBinding)) attr.push_back(join("binding = ", get_decoration(var.self, DecorationBinding))); if (var.storage != StorageClassOutput && flags.get(DecorationOffset)) attr.push_back(join("offset = ", get_decoration(var.self, DecorationOffset))); // Instead of adding explicit offsets for every element here, just assume we're using std140 or std430. // If SPIR-V does not comply with either layout, we cannot really work around it. if (can_use_buffer_blocks && (ubo_block || emulated_ubo)) { attr.push_back(buffer_to_packing_standard(type, false)); } else if (can_use_buffer_blocks && (push_constant_block || ssbo_block)) { attr.push_back(buffer_to_packing_standard(type, true)); } // For images, the type itself adds a layout qualifer. // Only emit the format for storage images. if (type.basetype == SPIRType::Image && type.image.sampled == 2) { const char *fmt = format_to_glsl(type.image.format); if (fmt) attr.push_back(fmt); } if (attr.empty()) return ""; string res = "layout("; res += merge(attr); res += ") "; return res; } string CompilerGLSL::buffer_to_packing_standard(const SPIRType &type, bool support_std430_without_scalar_layout) { if (support_std430_without_scalar_layout && buffer_is_packing_standard(type, BufferPackingStd430)) return "std430"; else if (buffer_is_packing_standard(type, BufferPackingStd140)) return "std140"; else if (options.vulkan_semantics && buffer_is_packing_standard(type, BufferPackingScalar)) { require_extension_internal("GL_EXT_scalar_block_layout"); return "scalar"; } else if (support_std430_without_scalar_layout && buffer_is_packing_standard(type, BufferPackingStd430EnhancedLayout)) { if (options.es && !options.vulkan_semantics) SPIRV_CROSS_THROW("Push constant block cannot be expressed as neither std430 nor std140. ES-targets do " "not support GL_ARB_enhanced_layouts."); if (!options.es && !options.vulkan_semantics && options.version < 440) require_extension_internal("GL_ARB_enhanced_layouts"); set_extended_decoration(type.self, SPIRVCrossDecorationExplicitOffset); return "std430"; } else if (buffer_is_packing_standard(type, BufferPackingStd140EnhancedLayout)) { // Fallback time. We might be able to use the ARB_enhanced_layouts to deal with this difference, // however, we can only use layout(offset) on the block itself, not any substructs, so the substructs better be the appropriate layout. // Enhanced layouts seem to always work in Vulkan GLSL, so no need for extensions there. if (options.es && !options.vulkan_semantics) SPIRV_CROSS_THROW("Push constant block cannot be expressed as neither std430 nor std140. ES-targets do " "not support GL_ARB_enhanced_layouts."); if (!options.es && !options.vulkan_semantics && options.version < 440) require_extension_internal("GL_ARB_enhanced_layouts"); set_extended_decoration(type.self, SPIRVCrossDecorationExplicitOffset); return "std140"; } else if (options.vulkan_semantics && buffer_is_packing_standard(type, BufferPackingScalarEnhancedLayout)) { set_extended_decoration(type.self, SPIRVCrossDecorationExplicitOffset); require_extension_internal("GL_EXT_scalar_block_layout"); return "scalar"; } else if (!support_std430_without_scalar_layout && options.vulkan_semantics && buffer_is_packing_standard(type, BufferPackingStd430)) { // UBOs can support std430 with GL_EXT_scalar_block_layout. require_extension_internal("GL_EXT_scalar_block_layout"); return "std430"; } else if (!support_std430_without_scalar_layout && options.vulkan_semantics && buffer_is_packing_standard(type, BufferPackingStd430EnhancedLayout)) { // UBOs can support std430 with GL_EXT_scalar_block_layout. set_extended_decoration(type.self, SPIRVCrossDecorationExplicitOffset); require_extension_internal("GL_EXT_scalar_block_layout"); return "std430"; } else { SPIRV_CROSS_THROW("Buffer block cannot be expressed as any of std430, std140, scalar, even with enhanced " "layouts. You can try flattening this block to support a more flexible layout."); } } void CompilerGLSL::emit_push_constant_block(const SPIRVariable &var) { if (flattened_buffer_blocks.count(var.self)) emit_buffer_block_flattened(var); else if (options.vulkan_semantics) emit_push_constant_block_vulkan(var); else if (options.emit_push_constant_as_uniform_buffer) emit_buffer_block_native(var); else emit_push_constant_block_glsl(var); } void CompilerGLSL::emit_push_constant_block_vulkan(const SPIRVariable &var) { emit_buffer_block(var); } void CompilerGLSL::emit_push_constant_block_glsl(const SPIRVariable &var) { // OpenGL has no concept of push constant blocks, implement it as a uniform struct. auto &type = get(var.basetype); unset_decoration(var.self, DecorationBinding); unset_decoration(var.self, DecorationDescriptorSet); #if 0 if (flags & ((1ull << DecorationBinding) | (1ull << DecorationDescriptorSet))) SPIRV_CROSS_THROW("Push constant blocks cannot be compiled to GLSL with Binding or Set syntax. " "Remap to location with reflection API first or disable these decorations."); #endif // We're emitting the push constant block as a regular struct, so disable the block qualifier temporarily. // Otherwise, we will end up emitting layout() qualifiers on naked structs which is not allowed. bool block_flag = has_decoration(type.self, DecorationBlock); unset_decoration(type.self, DecorationBlock); emit_struct(type); if (block_flag) set_decoration(type.self, DecorationBlock); emit_uniform(var); statement(""); } void CompilerGLSL::emit_buffer_block(const SPIRVariable &var) { auto &type = get(var.basetype); bool ubo_block = var.storage == StorageClassUniform && has_decoration(type.self, DecorationBlock); if (flattened_buffer_blocks.count(var.self)) emit_buffer_block_flattened(var); else if (is_legacy() || (!options.es && options.version == 130) || (ubo_block && options.emit_uniform_buffer_as_plain_uniforms)) emit_buffer_block_legacy(var); else emit_buffer_block_native(var); } void CompilerGLSL::emit_buffer_block_legacy(const SPIRVariable &var) { auto &type = get(var.basetype); bool ssbo = var.storage == StorageClassStorageBuffer || ir.meta[type.self].decoration.decoration_flags.get(DecorationBufferBlock); if (ssbo) SPIRV_CROSS_THROW("SSBOs not supported in legacy targets."); // We're emitting the push constant block as a regular struct, so disable the block qualifier temporarily. // Otherwise, we will end up emitting layout() qualifiers on naked structs which is not allowed. auto &block_flags = ir.meta[type.self].decoration.decoration_flags; bool block_flag = block_flags.get(DecorationBlock); block_flags.clear(DecorationBlock); emit_struct(type); if (block_flag) block_flags.set(DecorationBlock); emit_uniform(var); statement(""); } void CompilerGLSL::emit_buffer_reference_block(uint32_t type_id, bool forward_declaration) { auto &type = get(type_id); string buffer_name; if (forward_declaration) { // Block names should never alias, but from HLSL input they kind of can because block types are reused for UAVs ... // Allow aliased name since we might be declaring the block twice. Once with buffer reference (forward declared) and one proper declaration. // The names must match up. buffer_name = to_name(type.self, false); // Shaders never use the block by interface name, so we don't // have to track this other than updating name caches. // If we have a collision for any reason, just fallback immediately. if (ir.meta[type.self].decoration.alias.empty() || block_ssbo_names.find(buffer_name) != end(block_ssbo_names) || resource_names.find(buffer_name) != end(resource_names)) { buffer_name = join("_", type.self); } // Make sure we get something unique for both global name scope and block name scope. // See GLSL 4.5 spec: section 4.3.9 for details. add_variable(block_ssbo_names, resource_names, buffer_name); // If for some reason buffer_name is an illegal name, make a final fallback to a workaround name. // This cannot conflict with anything else, so we're safe now. // We cannot reuse this fallback name in neither global scope (blocked by block_names) nor block name scope. if (buffer_name.empty()) buffer_name = join("_", type.self); block_names.insert(buffer_name); block_ssbo_names.insert(buffer_name); // Ensure we emit the correct name when emitting non-forward pointer type. ir.meta[type.self].decoration.alias = buffer_name; } else if (type.basetype != SPIRType::Struct) buffer_name = type_to_glsl(type); else buffer_name = to_name(type.self, false); if (!forward_declaration) { auto itr = physical_storage_type_to_alignment.find(type_id); uint32_t alignment = 0; if (itr != physical_storage_type_to_alignment.end()) alignment = itr->second.alignment; if (type.basetype == SPIRType::Struct) { SmallVector attributes; attributes.push_back("buffer_reference"); if (alignment) attributes.push_back(join("buffer_reference_align = ", alignment)); attributes.push_back(buffer_to_packing_standard(type, true)); auto flags = ir.get_buffer_block_type_flags(type); string decorations; if (flags.get(DecorationRestrict)) decorations += " restrict"; if (flags.get(DecorationCoherent)) decorations += " coherent"; if (flags.get(DecorationNonReadable)) decorations += " writeonly"; if (flags.get(DecorationNonWritable)) decorations += " readonly"; statement("layout(", merge(attributes), ")", decorations, " buffer ", buffer_name); } else if (alignment) statement("layout(buffer_reference, buffer_reference_align = ", alignment, ") buffer ", buffer_name); else statement("layout(buffer_reference) buffer ", buffer_name); begin_scope(); if (type.basetype == SPIRType::Struct) { type.member_name_cache.clear(); uint32_t i = 0; for (auto &member : type.member_types) { add_member_name(type, i); emit_struct_member(type, member, i); i++; } } else { auto &pointee_type = get_pointee_type(type); statement(type_to_glsl(pointee_type), " value", type_to_array_glsl(pointee_type), ";"); } end_scope_decl(); statement(""); } else { statement("layout(buffer_reference) buffer ", buffer_name, ";"); } } void CompilerGLSL::emit_buffer_block_native(const SPIRVariable &var) { auto &type = get(var.basetype); Bitset flags = ir.get_buffer_block_flags(var); bool ssbo = var.storage == StorageClassStorageBuffer || var.storage == StorageClassShaderRecordBufferKHR || ir.meta[type.self].decoration.decoration_flags.get(DecorationBufferBlock); bool is_restrict = ssbo && flags.get(DecorationRestrict); bool is_writeonly = ssbo && flags.get(DecorationNonReadable); bool is_readonly = ssbo && flags.get(DecorationNonWritable); bool is_coherent = ssbo && flags.get(DecorationCoherent); // Block names should never alias, but from HLSL input they kind of can because block types are reused for UAVs ... auto buffer_name = to_name(type.self, false); auto &block_namespace = ssbo ? block_ssbo_names : block_ubo_names; // Shaders never use the block by interface name, so we don't // have to track this other than updating name caches. // If we have a collision for any reason, just fallback immediately. if (ir.meta[type.self].decoration.alias.empty() || block_namespace.find(buffer_name) != end(block_namespace) || resource_names.find(buffer_name) != end(resource_names)) { buffer_name = get_block_fallback_name(var.self); } // Make sure we get something unique for both global name scope and block name scope. // See GLSL 4.5 spec: section 4.3.9 for details. add_variable(block_namespace, resource_names, buffer_name); // If for some reason buffer_name is an illegal name, make a final fallback to a workaround name. // This cannot conflict with anything else, so we're safe now. // We cannot reuse this fallback name in neither global scope (blocked by block_names) nor block name scope. if (buffer_name.empty()) buffer_name = join("_", get(var.basetype).self, "_", var.self); block_names.insert(buffer_name); block_namespace.insert(buffer_name); // Save for post-reflection later. declared_block_names[var.self] = buffer_name; statement(layout_for_variable(var), is_coherent ? "coherent " : "", is_restrict ? "restrict " : "", is_writeonly ? "writeonly " : "", is_readonly ? "readonly " : "", ssbo ? "buffer " : "uniform ", buffer_name); begin_scope(); type.member_name_cache.clear(); uint32_t i = 0; for (auto &member : type.member_types) { add_member_name(type, i); emit_struct_member(type, member, i); i++; } // Don't declare empty blocks in GLSL, this is not allowed. if (type_is_empty(type) && !backend.supports_empty_struct) statement("int empty_struct_member;"); // var.self can be used as a backup name for the block name, // so we need to make sure we don't disturb the name here on a recompile. // It will need to be reset if we have to recompile. preserve_alias_on_reset(var.self); add_resource_name(var.self); end_scope_decl(to_name(var.self) + type_to_array_glsl(type)); statement(""); } void CompilerGLSL::emit_buffer_block_flattened(const SPIRVariable &var) { auto &type = get(var.basetype); // Block names should never alias. auto buffer_name = to_name(type.self, false); size_t buffer_size = (get_declared_struct_size(type) + 15) / 16; SPIRType::BaseType basic_type; if (get_common_basic_type(type, basic_type)) { SPIRType tmp { OpTypeVector }; tmp.basetype = basic_type; tmp.vecsize = 4; if (basic_type != SPIRType::Float && basic_type != SPIRType::Int && basic_type != SPIRType::UInt) SPIRV_CROSS_THROW("Basic types in a flattened UBO must be float, int or uint."); auto flags = ir.get_buffer_block_flags(var); statement("uniform ", flags_to_qualifiers_glsl(tmp, flags), type_to_glsl(tmp), " ", buffer_name, "[", buffer_size, "];"); } else SPIRV_CROSS_THROW("All basic types in a flattened block must be the same."); } const char *CompilerGLSL::to_storage_qualifiers_glsl(const SPIRVariable &var) { auto &execution = get_entry_point(); if (subpass_input_is_framebuffer_fetch(var.self)) return ""; if (var.storage == StorageClassInput || var.storage == StorageClassOutput) { if (is_legacy() && execution.model == ExecutionModelVertex) return var.storage == StorageClassInput ? "attribute " : "varying "; else if (is_legacy() && execution.model == ExecutionModelFragment) return "varying "; // Fragment outputs are renamed so they never hit this case. else if (execution.model == ExecutionModelFragment && var.storage == StorageClassOutput) { uint32_t loc = get_decoration(var.self, DecorationLocation); bool is_inout = location_is_framebuffer_fetch(loc); if (is_inout) return "inout "; else return "out "; } else return var.storage == StorageClassInput ? "in " : "out "; } else if (var.storage == StorageClassUniformConstant || var.storage == StorageClassUniform || var.storage == StorageClassPushConstant) { return "uniform "; } else if (var.storage == StorageClassRayPayloadKHR) { return ray_tracing_is_khr ? "rayPayloadEXT " : "rayPayloadNV "; } else if (var.storage == StorageClassIncomingRayPayloadKHR) { return ray_tracing_is_khr ? "rayPayloadInEXT " : "rayPayloadInNV "; } else if (var.storage == StorageClassHitAttributeKHR) { return ray_tracing_is_khr ? "hitAttributeEXT " : "hitAttributeNV "; } else if (var.storage == StorageClassCallableDataKHR) { return ray_tracing_is_khr ? "callableDataEXT " : "callableDataNV "; } else if (var.storage == StorageClassIncomingCallableDataKHR) { return ray_tracing_is_khr ? "callableDataInEXT " : "callableDataInNV "; } return ""; } void CompilerGLSL::emit_flattened_io_block_member(const std::string &basename, const SPIRType &type, const char *qual, const SmallVector &indices) { uint32_t member_type_id = type.self; const SPIRType *member_type = &type; const SPIRType *parent_type = nullptr; auto flattened_name = basename; for (auto &index : indices) { flattened_name += "_"; flattened_name += to_member_name(*member_type, index); parent_type = member_type; member_type_id = member_type->member_types[index]; member_type = &get(member_type_id); } assert(member_type->basetype != SPIRType::Struct); // We're overriding struct member names, so ensure we do so on the primary type. if (parent_type->type_alias) parent_type = &get(parent_type->type_alias); // Sanitize underscores because joining the two identifiers might create more than 1 underscore in a row, // which is not allowed. ParsedIR::sanitize_underscores(flattened_name); uint32_t last_index = indices.back(); // Pass in the varying qualifier here so it will appear in the correct declaration order. // Replace member name while emitting it so it encodes both struct name and member name. auto backup_name = get_member_name(parent_type->self, last_index); auto member_name = to_member_name(*parent_type, last_index); set_member_name(parent_type->self, last_index, flattened_name); emit_struct_member(*parent_type, member_type_id, last_index, qual); // Restore member name. set_member_name(parent_type->self, last_index, member_name); } void CompilerGLSL::emit_flattened_io_block_struct(const std::string &basename, const SPIRType &type, const char *qual, const SmallVector &indices) { auto sub_indices = indices; sub_indices.push_back(0); const SPIRType *member_type = &type; for (auto &index : indices) member_type = &get(member_type->member_types[index]); assert(member_type->basetype == SPIRType::Struct); if (!member_type->array.empty()) SPIRV_CROSS_THROW("Cannot flatten array of structs in I/O blocks."); for (uint32_t i = 0; i < uint32_t(member_type->member_types.size()); i++) { sub_indices.back() = i; if (get(member_type->member_types[i]).basetype == SPIRType::Struct) emit_flattened_io_block_struct(basename, type, qual, sub_indices); else emit_flattened_io_block_member(basename, type, qual, sub_indices); } } void CompilerGLSL::emit_flattened_io_block(const SPIRVariable &var, const char *qual) { auto &var_type = get(var.basetype); if (!var_type.array.empty()) SPIRV_CROSS_THROW("Array of varying structs cannot be flattened to legacy-compatible varyings."); // Emit flattened types based on the type alias. Normally, we are never supposed to emit // struct declarations for aliased types. auto &type = var_type.type_alias ? get(var_type.type_alias) : var_type; auto old_flags = ir.meta[type.self].decoration.decoration_flags; // Emit the members as if they are part of a block to get all qualifiers. ir.meta[type.self].decoration.decoration_flags.set(DecorationBlock); type.member_name_cache.clear(); SmallVector member_indices; member_indices.push_back(0); auto basename = to_name(var.self); uint32_t i = 0; for (auto &member : type.member_types) { add_member_name(type, i); auto &membertype = get(member); member_indices.back() = i; if (membertype.basetype == SPIRType::Struct) emit_flattened_io_block_struct(basename, type, qual, member_indices); else emit_flattened_io_block_member(basename, type, qual, member_indices); i++; } ir.meta[type.self].decoration.decoration_flags = old_flags; // Treat this variable as fully flattened from now on. flattened_structs[var.self] = true; } void CompilerGLSL::emit_interface_block(const SPIRVariable &var) { auto &type = get(var.basetype); if (var.storage == StorageClassInput && type.basetype == SPIRType::Double && !options.es && options.version < 410) { require_extension_internal("GL_ARB_vertex_attrib_64bit"); } // Either make it plain in/out or in/out blocks depending on what shader is doing ... bool block = ir.meta[type.self].decoration.decoration_flags.get(DecorationBlock); const char *qual = to_storage_qualifiers_glsl(var); if (block) { // ESSL earlier than 310 and GLSL earlier than 150 did not support // I/O variables which are struct types. // To support this, flatten the struct into separate varyings instead. if (options.force_flattened_io_blocks || (options.es && options.version < 310) || (!options.es && options.version < 150)) { // I/O blocks on ES require version 310 with Android Extension Pack extensions, or core version 320. // On desktop, I/O blocks were introduced with geometry shaders in GL 3.2 (GLSL 150). emit_flattened_io_block(var, qual); } else { if (options.es && options.version < 320) { // Geometry and tessellation extensions imply this extension. if (!has_extension("GL_EXT_geometry_shader") && !has_extension("GL_EXT_tessellation_shader")) require_extension_internal("GL_EXT_shader_io_blocks"); } // Workaround to make sure we can emit "patch in/out" correctly. fixup_io_block_patch_primitive_qualifiers(var); // Block names should never alias. auto block_name = to_name(type.self, false); // The namespace for I/O blocks is separate from other variables in GLSL. auto &block_namespace = type.storage == StorageClassInput ? block_input_names : block_output_names; // Shaders never use the block by interface name, so we don't // have to track this other than updating name caches. if (block_name.empty() || block_namespace.find(block_name) != end(block_namespace)) block_name = get_fallback_name(type.self); else block_namespace.insert(block_name); // If for some reason buffer_name is an illegal name, make a final fallback to a workaround name. // This cannot conflict with anything else, so we're safe now. if (block_name.empty()) block_name = join("_", get(var.basetype).self, "_", var.self); // Instance names cannot alias block names. resource_names.insert(block_name); const char *block_qualifier; if (has_decoration(var.self, DecorationPatch)) block_qualifier = "patch "; else if (has_decoration(var.self, DecorationPerPrimitiveEXT)) block_qualifier = "perprimitiveEXT "; else block_qualifier = ""; statement(layout_for_variable(var), block_qualifier, qual, block_name); begin_scope(); type.member_name_cache.clear(); uint32_t i = 0; for (auto &member : type.member_types) { add_member_name(type, i); emit_struct_member(type, member, i); i++; } add_resource_name(var.self); end_scope_decl(join(to_name(var.self), type_to_array_glsl(type))); statement(""); } } else { // ESSL earlier than 310 and GLSL earlier than 150 did not support // I/O variables which are struct types. // To support this, flatten the struct into separate varyings instead. if (type.basetype == SPIRType::Struct && (options.force_flattened_io_blocks || (options.es && options.version < 310) || (!options.es && options.version < 150))) { emit_flattened_io_block(var, qual); } else { add_resource_name(var.self); // Legacy GLSL did not support int attributes, we automatically // declare them as float and cast them on load/store SPIRType newtype = type; if (is_legacy() && var.storage == StorageClassInput && type.basetype == SPIRType::Int) newtype.basetype = SPIRType::Float; // Tessellation control and evaluation shaders must have either // gl_MaxPatchVertices or unsized arrays for input arrays. // Opt for unsized as it's the more "correct" variant to use. if (type.storage == StorageClassInput && !type.array.empty() && !has_decoration(var.self, DecorationPatch) && (get_entry_point().model == ExecutionModelTessellationControl || get_entry_point().model == ExecutionModelTessellationEvaluation)) { newtype.array.back() = 0; newtype.array_size_literal.back() = true; } statement(layout_for_variable(var), to_qualifiers_glsl(var.self), variable_decl(newtype, to_name(var.self), var.self), ";"); } } } void CompilerGLSL::emit_uniform(const SPIRVariable &var) { auto &type = get(var.basetype); if (type.basetype == SPIRType::Image && type.image.sampled == 2 && type.image.dim != DimSubpassData) { if (!options.es && options.version < 420) require_extension_internal("GL_ARB_shader_image_load_store"); else if (options.es && options.version < 310) SPIRV_CROSS_THROW("At least ESSL 3.10 required for shader image load store."); } add_resource_name(var.self); statement(layout_for_variable(var), variable_decl(var), ";"); } string CompilerGLSL::constant_value_macro_name(uint32_t id) { return join("SPIRV_CROSS_CONSTANT_ID_", id); } void CompilerGLSL::emit_specialization_constant_op(const SPIRConstantOp &constant) { auto &type = get(constant.basetype); // This will break. It is bogus and should not be legal. if (type_is_top_level_block(type)) return; add_resource_name(constant.self); auto name = to_name(constant.self); statement("const ", variable_decl(type, name), " = ", constant_op_expression(constant), ";"); } int CompilerGLSL::get_constant_mapping_to_workgroup_component(const SPIRConstant &c) const { auto &entry_point = get_entry_point(); int index = -1; // Need to redirect specialization constants which are used as WorkGroupSize to the builtin, // since the spec constant declarations are never explicitly declared. if (entry_point.workgroup_size.constant == 0 && entry_point.flags.get(ExecutionModeLocalSizeId)) { if (c.self == entry_point.workgroup_size.id_x) index = 0; else if (c.self == entry_point.workgroup_size.id_y) index = 1; else if (c.self == entry_point.workgroup_size.id_z) index = 2; } return index; } void CompilerGLSL::emit_constant(const SPIRConstant &constant) { auto &type = get(constant.constant_type); // This will break. It is bogus and should not be legal. if (type_is_top_level_block(type)) return; SpecializationConstant wg_x, wg_y, wg_z; ID workgroup_size_id = get_work_group_size_specialization_constants(wg_x, wg_y, wg_z); // This specialization constant is implicitly declared by emitting layout() in; if (constant.self == workgroup_size_id) return; // These specialization constants are implicitly declared by emitting layout() in; // In legacy GLSL, we will still need to emit macros for these, so a layout() in; declaration // later can use macro overrides for work group size. bool is_workgroup_size_constant = ConstantID(constant.self) == wg_x.id || ConstantID(constant.self) == wg_y.id || ConstantID(constant.self) == wg_z.id; if (options.vulkan_semantics && is_workgroup_size_constant) { // Vulkan GLSL does not need to declare workgroup spec constants explicitly, it is handled in layout(). return; } else if (!options.vulkan_semantics && is_workgroup_size_constant && !has_decoration(constant.self, DecorationSpecId)) { // Only bother declaring a workgroup size if it is actually a specialization constant, because we need macros. return; } add_resource_name(constant.self); auto name = to_name(constant.self); // Only scalars have constant IDs. if (has_decoration(constant.self, DecorationSpecId)) { if (options.vulkan_semantics) { statement("layout(constant_id = ", get_decoration(constant.self, DecorationSpecId), ") const ", variable_decl(type, name), " = ", constant_expression(constant), ";"); } else { const string ¯o_name = constant.specialization_constant_macro_name; statement("#ifndef ", macro_name); statement("#define ", macro_name, " ", constant_expression(constant)); statement("#endif"); // For workgroup size constants, only emit the macros. if (!is_workgroup_size_constant) statement("const ", variable_decl(type, name), " = ", macro_name, ";"); } } else { statement("const ", variable_decl(type, name), " = ", constant_expression(constant), ";"); } } void CompilerGLSL::emit_entry_point_declarations() { } void CompilerGLSL::replace_illegal_names(const unordered_set &keywords) { ir.for_each_typed_id([&](uint32_t, const SPIRVariable &var) { if (is_hidden_variable(var)) return; auto *meta = ir.find_meta(var.self); if (!meta) return; auto &m = meta->decoration; if (keywords.find(m.alias) != end(keywords)) m.alias = join("_", m.alias); }); ir.for_each_typed_id([&](uint32_t, const SPIRFunction &func) { auto *meta = ir.find_meta(func.self); if (!meta) return; auto &m = meta->decoration; if (keywords.find(m.alias) != end(keywords)) m.alias = join("_", m.alias); }); ir.for_each_typed_id([&](uint32_t, const SPIRType &type) { auto *meta = ir.find_meta(type.self); if (!meta) return; auto &m = meta->decoration; if (keywords.find(m.alias) != end(keywords)) m.alias = join("_", m.alias); for (auto &memb : meta->members) if (keywords.find(memb.alias) != end(keywords)) memb.alias = join("_", memb.alias); }); } void CompilerGLSL::replace_illegal_names() { // clang-format off static const unordered_set keywords = { "abs", "acos", "acosh", "all", "any", "asin", "asinh", "atan", "atanh", "atomicAdd", "atomicCompSwap", "atomicCounter", "atomicCounterDecrement", "atomicCounterIncrement", "atomicExchange", "atomicMax", "atomicMin", "atomicOr", "atomicXor", "bitCount", "bitfieldExtract", "bitfieldInsert", "bitfieldReverse", "ceil", "cos", "cosh", "cross", "degrees", "dFdx", "dFdxCoarse", "dFdxFine", "dFdy", "dFdyCoarse", "dFdyFine", "distance", "dot", "EmitStreamVertex", "EmitVertex", "EndPrimitive", "EndStreamPrimitive", "equal", "exp", "exp2", "faceforward", "findLSB", "findMSB", "float16BitsToInt16", "float16BitsToUint16", "floatBitsToInt", "floatBitsToUint", "floor", "fma", "fract", "frexp", "fwidth", "fwidthCoarse", "fwidthFine", "greaterThan", "greaterThanEqual", "groupMemoryBarrier", "imageAtomicAdd", "imageAtomicAnd", "imageAtomicCompSwap", "imageAtomicExchange", "imageAtomicMax", "imageAtomicMin", "imageAtomicOr", "imageAtomicXor", "imageLoad", "imageSamples", "imageSize", "imageStore", "imulExtended", "int16BitsToFloat16", "intBitsToFloat", "interpolateAtOffset", "interpolateAtCentroid", "interpolateAtSample", "inverse", "inversesqrt", "isinf", "isnan", "ldexp", "length", "lessThan", "lessThanEqual", "log", "log2", "matrixCompMult", "max", "memoryBarrier", "memoryBarrierAtomicCounter", "memoryBarrierBuffer", "memoryBarrierImage", "memoryBarrierShared", "min", "mix", "mod", "modf", "noise", "noise1", "noise2", "noise3", "noise4", "normalize", "not", "notEqual", "outerProduct", "packDouble2x32", "packHalf2x16", "packInt2x16", "packInt4x16", "packSnorm2x16", "packSnorm4x8", "packUint2x16", "packUint4x16", "packUnorm2x16", "packUnorm4x8", "pow", "radians", "reflect", "refract", "round", "roundEven", "sign", "sin", "sinh", "smoothstep", "sqrt", "step", "tan", "tanh", "texelFetch", "texelFetchOffset", "texture", "textureGather", "textureGatherOffset", "textureGatherOffsets", "textureGrad", "textureGradOffset", "textureLod", "textureLodOffset", "textureOffset", "textureProj", "textureProjGrad", "textureProjGradOffset", "textureProjLod", "textureProjLodOffset", "textureProjOffset", "textureQueryLevels", "textureQueryLod", "textureSamples", "textureSize", "transpose", "trunc", "uaddCarry", "uint16BitsToFloat16", "uintBitsToFloat", "umulExtended", "unpackDouble2x32", "unpackHalf2x16", "unpackInt2x16", "unpackInt4x16", "unpackSnorm2x16", "unpackSnorm4x8", "unpackUint2x16", "unpackUint4x16", "unpackUnorm2x16", "unpackUnorm4x8", "usubBorrow", "active", "asm", "atomic_uint", "attribute", "bool", "break", "buffer", "bvec2", "bvec3", "bvec4", "case", "cast", "centroid", "class", "coherent", "common", "const", "continue", "default", "discard", "dmat2", "dmat2x2", "dmat2x3", "dmat2x4", "dmat3", "dmat3x2", "dmat3x3", "dmat3x4", "dmat4", "dmat4x2", "dmat4x3", "dmat4x4", "do", "double", "dvec2", "dvec3", "dvec4", "else", "enum", "extern", "external", "false", "filter", "fixed", "flat", "float", "for", "fvec2", "fvec3", "fvec4", "goto", "half", "highp", "hvec2", "hvec3", "hvec4", "if", "iimage1D", "iimage1DArray", "iimage2D", "iimage2DArray", "iimage2DMS", "iimage2DMSArray", "iimage2DRect", "iimage3D", "iimageBuffer", "iimageCube", "iimageCubeArray", "image1D", "image1DArray", "image2D", "image2DArray", "image2DMS", "image2DMSArray", "image2DRect", "image3D", "imageBuffer", "imageCube", "imageCubeArray", "in", "inline", "inout", "input", "int", "interface", "invariant", "isampler1D", "isampler1DArray", "isampler2D", "isampler2DArray", "isampler2DMS", "isampler2DMSArray", "isampler2DRect", "isampler3D", "isamplerBuffer", "isamplerCube", "isamplerCubeArray", "ivec2", "ivec3", "ivec4", "layout", "long", "lowp", "mat2", "mat2x2", "mat2x3", "mat2x4", "mat3", "mat3x2", "mat3x3", "mat3x4", "mat4", "mat4x2", "mat4x3", "mat4x4", "mediump", "namespace", "noinline", "noperspective", "out", "output", "packed", "partition", "patch", "precise", "precision", "public", "readonly", "resource", "restrict", "return", "sample", "sampler1D", "sampler1DArray", "sampler1DArrayShadow", "sampler1DShadow", "sampler2D", "sampler2DArray", "sampler2DArrayShadow", "sampler2DMS", "sampler2DMSArray", "sampler2DRect", "sampler2DRectShadow", "sampler2DShadow", "sampler3D", "sampler3DRect", "samplerBuffer", "samplerCube", "samplerCubeArray", "samplerCubeArrayShadow", "samplerCubeShadow", "shared", "short", "sizeof", "smooth", "static", "struct", "subroutine", "superp", "switch", "template", "this", "true", "typedef", "uimage1D", "uimage1DArray", "uimage2D", "uimage2DArray", "uimage2DMS", "uimage2DMSArray", "uimage2DRect", "uimage3D", "uimageBuffer", "uimageCube", "uimageCubeArray", "uint", "uniform", "union", "unsigned", "usampler1D", "usampler1DArray", "usampler2D", "usampler2DArray", "usampler2DMS", "usampler2DMSArray", "usampler2DRect", "usampler3D", "usamplerBuffer", "usamplerCube", "usamplerCubeArray", "using", "uvec2", "uvec3", "uvec4", "varying", "vec2", "vec3", "vec4", "void", "volatile", "while", "writeonly", }; // clang-format on replace_illegal_names(keywords); } void CompilerGLSL::replace_fragment_output(SPIRVariable &var) { auto &m = ir.meta[var.self].decoration; uint32_t location = 0; if (m.decoration_flags.get(DecorationLocation)) location = m.location; // If our variable is arrayed, we must not emit the array part of this as the SPIR-V will // do the access chain part of this for us. auto &type = get(var.basetype); if (type.array.empty()) { // Redirect the write to a specific render target in legacy GLSL. m.alias = join("gl_FragData[", location, "]"); if (is_legacy_es() && location != 0) require_extension_internal("GL_EXT_draw_buffers"); } else if (type.array.size() == 1) { // If location is non-zero, we probably have to add an offset. // This gets really tricky since we'd have to inject an offset in the access chain. // FIXME: This seems like an extremely odd-ball case, so it's probably fine to leave it like this for now. m.alias = "gl_FragData"; if (location != 0) SPIRV_CROSS_THROW("Arrayed output variable used, but location is not 0. " "This is unimplemented in SPIRV-Cross."); if (is_legacy_es()) require_extension_internal("GL_EXT_draw_buffers"); } else SPIRV_CROSS_THROW("Array-of-array output variable used. This cannot be implemented in legacy GLSL."); var.compat_builtin = true; // We don't want to declare this variable, but use the name as-is. } void CompilerGLSL::replace_fragment_outputs() { ir.for_each_typed_id([&](uint32_t, SPIRVariable &var) { auto &type = this->get(var.basetype); if (!is_builtin_variable(var) && !var.remapped_variable && type.pointer && var.storage == StorageClassOutput) replace_fragment_output(var); }); } string CompilerGLSL::remap_swizzle(const SPIRType &out_type, uint32_t input_components, const string &expr) { if (out_type.vecsize == input_components) return expr; else if (input_components == 1 && !backend.can_swizzle_scalar) return join(type_to_glsl(out_type), "(", expr, ")"); else { // FIXME: This will not work with packed expressions. auto e = enclose_expression(expr) + "."; // Just clamp the swizzle index if we have more outputs than inputs. for (uint32_t c = 0; c < out_type.vecsize; c++) e += index_to_swizzle(min(c, input_components - 1)); if (backend.swizzle_is_function && out_type.vecsize > 1) e += "()"; remove_duplicate_swizzle(e); return e; } } void CompilerGLSL::emit_pls() { auto &execution = get_entry_point(); if (execution.model != ExecutionModelFragment) SPIRV_CROSS_THROW("Pixel local storage only supported in fragment shaders."); if (!options.es) SPIRV_CROSS_THROW("Pixel local storage only supported in OpenGL ES."); if (options.version < 300) SPIRV_CROSS_THROW("Pixel local storage only supported in ESSL 3.0 and above."); if (!pls_inputs.empty()) { statement("__pixel_local_inEXT _PLSIn"); begin_scope(); for (auto &input : pls_inputs) statement(pls_decl(input), ";"); end_scope_decl(); statement(""); } if (!pls_outputs.empty()) { statement("__pixel_local_outEXT _PLSOut"); begin_scope(); for (auto &output : pls_outputs) statement(pls_decl(output), ";"); end_scope_decl(); statement(""); } } void CompilerGLSL::fixup_image_load_store_access() { if (!options.enable_storage_image_qualifier_deduction) return; ir.for_each_typed_id([&](uint32_t var, const SPIRVariable &) { auto &vartype = expression_type(var); if (vartype.basetype == SPIRType::Image && vartype.image.sampled == 2) { // Very old glslangValidator and HLSL compilers do not emit required qualifiers here. // Solve this by making the image access as restricted as possible and loosen up if we need to. // If any no-read/no-write flags are actually set, assume that the compiler knows what it's doing. if (!has_decoration(var, DecorationNonWritable) && !has_decoration(var, DecorationNonReadable)) { set_decoration(var, DecorationNonWritable); set_decoration(var, DecorationNonReadable); } } }); } static bool is_block_builtin(BuiltIn builtin) { return builtin == BuiltInPosition || builtin == BuiltInPointSize || builtin == BuiltInClipDistance || builtin == BuiltInCullDistance; } bool CompilerGLSL::should_force_emit_builtin_block(StorageClass storage) { // If the builtin block uses XFB, we need to force explicit redeclaration of the builtin block. if (storage != StorageClassOutput) return false; bool should_force = false; ir.for_each_typed_id([&](uint32_t, SPIRVariable &var) { if (should_force) return; auto &type = this->get(var.basetype); bool block = has_decoration(type.self, DecorationBlock); if (var.storage == storage && block && is_builtin_variable(var)) { uint32_t member_count = uint32_t(type.member_types.size()); for (uint32_t i = 0; i < member_count; i++) { if (has_member_decoration(type.self, i, DecorationBuiltIn) && is_block_builtin(BuiltIn(get_member_decoration(type.self, i, DecorationBuiltIn))) && has_member_decoration(type.self, i, DecorationOffset)) { should_force = true; } } } else if (var.storage == storage && !block && is_builtin_variable(var)) { if (is_block_builtin(BuiltIn(get_decoration(type.self, DecorationBuiltIn))) && has_decoration(var.self, DecorationOffset)) { should_force = true; } } }); // If we're declaring clip/cull planes with control points we need to force block declaration. if ((get_execution_model() == ExecutionModelTessellationControl || get_execution_model() == ExecutionModelMeshEXT) && (clip_distance_count || cull_distance_count)) { should_force = true; } // Either glslang bug or oversight, but global invariant position does not work in mesh shaders. if (get_execution_model() == ExecutionModelMeshEXT && position_invariant) should_force = true; return should_force; } void CompilerGLSL::fixup_implicit_builtin_block_names(ExecutionModel model) { ir.for_each_typed_id([&](uint32_t, SPIRVariable &var) { auto &type = this->get(var.basetype); bool block = has_decoration(type.self, DecorationBlock); if ((var.storage == StorageClassOutput || var.storage == StorageClassInput) && block && is_builtin_variable(var)) { if (model != ExecutionModelMeshEXT) { // Make sure the array has a supported name in the code. if (var.storage == StorageClassOutput) set_name(var.self, "gl_out"); else if (var.storage == StorageClassInput) set_name(var.self, "gl_in"); } else { auto flags = get_buffer_block_flags(var.self); if (flags.get(DecorationPerPrimitiveEXT)) { set_name(var.self, "gl_MeshPrimitivesEXT"); set_name(type.self, "gl_MeshPerPrimitiveEXT"); } else { set_name(var.self, "gl_MeshVerticesEXT"); set_name(type.self, "gl_MeshPerVertexEXT"); } } } if (model == ExecutionModelMeshEXT && var.storage == StorageClassOutput && !block) { auto *m = ir.find_meta(var.self); if (m && m->decoration.builtin) { auto builtin_type = m->decoration.builtin_type; if (builtin_type == BuiltInPrimitivePointIndicesEXT) set_name(var.self, "gl_PrimitivePointIndicesEXT"); else if (builtin_type == BuiltInPrimitiveLineIndicesEXT) set_name(var.self, "gl_PrimitiveLineIndicesEXT"); else if (builtin_type == BuiltInPrimitiveTriangleIndicesEXT) set_name(var.self, "gl_PrimitiveTriangleIndicesEXT"); } } }); } void CompilerGLSL::emit_declared_builtin_block(StorageClass storage, ExecutionModel model) { Bitset emitted_builtins; Bitset global_builtins; const SPIRVariable *block_var = nullptr; bool emitted_block = false; // Need to use declared size in the type. // These variables might have been declared, but not statically used, so we haven't deduced their size yet. uint32_t cull_distance_size = 0; uint32_t clip_distance_size = 0; bool have_xfb_buffer_stride = false; bool have_geom_stream = false; bool have_any_xfb_offset = false; uint32_t xfb_stride = 0, xfb_buffer = 0, geom_stream = 0; std::unordered_map builtin_xfb_offsets; const auto builtin_is_per_vertex_set = [](BuiltIn builtin) -> bool { return builtin == BuiltInPosition || builtin == BuiltInPointSize || builtin == BuiltInClipDistance || builtin == BuiltInCullDistance; }; ir.for_each_typed_id([&](uint32_t, SPIRVariable &var) { auto &type = this->get(var.basetype); bool block = has_decoration(type.self, DecorationBlock); Bitset builtins; if (var.storage == storage && block && is_builtin_variable(var)) { uint32_t index = 0; for (auto &m : ir.meta[type.self].members) { if (m.builtin && builtin_is_per_vertex_set(m.builtin_type)) { builtins.set(m.builtin_type); if (m.builtin_type == BuiltInCullDistance) cull_distance_size = to_array_size_literal(this->get(type.member_types[index])); else if (m.builtin_type == BuiltInClipDistance) clip_distance_size = to_array_size_literal(this->get(type.member_types[index])); if (is_block_builtin(m.builtin_type) && m.decoration_flags.get(DecorationOffset)) { have_any_xfb_offset = true; builtin_xfb_offsets[m.builtin_type] = m.offset; } if (is_block_builtin(m.builtin_type) && m.decoration_flags.get(DecorationStream)) { uint32_t stream = m.stream; if (have_geom_stream && geom_stream != stream) SPIRV_CROSS_THROW("IO block member Stream mismatch."); have_geom_stream = true; geom_stream = stream; } } index++; } if (storage == StorageClassOutput && has_decoration(var.self, DecorationXfbBuffer) && has_decoration(var.self, DecorationXfbStride)) { uint32_t buffer_index = get_decoration(var.self, DecorationXfbBuffer); uint32_t stride = get_decoration(var.self, DecorationXfbStride); if (have_xfb_buffer_stride && buffer_index != xfb_buffer) SPIRV_CROSS_THROW("IO block member XfbBuffer mismatch."); if (have_xfb_buffer_stride && stride != xfb_stride) SPIRV_CROSS_THROW("IO block member XfbBuffer mismatch."); have_xfb_buffer_stride = true; xfb_buffer = buffer_index; xfb_stride = stride; } if (storage == StorageClassOutput && has_decoration(var.self, DecorationStream)) { uint32_t stream = get_decoration(var.self, DecorationStream); if (have_geom_stream && geom_stream != stream) SPIRV_CROSS_THROW("IO block member Stream mismatch."); have_geom_stream = true; geom_stream = stream; } } else if (var.storage == storage && !block && is_builtin_variable(var)) { // While we're at it, collect all declared global builtins (HLSL mostly ...). auto &m = ir.meta[var.self].decoration; if (m.builtin && builtin_is_per_vertex_set(m.builtin_type)) { // For mesh/tesc output, Clip/Cull is an array-of-array. Look at innermost array type // for correct result. global_builtins.set(m.builtin_type); if (m.builtin_type == BuiltInCullDistance) cull_distance_size = to_array_size_literal(type, 0); else if (m.builtin_type == BuiltInClipDistance) clip_distance_size = to_array_size_literal(type, 0); if (is_block_builtin(m.builtin_type) && m.decoration_flags.get(DecorationXfbStride) && m.decoration_flags.get(DecorationXfbBuffer) && m.decoration_flags.get(DecorationOffset)) { have_any_xfb_offset = true; builtin_xfb_offsets[m.builtin_type] = m.offset; uint32_t buffer_index = m.xfb_buffer; uint32_t stride = m.xfb_stride; if (have_xfb_buffer_stride && buffer_index != xfb_buffer) SPIRV_CROSS_THROW("IO block member XfbBuffer mismatch."); if (have_xfb_buffer_stride && stride != xfb_stride) SPIRV_CROSS_THROW("IO block member XfbBuffer mismatch."); have_xfb_buffer_stride = true; xfb_buffer = buffer_index; xfb_stride = stride; } if (is_block_builtin(m.builtin_type) && m.decoration_flags.get(DecorationStream)) { uint32_t stream = get_decoration(var.self, DecorationStream); if (have_geom_stream && geom_stream != stream) SPIRV_CROSS_THROW("IO block member Stream mismatch."); have_geom_stream = true; geom_stream = stream; } } } if (builtins.empty()) return; if (emitted_block) SPIRV_CROSS_THROW("Cannot use more than one builtin I/O block."); emitted_builtins = builtins; emitted_block = true; block_var = &var; }); global_builtins = Bitset(global_builtins.get_lower() & ((1ull << BuiltInPosition) | (1ull << BuiltInPointSize) | (1ull << BuiltInClipDistance) | (1ull << BuiltInCullDistance))); // Try to collect all other declared builtins. if (!emitted_block) emitted_builtins = global_builtins; // Can't declare an empty interface block. if (emitted_builtins.empty()) return; if (storage == StorageClassOutput) { SmallVector attr; if (have_xfb_buffer_stride && have_any_xfb_offset) { if (!options.es) { if (options.version < 440 && options.version >= 140) require_extension_internal("GL_ARB_enhanced_layouts"); else if (options.version < 140) SPIRV_CROSS_THROW("Component decoration is not supported in targets below GLSL 1.40."); if (!options.es && options.version < 440) require_extension_internal("GL_ARB_enhanced_layouts"); } else if (options.es) SPIRV_CROSS_THROW("Need GL_ARB_enhanced_layouts for xfb_stride or xfb_buffer."); attr.push_back(join("xfb_buffer = ", xfb_buffer, ", xfb_stride = ", xfb_stride)); } if (have_geom_stream) { if (get_execution_model() != ExecutionModelGeometry) SPIRV_CROSS_THROW("Geometry streams can only be used in geometry shaders."); if (options.es) SPIRV_CROSS_THROW("Multiple geometry streams not supported in ESSL."); if (options.version < 400) require_extension_internal("GL_ARB_transform_feedback3"); attr.push_back(join("stream = ", geom_stream)); } if (model == ExecutionModelMeshEXT) statement("out gl_MeshPerVertexEXT"); else if (!attr.empty()) statement("layout(", merge(attr), ") out gl_PerVertex"); else statement("out gl_PerVertex"); } else { // If we have passthrough, there is no way PerVertex cannot be passthrough. if (get_entry_point().geometry_passthrough) statement("layout(passthrough) in gl_PerVertex"); else statement("in gl_PerVertex"); } begin_scope(); if (emitted_builtins.get(BuiltInPosition)) { auto itr = builtin_xfb_offsets.find(BuiltInPosition); if (itr != end(builtin_xfb_offsets)) statement("layout(xfb_offset = ", itr->second, ") vec4 gl_Position;"); else if (position_invariant) statement("invariant vec4 gl_Position;"); else statement("vec4 gl_Position;"); } if (emitted_builtins.get(BuiltInPointSize)) { auto itr = builtin_xfb_offsets.find(BuiltInPointSize); if (itr != end(builtin_xfb_offsets)) statement("layout(xfb_offset = ", itr->second, ") float gl_PointSize;"); else statement("float gl_PointSize;"); } if (emitted_builtins.get(BuiltInClipDistance)) { auto itr = builtin_xfb_offsets.find(BuiltInClipDistance); if (itr != end(builtin_xfb_offsets)) statement("layout(xfb_offset = ", itr->second, ") float gl_ClipDistance[", clip_distance_size, "];"); else statement("float gl_ClipDistance[", clip_distance_size, "];"); } if (emitted_builtins.get(BuiltInCullDistance)) { auto itr = builtin_xfb_offsets.find(BuiltInCullDistance); if (itr != end(builtin_xfb_offsets)) statement("layout(xfb_offset = ", itr->second, ") float gl_CullDistance[", cull_distance_size, "];"); else statement("float gl_CullDistance[", cull_distance_size, "];"); } bool builtin_array = model == ExecutionModelTessellationControl || (model == ExecutionModelMeshEXT && storage == StorageClassOutput) || (model == ExecutionModelGeometry && storage == StorageClassInput) || (model == ExecutionModelTessellationEvaluation && storage == StorageClassInput); if (builtin_array) { const char *instance_name; if (model == ExecutionModelMeshEXT) instance_name = "gl_MeshVerticesEXT"; // Per primitive is never synthesized. else instance_name = storage == StorageClassInput ? "gl_in" : "gl_out"; if (model == ExecutionModelTessellationControl && storage == StorageClassOutput) end_scope_decl(join(instance_name, "[", get_entry_point().output_vertices, "]")); else end_scope_decl(join(instance_name, "[]")); } else end_scope_decl(); statement(""); } bool CompilerGLSL::variable_is_lut(const SPIRVariable &var) const { bool statically_assigned = var.statically_assigned && var.static_expression != ID(0) && var.remapped_variable; if (statically_assigned) { auto *constant = maybe_get(var.static_expression); if (constant && constant->is_used_as_lut) return true; } return false; } void CompilerGLSL::emit_resources() { auto &execution = get_entry_point(); replace_illegal_names(); // Legacy GL uses gl_FragData[], redeclare all fragment outputs // with builtins. if (execution.model == ExecutionModelFragment && is_legacy()) replace_fragment_outputs(); // Emit PLS blocks if we have such variables. if (!pls_inputs.empty() || !pls_outputs.empty()) emit_pls(); switch (execution.model) { case ExecutionModelGeometry: case ExecutionModelTessellationControl: case ExecutionModelTessellationEvaluation: case ExecutionModelMeshEXT: fixup_implicit_builtin_block_names(execution.model); break; default: break; } bool global_invariant_position = position_invariant && (options.es || options.version >= 120); // Emit custom gl_PerVertex for SSO compatibility. if (options.separate_shader_objects && !options.es && execution.model != ExecutionModelFragment) { switch (execution.model) { case ExecutionModelGeometry: case ExecutionModelTessellationControl: case ExecutionModelTessellationEvaluation: emit_declared_builtin_block(StorageClassInput, execution.model); emit_declared_builtin_block(StorageClassOutput, execution.model); global_invariant_position = false; break; case ExecutionModelVertex: case ExecutionModelMeshEXT: emit_declared_builtin_block(StorageClassOutput, execution.model); global_invariant_position = false; break; default: break; } } else if (should_force_emit_builtin_block(StorageClassOutput)) { emit_declared_builtin_block(StorageClassOutput, execution.model); global_invariant_position = false; } else if (execution.geometry_passthrough) { // Need to declare gl_in with Passthrough. // If we're doing passthrough, we cannot emit an output block, so the output block test above will never pass. emit_declared_builtin_block(StorageClassInput, execution.model); } else { // Need to redeclare clip/cull distance with explicit size to use them. // SPIR-V mandates these builtins have a size declared. const char *storage = execution.model == ExecutionModelFragment ? "in" : "out"; if (clip_distance_count != 0) statement(storage, " float gl_ClipDistance[", clip_distance_count, "];"); if (cull_distance_count != 0) statement(storage, " float gl_CullDistance[", cull_distance_count, "];"); if (clip_distance_count != 0 || cull_distance_count != 0) statement(""); } if (global_invariant_position) { statement("invariant gl_Position;"); statement(""); } bool emitted = false; // If emitted Vulkan GLSL, // emit specialization constants as actual floats, // spec op expressions will redirect to the constant name. // { auto loop_lock = ir.create_loop_hard_lock(); for (auto &id_ : ir.ids_for_constant_undef_or_type) { auto &id = ir.ids[id_]; // Skip declaring any bogus constants or undefs which use block types. // We don't declare block types directly, so this will never work. // Should not be legal SPIR-V, so this is considered a workaround. if (id.get_type() == TypeConstant) { auto &c = id.get(); bool needs_declaration = c.specialization || c.is_used_as_lut; if (needs_declaration) { if (!options.vulkan_semantics && c.specialization) { c.specialization_constant_macro_name = constant_value_macro_name(get_decoration(c.self, DecorationSpecId)); } emit_constant(c); emitted = true; } } else if (id.get_type() == TypeConstantOp) { emit_specialization_constant_op(id.get()); emitted = true; } else if (id.get_type() == TypeType) { auto *type = &id.get(); bool is_natural_struct = type->basetype == SPIRType::Struct && type->array.empty() && !type->pointer && (!has_decoration(type->self, DecorationBlock) && !has_decoration(type->self, DecorationBufferBlock)); // Special case, ray payload and hit attribute blocks are not really blocks, just regular structs. if (type->basetype == SPIRType::Struct && type->pointer && has_decoration(type->self, DecorationBlock) && (type->storage == StorageClassRayPayloadKHR || type->storage == StorageClassIncomingRayPayloadKHR || type->storage == StorageClassHitAttributeKHR)) { type = &get(type->parent_type); is_natural_struct = true; } if (is_natural_struct) { if (emitted) statement(""); emitted = false; emit_struct(*type); } } else if (id.get_type() == TypeUndef) { auto &undef = id.get(); auto &type = this->get(undef.basetype); // OpUndef can be void for some reason ... if (type.basetype == SPIRType::Void) return; // This will break. It is bogus and should not be legal. if (type_is_top_level_block(type)) return; string initializer; if (options.force_zero_initialized_variables && type_can_zero_initialize(type)) initializer = join(" = ", to_zero_initialized_expression(undef.basetype)); // FIXME: If used in a constant, we must declare it as one. statement(variable_decl(type, to_name(undef.self), undef.self), initializer, ";"); emitted = true; } } } if (emitted) statement(""); // If we needed to declare work group size late, check here. // If the work group size depends on a specialization constant, we need to declare the layout() block // after constants (and their macros) have been declared. if (execution.model == ExecutionModelGLCompute && !options.vulkan_semantics && (execution.workgroup_size.constant != 0 || execution.flags.get(ExecutionModeLocalSizeId))) { SpecializationConstant wg_x, wg_y, wg_z; get_work_group_size_specialization_constants(wg_x, wg_y, wg_z); if ((wg_x.id != ConstantID(0)) || (wg_y.id != ConstantID(0)) || (wg_z.id != ConstantID(0))) { SmallVector inputs; build_workgroup_size(inputs, wg_x, wg_y, wg_z); statement("layout(", merge(inputs), ") in;"); statement(""); } } emitted = false; if (ir.addressing_model == AddressingModelPhysicalStorageBuffer64EXT) { for (auto type : physical_storage_non_block_pointer_types) { emit_buffer_reference_block(type, false); } // Output buffer reference blocks. // Do this in two stages, one with forward declaration, // and one without. Buffer reference blocks can reference themselves // to support things like linked lists. ir.for_each_typed_id([&](uint32_t self, SPIRType &type) { if (type.basetype == SPIRType::Struct && type.pointer && type.pointer_depth == 1 && !type_is_array_of_pointers(type) && type.storage == StorageClassPhysicalStorageBufferEXT) { emit_buffer_reference_block(self, true); } }); ir.for_each_typed_id([&](uint32_t self, SPIRType &type) { if (type.basetype == SPIRType::Struct && type.pointer && type.pointer_depth == 1 && !type_is_array_of_pointers(type) && type.storage == StorageClassPhysicalStorageBufferEXT) { emit_buffer_reference_block(self, false); } }); } // Output UBOs and SSBOs ir.for_each_typed_id([&](uint32_t, SPIRVariable &var) { auto &type = this->get(var.basetype); bool is_block_storage = type.storage == StorageClassStorageBuffer || type.storage == StorageClassUniform || type.storage == StorageClassShaderRecordBufferKHR; bool has_block_flags = ir.meta[type.self].decoration.decoration_flags.get(DecorationBlock) || ir.meta[type.self].decoration.decoration_flags.get(DecorationBufferBlock); if (var.storage != StorageClassFunction && type.pointer && is_block_storage && !is_hidden_variable(var) && has_block_flags) { emit_buffer_block(var); } }); // Output push constant blocks ir.for_each_typed_id([&](uint32_t, SPIRVariable &var) { auto &type = this->get(var.basetype); if (var.storage != StorageClassFunction && type.pointer && type.storage == StorageClassPushConstant && !is_hidden_variable(var)) { emit_push_constant_block(var); } }); bool skip_separate_image_sampler = !combined_image_samplers.empty() || !options.vulkan_semantics; // Output Uniform Constants (values, samplers, images, etc). ir.for_each_typed_id([&](uint32_t, SPIRVariable &var) { auto &type = this->get(var.basetype); // If we're remapping separate samplers and images, only emit the combined samplers. if (skip_separate_image_sampler) { // Sampler buffers are always used without a sampler, and they will also work in regular GL. bool sampler_buffer = type.basetype == SPIRType::Image && type.image.dim == DimBuffer; bool separate_image = type.basetype == SPIRType::Image && type.image.sampled == 1; bool separate_sampler = type.basetype == SPIRType::Sampler; if (!sampler_buffer && (separate_image || separate_sampler)) return; } if (var.storage != StorageClassFunction && type.pointer && (type.storage == StorageClassUniformConstant || type.storage == StorageClassAtomicCounter || type.storage == StorageClassRayPayloadKHR || type.storage == StorageClassIncomingRayPayloadKHR || type.storage == StorageClassCallableDataKHR || type.storage == StorageClassIncomingCallableDataKHR || type.storage == StorageClassHitAttributeKHR) && !is_hidden_variable(var)) { emit_uniform(var); emitted = true; } }); if (emitted) statement(""); emitted = false; bool emitted_base_instance = false; // Output in/out interfaces. ir.for_each_typed_id([&](uint32_t, SPIRVariable &var) { auto &type = this->get(var.basetype); bool is_hidden = is_hidden_variable(var); // Unused output I/O variables might still be required to implement framebuffer fetch. if (var.storage == StorageClassOutput && !is_legacy() && location_is_framebuffer_fetch(get_decoration(var.self, DecorationLocation)) != 0) { is_hidden = false; } if (var.storage != StorageClassFunction && type.pointer && (var.storage == StorageClassInput || var.storage == StorageClassOutput) && interface_variable_exists_in_entry_point(var.self) && !is_hidden) { if (options.es && get_execution_model() == ExecutionModelVertex && var.storage == StorageClassInput && type.array.size() == 1) { SPIRV_CROSS_THROW("OpenGL ES doesn't support array input variables in vertex shader."); } emit_interface_block(var); emitted = true; } else if (is_builtin_variable(var)) { auto builtin = BuiltIn(get_decoration(var.self, DecorationBuiltIn)); // For gl_InstanceIndex emulation on GLES, the API user needs to // supply this uniform. // The draw parameter extension is soft-enabled on GL with some fallbacks. if (!options.vulkan_semantics) { if (!emitted_base_instance && ((options.vertex.support_nonzero_base_instance && builtin == BuiltInInstanceIndex) || (builtin == BuiltInBaseInstance))) { statement("#ifdef GL_ARB_shader_draw_parameters"); statement("#define SPIRV_Cross_BaseInstance gl_BaseInstanceARB"); statement("#else"); // A crude, but simple workaround which should be good enough for non-indirect draws. statement("uniform int SPIRV_Cross_BaseInstance;"); statement("#endif"); emitted = true; emitted_base_instance = true; } else if (builtin == BuiltInBaseVertex) { statement("#ifdef GL_ARB_shader_draw_parameters"); statement("#define SPIRV_Cross_BaseVertex gl_BaseVertexARB"); statement("#else"); // A crude, but simple workaround which should be good enough for non-indirect draws. statement("uniform int SPIRV_Cross_BaseVertex;"); statement("#endif"); } else if (builtin == BuiltInDrawIndex) { statement("#ifndef GL_ARB_shader_draw_parameters"); // Cannot really be worked around. statement("#error GL_ARB_shader_draw_parameters is not supported."); statement("#endif"); } } } }); // Global variables. for (auto global : global_variables) { auto &var = get(global); if (is_hidden_variable(var, true)) continue; if (var.storage != StorageClassOutput) { if (!variable_is_lut(var)) { add_resource_name(var.self); string initializer; if (options.force_zero_initialized_variables && var.storage == StorageClassPrivate && !var.initializer && !var.static_expression && type_can_zero_initialize(get_variable_data_type(var))) { initializer = join(" = ", to_zero_initialized_expression(get_variable_data_type_id(var))); } statement(variable_decl(var), initializer, ";"); emitted = true; } } else if (var.initializer && maybe_get(var.initializer) != nullptr) { emit_output_variable_initializer(var); } } if (emitted) statement(""); } void CompilerGLSL::emit_output_variable_initializer(const SPIRVariable &var) { // If a StorageClassOutput variable has an initializer, we need to initialize it in main(). auto &entry_func = this->get(ir.default_entry_point); auto &type = get(var.basetype); bool is_patch = has_decoration(var.self, DecorationPatch); bool is_block = has_decoration(type.self, DecorationBlock); bool is_control_point = get_execution_model() == ExecutionModelTessellationControl && !is_patch; if (is_block) { uint32_t member_count = uint32_t(type.member_types.size()); bool type_is_array = type.array.size() == 1; uint32_t array_size = 1; if (type_is_array) array_size = to_array_size_literal(type); uint32_t iteration_count = is_control_point ? 1 : array_size; // If the initializer is a block, we must initialize each block member one at a time. for (uint32_t i = 0; i < member_count; i++) { // These outputs might not have been properly declared, so don't initialize them in that case. if (has_member_decoration(type.self, i, DecorationBuiltIn)) { if (get_member_decoration(type.self, i, DecorationBuiltIn) == BuiltInCullDistance && !cull_distance_count) continue; if (get_member_decoration(type.self, i, DecorationBuiltIn) == BuiltInClipDistance && !clip_distance_count) continue; } // We need to build a per-member array first, essentially transposing from AoS to SoA. // This code path hits when we have an array of blocks. string lut_name; if (type_is_array) { lut_name = join("_", var.self, "_", i, "_init"); uint32_t member_type_id = get(var.basetype).member_types[i]; auto &member_type = get(member_type_id); auto array_type = member_type; array_type.parent_type = member_type_id; array_type.op = OpTypeArray; array_type.array.push_back(array_size); array_type.array_size_literal.push_back(true); SmallVector exprs; exprs.reserve(array_size); auto &c = get(var.initializer); for (uint32_t j = 0; j < array_size; j++) exprs.push_back(to_expression(get(c.subconstants[j]).subconstants[i])); statement("const ", type_to_glsl(array_type), " ", lut_name, type_to_array_glsl(array_type), " = ", type_to_glsl_constructor(array_type), "(", merge(exprs, ", "), ");"); } for (uint32_t j = 0; j < iteration_count; j++) { entry_func.fixup_hooks_in.push_back([=, &var]() { AccessChainMeta meta; auto &c = this->get(var.initializer); uint32_t invocation_id = 0; uint32_t member_index_id = 0; if (is_control_point) { uint32_t ids = ir.increase_bound_by(3); auto &uint_type = set(ids, OpTypeInt); uint_type.basetype = SPIRType::UInt; uint_type.width = 32; set(ids + 1, builtin_to_glsl(BuiltInInvocationId, StorageClassInput), ids, true); set(ids + 2, ids, i, false); invocation_id = ids + 1; member_index_id = ids + 2; } if (is_patch) { statement("if (gl_InvocationID == 0)"); begin_scope(); } if (type_is_array && !is_control_point) { uint32_t indices[2] = { j, i }; auto chain = access_chain_internal(var.self, indices, 2, ACCESS_CHAIN_INDEX_IS_LITERAL_BIT, &meta); statement(chain, " = ", lut_name, "[", j, "];"); } else if (is_control_point) { uint32_t indices[2] = { invocation_id, member_index_id }; auto chain = access_chain_internal(var.self, indices, 2, 0, &meta); statement(chain, " = ", lut_name, "[", builtin_to_glsl(BuiltInInvocationId, StorageClassInput), "];"); } else { auto chain = access_chain_internal(var.self, &i, 1, ACCESS_CHAIN_INDEX_IS_LITERAL_BIT, &meta); statement(chain, " = ", to_expression(c.subconstants[i]), ";"); } if (is_patch) end_scope(); }); } } } else if (is_control_point) { auto lut_name = join("_", var.self, "_init"); statement("const ", type_to_glsl(type), " ", lut_name, type_to_array_glsl(type), " = ", to_expression(var.initializer), ";"); entry_func.fixup_hooks_in.push_back([&, lut_name]() { statement(to_expression(var.self), "[gl_InvocationID] = ", lut_name, "[gl_InvocationID];"); }); } else if (has_decoration(var.self, DecorationBuiltIn) && BuiltIn(get_decoration(var.self, DecorationBuiltIn)) == BuiltInSampleMask) { // We cannot copy the array since gl_SampleMask is unsized in GLSL. Unroll time! <_< entry_func.fixup_hooks_in.push_back([&] { auto &c = this->get(var.initializer); uint32_t num_constants = uint32_t(c.subconstants.size()); for (uint32_t i = 0; i < num_constants; i++) { // Don't use to_expression on constant since it might be uint, just fish out the raw int. statement(to_expression(var.self), "[", i, "] = ", convert_to_string(this->get(c.subconstants[i]).scalar_i32()), ";"); } }); } else { auto lut_name = join("_", var.self, "_init"); statement("const ", type_to_glsl(type), " ", lut_name, type_to_array_glsl(type), " = ", to_expression(var.initializer), ";"); entry_func.fixup_hooks_in.push_back([&, lut_name, is_patch]() { if (is_patch) { statement("if (gl_InvocationID == 0)"); begin_scope(); } statement(to_expression(var.self), " = ", lut_name, ";"); if (is_patch) end_scope(); }); } } void CompilerGLSL::emit_subgroup_arithmetic_workaround(const std::string &func, Op op, GroupOperation group_op) { std::string result; switch (group_op) { case GroupOperationReduce: result = "reduction"; break; case GroupOperationExclusiveScan: result = "excl_scan"; break; case GroupOperationInclusiveScan: result = "incl_scan"; break; default: SPIRV_CROSS_THROW("Unsupported workaround for arithmetic group operation"); } struct TypeInfo { std::string type; std::string identity; }; std::vector type_infos; switch (op) { case OpGroupNonUniformIAdd: { type_infos.emplace_back(TypeInfo{ "uint", "0u" }); type_infos.emplace_back(TypeInfo{ "uvec2", "uvec2(0u)" }); type_infos.emplace_back(TypeInfo{ "uvec3", "uvec3(0u)" }); type_infos.emplace_back(TypeInfo{ "uvec4", "uvec4(0u)" }); type_infos.emplace_back(TypeInfo{ "int", "0" }); type_infos.emplace_back(TypeInfo{ "ivec2", "ivec2(0)" }); type_infos.emplace_back(TypeInfo{ "ivec3", "ivec3(0)" }); type_infos.emplace_back(TypeInfo{ "ivec4", "ivec4(0)" }); break; } case OpGroupNonUniformFAdd: { type_infos.emplace_back(TypeInfo{ "float", "0.0f" }); type_infos.emplace_back(TypeInfo{ "vec2", "vec2(0.0f)" }); type_infos.emplace_back(TypeInfo{ "vec3", "vec3(0.0f)" }); type_infos.emplace_back(TypeInfo{ "vec4", "vec4(0.0f)" }); // ARB_gpu_shader_fp64 is required in GL4.0 which in turn is required by NV_thread_shuffle type_infos.emplace_back(TypeInfo{ "double", "0.0LF" }); type_infos.emplace_back(TypeInfo{ "dvec2", "dvec2(0.0LF)" }); type_infos.emplace_back(TypeInfo{ "dvec3", "dvec3(0.0LF)" }); type_infos.emplace_back(TypeInfo{ "dvec4", "dvec4(0.0LF)" }); break; } case OpGroupNonUniformIMul: { type_infos.emplace_back(TypeInfo{ "uint", "1u" }); type_infos.emplace_back(TypeInfo{ "uvec2", "uvec2(1u)" }); type_infos.emplace_back(TypeInfo{ "uvec3", "uvec3(1u)" }); type_infos.emplace_back(TypeInfo{ "uvec4", "uvec4(1u)" }); type_infos.emplace_back(TypeInfo{ "int", "1" }); type_infos.emplace_back(TypeInfo{ "ivec2", "ivec2(1)" }); type_infos.emplace_back(TypeInfo{ "ivec3", "ivec3(1)" }); type_infos.emplace_back(TypeInfo{ "ivec4", "ivec4(1)" }); break; } case OpGroupNonUniformFMul: { type_infos.emplace_back(TypeInfo{ "float", "1.0f" }); type_infos.emplace_back(TypeInfo{ "vec2", "vec2(1.0f)" }); type_infos.emplace_back(TypeInfo{ "vec3", "vec3(1.0f)" }); type_infos.emplace_back(TypeInfo{ "vec4", "vec4(1.0f)" }); type_infos.emplace_back(TypeInfo{ "double", "0.0LF" }); type_infos.emplace_back(TypeInfo{ "dvec2", "dvec2(1.0LF)" }); type_infos.emplace_back(TypeInfo{ "dvec3", "dvec3(1.0LF)" }); type_infos.emplace_back(TypeInfo{ "dvec4", "dvec4(1.0LF)" }); break; } default: SPIRV_CROSS_THROW("Unsupported workaround for arithmetic group operation"); } const bool op_is_addition = op == OpGroupNonUniformIAdd || op == OpGroupNonUniformFAdd; const bool op_is_multiplication = op == OpGroupNonUniformIMul || op == OpGroupNonUniformFMul; std::string op_symbol; if (op_is_addition) { op_symbol = "+="; } else if (op_is_multiplication) { op_symbol = "*="; } for (const TypeInfo &t : type_infos) { statement(t.type, " ", func, "(", t.type, " v)"); begin_scope(); statement(t.type, " ", result, " = ", t.identity, ";"); statement("uvec4 active_threads = subgroupBallot(true);"); statement("if (subgroupBallotBitCount(active_threads) == gl_SubgroupSize)"); begin_scope(); statement("uint total = gl_SubgroupSize / 2u;"); statement(result, " = v;"); statement("for (uint i = 1u; i <= total; i <<= 1u)"); begin_scope(); statement("bool valid;"); if (group_op == GroupOperationReduce) { statement(t.type, " s = shuffleXorNV(", result, ", i, gl_SubgroupSize, valid);"); } else if (group_op == GroupOperationExclusiveScan || group_op == GroupOperationInclusiveScan) { statement(t.type, " s = shuffleUpNV(", result, ", i, gl_SubgroupSize, valid);"); } if (op_is_addition || op_is_multiplication) { statement(result, " ", op_symbol, " valid ? s : ", t.identity, ";"); } end_scope(); if (group_op == GroupOperationExclusiveScan) { statement(result, " = shuffleUpNV(", result, ", 1u, gl_SubgroupSize);"); statement("if (subgroupElect())"); begin_scope(); statement(result, " = ", t.identity, ";"); end_scope(); } end_scope(); statement("else"); begin_scope(); if (group_op == GroupOperationExclusiveScan) { statement("uint total = subgroupBallotBitCount(gl_SubgroupLtMask);"); } else if (group_op == GroupOperationInclusiveScan) { statement("uint total = subgroupBallotBitCount(gl_SubgroupLeMask);"); } statement("for (uint i = 0u; i < gl_SubgroupSize; ++i)"); begin_scope(); statement("bool valid = subgroupBallotBitExtract(active_threads, i);"); statement(t.type, " s = shuffleNV(v, i, gl_SubgroupSize);"); if (group_op == GroupOperationExclusiveScan || group_op == GroupOperationInclusiveScan) { statement("valid = valid && (i < total);"); } if (op_is_addition || op_is_multiplication) { statement(result, " ", op_symbol, " valid ? s : ", t.identity, ";"); } end_scope(); end_scope(); statement("return ", result, ";"); end_scope(); } } void CompilerGLSL::emit_extension_workarounds(spv::ExecutionModel model) { static const char *workaround_types[] = { "int", "ivec2", "ivec3", "ivec4", "uint", "uvec2", "uvec3", "uvec4", "float", "vec2", "vec3", "vec4", "double", "dvec2", "dvec3", "dvec4" }; if (!options.vulkan_semantics) { using Supp = ShaderSubgroupSupportHelper; auto result = shader_subgroup_supporter.resolve(); if (shader_subgroup_supporter.is_feature_requested(Supp::SubgroupMask)) { auto exts = Supp::get_candidates_for_feature(Supp::SubgroupMask, result); for (auto &e : exts) { const char *name = Supp::get_extension_name(e); statement(&e == &exts.front() ? "#if" : "#elif", " defined(", name, ")"); switch (e) { case Supp::NV_shader_thread_group: statement("#define gl_SubgroupEqMask uvec4(gl_ThreadEqMaskNV, 0u, 0u, 0u)"); statement("#define gl_SubgroupGeMask uvec4(gl_ThreadGeMaskNV, 0u, 0u, 0u)"); statement("#define gl_SubgroupGtMask uvec4(gl_ThreadGtMaskNV, 0u, 0u, 0u)"); statement("#define gl_SubgroupLeMask uvec4(gl_ThreadLeMaskNV, 0u, 0u, 0u)"); statement("#define gl_SubgroupLtMask uvec4(gl_ThreadLtMaskNV, 0u, 0u, 0u)"); break; case Supp::ARB_shader_ballot: statement("#define gl_SubgroupEqMask uvec4(unpackUint2x32(gl_SubGroupEqMaskARB), 0u, 0u)"); statement("#define gl_SubgroupGeMask uvec4(unpackUint2x32(gl_SubGroupGeMaskARB), 0u, 0u)"); statement("#define gl_SubgroupGtMask uvec4(unpackUint2x32(gl_SubGroupGtMaskARB), 0u, 0u)"); statement("#define gl_SubgroupLeMask uvec4(unpackUint2x32(gl_SubGroupLeMaskARB), 0u, 0u)"); statement("#define gl_SubgroupLtMask uvec4(unpackUint2x32(gl_SubGroupLtMaskARB), 0u, 0u)"); break; default: break; } } statement("#endif"); statement(""); } if (shader_subgroup_supporter.is_feature_requested(Supp::SubgroupSize)) { auto exts = Supp::get_candidates_for_feature(Supp::SubgroupSize, result); for (auto &e : exts) { const char *name = Supp::get_extension_name(e); statement(&e == &exts.front() ? "#if" : "#elif", " defined(", name, ")"); switch (e) { case Supp::NV_shader_thread_group: statement("#define gl_SubgroupSize gl_WarpSizeNV"); break; case Supp::ARB_shader_ballot: statement("#define gl_SubgroupSize gl_SubGroupSizeARB"); break; case Supp::AMD_gcn_shader: statement("#define gl_SubgroupSize uint(gl_SIMDGroupSizeAMD)"); break; default: break; } } statement("#endif"); statement(""); } if (shader_subgroup_supporter.is_feature_requested(Supp::SubgroupInvocationID)) { auto exts = Supp::get_candidates_for_feature(Supp::SubgroupInvocationID, result); for (auto &e : exts) { const char *name = Supp::get_extension_name(e); statement(&e == &exts.front() ? "#if" : "#elif", " defined(", name, ")"); switch (e) { case Supp::NV_shader_thread_group: statement("#define gl_SubgroupInvocationID gl_ThreadInWarpNV"); break; case Supp::ARB_shader_ballot: statement("#define gl_SubgroupInvocationID gl_SubGroupInvocationARB"); break; default: break; } } statement("#endif"); statement(""); } if (shader_subgroup_supporter.is_feature_requested(Supp::SubgroupID)) { auto exts = Supp::get_candidates_for_feature(Supp::SubgroupID, result); for (auto &e : exts) { const char *name = Supp::get_extension_name(e); statement(&e == &exts.front() ? "#if" : "#elif", " defined(", name, ")"); switch (e) { case Supp::NV_shader_thread_group: statement("#define gl_SubgroupID gl_WarpIDNV"); break; default: break; } } statement("#endif"); statement(""); } if (shader_subgroup_supporter.is_feature_requested(Supp::NumSubgroups)) { auto exts = Supp::get_candidates_for_feature(Supp::NumSubgroups, result); for (auto &e : exts) { const char *name = Supp::get_extension_name(e); statement(&e == &exts.front() ? "#if" : "#elif", " defined(", name, ")"); switch (e) { case Supp::NV_shader_thread_group: statement("#define gl_NumSubgroups gl_WarpsPerSMNV"); break; default: break; } } statement("#endif"); statement(""); } if (shader_subgroup_supporter.is_feature_requested(Supp::SubgroupBroadcast_First)) { auto exts = Supp::get_candidates_for_feature(Supp::SubgroupBroadcast_First, result); for (auto &e : exts) { const char *name = Supp::get_extension_name(e); statement(&e == &exts.front() ? "#if" : "#elif", " defined(", name, ")"); switch (e) { case Supp::NV_shader_thread_shuffle: for (const char *t : workaround_types) { statement(t, " subgroupBroadcastFirst(", t, " value) { return shuffleNV(value, findLSB(ballotThreadNV(true)), gl_WarpSizeNV); }"); } for (const char *t : workaround_types) { statement(t, " subgroupBroadcast(", t, " value, uint id) { return shuffleNV(value, id, gl_WarpSizeNV); }"); } break; case Supp::ARB_shader_ballot: for (const char *t : workaround_types) { statement(t, " subgroupBroadcastFirst(", t, " value) { return readFirstInvocationARB(value); }"); } for (const char *t : workaround_types) { statement(t, " subgroupBroadcast(", t, " value, uint id) { return readInvocationARB(value, id); }"); } break; default: break; } } statement("#endif"); statement(""); } if (shader_subgroup_supporter.is_feature_requested(Supp::SubgroupBallotFindLSB_MSB)) { auto exts = Supp::get_candidates_for_feature(Supp::SubgroupBallotFindLSB_MSB, result); for (auto &e : exts) { const char *name = Supp::get_extension_name(e); statement(&e == &exts.front() ? "#if" : "#elif", " defined(", name, ")"); switch (e) { case Supp::NV_shader_thread_group: statement("uint subgroupBallotFindLSB(uvec4 value) { return findLSB(value.x); }"); statement("uint subgroupBallotFindMSB(uvec4 value) { return findMSB(value.x); }"); break; default: break; } } statement("#else"); statement("uint subgroupBallotFindLSB(uvec4 value)"); begin_scope(); statement("int firstLive = findLSB(value.x);"); statement("return uint(firstLive != -1 ? firstLive : (findLSB(value.y) + 32));"); end_scope(); statement("uint subgroupBallotFindMSB(uvec4 value)"); begin_scope(); statement("int firstLive = findMSB(value.y);"); statement("return uint(firstLive != -1 ? (firstLive + 32) : findMSB(value.x));"); end_scope(); statement("#endif"); statement(""); } if (shader_subgroup_supporter.is_feature_requested(Supp::SubgroupAll_Any_AllEqualBool)) { auto exts = Supp::get_candidates_for_feature(Supp::SubgroupAll_Any_AllEqualBool, result); for (auto &e : exts) { const char *name = Supp::get_extension_name(e); statement(&e == &exts.front() ? "#if" : "#elif", " defined(", name, ")"); switch (e) { case Supp::NV_gpu_shader_5: statement("bool subgroupAll(bool value) { return allThreadsNV(value); }"); statement("bool subgroupAny(bool value) { return anyThreadNV(value); }"); statement("bool subgroupAllEqual(bool value) { return allThreadsEqualNV(value); }"); break; case Supp::ARB_shader_group_vote: statement("bool subgroupAll(bool v) { return allInvocationsARB(v); }"); statement("bool subgroupAny(bool v) { return anyInvocationARB(v); }"); statement("bool subgroupAllEqual(bool v) { return allInvocationsEqualARB(v); }"); break; case Supp::AMD_gcn_shader: statement("bool subgroupAll(bool value) { return ballotAMD(value) == ballotAMD(true); }"); statement("bool subgroupAny(bool value) { return ballotAMD(value) != 0ull; }"); statement("bool subgroupAllEqual(bool value) { uint64_t b = ballotAMD(value); return b == 0ull || " "b == ballotAMD(true); }"); break; default: break; } } statement("#endif"); statement(""); } if (shader_subgroup_supporter.is_feature_requested(Supp::SubgroupAllEqualT)) { statement("#ifndef GL_KHR_shader_subgroup_vote"); statement( "#define _SPIRV_CROSS_SUBGROUP_ALL_EQUAL_WORKAROUND(type) bool subgroupAllEqual(type value) { return " "subgroupAllEqual(subgroupBroadcastFirst(value) == value); }"); for (const char *t : workaround_types) statement("_SPIRV_CROSS_SUBGROUP_ALL_EQUAL_WORKAROUND(", t, ")"); statement("#undef _SPIRV_CROSS_SUBGROUP_ALL_EQUAL_WORKAROUND"); statement("#endif"); statement(""); } if (shader_subgroup_supporter.is_feature_requested(Supp::SubgroupBallot)) { auto exts = Supp::get_candidates_for_feature(Supp::SubgroupBallot, result); for (auto &e : exts) { const char *name = Supp::get_extension_name(e); statement(&e == &exts.front() ? "#if" : "#elif", " defined(", name, ")"); switch (e) { case Supp::NV_shader_thread_group: statement("uvec4 subgroupBallot(bool v) { return uvec4(ballotThreadNV(v), 0u, 0u, 0u); }"); break; case Supp::ARB_shader_ballot: statement("uvec4 subgroupBallot(bool v) { return uvec4(unpackUint2x32(ballotARB(v)), 0u, 0u); }"); break; default: break; } } statement("#endif"); statement(""); } if (shader_subgroup_supporter.is_feature_requested(Supp::SubgroupElect)) { statement("#ifndef GL_KHR_shader_subgroup_basic"); statement("bool subgroupElect()"); begin_scope(); statement("uvec4 activeMask = subgroupBallot(true);"); statement("uint firstLive = subgroupBallotFindLSB(activeMask);"); statement("return gl_SubgroupInvocationID == firstLive;"); end_scope(); statement("#endif"); statement(""); } if (shader_subgroup_supporter.is_feature_requested(Supp::SubgroupBarrier)) { // Extensions we're using in place of GL_KHR_shader_subgroup_basic state // that subgroup execute in lockstep so this barrier is implicit. // However the GL 4.6 spec also states that `barrier` implies a shared memory barrier, // and a specific test of optimizing scans by leveraging lock-step invocation execution, // has shown that a `memoryBarrierShared` is needed in place of a `subgroupBarrier`. // https://github.com/buildaworldnet/IrrlichtBAW/commit/d8536857991b89a30a6b65d29441e51b64c2c7ad#diff-9f898d27be1ea6fc79b03d9b361e299334c1a347b6e4dc344ee66110c6aa596aR19 statement("#ifndef GL_KHR_shader_subgroup_basic"); statement("void subgroupBarrier() { memoryBarrierShared(); }"); statement("#endif"); statement(""); } if (shader_subgroup_supporter.is_feature_requested(Supp::SubgroupMemBarrier)) { if (model == spv::ExecutionModelGLCompute) { statement("#ifndef GL_KHR_shader_subgroup_basic"); statement("void subgroupMemoryBarrier() { groupMemoryBarrier(); }"); statement("void subgroupMemoryBarrierBuffer() { groupMemoryBarrier(); }"); statement("void subgroupMemoryBarrierShared() { memoryBarrierShared(); }"); statement("void subgroupMemoryBarrierImage() { groupMemoryBarrier(); }"); statement("#endif"); } else { statement("#ifndef GL_KHR_shader_subgroup_basic"); statement("void subgroupMemoryBarrier() { memoryBarrier(); }"); statement("void subgroupMemoryBarrierBuffer() { memoryBarrierBuffer(); }"); statement("void subgroupMemoryBarrierImage() { memoryBarrierImage(); }"); statement("#endif"); } statement(""); } if (shader_subgroup_supporter.is_feature_requested(Supp::SubgroupInverseBallot_InclBitCount_ExclBitCout)) { statement("#ifndef GL_KHR_shader_subgroup_ballot"); statement("bool subgroupInverseBallot(uvec4 value)"); begin_scope(); statement("return any(notEqual(value.xy & gl_SubgroupEqMask.xy, uvec2(0u)));"); end_scope(); statement("uint subgroupBallotInclusiveBitCount(uvec4 value)"); begin_scope(); statement("uvec2 v = value.xy & gl_SubgroupLeMask.xy;"); statement("ivec2 c = bitCount(v);"); statement_no_indent("#ifdef GL_NV_shader_thread_group"); statement("return uint(c.x);"); statement_no_indent("#else"); statement("return uint(c.x + c.y);"); statement_no_indent("#endif"); end_scope(); statement("uint subgroupBallotExclusiveBitCount(uvec4 value)"); begin_scope(); statement("uvec2 v = value.xy & gl_SubgroupLtMask.xy;"); statement("ivec2 c = bitCount(v);"); statement_no_indent("#ifdef GL_NV_shader_thread_group"); statement("return uint(c.x);"); statement_no_indent("#else"); statement("return uint(c.x + c.y);"); statement_no_indent("#endif"); end_scope(); statement("#endif"); statement(""); } if (shader_subgroup_supporter.is_feature_requested(Supp::SubgroupBallotBitCount)) { statement("#ifndef GL_KHR_shader_subgroup_ballot"); statement("uint subgroupBallotBitCount(uvec4 value)"); begin_scope(); statement("ivec2 c = bitCount(value.xy);"); statement_no_indent("#ifdef GL_NV_shader_thread_group"); statement("return uint(c.x);"); statement_no_indent("#else"); statement("return uint(c.x + c.y);"); statement_no_indent("#endif"); end_scope(); statement("#endif"); statement(""); } if (shader_subgroup_supporter.is_feature_requested(Supp::SubgroupBallotBitExtract)) { statement("#ifndef GL_KHR_shader_subgroup_ballot"); statement("bool subgroupBallotBitExtract(uvec4 value, uint index)"); begin_scope(); statement_no_indent("#ifdef GL_NV_shader_thread_group"); statement("uint shifted = value.x >> index;"); statement_no_indent("#else"); statement("uint shifted = value[index >> 5u] >> (index & 0x1fu);"); statement_no_indent("#endif"); statement("return (shifted & 1u) != 0u;"); end_scope(); statement("#endif"); statement(""); } auto arithmetic_feature_helper = [&](Supp::Feature feat, std::string func_name, spv::Op op, spv::GroupOperation group_op) { if (shader_subgroup_supporter.is_feature_requested(feat)) { auto exts = Supp::get_candidates_for_feature(feat, result); for (auto &e : exts) { const char *name = Supp::get_extension_name(e); statement(&e == &exts.front() ? "#if" : "#elif", " defined(", name, ")"); switch (e) { case Supp::NV_shader_thread_shuffle: emit_subgroup_arithmetic_workaround(func_name, op, group_op); break; default: break; } } statement("#endif"); statement(""); } }; arithmetic_feature_helper(Supp::SubgroupArithmeticIAddReduce, "subgroupAdd", OpGroupNonUniformIAdd, GroupOperationReduce); arithmetic_feature_helper(Supp::SubgroupArithmeticIAddExclusiveScan, "subgroupExclusiveAdd", OpGroupNonUniformIAdd, GroupOperationExclusiveScan); arithmetic_feature_helper(Supp::SubgroupArithmeticIAddInclusiveScan, "subgroupInclusiveAdd", OpGroupNonUniformIAdd, GroupOperationInclusiveScan); arithmetic_feature_helper(Supp::SubgroupArithmeticFAddReduce, "subgroupAdd", OpGroupNonUniformFAdd, GroupOperationReduce); arithmetic_feature_helper(Supp::SubgroupArithmeticFAddExclusiveScan, "subgroupExclusiveAdd", OpGroupNonUniformFAdd, GroupOperationExclusiveScan); arithmetic_feature_helper(Supp::SubgroupArithmeticFAddInclusiveScan, "subgroupInclusiveAdd", OpGroupNonUniformFAdd, GroupOperationInclusiveScan); arithmetic_feature_helper(Supp::SubgroupArithmeticIMulReduce, "subgroupMul", OpGroupNonUniformIMul, GroupOperationReduce); arithmetic_feature_helper(Supp::SubgroupArithmeticIMulExclusiveScan, "subgroupExclusiveMul", OpGroupNonUniformIMul, GroupOperationExclusiveScan); arithmetic_feature_helper(Supp::SubgroupArithmeticIMulInclusiveScan, "subgroupInclusiveMul", OpGroupNonUniformIMul, GroupOperationInclusiveScan); arithmetic_feature_helper(Supp::SubgroupArithmeticFMulReduce, "subgroupMul", OpGroupNonUniformFMul, GroupOperationReduce); arithmetic_feature_helper(Supp::SubgroupArithmeticFMulExclusiveScan, "subgroupExclusiveMul", OpGroupNonUniformFMul, GroupOperationExclusiveScan); arithmetic_feature_helper(Supp::SubgroupArithmeticFMulInclusiveScan, "subgroupInclusiveMul", OpGroupNonUniformFMul, GroupOperationInclusiveScan); } if (!workaround_ubo_load_overload_types.empty()) { for (auto &type_id : workaround_ubo_load_overload_types) { auto &type = get(type_id); if (options.es && is_matrix(type)) { // Need both variants. // GLSL cannot overload on precision, so need to dispatch appropriately. statement("highp ", type_to_glsl(type), " spvWorkaroundRowMajor(highp ", type_to_glsl(type), " wrap) { return wrap; }"); statement("mediump ", type_to_glsl(type), " spvWorkaroundRowMajorMP(mediump ", type_to_glsl(type), " wrap) { return wrap; }"); } else { statement(type_to_glsl(type), " spvWorkaroundRowMajor(", type_to_glsl(type), " wrap) { return wrap; }"); } } statement(""); } } void CompilerGLSL::emit_polyfills(uint32_t polyfills, bool relaxed) { const char *qual = ""; const char *suffix = (options.es && relaxed) ? "MP" : ""; if (options.es) qual = relaxed ? "mediump " : "highp "; if (polyfills & PolyfillTranspose2x2) { statement(qual, "mat2 spvTranspose", suffix, "(", qual, "mat2 m)"); begin_scope(); statement("return mat2(m[0][0], m[1][0], m[0][1], m[1][1]);"); end_scope(); statement(""); } if (polyfills & PolyfillTranspose3x3) { statement(qual, "mat3 spvTranspose", suffix, "(", qual, "mat3 m)"); begin_scope(); statement("return mat3(m[0][0], m[1][0], m[2][0], m[0][1], m[1][1], m[2][1], m[0][2], m[1][2], m[2][2]);"); end_scope(); statement(""); } if (polyfills & PolyfillTranspose4x4) { statement(qual, "mat4 spvTranspose", suffix, "(", qual, "mat4 m)"); begin_scope(); statement("return mat4(m[0][0], m[1][0], m[2][0], m[3][0], m[0][1], m[1][1], m[2][1], m[3][1], m[0][2], " "m[1][2], m[2][2], m[3][2], m[0][3], m[1][3], m[2][3], m[3][3]);"); end_scope(); statement(""); } if (polyfills & PolyfillDeterminant2x2) { statement(qual, "float spvDeterminant", suffix, "(", qual, "mat2 m)"); begin_scope(); statement("return m[0][0] * m[1][1] - m[0][1] * m[1][0];"); end_scope(); statement(""); } if (polyfills & PolyfillDeterminant3x3) { statement(qual, "float spvDeterminant", suffix, "(", qual, "mat3 m)"); begin_scope(); statement("return dot(m[0], vec3(m[1][1] * m[2][2] - m[1][2] * m[2][1], " "m[1][2] * m[2][0] - m[1][0] * m[2][2], " "m[1][0] * m[2][1] - m[1][1] * m[2][0]));"); end_scope(); statement(""); } if (polyfills & PolyfillDeterminant4x4) { statement(qual, "float spvDeterminant", suffix, "(", qual, "mat4 m)"); begin_scope(); statement("return dot(m[0], vec4(" "m[2][1] * m[3][2] * m[1][3] - m[3][1] * m[2][2] * m[1][3] + m[3][1] * m[1][2] * m[2][3] - m[1][1] * m[3][2] * m[2][3] - m[2][1] * m[1][2] * m[3][3] + m[1][1] * m[2][2] * m[3][3], " "m[3][0] * m[2][2] * m[1][3] - m[2][0] * m[3][2] * m[1][3] - m[3][0] * m[1][2] * m[2][3] + m[1][0] * m[3][2] * m[2][3] + m[2][0] * m[1][2] * m[3][3] - m[1][0] * m[2][2] * m[3][3], " "m[2][0] * m[3][1] * m[1][3] - m[3][0] * m[2][1] * m[1][3] + m[3][0] * m[1][1] * m[2][3] - m[1][0] * m[3][1] * m[2][3] - m[2][0] * m[1][1] * m[3][3] + m[1][0] * m[2][1] * m[3][3], " "m[3][0] * m[2][1] * m[1][2] - m[2][0] * m[3][1] * m[1][2] - m[3][0] * m[1][1] * m[2][2] + m[1][0] * m[3][1] * m[2][2] + m[2][0] * m[1][1] * m[3][2] - m[1][0] * m[2][1] * m[3][2]));"); end_scope(); statement(""); } if (polyfills & PolyfillMatrixInverse2x2) { statement(qual, "mat2 spvInverse", suffix, "(", qual, "mat2 m)"); begin_scope(); statement("return mat2(m[1][1], -m[0][1], -m[1][0], m[0][0]) " "* (1.0 / (m[0][0] * m[1][1] - m[1][0] * m[0][1]));"); end_scope(); statement(""); } if (polyfills & PolyfillMatrixInverse3x3) { statement(qual, "mat3 spvInverse", suffix, "(", qual, "mat3 m)"); begin_scope(); statement(qual, "vec3 t = vec3(m[1][1] * m[2][2] - m[1][2] * m[2][1], m[1][2] * m[2][0] - m[1][0] * m[2][2], m[1][0] * m[2][1] - m[1][1] * m[2][0]);"); statement("return mat3(t[0], " "m[0][2] * m[2][1] - m[0][1] * m[2][2], " "m[0][1] * m[1][2] - m[0][2] * m[1][1], " "t[1], " "m[0][0] * m[2][2] - m[0][2] * m[2][0], " "m[0][2] * m[1][0] - m[0][0] * m[1][2], " "t[2], " "m[0][1] * m[2][0] - m[0][0] * m[2][1], " "m[0][0] * m[1][1] - m[0][1] * m[1][0]) " "* (1.0 / dot(m[0], t));"); end_scope(); statement(""); } if (polyfills & PolyfillMatrixInverse4x4) { statement(qual, "mat4 spvInverse", suffix, "(", qual, "mat4 m)"); begin_scope(); statement(qual, "vec4 t = vec4(" "m[2][1] * m[3][2] * m[1][3] - m[3][1] * m[2][2] * m[1][3] + m[3][1] * m[1][2] * m[2][3] - m[1][1] * m[3][2] * m[2][3] - m[2][1] * m[1][2] * m[3][3] + m[1][1] * m[2][2] * m[3][3], " "m[3][0] * m[2][2] * m[1][3] - m[2][0] * m[3][2] * m[1][3] - m[3][0] * m[1][2] * m[2][3] + m[1][0] * m[3][2] * m[2][3] + m[2][0] * m[1][2] * m[3][3] - m[1][0] * m[2][2] * m[3][3], " "m[2][0] * m[3][1] * m[1][3] - m[3][0] * m[2][1] * m[1][3] + m[3][0] * m[1][1] * m[2][3] - m[1][0] * m[3][1] * m[2][3] - m[2][0] * m[1][1] * m[3][3] + m[1][0] * m[2][1] * m[3][3], " "m[3][0] * m[2][1] * m[1][2] - m[2][0] * m[3][1] * m[1][2] - m[3][0] * m[1][1] * m[2][2] + m[1][0] * m[3][1] * m[2][2] + m[2][0] * m[1][1] * m[3][2] - m[1][0] * m[2][1] * m[3][2]);"); statement("return mat4(" "t[0], " "m[3][1] * m[2][2] * m[0][3] - m[2][1] * m[3][2] * m[0][3] - m[3][1] * m[0][2] * m[2][3] + m[0][1] * m[3][2] * m[2][3] + m[2][1] * m[0][2] * m[3][3] - m[0][1] * m[2][2] * m[3][3], " "m[1][1] * m[3][2] * m[0][3] - m[3][1] * m[1][2] * m[0][3] + m[3][1] * m[0][2] * m[1][3] - m[0][1] * m[3][2] * m[1][3] - m[1][1] * m[0][2] * m[3][3] + m[0][1] * m[1][2] * m[3][3], " "m[2][1] * m[1][2] * m[0][3] - m[1][1] * m[2][2] * m[0][3] - m[2][1] * m[0][2] * m[1][3] + m[0][1] * m[2][2] * m[1][3] + m[1][1] * m[0][2] * m[2][3] - m[0][1] * m[1][2] * m[2][3], " "t[1], " "m[2][0] * m[3][2] * m[0][3] - m[3][0] * m[2][2] * m[0][3] + m[3][0] * m[0][2] * m[2][3] - m[0][0] * m[3][2] * m[2][3] - m[2][0] * m[0][2] * m[3][3] + m[0][0] * m[2][2] * m[3][3], " "m[3][0] * m[1][2] * m[0][3] - m[1][0] * m[3][2] * m[0][3] - m[3][0] * m[0][2] * m[1][3] + m[0][0] * m[3][2] * m[1][3] + m[1][0] * m[0][2] * m[3][3] - m[0][0] * m[1][2] * m[3][3], " "m[1][0] * m[2][2] * m[0][3] - m[2][0] * m[1][2] * m[0][3] + m[2][0] * m[0][2] * m[1][3] - m[0][0] * m[2][2] * m[1][3] - m[1][0] * m[0][2] * m[2][3] + m[0][0] * m[1][2] * m[2][3], " "t[2], " "m[3][0] * m[2][1] * m[0][3] - m[2][0] * m[3][1] * m[0][3] - m[3][0] * m[0][1] * m[2][3] + m[0][0] * m[3][1] * m[2][3] + m[2][0] * m[0][1] * m[3][3] - m[0][0] * m[2][1] * m[3][3], " "m[1][0] * m[3][1] * m[0][3] - m[3][0] * m[1][1] * m[0][3] + m[3][0] * m[0][1] * m[1][3] - m[0][0] * m[3][1] * m[1][3] - m[1][0] * m[0][1] * m[3][3] + m[0][0] * m[1][1] * m[3][3], " "m[2][0] * m[1][1] * m[0][3] - m[1][0] * m[2][1] * m[0][3] - m[2][0] * m[0][1] * m[1][3] + m[0][0] * m[2][1] * m[1][3] + m[1][0] * m[0][1] * m[2][3] - m[0][0] * m[1][1] * m[2][3], " "t[3], " "m[2][0] * m[3][1] * m[0][2] - m[3][0] * m[2][1] * m[0][2] + m[3][0] * m[0][1] * m[2][2] - m[0][0] * m[3][1] * m[2][2] - m[2][0] * m[0][1] * m[3][2] + m[0][0] * m[2][1] * m[3][2], " "m[3][0] * m[1][1] * m[0][2] - m[1][0] * m[3][1] * m[0][2] - m[3][0] * m[0][1] * m[1][2] + m[0][0] * m[3][1] * m[1][2] + m[1][0] * m[0][1] * m[3][2] - m[0][0] * m[1][1] * m[3][2], " "m[1][0] * m[2][1] * m[0][2] - m[2][0] * m[1][1] * m[0][2] + m[2][0] * m[0][1] * m[1][2] - m[0][0] * m[2][1] * m[1][2] - m[1][0] * m[0][1] * m[2][2] + m[0][0] * m[1][1] * m[2][2]) " "* (1.0 / dot(m[0], t));"); end_scope(); statement(""); } } // Returns a string representation of the ID, usable as a function arg. // Default is to simply return the expression representation fo the arg ID. // Subclasses may override to modify the return value. string CompilerGLSL::to_func_call_arg(const SPIRFunction::Parameter &, uint32_t id) { // Make sure that we use the name of the original variable, and not the parameter alias. uint32_t name_id = id; auto *var = maybe_get(id); if (var && var->basevariable) name_id = var->basevariable; return to_expression(name_id); } void CompilerGLSL::force_temporary_and_recompile(uint32_t id) { auto res = forced_temporaries.insert(id); // Forcing new temporaries guarantees forward progress. if (res.second) force_recompile_guarantee_forward_progress(); else force_recompile(); } uint32_t CompilerGLSL::consume_temporary_in_precision_context(uint32_t type_id, uint32_t id, Options::Precision precision) { // Constants do not have innate precision. auto handle_type = ir.ids[id].get_type(); if (handle_type == TypeConstant || handle_type == TypeConstantOp || handle_type == TypeUndef) return id; // Ignore anything that isn't 32-bit values. auto &type = get(type_id); if (type.pointer) return id; if (type.basetype != SPIRType::Float && type.basetype != SPIRType::UInt && type.basetype != SPIRType::Int) return id; if (precision == Options::DontCare) { // If precision is consumed as don't care (operations only consisting of constants), // we need to bind the expression to a temporary, // otherwise we have no way of controlling the precision later. auto itr = forced_temporaries.insert(id); if (itr.second) force_recompile_guarantee_forward_progress(); return id; } auto current_precision = has_decoration(id, DecorationRelaxedPrecision) ? Options::Mediump : Options::Highp; if (current_precision == precision) return id; auto itr = temporary_to_mirror_precision_alias.find(id); if (itr == temporary_to_mirror_precision_alias.end()) { uint32_t alias_id = ir.increase_bound_by(1); auto &m = ir.meta[alias_id]; if (auto *input_m = ir.find_meta(id)) m = *input_m; const char *prefix; if (precision == Options::Mediump) { set_decoration(alias_id, DecorationRelaxedPrecision); prefix = "mp_copy_"; } else { unset_decoration(alias_id, DecorationRelaxedPrecision); prefix = "hp_copy_"; } auto alias_name = join(prefix, to_name(id)); ParsedIR::sanitize_underscores(alias_name); set_name(alias_id, alias_name); emit_op(type_id, alias_id, to_expression(id), true); temporary_to_mirror_precision_alias[id] = alias_id; forced_temporaries.insert(id); forced_temporaries.insert(alias_id); force_recompile_guarantee_forward_progress(); id = alias_id; } else { id = itr->second; } return id; } void CompilerGLSL::handle_invalid_expression(uint32_t id) { // We tried to read an invalidated expression. // This means we need another pass at compilation, but next time, // force temporary variables so that they cannot be invalidated. force_temporary_and_recompile(id); // If the invalid expression happened as a result of a CompositeInsert // overwrite, we must block this from happening next iteration. if (composite_insert_overwritten.count(id)) block_composite_insert_overwrite.insert(id); } // Converts the format of the current expression from packed to unpacked, // by wrapping the expression in a constructor of the appropriate type. // GLSL does not support packed formats, so simply return the expression. // Subclasses that do will override. string CompilerGLSL::unpack_expression_type(string expr_str, const SPIRType &, uint32_t, bool, bool) { return expr_str; } // Sometimes we proactively enclosed an expression where it turns out we might have not needed it after all. void CompilerGLSL::strip_enclosed_expression(string &expr) { if (expr.size() < 2 || expr.front() != '(' || expr.back() != ')') return; // Have to make sure that our first and last parens actually enclose everything inside it. uint32_t paren_count = 0; for (auto &c : expr) { if (c == '(') paren_count++; else if (c == ')') { paren_count--; // If we hit 0 and this is not the final char, our first and final parens actually don't // enclose the expression, and we cannot strip, e.g.: (a + b) * (c + d). if (paren_count == 0 && &c != &expr.back()) return; } } expr.erase(expr.size() - 1, 1); expr.erase(begin(expr)); } bool CompilerGLSL::needs_enclose_expression(const std::string &expr) { bool need_parens = false; // If the expression starts with a unary we need to enclose to deal with cases where we have back-to-back // unary expressions. if (!expr.empty()) { auto c = expr.front(); if (c == '-' || c == '+' || c == '!' || c == '~' || c == '&' || c == '*') need_parens = true; } if (!need_parens) { uint32_t paren_count = 0; for (auto c : expr) { if (c == '(' || c == '[') paren_count++; else if (c == ')' || c == ']') { assert(paren_count); paren_count--; } else if (c == ' ' && paren_count == 0) { need_parens = true; break; } } assert(paren_count == 0); } return need_parens; } string CompilerGLSL::enclose_expression(const string &expr) { // If this expression contains any spaces which are not enclosed by parentheses, // we need to enclose it so we can treat the whole string as an expression. // This happens when two expressions have been part of a binary op earlier. if (needs_enclose_expression(expr)) return join('(', expr, ')'); else return expr; } string CompilerGLSL::dereference_expression(const SPIRType &expr_type, const std::string &expr) { // If this expression starts with an address-of operator ('&'), then // just return the part after the operator. // TODO: Strip parens if unnecessary? if (expr.front() == '&') return expr.substr(1); else if (backend.native_pointers) return join('*', expr); else if (expr_type.storage == StorageClassPhysicalStorageBufferEXT && expr_type.basetype != SPIRType::Struct && expr_type.pointer_depth == 1) { return join(enclose_expression(expr), ".value"); } else return expr; } string CompilerGLSL::address_of_expression(const std::string &expr) { if (expr.size() > 3 && expr[0] == '(' && expr[1] == '*' && expr.back() == ')') { // If we have an expression which looks like (*foo), taking the address of it is the same as stripping // the first two and last characters. We might have to enclose the expression. // This doesn't work for cases like (*foo + 10), // but this is an r-value expression which we cannot take the address of anyways. return enclose_expression(expr.substr(2, expr.size() - 3)); } else if (expr.front() == '*') { // If this expression starts with a dereference operator ('*'), then // just return the part after the operator. return expr.substr(1); } else return join('&', enclose_expression(expr)); } // Just like to_expression except that we enclose the expression inside parentheses if needed. string CompilerGLSL::to_enclosed_expression(uint32_t id, bool register_expression_read) { return enclose_expression(to_expression(id, register_expression_read)); } // Used explicitly when we want to read a row-major expression, but without any transpose shenanigans. // need_transpose must be forced to false. string CompilerGLSL::to_unpacked_row_major_matrix_expression(uint32_t id) { return unpack_expression_type(to_expression(id), expression_type(id), get_extended_decoration(id, SPIRVCrossDecorationPhysicalTypeID), has_extended_decoration(id, SPIRVCrossDecorationPhysicalTypePacked), true); } string CompilerGLSL::to_unpacked_expression(uint32_t id, bool register_expression_read) { // If we need to transpose, it will also take care of unpacking rules. auto *e = maybe_get(id); bool need_transpose = e && e->need_transpose; bool is_remapped = has_extended_decoration(id, SPIRVCrossDecorationPhysicalTypeID); bool is_packed = has_extended_decoration(id, SPIRVCrossDecorationPhysicalTypePacked); if (!need_transpose && (is_remapped || is_packed)) { return unpack_expression_type(to_expression(id, register_expression_read), get_pointee_type(expression_type_id(id)), get_extended_decoration(id, SPIRVCrossDecorationPhysicalTypeID), has_extended_decoration(id, SPIRVCrossDecorationPhysicalTypePacked), false); } else return to_expression(id, register_expression_read); } string CompilerGLSL::to_enclosed_unpacked_expression(uint32_t id, bool register_expression_read) { return enclose_expression(to_unpacked_expression(id, register_expression_read)); } string CompilerGLSL::to_dereferenced_expression(uint32_t id, bool register_expression_read) { auto &type = expression_type(id); if (type.pointer && should_dereference(id)) return dereference_expression(type, to_enclosed_expression(id, register_expression_read)); else return to_expression(id, register_expression_read); } string CompilerGLSL::to_pointer_expression(uint32_t id, bool register_expression_read) { auto &type = expression_type(id); if (type.pointer && expression_is_lvalue(id) && !should_dereference(id)) return address_of_expression(to_enclosed_expression(id, register_expression_read)); else return to_unpacked_expression(id, register_expression_read); } string CompilerGLSL::to_enclosed_pointer_expression(uint32_t id, bool register_expression_read) { auto &type = expression_type(id); if (type.pointer && expression_is_lvalue(id) && !should_dereference(id)) return address_of_expression(to_enclosed_expression(id, register_expression_read)); else return to_enclosed_unpacked_expression(id, register_expression_read); } string CompilerGLSL::to_extract_component_expression(uint32_t id, uint32_t index) { auto expr = to_enclosed_expression(id); if (has_extended_decoration(id, SPIRVCrossDecorationPhysicalTypePacked)) return join(expr, "[", index, "]"); else return join(expr, ".", index_to_swizzle(index)); } string CompilerGLSL::to_extract_constant_composite_expression(uint32_t result_type, const SPIRConstant &c, const uint32_t *chain, uint32_t length) { // It is kinda silly if application actually enter this path since they know the constant up front. // It is useful here to extract the plain constant directly. SPIRConstant tmp; tmp.constant_type = result_type; auto &composite_type = get(c.constant_type); assert(composite_type.basetype != SPIRType::Struct && composite_type.array.empty()); assert(!c.specialization); if (is_matrix(composite_type)) { if (length == 2) { tmp.m.c[0].vecsize = 1; tmp.m.columns = 1; tmp.m.c[0].r[0] = c.m.c[chain[0]].r[chain[1]]; } else { assert(length == 1); tmp.m.c[0].vecsize = composite_type.vecsize; tmp.m.columns = 1; tmp.m.c[0] = c.m.c[chain[0]]; } } else { assert(length == 1); tmp.m.c[0].vecsize = 1; tmp.m.columns = 1; tmp.m.c[0].r[0] = c.m.c[0].r[chain[0]]; } return constant_expression(tmp); } string CompilerGLSL::to_rerolled_array_expression(const SPIRType &parent_type, const string &base_expr, const SPIRType &type) { bool remapped_boolean = parent_type.basetype == SPIRType::Struct && type.basetype == SPIRType::Boolean && backend.boolean_in_struct_remapped_type != SPIRType::Boolean; SPIRType tmp_type { OpNop }; if (remapped_boolean) { tmp_type = get(type.parent_type); tmp_type.basetype = backend.boolean_in_struct_remapped_type; } else if (type.basetype == SPIRType::Boolean && backend.boolean_in_struct_remapped_type != SPIRType::Boolean) { // It's possible that we have an r-value expression that was OpLoaded from a struct. // We have to reroll this and explicitly cast the input to bool, because the r-value is short. tmp_type = get(type.parent_type); remapped_boolean = true; } uint32_t size = to_array_size_literal(type); auto &parent = get(type.parent_type); string expr = "{ "; for (uint32_t i = 0; i < size; i++) { auto subexpr = join(base_expr, "[", convert_to_string(i), "]"); if (!is_array(parent)) { if (remapped_boolean) subexpr = join(type_to_glsl(tmp_type), "(", subexpr, ")"); expr += subexpr; } else expr += to_rerolled_array_expression(parent_type, subexpr, parent); if (i + 1 < size) expr += ", "; } expr += " }"; return expr; } string CompilerGLSL::to_composite_constructor_expression(const SPIRType &parent_type, uint32_t id, bool block_like_type) { auto &type = expression_type(id); bool reroll_array = false; bool remapped_boolean = parent_type.basetype == SPIRType::Struct && type.basetype == SPIRType::Boolean && backend.boolean_in_struct_remapped_type != SPIRType::Boolean; if (is_array(type)) { reroll_array = !backend.array_is_value_type || (block_like_type && !backend.array_is_value_type_in_buffer_blocks); if (remapped_boolean) { // Forced to reroll if we have to change bool[] to short[]. reroll_array = true; } } if (reroll_array) { // For this case, we need to "re-roll" an array initializer from a temporary. // We cannot simply pass the array directly, since it decays to a pointer and it cannot // participate in a struct initializer. E.g. // float arr[2] = { 1.0, 2.0 }; // Foo foo = { arr }; must be transformed to // Foo foo = { { arr[0], arr[1] } }; // The array sizes cannot be deduced from specialization constants since we cannot use any loops. // We're only triggering one read of the array expression, but this is fine since arrays have to be declared // as temporaries anyways. return to_rerolled_array_expression(parent_type, to_enclosed_expression(id), type); } else { auto expr = to_unpacked_expression(id); if (remapped_boolean) { auto tmp_type = type; tmp_type.basetype = backend.boolean_in_struct_remapped_type; expr = join(type_to_glsl(tmp_type), "(", expr, ")"); } return expr; } } string CompilerGLSL::to_non_uniform_aware_expression(uint32_t id) { string expr = to_expression(id); if (has_decoration(id, DecorationNonUniform)) convert_non_uniform_expression(expr, id); return expr; } string CompilerGLSL::to_expression(uint32_t id, bool register_expression_read) { auto itr = invalid_expressions.find(id); if (itr != end(invalid_expressions)) handle_invalid_expression(id); if (ir.ids[id].get_type() == TypeExpression) { // We might have a more complex chain of dependencies. // A possible scenario is that we // // %1 = OpLoad // %2 = OpDoSomething %1 %1. here %2 will have a dependency on %1. // %3 = OpDoSomethingAgain %2 %2. Here %3 will lose the link to %1 since we don't propagate the dependencies like that. // OpStore %1 %foo // Here we can invalidate %1, and hence all expressions which depend on %1. Only %2 will know since it's part of invalid_expressions. // %4 = OpDoSomethingAnotherTime %3 %3 // If we forward all expressions we will see %1 expression after store, not before. // // However, we can propagate up a list of depended expressions when we used %2, so we can check if %2 is invalid when reading %3 after the store, // and see that we should not forward reads of the original variable. auto &expr = get(id); for (uint32_t dep : expr.expression_dependencies) if (invalid_expressions.find(dep) != end(invalid_expressions)) handle_invalid_expression(dep); } if (register_expression_read) track_expression_read(id); switch (ir.ids[id].get_type()) { case TypeExpression: { auto &e = get(id); if (e.base_expression) return to_enclosed_expression(e.base_expression) + e.expression; else if (e.need_transpose) { // This should not be reached for access chains, since we always deal explicitly with transpose state // when consuming an access chain expression. uint32_t physical_type_id = get_extended_decoration(id, SPIRVCrossDecorationPhysicalTypeID); bool is_packed = has_extended_decoration(id, SPIRVCrossDecorationPhysicalTypePacked); bool relaxed = has_decoration(id, DecorationRelaxedPrecision); return convert_row_major_matrix(e.expression, get(e.expression_type), physical_type_id, is_packed, relaxed); } else if (flattened_structs.count(id)) { return load_flattened_struct(e.expression, get(e.expression_type)); } else { if (is_forcing_recompilation()) { // During first compilation phase, certain expression patterns can trigger exponential growth of memory. // Avoid this by returning dummy expressions during this phase. // Do not use empty expressions here, because those are sentinels for other cases. return "_"; } else return e.expression; } } case TypeConstant: { auto &c = get(id); auto &type = get(c.constant_type); // WorkGroupSize may be a constant. if (has_decoration(c.self, DecorationBuiltIn)) return builtin_to_glsl(BuiltIn(get_decoration(c.self, DecorationBuiltIn)), StorageClassGeneric); else if (c.specialization) { if (backend.workgroup_size_is_hidden) { int wg_index = get_constant_mapping_to_workgroup_component(c); if (wg_index >= 0) { auto wg_size = join(builtin_to_glsl(BuiltInWorkgroupSize, StorageClassInput), vector_swizzle(1, wg_index)); if (type.basetype != SPIRType::UInt) wg_size = bitcast_expression(type, SPIRType::UInt, wg_size); return wg_size; } } if (expression_is_forwarded(id)) return constant_expression(c); return to_name(id); } else if (c.is_used_as_lut) return to_name(id); else if (type.basetype == SPIRType::Struct && !backend.can_declare_struct_inline) return to_name(id); else if (!type.array.empty() && !backend.can_declare_arrays_inline) return to_name(id); else return constant_expression(c); } case TypeConstantOp: return to_name(id); case TypeVariable: { auto &var = get(id); // If we try to use a loop variable before the loop header, we have to redirect it to the static expression, // the variable has not been declared yet. if (var.statically_assigned || (var.loop_variable && !var.loop_variable_enable)) { // We might try to load from a loop variable before it has been initialized. // Prefer static expression and fallback to initializer. if (var.static_expression) return to_expression(var.static_expression); else if (var.initializer) return to_expression(var.initializer); else { // We cannot declare the variable yet, so have to fake it. uint32_t undef_id = ir.increase_bound_by(1); return emit_uninitialized_temporary_expression(get_variable_data_type_id(var), undef_id).expression; } } else if (var.deferred_declaration) { var.deferred_declaration = false; return variable_decl(var); } else if (flattened_structs.count(id)) { return load_flattened_struct(to_name(id), get(var.basetype)); } else { auto &dec = ir.meta[var.self].decoration; if (dec.builtin) return builtin_to_glsl(dec.builtin_type, var.storage); else return to_name(id); } } case TypeCombinedImageSampler: // This type should never be taken the expression of directly. // The intention is that texture sampling functions will extract the image and samplers // separately and take their expressions as needed. // GLSL does not use this type because OpSampledImage immediately creates a combined image sampler // expression ala sampler2D(texture, sampler). SPIRV_CROSS_THROW("Combined image samplers have no default expression representation."); case TypeAccessChain: // We cannot express this type. They only have meaning in other OpAccessChains, OpStore or OpLoad. SPIRV_CROSS_THROW("Access chains have no default expression representation."); default: return to_name(id); } } SmallVector CompilerGLSL::get_composite_constant_ids(ConstantID const_id) { if (auto *constant = maybe_get(const_id)) { const auto &type = get(constant->constant_type); if (is_array(type) || type.basetype == SPIRType::Struct) return constant->subconstants; if (is_matrix(type)) return SmallVector(constant->m.id); if (is_vector(type)) return SmallVector(constant->m.c[0].id); SPIRV_CROSS_THROW("Unexpected scalar constant!"); } if (!const_composite_insert_ids.count(const_id)) SPIRV_CROSS_THROW("Unimplemented for this OpSpecConstantOp!"); return const_composite_insert_ids[const_id]; } void CompilerGLSL::fill_composite_constant(SPIRConstant &constant, TypeID type_id, const SmallVector &initializers) { auto &type = get(type_id); constant.specialization = true; if (is_array(type) || type.basetype == SPIRType::Struct) { constant.subconstants = initializers; } else if (is_matrix(type)) { constant.m.columns = type.columns; for (uint32_t i = 0; i < type.columns; ++i) { constant.m.id[i] = initializers[i]; constant.m.c[i].vecsize = type.vecsize; } } else if (is_vector(type)) { constant.m.c[0].vecsize = type.vecsize; for (uint32_t i = 0; i < type.vecsize; ++i) constant.m.c[0].id[i] = initializers[i]; } else SPIRV_CROSS_THROW("Unexpected scalar in SpecConstantOp CompositeInsert!"); } void CompilerGLSL::set_composite_constant(ConstantID const_id, TypeID type_id, const SmallVector &initializers) { if (maybe_get(const_id)) { const_composite_insert_ids[const_id] = initializers; return; } auto &constant = set(const_id, type_id); fill_composite_constant(constant, type_id, initializers); forwarded_temporaries.insert(const_id); } TypeID CompilerGLSL::get_composite_member_type(TypeID type_id, uint32_t member_idx) { auto &type = get(type_id); if (is_array(type)) return type.parent_type; if (type.basetype == SPIRType::Struct) return type.member_types[member_idx]; if (is_matrix(type)) return type.parent_type; if (is_vector(type)) return type.parent_type; SPIRV_CROSS_THROW("Shouldn't reach lower than vector handling OpSpecConstantOp CompositeInsert!"); } string CompilerGLSL::constant_op_expression(const SPIRConstantOp &cop) { auto &type = get(cop.basetype); bool binary = false; bool unary = false; string op; if (is_legacy() && is_unsigned_opcode(cop.opcode)) SPIRV_CROSS_THROW("Unsigned integers are not supported on legacy targets."); // TODO: Find a clean way to reuse emit_instruction. switch (cop.opcode) { case OpSConvert: case OpUConvert: case OpFConvert: op = type_to_glsl_constructor(type); break; #define GLSL_BOP(opname, x) \ case Op##opname: \ binary = true; \ op = x; \ break #define GLSL_UOP(opname, x) \ case Op##opname: \ unary = true; \ op = x; \ break GLSL_UOP(SNegate, "-"); GLSL_UOP(Not, "~"); GLSL_BOP(IAdd, "+"); GLSL_BOP(ISub, "-"); GLSL_BOP(IMul, "*"); GLSL_BOP(SDiv, "/"); GLSL_BOP(UDiv, "/"); GLSL_BOP(UMod, "%"); GLSL_BOP(SMod, "%"); GLSL_BOP(ShiftRightLogical, ">>"); GLSL_BOP(ShiftRightArithmetic, ">>"); GLSL_BOP(ShiftLeftLogical, "<<"); GLSL_BOP(BitwiseOr, "|"); GLSL_BOP(BitwiseXor, "^"); GLSL_BOP(BitwiseAnd, "&"); GLSL_BOP(LogicalOr, "||"); GLSL_BOP(LogicalAnd, "&&"); GLSL_UOP(LogicalNot, "!"); GLSL_BOP(LogicalEqual, "=="); GLSL_BOP(LogicalNotEqual, "!="); GLSL_BOP(IEqual, "=="); GLSL_BOP(INotEqual, "!="); GLSL_BOP(ULessThan, "<"); GLSL_BOP(SLessThan, "<"); GLSL_BOP(ULessThanEqual, "<="); GLSL_BOP(SLessThanEqual, "<="); GLSL_BOP(UGreaterThan, ">"); GLSL_BOP(SGreaterThan, ">"); GLSL_BOP(UGreaterThanEqual, ">="); GLSL_BOP(SGreaterThanEqual, ">="); case OpSRem: { uint32_t op0 = cop.arguments[0]; uint32_t op1 = cop.arguments[1]; return join(to_enclosed_expression(op0), " - ", to_enclosed_expression(op1), " * ", "(", to_enclosed_expression(op0), " / ", to_enclosed_expression(op1), ")"); } case OpSelect: { if (cop.arguments.size() < 3) SPIRV_CROSS_THROW("Not enough arguments to OpSpecConstantOp."); // This one is pretty annoying. It's triggered from // uint(bool), int(bool) from spec constants. // In order to preserve its compile-time constness in Vulkan GLSL, // we need to reduce the OpSelect expression back to this simplified model. // If we cannot, fail. if (to_trivial_mix_op(type, op, cop.arguments[2], cop.arguments[1], cop.arguments[0])) { // Implement as a simple cast down below. } else { // Implement a ternary and pray the compiler understands it :) return to_ternary_expression(type, cop.arguments[0], cop.arguments[1], cop.arguments[2]); } break; } case OpVectorShuffle: { string expr = type_to_glsl_constructor(type); expr += "("; uint32_t left_components = expression_type(cop.arguments[0]).vecsize; string left_arg = to_enclosed_expression(cop.arguments[0]); string right_arg = to_enclosed_expression(cop.arguments[1]); for (uint32_t i = 2; i < uint32_t(cop.arguments.size()); i++) { uint32_t index = cop.arguments[i]; if (index == 0xFFFFFFFF) { SPIRConstant c; c.constant_type = type.parent_type; assert(type.parent_type != ID(0)); expr += constant_expression(c); } else if (index >= left_components) { expr += right_arg + "." + "xyzw"[index - left_components]; } else { expr += left_arg + "." + "xyzw"[index]; } if (i + 1 < uint32_t(cop.arguments.size())) expr += ", "; } expr += ")"; return expr; } case OpCompositeExtract: { auto expr = access_chain_internal(cop.arguments[0], &cop.arguments[1], uint32_t(cop.arguments.size() - 1), ACCESS_CHAIN_INDEX_IS_LITERAL_BIT, nullptr); return expr; } case OpCompositeInsert: { SmallVector new_init = get_composite_constant_ids(cop.arguments[1]); uint32_t idx; uint32_t target_id = cop.self; uint32_t target_type_id = cop.basetype; // We have to drill down to the part we want to modify, and create new // constants for each containing part. for (idx = 2; idx < cop.arguments.size() - 1; ++idx) { uint32_t new_const = ir.increase_bound_by(1); uint32_t old_const = new_init[cop.arguments[idx]]; new_init[cop.arguments[idx]] = new_const; set_composite_constant(target_id, target_type_id, new_init); new_init = get_composite_constant_ids(old_const); target_id = new_const; target_type_id = get_composite_member_type(target_type_id, cop.arguments[idx]); } // Now replace the initializer with the one from this instruction. new_init[cop.arguments[idx]] = cop.arguments[0]; set_composite_constant(target_id, target_type_id, new_init); SPIRConstant tmp_const(cop.basetype); fill_composite_constant(tmp_const, cop.basetype, const_composite_insert_ids[cop.self]); return constant_expression(tmp_const); } default: // Some opcodes are unimplemented here, these are currently not possible to test from glslang. SPIRV_CROSS_THROW("Unimplemented spec constant op."); } uint32_t bit_width = 0; if (unary || binary || cop.opcode == OpSConvert || cop.opcode == OpUConvert) bit_width = expression_type(cop.arguments[0]).width; SPIRType::BaseType input_type; bool skip_cast_if_equal_type = opcode_is_sign_invariant(cop.opcode); switch (cop.opcode) { case OpIEqual: case OpINotEqual: input_type = to_signed_basetype(bit_width); break; case OpSLessThan: case OpSLessThanEqual: case OpSGreaterThan: case OpSGreaterThanEqual: case OpSMod: case OpSDiv: case OpShiftRightArithmetic: case OpSConvert: case OpSNegate: input_type = to_signed_basetype(bit_width); break; case OpULessThan: case OpULessThanEqual: case OpUGreaterThan: case OpUGreaterThanEqual: case OpUMod: case OpUDiv: case OpShiftRightLogical: case OpUConvert: input_type = to_unsigned_basetype(bit_width); break; default: input_type = type.basetype; break; } #undef GLSL_BOP #undef GLSL_UOP if (binary) { if (cop.arguments.size() < 2) SPIRV_CROSS_THROW("Not enough arguments to OpSpecConstantOp."); string cast_op0; string cast_op1; auto expected_type = binary_op_bitcast_helper(cast_op0, cast_op1, input_type, cop.arguments[0], cop.arguments[1], skip_cast_if_equal_type); if (type.basetype != input_type && type.basetype != SPIRType::Boolean) { expected_type.basetype = input_type; auto expr = bitcast_glsl_op(type, expected_type); expr += '('; expr += join(cast_op0, " ", op, " ", cast_op1); expr += ')'; return expr; } else return join("(", cast_op0, " ", op, " ", cast_op1, ")"); } else if (unary) { if (cop.arguments.size() < 1) SPIRV_CROSS_THROW("Not enough arguments to OpSpecConstantOp."); // Auto-bitcast to result type as needed. // Works around various casting scenarios in glslang as there is no OpBitcast for specialization constants. return join("(", op, bitcast_glsl(type, cop.arguments[0]), ")"); } else if (cop.opcode == OpSConvert || cop.opcode == OpUConvert) { if (cop.arguments.size() < 1) SPIRV_CROSS_THROW("Not enough arguments to OpSpecConstantOp."); auto &arg_type = expression_type(cop.arguments[0]); if (arg_type.width < type.width && input_type != arg_type.basetype) { auto expected = arg_type; expected.basetype = input_type; return join(op, "(", bitcast_glsl(expected, cop.arguments[0]), ")"); } else return join(op, "(", to_expression(cop.arguments[0]), ")"); } else { if (cop.arguments.size() < 1) SPIRV_CROSS_THROW("Not enough arguments to OpSpecConstantOp."); return join(op, "(", to_expression(cop.arguments[0]), ")"); } } string CompilerGLSL::constant_expression(const SPIRConstant &c, bool inside_block_like_struct_scope, bool inside_struct_scope) { auto &type = get(c.constant_type); if (is_pointer(type)) { return backend.null_pointer_literal; } else if (!c.subconstants.empty()) { // Handles Arrays and structures. string res; // Only consider the decay if we are inside a struct scope where we are emitting a member with Offset decoration. // Outside a block-like struct declaration, we can always bind to a constant array with templated type. // Should look at ArrayStride here as well, but it's possible to declare a constant struct // with Offset = 0, using no ArrayStride on the enclosed array type. // A particular CTS test hits this scenario. bool array_type_decays = inside_block_like_struct_scope && is_array(type) && !backend.array_is_value_type_in_buffer_blocks; // Allow Metal to use the array template to make arrays a value type bool needs_trailing_tracket = false; if (backend.use_initializer_list && backend.use_typed_initializer_list && type.basetype == SPIRType::Struct && !is_array(type)) { res = type_to_glsl_constructor(type) + "{ "; } else if (backend.use_initializer_list && backend.use_typed_initializer_list && backend.array_is_value_type && is_array(type) && !array_type_decays) { const auto *p_type = &type; SPIRType tmp_type { OpNop }; if (inside_struct_scope && backend.boolean_in_struct_remapped_type != SPIRType::Boolean && type.basetype == SPIRType::Boolean) { tmp_type = type; tmp_type.basetype = backend.boolean_in_struct_remapped_type; p_type = &tmp_type; } res = type_to_glsl_constructor(*p_type) + "({ "; needs_trailing_tracket = true; } else if (backend.use_initializer_list) { res = "{ "; } else { res = type_to_glsl_constructor(type) + "("; } uint32_t subconstant_index = 0; for (auto &elem : c.subconstants) { if (auto *op = maybe_get(elem)) { res += constant_op_expression(*op); } else if (maybe_get(elem) != nullptr) { res += to_name(elem); } else { auto &subc = get(elem); if (subc.specialization && !expression_is_forwarded(elem)) res += to_name(elem); else { if (!is_array(type) && type.basetype == SPIRType::Struct) { // When we get down to emitting struct members, override the block-like information. // For constants, we can freely mix and match block-like state. inside_block_like_struct_scope = has_member_decoration(type.self, subconstant_index, DecorationOffset); } if (type.basetype == SPIRType::Struct) inside_struct_scope = true; res += constant_expression(subc, inside_block_like_struct_scope, inside_struct_scope); } } if (&elem != &c.subconstants.back()) res += ", "; subconstant_index++; } res += backend.use_initializer_list ? " }" : ")"; if (needs_trailing_tracket) res += ")"; return res; } else if (type.basetype == SPIRType::Struct && type.member_types.size() == 0) { // Metal tessellation likes empty structs which are then constant expressions. if (backend.supports_empty_struct) return "{ }"; else if (backend.use_typed_initializer_list) return join(type_to_glsl(type), "{ 0 }"); else if (backend.use_initializer_list) return "{ 0 }"; else return join(type_to_glsl(type), "(0)"); } else if (c.columns() == 1) { auto res = constant_expression_vector(c, 0); if (inside_struct_scope && backend.boolean_in_struct_remapped_type != SPIRType::Boolean && type.basetype == SPIRType::Boolean) { SPIRType tmp_type = type; tmp_type.basetype = backend.boolean_in_struct_remapped_type; res = join(type_to_glsl(tmp_type), "(", res, ")"); } return res; } else { string res = type_to_glsl(type) + "("; for (uint32_t col = 0; col < c.columns(); col++) { if (c.specialization_constant_id(col) != 0) res += to_name(c.specialization_constant_id(col)); else res += constant_expression_vector(c, col); if (col + 1 < c.columns()) res += ", "; } res += ")"; if (inside_struct_scope && backend.boolean_in_struct_remapped_type != SPIRType::Boolean && type.basetype == SPIRType::Boolean) { SPIRType tmp_type = type; tmp_type.basetype = backend.boolean_in_struct_remapped_type; res = join(type_to_glsl(tmp_type), "(", res, ")"); } return res; } } #ifdef _MSC_VER // snprintf does not exist or is buggy on older MSVC versions, some of them // being used by MinGW. Use sprintf instead and disable corresponding warning. #pragma warning(push) #pragma warning(disable : 4996) #endif string CompilerGLSL::convert_half_to_string(const SPIRConstant &c, uint32_t col, uint32_t row) { string res; float float_value = c.scalar_f16(col, row); // There is no literal "hf" in GL_NV_gpu_shader5, so to avoid lots // of complicated workarounds, just value-cast to the half type always. if (std::isnan(float_value) || std::isinf(float_value)) { SPIRType type { OpTypeFloat }; type.basetype = SPIRType::Half; type.vecsize = 1; type.columns = 1; if (float_value == numeric_limits::infinity()) res = join(type_to_glsl(type), "(1.0 / 0.0)"); else if (float_value == -numeric_limits::infinity()) res = join(type_to_glsl(type), "(-1.0 / 0.0)"); else if (std::isnan(float_value)) res = join(type_to_glsl(type), "(0.0 / 0.0)"); else SPIRV_CROSS_THROW("Cannot represent non-finite floating point constant."); } else { SPIRType type { OpTypeFloat }; type.basetype = SPIRType::Half; type.vecsize = 1; type.columns = 1; res = join(type_to_glsl(type), "(", format_float(float_value), ")"); } return res; } string CompilerGLSL::convert_float_to_string(const SPIRConstant &c, uint32_t col, uint32_t row) { string res; float float_value = c.scalar_f32(col, row); if (std::isnan(float_value) || std::isinf(float_value)) { // Use special representation. if (!is_legacy()) { SPIRType out_type { OpTypeFloat }; SPIRType in_type { OpTypeInt }; out_type.basetype = SPIRType::Float; in_type.basetype = SPIRType::UInt; out_type.vecsize = 1; in_type.vecsize = 1; out_type.width = 32; in_type.width = 32; char print_buffer[32]; #ifdef _WIN32 sprintf(print_buffer, "0x%xu", c.scalar(col, row)); #else snprintf(print_buffer, sizeof(print_buffer), "0x%xu", c.scalar(col, row)); #endif const char *comment = "inf"; if (float_value == -numeric_limits::infinity()) comment = "-inf"; else if (std::isnan(float_value)) comment = "nan"; res = join(bitcast_glsl_op(out_type, in_type), "(", print_buffer, " /* ", comment, " */)"); } else { if (float_value == numeric_limits::infinity()) { if (backend.float_literal_suffix) res = "(1.0f / 0.0f)"; else res = "(1.0 / 0.0)"; } else if (float_value == -numeric_limits::infinity()) { if (backend.float_literal_suffix) res = "(-1.0f / 0.0f)"; else res = "(-1.0 / 0.0)"; } else if (std::isnan(float_value)) { if (backend.float_literal_suffix) res = "(0.0f / 0.0f)"; else res = "(0.0 / 0.0)"; } else SPIRV_CROSS_THROW("Cannot represent non-finite floating point constant."); } } else { res = format_float(float_value); if (backend.float_literal_suffix) res += "f"; } return res; } std::string CompilerGLSL::convert_double_to_string(const SPIRConstant &c, uint32_t col, uint32_t row) { string res; double double_value = c.scalar_f64(col, row); if (std::isnan(double_value) || std::isinf(double_value)) { // Use special representation. if (!is_legacy()) { SPIRType out_type { OpTypeFloat }; SPIRType in_type { OpTypeInt }; out_type.basetype = SPIRType::Double; in_type.basetype = SPIRType::UInt64; out_type.vecsize = 1; in_type.vecsize = 1; out_type.width = 64; in_type.width = 64; uint64_t u64_value = c.scalar_u64(col, row); if (options.es && options.version < 310) // GL_NV_gpu_shader5 fallback requires 310. SPIRV_CROSS_THROW("64-bit integers not supported in ES profile before version 310."); require_extension_internal("GL_ARB_gpu_shader_int64"); char print_buffer[64]; #ifdef _WIN32 sprintf(print_buffer, "0x%llx%s", static_cast(u64_value), backend.long_long_literal_suffix ? "ull" : "ul"); #else snprintf(print_buffer, sizeof(print_buffer), "0x%llx%s", static_cast(u64_value), backend.long_long_literal_suffix ? "ull" : "ul"); #endif const char *comment = "inf"; if (double_value == -numeric_limits::infinity()) comment = "-inf"; else if (std::isnan(double_value)) comment = "nan"; res = join(bitcast_glsl_op(out_type, in_type), "(", print_buffer, " /* ", comment, " */)"); } else { if (options.es) SPIRV_CROSS_THROW("FP64 not supported in ES profile."); if (options.version < 400) require_extension_internal("GL_ARB_gpu_shader_fp64"); if (double_value == numeric_limits::infinity()) { if (backend.double_literal_suffix) res = "(1.0lf / 0.0lf)"; else res = "(1.0 / 0.0)"; } else if (double_value == -numeric_limits::infinity()) { if (backend.double_literal_suffix) res = "(-1.0lf / 0.0lf)"; else res = "(-1.0 / 0.0)"; } else if (std::isnan(double_value)) { if (backend.double_literal_suffix) res = "(0.0lf / 0.0lf)"; else res = "(0.0 / 0.0)"; } else SPIRV_CROSS_THROW("Cannot represent non-finite floating point constant."); } } else { res = format_double(double_value); if (backend.double_literal_suffix) res += "lf"; } return res; } #ifdef _MSC_VER #pragma warning(pop) #endif string CompilerGLSL::constant_expression_vector(const SPIRConstant &c, uint32_t vector) { auto type = get(c.constant_type); type.columns = 1; auto scalar_type = type; scalar_type.vecsize = 1; string res; bool splat = backend.use_constructor_splatting && c.vector_size() > 1; bool swizzle_splat = backend.can_swizzle_scalar && c.vector_size() > 1; if (!type_is_floating_point(type)) { // Cannot swizzle literal integers as a special case. swizzle_splat = false; } if (splat || swizzle_splat) { // Cannot use constant splatting if we have specialization constants somewhere in the vector. for (uint32_t i = 0; i < c.vector_size(); i++) { if (c.specialization_constant_id(vector, i) != 0) { splat = false; swizzle_splat = false; break; } } } if (splat || swizzle_splat) { if (type.width == 64) { uint64_t ident = c.scalar_u64(vector, 0); for (uint32_t i = 1; i < c.vector_size(); i++) { if (ident != c.scalar_u64(vector, i)) { splat = false; swizzle_splat = false; break; } } } else { uint32_t ident = c.scalar(vector, 0); for (uint32_t i = 1; i < c.vector_size(); i++) { if (ident != c.scalar(vector, i)) { splat = false; swizzle_splat = false; } } } } if (c.vector_size() > 1 && !swizzle_splat) res += type_to_glsl(type) + "("; switch (type.basetype) { case SPIRType::Half: if (splat || swizzle_splat) { res += convert_half_to_string(c, vector, 0); if (swizzle_splat) res = remap_swizzle(get(c.constant_type), 1, res); } else { for (uint32_t i = 0; i < c.vector_size(); i++) { if (c.vector_size() > 1 && c.specialization_constant_id(vector, i) != 0) res += to_expression(c.specialization_constant_id(vector, i)); else res += convert_half_to_string(c, vector, i); if (i + 1 < c.vector_size()) res += ", "; } } break; case SPIRType::Float: if (splat || swizzle_splat) { res += convert_float_to_string(c, vector, 0); if (swizzle_splat) res = remap_swizzle(get(c.constant_type), 1, res); } else { for (uint32_t i = 0; i < c.vector_size(); i++) { if (c.vector_size() > 1 && c.specialization_constant_id(vector, i) != 0) res += to_expression(c.specialization_constant_id(vector, i)); else res += convert_float_to_string(c, vector, i); if (i + 1 < c.vector_size()) res += ", "; } } break; case SPIRType::Double: if (splat || swizzle_splat) { res += convert_double_to_string(c, vector, 0); if (swizzle_splat) res = remap_swizzle(get(c.constant_type), 1, res); } else { for (uint32_t i = 0; i < c.vector_size(); i++) { if (c.vector_size() > 1 && c.specialization_constant_id(vector, i) != 0) res += to_expression(c.specialization_constant_id(vector, i)); else res += convert_double_to_string(c, vector, i); if (i + 1 < c.vector_size()) res += ", "; } } break; case SPIRType::Int64: { auto tmp = type; tmp.vecsize = 1; tmp.columns = 1; auto int64_type = type_to_glsl(tmp); if (splat) { res += convert_to_string(c.scalar_i64(vector, 0), int64_type, backend.long_long_literal_suffix); } else { for (uint32_t i = 0; i < c.vector_size(); i++) { if (c.vector_size() > 1 && c.specialization_constant_id(vector, i) != 0) res += to_expression(c.specialization_constant_id(vector, i)); else res += convert_to_string(c.scalar_i64(vector, i), int64_type, backend.long_long_literal_suffix); if (i + 1 < c.vector_size()) res += ", "; } } break; } case SPIRType::UInt64: if (splat) { res += convert_to_string(c.scalar_u64(vector, 0)); if (backend.long_long_literal_suffix) res += "ull"; else res += "ul"; } else { for (uint32_t i = 0; i < c.vector_size(); i++) { if (c.vector_size() > 1 && c.specialization_constant_id(vector, i) != 0) res += to_expression(c.specialization_constant_id(vector, i)); else { res += convert_to_string(c.scalar_u64(vector, i)); if (backend.long_long_literal_suffix) res += "ull"; else res += "ul"; } if (i + 1 < c.vector_size()) res += ", "; } } break; case SPIRType::UInt: if (splat) { res += convert_to_string(c.scalar(vector, 0)); if (is_legacy()) { // Fake unsigned constant literals with signed ones if possible. // Things like array sizes, etc, tend to be unsigned even though they could just as easily be signed. if (c.scalar_i32(vector, 0) < 0) SPIRV_CROSS_THROW("Tried to convert uint literal into int, but this made the literal negative."); } else if (backend.uint32_t_literal_suffix) res += "u"; } else { for (uint32_t i = 0; i < c.vector_size(); i++) { if (c.vector_size() > 1 && c.specialization_constant_id(vector, i) != 0) res += to_expression(c.specialization_constant_id(vector, i)); else { res += convert_to_string(c.scalar(vector, i)); if (is_legacy()) { // Fake unsigned constant literals with signed ones if possible. // Things like array sizes, etc, tend to be unsigned even though they could just as easily be signed. if (c.scalar_i32(vector, i) < 0) SPIRV_CROSS_THROW("Tried to convert uint literal into int, but this made " "the literal negative."); } else if (backend.uint32_t_literal_suffix) res += "u"; } if (i + 1 < c.vector_size()) res += ", "; } } break; case SPIRType::Int: if (splat) res += convert_to_string(c.scalar_i32(vector, 0)); else { for (uint32_t i = 0; i < c.vector_size(); i++) { if (c.vector_size() > 1 && c.specialization_constant_id(vector, i) != 0) res += to_expression(c.specialization_constant_id(vector, i)); else res += convert_to_string(c.scalar_i32(vector, i)); if (i + 1 < c.vector_size()) res += ", "; } } break; case SPIRType::UShort: if (splat) { res += convert_to_string(c.scalar(vector, 0)); } else { for (uint32_t i = 0; i < c.vector_size(); i++) { if (c.vector_size() > 1 && c.specialization_constant_id(vector, i) != 0) res += to_expression(c.specialization_constant_id(vector, i)); else { if (*backend.uint16_t_literal_suffix) { res += convert_to_string(c.scalar_u16(vector, i)); res += backend.uint16_t_literal_suffix; } else { // If backend doesn't have a literal suffix, we need to value cast. res += type_to_glsl(scalar_type); res += "("; res += convert_to_string(c.scalar_u16(vector, i)); res += ")"; } } if (i + 1 < c.vector_size()) res += ", "; } } break; case SPIRType::Short: if (splat) { res += convert_to_string(c.scalar_i16(vector, 0)); } else { for (uint32_t i = 0; i < c.vector_size(); i++) { if (c.vector_size() > 1 && c.specialization_constant_id(vector, i) != 0) res += to_expression(c.specialization_constant_id(vector, i)); else { if (*backend.int16_t_literal_suffix) { res += convert_to_string(c.scalar_i16(vector, i)); res += backend.int16_t_literal_suffix; } else { // If backend doesn't have a literal suffix, we need to value cast. res += type_to_glsl(scalar_type); res += "("; res += convert_to_string(c.scalar_i16(vector, i)); res += ")"; } } if (i + 1 < c.vector_size()) res += ", "; } } break; case SPIRType::UByte: if (splat) { res += convert_to_string(c.scalar_u8(vector, 0)); } else { for (uint32_t i = 0; i < c.vector_size(); i++) { if (c.vector_size() > 1 && c.specialization_constant_id(vector, i) != 0) res += to_expression(c.specialization_constant_id(vector, i)); else { res += type_to_glsl(scalar_type); res += "("; res += convert_to_string(c.scalar_u8(vector, i)); res += ")"; } if (i + 1 < c.vector_size()) res += ", "; } } break; case SPIRType::SByte: if (splat) { res += convert_to_string(c.scalar_i8(vector, 0)); } else { for (uint32_t i = 0; i < c.vector_size(); i++) { if (c.vector_size() > 1 && c.specialization_constant_id(vector, i) != 0) res += to_expression(c.specialization_constant_id(vector, i)); else { res += type_to_glsl(scalar_type); res += "("; res += convert_to_string(c.scalar_i8(vector, i)); res += ")"; } if (i + 1 < c.vector_size()) res += ", "; } } break; case SPIRType::Boolean: if (splat) res += c.scalar(vector, 0) ? "true" : "false"; else { for (uint32_t i = 0; i < c.vector_size(); i++) { if (c.vector_size() > 1 && c.specialization_constant_id(vector, i) != 0) res += to_expression(c.specialization_constant_id(vector, i)); else res += c.scalar(vector, i) ? "true" : "false"; if (i + 1 < c.vector_size()) res += ", "; } } break; default: SPIRV_CROSS_THROW("Invalid constant expression basetype."); } if (c.vector_size() > 1 && !swizzle_splat) res += ")"; return res; } SPIRExpression &CompilerGLSL::emit_uninitialized_temporary_expression(uint32_t type, uint32_t id) { forced_temporaries.insert(id); emit_uninitialized_temporary(type, id); return set(id, to_name(id), type, true); } void CompilerGLSL::emit_uninitialized_temporary(uint32_t result_type, uint32_t result_id) { // If we're declaring temporaries inside continue blocks, // we must declare the temporary in the loop header so that the continue block can avoid declaring new variables. if (!block_temporary_hoisting && current_continue_block && !hoisted_temporaries.count(result_id)) { auto &header = get(current_continue_block->loop_dominator); if (find_if(begin(header.declare_temporary), end(header.declare_temporary), [result_type, result_id](const pair &tmp) { return tmp.first == result_type && tmp.second == result_id; }) == end(header.declare_temporary)) { header.declare_temporary.emplace_back(result_type, result_id); hoisted_temporaries.insert(result_id); force_recompile(); } } else if (hoisted_temporaries.count(result_id) == 0) { auto &type = get(result_type); auto &flags = get_decoration_bitset(result_id); // The result_id has not been made into an expression yet, so use flags interface. add_local_variable_name(result_id); string initializer; if (options.force_zero_initialized_variables && type_can_zero_initialize(type)) initializer = join(" = ", to_zero_initialized_expression(result_type)); statement(flags_to_qualifiers_glsl(type, flags), variable_decl(type, to_name(result_id)), initializer, ";"); } } string CompilerGLSL::declare_temporary(uint32_t result_type, uint32_t result_id) { auto &type = get(result_type); // If we're declaring temporaries inside continue blocks, // we must declare the temporary in the loop header so that the continue block can avoid declaring new variables. if (!block_temporary_hoisting && current_continue_block && !hoisted_temporaries.count(result_id)) { auto &header = get(current_continue_block->loop_dominator); if (find_if(begin(header.declare_temporary), end(header.declare_temporary), [result_type, result_id](const pair &tmp) { return tmp.first == result_type && tmp.second == result_id; }) == end(header.declare_temporary)) { header.declare_temporary.emplace_back(result_type, result_id); hoisted_temporaries.insert(result_id); force_recompile_guarantee_forward_progress(); } return join(to_name(result_id), " = "); } else if (hoisted_temporaries.count(result_id)) { // The temporary has already been declared earlier, so just "declare" the temporary by writing to it. return join(to_name(result_id), " = "); } else { // The result_id has not been made into an expression yet, so use flags interface. add_local_variable_name(result_id); auto &flags = get_decoration_bitset(result_id); return join(flags_to_qualifiers_glsl(type, flags), variable_decl(type, to_name(result_id)), " = "); } } bool CompilerGLSL::expression_is_forwarded(uint32_t id) const { return forwarded_temporaries.count(id) != 0; } bool CompilerGLSL::expression_suppresses_usage_tracking(uint32_t id) const { return suppressed_usage_tracking.count(id) != 0; } bool CompilerGLSL::expression_read_implies_multiple_reads(uint32_t id) const { auto *expr = maybe_get(id); if (!expr) return false; // If we're emitting code at a deeper loop level than when we emitted the expression, // we're probably reading the same expression over and over. return current_loop_level > expr->emitted_loop_level; } SPIRExpression &CompilerGLSL::emit_op(uint32_t result_type, uint32_t result_id, const string &rhs, bool forwarding, bool suppress_usage_tracking) { if (forwarding && (forced_temporaries.find(result_id) == end(forced_temporaries))) { // Just forward it without temporary. // If the forward is trivial, we do not force flushing to temporary for this expression. forwarded_temporaries.insert(result_id); if (suppress_usage_tracking) suppressed_usage_tracking.insert(result_id); return set(result_id, rhs, result_type, true); } else { // If expression isn't immutable, bind it to a temporary and make the new temporary immutable (they always are). statement(declare_temporary(result_type, result_id), rhs, ";"); return set(result_id, to_name(result_id), result_type, true); } } void CompilerGLSL::emit_unary_op(uint32_t result_type, uint32_t result_id, uint32_t op0, const char *op) { bool forward = should_forward(op0); emit_op(result_type, result_id, join(op, to_enclosed_unpacked_expression(op0)), forward); inherit_expression_dependencies(result_id, op0); } void CompilerGLSL::emit_unary_op_cast(uint32_t result_type, uint32_t result_id, uint32_t op0, const char *op) { auto &type = get(result_type); bool forward = should_forward(op0); emit_op(result_type, result_id, join(type_to_glsl(type), "(", op, to_enclosed_unpacked_expression(op0), ")"), forward); inherit_expression_dependencies(result_id, op0); } void CompilerGLSL::emit_mesh_tasks(SPIRBlock &block) { statement("EmitMeshTasksEXT(", to_unpacked_expression(block.mesh.groups[0]), ", ", to_unpacked_expression(block.mesh.groups[1]), ", ", to_unpacked_expression(block.mesh.groups[2]), ");"); } void CompilerGLSL::emit_binary_op(uint32_t result_type, uint32_t result_id, uint32_t op0, uint32_t op1, const char *op) { // Various FP arithmetic opcodes such as add, sub, mul will hit this. bool force_temporary_precise = backend.support_precise_qualifier && has_decoration(result_id, DecorationNoContraction) && type_is_floating_point(get(result_type)); bool forward = should_forward(op0) && should_forward(op1) && !force_temporary_precise; emit_op(result_type, result_id, join(to_enclosed_unpacked_expression(op0), " ", op, " ", to_enclosed_unpacked_expression(op1)), forward); inherit_expression_dependencies(result_id, op0); inherit_expression_dependencies(result_id, op1); } void CompilerGLSL::emit_unrolled_unary_op(uint32_t result_type, uint32_t result_id, uint32_t operand, const char *op) { auto &type = get(result_type); auto expr = type_to_glsl_constructor(type); expr += '('; for (uint32_t i = 0; i < type.vecsize; i++) { // Make sure to call to_expression multiple times to ensure // that these expressions are properly flushed to temporaries if needed. expr += op; expr += to_extract_component_expression(operand, i); if (i + 1 < type.vecsize) expr += ", "; } expr += ')'; emit_op(result_type, result_id, expr, should_forward(operand)); inherit_expression_dependencies(result_id, operand); } void CompilerGLSL::emit_unrolled_binary_op(uint32_t result_type, uint32_t result_id, uint32_t op0, uint32_t op1, const char *op, bool negate, SPIRType::BaseType expected_type) { auto &type0 = expression_type(op0); auto &type1 = expression_type(op1); SPIRType target_type0 = type0; SPIRType target_type1 = type1; target_type0.basetype = expected_type; target_type1.basetype = expected_type; target_type0.vecsize = 1; target_type1.vecsize = 1; auto &type = get(result_type); auto expr = type_to_glsl_constructor(type); expr += '('; for (uint32_t i = 0; i < type.vecsize; i++) { // Make sure to call to_expression multiple times to ensure // that these expressions are properly flushed to temporaries if needed. if (negate) expr += "!("; if (expected_type != SPIRType::Unknown && type0.basetype != expected_type) expr += bitcast_expression(target_type0, type0.basetype, to_extract_component_expression(op0, i)); else expr += to_extract_component_expression(op0, i); expr += ' '; expr += op; expr += ' '; if (expected_type != SPIRType::Unknown && type1.basetype != expected_type) expr += bitcast_expression(target_type1, type1.basetype, to_extract_component_expression(op1, i)); else expr += to_extract_component_expression(op1, i); if (negate) expr += ")"; if (i + 1 < type.vecsize) expr += ", "; } expr += ')'; emit_op(result_type, result_id, expr, should_forward(op0) && should_forward(op1)); inherit_expression_dependencies(result_id, op0); inherit_expression_dependencies(result_id, op1); } SPIRType CompilerGLSL::binary_op_bitcast_helper(string &cast_op0, string &cast_op1, SPIRType::BaseType &input_type, uint32_t op0, uint32_t op1, bool skip_cast_if_equal_type) { auto &type0 = expression_type(op0); auto &type1 = expression_type(op1); // We have to bitcast if our inputs are of different type, or if our types are not equal to expected inputs. // For some functions like OpIEqual and INotEqual, we don't care if inputs are of different types than expected // since equality test is exactly the same. bool cast = (type0.basetype != type1.basetype) || (!skip_cast_if_equal_type && type0.basetype != input_type); // Create a fake type so we can bitcast to it. // We only deal with regular arithmetic types here like int, uints and so on. SPIRType expected_type{type0.op}; expected_type.basetype = input_type; expected_type.vecsize = type0.vecsize; expected_type.columns = type0.columns; expected_type.width = type0.width; if (cast) { cast_op0 = bitcast_glsl(expected_type, op0); cast_op1 = bitcast_glsl(expected_type, op1); } else { // If we don't cast, our actual input type is that of the first (or second) argument. cast_op0 = to_enclosed_unpacked_expression(op0); cast_op1 = to_enclosed_unpacked_expression(op1); input_type = type0.basetype; } return expected_type; } bool CompilerGLSL::emit_complex_bitcast(uint32_t result_type, uint32_t id, uint32_t op0) { // Some bitcasts may require complex casting sequences, and are implemented here. // Otherwise a simply unary function will do with bitcast_glsl_op. auto &output_type = get(result_type); auto &input_type = expression_type(op0); string expr; if (output_type.basetype == SPIRType::Half && input_type.basetype == SPIRType::Float && input_type.vecsize == 1) expr = join("unpackFloat2x16(floatBitsToUint(", to_unpacked_expression(op0), "))"); else if (output_type.basetype == SPIRType::Float && input_type.basetype == SPIRType::Half && input_type.vecsize == 2) expr = join("uintBitsToFloat(packFloat2x16(", to_unpacked_expression(op0), "))"); else return false; emit_op(result_type, id, expr, should_forward(op0)); return true; } void CompilerGLSL::emit_binary_op_cast(uint32_t result_type, uint32_t result_id, uint32_t op0, uint32_t op1, const char *op, SPIRType::BaseType input_type, bool skip_cast_if_equal_type, bool implicit_integer_promotion) { string cast_op0, cast_op1; auto expected_type = binary_op_bitcast_helper(cast_op0, cast_op1, input_type, op0, op1, skip_cast_if_equal_type); auto &out_type = get(result_type); // We might have casted away from the result type, so bitcast again. // For example, arithmetic right shift with uint inputs. // Special case boolean outputs since relational opcodes output booleans instead of int/uint. auto bitop = join(cast_op0, " ", op, " ", cast_op1); string expr; if (implicit_integer_promotion) { // Simple value cast. expr = join(type_to_glsl(out_type), '(', bitop, ')'); } else if (out_type.basetype != input_type && out_type.basetype != SPIRType::Boolean) { expected_type.basetype = input_type; expr = join(bitcast_glsl_op(out_type, expected_type), '(', bitop, ')'); } else { expr = std::move(bitop); } emit_op(result_type, result_id, expr, should_forward(op0) && should_forward(op1)); inherit_expression_dependencies(result_id, op0); inherit_expression_dependencies(result_id, op1); } void CompilerGLSL::emit_unary_func_op(uint32_t result_type, uint32_t result_id, uint32_t op0, const char *op) { bool forward = should_forward(op0); emit_op(result_type, result_id, join(op, "(", to_unpacked_expression(op0), ")"), forward); inherit_expression_dependencies(result_id, op0); } void CompilerGLSL::emit_binary_func_op(uint32_t result_type, uint32_t result_id, uint32_t op0, uint32_t op1, const char *op) { // Opaque types (e.g. OpTypeSampledImage) must always be forwarded in GLSL const auto &type = get_type(result_type); bool must_forward = type_is_opaque_value(type); bool forward = must_forward || (should_forward(op0) && should_forward(op1)); emit_op(result_type, result_id, join(op, "(", to_unpacked_expression(op0), ", ", to_unpacked_expression(op1), ")"), forward); inherit_expression_dependencies(result_id, op0); inherit_expression_dependencies(result_id, op1); } void CompilerGLSL::emit_atomic_func_op(uint32_t result_type, uint32_t result_id, uint32_t op0, uint32_t op1, const char *op) { auto &type = get(result_type); if (type_is_floating_point(type)) { if (!options.vulkan_semantics) SPIRV_CROSS_THROW("Floating point atomics requires Vulkan semantics."); if (options.es) SPIRV_CROSS_THROW("Floating point atomics requires desktop GLSL."); require_extension_internal("GL_EXT_shader_atomic_float"); } forced_temporaries.insert(result_id); emit_op(result_type, result_id, join(op, "(", to_non_uniform_aware_expression(op0), ", ", to_unpacked_expression(op1), ")"), false); flush_all_atomic_capable_variables(); } void CompilerGLSL::emit_atomic_func_op(uint32_t result_type, uint32_t result_id, uint32_t op0, uint32_t op1, uint32_t op2, const char *op) { forced_temporaries.insert(result_id); emit_op(result_type, result_id, join(op, "(", to_non_uniform_aware_expression(op0), ", ", to_unpacked_expression(op1), ", ", to_unpacked_expression(op2), ")"), false); flush_all_atomic_capable_variables(); } void CompilerGLSL::emit_unary_func_op_cast(uint32_t result_type, uint32_t result_id, uint32_t op0, const char *op, SPIRType::BaseType input_type, SPIRType::BaseType expected_result_type) { auto &out_type = get(result_type); auto &expr_type = expression_type(op0); auto expected_type = out_type; // Bit-widths might be different in unary cases because we use it for SConvert/UConvert and friends. expected_type.basetype = input_type; expected_type.width = expr_type.width; string cast_op; if (expr_type.basetype != input_type) { if (expr_type.basetype == SPIRType::Boolean) cast_op = join(type_to_glsl(expected_type), "(", to_unpacked_expression(op0), ")"); else cast_op = bitcast_glsl(expected_type, op0); } else cast_op = to_unpacked_expression(op0); string expr; if (out_type.basetype != expected_result_type) { expected_type.basetype = expected_result_type; expected_type.width = out_type.width; if (out_type.basetype == SPIRType::Boolean) expr = type_to_glsl(out_type); else expr = bitcast_glsl_op(out_type, expected_type); expr += '('; expr += join(op, "(", cast_op, ")"); expr += ')'; } else { expr += join(op, "(", cast_op, ")"); } emit_op(result_type, result_id, expr, should_forward(op0)); inherit_expression_dependencies(result_id, op0); } // Very special case. Handling bitfieldExtract requires us to deal with different bitcasts of different signs // and different vector sizes all at once. Need a special purpose method here. void CompilerGLSL::emit_trinary_func_op_bitextract(uint32_t result_type, uint32_t result_id, uint32_t op0, uint32_t op1, uint32_t op2, const char *op, SPIRType::BaseType expected_result_type, SPIRType::BaseType input_type0, SPIRType::BaseType input_type1, SPIRType::BaseType input_type2) { auto &out_type = get(result_type); auto expected_type = out_type; expected_type.basetype = input_type0; string cast_op0 = expression_type(op0).basetype != input_type0 ? bitcast_glsl(expected_type, op0) : to_unpacked_expression(op0); auto op1_expr = to_unpacked_expression(op1); auto op2_expr = to_unpacked_expression(op2); // Use value casts here instead. Input must be exactly int or uint, but SPIR-V might be 16-bit. expected_type.basetype = input_type1; expected_type.vecsize = 1; string cast_op1 = expression_type(op1).basetype != input_type1 ? join(type_to_glsl_constructor(expected_type), "(", op1_expr, ")") : op1_expr; expected_type.basetype = input_type2; expected_type.vecsize = 1; string cast_op2 = expression_type(op2).basetype != input_type2 ? join(type_to_glsl_constructor(expected_type), "(", op2_expr, ")") : op2_expr; string expr; if (out_type.basetype != expected_result_type) { expected_type.vecsize = out_type.vecsize; expected_type.basetype = expected_result_type; expr = bitcast_glsl_op(out_type, expected_type); expr += '('; expr += join(op, "(", cast_op0, ", ", cast_op1, ", ", cast_op2, ")"); expr += ')'; } else { expr += join(op, "(", cast_op0, ", ", cast_op1, ", ", cast_op2, ")"); } emit_op(result_type, result_id, expr, should_forward(op0) && should_forward(op1) && should_forward(op2)); inherit_expression_dependencies(result_id, op0); inherit_expression_dependencies(result_id, op1); inherit_expression_dependencies(result_id, op2); } void CompilerGLSL::emit_trinary_func_op_cast(uint32_t result_type, uint32_t result_id, uint32_t op0, uint32_t op1, uint32_t op2, const char *op, SPIRType::BaseType input_type) { auto &out_type = get(result_type); auto expected_type = out_type; expected_type.basetype = input_type; string cast_op0 = expression_type(op0).basetype != input_type ? bitcast_glsl(expected_type, op0) : to_unpacked_expression(op0); string cast_op1 = expression_type(op1).basetype != input_type ? bitcast_glsl(expected_type, op1) : to_unpacked_expression(op1); string cast_op2 = expression_type(op2).basetype != input_type ? bitcast_glsl(expected_type, op2) : to_unpacked_expression(op2); string expr; if (out_type.basetype != input_type) { expr = bitcast_glsl_op(out_type, expected_type); expr += '('; expr += join(op, "(", cast_op0, ", ", cast_op1, ", ", cast_op2, ")"); expr += ')'; } else { expr += join(op, "(", cast_op0, ", ", cast_op1, ", ", cast_op2, ")"); } emit_op(result_type, result_id, expr, should_forward(op0) && should_forward(op1) && should_forward(op2)); inherit_expression_dependencies(result_id, op0); inherit_expression_dependencies(result_id, op1); inherit_expression_dependencies(result_id, op2); } void CompilerGLSL::emit_binary_func_op_cast_clustered(uint32_t result_type, uint32_t result_id, uint32_t op0, uint32_t op1, const char *op, SPIRType::BaseType input_type) { // Special purpose method for implementing clustered subgroup opcodes. // Main difference is that op1 does not participate in any casting, it needs to be a literal. auto &out_type = get(result_type); auto expected_type = out_type; expected_type.basetype = input_type; string cast_op0 = expression_type(op0).basetype != input_type ? bitcast_glsl(expected_type, op0) : to_unpacked_expression(op0); string expr; if (out_type.basetype != input_type) { expr = bitcast_glsl_op(out_type, expected_type); expr += '('; expr += join(op, "(", cast_op0, ", ", to_expression(op1), ")"); expr += ')'; } else { expr += join(op, "(", cast_op0, ", ", to_expression(op1), ")"); } emit_op(result_type, result_id, expr, should_forward(op0)); inherit_expression_dependencies(result_id, op0); } void CompilerGLSL::emit_binary_func_op_cast(uint32_t result_type, uint32_t result_id, uint32_t op0, uint32_t op1, const char *op, SPIRType::BaseType input_type, bool skip_cast_if_equal_type) { string cast_op0, cast_op1; auto expected_type = binary_op_bitcast_helper(cast_op0, cast_op1, input_type, op0, op1, skip_cast_if_equal_type); auto &out_type = get(result_type); // Special case boolean outputs since relational opcodes output booleans instead of int/uint. string expr; if (out_type.basetype != input_type && out_type.basetype != SPIRType::Boolean) { expected_type.basetype = input_type; expr = bitcast_glsl_op(out_type, expected_type); expr += '('; expr += join(op, "(", cast_op0, ", ", cast_op1, ")"); expr += ')'; } else { expr += join(op, "(", cast_op0, ", ", cast_op1, ")"); } emit_op(result_type, result_id, expr, should_forward(op0) && should_forward(op1)); inherit_expression_dependencies(result_id, op0); inherit_expression_dependencies(result_id, op1); } void CompilerGLSL::emit_trinary_func_op(uint32_t result_type, uint32_t result_id, uint32_t op0, uint32_t op1, uint32_t op2, const char *op) { bool forward = should_forward(op0) && should_forward(op1) && should_forward(op2); emit_op(result_type, result_id, join(op, "(", to_unpacked_expression(op0), ", ", to_unpacked_expression(op1), ", ", to_unpacked_expression(op2), ")"), forward); inherit_expression_dependencies(result_id, op0); inherit_expression_dependencies(result_id, op1); inherit_expression_dependencies(result_id, op2); } void CompilerGLSL::emit_quaternary_func_op(uint32_t result_type, uint32_t result_id, uint32_t op0, uint32_t op1, uint32_t op2, uint32_t op3, const char *op) { bool forward = should_forward(op0) && should_forward(op1) && should_forward(op2) && should_forward(op3); emit_op(result_type, result_id, join(op, "(", to_unpacked_expression(op0), ", ", to_unpacked_expression(op1), ", ", to_unpacked_expression(op2), ", ", to_unpacked_expression(op3), ")"), forward); inherit_expression_dependencies(result_id, op0); inherit_expression_dependencies(result_id, op1); inherit_expression_dependencies(result_id, op2); inherit_expression_dependencies(result_id, op3); } void CompilerGLSL::emit_bitfield_insert_op(uint32_t result_type, uint32_t result_id, uint32_t op0, uint32_t op1, uint32_t op2, uint32_t op3, const char *op, SPIRType::BaseType offset_count_type) { // Only need to cast offset/count arguments. Types of base/insert must be same as result type, // and bitfieldInsert is sign invariant. bool forward = should_forward(op0) && should_forward(op1) && should_forward(op2) && should_forward(op3); auto op0_expr = to_unpacked_expression(op0); auto op1_expr = to_unpacked_expression(op1); auto op2_expr = to_unpacked_expression(op2); auto op3_expr = to_unpacked_expression(op3); assert(offset_count_type == SPIRType::UInt || offset_count_type == SPIRType::Int); SPIRType target_type { OpTypeInt }; target_type.width = 32; target_type.vecsize = 1; target_type.basetype = offset_count_type; if (expression_type(op2).basetype != offset_count_type) { // Value-cast here. Input might be 16-bit. GLSL requires int. op2_expr = join(type_to_glsl_constructor(target_type), "(", op2_expr, ")"); } if (expression_type(op3).basetype != offset_count_type) { // Value-cast here. Input might be 16-bit. GLSL requires int. op3_expr = join(type_to_glsl_constructor(target_type), "(", op3_expr, ")"); } emit_op(result_type, result_id, join(op, "(", op0_expr, ", ", op1_expr, ", ", op2_expr, ", ", op3_expr, ")"), forward); inherit_expression_dependencies(result_id, op0); inherit_expression_dependencies(result_id, op1); inherit_expression_dependencies(result_id, op2); inherit_expression_dependencies(result_id, op3); } string CompilerGLSL::legacy_tex_op(const std::string &op, const SPIRType &imgtype, uint32_t tex) { const char *type; switch (imgtype.image.dim) { case spv::Dim1D: // Force 2D path for ES. if (options.es) type = (imgtype.image.arrayed && !options.es) ? "2DArray" : "2D"; else type = (imgtype.image.arrayed && !options.es) ? "1DArray" : "1D"; break; case spv::Dim2D: type = (imgtype.image.arrayed && !options.es) ? "2DArray" : "2D"; break; case spv::Dim3D: type = "3D"; break; case spv::DimCube: type = "Cube"; break; case spv::DimRect: type = "2DRect"; break; case spv::DimBuffer: type = "Buffer"; break; case spv::DimSubpassData: type = "2D"; break; default: type = ""; break; } // In legacy GLSL, an extension is required for textureLod in the fragment // shader or textureGrad anywhere. bool legacy_lod_ext = false; auto &execution = get_entry_point(); if (op == "textureGrad" || op == "textureProjGrad" || ((op == "textureLod" || op == "textureProjLod") && execution.model != ExecutionModelVertex)) { if (is_legacy_es()) { legacy_lod_ext = true; require_extension_internal("GL_EXT_shader_texture_lod"); } else if (is_legacy_desktop()) require_extension_internal("GL_ARB_shader_texture_lod"); } if (op == "textureLodOffset" || op == "textureProjLodOffset") { if (is_legacy_es()) SPIRV_CROSS_THROW(join(op, " not allowed in legacy ES")); require_extension_internal("GL_EXT_gpu_shader4"); } // GLES has very limited support for shadow samplers. // Basically shadow2D and shadow2DProj work through EXT_shadow_samplers, // everything else can just throw bool is_comparison = is_depth_image(imgtype, tex); if (is_comparison && is_legacy_es()) { if (op == "texture" || op == "textureProj") require_extension_internal("GL_EXT_shadow_samplers"); else SPIRV_CROSS_THROW(join(op, " not allowed on depth samplers in legacy ES")); if (imgtype.image.dim == spv::DimCube) return "shadowCubeNV"; } if (op == "textureSize") { if (is_legacy_es()) SPIRV_CROSS_THROW("textureSize not supported in legacy ES"); if (is_comparison) SPIRV_CROSS_THROW("textureSize not supported on shadow sampler in legacy GLSL"); require_extension_internal("GL_EXT_gpu_shader4"); } if (op == "texelFetch" && is_legacy_es()) SPIRV_CROSS_THROW("texelFetch not supported in legacy ES"); bool is_es_and_depth = is_legacy_es() && is_comparison; std::string type_prefix = is_comparison ? "shadow" : "texture"; if (op == "texture") return is_es_and_depth ? join(type_prefix, type, "EXT") : join(type_prefix, type); else if (op == "textureLod") return join(type_prefix, type, legacy_lod_ext ? "LodEXT" : "Lod"); else if (op == "textureProj") return join(type_prefix, type, is_es_and_depth ? "ProjEXT" : "Proj"); else if (op == "textureGrad") return join(type_prefix, type, is_legacy_es() ? "GradEXT" : is_legacy_desktop() ? "GradARB" : "Grad"); else if (op == "textureProjLod") return join(type_prefix, type, legacy_lod_ext ? "ProjLodEXT" : "ProjLod"); else if (op == "textureLodOffset") return join(type_prefix, type, "LodOffset"); else if (op == "textureProjGrad") return join(type_prefix, type, is_legacy_es() ? "ProjGradEXT" : is_legacy_desktop() ? "ProjGradARB" : "ProjGrad"); else if (op == "textureProjLodOffset") return join(type_prefix, type, "ProjLodOffset"); else if (op == "textureSize") return join("textureSize", type); else if (op == "texelFetch") return join("texelFetch", type); else { SPIRV_CROSS_THROW(join("Unsupported legacy texture op: ", op)); } } bool CompilerGLSL::to_trivial_mix_op(const SPIRType &type, string &op, uint32_t left, uint32_t right, uint32_t lerp) { auto *cleft = maybe_get(left); auto *cright = maybe_get(right); auto &lerptype = expression_type(lerp); // If our targets aren't constants, we cannot use construction. if (!cleft || !cright) return false; // If our targets are spec constants, we cannot use construction. if (cleft->specialization || cright->specialization) return false; auto &value_type = get(cleft->constant_type); if (lerptype.basetype != SPIRType::Boolean) return false; if (value_type.basetype == SPIRType::Struct || is_array(value_type)) return false; if (!backend.use_constructor_splatting && value_type.vecsize != lerptype.vecsize) return false; // Only valid way in SPIR-V 1.4 to use matrices in select is a scalar select. // matrix(scalar) constructor fills in diagnonals, so gets messy very quickly. // Just avoid this case. if (value_type.columns > 1) return false; // If our bool selects between 0 and 1, we can cast from bool instead, making our trivial constructor. bool ret = true; for (uint32_t row = 0; ret && row < value_type.vecsize; row++) { switch (type.basetype) { case SPIRType::Short: case SPIRType::UShort: ret = cleft->scalar_u16(0, row) == 0 && cright->scalar_u16(0, row) == 1; break; case SPIRType::Int: case SPIRType::UInt: ret = cleft->scalar(0, row) == 0 && cright->scalar(0, row) == 1; break; case SPIRType::Half: ret = cleft->scalar_f16(0, row) == 0.0f && cright->scalar_f16(0, row) == 1.0f; break; case SPIRType::Float: ret = cleft->scalar_f32(0, row) == 0.0f && cright->scalar_f32(0, row) == 1.0f; break; case SPIRType::Double: ret = cleft->scalar_f64(0, row) == 0.0 && cright->scalar_f64(0, row) == 1.0; break; case SPIRType::Int64: case SPIRType::UInt64: ret = cleft->scalar_u64(0, row) == 0 && cright->scalar_u64(0, row) == 1; break; default: ret = false; break; } } if (ret) op = type_to_glsl_constructor(type); return ret; } string CompilerGLSL::to_ternary_expression(const SPIRType &restype, uint32_t select, uint32_t true_value, uint32_t false_value) { string expr; auto &lerptype = expression_type(select); if (lerptype.vecsize == 1) expr = join(to_enclosed_expression(select), " ? ", to_enclosed_pointer_expression(true_value), " : ", to_enclosed_pointer_expression(false_value)); else { auto swiz = [this](uint32_t expression, uint32_t i) { return to_extract_component_expression(expression, i); }; expr = type_to_glsl_constructor(restype); expr += "("; for (uint32_t i = 0; i < restype.vecsize; i++) { expr += swiz(select, i); expr += " ? "; expr += swiz(true_value, i); expr += " : "; expr += swiz(false_value, i); if (i + 1 < restype.vecsize) expr += ", "; } expr += ")"; } return expr; } void CompilerGLSL::emit_mix_op(uint32_t result_type, uint32_t id, uint32_t left, uint32_t right, uint32_t lerp) { auto &lerptype = expression_type(lerp); auto &restype = get(result_type); // If this results in a variable pointer, assume it may be written through. if (restype.pointer) { register_write(left); register_write(right); } string mix_op; bool has_boolean_mix = *backend.boolean_mix_function && ((options.es && options.version >= 310) || (!options.es && options.version >= 450)); bool trivial_mix = to_trivial_mix_op(restype, mix_op, left, right, lerp); // Cannot use boolean mix when the lerp argument is just one boolean, // fall back to regular trinary statements. if (lerptype.vecsize == 1) has_boolean_mix = false; // If we can reduce the mix to a simple cast, do so. // This helps for cases like int(bool), uint(bool) which is implemented with // OpSelect bool 1 0. if (trivial_mix) { emit_unary_func_op(result_type, id, lerp, mix_op.c_str()); } else if (!has_boolean_mix && lerptype.basetype == SPIRType::Boolean) { // Boolean mix not supported on desktop without extension. // Was added in OpenGL 4.5 with ES 3.1 compat. // // Could use GL_EXT_shader_integer_mix on desktop at least, // but Apple doesn't support it. :( // Just implement it as ternary expressions. auto expr = to_ternary_expression(get(result_type), lerp, right, left); emit_op(result_type, id, expr, should_forward(left) && should_forward(right) && should_forward(lerp)); inherit_expression_dependencies(id, left); inherit_expression_dependencies(id, right); inherit_expression_dependencies(id, lerp); } else if (lerptype.basetype == SPIRType::Boolean) emit_trinary_func_op(result_type, id, left, right, lerp, backend.boolean_mix_function); else emit_trinary_func_op(result_type, id, left, right, lerp, "mix"); } string CompilerGLSL::to_combined_image_sampler(VariableID image_id, VariableID samp_id) { // Keep track of the array indices we have used to load the image. // We'll need to use the same array index into the combined image sampler array. auto image_expr = to_non_uniform_aware_expression(image_id); string array_expr; auto array_index = image_expr.find_first_of('['); if (array_index != string::npos) array_expr = image_expr.substr(array_index, string::npos); auto &args = current_function->arguments; // For GLSL and ESSL targets, we must enumerate all possible combinations for sampler2D(texture2D, sampler) and redirect // all possible combinations into new sampler2D uniforms. auto *image = maybe_get_backing_variable(image_id); auto *samp = maybe_get_backing_variable(samp_id); if (image) image_id = image->self; if (samp) samp_id = samp->self; auto image_itr = find_if(begin(args), end(args), [image_id](const SPIRFunction::Parameter ¶m) { return image_id == param.id; }); auto sampler_itr = find_if(begin(args), end(args), [samp_id](const SPIRFunction::Parameter ¶m) { return samp_id == param.id; }); if (image_itr != end(args) || sampler_itr != end(args)) { // If any parameter originates from a parameter, we will find it in our argument list. bool global_image = image_itr == end(args); bool global_sampler = sampler_itr == end(args); VariableID iid = global_image ? image_id : VariableID(uint32_t(image_itr - begin(args))); VariableID sid = global_sampler ? samp_id : VariableID(uint32_t(sampler_itr - begin(args))); auto &combined = current_function->combined_parameters; auto itr = find_if(begin(combined), end(combined), [=](const SPIRFunction::CombinedImageSamplerParameter &p) { return p.global_image == global_image && p.global_sampler == global_sampler && p.image_id == iid && p.sampler_id == sid; }); if (itr != end(combined)) return to_expression(itr->id) + array_expr; else { SPIRV_CROSS_THROW("Cannot find mapping for combined sampler parameter, was " "build_combined_image_samplers() used " "before compile() was called?"); } } else { // For global sampler2D, look directly at the global remapping table. auto &mapping = combined_image_samplers; auto itr = find_if(begin(mapping), end(mapping), [image_id, samp_id](const CombinedImageSampler &combined) { return combined.image_id == image_id && combined.sampler_id == samp_id; }); if (itr != end(combined_image_samplers)) return to_expression(itr->combined_id) + array_expr; else { SPIRV_CROSS_THROW("Cannot find mapping for combined sampler, was build_combined_image_samplers() used " "before compile() was called?"); } } } bool CompilerGLSL::is_supported_subgroup_op_in_opengl(spv::Op op, const uint32_t *ops) { switch (op) { case OpGroupNonUniformElect: case OpGroupNonUniformBallot: case OpGroupNonUniformBallotFindLSB: case OpGroupNonUniformBallotFindMSB: case OpGroupNonUniformBroadcast: case OpGroupNonUniformBroadcastFirst: case OpGroupNonUniformAll: case OpGroupNonUniformAny: case OpGroupNonUniformAllEqual: case OpControlBarrier: case OpMemoryBarrier: case OpGroupNonUniformBallotBitCount: case OpGroupNonUniformBallotBitExtract: case OpGroupNonUniformInverseBallot: return true; case OpGroupNonUniformIAdd: case OpGroupNonUniformFAdd: case OpGroupNonUniformIMul: case OpGroupNonUniformFMul: { const GroupOperation operation = static_cast(ops[3]); if (operation == GroupOperationReduce || operation == GroupOperationInclusiveScan || operation == GroupOperationExclusiveScan) { return true; } else { return false; } } default: return false; } } void CompilerGLSL::emit_sampled_image_op(uint32_t result_type, uint32_t result_id, uint32_t image_id, uint32_t samp_id) { if (options.vulkan_semantics && combined_image_samplers.empty()) { emit_binary_func_op(result_type, result_id, image_id, samp_id, type_to_glsl(get(result_type), result_id).c_str()); } else { // Make sure to suppress usage tracking. It is illegal to create temporaries of opaque types. emit_op(result_type, result_id, to_combined_image_sampler(image_id, samp_id), true, true); } // Make sure to suppress usage tracking and any expression invalidation. // It is illegal to create temporaries of opaque types. forwarded_temporaries.erase(result_id); } static inline bool image_opcode_is_sample_no_dref(Op op) { switch (op) { case OpImageSampleExplicitLod: case OpImageSampleImplicitLod: case OpImageSampleProjExplicitLod: case OpImageSampleProjImplicitLod: case OpImageFetch: case OpImageRead: case OpImageSparseSampleExplicitLod: case OpImageSparseSampleImplicitLod: case OpImageSparseSampleProjExplicitLod: case OpImageSparseSampleProjImplicitLod: case OpImageSparseFetch: case OpImageSparseRead: return true; default: return false; } } void CompilerGLSL::emit_sparse_feedback_temporaries(uint32_t result_type_id, uint32_t id, uint32_t &feedback_id, uint32_t &texel_id) { // Need to allocate two temporaries. if (options.es) SPIRV_CROSS_THROW("Sparse texture feedback is not supported on ESSL."); require_extension_internal("GL_ARB_sparse_texture2"); auto &temps = extra_sub_expressions[id]; if (temps == 0) temps = ir.increase_bound_by(2); feedback_id = temps + 0; texel_id = temps + 1; auto &return_type = get(result_type_id); if (return_type.basetype != SPIRType::Struct || return_type.member_types.size() != 2) SPIRV_CROSS_THROW("Invalid return type for sparse feedback."); emit_uninitialized_temporary(return_type.member_types[0], feedback_id); emit_uninitialized_temporary(return_type.member_types[1], texel_id); } uint32_t CompilerGLSL::get_sparse_feedback_texel_id(uint32_t id) const { auto itr = extra_sub_expressions.find(id); if (itr == extra_sub_expressions.end()) return 0; else return itr->second + 1; } void CompilerGLSL::emit_texture_op(const Instruction &i, bool sparse) { auto *ops = stream(i); auto op = static_cast(i.op); SmallVector inherited_expressions; uint32_t result_type_id = ops[0]; uint32_t id = ops[1]; auto &return_type = get(result_type_id); uint32_t sparse_code_id = 0; uint32_t sparse_texel_id = 0; if (sparse) emit_sparse_feedback_temporaries(result_type_id, id, sparse_code_id, sparse_texel_id); bool forward = false; string expr = to_texture_op(i, sparse, &forward, inherited_expressions); if (sparse) { statement(to_expression(sparse_code_id), " = ", expr, ";"); expr = join(type_to_glsl(return_type), "(", to_expression(sparse_code_id), ", ", to_expression(sparse_texel_id), ")"); forward = true; inherited_expressions.clear(); } emit_op(result_type_id, id, expr, forward); for (auto &inherit : inherited_expressions) inherit_expression_dependencies(id, inherit); // Do not register sparse ops as control dependent as they are always lowered to a temporary. switch (op) { case OpImageSampleDrefImplicitLod: case OpImageSampleImplicitLod: case OpImageSampleProjImplicitLod: case OpImageSampleProjDrefImplicitLod: register_control_dependent_expression(id); break; default: break; } } std::string CompilerGLSL::to_texture_op(const Instruction &i, bool sparse, bool *forward, SmallVector &inherited_expressions) { auto *ops = stream(i); auto op = static_cast(i.op); uint32_t length = i.length; uint32_t result_type_id = ops[0]; VariableID img = ops[2]; uint32_t coord = ops[3]; uint32_t dref = 0; uint32_t comp = 0; bool gather = false; bool proj = false; bool fetch = false; bool nonuniform_expression = false; const uint32_t *opt = nullptr; auto &result_type = get(result_type_id); inherited_expressions.push_back(coord); if (has_decoration(img, DecorationNonUniform) && !maybe_get_backing_variable(img)) nonuniform_expression = true; switch (op) { case OpImageSampleDrefImplicitLod: case OpImageSampleDrefExplicitLod: case OpImageSparseSampleDrefImplicitLod: case OpImageSparseSampleDrefExplicitLod: dref = ops[4]; opt = &ops[5]; length -= 5; break; case OpImageSampleProjDrefImplicitLod: case OpImageSampleProjDrefExplicitLod: case OpImageSparseSampleProjDrefImplicitLod: case OpImageSparseSampleProjDrefExplicitLod: dref = ops[4]; opt = &ops[5]; length -= 5; proj = true; break; case OpImageDrefGather: case OpImageSparseDrefGather: dref = ops[4]; opt = &ops[5]; length -= 5; gather = true; if (options.es && options.version < 310) SPIRV_CROSS_THROW("textureGather requires ESSL 310."); else if (!options.es && options.version < 400) SPIRV_CROSS_THROW("textureGather with depth compare requires GLSL 400."); break; case OpImageGather: case OpImageSparseGather: comp = ops[4]; opt = &ops[5]; length -= 5; gather = true; if (options.es && options.version < 310) SPIRV_CROSS_THROW("textureGather requires ESSL 310."); else if (!options.es && options.version < 400) { if (!expression_is_constant_null(comp)) SPIRV_CROSS_THROW("textureGather with component requires GLSL 400."); require_extension_internal("GL_ARB_texture_gather"); } break; case OpImageFetch: case OpImageSparseFetch: case OpImageRead: // Reads == fetches in Metal (other langs will not get here) opt = &ops[4]; length -= 4; fetch = true; break; case OpImageSampleProjImplicitLod: case OpImageSampleProjExplicitLod: case OpImageSparseSampleProjImplicitLod: case OpImageSparseSampleProjExplicitLod: opt = &ops[4]; length -= 4; proj = true; break; default: opt = &ops[4]; length -= 4; break; } // Bypass pointers because we need the real image struct auto &type = expression_type(img); auto &imgtype = get(type.self); uint32_t coord_components = 0; switch (imgtype.image.dim) { case spv::Dim1D: coord_components = 1; break; case spv::Dim2D: coord_components = 2; break; case spv::Dim3D: coord_components = 3; break; case spv::DimCube: coord_components = 3; break; case spv::DimBuffer: coord_components = 1; break; default: coord_components = 2; break; } if (dref) inherited_expressions.push_back(dref); if (proj) coord_components++; if (imgtype.image.arrayed) coord_components++; uint32_t bias = 0; uint32_t lod = 0; uint32_t grad_x = 0; uint32_t grad_y = 0; uint32_t coffset = 0; uint32_t offset = 0; uint32_t coffsets = 0; uint32_t sample = 0; uint32_t minlod = 0; uint32_t flags = 0; if (length) { flags = *opt++; length--; } auto test = [&](uint32_t &v, uint32_t flag) { if (length && (flags & flag)) { v = *opt++; inherited_expressions.push_back(v); length--; } }; test(bias, ImageOperandsBiasMask); test(lod, ImageOperandsLodMask); test(grad_x, ImageOperandsGradMask); test(grad_y, ImageOperandsGradMask); test(coffset, ImageOperandsConstOffsetMask); test(offset, ImageOperandsOffsetMask); test(coffsets, ImageOperandsConstOffsetsMask); test(sample, ImageOperandsSampleMask); test(minlod, ImageOperandsMinLodMask); TextureFunctionBaseArguments base_args = {}; base_args.img = img; base_args.imgtype = &imgtype; base_args.is_fetch = fetch != 0; base_args.is_gather = gather != 0; base_args.is_proj = proj != 0; string expr; TextureFunctionNameArguments name_args = {}; name_args.base = base_args; name_args.has_array_offsets = coffsets != 0; name_args.has_offset = coffset != 0 || offset != 0; name_args.has_grad = grad_x != 0 || grad_y != 0; name_args.has_dref = dref != 0; name_args.is_sparse_feedback = sparse; name_args.has_min_lod = minlod != 0; name_args.lod = lod; expr += to_function_name(name_args); expr += "("; uint32_t sparse_texel_id = 0; if (sparse) sparse_texel_id = get_sparse_feedback_texel_id(ops[1]); TextureFunctionArguments args = {}; args.base = base_args; args.coord = coord; args.coord_components = coord_components; args.dref = dref; args.grad_x = grad_x; args.grad_y = grad_y; args.lod = lod; if (coffsets) args.offset = coffsets; else if (coffset) args.offset = coffset; else args.offset = offset; args.bias = bias; args.component = comp; args.sample = sample; args.sparse_texel = sparse_texel_id; args.min_lod = minlod; args.nonuniform_expression = nonuniform_expression; expr += to_function_args(args, forward); expr += ")"; // texture(samplerXShadow) returns float. shadowX() returns vec4, but only in desktop GLSL. Swizzle here. if (is_legacy() && !options.es && is_depth_image(imgtype, img)) expr += ".r"; // Sampling from a texture which was deduced to be a depth image, might actually return 1 component here. // Remap back to 4 components as sampling opcodes expect. if (backend.comparison_image_samples_scalar && image_opcode_is_sample_no_dref(op)) { bool image_is_depth = false; const auto *combined = maybe_get(img); VariableID image_id = combined ? combined->image : img; if (combined && is_depth_image(imgtype, combined->image)) image_is_depth = true; else if (is_depth_image(imgtype, img)) image_is_depth = true; // We must also check the backing variable for the image. // We might have loaded an OpImage, and used that handle for two different purposes. // Once with comparison, once without. auto *image_variable = maybe_get_backing_variable(image_id); if (image_variable && is_depth_image(get(image_variable->basetype), image_variable->self)) image_is_depth = true; if (image_is_depth) expr = remap_swizzle(result_type, 1, expr); } if (!sparse && !backend.support_small_type_sampling_result && result_type.width < 32) { // Just value cast (narrowing) to expected type since we cannot rely on narrowing to work automatically. // Hopefully compiler picks this up and converts the texturing instruction to the appropriate precision. expr = join(type_to_glsl_constructor(result_type), "(", expr, ")"); } // Deals with reads from MSL. We might need to downconvert to fewer components. if (op == OpImageRead) expr = remap_swizzle(result_type, 4, expr); return expr; } bool CompilerGLSL::expression_is_constant_null(uint32_t id) const { auto *c = maybe_get(id); if (!c) return false; return c->constant_is_null(); } bool CompilerGLSL::expression_is_non_value_type_array(uint32_t ptr) { auto &type = expression_type(ptr); if (!is_array(get_pointee_type(type))) return false; if (!backend.array_is_value_type) return true; auto *var = maybe_get_backing_variable(ptr); if (!var) return false; auto &backed_type = get(var->basetype); return !backend.array_is_value_type_in_buffer_blocks && backed_type.basetype == SPIRType::Struct && has_member_decoration(backed_type.self, 0, DecorationOffset); } // Returns the function name for a texture sampling function for the specified image and sampling characteristics. // For some subclasses, the function is a method on the specified image. string CompilerGLSL::to_function_name(const TextureFunctionNameArguments &args) { if (args.has_min_lod) { if (options.es) SPIRV_CROSS_THROW("Sparse residency is not supported in ESSL."); require_extension_internal("GL_ARB_sparse_texture_clamp"); } string fname; auto &imgtype = *args.base.imgtype; VariableID tex = args.base.img; // textureLod on sampler2DArrayShadow and samplerCubeShadow does not exist in GLSL for some reason. // To emulate this, we will have to use textureGrad with a constant gradient of 0. // The workaround will assert that the LOD is in fact constant 0, or we cannot emit correct code. // This happens for HLSL SampleCmpLevelZero on Texture2DArray and TextureCube. bool workaround_lod_array_shadow_as_grad = false; if (((imgtype.image.arrayed && imgtype.image.dim == Dim2D) || imgtype.image.dim == DimCube) && is_depth_image(imgtype, tex) && args.lod && !args.base.is_fetch) { if (!expression_is_constant_null(args.lod)) { SPIRV_CROSS_THROW("textureLod on sampler2DArrayShadow is not constant 0.0. This cannot be " "expressed in GLSL."); } workaround_lod_array_shadow_as_grad = true; } if (args.is_sparse_feedback) fname += "sparse"; if (args.base.is_fetch) fname += args.is_sparse_feedback ? "TexelFetch" : "texelFetch"; else { fname += args.is_sparse_feedback ? "Texture" : "texture"; if (args.base.is_gather) fname += "Gather"; if (args.has_array_offsets) fname += "Offsets"; if (args.base.is_proj) fname += "Proj"; if (args.has_grad || workaround_lod_array_shadow_as_grad) fname += "Grad"; if (args.lod != 0 && !workaround_lod_array_shadow_as_grad) fname += "Lod"; } if (args.has_offset) fname += "Offset"; if (args.has_min_lod) fname += "Clamp"; if (args.is_sparse_feedback || args.has_min_lod) fname += "ARB"; return (is_legacy() && !args.base.is_gather) ? legacy_tex_op(fname, imgtype, tex) : fname; } std::string CompilerGLSL::convert_separate_image_to_expression(uint32_t id) { auto *var = maybe_get_backing_variable(id); // If we are fetching from a plain OpTypeImage, we must combine with a dummy sampler in GLSL. // In Vulkan GLSL, we can make use of the newer GL_EXT_samplerless_texture_functions. if (var) { auto &type = get(var->basetype); if (type.basetype == SPIRType::Image && type.image.sampled == 1 && type.image.dim != DimBuffer) { if (options.vulkan_semantics) { if (dummy_sampler_id) { // Don't need to consider Shadow state since the dummy sampler is always non-shadow. auto sampled_type = type; sampled_type.basetype = SPIRType::SampledImage; return join(type_to_glsl(sampled_type), "(", to_non_uniform_aware_expression(id), ", ", to_expression(dummy_sampler_id), ")"); } else { // Newer glslang supports this extension to deal with texture2D as argument to texture functions. require_extension_internal("GL_EXT_samplerless_texture_functions"); } } else { if (!dummy_sampler_id) SPIRV_CROSS_THROW("Cannot find dummy sampler ID. Was " "build_dummy_sampler_for_combined_images() called?"); return to_combined_image_sampler(id, dummy_sampler_id); } } } return to_non_uniform_aware_expression(id); } // Returns the function args for a texture sampling function for the specified image and sampling characteristics. string CompilerGLSL::to_function_args(const TextureFunctionArguments &args, bool *p_forward) { VariableID img = args.base.img; auto &imgtype = *args.base.imgtype; string farg_str; if (args.base.is_fetch) farg_str = convert_separate_image_to_expression(img); else farg_str = to_non_uniform_aware_expression(img); if (args.nonuniform_expression && farg_str.find_first_of('[') != string::npos) { // Only emit nonuniformEXT() wrapper if the underlying expression is arrayed in some way. farg_str = join(backend.nonuniform_qualifier, "(", farg_str, ")"); } bool swizz_func = backend.swizzle_is_function; auto swizzle = [swizz_func](uint32_t comps, uint32_t in_comps) -> const char * { if (comps == in_comps) return ""; switch (comps) { case 1: return ".x"; case 2: return swizz_func ? ".xy()" : ".xy"; case 3: return swizz_func ? ".xyz()" : ".xyz"; default: return ""; } }; bool forward = should_forward(args.coord); // The IR can give us more components than we need, so chop them off as needed. auto swizzle_expr = swizzle(args.coord_components, expression_type(args.coord).vecsize); // Only enclose the UV expression if needed. auto coord_expr = (*swizzle_expr == '\0') ? to_expression(args.coord) : (to_enclosed_expression(args.coord) + swizzle_expr); // texelFetch only takes int, not uint. auto &coord_type = expression_type(args.coord); if (coord_type.basetype == SPIRType::UInt) { auto expected_type = coord_type; expected_type.vecsize = args.coord_components; expected_type.basetype = SPIRType::Int; coord_expr = bitcast_expression(expected_type, coord_type.basetype, coord_expr); } // textureLod on sampler2DArrayShadow and samplerCubeShadow does not exist in GLSL for some reason. // To emulate this, we will have to use textureGrad with a constant gradient of 0. // The workaround will assert that the LOD is in fact constant 0, or we cannot emit correct code. // This happens for HLSL SampleCmpLevelZero on Texture2DArray and TextureCube. bool workaround_lod_array_shadow_as_grad = ((imgtype.image.arrayed && imgtype.image.dim == Dim2D) || imgtype.image.dim == DimCube) && is_depth_image(imgtype, img) && args.lod != 0 && !args.base.is_fetch; if (args.dref) { forward = forward && should_forward(args.dref); // SPIR-V splits dref and coordinate. if (args.base.is_gather || args.coord_components == 4) // GLSL also splits the arguments in two. Same for textureGather. { farg_str += ", "; farg_str += to_expression(args.coord); farg_str += ", "; farg_str += to_expression(args.dref); } else if (args.base.is_proj) { // Have to reshuffle so we get vec4(coord, dref, proj), special case. // Other shading languages splits up the arguments for coord and compare value like SPIR-V. // The coordinate type for textureProj shadow is always vec4 even for sampler1DShadow. farg_str += ", vec4("; if (imgtype.image.dim == Dim1D) { // Could reuse coord_expr, but we will mess up the temporary usage checking. farg_str += to_enclosed_expression(args.coord) + ".x"; farg_str += ", "; farg_str += "0.0, "; farg_str += to_expression(args.dref); farg_str += ", "; farg_str += to_enclosed_expression(args.coord) + ".y)"; } else if (imgtype.image.dim == Dim2D) { // Could reuse coord_expr, but we will mess up the temporary usage checking. farg_str += to_enclosed_expression(args.coord) + (swizz_func ? ".xy()" : ".xy"); farg_str += ", "; farg_str += to_expression(args.dref); farg_str += ", "; farg_str += to_enclosed_expression(args.coord) + ".z)"; } else SPIRV_CROSS_THROW("Invalid type for textureProj with shadow."); } else { // Create a composite which merges coord/dref into a single vector. auto type = expression_type(args.coord); type.vecsize = args.coord_components + 1; if (imgtype.image.dim == Dim1D && options.es) type.vecsize++; farg_str += ", "; farg_str += type_to_glsl_constructor(type); farg_str += "("; if (imgtype.image.dim == Dim1D && options.es) { if (imgtype.image.arrayed) { farg_str += enclose_expression(coord_expr) + ".x"; farg_str += ", 0.0, "; farg_str += enclose_expression(coord_expr) + ".y"; } else { farg_str += coord_expr; farg_str += ", 0.0"; } } else farg_str += coord_expr; farg_str += ", "; farg_str += to_expression(args.dref); farg_str += ")"; } } else { if (imgtype.image.dim == Dim1D && options.es) { // Have to fake a second coordinate. if (type_is_floating_point(coord_type)) { // Cannot mix proj and array. if (imgtype.image.arrayed || args.base.is_proj) { coord_expr = join("vec3(", enclose_expression(coord_expr), ".x, 0.0, ", enclose_expression(coord_expr), ".y)"); } else coord_expr = join("vec2(", coord_expr, ", 0.0)"); } else { if (imgtype.image.arrayed) { coord_expr = join("ivec3(", enclose_expression(coord_expr), ".x, 0, ", enclose_expression(coord_expr), ".y)"); } else coord_expr = join("ivec2(", coord_expr, ", 0)"); } } farg_str += ", "; farg_str += coord_expr; } if (args.grad_x || args.grad_y) { forward = forward && should_forward(args.grad_x); forward = forward && should_forward(args.grad_y); farg_str += ", "; farg_str += to_expression(args.grad_x); farg_str += ", "; farg_str += to_expression(args.grad_y); } if (args.lod) { if (workaround_lod_array_shadow_as_grad) { // Implement textureGrad() instead. LOD == 0.0 is implemented as gradient of 0.0. // Implementing this as plain texture() is not safe on some implementations. if (imgtype.image.dim == Dim2D) farg_str += ", vec2(0.0), vec2(0.0)"; else if (imgtype.image.dim == DimCube) farg_str += ", vec3(0.0), vec3(0.0)"; } else { forward = forward && should_forward(args.lod); farg_str += ", "; // Lod expression for TexelFetch in GLSL must be int, and only int. if (args.base.is_fetch && imgtype.image.dim != DimBuffer && !imgtype.image.ms) farg_str += bitcast_expression(SPIRType::Int, args.lod); else farg_str += to_expression(args.lod); } } else if (args.base.is_fetch && imgtype.image.dim != DimBuffer && !imgtype.image.ms) { // Lod argument is optional in OpImageFetch, but we require a LOD value, pick 0 as the default. farg_str += ", 0"; } if (args.offset) { forward = forward && should_forward(args.offset); farg_str += ", "; farg_str += bitcast_expression(SPIRType::Int, args.offset); } if (args.sample) { farg_str += ", "; farg_str += bitcast_expression(SPIRType::Int, args.sample); } if (args.min_lod) { farg_str += ", "; farg_str += to_expression(args.min_lod); } if (args.sparse_texel) { // Sparse texel output parameter comes after everything else, except it's before the optional, component/bias arguments. farg_str += ", "; farg_str += to_expression(args.sparse_texel); } if (args.bias) { forward = forward && should_forward(args.bias); farg_str += ", "; farg_str += to_expression(args.bias); } if (args.component && !expression_is_constant_null(args.component)) { forward = forward && should_forward(args.component); farg_str += ", "; farg_str += bitcast_expression(SPIRType::Int, args.component); } *p_forward = forward; return farg_str; } Op CompilerGLSL::get_remapped_spirv_op(Op op) const { if (options.relax_nan_checks) { switch (op) { case OpFUnordLessThan: op = OpFOrdLessThan; break; case OpFUnordLessThanEqual: op = OpFOrdLessThanEqual; break; case OpFUnordGreaterThan: op = OpFOrdGreaterThan; break; case OpFUnordGreaterThanEqual: op = OpFOrdGreaterThanEqual; break; case OpFUnordEqual: op = OpFOrdEqual; break; case OpFOrdNotEqual: op = OpFUnordNotEqual; break; default: break; } } return op; } GLSLstd450 CompilerGLSL::get_remapped_glsl_op(GLSLstd450 std450_op) const { // Relax to non-NaN aware opcodes. if (options.relax_nan_checks) { switch (std450_op) { case GLSLstd450NClamp: std450_op = GLSLstd450FClamp; break; case GLSLstd450NMin: std450_op = GLSLstd450FMin; break; case GLSLstd450NMax: std450_op = GLSLstd450FMax; break; default: break; } } return std450_op; } void CompilerGLSL::emit_glsl_op(uint32_t result_type, uint32_t id, uint32_t eop, const uint32_t *args, uint32_t length) { auto op = static_cast(eop); if (is_legacy() && is_unsigned_glsl_opcode(op)) SPIRV_CROSS_THROW("Unsigned integers are not supported on legacy GLSL targets."); // If we need to do implicit bitcasts, make sure we do it with the correct type. uint32_t integer_width = get_integer_width_for_glsl_instruction(op, args, length); auto int_type = to_signed_basetype(integer_width); auto uint_type = to_unsigned_basetype(integer_width); op = get_remapped_glsl_op(op); switch (op) { // FP fiddling case GLSLstd450Round: if (!is_legacy()) emit_unary_func_op(result_type, id, args[0], "round"); else { auto op0 = to_enclosed_expression(args[0]); auto &op0_type = expression_type(args[0]); auto expr = join("floor(", op0, " + ", type_to_glsl_constructor(op0_type), "(0.5))"); bool forward = should_forward(args[0]); emit_op(result_type, id, expr, forward); inherit_expression_dependencies(id, args[0]); } break; case GLSLstd450RoundEven: if (!is_legacy()) emit_unary_func_op(result_type, id, args[0], "roundEven"); else if (!options.es) { // This extension provides round() with round-to-even semantics. require_extension_internal("GL_EXT_gpu_shader4"); emit_unary_func_op(result_type, id, args[0], "round"); } else SPIRV_CROSS_THROW("roundEven supported only in ESSL 300."); break; case GLSLstd450Trunc: if (!is_legacy()) emit_unary_func_op(result_type, id, args[0], "trunc"); else { // Implement by value-casting to int and back. bool forward = should_forward(args[0]); auto op0 = to_unpacked_expression(args[0]); auto &op0_type = expression_type(args[0]); auto via_type = op0_type; via_type.basetype = SPIRType::Int; auto expr = join(type_to_glsl(op0_type), "(", type_to_glsl(via_type), "(", op0, "))"); emit_op(result_type, id, expr, forward); inherit_expression_dependencies(id, args[0]); } break; case GLSLstd450SAbs: emit_unary_func_op_cast(result_type, id, args[0], "abs", int_type, int_type); break; case GLSLstd450FAbs: emit_unary_func_op(result_type, id, args[0], "abs"); break; case GLSLstd450SSign: emit_unary_func_op_cast(result_type, id, args[0], "sign", int_type, int_type); break; case GLSLstd450FSign: emit_unary_func_op(result_type, id, args[0], "sign"); break; case GLSLstd450Floor: emit_unary_func_op(result_type, id, args[0], "floor"); break; case GLSLstd450Ceil: emit_unary_func_op(result_type, id, args[0], "ceil"); break; case GLSLstd450Fract: emit_unary_func_op(result_type, id, args[0], "fract"); break; case GLSLstd450Radians: emit_unary_func_op(result_type, id, args[0], "radians"); break; case GLSLstd450Degrees: emit_unary_func_op(result_type, id, args[0], "degrees"); break; case GLSLstd450Fma: if ((!options.es && options.version < 400) || (options.es && options.version < 320)) { auto expr = join(to_enclosed_expression(args[0]), " * ", to_enclosed_expression(args[1]), " + ", to_enclosed_expression(args[2])); emit_op(result_type, id, expr, should_forward(args[0]) && should_forward(args[1]) && should_forward(args[2])); for (uint32_t i = 0; i < 3; i++) inherit_expression_dependencies(id, args[i]); } else emit_trinary_func_op(result_type, id, args[0], args[1], args[2], "fma"); break; case GLSLstd450Modf: register_call_out_argument(args[1]); if (!is_legacy()) { forced_temporaries.insert(id); emit_binary_func_op(result_type, id, args[0], args[1], "modf"); } else { //NB. legacy GLSL doesn't have trunc() either, so we do a value cast auto &op1_type = expression_type(args[1]); auto via_type = op1_type; via_type.basetype = SPIRType::Int; statement(to_expression(args[1]), " = ", type_to_glsl(op1_type), "(", type_to_glsl(via_type), "(", to_expression(args[0]), "));"); emit_binary_op(result_type, id, args[0], args[1], "-"); } break; case GLSLstd450ModfStruct: { auto &type = get(result_type); emit_uninitialized_temporary_expression(result_type, id); if (!is_legacy()) { statement(to_expression(id), ".", to_member_name(type, 0), " = ", "modf(", to_expression(args[0]), ", ", to_expression(id), ".", to_member_name(type, 1), ");"); } else { //NB. legacy GLSL doesn't have trunc() either, so we do a value cast auto &op0_type = expression_type(args[0]); auto via_type = op0_type; via_type.basetype = SPIRType::Int; statement(to_expression(id), ".", to_member_name(type, 1), " = ", type_to_glsl(op0_type), "(", type_to_glsl(via_type), "(", to_expression(args[0]), "));"); statement(to_expression(id), ".", to_member_name(type, 0), " = ", to_enclosed_expression(args[0]), " - ", to_expression(id), ".", to_member_name(type, 1), ";"); } break; } // Minmax case GLSLstd450UMin: emit_binary_func_op_cast(result_type, id, args[0], args[1], "min", uint_type, false); break; case GLSLstd450SMin: emit_binary_func_op_cast(result_type, id, args[0], args[1], "min", int_type, false); break; case GLSLstd450FMin: emit_binary_func_op(result_type, id, args[0], args[1], "min"); break; case GLSLstd450FMax: emit_binary_func_op(result_type, id, args[0], args[1], "max"); break; case GLSLstd450UMax: emit_binary_func_op_cast(result_type, id, args[0], args[1], "max", uint_type, false); break; case GLSLstd450SMax: emit_binary_func_op_cast(result_type, id, args[0], args[1], "max", int_type, false); break; case GLSLstd450FClamp: emit_trinary_func_op(result_type, id, args[0], args[1], args[2], "clamp"); break; case GLSLstd450UClamp: emit_trinary_func_op_cast(result_type, id, args[0], args[1], args[2], "clamp", uint_type); break; case GLSLstd450SClamp: emit_trinary_func_op_cast(result_type, id, args[0], args[1], args[2], "clamp", int_type); break; // Trig case GLSLstd450Sin: emit_unary_func_op(result_type, id, args[0], "sin"); break; case GLSLstd450Cos: emit_unary_func_op(result_type, id, args[0], "cos"); break; case GLSLstd450Tan: emit_unary_func_op(result_type, id, args[0], "tan"); break; case GLSLstd450Asin: emit_unary_func_op(result_type, id, args[0], "asin"); break; case GLSLstd450Acos: emit_unary_func_op(result_type, id, args[0], "acos"); break; case GLSLstd450Atan: emit_unary_func_op(result_type, id, args[0], "atan"); break; case GLSLstd450Sinh: if (!is_legacy()) emit_unary_func_op(result_type, id, args[0], "sinh"); else { bool forward = should_forward(args[0]); auto expr = join("(exp(", to_expression(args[0]), ") - exp(-", to_enclosed_expression(args[0]), ")) * 0.5"); emit_op(result_type, id, expr, forward); inherit_expression_dependencies(id, args[0]); } break; case GLSLstd450Cosh: if (!is_legacy()) emit_unary_func_op(result_type, id, args[0], "cosh"); else { bool forward = should_forward(args[0]); auto expr = join("(exp(", to_expression(args[0]), ") + exp(-", to_enclosed_expression(args[0]), ")) * 0.5"); emit_op(result_type, id, expr, forward); inherit_expression_dependencies(id, args[0]); } break; case GLSLstd450Tanh: if (!is_legacy()) emit_unary_func_op(result_type, id, args[0], "tanh"); else { // Create temporaries to store the result of exp(arg) and exp(-arg). uint32_t &ids = extra_sub_expressions[id]; if (!ids) { ids = ir.increase_bound_by(2); // Inherit precision qualifier (legacy has no NoContraction). if (has_decoration(id, DecorationRelaxedPrecision)) { set_decoration(ids, DecorationRelaxedPrecision); set_decoration(ids + 1, DecorationRelaxedPrecision); } } uint32_t epos_id = ids; uint32_t eneg_id = ids + 1; emit_op(result_type, epos_id, join("exp(", to_expression(args[0]), ")"), false); emit_op(result_type, eneg_id, join("exp(-", to_enclosed_expression(args[0]), ")"), false); inherit_expression_dependencies(epos_id, args[0]); inherit_expression_dependencies(eneg_id, args[0]); auto expr = join("(", to_enclosed_expression(epos_id), " - ", to_enclosed_expression(eneg_id), ") / " "(", to_enclosed_expression(epos_id), " + ", to_enclosed_expression(eneg_id), ")"); emit_op(result_type, id, expr, true); inherit_expression_dependencies(id, epos_id); inherit_expression_dependencies(id, eneg_id); } break; case GLSLstd450Asinh: if (!is_legacy()) emit_unary_func_op(result_type, id, args[0], "asinh"); else emit_emulated_ahyper_op(result_type, id, args[0], GLSLstd450Asinh); break; case GLSLstd450Acosh: if (!is_legacy()) emit_unary_func_op(result_type, id, args[0], "acosh"); else emit_emulated_ahyper_op(result_type, id, args[0], GLSLstd450Acosh); break; case GLSLstd450Atanh: if (!is_legacy()) emit_unary_func_op(result_type, id, args[0], "atanh"); else emit_emulated_ahyper_op(result_type, id, args[0], GLSLstd450Atanh); break; case GLSLstd450Atan2: emit_binary_func_op(result_type, id, args[0], args[1], "atan"); break; // Exponentials case GLSLstd450Pow: emit_binary_func_op(result_type, id, args[0], args[1], "pow"); break; case GLSLstd450Exp: emit_unary_func_op(result_type, id, args[0], "exp"); break; case GLSLstd450Log: emit_unary_func_op(result_type, id, args[0], "log"); break; case GLSLstd450Exp2: emit_unary_func_op(result_type, id, args[0], "exp2"); break; case GLSLstd450Log2: emit_unary_func_op(result_type, id, args[0], "log2"); break; case GLSLstd450Sqrt: emit_unary_func_op(result_type, id, args[0], "sqrt"); break; case GLSLstd450InverseSqrt: emit_unary_func_op(result_type, id, args[0], "inversesqrt"); break; // Matrix math case GLSLstd450Determinant: { // No need to transpose - it doesn't affect the determinant auto *e = maybe_get(args[0]); bool old_transpose = e && e->need_transpose; if (old_transpose) e->need_transpose = false; if (options.version < 150) // also matches ES 100 { auto &type = expression_type(args[0]); assert(type.vecsize >= 2 && type.vecsize <= 4); assert(type.vecsize == type.columns); // ARB_gpu_shader_fp64 needs GLSL 150, other types are not valid if (type.basetype != SPIRType::Float) SPIRV_CROSS_THROW("Unsupported type for matrix determinant"); bool relaxed = has_decoration(id, DecorationRelaxedPrecision); require_polyfill(static_cast(PolyfillDeterminant2x2 << (type.vecsize - 2)), relaxed); emit_unary_func_op(result_type, id, args[0], (options.es && relaxed) ? "spvDeterminantMP" : "spvDeterminant"); } else emit_unary_func_op(result_type, id, args[0], "determinant"); if (old_transpose) e->need_transpose = true; break; } case GLSLstd450MatrixInverse: { // The inverse of the transpose is the same as the transpose of // the inverse, so we can just flip need_transpose of the result. auto *a = maybe_get(args[0]); bool old_transpose = a && a->need_transpose; if (old_transpose) a->need_transpose = false; const char *func = "inverse"; if (options.version < 140) // also matches ES 100 { auto &type = get(result_type); assert(type.vecsize >= 2 && type.vecsize <= 4); assert(type.vecsize == type.columns); // ARB_gpu_shader_fp64 needs GLSL 150, other types are invalid if (type.basetype != SPIRType::Float) SPIRV_CROSS_THROW("Unsupported type for matrix inverse"); bool relaxed = has_decoration(id, DecorationRelaxedPrecision); require_polyfill(static_cast(PolyfillMatrixInverse2x2 << (type.vecsize - 2)), relaxed); func = (options.es && relaxed) ? "spvInverseMP" : "spvInverse"; } bool forward = should_forward(args[0]); auto &e = emit_op(result_type, id, join(func, "(", to_unpacked_expression(args[0]), ")"), forward); inherit_expression_dependencies(id, args[0]); if (old_transpose) { e.need_transpose = true; a->need_transpose = true; } break; } // Lerping case GLSLstd450FMix: case GLSLstd450IMix: { emit_mix_op(result_type, id, args[0], args[1], args[2]); break; } case GLSLstd450Step: emit_binary_func_op(result_type, id, args[0], args[1], "step"); break; case GLSLstd450SmoothStep: emit_trinary_func_op(result_type, id, args[0], args[1], args[2], "smoothstep"); break; // Packing case GLSLstd450Frexp: register_call_out_argument(args[1]); forced_temporaries.insert(id); emit_binary_func_op(result_type, id, args[0], args[1], "frexp"); break; case GLSLstd450FrexpStruct: { auto &type = get(result_type); emit_uninitialized_temporary_expression(result_type, id); statement(to_expression(id), ".", to_member_name(type, 0), " = ", "frexp(", to_expression(args[0]), ", ", to_expression(id), ".", to_member_name(type, 1), ");"); break; } case GLSLstd450Ldexp: { bool forward = should_forward(args[0]) && should_forward(args[1]); auto op0 = to_unpacked_expression(args[0]); auto op1 = to_unpacked_expression(args[1]); auto &op1_type = expression_type(args[1]); if (op1_type.basetype != SPIRType::Int) { // Need a value cast here. auto target_type = op1_type; target_type.basetype = SPIRType::Int; op1 = join(type_to_glsl_constructor(target_type), "(", op1, ")"); } auto expr = join("ldexp(", op0, ", ", op1, ")"); emit_op(result_type, id, expr, forward); inherit_expression_dependencies(id, args[0]); inherit_expression_dependencies(id, args[1]); break; } case GLSLstd450PackSnorm4x8: emit_unary_func_op(result_type, id, args[0], "packSnorm4x8"); break; case GLSLstd450PackUnorm4x8: emit_unary_func_op(result_type, id, args[0], "packUnorm4x8"); break; case GLSLstd450PackSnorm2x16: emit_unary_func_op(result_type, id, args[0], "packSnorm2x16"); break; case GLSLstd450PackUnorm2x16: emit_unary_func_op(result_type, id, args[0], "packUnorm2x16"); break; case GLSLstd450PackHalf2x16: emit_unary_func_op(result_type, id, args[0], "packHalf2x16"); break; case GLSLstd450UnpackSnorm4x8: emit_unary_func_op(result_type, id, args[0], "unpackSnorm4x8"); break; case GLSLstd450UnpackUnorm4x8: emit_unary_func_op(result_type, id, args[0], "unpackUnorm4x8"); break; case GLSLstd450UnpackSnorm2x16: emit_unary_func_op(result_type, id, args[0], "unpackSnorm2x16"); break; case GLSLstd450UnpackUnorm2x16: emit_unary_func_op(result_type, id, args[0], "unpackUnorm2x16"); break; case GLSLstd450UnpackHalf2x16: emit_unary_func_op(result_type, id, args[0], "unpackHalf2x16"); break; case GLSLstd450PackDouble2x32: emit_unary_func_op(result_type, id, args[0], "packDouble2x32"); break; case GLSLstd450UnpackDouble2x32: emit_unary_func_op(result_type, id, args[0], "unpackDouble2x32"); break; // Vector math case GLSLstd450Length: emit_unary_func_op(result_type, id, args[0], "length"); break; case GLSLstd450Distance: emit_binary_func_op(result_type, id, args[0], args[1], "distance"); break; case GLSLstd450Cross: emit_binary_func_op(result_type, id, args[0], args[1], "cross"); break; case GLSLstd450Normalize: emit_unary_func_op(result_type, id, args[0], "normalize"); break; case GLSLstd450FaceForward: emit_trinary_func_op(result_type, id, args[0], args[1], args[2], "faceforward"); break; case GLSLstd450Reflect: emit_binary_func_op(result_type, id, args[0], args[1], "reflect"); break; case GLSLstd450Refract: emit_trinary_func_op(result_type, id, args[0], args[1], args[2], "refract"); break; // Bit-fiddling case GLSLstd450FindILsb: // findLSB always returns int. emit_unary_func_op_cast(result_type, id, args[0], "findLSB", expression_type(args[0]).basetype, int_type); break; case GLSLstd450FindSMsb: emit_unary_func_op_cast(result_type, id, args[0], "findMSB", int_type, int_type); break; case GLSLstd450FindUMsb: emit_unary_func_op_cast(result_type, id, args[0], "findMSB", uint_type, int_type); // findMSB always returns int. break; // Multisampled varying case GLSLstd450InterpolateAtCentroid: emit_unary_func_op(result_type, id, args[0], "interpolateAtCentroid"); break; case GLSLstd450InterpolateAtSample: emit_binary_func_op(result_type, id, args[0], args[1], "interpolateAtSample"); break; case GLSLstd450InterpolateAtOffset: emit_binary_func_op(result_type, id, args[0], args[1], "interpolateAtOffset"); break; case GLSLstd450NMin: case GLSLstd450NMax: { emit_nminmax_op(result_type, id, args[0], args[1], op); break; } case GLSLstd450NClamp: { // Make sure we have a unique ID here to avoid aliasing the extra sub-expressions between clamp and NMin sub-op. // IDs cannot exceed 24 bits, so we can make use of the higher bits for some unique flags. uint32_t &max_id = extra_sub_expressions[id | EXTRA_SUB_EXPRESSION_TYPE_AUX]; if (!max_id) max_id = ir.increase_bound_by(1); // Inherit precision qualifiers. ir.meta[max_id] = ir.meta[id]; emit_nminmax_op(result_type, max_id, args[0], args[1], GLSLstd450NMax); emit_nminmax_op(result_type, id, max_id, args[2], GLSLstd450NMin); break; } default: statement("// unimplemented GLSL op ", eop); break; } } void CompilerGLSL::emit_nminmax_op(uint32_t result_type, uint32_t id, uint32_t op0, uint32_t op1, GLSLstd450 op) { // Need to emulate this call. uint32_t &ids = extra_sub_expressions[id]; if (!ids) { ids = ir.increase_bound_by(5); auto btype = get(result_type); btype.basetype = SPIRType::Boolean; set(ids, btype); } uint32_t btype_id = ids + 0; uint32_t left_nan_id = ids + 1; uint32_t right_nan_id = ids + 2; uint32_t tmp_id = ids + 3; uint32_t mixed_first_id = ids + 4; // Inherit precision qualifiers. ir.meta[tmp_id] = ir.meta[id]; ir.meta[mixed_first_id] = ir.meta[id]; if (!is_legacy()) { emit_unary_func_op(btype_id, left_nan_id, op0, "isnan"); emit_unary_func_op(btype_id, right_nan_id, op1, "isnan"); } else if (expression_type(op0).vecsize > 1) { // If the number doesn't equal itself, it must be NaN emit_binary_func_op(btype_id, left_nan_id, op0, op0, "notEqual"); emit_binary_func_op(btype_id, right_nan_id, op1, op1, "notEqual"); } else { emit_binary_op(btype_id, left_nan_id, op0, op0, "!="); emit_binary_op(btype_id, right_nan_id, op1, op1, "!="); } emit_binary_func_op(result_type, tmp_id, op0, op1, op == GLSLstd450NMin ? "min" : "max"); emit_mix_op(result_type, mixed_first_id, tmp_id, op1, left_nan_id); emit_mix_op(result_type, id, mixed_first_id, op0, right_nan_id); } void CompilerGLSL::emit_emulated_ahyper_op(uint32_t result_type, uint32_t id, uint32_t op0, GLSLstd450 op) { const char *one = backend.float_literal_suffix ? "1.0f" : "1.0"; std::string expr; bool forward = should_forward(op0); switch (op) { case GLSLstd450Asinh: expr = join("log(", to_enclosed_expression(op0), " + sqrt(", to_enclosed_expression(op0), " * ", to_enclosed_expression(op0), " + ", one, "))"); emit_op(result_type, id, expr, forward); break; case GLSLstd450Acosh: expr = join("log(", to_enclosed_expression(op0), " + sqrt(", to_enclosed_expression(op0), " * ", to_enclosed_expression(op0), " - ", one, "))"); break; case GLSLstd450Atanh: expr = join("log((", one, " + ", to_enclosed_expression(op0), ") / " "(", one, " - ", to_enclosed_expression(op0), ")) * 0.5", backend.float_literal_suffix ? "f" : ""); break; default: SPIRV_CROSS_THROW("Invalid op."); } emit_op(result_type, id, expr, forward); inherit_expression_dependencies(id, op0); } void CompilerGLSL::emit_spv_amd_shader_ballot_op(uint32_t result_type, uint32_t id, uint32_t eop, const uint32_t *args, uint32_t) { require_extension_internal("GL_AMD_shader_ballot"); enum AMDShaderBallot { SwizzleInvocationsAMD = 1, SwizzleInvocationsMaskedAMD = 2, WriteInvocationAMD = 3, MbcntAMD = 4 }; auto op = static_cast(eop); switch (op) { case SwizzleInvocationsAMD: emit_binary_func_op(result_type, id, args[0], args[1], "swizzleInvocationsAMD"); register_control_dependent_expression(id); break; case SwizzleInvocationsMaskedAMD: emit_binary_func_op(result_type, id, args[0], args[1], "swizzleInvocationsMaskedAMD"); register_control_dependent_expression(id); break; case WriteInvocationAMD: emit_trinary_func_op(result_type, id, args[0], args[1], args[2], "writeInvocationAMD"); register_control_dependent_expression(id); break; case MbcntAMD: emit_unary_func_op(result_type, id, args[0], "mbcntAMD"); register_control_dependent_expression(id); break; default: statement("// unimplemented SPV AMD shader ballot op ", eop); break; } } void CompilerGLSL::emit_spv_amd_shader_explicit_vertex_parameter_op(uint32_t result_type, uint32_t id, uint32_t eop, const uint32_t *args, uint32_t) { require_extension_internal("GL_AMD_shader_explicit_vertex_parameter"); enum AMDShaderExplicitVertexParameter { InterpolateAtVertexAMD = 1 }; auto op = static_cast(eop); switch (op) { case InterpolateAtVertexAMD: emit_binary_func_op(result_type, id, args[0], args[1], "interpolateAtVertexAMD"); break; default: statement("// unimplemented SPV AMD shader explicit vertex parameter op ", eop); break; } } void CompilerGLSL::emit_spv_amd_shader_trinary_minmax_op(uint32_t result_type, uint32_t id, uint32_t eop, const uint32_t *args, uint32_t) { require_extension_internal("GL_AMD_shader_trinary_minmax"); enum AMDShaderTrinaryMinMax { FMin3AMD = 1, UMin3AMD = 2, SMin3AMD = 3, FMax3AMD = 4, UMax3AMD = 5, SMax3AMD = 6, FMid3AMD = 7, UMid3AMD = 8, SMid3AMD = 9 }; auto op = static_cast(eop); switch (op) { case FMin3AMD: case UMin3AMD: case SMin3AMD: emit_trinary_func_op(result_type, id, args[0], args[1], args[2], "min3"); break; case FMax3AMD: case UMax3AMD: case SMax3AMD: emit_trinary_func_op(result_type, id, args[0], args[1], args[2], "max3"); break; case FMid3AMD: case UMid3AMD: case SMid3AMD: emit_trinary_func_op(result_type, id, args[0], args[1], args[2], "mid3"); break; default: statement("// unimplemented SPV AMD shader trinary minmax op ", eop); break; } } void CompilerGLSL::emit_spv_amd_gcn_shader_op(uint32_t result_type, uint32_t id, uint32_t eop, const uint32_t *args, uint32_t) { require_extension_internal("GL_AMD_gcn_shader"); enum AMDGCNShader { CubeFaceIndexAMD = 1, CubeFaceCoordAMD = 2, TimeAMD = 3 }; auto op = static_cast(eop); switch (op) { case CubeFaceIndexAMD: emit_unary_func_op(result_type, id, args[0], "cubeFaceIndexAMD"); break; case CubeFaceCoordAMD: emit_unary_func_op(result_type, id, args[0], "cubeFaceCoordAMD"); break; case TimeAMD: { string expr = "timeAMD()"; emit_op(result_type, id, expr, true); register_control_dependent_expression(id); break; } default: statement("// unimplemented SPV AMD gcn shader op ", eop); break; } } void CompilerGLSL::emit_subgroup_op(const Instruction &i) { const uint32_t *ops = stream(i); auto op = static_cast(i.op); if (!options.vulkan_semantics && !is_supported_subgroup_op_in_opengl(op, ops)) SPIRV_CROSS_THROW("This subgroup operation is only supported in Vulkan semantics."); // If we need to do implicit bitcasts, make sure we do it with the correct type. uint32_t integer_width = get_integer_width_for_instruction(i); auto int_type = to_signed_basetype(integer_width); auto uint_type = to_unsigned_basetype(integer_width); switch (op) { case OpGroupNonUniformElect: request_subgroup_feature(ShaderSubgroupSupportHelper::SubgroupElect); break; case OpGroupNonUniformBallotBitCount: { const GroupOperation operation = static_cast(ops[3]); if (operation == GroupOperationReduce) request_subgroup_feature(ShaderSubgroupSupportHelper::SubgroupBallotBitCount); else if (operation == GroupOperationInclusiveScan || operation == GroupOperationExclusiveScan) request_subgroup_feature(ShaderSubgroupSupportHelper::SubgroupInverseBallot_InclBitCount_ExclBitCout); } break; case OpGroupNonUniformBallotBitExtract: request_subgroup_feature(ShaderSubgroupSupportHelper::SubgroupBallotBitExtract); break; case OpGroupNonUniformInverseBallot: request_subgroup_feature(ShaderSubgroupSupportHelper::SubgroupInverseBallot_InclBitCount_ExclBitCout); break; case OpGroupNonUniformBallot: request_subgroup_feature(ShaderSubgroupSupportHelper::SubgroupBallot); break; case OpGroupNonUniformBallotFindLSB: case OpGroupNonUniformBallotFindMSB: request_subgroup_feature(ShaderSubgroupSupportHelper::SubgroupBallotFindLSB_MSB); break; case OpGroupNonUniformBroadcast: case OpGroupNonUniformBroadcastFirst: request_subgroup_feature(ShaderSubgroupSupportHelper::SubgroupBroadcast_First); break; case OpGroupNonUniformShuffle: case OpGroupNonUniformShuffleXor: require_extension_internal("GL_KHR_shader_subgroup_shuffle"); break; case OpGroupNonUniformShuffleUp: case OpGroupNonUniformShuffleDown: require_extension_internal("GL_KHR_shader_subgroup_shuffle_relative"); break; case OpGroupNonUniformAll: case OpGroupNonUniformAny: case OpGroupNonUniformAllEqual: { const SPIRType &type = expression_type(ops[3]); if (type.basetype == SPIRType::BaseType::Boolean && type.vecsize == 1u) request_subgroup_feature(ShaderSubgroupSupportHelper::SubgroupAll_Any_AllEqualBool); else request_subgroup_feature(ShaderSubgroupSupportHelper::SubgroupAllEqualT); } break; // clang-format off #define GLSL_GROUP_OP(OP)\ case OpGroupNonUniform##OP:\ {\ auto operation = static_cast(ops[3]);\ if (operation == GroupOperationClusteredReduce)\ require_extension_internal("GL_KHR_shader_subgroup_clustered");\ else if (operation == GroupOperationReduce)\ request_subgroup_feature(ShaderSubgroupSupportHelper::SubgroupArithmetic##OP##Reduce);\ else if (operation == GroupOperationExclusiveScan)\ request_subgroup_feature(ShaderSubgroupSupportHelper::SubgroupArithmetic##OP##ExclusiveScan);\ else if (operation == GroupOperationInclusiveScan)\ request_subgroup_feature(ShaderSubgroupSupportHelper::SubgroupArithmetic##OP##InclusiveScan);\ else\ SPIRV_CROSS_THROW("Invalid group operation.");\ break;\ } GLSL_GROUP_OP(IAdd) GLSL_GROUP_OP(FAdd) GLSL_GROUP_OP(IMul) GLSL_GROUP_OP(FMul) #undef GLSL_GROUP_OP // clang-format on case OpGroupNonUniformFMin: case OpGroupNonUniformFMax: case OpGroupNonUniformSMin: case OpGroupNonUniformSMax: case OpGroupNonUniformUMin: case OpGroupNonUniformUMax: case OpGroupNonUniformBitwiseAnd: case OpGroupNonUniformBitwiseOr: case OpGroupNonUniformBitwiseXor: case OpGroupNonUniformLogicalAnd: case OpGroupNonUniformLogicalOr: case OpGroupNonUniformLogicalXor: { auto operation = static_cast(ops[3]); if (operation == GroupOperationClusteredReduce) { require_extension_internal("GL_KHR_shader_subgroup_clustered"); } else if (operation == GroupOperationExclusiveScan || operation == GroupOperationInclusiveScan || operation == GroupOperationReduce) { require_extension_internal("GL_KHR_shader_subgroup_arithmetic"); } else SPIRV_CROSS_THROW("Invalid group operation."); break; } case OpGroupNonUniformQuadSwap: case OpGroupNonUniformQuadBroadcast: require_extension_internal("GL_KHR_shader_subgroup_quad"); break; default: SPIRV_CROSS_THROW("Invalid opcode for subgroup."); } uint32_t result_type = ops[0]; uint32_t id = ops[1]; auto scope = static_cast(evaluate_constant_u32(ops[2])); if (scope != ScopeSubgroup) SPIRV_CROSS_THROW("Only subgroup scope is supported."); switch (op) { case OpGroupNonUniformElect: emit_op(result_type, id, "subgroupElect()", true); break; case OpGroupNonUniformBroadcast: emit_binary_func_op(result_type, id, ops[3], ops[4], "subgroupBroadcast"); break; case OpGroupNonUniformBroadcastFirst: emit_unary_func_op(result_type, id, ops[3], "subgroupBroadcastFirst"); break; case OpGroupNonUniformBallot: emit_unary_func_op(result_type, id, ops[3], "subgroupBallot"); break; case OpGroupNonUniformInverseBallot: emit_unary_func_op(result_type, id, ops[3], "subgroupInverseBallot"); break; case OpGroupNonUniformBallotBitExtract: emit_binary_func_op(result_type, id, ops[3], ops[4], "subgroupBallotBitExtract"); break; case OpGroupNonUniformBallotFindLSB: emit_unary_func_op(result_type, id, ops[3], "subgroupBallotFindLSB"); break; case OpGroupNonUniformBallotFindMSB: emit_unary_func_op(result_type, id, ops[3], "subgroupBallotFindMSB"); break; case OpGroupNonUniformBallotBitCount: { auto operation = static_cast(ops[3]); if (operation == GroupOperationReduce) emit_unary_func_op(result_type, id, ops[4], "subgroupBallotBitCount"); else if (operation == GroupOperationInclusiveScan) emit_unary_func_op(result_type, id, ops[4], "subgroupBallotInclusiveBitCount"); else if (operation == GroupOperationExclusiveScan) emit_unary_func_op(result_type, id, ops[4], "subgroupBallotExclusiveBitCount"); else SPIRV_CROSS_THROW("Invalid BitCount operation."); break; } case OpGroupNonUniformShuffle: emit_binary_func_op(result_type, id, ops[3], ops[4], "subgroupShuffle"); break; case OpGroupNonUniformShuffleXor: emit_binary_func_op(result_type, id, ops[3], ops[4], "subgroupShuffleXor"); break; case OpGroupNonUniformShuffleUp: emit_binary_func_op(result_type, id, ops[3], ops[4], "subgroupShuffleUp"); break; case OpGroupNonUniformShuffleDown: emit_binary_func_op(result_type, id, ops[3], ops[4], "subgroupShuffleDown"); break; case OpGroupNonUniformAll: emit_unary_func_op(result_type, id, ops[3], "subgroupAll"); break; case OpGroupNonUniformAny: emit_unary_func_op(result_type, id, ops[3], "subgroupAny"); break; case OpGroupNonUniformAllEqual: emit_unary_func_op(result_type, id, ops[3], "subgroupAllEqual"); break; // clang-format off #define GLSL_GROUP_OP(op, glsl_op) \ case OpGroupNonUniform##op: \ { \ auto operation = static_cast(ops[3]); \ if (operation == GroupOperationReduce) \ emit_unary_func_op(result_type, id, ops[4], "subgroup" #glsl_op); \ else if (operation == GroupOperationInclusiveScan) \ emit_unary_func_op(result_type, id, ops[4], "subgroupInclusive" #glsl_op); \ else if (operation == GroupOperationExclusiveScan) \ emit_unary_func_op(result_type, id, ops[4], "subgroupExclusive" #glsl_op); \ else if (operation == GroupOperationClusteredReduce) \ emit_binary_func_op(result_type, id, ops[4], ops[5], "subgroupClustered" #glsl_op); \ else \ SPIRV_CROSS_THROW("Invalid group operation."); \ break; \ } #define GLSL_GROUP_OP_CAST(op, glsl_op, type) \ case OpGroupNonUniform##op: \ { \ auto operation = static_cast(ops[3]); \ if (operation == GroupOperationReduce) \ emit_unary_func_op_cast(result_type, id, ops[4], "subgroup" #glsl_op, type, type); \ else if (operation == GroupOperationInclusiveScan) \ emit_unary_func_op_cast(result_type, id, ops[4], "subgroupInclusive" #glsl_op, type, type); \ else if (operation == GroupOperationExclusiveScan) \ emit_unary_func_op_cast(result_type, id, ops[4], "subgroupExclusive" #glsl_op, type, type); \ else if (operation == GroupOperationClusteredReduce) \ emit_binary_func_op_cast_clustered(result_type, id, ops[4], ops[5], "subgroupClustered" #glsl_op, type); \ else \ SPIRV_CROSS_THROW("Invalid group operation."); \ break; \ } GLSL_GROUP_OP(FAdd, Add) GLSL_GROUP_OP(FMul, Mul) GLSL_GROUP_OP(FMin, Min) GLSL_GROUP_OP(FMax, Max) GLSL_GROUP_OP(IAdd, Add) GLSL_GROUP_OP(IMul, Mul) GLSL_GROUP_OP_CAST(SMin, Min, int_type) GLSL_GROUP_OP_CAST(SMax, Max, int_type) GLSL_GROUP_OP_CAST(UMin, Min, uint_type) GLSL_GROUP_OP_CAST(UMax, Max, uint_type) GLSL_GROUP_OP(BitwiseAnd, And) GLSL_GROUP_OP(BitwiseOr, Or) GLSL_GROUP_OP(BitwiseXor, Xor) GLSL_GROUP_OP(LogicalAnd, And) GLSL_GROUP_OP(LogicalOr, Or) GLSL_GROUP_OP(LogicalXor, Xor) #undef GLSL_GROUP_OP #undef GLSL_GROUP_OP_CAST // clang-format on case OpGroupNonUniformQuadSwap: { uint32_t direction = evaluate_constant_u32(ops[4]); if (direction == 0) emit_unary_func_op(result_type, id, ops[3], "subgroupQuadSwapHorizontal"); else if (direction == 1) emit_unary_func_op(result_type, id, ops[3], "subgroupQuadSwapVertical"); else if (direction == 2) emit_unary_func_op(result_type, id, ops[3], "subgroupQuadSwapDiagonal"); else SPIRV_CROSS_THROW("Invalid quad swap direction."); break; } case OpGroupNonUniformQuadBroadcast: { emit_binary_func_op(result_type, id, ops[3], ops[4], "subgroupQuadBroadcast"); break; } default: SPIRV_CROSS_THROW("Invalid opcode for subgroup."); } register_control_dependent_expression(id); } string CompilerGLSL::bitcast_glsl_op(const SPIRType &out_type, const SPIRType &in_type) { // OpBitcast can deal with pointers. if (out_type.pointer || in_type.pointer) { if (out_type.vecsize == 2 || in_type.vecsize == 2) require_extension_internal("GL_EXT_buffer_reference_uvec2"); return type_to_glsl(out_type); } if (out_type.basetype == in_type.basetype) return ""; assert(out_type.basetype != SPIRType::Boolean); assert(in_type.basetype != SPIRType::Boolean); bool integral_cast = type_is_integral(out_type) && type_is_integral(in_type); bool same_size_cast = out_type.width == in_type.width; // Trivial bitcast case, casts between integers. if (integral_cast && same_size_cast) return type_to_glsl(out_type); // Catch-all 8-bit arithmetic casts (GL_EXT_shader_explicit_arithmetic_types). if (out_type.width == 8 && in_type.width >= 16 && integral_cast && in_type.vecsize == 1) return "unpack8"; else if (in_type.width == 8 && out_type.width == 16 && integral_cast && out_type.vecsize == 1) return "pack16"; else if (in_type.width == 8 && out_type.width == 32 && integral_cast && out_type.vecsize == 1) return "pack32"; // Floating <-> Integer special casts. Just have to enumerate all cases. :( // 16-bit, 32-bit and 64-bit floats. if (out_type.basetype == SPIRType::UInt && in_type.basetype == SPIRType::Float) { if (is_legacy_es()) SPIRV_CROSS_THROW("Float -> Uint bitcast not supported on legacy ESSL."); else if (!options.es && options.version < 330) require_extension_internal("GL_ARB_shader_bit_encoding"); return "floatBitsToUint"; } else if (out_type.basetype == SPIRType::Int && in_type.basetype == SPIRType::Float) { if (is_legacy_es()) SPIRV_CROSS_THROW("Float -> Int bitcast not supported on legacy ESSL."); else if (!options.es && options.version < 330) require_extension_internal("GL_ARB_shader_bit_encoding"); return "floatBitsToInt"; } else if (out_type.basetype == SPIRType::Float && in_type.basetype == SPIRType::UInt) { if (is_legacy_es()) SPIRV_CROSS_THROW("Uint -> Float bitcast not supported on legacy ESSL."); else if (!options.es && options.version < 330) require_extension_internal("GL_ARB_shader_bit_encoding"); return "uintBitsToFloat"; } else if (out_type.basetype == SPIRType::Float && in_type.basetype == SPIRType::Int) { if (is_legacy_es()) SPIRV_CROSS_THROW("Int -> Float bitcast not supported on legacy ESSL."); else if (!options.es && options.version < 330) require_extension_internal("GL_ARB_shader_bit_encoding"); return "intBitsToFloat"; } else if (out_type.basetype == SPIRType::Int64 && in_type.basetype == SPIRType::Double) return "doubleBitsToInt64"; else if (out_type.basetype == SPIRType::UInt64 && in_type.basetype == SPIRType::Double) return "doubleBitsToUint64"; else if (out_type.basetype == SPIRType::Double && in_type.basetype == SPIRType::Int64) return "int64BitsToDouble"; else if (out_type.basetype == SPIRType::Double && in_type.basetype == SPIRType::UInt64) return "uint64BitsToDouble"; else if (out_type.basetype == SPIRType::Short && in_type.basetype == SPIRType::Half) return "float16BitsToInt16"; else if (out_type.basetype == SPIRType::UShort && in_type.basetype == SPIRType::Half) return "float16BitsToUint16"; else if (out_type.basetype == SPIRType::Half && in_type.basetype == SPIRType::Short) return "int16BitsToFloat16"; else if (out_type.basetype == SPIRType::Half && in_type.basetype == SPIRType::UShort) return "uint16BitsToFloat16"; // And finally, some even more special purpose casts. if (out_type.basetype == SPIRType::UInt64 && in_type.basetype == SPIRType::UInt && in_type.vecsize == 2) return "packUint2x32"; else if (out_type.basetype == SPIRType::UInt && in_type.basetype == SPIRType::UInt64 && out_type.vecsize == 2) return "unpackUint2x32"; else if (out_type.basetype == SPIRType::Half && in_type.basetype == SPIRType::UInt && in_type.vecsize == 1) return "unpackFloat2x16"; else if (out_type.basetype == SPIRType::UInt && in_type.basetype == SPIRType::Half && in_type.vecsize == 2) return "packFloat2x16"; else if (out_type.basetype == SPIRType::Int && in_type.basetype == SPIRType::Short && in_type.vecsize == 2) return "packInt2x16"; else if (out_type.basetype == SPIRType::Short && in_type.basetype == SPIRType::Int && in_type.vecsize == 1) return "unpackInt2x16"; else if (out_type.basetype == SPIRType::UInt && in_type.basetype == SPIRType::UShort && in_type.vecsize == 2) return "packUint2x16"; else if (out_type.basetype == SPIRType::UShort && in_type.basetype == SPIRType::UInt && in_type.vecsize == 1) return "unpackUint2x16"; else if (out_type.basetype == SPIRType::Int64 && in_type.basetype == SPIRType::Short && in_type.vecsize == 4) return "packInt4x16"; else if (out_type.basetype == SPIRType::Short && in_type.basetype == SPIRType::Int64 && in_type.vecsize == 1) return "unpackInt4x16"; else if (out_type.basetype == SPIRType::UInt64 && in_type.basetype == SPIRType::UShort && in_type.vecsize == 4) return "packUint4x16"; else if (out_type.basetype == SPIRType::UShort && in_type.basetype == SPIRType::UInt64 && in_type.vecsize == 1) return "unpackUint4x16"; return ""; } string CompilerGLSL::bitcast_glsl(const SPIRType &result_type, uint32_t argument) { auto op = bitcast_glsl_op(result_type, expression_type(argument)); if (op.empty()) return to_enclosed_unpacked_expression(argument); else return join(op, "(", to_unpacked_expression(argument), ")"); } std::string CompilerGLSL::bitcast_expression(SPIRType::BaseType target_type, uint32_t arg) { auto expr = to_expression(arg); auto &src_type = expression_type(arg); if (src_type.basetype != target_type) { auto target = src_type; target.basetype = target_type; expr = join(bitcast_glsl_op(target, src_type), "(", expr, ")"); } return expr; } std::string CompilerGLSL::bitcast_expression(const SPIRType &target_type, SPIRType::BaseType expr_type, const std::string &expr) { if (target_type.basetype == expr_type) return expr; auto src_type = target_type; src_type.basetype = expr_type; return join(bitcast_glsl_op(target_type, src_type), "(", expr, ")"); } string CompilerGLSL::builtin_to_glsl(BuiltIn builtin, StorageClass storage) { switch (builtin) { case BuiltInPosition: return "gl_Position"; case BuiltInPointSize: return "gl_PointSize"; case BuiltInClipDistance: { if (options.es) require_extension_internal("GL_EXT_clip_cull_distance"); return "gl_ClipDistance"; } case BuiltInCullDistance: { if (options.es) require_extension_internal("GL_EXT_clip_cull_distance"); return "gl_CullDistance"; } case BuiltInVertexId: if (options.vulkan_semantics) SPIRV_CROSS_THROW("Cannot implement gl_VertexID in Vulkan GLSL. This shader was created " "with GL semantics."); return "gl_VertexID"; case BuiltInInstanceId: if (options.vulkan_semantics) { auto model = get_entry_point().model; switch (model) { case spv::ExecutionModelIntersectionKHR: case spv::ExecutionModelAnyHitKHR: case spv::ExecutionModelClosestHitKHR: // gl_InstanceID is allowed in these shaders. break; default: SPIRV_CROSS_THROW("Cannot implement gl_InstanceID in Vulkan GLSL. This shader was " "created with GL semantics."); } } if (!options.es && options.version < 140) { require_extension_internal("GL_ARB_draw_instanced"); } return "gl_InstanceID"; case BuiltInVertexIndex: if (options.vulkan_semantics) return "gl_VertexIndex"; else return "gl_VertexID"; // gl_VertexID already has the base offset applied. case BuiltInInstanceIndex: if (options.vulkan_semantics) return "gl_InstanceIndex"; if (!options.es && options.version < 140) { require_extension_internal("GL_ARB_draw_instanced"); } if (options.vertex.support_nonzero_base_instance) { if (!options.vulkan_semantics) { // This is a soft-enable. We will opt-in to using gl_BaseInstanceARB if supported. require_extension_internal("GL_ARB_shader_draw_parameters"); } return "(gl_InstanceID + SPIRV_Cross_BaseInstance)"; // ... but not gl_InstanceID. } else return "gl_InstanceID"; case BuiltInPrimitiveId: if (storage == StorageClassInput && get_entry_point().model == ExecutionModelGeometry) return "gl_PrimitiveIDIn"; else return "gl_PrimitiveID"; case BuiltInInvocationId: return "gl_InvocationID"; case BuiltInLayer: return "gl_Layer"; case BuiltInViewportIndex: return "gl_ViewportIndex"; case BuiltInTessLevelOuter: return "gl_TessLevelOuter"; case BuiltInTessLevelInner: return "gl_TessLevelInner"; case BuiltInTessCoord: return "gl_TessCoord"; case BuiltInPatchVertices: return "gl_PatchVerticesIn"; case BuiltInFragCoord: return "gl_FragCoord"; case BuiltInPointCoord: return "gl_PointCoord"; case BuiltInFrontFacing: return "gl_FrontFacing"; case BuiltInFragDepth: return "gl_FragDepth"; case BuiltInNumWorkgroups: return "gl_NumWorkGroups"; case BuiltInWorkgroupSize: return "gl_WorkGroupSize"; case BuiltInWorkgroupId: return "gl_WorkGroupID"; case BuiltInLocalInvocationId: return "gl_LocalInvocationID"; case BuiltInGlobalInvocationId: return "gl_GlobalInvocationID"; case BuiltInLocalInvocationIndex: return "gl_LocalInvocationIndex"; case BuiltInHelperInvocation: return "gl_HelperInvocation"; case BuiltInBaseVertex: if (options.es) SPIRV_CROSS_THROW("BaseVertex not supported in ES profile."); if (options.vulkan_semantics) { if (options.version < 460) { require_extension_internal("GL_ARB_shader_draw_parameters"); return "gl_BaseVertexARB"; } return "gl_BaseVertex"; } // On regular GL, this is soft-enabled and we emit ifdefs in code. require_extension_internal("GL_ARB_shader_draw_parameters"); return "SPIRV_Cross_BaseVertex"; case BuiltInBaseInstance: if (options.es) SPIRV_CROSS_THROW("BaseInstance not supported in ES profile."); if (options.vulkan_semantics) { if (options.version < 460) { require_extension_internal("GL_ARB_shader_draw_parameters"); return "gl_BaseInstanceARB"; } return "gl_BaseInstance"; } // On regular GL, this is soft-enabled and we emit ifdefs in code. require_extension_internal("GL_ARB_shader_draw_parameters"); return "SPIRV_Cross_BaseInstance"; case BuiltInDrawIndex: if (options.es) SPIRV_CROSS_THROW("DrawIndex not supported in ES profile."); if (options.vulkan_semantics) { if (options.version < 460) { require_extension_internal("GL_ARB_shader_draw_parameters"); return "gl_DrawIDARB"; } return "gl_DrawID"; } // On regular GL, this is soft-enabled and we emit ifdefs in code. require_extension_internal("GL_ARB_shader_draw_parameters"); return "gl_DrawIDARB"; case BuiltInSampleId: if (is_legacy()) SPIRV_CROSS_THROW("Sample variables not supported in legacy GLSL."); else if (options.es && options.version < 320) require_extension_internal("GL_OES_sample_variables"); else if (!options.es && options.version < 400) require_extension_internal("GL_ARB_sample_shading"); return "gl_SampleID"; case BuiltInSampleMask: if (is_legacy()) SPIRV_CROSS_THROW("Sample variables not supported in legacy GLSL."); else if (options.es && options.version < 320) require_extension_internal("GL_OES_sample_variables"); else if (!options.es && options.version < 400) require_extension_internal("GL_ARB_sample_shading"); if (storage == StorageClassInput) return "gl_SampleMaskIn"; else return "gl_SampleMask"; case BuiltInSamplePosition: if (is_legacy()) SPIRV_CROSS_THROW("Sample variables not supported in legacy GLSL."); else if (options.es && options.version < 320) require_extension_internal("GL_OES_sample_variables"); else if (!options.es && options.version < 400) require_extension_internal("GL_ARB_sample_shading"); return "gl_SamplePosition"; case BuiltInViewIndex: if (options.vulkan_semantics) return "gl_ViewIndex"; else return "gl_ViewID_OVR"; case BuiltInNumSubgroups: request_subgroup_feature(ShaderSubgroupSupportHelper::NumSubgroups); return "gl_NumSubgroups"; case BuiltInSubgroupId: request_subgroup_feature(ShaderSubgroupSupportHelper::SubgroupID); return "gl_SubgroupID"; case BuiltInSubgroupSize: request_subgroup_feature(ShaderSubgroupSupportHelper::SubgroupSize); return "gl_SubgroupSize"; case BuiltInSubgroupLocalInvocationId: request_subgroup_feature(ShaderSubgroupSupportHelper::SubgroupInvocationID); return "gl_SubgroupInvocationID"; case BuiltInSubgroupEqMask: request_subgroup_feature(ShaderSubgroupSupportHelper::SubgroupMask); return "gl_SubgroupEqMask"; case BuiltInSubgroupGeMask: request_subgroup_feature(ShaderSubgroupSupportHelper::SubgroupMask); return "gl_SubgroupGeMask"; case BuiltInSubgroupGtMask: request_subgroup_feature(ShaderSubgroupSupportHelper::SubgroupMask); return "gl_SubgroupGtMask"; case BuiltInSubgroupLeMask: request_subgroup_feature(ShaderSubgroupSupportHelper::SubgroupMask); return "gl_SubgroupLeMask"; case BuiltInSubgroupLtMask: request_subgroup_feature(ShaderSubgroupSupportHelper::SubgroupMask); return "gl_SubgroupLtMask"; case BuiltInLaunchIdKHR: return ray_tracing_is_khr ? "gl_LaunchIDEXT" : "gl_LaunchIDNV"; case BuiltInLaunchSizeKHR: return ray_tracing_is_khr ? "gl_LaunchSizeEXT" : "gl_LaunchSizeNV"; case BuiltInWorldRayOriginKHR: return ray_tracing_is_khr ? "gl_WorldRayOriginEXT" : "gl_WorldRayOriginNV"; case BuiltInWorldRayDirectionKHR: return ray_tracing_is_khr ? "gl_WorldRayDirectionEXT" : "gl_WorldRayDirectionNV"; case BuiltInObjectRayOriginKHR: return ray_tracing_is_khr ? "gl_ObjectRayOriginEXT" : "gl_ObjectRayOriginNV"; case BuiltInObjectRayDirectionKHR: return ray_tracing_is_khr ? "gl_ObjectRayDirectionEXT" : "gl_ObjectRayDirectionNV"; case BuiltInRayTminKHR: return ray_tracing_is_khr ? "gl_RayTminEXT" : "gl_RayTminNV"; case BuiltInRayTmaxKHR: return ray_tracing_is_khr ? "gl_RayTmaxEXT" : "gl_RayTmaxNV"; case BuiltInInstanceCustomIndexKHR: return ray_tracing_is_khr ? "gl_InstanceCustomIndexEXT" : "gl_InstanceCustomIndexNV"; case BuiltInObjectToWorldKHR: return ray_tracing_is_khr ? "gl_ObjectToWorldEXT" : "gl_ObjectToWorldNV"; case BuiltInWorldToObjectKHR: return ray_tracing_is_khr ? "gl_WorldToObjectEXT" : "gl_WorldToObjectNV"; case BuiltInHitTNV: // gl_HitTEXT is an alias of RayTMax in KHR. return "gl_HitTNV"; case BuiltInHitKindKHR: return ray_tracing_is_khr ? "gl_HitKindEXT" : "gl_HitKindNV"; case BuiltInIncomingRayFlagsKHR: return ray_tracing_is_khr ? "gl_IncomingRayFlagsEXT" : "gl_IncomingRayFlagsNV"; case BuiltInBaryCoordKHR: { if (options.es && options.version < 320) SPIRV_CROSS_THROW("gl_BaryCoordEXT requires ESSL 320."); else if (!options.es && options.version < 450) SPIRV_CROSS_THROW("gl_BaryCoordEXT requires GLSL 450."); if (barycentric_is_nv) { require_extension_internal("GL_NV_fragment_shader_barycentric"); return "gl_BaryCoordNV"; } else { require_extension_internal("GL_EXT_fragment_shader_barycentric"); return "gl_BaryCoordEXT"; } } case BuiltInBaryCoordNoPerspNV: { if (options.es && options.version < 320) SPIRV_CROSS_THROW("gl_BaryCoordNoPerspEXT requires ESSL 320."); else if (!options.es && options.version < 450) SPIRV_CROSS_THROW("gl_BaryCoordNoPerspEXT requires GLSL 450."); if (barycentric_is_nv) { require_extension_internal("GL_NV_fragment_shader_barycentric"); return "gl_BaryCoordNoPerspNV"; } else { require_extension_internal("GL_EXT_fragment_shader_barycentric"); return "gl_BaryCoordNoPerspEXT"; } } case BuiltInFragStencilRefEXT: { if (!options.es) { require_extension_internal("GL_ARB_shader_stencil_export"); return "gl_FragStencilRefARB"; } else SPIRV_CROSS_THROW("Stencil export not supported in GLES."); } case BuiltInPrimitiveShadingRateKHR: { if (!options.vulkan_semantics) SPIRV_CROSS_THROW("Can only use PrimitiveShadingRateKHR in Vulkan GLSL."); require_extension_internal("GL_EXT_fragment_shading_rate"); return "gl_PrimitiveShadingRateEXT"; } case BuiltInShadingRateKHR: { if (!options.vulkan_semantics) SPIRV_CROSS_THROW("Can only use ShadingRateKHR in Vulkan GLSL."); require_extension_internal("GL_EXT_fragment_shading_rate"); return "gl_ShadingRateEXT"; } case BuiltInDeviceIndex: if (!options.vulkan_semantics) SPIRV_CROSS_THROW("Need Vulkan semantics for device group support."); require_extension_internal("GL_EXT_device_group"); return "gl_DeviceIndex"; case BuiltInFullyCoveredEXT: if (!options.es) require_extension_internal("GL_NV_conservative_raster_underestimation"); else SPIRV_CROSS_THROW("Need desktop GL to use GL_NV_conservative_raster_underestimation."); return "gl_FragFullyCoveredNV"; case BuiltInPrimitiveTriangleIndicesEXT: return "gl_PrimitiveTriangleIndicesEXT"; case BuiltInPrimitiveLineIndicesEXT: return "gl_PrimitiveLineIndicesEXT"; case BuiltInPrimitivePointIndicesEXT: return "gl_PrimitivePointIndicesEXT"; case BuiltInCullPrimitiveEXT: return "gl_CullPrimitiveEXT"; default: return join("gl_BuiltIn_", convert_to_string(builtin)); } } const char *CompilerGLSL::index_to_swizzle(uint32_t index) { switch (index) { case 0: return "x"; case 1: return "y"; case 2: return "z"; case 3: return "w"; default: return "x"; // Don't crash, but engage the "undefined behavior" described for out-of-bounds logical addressing in spec. } } void CompilerGLSL::access_chain_internal_append_index(std::string &expr, uint32_t /*base*/, const SPIRType * /*type*/, AccessChainFlags flags, bool &access_chain_is_arrayed, uint32_t index) { bool index_is_literal = (flags & ACCESS_CHAIN_INDEX_IS_LITERAL_BIT) != 0; bool ptr_chain = (flags & ACCESS_CHAIN_PTR_CHAIN_BIT) != 0; bool register_expression_read = (flags & ACCESS_CHAIN_SKIP_REGISTER_EXPRESSION_READ_BIT) == 0; string idx_expr = index_is_literal ? convert_to_string(index) : to_unpacked_expression(index, register_expression_read); // For the case where the base of an OpPtrAccessChain already ends in [n], // we need to use the index as an offset to the existing index, otherwise, // we can just use the index directly. if (ptr_chain && access_chain_is_arrayed) { size_t split_pos = expr.find_last_of(']'); size_t enclose_split = expr.find_last_of(')'); // If we have already enclosed the expression, don't try to be clever, it will break. if (split_pos > enclose_split || enclose_split == string::npos) { string expr_front = expr.substr(0, split_pos); string expr_back = expr.substr(split_pos); expr = expr_front + " + " + enclose_expression(idx_expr) + expr_back; return; } } expr += "["; expr += idx_expr; expr += "]"; } bool CompilerGLSL::access_chain_needs_stage_io_builtin_translation(uint32_t) { return true; } string CompilerGLSL::access_chain_internal(uint32_t base, const uint32_t *indices, uint32_t count, AccessChainFlags flags, AccessChainMeta *meta) { string expr; bool index_is_literal = (flags & ACCESS_CHAIN_INDEX_IS_LITERAL_BIT) != 0; bool msb_is_id = (flags & ACCESS_CHAIN_LITERAL_MSB_FORCE_ID) != 0; bool chain_only = (flags & ACCESS_CHAIN_CHAIN_ONLY_BIT) != 0; bool ptr_chain = (flags & ACCESS_CHAIN_PTR_CHAIN_BIT) != 0; bool register_expression_read = (flags & ACCESS_CHAIN_SKIP_REGISTER_EXPRESSION_READ_BIT) == 0; bool flatten_member_reference = (flags & ACCESS_CHAIN_FLATTEN_ALL_MEMBERS_BIT) != 0; if (!chain_only) { // We handle transpose explicitly, so don't resolve that here. auto *e = maybe_get(base); bool old_transpose = e && e->need_transpose; if (e) e->need_transpose = false; expr = to_enclosed_expression(base, register_expression_read); if (e) e->need_transpose = old_transpose; } // Start traversing type hierarchy at the proper non-pointer types, // but keep type_id referencing the original pointer for use below. uint32_t type_id = expression_type_id(base); const auto *type = &get_pointee_type(type_id); if (!backend.native_pointers) { if (ptr_chain) SPIRV_CROSS_THROW("Backend does not support native pointers and does not support OpPtrAccessChain."); // Wrapped buffer reference pointer types will need to poke into the internal "value" member before // continuing the access chain. if (should_dereference(base)) expr = dereference_expression(get(type_id), expr); } else if (should_dereference(base) && type->basetype != SPIRType::Struct && !ptr_chain) expr = join("(", dereference_expression(*type, expr), ")"); bool access_chain_is_arrayed = expr.find_first_of('[') != string::npos; bool row_major_matrix_needs_conversion = is_non_native_row_major_matrix(base); bool is_packed = has_extended_decoration(base, SPIRVCrossDecorationPhysicalTypePacked); uint32_t physical_type = get_extended_decoration(base, SPIRVCrossDecorationPhysicalTypeID); bool is_invariant = has_decoration(base, DecorationInvariant); bool relaxed_precision = has_decoration(base, DecorationRelaxedPrecision); bool pending_array_enclose = false; bool dimension_flatten = false; bool access_meshlet_position_y = false; if (auto *base_expr = maybe_get(base)) { access_meshlet_position_y = base_expr->access_meshlet_position_y; } // If we are translating access to a structured buffer, the first subscript '._m0' must be hidden bool hide_first_subscript = count > 1 && is_user_type_structured(base); const auto append_index = [&](uint32_t index, bool is_literal, bool is_ptr_chain = false) { AccessChainFlags mod_flags = flags; if (!is_literal) mod_flags &= ~ACCESS_CHAIN_INDEX_IS_LITERAL_BIT; if (!is_ptr_chain) mod_flags &= ~ACCESS_CHAIN_PTR_CHAIN_BIT; access_chain_internal_append_index(expr, base, type, mod_flags, access_chain_is_arrayed, index); check_physical_type_cast(expr, type, physical_type); }; for (uint32_t i = 0; i < count; i++) { uint32_t index = indices[i]; bool is_literal = index_is_literal; if (is_literal && msb_is_id && (index >> 31u) != 0u) { is_literal = false; index &= 0x7fffffffu; } bool ptr_chain_array_entry = ptr_chain && i == 0 && is_array(*type); if (ptr_chain_array_entry) { // This is highly unusual code, since normally we'd use plain AccessChain, but it's still allowed. // We are considered to have a pointer to array and one element shifts by one array at a time. // If we use normal array indexing, we'll first decay to pointer, and lose the array-ness, // so we have to take pointer to array explicitly. if (!should_dereference(base)) expr = enclose_expression(address_of_expression(expr)); } if (ptr_chain && i == 0) { // Pointer chains // If we are flattening multidimensional arrays, only create opening bracket on first // array index. if (options.flatten_multidimensional_arrays) { dimension_flatten = type->array.size() >= 1; pending_array_enclose = dimension_flatten; if (pending_array_enclose) expr += "["; } if (options.flatten_multidimensional_arrays && dimension_flatten) { // If we are flattening multidimensional arrays, do manual stride computation. if (is_literal) expr += convert_to_string(index); else expr += to_enclosed_expression(index, register_expression_read); for (auto j = uint32_t(type->array.size()); j; j--) { expr += " * "; expr += enclose_expression(to_array_size(*type, j - 1)); } if (type->array.empty()) pending_array_enclose = false; else expr += " + "; if (!pending_array_enclose) expr += "]"; } else { append_index(index, is_literal, true); } if (type->basetype == SPIRType::ControlPointArray) { type_id = type->parent_type; type = &get(type_id); } access_chain_is_arrayed = true; // Explicitly enclose the expression if this is one of the weird pointer-to-array cases. // We don't want any future indexing to add to this array dereference. // Enclosing the expression blocks that and avoids any shenanigans with operand priority. if (ptr_chain_array_entry) expr = join("(", expr, ")"); } // Arrays else if (!type->array.empty()) { // If we are flattening multidimensional arrays, only create opening bracket on first // array index. if (options.flatten_multidimensional_arrays && !pending_array_enclose) { dimension_flatten = type->array.size() > 1; pending_array_enclose = dimension_flatten; if (pending_array_enclose) expr += "["; } assert(type->parent_type); auto *var = maybe_get(base); if (backend.force_gl_in_out_block && i == 0 && var && is_builtin_variable(*var) && !has_decoration(type->self, DecorationBlock)) { // This deals with scenarios for tesc/geom where arrays of gl_Position[] are declared. // Normally, these variables live in blocks when compiled from GLSL, // but HLSL seems to just emit straight arrays here. // We must pretend this access goes through gl_in/gl_out arrays // to be able to access certain builtins as arrays. // Similar concerns apply for mesh shaders where we have to redirect to gl_MeshVerticesEXT or MeshPrimitivesEXT. auto builtin = ir.meta[base].decoration.builtin_type; bool mesh_shader = get_execution_model() == ExecutionModelMeshEXT; switch (builtin) { case BuiltInCullDistance: case BuiltInClipDistance: if (type->array.size() == 1) // Red herring. Only consider block IO for two-dimensional arrays here. { append_index(index, is_literal); break; } // fallthrough case BuiltInPosition: case BuiltInPointSize: if (mesh_shader) expr = join("gl_MeshVerticesEXT[", to_expression(index, register_expression_read), "].", expr); else if (var->storage == StorageClassInput) expr = join("gl_in[", to_expression(index, register_expression_read), "].", expr); else if (var->storage == StorageClassOutput) expr = join("gl_out[", to_expression(index, register_expression_read), "].", expr); else append_index(index, is_literal); break; case BuiltInPrimitiveId: case BuiltInLayer: case BuiltInViewportIndex: case BuiltInCullPrimitiveEXT: case BuiltInPrimitiveShadingRateKHR: if (mesh_shader) expr = join("gl_MeshPrimitivesEXT[", to_expression(index, register_expression_read), "].", expr); else append_index(index, is_literal); break; default: append_index(index, is_literal); break; } } else if (backend.force_merged_mesh_block && i == 0 && var && !is_builtin_variable(*var) && var->storage == StorageClassOutput) { if (is_per_primitive_variable(*var)) expr = join("gl_MeshPrimitivesEXT[", to_expression(index, register_expression_read), "].", expr); else expr = join("gl_MeshVerticesEXT[", to_expression(index, register_expression_read), "].", expr); } else if (options.flatten_multidimensional_arrays && dimension_flatten) { // If we are flattening multidimensional arrays, do manual stride computation. auto &parent_type = get(type->parent_type); if (is_literal) expr += convert_to_string(index); else expr += to_enclosed_expression(index, register_expression_read); for (auto j = uint32_t(parent_type.array.size()); j; j--) { expr += " * "; expr += enclose_expression(to_array_size(parent_type, j - 1)); } if (parent_type.array.empty()) pending_array_enclose = false; else expr += " + "; if (!pending_array_enclose) expr += "]"; } else if (index_is_literal || !builtin_translates_to_nonarray(BuiltIn(get_decoration(base, DecorationBuiltIn)))) { // Some builtins are arrays in SPIR-V but not in other languages, e.g. gl_SampleMask[] is an array in SPIR-V but not in Metal. // By throwing away the index, we imply the index was 0, which it must be for gl_SampleMask. // For literal indices we are working on composites, so we ignore this since we have already converted to proper array. append_index(index, is_literal); } if (var && has_decoration(var->self, DecorationBuiltIn) && get_decoration(var->self, DecorationBuiltIn) == BuiltInPosition && get_execution_model() == ExecutionModelMeshEXT) { access_meshlet_position_y = true; } type_id = type->parent_type; type = &get(type_id); // If the physical type has an unnatural vecsize, // we must assume it's a faked struct where the .data member // is used for the real payload. if (physical_type && (is_vector(*type) || is_scalar(*type))) { auto &phys = get(physical_type); if (phys.vecsize > 4) expr += ".data"; } access_chain_is_arrayed = true; } // For structs, the index refers to a constant, which indexes into the members, possibly through a redirection mapping. // We also check if this member is a builtin, since we then replace the entire expression with the builtin one. else if (type->basetype == SPIRType::Struct) { if (!is_literal) index = evaluate_constant_u32(index); if (index < uint32_t(type->member_type_index_redirection.size())) index = type->member_type_index_redirection[index]; if (index >= type->member_types.size()) SPIRV_CROSS_THROW("Member index is out of bounds!"); if (hide_first_subscript) { // First "._m0" subscript has been hidden, subsequent fields must be emitted even for structured buffers hide_first_subscript = false; } else { BuiltIn builtin = BuiltInMax; if (is_member_builtin(*type, index, &builtin) && access_chain_needs_stage_io_builtin_translation(base)) { if (access_chain_is_arrayed) { expr += "."; expr += builtin_to_glsl(builtin, type->storage); } else expr = builtin_to_glsl(builtin, type->storage); if (builtin == BuiltInPosition && get_execution_model() == ExecutionModelMeshEXT) { access_meshlet_position_y = true; } } else { // If the member has a qualified name, use it as the entire chain string qual_mbr_name = get_member_qualified_name(type_id, index); if (!qual_mbr_name.empty()) expr = qual_mbr_name; else if (flatten_member_reference) expr += join("_", to_member_name(*type, index)); else { // Any pointer de-refences for values are handled in the first access chain. // For pointer chains, the pointer-ness is resolved through an array access. // The only time this is not true is when accessing array of SSBO/UBO. // This case is explicitly handled. expr += to_member_reference(base, *type, index, ptr_chain || i != 0); } } } if (has_member_decoration(type->self, index, DecorationInvariant)) is_invariant = true; if (has_member_decoration(type->self, index, DecorationRelaxedPrecision)) relaxed_precision = true; is_packed = member_is_packed_physical_type(*type, index); if (member_is_remapped_physical_type(*type, index)) physical_type = get_extended_member_decoration(type->self, index, SPIRVCrossDecorationPhysicalTypeID); else physical_type = 0; row_major_matrix_needs_conversion = member_is_non_native_row_major_matrix(*type, index); type = &get(type->member_types[index]); } // Matrix -> Vector else if (type->columns > 1) { // If we have a row-major matrix here, we need to defer any transpose in case this access chain // is used to store a column. We can resolve it right here and now if we access a scalar directly, // by flipping indexing order of the matrix. expr += "["; if (is_literal) expr += convert_to_string(index); else expr += to_unpacked_expression(index, register_expression_read); expr += "]"; // If the physical type has an unnatural vecsize, // we must assume it's a faked struct where the .data member // is used for the real payload. if (physical_type) { auto &phys = get(physical_type); if (phys.vecsize > 4 || phys.columns > 4) expr += ".data"; } type_id = type->parent_type; type = &get(type_id); } // Vector -> Scalar else if (type->vecsize > 1) { string deferred_index; if (row_major_matrix_needs_conversion) { // Flip indexing order. auto column_index = expr.find_last_of('['); if (column_index != string::npos) { deferred_index = expr.substr(column_index); auto end_deferred_index = deferred_index.find_last_of(']'); if (end_deferred_index != string::npos && end_deferred_index + 1 != deferred_index.size()) { // If we have any data member fixups, it must be transposed so that it refers to this index. // E.g. [0].data followed by [1] would be shuffled to [1][0].data which is wrong, // and needs to be [1].data[0] instead. end_deferred_index++; deferred_index = deferred_index.substr(end_deferred_index) + deferred_index.substr(0, end_deferred_index); } expr.resize(column_index); } } // Internally, access chain implementation can also be used on composites, // ignore scalar access workarounds in this case. StorageClass effective_storage = StorageClassGeneric; bool ignore_potential_sliced_writes = false; if ((flags & ACCESS_CHAIN_FORCE_COMPOSITE_BIT) == 0) { if (expression_type(base).pointer) effective_storage = get_expression_effective_storage_class(base); // Special consideration for control points. // Control points can only be written by InvocationID, so there is no need // to consider scalar access chains here. // Cleans up some cases where it's very painful to determine the accurate storage class // since blocks can be partially masked ... auto *var = maybe_get_backing_variable(base); if (var && var->storage == StorageClassOutput && get_execution_model() == ExecutionModelTessellationControl && !has_decoration(var->self, DecorationPatch)) { ignore_potential_sliced_writes = true; } } else ignore_potential_sliced_writes = true; if (!row_major_matrix_needs_conversion && !ignore_potential_sliced_writes) { // On some backends, we might not be able to safely access individual scalars in a vector. // To work around this, we might have to cast the access chain reference to something which can, // like a pointer to scalar, which we can then index into. prepare_access_chain_for_scalar_access(expr, get(type->parent_type), effective_storage, is_packed); } if (is_literal) { bool out_of_bounds = (index >= type->vecsize); if (!is_packed && !row_major_matrix_needs_conversion) { expr += "."; expr += index_to_swizzle(out_of_bounds ? 0 : index); } else { // For packed vectors, we can only access them as an array, not by swizzle. expr += join("[", out_of_bounds ? 0 : index, "]"); } } else if (ir.ids[index].get_type() == TypeConstant && !is_packed && !row_major_matrix_needs_conversion) { auto &c = get(index); bool out_of_bounds = (c.scalar() >= type->vecsize); if (c.specialization) { // If the index is a spec constant, we cannot turn extract into a swizzle. expr += join("[", out_of_bounds ? "0" : to_expression(index), "]"); } else { expr += "."; expr += index_to_swizzle(out_of_bounds ? 0 : c.scalar()); } } else { expr += "["; expr += to_unpacked_expression(index, register_expression_read); expr += "]"; } if (row_major_matrix_needs_conversion && !ignore_potential_sliced_writes) { if (prepare_access_chain_for_scalar_access(expr, get(type->parent_type), effective_storage, is_packed)) { // We're in a pointer context now, so just remove any member dereference. auto first_index = deferred_index.find_first_of('['); if (first_index != string::npos && first_index != 0) deferred_index = deferred_index.substr(first_index); } } if (access_meshlet_position_y) { if (is_literal) { access_meshlet_position_y = index == 1; } else { const auto *c = maybe_get(index); if (c) access_meshlet_position_y = c->scalar() == 1; else { // We don't know, but we have to assume no. // Flip Y in mesh shaders is an opt-in horrible hack, so we'll have to assume shaders try to behave. access_meshlet_position_y = false; } } } expr += deferred_index; row_major_matrix_needs_conversion = false; is_packed = false; physical_type = 0; type_id = type->parent_type; type = &get(type_id); } else if (!backend.allow_truncated_access_chain) SPIRV_CROSS_THROW("Cannot subdivide a scalar value!"); } if (pending_array_enclose) { SPIRV_CROSS_THROW("Flattening of multidimensional arrays were enabled, " "but the access chain was terminated in the middle of a multidimensional array. " "This is not supported."); } if (meta) { meta->need_transpose = row_major_matrix_needs_conversion; meta->storage_is_packed = is_packed; meta->storage_is_invariant = is_invariant; meta->storage_physical_type = physical_type; meta->relaxed_precision = relaxed_precision; meta->access_meshlet_position_y = access_meshlet_position_y; } return expr; } void CompilerGLSL::check_physical_type_cast(std::string &, const SPIRType *, uint32_t) { } bool CompilerGLSL::prepare_access_chain_for_scalar_access(std::string &, const SPIRType &, spv::StorageClass, bool &) { return false; } string CompilerGLSL::to_flattened_struct_member(const string &basename, const SPIRType &type, uint32_t index) { auto ret = join(basename, "_", to_member_name(type, index)); ParsedIR::sanitize_underscores(ret); return ret; } string CompilerGLSL::access_chain(uint32_t base, const uint32_t *indices, uint32_t count, const SPIRType &target_type, AccessChainMeta *meta, bool ptr_chain) { if (flattened_buffer_blocks.count(base)) { uint32_t matrix_stride = 0; uint32_t array_stride = 0; bool need_transpose = false; flattened_access_chain_offset(expression_type(base), indices, count, 0, 16, &need_transpose, &matrix_stride, &array_stride, ptr_chain); if (meta) { meta->need_transpose = target_type.columns > 1 && need_transpose; meta->storage_is_packed = false; } return flattened_access_chain(base, indices, count, target_type, 0, matrix_stride, array_stride, need_transpose); } else if (flattened_structs.count(base) && count > 0) { AccessChainFlags flags = ACCESS_CHAIN_CHAIN_ONLY_BIT | ACCESS_CHAIN_SKIP_REGISTER_EXPRESSION_READ_BIT; if (ptr_chain) flags |= ACCESS_CHAIN_PTR_CHAIN_BIT; if (flattened_structs[base]) { flags |= ACCESS_CHAIN_FLATTEN_ALL_MEMBERS_BIT; if (meta) meta->flattened_struct = target_type.basetype == SPIRType::Struct; } auto chain = access_chain_internal(base, indices, count, flags, nullptr).substr(1); if (meta) { meta->need_transpose = false; meta->storage_is_packed = false; } auto basename = to_flattened_access_chain_expression(base); auto ret = join(basename, "_", chain); ParsedIR::sanitize_underscores(ret); return ret; } else { AccessChainFlags flags = ACCESS_CHAIN_SKIP_REGISTER_EXPRESSION_READ_BIT; if (ptr_chain) flags |= ACCESS_CHAIN_PTR_CHAIN_BIT; return access_chain_internal(base, indices, count, flags, meta); } } string CompilerGLSL::load_flattened_struct(const string &basename, const SPIRType &type) { auto expr = type_to_glsl_constructor(type); expr += '('; for (uint32_t i = 0; i < uint32_t(type.member_types.size()); i++) { if (i) expr += ", "; auto &member_type = get(type.member_types[i]); if (member_type.basetype == SPIRType::Struct) expr += load_flattened_struct(to_flattened_struct_member(basename, type, i), member_type); else expr += to_flattened_struct_member(basename, type, i); } expr += ')'; return expr; } std::string CompilerGLSL::to_flattened_access_chain_expression(uint32_t id) { // Do not use to_expression as that will unflatten access chains. string basename; if (const auto *var = maybe_get(id)) basename = to_name(var->self); else if (const auto *expr = maybe_get(id)) basename = expr->expression; else basename = to_expression(id); return basename; } void CompilerGLSL::store_flattened_struct(const string &basename, uint32_t rhs_id, const SPIRType &type, const SmallVector &indices) { SmallVector sub_indices = indices; sub_indices.push_back(0); auto *member_type = &type; for (auto &index : indices) member_type = &get(member_type->member_types[index]); for (uint32_t i = 0; i < uint32_t(member_type->member_types.size()); i++) { sub_indices.back() = i; auto lhs = join(basename, "_", to_member_name(*member_type, i)); ParsedIR::sanitize_underscores(lhs); if (get(member_type->member_types[i]).basetype == SPIRType::Struct) { store_flattened_struct(lhs, rhs_id, type, sub_indices); } else { auto rhs = to_expression(rhs_id) + to_multi_member_reference(type, sub_indices); statement(lhs, " = ", rhs, ";"); } } } void CompilerGLSL::store_flattened_struct(uint32_t lhs_id, uint32_t value) { auto &type = expression_type(lhs_id); auto basename = to_flattened_access_chain_expression(lhs_id); store_flattened_struct(basename, value, type, {}); } std::string CompilerGLSL::flattened_access_chain(uint32_t base, const uint32_t *indices, uint32_t count, const SPIRType &target_type, uint32_t offset, uint32_t matrix_stride, uint32_t /* array_stride */, bool need_transpose) { if (!target_type.array.empty()) SPIRV_CROSS_THROW("Access chains that result in an array can not be flattened"); else if (target_type.basetype == SPIRType::Struct) return flattened_access_chain_struct(base, indices, count, target_type, offset); else if (target_type.columns > 1) return flattened_access_chain_matrix(base, indices, count, target_type, offset, matrix_stride, need_transpose); else return flattened_access_chain_vector(base, indices, count, target_type, offset, matrix_stride, need_transpose); } std::string CompilerGLSL::flattened_access_chain_struct(uint32_t base, const uint32_t *indices, uint32_t count, const SPIRType &target_type, uint32_t offset) { std::string expr; if (backend.can_declare_struct_inline) { expr += type_to_glsl_constructor(target_type); expr += "("; } else expr += "{"; for (uint32_t i = 0; i < uint32_t(target_type.member_types.size()); ++i) { if (i != 0) expr += ", "; const SPIRType &member_type = get(target_type.member_types[i]); uint32_t member_offset = type_struct_member_offset(target_type, i); // The access chain terminates at the struct, so we need to find matrix strides and row-major information // ahead of time. bool need_transpose = false; bool relaxed = false; uint32_t matrix_stride = 0; if (member_type.columns > 1) { auto decorations = combined_decoration_for_member(target_type, i); need_transpose = decorations.get(DecorationRowMajor); relaxed = decorations.get(DecorationRelaxedPrecision); matrix_stride = type_struct_member_matrix_stride(target_type, i); } auto tmp = flattened_access_chain(base, indices, count, member_type, offset + member_offset, matrix_stride, 0 /* array_stride */, need_transpose); // Cannot forward transpositions, so resolve them here. if (need_transpose) expr += convert_row_major_matrix(tmp, member_type, 0, false, relaxed); else expr += tmp; } expr += backend.can_declare_struct_inline ? ")" : "}"; return expr; } std::string CompilerGLSL::flattened_access_chain_matrix(uint32_t base, const uint32_t *indices, uint32_t count, const SPIRType &target_type, uint32_t offset, uint32_t matrix_stride, bool need_transpose) { assert(matrix_stride); SPIRType tmp_type = target_type; if (need_transpose) swap(tmp_type.vecsize, tmp_type.columns); std::string expr; expr += type_to_glsl_constructor(tmp_type); expr += "("; for (uint32_t i = 0; i < tmp_type.columns; i++) { if (i != 0) expr += ", "; expr += flattened_access_chain_vector(base, indices, count, tmp_type, offset + i * matrix_stride, matrix_stride, /* need_transpose= */ false); } expr += ")"; return expr; } std::string CompilerGLSL::flattened_access_chain_vector(uint32_t base, const uint32_t *indices, uint32_t count, const SPIRType &target_type, uint32_t offset, uint32_t matrix_stride, bool need_transpose) { auto result = flattened_access_chain_offset(expression_type(base), indices, count, offset, 16); auto buffer_name = to_name(expression_type(base).self); if (need_transpose) { std::string expr; if (target_type.vecsize > 1) { expr += type_to_glsl_constructor(target_type); expr += "("; } for (uint32_t i = 0; i < target_type.vecsize; ++i) { if (i != 0) expr += ", "; uint32_t component_offset = result.second + i * matrix_stride; assert(component_offset % (target_type.width / 8) == 0); uint32_t index = component_offset / (target_type.width / 8); expr += buffer_name; expr += "["; expr += result.first; // this is a series of N1 * k1 + N2 * k2 + ... that is either empty or ends with a + expr += convert_to_string(index / 4); expr += "]"; expr += vector_swizzle(1, index % 4); } if (target_type.vecsize > 1) { expr += ")"; } return expr; } else { assert(result.second % (target_type.width / 8) == 0); uint32_t index = result.second / (target_type.width / 8); std::string expr; expr += buffer_name; expr += "["; expr += result.first; // this is a series of N1 * k1 + N2 * k2 + ... that is either empty or ends with a + expr += convert_to_string(index / 4); expr += "]"; expr += vector_swizzle(target_type.vecsize, index % 4); return expr; } } std::pair CompilerGLSL::flattened_access_chain_offset( const SPIRType &basetype, const uint32_t *indices, uint32_t count, uint32_t offset, uint32_t word_stride, bool *need_transpose, uint32_t *out_matrix_stride, uint32_t *out_array_stride, bool ptr_chain) { // Start traversing type hierarchy at the proper non-pointer types. const auto *type = &get_pointee_type(basetype); std::string expr; // Inherit matrix information in case we are access chaining a vector which might have come from a row major layout. bool row_major_matrix_needs_conversion = need_transpose ? *need_transpose : false; uint32_t matrix_stride = out_matrix_stride ? *out_matrix_stride : 0; uint32_t array_stride = out_array_stride ? *out_array_stride : 0; for (uint32_t i = 0; i < count; i++) { uint32_t index = indices[i]; // Pointers if (ptr_chain && i == 0) { // Here, the pointer type will be decorated with an array stride. array_stride = get_decoration(basetype.self, DecorationArrayStride); if (!array_stride) SPIRV_CROSS_THROW("SPIR-V does not define ArrayStride for buffer block."); auto *constant = maybe_get(index); if (constant) { // Constant array access. offset += constant->scalar() * array_stride; } else { // Dynamic array access. if (array_stride % word_stride) { SPIRV_CROSS_THROW("Array stride for dynamic indexing must be divisible by the size " "of a 4-component vector. " "Likely culprit here is a float or vec2 array inside a push " "constant block which is std430. " "This cannot be flattened. Try using std140 layout instead."); } expr += to_enclosed_expression(index); expr += " * "; expr += convert_to_string(array_stride / word_stride); expr += " + "; } } // Arrays else if (!type->array.empty()) { auto *constant = maybe_get(index); if (constant) { // Constant array access. offset += constant->scalar() * array_stride; } else { // Dynamic array access. if (array_stride % word_stride) { SPIRV_CROSS_THROW("Array stride for dynamic indexing must be divisible by the size " "of a 4-component vector. " "Likely culprit here is a float or vec2 array inside a push " "constant block which is std430. " "This cannot be flattened. Try using std140 layout instead."); } expr += to_enclosed_expression(index, false); expr += " * "; expr += convert_to_string(array_stride / word_stride); expr += " + "; } uint32_t parent_type = type->parent_type; type = &get(parent_type); if (!type->array.empty()) array_stride = get_decoration(parent_type, DecorationArrayStride); } // For structs, the index refers to a constant, which indexes into the members. // We also check if this member is a builtin, since we then replace the entire expression with the builtin one. else if (type->basetype == SPIRType::Struct) { index = evaluate_constant_u32(index); if (index >= type->member_types.size()) SPIRV_CROSS_THROW("Member index is out of bounds!"); offset += type_struct_member_offset(*type, index); auto &struct_type = *type; type = &get(type->member_types[index]); if (type->columns > 1) { matrix_stride = type_struct_member_matrix_stride(struct_type, index); row_major_matrix_needs_conversion = combined_decoration_for_member(struct_type, index).get(DecorationRowMajor); } else row_major_matrix_needs_conversion = false; if (!type->array.empty()) array_stride = type_struct_member_array_stride(struct_type, index); } // Matrix -> Vector else if (type->columns > 1) { auto *constant = maybe_get(index); if (constant) { index = evaluate_constant_u32(index); offset += index * (row_major_matrix_needs_conversion ? (type->width / 8) : matrix_stride); } else { uint32_t indexing_stride = row_major_matrix_needs_conversion ? (type->width / 8) : matrix_stride; // Dynamic array access. if (indexing_stride % word_stride) { SPIRV_CROSS_THROW("Matrix stride for dynamic indexing must be divisible by the size of a " "4-component vector. " "Likely culprit here is a row-major matrix being accessed dynamically. " "This cannot be flattened. Try using std140 layout instead."); } expr += to_enclosed_expression(index, false); expr += " * "; expr += convert_to_string(indexing_stride / word_stride); expr += " + "; } type = &get(type->parent_type); } // Vector -> Scalar else if (type->vecsize > 1) { auto *constant = maybe_get(index); if (constant) { index = evaluate_constant_u32(index); offset += index * (row_major_matrix_needs_conversion ? matrix_stride : (type->width / 8)); } else { uint32_t indexing_stride = row_major_matrix_needs_conversion ? matrix_stride : (type->width / 8); // Dynamic array access. if (indexing_stride % word_stride) { SPIRV_CROSS_THROW("Stride for dynamic vector indexing must be divisible by the " "size of a 4-component vector. " "This cannot be flattened in legacy targets."); } expr += to_enclosed_expression(index, false); expr += " * "; expr += convert_to_string(indexing_stride / word_stride); expr += " + "; } type = &get(type->parent_type); } else SPIRV_CROSS_THROW("Cannot subdivide a scalar value!"); } if (need_transpose) *need_transpose = row_major_matrix_needs_conversion; if (out_matrix_stride) *out_matrix_stride = matrix_stride; if (out_array_stride) *out_array_stride = array_stride; return std::make_pair(expr, offset); } bool CompilerGLSL::should_dereference(uint32_t id) { const auto &type = expression_type(id); // Non-pointer expressions don't need to be dereferenced. if (!type.pointer) return false; // Handles shouldn't be dereferenced either. if (!expression_is_lvalue(id)) return false; // If id is a variable but not a phi variable, we should not dereference it. if (auto *var = maybe_get(id)) return var->phi_variable; if (auto *expr = maybe_get(id)) { // If id is an access chain, we should not dereference it. if (expr->access_chain) return false; // If id is a forwarded copy of a variable pointer, we should not dereference it. SPIRVariable *var = nullptr; while (expr->loaded_from && expression_is_forwarded(expr->self)) { auto &src_type = expression_type(expr->loaded_from); // To be a copy, the pointer and its source expression must be the // same type. Can't check type.self, because for some reason that's // usually the base type with pointers stripped off. This check is // complex enough that I've hoisted it out of the while condition. if (src_type.pointer != type.pointer || src_type.pointer_depth != type.pointer_depth || src_type.parent_type != type.parent_type) break; if ((var = maybe_get(expr->loaded_from))) break; if (!(expr = maybe_get(expr->loaded_from))) break; } return !var || var->phi_variable; } // Otherwise, we should dereference this pointer expression. return true; } bool CompilerGLSL::should_forward(uint32_t id) const { // If id is a variable we will try to forward it regardless of force_temporary check below // This is important because otherwise we'll get local sampler copies (highp sampler2D foo = bar) that are invalid in OpenGL GLSL auto *var = maybe_get(id); if (var) { // Never forward volatile builtin variables, e.g. SPIR-V 1.6 HelperInvocation. return !(has_decoration(id, DecorationBuiltIn) && has_decoration(id, DecorationVolatile)); } // For debugging emit temporary variables for all expressions if (options.force_temporary) return false; // If an expression carries enough dependencies we need to stop forwarding at some point, // or we explode compilers. There are usually limits to how much we can nest expressions. auto *expr = maybe_get(id); const uint32_t max_expression_dependencies = 64; if (expr && expr->expression_dependencies.size() >= max_expression_dependencies) return false; if (expr && expr->loaded_from && has_decoration(expr->loaded_from, DecorationBuiltIn) && has_decoration(expr->loaded_from, DecorationVolatile)) { // Never forward volatile builtin variables, e.g. SPIR-V 1.6 HelperInvocation. return false; } // Immutable expression can always be forwarded. if (is_immutable(id)) return true; return false; } bool CompilerGLSL::should_suppress_usage_tracking(uint32_t id) const { // Used only by opcodes which don't do any real "work", they just swizzle data in some fashion. return !expression_is_forwarded(id) || expression_suppresses_usage_tracking(id); } void CompilerGLSL::track_expression_read(uint32_t id) { switch (ir.ids[id].get_type()) { case TypeExpression: { auto &e = get(id); for (auto implied_read : e.implied_read_expressions) track_expression_read(implied_read); break; } case TypeAccessChain: { auto &e = get(id); for (auto implied_read : e.implied_read_expressions) track_expression_read(implied_read); break; } default: break; } // If we try to read a forwarded temporary more than once we will stamp out possibly complex code twice. // In this case, it's better to just bind the complex expression to the temporary and read that temporary twice. if (expression_is_forwarded(id) && !expression_suppresses_usage_tracking(id)) { auto &v = expression_usage_counts[id]; v++; // If we create an expression outside a loop, // but access it inside a loop, we're implicitly reading it multiple times. // If the expression in question is expensive, we should hoist it out to avoid relying on loop-invariant code motion // working inside the backend compiler. if (expression_read_implies_multiple_reads(id)) v++; if (v >= 2) { //if (v == 2) // fprintf(stderr, "ID %u was forced to temporary due to more than 1 expression use!\n", id); // Force a recompile after this pass to avoid forwarding this variable. force_temporary_and_recompile(id); } } } bool CompilerGLSL::args_will_forward(uint32_t id, const uint32_t *args, uint32_t num_args, bool pure) { if (forced_temporaries.find(id) != end(forced_temporaries)) return false; for (uint32_t i = 0; i < num_args; i++) if (!should_forward(args[i])) return false; // We need to forward globals as well. if (!pure) { for (auto global : global_variables) if (!should_forward(global)) return false; for (auto aliased : aliased_variables) if (!should_forward(aliased)) return false; } return true; } void CompilerGLSL::register_impure_function_call() { // Impure functions can modify globals and aliased variables, so invalidate them as well. for (auto global : global_variables) flush_dependees(get(global)); for (auto aliased : aliased_variables) flush_dependees(get(aliased)); } void CompilerGLSL::register_call_out_argument(uint32_t id) { register_write(id); auto *var = maybe_get(id); if (var) flush_variable_declaration(var->self); } string CompilerGLSL::variable_decl_function_local(SPIRVariable &var) { // These variables are always function local, // so make sure we emit the variable without storage qualifiers. // Some backends will inject custom variables locally in a function // with a storage qualifier which is not function-local. auto old_storage = var.storage; var.storage = StorageClassFunction; auto expr = variable_decl(var); var.storage = old_storage; return expr; } void CompilerGLSL::emit_variable_temporary_copies(const SPIRVariable &var) { // Ensure that we declare phi-variable copies even if the original declaration isn't deferred if (var.allocate_temporary_copy && !flushed_phi_variables.count(var.self)) { auto &type = get(var.basetype); auto &flags = get_decoration_bitset(var.self); statement(flags_to_qualifiers_glsl(type, flags), variable_decl(type, join("_", var.self, "_copy")), ";"); flushed_phi_variables.insert(var.self); } } void CompilerGLSL::flush_variable_declaration(uint32_t id) { // Ensure that we declare phi-variable copies even if the original declaration isn't deferred auto *var = maybe_get(id); if (var && var->deferred_declaration) { string initializer; if (options.force_zero_initialized_variables && (var->storage == StorageClassFunction || var->storage == StorageClassGeneric || var->storage == StorageClassPrivate) && !var->initializer && type_can_zero_initialize(get_variable_data_type(*var))) { initializer = join(" = ", to_zero_initialized_expression(get_variable_data_type_id(*var))); } statement(variable_decl_function_local(*var), initializer, ";"); var->deferred_declaration = false; } if (var) { emit_variable_temporary_copies(*var); } } bool CompilerGLSL::remove_duplicate_swizzle(string &op) { auto pos = op.find_last_of('.'); if (pos == string::npos || pos == 0) return false; string final_swiz = op.substr(pos + 1, string::npos); if (backend.swizzle_is_function) { if (final_swiz.size() < 2) return false; if (final_swiz.substr(final_swiz.size() - 2, string::npos) == "()") final_swiz.erase(final_swiz.size() - 2, string::npos); else return false; } // Check if final swizzle is of form .x, .xy, .xyz, .xyzw or similar. // If so, and previous swizzle is of same length, // we can drop the final swizzle altogether. for (uint32_t i = 0; i < final_swiz.size(); i++) { static const char expected[] = { 'x', 'y', 'z', 'w' }; if (i >= 4 || final_swiz[i] != expected[i]) return false; } auto prevpos = op.find_last_of('.', pos - 1); if (prevpos == string::npos) return false; prevpos++; // Make sure there are only swizzles here ... for (auto i = prevpos; i < pos; i++) { if (op[i] < 'w' || op[i] > 'z') { // If swizzles are foo.xyz() like in C++ backend for example, check for that. if (backend.swizzle_is_function && i + 2 == pos && op[i] == '(' && op[i + 1] == ')') break; return false; } } // If original swizzle is large enough, just carve out the components we need. // E.g. foobar.wyx.xy will turn into foobar.wy. if (pos - prevpos >= final_swiz.size()) { op.erase(prevpos + final_swiz.size(), string::npos); // Add back the function call ... if (backend.swizzle_is_function) op += "()"; } return true; } // Optimizes away vector swizzles where we have something like // vec3 foo; // foo.xyz <-- swizzle expression does nothing. // This is a very common pattern after OpCompositeCombine. bool CompilerGLSL::remove_unity_swizzle(uint32_t base, string &op) { auto pos = op.find_last_of('.'); if (pos == string::npos || pos == 0) return false; string final_swiz = op.substr(pos + 1, string::npos); if (backend.swizzle_is_function) { if (final_swiz.size() < 2) return false; if (final_swiz.substr(final_swiz.size() - 2, string::npos) == "()") final_swiz.erase(final_swiz.size() - 2, string::npos); else return false; } // Check if final swizzle is of form .x, .xy, .xyz, .xyzw or similar. // If so, and previous swizzle is of same length, // we can drop the final swizzle altogether. for (uint32_t i = 0; i < final_swiz.size(); i++) { static const char expected[] = { 'x', 'y', 'z', 'w' }; if (i >= 4 || final_swiz[i] != expected[i]) return false; } auto &type = expression_type(base); // Sanity checking ... assert(type.columns == 1 && type.array.empty()); if (type.vecsize == final_swiz.size()) op.erase(pos, string::npos); return true; } string CompilerGLSL::build_composite_combiner(uint32_t return_type, const uint32_t *elems, uint32_t length) { ID base = 0; string op; string subop; // Can only merge swizzles for vectors. auto &type = get(return_type); bool can_apply_swizzle_opt = type.basetype != SPIRType::Struct && type.array.empty() && type.columns == 1; bool swizzle_optimization = false; for (uint32_t i = 0; i < length; i++) { auto *e = maybe_get(elems[i]); // If we're merging another scalar which belongs to the same base // object, just merge the swizzles to avoid triggering more than 1 expression read as much as possible! if (can_apply_swizzle_opt && e && e->base_expression && e->base_expression == base) { // Only supposed to be used for vector swizzle -> scalar. assert(!e->expression.empty() && e->expression.front() == '.'); subop += e->expression.substr(1, string::npos); swizzle_optimization = true; } else { // We'll likely end up with duplicated swizzles, e.g. // foobar.xyz.xyz from patterns like // OpVectorShuffle // OpCompositeExtract x 3 // OpCompositeConstruct 3x + other scalar. // Just modify op in-place. if (swizzle_optimization) { if (backend.swizzle_is_function) subop += "()"; // Don't attempt to remove unity swizzling if we managed to remove duplicate swizzles. // The base "foo" might be vec4, while foo.xyz is vec3 (OpVectorShuffle) and looks like a vec3 due to the .xyz tacked on. // We only want to remove the swizzles if we're certain that the resulting base will be the same vecsize. // Essentially, we can only remove one set of swizzles, since that's what we have control over ... // Case 1: // foo.yxz.xyz: Duplicate swizzle kicks in, giving foo.yxz, we are done. // foo.yxz was the result of OpVectorShuffle and we don't know the type of foo. // Case 2: // foo.xyz: Duplicate swizzle won't kick in. // If foo is vec3, we can remove xyz, giving just foo. if (!remove_duplicate_swizzle(subop)) remove_unity_swizzle(base, subop); // Strips away redundant parens if we created them during component extraction. strip_enclosed_expression(subop); swizzle_optimization = false; op += subop; } else op += subop; if (i) op += ", "; bool uses_buffer_offset = type.basetype == SPIRType::Struct && has_member_decoration(type.self, i, DecorationOffset); subop = to_composite_constructor_expression(type, elems[i], uses_buffer_offset); } base = e ? e->base_expression : ID(0); } if (swizzle_optimization) { if (backend.swizzle_is_function) subop += "()"; if (!remove_duplicate_swizzle(subop)) remove_unity_swizzle(base, subop); // Strips away redundant parens if we created them during component extraction. strip_enclosed_expression(subop); } op += subop; return op; } bool CompilerGLSL::skip_argument(uint32_t id) const { if (!combined_image_samplers.empty() || !options.vulkan_semantics) { auto &type = expression_type(id); if (type.basetype == SPIRType::Sampler || (type.basetype == SPIRType::Image && type.image.sampled == 1)) return true; } return false; } bool CompilerGLSL::optimize_read_modify_write(const SPIRType &type, const string &lhs, const string &rhs) { // Do this with strings because we have a very clear pattern we can check for and it avoids // adding lots of special cases to the code emission. if (rhs.size() < lhs.size() + 3) return false; // Do not optimize matrices. They are a bit awkward to reason about in general // (in which order does operation happen?), and it does not work on MSL anyways. if (type.vecsize > 1 && type.columns > 1) return false; auto index = rhs.find(lhs); if (index != 0) return false; // TODO: Shift operators, but it's not important for now. auto op = rhs.find_first_of("+-/*%|&^", lhs.size() + 1); if (op != lhs.size() + 1) return false; // Check that the op is followed by space. This excludes && and ||. if (rhs[op + 1] != ' ') return false; char bop = rhs[op]; auto expr = rhs.substr(lhs.size() + 3); // Avoids false positives where we get a = a * b + c. // Normally, these expressions are always enclosed, but unexpected code paths may end up hitting this. if (needs_enclose_expression(expr)) return false; // Try to find increments and decrements. Makes it look neater as += 1, -= 1 is fairly rare to see in real code. // Find some common patterns which are equivalent. if ((bop == '+' || bop == '-') && (expr == "1" || expr == "uint(1)" || expr == "1u" || expr == "int(1u)")) statement(lhs, bop, bop, ";"); else statement(lhs, " ", bop, "= ", expr, ";"); return true; } void CompilerGLSL::register_control_dependent_expression(uint32_t expr) { if (forwarded_temporaries.find(expr) == end(forwarded_temporaries)) return; assert(current_emitting_block); current_emitting_block->invalidate_expressions.push_back(expr); } void CompilerGLSL::emit_block_instructions(SPIRBlock &block) { current_emitting_block = █ if (backend.requires_relaxed_precision_analysis) { // If PHI variables are consumed in unexpected precision contexts, copy them here. for (size_t i = 0, n = block.phi_variables.size(); i < n; i++) { auto &phi = block.phi_variables[i]; // Ensure we only copy once. We know a-priori that this array will lay out // the same function variables together. if (i && block.phi_variables[i - 1].function_variable == phi.function_variable) continue; auto itr = temporary_to_mirror_precision_alias.find(phi.function_variable); if (itr != temporary_to_mirror_precision_alias.end()) { // Explicitly, we don't want to inherit RelaxedPrecision state in this CopyObject, // so it helps to have handle_instruction_precision() on the outside of emit_instruction(). EmbeddedInstruction inst; inst.op = OpCopyObject; inst.length = 3; inst.ops.push_back(expression_type_id(itr->first)); inst.ops.push_back(itr->second); inst.ops.push_back(itr->first); emit_instruction(inst); } } } for (auto &op : block.ops) { auto temporary_copy = handle_instruction_precision(op); emit_instruction(op); if (temporary_copy.dst_id) { // Explicitly, we don't want to inherit RelaxedPrecision state in this CopyObject, // so it helps to have handle_instruction_precision() on the outside of emit_instruction(). EmbeddedInstruction inst; inst.op = OpCopyObject; inst.length = 3; inst.ops.push_back(expression_type_id(temporary_copy.src_id)); inst.ops.push_back(temporary_copy.dst_id); inst.ops.push_back(temporary_copy.src_id); // Never attempt to hoist mirrored temporaries. // They are hoisted in lock-step with their parents. block_temporary_hoisting = true; emit_instruction(inst); block_temporary_hoisting = false; } } current_emitting_block = nullptr; } void CompilerGLSL::disallow_forwarding_in_expression_chain(const SPIRExpression &expr) { // Allow trivially forwarded expressions like OpLoad or trivial shuffles, // these will be marked as having suppressed usage tracking. // Our only concern is to make sure arithmetic operations are done in similar ways. if (expression_is_forwarded(expr.self) && !expression_suppresses_usage_tracking(expr.self) && forced_invariant_temporaries.count(expr.self) == 0) { force_temporary_and_recompile(expr.self); forced_invariant_temporaries.insert(expr.self); for (auto &dependent : expr.expression_dependencies) disallow_forwarding_in_expression_chain(get(dependent)); } } void CompilerGLSL::handle_store_to_invariant_variable(uint32_t store_id, uint32_t value_id) { // Variables or access chains marked invariant are complicated. We will need to make sure the code-gen leading up to // this variable is consistent. The failure case for SPIRV-Cross is when an expression is forced to a temporary // in one translation unit, but not another, e.g. due to multiple use of an expression. // This causes variance despite the output variable being marked invariant, so the solution here is to force all dependent // expressions to be temporaries. // It is uncertain if this is enough to support invariant in all possible cases, but it should be good enough // for all reasonable uses of invariant. if (!has_decoration(store_id, DecorationInvariant)) return; auto *expr = maybe_get(value_id); if (!expr) return; disallow_forwarding_in_expression_chain(*expr); } void CompilerGLSL::emit_store_statement(uint32_t lhs_expression, uint32_t rhs_expression) { auto rhs = to_pointer_expression(rhs_expression); // Statements to OpStore may be empty if it is a struct with zero members. Just forward the store to /dev/null. if (!rhs.empty()) { handle_store_to_invariant_variable(lhs_expression, rhs_expression); if (!unroll_array_to_complex_store(lhs_expression, rhs_expression)) { auto lhs = to_dereferenced_expression(lhs_expression); if (has_decoration(lhs_expression, DecorationNonUniform)) convert_non_uniform_expression(lhs, lhs_expression); // We might need to cast in order to store to a builtin. cast_to_variable_store(lhs_expression, rhs, expression_type(rhs_expression)); // Tries to optimize assignments like " = op expr". // While this is purely cosmetic, this is important for legacy ESSL where loop // variable increments must be in either i++ or i += const-expr. // Without this, we end up with i = i + 1, which is correct GLSL, but not correct GLES 2.0. if (!optimize_read_modify_write(expression_type(rhs_expression), lhs, rhs)) statement(lhs, " = ", rhs, ";"); } register_write(lhs_expression); } } uint32_t CompilerGLSL::get_integer_width_for_instruction(const Instruction &instr) const { if (instr.length < 3) return 32; auto *ops = stream(instr); switch (instr.op) { case OpSConvert: case OpConvertSToF: case OpUConvert: case OpConvertUToF: case OpIEqual: case OpINotEqual: case OpSLessThan: case OpSLessThanEqual: case OpSGreaterThan: case OpSGreaterThanEqual: case OpULessThan: case OpULessThanEqual: case OpUGreaterThan: case OpUGreaterThanEqual: return expression_type(ops[2]).width; default: { // We can look at result type which is more robust. auto *type = maybe_get(ops[0]); if (type && type_is_integral(*type)) return type->width; else return 32; } } } uint32_t CompilerGLSL::get_integer_width_for_glsl_instruction(GLSLstd450 op, const uint32_t *ops, uint32_t length) const { if (length < 1) return 32; switch (op) { case GLSLstd450SAbs: case GLSLstd450SSign: case GLSLstd450UMin: case GLSLstd450SMin: case GLSLstd450UMax: case GLSLstd450SMax: case GLSLstd450UClamp: case GLSLstd450SClamp: case GLSLstd450FindSMsb: case GLSLstd450FindUMsb: return expression_type(ops[0]).width; default: { // We don't need to care about other opcodes, just return 32. return 32; } } } void CompilerGLSL::forward_relaxed_precision(uint32_t dst_id, const uint32_t *args, uint32_t length) { // Only GLSL supports RelaxedPrecision directly. // We cannot implement this in HLSL or MSL because it is tied to the type system. // In SPIR-V, everything must masquerade as 32-bit. if (!backend.requires_relaxed_precision_analysis) return; auto input_precision = analyze_expression_precision(args, length); // For expressions which are loaded or directly forwarded, we inherit mediump implicitly. // For dst_id to be analyzed properly, it must inherit any relaxed precision decoration from src_id. if (input_precision == Options::Mediump) set_decoration(dst_id, DecorationRelaxedPrecision); } CompilerGLSL::Options::Precision CompilerGLSL::analyze_expression_precision(const uint32_t *args, uint32_t length) const { // Now, analyze the precision at which the arguments would run. // GLSL rules are such that the precision used to evaluate an expression is equal to the highest precision // for the inputs. Constants do not have inherent precision and do not contribute to this decision. // If all inputs are constants, they inherit precision from outer expressions, including an l-value. // In this case, we'll have to force a temporary for dst_id so that we can bind the constant expression with // correct precision. bool expression_has_highp = false; bool expression_has_mediump = false; for (uint32_t i = 0; i < length; i++) { uint32_t arg = args[i]; auto handle_type = ir.ids[arg].get_type(); if (handle_type == TypeConstant || handle_type == TypeConstantOp || handle_type == TypeUndef) continue; if (has_decoration(arg, DecorationRelaxedPrecision)) expression_has_mediump = true; else expression_has_highp = true; } if (expression_has_highp) return Options::Highp; else if (expression_has_mediump) return Options::Mediump; else return Options::DontCare; } void CompilerGLSL::analyze_precision_requirements(uint32_t type_id, uint32_t dst_id, uint32_t *args, uint32_t length) { if (!backend.requires_relaxed_precision_analysis) return; auto &type = get(type_id); // RelaxedPrecision only applies to 32-bit values. if (type.basetype != SPIRType::Float && type.basetype != SPIRType::Int && type.basetype != SPIRType::UInt) return; bool operation_is_highp = !has_decoration(dst_id, DecorationRelaxedPrecision); auto input_precision = analyze_expression_precision(args, length); if (input_precision == Options::DontCare) { consume_temporary_in_precision_context(type_id, dst_id, input_precision); return; } // In SPIR-V and GLSL, the semantics are flipped for how relaxed precision is determined. // In SPIR-V, the operation itself marks RelaxedPrecision, meaning that inputs can be truncated to 16-bit. // However, if the expression is not, inputs must be expanded to 32-bit first, // since the operation must run at high precision. // This is the awkward part, because if we have mediump inputs, or expressions which derived from mediump, // we might have to forcefully bind the source IDs to highp temporaries. This is done by clearing decorations // and forcing temporaries. Similarly for mediump operations. We bind highp expressions to mediump variables. if ((operation_is_highp && input_precision == Options::Mediump) || (!operation_is_highp && input_precision == Options::Highp)) { auto precision = operation_is_highp ? Options::Highp : Options::Mediump; for (uint32_t i = 0; i < length; i++) { // Rewrites the opcode so that we consume an ID in correct precision context. // This is pretty hacky, but it's the most straight forward way of implementing this without adding // lots of extra passes to rewrite all code blocks. args[i] = consume_temporary_in_precision_context(expression_type_id(args[i]), args[i], precision); } } } // This is probably not exhaustive ... static bool opcode_is_precision_sensitive_operation(Op op) { switch (op) { case OpFAdd: case OpFSub: case OpFMul: case OpFNegate: case OpIAdd: case OpISub: case OpIMul: case OpSNegate: case OpFMod: case OpFDiv: case OpFRem: case OpSMod: case OpSDiv: case OpSRem: case OpUMod: case OpUDiv: case OpVectorTimesMatrix: case OpMatrixTimesVector: case OpMatrixTimesMatrix: case OpDPdx: case OpDPdy: case OpDPdxCoarse: case OpDPdyCoarse: case OpDPdxFine: case OpDPdyFine: case OpFwidth: case OpFwidthCoarse: case OpFwidthFine: case OpVectorTimesScalar: case OpMatrixTimesScalar: case OpOuterProduct: case OpFConvert: case OpSConvert: case OpUConvert: case OpConvertSToF: case OpConvertUToF: case OpConvertFToU: case OpConvertFToS: return true; default: return false; } } // Instructions which just load data but don't do any arithmetic operation should just inherit the decoration. // SPIR-V doesn't require this, but it's somewhat implied it has to work this way, relaxed precision is only // relevant when operating on the IDs, not when shuffling things around. static bool opcode_is_precision_forwarding_instruction(Op op, uint32_t &arg_count) { switch (op) { case OpLoad: case OpAccessChain: case OpInBoundsAccessChain: case OpCompositeExtract: case OpVectorExtractDynamic: case OpSampledImage: case OpImage: case OpCopyObject: case OpImageRead: case OpImageFetch: case OpImageSampleImplicitLod: case OpImageSampleProjImplicitLod: case OpImageSampleDrefImplicitLod: case OpImageSampleProjDrefImplicitLod: case OpImageSampleExplicitLod: case OpImageSampleProjExplicitLod: case OpImageSampleDrefExplicitLod: case OpImageSampleProjDrefExplicitLod: case OpImageGather: case OpImageDrefGather: case OpImageSparseRead: case OpImageSparseFetch: case OpImageSparseSampleImplicitLod: case OpImageSparseSampleProjImplicitLod: case OpImageSparseSampleDrefImplicitLod: case OpImageSparseSampleProjDrefImplicitLod: case OpImageSparseSampleExplicitLod: case OpImageSparseSampleProjExplicitLod: case OpImageSparseSampleDrefExplicitLod: case OpImageSparseSampleProjDrefExplicitLod: case OpImageSparseGather: case OpImageSparseDrefGather: arg_count = 1; return true; case OpVectorShuffle: arg_count = 2; return true; case OpCompositeConstruct: return true; default: break; } return false; } CompilerGLSL::TemporaryCopy CompilerGLSL::handle_instruction_precision(const Instruction &instruction) { auto ops = stream_mutable(instruction); auto opcode = static_cast(instruction.op); uint32_t length = instruction.length; if (backend.requires_relaxed_precision_analysis) { if (length > 2) { uint32_t forwarding_length = length - 2; if (opcode_is_precision_sensitive_operation(opcode)) analyze_precision_requirements(ops[0], ops[1], &ops[2], forwarding_length); else if (opcode == OpExtInst && length >= 5 && get(ops[2]).ext == SPIRExtension::GLSL) analyze_precision_requirements(ops[0], ops[1], &ops[4], forwarding_length - 2); else if (opcode_is_precision_forwarding_instruction(opcode, forwarding_length)) forward_relaxed_precision(ops[1], &ops[2], forwarding_length); } uint32_t result_type = 0, result_id = 0; if (instruction_to_result_type(result_type, result_id, opcode, ops, length)) { auto itr = temporary_to_mirror_precision_alias.find(ops[1]); if (itr != temporary_to_mirror_precision_alias.end()) return { itr->second, itr->first }; } } return {}; } void CompilerGLSL::emit_instruction(const Instruction &instruction) { auto ops = stream(instruction); auto opcode = static_cast(instruction.op); uint32_t length = instruction.length; #define GLSL_BOP(op) emit_binary_op(ops[0], ops[1], ops[2], ops[3], #op) #define GLSL_BOP_CAST(op, type) \ emit_binary_op_cast(ops[0], ops[1], ops[2], ops[3], #op, type, \ opcode_is_sign_invariant(opcode), implicit_integer_promotion) #define GLSL_UOP(op) emit_unary_op(ops[0], ops[1], ops[2], #op) #define GLSL_UOP_CAST(op) emit_unary_op_cast(ops[0], ops[1], ops[2], #op) #define GLSL_QFOP(op) emit_quaternary_func_op(ops[0], ops[1], ops[2], ops[3], ops[4], ops[5], #op) #define GLSL_TFOP(op) emit_trinary_func_op(ops[0], ops[1], ops[2], ops[3], ops[4], #op) #define GLSL_BFOP(op) emit_binary_func_op(ops[0], ops[1], ops[2], ops[3], #op) #define GLSL_BFOP_CAST(op, type) \ emit_binary_func_op_cast(ops[0], ops[1], ops[2], ops[3], #op, type, opcode_is_sign_invariant(opcode)) #define GLSL_BFOP(op) emit_binary_func_op(ops[0], ops[1], ops[2], ops[3], #op) #define GLSL_UFOP(op) emit_unary_func_op(ops[0], ops[1], ops[2], #op) // If we need to do implicit bitcasts, make sure we do it with the correct type. uint32_t integer_width = get_integer_width_for_instruction(instruction); auto int_type = to_signed_basetype(integer_width); auto uint_type = to_unsigned_basetype(integer_width); // Handle C implicit integer promotion rules. // If we get implicit promotion to int, need to make sure we cast by value to intended return type, // otherwise, future sign-dependent operations and bitcasts will break. bool implicit_integer_promotion = integer_width < 32 && backend.implicit_c_integer_promotion_rules && opcode_can_promote_integer_implicitly(opcode) && get(ops[0]).vecsize == 1; opcode = get_remapped_spirv_op(opcode); switch (opcode) { // Dealing with memory case OpLoad: { uint32_t result_type = ops[0]; uint32_t id = ops[1]; uint32_t ptr = ops[2]; flush_variable_declaration(ptr); // If we're loading from memory that cannot be changed by the shader, // just forward the expression directly to avoid needless temporaries. // If an expression is mutable and forwardable, we speculate that it is immutable. bool forward = should_forward(ptr) && forced_temporaries.find(id) == end(forced_temporaries); // If loading a non-native row-major matrix, mark the expression as need_transpose. bool need_transpose = false; bool old_need_transpose = false; auto *ptr_expression = maybe_get(ptr); if (forward) { // If we're forwarding the load, we're also going to forward transpose state, so don't transpose while // taking the expression. if (ptr_expression && ptr_expression->need_transpose) { old_need_transpose = true; ptr_expression->need_transpose = false; need_transpose = true; } else if (is_non_native_row_major_matrix(ptr)) need_transpose = true; } // If we are forwarding this load, // don't register the read to access chain here, defer that to when we actually use the expression, // using the add_implied_read_expression mechanism. string expr; bool is_packed = has_extended_decoration(ptr, SPIRVCrossDecorationPhysicalTypePacked); bool is_remapped = has_extended_decoration(ptr, SPIRVCrossDecorationPhysicalTypeID); if (forward || (!is_packed && !is_remapped)) { // For the simple case, we do not need to deal with repacking. expr = to_dereferenced_expression(ptr, false); } else { // If we are not forwarding the expression, we need to unpack and resolve any physical type remapping here before // storing the expression to a temporary. expr = to_unpacked_expression(ptr); } auto &type = get(result_type); auto &expr_type = expression_type(ptr); // If the expression has more vector components than the result type, insert // a swizzle. This shouldn't happen normally on valid SPIR-V, but it might // happen with e.g. the MSL backend replacing the type of an input variable. if (expr_type.vecsize > type.vecsize) expr = enclose_expression(expr + vector_swizzle(type.vecsize, 0)); if (forward && ptr_expression) ptr_expression->need_transpose = old_need_transpose; // We might need to cast in order to load from a builtin. cast_from_variable_load(ptr, expr, type); if (forward && ptr_expression) ptr_expression->need_transpose = false; // We might be trying to load a gl_Position[N], where we should be // doing float4[](gl_in[i].gl_Position, ...) instead. // Similar workarounds are required for input arrays in tessellation. // Also, loading from gl_SampleMask array needs special unroll. unroll_array_from_complex_load(id, ptr, expr); if (!type_is_opaque_value(type) && has_decoration(ptr, DecorationNonUniform)) { // If we're loading something non-opaque, we need to handle non-uniform descriptor access. convert_non_uniform_expression(expr, ptr); } if (forward && ptr_expression) ptr_expression->need_transpose = old_need_transpose; bool flattened = ptr_expression && flattened_buffer_blocks.count(ptr_expression->loaded_from) != 0; if (backend.needs_row_major_load_workaround && !is_non_native_row_major_matrix(ptr) && !flattened) rewrite_load_for_wrapped_row_major(expr, result_type, ptr); // By default, suppress usage tracking since using same expression multiple times does not imply any extra work. // However, if we try to load a complex, composite object from a flattened buffer, // we should avoid emitting the same code over and over and lower the result to a temporary. bool usage_tracking = flattened && (type.basetype == SPIRType::Struct || (type.columns > 1)); SPIRExpression *e = nullptr; if (!forward && expression_is_non_value_type_array(ptr)) { // Complicated load case where we need to make a copy of ptr, but we cannot, because // it is an array, and our backend does not support arrays as value types. // Emit the temporary, and copy it explicitly. e = &emit_uninitialized_temporary_expression(result_type, id); emit_array_copy(nullptr, id, ptr, StorageClassFunction, get_expression_effective_storage_class(ptr)); } else e = &emit_op(result_type, id, expr, forward, !usage_tracking); e->need_transpose = need_transpose; register_read(id, ptr, forward); if (forward) { // Pass through whether the result is of a packed type and the physical type ID. if (has_extended_decoration(ptr, SPIRVCrossDecorationPhysicalTypePacked)) set_extended_decoration(id, SPIRVCrossDecorationPhysicalTypePacked); if (has_extended_decoration(ptr, SPIRVCrossDecorationPhysicalTypeID)) { set_extended_decoration(id, SPIRVCrossDecorationPhysicalTypeID, get_extended_decoration(ptr, SPIRVCrossDecorationPhysicalTypeID)); } } else { // This might have been set on an earlier compilation iteration, force it to be unset. unset_extended_decoration(id, SPIRVCrossDecorationPhysicalTypePacked); unset_extended_decoration(id, SPIRVCrossDecorationPhysicalTypeID); } inherit_expression_dependencies(id, ptr); if (forward) add_implied_read_expression(*e, ptr); break; } case OpInBoundsAccessChain: case OpAccessChain: case OpPtrAccessChain: { auto *var = maybe_get(ops[2]); if (var) flush_variable_declaration(var->self); // If the base is immutable, the access chain pointer must also be. // If an expression is mutable and forwardable, we speculate that it is immutable. AccessChainMeta meta; bool ptr_chain = opcode == OpPtrAccessChain; auto &target_type = get(ops[0]); auto e = access_chain(ops[2], &ops[3], length - 3, target_type, &meta, ptr_chain); // If the base is flattened UBO of struct type, the expression has to be a composite. // In that case, backends which do not support inline syntax need it to be bound to a temporary. // Otherwise, invalid expressions like ({UBO[0].xyz, UBO[0].w, UBO[1]}).member are emitted. bool requires_temporary = false; if (flattened_buffer_blocks.count(ops[2]) && target_type.basetype == SPIRType::Struct) requires_temporary = !backend.can_declare_struct_inline; auto &expr = requires_temporary ? emit_op(ops[0], ops[1], std::move(e), false) : set(ops[1], std::move(e), ops[0], should_forward(ops[2])); auto *backing_variable = maybe_get_backing_variable(ops[2]); expr.loaded_from = backing_variable ? backing_variable->self : ID(ops[2]); expr.need_transpose = meta.need_transpose; expr.access_chain = true; expr.access_meshlet_position_y = meta.access_meshlet_position_y; // Mark the result as being packed. Some platforms handled packed vectors differently than non-packed. if (meta.storage_is_packed) set_extended_decoration(ops[1], SPIRVCrossDecorationPhysicalTypePacked); if (meta.storage_physical_type != 0) set_extended_decoration(ops[1], SPIRVCrossDecorationPhysicalTypeID, meta.storage_physical_type); if (meta.storage_is_invariant) set_decoration(ops[1], DecorationInvariant); if (meta.flattened_struct) flattened_structs[ops[1]] = true; if (meta.relaxed_precision && backend.requires_relaxed_precision_analysis) set_decoration(ops[1], DecorationRelaxedPrecision); // If we have some expression dependencies in our access chain, this access chain is technically a forwarded // temporary which could be subject to invalidation. // Need to assume we're forwarded while calling inherit_expression_depdendencies. forwarded_temporaries.insert(ops[1]); // The access chain itself is never forced to a temporary, but its dependencies might. suppressed_usage_tracking.insert(ops[1]); for (uint32_t i = 2; i < length; i++) { inherit_expression_dependencies(ops[1], ops[i]); add_implied_read_expression(expr, ops[i]); } // If we have no dependencies after all, i.e., all indices in the access chain are immutable temporaries, // we're not forwarded after all. if (expr.expression_dependencies.empty()) forwarded_temporaries.erase(ops[1]); break; } case OpStore: { auto *var = maybe_get(ops[0]); if (var && var->statically_assigned) var->static_expression = ops[1]; else if (var && var->loop_variable && !var->loop_variable_enable) var->static_expression = ops[1]; else if (var && var->remapped_variable && var->static_expression) { // Skip the write. } else if (flattened_structs.count(ops[0])) { store_flattened_struct(ops[0], ops[1]); register_write(ops[0]); } else { emit_store_statement(ops[0], ops[1]); } // Storing a pointer results in a variable pointer, so we must conservatively assume // we can write through it. if (expression_type(ops[1]).pointer) register_write(ops[1]); break; } case OpArrayLength: { uint32_t result_type = ops[0]; uint32_t id = ops[1]; auto e = access_chain_internal(ops[2], &ops[3], length - 3, ACCESS_CHAIN_INDEX_IS_LITERAL_BIT, nullptr); if (has_decoration(ops[2], DecorationNonUniform)) convert_non_uniform_expression(e, ops[2]); set(id, join(type_to_glsl(get(result_type)), "(", e, ".length())"), result_type, true); break; } // Function calls case OpFunctionCall: { uint32_t result_type = ops[0]; uint32_t id = ops[1]; uint32_t func = ops[2]; const auto *arg = &ops[3]; length -= 3; auto &callee = get(func); auto &return_type = get(callee.return_type); bool pure = function_is_pure(callee); bool callee_has_out_variables = false; bool emit_return_value_as_argument = false; // Invalidate out variables passed to functions since they can be OpStore'd to. for (uint32_t i = 0; i < length; i++) { if (callee.arguments[i].write_count) { register_call_out_argument(arg[i]); callee_has_out_variables = true; } flush_variable_declaration(arg[i]); } if (!return_type.array.empty() && !backend.can_return_array) { callee_has_out_variables = true; emit_return_value_as_argument = true; } if (!pure) register_impure_function_call(); string funexpr; SmallVector arglist; funexpr += to_name(func) + "("; if (emit_return_value_as_argument) { statement(type_to_glsl(return_type), " ", to_name(id), type_to_array_glsl(return_type), ";"); arglist.push_back(to_name(id)); } for (uint32_t i = 0; i < length; i++) { // Do not pass in separate images or samplers if we're remapping // to combined image samplers. if (skip_argument(arg[i])) continue; arglist.push_back(to_func_call_arg(callee.arguments[i], arg[i])); } for (auto &combined : callee.combined_parameters) { auto image_id = combined.global_image ? combined.image_id : VariableID(arg[combined.image_id]); auto sampler_id = combined.global_sampler ? combined.sampler_id : VariableID(arg[combined.sampler_id]); arglist.push_back(to_combined_image_sampler(image_id, sampler_id)); } append_global_func_args(callee, length, arglist); funexpr += merge(arglist); funexpr += ")"; // Check for function call constraints. check_function_call_constraints(arg, length); if (return_type.basetype != SPIRType::Void) { // If the function actually writes to an out variable, // take the conservative route and do not forward. // The problem is that we might not read the function // result (and emit the function) before an out variable // is read (common case when return value is ignored! // In order to avoid start tracking invalid variables, // just avoid the forwarding problem altogether. bool forward = args_will_forward(id, arg, length, pure) && !callee_has_out_variables && pure && (forced_temporaries.find(id) == end(forced_temporaries)); if (emit_return_value_as_argument) { statement(funexpr, ";"); set(id, to_name(id), result_type, true); } else emit_op(result_type, id, funexpr, forward); // Function calls are implicit loads from all variables in question. // Set dependencies for them. for (uint32_t i = 0; i < length; i++) register_read(id, arg[i], forward); // If we're going to forward the temporary result, // put dependencies on every variable that must not change. if (forward) register_global_read_dependencies(callee, id); } else statement(funexpr, ";"); break; } // Composite munging case OpCompositeConstruct: { uint32_t result_type = ops[0]; uint32_t id = ops[1]; const auto *const elems = &ops[2]; length -= 2; bool forward = true; for (uint32_t i = 0; i < length; i++) forward = forward && should_forward(elems[i]); auto &out_type = get(result_type); auto *in_type = length > 0 ? &expression_type(elems[0]) : nullptr; // Only splat if we have vector constructors. // Arrays and structs must be initialized properly in full. bool composite = !out_type.array.empty() || out_type.basetype == SPIRType::Struct; bool splat = false; bool swizzle_splat = false; if (in_type) { splat = in_type->vecsize == 1 && in_type->columns == 1 && !composite && backend.use_constructor_splatting; swizzle_splat = in_type->vecsize == 1 && in_type->columns == 1 && backend.can_swizzle_scalar; if (ir.ids[elems[0]].get_type() == TypeConstant && !type_is_floating_point(*in_type)) { // Cannot swizzle literal integers as a special case. swizzle_splat = false; } } if (splat || swizzle_splat) { uint32_t input = elems[0]; for (uint32_t i = 0; i < length; i++) { if (input != elems[i]) { splat = false; swizzle_splat = false; } } } if (out_type.basetype == SPIRType::Struct && !backend.can_declare_struct_inline) forward = false; if (!out_type.array.empty() && !backend.can_declare_arrays_inline) forward = false; if (type_is_empty(out_type) && !backend.supports_empty_struct) forward = false; string constructor_op; if (backend.use_initializer_list && composite) { bool needs_trailing_tracket = false; // Only use this path if we are building composites. // This path cannot be used for arithmetic. if (backend.use_typed_initializer_list && out_type.basetype == SPIRType::Struct && out_type.array.empty()) constructor_op += type_to_glsl_constructor(get(result_type)); else if (backend.use_typed_initializer_list && backend.array_is_value_type && !out_type.array.empty()) { // MSL path. Array constructor is baked into type here, do not use _constructor variant. constructor_op += type_to_glsl_constructor(get(result_type)) + "("; needs_trailing_tracket = true; } constructor_op += "{ "; if (type_is_empty(out_type) && !backend.supports_empty_struct) constructor_op += "0"; else if (splat) constructor_op += to_unpacked_expression(elems[0]); else constructor_op += build_composite_combiner(result_type, elems, length); constructor_op += " }"; if (needs_trailing_tracket) constructor_op += ")"; } else if (swizzle_splat && !composite) { constructor_op = remap_swizzle(get(result_type), 1, to_unpacked_expression(elems[0])); } else { constructor_op = type_to_glsl_constructor(get(result_type)) + "("; if (type_is_empty(out_type) && !backend.supports_empty_struct) constructor_op += "0"; else if (splat) constructor_op += to_unpacked_expression(elems[0]); else constructor_op += build_composite_combiner(result_type, elems, length); constructor_op += ")"; } if (!constructor_op.empty()) { emit_op(result_type, id, constructor_op, forward); for (uint32_t i = 0; i < length; i++) inherit_expression_dependencies(id, elems[i]); } break; } case OpVectorInsertDynamic: { uint32_t result_type = ops[0]; uint32_t id = ops[1]; uint32_t vec = ops[2]; uint32_t comp = ops[3]; uint32_t index = ops[4]; flush_variable_declaration(vec); // Make a copy, then use access chain to store the variable. statement(declare_temporary(result_type, id), to_expression(vec), ";"); set(id, to_name(id), result_type, true); auto chain = access_chain_internal(id, &index, 1, 0, nullptr); statement(chain, " = ", to_unpacked_expression(comp), ";"); break; } case OpVectorExtractDynamic: { uint32_t result_type = ops[0]; uint32_t id = ops[1]; auto expr = access_chain_internal(ops[2], &ops[3], 1, 0, nullptr); emit_op(result_type, id, expr, should_forward(ops[2])); inherit_expression_dependencies(id, ops[2]); inherit_expression_dependencies(id, ops[3]); break; } case OpCompositeExtract: { uint32_t result_type = ops[0]; uint32_t id = ops[1]; length -= 3; auto &type = get(result_type); // We can only split the expression here if our expression is forwarded as a temporary. bool allow_base_expression = forced_temporaries.find(id) == end(forced_temporaries); // Do not allow base expression for struct members. We risk doing "swizzle" optimizations in this case. auto &composite_type = expression_type(ops[2]); bool composite_type_is_complex = composite_type.basetype == SPIRType::Struct || !composite_type.array.empty(); if (composite_type_is_complex) allow_base_expression = false; // Packed expressions or physical ID mapped expressions cannot be split up. if (has_extended_decoration(ops[2], SPIRVCrossDecorationPhysicalTypePacked) || has_extended_decoration(ops[2], SPIRVCrossDecorationPhysicalTypeID)) allow_base_expression = false; // Cannot use base expression for row-major matrix row-extraction since we need to interleave access pattern // into the base expression. if (is_non_native_row_major_matrix(ops[2])) allow_base_expression = false; AccessChainMeta meta; SPIRExpression *e = nullptr; auto *c = maybe_get(ops[2]); if (c && !c->specialization && !composite_type_is_complex) { auto expr = to_extract_constant_composite_expression(result_type, *c, ops + 3, length); e = &emit_op(result_type, id, expr, true, true); } else if (allow_base_expression && should_forward(ops[2]) && type.vecsize == 1 && type.columns == 1 && length == 1) { // Only apply this optimization if result is scalar. // We want to split the access chain from the base. // This is so we can later combine different CompositeExtract results // with CompositeConstruct without emitting code like // // vec3 temp = texture(...).xyz // vec4(temp.x, temp.y, temp.z, 1.0). // // when we actually wanted to emit this // vec4(texture(...).xyz, 1.0). // // Including the base will prevent this and would trigger multiple reads // from expression causing it to be forced to an actual temporary in GLSL. auto expr = access_chain_internal(ops[2], &ops[3], length, ACCESS_CHAIN_INDEX_IS_LITERAL_BIT | ACCESS_CHAIN_CHAIN_ONLY_BIT | ACCESS_CHAIN_FORCE_COMPOSITE_BIT, &meta); e = &emit_op(result_type, id, expr, true, should_suppress_usage_tracking(ops[2])); inherit_expression_dependencies(id, ops[2]); e->base_expression = ops[2]; if (meta.relaxed_precision && backend.requires_relaxed_precision_analysis) set_decoration(ops[1], DecorationRelaxedPrecision); } else { auto expr = access_chain_internal(ops[2], &ops[3], length, ACCESS_CHAIN_INDEX_IS_LITERAL_BIT | ACCESS_CHAIN_FORCE_COMPOSITE_BIT, &meta); e = &emit_op(result_type, id, expr, should_forward(ops[2]), should_suppress_usage_tracking(ops[2])); inherit_expression_dependencies(id, ops[2]); } // Pass through some meta information to the loaded expression. // We can still end up loading a buffer type to a variable, then CompositeExtract from it // instead of loading everything through an access chain. e->need_transpose = meta.need_transpose; if (meta.storage_is_packed) set_extended_decoration(id, SPIRVCrossDecorationPhysicalTypePacked); if (meta.storage_physical_type != 0) set_extended_decoration(id, SPIRVCrossDecorationPhysicalTypeID, meta.storage_physical_type); if (meta.storage_is_invariant) set_decoration(id, DecorationInvariant); break; } case OpCompositeInsert: { uint32_t result_type = ops[0]; uint32_t id = ops[1]; uint32_t obj = ops[2]; uint32_t composite = ops[3]; const auto *elems = &ops[4]; length -= 4; flush_variable_declaration(composite); // CompositeInsert requires a copy + modification, but this is very awkward code in HLL. // Speculate that the input composite is no longer used, and we can modify it in-place. // There are various scenarios where this is not possible to satisfy. bool can_modify_in_place = true; forced_temporaries.insert(id); // Cannot safely RMW PHI variables since they have no way to be invalidated, // forcing temporaries is not going to help. // This is similar for Constant and Undef inputs. // The only safe thing to RMW is SPIRExpression. // If the expression has already been used (i.e. used in a continue block), we have to keep using // that loop variable, since we won't be able to override the expression after the fact. // If the composite is hoisted, we might never be able to properly invalidate any usage // of that composite in a subsequent loop iteration. if (invalid_expressions.count(composite) || block_composite_insert_overwrite.count(composite) || hoisted_temporaries.count(id) || hoisted_temporaries.count(composite) || maybe_get(composite) == nullptr) { can_modify_in_place = false; } else if (backend.requires_relaxed_precision_analysis && has_decoration(composite, DecorationRelaxedPrecision) != has_decoration(id, DecorationRelaxedPrecision) && get(result_type).basetype != SPIRType::Struct) { // Similarly, if precision does not match for input and output, // we cannot alias them. If we write a composite into a relaxed precision // ID, we might get a false truncation. can_modify_in_place = false; } if (can_modify_in_place) { // Have to make sure the modified SSA value is bound to a temporary so we can modify it in-place. if (!forced_temporaries.count(composite)) force_temporary_and_recompile(composite); auto chain = access_chain_internal(composite, elems, length, ACCESS_CHAIN_INDEX_IS_LITERAL_BIT, nullptr); statement(chain, " = ", to_unpacked_expression(obj), ";"); set(id, to_expression(composite), result_type, true); invalid_expressions.insert(composite); composite_insert_overwritten.insert(composite); } else { if (maybe_get(composite) != nullptr) { emit_uninitialized_temporary_expression(result_type, id); } else { // Make a copy, then use access chain to store the variable. statement(declare_temporary(result_type, id), to_expression(composite), ";"); set(id, to_name(id), result_type, true); } auto chain = access_chain_internal(id, elems, length, ACCESS_CHAIN_INDEX_IS_LITERAL_BIT, nullptr); statement(chain, " = ", to_unpacked_expression(obj), ";"); } break; } case OpCopyMemory: { uint32_t lhs = ops[0]; uint32_t rhs = ops[1]; if (lhs != rhs) { uint32_t &tmp_id = extra_sub_expressions[instruction.offset | EXTRA_SUB_EXPRESSION_TYPE_STREAM_OFFSET]; if (!tmp_id) tmp_id = ir.increase_bound_by(1); uint32_t tmp_type_id = expression_type(rhs).parent_type; EmbeddedInstruction fake_load, fake_store; fake_load.op = OpLoad; fake_load.length = 3; fake_load.ops.push_back(tmp_type_id); fake_load.ops.push_back(tmp_id); fake_load.ops.push_back(rhs); fake_store.op = OpStore; fake_store.length = 2; fake_store.ops.push_back(lhs); fake_store.ops.push_back(tmp_id); // Load and Store do a *lot* of workarounds, and we'd like to reuse them as much as possible. // Synthesize a fake Load and Store pair for CopyMemory. emit_instruction(fake_load); emit_instruction(fake_store); } break; } case OpCopyLogical: { // This is used for copying object of different types, arrays and structs. // We need to unroll the copy, element-by-element. uint32_t result_type = ops[0]; uint32_t id = ops[1]; uint32_t rhs = ops[2]; emit_uninitialized_temporary_expression(result_type, id); emit_copy_logical_type(id, result_type, rhs, expression_type_id(rhs), {}); break; } case OpCopyObject: { uint32_t result_type = ops[0]; uint32_t id = ops[1]; uint32_t rhs = ops[2]; bool pointer = get(result_type).pointer; auto *chain = maybe_get(rhs); auto *imgsamp = maybe_get(rhs); if (chain) { // Cannot lower to a SPIRExpression, just copy the object. auto &e = set(id, *chain); e.self = id; } else if (imgsamp) { // Cannot lower to a SPIRExpression, just copy the object. // GLSL does not currently use this type and will never get here, but MSL does. // Handled here instead of CompilerMSL for better integration and general handling, // and in case GLSL or other subclasses require it in the future. auto &e = set(id, *imgsamp); e.self = id; } else if (expression_is_lvalue(rhs) && !pointer) { // Need a copy. // For pointer types, we copy the pointer itself. emit_op(result_type, id, to_unpacked_expression(rhs), false); } else { // RHS expression is immutable, so just forward it. // Copying these things really make no sense, but // seems to be allowed anyways. auto &e = emit_op(result_type, id, to_expression(rhs), true, true); if (pointer) { auto *var = maybe_get_backing_variable(rhs); e.loaded_from = var ? var->self : ID(0); } // If we're copying an access chain, need to inherit the read expressions. auto *rhs_expr = maybe_get(rhs); if (rhs_expr) { e.implied_read_expressions = rhs_expr->implied_read_expressions; e.expression_dependencies = rhs_expr->expression_dependencies; } } break; } case OpVectorShuffle: { uint32_t result_type = ops[0]; uint32_t id = ops[1]; uint32_t vec0 = ops[2]; uint32_t vec1 = ops[3]; const auto *elems = &ops[4]; length -= 4; auto &type0 = expression_type(vec0); // If we have the undefined swizzle index -1, we need to swizzle in undefined data, // or in our case, T(0). bool shuffle = false; for (uint32_t i = 0; i < length; i++) if (elems[i] >= type0.vecsize || elems[i] == 0xffffffffu) shuffle = true; // Cannot use swizzles with packed expressions, force shuffle path. if (!shuffle && has_extended_decoration(vec0, SPIRVCrossDecorationPhysicalTypePacked)) shuffle = true; string expr; bool should_fwd, trivial_forward; if (shuffle) { should_fwd = should_forward(vec0) && should_forward(vec1); trivial_forward = should_suppress_usage_tracking(vec0) && should_suppress_usage_tracking(vec1); // Constructor style and shuffling from two different vectors. SmallVector args; for (uint32_t i = 0; i < length; i++) { if (elems[i] == 0xffffffffu) { // Use a constant 0 here. // We could use the first component or similar, but then we risk propagating // a value we might not need, and bog down codegen. SPIRConstant c; c.constant_type = type0.parent_type; assert(type0.parent_type != ID(0)); args.push_back(constant_expression(c)); } else if (elems[i] >= type0.vecsize) args.push_back(to_extract_component_expression(vec1, elems[i] - type0.vecsize)); else args.push_back(to_extract_component_expression(vec0, elems[i])); } expr += join(type_to_glsl_constructor(get(result_type)), "(", merge(args), ")"); } else { should_fwd = should_forward(vec0); trivial_forward = should_suppress_usage_tracking(vec0); // We only source from first vector, so can use swizzle. // If the vector is packed, unpack it before applying a swizzle (needed for MSL) expr += to_enclosed_unpacked_expression(vec0); expr += "."; for (uint32_t i = 0; i < length; i++) { assert(elems[i] != 0xffffffffu); expr += index_to_swizzle(elems[i]); } if (backend.swizzle_is_function && length > 1) expr += "()"; } // A shuffle is trivial in that it doesn't actually *do* anything. // We inherit the forwardedness from our arguments to avoid flushing out to temporaries when it's not really needed. emit_op(result_type, id, expr, should_fwd, trivial_forward); inherit_expression_dependencies(id, vec0); if (vec0 != vec1) inherit_expression_dependencies(id, vec1); break; } // ALU case OpIsNan: if (!is_legacy()) GLSL_UFOP(isnan); else { // Check if the number doesn't equal itself auto &type = get(ops[0]); if (type.vecsize > 1) emit_binary_func_op(ops[0], ops[1], ops[2], ops[2], "notEqual"); else emit_binary_op(ops[0], ops[1], ops[2], ops[2], "!="); } break; case OpIsInf: if (!is_legacy()) GLSL_UFOP(isinf); else { // inf * 2 == inf by IEEE 754 rules, note this also applies to 0.0 // This is more reliable than checking if product with zero is NaN uint32_t result_type = ops[0]; uint32_t result_id = ops[1]; uint32_t operand = ops[2]; auto &type = get(result_type); std::string expr; if (type.vecsize > 1) { expr = type_to_glsl_constructor(type); expr += '('; for (uint32_t i = 0; i < type.vecsize; i++) { auto comp = to_extract_component_expression(operand, i); expr += join(comp, " != 0.0 && 2.0 * ", comp, " == ", comp); if (i + 1 < type.vecsize) expr += ", "; } expr += ')'; } else { // Register an extra read to force writing out a temporary auto oper = to_enclosed_expression(operand); track_expression_read(operand); expr += join(oper, " != 0.0 && 2.0 * ", oper, " == ", oper); } emit_op(result_type, result_id, expr, should_forward(operand)); inherit_expression_dependencies(result_id, operand); } break; case OpSNegate: if (implicit_integer_promotion || expression_type_id(ops[2]) != ops[0]) GLSL_UOP_CAST(-); else GLSL_UOP(-); break; case OpFNegate: GLSL_UOP(-); break; case OpIAdd: { // For simple arith ops, prefer the output type if there's a mismatch to avoid extra bitcasts. auto type = get(ops[0]).basetype; GLSL_BOP_CAST(+, type); break; } case OpFAdd: GLSL_BOP(+); break; case OpISub: { auto type = get(ops[0]).basetype; GLSL_BOP_CAST(-, type); break; } case OpFSub: GLSL_BOP(-); break; case OpIMul: { auto type = get(ops[0]).basetype; GLSL_BOP_CAST(*, type); break; } case OpVectorTimesMatrix: case OpMatrixTimesVector: { // If the matrix needs transpose, just flip the multiply order. auto *e = maybe_get(ops[opcode == OpMatrixTimesVector ? 2 : 3]); if (e && e->need_transpose) { e->need_transpose = false; string expr; if (opcode == OpMatrixTimesVector) expr = join(to_enclosed_unpacked_expression(ops[3]), " * ", enclose_expression(to_unpacked_row_major_matrix_expression(ops[2]))); else expr = join(enclose_expression(to_unpacked_row_major_matrix_expression(ops[3])), " * ", to_enclosed_unpacked_expression(ops[2])); bool forward = should_forward(ops[2]) && should_forward(ops[3]); emit_op(ops[0], ops[1], expr, forward); e->need_transpose = true; inherit_expression_dependencies(ops[1], ops[2]); inherit_expression_dependencies(ops[1], ops[3]); } else GLSL_BOP(*); break; } case OpMatrixTimesMatrix: { auto *a = maybe_get(ops[2]); auto *b = maybe_get(ops[3]); // If both matrices need transpose, we can multiply in flipped order and tag the expression as transposed. // a^T * b^T = (b * a)^T. if (a && b && a->need_transpose && b->need_transpose) { a->need_transpose = false; b->need_transpose = false; auto expr = join(enclose_expression(to_unpacked_row_major_matrix_expression(ops[3])), " * ", enclose_expression(to_unpacked_row_major_matrix_expression(ops[2]))); bool forward = should_forward(ops[2]) && should_forward(ops[3]); auto &e = emit_op(ops[0], ops[1], expr, forward); e.need_transpose = true; a->need_transpose = true; b->need_transpose = true; inherit_expression_dependencies(ops[1], ops[2]); inherit_expression_dependencies(ops[1], ops[3]); } else GLSL_BOP(*); break; } case OpMatrixTimesScalar: { auto *a = maybe_get(ops[2]); // If the matrix need transpose, just mark the result as needing so. if (a && a->need_transpose) { a->need_transpose = false; auto expr = join(enclose_expression(to_unpacked_row_major_matrix_expression(ops[2])), " * ", to_enclosed_unpacked_expression(ops[3])); bool forward = should_forward(ops[2]) && should_forward(ops[3]); auto &e = emit_op(ops[0], ops[1], expr, forward); e.need_transpose = true; a->need_transpose = true; inherit_expression_dependencies(ops[1], ops[2]); inherit_expression_dependencies(ops[1], ops[3]); } else GLSL_BOP(*); break; } case OpFMul: case OpVectorTimesScalar: GLSL_BOP(*); break; case OpOuterProduct: if (options.version < 120) // Matches GLSL 1.10 / ESSL 1.00 { uint32_t result_type = ops[0]; uint32_t id = ops[1]; uint32_t a = ops[2]; uint32_t b = ops[3]; auto &type = get(result_type); string expr = type_to_glsl_constructor(type); expr += "("; for (uint32_t col = 0; col < type.columns; col++) { expr += to_enclosed_expression(a); expr += " * "; expr += to_extract_component_expression(b, col); if (col + 1 < type.columns) expr += ", "; } expr += ")"; emit_op(result_type, id, expr, should_forward(a) && should_forward(b)); inherit_expression_dependencies(id, a); inherit_expression_dependencies(id, b); } else GLSL_BFOP(outerProduct); break; case OpDot: GLSL_BFOP(dot); break; case OpTranspose: if (options.version < 120) // Matches GLSL 1.10 / ESSL 1.00 { // transpose() is not available, so instead, flip need_transpose, // which can later be turned into an emulated transpose op by // convert_row_major_matrix(), if necessary. uint32_t result_type = ops[0]; uint32_t result_id = ops[1]; uint32_t input = ops[2]; // Force need_transpose to false temporarily to prevent // to_expression() from doing the transpose. bool need_transpose = false; auto *input_e = maybe_get(input); if (input_e) swap(need_transpose, input_e->need_transpose); bool forward = should_forward(input); auto &e = emit_op(result_type, result_id, to_expression(input), forward); e.need_transpose = !need_transpose; // Restore the old need_transpose flag. if (input_e) input_e->need_transpose = need_transpose; } else GLSL_UFOP(transpose); break; case OpSRem: { uint32_t result_type = ops[0]; uint32_t result_id = ops[1]; uint32_t op0 = ops[2]; uint32_t op1 = ops[3]; // Needs special handling. bool forward = should_forward(op0) && should_forward(op1); auto expr = join(to_enclosed_expression(op0), " - ", to_enclosed_expression(op1), " * ", "(", to_enclosed_expression(op0), " / ", to_enclosed_expression(op1), ")"); if (implicit_integer_promotion) expr = join(type_to_glsl(get(result_type)), '(', expr, ')'); emit_op(result_type, result_id, expr, forward); inherit_expression_dependencies(result_id, op0); inherit_expression_dependencies(result_id, op1); break; } case OpSDiv: GLSL_BOP_CAST(/, int_type); break; case OpUDiv: GLSL_BOP_CAST(/, uint_type); break; case OpIAddCarry: case OpISubBorrow: { if (options.es && options.version < 310) SPIRV_CROSS_THROW("Extended arithmetic is only available from ESSL 310."); else if (!options.es && options.version < 400) SPIRV_CROSS_THROW("Extended arithmetic is only available from GLSL 400."); uint32_t result_type = ops[0]; uint32_t result_id = ops[1]; uint32_t op0 = ops[2]; uint32_t op1 = ops[3]; auto &type = get(result_type); emit_uninitialized_temporary_expression(result_type, result_id); const char *op = opcode == OpIAddCarry ? "uaddCarry" : "usubBorrow"; statement(to_expression(result_id), ".", to_member_name(type, 0), " = ", op, "(", to_expression(op0), ", ", to_expression(op1), ", ", to_expression(result_id), ".", to_member_name(type, 1), ");"); break; } case OpUMulExtended: case OpSMulExtended: { if (options.es && options.version < 310) SPIRV_CROSS_THROW("Extended arithmetic is only available from ESSL 310."); else if (!options.es && options.version < 400) SPIRV_CROSS_THROW("Extended arithmetic is only available from GLSL 4000."); uint32_t result_type = ops[0]; uint32_t result_id = ops[1]; uint32_t op0 = ops[2]; uint32_t op1 = ops[3]; auto &type = get(result_type); emit_uninitialized_temporary_expression(result_type, result_id); const char *op = opcode == OpUMulExtended ? "umulExtended" : "imulExtended"; statement(op, "(", to_expression(op0), ", ", to_expression(op1), ", ", to_expression(result_id), ".", to_member_name(type, 1), ", ", to_expression(result_id), ".", to_member_name(type, 0), ");"); break; } case OpFDiv: GLSL_BOP(/); break; case OpShiftRightLogical: GLSL_BOP_CAST(>>, uint_type); break; case OpShiftRightArithmetic: GLSL_BOP_CAST(>>, int_type); break; case OpShiftLeftLogical: { auto type = get(ops[0]).basetype; GLSL_BOP_CAST(<<, type); break; } case OpBitwiseOr: { auto type = get(ops[0]).basetype; GLSL_BOP_CAST(|, type); break; } case OpBitwiseXor: { auto type = get(ops[0]).basetype; GLSL_BOP_CAST(^, type); break; } case OpBitwiseAnd: { auto type = get(ops[0]).basetype; GLSL_BOP_CAST(&, type); break; } case OpNot: if (implicit_integer_promotion || expression_type_id(ops[2]) != ops[0]) GLSL_UOP_CAST(~); else GLSL_UOP(~); break; case OpUMod: GLSL_BOP_CAST(%, uint_type); break; case OpSMod: GLSL_BOP_CAST(%, int_type); break; case OpFMod: GLSL_BFOP(mod); break; case OpFRem: { uint32_t result_type = ops[0]; uint32_t result_id = ops[1]; uint32_t op0 = ops[2]; uint32_t op1 = ops[3]; // Needs special handling. bool forward = should_forward(op0) && should_forward(op1); std::string expr; if (!is_legacy()) { expr = join(to_enclosed_expression(op0), " - ", to_enclosed_expression(op1), " * ", "trunc(", to_enclosed_expression(op0), " / ", to_enclosed_expression(op1), ")"); } else { // Legacy GLSL has no trunc, emulate by casting to int and back auto &op0_type = expression_type(op0); auto via_type = op0_type; via_type.basetype = SPIRType::Int; expr = join(to_enclosed_expression(op0), " - ", to_enclosed_expression(op1), " * ", type_to_glsl(op0_type), "(", type_to_glsl(via_type), "(", to_enclosed_expression(op0), " / ", to_enclosed_expression(op1), "))"); } emit_op(result_type, result_id, expr, forward); inherit_expression_dependencies(result_id, op0); inherit_expression_dependencies(result_id, op1); break; } // Relational case OpAny: GLSL_UFOP(any); break; case OpAll: GLSL_UFOP(all); break; case OpSelect: emit_mix_op(ops[0], ops[1], ops[4], ops[3], ops[2]); break; case OpLogicalOr: { // No vector variant in GLSL for logical OR. auto result_type = ops[0]; auto id = ops[1]; auto &type = get(result_type); if (type.vecsize > 1) emit_unrolled_binary_op(result_type, id, ops[2], ops[3], "||", false, SPIRType::Unknown); else GLSL_BOP(||); break; } case OpLogicalAnd: { // No vector variant in GLSL for logical AND. auto result_type = ops[0]; auto id = ops[1]; auto &type = get(result_type); if (type.vecsize > 1) emit_unrolled_binary_op(result_type, id, ops[2], ops[3], "&&", false, SPIRType::Unknown); else GLSL_BOP(&&); break; } case OpLogicalNot: { auto &type = get(ops[0]); if (type.vecsize > 1) GLSL_UFOP(not ); else GLSL_UOP(!); break; } case OpIEqual: { if (expression_type(ops[2]).vecsize > 1) GLSL_BFOP_CAST(equal, int_type); else GLSL_BOP_CAST(==, int_type); break; } case OpLogicalEqual: case OpFOrdEqual: { if (expression_type(ops[2]).vecsize > 1) GLSL_BFOP(equal); else GLSL_BOP(==); break; } case OpINotEqual: { if (expression_type(ops[2]).vecsize > 1) GLSL_BFOP_CAST(notEqual, int_type); else GLSL_BOP_CAST(!=, int_type); break; } case OpLogicalNotEqual: case OpFOrdNotEqual: case OpFUnordNotEqual: { // GLSL is fuzzy on what to do with ordered vs unordered not equal. // glslang started emitting UnorderedNotEqual some time ago to harmonize with IEEE, // but this means we have no easy way of implementing ordered not equal. if (expression_type(ops[2]).vecsize > 1) GLSL_BFOP(notEqual); else GLSL_BOP(!=); break; } case OpUGreaterThan: case OpSGreaterThan: { auto type = opcode == OpUGreaterThan ? uint_type : int_type; if (expression_type(ops[2]).vecsize > 1) GLSL_BFOP_CAST(greaterThan, type); else GLSL_BOP_CAST(>, type); break; } case OpFOrdGreaterThan: { if (expression_type(ops[2]).vecsize > 1) GLSL_BFOP(greaterThan); else GLSL_BOP(>); break; } case OpUGreaterThanEqual: case OpSGreaterThanEqual: { auto type = opcode == OpUGreaterThanEqual ? uint_type : int_type; if (expression_type(ops[2]).vecsize > 1) GLSL_BFOP_CAST(greaterThanEqual, type); else GLSL_BOP_CAST(>=, type); break; } case OpFOrdGreaterThanEqual: { if (expression_type(ops[2]).vecsize > 1) GLSL_BFOP(greaterThanEqual); else GLSL_BOP(>=); break; } case OpULessThan: case OpSLessThan: { auto type = opcode == OpULessThan ? uint_type : int_type; if (expression_type(ops[2]).vecsize > 1) GLSL_BFOP_CAST(lessThan, type); else GLSL_BOP_CAST(<, type); break; } case OpFOrdLessThan: { if (expression_type(ops[2]).vecsize > 1) GLSL_BFOP(lessThan); else GLSL_BOP(<); break; } case OpULessThanEqual: case OpSLessThanEqual: { auto type = opcode == OpULessThanEqual ? uint_type : int_type; if (expression_type(ops[2]).vecsize > 1) GLSL_BFOP_CAST(lessThanEqual, type); else GLSL_BOP_CAST(<=, type); break; } case OpFOrdLessThanEqual: { if (expression_type(ops[2]).vecsize > 1) GLSL_BFOP(lessThanEqual); else GLSL_BOP(<=); break; } // Conversion case OpSConvert: case OpConvertSToF: case OpUConvert: case OpConvertUToF: { auto input_type = opcode == OpSConvert || opcode == OpConvertSToF ? int_type : uint_type; uint32_t result_type = ops[0]; uint32_t id = ops[1]; auto &type = get(result_type); auto &arg_type = expression_type(ops[2]); auto func = type_to_glsl_constructor(type); if (arg_type.width < type.width || type_is_floating_point(type)) emit_unary_func_op_cast(result_type, id, ops[2], func.c_str(), input_type, type.basetype); else emit_unary_func_op(result_type, id, ops[2], func.c_str()); break; } case OpConvertFToU: case OpConvertFToS: { // Cast to expected arithmetic type, then potentially bitcast away to desired signedness. uint32_t result_type = ops[0]; uint32_t id = ops[1]; auto &type = get(result_type); auto expected_type = type; auto &float_type = expression_type(ops[2]); expected_type.basetype = opcode == OpConvertFToS ? to_signed_basetype(type.width) : to_unsigned_basetype(type.width); auto func = type_to_glsl_constructor(expected_type); emit_unary_func_op_cast(result_type, id, ops[2], func.c_str(), float_type.basetype, expected_type.basetype); break; } case OpFConvert: { uint32_t result_type = ops[0]; uint32_t id = ops[1]; auto func = type_to_glsl_constructor(get(result_type)); emit_unary_func_op(result_type, id, ops[2], func.c_str()); break; } case OpBitcast: { uint32_t result_type = ops[0]; uint32_t id = ops[1]; uint32_t arg = ops[2]; if (!emit_complex_bitcast(result_type, id, arg)) { auto op = bitcast_glsl_op(get(result_type), expression_type(arg)); emit_unary_func_op(result_type, id, arg, op.c_str()); } break; } case OpQuantizeToF16: { uint32_t result_type = ops[0]; uint32_t id = ops[1]; uint32_t arg = ops[2]; string op; auto &type = get(result_type); switch (type.vecsize) { case 1: op = join("unpackHalf2x16(packHalf2x16(vec2(", to_expression(arg), "))).x"); break; case 2: op = join("unpackHalf2x16(packHalf2x16(", to_expression(arg), "))"); break; case 3: { auto op0 = join("unpackHalf2x16(packHalf2x16(", to_expression(arg), ".xy))"); auto op1 = join("unpackHalf2x16(packHalf2x16(", to_expression(arg), ".zz)).x"); op = join("vec3(", op0, ", ", op1, ")"); break; } case 4: { auto op0 = join("unpackHalf2x16(packHalf2x16(", to_expression(arg), ".xy))"); auto op1 = join("unpackHalf2x16(packHalf2x16(", to_expression(arg), ".zw))"); op = join("vec4(", op0, ", ", op1, ")"); break; } default: SPIRV_CROSS_THROW("Illegal argument to OpQuantizeToF16."); } emit_op(result_type, id, op, should_forward(arg)); inherit_expression_dependencies(id, arg); break; } // Derivatives case OpDPdx: GLSL_UFOP(dFdx); if (is_legacy_es()) require_extension_internal("GL_OES_standard_derivatives"); register_control_dependent_expression(ops[1]); break; case OpDPdy: GLSL_UFOP(dFdy); if (is_legacy_es()) require_extension_internal("GL_OES_standard_derivatives"); register_control_dependent_expression(ops[1]); break; case OpDPdxFine: GLSL_UFOP(dFdxFine); if (options.es) { SPIRV_CROSS_THROW("GL_ARB_derivative_control is unavailable in OpenGL ES."); } if (options.version < 450) require_extension_internal("GL_ARB_derivative_control"); register_control_dependent_expression(ops[1]); break; case OpDPdyFine: GLSL_UFOP(dFdyFine); if (options.es) { SPIRV_CROSS_THROW("GL_ARB_derivative_control is unavailable in OpenGL ES."); } if (options.version < 450) require_extension_internal("GL_ARB_derivative_control"); register_control_dependent_expression(ops[1]); break; case OpDPdxCoarse: if (options.es) { SPIRV_CROSS_THROW("GL_ARB_derivative_control is unavailable in OpenGL ES."); } GLSL_UFOP(dFdxCoarse); if (options.version < 450) require_extension_internal("GL_ARB_derivative_control"); register_control_dependent_expression(ops[1]); break; case OpDPdyCoarse: GLSL_UFOP(dFdyCoarse); if (options.es) { SPIRV_CROSS_THROW("GL_ARB_derivative_control is unavailable in OpenGL ES."); } if (options.version < 450) require_extension_internal("GL_ARB_derivative_control"); register_control_dependent_expression(ops[1]); break; case OpFwidth: GLSL_UFOP(fwidth); if (is_legacy_es()) require_extension_internal("GL_OES_standard_derivatives"); register_control_dependent_expression(ops[1]); break; case OpFwidthCoarse: GLSL_UFOP(fwidthCoarse); if (options.es) { SPIRV_CROSS_THROW("GL_ARB_derivative_control is unavailable in OpenGL ES."); } if (options.version < 450) require_extension_internal("GL_ARB_derivative_control"); register_control_dependent_expression(ops[1]); break; case OpFwidthFine: GLSL_UFOP(fwidthFine); if (options.es) { SPIRV_CROSS_THROW("GL_ARB_derivative_control is unavailable in OpenGL ES."); } if (options.version < 450) require_extension_internal("GL_ARB_derivative_control"); register_control_dependent_expression(ops[1]); break; // Bitfield case OpBitFieldInsert: { emit_bitfield_insert_op(ops[0], ops[1], ops[2], ops[3], ops[4], ops[5], "bitfieldInsert", SPIRType::Int); break; } case OpBitFieldSExtract: { emit_trinary_func_op_bitextract(ops[0], ops[1], ops[2], ops[3], ops[4], "bitfieldExtract", int_type, int_type, SPIRType::Int, SPIRType::Int); break; } case OpBitFieldUExtract: { emit_trinary_func_op_bitextract(ops[0], ops[1], ops[2], ops[3], ops[4], "bitfieldExtract", uint_type, uint_type, SPIRType::Int, SPIRType::Int); break; } case OpBitReverse: // BitReverse does not have issues with sign since result type must match input type. GLSL_UFOP(bitfieldReverse); break; case OpBitCount: { auto basetype = expression_type(ops[2]).basetype; emit_unary_func_op_cast(ops[0], ops[1], ops[2], "bitCount", basetype, int_type); break; } // Atomics case OpAtomicExchange: { uint32_t result_type = ops[0]; uint32_t id = ops[1]; uint32_t ptr = ops[2]; // Ignore semantics for now, probably only relevant to CL. uint32_t val = ops[5]; const char *op = check_atomic_image(ptr) ? "imageAtomicExchange" : "atomicExchange"; emit_atomic_func_op(result_type, id, ptr, val, op); break; } case OpAtomicCompareExchange: { uint32_t result_type = ops[0]; uint32_t id = ops[1]; uint32_t ptr = ops[2]; uint32_t val = ops[6]; uint32_t comp = ops[7]; const char *op = check_atomic_image(ptr) ? "imageAtomicCompSwap" : "atomicCompSwap"; emit_atomic_func_op(result_type, id, ptr, comp, val, op); break; } case OpAtomicLoad: { // In plain GLSL, we have no atomic loads, so emulate this by fetch adding by 0 and hope compiler figures it out. // Alternatively, we could rely on KHR_memory_model, but that's not very helpful for GL. auto &type = expression_type(ops[2]); forced_temporaries.insert(ops[1]); bool atomic_image = check_atomic_image(ops[2]); bool unsigned_type = (type.basetype == SPIRType::UInt) || (atomic_image && get(type.image.type).basetype == SPIRType::UInt); const char *op = atomic_image ? "imageAtomicAdd" : "atomicAdd"; const char *increment = unsigned_type ? "0u" : "0"; emit_op(ops[0], ops[1], join(op, "(", to_non_uniform_aware_expression(ops[2]), ", ", increment, ")"), false); flush_all_atomic_capable_variables(); break; } case OpAtomicStore: { // In plain GLSL, we have no atomic stores, so emulate this with an atomic exchange where we don't consume the result. // Alternatively, we could rely on KHR_memory_model, but that's not very helpful for GL. uint32_t ptr = ops[0]; // Ignore semantics for now, probably only relevant to CL. uint32_t val = ops[3]; const char *op = check_atomic_image(ptr) ? "imageAtomicExchange" : "atomicExchange"; statement(op, "(", to_non_uniform_aware_expression(ptr), ", ", to_expression(val), ");"); flush_all_atomic_capable_variables(); break; } case OpAtomicIIncrement: case OpAtomicIDecrement: { forced_temporaries.insert(ops[1]); auto &type = expression_type(ops[2]); if (type.storage == StorageClassAtomicCounter) { // Legacy GLSL stuff, not sure if this is relevant to support. if (opcode == OpAtomicIIncrement) GLSL_UFOP(atomicCounterIncrement); else GLSL_UFOP(atomicCounterDecrement); } else { bool atomic_image = check_atomic_image(ops[2]); bool unsigned_type = (type.basetype == SPIRType::UInt) || (atomic_image && get(type.image.type).basetype == SPIRType::UInt); const char *op = atomic_image ? "imageAtomicAdd" : "atomicAdd"; const char *increment = nullptr; if (opcode == OpAtomicIIncrement && unsigned_type) increment = "1u"; else if (opcode == OpAtomicIIncrement) increment = "1"; else if (unsigned_type) increment = "uint(-1)"; else increment = "-1"; emit_op(ops[0], ops[1], join(op, "(", to_non_uniform_aware_expression(ops[2]), ", ", increment, ")"), false); } flush_all_atomic_capable_variables(); break; } case OpAtomicIAdd: case OpAtomicFAddEXT: { const char *op = check_atomic_image(ops[2]) ? "imageAtomicAdd" : "atomicAdd"; emit_atomic_func_op(ops[0], ops[1], ops[2], ops[5], op); break; } case OpAtomicISub: { const char *op = check_atomic_image(ops[2]) ? "imageAtomicAdd" : "atomicAdd"; forced_temporaries.insert(ops[1]); auto expr = join(op, "(", to_non_uniform_aware_expression(ops[2]), ", -", to_enclosed_expression(ops[5]), ")"); emit_op(ops[0], ops[1], expr, should_forward(ops[2]) && should_forward(ops[5])); flush_all_atomic_capable_variables(); break; } case OpAtomicSMin: case OpAtomicUMin: { const char *op = check_atomic_image(ops[2]) ? "imageAtomicMin" : "atomicMin"; emit_atomic_func_op(ops[0], ops[1], ops[2], ops[5], op); break; } case OpAtomicSMax: case OpAtomicUMax: { const char *op = check_atomic_image(ops[2]) ? "imageAtomicMax" : "atomicMax"; emit_atomic_func_op(ops[0], ops[1], ops[2], ops[5], op); break; } case OpAtomicAnd: { const char *op = check_atomic_image(ops[2]) ? "imageAtomicAnd" : "atomicAnd"; emit_atomic_func_op(ops[0], ops[1], ops[2], ops[5], op); break; } case OpAtomicOr: { const char *op = check_atomic_image(ops[2]) ? "imageAtomicOr" : "atomicOr"; emit_atomic_func_op(ops[0], ops[1], ops[2], ops[5], op); break; } case OpAtomicXor: { const char *op = check_atomic_image(ops[2]) ? "imageAtomicXor" : "atomicXor"; emit_atomic_func_op(ops[0], ops[1], ops[2], ops[5], op); break; } // Geometry shaders case OpEmitVertex: statement("EmitVertex();"); break; case OpEndPrimitive: statement("EndPrimitive();"); break; case OpEmitStreamVertex: { if (options.es) SPIRV_CROSS_THROW("Multi-stream geometry shaders not supported in ES."); else if (!options.es && options.version < 400) SPIRV_CROSS_THROW("Multi-stream geometry shaders only supported in GLSL 400."); auto stream_expr = to_expression(ops[0]); if (expression_type(ops[0]).basetype != SPIRType::Int) stream_expr = join("int(", stream_expr, ")"); statement("EmitStreamVertex(", stream_expr, ");"); break; } case OpEndStreamPrimitive: { if (options.es) SPIRV_CROSS_THROW("Multi-stream geometry shaders not supported in ES."); else if (!options.es && options.version < 400) SPIRV_CROSS_THROW("Multi-stream geometry shaders only supported in GLSL 400."); auto stream_expr = to_expression(ops[0]); if (expression_type(ops[0]).basetype != SPIRType::Int) stream_expr = join("int(", stream_expr, ")"); statement("EndStreamPrimitive(", stream_expr, ");"); break; } // Textures case OpImageSampleExplicitLod: case OpImageSampleProjExplicitLod: case OpImageSampleDrefExplicitLod: case OpImageSampleProjDrefExplicitLod: case OpImageSampleImplicitLod: case OpImageSampleProjImplicitLod: case OpImageSampleDrefImplicitLod: case OpImageSampleProjDrefImplicitLod: case OpImageFetch: case OpImageGather: case OpImageDrefGather: // Gets a bit hairy, so move this to a separate instruction. emit_texture_op(instruction, false); break; case OpImageSparseSampleExplicitLod: case OpImageSparseSampleProjExplicitLod: case OpImageSparseSampleDrefExplicitLod: case OpImageSparseSampleProjDrefExplicitLod: case OpImageSparseSampleImplicitLod: case OpImageSparseSampleProjImplicitLod: case OpImageSparseSampleDrefImplicitLod: case OpImageSparseSampleProjDrefImplicitLod: case OpImageSparseFetch: case OpImageSparseGather: case OpImageSparseDrefGather: // Gets a bit hairy, so move this to a separate instruction. emit_texture_op(instruction, true); break; case OpImageSparseTexelsResident: if (options.es) SPIRV_CROSS_THROW("Sparse feedback is not supported in GLSL."); require_extension_internal("GL_ARB_sparse_texture2"); emit_unary_func_op_cast(ops[0], ops[1], ops[2], "sparseTexelsResidentARB", int_type, SPIRType::Boolean); break; case OpImage: { uint32_t result_type = ops[0]; uint32_t id = ops[1]; // Suppress usage tracking. auto &e = emit_op(result_type, id, to_expression(ops[2]), true, true); // When using the image, we need to know which variable it is actually loaded from. auto *var = maybe_get_backing_variable(ops[2]); e.loaded_from = var ? var->self : ID(0); break; } case OpImageQueryLod: { const char *op = nullptr; if (!options.es && options.version < 400) { require_extension_internal("GL_ARB_texture_query_lod"); // For some reason, the ARB spec is all-caps. op = "textureQueryLOD"; } else if (options.es) { if (options.version < 300) SPIRV_CROSS_THROW("textureQueryLod not supported in legacy ES"); require_extension_internal("GL_EXT_texture_query_lod"); op = "textureQueryLOD"; } else op = "textureQueryLod"; auto sampler_expr = to_expression(ops[2]); if (has_decoration(ops[2], DecorationNonUniform)) { if (maybe_get_backing_variable(ops[2])) convert_non_uniform_expression(sampler_expr, ops[2]); else if (*backend.nonuniform_qualifier != '\0') sampler_expr = join(backend.nonuniform_qualifier, "(", sampler_expr, ")"); } bool forward = should_forward(ops[3]); emit_op(ops[0], ops[1], join(op, "(", sampler_expr, ", ", to_unpacked_expression(ops[3]), ")"), forward); inherit_expression_dependencies(ops[1], ops[2]); inherit_expression_dependencies(ops[1], ops[3]); register_control_dependent_expression(ops[1]); break; } case OpImageQueryLevels: { uint32_t result_type = ops[0]; uint32_t id = ops[1]; if (!options.es && options.version < 430) require_extension_internal("GL_ARB_texture_query_levels"); if (options.es) SPIRV_CROSS_THROW("textureQueryLevels not supported in ES profile."); auto expr = join("textureQueryLevels(", convert_separate_image_to_expression(ops[2]), ")"); auto &restype = get(ops[0]); expr = bitcast_expression(restype, SPIRType::Int, expr); emit_op(result_type, id, expr, true); break; } case OpImageQuerySamples: { auto &type = expression_type(ops[2]); uint32_t result_type = ops[0]; uint32_t id = ops[1]; if (options.es) SPIRV_CROSS_THROW("textureSamples and imageSamples not supported in ES profile."); else if (options.version < 450) require_extension_internal("GL_ARB_texture_query_samples"); string expr; if (type.image.sampled == 2) expr = join("imageSamples(", to_non_uniform_aware_expression(ops[2]), ")"); else expr = join("textureSamples(", convert_separate_image_to_expression(ops[2]), ")"); auto &restype = get(ops[0]); expr = bitcast_expression(restype, SPIRType::Int, expr); emit_op(result_type, id, expr, true); break; } case OpSampledImage: { uint32_t result_type = ops[0]; uint32_t id = ops[1]; emit_sampled_image_op(result_type, id, ops[2], ops[3]); inherit_expression_dependencies(id, ops[2]); inherit_expression_dependencies(id, ops[3]); break; } case OpImageQuerySizeLod: { uint32_t result_type = ops[0]; uint32_t id = ops[1]; uint32_t img = ops[2]; auto &type = expression_type(img); auto &imgtype = get(type.self); std::string fname = "textureSize"; if (is_legacy_desktop()) { fname = legacy_tex_op(fname, imgtype, img); } else if (is_legacy_es()) SPIRV_CROSS_THROW("textureSize is not supported in ESSL 100."); auto expr = join(fname, "(", convert_separate_image_to_expression(img), ", ", bitcast_expression(SPIRType::Int, ops[3]), ")"); // ES needs to emulate 1D images as 2D. if (type.image.dim == Dim1D && options.es) expr = join(expr, ".x"); auto &restype = get(ops[0]); expr = bitcast_expression(restype, SPIRType::Int, expr); emit_op(result_type, id, expr, true); break; } // Image load/store case OpImageRead: case OpImageSparseRead: { // We added Nonreadable speculatively to the OpImage variable due to glslangValidator // not adding the proper qualifiers. // If it turns out we need to read the image after all, remove the qualifier and recompile. auto *var = maybe_get_backing_variable(ops[2]); if (var) { auto &flags = get_decoration_bitset(var->self); if (flags.get(DecorationNonReadable)) { unset_decoration(var->self, DecorationNonReadable); force_recompile(); } } uint32_t result_type = ops[0]; uint32_t id = ops[1]; bool pure; string imgexpr; auto &type = expression_type(ops[2]); if (var && var->remapped_variable) // Remapped input, just read as-is without any op-code { if (type.image.ms) SPIRV_CROSS_THROW("Trying to remap multisampled image to variable, this is not possible."); auto itr = find_if(begin(pls_inputs), end(pls_inputs), [var](const PlsRemap &pls) { return pls.id == var->self; }); if (itr == end(pls_inputs)) { // For non-PLS inputs, we rely on subpass type remapping information to get it right // since ImageRead always returns 4-component vectors and the backing type is opaque. if (!var->remapped_components) SPIRV_CROSS_THROW("subpassInput was remapped, but remap_components is not set correctly."); imgexpr = remap_swizzle(get(result_type), var->remapped_components, to_expression(ops[2])); } else { // PLS input could have different number of components than what the SPIR expects, swizzle to // the appropriate vector size. uint32_t components = pls_format_to_components(itr->format); imgexpr = remap_swizzle(get(result_type), components, to_expression(ops[2])); } pure = true; } else if (type.image.dim == DimSubpassData) { if (var && subpass_input_is_framebuffer_fetch(var->self)) { imgexpr = to_expression(var->self); } else if (options.vulkan_semantics) { // With Vulkan semantics, use the proper Vulkan GLSL construct. if (type.image.ms) { uint32_t operands = ops[4]; if (operands != ImageOperandsSampleMask || length != 6) SPIRV_CROSS_THROW("Multisampled image used in OpImageRead, but unexpected " "operand mask was used."); uint32_t samples = ops[5]; imgexpr = join("subpassLoad(", to_non_uniform_aware_expression(ops[2]), ", ", to_expression(samples), ")"); } else imgexpr = join("subpassLoad(", to_non_uniform_aware_expression(ops[2]), ")"); } else { if (type.image.ms) { uint32_t operands = ops[4]; if (operands != ImageOperandsSampleMask || length != 6) SPIRV_CROSS_THROW("Multisampled image used in OpImageRead, but unexpected " "operand mask was used."); uint32_t samples = ops[5]; imgexpr = join("texelFetch(", to_non_uniform_aware_expression(ops[2]), ", ivec2(gl_FragCoord.xy), ", to_expression(samples), ")"); } else { // Implement subpass loads via texture barrier style sampling. imgexpr = join("texelFetch(", to_non_uniform_aware_expression(ops[2]), ", ivec2(gl_FragCoord.xy), 0)"); } } imgexpr = remap_swizzle(get(result_type), 4, imgexpr); pure = true; } else { bool sparse = opcode == OpImageSparseRead; uint32_t sparse_code_id = 0; uint32_t sparse_texel_id = 0; if (sparse) emit_sparse_feedback_temporaries(ops[0], ops[1], sparse_code_id, sparse_texel_id); // imageLoad only accepts int coords, not uint. auto coord_expr = to_expression(ops[3]); auto target_coord_type = expression_type(ops[3]); target_coord_type.basetype = SPIRType::Int; coord_expr = bitcast_expression(target_coord_type, expression_type(ops[3]).basetype, coord_expr); // ES needs to emulate 1D images as 2D. if (type.image.dim == Dim1D && options.es) coord_expr = join("ivec2(", coord_expr, ", 0)"); // Plain image load/store. if (sparse) { if (type.image.ms) { uint32_t operands = ops[4]; if (operands != ImageOperandsSampleMask || length != 6) SPIRV_CROSS_THROW("Multisampled image used in OpImageRead, but unexpected " "operand mask was used."); uint32_t samples = ops[5]; statement(to_expression(sparse_code_id), " = sparseImageLoadARB(", to_non_uniform_aware_expression(ops[2]), ", ", coord_expr, ", ", to_expression(samples), ", ", to_expression(sparse_texel_id), ");"); } else { statement(to_expression(sparse_code_id), " = sparseImageLoadARB(", to_non_uniform_aware_expression(ops[2]), ", ", coord_expr, ", ", to_expression(sparse_texel_id), ");"); } imgexpr = join(type_to_glsl(get(result_type)), "(", to_expression(sparse_code_id), ", ", to_expression(sparse_texel_id), ")"); } else { if (type.image.ms) { uint32_t operands = ops[4]; if (operands != ImageOperandsSampleMask || length != 6) SPIRV_CROSS_THROW("Multisampled image used in OpImageRead, but unexpected " "operand mask was used."); uint32_t samples = ops[5]; imgexpr = join("imageLoad(", to_non_uniform_aware_expression(ops[2]), ", ", coord_expr, ", ", to_expression(samples), ")"); } else imgexpr = join("imageLoad(", to_non_uniform_aware_expression(ops[2]), ", ", coord_expr, ")"); } if (!sparse) imgexpr = remap_swizzle(get(result_type), 4, imgexpr); pure = false; } if (var) { bool forward = forced_temporaries.find(id) == end(forced_temporaries); auto &e = emit_op(result_type, id, imgexpr, forward); // We only need to track dependencies if we're reading from image load/store. if (!pure) { e.loaded_from = var->self; if (forward) var->dependees.push_back(id); } } else emit_op(result_type, id, imgexpr, false); inherit_expression_dependencies(id, ops[2]); if (type.image.ms) inherit_expression_dependencies(id, ops[5]); break; } case OpImageTexelPointer: { uint32_t result_type = ops[0]; uint32_t id = ops[1]; auto coord_expr = to_expression(ops[3]); auto target_coord_type = expression_type(ops[3]); target_coord_type.basetype = SPIRType::Int; coord_expr = bitcast_expression(target_coord_type, expression_type(ops[3]).basetype, coord_expr); auto expr = join(to_expression(ops[2]), ", ", coord_expr); auto &e = set(id, expr, result_type, true); // When using the pointer, we need to know which variable it is actually loaded from. auto *var = maybe_get_backing_variable(ops[2]); e.loaded_from = var ? var->self : ID(0); inherit_expression_dependencies(id, ops[3]); break; } case OpImageWrite: { // We added Nonwritable speculatively to the OpImage variable due to glslangValidator // not adding the proper qualifiers. // If it turns out we need to write to the image after all, remove the qualifier and recompile. auto *var = maybe_get_backing_variable(ops[0]); if (var) { if (has_decoration(var->self, DecorationNonWritable)) { unset_decoration(var->self, DecorationNonWritable); force_recompile(); } } auto &type = expression_type(ops[0]); auto &value_type = expression_type(ops[2]); auto store_type = value_type; store_type.vecsize = 4; // imageStore only accepts int coords, not uint. auto coord_expr = to_expression(ops[1]); auto target_coord_type = expression_type(ops[1]); target_coord_type.basetype = SPIRType::Int; coord_expr = bitcast_expression(target_coord_type, expression_type(ops[1]).basetype, coord_expr); // ES needs to emulate 1D images as 2D. if (type.image.dim == Dim1D && options.es) coord_expr = join("ivec2(", coord_expr, ", 0)"); if (type.image.ms) { uint32_t operands = ops[3]; if (operands != ImageOperandsSampleMask || length != 5) SPIRV_CROSS_THROW("Multisampled image used in OpImageWrite, but unexpected operand mask was used."); uint32_t samples = ops[4]; statement("imageStore(", to_non_uniform_aware_expression(ops[0]), ", ", coord_expr, ", ", to_expression(samples), ", ", remap_swizzle(store_type, value_type.vecsize, to_expression(ops[2])), ");"); } else statement("imageStore(", to_non_uniform_aware_expression(ops[0]), ", ", coord_expr, ", ", remap_swizzle(store_type, value_type.vecsize, to_expression(ops[2])), ");"); if (var && variable_storage_is_aliased(*var)) flush_all_aliased_variables(); break; } case OpImageQuerySize: { auto &type = expression_type(ops[2]); uint32_t result_type = ops[0]; uint32_t id = ops[1]; if (type.basetype == SPIRType::Image) { string expr; if (type.image.sampled == 2) { if (!options.es && options.version < 430) require_extension_internal("GL_ARB_shader_image_size"); else if (options.es && options.version < 310) SPIRV_CROSS_THROW("At least ESSL 3.10 required for imageSize."); // The size of an image is always constant. expr = join("imageSize(", to_non_uniform_aware_expression(ops[2]), ")"); } else { // This path is hit for samplerBuffers and multisampled images which do not have LOD. std::string fname = "textureSize"; if (is_legacy()) { auto &imgtype = get(type.self); fname = legacy_tex_op(fname, imgtype, ops[2]); } expr = join(fname, "(", convert_separate_image_to_expression(ops[2]), ")"); } auto &restype = get(ops[0]); expr = bitcast_expression(restype, SPIRType::Int, expr); emit_op(result_type, id, expr, true); } else SPIRV_CROSS_THROW("Invalid type for OpImageQuerySize."); break; } // Compute case OpControlBarrier: case OpMemoryBarrier: { uint32_t execution_scope = 0; uint32_t memory; uint32_t semantics; if (opcode == OpMemoryBarrier) { memory = evaluate_constant_u32(ops[0]); semantics = evaluate_constant_u32(ops[1]); } else { execution_scope = evaluate_constant_u32(ops[0]); memory = evaluate_constant_u32(ops[1]); semantics = evaluate_constant_u32(ops[2]); } if (execution_scope == ScopeSubgroup || memory == ScopeSubgroup) { // OpControlBarrier with ScopeSubgroup is subgroupBarrier() if (opcode != OpControlBarrier) { request_subgroup_feature(ShaderSubgroupSupportHelper::SubgroupMemBarrier); } else { request_subgroup_feature(ShaderSubgroupSupportHelper::SubgroupBarrier); } } if (execution_scope != ScopeSubgroup && get_entry_point().model == ExecutionModelTessellationControl) { // Control shaders only have barriers, and it implies memory barriers. if (opcode == OpControlBarrier) statement("barrier();"); break; } // We only care about these flags, acquire/release and friends are not relevant to GLSL. semantics = mask_relevant_memory_semantics(semantics); if (opcode == OpMemoryBarrier) { // If we are a memory barrier, and the next instruction is a control barrier, check if that memory barrier // does what we need, so we avoid redundant barriers. const Instruction *next = get_next_instruction_in_block(instruction); if (next && next->op == OpControlBarrier) { auto *next_ops = stream(*next); uint32_t next_memory = evaluate_constant_u32(next_ops[1]); uint32_t next_semantics = evaluate_constant_u32(next_ops[2]); next_semantics = mask_relevant_memory_semantics(next_semantics); bool memory_scope_covered = false; if (next_memory == memory) memory_scope_covered = true; else if (next_semantics == MemorySemanticsWorkgroupMemoryMask) { // If we only care about workgroup memory, either Device or Workgroup scope is fine, // scope does not have to match. if ((next_memory == ScopeDevice || next_memory == ScopeWorkgroup) && (memory == ScopeDevice || memory == ScopeWorkgroup)) { memory_scope_covered = true; } } else if (memory == ScopeWorkgroup && next_memory == ScopeDevice) { // The control barrier has device scope, but the memory barrier just has workgroup scope. memory_scope_covered = true; } // If we have the same memory scope, and all memory types are covered, we're good. if (memory_scope_covered && (semantics & next_semantics) == semantics) break; } } // We are synchronizing some memory or syncing execution, // so we cannot forward any loads beyond the memory barrier. if (semantics || opcode == OpControlBarrier) { assert(current_emitting_block); flush_control_dependent_expressions(current_emitting_block->self); flush_all_active_variables(); } if (memory == ScopeWorkgroup) // Only need to consider memory within a group { if (semantics == MemorySemanticsWorkgroupMemoryMask) { // OpControlBarrier implies a memory barrier for shared memory as well. bool implies_shared_barrier = opcode == OpControlBarrier && execution_scope == ScopeWorkgroup; if (!implies_shared_barrier) statement("memoryBarrierShared();"); } else if (semantics != 0) statement("groupMemoryBarrier();"); } else if (memory == ScopeSubgroup) { const uint32_t all_barriers = MemorySemanticsWorkgroupMemoryMask | MemorySemanticsUniformMemoryMask | MemorySemanticsImageMemoryMask; if (semantics & (MemorySemanticsCrossWorkgroupMemoryMask | MemorySemanticsSubgroupMemoryMask)) { // These are not relevant for GLSL, but assume it means memoryBarrier(). // memoryBarrier() does everything, so no need to test anything else. statement("subgroupMemoryBarrier();"); } else if ((semantics & all_barriers) == all_barriers) { // Short-hand instead of emitting 3 barriers. statement("subgroupMemoryBarrier();"); } else { // Pick out individual barriers. if (semantics & MemorySemanticsWorkgroupMemoryMask) statement("subgroupMemoryBarrierShared();"); if (semantics & MemorySemanticsUniformMemoryMask) statement("subgroupMemoryBarrierBuffer();"); if (semantics & MemorySemanticsImageMemoryMask) statement("subgroupMemoryBarrierImage();"); } } else { const uint32_t all_barriers = MemorySemanticsWorkgroupMemoryMask | MemorySemanticsUniformMemoryMask | MemorySemanticsImageMemoryMask; if (semantics & (MemorySemanticsCrossWorkgroupMemoryMask | MemorySemanticsSubgroupMemoryMask)) { // These are not relevant for GLSL, but assume it means memoryBarrier(). // memoryBarrier() does everything, so no need to test anything else. statement("memoryBarrier();"); } else if ((semantics & all_barriers) == all_barriers) { // Short-hand instead of emitting 4 barriers. statement("memoryBarrier();"); } else { // Pick out individual barriers. if (semantics & MemorySemanticsWorkgroupMemoryMask) statement("memoryBarrierShared();"); if (semantics & MemorySemanticsUniformMemoryMask) statement("memoryBarrierBuffer();"); if (semantics & MemorySemanticsImageMemoryMask) statement("memoryBarrierImage();"); } } if (opcode == OpControlBarrier) { if (execution_scope == ScopeSubgroup) statement("subgroupBarrier();"); else statement("barrier();"); } break; } case OpExtInst: { uint32_t extension_set = ops[2]; auto ext = get(extension_set).ext; if (ext == SPIRExtension::GLSL) { emit_glsl_op(ops[0], ops[1], ops[3], &ops[4], length - 4); } else if (ext == SPIRExtension::SPV_AMD_shader_ballot) { emit_spv_amd_shader_ballot_op(ops[0], ops[1], ops[3], &ops[4], length - 4); } else if (ext == SPIRExtension::SPV_AMD_shader_explicit_vertex_parameter) { emit_spv_amd_shader_explicit_vertex_parameter_op(ops[0], ops[1], ops[3], &ops[4], length - 4); } else if (ext == SPIRExtension::SPV_AMD_shader_trinary_minmax) { emit_spv_amd_shader_trinary_minmax_op(ops[0], ops[1], ops[3], &ops[4], length - 4); } else if (ext == SPIRExtension::SPV_AMD_gcn_shader) { emit_spv_amd_gcn_shader_op(ops[0], ops[1], ops[3], &ops[4], length - 4); } else if (ext == SPIRExtension::SPV_debug_info || ext == SPIRExtension::NonSemanticShaderDebugInfo || ext == SPIRExtension::NonSemanticGeneric) { break; // Ignore SPIR-V debug information extended instructions. } else if (ext == SPIRExtension::NonSemanticDebugPrintf) { // Operation 1 is printf. if (ops[3] == 1) { if (!options.vulkan_semantics) SPIRV_CROSS_THROW("Debug printf is only supported in Vulkan GLSL.\n"); require_extension_internal("GL_EXT_debug_printf"); auto &format_string = get(ops[4]).str; string expr = join("debugPrintfEXT(\"", format_string, "\""); for (uint32_t i = 5; i < length; i++) { expr += ", "; expr += to_expression(ops[i]); } statement(expr, ");"); } } else { statement("// unimplemented ext op ", instruction.op); break; } break; } // Legacy sub-group stuff ... case OpSubgroupBallotKHR: { uint32_t result_type = ops[0]; uint32_t id = ops[1]; string expr; expr = join("uvec4(unpackUint2x32(ballotARB(" + to_expression(ops[2]) + ")), 0u, 0u)"); emit_op(result_type, id, expr, should_forward(ops[2])); require_extension_internal("GL_ARB_shader_ballot"); inherit_expression_dependencies(id, ops[2]); register_control_dependent_expression(ops[1]); break; } case OpSubgroupFirstInvocationKHR: { uint32_t result_type = ops[0]; uint32_t id = ops[1]; emit_unary_func_op(result_type, id, ops[2], "readFirstInvocationARB"); require_extension_internal("GL_ARB_shader_ballot"); register_control_dependent_expression(ops[1]); break; } case OpSubgroupReadInvocationKHR: { uint32_t result_type = ops[0]; uint32_t id = ops[1]; emit_binary_func_op(result_type, id, ops[2], ops[3], "readInvocationARB"); require_extension_internal("GL_ARB_shader_ballot"); register_control_dependent_expression(ops[1]); break; } case OpSubgroupAllKHR: { uint32_t result_type = ops[0]; uint32_t id = ops[1]; emit_unary_func_op(result_type, id, ops[2], "allInvocationsARB"); require_extension_internal("GL_ARB_shader_group_vote"); register_control_dependent_expression(ops[1]); break; } case OpSubgroupAnyKHR: { uint32_t result_type = ops[0]; uint32_t id = ops[1]; emit_unary_func_op(result_type, id, ops[2], "anyInvocationARB"); require_extension_internal("GL_ARB_shader_group_vote"); register_control_dependent_expression(ops[1]); break; } case OpSubgroupAllEqualKHR: { uint32_t result_type = ops[0]; uint32_t id = ops[1]; emit_unary_func_op(result_type, id, ops[2], "allInvocationsEqualARB"); require_extension_internal("GL_ARB_shader_group_vote"); register_control_dependent_expression(ops[1]); break; } case OpGroupIAddNonUniformAMD: case OpGroupFAddNonUniformAMD: { uint32_t result_type = ops[0]; uint32_t id = ops[1]; emit_unary_func_op(result_type, id, ops[4], "addInvocationsNonUniformAMD"); require_extension_internal("GL_AMD_shader_ballot"); register_control_dependent_expression(ops[1]); break; } case OpGroupFMinNonUniformAMD: case OpGroupUMinNonUniformAMD: case OpGroupSMinNonUniformAMD: { uint32_t result_type = ops[0]; uint32_t id = ops[1]; emit_unary_func_op(result_type, id, ops[4], "minInvocationsNonUniformAMD"); require_extension_internal("GL_AMD_shader_ballot"); register_control_dependent_expression(ops[1]); break; } case OpGroupFMaxNonUniformAMD: case OpGroupUMaxNonUniformAMD: case OpGroupSMaxNonUniformAMD: { uint32_t result_type = ops[0]; uint32_t id = ops[1]; emit_unary_func_op(result_type, id, ops[4], "maxInvocationsNonUniformAMD"); require_extension_internal("GL_AMD_shader_ballot"); register_control_dependent_expression(ops[1]); break; } case OpFragmentMaskFetchAMD: { auto &type = expression_type(ops[2]); uint32_t result_type = ops[0]; uint32_t id = ops[1]; if (type.image.dim == spv::DimSubpassData) { emit_unary_func_op(result_type, id, ops[2], "fragmentMaskFetchAMD"); } else { emit_binary_func_op(result_type, id, ops[2], ops[3], "fragmentMaskFetchAMD"); } require_extension_internal("GL_AMD_shader_fragment_mask"); break; } case OpFragmentFetchAMD: { auto &type = expression_type(ops[2]); uint32_t result_type = ops[0]; uint32_t id = ops[1]; if (type.image.dim == spv::DimSubpassData) { emit_binary_func_op(result_type, id, ops[2], ops[4], "fragmentFetchAMD"); } else { emit_trinary_func_op(result_type, id, ops[2], ops[3], ops[4], "fragmentFetchAMD"); } require_extension_internal("GL_AMD_shader_fragment_mask"); break; } // Vulkan 1.1 sub-group stuff ... case OpGroupNonUniformElect: case OpGroupNonUniformBroadcast: case OpGroupNonUniformBroadcastFirst: case OpGroupNonUniformBallot: case OpGroupNonUniformInverseBallot: case OpGroupNonUniformBallotBitExtract: case OpGroupNonUniformBallotBitCount: case OpGroupNonUniformBallotFindLSB: case OpGroupNonUniformBallotFindMSB: case OpGroupNonUniformShuffle: case OpGroupNonUniformShuffleXor: case OpGroupNonUniformShuffleUp: case OpGroupNonUniformShuffleDown: case OpGroupNonUniformAll: case OpGroupNonUniformAny: case OpGroupNonUniformAllEqual: case OpGroupNonUniformFAdd: case OpGroupNonUniformIAdd: case OpGroupNonUniformFMul: case OpGroupNonUniformIMul: case OpGroupNonUniformFMin: case OpGroupNonUniformFMax: case OpGroupNonUniformSMin: case OpGroupNonUniformSMax: case OpGroupNonUniformUMin: case OpGroupNonUniformUMax: case OpGroupNonUniformBitwiseAnd: case OpGroupNonUniformBitwiseOr: case OpGroupNonUniformBitwiseXor: case OpGroupNonUniformLogicalAnd: case OpGroupNonUniformLogicalOr: case OpGroupNonUniformLogicalXor: case OpGroupNonUniformQuadSwap: case OpGroupNonUniformQuadBroadcast: emit_subgroup_op(instruction); break; case OpFUnordEqual: case OpFUnordLessThan: case OpFUnordGreaterThan: case OpFUnordLessThanEqual: case OpFUnordGreaterThanEqual: { // GLSL doesn't specify if floating point comparisons are ordered or unordered, // but glslang always emits ordered floating point compares for GLSL. // To get unordered compares, we can test the opposite thing and invert the result. // This way, we force true when there is any NaN present. uint32_t op0 = ops[2]; uint32_t op1 = ops[3]; string expr; if (expression_type(op0).vecsize > 1) { const char *comp_op = nullptr; switch (opcode) { case OpFUnordEqual: comp_op = "notEqual"; break; case OpFUnordLessThan: comp_op = "greaterThanEqual"; break; case OpFUnordLessThanEqual: comp_op = "greaterThan"; break; case OpFUnordGreaterThan: comp_op = "lessThanEqual"; break; case OpFUnordGreaterThanEqual: comp_op = "lessThan"; break; default: assert(0); break; } expr = join("not(", comp_op, "(", to_unpacked_expression(op0), ", ", to_unpacked_expression(op1), "))"); } else { const char *comp_op = nullptr; switch (opcode) { case OpFUnordEqual: comp_op = " != "; break; case OpFUnordLessThan: comp_op = " >= "; break; case OpFUnordLessThanEqual: comp_op = " > "; break; case OpFUnordGreaterThan: comp_op = " <= "; break; case OpFUnordGreaterThanEqual: comp_op = " < "; break; default: assert(0); break; } expr = join("!(", to_enclosed_unpacked_expression(op0), comp_op, to_enclosed_unpacked_expression(op1), ")"); } emit_op(ops[0], ops[1], expr, should_forward(op0) && should_forward(op1)); inherit_expression_dependencies(ops[1], op0); inherit_expression_dependencies(ops[1], op1); break; } case OpReportIntersectionKHR: // NV is same opcode. forced_temporaries.insert(ops[1]); if (ray_tracing_is_khr) GLSL_BFOP(reportIntersectionEXT); else GLSL_BFOP(reportIntersectionNV); flush_control_dependent_expressions(current_emitting_block->self); break; case OpIgnoreIntersectionNV: // KHR variant is a terminator. statement("ignoreIntersectionNV();"); flush_control_dependent_expressions(current_emitting_block->self); break; case OpTerminateRayNV: // KHR variant is a terminator. statement("terminateRayNV();"); flush_control_dependent_expressions(current_emitting_block->self); break; case OpTraceNV: statement("traceNV(", to_non_uniform_aware_expression(ops[0]), ", ", to_expression(ops[1]), ", ", to_expression(ops[2]), ", ", to_expression(ops[3]), ", ", to_expression(ops[4]), ", ", to_expression(ops[5]), ", ", to_expression(ops[6]), ", ", to_expression(ops[7]), ", ", to_expression(ops[8]), ", ", to_expression(ops[9]), ", ", to_expression(ops[10]), ");"); flush_control_dependent_expressions(current_emitting_block->self); break; case OpTraceRayKHR: if (!has_decoration(ops[10], DecorationLocation)) SPIRV_CROSS_THROW("A memory declaration object must be used in TraceRayKHR."); statement("traceRayEXT(", to_non_uniform_aware_expression(ops[0]), ", ", to_expression(ops[1]), ", ", to_expression(ops[2]), ", ", to_expression(ops[3]), ", ", to_expression(ops[4]), ", ", to_expression(ops[5]), ", ", to_expression(ops[6]), ", ", to_expression(ops[7]), ", ", to_expression(ops[8]), ", ", to_expression(ops[9]), ", ", get_decoration(ops[10], DecorationLocation), ");"); flush_control_dependent_expressions(current_emitting_block->self); break; case OpExecuteCallableNV: statement("executeCallableNV(", to_expression(ops[0]), ", ", to_expression(ops[1]), ");"); flush_control_dependent_expressions(current_emitting_block->self); break; case OpExecuteCallableKHR: if (!has_decoration(ops[1], DecorationLocation)) SPIRV_CROSS_THROW("A memory declaration object must be used in ExecuteCallableKHR."); statement("executeCallableEXT(", to_expression(ops[0]), ", ", get_decoration(ops[1], DecorationLocation), ");"); flush_control_dependent_expressions(current_emitting_block->self); break; // Don't bother forwarding temporaries. Avoids having to test expression invalidation with ray query objects. case OpRayQueryInitializeKHR: flush_variable_declaration(ops[0]); statement("rayQueryInitializeEXT(", to_expression(ops[0]), ", ", to_expression(ops[1]), ", ", to_expression(ops[2]), ", ", to_expression(ops[3]), ", ", to_expression(ops[4]), ", ", to_expression(ops[5]), ", ", to_expression(ops[6]), ", ", to_expression(ops[7]), ");"); break; case OpRayQueryProceedKHR: flush_variable_declaration(ops[0]); emit_op(ops[0], ops[1], join("rayQueryProceedEXT(", to_expression(ops[2]), ")"), false); break; case OpRayQueryTerminateKHR: flush_variable_declaration(ops[0]); statement("rayQueryTerminateEXT(", to_expression(ops[0]), ");"); break; case OpRayQueryGenerateIntersectionKHR: flush_variable_declaration(ops[0]); statement("rayQueryGenerateIntersectionEXT(", to_expression(ops[0]), ", ", to_expression(ops[1]), ");"); break; case OpRayQueryConfirmIntersectionKHR: flush_variable_declaration(ops[0]); statement("rayQueryConfirmIntersectionEXT(", to_expression(ops[0]), ");"); break; #define GLSL_RAY_QUERY_GET_OP(op) \ case OpRayQueryGet##op##KHR: \ flush_variable_declaration(ops[2]); \ emit_op(ops[0], ops[1], join("rayQueryGet" #op "EXT(", to_expression(ops[2]), ")"), false); \ break #define GLSL_RAY_QUERY_GET_OP2(op) \ case OpRayQueryGet##op##KHR: \ flush_variable_declaration(ops[2]); \ emit_op(ops[0], ops[1], join("rayQueryGet" #op "EXT(", to_expression(ops[2]), ", ", "bool(", to_expression(ops[3]), "))"), false); \ break GLSL_RAY_QUERY_GET_OP(RayTMin); GLSL_RAY_QUERY_GET_OP(RayFlags); GLSL_RAY_QUERY_GET_OP(WorldRayOrigin); GLSL_RAY_QUERY_GET_OP(WorldRayDirection); GLSL_RAY_QUERY_GET_OP(IntersectionCandidateAABBOpaque); GLSL_RAY_QUERY_GET_OP2(IntersectionType); GLSL_RAY_QUERY_GET_OP2(IntersectionT); GLSL_RAY_QUERY_GET_OP2(IntersectionInstanceCustomIndex); GLSL_RAY_QUERY_GET_OP2(IntersectionInstanceId); GLSL_RAY_QUERY_GET_OP2(IntersectionInstanceShaderBindingTableRecordOffset); GLSL_RAY_QUERY_GET_OP2(IntersectionGeometryIndex); GLSL_RAY_QUERY_GET_OP2(IntersectionPrimitiveIndex); GLSL_RAY_QUERY_GET_OP2(IntersectionBarycentrics); GLSL_RAY_QUERY_GET_OP2(IntersectionFrontFace); GLSL_RAY_QUERY_GET_OP2(IntersectionObjectRayDirection); GLSL_RAY_QUERY_GET_OP2(IntersectionObjectRayOrigin); GLSL_RAY_QUERY_GET_OP2(IntersectionObjectToWorld); GLSL_RAY_QUERY_GET_OP2(IntersectionWorldToObject); #undef GLSL_RAY_QUERY_GET_OP #undef GLSL_RAY_QUERY_GET_OP2 case OpConvertUToAccelerationStructureKHR: { require_extension_internal("GL_EXT_ray_tracing"); bool elide_temporary = should_forward(ops[2]) && forced_temporaries.count(ops[1]) == 0 && !hoisted_temporaries.count(ops[1]); if (elide_temporary) { GLSL_UFOP(accelerationStructureEXT); } else { // Force this path in subsequent iterations. forced_temporaries.insert(ops[1]); // We cannot declare a temporary acceleration structure in GLSL. // If we get to this point, we'll have to emit a temporary uvec2, // and cast to RTAS on demand. statement(declare_temporary(expression_type_id(ops[2]), ops[1]), to_unpacked_expression(ops[2]), ";"); // Use raw SPIRExpression interface to block all usage tracking. set(ops[1], join("accelerationStructureEXT(", to_name(ops[1]), ")"), ops[0], true); } break; } case OpConvertUToPtr: { auto &type = get(ops[0]); if (type.storage != StorageClassPhysicalStorageBufferEXT) SPIRV_CROSS_THROW("Only StorageClassPhysicalStorageBufferEXT is supported by OpConvertUToPtr."); auto &in_type = expression_type(ops[2]); if (in_type.vecsize == 2) require_extension_internal("GL_EXT_buffer_reference_uvec2"); auto op = type_to_glsl(type); emit_unary_func_op(ops[0], ops[1], ops[2], op.c_str()); break; } case OpConvertPtrToU: { auto &type = get(ops[0]); auto &ptr_type = expression_type(ops[2]); if (ptr_type.storage != StorageClassPhysicalStorageBufferEXT) SPIRV_CROSS_THROW("Only StorageClassPhysicalStorageBufferEXT is supported by OpConvertPtrToU."); if (type.vecsize == 2) require_extension_internal("GL_EXT_buffer_reference_uvec2"); auto op = type_to_glsl(type); emit_unary_func_op(ops[0], ops[1], ops[2], op.c_str()); break; } case OpUndef: // Undefined value has been declared. break; case OpLine: { emit_line_directive(ops[0], ops[1]); break; } case OpNoLine: break; case OpDemoteToHelperInvocationEXT: if (!options.vulkan_semantics) SPIRV_CROSS_THROW("GL_EXT_demote_to_helper_invocation is only supported in Vulkan GLSL."); require_extension_internal("GL_EXT_demote_to_helper_invocation"); statement(backend.demote_literal, ";"); break; case OpIsHelperInvocationEXT: if (!options.vulkan_semantics) SPIRV_CROSS_THROW("GL_EXT_demote_to_helper_invocation is only supported in Vulkan GLSL."); require_extension_internal("GL_EXT_demote_to_helper_invocation"); // Helper lane state with demote is volatile by nature. // Do not forward this. emit_op(ops[0], ops[1], "helperInvocationEXT()", false); break; case OpBeginInvocationInterlockEXT: // If the interlock is complex, we emit this elsewhere. if (!interlocked_is_complex) { statement("SPIRV_Cross_beginInvocationInterlock();"); flush_all_active_variables(); // Make sure forwarding doesn't propagate outside interlock region. } break; case OpEndInvocationInterlockEXT: // If the interlock is complex, we emit this elsewhere. if (!interlocked_is_complex) { statement("SPIRV_Cross_endInvocationInterlock();"); flush_all_active_variables(); // Make sure forwarding doesn't propagate outside interlock region. } break; case OpSetMeshOutputsEXT: statement("SetMeshOutputsEXT(", to_unpacked_expression(ops[0]), ", ", to_unpacked_expression(ops[1]), ");"); break; case OpReadClockKHR: { auto &type = get(ops[0]); auto scope = static_cast(evaluate_constant_u32(ops[2])); const char *op = nullptr; // Forwarding clock statements leads to a scenario where an SSA value can take on different // values every time it's evaluated. Block any forwarding attempt. // We also might want to invalidate all expressions to function as a sort of optimization // barrier, but might be overkill for now. if (scope == ScopeDevice) { require_extension_internal("GL_EXT_shader_realtime_clock"); if (type.basetype == SPIRType::BaseType::UInt64) op = "clockRealtimeEXT()"; else if (type.basetype == SPIRType::BaseType::UInt && type.vecsize == 2) op = "clockRealtime2x32EXT()"; else SPIRV_CROSS_THROW("Unsupported result type for OpReadClockKHR opcode."); } else if (scope == ScopeSubgroup) { require_extension_internal("GL_ARB_shader_clock"); if (type.basetype == SPIRType::BaseType::UInt64) op = "clockARB()"; else if (type.basetype == SPIRType::BaseType::UInt && type.vecsize == 2) op = "clock2x32ARB()"; else SPIRV_CROSS_THROW("Unsupported result type for OpReadClockKHR opcode."); } else SPIRV_CROSS_THROW("Unsupported scope for OpReadClockKHR opcode."); emit_op(ops[0], ops[1], op, false); break; } default: statement("// unimplemented op ", instruction.op); break; } } // Appends function arguments, mapped from global variables, beyond the specified arg index. // This is used when a function call uses fewer arguments than the function defines. // This situation may occur if the function signature has been dynamically modified to // extract global variables referenced from within the function, and convert them to // function arguments. This is necessary for shader languages that do not support global // access to shader input content from within a function (eg. Metal). Each additional // function args uses the name of the global variable. Function nesting will modify the // functions and function calls all the way up the nesting chain. void CompilerGLSL::append_global_func_args(const SPIRFunction &func, uint32_t index, SmallVector &arglist) { auto &args = func.arguments; uint32_t arg_cnt = uint32_t(args.size()); for (uint32_t arg_idx = index; arg_idx < arg_cnt; arg_idx++) { auto &arg = args[arg_idx]; assert(arg.alias_global_variable); // If the underlying variable needs to be declared // (ie. a local variable with deferred declaration), do so now. uint32_t var_id = get(arg.id).basevariable; if (var_id) flush_variable_declaration(var_id); arglist.push_back(to_func_call_arg(arg, arg.id)); } } string CompilerGLSL::to_member_name(const SPIRType &type, uint32_t index) { if (type.type_alias != TypeID(0) && !has_extended_decoration(type.type_alias, SPIRVCrossDecorationBufferBlockRepacked)) { return to_member_name(get(type.type_alias), index); } auto &memb = ir.meta[type.self].members; if (index < memb.size() && !memb[index].alias.empty()) return memb[index].alias; else return join("_m", index); } string CompilerGLSL::to_member_reference(uint32_t, const SPIRType &type, uint32_t index, bool) { return join(".", to_member_name(type, index)); } string CompilerGLSL::to_multi_member_reference(const SPIRType &type, const SmallVector &indices) { string ret; auto *member_type = &type; for (auto &index : indices) { ret += join(".", to_member_name(*member_type, index)); member_type = &get(member_type->member_types[index]); } return ret; } void CompilerGLSL::add_member_name(SPIRType &type, uint32_t index) { auto &memb = ir.meta[type.self].members; if (index < memb.size() && !memb[index].alias.empty()) { auto &name = memb[index].alias; if (name.empty()) return; ParsedIR::sanitize_identifier(name, true, true); update_name_cache(type.member_name_cache, name); } } // Checks whether the ID is a row_major matrix that requires conversion before use bool CompilerGLSL::is_non_native_row_major_matrix(uint32_t id) { // Natively supported row-major matrices do not need to be converted. // Legacy targets do not support row major. if (backend.native_row_major_matrix && !is_legacy()) return false; auto *e = maybe_get(id); if (e) return e->need_transpose; else return has_decoration(id, DecorationRowMajor); } // Checks whether the member is a row_major matrix that requires conversion before use bool CompilerGLSL::member_is_non_native_row_major_matrix(const SPIRType &type, uint32_t index) { // Natively supported row-major matrices do not need to be converted. if (backend.native_row_major_matrix && !is_legacy()) return false; // Non-matrix or column-major matrix types do not need to be converted. if (!has_member_decoration(type.self, index, DecorationRowMajor)) return false; // Only square row-major matrices can be converted at this time. // Converting non-square matrices will require defining custom GLSL function that // swaps matrix elements while retaining the original dimensional form of the matrix. const auto mbr_type = get(type.member_types[index]); if (mbr_type.columns != mbr_type.vecsize) SPIRV_CROSS_THROW("Row-major matrices must be square on this platform."); return true; } // Checks if we need to remap physical type IDs when declaring the type in a buffer. bool CompilerGLSL::member_is_remapped_physical_type(const SPIRType &type, uint32_t index) const { return has_extended_member_decoration(type.self, index, SPIRVCrossDecorationPhysicalTypeID); } // Checks whether the member is in packed data type, that might need to be unpacked. bool CompilerGLSL::member_is_packed_physical_type(const SPIRType &type, uint32_t index) const { return has_extended_member_decoration(type.self, index, SPIRVCrossDecorationPhysicalTypePacked); } // Wraps the expression string in a function call that converts the // row_major matrix result of the expression to a column_major matrix. // Base implementation uses the standard library transpose() function. // Subclasses may override to use a different function. string CompilerGLSL::convert_row_major_matrix(string exp_str, const SPIRType &exp_type, uint32_t /* physical_type_id */, bool /*is_packed*/, bool relaxed) { strip_enclosed_expression(exp_str); if (!is_matrix(exp_type)) { auto column_index = exp_str.find_last_of('['); if (column_index == string::npos) return exp_str; auto column_expr = exp_str.substr(column_index); exp_str.resize(column_index); auto end_deferred_index = column_expr.find_last_of(']'); if (end_deferred_index != string::npos && end_deferred_index + 1 != column_expr.size()) { // If we have any data member fixups, it must be transposed so that it refers to this index. // E.g. [0].data followed by [1] would be shuffled to [1][0].data which is wrong, // and needs to be [1].data[0] instead. end_deferred_index++; column_expr = column_expr.substr(end_deferred_index) + column_expr.substr(0, end_deferred_index); } auto transposed_expr = type_to_glsl_constructor(exp_type) + "("; // Loading a column from a row-major matrix. Unroll the load. for (uint32_t c = 0; c < exp_type.vecsize; c++) { transposed_expr += join(exp_str, '[', c, ']', column_expr); if (c + 1 < exp_type.vecsize) transposed_expr += ", "; } transposed_expr += ")"; return transposed_expr; } else if (options.version < 120) { // GLSL 110, ES 100 do not have transpose(), so emulate it. Note that // these GLSL versions do not support non-square matrices. if (exp_type.vecsize == 2 && exp_type.columns == 2) require_polyfill(PolyfillTranspose2x2, relaxed); else if (exp_type.vecsize == 3 && exp_type.columns == 3) require_polyfill(PolyfillTranspose3x3, relaxed); else if (exp_type.vecsize == 4 && exp_type.columns == 4) require_polyfill(PolyfillTranspose4x4, relaxed); else SPIRV_CROSS_THROW("Non-square matrices are not supported in legacy GLSL, cannot transpose."); return join("spvTranspose", (options.es && relaxed) ? "MP" : "", "(", exp_str, ")"); } else return join("transpose(", exp_str, ")"); } string CompilerGLSL::variable_decl(const SPIRType &type, const string &name, uint32_t id) { string type_name = type_to_glsl(type, id); remap_variable_type_name(type, name, type_name); return join(type_name, " ", name, type_to_array_glsl(type)); } bool CompilerGLSL::variable_decl_is_remapped_storage(const SPIRVariable &var, StorageClass storage) const { return var.storage == storage; } // Emit a structure member. Subclasses may override to modify output, // or to dynamically add a padding member if needed. void CompilerGLSL::emit_struct_member(const SPIRType &type, uint32_t member_type_id, uint32_t index, const string &qualifier, uint32_t) { auto &membertype = get(member_type_id); Bitset memberflags; auto &memb = ir.meta[type.self].members; if (index < memb.size()) memberflags = memb[index].decoration_flags; string qualifiers; bool is_block = ir.meta[type.self].decoration.decoration_flags.get(DecorationBlock) || ir.meta[type.self].decoration.decoration_flags.get(DecorationBufferBlock); if (is_block) qualifiers = to_interpolation_qualifiers(memberflags); statement(layout_for_member(type, index), qualifiers, qualifier, flags_to_qualifiers_glsl(membertype, memberflags), variable_decl(membertype, to_member_name(type, index)), ";"); } void CompilerGLSL::emit_struct_padding_target(const SPIRType &) { } string CompilerGLSL::flags_to_qualifiers_glsl(const SPIRType &type, const Bitset &flags) { // GL_EXT_buffer_reference variables can be marked as restrict. if (flags.get(DecorationRestrictPointerEXT)) return "restrict "; string qual; if (type_is_floating_point(type) && flags.get(DecorationNoContraction) && backend.support_precise_qualifier) qual = "precise "; // Structs do not have precision qualifiers, neither do doubles (desktop only anyways, so no mediump/highp). bool type_supports_precision = type.basetype == SPIRType::Float || type.basetype == SPIRType::Int || type.basetype == SPIRType::UInt || type.basetype == SPIRType::Image || type.basetype == SPIRType::SampledImage || type.basetype == SPIRType::Sampler; if (!type_supports_precision) return qual; if (options.es) { auto &execution = get_entry_point(); if (type.basetype == SPIRType::UInt && is_legacy_es()) { // HACK: This is a bool. See comment in type_to_glsl(). qual += "lowp "; } else if (flags.get(DecorationRelaxedPrecision)) { bool implied_fmediump = type.basetype == SPIRType::Float && options.fragment.default_float_precision == Options::Mediump && execution.model == ExecutionModelFragment; bool implied_imediump = (type.basetype == SPIRType::Int || type.basetype == SPIRType::UInt) && options.fragment.default_int_precision == Options::Mediump && execution.model == ExecutionModelFragment; qual += (implied_fmediump || implied_imediump) ? "" : "mediump "; } else { bool implied_fhighp = type.basetype == SPIRType::Float && ((options.fragment.default_float_precision == Options::Highp && execution.model == ExecutionModelFragment) || (execution.model != ExecutionModelFragment)); bool implied_ihighp = (type.basetype == SPIRType::Int || type.basetype == SPIRType::UInt) && ((options.fragment.default_int_precision == Options::Highp && execution.model == ExecutionModelFragment) || (execution.model != ExecutionModelFragment)); qual += (implied_fhighp || implied_ihighp) ? "" : "highp "; } } else if (backend.allow_precision_qualifiers) { // Vulkan GLSL supports precision qualifiers, even in desktop profiles, which is convenient. // The default is highp however, so only emit mediump in the rare case that a shader has these. if (flags.get(DecorationRelaxedPrecision)) qual += "mediump "; } return qual; } string CompilerGLSL::to_precision_qualifiers_glsl(uint32_t id) { auto &type = expression_type(id); bool use_precision_qualifiers = backend.allow_precision_qualifiers; if (use_precision_qualifiers && (type.basetype == SPIRType::Image || type.basetype == SPIRType::SampledImage)) { // Force mediump for the sampler type. We cannot declare 16-bit or smaller image types. auto &result_type = get(type.image.type); if (result_type.width < 32) return "mediump "; } return flags_to_qualifiers_glsl(type, ir.meta[id].decoration.decoration_flags); } void CompilerGLSL::fixup_io_block_patch_primitive_qualifiers(const SPIRVariable &var) { // Works around weird behavior in glslangValidator where // a patch out block is translated to just block members getting the decoration. // To make glslang not complain when we compile again, we have to transform this back to a case where // the variable itself has Patch decoration, and not members. // Same for perprimitiveEXT. auto &type = get(var.basetype); if (has_decoration(type.self, DecorationBlock)) { uint32_t member_count = uint32_t(type.member_types.size()); Decoration promoted_decoration = {}; bool do_promote_decoration = false; for (uint32_t i = 0; i < member_count; i++) { if (has_member_decoration(type.self, i, DecorationPatch)) { promoted_decoration = DecorationPatch; do_promote_decoration = true; break; } else if (has_member_decoration(type.self, i, DecorationPerPrimitiveEXT)) { promoted_decoration = DecorationPerPrimitiveEXT; do_promote_decoration = true; break; } } if (do_promote_decoration) { set_decoration(var.self, promoted_decoration); for (uint32_t i = 0; i < member_count; i++) unset_member_decoration(type.self, i, promoted_decoration); } } } string CompilerGLSL::to_qualifiers_glsl(uint32_t id) { auto &flags = get_decoration_bitset(id); string res; auto *var = maybe_get(id); if (var && var->storage == StorageClassWorkgroup && !backend.shared_is_implied) res += "shared "; else if (var && var->storage == StorageClassTaskPayloadWorkgroupEXT && !backend.shared_is_implied) res += "taskPayloadSharedEXT "; res += to_interpolation_qualifiers(flags); if (var) res += to_storage_qualifiers_glsl(*var); auto &type = expression_type(id); if (type.image.dim != DimSubpassData && type.image.sampled == 2) { if (flags.get(DecorationCoherent)) res += "coherent "; if (flags.get(DecorationRestrict)) res += "restrict "; if (flags.get(DecorationNonWritable)) res += "readonly "; bool formatted_load = type.image.format == ImageFormatUnknown; if (flags.get(DecorationNonReadable)) { res += "writeonly "; formatted_load = false; } if (formatted_load) { if (!options.es) require_extension_internal("GL_EXT_shader_image_load_formatted"); else SPIRV_CROSS_THROW("Cannot use GL_EXT_shader_image_load_formatted in ESSL."); } } res += to_precision_qualifiers_glsl(id); return res; } string CompilerGLSL::argument_decl(const SPIRFunction::Parameter &arg) { // glslangValidator seems to make all arguments pointer no matter what which is rather bizarre ... auto &type = expression_type(arg.id); const char *direction = ""; if (type.pointer) { if (arg.write_count && arg.read_count) direction = "inout "; else if (arg.write_count) direction = "out "; } return join(direction, to_qualifiers_glsl(arg.id), variable_decl(type, to_name(arg.id), arg.id)); } string CompilerGLSL::to_initializer_expression(const SPIRVariable &var) { return to_unpacked_expression(var.initializer); } string CompilerGLSL::to_zero_initialized_expression(uint32_t type_id) { #ifndef NDEBUG auto &type = get(type_id); assert(type.storage == StorageClassPrivate || type.storage == StorageClassFunction || type.storage == StorageClassGeneric); #endif uint32_t id = ir.increase_bound_by(1); ir.make_constant_null(id, type_id, false); return constant_expression(get(id)); } bool CompilerGLSL::type_can_zero_initialize(const SPIRType &type) const { if (type.pointer) return false; if (!type.array.empty() && options.flatten_multidimensional_arrays) return false; for (auto &literal : type.array_size_literal) if (!literal) return false; for (auto &memb : type.member_types) if (!type_can_zero_initialize(get(memb))) return false; return true; } string CompilerGLSL::variable_decl(const SPIRVariable &variable) { // Ignore the pointer type since GLSL doesn't have pointers. auto &type = get_variable_data_type(variable); if (type.pointer_depth > 1 && !backend.support_pointer_to_pointer) SPIRV_CROSS_THROW("Cannot declare pointer-to-pointer types."); auto res = join(to_qualifiers_glsl(variable.self), variable_decl(type, to_name(variable.self), variable.self)); if (variable.loop_variable && variable.static_expression) { uint32_t expr = variable.static_expression; if (ir.ids[expr].get_type() != TypeUndef) res += join(" = ", to_unpacked_expression(variable.static_expression)); else if (options.force_zero_initialized_variables && type_can_zero_initialize(type)) res += join(" = ", to_zero_initialized_expression(get_variable_data_type_id(variable))); } else if (variable.initializer && !variable_decl_is_remapped_storage(variable, StorageClassWorkgroup)) { uint32_t expr = variable.initializer; if (ir.ids[expr].get_type() != TypeUndef) res += join(" = ", to_initializer_expression(variable)); else if (options.force_zero_initialized_variables && type_can_zero_initialize(type)) res += join(" = ", to_zero_initialized_expression(get_variable_data_type_id(variable))); } return res; } const char *CompilerGLSL::to_pls_qualifiers_glsl(const SPIRVariable &variable) { auto &flags = get_decoration_bitset(variable.self); if (flags.get(DecorationRelaxedPrecision)) return "mediump "; else return "highp "; } string CompilerGLSL::pls_decl(const PlsRemap &var) { auto &variable = get(var.id); auto op_and_basetype = pls_format_to_basetype(var.format); SPIRType type { op_and_basetype.first }; type.basetype = op_and_basetype.second; auto vecsize = pls_format_to_components(var.format); if (vecsize > 1) { type.op = OpTypeVector; type.vecsize = vecsize; } return join(to_pls_layout(var.format), to_pls_qualifiers_glsl(variable), type_to_glsl(type), " ", to_name(variable.self)); } uint32_t CompilerGLSL::to_array_size_literal(const SPIRType &type) const { return to_array_size_literal(type, uint32_t(type.array.size() - 1)); } uint32_t CompilerGLSL::to_array_size_literal(const SPIRType &type, uint32_t index) const { assert(type.array.size() == type.array_size_literal.size()); if (type.array_size_literal[index]) { return type.array[index]; } else { // Use the default spec constant value. // This is the best we can do. return evaluate_constant_u32(type.array[index]); } } string CompilerGLSL::to_array_size(const SPIRType &type, uint32_t index) { assert(type.array.size() == type.array_size_literal.size()); auto &size = type.array[index]; if (!type.array_size_literal[index]) return to_expression(size); else if (size) return convert_to_string(size); else if (!backend.unsized_array_supported) { // For runtime-sized arrays, we can work around // lack of standard support for this by simply having // a single element array. // // Runtime length arrays must always be the last element // in an interface block. return "1"; } else return ""; } string CompilerGLSL::type_to_array_glsl(const SPIRType &type) { if (type.pointer && type.storage == StorageClassPhysicalStorageBufferEXT && type.basetype != SPIRType::Struct) { // We are using a wrapped pointer type, and we should not emit any array declarations here. return ""; } if (type.array.empty()) return ""; if (options.flatten_multidimensional_arrays) { string res; res += "["; for (auto i = uint32_t(type.array.size()); i; i--) { res += enclose_expression(to_array_size(type, i - 1)); if (i > 1) res += " * "; } res += "]"; return res; } else { if (type.array.size() > 1) { if (!options.es && options.version < 430) require_extension_internal("GL_ARB_arrays_of_arrays"); else if (options.es && options.version < 310) SPIRV_CROSS_THROW("Arrays of arrays not supported before ESSL version 310. " "Try using --flatten-multidimensional-arrays or set " "options.flatten_multidimensional_arrays to true."); } string res; for (auto i = uint32_t(type.array.size()); i; i--) { res += "["; res += to_array_size(type, i - 1); res += "]"; } return res; } } string CompilerGLSL::image_type_glsl(const SPIRType &type, uint32_t id) { auto &imagetype = get(type.image.type); string res; switch (imagetype.basetype) { case SPIRType::Int64: res = "i64"; require_extension_internal("GL_EXT_shader_image_int64"); break; case SPIRType::UInt64: res = "u64"; require_extension_internal("GL_EXT_shader_image_int64"); break; case SPIRType::Int: case SPIRType::Short: case SPIRType::SByte: res = "i"; break; case SPIRType::UInt: case SPIRType::UShort: case SPIRType::UByte: res = "u"; break; default: break; } // For half image types, we will force mediump for the sampler, and cast to f16 after any sampling operation. // We cannot express a true half texture type in GLSL. Neither for short integer formats for that matter. if (type.basetype == SPIRType::Image && type.image.dim == DimSubpassData && options.vulkan_semantics) return res + "subpassInput" + (type.image.ms ? "MS" : ""); else if (type.basetype == SPIRType::Image && type.image.dim == DimSubpassData && subpass_input_is_framebuffer_fetch(id)) { SPIRType sampled_type = get(type.image.type); sampled_type.vecsize = 4; return type_to_glsl(sampled_type); } // If we're emulating subpassInput with samplers, force sampler2D // so we don't have to specify format. if (type.basetype == SPIRType::Image && type.image.dim != DimSubpassData) { // Sampler buffers are always declared as samplerBuffer even though they might be separate images in the SPIR-V. if (type.image.dim == DimBuffer && type.image.sampled == 1) res += "sampler"; else res += type.image.sampled == 2 ? "image" : "texture"; } else res += "sampler"; switch (type.image.dim) { case Dim1D: // ES doesn't support 1D. Fake it with 2D. res += options.es ? "2D" : "1D"; break; case Dim2D: res += "2D"; break; case Dim3D: res += "3D"; break; case DimCube: res += "Cube"; break; case DimRect: if (options.es) SPIRV_CROSS_THROW("Rectangle textures are not supported on OpenGL ES."); if (is_legacy_desktop()) require_extension_internal("GL_ARB_texture_rectangle"); res += "2DRect"; break; case DimBuffer: if (options.es && options.version < 320) require_extension_internal("GL_EXT_texture_buffer"); else if (!options.es && options.version < 300) require_extension_internal("GL_EXT_texture_buffer_object"); res += "Buffer"; break; case DimSubpassData: res += "2D"; break; default: SPIRV_CROSS_THROW("Only 1D, 2D, 2DRect, 3D, Buffer, InputTarget and Cube textures supported."); } if (type.image.ms) res += "MS"; if (type.image.arrayed) { if (is_legacy_desktop()) require_extension_internal("GL_EXT_texture_array"); res += "Array"; } // "Shadow" state in GLSL only exists for samplers and combined image samplers. if (((type.basetype == SPIRType::SampledImage) || (type.basetype == SPIRType::Sampler)) && is_depth_image(type, id)) { res += "Shadow"; if (type.image.dim == DimCube && is_legacy()) { if (!options.es) require_extension_internal("GL_EXT_gpu_shader4"); else { require_extension_internal("GL_NV_shadow_samplers_cube"); res += "NV"; } } } return res; } string CompilerGLSL::type_to_glsl_constructor(const SPIRType &type) { if (backend.use_array_constructor && type.array.size() > 1) { if (options.flatten_multidimensional_arrays) SPIRV_CROSS_THROW("Cannot flatten constructors of multidimensional array constructors, " "e.g. float[][]()."); else if (!options.es && options.version < 430) require_extension_internal("GL_ARB_arrays_of_arrays"); else if (options.es && options.version < 310) SPIRV_CROSS_THROW("Arrays of arrays not supported before ESSL version 310."); } auto e = type_to_glsl(type); if (backend.use_array_constructor) { for (uint32_t i = 0; i < type.array.size(); i++) e += "[]"; } return e; } // The optional id parameter indicates the object whose type we are trying // to find the description for. It is optional. Most type descriptions do not // depend on a specific object's use of that type. string CompilerGLSL::type_to_glsl(const SPIRType &type, uint32_t id) { if (type.pointer && type.storage == StorageClassPhysicalStorageBufferEXT && type.basetype != SPIRType::Struct) { // Need to create a magic type name which compacts the entire type information. string name = type_to_glsl(get_pointee_type(type)); for (size_t i = 0; i < type.array.size(); i++) { if (type.array_size_literal[i]) name += join(type.array[i], "_"); else name += join("id", type.array[i], "_"); } name += "Pointer"; return name; } switch (type.basetype) { case SPIRType::Struct: // Need OpName lookup here to get a "sensible" name for a struct. if (backend.explicit_struct_type) return join("struct ", to_name(type.self)); else return to_name(type.self); case SPIRType::Image: case SPIRType::SampledImage: return image_type_glsl(type, id); case SPIRType::Sampler: // The depth field is set by calling code based on the variable ID of the sampler, effectively reintroducing // this distinction into the type system. return comparison_ids.count(id) ? "samplerShadow" : "sampler"; case SPIRType::AccelerationStructure: return ray_tracing_is_khr ? "accelerationStructureEXT" : "accelerationStructureNV"; case SPIRType::RayQuery: return "rayQueryEXT"; case SPIRType::Void: return "void"; default: break; } if (type.basetype == SPIRType::UInt && is_legacy()) { if (options.es) // HACK: spirv-cross changes bools into uints and generates code which compares them to // zero. Input code will have already been validated as not to have contained any uints, // so any remaining uints must in fact be bools. However, simply returning "bool" here // will result in invalid code. Instead, return an int. return backend.basic_int_type; else require_extension_internal("GL_EXT_gpu_shader4"); } if (type.basetype == SPIRType::AtomicCounter) { if (options.es && options.version < 310) SPIRV_CROSS_THROW("At least ESSL 3.10 required for atomic counters."); else if (!options.es && options.version < 420) require_extension_internal("GL_ARB_shader_atomic_counters"); } if (type.vecsize == 1 && type.columns == 1) // Scalar builtin { switch (type.basetype) { case SPIRType::Boolean: return "bool"; case SPIRType::SByte: return backend.basic_int8_type; case SPIRType::UByte: return backend.basic_uint8_type; case SPIRType::Short: return backend.basic_int16_type; case SPIRType::UShort: return backend.basic_uint16_type; case SPIRType::Int: return backend.basic_int_type; case SPIRType::UInt: return backend.basic_uint_type; case SPIRType::AtomicCounter: return "atomic_uint"; case SPIRType::Half: return "float16_t"; case SPIRType::Float: return "float"; case SPIRType::Double: return "double"; case SPIRType::Int64: return "int64_t"; case SPIRType::UInt64: return "uint64_t"; default: return "???"; } } else if (type.vecsize > 1 && type.columns == 1) // Vector builtin { switch (type.basetype) { case SPIRType::Boolean: return join("bvec", type.vecsize); case SPIRType::SByte: return join("i8vec", type.vecsize); case SPIRType::UByte: return join("u8vec", type.vecsize); case SPIRType::Short: return join("i16vec", type.vecsize); case SPIRType::UShort: return join("u16vec", type.vecsize); case SPIRType::Int: return join("ivec", type.vecsize); case SPIRType::UInt: return join("uvec", type.vecsize); case SPIRType::Half: return join("f16vec", type.vecsize); case SPIRType::Float: return join("vec", type.vecsize); case SPIRType::Double: return join("dvec", type.vecsize); case SPIRType::Int64: return join("i64vec", type.vecsize); case SPIRType::UInt64: return join("u64vec", type.vecsize); default: return "???"; } } else if (type.vecsize == type.columns) // Simple Matrix builtin { switch (type.basetype) { case SPIRType::Boolean: return join("bmat", type.vecsize); case SPIRType::Int: return join("imat", type.vecsize); case SPIRType::UInt: return join("umat", type.vecsize); case SPIRType::Half: return join("f16mat", type.vecsize); case SPIRType::Float: return join("mat", type.vecsize); case SPIRType::Double: return join("dmat", type.vecsize); // Matrix types not supported for int64/uint64. default: return "???"; } } else { switch (type.basetype) { case SPIRType::Boolean: return join("bmat", type.columns, "x", type.vecsize); case SPIRType::Int: return join("imat", type.columns, "x", type.vecsize); case SPIRType::UInt: return join("umat", type.columns, "x", type.vecsize); case SPIRType::Half: return join("f16mat", type.columns, "x", type.vecsize); case SPIRType::Float: return join("mat", type.columns, "x", type.vecsize); case SPIRType::Double: return join("dmat", type.columns, "x", type.vecsize); // Matrix types not supported for int64/uint64. default: return "???"; } } } void CompilerGLSL::add_variable(unordered_set &variables_primary, const unordered_set &variables_secondary, string &name) { if (name.empty()) return; ParsedIR::sanitize_underscores(name); if (ParsedIR::is_globally_reserved_identifier(name, true)) { name.clear(); return; } update_name_cache(variables_primary, variables_secondary, name); } void CompilerGLSL::add_local_variable_name(uint32_t id) { add_variable(local_variable_names, block_names, ir.meta[id].decoration.alias); } void CompilerGLSL::add_resource_name(uint32_t id) { add_variable(resource_names, block_names, ir.meta[id].decoration.alias); } void CompilerGLSL::add_header_line(const std::string &line) { header_lines.push_back(line); } bool CompilerGLSL::has_extension(const std::string &ext) const { auto itr = find(begin(forced_extensions), end(forced_extensions), ext); return itr != end(forced_extensions); } void CompilerGLSL::require_extension(const std::string &ext) { if (!has_extension(ext)) forced_extensions.push_back(ext); } const SmallVector &CompilerGLSL::get_required_extensions() const { return forced_extensions; } void CompilerGLSL::require_extension_internal(const string &ext) { if (backend.supports_extensions && !has_extension(ext)) { forced_extensions.push_back(ext); force_recompile(); } } void CompilerGLSL::flatten_buffer_block(VariableID id) { auto &var = get(id); auto &type = get(var.basetype); auto name = to_name(type.self, false); auto &flags = get_decoration_bitset(type.self); if (!type.array.empty()) SPIRV_CROSS_THROW(name + " is an array of UBOs."); if (type.basetype != SPIRType::Struct) SPIRV_CROSS_THROW(name + " is not a struct."); if (!flags.get(DecorationBlock)) SPIRV_CROSS_THROW(name + " is not a block."); if (type.member_types.empty()) SPIRV_CROSS_THROW(name + " is an empty struct."); flattened_buffer_blocks.insert(id); } bool CompilerGLSL::builtin_translates_to_nonarray(spv::BuiltIn /*builtin*/) const { return false; // GLSL itself does not need to translate array builtin types to non-array builtin types } bool CompilerGLSL::is_user_type_structured(uint32_t /*id*/) const { return false; // GLSL itself does not have structured user type, but HLSL does with StructuredBuffer and RWStructuredBuffer resources. } bool CompilerGLSL::check_atomic_image(uint32_t id) { auto &type = expression_type(id); if (type.storage == StorageClassImage) { if (options.es && options.version < 320) require_extension_internal("GL_OES_shader_image_atomic"); auto *var = maybe_get_backing_variable(id); if (var) { if (has_decoration(var->self, DecorationNonWritable) || has_decoration(var->self, DecorationNonReadable)) { unset_decoration(var->self, DecorationNonWritable); unset_decoration(var->self, DecorationNonReadable); force_recompile(); } } return true; } else return false; } void CompilerGLSL::add_function_overload(const SPIRFunction &func) { Hasher hasher; for (auto &arg : func.arguments) { // Parameters can vary with pointer type or not, // but that will not change the signature in GLSL/HLSL, // so strip the pointer type before hashing. uint32_t type_id = get_pointee_type_id(arg.type); auto &type = get(type_id); if (!combined_image_samplers.empty()) { // If we have combined image samplers, we cannot really trust the image and sampler arguments // we pass down to callees, because they may be shuffled around. // Ignore these arguments, to make sure that functions need to differ in some other way // to be considered different overloads. if (type.basetype == SPIRType::SampledImage || (type.basetype == SPIRType::Image && type.image.sampled == 1) || type.basetype == SPIRType::Sampler) { continue; } } hasher.u32(type_id); } uint64_t types_hash = hasher.get(); auto function_name = to_name(func.self); auto itr = function_overloads.find(function_name); if (itr != end(function_overloads)) { // There exists a function with this name already. auto &overloads = itr->second; if (overloads.count(types_hash) != 0) { // Overload conflict, assign a new name. add_resource_name(func.self); function_overloads[to_name(func.self)].insert(types_hash); } else { // Can reuse the name. overloads.insert(types_hash); } } else { // First time we see this function name. add_resource_name(func.self); function_overloads[to_name(func.self)].insert(types_hash); } } void CompilerGLSL::emit_function_prototype(SPIRFunction &func, const Bitset &return_flags) { if (func.self != ir.default_entry_point) add_function_overload(func); // Avoid shadow declarations. local_variable_names = resource_names; string decl; auto &type = get(func.return_type); decl += flags_to_qualifiers_glsl(type, return_flags); decl += type_to_glsl(type); decl += type_to_array_glsl(type); decl += " "; if (func.self == ir.default_entry_point) { // If we need complex fallback in GLSL, we just wrap main() in a function // and interlock the entire shader ... if (interlocked_is_complex) decl += "spvMainInterlockedBody"; else decl += "main"; processing_entry_point = true; } else decl += to_name(func.self); decl += "("; SmallVector arglist; for (auto &arg : func.arguments) { // Do not pass in separate images or samplers if we're remapping // to combined image samplers. if (skip_argument(arg.id)) continue; // Might change the variable name if it already exists in this function. // SPIRV OpName doesn't have any semantic effect, so it's valid for an implementation // to use same name for variables. // Since we want to make the GLSL debuggable and somewhat sane, use fallback names for variables which are duplicates. add_local_variable_name(arg.id); arglist.push_back(argument_decl(arg)); // Hold a pointer to the parameter so we can invalidate the readonly field if needed. auto *var = maybe_get(arg.id); if (var) var->parameter = &arg; } for (auto &arg : func.shadow_arguments) { // Might change the variable name if it already exists in this function. // SPIRV OpName doesn't have any semantic effect, so it's valid for an implementation // to use same name for variables. // Since we want to make the GLSL debuggable and somewhat sane, use fallback names for variables which are duplicates. add_local_variable_name(arg.id); arglist.push_back(argument_decl(arg)); // Hold a pointer to the parameter so we can invalidate the readonly field if needed. auto *var = maybe_get(arg.id); if (var) var->parameter = &arg; } decl += merge(arglist); decl += ")"; statement(decl); } void CompilerGLSL::emit_function(SPIRFunction &func, const Bitset &return_flags) { // Avoid potential cycles. if (func.active) return; func.active = true; // If we depend on a function, emit that function before we emit our own function. for (auto block : func.blocks) { auto &b = get(block); for (auto &i : b.ops) { auto ops = stream(i); auto op = static_cast(i.op); if (op == OpFunctionCall) { // Recursively emit functions which are called. uint32_t id = ops[2]; emit_function(get(id), ir.meta[ops[1]].decoration.decoration_flags); } } } if (func.entry_line.file_id != 0) emit_line_directive(func.entry_line.file_id, func.entry_line.line_literal); emit_function_prototype(func, return_flags); begin_scope(); if (func.self == ir.default_entry_point) emit_entry_point_declarations(); current_function = &func; auto &entry_block = get(func.entry_block); sort(begin(func.constant_arrays_needed_on_stack), end(func.constant_arrays_needed_on_stack)); for (auto &array : func.constant_arrays_needed_on_stack) { auto &c = get(array); auto &type = get(c.constant_type); statement(variable_decl(type, join("_", array, "_array_copy")), " = ", constant_expression(c), ";"); } for (auto &v : func.local_variables) { auto &var = get(v); var.deferred_declaration = false; if (variable_decl_is_remapped_storage(var, StorageClassWorkgroup)) { // Special variable type which cannot have initializer, // need to be declared as standalone variables. // Comes from MSL which can push global variables as local variables in main function. add_local_variable_name(var.self); statement(variable_decl(var), ";"); var.deferred_declaration = false; } else if (var.storage == StorageClassPrivate) { // These variables will not have had their CFG usage analyzed, so move it to the entry block. // Comes from MSL which can push global variables as local variables in main function. // We could just declare them right now, but we would miss out on an important initialization case which is // LUT declaration in MSL. // If we don't declare the variable when it is assigned we're forced to go through a helper function // which copies elements one by one. add_local_variable_name(var.self); if (var.initializer) { statement(variable_decl(var), ";"); var.deferred_declaration = false; } else { auto &dominated = entry_block.dominated_variables; if (find(begin(dominated), end(dominated), var.self) == end(dominated)) entry_block.dominated_variables.push_back(var.self); var.deferred_declaration = true; } } else if (var.storage == StorageClassFunction && var.remapped_variable && var.static_expression) { // No need to declare this variable, it has a static expression. var.deferred_declaration = false; } else if (expression_is_lvalue(v)) { add_local_variable_name(var.self); // Loop variables should never be declared early, they are explicitly emitted in a loop. if (var.initializer && !var.loop_variable) statement(variable_decl_function_local(var), ";"); else { // Don't declare variable until first use to declutter the GLSL output quite a lot. // If we don't touch the variable before first branch, // declare it then since we need variable declaration to be in top scope. var.deferred_declaration = true; } } else { // HACK: SPIR-V in older glslang output likes to use samplers and images as local variables, but GLSL does not allow this. // For these types (non-lvalue), we enforce forwarding through a shadowed variable. // This means that when we OpStore to these variables, we just write in the expression ID directly. // This breaks any kind of branching, since the variable must be statically assigned. // Branching on samplers and images would be pretty much impossible to fake in GLSL. var.statically_assigned = true; } var.loop_variable_enable = false; // Loop variables are never declared outside their for-loop, so block any implicit declaration. if (var.loop_variable) { var.deferred_declaration = false; // Need to reset the static expression so we can fallback to initializer if need be. var.static_expression = 0; } } // Enforce declaration order for regression testing purposes. for (auto &block_id : func.blocks) { auto &block = get(block_id); sort(begin(block.dominated_variables), end(block.dominated_variables)); } for (auto &line : current_function->fixup_hooks_in) line(); emit_block_chain(entry_block); end_scope(); processing_entry_point = false; statement(""); // Make sure deferred declaration state for local variables is cleared when we are done with function. // We risk declaring Private/Workgroup variables in places we are not supposed to otherwise. for (auto &v : func.local_variables) { auto &var = get(v); var.deferred_declaration = false; } } void CompilerGLSL::emit_fixup() { if (is_vertex_like_shader()) { if (options.vertex.fixup_clipspace) { const char *suffix = backend.float_literal_suffix ? "f" : ""; statement("gl_Position.z = 2.0", suffix, " * gl_Position.z - gl_Position.w;"); } if (options.vertex.flip_vert_y) statement("gl_Position.y = -gl_Position.y;"); } } void CompilerGLSL::flush_phi(BlockID from, BlockID to) { auto &child = get(to); if (child.ignore_phi_from_block == from) return; unordered_set temporary_phi_variables; for (auto itr = begin(child.phi_variables); itr != end(child.phi_variables); ++itr) { auto &phi = *itr; if (phi.parent == from) { auto &var = get(phi.function_variable); // A Phi variable might be a loop variable, so flush to static expression. if (var.loop_variable && !var.loop_variable_enable) var.static_expression = phi.local_variable; else { flush_variable_declaration(phi.function_variable); // Check if we are going to write to a Phi variable that another statement will read from // as part of another Phi node in our target block. // For this case, we will need to copy phi.function_variable to a temporary, and use that for future reads. // This is judged to be extremely rare, so deal with it here using a simple, but suboptimal algorithm. bool need_saved_temporary = find_if(itr + 1, end(child.phi_variables), [&](const SPIRBlock::Phi &future_phi) -> bool { return future_phi.local_variable == ID(phi.function_variable) && future_phi.parent == from; }) != end(child.phi_variables); if (need_saved_temporary) { // Need to make sure we declare the phi variable with a copy at the right scope. // We cannot safely declare a temporary here since we might be inside a continue block. if (!var.allocate_temporary_copy) { var.allocate_temporary_copy = true; force_recompile(); } statement("_", phi.function_variable, "_copy", " = ", to_name(phi.function_variable), ";"); temporary_phi_variables.insert(phi.function_variable); } // This might be called in continue block, so make sure we // use this to emit ESSL 1.0 compliant increments/decrements. auto lhs = to_expression(phi.function_variable); string rhs; if (temporary_phi_variables.count(phi.local_variable)) rhs = join("_", phi.local_variable, "_copy"); else rhs = to_pointer_expression(phi.local_variable); if (!optimize_read_modify_write(get(var.basetype), lhs, rhs)) statement(lhs, " = ", rhs, ";"); } register_write(phi.function_variable); } } } void CompilerGLSL::branch_to_continue(BlockID from, BlockID to) { auto &to_block = get(to); if (from == to) return; assert(is_continue(to)); if (to_block.complex_continue) { // Just emit the whole block chain as is. auto usage_counts = expression_usage_counts; emit_block_chain(to_block); // Expression usage counts are moot after returning from the continue block. expression_usage_counts = usage_counts; } else { auto &from_block = get(from); bool outside_control_flow = false; uint32_t loop_dominator = 0; // FIXME: Refactor this to not use the old loop_dominator tracking. if (from_block.merge_block) { // If we are a loop header, we don't set the loop dominator, // so just use "self" here. loop_dominator = from; } else if (from_block.loop_dominator != BlockID(SPIRBlock::NoDominator)) { loop_dominator = from_block.loop_dominator; } if (loop_dominator != 0) { auto &cfg = get_cfg_for_current_function(); // For non-complex continue blocks, we implicitly branch to the continue block // by having the continue block be part of the loop header in for (; ; continue-block). outside_control_flow = cfg.node_terminates_control_flow_in_sub_graph(loop_dominator, from); } // Some simplification for for-loops. We always end up with a useless continue; // statement since we branch to a loop block. // Walk the CFG, if we unconditionally execute the block calling continue assuming we're in the loop block, // we can avoid writing out an explicit continue statement. // Similar optimization to return statements if we know we're outside flow control. if (!outside_control_flow) statement("continue;"); } } void CompilerGLSL::branch(BlockID from, BlockID to) { flush_phi(from, to); flush_control_dependent_expressions(from); bool to_is_continue = is_continue(to); // This is only a continue if we branch to our loop dominator. if ((ir.block_meta[to] & ParsedIR::BLOCK_META_LOOP_HEADER_BIT) != 0 && get(from).loop_dominator == to) { // This can happen if we had a complex continue block which was emitted. // Once the continue block tries to branch to the loop header, just emit continue; // and end the chain here. statement("continue;"); } else if (from != to && is_break(to)) { // We cannot break to ourselves, so check explicitly for from != to. // This case can trigger if a loop header is all three of these things: // - Continue block // - Loop header // - Break merge target all at once ... // Very dirty workaround. // Switch constructs are able to break, but they cannot break out of a loop at the same time, // yet SPIR-V allows it. // Only sensible solution is to make a ladder variable, which we declare at the top of the switch block, // write to the ladder here, and defer the break. // The loop we're breaking out of must dominate the switch block, or there is no ladder breaking case. if (is_loop_break(to)) { for (size_t n = current_emitting_switch_stack.size(); n; n--) { auto *current_emitting_switch = current_emitting_switch_stack[n - 1]; if (current_emitting_switch && current_emitting_switch->loop_dominator != BlockID(SPIRBlock::NoDominator) && get(current_emitting_switch->loop_dominator).merge_block == to) { if (!current_emitting_switch->need_ladder_break) { force_recompile(); current_emitting_switch->need_ladder_break = true; } statement("_", current_emitting_switch->self, "_ladder_break = true;"); } else break; } } statement("break;"); } else if (to_is_continue || from == to) { // For from == to case can happen for a do-while loop which branches into itself. // We don't mark these cases as continue blocks, but the only possible way to branch into // ourselves is through means of continue blocks. // If we are merging to a continue block, there is no need to emit the block chain for continue here. // We can branch to the continue block after we merge execution. // Here we make use of structured control flow rules from spec: // 2.11: - the merge block declared by a header block cannot be a merge block declared by any other header block // - each header block must strictly dominate its merge block, unless the merge block is unreachable in the CFG // If we are branching to a merge block, we must be inside a construct which dominates the merge block. auto &block_meta = ir.block_meta[to]; bool branching_to_merge = (block_meta & (ParsedIR::BLOCK_META_SELECTION_MERGE_BIT | ParsedIR::BLOCK_META_MULTISELECT_MERGE_BIT | ParsedIR::BLOCK_META_LOOP_MERGE_BIT)) != 0; if (!to_is_continue || !branching_to_merge) branch_to_continue(from, to); } else if (!is_conditional(to)) emit_block_chain(get(to)); // It is important that we check for break before continue. // A block might serve two purposes, a break block for the inner scope, and // a continue block in the outer scope. // Inner scope always takes precedence. } void CompilerGLSL::branch(BlockID from, uint32_t cond, BlockID true_block, BlockID false_block) { auto &from_block = get(from); BlockID merge_block = from_block.merge == SPIRBlock::MergeSelection ? from_block.next_block : BlockID(0); // If we branch directly to our selection merge target, we don't need a code path. bool true_block_needs_code = true_block != merge_block || flush_phi_required(from, true_block); bool false_block_needs_code = false_block != merge_block || flush_phi_required(from, false_block); if (!true_block_needs_code && !false_block_needs_code) return; // We might have a loop merge here. Only consider selection flattening constructs. // Loop hints are handled explicitly elsewhere. if (from_block.hint == SPIRBlock::HintFlatten || from_block.hint == SPIRBlock::HintDontFlatten) emit_block_hints(from_block); if (true_block_needs_code) { statement("if (", to_expression(cond), ")"); begin_scope(); branch(from, true_block); end_scope(); if (false_block_needs_code) { statement("else"); begin_scope(); branch(from, false_block); end_scope(); } } else if (false_block_needs_code) { // Only need false path, use negative conditional. statement("if (!", to_enclosed_expression(cond), ")"); begin_scope(); branch(from, false_block); end_scope(); } } // FIXME: This currently cannot handle complex continue blocks // as in do-while. // This should be seen as a "trivial" continue block. string CompilerGLSL::emit_continue_block(uint32_t continue_block, bool follow_true_block, bool follow_false_block) { auto *block = &get(continue_block); // While emitting the continue block, declare_temporary will check this // if we have to emit temporaries. current_continue_block = block; SmallVector statements; // Capture all statements into our list. auto *old = redirect_statement; redirect_statement = &statements; // Stamp out all blocks one after each other. while ((ir.block_meta[block->self] & ParsedIR::BLOCK_META_LOOP_HEADER_BIT) == 0) { // Write out all instructions we have in this block. emit_block_instructions(*block); // For plain branchless for/while continue blocks. if (block->next_block) { flush_phi(continue_block, block->next_block); block = &get(block->next_block); } // For do while blocks. The last block will be a select block. else if (block->true_block && follow_true_block) { flush_phi(continue_block, block->true_block); block = &get(block->true_block); } else if (block->false_block && follow_false_block) { flush_phi(continue_block, block->false_block); block = &get(block->false_block); } else { SPIRV_CROSS_THROW("Invalid continue block detected!"); } } // Restore old pointer. redirect_statement = old; // Somewhat ugly, strip off the last ';' since we use ',' instead. // Ideally, we should select this behavior in statement(). for (auto &s : statements) { if (!s.empty() && s.back() == ';') s.erase(s.size() - 1, 1); } current_continue_block = nullptr; return merge(statements); } void CompilerGLSL::emit_while_loop_initializers(const SPIRBlock &block) { // While loops do not take initializers, so declare all of them outside. for (auto &loop_var : block.loop_variables) { auto &var = get(loop_var); statement(variable_decl(var), ";"); } } string CompilerGLSL::emit_for_loop_initializers(const SPIRBlock &block) { if (block.loop_variables.empty()) return ""; bool same_types = for_loop_initializers_are_same_type(block); // We can only declare for loop initializers if all variables are of same type. // If we cannot do this, declare individual variables before the loop header. // We might have a loop variable candidate which was not assigned to for some reason. uint32_t missing_initializers = 0; for (auto &variable : block.loop_variables) { uint32_t expr = get(variable).static_expression; // Sometimes loop variables are initialized with OpUndef, but we can just declare // a plain variable without initializer in this case. if (expr == 0 || ir.ids[expr].get_type() == TypeUndef) missing_initializers++; } if (block.loop_variables.size() == 1 && missing_initializers == 0) { return variable_decl(get(block.loop_variables.front())); } else if (!same_types || missing_initializers == uint32_t(block.loop_variables.size())) { for (auto &loop_var : block.loop_variables) statement(variable_decl(get(loop_var)), ";"); return ""; } else { // We have a mix of loop variables, either ones with a clear initializer, or ones without. // Separate the two streams. string expr; for (auto &loop_var : block.loop_variables) { uint32_t static_expr = get(loop_var).static_expression; if (static_expr == 0 || ir.ids[static_expr].get_type() == TypeUndef) { statement(variable_decl(get(loop_var)), ";"); } else { auto &var = get(loop_var); auto &type = get_variable_data_type(var); if (expr.empty()) { // For loop initializers are of the form (block.true_block), get(block.merge_block))) condition = join("!", enclose_expression(condition)); statement("while (", condition, ")"); break; } default: block.disable_block_optimization = true; force_recompile(); begin_scope(); // We'll see an end_scope() later. return false; } begin_scope(); return true; } else { block.disable_block_optimization = true; force_recompile(); begin_scope(); // We'll see an end_scope() later. return false; } } else if (method == SPIRBlock::MergeToDirectForLoop) { auto &child = get(block.next_block); // This block may be a dominating block, so make sure we flush undeclared variables before building the for loop header. flush_undeclared_variables(child); uint32_t current_count = statement_count; // If we're trying to create a true for loop, // we need to make sure that all opcodes before branch statement do not actually emit any code. // We can then take the condition expression and create a for (; cond ; ) { body; } structure instead. emit_block_instructions_with_masked_debug(child); bool condition_is_temporary = forced_temporaries.find(child.condition) == end(forced_temporaries); if (current_count == statement_count && condition_is_temporary) { uint32_t target_block = child.true_block; switch (continue_type) { case SPIRBlock::ForLoop: { // Important that we do this in this order because // emitting the continue block can invalidate the condition expression. auto initializer = emit_for_loop_initializers(block); auto condition = to_expression(child.condition); // Condition might have to be inverted. if (execution_is_noop(get(child.true_block), get(block.merge_block))) { condition = join("!", enclose_expression(condition)); target_block = child.false_block; } auto continue_block = emit_continue_block(block.continue_block, false, false); emit_block_hints(block); statement("for (", initializer, "; ", condition, "; ", continue_block, ")"); break; } case SPIRBlock::WhileLoop: { emit_while_loop_initializers(block); emit_block_hints(block); auto condition = to_expression(child.condition); // Condition might have to be inverted. if (execution_is_noop(get(child.true_block), get(block.merge_block))) { condition = join("!", enclose_expression(condition)); target_block = child.false_block; } statement("while (", condition, ")"); break; } default: block.disable_block_optimization = true; force_recompile(); begin_scope(); // We'll see an end_scope() later. return false; } begin_scope(); branch(child.self, target_block); return true; } else { block.disable_block_optimization = true; force_recompile(); begin_scope(); // We'll see an end_scope() later. return false; } } else return false; } void CompilerGLSL::flush_undeclared_variables(SPIRBlock &block) { for (auto &v : block.dominated_variables) flush_variable_declaration(v); } void CompilerGLSL::emit_hoisted_temporaries(SmallVector> &temporaries) { // If we need to force temporaries for certain IDs due to continue blocks, do it before starting loop header. // Need to sort these to ensure that reference output is stable. sort(begin(temporaries), end(temporaries), [](const pair &a, const pair &b) { return a.second < b.second; }); for (auto &tmp : temporaries) { auto &type = get(tmp.first); // There are some rare scenarios where we are asked to declare pointer types as hoisted temporaries. // This should be ignored unless we're doing actual variable pointers and backend supports it. // Access chains cannot normally be lowered to temporaries in GLSL and HLSL. if (type.pointer && !backend.native_pointers) continue; add_local_variable_name(tmp.second); auto &flags = get_decoration_bitset(tmp.second); // Not all targets support pointer literals, so don't bother with that case. string initializer; if (options.force_zero_initialized_variables && type_can_zero_initialize(type)) initializer = join(" = ", to_zero_initialized_expression(tmp.first)); statement(flags_to_qualifiers_glsl(type, flags), variable_decl(type, to_name(tmp.second)), initializer, ";"); hoisted_temporaries.insert(tmp.second); forced_temporaries.insert(tmp.second); // The temporary might be read from before it's assigned, set up the expression now. set(tmp.second, to_name(tmp.second), tmp.first, true); // If we have hoisted temporaries in multi-precision contexts, emit that here too ... // We will not be able to analyze hoisted-ness for dependent temporaries that we hallucinate here. auto mirrored_precision_itr = temporary_to_mirror_precision_alias.find(tmp.second); if (mirrored_precision_itr != temporary_to_mirror_precision_alias.end()) { uint32_t mirror_id = mirrored_precision_itr->second; auto &mirror_flags = get_decoration_bitset(mirror_id); statement(flags_to_qualifiers_glsl(type, mirror_flags), variable_decl(type, to_name(mirror_id)), initializer, ";"); // The temporary might be read from before it's assigned, set up the expression now. set(mirror_id, to_name(mirror_id), tmp.first, true); hoisted_temporaries.insert(mirror_id); } } } void CompilerGLSL::emit_block_chain(SPIRBlock &block) { bool select_branch_to_true_block = false; bool select_branch_to_false_block = false; bool skip_direct_branch = false; bool emitted_loop_header_variables = false; bool force_complex_continue_block = false; ValueSaver loop_level_saver(current_loop_level); if (block.merge == SPIRBlock::MergeLoop) add_loop_level(); // If we're emitting PHI variables with precision aliases, we have to emit them as hoisted temporaries. for (auto var_id : block.dominated_variables) { auto &var = get(var_id); if (var.phi_variable) { auto mirrored_precision_itr = temporary_to_mirror_precision_alias.find(var_id); if (mirrored_precision_itr != temporary_to_mirror_precision_alias.end() && find_if(block.declare_temporary.begin(), block.declare_temporary.end(), [mirrored_precision_itr](const std::pair &p) { return p.second == mirrored_precision_itr->second; }) == block.declare_temporary.end()) { block.declare_temporary.push_back({ var.basetype, mirrored_precision_itr->second }); } } } emit_hoisted_temporaries(block.declare_temporary); SPIRBlock::ContinueBlockType continue_type = SPIRBlock::ContinueNone; if (block.continue_block) { continue_type = continue_block_type(get(block.continue_block)); // If we know we cannot emit a loop, mark the block early as a complex loop so we don't force unnecessary recompiles. if (continue_type == SPIRBlock::ComplexLoop) block.complex_continue = true; } // If we have loop variables, stop masking out access to the variable now. for (auto var_id : block.loop_variables) { auto &var = get(var_id); var.loop_variable_enable = true; // We're not going to declare the variable directly, so emit a copy here. emit_variable_temporary_copies(var); } // Remember deferred declaration state. We will restore it before returning. SmallVector rearm_dominated_variables(block.dominated_variables.size()); for (size_t i = 0; i < block.dominated_variables.size(); i++) { uint32_t var_id = block.dominated_variables[i]; auto &var = get(var_id); rearm_dominated_variables[i] = var.deferred_declaration; } // This is the method often used by spirv-opt to implement loops. // The loop header goes straight into the continue block. // However, don't attempt this on ESSL 1.0, because if a loop variable is used in a continue block, // it *MUST* be used in the continue block. This loop method will not work. if (!is_legacy_es() && block_is_loop_candidate(block, SPIRBlock::MergeToSelectContinueForLoop)) { flush_undeclared_variables(block); if (attempt_emit_loop_header(block, SPIRBlock::MergeToSelectContinueForLoop)) { if (execution_is_noop(get(block.true_block), get(block.merge_block))) select_branch_to_false_block = true; else select_branch_to_true_block = true; emitted_loop_header_variables = true; force_complex_continue_block = true; } } // This is the older loop behavior in glslang which branches to loop body directly from the loop header. else if (block_is_loop_candidate(block, SPIRBlock::MergeToSelectForLoop)) { flush_undeclared_variables(block); if (attempt_emit_loop_header(block, SPIRBlock::MergeToSelectForLoop)) { // The body of while, is actually just the true (or false) block, so always branch there unconditionally. if (execution_is_noop(get(block.true_block), get(block.merge_block))) select_branch_to_false_block = true; else select_branch_to_true_block = true; emitted_loop_header_variables = true; } } // This is the newer loop behavior in glslang which branches from Loop header directly to // a new block, which in turn has a OpBranchSelection without a selection merge. else if (block_is_loop_candidate(block, SPIRBlock::MergeToDirectForLoop)) { flush_undeclared_variables(block); if (attempt_emit_loop_header(block, SPIRBlock::MergeToDirectForLoop)) { skip_direct_branch = true; emitted_loop_header_variables = true; } } else if (continue_type == SPIRBlock::DoWhileLoop) { flush_undeclared_variables(block); emit_while_loop_initializers(block); emitted_loop_header_variables = true; // We have some temporaries where the loop header is the dominator. // We risk a case where we have code like: // for (;;) { create-temporary; break; } consume-temporary; // so force-declare temporaries here. emit_hoisted_temporaries(block.potential_declare_temporary); statement("do"); begin_scope(); emit_block_instructions(block); } else if (block.merge == SPIRBlock::MergeLoop) { flush_undeclared_variables(block); emit_while_loop_initializers(block); emitted_loop_header_variables = true; // We have a generic loop without any distinguishable pattern like for, while or do while. get(block.continue_block).complex_continue = true; continue_type = SPIRBlock::ComplexLoop; // We have some temporaries where the loop header is the dominator. // We risk a case where we have code like: // for (;;) { create-temporary; break; } consume-temporary; // so force-declare temporaries here. emit_hoisted_temporaries(block.potential_declare_temporary); emit_block_hints(block); statement("for (;;)"); begin_scope(); emit_block_instructions(block); } else { emit_block_instructions(block); } // If we didn't successfully emit a loop header and we had loop variable candidates, we have a problem // as writes to said loop variables might have been masked out, we need a recompile. if (!emitted_loop_header_variables && !block.loop_variables.empty()) { force_recompile_guarantee_forward_progress(); for (auto var : block.loop_variables) get(var).loop_variable = false; block.loop_variables.clear(); } flush_undeclared_variables(block); bool emit_next_block = true; // Handle end of block. switch (block.terminator) { case SPIRBlock::Direct: // True when emitting complex continue block. if (block.loop_dominator == block.next_block) { branch(block.self, block.next_block); emit_next_block = false; } // True if MergeToDirectForLoop succeeded. else if (skip_direct_branch) emit_next_block = false; else if (is_continue(block.next_block) || is_break(block.next_block) || is_conditional(block.next_block)) { branch(block.self, block.next_block); emit_next_block = false; } break; case SPIRBlock::Select: // True if MergeToSelectForLoop or MergeToSelectContinueForLoop succeeded. if (select_branch_to_true_block) { if (force_complex_continue_block) { assert(block.true_block == block.continue_block); // We're going to emit a continue block directly here, so make sure it's marked as complex. auto &complex_continue = get(block.continue_block).complex_continue; bool old_complex = complex_continue; complex_continue = true; branch(block.self, block.true_block); complex_continue = old_complex; } else branch(block.self, block.true_block); } else if (select_branch_to_false_block) { if (force_complex_continue_block) { assert(block.false_block == block.continue_block); // We're going to emit a continue block directly here, so make sure it's marked as complex. auto &complex_continue = get(block.continue_block).complex_continue; bool old_complex = complex_continue; complex_continue = true; branch(block.self, block.false_block); complex_continue = old_complex; } else branch(block.self, block.false_block); } else branch(block.self, block.condition, block.true_block, block.false_block); break; case SPIRBlock::MultiSelect: { auto &type = expression_type(block.condition); bool unsigned_case = type.basetype == SPIRType::UInt || type.basetype == SPIRType::UShort || type.basetype == SPIRType::UByte || type.basetype == SPIRType::UInt64; if (block.merge == SPIRBlock::MergeNone) SPIRV_CROSS_THROW("Switch statement is not structured"); if (!backend.support_64bit_switch && (type.basetype == SPIRType::UInt64 || type.basetype == SPIRType::Int64)) { // SPIR-V spec suggests this is allowed, but we cannot support it in higher level languages. SPIRV_CROSS_THROW("Cannot use 64-bit switch selectors."); } const char *label_suffix = ""; if (type.basetype == SPIRType::UInt && backend.uint32_t_literal_suffix) label_suffix = "u"; else if (type.basetype == SPIRType::Int64 && backend.support_64bit_switch) label_suffix = "l"; else if (type.basetype == SPIRType::UInt64 && backend.support_64bit_switch) label_suffix = "ul"; else if (type.basetype == SPIRType::UShort) label_suffix = backend.uint16_t_literal_suffix; else if (type.basetype == SPIRType::Short) label_suffix = backend.int16_t_literal_suffix; current_emitting_switch_stack.push_back(&block); if (block.need_ladder_break) statement("bool _", block.self, "_ladder_break = false;"); // Find all unique case constructs. unordered_map> case_constructs; SmallVector block_declaration_order; SmallVector literals_to_merge; // If a switch case branches to the default block for some reason, we can just remove that literal from consideration // and let the default: block handle it. // 2.11 in SPIR-V spec states that for fall-through cases, there is a very strict declaration order which we can take advantage of here. // We only need to consider possible fallthrough if order[i] branches to order[i + 1]. auto &cases = get_case_list(block); for (auto &c : cases) { if (c.block != block.next_block && c.block != block.default_block) { if (!case_constructs.count(c.block)) block_declaration_order.push_back(c.block); case_constructs[c.block].push_back(c.value); } else if (c.block == block.next_block && block.default_block != block.next_block) { // We might have to flush phi inside specific case labels. // If we can piggyback on default:, do so instead. literals_to_merge.push_back(c.value); } } // Empty literal array -> default. if (block.default_block != block.next_block) { auto &default_block = get(block.default_block); // We need to slide in the default block somewhere in this chain // if there are fall-through scenarios since the default is declared separately in OpSwitch. // Only consider trivial fall-through cases here. size_t num_blocks = block_declaration_order.size(); bool injected_block = false; for (size_t i = 0; i < num_blocks; i++) { auto &case_block = get(block_declaration_order[i]); if (execution_is_direct_branch(case_block, default_block)) { // Fallthrough to default block, we must inject the default block here. block_declaration_order.insert(begin(block_declaration_order) + i + 1, block.default_block); injected_block = true; break; } else if (execution_is_direct_branch(default_block, case_block)) { // Default case is falling through to another case label, we must inject the default block here. block_declaration_order.insert(begin(block_declaration_order) + i, block.default_block); injected_block = true; break; } } // Order does not matter. if (!injected_block) block_declaration_order.push_back(block.default_block); else if (is_legacy_es()) SPIRV_CROSS_THROW("Default case label fallthrough to other case label is not supported in ESSL 1.0."); case_constructs[block.default_block] = {}; } size_t num_blocks = block_declaration_order.size(); const auto to_case_label = [](uint64_t literal, uint32_t width, bool is_unsigned_case) -> string { if (is_unsigned_case) return convert_to_string(literal); // For smaller cases, the literals are compiled as 32 bit wide // literals so we don't need to care for all sizes specifically. if (width <= 32) { return convert_to_string(int64_t(int32_t(literal))); } return convert_to_string(int64_t(literal)); }; const auto to_legacy_case_label = [&](uint32_t condition, const SmallVector &labels, const char *suffix) -> string { string ret; size_t count = labels.size(); for (size_t i = 0; i < count; i++) { if (i) ret += " || "; ret += join(count > 1 ? "(" : "", to_enclosed_expression(condition), " == ", labels[i], suffix, count > 1 ? ")" : ""); } return ret; }; // We need to deal with a complex scenario for OpPhi. If we have case-fallthrough and Phi in the picture, // we need to flush phi nodes outside the switch block in a branch, // and skip any Phi handling inside the case label to make fall-through work as expected. // This kind of code-gen is super awkward and it's a last resort. Normally we would want to handle this // inside the case label if at all possible. for (size_t i = 1; backend.support_case_fallthrough && i < num_blocks; i++) { if (flush_phi_required(block.self, block_declaration_order[i]) && flush_phi_required(block_declaration_order[i - 1], block_declaration_order[i])) { uint32_t target_block = block_declaration_order[i]; // Make sure we flush Phi, it might have been marked to be ignored earlier. get(target_block).ignore_phi_from_block = 0; auto &literals = case_constructs[target_block]; if (literals.empty()) { // Oh boy, gotta make a complete negative test instead! o.o // Find all possible literals that would *not* make us enter the default block. // If none of those literals match, we flush Phi ... SmallVector conditions; for (size_t j = 0; j < num_blocks; j++) { auto &negative_literals = case_constructs[block_declaration_order[j]]; for (auto &case_label : negative_literals) conditions.push_back(join(to_enclosed_expression(block.condition), " != ", to_case_label(case_label, type.width, unsigned_case))); } statement("if (", merge(conditions, " && "), ")"); begin_scope(); flush_phi(block.self, target_block); end_scope(); } else { SmallVector conditions; conditions.reserve(literals.size()); for (auto &case_label : literals) conditions.push_back(join(to_enclosed_expression(block.condition), " == ", to_case_label(case_label, type.width, unsigned_case))); statement("if (", merge(conditions, " || "), ")"); begin_scope(); flush_phi(block.self, target_block); end_scope(); } // Mark the block so that we don't flush Phi from header to case label. get(target_block).ignore_phi_from_block = block.self; } } // If there is only one default block, and no cases, this is a case where SPIRV-opt decided to emulate // non-structured exits with the help of a switch block. // This is buggy on FXC, so just emit the logical equivalent of a do { } while(false), which is more idiomatic. bool block_like_switch = cases.empty(); // If this is true, the switch is completely meaningless, and we should just avoid it. bool collapsed_switch = block_like_switch && block.default_block == block.next_block; if (!collapsed_switch) { if (block_like_switch || is_legacy_es()) { // ESSL 1.0 is not guaranteed to support do/while. if (is_legacy_es()) { uint32_t counter = statement_count; statement("for (int spvDummy", counter, " = 0; spvDummy", counter, " < 1; spvDummy", counter, "++)"); } else statement("do"); } else { emit_block_hints(block); statement("switch (", to_unpacked_expression(block.condition), ")"); } begin_scope(); } for (size_t i = 0; i < num_blocks; i++) { uint32_t target_block = block_declaration_order[i]; auto &literals = case_constructs[target_block]; if (literals.empty()) { // Default case. if (!block_like_switch) { if (is_legacy_es()) statement("else"); else statement("default:"); } } else { if (is_legacy_es()) { statement((i ? "else " : ""), "if (", to_legacy_case_label(block.condition, literals, label_suffix), ")"); } else { for (auto &case_literal : literals) { // The case label value must be sign-extended properly in SPIR-V, so we can assume 32-bit values here. statement("case ", to_case_label(case_literal, type.width, unsigned_case), label_suffix, ":"); } } } auto &case_block = get(target_block); if (backend.support_case_fallthrough && i + 1 < num_blocks && execution_is_direct_branch(case_block, get(block_declaration_order[i + 1]))) { // We will fall through here, so just terminate the block chain early. // We still need to deal with Phi potentially. // No need for a stack-like thing here since we only do fall-through when there is a // single trivial branch to fall-through target.. current_emitting_switch_fallthrough = true; } else current_emitting_switch_fallthrough = false; if (!block_like_switch) begin_scope(); branch(block.self, target_block); if (!block_like_switch) end_scope(); current_emitting_switch_fallthrough = false; } // Might still have to flush phi variables if we branch from loop header directly to merge target. // This is supposed to emit all cases where we branch from header to merge block directly. // There are two main scenarios where cannot rely on default fallthrough. // - There is an explicit default: label already. // In this case, literals_to_merge need to form their own "default" case, so that we avoid executing that block. // - Header -> Merge requires flushing PHI. In this case, we need to collect all cases and flush PHI there. bool header_merge_requires_phi = flush_phi_required(block.self, block.next_block); bool need_fallthrough_block = block.default_block == block.next_block || !literals_to_merge.empty(); if (!collapsed_switch && ((header_merge_requires_phi && need_fallthrough_block) || !literals_to_merge.empty())) { for (auto &case_literal : literals_to_merge) statement("case ", to_case_label(case_literal, type.width, unsigned_case), label_suffix, ":"); if (block.default_block == block.next_block) { if (is_legacy_es()) statement("else"); else statement("default:"); } begin_scope(); flush_phi(block.self, block.next_block); statement("break;"); end_scope(); } if (!collapsed_switch) { if (block_like_switch && !is_legacy_es()) end_scope_decl("while(false)"); else end_scope(); } else flush_phi(block.self, block.next_block); if (block.need_ladder_break) { statement("if (_", block.self, "_ladder_break)"); begin_scope(); statement("break;"); end_scope(); } current_emitting_switch_stack.pop_back(); break; } case SPIRBlock::Return: { for (auto &line : current_function->fixup_hooks_out) line(); if (processing_entry_point) emit_fixup(); auto &cfg = get_cfg_for_current_function(); if (block.return_value) { auto &type = expression_type(block.return_value); if (!type.array.empty() && !backend.can_return_array) { // If we cannot return arrays, we will have a special out argument we can write to instead. // The backend is responsible for setting this up, and redirection the return values as appropriate. if (ir.ids[block.return_value].get_type() != TypeUndef) { emit_array_copy("spvReturnValue", 0, block.return_value, StorageClassFunction, get_expression_effective_storage_class(block.return_value)); } if (!cfg.node_terminates_control_flow_in_sub_graph(current_function->entry_block, block.self) || block.loop_dominator != BlockID(SPIRBlock::NoDominator)) { statement("return;"); } } else { // OpReturnValue can return Undef, so don't emit anything for this case. if (ir.ids[block.return_value].get_type() != TypeUndef) statement("return ", to_unpacked_expression(block.return_value), ";"); } } else if (!cfg.node_terminates_control_flow_in_sub_graph(current_function->entry_block, block.self) || block.loop_dominator != BlockID(SPIRBlock::NoDominator)) { // If this block is the very final block and not called from control flow, // we do not need an explicit return which looks out of place. Just end the function here. // In the very weird case of for(;;) { return; } executing return is unconditional, // but we actually need a return here ... statement("return;"); } break; } // If the Kill is terminating a block with a (probably synthetic) return value, emit a return value statement. case SPIRBlock::Kill: statement(backend.discard_literal, ";"); if (block.return_value) statement("return ", to_unpacked_expression(block.return_value), ";"); break; case SPIRBlock::Unreachable: { // Avoid emitting false fallthrough, which can happen for // if (cond) break; else discard; inside a case label. // Discard is not always implementable as a terminator. auto &cfg = get_cfg_for_current_function(); bool inner_dominator_is_switch = false; ID id = block.self; while (id) { auto &iter_block = get(id); if (iter_block.terminator == SPIRBlock::MultiSelect || iter_block.merge == SPIRBlock::MergeLoop) { ID next_block = iter_block.merge == SPIRBlock::MergeLoop ? iter_block.merge_block : iter_block.next_block; bool outside_construct = next_block && cfg.find_common_dominator(next_block, block.self) == next_block; if (!outside_construct) { inner_dominator_is_switch = iter_block.terminator == SPIRBlock::MultiSelect; break; } } if (cfg.get_preceding_edges(id).empty()) break; id = cfg.get_immediate_dominator(id); } if (inner_dominator_is_switch) statement("break; // unreachable workaround"); emit_next_block = false; break; } case SPIRBlock::IgnoreIntersection: statement("ignoreIntersectionEXT;"); break; case SPIRBlock::TerminateRay: statement("terminateRayEXT;"); break; case SPIRBlock::EmitMeshTasks: emit_mesh_tasks(block); break; default: SPIRV_CROSS_THROW("Unimplemented block terminator."); } if (block.next_block && emit_next_block) { // If we hit this case, we're dealing with an unconditional branch, which means we will output // that block after this. If we had selection merge, we already flushed phi variables. if (block.merge != SPIRBlock::MergeSelection) { flush_phi(block.self, block.next_block); // For a direct branch, need to remember to invalidate expressions in the next linear block instead. get(block.next_block).invalidate_expressions = block.invalidate_expressions; } // For switch fallthrough cases, we terminate the chain here, but we still need to handle Phi. if (!current_emitting_switch_fallthrough) { // For merge selects we might have ignored the fact that a merge target // could have been a break; or continue; // We will need to deal with it here. if (is_loop_break(block.next_block)) { // Cannot check for just break, because switch statements will also use break. assert(block.merge == SPIRBlock::MergeSelection); statement("break;"); } else if (is_continue(block.next_block)) { assert(block.merge == SPIRBlock::MergeSelection); branch_to_continue(block.self, block.next_block); } else if (BlockID(block.self) != block.next_block) emit_block_chain(get(block.next_block)); } } if (block.merge == SPIRBlock::MergeLoop) { if (continue_type == SPIRBlock::DoWhileLoop) { // Make sure that we run the continue block to get the expressions set, but this // should become an empty string. // We have no fallbacks if we cannot forward everything to temporaries ... const auto &continue_block = get(block.continue_block); bool positive_test = execution_is_noop(get(continue_block.true_block), get(continue_block.loop_dominator)); uint32_t current_count = statement_count; auto statements = emit_continue_block(block.continue_block, positive_test, !positive_test); if (statement_count != current_count) { // The DoWhile block has side effects, force ComplexLoop pattern next pass. get(block.continue_block).complex_continue = true; force_recompile(); } // Might have to invert the do-while test here. auto condition = to_expression(continue_block.condition); if (!positive_test) condition = join("!", enclose_expression(condition)); end_scope_decl(join("while (", condition, ")")); } else end_scope(); loop_level_saver.release(); // We cannot break out of two loops at once, so don't check for break; here. // Using block.self as the "from" block isn't quite right, but it has the same scope // and dominance structure, so it's fine. if (is_continue(block.merge_block)) branch_to_continue(block.self, block.merge_block); else emit_block_chain(get(block.merge_block)); } // Forget about control dependent expressions now. block.invalidate_expressions.clear(); // After we return, we must be out of scope, so if we somehow have to re-emit this function, // re-declare variables if necessary. assert(rearm_dominated_variables.size() == block.dominated_variables.size()); for (size_t i = 0; i < block.dominated_variables.size(); i++) { uint32_t var = block.dominated_variables[i]; get(var).deferred_declaration = rearm_dominated_variables[i]; } // Just like for deferred declaration, we need to forget about loop variable enable // if our block chain is reinstantiated later. for (auto &var_id : block.loop_variables) get(var_id).loop_variable_enable = false; } void CompilerGLSL::begin_scope() { statement("{"); indent++; } void CompilerGLSL::end_scope() { if (!indent) SPIRV_CROSS_THROW("Popping empty indent stack."); indent--; statement("}"); } void CompilerGLSL::end_scope(const string &trailer) { if (!indent) SPIRV_CROSS_THROW("Popping empty indent stack."); indent--; statement("}", trailer); } void CompilerGLSL::end_scope_decl() { if (!indent) SPIRV_CROSS_THROW("Popping empty indent stack."); indent--; statement("};"); } void CompilerGLSL::end_scope_decl(const string &decl) { if (!indent) SPIRV_CROSS_THROW("Popping empty indent stack."); indent--; statement("} ", decl, ";"); } void CompilerGLSL::check_function_call_constraints(const uint32_t *args, uint32_t length) { // If our variable is remapped, and we rely on type-remapping information as // well, then we cannot pass the variable as a function parameter. // Fixing this is non-trivial without stamping out variants of the same function, // so for now warn about this and suggest workarounds instead. for (uint32_t i = 0; i < length; i++) { auto *var = maybe_get(args[i]); if (!var || !var->remapped_variable) continue; auto &type = get(var->basetype); if (type.basetype == SPIRType::Image && type.image.dim == DimSubpassData) { SPIRV_CROSS_THROW("Tried passing a remapped subpassInput variable to a function. " "This will not work correctly because type-remapping information is lost. " "To workaround, please consider not passing the subpass input as a function parameter, " "or use in/out variables instead which do not need type remapping information."); } } } const Instruction *CompilerGLSL::get_next_instruction_in_block(const Instruction &instr) { // FIXME: This is kind of hacky. There should be a cleaner way. auto offset = uint32_t(&instr - current_emitting_block->ops.data()); if ((offset + 1) < current_emitting_block->ops.size()) return ¤t_emitting_block->ops[offset + 1]; else return nullptr; } uint32_t CompilerGLSL::mask_relevant_memory_semantics(uint32_t semantics) { return semantics & (MemorySemanticsAtomicCounterMemoryMask | MemorySemanticsImageMemoryMask | MemorySemanticsWorkgroupMemoryMask | MemorySemanticsUniformMemoryMask | MemorySemanticsCrossWorkgroupMemoryMask | MemorySemanticsSubgroupMemoryMask); } bool CompilerGLSL::emit_array_copy(const char *expr, uint32_t lhs_id, uint32_t rhs_id, StorageClass, StorageClass) { string lhs; if (expr) lhs = expr; else lhs = to_expression(lhs_id); statement(lhs, " = ", to_expression(rhs_id), ";"); return true; } bool CompilerGLSL::unroll_array_to_complex_store(uint32_t target_id, uint32_t source_id) { if (!backend.force_gl_in_out_block) return false; // This path is only relevant for GL backends. auto *var = maybe_get(target_id); if (!var || var->storage != StorageClassOutput) return false; if (!is_builtin_variable(*var) || BuiltIn(get_decoration(var->self, DecorationBuiltIn)) != BuiltInSampleMask) return false; auto &type = expression_type(source_id); string array_expr; if (type.array_size_literal.back()) { array_expr = convert_to_string(type.array.back()); if (type.array.back() == 0) SPIRV_CROSS_THROW("Cannot unroll an array copy from unsized array."); } else array_expr = to_expression(type.array.back()); SPIRType target_type { OpTypeInt }; target_type.basetype = SPIRType::Int; statement("for (int i = 0; i < int(", array_expr, "); i++)"); begin_scope(); statement(to_expression(target_id), "[i] = ", bitcast_expression(target_type, type.basetype, join(to_expression(source_id), "[i]")), ";"); end_scope(); return true; } void CompilerGLSL::unroll_array_from_complex_load(uint32_t target_id, uint32_t source_id, std::string &expr) { if (!backend.force_gl_in_out_block) return; // This path is only relevant for GL backends. auto *var = maybe_get(source_id); if (!var) return; if (var->storage != StorageClassInput && var->storage != StorageClassOutput) return; auto &type = get_variable_data_type(*var); if (type.array.empty()) return; auto builtin = BuiltIn(get_decoration(var->self, DecorationBuiltIn)); bool is_builtin = is_builtin_variable(*var) && (builtin == BuiltInPointSize || builtin == BuiltInPosition || builtin == BuiltInSampleMask); bool is_tess = is_tessellation_shader(); bool is_patch = has_decoration(var->self, DecorationPatch); bool is_sample_mask = is_builtin && builtin == BuiltInSampleMask; // Tessellation input arrays are special in that they are unsized, so we cannot directly copy from it. // We must unroll the array load. // For builtins, we couldn't catch this case normally, // because this is resolved in the OpAccessChain in most cases. // If we load the entire array, we have no choice but to unroll here. if (!is_patch && (is_builtin || is_tess)) { auto new_expr = join("_", target_id, "_unrolled"); statement(variable_decl(type, new_expr, target_id), ";"); string array_expr; if (type.array_size_literal.back()) { array_expr = convert_to_string(type.array.back()); if (type.array.back() == 0) SPIRV_CROSS_THROW("Cannot unroll an array copy from unsized array."); } else array_expr = to_expression(type.array.back()); // The array size might be a specialization constant, so use a for-loop instead. statement("for (int i = 0; i < int(", array_expr, "); i++)"); begin_scope(); if (is_builtin && !is_sample_mask) statement(new_expr, "[i] = gl_in[i].", expr, ";"); else if (is_sample_mask) { SPIRType target_type { OpTypeInt }; target_type.basetype = SPIRType::Int; statement(new_expr, "[i] = ", bitcast_expression(target_type, type.basetype, join(expr, "[i]")), ";"); } else statement(new_expr, "[i] = ", expr, "[i];"); end_scope(); expr = std::move(new_expr); } } void CompilerGLSL::cast_from_variable_load(uint32_t source_id, std::string &expr, const SPIRType &expr_type) { // We will handle array cases elsewhere. if (!expr_type.array.empty()) return; auto *var = maybe_get_backing_variable(source_id); if (var) source_id = var->self; // Only interested in standalone builtin variables. if (!has_decoration(source_id, DecorationBuiltIn)) { // Except for int attributes in legacy GLSL, which are cast from float. if (is_legacy() && expr_type.basetype == SPIRType::Int && var && var->storage == StorageClassInput) expr = join(type_to_glsl(expr_type), "(", expr, ")"); return; } auto builtin = static_cast(get_decoration(source_id, DecorationBuiltIn)); auto expected_type = expr_type.basetype; // TODO: Fill in for more builtins. switch (builtin) { case BuiltInLayer: case BuiltInPrimitiveId: case BuiltInViewportIndex: case BuiltInInstanceId: case BuiltInInstanceIndex: case BuiltInVertexId: case BuiltInVertexIndex: case BuiltInSampleId: case BuiltInBaseVertex: case BuiltInBaseInstance: case BuiltInDrawIndex: case BuiltInFragStencilRefEXT: case BuiltInInstanceCustomIndexNV: case BuiltInSampleMask: case BuiltInPrimitiveShadingRateKHR: case BuiltInShadingRateKHR: expected_type = SPIRType::Int; break; case BuiltInGlobalInvocationId: case BuiltInLocalInvocationId: case BuiltInWorkgroupId: case BuiltInLocalInvocationIndex: case BuiltInWorkgroupSize: case BuiltInNumWorkgroups: case BuiltInIncomingRayFlagsNV: case BuiltInLaunchIdNV: case BuiltInLaunchSizeNV: case BuiltInPrimitiveTriangleIndicesEXT: case BuiltInPrimitiveLineIndicesEXT: case BuiltInPrimitivePointIndicesEXT: expected_type = SPIRType::UInt; break; default: break; } if (expected_type != expr_type.basetype) expr = bitcast_expression(expr_type, expected_type, expr); } SPIRType::BaseType CompilerGLSL::get_builtin_basetype(BuiltIn builtin, SPIRType::BaseType default_type) { // TODO: Fill in for more builtins. switch (builtin) { case BuiltInLayer: case BuiltInPrimitiveId: case BuiltInViewportIndex: case BuiltInFragStencilRefEXT: case BuiltInSampleMask: case BuiltInPrimitiveShadingRateKHR: case BuiltInShadingRateKHR: return SPIRType::Int; default: return default_type; } } void CompilerGLSL::cast_to_variable_store(uint32_t target_id, std::string &expr, const SPIRType &expr_type) { auto *var = maybe_get_backing_variable(target_id); if (var) target_id = var->self; // Only interested in standalone builtin variables. if (!has_decoration(target_id, DecorationBuiltIn)) return; auto builtin = static_cast(get_decoration(target_id, DecorationBuiltIn)); auto expected_type = get_builtin_basetype(builtin, expr_type.basetype); if (expected_type != expr_type.basetype) { auto type = expr_type; type.basetype = expected_type; expr = bitcast_expression(type, expr_type.basetype, expr); } } void CompilerGLSL::convert_non_uniform_expression(string &expr, uint32_t ptr_id) { if (*backend.nonuniform_qualifier == '\0') return; auto *var = maybe_get_backing_variable(ptr_id); if (!var) return; if (var->storage != StorageClassUniformConstant && var->storage != StorageClassStorageBuffer && var->storage != StorageClassUniform) return; auto &backing_type = get(var->basetype); if (backing_type.array.empty()) return; // If we get here, we know we're accessing an arrayed resource which // might require nonuniform qualifier. auto start_array_index = expr.find_first_of('['); if (start_array_index == string::npos) return; // We've opened a bracket, track expressions until we can close the bracket. // This must be our resource index. size_t end_array_index = string::npos; unsigned bracket_count = 1; for (size_t index = start_array_index + 1; index < expr.size(); index++) { if (expr[index] == ']') { if (--bracket_count == 0) { end_array_index = index; break; } } else if (expr[index] == '[') bracket_count++; } assert(bracket_count == 0); // Doesn't really make sense to declare a non-arrayed image with nonuniformEXT, but there's // nothing we can do here to express that. if (start_array_index == string::npos || end_array_index == string::npos || end_array_index < start_array_index) return; start_array_index++; expr = join(expr.substr(0, start_array_index), backend.nonuniform_qualifier, "(", expr.substr(start_array_index, end_array_index - start_array_index), ")", expr.substr(end_array_index, string::npos)); } void CompilerGLSL::emit_block_hints(const SPIRBlock &block) { if ((options.es && options.version < 310) || (!options.es && options.version < 140)) return; switch (block.hint) { case SPIRBlock::HintFlatten: require_extension_internal("GL_EXT_control_flow_attributes"); statement("SPIRV_CROSS_FLATTEN"); break; case SPIRBlock::HintDontFlatten: require_extension_internal("GL_EXT_control_flow_attributes"); statement("SPIRV_CROSS_BRANCH"); break; case SPIRBlock::HintUnroll: require_extension_internal("GL_EXT_control_flow_attributes"); statement("SPIRV_CROSS_UNROLL"); break; case SPIRBlock::HintDontUnroll: require_extension_internal("GL_EXT_control_flow_attributes"); statement("SPIRV_CROSS_LOOP"); break; default: break; } } void CompilerGLSL::preserve_alias_on_reset(uint32_t id) { preserved_aliases[id] = get_name(id); } void CompilerGLSL::reset_name_caches() { for (auto &preserved : preserved_aliases) set_name(preserved.first, preserved.second); preserved_aliases.clear(); resource_names.clear(); block_input_names.clear(); block_output_names.clear(); block_ubo_names.clear(); block_ssbo_names.clear(); block_names.clear(); function_overloads.clear(); } void CompilerGLSL::fixup_anonymous_struct_names(std::unordered_set &visited, const SPIRType &type) { if (visited.count(type.self)) return; visited.insert(type.self); for (uint32_t i = 0; i < uint32_t(type.member_types.size()); i++) { auto &mbr_type = get(type.member_types[i]); if (mbr_type.basetype == SPIRType::Struct) { // If there are multiple aliases, the output might be somewhat unpredictable, // but the only real alternative in that case is to do nothing, which isn't any better. // This check should be fine in practice. if (get_name(mbr_type.self).empty() && !get_member_name(type.self, i).empty()) { auto anon_name = join("anon_", get_member_name(type.self, i)); ParsedIR::sanitize_underscores(anon_name); set_name(mbr_type.self, anon_name); } fixup_anonymous_struct_names(visited, mbr_type); } } } void CompilerGLSL::fixup_anonymous_struct_names() { // HLSL codegen can often end up emitting anonymous structs inside blocks, which // breaks GL linking since all names must match ... // Try to emit sensible code, so attempt to find such structs and emit anon_$member. // Breaks exponential explosion with weird type trees. std::unordered_set visited; ir.for_each_typed_id([&](uint32_t, SPIRType &type) { if (type.basetype == SPIRType::Struct && (has_decoration(type.self, DecorationBlock) || has_decoration(type.self, DecorationBufferBlock))) { fixup_anonymous_struct_names(visited, type); } }); } void CompilerGLSL::fixup_type_alias() { // Due to how some backends work, the "master" type of type_alias must be a block-like type if it exists. ir.for_each_typed_id([&](uint32_t self, SPIRType &type) { if (!type.type_alias) return; if (has_decoration(type.self, DecorationBlock) || has_decoration(type.self, DecorationBufferBlock)) { // Top-level block types should never alias anything else. type.type_alias = 0; } else if (type_is_block_like(type) && type.self == ID(self)) { // A block-like type is any type which contains Offset decoration, but not top-level blocks, // i.e. blocks which are placed inside buffers. // Become the master. ir.for_each_typed_id([&](uint32_t other_id, SPIRType &other_type) { if (other_id == self) return; if (other_type.type_alias == type.type_alias) other_type.type_alias = self; }); this->get(type.type_alias).type_alias = self; type.type_alias = 0; } }); } void CompilerGLSL::reorder_type_alias() { // Reorder declaration of types so that the master of the type alias is always emitted first. // We need this in case a type B depends on type A (A must come before in the vector), but A is an alias of a type Abuffer, which // means declaration of A doesn't happen (yet), and order would be B, ABuffer and not ABuffer, B. Fix this up here. auto loop_lock = ir.create_loop_hard_lock(); auto &type_ids = ir.ids_for_type[TypeType]; for (auto alias_itr = begin(type_ids); alias_itr != end(type_ids); ++alias_itr) { auto &type = get(*alias_itr); if (type.type_alias != TypeID(0) && !has_extended_decoration(type.type_alias, SPIRVCrossDecorationBufferBlockRepacked)) { // We will skip declaring this type, so make sure the type_alias type comes before. auto master_itr = find(begin(type_ids), end(type_ids), ID(type.type_alias)); assert(master_itr != end(type_ids)); if (alias_itr < master_itr) { // Must also swap the type order for the constant-type joined array. auto &joined_types = ir.ids_for_constant_undef_or_type; auto alt_alias_itr = find(begin(joined_types), end(joined_types), *alias_itr); auto alt_master_itr = find(begin(joined_types), end(joined_types), *master_itr); assert(alt_alias_itr != end(joined_types)); assert(alt_master_itr != end(joined_types)); swap(*alias_itr, *master_itr); swap(*alt_alias_itr, *alt_master_itr); } } } } void CompilerGLSL::emit_line_directive(uint32_t file_id, uint32_t line_literal) { // If we are redirecting statements, ignore the line directive. // Common case here is continue blocks. if (redirect_statement) return; // If we're emitting code in a sensitive context such as condition blocks in for loops, don't emit // any line directives, because it's not possible. if (block_debug_directives) return; if (options.emit_line_directives) { require_extension_internal("GL_GOOGLE_cpp_style_line_directive"); statement_no_indent("#line ", line_literal, " \"", get(file_id).str, "\""); } } void CompilerGLSL::emit_copy_logical_type(uint32_t lhs_id, uint32_t lhs_type_id, uint32_t rhs_id, uint32_t rhs_type_id, SmallVector chain) { // Fully unroll all member/array indices one by one. auto &lhs_type = get(lhs_type_id); auto &rhs_type = get(rhs_type_id); if (!lhs_type.array.empty()) { // Could use a loop here to support specialization constants, but it gets rather complicated with nested array types, // and this is a rather obscure opcode anyways, keep it simple unless we are forced to. uint32_t array_size = to_array_size_literal(lhs_type); chain.push_back(0); for (uint32_t i = 0; i < array_size; i++) { chain.back() = i; emit_copy_logical_type(lhs_id, lhs_type.parent_type, rhs_id, rhs_type.parent_type, chain); } } else if (lhs_type.basetype == SPIRType::Struct) { chain.push_back(0); uint32_t member_count = uint32_t(lhs_type.member_types.size()); for (uint32_t i = 0; i < member_count; i++) { chain.back() = i; emit_copy_logical_type(lhs_id, lhs_type.member_types[i], rhs_id, rhs_type.member_types[i], chain); } } else { // Need to handle unpack/packing fixups since this can differ wildly between the logical types, // particularly in MSL. // To deal with this, we emit access chains and go through emit_store_statement // to deal with all the special cases we can encounter. AccessChainMeta lhs_meta, rhs_meta; auto lhs = access_chain_internal(lhs_id, chain.data(), uint32_t(chain.size()), ACCESS_CHAIN_INDEX_IS_LITERAL_BIT, &lhs_meta); auto rhs = access_chain_internal(rhs_id, chain.data(), uint32_t(chain.size()), ACCESS_CHAIN_INDEX_IS_LITERAL_BIT, &rhs_meta); uint32_t id = ir.increase_bound_by(2); lhs_id = id; rhs_id = id + 1; { auto &lhs_expr = set(lhs_id, std::move(lhs), lhs_type_id, true); lhs_expr.need_transpose = lhs_meta.need_transpose; if (lhs_meta.storage_is_packed) set_extended_decoration(lhs_id, SPIRVCrossDecorationPhysicalTypePacked); if (lhs_meta.storage_physical_type != 0) set_extended_decoration(lhs_id, SPIRVCrossDecorationPhysicalTypeID, lhs_meta.storage_physical_type); forwarded_temporaries.insert(lhs_id); suppressed_usage_tracking.insert(lhs_id); } { auto &rhs_expr = set(rhs_id, std::move(rhs), rhs_type_id, true); rhs_expr.need_transpose = rhs_meta.need_transpose; if (rhs_meta.storage_is_packed) set_extended_decoration(rhs_id, SPIRVCrossDecorationPhysicalTypePacked); if (rhs_meta.storage_physical_type != 0) set_extended_decoration(rhs_id, SPIRVCrossDecorationPhysicalTypeID, rhs_meta.storage_physical_type); forwarded_temporaries.insert(rhs_id); suppressed_usage_tracking.insert(rhs_id); } emit_store_statement(lhs_id, rhs_id); } } bool CompilerGLSL::subpass_input_is_framebuffer_fetch(uint32_t id) const { if (!has_decoration(id, DecorationInputAttachmentIndex)) return false; uint32_t input_attachment_index = get_decoration(id, DecorationInputAttachmentIndex); for (auto &remap : subpass_to_framebuffer_fetch_attachment) if (remap.first == input_attachment_index) return true; return false; } const SPIRVariable *CompilerGLSL::find_subpass_input_by_attachment_index(uint32_t index) const { const SPIRVariable *ret = nullptr; ir.for_each_typed_id([&](uint32_t, const SPIRVariable &var) { if (has_decoration(var.self, DecorationInputAttachmentIndex) && get_decoration(var.self, DecorationInputAttachmentIndex) == index) { ret = &var; } }); return ret; } const SPIRVariable *CompilerGLSL::find_color_output_by_location(uint32_t location) const { const SPIRVariable *ret = nullptr; ir.for_each_typed_id([&](uint32_t, const SPIRVariable &var) { if (var.storage == StorageClassOutput && get_decoration(var.self, DecorationLocation) == location) ret = &var; }); return ret; } void CompilerGLSL::emit_inout_fragment_outputs_copy_to_subpass_inputs() { for (auto &remap : subpass_to_framebuffer_fetch_attachment) { auto *subpass_var = find_subpass_input_by_attachment_index(remap.first); auto *output_var = find_color_output_by_location(remap.second); if (!subpass_var) continue; if (!output_var) SPIRV_CROSS_THROW("Need to declare the corresponding fragment output variable to be able " "to read from it."); if (is_array(get(output_var->basetype))) SPIRV_CROSS_THROW("Cannot use GL_EXT_shader_framebuffer_fetch with arrays of color outputs."); auto &func = get(get_entry_point().self); func.fixup_hooks_in.push_back([=]() { if (is_legacy()) { statement(to_expression(subpass_var->self), " = ", "gl_LastFragData[", get_decoration(output_var->self, DecorationLocation), "];"); } else { uint32_t num_rt_components = this->get(output_var->basetype).vecsize; statement(to_expression(subpass_var->self), vector_swizzle(num_rt_components, 0), " = ", to_expression(output_var->self), ";"); } }); } } bool CompilerGLSL::variable_is_depth_or_compare(VariableID id) const { return is_depth_image(get(get(id).basetype), id); } const char *CompilerGLSL::ShaderSubgroupSupportHelper::get_extension_name(Candidate c) { static const char *const retval[CandidateCount] = { "GL_KHR_shader_subgroup_ballot", "GL_KHR_shader_subgroup_basic", "GL_KHR_shader_subgroup_vote", "GL_KHR_shader_subgroup_arithmetic", "GL_NV_gpu_shader_5", "GL_NV_shader_thread_group", "GL_NV_shader_thread_shuffle", "GL_ARB_shader_ballot", "GL_ARB_shader_group_vote", "GL_AMD_gcn_shader" }; return retval[c]; } SmallVector CompilerGLSL::ShaderSubgroupSupportHelper::get_extra_required_extension_names(Candidate c) { switch (c) { case ARB_shader_ballot: return { "GL_ARB_shader_int64" }; case AMD_gcn_shader: return { "GL_AMD_gpu_shader_int64", "GL_NV_gpu_shader5" }; default: return {}; } } const char *CompilerGLSL::ShaderSubgroupSupportHelper::get_extra_required_extension_predicate(Candidate c) { switch (c) { case ARB_shader_ballot: return "defined(GL_ARB_shader_int64)"; case AMD_gcn_shader: return "(defined(GL_AMD_gpu_shader_int64) || defined(GL_NV_gpu_shader5))"; default: return ""; } } CompilerGLSL::ShaderSubgroupSupportHelper::FeatureVector CompilerGLSL::ShaderSubgroupSupportHelper:: get_feature_dependencies(Feature feature) { switch (feature) { case SubgroupAllEqualT: return { SubgroupBroadcast_First, SubgroupAll_Any_AllEqualBool }; case SubgroupElect: return { SubgroupBallotFindLSB_MSB, SubgroupBallot, SubgroupInvocationID }; case SubgroupInverseBallot_InclBitCount_ExclBitCout: return { SubgroupMask }; case SubgroupBallotBitCount: return { SubgroupBallot }; case SubgroupArithmeticIAddReduce: case SubgroupArithmeticIAddInclusiveScan: case SubgroupArithmeticFAddReduce: case SubgroupArithmeticFAddInclusiveScan: case SubgroupArithmeticIMulReduce: case SubgroupArithmeticIMulInclusiveScan: case SubgroupArithmeticFMulReduce: case SubgroupArithmeticFMulInclusiveScan: return { SubgroupSize, SubgroupBallot, SubgroupBallotBitCount, SubgroupMask, SubgroupBallotBitExtract }; case SubgroupArithmeticIAddExclusiveScan: case SubgroupArithmeticFAddExclusiveScan: case SubgroupArithmeticIMulExclusiveScan: case SubgroupArithmeticFMulExclusiveScan: return { SubgroupSize, SubgroupBallot, SubgroupBallotBitCount, SubgroupMask, SubgroupElect, SubgroupBallotBitExtract }; default: return {}; } } CompilerGLSL::ShaderSubgroupSupportHelper::FeatureMask CompilerGLSL::ShaderSubgroupSupportHelper:: get_feature_dependency_mask(Feature feature) { return build_mask(get_feature_dependencies(feature)); } bool CompilerGLSL::ShaderSubgroupSupportHelper::can_feature_be_implemented_without_extensions(Feature feature) { static const bool retval[FeatureCount] = { false, false, false, false, false, false, true, // SubgroupBalloFindLSB_MSB false, false, false, false, true, // SubgroupMemBarrier - replaced with workgroup memory barriers false, false, true, false, false, false, false, false, false, false, // iadd, fadd false, false, false, false, false, false, // imul , fmul }; return retval[feature]; } CompilerGLSL::ShaderSubgroupSupportHelper::Candidate CompilerGLSL::ShaderSubgroupSupportHelper:: get_KHR_extension_for_feature(Feature feature) { static const Candidate extensions[FeatureCount] = { KHR_shader_subgroup_ballot, KHR_shader_subgroup_basic, KHR_shader_subgroup_basic, KHR_shader_subgroup_basic, KHR_shader_subgroup_basic, KHR_shader_subgroup_ballot, KHR_shader_subgroup_ballot, KHR_shader_subgroup_vote, KHR_shader_subgroup_vote, KHR_shader_subgroup_basic, KHR_shader_subgroup_basic, KHR_shader_subgroup_basic, KHR_shader_subgroup_ballot, KHR_shader_subgroup_ballot, KHR_shader_subgroup_ballot, KHR_shader_subgroup_ballot, KHR_shader_subgroup_arithmetic, KHR_shader_subgroup_arithmetic, KHR_shader_subgroup_arithmetic, KHR_shader_subgroup_arithmetic, KHR_shader_subgroup_arithmetic, KHR_shader_subgroup_arithmetic, KHR_shader_subgroup_arithmetic, KHR_shader_subgroup_arithmetic, KHR_shader_subgroup_arithmetic, KHR_shader_subgroup_arithmetic, KHR_shader_subgroup_arithmetic, KHR_shader_subgroup_arithmetic, }; return extensions[feature]; } void CompilerGLSL::ShaderSubgroupSupportHelper::request_feature(Feature feature) { feature_mask |= (FeatureMask(1) << feature) | get_feature_dependency_mask(feature); } bool CompilerGLSL::ShaderSubgroupSupportHelper::is_feature_requested(Feature feature) const { return (feature_mask & (1u << feature)) != 0; } CompilerGLSL::ShaderSubgroupSupportHelper::Result CompilerGLSL::ShaderSubgroupSupportHelper::resolve() const { Result res; for (uint32_t i = 0u; i < FeatureCount; ++i) { if (feature_mask & (1u << i)) { auto feature = static_cast(i); std::unordered_set unique_candidates; auto candidates = get_candidates_for_feature(feature); unique_candidates.insert(candidates.begin(), candidates.end()); auto deps = get_feature_dependencies(feature); for (Feature d : deps) { candidates = get_candidates_for_feature(d); if (!candidates.empty()) unique_candidates.insert(candidates.begin(), candidates.end()); } for (uint32_t c : unique_candidates) ++res.weights[static_cast(c)]; } } return res; } CompilerGLSL::ShaderSubgroupSupportHelper::CandidateVector CompilerGLSL::ShaderSubgroupSupportHelper:: get_candidates_for_feature(Feature ft, const Result &r) { auto c = get_candidates_for_feature(ft); auto cmp = [&r](Candidate a, Candidate b) { if (r.weights[a] == r.weights[b]) return a < b; // Prefer candidates with lower enum value return r.weights[a] > r.weights[b]; }; std::sort(c.begin(), c.end(), cmp); return c; } CompilerGLSL::ShaderSubgroupSupportHelper::CandidateVector CompilerGLSL::ShaderSubgroupSupportHelper:: get_candidates_for_feature(Feature feature) { switch (feature) { case SubgroupMask: return { KHR_shader_subgroup_ballot, NV_shader_thread_group, ARB_shader_ballot }; case SubgroupSize: return { KHR_shader_subgroup_basic, NV_shader_thread_group, AMD_gcn_shader, ARB_shader_ballot }; case SubgroupInvocationID: return { KHR_shader_subgroup_basic, NV_shader_thread_group, ARB_shader_ballot }; case SubgroupID: return { KHR_shader_subgroup_basic, NV_shader_thread_group }; case NumSubgroups: return { KHR_shader_subgroup_basic, NV_shader_thread_group }; case SubgroupBroadcast_First: return { KHR_shader_subgroup_ballot, NV_shader_thread_shuffle, ARB_shader_ballot }; case SubgroupBallotFindLSB_MSB: return { KHR_shader_subgroup_ballot, NV_shader_thread_group }; case SubgroupAll_Any_AllEqualBool: return { KHR_shader_subgroup_vote, NV_gpu_shader_5, ARB_shader_group_vote, AMD_gcn_shader }; case SubgroupAllEqualT: return {}; // depends on other features only case SubgroupElect: return {}; // depends on other features only case SubgroupBallot: return { KHR_shader_subgroup_ballot, NV_shader_thread_group, ARB_shader_ballot }; case SubgroupBarrier: return { KHR_shader_subgroup_basic, NV_shader_thread_group, ARB_shader_ballot, AMD_gcn_shader }; case SubgroupMemBarrier: return { KHR_shader_subgroup_basic }; case SubgroupInverseBallot_InclBitCount_ExclBitCout: return {}; case SubgroupBallotBitExtract: return { NV_shader_thread_group }; case SubgroupBallotBitCount: return {}; case SubgroupArithmeticIAddReduce: case SubgroupArithmeticIAddExclusiveScan: case SubgroupArithmeticIAddInclusiveScan: case SubgroupArithmeticFAddReduce: case SubgroupArithmeticFAddExclusiveScan: case SubgroupArithmeticFAddInclusiveScan: case SubgroupArithmeticIMulReduce: case SubgroupArithmeticIMulExclusiveScan: case SubgroupArithmeticIMulInclusiveScan: case SubgroupArithmeticFMulReduce: case SubgroupArithmeticFMulExclusiveScan: case SubgroupArithmeticFMulInclusiveScan: return { KHR_shader_subgroup_arithmetic, NV_shader_thread_shuffle }; default: return {}; } } CompilerGLSL::ShaderSubgroupSupportHelper::FeatureMask CompilerGLSL::ShaderSubgroupSupportHelper::build_mask( const SmallVector &features) { FeatureMask mask = 0; for (Feature f : features) mask |= FeatureMask(1) << f; return mask; } CompilerGLSL::ShaderSubgroupSupportHelper::Result::Result() { for (auto &weight : weights) weight = 0; // Make sure KHR_shader_subgroup extensions are always prefered. const uint32_t big_num = FeatureCount; weights[KHR_shader_subgroup_ballot] = big_num; weights[KHR_shader_subgroup_basic] = big_num; weights[KHR_shader_subgroup_vote] = big_num; weights[KHR_shader_subgroup_arithmetic] = big_num; } void CompilerGLSL::request_workaround_wrapper_overload(TypeID id) { // Must be ordered to maintain deterministic output, so vector is appropriate. if (find(begin(workaround_ubo_load_overload_types), end(workaround_ubo_load_overload_types), id) == end(workaround_ubo_load_overload_types)) { force_recompile(); workaround_ubo_load_overload_types.push_back(id); } } void CompilerGLSL::rewrite_load_for_wrapped_row_major(std::string &expr, TypeID loaded_type, ID ptr) { // Loading row-major matrices from UBOs on older AMD Windows OpenGL drivers is problematic. // To load these types correctly, we must first wrap them in a dummy function which only purpose is to // ensure row_major decoration is actually respected. auto *var = maybe_get_backing_variable(ptr); if (!var) return; auto &backing_type = get(var->basetype); bool is_ubo = backing_type.basetype == SPIRType::Struct && backing_type.storage == StorageClassUniform && has_decoration(backing_type.self, DecorationBlock); if (!is_ubo) return; auto *type = &get(loaded_type); bool rewrite = false; bool relaxed = options.es; if (is_matrix(*type)) { // To avoid adding a lot of unnecessary meta tracking to forward the row_major state, // we will simply look at the base struct itself. It is exceptionally rare to mix and match row-major/col-major state. // If there is any row-major action going on, we apply the workaround. // It is harmless to apply the workaround to column-major matrices, so this is still a valid solution. // If an access chain occurred, the workaround is not required, so loading vectors or scalars don't need workaround. type = &backing_type; } else { // If we're loading a composite, we don't have overloads like these. relaxed = false; } if (type->basetype == SPIRType::Struct) { // If we're loading a struct where any member is a row-major matrix, apply the workaround. for (uint32_t i = 0; i < uint32_t(type->member_types.size()); i++) { auto decorations = combined_decoration_for_member(*type, i); if (decorations.get(DecorationRowMajor)) rewrite = true; // Since we decide on a per-struct basis, only use mediump wrapper if all candidates are mediump. if (!decorations.get(DecorationRelaxedPrecision)) relaxed = false; } } if (rewrite) { request_workaround_wrapper_overload(loaded_type); expr = join("spvWorkaroundRowMajor", (relaxed ? "MP" : ""), "(", expr, ")"); } } void CompilerGLSL::mask_stage_output_by_location(uint32_t location, uint32_t component) { masked_output_locations.insert({ location, component }); } void CompilerGLSL::mask_stage_output_by_builtin(BuiltIn builtin) { masked_output_builtins.insert(builtin); } bool CompilerGLSL::is_stage_output_variable_masked(const SPIRVariable &var) const { auto &type = get(var.basetype); bool is_block = has_decoration(type.self, DecorationBlock); // Blocks by themselves are never masked. Must be masked per-member. if (is_block) return false; bool is_builtin = has_decoration(var.self, DecorationBuiltIn); if (is_builtin) { return is_stage_output_builtin_masked(BuiltIn(get_decoration(var.self, DecorationBuiltIn))); } else { if (!has_decoration(var.self, DecorationLocation)) return false; return is_stage_output_location_masked( get_decoration(var.self, DecorationLocation), get_decoration(var.self, DecorationComponent)); } } bool CompilerGLSL::is_stage_output_block_member_masked(const SPIRVariable &var, uint32_t index, bool strip_array) const { auto &type = get(var.basetype); bool is_block = has_decoration(type.self, DecorationBlock); if (!is_block) return false; BuiltIn builtin = BuiltInMax; if (is_member_builtin(type, index, &builtin)) { return is_stage_output_builtin_masked(builtin); } else { uint32_t location = get_declared_member_location(var, index, strip_array); uint32_t component = get_member_decoration(type.self, index, DecorationComponent); return is_stage_output_location_masked(location, component); } } bool CompilerGLSL::is_per_primitive_variable(const SPIRVariable &var) const { if (has_decoration(var.self, DecorationPerPrimitiveEXT)) return true; auto &type = get(var.basetype); if (!has_decoration(type.self, DecorationBlock)) return false; for (uint32_t i = 0, n = uint32_t(type.member_types.size()); i < n; i++) if (!has_member_decoration(type.self, i, DecorationPerPrimitiveEXT)) return false; return true; } bool CompilerGLSL::is_stage_output_location_masked(uint32_t location, uint32_t component) const { return masked_output_locations.count({ location, component }) != 0; } bool CompilerGLSL::is_stage_output_builtin_masked(spv::BuiltIn builtin) const { return masked_output_builtins.count(builtin) != 0; } uint32_t CompilerGLSL::get_declared_member_location(const SPIRVariable &var, uint32_t mbr_idx, bool strip_array) const { auto &block_type = get(var.basetype); if (has_member_decoration(block_type.self, mbr_idx, DecorationLocation)) return get_member_decoration(block_type.self, mbr_idx, DecorationLocation); else return get_accumulated_member_location(var, mbr_idx, strip_array); } uint32_t CompilerGLSL::get_accumulated_member_location(const SPIRVariable &var, uint32_t mbr_idx, bool strip_array) const { auto &type = strip_array ? get_variable_element_type(var) : get_variable_data_type(var); uint32_t location = get_decoration(var.self, DecorationLocation); for (uint32_t i = 0; i < mbr_idx; i++) { auto &mbr_type = get(type.member_types[i]); // Start counting from any place we have a new location decoration. if (has_member_decoration(type.self, mbr_idx, DecorationLocation)) location = get_member_decoration(type.self, mbr_idx, DecorationLocation); uint32_t location_count = type_to_location_count(mbr_type); location += location_count; } return location; } StorageClass CompilerGLSL::get_expression_effective_storage_class(uint32_t ptr) { auto *var = maybe_get_backing_variable(ptr); // If the expression has been lowered to a temporary, we need to use the Generic storage class. // We're looking for the effective storage class of a given expression. // An access chain or forwarded OpLoads from such access chains // will generally have the storage class of the underlying variable, but if the load was not forwarded // we have lost any address space qualifiers. bool forced_temporary = ir.ids[ptr].get_type() == TypeExpression && !get(ptr).access_chain && (forced_temporaries.count(ptr) != 0 || forwarded_temporaries.count(ptr) == 0); if (var && !forced_temporary) { if (variable_decl_is_remapped_storage(*var, StorageClassWorkgroup)) return StorageClassWorkgroup; if (variable_decl_is_remapped_storage(*var, StorageClassStorageBuffer)) return StorageClassStorageBuffer; // Normalize SSBOs to StorageBuffer here. if (var->storage == StorageClassUniform && has_decoration(get(var->basetype).self, DecorationBufferBlock)) return StorageClassStorageBuffer; else return var->storage; } else return expression_type(ptr).storage; } uint32_t CompilerGLSL::type_to_location_count(const SPIRType &type) const { uint32_t count; if (type.basetype == SPIRType::Struct) { uint32_t mbr_count = uint32_t(type.member_types.size()); count = 0; for (uint32_t i = 0; i < mbr_count; i++) count += type_to_location_count(get(type.member_types[i])); } else { count = type.columns > 1 ? type.columns : 1; } uint32_t dim_count = uint32_t(type.array.size()); for (uint32_t i = 0; i < dim_count; i++) count *= to_array_size_literal(type, i); return count; } std::string CompilerGLSL::format_float(float value) const { if (float_formatter) return float_formatter->format_float(value); // default behavior return convert_to_string(value, current_locale_radix_character); } std::string CompilerGLSL::format_double(double value) const { if (float_formatter) return float_formatter->format_double(value); // default behavior return convert_to_string(value, current_locale_radix_character); } ================================================ FILE: src/libraries/spirv_cross/spirv_glsl.hpp ================================================ /* * Copyright 2015-2021 Arm Limited * SPDX-License-Identifier: Apache-2.0 OR MIT * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* * At your option, you may choose to accept this material under either: * 1. The Apache License, Version 2.0, found at , or * 2. The MIT License, found at . */ #ifndef SPIRV_CROSS_GLSL_HPP #define SPIRV_CROSS_GLSL_HPP #include "GLSL.std.450.h" #include "spirv_cross.hpp" #include #include #include namespace SPIRV_CROSS_NAMESPACE { enum PlsFormat { PlsNone = 0, PlsR11FG11FB10F, PlsR32F, PlsRG16F, PlsRGB10A2, PlsRGBA8, PlsRG16, PlsRGBA8I, PlsRG16I, PlsRGB10A2UI, PlsRGBA8UI, PlsRG16UI, PlsR32UI }; struct PlsRemap { uint32_t id; PlsFormat format; }; enum AccessChainFlagBits { ACCESS_CHAIN_INDEX_IS_LITERAL_BIT = 1 << 0, ACCESS_CHAIN_CHAIN_ONLY_BIT = 1 << 1, ACCESS_CHAIN_PTR_CHAIN_BIT = 1 << 2, ACCESS_CHAIN_SKIP_REGISTER_EXPRESSION_READ_BIT = 1 << 3, ACCESS_CHAIN_LITERAL_MSB_FORCE_ID = 1 << 4, ACCESS_CHAIN_FLATTEN_ALL_MEMBERS_BIT = 1 << 5, ACCESS_CHAIN_FORCE_COMPOSITE_BIT = 1 << 6 }; typedef uint32_t AccessChainFlags; class CompilerGLSL : public Compiler { public: struct Options { // The shading language version. Corresponds to #version $VALUE. uint32_t version = 450; // Emit the OpenGL ES shading language instead of desktop OpenGL. bool es = false; // Debug option to always emit temporary variables for all expressions. bool force_temporary = false; // Debug option, can be increased in an attempt to workaround SPIRV-Cross bugs temporarily. // If this limit has to be increased, it points to an implementation bug. // In certain scenarios, the maximum number of debug iterations may increase beyond this limit // as long as we can prove we're making certain kinds of forward progress. uint32_t force_recompile_max_debug_iterations = 3; // If true, Vulkan GLSL features are used instead of GL-compatible features. // Mostly useful for debugging SPIR-V files. bool vulkan_semantics = false; // If true, gl_PerVertex is explicitly redeclared in vertex, geometry and tessellation shaders. // The members of gl_PerVertex is determined by which built-ins are declared by the shader. // This option is ignored in ES versions, as redeclaration in ES is not required, and it depends on a different extension // (EXT_shader_io_blocks) which makes things a bit more fuzzy. bool separate_shader_objects = false; // Flattens multidimensional arrays, e.g. float foo[a][b][c] into single-dimensional arrays, // e.g. float foo[a * b * c]. // This function does not change the actual SPIRType of any object. // Only the generated code, including declarations of interface variables are changed to be single array dimension. bool flatten_multidimensional_arrays = false; // For older desktop GLSL targets than version 420, the // GL_ARB_shading_language_420pack extensions is used to be able to support // layout(binding) on UBOs and samplers. // If disabled on older targets, binding decorations will be stripped. bool enable_420pack_extension = true; // In non-Vulkan GLSL, emit push constant blocks as UBOs rather than plain uniforms. bool emit_push_constant_as_uniform_buffer = false; // Always emit uniform blocks as plain uniforms, regardless of the GLSL version, even when UBOs are supported. // Does not apply to shader storage or push constant blocks. bool emit_uniform_buffer_as_plain_uniforms = false; // Emit OpLine directives if present in the module. // May not correspond exactly to original source, but should be a good approximation. bool emit_line_directives = false; // In cases where readonly/writeonly decoration are not used at all, // we try to deduce which qualifier(s) we should actually used, since actually emitting // read-write decoration is very rare, and older glslang/HLSL compilers tend to just emit readwrite as a matter of fact. // The default (true) is to enable automatic deduction for these cases, but if you trust the decorations set // by the SPIR-V, it's recommended to set this to false. bool enable_storage_image_qualifier_deduction = true; // On some targets (WebGPU), uninitialized variables are banned. // If this is enabled, all variables (temporaries, Private, Function) // which would otherwise be uninitialized will now be initialized to 0 instead. bool force_zero_initialized_variables = false; // In GLSL, force use of I/O block flattening, similar to // what happens on legacy GLSL targets for blocks and structs. bool force_flattened_io_blocks = false; // For opcodes where we have to perform explicit additional nan checks, very ugly code is generated. // If we opt-in, ignore these requirements. // In opcodes like NClamp/NMin/NMax and FP compare, ignore NaN behavior. // Use FClamp/FMin/FMax semantics for clamps and lets implementation choose ordered or unordered // compares. bool relax_nan_checks = false; // Loading row-major matrices from UBOs on older AMD Windows OpenGL drivers is problematic. // To load these types correctly, we must generate a wrapper. them in a dummy function which only purpose is to // ensure row_major decoration is actually respected. // This workaround may cause significant performance degeneration on some Android devices. bool enable_row_major_load_workaround = true; // If non-zero, controls layout(num_views = N) in; in GL_OVR_multiview2. uint32_t ovr_multiview_view_count = 0; enum Precision { DontCare, Lowp, Mediump, Highp }; struct VertexOptions { // "Vertex-like shader" here is any shader stage that can write BuiltInPosition. // GLSL: In vertex-like shaders, rewrite [0, w] depth (Vulkan/D3D style) to [-w, w] depth (GL style). // MSL: In vertex-like shaders, rewrite [-w, w] depth (GL style) to [0, w] depth. // HLSL: In vertex-like shaders, rewrite [-w, w] depth (GL style) to [0, w] depth. bool fixup_clipspace = false; // In vertex-like shaders, inverts gl_Position.y or equivalent. bool flip_vert_y = false; // GLSL only, for HLSL version of this option, see CompilerHLSL. // If true, the backend will assume that InstanceIndex will need to apply // a base instance offset. Set to false if you know you will never use base instance // functionality as it might remove some internal uniforms. bool support_nonzero_base_instance = true; } vertex; struct FragmentOptions { // Add precision mediump float in ES targets when emitting GLES source. // Add precision highp int in ES targets when emitting GLES source. Precision default_float_precision = Mediump; Precision default_int_precision = Highp; } fragment; }; void remap_pixel_local_storage(std::vector inputs, std::vector outputs) { pls_inputs = std::move(inputs); pls_outputs = std::move(outputs); remap_pls_variables(); } // Redirect a subpassInput reading from input_attachment_index to instead load its value from // the color attachment at location = color_location. Requires ESSL. // If coherent, uses GL_EXT_shader_framebuffer_fetch, if not, uses noncoherent variant. void remap_ext_framebuffer_fetch(uint32_t input_attachment_index, uint32_t color_location, bool coherent); explicit CompilerGLSL(std::vector spirv_) : Compiler(std::move(spirv_)) { init(); } CompilerGLSL(const uint32_t *ir_, size_t word_count) : Compiler(ir_, word_count) { init(); } explicit CompilerGLSL(const ParsedIR &ir_) : Compiler(ir_) { init(); } explicit CompilerGLSL(ParsedIR &&ir_) : Compiler(std::move(ir_)) { init(); } const Options &get_common_options() const { return options; } void set_common_options(const Options &opts) { options = opts; } std::string compile() override; // Returns the current string held in the conversion buffer. Useful for // capturing what has been converted so far when compile() throws an error. std::string get_partial_source(); // Adds a line to be added right after #version in GLSL backend. // This is useful for enabling custom extensions which are outside the scope of SPIRV-Cross. // This can be combined with variable remapping. // A new-line will be added. // // While add_header_line() is a more generic way of adding arbitrary text to the header // of a GLSL file, require_extension() should be used when adding extensions since it will // avoid creating collisions with SPIRV-Cross generated extensions. // // Code added via add_header_line() is typically backend-specific. void add_header_line(const std::string &str); // Adds an extension which is required to run this shader, e.g. // require_extension("GL_KHR_my_extension"); void require_extension(const std::string &ext); // Returns the list of required extensions. After compilation this will contains any other // extensions that the compiler used automatically, in addition to the user specified ones. const SmallVector &get_required_extensions() const; // Legacy GLSL compatibility method. // Takes a uniform or push constant variable and flattens it into a (i|u)vec4 array[N]; array instead. // For this to work, all types in the block must be the same basic type, e.g. mixing vec2 and vec4 is fine, but // mixing int and float is not. // The name of the uniform array will be the same as the interface block name. void flatten_buffer_block(VariableID id); // After compilation, query if a variable ID was used as a depth resource. // This is meaningful for MSL since descriptor types depend on this knowledge. // Cases which return true: // - Images which are declared with depth = 1 image type. // - Samplers which are statically used at least once with Dref opcodes. // - Images which are statically used at least once with Dref opcodes. bool variable_is_depth_or_compare(VariableID id) const; // If a shader output is active in this stage, but inactive in a subsequent stage, // this can be signalled here. This can be used to work around certain cross-stage matching problems // which plagues MSL and HLSL in certain scenarios. // An output which matches one of these will not be emitted in stage output interfaces, but rather treated as a private // variable. // This option is only meaningful for MSL and HLSL, since GLSL matches by location directly. // Masking builtins only takes effect if the builtin in question is part of the stage output interface. void mask_stage_output_by_location(uint32_t location, uint32_t component); void mask_stage_output_by_builtin(spv::BuiltIn builtin); // Allow to control how to format float literals in the output. // Set to "nullptr" to use the default "convert_to_string" function. // This handle is not owned by SPIRV-Cross and must remain valid until compile() has been called. void set_float_formatter(FloatFormatter *formatter) { float_formatter = formatter; } protected: struct ShaderSubgroupSupportHelper { // lower enum value = greater priority enum Candidate { KHR_shader_subgroup_ballot, KHR_shader_subgroup_basic, KHR_shader_subgroup_vote, KHR_shader_subgroup_arithmetic, NV_gpu_shader_5, NV_shader_thread_group, NV_shader_thread_shuffle, ARB_shader_ballot, ARB_shader_group_vote, AMD_gcn_shader, CandidateCount }; static const char *get_extension_name(Candidate c); static SmallVector get_extra_required_extension_names(Candidate c); static const char *get_extra_required_extension_predicate(Candidate c); enum Feature { SubgroupMask = 0, SubgroupSize = 1, SubgroupInvocationID = 2, SubgroupID = 3, NumSubgroups = 4, SubgroupBroadcast_First = 5, SubgroupBallotFindLSB_MSB = 6, SubgroupAll_Any_AllEqualBool = 7, SubgroupAllEqualT = 8, SubgroupElect = 9, SubgroupBarrier = 10, SubgroupMemBarrier = 11, SubgroupBallot = 12, SubgroupInverseBallot_InclBitCount_ExclBitCout = 13, SubgroupBallotBitExtract = 14, SubgroupBallotBitCount = 15, SubgroupArithmeticIAddReduce = 16, SubgroupArithmeticIAddExclusiveScan = 17, SubgroupArithmeticIAddInclusiveScan = 18, SubgroupArithmeticFAddReduce = 19, SubgroupArithmeticFAddExclusiveScan = 20, SubgroupArithmeticFAddInclusiveScan = 21, SubgroupArithmeticIMulReduce = 22, SubgroupArithmeticIMulExclusiveScan = 23, SubgroupArithmeticIMulInclusiveScan = 24, SubgroupArithmeticFMulReduce = 25, SubgroupArithmeticFMulExclusiveScan = 26, SubgroupArithmeticFMulInclusiveScan = 27, FeatureCount }; using FeatureMask = uint32_t; static_assert(sizeof(FeatureMask) * 8u >= FeatureCount, "Mask type needs more bits."); using CandidateVector = SmallVector; using FeatureVector = SmallVector; static FeatureVector get_feature_dependencies(Feature feature); static FeatureMask get_feature_dependency_mask(Feature feature); static bool can_feature_be_implemented_without_extensions(Feature feature); static Candidate get_KHR_extension_for_feature(Feature feature); struct Result { Result(); uint32_t weights[CandidateCount]; }; void request_feature(Feature feature); bool is_feature_requested(Feature feature) const; Result resolve() const; static CandidateVector get_candidates_for_feature(Feature ft, const Result &r); private: static CandidateVector get_candidates_for_feature(Feature ft); static FeatureMask build_mask(const SmallVector &features); FeatureMask feature_mask = 0; }; // TODO remove this function when all subgroup ops are supported (or make it always return true) static bool is_supported_subgroup_op_in_opengl(spv::Op op, const uint32_t *ops); void reset(uint32_t iteration_count); void emit_function(SPIRFunction &func, const Bitset &return_flags); bool has_extension(const std::string &ext) const; void require_extension_internal(const std::string &ext); // Virtualize methods which need to be overridden by subclass targets like C++ and such. virtual void emit_function_prototype(SPIRFunction &func, const Bitset &return_flags); SPIRBlock *current_emitting_block = nullptr; SmallVector current_emitting_switch_stack; bool current_emitting_switch_fallthrough = false; virtual void emit_instruction(const Instruction &instr); struct TemporaryCopy { uint32_t dst_id; uint32_t src_id; }; TemporaryCopy handle_instruction_precision(const Instruction &instr); void emit_block_instructions(SPIRBlock &block); void emit_block_instructions_with_masked_debug(SPIRBlock &block); // For relax_nan_checks. GLSLstd450 get_remapped_glsl_op(GLSLstd450 std450_op) const; spv::Op get_remapped_spirv_op(spv::Op op) const; virtual void emit_glsl_op(uint32_t result_type, uint32_t result_id, uint32_t op, const uint32_t *args, uint32_t count); virtual void emit_spv_amd_shader_ballot_op(uint32_t result_type, uint32_t result_id, uint32_t op, const uint32_t *args, uint32_t count); virtual void emit_spv_amd_shader_explicit_vertex_parameter_op(uint32_t result_type, uint32_t result_id, uint32_t op, const uint32_t *args, uint32_t count); virtual void emit_spv_amd_shader_trinary_minmax_op(uint32_t result_type, uint32_t result_id, uint32_t op, const uint32_t *args, uint32_t count); virtual void emit_spv_amd_gcn_shader_op(uint32_t result_type, uint32_t result_id, uint32_t op, const uint32_t *args, uint32_t count); virtual void emit_header(); void emit_line_directive(uint32_t file_id, uint32_t line_literal); void build_workgroup_size(SmallVector &arguments, const SpecializationConstant &x, const SpecializationConstant &y, const SpecializationConstant &z); void request_subgroup_feature(ShaderSubgroupSupportHelper::Feature feature); virtual void emit_sampled_image_op(uint32_t result_type, uint32_t result_id, uint32_t image_id, uint32_t samp_id); virtual void emit_texture_op(const Instruction &i, bool sparse); virtual std::string to_texture_op(const Instruction &i, bool sparse, bool *forward, SmallVector &inherited_expressions); virtual void emit_subgroup_op(const Instruction &i); virtual std::string type_to_glsl(const SPIRType &type, uint32_t id = 0); virtual std::string builtin_to_glsl(spv::BuiltIn builtin, spv::StorageClass storage); virtual void emit_struct_member(const SPIRType &type, uint32_t member_type_id, uint32_t index, const std::string &qualifier = "", uint32_t base_offset = 0); virtual void emit_struct_padding_target(const SPIRType &type); virtual std::string image_type_glsl(const SPIRType &type, uint32_t id = 0); std::string constant_expression(const SPIRConstant &c, bool inside_block_like_struct_scope = false, bool inside_struct_scope = false); virtual std::string constant_op_expression(const SPIRConstantOp &cop); virtual std::string constant_expression_vector(const SPIRConstant &c, uint32_t vector); virtual void emit_fixup(); virtual std::string variable_decl(const SPIRType &type, const std::string &name, uint32_t id = 0); virtual bool variable_decl_is_remapped_storage(const SPIRVariable &var, spv::StorageClass storage) const; virtual std::string to_func_call_arg(const SPIRFunction::Parameter &arg, uint32_t id); struct TextureFunctionBaseArguments { // GCC 4.8 workarounds, it doesn't understand '{}' constructor here, use explicit default constructor. TextureFunctionBaseArguments() = default; VariableID img = 0; const SPIRType *imgtype = nullptr; bool is_fetch = false, is_gather = false, is_proj = false; }; struct TextureFunctionNameArguments { // GCC 4.8 workarounds, it doesn't understand '{}' constructor here, use explicit default constructor. TextureFunctionNameArguments() = default; TextureFunctionBaseArguments base; bool has_array_offsets = false, has_offset = false, has_grad = false; bool has_dref = false, is_sparse_feedback = false, has_min_lod = false; uint32_t lod = 0; }; virtual std::string to_function_name(const TextureFunctionNameArguments &args); struct TextureFunctionArguments { // GCC 4.8 workarounds, it doesn't understand '{}' constructor here, use explicit default constructor. TextureFunctionArguments() = default; TextureFunctionBaseArguments base; uint32_t coord = 0, coord_components = 0, dref = 0; uint32_t grad_x = 0, grad_y = 0, lod = 0, offset = 0; uint32_t bias = 0, component = 0, sample = 0, sparse_texel = 0, min_lod = 0; bool nonuniform_expression = false; }; virtual std::string to_function_args(const TextureFunctionArguments &args, bool *p_forward); void emit_sparse_feedback_temporaries(uint32_t result_type_id, uint32_t id, uint32_t &feedback_id, uint32_t &texel_id); uint32_t get_sparse_feedback_texel_id(uint32_t id) const; virtual void emit_buffer_block(const SPIRVariable &type); virtual void emit_push_constant_block(const SPIRVariable &var); virtual void emit_uniform(const SPIRVariable &var); virtual std::string unpack_expression_type(std::string expr_str, const SPIRType &type, uint32_t physical_type_id, bool packed_type, bool row_major); virtual bool builtin_translates_to_nonarray(spv::BuiltIn builtin) const; virtual bool is_user_type_structured(uint32_t id) const; void emit_copy_logical_type(uint32_t lhs_id, uint32_t lhs_type_id, uint32_t rhs_id, uint32_t rhs_type_id, SmallVector chain); StringStream<> buffer; template inline void statement_inner(T &&t) { buffer << std::forward(t); statement_count++; } template inline void statement_inner(T &&t, Ts &&... ts) { buffer << std::forward(t); statement_count++; statement_inner(std::forward(ts)...); } template inline void statement(Ts &&... ts) { if (is_forcing_recompilation()) { // Do not bother emitting code while force_recompile is active. // We will compile again. statement_count++; return; } if (redirect_statement) { redirect_statement->push_back(join(std::forward(ts)...)); statement_count++; } else { for (uint32_t i = 0; i < indent; i++) buffer << " "; statement_inner(std::forward(ts)...); buffer << '\n'; } } template inline void statement_no_indent(Ts &&... ts) { auto old_indent = indent; indent = 0; statement(std::forward(ts)...); indent = old_indent; } // Used for implementing continue blocks where // we want to obtain a list of statements we can merge // on a single line separated by comma. SmallVector *redirect_statement = nullptr; const SPIRBlock *current_continue_block = nullptr; bool block_temporary_hoisting = false; bool block_debug_directives = false; void begin_scope(); void end_scope(); void end_scope(const std::string &trailer); void end_scope_decl(); void end_scope_decl(const std::string &decl); Options options; virtual std::string type_to_array_glsl( const SPIRType &type); // Allow Metal to use the array template to make arrays a value type std::string to_array_size(const SPIRType &type, uint32_t index); uint32_t to_array_size_literal(const SPIRType &type, uint32_t index) const; uint32_t to_array_size_literal(const SPIRType &type) const; virtual std::string variable_decl(const SPIRVariable &variable); // Threadgroup arrays can't have a wrapper type std::string variable_decl_function_local(SPIRVariable &variable); void add_local_variable_name(uint32_t id); void add_resource_name(uint32_t id); void add_member_name(SPIRType &type, uint32_t name); void add_function_overload(const SPIRFunction &func); virtual bool is_non_native_row_major_matrix(uint32_t id); virtual bool member_is_non_native_row_major_matrix(const SPIRType &type, uint32_t index); bool member_is_remapped_physical_type(const SPIRType &type, uint32_t index) const; bool member_is_packed_physical_type(const SPIRType &type, uint32_t index) const; virtual std::string convert_row_major_matrix(std::string exp_str, const SPIRType &exp_type, uint32_t physical_type_id, bool is_packed, bool relaxed = false); std::unordered_set local_variable_names; std::unordered_set resource_names; std::unordered_set block_input_names; std::unordered_set block_output_names; std::unordered_set block_ubo_names; std::unordered_set block_ssbo_names; std::unordered_set block_names; // A union of all block_*_names. std::unordered_map> function_overloads; std::unordered_map preserved_aliases; void preserve_alias_on_reset(uint32_t id); void reset_name_caches(); bool processing_entry_point = false; // Can be overriden by subclass backends for trivial things which // shouldn't need polymorphism. struct BackendVariations { std::string discard_literal = "discard"; std::string demote_literal = "demote"; std::string null_pointer_literal = ""; bool float_literal_suffix = false; bool double_literal_suffix = true; bool uint32_t_literal_suffix = true; bool long_long_literal_suffix = false; const char *basic_int_type = "int"; const char *basic_uint_type = "uint"; const char *basic_int8_type = "int8_t"; const char *basic_uint8_type = "uint8_t"; const char *basic_int16_type = "int16_t"; const char *basic_uint16_type = "uint16_t"; const char *int16_t_literal_suffix = "s"; const char *uint16_t_literal_suffix = "us"; const char *nonuniform_qualifier = "nonuniformEXT"; const char *boolean_mix_function = "mix"; SPIRType::BaseType boolean_in_struct_remapped_type = SPIRType::Boolean; bool swizzle_is_function = false; bool shared_is_implied = false; bool unsized_array_supported = true; bool explicit_struct_type = false; bool use_initializer_list = false; bool use_typed_initializer_list = false; bool can_declare_struct_inline = true; bool can_declare_arrays_inline = true; bool native_row_major_matrix = true; bool use_constructor_splatting = true; bool allow_precision_qualifiers = false; bool can_swizzle_scalar = false; bool force_gl_in_out_block = false; bool force_merged_mesh_block = false; bool can_return_array = true; bool allow_truncated_access_chain = false; bool supports_extensions = false; bool supports_empty_struct = false; bool array_is_value_type = true; bool array_is_value_type_in_buffer_blocks = true; bool comparison_image_samples_scalar = false; bool native_pointers = false; bool support_small_type_sampling_result = false; bool support_case_fallthrough = true; bool use_array_constructor = false; bool needs_row_major_load_workaround = false; bool support_pointer_to_pointer = false; bool support_precise_qualifier = false; bool support_64bit_switch = false; bool workgroup_size_is_hidden = false; bool requires_relaxed_precision_analysis = false; bool implicit_c_integer_promotion_rules = false; } backend; void emit_struct(SPIRType &type); void emit_resources(); void emit_extension_workarounds(spv::ExecutionModel model); void emit_subgroup_arithmetic_workaround(const std::string &func, spv::Op op, spv::GroupOperation group_op); void emit_polyfills(uint32_t polyfills, bool relaxed); void emit_buffer_block_native(const SPIRVariable &var); void emit_buffer_reference_block(uint32_t type_id, bool forward_declaration); void emit_buffer_block_legacy(const SPIRVariable &var); void emit_buffer_block_flattened(const SPIRVariable &type); void fixup_implicit_builtin_block_names(spv::ExecutionModel model); void emit_declared_builtin_block(spv::StorageClass storage, spv::ExecutionModel model); bool should_force_emit_builtin_block(spv::StorageClass storage); void emit_push_constant_block_vulkan(const SPIRVariable &var); void emit_push_constant_block_glsl(const SPIRVariable &var); void emit_interface_block(const SPIRVariable &type); void emit_flattened_io_block(const SPIRVariable &var, const char *qual); void emit_flattened_io_block_struct(const std::string &basename, const SPIRType &type, const char *qual, const SmallVector &indices); void emit_flattened_io_block_member(const std::string &basename, const SPIRType &type, const char *qual, const SmallVector &indices); void emit_block_chain(SPIRBlock &block); void emit_hoisted_temporaries(SmallVector> &temporaries); std::string constant_value_macro_name(uint32_t id); int get_constant_mapping_to_workgroup_component(const SPIRConstant &constant) const; void emit_constant(const SPIRConstant &constant); void emit_specialization_constant_op(const SPIRConstantOp &constant); std::string emit_continue_block(uint32_t continue_block, bool follow_true_block, bool follow_false_block); bool attempt_emit_loop_header(SPIRBlock &block, SPIRBlock::Method method); void branch(BlockID from, BlockID to); void branch_to_continue(BlockID from, BlockID to); void branch(BlockID from, uint32_t cond, BlockID true_block, BlockID false_block); void flush_phi(BlockID from, BlockID to); void flush_variable_declaration(uint32_t id); void flush_undeclared_variables(SPIRBlock &block); void emit_variable_temporary_copies(const SPIRVariable &var); bool should_dereference(uint32_t id); bool should_forward(uint32_t id) const; bool should_suppress_usage_tracking(uint32_t id) const; void emit_mix_op(uint32_t result_type, uint32_t id, uint32_t left, uint32_t right, uint32_t lerp); void emit_nminmax_op(uint32_t result_type, uint32_t id, uint32_t op0, uint32_t op1, GLSLstd450 op); void emit_emulated_ahyper_op(uint32_t result_type, uint32_t result_id, uint32_t op0, GLSLstd450 op); bool to_trivial_mix_op(const SPIRType &type, std::string &op, uint32_t left, uint32_t right, uint32_t lerp); void emit_quaternary_func_op(uint32_t result_type, uint32_t result_id, uint32_t op0, uint32_t op1, uint32_t op2, uint32_t op3, const char *op); void emit_trinary_func_op(uint32_t result_type, uint32_t result_id, uint32_t op0, uint32_t op1, uint32_t op2, const char *op); void emit_binary_func_op(uint32_t result_type, uint32_t result_id, uint32_t op0, uint32_t op1, const char *op); void emit_atomic_func_op(uint32_t result_type, uint32_t result_id, uint32_t op0, uint32_t op1, const char *op); void emit_atomic_func_op(uint32_t result_type, uint32_t result_id, uint32_t op0, uint32_t op1, uint32_t op2, const char *op); void emit_unary_func_op_cast(uint32_t result_type, uint32_t result_id, uint32_t op0, const char *op, SPIRType::BaseType input_type, SPIRType::BaseType expected_result_type); void emit_binary_func_op_cast(uint32_t result_type, uint32_t result_id, uint32_t op0, uint32_t op1, const char *op, SPIRType::BaseType input_type, bool skip_cast_if_equal_type); void emit_binary_func_op_cast_clustered(uint32_t result_type, uint32_t result_id, uint32_t op0, uint32_t op1, const char *op, SPIRType::BaseType input_type); void emit_trinary_func_op_cast(uint32_t result_type, uint32_t result_id, uint32_t op0, uint32_t op1, uint32_t op2, const char *op, SPIRType::BaseType input_type); void emit_trinary_func_op_bitextract(uint32_t result_type, uint32_t result_id, uint32_t op0, uint32_t op1, uint32_t op2, const char *op, SPIRType::BaseType expected_result_type, SPIRType::BaseType input_type0, SPIRType::BaseType input_type1, SPIRType::BaseType input_type2); void emit_bitfield_insert_op(uint32_t result_type, uint32_t result_id, uint32_t op0, uint32_t op1, uint32_t op2, uint32_t op3, const char *op, SPIRType::BaseType offset_count_type); void emit_unary_func_op(uint32_t result_type, uint32_t result_id, uint32_t op0, const char *op); void emit_unrolled_unary_op(uint32_t result_type, uint32_t result_id, uint32_t operand, const char *op); void emit_binary_op(uint32_t result_type, uint32_t result_id, uint32_t op0, uint32_t op1, const char *op); void emit_unrolled_binary_op(uint32_t result_type, uint32_t result_id, uint32_t op0, uint32_t op1, const char *op, bool negate, SPIRType::BaseType expected_type); void emit_binary_op_cast(uint32_t result_type, uint32_t result_id, uint32_t op0, uint32_t op1, const char *op, SPIRType::BaseType input_type, bool skip_cast_if_equal_type, bool implicit_integer_promotion); SPIRType binary_op_bitcast_helper(std::string &cast_op0, std::string &cast_op1, SPIRType::BaseType &input_type, uint32_t op0, uint32_t op1, bool skip_cast_if_equal_type); virtual bool emit_complex_bitcast(uint32_t result_type, uint32_t id, uint32_t op0); std::string to_ternary_expression(const SPIRType &result_type, uint32_t select, uint32_t true_value, uint32_t false_value); void emit_unary_op(uint32_t result_type, uint32_t result_id, uint32_t op0, const char *op); void emit_unary_op_cast(uint32_t result_type, uint32_t result_id, uint32_t op0, const char *op); virtual void emit_mesh_tasks(SPIRBlock &block); bool expression_is_forwarded(uint32_t id) const; bool expression_suppresses_usage_tracking(uint32_t id) const; bool expression_read_implies_multiple_reads(uint32_t id) const; SPIRExpression &emit_op(uint32_t result_type, uint32_t result_id, const std::string &rhs, bool forward_rhs, bool suppress_usage_tracking = false); void access_chain_internal_append_index(std::string &expr, uint32_t base, const SPIRType *type, AccessChainFlags flags, bool &access_chain_is_arrayed, uint32_t index); std::string access_chain_internal(uint32_t base, const uint32_t *indices, uint32_t count, AccessChainFlags flags, AccessChainMeta *meta); spv::StorageClass get_expression_effective_storage_class(uint32_t ptr); virtual bool access_chain_needs_stage_io_builtin_translation(uint32_t base); virtual void check_physical_type_cast(std::string &expr, const SPIRType *type, uint32_t physical_type); virtual bool prepare_access_chain_for_scalar_access(std::string &expr, const SPIRType &type, spv::StorageClass storage, bool &is_packed); std::string access_chain(uint32_t base, const uint32_t *indices, uint32_t count, const SPIRType &target_type, AccessChainMeta *meta = nullptr, bool ptr_chain = false); std::string flattened_access_chain(uint32_t base, const uint32_t *indices, uint32_t count, const SPIRType &target_type, uint32_t offset, uint32_t matrix_stride, uint32_t array_stride, bool need_transpose); std::string flattened_access_chain_struct(uint32_t base, const uint32_t *indices, uint32_t count, const SPIRType &target_type, uint32_t offset); std::string flattened_access_chain_matrix(uint32_t base, const uint32_t *indices, uint32_t count, const SPIRType &target_type, uint32_t offset, uint32_t matrix_stride, bool need_transpose); std::string flattened_access_chain_vector(uint32_t base, const uint32_t *indices, uint32_t count, const SPIRType &target_type, uint32_t offset, uint32_t matrix_stride, bool need_transpose); std::pair flattened_access_chain_offset(const SPIRType &basetype, const uint32_t *indices, uint32_t count, uint32_t offset, uint32_t word_stride, bool *need_transpose = nullptr, uint32_t *matrix_stride = nullptr, uint32_t *array_stride = nullptr, bool ptr_chain = false); const char *index_to_swizzle(uint32_t index); std::string remap_swizzle(const SPIRType &result_type, uint32_t input_components, const std::string &expr); std::string declare_temporary(uint32_t type, uint32_t id); void emit_uninitialized_temporary(uint32_t type, uint32_t id); SPIRExpression &emit_uninitialized_temporary_expression(uint32_t type, uint32_t id); void append_global_func_args(const SPIRFunction &func, uint32_t index, SmallVector &arglist); std::string to_non_uniform_aware_expression(uint32_t id); std::string to_expression(uint32_t id, bool register_expression_read = true); std::string to_composite_constructor_expression(const SPIRType &parent_type, uint32_t id, bool block_like_type); std::string to_rerolled_array_expression(const SPIRType &parent_type, const std::string &expr, const SPIRType &type); std::string to_enclosed_expression(uint32_t id, bool register_expression_read = true); std::string to_unpacked_expression(uint32_t id, bool register_expression_read = true); std::string to_unpacked_row_major_matrix_expression(uint32_t id); std::string to_enclosed_unpacked_expression(uint32_t id, bool register_expression_read = true); std::string to_dereferenced_expression(uint32_t id, bool register_expression_read = true); std::string to_pointer_expression(uint32_t id, bool register_expression_read = true); std::string to_enclosed_pointer_expression(uint32_t id, bool register_expression_read = true); std::string to_extract_component_expression(uint32_t id, uint32_t index); std::string to_extract_constant_composite_expression(uint32_t result_type, const SPIRConstant &c, const uint32_t *chain, uint32_t length); static bool needs_enclose_expression(const std::string &expr); std::string enclose_expression(const std::string &expr); std::string dereference_expression(const SPIRType &expression_type, const std::string &expr); std::string address_of_expression(const std::string &expr); void strip_enclosed_expression(std::string &expr); std::string to_member_name(const SPIRType &type, uint32_t index); virtual std::string to_member_reference(uint32_t base, const SPIRType &type, uint32_t index, bool ptr_chain_is_resolved); std::string to_multi_member_reference(const SPIRType &type, const SmallVector &indices); std::string type_to_glsl_constructor(const SPIRType &type); std::string argument_decl(const SPIRFunction::Parameter &arg); virtual std::string to_qualifiers_glsl(uint32_t id); void fixup_io_block_patch_primitive_qualifiers(const SPIRVariable &var); void emit_output_variable_initializer(const SPIRVariable &var); std::string to_precision_qualifiers_glsl(uint32_t id); virtual const char *to_storage_qualifiers_glsl(const SPIRVariable &var); std::string flags_to_qualifiers_glsl(const SPIRType &type, const Bitset &flags); const char *format_to_glsl(spv::ImageFormat format); virtual std::string layout_for_member(const SPIRType &type, uint32_t index); virtual std::string to_interpolation_qualifiers(const Bitset &flags); std::string layout_for_variable(const SPIRVariable &variable); std::string to_combined_image_sampler(VariableID image_id, VariableID samp_id); virtual bool skip_argument(uint32_t id) const; virtual bool emit_array_copy(const char *expr, uint32_t lhs_id, uint32_t rhs_id, spv::StorageClass lhs_storage, spv::StorageClass rhs_storage); virtual void emit_block_hints(const SPIRBlock &block); virtual std::string to_initializer_expression(const SPIRVariable &var); virtual std::string to_zero_initialized_expression(uint32_t type_id); bool type_can_zero_initialize(const SPIRType &type) const; bool buffer_is_packing_standard(const SPIRType &type, BufferPackingStandard packing, uint32_t *failed_index = nullptr, uint32_t start_offset = 0, uint32_t end_offset = ~(0u)); std::string buffer_to_packing_standard(const SPIRType &type, bool support_std430_without_scalar_layout); uint32_t type_to_packed_base_size(const SPIRType &type, BufferPackingStandard packing); uint32_t type_to_packed_alignment(const SPIRType &type, const Bitset &flags, BufferPackingStandard packing); uint32_t type_to_packed_array_stride(const SPIRType &type, const Bitset &flags, BufferPackingStandard packing); uint32_t type_to_packed_size(const SPIRType &type, const Bitset &flags, BufferPackingStandard packing); uint32_t type_to_location_count(const SPIRType &type) const; std::string bitcast_glsl(const SPIRType &result_type, uint32_t arg); virtual std::string bitcast_glsl_op(const SPIRType &result_type, const SPIRType &argument_type); std::string bitcast_expression(SPIRType::BaseType target_type, uint32_t arg); std::string bitcast_expression(const SPIRType &target_type, SPIRType::BaseType expr_type, const std::string &expr); std::string build_composite_combiner(uint32_t result_type, const uint32_t *elems, uint32_t length); bool remove_duplicate_swizzle(std::string &op); bool remove_unity_swizzle(uint32_t base, std::string &op); // Can modify flags to remote readonly/writeonly if image type // and force recompile. bool check_atomic_image(uint32_t id); virtual void replace_illegal_names(); void replace_illegal_names(const std::unordered_set &keywords); virtual void emit_entry_point_declarations(); void replace_fragment_output(SPIRVariable &var); void replace_fragment_outputs(); std::string legacy_tex_op(const std::string &op, const SPIRType &imgtype, uint32_t id); void forward_relaxed_precision(uint32_t dst_id, const uint32_t *args, uint32_t length); void analyze_precision_requirements(uint32_t type_id, uint32_t dst_id, uint32_t *args, uint32_t length); Options::Precision analyze_expression_precision(const uint32_t *args, uint32_t length) const; uint32_t indent = 0; std::unordered_set emitted_functions; // Ensure that we declare phi-variable copies even if the original declaration isn't deferred std::unordered_set flushed_phi_variables; std::unordered_set flattened_buffer_blocks; std::unordered_map flattened_structs; ShaderSubgroupSupportHelper shader_subgroup_supporter; std::string load_flattened_struct(const std::string &basename, const SPIRType &type); std::string to_flattened_struct_member(const std::string &basename, const SPIRType &type, uint32_t index); void store_flattened_struct(uint32_t lhs_id, uint32_t value); void store_flattened_struct(const std::string &basename, uint32_t rhs, const SPIRType &type, const SmallVector &indices); std::string to_flattened_access_chain_expression(uint32_t id); // Usage tracking. If a temporary is used more than once, use the temporary instead to // avoid AST explosion when SPIRV is generated with pure SSA and doesn't write stuff to variables. std::unordered_map expression_usage_counts; void track_expression_read(uint32_t id); SmallVector forced_extensions; SmallVector header_lines; // Used when expressions emit extra opcodes with their own unique IDs, // and we need to reuse the IDs across recompilation loops. // Currently used by NMin/Max/Clamp implementations. std::unordered_map extra_sub_expressions; SmallVector workaround_ubo_load_overload_types; void request_workaround_wrapper_overload(TypeID id); void rewrite_load_for_wrapped_row_major(std::string &expr, TypeID loaded_type, ID ptr); uint32_t statement_count = 0; inline bool is_legacy() const { return (options.es && options.version < 300) || (!options.es && options.version < 130); } inline bool is_legacy_es() const { return options.es && options.version < 300; } inline bool is_legacy_desktop() const { return !options.es && options.version < 130; } enum Polyfill : uint32_t { PolyfillTranspose2x2 = 1 << 0, PolyfillTranspose3x3 = 1 << 1, PolyfillTranspose4x4 = 1 << 2, PolyfillDeterminant2x2 = 1 << 3, PolyfillDeterminant3x3 = 1 << 4, PolyfillDeterminant4x4 = 1 << 5, PolyfillMatrixInverse2x2 = 1 << 6, PolyfillMatrixInverse3x3 = 1 << 7, PolyfillMatrixInverse4x4 = 1 << 8, }; uint32_t required_polyfills = 0; uint32_t required_polyfills_relaxed = 0; void require_polyfill(Polyfill polyfill, bool relaxed); bool ray_tracing_is_khr = false; bool barycentric_is_nv = false; void ray_tracing_khr_fixup_locations(); bool args_will_forward(uint32_t id, const uint32_t *args, uint32_t num_args, bool pure); void register_call_out_argument(uint32_t id); void register_impure_function_call(); void register_control_dependent_expression(uint32_t expr); // GL_EXT_shader_pixel_local_storage support. std::vector pls_inputs; std::vector pls_outputs; std::string pls_decl(const PlsRemap &variable); const char *to_pls_qualifiers_glsl(const SPIRVariable &variable); void emit_pls(); void remap_pls_variables(); // GL_EXT_shader_framebuffer_fetch support. std::vector> subpass_to_framebuffer_fetch_attachment; std::vector> inout_color_attachments; bool location_is_framebuffer_fetch(uint32_t location) const; bool location_is_non_coherent_framebuffer_fetch(uint32_t location) const; bool subpass_input_is_framebuffer_fetch(uint32_t id) const; void emit_inout_fragment_outputs_copy_to_subpass_inputs(); const SPIRVariable *find_subpass_input_by_attachment_index(uint32_t index) const; const SPIRVariable *find_color_output_by_location(uint32_t location) const; // A variant which takes two sets of name. The secondary is only used to verify there are no collisions, // but the set is not updated when we have found a new name. // Used primarily when adding block interface names. void add_variable(std::unordered_set &variables_primary, const std::unordered_set &variables_secondary, std::string &name); void check_function_call_constraints(const uint32_t *args, uint32_t length); void handle_invalid_expression(uint32_t id); void force_temporary_and_recompile(uint32_t id); void find_static_extensions(); uint32_t consume_temporary_in_precision_context(uint32_t type_id, uint32_t id, Options::Precision precision); std::unordered_map temporary_to_mirror_precision_alias; std::unordered_set composite_insert_overwritten; std::unordered_set block_composite_insert_overwrite; std::string emit_for_loop_initializers(const SPIRBlock &block); void emit_while_loop_initializers(const SPIRBlock &block); bool for_loop_initializers_are_same_type(const SPIRBlock &block); bool optimize_read_modify_write(const SPIRType &type, const std::string &lhs, const std::string &rhs); void fixup_image_load_store_access(); bool type_is_empty(const SPIRType &type); bool can_use_io_location(spv::StorageClass storage, bool block); const Instruction *get_next_instruction_in_block(const Instruction &instr); static uint32_t mask_relevant_memory_semantics(uint32_t semantics); std::string convert_half_to_string(const SPIRConstant &value, uint32_t col, uint32_t row); std::string convert_float_to_string(const SPIRConstant &value, uint32_t col, uint32_t row); std::string convert_double_to_string(const SPIRConstant &value, uint32_t col, uint32_t row); std::string convert_separate_image_to_expression(uint32_t id); // Builtins in GLSL are always specific signedness, but the SPIR-V can declare them // as either unsigned or signed. // Sometimes we will need to automatically perform casts on load and store to make this work. virtual SPIRType::BaseType get_builtin_basetype(spv::BuiltIn builtin, SPIRType::BaseType default_type); virtual void cast_to_variable_store(uint32_t target_id, std::string &expr, const SPIRType &expr_type); virtual void cast_from_variable_load(uint32_t source_id, std::string &expr, const SPIRType &expr_type); void unroll_array_from_complex_load(uint32_t target_id, uint32_t source_id, std::string &expr); bool unroll_array_to_complex_store(uint32_t target_id, uint32_t source_id); void convert_non_uniform_expression(std::string &expr, uint32_t ptr_id); void handle_store_to_invariant_variable(uint32_t store_id, uint32_t value_id); void disallow_forwarding_in_expression_chain(const SPIRExpression &expr); bool expression_is_constant_null(uint32_t id) const; bool expression_is_non_value_type_array(uint32_t ptr); virtual void emit_store_statement(uint32_t lhs_expression, uint32_t rhs_expression); uint32_t get_integer_width_for_instruction(const Instruction &instr) const; uint32_t get_integer_width_for_glsl_instruction(GLSLstd450 op, const uint32_t *arguments, uint32_t length) const; bool variable_is_lut(const SPIRVariable &var) const; char current_locale_radix_character = '.'; void fixup_type_alias(); void reorder_type_alias(); void fixup_anonymous_struct_names(); void fixup_anonymous_struct_names(std::unordered_set &visited, const SPIRType &type); static const char *vector_swizzle(int vecsize, int index); bool is_stage_output_location_masked(uint32_t location, uint32_t component) const; bool is_stage_output_builtin_masked(spv::BuiltIn builtin) const; bool is_stage_output_variable_masked(const SPIRVariable &var) const; bool is_stage_output_block_member_masked(const SPIRVariable &var, uint32_t index, bool strip_array) const; bool is_per_primitive_variable(const SPIRVariable &var) const; uint32_t get_accumulated_member_location(const SPIRVariable &var, uint32_t mbr_idx, bool strip_array) const; uint32_t get_declared_member_location(const SPIRVariable &var, uint32_t mbr_idx, bool strip_array) const; std::unordered_set masked_output_locations; std::unordered_set masked_output_builtins; FloatFormatter *float_formatter = nullptr; std::string format_float(float value) const; std::string format_double(double value) const; private: void init(); SmallVector get_composite_constant_ids(ConstantID const_id); void fill_composite_constant(SPIRConstant &constant, TypeID type_id, const SmallVector &initializers); void set_composite_constant(ConstantID const_id, TypeID type_id, const SmallVector &initializers); TypeID get_composite_member_type(TypeID type_id, uint32_t member_idx); std::unordered_map> const_composite_insert_ids; }; } // namespace SPIRV_CROSS_NAMESPACE #endif ================================================ FILE: src/libraries/spirv_cross/spirv_hlsl.cpp ================================================ /* * Copyright 2016-2021 Robert Konrad * SPDX-License-Identifier: Apache-2.0 OR MIT * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ /* * At your option, you may choose to accept this material under either: * 1. The Apache License, Version 2.0, found at , or * 2. The MIT License, found at . */ #include "spirv_hlsl.hpp" #include "GLSL.std.450.h" #include #include using namespace spv; using namespace SPIRV_CROSS_NAMESPACE; using namespace std; enum class ImageFormatNormalizedState { None = 0, Unorm = 1, Snorm = 2 }; static ImageFormatNormalizedState image_format_to_normalized_state(ImageFormat fmt) { switch (fmt) { case ImageFormatR8: case ImageFormatR16: case ImageFormatRg8: case ImageFormatRg16: case ImageFormatRgba8: case ImageFormatRgba16: case ImageFormatRgb10A2: return ImageFormatNormalizedState::Unorm; case ImageFormatR8Snorm: case ImageFormatR16Snorm: case ImageFormatRg8Snorm: case ImageFormatRg16Snorm: case ImageFormatRgba8Snorm: case ImageFormatRgba16Snorm: return ImageFormatNormalizedState::Snorm; default: break; } return ImageFormatNormalizedState::None; } static unsigned image_format_to_components(ImageFormat fmt) { switch (fmt) { case ImageFormatR8: case ImageFormatR16: case ImageFormatR8Snorm: case ImageFormatR16Snorm: case ImageFormatR16f: case ImageFormatR32f: case ImageFormatR8i: case ImageFormatR16i: case ImageFormatR32i: case ImageFormatR8ui: case ImageFormatR16ui: case ImageFormatR32ui: return 1; case ImageFormatRg8: case ImageFormatRg16: case ImageFormatRg8Snorm: case ImageFormatRg16Snorm: case ImageFormatRg16f: case ImageFormatRg32f: case ImageFormatRg8i: case ImageFormatRg16i: case ImageFormatRg32i: case ImageFormatRg8ui: case ImageFormatRg16ui: case ImageFormatRg32ui: return 2; case ImageFormatR11fG11fB10f: return 3; case ImageFormatRgba8: case ImageFormatRgba16: case ImageFormatRgb10A2: case ImageFormatRgba8Snorm: case ImageFormatRgba16Snorm: case ImageFormatRgba16f: case ImageFormatRgba32f: case ImageFormatRgba8i: case ImageFormatRgba16i: case ImageFormatRgba32i: case ImageFormatRgba8ui: case ImageFormatRgba16ui: case ImageFormatRgba32ui: case ImageFormatRgb10a2ui: return 4; case ImageFormatUnknown: return 4; // Assume 4. default: SPIRV_CROSS_THROW("Unrecognized typed image format."); } } static string image_format_to_type(ImageFormat fmt, SPIRType::BaseType basetype) { switch (fmt) { case ImageFormatR8: case ImageFormatR16: if (basetype != SPIRType::Float) SPIRV_CROSS_THROW("Mismatch in image type and base type of image."); return "unorm float"; case ImageFormatRg8: case ImageFormatRg16: if (basetype != SPIRType::Float) SPIRV_CROSS_THROW("Mismatch in image type and base type of image."); return "unorm float2"; case ImageFormatRgba8: case ImageFormatRgba16: if (basetype != SPIRType::Float) SPIRV_CROSS_THROW("Mismatch in image type and base type of image."); return "unorm float4"; case ImageFormatRgb10A2: if (basetype != SPIRType::Float) SPIRV_CROSS_THROW("Mismatch in image type and base type of image."); return "unorm float4"; case ImageFormatR8Snorm: case ImageFormatR16Snorm: if (basetype != SPIRType::Float) SPIRV_CROSS_THROW("Mismatch in image type and base type of image."); return "snorm float"; case ImageFormatRg8Snorm: case ImageFormatRg16Snorm: if (basetype != SPIRType::Float) SPIRV_CROSS_THROW("Mismatch in image type and base type of image."); return "snorm float2"; case ImageFormatRgba8Snorm: case ImageFormatRgba16Snorm: if (basetype != SPIRType::Float) SPIRV_CROSS_THROW("Mismatch in image type and base type of image."); return "snorm float4"; case ImageFormatR16f: case ImageFormatR32f: if (basetype != SPIRType::Float) SPIRV_CROSS_THROW("Mismatch in image type and base type of image."); return "float"; case ImageFormatRg16f: case ImageFormatRg32f: if (basetype != SPIRType::Float) SPIRV_CROSS_THROW("Mismatch in image type and base type of image."); return "float2"; case ImageFormatRgba16f: case ImageFormatRgba32f: if (basetype != SPIRType::Float) SPIRV_CROSS_THROW("Mismatch in image type and base type of image."); return "float4"; case ImageFormatR11fG11fB10f: if (basetype != SPIRType::Float) SPIRV_CROSS_THROW("Mismatch in image type and base type of image."); return "float3"; case ImageFormatR8i: case ImageFormatR16i: case ImageFormatR32i: if (basetype != SPIRType::Int) SPIRV_CROSS_THROW("Mismatch in image type and base type of image."); return "int"; case ImageFormatRg8i: case ImageFormatRg16i: case ImageFormatRg32i: if (basetype != SPIRType::Int) SPIRV_CROSS_THROW("Mismatch in image type and base type of image."); return "int2"; case ImageFormatRgba8i: case ImageFormatRgba16i: case ImageFormatRgba32i: if (basetype != SPIRType::Int) SPIRV_CROSS_THROW("Mismatch in image type and base type of image."); return "int4"; case ImageFormatR8ui: case ImageFormatR16ui: case ImageFormatR32ui: if (basetype != SPIRType::UInt) SPIRV_CROSS_THROW("Mismatch in image type and base type of image."); return "uint"; case ImageFormatRg8ui: case ImageFormatRg16ui: case ImageFormatRg32ui: if (basetype != SPIRType::UInt) SPIRV_CROSS_THROW("Mismatch in image type and base type of image."); return "uint2"; case ImageFormatRgba8ui: case ImageFormatRgba16ui: case ImageFormatRgba32ui: if (basetype != SPIRType::UInt) SPIRV_CROSS_THROW("Mismatch in image type and base type of image."); return "uint4"; case ImageFormatRgb10a2ui: if (basetype != SPIRType::UInt) SPIRV_CROSS_THROW("Mismatch in image type and base type of image."); return "uint4"; case ImageFormatUnknown: switch (basetype) { case SPIRType::Float: return "float4"; case SPIRType::Int: return "int4"; case SPIRType::UInt: return "uint4"; default: SPIRV_CROSS_THROW("Unsupported base type for image."); } default: SPIRV_CROSS_THROW("Unrecognized typed image format."); } } string CompilerHLSL::image_type_hlsl_modern(const SPIRType &type, uint32_t id) { auto &imagetype = get(type.image.type); const char *dim = nullptr; bool typed_load = false; uint32_t components = 4; bool force_image_srv = hlsl_options.nonwritable_uav_texture_as_srv && has_decoration(id, DecorationNonWritable); switch (type.image.dim) { case Dim1D: typed_load = type.image.sampled == 2; dim = "1D"; break; case Dim2D: typed_load = type.image.sampled == 2; dim = "2D"; break; case Dim3D: typed_load = type.image.sampled == 2; dim = "3D"; break; case DimCube: if (type.image.sampled == 2) SPIRV_CROSS_THROW("RWTextureCube does not exist in HLSL."); dim = "Cube"; break; case DimRect: SPIRV_CROSS_THROW("Rectangle texture support is not yet implemented for HLSL."); // TODO case DimBuffer: if (type.image.sampled == 1) return join("Buffer<", type_to_glsl(imagetype), components, ">"); else if (type.image.sampled == 2) { if (interlocked_resources.count(id)) return join("RasterizerOrderedBuffer<", image_format_to_type(type.image.format, imagetype.basetype), ">"); typed_load = !force_image_srv && type.image.sampled == 2; const char *rw = force_image_srv ? "" : "RW"; return join(rw, "Buffer<", typed_load ? image_format_to_type(type.image.format, imagetype.basetype) : join(type_to_glsl(imagetype), components), ">"); } else SPIRV_CROSS_THROW("Sampler buffers must be either sampled or unsampled. Cannot deduce in runtime."); case DimSubpassData: dim = "2D"; typed_load = false; break; default: SPIRV_CROSS_THROW("Invalid dimension."); } const char *arrayed = type.image.arrayed ? "Array" : ""; const char *ms = type.image.ms ? "MS" : ""; const char *rw = typed_load && !force_image_srv ? "RW" : ""; if (force_image_srv) typed_load = false; if (typed_load && interlocked_resources.count(id)) rw = "RasterizerOrdered"; return join(rw, "Texture", dim, ms, arrayed, "<", typed_load ? image_format_to_type(type.image.format, imagetype.basetype) : join(type_to_glsl(imagetype), components), ">"); } string CompilerHLSL::image_type_hlsl_legacy(const SPIRType &type, uint32_t /*id*/) { auto &imagetype = get(type.image.type); string res; switch (imagetype.basetype) { case SPIRType::Int: res = "i"; break; case SPIRType::UInt: res = "u"; break; default: break; } if (type.basetype == SPIRType::Image && type.image.dim == DimSubpassData) return res + "subpassInput" + (type.image.ms ? "MS" : ""); // If we're emulating subpassInput with samplers, force sampler2D // so we don't have to specify format. if (type.basetype == SPIRType::Image && type.image.dim != DimSubpassData) { // Sampler buffers are always declared as samplerBuffer even though they might be separate images in the SPIR-V. if (type.image.dim == DimBuffer && type.image.sampled == 1) res += "sampler"; else res += type.image.sampled == 2 ? "image" : "texture"; } else res += "sampler"; switch (type.image.dim) { case Dim1D: res += "1D"; break; case Dim2D: res += "2D"; break; case Dim3D: res += "3D"; break; case DimCube: res += "CUBE"; break; case DimBuffer: res += "Buffer"; break; case DimSubpassData: res += "2D"; break; default: SPIRV_CROSS_THROW("Only 1D, 2D, 3D, Buffer, InputTarget and Cube textures supported."); } if (type.image.ms) res += "MS"; if (type.image.arrayed) res += "Array"; return res; } string CompilerHLSL::image_type_hlsl(const SPIRType &type, uint32_t id) { if (hlsl_options.shader_model <= 30) return image_type_hlsl_legacy(type, id); else return image_type_hlsl_modern(type, id); } // The optional id parameter indicates the object whose type we are trying // to find the description for. It is optional. Most type descriptions do not // depend on a specific object's use of that type. string CompilerHLSL::type_to_glsl(const SPIRType &type, uint32_t id) { // Ignore the pointer type since GLSL doesn't have pointers. switch (type.basetype) { case SPIRType::Struct: // Need OpName lookup here to get a "sensible" name for a struct. if (backend.explicit_struct_type) return join("struct ", to_name(type.self)); else return to_name(type.self); case SPIRType::Image: case SPIRType::SampledImage: return image_type_hlsl(type, id); case SPIRType::Sampler: return comparison_ids.count(id) ? "SamplerComparisonState" : "SamplerState"; case SPIRType::Void: return "void"; default: break; } if (type.vecsize == 1 && type.columns == 1) // Scalar builtin { switch (type.basetype) { case SPIRType::Boolean: return "bool"; case SPIRType::Int: return backend.basic_int_type; case SPIRType::UInt: return backend.basic_uint_type; case SPIRType::AtomicCounter: return "atomic_uint"; case SPIRType::Half: if (hlsl_options.enable_16bit_types) return "half"; else return "min16float"; case SPIRType::Short: if (hlsl_options.enable_16bit_types) return "int16_t"; else return "min16int"; case SPIRType::UShort: if (hlsl_options.enable_16bit_types) return "uint16_t"; else return "min16uint"; case SPIRType::Float: return "float"; case SPIRType::Double: return "double"; case SPIRType::Int64: if (hlsl_options.shader_model < 60) SPIRV_CROSS_THROW("64-bit integers only supported in SM 6.0."); return "int64_t"; case SPIRType::UInt64: if (hlsl_options.shader_model < 60) SPIRV_CROSS_THROW("64-bit integers only supported in SM 6.0."); return "uint64_t"; case SPIRType::AccelerationStructure: return "RaytracingAccelerationStructure"; case SPIRType::RayQuery: return "RayQuery"; default: return "???"; } } else if (type.vecsize > 1 && type.columns == 1) // Vector builtin { switch (type.basetype) { case SPIRType::Boolean: return join("bool", type.vecsize); case SPIRType::Int: return join("int", type.vecsize); case SPIRType::UInt: return join("uint", type.vecsize); case SPIRType::Half: return join(hlsl_options.enable_16bit_types ? "half" : "min16float", type.vecsize); case SPIRType::Short: return join(hlsl_options.enable_16bit_types ? "int16_t" : "min16int", type.vecsize); case SPIRType::UShort: return join(hlsl_options.enable_16bit_types ? "uint16_t" : "min16uint", type.vecsize); case SPIRType::Float: return join("float", type.vecsize); case SPIRType::Double: return join("double", type.vecsize); case SPIRType::Int64: return join("i64vec", type.vecsize); case SPIRType::UInt64: return join("u64vec", type.vecsize); default: return "???"; } } else { switch (type.basetype) { case SPIRType::Boolean: return join("bool", type.columns, "x", type.vecsize); case SPIRType::Int: return join("int", type.columns, "x", type.vecsize); case SPIRType::UInt: return join("uint", type.columns, "x", type.vecsize); case SPIRType::Half: return join(hlsl_options.enable_16bit_types ? "half" : "min16float", type.columns, "x", type.vecsize); case SPIRType::Short: return join(hlsl_options.enable_16bit_types ? "int16_t" : "min16int", type.columns, "x", type.vecsize); case SPIRType::UShort: return join(hlsl_options.enable_16bit_types ? "uint16_t" : "min16uint", type.columns, "x", type.vecsize); case SPIRType::Float: return join("float", type.columns, "x", type.vecsize); case SPIRType::Double: return join("double", type.columns, "x", type.vecsize); // Matrix types not supported for int64/uint64. default: return "???"; } } } void CompilerHLSL::emit_header() { for (auto &header : header_lines) statement(header); if (header_lines.size() > 0) { statement(""); } } void CompilerHLSL::emit_interface_block_globally(const SPIRVariable &var) { add_resource_name(var.self); // The global copies of I/O variables should not contain interpolation qualifiers. // These are emitted inside the interface structs. auto &flags = ir.meta[var.self].decoration.decoration_flags; auto old_flags = flags; flags.reset(); statement("static ", variable_decl(var), ";"); flags = old_flags; } const char *CompilerHLSL::to_storage_qualifiers_glsl(const SPIRVariable &var) { // Input and output variables are handled specially in HLSL backend. // The variables are declared as global, private variables, and do not need any qualifiers. if (var.storage == StorageClassUniformConstant || var.storage == StorageClassUniform || var.storage == StorageClassPushConstant) { return "uniform "; } return ""; } void CompilerHLSL::emit_builtin_outputs_in_struct() { auto &execution = get_entry_point(); bool legacy = hlsl_options.shader_model <= 30; active_output_builtins.for_each_bit([&](uint32_t i) { const char *type = nullptr; const char *semantic = nullptr; auto builtin = static_cast(i); switch (builtin) { case BuiltInPosition: type = is_position_invariant() && backend.support_precise_qualifier ? "precise float4" : "float4"; semantic = legacy ? "POSITION" : "SV_Position"; break; case BuiltInSampleMask: if (hlsl_options.shader_model < 41 || execution.model != ExecutionModelFragment) SPIRV_CROSS_THROW("Sample Mask output is only supported in PS 4.1 or higher."); type = "uint"; semantic = "SV_Coverage"; break; case BuiltInFragDepth: type = "float"; if (legacy) { semantic = "DEPTH"; } else { if (hlsl_options.shader_model >= 50 && execution.flags.get(ExecutionModeDepthGreater)) semantic = "SV_DepthGreaterEqual"; else if (hlsl_options.shader_model >= 50 && execution.flags.get(ExecutionModeDepthLess)) semantic = "SV_DepthLessEqual"; else semantic = "SV_Depth"; } break; case BuiltInClipDistance: { static const char *types[] = { "float", "float2", "float3", "float4" }; // HLSL is a bit weird here, use SV_ClipDistance0, SV_ClipDistance1 and so on with vectors. if (execution.model == ExecutionModelMeshEXT) { if (clip_distance_count > 4) SPIRV_CROSS_THROW("Clip distance count > 4 not supported for mesh shaders."); if (clip_distance_count == 1) { // Avoids having to hack up access_chain code. Makes it trivially indexable. statement("float gl_ClipDistance[1] : SV_ClipDistance;"); } else { // Replace array with vector directly, avoids any weird fixup path. statement(types[clip_distance_count - 1], " gl_ClipDistance : SV_ClipDistance;"); } } else { for (uint32_t clip = 0; clip < clip_distance_count; clip += 4) { uint32_t to_declare = clip_distance_count - clip; if (to_declare > 4) to_declare = 4; uint32_t semantic_index = clip / 4; statement(types[to_declare - 1], " ", builtin_to_glsl(builtin, StorageClassOutput), semantic_index, " : SV_ClipDistance", semantic_index, ";"); } } break; } case BuiltInCullDistance: { static const char *types[] = { "float", "float2", "float3", "float4" }; // HLSL is a bit weird here, use SV_CullDistance0, SV_CullDistance1 and so on with vectors. if (execution.model == ExecutionModelMeshEXT) { if (cull_distance_count > 4) SPIRV_CROSS_THROW("Cull distance count > 4 not supported for mesh shaders."); if (cull_distance_count == 1) { // Avoids having to hack up access_chain code. Makes it trivially indexable. statement("float gl_CullDistance[1] : SV_CullDistance;"); } else { // Replace array with vector directly, avoids any weird fixup path. statement(types[cull_distance_count - 1], " gl_CullDistance : SV_CullDistance;"); } } else { for (uint32_t cull = 0; cull < cull_distance_count; cull += 4) { uint32_t to_declare = cull_distance_count - cull; if (to_declare > 4) to_declare = 4; uint32_t semantic_index = cull / 4; statement(types[to_declare - 1], " ", builtin_to_glsl(builtin, StorageClassOutput), semantic_index, " : SV_CullDistance", semantic_index, ";"); } } break; } case BuiltInPointSize: // If point_size_compat is enabled, just ignore PointSize. // PointSize does not exist in HLSL, but some code bases might want to be able to use these shaders, // even if it means working around the missing feature. if (legacy) { type = "float"; semantic = "PSIZE"; } else if (!hlsl_options.point_size_compat) SPIRV_CROSS_THROW("Unsupported builtin in HLSL."); break; case BuiltInLayer: case BuiltInPrimitiveId: case BuiltInViewportIndex: case BuiltInPrimitiveShadingRateKHR: case BuiltInCullPrimitiveEXT: // per-primitive attributes handled separatly break; case BuiltInPrimitivePointIndicesEXT: case BuiltInPrimitiveLineIndicesEXT: case BuiltInPrimitiveTriangleIndicesEXT: // meshlet local-index buffer handled separatly break; default: SPIRV_CROSS_THROW("Unsupported builtin in HLSL."); } if (type && semantic) statement(type, " ", builtin_to_glsl(builtin, StorageClassOutput), " : ", semantic, ";"); }); } void CompilerHLSL::emit_builtin_primitive_outputs_in_struct() { active_output_builtins.for_each_bit([&](uint32_t i) { const char *type = nullptr; const char *semantic = nullptr; auto builtin = static_cast(i); switch (builtin) { case BuiltInLayer: { if (hlsl_options.shader_model < 50) SPIRV_CROSS_THROW("Render target array index output is only supported in SM 5.0 or higher."); type = "uint"; semantic = "SV_RenderTargetArrayIndex"; break; } case BuiltInPrimitiveId: type = "uint"; semantic = "SV_PrimitiveID"; break; case BuiltInViewportIndex: type = "uint"; semantic = "SV_ViewportArrayIndex"; break; case BuiltInPrimitiveShadingRateKHR: type = "uint"; semantic = "SV_ShadingRate"; break; case BuiltInCullPrimitiveEXT: type = "bool"; semantic = "SV_CullPrimitive"; break; default: break; } if (type && semantic) statement(type, " ", builtin_to_glsl(builtin, StorageClassOutput), " : ", semantic, ";"); }); } void CompilerHLSL::emit_builtin_inputs_in_struct() { bool legacy = hlsl_options.shader_model <= 30; active_input_builtins.for_each_bit([&](uint32_t i) { const char *type = nullptr; const char *semantic = nullptr; auto builtin = static_cast(i); switch (builtin) { case BuiltInFragCoord: type = "float4"; semantic = legacy ? "VPOS" : "SV_Position"; break; case BuiltInVertexId: case BuiltInVertexIndex: if (legacy) SPIRV_CROSS_THROW("Vertex index not supported in SM 3.0 or lower."); type = "uint"; semantic = "SV_VertexID"; break; case BuiltInPrimitiveId: type = "uint"; semantic = "SV_PrimitiveID"; break; case BuiltInInstanceId: case BuiltInInstanceIndex: if (legacy) SPIRV_CROSS_THROW("Instance index not supported in SM 3.0 or lower."); type = "uint"; semantic = "SV_InstanceID"; break; case BuiltInSampleId: if (legacy) SPIRV_CROSS_THROW("Sample ID not supported in SM 3.0 or lower."); type = "uint"; semantic = "SV_SampleIndex"; break; case BuiltInSampleMask: if (hlsl_options.shader_model < 50 || get_entry_point().model != ExecutionModelFragment) SPIRV_CROSS_THROW("Sample Mask input is only supported in PS 5.0 or higher."); type = "uint"; semantic = "SV_Coverage"; break; case BuiltInGlobalInvocationId: type = "uint3"; semantic = "SV_DispatchThreadID"; break; case BuiltInLocalInvocationId: type = "uint3"; semantic = "SV_GroupThreadID"; break; case BuiltInLocalInvocationIndex: type = "uint"; semantic = "SV_GroupIndex"; break; case BuiltInWorkgroupId: type = "uint3"; semantic = "SV_GroupID"; break; case BuiltInFrontFacing: type = "bool"; semantic = "SV_IsFrontFace"; break; case BuiltInViewIndex: if (hlsl_options.shader_model < 61 || (get_entry_point().model != ExecutionModelVertex && get_entry_point().model != ExecutionModelFragment)) SPIRV_CROSS_THROW("View Index input is only supported in VS and PS 6.1 or higher."); type = "uint"; semantic = "SV_ViewID"; break; case BuiltInNumWorkgroups: case BuiltInSubgroupSize: case BuiltInSubgroupLocalInvocationId: case BuiltInSubgroupEqMask: case BuiltInSubgroupLtMask: case BuiltInSubgroupLeMask: case BuiltInSubgroupGtMask: case BuiltInSubgroupGeMask: case BuiltInBaseVertex: case BuiltInBaseInstance: // Handled specially. break; case BuiltInHelperInvocation: if (hlsl_options.shader_model < 50 || get_entry_point().model != ExecutionModelFragment) SPIRV_CROSS_THROW("Helper Invocation input is only supported in PS 5.0 or higher."); break; case BuiltInClipDistance: // HLSL is a bit weird here, use SV_ClipDistance0, SV_ClipDistance1 and so on with vectors. for (uint32_t clip = 0; clip < clip_distance_count; clip += 4) { uint32_t to_declare = clip_distance_count - clip; if (to_declare > 4) to_declare = 4; uint32_t semantic_index = clip / 4; static const char *types[] = { "float", "float2", "float3", "float4" }; statement(types[to_declare - 1], " ", builtin_to_glsl(builtin, StorageClassInput), semantic_index, " : SV_ClipDistance", semantic_index, ";"); } break; case BuiltInCullDistance: // HLSL is a bit weird here, use SV_CullDistance0, SV_CullDistance1 and so on with vectors. for (uint32_t cull = 0; cull < cull_distance_count; cull += 4) { uint32_t to_declare = cull_distance_count - cull; if (to_declare > 4) to_declare = 4; uint32_t semantic_index = cull / 4; static const char *types[] = { "float", "float2", "float3", "float4" }; statement(types[to_declare - 1], " ", builtin_to_glsl(builtin, StorageClassInput), semantic_index, " : SV_CullDistance", semantic_index, ";"); } break; case BuiltInPointCoord: // PointCoord is not supported, but provide a way to just ignore that, similar to PointSize. if (hlsl_options.point_coord_compat) break; else SPIRV_CROSS_THROW("Unsupported builtin in HLSL."); case BuiltInLayer: if (hlsl_options.shader_model < 50 || get_entry_point().model != ExecutionModelFragment) SPIRV_CROSS_THROW("Render target array index input is only supported in PS 5.0 or higher."); type = "uint"; semantic = "SV_RenderTargetArrayIndex"; break; default: SPIRV_CROSS_THROW("Unsupported builtin in HLSL."); } if (type && semantic) statement(type, " ", builtin_to_glsl(builtin, StorageClassInput), " : ", semantic, ";"); }); } uint32_t CompilerHLSL::type_to_consumed_locations(const SPIRType &type) const { // TODO: Need to verify correctness. uint32_t elements = 0; if (type.basetype == SPIRType::Struct) { for (uint32_t i = 0; i < uint32_t(type.member_types.size()); i++) elements += type_to_consumed_locations(get(type.member_types[i])); } else { uint32_t array_multiplier = 1; for (uint32_t i = 0; i < uint32_t(type.array.size()); i++) { if (type.array_size_literal[i]) array_multiplier *= type.array[i]; else array_multiplier *= evaluate_constant_u32(type.array[i]); } elements += array_multiplier * type.columns; } return elements; } string CompilerHLSL::to_interpolation_qualifiers(const Bitset &flags) { string res; //if (flags & (1ull << DecorationSmooth)) // res += "linear "; if (flags.get(DecorationFlat)) res += "nointerpolation "; if (flags.get(DecorationNoPerspective)) res += "noperspective "; if (flags.get(DecorationCentroid)) res += "centroid "; if (flags.get(DecorationPatch)) res += "patch "; // Seems to be different in actual HLSL. if (flags.get(DecorationSample)) res += "sample "; if (flags.get(DecorationInvariant) && backend.support_precise_qualifier) res += "precise "; // Not supported? return res; } std::string CompilerHLSL::to_semantic(uint32_t location, ExecutionModel em, StorageClass sc) { if (em == ExecutionModelVertex && sc == StorageClassInput) { // We have a vertex attribute - we should look at remapping it if the user provided // vertex attribute hints. for (auto &attribute : remap_vertex_attributes) if (attribute.location == location) return attribute.semantic; } // Not a vertex attribute, or no remap_vertex_attributes entry. return join("TEXCOORD", location); } std::string CompilerHLSL::to_initializer_expression(const SPIRVariable &var) { // We cannot emit static const initializer for block constants for practical reasons, // so just inline the initializer. // FIXME: There is a theoretical problem here if someone tries to composite extract // into this initializer since we don't declare it properly, but that is somewhat non-sensical. auto &type = get(var.basetype); bool is_block = has_decoration(type.self, DecorationBlock); auto *c = maybe_get(var.initializer); if (is_block && c) return constant_expression(*c); else return CompilerGLSL::to_initializer_expression(var); } void CompilerHLSL::emit_interface_block_member_in_struct(const SPIRVariable &var, uint32_t member_index, uint32_t location, std::unordered_set &active_locations) { auto &execution = get_entry_point(); auto type = get(var.basetype); auto semantic = to_semantic(location, execution.model, var.storage); auto mbr_name = join(to_name(type.self), "_", to_member_name(type, member_index)); auto &mbr_type = get(type.member_types[member_index]); statement(to_interpolation_qualifiers(get_member_decoration_bitset(type.self, member_index)), type_to_glsl(mbr_type), " ", mbr_name, type_to_array_glsl(mbr_type), " : ", semantic, ";"); // Structs and arrays should consume more locations. uint32_t consumed_locations = type_to_consumed_locations(mbr_type); for (uint32_t i = 0; i < consumed_locations; i++) active_locations.insert(location + i); } void CompilerHLSL::emit_interface_block_in_struct(const SPIRVariable &var, unordered_set &active_locations) { auto &execution = get_entry_point(); auto type = get(var.basetype); string binding; bool use_location_number = true; bool need_matrix_unroll = false; bool legacy = hlsl_options.shader_model <= 30; if (execution.model == ExecutionModelFragment && var.storage == StorageClassOutput) { // Dual-source blending is achieved in HLSL by emitting to SV_Target0 and 1. uint32_t index = get_decoration(var.self, DecorationIndex); uint32_t location = get_decoration(var.self, DecorationLocation); if (index != 0 && location != 0) SPIRV_CROSS_THROW("Dual-source blending is only supported on MRT #0 in HLSL."); binding = join(legacy ? "COLOR" : "SV_Target", location + index); use_location_number = false; if (legacy) // COLOR must be a four-component vector on legacy shader model targets (HLSL ERR_COLOR_4COMP) type.vecsize = 4; } else if (var.storage == StorageClassInput && execution.model == ExecutionModelVertex) { need_matrix_unroll = true; if (legacy) // Inputs must be floating-point in legacy targets. type.basetype = SPIRType::Float; } const auto get_vacant_location = [&]() -> uint32_t { for (uint32_t i = 0; i < 64; i++) if (!active_locations.count(i)) return i; SPIRV_CROSS_THROW("All locations from 0 to 63 are exhausted."); }; auto name = to_name(var.self); if (use_location_number) { uint32_t location_number; // If an explicit location exists, use it with TEXCOORD[N] semantic. // Otherwise, pick a vacant location. if (has_decoration(var.self, DecorationLocation)) location_number = get_decoration(var.self, DecorationLocation); else location_number = get_vacant_location(); // Allow semantic remap if specified. auto semantic = to_semantic(location_number, execution.model, var.storage); if (need_matrix_unroll && type.columns > 1) { if (!type.array.empty()) SPIRV_CROSS_THROW("Arrays of matrices used as input/output. This is not supported."); // Unroll matrices. for (uint32_t i = 0; i < type.columns; i++) { SPIRType newtype = type; newtype.columns = 1; string effective_semantic; if (hlsl_options.flatten_matrix_vertex_input_semantics) effective_semantic = to_semantic(location_number, execution.model, var.storage); else effective_semantic = join(semantic, "_", i); statement(to_interpolation_qualifiers(get_decoration_bitset(var.self)), variable_decl(newtype, join(name, "_", i)), " : ", effective_semantic, ";"); active_locations.insert(location_number++); } } else { auto decl_type = type; if (execution.model == ExecutionModelMeshEXT) { decl_type.array.erase(decl_type.array.begin()); decl_type.array_size_literal.erase(decl_type.array_size_literal.begin()); } statement(to_interpolation_qualifiers(get_decoration_bitset(var.self)), variable_decl(decl_type, name), " : ", semantic, ";"); // Structs and arrays should consume more locations. uint32_t consumed_locations = type_to_consumed_locations(decl_type); for (uint32_t i = 0; i < consumed_locations; i++) active_locations.insert(location_number + i); } } else { statement(variable_decl(type, name), " : ", binding, ";"); } } std::string CompilerHLSL::builtin_to_glsl(spv::BuiltIn builtin, spv::StorageClass storage) { switch (builtin) { case BuiltInVertexId: return "gl_VertexID"; case BuiltInInstanceId: return "gl_InstanceID"; case BuiltInNumWorkgroups: { if (!num_workgroups_builtin) SPIRV_CROSS_THROW("NumWorkgroups builtin is used, but remap_num_workgroups_builtin() was not called. " "Cannot emit code for this builtin."); auto &var = get(num_workgroups_builtin); auto &type = get(var.basetype); auto ret = join(to_name(num_workgroups_builtin), "_", get_member_name(type.self, 0)); ParsedIR::sanitize_underscores(ret); return ret; } case BuiltInPointCoord: // Crude hack, but there is no real alternative. This path is only enabled if point_coord_compat is set. return "float2(0.5f, 0.5f)"; case BuiltInSubgroupLocalInvocationId: return "WaveGetLaneIndex()"; case BuiltInSubgroupSize: return "WaveGetLaneCount()"; case BuiltInHelperInvocation: return "IsHelperLane()"; default: return CompilerGLSL::builtin_to_glsl(builtin, storage); } } void CompilerHLSL::emit_builtin_variables() { Bitset builtins = active_input_builtins; builtins.merge_or(active_output_builtins); std::unordered_map builtin_to_initializer; // We need to declare sample mask with the same type that module declares it. // Sample mask is somewhat special in that SPIR-V has an array, and we can copy that array, so we need to // match sign. SPIRType::BaseType sample_mask_in_basetype = SPIRType::Void; SPIRType::BaseType sample_mask_out_basetype = SPIRType::Void; ir.for_each_typed_id([&](uint32_t, SPIRVariable &var) { if (!is_builtin_variable(var)) return; auto &type = this->get(var.basetype); auto builtin = BuiltIn(get_decoration(var.self, DecorationBuiltIn)); if (var.storage == StorageClassInput && builtin == BuiltInSampleMask) sample_mask_in_basetype = type.basetype; else if (var.storage == StorageClassOutput && builtin == BuiltInSampleMask) sample_mask_out_basetype = type.basetype; if (var.initializer && var.storage == StorageClassOutput) { auto *c = this->maybe_get(var.initializer); if (!c) return; if (type.basetype == SPIRType::Struct) { uint32_t member_count = uint32_t(type.member_types.size()); for (uint32_t i = 0; i < member_count; i++) { if (has_member_decoration(type.self, i, DecorationBuiltIn)) { builtin_to_initializer[get_member_decoration(type.self, i, DecorationBuiltIn)] = c->subconstants[i]; } } } else if (has_decoration(var.self, DecorationBuiltIn)) { builtin_to_initializer[builtin] = var.initializer; } } }); // Emit global variables for the interface variables which are statically used by the shader. builtins.for_each_bit([&](uint32_t i) { const char *type = nullptr; auto builtin = static_cast(i); uint32_t array_size = 0; string init_expr; auto init_itr = builtin_to_initializer.find(builtin); if (init_itr != builtin_to_initializer.end()) init_expr = join(" = ", to_expression(init_itr->second)); if (get_execution_model() == ExecutionModelMeshEXT) { if (builtin == BuiltInPosition || builtin == BuiltInPointSize || builtin == BuiltInClipDistance || builtin == BuiltInCullDistance || builtin == BuiltInLayer || builtin == BuiltInPrimitiveId || builtin == BuiltInViewportIndex || builtin == BuiltInCullPrimitiveEXT || builtin == BuiltInPrimitiveShadingRateKHR || builtin == BuiltInPrimitivePointIndicesEXT || builtin == BuiltInPrimitiveLineIndicesEXT || builtin == BuiltInPrimitiveTriangleIndicesEXT) { return; } } switch (builtin) { case BuiltInFragCoord: case BuiltInPosition: type = "float4"; break; case BuiltInFragDepth: type = "float"; break; case BuiltInVertexId: case BuiltInVertexIndex: case BuiltInInstanceIndex: type = "int"; if (hlsl_options.support_nonzero_base_vertex_base_instance) base_vertex_info.used = true; break; case BuiltInBaseVertex: case BuiltInBaseInstance: type = "int"; base_vertex_info.used = true; break; case BuiltInInstanceId: case BuiltInSampleId: type = "int"; break; case BuiltInPointSize: if (hlsl_options.point_size_compat || hlsl_options.shader_model <= 30) { // Just emit the global variable, it will be ignored. type = "float"; break; } else SPIRV_CROSS_THROW(join("Unsupported builtin in HLSL: ", unsigned(builtin))); case BuiltInGlobalInvocationId: case BuiltInLocalInvocationId: case BuiltInWorkgroupId: type = "uint3"; break; case BuiltInLocalInvocationIndex: type = "uint"; break; case BuiltInFrontFacing: type = "bool"; break; case BuiltInNumWorkgroups: case BuiltInPointCoord: // Handled specially. break; case BuiltInSubgroupLocalInvocationId: case BuiltInSubgroupSize: if (hlsl_options.shader_model < 60) SPIRV_CROSS_THROW("Need SM 6.0 for Wave ops."); break; case BuiltInSubgroupEqMask: case BuiltInSubgroupLtMask: case BuiltInSubgroupLeMask: case BuiltInSubgroupGtMask: case BuiltInSubgroupGeMask: if (hlsl_options.shader_model < 60) SPIRV_CROSS_THROW("Need SM 6.0 for Wave ops."); type = "uint4"; break; case BuiltInHelperInvocation: if (hlsl_options.shader_model < 50) SPIRV_CROSS_THROW("Need SM 5.0 for Helper Invocation."); break; case BuiltInClipDistance: array_size = clip_distance_count; type = "float"; break; case BuiltInCullDistance: array_size = cull_distance_count; type = "float"; break; case BuiltInSampleMask: if (active_input_builtins.get(BuiltInSampleMask)) type = sample_mask_in_basetype == SPIRType::UInt ? "uint" : "int"; else type = sample_mask_out_basetype == SPIRType::UInt ? "uint" : "int"; array_size = 1; break; case BuiltInPrimitiveId: case BuiltInViewIndex: case BuiltInLayer: type = "uint"; break; case BuiltInViewportIndex: case BuiltInPrimitiveShadingRateKHR: case BuiltInPrimitiveLineIndicesEXT: case BuiltInCullPrimitiveEXT: type = "uint"; break; default: SPIRV_CROSS_THROW(join("Unsupported builtin in HLSL: ", unsigned(builtin))); } StorageClass storage = active_input_builtins.get(i) ? StorageClassInput : StorageClassOutput; if (type) { if (array_size) statement("static ", type, " ", builtin_to_glsl(builtin, storage), "[", array_size, "]", init_expr, ";"); else statement("static ", type, " ", builtin_to_glsl(builtin, storage), init_expr, ";"); } // SampleMask can be both in and out with sample builtin, in this case we have already // declared the input variable and we need to add the output one now. if (builtin == BuiltInSampleMask && storage == StorageClassInput && this->active_output_builtins.get(i)) { type = sample_mask_out_basetype == SPIRType::UInt ? "uint" : "int"; if (array_size) statement("static ", type, " ", this->builtin_to_glsl(builtin, StorageClassOutput), "[", array_size, "]", init_expr, ";"); else statement("static ", type, " ", this->builtin_to_glsl(builtin, StorageClassOutput), init_expr, ";"); } }); if (base_vertex_info.used) { string binding_info; if (base_vertex_info.explicit_binding) { binding_info = join(" : register(b", base_vertex_info.register_index); if (base_vertex_info.register_space) binding_info += join(", space", base_vertex_info.register_space); binding_info += ")"; } statement("cbuffer SPIRV_Cross_VertexInfo", binding_info); begin_scope(); statement("int SPIRV_Cross_BaseVertex;"); statement("int SPIRV_Cross_BaseInstance;"); end_scope_decl(); statement(""); } } void CompilerHLSL::set_hlsl_aux_buffer_binding(HLSLAuxBinding binding, uint32_t register_index, uint32_t register_space) { if (binding == HLSL_AUX_BINDING_BASE_VERTEX_INSTANCE) { base_vertex_info.explicit_binding = true; base_vertex_info.register_space = register_space; base_vertex_info.register_index = register_index; } } void CompilerHLSL::unset_hlsl_aux_buffer_binding(HLSLAuxBinding binding) { if (binding == HLSL_AUX_BINDING_BASE_VERTEX_INSTANCE) base_vertex_info.explicit_binding = false; } bool CompilerHLSL::is_hlsl_aux_buffer_binding_used(HLSLAuxBinding binding) const { if (binding == HLSL_AUX_BINDING_BASE_VERTEX_INSTANCE) return base_vertex_info.used; else return false; } void CompilerHLSL::emit_composite_constants() { // HLSL cannot declare structs or arrays inline, so we must move them out to // global constants directly. bool emitted = false; ir.for_each_typed_id([&](uint32_t, SPIRConstant &c) { if (c.specialization) return; auto &type = this->get(c.constant_type); if (type.basetype == SPIRType::Struct && is_builtin_type(type)) return; if (type.basetype == SPIRType::Struct || !type.array.empty()) { add_resource_name(c.self); auto name = to_name(c.self); statement("static const ", variable_decl(type, name), " = ", constant_expression(c), ";"); emitted = true; } }); if (emitted) statement(""); } void CompilerHLSL::emit_specialization_constants_and_structs() { bool emitted = false; SpecializationConstant wg_x, wg_y, wg_z; ID workgroup_size_id = get_work_group_size_specialization_constants(wg_x, wg_y, wg_z); std::unordered_set io_block_types; ir.for_each_typed_id([&](uint32_t, const SPIRVariable &var) { auto &type = this->get(var.basetype); if ((var.storage == StorageClassInput || var.storage == StorageClassOutput) && !var.remapped_variable && type.pointer && !is_builtin_variable(var) && interface_variable_exists_in_entry_point(var.self) && has_decoration(type.self, DecorationBlock)) { io_block_types.insert(type.self); } }); auto loop_lock = ir.create_loop_hard_lock(); for (auto &id_ : ir.ids_for_constant_undef_or_type) { auto &id = ir.ids[id_]; if (id.get_type() == TypeConstant) { auto &c = id.get(); if (c.self == workgroup_size_id) { statement("static const uint3 gl_WorkGroupSize = ", constant_expression(get(workgroup_size_id)), ";"); emitted = true; } else if (c.specialization) { auto &type = get(c.constant_type); add_resource_name(c.self); auto name = to_name(c.self); if (has_decoration(c.self, DecorationSpecId)) { // HLSL does not support specialization constants, so fallback to macros. c.specialization_constant_macro_name = constant_value_macro_name(get_decoration(c.self, DecorationSpecId)); statement("#ifndef ", c.specialization_constant_macro_name); statement("#define ", c.specialization_constant_macro_name, " ", constant_expression(c)); statement("#endif"); statement("static const ", variable_decl(type, name), " = ", c.specialization_constant_macro_name, ";"); } else statement("static const ", variable_decl(type, name), " = ", constant_expression(c), ";"); emitted = true; } } else if (id.get_type() == TypeConstantOp) { auto &c = id.get(); auto &type = get(c.basetype); add_resource_name(c.self); auto name = to_name(c.self); statement("static const ", variable_decl(type, name), " = ", constant_op_expression(c), ";"); emitted = true; } else if (id.get_type() == TypeType) { auto &type = id.get(); bool is_non_io_block = has_decoration(type.self, DecorationBlock) && io_block_types.count(type.self) == 0; bool is_buffer_block = has_decoration(type.self, DecorationBufferBlock); if (type.basetype == SPIRType::Struct && type.array.empty() && !type.pointer && !is_non_io_block && !is_buffer_block) { if (emitted) statement(""); emitted = false; emit_struct(type); } } else if (id.get_type() == TypeUndef) { auto &undef = id.get(); auto &type = this->get(undef.basetype); // OpUndef can be void for some reason ... if (type.basetype == SPIRType::Void) return; string initializer; if (options.force_zero_initialized_variables && type_can_zero_initialize(type)) initializer = join(" = ", to_zero_initialized_expression(undef.basetype)); statement("static ", variable_decl(type, to_name(undef.self), undef.self), initializer, ";"); emitted = true; } } if (emitted) statement(""); } void CompilerHLSL::replace_illegal_names() { static const unordered_set keywords = { // Additional HLSL specific keywords. // From https://docs.microsoft.com/en-US/windows/win32/direct3dhlsl/dx-graphics-hlsl-appendix-keywords "AppendStructuredBuffer", "asm", "asm_fragment", "BlendState", "bool", "break", "Buffer", "ByteAddressBuffer", "case", "cbuffer", "centroid", "class", "column_major", "compile", "compile_fragment", "CompileShader", "const", "continue", "ComputeShader", "ConsumeStructuredBuffer", "default", "DepthStencilState", "DepthStencilView", "discard", "do", "double", "DomainShader", "dword", "else", "export", "false", "float", "for", "fxgroup", "GeometryShader", "groupshared", "half", "HullShader", "indices", "if", "in", "inline", "inout", "InputPatch", "int", "interface", "line", "lineadj", "linear", "LineStream", "matrix", "min16float", "min10float", "min16int", "min16uint", "namespace", "nointerpolation", "noperspective", "NULL", "out", "OutputPatch", "payload", "packoffset", "pass", "pixelfragment", "PixelShader", "point", "PointStream", "precise", "RasterizerState", "RenderTargetView", "return", "register", "row_major", "RWBuffer", "RWByteAddressBuffer", "RWStructuredBuffer", "RWTexture1D", "RWTexture1DArray", "RWTexture2D", "RWTexture2DArray", "RWTexture3D", "sample", "sampler", "SamplerState", "SamplerComparisonState", "shared", "snorm", "stateblock", "stateblock_state", "static", "string", "struct", "switch", "StructuredBuffer", "tbuffer", "technique", "technique10", "technique11", "texture", "Texture1D", "Texture1DArray", "Texture2D", "Texture2DArray", "Texture2DMS", "Texture2DMSArray", "Texture3D", "TextureCube", "TextureCubeArray", "true", "typedef", "triangle", "triangleadj", "TriangleStream", "uint", "uniform", "unorm", "unsigned", "vector", "vertexfragment", "VertexShader", "vertices", "void", "volatile", "while", }; CompilerGLSL::replace_illegal_names(keywords); CompilerGLSL::replace_illegal_names(); } SPIRType::BaseType CompilerHLSL::get_builtin_basetype(BuiltIn builtin, SPIRType::BaseType default_type) { switch (builtin) { case BuiltInSampleMask: // We declare sample mask array with module type, so always use default_type here. return default_type; default: return CompilerGLSL::get_builtin_basetype(builtin, default_type); } } void CompilerHLSL::emit_resources() { auto &execution = get_entry_point(); replace_illegal_names(); switch (execution.model) { case ExecutionModelGeometry: case ExecutionModelTessellationControl: case ExecutionModelTessellationEvaluation: case ExecutionModelMeshEXT: fixup_implicit_builtin_block_names(execution.model); break; default: break; } emit_specialization_constants_and_structs(); emit_composite_constants(); bool emitted = false; // Output UBOs and SSBOs ir.for_each_typed_id([&](uint32_t, SPIRVariable &var) { auto &type = this->get(var.basetype); bool is_block_storage = type.storage == StorageClassStorageBuffer || type.storage == StorageClassUniform; bool has_block_flags = ir.meta[type.self].decoration.decoration_flags.get(DecorationBlock) || ir.meta[type.self].decoration.decoration_flags.get(DecorationBufferBlock); if (var.storage != StorageClassFunction && type.pointer && is_block_storage && !is_hidden_variable(var) && has_block_flags) { emit_buffer_block(var); emitted = true; } }); // Output push constant blocks ir.for_each_typed_id([&](uint32_t, SPIRVariable &var) { auto &type = this->get(var.basetype); if (var.storage != StorageClassFunction && type.pointer && type.storage == StorageClassPushConstant && !is_hidden_variable(var)) { emit_push_constant_block(var); emitted = true; } }); if (execution.model == ExecutionModelVertex && hlsl_options.shader_model <= 30 && active_output_builtins.get(BuiltInPosition)) { statement("uniform float4 gl_HalfPixel;"); emitted = true; } bool skip_separate_image_sampler = !combined_image_samplers.empty() || hlsl_options.shader_model <= 30; // Output Uniform Constants (values, samplers, images, etc). ir.for_each_typed_id([&](uint32_t, SPIRVariable &var) { auto &type = this->get(var.basetype); // If we're remapping separate samplers and images, only emit the combined samplers. if (skip_separate_image_sampler) { // Sampler buffers are always used without a sampler, and they will also work in regular D3D. bool sampler_buffer = type.basetype == SPIRType::Image && type.image.dim == DimBuffer; bool separate_image = type.basetype == SPIRType::Image && type.image.sampled == 1; bool separate_sampler = type.basetype == SPIRType::Sampler; if (!sampler_buffer && (separate_image || separate_sampler)) return; } if (var.storage != StorageClassFunction && !is_builtin_variable(var) && !var.remapped_variable && type.pointer && (type.storage == StorageClassUniformConstant || type.storage == StorageClassAtomicCounter) && !is_hidden_variable(var)) { emit_uniform(var); emitted = true; } }); if (emitted) statement(""); emitted = false; // Emit builtin input and output variables here. emit_builtin_variables(); if (execution.model != ExecutionModelMeshEXT) { ir.for_each_typed_id([&](uint32_t, SPIRVariable &var) { auto &type = this->get(var.basetype); if (var.storage != StorageClassFunction && !var.remapped_variable && type.pointer && (var.storage == StorageClassInput || var.storage == StorageClassOutput) && !is_builtin_variable(var) && interface_variable_exists_in_entry_point(var.self)) { // Builtin variables are handled separately. emit_interface_block_globally(var); emitted = true; } }); } if (emitted) statement(""); emitted = false; require_input = false; require_output = false; unordered_set active_inputs; unordered_set active_outputs; struct IOVariable { const SPIRVariable *var; uint32_t location; uint32_t block_member_index; bool block; }; SmallVector input_variables; SmallVector output_variables; ir.for_each_typed_id([&](uint32_t, SPIRVariable &var) { auto &type = this->get(var.basetype); bool block = has_decoration(type.self, DecorationBlock); if (var.storage != StorageClassInput && var.storage != StorageClassOutput) return; if (!var.remapped_variable && type.pointer && !is_builtin_variable(var) && interface_variable_exists_in_entry_point(var.self)) { if (block) { for (uint32_t i = 0; i < uint32_t(type.member_types.size()); i++) { uint32_t location = get_declared_member_location(var, i, false); if (var.storage == StorageClassInput) input_variables.push_back({ &var, location, i, true }); else output_variables.push_back({ &var, location, i, true }); } } else { uint32_t location = get_decoration(var.self, DecorationLocation); if (var.storage == StorageClassInput) input_variables.push_back({ &var, location, 0, false }); else output_variables.push_back({ &var, location, 0, false }); } } }); const auto variable_compare = [&](const IOVariable &a, const IOVariable &b) -> bool { // Sort input and output variables based on, from more robust to less robust: // - Location // - Variable has a location // - Name comparison // - Variable has a name // - Fallback: ID bool has_location_a = a.block || has_decoration(a.var->self, DecorationLocation); bool has_location_b = b.block || has_decoration(b.var->self, DecorationLocation); if (has_location_a && has_location_b) return a.location < b.location; else if (has_location_a && !has_location_b) return true; else if (!has_location_a && has_location_b) return false; const auto &name1 = to_name(a.var->self); const auto &name2 = to_name(b.var->self); if (name1.empty() && name2.empty()) return a.var->self < b.var->self; else if (name1.empty()) return true; else if (name2.empty()) return false; return name1.compare(name2) < 0; }; auto input_builtins = active_input_builtins; input_builtins.clear(BuiltInNumWorkgroups); input_builtins.clear(BuiltInPointCoord); input_builtins.clear(BuiltInSubgroupSize); input_builtins.clear(BuiltInSubgroupLocalInvocationId); input_builtins.clear(BuiltInSubgroupEqMask); input_builtins.clear(BuiltInSubgroupLtMask); input_builtins.clear(BuiltInSubgroupLeMask); input_builtins.clear(BuiltInSubgroupGtMask); input_builtins.clear(BuiltInSubgroupGeMask); if (!input_variables.empty() || !input_builtins.empty()) { require_input = true; statement("struct SPIRV_Cross_Input"); begin_scope(); sort(input_variables.begin(), input_variables.end(), variable_compare); for (auto &var : input_variables) { if (var.block) emit_interface_block_member_in_struct(*var.var, var.block_member_index, var.location, active_inputs); else emit_interface_block_in_struct(*var.var, active_inputs); } emit_builtin_inputs_in_struct(); end_scope_decl(); statement(""); } const bool is_mesh_shader = execution.model == ExecutionModelMeshEXT; if (!output_variables.empty() || !active_output_builtins.empty()) { sort(output_variables.begin(), output_variables.end(), variable_compare); require_output = !is_mesh_shader; statement(is_mesh_shader ? "struct gl_MeshPerVertexEXT" : "struct SPIRV_Cross_Output"); begin_scope(); for (auto &var : output_variables) { if (is_per_primitive_variable(*var.var)) continue; if (var.block && is_mesh_shader && var.block_member_index != 0) continue; if (var.block && !is_mesh_shader) emit_interface_block_member_in_struct(*var.var, var.block_member_index, var.location, active_outputs); else emit_interface_block_in_struct(*var.var, active_outputs); } emit_builtin_outputs_in_struct(); if (!is_mesh_shader) emit_builtin_primitive_outputs_in_struct(); end_scope_decl(); statement(""); if (is_mesh_shader) { statement("struct gl_MeshPerPrimitiveEXT"); begin_scope(); for (auto &var : output_variables) { if (!is_per_primitive_variable(*var.var)) continue; if (var.block && var.block_member_index != 0) continue; emit_interface_block_in_struct(*var.var, active_outputs); } emit_builtin_primitive_outputs_in_struct(); end_scope_decl(); statement(""); } } // Global variables. for (auto global : global_variables) { auto &var = get(global); if (is_hidden_variable(var, true)) continue; if (var.storage == StorageClassTaskPayloadWorkgroupEXT && is_mesh_shader) continue; if (var.storage != StorageClassOutput) { if (!variable_is_lut(var)) { add_resource_name(var.self); const char *storage = nullptr; switch (var.storage) { case StorageClassWorkgroup: case StorageClassTaskPayloadWorkgroupEXT: storage = "groupshared"; break; default: storage = "static"; break; } string initializer; if (options.force_zero_initialized_variables && var.storage == StorageClassPrivate && !var.initializer && !var.static_expression && type_can_zero_initialize(get_variable_data_type(var))) { initializer = join(" = ", to_zero_initialized_expression(get_variable_data_type_id(var))); } statement(storage, " ", variable_decl(var), initializer, ";"); emitted = true; } } } if (emitted) statement(""); if (requires_op_fmod) { static const char *types[] = { "float", "float2", "float3", "float4", }; for (auto &type : types) { statement(type, " mod(", type, " x, ", type, " y)"); begin_scope(); statement("return x - y * floor(x / y);"); end_scope(); statement(""); } } emit_texture_size_variants(required_texture_size_variants.srv, "4", false, ""); for (uint32_t norm = 0; norm < 3; norm++) { for (uint32_t comp = 0; comp < 4; comp++) { static const char *qualifiers[] = { "", "unorm ", "snorm " }; static const char *vecsizes[] = { "", "2", "3", "4" }; emit_texture_size_variants(required_texture_size_variants.uav[norm][comp], vecsizes[comp], true, qualifiers[norm]); } } if (requires_fp16_packing) { // HLSL does not pack into a single word sadly :( statement("uint spvPackHalf2x16(float2 value)"); begin_scope(); statement("uint2 Packed = f32tof16(value);"); statement("return Packed.x | (Packed.y << 16);"); end_scope(); statement(""); statement("float2 spvUnpackHalf2x16(uint value)"); begin_scope(); statement("return f16tof32(uint2(value & 0xffff, value >> 16));"); end_scope(); statement(""); } if (requires_uint2_packing) { statement("uint64_t spvPackUint2x32(uint2 value)"); begin_scope(); statement("return (uint64_t(value.y) << 32) | uint64_t(value.x);"); end_scope(); statement(""); statement("uint2 spvUnpackUint2x32(uint64_t value)"); begin_scope(); statement("uint2 Unpacked;"); statement("Unpacked.x = uint(value & 0xffffffff);"); statement("Unpacked.y = uint(value >> 32);"); statement("return Unpacked;"); end_scope(); statement(""); } if (requires_explicit_fp16_packing) { // HLSL does not pack into a single word sadly :( statement("uint spvPackFloat2x16(min16float2 value)"); begin_scope(); statement("uint2 Packed = f32tof16(value);"); statement("return Packed.x | (Packed.y << 16);"); end_scope(); statement(""); statement("min16float2 spvUnpackFloat2x16(uint value)"); begin_scope(); statement("return min16float2(f16tof32(uint2(value & 0xffff, value >> 16)));"); end_scope(); statement(""); } // HLSL does not seem to have builtins for these operation, so roll them by hand ... if (requires_unorm8_packing) { statement("uint spvPackUnorm4x8(float4 value)"); begin_scope(); statement("uint4 Packed = uint4(round(saturate(value) * 255.0));"); statement("return Packed.x | (Packed.y << 8) | (Packed.z << 16) | (Packed.w << 24);"); end_scope(); statement(""); statement("float4 spvUnpackUnorm4x8(uint value)"); begin_scope(); statement("uint4 Packed = uint4(value & 0xff, (value >> 8) & 0xff, (value >> 16) & 0xff, value >> 24);"); statement("return float4(Packed) / 255.0;"); end_scope(); statement(""); } if (requires_snorm8_packing) { statement("uint spvPackSnorm4x8(float4 value)"); begin_scope(); statement("int4 Packed = int4(round(clamp(value, -1.0, 1.0) * 127.0)) & 0xff;"); statement("return uint(Packed.x | (Packed.y << 8) | (Packed.z << 16) | (Packed.w << 24));"); end_scope(); statement(""); statement("float4 spvUnpackSnorm4x8(uint value)"); begin_scope(); statement("int SignedValue = int(value);"); statement("int4 Packed = int4(SignedValue << 24, SignedValue << 16, SignedValue << 8, SignedValue) >> 24;"); statement("return clamp(float4(Packed) / 127.0, -1.0, 1.0);"); end_scope(); statement(""); } if (requires_unorm16_packing) { statement("uint spvPackUnorm2x16(float2 value)"); begin_scope(); statement("uint2 Packed = uint2(round(saturate(value) * 65535.0));"); statement("return Packed.x | (Packed.y << 16);"); end_scope(); statement(""); statement("float2 spvUnpackUnorm2x16(uint value)"); begin_scope(); statement("uint2 Packed = uint2(value & 0xffff, value >> 16);"); statement("return float2(Packed) / 65535.0;"); end_scope(); statement(""); } if (requires_snorm16_packing) { statement("uint spvPackSnorm2x16(float2 value)"); begin_scope(); statement("int2 Packed = int2(round(clamp(value, -1.0, 1.0) * 32767.0)) & 0xffff;"); statement("return uint(Packed.x | (Packed.y << 16));"); end_scope(); statement(""); statement("float2 spvUnpackSnorm2x16(uint value)"); begin_scope(); statement("int SignedValue = int(value);"); statement("int2 Packed = int2(SignedValue << 16, SignedValue) >> 16;"); statement("return clamp(float2(Packed) / 32767.0, -1.0, 1.0);"); end_scope(); statement(""); } if (requires_bitfield_insert) { static const char *types[] = { "uint", "uint2", "uint3", "uint4" }; for (auto &type : types) { statement(type, " spvBitfieldInsert(", type, " Base, ", type, " Insert, uint Offset, uint Count)"); begin_scope(); statement("uint Mask = Count == 32 ? 0xffffffff : (((1u << Count) - 1) << (Offset & 31));"); statement("return (Base & ~Mask) | ((Insert << Offset) & Mask);"); end_scope(); statement(""); } } if (requires_bitfield_extract) { static const char *unsigned_types[] = { "uint", "uint2", "uint3", "uint4" }; for (auto &type : unsigned_types) { statement(type, " spvBitfieldUExtract(", type, " Base, uint Offset, uint Count)"); begin_scope(); statement("uint Mask = Count == 32 ? 0xffffffff : ((1 << Count) - 1);"); statement("return (Base >> Offset) & Mask;"); end_scope(); statement(""); } // In this overload, we will have to do sign-extension, which we will emulate by shifting up and down. static const char *signed_types[] = { "int", "int2", "int3", "int4" }; for (auto &type : signed_types) { statement(type, " spvBitfieldSExtract(", type, " Base, int Offset, int Count)"); begin_scope(); statement("int Mask = Count == 32 ? -1 : ((1 << Count) - 1);"); statement(type, " Masked = (Base >> Offset) & Mask;"); statement("int ExtendShift = (32 - Count) & 31;"); statement("return (Masked << ExtendShift) >> ExtendShift;"); end_scope(); statement(""); } } if (requires_inverse_2x2) { statement("// Returns the inverse of a matrix, by using the algorithm of calculating the classical"); statement("// adjoint and dividing by the determinant. The contents of the matrix are changed."); statement("float2x2 spvInverse(float2x2 m)"); begin_scope(); statement("float2x2 adj; // The adjoint matrix (inverse after dividing by determinant)"); statement_no_indent(""); statement("// Create the transpose of the cofactors, as the classical adjoint of the matrix."); statement("adj[0][0] = m[1][1];"); statement("adj[0][1] = -m[0][1];"); statement_no_indent(""); statement("adj[1][0] = -m[1][0];"); statement("adj[1][1] = m[0][0];"); statement_no_indent(""); statement("// Calculate the determinant as a combination of the cofactors of the first row."); statement("float det = (adj[0][0] * m[0][0]) + (adj[0][1] * m[1][0]);"); statement_no_indent(""); statement("// Divide the classical adjoint matrix by the determinant."); statement("// If determinant is zero, matrix is not invertable, so leave it unchanged."); statement("return (det != 0.0f) ? (adj * (1.0f / det)) : m;"); end_scope(); statement(""); } if (requires_inverse_3x3) { statement("// Returns the determinant of a 2x2 matrix."); statement("float spvDet2x2(float a1, float a2, float b1, float b2)"); begin_scope(); statement("return a1 * b2 - b1 * a2;"); end_scope(); statement_no_indent(""); statement("// Returns the inverse of a matrix, by using the algorithm of calculating the classical"); statement("// adjoint and dividing by the determinant. The contents of the matrix are changed."); statement("float3x3 spvInverse(float3x3 m)"); begin_scope(); statement("float3x3 adj; // The adjoint matrix (inverse after dividing by determinant)"); statement_no_indent(""); statement("// Create the transpose of the cofactors, as the classical adjoint of the matrix."); statement("adj[0][0] = spvDet2x2(m[1][1], m[1][2], m[2][1], m[2][2]);"); statement("adj[0][1] = -spvDet2x2(m[0][1], m[0][2], m[2][1], m[2][2]);"); statement("adj[0][2] = spvDet2x2(m[0][1], m[0][2], m[1][1], m[1][2]);"); statement_no_indent(""); statement("adj[1][0] = -spvDet2x2(m[1][0], m[1][2], m[2][0], m[2][2]);"); statement("adj[1][1] = spvDet2x2(m[0][0], m[0][2], m[2][0], m[2][2]);"); statement("adj[1][2] = -spvDet2x2(m[0][0], m[0][2], m[1][0], m[1][2]);"); statement_no_indent(""); statement("adj[2][0] = spvDet2x2(m[1][0], m[1][1], m[2][0], m[2][1]);"); statement("adj[2][1] = -spvDet2x2(m[0][0], m[0][1], m[2][0], m[2][1]);"); statement("adj[2][2] = spvDet2x2(m[0][0], m[0][1], m[1][0], m[1][1]);"); statement_no_indent(""); statement("// Calculate the determinant as a combination of the cofactors of the first row."); statement("float det = (adj[0][0] * m[0][0]) + (adj[0][1] * m[1][0]) + (adj[0][2] * m[2][0]);"); statement_no_indent(""); statement("// Divide the classical adjoint matrix by the determinant."); statement("// If determinant is zero, matrix is not invertable, so leave it unchanged."); statement("return (det != 0.0f) ? (adj * (1.0f / det)) : m;"); end_scope(); statement(""); } if (requires_inverse_4x4) { if (!requires_inverse_3x3) { statement("// Returns the determinant of a 2x2 matrix."); statement("float spvDet2x2(float a1, float a2, float b1, float b2)"); begin_scope(); statement("return a1 * b2 - b1 * a2;"); end_scope(); statement(""); } statement("// Returns the determinant of a 3x3 matrix."); statement("float spvDet3x3(float a1, float a2, float a3, float b1, float b2, float b3, float c1, " "float c2, float c3)"); begin_scope(); statement("return a1 * spvDet2x2(b2, b3, c2, c3) - b1 * spvDet2x2(a2, a3, c2, c3) + c1 * " "spvDet2x2(a2, a3, " "b2, b3);"); end_scope(); statement_no_indent(""); statement("// Returns the inverse of a matrix, by using the algorithm of calculating the classical"); statement("// adjoint and dividing by the determinant. The contents of the matrix are changed."); statement("float4x4 spvInverse(float4x4 m)"); begin_scope(); statement("float4x4 adj; // The adjoint matrix (inverse after dividing by determinant)"); statement_no_indent(""); statement("// Create the transpose of the cofactors, as the classical adjoint of the matrix."); statement( "adj[0][0] = spvDet3x3(m[1][1], m[1][2], m[1][3], m[2][1], m[2][2], m[2][3], m[3][1], m[3][2], " "m[3][3]);"); statement( "adj[0][1] = -spvDet3x3(m[0][1], m[0][2], m[0][3], m[2][1], m[2][2], m[2][3], m[3][1], m[3][2], " "m[3][3]);"); statement( "adj[0][2] = spvDet3x3(m[0][1], m[0][2], m[0][3], m[1][1], m[1][2], m[1][3], m[3][1], m[3][2], " "m[3][3]);"); statement( "adj[0][3] = -spvDet3x3(m[0][1], m[0][2], m[0][3], m[1][1], m[1][2], m[1][3], m[2][1], m[2][2], " "m[2][3]);"); statement_no_indent(""); statement( "adj[1][0] = -spvDet3x3(m[1][0], m[1][2], m[1][3], m[2][0], m[2][2], m[2][3], m[3][0], m[3][2], " "m[3][3]);"); statement( "adj[1][1] = spvDet3x3(m[0][0], m[0][2], m[0][3], m[2][0], m[2][2], m[2][3], m[3][0], m[3][2], " "m[3][3]);"); statement( "adj[1][2] = -spvDet3x3(m[0][0], m[0][2], m[0][3], m[1][0], m[1][2], m[1][3], m[3][0], m[3][2], " "m[3][3]);"); statement( "adj[1][3] = spvDet3x3(m[0][0], m[0][2], m[0][3], m[1][0], m[1][2], m[1][3], m[2][0], m[2][2], " "m[2][3]);"); statement_no_indent(""); statement( "adj[2][0] = spvDet3x3(m[1][0], m[1][1], m[1][3], m[2][0], m[2][1], m[2][3], m[3][0], m[3][1], " "m[3][3]);"); statement( "adj[2][1] = -spvDet3x3(m[0][0], m[0][1], m[0][3], m[2][0], m[2][1], m[2][3], m[3][0], m[3][1], " "m[3][3]);"); statement( "adj[2][2] = spvDet3x3(m[0][0], m[0][1], m[0][3], m[1][0], m[1][1], m[1][3], m[3][0], m[3][1], " "m[3][3]);"); statement( "adj[2][3] = -spvDet3x3(m[0][0], m[0][1], m[0][3], m[1][0], m[1][1], m[1][3], m[2][0], m[2][1], " "m[2][3]);"); statement_no_indent(""); statement( "adj[3][0] = -spvDet3x3(m[1][0], m[1][1], m[1][2], m[2][0], m[2][1], m[2][2], m[3][0], m[3][1], " "m[3][2]);"); statement( "adj[3][1] = spvDet3x3(m[0][0], m[0][1], m[0][2], m[2][0], m[2][1], m[2][2], m[3][0], m[3][1], " "m[3][2]);"); statement( "adj[3][2] = -spvDet3x3(m[0][0], m[0][1], m[0][2], m[1][0], m[1][1], m[1][2], m[3][0], m[3][1], " "m[3][2]);"); statement( "adj[3][3] = spvDet3x3(m[0][0], m[0][1], m[0][2], m[1][0], m[1][1], m[1][2], m[2][0], m[2][1], " "m[2][2]);"); statement_no_indent(""); statement("// Calculate the determinant as a combination of the cofactors of the first row."); statement("float det = (adj[0][0] * m[0][0]) + (adj[0][1] * m[1][0]) + (adj[0][2] * m[2][0]) + (adj[0][3] " "* m[3][0]);"); statement_no_indent(""); statement("// Divide the classical adjoint matrix by the determinant."); statement("// If determinant is zero, matrix is not invertable, so leave it unchanged."); statement("return (det != 0.0f) ? (adj * (1.0f / det)) : m;"); end_scope(); statement(""); } if (requires_scalar_reflect) { // FP16/FP64? No templates in HLSL. statement("float spvReflect(float i, float n)"); begin_scope(); statement("return i - 2.0 * dot(n, i) * n;"); end_scope(); statement(""); } if (requires_scalar_refract) { // FP16/FP64? No templates in HLSL. statement("float spvRefract(float i, float n, float eta)"); begin_scope(); statement("float NoI = n * i;"); statement("float NoI2 = NoI * NoI;"); statement("float k = 1.0 - eta * eta * (1.0 - NoI2);"); statement("if (k < 0.0)"); begin_scope(); statement("return 0.0;"); end_scope(); statement("else"); begin_scope(); statement("return eta * i - (eta * NoI + sqrt(k)) * n;"); end_scope(); end_scope(); statement(""); } if (requires_scalar_faceforward) { // FP16/FP64? No templates in HLSL. statement("float spvFaceForward(float n, float i, float nref)"); begin_scope(); statement("return i * nref < 0.0 ? n : -n;"); end_scope(); statement(""); } for (TypeID type_id : composite_selection_workaround_types) { // Need out variable since HLSL does not support returning arrays. auto &type = get(type_id); auto type_str = type_to_glsl(type); auto type_arr_str = type_to_array_glsl(type); statement("void spvSelectComposite(out ", type_str, " out_value", type_arr_str, ", bool cond, ", type_str, " true_val", type_arr_str, ", ", type_str, " false_val", type_arr_str, ")"); begin_scope(); statement("if (cond)"); begin_scope(); statement("out_value = true_val;"); end_scope(); statement("else"); begin_scope(); statement("out_value = false_val;"); end_scope(); end_scope(); statement(""); } if (is_mesh_shader && options.vertex.flip_vert_y) { statement("float4 spvFlipVertY(float4 v)"); begin_scope(); statement("return float4(v.x, -v.y, v.z, v.w);"); end_scope(); statement(""); statement("float spvFlipVertY(float v)"); begin_scope(); statement("return -v;"); end_scope(); statement(""); } } void CompilerHLSL::emit_texture_size_variants(uint64_t variant_mask, const char *vecsize_qualifier, bool uav, const char *type_qualifier) { if (variant_mask == 0) return; static const char *types[QueryTypeCount] = { "float", "int", "uint" }; static const char *dims[QueryDimCount] = { "Texture1D", "Texture1DArray", "Texture2D", "Texture2DArray", "Texture3D", "Buffer", "TextureCube", "TextureCubeArray", "Texture2DMS", "Texture2DMSArray" }; static const bool has_lod[QueryDimCount] = { true, true, true, true, true, false, true, true, false, false }; static const char *ret_types[QueryDimCount] = { "uint", "uint2", "uint2", "uint3", "uint3", "uint", "uint2", "uint3", "uint2", "uint3", }; static const uint32_t return_arguments[QueryDimCount] = { 1, 2, 2, 3, 3, 1, 2, 3, 2, 3, }; for (uint32_t index = 0; index < QueryDimCount; index++) { for (uint32_t type_index = 0; type_index < QueryTypeCount; type_index++) { uint32_t bit = 16 * type_index + index; uint64_t mask = 1ull << bit; if ((variant_mask & mask) == 0) continue; statement(ret_types[index], " spv", (uav ? "Image" : "Texture"), "Size(", (uav ? "RW" : ""), dims[index], "<", type_qualifier, types[type_index], vecsize_qualifier, "> Tex, ", (uav ? "" : "uint Level, "), "out uint Param)"); begin_scope(); statement(ret_types[index], " ret;"); switch (return_arguments[index]) { case 1: if (has_lod[index] && !uav) statement("Tex.GetDimensions(Level, ret.x, Param);"); else { statement("Tex.GetDimensions(ret.x);"); statement("Param = 0u;"); } break; case 2: if (has_lod[index] && !uav) statement("Tex.GetDimensions(Level, ret.x, ret.y, Param);"); else if (!uav) statement("Tex.GetDimensions(ret.x, ret.y, Param);"); else { statement("Tex.GetDimensions(ret.x, ret.y);"); statement("Param = 0u;"); } break; case 3: if (has_lod[index] && !uav) statement("Tex.GetDimensions(Level, ret.x, ret.y, ret.z, Param);"); else if (!uav) statement("Tex.GetDimensions(ret.x, ret.y, ret.z, Param);"); else { statement("Tex.GetDimensions(ret.x, ret.y, ret.z);"); statement("Param = 0u;"); } break; } statement("return ret;"); end_scope(); statement(""); } } } void CompilerHLSL::analyze_meshlet_writes() { uint32_t id_per_vertex = 0; uint32_t id_per_primitive = 0; bool need_per_primitive = false; bool need_per_vertex = false; ir.for_each_typed_id([&](uint32_t, SPIRVariable &var) { auto &type = this->get(var.basetype); bool block = has_decoration(type.self, DecorationBlock); if (var.storage == StorageClassOutput && block && is_builtin_variable(var)) { auto flags = get_buffer_block_flags(var.self); if (flags.get(DecorationPerPrimitiveEXT)) id_per_primitive = var.self; else id_per_vertex = var.self; } else if (var.storage == StorageClassOutput) { Bitset flags; if (block) flags = get_buffer_block_flags(var.self); else flags = get_decoration_bitset(var.self); if (flags.get(DecorationPerPrimitiveEXT)) need_per_primitive = true; else need_per_vertex = true; } }); // If we have per-primitive outputs, and no per-primitive builtins, // empty version of gl_MeshPerPrimitiveEXT will be emitted. // If we don't use block IO for vertex output, we'll also need to synthesize the PerVertex block. const auto generate_block = [&](const char *block_name, const char *instance_name, bool per_primitive) -> uint32_t { auto &execution = get_entry_point(); uint32_t op_type = ir.increase_bound_by(4); uint32_t op_arr = op_type + 1; uint32_t op_ptr = op_type + 2; uint32_t op_var = op_type + 3; auto &type = set(op_type, OpTypeStruct); type.basetype = SPIRType::Struct; set_name(op_type, block_name); set_decoration(op_type, DecorationBlock); if (per_primitive) set_decoration(op_type, DecorationPerPrimitiveEXT); auto &arr = set(op_arr, type); arr.parent_type = type.self; arr.array.push_back(per_primitive ? execution.output_primitives : execution.output_vertices); arr.array_size_literal.push_back(true); auto &ptr = set(op_ptr, arr); ptr.parent_type = arr.self; ptr.pointer = true; ptr.pointer_depth++; ptr.storage = StorageClassOutput; set_decoration(op_ptr, DecorationBlock); set_name(op_ptr, block_name); auto &var = set(op_var, op_ptr, StorageClassOutput); if (per_primitive) set_decoration(op_var, DecorationPerPrimitiveEXT); set_name(op_var, instance_name); execution.interface_variables.push_back(var.self); return op_var; }; if (id_per_vertex == 0 && need_per_vertex) id_per_vertex = generate_block("gl_MeshPerVertexEXT", "gl_MeshVerticesEXT", false); if (id_per_primitive == 0 && need_per_primitive) id_per_primitive = generate_block("gl_MeshPerPrimitiveEXT", "gl_MeshPrimitivesEXT", true); unordered_set processed_func_ids; analyze_meshlet_writes(ir.default_entry_point, id_per_vertex, id_per_primitive, processed_func_ids); } void CompilerHLSL::analyze_meshlet_writes(uint32_t func_id, uint32_t id_per_vertex, uint32_t id_per_primitive, std::unordered_set &processed_func_ids) { // Avoid processing a function more than once if (processed_func_ids.find(func_id) != processed_func_ids.end()) return; processed_func_ids.insert(func_id); auto &func = get(func_id); // Recursively establish global args added to functions on which we depend. for (auto& block : func.blocks) { auto &b = get(block); for (auto &i : b.ops) { auto ops = stream(i); auto op = static_cast(i.op); switch (op) { case OpFunctionCall: { // Then recurse into the function itself to extract globals used internally in the function uint32_t inner_func_id = ops[2]; analyze_meshlet_writes(inner_func_id, id_per_vertex, id_per_primitive, processed_func_ids); auto &inner_func = get(inner_func_id); for (auto &iarg : inner_func.arguments) { if (!iarg.alias_global_variable) continue; bool already_declared = false; for (auto &arg : func.arguments) { if (arg.id == iarg.id) { already_declared = true; break; } } if (!already_declared) { // basetype is effectively ignored here since we declare the argument // with explicit types. Just pass down a valid type. func.arguments.push_back({ expression_type_id(iarg.id), iarg.id, iarg.read_count, iarg.write_count, true }); } } break; } case OpStore: case OpLoad: case OpInBoundsAccessChain: case OpAccessChain: case OpPtrAccessChain: case OpInBoundsPtrAccessChain: case OpArrayLength: { auto *var = maybe_get(ops[op == OpStore ? 0 : 2]); if (var && (var->storage == StorageClassOutput || var->storage == StorageClassTaskPayloadWorkgroupEXT)) { bool already_declared = false; auto builtin_type = BuiltIn(get_decoration(var->self, DecorationBuiltIn)); uint32_t var_id = var->self; if (var->storage != StorageClassTaskPayloadWorkgroupEXT && builtin_type != BuiltInPrimitivePointIndicesEXT && builtin_type != BuiltInPrimitiveLineIndicesEXT && builtin_type != BuiltInPrimitiveTriangleIndicesEXT) { var_id = is_per_primitive_variable(*var) ? id_per_primitive : id_per_vertex; } for (auto &arg : func.arguments) { if (arg.id == var_id) { already_declared = true; break; } } if (!already_declared) { // basetype is effectively ignored here since we declare the argument // with explicit types. Just pass down a valid type. uint32_t type_id = expression_type_id(var_id); if (var->storage == StorageClassTaskPayloadWorkgroupEXT) func.arguments.push_back({ type_id, var_id, 1u, 0u, true }); else func.arguments.push_back({ type_id, var_id, 1u, 1u, true }); } } break; } default: break; } } } } string CompilerHLSL::layout_for_member(const SPIRType &type, uint32_t index) { auto &flags = get_member_decoration_bitset(type.self, index); // HLSL can emit row_major or column_major decoration in any struct. // Do not try to merge combined decorations for children like in GLSL. // Flip the convention. HLSL is a bit odd in that the memory layout is column major ... but the language API is "row-major". // The way to deal with this is to multiply everything in inverse order, and reverse the memory layout. if (flags.get(DecorationColMajor)) return "row_major "; else if (flags.get(DecorationRowMajor)) return "column_major "; return ""; } void CompilerHLSL::emit_struct_member(const SPIRType &type, uint32_t member_type_id, uint32_t index, const string &qualifier, uint32_t base_offset) { auto &membertype = get(member_type_id); Bitset memberflags; auto &memb = ir.meta[type.self].members; if (index < memb.size()) memberflags = memb[index].decoration_flags; string packing_offset; bool is_push_constant = type.storage == StorageClassPushConstant; if ((has_extended_decoration(type.self, SPIRVCrossDecorationExplicitOffset) || is_push_constant) && has_member_decoration(type.self, index, DecorationOffset)) { uint32_t offset = memb[index].offset - base_offset; if (offset & 3) SPIRV_CROSS_THROW("Cannot pack on tighter bounds than 4 bytes in HLSL."); static const char *packing_swizzle[] = { "", ".y", ".z", ".w" }; packing_offset = join(" : packoffset(c", offset / 16, packing_swizzle[(offset & 15) >> 2], ")"); } statement(layout_for_member(type, index), qualifier, variable_decl(membertype, to_member_name(type, index)), packing_offset, ";"); } void CompilerHLSL::emit_rayquery_function(const char *commited, const char *candidate, const uint32_t *ops) { flush_variable_declaration(ops[0]); uint32_t is_commited = evaluate_constant_u32(ops[3]); emit_op(ops[0], ops[1], join(to_expression(ops[2]), is_commited ? commited : candidate), false); } void CompilerHLSL::emit_mesh_tasks(SPIRBlock &block) { if (block.mesh.payload != 0) { statement("DispatchMesh(", to_unpacked_expression(block.mesh.groups[0]), ", ", to_unpacked_expression(block.mesh.groups[1]), ", ", to_unpacked_expression(block.mesh.groups[2]), ", ", to_unpacked_expression(block.mesh.payload), ");"); } else { SPIRV_CROSS_THROW("Amplification shader in HLSL must have payload"); } } void CompilerHLSL::emit_buffer_block(const SPIRVariable &var) { auto &type = get(var.basetype); bool is_uav = var.storage == StorageClassStorageBuffer || has_decoration(type.self, DecorationBufferBlock); if (flattened_buffer_blocks.count(var.self)) { emit_buffer_block_flattened(var); } else if (is_uav) { Bitset flags = ir.get_buffer_block_flags(var); bool is_readonly = flags.get(DecorationNonWritable) && !is_hlsl_force_storage_buffer_as_uav(var.self); bool is_coherent = flags.get(DecorationCoherent) && !is_readonly; bool is_interlocked = interlocked_resources.count(var.self) > 0; auto to_structuredbuffer_subtype_name = [this](const SPIRType &parent_type) -> std::string { if (parent_type.basetype == SPIRType::Struct && parent_type.member_types.size() == 1) { // Use type of first struct member as a StructuredBuffer will have only one '._m0' field in SPIR-V const auto &member0_type = this->get(parent_type.member_types.front()); return this->type_to_glsl(member0_type); } else { // Otherwise, this StructuredBuffer only has a basic subtype, e.g. StructuredBuffer return this->type_to_glsl(parent_type); } }; std::string type_name; if (is_user_type_structured(var.self)) type_name = join(is_readonly ? "" : is_interlocked ? "RasterizerOrdered" : "RW", "StructuredBuffer<", to_structuredbuffer_subtype_name(type), ">"); else type_name = is_readonly ? "ByteAddressBuffer" : is_interlocked ? "RasterizerOrderedByteAddressBuffer" : "RWByteAddressBuffer"; add_resource_name(var.self); statement(is_coherent ? "globallycoherent " : "", type_name, " ", to_name(var.self), type_to_array_glsl(type), to_resource_binding(var), ";"); } else { if (type.array.empty()) { // Flatten the top-level struct so we can use packoffset, // this restriction is similar to GLSL where layout(offset) is not possible on sub-structs. flattened_structs[var.self] = false; // Prefer the block name if possible. auto buffer_name = to_name(type.self, false); if (ir.meta[type.self].decoration.alias.empty() || resource_names.find(buffer_name) != end(resource_names) || block_names.find(buffer_name) != end(block_names)) { buffer_name = get_block_fallback_name(var.self); } add_variable(block_names, resource_names, buffer_name); // If for some reason buffer_name is an illegal name, make a final fallback to a workaround name. // This cannot conflict with anything else, so we're safe now. if (buffer_name.empty()) buffer_name = join("_", get(var.basetype).self, "_", var.self); uint32_t failed_index = 0; if (buffer_is_packing_standard(type, BufferPackingHLSLCbufferPackOffset, &failed_index)) set_extended_decoration(type.self, SPIRVCrossDecorationExplicitOffset); else { SPIRV_CROSS_THROW(join("cbuffer ID ", var.self, " (name: ", buffer_name, "), member index ", failed_index, " (name: ", to_member_name(type, failed_index), ") cannot be expressed with either HLSL packing layout or packoffset.")); } block_names.insert(buffer_name); // Save for post-reflection later. declared_block_names[var.self] = buffer_name; type.member_name_cache.clear(); // var.self can be used as a backup name for the block name, // so we need to make sure we don't disturb the name here on a recompile. // It will need to be reset if we have to recompile. preserve_alias_on_reset(var.self); add_resource_name(var.self); statement("cbuffer ", buffer_name, to_resource_binding(var)); begin_scope(); uint32_t i = 0; for (auto &member : type.member_types) { add_member_name(type, i); auto backup_name = get_member_name(type.self, i); auto member_name = to_member_name(type, i); member_name = join(to_name(var.self), "_", member_name); ParsedIR::sanitize_underscores(member_name); set_member_name(type.self, i, member_name); emit_struct_member(type, member, i, ""); set_member_name(type.self, i, backup_name); i++; } end_scope_decl(); statement(""); } else { if (hlsl_options.shader_model < 51) SPIRV_CROSS_THROW( "Need ConstantBuffer to use arrays of UBOs, but this is only supported in SM 5.1."); add_resource_name(type.self); add_resource_name(var.self); // ConstantBuffer does not support packoffset, so it is unuseable unless everything aligns as we expect. uint32_t failed_index = 0; if (!buffer_is_packing_standard(type, BufferPackingHLSLCbuffer, &failed_index)) { SPIRV_CROSS_THROW(join("HLSL ConstantBuffer ID ", var.self, " (name: ", to_name(type.self), "), member index ", failed_index, " (name: ", to_member_name(type, failed_index), ") cannot be expressed with normal HLSL packing rules.")); } emit_struct(get(type.self)); statement("ConstantBuffer<", to_name(type.self), "> ", to_name(var.self), type_to_array_glsl(type), to_resource_binding(var), ";"); } } } void CompilerHLSL::emit_push_constant_block(const SPIRVariable &var) { if (flattened_buffer_blocks.count(var.self)) { emit_buffer_block_flattened(var); } else if (root_constants_layout.empty()) { emit_buffer_block(var); } else { for (const auto &layout : root_constants_layout) { auto &type = get(var.basetype); uint32_t failed_index = 0; if (buffer_is_packing_standard(type, BufferPackingHLSLCbufferPackOffset, &failed_index, layout.start, layout.end)) set_extended_decoration(type.self, SPIRVCrossDecorationExplicitOffset); else { SPIRV_CROSS_THROW(join("Root constant cbuffer ID ", var.self, " (name: ", to_name(type.self), ")", ", member index ", failed_index, " (name: ", to_member_name(type, failed_index), ") cannot be expressed with either HLSL packing layout or packoffset.")); } flattened_structs[var.self] = false; type.member_name_cache.clear(); add_resource_name(var.self); auto &memb = ir.meta[type.self].members; statement("cbuffer SPIRV_CROSS_RootConstant_", to_name(var.self), to_resource_register(HLSL_BINDING_AUTO_PUSH_CONSTANT_BIT, 'b', layout.binding, layout.space)); begin_scope(); // Index of the next field in the generated root constant constant buffer auto constant_index = 0u; // Iterate over all member of the push constant and check which of the fields // fit into the given root constant layout. for (auto i = 0u; i < memb.size(); i++) { const auto offset = memb[i].offset; if (layout.start <= offset && offset < layout.end) { const auto &member = type.member_types[i]; add_member_name(type, constant_index); auto backup_name = get_member_name(type.self, i); auto member_name = to_member_name(type, i); member_name = join(to_name(var.self), "_", member_name); ParsedIR::sanitize_underscores(member_name); set_member_name(type.self, constant_index, member_name); emit_struct_member(type, member, i, "", layout.start); set_member_name(type.self, constant_index, backup_name); constant_index++; } } end_scope_decl(); } } } string CompilerHLSL::to_sampler_expression(uint32_t id) { auto expr = join("_", to_non_uniform_aware_expression(id)); auto index = expr.find_first_of('['); if (index == string::npos) { return expr + "_sampler"; } else { // We have an expression like _ident[array], so we cannot tack on _sampler, insert it inside the string instead. return expr.insert(index, "_sampler"); } } void CompilerHLSL::emit_sampled_image_op(uint32_t result_type, uint32_t result_id, uint32_t image_id, uint32_t samp_id) { if (hlsl_options.shader_model >= 40 && combined_image_samplers.empty()) { set(result_id, result_type, image_id, samp_id); } else { // Make sure to suppress usage tracking. It is illegal to create temporaries of opaque types. emit_op(result_type, result_id, to_combined_image_sampler(image_id, samp_id), true, true); } } string CompilerHLSL::to_func_call_arg(const SPIRFunction::Parameter &arg, uint32_t id) { string arg_str = CompilerGLSL::to_func_call_arg(arg, id); if (hlsl_options.shader_model <= 30) return arg_str; // Manufacture automatic sampler arg if the arg is a SampledImage texture and we're in modern HLSL. auto &type = expression_type(id); // We don't have to consider combined image samplers here via OpSampledImage because // those variables cannot be passed as arguments to functions. // Only global SampledImage variables may be used as arguments. if (type.basetype == SPIRType::SampledImage && type.image.dim != DimBuffer) arg_str += ", " + to_sampler_expression(id); return arg_str; } string CompilerHLSL::get_inner_entry_point_name() const { auto &execution = get_entry_point(); if (hlsl_options.use_entry_point_name) { auto name = join(execution.name, "_inner"); ParsedIR::sanitize_underscores(name); return name; } if (execution.model == ExecutionModelVertex) return "vert_main"; else if (execution.model == ExecutionModelFragment) return "frag_main"; else if (execution.model == ExecutionModelGLCompute) return "comp_main"; else if (execution.model == ExecutionModelMeshEXT) return "mesh_main"; else if (execution.model == ExecutionModelTaskEXT) return "task_main"; else SPIRV_CROSS_THROW("Unsupported execution model."); } void CompilerHLSL::emit_function_prototype(SPIRFunction &func, const Bitset &return_flags) { if (func.self != ir.default_entry_point) add_function_overload(func); // Avoid shadow declarations. local_variable_names = resource_names; string decl; auto &type = get(func.return_type); if (type.array.empty()) { decl += flags_to_qualifiers_glsl(type, return_flags); decl += type_to_glsl(type); decl += " "; } else { // We cannot return arrays in HLSL, so "return" through an out variable. decl = "void "; } if (func.self == ir.default_entry_point) { decl += get_inner_entry_point_name(); processing_entry_point = true; } else decl += to_name(func.self); decl += "("; SmallVector arglist; if (!type.array.empty()) { // Fake array returns by writing to an out array instead. string out_argument; out_argument += "out "; out_argument += type_to_glsl(type); out_argument += " "; out_argument += "spvReturnValue"; out_argument += type_to_array_glsl(type); arglist.push_back(std::move(out_argument)); } for (auto &arg : func.arguments) { // Do not pass in separate images or samplers if we're remapping // to combined image samplers. if (skip_argument(arg.id)) continue; // Might change the variable name if it already exists in this function. // SPIRV OpName doesn't have any semantic effect, so it's valid for an implementation // to use same name for variables. // Since we want to make the GLSL debuggable and somewhat sane, use fallback names for variables which are duplicates. add_local_variable_name(arg.id); arglist.push_back(argument_decl(arg)); // Flatten a combined sampler to two separate arguments in modern HLSL. auto &arg_type = get(arg.type); if (hlsl_options.shader_model > 30 && arg_type.basetype == SPIRType::SampledImage && arg_type.image.dim != DimBuffer) { // Manufacture automatic sampler arg for SampledImage texture arglist.push_back(join(is_depth_image(arg_type, arg.id) ? "SamplerComparisonState " : "SamplerState ", to_sampler_expression(arg.id), type_to_array_glsl(arg_type))); } // Hold a pointer to the parameter so we can invalidate the readonly field if needed. auto *var = maybe_get(arg.id); if (var) var->parameter = &arg; } for (auto &arg : func.shadow_arguments) { // Might change the variable name if it already exists in this function. // SPIRV OpName doesn't have any semantic effect, so it's valid for an implementation // to use same name for variables. // Since we want to make the GLSL debuggable and somewhat sane, use fallback names for variables which are duplicates. add_local_variable_name(arg.id); arglist.push_back(argument_decl(arg)); // Hold a pointer to the parameter so we can invalidate the readonly field if needed. auto *var = maybe_get(arg.id); if (var) var->parameter = &arg; } decl += merge(arglist); decl += ")"; statement(decl); } void CompilerHLSL::emit_hlsl_entry_point() { SmallVector arguments; if (require_input) arguments.push_back("SPIRV_Cross_Input stage_input"); auto &execution = get_entry_point(); switch (execution.model) { case ExecutionModelTaskEXT: case ExecutionModelMeshEXT: case ExecutionModelGLCompute: { if (execution.model == ExecutionModelMeshEXT) { if (execution.flags.get(ExecutionModeOutputTrianglesEXT)) statement("[outputtopology(\"triangle\")]"); else if (execution.flags.get(ExecutionModeOutputLinesEXT)) statement("[outputtopology(\"line\")]"); else if (execution.flags.get(ExecutionModeOutputPoints)) SPIRV_CROSS_THROW("Topology mode \"points\" is not supported in DirectX"); auto &func = get(ir.default_entry_point); for (auto &arg : func.arguments) { auto &var = get(arg.id); auto &base_type = get(var.basetype); bool block = has_decoration(base_type.self, DecorationBlock); if (var.storage == StorageClassTaskPayloadWorkgroupEXT) { arguments.push_back("in payload " + variable_decl(var)); } else if (block) { auto flags = get_buffer_block_flags(var.self); if (flags.get(DecorationPerPrimitiveEXT) || has_decoration(arg.id, DecorationPerPrimitiveEXT)) { arguments.push_back("out primitives gl_MeshPerPrimitiveEXT gl_MeshPrimitivesEXT[" + std::to_string(execution.output_primitives) + "]"); } else { arguments.push_back("out vertices gl_MeshPerVertexEXT gl_MeshVerticesEXT[" + std::to_string(execution.output_vertices) + "]"); } } else { if (execution.flags.get(ExecutionModeOutputTrianglesEXT)) { arguments.push_back("out indices uint3 gl_PrimitiveTriangleIndicesEXT[" + std::to_string(execution.output_primitives) + "]"); } else { arguments.push_back("out indices uint2 gl_PrimitiveLineIndicesEXT[" + std::to_string(execution.output_primitives) + "]"); } } } } SpecializationConstant wg_x, wg_y, wg_z; get_work_group_size_specialization_constants(wg_x, wg_y, wg_z); uint32_t x = execution.workgroup_size.x; uint32_t y = execution.workgroup_size.y; uint32_t z = execution.workgroup_size.z; if (!execution.workgroup_size.constant && execution.flags.get(ExecutionModeLocalSizeId)) { if (execution.workgroup_size.id_x) x = get(execution.workgroup_size.id_x).scalar(); if (execution.workgroup_size.id_y) y = get(execution.workgroup_size.id_y).scalar(); if (execution.workgroup_size.id_z) z = get(execution.workgroup_size.id_z).scalar(); } auto x_expr = wg_x.id ? get(wg_x.id).specialization_constant_macro_name : to_string(x); auto y_expr = wg_y.id ? get(wg_y.id).specialization_constant_macro_name : to_string(y); auto z_expr = wg_z.id ? get(wg_z.id).specialization_constant_macro_name : to_string(z); statement("[numthreads(", x_expr, ", ", y_expr, ", ", z_expr, ")]"); break; } case ExecutionModelFragment: if (execution.flags.get(ExecutionModeEarlyFragmentTests)) statement("[earlydepthstencil]"); break; default: break; } const char *entry_point_name; if (hlsl_options.use_entry_point_name) entry_point_name = get_entry_point().name.c_str(); else entry_point_name = "main"; statement(require_output ? "SPIRV_Cross_Output " : "void ", entry_point_name, "(", merge(arguments), ")"); begin_scope(); bool legacy = hlsl_options.shader_model <= 30; // Copy builtins from entry point arguments to globals. active_input_builtins.for_each_bit([&](uint32_t i) { auto builtin = builtin_to_glsl(static_cast(i), StorageClassInput); switch (static_cast(i)) { case BuiltInFragCoord: // VPOS in D3D9 is sampled at integer locations, apply half-pixel offset to be consistent. // TODO: Do we need an option here? Any reason why a D3D9 shader would be used // on a D3D10+ system with a different rasterization config? if (legacy) statement(builtin, " = stage_input.", builtin, " + float4(0.5f, 0.5f, 0.0f, 0.0f);"); else { statement(builtin, " = stage_input.", builtin, ";"); // ZW are undefined in D3D9, only do this fixup here. statement(builtin, ".w = 1.0 / ", builtin, ".w;"); } break; case BuiltInVertexId: case BuiltInVertexIndex: case BuiltInInstanceIndex: // D3D semantics are uint, but shader wants int. if (hlsl_options.support_nonzero_base_vertex_base_instance) { if (static_cast(i) == BuiltInInstanceIndex) statement(builtin, " = int(stage_input.", builtin, ") + SPIRV_Cross_BaseInstance;"); else statement(builtin, " = int(stage_input.", builtin, ") + SPIRV_Cross_BaseVertex;"); } else statement(builtin, " = int(stage_input.", builtin, ");"); break; case BuiltInBaseVertex: statement(builtin, " = SPIRV_Cross_BaseVertex;"); break; case BuiltInBaseInstance: statement(builtin, " = SPIRV_Cross_BaseInstance;"); break; case BuiltInInstanceId: // D3D semantics are uint, but shader wants int. statement(builtin, " = int(stage_input.", builtin, ");"); break; case BuiltInSampleMask: statement(builtin, "[0] = stage_input.", builtin, ";"); break; case BuiltInNumWorkgroups: case BuiltInPointCoord: case BuiltInSubgroupSize: case BuiltInSubgroupLocalInvocationId: case BuiltInHelperInvocation: break; case BuiltInSubgroupEqMask: // Emulate these ... // No 64-bit in HLSL, so have to do it in 32-bit and unroll. statement("gl_SubgroupEqMask = 1u << (WaveGetLaneIndex() - uint4(0, 32, 64, 96));"); statement("if (WaveGetLaneIndex() >= 32) gl_SubgroupEqMask.x = 0;"); statement("if (WaveGetLaneIndex() >= 64 || WaveGetLaneIndex() < 32) gl_SubgroupEqMask.y = 0;"); statement("if (WaveGetLaneIndex() >= 96 || WaveGetLaneIndex() < 64) gl_SubgroupEqMask.z = 0;"); statement("if (WaveGetLaneIndex() < 96) gl_SubgroupEqMask.w = 0;"); break; case BuiltInSubgroupGeMask: // Emulate these ... // No 64-bit in HLSL, so have to do it in 32-bit and unroll. statement("gl_SubgroupGeMask = ~((1u << (WaveGetLaneIndex() - uint4(0, 32, 64, 96))) - 1u);"); statement("if (WaveGetLaneIndex() >= 32) gl_SubgroupGeMask.x = 0u;"); statement("if (WaveGetLaneIndex() >= 64) gl_SubgroupGeMask.y = 0u;"); statement("if (WaveGetLaneIndex() >= 96) gl_SubgroupGeMask.z = 0u;"); statement("if (WaveGetLaneIndex() < 32) gl_SubgroupGeMask.y = ~0u;"); statement("if (WaveGetLaneIndex() < 64) gl_SubgroupGeMask.z = ~0u;"); statement("if (WaveGetLaneIndex() < 96) gl_SubgroupGeMask.w = ~0u;"); break; case BuiltInSubgroupGtMask: // Emulate these ... // No 64-bit in HLSL, so have to do it in 32-bit and unroll. statement("uint gt_lane_index = WaveGetLaneIndex() + 1;"); statement("gl_SubgroupGtMask = ~((1u << (gt_lane_index - uint4(0, 32, 64, 96))) - 1u);"); statement("if (gt_lane_index >= 32) gl_SubgroupGtMask.x = 0u;"); statement("if (gt_lane_index >= 64) gl_SubgroupGtMask.y = 0u;"); statement("if (gt_lane_index >= 96) gl_SubgroupGtMask.z = 0u;"); statement("if (gt_lane_index >= 128) gl_SubgroupGtMask.w = 0u;"); statement("if (gt_lane_index < 32) gl_SubgroupGtMask.y = ~0u;"); statement("if (gt_lane_index < 64) gl_SubgroupGtMask.z = ~0u;"); statement("if (gt_lane_index < 96) gl_SubgroupGtMask.w = ~0u;"); break; case BuiltInSubgroupLeMask: // Emulate these ... // No 64-bit in HLSL, so have to do it in 32-bit and unroll. statement("uint le_lane_index = WaveGetLaneIndex() + 1;"); statement("gl_SubgroupLeMask = (1u << (le_lane_index - uint4(0, 32, 64, 96))) - 1u;"); statement("if (le_lane_index >= 32) gl_SubgroupLeMask.x = ~0u;"); statement("if (le_lane_index >= 64) gl_SubgroupLeMask.y = ~0u;"); statement("if (le_lane_index >= 96) gl_SubgroupLeMask.z = ~0u;"); statement("if (le_lane_index >= 128) gl_SubgroupLeMask.w = ~0u;"); statement("if (le_lane_index < 32) gl_SubgroupLeMask.y = 0u;"); statement("if (le_lane_index < 64) gl_SubgroupLeMask.z = 0u;"); statement("if (le_lane_index < 96) gl_SubgroupLeMask.w = 0u;"); break; case BuiltInSubgroupLtMask: // Emulate these ... // No 64-bit in HLSL, so have to do it in 32-bit and unroll. statement("gl_SubgroupLtMask = (1u << (WaveGetLaneIndex() - uint4(0, 32, 64, 96))) - 1u;"); statement("if (WaveGetLaneIndex() >= 32) gl_SubgroupLtMask.x = ~0u;"); statement("if (WaveGetLaneIndex() >= 64) gl_SubgroupLtMask.y = ~0u;"); statement("if (WaveGetLaneIndex() >= 96) gl_SubgroupLtMask.z = ~0u;"); statement("if (WaveGetLaneIndex() < 32) gl_SubgroupLtMask.y = 0u;"); statement("if (WaveGetLaneIndex() < 64) gl_SubgroupLtMask.z = 0u;"); statement("if (WaveGetLaneIndex() < 96) gl_SubgroupLtMask.w = 0u;"); break; case BuiltInClipDistance: for (uint32_t clip = 0; clip < clip_distance_count; clip++) statement("gl_ClipDistance[", clip, "] = stage_input.gl_ClipDistance", clip / 4, ".", "xyzw"[clip & 3], ";"); break; case BuiltInCullDistance: for (uint32_t cull = 0; cull < cull_distance_count; cull++) statement("gl_CullDistance[", cull, "] = stage_input.gl_CullDistance", cull / 4, ".", "xyzw"[cull & 3], ";"); break; default: statement(builtin, " = stage_input.", builtin, ";"); break; } }); // Copy from stage input struct to globals. ir.for_each_typed_id([&](uint32_t, SPIRVariable &var) { auto &type = this->get(var.basetype); bool block = has_decoration(type.self, DecorationBlock); if (var.storage != StorageClassInput) return; bool need_matrix_unroll = var.storage == StorageClassInput && execution.model == ExecutionModelVertex; if (!var.remapped_variable && type.pointer && !is_builtin_variable(var) && interface_variable_exists_in_entry_point(var.self)) { if (block) { auto type_name = to_name(type.self); auto var_name = to_name(var.self); for (uint32_t mbr_idx = 0; mbr_idx < uint32_t(type.member_types.size()); mbr_idx++) { auto mbr_name = to_member_name(type, mbr_idx); auto flat_name = join(type_name, "_", mbr_name); statement(var_name, ".", mbr_name, " = stage_input.", flat_name, ";"); } } else { auto name = to_name(var.self); auto &mtype = this->get(var.basetype); if (need_matrix_unroll && mtype.columns > 1) { // Unroll matrices. for (uint32_t col = 0; col < mtype.columns; col++) statement(name, "[", col, "] = stage_input.", name, "_", col, ";"); } else { statement(name, " = stage_input.", name, ";"); } } } }); // Run the shader. if (execution.model == ExecutionModelVertex || execution.model == ExecutionModelFragment || execution.model == ExecutionModelGLCompute || execution.model == ExecutionModelMeshEXT || execution.model == ExecutionModelTaskEXT) { // For mesh shaders, we receive special arguments that we must pass down as function arguments. // HLSL does not support proper reference types for passing these IO blocks, // but DXC post-inlining seems to magically fix it up anyways *shrug*. SmallVector arglist; auto &func = get(ir.default_entry_point); // The arguments are marked out, avoid detecting reads and emitting inout. for (auto &arg : func.arguments) arglist.push_back(to_expression(arg.id, false)); statement(get_inner_entry_point_name(), "(", merge(arglist), ");"); } else SPIRV_CROSS_THROW("Unsupported shader stage."); // Copy stage outputs. if (require_output) { statement("SPIRV_Cross_Output stage_output;"); // Copy builtins from globals to return struct. active_output_builtins.for_each_bit([&](uint32_t i) { // PointSize doesn't exist in HLSL SM 4+. if (i == BuiltInPointSize && !legacy) return; switch (static_cast(i)) { case BuiltInClipDistance: for (uint32_t clip = 0; clip < clip_distance_count; clip++) statement("stage_output.gl_ClipDistance", clip / 4, ".", "xyzw"[clip & 3], " = gl_ClipDistance[", clip, "];"); break; case BuiltInCullDistance: for (uint32_t cull = 0; cull < cull_distance_count; cull++) statement("stage_output.gl_CullDistance", cull / 4, ".", "xyzw"[cull & 3], " = gl_CullDistance[", cull, "];"); break; case BuiltInSampleMask: statement("stage_output.gl_SampleMask = gl_SampleMask[0];"); break; default: { auto builtin_expr = builtin_to_glsl(static_cast(i), StorageClassOutput); statement("stage_output.", builtin_expr, " = ", builtin_expr, ";"); break; } } }); ir.for_each_typed_id([&](uint32_t, SPIRVariable &var) { auto &type = this->get(var.basetype); bool block = has_decoration(type.self, DecorationBlock); if (var.storage != StorageClassOutput) return; if (!var.remapped_variable && type.pointer && !is_builtin_variable(var) && interface_variable_exists_in_entry_point(var.self)) { if (block) { // I/O blocks need to flatten output. auto type_name = to_name(type.self); auto var_name = to_name(var.self); for (uint32_t mbr_idx = 0; mbr_idx < uint32_t(type.member_types.size()); mbr_idx++) { auto mbr_name = to_member_name(type, mbr_idx); auto flat_name = join(type_name, "_", mbr_name); statement("stage_output.", flat_name, " = ", var_name, ".", mbr_name, ";"); } } else { auto name = to_name(var.self); if (legacy && execution.model == ExecutionModelFragment) { string output_filler; for (uint32_t size = type.vecsize; size < 4; ++size) output_filler += ", 0.0"; statement("stage_output.", name, " = float4(", name, output_filler, ");"); } else { statement("stage_output.", name, " = ", name, ";"); } } } }); statement("return stage_output;"); } end_scope(); } void CompilerHLSL::emit_fixup() { if (is_vertex_like_shader() && active_output_builtins.get(BuiltInPosition)) { // Do various mangling on the gl_Position. if (hlsl_options.shader_model <= 30) { statement("gl_Position.x = gl_Position.x - gl_HalfPixel.x * " "gl_Position.w;"); statement("gl_Position.y = gl_Position.y + gl_HalfPixel.y * " "gl_Position.w;"); } if (options.vertex.flip_vert_y) statement("gl_Position.y = -gl_Position.y;"); if (options.vertex.fixup_clipspace) statement("gl_Position.z = (gl_Position.z + gl_Position.w) * 0.5;"); } } void CompilerHLSL::emit_texture_op(const Instruction &i, bool sparse) { if (sparse) SPIRV_CROSS_THROW("Sparse feedback not yet supported in HLSL."); auto *ops = stream(i); auto op = static_cast(i.op); uint32_t length = i.length; SmallVector inherited_expressions; uint32_t result_type = ops[0]; uint32_t id = ops[1]; VariableID img = ops[2]; uint32_t coord = ops[3]; uint32_t dref = 0; uint32_t comp = 0; bool gather = false; bool proj = false; const uint32_t *opt = nullptr; auto *combined_image = maybe_get(img); if (combined_image && has_decoration(img, DecorationNonUniform)) { set_decoration(combined_image->image, DecorationNonUniform); set_decoration(combined_image->sampler, DecorationNonUniform); } auto img_expr = to_non_uniform_aware_expression(combined_image ? combined_image->image : img); inherited_expressions.push_back(coord); switch (op) { case OpImageSampleDrefImplicitLod: case OpImageSampleDrefExplicitLod: dref = ops[4]; opt = &ops[5]; length -= 5; break; case OpImageSampleProjDrefImplicitLod: case OpImageSampleProjDrefExplicitLod: dref = ops[4]; proj = true; opt = &ops[5]; length -= 5; break; case OpImageDrefGather: dref = ops[4]; opt = &ops[5]; gather = true; length -= 5; break; case OpImageGather: comp = ops[4]; opt = &ops[5]; gather = true; length -= 5; break; case OpImageSampleProjImplicitLod: case OpImageSampleProjExplicitLod: opt = &ops[4]; length -= 4; proj = true; break; case OpImageQueryLod: opt = &ops[4]; length -= 4; break; default: opt = &ops[4]; length -= 4; break; } auto &imgtype = expression_type(img); uint32_t coord_components = 0; switch (imgtype.image.dim) { case spv::Dim1D: coord_components = 1; break; case spv::Dim2D: coord_components = 2; break; case spv::Dim3D: coord_components = 3; break; case spv::DimCube: coord_components = 3; break; case spv::DimBuffer: coord_components = 1; break; default: coord_components = 2; break; } if (dref) inherited_expressions.push_back(dref); if (imgtype.image.arrayed) coord_components++; uint32_t bias = 0; uint32_t lod = 0; uint32_t grad_x = 0; uint32_t grad_y = 0; uint32_t coffset = 0; uint32_t offset = 0; uint32_t coffsets = 0; uint32_t sample = 0; uint32_t minlod = 0; uint32_t flags = 0; if (length) { flags = opt[0]; opt++; length--; } auto test = [&](uint32_t &v, uint32_t flag) { if (length && (flags & flag)) { v = *opt++; inherited_expressions.push_back(v); length--; } }; test(bias, ImageOperandsBiasMask); test(lod, ImageOperandsLodMask); test(grad_x, ImageOperandsGradMask); test(grad_y, ImageOperandsGradMask); test(coffset, ImageOperandsConstOffsetMask); test(offset, ImageOperandsOffsetMask); test(coffsets, ImageOperandsConstOffsetsMask); test(sample, ImageOperandsSampleMask); test(minlod, ImageOperandsMinLodMask); string expr; string texop; if (minlod != 0) SPIRV_CROSS_THROW("MinLod texture operand not supported in HLSL."); if (op == OpImageFetch) { if (hlsl_options.shader_model < 40) { SPIRV_CROSS_THROW("texelFetch is not supported in HLSL shader model 2/3."); } texop += img_expr; texop += ".Load"; } else if (op == OpImageQueryLod) { texop += img_expr; texop += ".CalculateLevelOfDetail"; } else { auto &imgformat = get(imgtype.image.type); if (hlsl_options.shader_model < 67 && imgformat.basetype != SPIRType::Float) { SPIRV_CROSS_THROW("Sampling non-float textures is not supported in HLSL SM < 6.7."); } if (hlsl_options.shader_model >= 40) { texop += img_expr; if (is_depth_image(imgtype, img)) { if (gather) { texop += ".GatherCmp"; } else if (lod || grad_x || grad_y) { // Assume we want a fixed level, and the only thing we can get in HLSL is SampleCmpLevelZero. texop += ".SampleCmpLevelZero"; } else texop += ".SampleCmp"; } else if (gather) { uint32_t comp_num = evaluate_constant_u32(comp); if (hlsl_options.shader_model >= 50) { switch (comp_num) { case 0: texop += ".GatherRed"; break; case 1: texop += ".GatherGreen"; break; case 2: texop += ".GatherBlue"; break; case 3: texop += ".GatherAlpha"; break; default: SPIRV_CROSS_THROW("Invalid component."); } } else { if (comp_num == 0) texop += ".Gather"; else SPIRV_CROSS_THROW("HLSL shader model 4 can only gather from the red component."); } } else if (bias) texop += ".SampleBias"; else if (grad_x || grad_y) texop += ".SampleGrad"; else if (lod) texop += ".SampleLevel"; else texop += ".Sample"; } else { switch (imgtype.image.dim) { case Dim1D: texop += "tex1D"; break; case Dim2D: texop += "tex2D"; break; case Dim3D: texop += "tex3D"; break; case DimCube: texop += "texCUBE"; break; case DimRect: case DimBuffer: case DimSubpassData: SPIRV_CROSS_THROW("Buffer texture support is not yet implemented for HLSL"); // TODO default: SPIRV_CROSS_THROW("Invalid dimension."); } if (gather) SPIRV_CROSS_THROW("textureGather is not supported in HLSL shader model 2/3."); if (offset || coffset) SPIRV_CROSS_THROW("textureOffset is not supported in HLSL shader model 2/3."); if (grad_x || grad_y) texop += "grad"; else if (lod) texop += "lod"; else if (bias) texop += "bias"; else if (proj || dref) texop += "proj"; } } expr += texop; expr += "("; if (hlsl_options.shader_model < 40) { if (combined_image) SPIRV_CROSS_THROW("Separate images/samplers are not supported in HLSL shader model 2/3."); expr += to_expression(img); } else if (op != OpImageFetch) { string sampler_expr; if (combined_image) sampler_expr = to_non_uniform_aware_expression(combined_image->sampler); else sampler_expr = to_sampler_expression(img); expr += sampler_expr; } auto swizzle = [](uint32_t comps, uint32_t in_comps) -> const char * { if (comps == in_comps) return ""; switch (comps) { case 1: return ".x"; case 2: return ".xy"; case 3: return ".xyz"; default: return ""; } }; bool forward = should_forward(coord); // The IR can give us more components than we need, so chop them off as needed. string coord_expr; auto &coord_type = expression_type(coord); if (coord_components != coord_type.vecsize) coord_expr = to_enclosed_expression(coord) + swizzle(coord_components, expression_type(coord).vecsize); else coord_expr = to_expression(coord); if (proj && hlsl_options.shader_model >= 40) // Legacy HLSL has "proj" operations which do this for us. coord_expr = coord_expr + " / " + to_extract_component_expression(coord, coord_components); if (hlsl_options.shader_model < 40) { if (dref) { if (imgtype.image.dim != spv::Dim1D && imgtype.image.dim != spv::Dim2D) { SPIRV_CROSS_THROW( "Depth comparison is only supported for 1D and 2D textures in HLSL shader model 2/3."); } if (grad_x || grad_y) SPIRV_CROSS_THROW("Depth comparison is not supported for grad sampling in HLSL shader model 2/3."); for (uint32_t size = coord_components; size < 2; ++size) coord_expr += ", 0.0"; forward = forward && should_forward(dref); coord_expr += ", " + to_expression(dref); } else if (lod || bias || proj) { for (uint32_t size = coord_components; size < 3; ++size) coord_expr += ", 0.0"; } if (lod) { coord_expr = "float4(" + coord_expr + ", " + to_expression(lod) + ")"; } else if (bias) { coord_expr = "float4(" + coord_expr + ", " + to_expression(bias) + ")"; } else if (proj) { coord_expr = "float4(" + coord_expr + ", " + to_extract_component_expression(coord, coord_components) + ")"; } else if (dref) { // A "normal" sample gets fed into tex2Dproj as well, because the // regular tex2D accepts only two coordinates. coord_expr = "float4(" + coord_expr + ", 1.0)"; } if (!!lod + !!bias + !!proj > 1) SPIRV_CROSS_THROW("Legacy HLSL can only use one of lod/bias/proj modifiers."); } if (op == OpImageFetch) { if (imgtype.image.dim != DimBuffer && !imgtype.image.ms) coord_expr = join("int", coord_components + 1, "(", coord_expr, ", ", lod ? to_expression(lod) : string("0"), ")"); } else expr += ", "; expr += coord_expr; if (dref && hlsl_options.shader_model >= 40) { forward = forward && should_forward(dref); expr += ", "; if (proj) expr += to_enclosed_expression(dref) + " / " + to_extract_component_expression(coord, coord_components); else expr += to_expression(dref); } if (!dref && (grad_x || grad_y)) { forward = forward && should_forward(grad_x); forward = forward && should_forward(grad_y); expr += ", "; expr += to_expression(grad_x); expr += ", "; expr += to_expression(grad_y); } if (!dref && lod && hlsl_options.shader_model >= 40 && op != OpImageFetch) { forward = forward && should_forward(lod); expr += ", "; expr += to_expression(lod); } if (!dref && bias && hlsl_options.shader_model >= 40) { forward = forward && should_forward(bias); expr += ", "; expr += to_expression(bias); } if (coffset) { forward = forward && should_forward(coffset); expr += ", "; expr += to_expression(coffset); } else if (offset) { forward = forward && should_forward(offset); expr += ", "; expr += to_expression(offset); } if (sample) { expr += ", "; expr += to_expression(sample); } expr += ")"; if (dref && hlsl_options.shader_model < 40) expr += ".x"; if (op == OpImageQueryLod) { // This is rather awkward. // textureQueryLod returns two values, the "accessed level", // as well as the actual LOD lambda. // As far as I can tell, there is no way to get the .x component // according to GLSL spec, and it depends on the sampler itself. // Just assume X == Y, so we will need to splat the result to a float2. statement("float _", id, "_tmp = ", expr, ";"); statement("float2 _", id, " = _", id, "_tmp.xx;"); set(id, join("_", id), result_type, true); } else { emit_op(result_type, id, expr, forward, false); } for (auto &inherit : inherited_expressions) inherit_expression_dependencies(id, inherit); switch (op) { case OpImageSampleDrefImplicitLod: case OpImageSampleImplicitLod: case OpImageSampleProjImplicitLod: case OpImageSampleProjDrefImplicitLod: register_control_dependent_expression(id); break; default: break; } } string CompilerHLSL::to_resource_binding(const SPIRVariable &var) { const auto &type = get(var.basetype); // We can remap push constant blocks, even if they don't have any binding decoration. if (type.storage != StorageClassPushConstant && !has_decoration(var.self, DecorationBinding)) return ""; char space = '\0'; HLSLBindingFlagBits resource_flags = HLSL_BINDING_AUTO_NONE_BIT; switch (type.basetype) { case SPIRType::SampledImage: space = 't'; // SRV resource_flags = HLSL_BINDING_AUTO_SRV_BIT; break; case SPIRType::Image: if (type.image.sampled == 2 && type.image.dim != DimSubpassData) { if (has_decoration(var.self, DecorationNonWritable) && hlsl_options.nonwritable_uav_texture_as_srv) { space = 't'; // SRV resource_flags = HLSL_BINDING_AUTO_SRV_BIT; } else { space = 'u'; // UAV resource_flags = HLSL_BINDING_AUTO_UAV_BIT; } } else { space = 't'; // SRV resource_flags = HLSL_BINDING_AUTO_SRV_BIT; } break; case SPIRType::Sampler: space = 's'; resource_flags = HLSL_BINDING_AUTO_SAMPLER_BIT; break; case SPIRType::AccelerationStructure: space = 't'; // SRV resource_flags = HLSL_BINDING_AUTO_SRV_BIT; break; case SPIRType::Struct: { auto storage = type.storage; if (storage == StorageClassUniform) { if (has_decoration(type.self, DecorationBufferBlock)) { Bitset flags = ir.get_buffer_block_flags(var); bool is_readonly = flags.get(DecorationNonWritable) && !is_hlsl_force_storage_buffer_as_uav(var.self); space = is_readonly ? 't' : 'u'; // UAV resource_flags = is_readonly ? HLSL_BINDING_AUTO_SRV_BIT : HLSL_BINDING_AUTO_UAV_BIT; } else if (has_decoration(type.self, DecorationBlock)) { space = 'b'; // Constant buffers resource_flags = HLSL_BINDING_AUTO_CBV_BIT; } } else if (storage == StorageClassPushConstant) { space = 'b'; // Constant buffers resource_flags = HLSL_BINDING_AUTO_PUSH_CONSTANT_BIT; } else if (storage == StorageClassStorageBuffer) { // UAV or SRV depending on readonly flag. Bitset flags = ir.get_buffer_block_flags(var); bool is_readonly = flags.get(DecorationNonWritable) && !is_hlsl_force_storage_buffer_as_uav(var.self); space = is_readonly ? 't' : 'u'; resource_flags = is_readonly ? HLSL_BINDING_AUTO_SRV_BIT : HLSL_BINDING_AUTO_UAV_BIT; } break; } default: break; } if (!space) return ""; uint32_t desc_set = resource_flags == HLSL_BINDING_AUTO_PUSH_CONSTANT_BIT ? ResourceBindingPushConstantDescriptorSet : 0u; uint32_t binding = resource_flags == HLSL_BINDING_AUTO_PUSH_CONSTANT_BIT ? ResourceBindingPushConstantBinding : 0u; if (has_decoration(var.self, DecorationBinding)) binding = get_decoration(var.self, DecorationBinding); if (has_decoration(var.self, DecorationDescriptorSet)) desc_set = get_decoration(var.self, DecorationDescriptorSet); return to_resource_register(resource_flags, space, binding, desc_set); } string CompilerHLSL::to_resource_binding_sampler(const SPIRVariable &var) { // For combined image samplers. if (!has_decoration(var.self, DecorationBinding)) return ""; return to_resource_register(HLSL_BINDING_AUTO_SAMPLER_BIT, 's', get_decoration(var.self, DecorationBinding), get_decoration(var.self, DecorationDescriptorSet)); } void CompilerHLSL::remap_hlsl_resource_binding(HLSLBindingFlagBits type, uint32_t &desc_set, uint32_t &binding) { auto itr = resource_bindings.find({ get_execution_model(), desc_set, binding }); if (itr != end(resource_bindings)) { auto &remap = itr->second; remap.second = true; switch (type) { case HLSL_BINDING_AUTO_PUSH_CONSTANT_BIT: case HLSL_BINDING_AUTO_CBV_BIT: desc_set = remap.first.cbv.register_space; binding = remap.first.cbv.register_binding; break; case HLSL_BINDING_AUTO_SRV_BIT: desc_set = remap.first.srv.register_space; binding = remap.first.srv.register_binding; break; case HLSL_BINDING_AUTO_SAMPLER_BIT: desc_set = remap.first.sampler.register_space; binding = remap.first.sampler.register_binding; break; case HLSL_BINDING_AUTO_UAV_BIT: desc_set = remap.first.uav.register_space; binding = remap.first.uav.register_binding; break; default: break; } } } string CompilerHLSL::to_resource_register(HLSLBindingFlagBits flag, char space, uint32_t binding, uint32_t space_set) { if ((flag & resource_binding_flags) == 0) { remap_hlsl_resource_binding(flag, space_set, binding); // The push constant block did not have a binding, and there were no remap for it, // so, declare without register binding. if (flag == HLSL_BINDING_AUTO_PUSH_CONSTANT_BIT && space_set == ResourceBindingPushConstantDescriptorSet) return ""; if (hlsl_options.shader_model >= 51) return join(" : register(", space, binding, ", space", space_set, ")"); else return join(" : register(", space, binding, ")"); } else return ""; } void CompilerHLSL::emit_modern_uniform(const SPIRVariable &var) { auto &type = get(var.basetype); switch (type.basetype) { case SPIRType::SampledImage: case SPIRType::Image: { bool is_coherent = false; if (type.basetype == SPIRType::Image && type.image.sampled == 2) is_coherent = has_decoration(var.self, DecorationCoherent); statement(is_coherent ? "globallycoherent " : "", image_type_hlsl_modern(type, var.self), " ", to_name(var.self), type_to_array_glsl(type), to_resource_binding(var), ";"); if (type.basetype == SPIRType::SampledImage && type.image.dim != DimBuffer) { // For combined image samplers, also emit a combined image sampler. if (is_depth_image(type, var.self)) statement("SamplerComparisonState ", to_sampler_expression(var.self), type_to_array_glsl(type), to_resource_binding_sampler(var), ";"); else statement("SamplerState ", to_sampler_expression(var.self), type_to_array_glsl(type), to_resource_binding_sampler(var), ";"); } break; } case SPIRType::Sampler: if (comparison_ids.count(var.self)) statement("SamplerComparisonState ", to_name(var.self), type_to_array_glsl(type), to_resource_binding(var), ";"); else statement("SamplerState ", to_name(var.self), type_to_array_glsl(type), to_resource_binding(var), ";"); break; default: statement(variable_decl(var), to_resource_binding(var), ";"); break; } } void CompilerHLSL::emit_legacy_uniform(const SPIRVariable &var) { auto &type = get(var.basetype); switch (type.basetype) { case SPIRType::Sampler: case SPIRType::Image: SPIRV_CROSS_THROW("Separate image and samplers not supported in legacy HLSL."); default: statement(variable_decl(var), ";"); break; } } void CompilerHLSL::emit_uniform(const SPIRVariable &var) { add_resource_name(var.self); if (hlsl_options.shader_model >= 40) emit_modern_uniform(var); else emit_legacy_uniform(var); } bool CompilerHLSL::emit_complex_bitcast(uint32_t, uint32_t, uint32_t) { return false; } string CompilerHLSL::bitcast_glsl_op(const SPIRType &out_type, const SPIRType &in_type) { if (out_type.basetype == SPIRType::UInt && in_type.basetype == SPIRType::Int) return type_to_glsl(out_type); else if (out_type.basetype == SPIRType::UInt64 && in_type.basetype == SPIRType::Int64) return type_to_glsl(out_type); else if (out_type.basetype == SPIRType::UInt && in_type.basetype == SPIRType::Float) return "asuint"; else if (out_type.basetype == SPIRType::Int && in_type.basetype == SPIRType::UInt) return type_to_glsl(out_type); else if (out_type.basetype == SPIRType::Int64 && in_type.basetype == SPIRType::UInt64) return type_to_glsl(out_type); else if (out_type.basetype == SPIRType::Int && in_type.basetype == SPIRType::Float) return "asint"; else if (out_type.basetype == SPIRType::Float && in_type.basetype == SPIRType::UInt) return "asfloat"; else if (out_type.basetype == SPIRType::Float && in_type.basetype == SPIRType::Int) return "asfloat"; else if (out_type.basetype == SPIRType::Int64 && in_type.basetype == SPIRType::Double) SPIRV_CROSS_THROW("Double to Int64 is not supported in HLSL."); else if (out_type.basetype == SPIRType::UInt64 && in_type.basetype == SPIRType::Double) SPIRV_CROSS_THROW("Double to UInt64 is not supported in HLSL."); else if (out_type.basetype == SPIRType::Double && in_type.basetype == SPIRType::Int64) return "asdouble"; else if (out_type.basetype == SPIRType::Double && in_type.basetype == SPIRType::UInt64) return "asdouble"; else if (out_type.basetype == SPIRType::Half && in_type.basetype == SPIRType::UInt && in_type.vecsize == 1) { if (!requires_explicit_fp16_packing) { requires_explicit_fp16_packing = true; force_recompile(); } return "spvUnpackFloat2x16"; } else if (out_type.basetype == SPIRType::UInt && in_type.basetype == SPIRType::Half && in_type.vecsize == 2) { if (!requires_explicit_fp16_packing) { requires_explicit_fp16_packing = true; force_recompile(); } return "spvPackFloat2x16"; } else if (out_type.basetype == SPIRType::UShort && in_type.basetype == SPIRType::Half) { if (hlsl_options.shader_model < 40) SPIRV_CROSS_THROW("Half to UShort requires Shader Model 4."); return "(" + type_to_glsl(out_type) + ")f32tof16"; } else if (out_type.basetype == SPIRType::Half && in_type.basetype == SPIRType::UShort) { if (hlsl_options.shader_model < 40) SPIRV_CROSS_THROW("UShort to Half requires Shader Model 4."); return "(" + type_to_glsl(out_type) + ")f16tof32"; } else return ""; } void CompilerHLSL::emit_glsl_op(uint32_t result_type, uint32_t id, uint32_t eop, const uint32_t *args, uint32_t count) { auto op = static_cast(eop); // If we need to do implicit bitcasts, make sure we do it with the correct type. uint32_t integer_width = get_integer_width_for_glsl_instruction(op, args, count); auto int_type = to_signed_basetype(integer_width); auto uint_type = to_unsigned_basetype(integer_width); op = get_remapped_glsl_op(op); switch (op) { case GLSLstd450InverseSqrt: emit_unary_func_op(result_type, id, args[0], "rsqrt"); break; case GLSLstd450Fract: emit_unary_func_op(result_type, id, args[0], "frac"); break; case GLSLstd450RoundEven: if (hlsl_options.shader_model < 40) SPIRV_CROSS_THROW("roundEven is not supported in HLSL shader model 2/3."); emit_unary_func_op(result_type, id, args[0], "round"); break; case GLSLstd450Trunc: emit_unary_func_op(result_type, id, args[0], "trunc"); break; case GLSLstd450Acosh: case GLSLstd450Asinh: case GLSLstd450Atanh: // These are not supported in HLSL, always emulate them. emit_emulated_ahyper_op(result_type, id, args[0], op); break; case GLSLstd450FMix: case GLSLstd450IMix: emit_trinary_func_op(result_type, id, args[0], args[1], args[2], "lerp"); break; case GLSLstd450Atan2: emit_binary_func_op(result_type, id, args[0], args[1], "atan2"); break; case GLSLstd450Fma: emit_trinary_func_op(result_type, id, args[0], args[1], args[2], "mad"); break; case GLSLstd450InterpolateAtCentroid: emit_unary_func_op(result_type, id, args[0], "EvaluateAttributeAtCentroid"); break; case GLSLstd450InterpolateAtSample: emit_binary_func_op(result_type, id, args[0], args[1], "EvaluateAttributeAtSample"); break; case GLSLstd450InterpolateAtOffset: emit_binary_func_op(result_type, id, args[0], args[1], "EvaluateAttributeSnapped"); break; case GLSLstd450PackHalf2x16: if (!requires_fp16_packing) { requires_fp16_packing = true; force_recompile(); } emit_unary_func_op(result_type, id, args[0], "spvPackHalf2x16"); break; case GLSLstd450UnpackHalf2x16: if (!requires_fp16_packing) { requires_fp16_packing = true; force_recompile(); } emit_unary_func_op(result_type, id, args[0], "spvUnpackHalf2x16"); break; case GLSLstd450PackSnorm4x8: if (!requires_snorm8_packing) { requires_snorm8_packing = true; force_recompile(); } emit_unary_func_op(result_type, id, args[0], "spvPackSnorm4x8"); break; case GLSLstd450UnpackSnorm4x8: if (!requires_snorm8_packing) { requires_snorm8_packing = true; force_recompile(); } emit_unary_func_op(result_type, id, args[0], "spvUnpackSnorm4x8"); break; case GLSLstd450PackUnorm4x8: if (!requires_unorm8_packing) { requires_unorm8_packing = true; force_recompile(); } emit_unary_func_op(result_type, id, args[0], "spvPackUnorm4x8"); break; case GLSLstd450UnpackUnorm4x8: if (!requires_unorm8_packing) { requires_unorm8_packing = true; force_recompile(); } emit_unary_func_op(result_type, id, args[0], "spvUnpackUnorm4x8"); break; case GLSLstd450PackSnorm2x16: if (!requires_snorm16_packing) { requires_snorm16_packing = true; force_recompile(); } emit_unary_func_op(result_type, id, args[0], "spvPackSnorm2x16"); break; case GLSLstd450UnpackSnorm2x16: if (!requires_snorm16_packing) { requires_snorm16_packing = true; force_recompile(); } emit_unary_func_op(result_type, id, args[0], "spvUnpackSnorm2x16"); break; case GLSLstd450PackUnorm2x16: if (!requires_unorm16_packing) { requires_unorm16_packing = true; force_recompile(); } emit_unary_func_op(result_type, id, args[0], "spvPackUnorm2x16"); break; case GLSLstd450UnpackUnorm2x16: if (!requires_unorm16_packing) { requires_unorm16_packing = true; force_recompile(); } emit_unary_func_op(result_type, id, args[0], "spvUnpackUnorm2x16"); break; case GLSLstd450PackDouble2x32: case GLSLstd450UnpackDouble2x32: SPIRV_CROSS_THROW("packDouble2x32/unpackDouble2x32 not supported in HLSL."); case GLSLstd450FindILsb: { auto basetype = expression_type(args[0]).basetype; emit_unary_func_op_cast(result_type, id, args[0], "firstbitlow", basetype, basetype); break; } case GLSLstd450FindSMsb: emit_unary_func_op_cast(result_type, id, args[0], "firstbithigh", int_type, int_type); break; case GLSLstd450FindUMsb: emit_unary_func_op_cast(result_type, id, args[0], "firstbithigh", uint_type, uint_type); break; case GLSLstd450MatrixInverse: { auto &type = get(result_type); if (type.vecsize == 2 && type.columns == 2) { if (!requires_inverse_2x2) { requires_inverse_2x2 = true; force_recompile(); } } else if (type.vecsize == 3 && type.columns == 3) { if (!requires_inverse_3x3) { requires_inverse_3x3 = true; force_recompile(); } } else if (type.vecsize == 4 && type.columns == 4) { if (!requires_inverse_4x4) { requires_inverse_4x4 = true; force_recompile(); } } emit_unary_func_op(result_type, id, args[0], "spvInverse"); break; } case GLSLstd450Normalize: // HLSL does not support scalar versions here. if (expression_type(args[0]).vecsize == 1) { // Returns -1 or 1 for valid input, sign() does the job. emit_unary_func_op(result_type, id, args[0], "sign"); } else CompilerGLSL::emit_glsl_op(result_type, id, eop, args, count); break; case GLSLstd450Reflect: if (get(result_type).vecsize == 1) { if (!requires_scalar_reflect) { requires_scalar_reflect = true; force_recompile(); } emit_binary_func_op(result_type, id, args[0], args[1], "spvReflect"); } else CompilerGLSL::emit_glsl_op(result_type, id, eop, args, count); break; case GLSLstd450Refract: if (get(result_type).vecsize == 1) { if (!requires_scalar_refract) { requires_scalar_refract = true; force_recompile(); } emit_trinary_func_op(result_type, id, args[0], args[1], args[2], "spvRefract"); } else CompilerGLSL::emit_glsl_op(result_type, id, eop, args, count); break; case GLSLstd450FaceForward: if (get(result_type).vecsize == 1) { if (!requires_scalar_faceforward) { requires_scalar_faceforward = true; force_recompile(); } emit_trinary_func_op(result_type, id, args[0], args[1], args[2], "spvFaceForward"); } else CompilerGLSL::emit_glsl_op(result_type, id, eop, args, count); break; default: CompilerGLSL::emit_glsl_op(result_type, id, eop, args, count); break; } } void CompilerHLSL::read_access_chain_array(const string &lhs, const SPIRAccessChain &chain) { auto &type = get(chain.basetype); // Need to use a reserved identifier here since it might shadow an identifier in the access chain input or other loops. auto ident = get_unique_identifier(); statement("[unroll]"); statement("for (int ", ident, " = 0; ", ident, " < ", to_array_size(type, uint32_t(type.array.size() - 1)), "; ", ident, "++)"); begin_scope(); auto subchain = chain; subchain.dynamic_index = join(ident, " * ", chain.array_stride, " + ", chain.dynamic_index); subchain.basetype = type.parent_type; if (!get(subchain.basetype).array.empty()) subchain.array_stride = get_decoration(subchain.basetype, DecorationArrayStride); read_access_chain(nullptr, join(lhs, "[", ident, "]"), subchain); end_scope(); } void CompilerHLSL::read_access_chain_struct(const string &lhs, const SPIRAccessChain &chain) { auto &type = get(chain.basetype); auto subchain = chain; uint32_t member_count = uint32_t(type.member_types.size()); for (uint32_t i = 0; i < member_count; i++) { uint32_t offset = type_struct_member_offset(type, i); subchain.static_index = chain.static_index + offset; subchain.basetype = type.member_types[i]; subchain.matrix_stride = 0; subchain.array_stride = 0; subchain.row_major_matrix = false; auto &member_type = get(subchain.basetype); if (member_type.columns > 1) { subchain.matrix_stride = type_struct_member_matrix_stride(type, i); subchain.row_major_matrix = has_member_decoration(type.self, i, DecorationRowMajor); } if (!member_type.array.empty()) subchain.array_stride = type_struct_member_array_stride(type, i); read_access_chain(nullptr, join(lhs, ".", to_member_name(type, i)), subchain); } } void CompilerHLSL::read_access_chain(string *expr, const string &lhs, const SPIRAccessChain &chain) { auto &type = get(chain.basetype); SPIRType target_type { is_scalar(type) ? OpTypeInt : type.op }; target_type.basetype = SPIRType::UInt; target_type.vecsize = type.vecsize; target_type.columns = type.columns; if (!type.array.empty()) { read_access_chain_array(lhs, chain); return; } else if (type.basetype == SPIRType::Struct) { read_access_chain_struct(lhs, chain); return; } else if (type.width != 32 && !hlsl_options.enable_16bit_types) SPIRV_CROSS_THROW("Reading types other than 32-bit from ByteAddressBuffer not yet supported, unless SM 6.2 and " "native 16-bit types are enabled."); string base = chain.base; if (has_decoration(chain.self, DecorationNonUniform)) convert_non_uniform_expression(base, chain.self); bool templated_load = hlsl_options.shader_model >= 62; string load_expr; string template_expr; if (templated_load) template_expr = join("<", type_to_glsl(type), ">"); // Load a vector or scalar. if (type.columns == 1 && !chain.row_major_matrix) { const char *load_op = nullptr; switch (type.vecsize) { case 1: load_op = "Load"; break; case 2: load_op = "Load2"; break; case 3: load_op = "Load3"; break; case 4: load_op = "Load4"; break; default: SPIRV_CROSS_THROW("Unknown vector size."); } if (templated_load) load_op = "Load"; load_expr = join(base, ".", load_op, template_expr, "(", chain.dynamic_index, chain.static_index, ")"); } else if (type.columns == 1) { // Strided load since we are loading a column from a row-major matrix. if (templated_load) { auto scalar_type = type; scalar_type.vecsize = 1; scalar_type.columns = 1; template_expr = join("<", type_to_glsl(scalar_type), ">"); if (type.vecsize > 1) load_expr += type_to_glsl(type) + "("; } else if (type.vecsize > 1) { load_expr = type_to_glsl(target_type); load_expr += "("; } for (uint32_t r = 0; r < type.vecsize; r++) { load_expr += join(base, ".Load", template_expr, "(", chain.dynamic_index, chain.static_index + r * chain.matrix_stride, ")"); if (r + 1 < type.vecsize) load_expr += ", "; } if (type.vecsize > 1) load_expr += ")"; } else if (!chain.row_major_matrix) { // Load a matrix, column-major, the easy case. const char *load_op = nullptr; switch (type.vecsize) { case 1: load_op = "Load"; break; case 2: load_op = "Load2"; break; case 3: load_op = "Load3"; break; case 4: load_op = "Load4"; break; default: SPIRV_CROSS_THROW("Unknown vector size."); } if (templated_load) { auto vector_type = type; vector_type.columns = 1; template_expr = join("<", type_to_glsl(vector_type), ">"); load_expr = type_to_glsl(type); load_op = "Load"; } else { // Note, this loading style in HLSL is *actually* row-major, but we always treat matrices as transposed in this backend, // so row-major is technically column-major ... load_expr = type_to_glsl(target_type); } load_expr += "("; for (uint32_t c = 0; c < type.columns; c++) { load_expr += join(base, ".", load_op, template_expr, "(", chain.dynamic_index, chain.static_index + c * chain.matrix_stride, ")"); if (c + 1 < type.columns) load_expr += ", "; } load_expr += ")"; } else { // Pick out elements one by one ... Hopefully compilers are smart enough to recognize this pattern // considering HLSL is "row-major decl", but "column-major" memory layout (basically implicit transpose model, ugh) ... if (templated_load) { load_expr = type_to_glsl(type); auto scalar_type = type; scalar_type.vecsize = 1; scalar_type.columns = 1; template_expr = join("<", type_to_glsl(scalar_type), ">"); } else load_expr = type_to_glsl(target_type); load_expr += "("; for (uint32_t c = 0; c < type.columns; c++) { for (uint32_t r = 0; r < type.vecsize; r++) { load_expr += join(base, ".Load", template_expr, "(", chain.dynamic_index, chain.static_index + c * (type.width / 8) + r * chain.matrix_stride, ")"); if ((r + 1 < type.vecsize) || (c + 1 < type.columns)) load_expr += ", "; } } load_expr += ")"; } if (!templated_load) { auto bitcast_op = bitcast_glsl_op(type, target_type); if (!bitcast_op.empty()) load_expr = join(bitcast_op, "(", load_expr, ")"); } if (lhs.empty()) { assert(expr); *expr = std::move(load_expr); } else statement(lhs, " = ", load_expr, ";"); } void CompilerHLSL::emit_load(const Instruction &instruction) { auto ops = stream(instruction); auto *chain = maybe_get(ops[2]); if (chain) { uint32_t result_type = ops[0]; uint32_t id = ops[1]; uint32_t ptr = ops[2]; auto &type = get(result_type); bool composite_load = !type.array.empty() || type.basetype == SPIRType::Struct; if (composite_load) { // We cannot make this work in one single expression as we might have nested structures and arrays, // so unroll the load to an uninitialized temporary. emit_uninitialized_temporary_expression(result_type, id); read_access_chain(nullptr, to_expression(id), *chain); track_expression_read(chain->self); } else { string load_expr; read_access_chain(&load_expr, "", *chain); bool forward = should_forward(ptr) && forced_temporaries.find(id) == end(forced_temporaries); // If we are forwarding this load, // don't register the read to access chain here, defer that to when we actually use the expression, // using the add_implied_read_expression mechanism. if (!forward) track_expression_read(chain->self); // Do not forward complex load sequences like matrices, structs and arrays. if (type.columns > 1) forward = false; auto &e = emit_op(result_type, id, load_expr, forward, true); e.need_transpose = false; register_read(id, ptr, forward); inherit_expression_dependencies(id, ptr); if (forward) add_implied_read_expression(e, chain->self); } } else CompilerGLSL::emit_instruction(instruction); } void CompilerHLSL::write_access_chain_array(const SPIRAccessChain &chain, uint32_t value, const SmallVector &composite_chain) { auto *ptype = &get(chain.basetype); while (ptype->pointer) { ptype = &get(ptype->basetype); } auto &type = *ptype; // Need to use a reserved identifier here since it might shadow an identifier in the access chain input or other loops. auto ident = get_unique_identifier(); uint32_t id = ir.increase_bound_by(2); uint32_t int_type_id = id + 1; SPIRType int_type { OpTypeInt }; int_type.basetype = SPIRType::Int; int_type.width = 32; set(int_type_id, int_type); set(id, ident, int_type_id, true); set_name(id, ident); suppressed_usage_tracking.insert(id); statement("[unroll]"); statement("for (int ", ident, " = 0; ", ident, " < ", to_array_size(type, uint32_t(type.array.size() - 1)), "; ", ident, "++)"); begin_scope(); auto subchain = chain; subchain.dynamic_index = join(ident, " * ", chain.array_stride, " + ", chain.dynamic_index); subchain.basetype = type.parent_type; // Forcefully allow us to use an ID here by setting MSB. auto subcomposite_chain = composite_chain; subcomposite_chain.push_back(0x80000000u | id); if (!get(subchain.basetype).array.empty()) subchain.array_stride = get_decoration(subchain.basetype, DecorationArrayStride); write_access_chain(subchain, value, subcomposite_chain); end_scope(); } void CompilerHLSL::write_access_chain_struct(const SPIRAccessChain &chain, uint32_t value, const SmallVector &composite_chain) { auto &type = get(chain.basetype); uint32_t member_count = uint32_t(type.member_types.size()); auto subchain = chain; auto subcomposite_chain = composite_chain; subcomposite_chain.push_back(0); for (uint32_t i = 0; i < member_count; i++) { uint32_t offset = type_struct_member_offset(type, i); subchain.static_index = chain.static_index + offset; subchain.basetype = type.member_types[i]; subchain.matrix_stride = 0; subchain.array_stride = 0; subchain.row_major_matrix = false; auto &member_type = get(subchain.basetype); if (member_type.columns > 1) { subchain.matrix_stride = type_struct_member_matrix_stride(type, i); subchain.row_major_matrix = has_member_decoration(type.self, i, DecorationRowMajor); } if (!member_type.array.empty()) subchain.array_stride = type_struct_member_array_stride(type, i); subcomposite_chain.back() = i; write_access_chain(subchain, value, subcomposite_chain); } } string CompilerHLSL::write_access_chain_value(uint32_t value, const SmallVector &composite_chain, bool enclose) { string ret; if (composite_chain.empty()) ret = to_expression(value); else { AccessChainMeta meta; ret = access_chain_internal(value, composite_chain.data(), uint32_t(composite_chain.size()), ACCESS_CHAIN_INDEX_IS_LITERAL_BIT | ACCESS_CHAIN_LITERAL_MSB_FORCE_ID, &meta); } if (enclose) ret = enclose_expression(ret); return ret; } void CompilerHLSL::write_access_chain(const SPIRAccessChain &chain, uint32_t value, const SmallVector &composite_chain) { auto &type = get(chain.basetype); // Make sure we trigger a read of the constituents in the access chain. track_expression_read(chain.self); SPIRType target_type { is_scalar(type) ? OpTypeInt : type.op }; target_type.basetype = SPIRType::UInt; target_type.vecsize = type.vecsize; target_type.columns = type.columns; if (!type.array.empty()) { write_access_chain_array(chain, value, composite_chain); register_write(chain.self); return; } else if (type.basetype == SPIRType::Struct) { write_access_chain_struct(chain, value, composite_chain); register_write(chain.self); return; } else if (type.width != 32 && !hlsl_options.enable_16bit_types) SPIRV_CROSS_THROW("Writing types other than 32-bit to RWByteAddressBuffer not yet supported, unless SM 6.2 and " "native 16-bit types are enabled."); bool templated_store = hlsl_options.shader_model >= 62; auto base = chain.base; if (has_decoration(chain.self, DecorationNonUniform)) convert_non_uniform_expression(base, chain.self); string template_expr; if (templated_store) template_expr = join("<", type_to_glsl(type), ">"); if (type.columns == 1 && !chain.row_major_matrix) { const char *store_op = nullptr; switch (type.vecsize) { case 1: store_op = "Store"; break; case 2: store_op = "Store2"; break; case 3: store_op = "Store3"; break; case 4: store_op = "Store4"; break; default: SPIRV_CROSS_THROW("Unknown vector size."); } auto store_expr = write_access_chain_value(value, composite_chain, false); if (!templated_store) { auto bitcast_op = bitcast_glsl_op(target_type, type); if (!bitcast_op.empty()) store_expr = join(bitcast_op, "(", store_expr, ")"); } else store_op = "Store"; statement(base, ".", store_op, template_expr, "(", chain.dynamic_index, chain.static_index, ", ", store_expr, ");"); } else if (type.columns == 1) { if (templated_store) { auto scalar_type = type; scalar_type.vecsize = 1; scalar_type.columns = 1; template_expr = join("<", type_to_glsl(scalar_type), ">"); } // Strided store. for (uint32_t r = 0; r < type.vecsize; r++) { auto store_expr = write_access_chain_value(value, composite_chain, true); if (type.vecsize > 1) { store_expr += "."; store_expr += index_to_swizzle(r); } remove_duplicate_swizzle(store_expr); if (!templated_store) { auto bitcast_op = bitcast_glsl_op(target_type, type); if (!bitcast_op.empty()) store_expr = join(bitcast_op, "(", store_expr, ")"); } statement(base, ".Store", template_expr, "(", chain.dynamic_index, chain.static_index + chain.matrix_stride * r, ", ", store_expr, ");"); } } else if (!chain.row_major_matrix) { const char *store_op = nullptr; switch (type.vecsize) { case 1: store_op = "Store"; break; case 2: store_op = "Store2"; break; case 3: store_op = "Store3"; break; case 4: store_op = "Store4"; break; default: SPIRV_CROSS_THROW("Unknown vector size."); } if (templated_store) { store_op = "Store"; auto vector_type = type; vector_type.columns = 1; template_expr = join("<", type_to_glsl(vector_type), ">"); } for (uint32_t c = 0; c < type.columns; c++) { auto store_expr = join(write_access_chain_value(value, composite_chain, true), "[", c, "]"); if (!templated_store) { auto bitcast_op = bitcast_glsl_op(target_type, type); if (!bitcast_op.empty()) store_expr = join(bitcast_op, "(", store_expr, ")"); } statement(base, ".", store_op, template_expr, "(", chain.dynamic_index, chain.static_index + c * chain.matrix_stride, ", ", store_expr, ");"); } } else { if (templated_store) { auto scalar_type = type; scalar_type.vecsize = 1; scalar_type.columns = 1; template_expr = join("<", type_to_glsl(scalar_type), ">"); } for (uint32_t r = 0; r < type.vecsize; r++) { for (uint32_t c = 0; c < type.columns; c++) { auto store_expr = join(write_access_chain_value(value, composite_chain, true), "[", c, "].", index_to_swizzle(r)); remove_duplicate_swizzle(store_expr); auto bitcast_op = bitcast_glsl_op(target_type, type); if (!bitcast_op.empty()) store_expr = join(bitcast_op, "(", store_expr, ")"); statement(base, ".Store", template_expr, "(", chain.dynamic_index, chain.static_index + c * (type.width / 8) + r * chain.matrix_stride, ", ", store_expr, ");"); } } } register_write(chain.self); } void CompilerHLSL::emit_store(const Instruction &instruction) { auto ops = stream(instruction); if (options.vertex.flip_vert_y) { auto *expr = maybe_get(ops[0]); if (expr != nullptr && expr->access_meshlet_position_y) { auto lhs = to_dereferenced_expression(ops[0]); auto rhs = to_unpacked_expression(ops[1]); statement(lhs, " = spvFlipVertY(", rhs, ");"); register_write(ops[0]); return; } } auto *chain = maybe_get(ops[0]); if (chain) write_access_chain(*chain, ops[1], {}); else CompilerGLSL::emit_instruction(instruction); } void CompilerHLSL::emit_access_chain(const Instruction &instruction) { auto ops = stream(instruction); uint32_t length = instruction.length; bool need_byte_access_chain = false; auto &type = expression_type(ops[2]); const auto *chain = maybe_get(ops[2]); if (chain) { // Keep tacking on an existing access chain. need_byte_access_chain = true; } else if (type.storage == StorageClassStorageBuffer || has_decoration(type.self, DecorationBufferBlock)) { // If we are starting to poke into an SSBO, we are dealing with ByteAddressBuffers, and we need // to emit SPIRAccessChain rather than a plain SPIRExpression. uint32_t chain_arguments = length - 3; if (chain_arguments > type.array.size()) need_byte_access_chain = true; } if (need_byte_access_chain) { // If we have a chain variable, we are already inside the SSBO, and any array type will refer to arrays within a block, // and not array of SSBO. uint32_t to_plain_buffer_length = chain ? 0u : static_cast(type.array.size()); auto *backing_variable = maybe_get_backing_variable(ops[2]); if (backing_variable != nullptr && is_user_type_structured(backing_variable->self)) { CompilerGLSL::emit_instruction(instruction); return; } string base; if (to_plain_buffer_length != 0) base = access_chain(ops[2], &ops[3], to_plain_buffer_length, get(ops[0])); else if (chain) base = chain->base; else base = to_expression(ops[2]); // Start traversing type hierarchy at the proper non-pointer types. auto *basetype = &get_pointee_type(type); // Traverse the type hierarchy down to the actual buffer types. for (uint32_t i = 0; i < to_plain_buffer_length; i++) { assert(basetype->parent_type); basetype = &get(basetype->parent_type); } uint32_t matrix_stride = 0; uint32_t array_stride = 0; bool row_major_matrix = false; // Inherit matrix information. if (chain) { matrix_stride = chain->matrix_stride; row_major_matrix = chain->row_major_matrix; array_stride = chain->array_stride; } auto offsets = flattened_access_chain_offset(*basetype, &ops[3 + to_plain_buffer_length], length - 3 - to_plain_buffer_length, 0, 1, &row_major_matrix, &matrix_stride, &array_stride); auto &e = set(ops[1], ops[0], type.storage, base, offsets.first, offsets.second); e.row_major_matrix = row_major_matrix; e.matrix_stride = matrix_stride; e.array_stride = array_stride; e.immutable = should_forward(ops[2]); e.loaded_from = backing_variable ? backing_variable->self : ID(0); if (chain) { e.dynamic_index += chain->dynamic_index; e.static_index += chain->static_index; } for (uint32_t i = 2; i < length; i++) { inherit_expression_dependencies(ops[1], ops[i]); add_implied_read_expression(e, ops[i]); } } else { CompilerGLSL::emit_instruction(instruction); } } void CompilerHLSL::emit_atomic(const uint32_t *ops, uint32_t length, spv::Op op) { const char *atomic_op = nullptr; string value_expr; if (op != OpAtomicIDecrement && op != OpAtomicIIncrement && op != OpAtomicLoad && op != OpAtomicStore) value_expr = to_expression(ops[op == OpAtomicCompareExchange ? 6 : 5]); bool is_atomic_store = false; switch (op) { case OpAtomicIIncrement: atomic_op = "InterlockedAdd"; value_expr = "1"; break; case OpAtomicIDecrement: atomic_op = "InterlockedAdd"; value_expr = "-1"; break; case OpAtomicLoad: atomic_op = "InterlockedAdd"; value_expr = "0"; break; case OpAtomicISub: atomic_op = "InterlockedAdd"; value_expr = join("-", enclose_expression(value_expr)); break; case OpAtomicSMin: case OpAtomicUMin: atomic_op = "InterlockedMin"; break; case OpAtomicSMax: case OpAtomicUMax: atomic_op = "InterlockedMax"; break; case OpAtomicAnd: atomic_op = "InterlockedAnd"; break; case OpAtomicOr: atomic_op = "InterlockedOr"; break; case OpAtomicXor: atomic_op = "InterlockedXor"; break; case OpAtomicIAdd: atomic_op = "InterlockedAdd"; break; case OpAtomicExchange: atomic_op = "InterlockedExchange"; break; case OpAtomicStore: atomic_op = "InterlockedExchange"; is_atomic_store = true; break; case OpAtomicCompareExchange: if (length < 8) SPIRV_CROSS_THROW("Not enough data for opcode."); atomic_op = "InterlockedCompareExchange"; value_expr = join(to_expression(ops[7]), ", ", value_expr); break; default: SPIRV_CROSS_THROW("Unknown atomic opcode."); } if (is_atomic_store) { auto &data_type = expression_type(ops[0]); auto *chain = maybe_get(ops[0]); auto &tmp_id = extra_sub_expressions[ops[0]]; if (!tmp_id) { tmp_id = ir.increase_bound_by(1); emit_uninitialized_temporary_expression(get_pointee_type(data_type).self, tmp_id); } if (data_type.storage == StorageClassImage || !chain) { statement(atomic_op, "(", to_non_uniform_aware_expression(ops[0]), ", ", to_expression(ops[3]), ", ", to_expression(tmp_id), ");"); } else { string base = chain->base; if (has_decoration(chain->self, DecorationNonUniform)) convert_non_uniform_expression(base, chain->self); // RWByteAddress buffer is always uint in its underlying type. statement(base, ".", atomic_op, "(", chain->dynamic_index, chain->static_index, ", ", to_expression(ops[3]), ", ", to_expression(tmp_id), ");"); } } else { uint32_t result_type = ops[0]; uint32_t id = ops[1]; forced_temporaries.insert(ops[1]); auto &type = get(result_type); statement(variable_decl(type, to_name(id)), ";"); auto &data_type = expression_type(ops[2]); auto *chain = maybe_get(ops[2]); SPIRType::BaseType expr_type; if (data_type.storage == StorageClassImage || !chain) { statement(atomic_op, "(", to_non_uniform_aware_expression(ops[2]), ", ", value_expr, ", ", to_name(id), ");"); expr_type = data_type.basetype; } else { // RWByteAddress buffer is always uint in its underlying type. string base = chain->base; if (has_decoration(chain->self, DecorationNonUniform)) convert_non_uniform_expression(base, chain->self); expr_type = SPIRType::UInt; statement(base, ".", atomic_op, "(", chain->dynamic_index, chain->static_index, ", ", value_expr, ", ", to_name(id), ");"); } auto expr = bitcast_expression(type, expr_type, to_name(id)); set(id, expr, result_type, true); } flush_all_atomic_capable_variables(); } void CompilerHLSL::emit_subgroup_op(const Instruction &i) { if (hlsl_options.shader_model < 60) SPIRV_CROSS_THROW("Wave ops requires SM 6.0 or higher."); const uint32_t *ops = stream(i); auto op = static_cast(i.op); uint32_t result_type = ops[0]; uint32_t id = ops[1]; auto scope = static_cast(evaluate_constant_u32(ops[2])); if (scope != ScopeSubgroup) SPIRV_CROSS_THROW("Only subgroup scope is supported."); const auto make_inclusive_Sum = [&](const string &expr) -> string { return join(expr, " + ", to_expression(ops[4])); }; const auto make_inclusive_Product = [&](const string &expr) -> string { return join(expr, " * ", to_expression(ops[4])); }; // If we need to do implicit bitcasts, make sure we do it with the correct type. uint32_t integer_width = get_integer_width_for_instruction(i); auto int_type = to_signed_basetype(integer_width); auto uint_type = to_unsigned_basetype(integer_width); #define make_inclusive_BitAnd(expr) "" #define make_inclusive_BitOr(expr) "" #define make_inclusive_BitXor(expr) "" #define make_inclusive_Min(expr) "" #define make_inclusive_Max(expr) "" switch (op) { case OpGroupNonUniformElect: emit_op(result_type, id, "WaveIsFirstLane()", true); break; case OpGroupNonUniformBroadcast: emit_binary_func_op(result_type, id, ops[3], ops[4], "WaveReadLaneAt"); break; case OpGroupNonUniformBroadcastFirst: emit_unary_func_op(result_type, id, ops[3], "WaveReadLaneFirst"); break; case OpGroupNonUniformBallot: emit_unary_func_op(result_type, id, ops[3], "WaveActiveBallot"); break; case OpGroupNonUniformInverseBallot: SPIRV_CROSS_THROW("Cannot trivially implement InverseBallot in HLSL."); case OpGroupNonUniformBallotBitExtract: SPIRV_CROSS_THROW("Cannot trivially implement BallotBitExtract in HLSL."); case OpGroupNonUniformBallotFindLSB: SPIRV_CROSS_THROW("Cannot trivially implement BallotFindLSB in HLSL."); case OpGroupNonUniformBallotFindMSB: SPIRV_CROSS_THROW("Cannot trivially implement BallotFindMSB in HLSL."); case OpGroupNonUniformBallotBitCount: { auto operation = static_cast(ops[3]); bool forward = should_forward(ops[4]); if (operation == GroupOperationReduce) { auto left = join("countbits(", to_enclosed_expression(ops[4]), ".x) + countbits(", to_enclosed_expression(ops[4]), ".y)"); auto right = join("countbits(", to_enclosed_expression(ops[4]), ".z) + countbits(", to_enclosed_expression(ops[4]), ".w)"); emit_op(result_type, id, join(left, " + ", right), forward); inherit_expression_dependencies(id, ops[4]); } else if (operation == GroupOperationInclusiveScan) { auto left = join("countbits(", to_enclosed_expression(ops[4]), ".x & gl_SubgroupLeMask.x) + countbits(", to_enclosed_expression(ops[4]), ".y & gl_SubgroupLeMask.y)"); auto right = join("countbits(", to_enclosed_expression(ops[4]), ".z & gl_SubgroupLeMask.z) + countbits(", to_enclosed_expression(ops[4]), ".w & gl_SubgroupLeMask.w)"); emit_op(result_type, id, join(left, " + ", right), forward); if (!active_input_builtins.get(BuiltInSubgroupLeMask)) { active_input_builtins.set(BuiltInSubgroupLeMask); force_recompile_guarantee_forward_progress(); } } else if (operation == GroupOperationExclusiveScan) { auto left = join("countbits(", to_enclosed_expression(ops[4]), ".x & gl_SubgroupLtMask.x) + countbits(", to_enclosed_expression(ops[4]), ".y & gl_SubgroupLtMask.y)"); auto right = join("countbits(", to_enclosed_expression(ops[4]), ".z & gl_SubgroupLtMask.z) + countbits(", to_enclosed_expression(ops[4]), ".w & gl_SubgroupLtMask.w)"); emit_op(result_type, id, join(left, " + ", right), forward); if (!active_input_builtins.get(BuiltInSubgroupLtMask)) { active_input_builtins.set(BuiltInSubgroupLtMask); force_recompile_guarantee_forward_progress(); } } else SPIRV_CROSS_THROW("Invalid BitCount operation."); break; } case OpGroupNonUniformShuffle: emit_binary_func_op(result_type, id, ops[3], ops[4], "WaveReadLaneAt"); break; case OpGroupNonUniformShuffleXor: { bool forward = should_forward(ops[3]); emit_op(ops[0], ops[1], join("WaveReadLaneAt(", to_unpacked_expression(ops[3]), ", ", "WaveGetLaneIndex() ^ ", to_enclosed_expression(ops[4]), ")"), forward); inherit_expression_dependencies(ops[1], ops[3]); break; } case OpGroupNonUniformShuffleUp: { bool forward = should_forward(ops[3]); emit_op(ops[0], ops[1], join("WaveReadLaneAt(", to_unpacked_expression(ops[3]), ", ", "WaveGetLaneIndex() - ", to_enclosed_expression(ops[4]), ")"), forward); inherit_expression_dependencies(ops[1], ops[3]); break; } case OpGroupNonUniformShuffleDown: { bool forward = should_forward(ops[3]); emit_op(ops[0], ops[1], join("WaveReadLaneAt(", to_unpacked_expression(ops[3]), ", ", "WaveGetLaneIndex() + ", to_enclosed_expression(ops[4]), ")"), forward); inherit_expression_dependencies(ops[1], ops[3]); break; } case OpGroupNonUniformAll: emit_unary_func_op(result_type, id, ops[3], "WaveActiveAllTrue"); break; case OpGroupNonUniformAny: emit_unary_func_op(result_type, id, ops[3], "WaveActiveAnyTrue"); break; case OpGroupNonUniformAllEqual: emit_unary_func_op(result_type, id, ops[3], "WaveActiveAllEqual"); break; // clang-format off #define HLSL_GROUP_OP(op, hlsl_op, supports_scan) \ case OpGroupNonUniform##op: \ { \ auto operation = static_cast(ops[3]); \ if (operation == GroupOperationReduce) \ emit_unary_func_op(result_type, id, ops[4], "WaveActive" #hlsl_op); \ else if (operation == GroupOperationInclusiveScan && supports_scan) \ { \ bool forward = should_forward(ops[4]); \ emit_op(result_type, id, make_inclusive_##hlsl_op (join("WavePrefix" #hlsl_op, "(", to_expression(ops[4]), ")")), forward); \ inherit_expression_dependencies(id, ops[4]); \ } \ else if (operation == GroupOperationExclusiveScan && supports_scan) \ emit_unary_func_op(result_type, id, ops[4], "WavePrefix" #hlsl_op); \ else if (operation == GroupOperationClusteredReduce) \ SPIRV_CROSS_THROW("Cannot trivially implement ClusteredReduce in HLSL."); \ else \ SPIRV_CROSS_THROW("Invalid group operation."); \ break; \ } #define HLSL_GROUP_OP_CAST(op, hlsl_op, type) \ case OpGroupNonUniform##op: \ { \ auto operation = static_cast(ops[3]); \ if (operation == GroupOperationReduce) \ emit_unary_func_op_cast(result_type, id, ops[4], "WaveActive" #hlsl_op, type, type); \ else \ SPIRV_CROSS_THROW("Invalid group operation."); \ break; \ } HLSL_GROUP_OP(FAdd, Sum, true) HLSL_GROUP_OP(FMul, Product, true) HLSL_GROUP_OP(FMin, Min, false) HLSL_GROUP_OP(FMax, Max, false) HLSL_GROUP_OP(IAdd, Sum, true) HLSL_GROUP_OP(IMul, Product, true) HLSL_GROUP_OP_CAST(SMin, Min, int_type) HLSL_GROUP_OP_CAST(SMax, Max, int_type) HLSL_GROUP_OP_CAST(UMin, Min, uint_type) HLSL_GROUP_OP_CAST(UMax, Max, uint_type) HLSL_GROUP_OP(BitwiseAnd, BitAnd, false) HLSL_GROUP_OP(BitwiseOr, BitOr, false) HLSL_GROUP_OP(BitwiseXor, BitXor, false) HLSL_GROUP_OP_CAST(LogicalAnd, BitAnd, uint_type) HLSL_GROUP_OP_CAST(LogicalOr, BitOr, uint_type) HLSL_GROUP_OP_CAST(LogicalXor, BitXor, uint_type) #undef HLSL_GROUP_OP #undef HLSL_GROUP_OP_CAST // clang-format on case OpGroupNonUniformQuadSwap: { uint32_t direction = evaluate_constant_u32(ops[4]); if (direction == 0) emit_unary_func_op(result_type, id, ops[3], "QuadReadAcrossX"); else if (direction == 1) emit_unary_func_op(result_type, id, ops[3], "QuadReadAcrossY"); else if (direction == 2) emit_unary_func_op(result_type, id, ops[3], "QuadReadAcrossDiagonal"); else SPIRV_CROSS_THROW("Invalid quad swap direction."); break; } case OpGroupNonUniformQuadBroadcast: { emit_binary_func_op(result_type, id, ops[3], ops[4], "QuadReadLaneAt"); break; } default: SPIRV_CROSS_THROW("Invalid opcode for subgroup."); } register_control_dependent_expression(id); } void CompilerHLSL::emit_instruction(const Instruction &instruction) { auto ops = stream(instruction); auto opcode = static_cast(instruction.op); #define HLSL_BOP(op) emit_binary_op(ops[0], ops[1], ops[2], ops[3], #op) #define HLSL_BOP_CAST(op, type) \ emit_binary_op_cast(ops[0], ops[1], ops[2], ops[3], #op, type, opcode_is_sign_invariant(opcode), false) #define HLSL_UOP(op) emit_unary_op(ops[0], ops[1], ops[2], #op) #define HLSL_QFOP(op) emit_quaternary_func_op(ops[0], ops[1], ops[2], ops[3], ops[4], ops[5], #op) #define HLSL_TFOP(op) emit_trinary_func_op(ops[0], ops[1], ops[2], ops[3], ops[4], #op) #define HLSL_BFOP(op) emit_binary_func_op(ops[0], ops[1], ops[2], ops[3], #op) #define HLSL_BFOP_CAST(op, type) \ emit_binary_func_op_cast(ops[0], ops[1], ops[2], ops[3], #op, type, opcode_is_sign_invariant(opcode)) #define HLSL_BFOP(op) emit_binary_func_op(ops[0], ops[1], ops[2], ops[3], #op) #define HLSL_UFOP(op) emit_unary_func_op(ops[0], ops[1], ops[2], #op) // If we need to do implicit bitcasts, make sure we do it with the correct type. uint32_t integer_width = get_integer_width_for_instruction(instruction); auto int_type = to_signed_basetype(integer_width); auto uint_type = to_unsigned_basetype(integer_width); opcode = get_remapped_spirv_op(opcode); switch (opcode) { case OpAccessChain: case OpInBoundsAccessChain: { emit_access_chain(instruction); break; } case OpBitcast: { auto bitcast_type = get_bitcast_type(ops[0], ops[2]); if (bitcast_type == CompilerHLSL::TypeNormal) CompilerGLSL::emit_instruction(instruction); else { if (!requires_uint2_packing) { requires_uint2_packing = true; force_recompile(); } if (bitcast_type == CompilerHLSL::TypePackUint2x32) emit_unary_func_op(ops[0], ops[1], ops[2], "spvPackUint2x32"); else emit_unary_func_op(ops[0], ops[1], ops[2], "spvUnpackUint2x32"); } break; } case OpSelect: { auto &value_type = expression_type(ops[3]); if (value_type.basetype == SPIRType::Struct || is_array(value_type)) { // HLSL does not support ternary expressions on composites. // Cannot use branches, since we might be in a continue block // where explicit control flow is prohibited. // Emit a helper function where we can use control flow. TypeID value_type_id = expression_type_id(ops[3]); auto itr = std::find(composite_selection_workaround_types.begin(), composite_selection_workaround_types.end(), value_type_id); if (itr == composite_selection_workaround_types.end()) { composite_selection_workaround_types.push_back(value_type_id); force_recompile(); } emit_uninitialized_temporary_expression(ops[0], ops[1]); statement("spvSelectComposite(", to_expression(ops[1]), ", ", to_expression(ops[2]), ", ", to_expression(ops[3]), ", ", to_expression(ops[4]), ");"); } else CompilerGLSL::emit_instruction(instruction); break; } case OpStore: { emit_store(instruction); break; } case OpLoad: { emit_load(instruction); break; } case OpMatrixTimesVector: { // Matrices are kept in a transposed state all the time, flip multiplication order always. emit_binary_func_op(ops[0], ops[1], ops[3], ops[2], "mul"); break; } case OpVectorTimesMatrix: { // Matrices are kept in a transposed state all the time, flip multiplication order always. emit_binary_func_op(ops[0], ops[1], ops[3], ops[2], "mul"); break; } case OpMatrixTimesMatrix: { // Matrices are kept in a transposed state all the time, flip multiplication order always. emit_binary_func_op(ops[0], ops[1], ops[3], ops[2], "mul"); break; } case OpOuterProduct: { uint32_t result_type = ops[0]; uint32_t id = ops[1]; uint32_t a = ops[2]; uint32_t b = ops[3]; auto &type = get(result_type); string expr = type_to_glsl_constructor(type); expr += "("; for (uint32_t col = 0; col < type.columns; col++) { expr += to_enclosed_expression(a); expr += " * "; expr += to_extract_component_expression(b, col); if (col + 1 < type.columns) expr += ", "; } expr += ")"; emit_op(result_type, id, expr, should_forward(a) && should_forward(b)); inherit_expression_dependencies(id, a); inherit_expression_dependencies(id, b); break; } case OpFMod: { if (!requires_op_fmod) { requires_op_fmod = true; force_recompile(); } CompilerGLSL::emit_instruction(instruction); break; } case OpFRem: emit_binary_func_op(ops[0], ops[1], ops[2], ops[3], "fmod"); break; case OpImage: { uint32_t result_type = ops[0]; uint32_t id = ops[1]; auto *combined = maybe_get(ops[2]); if (combined) { auto &e = emit_op(result_type, id, to_expression(combined->image), true, true); auto *var = maybe_get_backing_variable(combined->image); if (var) e.loaded_from = var->self; } else { auto &e = emit_op(result_type, id, to_expression(ops[2]), true, true); auto *var = maybe_get_backing_variable(ops[2]); if (var) e.loaded_from = var->self; } break; } case OpDPdx: HLSL_UFOP(ddx); register_control_dependent_expression(ops[1]); break; case OpDPdy: HLSL_UFOP(ddy); register_control_dependent_expression(ops[1]); break; case OpDPdxFine: HLSL_UFOP(ddx_fine); register_control_dependent_expression(ops[1]); break; case OpDPdyFine: HLSL_UFOP(ddy_fine); register_control_dependent_expression(ops[1]); break; case OpDPdxCoarse: HLSL_UFOP(ddx_coarse); register_control_dependent_expression(ops[1]); break; case OpDPdyCoarse: HLSL_UFOP(ddy_coarse); register_control_dependent_expression(ops[1]); break; case OpFwidth: case OpFwidthCoarse: case OpFwidthFine: HLSL_UFOP(fwidth); register_control_dependent_expression(ops[1]); break; case OpLogicalNot: { auto result_type = ops[0]; auto id = ops[1]; auto &type = get(result_type); if (type.vecsize > 1) emit_unrolled_unary_op(result_type, id, ops[2], "!"); else HLSL_UOP(!); break; } case OpIEqual: { auto result_type = ops[0]; auto id = ops[1]; if (expression_type(ops[2]).vecsize > 1) emit_unrolled_binary_op(result_type, id, ops[2], ops[3], "==", false, SPIRType::Unknown); else HLSL_BOP_CAST(==, int_type); break; } case OpLogicalEqual: case OpFOrdEqual: case OpFUnordEqual: { // HLSL != operator is unordered. // https://docs.microsoft.com/en-us/windows/win32/direct3d10/d3d10-graphics-programming-guide-resources-float-rules. // isnan() is apparently implemented as x != x as well. // We cannot implement UnordEqual as !(OrdNotEqual), as HLSL cannot express OrdNotEqual. // HACK: FUnordEqual will be implemented as FOrdEqual. auto result_type = ops[0]; auto id = ops[1]; if (expression_type(ops[2]).vecsize > 1) emit_unrolled_binary_op(result_type, id, ops[2], ops[3], "==", false, SPIRType::Unknown); else HLSL_BOP(==); break; } case OpINotEqual: { auto result_type = ops[0]; auto id = ops[1]; if (expression_type(ops[2]).vecsize > 1) emit_unrolled_binary_op(result_type, id, ops[2], ops[3], "!=", false, SPIRType::Unknown); else HLSL_BOP_CAST(!=, int_type); break; } case OpLogicalNotEqual: case OpFOrdNotEqual: case OpFUnordNotEqual: { // HLSL != operator is unordered. // https://docs.microsoft.com/en-us/windows/win32/direct3d10/d3d10-graphics-programming-guide-resources-float-rules. // isnan() is apparently implemented as x != x as well. // FIXME: FOrdNotEqual cannot be implemented in a crisp and simple way here. // We would need to do something like not(UnordEqual), but that cannot be expressed either. // Adding a lot of NaN checks would be a breaking change from perspective of performance. // SPIR-V will generally use isnan() checks when this even matters. // HACK: FOrdNotEqual will be implemented as FUnordEqual. auto result_type = ops[0]; auto id = ops[1]; if (expression_type(ops[2]).vecsize > 1) emit_unrolled_binary_op(result_type, id, ops[2], ops[3], "!=", false, SPIRType::Unknown); else HLSL_BOP(!=); break; } case OpUGreaterThan: case OpSGreaterThan: { auto result_type = ops[0]; auto id = ops[1]; auto type = opcode == OpUGreaterThan ? uint_type : int_type; if (expression_type(ops[2]).vecsize > 1) emit_unrolled_binary_op(result_type, id, ops[2], ops[3], ">", false, type); else HLSL_BOP_CAST(>, type); break; } case OpFOrdGreaterThan: { auto result_type = ops[0]; auto id = ops[1]; if (expression_type(ops[2]).vecsize > 1) emit_unrolled_binary_op(result_type, id, ops[2], ops[3], ">", false, SPIRType::Unknown); else HLSL_BOP(>); break; } case OpFUnordGreaterThan: { auto result_type = ops[0]; auto id = ops[1]; if (expression_type(ops[2]).vecsize > 1) emit_unrolled_binary_op(result_type, id, ops[2], ops[3], "<=", true, SPIRType::Unknown); else CompilerGLSL::emit_instruction(instruction); break; } case OpUGreaterThanEqual: case OpSGreaterThanEqual: { auto result_type = ops[0]; auto id = ops[1]; auto type = opcode == OpUGreaterThanEqual ? uint_type : int_type; if (expression_type(ops[2]).vecsize > 1) emit_unrolled_binary_op(result_type, id, ops[2], ops[3], ">=", false, type); else HLSL_BOP_CAST(>=, type); break; } case OpFOrdGreaterThanEqual: { auto result_type = ops[0]; auto id = ops[1]; if (expression_type(ops[2]).vecsize > 1) emit_unrolled_binary_op(result_type, id, ops[2], ops[3], ">=", false, SPIRType::Unknown); else HLSL_BOP(>=); break; } case OpFUnordGreaterThanEqual: { auto result_type = ops[0]; auto id = ops[1]; if (expression_type(ops[2]).vecsize > 1) emit_unrolled_binary_op(result_type, id, ops[2], ops[3], "<", true, SPIRType::Unknown); else CompilerGLSL::emit_instruction(instruction); break; } case OpULessThan: case OpSLessThan: { auto result_type = ops[0]; auto id = ops[1]; auto type = opcode == OpULessThan ? uint_type : int_type; if (expression_type(ops[2]).vecsize > 1) emit_unrolled_binary_op(result_type, id, ops[2], ops[3], "<", false, type); else HLSL_BOP_CAST(<, type); break; } case OpFOrdLessThan: { auto result_type = ops[0]; auto id = ops[1]; if (expression_type(ops[2]).vecsize > 1) emit_unrolled_binary_op(result_type, id, ops[2], ops[3], "<", false, SPIRType::Unknown); else HLSL_BOP(<); break; } case OpFUnordLessThan: { auto result_type = ops[0]; auto id = ops[1]; if (expression_type(ops[2]).vecsize > 1) emit_unrolled_binary_op(result_type, id, ops[2], ops[3], ">=", true, SPIRType::Unknown); else CompilerGLSL::emit_instruction(instruction); break; } case OpULessThanEqual: case OpSLessThanEqual: { auto result_type = ops[0]; auto id = ops[1]; auto type = opcode == OpULessThanEqual ? uint_type : int_type; if (expression_type(ops[2]).vecsize > 1) emit_unrolled_binary_op(result_type, id, ops[2], ops[3], "<=", false, type); else HLSL_BOP_CAST(<=, type); break; } case OpFOrdLessThanEqual: { auto result_type = ops[0]; auto id = ops[1]; if (expression_type(ops[2]).vecsize > 1) emit_unrolled_binary_op(result_type, id, ops[2], ops[3], "<=", false, SPIRType::Unknown); else HLSL_BOP(<=); break; } case OpFUnordLessThanEqual: { auto result_type = ops[0]; auto id = ops[1]; if (expression_type(ops[2]).vecsize > 1) emit_unrolled_binary_op(result_type, id, ops[2], ops[3], ">", true, SPIRType::Unknown); else CompilerGLSL::emit_instruction(instruction); break; } case OpImageQueryLod: emit_texture_op(instruction, false); break; case OpImageQuerySizeLod: { auto result_type = ops[0]; auto id = ops[1]; require_texture_query_variant(ops[2]); auto dummy_samples_levels = join(get_fallback_name(id), "_dummy_parameter"); statement("uint ", dummy_samples_levels, ";"); auto expr = join("spvTextureSize(", to_non_uniform_aware_expression(ops[2]), ", ", bitcast_expression(SPIRType::UInt, ops[3]), ", ", dummy_samples_levels, ")"); auto &restype = get(ops[0]); expr = bitcast_expression(restype, SPIRType::UInt, expr); emit_op(result_type, id, expr, true); break; } case OpImageQuerySize: { auto result_type = ops[0]; auto id = ops[1]; require_texture_query_variant(ops[2]); bool uav = expression_type(ops[2]).image.sampled == 2; if (const auto *var = maybe_get_backing_variable(ops[2])) if (hlsl_options.nonwritable_uav_texture_as_srv && has_decoration(var->self, DecorationNonWritable)) uav = false; auto dummy_samples_levels = join(get_fallback_name(id), "_dummy_parameter"); statement("uint ", dummy_samples_levels, ";"); string expr; if (uav) expr = join("spvImageSize(", to_non_uniform_aware_expression(ops[2]), ", ", dummy_samples_levels, ")"); else expr = join("spvTextureSize(", to_non_uniform_aware_expression(ops[2]), ", 0u, ", dummy_samples_levels, ")"); auto &restype = get(ops[0]); expr = bitcast_expression(restype, SPIRType::UInt, expr); emit_op(result_type, id, expr, true); break; } case OpImageQuerySamples: case OpImageQueryLevels: { auto result_type = ops[0]; auto id = ops[1]; require_texture_query_variant(ops[2]); bool uav = expression_type(ops[2]).image.sampled == 2; if (opcode == OpImageQueryLevels && uav) SPIRV_CROSS_THROW("Cannot query levels for UAV images."); if (const auto *var = maybe_get_backing_variable(ops[2])) if (hlsl_options.nonwritable_uav_texture_as_srv && has_decoration(var->self, DecorationNonWritable)) uav = false; // Keep it simple and do not emit special variants to make this look nicer ... // This stuff is barely, if ever, used. forced_temporaries.insert(id); auto &type = get(result_type); statement(variable_decl(type, to_name(id)), ";"); if (uav) statement("spvImageSize(", to_non_uniform_aware_expression(ops[2]), ", ", to_name(id), ");"); else statement("spvTextureSize(", to_non_uniform_aware_expression(ops[2]), ", 0u, ", to_name(id), ");"); auto &restype = get(ops[0]); auto expr = bitcast_expression(restype, SPIRType::UInt, to_name(id)); set(id, expr, result_type, true); break; } case OpImageRead: { uint32_t result_type = ops[0]; uint32_t id = ops[1]; auto *var = maybe_get_backing_variable(ops[2]); auto &type = expression_type(ops[2]); bool subpass_data = type.image.dim == DimSubpassData; bool pure = false; string imgexpr; if (subpass_data) { if (hlsl_options.shader_model < 40) SPIRV_CROSS_THROW("Subpass loads are not supported in HLSL shader model 2/3."); // Similar to GLSL, implement subpass loads using texelFetch. if (type.image.ms) { uint32_t operands = ops[4]; if (operands != ImageOperandsSampleMask || instruction.length != 6) SPIRV_CROSS_THROW("Multisampled image used in OpImageRead, but unexpected operand mask was used."); uint32_t sample = ops[5]; imgexpr = join(to_non_uniform_aware_expression(ops[2]), ".Load(int2(gl_FragCoord.xy), ", to_expression(sample), ")"); } else imgexpr = join(to_non_uniform_aware_expression(ops[2]), ".Load(int3(int2(gl_FragCoord.xy), 0))"); pure = true; } else { imgexpr = join(to_non_uniform_aware_expression(ops[2]), "[", to_expression(ops[3]), "]"); // The underlying image type in HLSL depends on the image format, unlike GLSL, where all images are "vec4", // except that the underlying type changes how the data is interpreted. bool force_srv = hlsl_options.nonwritable_uav_texture_as_srv && var && has_decoration(var->self, DecorationNonWritable); pure = force_srv; if (var && !subpass_data && !force_srv) imgexpr = remap_swizzle(get(result_type), image_format_to_components(get(var->basetype).image.format), imgexpr); } if (var) { bool forward = forced_temporaries.find(id) == end(forced_temporaries); auto &e = emit_op(result_type, id, imgexpr, forward); if (!pure) { e.loaded_from = var->self; if (forward) var->dependees.push_back(id); } } else emit_op(result_type, id, imgexpr, false); inherit_expression_dependencies(id, ops[2]); if (type.image.ms) inherit_expression_dependencies(id, ops[5]); break; } case OpImageWrite: { auto *var = maybe_get_backing_variable(ops[0]); // The underlying image type in HLSL depends on the image format, unlike GLSL, where all images are "vec4", // except that the underlying type changes how the data is interpreted. auto value_expr = to_expression(ops[2]); if (var) { auto &type = get(var->basetype); auto narrowed_type = get(type.image.type); narrowed_type.vecsize = image_format_to_components(type.image.format); value_expr = remap_swizzle(narrowed_type, expression_type(ops[2]).vecsize, value_expr); } statement(to_non_uniform_aware_expression(ops[0]), "[", to_expression(ops[1]), "] = ", value_expr, ";"); if (var && variable_storage_is_aliased(*var)) flush_all_aliased_variables(); break; } case OpImageTexelPointer: { uint32_t result_type = ops[0]; uint32_t id = ops[1]; auto expr = to_expression(ops[2]); expr += join("[", to_expression(ops[3]), "]"); auto &e = set(id, expr, result_type, true); // When using the pointer, we need to know which variable it is actually loaded from. auto *var = maybe_get_backing_variable(ops[2]); e.loaded_from = var ? var->self : ID(0); inherit_expression_dependencies(id, ops[3]); break; } case OpAtomicFAddEXT: case OpAtomicFMinEXT: case OpAtomicFMaxEXT: SPIRV_CROSS_THROW("Floating-point atomics are not supported in HLSL."); case OpAtomicCompareExchange: case OpAtomicExchange: case OpAtomicISub: case OpAtomicSMin: case OpAtomicUMin: case OpAtomicSMax: case OpAtomicUMax: case OpAtomicAnd: case OpAtomicOr: case OpAtomicXor: case OpAtomicIAdd: case OpAtomicIIncrement: case OpAtomicIDecrement: case OpAtomicLoad: case OpAtomicStore: { emit_atomic(ops, instruction.length, opcode); break; } case OpControlBarrier: case OpMemoryBarrier: { uint32_t memory; uint32_t semantics; if (opcode == OpMemoryBarrier) { memory = evaluate_constant_u32(ops[0]); semantics = evaluate_constant_u32(ops[1]); } else { memory = evaluate_constant_u32(ops[1]); semantics = evaluate_constant_u32(ops[2]); } if (memory == ScopeSubgroup) { // No Wave-barriers in HLSL. break; } // We only care about these flags, acquire/release and friends are not relevant to GLSL. semantics = mask_relevant_memory_semantics(semantics); if (opcode == OpMemoryBarrier) { // If we are a memory barrier, and the next instruction is a control barrier, check if that memory barrier // does what we need, so we avoid redundant barriers. const Instruction *next = get_next_instruction_in_block(instruction); if (next && next->op == OpControlBarrier) { auto *next_ops = stream(*next); uint32_t next_memory = evaluate_constant_u32(next_ops[1]); uint32_t next_semantics = evaluate_constant_u32(next_ops[2]); next_semantics = mask_relevant_memory_semantics(next_semantics); // There is no "just execution barrier" in HLSL. // If there are no memory semantics for next instruction, we will imply group shared memory is synced. if (next_semantics == 0) next_semantics = MemorySemanticsWorkgroupMemoryMask; bool memory_scope_covered = false; if (next_memory == memory) memory_scope_covered = true; else if (next_semantics == MemorySemanticsWorkgroupMemoryMask) { // If we only care about workgroup memory, either Device or Workgroup scope is fine, // scope does not have to match. if ((next_memory == ScopeDevice || next_memory == ScopeWorkgroup) && (memory == ScopeDevice || memory == ScopeWorkgroup)) { memory_scope_covered = true; } } else if (memory == ScopeWorkgroup && next_memory == ScopeDevice) { // The control barrier has device scope, but the memory barrier just has workgroup scope. memory_scope_covered = true; } // If we have the same memory scope, and all memory types are covered, we're good. if (memory_scope_covered && (semantics & next_semantics) == semantics) break; } } // We are synchronizing some memory or syncing execution, // so we cannot forward any loads beyond the memory barrier. if (semantics || opcode == OpControlBarrier) { assert(current_emitting_block); flush_control_dependent_expressions(current_emitting_block->self); flush_all_active_variables(); } if (opcode == OpControlBarrier) { // We cannot emit just execution barrier, for no memory semantics pick the cheapest option. if (semantics == MemorySemanticsWorkgroupMemoryMask || semantics == 0) statement("GroupMemoryBarrierWithGroupSync();"); else if (semantics != 0 && (semantics & MemorySemanticsWorkgroupMemoryMask) == 0) statement("DeviceMemoryBarrierWithGroupSync();"); else statement("AllMemoryBarrierWithGroupSync();"); } else { if (semantics == MemorySemanticsWorkgroupMemoryMask) statement("GroupMemoryBarrier();"); else if (semantics != 0 && (semantics & MemorySemanticsWorkgroupMemoryMask) == 0) statement("DeviceMemoryBarrier();"); else statement("AllMemoryBarrier();"); } break; } case OpBitFieldInsert: { if (!requires_bitfield_insert) { requires_bitfield_insert = true; force_recompile(); } auto expr = join("spvBitfieldInsert(", to_expression(ops[2]), ", ", to_expression(ops[3]), ", ", to_expression(ops[4]), ", ", to_expression(ops[5]), ")"); bool forward = should_forward(ops[2]) && should_forward(ops[3]) && should_forward(ops[4]) && should_forward(ops[5]); auto &restype = get(ops[0]); expr = bitcast_expression(restype, SPIRType::UInt, expr); emit_op(ops[0], ops[1], expr, forward); break; } case OpBitFieldSExtract: case OpBitFieldUExtract: { if (!requires_bitfield_extract) { requires_bitfield_extract = true; force_recompile(); } if (opcode == OpBitFieldSExtract) HLSL_TFOP(spvBitfieldSExtract); else HLSL_TFOP(spvBitfieldUExtract); break; } case OpBitCount: { auto basetype = expression_type(ops[2]).basetype; emit_unary_func_op_cast(ops[0], ops[1], ops[2], "countbits", basetype, basetype); break; } case OpBitReverse: HLSL_UFOP(reversebits); break; case OpArrayLength: { auto *var = maybe_get_backing_variable(ops[2]); if (!var) SPIRV_CROSS_THROW("Array length must point directly to an SSBO block."); auto &type = get(var->basetype); if (!has_decoration(type.self, DecorationBlock) && !has_decoration(type.self, DecorationBufferBlock)) SPIRV_CROSS_THROW("Array length expression must point to a block type."); // This must be 32-bit uint, so we're good to go. emit_uninitialized_temporary_expression(ops[0], ops[1]); statement(to_non_uniform_aware_expression(ops[2]), ".GetDimensions(", to_expression(ops[1]), ");"); uint32_t offset = type_struct_member_offset(type, ops[3]); uint32_t stride = type_struct_member_array_stride(type, ops[3]); statement(to_expression(ops[1]), " = (", to_expression(ops[1]), " - ", offset, ") / ", stride, ";"); break; } case OpIsHelperInvocationEXT: if (hlsl_options.shader_model < 50 || get_entry_point().model != ExecutionModelFragment) SPIRV_CROSS_THROW("Helper Invocation input is only supported in PS 5.0 or higher."); // Helper lane state with demote is volatile by nature. // Do not forward this. emit_op(ops[0], ops[1], "IsHelperLane()", false); break; case OpBeginInvocationInterlockEXT: case OpEndInvocationInterlockEXT: if (hlsl_options.shader_model < 51) SPIRV_CROSS_THROW("Rasterizer order views require Shader Model 5.1."); break; // Nothing to do in the body case OpRayQueryInitializeKHR: { flush_variable_declaration(ops[0]); std::string ray_desc_name = get_unique_identifier(); statement("RayDesc ", ray_desc_name, " = {", to_expression(ops[4]), ", ", to_expression(ops[5]), ", ", to_expression(ops[6]), ", ", to_expression(ops[7]), "};"); statement(to_expression(ops[0]), ".TraceRayInline(", to_expression(ops[1]), ", ", // acc structure to_expression(ops[2]), ", ", // ray flags to_expression(ops[3]), ", ", // mask ray_desc_name, ");"); // ray break; } case OpRayQueryProceedKHR: { flush_variable_declaration(ops[0]); emit_op(ops[0], ops[1], join(to_expression(ops[2]), ".Proceed()"), false); break; } case OpRayQueryTerminateKHR: { flush_variable_declaration(ops[0]); statement(to_expression(ops[0]), ".Abort();"); break; } case OpRayQueryGenerateIntersectionKHR: { flush_variable_declaration(ops[0]); statement(to_expression(ops[0]), ".CommitProceduralPrimitiveHit(", to_expression(ops[1]), ");"); break; } case OpRayQueryConfirmIntersectionKHR: { flush_variable_declaration(ops[0]); statement(to_expression(ops[0]), ".CommitNonOpaqueTriangleHit();"); break; } case OpRayQueryGetIntersectionTypeKHR: { emit_rayquery_function(".CommittedStatus()", ".CandidateType()", ops); break; } case OpRayQueryGetIntersectionTKHR: { emit_rayquery_function(".CommittedRayT()", ".CandidateTriangleRayT()", ops); break; } case OpRayQueryGetIntersectionInstanceCustomIndexKHR: { emit_rayquery_function(".CommittedInstanceID()", ".CandidateInstanceID()", ops); break; } case OpRayQueryGetIntersectionInstanceIdKHR: { emit_rayquery_function(".CommittedInstanceIndex()", ".CandidateInstanceIndex()", ops); break; } case OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR: { emit_rayquery_function(".CommittedInstanceContributionToHitGroupIndex()", ".CandidateInstanceContributionToHitGroupIndex()", ops); break; } case OpRayQueryGetIntersectionGeometryIndexKHR: { emit_rayquery_function(".CommittedGeometryIndex()", ".CandidateGeometryIndex()", ops); break; } case OpRayQueryGetIntersectionPrimitiveIndexKHR: { emit_rayquery_function(".CommittedPrimitiveIndex()", ".CandidatePrimitiveIndex()", ops); break; } case OpRayQueryGetIntersectionBarycentricsKHR: { emit_rayquery_function(".CommittedTriangleBarycentrics()", ".CandidateTriangleBarycentrics()", ops); break; } case OpRayQueryGetIntersectionFrontFaceKHR: { emit_rayquery_function(".CommittedTriangleFrontFace()", ".CandidateTriangleFrontFace()", ops); break; } case OpRayQueryGetIntersectionCandidateAABBOpaqueKHR: { flush_variable_declaration(ops[0]); emit_op(ops[0], ops[1], join(to_expression(ops[2]), ".CandidateProceduralPrimitiveNonOpaque()"), false); break; } case OpRayQueryGetIntersectionObjectRayDirectionKHR: { emit_rayquery_function(".CommittedObjectRayDirection()", ".CandidateObjectRayDirection()", ops); break; } case OpRayQueryGetIntersectionObjectRayOriginKHR: { flush_variable_declaration(ops[0]); emit_rayquery_function(".CommittedObjectRayOrigin()", ".CandidateObjectRayOrigin()", ops); break; } case OpRayQueryGetIntersectionObjectToWorldKHR: { emit_rayquery_function(".CommittedObjectToWorld4x3()", ".CandidateObjectToWorld4x3()", ops); break; } case OpRayQueryGetIntersectionWorldToObjectKHR: { emit_rayquery_function(".CommittedWorldToObject4x3()", ".CandidateWorldToObject4x3()", ops); break; } case OpRayQueryGetRayFlagsKHR: { flush_variable_declaration(ops[0]); emit_op(ops[0], ops[1], join(to_expression(ops[2]), ".RayFlags()"), false); break; } case OpRayQueryGetRayTMinKHR: { flush_variable_declaration(ops[0]); emit_op(ops[0], ops[1], join(to_expression(ops[2]), ".RayTMin()"), false); break; } case OpRayQueryGetWorldRayOriginKHR: { flush_variable_declaration(ops[0]); emit_op(ops[0], ops[1], join(to_expression(ops[2]), ".WorldRayOrigin()"), false); break; } case OpRayQueryGetWorldRayDirectionKHR: { flush_variable_declaration(ops[0]); emit_op(ops[0], ops[1], join(to_expression(ops[2]), ".WorldRayDirection()"), false); break; } case OpSetMeshOutputsEXT: { statement("SetMeshOutputCounts(", to_unpacked_expression(ops[0]), ", ", to_unpacked_expression(ops[1]), ");"); break; } default: CompilerGLSL::emit_instruction(instruction); break; } } void CompilerHLSL::require_texture_query_variant(uint32_t var_id) { if (const auto *var = maybe_get_backing_variable(var_id)) var_id = var->self; auto &type = expression_type(var_id); bool uav = type.image.sampled == 2; if (hlsl_options.nonwritable_uav_texture_as_srv && has_decoration(var_id, DecorationNonWritable)) uav = false; uint32_t bit = 0; switch (type.image.dim) { case Dim1D: bit = type.image.arrayed ? Query1DArray : Query1D; break; case Dim2D: if (type.image.ms) bit = type.image.arrayed ? Query2DMSArray : Query2DMS; else bit = type.image.arrayed ? Query2DArray : Query2D; break; case Dim3D: bit = Query3D; break; case DimCube: bit = type.image.arrayed ? QueryCubeArray : QueryCube; break; case DimBuffer: bit = QueryBuffer; break; default: SPIRV_CROSS_THROW("Unsupported query type."); } switch (get(type.image.type).basetype) { case SPIRType::Float: bit += QueryTypeFloat; break; case SPIRType::Int: bit += QueryTypeInt; break; case SPIRType::UInt: bit += QueryTypeUInt; break; default: SPIRV_CROSS_THROW("Unsupported query type."); } auto norm_state = image_format_to_normalized_state(type.image.format); auto &variant = uav ? required_texture_size_variants .uav[uint32_t(norm_state)][image_format_to_components(type.image.format) - 1] : required_texture_size_variants.srv; uint64_t mask = 1ull << bit; if ((variant & mask) == 0) { force_recompile(); variant |= mask; } } void CompilerHLSL::set_root_constant_layouts(std::vector layout) { root_constants_layout = std::move(layout); } void CompilerHLSL::add_vertex_attribute_remap(const HLSLVertexAttributeRemap &vertex_attributes) { remap_vertex_attributes.push_back(vertex_attributes); } VariableID CompilerHLSL::remap_num_workgroups_builtin() { update_active_builtins(); if (!active_input_builtins.get(BuiltInNumWorkgroups)) return 0; // Create a new, fake UBO. uint32_t offset = ir.increase_bound_by(4); uint32_t uint_type_id = offset; uint32_t block_type_id = offset + 1; uint32_t block_pointer_type_id = offset + 2; uint32_t variable_id = offset + 3; SPIRType uint_type { OpTypeVector }; uint_type.basetype = SPIRType::UInt; uint_type.width = 32; uint_type.vecsize = 3; uint_type.columns = 1; set(uint_type_id, uint_type); SPIRType block_type { OpTypeStruct }; block_type.basetype = SPIRType::Struct; block_type.member_types.push_back(uint_type_id); set(block_type_id, block_type); set_decoration(block_type_id, DecorationBlock); set_member_name(block_type_id, 0, "count"); set_member_decoration(block_type_id, 0, DecorationOffset, 0); SPIRType block_pointer_type = block_type; block_pointer_type.pointer = true; block_pointer_type.storage = StorageClassUniform; block_pointer_type.parent_type = block_type_id; auto &ptr_type = set(block_pointer_type_id, block_pointer_type); // Preserve self. ptr_type.self = block_type_id; set(variable_id, block_pointer_type_id, StorageClassUniform); ir.meta[variable_id].decoration.alias = "SPIRV_Cross_NumWorkgroups"; num_workgroups_builtin = variable_id; get_entry_point().interface_variables.push_back(num_workgroups_builtin); return variable_id; } void CompilerHLSL::set_resource_binding_flags(HLSLBindingFlags flags) { resource_binding_flags = flags; } void CompilerHLSL::validate_shader_model() { // Check for nonuniform qualifier. // Instead of looping over all decorations to find this, just look at capabilities. for (auto &cap : ir.declared_capabilities) { switch (cap) { case CapabilityShaderNonUniformEXT: case CapabilityRuntimeDescriptorArrayEXT: if (hlsl_options.shader_model < 51) SPIRV_CROSS_THROW( "Shader model 5.1 or higher is required to use bindless resources or NonUniformResourceIndex."); break; case CapabilityVariablePointers: case CapabilityVariablePointersStorageBuffer: SPIRV_CROSS_THROW("VariablePointers capability is not supported in HLSL."); default: break; } } if (ir.addressing_model != AddressingModelLogical) SPIRV_CROSS_THROW("Only Logical addressing model can be used with HLSL."); if (hlsl_options.enable_16bit_types && hlsl_options.shader_model < 62) SPIRV_CROSS_THROW("Need at least shader model 6.2 when enabling native 16-bit type support."); } string CompilerHLSL::compile() { ir.fixup_reserved_names(); // Do not deal with ES-isms like precision, older extensions and such. options.es = false; options.version = 450; options.vulkan_semantics = true; backend.float_literal_suffix = true; backend.double_literal_suffix = false; backend.long_long_literal_suffix = true; backend.uint32_t_literal_suffix = true; backend.int16_t_literal_suffix = ""; backend.uint16_t_literal_suffix = "u"; backend.basic_int_type = "int"; backend.basic_uint_type = "uint"; backend.demote_literal = "discard"; backend.boolean_mix_function = ""; backend.swizzle_is_function = false; backend.shared_is_implied = true; backend.unsized_array_supported = true; backend.explicit_struct_type = false; backend.use_initializer_list = true; backend.use_constructor_splatting = false; backend.can_swizzle_scalar = true; backend.can_declare_struct_inline = false; backend.can_declare_arrays_inline = false; backend.can_return_array = false; backend.nonuniform_qualifier = "NonUniformResourceIndex"; backend.support_case_fallthrough = false; backend.force_merged_mesh_block = get_execution_model() == ExecutionModelMeshEXT; backend.force_gl_in_out_block = backend.force_merged_mesh_block; // SM 4.1 does not support precise for some reason. backend.support_precise_qualifier = hlsl_options.shader_model >= 50 || hlsl_options.shader_model == 40; fixup_anonymous_struct_names(); fixup_type_alias(); reorder_type_alias(); build_function_control_flow_graphs_and_analyze(); validate_shader_model(); update_active_builtins(); analyze_image_and_sampler_usage(); analyze_interlocked_resource_usage(); if (get_execution_model() == ExecutionModelMeshEXT) analyze_meshlet_writes(); // Subpass input needs SV_Position. if (need_subpass_input) active_input_builtins.set(BuiltInFragCoord); uint32_t pass_count = 0; do { reset(pass_count); // Move constructor for this type is broken on GCC 4.9 ... buffer.reset(); emit_header(); emit_resources(); emit_function(get(ir.default_entry_point), Bitset()); emit_hlsl_entry_point(); pass_count++; } while (is_forcing_recompilation()); // Entry point in HLSL is always main() for the time being. get_entry_point().name = "main"; return buffer.str(); } void CompilerHLSL::emit_block_hints(const SPIRBlock &block) { switch (block.hint) { case SPIRBlock::HintFlatten: statement("[flatten]"); break; case SPIRBlock::HintDontFlatten: statement("[branch]"); break; case SPIRBlock::HintUnroll: statement("[unroll]"); break; case SPIRBlock::HintDontUnroll: statement("[loop]"); break; default: break; } } string CompilerHLSL::get_unique_identifier() { return join("_", unique_identifier_count++, "ident"); } void CompilerHLSL::add_hlsl_resource_binding(const HLSLResourceBinding &binding) { StageSetBinding tuple = { binding.stage, binding.desc_set, binding.binding }; resource_bindings[tuple] = { binding, false }; } bool CompilerHLSL::is_hlsl_resource_binding_used(ExecutionModel model, uint32_t desc_set, uint32_t binding) const { StageSetBinding tuple = { model, desc_set, binding }; auto itr = resource_bindings.find(tuple); return itr != end(resource_bindings) && itr->second.second; } CompilerHLSL::BitcastType CompilerHLSL::get_bitcast_type(uint32_t result_type, uint32_t op0) { auto &rslt_type = get(result_type); auto &expr_type = expression_type(op0); if (rslt_type.basetype == SPIRType::BaseType::UInt64 && expr_type.basetype == SPIRType::BaseType::UInt && expr_type.vecsize == 2) return BitcastType::TypePackUint2x32; else if (rslt_type.basetype == SPIRType::BaseType::UInt && rslt_type.vecsize == 2 && expr_type.basetype == SPIRType::BaseType::UInt64) return BitcastType::TypeUnpackUint64; return BitcastType::TypeNormal; } bool CompilerHLSL::is_hlsl_force_storage_buffer_as_uav(ID id) const { if (hlsl_options.force_storage_buffer_as_uav) { return true; } const uint32_t desc_set = get_decoration(id, spv::DecorationDescriptorSet); const uint32_t binding = get_decoration(id, spv::DecorationBinding); return (force_uav_buffer_bindings.find({ desc_set, binding }) != force_uav_buffer_bindings.end()); } void CompilerHLSL::set_hlsl_force_storage_buffer_as_uav(uint32_t desc_set, uint32_t binding) { SetBindingPair pair = { desc_set, binding }; force_uav_buffer_bindings.insert(pair); } bool CompilerHLSL::is_user_type_structured(uint32_t id) const { if (hlsl_options.preserve_structured_buffers) { // Compare left hand side of string only as these user types can contain more meta data such as their subtypes, // e.g. "structuredbuffer:int" const std::string &user_type = get_decoration_string(id, DecorationUserTypeGOOGLE); return user_type.compare(0, 16, "structuredbuffer") == 0 || user_type.compare(0, 18, "rwstructuredbuffer") == 0 || user_type.compare(0, 33, "rasterizerorderedstructuredbuffer") == 0; } return false; } ================================================ FILE: src/libraries/spirv_cross/spirv_hlsl.hpp ================================================ /* * Copyright 2016-2021 Robert Konrad * SPDX-License-Identifier: Apache-2.0 OR MIT * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* * At your option, you may choose to accept this material under either: * 1. The Apache License, Version 2.0, found at , or * 2. The MIT License, found at . */ #ifndef SPIRV_HLSL_HPP #define SPIRV_HLSL_HPP #include "spirv_glsl.hpp" #include namespace SPIRV_CROSS_NAMESPACE { // Interface which remaps vertex inputs to a fixed semantic name to make linking easier. struct HLSLVertexAttributeRemap { uint32_t location; std::string semantic; }; // Specifying a root constant (d3d12) or push constant range (vulkan). // // `start` and `end` denotes the range of the root constant in bytes. // Both values need to be multiple of 4. struct RootConstants { uint32_t start; uint32_t end; uint32_t binding; uint32_t space; }; // For finer control, decorations may be removed from specific resources instead with unset_decoration(). enum HLSLBindingFlagBits { HLSL_BINDING_AUTO_NONE_BIT = 0, // Push constant (root constant) resources will be declared as CBVs (b-space) without a register() declaration. // A register will be automatically assigned by the D3D compiler, but must therefore be reflected in D3D-land. // Push constants do not normally have a DecorationBinding set, but if they do, this can be used to ignore it. HLSL_BINDING_AUTO_PUSH_CONSTANT_BIT = 1 << 0, // cbuffer resources will be declared as CBVs (b-space) without a register() declaration. // A register will be automatically assigned, but must be reflected in D3D-land. HLSL_BINDING_AUTO_CBV_BIT = 1 << 1, // All SRVs (t-space) will be declared without a register() declaration. HLSL_BINDING_AUTO_SRV_BIT = 1 << 2, // All UAVs (u-space) will be declared without a register() declaration. HLSL_BINDING_AUTO_UAV_BIT = 1 << 3, // All samplers (s-space) will be declared without a register() declaration. HLSL_BINDING_AUTO_SAMPLER_BIT = 1 << 4, // No resources will be declared with register(). HLSL_BINDING_AUTO_ALL = 0x7fffffff }; using HLSLBindingFlags = uint32_t; // By matching stage, desc_set and binding for a SPIR-V resource, // register bindings are set based on whether the HLSL resource is a // CBV, UAV, SRV or Sampler. A single binding in SPIR-V might contain multiple // resource types, e.g. COMBINED_IMAGE_SAMPLER, and SRV/Sampler bindings will be used respectively. // On SM 5.0 and lower, register_space is ignored. // // To remap a push constant block which does not have any desc_set/binding associated with it, // use ResourceBindingPushConstant{DescriptorSet,Binding} as values for desc_set/binding. // For deeper control of push constants, set_root_constant_layouts() can be used instead. struct HLSLResourceBinding { spv::ExecutionModel stage = spv::ExecutionModelMax; uint32_t desc_set = 0; uint32_t binding = 0; struct Binding { uint32_t register_space = 0; uint32_t register_binding = 0; } cbv, uav, srv, sampler; }; enum HLSLAuxBinding { HLSL_AUX_BINDING_BASE_VERTEX_INSTANCE = 0 }; class CompilerHLSL : public CompilerGLSL { public: struct Options { uint32_t shader_model = 30; // TODO: map ps_4_0_level_9_0,... somehow // Allows the PointSize builtin in SM 4.0+, and ignores it, as PointSize is not supported in SM 4+. bool point_size_compat = false; // Allows the PointCoord builtin, returns float2(0.5, 0.5), as PointCoord is not supported in HLSL. bool point_coord_compat = false; // If true, the backend will assume that VertexIndex and InstanceIndex will need to apply // a base offset, and you will need to fill in a cbuffer with offsets. // Set to false if you know you will never use base instance or base vertex // functionality as it might remove an internal cbuffer. bool support_nonzero_base_vertex_base_instance = false; // Forces a storage buffer to always be declared as UAV, even if the readonly decoration is used. // By default, a readonly storage buffer will be declared as ByteAddressBuffer (SRV) instead. // Alternatively, use set_hlsl_force_storage_buffer_as_uav to specify individually. bool force_storage_buffer_as_uav = false; // Forces any storage image type marked as NonWritable to be considered an SRV instead. // For this to work with function call parameters, NonWritable must be considered to be part of the type system // so that NonWritable image arguments are also translated to Texture rather than RWTexture. bool nonwritable_uav_texture_as_srv = false; // Enables native 16-bit types. Needs SM 6.2. // Uses half/int16_t/uint16_t instead of min16* types. // Also adds support for 16-bit load-store from (RW)ByteAddressBuffer. bool enable_16bit_types = false; // If matrices are used as IO variables, flatten the attribute declaration to use // TEXCOORD{N,N+1,N+2,...} rather than TEXCOORDN_{0,1,2,3}. // If add_vertex_attribute_remap is used and this feature is used, // the semantic name will be queried once per active location. bool flatten_matrix_vertex_input_semantics = false; // Rather than emitting main() for the entry point, use the name in SPIR-V. bool use_entry_point_name = false; // Preserve (RW)StructuredBuffer types if the input source was HLSL. // This relies on UserTypeGOOGLE to encode the buffer type either as "structuredbuffer" or "rwstructuredbuffer" // whereas the type can be extended with an optional subtype, e.g. "structuredbuffer:int". bool preserve_structured_buffers = false; }; explicit CompilerHLSL(std::vector spirv_) : CompilerGLSL(std::move(spirv_)) { } CompilerHLSL(const uint32_t *ir_, size_t size) : CompilerGLSL(ir_, size) { } explicit CompilerHLSL(const ParsedIR &ir_) : CompilerGLSL(ir_) { } explicit CompilerHLSL(ParsedIR &&ir_) : CompilerGLSL(std::move(ir_)) { } const Options &get_hlsl_options() const { return hlsl_options; } void set_hlsl_options(const Options &opts) { hlsl_options = opts; } // Optionally specify a custom root constant layout. // // Push constants ranges will be split up according to the // layout specified. void set_root_constant_layouts(std::vector layout); // Compiles and remaps vertex attributes at specific locations to a fixed semantic. // The default is TEXCOORD# where # denotes location. // Matrices are unrolled to vectors with notation ${SEMANTIC}_#, where # denotes row. // $SEMANTIC is either TEXCOORD# or a semantic name specified here. void add_vertex_attribute_remap(const HLSLVertexAttributeRemap &vertex_attributes); std::string compile() override; // This is a special HLSL workaround for the NumWorkGroups builtin. // This does not exist in HLSL, so the calling application must create a dummy cbuffer in // which the application will store this builtin. // The cbuffer layout will be: // cbuffer SPIRV_Cross_NumWorkgroups : register(b#, space#) { uint3 SPIRV_Cross_NumWorkgroups_count; }; // This must be called before compile(). // The function returns 0 if NumWorkGroups builtin is not statically used in the shader from the current entry point. // If non-zero, this returns the variable ID of a cbuffer which corresponds to // the cbuffer declared above. By default, no binding or descriptor set decoration is set, // so the calling application should declare explicit bindings on this ID before calling compile(). VariableID remap_num_workgroups_builtin(); // Controls how resource bindings are declared in the output HLSL. void set_resource_binding_flags(HLSLBindingFlags flags); // resource is a resource binding to indicate the HLSL CBV, SRV, UAV or sampler binding // to use for a particular SPIR-V description set // and binding. If resource bindings are provided, // is_hlsl_resource_binding_used() will return true after calling ::compile() if // the set/binding combination was used by the HLSL code. void add_hlsl_resource_binding(const HLSLResourceBinding &resource); bool is_hlsl_resource_binding_used(spv::ExecutionModel model, uint32_t set, uint32_t binding) const; // Controls which storage buffer bindings will be forced to be declared as UAVs. void set_hlsl_force_storage_buffer_as_uav(uint32_t desc_set, uint32_t binding); // By default, these magic buffers are not assigned a specific binding. void set_hlsl_aux_buffer_binding(HLSLAuxBinding binding, uint32_t register_index, uint32_t register_space); void unset_hlsl_aux_buffer_binding(HLSLAuxBinding binding); bool is_hlsl_aux_buffer_binding_used(HLSLAuxBinding binding) const; private: std::string type_to_glsl(const SPIRType &type, uint32_t id = 0) override; std::string image_type_hlsl(const SPIRType &type, uint32_t id); std::string image_type_hlsl_modern(const SPIRType &type, uint32_t id); std::string image_type_hlsl_legacy(const SPIRType &type, uint32_t id); void emit_function_prototype(SPIRFunction &func, const Bitset &return_flags) override; void emit_hlsl_entry_point(); void emit_header() override; void emit_resources(); void emit_interface_block_globally(const SPIRVariable &type); void emit_interface_block_in_struct(const SPIRVariable &var, std::unordered_set &active_locations); void emit_interface_block_member_in_struct(const SPIRVariable &var, uint32_t member_index, uint32_t location, std::unordered_set &active_locations); void emit_builtin_inputs_in_struct(); void emit_builtin_outputs_in_struct(); void emit_builtin_primitive_outputs_in_struct(); void emit_texture_op(const Instruction &i, bool sparse) override; void emit_instruction(const Instruction &instruction) override; void emit_glsl_op(uint32_t result_type, uint32_t result_id, uint32_t op, const uint32_t *args, uint32_t count) override; void emit_buffer_block(const SPIRVariable &type) override; void emit_push_constant_block(const SPIRVariable &var) override; void emit_uniform(const SPIRVariable &var) override; void emit_modern_uniform(const SPIRVariable &var); void emit_legacy_uniform(const SPIRVariable &var); void emit_specialization_constants_and_structs(); void emit_composite_constants(); void emit_fixup() override; std::string builtin_to_glsl(spv::BuiltIn builtin, spv::StorageClass storage) override; std::string layout_for_member(const SPIRType &type, uint32_t index) override; std::string to_interpolation_qualifiers(const Bitset &flags) override; std::string bitcast_glsl_op(const SPIRType &result_type, const SPIRType &argument_type) override; bool emit_complex_bitcast(uint32_t result_type, uint32_t id, uint32_t op0) override; std::string to_func_call_arg(const SPIRFunction::Parameter &arg, uint32_t id) override; std::string to_sampler_expression(uint32_t id); std::string to_resource_binding(const SPIRVariable &var); std::string to_resource_binding_sampler(const SPIRVariable &var); std::string to_resource_register(HLSLBindingFlagBits flag, char space, uint32_t binding, uint32_t set); std::string to_initializer_expression(const SPIRVariable &var) override; void emit_sampled_image_op(uint32_t result_type, uint32_t result_id, uint32_t image_id, uint32_t samp_id) override; void emit_access_chain(const Instruction &instruction); void emit_load(const Instruction &instruction); void read_access_chain(std::string *expr, const std::string &lhs, const SPIRAccessChain &chain); void read_access_chain_struct(const std::string &lhs, const SPIRAccessChain &chain); void read_access_chain_array(const std::string &lhs, const SPIRAccessChain &chain); void write_access_chain(const SPIRAccessChain &chain, uint32_t value, const SmallVector &composite_chain); void write_access_chain_struct(const SPIRAccessChain &chain, uint32_t value, const SmallVector &composite_chain); void write_access_chain_array(const SPIRAccessChain &chain, uint32_t value, const SmallVector &composite_chain); std::string write_access_chain_value(uint32_t value, const SmallVector &composite_chain, bool enclose); void emit_store(const Instruction &instruction); void emit_atomic(const uint32_t *ops, uint32_t length, spv::Op op); void emit_subgroup_op(const Instruction &i) override; void emit_block_hints(const SPIRBlock &block) override; void emit_struct_member(const SPIRType &type, uint32_t member_type_id, uint32_t index, const std::string &qualifier, uint32_t base_offset = 0) override; void emit_rayquery_function(const char *commited, const char *candidate, const uint32_t *ops); void emit_mesh_tasks(SPIRBlock &block) override; const char *to_storage_qualifiers_glsl(const SPIRVariable &var) override; void replace_illegal_names() override; SPIRType::BaseType get_builtin_basetype(spv::BuiltIn builtin, SPIRType::BaseType default_type) override; bool is_hlsl_force_storage_buffer_as_uav(ID id) const; Options hlsl_options; // TODO: Refactor this to be more similar to MSL, maybe have some common system in place? bool requires_op_fmod = false; bool requires_fp16_packing = false; bool requires_uint2_packing = false; bool requires_explicit_fp16_packing = false; bool requires_unorm8_packing = false; bool requires_snorm8_packing = false; bool requires_unorm16_packing = false; bool requires_snorm16_packing = false; bool requires_bitfield_insert = false; bool requires_bitfield_extract = false; bool requires_inverse_2x2 = false; bool requires_inverse_3x3 = false; bool requires_inverse_4x4 = false; bool requires_scalar_reflect = false; bool requires_scalar_refract = false; bool requires_scalar_faceforward = false; struct TextureSizeVariants { // MSVC 2013 workaround. TextureSizeVariants() { srv = 0; for (auto &unorm : uav) for (auto &u : unorm) u = 0; } uint64_t srv; uint64_t uav[3][4]; } required_texture_size_variants; void require_texture_query_variant(uint32_t var_id); void emit_texture_size_variants(uint64_t variant_mask, const char *vecsize_qualifier, bool uav, const char *type_qualifier); enum TextureQueryVariantDim { Query1D = 0, Query1DArray, Query2D, Query2DArray, Query3D, QueryBuffer, QueryCube, QueryCubeArray, Query2DMS, Query2DMSArray, QueryDimCount }; enum TextureQueryVariantType { QueryTypeFloat = 0, QueryTypeInt = 16, QueryTypeUInt = 32, QueryTypeCount = 3 }; enum BitcastType { TypeNormal, TypePackUint2x32, TypeUnpackUint64 }; void analyze_meshlet_writes(); void analyze_meshlet_writes(uint32_t func_id, uint32_t id_per_vertex, uint32_t id_per_primitive, std::unordered_set &processed_func_ids); BitcastType get_bitcast_type(uint32_t result_type, uint32_t op0); void emit_builtin_variables(); bool require_output = false; bool require_input = false; SmallVector remap_vertex_attributes; uint32_t type_to_consumed_locations(const SPIRType &type) const; std::string to_semantic(uint32_t location, spv::ExecutionModel em, spv::StorageClass sc); uint32_t num_workgroups_builtin = 0; HLSLBindingFlags resource_binding_flags = 0; // Custom root constant layout, which should be emitted // when translating push constant ranges. std::vector root_constants_layout; void validate_shader_model(); std::string get_unique_identifier(); uint32_t unique_identifier_count = 0; std::unordered_map, InternalHasher> resource_bindings; void remap_hlsl_resource_binding(HLSLBindingFlagBits type, uint32_t &desc_set, uint32_t &binding); std::unordered_set force_uav_buffer_bindings; struct { uint32_t register_index = 0; uint32_t register_space = 0; bool explicit_binding = false; bool used = false; } base_vertex_info; // Returns true if the specified ID has a UserTypeGOOGLE decoration for StructuredBuffer or RWStructuredBuffer resources. bool is_user_type_structured(uint32_t id) const override; std::vector composite_selection_workaround_types; std::string get_inner_entry_point_name() const; }; } // namespace SPIRV_CROSS_NAMESPACE #endif ================================================ FILE: src/libraries/spirv_cross/spirv_msl.cpp ================================================ /* * Copyright 2016-2021 The Brenwill Workshop Ltd. * SPDX-License-Identifier: Apache-2.0 OR MIT * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* * At your option, you may choose to accept this material under either: * 1. The Apache License, Version 2.0, found at , or * 2. The MIT License, found at . */ #include "spirv_msl.hpp" #include "GLSL.std.450.h" #include #include #include using namespace spv; using namespace SPIRV_CROSS_NAMESPACE; using namespace std; static const uint32_t k_unknown_location = ~0u; static const uint32_t k_unknown_component = ~0u; static const char *force_inline = "static inline __attribute__((always_inline))"; CompilerMSL::CompilerMSL(std::vector spirv_) : CompilerGLSL(std::move(spirv_)) { } CompilerMSL::CompilerMSL(const uint32_t *ir_, size_t word_count) : CompilerGLSL(ir_, word_count) { } CompilerMSL::CompilerMSL(const ParsedIR &ir_) : CompilerGLSL(ir_) { } CompilerMSL::CompilerMSL(ParsedIR &&ir_) : CompilerGLSL(std::move(ir_)) { } void CompilerMSL::add_msl_shader_input(const MSLShaderInterfaceVariable &si) { inputs_by_location[{si.location, si.component}] = si; if (si.builtin != BuiltInMax && !inputs_by_builtin.count(si.builtin)) inputs_by_builtin[si.builtin] = si; } void CompilerMSL::add_msl_shader_output(const MSLShaderInterfaceVariable &so) { outputs_by_location[{so.location, so.component}] = so; if (so.builtin != BuiltInMax && !outputs_by_builtin.count(so.builtin)) outputs_by_builtin[so.builtin] = so; } void CompilerMSL::add_msl_resource_binding(const MSLResourceBinding &binding) { StageSetBinding tuple = { binding.stage, binding.desc_set, binding.binding }; resource_bindings[tuple] = { binding, false }; // If we might need to pad argument buffer members to positionally align // arg buffer indexes, also maintain a lookup by argument buffer index. if (msl_options.pad_argument_buffer_resources) { StageSetBinding arg_idx_tuple = { binding.stage, binding.desc_set, k_unknown_component }; #define ADD_ARG_IDX_TO_BINDING_NUM_LOOKUP(rez) \ arg_idx_tuple.binding = binding.msl_##rez; \ resource_arg_buff_idx_to_binding_number[arg_idx_tuple] = binding.binding switch (binding.basetype) { case SPIRType::Void: case SPIRType::Boolean: case SPIRType::SByte: case SPIRType::UByte: case SPIRType::Short: case SPIRType::UShort: case SPIRType::Int: case SPIRType::UInt: case SPIRType::Int64: case SPIRType::UInt64: case SPIRType::AtomicCounter: case SPIRType::Half: case SPIRType::Float: case SPIRType::Double: ADD_ARG_IDX_TO_BINDING_NUM_LOOKUP(buffer); break; case SPIRType::Image: ADD_ARG_IDX_TO_BINDING_NUM_LOOKUP(texture); break; case SPIRType::Sampler: ADD_ARG_IDX_TO_BINDING_NUM_LOOKUP(sampler); break; case SPIRType::SampledImage: ADD_ARG_IDX_TO_BINDING_NUM_LOOKUP(texture); ADD_ARG_IDX_TO_BINDING_NUM_LOOKUP(sampler); break; default: SPIRV_CROSS_THROW("Unexpected argument buffer resource base type. When padding argument buffer elements, " "all descriptor set resources must be supplied with a base type by the app."); } #undef ADD_ARG_IDX_TO_BINDING_NUM_LOOKUP } } void CompilerMSL::add_dynamic_buffer(uint32_t desc_set, uint32_t binding, uint32_t index) { SetBindingPair pair = { desc_set, binding }; buffers_requiring_dynamic_offset[pair] = { index, 0 }; } void CompilerMSL::add_inline_uniform_block(uint32_t desc_set, uint32_t binding) { SetBindingPair pair = { desc_set, binding }; inline_uniform_blocks.insert(pair); } void CompilerMSL::add_discrete_descriptor_set(uint32_t desc_set) { if (desc_set < kMaxArgumentBuffers) argument_buffer_discrete_mask |= 1u << desc_set; } void CompilerMSL::set_argument_buffer_device_address_space(uint32_t desc_set, bool device_storage) { if (desc_set < kMaxArgumentBuffers) { if (device_storage) argument_buffer_device_storage_mask |= 1u << desc_set; else argument_buffer_device_storage_mask &= ~(1u << desc_set); } } bool CompilerMSL::is_msl_shader_input_used(uint32_t location) { // Don't report internal location allocations to app. return location_inputs_in_use.count(location) != 0 && location_inputs_in_use_fallback.count(location) == 0; } bool CompilerMSL::is_msl_shader_output_used(uint32_t location) { // Don't report internal location allocations to app. return location_outputs_in_use.count(location) != 0 && location_outputs_in_use_fallback.count(location) == 0; } uint32_t CompilerMSL::get_automatic_builtin_input_location(spv::BuiltIn builtin) const { auto itr = builtin_to_automatic_input_location.find(builtin); if (itr == builtin_to_automatic_input_location.end()) return k_unknown_location; else return itr->second; } uint32_t CompilerMSL::get_automatic_builtin_output_location(spv::BuiltIn builtin) const { auto itr = builtin_to_automatic_output_location.find(builtin); if (itr == builtin_to_automatic_output_location.end()) return k_unknown_location; else return itr->second; } bool CompilerMSL::is_msl_resource_binding_used(ExecutionModel model, uint32_t desc_set, uint32_t binding) const { StageSetBinding tuple = { model, desc_set, binding }; auto itr = resource_bindings.find(tuple); return itr != end(resource_bindings) && itr->second.second; } bool CompilerMSL::is_var_runtime_size_array(const SPIRVariable &var) const { auto& type = get_variable_data_type(var); return is_runtime_size_array(type) && get_resource_array_size(type, var.self) == 0; } // Returns the size of the array of resources used by the variable with the specified type and id. // The size is first retrieved from the type, but in the case of runtime array sizing, // the size is retrieved from the resource binding added using add_msl_resource_binding(). uint32_t CompilerMSL::get_resource_array_size(const SPIRType &type, uint32_t id) const { uint32_t array_size = to_array_size_literal(type); if (array_size) return array_size; StageSetBinding tuple = { get_entry_point().model, get_decoration(id, DecorationDescriptorSet), get_decoration(id, DecorationBinding) }; auto itr = resource_bindings.find(tuple); return itr != end(resource_bindings) ? itr->second.first.count : 0; } uint32_t CompilerMSL::get_automatic_msl_resource_binding(uint32_t id) const { return get_extended_decoration(id, SPIRVCrossDecorationResourceIndexPrimary); } uint32_t CompilerMSL::get_automatic_msl_resource_binding_secondary(uint32_t id) const { return get_extended_decoration(id, SPIRVCrossDecorationResourceIndexSecondary); } uint32_t CompilerMSL::get_automatic_msl_resource_binding_tertiary(uint32_t id) const { return get_extended_decoration(id, SPIRVCrossDecorationResourceIndexTertiary); } uint32_t CompilerMSL::get_automatic_msl_resource_binding_quaternary(uint32_t id) const { return get_extended_decoration(id, SPIRVCrossDecorationResourceIndexQuaternary); } void CompilerMSL::set_fragment_output_components(uint32_t location, uint32_t components) { fragment_output_components[location] = components; } bool CompilerMSL::builtin_translates_to_nonarray(spv::BuiltIn builtin) const { return (builtin == BuiltInSampleMask); } void CompilerMSL::build_implicit_builtins() { bool need_sample_pos = active_input_builtins.get(BuiltInSamplePosition); bool need_vertex_params = capture_output_to_buffer && get_execution_model() == ExecutionModelVertex && !msl_options.vertex_for_tessellation; bool need_tesc_params = is_tesc_shader(); bool need_tese_params = is_tese_shader() && msl_options.raw_buffer_tese_input; bool need_subgroup_mask = active_input_builtins.get(BuiltInSubgroupEqMask) || active_input_builtins.get(BuiltInSubgroupGeMask) || active_input_builtins.get(BuiltInSubgroupGtMask) || active_input_builtins.get(BuiltInSubgroupLeMask) || active_input_builtins.get(BuiltInSubgroupLtMask); bool need_subgroup_ge_mask = !msl_options.is_ios() && (active_input_builtins.get(BuiltInSubgroupGeMask) || active_input_builtins.get(BuiltInSubgroupGtMask)); bool need_multiview = get_execution_model() == ExecutionModelVertex && !msl_options.view_index_from_device_index && msl_options.multiview_layered_rendering && (msl_options.multiview || active_input_builtins.get(BuiltInViewIndex)); bool need_dispatch_base = msl_options.dispatch_base && get_execution_model() == ExecutionModelGLCompute && (active_input_builtins.get(BuiltInWorkgroupId) || active_input_builtins.get(BuiltInGlobalInvocationId)); bool need_grid_params = get_execution_model() == ExecutionModelVertex && msl_options.vertex_for_tessellation; bool need_vertex_base_params = need_grid_params && (active_input_builtins.get(BuiltInVertexId) || active_input_builtins.get(BuiltInVertexIndex) || active_input_builtins.get(BuiltInBaseVertex) || active_input_builtins.get(BuiltInInstanceId) || active_input_builtins.get(BuiltInInstanceIndex) || active_input_builtins.get(BuiltInBaseInstance)); bool need_local_invocation_index = msl_options.emulate_subgroups && active_input_builtins.get(BuiltInSubgroupId); bool need_workgroup_size = msl_options.emulate_subgroups && active_input_builtins.get(BuiltInNumSubgroups); if (need_subpass_input || need_sample_pos || need_subgroup_mask || need_vertex_params || need_tesc_params || need_tese_params || need_multiview || need_dispatch_base || need_vertex_base_params || need_grid_params || needs_sample_id || needs_subgroup_invocation_id || needs_subgroup_size || needs_helper_invocation || has_additional_fixed_sample_mask() || need_local_invocation_index || need_workgroup_size) { bool has_frag_coord = false; bool has_sample_id = false; bool has_vertex_idx = false; bool has_base_vertex = false; bool has_instance_idx = false; bool has_base_instance = false; bool has_invocation_id = false; bool has_primitive_id = false; bool has_subgroup_invocation_id = false; bool has_subgroup_size = false; bool has_view_idx = false; bool has_layer = false; bool has_helper_invocation = false; bool has_local_invocation_index = false; bool has_workgroup_size = false; uint32_t workgroup_id_type = 0; ir.for_each_typed_id([&](uint32_t, SPIRVariable &var) { if (var.storage != StorageClassInput && var.storage != StorageClassOutput) return; if (!interface_variable_exists_in_entry_point(var.self)) return; if (!has_decoration(var.self, DecorationBuiltIn)) return; BuiltIn builtin = ir.meta[var.self].decoration.builtin_type; if (var.storage == StorageClassOutput) { if (has_additional_fixed_sample_mask() && builtin == BuiltInSampleMask) { builtin_sample_mask_id = var.self; mark_implicit_builtin(StorageClassOutput, BuiltInSampleMask, var.self); does_shader_write_sample_mask = true; } } if (var.storage != StorageClassInput) return; // Use Metal's native frame-buffer fetch API for subpass inputs. if (need_subpass_input && (!msl_options.use_framebuffer_fetch_subpasses)) { switch (builtin) { case BuiltInFragCoord: mark_implicit_builtin(StorageClassInput, BuiltInFragCoord, var.self); builtin_frag_coord_id = var.self; has_frag_coord = true; break; case BuiltInLayer: if (!msl_options.arrayed_subpass_input || msl_options.multiview) break; mark_implicit_builtin(StorageClassInput, BuiltInLayer, var.self); builtin_layer_id = var.self; has_layer = true; break; case BuiltInViewIndex: if (!msl_options.multiview) break; mark_implicit_builtin(StorageClassInput, BuiltInViewIndex, var.self); builtin_view_idx_id = var.self; has_view_idx = true; break; default: break; } } if ((need_sample_pos || needs_sample_id) && builtin == BuiltInSampleId) { builtin_sample_id_id = var.self; mark_implicit_builtin(StorageClassInput, BuiltInSampleId, var.self); has_sample_id = true; } if (need_vertex_params) { switch (builtin) { case BuiltInVertexIndex: builtin_vertex_idx_id = var.self; mark_implicit_builtin(StorageClassInput, BuiltInVertexIndex, var.self); has_vertex_idx = true; break; case BuiltInBaseVertex: builtin_base_vertex_id = var.self; mark_implicit_builtin(StorageClassInput, BuiltInBaseVertex, var.self); has_base_vertex = true; break; case BuiltInInstanceIndex: builtin_instance_idx_id = var.self; mark_implicit_builtin(StorageClassInput, BuiltInInstanceIndex, var.self); has_instance_idx = true; break; case BuiltInBaseInstance: builtin_base_instance_id = var.self; mark_implicit_builtin(StorageClassInput, BuiltInBaseInstance, var.self); has_base_instance = true; break; default: break; } } if (need_tesc_params && builtin == BuiltInInvocationId) { builtin_invocation_id_id = var.self; mark_implicit_builtin(StorageClassInput, BuiltInInvocationId, var.self); has_invocation_id = true; } if ((need_tesc_params || need_tese_params) && builtin == BuiltInPrimitiveId) { builtin_primitive_id_id = var.self; mark_implicit_builtin(StorageClassInput, BuiltInPrimitiveId, var.self); has_primitive_id = true; } if (need_tese_params && builtin == BuiltInTessLevelOuter) { tess_level_outer_var_id = var.self; } if (need_tese_params && builtin == BuiltInTessLevelInner) { tess_level_inner_var_id = var.self; } if ((need_subgroup_mask || needs_subgroup_invocation_id) && builtin == BuiltInSubgroupLocalInvocationId) { builtin_subgroup_invocation_id_id = var.self; mark_implicit_builtin(StorageClassInput, BuiltInSubgroupLocalInvocationId, var.self); has_subgroup_invocation_id = true; } if ((need_subgroup_ge_mask || needs_subgroup_size) && builtin == BuiltInSubgroupSize) { builtin_subgroup_size_id = var.self; mark_implicit_builtin(StorageClassInput, BuiltInSubgroupSize, var.self); has_subgroup_size = true; } if (need_multiview) { switch (builtin) { case BuiltInInstanceIndex: // The view index here is derived from the instance index. builtin_instance_idx_id = var.self; mark_implicit_builtin(StorageClassInput, BuiltInInstanceIndex, var.self); has_instance_idx = true; break; case BuiltInBaseInstance: // If a non-zero base instance is used, we need to adjust for it when calculating the view index. builtin_base_instance_id = var.self; mark_implicit_builtin(StorageClassInput, BuiltInBaseInstance, var.self); has_base_instance = true; break; case BuiltInViewIndex: builtin_view_idx_id = var.self; mark_implicit_builtin(StorageClassInput, BuiltInViewIndex, var.self); has_view_idx = true; break; default: break; } } if (needs_helper_invocation && builtin == BuiltInHelperInvocation) { builtin_helper_invocation_id = var.self; mark_implicit_builtin(StorageClassInput, BuiltInHelperInvocation, var.self); has_helper_invocation = true; } if (need_local_invocation_index && builtin == BuiltInLocalInvocationIndex) { builtin_local_invocation_index_id = var.self; mark_implicit_builtin(StorageClassInput, BuiltInLocalInvocationIndex, var.self); has_local_invocation_index = true; } if (need_workgroup_size && builtin == BuiltInLocalInvocationId) { builtin_workgroup_size_id = var.self; mark_implicit_builtin(StorageClassInput, BuiltInWorkgroupSize, var.self); has_workgroup_size = true; } // The base workgroup needs to have the same type and vector size // as the workgroup or invocation ID, so keep track of the type that // was used. if (need_dispatch_base && workgroup_id_type == 0 && (builtin == BuiltInWorkgroupId || builtin == BuiltInGlobalInvocationId)) workgroup_id_type = var.basetype; }); // Use Metal's native frame-buffer fetch API for subpass inputs. if ((!has_frag_coord || (msl_options.multiview && !has_view_idx) || (msl_options.arrayed_subpass_input && !msl_options.multiview && !has_layer)) && (!msl_options.use_framebuffer_fetch_subpasses) && need_subpass_input) { if (!has_frag_coord) { uint32_t offset = ir.increase_bound_by(3); uint32_t type_id = offset; uint32_t type_ptr_id = offset + 1; uint32_t var_id = offset + 2; // Create gl_FragCoord. SPIRType vec4_type { OpTypeVector }; vec4_type.basetype = SPIRType::Float; vec4_type.width = 32; vec4_type.vecsize = 4; set(type_id, vec4_type); SPIRType vec4_type_ptr = vec4_type; vec4_type_ptr.op = OpTypePointer; vec4_type_ptr.pointer = true; vec4_type_ptr.pointer_depth++; vec4_type_ptr.parent_type = type_id; vec4_type_ptr.storage = StorageClassInput; auto &ptr_type = set(type_ptr_id, vec4_type_ptr); ptr_type.self = type_id; set(var_id, type_ptr_id, StorageClassInput); set_decoration(var_id, DecorationBuiltIn, BuiltInFragCoord); builtin_frag_coord_id = var_id; mark_implicit_builtin(StorageClassInput, BuiltInFragCoord, var_id); } if (!has_layer && msl_options.arrayed_subpass_input && !msl_options.multiview) { uint32_t offset = ir.increase_bound_by(2); uint32_t type_ptr_id = offset; uint32_t var_id = offset + 1; // Create gl_Layer. SPIRType uint_type_ptr = get_uint_type(); uint_type_ptr.op = OpTypePointer; uint_type_ptr.pointer = true; uint_type_ptr.pointer_depth++; uint_type_ptr.parent_type = get_uint_type_id(); uint_type_ptr.storage = StorageClassInput; auto &ptr_type = set(type_ptr_id, uint_type_ptr); ptr_type.self = get_uint_type_id(); set(var_id, type_ptr_id, StorageClassInput); set_decoration(var_id, DecorationBuiltIn, BuiltInLayer); builtin_layer_id = var_id; mark_implicit_builtin(StorageClassInput, BuiltInLayer, var_id); } if (!has_view_idx && msl_options.multiview) { uint32_t offset = ir.increase_bound_by(2); uint32_t type_ptr_id = offset; uint32_t var_id = offset + 1; // Create gl_ViewIndex. SPIRType uint_type_ptr = get_uint_type(); uint_type_ptr.op = OpTypePointer; uint_type_ptr.pointer = true; uint_type_ptr.pointer_depth++; uint_type_ptr.parent_type = get_uint_type_id(); uint_type_ptr.storage = StorageClassInput; auto &ptr_type = set(type_ptr_id, uint_type_ptr); ptr_type.self = get_uint_type_id(); set(var_id, type_ptr_id, StorageClassInput); set_decoration(var_id, DecorationBuiltIn, BuiltInViewIndex); builtin_view_idx_id = var_id; mark_implicit_builtin(StorageClassInput, BuiltInViewIndex, var_id); } } if (!has_sample_id && (need_sample_pos || needs_sample_id)) { uint32_t offset = ir.increase_bound_by(2); uint32_t type_ptr_id = offset; uint32_t var_id = offset + 1; // Create gl_SampleID. SPIRType uint_type_ptr = get_uint_type(); uint_type_ptr.op = OpTypePointer; uint_type_ptr.pointer = true; uint_type_ptr.pointer_depth++; uint_type_ptr.parent_type = get_uint_type_id(); uint_type_ptr.storage = StorageClassInput; auto &ptr_type = set(type_ptr_id, uint_type_ptr); ptr_type.self = get_uint_type_id(); set(var_id, type_ptr_id, StorageClassInput); set_decoration(var_id, DecorationBuiltIn, BuiltInSampleId); builtin_sample_id_id = var_id; mark_implicit_builtin(StorageClassInput, BuiltInSampleId, var_id); } if ((need_vertex_params && (!has_vertex_idx || !has_base_vertex || !has_instance_idx || !has_base_instance)) || (need_multiview && (!has_instance_idx || !has_base_instance || !has_view_idx))) { uint32_t type_ptr_id = ir.increase_bound_by(1); SPIRType uint_type_ptr = get_uint_type(); uint_type_ptr.op = OpTypePointer; uint_type_ptr.pointer = true; uint_type_ptr.pointer_depth++; uint_type_ptr.parent_type = get_uint_type_id(); uint_type_ptr.storage = StorageClassInput; auto &ptr_type = set(type_ptr_id, uint_type_ptr); ptr_type.self = get_uint_type_id(); if (need_vertex_params && !has_vertex_idx) { uint32_t var_id = ir.increase_bound_by(1); // Create gl_VertexIndex. set(var_id, type_ptr_id, StorageClassInput); set_decoration(var_id, DecorationBuiltIn, BuiltInVertexIndex); builtin_vertex_idx_id = var_id; mark_implicit_builtin(StorageClassInput, BuiltInVertexIndex, var_id); } if (need_vertex_params && !has_base_vertex) { uint32_t var_id = ir.increase_bound_by(1); // Create gl_BaseVertex. set(var_id, type_ptr_id, StorageClassInput); set_decoration(var_id, DecorationBuiltIn, BuiltInBaseVertex); builtin_base_vertex_id = var_id; mark_implicit_builtin(StorageClassInput, BuiltInBaseVertex, var_id); } if (!has_instance_idx) // Needed by both multiview and tessellation { uint32_t var_id = ir.increase_bound_by(1); // Create gl_InstanceIndex. set(var_id, type_ptr_id, StorageClassInput); set_decoration(var_id, DecorationBuiltIn, BuiltInInstanceIndex); builtin_instance_idx_id = var_id; mark_implicit_builtin(StorageClassInput, BuiltInInstanceIndex, var_id); } if (!has_base_instance) // Needed by both multiview and tessellation { uint32_t var_id = ir.increase_bound_by(1); // Create gl_BaseInstance. set(var_id, type_ptr_id, StorageClassInput); set_decoration(var_id, DecorationBuiltIn, BuiltInBaseInstance); builtin_base_instance_id = var_id; mark_implicit_builtin(StorageClassInput, BuiltInBaseInstance, var_id); } if (need_multiview) { // Multiview shaders are not allowed to write to gl_Layer, ostensibly because // it is implicitly written from gl_ViewIndex, but we have to do that explicitly. // Note that we can't just abuse gl_ViewIndex for this purpose: it's an input, but // gl_Layer is an output in vertex-pipeline shaders. uint32_t type_ptr_out_id = ir.increase_bound_by(2); SPIRType uint_type_ptr_out = get_uint_type(); uint_type_ptr.op = OpTypePointer; uint_type_ptr_out.pointer = true; uint_type_ptr_out.pointer_depth++; uint_type_ptr_out.parent_type = get_uint_type_id(); uint_type_ptr_out.storage = StorageClassOutput; auto &ptr_out_type = set(type_ptr_out_id, uint_type_ptr_out); ptr_out_type.self = get_uint_type_id(); uint32_t var_id = type_ptr_out_id + 1; set(var_id, type_ptr_out_id, StorageClassOutput); set_decoration(var_id, DecorationBuiltIn, BuiltInLayer); builtin_layer_id = var_id; mark_implicit_builtin(StorageClassOutput, BuiltInLayer, var_id); } if (need_multiview && !has_view_idx) { uint32_t var_id = ir.increase_bound_by(1); // Create gl_ViewIndex. set(var_id, type_ptr_id, StorageClassInput); set_decoration(var_id, DecorationBuiltIn, BuiltInViewIndex); builtin_view_idx_id = var_id; mark_implicit_builtin(StorageClassInput, BuiltInViewIndex, var_id); } } if ((need_tesc_params && (msl_options.multi_patch_workgroup || !has_invocation_id || !has_primitive_id)) || (need_tese_params && !has_primitive_id) || need_grid_params) { uint32_t type_ptr_id = ir.increase_bound_by(1); SPIRType uint_type_ptr = get_uint_type(); uint_type_ptr.op = OpTypePointer; uint_type_ptr.pointer = true; uint_type_ptr.pointer_depth++; uint_type_ptr.parent_type = get_uint_type_id(); uint_type_ptr.storage = StorageClassInput; auto &ptr_type = set(type_ptr_id, uint_type_ptr); ptr_type.self = get_uint_type_id(); if ((need_tesc_params && msl_options.multi_patch_workgroup) || need_grid_params) { uint32_t var_id = ir.increase_bound_by(1); // Create gl_GlobalInvocationID. set(var_id, type_ptr_id, StorageClassInput); set_decoration(var_id, DecorationBuiltIn, BuiltInGlobalInvocationId); builtin_invocation_id_id = var_id; mark_implicit_builtin(StorageClassInput, BuiltInGlobalInvocationId, var_id); } else if (need_tesc_params && !has_invocation_id) { uint32_t var_id = ir.increase_bound_by(1); // Create gl_InvocationID. set(var_id, type_ptr_id, StorageClassInput); set_decoration(var_id, DecorationBuiltIn, BuiltInInvocationId); builtin_invocation_id_id = var_id; mark_implicit_builtin(StorageClassInput, BuiltInInvocationId, var_id); } if ((need_tesc_params || need_tese_params) && !has_primitive_id) { uint32_t var_id = ir.increase_bound_by(1); // Create gl_PrimitiveID. set(var_id, type_ptr_id, StorageClassInput); set_decoration(var_id, DecorationBuiltIn, BuiltInPrimitiveId); builtin_primitive_id_id = var_id; mark_implicit_builtin(StorageClassInput, BuiltInPrimitiveId, var_id); } if (need_grid_params) { uint32_t var_id = ir.increase_bound_by(1); set(var_id, build_extended_vector_type(get_uint_type_id(), 3), StorageClassInput); set_extended_decoration(var_id, SPIRVCrossDecorationBuiltInStageInputSize); get_entry_point().interface_variables.push_back(var_id); set_name(var_id, "spvStageInputSize"); builtin_stage_input_size_id = var_id; } } if (!has_subgroup_invocation_id && (need_subgroup_mask || needs_subgroup_invocation_id)) { uint32_t offset = ir.increase_bound_by(2); uint32_t type_ptr_id = offset; uint32_t var_id = offset + 1; // Create gl_SubgroupInvocationID. SPIRType uint_type_ptr = get_uint_type(); uint_type_ptr.op = OpTypePointer; uint_type_ptr.pointer = true; uint_type_ptr.pointer_depth++; uint_type_ptr.parent_type = get_uint_type_id(); uint_type_ptr.storage = StorageClassInput; auto &ptr_type = set(type_ptr_id, uint_type_ptr); ptr_type.self = get_uint_type_id(); set(var_id, type_ptr_id, StorageClassInput); set_decoration(var_id, DecorationBuiltIn, BuiltInSubgroupLocalInvocationId); builtin_subgroup_invocation_id_id = var_id; mark_implicit_builtin(StorageClassInput, BuiltInSubgroupLocalInvocationId, var_id); } if (!has_subgroup_size && (need_subgroup_ge_mask || needs_subgroup_size)) { uint32_t offset = ir.increase_bound_by(2); uint32_t type_ptr_id = offset; uint32_t var_id = offset + 1; // Create gl_SubgroupSize. SPIRType uint_type_ptr = get_uint_type(); uint_type_ptr.op = OpTypePointer; uint_type_ptr.pointer = true; uint_type_ptr.pointer_depth++; uint_type_ptr.parent_type = get_uint_type_id(); uint_type_ptr.storage = StorageClassInput; auto &ptr_type = set(type_ptr_id, uint_type_ptr); ptr_type.self = get_uint_type_id(); set(var_id, type_ptr_id, StorageClassInput); set_decoration(var_id, DecorationBuiltIn, BuiltInSubgroupSize); builtin_subgroup_size_id = var_id; mark_implicit_builtin(StorageClassInput, BuiltInSubgroupSize, var_id); } if (need_dispatch_base || need_vertex_base_params) { if (workgroup_id_type == 0) workgroup_id_type = build_extended_vector_type(get_uint_type_id(), 3); uint32_t var_id; if (msl_options.supports_msl_version(1, 2)) { // If we have MSL 1.2, we can (ab)use the [[grid_origin]] builtin // to convey this information and save a buffer slot. uint32_t offset = ir.increase_bound_by(1); var_id = offset; set(var_id, workgroup_id_type, StorageClassInput); set_extended_decoration(var_id, SPIRVCrossDecorationBuiltInDispatchBase); get_entry_point().interface_variables.push_back(var_id); } else { // Otherwise, we need to fall back to a good ol' fashioned buffer. uint32_t offset = ir.increase_bound_by(2); var_id = offset; uint32_t type_id = offset + 1; SPIRType var_type = get(workgroup_id_type); var_type.storage = StorageClassUniform; set(type_id, var_type); set(var_id, type_id, StorageClassUniform); // This should never match anything. set_decoration(var_id, DecorationDescriptorSet, ~(5u)); set_decoration(var_id, DecorationBinding, msl_options.indirect_params_buffer_index); set_extended_decoration(var_id, SPIRVCrossDecorationResourceIndexPrimary, msl_options.indirect_params_buffer_index); } set_name(var_id, "spvDispatchBase"); builtin_dispatch_base_id = var_id; } if (has_additional_fixed_sample_mask() && !does_shader_write_sample_mask) { uint32_t offset = ir.increase_bound_by(2); uint32_t var_id = offset + 1; // Create gl_SampleMask. SPIRType uint_type_ptr_out = get_uint_type(); uint_type_ptr_out.op = OpTypePointer; uint_type_ptr_out.pointer = true; uint_type_ptr_out.pointer_depth++; uint_type_ptr_out.parent_type = get_uint_type_id(); uint_type_ptr_out.storage = StorageClassOutput; auto &ptr_out_type = set(offset, uint_type_ptr_out); ptr_out_type.self = get_uint_type_id(); set(var_id, offset, StorageClassOutput); set_decoration(var_id, DecorationBuiltIn, BuiltInSampleMask); builtin_sample_mask_id = var_id; mark_implicit_builtin(StorageClassOutput, BuiltInSampleMask, var_id); } if (!has_helper_invocation && needs_helper_invocation) { uint32_t offset = ir.increase_bound_by(3); uint32_t type_id = offset; uint32_t type_ptr_id = offset + 1; uint32_t var_id = offset + 2; // Create gl_HelperInvocation. SPIRType bool_type { OpTypeBool }; bool_type.basetype = SPIRType::Boolean; bool_type.width = 8; bool_type.vecsize = 1; set(type_id, bool_type); SPIRType bool_type_ptr_in = bool_type; bool_type_ptr_in.op = spv::OpTypePointer; bool_type_ptr_in.pointer = true; bool_type_ptr_in.pointer_depth++; bool_type_ptr_in.parent_type = type_id; bool_type_ptr_in.storage = StorageClassInput; auto &ptr_in_type = set(type_ptr_id, bool_type_ptr_in); ptr_in_type.self = type_id; set(var_id, type_ptr_id, StorageClassInput); set_decoration(var_id, DecorationBuiltIn, BuiltInHelperInvocation); builtin_helper_invocation_id = var_id; mark_implicit_builtin(StorageClassInput, BuiltInHelperInvocation, var_id); } if (need_local_invocation_index && !has_local_invocation_index) { uint32_t offset = ir.increase_bound_by(2); uint32_t type_ptr_id = offset; uint32_t var_id = offset + 1; // Create gl_LocalInvocationIndex. SPIRType uint_type_ptr = get_uint_type(); uint_type_ptr.op = OpTypePointer; uint_type_ptr.pointer = true; uint_type_ptr.pointer_depth++; uint_type_ptr.parent_type = get_uint_type_id(); uint_type_ptr.storage = StorageClassInput; auto &ptr_type = set(type_ptr_id, uint_type_ptr); ptr_type.self = get_uint_type_id(); set(var_id, type_ptr_id, StorageClassInput); set_decoration(var_id, DecorationBuiltIn, BuiltInLocalInvocationIndex); builtin_local_invocation_index_id = var_id; mark_implicit_builtin(StorageClassInput, BuiltInLocalInvocationIndex, var_id); } if (need_workgroup_size && !has_workgroup_size) { uint32_t offset = ir.increase_bound_by(2); uint32_t type_ptr_id = offset; uint32_t var_id = offset + 1; // Create gl_WorkgroupSize. uint32_t type_id = build_extended_vector_type(get_uint_type_id(), 3); SPIRType uint_type_ptr = get(type_id); uint_type_ptr.op = OpTypePointer; uint_type_ptr.pointer = true; uint_type_ptr.pointer_depth++; uint_type_ptr.parent_type = type_id; uint_type_ptr.storage = StorageClassInput; auto &ptr_type = set(type_ptr_id, uint_type_ptr); ptr_type.self = type_id; set(var_id, type_ptr_id, StorageClassInput); set_decoration(var_id, DecorationBuiltIn, BuiltInWorkgroupSize); builtin_workgroup_size_id = var_id; mark_implicit_builtin(StorageClassInput, BuiltInWorkgroupSize, var_id); } } if (needs_swizzle_buffer_def) { uint32_t var_id = build_constant_uint_array_pointer(); set_name(var_id, "spvSwizzleConstants"); // This should never match anything. set_decoration(var_id, DecorationDescriptorSet, kSwizzleBufferBinding); set_decoration(var_id, DecorationBinding, msl_options.swizzle_buffer_index); set_extended_decoration(var_id, SPIRVCrossDecorationResourceIndexPrimary, msl_options.swizzle_buffer_index); swizzle_buffer_id = var_id; } if (needs_buffer_size_buffer()) { uint32_t var_id = build_constant_uint_array_pointer(); set_name(var_id, "spvBufferSizeConstants"); // This should never match anything. set_decoration(var_id, DecorationDescriptorSet, kBufferSizeBufferBinding); set_decoration(var_id, DecorationBinding, msl_options.buffer_size_buffer_index); set_extended_decoration(var_id, SPIRVCrossDecorationResourceIndexPrimary, msl_options.buffer_size_buffer_index); buffer_size_buffer_id = var_id; } if (needs_view_mask_buffer()) { uint32_t var_id = build_constant_uint_array_pointer(); set_name(var_id, "spvViewMask"); // This should never match anything. set_decoration(var_id, DecorationDescriptorSet, ~(4u)); set_decoration(var_id, DecorationBinding, msl_options.view_mask_buffer_index); set_extended_decoration(var_id, SPIRVCrossDecorationResourceIndexPrimary, msl_options.view_mask_buffer_index); view_mask_buffer_id = var_id; } if (!buffers_requiring_dynamic_offset.empty()) { uint32_t var_id = build_constant_uint_array_pointer(); set_name(var_id, "spvDynamicOffsets"); // This should never match anything. set_decoration(var_id, DecorationDescriptorSet, ~(5u)); set_decoration(var_id, DecorationBinding, msl_options.dynamic_offsets_buffer_index); set_extended_decoration(var_id, SPIRVCrossDecorationResourceIndexPrimary, msl_options.dynamic_offsets_buffer_index); dynamic_offsets_buffer_id = var_id; } // If we're returning a struct from a vertex-like entry point, we must return a position attribute. bool need_position = (get_execution_model() == ExecutionModelVertex || is_tese_shader()) && !capture_output_to_buffer && !get_is_rasterization_disabled() && !active_output_builtins.get(BuiltInPosition); if (need_position) { // If we can get away with returning void from entry point, we don't need to care. // If there is at least one other stage output, we need to return [[position]], // so we need to create one if it doesn't appear in the SPIR-V. Before adding the // implicit variable, check if it actually exists already, but just has not been used // or initialized, and if so, mark it as active, and do not create the implicit variable. bool has_output = false; ir.for_each_typed_id([&](uint32_t, SPIRVariable &var) { if (var.storage == StorageClassOutput && interface_variable_exists_in_entry_point(var.self)) { has_output = true; // Check if the var is the Position builtin if (has_decoration(var.self, DecorationBuiltIn) && get_decoration(var.self, DecorationBuiltIn) == BuiltInPosition) active_output_builtins.set(BuiltInPosition); // If the var is a struct, check if any members is the Position builtin auto &var_type = get_variable_element_type(var); if (var_type.basetype == SPIRType::Struct) { auto mbr_cnt = var_type.member_types.size(); for (uint32_t mbr_idx = 0; mbr_idx < mbr_cnt; mbr_idx++) { auto builtin = BuiltInMax; bool is_builtin = is_member_builtin(var_type, mbr_idx, &builtin); if (is_builtin && builtin == BuiltInPosition) active_output_builtins.set(BuiltInPosition); } } } }); need_position = has_output && !active_output_builtins.get(BuiltInPosition); } if (need_position) { uint32_t offset = ir.increase_bound_by(3); uint32_t type_id = offset; uint32_t type_ptr_id = offset + 1; uint32_t var_id = offset + 2; // Create gl_Position. SPIRType vec4_type { OpTypeVector }; vec4_type.basetype = SPIRType::Float; vec4_type.width = 32; vec4_type.vecsize = 4; set(type_id, vec4_type); SPIRType vec4_type_ptr = vec4_type; vec4_type_ptr.op = OpTypePointer; vec4_type_ptr.pointer = true; vec4_type_ptr.pointer_depth++; vec4_type_ptr.parent_type = type_id; vec4_type_ptr.storage = StorageClassOutput; auto &ptr_type = set(type_ptr_id, vec4_type_ptr); ptr_type.self = type_id; set(var_id, type_ptr_id, StorageClassOutput); set_decoration(var_id, DecorationBuiltIn, BuiltInPosition); mark_implicit_builtin(StorageClassOutput, BuiltInPosition, var_id); } } // Checks if the specified builtin variable (e.g. gl_InstanceIndex) is marked as active. // If not, it marks it as active and forces a recompilation. // This might be used when the optimization of inactive builtins was too optimistic (e.g. when "spvOut" is emitted). void CompilerMSL::ensure_builtin(spv::StorageClass storage, spv::BuiltIn builtin) { Bitset *active_builtins = nullptr; switch (storage) { case StorageClassInput: active_builtins = &active_input_builtins; break; case StorageClassOutput: active_builtins = &active_output_builtins; break; default: break; } // At this point, the specified builtin variable must have already been declared in the entry point. // If not, mark as active and force recompile. if (active_builtins != nullptr && !active_builtins->get(builtin)) { active_builtins->set(builtin); force_recompile(); } } void CompilerMSL::mark_implicit_builtin(StorageClass storage, BuiltIn builtin, uint32_t id) { Bitset *active_builtins = nullptr; switch (storage) { case StorageClassInput: active_builtins = &active_input_builtins; break; case StorageClassOutput: active_builtins = &active_output_builtins; break; default: break; } assert(active_builtins != nullptr); active_builtins->set(builtin); auto &var = get_entry_point().interface_variables; if (find(begin(var), end(var), VariableID(id)) == end(var)) var.push_back(id); } uint32_t CompilerMSL::build_constant_uint_array_pointer() { uint32_t offset = ir.increase_bound_by(3); uint32_t type_ptr_id = offset; uint32_t type_ptr_ptr_id = offset + 1; uint32_t var_id = offset + 2; // Create a buffer to hold extra data, including the swizzle constants. SPIRType uint_type_pointer = get_uint_type(); uint_type_pointer.op = OpTypePointer; uint_type_pointer.pointer = true; uint_type_pointer.pointer_depth++; uint_type_pointer.parent_type = get_uint_type_id(); uint_type_pointer.storage = StorageClassUniform; set(type_ptr_id, uint_type_pointer); set_decoration(type_ptr_id, DecorationArrayStride, 4); SPIRType uint_type_pointer2 = uint_type_pointer; uint_type_pointer2.pointer_depth++; uint_type_pointer2.parent_type = type_ptr_id; set(type_ptr_ptr_id, uint_type_pointer2); set(var_id, type_ptr_ptr_id, StorageClassUniformConstant); return var_id; } static string create_sampler_address(const char *prefix, MSLSamplerAddress addr) { switch (addr) { case MSL_SAMPLER_ADDRESS_CLAMP_TO_EDGE: return join(prefix, "address::clamp_to_edge"); case MSL_SAMPLER_ADDRESS_CLAMP_TO_ZERO: return join(prefix, "address::clamp_to_zero"); case MSL_SAMPLER_ADDRESS_CLAMP_TO_BORDER: return join(prefix, "address::clamp_to_border"); case MSL_SAMPLER_ADDRESS_REPEAT: return join(prefix, "address::repeat"); case MSL_SAMPLER_ADDRESS_MIRRORED_REPEAT: return join(prefix, "address::mirrored_repeat"); default: SPIRV_CROSS_THROW("Invalid sampler addressing mode."); } } SPIRType &CompilerMSL::get_stage_in_struct_type() { auto &si_var = get(stage_in_var_id); return get_variable_data_type(si_var); } SPIRType &CompilerMSL::get_stage_out_struct_type() { auto &so_var = get(stage_out_var_id); return get_variable_data_type(so_var); } SPIRType &CompilerMSL::get_patch_stage_in_struct_type() { auto &si_var = get(patch_stage_in_var_id); return get_variable_data_type(si_var); } SPIRType &CompilerMSL::get_patch_stage_out_struct_type() { auto &so_var = get(patch_stage_out_var_id); return get_variable_data_type(so_var); } std::string CompilerMSL::get_tess_factor_struct_name() { if (is_tessellating_triangles()) return "MTLTriangleTessellationFactorsHalf"; return "MTLQuadTessellationFactorsHalf"; } SPIRType &CompilerMSL::get_uint_type() { return get(get_uint_type_id()); } uint32_t CompilerMSL::get_uint_type_id() { if (uint_type_id != 0) return uint_type_id; uint_type_id = ir.increase_bound_by(1); SPIRType type { OpTypeInt }; type.basetype = SPIRType::UInt; type.width = 32; set(uint_type_id, type); return uint_type_id; } void CompilerMSL::emit_entry_point_declarations() { // FIXME: Get test coverage here ... // Constant arrays of non-primitive types (i.e. matrices) won't link properly into Metal libraries declare_complex_constant_arrays(); // Emit constexpr samplers here. for (auto &samp : constexpr_samplers_by_id) { auto &var = get(samp.first); auto &type = get(var.basetype); if (type.basetype == SPIRType::Sampler) add_resource_name(samp.first); SmallVector args; auto &s = samp.second; if (s.coord != MSL_SAMPLER_COORD_NORMALIZED) args.push_back("coord::pixel"); if (s.min_filter == s.mag_filter) { if (s.min_filter != MSL_SAMPLER_FILTER_NEAREST) args.push_back("filter::linear"); } else { if (s.min_filter != MSL_SAMPLER_FILTER_NEAREST) args.push_back("min_filter::linear"); if (s.mag_filter != MSL_SAMPLER_FILTER_NEAREST) args.push_back("mag_filter::linear"); } switch (s.mip_filter) { case MSL_SAMPLER_MIP_FILTER_NONE: // Default break; case MSL_SAMPLER_MIP_FILTER_NEAREST: args.push_back("mip_filter::nearest"); break; case MSL_SAMPLER_MIP_FILTER_LINEAR: args.push_back("mip_filter::linear"); break; default: SPIRV_CROSS_THROW("Invalid mip filter."); } if (s.s_address == s.t_address && s.s_address == s.r_address) { if (s.s_address != MSL_SAMPLER_ADDRESS_CLAMP_TO_EDGE) args.push_back(create_sampler_address("", s.s_address)); } else { if (s.s_address != MSL_SAMPLER_ADDRESS_CLAMP_TO_EDGE) args.push_back(create_sampler_address("s_", s.s_address)); if (s.t_address != MSL_SAMPLER_ADDRESS_CLAMP_TO_EDGE) args.push_back(create_sampler_address("t_", s.t_address)); if (s.r_address != MSL_SAMPLER_ADDRESS_CLAMP_TO_EDGE) args.push_back(create_sampler_address("r_", s.r_address)); } if (s.compare_enable) { switch (s.compare_func) { case MSL_SAMPLER_COMPARE_FUNC_ALWAYS: args.push_back("compare_func::always"); break; case MSL_SAMPLER_COMPARE_FUNC_NEVER: args.push_back("compare_func::never"); break; case MSL_SAMPLER_COMPARE_FUNC_EQUAL: args.push_back("compare_func::equal"); break; case MSL_SAMPLER_COMPARE_FUNC_NOT_EQUAL: args.push_back("compare_func::not_equal"); break; case MSL_SAMPLER_COMPARE_FUNC_LESS: args.push_back("compare_func::less"); break; case MSL_SAMPLER_COMPARE_FUNC_LESS_EQUAL: args.push_back("compare_func::less_equal"); break; case MSL_SAMPLER_COMPARE_FUNC_GREATER: args.push_back("compare_func::greater"); break; case MSL_SAMPLER_COMPARE_FUNC_GREATER_EQUAL: args.push_back("compare_func::greater_equal"); break; default: SPIRV_CROSS_THROW("Invalid sampler compare function."); } } if (s.s_address == MSL_SAMPLER_ADDRESS_CLAMP_TO_BORDER || s.t_address == MSL_SAMPLER_ADDRESS_CLAMP_TO_BORDER || s.r_address == MSL_SAMPLER_ADDRESS_CLAMP_TO_BORDER) { switch (s.border_color) { case MSL_SAMPLER_BORDER_COLOR_OPAQUE_BLACK: args.push_back("border_color::opaque_black"); break; case MSL_SAMPLER_BORDER_COLOR_OPAQUE_WHITE: args.push_back("border_color::opaque_white"); break; case MSL_SAMPLER_BORDER_COLOR_TRANSPARENT_BLACK: args.push_back("border_color::transparent_black"); break; default: SPIRV_CROSS_THROW("Invalid sampler border color."); } } if (s.anisotropy_enable) args.push_back(join("max_anisotropy(", s.max_anisotropy, ")")); if (s.lod_clamp_enable) { args.push_back(join("lod_clamp(", format_float(s.lod_clamp_min), ", ", format_float(s.lod_clamp_max), ")")); } // If we would emit no arguments, then omit the parentheses entirely. Otherwise, // we'll wind up with a "most vexing parse" situation. if (args.empty()) statement("constexpr sampler ", type.basetype == SPIRType::SampledImage ? to_sampler_expression(samp.first) : to_name(samp.first), ";"); else statement("constexpr sampler ", type.basetype == SPIRType::SampledImage ? to_sampler_expression(samp.first) : to_name(samp.first), "(", merge(args), ");"); } // Emit dynamic buffers here. for (auto &dynamic_buffer : buffers_requiring_dynamic_offset) { if (!dynamic_buffer.second.second) { // Could happen if no buffer was used at requested binding point. continue; } const auto &var = get(dynamic_buffer.second.second); uint32_t var_id = var.self; const auto &type = get_variable_data_type(var); string name = to_name(var.self); uint32_t desc_set = get_decoration(var.self, DecorationDescriptorSet); uint32_t arg_id = argument_buffer_ids[desc_set]; uint32_t base_index = dynamic_buffer.second.first; if (!type.array.empty()) { // This is complicated, because we need to support arrays of arrays. // And it's even worse if the outermost dimension is a runtime array, because now // all this complicated goop has to go into the shader itself. (FIXME) if (!type.array[type.array.size() - 1]) SPIRV_CROSS_THROW("Runtime arrays with dynamic offsets are not supported yet."); else { is_using_builtin_array = true; statement(get_argument_address_space(var), " ", type_to_glsl(type), "* ", to_restrict(var_id, true), name, type_to_array_glsl(type), " ="); uint32_t dim = uint32_t(type.array.size()); uint32_t j = 0; for (SmallVector indices(type.array.size()); indices[type.array.size() - 1] < to_array_size_literal(type); j++) { while (dim > 0) { begin_scope(); --dim; } string arrays; for (uint32_t i = uint32_t(type.array.size()); i; --i) arrays += join("[", indices[i - 1], "]"); statement("(", get_argument_address_space(var), " ", type_to_glsl(type), "* ", to_restrict(var_id, false), ")((", get_argument_address_space(var), " char* ", to_restrict(var_id, false), ")", to_name(arg_id), ".", ensure_valid_name(name, "m"), arrays, " + ", to_name(dynamic_offsets_buffer_id), "[", base_index + j, "]),"); while (++indices[dim] >= to_array_size_literal(type, dim) && dim < type.array.size() - 1) { end_scope(","); indices[dim++] = 0; } } end_scope_decl(); statement_no_indent(""); is_using_builtin_array = false; } } else { statement(get_argument_address_space(var), " auto& ", to_restrict(var_id, true), name, " = *(", get_argument_address_space(var), " ", type_to_glsl(type), "* ", to_restrict(var_id, false), ")((", get_argument_address_space(var), " char* ", to_restrict(var_id, false), ")", to_name(arg_id), ".", ensure_valid_name(name, "m"), " + ", to_name(dynamic_offsets_buffer_id), "[", base_index, "]);"); } } bool has_runtime_array_declaration = false; for (SPIRVariable *arg : entry_point_bindings) { const auto &var = *arg; const auto &type = get_variable_data_type(var); const auto &buffer_type = get_variable_element_type(var); const string name = to_name(var.self); if (is_var_runtime_size_array(var)) { if (msl_options.argument_buffers_tier < Options::ArgumentBuffersTier::Tier2) { SPIRV_CROSS_THROW("Unsized array of descriptors requires argument buffer tier 2"); } switch (type.basetype) { case SPIRType::Image: case SPIRType::Sampler: case SPIRType::AccelerationStructure: statement("spvDescriptorArray<", type_to_glsl(buffer_type), "> ", name, " {", name, "_};"); break; case SPIRType::SampledImage: statement("spvDescriptorArray<", type_to_glsl(buffer_type), "> ", name, " {", name, "_};"); statement("spvDescriptorArray ", name, "Smplr {", name, "Smplr_};"); break; case SPIRType::Struct: statement("spvDescriptorArray<", get_argument_address_space(var), " ", type_to_glsl(buffer_type), "*> ", name, " {", name, "_};"); break; default: break; } has_runtime_array_declaration = true; } else if (!type.array.empty() && type.basetype == SPIRType::Struct) { // Emit only buffer arrays here. statement(get_argument_address_space(var), " ", type_to_glsl(buffer_type), "* ", to_restrict(var.self, true), name, "[] ="); begin_scope(); uint32_t array_size = get_resource_array_size(type, var.self); for (uint32_t i = 0; i < array_size; ++i) statement(name, "_", i, ","); end_scope_decl(); statement_no_indent(""); } } if (has_runtime_array_declaration) statement_no_indent(""); // Emit buffer aliases here. for (auto &var_id : buffer_aliases_discrete) { const auto &var = get(var_id); const auto &type = get_variable_data_type(var); auto addr_space = get_argument_address_space(var); auto name = to_name(var_id); uint32_t desc_set = get_decoration(var_id, DecorationDescriptorSet); uint32_t desc_binding = get_decoration(var_id, DecorationBinding); auto alias_name = join("spvBufferAliasSet", desc_set, "Binding", desc_binding); statement(addr_space, " auto& ", to_restrict(var_id, true), name, " = *(", addr_space, " ", type_to_glsl(type), "*)", alias_name, ";"); } // Discrete descriptors are processed in entry point emission every compiler iteration. buffer_aliases_discrete.clear(); for (auto &var_pair : buffer_aliases_argument) { uint32_t var_id = var_pair.first; uint32_t alias_id = var_pair.second; const auto &var = get(var_id); const auto &type = get_variable_data_type(var); auto addr_space = get_argument_address_space(var); if (type.array.empty()) { statement(addr_space, " auto& ", to_restrict(var_id, true), to_name(var_id), " = (", addr_space, " ", type_to_glsl(type), "&)", ir.meta[alias_id].decoration.qualified_alias, ";"); } else { const char *desc_addr_space = descriptor_address_space(var_id, var.storage, "thread"); // Esoteric type cast. Reference to array of pointers. // Auto here defers to UBO or SSBO. The address space of the reference needs to refer to the // address space of the argument buffer itself, which is usually constant, but can be const device for // large argument buffers. is_using_builtin_array = true; statement(desc_addr_space, " auto& ", to_restrict(var_id, true), to_name(var_id), " = (", addr_space, " ", type_to_glsl(type), "* ", desc_addr_space, " (&)", type_to_array_glsl(type), ")", ir.meta[alias_id].decoration.qualified_alias, ";"); is_using_builtin_array = false; } } // Emit disabled fragment outputs. std::sort(disabled_frag_outputs.begin(), disabled_frag_outputs.end()); for (uint32_t var_id : disabled_frag_outputs) { auto &var = get(var_id); add_local_variable_name(var_id); statement(CompilerGLSL::variable_decl(var), ";"); var.deferred_declaration = false; } } string CompilerMSL::compile() { replace_illegal_entry_point_names(); ir.fixup_reserved_names(); // Do not deal with GLES-isms like precision, older extensions and such. options.vulkan_semantics = true; options.es = false; options.version = 450; backend.null_pointer_literal = "nullptr"; backend.float_literal_suffix = false; backend.uint32_t_literal_suffix = true; backend.int16_t_literal_suffix = ""; backend.uint16_t_literal_suffix = ""; backend.basic_int_type = "int"; backend.basic_uint_type = "uint"; backend.basic_int8_type = "char"; backend.basic_uint8_type = "uchar"; backend.basic_int16_type = "short"; backend.basic_uint16_type = "ushort"; backend.boolean_mix_function = "select"; backend.swizzle_is_function = false; backend.shared_is_implied = false; backend.use_initializer_list = true; backend.use_typed_initializer_list = true; backend.native_row_major_matrix = false; backend.unsized_array_supported = false; backend.can_declare_arrays_inline = false; backend.allow_truncated_access_chain = true; backend.comparison_image_samples_scalar = true; backend.native_pointers = true; backend.nonuniform_qualifier = ""; backend.support_small_type_sampling_result = true; backend.supports_empty_struct = true; backend.support_64bit_switch = true; backend.boolean_in_struct_remapped_type = SPIRType::Short; // Allow Metal to use the array template unless we force it off. backend.can_return_array = !msl_options.force_native_arrays; backend.array_is_value_type = !msl_options.force_native_arrays; // Arrays which are part of buffer objects are never considered to be value types (just plain C-style). backend.array_is_value_type_in_buffer_blocks = false; backend.support_pointer_to_pointer = true; backend.implicit_c_integer_promotion_rules = true; capture_output_to_buffer = msl_options.capture_output_to_buffer; is_rasterization_disabled = msl_options.disable_rasterization || capture_output_to_buffer; // Initialize array here rather than constructor, MSVC 2013 workaround. for (auto &id : next_metal_resource_ids) id = 0; fixup_anonymous_struct_names(); fixup_type_alias(); replace_illegal_names(); sync_entry_point_aliases_and_names(); build_function_control_flow_graphs_and_analyze(); update_active_builtins(); analyze_image_and_sampler_usage(); analyze_sampled_image_usage(); analyze_interlocked_resource_usage(); preprocess_op_codes(); build_implicit_builtins(); if (needs_manual_helper_invocation_updates() && (active_input_builtins.get(BuiltInHelperInvocation) || needs_helper_invocation)) { string discard_expr = join(builtin_to_glsl(BuiltInHelperInvocation, StorageClassInput), " = true, discard_fragment()"); backend.discard_literal = discard_expr; backend.demote_literal = discard_expr; } else { backend.discard_literal = "discard_fragment()"; backend.demote_literal = "discard_fragment()"; } fixup_image_load_store_access(); set_enabled_interface_variables(get_active_interface_variables()); if (msl_options.force_active_argument_buffer_resources) activate_argument_buffer_resources(); if (swizzle_buffer_id) add_active_interface_variable(swizzle_buffer_id); if (buffer_size_buffer_id) add_active_interface_variable(buffer_size_buffer_id); if (view_mask_buffer_id) add_active_interface_variable(view_mask_buffer_id); if (dynamic_offsets_buffer_id) add_active_interface_variable(dynamic_offsets_buffer_id); if (builtin_layer_id) add_active_interface_variable(builtin_layer_id); if (builtin_dispatch_base_id && !msl_options.supports_msl_version(1, 2)) add_active_interface_variable(builtin_dispatch_base_id); if (builtin_sample_mask_id) add_active_interface_variable(builtin_sample_mask_id); // Create structs to hold input, output and uniform variables. // Do output first to ensure out. is declared at top of entry function. qual_pos_var_name = ""; stage_out_var_id = add_interface_block(StorageClassOutput); patch_stage_out_var_id = add_interface_block(StorageClassOutput, true); stage_in_var_id = add_interface_block(StorageClassInput); if (is_tese_shader()) patch_stage_in_var_id = add_interface_block(StorageClassInput, true); if (is_tesc_shader()) stage_out_ptr_var_id = add_interface_block_pointer(stage_out_var_id, StorageClassOutput); if (is_tessellation_shader()) stage_in_ptr_var_id = add_interface_block_pointer(stage_in_var_id, StorageClassInput); // Metal vertex functions that define no output must disable rasterization and return void. if (!stage_out_var_id) is_rasterization_disabled = true; // Convert the use of global variables to recursively-passed function parameters localize_global_variables(); extract_global_variables_from_functions(); // Mark any non-stage-in structs to be tightly packed. mark_packable_structs(); reorder_type_alias(); // Add fixup hooks required by shader inputs and outputs. This needs to happen before // the loop, so the hooks aren't added multiple times. fix_up_shader_inputs_outputs(); // If we are using argument buffers, we create argument buffer structures for them here. // These buffers will be used in the entry point, not the individual resources. if (msl_options.argument_buffers) { if (!msl_options.supports_msl_version(2, 0)) SPIRV_CROSS_THROW("Argument buffers can only be used with MSL 2.0 and up."); analyze_argument_buffers(); } uint32_t pass_count = 0; do { reset(pass_count); // Start bindings at zero. next_metal_resource_index_buffer = 0; next_metal_resource_index_texture = 0; next_metal_resource_index_sampler = 0; for (auto &id : next_metal_resource_ids) id = 0; // Move constructor for this type is broken on GCC 4.9 ... buffer.reset(); emit_header(); emit_custom_templates(); emit_custom_functions(); emit_specialization_constants_and_structs(); emit_resources(); emit_function(get(ir.default_entry_point), Bitset()); pass_count++; } while (is_forcing_recompilation()); return buffer.str(); } // Register the need to output any custom functions. void CompilerMSL::preprocess_op_codes() { OpCodePreprocessor preproc(*this); traverse_all_reachable_opcodes(get(ir.default_entry_point), preproc); suppress_missing_prototypes = preproc.suppress_missing_prototypes; if (preproc.uses_atomics) { add_header_line("#include "); add_pragma_line("#pragma clang diagnostic ignored \"-Wunused-variable\""); } // Before MSL 2.1 (2.2 for textures), Metal vertex functions that write to // resources must disable rasterization and return void. if ((preproc.uses_buffer_write && !msl_options.supports_msl_version(2, 1)) || (preproc.uses_image_write && !msl_options.supports_msl_version(2, 2))) is_rasterization_disabled = true; // Tessellation control shaders are run as compute functions in Metal, and so // must capture their output to a buffer. if (is_tesc_shader() || (get_execution_model() == ExecutionModelVertex && msl_options.vertex_for_tessellation)) { is_rasterization_disabled = true; capture_output_to_buffer = true; } if (preproc.needs_subgroup_invocation_id) needs_subgroup_invocation_id = true; if (preproc.needs_subgroup_size) needs_subgroup_size = true; // build_implicit_builtins() hasn't run yet, and in fact, this needs to execute // before then so that gl_SampleID will get added; so we also need to check if // that function would add gl_FragCoord. if (preproc.needs_sample_id || msl_options.force_sample_rate_shading || (is_sample_rate() && (active_input_builtins.get(BuiltInFragCoord) || (need_subpass_input_ms && !msl_options.use_framebuffer_fetch_subpasses)))) needs_sample_id = true; if (preproc.needs_helper_invocation) needs_helper_invocation = true; // OpKill is removed by the parser, so we need to identify those by inspecting // blocks. ir.for_each_typed_id([&preproc](uint32_t, SPIRBlock &block) { if (block.terminator == SPIRBlock::Kill) preproc.uses_discard = true; }); // Fragment shaders that both write to storage resources and discard fragments // need checks on the writes, to work around Metal allowing these writes despite // the fragment being dead. if (msl_options.check_discarded_frag_stores && preproc.uses_discard && (preproc.uses_buffer_write || preproc.uses_image_write)) { frag_shader_needs_discard_checks = true; needs_helper_invocation = true; // Fragment discard store checks imply manual HelperInvocation updates. msl_options.manual_helper_invocation_updates = true; } if (is_intersection_query()) { add_header_line("#if __METAL_VERSION__ >= 230"); add_header_line("#include "); add_header_line("using namespace metal::raytracing;"); add_header_line("#endif"); } } // Move the Private and Workgroup global variables to the entry function. // Non-constant variables cannot have global scope in Metal. void CompilerMSL::localize_global_variables() { auto &entry_func = get(ir.default_entry_point); auto iter = global_variables.begin(); while (iter != global_variables.end()) { uint32_t v_id = *iter; auto &var = get(v_id); if (var.storage == StorageClassPrivate || var.storage == StorageClassWorkgroup) { if (!variable_is_lut(var)) entry_func.add_local_variable(v_id); iter = global_variables.erase(iter); } else iter++; } } // For any global variable accessed directly by a function, // extract that variable and add it as an argument to that function. void CompilerMSL::extract_global_variables_from_functions() { // Uniforms unordered_set global_var_ids; ir.for_each_typed_id([&](uint32_t, SPIRVariable &var) { // Some builtins resolve directly to a function call which does not need any declared variables. // Skip these. if (var.storage == StorageClassInput && has_decoration(var.self, DecorationBuiltIn)) { auto bi_type = BuiltIn(get_decoration(var.self, DecorationBuiltIn)); if (bi_type == BuiltInHelperInvocation && !needs_manual_helper_invocation_updates()) return; if (bi_type == BuiltInHelperInvocation && needs_manual_helper_invocation_updates()) { if (msl_options.is_ios() && !msl_options.supports_msl_version(2, 3)) SPIRV_CROSS_THROW("simd_is_helper_thread() requires version 2.3 on iOS."); else if (msl_options.is_macos() && !msl_options.supports_msl_version(2, 1)) SPIRV_CROSS_THROW("simd_is_helper_thread() requires version 2.1 on macOS."); // Make sure this is declared and initialized. // Force this to have the proper name. set_name(var.self, builtin_to_glsl(BuiltInHelperInvocation, StorageClassInput)); auto &entry_func = this->get(ir.default_entry_point); entry_func.add_local_variable(var.self); vars_needing_early_declaration.push_back(var.self); entry_func.fixup_hooks_in.push_back([this, &var]() { statement(to_name(var.self), " = simd_is_helper_thread();"); }); } } if (var.storage == StorageClassInput || var.storage == StorageClassOutput || var.storage == StorageClassUniform || var.storage == StorageClassUniformConstant || var.storage == StorageClassPushConstant || var.storage == StorageClassStorageBuffer) { global_var_ids.insert(var.self); } }); // Local vars that are declared in the main function and accessed directly by a function auto &entry_func = get(ir.default_entry_point); for (auto &var : entry_func.local_variables) if (get(var).storage != StorageClassFunction) global_var_ids.insert(var); std::set added_arg_ids; unordered_set processed_func_ids; extract_global_variables_from_function(ir.default_entry_point, added_arg_ids, global_var_ids, processed_func_ids); } // MSL does not support the use of global variables for shader input content. // For any global variable accessed directly by the specified function, extract that variable, // add it as an argument to that function, and the arg to the added_arg_ids collection. void CompilerMSL::extract_global_variables_from_function(uint32_t func_id, std::set &added_arg_ids, unordered_set &global_var_ids, unordered_set &processed_func_ids) { // Avoid processing a function more than once if (processed_func_ids.find(func_id) != processed_func_ids.end()) { // Return function global variables added_arg_ids = function_global_vars[func_id]; return; } processed_func_ids.insert(func_id); auto &func = get(func_id); // Recursively establish global args added to functions on which we depend. for (auto block : func.blocks) { auto &b = get(block); for (auto &i : b.ops) { auto ops = stream(i); auto op = static_cast(i.op); switch (op) { case OpLoad: case OpInBoundsAccessChain: case OpAccessChain: case OpPtrAccessChain: case OpArrayLength: { uint32_t base_id = ops[2]; if (global_var_ids.find(base_id) != global_var_ids.end()) added_arg_ids.insert(base_id); // Use Metal's native frame-buffer fetch API for subpass inputs. auto &type = get(ops[0]); if (type.basetype == SPIRType::Image && type.image.dim == DimSubpassData && (!msl_options.use_framebuffer_fetch_subpasses)) { // Implicitly reads gl_FragCoord. assert(builtin_frag_coord_id != 0); added_arg_ids.insert(builtin_frag_coord_id); if (msl_options.multiview) { // Implicitly reads gl_ViewIndex. assert(builtin_view_idx_id != 0); added_arg_ids.insert(builtin_view_idx_id); } else if (msl_options.arrayed_subpass_input) { // Implicitly reads gl_Layer. assert(builtin_layer_id != 0); added_arg_ids.insert(builtin_layer_id); } } break; } case OpFunctionCall: { // First see if any of the function call args are globals for (uint32_t arg_idx = 3; arg_idx < i.length; arg_idx++) { uint32_t arg_id = ops[arg_idx]; if (global_var_ids.find(arg_id) != global_var_ids.end()) added_arg_ids.insert(arg_id); } // Then recurse into the function itself to extract globals used internally in the function uint32_t inner_func_id = ops[2]; std::set inner_func_args; extract_global_variables_from_function(inner_func_id, inner_func_args, global_var_ids, processed_func_ids); added_arg_ids.insert(inner_func_args.begin(), inner_func_args.end()); break; } case OpStore: { uint32_t base_id = ops[0]; if (global_var_ids.find(base_id) != global_var_ids.end()) added_arg_ids.insert(base_id); uint32_t rvalue_id = ops[1]; if (global_var_ids.find(rvalue_id) != global_var_ids.end()) added_arg_ids.insert(rvalue_id); if (needs_frag_discard_checks()) added_arg_ids.insert(builtin_helper_invocation_id); break; } case OpSelect: { uint32_t base_id = ops[3]; if (global_var_ids.find(base_id) != global_var_ids.end()) added_arg_ids.insert(base_id); base_id = ops[4]; if (global_var_ids.find(base_id) != global_var_ids.end()) added_arg_ids.insert(base_id); break; } case OpAtomicExchange: case OpAtomicCompareExchange: case OpAtomicStore: case OpAtomicIIncrement: case OpAtomicIDecrement: case OpAtomicIAdd: case OpAtomicFAddEXT: case OpAtomicISub: case OpAtomicSMin: case OpAtomicUMin: case OpAtomicSMax: case OpAtomicUMax: case OpAtomicAnd: case OpAtomicOr: case OpAtomicXor: case OpImageWrite: { if (needs_frag_discard_checks()) added_arg_ids.insert(builtin_helper_invocation_id); uint32_t ptr = 0; if (op == OpAtomicStore || op == OpImageWrite) ptr = ops[0]; else ptr = ops[2]; if (global_var_ids.find(ptr) != global_var_ids.end()) added_arg_ids.insert(ptr); break; } // Emulate texture2D atomic operations case OpImageTexelPointer: { // When using the pointer, we need to know which variable it is actually loaded from. uint32_t base_id = ops[2]; auto *var = maybe_get_backing_variable(base_id); if (var && atomic_image_vars_emulated.count(var->self)) { if (!get(var->basetype).array.empty()) SPIRV_CROSS_THROW("Cannot emulate array of storage images with atomics. Use MSL 3.1 for native support."); if (global_var_ids.find(base_id) != global_var_ids.end()) added_arg_ids.insert(base_id); } break; } case OpExtInst: { uint32_t extension_set = ops[2]; if (get(extension_set).ext == SPIRExtension::GLSL) { auto op_450 = static_cast(ops[3]); switch (op_450) { case GLSLstd450InterpolateAtCentroid: case GLSLstd450InterpolateAtSample: case GLSLstd450InterpolateAtOffset: { // For these, we really need the stage-in block. It is theoretically possible to pass the // interpolant object, but a) doing so would require us to create an entirely new variable // with Interpolant type, and b) if we have a struct or array, handling all the members and // elements could get unwieldy fast. added_arg_ids.insert(stage_in_var_id); break; } case GLSLstd450Modf: case GLSLstd450Frexp: { uint32_t base_id = ops[5]; if (global_var_ids.find(base_id) != global_var_ids.end()) added_arg_ids.insert(base_id); break; } default: break; } } break; } case OpGroupNonUniformInverseBallot: { added_arg_ids.insert(builtin_subgroup_invocation_id_id); break; } case OpGroupNonUniformBallotFindLSB: case OpGroupNonUniformBallotFindMSB: { added_arg_ids.insert(builtin_subgroup_size_id); break; } case OpGroupNonUniformBallotBitCount: { auto operation = static_cast(ops[3]); switch (operation) { case GroupOperationReduce: added_arg_ids.insert(builtin_subgroup_size_id); break; case GroupOperationInclusiveScan: case GroupOperationExclusiveScan: added_arg_ids.insert(builtin_subgroup_invocation_id_id); break; default: break; } break; } case OpDemoteToHelperInvocation: if (needs_manual_helper_invocation_updates() && (active_input_builtins.get(BuiltInHelperInvocation) || needs_helper_invocation)) added_arg_ids.insert(builtin_helper_invocation_id); break; case OpIsHelperInvocationEXT: if (needs_manual_helper_invocation_updates()) added_arg_ids.insert(builtin_helper_invocation_id); break; case OpRayQueryInitializeKHR: case OpRayQueryProceedKHR: case OpRayQueryTerminateKHR: case OpRayQueryGenerateIntersectionKHR: case OpRayQueryConfirmIntersectionKHR: { // Ray query accesses memory directly, need check pass down object if using Private storage class. uint32_t base_id = ops[0]; if (global_var_ids.find(base_id) != global_var_ids.end()) added_arg_ids.insert(base_id); break; } case OpRayQueryGetRayTMinKHR: case OpRayQueryGetRayFlagsKHR: case OpRayQueryGetWorldRayOriginKHR: case OpRayQueryGetWorldRayDirectionKHR: case OpRayQueryGetIntersectionCandidateAABBOpaqueKHR: case OpRayQueryGetIntersectionTypeKHR: case OpRayQueryGetIntersectionTKHR: case OpRayQueryGetIntersectionInstanceCustomIndexKHR: case OpRayQueryGetIntersectionInstanceIdKHR: case OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR: case OpRayQueryGetIntersectionGeometryIndexKHR: case OpRayQueryGetIntersectionPrimitiveIndexKHR: case OpRayQueryGetIntersectionBarycentricsKHR: case OpRayQueryGetIntersectionFrontFaceKHR: case OpRayQueryGetIntersectionObjectRayDirectionKHR: case OpRayQueryGetIntersectionObjectRayOriginKHR: case OpRayQueryGetIntersectionObjectToWorldKHR: case OpRayQueryGetIntersectionWorldToObjectKHR: { // Ray query accesses memory directly, need check pass down object if using Private storage class. uint32_t base_id = ops[2]; if (global_var_ids.find(base_id) != global_var_ids.end()) added_arg_ids.insert(base_id); break; } default: break; } if (needs_manual_helper_invocation_updates() && b.terminator == SPIRBlock::Kill && (active_input_builtins.get(BuiltInHelperInvocation) || needs_helper_invocation)) added_arg_ids.insert(builtin_helper_invocation_id); // TODO: Add all other operations which can affect memory. // We should consider a more unified system here to reduce boiler-plate. // This kind of analysis is done in several places ... } } function_global_vars[func_id] = added_arg_ids; // Add the global variables as arguments to the function if (func_id != ir.default_entry_point) { bool control_point_added_in = false; bool control_point_added_out = false; bool patch_added_in = false; bool patch_added_out = false; for (uint32_t arg_id : added_arg_ids) { auto &var = get(arg_id); uint32_t type_id = var.basetype; auto *p_type = &get(type_id); BuiltIn bi_type = BuiltIn(get_decoration(arg_id, DecorationBuiltIn)); bool is_patch = has_decoration(arg_id, DecorationPatch) || is_patch_block(*p_type); bool is_block = has_decoration(p_type->self, DecorationBlock); bool is_control_point_storage = !is_patch && ((is_tessellation_shader() && var.storage == StorageClassInput) || (is_tesc_shader() && var.storage == StorageClassOutput)); bool is_patch_block_storage = is_patch && is_block && var.storage == StorageClassOutput; bool is_builtin = is_builtin_variable(var); bool variable_is_stage_io = !is_builtin || bi_type == BuiltInPosition || bi_type == BuiltInPointSize || bi_type == BuiltInClipDistance || bi_type == BuiltInCullDistance || p_type->basetype == SPIRType::Struct; bool is_redirected_to_global_stage_io = (is_control_point_storage || is_patch_block_storage) && variable_is_stage_io; // If output is masked it is not considered part of the global stage IO interface. if (is_redirected_to_global_stage_io && var.storage == StorageClassOutput) is_redirected_to_global_stage_io = !is_stage_output_variable_masked(var); if (is_redirected_to_global_stage_io) { // Tessellation control shaders see inputs and per-point outputs as arrays. // Similarly, tessellation evaluation shaders see per-point inputs as arrays. // We collected them into a structure; we must pass the array of this // structure to the function. std::string name; if (is_patch) name = var.storage == StorageClassInput ? patch_stage_in_var_name : patch_stage_out_var_name; else name = var.storage == StorageClassInput ? "gl_in" : "gl_out"; if (var.storage == StorageClassOutput && has_decoration(p_type->self, DecorationBlock)) { // If we're redirecting a block, we might still need to access the original block // variable if we're masking some members. for (uint32_t mbr_idx = 0; mbr_idx < uint32_t(p_type->member_types.size()); mbr_idx++) { if (is_stage_output_block_member_masked(var, mbr_idx, true)) { func.add_parameter(var.basetype, var.self, true); break; } } } if (var.storage == StorageClassInput) { auto &added_in = is_patch ? patch_added_in : control_point_added_in; if (added_in) continue; arg_id = is_patch ? patch_stage_in_var_id : stage_in_ptr_var_id; added_in = true; } else if (var.storage == StorageClassOutput) { auto &added_out = is_patch ? patch_added_out : control_point_added_out; if (added_out) continue; arg_id = is_patch ? patch_stage_out_var_id : stage_out_ptr_var_id; added_out = true; } type_id = get(arg_id).basetype; uint32_t next_id = ir.increase_bound_by(1); func.add_parameter(type_id, next_id, true); set(next_id, type_id, StorageClassFunction, 0, arg_id); set_name(next_id, name); if (is_tese_shader() && msl_options.raw_buffer_tese_input && var.storage == StorageClassInput) set_decoration(next_id, DecorationNonWritable); } else if (is_builtin && has_decoration(p_type->self, DecorationBlock)) { // Get the pointee type type_id = get_pointee_type_id(type_id); p_type = &get(type_id); uint32_t mbr_idx = 0; for (auto &mbr_type_id : p_type->member_types) { BuiltIn builtin = BuiltInMax; is_builtin = is_member_builtin(*p_type, mbr_idx, &builtin); if (is_builtin && has_active_builtin(builtin, var.storage)) { // Add a arg variable with the same type and decorations as the member uint32_t next_ids = ir.increase_bound_by(2); uint32_t ptr_type_id = next_ids + 0; uint32_t var_id = next_ids + 1; // Make sure we have an actual pointer type, // so that we will get the appropriate address space when declaring these builtins. auto &ptr = set(ptr_type_id, get(mbr_type_id)); ptr.self = mbr_type_id; ptr.storage = var.storage; ptr.pointer = true; ptr.pointer_depth++; ptr.parent_type = mbr_type_id; func.add_parameter(mbr_type_id, var_id, true); set(var_id, ptr_type_id, StorageClassFunction); ir.meta[var_id].decoration = ir.meta[type_id].members[mbr_idx]; } mbr_idx++; } } else { uint32_t next_id = ir.increase_bound_by(1); func.add_parameter(type_id, next_id, true); set(next_id, type_id, StorageClassFunction, 0, arg_id); // Ensure the new variable has all the same meta info ir.meta[next_id] = ir.meta[arg_id]; } } } } // For all variables that are some form of non-input-output interface block, mark that all the structs // that are recursively contained within the type referenced by that variable should be packed tightly. void CompilerMSL::mark_packable_structs() { ir.for_each_typed_id([&](uint32_t, SPIRVariable &var) { if (var.storage != StorageClassFunction && !is_hidden_variable(var)) { auto &type = this->get(var.basetype); if (type.pointer && (type.storage == StorageClassUniform || type.storage == StorageClassUniformConstant || type.storage == StorageClassPushConstant || type.storage == StorageClassStorageBuffer) && (has_decoration(type.self, DecorationBlock) || has_decoration(type.self, DecorationBufferBlock))) mark_as_packable(type); } if (var.storage == StorageClassWorkgroup) { auto *type = &this->get(var.basetype); if (type->basetype == SPIRType::Struct) mark_as_workgroup_struct(*type); } }); // Physical storage buffer pointers can appear outside of the context of a variable, if the address // is calculated from a ulong or uvec2 and cast to a pointer, so check if they need to be packed too. ir.for_each_typed_id([&](uint32_t, SPIRType &type) { if (type.basetype == SPIRType::Struct && type.pointer && type.storage == StorageClassPhysicalStorageBuffer) mark_as_packable(type); }); } // If the specified type is a struct, it and any nested structs // are marked as packable with the SPIRVCrossDecorationBufferBlockRepacked decoration, void CompilerMSL::mark_as_packable(SPIRType &type) { // If this is not the base type (eg. it's a pointer or array), tunnel down if (type.parent_type) { mark_as_packable(get(type.parent_type)); return; } // Handle possible recursion when a struct contains a pointer to its own type nested somewhere. if (type.basetype == SPIRType::Struct && !has_extended_decoration(type.self, SPIRVCrossDecorationBufferBlockRepacked)) { set_extended_decoration(type.self, SPIRVCrossDecorationBufferBlockRepacked); // Recurse uint32_t mbr_cnt = uint32_t(type.member_types.size()); for (uint32_t mbr_idx = 0; mbr_idx < mbr_cnt; mbr_idx++) { uint32_t mbr_type_id = type.member_types[mbr_idx]; auto &mbr_type = get(mbr_type_id); mark_as_packable(mbr_type); if (mbr_type.type_alias) { auto &mbr_type_alias = get(mbr_type.type_alias); mark_as_packable(mbr_type_alias); } } } } // If the specified type is a struct, it and any nested structs // are marked as used with workgroup storage using the SPIRVCrossDecorationWorkgroupStruct decoration. void CompilerMSL::mark_as_workgroup_struct(SPIRType &type) { // If this is not the base type (eg. it's a pointer or array), tunnel down if (type.parent_type) { mark_as_workgroup_struct(get(type.parent_type)); return; } // Handle possible recursion when a struct contains a pointer to its own type nested somewhere. if (type.basetype == SPIRType::Struct && !has_extended_decoration(type.self, SPIRVCrossDecorationWorkgroupStruct)) { set_extended_decoration(type.self, SPIRVCrossDecorationWorkgroupStruct); // Recurse uint32_t mbr_cnt = uint32_t(type.member_types.size()); for (uint32_t mbr_idx = 0; mbr_idx < mbr_cnt; mbr_idx++) { uint32_t mbr_type_id = type.member_types[mbr_idx]; auto &mbr_type = get(mbr_type_id); mark_as_workgroup_struct(mbr_type); if (mbr_type.type_alias) { auto &mbr_type_alias = get(mbr_type.type_alias); mark_as_workgroup_struct(mbr_type_alias); } } } } // If a shader input exists at the location, it is marked as being used by this shader void CompilerMSL::mark_location_as_used_by_shader(uint32_t location, const SPIRType &type, StorageClass storage, bool fallback) { uint32_t count = type_to_location_count(type); switch (storage) { case StorageClassInput: for (uint32_t i = 0; i < count; i++) { location_inputs_in_use.insert(location + i); if (fallback) location_inputs_in_use_fallback.insert(location + i); } break; case StorageClassOutput: for (uint32_t i = 0; i < count; i++) { location_outputs_in_use.insert(location + i); if (fallback) location_outputs_in_use_fallback.insert(location + i); } break; default: return; } } uint32_t CompilerMSL::get_target_components_for_fragment_location(uint32_t location) const { auto itr = fragment_output_components.find(location); if (itr == end(fragment_output_components)) return 4; else return itr->second; } uint32_t CompilerMSL::build_extended_vector_type(uint32_t type_id, uint32_t components, SPIRType::BaseType basetype) { assert(components > 1); uint32_t new_type_id = ir.increase_bound_by(1); const auto *p_old_type = &get(type_id); const SPIRType *old_ptr_t = nullptr; const SPIRType *old_array_t = nullptr; if (is_pointer(*p_old_type)) { old_ptr_t = p_old_type; p_old_type = &get_pointee_type(*old_ptr_t); } if (is_array(*p_old_type)) { old_array_t = p_old_type; p_old_type = &get_type(old_array_t->parent_type); } auto *type = &set(new_type_id, *p_old_type); assert(is_scalar(*type) || is_vector(*type)); type->op = OpTypeVector; type->vecsize = components; if (basetype != SPIRType::Unknown) type->basetype = basetype; type->self = new_type_id; type->parent_type = type_id; type->array.clear(); type->array_size_literal.clear(); type->pointer = false; if (old_array_t) { uint32_t array_type_id = ir.increase_bound_by(1); type = &set(array_type_id, *type); type->op = OpTypeArray; type->parent_type = new_type_id; type->array = old_array_t->array; type->array_size_literal = old_array_t->array_size_literal; new_type_id = array_type_id; } if (old_ptr_t) { uint32_t ptr_type_id = ir.increase_bound_by(1); type = &set(ptr_type_id, *type); type->op = OpTypePointer; type->parent_type = new_type_id; type->storage = old_ptr_t->storage; type->pointer = true; type->pointer_depth++; new_type_id = ptr_type_id; } return new_type_id; } uint32_t CompilerMSL::build_msl_interpolant_type(uint32_t type_id, bool is_noperspective) { uint32_t new_type_id = ir.increase_bound_by(1); SPIRType &type = set(new_type_id, get(type_id)); type.basetype = SPIRType::Interpolant; type.parent_type = type_id; // In Metal, the pull-model interpolant type encodes perspective-vs-no-perspective in the type itself. // Add this decoration so we know which argument to pass to the template. if (is_noperspective) set_decoration(new_type_id, DecorationNoPerspective); return new_type_id; } bool CompilerMSL::add_component_variable_to_interface_block(spv::StorageClass storage, const std::string &ib_var_ref, SPIRVariable &var, const SPIRType &type, InterfaceBlockMeta &meta) { // Deal with Component decorations. const InterfaceBlockMeta::LocationMeta *location_meta = nullptr; uint32_t location = ~0u; if (has_decoration(var.self, DecorationLocation)) { location = get_decoration(var.self, DecorationLocation); auto location_meta_itr = meta.location_meta.find(location); if (location_meta_itr != end(meta.location_meta)) location_meta = &location_meta_itr->second; } // Check if we need to pad fragment output to match a certain number of components. if (location_meta) { bool pad_fragment_output = has_decoration(var.self, DecorationLocation) && msl_options.pad_fragment_output_components && get_entry_point().model == ExecutionModelFragment && storage == StorageClassOutput; auto &entry_func = get(ir.default_entry_point); uint32_t start_component = get_decoration(var.self, DecorationComponent); uint32_t type_components = type.vecsize; uint32_t num_components = location_meta->num_components; if (pad_fragment_output) { uint32_t locn = get_decoration(var.self, DecorationLocation); num_components = max(num_components, get_target_components_for_fragment_location(locn)); } // We have already declared an IO block member as m_location_N. // Just emit an early-declared variable and fixup as needed. // Arrays need to be unrolled here since each location might need a different number of components. entry_func.add_local_variable(var.self); vars_needing_early_declaration.push_back(var.self); if (var.storage == StorageClassInput) { entry_func.fixup_hooks_in.push_back([=, &type, &var]() { if (!type.array.empty()) { uint32_t array_size = to_array_size_literal(type); for (uint32_t loc_off = 0; loc_off < array_size; loc_off++) { statement(to_name(var.self), "[", loc_off, "]", " = ", ib_var_ref, ".m_location_", location + loc_off, vector_swizzle(type_components, start_component), ";"); } } else { statement(to_name(var.self), " = ", ib_var_ref, ".m_location_", location, vector_swizzle(type_components, start_component), ";"); } }); } else { entry_func.fixup_hooks_out.push_back([=, &type, &var]() { if (!type.array.empty()) { uint32_t array_size = to_array_size_literal(type); for (uint32_t loc_off = 0; loc_off < array_size; loc_off++) { statement(ib_var_ref, ".m_location_", location + loc_off, vector_swizzle(type_components, start_component), " = ", to_name(var.self), "[", loc_off, "];"); } } else { statement(ib_var_ref, ".m_location_", location, vector_swizzle(type_components, start_component), " = ", to_name(var.self), ";"); } }); } return true; } else return false; } void CompilerMSL::add_plain_variable_to_interface_block(StorageClass storage, const string &ib_var_ref, SPIRType &ib_type, SPIRVariable &var, InterfaceBlockMeta &meta) { bool is_builtin = is_builtin_variable(var); BuiltIn builtin = BuiltIn(get_decoration(var.self, DecorationBuiltIn)); bool is_flat = has_decoration(var.self, DecorationFlat); bool is_noperspective = has_decoration(var.self, DecorationNoPerspective); bool is_centroid = has_decoration(var.self, DecorationCentroid); bool is_sample = has_decoration(var.self, DecorationSample); // Add a reference to the variable type to the interface struct. uint32_t ib_mbr_idx = uint32_t(ib_type.member_types.size()); uint32_t type_id = ensure_correct_builtin_type(var.basetype, builtin); var.basetype = type_id; type_id = get_pointee_type_id(var.basetype); if (meta.strip_array && is_array(get(type_id))) type_id = get(type_id).parent_type; auto &type = get(type_id); uint32_t target_components = 0; uint32_t type_components = type.vecsize; bool padded_output = false; bool padded_input = false; uint32_t start_component = 0; auto &entry_func = get(ir.default_entry_point); if (add_component_variable_to_interface_block(storage, ib_var_ref, var, type, meta)) return; bool pad_fragment_output = has_decoration(var.self, DecorationLocation) && msl_options.pad_fragment_output_components && get_entry_point().model == ExecutionModelFragment && storage == StorageClassOutput; if (pad_fragment_output) { uint32_t locn = get_decoration(var.self, DecorationLocation); target_components = get_target_components_for_fragment_location(locn); if (type_components < target_components) { // Make a new type here. type_id = build_extended_vector_type(type_id, target_components); padded_output = true; } } if (storage == StorageClassInput && pull_model_inputs.count(var.self)) ib_type.member_types.push_back(build_msl_interpolant_type(type_id, is_noperspective)); else ib_type.member_types.push_back(type_id); // Give the member a name string mbr_name = ensure_valid_name(to_expression(var.self), "m"); set_member_name(ib_type.self, ib_mbr_idx, mbr_name); // Update the original variable reference to include the structure reference string qual_var_name = ib_var_ref + "." + mbr_name; // If using pull-model interpolation, need to add a call to the correct interpolation method. if (storage == StorageClassInput && pull_model_inputs.count(var.self)) { if (is_centroid) qual_var_name += ".interpolate_at_centroid()"; else if (is_sample) qual_var_name += join(".interpolate_at_sample(", to_expression(builtin_sample_id_id), ")"); else qual_var_name += ".interpolate_at_center()"; } if (padded_output || padded_input) { entry_func.add_local_variable(var.self); vars_needing_early_declaration.push_back(var.self); if (padded_output) { entry_func.fixup_hooks_out.push_back([=, &var]() { statement(qual_var_name, vector_swizzle(type_components, start_component), " = ", to_name(var.self), ";"); }); } else { entry_func.fixup_hooks_in.push_back([=, &var]() { statement(to_name(var.self), " = ", qual_var_name, vector_swizzle(type_components, start_component), ";"); }); } } else if (!meta.strip_array) ir.meta[var.self].decoration.qualified_alias = qual_var_name; if (var.storage == StorageClassOutput && var.initializer != ID(0)) { if (padded_output || padded_input) { entry_func.fixup_hooks_in.push_back( [=, &var]() { statement(to_name(var.self), " = ", to_expression(var.initializer), ";"); }); } else { if (meta.strip_array) { entry_func.fixup_hooks_in.push_back([=, &var]() { uint32_t index = get_extended_decoration(var.self, SPIRVCrossDecorationInterfaceMemberIndex); auto invocation = to_tesc_invocation_id(); statement(to_expression(stage_out_ptr_var_id), "[", invocation, "].", to_member_name(ib_type, index), " = ", to_expression(var.initializer), "[", invocation, "];"); }); } else { entry_func.fixup_hooks_in.push_back([=, &var]() { statement(qual_var_name, " = ", to_expression(var.initializer), ";"); }); } } } // Copy the variable location from the original variable to the member if (get_decoration_bitset(var.self).get(DecorationLocation)) { uint32_t locn = get_decoration(var.self, DecorationLocation); uint32_t comp = get_decoration(var.self, DecorationComponent); if (storage == StorageClassInput) { type_id = ensure_correct_input_type(var.basetype, locn, comp, 0, meta.strip_array); var.basetype = type_id; type_id = get_pointee_type_id(type_id); if (meta.strip_array && is_array(get(type_id))) type_id = get(type_id).parent_type; if (pull_model_inputs.count(var.self)) ib_type.member_types[ib_mbr_idx] = build_msl_interpolant_type(type_id, is_noperspective); else ib_type.member_types[ib_mbr_idx] = type_id; } set_member_decoration(ib_type.self, ib_mbr_idx, DecorationLocation, locn); if (comp) set_member_decoration(ib_type.self, ib_mbr_idx, DecorationComponent, comp); mark_location_as_used_by_shader(locn, get(type_id), storage); } else if (is_builtin && is_tessellation_shader() && storage == StorageClassInput && inputs_by_builtin.count(builtin)) { uint32_t locn = inputs_by_builtin[builtin].location; set_member_decoration(ib_type.self, ib_mbr_idx, DecorationLocation, locn); mark_location_as_used_by_shader(locn, type, storage); } else if (is_builtin && capture_output_to_buffer && storage == StorageClassOutput && outputs_by_builtin.count(builtin)) { uint32_t locn = outputs_by_builtin[builtin].location; set_member_decoration(ib_type.self, ib_mbr_idx, DecorationLocation, locn); mark_location_as_used_by_shader(locn, type, storage); } if (get_decoration_bitset(var.self).get(DecorationComponent)) { uint32_t component = get_decoration(var.self, DecorationComponent); set_member_decoration(ib_type.self, ib_mbr_idx, DecorationComponent, component); } if (get_decoration_bitset(var.self).get(DecorationIndex)) { uint32_t index = get_decoration(var.self, DecorationIndex); set_member_decoration(ib_type.self, ib_mbr_idx, DecorationIndex, index); } // Mark the member as builtin if needed if (is_builtin) { set_member_decoration(ib_type.self, ib_mbr_idx, DecorationBuiltIn, builtin); if (builtin == BuiltInPosition && storage == StorageClassOutput) qual_pos_var_name = qual_var_name; } // Copy interpolation decorations if needed if (storage != StorageClassInput || !pull_model_inputs.count(var.self)) { if (is_flat) set_member_decoration(ib_type.self, ib_mbr_idx, DecorationFlat); if (is_noperspective) set_member_decoration(ib_type.self, ib_mbr_idx, DecorationNoPerspective); if (is_centroid) set_member_decoration(ib_type.self, ib_mbr_idx, DecorationCentroid); if (is_sample) set_member_decoration(ib_type.self, ib_mbr_idx, DecorationSample); } set_extended_member_decoration(ib_type.self, ib_mbr_idx, SPIRVCrossDecorationInterfaceOrigID, var.self); } void CompilerMSL::add_composite_variable_to_interface_block(StorageClass storage, const string &ib_var_ref, SPIRType &ib_type, SPIRVariable &var, InterfaceBlockMeta &meta) { auto &entry_func = get(ir.default_entry_point); auto &var_type = meta.strip_array ? get_variable_element_type(var) : get_variable_data_type(var); uint32_t elem_cnt = 0; if (add_component_variable_to_interface_block(storage, ib_var_ref, var, var_type, meta)) return; if (is_matrix(var_type)) { if (is_array(var_type)) SPIRV_CROSS_THROW("MSL cannot emit arrays-of-matrices in input and output variables."); elem_cnt = var_type.columns; } else if (is_array(var_type)) { if (var_type.array.size() != 1) SPIRV_CROSS_THROW("MSL cannot emit arrays-of-arrays in input and output variables."); elem_cnt = to_array_size_literal(var_type); } bool is_builtin = is_builtin_variable(var); BuiltIn builtin = BuiltIn(get_decoration(var.self, DecorationBuiltIn)); bool is_flat = has_decoration(var.self, DecorationFlat); bool is_noperspective = has_decoration(var.self, DecorationNoPerspective); bool is_centroid = has_decoration(var.self, DecorationCentroid); bool is_sample = has_decoration(var.self, DecorationSample); auto *usable_type = &var_type; if (usable_type->pointer) usable_type = &get(usable_type->parent_type); while (is_array(*usable_type) || is_matrix(*usable_type)) usable_type = &get(usable_type->parent_type); // If a builtin, force it to have the proper name. if (is_builtin) set_name(var.self, builtin_to_glsl(builtin, StorageClassFunction)); bool flatten_from_ib_var = false; string flatten_from_ib_mbr_name; if (storage == StorageClassOutput && is_builtin && builtin == BuiltInClipDistance) { // Also declare [[clip_distance]] attribute here. uint32_t clip_array_mbr_idx = uint32_t(ib_type.member_types.size()); ib_type.member_types.push_back(get_variable_data_type_id(var)); set_member_decoration(ib_type.self, clip_array_mbr_idx, DecorationBuiltIn, BuiltInClipDistance); flatten_from_ib_mbr_name = builtin_to_glsl(BuiltInClipDistance, StorageClassOutput); set_member_name(ib_type.self, clip_array_mbr_idx, flatten_from_ib_mbr_name); // When we flatten, we flatten directly from the "out" struct, // not from a function variable. flatten_from_ib_var = true; if (!msl_options.enable_clip_distance_user_varying) return; } else if (!meta.strip_array) { // Only flatten/unflatten IO composites for non-tessellation cases where arrays are not stripped. entry_func.add_local_variable(var.self); // We need to declare the variable early and at entry-point scope. vars_needing_early_declaration.push_back(var.self); } for (uint32_t i = 0; i < elem_cnt; i++) { // Add a reference to the variable type to the interface struct. uint32_t ib_mbr_idx = uint32_t(ib_type.member_types.size()); uint32_t target_components = 0; bool padded_output = false; uint32_t type_id = usable_type->self; // Check if we need to pad fragment output to match a certain number of components. if (get_decoration_bitset(var.self).get(DecorationLocation) && msl_options.pad_fragment_output_components && get_entry_point().model == ExecutionModelFragment && storage == StorageClassOutput) { uint32_t locn = get_decoration(var.self, DecorationLocation) + i; target_components = get_target_components_for_fragment_location(locn); if (usable_type->vecsize < target_components) { // Make a new type here. type_id = build_extended_vector_type(usable_type->self, target_components); padded_output = true; } } if (storage == StorageClassInput && pull_model_inputs.count(var.self)) ib_type.member_types.push_back(build_msl_interpolant_type(get_pointee_type_id(type_id), is_noperspective)); else ib_type.member_types.push_back(get_pointee_type_id(type_id)); // Give the member a name string mbr_name = ensure_valid_name(join(to_expression(var.self), "_", i), "m"); set_member_name(ib_type.self, ib_mbr_idx, mbr_name); // There is no qualified alias since we need to flatten the internal array on return. if (get_decoration_bitset(var.self).get(DecorationLocation)) { uint32_t locn = get_decoration(var.self, DecorationLocation) + i; uint32_t comp = get_decoration(var.self, DecorationComponent); if (storage == StorageClassInput) { var.basetype = ensure_correct_input_type(var.basetype, locn, comp, 0, meta.strip_array); uint32_t mbr_type_id = ensure_correct_input_type(usable_type->self, locn, comp, 0, meta.strip_array); if (storage == StorageClassInput && pull_model_inputs.count(var.self)) ib_type.member_types[ib_mbr_idx] = build_msl_interpolant_type(mbr_type_id, is_noperspective); else ib_type.member_types[ib_mbr_idx] = mbr_type_id; } set_member_decoration(ib_type.self, ib_mbr_idx, DecorationLocation, locn); if (comp) set_member_decoration(ib_type.self, ib_mbr_idx, DecorationComponent, comp); mark_location_as_used_by_shader(locn, *usable_type, storage); } else if (is_builtin && is_tessellation_shader() && storage == StorageClassInput && inputs_by_builtin.count(builtin)) { uint32_t locn = inputs_by_builtin[builtin].location + i; set_member_decoration(ib_type.self, ib_mbr_idx, DecorationLocation, locn); mark_location_as_used_by_shader(locn, *usable_type, storage); } else if (is_builtin && capture_output_to_buffer && storage == StorageClassOutput && outputs_by_builtin.count(builtin)) { uint32_t locn = outputs_by_builtin[builtin].location + i; set_member_decoration(ib_type.self, ib_mbr_idx, DecorationLocation, locn); mark_location_as_used_by_shader(locn, *usable_type, storage); } else if (is_builtin && (builtin == BuiltInClipDistance || builtin == BuiltInCullDistance)) { // Declare the Clip/CullDistance as [[user(clip/cullN)]]. set_member_decoration(ib_type.self, ib_mbr_idx, DecorationBuiltIn, builtin); set_member_decoration(ib_type.self, ib_mbr_idx, DecorationIndex, i); } if (get_decoration_bitset(var.self).get(DecorationIndex)) { uint32_t index = get_decoration(var.self, DecorationIndex); set_member_decoration(ib_type.self, ib_mbr_idx, DecorationIndex, index); } if (storage != StorageClassInput || !pull_model_inputs.count(var.self)) { // Copy interpolation decorations if needed if (is_flat) set_member_decoration(ib_type.self, ib_mbr_idx, DecorationFlat); if (is_noperspective) set_member_decoration(ib_type.self, ib_mbr_idx, DecorationNoPerspective); if (is_centroid) set_member_decoration(ib_type.self, ib_mbr_idx, DecorationCentroid); if (is_sample) set_member_decoration(ib_type.self, ib_mbr_idx, DecorationSample); } set_extended_member_decoration(ib_type.self, ib_mbr_idx, SPIRVCrossDecorationInterfaceOrigID, var.self); // Only flatten/unflatten IO composites for non-tessellation cases where arrays are not stripped. if (!meta.strip_array) { switch (storage) { case StorageClassInput: entry_func.fixup_hooks_in.push_back([=, &var]() { if (pull_model_inputs.count(var.self)) { string lerp_call; if (is_centroid) lerp_call = ".interpolate_at_centroid()"; else if (is_sample) lerp_call = join(".interpolate_at_sample(", to_expression(builtin_sample_id_id), ")"); else lerp_call = ".interpolate_at_center()"; statement(to_name(var.self), "[", i, "] = ", ib_var_ref, ".", mbr_name, lerp_call, ";"); } else { statement(to_name(var.self), "[", i, "] = ", ib_var_ref, ".", mbr_name, ";"); } }); break; case StorageClassOutput: entry_func.fixup_hooks_out.push_back([=, &var]() { if (padded_output) { auto &padded_type = this->get(type_id); statement( ib_var_ref, ".", mbr_name, " = ", remap_swizzle(padded_type, usable_type->vecsize, join(to_name(var.self), "[", i, "]")), ";"); } else if (flatten_from_ib_var) statement(ib_var_ref, ".", mbr_name, " = ", ib_var_ref, ".", flatten_from_ib_mbr_name, "[", i, "];"); else statement(ib_var_ref, ".", mbr_name, " = ", to_name(var.self), "[", i, "];"); }); break; default: break; } } } } void CompilerMSL::add_composite_member_variable_to_interface_block(StorageClass storage, const string &ib_var_ref, SPIRType &ib_type, SPIRVariable &var, SPIRType &var_type, uint32_t mbr_idx, InterfaceBlockMeta &meta, const string &mbr_name_qual, const string &var_chain_qual, uint32_t &location, uint32_t &var_mbr_idx) { auto &entry_func = get(ir.default_entry_point); BuiltIn builtin = BuiltInMax; bool is_builtin = is_member_builtin(var_type, mbr_idx, &builtin); bool is_flat = has_member_decoration(var_type.self, mbr_idx, DecorationFlat) || has_decoration(var.self, DecorationFlat); bool is_noperspective = has_member_decoration(var_type.self, mbr_idx, DecorationNoPerspective) || has_decoration(var.self, DecorationNoPerspective); bool is_centroid = has_member_decoration(var_type.self, mbr_idx, DecorationCentroid) || has_decoration(var.self, DecorationCentroid); bool is_sample = has_member_decoration(var_type.self, mbr_idx, DecorationSample) || has_decoration(var.self, DecorationSample); uint32_t mbr_type_id = var_type.member_types[mbr_idx]; auto &mbr_type = get(mbr_type_id); bool mbr_is_indexable = false; uint32_t elem_cnt = 1; if (is_matrix(mbr_type)) { if (is_array(mbr_type)) SPIRV_CROSS_THROW("MSL cannot emit arrays-of-matrices in input and output variables."); mbr_is_indexable = true; elem_cnt = mbr_type.columns; } else if (is_array(mbr_type)) { if (mbr_type.array.size() != 1) SPIRV_CROSS_THROW("MSL cannot emit arrays-of-arrays in input and output variables."); mbr_is_indexable = true; elem_cnt = to_array_size_literal(mbr_type); } auto *usable_type = &mbr_type; if (usable_type->pointer) usable_type = &get(usable_type->parent_type); while (is_array(*usable_type) || is_matrix(*usable_type)) usable_type = &get(usable_type->parent_type); bool flatten_from_ib_var = false; string flatten_from_ib_mbr_name; if (storage == StorageClassOutput && is_builtin && builtin == BuiltInClipDistance) { // Also declare [[clip_distance]] attribute here. uint32_t clip_array_mbr_idx = uint32_t(ib_type.member_types.size()); ib_type.member_types.push_back(mbr_type_id); set_member_decoration(ib_type.self, clip_array_mbr_idx, DecorationBuiltIn, BuiltInClipDistance); flatten_from_ib_mbr_name = builtin_to_glsl(BuiltInClipDistance, StorageClassOutput); set_member_name(ib_type.self, clip_array_mbr_idx, flatten_from_ib_mbr_name); // When we flatten, we flatten directly from the "out" struct, // not from a function variable. flatten_from_ib_var = true; if (!msl_options.enable_clip_distance_user_varying) return; } // Recursively handle nested structures. if (mbr_type.basetype == SPIRType::Struct) { for (uint32_t i = 0; i < elem_cnt; i++) { string mbr_name = append_member_name(mbr_name_qual, var_type, mbr_idx) + (mbr_is_indexable ? join("_", i) : ""); string var_chain = join(var_chain_qual, ".", to_member_name(var_type, mbr_idx), (mbr_is_indexable ? join("[", i, "]") : "")); uint32_t sub_mbr_cnt = uint32_t(mbr_type.member_types.size()); for (uint32_t sub_mbr_idx = 0; sub_mbr_idx < sub_mbr_cnt; sub_mbr_idx++) { add_composite_member_variable_to_interface_block(storage, ib_var_ref, ib_type, var, mbr_type, sub_mbr_idx, meta, mbr_name, var_chain, location, var_mbr_idx); // FIXME: Recursive structs and tessellation breaks here. var_mbr_idx++; } } return; } for (uint32_t i = 0; i < elem_cnt; i++) { // Add a reference to the variable type to the interface struct. uint32_t ib_mbr_idx = uint32_t(ib_type.member_types.size()); if (storage == StorageClassInput && pull_model_inputs.count(var.self)) ib_type.member_types.push_back(build_msl_interpolant_type(usable_type->self, is_noperspective)); else ib_type.member_types.push_back(usable_type->self); // Give the member a name string mbr_name = ensure_valid_name(append_member_name(mbr_name_qual, var_type, mbr_idx) + (mbr_is_indexable ? join("_", i) : ""), "m"); set_member_name(ib_type.self, ib_mbr_idx, mbr_name); // Once we determine the location of the first member within nested structures, // from a var of the topmost structure, the remaining flattened members of // the nested structures will have consecutive location values. At this point, // we've recursively tunnelled into structs, arrays, and matrices, and are // down to a single location for each member now. if (!is_builtin && location != UINT32_MAX) { set_member_decoration(ib_type.self, ib_mbr_idx, DecorationLocation, location); mark_location_as_used_by_shader(location, *usable_type, storage); location++; } else if (has_member_decoration(var_type.self, mbr_idx, DecorationLocation)) { location = get_member_decoration(var_type.self, mbr_idx, DecorationLocation) + i; set_member_decoration(ib_type.self, ib_mbr_idx, DecorationLocation, location); mark_location_as_used_by_shader(location, *usable_type, storage); location++; } else if (has_decoration(var.self, DecorationLocation)) { location = get_accumulated_member_location(var, mbr_idx, meta.strip_array) + i; set_member_decoration(ib_type.self, ib_mbr_idx, DecorationLocation, location); mark_location_as_used_by_shader(location, *usable_type, storage); location++; } else if (is_builtin && is_tessellation_shader() && storage == StorageClassInput && inputs_by_builtin.count(builtin)) { location = inputs_by_builtin[builtin].location + i; set_member_decoration(ib_type.self, ib_mbr_idx, DecorationLocation, location); mark_location_as_used_by_shader(location, *usable_type, storage); location++; } else if (is_builtin && capture_output_to_buffer && storage == StorageClassOutput && outputs_by_builtin.count(builtin)) { location = outputs_by_builtin[builtin].location + i; set_member_decoration(ib_type.self, ib_mbr_idx, DecorationLocation, location); mark_location_as_used_by_shader(location, *usable_type, storage); location++; } else if (is_builtin && (builtin == BuiltInClipDistance || builtin == BuiltInCullDistance)) { // Declare the Clip/CullDistance as [[user(clip/cullN)]]. set_member_decoration(ib_type.self, ib_mbr_idx, DecorationBuiltIn, builtin); set_member_decoration(ib_type.self, ib_mbr_idx, DecorationIndex, i); } if (has_member_decoration(var_type.self, mbr_idx, DecorationComponent)) SPIRV_CROSS_THROW("DecorationComponent on matrices and arrays is not supported."); if (storage != StorageClassInput || !pull_model_inputs.count(var.self)) { // Copy interpolation decorations if needed if (is_flat) set_member_decoration(ib_type.self, ib_mbr_idx, DecorationFlat); if (is_noperspective) set_member_decoration(ib_type.self, ib_mbr_idx, DecorationNoPerspective); if (is_centroid) set_member_decoration(ib_type.self, ib_mbr_idx, DecorationCentroid); if (is_sample) set_member_decoration(ib_type.self, ib_mbr_idx, DecorationSample); } set_extended_member_decoration(ib_type.self, ib_mbr_idx, SPIRVCrossDecorationInterfaceOrigID, var.self); set_extended_member_decoration(ib_type.self, ib_mbr_idx, SPIRVCrossDecorationInterfaceMemberIndex, var_mbr_idx); // Unflatten or flatten from [[stage_in]] or [[stage_out]] as appropriate. if (!meta.strip_array && meta.allow_local_declaration) { string var_chain = join(var_chain_qual, ".", to_member_name(var_type, mbr_idx), (mbr_is_indexable ? join("[", i, "]") : "")); switch (storage) { case StorageClassInput: entry_func.fixup_hooks_in.push_back([=, &var]() { string lerp_call; if (pull_model_inputs.count(var.self)) { if (is_centroid) lerp_call = ".interpolate_at_centroid()"; else if (is_sample) lerp_call = join(".interpolate_at_sample(", to_expression(builtin_sample_id_id), ")"); else lerp_call = ".interpolate_at_center()"; } statement(var_chain, " = ", ib_var_ref, ".", mbr_name, lerp_call, ";"); }); break; case StorageClassOutput: entry_func.fixup_hooks_out.push_back([=]() { if (flatten_from_ib_var) statement(ib_var_ref, ".", mbr_name, " = ", ib_var_ref, ".", flatten_from_ib_mbr_name, "[", i, "];"); else statement(ib_var_ref, ".", mbr_name, " = ", var_chain, ";"); }); break; default: break; } } } } void CompilerMSL::add_plain_member_variable_to_interface_block(StorageClass storage, const string &ib_var_ref, SPIRType &ib_type, SPIRVariable &var, SPIRType &var_type, uint32_t mbr_idx, InterfaceBlockMeta &meta, const string &mbr_name_qual, const string &var_chain_qual, uint32_t &location, uint32_t &var_mbr_idx) { auto &entry_func = get(ir.default_entry_point); BuiltIn builtin = BuiltInMax; bool is_builtin = is_member_builtin(var_type, mbr_idx, &builtin); bool is_flat = has_member_decoration(var_type.self, mbr_idx, DecorationFlat) || has_decoration(var.self, DecorationFlat); bool is_noperspective = has_member_decoration(var_type.self, mbr_idx, DecorationNoPerspective) || has_decoration(var.self, DecorationNoPerspective); bool is_centroid = has_member_decoration(var_type.self, mbr_idx, DecorationCentroid) || has_decoration(var.self, DecorationCentroid); bool is_sample = has_member_decoration(var_type.self, mbr_idx, DecorationSample) || has_decoration(var.self, DecorationSample); // Add a reference to the member to the interface struct. uint32_t mbr_type_id = var_type.member_types[mbr_idx]; uint32_t ib_mbr_idx = uint32_t(ib_type.member_types.size()); mbr_type_id = ensure_correct_builtin_type(mbr_type_id, builtin); var_type.member_types[mbr_idx] = mbr_type_id; if (storage == StorageClassInput && pull_model_inputs.count(var.self)) ib_type.member_types.push_back(build_msl_interpolant_type(mbr_type_id, is_noperspective)); else ib_type.member_types.push_back(mbr_type_id); // Give the member a name string mbr_name = ensure_valid_name(append_member_name(mbr_name_qual, var_type, mbr_idx), "m"); set_member_name(ib_type.self, ib_mbr_idx, mbr_name); // Update the original variable reference to include the structure reference string qual_var_name = ib_var_ref + "." + mbr_name; // If using pull-model interpolation, need to add a call to the correct interpolation method. if (storage == StorageClassInput && pull_model_inputs.count(var.self)) { if (is_centroid) qual_var_name += ".interpolate_at_centroid()"; else if (is_sample) qual_var_name += join(".interpolate_at_sample(", to_expression(builtin_sample_id_id), ")"); else qual_var_name += ".interpolate_at_center()"; } bool flatten_stage_out = false; string var_chain = var_chain_qual + "." + to_member_name(var_type, mbr_idx); if (is_builtin && !meta.strip_array) { // For the builtin gl_PerVertex, we cannot treat it as a block anyways, // so redirect to qualified name. set_member_qualified_name(var_type.self, mbr_idx, qual_var_name); } else if (!meta.strip_array && meta.allow_local_declaration) { // Unflatten or flatten from [[stage_in]] or [[stage_out]] as appropriate. switch (storage) { case StorageClassInput: entry_func.fixup_hooks_in.push_back([=]() { statement(var_chain, " = ", qual_var_name, ";"); }); break; case StorageClassOutput: flatten_stage_out = true; entry_func.fixup_hooks_out.push_back([=]() { statement(qual_var_name, " = ", var_chain, ";"); }); break; default: break; } } // Once we determine the location of the first member within nested structures, // from a var of the topmost structure, the remaining flattened members of // the nested structures will have consecutive location values. At this point, // we've recursively tunnelled into structs, arrays, and matrices, and are // down to a single location for each member now. if (!is_builtin && location != UINT32_MAX) { set_member_decoration(ib_type.self, ib_mbr_idx, DecorationLocation, location); mark_location_as_used_by_shader(location, get(mbr_type_id), storage); location += type_to_location_count(get(mbr_type_id)); } else if (has_member_decoration(var_type.self, mbr_idx, DecorationLocation)) { location = get_member_decoration(var_type.self, mbr_idx, DecorationLocation); uint32_t comp = get_member_decoration(var_type.self, mbr_idx, DecorationComponent); if (storage == StorageClassInput) { mbr_type_id = ensure_correct_input_type(mbr_type_id, location, comp, 0, meta.strip_array); var_type.member_types[mbr_idx] = mbr_type_id; if (storage == StorageClassInput && pull_model_inputs.count(var.self)) ib_type.member_types[ib_mbr_idx] = build_msl_interpolant_type(mbr_type_id, is_noperspective); else ib_type.member_types[ib_mbr_idx] = mbr_type_id; } set_member_decoration(ib_type.self, ib_mbr_idx, DecorationLocation, location); mark_location_as_used_by_shader(location, get(mbr_type_id), storage); location += type_to_location_count(get(mbr_type_id)); } else if (has_decoration(var.self, DecorationLocation)) { location = get_accumulated_member_location(var, mbr_idx, meta.strip_array); if (storage == StorageClassInput) { mbr_type_id = ensure_correct_input_type(mbr_type_id, location, 0, 0, meta.strip_array); var_type.member_types[mbr_idx] = mbr_type_id; if (storage == StorageClassInput && pull_model_inputs.count(var.self)) ib_type.member_types[ib_mbr_idx] = build_msl_interpolant_type(mbr_type_id, is_noperspective); else ib_type.member_types[ib_mbr_idx] = mbr_type_id; } set_member_decoration(ib_type.self, ib_mbr_idx, DecorationLocation, location); mark_location_as_used_by_shader(location, get(mbr_type_id), storage); location += type_to_location_count(get(mbr_type_id)); } else if (is_builtin && is_tessellation_shader() && storage == StorageClassInput && inputs_by_builtin.count(builtin)) { location = inputs_by_builtin[builtin].location; set_member_decoration(ib_type.self, ib_mbr_idx, DecorationLocation, location); mark_location_as_used_by_shader(location, get(mbr_type_id), storage); location += type_to_location_count(get(mbr_type_id)); } else if (is_builtin && capture_output_to_buffer && storage == StorageClassOutput && outputs_by_builtin.count(builtin)) { location = outputs_by_builtin[builtin].location; set_member_decoration(ib_type.self, ib_mbr_idx, DecorationLocation, location); mark_location_as_used_by_shader(location, get(mbr_type_id), storage); location += type_to_location_count(get(mbr_type_id)); } // Copy the component location, if present. if (has_member_decoration(var_type.self, mbr_idx, DecorationComponent)) { uint32_t comp = get_member_decoration(var_type.self, mbr_idx, DecorationComponent); set_member_decoration(ib_type.self, ib_mbr_idx, DecorationComponent, comp); } // Mark the member as builtin if needed if (is_builtin) { set_member_decoration(ib_type.self, ib_mbr_idx, DecorationBuiltIn, builtin); if (builtin == BuiltInPosition && storage == StorageClassOutput) qual_pos_var_name = qual_var_name; } const SPIRConstant *c = nullptr; if (!flatten_stage_out && var.storage == StorageClassOutput && var.initializer != ID(0) && (c = maybe_get(var.initializer))) { if (meta.strip_array) { entry_func.fixup_hooks_in.push_back([=, &var]() { auto &type = this->get(var.basetype); uint32_t index = get_extended_member_decoration(var.self, mbr_idx, SPIRVCrossDecorationInterfaceMemberIndex); auto invocation = to_tesc_invocation_id(); auto constant_chain = join(to_expression(var.initializer), "[", invocation, "]"); statement(to_expression(stage_out_ptr_var_id), "[", invocation, "].", to_member_name(ib_type, index), " = ", constant_chain, ".", to_member_name(type, mbr_idx), ";"); }); } else { entry_func.fixup_hooks_in.push_back([=]() { statement(qual_var_name, " = ", constant_expression( this->get(c->subconstants[mbr_idx])), ";"); }); } } if (storage != StorageClassInput || !pull_model_inputs.count(var.self)) { // Copy interpolation decorations if needed if (is_flat) set_member_decoration(ib_type.self, ib_mbr_idx, DecorationFlat); if (is_noperspective) set_member_decoration(ib_type.self, ib_mbr_idx, DecorationNoPerspective); if (is_centroid) set_member_decoration(ib_type.self, ib_mbr_idx, DecorationCentroid); if (is_sample) set_member_decoration(ib_type.self, ib_mbr_idx, DecorationSample); } set_extended_member_decoration(ib_type.self, ib_mbr_idx, SPIRVCrossDecorationInterfaceOrigID, var.self); set_extended_member_decoration(ib_type.self, ib_mbr_idx, SPIRVCrossDecorationInterfaceMemberIndex, var_mbr_idx); } // In Metal, the tessellation levels are stored as tightly packed half-precision floating point values. // But, stage-in attribute offsets and strides must be multiples of four, so we can't pass the levels // individually. Therefore, we must pass them as vectors. Triangles get a single float4, with the outer // levels in 'xyz' and the inner level in 'w'. Quads get a float4 containing the outer levels and a // float2 containing the inner levels. void CompilerMSL::add_tess_level_input_to_interface_block(const std::string &ib_var_ref, SPIRType &ib_type, SPIRVariable &var) { auto &var_type = get_variable_element_type(var); BuiltIn builtin = BuiltIn(get_decoration(var.self, DecorationBuiltIn)); bool triangles = is_tessellating_triangles(); string mbr_name; // Add a reference to the variable type to the interface struct. uint32_t ib_mbr_idx = uint32_t(ib_type.member_types.size()); const auto mark_locations = [&](const SPIRType &new_var_type) { if (get_decoration_bitset(var.self).get(DecorationLocation)) { uint32_t locn = get_decoration(var.self, DecorationLocation); set_member_decoration(ib_type.self, ib_mbr_idx, DecorationLocation, locn); mark_location_as_used_by_shader(locn, new_var_type, StorageClassInput); } else if (inputs_by_builtin.count(builtin)) { uint32_t locn = inputs_by_builtin[builtin].location; set_member_decoration(ib_type.self, ib_mbr_idx, DecorationLocation, locn); mark_location_as_used_by_shader(locn, new_var_type, StorageClassInput); } }; if (triangles) { // Triangles are tricky, because we want only one member in the struct. mbr_name = "gl_TessLevel"; // If we already added the other one, we can skip this step. if (!added_builtin_tess_level) { uint32_t type_id = build_extended_vector_type(var_type.self, 4); ib_type.member_types.push_back(type_id); // Give the member a name set_member_name(ib_type.self, ib_mbr_idx, mbr_name); // We cannot decorate both, but the important part is that // it's marked as builtin so we can get automatic attribute assignment if needed. set_member_decoration(ib_type.self, ib_mbr_idx, DecorationBuiltIn, builtin); mark_locations(var_type); added_builtin_tess_level = true; } } else { mbr_name = builtin_to_glsl(builtin, StorageClassFunction); uint32_t type_id = build_extended_vector_type(var_type.self, builtin == BuiltInTessLevelOuter ? 4 : 2); uint32_t ptr_type_id = ir.increase_bound_by(1); auto &new_var_type = set(ptr_type_id, get(type_id)); new_var_type.pointer = true; new_var_type.pointer_depth++; new_var_type.storage = StorageClassInput; new_var_type.parent_type = type_id; ib_type.member_types.push_back(type_id); // Give the member a name set_member_name(ib_type.self, ib_mbr_idx, mbr_name); set_member_decoration(ib_type.self, ib_mbr_idx, DecorationBuiltIn, builtin); mark_locations(new_var_type); } add_tess_level_input(ib_var_ref, mbr_name, var); } void CompilerMSL::add_tess_level_input(const std::string &base_ref, const std::string &mbr_name, SPIRVariable &var) { auto &entry_func = get(ir.default_entry_point); BuiltIn builtin = BuiltIn(get_decoration(var.self, DecorationBuiltIn)); // Force the variable to have the proper name. string var_name = builtin_to_glsl(builtin, StorageClassFunction); set_name(var.self, var_name); // We need to declare the variable early and at entry-point scope. entry_func.add_local_variable(var.self); vars_needing_early_declaration.push_back(var.self); bool triangles = is_tessellating_triangles(); if (builtin == BuiltInTessLevelOuter) { entry_func.fixup_hooks_in.push_back( [=]() { statement(var_name, "[0] = ", base_ref, ".", mbr_name, "[0];"); statement(var_name, "[1] = ", base_ref, ".", mbr_name, "[1];"); statement(var_name, "[2] = ", base_ref, ".", mbr_name, "[2];"); if (!triangles) statement(var_name, "[3] = ", base_ref, ".", mbr_name, "[3];"); }); } else { entry_func.fixup_hooks_in.push_back([=]() { if (triangles) { if (msl_options.raw_buffer_tese_input) statement(var_name, "[0] = ", base_ref, ".", mbr_name, ";"); else statement(var_name, "[0] = ", base_ref, ".", mbr_name, "[3];"); } else { statement(var_name, "[0] = ", base_ref, ".", mbr_name, "[0];"); statement(var_name, "[1] = ", base_ref, ".", mbr_name, "[1];"); } }); } } bool CompilerMSL::variable_storage_requires_stage_io(spv::StorageClass storage) const { if (storage == StorageClassOutput) return !capture_output_to_buffer; else if (storage == StorageClassInput) return !(is_tesc_shader() && msl_options.multi_patch_workgroup) && !(is_tese_shader() && msl_options.raw_buffer_tese_input); else return false; } string CompilerMSL::to_tesc_invocation_id() { if (msl_options.multi_patch_workgroup) { // n.b. builtin_invocation_id_id here is the dispatch global invocation ID, // not the TC invocation ID. return join(to_expression(builtin_invocation_id_id), ".x % ", get_entry_point().output_vertices); } else return builtin_to_glsl(BuiltInInvocationId, StorageClassInput); } void CompilerMSL::emit_local_masked_variable(const SPIRVariable &masked_var, bool strip_array) { auto &entry_func = get(ir.default_entry_point); bool threadgroup_storage = variable_decl_is_remapped_storage(masked_var, StorageClassWorkgroup); if (threadgroup_storage && msl_options.multi_patch_workgroup) { // We need one threadgroup block per patch, so fake this. entry_func.fixup_hooks_in.push_back([this, &masked_var]() { auto &type = get_variable_data_type(masked_var); add_local_variable_name(masked_var.self); const uint32_t max_control_points_per_patch = 32u; uint32_t max_num_instances = (max_control_points_per_patch + get_entry_point().output_vertices - 1u) / get_entry_point().output_vertices; statement("threadgroup ", type_to_glsl(type), " ", "spvStorage", to_name(masked_var.self), "[", max_num_instances, "]", type_to_array_glsl(type), ";"); // Assign a threadgroup slice to each PrimitiveID. // We assume here that workgroup size is rounded to 32, // since that's the maximum number of control points per patch. // We cannot size the array based on fixed dispatch parameters, // since Metal does not allow that. :( // FIXME: We will likely need an option to support passing down target workgroup size, // so we can emit appropriate size here. statement("threadgroup auto ", "&", to_name(masked_var.self), " = spvStorage", to_name(masked_var.self), "[", "(", to_expression(builtin_invocation_id_id), ".x / ", get_entry_point().output_vertices, ") % ", max_num_instances, "];"); }); } else { entry_func.add_local_variable(masked_var.self); } if (!threadgroup_storage) { vars_needing_early_declaration.push_back(masked_var.self); } else if (masked_var.initializer) { // Cannot directly initialize threadgroup variables. Need fixup hooks. ID initializer = masked_var.initializer; if (strip_array) { entry_func.fixup_hooks_in.push_back([this, &masked_var, initializer]() { auto invocation = to_tesc_invocation_id(); statement(to_expression(masked_var.self), "[", invocation, "] = ", to_expression(initializer), "[", invocation, "];"); }); } else { entry_func.fixup_hooks_in.push_back([this, &masked_var, initializer]() { statement(to_expression(masked_var.self), " = ", to_expression(initializer), ";"); }); } } } void CompilerMSL::add_variable_to_interface_block(StorageClass storage, const string &ib_var_ref, SPIRType &ib_type, SPIRVariable &var, InterfaceBlockMeta &meta) { auto &entry_func = get(ir.default_entry_point); // Tessellation control I/O variables and tessellation evaluation per-point inputs are // usually declared as arrays. In these cases, we want to add the element type to the // interface block, since in Metal it's the interface block itself which is arrayed. auto &var_type = meta.strip_array ? get_variable_element_type(var) : get_variable_data_type(var); bool is_builtin = is_builtin_variable(var); auto builtin = BuiltIn(get_decoration(var.self, DecorationBuiltIn)); bool is_block = has_decoration(var_type.self, DecorationBlock); // If stage variables are masked out, emit them as plain variables instead. // For builtins, we query them one by one later. // IO blocks are not masked here, we need to mask them per-member instead. if (storage == StorageClassOutput && is_stage_output_variable_masked(var)) { // If we ignore an output, we must still emit it, since it might be used by app. // Instead, just emit it as early declaration. emit_local_masked_variable(var, meta.strip_array); return; } if (storage == StorageClassInput && has_decoration(var.self, DecorationPerVertexKHR)) SPIRV_CROSS_THROW("PerVertexKHR decoration is not supported in MSL."); // If variable names alias, they will end up with wrong names in the interface struct, because // there might be aliases in the member name cache and there would be a mismatch in fixup_in code. // Make sure to register the variables as unique resource names ahead of time. // This would normally conflict with the name cache when emitting local variables, // but this happens in the setup stage, before we hit compilation loops. // The name cache is cleared before we actually emit code, so this is safe. add_resource_name(var.self); if (var_type.basetype == SPIRType::Struct) { bool block_requires_flattening = variable_storage_requires_stage_io(storage) || (is_block && var_type.array.empty()); bool needs_local_declaration = !is_builtin && block_requires_flattening && meta.allow_local_declaration; if (needs_local_declaration) { // For I/O blocks or structs, we will need to pass the block itself around // to functions if they are used globally in leaf functions. // Rather than passing down member by member, // we unflatten I/O blocks while running the shader, // and pass the actual struct type down to leaf functions. // We then unflatten inputs, and flatten outputs in the "fixup" stages. emit_local_masked_variable(var, meta.strip_array); } if (!block_requires_flattening) { // In Metal tessellation shaders, the interface block itself is arrayed. This makes things // very complicated, since stage-in structures in MSL don't support nested structures. // Luckily, for stage-out when capturing output, we can avoid this and just add // composite members directly, because the stage-out structure is stored to a buffer, // not returned. add_plain_variable_to_interface_block(storage, ib_var_ref, ib_type, var, meta); } else { bool masked_block = false; uint32_t location = UINT32_MAX; uint32_t var_mbr_idx = 0; uint32_t elem_cnt = 1; if (is_matrix(var_type)) { if (is_array(var_type)) SPIRV_CROSS_THROW("MSL cannot emit arrays-of-matrices in input and output variables."); elem_cnt = var_type.columns; } else if (is_array(var_type)) { if (var_type.array.size() != 1) SPIRV_CROSS_THROW("MSL cannot emit arrays-of-arrays in input and output variables."); elem_cnt = to_array_size_literal(var_type); } for (uint32_t elem_idx = 0; elem_idx < elem_cnt; elem_idx++) { // Flatten the struct members into the interface struct for (uint32_t mbr_idx = 0; mbr_idx < uint32_t(var_type.member_types.size()); mbr_idx++) { builtin = BuiltInMax; is_builtin = is_member_builtin(var_type, mbr_idx, &builtin); auto &mbr_type = get(var_type.member_types[mbr_idx]); if (storage == StorageClassOutput && is_stage_output_block_member_masked(var, mbr_idx, meta.strip_array)) { location = UINT32_MAX; // Skip this member and resolve location again on next var member if (is_block) masked_block = true; // Non-builtin block output variables are just ignored, since they will still access // the block variable as-is. They're just not flattened. if (is_builtin && !meta.strip_array) { // Emit a fake variable instead. uint32_t ids = ir.increase_bound_by(2); uint32_t ptr_type_id = ids + 0; uint32_t var_id = ids + 1; auto ptr_type = mbr_type; ptr_type.pointer = true; ptr_type.pointer_depth++; ptr_type.parent_type = var_type.member_types[mbr_idx]; ptr_type.storage = StorageClassOutput; uint32_t initializer = 0; if (var.initializer) if (auto *c = maybe_get(var.initializer)) initializer = c->subconstants[mbr_idx]; set(ptr_type_id, ptr_type); set(var_id, ptr_type_id, StorageClassOutput, initializer); entry_func.add_local_variable(var_id); vars_needing_early_declaration.push_back(var_id); set_name(var_id, builtin_to_glsl(builtin, StorageClassOutput)); set_decoration(var_id, DecorationBuiltIn, builtin); } } else if (!is_builtin || has_active_builtin(builtin, storage)) { bool is_composite_type = is_matrix(mbr_type) || is_array(mbr_type) || mbr_type.basetype == SPIRType::Struct; bool attribute_load_store = storage == StorageClassInput && get_execution_model() != ExecutionModelFragment; bool storage_is_stage_io = variable_storage_requires_stage_io(storage); // Clip/CullDistance always need to be declared as user attributes. if (builtin == BuiltInClipDistance || builtin == BuiltInCullDistance) is_builtin = false; const string var_name = to_name(var.self); string mbr_name_qual = var_name; string var_chain_qual = var_name; if (elem_cnt > 1) { mbr_name_qual += join("_", elem_idx); var_chain_qual += join("[", elem_idx, "]"); } if ((!is_builtin || attribute_load_store) && storage_is_stage_io && is_composite_type) { add_composite_member_variable_to_interface_block(storage, ib_var_ref, ib_type, var, var_type, mbr_idx, meta, mbr_name_qual, var_chain_qual, location, var_mbr_idx); } else { add_plain_member_variable_to_interface_block(storage, ib_var_ref, ib_type, var, var_type, mbr_idx, meta, mbr_name_qual, var_chain_qual, location, var_mbr_idx); } } var_mbr_idx++; } } // If we're redirecting a block, we might still need to access the original block // variable if we're masking some members. if (masked_block && !needs_local_declaration && (!is_builtin_variable(var) || is_tesc_shader())) { if (is_builtin_variable(var)) { // Ensure correct names for the block members if we're actually going to // declare gl_PerVertex. for (uint32_t mbr_idx = 0; mbr_idx < uint32_t(var_type.member_types.size()); mbr_idx++) { set_member_name(var_type.self, mbr_idx, builtin_to_glsl( BuiltIn(get_member_decoration(var_type.self, mbr_idx, DecorationBuiltIn)), StorageClassOutput)); } set_name(var_type.self, "gl_PerVertex"); set_name(var.self, "gl_out_masked"); stage_out_masked_builtin_type_id = var_type.self; } emit_local_masked_variable(var, meta.strip_array); } } } else if (is_tese_shader() && storage == StorageClassInput && !meta.strip_array && is_builtin && (builtin == BuiltInTessLevelOuter || builtin == BuiltInTessLevelInner)) { add_tess_level_input_to_interface_block(ib_var_ref, ib_type, var); } else if (var_type.basetype == SPIRType::Boolean || var_type.basetype == SPIRType::Char || type_is_integral(var_type) || type_is_floating_point(var_type)) { if (!is_builtin || has_active_builtin(builtin, storage)) { bool is_composite_type = is_matrix(var_type) || is_array(var_type); bool storage_is_stage_io = variable_storage_requires_stage_io(storage); bool attribute_load_store = storage == StorageClassInput && get_execution_model() != ExecutionModelFragment; // Clip/CullDistance always needs to be declared as user attributes. if (builtin == BuiltInClipDistance || builtin == BuiltInCullDistance) is_builtin = false; // MSL does not allow matrices or arrays in input or output variables, so need to handle it specially. if ((!is_builtin || attribute_load_store) && storage_is_stage_io && is_composite_type) { add_composite_variable_to_interface_block(storage, ib_var_ref, ib_type, var, meta); } else { add_plain_variable_to_interface_block(storage, ib_var_ref, ib_type, var, meta); } } } } // Fix up the mapping of variables to interface member indices, which is used to compile access chains // for per-vertex variables in a tessellation control shader. void CompilerMSL::fix_up_interface_member_indices(StorageClass storage, uint32_t ib_type_id) { // Only needed for tessellation shaders and pull-model interpolants. // Need to redirect interface indices back to variables themselves. // For structs, each member of the struct need a separate instance. if (!is_tesc_shader() && !(is_tese_shader() && storage == StorageClassInput) && !(get_execution_model() == ExecutionModelFragment && storage == StorageClassInput && !pull_model_inputs.empty())) return; auto mbr_cnt = uint32_t(ir.meta[ib_type_id].members.size()); for (uint32_t i = 0; i < mbr_cnt; i++) { uint32_t var_id = get_extended_member_decoration(ib_type_id, i, SPIRVCrossDecorationInterfaceOrigID); if (!var_id) continue; auto &var = get(var_id); auto &type = get_variable_element_type(var); bool flatten_composites = variable_storage_requires_stage_io(var.storage); bool is_block = has_decoration(type.self, DecorationBlock); uint32_t mbr_idx = uint32_t(-1); if (type.basetype == SPIRType::Struct && (flatten_composites || is_block)) mbr_idx = get_extended_member_decoration(ib_type_id, i, SPIRVCrossDecorationInterfaceMemberIndex); if (mbr_idx != uint32_t(-1)) { // Only set the lowest InterfaceMemberIndex for each variable member. // IB struct members will be emitted in-order w.r.t. interface member index. if (!has_extended_member_decoration(var_id, mbr_idx, SPIRVCrossDecorationInterfaceMemberIndex)) set_extended_member_decoration(var_id, mbr_idx, SPIRVCrossDecorationInterfaceMemberIndex, i); } else { // Only set the lowest InterfaceMemberIndex for each variable. // IB struct members will be emitted in-order w.r.t. interface member index. if (!has_extended_decoration(var_id, SPIRVCrossDecorationInterfaceMemberIndex)) set_extended_decoration(var_id, SPIRVCrossDecorationInterfaceMemberIndex, i); } } } // Add an interface structure for the type of storage, which is either StorageClassInput or StorageClassOutput. // Returns the ID of the newly added variable, or zero if no variable was added. uint32_t CompilerMSL::add_interface_block(StorageClass storage, bool patch) { // Accumulate the variables that should appear in the interface struct. SmallVector vars; bool incl_builtins = storage == StorageClassOutput || is_tessellation_shader(); bool has_seen_barycentric = false; InterfaceBlockMeta meta; // Varying interfaces between stages which use "user()" attribute can be dealt with // without explicit packing and unpacking of components. For any variables which link against the runtime // in some way (vertex attributes, fragment output, etc), we'll need to deal with it somehow. bool pack_components = (storage == StorageClassInput && get_execution_model() == ExecutionModelVertex) || (storage == StorageClassOutput && get_execution_model() == ExecutionModelFragment) || (storage == StorageClassOutput && get_execution_model() == ExecutionModelVertex && capture_output_to_buffer); ir.for_each_typed_id([&](uint32_t var_id, SPIRVariable &var) { if (var.storage != storage) return; auto &type = this->get(var.basetype); bool is_builtin = is_builtin_variable(var); bool is_block = has_decoration(type.self, DecorationBlock); auto bi_type = BuiltInMax; bool builtin_is_gl_in_out = false; if (is_builtin && !is_block) { bi_type = BuiltIn(get_decoration(var_id, DecorationBuiltIn)); builtin_is_gl_in_out = bi_type == BuiltInPosition || bi_type == BuiltInPointSize || bi_type == BuiltInClipDistance || bi_type == BuiltInCullDistance; } if (is_builtin && is_block) builtin_is_gl_in_out = true; uint32_t location = get_decoration(var_id, DecorationLocation); bool builtin_is_stage_in_out = builtin_is_gl_in_out || bi_type == BuiltInLayer || bi_type == BuiltInViewportIndex || bi_type == BuiltInBaryCoordKHR || bi_type == BuiltInBaryCoordNoPerspKHR || bi_type == BuiltInFragDepth || bi_type == BuiltInFragStencilRefEXT || bi_type == BuiltInSampleMask; // These builtins are part of the stage in/out structs. bool is_interface_block_builtin = builtin_is_stage_in_out || (is_tese_shader() && !msl_options.raw_buffer_tese_input && (bi_type == BuiltInTessLevelOuter || bi_type == BuiltInTessLevelInner)); bool is_active = interface_variable_exists_in_entry_point(var.self); if (is_builtin && is_active) { // Only emit the builtin if it's active in this entry point. Interface variable list might lie. if (is_block) { // If any builtin is active, the block is active. uint32_t mbr_cnt = uint32_t(type.member_types.size()); for (uint32_t i = 0; !is_active && i < mbr_cnt; i++) is_active = has_active_builtin(BuiltIn(get_member_decoration(type.self, i, DecorationBuiltIn)), storage); } else { is_active = has_active_builtin(bi_type, storage); } } bool filter_patch_decoration = (has_decoration(var_id, DecorationPatch) || is_patch_block(type)) == patch; bool hidden = is_hidden_variable(var, incl_builtins); // ClipDistance is never hidden, we need to emulate it when used as an input. if (bi_type == BuiltInClipDistance || bi_type == BuiltInCullDistance) hidden = false; // It's not enough to simply avoid marking fragment outputs if the pipeline won't // accept them. We can't put them in the struct at all, or otherwise the compiler // complains that the outputs weren't explicitly marked. // Frag depth and stencil outputs are incompatible with explicit early fragment tests. // In GLSL, depth and stencil outputs are just ignored when explicit early fragment tests are required. // In Metal, it's a compilation error, so we need to exclude them from the output struct. if (get_execution_model() == ExecutionModelFragment && storage == StorageClassOutput && !patch && ((is_builtin && ((bi_type == BuiltInFragDepth && (!msl_options.enable_frag_depth_builtin || uses_explicit_early_fragment_test())) || (bi_type == BuiltInFragStencilRefEXT && (!msl_options.enable_frag_stencil_ref_builtin || uses_explicit_early_fragment_test())))) || (!is_builtin && !(msl_options.enable_frag_output_mask & (1 << location))))) { hidden = true; disabled_frag_outputs.push_back(var_id); // If a builtin, force it to have the proper name, and mark it as not part of the output struct. if (is_builtin) { set_name(var_id, builtin_to_glsl(bi_type, StorageClassFunction)); mask_stage_output_by_builtin(bi_type); } } // Barycentric inputs must be emitted in stage-in, because they can have interpolation arguments. if (is_active && (bi_type == BuiltInBaryCoordKHR || bi_type == BuiltInBaryCoordNoPerspKHR)) { if (has_seen_barycentric) SPIRV_CROSS_THROW("Cannot declare both BaryCoordNV and BaryCoordNoPerspNV in same shader in MSL."); has_seen_barycentric = true; hidden = false; } if (is_active && !hidden && type.pointer && filter_patch_decoration && (!is_builtin || is_interface_block_builtin)) { vars.push_back(&var); if (!is_builtin) { // Need to deal specially with DecorationComponent. // Multiple variables can alias the same Location, and try to make sure each location is declared only once. // We will swizzle data in and out to make this work. // This is only relevant for vertex inputs and fragment outputs. // Technically tessellation as well, but it is too complicated to support. uint32_t component = get_decoration(var_id, DecorationComponent); if (component != 0) { if (is_tessellation_shader()) SPIRV_CROSS_THROW("Component decoration is not supported in tessellation shaders."); else if (pack_components) { uint32_t array_size = 1; if (!type.array.empty()) array_size = to_array_size_literal(type); for (uint32_t location_offset = 0; location_offset < array_size; location_offset++) { auto &location_meta = meta.location_meta[location + location_offset]; location_meta.num_components = max(location_meta.num_components, component + type.vecsize); // For variables sharing location, decorations and base type must match. location_meta.base_type_id = type.self; location_meta.flat = has_decoration(var.self, DecorationFlat); location_meta.noperspective = has_decoration(var.self, DecorationNoPerspective); location_meta.centroid = has_decoration(var.self, DecorationCentroid); location_meta.sample = has_decoration(var.self, DecorationSample); } } } } } if (is_tese_shader() && msl_options.raw_buffer_tese_input && patch && storage == StorageClassInput && (bi_type == BuiltInTessLevelOuter || bi_type == BuiltInTessLevelInner)) { // In this case, we won't add the builtin to the interface struct, // but we still need the hook to run to populate the arrays. string base_ref = join(tess_factor_buffer_var_name, "[", to_expression(builtin_primitive_id_id), "]"); const char *mbr_name = bi_type == BuiltInTessLevelOuter ? "edgeTessellationFactor" : "insideTessellationFactor"; add_tess_level_input(base_ref, mbr_name, var); if (inputs_by_builtin.count(bi_type)) { uint32_t locn = inputs_by_builtin[bi_type].location; mark_location_as_used_by_shader(locn, type, StorageClassInput); } } }); // If no variables qualify, leave. // For patch input in a tessellation evaluation shader, the per-vertex stage inputs // are included in a special patch control point array. if (vars.empty() && !(!msl_options.raw_buffer_tese_input && storage == StorageClassInput && patch && stage_in_var_id)) return 0; // Add a new typed variable for this interface structure. // The initializer expression is allocated here, but populated when the function // declaraion is emitted, because it is cleared after each compilation pass. uint32_t next_id = ir.increase_bound_by(3); uint32_t ib_type_id = next_id++; auto &ib_type = set(ib_type_id, OpTypeStruct); ib_type.basetype = SPIRType::Struct; ib_type.storage = storage; set_decoration(ib_type_id, DecorationBlock); uint32_t ib_var_id = next_id++; auto &var = set(ib_var_id, ib_type_id, storage, 0); var.initializer = next_id++; string ib_var_ref; auto &entry_func = get(ir.default_entry_point); switch (storage) { case StorageClassInput: ib_var_ref = patch ? patch_stage_in_var_name : stage_in_var_name; switch (get_execution_model()) { case ExecutionModelTessellationControl: // Add a hook to populate the shared workgroup memory containing the gl_in array. entry_func.fixup_hooks_in.push_back([=]() { // Can't use PatchVertices, PrimitiveId, or InvocationId yet; the hooks for those may not have run yet. if (msl_options.multi_patch_workgroup) { // n.b. builtin_invocation_id_id here is the dispatch global invocation ID, // not the TC invocation ID. statement("device ", to_name(ir.default_entry_point), "_", ib_var_ref, "* gl_in = &", input_buffer_var_name, "[min(", to_expression(builtin_invocation_id_id), ".x / ", get_entry_point().output_vertices, ", spvIndirectParams[1] - 1) * spvIndirectParams[0]];"); } else { // It's safe to use InvocationId here because it's directly mapped to a // Metal builtin, and therefore doesn't need a hook. statement("if (", to_expression(builtin_invocation_id_id), " < spvIndirectParams[0])"); statement(" ", input_wg_var_name, "[", to_expression(builtin_invocation_id_id), "] = ", ib_var_ref, ";"); statement("threadgroup_barrier(mem_flags::mem_threadgroup);"); statement("if (", to_expression(builtin_invocation_id_id), " >= ", get_entry_point().output_vertices, ")"); statement(" return;"); } }); break; case ExecutionModelTessellationEvaluation: if (!msl_options.raw_buffer_tese_input) break; if (patch) { entry_func.fixup_hooks_in.push_back( [=]() { statement("const device ", to_name(ir.default_entry_point), "_", ib_var_ref, "& ", ib_var_ref, " = ", patch_input_buffer_var_name, "[", to_expression(builtin_primitive_id_id), "];"); }); } else { entry_func.fixup_hooks_in.push_back( [=]() { statement("const device ", to_name(ir.default_entry_point), "_", ib_var_ref, "* gl_in = &", input_buffer_var_name, "[", to_expression(builtin_primitive_id_id), " * ", get_entry_point().output_vertices, "];"); }); } break; default: break; } break; case StorageClassOutput: { ib_var_ref = patch ? patch_stage_out_var_name : stage_out_var_name; // Add the output interface struct as a local variable to the entry function. // If the entry point should return the output struct, set the entry function // to return the output interface struct, otherwise to return nothing. // Watch out for the rare case where the terminator of the last entry point block is a // Kill, instead of a Return. Based on SPIR-V's block-domination rules, we assume that // any block that has a Kill will also have a terminating Return, except the last block. // Indicate the output var requires early initialization. bool ep_should_return_output = !get_is_rasterization_disabled(); uint32_t rtn_id = ep_should_return_output ? ib_var_id : 0; if (!capture_output_to_buffer) { entry_func.add_local_variable(ib_var_id); for (auto &blk_id : entry_func.blocks) { auto &blk = get(blk_id); if (blk.terminator == SPIRBlock::Return || (blk.terminator == SPIRBlock::Kill && blk_id == entry_func.blocks.back())) blk.return_value = rtn_id; } vars_needing_early_declaration.push_back(ib_var_id); } else { switch (get_execution_model()) { case ExecutionModelVertex: case ExecutionModelTessellationEvaluation: // Instead of declaring a struct variable to hold the output and then // copying that to the output buffer, we'll declare the output variable // as a reference to the final output element in the buffer. Then we can // avoid the extra copy. entry_func.fixup_hooks_in.push_back([=]() { if (stage_out_var_id) { // The first member of the indirect buffer is always the number of vertices // to draw. // We zero-base the InstanceID & VertexID variables for HLSL emulation elsewhere, so don't do it twice if (get_execution_model() == ExecutionModelVertex && msl_options.vertex_for_tessellation) { statement("device ", to_name(ir.default_entry_point), "_", ib_var_ref, "& ", ib_var_ref, " = ", output_buffer_var_name, "[", to_expression(builtin_invocation_id_id), ".y * ", to_expression(builtin_stage_input_size_id), ".x + ", to_expression(builtin_invocation_id_id), ".x];"); } else if (msl_options.enable_base_index_zero) { statement("device ", to_name(ir.default_entry_point), "_", ib_var_ref, "& ", ib_var_ref, " = ", output_buffer_var_name, "[", to_expression(builtin_instance_idx_id), " * spvIndirectParams[0] + ", to_expression(builtin_vertex_idx_id), "];"); } else { statement("device ", to_name(ir.default_entry_point), "_", ib_var_ref, "& ", ib_var_ref, " = ", output_buffer_var_name, "[(", to_expression(builtin_instance_idx_id), " - ", to_expression(builtin_base_instance_id), ") * spvIndirectParams[0] + ", to_expression(builtin_vertex_idx_id), " - ", to_expression(builtin_base_vertex_id), "];"); } } }); break; case ExecutionModelTessellationControl: if (msl_options.multi_patch_workgroup) { // We cannot use PrimitiveId here, because the hook may not have run yet. if (patch) { entry_func.fixup_hooks_in.push_back([=]() { statement("device ", to_name(ir.default_entry_point), "_", ib_var_ref, "& ", ib_var_ref, " = ", patch_output_buffer_var_name, "[", to_expression(builtin_invocation_id_id), ".x / ", get_entry_point().output_vertices, "];"); }); } else { entry_func.fixup_hooks_in.push_back([=]() { statement("device ", to_name(ir.default_entry_point), "_", ib_var_ref, "* gl_out = &", output_buffer_var_name, "[", to_expression(builtin_invocation_id_id), ".x - ", to_expression(builtin_invocation_id_id), ".x % ", get_entry_point().output_vertices, "];"); }); } } else { if (patch) { entry_func.fixup_hooks_in.push_back([=]() { statement("device ", to_name(ir.default_entry_point), "_", ib_var_ref, "& ", ib_var_ref, " = ", patch_output_buffer_var_name, "[", to_expression(builtin_primitive_id_id), "];"); }); } else { entry_func.fixup_hooks_in.push_back([=]() { statement("device ", to_name(ir.default_entry_point), "_", ib_var_ref, "* gl_out = &", output_buffer_var_name, "[", to_expression(builtin_primitive_id_id), " * ", get_entry_point().output_vertices, "];"); }); } } break; default: break; } } break; } default: break; } set_name(ib_type_id, to_name(ir.default_entry_point) + "_" + ib_var_ref); set_name(ib_var_id, ib_var_ref); for (auto *p_var : vars) { bool strip_array = (is_tesc_shader() || (is_tese_shader() && storage == StorageClassInput)) && !patch; // Fixing up flattened stores in TESC is impossible since the memory is group shared either via // device (not masked) or threadgroup (masked) storage classes and it's race condition city. meta.strip_array = strip_array; meta.allow_local_declaration = !strip_array && !(is_tesc_shader() && storage == StorageClassOutput); add_variable_to_interface_block(storage, ib_var_ref, ib_type, *p_var, meta); } if (((is_tesc_shader() && msl_options.multi_patch_workgroup) || (is_tese_shader() && msl_options.raw_buffer_tese_input)) && storage == StorageClassInput) { // For tessellation inputs, add all outputs from the previous stage to ensure // the struct containing them is the correct size and layout. for (auto &input : inputs_by_location) { if (location_inputs_in_use.count(input.first.location) != 0) continue; if (patch != (input.second.rate == MSL_SHADER_VARIABLE_RATE_PER_PATCH)) continue; // Tessellation levels have their own struct, so there's no need to add them here. if (input.second.builtin == BuiltInTessLevelOuter || input.second.builtin == BuiltInTessLevelInner) continue; // Create a fake variable to put at the location. uint32_t offset = ir.increase_bound_by(5); uint32_t type_id = offset; uint32_t vec_type_id = offset + 1; uint32_t array_type_id = offset + 2; uint32_t ptr_type_id = offset + 3; uint32_t var_id = offset + 4; SPIRType type { OpTypeInt }; switch (input.second.format) { case MSL_SHADER_VARIABLE_FORMAT_UINT16: case MSL_SHADER_VARIABLE_FORMAT_ANY16: type.basetype = SPIRType::UShort; type.width = 16; break; case MSL_SHADER_VARIABLE_FORMAT_ANY32: default: type.basetype = SPIRType::UInt; type.width = 32; break; } set(type_id, type); if (input.second.vecsize > 1) { type.op = OpTypeVector; type.vecsize = input.second.vecsize; set(vec_type_id, type); type_id = vec_type_id; } type.op = OpTypeArray; type.array.push_back(0); type.array_size_literal.push_back(true); type.parent_type = type_id; set(array_type_id, type); type.self = type_id; type.op = OpTypePointer; type.pointer = true; type.pointer_depth++; type.parent_type = array_type_id; type.storage = storage; auto &ptr_type = set(ptr_type_id, type); ptr_type.self = array_type_id; auto &fake_var = set(var_id, ptr_type_id, storage); set_decoration(var_id, DecorationLocation, input.first.location); if (input.first.component) set_decoration(var_id, DecorationComponent, input.first.component); meta.strip_array = true; meta.allow_local_declaration = false; add_variable_to_interface_block(storage, ib_var_ref, ib_type, fake_var, meta); } } if (capture_output_to_buffer && storage == StorageClassOutput) { // For captured output, add all inputs from the next stage to ensure // the struct containing them is the correct size and layout. This is // necessary for certain implicit builtins that may nonetheless be read, // even when they aren't written. for (auto &output : outputs_by_location) { if (location_outputs_in_use.count(output.first.location) != 0) continue; // Create a fake variable to put at the location. uint32_t offset = ir.increase_bound_by(5); uint32_t type_id = offset; uint32_t vec_type_id = offset + 1; uint32_t array_type_id = offset + 2; uint32_t ptr_type_id = offset + 3; uint32_t var_id = offset + 4; SPIRType type { OpTypeInt }; switch (output.second.format) { case MSL_SHADER_VARIABLE_FORMAT_UINT16: case MSL_SHADER_VARIABLE_FORMAT_ANY16: type.basetype = SPIRType::UShort; type.width = 16; break; case MSL_SHADER_VARIABLE_FORMAT_ANY32: default: type.basetype = SPIRType::UInt; type.width = 32; break; } set(type_id, type); if (output.second.vecsize > 1) { type.op = OpTypeVector; type.vecsize = output.second.vecsize; set(vec_type_id, type); type_id = vec_type_id; } if (is_tesc_shader()) { type.op = OpTypeArray; type.array.push_back(0); type.array_size_literal.push_back(true); type.parent_type = type_id; set(array_type_id, type); } type.op = OpTypePointer; type.pointer = true; type.pointer_depth++; type.parent_type = is_tesc_shader() ? array_type_id : type_id; type.storage = storage; auto &ptr_type = set(ptr_type_id, type); ptr_type.self = type.parent_type; auto &fake_var = set(var_id, ptr_type_id, storage); set_decoration(var_id, DecorationLocation, output.first.location); if (output.first.component) set_decoration(var_id, DecorationComponent, output.first.component); meta.strip_array = true; meta.allow_local_declaration = false; add_variable_to_interface_block(storage, ib_var_ref, ib_type, fake_var, meta); } } // When multiple variables need to access same location, // unroll locations one by one and we will flatten output or input as necessary. for (auto &loc : meta.location_meta) { uint32_t location = loc.first; auto &location_meta = loc.second; uint32_t ib_mbr_idx = uint32_t(ib_type.member_types.size()); uint32_t type_id = build_extended_vector_type(location_meta.base_type_id, location_meta.num_components); ib_type.member_types.push_back(type_id); set_member_name(ib_type.self, ib_mbr_idx, join("m_location_", location)); set_member_decoration(ib_type.self, ib_mbr_idx, DecorationLocation, location); mark_location_as_used_by_shader(location, get(type_id), storage); if (location_meta.flat) set_member_decoration(ib_type.self, ib_mbr_idx, DecorationFlat); if (location_meta.noperspective) set_member_decoration(ib_type.self, ib_mbr_idx, DecorationNoPerspective); if (location_meta.centroid) set_member_decoration(ib_type.self, ib_mbr_idx, DecorationCentroid); if (location_meta.sample) set_member_decoration(ib_type.self, ib_mbr_idx, DecorationSample); } // Sort the members of the structure by their locations. MemberSorter member_sorter(ib_type, ir.meta[ib_type_id], MemberSorter::LocationThenBuiltInType); member_sorter.sort(); // The member indices were saved to the original variables, but after the members // were sorted, those indices are now likely incorrect. Fix those up now. fix_up_interface_member_indices(storage, ib_type_id); // For patch inputs, add one more member, holding the array of control point data. if (is_tese_shader() && !msl_options.raw_buffer_tese_input && storage == StorageClassInput && patch && stage_in_var_id) { uint32_t pcp_type_id = ir.increase_bound_by(1); auto &pcp_type = set(pcp_type_id, ib_type); pcp_type.basetype = SPIRType::ControlPointArray; pcp_type.parent_type = pcp_type.type_alias = get_stage_in_struct_type().self; pcp_type.storage = storage; ir.meta[pcp_type_id] = ir.meta[ib_type.self]; uint32_t mbr_idx = uint32_t(ib_type.member_types.size()); ib_type.member_types.push_back(pcp_type_id); set_member_name(ib_type.self, mbr_idx, "gl_in"); } if (storage == StorageClassInput) set_decoration(ib_var_id, DecorationNonWritable); return ib_var_id; } uint32_t CompilerMSL::add_interface_block_pointer(uint32_t ib_var_id, StorageClass storage) { if (!ib_var_id) return 0; uint32_t ib_ptr_var_id; uint32_t next_id = ir.increase_bound_by(3); auto &ib_type = expression_type(ib_var_id); if (is_tesc_shader() || (is_tese_shader() && msl_options.raw_buffer_tese_input)) { // Tessellation control per-vertex I/O is presented as an array, so we must // do the same with our struct here. uint32_t ib_ptr_type_id = next_id++; auto &ib_ptr_type = set(ib_ptr_type_id, ib_type); ib_ptr_type.op = OpTypePointer; ib_ptr_type.parent_type = ib_ptr_type.type_alias = ib_type.self; ib_ptr_type.pointer = true; ib_ptr_type.pointer_depth++; ib_ptr_type.storage = storage == StorageClassInput ? ((is_tesc_shader() && msl_options.multi_patch_workgroup) || (is_tese_shader() && msl_options.raw_buffer_tese_input) ? StorageClassStorageBuffer : StorageClassWorkgroup) : StorageClassStorageBuffer; ir.meta[ib_ptr_type_id] = ir.meta[ib_type.self]; // To ensure that get_variable_data_type() doesn't strip off the pointer, // which we need, use another pointer. uint32_t ib_ptr_ptr_type_id = next_id++; auto &ib_ptr_ptr_type = set(ib_ptr_ptr_type_id, ib_ptr_type); ib_ptr_ptr_type.parent_type = ib_ptr_type_id; ib_ptr_ptr_type.type_alias = ib_type.self; ib_ptr_ptr_type.storage = StorageClassFunction; ir.meta[ib_ptr_ptr_type_id] = ir.meta[ib_type.self]; ib_ptr_var_id = next_id; set(ib_ptr_var_id, ib_ptr_ptr_type_id, StorageClassFunction, 0); set_name(ib_ptr_var_id, storage == StorageClassInput ? "gl_in" : "gl_out"); if (storage == StorageClassInput) set_decoration(ib_ptr_var_id, DecorationNonWritable); } else { // Tessellation evaluation per-vertex inputs are also presented as arrays. // But, in Metal, this array uses a very special type, 'patch_control_point', // which is a container that can be used to access the control point data. // To represent this, a special 'ControlPointArray' type has been added to the // SPIRV-Cross type system. It should only be generated by and seen in the MSL // backend (i.e. this one). uint32_t pcp_type_id = next_id++; auto &pcp_type = set(pcp_type_id, ib_type); pcp_type.basetype = SPIRType::ControlPointArray; pcp_type.parent_type = pcp_type.type_alias = ib_type.self; pcp_type.storage = storage; ir.meta[pcp_type_id] = ir.meta[ib_type.self]; ib_ptr_var_id = next_id; set(ib_ptr_var_id, pcp_type_id, storage, 0); set_name(ib_ptr_var_id, "gl_in"); ir.meta[ib_ptr_var_id].decoration.qualified_alias = join(patch_stage_in_var_name, ".gl_in"); } return ib_ptr_var_id; } // Ensure that the type is compatible with the builtin. // If it is, simply return the given type ID. // Otherwise, create a new type, and return it's ID. uint32_t CompilerMSL::ensure_correct_builtin_type(uint32_t type_id, BuiltIn builtin) { auto &type = get(type_id); auto &pointee_type = get_pointee_type(type); if ((builtin == BuiltInSampleMask && is_array(pointee_type)) || ((builtin == BuiltInLayer || builtin == BuiltInViewportIndex || builtin == BuiltInFragStencilRefEXT) && pointee_type.basetype != SPIRType::UInt)) { uint32_t next_id = ir.increase_bound_by(type_is_pointer(type) ? 2 : 1); uint32_t base_type_id = next_id++; auto &base_type = set(base_type_id, OpTypeInt); base_type.basetype = SPIRType::UInt; base_type.width = 32; if (!type_is_pointer(type)) return base_type_id; uint32_t ptr_type_id = next_id++; auto &ptr_type = set(ptr_type_id, base_type); ptr_type.op = spv::OpTypePointer; ptr_type.pointer = true; ptr_type.pointer_depth++; ptr_type.storage = type.storage; ptr_type.parent_type = base_type_id; return ptr_type_id; } return type_id; } // Ensure that the type is compatible with the shader input. // If it is, simply return the given type ID. // Otherwise, create a new type, and return its ID. uint32_t CompilerMSL::ensure_correct_input_type(uint32_t type_id, uint32_t location, uint32_t component, uint32_t num_components, bool strip_array) { auto &type = get(type_id); uint32_t max_array_dimensions = strip_array ? 1 : 0; // Struct and array types must match exactly. if (type.basetype == SPIRType::Struct || type.array.size() > max_array_dimensions) return type_id; auto p_va = inputs_by_location.find({location, component}); if (p_va == end(inputs_by_location)) { if (num_components > type.vecsize) return build_extended_vector_type(type_id, num_components); else return type_id; } if (num_components == 0) num_components = p_va->second.vecsize; switch (p_va->second.format) { case MSL_SHADER_VARIABLE_FORMAT_UINT8: { switch (type.basetype) { case SPIRType::UByte: case SPIRType::UShort: case SPIRType::UInt: if (num_components > type.vecsize) return build_extended_vector_type(type_id, num_components); else return type_id; case SPIRType::Short: return build_extended_vector_type(type_id, num_components > type.vecsize ? num_components : type.vecsize, SPIRType::UShort); case SPIRType::Int: return build_extended_vector_type(type_id, num_components > type.vecsize ? num_components : type.vecsize, SPIRType::UInt); default: SPIRV_CROSS_THROW("Vertex attribute type mismatch between host and shader"); } } case MSL_SHADER_VARIABLE_FORMAT_UINT16: { switch (type.basetype) { case SPIRType::UShort: case SPIRType::UInt: if (num_components > type.vecsize) return build_extended_vector_type(type_id, num_components); else return type_id; case SPIRType::Int: return build_extended_vector_type(type_id, num_components > type.vecsize ? num_components : type.vecsize, SPIRType::UInt); default: SPIRV_CROSS_THROW("Vertex attribute type mismatch between host and shader"); } } default: if (num_components > type.vecsize) type_id = build_extended_vector_type(type_id, num_components); break; } return type_id; } void CompilerMSL::mark_struct_members_packed(const SPIRType &type) { // Handle possible recursion when a struct contains a pointer to its own type nested somewhere. if (has_extended_decoration(type.self, SPIRVCrossDecorationPhysicalTypePacked)) return; set_extended_decoration(type.self, SPIRVCrossDecorationPhysicalTypePacked); // Problem case! Struct needs to be placed at an awkward alignment. // Mark every member of the child struct as packed. uint32_t mbr_cnt = uint32_t(type.member_types.size()); for (uint32_t i = 0; i < mbr_cnt; i++) { auto &mbr_type = get(type.member_types[i]); if (mbr_type.basetype == SPIRType::Struct) { // Recursively mark structs as packed. auto *struct_type = &mbr_type; while (!struct_type->array.empty()) struct_type = &get(struct_type->parent_type); mark_struct_members_packed(*struct_type); } else if (!is_scalar(mbr_type)) set_extended_member_decoration(type.self, i, SPIRVCrossDecorationPhysicalTypePacked); } } void CompilerMSL::mark_scalar_layout_structs(const SPIRType &type) { uint32_t mbr_cnt = uint32_t(type.member_types.size()); for (uint32_t i = 0; i < mbr_cnt; i++) { // Handle possible recursion when a struct contains a pointer to its own type nested somewhere. auto &mbr_type = get(type.member_types[i]); if (mbr_type.basetype == SPIRType::Struct && !(mbr_type.pointer && mbr_type.storage == StorageClassPhysicalStorageBuffer)) { auto *struct_type = &mbr_type; while (!struct_type->array.empty()) struct_type = &get(struct_type->parent_type); if (has_extended_decoration(struct_type->self, SPIRVCrossDecorationPhysicalTypePacked)) continue; uint32_t msl_alignment = get_declared_struct_member_alignment_msl(type, i); uint32_t msl_size = get_declared_struct_member_size_msl(type, i); uint32_t spirv_offset = type_struct_member_offset(type, i); uint32_t spirv_offset_next; if (i + 1 < mbr_cnt) spirv_offset_next = type_struct_member_offset(type, i + 1); else spirv_offset_next = spirv_offset + msl_size; // Both are complicated cases. In scalar layout, a struct of float3 might just consume 12 bytes, // and the next member will be placed at offset 12. bool struct_is_misaligned = (spirv_offset % msl_alignment) != 0; bool struct_is_too_large = spirv_offset + msl_size > spirv_offset_next; uint32_t array_stride = 0; bool struct_needs_explicit_padding = false; // Verify that if a struct is used as an array that ArrayStride matches the effective size of the struct. if (!mbr_type.array.empty()) { array_stride = type_struct_member_array_stride(type, i); uint32_t dimensions = uint32_t(mbr_type.array.size() - 1); for (uint32_t dim = 0; dim < dimensions; dim++) { uint32_t array_size = to_array_size_literal(mbr_type, dim); array_stride /= max(array_size, 1u); } // Set expected struct size based on ArrayStride. struct_needs_explicit_padding = true; // If struct size is larger than array stride, we might be able to fit, if we tightly pack. if (get_declared_struct_size_msl(*struct_type) > array_stride) struct_is_too_large = true; } if (struct_is_misaligned || struct_is_too_large) mark_struct_members_packed(*struct_type); mark_scalar_layout_structs(*struct_type); if (struct_needs_explicit_padding) { msl_size = get_declared_struct_size_msl(*struct_type, true, true); if (array_stride < msl_size) { SPIRV_CROSS_THROW("Cannot express an array stride smaller than size of struct type."); } else { if (has_extended_decoration(struct_type->self, SPIRVCrossDecorationPaddingTarget)) { if (array_stride != get_extended_decoration(struct_type->self, SPIRVCrossDecorationPaddingTarget)) SPIRV_CROSS_THROW( "A struct is used with different array strides. Cannot express this in MSL."); } else set_extended_decoration(struct_type->self, SPIRVCrossDecorationPaddingTarget, array_stride); } } } } } // Sort the members of the struct type by offset, and pack and then pad members where needed // to align MSL members with SPIR-V offsets. The struct members are iterated twice. Packing // occurs first, followed by padding, because packing a member reduces both its size and its // natural alignment, possibly requiring a padding member to be added ahead of it. void CompilerMSL::align_struct(SPIRType &ib_type, unordered_set &aligned_structs) { // We align structs recursively, so stop any redundant work. ID &ib_type_id = ib_type.self; if (aligned_structs.count(ib_type_id)) return; aligned_structs.insert(ib_type_id); // Sort the members of the interface structure by their offset. // They should already be sorted per SPIR-V spec anyway. MemberSorter member_sorter(ib_type, ir.meta[ib_type_id], MemberSorter::Offset); member_sorter.sort(); auto mbr_cnt = uint32_t(ib_type.member_types.size()); for (uint32_t mbr_idx = 0; mbr_idx < mbr_cnt; mbr_idx++) { // Pack any dependent struct types before we pack a parent struct. auto &mbr_type = get(ib_type.member_types[mbr_idx]); if (mbr_type.basetype == SPIRType::Struct) align_struct(mbr_type, aligned_structs); } // Test the alignment of each member, and if a member should be closer to the previous // member than the default spacing expects, it is likely that the previous member is in // a packed format. If so, and the previous member is packable, pack it. // For example ... this applies to any 3-element vector that is followed by a scalar. uint32_t msl_offset = 0; for (uint32_t mbr_idx = 0; mbr_idx < mbr_cnt; mbr_idx++) { // This checks the member in isolation, if the member needs some kind of type remapping to conform to SPIR-V // offsets, array strides and matrix strides. ensure_member_packing_rules_msl(ib_type, mbr_idx); // Align current offset to the current member's default alignment. If the member was packed, it will observe // the updated alignment here. uint32_t msl_align_mask = get_declared_struct_member_alignment_msl(ib_type, mbr_idx) - 1; uint32_t aligned_msl_offset = (msl_offset + msl_align_mask) & ~msl_align_mask; // Fetch the member offset as declared in the SPIRV. uint32_t spirv_mbr_offset = get_member_decoration(ib_type_id, mbr_idx, DecorationOffset); if (spirv_mbr_offset > aligned_msl_offset) { // Since MSL and SPIR-V have slightly different struct member alignment and // size rules, we'll pad to standard C-packing rules with a char[] array. If the member is farther // away than C-packing, expects, add an inert padding member before the the member. uint32_t padding_bytes = spirv_mbr_offset - aligned_msl_offset; set_extended_member_decoration(ib_type_id, mbr_idx, SPIRVCrossDecorationPaddingTarget, padding_bytes); // Re-align as a sanity check that aligning post-padding matches up. msl_offset += padding_bytes; aligned_msl_offset = (msl_offset + msl_align_mask) & ~msl_align_mask; } else if (spirv_mbr_offset < aligned_msl_offset) { // This should not happen, but deal with unexpected scenarios. // It *might* happen if a sub-struct has a larger alignment requirement in MSL than SPIR-V. SPIRV_CROSS_THROW("Cannot represent buffer block correctly in MSL."); } assert(aligned_msl_offset == spirv_mbr_offset); // Increment the current offset to be positioned immediately after the current member. // Don't do this for the last member since it can be unsized, and it is not relevant for padding purposes here. if (mbr_idx + 1 < mbr_cnt) msl_offset = aligned_msl_offset + get_declared_struct_member_size_msl(ib_type, mbr_idx); } } bool CompilerMSL::validate_member_packing_rules_msl(const SPIRType &type, uint32_t index) const { auto &mbr_type = get(type.member_types[index]); uint32_t spirv_offset = get_member_decoration(type.self, index, DecorationOffset); if (index + 1 < type.member_types.size()) { // First, we will check offsets. If SPIR-V offset + MSL size > SPIR-V offset of next member, // we *must* perform some kind of remapping, no way getting around it. // We can always pad after this member if necessary, so that case is fine. uint32_t spirv_offset_next = get_member_decoration(type.self, index + 1, DecorationOffset); assert(spirv_offset_next >= spirv_offset); uint32_t maximum_size = spirv_offset_next - spirv_offset; uint32_t msl_mbr_size = get_declared_struct_member_size_msl(type, index); if (msl_mbr_size > maximum_size) return false; } if (!mbr_type.array.empty()) { // If we have an array type, array stride must match exactly with SPIR-V. // An exception to this requirement is if we have one array element. // This comes from DX scalar layout workaround. // If app tries to be cheeky and access the member out of bounds, this will not work, but this is the best we can do. // In OpAccessChain with logical memory models, access chains must be in-bounds in SPIR-V specification. bool relax_array_stride = mbr_type.array.back() == 1 && mbr_type.array_size_literal.back(); if (!relax_array_stride) { uint32_t spirv_array_stride = type_struct_member_array_stride(type, index); uint32_t msl_array_stride = get_declared_struct_member_array_stride_msl(type, index); if (spirv_array_stride != msl_array_stride) return false; } } if (is_matrix(mbr_type)) { // Need to check MatrixStride as well. uint32_t spirv_matrix_stride = type_struct_member_matrix_stride(type, index); uint32_t msl_matrix_stride = get_declared_struct_member_matrix_stride_msl(type, index); if (spirv_matrix_stride != msl_matrix_stride) return false; } // Now, we check alignment. uint32_t msl_alignment = get_declared_struct_member_alignment_msl(type, index); if ((spirv_offset % msl_alignment) != 0) return false; // We're in the clear. return true; } // Here we need to verify that the member type we declare conforms to Offset, ArrayStride or MatrixStride restrictions. // If there is a mismatch, we need to emit remapped types, either normal types, or "packed_X" types. // In odd cases we need to emit packed and remapped types, for e.g. weird matrices or arrays with weird array strides. void CompilerMSL::ensure_member_packing_rules_msl(SPIRType &ib_type, uint32_t index) { if (validate_member_packing_rules_msl(ib_type, index)) return; // We failed validation. // This case will be nightmare-ish to deal with. This could possibly happen if struct alignment does not quite // match up with what we want. Scalar block layout comes to mind here where we might have to work around the rule // that struct alignment == max alignment of all members and struct size depends on this alignment. // Can't repack structs, but can repack pointers to structs. auto &mbr_type = get(ib_type.member_types[index]); bool is_buff_ptr = mbr_type.pointer && mbr_type.storage == StorageClassPhysicalStorageBuffer; if (mbr_type.basetype == SPIRType::Struct && !is_buff_ptr) SPIRV_CROSS_THROW("Cannot perform any repacking for structs when it is used as a member of another struct."); // Perform remapping here. // There is nothing to be gained by using packed scalars, so don't attempt it. if (!is_scalar(ib_type)) set_extended_member_decoration(ib_type.self, index, SPIRVCrossDecorationPhysicalTypePacked); // Try validating again, now with packed. if (validate_member_packing_rules_msl(ib_type, index)) return; // We're in deep trouble, and we need to create a new PhysicalType which matches up with what we expect. // A lot of work goes here ... // We will need remapping on Load and Store to translate the types between Logical and Physical. // First, we check if we have small vector std140 array. // We detect this if we have an array of vectors, and array stride is greater than number of elements. if (!mbr_type.array.empty() && !is_matrix(mbr_type)) { uint32_t array_stride = type_struct_member_array_stride(ib_type, index); // Hack off array-of-arrays until we find the array stride per element we must have to make it work. uint32_t dimensions = uint32_t(mbr_type.array.size() - 1); for (uint32_t dim = 0; dim < dimensions; dim++) array_stride /= max(to_array_size_literal(mbr_type, dim), 1u); // Pointers are 8 bytes uint32_t mbr_width_in_bytes = is_buff_ptr ? 8 : (mbr_type.width / 8); uint32_t elems_per_stride = array_stride / mbr_width_in_bytes; if (elems_per_stride == 3) SPIRV_CROSS_THROW("Cannot use ArrayStride of 3 elements in remapping scenarios."); else if (elems_per_stride > 4 && elems_per_stride != 8) SPIRV_CROSS_THROW("Cannot represent vectors with more than 4 elements in MSL."); if (elems_per_stride == 8) { if (mbr_type.width == 16) add_spv_func_and_recompile(SPVFuncImplPaddedStd140); else SPIRV_CROSS_THROW("Unexpected type in std140 wide array resolve."); } auto physical_type = mbr_type; physical_type.vecsize = elems_per_stride; physical_type.parent_type = 0; // If this is a physical buffer pointer, replace type with a ulongn vector. if (is_buff_ptr) { physical_type.width = 64; physical_type.basetype = to_unsigned_basetype(physical_type.width); physical_type.pointer = false; physical_type.pointer_depth = false; physical_type.forward_pointer = false; } uint32_t type_id = ir.increase_bound_by(1); set(type_id, physical_type); set_extended_member_decoration(ib_type.self, index, SPIRVCrossDecorationPhysicalTypeID, type_id); set_decoration(type_id, DecorationArrayStride, array_stride); // Remove packed_ for vectors of size 1, 2 and 4. unset_extended_member_decoration(ib_type.self, index, SPIRVCrossDecorationPhysicalTypePacked); } else if (is_matrix(mbr_type)) { // MatrixStride might be std140-esque. uint32_t matrix_stride = type_struct_member_matrix_stride(ib_type, index); uint32_t elems_per_stride = matrix_stride / (mbr_type.width / 8); if (elems_per_stride == 3) SPIRV_CROSS_THROW("Cannot use ArrayStride of 3 elements in remapping scenarios."); else if (elems_per_stride > 4 && elems_per_stride != 8) SPIRV_CROSS_THROW("Cannot represent vectors with more than 4 elements in MSL."); if (elems_per_stride == 8) { if (mbr_type.basetype != SPIRType::Half) SPIRV_CROSS_THROW("Unexpected type in std140 wide matrix stride resolve."); add_spv_func_and_recompile(SPVFuncImplPaddedStd140); } bool row_major = has_member_decoration(ib_type.self, index, DecorationRowMajor); auto physical_type = mbr_type; physical_type.parent_type = 0; if (row_major) physical_type.columns = elems_per_stride; else physical_type.vecsize = elems_per_stride; uint32_t type_id = ir.increase_bound_by(1); set(type_id, physical_type); set_extended_member_decoration(ib_type.self, index, SPIRVCrossDecorationPhysicalTypeID, type_id); // Remove packed_ for vectors of size 1, 2 and 4. unset_extended_member_decoration(ib_type.self, index, SPIRVCrossDecorationPhysicalTypePacked); } else SPIRV_CROSS_THROW("Found a buffer packing case which we cannot represent in MSL."); // Try validating again, now with physical type remapping. if (validate_member_packing_rules_msl(ib_type, index)) return; // We might have a particular odd scalar layout case where the last element of an array // does not take up as much space as the ArrayStride or MatrixStride. This can happen with DX cbuffers. // The "proper" workaround for this is extremely painful and essentially impossible in the edge case of float3[], // so we hack around it by declaring the offending array or matrix with one less array size/col/row, // and rely on padding to get the correct value. We will technically access arrays out of bounds into the padding region, // but it should spill over gracefully without too much trouble. We rely on behavior like this for unsized arrays anyways. // E.g. we might observe a physical layout of: // { float2 a[2]; float b; } in cbuffer layout where ArrayStride of a is 16, but offset of b is 24, packed right after a[1] ... uint32_t type_id = get_extended_member_decoration(ib_type.self, index, SPIRVCrossDecorationPhysicalTypeID); auto &type = get(type_id); // Modify the physical type in-place. This is safe since each physical type workaround is a copy. if (is_array(type)) { if (type.array.back() > 1) { if (!type.array_size_literal.back()) SPIRV_CROSS_THROW("Cannot apply scalar layout workaround with spec constant array size."); type.array.back() -= 1; } else { // We have an array of size 1, so we cannot decrement that. Our only option now is to // force a packed layout instead, and drop the physical type remap since ArrayStride is meaningless now. unset_extended_member_decoration(ib_type.self, index, SPIRVCrossDecorationPhysicalTypeID); set_extended_member_decoration(ib_type.self, index, SPIRVCrossDecorationPhysicalTypePacked); } } else if (is_matrix(type)) { bool row_major = has_member_decoration(ib_type.self, index, DecorationRowMajor); if (!row_major) { // Slice off one column. If we only have 2 columns, this might turn the matrix into a vector with one array element instead. if (type.columns > 2) { type.columns--; } else if (type.columns == 2) { type.columns = 1; assert(type.array.empty()); type.op = OpTypeArray; type.array.push_back(1); type.array_size_literal.push_back(true); } } else { // Slice off one row. If we only have 2 rows, this might turn the matrix into a vector with one array element instead. if (type.vecsize > 2) { type.vecsize--; } else if (type.vecsize == 2) { type.vecsize = type.columns; type.columns = 1; assert(type.array.empty()); type.op = OpTypeArray; type.array.push_back(1); type.array_size_literal.push_back(true); } } } // This better validate now, or we must fail gracefully. if (!validate_member_packing_rules_msl(ib_type, index)) SPIRV_CROSS_THROW("Found a buffer packing case which we cannot represent in MSL."); } void CompilerMSL::emit_store_statement(uint32_t lhs_expression, uint32_t rhs_expression) { auto &type = expression_type(rhs_expression); bool lhs_remapped_type = has_extended_decoration(lhs_expression, SPIRVCrossDecorationPhysicalTypeID); bool lhs_packed_type = has_extended_decoration(lhs_expression, SPIRVCrossDecorationPhysicalTypePacked); auto *lhs_e = maybe_get(lhs_expression); auto *rhs_e = maybe_get(rhs_expression); bool transpose = lhs_e && lhs_e->need_transpose; if (has_decoration(lhs_expression, DecorationBuiltIn) && BuiltIn(get_decoration(lhs_expression, DecorationBuiltIn)) == BuiltInSampleMask && is_array(type)) { // Storing an array to SampleMask, have to remove the array-ness before storing. statement(to_expression(lhs_expression), " = ", to_enclosed_unpacked_expression(rhs_expression), "[0];"); register_write(lhs_expression); } else if (!lhs_remapped_type && !lhs_packed_type) { // No physical type remapping, and no packed type, so can just emit a store directly. // We might not be dealing with remapped physical types or packed types, // but we might be doing a clean store to a row-major matrix. // In this case, we just flip transpose states, and emit the store, a transpose must be in the RHS expression, if any. if (is_matrix(type) && lhs_e && lhs_e->need_transpose) { lhs_e->need_transpose = false; if (rhs_e && rhs_e->need_transpose) { // Direct copy, but might need to unpack RHS. // Skip the transpose, as we will transpose when writing to LHS and transpose(transpose(T)) == T. rhs_e->need_transpose = false; statement(to_expression(lhs_expression), " = ", to_unpacked_row_major_matrix_expression(rhs_expression), ";"); rhs_e->need_transpose = true; } else statement(to_expression(lhs_expression), " = transpose(", to_unpacked_expression(rhs_expression), ");"); lhs_e->need_transpose = true; register_write(lhs_expression); } else if (lhs_e && lhs_e->need_transpose) { lhs_e->need_transpose = false; // Storing a column to a row-major matrix. Unroll the write. for (uint32_t c = 0; c < type.vecsize; c++) { auto lhs_expr = to_dereferenced_expression(lhs_expression); auto column_index = lhs_expr.find_last_of('['); if (column_index != string::npos) { statement(lhs_expr.insert(column_index, join('[', c, ']')), " = ", to_extract_component_expression(rhs_expression, c), ";"); } } lhs_e->need_transpose = true; register_write(lhs_expression); } else CompilerGLSL::emit_store_statement(lhs_expression, rhs_expression); } else if (!lhs_remapped_type && !is_matrix(type) && !transpose) { // Even if the target type is packed, we can directly store to it. We cannot store to packed matrices directly, // since they are declared as array of vectors instead, and we need the fallback path below. CompilerGLSL::emit_store_statement(lhs_expression, rhs_expression); } else { // Special handling when storing to a remapped physical type. // This is mostly to deal with std140 padded matrices or vectors. TypeID physical_type_id = lhs_remapped_type ? ID(get_extended_decoration(lhs_expression, SPIRVCrossDecorationPhysicalTypeID)) : type.self; auto &physical_type = get(physical_type_id); string cast_addr_space = "thread"; auto *p_var_lhs = maybe_get_backing_variable(lhs_expression); if (p_var_lhs) cast_addr_space = get_type_address_space(get(p_var_lhs->basetype), lhs_expression); if (is_matrix(type)) { const char *packed_pfx = lhs_packed_type ? "packed_" : ""; // Packed matrices are stored as arrays of packed vectors, so we need // to assign the vectors one at a time. // For row-major matrices, we need to transpose the *right-hand* side, // not the left-hand side. // Lots of cases to cover here ... bool rhs_transpose = rhs_e && rhs_e->need_transpose; SPIRType write_type = type; string cast_expr; // We're dealing with transpose manually. if (rhs_transpose) rhs_e->need_transpose = false; if (transpose) { // We're dealing with transpose manually. lhs_e->need_transpose = false; write_type.vecsize = type.columns; write_type.columns = 1; if (physical_type.columns != type.columns) cast_expr = join("(", cast_addr_space, " ", packed_pfx, type_to_glsl(write_type), "&)"); if (rhs_transpose) { // If RHS is also transposed, we can just copy row by row. for (uint32_t i = 0; i < type.vecsize; i++) { statement(cast_expr, to_enclosed_expression(lhs_expression), "[", i, "]", " = ", to_unpacked_row_major_matrix_expression(rhs_expression), "[", i, "];"); } } else { auto vector_type = expression_type(rhs_expression); vector_type.vecsize = vector_type.columns; vector_type.columns = 1; // Transpose on the fly. Emitting a lot of full transpose() ops and extracting lanes seems very bad, // so pick out individual components instead. for (uint32_t i = 0; i < type.vecsize; i++) { string rhs_row = type_to_glsl_constructor(vector_type) + "("; for (uint32_t j = 0; j < vector_type.vecsize; j++) { rhs_row += join(to_enclosed_unpacked_expression(rhs_expression), "[", j, "][", i, "]"); if (j + 1 < vector_type.vecsize) rhs_row += ", "; } rhs_row += ")"; statement(cast_expr, to_enclosed_expression(lhs_expression), "[", i, "]", " = ", rhs_row, ";"); } } // We're dealing with transpose manually. lhs_e->need_transpose = true; } else { write_type.columns = 1; if (physical_type.vecsize != type.vecsize) cast_expr = join("(", cast_addr_space, " ", packed_pfx, type_to_glsl(write_type), "&)"); if (rhs_transpose) { auto vector_type = expression_type(rhs_expression); vector_type.columns = 1; // Transpose on the fly. Emitting a lot of full transpose() ops and extracting lanes seems very bad, // so pick out individual components instead. for (uint32_t i = 0; i < type.columns; i++) { string rhs_row = type_to_glsl_constructor(vector_type) + "("; for (uint32_t j = 0; j < vector_type.vecsize; j++) { // Need to explicitly unpack expression since we've mucked with transpose state. auto unpacked_expr = to_unpacked_row_major_matrix_expression(rhs_expression); rhs_row += join(unpacked_expr, "[", j, "][", i, "]"); if (j + 1 < vector_type.vecsize) rhs_row += ", "; } rhs_row += ")"; statement(cast_expr, to_enclosed_expression(lhs_expression), "[", i, "]", " = ", rhs_row, ";"); } } else { // Copy column-by-column. for (uint32_t i = 0; i < type.columns; i++) { statement(cast_expr, to_enclosed_expression(lhs_expression), "[", i, "]", " = ", to_enclosed_unpacked_expression(rhs_expression), "[", i, "];"); } } } // We're dealing with transpose manually. if (rhs_transpose) rhs_e->need_transpose = true; } else if (transpose) { lhs_e->need_transpose = false; SPIRType write_type = type; write_type.vecsize = 1; write_type.columns = 1; // Storing a column to a row-major matrix. Unroll the write. for (uint32_t c = 0; c < type.vecsize; c++) { auto lhs_expr = to_enclosed_expression(lhs_expression); auto column_index = lhs_expr.find_last_of('['); // Get rid of any ".data" half8 handling here, we're casting to scalar anyway. auto end_column_index = lhs_expr.find_last_of(']'); auto end_dot_index = lhs_expr.find_last_of('.'); if (end_dot_index != string::npos && end_dot_index > end_column_index) lhs_expr.resize(end_dot_index); if (column_index != string::npos) { statement("((", cast_addr_space, " ", type_to_glsl(write_type), "*)&", lhs_expr.insert(column_index, join('[', c, ']', ")")), " = ", to_extract_component_expression(rhs_expression, c), ";"); } } lhs_e->need_transpose = true; } else if ((is_matrix(physical_type) || is_array(physical_type)) && physical_type.vecsize <= 4 && physical_type.vecsize > type.vecsize) { assert(type.vecsize >= 1 && type.vecsize <= 3); // If we have packed types, we cannot use swizzled stores. // We could technically unroll the store for each element if needed. // When remapping to a std140 physical type, we always get float4, // and the packed decoration should always be removed. assert(!lhs_packed_type); string lhs = to_dereferenced_expression(lhs_expression); string rhs = to_pointer_expression(rhs_expression); // Unpack the expression so we can store to it with a float or float2. // It's still an l-value, so it's fine. Most other unpacking of expressions turn them into r-values instead. lhs = join("(", cast_addr_space, " ", type_to_glsl(type), "&)", enclose_expression(lhs)); if (!optimize_read_modify_write(expression_type(rhs_expression), lhs, rhs)) statement(lhs, " = ", rhs, ";"); } else if (!is_matrix(type)) { string lhs = to_dereferenced_expression(lhs_expression); string rhs = to_pointer_expression(rhs_expression); if (!optimize_read_modify_write(expression_type(rhs_expression), lhs, rhs)) statement(lhs, " = ", rhs, ";"); } register_write(lhs_expression); } } static bool expression_ends_with(const string &expr_str, const std::string &ending) { if (expr_str.length() >= ending.length()) return (expr_str.compare(expr_str.length() - ending.length(), ending.length(), ending) == 0); else return false; } // Converts the format of the current expression from packed to unpacked, // by wrapping the expression in a constructor of the appropriate type. // Also, handle special physical ID remapping scenarios, similar to emit_store_statement(). string CompilerMSL::unpack_expression_type(string expr_str, const SPIRType &type, uint32_t physical_type_id, bool packed, bool row_major) { // Trivial case, nothing to do. if (physical_type_id == 0 && !packed) return expr_str; const SPIRType *physical_type = nullptr; if (physical_type_id) physical_type = &get(physical_type_id); static const char *swizzle_lut[] = { ".x", ".xy", ".xyz", "", }; // TODO: Move everything to the template wrapper? bool uses_std140_wrapper = physical_type && physical_type->vecsize > 4; if (physical_type && is_vector(*physical_type) && is_array(*physical_type) && !uses_std140_wrapper && physical_type->vecsize > type.vecsize && !expression_ends_with(expr_str, swizzle_lut[type.vecsize - 1])) { // std140 array cases for vectors. assert(type.vecsize >= 1 && type.vecsize <= 3); return enclose_expression(expr_str) + swizzle_lut[type.vecsize - 1]; } else if (physical_type && is_matrix(*physical_type) && is_vector(type) && !uses_std140_wrapper && physical_type->vecsize > type.vecsize) { // Extract column from padded matrix. assert(type.vecsize >= 1 && type.vecsize <= 4); return enclose_expression(expr_str) + swizzle_lut[type.vecsize - 1]; } else if (is_matrix(type)) { // Packed matrices are stored as arrays of packed vectors. Unfortunately, // we can't just pass the array straight to the matrix constructor. We have to // pass each vector individually, so that they can be unpacked to normal vectors. if (!physical_type) physical_type = &type; uint32_t vecsize = type.vecsize; uint32_t columns = type.columns; if (row_major) swap(vecsize, columns); uint32_t physical_vecsize = row_major ? physical_type->columns : physical_type->vecsize; const char *base_type = type.width == 16 ? "half" : "float"; string unpack_expr = join(base_type, columns, "x", vecsize, "("); const char *load_swiz = ""; const char *data_swiz = physical_vecsize > 4 ? ".data" : ""; if (physical_vecsize != vecsize) load_swiz = swizzle_lut[vecsize - 1]; for (uint32_t i = 0; i < columns; i++) { if (i > 0) unpack_expr += ", "; if (packed) unpack_expr += join(base_type, physical_vecsize, "(", expr_str, "[", i, "]", ")", load_swiz); else unpack_expr += join(expr_str, "[", i, "]", data_swiz, load_swiz); } unpack_expr += ")"; return unpack_expr; } else { return join(type_to_glsl(type), "(", expr_str, ")"); } } // Emits the file header info void CompilerMSL::emit_header() { // This particular line can be overridden during compilation, so make it a flag and not a pragma line. if (suppress_missing_prototypes) statement("#pragma clang diagnostic ignored \"-Wmissing-prototypes\""); // Disable warning about missing braces for array template to make arrays a value type if (spv_function_implementations.count(SPVFuncImplUnsafeArray) != 0) statement("#pragma clang diagnostic ignored \"-Wmissing-braces\""); for (auto &pragma : pragma_lines) statement(pragma); if (!pragma_lines.empty() || suppress_missing_prototypes) statement(""); statement("#include "); statement("#include "); for (auto &header : header_lines) statement(header); statement(""); statement("using namespace metal;"); statement(""); for (auto &td : typedef_lines) statement(td); if (!typedef_lines.empty()) statement(""); } void CompilerMSL::add_pragma_line(const string &line) { auto rslt = pragma_lines.insert(line); if (rslt.second) force_recompile(); } void CompilerMSL::add_typedef_line(const string &line) { auto rslt = typedef_lines.insert(line); if (rslt.second) force_recompile(); } // Template struct like spvUnsafeArray<> need to be declared *before* any resources are declared void CompilerMSL::emit_custom_templates() { static const char * const address_spaces[] = { "thread", "constant", "device", "threadgroup", "threadgroup_imageblock", "ray_data", "object_data" }; for (const auto &spv_func : spv_function_implementations) { switch (spv_func) { case SPVFuncImplUnsafeArray: statement("template"); statement("struct spvUnsafeArray"); begin_scope(); statement("T elements[Num ? Num : 1];"); statement(""); statement("thread T& operator [] (size_t pos) thread"); begin_scope(); statement("return elements[pos];"); end_scope(); statement("constexpr const thread T& operator [] (size_t pos) const thread"); begin_scope(); statement("return elements[pos];"); end_scope(); statement(""); statement("device T& operator [] (size_t pos) device"); begin_scope(); statement("return elements[pos];"); end_scope(); statement("constexpr const device T& operator [] (size_t pos) const device"); begin_scope(); statement("return elements[pos];"); end_scope(); statement(""); statement("constexpr const constant T& operator [] (size_t pos) const constant"); begin_scope(); statement("return elements[pos];"); end_scope(); statement(""); statement("threadgroup T& operator [] (size_t pos) threadgroup"); begin_scope(); statement("return elements[pos];"); end_scope(); statement("constexpr const threadgroup T& operator [] (size_t pos) const threadgroup"); begin_scope(); statement("return elements[pos];"); end_scope(); end_scope_decl(); statement(""); break; case SPVFuncImplStorageMatrix: statement("template"); statement("struct spvStorageMatrix"); begin_scope(); statement("vec columns[Cols];"); statement(""); for (size_t method_idx = 0; method_idx < sizeof(address_spaces) / sizeof(address_spaces[0]); ++method_idx) { // Some address spaces require particular features. if (method_idx == 4) // threadgroup_imageblock statement("#ifdef __HAVE_IMAGEBLOCKS__"); else if (method_idx == 5) // ray_data statement("#ifdef __HAVE_RAYTRACING__"); else if (method_idx == 6) // object_data statement("#ifdef __HAVE_MESH__"); const string &method_as = address_spaces[method_idx]; statement("spvStorageMatrix() ", method_as, " = default;"); if (method_idx != 1) // constant { statement(method_as, " spvStorageMatrix& operator=(initializer_list> cols) ", method_as); begin_scope(); statement("size_t i;"); statement("thread vec* col;"); statement("for (i = 0, col = cols.begin(); i < Cols; ++i, ++col)"); statement(" columns[i] = *col;"); statement("return *this;"); end_scope(); } statement(""); for (size_t param_idx = 0; param_idx < sizeof(address_spaces) / sizeof(address_spaces[0]); ++param_idx) { if (param_idx != method_idx) { if (param_idx == 4) // threadgroup_imageblock statement("#ifdef __HAVE_IMAGEBLOCKS__"); else if (param_idx == 5) // ray_data statement("#ifdef __HAVE_RAYTRACING__"); else if (param_idx == 6) // object_data statement("#ifdef __HAVE_MESH__"); } const string ¶m_as = address_spaces[param_idx]; statement("spvStorageMatrix(const ", param_as, " matrix& m) ", method_as); begin_scope(); statement("for (size_t i = 0; i < Cols; ++i)"); statement(" columns[i] = m.columns[i];"); end_scope(); statement("spvStorageMatrix(const ", param_as, " spvStorageMatrix& m) ", method_as, " = default;"); if (method_idx != 1) // constant { statement(method_as, " spvStorageMatrix& operator=(const ", param_as, " matrix& m) ", method_as); begin_scope(); statement("for (size_t i = 0; i < Cols; ++i)"); statement(" columns[i] = m.columns[i];"); statement("return *this;"); end_scope(); statement(method_as, " spvStorageMatrix& operator=(const ", param_as, " spvStorageMatrix& m) ", method_as, " = default;"); } if (param_idx != method_idx && param_idx >= 4) statement("#endif"); statement(""); } statement("operator matrix() const ", method_as); begin_scope(); statement("matrix m;"); statement("for (int i = 0; i < Cols; ++i)"); statement(" m.columns[i] = columns[i];"); statement("return m;"); end_scope(); statement(""); statement("vec operator[](size_t idx) const ", method_as); begin_scope(); statement("return columns[idx];"); end_scope(); if (method_idx != 1) // constant { statement(method_as, " vec& operator[](size_t idx) ", method_as); begin_scope(); statement("return columns[idx];"); end_scope(); } if (method_idx >= 4) statement("#endif"); statement(""); } end_scope_decl(); statement(""); statement("template"); statement("matrix transpose(spvStorageMatrix m)"); begin_scope(); statement("return transpose(matrix(m));"); end_scope(); statement(""); statement("typedef spvStorageMatrix spvStorage_half2x2;"); statement("typedef spvStorageMatrix spvStorage_half2x3;"); statement("typedef spvStorageMatrix spvStorage_half2x4;"); statement("typedef spvStorageMatrix spvStorage_half3x2;"); statement("typedef spvStorageMatrix spvStorage_half3x3;"); statement("typedef spvStorageMatrix spvStorage_half3x4;"); statement("typedef spvStorageMatrix spvStorage_half4x2;"); statement("typedef spvStorageMatrix spvStorage_half4x3;"); statement("typedef spvStorageMatrix spvStorage_half4x4;"); statement("typedef spvStorageMatrix spvStorage_float2x2;"); statement("typedef spvStorageMatrix spvStorage_float2x3;"); statement("typedef spvStorageMatrix spvStorage_float2x4;"); statement("typedef spvStorageMatrix spvStorage_float3x2;"); statement("typedef spvStorageMatrix spvStorage_float3x3;"); statement("typedef spvStorageMatrix spvStorage_float3x4;"); statement("typedef spvStorageMatrix spvStorage_float4x2;"); statement("typedef spvStorageMatrix spvStorage_float4x3;"); statement("typedef spvStorageMatrix spvStorage_float4x4;"); statement(""); break; default: break; } } } // Emits any needed custom function bodies. // Metal helper functions must be static force-inline, i.e. static inline __attribute__((always_inline)) // otherwise they will cause problems when linked together in a single Metallib. void CompilerMSL::emit_custom_functions() { for (uint32_t i = kArrayCopyMultidimMax; i >= 2; i--) if (spv_function_implementations.count(static_cast(SPVFuncImplArrayCopyMultidimBase + i))) spv_function_implementations.insert(static_cast(SPVFuncImplArrayCopyMultidimBase + i - 1)); if (spv_function_implementations.count(SPVFuncImplDynamicImageSampler)) { // Unfortunately, this one needs a lot of the other functions to compile OK. if (!msl_options.supports_msl_version(2)) SPIRV_CROSS_THROW( "spvDynamicImageSampler requires default-constructible texture objects, which require MSL 2.0."); spv_function_implementations.insert(SPVFuncImplForwardArgs); spv_function_implementations.insert(SPVFuncImplTextureSwizzle); if (msl_options.swizzle_texture_samples) spv_function_implementations.insert(SPVFuncImplGatherSwizzle); for (uint32_t i = SPVFuncImplChromaReconstructNearest2Plane; i <= SPVFuncImplChromaReconstructLinear420XMidpointYMidpoint3Plane; i++) spv_function_implementations.insert(static_cast(i)); spv_function_implementations.insert(SPVFuncImplExpandITUFullRange); spv_function_implementations.insert(SPVFuncImplExpandITUNarrowRange); spv_function_implementations.insert(SPVFuncImplConvertYCbCrBT709); spv_function_implementations.insert(SPVFuncImplConvertYCbCrBT601); spv_function_implementations.insert(SPVFuncImplConvertYCbCrBT2020); } for (uint32_t i = SPVFuncImplChromaReconstructNearest2Plane; i <= SPVFuncImplChromaReconstructLinear420XMidpointYMidpoint3Plane; i++) if (spv_function_implementations.count(static_cast(i))) spv_function_implementations.insert(SPVFuncImplForwardArgs); if (spv_function_implementations.count(SPVFuncImplTextureSwizzle) || spv_function_implementations.count(SPVFuncImplGatherSwizzle) || spv_function_implementations.count(SPVFuncImplGatherCompareSwizzle)) { spv_function_implementations.insert(SPVFuncImplForwardArgs); spv_function_implementations.insert(SPVFuncImplGetSwizzle); } for (const auto &spv_func : spv_function_implementations) { switch (spv_func) { case SPVFuncImplMod: statement("// Implementation of the GLSL mod() function, which is slightly different than Metal fmod()"); statement("template"); statement("inline Tx mod(Tx x, Ty y)"); begin_scope(); statement("return x - y * floor(x / y);"); end_scope(); statement(""); break; case SPVFuncImplRadians: statement("// Implementation of the GLSL radians() function"); statement("template"); statement("inline T radians(T d)"); begin_scope(); statement("return d * T(0.01745329251);"); end_scope(); statement(""); break; case SPVFuncImplDegrees: statement("// Implementation of the GLSL degrees() function"); statement("template"); statement("inline T degrees(T r)"); begin_scope(); statement("return r * T(57.2957795131);"); end_scope(); statement(""); break; case SPVFuncImplFindILsb: statement("// Implementation of the GLSL findLSB() function"); statement("template"); statement("inline T spvFindLSB(T x)"); begin_scope(); statement("return select(ctz(x), T(-1), x == T(0));"); end_scope(); statement(""); break; case SPVFuncImplFindUMsb: statement("// Implementation of the unsigned GLSL findMSB() function"); statement("template"); statement("inline T spvFindUMSB(T x)"); begin_scope(); statement("return select(clz(T(0)) - (clz(x) + T(1)), T(-1), x == T(0));"); end_scope(); statement(""); break; case SPVFuncImplFindSMsb: statement("// Implementation of the signed GLSL findMSB() function"); statement("template"); statement("inline T spvFindSMSB(T x)"); begin_scope(); statement("T v = select(x, T(-1) - x, x < T(0));"); statement("return select(clz(T(0)) - (clz(v) + T(1)), T(-1), v == T(0));"); end_scope(); statement(""); break; case SPVFuncImplSSign: statement("// Implementation of the GLSL sign() function for integer types"); statement("template::value>::type>"); statement("inline T sign(T x)"); begin_scope(); statement("return select(select(select(x, T(0), x == T(0)), T(1), x > T(0)), T(-1), x < T(0));"); end_scope(); statement(""); break; case SPVFuncImplArrayCopy: case SPVFuncImplArrayOfArrayCopy2Dim: case SPVFuncImplArrayOfArrayCopy3Dim: case SPVFuncImplArrayOfArrayCopy4Dim: case SPVFuncImplArrayOfArrayCopy5Dim: case SPVFuncImplArrayOfArrayCopy6Dim: { // Unfortunately we cannot template on the address space, so combinatorial explosion it is. static const char *function_name_tags[] = { "FromConstantToStack", "FromConstantToThreadGroup", "FromStackToStack", "FromStackToThreadGroup", "FromThreadGroupToStack", "FromThreadGroupToThreadGroup", "FromDeviceToDevice", "FromConstantToDevice", "FromStackToDevice", "FromThreadGroupToDevice", "FromDeviceToStack", "FromDeviceToThreadGroup", }; static const char *src_address_space[] = { "constant", "constant", "thread const", "thread const", "threadgroup const", "threadgroup const", "device const", "constant", "thread const", "threadgroup const", "device const", "device const", }; static const char *dst_address_space[] = { "thread", "threadgroup", "thread", "threadgroup", "thread", "threadgroup", "device", "device", "device", "device", "thread", "threadgroup", }; for (uint32_t variant = 0; variant < 12; variant++) { uint8_t dimensions = spv_func - SPVFuncImplArrayCopyMultidimBase; string tmp = "template 0) { string tex_width_str = convert_to_string(msl_options.texel_buffer_texture_width); statement("// Returns 2D texture coords corresponding to 1D texel buffer coords"); statement(force_inline); statement("uint2 spvTexelBufferCoord(uint tc)"); begin_scope(); statement(join("return uint2(tc % ", tex_width_str, ", tc / ", tex_width_str, ");")); end_scope(); statement(""); } else { statement("// Returns 2D texture coords corresponding to 1D texel buffer coords"); statement( "#define spvTexelBufferCoord(tc, tex) uint2((tc) % (tex).get_width(), (tc) / (tex).get_width())"); statement(""); } break; } // Emulate texture2D atomic operations case SPVFuncImplImage2DAtomicCoords: { if (msl_options.supports_msl_version(1, 2)) { statement("// The required alignment of a linear texture of R32Uint format."); statement("constant uint spvLinearTextureAlignmentOverride [[function_constant(", msl_options.r32ui_alignment_constant_id, ")]];"); statement("constant uint spvLinearTextureAlignment = ", "is_function_constant_defined(spvLinearTextureAlignmentOverride) ? ", "spvLinearTextureAlignmentOverride : ", msl_options.r32ui_linear_texture_alignment, ";"); } else { statement("// The required alignment of a linear texture of R32Uint format."); statement("constant uint spvLinearTextureAlignment = ", msl_options.r32ui_linear_texture_alignment, ";"); } statement("// Returns buffer coords corresponding to 2D texture coords for emulating 2D texture atomics"); statement("#define spvImage2DAtomicCoord(tc, tex) (((((tex).get_width() + ", " spvLinearTextureAlignment / 4 - 1) & ~(", " spvLinearTextureAlignment / 4 - 1)) * (tc).y) + (tc).x)"); statement(""); break; } // Fix up gradient vectors when sampling a cube texture for Apple Silicon. // h/t Alexey Knyazev (https://github.com/KhronosGroup/MoltenVK/issues/2068#issuecomment-1817799067) for the code. case SPVFuncImplGradientCube: statement("static inline gradientcube spvGradientCube(float3 P, float3 dPdx, float3 dPdy)"); begin_scope(); statement("// Major axis selection"); statement("float3 absP = abs(P);"); statement("bool xMajor = absP.x >= max(absP.y, absP.z);"); statement("bool yMajor = absP.y >= absP.z;"); statement("float3 Q = xMajor ? P.yzx : (yMajor ? P.xzy : P);"); statement("float3 dQdx = xMajor ? dPdx.yzx : (yMajor ? dPdx.xzy : dPdx);"); statement("float3 dQdy = xMajor ? dPdy.yzx : (yMajor ? dPdy.xzy : dPdy);"); statement_no_indent(""); statement("// Skip a couple of operations compared to usual projection"); statement("float4 d = float4(dQdx.xy, dQdy.xy) - (Q.xy / Q.z).xyxy * float4(dQdx.zz, dQdy.zz);"); statement_no_indent(""); statement("// Final swizzle to put the intermediate values into non-ignored components"); statement("// X major: X and Z"); statement("// Y major: X and Y"); statement("// Z major: Y and Z"); statement("return gradientcube(xMajor ? d.xxy : d.xyx, xMajor ? d.zzw : d.zwz);"); end_scope(); statement(""); break; // "fadd" intrinsic support case SPVFuncImplFAdd: statement("template"); statement("[[clang::optnone]] T spvFAdd(T l, T r)"); begin_scope(); statement("return fma(T(1), l, r);"); end_scope(); statement(""); break; // "fsub" intrinsic support case SPVFuncImplFSub: statement("template"); statement("[[clang::optnone]] T spvFSub(T l, T r)"); begin_scope(); statement("return fma(T(-1), r, l);"); end_scope(); statement(""); break; // "fmul' intrinsic support case SPVFuncImplFMul: statement("template"); statement("[[clang::optnone]] T spvFMul(T l, T r)"); begin_scope(); statement("return fma(l, r, T(0));"); end_scope(); statement(""); statement("template"); statement("[[clang::optnone]] vec spvFMulVectorMatrix(vec v, matrix m)"); begin_scope(); statement("vec res = vec(0);"); statement("for (uint i = Rows; i > 0; --i)"); begin_scope(); statement("vec tmp(0);"); statement("for (uint j = 0; j < Cols; ++j)"); begin_scope(); statement("tmp[j] = m[j][i - 1];"); end_scope(); statement("res = fma(tmp, vec(v[i - 1]), res);"); end_scope(); statement("return res;"); end_scope(); statement(""); statement("template"); statement("[[clang::optnone]] vec spvFMulMatrixVector(matrix m, vec v)"); begin_scope(); statement("vec res = vec(0);"); statement("for (uint i = Cols; i > 0; --i)"); begin_scope(); statement("res = fma(m[i - 1], vec(v[i - 1]), res);"); end_scope(); statement("return res;"); end_scope(); statement(""); statement("template"); statement("[[clang::optnone]] matrix spvFMulMatrixMatrix(matrix l, matrix r)"); begin_scope(); statement("matrix res;"); statement("for (uint i = 0; i < RCols; i++)"); begin_scope(); statement("vec tmp(0);"); statement("for (uint j = 0; j < LCols; j++)"); begin_scope(); statement("tmp = fma(vec(r[i][j]), l[j], tmp);"); end_scope(); statement("res[i] = tmp;"); end_scope(); statement("return res;"); end_scope(); statement(""); break; case SPVFuncImplQuantizeToF16: // Ensure fast-math is disabled to match Vulkan results. // SpvHalfTypeSelector is used to match the half* template type to the float* template type. // Depending on GPU, MSL does not always flush converted subnormal halfs to zero, // as required by OpQuantizeToF16, so check for subnormals and flush them to zero. statement("template struct SpvHalfTypeSelector;"); statement("template <> struct SpvHalfTypeSelector { public: using H = half; };"); statement("template struct SpvHalfTypeSelector> { using H = vec; };"); statement("template::H>"); statement("[[clang::optnone]] F spvQuantizeToF16(F fval)"); begin_scope(); statement("H hval = H(fval);"); statement("hval = select(copysign(H(0), hval), hval, isnormal(hval) || isinf(hval) || isnan(hval));"); statement("return F(hval);"); end_scope(); statement(""); break; // Emulate texturecube_array with texture2d_array for iOS where this type is not available case SPVFuncImplCubemapTo2DArrayFace: statement(force_inline); statement("float3 spvCubemapTo2DArrayFace(float3 P)"); begin_scope(); statement("float3 Coords = abs(P.xyz);"); statement("float CubeFace = 0;"); statement("float ProjectionAxis = 0;"); statement("float u = 0;"); statement("float v = 0;"); statement("if (Coords.x >= Coords.y && Coords.x >= Coords.z)"); begin_scope(); statement("CubeFace = P.x >= 0 ? 0 : 1;"); statement("ProjectionAxis = Coords.x;"); statement("u = P.x >= 0 ? -P.z : P.z;"); statement("v = -P.y;"); end_scope(); statement("else if (Coords.y >= Coords.x && Coords.y >= Coords.z)"); begin_scope(); statement("CubeFace = P.y >= 0 ? 2 : 3;"); statement("ProjectionAxis = Coords.y;"); statement("u = P.x;"); statement("v = P.y >= 0 ? P.z : -P.z;"); end_scope(); statement("else"); begin_scope(); statement("CubeFace = P.z >= 0 ? 4 : 5;"); statement("ProjectionAxis = Coords.z;"); statement("u = P.z >= 0 ? P.x : -P.x;"); statement("v = -P.y;"); end_scope(); statement("u = 0.5 * (u/ProjectionAxis + 1);"); statement("v = 0.5 * (v/ProjectionAxis + 1);"); statement("return float3(u, v, CubeFace);"); end_scope(); statement(""); break; case SPVFuncImplInverse4x4: statement("// Returns the determinant of a 2x2 matrix."); statement(force_inline); statement("float spvDet2x2(float a1, float a2, float b1, float b2)"); begin_scope(); statement("return a1 * b2 - b1 * a2;"); end_scope(); statement(""); statement("// Returns the determinant of a 3x3 matrix."); statement(force_inline); statement("float spvDet3x3(float a1, float a2, float a3, float b1, float b2, float b3, float c1, " "float c2, float c3)"); begin_scope(); statement("return a1 * spvDet2x2(b2, b3, c2, c3) - b1 * spvDet2x2(a2, a3, c2, c3) + c1 * spvDet2x2(a2, a3, " "b2, b3);"); end_scope(); statement(""); statement("// Returns the inverse of a matrix, by using the algorithm of calculating the classical"); statement("// adjoint and dividing by the determinant. The contents of the matrix are changed."); statement(force_inline); statement("float4x4 spvInverse4x4(float4x4 m)"); begin_scope(); statement("float4x4 adj; // The adjoint matrix (inverse after dividing by determinant)"); statement_no_indent(""); statement("// Create the transpose of the cofactors, as the classical adjoint of the matrix."); statement("adj[0][0] = spvDet3x3(m[1][1], m[1][2], m[1][3], m[2][1], m[2][2], m[2][3], m[3][1], m[3][2], " "m[3][3]);"); statement("adj[0][1] = -spvDet3x3(m[0][1], m[0][2], m[0][3], m[2][1], m[2][2], m[2][3], m[3][1], m[3][2], " "m[3][3]);"); statement("adj[0][2] = spvDet3x3(m[0][1], m[0][2], m[0][3], m[1][1], m[1][2], m[1][3], m[3][1], m[3][2], " "m[3][3]);"); statement("adj[0][3] = -spvDet3x3(m[0][1], m[0][2], m[0][3], m[1][1], m[1][2], m[1][3], m[2][1], m[2][2], " "m[2][3]);"); statement_no_indent(""); statement("adj[1][0] = -spvDet3x3(m[1][0], m[1][2], m[1][3], m[2][0], m[2][2], m[2][3], m[3][0], m[3][2], " "m[3][3]);"); statement("adj[1][1] = spvDet3x3(m[0][0], m[0][2], m[0][3], m[2][0], m[2][2], m[2][3], m[3][0], m[3][2], " "m[3][3]);"); statement("adj[1][2] = -spvDet3x3(m[0][0], m[0][2], m[0][3], m[1][0], m[1][2], m[1][3], m[3][0], m[3][2], " "m[3][3]);"); statement("adj[1][3] = spvDet3x3(m[0][0], m[0][2], m[0][3], m[1][0], m[1][2], m[1][3], m[2][0], m[2][2], " "m[2][3]);"); statement_no_indent(""); statement("adj[2][0] = spvDet3x3(m[1][0], m[1][1], m[1][3], m[2][0], m[2][1], m[2][3], m[3][0], m[3][1], " "m[3][3]);"); statement("adj[2][1] = -spvDet3x3(m[0][0], m[0][1], m[0][3], m[2][0], m[2][1], m[2][3], m[3][0], m[3][1], " "m[3][3]);"); statement("adj[2][2] = spvDet3x3(m[0][0], m[0][1], m[0][3], m[1][0], m[1][1], m[1][3], m[3][0], m[3][1], " "m[3][3]);"); statement("adj[2][3] = -spvDet3x3(m[0][0], m[0][1], m[0][3], m[1][0], m[1][1], m[1][3], m[2][0], m[2][1], " "m[2][3]);"); statement_no_indent(""); statement("adj[3][0] = -spvDet3x3(m[1][0], m[1][1], m[1][2], m[2][0], m[2][1], m[2][2], m[3][0], m[3][1], " "m[3][2]);"); statement("adj[3][1] = spvDet3x3(m[0][0], m[0][1], m[0][2], m[2][0], m[2][1], m[2][2], m[3][0], m[3][1], " "m[3][2]);"); statement("adj[3][2] = -spvDet3x3(m[0][0], m[0][1], m[0][2], m[1][0], m[1][1], m[1][2], m[3][0], m[3][1], " "m[3][2]);"); statement("adj[3][3] = spvDet3x3(m[0][0], m[0][1], m[0][2], m[1][0], m[1][1], m[1][2], m[2][0], m[2][1], " "m[2][2]);"); statement_no_indent(""); statement("// Calculate the determinant as a combination of the cofactors of the first row."); statement("float det = (adj[0][0] * m[0][0]) + (adj[0][1] * m[1][0]) + (adj[0][2] * m[2][0]) + (adj[0][3] " "* m[3][0]);"); statement_no_indent(""); statement("// Divide the classical adjoint matrix by the determinant."); statement("// If determinant is zero, matrix is not invertable, so leave it unchanged."); statement("return (det != 0.0f) ? (adj * (1.0f / det)) : m;"); end_scope(); statement(""); break; case SPVFuncImplInverse3x3: if (spv_function_implementations.count(SPVFuncImplInverse4x4) == 0) { statement("// Returns the determinant of a 2x2 matrix."); statement(force_inline); statement("float spvDet2x2(float a1, float a2, float b1, float b2)"); begin_scope(); statement("return a1 * b2 - b1 * a2;"); end_scope(); statement(""); } statement("// Returns the inverse of a matrix, by using the algorithm of calculating the classical"); statement("// adjoint and dividing by the determinant. The contents of the matrix are changed."); statement(force_inline); statement("float3x3 spvInverse3x3(float3x3 m)"); begin_scope(); statement("float3x3 adj; // The adjoint matrix (inverse after dividing by determinant)"); statement_no_indent(""); statement("// Create the transpose of the cofactors, as the classical adjoint of the matrix."); statement("adj[0][0] = spvDet2x2(m[1][1], m[1][2], m[2][1], m[2][2]);"); statement("adj[0][1] = -spvDet2x2(m[0][1], m[0][2], m[2][1], m[2][2]);"); statement("adj[0][2] = spvDet2x2(m[0][1], m[0][2], m[1][1], m[1][2]);"); statement_no_indent(""); statement("adj[1][0] = -spvDet2x2(m[1][0], m[1][2], m[2][0], m[2][2]);"); statement("adj[1][1] = spvDet2x2(m[0][0], m[0][2], m[2][0], m[2][2]);"); statement("adj[1][2] = -spvDet2x2(m[0][0], m[0][2], m[1][0], m[1][2]);"); statement_no_indent(""); statement("adj[2][0] = spvDet2x2(m[1][0], m[1][1], m[2][0], m[2][1]);"); statement("adj[2][1] = -spvDet2x2(m[0][0], m[0][1], m[2][0], m[2][1]);"); statement("adj[2][2] = spvDet2x2(m[0][0], m[0][1], m[1][0], m[1][1]);"); statement_no_indent(""); statement("// Calculate the determinant as a combination of the cofactors of the first row."); statement("float det = (adj[0][0] * m[0][0]) + (adj[0][1] * m[1][0]) + (adj[0][2] * m[2][0]);"); statement_no_indent(""); statement("// Divide the classical adjoint matrix by the determinant."); statement("// If determinant is zero, matrix is not invertable, so leave it unchanged."); statement("return (det != 0.0f) ? (adj * (1.0f / det)) : m;"); end_scope(); statement(""); break; case SPVFuncImplInverse2x2: statement("// Returns the inverse of a matrix, by using the algorithm of calculating the classical"); statement("// adjoint and dividing by the determinant. The contents of the matrix are changed."); statement(force_inline); statement("float2x2 spvInverse2x2(float2x2 m)"); begin_scope(); statement("float2x2 adj; // The adjoint matrix (inverse after dividing by determinant)"); statement_no_indent(""); statement("// Create the transpose of the cofactors, as the classical adjoint of the matrix."); statement("adj[0][0] = m[1][1];"); statement("adj[0][1] = -m[0][1];"); statement_no_indent(""); statement("adj[1][0] = -m[1][0];"); statement("adj[1][1] = m[0][0];"); statement_no_indent(""); statement("// Calculate the determinant as a combination of the cofactors of the first row."); statement("float det = (adj[0][0] * m[0][0]) + (adj[0][1] * m[1][0]);"); statement_no_indent(""); statement("// Divide the classical adjoint matrix by the determinant."); statement("// If determinant is zero, matrix is not invertable, so leave it unchanged."); statement("return (det != 0.0f) ? (adj * (1.0f / det)) : m;"); end_scope(); statement(""); break; case SPVFuncImplForwardArgs: statement("template struct spvRemoveReference { typedef T type; };"); statement("template struct spvRemoveReference { typedef T type; };"); statement("template struct spvRemoveReference { typedef T type; };"); statement("template inline constexpr thread T&& spvForward(thread typename " "spvRemoveReference::type& x)"); begin_scope(); statement("return static_cast(x);"); end_scope(); statement("template inline constexpr thread T&& spvForward(thread typename " "spvRemoveReference::type&& x)"); begin_scope(); statement("return static_cast(x);"); end_scope(); statement(""); break; case SPVFuncImplGetSwizzle: statement("enum class spvSwizzle : uint"); begin_scope(); statement("none = 0,"); statement("zero,"); statement("one,"); statement("red,"); statement("green,"); statement("blue,"); statement("alpha"); end_scope_decl(); statement(""); statement("template"); statement("inline T spvGetSwizzle(vec x, T c, spvSwizzle s)"); begin_scope(); statement("switch (s)"); begin_scope(); statement("case spvSwizzle::none:"); statement(" return c;"); statement("case spvSwizzle::zero:"); statement(" return 0;"); statement("case spvSwizzle::one:"); statement(" return 1;"); statement("case spvSwizzle::red:"); statement(" return x.r;"); statement("case spvSwizzle::green:"); statement(" return x.g;"); statement("case spvSwizzle::blue:"); statement(" return x.b;"); statement("case spvSwizzle::alpha:"); statement(" return x.a;"); end_scope(); end_scope(); statement(""); break; case SPVFuncImplTextureSwizzle: statement("// Wrapper function that swizzles texture samples and fetches."); statement("template"); statement("inline vec spvTextureSwizzle(vec x, uint s)"); begin_scope(); statement("if (!s)"); statement(" return x;"); statement("return vec(spvGetSwizzle(x, x.r, spvSwizzle((s >> 0) & 0xFF)), " "spvGetSwizzle(x, x.g, spvSwizzle((s >> 8) & 0xFF)), spvGetSwizzle(x, x.b, spvSwizzle((s >> 16) " "& 0xFF)), " "spvGetSwizzle(x, x.a, spvSwizzle((s >> 24) & 0xFF)));"); end_scope(); statement(""); statement("template"); statement("inline T spvTextureSwizzle(T x, uint s)"); begin_scope(); statement("return spvTextureSwizzle(vec(x, 0, 0, 1), s).x;"); end_scope(); statement(""); break; case SPVFuncImplGatherSwizzle: statement("// Wrapper function that swizzles texture gathers."); statement("template class Tex, " "typename... Ts>"); statement("inline vec spvGatherSwizzle(const thread Tex& t, sampler s, " "uint sw, component c, Ts... params) METAL_CONST_ARG(c)"); begin_scope(); statement("if (sw)"); begin_scope(); statement("switch (spvSwizzle((sw >> (uint(c) * 8)) & 0xFF))"); begin_scope(); statement("case spvSwizzle::none:"); statement(" break;"); statement("case spvSwizzle::zero:"); statement(" return vec(0, 0, 0, 0);"); statement("case spvSwizzle::one:"); statement(" return vec(1, 1, 1, 1);"); statement("case spvSwizzle::red:"); statement(" return t.gather(s, spvForward(params)..., component::x);"); statement("case spvSwizzle::green:"); statement(" return t.gather(s, spvForward(params)..., component::y);"); statement("case spvSwizzle::blue:"); statement(" return t.gather(s, spvForward(params)..., component::z);"); statement("case spvSwizzle::alpha:"); statement(" return t.gather(s, spvForward(params)..., component::w);"); end_scope(); end_scope(); // texture::gather insists on its component parameter being a constant // expression, so we need this silly workaround just to compile the shader. statement("switch (c)"); begin_scope(); statement("case component::x:"); statement(" return t.gather(s, spvForward(params)..., component::x);"); statement("case component::y:"); statement(" return t.gather(s, spvForward(params)..., component::y);"); statement("case component::z:"); statement(" return t.gather(s, spvForward(params)..., component::z);"); statement("case component::w:"); statement(" return t.gather(s, spvForward(params)..., component::w);"); end_scope(); end_scope(); statement(""); break; case SPVFuncImplGatherCompareSwizzle: statement("// Wrapper function that swizzles depth texture gathers."); statement("template class Tex, " "typename... Ts>"); statement("inline vec spvGatherCompareSwizzle(const thread Tex& t, sampler " "s, uint sw, Ts... params) "); begin_scope(); statement("if (sw)"); begin_scope(); statement("switch (spvSwizzle(sw & 0xFF))"); begin_scope(); statement("case spvSwizzle::none:"); statement("case spvSwizzle::red:"); statement(" break;"); statement("case spvSwizzle::zero:"); statement("case spvSwizzle::green:"); statement("case spvSwizzle::blue:"); statement("case spvSwizzle::alpha:"); statement(" return vec(0, 0, 0, 0);"); statement("case spvSwizzle::one:"); statement(" return vec(1, 1, 1, 1);"); end_scope(); end_scope(); statement("return t.gather_compare(s, spvForward(params)...);"); end_scope(); statement(""); break; case SPVFuncImplSubgroupBroadcast: // Metal doesn't allow broadcasting boolean values directly, but we can work around that by broadcasting // them as integers. statement("template"); statement("inline T spvSubgroupBroadcast(T value, ushort lane)"); begin_scope(); if (msl_options.use_quadgroup_operation()) statement("return quad_broadcast(value, lane);"); else statement("return simd_broadcast(value, lane);"); end_scope(); statement(""); statement("template<>"); statement("inline bool spvSubgroupBroadcast(bool value, ushort lane)"); begin_scope(); if (msl_options.use_quadgroup_operation()) statement("return !!quad_broadcast((ushort)value, lane);"); else statement("return !!simd_broadcast((ushort)value, lane);"); end_scope(); statement(""); statement("template"); statement("inline vec spvSubgroupBroadcast(vec value, ushort lane)"); begin_scope(); if (msl_options.use_quadgroup_operation()) statement("return (vec)quad_broadcast((vec)value, lane);"); else statement("return (vec)simd_broadcast((vec)value, lane);"); end_scope(); statement(""); break; case SPVFuncImplSubgroupBroadcastFirst: statement("template"); statement("inline T spvSubgroupBroadcastFirst(T value)"); begin_scope(); if (msl_options.use_quadgroup_operation()) statement("return quad_broadcast_first(value);"); else statement("return simd_broadcast_first(value);"); end_scope(); statement(""); statement("template<>"); statement("inline bool spvSubgroupBroadcastFirst(bool value)"); begin_scope(); if (msl_options.use_quadgroup_operation()) statement("return !!quad_broadcast_first((ushort)value);"); else statement("return !!simd_broadcast_first((ushort)value);"); end_scope(); statement(""); statement("template"); statement("inline vec spvSubgroupBroadcastFirst(vec value)"); begin_scope(); if (msl_options.use_quadgroup_operation()) statement("return (vec)quad_broadcast_first((vec)value);"); else statement("return (vec)simd_broadcast_first((vec)value);"); end_scope(); statement(""); break; case SPVFuncImplSubgroupBallot: statement("inline uint4 spvSubgroupBallot(bool value)"); begin_scope(); if (msl_options.use_quadgroup_operation()) { statement("return uint4((quad_vote::vote_t)quad_ballot(value), 0, 0, 0);"); } else if (msl_options.is_ios()) { // The current simd_vote on iOS uses a 32-bit integer-like object. statement("return uint4((simd_vote::vote_t)simd_ballot(value), 0, 0, 0);"); } else { statement("simd_vote vote = simd_ballot(value);"); statement("// simd_ballot() returns a 64-bit integer-like object, but"); statement("// SPIR-V callers expect a uint4. We must convert."); statement("// FIXME: This won't include higher bits if Apple ever supports"); statement("// 128 lanes in an SIMD-group."); statement("return uint4(as_type((simd_vote::vote_t)vote), 0, 0);"); } end_scope(); statement(""); break; case SPVFuncImplSubgroupBallotBitExtract: statement("inline bool spvSubgroupBallotBitExtract(uint4 ballot, uint bit)"); begin_scope(); statement("return !!extract_bits(ballot[bit / 32], bit % 32, 1);"); end_scope(); statement(""); break; case SPVFuncImplSubgroupBallotFindLSB: statement("inline uint spvSubgroupBallotFindLSB(uint4 ballot, uint gl_SubgroupSize)"); begin_scope(); if (msl_options.is_ios()) { statement("uint4 mask = uint4(extract_bits(0xFFFFFFFF, 0, gl_SubgroupSize), uint3(0));"); } else { statement("uint4 mask = uint4(extract_bits(0xFFFFFFFF, 0, min(gl_SubgroupSize, 32u)), " "extract_bits(0xFFFFFFFF, 0, (uint)max((int)gl_SubgroupSize - 32, 0)), uint2(0));"); } statement("ballot &= mask;"); statement("return select(ctz(ballot.x), select(32 + ctz(ballot.y), select(64 + ctz(ballot.z), select(96 + " "ctz(ballot.w), uint(-1), ballot.w == 0), ballot.z == 0), ballot.y == 0), ballot.x == 0);"); end_scope(); statement(""); break; case SPVFuncImplSubgroupBallotFindMSB: statement("inline uint spvSubgroupBallotFindMSB(uint4 ballot, uint gl_SubgroupSize)"); begin_scope(); if (msl_options.is_ios()) { statement("uint4 mask = uint4(extract_bits(0xFFFFFFFF, 0, gl_SubgroupSize), uint3(0));"); } else { statement("uint4 mask = uint4(extract_bits(0xFFFFFFFF, 0, min(gl_SubgroupSize, 32u)), " "extract_bits(0xFFFFFFFF, 0, (uint)max((int)gl_SubgroupSize - 32, 0)), uint2(0));"); } statement("ballot &= mask;"); statement("return select(128 - (clz(ballot.w) + 1), select(96 - (clz(ballot.z) + 1), select(64 - " "(clz(ballot.y) + 1), select(32 - (clz(ballot.x) + 1), uint(-1), ballot.x == 0), ballot.y == 0), " "ballot.z == 0), ballot.w == 0);"); end_scope(); statement(""); break; case SPVFuncImplSubgroupBallotBitCount: statement("inline uint spvPopCount4(uint4 ballot)"); begin_scope(); statement("return popcount(ballot.x) + popcount(ballot.y) + popcount(ballot.z) + popcount(ballot.w);"); end_scope(); statement(""); statement("inline uint spvSubgroupBallotBitCount(uint4 ballot, uint gl_SubgroupSize)"); begin_scope(); if (msl_options.is_ios()) { statement("uint4 mask = uint4(extract_bits(0xFFFFFFFF, 0, gl_SubgroupSize), uint3(0));"); } else { statement("uint4 mask = uint4(extract_bits(0xFFFFFFFF, 0, min(gl_SubgroupSize, 32u)), " "extract_bits(0xFFFFFFFF, 0, (uint)max((int)gl_SubgroupSize - 32, 0)), uint2(0));"); } statement("return spvPopCount4(ballot & mask);"); end_scope(); statement(""); statement("inline uint spvSubgroupBallotInclusiveBitCount(uint4 ballot, uint gl_SubgroupInvocationID)"); begin_scope(); if (msl_options.is_ios()) { statement("uint4 mask = uint4(extract_bits(0xFFFFFFFF, 0, gl_SubgroupInvocationID + 1), uint3(0));"); } else { statement("uint4 mask = uint4(extract_bits(0xFFFFFFFF, 0, min(gl_SubgroupInvocationID + 1, 32u)), " "extract_bits(0xFFFFFFFF, 0, (uint)max((int)gl_SubgroupInvocationID + 1 - 32, 0)), " "uint2(0));"); } statement("return spvPopCount4(ballot & mask);"); end_scope(); statement(""); statement("inline uint spvSubgroupBallotExclusiveBitCount(uint4 ballot, uint gl_SubgroupInvocationID)"); begin_scope(); if (msl_options.is_ios()) { statement("uint4 mask = uint4(extract_bits(0xFFFFFFFF, 0, gl_SubgroupInvocationID), uint2(0));"); } else { statement("uint4 mask = uint4(extract_bits(0xFFFFFFFF, 0, min(gl_SubgroupInvocationID, 32u)), " "extract_bits(0xFFFFFFFF, 0, (uint)max((int)gl_SubgroupInvocationID - 32, 0)), uint2(0));"); } statement("return spvPopCount4(ballot & mask);"); end_scope(); statement(""); break; case SPVFuncImplSubgroupAllEqual: // Metal doesn't provide a function to evaluate this directly. But, we can // implement this by comparing every thread's value to one thread's value // (in this case, the value of the first active thread). Then, by the transitive // property of equality, if all comparisons return true, then they are all equal. statement("template"); statement("inline bool spvSubgroupAllEqual(T value)"); begin_scope(); if (msl_options.use_quadgroup_operation()) statement("return quad_all(all(value == quad_broadcast_first(value)));"); else statement("return simd_all(all(value == simd_broadcast_first(value)));"); end_scope(); statement(""); statement("template<>"); statement("inline bool spvSubgroupAllEqual(bool value)"); begin_scope(); if (msl_options.use_quadgroup_operation()) statement("return quad_all(value) || !quad_any(value);"); else statement("return simd_all(value) || !simd_any(value);"); end_scope(); statement(""); statement("template"); statement("inline bool spvSubgroupAllEqual(vec value)"); begin_scope(); if (msl_options.use_quadgroup_operation()) statement("return quad_all(all(value == (vec)quad_broadcast_first((vec)value)));"); else statement("return simd_all(all(value == (vec)simd_broadcast_first((vec)value)));"); end_scope(); statement(""); break; case SPVFuncImplSubgroupShuffle: statement("template"); statement("inline T spvSubgroupShuffle(T value, ushort lane)"); begin_scope(); if (msl_options.use_quadgroup_operation()) statement("return quad_shuffle(value, lane);"); else statement("return simd_shuffle(value, lane);"); end_scope(); statement(""); statement("template<>"); statement("inline bool spvSubgroupShuffle(bool value, ushort lane)"); begin_scope(); if (msl_options.use_quadgroup_operation()) statement("return !!quad_shuffle((ushort)value, lane);"); else statement("return !!simd_shuffle((ushort)value, lane);"); end_scope(); statement(""); statement("template"); statement("inline vec spvSubgroupShuffle(vec value, ushort lane)"); begin_scope(); if (msl_options.use_quadgroup_operation()) statement("return (vec)quad_shuffle((vec)value, lane);"); else statement("return (vec)simd_shuffle((vec)value, lane);"); end_scope(); statement(""); break; case SPVFuncImplSubgroupShuffleXor: statement("template"); statement("inline T spvSubgroupShuffleXor(T value, ushort mask)"); begin_scope(); if (msl_options.use_quadgroup_operation()) statement("return quad_shuffle_xor(value, mask);"); else statement("return simd_shuffle_xor(value, mask);"); end_scope(); statement(""); statement("template<>"); statement("inline bool spvSubgroupShuffleXor(bool value, ushort mask)"); begin_scope(); if (msl_options.use_quadgroup_operation()) statement("return !!quad_shuffle_xor((ushort)value, mask);"); else statement("return !!simd_shuffle_xor((ushort)value, mask);"); end_scope(); statement(""); statement("template"); statement("inline vec spvSubgroupShuffleXor(vec value, ushort mask)"); begin_scope(); if (msl_options.use_quadgroup_operation()) statement("return (vec)quad_shuffle_xor((vec)value, mask);"); else statement("return (vec)simd_shuffle_xor((vec)value, mask);"); end_scope(); statement(""); break; case SPVFuncImplSubgroupShuffleUp: statement("template"); statement("inline T spvSubgroupShuffleUp(T value, ushort delta)"); begin_scope(); if (msl_options.use_quadgroup_operation()) statement("return quad_shuffle_up(value, delta);"); else statement("return simd_shuffle_up(value, delta);"); end_scope(); statement(""); statement("template<>"); statement("inline bool spvSubgroupShuffleUp(bool value, ushort delta)"); begin_scope(); if (msl_options.use_quadgroup_operation()) statement("return !!quad_shuffle_up((ushort)value, delta);"); else statement("return !!simd_shuffle_up((ushort)value, delta);"); end_scope(); statement(""); statement("template"); statement("inline vec spvSubgroupShuffleUp(vec value, ushort delta)"); begin_scope(); if (msl_options.use_quadgroup_operation()) statement("return (vec)quad_shuffle_up((vec)value, delta);"); else statement("return (vec)simd_shuffle_up((vec)value, delta);"); end_scope(); statement(""); break; case SPVFuncImplSubgroupShuffleDown: statement("template"); statement("inline T spvSubgroupShuffleDown(T value, ushort delta)"); begin_scope(); if (msl_options.use_quadgroup_operation()) statement("return quad_shuffle_down(value, delta);"); else statement("return simd_shuffle_down(value, delta);"); end_scope(); statement(""); statement("template<>"); statement("inline bool spvSubgroupShuffleDown(bool value, ushort delta)"); begin_scope(); if (msl_options.use_quadgroup_operation()) statement("return !!quad_shuffle_down((ushort)value, delta);"); else statement("return !!simd_shuffle_down((ushort)value, delta);"); end_scope(); statement(""); statement("template"); statement("inline vec spvSubgroupShuffleDown(vec value, ushort delta)"); begin_scope(); if (msl_options.use_quadgroup_operation()) statement("return (vec)quad_shuffle_down((vec)value, delta);"); else statement("return (vec)simd_shuffle_down((vec)value, delta);"); end_scope(); statement(""); break; case SPVFuncImplQuadBroadcast: statement("template"); statement("inline T spvQuadBroadcast(T value, uint lane)"); begin_scope(); statement("return quad_broadcast(value, lane);"); end_scope(); statement(""); statement("template<>"); statement("inline bool spvQuadBroadcast(bool value, uint lane)"); begin_scope(); statement("return !!quad_broadcast((ushort)value, lane);"); end_scope(); statement(""); statement("template"); statement("inline vec spvQuadBroadcast(vec value, uint lane)"); begin_scope(); statement("return (vec)quad_broadcast((vec)value, lane);"); end_scope(); statement(""); break; case SPVFuncImplQuadSwap: // We can implement this easily based on the following table giving // the target lane ID from the direction and current lane ID: // Direction // | 0 | 1 | 2 | // ---+---+---+---+ // L 0 | 1 2 3 // a 1 | 0 3 2 // n 2 | 3 0 1 // e 3 | 2 1 0 // Notice that target = source ^ (direction + 1). statement("template"); statement("inline T spvQuadSwap(T value, uint dir)"); begin_scope(); statement("return quad_shuffle_xor(value, dir + 1);"); end_scope(); statement(""); statement("template<>"); statement("inline bool spvQuadSwap(bool value, uint dir)"); begin_scope(); statement("return !!quad_shuffle_xor((ushort)value, dir + 1);"); end_scope(); statement(""); statement("template"); statement("inline vec spvQuadSwap(vec value, uint dir)"); begin_scope(); statement("return (vec)quad_shuffle_xor((vec)value, dir + 1);"); end_scope(); statement(""); break; case SPVFuncImplReflectScalar: // Metal does not support scalar versions of these functions. // Ensure fast-math is disabled to match Vulkan results. statement("template"); statement("[[clang::optnone]] T spvReflect(T i, T n)"); begin_scope(); statement("return i - T(2) * i * n * n;"); end_scope(); statement(""); break; case SPVFuncImplRefractScalar: // Metal does not support scalar versions of these functions. statement("template"); statement("inline T spvRefract(T i, T n, T eta)"); begin_scope(); statement("T NoI = n * i;"); statement("T NoI2 = NoI * NoI;"); statement("T k = T(1) - eta * eta * (T(1) - NoI2);"); statement("if (k < T(0))"); begin_scope(); statement("return T(0);"); end_scope(); statement("else"); begin_scope(); statement("return eta * i - (eta * NoI + sqrt(k)) * n;"); end_scope(); end_scope(); statement(""); break; case SPVFuncImplFaceForwardScalar: // Metal does not support scalar versions of these functions. statement("template"); statement("inline T spvFaceForward(T n, T i, T nref)"); begin_scope(); statement("return i * nref < T(0) ? n : -n;"); end_scope(); statement(""); break; case SPVFuncImplChromaReconstructNearest2Plane: statement("template"); statement("inline vec spvChromaReconstructNearest(texture2d plane0, texture2d plane1, sampler " "samp, float2 coord, LodOptions... options)"); begin_scope(); statement("vec ycbcr = vec(0, 0, 0, 1);"); statement("ycbcr.g = plane0.sample(samp, coord, spvForward(options)...).r;"); statement("ycbcr.br = plane1.sample(samp, coord, spvForward(options)...).rg;"); statement("return ycbcr;"); end_scope(); statement(""); break; case SPVFuncImplChromaReconstructNearest3Plane: statement("template"); statement("inline vec spvChromaReconstructNearest(texture2d plane0, texture2d plane1, " "texture2d plane2, sampler samp, float2 coord, LodOptions... options)"); begin_scope(); statement("vec ycbcr = vec(0, 0, 0, 1);"); statement("ycbcr.g = plane0.sample(samp, coord, spvForward(options)...).r;"); statement("ycbcr.b = plane1.sample(samp, coord, spvForward(options)...).r;"); statement("ycbcr.r = plane2.sample(samp, coord, spvForward(options)...).r;"); statement("return ycbcr;"); end_scope(); statement(""); break; case SPVFuncImplChromaReconstructLinear422CositedEven2Plane: statement("template"); statement("inline vec spvChromaReconstructLinear422CositedEven(texture2d plane0, texture2d " "plane1, sampler samp, float2 coord, LodOptions... options)"); begin_scope(); statement("vec ycbcr = vec(0, 0, 0, 1);"); statement("ycbcr.g = plane0.sample(samp, coord, spvForward(options)...).r;"); statement("if (fract(coord.x * plane1.get_width()) != 0.0)"); begin_scope(); statement("ycbcr.br = vec(mix(plane1.sample(samp, coord, spvForward(options)...), " "plane1.sample(samp, coord, spvForward(options)..., int2(1, 0)), 0.5).rg);"); end_scope(); statement("else"); begin_scope(); statement("ycbcr.br = plane1.sample(samp, coord, spvForward(options)...).rg;"); end_scope(); statement("return ycbcr;"); end_scope(); statement(""); break; case SPVFuncImplChromaReconstructLinear422CositedEven3Plane: statement("template"); statement("inline vec spvChromaReconstructLinear422CositedEven(texture2d plane0, texture2d " "plane1, texture2d plane2, sampler samp, float2 coord, LodOptions... options)"); begin_scope(); statement("vec ycbcr = vec(0, 0, 0, 1);"); statement("ycbcr.g = plane0.sample(samp, coord, spvForward(options)...).r;"); statement("if (fract(coord.x * plane1.get_width()) != 0.0)"); begin_scope(); statement("ycbcr.b = T(mix(plane1.sample(samp, coord, spvForward(options)...), " "plane1.sample(samp, coord, spvForward(options)..., int2(1, 0)), 0.5).r);"); statement("ycbcr.r = T(mix(plane2.sample(samp, coord, spvForward(options)...), " "plane2.sample(samp, coord, spvForward(options)..., int2(1, 0)), 0.5).r);"); end_scope(); statement("else"); begin_scope(); statement("ycbcr.b = plane1.sample(samp, coord, spvForward(options)...).r;"); statement("ycbcr.r = plane2.sample(samp, coord, spvForward(options)...).r;"); end_scope(); statement("return ycbcr;"); end_scope(); statement(""); break; case SPVFuncImplChromaReconstructLinear422Midpoint2Plane: statement("template"); statement("inline vec spvChromaReconstructLinear422Midpoint(texture2d plane0, texture2d " "plane1, sampler samp, float2 coord, LodOptions... options)"); begin_scope(); statement("vec ycbcr = vec(0, 0, 0, 1);"); statement("ycbcr.g = plane0.sample(samp, coord, spvForward(options)...).r;"); statement("int2 offs = int2(fract(coord.x * plane1.get_width()) != 0.0 ? 1 : -1, 0);"); statement("ycbcr.br = vec(mix(plane1.sample(samp, coord, spvForward(options)...), " "plane1.sample(samp, coord, spvForward(options)..., offs), 0.25).rg);"); statement("return ycbcr;"); end_scope(); statement(""); break; case SPVFuncImplChromaReconstructLinear422Midpoint3Plane: statement("template"); statement("inline vec spvChromaReconstructLinear422Midpoint(texture2d plane0, texture2d " "plane1, texture2d plane2, sampler samp, float2 coord, LodOptions... options)"); begin_scope(); statement("vec ycbcr = vec(0, 0, 0, 1);"); statement("ycbcr.g = plane0.sample(samp, coord, spvForward(options)...).r;"); statement("int2 offs = int2(fract(coord.x * plane1.get_width()) != 0.0 ? 1 : -1, 0);"); statement("ycbcr.b = T(mix(plane1.sample(samp, coord, spvForward(options)...), " "plane1.sample(samp, coord, spvForward(options)..., offs), 0.25).r);"); statement("ycbcr.r = T(mix(plane2.sample(samp, coord, spvForward(options)...), " "plane2.sample(samp, coord, spvForward(options)..., offs), 0.25).r);"); statement("return ycbcr;"); end_scope(); statement(""); break; case SPVFuncImplChromaReconstructLinear420XCositedEvenYCositedEven2Plane: statement("template"); statement("inline vec spvChromaReconstructLinear420XCositedEvenYCositedEven(texture2d plane0, " "texture2d plane1, sampler samp, float2 coord, LodOptions... options)"); begin_scope(); statement("vec ycbcr = vec(0, 0, 0, 1);"); statement("ycbcr.g = plane0.sample(samp, coord, spvForward(options)...).r;"); statement("float2 ab = fract(round(coord * float2(plane0.get_width(), plane0.get_height())) * 0.5);"); statement("ycbcr.br = vec(mix(mix(plane1.sample(samp, coord, spvForward(options)...), " "plane1.sample(samp, coord, spvForward(options)..., int2(1, 0)), ab.x), " "mix(plane1.sample(samp, coord, spvForward(options)..., int2(0, 1)), " "plane1.sample(samp, coord, spvForward(options)..., int2(1, 1)), ab.x), ab.y).rg);"); statement("return ycbcr;"); end_scope(); statement(""); break; case SPVFuncImplChromaReconstructLinear420XCositedEvenYCositedEven3Plane: statement("template"); statement("inline vec spvChromaReconstructLinear420XCositedEvenYCositedEven(texture2d plane0, " "texture2d plane1, texture2d plane2, sampler samp, float2 coord, LodOptions... options)"); begin_scope(); statement("vec ycbcr = vec(0, 0, 0, 1);"); statement("ycbcr.g = plane0.sample(samp, coord, spvForward(options)...).r;"); statement("float2 ab = fract(round(coord * float2(plane0.get_width(), plane0.get_height())) * 0.5);"); statement("ycbcr.b = T(mix(mix(plane1.sample(samp, coord, spvForward(options)...), " "plane1.sample(samp, coord, spvForward(options)..., int2(1, 0)), ab.x), " "mix(plane1.sample(samp, coord, spvForward(options)..., int2(0, 1)), " "plane1.sample(samp, coord, spvForward(options)..., int2(1, 1)), ab.x), ab.y).r);"); statement("ycbcr.r = T(mix(mix(plane2.sample(samp, coord, spvForward(options)...), " "plane2.sample(samp, coord, spvForward(options)..., int2(1, 0)), ab.x), " "mix(plane2.sample(samp, coord, spvForward(options)..., int2(0, 1)), " "plane2.sample(samp, coord, spvForward(options)..., int2(1, 1)), ab.x), ab.y).r);"); statement("return ycbcr;"); end_scope(); statement(""); break; case SPVFuncImplChromaReconstructLinear420XMidpointYCositedEven2Plane: statement("template"); statement("inline vec spvChromaReconstructLinear420XMidpointYCositedEven(texture2d plane0, " "texture2d plane1, sampler samp, float2 coord, LodOptions... options)"); begin_scope(); statement("vec ycbcr = vec(0, 0, 0, 1);"); statement("ycbcr.g = plane0.sample(samp, coord, spvForward(options)...).r;"); statement("float2 ab = fract((round(coord * float2(plane0.get_width(), plane0.get_height())) - float2(0.5, " "0)) * 0.5);"); statement("ycbcr.br = vec(mix(mix(plane1.sample(samp, coord, spvForward(options)...), " "plane1.sample(samp, coord, spvForward(options)..., int2(1, 0)), ab.x), " "mix(plane1.sample(samp, coord, spvForward(options)..., int2(0, 1)), " "plane1.sample(samp, coord, spvForward(options)..., int2(1, 1)), ab.x), ab.y).rg);"); statement("return ycbcr;"); end_scope(); statement(""); break; case SPVFuncImplChromaReconstructLinear420XMidpointYCositedEven3Plane: statement("template"); statement("inline vec spvChromaReconstructLinear420XMidpointYCositedEven(texture2d plane0, " "texture2d plane1, texture2d plane2, sampler samp, float2 coord, LodOptions... options)"); begin_scope(); statement("vec ycbcr = vec(0, 0, 0, 1);"); statement("ycbcr.g = plane0.sample(samp, coord, spvForward(options)...).r;"); statement("float2 ab = fract((round(coord * float2(plane0.get_width(), plane0.get_height())) - float2(0.5, " "0)) * 0.5);"); statement("ycbcr.b = T(mix(mix(plane1.sample(samp, coord, spvForward(options)...), " "plane1.sample(samp, coord, spvForward(options)..., int2(1, 0)), ab.x), " "mix(plane1.sample(samp, coord, spvForward(options)..., int2(0, 1)), " "plane1.sample(samp, coord, spvForward(options)..., int2(1, 1)), ab.x), ab.y).r);"); statement("ycbcr.r = T(mix(mix(plane2.sample(samp, coord, spvForward(options)...), " "plane2.sample(samp, coord, spvForward(options)..., int2(1, 0)), ab.x), " "mix(plane2.sample(samp, coord, spvForward(options)..., int2(0, 1)), " "plane2.sample(samp, coord, spvForward(options)..., int2(1, 1)), ab.x), ab.y).r);"); statement("return ycbcr;"); end_scope(); statement(""); break; case SPVFuncImplChromaReconstructLinear420XCositedEvenYMidpoint2Plane: statement("template"); statement("inline vec spvChromaReconstructLinear420XCositedEvenYMidpoint(texture2d plane0, " "texture2d plane1, sampler samp, float2 coord, LodOptions... options)"); begin_scope(); statement("vec ycbcr = vec(0, 0, 0, 1);"); statement("ycbcr.g = plane0.sample(samp, coord, spvForward(options)...).r;"); statement("float2 ab = fract((round(coord * float2(plane0.get_width(), plane0.get_height())) - float2(0, " "0.5)) * 0.5);"); statement("ycbcr.br = vec(mix(mix(plane1.sample(samp, coord, spvForward(options)...), " "plane1.sample(samp, coord, spvForward(options)..., int2(1, 0)), ab.x), " "mix(plane1.sample(samp, coord, spvForward(options)..., int2(0, 1)), " "plane1.sample(samp, coord, spvForward(options)..., int2(1, 1)), ab.x), ab.y).rg);"); statement("return ycbcr;"); end_scope(); statement(""); break; case SPVFuncImplChromaReconstructLinear420XCositedEvenYMidpoint3Plane: statement("template"); statement("inline vec spvChromaReconstructLinear420XCositedEvenYMidpoint(texture2d plane0, " "texture2d plane1, texture2d plane2, sampler samp, float2 coord, LodOptions... options)"); begin_scope(); statement("vec ycbcr = vec(0, 0, 0, 1);"); statement("ycbcr.g = plane0.sample(samp, coord, spvForward(options)...).r;"); statement("float2 ab = fract((round(coord * float2(plane0.get_width(), plane0.get_height())) - float2(0, " "0.5)) * 0.5);"); statement("ycbcr.b = T(mix(mix(plane1.sample(samp, coord, spvForward(options)...), " "plane1.sample(samp, coord, spvForward(options)..., int2(1, 0)), ab.x), " "mix(plane1.sample(samp, coord, spvForward(options)..., int2(0, 1)), " "plane1.sample(samp, coord, spvForward(options)..., int2(1, 1)), ab.x), ab.y).r);"); statement("ycbcr.r = T(mix(mix(plane2.sample(samp, coord, spvForward(options)...), " "plane2.sample(samp, coord, spvForward(options)..., int2(1, 0)), ab.x), " "mix(plane2.sample(samp, coord, spvForward(options)..., int2(0, 1)), " "plane2.sample(samp, coord, spvForward(options)..., int2(1, 1)), ab.x), ab.y).r);"); statement("return ycbcr;"); end_scope(); statement(""); break; case SPVFuncImplChromaReconstructLinear420XMidpointYMidpoint2Plane: statement("template"); statement("inline vec spvChromaReconstructLinear420XMidpointYMidpoint(texture2d plane0, " "texture2d plane1, sampler samp, float2 coord, LodOptions... options)"); begin_scope(); statement("vec ycbcr = vec(0, 0, 0, 1);"); statement("ycbcr.g = plane0.sample(samp, coord, spvForward(options)...).r;"); statement("float2 ab = fract((round(coord * float2(plane0.get_width(), plane0.get_height())) - float2(0.5, " "0.5)) * 0.5);"); statement("ycbcr.br = vec(mix(mix(plane1.sample(samp, coord, spvForward(options)...), " "plane1.sample(samp, coord, spvForward(options)..., int2(1, 0)), ab.x), " "mix(plane1.sample(samp, coord, spvForward(options)..., int2(0, 1)), " "plane1.sample(samp, coord, spvForward(options)..., int2(1, 1)), ab.x), ab.y).rg);"); statement("return ycbcr;"); end_scope(); statement(""); break; case SPVFuncImplChromaReconstructLinear420XMidpointYMidpoint3Plane: statement("template"); statement("inline vec spvChromaReconstructLinear420XMidpointYMidpoint(texture2d plane0, " "texture2d plane1, texture2d plane2, sampler samp, float2 coord, LodOptions... options)"); begin_scope(); statement("vec ycbcr = vec(0, 0, 0, 1);"); statement("ycbcr.g = plane0.sample(samp, coord, spvForward(options)...).r;"); statement("float2 ab = fract((round(coord * float2(plane0.get_width(), plane0.get_height())) - float2(0.5, " "0.5)) * 0.5);"); statement("ycbcr.b = T(mix(mix(plane1.sample(samp, coord, spvForward(options)...), " "plane1.sample(samp, coord, spvForward(options)..., int2(1, 0)), ab.x), " "mix(plane1.sample(samp, coord, spvForward(options)..., int2(0, 1)), " "plane1.sample(samp, coord, spvForward(options)..., int2(1, 1)), ab.x), ab.y).r);"); statement("ycbcr.r = T(mix(mix(plane2.sample(samp, coord, spvForward(options)...), " "plane2.sample(samp, coord, spvForward(options)..., int2(1, 0)), ab.x), " "mix(plane2.sample(samp, coord, spvForward(options)..., int2(0, 1)), " "plane2.sample(samp, coord, spvForward(options)..., int2(1, 1)), ab.x), ab.y).r);"); statement("return ycbcr;"); end_scope(); statement(""); break; case SPVFuncImplExpandITUFullRange: statement("template"); statement("inline vec spvExpandITUFullRange(vec ycbcr, int n)"); begin_scope(); statement("ycbcr.br -= exp2(T(n-1))/(exp2(T(n))-1);"); statement("return ycbcr;"); end_scope(); statement(""); break; case SPVFuncImplExpandITUNarrowRange: statement("template"); statement("inline vec spvExpandITUNarrowRange(vec ycbcr, int n)"); begin_scope(); statement("ycbcr.g = (ycbcr.g * (exp2(T(n)) - 1) - ldexp(T(16), n - 8))/ldexp(T(219), n - 8);"); statement("ycbcr.br = (ycbcr.br * (exp2(T(n)) - 1) - ldexp(T(128), n - 8))/ldexp(T(224), n - 8);"); statement("return ycbcr;"); end_scope(); statement(""); break; case SPVFuncImplConvertYCbCrBT709: statement("// cf. Khronos Data Format Specification, section 15.1.1"); statement("constant float3x3 spvBT709Factors = {{1, 1, 1}, {0, -0.13397432/0.7152, 1.8556}, {1.5748, " "-0.33480248/0.7152, 0}};"); statement(""); statement("template"); statement("inline vec spvConvertYCbCrBT709(vec ycbcr)"); begin_scope(); statement("vec rgba;"); statement("rgba.rgb = vec(spvBT709Factors * ycbcr.gbr);"); statement("rgba.a = ycbcr.a;"); statement("return rgba;"); end_scope(); statement(""); break; case SPVFuncImplConvertYCbCrBT601: statement("// cf. Khronos Data Format Specification, section 15.1.2"); statement("constant float3x3 spvBT601Factors = {{1, 1, 1}, {0, -0.202008/0.587, 1.772}, {1.402, " "-0.419198/0.587, 0}};"); statement(""); statement("template"); statement("inline vec spvConvertYCbCrBT601(vec ycbcr)"); begin_scope(); statement("vec rgba;"); statement("rgba.rgb = vec(spvBT601Factors * ycbcr.gbr);"); statement("rgba.a = ycbcr.a;"); statement("return rgba;"); end_scope(); statement(""); break; case SPVFuncImplConvertYCbCrBT2020: statement("// cf. Khronos Data Format Specification, section 15.1.3"); statement("constant float3x3 spvBT2020Factors = {{1, 1, 1}, {0, -0.11156702/0.6780, 1.8814}, {1.4746, " "-0.38737742/0.6780, 0}};"); statement(""); statement("template"); statement("inline vec spvConvertYCbCrBT2020(vec ycbcr)"); begin_scope(); statement("vec rgba;"); statement("rgba.rgb = vec(spvBT2020Factors * ycbcr.gbr);"); statement("rgba.a = ycbcr.a;"); statement("return rgba;"); end_scope(); statement(""); break; case SPVFuncImplDynamicImageSampler: statement("enum class spvFormatResolution"); begin_scope(); statement("_444 = 0,"); statement("_422,"); statement("_420"); end_scope_decl(); statement(""); statement("enum class spvChromaFilter"); begin_scope(); statement("nearest = 0,"); statement("linear"); end_scope_decl(); statement(""); statement("enum class spvXChromaLocation"); begin_scope(); statement("cosited_even = 0,"); statement("midpoint"); end_scope_decl(); statement(""); statement("enum class spvYChromaLocation"); begin_scope(); statement("cosited_even = 0,"); statement("midpoint"); end_scope_decl(); statement(""); statement("enum class spvYCbCrModelConversion"); begin_scope(); statement("rgb_identity = 0,"); statement("ycbcr_identity,"); statement("ycbcr_bt_709,"); statement("ycbcr_bt_601,"); statement("ycbcr_bt_2020"); end_scope_decl(); statement(""); statement("enum class spvYCbCrRange"); begin_scope(); statement("itu_full = 0,"); statement("itu_narrow"); end_scope_decl(); statement(""); statement("struct spvComponentBits"); begin_scope(); statement("constexpr explicit spvComponentBits(int v) thread : value(v) {}"); statement("uchar value : 6;"); end_scope_decl(); statement("// A class corresponding to metal::sampler which holds sampler"); statement("// Y'CbCr conversion info."); statement("struct spvYCbCrSampler"); begin_scope(); statement("constexpr spvYCbCrSampler() thread : val(build()) {}"); statement("template"); statement("constexpr spvYCbCrSampler(Ts... t) thread : val(build(t...)) {}"); statement("constexpr spvYCbCrSampler(const thread spvYCbCrSampler& s) thread = default;"); statement(""); statement("spvFormatResolution get_resolution() const thread"); begin_scope(); statement("return spvFormatResolution((val & resolution_mask) >> resolution_base);"); end_scope(); statement("spvChromaFilter get_chroma_filter() const thread"); begin_scope(); statement("return spvChromaFilter((val & chroma_filter_mask) >> chroma_filter_base);"); end_scope(); statement("spvXChromaLocation get_x_chroma_offset() const thread"); begin_scope(); statement("return spvXChromaLocation((val & x_chroma_off_mask) >> x_chroma_off_base);"); end_scope(); statement("spvYChromaLocation get_y_chroma_offset() const thread"); begin_scope(); statement("return spvYChromaLocation((val & y_chroma_off_mask) >> y_chroma_off_base);"); end_scope(); statement("spvYCbCrModelConversion get_ycbcr_model() const thread"); begin_scope(); statement("return spvYCbCrModelConversion((val & ycbcr_model_mask) >> ycbcr_model_base);"); end_scope(); statement("spvYCbCrRange get_ycbcr_range() const thread"); begin_scope(); statement("return spvYCbCrRange((val & ycbcr_range_mask) >> ycbcr_range_base);"); end_scope(); statement("int get_bpc() const thread { return (val & bpc_mask) >> bpc_base; }"); statement(""); statement("private:"); statement("ushort val;"); statement(""); statement("constexpr static constant ushort resolution_bits = 2;"); statement("constexpr static constant ushort chroma_filter_bits = 2;"); statement("constexpr static constant ushort x_chroma_off_bit = 1;"); statement("constexpr static constant ushort y_chroma_off_bit = 1;"); statement("constexpr static constant ushort ycbcr_model_bits = 3;"); statement("constexpr static constant ushort ycbcr_range_bit = 1;"); statement("constexpr static constant ushort bpc_bits = 6;"); statement(""); statement("constexpr static constant ushort resolution_base = 0;"); statement("constexpr static constant ushort chroma_filter_base = 2;"); statement("constexpr static constant ushort x_chroma_off_base = 4;"); statement("constexpr static constant ushort y_chroma_off_base = 5;"); statement("constexpr static constant ushort ycbcr_model_base = 6;"); statement("constexpr static constant ushort ycbcr_range_base = 9;"); statement("constexpr static constant ushort bpc_base = 10;"); statement(""); statement( "constexpr static constant ushort resolution_mask = ((1 << resolution_bits) - 1) << resolution_base;"); statement("constexpr static constant ushort chroma_filter_mask = ((1 << chroma_filter_bits) - 1) << " "chroma_filter_base;"); statement("constexpr static constant ushort x_chroma_off_mask = ((1 << x_chroma_off_bit) - 1) << " "x_chroma_off_base;"); statement("constexpr static constant ushort y_chroma_off_mask = ((1 << y_chroma_off_bit) - 1) << " "y_chroma_off_base;"); statement("constexpr static constant ushort ycbcr_model_mask = ((1 << ycbcr_model_bits) - 1) << " "ycbcr_model_base;"); statement("constexpr static constant ushort ycbcr_range_mask = ((1 << ycbcr_range_bit) - 1) << " "ycbcr_range_base;"); statement("constexpr static constant ushort bpc_mask = ((1 << bpc_bits) - 1) << bpc_base;"); statement(""); statement("static constexpr ushort build()"); begin_scope(); statement("return 0;"); end_scope(); statement(""); statement("template"); statement("static constexpr ushort build(spvFormatResolution res, Ts... t)"); begin_scope(); statement("return (ushort(res) << resolution_base) | (build(t...) & ~resolution_mask);"); end_scope(); statement(""); statement("template"); statement("static constexpr ushort build(spvChromaFilter filt, Ts... t)"); begin_scope(); statement("return (ushort(filt) << chroma_filter_base) | (build(t...) & ~chroma_filter_mask);"); end_scope(); statement(""); statement("template"); statement("static constexpr ushort build(spvXChromaLocation loc, Ts... t)"); begin_scope(); statement("return (ushort(loc) << x_chroma_off_base) | (build(t...) & ~x_chroma_off_mask);"); end_scope(); statement(""); statement("template"); statement("static constexpr ushort build(spvYChromaLocation loc, Ts... t)"); begin_scope(); statement("return (ushort(loc) << y_chroma_off_base) | (build(t...) & ~y_chroma_off_mask);"); end_scope(); statement(""); statement("template"); statement("static constexpr ushort build(spvYCbCrModelConversion model, Ts... t)"); begin_scope(); statement("return (ushort(model) << ycbcr_model_base) | (build(t...) & ~ycbcr_model_mask);"); end_scope(); statement(""); statement("template"); statement("static constexpr ushort build(spvYCbCrRange range, Ts... t)"); begin_scope(); statement("return (ushort(range) << ycbcr_range_base) | (build(t...) & ~ycbcr_range_mask);"); end_scope(); statement(""); statement("template"); statement("static constexpr ushort build(spvComponentBits bpc, Ts... t)"); begin_scope(); statement("return (ushort(bpc.value) << bpc_base) | (build(t...) & ~bpc_mask);"); end_scope(); end_scope_decl(); statement(""); statement("// A class which can hold up to three textures and a sampler, including"); statement("// Y'CbCr conversion info, used to pass combined image-samplers"); statement("// dynamically to functions."); statement("template"); statement("struct spvDynamicImageSampler"); begin_scope(); statement("texture2d plane0;"); statement("texture2d plane1;"); statement("texture2d plane2;"); statement("sampler samp;"); statement("spvYCbCrSampler ycbcr_samp;"); statement("uint swizzle = 0;"); statement(""); if (msl_options.swizzle_texture_samples) { statement("constexpr spvDynamicImageSampler(texture2d tex, sampler samp, uint sw) thread :"); statement(" plane0(tex), samp(samp), swizzle(sw) {}"); } else { statement("constexpr spvDynamicImageSampler(texture2d tex, sampler samp) thread :"); statement(" plane0(tex), samp(samp) {}"); } statement("constexpr spvDynamicImageSampler(texture2d tex, sampler samp, spvYCbCrSampler ycbcr_samp, " "uint sw) thread :"); statement(" plane0(tex), samp(samp), ycbcr_samp(ycbcr_samp), swizzle(sw) {}"); statement("constexpr spvDynamicImageSampler(texture2d plane0, texture2d plane1,"); statement(" sampler samp, spvYCbCrSampler ycbcr_samp, uint sw) thread :"); statement(" plane0(plane0), plane1(plane1), samp(samp), ycbcr_samp(ycbcr_samp), swizzle(sw) {}"); statement( "constexpr spvDynamicImageSampler(texture2d plane0, texture2d plane1, texture2d plane2,"); statement(" sampler samp, spvYCbCrSampler ycbcr_samp, uint sw) thread :"); statement(" plane0(plane0), plane1(plane1), plane2(plane2), samp(samp), ycbcr_samp(ycbcr_samp), " "swizzle(sw) {}"); statement(""); // XXX This is really hard to follow... I've left comments to make it a bit easier. statement("template"); statement("vec do_sample(float2 coord, LodOptions... options) const thread"); begin_scope(); statement("if (!is_null_texture(plane1))"); begin_scope(); statement("if (ycbcr_samp.get_resolution() == spvFormatResolution::_444 ||"); statement(" ycbcr_samp.get_chroma_filter() == spvChromaFilter::nearest)"); begin_scope(); statement("if (!is_null_texture(plane2))"); statement(" return spvChromaReconstructNearest(plane0, plane1, plane2, samp, coord,"); statement(" spvForward(options)...);"); statement( "return spvChromaReconstructNearest(plane0, plane1, samp, coord, spvForward(options)...);"); end_scope(); // if (resolution == 422 || chroma_filter == nearest) statement("switch (ycbcr_samp.get_resolution())"); begin_scope(); statement("case spvFormatResolution::_444: break;"); statement("case spvFormatResolution::_422:"); begin_scope(); statement("switch (ycbcr_samp.get_x_chroma_offset())"); begin_scope(); statement("case spvXChromaLocation::cosited_even:"); statement(" if (!is_null_texture(plane2))"); statement(" return spvChromaReconstructLinear422CositedEven("); statement(" plane0, plane1, plane2, samp,"); statement(" coord, spvForward(options)...);"); statement(" return spvChromaReconstructLinear422CositedEven("); statement(" plane0, plane1, samp, coord,"); statement(" spvForward(options)...);"); statement("case spvXChromaLocation::midpoint:"); statement(" if (!is_null_texture(plane2))"); statement(" return spvChromaReconstructLinear422Midpoint("); statement(" plane0, plane1, plane2, samp,"); statement(" coord, spvForward(options)...);"); statement(" return spvChromaReconstructLinear422Midpoint("); statement(" plane0, plane1, samp, coord,"); statement(" spvForward(options)...);"); end_scope(); // switch (x_chroma_offset) end_scope(); // case 422: statement("case spvFormatResolution::_420:"); begin_scope(); statement("switch (ycbcr_samp.get_x_chroma_offset())"); begin_scope(); statement("case spvXChromaLocation::cosited_even:"); begin_scope(); statement("switch (ycbcr_samp.get_y_chroma_offset())"); begin_scope(); statement("case spvYChromaLocation::cosited_even:"); statement(" if (!is_null_texture(plane2))"); statement(" return spvChromaReconstructLinear420XCositedEvenYCositedEven("); statement(" plane0, plane1, plane2, samp,"); statement(" coord, spvForward(options)...);"); statement(" return spvChromaReconstructLinear420XCositedEvenYCositedEven("); statement(" plane0, plane1, samp, coord,"); statement(" spvForward(options)...);"); statement("case spvYChromaLocation::midpoint:"); statement(" if (!is_null_texture(plane2))"); statement(" return spvChromaReconstructLinear420XCositedEvenYMidpoint("); statement(" plane0, plane1, plane2, samp,"); statement(" coord, spvForward(options)...);"); statement(" return spvChromaReconstructLinear420XCositedEvenYMidpoint("); statement(" plane0, plane1, samp, coord,"); statement(" spvForward(options)...);"); end_scope(); // switch (y_chroma_offset) end_scope(); // case x::cosited_even: statement("case spvXChromaLocation::midpoint:"); begin_scope(); statement("switch (ycbcr_samp.get_y_chroma_offset())"); begin_scope(); statement("case spvYChromaLocation::cosited_even:"); statement(" if (!is_null_texture(plane2))"); statement(" return spvChromaReconstructLinear420XMidpointYCositedEven("); statement(" plane0, plane1, plane2, samp,"); statement(" coord, spvForward(options)...);"); statement(" return spvChromaReconstructLinear420XMidpointYCositedEven("); statement(" plane0, plane1, samp, coord,"); statement(" spvForward(options)...);"); statement("case spvYChromaLocation::midpoint:"); statement(" if (!is_null_texture(plane2))"); statement(" return spvChromaReconstructLinear420XMidpointYMidpoint("); statement(" plane0, plane1, plane2, samp,"); statement(" coord, spvForward(options)...);"); statement(" return spvChromaReconstructLinear420XMidpointYMidpoint("); statement(" plane0, plane1, samp, coord,"); statement(" spvForward(options)...);"); end_scope(); // switch (y_chroma_offset) end_scope(); // case x::midpoint end_scope(); // switch (x_chroma_offset) end_scope(); // case 420: end_scope(); // switch (resolution) end_scope(); // if (multiplanar) statement("return plane0.sample(samp, coord, spvForward(options)...);"); end_scope(); // do_sample() statement("template "); statement("vec sample(float2 coord, LodOptions... options) const thread"); begin_scope(); statement( "vec s = spvTextureSwizzle(do_sample(coord, spvForward(options)...), swizzle);"); statement("if (ycbcr_samp.get_ycbcr_model() == spvYCbCrModelConversion::rgb_identity)"); statement(" return s;"); statement(""); statement("switch (ycbcr_samp.get_ycbcr_range())"); begin_scope(); statement("case spvYCbCrRange::itu_full:"); statement(" s = spvExpandITUFullRange(s, ycbcr_samp.get_bpc());"); statement(" break;"); statement("case spvYCbCrRange::itu_narrow:"); statement(" s = spvExpandITUNarrowRange(s, ycbcr_samp.get_bpc());"); statement(" break;"); end_scope(); statement(""); statement("switch (ycbcr_samp.get_ycbcr_model())"); begin_scope(); statement("case spvYCbCrModelConversion::rgb_identity:"); // Silence Clang warning statement("case spvYCbCrModelConversion::ycbcr_identity:"); statement(" return s;"); statement("case spvYCbCrModelConversion::ycbcr_bt_709:"); statement(" return spvConvertYCbCrBT709(s);"); statement("case spvYCbCrModelConversion::ycbcr_bt_601:"); statement(" return spvConvertYCbCrBT601(s);"); statement("case spvYCbCrModelConversion::ycbcr_bt_2020:"); statement(" return spvConvertYCbCrBT2020(s);"); end_scope(); end_scope(); statement(""); // Sampler Y'CbCr conversion forbids offsets. statement("vec sample(float2 coord, int2 offset) const thread"); begin_scope(); if (msl_options.swizzle_texture_samples) statement("return spvTextureSwizzle(plane0.sample(samp, coord, offset), swizzle);"); else statement("return plane0.sample(samp, coord, offset);"); end_scope(); statement("template"); statement("vec sample(float2 coord, lod_options options, int2 offset) const thread"); begin_scope(); if (msl_options.swizzle_texture_samples) statement("return spvTextureSwizzle(plane0.sample(samp, coord, options, offset), swizzle);"); else statement("return plane0.sample(samp, coord, options, offset);"); end_scope(); statement("#if __HAVE_MIN_LOD_CLAMP__"); statement("vec sample(float2 coord, bias b, min_lod_clamp min_lod, int2 offset) const thread"); begin_scope(); statement("return plane0.sample(samp, coord, b, min_lod, offset);"); end_scope(); statement( "vec sample(float2 coord, gradient2d grad, min_lod_clamp min_lod, int2 offset) const thread"); begin_scope(); statement("return plane0.sample(samp, coord, grad, min_lod, offset);"); end_scope(); statement("#endif"); statement(""); // Y'CbCr conversion forbids all operations but sampling. statement("vec read(uint2 coord, uint lod = 0) const thread"); begin_scope(); statement("return plane0.read(coord, lod);"); end_scope(); statement(""); statement("vec gather(float2 coord, int2 offset = int2(0), component c = component::x) const thread"); begin_scope(); if (msl_options.swizzle_texture_samples) statement("return spvGatherSwizzle(plane0, samp, swizzle, c, coord, offset);"); else statement("return plane0.gather(samp, coord, offset, c);"); end_scope(); end_scope_decl(); statement(""); break; case SPVFuncImplRayQueryIntersectionParams: statement("intersection_params spvMakeIntersectionParams(uint flags)"); begin_scope(); statement("intersection_params ip;"); statement("if ((flags & ", RayFlagsOpaqueKHRMask, ") != 0)"); statement(" ip.force_opacity(forced_opacity::opaque);"); statement("if ((flags & ", RayFlagsNoOpaqueKHRMask, ") != 0)"); statement(" ip.force_opacity(forced_opacity::non_opaque);"); statement("if ((flags & ", RayFlagsTerminateOnFirstHitKHRMask, ") != 0)"); statement(" ip.accept_any_intersection(true);"); // RayFlagsSkipClosestHitShaderKHRMask is not available in MSL statement("if ((flags & ", RayFlagsCullBackFacingTrianglesKHRMask, ") != 0)"); statement(" ip.set_triangle_cull_mode(triangle_cull_mode::back);"); statement("if ((flags & ", RayFlagsCullFrontFacingTrianglesKHRMask, ") != 0)"); statement(" ip.set_triangle_cull_mode(triangle_cull_mode::front);"); statement("if ((flags & ", RayFlagsCullOpaqueKHRMask, ") != 0)"); statement(" ip.set_opacity_cull_mode(opacity_cull_mode::opaque);"); statement("if ((flags & ", RayFlagsCullNoOpaqueKHRMask, ") != 0)"); statement(" ip.set_opacity_cull_mode(opacity_cull_mode::non_opaque);"); statement("if ((flags & ", RayFlagsSkipTrianglesKHRMask, ") != 0)"); statement(" ip.set_geometry_cull_mode(geometry_cull_mode::triangle);"); statement("if ((flags & ", RayFlagsSkipAABBsKHRMask, ") != 0)"); statement(" ip.set_geometry_cull_mode(geometry_cull_mode::bounding_box);"); statement("return ip;"); end_scope(); statement(""); break; case SPVFuncImplVariableDescriptor: statement("template"); statement("struct spvDescriptor"); begin_scope(); statement("T value;"); end_scope_decl(); statement(""); break; case SPVFuncImplVariableSizedDescriptor: statement("template"); statement("struct spvBufferDescriptor"); begin_scope(); statement("T value;"); statement("int length;"); statement("const device T& operator -> () const device"); begin_scope(); statement("return value;"); end_scope(); statement("const device T& operator * () const device"); begin_scope(); statement("return value;"); end_scope(); end_scope_decl(); statement(""); break; case SPVFuncImplVariableDescriptorArray: statement("template"); statement("struct spvDescriptorArray"); begin_scope(); statement("spvDescriptorArray(const device spvDescriptor* ptr) : ptr(ptr)"); begin_scope(); end_scope(); statement("const device T& operator [] (size_t i) const"); begin_scope(); statement("return ptr[i].value;"); end_scope(); statement("const device spvDescriptor* ptr;"); end_scope_decl(); statement(""); if (msl_options.runtime_array_rich_descriptor && spv_function_implementations.count(SPVFuncImplVariableSizedDescriptor) != 0) { statement("template"); statement("struct spvDescriptorArray"); begin_scope(); statement("spvDescriptorArray(const device spvBufferDescriptor* ptr) : ptr(ptr)"); begin_scope(); end_scope(); statement("const device T* operator [] (size_t i) const"); begin_scope(); statement("return ptr[i].value;"); end_scope(); statement("const int length(int i) const"); begin_scope(); statement("return ptr[i].length;"); end_scope(); statement("const device spvBufferDescriptor* ptr;"); end_scope_decl(); statement(""); } break; case SPVFuncImplPaddedStd140: // .data is used in access chain. statement("template "); statement("struct spvPaddedStd140 { alignas(16) T data; };"); statement("template "); statement("using spvPaddedStd140Matrix = spvPaddedStd140[n];"); statement(""); break; default: break; } } } static string inject_top_level_storage_qualifier(const string &expr, const string &qualifier) { // Easier to do this through text munging since the qualifier does not exist in the type system at all, // and plumbing in all that information is not very helpful. size_t last_reference = expr.find_last_of('&'); size_t last_pointer = expr.find_last_of('*'); size_t last_significant = string::npos; if (last_reference == string::npos) last_significant = last_pointer; else if (last_pointer == string::npos) last_significant = last_reference; else last_significant = max(last_reference, last_pointer); if (last_significant == string::npos) return join(qualifier, " ", expr); else { return join(expr.substr(0, last_significant + 1), " ", qualifier, expr.substr(last_significant + 1, string::npos)); } } void CompilerMSL::declare_constant_arrays() { bool fully_inlined = ir.ids_for_type[TypeFunction].size() == 1; // MSL cannot declare arrays inline (except when declaring a variable), so we must move them out to // global constants directly, so we are able to use constants as variable expressions. bool emitted = false; ir.for_each_typed_id([&](uint32_t, SPIRConstant &c) { if (c.specialization) return; auto &type = this->get(c.constant_type); // Constant arrays of non-primitive types (i.e. matrices) won't link properly into Metal libraries. // FIXME: However, hoisting constants to main() means we need to pass down constant arrays to leaf functions if they are used there. // If there are multiple functions in the module, drop this case to avoid breaking use cases which do not need to // link into Metal libraries. This is hacky. if (is_array(type) && (!fully_inlined || is_scalar(type) || is_vector(type))) { add_resource_name(c.self); auto name = to_name(c.self); statement(inject_top_level_storage_qualifier(variable_decl(type, name), "constant"), " = ", constant_expression(c), ";"); emitted = true; } }); if (emitted) statement(""); } // Constant arrays of non-primitive types (i.e. matrices) won't link properly into Metal libraries void CompilerMSL::declare_complex_constant_arrays() { // If we do not have a fully inlined module, we did not opt in to // declaring constant arrays of complex types. See CompilerMSL::declare_constant_arrays(). bool fully_inlined = ir.ids_for_type[TypeFunction].size() == 1; if (!fully_inlined) return; // MSL cannot declare arrays inline (except when declaring a variable), so we must move them out to // global constants directly, so we are able to use constants as variable expressions. bool emitted = false; ir.for_each_typed_id([&](uint32_t, SPIRConstant &c) { if (c.specialization) return; auto &type = this->get(c.constant_type); if (is_array(type) && !(is_scalar(type) || is_vector(type))) { add_resource_name(c.self); auto name = to_name(c.self); statement("", variable_decl(type, name), " = ", constant_expression(c), ";"); emitted = true; } }); if (emitted) statement(""); } void CompilerMSL::emit_resources() { declare_constant_arrays(); // Emit the special [[stage_in]] and [[stage_out]] interface blocks which we created. emit_interface_block(stage_out_var_id); emit_interface_block(patch_stage_out_var_id); emit_interface_block(stage_in_var_id); emit_interface_block(patch_stage_in_var_id); } // Emit declarations for the specialization Metal function constants void CompilerMSL::emit_specialization_constants_and_structs() { SpecializationConstant wg_x, wg_y, wg_z; ID workgroup_size_id = get_work_group_size_specialization_constants(wg_x, wg_y, wg_z); bool emitted = false; unordered_set declared_structs; unordered_set aligned_structs; // First, we need to deal with scalar block layout. // It is possible that a struct may have to be placed at an alignment which does not match the innate alignment of the struct itself. // In that case, if such a case exists for a struct, we must force that all elements of the struct become packed_ types. // This makes the struct alignment as small as physically possible. // When we actually align the struct later, we can insert padding as necessary to make the packed members behave like normally aligned types. ir.for_each_typed_id([&](uint32_t type_id, const SPIRType &type) { if (type.basetype == SPIRType::Struct && has_extended_decoration(type_id, SPIRVCrossDecorationBufferBlockRepacked)) mark_scalar_layout_structs(type); }); bool builtin_block_type_is_required = false; // Very special case. If gl_PerVertex is initialized as an array (tessellation) // we have to potentially emit the gl_PerVertex struct type so that we can emit a constant LUT. ir.for_each_typed_id([&](uint32_t, SPIRConstant &c) { auto &type = this->get(c.constant_type); if (is_array(type) && has_decoration(type.self, DecorationBlock) && is_builtin_type(type)) builtin_block_type_is_required = true; }); // Very particular use of the soft loop lock. // align_struct may need to create custom types on the fly, but we don't care about // these types for purpose of iterating over them in ir.ids_for_type and friends. auto loop_lock = ir.create_loop_soft_lock(); // Physical storage buffer pointers can have cyclical references, // so emit forward declarations of them before other structs. // Ignore type_id because we want the underlying struct type from the pointer. ir.for_each_typed_id([&](uint32_t /* type_id */, const SPIRType &type) { if (type.basetype == SPIRType::Struct && type.pointer && type.storage == StorageClassPhysicalStorageBuffer && declared_structs.count(type.self) == 0) { statement("struct ", to_name(type.self), ";"); declared_structs.insert(type.self); emitted = true; } }); if (emitted) statement(""); emitted = false; declared_structs.clear(); // It is possible to have multiple spec constants that use the same spec constant ID. // The most common cause of this is defining spec constants in GLSL while also declaring // the workgroup size to use those spec constants. But, Metal forbids declaring more than // one variable with the same function constant ID. // In this case, we must only declare one variable with the [[function_constant(id)]] // attribute, and use its initializer to initialize all the spec constants with // that ID. std::unordered_map unique_func_constants; for (auto &id_ : ir.ids_for_constant_undef_or_type) { auto &id = ir.ids[id_]; if (id.get_type() == TypeConstant) { auto &c = id.get(); if (c.self == workgroup_size_id) { // TODO: This can be expressed as a [[threads_per_threadgroup]] input semantic, but we need to know // the work group size at compile time in SPIR-V, and [[threads_per_threadgroup]] would need to be passed around as a global. // The work group size may be a specialization constant. statement("constant uint3 ", builtin_to_glsl(BuiltInWorkgroupSize, StorageClassWorkgroup), " [[maybe_unused]] = ", constant_expression(get(workgroup_size_id)), ";"); emitted = true; } else if (c.specialization) { auto &type = get(c.constant_type); string sc_type_name = type_to_glsl(type); add_resource_name(c.self); string sc_name = to_name(c.self); // Function constants are only supported in MSL 1.2 and later. // If we don't support it just declare the "default" directly. // This "default" value can be overridden to the true specialization constant by the API user. // Specialization constants which are used as array length expressions cannot be function constants in MSL, // so just fall back to macros. if (msl_options.supports_msl_version(1, 2) && has_decoration(c.self, DecorationSpecId) && !c.is_used_as_array_length) { // Only scalar, non-composite values can be function constants. uint32_t constant_id = get_decoration(c.self, DecorationSpecId); if (!unique_func_constants.count(constant_id)) unique_func_constants.insert(make_pair(constant_id, c.self)); SPIRType::BaseType sc_tmp_type = expression_type(unique_func_constants[constant_id]).basetype; string sc_tmp_name = to_name(unique_func_constants[constant_id]) + "_tmp"; if (unique_func_constants[constant_id] == c.self) statement("constant ", sc_type_name, " ", sc_tmp_name, " [[function_constant(", constant_id, ")]];"); statement("constant ", sc_type_name, " ", sc_name, " = is_function_constant_defined(", sc_tmp_name, ") ? ", bitcast_expression(type, sc_tmp_type, sc_tmp_name), " : ", constant_expression(c), ";"); } else if (has_decoration(c.self, DecorationSpecId)) { // Fallback to macro overrides. c.specialization_constant_macro_name = constant_value_macro_name(get_decoration(c.self, DecorationSpecId)); statement("#ifndef ", c.specialization_constant_macro_name); statement("#define ", c.specialization_constant_macro_name, " ", constant_expression(c)); statement("#endif"); statement("constant ", sc_type_name, " ", sc_name, " = ", c.specialization_constant_macro_name, ";"); } else { // Composite specialization constants must be built from other specialization constants. statement("constant ", sc_type_name, " ", sc_name, " = ", constant_expression(c), ";"); } emitted = true; } } else if (id.get_type() == TypeConstantOp) { auto &c = id.get(); auto &type = get(c.basetype); add_resource_name(c.self); auto name = to_name(c.self); statement("constant ", variable_decl(type, name), " = ", constant_op_expression(c), ";"); emitted = true; } else if (id.get_type() == TypeType) { // Output non-builtin interface structs. These include local function structs // and structs nested within uniform and read-write buffers. auto &type = id.get(); TypeID type_id = type.self; bool is_struct = (type.basetype == SPIRType::Struct) && type.array.empty() && !type.pointer; bool is_block = has_decoration(type.self, DecorationBlock) || has_decoration(type.self, DecorationBufferBlock); bool is_builtin_block = is_block && is_builtin_type(type); bool is_declarable_struct = is_struct && (!is_builtin_block || builtin_block_type_is_required); // We'll declare this later. if (stage_out_var_id && get_stage_out_struct_type().self == type_id) is_declarable_struct = false; if (patch_stage_out_var_id && get_patch_stage_out_struct_type().self == type_id) is_declarable_struct = false; if (stage_in_var_id && get_stage_in_struct_type().self == type_id) is_declarable_struct = false; if (patch_stage_in_var_id && get_patch_stage_in_struct_type().self == type_id) is_declarable_struct = false; // Special case. Declare builtin struct anyways if we need to emit a threadgroup version of it. if (stage_out_masked_builtin_type_id == type_id) is_declarable_struct = true; // Align and emit declarable structs...but avoid declaring each more than once. if (is_declarable_struct && declared_structs.count(type_id) == 0) { if (emitted) statement(""); emitted = false; declared_structs.insert(type_id); if (has_extended_decoration(type_id, SPIRVCrossDecorationBufferBlockRepacked)) align_struct(type, aligned_structs); // Make sure we declare the underlying struct type, and not the "decorated" type with pointers, etc. emit_struct(get(type_id)); } } else if (id.get_type() == TypeUndef) { auto &undef = id.get(); auto &type = get(undef.basetype); // OpUndef can be void for some reason ... if (type.basetype == SPIRType::Void) return; // Undefined global memory is not allowed in MSL. // Declare constant and init to zeros. Use {}, as global constructors can break Metal. statement( inject_top_level_storage_qualifier(variable_decl(type, to_name(undef.self), undef.self), "constant"), " = {};"); emitted = true; } } if (emitted) statement(""); } void CompilerMSL::emit_binary_ptr_op(uint32_t result_type, uint32_t result_id, uint32_t op0, uint32_t op1, const char *op) { bool forward = should_forward(op0) && should_forward(op1); emit_op(result_type, result_id, join(to_ptr_expression(op0), " ", op, " ", to_ptr_expression(op1)), forward); inherit_expression_dependencies(result_id, op0); inherit_expression_dependencies(result_id, op1); } string CompilerMSL::to_ptr_expression(uint32_t id, bool register_expression_read) { auto *e = maybe_get(id); auto expr = enclose_expression(e && e->need_transpose ? e->expression : to_expression(id, register_expression_read)); if (!should_dereference(id)) expr = address_of_expression(expr); return expr; } void CompilerMSL::emit_binary_unord_op(uint32_t result_type, uint32_t result_id, uint32_t op0, uint32_t op1, const char *op) { bool forward = should_forward(op0) && should_forward(op1); emit_op(result_type, result_id, join("(isunordered(", to_enclosed_unpacked_expression(op0), ", ", to_enclosed_unpacked_expression(op1), ") || ", to_enclosed_unpacked_expression(op0), " ", op, " ", to_enclosed_unpacked_expression(op1), ")"), forward); inherit_expression_dependencies(result_id, op0); inherit_expression_dependencies(result_id, op1); } bool CompilerMSL::emit_tessellation_io_load(uint32_t result_type_id, uint32_t id, uint32_t ptr) { auto &ptr_type = expression_type(ptr); auto &result_type = get(result_type_id); if (ptr_type.storage != StorageClassInput && ptr_type.storage != StorageClassOutput) return false; if (ptr_type.storage == StorageClassOutput && is_tese_shader()) return false; if (has_decoration(ptr, DecorationPatch)) return false; bool ptr_is_io_variable = ir.ids[ptr].get_type() == TypeVariable; bool flattened_io = variable_storage_requires_stage_io(ptr_type.storage); bool flat_data_type = flattened_io && (is_matrix(result_type) || is_array(result_type) || result_type.basetype == SPIRType::Struct); // Edge case, even with multi-patch workgroups, we still need to unroll load // if we're loading control points directly. if (ptr_is_io_variable && is_array(result_type)) flat_data_type = true; if (!flat_data_type) return false; // Now, we must unflatten a composite type and take care of interleaving array access with gl_in/gl_out. // Lots of painful code duplication since we *really* should not unroll these kinds of loads in entry point fixup // unless we're forced to do this when the code is emitting inoptimal OpLoads. string expr; uint32_t interface_index = get_extended_decoration(ptr, SPIRVCrossDecorationInterfaceMemberIndex); auto *var = maybe_get_backing_variable(ptr); auto &expr_type = get_pointee_type(ptr_type.self); const auto &iface_type = expression_type(stage_in_ptr_var_id); if (!flattened_io) { // Simplest case for multi-patch workgroups, just unroll array as-is. if (interface_index == uint32_t(-1)) return false; expr += type_to_glsl(result_type) + "({ "; uint32_t num_control_points = to_array_size_literal(result_type, uint32_t(result_type.array.size()) - 1); for (uint32_t i = 0; i < num_control_points; i++) { const uint32_t indices[2] = { i, interface_index }; AccessChainMeta meta; expr += access_chain_internal(stage_in_ptr_var_id, indices, 2, ACCESS_CHAIN_INDEX_IS_LITERAL_BIT | ACCESS_CHAIN_PTR_CHAIN_BIT, &meta); if (i + 1 < num_control_points) expr += ", "; } expr += " })"; } else if (result_type.array.size() > 2) { SPIRV_CROSS_THROW("Cannot load tessellation IO variables with more than 2 dimensions."); } else if (result_type.array.size() == 2) { if (!ptr_is_io_variable) SPIRV_CROSS_THROW("Loading an array-of-array must be loaded directly from an IO variable."); if (interface_index == uint32_t(-1)) SPIRV_CROSS_THROW("Interface index is unknown. Cannot continue."); if (result_type.basetype == SPIRType::Struct || is_matrix(result_type)) SPIRV_CROSS_THROW("Cannot load array-of-array of composite type in tessellation IO."); expr += type_to_glsl(result_type) + "({ "; uint32_t num_control_points = to_array_size_literal(result_type, 1); uint32_t base_interface_index = interface_index; auto &sub_type = get(result_type.parent_type); for (uint32_t i = 0; i < num_control_points; i++) { expr += type_to_glsl(sub_type) + "({ "; interface_index = base_interface_index; uint32_t array_size = to_array_size_literal(result_type, 0); for (uint32_t j = 0; j < array_size; j++, interface_index++) { const uint32_t indices[2] = { i, interface_index }; AccessChainMeta meta; expr += access_chain_internal(stage_in_ptr_var_id, indices, 2, ACCESS_CHAIN_INDEX_IS_LITERAL_BIT | ACCESS_CHAIN_PTR_CHAIN_BIT, &meta); if (!is_matrix(sub_type) && sub_type.basetype != SPIRType::Struct && expr_type.vecsize > sub_type.vecsize) expr += vector_swizzle(sub_type.vecsize, 0); if (j + 1 < array_size) expr += ", "; } expr += " })"; if (i + 1 < num_control_points) expr += ", "; } expr += " })"; } else if (result_type.basetype == SPIRType::Struct) { bool is_array_of_struct = is_array(result_type); if (is_array_of_struct && !ptr_is_io_variable) SPIRV_CROSS_THROW("Loading array of struct from IO variable must come directly from IO variable."); uint32_t num_control_points = 1; if (is_array_of_struct) { num_control_points = to_array_size_literal(result_type, 0); expr += type_to_glsl(result_type) + "({ "; } auto &struct_type = is_array_of_struct ? get(result_type.parent_type) : result_type; assert(struct_type.array.empty()); for (uint32_t i = 0; i < num_control_points; i++) { expr += type_to_glsl(struct_type) + "{ "; for (uint32_t j = 0; j < uint32_t(struct_type.member_types.size()); j++) { // The base interface index is stored per variable for structs. if (var) { interface_index = get_extended_member_decoration(var->self, j, SPIRVCrossDecorationInterfaceMemberIndex); } if (interface_index == uint32_t(-1)) SPIRV_CROSS_THROW("Interface index is unknown. Cannot continue."); const auto &mbr_type = get(struct_type.member_types[j]); const auto &expr_mbr_type = get(expr_type.member_types[j]); if (is_matrix(mbr_type) && ptr_type.storage == StorageClassInput) { expr += type_to_glsl(mbr_type) + "("; for (uint32_t k = 0; k < mbr_type.columns; k++, interface_index++) { if (is_array_of_struct) { const uint32_t indices[2] = { i, interface_index }; AccessChainMeta meta; expr += access_chain_internal( stage_in_ptr_var_id, indices, 2, ACCESS_CHAIN_INDEX_IS_LITERAL_BIT | ACCESS_CHAIN_PTR_CHAIN_BIT, &meta); } else expr += to_expression(ptr) + "." + to_member_name(iface_type, interface_index); if (expr_mbr_type.vecsize > mbr_type.vecsize) expr += vector_swizzle(mbr_type.vecsize, 0); if (k + 1 < mbr_type.columns) expr += ", "; } expr += ")"; } else if (is_array(mbr_type)) { expr += type_to_glsl(mbr_type) + "({ "; uint32_t array_size = to_array_size_literal(mbr_type, 0); for (uint32_t k = 0; k < array_size; k++, interface_index++) { if (is_array_of_struct) { const uint32_t indices[2] = { i, interface_index }; AccessChainMeta meta; expr += access_chain_internal( stage_in_ptr_var_id, indices, 2, ACCESS_CHAIN_INDEX_IS_LITERAL_BIT | ACCESS_CHAIN_PTR_CHAIN_BIT, &meta); } else expr += to_expression(ptr) + "." + to_member_name(iface_type, interface_index); if (expr_mbr_type.vecsize > mbr_type.vecsize) expr += vector_swizzle(mbr_type.vecsize, 0); if (k + 1 < array_size) expr += ", "; } expr += " })"; } else { if (is_array_of_struct) { const uint32_t indices[2] = { i, interface_index }; AccessChainMeta meta; expr += access_chain_internal(stage_in_ptr_var_id, indices, 2, ACCESS_CHAIN_INDEX_IS_LITERAL_BIT | ACCESS_CHAIN_PTR_CHAIN_BIT, &meta); } else expr += to_expression(ptr) + "." + to_member_name(iface_type, interface_index); if (expr_mbr_type.vecsize > mbr_type.vecsize) expr += vector_swizzle(mbr_type.vecsize, 0); } if (j + 1 < struct_type.member_types.size()) expr += ", "; } expr += " }"; if (i + 1 < num_control_points) expr += ", "; } if (is_array_of_struct) expr += " })"; } else if (is_matrix(result_type)) { bool is_array_of_matrix = is_array(result_type); if (is_array_of_matrix && !ptr_is_io_variable) SPIRV_CROSS_THROW("Loading array of matrix from IO variable must come directly from IO variable."); if (interface_index == uint32_t(-1)) SPIRV_CROSS_THROW("Interface index is unknown. Cannot continue."); if (is_array_of_matrix) { // Loading a matrix from each control point. uint32_t base_interface_index = interface_index; uint32_t num_control_points = to_array_size_literal(result_type, 0); expr += type_to_glsl(result_type) + "({ "; auto &matrix_type = get_variable_element_type(get(ptr)); for (uint32_t i = 0; i < num_control_points; i++) { interface_index = base_interface_index; expr += type_to_glsl(matrix_type) + "("; for (uint32_t j = 0; j < result_type.columns; j++, interface_index++) { const uint32_t indices[2] = { i, interface_index }; AccessChainMeta meta; expr += access_chain_internal(stage_in_ptr_var_id, indices, 2, ACCESS_CHAIN_INDEX_IS_LITERAL_BIT | ACCESS_CHAIN_PTR_CHAIN_BIT, &meta); if (expr_type.vecsize > result_type.vecsize) expr += vector_swizzle(result_type.vecsize, 0); if (j + 1 < result_type.columns) expr += ", "; } expr += ")"; if (i + 1 < num_control_points) expr += ", "; } expr += " })"; } else { expr += type_to_glsl(result_type) + "("; for (uint32_t i = 0; i < result_type.columns; i++, interface_index++) { expr += to_expression(ptr) + "." + to_member_name(iface_type, interface_index); if (expr_type.vecsize > result_type.vecsize) expr += vector_swizzle(result_type.vecsize, 0); if (i + 1 < result_type.columns) expr += ", "; } expr += ")"; } } else if (ptr_is_io_variable) { assert(is_array(result_type)); assert(result_type.array.size() == 1); if (interface_index == uint32_t(-1)) SPIRV_CROSS_THROW("Interface index is unknown. Cannot continue."); // We're loading an array directly from a global variable. // This means we're loading one member from each control point. expr += type_to_glsl(result_type) + "({ "; uint32_t num_control_points = to_array_size_literal(result_type, 0); for (uint32_t i = 0; i < num_control_points; i++) { const uint32_t indices[2] = { i, interface_index }; AccessChainMeta meta; expr += access_chain_internal(stage_in_ptr_var_id, indices, 2, ACCESS_CHAIN_INDEX_IS_LITERAL_BIT | ACCESS_CHAIN_PTR_CHAIN_BIT, &meta); if (expr_type.vecsize > result_type.vecsize) expr += vector_swizzle(result_type.vecsize, 0); if (i + 1 < num_control_points) expr += ", "; } expr += " })"; } else { // We're loading an array from a concrete control point. assert(is_array(result_type)); assert(result_type.array.size() == 1); if (interface_index == uint32_t(-1)) SPIRV_CROSS_THROW("Interface index is unknown. Cannot continue."); expr += type_to_glsl(result_type) + "({ "; uint32_t array_size = to_array_size_literal(result_type, 0); for (uint32_t i = 0; i < array_size; i++, interface_index++) { expr += to_expression(ptr) + "." + to_member_name(iface_type, interface_index); if (expr_type.vecsize > result_type.vecsize) expr += vector_swizzle(result_type.vecsize, 0); if (i + 1 < array_size) expr += ", "; } expr += " })"; } emit_op(result_type_id, id, expr, false); register_read(id, ptr, false); return true; } bool CompilerMSL::emit_tessellation_access_chain(const uint32_t *ops, uint32_t length) { // If this is a per-vertex output, remap it to the I/O array buffer. // Any object which did not go through IO flattening shenanigans will go there instead. // We will unflatten on-demand instead as needed, but not all possible cases can be supported, especially with arrays. auto *var = maybe_get_backing_variable(ops[2]); bool patch = false; bool flat_data = false; bool ptr_is_chain = false; bool flatten_composites = false; bool is_block = false; bool is_arrayed = false; if (var) { auto &type = get_variable_data_type(*var); is_block = has_decoration(type.self, DecorationBlock); is_arrayed = !type.array.empty(); flatten_composites = variable_storage_requires_stage_io(var->storage); patch = has_decoration(ops[2], DecorationPatch) || is_patch_block(type); // Should match strip_array in add_interface_block. flat_data = var->storage == StorageClassInput || (var->storage == StorageClassOutput && is_tesc_shader()); // Patch inputs are treated as normal block IO variables, so they don't deal with this path at all. if (patch && (!is_block || is_arrayed || var->storage == StorageClassInput)) flat_data = false; // We might have a chained access chain, where // we first take the access chain to the control point, and then we chain into a member or something similar. // In this case, we need to skip gl_in/gl_out remapping. // Also, skip ptr chain for patches. ptr_is_chain = var->self != ID(ops[2]); } bool builtin_variable = false; bool variable_is_flat = false; if (var && flat_data) { builtin_variable = is_builtin_variable(*var); BuiltIn bi_type = BuiltInMax; if (builtin_variable && !is_block) bi_type = BuiltIn(get_decoration(var->self, DecorationBuiltIn)); variable_is_flat = !builtin_variable || is_block || bi_type == BuiltInPosition || bi_type == BuiltInPointSize || bi_type == BuiltInClipDistance || bi_type == BuiltInCullDistance; } if (variable_is_flat) { // If output is masked, it is emitted as a "normal" variable, just go through normal code paths. // Only check this for the first level of access chain. // Dealing with this for partial access chains should be possible, but awkward. if (var->storage == StorageClassOutput && !ptr_is_chain) { bool masked = false; if (is_block) { uint32_t relevant_member_index = patch ? 3 : 4; // FIXME: This won't work properly if the application first access chains into gl_out element, // then access chains into the member. Super weird, but theoretically possible ... if (length > relevant_member_index) { uint32_t mbr_idx = get(ops[relevant_member_index]).scalar(); masked = is_stage_output_block_member_masked(*var, mbr_idx, true); } } else if (var) masked = is_stage_output_variable_masked(*var); if (masked) return false; } AccessChainMeta meta; SmallVector indices; uint32_t next_id = ir.increase_bound_by(1); indices.reserve(length - 3 + 1); uint32_t first_non_array_index = (ptr_is_chain ? 3 : 4) - (patch ? 1 : 0); VariableID stage_var_id; if (patch) stage_var_id = var->storage == StorageClassInput ? patch_stage_in_var_id : patch_stage_out_var_id; else stage_var_id = var->storage == StorageClassInput ? stage_in_ptr_var_id : stage_out_ptr_var_id; VariableID ptr = ptr_is_chain ? VariableID(ops[2]) : stage_var_id; if (!ptr_is_chain && !patch) { // Index into gl_in/gl_out with first array index. indices.push_back(ops[first_non_array_index - 1]); } auto &result_ptr_type = get(ops[0]); uint32_t const_mbr_id = next_id++; uint32_t index = get_extended_decoration(ops[2], SPIRVCrossDecorationInterfaceMemberIndex); // If we have a pointer chain expression, and we are no longer pointing to a composite // object, we are in the clear. There is no longer a need to flatten anything. bool further_access_chain_is_trivial = false; if (ptr_is_chain && flatten_composites) { auto &ptr_type = expression_type(ptr); if (!is_array(ptr_type) && !is_matrix(ptr_type) && ptr_type.basetype != SPIRType::Struct) further_access_chain_is_trivial = true; } if (!further_access_chain_is_trivial && (flatten_composites || is_block)) { uint32_t i = first_non_array_index; auto *type = &get_variable_element_type(*var); if (index == uint32_t(-1) && length >= (first_non_array_index + 1)) { // Maybe this is a struct type in the input class, in which case // we put it as a decoration on the corresponding member. uint32_t mbr_idx = get_constant(ops[first_non_array_index]).scalar(); index = get_extended_member_decoration(var->self, mbr_idx, SPIRVCrossDecorationInterfaceMemberIndex); assert(index != uint32_t(-1)); i++; type = &get(type->member_types[mbr_idx]); } // In this case, we're poking into flattened structures and arrays, so now we have to // combine the following indices. If we encounter a non-constant index, // we're hosed. for (; flatten_composites && i < length; ++i) { if (!is_array(*type) && !is_matrix(*type) && type->basetype != SPIRType::Struct) break; auto *c = maybe_get(ops[i]); if (!c || c->specialization) SPIRV_CROSS_THROW("Trying to dynamically index into an array interface variable in tessellation. " "This is currently unsupported."); // We're in flattened space, so just increment the member index into IO block. // We can only do this once in the current implementation, so either: // Struct, Matrix or 1-dimensional array for a control point. if (type->basetype == SPIRType::Struct && var->storage == StorageClassOutput) { // Need to consider holes, since individual block members might be masked away. uint32_t mbr_idx = c->scalar(); for (uint32_t j = 0; j < mbr_idx; j++) if (!is_stage_output_block_member_masked(*var, j, true)) index++; } else index += c->scalar(); if (type->parent_type) type = &get(type->parent_type); else if (type->basetype == SPIRType::Struct) type = &get(type->member_types[c->scalar()]); } // We're not going to emit the actual member name, we let any further OpLoad take care of that. // Tag the access chain with the member index we're referencing. auto &result_pointee_type = get_pointee_type(result_ptr_type); bool defer_access_chain = flatten_composites && (is_matrix(result_pointee_type) || is_array(result_pointee_type) || result_pointee_type.basetype == SPIRType::Struct); if (!defer_access_chain) { // Access the appropriate member of gl_in/gl_out. set(const_mbr_id, get_uint_type_id(), index, false); indices.push_back(const_mbr_id); // Member index is now irrelevant. index = uint32_t(-1); // Append any straggling access chain indices. if (i < length) indices.insert(indices.end(), ops + i, ops + length); } else { // We must have consumed the entire access chain if we're deferring it. assert(i == length); } if (index != uint32_t(-1)) set_extended_decoration(ops[1], SPIRVCrossDecorationInterfaceMemberIndex, index); else unset_extended_decoration(ops[1], SPIRVCrossDecorationInterfaceMemberIndex); } else { if (index != uint32_t(-1)) { set(const_mbr_id, get_uint_type_id(), index, false); indices.push_back(const_mbr_id); } // Member index is now irrelevant. index = uint32_t(-1); unset_extended_decoration(ops[1], SPIRVCrossDecorationInterfaceMemberIndex); indices.insert(indices.end(), ops + first_non_array_index, ops + length); } // We use the pointer to the base of the input/output array here, // so this is always a pointer chain. string e; if (!ptr_is_chain) { // This is the start of an access chain, use ptr_chain to index into control point array. e = access_chain(ptr, indices.data(), uint32_t(indices.size()), result_ptr_type, &meta, !patch); } else { // If we're accessing a struct, we need to use member indices which are based on the IO block, // not actual struct type, so we have to use a split access chain here where // first path resolves the control point index, i.e. gl_in[index], and second half deals with // looking up flattened member name. // However, it is possible that we partially accessed a struct, // by taking pointer to member inside the control-point array. // For this case, we fall back to a natural access chain since we have already dealt with remapping struct members. // One way to check this here is if we have 2 implied read expressions. // First one is the gl_in/gl_out struct itself, then an index into that array. // If we have traversed further, we use a normal access chain formulation. auto *ptr_expr = maybe_get(ptr); bool split_access_chain_formulation = flatten_composites && ptr_expr && ptr_expr->implied_read_expressions.size() == 2 && !further_access_chain_is_trivial; if (split_access_chain_formulation) { e = join(to_expression(ptr), access_chain_internal(stage_var_id, indices.data(), uint32_t(indices.size()), ACCESS_CHAIN_CHAIN_ONLY_BIT, &meta)); } else { e = access_chain_internal(ptr, indices.data(), uint32_t(indices.size()), 0, &meta); } } // Get the actual type of the object that was accessed. If it's a vector type and we changed it, // then we'll need to add a swizzle. // For this, we can't necessarily rely on the type of the base expression, because it might be // another access chain, and it will therefore already have the "correct" type. auto *expr_type = &get_variable_data_type(*var); if (has_extended_decoration(ops[2], SPIRVCrossDecorationTessIOOriginalInputTypeID)) expr_type = &get(get_extended_decoration(ops[2], SPIRVCrossDecorationTessIOOriginalInputTypeID)); for (uint32_t i = 3; i < length; i++) { if (!is_array(*expr_type) && expr_type->basetype == SPIRType::Struct) expr_type = &get(expr_type->member_types[get(ops[i]).scalar()]); else expr_type = &get(expr_type->parent_type); } if (!is_array(*expr_type) && !is_matrix(*expr_type) && expr_type->basetype != SPIRType::Struct && expr_type->vecsize > result_ptr_type.vecsize) e += vector_swizzle(result_ptr_type.vecsize, 0); auto &expr = set(ops[1], std::move(e), ops[0], should_forward(ops[2])); expr.loaded_from = var->self; expr.need_transpose = meta.need_transpose; expr.access_chain = true; // Mark the result as being packed if necessary. if (meta.storage_is_packed) set_extended_decoration(ops[1], SPIRVCrossDecorationPhysicalTypePacked); if (meta.storage_physical_type != 0) set_extended_decoration(ops[1], SPIRVCrossDecorationPhysicalTypeID, meta.storage_physical_type); if (meta.storage_is_invariant) set_decoration(ops[1], DecorationInvariant); // Save the type we found in case the result is used in another access chain. set_extended_decoration(ops[1], SPIRVCrossDecorationTessIOOriginalInputTypeID, expr_type->self); // If we have some expression dependencies in our access chain, this access chain is technically a forwarded // temporary which could be subject to invalidation. // Need to assume we're forwarded while calling inherit_expression_depdendencies. forwarded_temporaries.insert(ops[1]); // The access chain itself is never forced to a temporary, but its dependencies might. suppressed_usage_tracking.insert(ops[1]); for (uint32_t i = 2; i < length; i++) { inherit_expression_dependencies(ops[1], ops[i]); add_implied_read_expression(expr, ops[i]); } // If we have no dependencies after all, i.e., all indices in the access chain are immutable temporaries, // we're not forwarded after all. if (expr.expression_dependencies.empty()) forwarded_temporaries.erase(ops[1]); return true; } // If this is the inner tessellation level, and we're tessellating triangles, // drop the last index. It isn't an array in this case, so we can't have an // array reference here. We need to make this ID a variable instead of an // expression so we don't try to dereference it as a variable pointer. // Don't do this if the index is a constant 1, though. We need to drop stores // to that one. auto *m = ir.find_meta(var ? var->self : ID(0)); if (is_tesc_shader() && var && m && m->decoration.builtin_type == BuiltInTessLevelInner && is_tessellating_triangles()) { auto *c = maybe_get(ops[3]); if (c && c->scalar() == 1) return false; auto &dest_var = set(ops[1], *var); dest_var.basetype = ops[0]; ir.meta[ops[1]] = ir.meta[ops[2]]; inherit_expression_dependencies(ops[1], ops[2]); return true; } return false; } bool CompilerMSL::is_out_of_bounds_tessellation_level(uint32_t id_lhs) { if (!is_tessellating_triangles()) return false; // In SPIR-V, TessLevelInner always has two elements and TessLevelOuter always has // four. This is true even if we are tessellating triangles. This allows clients // to use a single tessellation control shader with multiple tessellation evaluation // shaders. // In Metal, however, only the first element of TessLevelInner and the first three // of TessLevelOuter are accessible. This stems from how in Metal, the tessellation // levels must be stored to a dedicated buffer in a particular format that depends // on the patch type. Therefore, in Triangles mode, any store to the second // inner level or the fourth outer level must be dropped. const auto *e = maybe_get(id_lhs); if (!e || !e->access_chain) return false; BuiltIn builtin = BuiltIn(get_decoration(e->loaded_from, DecorationBuiltIn)); if (builtin != BuiltInTessLevelInner && builtin != BuiltInTessLevelOuter) return false; auto *c = maybe_get(e->implied_read_expressions[1]); if (!c) return false; return (builtin == BuiltInTessLevelInner && c->scalar() == 1) || (builtin == BuiltInTessLevelOuter && c->scalar() == 3); } bool CompilerMSL::prepare_access_chain_for_scalar_access(std::string &expr, const SPIRType &type, spv::StorageClass storage, bool &is_packed) { // If there is any risk of writes happening with the access chain in question, // and there is a risk of concurrent write access to other components, // we must cast the access chain to a plain pointer to ensure we only access the exact scalars we expect. // The MSL compiler refuses to allow component-level access for any non-packed vector types. if (!is_packed && (storage == StorageClassStorageBuffer || storage == StorageClassWorkgroup)) { const char *addr_space = storage == StorageClassWorkgroup ? "threadgroup" : "device"; expr = join("((", addr_space, " ", type_to_glsl(type), "*)&", enclose_expression(expr), ")"); // Further indexing should happen with packed rules (array index, not swizzle). is_packed = true; return true; } else return false; } bool CompilerMSL::access_chain_needs_stage_io_builtin_translation(uint32_t base) { auto *var = maybe_get_backing_variable(base); if (!var || !is_tessellation_shader()) return true; // We only need to rewrite builtin access chains when accessing flattened builtins like gl_ClipDistance_N. // Avoid overriding it back to just gl_ClipDistance. // This can only happen in scenarios where we cannot flatten/unflatten access chains, so, the only case // where this triggers is evaluation shader inputs. bool redirect_builtin = is_tese_shader() ? var->storage == StorageClassOutput : false; return redirect_builtin; } // Sets the interface member index for an access chain to a pull-model interpolant. void CompilerMSL::fix_up_interpolant_access_chain(const uint32_t *ops, uint32_t length) { auto *var = maybe_get_backing_variable(ops[2]); if (!var || !pull_model_inputs.count(var->self)) return; // Get the base index. uint32_t interface_index; auto &var_type = get_variable_data_type(*var); auto &result_type = get(ops[0]); auto *type = &var_type; if (has_extended_decoration(ops[2], SPIRVCrossDecorationInterfaceMemberIndex)) { interface_index = get_extended_decoration(ops[2], SPIRVCrossDecorationInterfaceMemberIndex); } else { // Assume an access chain into a struct variable. assert(var_type.basetype == SPIRType::Struct); auto &c = get(ops[3 + var_type.array.size()]); interface_index = get_extended_member_decoration(var->self, c.scalar(), SPIRVCrossDecorationInterfaceMemberIndex); } // Accumulate indices. We'll have to skip over the one for the struct, if present, because we already accounted // for that getting the base index. for (uint32_t i = 3; i < length; ++i) { if (is_vector(*type) && !is_array(*type) && is_scalar(result_type)) { // We don't want to combine the next index. Actually, we need to save it // so we know to apply a swizzle to the result of the interpolation. set_extended_decoration(ops[1], SPIRVCrossDecorationInterpolantComponentExpr, ops[i]); break; } auto *c = maybe_get(ops[i]); if (!c || c->specialization) SPIRV_CROSS_THROW("Trying to dynamically index into an array interface variable using pull-model " "interpolation. This is currently unsupported."); if (type->parent_type) type = &get(type->parent_type); else if (type->basetype == SPIRType::Struct) type = &get(type->member_types[c->scalar()]); if (!has_extended_decoration(ops[2], SPIRVCrossDecorationInterfaceMemberIndex) && i - 3 == var_type.array.size()) continue; interface_index += c->scalar(); } // Save this to the access chain itself so we can recover it later when calling an interpolation function. set_extended_decoration(ops[1], SPIRVCrossDecorationInterfaceMemberIndex, interface_index); } // If the physical type of a physical buffer pointer has been changed // to a ulong or ulongn vector, add a cast back to the pointer type. void CompilerMSL::check_physical_type_cast(std::string &expr, const SPIRType *type, uint32_t physical_type) { auto *p_physical_type = maybe_get(physical_type); if (p_physical_type && p_physical_type->storage == StorageClassPhysicalStorageBuffer && p_physical_type->basetype == to_unsigned_basetype(64)) { if (p_physical_type->vecsize > 1) expr += ".x"; expr = join("((", type_to_glsl(*type), ")", expr, ")"); } } // Override for MSL-specific syntax instructions void CompilerMSL::emit_instruction(const Instruction &instruction) { #define MSL_BOP(op) emit_binary_op(ops[0], ops[1], ops[2], ops[3], #op) #define MSL_PTR_BOP(op) emit_binary_ptr_op(ops[0], ops[1], ops[2], ops[3], #op) // MSL does care about implicit integer promotion, but those cases are all handled in common code. #define MSL_BOP_CAST(op, type) \ emit_binary_op_cast(ops[0], ops[1], ops[2], ops[3], #op, type, opcode_is_sign_invariant(opcode), false) #define MSL_UOP(op) emit_unary_op(ops[0], ops[1], ops[2], #op) #define MSL_QFOP(op) emit_quaternary_func_op(ops[0], ops[1], ops[2], ops[3], ops[4], ops[5], #op) #define MSL_TFOP(op) emit_trinary_func_op(ops[0], ops[1], ops[2], ops[3], ops[4], #op) #define MSL_BFOP(op) emit_binary_func_op(ops[0], ops[1], ops[2], ops[3], #op) #define MSL_BFOP_CAST(op, type) \ emit_binary_func_op_cast(ops[0], ops[1], ops[2], ops[3], #op, type, opcode_is_sign_invariant(opcode)) #define MSL_UFOP(op) emit_unary_func_op(ops[0], ops[1], ops[2], #op) #define MSL_UNORD_BOP(op) emit_binary_unord_op(ops[0], ops[1], ops[2], ops[3], #op) auto ops = stream(instruction); auto opcode = static_cast(instruction.op); opcode = get_remapped_spirv_op(opcode); // If we need to do implicit bitcasts, make sure we do it with the correct type. uint32_t integer_width = get_integer_width_for_instruction(instruction); auto int_type = to_signed_basetype(integer_width); auto uint_type = to_unsigned_basetype(integer_width); switch (opcode) { case OpLoad: { uint32_t id = ops[1]; uint32_t ptr = ops[2]; if (is_tessellation_shader()) { if (!emit_tessellation_io_load(ops[0], id, ptr)) CompilerGLSL::emit_instruction(instruction); } else { // Sample mask input for Metal is not an array if (BuiltIn(get_decoration(ptr, DecorationBuiltIn)) == BuiltInSampleMask) set_decoration(id, DecorationBuiltIn, BuiltInSampleMask); CompilerGLSL::emit_instruction(instruction); } break; } // Comparisons case OpIEqual: MSL_BOP_CAST(==, int_type); break; case OpLogicalEqual: case OpFOrdEqual: MSL_BOP(==); break; case OpINotEqual: MSL_BOP_CAST(!=, int_type); break; case OpLogicalNotEqual: case OpFOrdNotEqual: // TODO: Should probably negate the == result here. // Typically OrdNotEqual comes from GLSL which itself does not really specify what // happens with NaN. // Consider fixing this if we run into real issues. MSL_BOP(!=); break; case OpUGreaterThan: MSL_BOP_CAST(>, uint_type); break; case OpSGreaterThan: MSL_BOP_CAST(>, int_type); break; case OpFOrdGreaterThan: MSL_BOP(>); break; case OpUGreaterThanEqual: MSL_BOP_CAST(>=, uint_type); break; case OpSGreaterThanEqual: MSL_BOP_CAST(>=, int_type); break; case OpFOrdGreaterThanEqual: MSL_BOP(>=); break; case OpULessThan: MSL_BOP_CAST(<, uint_type); break; case OpSLessThan: MSL_BOP_CAST(<, int_type); break; case OpFOrdLessThan: MSL_BOP(<); break; case OpULessThanEqual: MSL_BOP_CAST(<=, uint_type); break; case OpSLessThanEqual: MSL_BOP_CAST(<=, int_type); break; case OpFOrdLessThanEqual: MSL_BOP(<=); break; case OpFUnordEqual: MSL_UNORD_BOP(==); break; case OpFUnordNotEqual: // not equal in MSL generates une opcodes to begin with. // Since unordered not equal is how it works in C, just inherit that behavior. MSL_BOP(!=); break; case OpFUnordGreaterThan: MSL_UNORD_BOP(>); break; case OpFUnordGreaterThanEqual: MSL_UNORD_BOP(>=); break; case OpFUnordLessThan: MSL_UNORD_BOP(<); break; case OpFUnordLessThanEqual: MSL_UNORD_BOP(<=); break; // Pointer math case OpPtrEqual: MSL_PTR_BOP(==); break; case OpPtrNotEqual: MSL_PTR_BOP(!=); break; case OpPtrDiff: MSL_PTR_BOP(-); break; // Derivatives case OpDPdx: case OpDPdxFine: case OpDPdxCoarse: MSL_UFOP(dfdx); register_control_dependent_expression(ops[1]); break; case OpDPdy: case OpDPdyFine: case OpDPdyCoarse: MSL_UFOP(dfdy); register_control_dependent_expression(ops[1]); break; case OpFwidth: case OpFwidthCoarse: case OpFwidthFine: MSL_UFOP(fwidth); register_control_dependent_expression(ops[1]); break; // Bitfield case OpBitFieldInsert: { emit_bitfield_insert_op(ops[0], ops[1], ops[2], ops[3], ops[4], ops[5], "insert_bits", SPIRType::UInt); break; } case OpBitFieldSExtract: { emit_trinary_func_op_bitextract(ops[0], ops[1], ops[2], ops[3], ops[4], "extract_bits", int_type, int_type, SPIRType::UInt, SPIRType::UInt); break; } case OpBitFieldUExtract: { emit_trinary_func_op_bitextract(ops[0], ops[1], ops[2], ops[3], ops[4], "extract_bits", uint_type, uint_type, SPIRType::UInt, SPIRType::UInt); break; } case OpBitReverse: // BitReverse does not have issues with sign since result type must match input type. MSL_UFOP(reverse_bits); break; case OpBitCount: { auto basetype = expression_type(ops[2]).basetype; emit_unary_func_op_cast(ops[0], ops[1], ops[2], "popcount", basetype, basetype); break; } case OpFRem: MSL_BFOP(fmod); break; case OpFMul: if (msl_options.invariant_float_math || has_decoration(ops[1], DecorationNoContraction)) MSL_BFOP(spvFMul); else MSL_BOP(*); break; case OpFAdd: if (msl_options.invariant_float_math || has_decoration(ops[1], DecorationNoContraction)) MSL_BFOP(spvFAdd); else MSL_BOP(+); break; case OpFSub: if (msl_options.invariant_float_math || has_decoration(ops[1], DecorationNoContraction)) MSL_BFOP(spvFSub); else MSL_BOP(-); break; // Atomics case OpAtomicExchange: { uint32_t result_type = ops[0]; uint32_t id = ops[1]; uint32_t ptr = ops[2]; uint32_t mem_sem = ops[4]; uint32_t val = ops[5]; emit_atomic_func_op(result_type, id, "atomic_exchange", opcode, mem_sem, mem_sem, false, ptr, val); break; } case OpAtomicCompareExchange: { uint32_t result_type = ops[0]; uint32_t id = ops[1]; uint32_t ptr = ops[2]; uint32_t mem_sem_pass = ops[4]; uint32_t mem_sem_fail = ops[5]; uint32_t val = ops[6]; uint32_t comp = ops[7]; emit_atomic_func_op(result_type, id, "atomic_compare_exchange_weak", opcode, mem_sem_pass, mem_sem_fail, true, ptr, comp, true, false, val); break; } case OpAtomicCompareExchangeWeak: SPIRV_CROSS_THROW("OpAtomicCompareExchangeWeak is only supported in kernel profile."); case OpAtomicLoad: { uint32_t result_type = ops[0]; uint32_t id = ops[1]; uint32_t ptr = ops[2]; uint32_t mem_sem = ops[4]; check_atomic_image(ptr); emit_atomic_func_op(result_type, id, "atomic_load", opcode, mem_sem, mem_sem, false, ptr, 0); break; } case OpAtomicStore: { uint32_t result_type = expression_type(ops[0]).self; uint32_t id = ops[0]; uint32_t ptr = ops[0]; uint32_t mem_sem = ops[2]; uint32_t val = ops[3]; check_atomic_image(ptr); emit_atomic_func_op(result_type, id, "atomic_store", opcode, mem_sem, mem_sem, false, ptr, val); break; } #define MSL_AFMO_IMPL(op, valsrc, valconst) \ do \ { \ uint32_t result_type = ops[0]; \ uint32_t id = ops[1]; \ uint32_t ptr = ops[2]; \ uint32_t mem_sem = ops[4]; \ uint32_t val = valsrc; \ emit_atomic_func_op(result_type, id, "atomic_fetch_" #op, opcode, \ mem_sem, mem_sem, false, ptr, val, \ false, valconst); \ } while (false) #define MSL_AFMO(op) MSL_AFMO_IMPL(op, ops[5], false) #define MSL_AFMIO(op) MSL_AFMO_IMPL(op, 1, true) case OpAtomicIIncrement: MSL_AFMIO(add); break; case OpAtomicIDecrement: MSL_AFMIO(sub); break; case OpAtomicIAdd: case OpAtomicFAddEXT: MSL_AFMO(add); break; case OpAtomicISub: MSL_AFMO(sub); break; case OpAtomicSMin: case OpAtomicUMin: MSL_AFMO(min); break; case OpAtomicSMax: case OpAtomicUMax: MSL_AFMO(max); break; case OpAtomicAnd: MSL_AFMO(and); break; case OpAtomicOr: MSL_AFMO(or); break; case OpAtomicXor: MSL_AFMO(xor); break; // Images // Reads == Fetches in Metal case OpImageRead: { // Mark that this shader reads from this image uint32_t img_id = ops[2]; auto &type = expression_type(img_id); auto *p_var = maybe_get_backing_variable(img_id); if (type.image.dim != DimSubpassData) { if (p_var && has_decoration(p_var->self, DecorationNonReadable)) { unset_decoration(p_var->self, DecorationNonReadable); force_recompile(); } } // Metal requires explicit fences to break up RAW hazards, even within the same shader invocation if (msl_options.readwrite_texture_fences && p_var && !has_decoration(p_var->self, DecorationNonWritable)) statement(to_expression(img_id), ".fence();"); emit_texture_op(instruction, false); break; } // Emulate texture2D atomic operations case OpImageTexelPointer: { // When using the pointer, we need to know which variable it is actually loaded from. auto *var = maybe_get_backing_variable(ops[2]); if (var && atomic_image_vars_emulated.count(var->self)) { uint32_t result_type = ops[0]; uint32_t id = ops[1]; std::string coord = to_expression(ops[3]); auto &type = expression_type(ops[2]); if (type.image.dim == Dim2D) { coord = join("spvImage2DAtomicCoord(", coord, ", ", to_expression(ops[2]), ")"); } auto &e = set(id, join(to_expression(ops[2]), "_atomic[", coord, "]"), result_type, true); e.loaded_from = var ? var->self : ID(0); inherit_expression_dependencies(id, ops[3]); } else { uint32_t result_type = ops[0]; uint32_t id = ops[1]; // Virtual expression. Split this up in the actual image atomic. // In GLSL and HLSL we are able to resolve the dereference inline, but MSL has // image.op(coord, ...) syntax. auto &e = set(id, join(to_expression(ops[2]), "@", bitcast_expression(SPIRType::UInt, ops[3])), result_type, true); // When using the pointer, we need to know which variable it is actually loaded from. e.loaded_from = var ? var->self : ID(0); inherit_expression_dependencies(id, ops[3]); } break; } case OpImageWrite: { uint32_t img_id = ops[0]; uint32_t coord_id = ops[1]; uint32_t texel_id = ops[2]; const uint32_t *opt = &ops[3]; uint32_t length = instruction.length - 3; // Bypass pointers because we need the real image struct auto &type = expression_type(img_id); auto &img_type = get(type.self); // Ensure this image has been marked as being written to and force a // recommpile so that the image type output will include write access auto *p_var = maybe_get_backing_variable(img_id); if (p_var && has_decoration(p_var->self, DecorationNonWritable)) { unset_decoration(p_var->self, DecorationNonWritable); force_recompile(); } bool forward = false; uint32_t bias = 0; uint32_t lod = 0; uint32_t flags = 0; if (length) { flags = *opt++; length--; } auto test = [&](uint32_t &v, uint32_t flag) { if (length && (flags & flag)) { v = *opt++; length--; } }; test(bias, ImageOperandsBiasMask); test(lod, ImageOperandsLodMask); auto &texel_type = expression_type(texel_id); auto store_type = texel_type; store_type.vecsize = 4; TextureFunctionArguments args = {}; args.base.img = img_id; args.base.imgtype = &img_type; args.base.is_fetch = true; args.coord = coord_id; args.lod = lod; string expr; if (needs_frag_discard_checks()) expr = join("(", builtin_to_glsl(BuiltInHelperInvocation, StorageClassInput), " ? ((void)0) : "); expr += join(to_expression(img_id), ".write(", remap_swizzle(store_type, texel_type.vecsize, to_expression(texel_id)), ", ", CompilerMSL::to_function_args(args, &forward), ")"); if (needs_frag_discard_checks()) expr += ")"; statement(expr, ";"); if (p_var && variable_storage_is_aliased(*p_var)) flush_all_aliased_variables(); break; } case OpImageQuerySize: case OpImageQuerySizeLod: { uint32_t rslt_type_id = ops[0]; auto &rslt_type = get(rslt_type_id); uint32_t id = ops[1]; uint32_t img_id = ops[2]; string img_exp = to_expression(img_id); auto &img_type = expression_type(img_id); Dim img_dim = img_type.image.dim; bool img_is_array = img_type.image.arrayed; if (img_type.basetype != SPIRType::Image) SPIRV_CROSS_THROW("Invalid type for OpImageQuerySize."); string lod; if (opcode == OpImageQuerySizeLod) { // LOD index defaults to zero, so don't bother outputing level zero index string decl_lod = to_expression(ops[3]); if (decl_lod != "0") lod = decl_lod; } string expr = type_to_glsl(rslt_type) + "("; expr += img_exp + ".get_width(" + lod + ")"; if (img_dim == Dim2D || img_dim == DimCube || img_dim == Dim3D) expr += ", " + img_exp + ".get_height(" + lod + ")"; if (img_dim == Dim3D) expr += ", " + img_exp + ".get_depth(" + lod + ")"; if (img_is_array) { expr += ", " + img_exp + ".get_array_size()"; if (img_dim == DimCube && msl_options.emulate_cube_array) expr += " / 6"; } expr += ")"; emit_op(rslt_type_id, id, expr, should_forward(img_id)); break; } case OpImageQueryLod: { if (!msl_options.supports_msl_version(2, 2)) SPIRV_CROSS_THROW("ImageQueryLod is only supported on MSL 2.2 and up."); uint32_t result_type = ops[0]; uint32_t id = ops[1]; uint32_t image_id = ops[2]; uint32_t coord_id = ops[3]; emit_uninitialized_temporary_expression(result_type, id); auto sampler_expr = to_sampler_expression(image_id); auto *combined = maybe_get(image_id); auto image_expr = combined ? to_expression(combined->image) : to_expression(image_id); // TODO: It is unclear if calculcate_clamped_lod also conditionally rounds // the reported LOD based on the sampler. NEAREST miplevel should // round the LOD, but LINEAR miplevel should not round. // Let's hope this does not become an issue ... statement(to_expression(id), ".x = ", image_expr, ".calculate_clamped_lod(", sampler_expr, ", ", to_expression(coord_id), ");"); statement(to_expression(id), ".y = ", image_expr, ".calculate_unclamped_lod(", sampler_expr, ", ", to_expression(coord_id), ");"); register_control_dependent_expression(id); break; } #define MSL_ImgQry(qrytype) \ do \ { \ uint32_t rslt_type_id = ops[0]; \ auto &rslt_type = get(rslt_type_id); \ uint32_t id = ops[1]; \ uint32_t img_id = ops[2]; \ string img_exp = to_expression(img_id); \ string expr = type_to_glsl(rslt_type) + "(" + img_exp + ".get_num_" #qrytype "())"; \ emit_op(rslt_type_id, id, expr, should_forward(img_id)); \ } while (false) case OpImageQueryLevels: MSL_ImgQry(mip_levels); break; case OpImageQuerySamples: MSL_ImgQry(samples); break; case OpImage: { uint32_t result_type = ops[0]; uint32_t id = ops[1]; auto *combined = maybe_get(ops[2]); if (combined) { auto &e = emit_op(result_type, id, to_expression(combined->image), true, true); auto *var = maybe_get_backing_variable(combined->image); if (var) e.loaded_from = var->self; } else { auto *var = maybe_get_backing_variable(ops[2]); SPIRExpression *e; if (var && has_extended_decoration(var->self, SPIRVCrossDecorationDynamicImageSampler)) e = &emit_op(result_type, id, join(to_expression(ops[2]), ".plane0"), true, true); else e = &emit_op(result_type, id, to_expression(ops[2]), true, true); if (var) e->loaded_from = var->self; } break; } // Casting case OpQuantizeToF16: { uint32_t result_type = ops[0]; uint32_t id = ops[1]; uint32_t arg = ops[2]; string exp = join("spvQuantizeToF16(", to_expression(arg), ")"); emit_op(result_type, id, exp, should_forward(arg)); break; } case OpInBoundsAccessChain: case OpAccessChain: case OpPtrAccessChain: if (is_tessellation_shader()) { if (!emit_tessellation_access_chain(ops, instruction.length)) CompilerGLSL::emit_instruction(instruction); } else CompilerGLSL::emit_instruction(instruction); fix_up_interpolant_access_chain(ops, instruction.length); break; case OpStore: { const auto &type = expression_type(ops[0]); if (is_out_of_bounds_tessellation_level(ops[0])) break; if (needs_frag_discard_checks() && (type.storage == StorageClassStorageBuffer || type.storage == StorageClassUniform)) { // If we're in a continue block, this kludge will make the block too complex // to emit normally. assert(current_emitting_block); auto cont_type = continue_block_type(*current_emitting_block); if (cont_type != SPIRBlock::ContinueNone && cont_type != SPIRBlock::ComplexLoop) { current_emitting_block->complex_continue = true; force_recompile(); } statement("if (!", builtin_to_glsl(BuiltInHelperInvocation, StorageClassInput), ")"); begin_scope(); } if (!maybe_emit_array_assignment(ops[0], ops[1])) CompilerGLSL::emit_instruction(instruction); if (needs_frag_discard_checks() && (type.storage == StorageClassStorageBuffer || type.storage == StorageClassUniform)) end_scope(); break; } // Compute barriers case OpMemoryBarrier: emit_barrier(0, ops[0], ops[1]); break; case OpControlBarrier: // In GLSL a memory barrier is often followed by a control barrier. // But in MSL, memory barriers are also control barriers, so don't // emit a simple control barrier if a memory barrier has just been emitted. if (previous_instruction_opcode != OpMemoryBarrier) emit_barrier(ops[0], ops[1], ops[2]); break; case OpOuterProduct: { uint32_t result_type = ops[0]; uint32_t id = ops[1]; uint32_t a = ops[2]; uint32_t b = ops[3]; auto &type = get(result_type); string expr = type_to_glsl_constructor(type); expr += "("; for (uint32_t col = 0; col < type.columns; col++) { expr += to_enclosed_unpacked_expression(a); expr += " * "; expr += to_extract_component_expression(b, col); if (col + 1 < type.columns) expr += ", "; } expr += ")"; emit_op(result_type, id, expr, should_forward(a) && should_forward(b)); inherit_expression_dependencies(id, a); inherit_expression_dependencies(id, b); break; } case OpVectorTimesMatrix: case OpMatrixTimesVector: { if (!msl_options.invariant_float_math && !has_decoration(ops[1], DecorationNoContraction)) { CompilerGLSL::emit_instruction(instruction); break; } // If the matrix needs transpose, just flip the multiply order. auto *e = maybe_get(ops[opcode == OpMatrixTimesVector ? 2 : 3]); if (e && e->need_transpose) { e->need_transpose = false; string expr; if (opcode == OpMatrixTimesVector) { expr = join("spvFMulVectorMatrix(", to_enclosed_unpacked_expression(ops[3]), ", ", to_unpacked_row_major_matrix_expression(ops[2]), ")"); } else { expr = join("spvFMulMatrixVector(", to_unpacked_row_major_matrix_expression(ops[3]), ", ", to_enclosed_unpacked_expression(ops[2]), ")"); } bool forward = should_forward(ops[2]) && should_forward(ops[3]); emit_op(ops[0], ops[1], expr, forward); e->need_transpose = true; inherit_expression_dependencies(ops[1], ops[2]); inherit_expression_dependencies(ops[1], ops[3]); } else { if (opcode == OpMatrixTimesVector) MSL_BFOP(spvFMulMatrixVector); else MSL_BFOP(spvFMulVectorMatrix); } break; } case OpMatrixTimesMatrix: { if (!msl_options.invariant_float_math && !has_decoration(ops[1], DecorationNoContraction)) { CompilerGLSL::emit_instruction(instruction); break; } auto *a = maybe_get(ops[2]); auto *b = maybe_get(ops[3]); // If both matrices need transpose, we can multiply in flipped order and tag the expression as transposed. // a^T * b^T = (b * a)^T. if (a && b && a->need_transpose && b->need_transpose) { a->need_transpose = false; b->need_transpose = false; auto expr = join("spvFMulMatrixMatrix(", enclose_expression(to_unpacked_row_major_matrix_expression(ops[3])), ", ", enclose_expression(to_unpacked_row_major_matrix_expression(ops[2])), ")"); bool forward = should_forward(ops[2]) && should_forward(ops[3]); auto &e = emit_op(ops[0], ops[1], expr, forward); e.need_transpose = true; a->need_transpose = true; b->need_transpose = true; inherit_expression_dependencies(ops[1], ops[2]); inherit_expression_dependencies(ops[1], ops[3]); } else MSL_BFOP(spvFMulMatrixMatrix); break; } case OpIAddCarry: case OpISubBorrow: { uint32_t result_type = ops[0]; uint32_t result_id = ops[1]; uint32_t op0 = ops[2]; uint32_t op1 = ops[3]; auto &type = get(result_type); emit_uninitialized_temporary_expression(result_type, result_id); auto &res_type = get(type.member_types[1]); if (opcode == OpIAddCarry) { statement(to_expression(result_id), ".", to_member_name(type, 0), " = ", to_enclosed_unpacked_expression(op0), " + ", to_enclosed_unpacked_expression(op1), ";"); statement(to_expression(result_id), ".", to_member_name(type, 1), " = select(", type_to_glsl(res_type), "(1), ", type_to_glsl(res_type), "(0), ", to_unpacked_expression(result_id), ".", to_member_name(type, 0), " >= max(", to_unpacked_expression(op0), ", ", to_unpacked_expression(op1), "));"); } else { statement(to_expression(result_id), ".", to_member_name(type, 0), " = ", to_enclosed_unpacked_expression(op0), " - ", to_enclosed_unpacked_expression(op1), ";"); statement(to_expression(result_id), ".", to_member_name(type, 1), " = select(", type_to_glsl(res_type), "(1), ", type_to_glsl(res_type), "(0), ", to_enclosed_unpacked_expression(op0), " >= ", to_enclosed_unpacked_expression(op1), ");"); } break; } case OpUMulExtended: case OpSMulExtended: { uint32_t result_type = ops[0]; uint32_t result_id = ops[1]; uint32_t op0 = ops[2]; uint32_t op1 = ops[3]; auto &type = get(result_type); auto input_type = opcode == OpSMulExtended ? int_type : uint_type; auto &output_type = get_type(result_type); string cast_op0, cast_op1; auto expected_type = binary_op_bitcast_helper(cast_op0, cast_op1, input_type, op0, op1, false); emit_uninitialized_temporary_expression(result_type, result_id); string mullo_expr, mulhi_expr; mullo_expr = join(cast_op0, " * ", cast_op1); mulhi_expr = join("mulhi(", cast_op0, ", ", cast_op1, ")"); auto &low_type = get_type(output_type.member_types[0]); auto &high_type = get_type(output_type.member_types[1]); if (low_type.basetype != input_type) { expected_type.basetype = input_type; mullo_expr = join(bitcast_glsl_op(low_type, expected_type), "(", mullo_expr, ")"); } if (high_type.basetype != input_type) { expected_type.basetype = input_type; mulhi_expr = join(bitcast_glsl_op(high_type, expected_type), "(", mulhi_expr, ")"); } statement(to_expression(result_id), ".", to_member_name(type, 0), " = ", mullo_expr, ";"); statement(to_expression(result_id), ".", to_member_name(type, 1), " = ", mulhi_expr, ";"); break; } case OpArrayLength: { auto &type = expression_type(ops[2]); uint32_t offset = type_struct_member_offset(type, ops[3]); uint32_t stride = type_struct_member_array_stride(type, ops[3]); auto expr = join("(", to_buffer_size_expression(ops[2]), " - ", offset, ") / ", stride); emit_op(ops[0], ops[1], expr, true); break; } // Legacy sub-group stuff ... case OpSubgroupBallotKHR: case OpSubgroupFirstInvocationKHR: case OpSubgroupReadInvocationKHR: case OpSubgroupAllKHR: case OpSubgroupAnyKHR: case OpSubgroupAllEqualKHR: emit_subgroup_op(instruction); break; // SPV_INTEL_shader_integer_functions2 case OpUCountLeadingZerosINTEL: MSL_UFOP(clz); break; case OpUCountTrailingZerosINTEL: MSL_UFOP(ctz); break; case OpAbsISubINTEL: case OpAbsUSubINTEL: MSL_BFOP(absdiff); break; case OpIAddSatINTEL: case OpUAddSatINTEL: MSL_BFOP(addsat); break; case OpIAverageINTEL: case OpUAverageINTEL: MSL_BFOP(hadd); break; case OpIAverageRoundedINTEL: case OpUAverageRoundedINTEL: MSL_BFOP(rhadd); break; case OpISubSatINTEL: case OpUSubSatINTEL: MSL_BFOP(subsat); break; case OpIMul32x16INTEL: { uint32_t result_type = ops[0]; uint32_t id = ops[1]; uint32_t a = ops[2], b = ops[3]; bool forward = should_forward(a) && should_forward(b); emit_op(result_type, id, join("int(short(", to_unpacked_expression(a), ")) * int(short(", to_unpacked_expression(b), "))"), forward); inherit_expression_dependencies(id, a); inherit_expression_dependencies(id, b); break; } case OpUMul32x16INTEL: { uint32_t result_type = ops[0]; uint32_t id = ops[1]; uint32_t a = ops[2], b = ops[3]; bool forward = should_forward(a) && should_forward(b); emit_op(result_type, id, join("uint(ushort(", to_unpacked_expression(a), ")) * uint(ushort(", to_unpacked_expression(b), "))"), forward); inherit_expression_dependencies(id, a); inherit_expression_dependencies(id, b); break; } // SPV_EXT_demote_to_helper_invocation case OpDemoteToHelperInvocationEXT: if (!msl_options.supports_msl_version(2, 3)) SPIRV_CROSS_THROW("discard_fragment() does not formally have demote semantics until MSL 2.3."); CompilerGLSL::emit_instruction(instruction); break; case OpIsHelperInvocationEXT: if (msl_options.is_ios() && !msl_options.supports_msl_version(2, 3)) SPIRV_CROSS_THROW("simd_is_helper_thread() requires MSL 2.3 on iOS."); else if (msl_options.is_macos() && !msl_options.supports_msl_version(2, 1)) SPIRV_CROSS_THROW("simd_is_helper_thread() requires MSL 2.1 on macOS."); emit_op(ops[0], ops[1], needs_manual_helper_invocation_updates() ? builtin_to_glsl(BuiltInHelperInvocation, StorageClassInput) : "simd_is_helper_thread()", false); break; case OpBeginInvocationInterlockEXT: case OpEndInvocationInterlockEXT: if (!msl_options.supports_msl_version(2, 0)) SPIRV_CROSS_THROW("Raster order groups require MSL 2.0."); break; // Nothing to do in the body case OpConvertUToAccelerationStructureKHR: SPIRV_CROSS_THROW("ConvertUToAccelerationStructure is not supported in MSL."); case OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR: SPIRV_CROSS_THROW("BindingTableRecordOffset is not supported in MSL."); case OpRayQueryInitializeKHR: { flush_variable_declaration(ops[0]); register_write(ops[0]); add_spv_func_and_recompile(SPVFuncImplRayQueryIntersectionParams); statement(to_expression(ops[0]), ".reset(", "ray(", to_expression(ops[4]), ", ", to_expression(ops[6]), ", ", to_expression(ops[5]), ", ", to_expression(ops[7]), "), ", to_expression(ops[1]), ", ", to_expression(ops[3]), ", spvMakeIntersectionParams(", to_expression(ops[2]), "));"); break; } case OpRayQueryProceedKHR: { flush_variable_declaration(ops[0]); register_write(ops[2]); emit_op(ops[0], ops[1], join(to_expression(ops[2]), ".next()"), false); break; } #define MSL_RAY_QUERY_IS_CANDIDATE get(ops[3]).scalar_i32() == 0 #define MSL_RAY_QUERY_GET_OP(op, msl_op) \ case OpRayQueryGet##op##KHR: \ flush_variable_declaration(ops[2]); \ emit_op(ops[0], ops[1], join(to_expression(ops[2]), ".get_" #msl_op "()"), false); \ break #define MSL_RAY_QUERY_OP_INNER2(op, msl_prefix, msl_op) \ case OpRayQueryGet##op##KHR: \ flush_variable_declaration(ops[2]); \ if (MSL_RAY_QUERY_IS_CANDIDATE) \ emit_op(ops[0], ops[1], join(to_expression(ops[2]), #msl_prefix "_candidate_" #msl_op "()"), false); \ else \ emit_op(ops[0], ops[1], join(to_expression(ops[2]), #msl_prefix "_committed_" #msl_op "()"), false); \ break #define MSL_RAY_QUERY_GET_OP2(op, msl_op) MSL_RAY_QUERY_OP_INNER2(op, .get, msl_op) #define MSL_RAY_QUERY_IS_OP2(op, msl_op) MSL_RAY_QUERY_OP_INNER2(op, .is, msl_op) MSL_RAY_QUERY_GET_OP(RayTMin, ray_min_distance); MSL_RAY_QUERY_GET_OP(WorldRayOrigin, world_space_ray_origin); MSL_RAY_QUERY_GET_OP(WorldRayDirection, world_space_ray_direction); MSL_RAY_QUERY_GET_OP2(IntersectionInstanceId, instance_id); MSL_RAY_QUERY_GET_OP2(IntersectionInstanceCustomIndex, user_instance_id); MSL_RAY_QUERY_GET_OP2(IntersectionBarycentrics, triangle_barycentric_coord); MSL_RAY_QUERY_GET_OP2(IntersectionPrimitiveIndex, primitive_id); MSL_RAY_QUERY_GET_OP2(IntersectionGeometryIndex, geometry_id); MSL_RAY_QUERY_GET_OP2(IntersectionObjectRayOrigin, ray_origin); MSL_RAY_QUERY_GET_OP2(IntersectionObjectRayDirection, ray_direction); MSL_RAY_QUERY_GET_OP2(IntersectionObjectToWorld, object_to_world_transform); MSL_RAY_QUERY_GET_OP2(IntersectionWorldToObject, world_to_object_transform); MSL_RAY_QUERY_IS_OP2(IntersectionFrontFace, triangle_front_facing); case OpRayQueryGetIntersectionTypeKHR: flush_variable_declaration(ops[2]); if (MSL_RAY_QUERY_IS_CANDIDATE) emit_op(ops[0], ops[1], join("uint(", to_expression(ops[2]), ".get_candidate_intersection_type()) - 1"), false); else emit_op(ops[0], ops[1], join("uint(", to_expression(ops[2]), ".get_committed_intersection_type())"), false); break; case OpRayQueryGetIntersectionTKHR: flush_variable_declaration(ops[2]); if (MSL_RAY_QUERY_IS_CANDIDATE) emit_op(ops[0], ops[1], join(to_expression(ops[2]), ".get_candidate_triangle_distance()"), false); else emit_op(ops[0], ops[1], join(to_expression(ops[2]), ".get_committed_distance()"), false); break; case OpRayQueryGetIntersectionCandidateAABBOpaqueKHR: { flush_variable_declaration(ops[0]); emit_op(ops[0], ops[1], join(to_expression(ops[2]), ".is_candidate_non_opaque_bounding_box()"), false); break; } case OpRayQueryConfirmIntersectionKHR: flush_variable_declaration(ops[0]); register_write(ops[0]); statement(to_expression(ops[0]), ".commit_triangle_intersection();"); break; case OpRayQueryGenerateIntersectionKHR: flush_variable_declaration(ops[0]); register_write(ops[0]); statement(to_expression(ops[0]), ".commit_bounding_box_intersection(", to_expression(ops[1]), ");"); break; case OpRayQueryTerminateKHR: flush_variable_declaration(ops[0]); register_write(ops[0]); statement(to_expression(ops[0]), ".abort();"); break; #undef MSL_RAY_QUERY_GET_OP #undef MSL_RAY_QUERY_IS_CANDIDATE #undef MSL_RAY_QUERY_IS_OP2 #undef MSL_RAY_QUERY_GET_OP2 #undef MSL_RAY_QUERY_OP_INNER2 case OpConvertPtrToU: case OpConvertUToPtr: case OpBitcast: { auto &type = get(ops[0]); auto &input_type = expression_type(ops[2]); if (opcode != OpBitcast || type.pointer || input_type.pointer) { string op; if (type.vecsize == 1 && input_type.vecsize == 1) op = join("reinterpret_cast<", type_to_glsl(type), ">(", to_unpacked_expression(ops[2]), ")"); else if (input_type.vecsize == 2) op = join("reinterpret_cast<", type_to_glsl(type), ">(as_type(", to_unpacked_expression(ops[2]), "))"); else op = join("as_type<", type_to_glsl(type), ">(reinterpret_cast(", to_unpacked_expression(ops[2]), "))"); emit_op(ops[0], ops[1], op, should_forward(ops[2])); inherit_expression_dependencies(ops[1], ops[2]); } else CompilerGLSL::emit_instruction(instruction); break; } default: CompilerGLSL::emit_instruction(instruction); break; } previous_instruction_opcode = opcode; } void CompilerMSL::emit_texture_op(const Instruction &i, bool sparse) { if (sparse) SPIRV_CROSS_THROW("Sparse feedback not yet supported in MSL."); if (msl_options.use_framebuffer_fetch_subpasses) { auto *ops = stream(i); uint32_t result_type_id = ops[0]; uint32_t id = ops[1]; uint32_t img = ops[2]; auto &type = expression_type(img); auto &imgtype = get(type.self); // Use Metal's native frame-buffer fetch API for subpass inputs. if (imgtype.image.dim == DimSubpassData) { // Subpass inputs cannot be invalidated, // so just forward the expression directly. string expr = to_expression(img); emit_op(result_type_id, id, expr, true); return; } } // Fallback to default implementation CompilerGLSL::emit_texture_op(i, sparse); } void CompilerMSL::emit_barrier(uint32_t id_exe_scope, uint32_t id_mem_scope, uint32_t id_mem_sem) { if (get_execution_model() != ExecutionModelGLCompute && !is_tesc_shader()) return; uint32_t exe_scope = id_exe_scope ? evaluate_constant_u32(id_exe_scope) : uint32_t(ScopeInvocation); uint32_t mem_scope = id_mem_scope ? evaluate_constant_u32(id_mem_scope) : uint32_t(ScopeInvocation); // Use the wider of the two scopes (smaller value) exe_scope = min(exe_scope, mem_scope); if (msl_options.emulate_subgroups && exe_scope >= ScopeSubgroup && !id_mem_sem) // In this case, we assume a "subgroup" size of 1. The barrier, then, is a noop. return; string bar_stmt; if ((msl_options.is_ios() && msl_options.supports_msl_version(1, 2)) || msl_options.supports_msl_version(2)) bar_stmt = exe_scope < ScopeSubgroup ? "threadgroup_barrier" : "simdgroup_barrier"; else bar_stmt = "threadgroup_barrier"; bar_stmt += "("; uint32_t mem_sem = id_mem_sem ? evaluate_constant_u32(id_mem_sem) : uint32_t(MemorySemanticsMaskNone); // Use the | operator to combine flags if we can. if (msl_options.supports_msl_version(1, 2)) { string mem_flags = ""; // For tesc shaders, this also affects objects in the Output storage class. // Since in Metal, these are placed in a device buffer, we have to sync device memory here. if (is_tesc_shader() || (mem_sem & (MemorySemanticsUniformMemoryMask | MemorySemanticsCrossWorkgroupMemoryMask))) mem_flags += "mem_flags::mem_device"; // Fix tessellation patch function processing if (is_tesc_shader() || (mem_sem & (MemorySemanticsSubgroupMemoryMask | MemorySemanticsWorkgroupMemoryMask))) { if (!mem_flags.empty()) mem_flags += " | "; mem_flags += "mem_flags::mem_threadgroup"; } if (mem_sem & MemorySemanticsImageMemoryMask) { if (!mem_flags.empty()) mem_flags += " | "; mem_flags += "mem_flags::mem_texture"; } if (mem_flags.empty()) mem_flags = "mem_flags::mem_none"; bar_stmt += mem_flags; } else { if ((mem_sem & (MemorySemanticsUniformMemoryMask | MemorySemanticsCrossWorkgroupMemoryMask)) && (mem_sem & (MemorySemanticsSubgroupMemoryMask | MemorySemanticsWorkgroupMemoryMask))) bar_stmt += "mem_flags::mem_device_and_threadgroup"; else if (mem_sem & (MemorySemanticsUniformMemoryMask | MemorySemanticsCrossWorkgroupMemoryMask)) bar_stmt += "mem_flags::mem_device"; else if (mem_sem & (MemorySemanticsSubgroupMemoryMask | MemorySemanticsWorkgroupMemoryMask)) bar_stmt += "mem_flags::mem_threadgroup"; else if (mem_sem & MemorySemanticsImageMemoryMask) bar_stmt += "mem_flags::mem_texture"; else bar_stmt += "mem_flags::mem_none"; } bar_stmt += ");"; statement(bar_stmt); assert(current_emitting_block); flush_control_dependent_expressions(current_emitting_block->self); flush_all_active_variables(); } static bool storage_class_array_is_thread(StorageClass storage) { switch (storage) { case StorageClassInput: case StorageClassOutput: case StorageClassGeneric: case StorageClassFunction: case StorageClassPrivate: return true; default: return false; } } bool CompilerMSL::emit_array_copy(const char *expr, uint32_t lhs_id, uint32_t rhs_id, StorageClass lhs_storage, StorageClass rhs_storage) { // Allow Metal to use the array template to make arrays a value type. // This, however, cannot be used for threadgroup address specifiers, so consider the custom array copy as fallback. bool lhs_is_thread_storage = storage_class_array_is_thread(lhs_storage); bool rhs_is_thread_storage = storage_class_array_is_thread(rhs_storage); bool lhs_is_array_template = lhs_is_thread_storage || lhs_storage == StorageClassWorkgroup; bool rhs_is_array_template = rhs_is_thread_storage || rhs_storage == StorageClassWorkgroup; // Special considerations for stage IO variables. // If the variable is actually backed by non-user visible device storage, we use array templates for those. // // Another special consideration is given to thread local variables which happen to have Offset decorations // applied to them. Block-like types do not use array templates, so we need to force POD path if we detect // these scenarios. This check isn't perfect since it would be technically possible to mix and match these things, // and for a fully correct solution we might have to track array template state through access chains as well, // but for all reasonable use cases, this should suffice. // This special case should also only apply to Function/Private storage classes. // We should not check backing variable for temporaries. auto *lhs_var = maybe_get_backing_variable(lhs_id); if (lhs_var && lhs_storage == StorageClassStorageBuffer && storage_class_array_is_thread(lhs_var->storage)) lhs_is_array_template = true; else if (lhs_var && lhs_storage != StorageClassGeneric && type_is_block_like(get(lhs_var->basetype))) lhs_is_array_template = false; auto *rhs_var = maybe_get_backing_variable(rhs_id); if (rhs_var && rhs_storage == StorageClassStorageBuffer && storage_class_array_is_thread(rhs_var->storage)) rhs_is_array_template = true; else if (rhs_var && rhs_storage != StorageClassGeneric && type_is_block_like(get(rhs_var->basetype))) rhs_is_array_template = false; // If threadgroup storage qualifiers are *not* used: // Avoid spvCopy* wrapper functions; Otherwise, spvUnsafeArray<> template cannot be used with that storage qualifier. if (lhs_is_array_template && rhs_is_array_template && !using_builtin_array()) { // Fall back to normal copy path. return false; } else { // Ensure the LHS variable has been declared if (lhs_var) flush_variable_declaration(lhs_var->self); string lhs; if (expr) lhs = expr; else lhs = to_expression(lhs_id); // Assignment from an array initializer is fine. auto &type = expression_type(rhs_id); auto *var = maybe_get_backing_variable(rhs_id); // Unfortunately, we cannot template on address space in MSL, // so explicit address space redirection it is ... bool is_constant = false; if (ir.ids[rhs_id].get_type() == TypeConstant) { is_constant = true; } else if (var && var->remapped_variable && var->statically_assigned && ir.ids[var->static_expression].get_type() == TypeConstant) { is_constant = true; } else if (rhs_storage == StorageClassUniform || rhs_storage == StorageClassUniformConstant) { is_constant = true; } // For the case where we have OpLoad triggering an array copy, // we cannot easily detect this case ahead of time since it's // context dependent. We might have to force a recompile here // if this is the only use of array copies in our shader. if (type.array.size() > 1) { if (type.array.size() > kArrayCopyMultidimMax) SPIRV_CROSS_THROW("Cannot support this many dimensions for arrays of arrays."); auto func = static_cast(SPVFuncImplArrayCopyMultidimBase + type.array.size()); add_spv_func_and_recompile(func); } else add_spv_func_and_recompile(SPVFuncImplArrayCopy); const char *tag = nullptr; if (lhs_is_thread_storage && is_constant) tag = "FromConstantToStack"; else if (lhs_storage == StorageClassWorkgroup && is_constant) tag = "FromConstantToThreadGroup"; else if (lhs_is_thread_storage && rhs_is_thread_storage) tag = "FromStackToStack"; else if (lhs_storage == StorageClassWorkgroup && rhs_is_thread_storage) tag = "FromStackToThreadGroup"; else if (lhs_is_thread_storage && rhs_storage == StorageClassWorkgroup) tag = "FromThreadGroupToStack"; else if (lhs_storage == StorageClassWorkgroup && rhs_storage == StorageClassWorkgroup) tag = "FromThreadGroupToThreadGroup"; else if (lhs_storage == StorageClassStorageBuffer && rhs_storage == StorageClassStorageBuffer) tag = "FromDeviceToDevice"; else if (lhs_storage == StorageClassStorageBuffer && is_constant) tag = "FromConstantToDevice"; else if (lhs_storage == StorageClassStorageBuffer && rhs_storage == StorageClassWorkgroup) tag = "FromThreadGroupToDevice"; else if (lhs_storage == StorageClassStorageBuffer && rhs_is_thread_storage) tag = "FromStackToDevice"; else if (lhs_storage == StorageClassWorkgroup && rhs_storage == StorageClassStorageBuffer) tag = "FromDeviceToThreadGroup"; else if (lhs_is_thread_storage && rhs_storage == StorageClassStorageBuffer) tag = "FromDeviceToStack"; else SPIRV_CROSS_THROW("Unknown storage class used for copying arrays."); // Pass internal array of spvUnsafeArray<> into wrapper functions if (lhs_is_array_template && rhs_is_array_template && !msl_options.force_native_arrays) statement("spvArrayCopy", tag, type.array.size(), "(", lhs, ".elements, ", to_expression(rhs_id), ".elements);"); if (lhs_is_array_template && !msl_options.force_native_arrays) statement("spvArrayCopy", tag, type.array.size(), "(", lhs, ".elements, ", to_expression(rhs_id), ");"); else if (rhs_is_array_template && !msl_options.force_native_arrays) statement("spvArrayCopy", tag, type.array.size(), "(", lhs, ", ", to_expression(rhs_id), ".elements);"); else statement("spvArrayCopy", tag, type.array.size(), "(", lhs, ", ", to_expression(rhs_id), ");"); } return true; } uint32_t CompilerMSL::get_physical_tess_level_array_size(spv::BuiltIn builtin) const { if (is_tessellating_triangles()) return builtin == BuiltInTessLevelInner ? 1 : 3; else return builtin == BuiltInTessLevelInner ? 2 : 4; } // Since MSL does not allow arrays to be copied via simple variable assignment, // if the LHS and RHS represent an assignment of an entire array, it must be // implemented by calling an array copy function. // Returns whether the struct assignment was emitted. bool CompilerMSL::maybe_emit_array_assignment(uint32_t id_lhs, uint32_t id_rhs) { // We only care about assignments of an entire array auto &type = expression_type(id_lhs); if (!is_array(get_pointee_type(type))) return false; auto *var = maybe_get(id_lhs); // Is this a remapped, static constant? Don't do anything. if (var && var->remapped_variable && var->statically_assigned) return true; if (ir.ids[id_rhs].get_type() == TypeConstant && var && var->deferred_declaration) { // Special case, if we end up declaring a variable when assigning the constant array, // we can avoid the copy by directly assigning the constant expression. // This is likely necessary to be able to use a variable as a true look-up table, as it is unlikely // the compiler will be able to optimize the spvArrayCopy() into a constant LUT. // After a variable has been declared, we can no longer assign constant arrays in MSL unfortunately. statement(to_expression(id_lhs), " = ", constant_expression(get(id_rhs)), ";"); return true; } if (is_tesc_shader() && has_decoration(id_lhs, DecorationBuiltIn)) { auto builtin = BuiltIn(get_decoration(id_lhs, DecorationBuiltIn)); // Need to manually unroll the array store. if (builtin == BuiltInTessLevelInner || builtin == BuiltInTessLevelOuter) { uint32_t array_size = get_physical_tess_level_array_size(builtin); if (array_size == 1) statement(to_expression(id_lhs), " = half(", to_expression(id_rhs), "[0]);"); else { for (uint32_t i = 0; i < array_size; i++) statement(to_expression(id_lhs), "[", i, "] = half(", to_expression(id_rhs), "[", i, "]);"); } return true; } } auto lhs_storage = get_expression_effective_storage_class(id_lhs); auto rhs_storage = get_expression_effective_storage_class(id_rhs); if (!emit_array_copy(nullptr, id_lhs, id_rhs, lhs_storage, rhs_storage)) return false; register_write(id_lhs); return true; } // Emits one of the atomic functions. In MSL, the atomic functions operate on pointers void CompilerMSL::emit_atomic_func_op(uint32_t result_type, uint32_t result_id, const char *op, Op opcode, uint32_t mem_order_1, uint32_t mem_order_2, bool has_mem_order_2, uint32_t obj, uint32_t op1, bool op1_is_pointer, bool op1_is_literal, uint32_t op2) { string exp; auto &type = get_pointee_type(expression_type(obj)); auto expected_type = type.basetype; if (opcode == OpAtomicUMax || opcode == OpAtomicUMin) expected_type = to_unsigned_basetype(type.width); else if (opcode == OpAtomicSMax || opcode == OpAtomicSMin) expected_type = to_signed_basetype(type.width); bool use_native_image_atomic; if (msl_options.supports_msl_version(3, 1)) use_native_image_atomic = check_atomic_image(obj); else use_native_image_atomic = false; if (type.width == 64) SPIRV_CROSS_THROW("MSL currently does not support 64-bit atomics."); auto remapped_type = type; remapped_type.basetype = expected_type; auto *var = maybe_get_backing_variable(obj); if (!var) SPIRV_CROSS_THROW("No backing variable for atomic operation."); const auto &res_type = get(var->basetype); bool is_atomic_compare_exchange_strong = op1_is_pointer && op1; bool check_discard = opcode != OpAtomicLoad && needs_frag_discard_checks() && ((res_type.storage == StorageClassUniformConstant && res_type.basetype == SPIRType::Image) || var->storage == StorageClassStorageBuffer || var->storage == StorageClassUniform); // Even compare exchange atomics are vec4 on metal for ... reasons :v uint32_t vec4_temporary_id = 0; if (use_native_image_atomic && is_atomic_compare_exchange_strong) { uint32_t &tmp_id = extra_sub_expressions[result_id]; if (!tmp_id) { tmp_id = ir.increase_bound_by(2); auto vec4_type = get(result_type); vec4_type.vecsize = 4; set(tmp_id + 1, vec4_type); } vec4_temporary_id = tmp_id; } if (check_discard) { if (is_atomic_compare_exchange_strong) { // We're already emitting a CAS loop here; a conditional won't hurt. emit_uninitialized_temporary_expression(result_type, result_id); if (vec4_temporary_id) emit_uninitialized_temporary_expression(vec4_temporary_id + 1, vec4_temporary_id); statement("if (!", builtin_to_glsl(BuiltInHelperInvocation, StorageClassInput), ")"); begin_scope(); } else exp = join("(!", builtin_to_glsl(BuiltInHelperInvocation, StorageClassInput), " ? "); } if (use_native_image_atomic) { auto obj_expression = to_expression(obj); auto split_index = obj_expression.find_first_of('@'); // Will only be false if we're in "force recompile later" mode. if (split_index != string::npos) exp += join(obj_expression.substr(0, split_index), ".", op, "(", obj_expression.substr(split_index + 1)); else exp += obj_expression; } else { exp += string(op) + "_explicit("; exp += "("; // Emulate texture2D atomic operations if (res_type.storage == StorageClassUniformConstant && res_type.basetype == SPIRType::Image) { exp += "device"; } else { exp += get_argument_address_space(*var); } exp += " atomic_"; // For signed and unsigned min/max, we can signal this through the pointer type. // There is no other way, since C++ does not have explicit signage for atomics. exp += type_to_glsl(remapped_type); exp += "*)"; exp += "&"; exp += to_enclosed_expression(obj); } if (is_atomic_compare_exchange_strong) { assert(strcmp(op, "atomic_compare_exchange_weak") == 0); assert(op2); assert(has_mem_order_2); exp += ", &"; exp += to_name(vec4_temporary_id ? vec4_temporary_id : result_id); exp += ", "; exp += to_expression(op2); if (!use_native_image_atomic) { exp += ", "; exp += get_memory_order(mem_order_1); exp += ", "; exp += get_memory_order(mem_order_2); } exp += ")"; // MSL only supports the weak atomic compare exchange, so emit a CAS loop here. // The MSL function returns false if the atomic write fails OR the comparison test fails, // so we must validate that it wasn't the comparison test that failed before continuing // the CAS loop, otherwise it will loop infinitely, with the comparison test always failing. // The function updates the comparator value from the memory value, so the additional // comparison test evaluates the memory value against the expected value. if (!check_discard) { emit_uninitialized_temporary_expression(result_type, result_id); if (vec4_temporary_id) emit_uninitialized_temporary_expression(vec4_temporary_id + 1, vec4_temporary_id); } statement("do"); begin_scope(); string scalar_expression; if (vec4_temporary_id) scalar_expression = join(to_expression(vec4_temporary_id), ".x"); else scalar_expression = to_expression(result_id); statement(scalar_expression, " = ", to_expression(op1), ";"); end_scope_decl(join("while (!", exp, " && ", scalar_expression, " == ", to_enclosed_expression(op1), ")")); if (vec4_temporary_id) statement(to_expression(result_id), " = ", scalar_expression, ";"); // Vulkan: (section 9.29: ... and values returned by atomic instructions in helper invocations are undefined) if (check_discard) { end_scope(); statement("else"); begin_scope(); statement(to_expression(result_id), " = {};"); end_scope(); } } else { assert(strcmp(op, "atomic_compare_exchange_weak") != 0); if (op1) { exp += ", "; if (op1_is_literal) exp += to_string(op1); else exp += bitcast_expression(expected_type, op1); } if (op2) exp += ", " + to_expression(op2); if (!use_native_image_atomic) { exp += string(", ") + get_memory_order(mem_order_1); if (has_mem_order_2) exp += string(", ") + get_memory_order(mem_order_2); } exp += ")"; // For some particular reason, atomics return vec4 in Metal ... if (use_native_image_atomic) exp += ".x"; // Vulkan: (section 9.29: ... and values returned by atomic instructions in helper invocations are undefined) if (check_discard) { exp += " : "; if (strcmp(op, "atomic_store") != 0) exp += join(type_to_glsl(get(result_type)), "{}"); else exp += "((void)0)"; exp += ")"; } if (expected_type != type.basetype) exp = bitcast_expression(type, expected_type, exp); if (strcmp(op, "atomic_store") != 0) emit_op(result_type, result_id, exp, false); else statement(exp, ";"); } flush_all_atomic_capable_variables(); } // Metal only supports relaxed memory order for now const char *CompilerMSL::get_memory_order(uint32_t) { return "memory_order_relaxed"; } // Override for MSL-specific extension syntax instructions. // In some cases, deliberately select either the fast or precise versions of the MSL functions to match Vulkan math precision results. void CompilerMSL::emit_glsl_op(uint32_t result_type, uint32_t id, uint32_t eop, const uint32_t *args, uint32_t count) { auto op = static_cast(eop); // If we need to do implicit bitcasts, make sure we do it with the correct type. uint32_t integer_width = get_integer_width_for_glsl_instruction(op, args, count); auto int_type = to_signed_basetype(integer_width); auto uint_type = to_unsigned_basetype(integer_width); op = get_remapped_glsl_op(op); switch (op) { case GLSLstd450Sinh: emit_unary_func_op(result_type, id, args[0], "fast::sinh"); break; case GLSLstd450Cosh: emit_unary_func_op(result_type, id, args[0], "fast::cosh"); break; case GLSLstd450Tanh: emit_unary_func_op(result_type, id, args[0], "precise::tanh"); break; case GLSLstd450Atan2: emit_binary_func_op(result_type, id, args[0], args[1], "precise::atan2"); break; case GLSLstd450InverseSqrt: emit_unary_func_op(result_type, id, args[0], "rsqrt"); break; case GLSLstd450RoundEven: emit_unary_func_op(result_type, id, args[0], "rint"); break; case GLSLstd450FindILsb: { // In this template version of findLSB, we return T. auto basetype = expression_type(args[0]).basetype; emit_unary_func_op_cast(result_type, id, args[0], "spvFindLSB", basetype, basetype); break; } case GLSLstd450FindSMsb: emit_unary_func_op_cast(result_type, id, args[0], "spvFindSMSB", int_type, int_type); break; case GLSLstd450FindUMsb: emit_unary_func_op_cast(result_type, id, args[0], "spvFindUMSB", uint_type, uint_type); break; case GLSLstd450PackSnorm4x8: emit_unary_func_op(result_type, id, args[0], "pack_float_to_snorm4x8"); break; case GLSLstd450PackUnorm4x8: emit_unary_func_op(result_type, id, args[0], "pack_float_to_unorm4x8"); break; case GLSLstd450PackSnorm2x16: emit_unary_func_op(result_type, id, args[0], "pack_float_to_snorm2x16"); break; case GLSLstd450PackUnorm2x16: emit_unary_func_op(result_type, id, args[0], "pack_float_to_unorm2x16"); break; case GLSLstd450PackHalf2x16: { auto expr = join("as_type(half2(", to_expression(args[0]), "))"); emit_op(result_type, id, expr, should_forward(args[0])); inherit_expression_dependencies(id, args[0]); break; } case GLSLstd450UnpackSnorm4x8: emit_unary_func_op(result_type, id, args[0], "unpack_snorm4x8_to_float"); break; case GLSLstd450UnpackUnorm4x8: emit_unary_func_op(result_type, id, args[0], "unpack_unorm4x8_to_float"); break; case GLSLstd450UnpackSnorm2x16: emit_unary_func_op(result_type, id, args[0], "unpack_snorm2x16_to_float"); break; case GLSLstd450UnpackUnorm2x16: emit_unary_func_op(result_type, id, args[0], "unpack_unorm2x16_to_float"); break; case GLSLstd450UnpackHalf2x16: { auto expr = join("float2(as_type(", to_expression(args[0]), "))"); emit_op(result_type, id, expr, should_forward(args[0])); inherit_expression_dependencies(id, args[0]); break; } case GLSLstd450PackDouble2x32: emit_unary_func_op(result_type, id, args[0], "unsupported_GLSLstd450PackDouble2x32"); // Currently unsupported break; case GLSLstd450UnpackDouble2x32: emit_unary_func_op(result_type, id, args[0], "unsupported_GLSLstd450UnpackDouble2x32"); // Currently unsupported break; case GLSLstd450MatrixInverse: { auto &mat_type = get(result_type); switch (mat_type.columns) { case 2: emit_unary_func_op(result_type, id, args[0], "spvInverse2x2"); break; case 3: emit_unary_func_op(result_type, id, args[0], "spvInverse3x3"); break; case 4: emit_unary_func_op(result_type, id, args[0], "spvInverse4x4"); break; default: break; } break; } case GLSLstd450FMin: // If the result type isn't float, don't bother calling the specific // precise::/fast:: version. Metal doesn't have those for half and // double types. if (get(result_type).basetype != SPIRType::Float) emit_binary_func_op(result_type, id, args[0], args[1], "min"); else emit_binary_func_op(result_type, id, args[0], args[1], "fast::min"); break; case GLSLstd450FMax: if (get(result_type).basetype != SPIRType::Float) emit_binary_func_op(result_type, id, args[0], args[1], "max"); else emit_binary_func_op(result_type, id, args[0], args[1], "fast::max"); break; case GLSLstd450FClamp: // TODO: If args[1] is 0 and args[2] is 1, emit a saturate() call. if (get(result_type).basetype != SPIRType::Float) emit_trinary_func_op(result_type, id, args[0], args[1], args[2], "clamp"); else emit_trinary_func_op(result_type, id, args[0], args[1], args[2], "fast::clamp"); break; case GLSLstd450NMin: if (get(result_type).basetype != SPIRType::Float) emit_binary_func_op(result_type, id, args[0], args[1], "min"); else emit_binary_func_op(result_type, id, args[0], args[1], "precise::min"); break; case GLSLstd450NMax: if (get(result_type).basetype != SPIRType::Float) emit_binary_func_op(result_type, id, args[0], args[1], "max"); else emit_binary_func_op(result_type, id, args[0], args[1], "precise::max"); break; case GLSLstd450NClamp: // TODO: If args[1] is 0 and args[2] is 1, emit a saturate() call. if (get(result_type).basetype != SPIRType::Float) emit_trinary_func_op(result_type, id, args[0], args[1], args[2], "clamp"); else emit_trinary_func_op(result_type, id, args[0], args[1], args[2], "precise::clamp"); break; case GLSLstd450InterpolateAtCentroid: { // We can't just emit the expression normally, because the qualified name contains a call to the default // interpolate method, or refers to a local variable. We saved the interface index we need; use it to construct // the base for the method call. uint32_t interface_index = get_extended_decoration(args[0], SPIRVCrossDecorationInterfaceMemberIndex); string component; if (has_extended_decoration(args[0], SPIRVCrossDecorationInterpolantComponentExpr)) { uint32_t index_expr = get_extended_decoration(args[0], SPIRVCrossDecorationInterpolantComponentExpr); auto *c = maybe_get(index_expr); if (!c || c->specialization) component = join("[", to_expression(index_expr), "]"); else component = join(".", index_to_swizzle(c->scalar())); } emit_op(result_type, id, join(to_name(stage_in_var_id), ".", to_member_name(get_stage_in_struct_type(), interface_index), ".interpolate_at_centroid()", component), should_forward(args[0])); break; } case GLSLstd450InterpolateAtSample: { uint32_t interface_index = get_extended_decoration(args[0], SPIRVCrossDecorationInterfaceMemberIndex); string component; if (has_extended_decoration(args[0], SPIRVCrossDecorationInterpolantComponentExpr)) { uint32_t index_expr = get_extended_decoration(args[0], SPIRVCrossDecorationInterpolantComponentExpr); auto *c = maybe_get(index_expr); if (!c || c->specialization) component = join("[", to_expression(index_expr), "]"); else component = join(".", index_to_swizzle(c->scalar())); } emit_op(result_type, id, join(to_name(stage_in_var_id), ".", to_member_name(get_stage_in_struct_type(), interface_index), ".interpolate_at_sample(", to_expression(args[1]), ")", component), should_forward(args[0]) && should_forward(args[1])); break; } case GLSLstd450InterpolateAtOffset: { uint32_t interface_index = get_extended_decoration(args[0], SPIRVCrossDecorationInterfaceMemberIndex); string component; if (has_extended_decoration(args[0], SPIRVCrossDecorationInterpolantComponentExpr)) { uint32_t index_expr = get_extended_decoration(args[0], SPIRVCrossDecorationInterpolantComponentExpr); auto *c = maybe_get(index_expr); if (!c || c->specialization) component = join("[", to_expression(index_expr), "]"); else component = join(".", index_to_swizzle(c->scalar())); } // Like Direct3D, Metal puts the (0, 0) at the upper-left corner, not the center as SPIR-V and GLSL do. // Offset the offset by (1/2 - 1/16), or 0.4375, to compensate for this. // It has to be (1/2 - 1/16) and not 1/2, or several CTS tests subtly break on Intel. emit_op(result_type, id, join(to_name(stage_in_var_id), ".", to_member_name(get_stage_in_struct_type(), interface_index), ".interpolate_at_offset(", to_expression(args[1]), " + 0.4375)", component), should_forward(args[0]) && should_forward(args[1])); break; } case GLSLstd450Distance: // MSL does not support scalar versions here. if (expression_type(args[0]).vecsize == 1) { // Equivalent to length(a - b) -> abs(a - b). emit_op(result_type, id, join("abs(", to_enclosed_unpacked_expression(args[0]), " - ", to_enclosed_unpacked_expression(args[1]), ")"), should_forward(args[0]) && should_forward(args[1])); inherit_expression_dependencies(id, args[0]); inherit_expression_dependencies(id, args[1]); } else CompilerGLSL::emit_glsl_op(result_type, id, eop, args, count); break; case GLSLstd450Length: // MSL does not support scalar versions, so use abs(). if (expression_type(args[0]).vecsize == 1) emit_unary_func_op(result_type, id, args[0], "abs"); else CompilerGLSL::emit_glsl_op(result_type, id, eop, args, count); break; case GLSLstd450Normalize: { auto &exp_type = expression_type(args[0]); // MSL does not support scalar versions here. // MSL has no implementation for normalize in the fast:: namespace for half2 and half3 // Returns -1 or 1 for valid input, sign() does the job. if (exp_type.vecsize == 1) emit_unary_func_op(result_type, id, args[0], "sign"); else if (exp_type.vecsize <= 3 && exp_type.basetype == SPIRType::Half) emit_unary_func_op(result_type, id, args[0], "normalize"); else emit_unary_func_op(result_type, id, args[0], "fast::normalize"); break; } case GLSLstd450Reflect: if (get(result_type).vecsize == 1) emit_binary_func_op(result_type, id, args[0], args[1], "spvReflect"); else CompilerGLSL::emit_glsl_op(result_type, id, eop, args, count); break; case GLSLstd450Refract: if (get(result_type).vecsize == 1) emit_trinary_func_op(result_type, id, args[0], args[1], args[2], "spvRefract"); else CompilerGLSL::emit_glsl_op(result_type, id, eop, args, count); break; case GLSLstd450FaceForward: if (get(result_type).vecsize == 1) emit_trinary_func_op(result_type, id, args[0], args[1], args[2], "spvFaceForward"); else CompilerGLSL::emit_glsl_op(result_type, id, eop, args, count); break; case GLSLstd450Modf: case GLSLstd450Frexp: { // Special case. If the variable is a scalar access chain, we cannot use it directly. We have to emit a temporary. // Another special case is if the variable is in a storage class which is not thread. auto *ptr = maybe_get(args[1]); auto &type = expression_type(args[1]); bool is_thread_storage = storage_class_array_is_thread(type.storage); if (type.storage == StorageClassOutput && capture_output_to_buffer) is_thread_storage = false; if (!is_thread_storage || (ptr && ptr->access_chain && is_scalar(expression_type(args[1])))) { register_call_out_argument(args[1]); forced_temporaries.insert(id); // Need to create temporaries and copy over to access chain after. // We cannot directly take the reference of a vector swizzle in MSL, even if it's scalar ... uint32_t &tmp_id = extra_sub_expressions[id]; if (!tmp_id) tmp_id = ir.increase_bound_by(1); uint32_t tmp_type_id = get_pointee_type_id(expression_type_id(args[1])); emit_uninitialized_temporary_expression(tmp_type_id, tmp_id); emit_binary_func_op(result_type, id, args[0], tmp_id, eop == GLSLstd450Modf ? "modf" : "frexp"); statement(to_expression(args[1]), " = ", to_expression(tmp_id), ";"); } else CompilerGLSL::emit_glsl_op(result_type, id, eop, args, count); break; } case GLSLstd450Pow: // powr makes x < 0.0 undefined, just like SPIR-V. emit_binary_func_op(result_type, id, args[0], args[1], "powr"); break; default: CompilerGLSL::emit_glsl_op(result_type, id, eop, args, count); break; } } void CompilerMSL::emit_spv_amd_shader_trinary_minmax_op(uint32_t result_type, uint32_t id, uint32_t eop, const uint32_t *args, uint32_t count) { enum AMDShaderTrinaryMinMax { FMin3AMD = 1, UMin3AMD = 2, SMin3AMD = 3, FMax3AMD = 4, UMax3AMD = 5, SMax3AMD = 6, FMid3AMD = 7, UMid3AMD = 8, SMid3AMD = 9 }; if (!msl_options.supports_msl_version(2, 1)) SPIRV_CROSS_THROW("Trinary min/max functions require MSL 2.1."); auto op = static_cast(eop); switch (op) { case FMid3AMD: case UMid3AMD: case SMid3AMD: emit_trinary_func_op(result_type, id, args[0], args[1], args[2], "median3"); break; default: CompilerGLSL::emit_spv_amd_shader_trinary_minmax_op(result_type, id, eop, args, count); break; } } // Emit a structure declaration for the specified interface variable. void CompilerMSL::emit_interface_block(uint32_t ib_var_id) { if (ib_var_id) { auto &ib_var = get(ib_var_id); auto &ib_type = get_variable_data_type(ib_var); //assert(ib_type.basetype == SPIRType::Struct && !ib_type.member_types.empty()); assert(ib_type.basetype == SPIRType::Struct); emit_struct(ib_type); } } // Emits the declaration signature of the specified function. // If this is the entry point function, Metal-specific return value and function arguments are added. void CompilerMSL::emit_function_prototype(SPIRFunction &func, const Bitset &) { if (func.self != ir.default_entry_point) add_function_overload(func); local_variable_names = resource_names; string decl; processing_entry_point = func.self == ir.default_entry_point; // Metal helper functions must be static force-inline otherwise they will cause problems when linked together in a single Metallib. if (!processing_entry_point) statement(force_inline); auto &type = get(func.return_type); if (!type.array.empty() && msl_options.force_native_arrays) { // We cannot return native arrays in MSL, so "return" through an out variable. decl += "void"; } else { decl += func_type_decl(type); } decl += " "; decl += to_name(func.self); decl += "("; if (!type.array.empty() && msl_options.force_native_arrays) { // Fake arrays returns by writing to an out array instead. decl += "thread "; decl += type_to_glsl(type); decl += " (&spvReturnValue)"; decl += type_to_array_glsl(type); if (!func.arguments.empty()) decl += ", "; } if (processing_entry_point) { if (msl_options.argument_buffers) decl += entry_point_args_argument_buffer(!func.arguments.empty()); else decl += entry_point_args_classic(!func.arguments.empty()); // append entry point args to avoid conflicts in local variable names. local_variable_names.insert(resource_names.begin(), resource_names.end()); // If entry point function has variables that require early declaration, // ensure they each have an empty initializer, creating one if needed. // This is done at this late stage because the initialization expression // is cleared after each compilation pass. for (auto var_id : vars_needing_early_declaration) { auto &ed_var = get(var_id); ID &initializer = ed_var.initializer; if (!initializer) initializer = ir.increase_bound_by(1); // Do not override proper initializers. if (ir.ids[initializer].get_type() == TypeNone || ir.ids[initializer].get_type() == TypeExpression) set(ed_var.initializer, "{}", ed_var.basetype, true); } } for (auto &arg : func.arguments) { uint32_t name_id = arg.id; auto *var = maybe_get(arg.id); if (var) { // If we need to modify the name of the variable, make sure we modify the original variable. // Our alias is just a shadow variable. if (arg.alias_global_variable && var->basevariable) name_id = var->basevariable; var->parameter = &arg; // Hold a pointer to the parameter so we can invalidate the readonly field if needed. } add_local_variable_name(name_id); decl += argument_decl(arg); bool is_dynamic_img_sampler = has_extended_decoration(arg.id, SPIRVCrossDecorationDynamicImageSampler); auto &arg_type = get(arg.type); if (arg_type.basetype == SPIRType::SampledImage && !is_dynamic_img_sampler) { // Manufacture automatic plane args for multiplanar texture uint32_t planes = 1; if (auto *constexpr_sampler = find_constexpr_sampler(name_id)) if (constexpr_sampler->ycbcr_conversion_enable) planes = constexpr_sampler->planes; for (uint32_t i = 1; i < planes; i++) decl += join(", ", argument_decl(arg), plane_name_suffix, i); // Manufacture automatic sampler arg for SampledImage texture if (arg_type.image.dim != DimBuffer) { if (arg_type.array.empty() || (var ? is_var_runtime_size_array(*var) : is_runtime_size_array(arg_type))) { decl += join(", ", sampler_type(arg_type, arg.id), " ", to_sampler_expression(name_id)); } else { const char *sampler_address_space = descriptor_address_space(name_id, StorageClassUniformConstant, "thread const"); decl += join(", ", sampler_address_space, " ", sampler_type(arg_type, name_id), "& ", to_sampler_expression(name_id)); } } } // Manufacture automatic swizzle arg. if (msl_options.swizzle_texture_samples && has_sampled_images && is_sampled_image_type(arg_type) && !is_dynamic_img_sampler) { bool arg_is_array = !arg_type.array.empty(); decl += join(", constant uint", arg_is_array ? "* " : "& ", to_swizzle_expression(name_id)); } if (buffer_requires_array_length(name_id)) { bool arg_is_array = !arg_type.array.empty(); decl += join(", constant uint", arg_is_array ? "* " : "& ", to_buffer_size_expression(name_id)); } if (&arg != &func.arguments.back()) decl += ", "; } decl += ")"; statement(decl); } static bool needs_chroma_reconstruction(const MSLConstexprSampler *constexpr_sampler) { // For now, only multiplanar images need explicit reconstruction. GBGR and BGRG images // use implicit reconstruction. return constexpr_sampler && constexpr_sampler->ycbcr_conversion_enable && constexpr_sampler->planes > 1; } // Returns the texture sampling function string for the specified image and sampling characteristics. string CompilerMSL::to_function_name(const TextureFunctionNameArguments &args) { VariableID img = args.base.img; const MSLConstexprSampler *constexpr_sampler = nullptr; bool is_dynamic_img_sampler = false; if (auto *var = maybe_get_backing_variable(img)) { constexpr_sampler = find_constexpr_sampler(var->basevariable ? var->basevariable : VariableID(var->self)); is_dynamic_img_sampler = has_extended_decoration(var->self, SPIRVCrossDecorationDynamicImageSampler); } // Special-case gather. We have to alter the component being looked up // in the swizzle case. if (msl_options.swizzle_texture_samples && args.base.is_gather && !is_dynamic_img_sampler && (!constexpr_sampler || !constexpr_sampler->ycbcr_conversion_enable)) { bool is_compare = comparison_ids.count(img); add_spv_func_and_recompile(is_compare ? SPVFuncImplGatherCompareSwizzle : SPVFuncImplGatherSwizzle); return is_compare ? "spvGatherCompareSwizzle" : "spvGatherSwizzle"; } auto *combined = maybe_get(img); // Texture reference string fname; if (needs_chroma_reconstruction(constexpr_sampler) && !is_dynamic_img_sampler) { if (constexpr_sampler->planes != 2 && constexpr_sampler->planes != 3) SPIRV_CROSS_THROW("Unhandled number of color image planes!"); // 444 images aren't downsampled, so we don't need to do linear filtering. if (constexpr_sampler->resolution == MSL_FORMAT_RESOLUTION_444 || constexpr_sampler->chroma_filter == MSL_SAMPLER_FILTER_NEAREST) { if (constexpr_sampler->planes == 2) add_spv_func_and_recompile(SPVFuncImplChromaReconstructNearest2Plane); else add_spv_func_and_recompile(SPVFuncImplChromaReconstructNearest3Plane); fname = "spvChromaReconstructNearest"; } else // Linear with a downsampled format { fname = "spvChromaReconstructLinear"; switch (constexpr_sampler->resolution) { case MSL_FORMAT_RESOLUTION_444: assert(false); break; // not reached case MSL_FORMAT_RESOLUTION_422: switch (constexpr_sampler->x_chroma_offset) { case MSL_CHROMA_LOCATION_COSITED_EVEN: if (constexpr_sampler->planes == 2) add_spv_func_and_recompile(SPVFuncImplChromaReconstructLinear422CositedEven2Plane); else add_spv_func_and_recompile(SPVFuncImplChromaReconstructLinear422CositedEven3Plane); fname += "422CositedEven"; break; case MSL_CHROMA_LOCATION_MIDPOINT: if (constexpr_sampler->planes == 2) add_spv_func_and_recompile(SPVFuncImplChromaReconstructLinear422Midpoint2Plane); else add_spv_func_and_recompile(SPVFuncImplChromaReconstructLinear422Midpoint3Plane); fname += "422Midpoint"; break; default: SPIRV_CROSS_THROW("Invalid chroma location."); } break; case MSL_FORMAT_RESOLUTION_420: fname += "420"; switch (constexpr_sampler->x_chroma_offset) { case MSL_CHROMA_LOCATION_COSITED_EVEN: switch (constexpr_sampler->y_chroma_offset) { case MSL_CHROMA_LOCATION_COSITED_EVEN: if (constexpr_sampler->planes == 2) add_spv_func_and_recompile( SPVFuncImplChromaReconstructLinear420XCositedEvenYCositedEven2Plane); else add_spv_func_and_recompile( SPVFuncImplChromaReconstructLinear420XCositedEvenYCositedEven3Plane); fname += "XCositedEvenYCositedEven"; break; case MSL_CHROMA_LOCATION_MIDPOINT: if (constexpr_sampler->planes == 2) add_spv_func_and_recompile( SPVFuncImplChromaReconstructLinear420XCositedEvenYMidpoint2Plane); else add_spv_func_and_recompile( SPVFuncImplChromaReconstructLinear420XCositedEvenYMidpoint3Plane); fname += "XCositedEvenYMidpoint"; break; default: SPIRV_CROSS_THROW("Invalid Y chroma location."); } break; case MSL_CHROMA_LOCATION_MIDPOINT: switch (constexpr_sampler->y_chroma_offset) { case MSL_CHROMA_LOCATION_COSITED_EVEN: if (constexpr_sampler->planes == 2) add_spv_func_and_recompile( SPVFuncImplChromaReconstructLinear420XMidpointYCositedEven2Plane); else add_spv_func_and_recompile( SPVFuncImplChromaReconstructLinear420XMidpointYCositedEven3Plane); fname += "XMidpointYCositedEven"; break; case MSL_CHROMA_LOCATION_MIDPOINT: if (constexpr_sampler->planes == 2) add_spv_func_and_recompile(SPVFuncImplChromaReconstructLinear420XMidpointYMidpoint2Plane); else add_spv_func_and_recompile(SPVFuncImplChromaReconstructLinear420XMidpointYMidpoint3Plane); fname += "XMidpointYMidpoint"; break; default: SPIRV_CROSS_THROW("Invalid Y chroma location."); } break; default: SPIRV_CROSS_THROW("Invalid X chroma location."); } break; default: SPIRV_CROSS_THROW("Invalid format resolution."); } } } else { fname = to_expression(combined ? combined->image : img) + "."; // Texture function and sampler if (args.base.is_fetch) fname += "read"; else if (args.base.is_gather) fname += "gather"; else fname += "sample"; if (args.has_dref) fname += "_compare"; } return fname; } string CompilerMSL::convert_to_f32(const string &expr, uint32_t components) { SPIRType t { components > 1 ? OpTypeVector : OpTypeFloat }; t.basetype = SPIRType::Float; t.vecsize = components; t.columns = 1; return join(type_to_glsl_constructor(t), "(", expr, ")"); } static inline bool sampling_type_needs_f32_conversion(const SPIRType &type) { // Double is not supported to begin with, but doesn't hurt to check for completion. return type.basetype == SPIRType::Half || type.basetype == SPIRType::Double; } // Returns the function args for a texture sampling function for the specified image and sampling characteristics. string CompilerMSL::to_function_args(const TextureFunctionArguments &args, bool *p_forward) { VariableID img = args.base.img; auto &imgtype = *args.base.imgtype; uint32_t lod = args.lod; uint32_t grad_x = args.grad_x; uint32_t grad_y = args.grad_y; uint32_t bias = args.bias; const MSLConstexprSampler *constexpr_sampler = nullptr; bool is_dynamic_img_sampler = false; if (auto *var = maybe_get_backing_variable(img)) { constexpr_sampler = find_constexpr_sampler(var->basevariable ? var->basevariable : VariableID(var->self)); is_dynamic_img_sampler = has_extended_decoration(var->self, SPIRVCrossDecorationDynamicImageSampler); } string farg_str; bool forward = true; if (!is_dynamic_img_sampler) { // Texture reference (for some cases) if (needs_chroma_reconstruction(constexpr_sampler)) { // Multiplanar images need two or three textures. farg_str += to_expression(img); for (uint32_t i = 1; i < constexpr_sampler->planes; i++) farg_str += join(", ", to_expression(img), plane_name_suffix, i); } else if ((!constexpr_sampler || !constexpr_sampler->ycbcr_conversion_enable) && msl_options.swizzle_texture_samples && args.base.is_gather) { auto *combined = maybe_get(img); farg_str += to_expression(combined ? combined->image : img); } // Sampler reference if (!args.base.is_fetch) { if (!farg_str.empty()) farg_str += ", "; farg_str += to_sampler_expression(img); } if ((!constexpr_sampler || !constexpr_sampler->ycbcr_conversion_enable) && msl_options.swizzle_texture_samples && args.base.is_gather) { // Add the swizzle constant from the swizzle buffer. farg_str += ", " + to_swizzle_expression(img); used_swizzle_buffer = true; } // Swizzled gather puts the component before the other args, to allow template // deduction to work. if (args.component && msl_options.swizzle_texture_samples) { forward = should_forward(args.component); farg_str += ", " + to_component_argument(args.component); } } // Texture coordinates forward = forward && should_forward(args.coord); auto coord_expr = to_enclosed_expression(args.coord); auto &coord_type = expression_type(args.coord); bool coord_is_fp = type_is_floating_point(coord_type); bool is_cube_fetch = false; string tex_coords = coord_expr; uint32_t alt_coord_component = 0; switch (imgtype.image.dim) { case Dim1D: if (coord_type.vecsize > 1) tex_coords = enclose_expression(tex_coords) + ".x"; if (args.base.is_fetch) tex_coords = "uint(" + round_fp_tex_coords(tex_coords, coord_is_fp) + ")"; else if (sampling_type_needs_f32_conversion(coord_type)) tex_coords = convert_to_f32(tex_coords, 1); if (msl_options.texture_1D_as_2D) { if (args.base.is_fetch) tex_coords = "uint2(" + tex_coords + ", 0)"; else tex_coords = "float2(" + tex_coords + ", 0.5)"; } alt_coord_component = 1; break; case DimBuffer: if (coord_type.vecsize > 1) tex_coords = enclose_expression(tex_coords) + ".x"; if (msl_options.texture_buffer_native) { tex_coords = "uint(" + round_fp_tex_coords(tex_coords, coord_is_fp) + ")"; } else { // Metal texel buffer textures are 2D, so convert 1D coord to 2D. // Support for Metal 2.1's new texture_buffer type. if (args.base.is_fetch) { if (msl_options.texel_buffer_texture_width > 0) { tex_coords = "spvTexelBufferCoord(" + round_fp_tex_coords(tex_coords, coord_is_fp) + ")"; } else { tex_coords = "spvTexelBufferCoord(" + round_fp_tex_coords(tex_coords, coord_is_fp) + ", " + to_expression(img) + ")"; } } } alt_coord_component = 1; break; case DimSubpassData: // If we're using Metal's native frame-buffer fetch API for subpass inputs, // this path will not be hit. tex_coords = "uint2(gl_FragCoord.xy)"; alt_coord_component = 2; break; case Dim2D: if (coord_type.vecsize > 2) tex_coords = enclose_expression(tex_coords) + ".xy"; if (args.base.is_fetch) tex_coords = "uint2(" + round_fp_tex_coords(tex_coords, coord_is_fp) + ")"; else if (sampling_type_needs_f32_conversion(coord_type)) tex_coords = convert_to_f32(tex_coords, 2); alt_coord_component = 2; break; case Dim3D: if (coord_type.vecsize > 3) tex_coords = enclose_expression(tex_coords) + ".xyz"; if (args.base.is_fetch) tex_coords = "uint3(" + round_fp_tex_coords(tex_coords, coord_is_fp) + ")"; else if (sampling_type_needs_f32_conversion(coord_type)) tex_coords = convert_to_f32(tex_coords, 3); alt_coord_component = 3; break; case DimCube: if (args.base.is_fetch) { is_cube_fetch = true; tex_coords += ".xy"; tex_coords = "uint2(" + round_fp_tex_coords(tex_coords, coord_is_fp) + ")"; } else { if (coord_type.vecsize > 3) tex_coords = enclose_expression(tex_coords) + ".xyz"; } if (sampling_type_needs_f32_conversion(coord_type)) tex_coords = convert_to_f32(tex_coords, 3); alt_coord_component = 3; break; default: break; } if (args.base.is_fetch && args.offset) { // Fetch offsets must be applied directly to the coordinate. forward = forward && should_forward(args.offset); auto &type = expression_type(args.offset); if (imgtype.image.dim == Dim1D && msl_options.texture_1D_as_2D) { if (type.basetype != SPIRType::UInt) tex_coords += join(" + uint2(", bitcast_expression(SPIRType::UInt, args.offset), ", 0)"); else tex_coords += join(" + uint2(", to_enclosed_expression(args.offset), ", 0)"); } else { if (type.basetype != SPIRType::UInt) tex_coords += " + " + bitcast_expression(SPIRType::UInt, args.offset); else tex_coords += " + " + to_enclosed_expression(args.offset); } } // If projection, use alt coord as divisor if (args.base.is_proj) { if (sampling_type_needs_f32_conversion(coord_type)) tex_coords += " / " + convert_to_f32(to_extract_component_expression(args.coord, alt_coord_component), 1); else tex_coords += " / " + to_extract_component_expression(args.coord, alt_coord_component); } if (!farg_str.empty()) farg_str += ", "; if (imgtype.image.dim == DimCube && imgtype.image.arrayed && msl_options.emulate_cube_array) { farg_str += "spvCubemapTo2DArrayFace(" + tex_coords + ").xy"; if (is_cube_fetch) farg_str += ", uint(" + to_extract_component_expression(args.coord, 2) + ")"; else farg_str += ", uint(spvCubemapTo2DArrayFace(" + tex_coords + ").z) + (uint(" + round_fp_tex_coords(to_extract_component_expression(args.coord, alt_coord_component), coord_is_fp) + ") * 6u)"; add_spv_func_and_recompile(SPVFuncImplCubemapTo2DArrayFace); } else { farg_str += tex_coords; // If fetch from cube, add face explicitly if (is_cube_fetch) { // Special case for cube arrays, face and layer are packed in one dimension. if (imgtype.image.arrayed) farg_str += ", uint(" + to_extract_component_expression(args.coord, 2) + ") % 6u"; else farg_str += ", uint(" + round_fp_tex_coords(to_extract_component_expression(args.coord, 2), coord_is_fp) + ")"; } // If array, use alt coord if (imgtype.image.arrayed) { // Special case for cube arrays, face and layer are packed in one dimension. if (imgtype.image.dim == DimCube && args.base.is_fetch) { farg_str += ", uint(" + to_extract_component_expression(args.coord, 2) + ") / 6u"; } else { farg_str += ", uint(" + round_fp_tex_coords(to_extract_component_expression(args.coord, alt_coord_component), coord_is_fp) + ")"; if (imgtype.image.dim == DimSubpassData) { if (msl_options.multiview) farg_str += " + gl_ViewIndex"; else if (msl_options.arrayed_subpass_input) farg_str += " + gl_Layer"; } } } else if (imgtype.image.dim == DimSubpassData) { if (msl_options.multiview) farg_str += ", gl_ViewIndex"; else if (msl_options.arrayed_subpass_input) farg_str += ", gl_Layer"; } } // Depth compare reference value if (args.dref) { forward = forward && should_forward(args.dref); farg_str += ", "; auto &dref_type = expression_type(args.dref); string dref_expr; if (args.base.is_proj) dref_expr = join(to_enclosed_expression(args.dref), " / ", to_extract_component_expression(args.coord, alt_coord_component)); else dref_expr = to_expression(args.dref); if (sampling_type_needs_f32_conversion(dref_type)) dref_expr = convert_to_f32(dref_expr, 1); farg_str += dref_expr; if (msl_options.is_macos() && (grad_x || grad_y)) { // For sample compare, MSL does not support gradient2d for all targets (only iOS apparently according to docs). // However, the most common case here is to have a constant gradient of 0, as that is the only way to express // LOD == 0 in GLSL with sampler2DArrayShadow (cascaded shadow mapping). // We will detect a compile-time constant 0 value for gradient and promote that to level(0) on MSL. bool constant_zero_x = !grad_x || expression_is_constant_null(grad_x); bool constant_zero_y = !grad_y || expression_is_constant_null(grad_y); if (constant_zero_x && constant_zero_y && (!imgtype.image.arrayed || !msl_options.sample_dref_lod_array_as_grad)) { lod = 0; grad_x = 0; grad_y = 0; farg_str += ", level(0)"; } else if (!msl_options.supports_msl_version(2, 3)) { SPIRV_CROSS_THROW("Using non-constant 0.0 gradient() qualifier for sample_compare. This is not " "supported on macOS prior to MSL 2.3."); } } if (msl_options.is_macos() && bias) { // Bias is not supported either on macOS with sample_compare. // Verify it is compile-time zero, and drop the argument. if (expression_is_constant_null(bias)) { bias = 0; } else if (!msl_options.supports_msl_version(2, 3)) { SPIRV_CROSS_THROW("Using non-constant 0.0 bias() qualifier for sample_compare. This is not supported " "on macOS prior to MSL 2.3."); } } } // LOD Options // Metal does not support LOD for 1D textures. if (bias && (imgtype.image.dim != Dim1D || msl_options.texture_1D_as_2D)) { forward = forward && should_forward(bias); farg_str += ", bias(" + to_expression(bias) + ")"; } // Metal does not support LOD for 1D textures. if (lod && (imgtype.image.dim != Dim1D || msl_options.texture_1D_as_2D)) { forward = forward && should_forward(lod); if (args.base.is_fetch) { farg_str += ", " + to_expression(lod); } else if (msl_options.sample_dref_lod_array_as_grad && args.dref && imgtype.image.arrayed) { if (msl_options.is_macos() && !msl_options.supports_msl_version(2, 3)) SPIRV_CROSS_THROW("Using non-constant 0.0 gradient() qualifier for sample_compare. This is not " "supported on macOS prior to MSL 2.3."); // Some Metal devices have a bug where the LoD is erroneously biased upward // when using a level() argument. Since this doesn't happen as much with gradient2d(), // if we perform the LoD calculation in reverse, we can pass a gradient // instead. // lod = log2(rhoMax/eta) -> exp2(lod) = rhoMax/eta // If we make all of the scale factors the same, eta will be 1 and // exp2(lod) = rho. // rhoX = dP/dx * extent; rhoY = dP/dy * extent // Therefore, dP/dx = dP/dy = exp2(lod)/extent. // (Subtracting 0.5 before exponentiation gives better results.) string grad_opt, extent, grad_coord; VariableID base_img = img; if (auto *combined = maybe_get(img)) base_img = combined->image; switch (imgtype.image.dim) { case Dim1D: grad_opt = "gradient2d"; extent = join("float2(", to_expression(base_img), ".get_width(), 1.0)"); break; case Dim2D: grad_opt = "gradient2d"; extent = join("float2(", to_expression(base_img), ".get_width(), ", to_expression(base_img), ".get_height())"); break; case DimCube: if (imgtype.image.arrayed && msl_options.emulate_cube_array) { grad_opt = "gradient2d"; extent = join("float2(", to_expression(base_img), ".get_width())"); } else { if (msl_options.agx_manual_cube_grad_fixup) { add_spv_func_and_recompile(SPVFuncImplGradientCube); grad_opt = "spvGradientCube"; grad_coord = tex_coords + ", "; } else { grad_opt = "gradientcube"; } extent = join("float3(", to_expression(base_img), ".get_width())"); } break; default: grad_opt = "unsupported_gradient_dimension"; extent = "float3(1.0)"; break; } farg_str += join(", ", grad_opt, "(", grad_coord, "exp2(", to_expression(lod), " - 0.5) / ", extent, ", exp2(", to_expression(lod), " - 0.5) / ", extent, ")"); } else { farg_str += ", level(" + to_expression(lod) + ")"; } } else if (args.base.is_fetch && !lod && (imgtype.image.dim != Dim1D || msl_options.texture_1D_as_2D) && imgtype.image.dim != DimBuffer && !imgtype.image.ms && imgtype.image.sampled != 2) { // Lod argument is optional in OpImageFetch, but we require a LOD value, pick 0 as the default. // Check for sampled type as well, because is_fetch is also used for OpImageRead in MSL. farg_str += ", 0"; } // Metal does not support LOD for 1D textures. if ((grad_x || grad_y) && (imgtype.image.dim != Dim1D || msl_options.texture_1D_as_2D)) { forward = forward && should_forward(grad_x); forward = forward && should_forward(grad_y); string grad_opt, grad_coord; switch (imgtype.image.dim) { case Dim1D: case Dim2D: grad_opt = "gradient2d"; break; case Dim3D: grad_opt = "gradient3d"; break; case DimCube: if (imgtype.image.arrayed && msl_options.emulate_cube_array) { grad_opt = "gradient2d"; } else if (msl_options.agx_manual_cube_grad_fixup) { add_spv_func_and_recompile(SPVFuncImplGradientCube); grad_opt = "spvGradientCube"; grad_coord = tex_coords + ", "; } else { grad_opt = "gradientcube"; } break; default: grad_opt = "unsupported_gradient_dimension"; break; } farg_str += join(", ", grad_opt, "(", grad_coord, to_expression(grad_x), ", ", to_expression(grad_y), ")"); } if (args.min_lod) { if (!msl_options.supports_msl_version(2, 2)) SPIRV_CROSS_THROW("min_lod_clamp() is only supported in MSL 2.2+ and up."); forward = forward && should_forward(args.min_lod); farg_str += ", min_lod_clamp(" + to_expression(args.min_lod) + ")"; } // Add offsets string offset_expr; const SPIRType *offset_type = nullptr; if (args.offset && !args.base.is_fetch) { forward = forward && should_forward(args.offset); offset_expr = to_expression(args.offset); offset_type = &expression_type(args.offset); } if (!offset_expr.empty()) { switch (imgtype.image.dim) { case Dim1D: if (!msl_options.texture_1D_as_2D) break; if (offset_type->vecsize > 1) offset_expr = enclose_expression(offset_expr) + ".x"; farg_str += join(", int2(", offset_expr, ", 0)"); break; case Dim2D: if (offset_type->vecsize > 2) offset_expr = enclose_expression(offset_expr) + ".xy"; farg_str += ", " + offset_expr; break; case Dim3D: if (offset_type->vecsize > 3) offset_expr = enclose_expression(offset_expr) + ".xyz"; farg_str += ", " + offset_expr; break; default: break; } } if (args.component) { // If 2D has gather component, ensure it also has an offset arg if (imgtype.image.dim == Dim2D && offset_expr.empty()) farg_str += ", int2(0)"; if (!msl_options.swizzle_texture_samples || is_dynamic_img_sampler) { forward = forward && should_forward(args.component); uint32_t image_var = 0; if (const auto *combined = maybe_get(img)) { if (const auto *img_var = maybe_get_backing_variable(combined->image)) image_var = img_var->self; } else if (const auto *var = maybe_get_backing_variable(img)) { image_var = var->self; } if (image_var == 0 || !is_depth_image(expression_type(image_var), image_var)) farg_str += ", " + to_component_argument(args.component); } } if (args.sample) { forward = forward && should_forward(args.sample); farg_str += ", "; farg_str += to_expression(args.sample); } *p_forward = forward; return farg_str; } // If the texture coordinates are floating point, invokes MSL round() function to round them. string CompilerMSL::round_fp_tex_coords(string tex_coords, bool coord_is_fp) { return coord_is_fp ? ("rint(" + tex_coords + ")") : tex_coords; } // Returns a string to use in an image sampling function argument. // The ID must be a scalar constant. string CompilerMSL::to_component_argument(uint32_t id) { uint32_t component_index = evaluate_constant_u32(id); switch (component_index) { case 0: return "component::x"; case 1: return "component::y"; case 2: return "component::z"; case 3: return "component::w"; default: SPIRV_CROSS_THROW("The value (" + to_string(component_index) + ") of OpConstant ID " + to_string(id) + " is not a valid Component index, which must be one of 0, 1, 2, or 3."); } } // Establish sampled image as expression object and assign the sampler to it. void CompilerMSL::emit_sampled_image_op(uint32_t result_type, uint32_t result_id, uint32_t image_id, uint32_t samp_id) { set(result_id, result_type, image_id, samp_id); } string CompilerMSL::to_texture_op(const Instruction &i, bool sparse, bool *forward, SmallVector &inherited_expressions) { auto *ops = stream(i); uint32_t result_type_id = ops[0]; uint32_t img = ops[2]; auto &result_type = get(result_type_id); auto op = static_cast(i.op); bool is_gather = (op == OpImageGather || op == OpImageDrefGather); // Bypass pointers because we need the real image struct auto &type = expression_type(img); auto &imgtype = get(type.self); const MSLConstexprSampler *constexpr_sampler = nullptr; bool is_dynamic_img_sampler = false; if (auto *var = maybe_get_backing_variable(img)) { constexpr_sampler = find_constexpr_sampler(var->basevariable ? var->basevariable : VariableID(var->self)); is_dynamic_img_sampler = has_extended_decoration(var->self, SPIRVCrossDecorationDynamicImageSampler); } string expr; if (constexpr_sampler && constexpr_sampler->ycbcr_conversion_enable && !is_dynamic_img_sampler) { // If this needs sampler Y'CbCr conversion, we need to do some additional // processing. switch (constexpr_sampler->ycbcr_model) { case MSL_SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY: case MSL_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_IDENTITY: // Default break; case MSL_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_BT_709: add_spv_func_and_recompile(SPVFuncImplConvertYCbCrBT709); expr += "spvConvertYCbCrBT709("; break; case MSL_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_BT_601: add_spv_func_and_recompile(SPVFuncImplConvertYCbCrBT601); expr += "spvConvertYCbCrBT601("; break; case MSL_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_BT_2020: add_spv_func_and_recompile(SPVFuncImplConvertYCbCrBT2020); expr += "spvConvertYCbCrBT2020("; break; default: SPIRV_CROSS_THROW("Invalid Y'CbCr model conversion."); } if (constexpr_sampler->ycbcr_model != MSL_SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY) { switch (constexpr_sampler->ycbcr_range) { case MSL_SAMPLER_YCBCR_RANGE_ITU_FULL: add_spv_func_and_recompile(SPVFuncImplExpandITUFullRange); expr += "spvExpandITUFullRange("; break; case MSL_SAMPLER_YCBCR_RANGE_ITU_NARROW: add_spv_func_and_recompile(SPVFuncImplExpandITUNarrowRange); expr += "spvExpandITUNarrowRange("; break; default: SPIRV_CROSS_THROW("Invalid Y'CbCr range."); } } } else if (msl_options.swizzle_texture_samples && !is_gather && is_sampled_image_type(imgtype) && !is_dynamic_img_sampler) { add_spv_func_and_recompile(SPVFuncImplTextureSwizzle); expr += "spvTextureSwizzle("; } string inner_expr = CompilerGLSL::to_texture_op(i, sparse, forward, inherited_expressions); if (constexpr_sampler && constexpr_sampler->ycbcr_conversion_enable && !is_dynamic_img_sampler) { if (!constexpr_sampler->swizzle_is_identity()) { static const char swizzle_names[] = "rgba"; if (!constexpr_sampler->swizzle_has_one_or_zero()) { // If we can, do it inline. expr += inner_expr + "."; for (uint32_t c = 0; c < 4; c++) { switch (constexpr_sampler->swizzle[c]) { case MSL_COMPONENT_SWIZZLE_IDENTITY: expr += swizzle_names[c]; break; case MSL_COMPONENT_SWIZZLE_R: case MSL_COMPONENT_SWIZZLE_G: case MSL_COMPONENT_SWIZZLE_B: case MSL_COMPONENT_SWIZZLE_A: expr += swizzle_names[constexpr_sampler->swizzle[c] - MSL_COMPONENT_SWIZZLE_R]; break; default: SPIRV_CROSS_THROW("Invalid component swizzle."); } } } else { // Otherwise, we need to emit a temporary and swizzle that. uint32_t temp_id = ir.increase_bound_by(1); emit_op(result_type_id, temp_id, inner_expr, false); for (auto &inherit : inherited_expressions) inherit_expression_dependencies(temp_id, inherit); inherited_expressions.clear(); inherited_expressions.push_back(temp_id); switch (op) { case OpImageSampleDrefImplicitLod: case OpImageSampleImplicitLod: case OpImageSampleProjImplicitLod: case OpImageSampleProjDrefImplicitLod: register_control_dependent_expression(temp_id); break; default: break; } expr += type_to_glsl(result_type) + "("; for (uint32_t c = 0; c < 4; c++) { switch (constexpr_sampler->swizzle[c]) { case MSL_COMPONENT_SWIZZLE_IDENTITY: expr += to_expression(temp_id) + "." + swizzle_names[c]; break; case MSL_COMPONENT_SWIZZLE_ZERO: expr += "0"; break; case MSL_COMPONENT_SWIZZLE_ONE: expr += "1"; break; case MSL_COMPONENT_SWIZZLE_R: case MSL_COMPONENT_SWIZZLE_G: case MSL_COMPONENT_SWIZZLE_B: case MSL_COMPONENT_SWIZZLE_A: expr += to_expression(temp_id) + "." + swizzle_names[constexpr_sampler->swizzle[c] - MSL_COMPONENT_SWIZZLE_R]; break; default: SPIRV_CROSS_THROW("Invalid component swizzle."); } if (c < 3) expr += ", "; } expr += ")"; } } else expr += inner_expr; if (constexpr_sampler->ycbcr_model != MSL_SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY) { expr += join(", ", constexpr_sampler->bpc, ")"); if (constexpr_sampler->ycbcr_model != MSL_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_IDENTITY) expr += ")"; } } else { expr += inner_expr; if (msl_options.swizzle_texture_samples && !is_gather && is_sampled_image_type(imgtype) && !is_dynamic_img_sampler) { // Add the swizzle constant from the swizzle buffer. expr += ", " + to_swizzle_expression(img) + ")"; used_swizzle_buffer = true; } } return expr; } static string create_swizzle(MSLComponentSwizzle swizzle) { switch (swizzle) { case MSL_COMPONENT_SWIZZLE_IDENTITY: return "spvSwizzle::none"; case MSL_COMPONENT_SWIZZLE_ZERO: return "spvSwizzle::zero"; case MSL_COMPONENT_SWIZZLE_ONE: return "spvSwizzle::one"; case MSL_COMPONENT_SWIZZLE_R: return "spvSwizzle::red"; case MSL_COMPONENT_SWIZZLE_G: return "spvSwizzle::green"; case MSL_COMPONENT_SWIZZLE_B: return "spvSwizzle::blue"; case MSL_COMPONENT_SWIZZLE_A: return "spvSwizzle::alpha"; default: SPIRV_CROSS_THROW("Invalid component swizzle."); } } // Returns a string representation of the ID, usable as a function arg. // Manufacture automatic sampler arg for SampledImage texture. string CompilerMSL::to_func_call_arg(const SPIRFunction::Parameter &arg, uint32_t id) { string arg_str; auto &type = expression_type(id); bool is_dynamic_img_sampler = has_extended_decoration(arg.id, SPIRVCrossDecorationDynamicImageSampler); // If the argument *itself* is a "dynamic" combined-image sampler, then we can just pass that around. bool arg_is_dynamic_img_sampler = has_extended_decoration(id, SPIRVCrossDecorationDynamicImageSampler); if (is_dynamic_img_sampler && !arg_is_dynamic_img_sampler) arg_str = join("spvDynamicImageSampler<", type_to_glsl(get(type.image.type)), ">("); auto *c = maybe_get(id); if (msl_options.force_native_arrays && c && !get(c->constant_type).array.empty()) { // If we are passing a constant array directly to a function for some reason, // the callee will expect an argument in thread const address space // (since we can only bind to arrays with references in MSL). // To resolve this, we must emit a copy in this address space. // This kind of code gen should be rare enough that performance is not a real concern. // Inline the SPIR-V to avoid this kind of suboptimal codegen. // // We risk calling this inside a continue block (invalid code), // so just create a thread local copy in the current function. arg_str = join("_", id, "_array_copy"); auto &constants = current_function->constant_arrays_needed_on_stack; auto itr = find(begin(constants), end(constants), ID(id)); if (itr == end(constants)) { force_recompile(); constants.push_back(id); } } // Dereference pointer variables where needed. // FIXME: This dereference is actually backwards. We should really just support passing pointer variables between functions. else if (should_dereference(id)) arg_str += dereference_expression(type, CompilerGLSL::to_func_call_arg(arg, id)); else arg_str += CompilerGLSL::to_func_call_arg(arg, id); // Need to check the base variable in case we need to apply a qualified alias. uint32_t var_id = 0; auto *var = maybe_get(id); if (var) var_id = var->basevariable; if (!arg_is_dynamic_img_sampler) { auto *constexpr_sampler = find_constexpr_sampler(var_id ? var_id : id); if (type.basetype == SPIRType::SampledImage) { // Manufacture automatic plane args for multiplanar texture uint32_t planes = 1; if (constexpr_sampler && constexpr_sampler->ycbcr_conversion_enable) { planes = constexpr_sampler->planes; // If this parameter isn't aliasing a global, then we need to use // the special "dynamic image-sampler" class to pass it--and we need // to use it for *every* non-alias parameter, in case a combined // image-sampler with a Y'CbCr conversion is passed. Hopefully, this // pathological case is so rare that it should never be hit in practice. if (!arg.alias_global_variable) add_spv_func_and_recompile(SPVFuncImplDynamicImageSampler); } for (uint32_t i = 1; i < planes; i++) arg_str += join(", ", CompilerGLSL::to_func_call_arg(arg, id), plane_name_suffix, i); // Manufacture automatic sampler arg if the arg is a SampledImage texture. if (type.image.dim != DimBuffer) arg_str += ", " + to_sampler_expression(var_id ? var_id : id); // Add sampler Y'CbCr conversion info if we have it if (is_dynamic_img_sampler && constexpr_sampler && constexpr_sampler->ycbcr_conversion_enable) { SmallVector samp_args; switch (constexpr_sampler->resolution) { case MSL_FORMAT_RESOLUTION_444: // Default break; case MSL_FORMAT_RESOLUTION_422: samp_args.push_back("spvFormatResolution::_422"); break; case MSL_FORMAT_RESOLUTION_420: samp_args.push_back("spvFormatResolution::_420"); break; default: SPIRV_CROSS_THROW("Invalid format resolution."); } if (constexpr_sampler->chroma_filter != MSL_SAMPLER_FILTER_NEAREST) samp_args.push_back("spvChromaFilter::linear"); if (constexpr_sampler->x_chroma_offset != MSL_CHROMA_LOCATION_COSITED_EVEN) samp_args.push_back("spvXChromaLocation::midpoint"); if (constexpr_sampler->y_chroma_offset != MSL_CHROMA_LOCATION_COSITED_EVEN) samp_args.push_back("spvYChromaLocation::midpoint"); switch (constexpr_sampler->ycbcr_model) { case MSL_SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY: // Default break; case MSL_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_IDENTITY: samp_args.push_back("spvYCbCrModelConversion::ycbcr_identity"); break; case MSL_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_BT_709: samp_args.push_back("spvYCbCrModelConversion::ycbcr_bt_709"); break; case MSL_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_BT_601: samp_args.push_back("spvYCbCrModelConversion::ycbcr_bt_601"); break; case MSL_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_BT_2020: samp_args.push_back("spvYCbCrModelConversion::ycbcr_bt_2020"); break; default: SPIRV_CROSS_THROW("Invalid Y'CbCr model conversion."); } if (constexpr_sampler->ycbcr_range != MSL_SAMPLER_YCBCR_RANGE_ITU_FULL) samp_args.push_back("spvYCbCrRange::itu_narrow"); samp_args.push_back(join("spvComponentBits(", constexpr_sampler->bpc, ")")); arg_str += join(", spvYCbCrSampler(", merge(samp_args), ")"); } } if (is_dynamic_img_sampler && constexpr_sampler && constexpr_sampler->ycbcr_conversion_enable) arg_str += join(", (uint(", create_swizzle(constexpr_sampler->swizzle[3]), ") << 24) | (uint(", create_swizzle(constexpr_sampler->swizzle[2]), ") << 16) | (uint(", create_swizzle(constexpr_sampler->swizzle[1]), ") << 8) | uint(", create_swizzle(constexpr_sampler->swizzle[0]), ")"); else if (msl_options.swizzle_texture_samples && has_sampled_images && is_sampled_image_type(type)) arg_str += ", " + to_swizzle_expression(var_id ? var_id : id); if (buffer_requires_array_length(var_id)) arg_str += ", " + to_buffer_size_expression(var_id ? var_id : id); if (is_dynamic_img_sampler) arg_str += ")"; } // Emulate texture2D atomic operations auto *backing_var = maybe_get_backing_variable(var_id); if (backing_var && atomic_image_vars_emulated.count(backing_var->self)) { arg_str += ", " + to_expression(var_id) + "_atomic"; } return arg_str; } // If the ID represents a sampled image that has been assigned a sampler already, // generate an expression for the sampler, otherwise generate a fake sampler name // by appending a suffix to the expression constructed from the ID. string CompilerMSL::to_sampler_expression(uint32_t id) { auto *combined = maybe_get(id); auto expr = to_expression(combined ? combined->image : VariableID(id)); auto index = expr.find_first_of('['); uint32_t samp_id = 0; if (combined) samp_id = combined->sampler; if (index == string::npos) return samp_id ? to_expression(samp_id) : expr + sampler_name_suffix; else { auto image_expr = expr.substr(0, index); auto array_expr = expr.substr(index); return samp_id ? to_expression(samp_id) : (image_expr + sampler_name_suffix + array_expr); } } string CompilerMSL::to_swizzle_expression(uint32_t id) { auto *combined = maybe_get(id); auto expr = to_expression(combined ? combined->image : VariableID(id)); auto index = expr.find_first_of('['); // If an image is part of an argument buffer translate this to a legal identifier. string::size_type period = 0; while ((period = expr.find_first_of('.', period)) != string::npos && period < index) expr[period] = '_'; if (index == string::npos) return expr + swizzle_name_suffix; else { auto image_expr = expr.substr(0, index); auto array_expr = expr.substr(index); return image_expr + swizzle_name_suffix + array_expr; } } string CompilerMSL::to_buffer_size_expression(uint32_t id) { auto expr = to_expression(id); auto index = expr.find_first_of('['); // This is quite crude, but we need to translate the reference name (*spvDescriptorSetN.name) to // the pointer expression spvDescriptorSetN.name to make a reasonable expression here. // This only happens if we have argument buffers and we are using OpArrayLength on a lone SSBO in that set. if (expr.size() >= 3 && expr[0] == '(' && expr[1] == '*') expr = address_of_expression(expr); // If a buffer is part of an argument buffer translate this to a legal identifier. for (auto &c : expr) if (c == '.') c = '_'; if (index == string::npos) return expr + buffer_size_name_suffix; else { auto buffer_expr = expr.substr(0, index); auto array_expr = expr.substr(index); if (auto var = maybe_get_backing_variable(id)) { if (is_var_runtime_size_array(*var)) { if (!msl_options.runtime_array_rich_descriptor) SPIRV_CROSS_THROW("OpArrayLength requires rich descriptor format"); auto last_pos = array_expr.find_last_of(']'); if (last_pos != std::string::npos) return buffer_expr + ".length(" + array_expr.substr(1, last_pos - 1) + ")"; } } return buffer_expr + buffer_size_name_suffix + array_expr; } } // Checks whether the type is a Block all of whose members have DecorationPatch. bool CompilerMSL::is_patch_block(const SPIRType &type) { if (!has_decoration(type.self, DecorationBlock)) return false; for (uint32_t i = 0; i < type.member_types.size(); i++) { if (!has_member_decoration(type.self, i, DecorationPatch)) return false; } return true; } // Checks whether the ID is a row_major matrix that requires conversion before use bool CompilerMSL::is_non_native_row_major_matrix(uint32_t id) { auto *e = maybe_get(id); if (e) return e->need_transpose; else return has_decoration(id, DecorationRowMajor); } // Checks whether the member is a row_major matrix that requires conversion before use bool CompilerMSL::member_is_non_native_row_major_matrix(const SPIRType &type, uint32_t index) { return has_member_decoration(type.self, index, DecorationRowMajor); } string CompilerMSL::convert_row_major_matrix(string exp_str, const SPIRType &exp_type, uint32_t physical_type_id, bool is_packed, bool relaxed) { if (!is_matrix(exp_type)) { return CompilerGLSL::convert_row_major_matrix(std::move(exp_str), exp_type, physical_type_id, is_packed, relaxed); } else { strip_enclosed_expression(exp_str); if (physical_type_id != 0 || is_packed) exp_str = unpack_expression_type(exp_str, exp_type, physical_type_id, is_packed, true); return join("transpose(", exp_str, ")"); } } // Called automatically at the end of the entry point function void CompilerMSL::emit_fixup() { if (is_vertex_like_shader() && stage_out_var_id && !qual_pos_var_name.empty() && !capture_output_to_buffer) { if (options.vertex.fixup_clipspace) statement(qual_pos_var_name, ".z = (", qual_pos_var_name, ".z + ", qual_pos_var_name, ".w) * 0.5; // Adjust clip-space for Metal"); if (options.vertex.flip_vert_y) statement(qual_pos_var_name, ".y = -(", qual_pos_var_name, ".y);", " // Invert Y-axis for Metal"); } } // Return a string defining a structure member, with padding and packing. string CompilerMSL::to_struct_member(const SPIRType &type, uint32_t member_type_id, uint32_t index, const string &qualifier) { uint32_t orig_member_type_id = member_type_id; if (member_is_remapped_physical_type(type, index)) member_type_id = get_extended_member_decoration(type.self, index, SPIRVCrossDecorationPhysicalTypeID); auto &physical_type = get(member_type_id); // If this member is packed, mark it as so. string pack_pfx; // Allow Metal to use the array template to make arrays a value type uint32_t orig_id = 0; if (has_extended_member_decoration(type.self, index, SPIRVCrossDecorationInterfaceOrigID)) orig_id = get_extended_member_decoration(type.self, index, SPIRVCrossDecorationInterfaceOrigID); bool row_major = false; if (is_matrix(physical_type)) row_major = has_member_decoration(type.self, index, DecorationRowMajor); SPIRType row_major_physical_type { OpTypeMatrix }; const SPIRType *declared_type = &physical_type; // If a struct is being declared with physical layout, // do not use array wrappers. // This avoids a lot of complicated cases with packed vectors and matrices, // and generally we cannot copy full arrays in and out of buffers into Function // address space. // Array of resources should also be declared as builtin arrays. if (has_member_decoration(type.self, index, DecorationOffset)) is_using_builtin_array = true; else if (has_extended_member_decoration(type.self, index, SPIRVCrossDecorationResourceIndexPrimary)) is_using_builtin_array = true; if (member_is_packed_physical_type(type, index)) { // If we're packing a matrix, output an appropriate typedef if (physical_type.basetype == SPIRType::Struct) { SPIRV_CROSS_THROW("Cannot emit a packed struct currently."); } else if (is_matrix(physical_type)) { uint32_t rows = physical_type.vecsize; uint32_t cols = physical_type.columns; pack_pfx = "packed_"; if (row_major) { // These are stored transposed. rows = physical_type.columns; cols = physical_type.vecsize; pack_pfx = "packed_rm_"; } string base_type = physical_type.width == 16 ? "half" : "float"; string td_line = "typedef "; td_line += "packed_" + base_type + to_string(rows); td_line += " " + pack_pfx; // Use the actual matrix size here. td_line += base_type + to_string(physical_type.columns) + "x" + to_string(physical_type.vecsize); td_line += "[" + to_string(cols) + "]"; td_line += ";"; add_typedef_line(td_line); } else if (!is_scalar(physical_type)) // scalar type is already packed. pack_pfx = "packed_"; } else if (is_matrix(physical_type)) { if (!msl_options.supports_msl_version(3, 0) && has_extended_decoration(type.self, SPIRVCrossDecorationWorkgroupStruct)) { pack_pfx = "spvStorage_"; add_spv_func_and_recompile(SPVFuncImplStorageMatrix); // The pack prefix causes problems with array wrappers. is_using_builtin_array = true; } if (row_major) { // Need to declare type with flipped vecsize/columns. row_major_physical_type = physical_type; swap(row_major_physical_type.vecsize, row_major_physical_type.columns); declared_type = &row_major_physical_type; } } // iOS Tier 1 argument buffers do not support writable images. if (physical_type.basetype == SPIRType::Image && physical_type.image.sampled == 2 && msl_options.is_ios() && msl_options.argument_buffers_tier <= Options::ArgumentBuffersTier::Tier1 && !has_decoration(orig_id, DecorationNonWritable)) { SPIRV_CROSS_THROW("Writable images are not allowed on Tier1 argument buffers on iOS."); } // Array information is baked into these types. string array_type; if (physical_type.basetype != SPIRType::Image && physical_type.basetype != SPIRType::Sampler && physical_type.basetype != SPIRType::SampledImage) { BuiltIn builtin = BuiltInMax; // Special handling. In [[stage_out]] or [[stage_in]] blocks, // we need flat arrays, but if we're somehow declaring gl_PerVertex for constant array reasons, we want // template array types to be declared. bool is_ib_in_out = ((stage_out_var_id && get_stage_out_struct_type().self == type.self && variable_storage_requires_stage_io(StorageClassOutput)) || (stage_in_var_id && get_stage_in_struct_type().self == type.self && variable_storage_requires_stage_io(StorageClassInput))); if (is_ib_in_out && is_member_builtin(type, index, &builtin)) is_using_builtin_array = true; array_type = type_to_array_glsl(physical_type); } string decl_type; if (declared_type->vecsize > 4) { auto orig_type = get(orig_member_type_id); if (is_matrix(orig_type) && row_major) swap(orig_type.vecsize, orig_type.columns); orig_type.columns = 1; decl_type = type_to_glsl(orig_type, orig_id, true); if (declared_type->columns > 1) decl_type = join("spvPaddedStd140Matrix<", decl_type, ", ", declared_type->columns, ">"); else decl_type = join("spvPaddedStd140<", decl_type, ">"); } else decl_type = type_to_glsl(*declared_type, orig_id, true); auto result = join(pack_pfx, decl_type, " ", qualifier, to_member_name(type, index), member_attribute_qualifier(type, index), array_type, ";"); is_using_builtin_array = false; return result; } // Emit a structure member, padding and packing to maintain the correct memeber alignments. void CompilerMSL::emit_struct_member(const SPIRType &type, uint32_t member_type_id, uint32_t index, const string &qualifier, uint32_t) { // If this member requires padding to maintain its declared offset, emit a dummy padding member before it. if (has_extended_member_decoration(type.self, index, SPIRVCrossDecorationPaddingTarget)) { uint32_t pad_len = get_extended_member_decoration(type.self, index, SPIRVCrossDecorationPaddingTarget); statement("char _m", index, "_pad", "[", pad_len, "];"); } // Handle HLSL-style 0-based vertex/instance index. builtin_declaration = true; statement(to_struct_member(type, member_type_id, index, qualifier)); builtin_declaration = false; } void CompilerMSL::emit_struct_padding_target(const SPIRType &type) { uint32_t struct_size = get_declared_struct_size_msl(type, true, true); uint32_t target_size = get_extended_decoration(type.self, SPIRVCrossDecorationPaddingTarget); if (target_size < struct_size) SPIRV_CROSS_THROW("Cannot pad with negative bytes."); else if (target_size > struct_size) statement("char _m0_final_padding[", target_size - struct_size, "];"); } // Return a MSL qualifier for the specified function attribute member string CompilerMSL::member_attribute_qualifier(const SPIRType &type, uint32_t index) { auto &execution = get_entry_point(); uint32_t mbr_type_id = type.member_types[index]; auto &mbr_type = get(mbr_type_id); BuiltIn builtin = BuiltInMax; bool is_builtin = is_member_builtin(type, index, &builtin); if (has_extended_member_decoration(type.self, index, SPIRVCrossDecorationResourceIndexPrimary)) { string quals = join( " [[id(", get_extended_member_decoration(type.self, index, SPIRVCrossDecorationResourceIndexPrimary), ")"); if (interlocked_resources.count( get_extended_member_decoration(type.self, index, SPIRVCrossDecorationInterfaceOrigID))) quals += ", raster_order_group(0)"; quals += "]]"; return quals; } // Vertex function inputs if (execution.model == ExecutionModelVertex && type.storage == StorageClassInput) { if (is_builtin) { switch (builtin) { case BuiltInVertexId: case BuiltInVertexIndex: case BuiltInBaseVertex: case BuiltInInstanceId: case BuiltInInstanceIndex: case BuiltInBaseInstance: if (msl_options.vertex_for_tessellation) return ""; return string(" [[") + builtin_qualifier(builtin) + "]]"; case BuiltInDrawIndex: SPIRV_CROSS_THROW("DrawIndex is not supported in MSL."); default: return ""; } } uint32_t locn; if (is_builtin) locn = get_or_allocate_builtin_input_member_location(builtin, type.self, index); else locn = get_member_location(type.self, index); if (locn != k_unknown_location) return string(" [[attribute(") + convert_to_string(locn) + ")]]"; } // Vertex and tessellation evaluation function outputs if (((execution.model == ExecutionModelVertex && !msl_options.vertex_for_tessellation) || is_tese_shader()) && type.storage == StorageClassOutput) { if (is_builtin) { switch (builtin) { case BuiltInPointSize: // Only mark the PointSize builtin if really rendering points. // Some shaders may include a PointSize builtin even when used to render // non-point topologies, and Metal will reject this builtin when compiling // the shader into a render pipeline that uses a non-point topology. return msl_options.enable_point_size_builtin ? (string(" [[") + builtin_qualifier(builtin) + "]]") : ""; case BuiltInViewportIndex: if (!msl_options.supports_msl_version(2, 0)) SPIRV_CROSS_THROW("ViewportIndex requires Metal 2.0."); /* fallthrough */ case BuiltInPosition: case BuiltInLayer: return string(" [[") + builtin_qualifier(builtin) + "]]" + (mbr_type.array.empty() ? "" : " "); case BuiltInClipDistance: if (has_member_decoration(type.self, index, DecorationIndex)) return join(" [[user(clip", get_member_decoration(type.self, index, DecorationIndex), ")]]"); else return string(" [[") + builtin_qualifier(builtin) + "]]" + (mbr_type.array.empty() ? "" : " "); case BuiltInCullDistance: if (has_member_decoration(type.self, index, DecorationIndex)) return join(" [[user(cull", get_member_decoration(type.self, index, DecorationIndex), ")]]"); else return string(" [[") + builtin_qualifier(builtin) + "]]" + (mbr_type.array.empty() ? "" : " "); default: return ""; } } string loc_qual = member_location_attribute_qualifier(type, index); if (!loc_qual.empty()) return join(" [[", loc_qual, "]]"); } if (execution.model == ExecutionModelVertex && msl_options.vertex_for_tessellation && type.storage == StorageClassOutput) { // For this type of shader, we always arrange for it to capture its // output to a buffer. For this reason, qualifiers are irrelevant here. if (is_builtin) // We still have to assign a location so the output struct will sort correctly. get_or_allocate_builtin_output_member_location(builtin, type.self, index); return ""; } // Tessellation control function inputs if (is_tesc_shader() && type.storage == StorageClassInput) { if (is_builtin) { switch (builtin) { case BuiltInInvocationId: case BuiltInPrimitiveId: if (msl_options.multi_patch_workgroup) return ""; return string(" [[") + builtin_qualifier(builtin) + "]]" + (mbr_type.array.empty() ? "" : " "); case BuiltInSubgroupLocalInvocationId: // FIXME: Should work in any stage case BuiltInSubgroupSize: // FIXME: Should work in any stage if (msl_options.emulate_subgroups) return ""; return string(" [[") + builtin_qualifier(builtin) + "]]" + (mbr_type.array.empty() ? "" : " "); case BuiltInPatchVertices: return ""; // Others come from stage input. default: break; } } if (msl_options.multi_patch_workgroup) return ""; uint32_t locn; if (is_builtin) locn = get_or_allocate_builtin_input_member_location(builtin, type.self, index); else locn = get_member_location(type.self, index); if (locn != k_unknown_location) return string(" [[attribute(") + convert_to_string(locn) + ")]]"; } // Tessellation control function outputs if (is_tesc_shader() && type.storage == StorageClassOutput) { // For this type of shader, we always arrange for it to capture its // output to a buffer. For this reason, qualifiers are irrelevant here. if (is_builtin) // We still have to assign a location so the output struct will sort correctly. get_or_allocate_builtin_output_member_location(builtin, type.self, index); return ""; } // Tessellation evaluation function inputs if (is_tese_shader() && type.storage == StorageClassInput) { if (is_builtin) { switch (builtin) { case BuiltInPrimitiveId: case BuiltInTessCoord: return string(" [[") + builtin_qualifier(builtin) + "]]"; case BuiltInPatchVertices: return ""; // Others come from stage input. default: break; } } if (msl_options.raw_buffer_tese_input) return ""; // The special control point array must not be marked with an attribute. if (get_type(type.member_types[index]).basetype == SPIRType::ControlPointArray) return ""; uint32_t locn; if (is_builtin) locn = get_or_allocate_builtin_input_member_location(builtin, type.self, index); else locn = get_member_location(type.self, index); if (locn != k_unknown_location) return string(" [[attribute(") + convert_to_string(locn) + ")]]"; } // Tessellation evaluation function outputs were handled above. // Fragment function inputs if (execution.model == ExecutionModelFragment && type.storage == StorageClassInput) { string quals; if (is_builtin) { switch (builtin) { case BuiltInViewIndex: if (!msl_options.multiview || !msl_options.multiview_layered_rendering) break; /* fallthrough */ case BuiltInFrontFacing: case BuiltInPointCoord: case BuiltInFragCoord: case BuiltInSampleId: case BuiltInSampleMask: case BuiltInLayer: case BuiltInBaryCoordKHR: case BuiltInBaryCoordNoPerspKHR: quals = builtin_qualifier(builtin); break; case BuiltInClipDistance: return join(" [[user(clip", get_member_decoration(type.self, index, DecorationIndex), ")]]"); case BuiltInCullDistance: return join(" [[user(cull", get_member_decoration(type.self, index, DecorationIndex), ")]]"); default: break; } } else quals = member_location_attribute_qualifier(type, index); if (builtin == BuiltInBaryCoordKHR || builtin == BuiltInBaryCoordNoPerspKHR) { if (has_member_decoration(type.self, index, DecorationFlat) || has_member_decoration(type.self, index, DecorationCentroid) || has_member_decoration(type.self, index, DecorationSample) || has_member_decoration(type.self, index, DecorationNoPerspective)) { // NoPerspective is baked into the builtin type. SPIRV_CROSS_THROW( "Flat, Centroid, Sample, NoPerspective decorations are not supported for BaryCoord inputs."); } } // Don't bother decorating integers with the 'flat' attribute; it's // the default (in fact, the only option). Also don't bother with the // FragCoord builtin; it's always noperspective on Metal. if (!type_is_integral(mbr_type) && (!is_builtin || builtin != BuiltInFragCoord)) { if (has_member_decoration(type.self, index, DecorationFlat)) { if (!quals.empty()) quals += ", "; quals += "flat"; } else if (has_member_decoration(type.self, index, DecorationCentroid)) { if (!quals.empty()) quals += ", "; if (has_member_decoration(type.self, index, DecorationNoPerspective)) quals += "centroid_no_perspective"; else quals += "centroid_perspective"; } else if (has_member_decoration(type.self, index, DecorationSample)) { if (!quals.empty()) quals += ", "; if (has_member_decoration(type.self, index, DecorationNoPerspective)) quals += "sample_no_perspective"; else quals += "sample_perspective"; } else if (has_member_decoration(type.self, index, DecorationNoPerspective)) { if (!quals.empty()) quals += ", "; quals += "center_no_perspective"; } } if (!quals.empty()) return " [[" + quals + "]]"; } // Fragment function outputs if (execution.model == ExecutionModelFragment && type.storage == StorageClassOutput) { if (is_builtin) { switch (builtin) { case BuiltInFragStencilRefEXT: // Similar to PointSize, only mark FragStencilRef if there's a stencil buffer. // Some shaders may include a FragStencilRef builtin even when used to render // without a stencil attachment, and Metal will reject this builtin // when compiling the shader into a render pipeline that does not set // stencilAttachmentPixelFormat. if (!msl_options.enable_frag_stencil_ref_builtin) return ""; if (!msl_options.supports_msl_version(2, 1)) SPIRV_CROSS_THROW("Stencil export only supported in MSL 2.1 and up."); return string(" [[") + builtin_qualifier(builtin) + "]]"; case BuiltInFragDepth: // Ditto FragDepth. if (!msl_options.enable_frag_depth_builtin) return ""; /* fallthrough */ case BuiltInSampleMask: return string(" [[") + builtin_qualifier(builtin) + "]]"; default: return ""; } } uint32_t locn = get_member_location(type.self, index); // Metal will likely complain about missing color attachments, too. if (locn != k_unknown_location && !(msl_options.enable_frag_output_mask & (1 << locn))) return ""; if (locn != k_unknown_location && has_member_decoration(type.self, index, DecorationIndex)) return join(" [[color(", locn, "), index(", get_member_decoration(type.self, index, DecorationIndex), ")]]"); else if (locn != k_unknown_location) return join(" [[color(", locn, ")]]"); else if (has_member_decoration(type.self, index, DecorationIndex)) return join(" [[index(", get_member_decoration(type.self, index, DecorationIndex), ")]]"); else return ""; } // Compute function inputs if (execution.model == ExecutionModelGLCompute && type.storage == StorageClassInput) { if (is_builtin) { switch (builtin) { case BuiltInNumSubgroups: case BuiltInSubgroupId: case BuiltInSubgroupLocalInvocationId: // FIXME: Should work in any stage case BuiltInSubgroupSize: // FIXME: Should work in any stage if (msl_options.emulate_subgroups) break; /* fallthrough */ case BuiltInGlobalInvocationId: case BuiltInWorkgroupId: case BuiltInNumWorkgroups: case BuiltInLocalInvocationId: case BuiltInLocalInvocationIndex: return string(" [[") + builtin_qualifier(builtin) + "]]"; default: return ""; } } } return ""; } // A user-defined output variable is considered to match an input variable in the subsequent // stage if the two variables are declared with the same Location and Component decoration and // match in type and decoration, except that interpolation decorations are not required to match. // For the purposes of interface matching, variables declared without a Component decoration are // considered to have a Component decoration of zero. string CompilerMSL::member_location_attribute_qualifier(const SPIRType &type, uint32_t index) { string quals; uint32_t comp; uint32_t locn = get_member_location(type.self, index, &comp); if (locn != k_unknown_location) { quals += "user(locn"; quals += convert_to_string(locn); if (comp != k_unknown_component && comp != 0) { quals += "_"; quals += convert_to_string(comp); } quals += ")"; } return quals; } // Returns the location decoration of the member with the specified index in the specified type. // If the location of the member has been explicitly set, that location is used. If not, this // function assumes the members are ordered in their location order, and simply returns the // index as the location. uint32_t CompilerMSL::get_member_location(uint32_t type_id, uint32_t index, uint32_t *comp) const { if (comp) { if (has_member_decoration(type_id, index, DecorationComponent)) *comp = get_member_decoration(type_id, index, DecorationComponent); else *comp = k_unknown_component; } if (has_member_decoration(type_id, index, DecorationLocation)) return get_member_decoration(type_id, index, DecorationLocation); else return k_unknown_location; } uint32_t CompilerMSL::get_or_allocate_builtin_input_member_location(spv::BuiltIn builtin, uint32_t type_id, uint32_t index, uint32_t *comp) { uint32_t loc = get_member_location(type_id, index, comp); if (loc != k_unknown_location) return loc; if (comp) *comp = k_unknown_component; // Late allocation. Find a location which is unused by the application. // This can happen for built-in inputs in tessellation which are mixed and matched with user inputs. auto &mbr_type = get(get(type_id).member_types[index]); uint32_t count = type_to_location_count(mbr_type); loc = 0; const auto location_range_in_use = [this](uint32_t location, uint32_t location_count) -> bool { for (uint32_t i = 0; i < location_count; i++) if (location_inputs_in_use.count(location + i) != 0) return true; return false; }; while (location_range_in_use(loc, count)) loc++; set_member_decoration(type_id, index, DecorationLocation, loc); // Triangle tess level inputs are shared in one packed float4, // mark both builtins as sharing one location. if (!msl_options.raw_buffer_tese_input && is_tessellating_triangles() && (builtin == BuiltInTessLevelInner || builtin == BuiltInTessLevelOuter)) { builtin_to_automatic_input_location[BuiltInTessLevelInner] = loc; builtin_to_automatic_input_location[BuiltInTessLevelOuter] = loc; } else builtin_to_automatic_input_location[builtin] = loc; mark_location_as_used_by_shader(loc, mbr_type, StorageClassInput, true); return loc; } uint32_t CompilerMSL::get_or_allocate_builtin_output_member_location(spv::BuiltIn builtin, uint32_t type_id, uint32_t index, uint32_t *comp) { uint32_t loc = get_member_location(type_id, index, comp); if (loc != k_unknown_location) return loc; loc = 0; if (comp) *comp = k_unknown_component; // Late allocation. Find a location which is unused by the application. // This can happen for built-in outputs in tessellation which are mixed and matched with user inputs. auto &mbr_type = get(get(type_id).member_types[index]); uint32_t count = type_to_location_count(mbr_type); const auto location_range_in_use = [this](uint32_t location, uint32_t location_count) -> bool { for (uint32_t i = 0; i < location_count; i++) if (location_outputs_in_use.count(location + i) != 0) return true; return false; }; while (location_range_in_use(loc, count)) loc++; set_member_decoration(type_id, index, DecorationLocation, loc); // Triangle tess level inputs are shared in one packed float4; // mark both builtins as sharing one location. if (is_tessellating_triangles() && (builtin == BuiltInTessLevelInner || builtin == BuiltInTessLevelOuter)) { builtin_to_automatic_output_location[BuiltInTessLevelInner] = loc; builtin_to_automatic_output_location[BuiltInTessLevelOuter] = loc; } else builtin_to_automatic_output_location[builtin] = loc; mark_location_as_used_by_shader(loc, mbr_type, StorageClassOutput, true); return loc; } // Returns the type declaration for a function, including the // entry type if the current function is the entry point function string CompilerMSL::func_type_decl(SPIRType &type) { // The regular function return type. If not processing the entry point function, that's all we need string return_type = type_to_glsl(type) + type_to_array_glsl(type); if (!processing_entry_point) return return_type; // If an outgoing interface block has been defined, and it should be returned, override the entry point return type bool ep_should_return_output = !get_is_rasterization_disabled(); if (stage_out_var_id && ep_should_return_output) return_type = type_to_glsl(get_stage_out_struct_type()) + type_to_array_glsl(type); // Prepend a entry type, based on the execution model string entry_type; auto &execution = get_entry_point(); switch (execution.model) { case ExecutionModelVertex: if (msl_options.vertex_for_tessellation && !msl_options.supports_msl_version(1, 2)) SPIRV_CROSS_THROW("Tessellation requires Metal 1.2."); entry_type = msl_options.vertex_for_tessellation ? "kernel" : "vertex"; break; case ExecutionModelTessellationEvaluation: if (!msl_options.supports_msl_version(1, 2)) SPIRV_CROSS_THROW("Tessellation requires Metal 1.2."); if (execution.flags.get(ExecutionModeIsolines)) SPIRV_CROSS_THROW("Metal does not support isoline tessellation."); if (msl_options.is_ios()) entry_type = join("[[ patch(", is_tessellating_triangles() ? "triangle" : "quad", ") ]] vertex"); else entry_type = join("[[ patch(", is_tessellating_triangles() ? "triangle" : "quad", ", ", execution.output_vertices, ") ]] vertex"); break; case ExecutionModelFragment: entry_type = uses_explicit_early_fragment_test() ? "[[ early_fragment_tests ]] fragment" : "fragment"; break; case ExecutionModelTessellationControl: if (!msl_options.supports_msl_version(1, 2)) SPIRV_CROSS_THROW("Tessellation requires Metal 1.2."); if (execution.flags.get(ExecutionModeIsolines)) SPIRV_CROSS_THROW("Metal does not support isoline tessellation."); /* fallthrough */ case ExecutionModelGLCompute: case ExecutionModelKernel: entry_type = "kernel"; break; default: entry_type = "unknown"; break; } return entry_type + " " + return_type; } bool CompilerMSL::is_tesc_shader() const { return get_execution_model() == ExecutionModelTessellationControl; } bool CompilerMSL::is_tese_shader() const { return get_execution_model() == ExecutionModelTessellationEvaluation; } bool CompilerMSL::uses_explicit_early_fragment_test() { auto &ep_flags = get_entry_point().flags; return ep_flags.get(ExecutionModeEarlyFragmentTests) || ep_flags.get(ExecutionModePostDepthCoverage); } // In MSL, address space qualifiers are required for all pointer or reference variables string CompilerMSL::get_argument_address_space(const SPIRVariable &argument) { const auto &type = get(argument.basetype); return get_type_address_space(type, argument.self, true); } string CompilerMSL::get_type_address_space(const SPIRType &type, uint32_t id, bool argument) { // This can be called for variable pointer contexts as well, so be very careful about which method we choose. Bitset flags; auto *var = maybe_get(id); if (var && type.basetype == SPIRType::Struct && (has_decoration(type.self, DecorationBlock) || has_decoration(type.self, DecorationBufferBlock))) flags = get_buffer_block_flags(id); else flags = get_decoration_bitset(id); const char *addr_space = nullptr; switch (type.storage) { case StorageClassWorkgroup: addr_space = "threadgroup"; break; case StorageClassStorageBuffer: case StorageClassPhysicalStorageBuffer: { // For arguments from variable pointers, we use the write count deduction, so // we should not assume any constness here. Only for global SSBOs. bool readonly = false; if (!var || has_decoration(type.self, DecorationBlock)) readonly = flags.get(DecorationNonWritable); addr_space = readonly ? "const device" : "device"; break; } case StorageClassUniform: case StorageClassUniformConstant: case StorageClassPushConstant: if (type.basetype == SPIRType::Struct) { bool ssbo = has_decoration(type.self, DecorationBufferBlock); if (ssbo) addr_space = flags.get(DecorationNonWritable) ? "const device" : "device"; else addr_space = "constant"; } else if (!argument) { addr_space = "constant"; } else if (type_is_msl_framebuffer_fetch(type)) { // Subpass inputs are passed around by value. addr_space = ""; } break; case StorageClassFunction: case StorageClassGeneric: break; case StorageClassInput: if (is_tesc_shader() && var && var->basevariable == stage_in_ptr_var_id) addr_space = msl_options.multi_patch_workgroup ? "const device" : "threadgroup"; // Don't pass tessellation levels in the device AS; we load and convert them // to float manually. if (is_tese_shader() && msl_options.raw_buffer_tese_input && var) { bool is_stage_in = var->basevariable == stage_in_ptr_var_id; bool is_patch_stage_in = has_decoration(var->self, DecorationPatch); bool is_builtin = has_decoration(var->self, DecorationBuiltIn); BuiltIn builtin = (BuiltIn)get_decoration(var->self, DecorationBuiltIn); bool is_tess_level = is_builtin && (builtin == BuiltInTessLevelOuter || builtin == BuiltInTessLevelInner); if (is_stage_in || (is_patch_stage_in && !is_tess_level)) addr_space = "const device"; } if (get_execution_model() == ExecutionModelFragment && var && var->basevariable == stage_in_var_id) addr_space = "thread"; break; case StorageClassOutput: if (capture_output_to_buffer) { if (var && type.storage == StorageClassOutput) { bool is_masked = is_stage_output_variable_masked(*var); if (is_masked) { if (is_tessellation_shader()) addr_space = "threadgroup"; else addr_space = "thread"; } else if (variable_decl_is_remapped_storage(*var, StorageClassWorkgroup)) addr_space = "threadgroup"; } if (!addr_space) addr_space = "device"; } break; default: break; } if (!addr_space) { // No address space for plain values. addr_space = type.pointer || (argument && type.basetype == SPIRType::ControlPointArray) ? "thread" : ""; } return join(flags.get(DecorationVolatile) || flags.get(DecorationCoherent) ? "volatile " : "", addr_space); } const char *CompilerMSL::to_restrict(uint32_t id, bool space) { // This can be called for variable pointer contexts as well, so be very careful about which method we choose. Bitset flags; if (ir.ids[id].get_type() == TypeVariable) { uint32_t type_id = expression_type_id(id); auto &type = expression_type(id); if (type.basetype == SPIRType::Struct && (has_decoration(type_id, DecorationBlock) || has_decoration(type_id, DecorationBufferBlock))) flags = get_buffer_block_flags(id); else flags = get_decoration_bitset(id); } else flags = get_decoration_bitset(id); return flags.get(DecorationRestrict) || flags.get(DecorationRestrictPointerEXT) ? (space ? "__restrict " : "__restrict") : ""; } string CompilerMSL::entry_point_arg_stage_in() { string decl; if ((is_tesc_shader() && msl_options.multi_patch_workgroup) || (is_tese_shader() && msl_options.raw_buffer_tese_input)) return decl; // Stage-in structure uint32_t stage_in_id; if (is_tese_shader()) stage_in_id = patch_stage_in_var_id; else stage_in_id = stage_in_var_id; if (stage_in_id) { auto &var = get(stage_in_id); auto &type = get_variable_data_type(var); add_resource_name(var.self); decl = join(type_to_glsl(type), " ", to_name(var.self), " [[stage_in]]"); } return decl; } // Returns true if this input builtin should be a direct parameter on a shader function parameter list, // and false for builtins that should be passed or calculated some other way. bool CompilerMSL::is_direct_input_builtin(BuiltIn bi_type) { switch (bi_type) { // Vertex function in case BuiltInVertexId: case BuiltInVertexIndex: case BuiltInBaseVertex: case BuiltInInstanceId: case BuiltInInstanceIndex: case BuiltInBaseInstance: return get_execution_model() != ExecutionModelVertex || !msl_options.vertex_for_tessellation; // Tess. control function in case BuiltInPosition: case BuiltInPointSize: case BuiltInClipDistance: case BuiltInCullDistance: case BuiltInPatchVertices: return false; case BuiltInInvocationId: case BuiltInPrimitiveId: return !is_tesc_shader() || !msl_options.multi_patch_workgroup; // Tess. evaluation function in case BuiltInTessLevelInner: case BuiltInTessLevelOuter: return false; // Fragment function in case BuiltInSamplePosition: case BuiltInHelperInvocation: case BuiltInBaryCoordKHR: case BuiltInBaryCoordNoPerspKHR: return false; case BuiltInViewIndex: return get_execution_model() == ExecutionModelFragment && msl_options.multiview && msl_options.multiview_layered_rendering; // Compute function in case BuiltInSubgroupId: case BuiltInNumSubgroups: return !msl_options.emulate_subgroups; // Any stage function in case BuiltInDeviceIndex: case BuiltInSubgroupEqMask: case BuiltInSubgroupGeMask: case BuiltInSubgroupGtMask: case BuiltInSubgroupLeMask: case BuiltInSubgroupLtMask: return false; case BuiltInSubgroupSize: if (msl_options.fixed_subgroup_size != 0) return false; /* fallthrough */ case BuiltInSubgroupLocalInvocationId: return !msl_options.emulate_subgroups; default: return true; } } // Returns true if this is a fragment shader that runs per sample, and false otherwise. bool CompilerMSL::is_sample_rate() const { auto &caps = get_declared_capabilities(); return get_execution_model() == ExecutionModelFragment && (msl_options.force_sample_rate_shading || std::find(caps.begin(), caps.end(), CapabilitySampleRateShading) != caps.end() || (msl_options.use_framebuffer_fetch_subpasses && need_subpass_input_ms)); } bool CompilerMSL::is_intersection_query() const { auto &caps = get_declared_capabilities(); return std::find(caps.begin(), caps.end(), CapabilityRayQueryKHR) != caps.end(); } void CompilerMSL::entry_point_args_builtin(string &ep_args) { // Builtin variables SmallVector, 8> active_builtins; ir.for_each_typed_id([&](uint32_t var_id, SPIRVariable &var) { if (var.storage != StorageClassInput) return; auto bi_type = BuiltIn(get_decoration(var_id, DecorationBuiltIn)); // Don't emit SamplePosition as a separate parameter. In the entry // point, we get that by calling get_sample_position() on the sample ID. if (is_builtin_variable(var) && get_variable_data_type(var).basetype != SPIRType::Struct && get_variable_data_type(var).basetype != SPIRType::ControlPointArray) { // If the builtin is not part of the active input builtin set, don't emit it. // Relevant for multiple entry-point modules which might declare unused builtins. if (!active_input_builtins.get(bi_type) || !interface_variable_exists_in_entry_point(var_id)) return; // Remember this variable. We may need to correct its type. active_builtins.push_back(make_pair(&var, bi_type)); if (is_direct_input_builtin(bi_type)) { if (!ep_args.empty()) ep_args += ", "; // Handle HLSL-style 0-based vertex/instance index. builtin_declaration = true; // Handle different MSL gl_TessCoord types. (float2, float3) if (bi_type == BuiltInTessCoord && get_entry_point().flags.get(ExecutionModeQuads)) ep_args += "float2 " + to_expression(var_id) + "In"; else ep_args += builtin_type_decl(bi_type, var_id) + " " + to_expression(var_id); ep_args += string(" [[") + builtin_qualifier(bi_type); if (bi_type == BuiltInSampleMask && get_entry_point().flags.get(ExecutionModePostDepthCoverage)) { if (!msl_options.supports_msl_version(2)) SPIRV_CROSS_THROW("Post-depth coverage requires MSL 2.0."); if (msl_options.is_macos() && !msl_options.supports_msl_version(2, 3)) SPIRV_CROSS_THROW("Post-depth coverage on Mac requires MSL 2.3."); ep_args += ", post_depth_coverage"; } ep_args += "]]"; builtin_declaration = false; } } if (has_extended_decoration(var_id, SPIRVCrossDecorationBuiltInDispatchBase)) { // This is a special implicit builtin, not corresponding to any SPIR-V builtin, // which holds the base that was passed to vkCmdDispatchBase() or vkCmdDrawIndexed(). If it's present, // assume we emitted it for a good reason. assert(msl_options.supports_msl_version(1, 2)); if (!ep_args.empty()) ep_args += ", "; ep_args += type_to_glsl(get_variable_data_type(var)) + " " + to_expression(var_id) + " [[grid_origin]]"; } if (has_extended_decoration(var_id, SPIRVCrossDecorationBuiltInStageInputSize)) { // This is another special implicit builtin, not corresponding to any SPIR-V builtin, // which holds the number of vertices and instances to draw. If it's present, // assume we emitted it for a good reason. assert(msl_options.supports_msl_version(1, 2)); if (!ep_args.empty()) ep_args += ", "; ep_args += type_to_glsl(get_variable_data_type(var)) + " " + to_expression(var_id) + " [[grid_size]]"; } }); // Correct the types of all encountered active builtins. We couldn't do this before // because ensure_correct_builtin_type() may increase the bound, which isn't allowed // while iterating over IDs. for (auto &var : active_builtins) var.first->basetype = ensure_correct_builtin_type(var.first->basetype, var.second); // Handle HLSL-style 0-based vertex/instance index. if (needs_base_vertex_arg == TriState::Yes) ep_args += built_in_func_arg(BuiltInBaseVertex, !ep_args.empty()); if (needs_base_instance_arg == TriState::Yes) ep_args += built_in_func_arg(BuiltInBaseInstance, !ep_args.empty()); if (capture_output_to_buffer) { // Add parameters to hold the indirect draw parameters and the shader output. This has to be handled // specially because it needs to be a pointer, not a reference. if (stage_out_var_id) { if (!ep_args.empty()) ep_args += ", "; ep_args += join("device ", type_to_glsl(get_stage_out_struct_type()), "* ", output_buffer_var_name, " [[buffer(", msl_options.shader_output_buffer_index, ")]]"); } if (is_tesc_shader()) { if (!ep_args.empty()) ep_args += ", "; ep_args += join("constant uint* spvIndirectParams [[buffer(", msl_options.indirect_params_buffer_index, ")]]"); } else if (stage_out_var_id && !(get_execution_model() == ExecutionModelVertex && msl_options.vertex_for_tessellation)) { if (!ep_args.empty()) ep_args += ", "; ep_args += join("device uint* spvIndirectParams [[buffer(", msl_options.indirect_params_buffer_index, ")]]"); } if (get_execution_model() == ExecutionModelVertex && msl_options.vertex_for_tessellation && (active_input_builtins.get(BuiltInVertexIndex) || active_input_builtins.get(BuiltInVertexId)) && msl_options.vertex_index_type != Options::IndexType::None) { // Add the index buffer so we can set gl_VertexIndex correctly. if (!ep_args.empty()) ep_args += ", "; switch (msl_options.vertex_index_type) { case Options::IndexType::None: break; case Options::IndexType::UInt16: ep_args += join("const device ushort* ", index_buffer_var_name, " [[buffer(", msl_options.shader_index_buffer_index, ")]]"); break; case Options::IndexType::UInt32: ep_args += join("const device uint* ", index_buffer_var_name, " [[buffer(", msl_options.shader_index_buffer_index, ")]]"); break; } } // Tessellation control shaders get three additional parameters: // a buffer to hold the per-patch data, a buffer to hold the per-patch // tessellation levels, and a block of workgroup memory to hold the // input control point data. if (is_tesc_shader()) { if (patch_stage_out_var_id) { if (!ep_args.empty()) ep_args += ", "; ep_args += join("device ", type_to_glsl(get_patch_stage_out_struct_type()), "* ", patch_output_buffer_var_name, " [[buffer(", convert_to_string(msl_options.shader_patch_output_buffer_index), ")]]"); } if (!ep_args.empty()) ep_args += ", "; ep_args += join("device ", get_tess_factor_struct_name(), "* ", tess_factor_buffer_var_name, " [[buffer(", convert_to_string(msl_options.shader_tess_factor_buffer_index), ")]]"); // Initializer for tess factors must be handled specially since it's never declared as a normal variable. uint32_t outer_factor_initializer_id = 0; uint32_t inner_factor_initializer_id = 0; ir.for_each_typed_id([&](uint32_t, SPIRVariable &var) { if (!has_decoration(var.self, DecorationBuiltIn) || var.storage != StorageClassOutput || !var.initializer) return; BuiltIn builtin = BuiltIn(get_decoration(var.self, DecorationBuiltIn)); if (builtin == BuiltInTessLevelInner) inner_factor_initializer_id = var.initializer; else if (builtin == BuiltInTessLevelOuter) outer_factor_initializer_id = var.initializer; }); const SPIRConstant *c = nullptr; if (outer_factor_initializer_id && (c = maybe_get(outer_factor_initializer_id))) { auto &entry_func = get(ir.default_entry_point); entry_func.fixup_hooks_in.push_back( [=]() { uint32_t components = is_tessellating_triangles() ? 3 : 4; for (uint32_t i = 0; i < components; i++) { statement(builtin_to_glsl(BuiltInTessLevelOuter, StorageClassOutput), "[", i, "] = ", "half(", to_expression(c->subconstants[i]), ");"); } }); } if (inner_factor_initializer_id && (c = maybe_get(inner_factor_initializer_id))) { auto &entry_func = get(ir.default_entry_point); if (is_tessellating_triangles()) { entry_func.fixup_hooks_in.push_back([=]() { statement(builtin_to_glsl(BuiltInTessLevelInner, StorageClassOutput), " = ", "half(", to_expression(c->subconstants[0]), ");"); }); } else { entry_func.fixup_hooks_in.push_back([=]() { for (uint32_t i = 0; i < 2; i++) { statement(builtin_to_glsl(BuiltInTessLevelInner, StorageClassOutput), "[", i, "] = ", "half(", to_expression(c->subconstants[i]), ");"); } }); } } if (stage_in_var_id) { if (!ep_args.empty()) ep_args += ", "; if (msl_options.multi_patch_workgroup) { ep_args += join("device ", type_to_glsl(get_stage_in_struct_type()), "* ", input_buffer_var_name, " [[buffer(", convert_to_string(msl_options.shader_input_buffer_index), ")]]"); } else { ep_args += join("threadgroup ", type_to_glsl(get_stage_in_struct_type()), "* ", input_wg_var_name, " [[threadgroup(", convert_to_string(msl_options.shader_input_wg_index), ")]]"); } } } } // Tessellation evaluation shaders get three additional parameters: // a buffer for the per-patch data, a buffer for the per-patch // tessellation levels, and a buffer for the control point data. if (is_tese_shader() && msl_options.raw_buffer_tese_input) { if (patch_stage_in_var_id) { if (!ep_args.empty()) ep_args += ", "; ep_args += join("const device ", type_to_glsl(get_patch_stage_in_struct_type()), "* ", patch_input_buffer_var_name, " [[buffer(", convert_to_string(msl_options.shader_patch_input_buffer_index), ")]]"); } if (tess_level_inner_var_id || tess_level_outer_var_id) { if (!ep_args.empty()) ep_args += ", "; ep_args += join("const device ", get_tess_factor_struct_name(), "* ", tess_factor_buffer_var_name, " [[buffer(", convert_to_string(msl_options.shader_tess_factor_buffer_index), ")]]"); } if (stage_in_var_id) { if (!ep_args.empty()) ep_args += ", "; ep_args += join("const device ", type_to_glsl(get_stage_in_struct_type()), "* ", input_buffer_var_name, " [[buffer(", convert_to_string(msl_options.shader_input_buffer_index), ")]]"); } } } string CompilerMSL::entry_point_args_argument_buffer(bool append_comma) { string ep_args = entry_point_arg_stage_in(); Bitset claimed_bindings; for (uint32_t i = 0; i < kMaxArgumentBuffers; i++) { uint32_t id = argument_buffer_ids[i]; if (id == 0) continue; add_resource_name(id); auto &var = get(id); auto &type = get_variable_data_type(var); if (!ep_args.empty()) ep_args += ", "; // Check if the argument buffer binding itself has been remapped. uint32_t buffer_binding; auto itr = resource_bindings.find({ get_entry_point().model, i, kArgumentBufferBinding }); if (itr != end(resource_bindings)) { buffer_binding = itr->second.first.msl_buffer; itr->second.second = true; } else { // As a fallback, directly map desc set <-> binding. // If that was taken, take the next buffer binding. if (claimed_bindings.get(i)) buffer_binding = next_metal_resource_index_buffer; else buffer_binding = i; } claimed_bindings.set(buffer_binding); ep_args += get_argument_address_space(var) + " " + type_to_glsl(type) + "& " + to_restrict(id, true) + to_name(id); ep_args += " [[buffer(" + convert_to_string(buffer_binding) + ")]]"; next_metal_resource_index_buffer = max(next_metal_resource_index_buffer, buffer_binding + 1); } entry_point_args_discrete_descriptors(ep_args); entry_point_args_builtin(ep_args); if (!ep_args.empty() && append_comma) ep_args += ", "; return ep_args; } const MSLConstexprSampler *CompilerMSL::find_constexpr_sampler(uint32_t id) const { // Try by ID. { auto itr = constexpr_samplers_by_id.find(id); if (itr != end(constexpr_samplers_by_id)) return &itr->second; } // Try by binding. { uint32_t desc_set = get_decoration(id, DecorationDescriptorSet); uint32_t binding = get_decoration(id, DecorationBinding); auto itr = constexpr_samplers_by_binding.find({ desc_set, binding }); if (itr != end(constexpr_samplers_by_binding)) return &itr->second; } return nullptr; } void CompilerMSL::entry_point_args_discrete_descriptors(string &ep_args) { // Output resources, sorted by resource index & type // We need to sort to work around a bug on macOS 10.13 with NVidia drivers where switching between shaders // with different order of buffers can result in issues with buffer assignments inside the driver. struct Resource { SPIRVariable *var; SPIRVariable *descriptor_alias; string name; SPIRType::BaseType basetype; uint32_t index; uint32_t plane; uint32_t secondary_index; }; SmallVector resources; entry_point_bindings.clear(); ir.for_each_typed_id([&](uint32_t var_id, SPIRVariable &var) { if ((var.storage == StorageClassUniform || var.storage == StorageClassUniformConstant || var.storage == StorageClassPushConstant || var.storage == StorageClassStorageBuffer) && !is_hidden_variable(var)) { auto &type = get_variable_data_type(var); if (is_supported_argument_buffer_type(type) && var.storage != StorageClassPushConstant) { uint32_t desc_set = get_decoration(var_id, DecorationDescriptorSet); if (descriptor_set_is_argument_buffer(desc_set)) return; } // Handle descriptor aliasing. We can handle aliasing of buffers by casting pointers, // but not for typed resources. SPIRVariable *descriptor_alias = nullptr; if (var.storage == StorageClassUniform || var.storage == StorageClassStorageBuffer) { for (auto &resource : resources) { if (get_decoration(resource.var->self, DecorationDescriptorSet) == get_decoration(var_id, DecorationDescriptorSet) && get_decoration(resource.var->self, DecorationBinding) == get_decoration(var_id, DecorationBinding) && resource.basetype == SPIRType::Struct && type.basetype == SPIRType::Struct && (resource.var->storage == StorageClassUniform || resource.var->storage == StorageClassStorageBuffer)) { descriptor_alias = resource.var; // Self-reference marks that we should declare the resource, // and it's being used as an alias (so we can emit void* instead). resource.descriptor_alias = resource.var; // Need to promote interlocked usage so that the primary declaration is correct. if (interlocked_resources.count(var_id)) interlocked_resources.insert(resource.var->self); break; } } } const MSLConstexprSampler *constexpr_sampler = nullptr; if (type.basetype == SPIRType::SampledImage || type.basetype == SPIRType::Sampler) { constexpr_sampler = find_constexpr_sampler(var_id); if (constexpr_sampler) { // Mark this ID as a constexpr sampler for later in case it came from set/bindings. constexpr_samplers_by_id[var_id] = *constexpr_sampler; } } // Emulate texture2D atomic operations uint32_t secondary_index = 0; if (atomic_image_vars_emulated.count(var.self)) { secondary_index = get_metal_resource_index(var, SPIRType::AtomicCounter, 0); } if (type.basetype == SPIRType::SampledImage) { add_resource_name(var_id); uint32_t plane_count = 1; if (constexpr_sampler && constexpr_sampler->ycbcr_conversion_enable) plane_count = constexpr_sampler->planes; entry_point_bindings.push_back(&var); for (uint32_t i = 0; i < plane_count; i++) resources.push_back({ &var, descriptor_alias, to_name(var_id), SPIRType::Image, get_metal_resource_index(var, SPIRType::Image, i), i, secondary_index }); if (type.image.dim != DimBuffer && !constexpr_sampler) { resources.push_back({ &var, descriptor_alias, to_sampler_expression(var_id), SPIRType::Sampler, get_metal_resource_index(var, SPIRType::Sampler), 0, 0 }); } } else if (!constexpr_sampler) { // constexpr samplers are not declared as resources. add_resource_name(var_id); // Don't allocate resource indices for aliases. uint32_t resource_index = ~0u; if (!descriptor_alias) resource_index = get_metal_resource_index(var, type.basetype); entry_point_bindings.push_back(&var); resources.push_back({ &var, descriptor_alias, to_name(var_id), type.basetype, resource_index, 0, secondary_index }); } } }); stable_sort(resources.begin(), resources.end(), [](const Resource &lhs, const Resource &rhs) { return tie(lhs.basetype, lhs.index) < tie(rhs.basetype, rhs.index); }); for (auto &r : resources) { auto &var = *r.var; auto &type = get_variable_data_type(var); uint32_t var_id = var.self; switch (r.basetype) { case SPIRType::Struct: { auto &m = ir.meta[type.self]; if (m.members.size() == 0) break; if (r.descriptor_alias) { if (r.var == r.descriptor_alias) { auto primary_name = join("spvBufferAliasSet", get_decoration(var_id, DecorationDescriptorSet), "Binding", get_decoration(var_id, DecorationBinding)); // Declare the primary alias as void* if (!ep_args.empty()) ep_args += ", "; ep_args += get_argument_address_space(var) + " void* " + primary_name; ep_args += " [[buffer(" + convert_to_string(r.index) + ")"; if (interlocked_resources.count(var_id)) ep_args += ", raster_order_group(0)"; ep_args += "]]"; } buffer_aliases_discrete.push_back(r.var->self); } else if (!type.array.empty()) { if (type.array.size() > 1) SPIRV_CROSS_THROW("Arrays of arrays of buffers are not supported."); is_using_builtin_array = true; if (is_var_runtime_size_array(var)) { add_spv_func_and_recompile(SPVFuncImplVariableDescriptorArray); if (!ep_args.empty()) ep_args += ", "; const bool ssbo = has_decoration(type.self, DecorationBufferBlock); if ((var.storage == spv::StorageClassStorageBuffer || ssbo) && msl_options.runtime_array_rich_descriptor) { add_spv_func_and_recompile(SPVFuncImplVariableSizedDescriptor); ep_args += "const device spvBufferDescriptor<" + get_argument_address_space(var) + " " + type_to_glsl(type) + "*>* "; } else { ep_args += "const device spvDescriptor<" + get_argument_address_space(var) + " " + type_to_glsl(type) + "*>* "; } ep_args += to_restrict(var_id, true) + r.name + "_"; ep_args += " [[buffer(" + convert_to_string(r.index) + ")"; if (interlocked_resources.count(var_id)) ep_args += ", raster_order_group(0)"; ep_args += "]]"; } else { uint32_t array_size = get_resource_array_size(type, var_id); for (uint32_t i = 0; i < array_size; ++i) { if (!ep_args.empty()) ep_args += ", "; ep_args += get_argument_address_space(var) + " " + type_to_glsl(type) + "* " + to_restrict(var_id, true) + r.name + "_" + convert_to_string(i); ep_args += " [[buffer(" + convert_to_string(r.index + i) + ")"; if (interlocked_resources.count(var_id)) ep_args += ", raster_order_group(0)"; ep_args += "]]"; } } is_using_builtin_array = false; } else { if (!ep_args.empty()) ep_args += ", "; ep_args += get_argument_address_space(var) + " "; if (recursive_inputs.count(type.self)) ep_args += string("void* ") + to_restrict(var_id, true) + r.name + "_vp"; else ep_args += type_to_glsl(type) + "& " + to_restrict(var_id, true) + r.name; ep_args += " [[buffer(" + convert_to_string(r.index) + ")"; if (interlocked_resources.count(var_id)) ep_args += ", raster_order_group(0)"; ep_args += "]]"; } break; } case SPIRType::Sampler: if (!ep_args.empty()) ep_args += ", "; ep_args += sampler_type(type, var_id) + " " + r.name; if (is_var_runtime_size_array(var)) ep_args += "_ [[buffer(" + convert_to_string(r.index) + ")]]"; else ep_args += " [[sampler(" + convert_to_string(r.index) + ")]]"; break; case SPIRType::Image: { if (!ep_args.empty()) ep_args += ", "; // Use Metal's native frame-buffer fetch API for subpass inputs. const auto &basetype = get(var.basetype); if (!type_is_msl_framebuffer_fetch(basetype)) { ep_args += image_type_glsl(type, var_id) + " " + r.name; if (r.plane > 0) ep_args += join(plane_name_suffix, r.plane); if (is_var_runtime_size_array(var)) ep_args += "_ [[buffer(" + convert_to_string(r.index) + ")"; else ep_args += " [[texture(" + convert_to_string(r.index) + ")"; if (interlocked_resources.count(var_id)) ep_args += ", raster_order_group(0)"; ep_args += "]]"; } else { if (msl_options.is_macos() && !msl_options.supports_msl_version(2, 3)) SPIRV_CROSS_THROW("Framebuffer fetch on Mac is not supported before MSL 2.3."); ep_args += image_type_glsl(type, var_id) + " " + r.name; ep_args += " [[color(" + convert_to_string(r.index) + ")]]"; } // Emulate texture2D atomic operations if (atomic_image_vars_emulated.count(var.self)) { ep_args += ", device atomic_" + type_to_glsl(get(basetype.image.type), 0); ep_args += "* " + r.name + "_atomic"; ep_args += " [[buffer(" + convert_to_string(r.secondary_index) + ")"; if (interlocked_resources.count(var_id)) ep_args += ", raster_order_group(0)"; ep_args += "]]"; } break; } case SPIRType::AccelerationStructure: { if (is_var_runtime_size_array(var)) { add_spv_func_and_recompile(SPVFuncImplVariableDescriptor); const auto &parent_type = get(type.parent_type); if (!ep_args.empty()) ep_args += ", "; ep_args += "const device spvDescriptor<" + type_to_glsl(parent_type) + ">* " + to_restrict(var_id, true) + r.name + "_"; ep_args += " [[buffer(" + convert_to_string(r.index) + ")]]"; } else { if (!ep_args.empty()) ep_args += ", "; ep_args += type_to_glsl(type, var_id) + " " + r.name; ep_args += " [[buffer(" + convert_to_string(r.index) + ")]]"; } break; } default: if (!ep_args.empty()) ep_args += ", "; if (!type.pointer) ep_args += get_type_address_space(get(var.basetype), var_id) + " " + type_to_glsl(type, var_id) + "& " + r.name; else ep_args += type_to_glsl(type, var_id) + " " + r.name; ep_args += " [[buffer(" + convert_to_string(r.index) + ")"; if (interlocked_resources.count(var_id)) ep_args += ", raster_order_group(0)"; ep_args += "]]"; break; } } } // Returns a string containing a comma-delimited list of args for the entry point function // This is the "classic" method of MSL 1 when we don't have argument buffer support. string CompilerMSL::entry_point_args_classic(bool append_comma) { string ep_args = entry_point_arg_stage_in(); entry_point_args_discrete_descriptors(ep_args); entry_point_args_builtin(ep_args); if (!ep_args.empty() && append_comma) ep_args += ", "; return ep_args; } void CompilerMSL::fix_up_shader_inputs_outputs() { auto &entry_func = this->get(ir.default_entry_point); // Emit a guard to ensure we don't execute beyond the last vertex. // Vertex shaders shouldn't have the problems with barriers in non-uniform control flow that // tessellation control shaders do, so early returns should be OK. We may need to revisit this // if it ever becomes possible to use barriers from a vertex shader. if (get_execution_model() == ExecutionModelVertex && msl_options.vertex_for_tessellation) { entry_func.fixup_hooks_in.push_back([this]() { statement("if (any(", to_expression(builtin_invocation_id_id), " >= ", to_expression(builtin_stage_input_size_id), "))"); statement(" return;"); }); } // Look for sampled images and buffer. Add hooks to set up the swizzle constants or array lengths. ir.for_each_typed_id([&](uint32_t, SPIRVariable &var) { auto &type = get_variable_data_type(var); uint32_t var_id = var.self; bool ssbo = has_decoration(type.self, DecorationBufferBlock); if (var.storage == StorageClassUniformConstant && !is_hidden_variable(var)) { if (msl_options.swizzle_texture_samples && has_sampled_images && is_sampled_image_type(type)) { entry_func.fixup_hooks_in.push_back([this, &type, &var, var_id]() { bool is_array_type = !type.array.empty(); uint32_t desc_set = get_decoration(var_id, DecorationDescriptorSet); if (descriptor_set_is_argument_buffer(desc_set)) { statement("constant uint", is_array_type ? "* " : "& ", to_swizzle_expression(var_id), is_array_type ? " = &" : " = ", to_name(argument_buffer_ids[desc_set]), ".spvSwizzleConstants", "[", convert_to_string(get_metal_resource_index(var, SPIRType::Image)), "];"); } else { // If we have an array of images, we need to be able to index into it, so take a pointer instead. statement("constant uint", is_array_type ? "* " : "& ", to_swizzle_expression(var_id), is_array_type ? " = &" : " = ", to_name(swizzle_buffer_id), "[", convert_to_string(get_metal_resource_index(var, SPIRType::Image)), "];"); } }); } } else if ((var.storage == StorageClassStorageBuffer || (var.storage == StorageClassUniform && ssbo)) && !is_hidden_variable(var)) { if (buffer_requires_array_length(var.self)) { entry_func.fixup_hooks_in.push_back( [this, &type, &var, var_id]() { bool is_array_type = !type.array.empty() && !is_var_runtime_size_array(var); uint32_t desc_set = get_decoration(var_id, DecorationDescriptorSet); if (descriptor_set_is_argument_buffer(desc_set)) { statement("constant uint", is_array_type ? "* " : "& ", to_buffer_size_expression(var_id), is_array_type ? " = &" : " = ", to_name(argument_buffer_ids[desc_set]), ".spvBufferSizeConstants", "[", convert_to_string(get_metal_resource_index(var, SPIRType::Image)), "];"); } else { // If we have an array of images, we need to be able to index into it, so take a pointer instead. statement("constant uint", is_array_type ? "* " : "& ", to_buffer_size_expression(var_id), is_array_type ? " = &" : " = ", to_name(buffer_size_buffer_id), "[", convert_to_string(get_metal_resource_index(var, type.basetype)), "];"); } }); } } if (msl_options.replace_recursive_inputs && type_contains_recursion(type) && (var.storage == StorageClassUniform || var.storage == StorageClassUniformConstant || var.storage == StorageClassPushConstant || var.storage == StorageClassStorageBuffer)) { recursive_inputs.insert(type.self); entry_func.fixup_hooks_in.push_back([this, &type, &var, var_id]() { auto addr_space = get_argument_address_space(var); auto var_name = to_name(var_id); statement(addr_space, " auto& ", to_restrict(var_id, true), var_name, " = *(", addr_space, " ", type_to_glsl(type), "*)", var_name, "_vp;"); }); } }); // Builtin variables ir.for_each_typed_id([this, &entry_func](uint32_t, SPIRVariable &var) { uint32_t var_id = var.self; BuiltIn bi_type = ir.meta[var_id].decoration.builtin_type; if (var.storage != StorageClassInput && var.storage != StorageClassOutput) return; if (!interface_variable_exists_in_entry_point(var.self)) return; if (var.storage == StorageClassInput && is_builtin_variable(var) && active_input_builtins.get(bi_type)) { switch (bi_type) { case BuiltInSamplePosition: entry_func.fixup_hooks_in.push_back([=]() { statement(builtin_type_decl(bi_type), " ", to_expression(var_id), " = get_sample_position(", to_expression(builtin_sample_id_id), ");"); }); break; case BuiltInFragCoord: if (is_sample_rate()) { entry_func.fixup_hooks_in.push_back([=]() { statement(to_expression(var_id), ".xy += get_sample_position(", to_expression(builtin_sample_id_id), ") - 0.5;"); }); } break; case BuiltInInvocationId: // This is direct-mapped without multi-patch workgroups. if (!is_tesc_shader() || !msl_options.multi_patch_workgroup) break; entry_func.fixup_hooks_in.push_back([=]() { statement(builtin_type_decl(bi_type), " ", to_expression(var_id), " = ", to_expression(builtin_invocation_id_id), ".x % ", this->get_entry_point().output_vertices, ";"); }); break; case BuiltInPrimitiveId: // This is natively supported by fragment and tessellation evaluation shaders. // In tessellation control shaders, this is direct-mapped without multi-patch workgroups. if (!is_tesc_shader() || !msl_options.multi_patch_workgroup) break; entry_func.fixup_hooks_in.push_back([=]() { statement(builtin_type_decl(bi_type), " ", to_expression(var_id), " = min(", to_expression(builtin_invocation_id_id), ".x / ", this->get_entry_point().output_vertices, ", spvIndirectParams[1] - 1);"); }); break; case BuiltInPatchVertices: if (is_tese_shader()) { if (msl_options.raw_buffer_tese_input) { entry_func.fixup_hooks_in.push_back( [=]() { statement(builtin_type_decl(bi_type), " ", to_expression(var_id), " = ", get_entry_point().output_vertices, ";"); }); } else { entry_func.fixup_hooks_in.push_back( [=]() { statement(builtin_type_decl(bi_type), " ", to_expression(var_id), " = ", to_expression(patch_stage_in_var_id), ".gl_in.size();"); }); } } else { entry_func.fixup_hooks_in.push_back([=]() { statement(builtin_type_decl(bi_type), " ", to_expression(var_id), " = spvIndirectParams[0];"); }); } break; case BuiltInTessCoord: if (get_entry_point().flags.get(ExecutionModeQuads)) { // The entry point will only have a float2 TessCoord variable. // Pad to float3. entry_func.fixup_hooks_in.push_back([=]() { auto name = builtin_to_glsl(BuiltInTessCoord, StorageClassInput); statement("float3 " + name + " = float3(" + name + "In.x, " + name + "In.y, 0.0);"); }); } // Emit a fixup to account for the shifted domain. Don't do this for triangles; // MoltenVK will just reverse the winding order instead. if (msl_options.tess_domain_origin_lower_left && !is_tessellating_triangles()) { string tc = to_expression(var_id); entry_func.fixup_hooks_in.push_back([=]() { statement(tc, ".y = 1.0 - ", tc, ".y;"); }); } break; case BuiltInSubgroupId: if (!msl_options.emulate_subgroups) break; // For subgroup emulation, this is the same as the local invocation index. entry_func.fixup_hooks_in.push_back([=]() { statement(builtin_type_decl(bi_type), " ", to_expression(var_id), " = ", to_expression(builtin_local_invocation_index_id), ";"); }); break; case BuiltInNumSubgroups: if (!msl_options.emulate_subgroups) break; // For subgroup emulation, this is the same as the workgroup size. entry_func.fixup_hooks_in.push_back([=]() { auto &type = expression_type(builtin_workgroup_size_id); string size_expr = to_expression(builtin_workgroup_size_id); if (type.vecsize >= 3) size_expr = join(size_expr, ".x * ", size_expr, ".y * ", size_expr, ".z"); else if (type.vecsize == 2) size_expr = join(size_expr, ".x * ", size_expr, ".y"); statement(builtin_type_decl(bi_type), " ", to_expression(var_id), " = ", size_expr, ";"); }); break; case BuiltInSubgroupLocalInvocationId: if (!msl_options.emulate_subgroups) break; // For subgroup emulation, assume subgroups of size 1. entry_func.fixup_hooks_in.push_back( [=]() { statement(builtin_type_decl(bi_type), " ", to_expression(var_id), " = 0;"); }); break; case BuiltInSubgroupSize: if (msl_options.emulate_subgroups) { // For subgroup emulation, assume subgroups of size 1. entry_func.fixup_hooks_in.push_back( [=]() { statement(builtin_type_decl(bi_type), " ", to_expression(var_id), " = 1;"); }); } else if (msl_options.fixed_subgroup_size != 0) { entry_func.fixup_hooks_in.push_back([=]() { statement(builtin_type_decl(bi_type), " ", to_expression(var_id), " = ", msl_options.fixed_subgroup_size, ";"); }); } break; case BuiltInSubgroupEqMask: if (msl_options.is_ios() && !msl_options.supports_msl_version(2, 2)) SPIRV_CROSS_THROW("Subgroup ballot functionality requires Metal 2.2 on iOS."); if (!msl_options.supports_msl_version(2, 1)) SPIRV_CROSS_THROW("Subgroup ballot functionality requires Metal 2.1."); entry_func.fixup_hooks_in.push_back([=]() { if (msl_options.is_ios()) { statement(builtin_type_decl(bi_type), " ", to_expression(var_id), " = ", "uint4(1 << ", to_expression(builtin_subgroup_invocation_id_id), ", uint3(0));"); } else { statement(builtin_type_decl(bi_type), " ", to_expression(var_id), " = ", to_expression(builtin_subgroup_invocation_id_id), " >= 32 ? uint4(0, (1 << (", to_expression(builtin_subgroup_invocation_id_id), " - 32)), uint2(0)) : uint4(1 << ", to_expression(builtin_subgroup_invocation_id_id), ", uint3(0));"); } }); break; case BuiltInSubgroupGeMask: if (msl_options.is_ios() && !msl_options.supports_msl_version(2, 2)) SPIRV_CROSS_THROW("Subgroup ballot functionality requires Metal 2.2 on iOS."); if (!msl_options.supports_msl_version(2, 1)) SPIRV_CROSS_THROW("Subgroup ballot functionality requires Metal 2.1."); if (msl_options.fixed_subgroup_size != 0) add_spv_func_and_recompile(SPVFuncImplSubgroupBallot); entry_func.fixup_hooks_in.push_back([=]() { // Case where index < 32, size < 32: // mask0 = bfi(0, 0xFFFFFFFF, index, size - index); // mask1 = bfi(0, 0xFFFFFFFF, 0, 0); // Gives 0 // Case where index < 32 but size >= 32: // mask0 = bfi(0, 0xFFFFFFFF, index, 32 - index); // mask1 = bfi(0, 0xFFFFFFFF, 0, size - 32); // Case where index >= 32: // mask0 = bfi(0, 0xFFFFFFFF, 32, 0); // Gives 0 // mask1 = bfi(0, 0xFFFFFFFF, index - 32, size - index); // This is expressed without branches to avoid divergent // control flow--hence the complicated min/max expressions. // This is further complicated by the fact that if you attempt // to bfi/bfe out-of-bounds on Metal, undefined behavior is the // result. if (msl_options.fixed_subgroup_size > 32) { // Don't use the subgroup size variable with fixed subgroup sizes, // since the variables could be defined in the wrong order. statement(builtin_type_decl(bi_type), " ", to_expression(var_id), " = uint4(insert_bits(0u, 0xFFFFFFFF, min(", to_expression(builtin_subgroup_invocation_id_id), ", 32u), (uint)max(32 - (int)", to_expression(builtin_subgroup_invocation_id_id), ", 0)), insert_bits(0u, 0xFFFFFFFF," " (uint)max((int)", to_expression(builtin_subgroup_invocation_id_id), " - 32, 0), ", msl_options.fixed_subgroup_size, " - max(", to_expression(builtin_subgroup_invocation_id_id), ", 32u)), uint2(0));"); } else if (msl_options.fixed_subgroup_size != 0) { statement(builtin_type_decl(bi_type), " ", to_expression(var_id), " = uint4(insert_bits(0u, 0xFFFFFFFF, ", to_expression(builtin_subgroup_invocation_id_id), ", ", msl_options.fixed_subgroup_size, " - ", to_expression(builtin_subgroup_invocation_id_id), "), uint3(0));"); } else if (msl_options.is_ios()) { // On iOS, the SIMD-group size will currently never exceed 32. statement(builtin_type_decl(bi_type), " ", to_expression(var_id), " = uint4(insert_bits(0u, 0xFFFFFFFF, ", to_expression(builtin_subgroup_invocation_id_id), ", ", to_expression(builtin_subgroup_size_id), " - ", to_expression(builtin_subgroup_invocation_id_id), "), uint3(0));"); } else { statement(builtin_type_decl(bi_type), " ", to_expression(var_id), " = uint4(insert_bits(0u, 0xFFFFFFFF, min(", to_expression(builtin_subgroup_invocation_id_id), ", 32u), (uint)max(min((int)", to_expression(builtin_subgroup_size_id), ", 32) - (int)", to_expression(builtin_subgroup_invocation_id_id), ", 0)), insert_bits(0u, 0xFFFFFFFF, (uint)max((int)", to_expression(builtin_subgroup_invocation_id_id), " - 32, 0), (uint)max((int)", to_expression(builtin_subgroup_size_id), " - (int)max(", to_expression(builtin_subgroup_invocation_id_id), ", 32u), 0)), uint2(0));"); } }); break; case BuiltInSubgroupGtMask: if (msl_options.is_ios() && !msl_options.supports_msl_version(2, 2)) SPIRV_CROSS_THROW("Subgroup ballot functionality requires Metal 2.2 on iOS."); if (!msl_options.supports_msl_version(2, 1)) SPIRV_CROSS_THROW("Subgroup ballot functionality requires Metal 2.1."); add_spv_func_and_recompile(SPVFuncImplSubgroupBallot); entry_func.fixup_hooks_in.push_back([=]() { // The same logic applies here, except now the index is one // more than the subgroup invocation ID. if (msl_options.fixed_subgroup_size > 32) { statement(builtin_type_decl(bi_type), " ", to_expression(var_id), " = uint4(insert_bits(0u, 0xFFFFFFFF, min(", to_expression(builtin_subgroup_invocation_id_id), " + 1, 32u), (uint)max(32 - (int)", to_expression(builtin_subgroup_invocation_id_id), " - 1, 0)), insert_bits(0u, 0xFFFFFFFF, (uint)max((int)", to_expression(builtin_subgroup_invocation_id_id), " + 1 - 32, 0), ", msl_options.fixed_subgroup_size, " - max(", to_expression(builtin_subgroup_invocation_id_id), " + 1, 32u)), uint2(0));"); } else if (msl_options.fixed_subgroup_size != 0) { statement(builtin_type_decl(bi_type), " ", to_expression(var_id), " = uint4(insert_bits(0u, 0xFFFFFFFF, ", to_expression(builtin_subgroup_invocation_id_id), " + 1, ", msl_options.fixed_subgroup_size, " - ", to_expression(builtin_subgroup_invocation_id_id), " - 1), uint3(0));"); } else if (msl_options.is_ios()) { statement(builtin_type_decl(bi_type), " ", to_expression(var_id), " = uint4(insert_bits(0u, 0xFFFFFFFF, ", to_expression(builtin_subgroup_invocation_id_id), " + 1, ", to_expression(builtin_subgroup_size_id), " - ", to_expression(builtin_subgroup_invocation_id_id), " - 1), uint3(0));"); } else { statement(builtin_type_decl(bi_type), " ", to_expression(var_id), " = uint4(insert_bits(0u, 0xFFFFFFFF, min(", to_expression(builtin_subgroup_invocation_id_id), " + 1, 32u), (uint)max(min((int)", to_expression(builtin_subgroup_size_id), ", 32) - (int)", to_expression(builtin_subgroup_invocation_id_id), " - 1, 0)), insert_bits(0u, 0xFFFFFFFF, (uint)max((int)", to_expression(builtin_subgroup_invocation_id_id), " + 1 - 32, 0), (uint)max((int)", to_expression(builtin_subgroup_size_id), " - (int)max(", to_expression(builtin_subgroup_invocation_id_id), " + 1, 32u), 0)), uint2(0));"); } }); break; case BuiltInSubgroupLeMask: if (msl_options.is_ios() && !msl_options.supports_msl_version(2, 2)) SPIRV_CROSS_THROW("Subgroup ballot functionality requires Metal 2.2 on iOS."); if (!msl_options.supports_msl_version(2, 1)) SPIRV_CROSS_THROW("Subgroup ballot functionality requires Metal 2.1."); add_spv_func_and_recompile(SPVFuncImplSubgroupBallot); entry_func.fixup_hooks_in.push_back([=]() { if (msl_options.is_ios()) { statement(builtin_type_decl(bi_type), " ", to_expression(var_id), " = uint4(extract_bits(0xFFFFFFFF, 0, ", to_expression(builtin_subgroup_invocation_id_id), " + 1), uint3(0));"); } else { statement(builtin_type_decl(bi_type), " ", to_expression(var_id), " = uint4(extract_bits(0xFFFFFFFF, 0, min(", to_expression(builtin_subgroup_invocation_id_id), " + 1, 32u)), extract_bits(0xFFFFFFFF, 0, (uint)max((int)", to_expression(builtin_subgroup_invocation_id_id), " + 1 - 32, 0)), uint2(0));"); } }); break; case BuiltInSubgroupLtMask: if (msl_options.is_ios() && !msl_options.supports_msl_version(2, 2)) SPIRV_CROSS_THROW("Subgroup ballot functionality requires Metal 2.2 on iOS."); if (!msl_options.supports_msl_version(2, 1)) SPIRV_CROSS_THROW("Subgroup ballot functionality requires Metal 2.1."); add_spv_func_and_recompile(SPVFuncImplSubgroupBallot); entry_func.fixup_hooks_in.push_back([=]() { if (msl_options.is_ios()) { statement(builtin_type_decl(bi_type), " ", to_expression(var_id), " = uint4(extract_bits(0xFFFFFFFF, 0, ", to_expression(builtin_subgroup_invocation_id_id), "), uint3(0));"); } else { statement(builtin_type_decl(bi_type), " ", to_expression(var_id), " = uint4(extract_bits(0xFFFFFFFF, 0, min(", to_expression(builtin_subgroup_invocation_id_id), ", 32u)), extract_bits(0xFFFFFFFF, 0, (uint)max((int)", to_expression(builtin_subgroup_invocation_id_id), " - 32, 0)), uint2(0));"); } }); break; case BuiltInViewIndex: if (!msl_options.multiview) { // According to the Vulkan spec, when not running under a multiview // render pass, ViewIndex is 0. entry_func.fixup_hooks_in.push_back([=]() { statement("const ", builtin_type_decl(bi_type), " ", to_expression(var_id), " = 0;"); }); } else if (msl_options.view_index_from_device_index) { // In this case, we take the view index from that of the device we're running on. entry_func.fixup_hooks_in.push_back([=]() { statement("const ", builtin_type_decl(bi_type), " ", to_expression(var_id), " = ", msl_options.device_index, ";"); }); // We actually don't want to set the render_target_array_index here. // Since every physical device is rendering a different view, // there's no need for layered rendering here. } else if (!msl_options.multiview_layered_rendering) { // In this case, the views are rendered one at a time. The view index, then, // is just the first part of the "view mask". entry_func.fixup_hooks_in.push_back([=]() { statement("const ", builtin_type_decl(bi_type), " ", to_expression(var_id), " = ", to_expression(view_mask_buffer_id), "[0];"); }); } else if (get_execution_model() == ExecutionModelFragment) { // Because we adjusted the view index in the vertex shader, we have to // adjust it back here. entry_func.fixup_hooks_in.push_back([=]() { statement(to_expression(var_id), " += ", to_expression(view_mask_buffer_id), "[0];"); }); } else if (get_execution_model() == ExecutionModelVertex) { // Metal provides no special support for multiview, so we smuggle // the view index in the instance index. entry_func.fixup_hooks_in.push_back([=]() { statement(builtin_type_decl(bi_type), " ", to_expression(var_id), " = ", to_expression(view_mask_buffer_id), "[0] + (", to_expression(builtin_instance_idx_id), " - ", to_expression(builtin_base_instance_id), ") % ", to_expression(view_mask_buffer_id), "[1];"); statement(to_expression(builtin_instance_idx_id), " = (", to_expression(builtin_instance_idx_id), " - ", to_expression(builtin_base_instance_id), ") / ", to_expression(view_mask_buffer_id), "[1] + ", to_expression(builtin_base_instance_id), ";"); }); // In addition to setting the variable itself, we also need to // set the render_target_array_index with it on output. We have to // offset this by the base view index, because Metal isn't in on // our little game here. entry_func.fixup_hooks_out.push_back([=]() { statement(to_expression(builtin_layer_id), " = ", to_expression(var_id), " - ", to_expression(view_mask_buffer_id), "[0];"); }); } break; case BuiltInDeviceIndex: // Metal pipelines belong to the devices which create them, so we'll // need to create a MTLPipelineState for every MTLDevice in a grouped // VkDevice. We can assume, then, that the device index is constant. entry_func.fixup_hooks_in.push_back([=]() { statement("const ", builtin_type_decl(bi_type), " ", to_expression(var_id), " = ", msl_options.device_index, ";"); }); break; case BuiltInWorkgroupId: if (!msl_options.dispatch_base || !active_input_builtins.get(BuiltInWorkgroupId)) break; // The vkCmdDispatchBase() command lets the client set the base value // of WorkgroupId. Metal has no direct equivalent; we must make this // adjustment ourselves. entry_func.fixup_hooks_in.push_back([=]() { statement(to_expression(var_id), " += ", to_dereferenced_expression(builtin_dispatch_base_id), ";"); }); break; case BuiltInGlobalInvocationId: if (!msl_options.dispatch_base || !active_input_builtins.get(BuiltInGlobalInvocationId)) break; // GlobalInvocationId is defined as LocalInvocationId + WorkgroupId * WorkgroupSize. // This needs to be adjusted too. entry_func.fixup_hooks_in.push_back([=]() { auto &execution = this->get_entry_point(); uint32_t workgroup_size_id = execution.workgroup_size.constant; if (workgroup_size_id) statement(to_expression(var_id), " += ", to_dereferenced_expression(builtin_dispatch_base_id), " * ", to_expression(workgroup_size_id), ";"); else statement(to_expression(var_id), " += ", to_dereferenced_expression(builtin_dispatch_base_id), " * uint3(", execution.workgroup_size.x, ", ", execution.workgroup_size.y, ", ", execution.workgroup_size.z, ");"); }); break; case BuiltInVertexId: case BuiltInVertexIndex: // This is direct-mapped normally. if (!msl_options.vertex_for_tessellation) break; entry_func.fixup_hooks_in.push_back([=]() { builtin_declaration = true; switch (msl_options.vertex_index_type) { case Options::IndexType::None: statement(builtin_type_decl(bi_type), " ", to_expression(var_id), " = ", to_expression(builtin_invocation_id_id), ".x + ", to_expression(builtin_dispatch_base_id), ".x;"); break; case Options::IndexType::UInt16: case Options::IndexType::UInt32: statement(builtin_type_decl(bi_type), " ", to_expression(var_id), " = ", index_buffer_var_name, "[", to_expression(builtin_invocation_id_id), ".x] + ", to_expression(builtin_dispatch_base_id), ".x;"); break; } builtin_declaration = false; }); break; case BuiltInBaseVertex: // This is direct-mapped normally. if (!msl_options.vertex_for_tessellation) break; entry_func.fixup_hooks_in.push_back([=]() { statement(builtin_type_decl(bi_type), " ", to_expression(var_id), " = ", to_expression(builtin_dispatch_base_id), ".x;"); }); break; case BuiltInInstanceId: case BuiltInInstanceIndex: // This is direct-mapped normally. if (!msl_options.vertex_for_tessellation) break; entry_func.fixup_hooks_in.push_back([=]() { builtin_declaration = true; statement(builtin_type_decl(bi_type), " ", to_expression(var_id), " = ", to_expression(builtin_invocation_id_id), ".y + ", to_expression(builtin_dispatch_base_id), ".y;"); builtin_declaration = false; }); break; case BuiltInBaseInstance: // This is direct-mapped normally. if (!msl_options.vertex_for_tessellation) break; entry_func.fixup_hooks_in.push_back([=]() { statement(builtin_type_decl(bi_type), " ", to_expression(var_id), " = ", to_expression(builtin_dispatch_base_id), ".y;"); }); break; default: break; } } else if (var.storage == StorageClassOutput && get_execution_model() == ExecutionModelFragment && is_builtin_variable(var) && active_output_builtins.get(bi_type) && bi_type == BuiltInSampleMask && has_additional_fixed_sample_mask()) { // If the additional fixed sample mask was set, we need to adjust the sample_mask // output to reflect that. If the shader outputs the sample_mask itself too, we need // to AND the two masks to get the final one. string op_str = does_shader_write_sample_mask ? " &= " : " = "; entry_func.fixup_hooks_out.push_back([=]() { statement(to_expression(builtin_sample_mask_id), op_str, additional_fixed_sample_mask_str(), ";"); }); } }); } // Returns the Metal index of the resource of the specified type as used by the specified variable. uint32_t CompilerMSL::get_metal_resource_index(SPIRVariable &var, SPIRType::BaseType basetype, uint32_t plane) { auto &execution = get_entry_point(); auto &var_dec = ir.meta[var.self].decoration; auto &var_type = get(var.basetype); uint32_t var_desc_set = (var.storage == StorageClassPushConstant) ? kPushConstDescSet : var_dec.set; uint32_t var_binding = (var.storage == StorageClassPushConstant) ? kPushConstBinding : var_dec.binding; // If a matching binding has been specified, find and use it. auto itr = resource_bindings.find({ execution.model, var_desc_set, var_binding }); // Atomic helper buffers for image atomics need to use secondary bindings as well. bool use_secondary_binding = (var_type.basetype == SPIRType::SampledImage && basetype == SPIRType::Sampler) || basetype == SPIRType::AtomicCounter; auto resource_decoration = use_secondary_binding ? SPIRVCrossDecorationResourceIndexSecondary : SPIRVCrossDecorationResourceIndexPrimary; if (plane == 1) resource_decoration = SPIRVCrossDecorationResourceIndexTertiary; if (plane == 2) resource_decoration = SPIRVCrossDecorationResourceIndexQuaternary; if (itr != end(resource_bindings)) { auto &remap = itr->second; remap.second = true; switch (basetype) { case SPIRType::Image: set_extended_decoration(var.self, resource_decoration, remap.first.msl_texture + plane); return remap.first.msl_texture + plane; case SPIRType::Sampler: set_extended_decoration(var.self, resource_decoration, remap.first.msl_sampler); return remap.first.msl_sampler; default: set_extended_decoration(var.self, resource_decoration, remap.first.msl_buffer); return remap.first.msl_buffer; } } // If we have already allocated an index, keep using it. if (has_extended_decoration(var.self, resource_decoration)) return get_extended_decoration(var.self, resource_decoration); auto &type = get(var.basetype); if (type_is_msl_framebuffer_fetch(type)) { // Frame-buffer fetch gets its fallback resource index from the input attachment index, // which is then treated as color index. return get_decoration(var.self, DecorationInputAttachmentIndex); } else if (msl_options.enable_decoration_binding) { // Allow user to enable decoration binding. // If there is no explicit mapping of bindings to MSL, use the declared binding as a fallback. if (has_decoration(var.self, DecorationBinding)) { var_binding = get_decoration(var.self, DecorationBinding); // Avoid emitting sentinel bindings. if (var_binding < 0x80000000u) return var_binding; } } // If we did not explicitly remap, allocate bindings on demand. // We cannot reliably use Binding decorations since SPIR-V and MSL's binding models are very different. bool allocate_argument_buffer_ids = false; if (var.storage != StorageClassPushConstant) allocate_argument_buffer_ids = descriptor_set_is_argument_buffer(var_desc_set); uint32_t binding_stride = 1; for (uint32_t i = 0; i < uint32_t(type.array.size()); i++) binding_stride *= to_array_size_literal(type, i); // If a binding has not been specified, revert to incrementing resource indices. uint32_t resource_index; if (allocate_argument_buffer_ids) { // Allocate from a flat ID binding space. resource_index = next_metal_resource_ids[var_desc_set]; next_metal_resource_ids[var_desc_set] += binding_stride; } else { if (is_var_runtime_size_array(var)) { basetype = SPIRType::Struct; binding_stride = 1; } // Allocate from plain bindings which are allocated per resource type. switch (basetype) { case SPIRType::Image: resource_index = next_metal_resource_index_texture; next_metal_resource_index_texture += binding_stride; break; case SPIRType::Sampler: resource_index = next_metal_resource_index_sampler; next_metal_resource_index_sampler += binding_stride; break; default: resource_index = next_metal_resource_index_buffer; next_metal_resource_index_buffer += binding_stride; break; } } set_extended_decoration(var.self, resource_decoration, resource_index); return resource_index; } bool CompilerMSL::type_is_msl_framebuffer_fetch(const SPIRType &type) const { return type.basetype == SPIRType::Image && type.image.dim == DimSubpassData && msl_options.use_framebuffer_fetch_subpasses; } bool CompilerMSL::type_is_pointer(const SPIRType &type) const { if (!type.pointer) return false; auto &parent_type = get(type.parent_type); // Safeguards when we forget to set pointer_depth (there is an assert for it in type_to_glsl), // but the extra check shouldn't hurt. return (type.pointer_depth > parent_type.pointer_depth) || !parent_type.pointer; } bool CompilerMSL::type_is_pointer_to_pointer(const SPIRType &type) const { if (!type.pointer) return false; auto &parent_type = get(type.parent_type); return type.pointer_depth > parent_type.pointer_depth && type_is_pointer(parent_type); } const char *CompilerMSL::descriptor_address_space(uint32_t id, StorageClass storage, const char *plain_address_space) const { if (msl_options.argument_buffers) { bool storage_class_is_descriptor = storage == StorageClassUniform || storage == StorageClassStorageBuffer || storage == StorageClassUniformConstant; uint32_t desc_set = get_decoration(id, DecorationDescriptorSet); if (storage_class_is_descriptor && descriptor_set_is_argument_buffer(desc_set)) { // An awkward case where we need to emit *more* address space declarations (yay!). // An example is where we pass down an array of buffer pointers to leaf functions. // It's a constant array containing pointers to constants. // The pointer array is always constant however. E.g. // device SSBO * constant (&array)[N]. // const device SSBO * constant (&array)[N]. // constant SSBO * constant (&array)[N]. // However, this only matters for argument buffers, since for MSL 1.0 style codegen, // we emit the buffer array on stack instead, and that seems to work just fine apparently. // If the argument was marked as being in device address space, any pointer to member would // be const device, not constant. if (argument_buffer_device_storage_mask & (1u << desc_set)) return "const device"; else return "constant"; } } return plain_address_space; } string CompilerMSL::argument_decl(const SPIRFunction::Parameter &arg) { auto &var = get(arg.id); auto &type = get_variable_data_type(var); auto &var_type = get(arg.type); StorageClass type_storage = var_type.storage; // If we need to modify the name of the variable, make sure we use the original variable. // Our alias is just a shadow variable. uint32_t name_id = var.self; if (arg.alias_global_variable && var.basevariable) name_id = var.basevariable; bool constref = !arg.alias_global_variable && is_pointer(var_type) && arg.write_count == 0; // Framebuffer fetch is plain value, const looks out of place, but it is not wrong. if (type_is_msl_framebuffer_fetch(type)) constref = false; else if (type_storage == StorageClassUniformConstant) constref = true; bool type_is_image = type.basetype == SPIRType::Image || type.basetype == SPIRType::SampledImage || type.basetype == SPIRType::Sampler; bool type_is_tlas = type.basetype == SPIRType::AccelerationStructure; // For opaque types we handle const later due to descriptor address spaces. const char *cv_qualifier = (constref && !type_is_image) ? "const " : ""; string decl; // If this is a combined image-sampler for a 2D image with floating-point type, // we emitted the 'spvDynamicImageSampler' type, and this is *not* an alias parameter // for a global, then we need to emit a "dynamic" combined image-sampler. // Unfortunately, this is necessary to properly support passing around // combined image-samplers with Y'CbCr conversions on them. bool is_dynamic_img_sampler = !arg.alias_global_variable && type.basetype == SPIRType::SampledImage && type.image.dim == Dim2D && type_is_floating_point(get(type.image.type)) && spv_function_implementations.count(SPVFuncImplDynamicImageSampler); // Allow Metal to use the array template to make arrays a value type string address_space = get_argument_address_space(var); bool builtin = has_decoration(var.self, DecorationBuiltIn); auto builtin_type = BuiltIn(get_decoration(arg.id, DecorationBuiltIn)); if (var.basevariable && (var.basevariable == stage_in_ptr_var_id || var.basevariable == stage_out_ptr_var_id)) decl = join(cv_qualifier, type_to_glsl(type, arg.id)); else if (builtin) { // Only use templated array for Clip/Cull distance when feasible. // In other scenarios, we need need to override array length for tess levels (if used as outputs), // or we need to emit the expected type for builtins (uint vs int). auto storage = get(var.basetype).storage; if (storage == StorageClassInput && (builtin_type == BuiltInTessLevelInner || builtin_type == BuiltInTessLevelOuter)) { is_using_builtin_array = false; } else if (builtin_type != BuiltInClipDistance && builtin_type != BuiltInCullDistance) { is_using_builtin_array = true; } if (storage == StorageClassOutput && variable_storage_requires_stage_io(storage) && !is_stage_output_builtin_masked(builtin_type)) is_using_builtin_array = true; if (is_using_builtin_array) decl = join(cv_qualifier, builtin_type_decl(builtin_type, arg.id)); else decl = join(cv_qualifier, type_to_glsl(type, arg.id)); } else if (is_var_runtime_size_array(var)) { const auto *parent_type = &get(type.parent_type); auto type_name = type_to_glsl(*parent_type, arg.id); if (type.basetype == SPIRType::AccelerationStructure) decl = join("spvDescriptorArray<", type_name, ">"); else if (type_is_image) decl = join("spvDescriptorArray<", cv_qualifier, type_name, ">"); else decl = join("spvDescriptorArray<", address_space, " ", type_name, "*>"); address_space = "const"; } else if ((type_storage == StorageClassUniform || type_storage == StorageClassStorageBuffer) && is_array(type)) { is_using_builtin_array = true; decl += join(cv_qualifier, type_to_glsl(type, arg.id), "*"); } else if (is_dynamic_img_sampler) { decl = join(cv_qualifier, "spvDynamicImageSampler<", type_to_glsl(get(type.image.type)), ">"); // Mark the variable so that we can handle passing it to another function. set_extended_decoration(arg.id, SPIRVCrossDecorationDynamicImageSampler); } else { // The type is a pointer type we need to emit cv_qualifier late. if (type_is_pointer(type)) { decl = type_to_glsl(type, arg.id); if (*cv_qualifier != '\0') decl += join(" ", cv_qualifier); } else { decl = join(cv_qualifier, type_to_glsl(type, arg.id)); } } if (!builtin && !is_pointer(var_type) && (type_storage == StorageClassFunction || type_storage == StorageClassGeneric)) { // If the argument is a pure value and not an opaque type, we will pass by value. if (msl_options.force_native_arrays && is_array(type)) { // We are receiving an array by value. This is problematic. // We cannot be sure of the target address space since we are supposed to receive a copy, // but this is not possible with MSL without some extra work. // We will have to assume we're getting a reference in thread address space. // If we happen to get a reference in constant address space, the caller must emit a copy and pass that. // Thread const therefore becomes the only logical choice, since we cannot "create" a constant array from // non-constant arrays, but we can create thread const from constant. decl = string("thread const ") + decl; decl += " (&"; const char *restrict_kw = to_restrict(name_id, true); if (*restrict_kw) { decl += " "; decl += restrict_kw; } decl += to_expression(name_id); decl += ")"; decl += type_to_array_glsl(type); } else { if (!address_space.empty()) decl = join(address_space, " ", decl); decl += " "; decl += to_expression(name_id); } } else if (is_array(type) && !type_is_image) { // Arrays of opaque types are special cased. if (!address_space.empty()) decl = join(address_space, " ", decl); const char *argument_buffer_space = descriptor_address_space(name_id, type_storage, nullptr); if (argument_buffer_space) { decl += " "; decl += argument_buffer_space; } // Special case, need to override the array size here if we're using tess level as an argument. if (is_tesc_shader() && builtin && (builtin_type == BuiltInTessLevelInner || builtin_type == BuiltInTessLevelOuter)) { uint32_t array_size = get_physical_tess_level_array_size(builtin_type); if (array_size == 1) { decl += " &"; decl += to_expression(name_id); } else { decl += " (&"; decl += to_expression(name_id); decl += ")"; decl += join("[", array_size, "]"); } } else if (is_var_runtime_size_array(var)) { decl += " " + to_expression(name_id); } else { auto array_size_decl = type_to_array_glsl(type); if (array_size_decl.empty()) decl += "& "; else decl += " (&"; const char *restrict_kw = to_restrict(name_id, true); if (*restrict_kw) { decl += " "; decl += restrict_kw; } decl += to_expression(name_id); if (!array_size_decl.empty()) { decl += ")"; decl += array_size_decl; } } } else if (!type_is_image && !type_is_tlas && (!pull_model_inputs.count(var.basevariable) || type.basetype == SPIRType::Struct)) { // If this is going to be a reference to a variable pointer, the address space // for the reference has to go before the '&', but after the '*'. if (!address_space.empty()) { if (type_is_pointer(type)) { if (*cv_qualifier == '\0') decl += ' '; decl += join(address_space, " "); } else decl = join(address_space, " ", decl); } decl += "&"; decl += " "; decl += to_restrict(name_id, true); decl += to_expression(name_id); } else if (type_is_image || type_is_tlas) { if (is_var_runtime_size_array(var)) { decl = address_space + " " + decl + " " + to_expression(name_id); } else if (type.array.empty()) { // For non-arrayed types we can just pass opaque descriptors by value. // This fixes problems if descriptors are passed by value from argument buffers and plain descriptors // in same shader. // There is no address space we can actually use, but value will work. // This will break if applications attempt to pass down descriptor arrays as arguments, but // fortunately that is extremely unlikely ... decl += " "; decl += to_expression(name_id); } else { const char *img_address_space = descriptor_address_space(name_id, type_storage, "thread const"); decl = join(img_address_space, " ", decl); decl += "& "; decl += to_expression(name_id); } } else { if (!address_space.empty()) decl = join(address_space, " ", decl); decl += " "; decl += to_expression(name_id); } // Emulate texture2D atomic operations auto *backing_var = maybe_get_backing_variable(name_id); if (backing_var && atomic_image_vars_emulated.count(backing_var->self)) { decl += ", device atomic_" + type_to_glsl(get(var_type.image.type), 0); decl += "* " + to_expression(name_id) + "_atomic"; } is_using_builtin_array = false; return decl; } // If we're currently in the entry point function, and the object // has a qualified name, use it, otherwise use the standard name. string CompilerMSL::to_name(uint32_t id, bool allow_alias) const { if (current_function && (current_function->self == ir.default_entry_point)) { auto *m = ir.find_meta(id); if (m && !m->decoration.qualified_alias.empty()) return m->decoration.qualified_alias; } return Compiler::to_name(id, allow_alias); } // Appends the name of the member to the variable qualifier string, except for Builtins. string CompilerMSL::append_member_name(const string &qualifier, const SPIRType &type, uint32_t index) { // Don't qualify Builtin names because they are unique and are treated as such when building expressions BuiltIn builtin = BuiltInMax; if (is_member_builtin(type, index, &builtin)) return builtin_to_glsl(builtin, type.storage); // Strip any underscore prefix from member name string mbr_name = to_member_name(type, index); size_t startPos = mbr_name.find_first_not_of("_"); mbr_name = (startPos != string::npos) ? mbr_name.substr(startPos) : ""; return join(qualifier, "_", mbr_name); } // Ensures that the specified name is permanently usable by prepending a prefix // if the first chars are _ and a digit, which indicate a transient name. string CompilerMSL::ensure_valid_name(string name, string pfx) { return (name.size() >= 2 && name[0] == '_' && isdigit(name[1])) ? (pfx + name) : name; } const std::unordered_set &CompilerMSL::get_reserved_keyword_set() { static const unordered_set keywords = { "kernel", "vertex", "fragment", "compute", "constant", "device", "bias", "level", "gradient2d", "gradientcube", "gradient3d", "min_lod_clamp", "assert", "VARIABLE_TRACEPOINT", "STATIC_DATA_TRACEPOINT", "STATIC_DATA_TRACEPOINT_V", "METAL_ALIGN", "METAL_ASM", "METAL_CONST", "METAL_DEPRECATED", "METAL_ENABLE_IF", "METAL_FUNC", "METAL_INTERNAL", "METAL_NON_NULL_RETURN", "METAL_NORETURN", "METAL_NOTHROW", "METAL_PURE", "METAL_UNAVAILABLE", "METAL_IMPLICIT", "METAL_EXPLICIT", "METAL_CONST_ARG", "METAL_ARG_UNIFORM", "METAL_ZERO_ARG", "METAL_VALID_LOD_ARG", "METAL_VALID_LEVEL_ARG", "METAL_VALID_STORE_ORDER", "METAL_VALID_LOAD_ORDER", "METAL_VALID_COMPARE_EXCHANGE_FAILURE_ORDER", "METAL_COMPATIBLE_COMPARE_EXCHANGE_ORDERS", "METAL_VALID_RENDER_TARGET", "is_function_constant_defined", "CHAR_BIT", "SCHAR_MAX", "SCHAR_MIN", "UCHAR_MAX", "CHAR_MAX", "CHAR_MIN", "USHRT_MAX", "SHRT_MAX", "SHRT_MIN", "UINT_MAX", "INT_MAX", "INT_MIN", "FLT_DIG", "FLT_MANT_DIG", "FLT_MAX_10_EXP", "FLT_MAX_EXP", "FLT_MIN_10_EXP", "FLT_MIN_EXP", "FLT_RADIX", "FLT_MAX", "FLT_MIN", "FLT_EPSILON", "FP_ILOGB0", "FP_ILOGBNAN", "MAXFLOAT", "HUGE_VALF", "INFINITY", "NAN", "M_E_F", "M_LOG2E_F", "M_LOG10E_F", "M_LN2_F", "M_LN10_F", "M_PI_F", "M_PI_2_F", "M_PI_4_F", "M_1_PI_F", "M_2_PI_F", "M_2_SQRTPI_F", "M_SQRT2_F", "M_SQRT1_2_F", "HALF_DIG", "HALF_MANT_DIG", "HALF_MAX_10_EXP", "HALF_MAX_EXP", "HALF_MIN_10_EXP", "HALF_MIN_EXP", "HALF_RADIX", "HALF_MAX", "HALF_MIN", "HALF_EPSILON", "MAXHALF", "HUGE_VALH", "M_E_H", "M_LOG2E_H", "M_LOG10E_H", "M_LN2_H", "M_LN10_H", "M_PI_H", "M_PI_2_H", "M_PI_4_H", "M_1_PI_H", "M_2_PI_H", "M_2_SQRTPI_H", "M_SQRT2_H", "M_SQRT1_2_H", "DBL_DIG", "DBL_MANT_DIG", "DBL_MAX_10_EXP", "DBL_MAX_EXP", "DBL_MIN_10_EXP", "DBL_MIN_EXP", "DBL_RADIX", "DBL_MAX", "DBL_MIN", "DBL_EPSILON", "HUGE_VAL", "M_E", "M_LOG2E", "M_LOG10E", "M_LN2", "M_LN10", "M_PI", "M_PI_2", "M_PI_4", "M_1_PI", "M_2_PI", "M_2_SQRTPI", "M_SQRT2", "M_SQRT1_2", "quad_broadcast", "thread", "threadgroup", }; return keywords; } const std::unordered_set &CompilerMSL::get_illegal_func_names() { static const unordered_set illegal_func_names = { "main", "saturate", "assert", "fmin3", "fmax3", "divide", "VARIABLE_TRACEPOINT", "STATIC_DATA_TRACEPOINT", "STATIC_DATA_TRACEPOINT_V", "METAL_ALIGN", "METAL_ASM", "METAL_CONST", "METAL_DEPRECATED", "METAL_ENABLE_IF", "METAL_FUNC", "METAL_INTERNAL", "METAL_NON_NULL_RETURN", "METAL_NORETURN", "METAL_NOTHROW", "METAL_PURE", "METAL_UNAVAILABLE", "METAL_IMPLICIT", "METAL_EXPLICIT", "METAL_CONST_ARG", "METAL_ARG_UNIFORM", "METAL_ZERO_ARG", "METAL_VALID_LOD_ARG", "METAL_VALID_LEVEL_ARG", "METAL_VALID_STORE_ORDER", "METAL_VALID_LOAD_ORDER", "METAL_VALID_COMPARE_EXCHANGE_FAILURE_ORDER", "METAL_COMPATIBLE_COMPARE_EXCHANGE_ORDERS", "METAL_VALID_RENDER_TARGET", "is_function_constant_defined", "CHAR_BIT", "SCHAR_MAX", "SCHAR_MIN", "UCHAR_MAX", "CHAR_MAX", "CHAR_MIN", "USHRT_MAX", "SHRT_MAX", "SHRT_MIN", "UINT_MAX", "INT_MAX", "INT_MIN", "FLT_DIG", "FLT_MANT_DIG", "FLT_MAX_10_EXP", "FLT_MAX_EXP", "FLT_MIN_10_EXP", "FLT_MIN_EXP", "FLT_RADIX", "FLT_MAX", "FLT_MIN", "FLT_EPSILON", "FP_ILOGB0", "FP_ILOGBNAN", "MAXFLOAT", "HUGE_VALF", "INFINITY", "NAN", "M_E_F", "M_LOG2E_F", "M_LOG10E_F", "M_LN2_F", "M_LN10_F", "M_PI_F", "M_PI_2_F", "M_PI_4_F", "M_1_PI_F", "M_2_PI_F", "M_2_SQRTPI_F", "M_SQRT2_F", "M_SQRT1_2_F", "HALF_DIG", "HALF_MANT_DIG", "HALF_MAX_10_EXP", "HALF_MAX_EXP", "HALF_MIN_10_EXP", "HALF_MIN_EXP", "HALF_RADIX", "HALF_MAX", "HALF_MIN", "HALF_EPSILON", "MAXHALF", "HUGE_VALH", "M_E_H", "M_LOG2E_H", "M_LOG10E_H", "M_LN2_H", "M_LN10_H", "M_PI_H", "M_PI_2_H", "M_PI_4_H", "M_1_PI_H", "M_2_PI_H", "M_2_SQRTPI_H", "M_SQRT2_H", "M_SQRT1_2_H", "DBL_DIG", "DBL_MANT_DIG", "DBL_MAX_10_EXP", "DBL_MAX_EXP", "DBL_MIN_10_EXP", "DBL_MIN_EXP", "DBL_RADIX", "DBL_MAX", "DBL_MIN", "DBL_EPSILON", "HUGE_VAL", "M_E", "M_LOG2E", "M_LOG10E", "M_LN2", "M_LN10", "M_PI", "M_PI_2", "M_PI_4", "M_1_PI", "M_2_PI", "M_2_SQRTPI", "M_SQRT2", "M_SQRT1_2", }; return illegal_func_names; } // Replace all names that match MSL keywords or Metal Standard Library functions. void CompilerMSL::replace_illegal_names() { // FIXME: MSL and GLSL are doing two different things here. // Agree on convention and remove this override. auto &keywords = get_reserved_keyword_set(); auto &illegal_func_names = get_illegal_func_names(); ir.for_each_typed_id([&](uint32_t self, SPIRVariable &) { auto *meta = ir.find_meta(self); if (!meta) return; auto &dec = meta->decoration; if (keywords.find(dec.alias) != end(keywords)) dec.alias += "0"; }); ir.for_each_typed_id([&](uint32_t self, SPIRFunction &) { auto *meta = ir.find_meta(self); if (!meta) return; auto &dec = meta->decoration; if (illegal_func_names.find(dec.alias) != end(illegal_func_names)) dec.alias += "0"; }); ir.for_each_typed_id([&](uint32_t self, SPIRType &) { auto *meta = ir.find_meta(self); if (!meta) return; for (auto &mbr_dec : meta->members) if (keywords.find(mbr_dec.alias) != end(keywords)) mbr_dec.alias += "0"; }); CompilerGLSL::replace_illegal_names(); } void CompilerMSL::replace_illegal_entry_point_names() { auto &illegal_func_names = get_illegal_func_names(); // It is important to this before we fixup identifiers, // since if ep_name is reserved, we will need to fix that up, // and then copy alias back into entry.name after the fixup. for (auto &entry : ir.entry_points) { // Change both the entry point name and the alias, to keep them synced. string &ep_name = entry.second.name; if (illegal_func_names.find(ep_name) != end(illegal_func_names)) ep_name += "0"; ir.meta[entry.first].decoration.alias = ep_name; } } void CompilerMSL::sync_entry_point_aliases_and_names() { for (auto &entry : ir.entry_points) entry.second.name = ir.meta[entry.first].decoration.alias; } string CompilerMSL::to_member_reference(uint32_t base, const SPIRType &type, uint32_t index, bool ptr_chain_is_resolved) { auto *var = maybe_get_backing_variable(base); // If this is a buffer array, we have to dereference the buffer pointers. // Otherwise, if this is a pointer expression, dereference it. bool declared_as_pointer = false; if (var) { // Only allow -> dereference for block types. This is so we get expressions like // buffer[i]->first_member.second_member, rather than buffer[i]->first->second. const bool is_block = has_decoration(type.self, DecorationBlock) || has_decoration(type.self, DecorationBufferBlock); bool is_buffer_variable = is_block && (var->storage == StorageClassUniform || var->storage == StorageClassStorageBuffer); declared_as_pointer = is_buffer_variable && is_array(get_pointee_type(var->basetype)); } if (declared_as_pointer || (!ptr_chain_is_resolved && should_dereference(base))) return join("->", to_member_name(type, index)); else return join(".", to_member_name(type, index)); } string CompilerMSL::to_qualifiers_glsl(uint32_t id) { string quals; auto *var = maybe_get(id); auto &type = expression_type(id); if (type.storage == StorageClassWorkgroup || (var && variable_decl_is_remapped_storage(*var, StorageClassWorkgroup))) quals += "threadgroup "; return quals; } // The optional id parameter indicates the object whose type we are trying // to find the description for. It is optional. Most type descriptions do not // depend on a specific object's use of that type. string CompilerMSL::type_to_glsl(const SPIRType &type, uint32_t id, bool member) { string type_name; // Pointer? if (is_pointer(type) || type_is_array_of_pointers(type)) { assert(type.pointer_depth > 0); const char *restrict_kw; auto type_address_space = get_type_address_space(type, id); const auto *p_parent_type = &get(type.parent_type); // Work around C pointer qualifier rules. If glsl_type is a pointer type as well // we'll need to emit the address space to the right. // We could always go this route, but it makes the code unnatural. // Prefer emitting thread T *foo over T thread* foo since it's more readable, // but we'll have to emit thread T * thread * T constant bar; for example. if (type_is_pointer_to_pointer(type)) type_name = join(type_to_glsl(*p_parent_type, id), " ", type_address_space, " "); else { // Since this is not a pointer-to-pointer, ensure we've dug down to the base type. // Some situations chain pointers even though they are not formally pointers-of-pointers. while (type_is_pointer(*p_parent_type)) p_parent_type = &get(p_parent_type->parent_type); // If we're emitting BDA, just use the templated type. // Emitting builtin arrays need a lot of cooperation with other code to ensure // the C-style nesting works right. // FIXME: This is somewhat of a hack. bool old_is_using_builtin_array = is_using_builtin_array; if (is_physical_pointer(type)) is_using_builtin_array = false; type_name = join(type_address_space, " ", type_to_glsl(*p_parent_type, id)); is_using_builtin_array = old_is_using_builtin_array; } switch (type.basetype) { case SPIRType::Image: case SPIRType::SampledImage: case SPIRType::Sampler: // These are handles. break; default: // Anything else can be a raw pointer. type_name += "*"; restrict_kw = to_restrict(id, false); if (*restrict_kw) { type_name += " "; type_name += restrict_kw; } break; } return type_name; } switch (type.basetype) { case SPIRType::Struct: // Need OpName lookup here to get a "sensible" name for a struct. // Allow Metal to use the array template to make arrays a value type type_name = to_name(type.self); break; case SPIRType::Image: case SPIRType::SampledImage: return image_type_glsl(type, id); case SPIRType::Sampler: return sampler_type(type, id); case SPIRType::Void: return "void"; case SPIRType::AtomicCounter: return "atomic_uint"; case SPIRType::ControlPointArray: return join("patch_control_point<", type_to_glsl(get(type.parent_type), id), ">"); case SPIRType::Interpolant: return join("interpolant<", type_to_glsl(get(type.parent_type), id), ", interpolation::", has_decoration(type.self, DecorationNoPerspective) ? "no_perspective" : "perspective", ">"); // Scalars case SPIRType::Boolean: { auto *var = maybe_get_backing_variable(id); if (var && var->basevariable) var = &get(var->basevariable); // Need to special-case threadgroup booleans. They are supposed to be logical // storage, but MSL compilers will sometimes crash if you use threadgroup bool. // Workaround this by using 16-bit types instead and fixup on load-store to this data. if ((var && var->storage == StorageClassWorkgroup) || type.storage == StorageClassWorkgroup || member) type_name = "short"; else type_name = "bool"; break; } case SPIRType::Char: case SPIRType::SByte: type_name = "char"; break; case SPIRType::UByte: type_name = "uchar"; break; case SPIRType::Short: type_name = "short"; break; case SPIRType::UShort: type_name = "ushort"; break; case SPIRType::Int: type_name = "int"; break; case SPIRType::UInt: type_name = "uint"; break; case SPIRType::Int64: if (!msl_options.supports_msl_version(2, 2)) SPIRV_CROSS_THROW("64-bit integers are only supported in MSL 2.2 and above."); type_name = "long"; break; case SPIRType::UInt64: if (!msl_options.supports_msl_version(2, 2)) SPIRV_CROSS_THROW("64-bit integers are only supported in MSL 2.2 and above."); type_name = "ulong"; break; case SPIRType::Half: type_name = "half"; break; case SPIRType::Float: type_name = "float"; break; case SPIRType::Double: type_name = "double"; // Currently unsupported break; case SPIRType::AccelerationStructure: if (msl_options.supports_msl_version(2, 4)) type_name = "raytracing::acceleration_structure"; else if (msl_options.supports_msl_version(2, 3)) type_name = "raytracing::instance_acceleration_structure"; else SPIRV_CROSS_THROW("Acceleration Structure Type is supported in MSL 2.3 and above."); break; case SPIRType::RayQuery: return "raytracing::intersection_query"; default: return "unknown_type"; } // Matrix? if (type.columns > 1) { auto *var = maybe_get_backing_variable(id); if (var && var->basevariable) var = &get(var->basevariable); // Need to special-case threadgroup matrices. Due to an oversight, Metal's // matrix struct prior to Metal 3 lacks constructors in the threadgroup AS, // preventing us from default-constructing or initializing matrices in threadgroup storage. // Work around this by using our own type as storage. if (((var && var->storage == StorageClassWorkgroup) || type.storage == StorageClassWorkgroup) && !msl_options.supports_msl_version(3, 0)) { add_spv_func_and_recompile(SPVFuncImplStorageMatrix); type_name = "spvStorage_" + type_name; } type_name += to_string(type.columns) + "x"; } // Vector or Matrix? if (type.vecsize > 1) type_name += to_string(type.vecsize); if (type.array.empty() || using_builtin_array()) { return type_name; } else { // Allow Metal to use the array template to make arrays a value type add_spv_func_and_recompile(SPVFuncImplUnsafeArray); string res; string sizes; for (uint32_t i = 0; i < uint32_t(type.array.size()); i++) { res += "spvUnsafeArray<"; sizes += ", "; sizes += to_array_size(type, i); sizes += ">"; } res += type_name + sizes; return res; } } string CompilerMSL::type_to_glsl(const SPIRType &type, uint32_t id) { return type_to_glsl(type, id, false); } string CompilerMSL::type_to_array_glsl(const SPIRType &type) { // Allow Metal to use the array template to make arrays a value type switch (type.basetype) { case SPIRType::AtomicCounter: case SPIRType::ControlPointArray: case SPIRType::RayQuery: return CompilerGLSL::type_to_array_glsl(type); default: if (type_is_array_of_pointers(type) || using_builtin_array()) return CompilerGLSL::type_to_array_glsl(type); else return ""; } } string CompilerMSL::constant_op_expression(const SPIRConstantOp &cop) { switch (cop.opcode) { case OpQuantizeToF16: add_spv_func_and_recompile(SPVFuncImplQuantizeToF16); return join("spvQuantizeToF16(", to_expression(cop.arguments[0]), ")"); default: return CompilerGLSL::constant_op_expression(cop); } } bool CompilerMSL::variable_decl_is_remapped_storage(const SPIRVariable &variable, spv::StorageClass storage) const { if (variable.storage == storage) return true; if (storage == StorageClassWorkgroup) { // Specially masked IO block variable. // Normally, we will never access IO blocks directly here. // The only scenario which that should occur is with a masked IO block. if (is_tesc_shader() && variable.storage == StorageClassOutput && has_decoration(get(variable.basetype).self, DecorationBlock)) { return true; } return variable.storage == StorageClassOutput && is_tesc_shader() && is_stage_output_variable_masked(variable); } else if (storage == StorageClassStorageBuffer) { // These builtins are passed directly; we don't want to use remapping // for them. auto builtin = (BuiltIn)get_decoration(variable.self, DecorationBuiltIn); if (is_tese_shader() && is_builtin_variable(variable) && (builtin == BuiltInTessCoord || builtin == BuiltInPrimitiveId)) return false; // We won't be able to catch writes to control point outputs here since variable // refers to a function local pointer. // This is fine, as there cannot be concurrent writers to that memory anyways, // so we just ignore that case. return (variable.storage == StorageClassOutput || variable.storage == StorageClassInput) && !variable_storage_requires_stage_io(variable.storage) && (variable.storage != StorageClassOutput || !is_stage_output_variable_masked(variable)); } else { return false; } } // GCC workaround of lambdas calling protected funcs std::string CompilerMSL::variable_decl(const SPIRType &type, const std::string &name, uint32_t id) { return CompilerGLSL::variable_decl(type, name, id); } std::string CompilerMSL::sampler_type(const SPIRType &type, uint32_t id) { auto *var = maybe_get(id); if (var && var->basevariable) { // Check against the base variable, and not a fake ID which might have been generated for this variable. id = var->basevariable; } if (!type.array.empty()) { if (!msl_options.supports_msl_version(2)) SPIRV_CROSS_THROW("MSL 2.0 or greater is required for arrays of samplers."); if (type.array.size() > 1) SPIRV_CROSS_THROW("Arrays of arrays of samplers are not supported in MSL."); // Arrays of samplers in MSL must be declared with a special array syntax ala C++11 std::array. // If we have a runtime array, it could be a variable-count descriptor set binding. uint32_t array_size = get_resource_array_size(type, id); if (array_size == 0) { add_spv_func_and_recompile(SPVFuncImplVariableDescriptor); add_spv_func_and_recompile(SPVFuncImplVariableDescriptorArray); auto &parent = get(get_pointee_type(type).parent_type); if (processing_entry_point) return join("const device spvDescriptor<", sampler_type(parent, id), ">*"); return join("const spvDescriptorArray<", sampler_type(parent, id), ">"); } auto &parent = get(get_pointee_type(type).parent_type); return join("array<", sampler_type(parent, id), ", ", array_size, ">"); } else return "sampler"; } // Returns an MSL string describing the SPIR-V image type string CompilerMSL::image_type_glsl(const SPIRType &type, uint32_t id) { auto *var = maybe_get(id); if (var && var->basevariable) { // For comparison images, check against the base variable, // and not the fake ID which might have been generated for this variable. id = var->basevariable; } if (!type.array.empty()) { uint32_t major = 2, minor = 0; if (msl_options.is_ios()) { major = 1; minor = 2; } if (!msl_options.supports_msl_version(major, minor)) { if (msl_options.is_ios()) SPIRV_CROSS_THROW("MSL 1.2 or greater is required for arrays of textures."); else SPIRV_CROSS_THROW("MSL 2.0 or greater is required for arrays of textures."); } if (type.array.size() > 1) SPIRV_CROSS_THROW("Arrays of arrays of textures are not supported in MSL."); // Arrays of images in MSL must be declared with a special array syntax ala C++11 std::array. // If we have a runtime array, it could be a variable-count descriptor set binding. uint32_t array_size = get_resource_array_size(type, id); if (array_size == 0) { add_spv_func_and_recompile(SPVFuncImplVariableDescriptor); add_spv_func_and_recompile(SPVFuncImplVariableDescriptorArray); auto &parent = get(get_pointee_type(type).parent_type); return join("const device spvDescriptor<", image_type_glsl(parent, id), ">*"); } auto &parent = get(get_pointee_type(type).parent_type); return join("array<", image_type_glsl(parent, id), ", ", array_size, ">"); } string img_type_name; // Bypass pointers because we need the real image struct auto &img_type = get(type.self).image; if (is_depth_image(type, id)) { switch (img_type.dim) { case Dim1D: case Dim2D: if (img_type.dim == Dim1D && !msl_options.texture_1D_as_2D) { // Use a native Metal 1D texture img_type_name += "depth1d_unsupported_by_metal"; break; } if (img_type.ms && img_type.arrayed) { if (!msl_options.supports_msl_version(2, 1)) SPIRV_CROSS_THROW("Multisampled array textures are supported from 2.1."); img_type_name += "depth2d_ms_array"; } else if (img_type.ms) img_type_name += "depth2d_ms"; else if (img_type.arrayed) img_type_name += "depth2d_array"; else img_type_name += "depth2d"; break; case Dim3D: img_type_name += "depth3d_unsupported_by_metal"; break; case DimCube: if (!msl_options.emulate_cube_array) img_type_name += (img_type.arrayed ? "depthcube_array" : "depthcube"); else img_type_name += (img_type.arrayed ? "depth2d_array" : "depthcube"); break; default: img_type_name += "unknown_depth_texture_type"; break; } } else { switch (img_type.dim) { case DimBuffer: if (img_type.ms || img_type.arrayed) SPIRV_CROSS_THROW("Cannot use texel buffers with multisampling or array layers."); if (msl_options.texture_buffer_native) { if (!msl_options.supports_msl_version(2, 1)) SPIRV_CROSS_THROW("Native texture_buffer type is only supported in MSL 2.1."); img_type_name = "texture_buffer"; } else img_type_name += "texture2d"; break; case Dim1D: case Dim2D: case DimSubpassData: { bool subpass_array = img_type.dim == DimSubpassData && (msl_options.multiview || msl_options.arrayed_subpass_input); if (img_type.dim == Dim1D && !msl_options.texture_1D_as_2D) { // Use a native Metal 1D texture img_type_name += (img_type.arrayed ? "texture1d_array" : "texture1d"); break; } // Use Metal's native frame-buffer fetch API for subpass inputs. if (type_is_msl_framebuffer_fetch(type)) { auto img_type_4 = get(img_type.type); img_type_4.vecsize = 4; return type_to_glsl(img_type_4); } if (img_type.ms && (img_type.arrayed || subpass_array)) { if (!msl_options.supports_msl_version(2, 1)) SPIRV_CROSS_THROW("Multisampled array textures are supported from 2.1."); img_type_name += "texture2d_ms_array"; } else if (img_type.ms) img_type_name += "texture2d_ms"; else if (img_type.arrayed || subpass_array) img_type_name += "texture2d_array"; else img_type_name += "texture2d"; break; } case Dim3D: img_type_name += "texture3d"; break; case DimCube: if (!msl_options.emulate_cube_array) img_type_name += (img_type.arrayed ? "texturecube_array" : "texturecube"); else img_type_name += (img_type.arrayed ? "texture2d_array" : "texturecube"); break; default: img_type_name += "unknown_texture_type"; break; } } // Append the pixel type img_type_name += "<"; img_type_name += type_to_glsl(get(img_type.type)); // For unsampled images, append the sample/read/write access qualifier. // For kernel images, the access qualifier my be supplied directly by SPIR-V. // Otherwise it may be set based on whether the image is read from or written to within the shader. if (type.basetype == SPIRType::Image && type.image.sampled == 2 && type.image.dim != DimSubpassData) { switch (img_type.access) { case AccessQualifierReadOnly: img_type_name += ", access::read"; break; case AccessQualifierWriteOnly: img_type_name += ", access::write"; break; case AccessQualifierReadWrite: img_type_name += ", access::read_write"; break; default: { auto *p_var = maybe_get_backing_variable(id); if (p_var && p_var->basevariable) p_var = maybe_get(p_var->basevariable); if (p_var && !has_decoration(p_var->self, DecorationNonWritable)) { img_type_name += ", access::"; if (!has_decoration(p_var->self, DecorationNonReadable)) img_type_name += "read_"; img_type_name += "write"; } break; } } } img_type_name += ">"; return img_type_name; } void CompilerMSL::emit_subgroup_op(const Instruction &i) { const uint32_t *ops = stream(i); auto op = static_cast(i.op); if (msl_options.emulate_subgroups) { // In this mode, only the GroupNonUniform cap is supported. The only op // we need to handle, then, is OpGroupNonUniformElect. if (op != OpGroupNonUniformElect) SPIRV_CROSS_THROW("Subgroup emulation does not support operations other than Elect."); // In this mode, the subgroup size is assumed to be one, so every invocation // is elected. emit_op(ops[0], ops[1], "true", true); return; } // Metal 2.0 is required. iOS only supports quad ops on 11.0 (2.0), with // full support in 13.0 (2.2). macOS only supports broadcast and shuffle on // 10.13 (2.0), with full support in 10.14 (2.1). // Note that Apple GPUs before A13 make no distinction between a quad-group // and a SIMD-group; all SIMD-groups are quad-groups on those. if (!msl_options.supports_msl_version(2)) SPIRV_CROSS_THROW("Subgroups are only supported in Metal 2.0 and up."); // If we need to do implicit bitcasts, make sure we do it with the correct type. uint32_t integer_width = get_integer_width_for_instruction(i); auto int_type = to_signed_basetype(integer_width); auto uint_type = to_unsigned_basetype(integer_width); if (msl_options.is_ios() && (!msl_options.supports_msl_version(2, 3) || !msl_options.ios_use_simdgroup_functions)) { switch (op) { default: SPIRV_CROSS_THROW("Subgroup ops beyond broadcast, ballot, and shuffle on iOS require Metal 2.3 and up."); case OpGroupNonUniformBroadcastFirst: if (!msl_options.supports_msl_version(2, 2)) SPIRV_CROSS_THROW("BroadcastFirst on iOS requires Metal 2.2 and up."); break; case OpGroupNonUniformElect: if (!msl_options.supports_msl_version(2, 2)) SPIRV_CROSS_THROW("Elect on iOS requires Metal 2.2 and up."); break; case OpGroupNonUniformAny: case OpGroupNonUniformAll: case OpGroupNonUniformAllEqual: case OpGroupNonUniformBallot: case OpGroupNonUniformInverseBallot: case OpGroupNonUniformBallotBitExtract: case OpGroupNonUniformBallotFindLSB: case OpGroupNonUniformBallotFindMSB: case OpGroupNonUniformBallotBitCount: case OpSubgroupBallotKHR: case OpSubgroupAllKHR: case OpSubgroupAnyKHR: case OpSubgroupAllEqualKHR: if (!msl_options.supports_msl_version(2, 2)) SPIRV_CROSS_THROW("Ballot ops on iOS requires Metal 2.2 and up."); break; case OpGroupNonUniformBroadcast: case OpGroupNonUniformShuffle: case OpGroupNonUniformShuffleXor: case OpGroupNonUniformShuffleUp: case OpGroupNonUniformShuffleDown: case OpGroupNonUniformQuadSwap: case OpGroupNonUniformQuadBroadcast: case OpSubgroupReadInvocationKHR: break; } } if (msl_options.is_macos() && !msl_options.supports_msl_version(2, 1)) { switch (op) { default: SPIRV_CROSS_THROW("Subgroup ops beyond broadcast and shuffle on macOS require Metal 2.1 and up."); case OpGroupNonUniformBroadcast: case OpGroupNonUniformShuffle: case OpGroupNonUniformShuffleXor: case OpGroupNonUniformShuffleUp: case OpGroupNonUniformShuffleDown: case OpSubgroupReadInvocationKHR: break; } } uint32_t op_idx = 0; uint32_t result_type = ops[op_idx++]; uint32_t id = ops[op_idx++]; Scope scope; switch (op) { case OpSubgroupBallotKHR: case OpSubgroupFirstInvocationKHR: case OpSubgroupReadInvocationKHR: case OpSubgroupAllKHR: case OpSubgroupAnyKHR: case OpSubgroupAllEqualKHR: // These earlier instructions don't have the scope operand. scope = ScopeSubgroup; break; default: scope = static_cast(evaluate_constant_u32(ops[op_idx++])); break; } if (scope != ScopeSubgroup) SPIRV_CROSS_THROW("Only subgroup scope is supported."); switch (op) { case OpGroupNonUniformElect: if (msl_options.use_quadgroup_operation()) emit_op(result_type, id, "quad_is_first()", false); else emit_op(result_type, id, "simd_is_first()", false); break; case OpGroupNonUniformBroadcast: case OpSubgroupReadInvocationKHR: emit_binary_func_op(result_type, id, ops[op_idx], ops[op_idx + 1], "spvSubgroupBroadcast"); break; case OpGroupNonUniformBroadcastFirst: case OpSubgroupFirstInvocationKHR: emit_unary_func_op(result_type, id, ops[op_idx], "spvSubgroupBroadcastFirst"); break; case OpGroupNonUniformBallot: case OpSubgroupBallotKHR: emit_unary_func_op(result_type, id, ops[op_idx], "spvSubgroupBallot"); break; case OpGroupNonUniformInverseBallot: emit_binary_func_op(result_type, id, ops[op_idx], builtin_subgroup_invocation_id_id, "spvSubgroupBallotBitExtract"); break; case OpGroupNonUniformBallotBitExtract: emit_binary_func_op(result_type, id, ops[op_idx], ops[op_idx + 1], "spvSubgroupBallotBitExtract"); break; case OpGroupNonUniformBallotFindLSB: emit_binary_func_op(result_type, id, ops[op_idx], builtin_subgroup_size_id, "spvSubgroupBallotFindLSB"); break; case OpGroupNonUniformBallotFindMSB: emit_binary_func_op(result_type, id, ops[op_idx], builtin_subgroup_size_id, "spvSubgroupBallotFindMSB"); break; case OpGroupNonUniformBallotBitCount: { auto operation = static_cast(ops[op_idx++]); switch (operation) { case GroupOperationReduce: emit_binary_func_op(result_type, id, ops[op_idx], builtin_subgroup_size_id, "spvSubgroupBallotBitCount"); break; case GroupOperationInclusiveScan: emit_binary_func_op(result_type, id, ops[op_idx], builtin_subgroup_invocation_id_id, "spvSubgroupBallotInclusiveBitCount"); break; case GroupOperationExclusiveScan: emit_binary_func_op(result_type, id, ops[op_idx], builtin_subgroup_invocation_id_id, "spvSubgroupBallotExclusiveBitCount"); break; default: SPIRV_CROSS_THROW("Invalid BitCount operation."); } break; } case OpGroupNonUniformShuffle: emit_binary_func_op(result_type, id, ops[op_idx], ops[op_idx + 1], "spvSubgroupShuffle"); break; case OpGroupNonUniformShuffleXor: emit_binary_func_op(result_type, id, ops[op_idx], ops[op_idx + 1], "spvSubgroupShuffleXor"); break; case OpGroupNonUniformShuffleUp: emit_binary_func_op(result_type, id, ops[op_idx], ops[op_idx + 1], "spvSubgroupShuffleUp"); break; case OpGroupNonUniformShuffleDown: emit_binary_func_op(result_type, id, ops[op_idx], ops[op_idx + 1], "spvSubgroupShuffleDown"); break; case OpGroupNonUniformAll: case OpSubgroupAllKHR: if (msl_options.use_quadgroup_operation()) emit_unary_func_op(result_type, id, ops[op_idx], "quad_all"); else emit_unary_func_op(result_type, id, ops[op_idx], "simd_all"); break; case OpGroupNonUniformAny: case OpSubgroupAnyKHR: if (msl_options.use_quadgroup_operation()) emit_unary_func_op(result_type, id, ops[op_idx], "quad_any"); else emit_unary_func_op(result_type, id, ops[op_idx], "simd_any"); break; case OpGroupNonUniformAllEqual: case OpSubgroupAllEqualKHR: emit_unary_func_op(result_type, id, ops[op_idx], "spvSubgroupAllEqual"); break; // clang-format off #define MSL_GROUP_OP(op, msl_op) \ case OpGroupNonUniform##op: \ { \ auto operation = static_cast(ops[op_idx++]); \ if (operation == GroupOperationReduce) \ emit_unary_func_op(result_type, id, ops[op_idx], "simd_" #msl_op); \ else if (operation == GroupOperationInclusiveScan) \ emit_unary_func_op(result_type, id, ops[op_idx], "simd_prefix_inclusive_" #msl_op); \ else if (operation == GroupOperationExclusiveScan) \ emit_unary_func_op(result_type, id, ops[op_idx], "simd_prefix_exclusive_" #msl_op); \ else if (operation == GroupOperationClusteredReduce) \ { \ /* Only cluster sizes of 4 are supported. */ \ uint32_t cluster_size = evaluate_constant_u32(ops[op_idx + 1]); \ if (cluster_size != 4) \ SPIRV_CROSS_THROW("Metal only supports quad ClusteredReduce."); \ emit_unary_func_op(result_type, id, ops[op_idx], "quad_" #msl_op); \ } \ else \ SPIRV_CROSS_THROW("Invalid group operation."); \ break; \ } MSL_GROUP_OP(FAdd, sum) MSL_GROUP_OP(FMul, product) MSL_GROUP_OP(IAdd, sum) MSL_GROUP_OP(IMul, product) #undef MSL_GROUP_OP // The others, unfortunately, don't support InclusiveScan or ExclusiveScan. #define MSL_GROUP_OP(op, msl_op) \ case OpGroupNonUniform##op: \ { \ auto operation = static_cast(ops[op_idx++]); \ if (operation == GroupOperationReduce) \ emit_unary_func_op(result_type, id, ops[op_idx], "simd_" #msl_op); \ else if (operation == GroupOperationInclusiveScan) \ SPIRV_CROSS_THROW("Metal doesn't support InclusiveScan for OpGroupNonUniform" #op "."); \ else if (operation == GroupOperationExclusiveScan) \ SPIRV_CROSS_THROW("Metal doesn't support ExclusiveScan for OpGroupNonUniform" #op "."); \ else if (operation == GroupOperationClusteredReduce) \ { \ /* Only cluster sizes of 4 are supported. */ \ uint32_t cluster_size = evaluate_constant_u32(ops[op_idx + 1]); \ if (cluster_size != 4) \ SPIRV_CROSS_THROW("Metal only supports quad ClusteredReduce."); \ emit_unary_func_op(result_type, id, ops[op_idx], "quad_" #msl_op); \ } \ else \ SPIRV_CROSS_THROW("Invalid group operation."); \ break; \ } #define MSL_GROUP_OP_CAST(op, msl_op, type) \ case OpGroupNonUniform##op: \ { \ auto operation = static_cast(ops[op_idx++]); \ if (operation == GroupOperationReduce) \ emit_unary_func_op_cast(result_type, id, ops[op_idx], "simd_" #msl_op, type, type); \ else if (operation == GroupOperationInclusiveScan) \ SPIRV_CROSS_THROW("Metal doesn't support InclusiveScan for OpGroupNonUniform" #op "."); \ else if (operation == GroupOperationExclusiveScan) \ SPIRV_CROSS_THROW("Metal doesn't support ExclusiveScan for OpGroupNonUniform" #op "."); \ else if (operation == GroupOperationClusteredReduce) \ { \ /* Only cluster sizes of 4 are supported. */ \ uint32_t cluster_size = evaluate_constant_u32(ops[op_idx + 1]); \ if (cluster_size != 4) \ SPIRV_CROSS_THROW("Metal only supports quad ClusteredReduce."); \ emit_unary_func_op_cast(result_type, id, ops[op_idx], "quad_" #msl_op, type, type); \ } \ else \ SPIRV_CROSS_THROW("Invalid group operation."); \ break; \ } MSL_GROUP_OP(FMin, min) MSL_GROUP_OP(FMax, max) MSL_GROUP_OP_CAST(SMin, min, int_type) MSL_GROUP_OP_CAST(SMax, max, int_type) MSL_GROUP_OP_CAST(UMin, min, uint_type) MSL_GROUP_OP_CAST(UMax, max, uint_type) MSL_GROUP_OP(BitwiseAnd, and) MSL_GROUP_OP(BitwiseOr, or) MSL_GROUP_OP(BitwiseXor, xor) MSL_GROUP_OP(LogicalAnd, and) MSL_GROUP_OP(LogicalOr, or) MSL_GROUP_OP(LogicalXor, xor) // clang-format on #undef MSL_GROUP_OP #undef MSL_GROUP_OP_CAST case OpGroupNonUniformQuadSwap: emit_binary_func_op(result_type, id, ops[op_idx], ops[op_idx + 1], "spvQuadSwap"); break; case OpGroupNonUniformQuadBroadcast: emit_binary_func_op(result_type, id, ops[op_idx], ops[op_idx + 1], "spvQuadBroadcast"); break; default: SPIRV_CROSS_THROW("Invalid opcode for subgroup."); } register_control_dependent_expression(id); } string CompilerMSL::bitcast_glsl_op(const SPIRType &out_type, const SPIRType &in_type) { if (out_type.basetype == in_type.basetype) return ""; assert(out_type.basetype != SPIRType::Boolean); assert(in_type.basetype != SPIRType::Boolean); bool integral_cast = type_is_integral(out_type) && type_is_integral(in_type) && (out_type.vecsize == in_type.vecsize); bool same_size_cast = (out_type.width * out_type.vecsize) == (in_type.width * in_type.vecsize); // Bitcasting can only be used between types of the same overall size. // And always formally cast between integers, because it's trivial, and also // because Metal can internally cast the results of some integer ops to a larger // size (eg. short shift right becomes int), which means chaining integer ops // together may introduce size variations that SPIR-V doesn't know about. if (same_size_cast && !integral_cast) return "as_type<" + type_to_glsl(out_type) + ">"; else return type_to_glsl(out_type); } bool CompilerMSL::emit_complex_bitcast(uint32_t, uint32_t, uint32_t) { // This is handled from the outside where we deal with PtrToU/UToPtr and friends. return false; } // Returns an MSL string identifying the name of a SPIR-V builtin. // Output builtins are qualified with the name of the stage out structure. string CompilerMSL::builtin_to_glsl(BuiltIn builtin, StorageClass storage) { switch (builtin) { // Handle HLSL-style 0-based vertex/instance index. // Override GLSL compiler strictness case BuiltInVertexId: ensure_builtin(StorageClassInput, BuiltInVertexId); if (msl_options.enable_base_index_zero && msl_options.supports_msl_version(1, 1) && (msl_options.ios_support_base_vertex_instance || msl_options.is_macos())) { if (builtin_declaration) { if (needs_base_vertex_arg != TriState::No) needs_base_vertex_arg = TriState::Yes; return "gl_VertexID"; } else { ensure_builtin(StorageClassInput, BuiltInBaseVertex); return "(gl_VertexID - gl_BaseVertex)"; } } else { return "gl_VertexID"; } case BuiltInInstanceId: ensure_builtin(StorageClassInput, BuiltInInstanceId); if (msl_options.enable_base_index_zero && msl_options.supports_msl_version(1, 1) && (msl_options.ios_support_base_vertex_instance || msl_options.is_macos())) { if (builtin_declaration) { if (needs_base_instance_arg != TriState::No) needs_base_instance_arg = TriState::Yes; return "gl_InstanceID"; } else { ensure_builtin(StorageClassInput, BuiltInBaseInstance); return "(gl_InstanceID - gl_BaseInstance)"; } } else { return "gl_InstanceID"; } case BuiltInVertexIndex: ensure_builtin(StorageClassInput, BuiltInVertexIndex); if (msl_options.enable_base_index_zero && msl_options.supports_msl_version(1, 1) && (msl_options.ios_support_base_vertex_instance || msl_options.is_macos())) { if (builtin_declaration) { if (needs_base_vertex_arg != TriState::No) needs_base_vertex_arg = TriState::Yes; return "gl_VertexIndex"; } else { ensure_builtin(StorageClassInput, BuiltInBaseVertex); return "(gl_VertexIndex - gl_BaseVertex)"; } } else { return "gl_VertexIndex"; } case BuiltInInstanceIndex: ensure_builtin(StorageClassInput, BuiltInInstanceIndex); if (msl_options.enable_base_index_zero && msl_options.supports_msl_version(1, 1) && (msl_options.ios_support_base_vertex_instance || msl_options.is_macos())) { if (builtin_declaration) { if (needs_base_instance_arg != TriState::No) needs_base_instance_arg = TriState::Yes; return "gl_InstanceIndex"; } else { ensure_builtin(StorageClassInput, BuiltInBaseInstance); return "(gl_InstanceIndex - gl_BaseInstance)"; } } else { return "gl_InstanceIndex"; } case BuiltInBaseVertex: if (msl_options.supports_msl_version(1, 1) && (msl_options.ios_support_base_vertex_instance || msl_options.is_macos())) { needs_base_vertex_arg = TriState::No; return "gl_BaseVertex"; } else { SPIRV_CROSS_THROW("BaseVertex requires Metal 1.1 and Mac or Apple A9+ hardware."); } case BuiltInBaseInstance: if (msl_options.supports_msl_version(1, 1) && (msl_options.ios_support_base_vertex_instance || msl_options.is_macos())) { needs_base_instance_arg = TriState::No; return "gl_BaseInstance"; } else { SPIRV_CROSS_THROW("BaseInstance requires Metal 1.1 and Mac or Apple A9+ hardware."); } case BuiltInDrawIndex: SPIRV_CROSS_THROW("DrawIndex is not supported in MSL."); // When used in the entry function, output builtins are qualified with output struct name. // Test storage class as NOT Input, as output builtins might be part of generic type. // Also don't do this for tessellation control shaders. case BuiltInViewportIndex: if (!msl_options.supports_msl_version(2, 0)) SPIRV_CROSS_THROW("ViewportIndex requires Metal 2.0."); /* fallthrough */ case BuiltInFragDepth: case BuiltInFragStencilRefEXT: if ((builtin == BuiltInFragDepth && !msl_options.enable_frag_depth_builtin) || (builtin == BuiltInFragStencilRefEXT && !msl_options.enable_frag_stencil_ref_builtin)) break; /* fallthrough */ case BuiltInPosition: case BuiltInPointSize: case BuiltInClipDistance: case BuiltInCullDistance: case BuiltInLayer: if (is_tesc_shader()) break; if (storage != StorageClassInput && current_function && (current_function->self == ir.default_entry_point) && !is_stage_output_builtin_masked(builtin)) return stage_out_var_name + "." + CompilerGLSL::builtin_to_glsl(builtin, storage); break; case BuiltInSampleMask: if (storage == StorageClassInput && current_function && (current_function->self == ir.default_entry_point) && (has_additional_fixed_sample_mask() || needs_sample_id)) { string samp_mask_in; samp_mask_in += "(" + CompilerGLSL::builtin_to_glsl(builtin, storage); if (has_additional_fixed_sample_mask()) samp_mask_in += " & " + additional_fixed_sample_mask_str(); if (needs_sample_id) samp_mask_in += " & (1 << gl_SampleID)"; samp_mask_in += ")"; return samp_mask_in; } if (storage != StorageClassInput && current_function && (current_function->self == ir.default_entry_point) && !is_stage_output_builtin_masked(builtin)) return stage_out_var_name + "." + CompilerGLSL::builtin_to_glsl(builtin, storage); break; case BuiltInBaryCoordKHR: case BuiltInBaryCoordNoPerspKHR: if (storage == StorageClassInput && current_function && (current_function->self == ir.default_entry_point)) return stage_in_var_name + "." + CompilerGLSL::builtin_to_glsl(builtin, storage); break; case BuiltInTessLevelOuter: if (is_tesc_shader() && storage != StorageClassInput && current_function && (current_function->self == ir.default_entry_point)) { return join(tess_factor_buffer_var_name, "[", to_expression(builtin_primitive_id_id), "].edgeTessellationFactor"); } break; case BuiltInTessLevelInner: if (is_tesc_shader() && storage != StorageClassInput && current_function && (current_function->self == ir.default_entry_point)) { return join(tess_factor_buffer_var_name, "[", to_expression(builtin_primitive_id_id), "].insideTessellationFactor"); } break; case BuiltInHelperInvocation: if (needs_manual_helper_invocation_updates()) break; if (msl_options.is_ios() && !msl_options.supports_msl_version(2, 3)) SPIRV_CROSS_THROW("simd_is_helper_thread() requires version 2.3 on iOS."); else if (msl_options.is_macos() && !msl_options.supports_msl_version(2, 1)) SPIRV_CROSS_THROW("simd_is_helper_thread() requires version 2.1 on macOS."); // In SPIR-V 1.6 with Volatile HelperInvocation, we cannot emit a fixup early. return "simd_is_helper_thread()"; default: break; } return CompilerGLSL::builtin_to_glsl(builtin, storage); } // Returns an MSL string attribute qualifer for a SPIR-V builtin string CompilerMSL::builtin_qualifier(BuiltIn builtin) { auto &execution = get_entry_point(); switch (builtin) { // Vertex function in case BuiltInVertexId: return "vertex_id"; case BuiltInVertexIndex: return "vertex_id"; case BuiltInBaseVertex: return "base_vertex"; case BuiltInInstanceId: return "instance_id"; case BuiltInInstanceIndex: return "instance_id"; case BuiltInBaseInstance: return "base_instance"; case BuiltInDrawIndex: SPIRV_CROSS_THROW("DrawIndex is not supported in MSL."); // Vertex function out case BuiltInClipDistance: return "clip_distance"; case BuiltInPointSize: return "point_size"; case BuiltInPosition: if (position_invariant) { if (!msl_options.supports_msl_version(2, 1)) SPIRV_CROSS_THROW("Invariant position is only supported on MSL 2.1 and up."); return "position, invariant"; } else return "position"; case BuiltInLayer: return "render_target_array_index"; case BuiltInViewportIndex: if (!msl_options.supports_msl_version(2, 0)) SPIRV_CROSS_THROW("ViewportIndex requires Metal 2.0."); return "viewport_array_index"; // Tess. control function in case BuiltInInvocationId: if (msl_options.multi_patch_workgroup) { // Shouldn't be reached. SPIRV_CROSS_THROW("InvocationId is computed manually with multi-patch workgroups in MSL."); } return "thread_index_in_threadgroup"; case BuiltInPatchVertices: // Shouldn't be reached. SPIRV_CROSS_THROW("PatchVertices is derived from the auxiliary buffer in MSL."); case BuiltInPrimitiveId: switch (execution.model) { case ExecutionModelTessellationControl: if (msl_options.multi_patch_workgroup) { // Shouldn't be reached. SPIRV_CROSS_THROW("PrimitiveId is computed manually with multi-patch workgroups in MSL."); } return "threadgroup_position_in_grid"; case ExecutionModelTessellationEvaluation: return "patch_id"; case ExecutionModelFragment: if (msl_options.is_ios() && !msl_options.supports_msl_version(2, 3)) SPIRV_CROSS_THROW("PrimitiveId on iOS requires MSL 2.3."); else if (msl_options.is_macos() && !msl_options.supports_msl_version(2, 2)) SPIRV_CROSS_THROW("PrimitiveId on macOS requires MSL 2.2."); return "primitive_id"; default: SPIRV_CROSS_THROW("PrimitiveId is not supported in this execution model."); } // Tess. control function out case BuiltInTessLevelOuter: case BuiltInTessLevelInner: // Shouldn't be reached. SPIRV_CROSS_THROW("Tessellation levels are handled specially in MSL."); // Tess. evaluation function in case BuiltInTessCoord: return "position_in_patch"; // Fragment function in case BuiltInFrontFacing: return "front_facing"; case BuiltInPointCoord: return "point_coord"; case BuiltInFragCoord: return "position"; case BuiltInSampleId: return "sample_id"; case BuiltInSampleMask: return "sample_mask"; case BuiltInSamplePosition: // Shouldn't be reached. SPIRV_CROSS_THROW("Sample position is retrieved by a function in MSL."); case BuiltInViewIndex: if (execution.model != ExecutionModelFragment) SPIRV_CROSS_THROW("ViewIndex is handled specially outside fragment shaders."); // The ViewIndex was implicitly used in the prior stages to set the render_target_array_index, // so we can get it from there. return "render_target_array_index"; // Fragment function out case BuiltInFragDepth: if (execution.flags.get(ExecutionModeDepthGreater)) return "depth(greater)"; else if (execution.flags.get(ExecutionModeDepthLess)) return "depth(less)"; else return "depth(any)"; case BuiltInFragStencilRefEXT: return "stencil"; // Compute function in case BuiltInGlobalInvocationId: return "thread_position_in_grid"; case BuiltInWorkgroupId: return "threadgroup_position_in_grid"; case BuiltInNumWorkgroups: return "threadgroups_per_grid"; case BuiltInLocalInvocationId: return "thread_position_in_threadgroup"; case BuiltInLocalInvocationIndex: return "thread_index_in_threadgroup"; case BuiltInSubgroupSize: if (msl_options.emulate_subgroups || msl_options.fixed_subgroup_size != 0) // Shouldn't be reached. SPIRV_CROSS_THROW("Emitting threads_per_simdgroup attribute with fixed subgroup size??"); if (execution.model == ExecutionModelFragment) { if (!msl_options.supports_msl_version(2, 2)) SPIRV_CROSS_THROW("threads_per_simdgroup requires Metal 2.2 in fragment shaders."); return "threads_per_simdgroup"; } else { // thread_execution_width is an alias for threads_per_simdgroup, and it's only available since 1.0, // but not in fragment. return "thread_execution_width"; } case BuiltInNumSubgroups: if (msl_options.emulate_subgroups) // Shouldn't be reached. SPIRV_CROSS_THROW("NumSubgroups is handled specially with emulation."); if (!msl_options.supports_msl_version(2)) SPIRV_CROSS_THROW("Subgroup builtins require Metal 2.0."); return msl_options.use_quadgroup_operation() ? "quadgroups_per_threadgroup" : "simdgroups_per_threadgroup"; case BuiltInSubgroupId: if (msl_options.emulate_subgroups) // Shouldn't be reached. SPIRV_CROSS_THROW("SubgroupId is handled specially with emulation."); if (!msl_options.supports_msl_version(2)) SPIRV_CROSS_THROW("Subgroup builtins require Metal 2.0."); return msl_options.use_quadgroup_operation() ? "quadgroup_index_in_threadgroup" : "simdgroup_index_in_threadgroup"; case BuiltInSubgroupLocalInvocationId: if (msl_options.emulate_subgroups) // Shouldn't be reached. SPIRV_CROSS_THROW("SubgroupLocalInvocationId is handled specially with emulation."); if (execution.model == ExecutionModelFragment) { if (!msl_options.supports_msl_version(2, 2)) SPIRV_CROSS_THROW("thread_index_in_simdgroup requires Metal 2.2 in fragment shaders."); return "thread_index_in_simdgroup"; } else if (execution.model == ExecutionModelKernel || execution.model == ExecutionModelGLCompute || execution.model == ExecutionModelTessellationControl || (execution.model == ExecutionModelVertex && msl_options.vertex_for_tessellation)) { // We are generating a Metal kernel function. if (!msl_options.supports_msl_version(2)) SPIRV_CROSS_THROW("Subgroup builtins in kernel functions require Metal 2.0."); return msl_options.use_quadgroup_operation() ? "thread_index_in_quadgroup" : "thread_index_in_simdgroup"; } else SPIRV_CROSS_THROW("Subgroup builtins are not available in this type of function."); case BuiltInSubgroupEqMask: case BuiltInSubgroupGeMask: case BuiltInSubgroupGtMask: case BuiltInSubgroupLeMask: case BuiltInSubgroupLtMask: // Shouldn't be reached. SPIRV_CROSS_THROW("Subgroup ballot masks are handled specially in MSL."); case BuiltInBaryCoordKHR: if (msl_options.is_ios() && !msl_options.supports_msl_version(2, 3)) SPIRV_CROSS_THROW("Barycentrics are only supported in MSL 2.3 and above on iOS."); else if (!msl_options.supports_msl_version(2, 2)) SPIRV_CROSS_THROW("Barycentrics are only supported in MSL 2.2 and above on macOS."); return "barycentric_coord, center_perspective"; case BuiltInBaryCoordNoPerspKHR: if (msl_options.is_ios() && !msl_options.supports_msl_version(2, 3)) SPIRV_CROSS_THROW("Barycentrics are only supported in MSL 2.3 and above on iOS."); else if (!msl_options.supports_msl_version(2, 2)) SPIRV_CROSS_THROW("Barycentrics are only supported in MSL 2.2 and above on macOS."); return "barycentric_coord, center_no_perspective"; default: return "unsupported-built-in"; } } // Returns an MSL string type declaration for a SPIR-V builtin string CompilerMSL::builtin_type_decl(BuiltIn builtin, uint32_t id) { switch (builtin) { // Vertex function in case BuiltInVertexId: return "uint"; case BuiltInVertexIndex: return "uint"; case BuiltInBaseVertex: return "uint"; case BuiltInInstanceId: return "uint"; case BuiltInInstanceIndex: return "uint"; case BuiltInBaseInstance: return "uint"; case BuiltInDrawIndex: SPIRV_CROSS_THROW("DrawIndex is not supported in MSL."); // Vertex function out case BuiltInClipDistance: case BuiltInCullDistance: return "float"; case BuiltInPointSize: return "float"; case BuiltInPosition: return "float4"; case BuiltInLayer: return "uint"; case BuiltInViewportIndex: if (!msl_options.supports_msl_version(2, 0)) SPIRV_CROSS_THROW("ViewportIndex requires Metal 2.0."); return "uint"; // Tess. control function in case BuiltInInvocationId: return "uint"; case BuiltInPatchVertices: return "uint"; case BuiltInPrimitiveId: return "uint"; // Tess. control function out case BuiltInTessLevelInner: if (is_tese_shader()) return (msl_options.raw_buffer_tese_input || is_tessellating_triangles()) ? "float" : "float2"; return "half"; case BuiltInTessLevelOuter: if (is_tese_shader()) return (msl_options.raw_buffer_tese_input || is_tessellating_triangles()) ? "float" : "float4"; return "half"; // Tess. evaluation function in case BuiltInTessCoord: return "float3"; // Fragment function in case BuiltInFrontFacing: return "bool"; case BuiltInPointCoord: return "float2"; case BuiltInFragCoord: return "float4"; case BuiltInSampleId: return "uint"; case BuiltInSampleMask: return "uint"; case BuiltInSamplePosition: return "float2"; case BuiltInViewIndex: return "uint"; case BuiltInHelperInvocation: return "bool"; case BuiltInBaryCoordKHR: case BuiltInBaryCoordNoPerspKHR: // Use the type as declared, can be 1, 2 or 3 components. return type_to_glsl(get_variable_data_type(get(id))); // Fragment function out case BuiltInFragDepth: return "float"; case BuiltInFragStencilRefEXT: return "uint"; // Compute function in case BuiltInGlobalInvocationId: case BuiltInLocalInvocationId: case BuiltInNumWorkgroups: case BuiltInWorkgroupId: return "uint3"; case BuiltInLocalInvocationIndex: case BuiltInNumSubgroups: case BuiltInSubgroupId: case BuiltInSubgroupSize: case BuiltInSubgroupLocalInvocationId: return "uint"; case BuiltInSubgroupEqMask: case BuiltInSubgroupGeMask: case BuiltInSubgroupGtMask: case BuiltInSubgroupLeMask: case BuiltInSubgroupLtMask: return "uint4"; case BuiltInDeviceIndex: return "int"; default: return "unsupported-built-in-type"; } } // Returns the declaration of a built-in argument to a function string CompilerMSL::built_in_func_arg(BuiltIn builtin, bool prefix_comma) { string bi_arg; if (prefix_comma) bi_arg += ", "; // Handle HLSL-style 0-based vertex/instance index. builtin_declaration = true; bi_arg += builtin_type_decl(builtin); bi_arg += string(" ") + builtin_to_glsl(builtin, StorageClassInput); bi_arg += string(" [[") + builtin_qualifier(builtin) + string("]]"); builtin_declaration = false; return bi_arg; } const SPIRType &CompilerMSL::get_physical_member_type(const SPIRType &type, uint32_t index) const { if (member_is_remapped_physical_type(type, index)) return get(get_extended_member_decoration(type.self, index, SPIRVCrossDecorationPhysicalTypeID)); else return get(type.member_types[index]); } SPIRType CompilerMSL::get_presumed_input_type(const SPIRType &ib_type, uint32_t index) const { SPIRType type = get_physical_member_type(ib_type, index); uint32_t loc = get_member_decoration(ib_type.self, index, DecorationLocation); uint32_t cmp = get_member_decoration(ib_type.self, index, DecorationComponent); auto p_va = inputs_by_location.find({loc, cmp}); if (p_va != end(inputs_by_location) && p_va->second.vecsize > type.vecsize) type.vecsize = p_va->second.vecsize; return type; } uint32_t CompilerMSL::get_declared_type_array_stride_msl(const SPIRType &type, bool is_packed, bool row_major) const { // Array stride in MSL is always size * array_size. sizeof(float3) == 16, // unlike GLSL and HLSL where array stride would be 16 and size 12. // We could use parent type here and recurse, but that makes creating physical type remappings // far more complicated. We'd rather just create the final type, and ignore having to create the entire type // hierarchy in order to compute this value, so make a temporary type on the stack. auto basic_type = type; basic_type.array.clear(); basic_type.array_size_literal.clear(); uint32_t value_size = get_declared_type_size_msl(basic_type, is_packed, row_major); uint32_t dimensions = uint32_t(type.array.size()); assert(dimensions > 0); dimensions--; // Multiply together every dimension, except the last one. for (uint32_t dim = 0; dim < dimensions; dim++) { uint32_t array_size = to_array_size_literal(type, dim); value_size *= max(array_size, 1u); } return value_size; } uint32_t CompilerMSL::get_declared_struct_member_array_stride_msl(const SPIRType &type, uint32_t index) const { return get_declared_type_array_stride_msl(get_physical_member_type(type, index), member_is_packed_physical_type(type, index), has_member_decoration(type.self, index, DecorationRowMajor)); } uint32_t CompilerMSL::get_declared_input_array_stride_msl(const SPIRType &type, uint32_t index) const { return get_declared_type_array_stride_msl(get_presumed_input_type(type, index), false, has_member_decoration(type.self, index, DecorationRowMajor)); } uint32_t CompilerMSL::get_declared_type_matrix_stride_msl(const SPIRType &type, bool packed, bool row_major) const { // For packed matrices, we just use the size of the vector type. // Otherwise, MatrixStride == alignment, which is the size of the underlying vector type. if (packed) return (type.width / 8) * ((row_major && type.columns > 1) ? type.columns : type.vecsize); else return get_declared_type_alignment_msl(type, false, row_major); } uint32_t CompilerMSL::get_declared_struct_member_matrix_stride_msl(const SPIRType &type, uint32_t index) const { return get_declared_type_matrix_stride_msl(get_physical_member_type(type, index), member_is_packed_physical_type(type, index), has_member_decoration(type.self, index, DecorationRowMajor)); } uint32_t CompilerMSL::get_declared_input_matrix_stride_msl(const SPIRType &type, uint32_t index) const { return get_declared_type_matrix_stride_msl(get_presumed_input_type(type, index), false, has_member_decoration(type.self, index, DecorationRowMajor)); } uint32_t CompilerMSL::get_declared_struct_size_msl(const SPIRType &struct_type, bool ignore_alignment, bool ignore_padding) const { // If we have a target size, that is the declared size as well. if (!ignore_padding && has_extended_decoration(struct_type.self, SPIRVCrossDecorationPaddingTarget)) return get_extended_decoration(struct_type.self, SPIRVCrossDecorationPaddingTarget); if (struct_type.member_types.empty()) return 0; uint32_t mbr_cnt = uint32_t(struct_type.member_types.size()); // In MSL, a struct's alignment is equal to the maximum alignment of any of its members. uint32_t alignment = 1; if (!ignore_alignment) { for (uint32_t i = 0; i < mbr_cnt; i++) { uint32_t mbr_alignment = get_declared_struct_member_alignment_msl(struct_type, i); alignment = max(alignment, mbr_alignment); } } // Last member will always be matched to the final Offset decoration, but size of struct in MSL now depends // on physical size in MSL, and the size of the struct itself is then aligned to struct alignment. uint32_t spirv_offset = type_struct_member_offset(struct_type, mbr_cnt - 1); uint32_t msl_size = spirv_offset + get_declared_struct_member_size_msl(struct_type, mbr_cnt - 1); msl_size = (msl_size + alignment - 1) & ~(alignment - 1); return msl_size; } // Returns the byte size of a struct member. uint32_t CompilerMSL::get_declared_type_size_msl(const SPIRType &type, bool is_packed, bool row_major) const { // Pointers take 8 bytes each if (type.pointer && type.storage == StorageClassPhysicalStorageBuffer) { uint32_t type_size = 8 * (type.vecsize == 3 ? 4 : type.vecsize); // Work our way through potentially layered arrays, // stopping when we hit a pointer that is not also an array. int32_t dim_idx = (int32_t)type.array.size() - 1; auto *p_type = &type; while (!type_is_pointer(*p_type) && dim_idx >= 0) { type_size *= to_array_size_literal(*p_type, dim_idx); p_type = &get(p_type->parent_type); dim_idx--; } return type_size; } switch (type.basetype) { case SPIRType::Unknown: case SPIRType::Void: case SPIRType::AtomicCounter: case SPIRType::Image: case SPIRType::SampledImage: case SPIRType::Sampler: SPIRV_CROSS_THROW("Querying size of opaque object."); default: { if (!type.array.empty()) { uint32_t array_size = to_array_size_literal(type); return get_declared_type_array_stride_msl(type, is_packed, row_major) * max(array_size, 1u); } if (type.basetype == SPIRType::Struct) return get_declared_struct_size_msl(type); if (is_packed) { return type.vecsize * type.columns * (type.width / 8); } else { // An unpacked 3-element vector or matrix column is the same memory size as a 4-element. uint32_t vecsize = type.vecsize; uint32_t columns = type.columns; if (row_major && columns > 1) swap(vecsize, columns); if (vecsize == 3) vecsize = 4; return vecsize * columns * (type.width / 8); } } } } uint32_t CompilerMSL::get_declared_struct_member_size_msl(const SPIRType &type, uint32_t index) const { return get_declared_type_size_msl(get_physical_member_type(type, index), member_is_packed_physical_type(type, index), has_member_decoration(type.self, index, DecorationRowMajor)); } uint32_t CompilerMSL::get_declared_input_size_msl(const SPIRType &type, uint32_t index) const { return get_declared_type_size_msl(get_presumed_input_type(type, index), false, has_member_decoration(type.self, index, DecorationRowMajor)); } // Returns the byte alignment of a type. uint32_t CompilerMSL::get_declared_type_alignment_msl(const SPIRType &type, bool is_packed, bool row_major) const { // Pointers aligns on multiples of 8 bytes if (type.pointer && type.storage == StorageClassPhysicalStorageBuffer) return 8 * (type.vecsize == 3 ? 4 : type.vecsize); switch (type.basetype) { case SPIRType::Unknown: case SPIRType::Void: case SPIRType::AtomicCounter: case SPIRType::Image: case SPIRType::SampledImage: case SPIRType::Sampler: SPIRV_CROSS_THROW("Querying alignment of opaque object."); case SPIRType::Double: SPIRV_CROSS_THROW("double types are not supported in buffers in MSL."); case SPIRType::Struct: { // In MSL, a struct's alignment is equal to the maximum alignment of any of its members. uint32_t alignment = 1; for (uint32_t i = 0; i < type.member_types.size(); i++) alignment = max(alignment, uint32_t(get_declared_struct_member_alignment_msl(type, i))); return alignment; } default: { if (type.basetype == SPIRType::Int64 && !msl_options.supports_msl_version(2, 3)) SPIRV_CROSS_THROW("long types in buffers are only supported in MSL 2.3 and above."); if (type.basetype == SPIRType::UInt64 && !msl_options.supports_msl_version(2, 3)) SPIRV_CROSS_THROW("ulong types in buffers are only supported in MSL 2.3 and above."); // Alignment of packed type is the same as the underlying component or column size. // Alignment of unpacked type is the same as the vector size. // Alignment of 3-elements vector is the same as 4-elements (including packed using column). if (is_packed) { // If we have packed_T and friends, the alignment is always scalar. return type.width / 8; } else { // This is the general rule for MSL. Size == alignment. uint32_t vecsize = (row_major && type.columns > 1) ? type.columns : type.vecsize; return (type.width / 8) * (vecsize == 3 ? 4 : vecsize); } } } } uint32_t CompilerMSL::get_declared_struct_member_alignment_msl(const SPIRType &type, uint32_t index) const { return get_declared_type_alignment_msl(get_physical_member_type(type, index), member_is_packed_physical_type(type, index), has_member_decoration(type.self, index, DecorationRowMajor)); } uint32_t CompilerMSL::get_declared_input_alignment_msl(const SPIRType &type, uint32_t index) const { return get_declared_type_alignment_msl(get_presumed_input_type(type, index), false, has_member_decoration(type.self, index, DecorationRowMajor)); } bool CompilerMSL::skip_argument(uint32_t) const { return false; } void CompilerMSL::analyze_sampled_image_usage() { if (msl_options.swizzle_texture_samples) { SampledImageScanner scanner(*this); traverse_all_reachable_opcodes(get(ir.default_entry_point), scanner); } } bool CompilerMSL::SampledImageScanner::handle(spv::Op opcode, const uint32_t *args, uint32_t length) { switch (opcode) { case OpLoad: case OpImage: case OpSampledImage: { if (length < 3) return false; uint32_t result_type = args[0]; auto &type = compiler.get(result_type); if ((type.basetype != SPIRType::Image && type.basetype != SPIRType::SampledImage) || type.image.sampled != 1) return true; uint32_t id = args[1]; compiler.set(id, "", result_type, true); break; } case OpImageSampleExplicitLod: case OpImageSampleProjExplicitLod: case OpImageSampleDrefExplicitLod: case OpImageSampleProjDrefExplicitLod: case OpImageSampleImplicitLod: case OpImageSampleProjImplicitLod: case OpImageSampleDrefImplicitLod: case OpImageSampleProjDrefImplicitLod: case OpImageFetch: case OpImageGather: case OpImageDrefGather: compiler.has_sampled_images = compiler.has_sampled_images || compiler.is_sampled_image_type(compiler.expression_type(args[2])); compiler.needs_swizzle_buffer_def = compiler.needs_swizzle_buffer_def || compiler.has_sampled_images; break; default: break; } return true; } // If a needed custom function wasn't added before, add it and force a recompile. void CompilerMSL::add_spv_func_and_recompile(SPVFuncImpl spv_func) { if (spv_function_implementations.count(spv_func) == 0) { spv_function_implementations.insert(spv_func); suppress_missing_prototypes = true; force_recompile(); } } bool CompilerMSL::OpCodePreprocessor::handle(Op opcode, const uint32_t *args, uint32_t length) { // Since MSL exists in a single execution scope, function prototype declarations are not // needed, and clutter the output. If secondary functions are output (either as a SPIR-V // function implementation or as indicated by the presence of OpFunctionCall), then set // suppress_missing_prototypes to suppress compiler warnings of missing function prototypes. // Mark if the input requires the implementation of an SPIR-V function that does not exist in Metal. SPVFuncImpl spv_func = get_spv_func_impl(opcode, args); if (spv_func != SPVFuncImplNone) { compiler.spv_function_implementations.insert(spv_func); suppress_missing_prototypes = true; } switch (opcode) { case OpFunctionCall: suppress_missing_prototypes = true; break; case OpDemoteToHelperInvocationEXT: uses_discard = true; break; // Emulate texture2D atomic operations case OpImageTexelPointer: { if (!compiler.msl_options.supports_msl_version(3, 1)) { auto *var = compiler.maybe_get_backing_variable(args[2]); image_pointers_emulated[args[1]] = var ? var->self : ID(0); } break; } case OpImageWrite: uses_image_write = true; break; case OpStore: check_resource_write(args[0]); break; // Emulate texture2D atomic operations case OpAtomicExchange: case OpAtomicCompareExchange: case OpAtomicCompareExchangeWeak: case OpAtomicIIncrement: case OpAtomicIDecrement: case OpAtomicIAdd: case OpAtomicFAddEXT: case OpAtomicISub: case OpAtomicSMin: case OpAtomicUMin: case OpAtomicSMax: case OpAtomicUMax: case OpAtomicAnd: case OpAtomicOr: case OpAtomicXor: { uses_atomics = true; auto it = image_pointers_emulated.find(args[2]); if (it != image_pointers_emulated.end()) { uses_image_write = true; compiler.atomic_image_vars_emulated.insert(it->second); } else check_resource_write(args[2]); break; } case OpAtomicStore: { uses_atomics = true; auto it = image_pointers_emulated.find(args[0]); if (it != image_pointers_emulated.end()) { compiler.atomic_image_vars_emulated.insert(it->second); uses_image_write = true; } else check_resource_write(args[0]); break; } case OpAtomicLoad: { uses_atomics = true; auto it = image_pointers_emulated.find(args[2]); if (it != image_pointers_emulated.end()) { compiler.atomic_image_vars_emulated.insert(it->second); } break; } case OpGroupNonUniformInverseBallot: needs_subgroup_invocation_id = true; break; case OpGroupNonUniformBallotFindLSB: case OpGroupNonUniformBallotFindMSB: needs_subgroup_size = true; break; case OpGroupNonUniformBallotBitCount: if (args[3] == GroupOperationReduce) needs_subgroup_size = true; else needs_subgroup_invocation_id = true; break; case OpArrayLength: { auto *var = compiler.maybe_get_backing_variable(args[2]); if (var != nullptr) { if (!compiler.is_var_runtime_size_array(*var)) compiler.buffers_requiring_array_length.insert(var->self); } break; } case OpInBoundsAccessChain: case OpAccessChain: case OpPtrAccessChain: { // OpArrayLength might want to know if taking ArrayLength of an array of SSBOs. uint32_t result_type = args[0]; uint32_t id = args[1]; uint32_t ptr = args[2]; compiler.set(id, "", result_type, true); compiler.register_read(id, ptr, true); compiler.ir.ids[id].set_allow_type_rewrite(); break; } case OpExtInst: { uint32_t extension_set = args[2]; if (compiler.get(extension_set).ext == SPIRExtension::GLSL) { auto op_450 = static_cast(args[3]); switch (op_450) { case GLSLstd450InterpolateAtCentroid: case GLSLstd450InterpolateAtSample: case GLSLstd450InterpolateAtOffset: { if (!compiler.msl_options.supports_msl_version(2, 3)) SPIRV_CROSS_THROW("Pull-model interpolation requires MSL 2.3."); // Fragment varyings used with pull-model interpolation need special handling, // due to the way pull-model interpolation works in Metal. auto *var = compiler.maybe_get_backing_variable(args[4]); if (var) { compiler.pull_model_inputs.insert(var->self); auto &var_type = compiler.get_variable_element_type(*var); // In addition, if this variable has a 'Sample' decoration, we need the sample ID // in order to do default interpolation. if (compiler.has_decoration(var->self, DecorationSample)) { needs_sample_id = true; } else if (var_type.basetype == SPIRType::Struct) { // Now we need to check each member and see if it has this decoration. for (uint32_t i = 0; i < var_type.member_types.size(); ++i) { if (compiler.has_member_decoration(var_type.self, i, DecorationSample)) { needs_sample_id = true; break; } } } } break; } default: break; } } break; } case OpIsHelperInvocationEXT: if (compiler.needs_manual_helper_invocation_updates()) needs_helper_invocation = true; break; default: break; } // If it has one, keep track of the instruction's result type, mapped by ID uint32_t result_type, result_id; if (compiler.instruction_to_result_type(result_type, result_id, opcode, args, length)) result_types[result_id] = result_type; return true; } // If the variable is a Uniform or StorageBuffer, mark that a resource has been written to. void CompilerMSL::OpCodePreprocessor::check_resource_write(uint32_t var_id) { auto *p_var = compiler.maybe_get_backing_variable(var_id); StorageClass sc = p_var ? p_var->storage : StorageClassMax; if (sc == StorageClassUniform || sc == StorageClassStorageBuffer) uses_buffer_write = true; } // Returns an enumeration of a SPIR-V function that needs to be output for certain Op codes. CompilerMSL::SPVFuncImpl CompilerMSL::OpCodePreprocessor::get_spv_func_impl(Op opcode, const uint32_t *args) { switch (opcode) { case OpFMod: return SPVFuncImplMod; case OpFAdd: case OpFSub: if (compiler.msl_options.invariant_float_math || compiler.has_decoration(args[1], DecorationNoContraction)) { return opcode == OpFAdd ? SPVFuncImplFAdd : SPVFuncImplFSub; } break; case OpFMul: case OpOuterProduct: case OpMatrixTimesVector: case OpVectorTimesMatrix: case OpMatrixTimesMatrix: if (compiler.msl_options.invariant_float_math || compiler.has_decoration(args[1], DecorationNoContraction)) { return SPVFuncImplFMul; } break; case OpQuantizeToF16: return SPVFuncImplQuantizeToF16; case OpTypeArray: { // Allow Metal to use the array template to make arrays a value type return SPVFuncImplUnsafeArray; } // Emulate texture2D atomic operations case OpAtomicExchange: case OpAtomicCompareExchange: case OpAtomicCompareExchangeWeak: case OpAtomicIIncrement: case OpAtomicIDecrement: case OpAtomicIAdd: case OpAtomicFAddEXT: case OpAtomicISub: case OpAtomicSMin: case OpAtomicUMin: case OpAtomicSMax: case OpAtomicUMax: case OpAtomicAnd: case OpAtomicOr: case OpAtomicXor: case OpAtomicLoad: case OpAtomicStore: { auto it = image_pointers_emulated.find(args[opcode == OpAtomicStore ? 0 : 2]); if (it != image_pointers_emulated.end()) { uint32_t tid = compiler.get(it->second).basetype; if (tid && compiler.get(tid).image.dim == Dim2D) return SPVFuncImplImage2DAtomicCoords; } break; } case OpImageFetch: case OpImageRead: case OpImageWrite: { // Retrieve the image type, and if it's a Buffer, emit a texel coordinate function uint32_t tid = result_types[args[opcode == OpImageWrite ? 0 : 2]]; if (tid && compiler.get(tid).image.dim == DimBuffer && !compiler.msl_options.texture_buffer_native) return SPVFuncImplTexelBufferCoords; break; } case OpExtInst: { uint32_t extension_set = args[2]; if (compiler.get(extension_set).ext == SPIRExtension::GLSL) { auto op_450 = static_cast(args[3]); switch (op_450) { case GLSLstd450Radians: return SPVFuncImplRadians; case GLSLstd450Degrees: return SPVFuncImplDegrees; case GLSLstd450FindILsb: return SPVFuncImplFindILsb; case GLSLstd450FindSMsb: return SPVFuncImplFindSMsb; case GLSLstd450FindUMsb: return SPVFuncImplFindUMsb; case GLSLstd450SSign: return SPVFuncImplSSign; case GLSLstd450Reflect: { auto &type = compiler.get(args[0]); if (type.vecsize == 1) return SPVFuncImplReflectScalar; break; } case GLSLstd450Refract: { auto &type = compiler.get(args[0]); if (type.vecsize == 1) return SPVFuncImplRefractScalar; break; } case GLSLstd450FaceForward: { auto &type = compiler.get(args[0]); if (type.vecsize == 1) return SPVFuncImplFaceForwardScalar; break; } case GLSLstd450MatrixInverse: { auto &mat_type = compiler.get(args[0]); switch (mat_type.columns) { case 2: return SPVFuncImplInverse2x2; case 3: return SPVFuncImplInverse3x3; case 4: return SPVFuncImplInverse4x4; default: break; } break; } default: break; } } break; } case OpGroupNonUniformBroadcast: case OpSubgroupReadInvocationKHR: return SPVFuncImplSubgroupBroadcast; case OpGroupNonUniformBroadcastFirst: case OpSubgroupFirstInvocationKHR: return SPVFuncImplSubgroupBroadcastFirst; case OpGroupNonUniformBallot: case OpSubgroupBallotKHR: return SPVFuncImplSubgroupBallot; case OpGroupNonUniformInverseBallot: case OpGroupNonUniformBallotBitExtract: return SPVFuncImplSubgroupBallotBitExtract; case OpGroupNonUniformBallotFindLSB: return SPVFuncImplSubgroupBallotFindLSB; case OpGroupNonUniformBallotFindMSB: return SPVFuncImplSubgroupBallotFindMSB; case OpGroupNonUniformBallotBitCount: return SPVFuncImplSubgroupBallotBitCount; case OpGroupNonUniformAllEqual: case OpSubgroupAllEqualKHR: return SPVFuncImplSubgroupAllEqual; case OpGroupNonUniformShuffle: return SPVFuncImplSubgroupShuffle; case OpGroupNonUniformShuffleXor: return SPVFuncImplSubgroupShuffleXor; case OpGroupNonUniformShuffleUp: return SPVFuncImplSubgroupShuffleUp; case OpGroupNonUniformShuffleDown: return SPVFuncImplSubgroupShuffleDown; case OpGroupNonUniformQuadBroadcast: return SPVFuncImplQuadBroadcast; case OpGroupNonUniformQuadSwap: return SPVFuncImplQuadSwap; default: break; } return SPVFuncImplNone; } // Sort both type and meta member content based on builtin status (put builtins at end), // then by the required sorting aspect. void CompilerMSL::MemberSorter::sort() { // Create a temporary array of consecutive member indices and sort it based on how // the members should be reordered, based on builtin and sorting aspect meta info. size_t mbr_cnt = type.member_types.size(); SmallVector mbr_idxs(mbr_cnt); std::iota(mbr_idxs.begin(), mbr_idxs.end(), 0); // Fill with consecutive indices std::stable_sort(mbr_idxs.begin(), mbr_idxs.end(), *this); // Sort member indices based on sorting aspect bool sort_is_identity = true; for (uint32_t mbr_idx = 0; mbr_idx < mbr_cnt; mbr_idx++) { if (mbr_idx != mbr_idxs[mbr_idx]) { sort_is_identity = false; break; } } if (sort_is_identity) return; if (meta.members.size() < type.member_types.size()) { // This should never trigger in normal circumstances, but to be safe. meta.members.resize(type.member_types.size()); } // Move type and meta member info to the order defined by the sorted member indices. // This is done by creating temporary copies of both member types and meta, and then // copying back to the original content at the sorted indices. auto mbr_types_cpy = type.member_types; auto mbr_meta_cpy = meta.members; for (uint32_t mbr_idx = 0; mbr_idx < mbr_cnt; mbr_idx++) { type.member_types[mbr_idx] = mbr_types_cpy[mbr_idxs[mbr_idx]]; meta.members[mbr_idx] = mbr_meta_cpy[mbr_idxs[mbr_idx]]; } // If we're sorting by Offset, this might affect user code which accesses a buffer block. // We will need to redirect member indices from defined index to sorted index using reverse lookup. if (sort_aspect == SortAspect::Offset) { type.member_type_index_redirection.resize(mbr_cnt); for (uint32_t map_idx = 0; map_idx < mbr_cnt; map_idx++) type.member_type_index_redirection[mbr_idxs[map_idx]] = map_idx; } } bool CompilerMSL::MemberSorter::operator()(uint32_t mbr_idx1, uint32_t mbr_idx2) { auto &mbr_meta1 = meta.members[mbr_idx1]; auto &mbr_meta2 = meta.members[mbr_idx2]; if (sort_aspect == LocationThenBuiltInType) { // Sort first by builtin status (put builtins at end), then by the sorting aspect. if (mbr_meta1.builtin != mbr_meta2.builtin) return mbr_meta2.builtin; else if (mbr_meta1.builtin) return mbr_meta1.builtin_type < mbr_meta2.builtin_type; else if (mbr_meta1.location == mbr_meta2.location) return mbr_meta1.component < mbr_meta2.component; else return mbr_meta1.location < mbr_meta2.location; } else return mbr_meta1.offset < mbr_meta2.offset; } CompilerMSL::MemberSorter::MemberSorter(SPIRType &t, Meta &m, SortAspect sa) : type(t) , meta(m) , sort_aspect(sa) { // Ensure enough meta info is available meta.members.resize(max(type.member_types.size(), meta.members.size())); } void CompilerMSL::remap_constexpr_sampler(VariableID id, const MSLConstexprSampler &sampler) { auto &type = get(get(id).basetype); if (type.basetype != SPIRType::SampledImage && type.basetype != SPIRType::Sampler) SPIRV_CROSS_THROW("Can only remap SampledImage and Sampler type."); if (!type.array.empty()) SPIRV_CROSS_THROW("Can not remap array of samplers."); constexpr_samplers_by_id[id] = sampler; } void CompilerMSL::remap_constexpr_sampler_by_binding(uint32_t desc_set, uint32_t binding, const MSLConstexprSampler &sampler) { constexpr_samplers_by_binding[{ desc_set, binding }] = sampler; } void CompilerMSL::cast_from_variable_load(uint32_t source_id, std::string &expr, const SPIRType &expr_type) { bool is_packed = has_extended_decoration(source_id, SPIRVCrossDecorationPhysicalTypePacked); auto *source_expr = maybe_get(source_id); auto *var = maybe_get_backing_variable(source_id); const SPIRType *var_type = nullptr, *phys_type = nullptr; if (uint32_t phys_id = get_extended_decoration(source_id, SPIRVCrossDecorationPhysicalTypeID)) phys_type = &get(phys_id); else phys_type = &expr_type; if (var) { source_id = var->self; var_type = &get_variable_data_type(*var); } bool rewrite_boolean_load = expr_type.basetype == SPIRType::Boolean && (var && (var->storage == StorageClassWorkgroup || var_type->basetype == SPIRType::Struct)); // Type fixups for workgroup variables if they are booleans. if (rewrite_boolean_load) { if (is_array(expr_type)) expr = to_rerolled_array_expression(expr_type, expr, expr_type); else expr = join(type_to_glsl(expr_type), "(", expr, ")"); } // Type fixups for workgroup variables if they are matrices. // Don't do fixup for packed types; those are handled specially. // FIXME: Maybe use a type like spvStorageMatrix for packed matrices? if (!msl_options.supports_msl_version(3, 0) && var && (var->storage == StorageClassWorkgroup || (var_type->basetype == SPIRType::Struct && has_extended_decoration(var_type->self, SPIRVCrossDecorationWorkgroupStruct) && !is_packed)) && expr_type.columns > 1) { SPIRType matrix_type = *phys_type; if (source_expr && source_expr->need_transpose) swap(matrix_type.vecsize, matrix_type.columns); matrix_type.array.clear(); matrix_type.array_size_literal.clear(); expr = join(type_to_glsl(matrix_type), "(", expr, ")"); } // Only interested in standalone builtin variables in the switch below. if (!has_decoration(source_id, DecorationBuiltIn)) { // If the backing variable does not match our expected sign, we can fix it up here. // See ensure_correct_input_type(). if (var && var->storage == StorageClassInput) { auto &base_type = get(var->basetype); if (base_type.basetype != SPIRType::Struct && expr_type.basetype != base_type.basetype) expr = join(type_to_glsl(expr_type), "(", expr, ")"); } return; } auto builtin = static_cast(get_decoration(source_id, DecorationBuiltIn)); auto expected_type = expr_type.basetype; auto expected_width = expr_type.width; switch (builtin) { case BuiltInGlobalInvocationId: case BuiltInLocalInvocationId: case BuiltInWorkgroupId: case BuiltInLocalInvocationIndex: case BuiltInWorkgroupSize: case BuiltInNumWorkgroups: case BuiltInLayer: case BuiltInViewportIndex: case BuiltInFragStencilRefEXT: case BuiltInPrimitiveId: case BuiltInSubgroupSize: case BuiltInSubgroupLocalInvocationId: case BuiltInViewIndex: case BuiltInVertexIndex: case BuiltInInstanceIndex: case BuiltInBaseInstance: case BuiltInBaseVertex: case BuiltInSampleMask: expected_type = SPIRType::UInt; expected_width = 32; break; case BuiltInTessLevelInner: case BuiltInTessLevelOuter: if (is_tesc_shader()) { expected_type = SPIRType::Half; expected_width = 16; } break; default: break; } if (is_array(expr_type) && builtin == BuiltInSampleMask) { // Needs special handling. auto wrap_expr = join(type_to_glsl(expr_type), "({ "); wrap_expr += join(type_to_glsl(get(expr_type.parent_type)), "(", expr, ")"); wrap_expr += " })"; expr = std::move(wrap_expr); } else if (expected_type != expr_type.basetype) { if (is_array(expr_type) && (builtin == BuiltInTessLevelInner || builtin == BuiltInTessLevelOuter)) { // Triggers when loading TessLevel directly as an array. // Need explicit padding + cast. auto wrap_expr = join(type_to_glsl(expr_type), "({ "); uint32_t array_size = get_physical_tess_level_array_size(builtin); for (uint32_t i = 0; i < array_size; i++) { if (array_size > 1) wrap_expr += join("float(", expr, "[", i, "])"); else wrap_expr += join("float(", expr, ")"); if (i + 1 < array_size) wrap_expr += ", "; } if (is_tessellating_triangles()) wrap_expr += ", 0.0"; wrap_expr += " })"; expr = std::move(wrap_expr); } else { // These are of different widths, so we cannot do a straight bitcast. if (expected_width != expr_type.width) expr = join(type_to_glsl(expr_type), "(", expr, ")"); else expr = bitcast_expression(expr_type, expected_type, expr); } } } void CompilerMSL::cast_to_variable_store(uint32_t target_id, std::string &expr, const SPIRType &expr_type) { bool is_packed = has_extended_decoration(target_id, SPIRVCrossDecorationPhysicalTypePacked); auto *target_expr = maybe_get(target_id); auto *var = maybe_get_backing_variable(target_id); const SPIRType *var_type = nullptr, *phys_type = nullptr; if (uint32_t phys_id = get_extended_decoration(target_id, SPIRVCrossDecorationPhysicalTypeID)) phys_type = &get(phys_id); else phys_type = &expr_type; if (var) { target_id = var->self; var_type = &get_variable_data_type(*var); } bool rewrite_boolean_store = expr_type.basetype == SPIRType::Boolean && (var && (var->storage == StorageClassWorkgroup || var_type->basetype == SPIRType::Struct)); // Type fixups for workgroup variables or struct members if they are booleans. if (rewrite_boolean_store) { if (is_array(expr_type)) { expr = to_rerolled_array_expression(*var_type, expr, expr_type); } else { auto short_type = expr_type; short_type.basetype = SPIRType::Short; expr = join(type_to_glsl(short_type), "(", expr, ")"); } } // Type fixups for workgroup variables if they are matrices. // Don't do fixup for packed types; those are handled specially. // FIXME: Maybe use a type like spvStorageMatrix for packed matrices? if (!msl_options.supports_msl_version(3, 0) && var && (var->storage == StorageClassWorkgroup || (var_type->basetype == SPIRType::Struct && has_extended_decoration(var_type->self, SPIRVCrossDecorationWorkgroupStruct) && !is_packed)) && expr_type.columns > 1) { SPIRType matrix_type = *phys_type; if (target_expr && target_expr->need_transpose) swap(matrix_type.vecsize, matrix_type.columns); expr = join("spvStorage_", type_to_glsl(matrix_type), "(", expr, ")"); } // Only interested in standalone builtin variables. if (!has_decoration(target_id, DecorationBuiltIn)) return; auto builtin = static_cast(get_decoration(target_id, DecorationBuiltIn)); auto expected_type = expr_type.basetype; auto expected_width = expr_type.width; switch (builtin) { case BuiltInLayer: case BuiltInViewportIndex: case BuiltInFragStencilRefEXT: case BuiltInPrimitiveId: case BuiltInViewIndex: expected_type = SPIRType::UInt; expected_width = 32; break; case BuiltInTessLevelInner: case BuiltInTessLevelOuter: expected_type = SPIRType::Half; expected_width = 16; break; default: break; } if (expected_type != expr_type.basetype) { if (expected_width != expr_type.width) { // These are of different widths, so we cannot do a straight bitcast. auto type = expr_type; type.basetype = expected_type; type.width = expected_width; expr = join(type_to_glsl(type), "(", expr, ")"); } else { auto type = expr_type; type.basetype = expected_type; expr = bitcast_expression(type, expr_type.basetype, expr); } } } string CompilerMSL::to_initializer_expression(const SPIRVariable &var) { // We risk getting an array initializer here with MSL. If we have an array. // FIXME: We cannot handle non-constant arrays being initialized. // We will need to inject spvArrayCopy here somehow ... auto &type = get(var.basetype); string expr; if (ir.ids[var.initializer].get_type() == TypeConstant && (!type.array.empty() || type.basetype == SPIRType::Struct)) expr = constant_expression(get(var.initializer)); else expr = CompilerGLSL::to_initializer_expression(var); // If the initializer has more vector components than the variable, add a swizzle. // FIXME: This can't handle arrays or structs. auto &init_type = expression_type(var.initializer); if (type.array.empty() && type.basetype != SPIRType::Struct && init_type.vecsize > type.vecsize) expr = enclose_expression(expr + vector_swizzle(type.vecsize, 0)); return expr; } string CompilerMSL::to_zero_initialized_expression(uint32_t) { return "{}"; } bool CompilerMSL::descriptor_set_is_argument_buffer(uint32_t desc_set) const { if (!msl_options.argument_buffers) return false; if (desc_set >= kMaxArgumentBuffers) return false; return (argument_buffer_discrete_mask & (1u << desc_set)) == 0; } bool CompilerMSL::is_supported_argument_buffer_type(const SPIRType &type) const { // iOS Tier 1 argument buffers do not support writable images. // When the argument buffer is encoded, we don't know whether this image will have a // NonWritable decoration, so just use discrete arguments for all storage images on iOS. bool is_supported_type = !(type.basetype == SPIRType::Image && type.image.sampled == 2 && msl_options.is_ios() && msl_options.argument_buffers_tier <= Options::ArgumentBuffersTier::Tier1); return is_supported_type && !type_is_msl_framebuffer_fetch(type); } void CompilerMSL::analyze_argument_buffers() { // Gather all used resources and sort them out into argument buffers. // Each argument buffer corresponds to a descriptor set in SPIR-V. // The [[id(N)]] values used correspond to the resource mapping we have for MSL. // Otherwise, the binding number is used, but this is generally not safe some types like // combined image samplers and arrays of resources. Metal needs different indices here, // while SPIR-V can have one descriptor set binding. To use argument buffers in practice, // you will need to use the remapping from the API. for (auto &id : argument_buffer_ids) id = 0; // Output resources, sorted by resource index & type. struct Resource { SPIRVariable *var; SPIRVariable *descriptor_alias; string name; SPIRType::BaseType basetype; uint32_t index; uint32_t plane; }; SmallVector resources_in_set[kMaxArgumentBuffers]; SmallVector inline_block_vars; bool set_needs_swizzle_buffer[kMaxArgumentBuffers] = {}; bool set_needs_buffer_sizes[kMaxArgumentBuffers] = {}; bool needs_buffer_sizes = false; ir.for_each_typed_id([&](uint32_t self, SPIRVariable &var) { if ((var.storage == StorageClassUniform || var.storage == StorageClassUniformConstant || var.storage == StorageClassStorageBuffer) && !is_hidden_variable(var)) { uint32_t desc_set = get_decoration(self, DecorationDescriptorSet); // Ignore if it's part of a push descriptor set. if (!descriptor_set_is_argument_buffer(desc_set)) return; uint32_t var_id = var.self; auto &type = get_variable_data_type(var); if (desc_set >= kMaxArgumentBuffers) SPIRV_CROSS_THROW("Descriptor set index is out of range."); const MSLConstexprSampler *constexpr_sampler = nullptr; if (type.basetype == SPIRType::SampledImage || type.basetype == SPIRType::Sampler) { constexpr_sampler = find_constexpr_sampler(var_id); if (constexpr_sampler) { // Mark this ID as a constexpr sampler for later in case it came from set/bindings. constexpr_samplers_by_id[var_id] = *constexpr_sampler; } } // Handle descriptor aliasing as well as we can. // We can handle aliasing of buffers by casting pointers, but not for typed resources. // Inline UBOs cannot be handled since it's not a pointer, but inline data. SPIRVariable *descriptor_alias = nullptr; if (var.storage == StorageClassUniform || var.storage == StorageClassStorageBuffer) { for (auto &resource : resources_in_set[desc_set]) { if (get_decoration(resource.var->self, DecorationBinding) == get_decoration(var_id, DecorationBinding) && resource.basetype == SPIRType::Struct && type.basetype == SPIRType::Struct && (resource.var->storage == StorageClassUniform || resource.var->storage == StorageClassStorageBuffer)) { descriptor_alias = resource.var; // Self-reference marks that we should declare the resource, // and it's being used as an alias (so we can emit void* instead). resource.descriptor_alias = resource.var; // Need to promote interlocked usage so that the primary declaration is correct. if (interlocked_resources.count(var_id)) interlocked_resources.insert(resource.var->self); break; } } } uint32_t binding = get_decoration(var_id, DecorationBinding); if (type.basetype == SPIRType::SampledImage) { add_resource_name(var_id); uint32_t plane_count = 1; if (constexpr_sampler && constexpr_sampler->ycbcr_conversion_enable) plane_count = constexpr_sampler->planes; for (uint32_t i = 0; i < plane_count; i++) { uint32_t image_resource_index = get_metal_resource_index(var, SPIRType::Image, i); resources_in_set[desc_set].push_back( { &var, descriptor_alias, to_name(var_id), SPIRType::Image, image_resource_index, i }); } if (type.image.dim != DimBuffer && !constexpr_sampler) { uint32_t sampler_resource_index = get_metal_resource_index(var, SPIRType::Sampler); resources_in_set[desc_set].push_back( { &var, descriptor_alias, to_sampler_expression(var_id), SPIRType::Sampler, sampler_resource_index, 0 }); } } else if (inline_uniform_blocks.count(SetBindingPair{ desc_set, binding })) { inline_block_vars.push_back(var_id); } else if (!constexpr_sampler && is_supported_argument_buffer_type(type)) { // constexpr samplers are not declared as resources. // Inline uniform blocks are always emitted at the end. add_resource_name(var_id); uint32_t resource_index = ~0u; if (!descriptor_alias) resource_index = get_metal_resource_index(var, type.basetype); resources_in_set[desc_set].push_back( { &var, descriptor_alias, to_name(var_id), type.basetype, resource_index, 0 }); // Emulate texture2D atomic operations if (atomic_image_vars_emulated.count(var.self)) { uint32_t buffer_resource_index = get_metal_resource_index(var, SPIRType::AtomicCounter, 0); resources_in_set[desc_set].push_back( { &var, descriptor_alias, to_name(var_id) + "_atomic", SPIRType::Struct, buffer_resource_index, 0 }); } } // Check if this descriptor set needs a swizzle buffer. if (needs_swizzle_buffer_def && is_sampled_image_type(type)) set_needs_swizzle_buffer[desc_set] = true; else if (buffer_requires_array_length(var_id)) { set_needs_buffer_sizes[desc_set] = true; needs_buffer_sizes = true; } } }); if (needs_swizzle_buffer_def || needs_buffer_sizes) { uint32_t uint_ptr_type_id = 0; // We might have to add a swizzle buffer resource to the set. for (uint32_t desc_set = 0; desc_set < kMaxArgumentBuffers; desc_set++) { if (!set_needs_swizzle_buffer[desc_set] && !set_needs_buffer_sizes[desc_set]) continue; if (uint_ptr_type_id == 0) { uint_ptr_type_id = ir.increase_bound_by(1); // Create a buffer to hold extra data, including the swizzle constants. SPIRType uint_type_pointer = get_uint_type(); uint_type_pointer.op = OpTypePointer; uint_type_pointer.pointer = true; uint_type_pointer.pointer_depth++; uint_type_pointer.parent_type = get_uint_type_id(); uint_type_pointer.storage = StorageClassUniform; set(uint_ptr_type_id, uint_type_pointer); set_decoration(uint_ptr_type_id, DecorationArrayStride, 4); } if (set_needs_swizzle_buffer[desc_set]) { uint32_t var_id = ir.increase_bound_by(1); auto &var = set(var_id, uint_ptr_type_id, StorageClassUniformConstant); set_name(var_id, "spvSwizzleConstants"); set_decoration(var_id, DecorationDescriptorSet, desc_set); set_decoration(var_id, DecorationBinding, kSwizzleBufferBinding); resources_in_set[desc_set].push_back( { &var, nullptr, to_name(var_id), SPIRType::UInt, get_metal_resource_index(var, SPIRType::UInt), 0 }); } if (set_needs_buffer_sizes[desc_set]) { uint32_t var_id = ir.increase_bound_by(1); auto &var = set(var_id, uint_ptr_type_id, StorageClassUniformConstant); set_name(var_id, "spvBufferSizeConstants"); set_decoration(var_id, DecorationDescriptorSet, desc_set); set_decoration(var_id, DecorationBinding, kBufferSizeBufferBinding); resources_in_set[desc_set].push_back( { &var, nullptr, to_name(var_id), SPIRType::UInt, get_metal_resource_index(var, SPIRType::UInt), 0 }); } } } // Now add inline uniform blocks. for (uint32_t var_id : inline_block_vars) { auto &var = get(var_id); uint32_t desc_set = get_decoration(var_id, DecorationDescriptorSet); add_resource_name(var_id); resources_in_set[desc_set].push_back( { &var, nullptr, to_name(var_id), SPIRType::Struct, get_metal_resource_index(var, SPIRType::Struct), 0 }); } for (uint32_t desc_set = 0; desc_set < kMaxArgumentBuffers; desc_set++) { auto &resources = resources_in_set[desc_set]; if (resources.empty()) continue; assert(descriptor_set_is_argument_buffer(desc_set)); uint32_t next_id = ir.increase_bound_by(3); uint32_t type_id = next_id + 1; uint32_t ptr_type_id = next_id + 2; argument_buffer_ids[desc_set] = next_id; auto &buffer_type = set(type_id, OpTypeStruct); buffer_type.basetype = SPIRType::Struct; if ((argument_buffer_device_storage_mask & (1u << desc_set)) != 0) { buffer_type.storage = StorageClassStorageBuffer; // Make sure the argument buffer gets marked as const device. set_decoration(next_id, DecorationNonWritable); // Need to mark the type as a Block to enable this. set_decoration(type_id, DecorationBlock); } else buffer_type.storage = StorageClassUniform; set_name(type_id, join("spvDescriptorSetBuffer", desc_set)); auto &ptr_type = set(ptr_type_id, OpTypePointer); ptr_type = buffer_type; ptr_type.op = spv::OpTypePointer; ptr_type.pointer = true; ptr_type.pointer_depth++; ptr_type.parent_type = type_id; uint32_t buffer_variable_id = next_id; set(buffer_variable_id, ptr_type_id, StorageClassUniform); set_name(buffer_variable_id, join("spvDescriptorSet", desc_set)); // Ids must be emitted in ID order. stable_sort(begin(resources), end(resources), [&](const Resource &lhs, const Resource &rhs) -> bool { return tie(lhs.index, lhs.basetype) < tie(rhs.index, rhs.basetype); }); uint32_t member_index = 0; uint32_t next_arg_buff_index = 0; for (auto &resource : resources) { auto &var = *resource.var; auto &type = get_variable_data_type(var); // If needed, synthesize and add padding members. // member_index and next_arg_buff_index are incremented when padding members are added. if (msl_options.pad_argument_buffer_resources) { auto &rez_bind = get_argument_buffer_resource(desc_set, next_arg_buff_index); if (!resource.descriptor_alias) { while (resource.index > next_arg_buff_index) { switch (rez_bind.basetype) { case SPIRType::Void: case SPIRType::Boolean: case SPIRType::SByte: case SPIRType::UByte: case SPIRType::Short: case SPIRType::UShort: case SPIRType::Int: case SPIRType::UInt: case SPIRType::Int64: case SPIRType::UInt64: case SPIRType::AtomicCounter: case SPIRType::Half: case SPIRType::Float: case SPIRType::Double: add_argument_buffer_padding_buffer_type(buffer_type, member_index, next_arg_buff_index, rez_bind); break; case SPIRType::Image: add_argument_buffer_padding_image_type(buffer_type, member_index, next_arg_buff_index, rez_bind); break; case SPIRType::Sampler: add_argument_buffer_padding_sampler_type(buffer_type, member_index, next_arg_buff_index, rez_bind); break; case SPIRType::SampledImage: if (next_arg_buff_index == rez_bind.msl_sampler) add_argument_buffer_padding_sampler_type(buffer_type, member_index, next_arg_buff_index, rez_bind); else add_argument_buffer_padding_image_type(buffer_type, member_index, next_arg_buff_index, rez_bind); break; default: break; } } } // Adjust the number of slots consumed by current member itself. // Use the count value from the app, instead of the shader, in case the // shader is only accesing part, or even one element, of the array. next_arg_buff_index += rez_bind.count; } string mbr_name = ensure_valid_name(resource.name, "m"); if (resource.plane > 0) mbr_name += join(plane_name_suffix, resource.plane); set_member_name(buffer_type.self, member_index, mbr_name); if (resource.basetype == SPIRType::Sampler && type.basetype != SPIRType::Sampler) { // Have to synthesize a sampler type here. bool type_is_array = !type.array.empty(); uint32_t sampler_type_id = ir.increase_bound_by(type_is_array ? 2 : 1); auto &new_sampler_type = set(sampler_type_id, OpTypeSampler); new_sampler_type.basetype = SPIRType::Sampler; new_sampler_type.storage = StorageClassUniformConstant; if (type_is_array) { uint32_t sampler_type_array_id = sampler_type_id + 1; auto &sampler_type_array = set(sampler_type_array_id, OpTypeArray); sampler_type_array = new_sampler_type; sampler_type_array.array = type.array; sampler_type_array.array_size_literal = type.array_size_literal; sampler_type_array.parent_type = sampler_type_id; buffer_type.member_types.push_back(sampler_type_array_id); } else buffer_type.member_types.push_back(sampler_type_id); } else { uint32_t binding = get_decoration(var.self, DecorationBinding); SetBindingPair pair = { desc_set, binding }; if (resource.basetype == SPIRType::Image || resource.basetype == SPIRType::Sampler || resource.basetype == SPIRType::SampledImage) { // Drop pointer information when we emit the resources into a struct. buffer_type.member_types.push_back(get_variable_data_type_id(var)); if (resource.plane == 0) set_qualified_name(var.self, join(to_name(buffer_variable_id), ".", mbr_name)); } else if (buffers_requiring_dynamic_offset.count(pair)) { if (resource.descriptor_alias) SPIRV_CROSS_THROW("Descriptor aliasing is currently not supported with dynamic offsets."); // Don't set the qualified name here; we'll define a variable holding the corrected buffer address later. buffer_type.member_types.push_back(var.basetype); buffers_requiring_dynamic_offset[pair].second = var.self; } else if (inline_uniform_blocks.count(pair)) { if (resource.descriptor_alias) SPIRV_CROSS_THROW("Descriptor aliasing is currently not supported with inline UBOs."); // Put the buffer block itself into the argument buffer. buffer_type.member_types.push_back(get_variable_data_type_id(var)); set_qualified_name(var.self, join(to_name(buffer_variable_id), ".", mbr_name)); } else if (atomic_image_vars_emulated.count(var.self)) { // Emulate texture2D atomic operations. // Don't set the qualified name: it's already set for this variable, // and the code that references the buffer manually appends "_atomic" // to the name. uint32_t offset = ir.increase_bound_by(2); uint32_t atomic_type_id = offset; uint32_t type_ptr_id = offset + 1; SPIRType atomic_type { OpTypeInt }; atomic_type.basetype = SPIRType::AtomicCounter; atomic_type.width = 32; atomic_type.vecsize = 1; set(atomic_type_id, atomic_type); atomic_type.op = OpTypePointer; atomic_type.pointer = true; atomic_type.pointer_depth++; atomic_type.parent_type = atomic_type_id; atomic_type.storage = StorageClassStorageBuffer; auto &atomic_ptr_type = set(type_ptr_id, atomic_type); atomic_ptr_type.self = atomic_type_id; buffer_type.member_types.push_back(type_ptr_id); } else { if (!resource.descriptor_alias || resource.descriptor_alias == resource.var) buffer_type.member_types.push_back(var.basetype); if (resource.descriptor_alias && resource.descriptor_alias != resource.var) buffer_aliases_argument.push_back({ var.self, resource.descriptor_alias->self }); else if (type.array.empty()) set_qualified_name(var.self, join("(*", to_name(buffer_variable_id), ".", mbr_name, ")")); else set_qualified_name(var.self, join(to_name(buffer_variable_id), ".", mbr_name)); } } set_extended_member_decoration(buffer_type.self, member_index, SPIRVCrossDecorationResourceIndexPrimary, resource.index); set_extended_member_decoration(buffer_type.self, member_index, SPIRVCrossDecorationInterfaceOrigID, var.self); member_index++; } } } // Return the resource type of the app-provided resources for the descriptor set, // that matches the resource index of the argument buffer index. // This is a two-step lookup, first lookup the resource binding number from the argument buffer index, // then lookup the resource binding using the binding number. MSLResourceBinding &CompilerMSL::get_argument_buffer_resource(uint32_t desc_set, uint32_t arg_idx) { auto stage = get_entry_point().model; StageSetBinding arg_idx_tuple = { stage, desc_set, arg_idx }; auto arg_itr = resource_arg_buff_idx_to_binding_number.find(arg_idx_tuple); if (arg_itr != end(resource_arg_buff_idx_to_binding_number)) { StageSetBinding bind_tuple = { stage, desc_set, arg_itr->second }; auto bind_itr = resource_bindings.find(bind_tuple); if (bind_itr != end(resource_bindings)) return bind_itr->second.first; } SPIRV_CROSS_THROW("Argument buffer resource base type could not be determined. When padding argument buffer " "elements, all descriptor set resources must be supplied with a base type by the app."); } // Adds an argument buffer padding argument buffer type as one or more members of the struct type at the member index. // Metal does not support arrays of buffers, so these are emitted as multiple struct members. void CompilerMSL::add_argument_buffer_padding_buffer_type(SPIRType &struct_type, uint32_t &mbr_idx, uint32_t &arg_buff_index, MSLResourceBinding &rez_bind) { if (!argument_buffer_padding_buffer_type_id) { uint32_t buff_type_id = ir.increase_bound_by(2); auto &buff_type = set(buff_type_id, OpNop); buff_type.basetype = rez_bind.basetype; buff_type.storage = StorageClassUniformConstant; uint32_t ptr_type_id = buff_type_id + 1; auto &ptr_type = set(ptr_type_id, OpTypePointer); ptr_type = buff_type; ptr_type.op = spv::OpTypePointer; ptr_type.pointer = true; ptr_type.pointer_depth++; ptr_type.parent_type = buff_type_id; argument_buffer_padding_buffer_type_id = ptr_type_id; } add_argument_buffer_padding_type(argument_buffer_padding_buffer_type_id, struct_type, mbr_idx, arg_buff_index, rez_bind.count); } // Adds an argument buffer padding argument image type as a member of the struct type at the member index. void CompilerMSL::add_argument_buffer_padding_image_type(SPIRType &struct_type, uint32_t &mbr_idx, uint32_t &arg_buff_index, MSLResourceBinding &rez_bind) { if (!argument_buffer_padding_image_type_id) { uint32_t base_type_id = ir.increase_bound_by(2); auto &base_type = set(base_type_id, OpTypeFloat); base_type.basetype = SPIRType::Float; base_type.width = 32; uint32_t img_type_id = base_type_id + 1; auto &img_type = set(img_type_id, OpTypeImage); img_type.basetype = SPIRType::Image; img_type.storage = StorageClassUniformConstant; img_type.image.type = base_type_id; img_type.image.dim = Dim2D; img_type.image.depth = false; img_type.image.arrayed = false; img_type.image.ms = false; img_type.image.sampled = 1; img_type.image.format = ImageFormatUnknown; img_type.image.access = AccessQualifierMax; argument_buffer_padding_image_type_id = img_type_id; } add_argument_buffer_padding_type(argument_buffer_padding_image_type_id, struct_type, mbr_idx, arg_buff_index, rez_bind.count); } // Adds an argument buffer padding argument sampler type as a member of the struct type at the member index. void CompilerMSL::add_argument_buffer_padding_sampler_type(SPIRType &struct_type, uint32_t &mbr_idx, uint32_t &arg_buff_index, MSLResourceBinding &rez_bind) { if (!argument_buffer_padding_sampler_type_id) { uint32_t samp_type_id = ir.increase_bound_by(1); auto &samp_type = set(samp_type_id, OpTypeSampler); samp_type.basetype = SPIRType::Sampler; samp_type.storage = StorageClassUniformConstant; argument_buffer_padding_sampler_type_id = samp_type_id; } add_argument_buffer_padding_type(argument_buffer_padding_sampler_type_id, struct_type, mbr_idx, arg_buff_index, rez_bind.count); } // Adds the argument buffer padding argument type as a member of the struct type at the member index. // Advances both arg_buff_index and mbr_idx to next argument slots. void CompilerMSL::add_argument_buffer_padding_type(uint32_t mbr_type_id, SPIRType &struct_type, uint32_t &mbr_idx, uint32_t &arg_buff_index, uint32_t count) { uint32_t type_id = mbr_type_id; if (count > 1) { uint32_t ary_type_id = ir.increase_bound_by(1); auto &ary_type = set(ary_type_id, get(type_id)); ary_type.op = OpTypeArray; ary_type.array.push_back(count); ary_type.array_size_literal.push_back(true); ary_type.parent_type = type_id; type_id = ary_type_id; } set_member_name(struct_type.self, mbr_idx, join("_m", arg_buff_index, "_pad")); set_extended_member_decoration(struct_type.self, mbr_idx, SPIRVCrossDecorationResourceIndexPrimary, arg_buff_index); struct_type.member_types.push_back(type_id); arg_buff_index += count; mbr_idx++; } void CompilerMSL::activate_argument_buffer_resources() { // For ABI compatibility, force-enable all resources which are part of argument buffers. ir.for_each_typed_id([&](uint32_t self, const SPIRVariable &) { if (!has_decoration(self, DecorationDescriptorSet)) return; uint32_t desc_set = get_decoration(self, DecorationDescriptorSet); if (descriptor_set_is_argument_buffer(desc_set)) add_active_interface_variable(self); }); } bool CompilerMSL::using_builtin_array() const { return msl_options.force_native_arrays || is_using_builtin_array; } void CompilerMSL::set_combined_sampler_suffix(const char *suffix) { sampler_name_suffix = suffix; } const char *CompilerMSL::get_combined_sampler_suffix() const { return sampler_name_suffix.c_str(); } void CompilerMSL::emit_block_hints(const SPIRBlock &) { } string CompilerMSL::additional_fixed_sample_mask_str() const { char print_buffer[32]; #ifdef _MSC_VER // snprintf does not exist or is buggy on older MSVC versions, some of // them being used by MinGW. Use sprintf instead and disable // corresponding warning. #pragma warning(push) #pragma warning(disable : 4996) #endif #if _WIN32 sprintf(print_buffer, "0x%x", msl_options.additional_fixed_sample_mask); #else snprintf(print_buffer, sizeof(print_buffer), "0x%x", msl_options.additional_fixed_sample_mask); #endif #ifdef _MSC_VER #pragma warning(pop) #endif return print_buffer; } ================================================ FILE: src/libraries/spirv_cross/spirv_msl.hpp ================================================ /* * Copyright 2016-2021 The Brenwill Workshop Ltd. * SPDX-License-Identifier: Apache-2.0 OR MIT * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* * At your option, you may choose to accept this material under either: * 1. The Apache License, Version 2.0, found at , or * 2. The MIT License, found at . */ #ifndef SPIRV_CROSS_MSL_HPP #define SPIRV_CROSS_MSL_HPP #include "spirv_glsl.hpp" #include #include #include #include #include namespace SPIRV_CROSS_NAMESPACE { // Indicates the format of a shader interface variable. Currently limited to specifying // if the input is an 8-bit unsigned integer, 16-bit unsigned integer, or // some other format. enum MSLShaderVariableFormat { MSL_SHADER_VARIABLE_FORMAT_OTHER = 0, MSL_SHADER_VARIABLE_FORMAT_UINT8 = 1, MSL_SHADER_VARIABLE_FORMAT_UINT16 = 2, MSL_SHADER_VARIABLE_FORMAT_ANY16 = 3, MSL_SHADER_VARIABLE_FORMAT_ANY32 = 4, // Deprecated aliases. MSL_VERTEX_FORMAT_OTHER = MSL_SHADER_VARIABLE_FORMAT_OTHER, MSL_VERTEX_FORMAT_UINT8 = MSL_SHADER_VARIABLE_FORMAT_UINT8, MSL_VERTEX_FORMAT_UINT16 = MSL_SHADER_VARIABLE_FORMAT_UINT16, MSL_SHADER_INPUT_FORMAT_OTHER = MSL_SHADER_VARIABLE_FORMAT_OTHER, MSL_SHADER_INPUT_FORMAT_UINT8 = MSL_SHADER_VARIABLE_FORMAT_UINT8, MSL_SHADER_INPUT_FORMAT_UINT16 = MSL_SHADER_VARIABLE_FORMAT_UINT16, MSL_SHADER_INPUT_FORMAT_ANY16 = MSL_SHADER_VARIABLE_FORMAT_ANY16, MSL_SHADER_INPUT_FORMAT_ANY32 = MSL_SHADER_VARIABLE_FORMAT_ANY32, MSL_SHADER_VARIABLE_FORMAT_INT_MAX = 0x7fffffff }; // Indicates the rate at which a variable changes value, one of: per-vertex, // per-primitive, or per-patch. enum MSLShaderVariableRate { MSL_SHADER_VARIABLE_RATE_PER_VERTEX = 0, MSL_SHADER_VARIABLE_RATE_PER_PRIMITIVE = 1, MSL_SHADER_VARIABLE_RATE_PER_PATCH = 2, MSL_SHADER_VARIABLE_RATE_INT_MAX = 0x7fffffff, }; // Defines MSL characteristics of a shader interface variable at a particular location. // After compilation, it is possible to query whether or not this location was used. // If vecsize is nonzero, it must be greater than or equal to the vecsize declared in the shader, // or behavior is undefined. struct MSLShaderInterfaceVariable { uint32_t location = 0; uint32_t component = 0; MSLShaderVariableFormat format = MSL_SHADER_VARIABLE_FORMAT_OTHER; spv::BuiltIn builtin = spv::BuiltInMax; uint32_t vecsize = 0; MSLShaderVariableRate rate = MSL_SHADER_VARIABLE_RATE_PER_VERTEX; }; // Matches the binding index of a MSL resource for a binding within a descriptor set. // Taken together, the stage, desc_set and binding combine to form a reference to a resource // descriptor used in a particular shading stage. The count field indicates the number of // resources consumed by this binding, if the binding represents an array of resources. // If the resource array is a run-time-sized array, which are legal in GLSL or SPIR-V, this value // will be used to declare the array size in MSL, which does not support run-time-sized arrays. // If pad_argument_buffer_resources is enabled, the base_type and count values are used to // specify the base type and array size of the resource in the argument buffer, if that resource // is not defined and used by the shader. With pad_argument_buffer_resources enabled, this // information will be used to pad the argument buffer structure, in order to align that // structure consistently for all uses, across all shaders, of the descriptor set represented // by the arugment buffer. If pad_argument_buffer_resources is disabled, base_type does not // need to be populated, and if the resource is also not a run-time sized array, the count // field does not need to be populated. // If using MSL 2.0 argument buffers, the descriptor set is not marked as a discrete descriptor set, // and (for iOS only) the resource is not a storage image (sampled != 2), the binding reference we // remap to will become an [[id(N)]] attribute within the "descriptor set" argument buffer structure. // For resources which are bound in the "classic" MSL 1.0 way or discrete descriptors, the remap will // become a [[buffer(N)]], [[texture(N)]] or [[sampler(N)]] depending on the resource types used. struct MSLResourceBinding { spv::ExecutionModel stage = spv::ExecutionModelMax; SPIRType::BaseType basetype = SPIRType::Unknown; uint32_t desc_set = 0; uint32_t binding = 0; uint32_t count = 0; uint32_t msl_buffer = 0; uint32_t msl_texture = 0; uint32_t msl_sampler = 0; }; enum MSLSamplerCoord { MSL_SAMPLER_COORD_NORMALIZED = 0, MSL_SAMPLER_COORD_PIXEL = 1, MSL_SAMPLER_INT_MAX = 0x7fffffff }; enum MSLSamplerFilter { MSL_SAMPLER_FILTER_NEAREST = 0, MSL_SAMPLER_FILTER_LINEAR = 1, MSL_SAMPLER_FILTER_INT_MAX = 0x7fffffff }; enum MSLSamplerMipFilter { MSL_SAMPLER_MIP_FILTER_NONE = 0, MSL_SAMPLER_MIP_FILTER_NEAREST = 1, MSL_SAMPLER_MIP_FILTER_LINEAR = 2, MSL_SAMPLER_MIP_FILTER_INT_MAX = 0x7fffffff }; enum MSLSamplerAddress { MSL_SAMPLER_ADDRESS_CLAMP_TO_ZERO = 0, MSL_SAMPLER_ADDRESS_CLAMP_TO_EDGE = 1, MSL_SAMPLER_ADDRESS_CLAMP_TO_BORDER = 2, MSL_SAMPLER_ADDRESS_REPEAT = 3, MSL_SAMPLER_ADDRESS_MIRRORED_REPEAT = 4, MSL_SAMPLER_ADDRESS_INT_MAX = 0x7fffffff }; enum MSLSamplerCompareFunc { MSL_SAMPLER_COMPARE_FUNC_NEVER = 0, MSL_SAMPLER_COMPARE_FUNC_LESS = 1, MSL_SAMPLER_COMPARE_FUNC_LESS_EQUAL = 2, MSL_SAMPLER_COMPARE_FUNC_GREATER = 3, MSL_SAMPLER_COMPARE_FUNC_GREATER_EQUAL = 4, MSL_SAMPLER_COMPARE_FUNC_EQUAL = 5, MSL_SAMPLER_COMPARE_FUNC_NOT_EQUAL = 6, MSL_SAMPLER_COMPARE_FUNC_ALWAYS = 7, MSL_SAMPLER_COMPARE_FUNC_INT_MAX = 0x7fffffff }; enum MSLSamplerBorderColor { MSL_SAMPLER_BORDER_COLOR_TRANSPARENT_BLACK = 0, MSL_SAMPLER_BORDER_COLOR_OPAQUE_BLACK = 1, MSL_SAMPLER_BORDER_COLOR_OPAQUE_WHITE = 2, MSL_SAMPLER_BORDER_COLOR_INT_MAX = 0x7fffffff }; enum MSLFormatResolution { MSL_FORMAT_RESOLUTION_444 = 0, MSL_FORMAT_RESOLUTION_422, MSL_FORMAT_RESOLUTION_420, MSL_FORMAT_RESOLUTION_INT_MAX = 0x7fffffff }; enum MSLChromaLocation { MSL_CHROMA_LOCATION_COSITED_EVEN = 0, MSL_CHROMA_LOCATION_MIDPOINT, MSL_CHROMA_LOCATION_INT_MAX = 0x7fffffff }; enum MSLComponentSwizzle { MSL_COMPONENT_SWIZZLE_IDENTITY = 0, MSL_COMPONENT_SWIZZLE_ZERO, MSL_COMPONENT_SWIZZLE_ONE, MSL_COMPONENT_SWIZZLE_R, MSL_COMPONENT_SWIZZLE_G, MSL_COMPONENT_SWIZZLE_B, MSL_COMPONENT_SWIZZLE_A, MSL_COMPONENT_SWIZZLE_INT_MAX = 0x7fffffff }; enum MSLSamplerYCbCrModelConversion { MSL_SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY = 0, MSL_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_IDENTITY, MSL_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_BT_709, MSL_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_BT_601, MSL_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_BT_2020, MSL_SAMPLER_YCBCR_MODEL_CONVERSION_INT_MAX = 0x7fffffff }; enum MSLSamplerYCbCrRange { MSL_SAMPLER_YCBCR_RANGE_ITU_FULL = 0, MSL_SAMPLER_YCBCR_RANGE_ITU_NARROW, MSL_SAMPLER_YCBCR_RANGE_INT_MAX = 0x7fffffff }; struct MSLConstexprSampler { MSLSamplerCoord coord = MSL_SAMPLER_COORD_NORMALIZED; MSLSamplerFilter min_filter = MSL_SAMPLER_FILTER_NEAREST; MSLSamplerFilter mag_filter = MSL_SAMPLER_FILTER_NEAREST; MSLSamplerMipFilter mip_filter = MSL_SAMPLER_MIP_FILTER_NONE; MSLSamplerAddress s_address = MSL_SAMPLER_ADDRESS_CLAMP_TO_EDGE; MSLSamplerAddress t_address = MSL_SAMPLER_ADDRESS_CLAMP_TO_EDGE; MSLSamplerAddress r_address = MSL_SAMPLER_ADDRESS_CLAMP_TO_EDGE; MSLSamplerCompareFunc compare_func = MSL_SAMPLER_COMPARE_FUNC_NEVER; MSLSamplerBorderColor border_color = MSL_SAMPLER_BORDER_COLOR_TRANSPARENT_BLACK; float lod_clamp_min = 0.0f; float lod_clamp_max = 1000.0f; int max_anisotropy = 1; // Sampler Y'CbCr conversion parameters uint32_t planes = 0; MSLFormatResolution resolution = MSL_FORMAT_RESOLUTION_444; MSLSamplerFilter chroma_filter = MSL_SAMPLER_FILTER_NEAREST; MSLChromaLocation x_chroma_offset = MSL_CHROMA_LOCATION_COSITED_EVEN; MSLChromaLocation y_chroma_offset = MSL_CHROMA_LOCATION_COSITED_EVEN; MSLComponentSwizzle swizzle[4]; // IDENTITY, IDENTITY, IDENTITY, IDENTITY MSLSamplerYCbCrModelConversion ycbcr_model = MSL_SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY; MSLSamplerYCbCrRange ycbcr_range = MSL_SAMPLER_YCBCR_RANGE_ITU_FULL; uint32_t bpc = 8; bool compare_enable = false; bool lod_clamp_enable = false; bool anisotropy_enable = false; bool ycbcr_conversion_enable = false; MSLConstexprSampler() { for (uint32_t i = 0; i < 4; i++) swizzle[i] = MSL_COMPONENT_SWIZZLE_IDENTITY; } bool swizzle_is_identity() const { return (swizzle[0] == MSL_COMPONENT_SWIZZLE_IDENTITY && swizzle[1] == MSL_COMPONENT_SWIZZLE_IDENTITY && swizzle[2] == MSL_COMPONENT_SWIZZLE_IDENTITY && swizzle[3] == MSL_COMPONENT_SWIZZLE_IDENTITY); } bool swizzle_has_one_or_zero() const { return (swizzle[0] == MSL_COMPONENT_SWIZZLE_ZERO || swizzle[0] == MSL_COMPONENT_SWIZZLE_ONE || swizzle[1] == MSL_COMPONENT_SWIZZLE_ZERO || swizzle[1] == MSL_COMPONENT_SWIZZLE_ONE || swizzle[2] == MSL_COMPONENT_SWIZZLE_ZERO || swizzle[2] == MSL_COMPONENT_SWIZZLE_ONE || swizzle[3] == MSL_COMPONENT_SWIZZLE_ZERO || swizzle[3] == MSL_COMPONENT_SWIZZLE_ONE); } }; // Special constant used in a MSLResourceBinding desc_set // element to indicate the bindings for the push constants. // Kinda deprecated. Just use ResourceBindingPushConstant{DescriptorSet,Binding} directly. static const uint32_t kPushConstDescSet = ResourceBindingPushConstantDescriptorSet; // Special constant used in a MSLResourceBinding binding // element to indicate the bindings for the push constants. // Kinda deprecated. Just use ResourceBindingPushConstant{DescriptorSet,Binding} directly. static const uint32_t kPushConstBinding = ResourceBindingPushConstantBinding; // Special constant used in a MSLResourceBinding binding // element to indicate the buffer binding for swizzle buffers. static const uint32_t kSwizzleBufferBinding = ~(1u); // Special constant used in a MSLResourceBinding binding // element to indicate the buffer binding for buffer size buffers to support OpArrayLength. static const uint32_t kBufferSizeBufferBinding = ~(2u); // Special constant used in a MSLResourceBinding binding // element to indicate the buffer binding used for the argument buffer itself. // This buffer binding should be kept as small as possible as all automatic bindings for buffers // will start at max(kArgumentBufferBinding) + 1. static const uint32_t kArgumentBufferBinding = ~(3u); static const uint32_t kMaxArgumentBuffers = 8; // The arbitrary maximum for the nesting of array of array copies. static const uint32_t kArrayCopyMultidimMax = 6; // Decompiles SPIR-V to Metal Shading Language class CompilerMSL : public CompilerGLSL { public: // Options for compiling to Metal Shading Language struct Options { typedef enum { iOS = 0, macOS = 1 } Platform; Platform platform = macOS; uint32_t msl_version = make_msl_version(1, 2); uint32_t texel_buffer_texture_width = 4096; // Width of 2D Metal textures used as 1D texel buffers uint32_t r32ui_linear_texture_alignment = 4; uint32_t r32ui_alignment_constant_id = 65535; uint32_t swizzle_buffer_index = 30; uint32_t indirect_params_buffer_index = 29; uint32_t shader_output_buffer_index = 28; uint32_t shader_patch_output_buffer_index = 27; uint32_t shader_tess_factor_buffer_index = 26; uint32_t buffer_size_buffer_index = 25; uint32_t view_mask_buffer_index = 24; uint32_t dynamic_offsets_buffer_index = 23; uint32_t shader_input_buffer_index = 22; uint32_t shader_index_buffer_index = 21; uint32_t shader_patch_input_buffer_index = 20; uint32_t shader_input_wg_index = 0; uint32_t device_index = 0; uint32_t enable_frag_output_mask = 0xffffffff; // Metal doesn't allow setting a fixed sample mask directly in the pipeline. // We can evade this restriction by ANDing the internal sample_mask output // of the shader with the additional fixed sample mask. uint32_t additional_fixed_sample_mask = 0xffffffff; bool enable_point_size_builtin = true; bool enable_frag_depth_builtin = true; bool enable_frag_stencil_ref_builtin = true; bool disable_rasterization = false; bool capture_output_to_buffer = false; bool swizzle_texture_samples = false; bool tess_domain_origin_lower_left = false; bool multiview = false; bool multiview_layered_rendering = true; bool view_index_from_device_index = false; bool dispatch_base = false; bool texture_1D_as_2D = false; // Enable use of Metal argument buffers. // MSL 2.0 must also be enabled. bool argument_buffers = false; // Defines Metal argument buffer tier levels. // Uses same values as Metal MTLArgumentBuffersTier enumeration. enum class ArgumentBuffersTier { Tier1 = 0, Tier2 = 1, }; // When using Metal argument buffers, indicates the Metal argument buffer tier level supported by the Metal platform. // Ignored when Options::argument_buffers is disabled. // - Tier1 supports writable images on macOS, but not on iOS. // - Tier2 supports writable images on macOS and iOS, and higher resource count limits. // Tier capabilities based on recommendations from Apple engineering. ArgumentBuffersTier argument_buffers_tier = ArgumentBuffersTier::Tier1; // Enables specifick argument buffer format with extra information to track SSBO-length bool runtime_array_rich_descriptor = false; // Ensures vertex and instance indices start at zero. This reflects the behavior of HLSL with SV_VertexID and SV_InstanceID. bool enable_base_index_zero = false; // Fragment output in MSL must have at least as many components as the render pass. // Add support to explicit pad out components. bool pad_fragment_output_components = false; // Specifies whether the iOS target version supports the [[base_vertex]] and [[base_instance]] attributes. bool ios_support_base_vertex_instance = false; // Use Metal's native frame-buffer fetch API for subpass inputs. bool use_framebuffer_fetch_subpasses = false; // Enables use of "fma" intrinsic for invariant float math bool invariant_float_math = false; // Emulate texturecube_array with texture2d_array for iOS where this type is not available bool emulate_cube_array = false; // Allow user to enable decoration binding bool enable_decoration_binding = false; // Requires MSL 2.1, use the native support for texel buffers. bool texture_buffer_native = false; // Forces all resources which are part of an argument buffer to be considered active. // This ensures ABI compatibility between shaders where some resources might be unused, // and would otherwise declare a different IAB. bool force_active_argument_buffer_resources = false; // Aligns each resource in an argument buffer to its assigned index value, id(N), // by adding synthetic padding members in the argument buffer struct for any resources // in the argument buffer that are not defined and used by the shader. This allows // the shader to index into the correct argument in a descriptor set argument buffer // that is shared across shaders, where not all resources in the argument buffer are // defined in each shader. For this to work, an MSLResourceBinding must be provided for // all descriptors in any descriptor set held in an argument buffer in the shader, and // that MSLResourceBinding must have the basetype and count members populated correctly. // The implementation here assumes any inline blocks in the argument buffer is provided // in a Metal buffer, and doesn't take into consideration inline blocks that are // optionally embedded directly into the argument buffer via add_inline_uniform_block(). bool pad_argument_buffer_resources = false; // Forces the use of plain arrays, which works around certain driver bugs on certain versions // of Intel Macbooks. See https://github.com/KhronosGroup/SPIRV-Cross/issues/1210. // May reduce performance in scenarios where arrays are copied around as value-types. bool force_native_arrays = false; // If a shader writes clip distance, also emit user varyings which // can be read in subsequent stages. bool enable_clip_distance_user_varying = true; // In a tessellation control shader, assume that more than one patch can be processed in a // single workgroup. This requires changes to the way the InvocationId and PrimitiveId // builtins are processed, but should result in more efficient usage of the GPU. bool multi_patch_workgroup = false; // Use storage buffers instead of vertex-style attributes for tessellation evaluation // input. This may require conversion of inputs in the generated post-tessellation // vertex shader, but allows the use of nested arrays. bool raw_buffer_tese_input = false; // If set, a vertex shader will be compiled as part of a tessellation pipeline. // It will be translated as a compute kernel, so it can use the global invocation ID // to index the output buffer. bool vertex_for_tessellation = false; // Assume that SubpassData images have multiple layers. Layered input attachments // are addressed relative to the Layer output from the vertex pipeline. This option // has no effect with multiview, since all input attachments are assumed to be layered // and will be addressed using the current ViewIndex. bool arrayed_subpass_input = false; // Whether to use SIMD-group or quadgroup functions to implement group non-uniform // operations. Some GPUs on iOS do not support the SIMD-group functions, only the // quadgroup functions. bool ios_use_simdgroup_functions = false; // If set, the subgroup size will be assumed to be one, and subgroup-related // builtins and operations will be emitted accordingly. This mode is intended to // be used by MoltenVK on hardware/software configurations which do not provide // sufficient support for subgroups. bool emulate_subgroups = false; // If nonzero, a fixed subgroup size to assume. Metal, similarly to VK_EXT_subgroup_size_control, // allows the SIMD-group size (aka thread execution width) to vary depending on // register usage and requirements. In certain circumstances--for example, a pipeline // in MoltenVK without VK_PIPELINE_SHADER_STAGE_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT_EXT-- // this is undesirable. This fixes the value of the SubgroupSize builtin, instead of // mapping it to the Metal builtin [[thread_execution_width]]. If the thread // execution width is reduced, the extra invocations will appear to be inactive. // If zero, the SubgroupSize will be allowed to vary, and the builtin will be mapped // to the Metal [[thread_execution_width]] builtin. uint32_t fixed_subgroup_size = 0; enum class IndexType { None = 0, UInt16 = 1, UInt32 = 2 }; // The type of index in the index buffer, if present. For a compute shader, Metal // requires specifying the indexing at pipeline creation, rather than at draw time // as with graphics pipelines. This means we must create three different pipelines, // for no indexing, 16-bit indices, and 32-bit indices. Each requires different // handling for the gl_VertexIndex builtin. We may as well, then, create three // different shaders for these three scenarios. IndexType vertex_index_type = IndexType::None; // If set, a dummy [[sample_id]] input is added to a fragment shader if none is present. // This will force the shader to run at sample rate, assuming Metal does not optimize // the extra threads away. bool force_sample_rate_shading = false; // If set, gl_HelperInvocation will be set manually whenever a fragment is discarded. // Some Metal devices have a bug where simd_is_helper_thread() does not return true // after a fragment has been discarded. This is a workaround that is only expected to be needed // until the bug is fixed in Metal; it is provided as an option to allow disabling it when that occurs. bool manual_helper_invocation_updates = true; // If set, extra checks will be emitted in fragment shaders to prevent writes // from discarded fragments. Some Metal devices have a bug where writes to storage resources // from discarded fragment threads continue to occur, despite the fragment being // discarded. This is a workaround that is only expected to be needed until the // bug is fixed in Metal; it is provided as an option so it can be enabled // only when the bug is present. bool check_discarded_frag_stores = false; // If set, Lod operands to OpImageSample*DrefExplicitLod for 1D and 2D array images // will be implemented using a gradient instead of passing the level operand directly. // Some Metal devices have a bug where the level() argument to depth2d_array::sample_compare() // in a fragment shader is biased by some unknown amount, possibly dependent on the // partial derivatives of the texture coordinates. This is a workaround that is only // expected to be needed until the bug is fixed in Metal; it is provided as an option // so it can be enabled only when the bug is present. bool sample_dref_lod_array_as_grad = false; // MSL doesn't guarantee coherence between writes and subsequent reads of read_write textures. // This inserts fences before each read of a read_write texture to ensure coherency. // If you're sure you never rely on this, you can set this to false for a possible performance improvement. // Note: Only Apple's GPU compiler takes advantage of the lack of coherency, so make sure to test on Apple GPUs if you disable this. bool readwrite_texture_fences = true; // Metal 3.1 introduced a Metal regression bug which causes infinite recursion during // Metal's analysis of an entry point input structure that is itself recursive. Enabling // this option will replace the recursive input declaration with a alternate variable of // type void*, and then cast to the correct type at the top of the entry point function. // The bug has been reported to Apple, and will hopefully be fixed in future releases. bool replace_recursive_inputs = false; // If set, manual fixups of gradient vectors for cube texture lookups will be performed. // All released Apple Silicon GPUs to date behave incorrectly when sampling a cube texture // with explicit gradients. They will ignore one of the three partial derivatives based // on the selected major axis, and expect the remaining derivatives to be partially // transformed. bool agx_manual_cube_grad_fixup = false; bool is_ios() const { return platform == iOS; } bool is_macos() const { return platform == macOS; } bool use_quadgroup_operation() const { return is_ios() && !ios_use_simdgroup_functions; } void set_msl_version(uint32_t major, uint32_t minor = 0, uint32_t patch = 0) { msl_version = make_msl_version(major, minor, patch); } bool supports_msl_version(uint32_t major, uint32_t minor = 0, uint32_t patch = 0) const { return msl_version >= make_msl_version(major, minor, patch); } static uint32_t make_msl_version(uint32_t major, uint32_t minor = 0, uint32_t patch = 0) { return (major * 10000) + (minor * 100) + patch; } }; const Options &get_msl_options() const { return msl_options; } void set_msl_options(const Options &opts) { msl_options = opts; } // Provide feedback to calling API to allow runtime to disable pipeline // rasterization if vertex shader requires rasterization to be disabled. bool get_is_rasterization_disabled() const { return is_rasterization_disabled && (get_entry_point().model == spv::ExecutionModelVertex || get_entry_point().model == spv::ExecutionModelTessellationControl || get_entry_point().model == spv::ExecutionModelTessellationEvaluation); } // Provide feedback to calling API to allow it to pass an auxiliary // swizzle buffer if the shader needs it. bool needs_swizzle_buffer() const { return used_swizzle_buffer; } // Provide feedback to calling API to allow it to pass a buffer // containing STORAGE_BUFFER buffer sizes to support OpArrayLength. bool needs_buffer_size_buffer() const { return !buffers_requiring_array_length.empty(); } bool buffer_requires_array_length(VariableID id) const { return buffers_requiring_array_length.count(id) != 0; } // Provide feedback to calling API to allow it to pass a buffer // containing the view mask for the current multiview subpass. bool needs_view_mask_buffer() const { return msl_options.multiview && !msl_options.view_index_from_device_index; } // Provide feedback to calling API to allow it to pass a buffer // containing the dispatch base workgroup ID. bool needs_dispatch_base_buffer() const { return msl_options.dispatch_base && !msl_options.supports_msl_version(1, 2); } // Provide feedback to calling API to allow it to pass an output // buffer if the shader needs it. bool needs_output_buffer() const { return capture_output_to_buffer && stage_out_var_id != ID(0); } // Provide feedback to calling API to allow it to pass a patch output // buffer if the shader needs it. bool needs_patch_output_buffer() const { return capture_output_to_buffer && patch_stage_out_var_id != ID(0); } // Provide feedback to calling API to allow it to pass an input threadgroup // buffer if the shader needs it. bool needs_input_threadgroup_mem() const { return capture_output_to_buffer && stage_in_var_id != ID(0); } explicit CompilerMSL(std::vector spirv); CompilerMSL(const uint32_t *ir, size_t word_count); explicit CompilerMSL(const ParsedIR &ir); explicit CompilerMSL(ParsedIR &&ir); // input is a shader interface variable description used to fix up shader input variables. // If shader inputs are provided, is_msl_shader_input_used() will return true after // calling ::compile() if the location were used by the MSL code. void add_msl_shader_input(const MSLShaderInterfaceVariable &input); // output is a shader interface variable description used to fix up shader output variables. // If shader outputs are provided, is_msl_shader_output_used() will return true after // calling ::compile() if the location were used by the MSL code. void add_msl_shader_output(const MSLShaderInterfaceVariable &output); // resource is a resource binding to indicate the MSL buffer, // texture or sampler index to use for a particular SPIR-V description set // and binding. If resource bindings are provided, // is_msl_resource_binding_used() will return true after calling ::compile() if // the set/binding combination was used by the MSL code. void add_msl_resource_binding(const MSLResourceBinding &resource); // desc_set and binding are the SPIR-V descriptor set and binding of a buffer resource // in this shader. index is the index within the dynamic offset buffer to use. This // function marks that resource as using a dynamic offset (VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC // or VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC). This function only has any effect if argument buffers // are enabled. If so, the buffer will have its address adjusted at the beginning of the shader with // an offset taken from the dynamic offset buffer. void add_dynamic_buffer(uint32_t desc_set, uint32_t binding, uint32_t index); // desc_set and binding are the SPIR-V descriptor set and binding of a buffer resource // in this shader. This function marks that resource as an inline uniform block // (VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK_EXT). This function only has any effect if argument buffers // are enabled. If so, the buffer block will be directly embedded into the argument // buffer, instead of being referenced indirectly via pointer. void add_inline_uniform_block(uint32_t desc_set, uint32_t binding); // When using MSL argument buffers, we can force "classic" MSL 1.0 binding schemes for certain descriptor sets. // This corresponds to VK_KHR_push_descriptor in Vulkan. void add_discrete_descriptor_set(uint32_t desc_set); // If an argument buffer is large enough, it may need to be in the device storage space rather than // constant. Opt-in to this behavior here on a per set basis. void set_argument_buffer_device_address_space(uint32_t desc_set, bool device_storage); // Query after compilation is done. This allows you to check if an input location was used by the shader. bool is_msl_shader_input_used(uint32_t location); // Query after compilation is done. This allows you to check if an output location were used by the shader. bool is_msl_shader_output_used(uint32_t location); // If not using add_msl_shader_input, it's possible // that certain builtin attributes need to be automatically assigned locations. // This is typical for tessellation builtin inputs such as tess levels, gl_Position, etc. // This returns k_unknown_location if the location was explicitly assigned with // add_msl_shader_input or the builtin is not used, otherwise returns N in [[attribute(N)]]. uint32_t get_automatic_builtin_input_location(spv::BuiltIn builtin) const; // If not using add_msl_shader_output, it's possible // that certain builtin attributes need to be automatically assigned locations. // This is typical for tessellation builtin outputs such as tess levels, gl_Position, etc. // This returns k_unknown_location if the location were explicitly assigned with // add_msl_shader_output or the builtin were not used, otherwise returns N in [[attribute(N)]]. uint32_t get_automatic_builtin_output_location(spv::BuiltIn builtin) const; // NOTE: Only resources which are remapped using add_msl_resource_binding will be reported here. // Constexpr samplers are always assumed to be emitted. // No specific MSLResourceBinding remapping is required for constexpr samplers as long as they are remapped // by remap_constexpr_sampler(_by_binding). bool is_msl_resource_binding_used(spv::ExecutionModel model, uint32_t set, uint32_t binding) const; // This must only be called after a successful call to CompilerMSL::compile(). // For a variable resource ID obtained through reflection API, report the automatically assigned resource index. // If the descriptor set was part of an argument buffer, report the [[id(N)]], // or [[buffer/texture/sampler]] binding for other resources. // If the resource was a combined image sampler, report the image binding here, // use the _secondary version of this call to query the sampler half of the resource. // If no binding exists, uint32_t(-1) is returned. uint32_t get_automatic_msl_resource_binding(uint32_t id) const; // Same as get_automatic_msl_resource_binding, but should only be used for combined image samplers, in which case the // sampler's binding is returned instead. For any other resource type, -1 is returned. // Secondary bindings are also used for the auxillary image atomic buffer. uint32_t get_automatic_msl_resource_binding_secondary(uint32_t id) const; // Same as get_automatic_msl_resource_binding, but should only be used for combined image samplers for multiplanar images, // in which case the second plane's binding is returned instead. For any other resource type, -1 is returned. uint32_t get_automatic_msl_resource_binding_tertiary(uint32_t id) const; // Same as get_automatic_msl_resource_binding, but should only be used for combined image samplers for triplanar images, // in which case the third plane's binding is returned instead. For any other resource type, -1 is returned. uint32_t get_automatic_msl_resource_binding_quaternary(uint32_t id) const; // Compiles the SPIR-V code into Metal Shading Language. std::string compile() override; // Remap a sampler with ID to a constexpr sampler. // Older iOS targets must use constexpr samplers in certain cases (PCF), // so a static sampler must be used. // The sampler will not consume a binding, but be declared in the entry point as a constexpr sampler. // This can be used on both combined image/samplers (sampler2D) or standalone samplers. // The remapped sampler must not be an array of samplers. // Prefer remap_constexpr_sampler_by_binding unless you're also doing reflection anyways. void remap_constexpr_sampler(VariableID id, const MSLConstexprSampler &sampler); // Same as remap_constexpr_sampler, except you provide set/binding, rather than variable ID. // Remaps based on ID take priority over set/binding remaps. void remap_constexpr_sampler_by_binding(uint32_t desc_set, uint32_t binding, const MSLConstexprSampler &sampler); // If using CompilerMSL::Options::pad_fragment_output_components, override the number of components we expect // to use for a particular location. The default is 4 if number of components is not overridden. void set_fragment_output_components(uint32_t location, uint32_t components); void set_combined_sampler_suffix(const char *suffix); const char *get_combined_sampler_suffix() const; protected: // An enum of SPIR-V functions that are implemented in additional // source code that is added to the shader if necessary. enum SPVFuncImpl : uint8_t { SPVFuncImplNone, SPVFuncImplMod, SPVFuncImplRadians, SPVFuncImplDegrees, SPVFuncImplFindILsb, SPVFuncImplFindSMsb, SPVFuncImplFindUMsb, SPVFuncImplSSign, SPVFuncImplArrayCopyMultidimBase, // Unfortunately, we cannot use recursive templates in the MSL compiler properly, // so stamp out variants up to some arbitrary maximum. SPVFuncImplArrayCopy = SPVFuncImplArrayCopyMultidimBase + 1, SPVFuncImplArrayOfArrayCopy2Dim = SPVFuncImplArrayCopyMultidimBase + 2, SPVFuncImplArrayOfArrayCopy3Dim = SPVFuncImplArrayCopyMultidimBase + 3, SPVFuncImplArrayOfArrayCopy4Dim = SPVFuncImplArrayCopyMultidimBase + 4, SPVFuncImplArrayOfArrayCopy5Dim = SPVFuncImplArrayCopyMultidimBase + 5, SPVFuncImplArrayOfArrayCopy6Dim = SPVFuncImplArrayCopyMultidimBase + 6, SPVFuncImplTexelBufferCoords, SPVFuncImplImage2DAtomicCoords, // Emulate texture2D atomic operations SPVFuncImplGradientCube, SPVFuncImplFMul, SPVFuncImplFAdd, SPVFuncImplFSub, SPVFuncImplQuantizeToF16, SPVFuncImplCubemapTo2DArrayFace, SPVFuncImplUnsafeArray, // Allow Metal to use the array template to make arrays a value type SPVFuncImplStorageMatrix, // Allow threadgroup construction of matrices SPVFuncImplInverse4x4, SPVFuncImplInverse3x3, SPVFuncImplInverse2x2, // It is very important that this come before *Swizzle and ChromaReconstruct*, to ensure it's // emitted before them. SPVFuncImplForwardArgs, // Likewise, this must come before *Swizzle. SPVFuncImplGetSwizzle, SPVFuncImplTextureSwizzle, SPVFuncImplGatherSwizzle, SPVFuncImplGatherCompareSwizzle, SPVFuncImplSubgroupBroadcast, SPVFuncImplSubgroupBroadcastFirst, SPVFuncImplSubgroupBallot, SPVFuncImplSubgroupBallotBitExtract, SPVFuncImplSubgroupBallotFindLSB, SPVFuncImplSubgroupBallotFindMSB, SPVFuncImplSubgroupBallotBitCount, SPVFuncImplSubgroupAllEqual, SPVFuncImplSubgroupShuffle, SPVFuncImplSubgroupShuffleXor, SPVFuncImplSubgroupShuffleUp, SPVFuncImplSubgroupShuffleDown, SPVFuncImplQuadBroadcast, SPVFuncImplQuadSwap, SPVFuncImplReflectScalar, SPVFuncImplRefractScalar, SPVFuncImplFaceForwardScalar, SPVFuncImplChromaReconstructNearest2Plane, SPVFuncImplChromaReconstructNearest3Plane, SPVFuncImplChromaReconstructLinear422CositedEven2Plane, SPVFuncImplChromaReconstructLinear422CositedEven3Plane, SPVFuncImplChromaReconstructLinear422Midpoint2Plane, SPVFuncImplChromaReconstructLinear422Midpoint3Plane, SPVFuncImplChromaReconstructLinear420XCositedEvenYCositedEven2Plane, SPVFuncImplChromaReconstructLinear420XCositedEvenYCositedEven3Plane, SPVFuncImplChromaReconstructLinear420XMidpointYCositedEven2Plane, SPVFuncImplChromaReconstructLinear420XMidpointYCositedEven3Plane, SPVFuncImplChromaReconstructLinear420XCositedEvenYMidpoint2Plane, SPVFuncImplChromaReconstructLinear420XCositedEvenYMidpoint3Plane, SPVFuncImplChromaReconstructLinear420XMidpointYMidpoint2Plane, SPVFuncImplChromaReconstructLinear420XMidpointYMidpoint3Plane, SPVFuncImplExpandITUFullRange, SPVFuncImplExpandITUNarrowRange, SPVFuncImplConvertYCbCrBT709, SPVFuncImplConvertYCbCrBT601, SPVFuncImplConvertYCbCrBT2020, SPVFuncImplDynamicImageSampler, SPVFuncImplRayQueryIntersectionParams, SPVFuncImplVariableDescriptor, SPVFuncImplVariableSizedDescriptor, SPVFuncImplVariableDescriptorArray, SPVFuncImplPaddedStd140 }; // If the underlying resource has been used for comparison then duplicate loads of that resource must be too // Use Metal's native frame-buffer fetch API for subpass inputs. void emit_texture_op(const Instruction &i, bool sparse) override; void emit_binary_ptr_op(uint32_t result_type, uint32_t result_id, uint32_t op0, uint32_t op1, const char *op); std::string to_ptr_expression(uint32_t id, bool register_expression_read = true); void emit_binary_unord_op(uint32_t result_type, uint32_t result_id, uint32_t op0, uint32_t op1, const char *op); void emit_instruction(const Instruction &instr) override; void emit_glsl_op(uint32_t result_type, uint32_t result_id, uint32_t op, const uint32_t *args, uint32_t count) override; void emit_spv_amd_shader_trinary_minmax_op(uint32_t result_type, uint32_t result_id, uint32_t op, const uint32_t *args, uint32_t count) override; void emit_header() override; void emit_function_prototype(SPIRFunction &func, const Bitset &return_flags) override; void emit_sampled_image_op(uint32_t result_type, uint32_t result_id, uint32_t image_id, uint32_t samp_id) override; void emit_subgroup_op(const Instruction &i) override; std::string to_texture_op(const Instruction &i, bool sparse, bool *forward, SmallVector &inherited_expressions) override; void emit_fixup() override; std::string to_struct_member(const SPIRType &type, uint32_t member_type_id, uint32_t index, const std::string &qualifier = ""); void emit_struct_member(const SPIRType &type, uint32_t member_type_id, uint32_t index, const std::string &qualifier = "", uint32_t base_offset = 0) override; void emit_struct_padding_target(const SPIRType &type) override; std::string type_to_glsl(const SPIRType &type, uint32_t id, bool member); std::string type_to_glsl(const SPIRType &type, uint32_t id = 0) override; void emit_block_hints(const SPIRBlock &block) override; // Allow Metal to use the array template to make arrays a value type std::string type_to_array_glsl(const SPIRType &type) override; std::string constant_op_expression(const SPIRConstantOp &cop) override; bool variable_decl_is_remapped_storage(const SPIRVariable &variable, spv::StorageClass storage) const override; // GCC workaround of lambdas calling protected functions (for older GCC versions) std::string variable_decl(const SPIRType &type, const std::string &name, uint32_t id = 0) override; std::string image_type_glsl(const SPIRType &type, uint32_t id = 0) override; std::string sampler_type(const SPIRType &type, uint32_t id); std::string builtin_to_glsl(spv::BuiltIn builtin, spv::StorageClass storage) override; std::string to_func_call_arg(const SPIRFunction::Parameter &arg, uint32_t id) override; std::string to_name(uint32_t id, bool allow_alias = true) const override; std::string to_function_name(const TextureFunctionNameArguments &args) override; std::string to_function_args(const TextureFunctionArguments &args, bool *p_forward) override; std::string to_initializer_expression(const SPIRVariable &var) override; std::string to_zero_initialized_expression(uint32_t type_id) override; std::string unpack_expression_type(std::string expr_str, const SPIRType &type, uint32_t physical_type_id, bool is_packed, bool row_major) override; // Returns true for BuiltInSampleMask because gl_SampleMask[] is an array in SPIR-V, but [[sample_mask]] is a scalar in Metal. bool builtin_translates_to_nonarray(spv::BuiltIn builtin) const override; std::string bitcast_glsl_op(const SPIRType &result_type, const SPIRType &argument_type) override; bool emit_complex_bitcast(uint32_t result_id, uint32_t id, uint32_t op0) override; bool skip_argument(uint32_t id) const override; std::string to_member_reference(uint32_t base, const SPIRType &type, uint32_t index, bool ptr_chain_is_resolved) override; std::string to_qualifiers_glsl(uint32_t id) override; void replace_illegal_names() override; void declare_constant_arrays(); void replace_illegal_entry_point_names(); void sync_entry_point_aliases_and_names(); static const std::unordered_set &get_reserved_keyword_set(); static const std::unordered_set &get_illegal_func_names(); // Constant arrays of non-primitive types (i.e. matrices) won't link properly into Metal libraries void declare_complex_constant_arrays(); bool is_patch_block(const SPIRType &type); bool is_non_native_row_major_matrix(uint32_t id) override; bool member_is_non_native_row_major_matrix(const SPIRType &type, uint32_t index) override; std::string convert_row_major_matrix(std::string exp_str, const SPIRType &exp_type, uint32_t physical_type_id, bool is_packed, bool relaxed) override; bool is_tesc_shader() const; bool is_tese_shader() const; void preprocess_op_codes(); void localize_global_variables(); void extract_global_variables_from_functions(); void mark_packable_structs(); void mark_as_packable(SPIRType &type); void mark_as_workgroup_struct(SPIRType &type); std::unordered_map> function_global_vars; void extract_global_variables_from_function(uint32_t func_id, std::set &added_arg_ids, std::unordered_set &global_var_ids, std::unordered_set &processed_func_ids); uint32_t add_interface_block(spv::StorageClass storage, bool patch = false); uint32_t add_interface_block_pointer(uint32_t ib_var_id, spv::StorageClass storage); struct InterfaceBlockMeta { struct LocationMeta { uint32_t base_type_id = 0; uint32_t num_components = 0; bool flat = false; bool noperspective = false; bool centroid = false; bool sample = false; }; std::unordered_map location_meta; bool strip_array = false; bool allow_local_declaration = false; }; std::string to_tesc_invocation_id(); void emit_local_masked_variable(const SPIRVariable &masked_var, bool strip_array); void add_variable_to_interface_block(spv::StorageClass storage, const std::string &ib_var_ref, SPIRType &ib_type, SPIRVariable &var, InterfaceBlockMeta &meta); void add_composite_variable_to_interface_block(spv::StorageClass storage, const std::string &ib_var_ref, SPIRType &ib_type, SPIRVariable &var, InterfaceBlockMeta &meta); void add_plain_variable_to_interface_block(spv::StorageClass storage, const std::string &ib_var_ref, SPIRType &ib_type, SPIRVariable &var, InterfaceBlockMeta &meta); bool add_component_variable_to_interface_block(spv::StorageClass storage, const std::string &ib_var_ref, SPIRVariable &var, const SPIRType &type, InterfaceBlockMeta &meta); void add_plain_member_variable_to_interface_block(spv::StorageClass storage, const std::string &ib_var_ref, SPIRType &ib_type, SPIRVariable &var, SPIRType &var_type, uint32_t mbr_idx, InterfaceBlockMeta &meta, const std::string &mbr_name_qual, const std::string &var_chain_qual, uint32_t &location, uint32_t &var_mbr_idx); void add_composite_member_variable_to_interface_block(spv::StorageClass storage, const std::string &ib_var_ref, SPIRType &ib_type, SPIRVariable &var, SPIRType &var_type, uint32_t mbr_idx, InterfaceBlockMeta &meta, const std::string &mbr_name_qual, const std::string &var_chain_qual, uint32_t &location, uint32_t &var_mbr_idx); void add_tess_level_input_to_interface_block(const std::string &ib_var_ref, SPIRType &ib_type, SPIRVariable &var); void add_tess_level_input(const std::string &base_ref, const std::string &mbr_name, SPIRVariable &var); void fix_up_interface_member_indices(spv::StorageClass storage, uint32_t ib_type_id); void mark_location_as_used_by_shader(uint32_t location, const SPIRType &type, spv::StorageClass storage, bool fallback = false); uint32_t ensure_correct_builtin_type(uint32_t type_id, spv::BuiltIn builtin); uint32_t ensure_correct_input_type(uint32_t type_id, uint32_t location, uint32_t component, uint32_t num_components, bool strip_array); void emit_custom_templates(); void emit_custom_functions(); void emit_resources(); void emit_specialization_constants_and_structs(); void emit_interface_block(uint32_t ib_var_id); bool maybe_emit_array_assignment(uint32_t id_lhs, uint32_t id_rhs); bool is_var_runtime_size_array(const SPIRVariable &var) const; uint32_t get_resource_array_size(const SPIRType &type, uint32_t id) const; void fix_up_shader_inputs_outputs(); std::string func_type_decl(SPIRType &type); std::string entry_point_args_classic(bool append_comma); std::string entry_point_args_argument_buffer(bool append_comma); std::string entry_point_arg_stage_in(); void entry_point_args_builtin(std::string &args); void entry_point_args_discrete_descriptors(std::string &args); std::string append_member_name(const std::string &qualifier, const SPIRType &type, uint32_t index); std::string ensure_valid_name(std::string name, std::string pfx); std::string to_sampler_expression(uint32_t id); std::string to_swizzle_expression(uint32_t id); std::string to_buffer_size_expression(uint32_t id); bool is_sample_rate() const; bool is_intersection_query() const; bool is_direct_input_builtin(spv::BuiltIn builtin); std::string builtin_qualifier(spv::BuiltIn builtin); std::string builtin_type_decl(spv::BuiltIn builtin, uint32_t id = 0); std::string built_in_func_arg(spv::BuiltIn builtin, bool prefix_comma); std::string member_attribute_qualifier(const SPIRType &type, uint32_t index); std::string member_location_attribute_qualifier(const SPIRType &type, uint32_t index); std::string argument_decl(const SPIRFunction::Parameter &arg); const char *descriptor_address_space(uint32_t id, spv::StorageClass storage, const char *plain_address_space) const; std::string round_fp_tex_coords(std::string tex_coords, bool coord_is_fp); uint32_t get_metal_resource_index(SPIRVariable &var, SPIRType::BaseType basetype, uint32_t plane = 0); uint32_t get_member_location(uint32_t type_id, uint32_t index, uint32_t *comp = nullptr) const; uint32_t get_or_allocate_builtin_input_member_location(spv::BuiltIn builtin, uint32_t type_id, uint32_t index, uint32_t *comp = nullptr); uint32_t get_or_allocate_builtin_output_member_location(spv::BuiltIn builtin, uint32_t type_id, uint32_t index, uint32_t *comp = nullptr); uint32_t get_physical_tess_level_array_size(spv::BuiltIn builtin) const; // MSL packing rules. These compute the effective packing rules as observed by the MSL compiler in the MSL output. // These values can change depending on various extended decorations which control packing rules. // We need to make these rules match up with SPIR-V declared rules. uint32_t get_declared_type_size_msl(const SPIRType &type, bool packed, bool row_major) const; uint32_t get_declared_type_array_stride_msl(const SPIRType &type, bool packed, bool row_major) const; uint32_t get_declared_type_matrix_stride_msl(const SPIRType &type, bool packed, bool row_major) const; uint32_t get_declared_type_alignment_msl(const SPIRType &type, bool packed, bool row_major) const; uint32_t get_declared_struct_member_size_msl(const SPIRType &struct_type, uint32_t index) const; uint32_t get_declared_struct_member_array_stride_msl(const SPIRType &struct_type, uint32_t index) const; uint32_t get_declared_struct_member_matrix_stride_msl(const SPIRType &struct_type, uint32_t index) const; uint32_t get_declared_struct_member_alignment_msl(const SPIRType &struct_type, uint32_t index) const; uint32_t get_declared_input_size_msl(const SPIRType &struct_type, uint32_t index) const; uint32_t get_declared_input_array_stride_msl(const SPIRType &struct_type, uint32_t index) const; uint32_t get_declared_input_matrix_stride_msl(const SPIRType &struct_type, uint32_t index) const; uint32_t get_declared_input_alignment_msl(const SPIRType &struct_type, uint32_t index) const; const SPIRType &get_physical_member_type(const SPIRType &struct_type, uint32_t index) const; SPIRType get_presumed_input_type(const SPIRType &struct_type, uint32_t index) const; uint32_t get_declared_struct_size_msl(const SPIRType &struct_type, bool ignore_alignment = false, bool ignore_padding = false) const; std::string to_component_argument(uint32_t id); void align_struct(SPIRType &ib_type, std::unordered_set &aligned_structs); void mark_scalar_layout_structs(const SPIRType &ib_type); void mark_struct_members_packed(const SPIRType &type); void ensure_member_packing_rules_msl(SPIRType &ib_type, uint32_t index); bool validate_member_packing_rules_msl(const SPIRType &type, uint32_t index) const; std::string get_argument_address_space(const SPIRVariable &argument); std::string get_type_address_space(const SPIRType &type, uint32_t id, bool argument = false); const char *to_restrict(uint32_t id, bool space); SPIRType &get_stage_in_struct_type(); SPIRType &get_stage_out_struct_type(); SPIRType &get_patch_stage_in_struct_type(); SPIRType &get_patch_stage_out_struct_type(); std::string get_tess_factor_struct_name(); SPIRType &get_uint_type(); uint32_t get_uint_type_id(); void emit_atomic_func_op(uint32_t result_type, uint32_t result_id, const char *op, spv::Op opcode, uint32_t mem_order_1, uint32_t mem_order_2, bool has_mem_order_2, uint32_t op0, uint32_t op1 = 0, bool op1_is_pointer = false, bool op1_is_literal = false, uint32_t op2 = 0); const char *get_memory_order(uint32_t spv_mem_sem); void add_pragma_line(const std::string &line); void add_typedef_line(const std::string &line); void emit_barrier(uint32_t id_exe_scope, uint32_t id_mem_scope, uint32_t id_mem_sem); bool emit_array_copy(const char *expr, uint32_t lhs_id, uint32_t rhs_id, spv::StorageClass lhs_storage, spv::StorageClass rhs_storage) override; void build_implicit_builtins(); uint32_t build_constant_uint_array_pointer(); void emit_entry_point_declarations() override; bool uses_explicit_early_fragment_test(); uint32_t builtin_frag_coord_id = 0; uint32_t builtin_sample_id_id = 0; uint32_t builtin_sample_mask_id = 0; uint32_t builtin_helper_invocation_id = 0; uint32_t builtin_vertex_idx_id = 0; uint32_t builtin_base_vertex_id = 0; uint32_t builtin_instance_idx_id = 0; uint32_t builtin_base_instance_id = 0; uint32_t builtin_view_idx_id = 0; uint32_t builtin_layer_id = 0; uint32_t builtin_invocation_id_id = 0; uint32_t builtin_primitive_id_id = 0; uint32_t builtin_subgroup_invocation_id_id = 0; uint32_t builtin_subgroup_size_id = 0; uint32_t builtin_dispatch_base_id = 0; uint32_t builtin_stage_input_size_id = 0; uint32_t builtin_local_invocation_index_id = 0; uint32_t builtin_workgroup_size_id = 0; uint32_t swizzle_buffer_id = 0; uint32_t buffer_size_buffer_id = 0; uint32_t view_mask_buffer_id = 0; uint32_t dynamic_offsets_buffer_id = 0; uint32_t uint_type_id = 0; uint32_t argument_buffer_padding_buffer_type_id = 0; uint32_t argument_buffer_padding_image_type_id = 0; uint32_t argument_buffer_padding_sampler_type_id = 0; bool does_shader_write_sample_mask = false; bool frag_shader_needs_discard_checks = false; void cast_to_variable_store(uint32_t target_id, std::string &expr, const SPIRType &expr_type) override; void cast_from_variable_load(uint32_t source_id, std::string &expr, const SPIRType &expr_type) override; void emit_store_statement(uint32_t lhs_expression, uint32_t rhs_expression) override; void analyze_sampled_image_usage(); bool access_chain_needs_stage_io_builtin_translation(uint32_t base) override; bool prepare_access_chain_for_scalar_access(std::string &expr, const SPIRType &type, spv::StorageClass storage, bool &is_packed) override; void fix_up_interpolant_access_chain(const uint32_t *ops, uint32_t length); void check_physical_type_cast(std::string &expr, const SPIRType *type, uint32_t physical_type) override; bool emit_tessellation_access_chain(const uint32_t *ops, uint32_t length); bool emit_tessellation_io_load(uint32_t result_type, uint32_t id, uint32_t ptr); bool is_out_of_bounds_tessellation_level(uint32_t id_lhs); void ensure_builtin(spv::StorageClass storage, spv::BuiltIn builtin); void mark_implicit_builtin(spv::StorageClass storage, spv::BuiltIn builtin, uint32_t id); std::string convert_to_f32(const std::string &expr, uint32_t components); Options msl_options; std::set spv_function_implementations; // Must be ordered to ensure declarations are in a specific order. std::map inputs_by_location; std::unordered_map inputs_by_builtin; std::map outputs_by_location; std::unordered_map outputs_by_builtin; std::unordered_set location_inputs_in_use; std::unordered_set location_inputs_in_use_fallback; std::unordered_set location_outputs_in_use; std::unordered_set location_outputs_in_use_fallback; std::unordered_map fragment_output_components; std::unordered_map builtin_to_automatic_input_location; std::unordered_map builtin_to_automatic_output_location; std::set pragma_lines; std::set typedef_lines; SmallVector vars_needing_early_declaration; std::unordered_map, InternalHasher> resource_bindings; std::unordered_map resource_arg_buff_idx_to_binding_number; uint32_t next_metal_resource_index_buffer = 0; uint32_t next_metal_resource_index_texture = 0; uint32_t next_metal_resource_index_sampler = 0; // Intentionally uninitialized, works around MSVC 2013 bug. uint32_t next_metal_resource_ids[kMaxArgumentBuffers]; VariableID stage_in_var_id = 0; VariableID stage_out_var_id = 0; VariableID patch_stage_in_var_id = 0; VariableID patch_stage_out_var_id = 0; VariableID stage_in_ptr_var_id = 0; VariableID stage_out_ptr_var_id = 0; VariableID tess_level_inner_var_id = 0; VariableID tess_level_outer_var_id = 0; VariableID stage_out_masked_builtin_type_id = 0; // Handle HLSL-style 0-based vertex/instance index. enum class TriState { Neutral, No, Yes }; TriState needs_base_vertex_arg = TriState::Neutral; TriState needs_base_instance_arg = TriState::Neutral; bool has_sampled_images = false; bool builtin_declaration = false; // Handle HLSL-style 0-based vertex/instance index. bool is_using_builtin_array = false; // Force the use of C style array declaration. bool using_builtin_array() const; bool is_rasterization_disabled = false; bool capture_output_to_buffer = false; bool needs_swizzle_buffer_def = false; bool used_swizzle_buffer = false; bool added_builtin_tess_level = false; bool needs_subgroup_invocation_id = false; bool needs_subgroup_size = false; bool needs_sample_id = false; bool needs_helper_invocation = false; std::string qual_pos_var_name; std::string stage_in_var_name = "in"; std::string stage_out_var_name = "out"; std::string patch_stage_in_var_name = "patchIn"; std::string patch_stage_out_var_name = "patchOut"; std::string sampler_name_suffix = "Smplr"; std::string swizzle_name_suffix = "Swzl"; std::string buffer_size_name_suffix = "BufferSize"; std::string plane_name_suffix = "Plane"; std::string input_wg_var_name = "gl_in"; std::string input_buffer_var_name = "spvIn"; std::string output_buffer_var_name = "spvOut"; std::string patch_input_buffer_var_name = "spvPatchIn"; std::string patch_output_buffer_var_name = "spvPatchOut"; std::string tess_factor_buffer_var_name = "spvTessLevel"; std::string index_buffer_var_name = "spvIndices"; spv::Op previous_instruction_opcode = spv::OpNop; // Must be ordered since declaration is in a specific order. std::map constexpr_samplers_by_id; std::unordered_map constexpr_samplers_by_binding; const MSLConstexprSampler *find_constexpr_sampler(uint32_t id) const; std::unordered_set buffers_requiring_array_length; SmallVector> buffer_aliases_argument; SmallVector buffer_aliases_discrete; std::unordered_set atomic_image_vars_emulated; // Emulate texture2D atomic operations std::unordered_set pull_model_inputs; std::unordered_set recursive_inputs; SmallVector entry_point_bindings; // Must be ordered since array is in a specific order. std::map> buffers_requiring_dynamic_offset; SmallVector disabled_frag_outputs; std::unordered_set inline_uniform_blocks; uint32_t argument_buffer_ids[kMaxArgumentBuffers]; uint32_t argument_buffer_discrete_mask = 0; uint32_t argument_buffer_device_storage_mask = 0; void analyze_argument_buffers(); bool descriptor_set_is_argument_buffer(uint32_t desc_set) const; MSLResourceBinding &get_argument_buffer_resource(uint32_t desc_set, uint32_t arg_idx); void add_argument_buffer_padding_buffer_type(SPIRType &struct_type, uint32_t &mbr_idx, uint32_t &arg_buff_index, MSLResourceBinding &rez_bind); void add_argument_buffer_padding_image_type(SPIRType &struct_type, uint32_t &mbr_idx, uint32_t &arg_buff_index, MSLResourceBinding &rez_bind); void add_argument_buffer_padding_sampler_type(SPIRType &struct_type, uint32_t &mbr_idx, uint32_t &arg_buff_index, MSLResourceBinding &rez_bind); void add_argument_buffer_padding_type(uint32_t mbr_type_id, SPIRType &struct_type, uint32_t &mbr_idx, uint32_t &arg_buff_index, uint32_t count); uint32_t get_target_components_for_fragment_location(uint32_t location) const; uint32_t build_extended_vector_type(uint32_t type_id, uint32_t components, SPIRType::BaseType basetype = SPIRType::Unknown); uint32_t build_msl_interpolant_type(uint32_t type_id, bool is_noperspective); bool suppress_missing_prototypes = false; void add_spv_func_and_recompile(SPVFuncImpl spv_func); void activate_argument_buffer_resources(); bool type_is_msl_framebuffer_fetch(const SPIRType &type) const; bool type_is_pointer(const SPIRType &type) const; bool type_is_pointer_to_pointer(const SPIRType &type) const; bool is_supported_argument_buffer_type(const SPIRType &type) const; bool variable_storage_requires_stage_io(spv::StorageClass storage) const; bool needs_manual_helper_invocation_updates() const { return msl_options.manual_helper_invocation_updates && msl_options.supports_msl_version(2, 3); } bool needs_frag_discard_checks() const { return get_execution_model() == spv::ExecutionModelFragment && msl_options.supports_msl_version(2, 3) && msl_options.check_discarded_frag_stores && frag_shader_needs_discard_checks; } bool has_additional_fixed_sample_mask() const { return msl_options.additional_fixed_sample_mask != 0xffffffff; } std::string additional_fixed_sample_mask_str() const; // OpcodeHandler that handles several MSL preprocessing operations. struct OpCodePreprocessor : OpcodeHandler { OpCodePreprocessor(CompilerMSL &compiler_) : compiler(compiler_) { } bool handle(spv::Op opcode, const uint32_t *args, uint32_t length) override; CompilerMSL::SPVFuncImpl get_spv_func_impl(spv::Op opcode, const uint32_t *args); void check_resource_write(uint32_t var_id); CompilerMSL &compiler; std::unordered_map result_types; std::unordered_map image_pointers_emulated; // Emulate texture2D atomic operations bool suppress_missing_prototypes = false; bool uses_atomics = false; bool uses_image_write = false; bool uses_buffer_write = false; bool uses_discard = false; bool needs_subgroup_invocation_id = false; bool needs_subgroup_size = false; bool needs_sample_id = false; bool needs_helper_invocation = false; }; // OpcodeHandler that scans for uses of sampled images struct SampledImageScanner : OpcodeHandler { SampledImageScanner(CompilerMSL &compiler_) : compiler(compiler_) { } bool handle(spv::Op opcode, const uint32_t *args, uint32_t) override; CompilerMSL &compiler; }; // Sorts the members of a SPIRType and associated Meta info based on a settable sorting // aspect, which defines which aspect of the struct members will be used to sort them. // Regardless of the sorting aspect, built-in members always appear at the end of the struct. struct MemberSorter { enum SortAspect { LocationThenBuiltInType, Offset }; void sort(); bool operator()(uint32_t mbr_idx1, uint32_t mbr_idx2); MemberSorter(SPIRType &t, Meta &m, SortAspect sa); SPIRType &type; Meta &meta; SortAspect sort_aspect; }; }; } // namespace SPIRV_CROSS_NAMESPACE #endif ================================================ FILE: src/libraries/spirv_cross/spirv_parser.cpp ================================================ /* * Copyright 2018-2021 Arm Limited * SPDX-License-Identifier: Apache-2.0 OR MIT * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* * At your option, you may choose to accept this material under either: * 1. The Apache License, Version 2.0, found at , or * 2. The MIT License, found at . */ #include "spirv_parser.hpp" #include using namespace std; using namespace spv; namespace SPIRV_CROSS_NAMESPACE { Parser::Parser(vector spirv) { ir.spirv = std::move(spirv); } Parser::Parser(const uint32_t *spirv_data, size_t word_count) { ir.spirv = vector(spirv_data, spirv_data + word_count); } static bool decoration_is_string(Decoration decoration) { switch (decoration) { case DecorationHlslSemanticGOOGLE: return true; default: return false; } } static inline uint32_t swap_endian(uint32_t v) { return ((v >> 24) & 0x000000ffu) | ((v >> 8) & 0x0000ff00u) | ((v << 8) & 0x00ff0000u) | ((v << 24) & 0xff000000u); } static bool is_valid_spirv_version(uint32_t version) { switch (version) { // Allow v99 since it tends to just work. case 99: case 0x10000: // SPIR-V 1.0 case 0x10100: // SPIR-V 1.1 case 0x10200: // SPIR-V 1.2 case 0x10300: // SPIR-V 1.3 case 0x10400: // SPIR-V 1.4 case 0x10500: // SPIR-V 1.5 case 0x10600: // SPIR-V 1.6 return true; default: return false; } } void Parser::parse() { auto &spirv = ir.spirv; auto len = spirv.size(); if (len < 5) SPIRV_CROSS_THROW("SPIRV file too small."); auto s = spirv.data(); // Endian-swap if we need to. if (s[0] == swap_endian(MagicNumber)) transform(begin(spirv), end(spirv), begin(spirv), [](uint32_t c) { return swap_endian(c); }); if (s[0] != MagicNumber || !is_valid_spirv_version(s[1])) SPIRV_CROSS_THROW("Invalid SPIRV format."); uint32_t bound = s[3]; const uint32_t MaximumNumberOfIDs = 0x3fffff; if (bound > MaximumNumberOfIDs) SPIRV_CROSS_THROW("ID bound exceeds limit of 0x3fffff.\n"); ir.set_id_bounds(bound); uint32_t offset = 5; SmallVector instructions; while (offset < len) { Instruction instr = {}; instr.op = spirv[offset] & 0xffff; instr.count = (spirv[offset] >> 16) & 0xffff; if (instr.count == 0) SPIRV_CROSS_THROW("SPIR-V instructions cannot consume 0 words. Invalid SPIR-V file."); instr.offset = offset + 1; instr.length = instr.count - 1; offset += instr.count; if (offset > spirv.size()) SPIRV_CROSS_THROW("SPIR-V instruction goes out of bounds."); instructions.push_back(instr); } for (auto &i : instructions) parse(i); for (auto &fixup : forward_pointer_fixups) { auto &target = get(fixup.first); auto &source = get(fixup.second); target.member_types = source.member_types; target.basetype = source.basetype; target.self = source.self; } forward_pointer_fixups.clear(); if (current_function) SPIRV_CROSS_THROW("Function was not terminated."); if (current_block) SPIRV_CROSS_THROW("Block was not terminated."); if (ir.default_entry_point == 0) SPIRV_CROSS_THROW("There is no entry point in the SPIR-V module."); } const uint32_t *Parser::stream(const Instruction &instr) const { // If we're not going to use any arguments, just return nullptr. // We want to avoid case where we return an out of range pointer // that trips debug assertions on some platforms. if (!instr.length) return nullptr; if (instr.offset + instr.length > ir.spirv.size()) SPIRV_CROSS_THROW("Compiler::stream() out of range."); return &ir.spirv[instr.offset]; } static string extract_string(const vector &spirv, uint32_t offset) { string ret; for (uint32_t i = offset; i < spirv.size(); i++) { uint32_t w = spirv[i]; for (uint32_t j = 0; j < 4; j++, w >>= 8) { char c = w & 0xff; if (c == '\0') return ret; ret += c; } } SPIRV_CROSS_THROW("String was not terminated before EOF"); } void Parser::parse(const Instruction &instruction) { auto *ops = stream(instruction); auto op = static_cast(instruction.op); uint32_t length = instruction.length; // HACK for glslang that might emit OpEmitMeshTasksEXT followed by return / branch. // Instead of failing hard, just ignore it. if (ignore_trailing_block_opcodes) { ignore_trailing_block_opcodes = false; if (op == OpReturn || op == OpBranch || op == OpUnreachable) return; } switch (op) { case OpSourceContinued: case OpSourceExtension: case OpNop: case OpModuleProcessed: break; case OpString: { set(ops[0], extract_string(ir.spirv, instruction.offset + 1)); break; } case OpMemoryModel: ir.addressing_model = static_cast(ops[0]); ir.memory_model = static_cast(ops[1]); break; case OpSource: { auto lang = static_cast(ops[0]); switch (lang) { case SourceLanguageESSL: ir.source.es = true; ir.source.version = ops[1]; ir.source.known = true; ir.source.hlsl = false; break; case SourceLanguageGLSL: ir.source.es = false; ir.source.version = ops[1]; ir.source.known = true; ir.source.hlsl = false; break; case SourceLanguageHLSL: // For purposes of cross-compiling, this is GLSL 450. ir.source.es = false; ir.source.version = 450; ir.source.known = true; ir.source.hlsl = true; break; default: ir.source.known = false; break; } break; } case OpUndef: { uint32_t result_type = ops[0]; uint32_t id = ops[1]; set(id, result_type); if (current_block) current_block->ops.push_back(instruction); break; } case OpCapability: { uint32_t cap = ops[0]; if (cap == CapabilityKernel) SPIRV_CROSS_THROW("Kernel capability not supported."); ir.declared_capabilities.push_back(static_cast(ops[0])); break; } case OpExtension: { auto ext = extract_string(ir.spirv, instruction.offset); ir.declared_extensions.push_back(std::move(ext)); break; } case OpExtInstImport: { uint32_t id = ops[0]; SPIRExtension::Extension spirv_ext = SPIRExtension::Unsupported; auto ext = extract_string(ir.spirv, instruction.offset + 1); if (ext == "GLSL.std.450") spirv_ext = SPIRExtension::GLSL; else if (ext == "DebugInfo") spirv_ext = SPIRExtension::SPV_debug_info; else if (ext == "SPV_AMD_shader_ballot") spirv_ext = SPIRExtension::SPV_AMD_shader_ballot; else if (ext == "SPV_AMD_shader_explicit_vertex_parameter") spirv_ext = SPIRExtension::SPV_AMD_shader_explicit_vertex_parameter; else if (ext == "SPV_AMD_shader_trinary_minmax") spirv_ext = SPIRExtension::SPV_AMD_shader_trinary_minmax; else if (ext == "SPV_AMD_gcn_shader") spirv_ext = SPIRExtension::SPV_AMD_gcn_shader; else if (ext == "NonSemantic.DebugPrintf") spirv_ext = SPIRExtension::NonSemanticDebugPrintf; else if (ext == "NonSemantic.Shader.DebugInfo.100") spirv_ext = SPIRExtension::NonSemanticShaderDebugInfo; else if (ext.find("NonSemantic.") == 0) spirv_ext = SPIRExtension::NonSemanticGeneric; set(id, spirv_ext); // Other SPIR-V extensions which have ExtInstrs are currently not supported. break; } case OpExtInst: { // The SPIR-V debug information extended instructions might come at global scope. if (current_block) { current_block->ops.push_back(instruction); if (length >= 2) { const auto *type = maybe_get(ops[0]); if (type) ir.load_type_width.insert({ ops[1], type->width }); } } break; } case OpEntryPoint: { auto itr = ir.entry_points.insert(make_pair(ops[1], SPIREntryPoint(ops[1], static_cast(ops[0]), extract_string(ir.spirv, instruction.offset + 2)))); auto &e = itr.first->second; // Strings need nul-terminator and consume the whole word. uint32_t strlen_words = uint32_t((e.name.size() + 1 + 3) >> 2); for (uint32_t i = strlen_words + 2; i < instruction.length; i++) e.interface_variables.push_back(ops[i]); // Set the name of the entry point in case OpName is not provided later. ir.set_name(ops[1], e.name); // If we don't have an entry, make the first one our "default". if (!ir.default_entry_point) ir.default_entry_point = ops[1]; break; } case OpExecutionMode: { auto &execution = ir.entry_points[ops[0]]; auto mode = static_cast(ops[1]); execution.flags.set(mode); switch (mode) { case ExecutionModeInvocations: execution.invocations = ops[2]; break; case ExecutionModeLocalSize: execution.workgroup_size.x = ops[2]; execution.workgroup_size.y = ops[3]; execution.workgroup_size.z = ops[4]; break; case ExecutionModeOutputVertices: execution.output_vertices = ops[2]; break; case ExecutionModeOutputPrimitivesEXT: execution.output_primitives = ops[2]; break; default: break; } break; } case OpExecutionModeId: { auto &execution = ir.entry_points[ops[0]]; auto mode = static_cast(ops[1]); execution.flags.set(mode); if (mode == ExecutionModeLocalSizeId) { execution.workgroup_size.id_x = ops[2]; execution.workgroup_size.id_y = ops[3]; execution.workgroup_size.id_z = ops[4]; } break; } case OpName: { uint32_t id = ops[0]; ir.set_name(id, extract_string(ir.spirv, instruction.offset + 1)); break; } case OpMemberName: { uint32_t id = ops[0]; uint32_t member = ops[1]; ir.set_member_name(id, member, extract_string(ir.spirv, instruction.offset + 2)); break; } case OpDecorationGroup: { // Noop, this simply means an ID should be a collector of decorations. // The meta array is already a flat array of decorations which will contain the relevant decorations. break; } case OpGroupDecorate: { uint32_t group_id = ops[0]; auto &decorations = ir.meta[group_id].decoration; auto &flags = decorations.decoration_flags; // Copies decorations from one ID to another. Only copy decorations which are set in the group, // i.e., we cannot just copy the meta structure directly. for (uint32_t i = 1; i < length; i++) { uint32_t target = ops[i]; flags.for_each_bit([&](uint32_t bit) { auto decoration = static_cast(bit); if (decoration_is_string(decoration)) { ir.set_decoration_string(target, decoration, ir.get_decoration_string(group_id, decoration)); } else { ir.meta[target].decoration_word_offset[decoration] = ir.meta[group_id].decoration_word_offset[decoration]; ir.set_decoration(target, decoration, ir.get_decoration(group_id, decoration)); } }); } break; } case OpGroupMemberDecorate: { uint32_t group_id = ops[0]; auto &flags = ir.meta[group_id].decoration.decoration_flags; // Copies decorations from one ID to another. Only copy decorations which are set in the group, // i.e., we cannot just copy the meta structure directly. for (uint32_t i = 1; i + 1 < length; i += 2) { uint32_t target = ops[i + 0]; uint32_t index = ops[i + 1]; flags.for_each_bit([&](uint32_t bit) { auto decoration = static_cast(bit); if (decoration_is_string(decoration)) ir.set_member_decoration_string(target, index, decoration, ir.get_decoration_string(group_id, decoration)); else ir.set_member_decoration(target, index, decoration, ir.get_decoration(group_id, decoration)); }); } break; } case OpDecorate: case OpDecorateId: { // OpDecorateId technically supports an array of arguments, but our only supported decorations are single uint, // so merge decorate and decorate-id here. uint32_t id = ops[0]; auto decoration = static_cast(ops[1]); if (length >= 3) { ir.meta[id].decoration_word_offset[decoration] = uint32_t(&ops[2] - ir.spirv.data()); ir.set_decoration(id, decoration, ops[2]); } else ir.set_decoration(id, decoration); break; } case OpDecorateStringGOOGLE: { uint32_t id = ops[0]; auto decoration = static_cast(ops[1]); ir.set_decoration_string(id, decoration, extract_string(ir.spirv, instruction.offset + 2)); break; } case OpMemberDecorate: { uint32_t id = ops[0]; uint32_t member = ops[1]; auto decoration = static_cast(ops[2]); if (length >= 4) ir.set_member_decoration(id, member, decoration, ops[3]); else ir.set_member_decoration(id, member, decoration); break; } case OpMemberDecorateStringGOOGLE: { uint32_t id = ops[0]; uint32_t member = ops[1]; auto decoration = static_cast(ops[2]); ir.set_member_decoration_string(id, member, decoration, extract_string(ir.spirv, instruction.offset + 3)); break; } // Build up basic types. case OpTypeVoid: { uint32_t id = ops[0]; auto &type = set(id, op); type.basetype = SPIRType::Void; break; } case OpTypeBool: { uint32_t id = ops[0]; auto &type = set(id, op); type.basetype = SPIRType::Boolean; type.width = 1; break; } case OpTypeFloat: { uint32_t id = ops[0]; uint32_t width = ops[1]; auto &type = set(id, op); if (width == 64) type.basetype = SPIRType::Double; else if (width == 32) type.basetype = SPIRType::Float; else if (width == 16) type.basetype = SPIRType::Half; else SPIRV_CROSS_THROW("Unrecognized bit-width of floating point type."); type.width = width; break; } case OpTypeInt: { uint32_t id = ops[0]; uint32_t width = ops[1]; bool signedness = ops[2] != 0; auto &type = set(id, op); type.basetype = signedness ? to_signed_basetype(width) : to_unsigned_basetype(width); type.width = width; break; } // Build composite types by "inheriting". // NOTE: The self member is also copied! For pointers and array modifiers this is a good thing // since we can refer to decorations on pointee classes which is needed for UBO/SSBO, I/O blocks in geometry/tess etc. case OpTypeVector: { uint32_t id = ops[0]; uint32_t vecsize = ops[2]; auto &base = get(ops[1]); auto &vecbase = set(id, base); vecbase.op = op; vecbase.vecsize = vecsize; vecbase.self = id; vecbase.parent_type = ops[1]; break; } case OpTypeMatrix: { uint32_t id = ops[0]; uint32_t colcount = ops[2]; auto &base = get(ops[1]); auto &matrixbase = set(id, base); matrixbase.op = op; matrixbase.columns = colcount; matrixbase.self = id; matrixbase.parent_type = ops[1]; break; } case OpTypeArray: { uint32_t id = ops[0]; uint32_t tid = ops[1]; auto &base = get(tid); auto &arraybase = set(id, base); arraybase.op = op; arraybase.parent_type = tid; uint32_t cid = ops[2]; ir.mark_used_as_array_length(cid); auto *c = maybe_get(cid); bool literal = c && !c->specialization; // We're copying type information into Array types, so we'll need a fixup for any physical pointer // references. if (base.forward_pointer) forward_pointer_fixups.push_back({ id, tid }); arraybase.array_size_literal.push_back(literal); arraybase.array.push_back(literal ? c->scalar() : cid); // .self resolves down to non-array/non-pointer type. arraybase.self = base.self; break; } case OpTypeRuntimeArray: { uint32_t id = ops[0]; auto &base = get(ops[1]); auto &arraybase = set(id, base); // We're copying type information into Array types, so we'll need a fixup for any physical pointer // references. if (base.forward_pointer) forward_pointer_fixups.push_back({ id, ops[1] }); arraybase.op = op; arraybase.array.push_back(0); arraybase.array_size_literal.push_back(true); arraybase.parent_type = ops[1]; // .self resolves down to non-array/non-pointer type. arraybase.self = base.self; break; } case OpTypeImage: { uint32_t id = ops[0]; auto &type = set(id, op); type.basetype = SPIRType::Image; type.image.type = ops[1]; type.image.dim = static_cast(ops[2]); type.image.depth = ops[3] == 1; type.image.arrayed = ops[4] != 0; type.image.ms = ops[5] != 0; type.image.sampled = ops[6]; type.image.format = static_cast(ops[7]); type.image.access = (length >= 9) ? static_cast(ops[8]) : AccessQualifierMax; break; } case OpTypeSampledImage: { uint32_t id = ops[0]; uint32_t imagetype = ops[1]; auto &type = set(id, op); type = get(imagetype); type.basetype = SPIRType::SampledImage; type.self = id; break; } case OpTypeSampler: { uint32_t id = ops[0]; auto &type = set(id, op); type.basetype = SPIRType::Sampler; break; } case OpTypePointer: { uint32_t id = ops[0]; // Very rarely, we might receive a FunctionPrototype here. // We won't be able to compile it, but we shouldn't crash when parsing. // We should be able to reflect. auto *base = maybe_get(ops[2]); auto &ptrbase = set(id, op); if (base) { ptrbase = *base; ptrbase.op = op; } ptrbase.pointer = true; ptrbase.pointer_depth++; ptrbase.storage = static_cast(ops[1]); if (ptrbase.storage == StorageClassAtomicCounter) ptrbase.basetype = SPIRType::AtomicCounter; if (base && base->forward_pointer) forward_pointer_fixups.push_back({ id, ops[2] }); ptrbase.parent_type = ops[2]; // Do NOT set ptrbase.self! break; } case OpTypeForwardPointer: { uint32_t id = ops[0]; auto &ptrbase = set(id, op); ptrbase.pointer = true; ptrbase.pointer_depth++; ptrbase.storage = static_cast(ops[1]); ptrbase.forward_pointer = true; if (ptrbase.storage == StorageClassAtomicCounter) ptrbase.basetype = SPIRType::AtomicCounter; break; } case OpTypeStruct: { uint32_t id = ops[0]; auto &type = set(id, op); type.basetype = SPIRType::Struct; for (uint32_t i = 1; i < length; i++) type.member_types.push_back(ops[i]); // Check if we have seen this struct type before, with just different // decorations. // // Add workaround for issue #17 as well by looking at OpName for the struct // types, which we shouldn't normally do. // We should not normally have to consider type aliases like this to begin with // however ... glslang issues #304, #307 cover this. // For stripped names, never consider struct type aliasing. // We risk declaring the same struct multiple times, but type-punning is not allowed // so this is safe. bool consider_aliasing = !ir.get_name(type.self).empty(); if (consider_aliasing) { for (auto &other : global_struct_cache) { if (ir.get_name(type.self) == ir.get_name(other) && types_are_logically_equivalent(type, get(other))) { type.type_alias = other; break; } } if (type.type_alias == TypeID(0)) global_struct_cache.push_back(id); } break; } case OpTypeFunction: { uint32_t id = ops[0]; uint32_t ret = ops[1]; auto &func = set(id, ret); for (uint32_t i = 2; i < length; i++) func.parameter_types.push_back(ops[i]); break; } case OpTypeAccelerationStructureKHR: { uint32_t id = ops[0]; auto &type = set(id, op); type.basetype = SPIRType::AccelerationStructure; break; } case OpTypeRayQueryKHR: { uint32_t id = ops[0]; auto &type = set(id, op); type.basetype = SPIRType::RayQuery; break; } // Variable declaration // All variables are essentially pointers with a storage qualifier. case OpVariable: { uint32_t type = ops[0]; uint32_t id = ops[1]; auto storage = static_cast(ops[2]); uint32_t initializer = length == 4 ? ops[3] : 0; if (storage == StorageClassFunction) { if (!current_function) SPIRV_CROSS_THROW("No function currently in scope"); current_function->add_local_variable(id); } set(id, type, storage, initializer); break; } // OpPhi // OpPhi is a fairly magical opcode. // It selects temporary variables based on which parent block we *came from*. // In high-level languages we can "de-SSA" by creating a function local, and flush out temporaries to this function-local // variable to emulate SSA Phi. case OpPhi: { if (!current_function) SPIRV_CROSS_THROW("No function currently in scope"); if (!current_block) SPIRV_CROSS_THROW("No block currently in scope"); uint32_t result_type = ops[0]; uint32_t id = ops[1]; // Instead of a temporary, create a new function-wide temporary with this ID instead. auto &var = set(id, result_type, spv::StorageClassFunction); var.phi_variable = true; current_function->add_local_variable(id); for (uint32_t i = 2; i + 2 <= length; i += 2) current_block->phi_variables.push_back({ ops[i], ops[i + 1], id }); break; } // Constants case OpSpecConstant: case OpConstant: { uint32_t id = ops[1]; auto &type = get(ops[0]); if (type.width > 32) set(id, ops[0], ops[2] | (uint64_t(ops[3]) << 32), op == OpSpecConstant); else set(id, ops[0], ops[2], op == OpSpecConstant); break; } case OpSpecConstantFalse: case OpConstantFalse: { uint32_t id = ops[1]; set(id, ops[0], uint32_t(0), op == OpSpecConstantFalse); break; } case OpSpecConstantTrue: case OpConstantTrue: { uint32_t id = ops[1]; set(id, ops[0], uint32_t(1), op == OpSpecConstantTrue); break; } case OpConstantNull: { uint32_t id = ops[1]; uint32_t type = ops[0]; ir.make_constant_null(id, type, true); break; } case OpSpecConstantComposite: case OpConstantComposite: { uint32_t id = ops[1]; uint32_t type = ops[0]; auto &ctype = get(type); // We can have constants which are structs and arrays. // In this case, our SPIRConstant will be a list of other SPIRConstant ids which we // can refer to. if (ctype.basetype == SPIRType::Struct || !ctype.array.empty()) { set(id, type, ops + 2, length - 2, op == OpSpecConstantComposite); } else { uint32_t elements = length - 2; if (elements > 4) SPIRV_CROSS_THROW("OpConstantComposite only supports 1, 2, 3 and 4 elements."); SPIRConstant remapped_constant_ops[4]; const SPIRConstant *c[4]; for (uint32_t i = 0; i < elements; i++) { // Specialization constants operations can also be part of this. // We do not know their value, so any attempt to query SPIRConstant later // will fail. We can only propagate the ID of the expression and use to_expression on it. auto *constant_op = maybe_get(ops[2 + i]); auto *undef_op = maybe_get(ops[2 + i]); if (constant_op) { if (op == OpConstantComposite) SPIRV_CROSS_THROW("Specialization constant operation used in OpConstantComposite."); remapped_constant_ops[i].make_null(get(constant_op->basetype)); remapped_constant_ops[i].self = constant_op->self; remapped_constant_ops[i].constant_type = constant_op->basetype; remapped_constant_ops[i].specialization = true; c[i] = &remapped_constant_ops[i]; } else if (undef_op) { // Undefined, just pick 0. remapped_constant_ops[i].make_null(get(undef_op->basetype)); remapped_constant_ops[i].constant_type = undef_op->basetype; c[i] = &remapped_constant_ops[i]; } else c[i] = &get(ops[2 + i]); } set(id, type, c, elements, op == OpSpecConstantComposite); } break; } // Functions case OpFunction: { uint32_t res = ops[0]; uint32_t id = ops[1]; // Control uint32_t type = ops[3]; if (current_function) SPIRV_CROSS_THROW("Must end a function before starting a new one!"); current_function = &set(id, res, type); break; } case OpFunctionParameter: { uint32_t type = ops[0]; uint32_t id = ops[1]; if (!current_function) SPIRV_CROSS_THROW("Must be in a function!"); current_function->add_parameter(type, id); set(id, type, StorageClassFunction); break; } case OpFunctionEnd: { if (current_block) { // Very specific error message, but seems to come up quite often. SPIRV_CROSS_THROW( "Cannot end a function before ending the current block.\n" "Likely cause: If this SPIR-V was created from glslang HLSL, make sure the entry point is valid."); } current_function = nullptr; break; } // Blocks case OpLabel: { // OpLabel always starts a block. if (!current_function) SPIRV_CROSS_THROW("Blocks cannot exist outside functions!"); uint32_t id = ops[0]; current_function->blocks.push_back(id); if (!current_function->entry_block) current_function->entry_block = id; if (current_block) SPIRV_CROSS_THROW("Cannot start a block before ending the current block."); current_block = &set(id); break; } // Branch instructions end blocks. case OpBranch: { if (!current_block) SPIRV_CROSS_THROW("Trying to end a non-existing block."); uint32_t target = ops[0]; current_block->terminator = SPIRBlock::Direct; current_block->next_block = target; current_block = nullptr; break; } case OpBranchConditional: { if (!current_block) SPIRV_CROSS_THROW("Trying to end a non-existing block."); current_block->condition = ops[0]; current_block->true_block = ops[1]; current_block->false_block = ops[2]; current_block->terminator = SPIRBlock::Select; if (current_block->true_block == current_block->false_block) { // Bogus conditional, translate to a direct branch. // Avoids some ugly edge cases later when analyzing CFGs. // There are some super jank cases where the merge block is different from the true/false, // and later branches can "break" out of the selection construct this way. // This is complete nonsense, but CTS hits this case. // In this scenario, we should see the selection construct as more of a Switch with one default case. // The problem here is that this breaks any attempt to break out of outer switch statements, // but it's theoretically solvable if this ever comes up using the ladder breaking system ... if (current_block->true_block != current_block->next_block && current_block->merge == SPIRBlock::MergeSelection) { uint32_t ids = ir.increase_bound_by(2); auto &type = set(ids, OpTypeInt); type.basetype = SPIRType::Int; type.width = 32; auto &c = set(ids + 1, ids); current_block->condition = c.self; current_block->default_block = current_block->true_block; current_block->terminator = SPIRBlock::MultiSelect; ir.block_meta[current_block->next_block] &= ~ParsedIR::BLOCK_META_SELECTION_MERGE_BIT; ir.block_meta[current_block->next_block] |= ParsedIR::BLOCK_META_MULTISELECT_MERGE_BIT; } else { // Collapse loops if we have to. bool collapsed_loop = current_block->true_block == current_block->merge_block && current_block->merge == SPIRBlock::MergeLoop; if (collapsed_loop) { ir.block_meta[current_block->merge_block] &= ~ParsedIR::BLOCK_META_LOOP_MERGE_BIT; ir.block_meta[current_block->continue_block] &= ~ParsedIR::BLOCK_META_CONTINUE_BIT; } current_block->next_block = current_block->true_block; current_block->condition = 0; current_block->true_block = 0; current_block->false_block = 0; current_block->merge_block = 0; current_block->merge = SPIRBlock::MergeNone; current_block->terminator = SPIRBlock::Direct; } } current_block = nullptr; break; } case OpSwitch: { if (!current_block) SPIRV_CROSS_THROW("Trying to end a non-existing block."); current_block->terminator = SPIRBlock::MultiSelect; current_block->condition = ops[0]; current_block->default_block = ops[1]; uint32_t remaining_ops = length - 2; if ((remaining_ops % 2) == 0) { for (uint32_t i = 2; i + 2 <= length; i += 2) current_block->cases_32bit.push_back({ ops[i], ops[i + 1] }); } if ((remaining_ops % 3) == 0) { for (uint32_t i = 2; i + 3 <= length; i += 3) { uint64_t value = (static_cast(ops[i + 1]) << 32) | ops[i]; current_block->cases_64bit.push_back({ value, ops[i + 2] }); } } // If we jump to next block, make it break instead since we're inside a switch case block at that point. ir.block_meta[current_block->next_block] |= ParsedIR::BLOCK_META_MULTISELECT_MERGE_BIT; current_block = nullptr; break; } case OpKill: case OpTerminateInvocation: { if (!current_block) SPIRV_CROSS_THROW("Trying to end a non-existing block."); current_block->terminator = SPIRBlock::Kill; current_block = nullptr; break; } case OpTerminateRayKHR: // NV variant is not a terminator. if (!current_block) SPIRV_CROSS_THROW("Trying to end a non-existing block."); current_block->terminator = SPIRBlock::TerminateRay; current_block = nullptr; break; case OpIgnoreIntersectionKHR: // NV variant is not a terminator. if (!current_block) SPIRV_CROSS_THROW("Trying to end a non-existing block."); current_block->terminator = SPIRBlock::IgnoreIntersection; current_block = nullptr; break; case OpEmitMeshTasksEXT: if (!current_block) SPIRV_CROSS_THROW("Trying to end a non-existing block."); current_block->terminator = SPIRBlock::EmitMeshTasks; for (uint32_t i = 0; i < 3; i++) current_block->mesh.groups[i] = ops[i]; current_block->mesh.payload = length >= 4 ? ops[3] : 0; current_block = nullptr; // Currently glslang is bugged and does not treat EmitMeshTasksEXT as a terminator. ignore_trailing_block_opcodes = true; break; case OpReturn: { if (!current_block) SPIRV_CROSS_THROW("Trying to end a non-existing block."); current_block->terminator = SPIRBlock::Return; current_block = nullptr; break; } case OpReturnValue: { if (!current_block) SPIRV_CROSS_THROW("Trying to end a non-existing block."); current_block->terminator = SPIRBlock::Return; current_block->return_value = ops[0]; current_block = nullptr; break; } case OpUnreachable: { if (!current_block) SPIRV_CROSS_THROW("Trying to end a non-existing block."); current_block->terminator = SPIRBlock::Unreachable; current_block = nullptr; break; } case OpSelectionMerge: { if (!current_block) SPIRV_CROSS_THROW("Trying to modify a non-existing block."); current_block->next_block = ops[0]; current_block->merge = SPIRBlock::MergeSelection; ir.block_meta[current_block->next_block] |= ParsedIR::BLOCK_META_SELECTION_MERGE_BIT; if (length >= 2) { if (ops[1] & SelectionControlFlattenMask) current_block->hint = SPIRBlock::HintFlatten; else if (ops[1] & SelectionControlDontFlattenMask) current_block->hint = SPIRBlock::HintDontFlatten; } break; } case OpLoopMerge: { if (!current_block) SPIRV_CROSS_THROW("Trying to modify a non-existing block."); current_block->merge_block = ops[0]; current_block->continue_block = ops[1]; current_block->merge = SPIRBlock::MergeLoop; ir.block_meta[current_block->self] |= ParsedIR::BLOCK_META_LOOP_HEADER_BIT; ir.block_meta[current_block->merge_block] |= ParsedIR::BLOCK_META_LOOP_MERGE_BIT; ir.continue_block_to_loop_header[current_block->continue_block] = BlockID(current_block->self); // Don't add loop headers to continue blocks, // which would make it impossible branch into the loop header since // they are treated as continues. if (current_block->continue_block != BlockID(current_block->self)) ir.block_meta[current_block->continue_block] |= ParsedIR::BLOCK_META_CONTINUE_BIT; if (length >= 3) { if (ops[2] & LoopControlUnrollMask) current_block->hint = SPIRBlock::HintUnroll; else if (ops[2] & LoopControlDontUnrollMask) current_block->hint = SPIRBlock::HintDontUnroll; } break; } case OpSpecConstantOp: { if (length < 3) SPIRV_CROSS_THROW("OpSpecConstantOp not enough arguments."); uint32_t result_type = ops[0]; uint32_t id = ops[1]; auto spec_op = static_cast(ops[2]); set(id, result_type, spec_op, ops + 3, length - 3); break; } case OpLine: { // OpLine might come at global scope, but we don't care about those since they will not be declared in any // meaningful correct order. // Ignore all OpLine directives which live outside a function. if (current_block) current_block->ops.push_back(instruction); // Line directives may arrive before first OpLabel. // Treat this as the line of the function declaration, // so warnings for arguments can propagate properly. if (current_function) { // Store the first one we find and emit it before creating the function prototype. if (current_function->entry_line.file_id == 0) { current_function->entry_line.file_id = ops[0]; current_function->entry_line.line_literal = ops[1]; } } break; } case OpNoLine: { // OpNoLine might come at global scope. if (current_block) current_block->ops.push_back(instruction); break; } // Actual opcodes. default: { if (length >= 2) { const auto *type = maybe_get(ops[0]); if (type) ir.load_type_width.insert({ ops[1], type->width }); } if (!current_block) SPIRV_CROSS_THROW("Currently no block to insert opcode."); current_block->ops.push_back(instruction); break; } } } bool Parser::types_are_logically_equivalent(const SPIRType &a, const SPIRType &b) const { if (a.basetype != b.basetype) return false; if (a.width != b.width) return false; if (a.vecsize != b.vecsize) return false; if (a.columns != b.columns) return false; if (a.array.size() != b.array.size()) return false; size_t array_count = a.array.size(); if (array_count && memcmp(a.array.data(), b.array.data(), array_count * sizeof(uint32_t)) != 0) return false; if (a.basetype == SPIRType::Image || a.basetype == SPIRType::SampledImage) { if (memcmp(&a.image, &b.image, sizeof(SPIRType::Image)) != 0) return false; } if (a.member_types.size() != b.member_types.size()) return false; size_t member_types = a.member_types.size(); for (size_t i = 0; i < member_types; i++) { if (!types_are_logically_equivalent(get(a.member_types[i]), get(b.member_types[i]))) return false; } return true; } bool Parser::variable_storage_is_aliased(const SPIRVariable &v) const { auto &type = get(v.basetype); auto *type_meta = ir.find_meta(type.self); bool ssbo = v.storage == StorageClassStorageBuffer || (type_meta && type_meta->decoration.decoration_flags.get(DecorationBufferBlock)); bool image = type.basetype == SPIRType::Image; bool counter = type.basetype == SPIRType::AtomicCounter; bool is_restrict; if (ssbo) is_restrict = ir.get_buffer_block_flags(v).get(DecorationRestrict); else is_restrict = ir.has_decoration(v.self, DecorationRestrict); return !is_restrict && (ssbo || image || counter); } } // namespace SPIRV_CROSS_NAMESPACE ================================================ FILE: src/libraries/spirv_cross/spirv_parser.hpp ================================================ /* * Copyright 2018-2021 Arm Limited * SPDX-License-Identifier: Apache-2.0 OR MIT * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* * At your option, you may choose to accept this material under either: * 1. The Apache License, Version 2.0, found at , or * 2. The MIT License, found at . */ #ifndef SPIRV_CROSS_PARSER_HPP #define SPIRV_CROSS_PARSER_HPP #include "spirv_cross_parsed_ir.hpp" #include namespace SPIRV_CROSS_NAMESPACE { class Parser { public: Parser(const uint32_t *spirv_data, size_t word_count); Parser(std::vector spirv); void parse(); ParsedIR &get_parsed_ir() { return ir; } private: ParsedIR ir; SPIRFunction *current_function = nullptr; SPIRBlock *current_block = nullptr; // For workarounds. bool ignore_trailing_block_opcodes = false; void parse(const Instruction &instr); const uint32_t *stream(const Instruction &instr) const; template T &set(uint32_t id, P &&... args) { ir.add_typed_id(static_cast(T::type), id); auto &var = variant_set(ir.ids[id], std::forward

(args)...); var.self = id; return var; } template T &get(uint32_t id) { return variant_get(ir.ids[id]); } template T *maybe_get(uint32_t id) { if (ir.ids[id].get_type() == static_cast(T::type)) return &get(id); else return nullptr; } template const T &get(uint32_t id) const { return variant_get(ir.ids[id]); } template const T *maybe_get(uint32_t id) const { if (ir.ids[id].get_type() == T::type) return &get(id); else return nullptr; } // This must be an ordered data structure so we always pick the same type aliases. SmallVector global_struct_cache; SmallVector> forward_pointer_fixups; bool types_are_logically_equivalent(const SPIRType &a, const SPIRType &b) const; bool variable_storage_is_aliased(const SPIRVariable &v) const; }; } // namespace SPIRV_CROSS_NAMESPACE #endif ================================================ FILE: src/libraries/spirv_cross/spirv_reflect.cpp ================================================ /* * Copyright 2018-2021 Bradley Austin Davis * SPDX-License-Identifier: Apache-2.0 OR MIT * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* * At your option, you may choose to accept this material under either: * 1. The Apache License, Version 2.0, found at , or * 2. The MIT License, found at . */ #include "spirv_reflect.hpp" #include "spirv_glsl.hpp" #include using namespace spv; using namespace SPIRV_CROSS_NAMESPACE; using namespace std; namespace simple_json { enum class Type { Object, Array, }; using State = std::pair; using Stack = std::stack; class Stream { Stack stack; StringStream<> buffer; uint32_t indent{ 0 }; char current_locale_radix_character = '.'; public: void set_current_locale_radix_character(char c) { current_locale_radix_character = c; } void begin_json_object(); void end_json_object(); void emit_json_key(const std::string &key); void emit_json_key_value(const std::string &key, const std::string &value); void emit_json_key_value(const std::string &key, bool value); void emit_json_key_value(const std::string &key, uint32_t value); void emit_json_key_value(const std::string &key, int32_t value); void emit_json_key_value(const std::string &key, float value); void emit_json_key_object(const std::string &key); void emit_json_key_array(const std::string &key); void begin_json_array(); void end_json_array(); void emit_json_array_value(const std::string &value); void emit_json_array_value(uint32_t value); void emit_json_array_value(bool value); std::string str() const { return buffer.str(); } private: inline void statement_indent() { for (uint32_t i = 0; i < indent; i++) buffer << " "; } template inline void statement_inner(T &&t) { buffer << std::forward(t); } template inline void statement_inner(T &&t, Ts &&... ts) { buffer << std::forward(t); statement_inner(std::forward(ts)...); } template inline void statement(Ts &&... ts) { statement_indent(); statement_inner(std::forward(ts)...); buffer << '\n'; } template void statement_no_return(Ts &&... ts) { statement_indent(); statement_inner(std::forward(ts)...); } }; } // namespace simple_json using namespace simple_json; // Hackery to emit JSON without using nlohmann/json C++ library (which requires a // higher level of compiler compliance than is required by SPIRV-Cross void Stream::begin_json_array() { if (!stack.empty() && stack.top().second) { statement_inner(",\n"); } statement("["); ++indent; stack.emplace(Type::Array, false); } void Stream::end_json_array() { if (stack.empty() || stack.top().first != Type::Array) SPIRV_CROSS_THROW("Invalid JSON state"); if (stack.top().second) { statement_inner("\n"); } --indent; statement_no_return("]"); stack.pop(); if (!stack.empty()) { stack.top().second = true; } } void Stream::emit_json_array_value(const std::string &value) { if (stack.empty() || stack.top().first != Type::Array) SPIRV_CROSS_THROW("Invalid JSON state"); if (stack.top().second) statement_inner(",\n"); statement_no_return("\"", value, "\""); stack.top().second = true; } void Stream::emit_json_array_value(uint32_t value) { if (stack.empty() || stack.top().first != Type::Array) SPIRV_CROSS_THROW("Invalid JSON state"); if (stack.top().second) statement_inner(",\n"); statement_no_return(std::to_string(value)); stack.top().second = true; } void Stream::emit_json_array_value(bool value) { if (stack.empty() || stack.top().first != Type::Array) SPIRV_CROSS_THROW("Invalid JSON state"); if (stack.top().second) statement_inner(",\n"); statement_no_return(value ? "true" : "false"); stack.top().second = true; } void Stream::begin_json_object() { if (!stack.empty() && stack.top().second) { statement_inner(",\n"); } statement("{"); ++indent; stack.emplace(Type::Object, false); } void Stream::end_json_object() { if (stack.empty() || stack.top().first != Type::Object) SPIRV_CROSS_THROW("Invalid JSON state"); if (stack.top().second) { statement_inner("\n"); } --indent; statement_no_return("}"); stack.pop(); if (!stack.empty()) { stack.top().second = true; } } void Stream::emit_json_key(const std::string &key) { if (stack.empty() || stack.top().first != Type::Object) SPIRV_CROSS_THROW("Invalid JSON state"); if (stack.top().second) statement_inner(",\n"); statement_no_return("\"", key, "\" : "); stack.top().second = true; } void Stream::emit_json_key_value(const std::string &key, const std::string &value) { emit_json_key(key); statement_inner("\"", value, "\""); } void Stream::emit_json_key_value(const std::string &key, uint32_t value) { emit_json_key(key); statement_inner(value); } void Stream::emit_json_key_value(const std::string &key, int32_t value) { emit_json_key(key); statement_inner(value); } void Stream::emit_json_key_value(const std::string &key, float value) { emit_json_key(key); statement_inner(convert_to_string(value, current_locale_radix_character)); } void Stream::emit_json_key_value(const std::string &key, bool value) { emit_json_key(key); statement_inner(value ? "true" : "false"); } void Stream::emit_json_key_object(const std::string &key) { emit_json_key(key); statement_inner("{\n"); ++indent; stack.emplace(Type::Object, false); } void Stream::emit_json_key_array(const std::string &key) { emit_json_key(key); statement_inner("[\n"); ++indent; stack.emplace(Type::Array, false); } void CompilerReflection::set_format(const std::string &format) { if (format != "json") { SPIRV_CROSS_THROW("Unsupported format"); } } string CompilerReflection::compile() { json_stream = std::make_shared(); json_stream->set_current_locale_radix_character(current_locale_radix_character); json_stream->begin_json_object(); reorder_type_alias(); emit_entry_points(); emit_types(); emit_resources(); emit_specialization_constants(); json_stream->end_json_object(); return json_stream->str(); } static bool naturally_emit_type(const SPIRType &type) { return type.basetype == SPIRType::Struct && !type.pointer && type.array.empty(); } bool CompilerReflection::type_is_reference(const SPIRType &type) const { // Physical pointers and arrays of physical pointers need to refer to the pointee's type. return is_physical_pointer(type) || (type_is_array_of_pointers(type) && type.storage == StorageClassPhysicalStorageBuffer); } void CompilerReflection::emit_types() { bool emitted_open_tag = false; SmallVector physical_pointee_types; // If we have physical pointers or arrays of physical pointers, it's also helpful to emit the pointee type // and chain the type hierarchy. For POD, arrays can emit the entire type in-place. ir.for_each_typed_id([&](uint32_t self, SPIRType &type) { if (naturally_emit_type(type)) { emit_type(self, emitted_open_tag); } else if (type_is_reference(type)) { if (!naturally_emit_type(this->get(type.parent_type)) && find(physical_pointee_types.begin(), physical_pointee_types.end(), type.parent_type) == physical_pointee_types.end()) { physical_pointee_types.push_back(type.parent_type); } } }); for (uint32_t pointee_type : physical_pointee_types) emit_type(pointee_type, emitted_open_tag); if (emitted_open_tag) { json_stream->end_json_object(); } } void CompilerReflection::emit_type(uint32_t type_id, bool &emitted_open_tag) { auto &type = get(type_id); auto name = type_to_glsl(type); if (!emitted_open_tag) { json_stream->emit_json_key_object("types"); emitted_open_tag = true; } json_stream->emit_json_key_object("_" + std::to_string(type_id)); json_stream->emit_json_key_value("name", name); if (is_physical_pointer(type)) { json_stream->emit_json_key_value("type", "_" + std::to_string(type.parent_type)); json_stream->emit_json_key_value("physical_pointer", true); } else if (!type.array.empty()) { emit_type_array(type); json_stream->emit_json_key_value("type", "_" + std::to_string(type.parent_type)); json_stream->emit_json_key_value("array_stride", get_decoration(type_id, DecorationArrayStride)); } else { json_stream->emit_json_key_array("members"); // FIXME ideally we'd like to emit the size of a structure as a // convenience to people parsing the reflected JSON. The problem // is that there's no implicit size for a type. It's final size // will be determined by the top level declaration in which it's // included. So there might be one size for the struct if it's // included in a std140 uniform block and another if it's included // in a std430 uniform block. // The solution is to include *all* potential sizes as a map of // layout type name to integer, but that will probably require // some additional logic being written in this class, or in the // parent CompilerGLSL class. auto size = type.member_types.size(); for (uint32_t i = 0; i < size; ++i) { emit_type_member(type, i); } json_stream->end_json_array(); } json_stream->end_json_object(); } void CompilerReflection::emit_type_member(const SPIRType &type, uint32_t index) { auto &membertype = get(type.member_types[index]); json_stream->begin_json_object(); auto name = to_member_name(type, index); // FIXME we'd like to emit the offset of each member, but such offsets are // context dependent. See the comment above regarding structure sizes json_stream->emit_json_key_value("name", name); if (type_is_reference(membertype)) { json_stream->emit_json_key_value("type", "_" + std::to_string(membertype.parent_type)); } else if (membertype.basetype == SPIRType::Struct) { json_stream->emit_json_key_value("type", "_" + std::to_string(membertype.self)); } else { json_stream->emit_json_key_value("type", type_to_glsl(membertype)); } emit_type_member_qualifiers(type, index); json_stream->end_json_object(); } void CompilerReflection::emit_type_array(const SPIRType &type) { if (!is_physical_pointer(type) && !type.array.empty()) { json_stream->emit_json_key_array("array"); // Note that we emit the zeros here as a means of identifying // unbounded arrays. This is necessary as otherwise there would // be no way of differentiating between float[4] and float[4][] for (const auto &value : type.array) json_stream->emit_json_array_value(value); json_stream->end_json_array(); json_stream->emit_json_key_array("array_size_is_literal"); for (const auto &value : type.array_size_literal) json_stream->emit_json_array_value(value); json_stream->end_json_array(); } } void CompilerReflection::emit_type_member_qualifiers(const SPIRType &type, uint32_t index) { auto &membertype = get(type.member_types[index]); emit_type_array(membertype); auto &memb = ir.meta[type.self].members; if (index < memb.size()) { auto &dec = memb[index]; if (dec.decoration_flags.get(DecorationLocation)) json_stream->emit_json_key_value("location", dec.location); if (dec.decoration_flags.get(DecorationOffset)) json_stream->emit_json_key_value("offset", dec.offset); // Array stride is a property of the array type, not the struct. if (has_decoration(type.member_types[index], DecorationArrayStride)) json_stream->emit_json_key_value("array_stride", get_decoration(type.member_types[index], DecorationArrayStride)); if (dec.decoration_flags.get(DecorationMatrixStride)) json_stream->emit_json_key_value("matrix_stride", dec.matrix_stride); if (dec.decoration_flags.get(DecorationRowMajor)) json_stream->emit_json_key_value("row_major", true); if (is_physical_pointer(membertype)) json_stream->emit_json_key_value("physical_pointer", true); } } string CompilerReflection::execution_model_to_str(spv::ExecutionModel model) { switch (model) { case ExecutionModelVertex: return "vert"; case ExecutionModelTessellationControl: return "tesc"; case ExecutionModelTessellationEvaluation: return "tese"; case ExecutionModelGeometry: return "geom"; case ExecutionModelFragment: return "frag"; case ExecutionModelGLCompute: return "comp"; case ExecutionModelRayGenerationNV: return "rgen"; case ExecutionModelIntersectionNV: return "rint"; case ExecutionModelAnyHitNV: return "rahit"; case ExecutionModelClosestHitNV: return "rchit"; case ExecutionModelMissNV: return "rmiss"; case ExecutionModelCallableNV: return "rcall"; default: return "???"; } } // FIXME include things like the local_size dimensions, geometry output vertex count, etc void CompilerReflection::emit_entry_points() { auto entries = get_entry_points_and_stages(); if (!entries.empty()) { // Needed to make output deterministic. sort(begin(entries), end(entries), [](const EntryPoint &a, const EntryPoint &b) -> bool { if (a.execution_model < b.execution_model) return true; else if (a.execution_model > b.execution_model) return false; else return a.name < b.name; }); json_stream->emit_json_key_array("entryPoints"); for (auto &e : entries) { json_stream->begin_json_object(); json_stream->emit_json_key_value("name", e.name); json_stream->emit_json_key_value("mode", execution_model_to_str(e.execution_model)); if (e.execution_model == ExecutionModelGLCompute) { const auto &spv_entry = get_entry_point(e.name, e.execution_model); SpecializationConstant spec_x, spec_y, spec_z; get_work_group_size_specialization_constants(spec_x, spec_y, spec_z); json_stream->emit_json_key_array("workgroup_size"); json_stream->emit_json_array_value(spec_x.id != ID(0) ? spec_x.constant_id : spv_entry.workgroup_size.x); json_stream->emit_json_array_value(spec_y.id != ID(0) ? spec_y.constant_id : spv_entry.workgroup_size.y); json_stream->emit_json_array_value(spec_z.id != ID(0) ? spec_z.constant_id : spv_entry.workgroup_size.z); json_stream->end_json_array(); json_stream->emit_json_key_array("workgroup_size_is_spec_constant_id"); json_stream->emit_json_array_value(spec_x.id != ID(0)); json_stream->emit_json_array_value(spec_y.id != ID(0)); json_stream->emit_json_array_value(spec_z.id != ID(0)); json_stream->end_json_array(); } json_stream->end_json_object(); } json_stream->end_json_array(); } } void CompilerReflection::emit_resources() { auto res = get_shader_resources(); emit_resources("subpass_inputs", res.subpass_inputs); emit_resources("inputs", res.stage_inputs); emit_resources("outputs", res.stage_outputs); emit_resources("textures", res.sampled_images); emit_resources("separate_images", res.separate_images); emit_resources("separate_samplers", res.separate_samplers); emit_resources("images", res.storage_images); emit_resources("ssbos", res.storage_buffers); emit_resources("ubos", res.uniform_buffers); emit_resources("push_constants", res.push_constant_buffers); emit_resources("counters", res.atomic_counters); emit_resources("acceleration_structures", res.acceleration_structures); } void CompilerReflection::emit_resources(const char *tag, const SmallVector &resources) { if (resources.empty()) { return; } json_stream->emit_json_key_array(tag); for (auto &res : resources) { auto &type = get_type(res.type_id); auto typeflags = ir.meta[type.self].decoration.decoration_flags; auto &mask = get_decoration_bitset(res.id); // If we don't have a name, use the fallback for the type instead of the variable // for SSBOs and UBOs since those are the only meaningful names to use externally. // Push constant blocks are still accessed by name and not block name, even though they are technically Blocks. bool is_push_constant = get_storage_class(res.id) == StorageClassPushConstant; bool is_block = get_decoration_bitset(type.self).get(DecorationBlock) || get_decoration_bitset(type.self).get(DecorationBufferBlock); ID fallback_id = !is_push_constant && is_block ? ID(res.base_type_id) : ID(res.id); json_stream->begin_json_object(); if (type.basetype == SPIRType::Struct) { json_stream->emit_json_key_value("type", "_" + std::to_string(res.base_type_id)); } else { json_stream->emit_json_key_value("type", type_to_glsl(type)); } json_stream->emit_json_key_value("name", !res.name.empty() ? res.name : get_fallback_name(fallback_id)); { bool ssbo_block = type.storage == StorageClassStorageBuffer || (type.storage == StorageClassUniform && typeflags.get(DecorationBufferBlock)); Bitset qualifier_mask = ssbo_block ? get_buffer_block_flags(res.id) : mask; if (qualifier_mask.get(DecorationNonReadable)) json_stream->emit_json_key_value("writeonly", true); if (qualifier_mask.get(DecorationNonWritable)) json_stream->emit_json_key_value("readonly", true); if (qualifier_mask.get(DecorationRestrict)) json_stream->emit_json_key_value("restrict", true); if (qualifier_mask.get(DecorationCoherent)) json_stream->emit_json_key_value("coherent", true); if (qualifier_mask.get(DecorationVolatile)) json_stream->emit_json_key_value("volatile", true); } emit_type_array(type); { bool is_sized_block = is_block && (get_storage_class(res.id) == StorageClassUniform || get_storage_class(res.id) == StorageClassUniformConstant || get_storage_class(res.id) == StorageClassStorageBuffer); if (is_sized_block) { uint32_t block_size = uint32_t(get_declared_struct_size(get_type(res.base_type_id))); json_stream->emit_json_key_value("block_size", block_size); } } if (type.storage == StorageClassPushConstant) json_stream->emit_json_key_value("push_constant", true); if (mask.get(DecorationLocation)) json_stream->emit_json_key_value("location", get_decoration(res.id, DecorationLocation)); if (mask.get(DecorationRowMajor)) json_stream->emit_json_key_value("row_major", true); if (mask.get(DecorationColMajor)) json_stream->emit_json_key_value("column_major", true); if (mask.get(DecorationIndex)) json_stream->emit_json_key_value("index", get_decoration(res.id, DecorationIndex)); if (type.storage != StorageClassPushConstant && mask.get(DecorationDescriptorSet)) json_stream->emit_json_key_value("set", get_decoration(res.id, DecorationDescriptorSet)); if (mask.get(DecorationBinding)) json_stream->emit_json_key_value("binding", get_decoration(res.id, DecorationBinding)); if (mask.get(DecorationInputAttachmentIndex)) json_stream->emit_json_key_value("input_attachment_index", get_decoration(res.id, DecorationInputAttachmentIndex)); if (mask.get(DecorationOffset)) json_stream->emit_json_key_value("offset", get_decoration(res.id, DecorationOffset)); // For images, the type itself adds a layout qualifer. // Only emit the format for storage images. if (type.basetype == SPIRType::Image && type.image.sampled == 2) { const char *fmt = format_to_glsl(type.image.format); if (fmt != nullptr) json_stream->emit_json_key_value("format", std::string(fmt)); } json_stream->end_json_object(); } json_stream->end_json_array(); } void CompilerReflection::emit_specialization_constants() { auto specialization_constants = get_specialization_constants(); if (specialization_constants.empty()) return; json_stream->emit_json_key_array("specialization_constants"); for (const auto &spec_const : specialization_constants) { auto &c = get(spec_const.id); auto type = get(c.constant_type); json_stream->begin_json_object(); json_stream->emit_json_key_value("name", get_name(spec_const.id)); json_stream->emit_json_key_value("id", spec_const.constant_id); json_stream->emit_json_key_value("type", type_to_glsl(type)); json_stream->emit_json_key_value("variable_id", spec_const.id); switch (type.basetype) { case SPIRType::UInt: json_stream->emit_json_key_value("default_value", c.scalar()); break; case SPIRType::Int: json_stream->emit_json_key_value("default_value", c.scalar_i32()); break; case SPIRType::Float: json_stream->emit_json_key_value("default_value", c.scalar_f32()); break; case SPIRType::Boolean: json_stream->emit_json_key_value("default_value", c.scalar() != 0); break; default: break; } json_stream->end_json_object(); } json_stream->end_json_array(); } string CompilerReflection::to_member_name(const SPIRType &type, uint32_t index) const { auto *type_meta = ir.find_meta(type.self); if (type_meta) { auto &memb = type_meta->members; if (index < memb.size() && !memb[index].alias.empty()) return memb[index].alias; else return join("_m", index); } else return join("_m", index); } ================================================ FILE: src/libraries/spirv_cross/spirv_reflect.hpp ================================================ /* * Copyright 2018-2021 Bradley Austin Davis * SPDX-License-Identifier: Apache-2.0 OR MIT * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* * At your option, you may choose to accept this material under either: * 1. The Apache License, Version 2.0, found at , or * 2. The MIT License, found at . */ #ifndef SPIRV_CROSS_REFLECT_HPP #define SPIRV_CROSS_REFLECT_HPP #include "spirv_glsl.hpp" #include namespace simple_json { class Stream; } namespace SPIRV_CROSS_NAMESPACE { class CompilerReflection : public CompilerGLSL { using Parent = CompilerGLSL; public: explicit CompilerReflection(std::vector spirv_) : Parent(std::move(spirv_)) { options.vulkan_semantics = true; } CompilerReflection(const uint32_t *ir_, size_t word_count) : Parent(ir_, word_count) { options.vulkan_semantics = true; } explicit CompilerReflection(const ParsedIR &ir_) : CompilerGLSL(ir_) { options.vulkan_semantics = true; } explicit CompilerReflection(ParsedIR &&ir_) : CompilerGLSL(std::move(ir_)) { options.vulkan_semantics = true; } void set_format(const std::string &format); std::string compile() override; private: static std::string execution_model_to_str(spv::ExecutionModel model); void emit_entry_points(); void emit_types(); void emit_resources(); void emit_specialization_constants(); void emit_type(uint32_t type_id, bool &emitted_open_tag); void emit_type_member(const SPIRType &type, uint32_t index); void emit_type_member_qualifiers(const SPIRType &type, uint32_t index); void emit_type_array(const SPIRType &type); void emit_resources(const char *tag, const SmallVector &resources); bool type_is_reference(const SPIRType &type) const; std::string to_member_name(const SPIRType &type, uint32_t index) const; std::shared_ptr json_stream; }; } // namespace SPIRV_CROSS_NAMESPACE #endif ================================================ FILE: src/libraries/stb/stb_image.h ================================================ /* stb_image - v2.30 - public domain image loader - http://nothings.org/stb no warranty implied; use at your own risk Do this: #define STB_IMAGE_IMPLEMENTATION before you include this file in *one* C or C++ file to create the implementation. // i.e. it should look like this: #include ... #include ... #include ... #define STB_IMAGE_IMPLEMENTATION #include "stb_image.h" You can #define STBI_ASSERT(x) before the #include to avoid using assert.h. And #define STBI_MALLOC, STBI_REALLOC, and STBI_FREE to avoid using malloc,realloc,free QUICK NOTES: Primarily of interest to game developers and other people who can avoid problematic images and only need the trivial interface JPEG baseline & progressive (12 bpc/arithmetic not supported, same as stock IJG lib) PNG 1/2/4/8/16-bit-per-channel TGA (not sure what subset, if a subset) BMP non-1bpp, non-RLE PSD (composited view only, no extra channels, 8/16 bit-per-channel) GIF (*comp always reports as 4-channel) HDR (radiance rgbE format) PIC (Softimage PIC) PNM (PPM and PGM binary only) Animated GIF still needs a proper API, but here's one way to do it: http://gist.github.com/urraka/685d9a6340b26b830d49 - decode from memory or through FILE (define STBI_NO_STDIO to remove code) - decode from arbitrary I/O callbacks - SIMD acceleration on x86/x64 (SSE2) and ARM (NEON) Full documentation under "DOCUMENTATION" below. LICENSE See end of file for license information. RECENT REVISION HISTORY: 2.30 (2024-05-31) avoid erroneous gcc warning 2.29 (2023-05-xx) optimizations 2.28 (2023-01-29) many error fixes, security errors, just tons of stuff 2.27 (2021-07-11) document stbi_info better, 16-bit PNM support, bug fixes 2.26 (2020-07-13) many minor fixes 2.25 (2020-02-02) fix warnings 2.24 (2020-02-02) fix warnings; thread-local failure_reason and flip_vertically 2.23 (2019-08-11) fix clang static analysis warning 2.22 (2019-03-04) gif fixes, fix warnings 2.21 (2019-02-25) fix typo in comment 2.20 (2019-02-07) support utf8 filenames in Windows; fix warnings and platform ifdefs 2.19 (2018-02-11) fix warning 2.18 (2018-01-30) fix warnings 2.17 (2018-01-29) bugfix, 1-bit BMP, 16-bitness query, fix warnings 2.16 (2017-07-23) all functions have 16-bit variants; optimizations; bugfixes 2.15 (2017-03-18) fix png-1,2,4; all Imagenet JPGs; no runtime SSE detection on GCC 2.14 (2017-03-03) remove deprecated STBI_JPEG_OLD; fixes for Imagenet JPGs 2.13 (2016-12-04) experimental 16-bit API, only for PNG so far; fixes 2.12 (2016-04-02) fix typo in 2.11 PSD fix that caused crashes 2.11 (2016-04-02) 16-bit PNGS; enable SSE2 in non-gcc x64 RGB-format JPEG; remove white matting in PSD; allocate large structures on the stack; correct channel count for PNG & BMP 2.10 (2016-01-22) avoid warning introduced in 2.09 2.09 (2016-01-16) 16-bit TGA; comments in PNM files; STBI_REALLOC_SIZED See end of file for full revision history. ============================ Contributors ========================= Image formats Extensions, features Sean Barrett (jpeg, png, bmp) Jetro Lauha (stbi_info) Nicolas Schulz (hdr, psd) Martin "SpartanJ" Golini (stbi_info) Jonathan Dummer (tga) James "moose2000" Brown (iPhone PNG) Jean-Marc Lienher (gif) Ben "Disch" Wenger (io callbacks) Tom Seddon (pic) Omar Cornut (1/2/4-bit PNG) Thatcher Ulrich (psd) Nicolas Guillemot (vertical flip) Ken Miller (pgm, ppm) Richard Mitton (16-bit PSD) github:urraka (animated gif) Junggon Kim (PNM comments) Christopher Forseth (animated gif) Daniel Gibson (16-bit TGA) socks-the-fox (16-bit PNG) Jeremy Sawicki (handle all ImageNet JPGs) Optimizations & bugfixes Mikhail Morozov (1-bit BMP) Fabian "ryg" Giesen Anael Seghezzi (is-16-bit query) Arseny Kapoulkine Simon Breuss (16-bit PNM) John-Mark Allen Carmelo J Fdez-Aguera Bug & warning fixes Marc LeBlanc David Woo Guillaume George Martins Mozeiko Christpher Lloyd Jerry Jansson Joseph Thomson Blazej Dariusz Roszkowski Phil Jordan Dave Moore Roy Eltham Hayaki Saito Nathan Reed Won Chun Luke Graham Johan Duparc Nick Verigakis the Horde3D community Thomas Ruf Ronny Chevalier github:rlyeh Janez Zemva John Bartholomew Michal Cichon github:romigrou Jonathan Blow Ken Hamada Tero Hanninen github:svdijk Eugene Golushkov Laurent Gomila Cort Stratton github:snagar Aruelien Pocheville Sergio Gonzalez Thibault Reuille github:Zelex Cass Everitt Ryamond Barbiero github:grim210 Paul Du Bois Engin Manap Aldo Culquicondor github:sammyhw Philipp Wiesemann Dale Weiler Oriol Ferrer Mesia github:phprus Josh Tobin Neil Bickford Matthew Gregan github:poppolopoppo Julian Raschke Gregory Mullen Christian Floisand github:darealshinji Baldur Karlsson Kevin Schmidt JR Smith github:Michaelangel007 Brad Weinberger Matvey Cherevko github:mosra Luca Sas Alexander Veselov Zack Middleton [reserved] Ryan C. Gordon [reserved] [reserved] DO NOT ADD YOUR NAME HERE Jacko Dirks To add your name to the credits, pick a random blank space in the middle and fill it. 80% of merge conflicts on stb PRs are due to people adding their name at the end of the credits. */ #ifndef STBI_INCLUDE_STB_IMAGE_H #define STBI_INCLUDE_STB_IMAGE_H // DOCUMENTATION // // Limitations: // - no 12-bit-per-channel JPEG // - no JPEGs with arithmetic coding // - GIF always returns *comp=4 // // Basic usage (see HDR discussion below for HDR usage): // int x,y,n; // unsigned char *data = stbi_load(filename, &x, &y, &n, 0); // // ... process data if not NULL ... // // ... x = width, y = height, n = # 8-bit components per pixel ... // // ... replace '0' with '1'..'4' to force that many components per pixel // // ... but 'n' will always be the number that it would have been if you said 0 // stbi_image_free(data); // // Standard parameters: // int *x -- outputs image width in pixels // int *y -- outputs image height in pixels // int *channels_in_file -- outputs # of image components in image file // int desired_channels -- if non-zero, # of image components requested in result // // The return value from an image loader is an 'unsigned char *' which points // to the pixel data, or NULL on an allocation failure or if the image is // corrupt or invalid. The pixel data consists of *y scanlines of *x pixels, // with each pixel consisting of N interleaved 8-bit components; the first // pixel pointed to is top-left-most in the image. There is no padding between // image scanlines or between pixels, regardless of format. The number of // components N is 'desired_channels' if desired_channels is non-zero, or // *channels_in_file otherwise. If desired_channels is non-zero, // *channels_in_file has the number of components that _would_ have been // output otherwise. E.g. if you set desired_channels to 4, you will always // get RGBA output, but you can check *channels_in_file to see if it's trivially // opaque because e.g. there were only 3 channels in the source image. // // An output image with N components has the following components interleaved // in this order in each pixel: // // N=#comp components // 1 grey // 2 grey, alpha // 3 red, green, blue // 4 red, green, blue, alpha // // If image loading fails for any reason, the return value will be NULL, // and *x, *y, *channels_in_file will be unchanged. The function // stbi_failure_reason() can be queried for an extremely brief, end-user // unfriendly explanation of why the load failed. Define STBI_NO_FAILURE_STRINGS // to avoid compiling these strings at all, and STBI_FAILURE_USERMSG to get slightly // more user-friendly ones. // // Paletted PNG, BMP, GIF, and PIC images are automatically depalettized. // // To query the width, height and component count of an image without having to // decode the full file, you can use the stbi_info family of functions: // // int x,y,n,ok; // ok = stbi_info(filename, &x, &y, &n); // // returns ok=1 and sets x, y, n if image is a supported format, // // 0 otherwise. // // Note that stb_image pervasively uses ints in its public API for sizes, // including sizes of memory buffers. This is now part of the API and thus // hard to change without causing breakage. As a result, the various image // loaders all have certain limits on image size; these differ somewhat // by format but generally boil down to either just under 2GB or just under // 1GB. When the decoded image would be larger than this, stb_image decoding // will fail. // // Additionally, stb_image will reject image files that have any of their // dimensions set to a larger value than the configurable STBI_MAX_DIMENSIONS, // which defaults to 2**24 = 16777216 pixels. Due to the above memory limit, // the only way to have an image with such dimensions load correctly // is for it to have a rather extreme aspect ratio. Either way, the // assumption here is that such larger images are likely to be malformed // or malicious. If you do need to load an image with individual dimensions // larger than that, and it still fits in the overall size limit, you can // #define STBI_MAX_DIMENSIONS on your own to be something larger. // // =========================================================================== // // UNICODE: // // If compiling for Windows and you wish to use Unicode filenames, compile // with // #define STBI_WINDOWS_UTF8 // and pass utf8-encoded filenames. Call stbi_convert_wchar_to_utf8 to convert // Windows wchar_t filenames to utf8. // // =========================================================================== // // Philosophy // // stb libraries are designed with the following priorities: // // 1. easy to use // 2. easy to maintain // 3. good performance // // Sometimes I let "good performance" creep up in priority over "easy to maintain", // and for best performance I may provide less-easy-to-use APIs that give higher // performance, in addition to the easy-to-use ones. Nevertheless, it's important // to keep in mind that from the standpoint of you, a client of this library, // all you care about is #1 and #3, and stb libraries DO NOT emphasize #3 above all. // // Some secondary priorities arise directly from the first two, some of which // provide more explicit reasons why performance can't be emphasized. // // - Portable ("ease of use") // - Small source code footprint ("easy to maintain") // - No dependencies ("ease of use") // // =========================================================================== // // I/O callbacks // // I/O callbacks allow you to read from arbitrary sources, like packaged // files or some other source. Data read from callbacks are processed // through a small internal buffer (currently 128 bytes) to try to reduce // overhead. // // The three functions you must define are "read" (reads some bytes of data), // "skip" (skips some bytes of data), "eof" (reports if the stream is at the end). // // =========================================================================== // // SIMD support // // The JPEG decoder will try to automatically use SIMD kernels on x86 when // supported by the compiler. For ARM Neon support, you must explicitly // request it. // // (The old do-it-yourself SIMD API is no longer supported in the current // code.) // // On x86, SSE2 will automatically be used when available based on a run-time // test; if not, the generic C versions are used as a fall-back. On ARM targets, // the typical path is to have separate builds for NEON and non-NEON devices // (at least this is true for iOS and Android). Therefore, the NEON support is // toggled by a build flag: define STBI_NEON to get NEON loops. // // If for some reason you do not want to use any of SIMD code, or if // you have issues compiling it, you can disable it entirely by // defining STBI_NO_SIMD. // // =========================================================================== // // HDR image support (disable by defining STBI_NO_HDR) // // stb_image supports loading HDR images in general, and currently the Radiance // .HDR file format specifically. You can still load any file through the existing // interface; if you attempt to load an HDR file, it will be automatically remapped // to LDR, assuming gamma 2.2 and an arbitrary scale factor defaulting to 1; // both of these constants can be reconfigured through this interface: // // stbi_hdr_to_ldr_gamma(2.2f); // stbi_hdr_to_ldr_scale(1.0f); // // (note, do not use _inverse_ constants; stbi_image will invert them // appropriately). // // Additionally, there is a new, parallel interface for loading files as // (linear) floats to preserve the full dynamic range: // // float *data = stbi_loadf(filename, &x, &y, &n, 0); // // If you load LDR images through this interface, those images will // be promoted to floating point values, run through the inverse of // constants corresponding to the above: // // stbi_ldr_to_hdr_scale(1.0f); // stbi_ldr_to_hdr_gamma(2.2f); // // Finally, given a filename (or an open file or memory block--see header // file for details) containing image data, you can query for the "most // appropriate" interface to use (that is, whether the image is HDR or // not), using: // // stbi_is_hdr(char *filename); // // =========================================================================== // // iPhone PNG support: // // We optionally support converting iPhone-formatted PNGs (which store // premultiplied BGRA) back to RGB, even though they're internally encoded // differently. To enable this conversion, call // stbi_convert_iphone_png_to_rgb(1). // // Call stbi_set_unpremultiply_on_load(1) as well to force a divide per // pixel to remove any premultiplied alpha *only* if the image file explicitly // says there's premultiplied data (currently only happens in iPhone images, // and only if iPhone convert-to-rgb processing is on). // // =========================================================================== // // ADDITIONAL CONFIGURATION // // - You can suppress implementation of any of the decoders to reduce // your code footprint by #defining one or more of the following // symbols before creating the implementation. // // STBI_NO_JPEG // STBI_NO_PNG // STBI_NO_BMP // STBI_NO_PSD // STBI_NO_TGA // STBI_NO_GIF // STBI_NO_HDR // STBI_NO_PIC // STBI_NO_PNM (.ppm and .pgm) // // - You can request *only* certain decoders and suppress all other ones // (this will be more forward-compatible, as addition of new decoders // doesn't require you to disable them explicitly): // // STBI_ONLY_JPEG // STBI_ONLY_PNG // STBI_ONLY_BMP // STBI_ONLY_PSD // STBI_ONLY_TGA // STBI_ONLY_GIF // STBI_ONLY_HDR // STBI_ONLY_PIC // STBI_ONLY_PNM (.ppm and .pgm) // // - If you use STBI_NO_PNG (or _ONLY_ without PNG), and you still // want the zlib decoder to be available, #define STBI_SUPPORT_ZLIB // // - If you define STBI_MAX_DIMENSIONS, stb_image will reject images greater // than that size (in either width or height) without further processing. // This is to let programs in the wild set an upper bound to prevent // denial-of-service attacks on untrusted data, as one could generate a // valid image of gigantic dimensions and force stb_image to allocate a // huge block of memory and spend disproportionate time decoding it. By // default this is set to (1 << 24), which is 16777216, but that's still // very big. #ifndef STBI_NO_STDIO #include #endif // STBI_NO_STDIO #define STBI_VERSION 1 enum { STBI_default = 0, // only used for desired_channels STBI_grey = 1, STBI_grey_alpha = 2, STBI_rgb = 3, STBI_rgb_alpha = 4 }; #include typedef unsigned char stbi_uc; typedef unsigned short stbi_us; #ifdef __cplusplus extern "C" { #endif #ifndef STBIDEF #ifdef STB_IMAGE_STATIC #define STBIDEF static #else #define STBIDEF extern #endif #endif ////////////////////////////////////////////////////////////////////////////// // // PRIMARY API - works on images of any type // // // load image by filename, open file, or memory buffer // typedef struct { int (*read) (void *user,char *data,int size); // fill 'data' with 'size' bytes. return number of bytes actually read void (*skip) (void *user,int n); // skip the next 'n' bytes, or 'unget' the last -n bytes if negative int (*eof) (void *user); // returns nonzero if we are at end of file/data } stbi_io_callbacks; //////////////////////////////////// // // 8-bits-per-channel interface // STBIDEF stbi_uc *stbi_load_from_memory (stbi_uc const *buffer, int len , int *x, int *y, int *channels_in_file, int desired_channels); STBIDEF stbi_uc *stbi_load_from_callbacks(stbi_io_callbacks const *clbk , void *user, int *x, int *y, int *channels_in_file, int desired_channels); #ifndef STBI_NO_STDIO STBIDEF stbi_uc *stbi_load (char const *filename, int *x, int *y, int *channels_in_file, int desired_channels); STBIDEF stbi_uc *stbi_load_from_file (FILE *f, int *x, int *y, int *channels_in_file, int desired_channels); // for stbi_load_from_file, file pointer is left pointing immediately after image #endif #ifndef STBI_NO_GIF STBIDEF stbi_uc *stbi_load_gif_from_memory(stbi_uc const *buffer, int len, int **delays, int *x, int *y, int *z, int *comp, int req_comp); #endif #ifdef STBI_WINDOWS_UTF8 STBIDEF int stbi_convert_wchar_to_utf8(char *buffer, size_t bufferlen, const wchar_t* input); #endif //////////////////////////////////// // // 16-bits-per-channel interface // STBIDEF stbi_us *stbi_load_16_from_memory (stbi_uc const *buffer, int len, int *x, int *y, int *channels_in_file, int desired_channels); STBIDEF stbi_us *stbi_load_16_from_callbacks(stbi_io_callbacks const *clbk, void *user, int *x, int *y, int *channels_in_file, int desired_channels); #ifndef STBI_NO_STDIO STBIDEF stbi_us *stbi_load_16 (char const *filename, int *x, int *y, int *channels_in_file, int desired_channels); STBIDEF stbi_us *stbi_load_from_file_16(FILE *f, int *x, int *y, int *channels_in_file, int desired_channels); #endif //////////////////////////////////// // // float-per-channel interface // #ifndef STBI_NO_LINEAR STBIDEF float *stbi_loadf_from_memory (stbi_uc const *buffer, int len, int *x, int *y, int *channels_in_file, int desired_channels); STBIDEF float *stbi_loadf_from_callbacks (stbi_io_callbacks const *clbk, void *user, int *x, int *y, int *channels_in_file, int desired_channels); #ifndef STBI_NO_STDIO STBIDEF float *stbi_loadf (char const *filename, int *x, int *y, int *channels_in_file, int desired_channels); STBIDEF float *stbi_loadf_from_file (FILE *f, int *x, int *y, int *channels_in_file, int desired_channels); #endif #endif #ifndef STBI_NO_HDR STBIDEF void stbi_hdr_to_ldr_gamma(float gamma); STBIDEF void stbi_hdr_to_ldr_scale(float scale); #endif // STBI_NO_HDR #ifndef STBI_NO_LINEAR STBIDEF void stbi_ldr_to_hdr_gamma(float gamma); STBIDEF void stbi_ldr_to_hdr_scale(float scale); #endif // STBI_NO_LINEAR // stbi_is_hdr is always defined, but always returns false if STBI_NO_HDR STBIDEF int stbi_is_hdr_from_callbacks(stbi_io_callbacks const *clbk, void *user); STBIDEF int stbi_is_hdr_from_memory(stbi_uc const *buffer, int len); #ifndef STBI_NO_STDIO STBIDEF int stbi_is_hdr (char const *filename); STBIDEF int stbi_is_hdr_from_file(FILE *f); #endif // STBI_NO_STDIO // get a VERY brief reason for failure // on most compilers (and ALL modern mainstream compilers) this is threadsafe STBIDEF const char *stbi_failure_reason (void); // free the loaded image -- this is just free() STBIDEF void stbi_image_free (void *retval_from_stbi_load); // get image dimensions & components without fully decoding STBIDEF int stbi_info_from_memory(stbi_uc const *buffer, int len, int *x, int *y, int *comp); STBIDEF int stbi_info_from_callbacks(stbi_io_callbacks const *clbk, void *user, int *x, int *y, int *comp); STBIDEF int stbi_is_16_bit_from_memory(stbi_uc const *buffer, int len); STBIDEF int stbi_is_16_bit_from_callbacks(stbi_io_callbacks const *clbk, void *user); #ifndef STBI_NO_STDIO STBIDEF int stbi_info (char const *filename, int *x, int *y, int *comp); STBIDEF int stbi_info_from_file (FILE *f, int *x, int *y, int *comp); STBIDEF int stbi_is_16_bit (char const *filename); STBIDEF int stbi_is_16_bit_from_file(FILE *f); #endif // for image formats that explicitly notate that they have premultiplied alpha, // we just return the colors as stored in the file. set this flag to force // unpremultiplication. results are undefined if the unpremultiply overflow. STBIDEF void stbi_set_unpremultiply_on_load(int flag_true_if_should_unpremultiply); // indicate whether we should process iphone images back to canonical format, // or just pass them through "as-is" STBIDEF void stbi_convert_iphone_png_to_rgb(int flag_true_if_should_convert); // flip the image vertically, so the first pixel in the output array is the bottom left STBIDEF void stbi_set_flip_vertically_on_load(int flag_true_if_should_flip); // as above, but only applies to images loaded on the thread that calls the function // this function is only available if your compiler supports thread-local variables; // calling it will fail to link if your compiler doesn't STBIDEF void stbi_set_unpremultiply_on_load_thread(int flag_true_if_should_unpremultiply); STBIDEF void stbi_convert_iphone_png_to_rgb_thread(int flag_true_if_should_convert); STBIDEF void stbi_set_flip_vertically_on_load_thread(int flag_true_if_should_flip); // ZLIB client - used by PNG, available for other purposes STBIDEF char *stbi_zlib_decode_malloc_guesssize(const char *buffer, int len, int initial_size, int *outlen); STBIDEF char *stbi_zlib_decode_malloc_guesssize_headerflag(const char *buffer, int len, int initial_size, int *outlen, int parse_header); STBIDEF char *stbi_zlib_decode_malloc(const char *buffer, int len, int *outlen); STBIDEF int stbi_zlib_decode_buffer(char *obuffer, int olen, const char *ibuffer, int ilen); STBIDEF char *stbi_zlib_decode_noheader_malloc(const char *buffer, int len, int *outlen); STBIDEF int stbi_zlib_decode_noheader_buffer(char *obuffer, int olen, const char *ibuffer, int ilen); #ifdef __cplusplus } #endif // // //// end header file ///////////////////////////////////////////////////// #endif // STBI_INCLUDE_STB_IMAGE_H #ifdef STB_IMAGE_IMPLEMENTATION #if defined(STBI_ONLY_JPEG) || defined(STBI_ONLY_PNG) || defined(STBI_ONLY_BMP) \ || defined(STBI_ONLY_TGA) || defined(STBI_ONLY_GIF) || defined(STBI_ONLY_PSD) \ || defined(STBI_ONLY_HDR) || defined(STBI_ONLY_PIC) || defined(STBI_ONLY_PNM) \ || defined(STBI_ONLY_ZLIB) #ifndef STBI_ONLY_JPEG #define STBI_NO_JPEG #endif #ifndef STBI_ONLY_PNG #define STBI_NO_PNG #endif #ifndef STBI_ONLY_BMP #define STBI_NO_BMP #endif #ifndef STBI_ONLY_PSD #define STBI_NO_PSD #endif #ifndef STBI_ONLY_TGA #define STBI_NO_TGA #endif #ifndef STBI_ONLY_GIF #define STBI_NO_GIF #endif #ifndef STBI_ONLY_HDR #define STBI_NO_HDR #endif #ifndef STBI_ONLY_PIC #define STBI_NO_PIC #endif #ifndef STBI_ONLY_PNM #define STBI_NO_PNM #endif #endif #if defined(STBI_NO_PNG) && !defined(STBI_SUPPORT_ZLIB) && !defined(STBI_NO_ZLIB) #define STBI_NO_ZLIB #endif #include #include // ptrdiff_t on osx #include #include #include #if !defined(STBI_NO_LINEAR) || !defined(STBI_NO_HDR) #include // ldexp, pow #endif #ifndef STBI_NO_STDIO #include #endif #ifndef STBI_ASSERT #include #define STBI_ASSERT(x) assert(x) #endif #ifdef __cplusplus #define STBI_EXTERN extern "C" #else #define STBI_EXTERN extern #endif #ifndef _MSC_VER #ifdef __cplusplus #define stbi_inline inline #else #define stbi_inline #endif #else #define stbi_inline __forceinline #endif #ifndef STBI_NO_THREAD_LOCALS #if defined(__cplusplus) && __cplusplus >= 201103L #define STBI_THREAD_LOCAL thread_local #elif defined(__GNUC__) && __GNUC__ < 5 #define STBI_THREAD_LOCAL __thread #elif defined(_MSC_VER) #define STBI_THREAD_LOCAL __declspec(thread) #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L && !defined(__STDC_NO_THREADS__) #define STBI_THREAD_LOCAL _Thread_local #endif #ifndef STBI_THREAD_LOCAL #if defined(__GNUC__) #define STBI_THREAD_LOCAL __thread #endif #endif #endif #if defined(_MSC_VER) || defined(__SYMBIAN32__) typedef unsigned short stbi__uint16; typedef signed short stbi__int16; typedef unsigned int stbi__uint32; typedef signed int stbi__int32; #else #include typedef uint16_t stbi__uint16; typedef int16_t stbi__int16; typedef uint32_t stbi__uint32; typedef int32_t stbi__int32; #endif // should produce compiler error if size is wrong typedef unsigned char validate_uint32[sizeof(stbi__uint32)==4 ? 1 : -1]; #ifdef _MSC_VER #define STBI_NOTUSED(v) (void)(v) #else #define STBI_NOTUSED(v) (void)sizeof(v) #endif #ifdef _MSC_VER #define STBI_HAS_LROTL #endif #ifdef STBI_HAS_LROTL #define stbi_lrot(x,y) _lrotl(x,y) #else #define stbi_lrot(x,y) (((x) << (y)) | ((x) >> (-(y) & 31))) #endif #if defined(STBI_MALLOC) && defined(STBI_FREE) && (defined(STBI_REALLOC) || defined(STBI_REALLOC_SIZED)) // ok #elif !defined(STBI_MALLOC) && !defined(STBI_FREE) && !defined(STBI_REALLOC) && !defined(STBI_REALLOC_SIZED) // ok #else #error "Must define all or none of STBI_MALLOC, STBI_FREE, and STBI_REALLOC (or STBI_REALLOC_SIZED)." #endif #ifndef STBI_MALLOC #define STBI_MALLOC(sz) malloc(sz) #define STBI_REALLOC(p,newsz) realloc(p,newsz) #define STBI_FREE(p) free(p) #endif #ifndef STBI_REALLOC_SIZED #define STBI_REALLOC_SIZED(p,oldsz,newsz) STBI_REALLOC(p,newsz) #endif // x86/x64 detection #if defined(__x86_64__) || defined(_M_X64) #define STBI__X64_TARGET #elif defined(__i386) || defined(_M_IX86) #define STBI__X86_TARGET #endif #if defined(__GNUC__) && defined(STBI__X86_TARGET) && !defined(__SSE2__) && !defined(STBI_NO_SIMD) // gcc doesn't support sse2 intrinsics unless you compile with -msse2, // which in turn means it gets to use SSE2 everywhere. This is unfortunate, // but previous attempts to provide the SSE2 functions with runtime // detection caused numerous issues. The way architecture extensions are // exposed in GCC/Clang is, sadly, not really suited for one-file libs. // New behavior: if compiled with -msse2, we use SSE2 without any // detection; if not, we don't use it at all. #define STBI_NO_SIMD #endif #if defined(__MINGW32__) && defined(STBI__X86_TARGET) && !defined(STBI_MINGW_ENABLE_SSE2) && !defined(STBI_NO_SIMD) // Note that __MINGW32__ doesn't actually mean 32-bit, so we have to avoid STBI__X64_TARGET // // 32-bit MinGW wants ESP to be 16-byte aligned, but this is not in the // Windows ABI and VC++ as well as Windows DLLs don't maintain that invariant. // As a result, enabling SSE2 on 32-bit MinGW is dangerous when not // simultaneously enabling "-mstackrealign". // // See https://github.com/nothings/stb/issues/81 for more information. // // So default to no SSE2 on 32-bit MinGW. If you've read this far and added // -mstackrealign to your build settings, feel free to #define STBI_MINGW_ENABLE_SSE2. #define STBI_NO_SIMD #endif #if !defined(STBI_NO_SIMD) && (defined(STBI__X86_TARGET) || defined(STBI__X64_TARGET)) #define STBI_SSE2 #include #ifdef _MSC_VER #if _MSC_VER >= 1400 // not VC6 #include // __cpuid static int stbi__cpuid3(void) { int info[4]; __cpuid(info,1); return info[3]; } #else static int stbi__cpuid3(void) { int res; __asm { mov eax,1 cpuid mov res,edx } return res; } #endif #define STBI_SIMD_ALIGN(type, name) __declspec(align(16)) type name #if !defined(STBI_NO_JPEG) && defined(STBI_SSE2) static int stbi__sse2_available(void) { int info3 = stbi__cpuid3(); return ((info3 >> 26) & 1) != 0; } #endif #else // assume GCC-style if not VC++ #define STBI_SIMD_ALIGN(type, name) type name __attribute__((aligned(16))) #if !defined(STBI_NO_JPEG) && defined(STBI_SSE2) static int stbi__sse2_available(void) { // If we're even attempting to compile this on GCC/Clang, that means // -msse2 is on, which means the compiler is allowed to use SSE2 // instructions at will, and so are we. return 1; } #endif #endif #endif // ARM NEON #if defined(STBI_NO_SIMD) && defined(STBI_NEON) #undef STBI_NEON #endif #ifdef STBI_NEON #include #ifdef _MSC_VER #define STBI_SIMD_ALIGN(type, name) __declspec(align(16)) type name #else #define STBI_SIMD_ALIGN(type, name) type name __attribute__((aligned(16))) #endif #endif #ifndef STBI_SIMD_ALIGN #define STBI_SIMD_ALIGN(type, name) type name #endif #ifndef STBI_MAX_DIMENSIONS #define STBI_MAX_DIMENSIONS (1 << 24) #endif /////////////////////////////////////////////// // // stbi__context struct and start_xxx functions // stbi__context structure is our basic context used by all images, so it // contains all the IO context, plus some basic image information typedef struct { stbi__uint32 img_x, img_y; int img_n, img_out_n; stbi_io_callbacks io; void *io_user_data; int read_from_callbacks; int buflen; stbi_uc buffer_start[128]; int callback_already_read; stbi_uc *img_buffer, *img_buffer_end; stbi_uc *img_buffer_original, *img_buffer_original_end; } stbi__context; static void stbi__refill_buffer(stbi__context *s); // initialize a memory-decode context static void stbi__start_mem(stbi__context *s, stbi_uc const *buffer, int len) { s->io.read = NULL; s->read_from_callbacks = 0; s->callback_already_read = 0; s->img_buffer = s->img_buffer_original = (stbi_uc *) buffer; s->img_buffer_end = s->img_buffer_original_end = (stbi_uc *) buffer+len; } // initialize a callback-based context static void stbi__start_callbacks(stbi__context *s, stbi_io_callbacks *c, void *user) { s->io = *c; s->io_user_data = user; s->buflen = sizeof(s->buffer_start); s->read_from_callbacks = 1; s->callback_already_read = 0; s->img_buffer = s->img_buffer_original = s->buffer_start; stbi__refill_buffer(s); s->img_buffer_original_end = s->img_buffer_end; } #ifndef STBI_NO_STDIO static int stbi__stdio_read(void *user, char *data, int size) { return (int) fread(data,1,size,(FILE*) user); } static void stbi__stdio_skip(void *user, int n) { int ch; fseek((FILE*) user, n, SEEK_CUR); ch = fgetc((FILE*) user); /* have to read a byte to reset feof()'s flag */ if (ch != EOF) { ungetc(ch, (FILE *) user); /* push byte back onto stream if valid. */ } } static int stbi__stdio_eof(void *user) { return feof((FILE*) user) || ferror((FILE *) user); } static stbi_io_callbacks stbi__stdio_callbacks = { stbi__stdio_read, stbi__stdio_skip, stbi__stdio_eof, }; static void stbi__start_file(stbi__context *s, FILE *f) { stbi__start_callbacks(s, &stbi__stdio_callbacks, (void *) f); } //static void stop_file(stbi__context *s) { } #endif // !STBI_NO_STDIO static void stbi__rewind(stbi__context *s) { // conceptually rewind SHOULD rewind to the beginning of the stream, // but we just rewind to the beginning of the initial buffer, because // we only use it after doing 'test', which only ever looks at at most 92 bytes s->img_buffer = s->img_buffer_original; s->img_buffer_end = s->img_buffer_original_end; } enum { STBI_ORDER_RGB, STBI_ORDER_BGR }; typedef struct { int bits_per_channel; int num_channels; int channel_order; } stbi__result_info; #ifndef STBI_NO_JPEG static int stbi__jpeg_test(stbi__context *s); static void *stbi__jpeg_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri); static int stbi__jpeg_info(stbi__context *s, int *x, int *y, int *comp); #endif #ifndef STBI_NO_PNG static int stbi__png_test(stbi__context *s); static void *stbi__png_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri); static int stbi__png_info(stbi__context *s, int *x, int *y, int *comp); static int stbi__png_is16(stbi__context *s); #endif #ifndef STBI_NO_BMP static int stbi__bmp_test(stbi__context *s); static void *stbi__bmp_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri); static int stbi__bmp_info(stbi__context *s, int *x, int *y, int *comp); #endif #ifndef STBI_NO_TGA static int stbi__tga_test(stbi__context *s); static void *stbi__tga_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri); static int stbi__tga_info(stbi__context *s, int *x, int *y, int *comp); #endif #ifndef STBI_NO_PSD static int stbi__psd_test(stbi__context *s); static void *stbi__psd_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri, int bpc); static int stbi__psd_info(stbi__context *s, int *x, int *y, int *comp); static int stbi__psd_is16(stbi__context *s); #endif #ifndef STBI_NO_HDR static int stbi__hdr_test(stbi__context *s); static float *stbi__hdr_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri); static int stbi__hdr_info(stbi__context *s, int *x, int *y, int *comp); #endif #ifndef STBI_NO_PIC static int stbi__pic_test(stbi__context *s); static void *stbi__pic_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri); static int stbi__pic_info(stbi__context *s, int *x, int *y, int *comp); #endif #ifndef STBI_NO_GIF static int stbi__gif_test(stbi__context *s); static void *stbi__gif_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri); static void *stbi__load_gif_main(stbi__context *s, int **delays, int *x, int *y, int *z, int *comp, int req_comp); static int stbi__gif_info(stbi__context *s, int *x, int *y, int *comp); #endif #ifndef STBI_NO_PNM static int stbi__pnm_test(stbi__context *s); static void *stbi__pnm_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri); static int stbi__pnm_info(stbi__context *s, int *x, int *y, int *comp); static int stbi__pnm_is16(stbi__context *s); #endif static #ifdef STBI_THREAD_LOCAL STBI_THREAD_LOCAL #endif const char *stbi__g_failure_reason; STBIDEF const char *stbi_failure_reason(void) { return stbi__g_failure_reason; } #ifndef STBI_NO_FAILURE_STRINGS static int stbi__err(const char *str) { stbi__g_failure_reason = str; return 0; } #endif static void *stbi__malloc(size_t size) { return STBI_MALLOC(size); } // stb_image uses ints pervasively, including for offset calculations. // therefore the largest decoded image size we can support with the // current code, even on 64-bit targets, is INT_MAX. this is not a // significant limitation for the intended use case. // // we do, however, need to make sure our size calculations don't // overflow. hence a few helper functions for size calculations that // multiply integers together, making sure that they're non-negative // and no overflow occurs. // return 1 if the sum is valid, 0 on overflow. // negative terms are considered invalid. static int stbi__addsizes_valid(int a, int b) { if (b < 0) return 0; // now 0 <= b <= INT_MAX, hence also // 0 <= INT_MAX - b <= INTMAX. // And "a + b <= INT_MAX" (which might overflow) is the // same as a <= INT_MAX - b (no overflow) return a <= INT_MAX - b; } // returns 1 if the product is valid, 0 on overflow. // negative factors are considered invalid. static int stbi__mul2sizes_valid(int a, int b) { if (a < 0 || b < 0) return 0; if (b == 0) return 1; // mul-by-0 is always safe // portable way to check for no overflows in a*b return a <= INT_MAX/b; } #if !defined(STBI_NO_JPEG) || !defined(STBI_NO_PNG) || !defined(STBI_NO_TGA) || !defined(STBI_NO_HDR) // returns 1 if "a*b + add" has no negative terms/factors and doesn't overflow static int stbi__mad2sizes_valid(int a, int b, int add) { return stbi__mul2sizes_valid(a, b) && stbi__addsizes_valid(a*b, add); } #endif // returns 1 if "a*b*c + add" has no negative terms/factors and doesn't overflow static int stbi__mad3sizes_valid(int a, int b, int c, int add) { return stbi__mul2sizes_valid(a, b) && stbi__mul2sizes_valid(a*b, c) && stbi__addsizes_valid(a*b*c, add); } // returns 1 if "a*b*c*d + add" has no negative terms/factors and doesn't overflow #if !defined(STBI_NO_LINEAR) || !defined(STBI_NO_HDR) || !defined(STBI_NO_PNM) static int stbi__mad4sizes_valid(int a, int b, int c, int d, int add) { return stbi__mul2sizes_valid(a, b) && stbi__mul2sizes_valid(a*b, c) && stbi__mul2sizes_valid(a*b*c, d) && stbi__addsizes_valid(a*b*c*d, add); } #endif #if !defined(STBI_NO_JPEG) || !defined(STBI_NO_PNG) || !defined(STBI_NO_TGA) || !defined(STBI_NO_HDR) // mallocs with size overflow checking static void *stbi__malloc_mad2(int a, int b, int add) { if (!stbi__mad2sizes_valid(a, b, add)) return NULL; return stbi__malloc(a*b + add); } #endif static void *stbi__malloc_mad3(int a, int b, int c, int add) { if (!stbi__mad3sizes_valid(a, b, c, add)) return NULL; return stbi__malloc(a*b*c + add); } #if !defined(STBI_NO_LINEAR) || !defined(STBI_NO_HDR) || !defined(STBI_NO_PNM) static void *stbi__malloc_mad4(int a, int b, int c, int d, int add) { if (!stbi__mad4sizes_valid(a, b, c, d, add)) return NULL; return stbi__malloc(a*b*c*d + add); } #endif // returns 1 if the sum of two signed ints is valid (between -2^31 and 2^31-1 inclusive), 0 on overflow. static int stbi__addints_valid(int a, int b) { if ((a >= 0) != (b >= 0)) return 1; // a and b have different signs, so no overflow if (a < 0 && b < 0) return a >= INT_MIN - b; // same as a + b >= INT_MIN; INT_MIN - b cannot overflow since b < 0. return a <= INT_MAX - b; } // returns 1 if the product of two ints fits in a signed short, 0 on overflow. static int stbi__mul2shorts_valid(int a, int b) { if (b == 0 || b == -1) return 1; // multiplication by 0 is always 0; check for -1 so SHRT_MIN/b doesn't overflow if ((a >= 0) == (b >= 0)) return a <= SHRT_MAX/b; // product is positive, so similar to mul2sizes_valid if (b < 0) return a <= SHRT_MIN / b; // same as a * b >= SHRT_MIN return a >= SHRT_MIN / b; } // stbi__err - error // stbi__errpf - error returning pointer to float // stbi__errpuc - error returning pointer to unsigned char #ifdef STBI_NO_FAILURE_STRINGS #define stbi__err(x,y) 0 #elif defined(STBI_FAILURE_USERMSG) #define stbi__err(x,y) stbi__err(y) #else #define stbi__err(x,y) stbi__err(x) #endif #define stbi__errpf(x,y) ((float *)(size_t) (stbi__err(x,y)?NULL:NULL)) #define stbi__errpuc(x,y) ((unsigned char *)(size_t) (stbi__err(x,y)?NULL:NULL)) STBIDEF void stbi_image_free(void *retval_from_stbi_load) { STBI_FREE(retval_from_stbi_load); } #ifndef STBI_NO_LINEAR static float *stbi__ldr_to_hdr(stbi_uc *data, int x, int y, int comp); #endif #ifndef STBI_NO_HDR static stbi_uc *stbi__hdr_to_ldr(float *data, int x, int y, int comp); #endif static int stbi__vertically_flip_on_load_global = 0; STBIDEF void stbi_set_flip_vertically_on_load(int flag_true_if_should_flip) { stbi__vertically_flip_on_load_global = flag_true_if_should_flip; } #ifndef STBI_THREAD_LOCAL #define stbi__vertically_flip_on_load stbi__vertically_flip_on_load_global #else static STBI_THREAD_LOCAL int stbi__vertically_flip_on_load_local, stbi__vertically_flip_on_load_set; STBIDEF void stbi_set_flip_vertically_on_load_thread(int flag_true_if_should_flip) { stbi__vertically_flip_on_load_local = flag_true_if_should_flip; stbi__vertically_flip_on_load_set = 1; } #define stbi__vertically_flip_on_load (stbi__vertically_flip_on_load_set \ ? stbi__vertically_flip_on_load_local \ : stbi__vertically_flip_on_load_global) #endif // STBI_THREAD_LOCAL static void *stbi__load_main(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri, int bpc) { memset(ri, 0, sizeof(*ri)); // make sure it's initialized if we add new fields ri->bits_per_channel = 8; // default is 8 so most paths don't have to be changed ri->channel_order = STBI_ORDER_RGB; // all current input & output are this, but this is here so we can add BGR order ri->num_channels = 0; // test the formats with a very explicit header first (at least a FOURCC // or distinctive magic number first) #ifndef STBI_NO_PNG if (stbi__png_test(s)) return stbi__png_load(s,x,y,comp,req_comp, ri); #endif #ifndef STBI_NO_BMP if (stbi__bmp_test(s)) return stbi__bmp_load(s,x,y,comp,req_comp, ri); #endif #ifndef STBI_NO_GIF if (stbi__gif_test(s)) return stbi__gif_load(s,x,y,comp,req_comp, ri); #endif #ifndef STBI_NO_PSD if (stbi__psd_test(s)) return stbi__psd_load(s,x,y,comp,req_comp, ri, bpc); #else STBI_NOTUSED(bpc); #endif #ifndef STBI_NO_PIC if (stbi__pic_test(s)) return stbi__pic_load(s,x,y,comp,req_comp, ri); #endif // then the formats that can end up attempting to load with just 1 or 2 // bytes matching expectations; these are prone to false positives, so // try them later #ifndef STBI_NO_JPEG if (stbi__jpeg_test(s)) return stbi__jpeg_load(s,x,y,comp,req_comp, ri); #endif #ifndef STBI_NO_PNM if (stbi__pnm_test(s)) return stbi__pnm_load(s,x,y,comp,req_comp, ri); #endif #ifndef STBI_NO_HDR if (stbi__hdr_test(s)) { float *hdr = stbi__hdr_load(s, x,y,comp,req_comp, ri); return stbi__hdr_to_ldr(hdr, *x, *y, req_comp ? req_comp : *comp); } #endif #ifndef STBI_NO_TGA // test tga last because it's a crappy test! if (stbi__tga_test(s)) return stbi__tga_load(s,x,y,comp,req_comp, ri); #endif return stbi__errpuc("unknown image type", "Image not of any known type, or corrupt"); } static stbi_uc *stbi__convert_16_to_8(stbi__uint16 *orig, int w, int h, int channels) { int i; int img_len = w * h * channels; stbi_uc *reduced; reduced = (stbi_uc *) stbi__malloc(img_len); if (reduced == NULL) return stbi__errpuc("outofmem", "Out of memory"); for (i = 0; i < img_len; ++i) reduced[i] = (stbi_uc)((orig[i] >> 8) & 0xFF); // top half of each byte is sufficient approx of 16->8 bit scaling STBI_FREE(orig); return reduced; } static stbi__uint16 *stbi__convert_8_to_16(stbi_uc *orig, int w, int h, int channels) { int i; int img_len = w * h * channels; stbi__uint16 *enlarged; enlarged = (stbi__uint16 *) stbi__malloc(img_len*2); if (enlarged == NULL) return (stbi__uint16 *) stbi__errpuc("outofmem", "Out of memory"); for (i = 0; i < img_len; ++i) enlarged[i] = (stbi__uint16)((orig[i] << 8) + orig[i]); // replicate to high and low byte, maps 0->0, 255->0xffff STBI_FREE(orig); return enlarged; } static void stbi__vertical_flip(void *image, int w, int h, int bytes_per_pixel) { int row; size_t bytes_per_row = (size_t)w * bytes_per_pixel; stbi_uc temp[2048]; stbi_uc *bytes = (stbi_uc *)image; for (row = 0; row < (h>>1); row++) { stbi_uc *row0 = bytes + row*bytes_per_row; stbi_uc *row1 = bytes + (h - row - 1)*bytes_per_row; // swap row0 with row1 size_t bytes_left = bytes_per_row; while (bytes_left) { size_t bytes_copy = (bytes_left < sizeof(temp)) ? bytes_left : sizeof(temp); memcpy(temp, row0, bytes_copy); memcpy(row0, row1, bytes_copy); memcpy(row1, temp, bytes_copy); row0 += bytes_copy; row1 += bytes_copy; bytes_left -= bytes_copy; } } } #ifndef STBI_NO_GIF static void stbi__vertical_flip_slices(void *image, int w, int h, int z, int bytes_per_pixel) { int slice; int slice_size = w * h * bytes_per_pixel; stbi_uc *bytes = (stbi_uc *)image; for (slice = 0; slice < z; ++slice) { stbi__vertical_flip(bytes, w, h, bytes_per_pixel); bytes += slice_size; } } #endif static unsigned char *stbi__load_and_postprocess_8bit(stbi__context *s, int *x, int *y, int *comp, int req_comp) { stbi__result_info ri; void *result = stbi__load_main(s, x, y, comp, req_comp, &ri, 8); if (result == NULL) return NULL; // it is the responsibility of the loaders to make sure we get either 8 or 16 bit. STBI_ASSERT(ri.bits_per_channel == 8 || ri.bits_per_channel == 16); if (ri.bits_per_channel != 8) { result = stbi__convert_16_to_8((stbi__uint16 *) result, *x, *y, req_comp == 0 ? *comp : req_comp); ri.bits_per_channel = 8; } // @TODO: move stbi__convert_format to here if (stbi__vertically_flip_on_load) { int channels = req_comp ? req_comp : *comp; stbi__vertical_flip(result, *x, *y, channels * sizeof(stbi_uc)); } return (unsigned char *) result; } static stbi__uint16 *stbi__load_and_postprocess_16bit(stbi__context *s, int *x, int *y, int *comp, int req_comp) { stbi__result_info ri; void *result = stbi__load_main(s, x, y, comp, req_comp, &ri, 16); if (result == NULL) return NULL; // it is the responsibility of the loaders to make sure we get either 8 or 16 bit. STBI_ASSERT(ri.bits_per_channel == 8 || ri.bits_per_channel == 16); if (ri.bits_per_channel != 16) { result = stbi__convert_8_to_16((stbi_uc *) result, *x, *y, req_comp == 0 ? *comp : req_comp); ri.bits_per_channel = 16; } // @TODO: move stbi__convert_format16 to here // @TODO: special case RGB-to-Y (and RGBA-to-YA) for 8-bit-to-16-bit case to keep more precision if (stbi__vertically_flip_on_load) { int channels = req_comp ? req_comp : *comp; stbi__vertical_flip(result, *x, *y, channels * sizeof(stbi__uint16)); } return (stbi__uint16 *) result; } #if !defined(STBI_NO_HDR) && !defined(STBI_NO_LINEAR) static void stbi__float_postprocess(float *result, int *x, int *y, int *comp, int req_comp) { if (stbi__vertically_flip_on_load && result != NULL) { int channels = req_comp ? req_comp : *comp; stbi__vertical_flip(result, *x, *y, channels * sizeof(float)); } } #endif #ifndef STBI_NO_STDIO #if defined(_WIN32) && defined(STBI_WINDOWS_UTF8) STBI_EXTERN __declspec(dllimport) int __stdcall MultiByteToWideChar(unsigned int cp, unsigned long flags, const char *str, int cbmb, wchar_t *widestr, int cchwide); STBI_EXTERN __declspec(dllimport) int __stdcall WideCharToMultiByte(unsigned int cp, unsigned long flags, const wchar_t *widestr, int cchwide, char *str, int cbmb, const char *defchar, int *used_default); #endif #if defined(_WIN32) && defined(STBI_WINDOWS_UTF8) STBIDEF int stbi_convert_wchar_to_utf8(char *buffer, size_t bufferlen, const wchar_t* input) { return WideCharToMultiByte(65001 /* UTF8 */, 0, input, -1, buffer, (int) bufferlen, NULL, NULL); } #endif static FILE *stbi__fopen(char const *filename, char const *mode) { FILE *f; #if defined(_WIN32) && defined(STBI_WINDOWS_UTF8) wchar_t wMode[64]; wchar_t wFilename[1024]; if (0 == MultiByteToWideChar(65001 /* UTF8 */, 0, filename, -1, wFilename, sizeof(wFilename)/sizeof(*wFilename))) return 0; if (0 == MultiByteToWideChar(65001 /* UTF8 */, 0, mode, -1, wMode, sizeof(wMode)/sizeof(*wMode))) return 0; #if defined(_MSC_VER) && _MSC_VER >= 1400 if (0 != _wfopen_s(&f, wFilename, wMode)) f = 0; #else f = _wfopen(wFilename, wMode); #endif #elif defined(_MSC_VER) && _MSC_VER >= 1400 if (0 != fopen_s(&f, filename, mode)) f=0; #else f = fopen(filename, mode); #endif return f; } STBIDEF stbi_uc *stbi_load(char const *filename, int *x, int *y, int *comp, int req_comp) { FILE *f = stbi__fopen(filename, "rb"); unsigned char *result; if (!f) return stbi__errpuc("can't fopen", "Unable to open file"); result = stbi_load_from_file(f,x,y,comp,req_comp); fclose(f); return result; } STBIDEF stbi_uc *stbi_load_from_file(FILE *f, int *x, int *y, int *comp, int req_comp) { unsigned char *result; stbi__context s; stbi__start_file(&s,f); result = stbi__load_and_postprocess_8bit(&s,x,y,comp,req_comp); if (result) { // need to 'unget' all the characters in the IO buffer fseek(f, - (int) (s.img_buffer_end - s.img_buffer), SEEK_CUR); } return result; } STBIDEF stbi__uint16 *stbi_load_from_file_16(FILE *f, int *x, int *y, int *comp, int req_comp) { stbi__uint16 *result; stbi__context s; stbi__start_file(&s,f); result = stbi__load_and_postprocess_16bit(&s,x,y,comp,req_comp); if (result) { // need to 'unget' all the characters in the IO buffer fseek(f, - (int) (s.img_buffer_end - s.img_buffer), SEEK_CUR); } return result; } STBIDEF stbi_us *stbi_load_16(char const *filename, int *x, int *y, int *comp, int req_comp) { FILE *f = stbi__fopen(filename, "rb"); stbi__uint16 *result; if (!f) return (stbi_us *) stbi__errpuc("can't fopen", "Unable to open file"); result = stbi_load_from_file_16(f,x,y,comp,req_comp); fclose(f); return result; } #endif //!STBI_NO_STDIO STBIDEF stbi_us *stbi_load_16_from_memory(stbi_uc const *buffer, int len, int *x, int *y, int *channels_in_file, int desired_channels) { stbi__context s; stbi__start_mem(&s,buffer,len); return stbi__load_and_postprocess_16bit(&s,x,y,channels_in_file,desired_channels); } STBIDEF stbi_us *stbi_load_16_from_callbacks(stbi_io_callbacks const *clbk, void *user, int *x, int *y, int *channels_in_file, int desired_channels) { stbi__context s; stbi__start_callbacks(&s, (stbi_io_callbacks *)clbk, user); return stbi__load_and_postprocess_16bit(&s,x,y,channels_in_file,desired_channels); } STBIDEF stbi_uc *stbi_load_from_memory(stbi_uc const *buffer, int len, int *x, int *y, int *comp, int req_comp) { stbi__context s; stbi__start_mem(&s,buffer,len); return stbi__load_and_postprocess_8bit(&s,x,y,comp,req_comp); } STBIDEF stbi_uc *stbi_load_from_callbacks(stbi_io_callbacks const *clbk, void *user, int *x, int *y, int *comp, int req_comp) { stbi__context s; stbi__start_callbacks(&s, (stbi_io_callbacks *) clbk, user); return stbi__load_and_postprocess_8bit(&s,x,y,comp,req_comp); } #ifndef STBI_NO_GIF STBIDEF stbi_uc *stbi_load_gif_from_memory(stbi_uc const *buffer, int len, int **delays, int *x, int *y, int *z, int *comp, int req_comp) { unsigned char *result; stbi__context s; stbi__start_mem(&s,buffer,len); result = (unsigned char*) stbi__load_gif_main(&s, delays, x, y, z, comp, req_comp); if (stbi__vertically_flip_on_load) { stbi__vertical_flip_slices( result, *x, *y, *z, *comp ); } return result; } #endif #ifndef STBI_NO_LINEAR static float *stbi__loadf_main(stbi__context *s, int *x, int *y, int *comp, int req_comp) { unsigned char *data; #ifndef STBI_NO_HDR if (stbi__hdr_test(s)) { stbi__result_info ri; float *hdr_data = stbi__hdr_load(s,x,y,comp,req_comp, &ri); if (hdr_data) stbi__float_postprocess(hdr_data,x,y,comp,req_comp); return hdr_data; } #endif data = stbi__load_and_postprocess_8bit(s, x, y, comp, req_comp); if (data) return stbi__ldr_to_hdr(data, *x, *y, req_comp ? req_comp : *comp); return stbi__errpf("unknown image type", "Image not of any known type, or corrupt"); } STBIDEF float *stbi_loadf_from_memory(stbi_uc const *buffer, int len, int *x, int *y, int *comp, int req_comp) { stbi__context s; stbi__start_mem(&s,buffer,len); return stbi__loadf_main(&s,x,y,comp,req_comp); } STBIDEF float *stbi_loadf_from_callbacks(stbi_io_callbacks const *clbk, void *user, int *x, int *y, int *comp, int req_comp) { stbi__context s; stbi__start_callbacks(&s, (stbi_io_callbacks *) clbk, user); return stbi__loadf_main(&s,x,y,comp,req_comp); } #ifndef STBI_NO_STDIO STBIDEF float *stbi_loadf(char const *filename, int *x, int *y, int *comp, int req_comp) { float *result; FILE *f = stbi__fopen(filename, "rb"); if (!f) return stbi__errpf("can't fopen", "Unable to open file"); result = stbi_loadf_from_file(f,x,y,comp,req_comp); fclose(f); return result; } STBIDEF float *stbi_loadf_from_file(FILE *f, int *x, int *y, int *comp, int req_comp) { stbi__context s; stbi__start_file(&s,f); return stbi__loadf_main(&s,x,y,comp,req_comp); } #endif // !STBI_NO_STDIO #endif // !STBI_NO_LINEAR // these is-hdr-or-not is defined independent of whether STBI_NO_LINEAR is // defined, for API simplicity; if STBI_NO_LINEAR is defined, it always // reports false! STBIDEF int stbi_is_hdr_from_memory(stbi_uc const *buffer, int len) { #ifndef STBI_NO_HDR stbi__context s; stbi__start_mem(&s,buffer,len); return stbi__hdr_test(&s); #else STBI_NOTUSED(buffer); STBI_NOTUSED(len); return 0; #endif } #ifndef STBI_NO_STDIO STBIDEF int stbi_is_hdr (char const *filename) { FILE *f = stbi__fopen(filename, "rb"); int result=0; if (f) { result = stbi_is_hdr_from_file(f); fclose(f); } return result; } STBIDEF int stbi_is_hdr_from_file(FILE *f) { #ifndef STBI_NO_HDR long pos = ftell(f); int res; stbi__context s; stbi__start_file(&s,f); res = stbi__hdr_test(&s); fseek(f, pos, SEEK_SET); return res; #else STBI_NOTUSED(f); return 0; #endif } #endif // !STBI_NO_STDIO STBIDEF int stbi_is_hdr_from_callbacks(stbi_io_callbacks const *clbk, void *user) { #ifndef STBI_NO_HDR stbi__context s; stbi__start_callbacks(&s, (stbi_io_callbacks *) clbk, user); return stbi__hdr_test(&s); #else STBI_NOTUSED(clbk); STBI_NOTUSED(user); return 0; #endif } #ifndef STBI_NO_LINEAR static float stbi__l2h_gamma=2.2f, stbi__l2h_scale=1.0f; STBIDEF void stbi_ldr_to_hdr_gamma(float gamma) { stbi__l2h_gamma = gamma; } STBIDEF void stbi_ldr_to_hdr_scale(float scale) { stbi__l2h_scale = scale; } #endif static float stbi__h2l_gamma_i=1.0f/2.2f, stbi__h2l_scale_i=1.0f; STBIDEF void stbi_hdr_to_ldr_gamma(float gamma) { stbi__h2l_gamma_i = 1/gamma; } STBIDEF void stbi_hdr_to_ldr_scale(float scale) { stbi__h2l_scale_i = 1/scale; } ////////////////////////////////////////////////////////////////////////////// // // Common code used by all image loaders // enum { STBI__SCAN_load=0, STBI__SCAN_type, STBI__SCAN_header }; static void stbi__refill_buffer(stbi__context *s) { int n = (s->io.read)(s->io_user_data,(char*)s->buffer_start,s->buflen); s->callback_already_read += (int) (s->img_buffer - s->img_buffer_original); if (n == 0) { // at end of file, treat same as if from memory, but need to handle case // where s->img_buffer isn't pointing to safe memory, e.g. 0-byte file s->read_from_callbacks = 0; s->img_buffer = s->buffer_start; s->img_buffer_end = s->buffer_start+1; *s->img_buffer = 0; } else { s->img_buffer = s->buffer_start; s->img_buffer_end = s->buffer_start + n; } } stbi_inline static stbi_uc stbi__get8(stbi__context *s) { if (s->img_buffer < s->img_buffer_end) return *s->img_buffer++; if (s->read_from_callbacks) { stbi__refill_buffer(s); return *s->img_buffer++; } return 0; } #if defined(STBI_NO_JPEG) && defined(STBI_NO_HDR) && defined(STBI_NO_PIC) && defined(STBI_NO_PNM) // nothing #else stbi_inline static int stbi__at_eof(stbi__context *s) { if (s->io.read) { if (!(s->io.eof)(s->io_user_data)) return 0; // if feof() is true, check if buffer = end // special case: we've only got the special 0 character at the end if (s->read_from_callbacks == 0) return 1; } return s->img_buffer >= s->img_buffer_end; } #endif #if defined(STBI_NO_JPEG) && defined(STBI_NO_PNG) && defined(STBI_NO_BMP) && defined(STBI_NO_PSD) && defined(STBI_NO_TGA) && defined(STBI_NO_GIF) && defined(STBI_NO_PIC) // nothing #else static void stbi__skip(stbi__context *s, int n) { if (n == 0) return; // already there! if (n < 0) { s->img_buffer = s->img_buffer_end; return; } if (s->io.read) { int blen = (int) (s->img_buffer_end - s->img_buffer); if (blen < n) { s->img_buffer = s->img_buffer_end; (s->io.skip)(s->io_user_data, n - blen); return; } } s->img_buffer += n; } #endif #if defined(STBI_NO_PNG) && defined(STBI_NO_TGA) && defined(STBI_NO_HDR) && defined(STBI_NO_PNM) // nothing #else static int stbi__getn(stbi__context *s, stbi_uc *buffer, int n) { if (s->io.read) { int blen = (int) (s->img_buffer_end - s->img_buffer); if (blen < n) { int res, count; memcpy(buffer, s->img_buffer, blen); count = (s->io.read)(s->io_user_data, (char*) buffer + blen, n - blen); res = (count == (n-blen)); s->img_buffer = s->img_buffer_end; return res; } } if (s->img_buffer+n <= s->img_buffer_end) { memcpy(buffer, s->img_buffer, n); s->img_buffer += n; return 1; } else return 0; } #endif #if defined(STBI_NO_JPEG) && defined(STBI_NO_PNG) && defined(STBI_NO_PSD) && defined(STBI_NO_PIC) // nothing #else static int stbi__get16be(stbi__context *s) { int z = stbi__get8(s); return (z << 8) + stbi__get8(s); } #endif #if defined(STBI_NO_PNG) && defined(STBI_NO_PSD) && defined(STBI_NO_PIC) // nothing #else static stbi__uint32 stbi__get32be(stbi__context *s) { stbi__uint32 z = stbi__get16be(s); return (z << 16) + stbi__get16be(s); } #endif #if defined(STBI_NO_BMP) && defined(STBI_NO_TGA) && defined(STBI_NO_GIF) // nothing #else static int stbi__get16le(stbi__context *s) { int z = stbi__get8(s); return z + (stbi__get8(s) << 8); } #endif #ifndef STBI_NO_BMP static stbi__uint32 stbi__get32le(stbi__context *s) { stbi__uint32 z = stbi__get16le(s); z += (stbi__uint32)stbi__get16le(s) << 16; return z; } #endif #define STBI__BYTECAST(x) ((stbi_uc) ((x) & 255)) // truncate int to byte without warnings #if defined(STBI_NO_JPEG) && defined(STBI_NO_PNG) && defined(STBI_NO_BMP) && defined(STBI_NO_PSD) && defined(STBI_NO_TGA) && defined(STBI_NO_GIF) && defined(STBI_NO_PIC) && defined(STBI_NO_PNM) // nothing #else ////////////////////////////////////////////////////////////////////////////// // // generic converter from built-in img_n to req_comp // individual types do this automatically as much as possible (e.g. jpeg // does all cases internally since it needs to colorspace convert anyway, // and it never has alpha, so very few cases ). png can automatically // interleave an alpha=255 channel, but falls back to this for other cases // // assume data buffer is malloced, so malloc a new one and free that one // only failure mode is malloc failing static stbi_uc stbi__compute_y(int r, int g, int b) { return (stbi_uc) (((r*77) + (g*150) + (29*b)) >> 8); } #endif #if defined(STBI_NO_PNG) && defined(STBI_NO_BMP) && defined(STBI_NO_PSD) && defined(STBI_NO_TGA) && defined(STBI_NO_GIF) && defined(STBI_NO_PIC) && defined(STBI_NO_PNM) // nothing #else static unsigned char *stbi__convert_format(unsigned char *data, int img_n, int req_comp, unsigned int x, unsigned int y) { int i,j; unsigned char *good; if (req_comp == img_n) return data; STBI_ASSERT(req_comp >= 1 && req_comp <= 4); good = (unsigned char *) stbi__malloc_mad3(req_comp, x, y, 0); if (good == NULL) { STBI_FREE(data); return stbi__errpuc("outofmem", "Out of memory"); } for (j=0; j < (int) y; ++j) { unsigned char *src = data + j * x * img_n ; unsigned char *dest = good + j * x * req_comp; #define STBI__COMBO(a,b) ((a)*8+(b)) #define STBI__CASE(a,b) case STBI__COMBO(a,b): for(i=x-1; i >= 0; --i, src += a, dest += b) // convert source image with img_n components to one with req_comp components; // avoid switch per pixel, so use switch per scanline and massive macros switch (STBI__COMBO(img_n, req_comp)) { STBI__CASE(1,2) { dest[0]=src[0]; dest[1]=255; } break; STBI__CASE(1,3) { dest[0]=dest[1]=dest[2]=src[0]; } break; STBI__CASE(1,4) { dest[0]=dest[1]=dest[2]=src[0]; dest[3]=255; } break; STBI__CASE(2,1) { dest[0]=src[0]; } break; STBI__CASE(2,3) { dest[0]=dest[1]=dest[2]=src[0]; } break; STBI__CASE(2,4) { dest[0]=dest[1]=dest[2]=src[0]; dest[3]=src[1]; } break; STBI__CASE(3,4) { dest[0]=src[0];dest[1]=src[1];dest[2]=src[2];dest[3]=255; } break; STBI__CASE(3,1) { dest[0]=stbi__compute_y(src[0],src[1],src[2]); } break; STBI__CASE(3,2) { dest[0]=stbi__compute_y(src[0],src[1],src[2]); dest[1] = 255; } break; STBI__CASE(4,1) { dest[0]=stbi__compute_y(src[0],src[1],src[2]); } break; STBI__CASE(4,2) { dest[0]=stbi__compute_y(src[0],src[1],src[2]); dest[1] = src[3]; } break; STBI__CASE(4,3) { dest[0]=src[0];dest[1]=src[1];dest[2]=src[2]; } break; default: STBI_ASSERT(0); STBI_FREE(data); STBI_FREE(good); return stbi__errpuc("unsupported", "Unsupported format conversion"); } #undef STBI__CASE } STBI_FREE(data); return good; } #endif #if defined(STBI_NO_PNG) && defined(STBI_NO_PSD) // nothing #else static stbi__uint16 stbi__compute_y_16(int r, int g, int b) { return (stbi__uint16) (((r*77) + (g*150) + (29*b)) >> 8); } #endif #if defined(STBI_NO_PNG) && defined(STBI_NO_PSD) // nothing #else static stbi__uint16 *stbi__convert_format16(stbi__uint16 *data, int img_n, int req_comp, unsigned int x, unsigned int y) { int i,j; stbi__uint16 *good; if (req_comp == img_n) return data; STBI_ASSERT(req_comp >= 1 && req_comp <= 4); good = (stbi__uint16 *) stbi__malloc(req_comp * x * y * 2); if (good == NULL) { STBI_FREE(data); return (stbi__uint16 *) stbi__errpuc("outofmem", "Out of memory"); } for (j=0; j < (int) y; ++j) { stbi__uint16 *src = data + j * x * img_n ; stbi__uint16 *dest = good + j * x * req_comp; #define STBI__COMBO(a,b) ((a)*8+(b)) #define STBI__CASE(a,b) case STBI__COMBO(a,b): for(i=x-1; i >= 0; --i, src += a, dest += b) // convert source image with img_n components to one with req_comp components; // avoid switch per pixel, so use switch per scanline and massive macros switch (STBI__COMBO(img_n, req_comp)) { STBI__CASE(1,2) { dest[0]=src[0]; dest[1]=0xffff; } break; STBI__CASE(1,3) { dest[0]=dest[1]=dest[2]=src[0]; } break; STBI__CASE(1,4) { dest[0]=dest[1]=dest[2]=src[0]; dest[3]=0xffff; } break; STBI__CASE(2,1) { dest[0]=src[0]; } break; STBI__CASE(2,3) { dest[0]=dest[1]=dest[2]=src[0]; } break; STBI__CASE(2,4) { dest[0]=dest[1]=dest[2]=src[0]; dest[3]=src[1]; } break; STBI__CASE(3,4) { dest[0]=src[0];dest[1]=src[1];dest[2]=src[2];dest[3]=0xffff; } break; STBI__CASE(3,1) { dest[0]=stbi__compute_y_16(src[0],src[1],src[2]); } break; STBI__CASE(3,2) { dest[0]=stbi__compute_y_16(src[0],src[1],src[2]); dest[1] = 0xffff; } break; STBI__CASE(4,1) { dest[0]=stbi__compute_y_16(src[0],src[1],src[2]); } break; STBI__CASE(4,2) { dest[0]=stbi__compute_y_16(src[0],src[1],src[2]); dest[1] = src[3]; } break; STBI__CASE(4,3) { dest[0]=src[0];dest[1]=src[1];dest[2]=src[2]; } break; default: STBI_ASSERT(0); STBI_FREE(data); STBI_FREE(good); return (stbi__uint16*) stbi__errpuc("unsupported", "Unsupported format conversion"); } #undef STBI__CASE } STBI_FREE(data); return good; } #endif #ifndef STBI_NO_LINEAR static float *stbi__ldr_to_hdr(stbi_uc *data, int x, int y, int comp) { int i,k,n; float *output; if (!data) return NULL; output = (float *) stbi__malloc_mad4(x, y, comp, sizeof(float), 0); if (output == NULL) { STBI_FREE(data); return stbi__errpf("outofmem", "Out of memory"); } // compute number of non-alpha components if (comp & 1) n = comp; else n = comp-1; for (i=0; i < x*y; ++i) { for (k=0; k < n; ++k) { output[i*comp + k] = (float) (pow(data[i*comp+k]/255.0f, stbi__l2h_gamma) * stbi__l2h_scale); } } if (n < comp) { for (i=0; i < x*y; ++i) { output[i*comp + n] = data[i*comp + n]/255.0f; } } STBI_FREE(data); return output; } #endif #ifndef STBI_NO_HDR #define stbi__float2int(x) ((int) (x)) static stbi_uc *stbi__hdr_to_ldr(float *data, int x, int y, int comp) { int i,k,n; stbi_uc *output; if (!data) return NULL; output = (stbi_uc *) stbi__malloc_mad3(x, y, comp, 0); if (output == NULL) { STBI_FREE(data); return stbi__errpuc("outofmem", "Out of memory"); } // compute number of non-alpha components if (comp & 1) n = comp; else n = comp-1; for (i=0; i < x*y; ++i) { for (k=0; k < n; ++k) { float z = (float) pow(data[i*comp+k]*stbi__h2l_scale_i, stbi__h2l_gamma_i) * 255 + 0.5f; if (z < 0) z = 0; if (z > 255) z = 255; output[i*comp + k] = (stbi_uc) stbi__float2int(z); } if (k < comp) { float z = data[i*comp+k] * 255 + 0.5f; if (z < 0) z = 0; if (z > 255) z = 255; output[i*comp + k] = (stbi_uc) stbi__float2int(z); } } STBI_FREE(data); return output; } #endif ////////////////////////////////////////////////////////////////////////////// // // "baseline" JPEG/JFIF decoder // // simple implementation // - doesn't support delayed output of y-dimension // - simple interface (only one output format: 8-bit interleaved RGB) // - doesn't try to recover corrupt jpegs // - doesn't allow partial loading, loading multiple at once // - still fast on x86 (copying globals into locals doesn't help x86) // - allocates lots of intermediate memory (full size of all components) // - non-interleaved case requires this anyway // - allows good upsampling (see next) // high-quality // - upsampled channels are bilinearly interpolated, even across blocks // - quality integer IDCT derived from IJG's 'slow' // performance // - fast huffman; reasonable integer IDCT // - some SIMD kernels for common paths on targets with SSE2/NEON // - uses a lot of intermediate memory, could cache poorly #ifndef STBI_NO_JPEG // huffman decoding acceleration #define FAST_BITS 9 // larger handles more cases; smaller stomps less cache typedef struct { stbi_uc fast[1 << FAST_BITS]; // weirdly, repacking this into AoS is a 10% speed loss, instead of a win stbi__uint16 code[256]; stbi_uc values[256]; stbi_uc size[257]; unsigned int maxcode[18]; int delta[17]; // old 'firstsymbol' - old 'firstcode' } stbi__huffman; typedef struct { stbi__context *s; stbi__huffman huff_dc[4]; stbi__huffman huff_ac[4]; stbi__uint16 dequant[4][64]; stbi__int16 fast_ac[4][1 << FAST_BITS]; // sizes for components, interleaved MCUs int img_h_max, img_v_max; int img_mcu_x, img_mcu_y; int img_mcu_w, img_mcu_h; // definition of jpeg image component struct { int id; int h,v; int tq; int hd,ha; int dc_pred; int x,y,w2,h2; stbi_uc *data; void *raw_data, *raw_coeff; stbi_uc *linebuf; short *coeff; // progressive only int coeff_w, coeff_h; // number of 8x8 coefficient blocks } img_comp[4]; stbi__uint32 code_buffer; // jpeg entropy-coded buffer int code_bits; // number of valid bits unsigned char marker; // marker seen while filling entropy buffer int nomore; // flag if we saw a marker so must stop int progressive; int spec_start; int spec_end; int succ_high; int succ_low; int eob_run; int jfif; int app14_color_transform; // Adobe APP14 tag int rgb; int scan_n, order[4]; int restart_interval, todo; // kernels void (*idct_block_kernel)(stbi_uc *out, int out_stride, short data[64]); void (*YCbCr_to_RGB_kernel)(stbi_uc *out, const stbi_uc *y, const stbi_uc *pcb, const stbi_uc *pcr, int count, int step); stbi_uc *(*resample_row_hv_2_kernel)(stbi_uc *out, stbi_uc *in_near, stbi_uc *in_far, int w, int hs); } stbi__jpeg; static int stbi__build_huffman(stbi__huffman *h, int *count) { int i,j,k=0; unsigned int code; // build size list for each symbol (from JPEG spec) for (i=0; i < 16; ++i) { for (j=0; j < count[i]; ++j) { h->size[k++] = (stbi_uc) (i+1); if(k >= 257) return stbi__err("bad size list","Corrupt JPEG"); } } h->size[k] = 0; // compute actual symbols (from jpeg spec) code = 0; k = 0; for(j=1; j <= 16; ++j) { // compute delta to add to code to compute symbol id h->delta[j] = k - code; if (h->size[k] == j) { while (h->size[k] == j) h->code[k++] = (stbi__uint16) (code++); if (code-1 >= (1u << j)) return stbi__err("bad code lengths","Corrupt JPEG"); } // compute largest code + 1 for this size, preshifted as needed later h->maxcode[j] = code << (16-j); code <<= 1; } h->maxcode[j] = 0xffffffff; // build non-spec acceleration table; 255 is flag for not-accelerated memset(h->fast, 255, 1 << FAST_BITS); for (i=0; i < k; ++i) { int s = h->size[i]; if (s <= FAST_BITS) { int c = h->code[i] << (FAST_BITS-s); int m = 1 << (FAST_BITS-s); for (j=0; j < m; ++j) { h->fast[c+j] = (stbi_uc) i; } } } return 1; } // build a table that decodes both magnitude and value of small ACs in // one go. static void stbi__build_fast_ac(stbi__int16 *fast_ac, stbi__huffman *h) { int i; for (i=0; i < (1 << FAST_BITS); ++i) { stbi_uc fast = h->fast[i]; fast_ac[i] = 0; if (fast < 255) { int rs = h->values[fast]; int run = (rs >> 4) & 15; int magbits = rs & 15; int len = h->size[fast]; if (magbits && len + magbits <= FAST_BITS) { // magnitude code followed by receive_extend code int k = ((i << len) & ((1 << FAST_BITS) - 1)) >> (FAST_BITS - magbits); int m = 1 << (magbits - 1); if (k < m) k += (~0U << magbits) + 1; // if the result is small enough, we can fit it in fast_ac table if (k >= -128 && k <= 127) fast_ac[i] = (stbi__int16) ((k * 256) + (run * 16) + (len + magbits)); } } } } static void stbi__grow_buffer_unsafe(stbi__jpeg *j) { do { unsigned int b = j->nomore ? 0 : stbi__get8(j->s); if (b == 0xff) { int c = stbi__get8(j->s); while (c == 0xff) c = stbi__get8(j->s); // consume fill bytes if (c != 0) { j->marker = (unsigned char) c; j->nomore = 1; return; } } j->code_buffer |= b << (24 - j->code_bits); j->code_bits += 8; } while (j->code_bits <= 24); } // (1 << n) - 1 static const stbi__uint32 stbi__bmask[17]={0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535}; // decode a jpeg huffman value from the bitstream stbi_inline static int stbi__jpeg_huff_decode(stbi__jpeg *j, stbi__huffman *h) { unsigned int temp; int c,k; if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); // look at the top FAST_BITS and determine what symbol ID it is, // if the code is <= FAST_BITS c = (j->code_buffer >> (32 - FAST_BITS)) & ((1 << FAST_BITS)-1); k = h->fast[c]; if (k < 255) { int s = h->size[k]; if (s > j->code_bits) return -1; j->code_buffer <<= s; j->code_bits -= s; return h->values[k]; } // naive test is to shift the code_buffer down so k bits are // valid, then test against maxcode. To speed this up, we've // preshifted maxcode left so that it has (16-k) 0s at the // end; in other words, regardless of the number of bits, it // wants to be compared against something shifted to have 16; // that way we don't need to shift inside the loop. temp = j->code_buffer >> 16; for (k=FAST_BITS+1 ; ; ++k) if (temp < h->maxcode[k]) break; if (k == 17) { // error! code not found j->code_bits -= 16; return -1; } if (k > j->code_bits) return -1; // convert the huffman code to the symbol id c = ((j->code_buffer >> (32 - k)) & stbi__bmask[k]) + h->delta[k]; if(c < 0 || c >= 256) // symbol id out of bounds! return -1; STBI_ASSERT((((j->code_buffer) >> (32 - h->size[c])) & stbi__bmask[h->size[c]]) == h->code[c]); // convert the id to a symbol j->code_bits -= k; j->code_buffer <<= k; return h->values[c]; } // bias[n] = (-1<code_bits < n) stbi__grow_buffer_unsafe(j); if (j->code_bits < n) return 0; // ran out of bits from stream, return 0s intead of continuing sgn = j->code_buffer >> 31; // sign bit always in MSB; 0 if MSB clear (positive), 1 if MSB set (negative) k = stbi_lrot(j->code_buffer, n); j->code_buffer = k & ~stbi__bmask[n]; k &= stbi__bmask[n]; j->code_bits -= n; return k + (stbi__jbias[n] & (sgn - 1)); } // get some unsigned bits stbi_inline static int stbi__jpeg_get_bits(stbi__jpeg *j, int n) { unsigned int k; if (j->code_bits < n) stbi__grow_buffer_unsafe(j); if (j->code_bits < n) return 0; // ran out of bits from stream, return 0s intead of continuing k = stbi_lrot(j->code_buffer, n); j->code_buffer = k & ~stbi__bmask[n]; k &= stbi__bmask[n]; j->code_bits -= n; return k; } stbi_inline static int stbi__jpeg_get_bit(stbi__jpeg *j) { unsigned int k; if (j->code_bits < 1) stbi__grow_buffer_unsafe(j); if (j->code_bits < 1) return 0; // ran out of bits from stream, return 0s intead of continuing k = j->code_buffer; j->code_buffer <<= 1; --j->code_bits; return k & 0x80000000; } // given a value that's at position X in the zigzag stream, // where does it appear in the 8x8 matrix coded as row-major? static const stbi_uc stbi__jpeg_dezigzag[64+15] = { 0, 1, 8, 16, 9, 2, 3, 10, 17, 24, 32, 25, 18, 11, 4, 5, 12, 19, 26, 33, 40, 48, 41, 34, 27, 20, 13, 6, 7, 14, 21, 28, 35, 42, 49, 56, 57, 50, 43, 36, 29, 22, 15, 23, 30, 37, 44, 51, 58, 59, 52, 45, 38, 31, 39, 46, 53, 60, 61, 54, 47, 55, 62, 63, // let corrupt input sample past end 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63 }; // decode one 64-entry block-- static int stbi__jpeg_decode_block(stbi__jpeg *j, short data[64], stbi__huffman *hdc, stbi__huffman *hac, stbi__int16 *fac, int b, stbi__uint16 *dequant) { int diff,dc,k; int t; if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); t = stbi__jpeg_huff_decode(j, hdc); if (t < 0 || t > 15) return stbi__err("bad huffman code","Corrupt JPEG"); // 0 all the ac values now so we can do it 32-bits at a time memset(data,0,64*sizeof(data[0])); diff = t ? stbi__extend_receive(j, t) : 0; if (!stbi__addints_valid(j->img_comp[b].dc_pred, diff)) return stbi__err("bad delta","Corrupt JPEG"); dc = j->img_comp[b].dc_pred + diff; j->img_comp[b].dc_pred = dc; if (!stbi__mul2shorts_valid(dc, dequant[0])) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); data[0] = (short) (dc * dequant[0]); // decode AC components, see JPEG spec k = 1; do { unsigned int zig; int c,r,s; if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); c = (j->code_buffer >> (32 - FAST_BITS)) & ((1 << FAST_BITS)-1); r = fac[c]; if (r) { // fast-AC path k += (r >> 4) & 15; // run s = r & 15; // combined length if (s > j->code_bits) return stbi__err("bad huffman code", "Combined length longer than code bits available"); j->code_buffer <<= s; j->code_bits -= s; // decode into unzigzag'd location zig = stbi__jpeg_dezigzag[k++]; data[zig] = (short) ((r >> 8) * dequant[zig]); } else { int rs = stbi__jpeg_huff_decode(j, hac); if (rs < 0) return stbi__err("bad huffman code","Corrupt JPEG"); s = rs & 15; r = rs >> 4; if (s == 0) { if (rs != 0xf0) break; // end block k += 16; } else { k += r; // decode into unzigzag'd location zig = stbi__jpeg_dezigzag[k++]; data[zig] = (short) (stbi__extend_receive(j,s) * dequant[zig]); } } } while (k < 64); return 1; } static int stbi__jpeg_decode_block_prog_dc(stbi__jpeg *j, short data[64], stbi__huffman *hdc, int b) { int diff,dc; int t; if (j->spec_end != 0) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); if (j->succ_high == 0) { // first scan for DC coefficient, must be first memset(data,0,64*sizeof(data[0])); // 0 all the ac values now t = stbi__jpeg_huff_decode(j, hdc); if (t < 0 || t > 15) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); diff = t ? stbi__extend_receive(j, t) : 0; if (!stbi__addints_valid(j->img_comp[b].dc_pred, diff)) return stbi__err("bad delta", "Corrupt JPEG"); dc = j->img_comp[b].dc_pred + diff; j->img_comp[b].dc_pred = dc; if (!stbi__mul2shorts_valid(dc, 1 << j->succ_low)) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); data[0] = (short) (dc * (1 << j->succ_low)); } else { // refinement scan for DC coefficient if (stbi__jpeg_get_bit(j)) data[0] += (short) (1 << j->succ_low); } return 1; } // @OPTIMIZE: store non-zigzagged during the decode passes, // and only de-zigzag when dequantizing static int stbi__jpeg_decode_block_prog_ac(stbi__jpeg *j, short data[64], stbi__huffman *hac, stbi__int16 *fac) { int k; if (j->spec_start == 0) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); if (j->succ_high == 0) { int shift = j->succ_low; if (j->eob_run) { --j->eob_run; return 1; } k = j->spec_start; do { unsigned int zig; int c,r,s; if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); c = (j->code_buffer >> (32 - FAST_BITS)) & ((1 << FAST_BITS)-1); r = fac[c]; if (r) { // fast-AC path k += (r >> 4) & 15; // run s = r & 15; // combined length if (s > j->code_bits) return stbi__err("bad huffman code", "Combined length longer than code bits available"); j->code_buffer <<= s; j->code_bits -= s; zig = stbi__jpeg_dezigzag[k++]; data[zig] = (short) ((r >> 8) * (1 << shift)); } else { int rs = stbi__jpeg_huff_decode(j, hac); if (rs < 0) return stbi__err("bad huffman code","Corrupt JPEG"); s = rs & 15; r = rs >> 4; if (s == 0) { if (r < 15) { j->eob_run = (1 << r); if (r) j->eob_run += stbi__jpeg_get_bits(j, r); --j->eob_run; break; } k += 16; } else { k += r; zig = stbi__jpeg_dezigzag[k++]; data[zig] = (short) (stbi__extend_receive(j,s) * (1 << shift)); } } } while (k <= j->spec_end); } else { // refinement scan for these AC coefficients short bit = (short) (1 << j->succ_low); if (j->eob_run) { --j->eob_run; for (k = j->spec_start; k <= j->spec_end; ++k) { short *p = &data[stbi__jpeg_dezigzag[k]]; if (*p != 0) if (stbi__jpeg_get_bit(j)) if ((*p & bit)==0) { if (*p > 0) *p += bit; else *p -= bit; } } } else { k = j->spec_start; do { int r,s; int rs = stbi__jpeg_huff_decode(j, hac); // @OPTIMIZE see if we can use the fast path here, advance-by-r is so slow, eh if (rs < 0) return stbi__err("bad huffman code","Corrupt JPEG"); s = rs & 15; r = rs >> 4; if (s == 0) { if (r < 15) { j->eob_run = (1 << r) - 1; if (r) j->eob_run += stbi__jpeg_get_bits(j, r); r = 64; // force end of block } else { // r=15 s=0 should write 16 0s, so we just do // a run of 15 0s and then write s (which is 0), // so we don't have to do anything special here } } else { if (s != 1) return stbi__err("bad huffman code", "Corrupt JPEG"); // sign bit if (stbi__jpeg_get_bit(j)) s = bit; else s = -bit; } // advance by r while (k <= j->spec_end) { short *p = &data[stbi__jpeg_dezigzag[k++]]; if (*p != 0) { if (stbi__jpeg_get_bit(j)) if ((*p & bit)==0) { if (*p > 0) *p += bit; else *p -= bit; } } else { if (r == 0) { *p = (short) s; break; } --r; } } } while (k <= j->spec_end); } } return 1; } // take a -128..127 value and stbi__clamp it and convert to 0..255 stbi_inline static stbi_uc stbi__clamp(int x) { // trick to use a single test to catch both cases if ((unsigned int) x > 255) { if (x < 0) return 0; if (x > 255) return 255; } return (stbi_uc) x; } #define stbi__f2f(x) ((int) (((x) * 4096 + 0.5))) #define stbi__fsh(x) ((x) * 4096) // derived from jidctint -- DCT_ISLOW #define STBI__IDCT_1D(s0,s1,s2,s3,s4,s5,s6,s7) \ int t0,t1,t2,t3,p1,p2,p3,p4,p5,x0,x1,x2,x3; \ p2 = s2; \ p3 = s6; \ p1 = (p2+p3) * stbi__f2f(0.5411961f); \ t2 = p1 + p3*stbi__f2f(-1.847759065f); \ t3 = p1 + p2*stbi__f2f( 0.765366865f); \ p2 = s0; \ p3 = s4; \ t0 = stbi__fsh(p2+p3); \ t1 = stbi__fsh(p2-p3); \ x0 = t0+t3; \ x3 = t0-t3; \ x1 = t1+t2; \ x2 = t1-t2; \ t0 = s7; \ t1 = s5; \ t2 = s3; \ t3 = s1; \ p3 = t0+t2; \ p4 = t1+t3; \ p1 = t0+t3; \ p2 = t1+t2; \ p5 = (p3+p4)*stbi__f2f( 1.175875602f); \ t0 = t0*stbi__f2f( 0.298631336f); \ t1 = t1*stbi__f2f( 2.053119869f); \ t2 = t2*stbi__f2f( 3.072711026f); \ t3 = t3*stbi__f2f( 1.501321110f); \ p1 = p5 + p1*stbi__f2f(-0.899976223f); \ p2 = p5 + p2*stbi__f2f(-2.562915447f); \ p3 = p3*stbi__f2f(-1.961570560f); \ p4 = p4*stbi__f2f(-0.390180644f); \ t3 += p1+p4; \ t2 += p2+p3; \ t1 += p2+p4; \ t0 += p1+p3; static void stbi__idct_block(stbi_uc *out, int out_stride, short data[64]) { int i,val[64],*v=val; stbi_uc *o; short *d = data; // columns for (i=0; i < 8; ++i,++d, ++v) { // if all zeroes, shortcut -- this avoids dequantizing 0s and IDCTing if (d[ 8]==0 && d[16]==0 && d[24]==0 && d[32]==0 && d[40]==0 && d[48]==0 && d[56]==0) { // no shortcut 0 seconds // (1|2|3|4|5|6|7)==0 0 seconds // all separate -0.047 seconds // 1 && 2|3 && 4|5 && 6|7: -0.047 seconds int dcterm = d[0]*4; v[0] = v[8] = v[16] = v[24] = v[32] = v[40] = v[48] = v[56] = dcterm; } else { STBI__IDCT_1D(d[ 0],d[ 8],d[16],d[24],d[32],d[40],d[48],d[56]) // constants scaled things up by 1<<12; let's bring them back // down, but keep 2 extra bits of precision x0 += 512; x1 += 512; x2 += 512; x3 += 512; v[ 0] = (x0+t3) >> 10; v[56] = (x0-t3) >> 10; v[ 8] = (x1+t2) >> 10; v[48] = (x1-t2) >> 10; v[16] = (x2+t1) >> 10; v[40] = (x2-t1) >> 10; v[24] = (x3+t0) >> 10; v[32] = (x3-t0) >> 10; } } for (i=0, v=val, o=out; i < 8; ++i,v+=8,o+=out_stride) { // no fast case since the first 1D IDCT spread components out STBI__IDCT_1D(v[0],v[1],v[2],v[3],v[4],v[5],v[6],v[7]) // constants scaled things up by 1<<12, plus we had 1<<2 from first // loop, plus horizontal and vertical each scale by sqrt(8) so together // we've got an extra 1<<3, so 1<<17 total we need to remove. // so we want to round that, which means adding 0.5 * 1<<17, // aka 65536. Also, we'll end up with -128 to 127 that we want // to encode as 0..255 by adding 128, so we'll add that before the shift x0 += 65536 + (128<<17); x1 += 65536 + (128<<17); x2 += 65536 + (128<<17); x3 += 65536 + (128<<17); // tried computing the shifts into temps, or'ing the temps to see // if any were out of range, but that was slower o[0] = stbi__clamp((x0+t3) >> 17); o[7] = stbi__clamp((x0-t3) >> 17); o[1] = stbi__clamp((x1+t2) >> 17); o[6] = stbi__clamp((x1-t2) >> 17); o[2] = stbi__clamp((x2+t1) >> 17); o[5] = stbi__clamp((x2-t1) >> 17); o[3] = stbi__clamp((x3+t0) >> 17); o[4] = stbi__clamp((x3-t0) >> 17); } } #ifdef STBI_SSE2 // sse2 integer IDCT. not the fastest possible implementation but it // produces bit-identical results to the generic C version so it's // fully "transparent". static void stbi__idct_simd(stbi_uc *out, int out_stride, short data[64]) { // This is constructed to match our regular (generic) integer IDCT exactly. __m128i row0, row1, row2, row3, row4, row5, row6, row7; __m128i tmp; // dot product constant: even elems=x, odd elems=y #define dct_const(x,y) _mm_setr_epi16((x),(y),(x),(y),(x),(y),(x),(y)) // out(0) = c0[even]*x + c0[odd]*y (c0, x, y 16-bit, out 32-bit) // out(1) = c1[even]*x + c1[odd]*y #define dct_rot(out0,out1, x,y,c0,c1) \ __m128i c0##lo = _mm_unpacklo_epi16((x),(y)); \ __m128i c0##hi = _mm_unpackhi_epi16((x),(y)); \ __m128i out0##_l = _mm_madd_epi16(c0##lo, c0); \ __m128i out0##_h = _mm_madd_epi16(c0##hi, c0); \ __m128i out1##_l = _mm_madd_epi16(c0##lo, c1); \ __m128i out1##_h = _mm_madd_epi16(c0##hi, c1) // out = in << 12 (in 16-bit, out 32-bit) #define dct_widen(out, in) \ __m128i out##_l = _mm_srai_epi32(_mm_unpacklo_epi16(_mm_setzero_si128(), (in)), 4); \ __m128i out##_h = _mm_srai_epi32(_mm_unpackhi_epi16(_mm_setzero_si128(), (in)), 4) // wide add #define dct_wadd(out, a, b) \ __m128i out##_l = _mm_add_epi32(a##_l, b##_l); \ __m128i out##_h = _mm_add_epi32(a##_h, b##_h) // wide sub #define dct_wsub(out, a, b) \ __m128i out##_l = _mm_sub_epi32(a##_l, b##_l); \ __m128i out##_h = _mm_sub_epi32(a##_h, b##_h) // butterfly a/b, add bias, then shift by "s" and pack #define dct_bfly32o(out0, out1, a,b,bias,s) \ { \ __m128i abiased_l = _mm_add_epi32(a##_l, bias); \ __m128i abiased_h = _mm_add_epi32(a##_h, bias); \ dct_wadd(sum, abiased, b); \ dct_wsub(dif, abiased, b); \ out0 = _mm_packs_epi32(_mm_srai_epi32(sum_l, s), _mm_srai_epi32(sum_h, s)); \ out1 = _mm_packs_epi32(_mm_srai_epi32(dif_l, s), _mm_srai_epi32(dif_h, s)); \ } // 8-bit interleave step (for transposes) #define dct_interleave8(a, b) \ tmp = a; \ a = _mm_unpacklo_epi8(a, b); \ b = _mm_unpackhi_epi8(tmp, b) // 16-bit interleave step (for transposes) #define dct_interleave16(a, b) \ tmp = a; \ a = _mm_unpacklo_epi16(a, b); \ b = _mm_unpackhi_epi16(tmp, b) #define dct_pass(bias,shift) \ { \ /* even part */ \ dct_rot(t2e,t3e, row2,row6, rot0_0,rot0_1); \ __m128i sum04 = _mm_add_epi16(row0, row4); \ __m128i dif04 = _mm_sub_epi16(row0, row4); \ dct_widen(t0e, sum04); \ dct_widen(t1e, dif04); \ dct_wadd(x0, t0e, t3e); \ dct_wsub(x3, t0e, t3e); \ dct_wadd(x1, t1e, t2e); \ dct_wsub(x2, t1e, t2e); \ /* odd part */ \ dct_rot(y0o,y2o, row7,row3, rot2_0,rot2_1); \ dct_rot(y1o,y3o, row5,row1, rot3_0,rot3_1); \ __m128i sum17 = _mm_add_epi16(row1, row7); \ __m128i sum35 = _mm_add_epi16(row3, row5); \ dct_rot(y4o,y5o, sum17,sum35, rot1_0,rot1_1); \ dct_wadd(x4, y0o, y4o); \ dct_wadd(x5, y1o, y5o); \ dct_wadd(x6, y2o, y5o); \ dct_wadd(x7, y3o, y4o); \ dct_bfly32o(row0,row7, x0,x7,bias,shift); \ dct_bfly32o(row1,row6, x1,x6,bias,shift); \ dct_bfly32o(row2,row5, x2,x5,bias,shift); \ dct_bfly32o(row3,row4, x3,x4,bias,shift); \ } __m128i rot0_0 = dct_const(stbi__f2f(0.5411961f), stbi__f2f(0.5411961f) + stbi__f2f(-1.847759065f)); __m128i rot0_1 = dct_const(stbi__f2f(0.5411961f) + stbi__f2f( 0.765366865f), stbi__f2f(0.5411961f)); __m128i rot1_0 = dct_const(stbi__f2f(1.175875602f) + stbi__f2f(-0.899976223f), stbi__f2f(1.175875602f)); __m128i rot1_1 = dct_const(stbi__f2f(1.175875602f), stbi__f2f(1.175875602f) + stbi__f2f(-2.562915447f)); __m128i rot2_0 = dct_const(stbi__f2f(-1.961570560f) + stbi__f2f( 0.298631336f), stbi__f2f(-1.961570560f)); __m128i rot2_1 = dct_const(stbi__f2f(-1.961570560f), stbi__f2f(-1.961570560f) + stbi__f2f( 3.072711026f)); __m128i rot3_0 = dct_const(stbi__f2f(-0.390180644f) + stbi__f2f( 2.053119869f), stbi__f2f(-0.390180644f)); __m128i rot3_1 = dct_const(stbi__f2f(-0.390180644f), stbi__f2f(-0.390180644f) + stbi__f2f( 1.501321110f)); // rounding biases in column/row passes, see stbi__idct_block for explanation. __m128i bias_0 = _mm_set1_epi32(512); __m128i bias_1 = _mm_set1_epi32(65536 + (128<<17)); // load row0 = _mm_load_si128((const __m128i *) (data + 0*8)); row1 = _mm_load_si128((const __m128i *) (data + 1*8)); row2 = _mm_load_si128((const __m128i *) (data + 2*8)); row3 = _mm_load_si128((const __m128i *) (data + 3*8)); row4 = _mm_load_si128((const __m128i *) (data + 4*8)); row5 = _mm_load_si128((const __m128i *) (data + 5*8)); row6 = _mm_load_si128((const __m128i *) (data + 6*8)); row7 = _mm_load_si128((const __m128i *) (data + 7*8)); // column pass dct_pass(bias_0, 10); { // 16bit 8x8 transpose pass 1 dct_interleave16(row0, row4); dct_interleave16(row1, row5); dct_interleave16(row2, row6); dct_interleave16(row3, row7); // transpose pass 2 dct_interleave16(row0, row2); dct_interleave16(row1, row3); dct_interleave16(row4, row6); dct_interleave16(row5, row7); // transpose pass 3 dct_interleave16(row0, row1); dct_interleave16(row2, row3); dct_interleave16(row4, row5); dct_interleave16(row6, row7); } // row pass dct_pass(bias_1, 17); { // pack __m128i p0 = _mm_packus_epi16(row0, row1); // a0a1a2a3...a7b0b1b2b3...b7 __m128i p1 = _mm_packus_epi16(row2, row3); __m128i p2 = _mm_packus_epi16(row4, row5); __m128i p3 = _mm_packus_epi16(row6, row7); // 8bit 8x8 transpose pass 1 dct_interleave8(p0, p2); // a0e0a1e1... dct_interleave8(p1, p3); // c0g0c1g1... // transpose pass 2 dct_interleave8(p0, p1); // a0c0e0g0... dct_interleave8(p2, p3); // b0d0f0h0... // transpose pass 3 dct_interleave8(p0, p2); // a0b0c0d0... dct_interleave8(p1, p3); // a4b4c4d4... // store _mm_storel_epi64((__m128i *) out, p0); out += out_stride; _mm_storel_epi64((__m128i *) out, _mm_shuffle_epi32(p0, 0x4e)); out += out_stride; _mm_storel_epi64((__m128i *) out, p2); out += out_stride; _mm_storel_epi64((__m128i *) out, _mm_shuffle_epi32(p2, 0x4e)); out += out_stride; _mm_storel_epi64((__m128i *) out, p1); out += out_stride; _mm_storel_epi64((__m128i *) out, _mm_shuffle_epi32(p1, 0x4e)); out += out_stride; _mm_storel_epi64((__m128i *) out, p3); out += out_stride; _mm_storel_epi64((__m128i *) out, _mm_shuffle_epi32(p3, 0x4e)); } #undef dct_const #undef dct_rot #undef dct_widen #undef dct_wadd #undef dct_wsub #undef dct_bfly32o #undef dct_interleave8 #undef dct_interleave16 #undef dct_pass } #endif // STBI_SSE2 #ifdef STBI_NEON // NEON integer IDCT. should produce bit-identical // results to the generic C version. static void stbi__idct_simd(stbi_uc *out, int out_stride, short data[64]) { int16x8_t row0, row1, row2, row3, row4, row5, row6, row7; int16x4_t rot0_0 = vdup_n_s16(stbi__f2f(0.5411961f)); int16x4_t rot0_1 = vdup_n_s16(stbi__f2f(-1.847759065f)); int16x4_t rot0_2 = vdup_n_s16(stbi__f2f( 0.765366865f)); int16x4_t rot1_0 = vdup_n_s16(stbi__f2f( 1.175875602f)); int16x4_t rot1_1 = vdup_n_s16(stbi__f2f(-0.899976223f)); int16x4_t rot1_2 = vdup_n_s16(stbi__f2f(-2.562915447f)); int16x4_t rot2_0 = vdup_n_s16(stbi__f2f(-1.961570560f)); int16x4_t rot2_1 = vdup_n_s16(stbi__f2f(-0.390180644f)); int16x4_t rot3_0 = vdup_n_s16(stbi__f2f( 0.298631336f)); int16x4_t rot3_1 = vdup_n_s16(stbi__f2f( 2.053119869f)); int16x4_t rot3_2 = vdup_n_s16(stbi__f2f( 3.072711026f)); int16x4_t rot3_3 = vdup_n_s16(stbi__f2f( 1.501321110f)); #define dct_long_mul(out, inq, coeff) \ int32x4_t out##_l = vmull_s16(vget_low_s16(inq), coeff); \ int32x4_t out##_h = vmull_s16(vget_high_s16(inq), coeff) #define dct_long_mac(out, acc, inq, coeff) \ int32x4_t out##_l = vmlal_s16(acc##_l, vget_low_s16(inq), coeff); \ int32x4_t out##_h = vmlal_s16(acc##_h, vget_high_s16(inq), coeff) #define dct_widen(out, inq) \ int32x4_t out##_l = vshll_n_s16(vget_low_s16(inq), 12); \ int32x4_t out##_h = vshll_n_s16(vget_high_s16(inq), 12) // wide add #define dct_wadd(out, a, b) \ int32x4_t out##_l = vaddq_s32(a##_l, b##_l); \ int32x4_t out##_h = vaddq_s32(a##_h, b##_h) // wide sub #define dct_wsub(out, a, b) \ int32x4_t out##_l = vsubq_s32(a##_l, b##_l); \ int32x4_t out##_h = vsubq_s32(a##_h, b##_h) // butterfly a/b, then shift using "shiftop" by "s" and pack #define dct_bfly32o(out0,out1, a,b,shiftop,s) \ { \ dct_wadd(sum, a, b); \ dct_wsub(dif, a, b); \ out0 = vcombine_s16(shiftop(sum_l, s), shiftop(sum_h, s)); \ out1 = vcombine_s16(shiftop(dif_l, s), shiftop(dif_h, s)); \ } #define dct_pass(shiftop, shift) \ { \ /* even part */ \ int16x8_t sum26 = vaddq_s16(row2, row6); \ dct_long_mul(p1e, sum26, rot0_0); \ dct_long_mac(t2e, p1e, row6, rot0_1); \ dct_long_mac(t3e, p1e, row2, rot0_2); \ int16x8_t sum04 = vaddq_s16(row0, row4); \ int16x8_t dif04 = vsubq_s16(row0, row4); \ dct_widen(t0e, sum04); \ dct_widen(t1e, dif04); \ dct_wadd(x0, t0e, t3e); \ dct_wsub(x3, t0e, t3e); \ dct_wadd(x1, t1e, t2e); \ dct_wsub(x2, t1e, t2e); \ /* odd part */ \ int16x8_t sum15 = vaddq_s16(row1, row5); \ int16x8_t sum17 = vaddq_s16(row1, row7); \ int16x8_t sum35 = vaddq_s16(row3, row5); \ int16x8_t sum37 = vaddq_s16(row3, row7); \ int16x8_t sumodd = vaddq_s16(sum17, sum35); \ dct_long_mul(p5o, sumodd, rot1_0); \ dct_long_mac(p1o, p5o, sum17, rot1_1); \ dct_long_mac(p2o, p5o, sum35, rot1_2); \ dct_long_mul(p3o, sum37, rot2_0); \ dct_long_mul(p4o, sum15, rot2_1); \ dct_wadd(sump13o, p1o, p3o); \ dct_wadd(sump24o, p2o, p4o); \ dct_wadd(sump23o, p2o, p3o); \ dct_wadd(sump14o, p1o, p4o); \ dct_long_mac(x4, sump13o, row7, rot3_0); \ dct_long_mac(x5, sump24o, row5, rot3_1); \ dct_long_mac(x6, sump23o, row3, rot3_2); \ dct_long_mac(x7, sump14o, row1, rot3_3); \ dct_bfly32o(row0,row7, x0,x7,shiftop,shift); \ dct_bfly32o(row1,row6, x1,x6,shiftop,shift); \ dct_bfly32o(row2,row5, x2,x5,shiftop,shift); \ dct_bfly32o(row3,row4, x3,x4,shiftop,shift); \ } // load row0 = vld1q_s16(data + 0*8); row1 = vld1q_s16(data + 1*8); row2 = vld1q_s16(data + 2*8); row3 = vld1q_s16(data + 3*8); row4 = vld1q_s16(data + 4*8); row5 = vld1q_s16(data + 5*8); row6 = vld1q_s16(data + 6*8); row7 = vld1q_s16(data + 7*8); // add DC bias row0 = vaddq_s16(row0, vsetq_lane_s16(1024, vdupq_n_s16(0), 0)); // column pass dct_pass(vrshrn_n_s32, 10); // 16bit 8x8 transpose { // these three map to a single VTRN.16, VTRN.32, and VSWP, respectively. // whether compilers actually get this is another story, sadly. #define dct_trn16(x, y) { int16x8x2_t t = vtrnq_s16(x, y); x = t.val[0]; y = t.val[1]; } #define dct_trn32(x, y) { int32x4x2_t t = vtrnq_s32(vreinterpretq_s32_s16(x), vreinterpretq_s32_s16(y)); x = vreinterpretq_s16_s32(t.val[0]); y = vreinterpretq_s16_s32(t.val[1]); } #define dct_trn64(x, y) { int16x8_t x0 = x; int16x8_t y0 = y; x = vcombine_s16(vget_low_s16(x0), vget_low_s16(y0)); y = vcombine_s16(vget_high_s16(x0), vget_high_s16(y0)); } // pass 1 dct_trn16(row0, row1); // a0b0a2b2a4b4a6b6 dct_trn16(row2, row3); dct_trn16(row4, row5); dct_trn16(row6, row7); // pass 2 dct_trn32(row0, row2); // a0b0c0d0a4b4c4d4 dct_trn32(row1, row3); dct_trn32(row4, row6); dct_trn32(row5, row7); // pass 3 dct_trn64(row0, row4); // a0b0c0d0e0f0g0h0 dct_trn64(row1, row5); dct_trn64(row2, row6); dct_trn64(row3, row7); #undef dct_trn16 #undef dct_trn32 #undef dct_trn64 } // row pass // vrshrn_n_s32 only supports shifts up to 16, we need // 17. so do a non-rounding shift of 16 first then follow // up with a rounding shift by 1. dct_pass(vshrn_n_s32, 16); { // pack and round uint8x8_t p0 = vqrshrun_n_s16(row0, 1); uint8x8_t p1 = vqrshrun_n_s16(row1, 1); uint8x8_t p2 = vqrshrun_n_s16(row2, 1); uint8x8_t p3 = vqrshrun_n_s16(row3, 1); uint8x8_t p4 = vqrshrun_n_s16(row4, 1); uint8x8_t p5 = vqrshrun_n_s16(row5, 1); uint8x8_t p6 = vqrshrun_n_s16(row6, 1); uint8x8_t p7 = vqrshrun_n_s16(row7, 1); // again, these can translate into one instruction, but often don't. #define dct_trn8_8(x, y) { uint8x8x2_t t = vtrn_u8(x, y); x = t.val[0]; y = t.val[1]; } #define dct_trn8_16(x, y) { uint16x4x2_t t = vtrn_u16(vreinterpret_u16_u8(x), vreinterpret_u16_u8(y)); x = vreinterpret_u8_u16(t.val[0]); y = vreinterpret_u8_u16(t.val[1]); } #define dct_trn8_32(x, y) { uint32x2x2_t t = vtrn_u32(vreinterpret_u32_u8(x), vreinterpret_u32_u8(y)); x = vreinterpret_u8_u32(t.val[0]); y = vreinterpret_u8_u32(t.val[1]); } // sadly can't use interleaved stores here since we only write // 8 bytes to each scan line! // 8x8 8-bit transpose pass 1 dct_trn8_8(p0, p1); dct_trn8_8(p2, p3); dct_trn8_8(p4, p5); dct_trn8_8(p6, p7); // pass 2 dct_trn8_16(p0, p2); dct_trn8_16(p1, p3); dct_trn8_16(p4, p6); dct_trn8_16(p5, p7); // pass 3 dct_trn8_32(p0, p4); dct_trn8_32(p1, p5); dct_trn8_32(p2, p6); dct_trn8_32(p3, p7); // store vst1_u8(out, p0); out += out_stride; vst1_u8(out, p1); out += out_stride; vst1_u8(out, p2); out += out_stride; vst1_u8(out, p3); out += out_stride; vst1_u8(out, p4); out += out_stride; vst1_u8(out, p5); out += out_stride; vst1_u8(out, p6); out += out_stride; vst1_u8(out, p7); #undef dct_trn8_8 #undef dct_trn8_16 #undef dct_trn8_32 } #undef dct_long_mul #undef dct_long_mac #undef dct_widen #undef dct_wadd #undef dct_wsub #undef dct_bfly32o #undef dct_pass } #endif // STBI_NEON #define STBI__MARKER_none 0xff // if there's a pending marker from the entropy stream, return that // otherwise, fetch from the stream and get a marker. if there's no // marker, return 0xff, which is never a valid marker value static stbi_uc stbi__get_marker(stbi__jpeg *j) { stbi_uc x; if (j->marker != STBI__MARKER_none) { x = j->marker; j->marker = STBI__MARKER_none; return x; } x = stbi__get8(j->s); if (x != 0xff) return STBI__MARKER_none; while (x == 0xff) x = stbi__get8(j->s); // consume repeated 0xff fill bytes return x; } // in each scan, we'll have scan_n components, and the order // of the components is specified by order[] #define STBI__RESTART(x) ((x) >= 0xd0 && (x) <= 0xd7) // after a restart interval, stbi__jpeg_reset the entropy decoder and // the dc prediction static void stbi__jpeg_reset(stbi__jpeg *j) { j->code_bits = 0; j->code_buffer = 0; j->nomore = 0; j->img_comp[0].dc_pred = j->img_comp[1].dc_pred = j->img_comp[2].dc_pred = j->img_comp[3].dc_pred = 0; j->marker = STBI__MARKER_none; j->todo = j->restart_interval ? j->restart_interval : 0x7fffffff; j->eob_run = 0; // no more than 1<<31 MCUs if no restart_interal? that's plenty safe, // since we don't even allow 1<<30 pixels } static int stbi__parse_entropy_coded_data(stbi__jpeg *z) { stbi__jpeg_reset(z); if (!z->progressive) { if (z->scan_n == 1) { int i,j; STBI_SIMD_ALIGN(short, data[64]); int n = z->order[0]; // non-interleaved data, we just need to process one block at a time, // in trivial scanline order // number of blocks to do just depends on how many actual "pixels" this // component has, independent of interleaved MCU blocking and such int w = (z->img_comp[n].x+7) >> 3; int h = (z->img_comp[n].y+7) >> 3; for (j=0; j < h; ++j) { for (i=0; i < w; ++i) { int ha = z->img_comp[n].ha; if (!stbi__jpeg_decode_block(z, data, z->huff_dc+z->img_comp[n].hd, z->huff_ac+ha, z->fast_ac[ha], n, z->dequant[z->img_comp[n].tq])) return 0; z->idct_block_kernel(z->img_comp[n].data+z->img_comp[n].w2*j*8+i*8, z->img_comp[n].w2, data); // every data block is an MCU, so countdown the restart interval if (--z->todo <= 0) { if (z->code_bits < 24) stbi__grow_buffer_unsafe(z); // if it's NOT a restart, then just bail, so we get corrupt data // rather than no data if (!STBI__RESTART(z->marker)) return 1; stbi__jpeg_reset(z); } } } return 1; } else { // interleaved int i,j,k,x,y; STBI_SIMD_ALIGN(short, data[64]); for (j=0; j < z->img_mcu_y; ++j) { for (i=0; i < z->img_mcu_x; ++i) { // scan an interleaved mcu... process scan_n components in order for (k=0; k < z->scan_n; ++k) { int n = z->order[k]; // scan out an mcu's worth of this component; that's just determined // by the basic H and V specified for the component for (y=0; y < z->img_comp[n].v; ++y) { for (x=0; x < z->img_comp[n].h; ++x) { int x2 = (i*z->img_comp[n].h + x)*8; int y2 = (j*z->img_comp[n].v + y)*8; int ha = z->img_comp[n].ha; if (!stbi__jpeg_decode_block(z, data, z->huff_dc+z->img_comp[n].hd, z->huff_ac+ha, z->fast_ac[ha], n, z->dequant[z->img_comp[n].tq])) return 0; z->idct_block_kernel(z->img_comp[n].data+z->img_comp[n].w2*y2+x2, z->img_comp[n].w2, data); } } } // after all interleaved components, that's an interleaved MCU, // so now count down the restart interval if (--z->todo <= 0) { if (z->code_bits < 24) stbi__grow_buffer_unsafe(z); if (!STBI__RESTART(z->marker)) return 1; stbi__jpeg_reset(z); } } } return 1; } } else { if (z->scan_n == 1) { int i,j; int n = z->order[0]; // non-interleaved data, we just need to process one block at a time, // in trivial scanline order // number of blocks to do just depends on how many actual "pixels" this // component has, independent of interleaved MCU blocking and such int w = (z->img_comp[n].x+7) >> 3; int h = (z->img_comp[n].y+7) >> 3; for (j=0; j < h; ++j) { for (i=0; i < w; ++i) { short *data = z->img_comp[n].coeff + 64 * (i + j * z->img_comp[n].coeff_w); if (z->spec_start == 0) { if (!stbi__jpeg_decode_block_prog_dc(z, data, &z->huff_dc[z->img_comp[n].hd], n)) return 0; } else { int ha = z->img_comp[n].ha; if (!stbi__jpeg_decode_block_prog_ac(z, data, &z->huff_ac[ha], z->fast_ac[ha])) return 0; } // every data block is an MCU, so countdown the restart interval if (--z->todo <= 0) { if (z->code_bits < 24) stbi__grow_buffer_unsafe(z); if (!STBI__RESTART(z->marker)) return 1; stbi__jpeg_reset(z); } } } return 1; } else { // interleaved int i,j,k,x,y; for (j=0; j < z->img_mcu_y; ++j) { for (i=0; i < z->img_mcu_x; ++i) { // scan an interleaved mcu... process scan_n components in order for (k=0; k < z->scan_n; ++k) { int n = z->order[k]; // scan out an mcu's worth of this component; that's just determined // by the basic H and V specified for the component for (y=0; y < z->img_comp[n].v; ++y) { for (x=0; x < z->img_comp[n].h; ++x) { int x2 = (i*z->img_comp[n].h + x); int y2 = (j*z->img_comp[n].v + y); short *data = z->img_comp[n].coeff + 64 * (x2 + y2 * z->img_comp[n].coeff_w); if (!stbi__jpeg_decode_block_prog_dc(z, data, &z->huff_dc[z->img_comp[n].hd], n)) return 0; } } } // after all interleaved components, that's an interleaved MCU, // so now count down the restart interval if (--z->todo <= 0) { if (z->code_bits < 24) stbi__grow_buffer_unsafe(z); if (!STBI__RESTART(z->marker)) return 1; stbi__jpeg_reset(z); } } } return 1; } } } static void stbi__jpeg_dequantize(short *data, stbi__uint16 *dequant) { int i; for (i=0; i < 64; ++i) data[i] *= dequant[i]; } static void stbi__jpeg_finish(stbi__jpeg *z) { if (z->progressive) { // dequantize and idct the data int i,j,n; for (n=0; n < z->s->img_n; ++n) { int w = (z->img_comp[n].x+7) >> 3; int h = (z->img_comp[n].y+7) >> 3; for (j=0; j < h; ++j) { for (i=0; i < w; ++i) { short *data = z->img_comp[n].coeff + 64 * (i + j * z->img_comp[n].coeff_w); stbi__jpeg_dequantize(data, z->dequant[z->img_comp[n].tq]); z->idct_block_kernel(z->img_comp[n].data+z->img_comp[n].w2*j*8+i*8, z->img_comp[n].w2, data); } } } } } static int stbi__process_marker(stbi__jpeg *z, int m) { int L; switch (m) { case STBI__MARKER_none: // no marker found return stbi__err("expected marker","Corrupt JPEG"); case 0xDD: // DRI - specify restart interval if (stbi__get16be(z->s) != 4) return stbi__err("bad DRI len","Corrupt JPEG"); z->restart_interval = stbi__get16be(z->s); return 1; case 0xDB: // DQT - define quantization table L = stbi__get16be(z->s)-2; while (L > 0) { int q = stbi__get8(z->s); int p = q >> 4, sixteen = (p != 0); int t = q & 15,i; if (p != 0 && p != 1) return stbi__err("bad DQT type","Corrupt JPEG"); if (t > 3) return stbi__err("bad DQT table","Corrupt JPEG"); for (i=0; i < 64; ++i) z->dequant[t][stbi__jpeg_dezigzag[i]] = (stbi__uint16)(sixteen ? stbi__get16be(z->s) : stbi__get8(z->s)); L -= (sixteen ? 129 : 65); } return L==0; case 0xC4: // DHT - define huffman table L = stbi__get16be(z->s)-2; while (L > 0) { stbi_uc *v; int sizes[16],i,n=0; int q = stbi__get8(z->s); int tc = q >> 4; int th = q & 15; if (tc > 1 || th > 3) return stbi__err("bad DHT header","Corrupt JPEG"); for (i=0; i < 16; ++i) { sizes[i] = stbi__get8(z->s); n += sizes[i]; } if(n > 256) return stbi__err("bad DHT header","Corrupt JPEG"); // Loop over i < n would write past end of values! L -= 17; if (tc == 0) { if (!stbi__build_huffman(z->huff_dc+th, sizes)) return 0; v = z->huff_dc[th].values; } else { if (!stbi__build_huffman(z->huff_ac+th, sizes)) return 0; v = z->huff_ac[th].values; } for (i=0; i < n; ++i) v[i] = stbi__get8(z->s); if (tc != 0) stbi__build_fast_ac(z->fast_ac[th], z->huff_ac + th); L -= n; } return L==0; } // check for comment block or APP blocks if ((m >= 0xE0 && m <= 0xEF) || m == 0xFE) { L = stbi__get16be(z->s); if (L < 2) { if (m == 0xFE) return stbi__err("bad COM len","Corrupt JPEG"); else return stbi__err("bad APP len","Corrupt JPEG"); } L -= 2; if (m == 0xE0 && L >= 5) { // JFIF APP0 segment static const unsigned char tag[5] = {'J','F','I','F','\0'}; int ok = 1; int i; for (i=0; i < 5; ++i) if (stbi__get8(z->s) != tag[i]) ok = 0; L -= 5; if (ok) z->jfif = 1; } else if (m == 0xEE && L >= 12) { // Adobe APP14 segment static const unsigned char tag[6] = {'A','d','o','b','e','\0'}; int ok = 1; int i; for (i=0; i < 6; ++i) if (stbi__get8(z->s) != tag[i]) ok = 0; L -= 6; if (ok) { stbi__get8(z->s); // version stbi__get16be(z->s); // flags0 stbi__get16be(z->s); // flags1 z->app14_color_transform = stbi__get8(z->s); // color transform L -= 6; } } stbi__skip(z->s, L); return 1; } return stbi__err("unknown marker","Corrupt JPEG"); } // after we see SOS static int stbi__process_scan_header(stbi__jpeg *z) { int i; int Ls = stbi__get16be(z->s); z->scan_n = stbi__get8(z->s); if (z->scan_n < 1 || z->scan_n > 4 || z->scan_n > (int) z->s->img_n) return stbi__err("bad SOS component count","Corrupt JPEG"); if (Ls != 6+2*z->scan_n) return stbi__err("bad SOS len","Corrupt JPEG"); for (i=0; i < z->scan_n; ++i) { int id = stbi__get8(z->s), which; int q = stbi__get8(z->s); for (which = 0; which < z->s->img_n; ++which) if (z->img_comp[which].id == id) break; if (which == z->s->img_n) return 0; // no match z->img_comp[which].hd = q >> 4; if (z->img_comp[which].hd > 3) return stbi__err("bad DC huff","Corrupt JPEG"); z->img_comp[which].ha = q & 15; if (z->img_comp[which].ha > 3) return stbi__err("bad AC huff","Corrupt JPEG"); z->order[i] = which; } { int aa; z->spec_start = stbi__get8(z->s); z->spec_end = stbi__get8(z->s); // should be 63, but might be 0 aa = stbi__get8(z->s); z->succ_high = (aa >> 4); z->succ_low = (aa & 15); if (z->progressive) { if (z->spec_start > 63 || z->spec_end > 63 || z->spec_start > z->spec_end || z->succ_high > 13 || z->succ_low > 13) return stbi__err("bad SOS", "Corrupt JPEG"); } else { if (z->spec_start != 0) return stbi__err("bad SOS","Corrupt JPEG"); if (z->succ_high != 0 || z->succ_low != 0) return stbi__err("bad SOS","Corrupt JPEG"); z->spec_end = 63; } } return 1; } static int stbi__free_jpeg_components(stbi__jpeg *z, int ncomp, int why) { int i; for (i=0; i < ncomp; ++i) { if (z->img_comp[i].raw_data) { STBI_FREE(z->img_comp[i].raw_data); z->img_comp[i].raw_data = NULL; z->img_comp[i].data = NULL; } if (z->img_comp[i].raw_coeff) { STBI_FREE(z->img_comp[i].raw_coeff); z->img_comp[i].raw_coeff = 0; z->img_comp[i].coeff = 0; } if (z->img_comp[i].linebuf) { STBI_FREE(z->img_comp[i].linebuf); z->img_comp[i].linebuf = NULL; } } return why; } static int stbi__process_frame_header(stbi__jpeg *z, int scan) { stbi__context *s = z->s; int Lf,p,i,q, h_max=1,v_max=1,c; Lf = stbi__get16be(s); if (Lf < 11) return stbi__err("bad SOF len","Corrupt JPEG"); // JPEG p = stbi__get8(s); if (p != 8) return stbi__err("only 8-bit","JPEG format not supported: 8-bit only"); // JPEG baseline s->img_y = stbi__get16be(s); if (s->img_y == 0) return stbi__err("no header height", "JPEG format not supported: delayed height"); // Legal, but we don't handle it--but neither does IJG s->img_x = stbi__get16be(s); if (s->img_x == 0) return stbi__err("0 width","Corrupt JPEG"); // JPEG requires if (s->img_y > STBI_MAX_DIMENSIONS) return stbi__err("too large","Very large image (corrupt?)"); if (s->img_x > STBI_MAX_DIMENSIONS) return stbi__err("too large","Very large image (corrupt?)"); c = stbi__get8(s); if (c != 3 && c != 1 && c != 4) return stbi__err("bad component count","Corrupt JPEG"); s->img_n = c; for (i=0; i < c; ++i) { z->img_comp[i].data = NULL; z->img_comp[i].linebuf = NULL; } if (Lf != 8+3*s->img_n) return stbi__err("bad SOF len","Corrupt JPEG"); z->rgb = 0; for (i=0; i < s->img_n; ++i) { static const unsigned char rgb[3] = { 'R', 'G', 'B' }; z->img_comp[i].id = stbi__get8(s); if (s->img_n == 3 && z->img_comp[i].id == rgb[i]) ++z->rgb; q = stbi__get8(s); z->img_comp[i].h = (q >> 4); if (!z->img_comp[i].h || z->img_comp[i].h > 4) return stbi__err("bad H","Corrupt JPEG"); z->img_comp[i].v = q & 15; if (!z->img_comp[i].v || z->img_comp[i].v > 4) return stbi__err("bad V","Corrupt JPEG"); z->img_comp[i].tq = stbi__get8(s); if (z->img_comp[i].tq > 3) return stbi__err("bad TQ","Corrupt JPEG"); } if (scan != STBI__SCAN_load) return 1; if (!stbi__mad3sizes_valid(s->img_x, s->img_y, s->img_n, 0)) return stbi__err("too large", "Image too large to decode"); for (i=0; i < s->img_n; ++i) { if (z->img_comp[i].h > h_max) h_max = z->img_comp[i].h; if (z->img_comp[i].v > v_max) v_max = z->img_comp[i].v; } // check that plane subsampling factors are integer ratios; our resamplers can't deal with fractional ratios // and I've never seen a non-corrupted JPEG file actually use them for (i=0; i < s->img_n; ++i) { if (h_max % z->img_comp[i].h != 0) return stbi__err("bad H","Corrupt JPEG"); if (v_max % z->img_comp[i].v != 0) return stbi__err("bad V","Corrupt JPEG"); } // compute interleaved mcu info z->img_h_max = h_max; z->img_v_max = v_max; z->img_mcu_w = h_max * 8; z->img_mcu_h = v_max * 8; // these sizes can't be more than 17 bits z->img_mcu_x = (s->img_x + z->img_mcu_w-1) / z->img_mcu_w; z->img_mcu_y = (s->img_y + z->img_mcu_h-1) / z->img_mcu_h; for (i=0; i < s->img_n; ++i) { // number of effective pixels (e.g. for non-interleaved MCU) z->img_comp[i].x = (s->img_x * z->img_comp[i].h + h_max-1) / h_max; z->img_comp[i].y = (s->img_y * z->img_comp[i].v + v_max-1) / v_max; // to simplify generation, we'll allocate enough memory to decode // the bogus oversized data from using interleaved MCUs and their // big blocks (e.g. a 16x16 iMCU on an image of width 33); we won't // discard the extra data until colorspace conversion // // img_mcu_x, img_mcu_y: <=17 bits; comp[i].h and .v are <=4 (checked earlier) // so these muls can't overflow with 32-bit ints (which we require) z->img_comp[i].w2 = z->img_mcu_x * z->img_comp[i].h * 8; z->img_comp[i].h2 = z->img_mcu_y * z->img_comp[i].v * 8; z->img_comp[i].coeff = 0; z->img_comp[i].raw_coeff = 0; z->img_comp[i].linebuf = NULL; z->img_comp[i].raw_data = stbi__malloc_mad2(z->img_comp[i].w2, z->img_comp[i].h2, 15); if (z->img_comp[i].raw_data == NULL) return stbi__free_jpeg_components(z, i+1, stbi__err("outofmem", "Out of memory")); // align blocks for idct using mmx/sse z->img_comp[i].data = (stbi_uc*) (((size_t) z->img_comp[i].raw_data + 15) & ~15); if (z->progressive) { // w2, h2 are multiples of 8 (see above) z->img_comp[i].coeff_w = z->img_comp[i].w2 / 8; z->img_comp[i].coeff_h = z->img_comp[i].h2 / 8; z->img_comp[i].raw_coeff = stbi__malloc_mad3(z->img_comp[i].w2, z->img_comp[i].h2, sizeof(short), 15); if (z->img_comp[i].raw_coeff == NULL) return stbi__free_jpeg_components(z, i+1, stbi__err("outofmem", "Out of memory")); z->img_comp[i].coeff = (short*) (((size_t) z->img_comp[i].raw_coeff + 15) & ~15); } } return 1; } // use comparisons since in some cases we handle more than one case (e.g. SOF) #define stbi__DNL(x) ((x) == 0xdc) #define stbi__SOI(x) ((x) == 0xd8) #define stbi__EOI(x) ((x) == 0xd9) #define stbi__SOF(x) ((x) == 0xc0 || (x) == 0xc1 || (x) == 0xc2) #define stbi__SOS(x) ((x) == 0xda) #define stbi__SOF_progressive(x) ((x) == 0xc2) static int stbi__decode_jpeg_header(stbi__jpeg *z, int scan) { int m; z->jfif = 0; z->app14_color_transform = -1; // valid values are 0,1,2 z->marker = STBI__MARKER_none; // initialize cached marker to empty m = stbi__get_marker(z); if (!stbi__SOI(m)) return stbi__err("no SOI","Corrupt JPEG"); if (scan == STBI__SCAN_type) return 1; m = stbi__get_marker(z); while (!stbi__SOF(m)) { if (!stbi__process_marker(z,m)) return 0; m = stbi__get_marker(z); while (m == STBI__MARKER_none) { // some files have extra padding after their blocks, so ok, we'll scan if (stbi__at_eof(z->s)) return stbi__err("no SOF", "Corrupt JPEG"); m = stbi__get_marker(z); } } z->progressive = stbi__SOF_progressive(m); if (!stbi__process_frame_header(z, scan)) return 0; return 1; } static stbi_uc stbi__skip_jpeg_junk_at_end(stbi__jpeg *j) { // some JPEGs have junk at end, skip over it but if we find what looks // like a valid marker, resume there while (!stbi__at_eof(j->s)) { stbi_uc x = stbi__get8(j->s); while (x == 0xff) { // might be a marker if (stbi__at_eof(j->s)) return STBI__MARKER_none; x = stbi__get8(j->s); if (x != 0x00 && x != 0xff) { // not a stuffed zero or lead-in to another marker, looks // like an actual marker, return it return x; } // stuffed zero has x=0 now which ends the loop, meaning we go // back to regular scan loop. // repeated 0xff keeps trying to read the next byte of the marker. } } return STBI__MARKER_none; } // decode image to YCbCr format static int stbi__decode_jpeg_image(stbi__jpeg *j) { int m; for (m = 0; m < 4; m++) { j->img_comp[m].raw_data = NULL; j->img_comp[m].raw_coeff = NULL; } j->restart_interval = 0; if (!stbi__decode_jpeg_header(j, STBI__SCAN_load)) return 0; m = stbi__get_marker(j); while (!stbi__EOI(m)) { if (stbi__SOS(m)) { if (!stbi__process_scan_header(j)) return 0; if (!stbi__parse_entropy_coded_data(j)) return 0; if (j->marker == STBI__MARKER_none ) { j->marker = stbi__skip_jpeg_junk_at_end(j); // if we reach eof without hitting a marker, stbi__get_marker() below will fail and we'll eventually return 0 } m = stbi__get_marker(j); if (STBI__RESTART(m)) m = stbi__get_marker(j); } else if (stbi__DNL(m)) { int Ld = stbi__get16be(j->s); stbi__uint32 NL = stbi__get16be(j->s); if (Ld != 4) return stbi__err("bad DNL len", "Corrupt JPEG"); if (NL != j->s->img_y) return stbi__err("bad DNL height", "Corrupt JPEG"); m = stbi__get_marker(j); } else { if (!stbi__process_marker(j, m)) return 1; m = stbi__get_marker(j); } } if (j->progressive) stbi__jpeg_finish(j); return 1; } // static jfif-centered resampling (across block boundaries) typedef stbi_uc *(*resample_row_func)(stbi_uc *out, stbi_uc *in0, stbi_uc *in1, int w, int hs); #define stbi__div4(x) ((stbi_uc) ((x) >> 2)) static stbi_uc *resample_row_1(stbi_uc *out, stbi_uc *in_near, stbi_uc *in_far, int w, int hs) { STBI_NOTUSED(out); STBI_NOTUSED(in_far); STBI_NOTUSED(w); STBI_NOTUSED(hs); return in_near; } static stbi_uc* stbi__resample_row_v_2(stbi_uc *out, stbi_uc *in_near, stbi_uc *in_far, int w, int hs) { // need to generate two samples vertically for every one in input int i; STBI_NOTUSED(hs); for (i=0; i < w; ++i) out[i] = stbi__div4(3*in_near[i] + in_far[i] + 2); return out; } static stbi_uc* stbi__resample_row_h_2(stbi_uc *out, stbi_uc *in_near, stbi_uc *in_far, int w, int hs) { // need to generate two samples horizontally for every one in input int i; stbi_uc *input = in_near; if (w == 1) { // if only one sample, can't do any interpolation out[0] = out[1] = input[0]; return out; } out[0] = input[0]; out[1] = stbi__div4(input[0]*3 + input[1] + 2); for (i=1; i < w-1; ++i) { int n = 3*input[i]+2; out[i*2+0] = stbi__div4(n+input[i-1]); out[i*2+1] = stbi__div4(n+input[i+1]); } out[i*2+0] = stbi__div4(input[w-2]*3 + input[w-1] + 2); out[i*2+1] = input[w-1]; STBI_NOTUSED(in_far); STBI_NOTUSED(hs); return out; } #define stbi__div16(x) ((stbi_uc) ((x) >> 4)) static stbi_uc *stbi__resample_row_hv_2(stbi_uc *out, stbi_uc *in_near, stbi_uc *in_far, int w, int hs) { // need to generate 2x2 samples for every one in input int i,t0,t1; if (w == 1) { out[0] = out[1] = stbi__div4(3*in_near[0] + in_far[0] + 2); return out; } t1 = 3*in_near[0] + in_far[0]; out[0] = stbi__div4(t1+2); for (i=1; i < w; ++i) { t0 = t1; t1 = 3*in_near[i]+in_far[i]; out[i*2-1] = stbi__div16(3*t0 + t1 + 8); out[i*2 ] = stbi__div16(3*t1 + t0 + 8); } out[w*2-1] = stbi__div4(t1+2); STBI_NOTUSED(hs); return out; } #if defined(STBI_SSE2) || defined(STBI_NEON) static stbi_uc *stbi__resample_row_hv_2_simd(stbi_uc *out, stbi_uc *in_near, stbi_uc *in_far, int w, int hs) { // need to generate 2x2 samples for every one in input int i=0,t0,t1; if (w == 1) { out[0] = out[1] = stbi__div4(3*in_near[0] + in_far[0] + 2); return out; } t1 = 3*in_near[0] + in_far[0]; // process groups of 8 pixels for as long as we can. // note we can't handle the last pixel in a row in this loop // because we need to handle the filter boundary conditions. for (; i < ((w-1) & ~7); i += 8) { #if defined(STBI_SSE2) // load and perform the vertical filtering pass // this uses 3*x + y = 4*x + (y - x) __m128i zero = _mm_setzero_si128(); __m128i farb = _mm_loadl_epi64((__m128i *) (in_far + i)); __m128i nearb = _mm_loadl_epi64((__m128i *) (in_near + i)); __m128i farw = _mm_unpacklo_epi8(farb, zero); __m128i nearw = _mm_unpacklo_epi8(nearb, zero); __m128i diff = _mm_sub_epi16(farw, nearw); __m128i nears = _mm_slli_epi16(nearw, 2); __m128i curr = _mm_add_epi16(nears, diff); // current row // horizontal filter works the same based on shifted vers of current // row. "prev" is current row shifted right by 1 pixel; we need to // insert the previous pixel value (from t1). // "next" is current row shifted left by 1 pixel, with first pixel // of next block of 8 pixels added in. __m128i prv0 = _mm_slli_si128(curr, 2); __m128i nxt0 = _mm_srli_si128(curr, 2); __m128i prev = _mm_insert_epi16(prv0, t1, 0); __m128i next = _mm_insert_epi16(nxt0, 3*in_near[i+8] + in_far[i+8], 7); // horizontal filter, polyphase implementation since it's convenient: // even pixels = 3*cur + prev = cur*4 + (prev - cur) // odd pixels = 3*cur + next = cur*4 + (next - cur) // note the shared term. __m128i bias = _mm_set1_epi16(8); __m128i curs = _mm_slli_epi16(curr, 2); __m128i prvd = _mm_sub_epi16(prev, curr); __m128i nxtd = _mm_sub_epi16(next, curr); __m128i curb = _mm_add_epi16(curs, bias); __m128i even = _mm_add_epi16(prvd, curb); __m128i odd = _mm_add_epi16(nxtd, curb); // interleave even and odd pixels, then undo scaling. __m128i int0 = _mm_unpacklo_epi16(even, odd); __m128i int1 = _mm_unpackhi_epi16(even, odd); __m128i de0 = _mm_srli_epi16(int0, 4); __m128i de1 = _mm_srli_epi16(int1, 4); // pack and write output __m128i outv = _mm_packus_epi16(de0, de1); _mm_storeu_si128((__m128i *) (out + i*2), outv); #elif defined(STBI_NEON) // load and perform the vertical filtering pass // this uses 3*x + y = 4*x + (y - x) uint8x8_t farb = vld1_u8(in_far + i); uint8x8_t nearb = vld1_u8(in_near + i); int16x8_t diff = vreinterpretq_s16_u16(vsubl_u8(farb, nearb)); int16x8_t nears = vreinterpretq_s16_u16(vshll_n_u8(nearb, 2)); int16x8_t curr = vaddq_s16(nears, diff); // current row // horizontal filter works the same based on shifted vers of current // row. "prev" is current row shifted right by 1 pixel; we need to // insert the previous pixel value (from t1). // "next" is current row shifted left by 1 pixel, with first pixel // of next block of 8 pixels added in. int16x8_t prv0 = vextq_s16(curr, curr, 7); int16x8_t nxt0 = vextq_s16(curr, curr, 1); int16x8_t prev = vsetq_lane_s16(t1, prv0, 0); int16x8_t next = vsetq_lane_s16(3*in_near[i+8] + in_far[i+8], nxt0, 7); // horizontal filter, polyphase implementation since it's convenient: // even pixels = 3*cur + prev = cur*4 + (prev - cur) // odd pixels = 3*cur + next = cur*4 + (next - cur) // note the shared term. int16x8_t curs = vshlq_n_s16(curr, 2); int16x8_t prvd = vsubq_s16(prev, curr); int16x8_t nxtd = vsubq_s16(next, curr); int16x8_t even = vaddq_s16(curs, prvd); int16x8_t odd = vaddq_s16(curs, nxtd); // undo scaling and round, then store with even/odd phases interleaved uint8x8x2_t o; o.val[0] = vqrshrun_n_s16(even, 4); o.val[1] = vqrshrun_n_s16(odd, 4); vst2_u8(out + i*2, o); #endif // "previous" value for next iter t1 = 3*in_near[i+7] + in_far[i+7]; } t0 = t1; t1 = 3*in_near[i] + in_far[i]; out[i*2] = stbi__div16(3*t1 + t0 + 8); for (++i; i < w; ++i) { t0 = t1; t1 = 3*in_near[i]+in_far[i]; out[i*2-1] = stbi__div16(3*t0 + t1 + 8); out[i*2 ] = stbi__div16(3*t1 + t0 + 8); } out[w*2-1] = stbi__div4(t1+2); STBI_NOTUSED(hs); return out; } #endif static stbi_uc *stbi__resample_row_generic(stbi_uc *out, stbi_uc *in_near, stbi_uc *in_far, int w, int hs) { // resample with nearest-neighbor int i,j; STBI_NOTUSED(in_far); for (i=0; i < w; ++i) for (j=0; j < hs; ++j) out[i*hs+j] = in_near[i]; return out; } // this is a reduced-precision calculation of YCbCr-to-RGB introduced // to make sure the code produces the same results in both SIMD and scalar #define stbi__float2fixed(x) (((int) ((x) * 4096.0f + 0.5f)) << 8) static void stbi__YCbCr_to_RGB_row(stbi_uc *out, const stbi_uc *y, const stbi_uc *pcb, const stbi_uc *pcr, int count, int step) { int i; for (i=0; i < count; ++i) { int y_fixed = (y[i] << 20) + (1<<19); // rounding int r,g,b; int cr = pcr[i] - 128; int cb = pcb[i] - 128; r = y_fixed + cr* stbi__float2fixed(1.40200f); g = y_fixed + (cr*-stbi__float2fixed(0.71414f)) + ((cb*-stbi__float2fixed(0.34414f)) & 0xffff0000); b = y_fixed + cb* stbi__float2fixed(1.77200f); r >>= 20; g >>= 20; b >>= 20; if ((unsigned) r > 255) { if (r < 0) r = 0; else r = 255; } if ((unsigned) g > 255) { if (g < 0) g = 0; else g = 255; } if ((unsigned) b > 255) { if (b < 0) b = 0; else b = 255; } out[0] = (stbi_uc)r; out[1] = (stbi_uc)g; out[2] = (stbi_uc)b; out[3] = 255; out += step; } } #if defined(STBI_SSE2) || defined(STBI_NEON) static void stbi__YCbCr_to_RGB_simd(stbi_uc *out, stbi_uc const *y, stbi_uc const *pcb, stbi_uc const *pcr, int count, int step) { int i = 0; #ifdef STBI_SSE2 // step == 3 is pretty ugly on the final interleave, and i'm not convinced // it's useful in practice (you wouldn't use it for textures, for example). // so just accelerate step == 4 case. if (step == 4) { // this is a fairly straightforward implementation and not super-optimized. __m128i signflip = _mm_set1_epi8(-0x80); __m128i cr_const0 = _mm_set1_epi16( (short) ( 1.40200f*4096.0f+0.5f)); __m128i cr_const1 = _mm_set1_epi16( - (short) ( 0.71414f*4096.0f+0.5f)); __m128i cb_const0 = _mm_set1_epi16( - (short) ( 0.34414f*4096.0f+0.5f)); __m128i cb_const1 = _mm_set1_epi16( (short) ( 1.77200f*4096.0f+0.5f)); __m128i y_bias = _mm_set1_epi8((char) (unsigned char) 128); __m128i xw = _mm_set1_epi16(255); // alpha channel for (; i+7 < count; i += 8) { // load __m128i y_bytes = _mm_loadl_epi64((__m128i *) (y+i)); __m128i cr_bytes = _mm_loadl_epi64((__m128i *) (pcr+i)); __m128i cb_bytes = _mm_loadl_epi64((__m128i *) (pcb+i)); __m128i cr_biased = _mm_xor_si128(cr_bytes, signflip); // -128 __m128i cb_biased = _mm_xor_si128(cb_bytes, signflip); // -128 // unpack to short (and left-shift cr, cb by 8) __m128i yw = _mm_unpacklo_epi8(y_bias, y_bytes); __m128i crw = _mm_unpacklo_epi8(_mm_setzero_si128(), cr_biased); __m128i cbw = _mm_unpacklo_epi8(_mm_setzero_si128(), cb_biased); // color transform __m128i yws = _mm_srli_epi16(yw, 4); __m128i cr0 = _mm_mulhi_epi16(cr_const0, crw); __m128i cb0 = _mm_mulhi_epi16(cb_const0, cbw); __m128i cb1 = _mm_mulhi_epi16(cbw, cb_const1); __m128i cr1 = _mm_mulhi_epi16(crw, cr_const1); __m128i rws = _mm_add_epi16(cr0, yws); __m128i gwt = _mm_add_epi16(cb0, yws); __m128i bws = _mm_add_epi16(yws, cb1); __m128i gws = _mm_add_epi16(gwt, cr1); // descale __m128i rw = _mm_srai_epi16(rws, 4); __m128i bw = _mm_srai_epi16(bws, 4); __m128i gw = _mm_srai_epi16(gws, 4); // back to byte, set up for transpose __m128i brb = _mm_packus_epi16(rw, bw); __m128i gxb = _mm_packus_epi16(gw, xw); // transpose to interleave channels __m128i t0 = _mm_unpacklo_epi8(brb, gxb); __m128i t1 = _mm_unpackhi_epi8(brb, gxb); __m128i o0 = _mm_unpacklo_epi16(t0, t1); __m128i o1 = _mm_unpackhi_epi16(t0, t1); // store _mm_storeu_si128((__m128i *) (out + 0), o0); _mm_storeu_si128((__m128i *) (out + 16), o1); out += 32; } } #endif #ifdef STBI_NEON // in this version, step=3 support would be easy to add. but is there demand? if (step == 4) { // this is a fairly straightforward implementation and not super-optimized. uint8x8_t signflip = vdup_n_u8(0x80); int16x8_t cr_const0 = vdupq_n_s16( (short) ( 1.40200f*4096.0f+0.5f)); int16x8_t cr_const1 = vdupq_n_s16( - (short) ( 0.71414f*4096.0f+0.5f)); int16x8_t cb_const0 = vdupq_n_s16( - (short) ( 0.34414f*4096.0f+0.5f)); int16x8_t cb_const1 = vdupq_n_s16( (short) ( 1.77200f*4096.0f+0.5f)); for (; i+7 < count; i += 8) { // load uint8x8_t y_bytes = vld1_u8(y + i); uint8x8_t cr_bytes = vld1_u8(pcr + i); uint8x8_t cb_bytes = vld1_u8(pcb + i); int8x8_t cr_biased = vreinterpret_s8_u8(vsub_u8(cr_bytes, signflip)); int8x8_t cb_biased = vreinterpret_s8_u8(vsub_u8(cb_bytes, signflip)); // expand to s16 int16x8_t yws = vreinterpretq_s16_u16(vshll_n_u8(y_bytes, 4)); int16x8_t crw = vshll_n_s8(cr_biased, 7); int16x8_t cbw = vshll_n_s8(cb_biased, 7); // color transform int16x8_t cr0 = vqdmulhq_s16(crw, cr_const0); int16x8_t cb0 = vqdmulhq_s16(cbw, cb_const0); int16x8_t cr1 = vqdmulhq_s16(crw, cr_const1); int16x8_t cb1 = vqdmulhq_s16(cbw, cb_const1); int16x8_t rws = vaddq_s16(yws, cr0); int16x8_t gws = vaddq_s16(vaddq_s16(yws, cb0), cr1); int16x8_t bws = vaddq_s16(yws, cb1); // undo scaling, round, convert to byte uint8x8x4_t o; o.val[0] = vqrshrun_n_s16(rws, 4); o.val[1] = vqrshrun_n_s16(gws, 4); o.val[2] = vqrshrun_n_s16(bws, 4); o.val[3] = vdup_n_u8(255); // store, interleaving r/g/b/a vst4_u8(out, o); out += 8*4; } } #endif for (; i < count; ++i) { int y_fixed = (y[i] << 20) + (1<<19); // rounding int r,g,b; int cr = pcr[i] - 128; int cb = pcb[i] - 128; r = y_fixed + cr* stbi__float2fixed(1.40200f); g = y_fixed + cr*-stbi__float2fixed(0.71414f) + ((cb*-stbi__float2fixed(0.34414f)) & 0xffff0000); b = y_fixed + cb* stbi__float2fixed(1.77200f); r >>= 20; g >>= 20; b >>= 20; if ((unsigned) r > 255) { if (r < 0) r = 0; else r = 255; } if ((unsigned) g > 255) { if (g < 0) g = 0; else g = 255; } if ((unsigned) b > 255) { if (b < 0) b = 0; else b = 255; } out[0] = (stbi_uc)r; out[1] = (stbi_uc)g; out[2] = (stbi_uc)b; out[3] = 255; out += step; } } #endif // set up the kernels static void stbi__setup_jpeg(stbi__jpeg *j) { j->idct_block_kernel = stbi__idct_block; j->YCbCr_to_RGB_kernel = stbi__YCbCr_to_RGB_row; j->resample_row_hv_2_kernel = stbi__resample_row_hv_2; #ifdef STBI_SSE2 if (stbi__sse2_available()) { j->idct_block_kernel = stbi__idct_simd; j->YCbCr_to_RGB_kernel = stbi__YCbCr_to_RGB_simd; j->resample_row_hv_2_kernel = stbi__resample_row_hv_2_simd; } #endif #ifdef STBI_NEON j->idct_block_kernel = stbi__idct_simd; j->YCbCr_to_RGB_kernel = stbi__YCbCr_to_RGB_simd; j->resample_row_hv_2_kernel = stbi__resample_row_hv_2_simd; #endif } // clean up the temporary component buffers static void stbi__cleanup_jpeg(stbi__jpeg *j) { stbi__free_jpeg_components(j, j->s->img_n, 0); } typedef struct { resample_row_func resample; stbi_uc *line0,*line1; int hs,vs; // expansion factor in each axis int w_lores; // horizontal pixels pre-expansion int ystep; // how far through vertical expansion we are int ypos; // which pre-expansion row we're on } stbi__resample; // fast 0..255 * 0..255 => 0..255 rounded multiplication static stbi_uc stbi__blinn_8x8(stbi_uc x, stbi_uc y) { unsigned int t = x*y + 128; return (stbi_uc) ((t + (t >>8)) >> 8); } static stbi_uc *load_jpeg_image(stbi__jpeg *z, int *out_x, int *out_y, int *comp, int req_comp) { int n, decode_n, is_rgb; z->s->img_n = 0; // make stbi__cleanup_jpeg safe // validate req_comp if (req_comp < 0 || req_comp > 4) return stbi__errpuc("bad req_comp", "Internal error"); // load a jpeg image from whichever source, but leave in YCbCr format if (!stbi__decode_jpeg_image(z)) { stbi__cleanup_jpeg(z); return NULL; } // determine actual number of components to generate n = req_comp ? req_comp : z->s->img_n >= 3 ? 3 : 1; is_rgb = z->s->img_n == 3 && (z->rgb == 3 || (z->app14_color_transform == 0 && !z->jfif)); if (z->s->img_n == 3 && n < 3 && !is_rgb) decode_n = 1; else decode_n = z->s->img_n; // nothing to do if no components requested; check this now to avoid // accessing uninitialized coutput[0] later if (decode_n <= 0) { stbi__cleanup_jpeg(z); return NULL; } // resample and color-convert { int k; unsigned int i,j; stbi_uc *output; stbi_uc *coutput[4] = { NULL, NULL, NULL, NULL }; stbi__resample res_comp[4]; for (k=0; k < decode_n; ++k) { stbi__resample *r = &res_comp[k]; // allocate line buffer big enough for upsampling off the edges // with upsample factor of 4 z->img_comp[k].linebuf = (stbi_uc *) stbi__malloc(z->s->img_x + 3); if (!z->img_comp[k].linebuf) { stbi__cleanup_jpeg(z); return stbi__errpuc("outofmem", "Out of memory"); } r->hs = z->img_h_max / z->img_comp[k].h; r->vs = z->img_v_max / z->img_comp[k].v; r->ystep = r->vs >> 1; r->w_lores = (z->s->img_x + r->hs-1) / r->hs; r->ypos = 0; r->line0 = r->line1 = z->img_comp[k].data; if (r->hs == 1 && r->vs == 1) r->resample = resample_row_1; else if (r->hs == 1 && r->vs == 2) r->resample = stbi__resample_row_v_2; else if (r->hs == 2 && r->vs == 1) r->resample = stbi__resample_row_h_2; else if (r->hs == 2 && r->vs == 2) r->resample = z->resample_row_hv_2_kernel; else r->resample = stbi__resample_row_generic; } // can't error after this so, this is safe output = (stbi_uc *) stbi__malloc_mad3(n, z->s->img_x, z->s->img_y, 1); if (!output) { stbi__cleanup_jpeg(z); return stbi__errpuc("outofmem", "Out of memory"); } // now go ahead and resample for (j=0; j < z->s->img_y; ++j) { stbi_uc *out = output + n * z->s->img_x * j; for (k=0; k < decode_n; ++k) { stbi__resample *r = &res_comp[k]; int y_bot = r->ystep >= (r->vs >> 1); coutput[k] = r->resample(z->img_comp[k].linebuf, y_bot ? r->line1 : r->line0, y_bot ? r->line0 : r->line1, r->w_lores, r->hs); if (++r->ystep >= r->vs) { r->ystep = 0; r->line0 = r->line1; if (++r->ypos < z->img_comp[k].y) r->line1 += z->img_comp[k].w2; } } if (n >= 3) { stbi_uc *y = coutput[0]; if (z->s->img_n == 3) { if (is_rgb) { for (i=0; i < z->s->img_x; ++i) { out[0] = y[i]; out[1] = coutput[1][i]; out[2] = coutput[2][i]; out[3] = 255; out += n; } } else { z->YCbCr_to_RGB_kernel(out, y, coutput[1], coutput[2], z->s->img_x, n); } } else if (z->s->img_n == 4) { if (z->app14_color_transform == 0) { // CMYK for (i=0; i < z->s->img_x; ++i) { stbi_uc m = coutput[3][i]; out[0] = stbi__blinn_8x8(coutput[0][i], m); out[1] = stbi__blinn_8x8(coutput[1][i], m); out[2] = stbi__blinn_8x8(coutput[2][i], m); out[3] = 255; out += n; } } else if (z->app14_color_transform == 2) { // YCCK z->YCbCr_to_RGB_kernel(out, y, coutput[1], coutput[2], z->s->img_x, n); for (i=0; i < z->s->img_x; ++i) { stbi_uc m = coutput[3][i]; out[0] = stbi__blinn_8x8(255 - out[0], m); out[1] = stbi__blinn_8x8(255 - out[1], m); out[2] = stbi__blinn_8x8(255 - out[2], m); out += n; } } else { // YCbCr + alpha? Ignore the fourth channel for now z->YCbCr_to_RGB_kernel(out, y, coutput[1], coutput[2], z->s->img_x, n); } } else for (i=0; i < z->s->img_x; ++i) { out[0] = out[1] = out[2] = y[i]; out[3] = 255; // not used if n==3 out += n; } } else { if (is_rgb) { if (n == 1) for (i=0; i < z->s->img_x; ++i) *out++ = stbi__compute_y(coutput[0][i], coutput[1][i], coutput[2][i]); else { for (i=0; i < z->s->img_x; ++i, out += 2) { out[0] = stbi__compute_y(coutput[0][i], coutput[1][i], coutput[2][i]); out[1] = 255; } } } else if (z->s->img_n == 4 && z->app14_color_transform == 0) { for (i=0; i < z->s->img_x; ++i) { stbi_uc m = coutput[3][i]; stbi_uc r = stbi__blinn_8x8(coutput[0][i], m); stbi_uc g = stbi__blinn_8x8(coutput[1][i], m); stbi_uc b = stbi__blinn_8x8(coutput[2][i], m); out[0] = stbi__compute_y(r, g, b); out[1] = 255; out += n; } } else if (z->s->img_n == 4 && z->app14_color_transform == 2) { for (i=0; i < z->s->img_x; ++i) { out[0] = stbi__blinn_8x8(255 - coutput[0][i], coutput[3][i]); out[1] = 255; out += n; } } else { stbi_uc *y = coutput[0]; if (n == 1) for (i=0; i < z->s->img_x; ++i) out[i] = y[i]; else for (i=0; i < z->s->img_x; ++i) { *out++ = y[i]; *out++ = 255; } } } } stbi__cleanup_jpeg(z); *out_x = z->s->img_x; *out_y = z->s->img_y; if (comp) *comp = z->s->img_n >= 3 ? 3 : 1; // report original components, not output return output; } } static void *stbi__jpeg_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri) { unsigned char* result; stbi__jpeg* j = (stbi__jpeg*) stbi__malloc(sizeof(stbi__jpeg)); if (!j) return stbi__errpuc("outofmem", "Out of memory"); memset(j, 0, sizeof(stbi__jpeg)); STBI_NOTUSED(ri); j->s = s; stbi__setup_jpeg(j); result = load_jpeg_image(j, x,y,comp,req_comp); STBI_FREE(j); return result; } static int stbi__jpeg_test(stbi__context *s) { int r; stbi__jpeg* j = (stbi__jpeg*)stbi__malloc(sizeof(stbi__jpeg)); if (!j) return stbi__err("outofmem", "Out of memory"); memset(j, 0, sizeof(stbi__jpeg)); j->s = s; stbi__setup_jpeg(j); r = stbi__decode_jpeg_header(j, STBI__SCAN_type); stbi__rewind(s); STBI_FREE(j); return r; } static int stbi__jpeg_info_raw(stbi__jpeg *j, int *x, int *y, int *comp) { if (!stbi__decode_jpeg_header(j, STBI__SCAN_header)) { stbi__rewind( j->s ); return 0; } if (x) *x = j->s->img_x; if (y) *y = j->s->img_y; if (comp) *comp = j->s->img_n >= 3 ? 3 : 1; return 1; } static int stbi__jpeg_info(stbi__context *s, int *x, int *y, int *comp) { int result; stbi__jpeg* j = (stbi__jpeg*) (stbi__malloc(sizeof(stbi__jpeg))); if (!j) return stbi__err("outofmem", "Out of memory"); memset(j, 0, sizeof(stbi__jpeg)); j->s = s; result = stbi__jpeg_info_raw(j, x, y, comp); STBI_FREE(j); return result; } #endif // public domain zlib decode v0.2 Sean Barrett 2006-11-18 // simple implementation // - all input must be provided in an upfront buffer // - all output is written to a single output buffer (can malloc/realloc) // performance // - fast huffman #ifndef STBI_NO_ZLIB // fast-way is faster to check than jpeg huffman, but slow way is slower #define STBI__ZFAST_BITS 9 // accelerate all cases in default tables #define STBI__ZFAST_MASK ((1 << STBI__ZFAST_BITS) - 1) #define STBI__ZNSYMS 288 // number of symbols in literal/length alphabet // zlib-style huffman encoding // (jpegs packs from left, zlib from right, so can't share code) typedef struct { stbi__uint16 fast[1 << STBI__ZFAST_BITS]; stbi__uint16 firstcode[16]; int maxcode[17]; stbi__uint16 firstsymbol[16]; stbi_uc size[STBI__ZNSYMS]; stbi__uint16 value[STBI__ZNSYMS]; } stbi__zhuffman; stbi_inline static int stbi__bitreverse16(int n) { n = ((n & 0xAAAA) >> 1) | ((n & 0x5555) << 1); n = ((n & 0xCCCC) >> 2) | ((n & 0x3333) << 2); n = ((n & 0xF0F0) >> 4) | ((n & 0x0F0F) << 4); n = ((n & 0xFF00) >> 8) | ((n & 0x00FF) << 8); return n; } stbi_inline static int stbi__bit_reverse(int v, int bits) { STBI_ASSERT(bits <= 16); // to bit reverse n bits, reverse 16 and shift // e.g. 11 bits, bit reverse and shift away 5 return stbi__bitreverse16(v) >> (16-bits); } static int stbi__zbuild_huffman(stbi__zhuffman *z, const stbi_uc *sizelist, int num) { int i,k=0; int code, next_code[16], sizes[17]; // DEFLATE spec for generating codes memset(sizes, 0, sizeof(sizes)); memset(z->fast, 0, sizeof(z->fast)); for (i=0; i < num; ++i) ++sizes[sizelist[i]]; sizes[0] = 0; for (i=1; i < 16; ++i) if (sizes[i] > (1 << i)) return stbi__err("bad sizes", "Corrupt PNG"); code = 0; for (i=1; i < 16; ++i) { next_code[i] = code; z->firstcode[i] = (stbi__uint16) code; z->firstsymbol[i] = (stbi__uint16) k; code = (code + sizes[i]); if (sizes[i]) if (code-1 >= (1 << i)) return stbi__err("bad codelengths","Corrupt PNG"); z->maxcode[i] = code << (16-i); // preshift for inner loop code <<= 1; k += sizes[i]; } z->maxcode[16] = 0x10000; // sentinel for (i=0; i < num; ++i) { int s = sizelist[i]; if (s) { int c = next_code[s] - z->firstcode[s] + z->firstsymbol[s]; stbi__uint16 fastv = (stbi__uint16) ((s << 9) | i); z->size [c] = (stbi_uc ) s; z->value[c] = (stbi__uint16) i; if (s <= STBI__ZFAST_BITS) { int j = stbi__bit_reverse(next_code[s],s); while (j < (1 << STBI__ZFAST_BITS)) { z->fast[j] = fastv; j += (1 << s); } } ++next_code[s]; } } return 1; } // zlib-from-memory implementation for PNG reading // because PNG allows splitting the zlib stream arbitrarily, // and it's annoying structurally to have PNG call ZLIB call PNG, // we require PNG read all the IDATs and combine them into a single // memory buffer typedef struct { stbi_uc *zbuffer, *zbuffer_end; int num_bits; int hit_zeof_once; stbi__uint32 code_buffer; char *zout; char *zout_start; char *zout_end; int z_expandable; stbi__zhuffman z_length, z_distance; } stbi__zbuf; stbi_inline static int stbi__zeof(stbi__zbuf *z) { return (z->zbuffer >= z->zbuffer_end); } stbi_inline static stbi_uc stbi__zget8(stbi__zbuf *z) { return stbi__zeof(z) ? 0 : *z->zbuffer++; } static void stbi__fill_bits(stbi__zbuf *z) { do { if (z->code_buffer >= (1U << z->num_bits)) { z->zbuffer = z->zbuffer_end; /* treat this as EOF so we fail. */ return; } z->code_buffer |= (unsigned int) stbi__zget8(z) << z->num_bits; z->num_bits += 8; } while (z->num_bits <= 24); } stbi_inline static unsigned int stbi__zreceive(stbi__zbuf *z, int n) { unsigned int k; if (z->num_bits < n) stbi__fill_bits(z); k = z->code_buffer & ((1 << n) - 1); z->code_buffer >>= n; z->num_bits -= n; return k; } static int stbi__zhuffman_decode_slowpath(stbi__zbuf *a, stbi__zhuffman *z) { int b,s,k; // not resolved by fast table, so compute it the slow way // use jpeg approach, which requires MSbits at top k = stbi__bit_reverse(a->code_buffer, 16); for (s=STBI__ZFAST_BITS+1; ; ++s) if (k < z->maxcode[s]) break; if (s >= 16) return -1; // invalid code! // code size is s, so: b = (k >> (16-s)) - z->firstcode[s] + z->firstsymbol[s]; if (b >= STBI__ZNSYMS) return -1; // some data was corrupt somewhere! if (z->size[b] != s) return -1; // was originally an assert, but report failure instead. a->code_buffer >>= s; a->num_bits -= s; return z->value[b]; } stbi_inline static int stbi__zhuffman_decode(stbi__zbuf *a, stbi__zhuffman *z) { int b,s; if (a->num_bits < 16) { if (stbi__zeof(a)) { if (!a->hit_zeof_once) { // This is the first time we hit eof, insert 16 extra padding btis // to allow us to keep going; if we actually consume any of them // though, that is invalid data. This is caught later. a->hit_zeof_once = 1; a->num_bits += 16; // add 16 implicit zero bits } else { // We already inserted our extra 16 padding bits and are again // out, this stream is actually prematurely terminated. return -1; } } else { stbi__fill_bits(a); } } b = z->fast[a->code_buffer & STBI__ZFAST_MASK]; if (b) { s = b >> 9; a->code_buffer >>= s; a->num_bits -= s; return b & 511; } return stbi__zhuffman_decode_slowpath(a, z); } static int stbi__zexpand(stbi__zbuf *z, char *zout, int n) // need to make room for n bytes { char *q; unsigned int cur, limit, old_limit; z->zout = zout; if (!z->z_expandable) return stbi__err("output buffer limit","Corrupt PNG"); cur = (unsigned int) (z->zout - z->zout_start); limit = old_limit = (unsigned) (z->zout_end - z->zout_start); if (UINT_MAX - cur < (unsigned) n) return stbi__err("outofmem", "Out of memory"); while (cur + n > limit) { if(limit > UINT_MAX / 2) return stbi__err("outofmem", "Out of memory"); limit *= 2; } q = (char *) STBI_REALLOC_SIZED(z->zout_start, old_limit, limit); STBI_NOTUSED(old_limit); if (q == NULL) return stbi__err("outofmem", "Out of memory"); z->zout_start = q; z->zout = q + cur; z->zout_end = q + limit; return 1; } static const int stbi__zlength_base[31] = { 3,4,5,6,7,8,9,10,11,13, 15,17,19,23,27,31,35,43,51,59, 67,83,99,115,131,163,195,227,258,0,0 }; static const int stbi__zlength_extra[31]= { 0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0 }; static const int stbi__zdist_base[32] = { 1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193, 257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0}; static const int stbi__zdist_extra[32] = { 0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13}; static int stbi__parse_huffman_block(stbi__zbuf *a) { char *zout = a->zout; for(;;) { int z = stbi__zhuffman_decode(a, &a->z_length); if (z < 256) { if (z < 0) return stbi__err("bad huffman code","Corrupt PNG"); // error in huffman codes if (zout >= a->zout_end) { if (!stbi__zexpand(a, zout, 1)) return 0; zout = a->zout; } *zout++ = (char) z; } else { stbi_uc *p; int len,dist; if (z == 256) { a->zout = zout; if (a->hit_zeof_once && a->num_bits < 16) { // The first time we hit zeof, we inserted 16 extra zero bits into our bit // buffer so the decoder can just do its speculative decoding. But if we // actually consumed any of those bits (which is the case when num_bits < 16), // the stream actually read past the end so it is malformed. return stbi__err("unexpected end","Corrupt PNG"); } return 1; } if (z >= 286) return stbi__err("bad huffman code","Corrupt PNG"); // per DEFLATE, length codes 286 and 287 must not appear in compressed data z -= 257; len = stbi__zlength_base[z]; if (stbi__zlength_extra[z]) len += stbi__zreceive(a, stbi__zlength_extra[z]); z = stbi__zhuffman_decode(a, &a->z_distance); if (z < 0 || z >= 30) return stbi__err("bad huffman code","Corrupt PNG"); // per DEFLATE, distance codes 30 and 31 must not appear in compressed data dist = stbi__zdist_base[z]; if (stbi__zdist_extra[z]) dist += stbi__zreceive(a, stbi__zdist_extra[z]); if (zout - a->zout_start < dist) return stbi__err("bad dist","Corrupt PNG"); if (len > a->zout_end - zout) { if (!stbi__zexpand(a, zout, len)) return 0; zout = a->zout; } p = (stbi_uc *) (zout - dist); if (dist == 1) { // run of one byte; common in images. stbi_uc v = *p; if (len) { do *zout++ = v; while (--len); } } else { if (len) { do *zout++ = *p++; while (--len); } } } } } static int stbi__compute_huffman_codes(stbi__zbuf *a) { static const stbi_uc length_dezigzag[19] = { 16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15 }; stbi__zhuffman z_codelength; stbi_uc lencodes[286+32+137];//padding for maximum single op stbi_uc codelength_sizes[19]; int i,n; int hlit = stbi__zreceive(a,5) + 257; int hdist = stbi__zreceive(a,5) + 1; int hclen = stbi__zreceive(a,4) + 4; int ntot = hlit + hdist; memset(codelength_sizes, 0, sizeof(codelength_sizes)); for (i=0; i < hclen; ++i) { int s = stbi__zreceive(a,3); codelength_sizes[length_dezigzag[i]] = (stbi_uc) s; } if (!stbi__zbuild_huffman(&z_codelength, codelength_sizes, 19)) return 0; n = 0; while (n < ntot) { int c = stbi__zhuffman_decode(a, &z_codelength); if (c < 0 || c >= 19) return stbi__err("bad codelengths", "Corrupt PNG"); if (c < 16) lencodes[n++] = (stbi_uc) c; else { stbi_uc fill = 0; if (c == 16) { c = stbi__zreceive(a,2)+3; if (n == 0) return stbi__err("bad codelengths", "Corrupt PNG"); fill = lencodes[n-1]; } else if (c == 17) { c = stbi__zreceive(a,3)+3; } else if (c == 18) { c = stbi__zreceive(a,7)+11; } else { return stbi__err("bad codelengths", "Corrupt PNG"); } if (ntot - n < c) return stbi__err("bad codelengths", "Corrupt PNG"); memset(lencodes+n, fill, c); n += c; } } if (n != ntot) return stbi__err("bad codelengths","Corrupt PNG"); if (!stbi__zbuild_huffman(&a->z_length, lencodes, hlit)) return 0; if (!stbi__zbuild_huffman(&a->z_distance, lencodes+hlit, hdist)) return 0; return 1; } static int stbi__parse_uncompressed_block(stbi__zbuf *a) { stbi_uc header[4]; int len,nlen,k; if (a->num_bits & 7) stbi__zreceive(a, a->num_bits & 7); // discard // drain the bit-packed data into header k = 0; while (a->num_bits > 0) { header[k++] = (stbi_uc) (a->code_buffer & 255); // suppress MSVC run-time check a->code_buffer >>= 8; a->num_bits -= 8; } if (a->num_bits < 0) return stbi__err("zlib corrupt","Corrupt PNG"); // now fill header the normal way while (k < 4) header[k++] = stbi__zget8(a); len = header[1] * 256 + header[0]; nlen = header[3] * 256 + header[2]; if (nlen != (len ^ 0xffff)) return stbi__err("zlib corrupt","Corrupt PNG"); if (a->zbuffer + len > a->zbuffer_end) return stbi__err("read past buffer","Corrupt PNG"); if (a->zout + len > a->zout_end) if (!stbi__zexpand(a, a->zout, len)) return 0; memcpy(a->zout, a->zbuffer, len); a->zbuffer += len; a->zout += len; return 1; } static int stbi__parse_zlib_header(stbi__zbuf *a) { int cmf = stbi__zget8(a); int cm = cmf & 15; /* int cinfo = cmf >> 4; */ int flg = stbi__zget8(a); if (stbi__zeof(a)) return stbi__err("bad zlib header","Corrupt PNG"); // zlib spec if ((cmf*256+flg) % 31 != 0) return stbi__err("bad zlib header","Corrupt PNG"); // zlib spec if (flg & 32) return stbi__err("no preset dict","Corrupt PNG"); // preset dictionary not allowed in png if (cm != 8) return stbi__err("bad compression","Corrupt PNG"); // DEFLATE required for png // window = 1 << (8 + cinfo)... but who cares, we fully buffer output return 1; } static const stbi_uc stbi__zdefault_length[STBI__ZNSYMS] = { 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, 7,7,7,7,7,7,7,7,8,8,8,8,8,8,8,8 }; static const stbi_uc stbi__zdefault_distance[32] = { 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5 }; /* Init algorithm: { int i; // use <= to match clearly with spec for (i=0; i <= 143; ++i) stbi__zdefault_length[i] = 8; for ( ; i <= 255; ++i) stbi__zdefault_length[i] = 9; for ( ; i <= 279; ++i) stbi__zdefault_length[i] = 7; for ( ; i <= 287; ++i) stbi__zdefault_length[i] = 8; for (i=0; i <= 31; ++i) stbi__zdefault_distance[i] = 5; } */ static int stbi__parse_zlib(stbi__zbuf *a, int parse_header) { int final, type; if (parse_header) if (!stbi__parse_zlib_header(a)) return 0; a->num_bits = 0; a->code_buffer = 0; a->hit_zeof_once = 0; do { final = stbi__zreceive(a,1); type = stbi__zreceive(a,2); if (type == 0) { if (!stbi__parse_uncompressed_block(a)) return 0; } else if (type == 3) { return 0; } else { if (type == 1) { // use fixed code lengths if (!stbi__zbuild_huffman(&a->z_length , stbi__zdefault_length , STBI__ZNSYMS)) return 0; if (!stbi__zbuild_huffman(&a->z_distance, stbi__zdefault_distance, 32)) return 0; } else { if (!stbi__compute_huffman_codes(a)) return 0; } if (!stbi__parse_huffman_block(a)) return 0; } } while (!final); return 1; } static int stbi__do_zlib(stbi__zbuf *a, char *obuf, int olen, int exp, int parse_header) { a->zout_start = obuf; a->zout = obuf; a->zout_end = obuf + olen; a->z_expandable = exp; return stbi__parse_zlib(a, parse_header); } STBIDEF char *stbi_zlib_decode_malloc_guesssize(const char *buffer, int len, int initial_size, int *outlen) { stbi__zbuf a; char *p = (char *) stbi__malloc(initial_size); if (p == NULL) return NULL; a.zbuffer = (stbi_uc *) buffer; a.zbuffer_end = (stbi_uc *) buffer + len; if (stbi__do_zlib(&a, p, initial_size, 1, 1)) { if (outlen) *outlen = (int) (a.zout - a.zout_start); return a.zout_start; } else { STBI_FREE(a.zout_start); return NULL; } } STBIDEF char *stbi_zlib_decode_malloc(char const *buffer, int len, int *outlen) { return stbi_zlib_decode_malloc_guesssize(buffer, len, 16384, outlen); } STBIDEF char *stbi_zlib_decode_malloc_guesssize_headerflag(const char *buffer, int len, int initial_size, int *outlen, int parse_header) { stbi__zbuf a; char *p = (char *) stbi__malloc(initial_size); if (p == NULL) return NULL; a.zbuffer = (stbi_uc *) buffer; a.zbuffer_end = (stbi_uc *) buffer + len; if (stbi__do_zlib(&a, p, initial_size, 1, parse_header)) { if (outlen) *outlen = (int) (a.zout - a.zout_start); return a.zout_start; } else { STBI_FREE(a.zout_start); return NULL; } } STBIDEF int stbi_zlib_decode_buffer(char *obuffer, int olen, char const *ibuffer, int ilen) { stbi__zbuf a; a.zbuffer = (stbi_uc *) ibuffer; a.zbuffer_end = (stbi_uc *) ibuffer + ilen; if (stbi__do_zlib(&a, obuffer, olen, 0, 1)) return (int) (a.zout - a.zout_start); else return -1; } STBIDEF char *stbi_zlib_decode_noheader_malloc(char const *buffer, int len, int *outlen) { stbi__zbuf a; char *p = (char *) stbi__malloc(16384); if (p == NULL) return NULL; a.zbuffer = (stbi_uc *) buffer; a.zbuffer_end = (stbi_uc *) buffer+len; if (stbi__do_zlib(&a, p, 16384, 1, 0)) { if (outlen) *outlen = (int) (a.zout - a.zout_start); return a.zout_start; } else { STBI_FREE(a.zout_start); return NULL; } } STBIDEF int stbi_zlib_decode_noheader_buffer(char *obuffer, int olen, const char *ibuffer, int ilen) { stbi__zbuf a; a.zbuffer = (stbi_uc *) ibuffer; a.zbuffer_end = (stbi_uc *) ibuffer + ilen; if (stbi__do_zlib(&a, obuffer, olen, 0, 0)) return (int) (a.zout - a.zout_start); else return -1; } #endif // public domain "baseline" PNG decoder v0.10 Sean Barrett 2006-11-18 // simple implementation // - only 8-bit samples // - no CRC checking // - allocates lots of intermediate memory // - avoids problem of streaming data between subsystems // - avoids explicit window management // performance // - uses stb_zlib, a PD zlib implementation with fast huffman decoding #ifndef STBI_NO_PNG typedef struct { stbi__uint32 length; stbi__uint32 type; } stbi__pngchunk; static stbi__pngchunk stbi__get_chunk_header(stbi__context *s) { stbi__pngchunk c; c.length = stbi__get32be(s); c.type = stbi__get32be(s); return c; } static int stbi__check_png_header(stbi__context *s) { static const stbi_uc png_sig[8] = { 137,80,78,71,13,10,26,10 }; int i; for (i=0; i < 8; ++i) if (stbi__get8(s) != png_sig[i]) return stbi__err("bad png sig","Not a PNG"); return 1; } typedef struct { stbi__context *s; stbi_uc *idata, *expanded, *out; int depth; } stbi__png; enum { STBI__F_none=0, STBI__F_sub=1, STBI__F_up=2, STBI__F_avg=3, STBI__F_paeth=4, // synthetic filter used for first scanline to avoid needing a dummy row of 0s STBI__F_avg_first }; static stbi_uc first_row_filter[5] = { STBI__F_none, STBI__F_sub, STBI__F_none, STBI__F_avg_first, STBI__F_sub // Paeth with b=c=0 turns out to be equivalent to sub }; static int stbi__paeth(int a, int b, int c) { // This formulation looks very different from the reference in the PNG spec, but is // actually equivalent and has favorable data dependencies and admits straightforward // generation of branch-free code, which helps performance significantly. int thresh = c*3 - (a + b); int lo = a < b ? a : b; int hi = a < b ? b : a; int t0 = (hi <= thresh) ? lo : c; int t1 = (thresh <= lo) ? hi : t0; return t1; } static const stbi_uc stbi__depth_scale_table[9] = { 0, 0xff, 0x55, 0, 0x11, 0,0,0, 0x01 }; // adds an extra all-255 alpha channel // dest == src is legal // img_n must be 1 or 3 static void stbi__create_png_alpha_expand8(stbi_uc *dest, stbi_uc *src, stbi__uint32 x, int img_n) { int i; // must process data backwards since we allow dest==src if (img_n == 1) { for (i=x-1; i >= 0; --i) { dest[i*2+1] = 255; dest[i*2+0] = src[i]; } } else { STBI_ASSERT(img_n == 3); for (i=x-1; i >= 0; --i) { dest[i*4+3] = 255; dest[i*4+2] = src[i*3+2]; dest[i*4+1] = src[i*3+1]; dest[i*4+0] = src[i*3+0]; } } } // create the png data from post-deflated data static int stbi__create_png_image_raw(stbi__png *a, stbi_uc *raw, stbi__uint32 raw_len, int out_n, stbi__uint32 x, stbi__uint32 y, int depth, int color) { int bytes = (depth == 16 ? 2 : 1); stbi__context *s = a->s; stbi__uint32 i,j,stride = x*out_n*bytes; stbi__uint32 img_len, img_width_bytes; stbi_uc *filter_buf; int all_ok = 1; int k; int img_n = s->img_n; // copy it into a local for later int output_bytes = out_n*bytes; int filter_bytes = img_n*bytes; int width = x; STBI_ASSERT(out_n == s->img_n || out_n == s->img_n+1); a->out = (stbi_uc *) stbi__malloc_mad3(x, y, output_bytes, 0); // extra bytes to write off the end into if (!a->out) return stbi__err("outofmem", "Out of memory"); // note: error exits here don't need to clean up a->out individually, // stbi__do_png always does on error. if (!stbi__mad3sizes_valid(img_n, x, depth, 7)) return stbi__err("too large", "Corrupt PNG"); img_width_bytes = (((img_n * x * depth) + 7) >> 3); if (!stbi__mad2sizes_valid(img_width_bytes, y, img_width_bytes)) return stbi__err("too large", "Corrupt PNG"); img_len = (img_width_bytes + 1) * y; // we used to check for exact match between raw_len and img_len on non-interlaced PNGs, // but issue #276 reported a PNG in the wild that had extra data at the end (all zeros), // so just check for raw_len < img_len always. if (raw_len < img_len) return stbi__err("not enough pixels","Corrupt PNG"); // Allocate two scan lines worth of filter workspace buffer. filter_buf = (stbi_uc *) stbi__malloc_mad2(img_width_bytes, 2, 0); if (!filter_buf) return stbi__err("outofmem", "Out of memory"); // Filtering for low-bit-depth images if (depth < 8) { filter_bytes = 1; width = img_width_bytes; } for (j=0; j < y; ++j) { // cur/prior filter buffers alternate stbi_uc *cur = filter_buf + (j & 1)*img_width_bytes; stbi_uc *prior = filter_buf + (~j & 1)*img_width_bytes; stbi_uc *dest = a->out + stride*j; int nk = width * filter_bytes; int filter = *raw++; // check filter type if (filter > 4) { all_ok = stbi__err("invalid filter","Corrupt PNG"); break; } // if first row, use special filter that doesn't sample previous row if (j == 0) filter = first_row_filter[filter]; // perform actual filtering switch (filter) { case STBI__F_none: memcpy(cur, raw, nk); break; case STBI__F_sub: memcpy(cur, raw, filter_bytes); for (k = filter_bytes; k < nk; ++k) cur[k] = STBI__BYTECAST(raw[k] + cur[k-filter_bytes]); break; case STBI__F_up: for (k = 0; k < nk; ++k) cur[k] = STBI__BYTECAST(raw[k] + prior[k]); break; case STBI__F_avg: for (k = 0; k < filter_bytes; ++k) cur[k] = STBI__BYTECAST(raw[k] + (prior[k]>>1)); for (k = filter_bytes; k < nk; ++k) cur[k] = STBI__BYTECAST(raw[k] + ((prior[k] + cur[k-filter_bytes])>>1)); break; case STBI__F_paeth: for (k = 0; k < filter_bytes; ++k) cur[k] = STBI__BYTECAST(raw[k] + prior[k]); // prior[k] == stbi__paeth(0,prior[k],0) for (k = filter_bytes; k < nk; ++k) cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k-filter_bytes], prior[k], prior[k-filter_bytes])); break; case STBI__F_avg_first: memcpy(cur, raw, filter_bytes); for (k = filter_bytes; k < nk; ++k) cur[k] = STBI__BYTECAST(raw[k] + (cur[k-filter_bytes] >> 1)); break; } raw += nk; // expand decoded bits in cur to dest, also adding an extra alpha channel if desired if (depth < 8) { stbi_uc scale = (color == 0) ? stbi__depth_scale_table[depth] : 1; // scale grayscale values to 0..255 range stbi_uc *in = cur; stbi_uc *out = dest; stbi_uc inb = 0; stbi__uint32 nsmp = x*img_n; // expand bits to bytes first if (depth == 4) { for (i=0; i < nsmp; ++i) { if ((i & 1) == 0) inb = *in++; *out++ = scale * (inb >> 4); inb <<= 4; } } else if (depth == 2) { for (i=0; i < nsmp; ++i) { if ((i & 3) == 0) inb = *in++; *out++ = scale * (inb >> 6); inb <<= 2; } } else { STBI_ASSERT(depth == 1); for (i=0; i < nsmp; ++i) { if ((i & 7) == 0) inb = *in++; *out++ = scale * (inb >> 7); inb <<= 1; } } // insert alpha=255 values if desired if (img_n != out_n) stbi__create_png_alpha_expand8(dest, dest, x, img_n); } else if (depth == 8) { if (img_n == out_n) memcpy(dest, cur, x*img_n); else stbi__create_png_alpha_expand8(dest, cur, x, img_n); } else if (depth == 16) { // convert the image data from big-endian to platform-native stbi__uint16 *dest16 = (stbi__uint16*)dest; stbi__uint32 nsmp = x*img_n; if (img_n == out_n) { for (i = 0; i < nsmp; ++i, ++dest16, cur += 2) *dest16 = (cur[0] << 8) | cur[1]; } else { STBI_ASSERT(img_n+1 == out_n); if (img_n == 1) { for (i = 0; i < x; ++i, dest16 += 2, cur += 2) { dest16[0] = (cur[0] << 8) | cur[1]; dest16[1] = 0xffff; } } else { STBI_ASSERT(img_n == 3); for (i = 0; i < x; ++i, dest16 += 4, cur += 6) { dest16[0] = (cur[0] << 8) | cur[1]; dest16[1] = (cur[2] << 8) | cur[3]; dest16[2] = (cur[4] << 8) | cur[5]; dest16[3] = 0xffff; } } } } } STBI_FREE(filter_buf); if (!all_ok) return 0; return 1; } static int stbi__create_png_image(stbi__png *a, stbi_uc *image_data, stbi__uint32 image_data_len, int out_n, int depth, int color, int interlaced) { int bytes = (depth == 16 ? 2 : 1); int out_bytes = out_n * bytes; stbi_uc *final; int p; if (!interlaced) return stbi__create_png_image_raw(a, image_data, image_data_len, out_n, a->s->img_x, a->s->img_y, depth, color); // de-interlacing final = (stbi_uc *) stbi__malloc_mad3(a->s->img_x, a->s->img_y, out_bytes, 0); if (!final) return stbi__err("outofmem", "Out of memory"); for (p=0; p < 7; ++p) { int xorig[] = { 0,4,0,2,0,1,0 }; int yorig[] = { 0,0,4,0,2,0,1 }; int xspc[] = { 8,8,4,4,2,2,1 }; int yspc[] = { 8,8,8,4,4,2,2 }; int i,j,x,y; // pass1_x[4] = 0, pass1_x[5] = 1, pass1_x[12] = 1 x = (a->s->img_x - xorig[p] + xspc[p]-1) / xspc[p]; y = (a->s->img_y - yorig[p] + yspc[p]-1) / yspc[p]; if (x && y) { stbi__uint32 img_len = ((((a->s->img_n * x * depth) + 7) >> 3) + 1) * y; if (!stbi__create_png_image_raw(a, image_data, image_data_len, out_n, x, y, depth, color)) { STBI_FREE(final); return 0; } for (j=0; j < y; ++j) { for (i=0; i < x; ++i) { int out_y = j*yspc[p]+yorig[p]; int out_x = i*xspc[p]+xorig[p]; memcpy(final + out_y*a->s->img_x*out_bytes + out_x*out_bytes, a->out + (j*x+i)*out_bytes, out_bytes); } } STBI_FREE(a->out); image_data += img_len; image_data_len -= img_len; } } a->out = final; return 1; } static int stbi__compute_transparency(stbi__png *z, stbi_uc tc[3], int out_n) { stbi__context *s = z->s; stbi__uint32 i, pixel_count = s->img_x * s->img_y; stbi_uc *p = z->out; // compute color-based transparency, assuming we've // already got 255 as the alpha value in the output STBI_ASSERT(out_n == 2 || out_n == 4); if (out_n == 2) { for (i=0; i < pixel_count; ++i) { p[1] = (p[0] == tc[0] ? 0 : 255); p += 2; } } else { for (i=0; i < pixel_count; ++i) { if (p[0] == tc[0] && p[1] == tc[1] && p[2] == tc[2]) p[3] = 0; p += 4; } } return 1; } static int stbi__compute_transparency16(stbi__png *z, stbi__uint16 tc[3], int out_n) { stbi__context *s = z->s; stbi__uint32 i, pixel_count = s->img_x * s->img_y; stbi__uint16 *p = (stbi__uint16*) z->out; // compute color-based transparency, assuming we've // already got 65535 as the alpha value in the output STBI_ASSERT(out_n == 2 || out_n == 4); if (out_n == 2) { for (i = 0; i < pixel_count; ++i) { p[1] = (p[0] == tc[0] ? 0 : 65535); p += 2; } } else { for (i = 0; i < pixel_count; ++i) { if (p[0] == tc[0] && p[1] == tc[1] && p[2] == tc[2]) p[3] = 0; p += 4; } } return 1; } static int stbi__expand_png_palette(stbi__png *a, stbi_uc *palette, int len, int pal_img_n) { stbi__uint32 i, pixel_count = a->s->img_x * a->s->img_y; stbi_uc *p, *temp_out, *orig = a->out; p = (stbi_uc *) stbi__malloc_mad2(pixel_count, pal_img_n, 0); if (p == NULL) return stbi__err("outofmem", "Out of memory"); // between here and free(out) below, exitting would leak temp_out = p; if (pal_img_n == 3) { for (i=0; i < pixel_count; ++i) { int n = orig[i]*4; p[0] = palette[n ]; p[1] = palette[n+1]; p[2] = palette[n+2]; p += 3; } } else { for (i=0; i < pixel_count; ++i) { int n = orig[i]*4; p[0] = palette[n ]; p[1] = palette[n+1]; p[2] = palette[n+2]; p[3] = palette[n+3]; p += 4; } } STBI_FREE(a->out); a->out = temp_out; STBI_NOTUSED(len); return 1; } static int stbi__unpremultiply_on_load_global = 0; static int stbi__de_iphone_flag_global = 0; STBIDEF void stbi_set_unpremultiply_on_load(int flag_true_if_should_unpremultiply) { stbi__unpremultiply_on_load_global = flag_true_if_should_unpremultiply; } STBIDEF void stbi_convert_iphone_png_to_rgb(int flag_true_if_should_convert) { stbi__de_iphone_flag_global = flag_true_if_should_convert; } #ifndef STBI_THREAD_LOCAL #define stbi__unpremultiply_on_load stbi__unpremultiply_on_load_global #define stbi__de_iphone_flag stbi__de_iphone_flag_global #else static STBI_THREAD_LOCAL int stbi__unpremultiply_on_load_local, stbi__unpremultiply_on_load_set; static STBI_THREAD_LOCAL int stbi__de_iphone_flag_local, stbi__de_iphone_flag_set; STBIDEF void stbi_set_unpremultiply_on_load_thread(int flag_true_if_should_unpremultiply) { stbi__unpremultiply_on_load_local = flag_true_if_should_unpremultiply; stbi__unpremultiply_on_load_set = 1; } STBIDEF void stbi_convert_iphone_png_to_rgb_thread(int flag_true_if_should_convert) { stbi__de_iphone_flag_local = flag_true_if_should_convert; stbi__de_iphone_flag_set = 1; } #define stbi__unpremultiply_on_load (stbi__unpremultiply_on_load_set \ ? stbi__unpremultiply_on_load_local \ : stbi__unpremultiply_on_load_global) #define stbi__de_iphone_flag (stbi__de_iphone_flag_set \ ? stbi__de_iphone_flag_local \ : stbi__de_iphone_flag_global) #endif // STBI_THREAD_LOCAL static void stbi__de_iphone(stbi__png *z) { stbi__context *s = z->s; stbi__uint32 i, pixel_count = s->img_x * s->img_y; stbi_uc *p = z->out; if (s->img_out_n == 3) { // convert bgr to rgb for (i=0; i < pixel_count; ++i) { stbi_uc t = p[0]; p[0] = p[2]; p[2] = t; p += 3; } } else { STBI_ASSERT(s->img_out_n == 4); if (stbi__unpremultiply_on_load) { // convert bgr to rgb and unpremultiply for (i=0; i < pixel_count; ++i) { stbi_uc a = p[3]; stbi_uc t = p[0]; if (a) { stbi_uc half = a / 2; p[0] = (p[2] * 255 + half) / a; p[1] = (p[1] * 255 + half) / a; p[2] = ( t * 255 + half) / a; } else { p[0] = p[2]; p[2] = t; } p += 4; } } else { // convert bgr to rgb for (i=0; i < pixel_count; ++i) { stbi_uc t = p[0]; p[0] = p[2]; p[2] = t; p += 4; } } } } #define STBI__PNG_TYPE(a,b,c,d) (((unsigned) (a) << 24) + ((unsigned) (b) << 16) + ((unsigned) (c) << 8) + (unsigned) (d)) static int stbi__parse_png_file(stbi__png *z, int scan, int req_comp) { stbi_uc palette[1024], pal_img_n=0; stbi_uc has_trans=0, tc[3]={0}; stbi__uint16 tc16[3]; stbi__uint32 ioff=0, idata_limit=0, i, pal_len=0; int first=1,k,interlace=0, color=0, is_iphone=0; stbi__context *s = z->s; z->expanded = NULL; z->idata = NULL; z->out = NULL; if (!stbi__check_png_header(s)) return 0; if (scan == STBI__SCAN_type) return 1; for (;;) { stbi__pngchunk c = stbi__get_chunk_header(s); switch (c.type) { case STBI__PNG_TYPE('C','g','B','I'): is_iphone = 1; stbi__skip(s, c.length); break; case STBI__PNG_TYPE('I','H','D','R'): { int comp,filter; if (!first) return stbi__err("multiple IHDR","Corrupt PNG"); first = 0; if (c.length != 13) return stbi__err("bad IHDR len","Corrupt PNG"); s->img_x = stbi__get32be(s); s->img_y = stbi__get32be(s); if (s->img_y > STBI_MAX_DIMENSIONS) return stbi__err("too large","Very large image (corrupt?)"); if (s->img_x > STBI_MAX_DIMENSIONS) return stbi__err("too large","Very large image (corrupt?)"); z->depth = stbi__get8(s); if (z->depth != 1 && z->depth != 2 && z->depth != 4 && z->depth != 8 && z->depth != 16) return stbi__err("1/2/4/8/16-bit only","PNG not supported: 1/2/4/8/16-bit only"); color = stbi__get8(s); if (color > 6) return stbi__err("bad ctype","Corrupt PNG"); if (color == 3 && z->depth == 16) return stbi__err("bad ctype","Corrupt PNG"); if (color == 3) pal_img_n = 3; else if (color & 1) return stbi__err("bad ctype","Corrupt PNG"); comp = stbi__get8(s); if (comp) return stbi__err("bad comp method","Corrupt PNG"); filter= stbi__get8(s); if (filter) return stbi__err("bad filter method","Corrupt PNG"); interlace = stbi__get8(s); if (interlace>1) return stbi__err("bad interlace method","Corrupt PNG"); if (!s->img_x || !s->img_y) return stbi__err("0-pixel image","Corrupt PNG"); if (!pal_img_n) { s->img_n = (color & 2 ? 3 : 1) + (color & 4 ? 1 : 0); if ((1 << 30) / s->img_x / s->img_n < s->img_y) return stbi__err("too large", "Image too large to decode"); } else { // if paletted, then pal_n is our final components, and // img_n is # components to decompress/filter. s->img_n = 1; if ((1 << 30) / s->img_x / 4 < s->img_y) return stbi__err("too large","Corrupt PNG"); } // even with SCAN_header, have to scan to see if we have a tRNS break; } case STBI__PNG_TYPE('P','L','T','E'): { if (first) return stbi__err("first not IHDR", "Corrupt PNG"); if (c.length > 256*3) return stbi__err("invalid PLTE","Corrupt PNG"); pal_len = c.length / 3; if (pal_len * 3 != c.length) return stbi__err("invalid PLTE","Corrupt PNG"); for (i=0; i < pal_len; ++i) { palette[i*4+0] = stbi__get8(s); palette[i*4+1] = stbi__get8(s); palette[i*4+2] = stbi__get8(s); palette[i*4+3] = 255; } break; } case STBI__PNG_TYPE('t','R','N','S'): { if (first) return stbi__err("first not IHDR", "Corrupt PNG"); if (z->idata) return stbi__err("tRNS after IDAT","Corrupt PNG"); if (pal_img_n) { if (scan == STBI__SCAN_header) { s->img_n = 4; return 1; } if (pal_len == 0) return stbi__err("tRNS before PLTE","Corrupt PNG"); if (c.length > pal_len) return stbi__err("bad tRNS len","Corrupt PNG"); pal_img_n = 4; for (i=0; i < c.length; ++i) palette[i*4+3] = stbi__get8(s); } else { if (!(s->img_n & 1)) return stbi__err("tRNS with alpha","Corrupt PNG"); if (c.length != (stbi__uint32) s->img_n*2) return stbi__err("bad tRNS len","Corrupt PNG"); has_trans = 1; // non-paletted with tRNS = constant alpha. if header-scanning, we can stop now. if (scan == STBI__SCAN_header) { ++s->img_n; return 1; } if (z->depth == 16) { for (k = 0; k < s->img_n && k < 3; ++k) // extra loop test to suppress false GCC warning tc16[k] = (stbi__uint16)stbi__get16be(s); // copy the values as-is } else { for (k = 0; k < s->img_n && k < 3; ++k) tc[k] = (stbi_uc)(stbi__get16be(s) & 255) * stbi__depth_scale_table[z->depth]; // non 8-bit images will be larger } } break; } case STBI__PNG_TYPE('I','D','A','T'): { if (first) return stbi__err("first not IHDR", "Corrupt PNG"); if (pal_img_n && !pal_len) return stbi__err("no PLTE","Corrupt PNG"); if (scan == STBI__SCAN_header) { // header scan definitely stops at first IDAT if (pal_img_n) s->img_n = pal_img_n; return 1; } if (c.length > (1u << 30)) return stbi__err("IDAT size limit", "IDAT section larger than 2^30 bytes"); if ((int)(ioff + c.length) < (int)ioff) return 0; if (ioff + c.length > idata_limit) { stbi__uint32 idata_limit_old = idata_limit; stbi_uc *p; if (idata_limit == 0) idata_limit = c.length > 4096 ? c.length : 4096; while (ioff + c.length > idata_limit) idata_limit *= 2; STBI_NOTUSED(idata_limit_old); p = (stbi_uc *) STBI_REALLOC_SIZED(z->idata, idata_limit_old, idata_limit); if (p == NULL) return stbi__err("outofmem", "Out of memory"); z->idata = p; } if (!stbi__getn(s, z->idata+ioff,c.length)) return stbi__err("outofdata","Corrupt PNG"); ioff += c.length; break; } case STBI__PNG_TYPE('I','E','N','D'): { stbi__uint32 raw_len, bpl; if (first) return stbi__err("first not IHDR", "Corrupt PNG"); if (scan != STBI__SCAN_load) return 1; if (z->idata == NULL) return stbi__err("no IDAT","Corrupt PNG"); // initial guess for decoded data size to avoid unnecessary reallocs bpl = (s->img_x * z->depth + 7) / 8; // bytes per line, per component raw_len = bpl * s->img_y * s->img_n /* pixels */ + s->img_y /* filter mode per row */; z->expanded = (stbi_uc *) stbi_zlib_decode_malloc_guesssize_headerflag((char *) z->idata, ioff, raw_len, (int *) &raw_len, !is_iphone); if (z->expanded == NULL) return 0; // zlib should set error STBI_FREE(z->idata); z->idata = NULL; if ((req_comp == s->img_n+1 && req_comp != 3 && !pal_img_n) || has_trans) s->img_out_n = s->img_n+1; else s->img_out_n = s->img_n; if (!stbi__create_png_image(z, z->expanded, raw_len, s->img_out_n, z->depth, color, interlace)) return 0; if (has_trans) { if (z->depth == 16) { if (!stbi__compute_transparency16(z, tc16, s->img_out_n)) return 0; } else { if (!stbi__compute_transparency(z, tc, s->img_out_n)) return 0; } } if (is_iphone && stbi__de_iphone_flag && s->img_out_n > 2) stbi__de_iphone(z); if (pal_img_n) { // pal_img_n == 3 or 4 s->img_n = pal_img_n; // record the actual colors we had s->img_out_n = pal_img_n; if (req_comp >= 3) s->img_out_n = req_comp; if (!stbi__expand_png_palette(z, palette, pal_len, s->img_out_n)) return 0; } else if (has_trans) { // non-paletted image with tRNS -> source image has (constant) alpha ++s->img_n; } STBI_FREE(z->expanded); z->expanded = NULL; // end of PNG chunk, read and skip CRC stbi__get32be(s); return 1; } default: // if critical, fail if (first) return stbi__err("first not IHDR", "Corrupt PNG"); if ((c.type & (1 << 29)) == 0) { #ifndef STBI_NO_FAILURE_STRINGS // not threadsafe static char invalid_chunk[] = "XXXX PNG chunk not known"; invalid_chunk[0] = STBI__BYTECAST(c.type >> 24); invalid_chunk[1] = STBI__BYTECAST(c.type >> 16); invalid_chunk[2] = STBI__BYTECAST(c.type >> 8); invalid_chunk[3] = STBI__BYTECAST(c.type >> 0); #endif return stbi__err(invalid_chunk, "PNG not supported: unknown PNG chunk type"); } stbi__skip(s, c.length); break; } // end of PNG chunk, read and skip CRC stbi__get32be(s); } } static void *stbi__do_png(stbi__png *p, int *x, int *y, int *n, int req_comp, stbi__result_info *ri) { void *result=NULL; if (req_comp < 0 || req_comp > 4) return stbi__errpuc("bad req_comp", "Internal error"); if (stbi__parse_png_file(p, STBI__SCAN_load, req_comp)) { if (p->depth <= 8) ri->bits_per_channel = 8; else if (p->depth == 16) ri->bits_per_channel = 16; else return stbi__errpuc("bad bits_per_channel", "PNG not supported: unsupported color depth"); result = p->out; p->out = NULL; if (req_comp && req_comp != p->s->img_out_n) { if (ri->bits_per_channel == 8) result = stbi__convert_format((unsigned char *) result, p->s->img_out_n, req_comp, p->s->img_x, p->s->img_y); else result = stbi__convert_format16((stbi__uint16 *) result, p->s->img_out_n, req_comp, p->s->img_x, p->s->img_y); p->s->img_out_n = req_comp; if (result == NULL) return result; } *x = p->s->img_x; *y = p->s->img_y; if (n) *n = p->s->img_n; } STBI_FREE(p->out); p->out = NULL; STBI_FREE(p->expanded); p->expanded = NULL; STBI_FREE(p->idata); p->idata = NULL; return result; } static void *stbi__png_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri) { stbi__png p; p.s = s; return stbi__do_png(&p, x,y,comp,req_comp, ri); } static int stbi__png_test(stbi__context *s) { int r; r = stbi__check_png_header(s); stbi__rewind(s); return r; } static int stbi__png_info_raw(stbi__png *p, int *x, int *y, int *comp) { if (!stbi__parse_png_file(p, STBI__SCAN_header, 0)) { stbi__rewind( p->s ); return 0; } if (x) *x = p->s->img_x; if (y) *y = p->s->img_y; if (comp) *comp = p->s->img_n; return 1; } static int stbi__png_info(stbi__context *s, int *x, int *y, int *comp) { stbi__png p; p.s = s; return stbi__png_info_raw(&p, x, y, comp); } static int stbi__png_is16(stbi__context *s) { stbi__png p; p.s = s; if (!stbi__png_info_raw(&p, NULL, NULL, NULL)) return 0; if (p.depth != 16) { stbi__rewind(p.s); return 0; } return 1; } #endif // Microsoft/Windows BMP image #ifndef STBI_NO_BMP static int stbi__bmp_test_raw(stbi__context *s) { int r; int sz; if (stbi__get8(s) != 'B') return 0; if (stbi__get8(s) != 'M') return 0; stbi__get32le(s); // discard filesize stbi__get16le(s); // discard reserved stbi__get16le(s); // discard reserved stbi__get32le(s); // discard data offset sz = stbi__get32le(s); r = (sz == 12 || sz == 40 || sz == 56 || sz == 108 || sz == 124); return r; } static int stbi__bmp_test(stbi__context *s) { int r = stbi__bmp_test_raw(s); stbi__rewind(s); return r; } // returns 0..31 for the highest set bit static int stbi__high_bit(unsigned int z) { int n=0; if (z == 0) return -1; if (z >= 0x10000) { n += 16; z >>= 16; } if (z >= 0x00100) { n += 8; z >>= 8; } if (z >= 0x00010) { n += 4; z >>= 4; } if (z >= 0x00004) { n += 2; z >>= 2; } if (z >= 0x00002) { n += 1;/* >>= 1;*/ } return n; } static int stbi__bitcount(unsigned int a) { a = (a & 0x55555555) + ((a >> 1) & 0x55555555); // max 2 a = (a & 0x33333333) + ((a >> 2) & 0x33333333); // max 4 a = (a + (a >> 4)) & 0x0f0f0f0f; // max 8 per 4, now 8 bits a = (a + (a >> 8)); // max 16 per 8 bits a = (a + (a >> 16)); // max 32 per 8 bits return a & 0xff; } // extract an arbitrarily-aligned N-bit value (N=bits) // from v, and then make it 8-bits long and fractionally // extend it to full full range. static int stbi__shiftsigned(unsigned int v, int shift, int bits) { static unsigned int mul_table[9] = { 0, 0xff/*0b11111111*/, 0x55/*0b01010101*/, 0x49/*0b01001001*/, 0x11/*0b00010001*/, 0x21/*0b00100001*/, 0x41/*0b01000001*/, 0x81/*0b10000001*/, 0x01/*0b00000001*/, }; static unsigned int shift_table[9] = { 0, 0,0,1,0,2,4,6,0, }; if (shift < 0) v <<= -shift; else v >>= shift; STBI_ASSERT(v < 256); v >>= (8-bits); STBI_ASSERT(bits >= 0 && bits <= 8); return (int) ((unsigned) v * mul_table[bits]) >> shift_table[bits]; } typedef struct { int bpp, offset, hsz; unsigned int mr,mg,mb,ma, all_a; int extra_read; } stbi__bmp_data; static int stbi__bmp_set_mask_defaults(stbi__bmp_data *info, int compress) { // BI_BITFIELDS specifies masks explicitly, don't override if (compress == 3) return 1; if (compress == 0) { if (info->bpp == 16) { info->mr = 31u << 10; info->mg = 31u << 5; info->mb = 31u << 0; } else if (info->bpp == 32) { info->mr = 0xffu << 16; info->mg = 0xffu << 8; info->mb = 0xffu << 0; info->ma = 0xffu << 24; info->all_a = 0; // if all_a is 0 at end, then we loaded alpha channel but it was all 0 } else { // otherwise, use defaults, which is all-0 info->mr = info->mg = info->mb = info->ma = 0; } return 1; } return 0; // error } static void *stbi__bmp_parse_header(stbi__context *s, stbi__bmp_data *info) { int hsz; if (stbi__get8(s) != 'B' || stbi__get8(s) != 'M') return stbi__errpuc("not BMP", "Corrupt BMP"); stbi__get32le(s); // discard filesize stbi__get16le(s); // discard reserved stbi__get16le(s); // discard reserved info->offset = stbi__get32le(s); info->hsz = hsz = stbi__get32le(s); info->mr = info->mg = info->mb = info->ma = 0; info->extra_read = 14; if (info->offset < 0) return stbi__errpuc("bad BMP", "bad BMP"); if (hsz != 12 && hsz != 40 && hsz != 56 && hsz != 108 && hsz != 124) return stbi__errpuc("unknown BMP", "BMP type not supported: unknown"); if (hsz == 12) { s->img_x = stbi__get16le(s); s->img_y = stbi__get16le(s); } else { s->img_x = stbi__get32le(s); s->img_y = stbi__get32le(s); } if (stbi__get16le(s) != 1) return stbi__errpuc("bad BMP", "bad BMP"); info->bpp = stbi__get16le(s); if (hsz != 12) { int compress = stbi__get32le(s); if (compress == 1 || compress == 2) return stbi__errpuc("BMP RLE", "BMP type not supported: RLE"); if (compress >= 4) return stbi__errpuc("BMP JPEG/PNG", "BMP type not supported: unsupported compression"); // this includes PNG/JPEG modes if (compress == 3 && info->bpp != 16 && info->bpp != 32) return stbi__errpuc("bad BMP", "bad BMP"); // bitfields requires 16 or 32 bits/pixel stbi__get32le(s); // discard sizeof stbi__get32le(s); // discard hres stbi__get32le(s); // discard vres stbi__get32le(s); // discard colorsused stbi__get32le(s); // discard max important if (hsz == 40 || hsz == 56) { if (hsz == 56) { stbi__get32le(s); stbi__get32le(s); stbi__get32le(s); stbi__get32le(s); } if (info->bpp == 16 || info->bpp == 32) { if (compress == 0) { stbi__bmp_set_mask_defaults(info, compress); } else if (compress == 3) { info->mr = stbi__get32le(s); info->mg = stbi__get32le(s); info->mb = stbi__get32le(s); info->extra_read += 12; // not documented, but generated by photoshop and handled by mspaint if (info->mr == info->mg && info->mg == info->mb) { // ?!?!? return stbi__errpuc("bad BMP", "bad BMP"); } } else return stbi__errpuc("bad BMP", "bad BMP"); } } else { // V4/V5 header int i; if (hsz != 108 && hsz != 124) return stbi__errpuc("bad BMP", "bad BMP"); info->mr = stbi__get32le(s); info->mg = stbi__get32le(s); info->mb = stbi__get32le(s); info->ma = stbi__get32le(s); if (compress != 3) // override mr/mg/mb unless in BI_BITFIELDS mode, as per docs stbi__bmp_set_mask_defaults(info, compress); stbi__get32le(s); // discard color space for (i=0; i < 12; ++i) stbi__get32le(s); // discard color space parameters if (hsz == 124) { stbi__get32le(s); // discard rendering intent stbi__get32le(s); // discard offset of profile data stbi__get32le(s); // discard size of profile data stbi__get32le(s); // discard reserved } } } return (void *) 1; } static void *stbi__bmp_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri) { stbi_uc *out; unsigned int mr=0,mg=0,mb=0,ma=0, all_a; stbi_uc pal[256][4]; int psize=0,i,j,width; int flip_vertically, pad, target; stbi__bmp_data info; STBI_NOTUSED(ri); info.all_a = 255; if (stbi__bmp_parse_header(s, &info) == NULL) return NULL; // error code already set flip_vertically = ((int) s->img_y) > 0; s->img_y = abs((int) s->img_y); if (s->img_y > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large","Very large image (corrupt?)"); if (s->img_x > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large","Very large image (corrupt?)"); mr = info.mr; mg = info.mg; mb = info.mb; ma = info.ma; all_a = info.all_a; if (info.hsz == 12) { if (info.bpp < 24) psize = (info.offset - info.extra_read - 24) / 3; } else { if (info.bpp < 16) psize = (info.offset - info.extra_read - info.hsz) >> 2; } if (psize == 0) { // accept some number of extra bytes after the header, but if the offset points either to before // the header ends or implies a large amount of extra data, reject the file as malformed int bytes_read_so_far = s->callback_already_read + (int)(s->img_buffer - s->img_buffer_original); int header_limit = 1024; // max we actually read is below 256 bytes currently. int extra_data_limit = 256*4; // what ordinarily goes here is a palette; 256 entries*4 bytes is its max size. if (bytes_read_so_far <= 0 || bytes_read_so_far > header_limit) { return stbi__errpuc("bad header", "Corrupt BMP"); } // we established that bytes_read_so_far is positive and sensible. // the first half of this test rejects offsets that are either too small positives, or // negative, and guarantees that info.offset >= bytes_read_so_far > 0. this in turn // ensures the number computed in the second half of the test can't overflow. if (info.offset < bytes_read_so_far || info.offset - bytes_read_so_far > extra_data_limit) { return stbi__errpuc("bad offset", "Corrupt BMP"); } else { stbi__skip(s, info.offset - bytes_read_so_far); } } if (info.bpp == 24 && ma == 0xff000000) s->img_n = 3; else s->img_n = ma ? 4 : 3; if (req_comp && req_comp >= 3) // we can directly decode 3 or 4 target = req_comp; else target = s->img_n; // if they want monochrome, we'll post-convert // sanity-check size if (!stbi__mad3sizes_valid(target, s->img_x, s->img_y, 0)) return stbi__errpuc("too large", "Corrupt BMP"); out = (stbi_uc *) stbi__malloc_mad3(target, s->img_x, s->img_y, 0); if (!out) return stbi__errpuc("outofmem", "Out of memory"); if (info.bpp < 16) { int z=0; if (psize == 0 || psize > 256) { STBI_FREE(out); return stbi__errpuc("invalid", "Corrupt BMP"); } for (i=0; i < psize; ++i) { pal[i][2] = stbi__get8(s); pal[i][1] = stbi__get8(s); pal[i][0] = stbi__get8(s); if (info.hsz != 12) stbi__get8(s); pal[i][3] = 255; } stbi__skip(s, info.offset - info.extra_read - info.hsz - psize * (info.hsz == 12 ? 3 : 4)); if (info.bpp == 1) width = (s->img_x + 7) >> 3; else if (info.bpp == 4) width = (s->img_x + 1) >> 1; else if (info.bpp == 8) width = s->img_x; else { STBI_FREE(out); return stbi__errpuc("bad bpp", "Corrupt BMP"); } pad = (-width)&3; if (info.bpp == 1) { for (j=0; j < (int) s->img_y; ++j) { int bit_offset = 7, v = stbi__get8(s); for (i=0; i < (int) s->img_x; ++i) { int color = (v>>bit_offset)&0x1; out[z++] = pal[color][0]; out[z++] = pal[color][1]; out[z++] = pal[color][2]; if (target == 4) out[z++] = 255; if (i+1 == (int) s->img_x) break; if((--bit_offset) < 0) { bit_offset = 7; v = stbi__get8(s); } } stbi__skip(s, pad); } } else { for (j=0; j < (int) s->img_y; ++j) { for (i=0; i < (int) s->img_x; i += 2) { int v=stbi__get8(s),v2=0; if (info.bpp == 4) { v2 = v & 15; v >>= 4; } out[z++] = pal[v][0]; out[z++] = pal[v][1]; out[z++] = pal[v][2]; if (target == 4) out[z++] = 255; if (i+1 == (int) s->img_x) break; v = (info.bpp == 8) ? stbi__get8(s) : v2; out[z++] = pal[v][0]; out[z++] = pal[v][1]; out[z++] = pal[v][2]; if (target == 4) out[z++] = 255; } stbi__skip(s, pad); } } } else { int rshift=0,gshift=0,bshift=0,ashift=0,rcount=0,gcount=0,bcount=0,acount=0; int z = 0; int easy=0; stbi__skip(s, info.offset - info.extra_read - info.hsz); if (info.bpp == 24) width = 3 * s->img_x; else if (info.bpp == 16) width = 2*s->img_x; else /* bpp = 32 and pad = 0 */ width=0; pad = (-width) & 3; if (info.bpp == 24) { easy = 1; } else if (info.bpp == 32) { if (mb == 0xff && mg == 0xff00 && mr == 0x00ff0000 && ma == 0xff000000) easy = 2; } if (!easy) { if (!mr || !mg || !mb) { STBI_FREE(out); return stbi__errpuc("bad masks", "Corrupt BMP"); } // right shift amt to put high bit in position #7 rshift = stbi__high_bit(mr)-7; rcount = stbi__bitcount(mr); gshift = stbi__high_bit(mg)-7; gcount = stbi__bitcount(mg); bshift = stbi__high_bit(mb)-7; bcount = stbi__bitcount(mb); ashift = stbi__high_bit(ma)-7; acount = stbi__bitcount(ma); if (rcount > 8 || gcount > 8 || bcount > 8 || acount > 8) { STBI_FREE(out); return stbi__errpuc("bad masks", "Corrupt BMP"); } } for (j=0; j < (int) s->img_y; ++j) { if (easy) { for (i=0; i < (int) s->img_x; ++i) { unsigned char a; out[z+2] = stbi__get8(s); out[z+1] = stbi__get8(s); out[z+0] = stbi__get8(s); z += 3; a = (easy == 2 ? stbi__get8(s) : 255); all_a |= a; if (target == 4) out[z++] = a; } } else { int bpp = info.bpp; for (i=0; i < (int) s->img_x; ++i) { stbi__uint32 v = (bpp == 16 ? (stbi__uint32) stbi__get16le(s) : stbi__get32le(s)); unsigned int a; out[z++] = STBI__BYTECAST(stbi__shiftsigned(v & mr, rshift, rcount)); out[z++] = STBI__BYTECAST(stbi__shiftsigned(v & mg, gshift, gcount)); out[z++] = STBI__BYTECAST(stbi__shiftsigned(v & mb, bshift, bcount)); a = (ma ? stbi__shiftsigned(v & ma, ashift, acount) : 255); all_a |= a; if (target == 4) out[z++] = STBI__BYTECAST(a); } } stbi__skip(s, pad); } } // if alpha channel is all 0s, replace with all 255s if (target == 4 && all_a == 0) for (i=4*s->img_x*s->img_y-1; i >= 0; i -= 4) out[i] = 255; if (flip_vertically) { stbi_uc t; for (j=0; j < (int) s->img_y>>1; ++j) { stbi_uc *p1 = out + j *s->img_x*target; stbi_uc *p2 = out + (s->img_y-1-j)*s->img_x*target; for (i=0; i < (int) s->img_x*target; ++i) { t = p1[i]; p1[i] = p2[i]; p2[i] = t; } } } if (req_comp && req_comp != target) { out = stbi__convert_format(out, target, req_comp, s->img_x, s->img_y); if (out == NULL) return out; // stbi__convert_format frees input on failure } *x = s->img_x; *y = s->img_y; if (comp) *comp = s->img_n; return out; } #endif // Targa Truevision - TGA // by Jonathan Dummer #ifndef STBI_NO_TGA // returns STBI_rgb or whatever, 0 on error static int stbi__tga_get_comp(int bits_per_pixel, int is_grey, int* is_rgb16) { // only RGB or RGBA (incl. 16bit) or grey allowed if (is_rgb16) *is_rgb16 = 0; switch(bits_per_pixel) { case 8: return STBI_grey; case 16: if(is_grey) return STBI_grey_alpha; // fallthrough case 15: if(is_rgb16) *is_rgb16 = 1; return STBI_rgb; case 24: // fallthrough case 32: return bits_per_pixel/8; default: return 0; } } static int stbi__tga_info(stbi__context *s, int *x, int *y, int *comp) { int tga_w, tga_h, tga_comp, tga_image_type, tga_bits_per_pixel, tga_colormap_bpp; int sz, tga_colormap_type; stbi__get8(s); // discard Offset tga_colormap_type = stbi__get8(s); // colormap type if( tga_colormap_type > 1 ) { stbi__rewind(s); return 0; // only RGB or indexed allowed } tga_image_type = stbi__get8(s); // image type if ( tga_colormap_type == 1 ) { // colormapped (paletted) image if (tga_image_type != 1 && tga_image_type != 9) { stbi__rewind(s); return 0; } stbi__skip(s,4); // skip index of first colormap entry and number of entries sz = stbi__get8(s); // check bits per palette color entry if ( (sz != 8) && (sz != 15) && (sz != 16) && (sz != 24) && (sz != 32) ) { stbi__rewind(s); return 0; } stbi__skip(s,4); // skip image x and y origin tga_colormap_bpp = sz; } else { // "normal" image w/o colormap - only RGB or grey allowed, +/- RLE if ( (tga_image_type != 2) && (tga_image_type != 3) && (tga_image_type != 10) && (tga_image_type != 11) ) { stbi__rewind(s); return 0; // only RGB or grey allowed, +/- RLE } stbi__skip(s,9); // skip colormap specification and image x/y origin tga_colormap_bpp = 0; } tga_w = stbi__get16le(s); if( tga_w < 1 ) { stbi__rewind(s); return 0; // test width } tga_h = stbi__get16le(s); if( tga_h < 1 ) { stbi__rewind(s); return 0; // test height } tga_bits_per_pixel = stbi__get8(s); // bits per pixel stbi__get8(s); // ignore alpha bits if (tga_colormap_bpp != 0) { if((tga_bits_per_pixel != 8) && (tga_bits_per_pixel != 16)) { // when using a colormap, tga_bits_per_pixel is the size of the indexes // I don't think anything but 8 or 16bit indexes makes sense stbi__rewind(s); return 0; } tga_comp = stbi__tga_get_comp(tga_colormap_bpp, 0, NULL); } else { tga_comp = stbi__tga_get_comp(tga_bits_per_pixel, (tga_image_type == 3) || (tga_image_type == 11), NULL); } if(!tga_comp) { stbi__rewind(s); return 0; } if (x) *x = tga_w; if (y) *y = tga_h; if (comp) *comp = tga_comp; return 1; // seems to have passed everything } static int stbi__tga_test(stbi__context *s) { int res = 0; int sz, tga_color_type; stbi__get8(s); // discard Offset tga_color_type = stbi__get8(s); // color type if ( tga_color_type > 1 ) goto errorEnd; // only RGB or indexed allowed sz = stbi__get8(s); // image type if ( tga_color_type == 1 ) { // colormapped (paletted) image if (sz != 1 && sz != 9) goto errorEnd; // colortype 1 demands image type 1 or 9 stbi__skip(s,4); // skip index of first colormap entry and number of entries sz = stbi__get8(s); // check bits per palette color entry if ( (sz != 8) && (sz != 15) && (sz != 16) && (sz != 24) && (sz != 32) ) goto errorEnd; stbi__skip(s,4); // skip image x and y origin } else { // "normal" image w/o colormap if ( (sz != 2) && (sz != 3) && (sz != 10) && (sz != 11) ) goto errorEnd; // only RGB or grey allowed, +/- RLE stbi__skip(s,9); // skip colormap specification and image x/y origin } if ( stbi__get16le(s) < 1 ) goto errorEnd; // test width if ( stbi__get16le(s) < 1 ) goto errorEnd; // test height sz = stbi__get8(s); // bits per pixel if ( (tga_color_type == 1) && (sz != 8) && (sz != 16) ) goto errorEnd; // for colormapped images, bpp is size of an index if ( (sz != 8) && (sz != 15) && (sz != 16) && (sz != 24) && (sz != 32) ) goto errorEnd; res = 1; // if we got this far, everything's good and we can return 1 instead of 0 errorEnd: stbi__rewind(s); return res; } // read 16bit value and convert to 24bit RGB static void stbi__tga_read_rgb16(stbi__context *s, stbi_uc* out) { stbi__uint16 px = (stbi__uint16)stbi__get16le(s); stbi__uint16 fiveBitMask = 31; // we have 3 channels with 5bits each int r = (px >> 10) & fiveBitMask; int g = (px >> 5) & fiveBitMask; int b = px & fiveBitMask; // Note that this saves the data in RGB(A) order, so it doesn't need to be swapped later out[0] = (stbi_uc)((r * 255)/31); out[1] = (stbi_uc)((g * 255)/31); out[2] = (stbi_uc)((b * 255)/31); // some people claim that the most significant bit might be used for alpha // (possibly if an alpha-bit is set in the "image descriptor byte") // but that only made 16bit test images completely translucent.. // so let's treat all 15 and 16bit TGAs as RGB with no alpha. } static void *stbi__tga_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri) { // read in the TGA header stuff int tga_offset = stbi__get8(s); int tga_indexed = stbi__get8(s); int tga_image_type = stbi__get8(s); int tga_is_RLE = 0; int tga_palette_start = stbi__get16le(s); int tga_palette_len = stbi__get16le(s); int tga_palette_bits = stbi__get8(s); int tga_x_origin = stbi__get16le(s); int tga_y_origin = stbi__get16le(s); int tga_width = stbi__get16le(s); int tga_height = stbi__get16le(s); int tga_bits_per_pixel = stbi__get8(s); int tga_comp, tga_rgb16=0; int tga_inverted = stbi__get8(s); // int tga_alpha_bits = tga_inverted & 15; // the 4 lowest bits - unused (useless?) // image data unsigned char *tga_data; unsigned char *tga_palette = NULL; int i, j; unsigned char raw_data[4] = {0}; int RLE_count = 0; int RLE_repeating = 0; int read_next_pixel = 1; STBI_NOTUSED(ri); STBI_NOTUSED(tga_x_origin); // @TODO STBI_NOTUSED(tga_y_origin); // @TODO if (tga_height > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large","Very large image (corrupt?)"); if (tga_width > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large","Very large image (corrupt?)"); // do a tiny bit of precessing if ( tga_image_type >= 8 ) { tga_image_type -= 8; tga_is_RLE = 1; } tga_inverted = 1 - ((tga_inverted >> 5) & 1); // If I'm paletted, then I'll use the number of bits from the palette if ( tga_indexed ) tga_comp = stbi__tga_get_comp(tga_palette_bits, 0, &tga_rgb16); else tga_comp = stbi__tga_get_comp(tga_bits_per_pixel, (tga_image_type == 3), &tga_rgb16); if(!tga_comp) // shouldn't really happen, stbi__tga_test() should have ensured basic consistency return stbi__errpuc("bad format", "Can't find out TGA pixelformat"); // tga info *x = tga_width; *y = tga_height; if (comp) *comp = tga_comp; if (!stbi__mad3sizes_valid(tga_width, tga_height, tga_comp, 0)) return stbi__errpuc("too large", "Corrupt TGA"); tga_data = (unsigned char*)stbi__malloc_mad3(tga_width, tga_height, tga_comp, 0); if (!tga_data) return stbi__errpuc("outofmem", "Out of memory"); // skip to the data's starting position (offset usually = 0) stbi__skip(s, tga_offset ); if ( !tga_indexed && !tga_is_RLE && !tga_rgb16 ) { for (i=0; i < tga_height; ++i) { int row = tga_inverted ? tga_height -i - 1 : i; stbi_uc *tga_row = tga_data + row*tga_width*tga_comp; stbi__getn(s, tga_row, tga_width * tga_comp); } } else { // do I need to load a palette? if ( tga_indexed) { if (tga_palette_len == 0) { /* you have to have at least one entry! */ STBI_FREE(tga_data); return stbi__errpuc("bad palette", "Corrupt TGA"); } // any data to skip? (offset usually = 0) stbi__skip(s, tga_palette_start ); // load the palette tga_palette = (unsigned char*)stbi__malloc_mad2(tga_palette_len, tga_comp, 0); if (!tga_palette) { STBI_FREE(tga_data); return stbi__errpuc("outofmem", "Out of memory"); } if (tga_rgb16) { stbi_uc *pal_entry = tga_palette; STBI_ASSERT(tga_comp == STBI_rgb); for (i=0; i < tga_palette_len; ++i) { stbi__tga_read_rgb16(s, pal_entry); pal_entry += tga_comp; } } else if (!stbi__getn(s, tga_palette, tga_palette_len * tga_comp)) { STBI_FREE(tga_data); STBI_FREE(tga_palette); return stbi__errpuc("bad palette", "Corrupt TGA"); } } // load the data for (i=0; i < tga_width * tga_height; ++i) { // if I'm in RLE mode, do I need to get a RLE stbi__pngchunk? if ( tga_is_RLE ) { if ( RLE_count == 0 ) { // yep, get the next byte as a RLE command int RLE_cmd = stbi__get8(s); RLE_count = 1 + (RLE_cmd & 127); RLE_repeating = RLE_cmd >> 7; read_next_pixel = 1; } else if ( !RLE_repeating ) { read_next_pixel = 1; } } else { read_next_pixel = 1; } // OK, if I need to read a pixel, do it now if ( read_next_pixel ) { // load however much data we did have if ( tga_indexed ) { // read in index, then perform the lookup int pal_idx = (tga_bits_per_pixel == 8) ? stbi__get8(s) : stbi__get16le(s); if ( pal_idx >= tga_palette_len ) { // invalid index pal_idx = 0; } pal_idx *= tga_comp; for (j = 0; j < tga_comp; ++j) { raw_data[j] = tga_palette[pal_idx+j]; } } else if(tga_rgb16) { STBI_ASSERT(tga_comp == STBI_rgb); stbi__tga_read_rgb16(s, raw_data); } else { // read in the data raw for (j = 0; j < tga_comp; ++j) { raw_data[j] = stbi__get8(s); } } // clear the reading flag for the next pixel read_next_pixel = 0; } // end of reading a pixel // copy data for (j = 0; j < tga_comp; ++j) tga_data[i*tga_comp+j] = raw_data[j]; // in case we're in RLE mode, keep counting down --RLE_count; } // do I need to invert the image? if ( tga_inverted ) { for (j = 0; j*2 < tga_height; ++j) { int index1 = j * tga_width * tga_comp; int index2 = (tga_height - 1 - j) * tga_width * tga_comp; for (i = tga_width * tga_comp; i > 0; --i) { unsigned char temp = tga_data[index1]; tga_data[index1] = tga_data[index2]; tga_data[index2] = temp; ++index1; ++index2; } } } // clear my palette, if I had one if ( tga_palette != NULL ) { STBI_FREE( tga_palette ); } } // swap RGB - if the source data was RGB16, it already is in the right order if (tga_comp >= 3 && !tga_rgb16) { unsigned char* tga_pixel = tga_data; for (i=0; i < tga_width * tga_height; ++i) { unsigned char temp = tga_pixel[0]; tga_pixel[0] = tga_pixel[2]; tga_pixel[2] = temp; tga_pixel += tga_comp; } } // convert to target component count if (req_comp && req_comp != tga_comp) tga_data = stbi__convert_format(tga_data, tga_comp, req_comp, tga_width, tga_height); // the things I do to get rid of an error message, and yet keep // Microsoft's C compilers happy... [8^( tga_palette_start = tga_palette_len = tga_palette_bits = tga_x_origin = tga_y_origin = 0; STBI_NOTUSED(tga_palette_start); // OK, done return tga_data; } #endif // ************************************************************************************************* // Photoshop PSD loader -- PD by Thatcher Ulrich, integration by Nicolas Schulz, tweaked by STB #ifndef STBI_NO_PSD static int stbi__psd_test(stbi__context *s) { int r = (stbi__get32be(s) == 0x38425053); stbi__rewind(s); return r; } static int stbi__psd_decode_rle(stbi__context *s, stbi_uc *p, int pixelCount) { int count, nleft, len; count = 0; while ((nleft = pixelCount - count) > 0) { len = stbi__get8(s); if (len == 128) { // No-op. } else if (len < 128) { // Copy next len+1 bytes literally. len++; if (len > nleft) return 0; // corrupt data count += len; while (len) { *p = stbi__get8(s); p += 4; len--; } } else if (len > 128) { stbi_uc val; // Next -len+1 bytes in the dest are replicated from next source byte. // (Interpret len as a negative 8-bit int.) len = 257 - len; if (len > nleft) return 0; // corrupt data val = stbi__get8(s); count += len; while (len) { *p = val; p += 4; len--; } } } return 1; } static void *stbi__psd_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri, int bpc) { int pixelCount; int channelCount, compression; int channel, i; int bitdepth; int w,h; stbi_uc *out; STBI_NOTUSED(ri); // Check identifier if (stbi__get32be(s) != 0x38425053) // "8BPS" return stbi__errpuc("not PSD", "Corrupt PSD image"); // Check file type version. if (stbi__get16be(s) != 1) return stbi__errpuc("wrong version", "Unsupported version of PSD image"); // Skip 6 reserved bytes. stbi__skip(s, 6 ); // Read the number of channels (R, G, B, A, etc). channelCount = stbi__get16be(s); if (channelCount < 0 || channelCount > 16) return stbi__errpuc("wrong channel count", "Unsupported number of channels in PSD image"); // Read the rows and columns of the image. h = stbi__get32be(s); w = stbi__get32be(s); if (h > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large","Very large image (corrupt?)"); if (w > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large","Very large image (corrupt?)"); // Make sure the depth is 8 bits. bitdepth = stbi__get16be(s); if (bitdepth != 8 && bitdepth != 16) return stbi__errpuc("unsupported bit depth", "PSD bit depth is not 8 or 16 bit"); // Make sure the color mode is RGB. // Valid options are: // 0: Bitmap // 1: Grayscale // 2: Indexed color // 3: RGB color // 4: CMYK color // 7: Multichannel // 8: Duotone // 9: Lab color if (stbi__get16be(s) != 3) return stbi__errpuc("wrong color format", "PSD is not in RGB color format"); // Skip the Mode Data. (It's the palette for indexed color; other info for other modes.) stbi__skip(s,stbi__get32be(s) ); // Skip the image resources. (resolution, pen tool paths, etc) stbi__skip(s, stbi__get32be(s) ); // Skip the reserved data. stbi__skip(s, stbi__get32be(s) ); // Find out if the data is compressed. // Known values: // 0: no compression // 1: RLE compressed compression = stbi__get16be(s); if (compression > 1) return stbi__errpuc("bad compression", "PSD has an unknown compression format"); // Check size if (!stbi__mad3sizes_valid(4, w, h, 0)) return stbi__errpuc("too large", "Corrupt PSD"); // Create the destination image. if (!compression && bitdepth == 16 && bpc == 16) { out = (stbi_uc *) stbi__malloc_mad3(8, w, h, 0); ri->bits_per_channel = 16; } else out = (stbi_uc *) stbi__malloc(4 * w*h); if (!out) return stbi__errpuc("outofmem", "Out of memory"); pixelCount = w*h; // Initialize the data to zero. //memset( out, 0, pixelCount * 4 ); // Finally, the image data. if (compression) { // RLE as used by .PSD and .TIFF // Loop until you get the number of unpacked bytes you are expecting: // Read the next source byte into n. // If n is between 0 and 127 inclusive, copy the next n+1 bytes literally. // Else if n is between -127 and -1 inclusive, copy the next byte -n+1 times. // Else if n is 128, noop. // Endloop // The RLE-compressed data is preceded by a 2-byte data count for each row in the data, // which we're going to just skip. stbi__skip(s, h * channelCount * 2 ); // Read the RLE data by channel. for (channel = 0; channel < 4; channel++) { stbi_uc *p; p = out+channel; if (channel >= channelCount) { // Fill this channel with default data. for (i = 0; i < pixelCount; i++, p += 4) *p = (channel == 3 ? 255 : 0); } else { // Read the RLE data. if (!stbi__psd_decode_rle(s, p, pixelCount)) { STBI_FREE(out); return stbi__errpuc("corrupt", "bad RLE data"); } } } } else { // We're at the raw image data. It's each channel in order (Red, Green, Blue, Alpha, ...) // where each channel consists of an 8-bit (or 16-bit) value for each pixel in the image. // Read the data by channel. for (channel = 0; channel < 4; channel++) { if (channel >= channelCount) { // Fill this channel with default data. if (bitdepth == 16 && bpc == 16) { stbi__uint16 *q = ((stbi__uint16 *) out) + channel; stbi__uint16 val = channel == 3 ? 65535 : 0; for (i = 0; i < pixelCount; i++, q += 4) *q = val; } else { stbi_uc *p = out+channel; stbi_uc val = channel == 3 ? 255 : 0; for (i = 0; i < pixelCount; i++, p += 4) *p = val; } } else { if (ri->bits_per_channel == 16) { // output bpc stbi__uint16 *q = ((stbi__uint16 *) out) + channel; for (i = 0; i < pixelCount; i++, q += 4) *q = (stbi__uint16) stbi__get16be(s); } else { stbi_uc *p = out+channel; if (bitdepth == 16) { // input bpc for (i = 0; i < pixelCount; i++, p += 4) *p = (stbi_uc) (stbi__get16be(s) >> 8); } else { for (i = 0; i < pixelCount; i++, p += 4) *p = stbi__get8(s); } } } } } // remove weird white matte from PSD if (channelCount >= 4) { if (ri->bits_per_channel == 16) { for (i=0; i < w*h; ++i) { stbi__uint16 *pixel = (stbi__uint16 *) out + 4*i; if (pixel[3] != 0 && pixel[3] != 65535) { float a = pixel[3] / 65535.0f; float ra = 1.0f / a; float inv_a = 65535.0f * (1 - ra); pixel[0] = (stbi__uint16) (pixel[0]*ra + inv_a); pixel[1] = (stbi__uint16) (pixel[1]*ra + inv_a); pixel[2] = (stbi__uint16) (pixel[2]*ra + inv_a); } } } else { for (i=0; i < w*h; ++i) { unsigned char *pixel = out + 4*i; if (pixel[3] != 0 && pixel[3] != 255) { float a = pixel[3] / 255.0f; float ra = 1.0f / a; float inv_a = 255.0f * (1 - ra); pixel[0] = (unsigned char) (pixel[0]*ra + inv_a); pixel[1] = (unsigned char) (pixel[1]*ra + inv_a); pixel[2] = (unsigned char) (pixel[2]*ra + inv_a); } } } } // convert to desired output format if (req_comp && req_comp != 4) { if (ri->bits_per_channel == 16) out = (stbi_uc *) stbi__convert_format16((stbi__uint16 *) out, 4, req_comp, w, h); else out = stbi__convert_format(out, 4, req_comp, w, h); if (out == NULL) return out; // stbi__convert_format frees input on failure } if (comp) *comp = 4; *y = h; *x = w; return out; } #endif // ************************************************************************************************* // Softimage PIC loader // by Tom Seddon // // See http://softimage.wiki.softimage.com/index.php/INFO:_PIC_file_format // See http://ozviz.wasp.uwa.edu.au/~pbourke/dataformats/softimagepic/ #ifndef STBI_NO_PIC static int stbi__pic_is4(stbi__context *s,const char *str) { int i; for (i=0; i<4; ++i) if (stbi__get8(s) != (stbi_uc)str[i]) return 0; return 1; } static int stbi__pic_test_core(stbi__context *s) { int i; if (!stbi__pic_is4(s,"\x53\x80\xF6\x34")) return 0; for(i=0;i<84;++i) stbi__get8(s); if (!stbi__pic_is4(s,"PICT")) return 0; return 1; } typedef struct { stbi_uc size,type,channel; } stbi__pic_packet; static stbi_uc *stbi__readval(stbi__context *s, int channel, stbi_uc *dest) { int mask=0x80, i; for (i=0; i<4; ++i, mask>>=1) { if (channel & mask) { if (stbi__at_eof(s)) return stbi__errpuc("bad file","PIC file too short"); dest[i]=stbi__get8(s); } } return dest; } static void stbi__copyval(int channel,stbi_uc *dest,const stbi_uc *src) { int mask=0x80,i; for (i=0;i<4; ++i, mask>>=1) if (channel&mask) dest[i]=src[i]; } static stbi_uc *stbi__pic_load_core(stbi__context *s,int width,int height,int *comp, stbi_uc *result) { int act_comp=0,num_packets=0,y,chained; stbi__pic_packet packets[10]; // this will (should...) cater for even some bizarre stuff like having data // for the same channel in multiple packets. do { stbi__pic_packet *packet; if (num_packets==sizeof(packets)/sizeof(packets[0])) return stbi__errpuc("bad format","too many packets"); packet = &packets[num_packets++]; chained = stbi__get8(s); packet->size = stbi__get8(s); packet->type = stbi__get8(s); packet->channel = stbi__get8(s); act_comp |= packet->channel; if (stbi__at_eof(s)) return stbi__errpuc("bad file","file too short (reading packets)"); if (packet->size != 8) return stbi__errpuc("bad format","packet isn't 8bpp"); } while (chained); *comp = (act_comp & 0x10 ? 4 : 3); // has alpha channel? for(y=0; ytype) { default: return stbi__errpuc("bad format","packet has bad compression type"); case 0: {//uncompressed int x; for(x=0;xchannel,dest)) return 0; break; } case 1://Pure RLE { int left=width, i; while (left>0) { stbi_uc count,value[4]; count=stbi__get8(s); if (stbi__at_eof(s)) return stbi__errpuc("bad file","file too short (pure read count)"); if (count > left) count = (stbi_uc) left; if (!stbi__readval(s,packet->channel,value)) return 0; for(i=0; ichannel,dest,value); left -= count; } } break; case 2: {//Mixed RLE int left=width; while (left>0) { int count = stbi__get8(s), i; if (stbi__at_eof(s)) return stbi__errpuc("bad file","file too short (mixed read count)"); if (count >= 128) { // Repeated stbi_uc value[4]; if (count==128) count = stbi__get16be(s); else count -= 127; if (count > left) return stbi__errpuc("bad file","scanline overrun"); if (!stbi__readval(s,packet->channel,value)) return 0; for(i=0;ichannel,dest,value); } else { // Raw ++count; if (count>left) return stbi__errpuc("bad file","scanline overrun"); for(i=0;ichannel,dest)) return 0; } left-=count; } break; } } } } return result; } static void *stbi__pic_load(stbi__context *s,int *px,int *py,int *comp,int req_comp, stbi__result_info *ri) { stbi_uc *result; int i, x,y, internal_comp; STBI_NOTUSED(ri); if (!comp) comp = &internal_comp; for (i=0; i<92; ++i) stbi__get8(s); x = stbi__get16be(s); y = stbi__get16be(s); if (y > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large","Very large image (corrupt?)"); if (x > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large","Very large image (corrupt?)"); if (stbi__at_eof(s)) return stbi__errpuc("bad file","file too short (pic header)"); if (!stbi__mad3sizes_valid(x, y, 4, 0)) return stbi__errpuc("too large", "PIC image too large to decode"); stbi__get32be(s); //skip `ratio' stbi__get16be(s); //skip `fields' stbi__get16be(s); //skip `pad' // intermediate buffer is RGBA result = (stbi_uc *) stbi__malloc_mad3(x, y, 4, 0); if (!result) return stbi__errpuc("outofmem", "Out of memory"); memset(result, 0xff, x*y*4); if (!stbi__pic_load_core(s,x,y,comp, result)) { STBI_FREE(result); result=0; } *px = x; *py = y; if (req_comp == 0) req_comp = *comp; result=stbi__convert_format(result,4,req_comp,x,y); return result; } static int stbi__pic_test(stbi__context *s) { int r = stbi__pic_test_core(s); stbi__rewind(s); return r; } #endif // ************************************************************************************************* // GIF loader -- public domain by Jean-Marc Lienher -- simplified/shrunk by stb #ifndef STBI_NO_GIF typedef struct { stbi__int16 prefix; stbi_uc first; stbi_uc suffix; } stbi__gif_lzw; typedef struct { int w,h; stbi_uc *out; // output buffer (always 4 components) stbi_uc *background; // The current "background" as far as a gif is concerned stbi_uc *history; int flags, bgindex, ratio, transparent, eflags; stbi_uc pal[256][4]; stbi_uc lpal[256][4]; stbi__gif_lzw codes[8192]; stbi_uc *color_table; int parse, step; int lflags; int start_x, start_y; int max_x, max_y; int cur_x, cur_y; int line_size; int delay; } stbi__gif; static int stbi__gif_test_raw(stbi__context *s) { int sz; if (stbi__get8(s) != 'G' || stbi__get8(s) != 'I' || stbi__get8(s) != 'F' || stbi__get8(s) != '8') return 0; sz = stbi__get8(s); if (sz != '9' && sz != '7') return 0; if (stbi__get8(s) != 'a') return 0; return 1; } static int stbi__gif_test(stbi__context *s) { int r = stbi__gif_test_raw(s); stbi__rewind(s); return r; } static void stbi__gif_parse_colortable(stbi__context *s, stbi_uc pal[256][4], int num_entries, int transp) { int i; for (i=0; i < num_entries; ++i) { pal[i][2] = stbi__get8(s); pal[i][1] = stbi__get8(s); pal[i][0] = stbi__get8(s); pal[i][3] = transp == i ? 0 : 255; } } static int stbi__gif_header(stbi__context *s, stbi__gif *g, int *comp, int is_info) { stbi_uc version; if (stbi__get8(s) != 'G' || stbi__get8(s) != 'I' || stbi__get8(s) != 'F' || stbi__get8(s) != '8') return stbi__err("not GIF", "Corrupt GIF"); version = stbi__get8(s); if (version != '7' && version != '9') return stbi__err("not GIF", "Corrupt GIF"); if (stbi__get8(s) != 'a') return stbi__err("not GIF", "Corrupt GIF"); stbi__g_failure_reason = ""; g->w = stbi__get16le(s); g->h = stbi__get16le(s); g->flags = stbi__get8(s); g->bgindex = stbi__get8(s); g->ratio = stbi__get8(s); g->transparent = -1; if (g->w > STBI_MAX_DIMENSIONS) return stbi__err("too large","Very large image (corrupt?)"); if (g->h > STBI_MAX_DIMENSIONS) return stbi__err("too large","Very large image (corrupt?)"); if (comp != 0) *comp = 4; // can't actually tell whether it's 3 or 4 until we parse the comments if (is_info) return 1; if (g->flags & 0x80) stbi__gif_parse_colortable(s,g->pal, 2 << (g->flags & 7), -1); return 1; } static int stbi__gif_info_raw(stbi__context *s, int *x, int *y, int *comp) { stbi__gif* g = (stbi__gif*) stbi__malloc(sizeof(stbi__gif)); if (!g) return stbi__err("outofmem", "Out of memory"); if (!stbi__gif_header(s, g, comp, 1)) { STBI_FREE(g); stbi__rewind( s ); return 0; } if (x) *x = g->w; if (y) *y = g->h; STBI_FREE(g); return 1; } static void stbi__out_gif_code(stbi__gif *g, stbi__uint16 code) { stbi_uc *p, *c; int idx; // recurse to decode the prefixes, since the linked-list is backwards, // and working backwards through an interleaved image would be nasty if (g->codes[code].prefix >= 0) stbi__out_gif_code(g, g->codes[code].prefix); if (g->cur_y >= g->max_y) return; idx = g->cur_x + g->cur_y; p = &g->out[idx]; g->history[idx / 4] = 1; c = &g->color_table[g->codes[code].suffix * 4]; if (c[3] > 128) { // don't render transparent pixels; p[0] = c[2]; p[1] = c[1]; p[2] = c[0]; p[3] = c[3]; } g->cur_x += 4; if (g->cur_x >= g->max_x) { g->cur_x = g->start_x; g->cur_y += g->step; while (g->cur_y >= g->max_y && g->parse > 0) { g->step = (1 << g->parse) * g->line_size; g->cur_y = g->start_y + (g->step >> 1); --g->parse; } } } static stbi_uc *stbi__process_gif_raster(stbi__context *s, stbi__gif *g) { stbi_uc lzw_cs; stbi__int32 len, init_code; stbi__uint32 first; stbi__int32 codesize, codemask, avail, oldcode, bits, valid_bits, clear; stbi__gif_lzw *p; lzw_cs = stbi__get8(s); if (lzw_cs > 12) return NULL; clear = 1 << lzw_cs; first = 1; codesize = lzw_cs + 1; codemask = (1 << codesize) - 1; bits = 0; valid_bits = 0; for (init_code = 0; init_code < clear; init_code++) { g->codes[init_code].prefix = -1; g->codes[init_code].first = (stbi_uc) init_code; g->codes[init_code].suffix = (stbi_uc) init_code; } // support no starting clear code avail = clear+2; oldcode = -1; len = 0; for(;;) { if (valid_bits < codesize) { if (len == 0) { len = stbi__get8(s); // start new block if (len == 0) return g->out; } --len; bits |= (stbi__int32) stbi__get8(s) << valid_bits; valid_bits += 8; } else { stbi__int32 code = bits & codemask; bits >>= codesize; valid_bits -= codesize; // @OPTIMIZE: is there some way we can accelerate the non-clear path? if (code == clear) { // clear code codesize = lzw_cs + 1; codemask = (1 << codesize) - 1; avail = clear + 2; oldcode = -1; first = 0; } else if (code == clear + 1) { // end of stream code stbi__skip(s, len); while ((len = stbi__get8(s)) > 0) stbi__skip(s,len); return g->out; } else if (code <= avail) { if (first) { return stbi__errpuc("no clear code", "Corrupt GIF"); } if (oldcode >= 0) { p = &g->codes[avail++]; if (avail > 8192) { return stbi__errpuc("too many codes", "Corrupt GIF"); } p->prefix = (stbi__int16) oldcode; p->first = g->codes[oldcode].first; p->suffix = (code == avail) ? p->first : g->codes[code].first; } else if (code == avail) return stbi__errpuc("illegal code in raster", "Corrupt GIF"); stbi__out_gif_code(g, (stbi__uint16) code); if ((avail & codemask) == 0 && avail <= 0x0FFF) { codesize++; codemask = (1 << codesize) - 1; } oldcode = code; } else { return stbi__errpuc("illegal code in raster", "Corrupt GIF"); } } } } // this function is designed to support animated gifs, although stb_image doesn't support it // two back is the image from two frames ago, used for a very specific disposal format static stbi_uc *stbi__gif_load_next(stbi__context *s, stbi__gif *g, int *comp, int req_comp, stbi_uc *two_back) { int dispose; int first_frame; int pi; int pcount; STBI_NOTUSED(req_comp); // on first frame, any non-written pixels get the background colour (non-transparent) first_frame = 0; if (g->out == 0) { if (!stbi__gif_header(s, g, comp,0)) return 0; // stbi__g_failure_reason set by stbi__gif_header if (!stbi__mad3sizes_valid(4, g->w, g->h, 0)) return stbi__errpuc("too large", "GIF image is too large"); pcount = g->w * g->h; g->out = (stbi_uc *) stbi__malloc(4 * pcount); g->background = (stbi_uc *) stbi__malloc(4 * pcount); g->history = (stbi_uc *) stbi__malloc(pcount); if (!g->out || !g->background || !g->history) return stbi__errpuc("outofmem", "Out of memory"); // image is treated as "transparent" at the start - ie, nothing overwrites the current background; // background colour is only used for pixels that are not rendered first frame, after that "background" // color refers to the color that was there the previous frame. memset(g->out, 0x00, 4 * pcount); memset(g->background, 0x00, 4 * pcount); // state of the background (starts transparent) memset(g->history, 0x00, pcount); // pixels that were affected previous frame first_frame = 1; } else { // second frame - how do we dispose of the previous one? dispose = (g->eflags & 0x1C) >> 2; pcount = g->w * g->h; if ((dispose == 3) && (two_back == 0)) { dispose = 2; // if I don't have an image to revert back to, default to the old background } if (dispose == 3) { // use previous graphic for (pi = 0; pi < pcount; ++pi) { if (g->history[pi]) { memcpy( &g->out[pi * 4], &two_back[pi * 4], 4 ); } } } else if (dispose == 2) { // restore what was changed last frame to background before that frame; for (pi = 0; pi < pcount; ++pi) { if (g->history[pi]) { memcpy( &g->out[pi * 4], &g->background[pi * 4], 4 ); } } } else { // This is a non-disposal case eithe way, so just // leave the pixels as is, and they will become the new background // 1: do not dispose // 0: not specified. } // background is what out is after the undoing of the previou frame; memcpy( g->background, g->out, 4 * g->w * g->h ); } // clear my history; memset( g->history, 0x00, g->w * g->h ); // pixels that were affected previous frame for (;;) { int tag = stbi__get8(s); switch (tag) { case 0x2C: /* Image Descriptor */ { stbi__int32 x, y, w, h; stbi_uc *o; x = stbi__get16le(s); y = stbi__get16le(s); w = stbi__get16le(s); h = stbi__get16le(s); if (((x + w) > (g->w)) || ((y + h) > (g->h))) return stbi__errpuc("bad Image Descriptor", "Corrupt GIF"); g->line_size = g->w * 4; g->start_x = x * 4; g->start_y = y * g->line_size; g->max_x = g->start_x + w * 4; g->max_y = g->start_y + h * g->line_size; g->cur_x = g->start_x; g->cur_y = g->start_y; // if the width of the specified rectangle is 0, that means // we may not see *any* pixels or the image is malformed; // to make sure this is caught, move the current y down to // max_y (which is what out_gif_code checks). if (w == 0) g->cur_y = g->max_y; g->lflags = stbi__get8(s); if (g->lflags & 0x40) { g->step = 8 * g->line_size; // first interlaced spacing g->parse = 3; } else { g->step = g->line_size; g->parse = 0; } if (g->lflags & 0x80) { stbi__gif_parse_colortable(s,g->lpal, 2 << (g->lflags & 7), g->eflags & 0x01 ? g->transparent : -1); g->color_table = (stbi_uc *) g->lpal; } else if (g->flags & 0x80) { g->color_table = (stbi_uc *) g->pal; } else return stbi__errpuc("missing color table", "Corrupt GIF"); o = stbi__process_gif_raster(s, g); if (!o) return NULL; // if this was the first frame, pcount = g->w * g->h; if (first_frame && (g->bgindex > 0)) { // if first frame, any pixel not drawn to gets the background color for (pi = 0; pi < pcount; ++pi) { if (g->history[pi] == 0) { g->pal[g->bgindex][3] = 255; // just in case it was made transparent, undo that; It will be reset next frame if need be; memcpy( &g->out[pi * 4], &g->pal[g->bgindex], 4 ); } } } return o; } case 0x21: // Comment Extension. { int len; int ext = stbi__get8(s); if (ext == 0xF9) { // Graphic Control Extension. len = stbi__get8(s); if (len == 4) { g->eflags = stbi__get8(s); g->delay = 10 * stbi__get16le(s); // delay - 1/100th of a second, saving as 1/1000ths. // unset old transparent if (g->transparent >= 0) { g->pal[g->transparent][3] = 255; } if (g->eflags & 0x01) { g->transparent = stbi__get8(s); if (g->transparent >= 0) { g->pal[g->transparent][3] = 0; } } else { // don't need transparent stbi__skip(s, 1); g->transparent = -1; } } else { stbi__skip(s, len); break; } } while ((len = stbi__get8(s)) != 0) { stbi__skip(s, len); } break; } case 0x3B: // gif stream termination code return (stbi_uc *) s; // using '1' causes warning on some compilers default: return stbi__errpuc("unknown code", "Corrupt GIF"); } } } static void *stbi__load_gif_main_outofmem(stbi__gif *g, stbi_uc *out, int **delays) { STBI_FREE(g->out); STBI_FREE(g->history); STBI_FREE(g->background); if (out) STBI_FREE(out); if (delays && *delays) STBI_FREE(*delays); return stbi__errpuc("outofmem", "Out of memory"); } static void *stbi__load_gif_main(stbi__context *s, int **delays, int *x, int *y, int *z, int *comp, int req_comp) { if (stbi__gif_test(s)) { int layers = 0; stbi_uc *u = 0; stbi_uc *out = 0; stbi_uc *two_back = 0; stbi__gif g; int stride; int out_size = 0; int delays_size = 0; STBI_NOTUSED(out_size); STBI_NOTUSED(delays_size); memset(&g, 0, sizeof(g)); if (delays) { *delays = 0; } do { u = stbi__gif_load_next(s, &g, comp, req_comp, two_back); if (u == (stbi_uc *) s) u = 0; // end of animated gif marker if (u) { *x = g.w; *y = g.h; ++layers; stride = g.w * g.h * 4; if (out) { void *tmp = (stbi_uc*) STBI_REALLOC_SIZED( out, out_size, layers * stride ); if (!tmp) return stbi__load_gif_main_outofmem(&g, out, delays); else { out = (stbi_uc*) tmp; out_size = layers * stride; } if (delays) { int *new_delays = (int*) STBI_REALLOC_SIZED( *delays, delays_size, sizeof(int) * layers ); if (!new_delays) return stbi__load_gif_main_outofmem(&g, out, delays); *delays = new_delays; delays_size = layers * sizeof(int); } } else { out = (stbi_uc*)stbi__malloc( layers * stride ); if (!out) return stbi__load_gif_main_outofmem(&g, out, delays); out_size = layers * stride; if (delays) { *delays = (int*) stbi__malloc( layers * sizeof(int) ); if (!*delays) return stbi__load_gif_main_outofmem(&g, out, delays); delays_size = layers * sizeof(int); } } memcpy( out + ((layers - 1) * stride), u, stride ); if (layers >= 2) { two_back = out - 2 * stride; } if (delays) { (*delays)[layers - 1U] = g.delay; } } } while (u != 0); // free temp buffer; STBI_FREE(g.out); STBI_FREE(g.history); STBI_FREE(g.background); // do the final conversion after loading everything; if (req_comp && req_comp != 4) out = stbi__convert_format(out, 4, req_comp, layers * g.w, g.h); *z = layers; return out; } else { return stbi__errpuc("not GIF", "Image was not as a gif type."); } } static void *stbi__gif_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri) { stbi_uc *u = 0; stbi__gif g; memset(&g, 0, sizeof(g)); STBI_NOTUSED(ri); u = stbi__gif_load_next(s, &g, comp, req_comp, 0); if (u == (stbi_uc *) s) u = 0; // end of animated gif marker if (u) { *x = g.w; *y = g.h; // moved conversion to after successful load so that the same // can be done for multiple frames. if (req_comp && req_comp != 4) u = stbi__convert_format(u, 4, req_comp, g.w, g.h); } else if (g.out) { // if there was an error and we allocated an image buffer, free it! STBI_FREE(g.out); } // free buffers needed for multiple frame loading; STBI_FREE(g.history); STBI_FREE(g.background); return u; } static int stbi__gif_info(stbi__context *s, int *x, int *y, int *comp) { return stbi__gif_info_raw(s,x,y,comp); } #endif // ************************************************************************************************* // Radiance RGBE HDR loader // originally by Nicolas Schulz #ifndef STBI_NO_HDR static int stbi__hdr_test_core(stbi__context *s, const char *signature) { int i; for (i=0; signature[i]; ++i) if (stbi__get8(s) != signature[i]) return 0; stbi__rewind(s); return 1; } static int stbi__hdr_test(stbi__context* s) { int r = stbi__hdr_test_core(s, "#?RADIANCE\n"); stbi__rewind(s); if(!r) { r = stbi__hdr_test_core(s, "#?RGBE\n"); stbi__rewind(s); } return r; } #define STBI__HDR_BUFLEN 1024 static char *stbi__hdr_gettoken(stbi__context *z, char *buffer) { int len=0; char c = '\0'; c = (char) stbi__get8(z); while (!stbi__at_eof(z) && c != '\n') { buffer[len++] = c; if (len == STBI__HDR_BUFLEN-1) { // flush to end of line while (!stbi__at_eof(z) && stbi__get8(z) != '\n') ; break; } c = (char) stbi__get8(z); } buffer[len] = 0; return buffer; } static void stbi__hdr_convert(float *output, stbi_uc *input, int req_comp) { if ( input[3] != 0 ) { float f1; // Exponent f1 = (float) ldexp(1.0f, input[3] - (int)(128 + 8)); if (req_comp <= 2) output[0] = (input[0] + input[1] + input[2]) * f1 / 3; else { output[0] = input[0] * f1; output[1] = input[1] * f1; output[2] = input[2] * f1; } if (req_comp == 2) output[1] = 1; if (req_comp == 4) output[3] = 1; } else { switch (req_comp) { case 4: output[3] = 1; /* fallthrough */ case 3: output[0] = output[1] = output[2] = 0; break; case 2: output[1] = 1; /* fallthrough */ case 1: output[0] = 0; break; } } } static float *stbi__hdr_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri) { char buffer[STBI__HDR_BUFLEN]; char *token; int valid = 0; int width, height; stbi_uc *scanline; float *hdr_data; int len; unsigned char count, value; int i, j, k, c1,c2, z; const char *headerToken; STBI_NOTUSED(ri); // Check identifier headerToken = stbi__hdr_gettoken(s,buffer); if (strcmp(headerToken, "#?RADIANCE") != 0 && strcmp(headerToken, "#?RGBE") != 0) return stbi__errpf("not HDR", "Corrupt HDR image"); // Parse header for(;;) { token = stbi__hdr_gettoken(s,buffer); if (token[0] == 0) break; if (strcmp(token, "FORMAT=32-bit_rle_rgbe") == 0) valid = 1; } if (!valid) return stbi__errpf("unsupported format", "Unsupported HDR format"); // Parse width and height // can't use sscanf() if we're not using stdio! token = stbi__hdr_gettoken(s,buffer); if (strncmp(token, "-Y ", 3)) return stbi__errpf("unsupported data layout", "Unsupported HDR format"); token += 3; height = (int) strtol(token, &token, 10); while (*token == ' ') ++token; if (strncmp(token, "+X ", 3)) return stbi__errpf("unsupported data layout", "Unsupported HDR format"); token += 3; width = (int) strtol(token, NULL, 10); if (height > STBI_MAX_DIMENSIONS) return stbi__errpf("too large","Very large image (corrupt?)"); if (width > STBI_MAX_DIMENSIONS) return stbi__errpf("too large","Very large image (corrupt?)"); *x = width; *y = height; if (comp) *comp = 3; if (req_comp == 0) req_comp = 3; if (!stbi__mad4sizes_valid(width, height, req_comp, sizeof(float), 0)) return stbi__errpf("too large", "HDR image is too large"); // Read data hdr_data = (float *) stbi__malloc_mad4(width, height, req_comp, sizeof(float), 0); if (!hdr_data) return stbi__errpf("outofmem", "Out of memory"); // Load image data // image data is stored as some number of sca if ( width < 8 || width >= 32768) { // Read flat data for (j=0; j < height; ++j) { for (i=0; i < width; ++i) { stbi_uc rgbe[4]; main_decode_loop: stbi__getn(s, rgbe, 4); stbi__hdr_convert(hdr_data + j * width * req_comp + i * req_comp, rgbe, req_comp); } } } else { // Read RLE-encoded data scanline = NULL; for (j = 0; j < height; ++j) { c1 = stbi__get8(s); c2 = stbi__get8(s); len = stbi__get8(s); if (c1 != 2 || c2 != 2 || (len & 0x80)) { // not run-length encoded, so we have to actually use THIS data as a decoded // pixel (note this can't be a valid pixel--one of RGB must be >= 128) stbi_uc rgbe[4]; rgbe[0] = (stbi_uc) c1; rgbe[1] = (stbi_uc) c2; rgbe[2] = (stbi_uc) len; rgbe[3] = (stbi_uc) stbi__get8(s); stbi__hdr_convert(hdr_data, rgbe, req_comp); i = 1; j = 0; STBI_FREE(scanline); goto main_decode_loop; // yes, this makes no sense } len <<= 8; len |= stbi__get8(s); if (len != width) { STBI_FREE(hdr_data); STBI_FREE(scanline); return stbi__errpf("invalid decoded scanline length", "corrupt HDR"); } if (scanline == NULL) { scanline = (stbi_uc *) stbi__malloc_mad2(width, 4, 0); if (!scanline) { STBI_FREE(hdr_data); return stbi__errpf("outofmem", "Out of memory"); } } for (k = 0; k < 4; ++k) { int nleft; i = 0; while ((nleft = width - i) > 0) { count = stbi__get8(s); if (count > 128) { // Run value = stbi__get8(s); count -= 128; if ((count == 0) || (count > nleft)) { STBI_FREE(hdr_data); STBI_FREE(scanline); return stbi__errpf("corrupt", "bad RLE data in HDR"); } for (z = 0; z < count; ++z) scanline[i++ * 4 + k] = value; } else { // Dump if ((count == 0) || (count > nleft)) { STBI_FREE(hdr_data); STBI_FREE(scanline); return stbi__errpf("corrupt", "bad RLE data in HDR"); } for (z = 0; z < count; ++z) scanline[i++ * 4 + k] = stbi__get8(s); } } } for (i=0; i < width; ++i) stbi__hdr_convert(hdr_data+(j*width + i)*req_comp, scanline + i*4, req_comp); } if (scanline) STBI_FREE(scanline); } return hdr_data; } static int stbi__hdr_info(stbi__context *s, int *x, int *y, int *comp) { char buffer[STBI__HDR_BUFLEN]; char *token; int valid = 0; int dummy; if (!x) x = &dummy; if (!y) y = &dummy; if (!comp) comp = &dummy; if (stbi__hdr_test(s) == 0) { stbi__rewind( s ); return 0; } for(;;) { token = stbi__hdr_gettoken(s,buffer); if (token[0] == 0) break; if (strcmp(token, "FORMAT=32-bit_rle_rgbe") == 0) valid = 1; } if (!valid) { stbi__rewind( s ); return 0; } token = stbi__hdr_gettoken(s,buffer); if (strncmp(token, "-Y ", 3)) { stbi__rewind( s ); return 0; } token += 3; *y = (int) strtol(token, &token, 10); while (*token == ' ') ++token; if (strncmp(token, "+X ", 3)) { stbi__rewind( s ); return 0; } token += 3; *x = (int) strtol(token, NULL, 10); *comp = 3; return 1; } #endif // STBI_NO_HDR #ifndef STBI_NO_BMP static int stbi__bmp_info(stbi__context *s, int *x, int *y, int *comp) { void *p; stbi__bmp_data info; info.all_a = 255; p = stbi__bmp_parse_header(s, &info); if (p == NULL) { stbi__rewind( s ); return 0; } if (x) *x = s->img_x; if (y) *y = s->img_y; if (comp) { if (info.bpp == 24 && info.ma == 0xff000000) *comp = 3; else *comp = info.ma ? 4 : 3; } return 1; } #endif #ifndef STBI_NO_PSD static int stbi__psd_info(stbi__context *s, int *x, int *y, int *comp) { int channelCount, dummy, depth; if (!x) x = &dummy; if (!y) y = &dummy; if (!comp) comp = &dummy; if (stbi__get32be(s) != 0x38425053) { stbi__rewind( s ); return 0; } if (stbi__get16be(s) != 1) { stbi__rewind( s ); return 0; } stbi__skip(s, 6); channelCount = stbi__get16be(s); if (channelCount < 0 || channelCount > 16) { stbi__rewind( s ); return 0; } *y = stbi__get32be(s); *x = stbi__get32be(s); depth = stbi__get16be(s); if (depth != 8 && depth != 16) { stbi__rewind( s ); return 0; } if (stbi__get16be(s) != 3) { stbi__rewind( s ); return 0; } *comp = 4; return 1; } static int stbi__psd_is16(stbi__context *s) { int channelCount, depth; if (stbi__get32be(s) != 0x38425053) { stbi__rewind( s ); return 0; } if (stbi__get16be(s) != 1) { stbi__rewind( s ); return 0; } stbi__skip(s, 6); channelCount = stbi__get16be(s); if (channelCount < 0 || channelCount > 16) { stbi__rewind( s ); return 0; } STBI_NOTUSED(stbi__get32be(s)); STBI_NOTUSED(stbi__get32be(s)); depth = stbi__get16be(s); if (depth != 16) { stbi__rewind( s ); return 0; } return 1; } #endif #ifndef STBI_NO_PIC static int stbi__pic_info(stbi__context *s, int *x, int *y, int *comp) { int act_comp=0,num_packets=0,chained,dummy; stbi__pic_packet packets[10]; if (!x) x = &dummy; if (!y) y = &dummy; if (!comp) comp = &dummy; if (!stbi__pic_is4(s,"\x53\x80\xF6\x34")) { stbi__rewind(s); return 0; } stbi__skip(s, 88); *x = stbi__get16be(s); *y = stbi__get16be(s); if (stbi__at_eof(s)) { stbi__rewind( s); return 0; } if ( (*x) != 0 && (1 << 28) / (*x) < (*y)) { stbi__rewind( s ); return 0; } stbi__skip(s, 8); do { stbi__pic_packet *packet; if (num_packets==sizeof(packets)/sizeof(packets[0])) return 0; packet = &packets[num_packets++]; chained = stbi__get8(s); packet->size = stbi__get8(s); packet->type = stbi__get8(s); packet->channel = stbi__get8(s); act_comp |= packet->channel; if (stbi__at_eof(s)) { stbi__rewind( s ); return 0; } if (packet->size != 8) { stbi__rewind( s ); return 0; } } while (chained); *comp = (act_comp & 0x10 ? 4 : 3); return 1; } #endif // ************************************************************************************************* // Portable Gray Map and Portable Pixel Map loader // by Ken Miller // // PGM: http://netpbm.sourceforge.net/doc/pgm.html // PPM: http://netpbm.sourceforge.net/doc/ppm.html // // Known limitations: // Does not support comments in the header section // Does not support ASCII image data (formats P2 and P3) #ifndef STBI_NO_PNM static int stbi__pnm_test(stbi__context *s) { char p, t; p = (char) stbi__get8(s); t = (char) stbi__get8(s); if (p != 'P' || (t != '5' && t != '6')) { stbi__rewind( s ); return 0; } return 1; } static void *stbi__pnm_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri) { stbi_uc *out; STBI_NOTUSED(ri); ri->bits_per_channel = stbi__pnm_info(s, (int *)&s->img_x, (int *)&s->img_y, (int *)&s->img_n); if (ri->bits_per_channel == 0) return 0; if (s->img_y > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large","Very large image (corrupt?)"); if (s->img_x > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large","Very large image (corrupt?)"); *x = s->img_x; *y = s->img_y; if (comp) *comp = s->img_n; if (!stbi__mad4sizes_valid(s->img_n, s->img_x, s->img_y, ri->bits_per_channel / 8, 0)) return stbi__errpuc("too large", "PNM too large"); out = (stbi_uc *) stbi__malloc_mad4(s->img_n, s->img_x, s->img_y, ri->bits_per_channel / 8, 0); if (!out) return stbi__errpuc("outofmem", "Out of memory"); if (!stbi__getn(s, out, s->img_n * s->img_x * s->img_y * (ri->bits_per_channel / 8))) { STBI_FREE(out); return stbi__errpuc("bad PNM", "PNM file truncated"); } if (req_comp && req_comp != s->img_n) { if (ri->bits_per_channel == 16) { out = (stbi_uc *) stbi__convert_format16((stbi__uint16 *) out, s->img_n, req_comp, s->img_x, s->img_y); } else { out = stbi__convert_format(out, s->img_n, req_comp, s->img_x, s->img_y); } if (out == NULL) return out; // stbi__convert_format frees input on failure } return out; } static int stbi__pnm_isspace(char c) { return c == ' ' || c == '\t' || c == '\n' || c == '\v' || c == '\f' || c == '\r'; } static void stbi__pnm_skip_whitespace(stbi__context *s, char *c) { for (;;) { while (!stbi__at_eof(s) && stbi__pnm_isspace(*c)) *c = (char) stbi__get8(s); if (stbi__at_eof(s) || *c != '#') break; while (!stbi__at_eof(s) && *c != '\n' && *c != '\r' ) *c = (char) stbi__get8(s); } } static int stbi__pnm_isdigit(char c) { return c >= '0' && c <= '9'; } static int stbi__pnm_getinteger(stbi__context *s, char *c) { int value = 0; while (!stbi__at_eof(s) && stbi__pnm_isdigit(*c)) { value = value*10 + (*c - '0'); *c = (char) stbi__get8(s); if((value > 214748364) || (value == 214748364 && *c > '7')) return stbi__err("integer parse overflow", "Parsing an integer in the PPM header overflowed a 32-bit int"); } return value; } static int stbi__pnm_info(stbi__context *s, int *x, int *y, int *comp) { int maxv, dummy; char c, p, t; if (!x) x = &dummy; if (!y) y = &dummy; if (!comp) comp = &dummy; stbi__rewind(s); // Get identifier p = (char) stbi__get8(s); t = (char) stbi__get8(s); if (p != 'P' || (t != '5' && t != '6')) { stbi__rewind(s); return 0; } *comp = (t == '6') ? 3 : 1; // '5' is 1-component .pgm; '6' is 3-component .ppm c = (char) stbi__get8(s); stbi__pnm_skip_whitespace(s, &c); *x = stbi__pnm_getinteger(s, &c); // read width if(*x == 0) return stbi__err("invalid width", "PPM image header had zero or overflowing width"); stbi__pnm_skip_whitespace(s, &c); *y = stbi__pnm_getinteger(s, &c); // read height if (*y == 0) return stbi__err("invalid width", "PPM image header had zero or overflowing width"); stbi__pnm_skip_whitespace(s, &c); maxv = stbi__pnm_getinteger(s, &c); // read max value if (maxv > 65535) return stbi__err("max value > 65535", "PPM image supports only 8-bit and 16-bit images"); else if (maxv > 255) return 16; else return 8; } static int stbi__pnm_is16(stbi__context *s) { if (stbi__pnm_info(s, NULL, NULL, NULL) == 16) return 1; return 0; } #endif static int stbi__info_main(stbi__context *s, int *x, int *y, int *comp) { #ifndef STBI_NO_JPEG if (stbi__jpeg_info(s, x, y, comp)) return 1; #endif #ifndef STBI_NO_PNG if (stbi__png_info(s, x, y, comp)) return 1; #endif #ifndef STBI_NO_GIF if (stbi__gif_info(s, x, y, comp)) return 1; #endif #ifndef STBI_NO_BMP if (stbi__bmp_info(s, x, y, comp)) return 1; #endif #ifndef STBI_NO_PSD if (stbi__psd_info(s, x, y, comp)) return 1; #endif #ifndef STBI_NO_PIC if (stbi__pic_info(s, x, y, comp)) return 1; #endif #ifndef STBI_NO_PNM if (stbi__pnm_info(s, x, y, comp)) return 1; #endif #ifndef STBI_NO_HDR if (stbi__hdr_info(s, x, y, comp)) return 1; #endif // test tga last because it's a crappy test! #ifndef STBI_NO_TGA if (stbi__tga_info(s, x, y, comp)) return 1; #endif return stbi__err("unknown image type", "Image not of any known type, or corrupt"); } static int stbi__is_16_main(stbi__context *s) { #ifndef STBI_NO_PNG if (stbi__png_is16(s)) return 1; #endif #ifndef STBI_NO_PSD if (stbi__psd_is16(s)) return 1; #endif #ifndef STBI_NO_PNM if (stbi__pnm_is16(s)) return 1; #endif return 0; } #ifndef STBI_NO_STDIO STBIDEF int stbi_info(char const *filename, int *x, int *y, int *comp) { FILE *f = stbi__fopen(filename, "rb"); int result; if (!f) return stbi__err("can't fopen", "Unable to open file"); result = stbi_info_from_file(f, x, y, comp); fclose(f); return result; } STBIDEF int stbi_info_from_file(FILE *f, int *x, int *y, int *comp) { int r; stbi__context s; long pos = ftell(f); stbi__start_file(&s, f); r = stbi__info_main(&s,x,y,comp); fseek(f,pos,SEEK_SET); return r; } STBIDEF int stbi_is_16_bit(char const *filename) { FILE *f = stbi__fopen(filename, "rb"); int result; if (!f) return stbi__err("can't fopen", "Unable to open file"); result = stbi_is_16_bit_from_file(f); fclose(f); return result; } STBIDEF int stbi_is_16_bit_from_file(FILE *f) { int r; stbi__context s; long pos = ftell(f); stbi__start_file(&s, f); r = stbi__is_16_main(&s); fseek(f,pos,SEEK_SET); return r; } #endif // !STBI_NO_STDIO STBIDEF int stbi_info_from_memory(stbi_uc const *buffer, int len, int *x, int *y, int *comp) { stbi__context s; stbi__start_mem(&s,buffer,len); return stbi__info_main(&s,x,y,comp); } STBIDEF int stbi_info_from_callbacks(stbi_io_callbacks const *c, void *user, int *x, int *y, int *comp) { stbi__context s; stbi__start_callbacks(&s, (stbi_io_callbacks *) c, user); return stbi__info_main(&s,x,y,comp); } STBIDEF int stbi_is_16_bit_from_memory(stbi_uc const *buffer, int len) { stbi__context s; stbi__start_mem(&s,buffer,len); return stbi__is_16_main(&s); } STBIDEF int stbi_is_16_bit_from_callbacks(stbi_io_callbacks const *c, void *user) { stbi__context s; stbi__start_callbacks(&s, (stbi_io_callbacks *) c, user); return stbi__is_16_main(&s); } #endif // STB_IMAGE_IMPLEMENTATION /* revision history: 2.20 (2019-02-07) support utf8 filenames in Windows; fix warnings and platform ifdefs 2.19 (2018-02-11) fix warning 2.18 (2018-01-30) fix warnings 2.17 (2018-01-29) change sbti__shiftsigned to avoid clang -O2 bug 1-bit BMP *_is_16_bit api avoid warnings 2.16 (2017-07-23) all functions have 16-bit variants; STBI_NO_STDIO works again; compilation fixes; fix rounding in unpremultiply; optimize vertical flip; disable raw_len validation; documentation fixes 2.15 (2017-03-18) fix png-1,2,4 bug; now all Imagenet JPGs decode; warning fixes; disable run-time SSE detection on gcc; uniform handling of optional "return" values; thread-safe initialization of zlib tables 2.14 (2017-03-03) remove deprecated STBI_JPEG_OLD; fixes for Imagenet JPGs 2.13 (2016-11-29) add 16-bit API, only supported for PNG right now 2.12 (2016-04-02) fix typo in 2.11 PSD fix that caused crashes 2.11 (2016-04-02) allocate large structures on the stack remove white matting for transparent PSD fix reported channel count for PNG & BMP re-enable SSE2 in non-gcc 64-bit support RGB-formatted JPEG read 16-bit PNGs (only as 8-bit) 2.10 (2016-01-22) avoid warning introduced in 2.09 by STBI_REALLOC_SIZED 2.09 (2016-01-16) allow comments in PNM files 16-bit-per-pixel TGA (not bit-per-component) info() for TGA could break due to .hdr handling info() for BMP to shares code instead of sloppy parse can use STBI_REALLOC_SIZED if allocator doesn't support realloc code cleanup 2.08 (2015-09-13) fix to 2.07 cleanup, reading RGB PSD as RGBA 2.07 (2015-09-13) fix compiler warnings partial animated GIF support limited 16-bpc PSD support #ifdef unused functions bug with < 92 byte PIC,PNM,HDR,TGA 2.06 (2015-04-19) fix bug where PSD returns wrong '*comp' value 2.05 (2015-04-19) fix bug in progressive JPEG handling, fix warning 2.04 (2015-04-15) try to re-enable SIMD on MinGW 64-bit 2.03 (2015-04-12) extra corruption checking (mmozeiko) stbi_set_flip_vertically_on_load (nguillemot) fix NEON support; fix mingw support 2.02 (2015-01-19) fix incorrect assert, fix warning 2.01 (2015-01-17) fix various warnings; suppress SIMD on gcc 32-bit without -msse2 2.00b (2014-12-25) fix STBI_MALLOC in progressive JPEG 2.00 (2014-12-25) optimize JPG, including x86 SSE2 & NEON SIMD (ryg) progressive JPEG (stb) PGM/PPM support (Ken Miller) STBI_MALLOC,STBI_REALLOC,STBI_FREE GIF bugfix -- seemingly never worked STBI_NO_*, STBI_ONLY_* 1.48 (2014-12-14) fix incorrectly-named assert() 1.47 (2014-12-14) 1/2/4-bit PNG support, both direct and paletted (Omar Cornut & stb) optimize PNG (ryg) fix bug in interlaced PNG with user-specified channel count (stb) 1.46 (2014-08-26) fix broken tRNS chunk (colorkey-style transparency) in non-paletted PNG 1.45 (2014-08-16) fix MSVC-ARM internal compiler error by wrapping malloc 1.44 (2014-08-07) various warning fixes from Ronny Chevalier 1.43 (2014-07-15) fix MSVC-only compiler problem in code changed in 1.42 1.42 (2014-07-09) don't define _CRT_SECURE_NO_WARNINGS (affects user code) fixes to stbi__cleanup_jpeg path added STBI_ASSERT to avoid requiring assert.h 1.41 (2014-06-25) fix search&replace from 1.36 that messed up comments/error messages 1.40 (2014-06-22) fix gcc struct-initialization warning 1.39 (2014-06-15) fix to TGA optimization when req_comp != number of components in TGA; fix to GIF loading because BMP wasn't rewinding (whoops, no GIFs in my test suite) add support for BMP version 5 (more ignored fields) 1.38 (2014-06-06) suppress MSVC warnings on integer casts truncating values fix accidental rename of 'skip' field of I/O 1.37 (2014-06-04) remove duplicate typedef 1.36 (2014-06-03) convert to header file single-file library if de-iphone isn't set, load iphone images color-swapped instead of returning NULL 1.35 (2014-05-27) various warnings fix broken STBI_SIMD path fix bug where stbi_load_from_file no longer left file pointer in correct place fix broken non-easy path for 32-bit BMP (possibly never used) TGA optimization by Arseny Kapoulkine 1.34 (unknown) use STBI_NOTUSED in stbi__resample_row_generic(), fix one more leak in tga failure case 1.33 (2011-07-14) make stbi_is_hdr work in STBI_NO_HDR (as specified), minor compiler-friendly improvements 1.32 (2011-07-13) support for "info" function for all supported filetypes (SpartanJ) 1.31 (2011-06-20) a few more leak fixes, bug in PNG handling (SpartanJ) 1.30 (2011-06-11) added ability to load files via callbacks to accomidate custom input streams (Ben Wenger) removed deprecated format-specific test/load functions removed support for installable file formats (stbi_loader) -- would have been broken for IO callbacks anyway error cases in bmp and tga give messages and don't leak (Raymond Barbiero, grisha) fix inefficiency in decoding 32-bit BMP (David Woo) 1.29 (2010-08-16) various warning fixes from Aurelien Pocheville 1.28 (2010-08-01) fix bug in GIF palette transparency (SpartanJ) 1.27 (2010-08-01) cast-to-stbi_uc to fix warnings 1.26 (2010-07-24) fix bug in file buffering for PNG reported by SpartanJ 1.25 (2010-07-17) refix trans_data warning (Won Chun) 1.24 (2010-07-12) perf improvements reading from files on platforms with lock-heavy fgetc() minor perf improvements for jpeg deprecated type-specific functions so we'll get feedback if they're needed attempt to fix trans_data warning (Won Chun) 1.23 fixed bug in iPhone support 1.22 (2010-07-10) removed image *writing* support stbi_info support from Jetro Lauha GIF support from Jean-Marc Lienher iPhone PNG-extensions from James Brown warning-fixes from Nicolas Schulz and Janez Zemva (i.stbi__err. Janez (U+017D)emva) 1.21 fix use of 'stbi_uc' in header (reported by jon blow) 1.20 added support for Softimage PIC, by Tom Seddon 1.19 bug in interlaced PNG corruption check (found by ryg) 1.18 (2008-08-02) fix a threading bug (local mutable static) 1.17 support interlaced PNG 1.16 major bugfix - stbi__convert_format converted one too many pixels 1.15 initialize some fields for thread safety 1.14 fix threadsafe conversion bug header-file-only version (#define STBI_HEADER_FILE_ONLY before including) 1.13 threadsafe 1.12 const qualifiers in the API 1.11 Support installable IDCT, colorspace conversion routines 1.10 Fixes for 64-bit (don't use "unsigned long") optimized upsampling by Fabian "ryg" Giesen 1.09 Fix format-conversion for PSD code (bad global variables!) 1.08 Thatcher Ulrich's PSD code integrated by Nicolas Schulz 1.07 attempt to fix C++ warning/errors again 1.06 attempt to fix C++ warning/errors again 1.05 fix TGA loading to return correct *comp and use good luminance calc 1.04 default float alpha is 1, not 255; use 'void *' for stbi_image_free 1.03 bugfixes to STBI_NO_STDIO, STBI_NO_HDR 1.02 support for (subset of) HDR files, float interface for preferred access to them 1.01 fix bug: possible bug in handling right-side up bmps... not sure fix bug: the stbi__bmp_load() and stbi__tga_load() functions didn't work at all 1.00 interface to zlib that skips zlib header 0.99 correct handling of alpha in palette 0.98 TGA loader by lonesock; dynamically add loaders (untested) 0.97 jpeg errors on too large a file; also catch another malloc failure 0.96 fix detection of invalid v value - particleman@mollyrocket forum 0.95 during header scan, seek to markers in case of padding 0.94 STBI_NO_STDIO to disable stdio usage; rename all #defines the same 0.93 handle jpegtran output; verbose errors 0.92 read 4,8,16,24,32-bit BMP files of several formats 0.91 output 24-bit Windows 3.0 BMP files 0.90 fix a few more warnings; bump version number to approach 1.0 0.61 bugfixes due to Marc LeBlanc, Christopher Lloyd 0.60 fix compiling as c++ 0.59 fix warnings: merge Dave Moore's -Wall fixes 0.58 fix bug: zlib uncompressed mode len/nlen was wrong endian 0.57 fix bug: jpg last huffman symbol before marker was >9 bits but less than 16 available 0.56 fix bug: zlib uncompressed mode len vs. nlen 0.55 fix bug: restart_interval not initialized to 0 0.54 allow NULL for 'int *comp' 0.53 fix bug in png 3->4; speedup png decoding 0.52 png handles req_comp=3,4 directly; minor cleanup; jpeg comments 0.51 obey req_comp requests, 1-component jpegs return as 1-component, on 'test' only check type, not whether we support this variant 0.50 (2006-11-19) first released version */ /* ------------------------------------------------------------------------------ This software is available under 2 licenses -- choose whichever you prefer. ------------------------------------------------------------------------------ ALTERNATIVE A - MIT License Copyright (c) 2017 Sean Barrett Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ------------------------------------------------------------------------------ ALTERNATIVE B - Public Domain (www.unlicense.org) This is free and unencumbered software released into the public domain. Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means. In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ------------------------------------------------------------------------------ */ ================================================ FILE: src/libraries/tinyexr/tinyexr.h ================================================ /* Copyright (c) 2014 - 2019, Syoyo Fujita and many contributors. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the Syoyo Fujita nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ // TinyEXR contains some OpenEXR code, which is licensed under ------------ /////////////////////////////////////////////////////////////////////////// // // Copyright (c) 2002, Industrial Light & Magic, a division of Lucas // Digital Ltd. LLC // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // * Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // * Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following disclaimer // in the documentation and/or other materials provided with the // distribution. // * Neither the name of Industrial Light & Magic nor the names of // its contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // /////////////////////////////////////////////////////////////////////////// // End of OpenEXR license ------------------------------------------------- #ifndef TINYEXR_H_ #define TINYEXR_H_ // // // Do this: // #define TINYEXR_IMPLEMENTATION // before you include this file in *one* C or C++ file to create the // implementation. // // // i.e. it should look like this: // #include ... // #include ... // #include ... // #define TINYEXR_IMPLEMENTATION // #include "tinyexr.h" // // #include // for size_t #include // guess stdint.h is available(C99) #ifdef __cplusplus extern "C" { #endif // Use embedded miniz or not to decode ZIP format pixel. Linking with zlib // required if this flas is 0. #ifndef TINYEXR_USE_MINIZ #define TINYEXR_USE_MINIZ (1) #endif // Disable PIZ comporession when applying cpplint. #ifndef TINYEXR_USE_PIZ #define TINYEXR_USE_PIZ (1) #endif #ifndef TINYEXR_USE_ZFP #define TINYEXR_USE_ZFP (0) // TinyEXR extension. // http://computation.llnl.gov/projects/floating-point-compression #endif #define TINYEXR_SUCCESS (0) #define TINYEXR_ERROR_INVALID_MAGIC_NUMBER (-1) #define TINYEXR_ERROR_INVALID_EXR_VERSION (-2) #define TINYEXR_ERROR_INVALID_ARGUMENT (-3) #define TINYEXR_ERROR_INVALID_DATA (-4) #define TINYEXR_ERROR_INVALID_FILE (-5) #define TINYEXR_ERROR_INVALID_PARAMETER (-5) #define TINYEXR_ERROR_CANT_OPEN_FILE (-6) #define TINYEXR_ERROR_UNSUPPORTED_FORMAT (-7) #define TINYEXR_ERROR_INVALID_HEADER (-8) #define TINYEXR_ERROR_UNSUPPORTED_FEATURE (-9) #define TINYEXR_ERROR_CANT_WRITE_FILE (-10) #define TINYEXR_ERROR_SERIALZATION_FAILED (-11) // @note { OpenEXR file format: http://www.openexr.com/openexrfilelayout.pdf } // pixel type: possible values are: UINT = 0 HALF = 1 FLOAT = 2 #define TINYEXR_PIXELTYPE_UINT (0) #define TINYEXR_PIXELTYPE_HALF (1) #define TINYEXR_PIXELTYPE_FLOAT (2) #define TINYEXR_MAX_HEADER_ATTRIBUTES (1024) #define TINYEXR_MAX_CUSTOM_ATTRIBUTES (128) #define TINYEXR_COMPRESSIONTYPE_NONE (0) #define TINYEXR_COMPRESSIONTYPE_RLE (1) #define TINYEXR_COMPRESSIONTYPE_ZIPS (2) #define TINYEXR_COMPRESSIONTYPE_ZIP (3) #define TINYEXR_COMPRESSIONTYPE_PIZ (4) #define TINYEXR_COMPRESSIONTYPE_ZFP (128) // TinyEXR extension #define TINYEXR_ZFP_COMPRESSIONTYPE_RATE (0) #define TINYEXR_ZFP_COMPRESSIONTYPE_PRECISION (1) #define TINYEXR_ZFP_COMPRESSIONTYPE_ACCURACY (2) #define TINYEXR_TILE_ONE_LEVEL (0) #define TINYEXR_TILE_MIPMAP_LEVELS (1) #define TINYEXR_TILE_RIPMAP_LEVELS (2) #define TINYEXR_TILE_ROUND_DOWN (0) #define TINYEXR_TILE_ROUND_UP (1) typedef struct _EXRVersion { int version; // this must be 2 int tiled; // tile format image int long_name; // long name attribute int non_image; // deep image(EXR 2.0) int multipart; // multi-part(EXR 2.0) } EXRVersion; typedef struct _EXRAttribute { char name[256]; // name and type are up to 255 chars long. char type[256]; unsigned char *value; // uint8_t* int size; int pad0; } EXRAttribute; typedef struct _EXRChannelInfo { char name[256]; // less than 255 bytes long int pixel_type; int x_sampling; int y_sampling; unsigned char p_linear; unsigned char pad[3]; } EXRChannelInfo; typedef struct _EXRTile { int offset_x; int offset_y; int level_x; int level_y; int width; // actual width in a tile. int height; // actual height int a tile. unsigned char **images; // image[channels][pixels] } EXRTile; typedef struct _EXRHeader { float pixel_aspect_ratio; int line_order; int data_window[4]; int display_window[4]; float screen_window_center[2]; float screen_window_width; int chunk_count; // Properties for tiled format(`tiledesc`). int tiled; int tile_size_x; int tile_size_y; int tile_level_mode; int tile_rounding_mode; int long_name; int non_image; int multipart; unsigned int header_len; // Custom attributes(exludes required attributes(e.g. `channels`, // `compression`, etc) int num_custom_attributes; EXRAttribute *custom_attributes; // array of EXRAttribute. size = // `num_custom_attributes`. EXRChannelInfo *channels; // [num_channels] int *pixel_types; // Loaded pixel type(TINYEXR_PIXELTYPE_*) of `images` for // each channel. This is overwritten with `requested_pixel_types` when // loading. int num_channels; int compression_type; // compression type(TINYEXR_COMPRESSIONTYPE_*) int *requested_pixel_types; // Filled initially by // ParseEXRHeaderFrom(Meomory|File), then users // can edit it(only valid for HALF pixel type // channel) } EXRHeader; typedef struct _EXRMultiPartHeader { int num_headers; EXRHeader *headers; } EXRMultiPartHeader; typedef struct _EXRImage { EXRTile *tiles; // Tiled pixel data. The application must reconstruct image // from tiles manually. NULL if scanline format. unsigned char **images; // image[channels][pixels]. NULL if tiled format. int width; int height; int num_channels; // Properties for tile format. int num_tiles; } EXRImage; typedef struct _EXRMultiPartImage { int num_images; EXRImage *images; } EXRMultiPartImage; typedef struct _DeepImage { const char **channel_names; float ***image; // image[channels][scanlines][samples] int **offset_table; // offset_table[scanline][offsets] int num_channels; int width; int height; int pad0; } DeepImage; // @deprecated { to be removed. } // Loads single-frame OpenEXR image. Assume EXR image contains A(single channel // alpha) or RGB(A) channels. // Application must free image data as returned by `out_rgba` // Result image format is: float x RGBA x width x hight // Returns negative value and may set error string in `err` when there's an // error extern int LoadEXR(float **out_rgba, int *width, int *height, const char *filename, const char **err); // @deprecated { to be removed. } // Simple wrapper API for ParseEXRHeaderFromFile. // checking given file is a EXR file(by just look up header) // @return TINYEXR_SUCCEES for EXR image, TINYEXR_ERROR_INVALID_HEADER for // others extern int IsEXR(const char *filename); // @deprecated { to be removed. } // Saves single-frame OpenEXR image. Assume EXR image contains RGB(A) channels. // components must be 1(Grayscale), 3(RGB) or 4(RGBA). // Input image format is: `float x width x height`, or `float x RGB(A) x width x // hight` // Save image as fp16(HALF) format when `save_as_fp16` is positive non-zero // value. // Save image as fp32(FLOAT) format when `save_as_fp16` is 0. // Use ZIP compression by default. // Returns negative value and may set error string in `err` when there's an // error extern int SaveEXR(const float *data, const int width, const int height, const int components, const int save_as_fp16, const char *filename, const char **err); // Initialize EXRHeader struct extern void InitEXRHeader(EXRHeader *exr_header); // Initialize EXRImage struct extern void InitEXRImage(EXRImage *exr_image); // Free's internal data of EXRHeader struct extern int FreeEXRHeader(EXRHeader *exr_header); // Free's internal data of EXRImage struct extern int FreeEXRImage(EXRImage *exr_image); // Free's error message extern void FreeEXRErrorMessage(const char *msg); // Parse EXR version header of a file. extern int ParseEXRVersionFromFile(EXRVersion *version, const char *filename); // Parse EXR version header from memory-mapped EXR data. extern int ParseEXRVersionFromMemory(EXRVersion *version, const unsigned char *memory, size_t size); // Parse single-part OpenEXR header from a file and initialize `EXRHeader`. // When there was an error message, Application must free `err` with // FreeEXRErrorMessage() extern int ParseEXRHeaderFromFile(EXRHeader *header, const EXRVersion *version, const char *filename, const char **err); // Parse single-part OpenEXR header from a memory and initialize `EXRHeader`. // When there was an error message, Application must free `err` with // FreeEXRErrorMessage() extern int ParseEXRHeaderFromMemory(EXRHeader *header, const EXRVersion *version, const unsigned char *memory, size_t size, const char **err); // Parse multi-part OpenEXR headers from a file and initialize `EXRHeader*` // array. // When there was an error message, Application must free `err` with // FreeEXRErrorMessage() extern int ParseEXRMultipartHeaderFromFile(EXRHeader ***headers, int *num_headers, const EXRVersion *version, const char *filename, const char **err); // Parse multi-part OpenEXR headers from a memory and initialize `EXRHeader*` // array // When there was an error message, Application must free `err` with // FreeEXRErrorMessage() extern int ParseEXRMultipartHeaderFromMemory(EXRHeader ***headers, int *num_headers, const EXRVersion *version, const unsigned char *memory, size_t size, const char **err); // Loads single-part OpenEXR image from a file. // Application must setup `ParseEXRHeaderFromFile` before calling this function. // Application can free EXRImage using `FreeEXRImage` // Returns negative value and may set error string in `err` when there's an // error // When there was an error message, Application must free `err` with // FreeEXRErrorMessage() extern int LoadEXRImageFromFile(EXRImage *image, const EXRHeader *header, const char *filename, const char **err); // Loads single-part OpenEXR image from a memory. // Application must setup `EXRHeader` with // `ParseEXRHeaderFromMemory` before calling this function. // Application can free EXRImage using `FreeEXRImage` // Returns negative value and may set error string in `err` when there's an // error // When there was an error message, Application must free `err` with // FreeEXRErrorMessage() extern int LoadEXRImageFromMemory(EXRImage *image, const EXRHeader *header, const unsigned char *memory, const size_t size, const char **err); // Loads multi-part OpenEXR image from a file. // Application must setup `ParseEXRMultipartHeaderFromFile` before calling this // function. // Application can free EXRImage using `FreeEXRImage` // Returns negative value and may set error string in `err` when there's an // error // When there was an error message, Application must free `err` with // FreeEXRErrorMessage() extern int LoadEXRMultipartImageFromFile(EXRImage *images, const EXRHeader **headers, unsigned int num_parts, const char *filename, const char **err); // Loads multi-part OpenEXR image from a memory. // Application must setup `EXRHeader*` array with // `ParseEXRMultipartHeaderFromMemory` before calling this function. // Application can free EXRImage using `FreeEXRImage` // Returns negative value and may set error string in `err` when there's an // error // When there was an error message, Application must free `err` with // FreeEXRErrorMessage() extern int LoadEXRMultipartImageFromMemory(EXRImage *images, const EXRHeader **headers, unsigned int num_parts, const unsigned char *memory, const size_t size, const char **err); // Saves multi-channel, single-frame OpenEXR image to a file. // Returns negative value and may set error string in `err` when there's an // error // When there was an error message, Application must free `err` with // FreeEXRErrorMessage() extern int SaveEXRImageToFile(const EXRImage *image, const EXRHeader *exr_header, const char *filename, const char **err); // Saves multi-channel, single-frame OpenEXR image to a memory. // Image is compressed using EXRImage.compression value. // Return the number of bytes if success. // Return zero and will set error string in `err` when there's an // error. // When there was an error message, Application must free `err` with // FreeEXRErrorMessage() extern size_t SaveEXRImageToMemory(const EXRImage *image, const EXRHeader *exr_header, unsigned char **memory, const char **err); // Loads single-frame OpenEXR deep image. // Application must free memory of variables in DeepImage(image, offset_table) // Returns negative value and may set error string in `err` when there's an // error // When there was an error message, Application must free `err` with // FreeEXRErrorMessage() extern int LoadDeepEXR(DeepImage *out_image, const char *filename, const char **err); // NOT YET IMPLEMENTED: // Saves single-frame OpenEXR deep image. // Returns negative value and may set error string in `err` when there's an // error // extern int SaveDeepEXR(const DeepImage *in_image, const char *filename, // const char **err); // NOT YET IMPLEMENTED: // Loads multi-part OpenEXR deep image. // Application must free memory of variables in DeepImage(image, offset_table) // extern int LoadMultiPartDeepEXR(DeepImage **out_image, int num_parts, const // char *filename, // const char **err); // For emscripten. // Loads single-frame OpenEXR image from memory. Assume EXR image contains // RGB(A) channels. // Returns negative value and may set error string in `err` when there's an // error // When there was an error message, Application must free `err` with // FreeEXRErrorMessage() extern int LoadEXRFromMemory(float **out_rgba, int *width, int *height, const unsigned char *memory, size_t size, const char **err); #ifdef __cplusplus } #endif #endif // TINYEXR_H_ #ifdef TINYEXR_IMPLEMENTATION #ifndef TINYEXR_IMPLEMENTATION_DEIFNED #define TINYEXR_IMPLEMENTATION_DEIFNED #include #include #include #include #include #include // #include // debug #include #include #include #if __cplusplus > 199711L // C++11 #include #endif // __cplusplus > 199711L #ifdef _OPENMP #include #endif #if TINYEXR_USE_MINIZ #else // Issue #46. Please include your own zlib-compatible API header before // including `tinyexr.h` //#include "zlib.h" #endif #if TINYEXR_USE_ZFP #include "zfp.h" #endif namespace tinyexr { #if __cplusplus > 199711L // C++11 typedef uint64_t tinyexr_uint64; typedef int64_t tinyexr_int64; #else // Although `long long` is not a standard type pre C++11, assume it is defined // as a compiler's extension. #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wc++11-long-long" #endif typedef unsigned long long tinyexr_uint64; typedef long long tinyexr_int64; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif #if TINYEXR_USE_MINIZ namespace miniz { #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wc++11-long-long" #pragma clang diagnostic ignored "-Wold-style-cast" #pragma clang diagnostic ignored "-Wpadded" #pragma clang diagnostic ignored "-Wsign-conversion" #pragma clang diagnostic ignored "-Wc++11-extensions" #pragma clang diagnostic ignored "-Wconversion" #pragma clang diagnostic ignored "-Wunused-function" #pragma clang diagnostic ignored "-Wc++98-compat-pedantic" #pragma clang diagnostic ignored "-Wundef" #if __has_warning("-Wcomma") #pragma clang diagnostic ignored "-Wcomma" #endif #if __has_warning("-Wmacro-redefined") #pragma clang diagnostic ignored "-Wmacro-redefined" #endif #if __has_warning("-Wcast-qual") #pragma clang diagnostic ignored "-Wcast-qual" #endif #if __has_warning("-Wzero-as-null-pointer-constant") #pragma clang diagnostic ignored "-Wzero-as-null-pointer-constant" #endif #if __has_warning("-Wtautological-constant-compare") #pragma clang diagnostic ignored "-Wtautological-constant-compare" #endif #endif /* miniz.c v1.15 - public domain deflate/inflate, zlib-subset, ZIP reading/writing/appending, PNG writing See "unlicense" statement at the end of this file. Rich Geldreich , last updated Oct. 13, 2013 Implements RFC 1950: http://www.ietf.org/rfc/rfc1950.txt and RFC 1951: http://www.ietf.org/rfc/rfc1951.txt Most API's defined in miniz.c are optional. For example, to disable the archive related functions just define MINIZ_NO_ARCHIVE_APIS, or to get rid of all stdio usage define MINIZ_NO_STDIO (see the list below for more macros). * Change History 10/13/13 v1.15 r4 - Interim bugfix release while I work on the next major release with Zip64 support (almost there!): - Critical fix for the MZ_ZIP_FLAG_DO_NOT_SORT_CENTRAL_DIRECTORY bug (thanks kahmyong.moon@hp.com) which could cause locate files to not find files. This bug would only have occured in earlier versions if you explicitly used this flag, OR if you used mz_zip_extract_archive_file_to_heap() or mz_zip_add_mem_to_archive_file_in_place() (which used this flag). If you can't switch to v1.15 but want to fix this bug, just remove the uses of this flag from both helper funcs (and of course don't use the flag). - Bugfix in mz_zip_reader_extract_to_mem_no_alloc() from kymoon when pUser_read_buf is not NULL and compressed size is > uncompressed size - Fixing mz_zip_reader_extract_*() funcs so they don't try to extract compressed data from directory entries, to account for weird zipfiles which contain zero-size compressed data on dir entries. Hopefully this fix won't cause any issues on weird zip archives, because it assumes the low 16-bits of zip external attributes are DOS attributes (which I believe they always are in practice). - Fixing mz_zip_reader_is_file_a_directory() so it doesn't check the internal attributes, just the filename and external attributes - mz_zip_reader_init_file() - missing MZ_FCLOSE() call if the seek failed - Added cmake support for Linux builds which builds all the examples, tested with clang v3.3 and gcc v4.6. - Clang fix for tdefl_write_image_to_png_file_in_memory() from toffaletti - Merged MZ_FORCEINLINE fix from hdeanclark - Fix include before config #ifdef, thanks emil.brink - Added tdefl_write_image_to_png_file_in_memory_ex(): supports Y flipping (super useful for OpenGL apps), and explicit control over the compression level (so you can set it to 1 for real-time compression). - Merged in some compiler fixes from paulharris's github repro. - Retested this build under Windows (VS 2010, including static analysis), tcc 0.9.26, gcc v4.6 and clang v3.3. - Added example6.c, which dumps an image of the mandelbrot set to a PNG file. - Modified example2 to help test the MZ_ZIP_FLAG_DO_NOT_SORT_CENTRAL_DIRECTORY flag more. - In r3: Bugfix to mz_zip_writer_add_file() found during merge: Fix possible src file fclose() leak if alignment bytes+local header file write faiiled - In r4: Minor bugfix to mz_zip_writer_add_from_zip_reader(): Was pushing the wrong central dir header offset, appears harmless in this release, but it became a problem in the zip64 branch 5/20/12 v1.14 - MinGW32/64 GCC 4.6.1 compiler fixes: added MZ_FORCEINLINE, #include (thanks fermtect). 5/19/12 v1.13 - From jason@cornsyrup.org and kelwert@mtu.edu - Fix mz_crc32() so it doesn't compute the wrong CRC-32's when mz_ulong is 64-bit. - Temporarily/locally slammed in "typedef unsigned long mz_ulong" and re-ran a randomized regression test on ~500k files. - Eliminated a bunch of warnings when compiling with GCC 32-bit/64. - Ran all examples, miniz.c, and tinfl.c through MSVC 2008's /analyze (static analysis) option and fixed all warnings (except for the silly "Use of the comma-operator in a tested expression.." analysis warning, which I purposely use to work around a MSVC compiler warning). - Created 32-bit and 64-bit Codeblocks projects/workspace. Built and tested Linux executables. The codeblocks workspace is compatible with Linux+Win32/x64. - Added miniz_tester solution/project, which is a useful little app derived from LZHAM's tester app that I use as part of the regression test. - Ran miniz.c and tinfl.c through another series of regression testing on ~500,000 files and archives. - Modified example5.c so it purposely disables a bunch of high-level functionality (MINIZ_NO_STDIO, etc.). (Thanks to corysama for the MINIZ_NO_STDIO bug report.) - Fix ftell() usage in examples so they exit with an error on files which are too large (a limitation of the examples, not miniz itself). 4/12/12 v1.12 - More comments, added low-level example5.c, fixed a couple minor level_and_flags issues in the archive API's. level_and_flags can now be set to MZ_DEFAULT_COMPRESSION. Thanks to Bruce Dawson for the feedback/bug report. 5/28/11 v1.11 - Added statement from unlicense.org 5/27/11 v1.10 - Substantial compressor optimizations: - Level 1 is now ~4x faster than before. The L1 compressor's throughput now varies between 70-110MB/sec. on a - Core i7 (actual throughput varies depending on the type of data, and x64 vs. x86). - Improved baseline L2-L9 compression perf. Also, greatly improved compression perf. issues on some file types. - Refactored the compression code for better readability and maintainability. - Added level 10 compression level (L10 has slightly better ratio than level 9, but could have a potentially large drop in throughput on some files). 5/15/11 v1.09 - Initial stable release. * Low-level Deflate/Inflate implementation notes: Compression: Use the "tdefl" API's. The compressor supports raw, static, and dynamic blocks, lazy or greedy parsing, match length filtering, RLE-only, and Huffman-only streams. It performs and compresses approximately as well as zlib. Decompression: Use the "tinfl" API's. The entire decompressor is implemented as a single function coroutine: see tinfl_decompress(). It supports decompression into a 32KB (or larger power of 2) wrapping buffer, or into a memory block large enough to hold the entire file. The low-level tdefl/tinfl API's do not make any use of dynamic memory allocation. * zlib-style API notes: miniz.c implements a fairly large subset of zlib. There's enough functionality present for it to be a drop-in zlib replacement in many apps: The z_stream struct, optional memory allocation callbacks deflateInit/deflateInit2/deflate/deflateReset/deflateEnd/deflateBound inflateInit/inflateInit2/inflate/inflateEnd compress, compress2, compressBound, uncompress CRC-32, Adler-32 - Using modern, minimal code size, CPU cache friendly routines. Supports raw deflate streams or standard zlib streams with adler-32 checking. Limitations: The callback API's are not implemented yet. No support for gzip headers or zlib static dictionaries. I've tried to closely emulate zlib's various flavors of stream flushing and return status codes, but there are no guarantees that miniz.c pulls this off perfectly. * PNG writing: See the tdefl_write_image_to_png_file_in_memory() function, originally written by Alex Evans. Supports 1-4 bytes/pixel images. * ZIP archive API notes: The ZIP archive API's where designed with simplicity and efficiency in mind, with just enough abstraction to get the job done with minimal fuss. There are simple API's to retrieve file information, read files from existing archives, create new archives, append new files to existing archives, or clone archive data from one archive to another. It supports archives located in memory or the heap, on disk (using stdio.h), or you can specify custom file read/write callbacks. - Archive reading: Just call this function to read a single file from a disk archive: void *mz_zip_extract_archive_file_to_heap(const char *pZip_filename, const char *pArchive_name, size_t *pSize, mz_uint zip_flags); For more complex cases, use the "mz_zip_reader" functions. Upon opening an archive, the entire central directory is located and read as-is into memory, and subsequent file access only occurs when reading individual files. - Archives file scanning: The simple way is to use this function to scan a loaded archive for a specific file: int mz_zip_reader_locate_file(mz_zip_archive *pZip, const char *pName, const char *pComment, mz_uint flags); The locate operation can optionally check file comments too, which (as one example) can be used to identify multiple versions of the same file in an archive. This function uses a simple linear search through the central directory, so it's not very fast. Alternately, you can iterate through all the files in an archive (using mz_zip_reader_get_num_files()) and retrieve detailed info on each file by calling mz_zip_reader_file_stat(). - Archive creation: Use the "mz_zip_writer" functions. The ZIP writer immediately writes compressed file data to disk and builds an exact image of the central directory in memory. The central directory image is written all at once at the end of the archive file when the archive is finalized. The archive writer can optionally align each file's local header and file data to any power of 2 alignment, which can be useful when the archive will be read from optical media. Also, the writer supports placing arbitrary data blobs at the very beginning of ZIP archives. Archives written using either feature are still readable by any ZIP tool. - Archive appending: The simple way to add a single file to an archive is to call this function: mz_bool mz_zip_add_mem_to_archive_file_in_place(const char *pZip_filename, const char *pArchive_name, const void *pBuf, size_t buf_size, const void *pComment, mz_uint16 comment_size, mz_uint level_and_flags); The archive will be created if it doesn't already exist, otherwise it'll be appended to. Note the appending is done in-place and is not an atomic operation, so if something goes wrong during the operation it's possible the archive could be left without a central directory (although the local file headers and file data will be fine, so the archive will be recoverable). For more complex archive modification scenarios: 1. The safest way is to use a mz_zip_reader to read the existing archive, cloning only those bits you want to preserve into a new archive using using the mz_zip_writer_add_from_zip_reader() function (which compiles the compressed file data as-is). When you're done, delete the old archive and rename the newly written archive, and you're done. This is safe but requires a bunch of temporary disk space or heap memory. 2. Or, you can convert an mz_zip_reader in-place to an mz_zip_writer using mz_zip_writer_init_from_reader(), append new files as needed, then finalize the archive which will write an updated central directory to the original archive. (This is basically what mz_zip_add_mem_to_archive_file_in_place() does.) There's a possibility that the archive's central directory could be lost with this method if anything goes wrong, though. - ZIP archive support limitations: No zip64 or spanning support. Extraction functions can only handle unencrypted, stored or deflated files. Requires streams capable of seeking. * This is a header file library, like stb_image.c. To get only a header file, either cut and paste the below header, or create miniz.h, #define MINIZ_HEADER_FILE_ONLY, and then include miniz.c from it. * Important: For best perf. be sure to customize the below macros for your target platform: #define MINIZ_USE_UNALIGNED_LOADS_AND_STORES 1 #define MINIZ_LITTLE_ENDIAN 1 #define MINIZ_HAS_64BIT_REGISTERS 1 * On platforms using glibc, Be sure to "#define _LARGEFILE64_SOURCE 1" before including miniz.c to ensure miniz uses the 64-bit variants: fopen64(), stat64(), etc. Otherwise you won't be able to process large files (i.e. 32-bit stat() fails for me on files > 0x7FFFFFFF bytes). */ #ifndef MINIZ_HEADER_INCLUDED #define MINIZ_HEADER_INCLUDED //#include // Defines to completely disable specific portions of miniz.c: // If all macros here are defined the only functionality remaining will be // CRC-32, adler-32, tinfl, and tdefl. // Define MINIZ_NO_STDIO to disable all usage and any functions which rely on // stdio for file I/O. //#define MINIZ_NO_STDIO // If MINIZ_NO_TIME is specified then the ZIP archive functions will not be able // to get the current time, or // get/set file times, and the C run-time funcs that get/set times won't be // called. // The current downside is the times written to your archives will be from 1979. #define MINIZ_NO_TIME // Define MINIZ_NO_ARCHIVE_APIS to disable all ZIP archive API's. #define MINIZ_NO_ARCHIVE_APIS // Define MINIZ_NO_ARCHIVE_APIS to disable all writing related ZIP archive // API's. //#define MINIZ_NO_ARCHIVE_WRITING_APIS // Define MINIZ_NO_ZLIB_APIS to remove all ZLIB-style compression/decompression // API's. //#define MINIZ_NO_ZLIB_APIS // Define MINIZ_NO_ZLIB_COMPATIBLE_NAME to disable zlib names, to prevent // conflicts against stock zlib. //#define MINIZ_NO_ZLIB_COMPATIBLE_NAMES // Define MINIZ_NO_MALLOC to disable all calls to malloc, free, and realloc. // Note if MINIZ_NO_MALLOC is defined then the user must always provide custom // user alloc/free/realloc // callbacks to the zlib and archive API's, and a few stand-alone helper API's // which don't provide custom user // functions (such as tdefl_compress_mem_to_heap() and // tinfl_decompress_mem_to_heap()) won't work. //#define MINIZ_NO_MALLOC #if defined(__TINYC__) && (defined(__linux) || defined(__linux__)) // TODO: Work around "error: include file 'sys\utime.h' when compiling with tcc // on Linux #define MINIZ_NO_TIME #endif #if !defined(MINIZ_NO_TIME) && !defined(MINIZ_NO_ARCHIVE_APIS) //#include #endif #if defined(_M_IX86) || defined(_M_X64) || defined(__i386__) || \ defined(__i386) || defined(__i486__) || defined(__i486) || \ defined(i386) || defined(__ia64__) || defined(__x86_64__) // MINIZ_X86_OR_X64_CPU is only used to help set the below macros. #define MINIZ_X86_OR_X64_CPU 1 #endif #if defined(__sparcv9) // Big endian #else #if (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__) || MINIZ_X86_OR_X64_CPU // Set MINIZ_LITTLE_ENDIAN to 1 if the processor is little endian. #define MINIZ_LITTLE_ENDIAN 1 #endif #endif #if MINIZ_X86_OR_X64_CPU // Set MINIZ_USE_UNALIGNED_LOADS_AND_STORES to 1 on CPU's that permit efficient // integer loads and stores from unaligned addresses. //#define MINIZ_USE_UNALIGNED_LOADS_AND_STORES 1 #define MINIZ_USE_UNALIGNED_LOADS_AND_STORES \ 0 // disable to suppress compiler warnings #endif #if defined(_M_X64) || defined(_WIN64) || defined(__MINGW64__) || \ defined(_LP64) || defined(__LP64__) || defined(__ia64__) || \ defined(__x86_64__) // Set MINIZ_HAS_64BIT_REGISTERS to 1 if operations on 64-bit integers are // reasonably fast (and don't involve compiler generated calls to helper // functions). #define MINIZ_HAS_64BIT_REGISTERS 1 #endif #ifdef __cplusplus extern "C" { #endif // ------------------- zlib-style API Definitions. // For more compatibility with zlib, miniz.c uses unsigned long for some // parameters/struct members. Beware: mz_ulong can be either 32 or 64-bits! typedef unsigned long mz_ulong; // mz_free() internally uses the MZ_FREE() macro (which by default calls free() // unless you've modified the MZ_MALLOC macro) to release a block allocated from // the heap. void mz_free(void *p); #define MZ_ADLER32_INIT (1) // mz_adler32() returns the initial adler-32 value to use when called with // ptr==NULL. mz_ulong mz_adler32(mz_ulong adler, const unsigned char *ptr, size_t buf_len); #define MZ_CRC32_INIT (0) // mz_crc32() returns the initial CRC-32 value to use when called with // ptr==NULL. mz_ulong mz_crc32(mz_ulong crc, const unsigned char *ptr, size_t buf_len); // Compression strategies. enum { MZ_DEFAULT_STRATEGY = 0, MZ_FILTERED = 1, MZ_HUFFMAN_ONLY = 2, MZ_RLE = 3, MZ_FIXED = 4 }; // Method #define MZ_DEFLATED 8 #ifndef MINIZ_NO_ZLIB_APIS // Heap allocation callbacks. // Note that mz_alloc_func parameter types purpsosely differ from zlib's: // items/size is size_t, not unsigned long. typedef void *(*mz_alloc_func)(void *opaque, size_t items, size_t size); typedef void (*mz_free_func)(void *opaque, void *address); typedef void *(*mz_realloc_func)(void *opaque, void *address, size_t items, size_t size); #define MZ_VERSION "9.1.15" #define MZ_VERNUM 0x91F0 #define MZ_VER_MAJOR 9 #define MZ_VER_MINOR 1 #define MZ_VER_REVISION 15 #define MZ_VER_SUBREVISION 0 // Flush values. For typical usage you only need MZ_NO_FLUSH and MZ_FINISH. The // other values are for advanced use (refer to the zlib docs). enum { MZ_NO_FLUSH = 0, MZ_PARTIAL_FLUSH = 1, MZ_SYNC_FLUSH = 2, MZ_FULL_FLUSH = 3, MZ_FINISH = 4, MZ_BLOCK = 5 }; // Return status codes. MZ_PARAM_ERROR is non-standard. enum { MZ_OK = 0, MZ_STREAM_END = 1, MZ_NEED_DICT = 2, MZ_ERRNO = -1, MZ_STREAM_ERROR = -2, MZ_DATA_ERROR = -3, MZ_MEM_ERROR = -4, MZ_BUF_ERROR = -5, MZ_VERSION_ERROR = -6, MZ_PARAM_ERROR = -10000 }; // Compression levels: 0-9 are the standard zlib-style levels, 10 is best // possible compression (not zlib compatible, and may be very slow), // MZ_DEFAULT_COMPRESSION=MZ_DEFAULT_LEVEL. enum { MZ_NO_COMPRESSION = 0, MZ_BEST_SPEED = 1, MZ_BEST_COMPRESSION = 9, MZ_UBER_COMPRESSION = 10, MZ_DEFAULT_LEVEL = 6, MZ_DEFAULT_COMPRESSION = -1 }; // Window bits #define MZ_DEFAULT_WINDOW_BITS 15 struct mz_internal_state; // Compression/decompression stream struct. typedef struct mz_stream_s { const unsigned char *next_in; // pointer to next byte to read unsigned int avail_in; // number of bytes available at next_in mz_ulong total_in; // total number of bytes consumed so far unsigned char *next_out; // pointer to next byte to write unsigned int avail_out; // number of bytes that can be written to next_out mz_ulong total_out; // total number of bytes produced so far char *msg; // error msg (unused) struct mz_internal_state *state; // internal state, allocated by zalloc/zfree mz_alloc_func zalloc; // optional heap allocation function (defaults to malloc) mz_free_func zfree; // optional heap free function (defaults to free) void *opaque; // heap alloc function user pointer int data_type; // data_type (unused) mz_ulong adler; // adler32 of the source or uncompressed data mz_ulong reserved; // not used } mz_stream; typedef mz_stream *mz_streamp; // Returns the version string of miniz.c. const char *mz_version(void); // mz_deflateInit() initializes a compressor with default options: // Parameters: // pStream must point to an initialized mz_stream struct. // level must be between [MZ_NO_COMPRESSION, MZ_BEST_COMPRESSION]. // level 1 enables a specially optimized compression function that's been // optimized purely for performance, not ratio. // (This special func. is currently only enabled when // MINIZ_USE_UNALIGNED_LOADS_AND_STORES and MINIZ_LITTLE_ENDIAN are defined.) // Return values: // MZ_OK on success. // MZ_STREAM_ERROR if the stream is bogus. // MZ_PARAM_ERROR if the input parameters are bogus. // MZ_MEM_ERROR on out of memory. int mz_deflateInit(mz_streamp pStream, int level); // mz_deflateInit2() is like mz_deflate(), except with more control: // Additional parameters: // method must be MZ_DEFLATED // window_bits must be MZ_DEFAULT_WINDOW_BITS (to wrap the deflate stream with // zlib header/adler-32 footer) or -MZ_DEFAULT_WINDOW_BITS (raw deflate/no // header or footer) // mem_level must be between [1, 9] (it's checked but ignored by miniz.c) int mz_deflateInit2(mz_streamp pStream, int level, int method, int window_bits, int mem_level, int strategy); // Quickly resets a compressor without having to reallocate anything. Same as // calling mz_deflateEnd() followed by mz_deflateInit()/mz_deflateInit2(). int mz_deflateReset(mz_streamp pStream); // mz_deflate() compresses the input to output, consuming as much of the input // and producing as much output as possible. // Parameters: // pStream is the stream to read from and write to. You must initialize/update // the next_in, avail_in, next_out, and avail_out members. // flush may be MZ_NO_FLUSH, MZ_PARTIAL_FLUSH/MZ_SYNC_FLUSH, MZ_FULL_FLUSH, or // MZ_FINISH. // Return values: // MZ_OK on success (when flushing, or if more input is needed but not // available, and/or there's more output to be written but the output buffer // is full). // MZ_STREAM_END if all input has been consumed and all output bytes have been // written. Don't call mz_deflate() on the stream anymore. // MZ_STREAM_ERROR if the stream is bogus. // MZ_PARAM_ERROR if one of the parameters is invalid. // MZ_BUF_ERROR if no forward progress is possible because the input and/or // output buffers are empty. (Fill up the input buffer or free up some output // space and try again.) int mz_deflate(mz_streamp pStream, int flush); // mz_deflateEnd() deinitializes a compressor: // Return values: // MZ_OK on success. // MZ_STREAM_ERROR if the stream is bogus. int mz_deflateEnd(mz_streamp pStream); // mz_deflateBound() returns a (very) conservative upper bound on the amount of // data that could be generated by deflate(), assuming flush is set to only // MZ_NO_FLUSH or MZ_FINISH. mz_ulong mz_deflateBound(mz_streamp pStream, mz_ulong source_len); // Single-call compression functions mz_compress() and mz_compress2(): // Returns MZ_OK on success, or one of the error codes from mz_deflate() on // failure. int mz_compress(unsigned char *pDest, mz_ulong *pDest_len, const unsigned char *pSource, mz_ulong source_len); int mz_compress2(unsigned char *pDest, mz_ulong *pDest_len, const unsigned char *pSource, mz_ulong source_len, int level); // mz_compressBound() returns a (very) conservative upper bound on the amount of // data that could be generated by calling mz_compress(). mz_ulong mz_compressBound(mz_ulong source_len); // Initializes a decompressor. int mz_inflateInit(mz_streamp pStream); // mz_inflateInit2() is like mz_inflateInit() with an additional option that // controls the window size and whether or not the stream has been wrapped with // a zlib header/footer: // window_bits must be MZ_DEFAULT_WINDOW_BITS (to parse zlib header/footer) or // -MZ_DEFAULT_WINDOW_BITS (raw deflate). int mz_inflateInit2(mz_streamp pStream, int window_bits); // Decompresses the input stream to the output, consuming only as much of the // input as needed, and writing as much to the output as possible. // Parameters: // pStream is the stream to read from and write to. You must initialize/update // the next_in, avail_in, next_out, and avail_out members. // flush may be MZ_NO_FLUSH, MZ_SYNC_FLUSH, or MZ_FINISH. // On the first call, if flush is MZ_FINISH it's assumed the input and output // buffers are both sized large enough to decompress the entire stream in a // single call (this is slightly faster). // MZ_FINISH implies that there are no more source bytes available beside // what's already in the input buffer, and that the output buffer is large // enough to hold the rest of the decompressed data. // Return values: // MZ_OK on success. Either more input is needed but not available, and/or // there's more output to be written but the output buffer is full. // MZ_STREAM_END if all needed input has been consumed and all output bytes // have been written. For zlib streams, the adler-32 of the decompressed data // has also been verified. // MZ_STREAM_ERROR if the stream is bogus. // MZ_DATA_ERROR if the deflate stream is invalid. // MZ_PARAM_ERROR if one of the parameters is invalid. // MZ_BUF_ERROR if no forward progress is possible because the input buffer is // empty but the inflater needs more input to continue, or if the output // buffer is not large enough. Call mz_inflate() again // with more input data, or with more room in the output buffer (except when // using single call decompression, described above). int mz_inflate(mz_streamp pStream, int flush); // Deinitializes a decompressor. int mz_inflateEnd(mz_streamp pStream); // Single-call decompression. // Returns MZ_OK on success, or one of the error codes from mz_inflate() on // failure. int mz_uncompress(unsigned char *pDest, mz_ulong *pDest_len, const unsigned char *pSource, mz_ulong source_len); // Returns a string description of the specified error code, or NULL if the // error code is invalid. const char *mz_error(int err); // Redefine zlib-compatible names to miniz equivalents, so miniz.c can be used // as a drop-in replacement for the subset of zlib that miniz.c supports. // Define MINIZ_NO_ZLIB_COMPATIBLE_NAMES to disable zlib-compatibility if you // use zlib in the same project. #ifndef MINIZ_NO_ZLIB_COMPATIBLE_NAMES typedef unsigned char Byte; typedef unsigned int uInt; typedef mz_ulong uLong; typedef Byte Bytef; typedef uInt uIntf; typedef char charf; typedef int intf; typedef void *voidpf; typedef uLong uLongf; typedef void *voidp; typedef void *const voidpc; #define Z_NULL 0 #define Z_NO_FLUSH MZ_NO_FLUSH #define Z_PARTIAL_FLUSH MZ_PARTIAL_FLUSH #define Z_SYNC_FLUSH MZ_SYNC_FLUSH #define Z_FULL_FLUSH MZ_FULL_FLUSH #define Z_FINISH MZ_FINISH #define Z_BLOCK MZ_BLOCK #define Z_OK MZ_OK #define Z_STREAM_END MZ_STREAM_END #define Z_NEED_DICT MZ_NEED_DICT #define Z_ERRNO MZ_ERRNO #define Z_STREAM_ERROR MZ_STREAM_ERROR #define Z_DATA_ERROR MZ_DATA_ERROR #define Z_MEM_ERROR MZ_MEM_ERROR #define Z_BUF_ERROR MZ_BUF_ERROR #define Z_VERSION_ERROR MZ_VERSION_ERROR #define Z_PARAM_ERROR MZ_PARAM_ERROR #define Z_NO_COMPRESSION MZ_NO_COMPRESSION #define Z_BEST_SPEED MZ_BEST_SPEED #define Z_BEST_COMPRESSION MZ_BEST_COMPRESSION #define Z_DEFAULT_COMPRESSION MZ_DEFAULT_COMPRESSION #define Z_DEFAULT_STRATEGY MZ_DEFAULT_STRATEGY #define Z_FILTERED MZ_FILTERED #define Z_HUFFMAN_ONLY MZ_HUFFMAN_ONLY #define Z_RLE MZ_RLE #define Z_FIXED MZ_FIXED #define Z_DEFLATED MZ_DEFLATED #define Z_DEFAULT_WINDOW_BITS MZ_DEFAULT_WINDOW_BITS #define alloc_func mz_alloc_func #define free_func mz_free_func #define internal_state mz_internal_state #define z_stream mz_stream #define deflateInit mz_deflateInit #define deflateInit2 mz_deflateInit2 #define deflateReset mz_deflateReset #define deflate mz_deflate #define deflateEnd mz_deflateEnd #define deflateBound mz_deflateBound #define compress mz_compress #define compress2 mz_compress2 #define compressBound mz_compressBound #define inflateInit mz_inflateInit #define inflateInit2 mz_inflateInit2 #define inflate mz_inflate #define inflateEnd mz_inflateEnd #define uncompress mz_uncompress #define crc32 mz_crc32 #define adler32 mz_adler32 #define MAX_WBITS 15 #define MAX_MEM_LEVEL 9 #define zError mz_error #define ZLIB_VERSION MZ_VERSION #define ZLIB_VERNUM MZ_VERNUM #define ZLIB_VER_MAJOR MZ_VER_MAJOR #define ZLIB_VER_MINOR MZ_VER_MINOR #define ZLIB_VER_REVISION MZ_VER_REVISION #define ZLIB_VER_SUBREVISION MZ_VER_SUBREVISION #define zlibVersion mz_version #define zlib_version mz_version() #endif // #ifndef MINIZ_NO_ZLIB_COMPATIBLE_NAMES #endif // MINIZ_NO_ZLIB_APIS // ------------------- Types and macros typedef unsigned char mz_uint8; typedef signed short mz_int16; typedef unsigned short mz_uint16; typedef unsigned int mz_uint32; typedef unsigned int mz_uint; typedef long long mz_int64; typedef unsigned long long mz_uint64; typedef int mz_bool; #define MZ_FALSE (0) #define MZ_TRUE (1) // An attempt to work around MSVC's spammy "warning C4127: conditional // expression is constant" message. #ifdef _MSC_VER #define MZ_MACRO_END while (0, 0) #else #define MZ_MACRO_END while (0) #endif // ------------------- ZIP archive reading/writing #ifndef MINIZ_NO_ARCHIVE_APIS enum { MZ_ZIP_MAX_IO_BUF_SIZE = 64 * 1024, MZ_ZIP_MAX_ARCHIVE_FILENAME_SIZE = 260, MZ_ZIP_MAX_ARCHIVE_FILE_COMMENT_SIZE = 256 }; typedef struct { mz_uint32 m_file_index; mz_uint32 m_central_dir_ofs; mz_uint16 m_version_made_by; mz_uint16 m_version_needed; mz_uint16 m_bit_flag; mz_uint16 m_method; #ifndef MINIZ_NO_TIME time_t m_time; #endif mz_uint32 m_crc32; mz_uint64 m_comp_size; mz_uint64 m_uncomp_size; mz_uint16 m_internal_attr; mz_uint32 m_external_attr; mz_uint64 m_local_header_ofs; mz_uint32 m_comment_size; char m_filename[MZ_ZIP_MAX_ARCHIVE_FILENAME_SIZE]; char m_comment[MZ_ZIP_MAX_ARCHIVE_FILE_COMMENT_SIZE]; } mz_zip_archive_file_stat; typedef size_t (*mz_file_read_func)(void *pOpaque, mz_uint64 file_ofs, void *pBuf, size_t n); typedef size_t (*mz_file_write_func)(void *pOpaque, mz_uint64 file_ofs, const void *pBuf, size_t n); struct mz_zip_internal_state_tag; typedef struct mz_zip_internal_state_tag mz_zip_internal_state; typedef enum { MZ_ZIP_MODE_INVALID = 0, MZ_ZIP_MODE_READING = 1, MZ_ZIP_MODE_WRITING = 2, MZ_ZIP_MODE_WRITING_HAS_BEEN_FINALIZED = 3 } mz_zip_mode; typedef struct mz_zip_archive_tag { mz_uint64 m_archive_size; mz_uint64 m_central_directory_file_ofs; mz_uint m_total_files; mz_zip_mode m_zip_mode; mz_uint m_file_offset_alignment; mz_alloc_func m_pAlloc; mz_free_func m_pFree; mz_realloc_func m_pRealloc; void *m_pAlloc_opaque; mz_file_read_func m_pRead; mz_file_write_func m_pWrite; void *m_pIO_opaque; mz_zip_internal_state *m_pState; } mz_zip_archive; typedef enum { MZ_ZIP_FLAG_CASE_SENSITIVE = 0x0100, MZ_ZIP_FLAG_IGNORE_PATH = 0x0200, MZ_ZIP_FLAG_COMPRESSED_DATA = 0x0400, MZ_ZIP_FLAG_DO_NOT_SORT_CENTRAL_DIRECTORY = 0x0800 } mz_zip_flags; // ZIP archive reading // Inits a ZIP archive reader. // These functions read and validate the archive's central directory. mz_bool mz_zip_reader_init(mz_zip_archive *pZip, mz_uint64 size, mz_uint32 flags); mz_bool mz_zip_reader_init_mem(mz_zip_archive *pZip, const void *pMem, size_t size, mz_uint32 flags); #ifndef MINIZ_NO_STDIO mz_bool mz_zip_reader_init_file(mz_zip_archive *pZip, const char *pFilename, mz_uint32 flags); #endif // Returns the total number of files in the archive. mz_uint mz_zip_reader_get_num_files(mz_zip_archive *pZip); // Returns detailed information about an archive file entry. mz_bool mz_zip_reader_file_stat(mz_zip_archive *pZip, mz_uint file_index, mz_zip_archive_file_stat *pStat); // Determines if an archive file entry is a directory entry. mz_bool mz_zip_reader_is_file_a_directory(mz_zip_archive *pZip, mz_uint file_index); mz_bool mz_zip_reader_is_file_encrypted(mz_zip_archive *pZip, mz_uint file_index); // Retrieves the filename of an archive file entry. // Returns the number of bytes written to pFilename, or if filename_buf_size is // 0 this function returns the number of bytes needed to fully store the // filename. mz_uint mz_zip_reader_get_filename(mz_zip_archive *pZip, mz_uint file_index, char *pFilename, mz_uint filename_buf_size); // Attempts to locates a file in the archive's central directory. // Valid flags: MZ_ZIP_FLAG_CASE_SENSITIVE, MZ_ZIP_FLAG_IGNORE_PATH // Returns -1 if the file cannot be found. int mz_zip_reader_locate_file(mz_zip_archive *pZip, const char *pName, const char *pComment, mz_uint flags); // Extracts a archive file to a memory buffer using no memory allocation. mz_bool mz_zip_reader_extract_to_mem_no_alloc(mz_zip_archive *pZip, mz_uint file_index, void *pBuf, size_t buf_size, mz_uint flags, void *pUser_read_buf, size_t user_read_buf_size); mz_bool mz_zip_reader_extract_file_to_mem_no_alloc( mz_zip_archive *pZip, const char *pFilename, void *pBuf, size_t buf_size, mz_uint flags, void *pUser_read_buf, size_t user_read_buf_size); // Extracts a archive file to a memory buffer. mz_bool mz_zip_reader_extract_to_mem(mz_zip_archive *pZip, mz_uint file_index, void *pBuf, size_t buf_size, mz_uint flags); mz_bool mz_zip_reader_extract_file_to_mem(mz_zip_archive *pZip, const char *pFilename, void *pBuf, size_t buf_size, mz_uint flags); // Extracts a archive file to a dynamically allocated heap buffer. void *mz_zip_reader_extract_to_heap(mz_zip_archive *pZip, mz_uint file_index, size_t *pSize, mz_uint flags); void *mz_zip_reader_extract_file_to_heap(mz_zip_archive *pZip, const char *pFilename, size_t *pSize, mz_uint flags); // Extracts a archive file using a callback function to output the file's data. mz_bool mz_zip_reader_extract_to_callback(mz_zip_archive *pZip, mz_uint file_index, mz_file_write_func pCallback, void *pOpaque, mz_uint flags); mz_bool mz_zip_reader_extract_file_to_callback(mz_zip_archive *pZip, const char *pFilename, mz_file_write_func pCallback, void *pOpaque, mz_uint flags); #ifndef MINIZ_NO_STDIO // Extracts a archive file to a disk file and sets its last accessed and // modified times. // This function only extracts files, not archive directory records. mz_bool mz_zip_reader_extract_to_file(mz_zip_archive *pZip, mz_uint file_index, const char *pDst_filename, mz_uint flags); mz_bool mz_zip_reader_extract_file_to_file(mz_zip_archive *pZip, const char *pArchive_filename, const char *pDst_filename, mz_uint flags); #endif // Ends archive reading, freeing all allocations, and closing the input archive // file if mz_zip_reader_init_file() was used. mz_bool mz_zip_reader_end(mz_zip_archive *pZip); // ZIP archive writing #ifndef MINIZ_NO_ARCHIVE_WRITING_APIS // Inits a ZIP archive writer. mz_bool mz_zip_writer_init(mz_zip_archive *pZip, mz_uint64 existing_size); mz_bool mz_zip_writer_init_heap(mz_zip_archive *pZip, size_t size_to_reserve_at_beginning, size_t initial_allocation_size); #ifndef MINIZ_NO_STDIO mz_bool mz_zip_writer_init_file(mz_zip_archive *pZip, const char *pFilename, mz_uint64 size_to_reserve_at_beginning); #endif // Converts a ZIP archive reader object into a writer object, to allow efficient // in-place file appends to occur on an existing archive. // For archives opened using mz_zip_reader_init_file, pFilename must be the // archive's filename so it can be reopened for writing. If the file can't be // reopened, mz_zip_reader_end() will be called. // For archives opened using mz_zip_reader_init_mem, the memory block must be // growable using the realloc callback (which defaults to realloc unless you've // overridden it). // Finally, for archives opened using mz_zip_reader_init, the mz_zip_archive's // user provided m_pWrite function cannot be NULL. // Note: In-place archive modification is not recommended unless you know what // you're doing, because if execution stops or something goes wrong before // the archive is finalized the file's central directory will be hosed. mz_bool mz_zip_writer_init_from_reader(mz_zip_archive *pZip, const char *pFilename); // Adds the contents of a memory buffer to an archive. These functions record // the current local time into the archive. // To add a directory entry, call this method with an archive name ending in a // forwardslash with empty buffer. // level_and_flags - compression level (0-10, see MZ_BEST_SPEED, // MZ_BEST_COMPRESSION, etc.) logically OR'd with zero or more mz_zip_flags, or // just set to MZ_DEFAULT_COMPRESSION. mz_bool mz_zip_writer_add_mem(mz_zip_archive *pZip, const char *pArchive_name, const void *pBuf, size_t buf_size, mz_uint level_and_flags); mz_bool mz_zip_writer_add_mem_ex(mz_zip_archive *pZip, const char *pArchive_name, const void *pBuf, size_t buf_size, const void *pComment, mz_uint16 comment_size, mz_uint level_and_flags, mz_uint64 uncomp_size, mz_uint32 uncomp_crc32); #ifndef MINIZ_NO_STDIO // Adds the contents of a disk file to an archive. This function also records // the disk file's modified time into the archive. // level_and_flags - compression level (0-10, see MZ_BEST_SPEED, // MZ_BEST_COMPRESSION, etc.) logically OR'd with zero or more mz_zip_flags, or // just set to MZ_DEFAULT_COMPRESSION. mz_bool mz_zip_writer_add_file(mz_zip_archive *pZip, const char *pArchive_name, const char *pSrc_filename, const void *pComment, mz_uint16 comment_size, mz_uint level_and_flags); #endif // Adds a file to an archive by fully cloning the data from another archive. // This function fully clones the source file's compressed data (no // recompression), along with its full filename, extra data, and comment fields. mz_bool mz_zip_writer_add_from_zip_reader(mz_zip_archive *pZip, mz_zip_archive *pSource_zip, mz_uint file_index); // Finalizes the archive by writing the central directory records followed by // the end of central directory record. // After an archive is finalized, the only valid call on the mz_zip_archive // struct is mz_zip_writer_end(). // An archive must be manually finalized by calling this function for it to be // valid. mz_bool mz_zip_writer_finalize_archive(mz_zip_archive *pZip); mz_bool mz_zip_writer_finalize_heap_archive(mz_zip_archive *pZip, void **pBuf, size_t *pSize); // Ends archive writing, freeing all allocations, and closing the output file if // mz_zip_writer_init_file() was used. // Note for the archive to be valid, it must have been finalized before ending. mz_bool mz_zip_writer_end(mz_zip_archive *pZip); // Misc. high-level helper functions: // mz_zip_add_mem_to_archive_file_in_place() efficiently (but not atomically) // appends a memory blob to a ZIP archive. // level_and_flags - compression level (0-10, see MZ_BEST_SPEED, // MZ_BEST_COMPRESSION, etc.) logically OR'd with zero or more mz_zip_flags, or // just set to MZ_DEFAULT_COMPRESSION. mz_bool mz_zip_add_mem_to_archive_file_in_place( const char *pZip_filename, const char *pArchive_name, const void *pBuf, size_t buf_size, const void *pComment, mz_uint16 comment_size, mz_uint level_and_flags); // Reads a single file from an archive into a heap block. // Returns NULL on failure. void *mz_zip_extract_archive_file_to_heap(const char *pZip_filename, const char *pArchive_name, size_t *pSize, mz_uint zip_flags); #endif // #ifndef MINIZ_NO_ARCHIVE_WRITING_APIS #endif // #ifndef MINIZ_NO_ARCHIVE_APIS // ------------------- Low-level Decompression API Definitions // Decompression flags used by tinfl_decompress(). // TINFL_FLAG_PARSE_ZLIB_HEADER: If set, the input has a valid zlib header and // ends with an adler32 checksum (it's a valid zlib stream). Otherwise, the // input is a raw deflate stream. // TINFL_FLAG_HAS_MORE_INPUT: If set, there are more input bytes available // beyond the end of the supplied input buffer. If clear, the input buffer // contains all remaining input. // TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF: If set, the output buffer is large // enough to hold the entire decompressed stream. If clear, the output buffer is // at least the size of the dictionary (typically 32KB). // TINFL_FLAG_COMPUTE_ADLER32: Force adler-32 checksum computation of the // decompressed bytes. enum { TINFL_FLAG_PARSE_ZLIB_HEADER = 1, TINFL_FLAG_HAS_MORE_INPUT = 2, TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF = 4, TINFL_FLAG_COMPUTE_ADLER32 = 8 }; // High level decompression functions: // tinfl_decompress_mem_to_heap() decompresses a block in memory to a heap block // allocated via malloc(). // On entry: // pSrc_buf, src_buf_len: Pointer and size of the Deflate or zlib source data // to decompress. // On return: // Function returns a pointer to the decompressed data, or NULL on failure. // *pOut_len will be set to the decompressed data's size, which could be larger // than src_buf_len on uncompressible data. // The caller must call mz_free() on the returned block when it's no longer // needed. void *tinfl_decompress_mem_to_heap(const void *pSrc_buf, size_t src_buf_len, size_t *pOut_len, int flags); // tinfl_decompress_mem_to_mem() decompresses a block in memory to another block // in memory. // Returns TINFL_DECOMPRESS_MEM_TO_MEM_FAILED on failure, or the number of bytes // written on success. #define TINFL_DECOMPRESS_MEM_TO_MEM_FAILED ((size_t)(-1)) size_t tinfl_decompress_mem_to_mem(void *pOut_buf, size_t out_buf_len, const void *pSrc_buf, size_t src_buf_len, int flags); // tinfl_decompress_mem_to_callback() decompresses a block in memory to an // internal 32KB buffer, and a user provided callback function will be called to // flush the buffer. // Returns 1 on success or 0 on failure. typedef int (*tinfl_put_buf_func_ptr)(const void *pBuf, int len, void *pUser); int tinfl_decompress_mem_to_callback(const void *pIn_buf, size_t *pIn_buf_size, tinfl_put_buf_func_ptr pPut_buf_func, void *pPut_buf_user, int flags); struct tinfl_decompressor_tag; typedef struct tinfl_decompressor_tag tinfl_decompressor; // Max size of LZ dictionary. #define TINFL_LZ_DICT_SIZE 32768 // Return status. typedef enum { TINFL_STATUS_BAD_PARAM = -3, TINFL_STATUS_ADLER32_MISMATCH = -2, TINFL_STATUS_FAILED = -1, TINFL_STATUS_DONE = 0, TINFL_STATUS_NEEDS_MORE_INPUT = 1, TINFL_STATUS_HAS_MORE_OUTPUT = 2 } tinfl_status; // Initializes the decompressor to its initial state. #define tinfl_init(r) \ do { \ (r)->m_state = 0; \ } \ MZ_MACRO_END #define tinfl_get_adler32(r) (r)->m_check_adler32 // Main low-level decompressor coroutine function. This is the only function // actually needed for decompression. All the other functions are just // high-level helpers for improved usability. // This is a universal API, i.e. it can be used as a building block to build any // desired higher level decompression API. In the limit case, it can be called // once per every byte input or output. tinfl_status tinfl_decompress(tinfl_decompressor *r, const mz_uint8 *pIn_buf_next, size_t *pIn_buf_size, mz_uint8 *pOut_buf_start, mz_uint8 *pOut_buf_next, size_t *pOut_buf_size, const mz_uint32 decomp_flags); // Internal/private bits follow. enum { TINFL_MAX_HUFF_TABLES = 3, TINFL_MAX_HUFF_SYMBOLS_0 = 288, TINFL_MAX_HUFF_SYMBOLS_1 = 32, TINFL_MAX_HUFF_SYMBOLS_2 = 19, TINFL_FAST_LOOKUP_BITS = 10, TINFL_FAST_LOOKUP_SIZE = 1 << TINFL_FAST_LOOKUP_BITS }; typedef struct { mz_uint8 m_code_size[TINFL_MAX_HUFF_SYMBOLS_0]; mz_int16 m_look_up[TINFL_FAST_LOOKUP_SIZE], m_tree[TINFL_MAX_HUFF_SYMBOLS_0 * 2]; } tinfl_huff_table; #if MINIZ_HAS_64BIT_REGISTERS #define TINFL_USE_64BIT_BITBUF 1 #endif #if TINFL_USE_64BIT_BITBUF typedef mz_uint64 tinfl_bit_buf_t; #define TINFL_BITBUF_SIZE (64) #else typedef mz_uint32 tinfl_bit_buf_t; #define TINFL_BITBUF_SIZE (32) #endif struct tinfl_decompressor_tag { mz_uint32 m_state, m_num_bits, m_zhdr0, m_zhdr1, m_z_adler32, m_final, m_type, m_check_adler32, m_dist, m_counter, m_num_extra, m_table_sizes[TINFL_MAX_HUFF_TABLES]; tinfl_bit_buf_t m_bit_buf; size_t m_dist_from_out_buf_start; tinfl_huff_table m_tables[TINFL_MAX_HUFF_TABLES]; mz_uint8 m_raw_header[4], m_len_codes[TINFL_MAX_HUFF_SYMBOLS_0 + TINFL_MAX_HUFF_SYMBOLS_1 + 137]; }; // ------------------- Low-level Compression API Definitions // Set TDEFL_LESS_MEMORY to 1 to use less memory (compression will be slightly // slower, and raw/dynamic blocks will be output more frequently). #define TDEFL_LESS_MEMORY 0 // tdefl_init() compression flags logically OR'd together (low 12 bits contain // the max. number of probes per dictionary search): // TDEFL_DEFAULT_MAX_PROBES: The compressor defaults to 128 dictionary probes // per dictionary search. 0=Huffman only, 1=Huffman+LZ (fastest/crap // compression), 4095=Huffman+LZ (slowest/best compression). enum { TDEFL_HUFFMAN_ONLY = 0, TDEFL_DEFAULT_MAX_PROBES = 128, TDEFL_MAX_PROBES_MASK = 0xFFF }; // TDEFL_WRITE_ZLIB_HEADER: If set, the compressor outputs a zlib header before // the deflate data, and the Adler-32 of the source data at the end. Otherwise, // you'll get raw deflate data. // TDEFL_COMPUTE_ADLER32: Always compute the adler-32 of the input data (even // when not writing zlib headers). // TDEFL_GREEDY_PARSING_FLAG: Set to use faster greedy parsing, instead of more // efficient lazy parsing. // TDEFL_NONDETERMINISTIC_PARSING_FLAG: Enable to decrease the compressor's // initialization time to the minimum, but the output may vary from run to run // given the same input (depending on the contents of memory). // TDEFL_RLE_MATCHES: Only look for RLE matches (matches with a distance of 1) // TDEFL_FILTER_MATCHES: Discards matches <= 5 chars if enabled. // TDEFL_FORCE_ALL_STATIC_BLOCKS: Disable usage of optimized Huffman tables. // TDEFL_FORCE_ALL_RAW_BLOCKS: Only use raw (uncompressed) deflate blocks. // The low 12 bits are reserved to control the max # of hash probes per // dictionary lookup (see TDEFL_MAX_PROBES_MASK). enum { TDEFL_WRITE_ZLIB_HEADER = 0x01000, TDEFL_COMPUTE_ADLER32 = 0x02000, TDEFL_GREEDY_PARSING_FLAG = 0x04000, TDEFL_NONDETERMINISTIC_PARSING_FLAG = 0x08000, TDEFL_RLE_MATCHES = 0x10000, TDEFL_FILTER_MATCHES = 0x20000, TDEFL_FORCE_ALL_STATIC_BLOCKS = 0x40000, TDEFL_FORCE_ALL_RAW_BLOCKS = 0x80000 }; // High level compression functions: // tdefl_compress_mem_to_heap() compresses a block in memory to a heap block // allocated via malloc(). // On entry: // pSrc_buf, src_buf_len: Pointer and size of source block to compress. // flags: The max match finder probes (default is 128) logically OR'd against // the above flags. Higher probes are slower but improve compression. // On return: // Function returns a pointer to the compressed data, or NULL on failure. // *pOut_len will be set to the compressed data's size, which could be larger // than src_buf_len on uncompressible data. // The caller must free() the returned block when it's no longer needed. void *tdefl_compress_mem_to_heap(const void *pSrc_buf, size_t src_buf_len, size_t *pOut_len, int flags); // tdefl_compress_mem_to_mem() compresses a block in memory to another block in // memory. // Returns 0 on failure. size_t tdefl_compress_mem_to_mem(void *pOut_buf, size_t out_buf_len, const void *pSrc_buf, size_t src_buf_len, int flags); // Compresses an image to a compressed PNG file in memory. // On entry: // pImage, w, h, and num_chans describe the image to compress. num_chans may be // 1, 2, 3, or 4. // The image pitch in bytes per scanline will be w*num_chans. The leftmost // pixel on the top scanline is stored first in memory. // level may range from [0,10], use MZ_NO_COMPRESSION, MZ_BEST_SPEED, // MZ_BEST_COMPRESSION, etc. or a decent default is MZ_DEFAULT_LEVEL // If flip is true, the image will be flipped on the Y axis (useful for OpenGL // apps). // On return: // Function returns a pointer to the compressed data, or NULL on failure. // *pLen_out will be set to the size of the PNG image file. // The caller must mz_free() the returned heap block (which will typically be // larger than *pLen_out) when it's no longer needed. void *tdefl_write_image_to_png_file_in_memory_ex(const void *pImage, int w, int h, int num_chans, size_t *pLen_out, mz_uint level, mz_bool flip); void *tdefl_write_image_to_png_file_in_memory(const void *pImage, int w, int h, int num_chans, size_t *pLen_out); // Output stream interface. The compressor uses this interface to write // compressed data. It'll typically be called TDEFL_OUT_BUF_SIZE at a time. typedef mz_bool (*tdefl_put_buf_func_ptr)(const void *pBuf, int len, void *pUser); // tdefl_compress_mem_to_output() compresses a block to an output stream. The // above helpers use this function internally. mz_bool tdefl_compress_mem_to_output(const void *pBuf, size_t buf_len, tdefl_put_buf_func_ptr pPut_buf_func, void *pPut_buf_user, int flags); enum { TDEFL_MAX_HUFF_TABLES = 3, TDEFL_MAX_HUFF_SYMBOLS_0 = 288, TDEFL_MAX_HUFF_SYMBOLS_1 = 32, TDEFL_MAX_HUFF_SYMBOLS_2 = 19, TDEFL_LZ_DICT_SIZE = 32768, TDEFL_LZ_DICT_SIZE_MASK = TDEFL_LZ_DICT_SIZE - 1, TDEFL_MIN_MATCH_LEN = 3, TDEFL_MAX_MATCH_LEN = 258 }; // TDEFL_OUT_BUF_SIZE MUST be large enough to hold a single entire compressed // output block (using static/fixed Huffman codes). #if TDEFL_LESS_MEMORY enum { TDEFL_LZ_CODE_BUF_SIZE = 24 * 1024, TDEFL_OUT_BUF_SIZE = (TDEFL_LZ_CODE_BUF_SIZE * 13) / 10, TDEFL_MAX_HUFF_SYMBOLS = 288, TDEFL_LZ_HASH_BITS = 12, TDEFL_LEVEL1_HASH_SIZE_MASK = 4095, TDEFL_LZ_HASH_SHIFT = (TDEFL_LZ_HASH_BITS + 2) / 3, TDEFL_LZ_HASH_SIZE = 1 << TDEFL_LZ_HASH_BITS }; #else enum { TDEFL_LZ_CODE_BUF_SIZE = 64 * 1024, TDEFL_OUT_BUF_SIZE = (TDEFL_LZ_CODE_BUF_SIZE * 13) / 10, TDEFL_MAX_HUFF_SYMBOLS = 288, TDEFL_LZ_HASH_BITS = 15, TDEFL_LEVEL1_HASH_SIZE_MASK = 4095, TDEFL_LZ_HASH_SHIFT = (TDEFL_LZ_HASH_BITS + 2) / 3, TDEFL_LZ_HASH_SIZE = 1 << TDEFL_LZ_HASH_BITS }; #endif // The low-level tdefl functions below may be used directly if the above helper // functions aren't flexible enough. The low-level functions don't make any heap // allocations, unlike the above helper functions. typedef enum { TDEFL_STATUS_BAD_PARAM = -2, TDEFL_STATUS_PUT_BUF_FAILED = -1, TDEFL_STATUS_OKAY = 0, TDEFL_STATUS_DONE = 1 } tdefl_status; // Must map to MZ_NO_FLUSH, MZ_SYNC_FLUSH, etc. enums typedef enum { TDEFL_NO_FLUSH = 0, TDEFL_SYNC_FLUSH = 2, TDEFL_FULL_FLUSH = 3, TDEFL_FINISH = 4 } tdefl_flush; // tdefl's compression state structure. typedef struct { tdefl_put_buf_func_ptr m_pPut_buf_func; void *m_pPut_buf_user; mz_uint m_flags, m_max_probes[2]; int m_greedy_parsing; mz_uint m_adler32, m_lookahead_pos, m_lookahead_size, m_dict_size; mz_uint8 *m_pLZ_code_buf, *m_pLZ_flags, *m_pOutput_buf, *m_pOutput_buf_end; mz_uint m_num_flags_left, m_total_lz_bytes, m_lz_code_buf_dict_pos, m_bits_in, m_bit_buffer; mz_uint m_saved_match_dist, m_saved_match_len, m_saved_lit, m_output_flush_ofs, m_output_flush_remaining, m_finished, m_block_index, m_wants_to_finish; tdefl_status m_prev_return_status; const void *m_pIn_buf; void *m_pOut_buf; size_t *m_pIn_buf_size, *m_pOut_buf_size; tdefl_flush m_flush; const mz_uint8 *m_pSrc; size_t m_src_buf_left, m_out_buf_ofs; mz_uint8 m_dict[TDEFL_LZ_DICT_SIZE + TDEFL_MAX_MATCH_LEN - 1]; mz_uint16 m_huff_count[TDEFL_MAX_HUFF_TABLES][TDEFL_MAX_HUFF_SYMBOLS]; mz_uint16 m_huff_codes[TDEFL_MAX_HUFF_TABLES][TDEFL_MAX_HUFF_SYMBOLS]; mz_uint8 m_huff_code_sizes[TDEFL_MAX_HUFF_TABLES][TDEFL_MAX_HUFF_SYMBOLS]; mz_uint8 m_lz_code_buf[TDEFL_LZ_CODE_BUF_SIZE]; mz_uint16 m_next[TDEFL_LZ_DICT_SIZE]; mz_uint16 m_hash[TDEFL_LZ_HASH_SIZE]; mz_uint8 m_output_buf[TDEFL_OUT_BUF_SIZE]; } tdefl_compressor; // Initializes the compressor. // There is no corresponding deinit() function because the tdefl API's do not // dynamically allocate memory. // pBut_buf_func: If NULL, output data will be supplied to the specified // callback. In this case, the user should call the tdefl_compress_buffer() API // for compression. // If pBut_buf_func is NULL the user should always call the tdefl_compress() // API. // flags: See the above enums (TDEFL_HUFFMAN_ONLY, TDEFL_WRITE_ZLIB_HEADER, // etc.) tdefl_status tdefl_init(tdefl_compressor *d, tdefl_put_buf_func_ptr pPut_buf_func, void *pPut_buf_user, int flags); // Compresses a block of data, consuming as much of the specified input buffer // as possible, and writing as much compressed data to the specified output // buffer as possible. tdefl_status tdefl_compress(tdefl_compressor *d, const void *pIn_buf, size_t *pIn_buf_size, void *pOut_buf, size_t *pOut_buf_size, tdefl_flush flush); // tdefl_compress_buffer() is only usable when the tdefl_init() is called with a // non-NULL tdefl_put_buf_func_ptr. // tdefl_compress_buffer() always consumes the entire input buffer. tdefl_status tdefl_compress_buffer(tdefl_compressor *d, const void *pIn_buf, size_t in_buf_size, tdefl_flush flush); tdefl_status tdefl_get_prev_return_status(tdefl_compressor *d); mz_uint32 tdefl_get_adler32(tdefl_compressor *d); // Can't use tdefl_create_comp_flags_from_zip_params if MINIZ_NO_ZLIB_APIS isn't // defined, because it uses some of its macros. #ifndef MINIZ_NO_ZLIB_APIS // Create tdefl_compress() flags given zlib-style compression parameters. // level may range from [0,10] (where 10 is absolute max compression, but may be // much slower on some files) // window_bits may be -15 (raw deflate) or 15 (zlib) // strategy may be either MZ_DEFAULT_STRATEGY, MZ_FILTERED, MZ_HUFFMAN_ONLY, // MZ_RLE, or MZ_FIXED mz_uint tdefl_create_comp_flags_from_zip_params(int level, int window_bits, int strategy); #endif // #ifndef MINIZ_NO_ZLIB_APIS #ifdef __cplusplus } #endif #endif // MINIZ_HEADER_INCLUDED // ------------------- End of Header: Implementation follows. (If you only want // the header, define MINIZ_HEADER_FILE_ONLY.) #ifndef MINIZ_HEADER_FILE_ONLY typedef unsigned char mz_validate_uint16[sizeof(mz_uint16) == 2 ? 1 : -1]; typedef unsigned char mz_validate_uint32[sizeof(mz_uint32) == 4 ? 1 : -1]; typedef unsigned char mz_validate_uint64[sizeof(mz_uint64) == 8 ? 1 : -1]; //#include //#include #define MZ_ASSERT(x) assert(x) #ifdef MINIZ_NO_MALLOC #define MZ_MALLOC(x) NULL #define MZ_FREE(x) (void)x, ((void)0) #define MZ_REALLOC(p, x) NULL #else #define MZ_MALLOC(x) malloc(x) #define MZ_FREE(x) free(x) #define MZ_REALLOC(p, x) realloc(p, x) #endif #define MZ_MAX(a, b) (((a) > (b)) ? (a) : (b)) #define MZ_MIN(a, b) (((a) < (b)) ? (a) : (b)) #define MZ_CLEAR_OBJ(obj) memset(&(obj), 0, sizeof(obj)) #if MINIZ_USE_UNALIGNED_LOADS_AND_STORES && MINIZ_LITTLE_ENDIAN #define MZ_READ_LE16(p) *((const mz_uint16 *)(p)) #define MZ_READ_LE32(p) *((const mz_uint32 *)(p)) #else #define MZ_READ_LE16(p) \ ((mz_uint32)(((const mz_uint8 *)(p))[0]) | \ ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U)) #define MZ_READ_LE32(p) \ ((mz_uint32)(((const mz_uint8 *)(p))[0]) | \ ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U) | \ ((mz_uint32)(((const mz_uint8 *)(p))[2]) << 16U) | \ ((mz_uint32)(((const mz_uint8 *)(p))[3]) << 24U)) #endif #ifdef _MSC_VER #define MZ_FORCEINLINE __forceinline #elif defined(__GNUC__) #define MZ_FORCEINLINE inline __attribute__((__always_inline__)) #else #define MZ_FORCEINLINE inline #endif #ifdef __cplusplus extern "C" { #endif // ------------------- zlib-style API's mz_ulong mz_adler32(mz_ulong adler, const unsigned char *ptr, size_t buf_len) { mz_uint32 i, s1 = (mz_uint32)(adler & 0xffff), s2 = (mz_uint32)(adler >> 16); size_t block_len = buf_len % 5552; if (!ptr) return MZ_ADLER32_INIT; while (buf_len) { for (i = 0; i + 7 < block_len; i += 8, ptr += 8) { s1 += ptr[0], s2 += s1; s1 += ptr[1], s2 += s1; s1 += ptr[2], s2 += s1; s1 += ptr[3], s2 += s1; s1 += ptr[4], s2 += s1; s1 += ptr[5], s2 += s1; s1 += ptr[6], s2 += s1; s1 += ptr[7], s2 += s1; } for (; i < block_len; ++i) s1 += *ptr++, s2 += s1; s1 %= 65521U, s2 %= 65521U; buf_len -= block_len; block_len = 5552; } return (s2 << 16) + s1; } // Karl Malbrain's compact CRC-32. See "A compact CCITT crc16 and crc32 C // implementation that balances processor cache usage against speed": // http://www.geocities.com/malbrain/ mz_ulong mz_crc32(mz_ulong crc, const mz_uint8 *ptr, size_t buf_len) { static const mz_uint32 s_crc32[16] = { 0, 0x1db71064, 0x3b6e20c8, 0x26d930ac, 0x76dc4190, 0x6b6b51f4, 0x4db26158, 0x5005713c, 0xedb88320, 0xf00f9344, 0xd6d6a3e8, 0xcb61b38c, 0x9b64c2b0, 0x86d3d2d4, 0xa00ae278, 0xbdbdf21c}; mz_uint32 crcu32 = (mz_uint32)crc; if (!ptr) return MZ_CRC32_INIT; crcu32 = ~crcu32; while (buf_len--) { mz_uint8 b = *ptr++; crcu32 = (crcu32 >> 4) ^ s_crc32[(crcu32 & 0xF) ^ (b & 0xF)]; crcu32 = (crcu32 >> 4) ^ s_crc32[(crcu32 & 0xF) ^ (b >> 4)]; } return ~crcu32; } void mz_free(void *p) { MZ_FREE(p); } #ifndef MINIZ_NO_ZLIB_APIS static void *def_alloc_func(void *opaque, size_t items, size_t size) { (void)opaque, (void)items, (void)size; return MZ_MALLOC(items * size); } static void def_free_func(void *opaque, void *address) { (void)opaque, (void)address; MZ_FREE(address); } // static void *def_realloc_func(void *opaque, void *address, size_t items, // size_t size) { // (void)opaque, (void)address, (void)items, (void)size; // return MZ_REALLOC(address, items * size); //} const char *mz_version(void) { return MZ_VERSION; } int mz_deflateInit(mz_streamp pStream, int level) { return mz_deflateInit2(pStream, level, MZ_DEFLATED, MZ_DEFAULT_WINDOW_BITS, 9, MZ_DEFAULT_STRATEGY); } int mz_deflateInit2(mz_streamp pStream, int level, int method, int window_bits, int mem_level, int strategy) { tdefl_compressor *pComp; mz_uint comp_flags = TDEFL_COMPUTE_ADLER32 | tdefl_create_comp_flags_from_zip_params(level, window_bits, strategy); if (!pStream) return MZ_STREAM_ERROR; if ((method != MZ_DEFLATED) || ((mem_level < 1) || (mem_level > 9)) || ((window_bits != MZ_DEFAULT_WINDOW_BITS) && (-window_bits != MZ_DEFAULT_WINDOW_BITS))) return MZ_PARAM_ERROR; pStream->data_type = 0; pStream->adler = MZ_ADLER32_INIT; pStream->msg = NULL; pStream->reserved = 0; pStream->total_in = 0; pStream->total_out = 0; if (!pStream->zalloc) pStream->zalloc = def_alloc_func; if (!pStream->zfree) pStream->zfree = def_free_func; pComp = (tdefl_compressor *)pStream->zalloc(pStream->opaque, 1, sizeof(tdefl_compressor)); if (!pComp) return MZ_MEM_ERROR; pStream->state = (struct mz_internal_state *)pComp; if (tdefl_init(pComp, NULL, NULL, comp_flags) != TDEFL_STATUS_OKAY) { mz_deflateEnd(pStream); return MZ_PARAM_ERROR; } return MZ_OK; } int mz_deflateReset(mz_streamp pStream) { if ((!pStream) || (!pStream->state) || (!pStream->zalloc) || (!pStream->zfree)) return MZ_STREAM_ERROR; pStream->total_in = pStream->total_out = 0; tdefl_init((tdefl_compressor *)pStream->state, NULL, NULL, ((tdefl_compressor *)pStream->state)->m_flags); return MZ_OK; } int mz_deflate(mz_streamp pStream, int flush) { size_t in_bytes, out_bytes; mz_ulong orig_total_in, orig_total_out; int mz_status = MZ_OK; if ((!pStream) || (!pStream->state) || (flush < 0) || (flush > MZ_FINISH) || (!pStream->next_out)) return MZ_STREAM_ERROR; if (!pStream->avail_out) return MZ_BUF_ERROR; if (flush == MZ_PARTIAL_FLUSH) flush = MZ_SYNC_FLUSH; if (((tdefl_compressor *)pStream->state)->m_prev_return_status == TDEFL_STATUS_DONE) return (flush == MZ_FINISH) ? MZ_STREAM_END : MZ_BUF_ERROR; orig_total_in = pStream->total_in; orig_total_out = pStream->total_out; for (;;) { tdefl_status defl_status; in_bytes = pStream->avail_in; out_bytes = pStream->avail_out; defl_status = tdefl_compress((tdefl_compressor *)pStream->state, pStream->next_in, &in_bytes, pStream->next_out, &out_bytes, (tdefl_flush)flush); pStream->next_in += (mz_uint)in_bytes; pStream->avail_in -= (mz_uint)in_bytes; pStream->total_in += (mz_uint)in_bytes; pStream->adler = tdefl_get_adler32((tdefl_compressor *)pStream->state); pStream->next_out += (mz_uint)out_bytes; pStream->avail_out -= (mz_uint)out_bytes; pStream->total_out += (mz_uint)out_bytes; if (defl_status < 0) { mz_status = MZ_STREAM_ERROR; break; } else if (defl_status == TDEFL_STATUS_DONE) { mz_status = MZ_STREAM_END; break; } else if (!pStream->avail_out) break; else if ((!pStream->avail_in) && (flush != MZ_FINISH)) { if ((flush) || (pStream->total_in != orig_total_in) || (pStream->total_out != orig_total_out)) break; return MZ_BUF_ERROR; // Can't make forward progress without some input. } } return mz_status; } int mz_deflateEnd(mz_streamp pStream) { if (!pStream) return MZ_STREAM_ERROR; if (pStream->state) { pStream->zfree(pStream->opaque, pStream->state); pStream->state = NULL; } return MZ_OK; } mz_ulong mz_deflateBound(mz_streamp pStream, mz_ulong source_len) { (void)pStream; // This is really over conservative. (And lame, but it's actually pretty // tricky to compute a true upper bound given the way tdefl's blocking works.) return MZ_MAX(128 + (source_len * 110) / 100, 128 + source_len + ((source_len / (31 * 1024)) + 1) * 5); } int mz_compress2(unsigned char *pDest, mz_ulong *pDest_len, const unsigned char *pSource, mz_ulong source_len, int level) { int status; mz_stream stream; memset(&stream, 0, sizeof(stream)); // In case mz_ulong is 64-bits (argh I hate longs). if ((source_len | *pDest_len) > 0xFFFFFFFFU) return MZ_PARAM_ERROR; stream.next_in = pSource; stream.avail_in = (mz_uint32)source_len; stream.next_out = pDest; stream.avail_out = (mz_uint32)*pDest_len; status = mz_deflateInit(&stream, level); if (status != MZ_OK) return status; status = mz_deflate(&stream, MZ_FINISH); if (status != MZ_STREAM_END) { mz_deflateEnd(&stream); return (status == MZ_OK) ? MZ_BUF_ERROR : status; } *pDest_len = stream.total_out; return mz_deflateEnd(&stream); } int mz_compress(unsigned char *pDest, mz_ulong *pDest_len, const unsigned char *pSource, mz_ulong source_len) { return mz_compress2(pDest, pDest_len, pSource, source_len, MZ_DEFAULT_COMPRESSION); } mz_ulong mz_compressBound(mz_ulong source_len) { return mz_deflateBound(NULL, source_len); } typedef struct { tinfl_decompressor m_decomp; mz_uint m_dict_ofs, m_dict_avail, m_first_call, m_has_flushed; int m_window_bits; mz_uint8 m_dict[TINFL_LZ_DICT_SIZE]; tinfl_status m_last_status; } inflate_state; int mz_inflateInit2(mz_streamp pStream, int window_bits) { inflate_state *pDecomp; if (!pStream) return MZ_STREAM_ERROR; if ((window_bits != MZ_DEFAULT_WINDOW_BITS) && (-window_bits != MZ_DEFAULT_WINDOW_BITS)) return MZ_PARAM_ERROR; pStream->data_type = 0; pStream->adler = 0; pStream->msg = NULL; pStream->total_in = 0; pStream->total_out = 0; pStream->reserved = 0; if (!pStream->zalloc) pStream->zalloc = def_alloc_func; if (!pStream->zfree) pStream->zfree = def_free_func; pDecomp = (inflate_state *)pStream->zalloc(pStream->opaque, 1, sizeof(inflate_state)); if (!pDecomp) return MZ_MEM_ERROR; pStream->state = (struct mz_internal_state *)pDecomp; tinfl_init(&pDecomp->m_decomp); pDecomp->m_dict_ofs = 0; pDecomp->m_dict_avail = 0; pDecomp->m_last_status = TINFL_STATUS_NEEDS_MORE_INPUT; pDecomp->m_first_call = 1; pDecomp->m_has_flushed = 0; pDecomp->m_window_bits = window_bits; return MZ_OK; } int mz_inflateInit(mz_streamp pStream) { return mz_inflateInit2(pStream, MZ_DEFAULT_WINDOW_BITS); } int mz_inflate(mz_streamp pStream, int flush) { inflate_state *pState; mz_uint n, first_call, decomp_flags = TINFL_FLAG_COMPUTE_ADLER32; size_t in_bytes, out_bytes, orig_avail_in; tinfl_status status; if ((!pStream) || (!pStream->state)) return MZ_STREAM_ERROR; if (flush == MZ_PARTIAL_FLUSH) flush = MZ_SYNC_FLUSH; if ((flush) && (flush != MZ_SYNC_FLUSH) && (flush != MZ_FINISH)) return MZ_STREAM_ERROR; pState = (inflate_state *)pStream->state; if (pState->m_window_bits > 0) decomp_flags |= TINFL_FLAG_PARSE_ZLIB_HEADER; orig_avail_in = pStream->avail_in; first_call = pState->m_first_call; pState->m_first_call = 0; if (pState->m_last_status < 0) return MZ_DATA_ERROR; if (pState->m_has_flushed && (flush != MZ_FINISH)) return MZ_STREAM_ERROR; pState->m_has_flushed |= (flush == MZ_FINISH); if ((flush == MZ_FINISH) && (first_call)) { // MZ_FINISH on the first call implies that the input and output buffers are // large enough to hold the entire compressed/decompressed file. decomp_flags |= TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF; in_bytes = pStream->avail_in; out_bytes = pStream->avail_out; status = tinfl_decompress(&pState->m_decomp, pStream->next_in, &in_bytes, pStream->next_out, pStream->next_out, &out_bytes, decomp_flags); pState->m_last_status = status; pStream->next_in += (mz_uint)in_bytes; pStream->avail_in -= (mz_uint)in_bytes; pStream->total_in += (mz_uint)in_bytes; pStream->adler = tinfl_get_adler32(&pState->m_decomp); pStream->next_out += (mz_uint)out_bytes; pStream->avail_out -= (mz_uint)out_bytes; pStream->total_out += (mz_uint)out_bytes; if (status < 0) return MZ_DATA_ERROR; else if (status != TINFL_STATUS_DONE) { pState->m_last_status = TINFL_STATUS_FAILED; return MZ_BUF_ERROR; } return MZ_STREAM_END; } // flush != MZ_FINISH then we must assume there's more input. if (flush != MZ_FINISH) decomp_flags |= TINFL_FLAG_HAS_MORE_INPUT; if (pState->m_dict_avail) { n = MZ_MIN(pState->m_dict_avail, pStream->avail_out); memcpy(pStream->next_out, pState->m_dict + pState->m_dict_ofs, n); pStream->next_out += n; pStream->avail_out -= n; pStream->total_out += n; pState->m_dict_avail -= n; pState->m_dict_ofs = (pState->m_dict_ofs + n) & (TINFL_LZ_DICT_SIZE - 1); return ((pState->m_last_status == TINFL_STATUS_DONE) && (!pState->m_dict_avail)) ? MZ_STREAM_END : MZ_OK; } for (;;) { in_bytes = pStream->avail_in; out_bytes = TINFL_LZ_DICT_SIZE - pState->m_dict_ofs; status = tinfl_decompress( &pState->m_decomp, pStream->next_in, &in_bytes, pState->m_dict, pState->m_dict + pState->m_dict_ofs, &out_bytes, decomp_flags); pState->m_last_status = status; pStream->next_in += (mz_uint)in_bytes; pStream->avail_in -= (mz_uint)in_bytes; pStream->total_in += (mz_uint)in_bytes; pStream->adler = tinfl_get_adler32(&pState->m_decomp); pState->m_dict_avail = (mz_uint)out_bytes; n = MZ_MIN(pState->m_dict_avail, pStream->avail_out); memcpy(pStream->next_out, pState->m_dict + pState->m_dict_ofs, n); pStream->next_out += n; pStream->avail_out -= n; pStream->total_out += n; pState->m_dict_avail -= n; pState->m_dict_ofs = (pState->m_dict_ofs + n) & (TINFL_LZ_DICT_SIZE - 1); if (status < 0) return MZ_DATA_ERROR; // Stream is corrupted (there could be some // uncompressed data left in the output dictionary - // oh well). else if ((status == TINFL_STATUS_NEEDS_MORE_INPUT) && (!orig_avail_in)) return MZ_BUF_ERROR; // Signal caller that we can't make forward progress // without supplying more input or by setting flush // to MZ_FINISH. else if (flush == MZ_FINISH) { // The output buffer MUST be large to hold the remaining uncompressed data // when flush==MZ_FINISH. if (status == TINFL_STATUS_DONE) return pState->m_dict_avail ? MZ_BUF_ERROR : MZ_STREAM_END; // status here must be TINFL_STATUS_HAS_MORE_OUTPUT, which means there's // at least 1 more byte on the way. If there's no more room left in the // output buffer then something is wrong. else if (!pStream->avail_out) return MZ_BUF_ERROR; } else if ((status == TINFL_STATUS_DONE) || (!pStream->avail_in) || (!pStream->avail_out) || (pState->m_dict_avail)) break; } return ((status == TINFL_STATUS_DONE) && (!pState->m_dict_avail)) ? MZ_STREAM_END : MZ_OK; } int mz_inflateEnd(mz_streamp pStream) { if (!pStream) return MZ_STREAM_ERROR; if (pStream->state) { pStream->zfree(pStream->opaque, pStream->state); pStream->state = NULL; } return MZ_OK; } int mz_uncompress(unsigned char *pDest, mz_ulong *pDest_len, const unsigned char *pSource, mz_ulong source_len) { mz_stream stream; int status; memset(&stream, 0, sizeof(stream)); // In case mz_ulong is 64-bits (argh I hate longs). if ((source_len | *pDest_len) > 0xFFFFFFFFU) return MZ_PARAM_ERROR; stream.next_in = pSource; stream.avail_in = (mz_uint32)source_len; stream.next_out = pDest; stream.avail_out = (mz_uint32)*pDest_len; status = mz_inflateInit(&stream); if (status != MZ_OK) return status; status = mz_inflate(&stream, MZ_FINISH); if (status != MZ_STREAM_END) { mz_inflateEnd(&stream); return ((status == MZ_BUF_ERROR) && (!stream.avail_in)) ? MZ_DATA_ERROR : status; } *pDest_len = stream.total_out; return mz_inflateEnd(&stream); } const char *mz_error(int err) { static struct { int m_err; const char *m_pDesc; } s_error_descs[] = {{MZ_OK, ""}, {MZ_STREAM_END, "stream end"}, {MZ_NEED_DICT, "need dictionary"}, {MZ_ERRNO, "file error"}, {MZ_STREAM_ERROR, "stream error"}, {MZ_DATA_ERROR, "data error"}, {MZ_MEM_ERROR, "out of memory"}, {MZ_BUF_ERROR, "buf error"}, {MZ_VERSION_ERROR, "version error"}, {MZ_PARAM_ERROR, "parameter error"}}; mz_uint i; for (i = 0; i < sizeof(s_error_descs) / sizeof(s_error_descs[0]); ++i) if (s_error_descs[i].m_err == err) return s_error_descs[i].m_pDesc; return NULL; } #endif // MINIZ_NO_ZLIB_APIS // ------------------- Low-level Decompression (completely independent from all // compression API's) #define TINFL_MEMCPY(d, s, l) memcpy(d, s, l) #define TINFL_MEMSET(p, c, l) memset(p, c, l) #define TINFL_CR_BEGIN \ switch (r->m_state) { \ case 0: #define TINFL_CR_RETURN(state_index, result) \ do { \ status = result; \ r->m_state = state_index; \ goto common_exit; \ case state_index:; \ } \ MZ_MACRO_END #define TINFL_CR_RETURN_FOREVER(state_index, result) \ do { \ for (;;) { \ TINFL_CR_RETURN(state_index, result); \ } \ } \ MZ_MACRO_END #define TINFL_CR_FINISH } // TODO: If the caller has indicated that there's no more input, and we attempt // to read beyond the input buf, then something is wrong with the input because // the inflator never // reads ahead more than it needs to. Currently TINFL_GET_BYTE() pads the end of // the stream with 0's in this scenario. #define TINFL_GET_BYTE(state_index, c) \ do { \ if (pIn_buf_cur >= pIn_buf_end) { \ for (;;) { \ if (decomp_flags & TINFL_FLAG_HAS_MORE_INPUT) { \ TINFL_CR_RETURN(state_index, TINFL_STATUS_NEEDS_MORE_INPUT); \ if (pIn_buf_cur < pIn_buf_end) { \ c = *pIn_buf_cur++; \ break; \ } \ } else { \ c = 0; \ break; \ } \ } \ } else \ c = *pIn_buf_cur++; \ } \ MZ_MACRO_END #define TINFL_NEED_BITS(state_index, n) \ do { \ mz_uint c; \ TINFL_GET_BYTE(state_index, c); \ bit_buf |= (((tinfl_bit_buf_t)c) << num_bits); \ num_bits += 8; \ } while (num_bits < (mz_uint)(n)) #define TINFL_SKIP_BITS(state_index, n) \ do { \ if (num_bits < (mz_uint)(n)) { \ TINFL_NEED_BITS(state_index, n); \ } \ bit_buf >>= (n); \ num_bits -= (n); \ } \ MZ_MACRO_END #define TINFL_GET_BITS(state_index, b, n) \ do { \ if (num_bits < (mz_uint)(n)) { \ TINFL_NEED_BITS(state_index, n); \ } \ b = bit_buf & ((1 << (n)) - 1); \ bit_buf >>= (n); \ num_bits -= (n); \ } \ MZ_MACRO_END // TINFL_HUFF_BITBUF_FILL() is only used rarely, when the number of bytes // remaining in the input buffer falls below 2. // It reads just enough bytes from the input stream that are needed to decode // the next Huffman code (and absolutely no more). It works by trying to fully // decode a // Huffman code by using whatever bits are currently present in the bit buffer. // If this fails, it reads another byte, and tries again until it succeeds or // until the // bit buffer contains >=15 bits (deflate's max. Huffman code size). #define TINFL_HUFF_BITBUF_FILL(state_index, pHuff) \ do { \ temp = (pHuff)->m_look_up[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]; \ if (temp >= 0) { \ code_len = temp >> 9; \ if ((code_len) && (num_bits >= code_len)) break; \ } else if (num_bits > TINFL_FAST_LOOKUP_BITS) { \ code_len = TINFL_FAST_LOOKUP_BITS; \ do { \ temp = (pHuff)->m_tree[~temp + ((bit_buf >> code_len++) & 1)]; \ } while ((temp < 0) && (num_bits >= (code_len + 1))); \ if (temp >= 0) break; \ } \ TINFL_GET_BYTE(state_index, c); \ bit_buf |= (((tinfl_bit_buf_t)c) << num_bits); \ num_bits += 8; \ } while (num_bits < 15); // TINFL_HUFF_DECODE() decodes the next Huffman coded symbol. It's more complex // than you would initially expect because the zlib API expects the decompressor // to never read // beyond the final byte of the deflate stream. (In other words, when this macro // wants to read another byte from the input, it REALLY needs another byte in // order to fully // decode the next Huffman code.) Handling this properly is particularly // important on raw deflate (non-zlib) streams, which aren't followed by a byte // aligned adler-32. // The slow path is only executed at the very end of the input buffer. #define TINFL_HUFF_DECODE(state_index, sym, pHuff) \ do { \ int temp; \ mz_uint code_len, c; \ if (num_bits < 15) { \ if ((pIn_buf_end - pIn_buf_cur) < 2) { \ TINFL_HUFF_BITBUF_FILL(state_index, pHuff); \ } else { \ bit_buf |= (((tinfl_bit_buf_t)pIn_buf_cur[0]) << num_bits) | \ (((tinfl_bit_buf_t)pIn_buf_cur[1]) << (num_bits + 8)); \ pIn_buf_cur += 2; \ num_bits += 16; \ } \ } \ if ((temp = (pHuff)->m_look_up[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]) >= \ 0) \ code_len = temp >> 9, temp &= 511; \ else { \ code_len = TINFL_FAST_LOOKUP_BITS; \ do { \ temp = (pHuff)->m_tree[~temp + ((bit_buf >> code_len++) & 1)]; \ } while (temp < 0); \ } \ sym = temp; \ bit_buf >>= code_len; \ num_bits -= code_len; \ } \ MZ_MACRO_END tinfl_status tinfl_decompress(tinfl_decompressor *r, const mz_uint8 *pIn_buf_next, size_t *pIn_buf_size, mz_uint8 *pOut_buf_start, mz_uint8 *pOut_buf_next, size_t *pOut_buf_size, const mz_uint32 decomp_flags) { static const int s_length_base[31] = { 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0}; static const int s_length_extra[31] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 0, 0}; static const int s_dist_base[32] = { 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577, 0, 0}; static const int s_dist_extra[32] = {0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13}; static const mz_uint8 s_length_dezigzag[19] = { 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15}; static const int s_min_table_sizes[3] = {257, 1, 4}; tinfl_status status = TINFL_STATUS_FAILED; mz_uint32 num_bits, dist, counter, num_extra; tinfl_bit_buf_t bit_buf; const mz_uint8 *pIn_buf_cur = pIn_buf_next, *const pIn_buf_end = pIn_buf_next + *pIn_buf_size; mz_uint8 *pOut_buf_cur = pOut_buf_next, *const pOut_buf_end = pOut_buf_next + *pOut_buf_size; size_t out_buf_size_mask = (decomp_flags & TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF) ? (size_t)-1 : ((pOut_buf_next - pOut_buf_start) + *pOut_buf_size) - 1, dist_from_out_buf_start; // Ensure the output buffer's size is a power of 2, unless the output buffer // is large enough to hold the entire output file (in which case it doesn't // matter). if (((out_buf_size_mask + 1) & out_buf_size_mask) || (pOut_buf_next < pOut_buf_start)) { *pIn_buf_size = *pOut_buf_size = 0; return TINFL_STATUS_BAD_PARAM; } num_bits = r->m_num_bits; bit_buf = r->m_bit_buf; dist = r->m_dist; counter = r->m_counter; num_extra = r->m_num_extra; dist_from_out_buf_start = r->m_dist_from_out_buf_start; TINFL_CR_BEGIN bit_buf = num_bits = dist = counter = num_extra = r->m_zhdr0 = r->m_zhdr1 = 0; r->m_z_adler32 = r->m_check_adler32 = 1; if (decomp_flags & TINFL_FLAG_PARSE_ZLIB_HEADER) { TINFL_GET_BYTE(1, r->m_zhdr0); TINFL_GET_BYTE(2, r->m_zhdr1); counter = (((r->m_zhdr0 * 256 + r->m_zhdr1) % 31 != 0) || (r->m_zhdr1 & 32) || ((r->m_zhdr0 & 15) != 8)); if (!(decomp_flags & TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF)) counter |= (((1U << (8U + (r->m_zhdr0 >> 4))) > 32768U) || ((out_buf_size_mask + 1) < (size_t)(1ULL << (8U + (r->m_zhdr0 >> 4))))); if (counter) { TINFL_CR_RETURN_FOREVER(36, TINFL_STATUS_FAILED); } } do { TINFL_GET_BITS(3, r->m_final, 3); r->m_type = r->m_final >> 1; if (r->m_type == 0) { TINFL_SKIP_BITS(5, num_bits & 7); for (counter = 0; counter < 4; ++counter) { if (num_bits) TINFL_GET_BITS(6, r->m_raw_header[counter], 8); else TINFL_GET_BYTE(7, r->m_raw_header[counter]); } if ((counter = (r->m_raw_header[0] | (r->m_raw_header[1] << 8))) != (mz_uint)(0xFFFF ^ (r->m_raw_header[2] | (r->m_raw_header[3] << 8)))) { TINFL_CR_RETURN_FOREVER(39, TINFL_STATUS_FAILED); } while ((counter) && (num_bits)) { TINFL_GET_BITS(51, dist, 8); while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(52, TINFL_STATUS_HAS_MORE_OUTPUT); } *pOut_buf_cur++ = (mz_uint8)dist; counter--; } while (counter) { size_t n; while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(9, TINFL_STATUS_HAS_MORE_OUTPUT); } while (pIn_buf_cur >= pIn_buf_end) { if (decomp_flags & TINFL_FLAG_HAS_MORE_INPUT) { TINFL_CR_RETURN(38, TINFL_STATUS_NEEDS_MORE_INPUT); } else { TINFL_CR_RETURN_FOREVER(40, TINFL_STATUS_FAILED); } } n = MZ_MIN(MZ_MIN((size_t)(pOut_buf_end - pOut_buf_cur), (size_t)(pIn_buf_end - pIn_buf_cur)), counter); TINFL_MEMCPY(pOut_buf_cur, pIn_buf_cur, n); pIn_buf_cur += n; pOut_buf_cur += n; counter -= (mz_uint)n; } } else if (r->m_type == 3) { TINFL_CR_RETURN_FOREVER(10, TINFL_STATUS_FAILED); } else { if (r->m_type == 1) { mz_uint8 *p = r->m_tables[0].m_code_size; mz_uint i; r->m_table_sizes[0] = 288; r->m_table_sizes[1] = 32; TINFL_MEMSET(r->m_tables[1].m_code_size, 5, 32); for (i = 0; i <= 143; ++i) *p++ = 8; for (; i <= 255; ++i) *p++ = 9; for (; i <= 279; ++i) *p++ = 7; for (; i <= 287; ++i) *p++ = 8; } else { for (counter = 0; counter < 3; counter++) { TINFL_GET_BITS(11, r->m_table_sizes[counter], "\05\05\04"[counter]); r->m_table_sizes[counter] += s_min_table_sizes[counter]; } MZ_CLEAR_OBJ(r->m_tables[2].m_code_size); for (counter = 0; counter < r->m_table_sizes[2]; counter++) { mz_uint s; TINFL_GET_BITS(14, s, 3); r->m_tables[2].m_code_size[s_length_dezigzag[counter]] = (mz_uint8)s; } r->m_table_sizes[2] = 19; } for (; (int)r->m_type >= 0; r->m_type--) { int tree_next, tree_cur; tinfl_huff_table *pTable; mz_uint i, j, used_syms, total, sym_index, next_code[17], total_syms[16]; pTable = &r->m_tables[r->m_type]; MZ_CLEAR_OBJ(total_syms); MZ_CLEAR_OBJ(pTable->m_look_up); MZ_CLEAR_OBJ(pTable->m_tree); for (i = 0; i < r->m_table_sizes[r->m_type]; ++i) total_syms[pTable->m_code_size[i]]++; used_syms = 0, total = 0; next_code[0] = next_code[1] = 0; for (i = 1; i <= 15; ++i) { used_syms += total_syms[i]; next_code[i + 1] = (total = ((total + total_syms[i]) << 1)); } if ((65536 != total) && (used_syms > 1)) { TINFL_CR_RETURN_FOREVER(35, TINFL_STATUS_FAILED); } for (tree_next = -1, sym_index = 0; sym_index < r->m_table_sizes[r->m_type]; ++sym_index) { mz_uint rev_code = 0, l, cur_code, code_size = pTable->m_code_size[sym_index]; if (!code_size) continue; cur_code = next_code[code_size]++; for (l = code_size; l > 0; l--, cur_code >>= 1) rev_code = (rev_code << 1) | (cur_code & 1); if (code_size <= TINFL_FAST_LOOKUP_BITS) { mz_int16 k = (mz_int16)((code_size << 9) | sym_index); while (rev_code < TINFL_FAST_LOOKUP_SIZE) { pTable->m_look_up[rev_code] = k; rev_code += (1 << code_size); } continue; } if (0 == (tree_cur = pTable->m_look_up[rev_code & (TINFL_FAST_LOOKUP_SIZE - 1)])) { pTable->m_look_up[rev_code & (TINFL_FAST_LOOKUP_SIZE - 1)] = (mz_int16)tree_next; tree_cur = tree_next; tree_next -= 2; } rev_code >>= (TINFL_FAST_LOOKUP_BITS - 1); for (j = code_size; j > (TINFL_FAST_LOOKUP_BITS + 1); j--) { tree_cur -= ((rev_code >>= 1) & 1); if (!pTable->m_tree[-tree_cur - 1]) { pTable->m_tree[-tree_cur - 1] = (mz_int16)tree_next; tree_cur = tree_next; tree_next -= 2; } else tree_cur = pTable->m_tree[-tree_cur - 1]; } tree_cur -= ((rev_code >>= 1) & 1); pTable->m_tree[-tree_cur - 1] = (mz_int16)sym_index; } if (r->m_type == 2) { for (counter = 0; counter < (r->m_table_sizes[0] + r->m_table_sizes[1]);) { mz_uint s; TINFL_HUFF_DECODE(16, dist, &r->m_tables[2]); if (dist < 16) { r->m_len_codes[counter++] = (mz_uint8)dist; continue; } if ((dist == 16) && (!counter)) { TINFL_CR_RETURN_FOREVER(17, TINFL_STATUS_FAILED); } num_extra = "\02\03\07"[dist - 16]; TINFL_GET_BITS(18, s, num_extra); s += "\03\03\013"[dist - 16]; TINFL_MEMSET(r->m_len_codes + counter, (dist == 16) ? r->m_len_codes[counter - 1] : 0, s); counter += s; } if ((r->m_table_sizes[0] + r->m_table_sizes[1]) != counter) { TINFL_CR_RETURN_FOREVER(21, TINFL_STATUS_FAILED); } TINFL_MEMCPY(r->m_tables[0].m_code_size, r->m_len_codes, r->m_table_sizes[0]); TINFL_MEMCPY(r->m_tables[1].m_code_size, r->m_len_codes + r->m_table_sizes[0], r->m_table_sizes[1]); } } for (;;) { mz_uint8 *pSrc; for (;;) { if (((pIn_buf_end - pIn_buf_cur) < 4) || ((pOut_buf_end - pOut_buf_cur) < 2)) { TINFL_HUFF_DECODE(23, counter, &r->m_tables[0]); if (counter >= 256) break; while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(24, TINFL_STATUS_HAS_MORE_OUTPUT); } *pOut_buf_cur++ = (mz_uint8)counter; } else { int sym2; mz_uint code_len; #if TINFL_USE_64BIT_BITBUF if (num_bits < 30) { bit_buf |= (((tinfl_bit_buf_t)MZ_READ_LE32(pIn_buf_cur)) << num_bits); pIn_buf_cur += 4; num_bits += 32; } #else if (num_bits < 15) { bit_buf |= (((tinfl_bit_buf_t)MZ_READ_LE16(pIn_buf_cur)) << num_bits); pIn_buf_cur += 2; num_bits += 16; } #endif if ((sym2 = r->m_tables[0] .m_look_up[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]) >= 0) code_len = sym2 >> 9; else { code_len = TINFL_FAST_LOOKUP_BITS; do { sym2 = r->m_tables[0] .m_tree[~sym2 + ((bit_buf >> code_len++) & 1)]; } while (sym2 < 0); } counter = sym2; bit_buf >>= code_len; num_bits -= code_len; if (counter & 256) break; #if !TINFL_USE_64BIT_BITBUF if (num_bits < 15) { bit_buf |= (((tinfl_bit_buf_t)MZ_READ_LE16(pIn_buf_cur)) << num_bits); pIn_buf_cur += 2; num_bits += 16; } #endif if ((sym2 = r->m_tables[0] .m_look_up[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]) >= 0) code_len = sym2 >> 9; else { code_len = TINFL_FAST_LOOKUP_BITS; do { sym2 = r->m_tables[0] .m_tree[~sym2 + ((bit_buf >> code_len++) & 1)]; } while (sym2 < 0); } bit_buf >>= code_len; num_bits -= code_len; pOut_buf_cur[0] = (mz_uint8)counter; if (sym2 & 256) { pOut_buf_cur++; counter = sym2; break; } pOut_buf_cur[1] = (mz_uint8)sym2; pOut_buf_cur += 2; } } if ((counter &= 511) == 256) break; num_extra = s_length_extra[counter - 257]; counter = s_length_base[counter - 257]; if (num_extra) { mz_uint extra_bits; TINFL_GET_BITS(25, extra_bits, num_extra); counter += extra_bits; } TINFL_HUFF_DECODE(26, dist, &r->m_tables[1]); num_extra = s_dist_extra[dist]; dist = s_dist_base[dist]; if (num_extra) { mz_uint extra_bits; TINFL_GET_BITS(27, extra_bits, num_extra); dist += extra_bits; } dist_from_out_buf_start = pOut_buf_cur - pOut_buf_start; if ((dist > dist_from_out_buf_start) && (decomp_flags & TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF)) { TINFL_CR_RETURN_FOREVER(37, TINFL_STATUS_FAILED); } pSrc = pOut_buf_start + ((dist_from_out_buf_start - dist) & out_buf_size_mask); if ((MZ_MAX(pOut_buf_cur, pSrc) + counter) > pOut_buf_end) { while (counter--) { while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(53, TINFL_STATUS_HAS_MORE_OUTPUT); } *pOut_buf_cur++ = pOut_buf_start[(dist_from_out_buf_start++ - dist) & out_buf_size_mask]; } continue; } #if MINIZ_USE_UNALIGNED_LOADS_AND_STORES else if ((counter >= 9) && (counter <= dist)) { const mz_uint8 *pSrc_end = pSrc + (counter & ~7); do { ((mz_uint32 *)pOut_buf_cur)[0] = ((const mz_uint32 *)pSrc)[0]; ((mz_uint32 *)pOut_buf_cur)[1] = ((const mz_uint32 *)pSrc)[1]; pOut_buf_cur += 8; } while ((pSrc += 8) < pSrc_end); if ((counter &= 7) < 3) { if (counter) { pOut_buf_cur[0] = pSrc[0]; if (counter > 1) pOut_buf_cur[1] = pSrc[1]; pOut_buf_cur += counter; } continue; } } #endif do { pOut_buf_cur[0] = pSrc[0]; pOut_buf_cur[1] = pSrc[1]; pOut_buf_cur[2] = pSrc[2]; pOut_buf_cur += 3; pSrc += 3; } while ((int)(counter -= 3) > 2); if ((int)counter > 0) { pOut_buf_cur[0] = pSrc[0]; if ((int)counter > 1) pOut_buf_cur[1] = pSrc[1]; pOut_buf_cur += counter; } } } } while (!(r->m_final & 1)); if (decomp_flags & TINFL_FLAG_PARSE_ZLIB_HEADER) { TINFL_SKIP_BITS(32, num_bits & 7); for (counter = 0; counter < 4; ++counter) { mz_uint s; if (num_bits) TINFL_GET_BITS(41, s, 8); else TINFL_GET_BYTE(42, s); r->m_z_adler32 = (r->m_z_adler32 << 8) | s; } } TINFL_CR_RETURN_FOREVER(34, TINFL_STATUS_DONE); TINFL_CR_FINISH common_exit: r->m_num_bits = num_bits; r->m_bit_buf = bit_buf; r->m_dist = dist; r->m_counter = counter; r->m_num_extra = num_extra; r->m_dist_from_out_buf_start = dist_from_out_buf_start; *pIn_buf_size = pIn_buf_cur - pIn_buf_next; *pOut_buf_size = pOut_buf_cur - pOut_buf_next; if ((decomp_flags & (TINFL_FLAG_PARSE_ZLIB_HEADER | TINFL_FLAG_COMPUTE_ADLER32)) && (status >= 0)) { const mz_uint8 *ptr = pOut_buf_next; size_t buf_len = *pOut_buf_size; mz_uint32 i, s1 = r->m_check_adler32 & 0xffff, s2 = r->m_check_adler32 >> 16; size_t block_len = buf_len % 5552; while (buf_len) { for (i = 0; i + 7 < block_len; i += 8, ptr += 8) { s1 += ptr[0], s2 += s1; s1 += ptr[1], s2 += s1; s1 += ptr[2], s2 += s1; s1 += ptr[3], s2 += s1; s1 += ptr[4], s2 += s1; s1 += ptr[5], s2 += s1; s1 += ptr[6], s2 += s1; s1 += ptr[7], s2 += s1; } for (; i < block_len; ++i) s1 += *ptr++, s2 += s1; s1 %= 65521U, s2 %= 65521U; buf_len -= block_len; block_len = 5552; } r->m_check_adler32 = (s2 << 16) + s1; if ((status == TINFL_STATUS_DONE) && (decomp_flags & TINFL_FLAG_PARSE_ZLIB_HEADER) && (r->m_check_adler32 != r->m_z_adler32)) status = TINFL_STATUS_ADLER32_MISMATCH; } return status; } // Higher level helper functions. void *tinfl_decompress_mem_to_heap(const void *pSrc_buf, size_t src_buf_len, size_t *pOut_len, int flags) { tinfl_decompressor decomp; void *pBuf = NULL, *pNew_buf; size_t src_buf_ofs = 0, out_buf_capacity = 0; *pOut_len = 0; tinfl_init(&decomp); for (;;) { size_t src_buf_size = src_buf_len - src_buf_ofs, dst_buf_size = out_buf_capacity - *pOut_len, new_out_buf_capacity; tinfl_status status = tinfl_decompress( &decomp, (const mz_uint8 *)pSrc_buf + src_buf_ofs, &src_buf_size, (mz_uint8 *)pBuf, pBuf ? (mz_uint8 *)pBuf + *pOut_len : NULL, &dst_buf_size, (flags & ~TINFL_FLAG_HAS_MORE_INPUT) | TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF); if ((status < 0) || (status == TINFL_STATUS_NEEDS_MORE_INPUT)) { MZ_FREE(pBuf); *pOut_len = 0; return NULL; } src_buf_ofs += src_buf_size; *pOut_len += dst_buf_size; if (status == TINFL_STATUS_DONE) break; new_out_buf_capacity = out_buf_capacity * 2; if (new_out_buf_capacity < 128) new_out_buf_capacity = 128; pNew_buf = MZ_REALLOC(pBuf, new_out_buf_capacity); if (!pNew_buf) { MZ_FREE(pBuf); *pOut_len = 0; return NULL; } pBuf = pNew_buf; out_buf_capacity = new_out_buf_capacity; } return pBuf; } size_t tinfl_decompress_mem_to_mem(void *pOut_buf, size_t out_buf_len, const void *pSrc_buf, size_t src_buf_len, int flags) { tinfl_decompressor decomp; tinfl_status status; tinfl_init(&decomp); status = tinfl_decompress(&decomp, (const mz_uint8 *)pSrc_buf, &src_buf_len, (mz_uint8 *)pOut_buf, (mz_uint8 *)pOut_buf, &out_buf_len, (flags & ~TINFL_FLAG_HAS_MORE_INPUT) | TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF); return (status != TINFL_STATUS_DONE) ? TINFL_DECOMPRESS_MEM_TO_MEM_FAILED : out_buf_len; } int tinfl_decompress_mem_to_callback(const void *pIn_buf, size_t *pIn_buf_size, tinfl_put_buf_func_ptr pPut_buf_func, void *pPut_buf_user, int flags) { int result = 0; tinfl_decompressor decomp; mz_uint8 *pDict = (mz_uint8 *)MZ_MALLOC(TINFL_LZ_DICT_SIZE); size_t in_buf_ofs = 0, dict_ofs = 0; if (!pDict) return TINFL_STATUS_FAILED; tinfl_init(&decomp); for (;;) { size_t in_buf_size = *pIn_buf_size - in_buf_ofs, dst_buf_size = TINFL_LZ_DICT_SIZE - dict_ofs; tinfl_status status = tinfl_decompress(&decomp, (const mz_uint8 *)pIn_buf + in_buf_ofs, &in_buf_size, pDict, pDict + dict_ofs, &dst_buf_size, (flags & ~(TINFL_FLAG_HAS_MORE_INPUT | TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF))); in_buf_ofs += in_buf_size; if ((dst_buf_size) && (!(*pPut_buf_func)(pDict + dict_ofs, (int)dst_buf_size, pPut_buf_user))) break; if (status != TINFL_STATUS_HAS_MORE_OUTPUT) { result = (status == TINFL_STATUS_DONE); break; } dict_ofs = (dict_ofs + dst_buf_size) & (TINFL_LZ_DICT_SIZE - 1); } MZ_FREE(pDict); *pIn_buf_size = in_buf_ofs; return result; } // ------------------- Low-level Compression (independent from all decompression // API's) // Purposely making these tables static for faster init and thread safety. static const mz_uint16 s_tdefl_len_sym[256] = { 257, 258, 259, 260, 261, 262, 263, 264, 265, 265, 266, 266, 267, 267, 268, 268, 269, 269, 269, 269, 270, 270, 270, 270, 271, 271, 271, 271, 272, 272, 272, 272, 273, 273, 273, 273, 273, 273, 273, 273, 274, 274, 274, 274, 274, 274, 274, 274, 275, 275, 275, 275, 275, 275, 275, 275, 276, 276, 276, 276, 276, 276, 276, 276, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 285}; static const mz_uint8 s_tdefl_len_extra[256] = { 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0}; static const mz_uint8 s_tdefl_small_dist_sym[512] = { 0, 1, 2, 3, 4, 4, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17}; static const mz_uint8 s_tdefl_small_dist_extra[512] = { 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7}; static const mz_uint8 s_tdefl_large_dist_sym[128] = { 0, 0, 18, 19, 20, 20, 21, 21, 22, 22, 22, 22, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 25, 25, 25, 25, 25, 25, 25, 25, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29}; static const mz_uint8 s_tdefl_large_dist_extra[128] = { 0, 0, 8, 8, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13}; // Radix sorts tdefl_sym_freq[] array by 16-bit key m_key. Returns ptr to sorted // values. typedef struct { mz_uint16 m_key, m_sym_index; } tdefl_sym_freq; static tdefl_sym_freq *tdefl_radix_sort_syms(mz_uint num_syms, tdefl_sym_freq *pSyms0, tdefl_sym_freq *pSyms1) { mz_uint32 total_passes = 2, pass_shift, pass, i, hist[256 * 2]; tdefl_sym_freq *pCur_syms = pSyms0, *pNew_syms = pSyms1; MZ_CLEAR_OBJ(hist); for (i = 0; i < num_syms; i++) { mz_uint freq = pSyms0[i].m_key; hist[freq & 0xFF]++; hist[256 + ((freq >> 8) & 0xFF)]++; } while ((total_passes > 1) && (num_syms == hist[(total_passes - 1) * 256])) total_passes--; for (pass_shift = 0, pass = 0; pass < total_passes; pass++, pass_shift += 8) { const mz_uint32 *pHist = &hist[pass << 8]; mz_uint offsets[256], cur_ofs = 0; for (i = 0; i < 256; i++) { offsets[i] = cur_ofs; cur_ofs += pHist[i]; } for (i = 0; i < num_syms; i++) pNew_syms[offsets[(pCur_syms[i].m_key >> pass_shift) & 0xFF]++] = pCur_syms[i]; { tdefl_sym_freq *t = pCur_syms; pCur_syms = pNew_syms; pNew_syms = t; } } return pCur_syms; } // tdefl_calculate_minimum_redundancy() originally written by: Alistair Moffat, // alistair@cs.mu.oz.au, Jyrki Katajainen, jyrki@diku.dk, November 1996. static void tdefl_calculate_minimum_redundancy(tdefl_sym_freq *A, int n) { int root, leaf, next, avbl, used, dpth; if (n == 0) return; else if (n == 1) { A[0].m_key = 1; return; } A[0].m_key += A[1].m_key; root = 0; leaf = 2; for (next = 1; next < n - 1; next++) { if (leaf >= n || A[root].m_key < A[leaf].m_key) { A[next].m_key = A[root].m_key; A[root++].m_key = (mz_uint16)next; } else A[next].m_key = A[leaf++].m_key; if (leaf >= n || (root < next && A[root].m_key < A[leaf].m_key)) { A[next].m_key = (mz_uint16)(A[next].m_key + A[root].m_key); A[root++].m_key = (mz_uint16)next; } else A[next].m_key = (mz_uint16)(A[next].m_key + A[leaf++].m_key); } A[n - 2].m_key = 0; for (next = n - 3; next >= 0; next--) A[next].m_key = A[A[next].m_key].m_key + 1; avbl = 1; used = dpth = 0; root = n - 2; next = n - 1; while (avbl > 0) { while (root >= 0 && (int)A[root].m_key == dpth) { used++; root--; } while (avbl > used) { A[next--].m_key = (mz_uint16)(dpth); avbl--; } avbl = 2 * used; dpth++; used = 0; } } // Limits canonical Huffman code table's max code size. enum { TDEFL_MAX_SUPPORTED_HUFF_CODESIZE = 32 }; static void tdefl_huffman_enforce_max_code_size(int *pNum_codes, int code_list_len, int max_code_size) { int i; mz_uint32 total = 0; if (code_list_len <= 1) return; for (i = max_code_size + 1; i <= TDEFL_MAX_SUPPORTED_HUFF_CODESIZE; i++) pNum_codes[max_code_size] += pNum_codes[i]; for (i = max_code_size; i > 0; i--) total += (((mz_uint32)pNum_codes[i]) << (max_code_size - i)); while (total != (1UL << max_code_size)) { pNum_codes[max_code_size]--; for (i = max_code_size - 1; i > 0; i--) if (pNum_codes[i]) { pNum_codes[i]--; pNum_codes[i + 1] += 2; break; } total--; } } static void tdefl_optimize_huffman_table(tdefl_compressor *d, int table_num, int table_len, int code_size_limit, int static_table) { int i, j, l, num_codes[1 + TDEFL_MAX_SUPPORTED_HUFF_CODESIZE]; mz_uint next_code[TDEFL_MAX_SUPPORTED_HUFF_CODESIZE + 1]; MZ_CLEAR_OBJ(num_codes); if (static_table) { for (i = 0; i < table_len; i++) num_codes[d->m_huff_code_sizes[table_num][i]]++; } else { tdefl_sym_freq syms0[TDEFL_MAX_HUFF_SYMBOLS], syms1[TDEFL_MAX_HUFF_SYMBOLS], *pSyms; int num_used_syms = 0; const mz_uint16 *pSym_count = &d->m_huff_count[table_num][0]; for (i = 0; i < table_len; i++) if (pSym_count[i]) { syms0[num_used_syms].m_key = (mz_uint16)pSym_count[i]; syms0[num_used_syms++].m_sym_index = (mz_uint16)i; } pSyms = tdefl_radix_sort_syms(num_used_syms, syms0, syms1); tdefl_calculate_minimum_redundancy(pSyms, num_used_syms); for (i = 0; i < num_used_syms; i++) num_codes[pSyms[i].m_key]++; tdefl_huffman_enforce_max_code_size(num_codes, num_used_syms, code_size_limit); MZ_CLEAR_OBJ(d->m_huff_code_sizes[table_num]); MZ_CLEAR_OBJ(d->m_huff_codes[table_num]); for (i = 1, j = num_used_syms; i <= code_size_limit; i++) for (l = num_codes[i]; l > 0; l--) d->m_huff_code_sizes[table_num][pSyms[--j].m_sym_index] = (mz_uint8)(i); } next_code[1] = 0; for (j = 0, i = 2; i <= code_size_limit; i++) next_code[i] = j = ((j + num_codes[i - 1]) << 1); for (i = 0; i < table_len; i++) { mz_uint rev_code = 0, code, code_size; if ((code_size = d->m_huff_code_sizes[table_num][i]) == 0) continue; code = next_code[code_size]++; for (l = code_size; l > 0; l--, code >>= 1) rev_code = (rev_code << 1) | (code & 1); d->m_huff_codes[table_num][i] = (mz_uint16)rev_code; } } #define TDEFL_PUT_BITS(b, l) \ do { \ mz_uint bits = b; \ mz_uint len = l; \ MZ_ASSERT(bits <= ((1U << len) - 1U)); \ d->m_bit_buffer |= (bits << d->m_bits_in); \ d->m_bits_in += len; \ while (d->m_bits_in >= 8) { \ if (d->m_pOutput_buf < d->m_pOutput_buf_end) \ *d->m_pOutput_buf++ = (mz_uint8)(d->m_bit_buffer); \ d->m_bit_buffer >>= 8; \ d->m_bits_in -= 8; \ } \ } \ MZ_MACRO_END #define TDEFL_RLE_PREV_CODE_SIZE() \ { \ if (rle_repeat_count) { \ if (rle_repeat_count < 3) { \ d->m_huff_count[2][prev_code_size] = (mz_uint16)( \ d->m_huff_count[2][prev_code_size] + rle_repeat_count); \ while (rle_repeat_count--) \ packed_code_sizes[num_packed_code_sizes++] = prev_code_size; \ } else { \ d->m_huff_count[2][16] = (mz_uint16)(d->m_huff_count[2][16] + 1); \ packed_code_sizes[num_packed_code_sizes++] = 16; \ packed_code_sizes[num_packed_code_sizes++] = \ (mz_uint8)(rle_repeat_count - 3); \ } \ rle_repeat_count = 0; \ } \ } #define TDEFL_RLE_ZERO_CODE_SIZE() \ { \ if (rle_z_count) { \ if (rle_z_count < 3) { \ d->m_huff_count[2][0] = \ (mz_uint16)(d->m_huff_count[2][0] + rle_z_count); \ while (rle_z_count--) packed_code_sizes[num_packed_code_sizes++] = 0; \ } else if (rle_z_count <= 10) { \ d->m_huff_count[2][17] = (mz_uint16)(d->m_huff_count[2][17] + 1); \ packed_code_sizes[num_packed_code_sizes++] = 17; \ packed_code_sizes[num_packed_code_sizes++] = \ (mz_uint8)(rle_z_count - 3); \ } else { \ d->m_huff_count[2][18] = (mz_uint16)(d->m_huff_count[2][18] + 1); \ packed_code_sizes[num_packed_code_sizes++] = 18; \ packed_code_sizes[num_packed_code_sizes++] = \ (mz_uint8)(rle_z_count - 11); \ } \ rle_z_count = 0; \ } \ } static mz_uint8 s_tdefl_packed_code_size_syms_swizzle[] = { 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15}; static void tdefl_start_dynamic_block(tdefl_compressor *d) { int num_lit_codes, num_dist_codes, num_bit_lengths; mz_uint i, total_code_sizes_to_pack, num_packed_code_sizes, rle_z_count, rle_repeat_count, packed_code_sizes_index; mz_uint8 code_sizes_to_pack[TDEFL_MAX_HUFF_SYMBOLS_0 + TDEFL_MAX_HUFF_SYMBOLS_1], packed_code_sizes[TDEFL_MAX_HUFF_SYMBOLS_0 + TDEFL_MAX_HUFF_SYMBOLS_1], prev_code_size = 0xFF; d->m_huff_count[0][256] = 1; tdefl_optimize_huffman_table(d, 0, TDEFL_MAX_HUFF_SYMBOLS_0, 15, MZ_FALSE); tdefl_optimize_huffman_table(d, 1, TDEFL_MAX_HUFF_SYMBOLS_1, 15, MZ_FALSE); for (num_lit_codes = 286; num_lit_codes > 257; num_lit_codes--) if (d->m_huff_code_sizes[0][num_lit_codes - 1]) break; for (num_dist_codes = 30; num_dist_codes > 1; num_dist_codes--) if (d->m_huff_code_sizes[1][num_dist_codes - 1]) break; memcpy(code_sizes_to_pack, &d->m_huff_code_sizes[0][0], num_lit_codes); memcpy(code_sizes_to_pack + num_lit_codes, &d->m_huff_code_sizes[1][0], num_dist_codes); total_code_sizes_to_pack = num_lit_codes + num_dist_codes; num_packed_code_sizes = 0; rle_z_count = 0; rle_repeat_count = 0; memset(&d->m_huff_count[2][0], 0, sizeof(d->m_huff_count[2][0]) * TDEFL_MAX_HUFF_SYMBOLS_2); for (i = 0; i < total_code_sizes_to_pack; i++) { mz_uint8 code_size = code_sizes_to_pack[i]; if (!code_size) { TDEFL_RLE_PREV_CODE_SIZE(); if (++rle_z_count == 138) { TDEFL_RLE_ZERO_CODE_SIZE(); } } else { TDEFL_RLE_ZERO_CODE_SIZE(); if (code_size != prev_code_size) { TDEFL_RLE_PREV_CODE_SIZE(); d->m_huff_count[2][code_size] = (mz_uint16)(d->m_huff_count[2][code_size] + 1); packed_code_sizes[num_packed_code_sizes++] = code_size; } else if (++rle_repeat_count == 6) { TDEFL_RLE_PREV_CODE_SIZE(); } } prev_code_size = code_size; } if (rle_repeat_count) { TDEFL_RLE_PREV_CODE_SIZE(); } else { TDEFL_RLE_ZERO_CODE_SIZE(); } tdefl_optimize_huffman_table(d, 2, TDEFL_MAX_HUFF_SYMBOLS_2, 7, MZ_FALSE); TDEFL_PUT_BITS(2, 2); TDEFL_PUT_BITS(num_lit_codes - 257, 5); TDEFL_PUT_BITS(num_dist_codes - 1, 5); for (num_bit_lengths = 18; num_bit_lengths >= 0; num_bit_lengths--) if (d->m_huff_code_sizes [2][s_tdefl_packed_code_size_syms_swizzle[num_bit_lengths]]) break; num_bit_lengths = MZ_MAX(4, (num_bit_lengths + 1)); TDEFL_PUT_BITS(num_bit_lengths - 4, 4); for (i = 0; (int)i < num_bit_lengths; i++) TDEFL_PUT_BITS( d->m_huff_code_sizes[2][s_tdefl_packed_code_size_syms_swizzle[i]], 3); for (packed_code_sizes_index = 0; packed_code_sizes_index < num_packed_code_sizes;) { mz_uint code = packed_code_sizes[packed_code_sizes_index++]; MZ_ASSERT(code < TDEFL_MAX_HUFF_SYMBOLS_2); TDEFL_PUT_BITS(d->m_huff_codes[2][code], d->m_huff_code_sizes[2][code]); if (code >= 16) TDEFL_PUT_BITS(packed_code_sizes[packed_code_sizes_index++], "\02\03\07"[code - 16]); } } static void tdefl_start_static_block(tdefl_compressor *d) { mz_uint i; mz_uint8 *p = &d->m_huff_code_sizes[0][0]; for (i = 0; i <= 143; ++i) *p++ = 8; for (; i <= 255; ++i) *p++ = 9; for (; i <= 279; ++i) *p++ = 7; for (; i <= 287; ++i) *p++ = 8; memset(d->m_huff_code_sizes[1], 5, 32); tdefl_optimize_huffman_table(d, 0, 288, 15, MZ_TRUE); tdefl_optimize_huffman_table(d, 1, 32, 15, MZ_TRUE); TDEFL_PUT_BITS(1, 2); } static const mz_uint mz_bitmasks[17] = { 0x0000, 0x0001, 0x0003, 0x0007, 0x000F, 0x001F, 0x003F, 0x007F, 0x00FF, 0x01FF, 0x03FF, 0x07FF, 0x0FFF, 0x1FFF, 0x3FFF, 0x7FFF, 0xFFFF}; #if MINIZ_USE_UNALIGNED_LOADS_AND_STORES && MINIZ_LITTLE_ENDIAN && \ MINIZ_HAS_64BIT_REGISTERS static mz_bool tdefl_compress_lz_codes(tdefl_compressor *d) { mz_uint flags; mz_uint8 *pLZ_codes; mz_uint8 *pOutput_buf = d->m_pOutput_buf; mz_uint8 *pLZ_code_buf_end = d->m_pLZ_code_buf; mz_uint64 bit_buffer = d->m_bit_buffer; mz_uint bits_in = d->m_bits_in; #define TDEFL_PUT_BITS_FAST(b, l) \ { \ bit_buffer |= (((mz_uint64)(b)) << bits_in); \ bits_in += (l); \ } flags = 1; for (pLZ_codes = d->m_lz_code_buf; pLZ_codes < pLZ_code_buf_end; flags >>= 1) { if (flags == 1) flags = *pLZ_codes++ | 0x100; if (flags & 1) { mz_uint s0, s1, n0, n1, sym, num_extra_bits; mz_uint match_len = pLZ_codes[0], match_dist = *(const mz_uint16 *)(pLZ_codes + 1); pLZ_codes += 3; MZ_ASSERT(d->m_huff_code_sizes[0][s_tdefl_len_sym[match_len]]); TDEFL_PUT_BITS_FAST(d->m_huff_codes[0][s_tdefl_len_sym[match_len]], d->m_huff_code_sizes[0][s_tdefl_len_sym[match_len]]); TDEFL_PUT_BITS_FAST(match_len & mz_bitmasks[s_tdefl_len_extra[match_len]], s_tdefl_len_extra[match_len]); // This sequence coaxes MSVC into using cmov's vs. jmp's. s0 = s_tdefl_small_dist_sym[match_dist & 511]; n0 = s_tdefl_small_dist_extra[match_dist & 511]; s1 = s_tdefl_large_dist_sym[match_dist >> 8]; n1 = s_tdefl_large_dist_extra[match_dist >> 8]; sym = (match_dist < 512) ? s0 : s1; num_extra_bits = (match_dist < 512) ? n0 : n1; MZ_ASSERT(d->m_huff_code_sizes[1][sym]); TDEFL_PUT_BITS_FAST(d->m_huff_codes[1][sym], d->m_huff_code_sizes[1][sym]); TDEFL_PUT_BITS_FAST(match_dist & mz_bitmasks[num_extra_bits], num_extra_bits); } else { mz_uint lit = *pLZ_codes++; MZ_ASSERT(d->m_huff_code_sizes[0][lit]); TDEFL_PUT_BITS_FAST(d->m_huff_codes[0][lit], d->m_huff_code_sizes[0][lit]); if (((flags & 2) == 0) && (pLZ_codes < pLZ_code_buf_end)) { flags >>= 1; lit = *pLZ_codes++; MZ_ASSERT(d->m_huff_code_sizes[0][lit]); TDEFL_PUT_BITS_FAST(d->m_huff_codes[0][lit], d->m_huff_code_sizes[0][lit]); if (((flags & 2) == 0) && (pLZ_codes < pLZ_code_buf_end)) { flags >>= 1; lit = *pLZ_codes++; MZ_ASSERT(d->m_huff_code_sizes[0][lit]); TDEFL_PUT_BITS_FAST(d->m_huff_codes[0][lit], d->m_huff_code_sizes[0][lit]); } } } if (pOutput_buf >= d->m_pOutput_buf_end) return MZ_FALSE; *(mz_uint64 *)pOutput_buf = bit_buffer; pOutput_buf += (bits_in >> 3); bit_buffer >>= (bits_in & ~7); bits_in &= 7; } #undef TDEFL_PUT_BITS_FAST d->m_pOutput_buf = pOutput_buf; d->m_bits_in = 0; d->m_bit_buffer = 0; while (bits_in) { mz_uint32 n = MZ_MIN(bits_in, 16); TDEFL_PUT_BITS((mz_uint)bit_buffer & mz_bitmasks[n], n); bit_buffer >>= n; bits_in -= n; } TDEFL_PUT_BITS(d->m_huff_codes[0][256], d->m_huff_code_sizes[0][256]); return (d->m_pOutput_buf < d->m_pOutput_buf_end); } #else static mz_bool tdefl_compress_lz_codes(tdefl_compressor *d) { mz_uint flags; mz_uint8 *pLZ_codes; flags = 1; for (pLZ_codes = d->m_lz_code_buf; pLZ_codes < d->m_pLZ_code_buf; flags >>= 1) { if (flags == 1) flags = *pLZ_codes++ | 0x100; if (flags & 1) { mz_uint sym, num_extra_bits; mz_uint match_len = pLZ_codes[0], match_dist = (pLZ_codes[1] | (pLZ_codes[2] << 8)); pLZ_codes += 3; MZ_ASSERT(d->m_huff_code_sizes[0][s_tdefl_len_sym[match_len]]); TDEFL_PUT_BITS(d->m_huff_codes[0][s_tdefl_len_sym[match_len]], d->m_huff_code_sizes[0][s_tdefl_len_sym[match_len]]); TDEFL_PUT_BITS(match_len & mz_bitmasks[s_tdefl_len_extra[match_len]], s_tdefl_len_extra[match_len]); if (match_dist < 512) { sym = s_tdefl_small_dist_sym[match_dist]; num_extra_bits = s_tdefl_small_dist_extra[match_dist]; } else { sym = s_tdefl_large_dist_sym[match_dist >> 8]; num_extra_bits = s_tdefl_large_dist_extra[match_dist >> 8]; } MZ_ASSERT(d->m_huff_code_sizes[1][sym]); TDEFL_PUT_BITS(d->m_huff_codes[1][sym], d->m_huff_code_sizes[1][sym]); TDEFL_PUT_BITS(match_dist & mz_bitmasks[num_extra_bits], num_extra_bits); } else { mz_uint lit = *pLZ_codes++; MZ_ASSERT(d->m_huff_code_sizes[0][lit]); TDEFL_PUT_BITS(d->m_huff_codes[0][lit], d->m_huff_code_sizes[0][lit]); } } TDEFL_PUT_BITS(d->m_huff_codes[0][256], d->m_huff_code_sizes[0][256]); return (d->m_pOutput_buf < d->m_pOutput_buf_end); } #endif // MINIZ_USE_UNALIGNED_LOADS_AND_STORES && MINIZ_LITTLE_ENDIAN && // MINIZ_HAS_64BIT_REGISTERS static mz_bool tdefl_compress_block(tdefl_compressor *d, mz_bool static_block) { if (static_block) tdefl_start_static_block(d); else tdefl_start_dynamic_block(d); return tdefl_compress_lz_codes(d); } static int tdefl_flush_block(tdefl_compressor *d, int flush) { mz_uint saved_bit_buf, saved_bits_in; mz_uint8 *pSaved_output_buf; mz_bool comp_block_succeeded = MZ_FALSE; int n, use_raw_block = ((d->m_flags & TDEFL_FORCE_ALL_RAW_BLOCKS) != 0) && (d->m_lookahead_pos - d->m_lz_code_buf_dict_pos) <= d->m_dict_size; mz_uint8 *pOutput_buf_start = ((d->m_pPut_buf_func == NULL) && ((*d->m_pOut_buf_size - d->m_out_buf_ofs) >= TDEFL_OUT_BUF_SIZE)) ? ((mz_uint8 *)d->m_pOut_buf + d->m_out_buf_ofs) : d->m_output_buf; d->m_pOutput_buf = pOutput_buf_start; d->m_pOutput_buf_end = d->m_pOutput_buf + TDEFL_OUT_BUF_SIZE - 16; MZ_ASSERT(!d->m_output_flush_remaining); d->m_output_flush_ofs = 0; d->m_output_flush_remaining = 0; *d->m_pLZ_flags = (mz_uint8)(*d->m_pLZ_flags >> d->m_num_flags_left); d->m_pLZ_code_buf -= (d->m_num_flags_left == 8); if ((d->m_flags & TDEFL_WRITE_ZLIB_HEADER) && (!d->m_block_index)) { TDEFL_PUT_BITS(0x78, 8); TDEFL_PUT_BITS(0x01, 8); } TDEFL_PUT_BITS(flush == TDEFL_FINISH, 1); pSaved_output_buf = d->m_pOutput_buf; saved_bit_buf = d->m_bit_buffer; saved_bits_in = d->m_bits_in; if (!use_raw_block) comp_block_succeeded = tdefl_compress_block(d, (d->m_flags & TDEFL_FORCE_ALL_STATIC_BLOCKS) || (d->m_total_lz_bytes < 48)); // If the block gets expanded, forget the current contents of the output // buffer and send a raw block instead. if (((use_raw_block) || ((d->m_total_lz_bytes) && ((d->m_pOutput_buf - pSaved_output_buf + 1U) >= d->m_total_lz_bytes))) && ((d->m_lookahead_pos - d->m_lz_code_buf_dict_pos) <= d->m_dict_size)) { mz_uint i; d->m_pOutput_buf = pSaved_output_buf; d->m_bit_buffer = saved_bit_buf, d->m_bits_in = saved_bits_in; TDEFL_PUT_BITS(0, 2); if (d->m_bits_in) { TDEFL_PUT_BITS(0, 8 - d->m_bits_in); } for (i = 2; i; --i, d->m_total_lz_bytes ^= 0xFFFF) { TDEFL_PUT_BITS(d->m_total_lz_bytes & 0xFFFF, 16); } for (i = 0; i < d->m_total_lz_bytes; ++i) { TDEFL_PUT_BITS( d->m_dict[(d->m_lz_code_buf_dict_pos + i) & TDEFL_LZ_DICT_SIZE_MASK], 8); } } // Check for the extremely unlikely (if not impossible) case of the compressed // block not fitting into the output buffer when using dynamic codes. else if (!comp_block_succeeded) { d->m_pOutput_buf = pSaved_output_buf; d->m_bit_buffer = saved_bit_buf, d->m_bits_in = saved_bits_in; tdefl_compress_block(d, MZ_TRUE); } if (flush) { if (flush == TDEFL_FINISH) { if (d->m_bits_in) { TDEFL_PUT_BITS(0, 8 - d->m_bits_in); } if (d->m_flags & TDEFL_WRITE_ZLIB_HEADER) { mz_uint i, a = d->m_adler32; for (i = 0; i < 4; i++) { TDEFL_PUT_BITS((a >> 24) & 0xFF, 8); a <<= 8; } } } else { mz_uint i, z = 0; TDEFL_PUT_BITS(0, 3); if (d->m_bits_in) { TDEFL_PUT_BITS(0, 8 - d->m_bits_in); } for (i = 2; i; --i, z ^= 0xFFFF) { TDEFL_PUT_BITS(z & 0xFFFF, 16); } } } MZ_ASSERT(d->m_pOutput_buf < d->m_pOutput_buf_end); memset(&d->m_huff_count[0][0], 0, sizeof(d->m_huff_count[0][0]) * TDEFL_MAX_HUFF_SYMBOLS_0); memset(&d->m_huff_count[1][0], 0, sizeof(d->m_huff_count[1][0]) * TDEFL_MAX_HUFF_SYMBOLS_1); d->m_pLZ_code_buf = d->m_lz_code_buf + 1; d->m_pLZ_flags = d->m_lz_code_buf; d->m_num_flags_left = 8; d->m_lz_code_buf_dict_pos += d->m_total_lz_bytes; d->m_total_lz_bytes = 0; d->m_block_index++; if ((n = (int)(d->m_pOutput_buf - pOutput_buf_start)) != 0) { if (d->m_pPut_buf_func) { *d->m_pIn_buf_size = d->m_pSrc - (const mz_uint8 *)d->m_pIn_buf; if (!(*d->m_pPut_buf_func)(d->m_output_buf, n, d->m_pPut_buf_user)) return (d->m_prev_return_status = TDEFL_STATUS_PUT_BUF_FAILED); } else if (pOutput_buf_start == d->m_output_buf) { int bytes_to_copy = (int)MZ_MIN( (size_t)n, (size_t)(*d->m_pOut_buf_size - d->m_out_buf_ofs)); memcpy((mz_uint8 *)d->m_pOut_buf + d->m_out_buf_ofs, d->m_output_buf, bytes_to_copy); d->m_out_buf_ofs += bytes_to_copy; if ((n -= bytes_to_copy) != 0) { d->m_output_flush_ofs = bytes_to_copy; d->m_output_flush_remaining = n; } } else { d->m_out_buf_ofs += n; } } return d->m_output_flush_remaining; } #if MINIZ_USE_UNALIGNED_LOADS_AND_STORES #define TDEFL_READ_UNALIGNED_WORD(p) *(const mz_uint16 *)(p) static MZ_FORCEINLINE void tdefl_find_match( tdefl_compressor *d, mz_uint lookahead_pos, mz_uint max_dist, mz_uint max_match_len, mz_uint *pMatch_dist, mz_uint *pMatch_len) { mz_uint dist, pos = lookahead_pos & TDEFL_LZ_DICT_SIZE_MASK, match_len = *pMatch_len, probe_pos = pos, next_probe_pos, probe_len; mz_uint num_probes_left = d->m_max_probes[match_len >= 32]; const mz_uint16 *s = (const mz_uint16 *)(d->m_dict + pos), *p, *q; mz_uint16 c01 = TDEFL_READ_UNALIGNED_WORD(&d->m_dict[pos + match_len - 1]), s01 = TDEFL_READ_UNALIGNED_WORD(s); MZ_ASSERT(max_match_len <= TDEFL_MAX_MATCH_LEN); if (max_match_len <= match_len) return; for (;;) { for (;;) { if (--num_probes_left == 0) return; #define TDEFL_PROBE \ next_probe_pos = d->m_next[probe_pos]; \ if ((!next_probe_pos) || \ ((dist = (mz_uint16)(lookahead_pos - next_probe_pos)) > max_dist)) \ return; \ probe_pos = next_probe_pos & TDEFL_LZ_DICT_SIZE_MASK; \ if (TDEFL_READ_UNALIGNED_WORD(&d->m_dict[probe_pos + match_len - 1]) == c01) \ break; TDEFL_PROBE; TDEFL_PROBE; TDEFL_PROBE; } if (!dist) break; q = (const mz_uint16 *)(d->m_dict + probe_pos); if (TDEFL_READ_UNALIGNED_WORD(q) != s01) continue; p = s; probe_len = 32; do { } while ( (TDEFL_READ_UNALIGNED_WORD(++p) == TDEFL_READ_UNALIGNED_WORD(++q)) && (TDEFL_READ_UNALIGNED_WORD(++p) == TDEFL_READ_UNALIGNED_WORD(++q)) && (TDEFL_READ_UNALIGNED_WORD(++p) == TDEFL_READ_UNALIGNED_WORD(++q)) && (TDEFL_READ_UNALIGNED_WORD(++p) == TDEFL_READ_UNALIGNED_WORD(++q)) && (--probe_len > 0)); if (!probe_len) { *pMatch_dist = dist; *pMatch_len = MZ_MIN(max_match_len, TDEFL_MAX_MATCH_LEN); break; } else if ((probe_len = ((mz_uint)(p - s) * 2) + (mz_uint)(*(const mz_uint8 *)p == *(const mz_uint8 *)q)) > match_len) { *pMatch_dist = dist; if ((*pMatch_len = match_len = MZ_MIN(max_match_len, probe_len)) == max_match_len) break; c01 = TDEFL_READ_UNALIGNED_WORD(&d->m_dict[pos + match_len - 1]); } } } #else static MZ_FORCEINLINE void tdefl_find_match( tdefl_compressor *d, mz_uint lookahead_pos, mz_uint max_dist, mz_uint max_match_len, mz_uint *pMatch_dist, mz_uint *pMatch_len) { mz_uint dist, pos = lookahead_pos & TDEFL_LZ_DICT_SIZE_MASK, match_len = *pMatch_len, probe_pos = pos, next_probe_pos, probe_len; mz_uint num_probes_left = d->m_max_probes[match_len >= 32]; const mz_uint8 *s = d->m_dict + pos, *p, *q; mz_uint8 c0 = d->m_dict[pos + match_len], c1 = d->m_dict[pos + match_len - 1]; MZ_ASSERT(max_match_len <= TDEFL_MAX_MATCH_LEN); if (max_match_len <= match_len) return; for (;;) { for (;;) { if (--num_probes_left == 0) return; #define TDEFL_PROBE \ next_probe_pos = d->m_next[probe_pos]; \ if ((!next_probe_pos) || \ ((dist = (mz_uint16)(lookahead_pos - next_probe_pos)) > max_dist)) \ return; \ probe_pos = next_probe_pos & TDEFL_LZ_DICT_SIZE_MASK; \ if ((d->m_dict[probe_pos + match_len] == c0) && \ (d->m_dict[probe_pos + match_len - 1] == c1)) \ break; TDEFL_PROBE; TDEFL_PROBE; TDEFL_PROBE; } if (!dist) break; p = s; q = d->m_dict + probe_pos; for (probe_len = 0; probe_len < max_match_len; probe_len++) if (*p++ != *q++) break; if (probe_len > match_len) { *pMatch_dist = dist; if ((*pMatch_len = match_len = probe_len) == max_match_len) return; c0 = d->m_dict[pos + match_len]; c1 = d->m_dict[pos + match_len - 1]; } } } #endif // #if MINIZ_USE_UNALIGNED_LOADS_AND_STORES #if MINIZ_USE_UNALIGNED_LOADS_AND_STORES && MINIZ_LITTLE_ENDIAN static mz_bool tdefl_compress_fast(tdefl_compressor *d) { // Faster, minimally featured LZRW1-style match+parse loop with better // register utilization. Intended for applications where raw throughput is // valued more highly than ratio. mz_uint lookahead_pos = d->m_lookahead_pos, lookahead_size = d->m_lookahead_size, dict_size = d->m_dict_size, total_lz_bytes = d->m_total_lz_bytes, num_flags_left = d->m_num_flags_left; mz_uint8 *pLZ_code_buf = d->m_pLZ_code_buf, *pLZ_flags = d->m_pLZ_flags; mz_uint cur_pos = lookahead_pos & TDEFL_LZ_DICT_SIZE_MASK; while ((d->m_src_buf_left) || ((d->m_flush) && (lookahead_size))) { const mz_uint TDEFL_COMP_FAST_LOOKAHEAD_SIZE = 4096; mz_uint dst_pos = (lookahead_pos + lookahead_size) & TDEFL_LZ_DICT_SIZE_MASK; mz_uint num_bytes_to_process = (mz_uint)MZ_MIN( d->m_src_buf_left, TDEFL_COMP_FAST_LOOKAHEAD_SIZE - lookahead_size); d->m_src_buf_left -= num_bytes_to_process; lookahead_size += num_bytes_to_process; while (num_bytes_to_process) { mz_uint32 n = MZ_MIN(TDEFL_LZ_DICT_SIZE - dst_pos, num_bytes_to_process); memcpy(d->m_dict + dst_pos, d->m_pSrc, n); if (dst_pos < (TDEFL_MAX_MATCH_LEN - 1)) memcpy(d->m_dict + TDEFL_LZ_DICT_SIZE + dst_pos, d->m_pSrc, MZ_MIN(n, (TDEFL_MAX_MATCH_LEN - 1) - dst_pos)); d->m_pSrc += n; dst_pos = (dst_pos + n) & TDEFL_LZ_DICT_SIZE_MASK; num_bytes_to_process -= n; } dict_size = MZ_MIN(TDEFL_LZ_DICT_SIZE - lookahead_size, dict_size); if ((!d->m_flush) && (lookahead_size < TDEFL_COMP_FAST_LOOKAHEAD_SIZE)) break; while (lookahead_size >= 4) { mz_uint cur_match_dist, cur_match_len = 1; mz_uint8 *pCur_dict = d->m_dict + cur_pos; mz_uint first_trigram = (*(const mz_uint32 *)pCur_dict) & 0xFFFFFF; mz_uint hash = (first_trigram ^ (first_trigram >> (24 - (TDEFL_LZ_HASH_BITS - 8)))) & TDEFL_LEVEL1_HASH_SIZE_MASK; mz_uint probe_pos = d->m_hash[hash]; d->m_hash[hash] = (mz_uint16)lookahead_pos; if (((cur_match_dist = (mz_uint16)(lookahead_pos - probe_pos)) <= dict_size) && ((*(const mz_uint32 *)(d->m_dict + (probe_pos &= TDEFL_LZ_DICT_SIZE_MASK)) & 0xFFFFFF) == first_trigram)) { const mz_uint16 *p = (const mz_uint16 *)pCur_dict; const mz_uint16 *q = (const mz_uint16 *)(d->m_dict + probe_pos); mz_uint32 probe_len = 32; do { } while ((TDEFL_READ_UNALIGNED_WORD(++p) == TDEFL_READ_UNALIGNED_WORD(++q)) && (TDEFL_READ_UNALIGNED_WORD(++p) == TDEFL_READ_UNALIGNED_WORD(++q)) && (TDEFL_READ_UNALIGNED_WORD(++p) == TDEFL_READ_UNALIGNED_WORD(++q)) && (TDEFL_READ_UNALIGNED_WORD(++p) == TDEFL_READ_UNALIGNED_WORD(++q)) && (--probe_len > 0)); cur_match_len = ((mz_uint)(p - (const mz_uint16 *)pCur_dict) * 2) + (mz_uint)(*(const mz_uint8 *)p == *(const mz_uint8 *)q); if (!probe_len) cur_match_len = cur_match_dist ? TDEFL_MAX_MATCH_LEN : 0; if ((cur_match_len < TDEFL_MIN_MATCH_LEN) || ((cur_match_len == TDEFL_MIN_MATCH_LEN) && (cur_match_dist >= 8U * 1024U))) { cur_match_len = 1; *pLZ_code_buf++ = (mz_uint8)first_trigram; *pLZ_flags = (mz_uint8)(*pLZ_flags >> 1); d->m_huff_count[0][(mz_uint8)first_trigram]++; } else { mz_uint32 s0, s1; cur_match_len = MZ_MIN(cur_match_len, lookahead_size); MZ_ASSERT((cur_match_len >= TDEFL_MIN_MATCH_LEN) && (cur_match_dist >= 1) && (cur_match_dist <= TDEFL_LZ_DICT_SIZE)); cur_match_dist--; pLZ_code_buf[0] = (mz_uint8)(cur_match_len - TDEFL_MIN_MATCH_LEN); *(mz_uint16 *)(&pLZ_code_buf[1]) = (mz_uint16)cur_match_dist; pLZ_code_buf += 3; *pLZ_flags = (mz_uint8)((*pLZ_flags >> 1) | 0x80); s0 = s_tdefl_small_dist_sym[cur_match_dist & 511]; s1 = s_tdefl_large_dist_sym[cur_match_dist >> 8]; d->m_huff_count[1][(cur_match_dist < 512) ? s0 : s1]++; d->m_huff_count[0][s_tdefl_len_sym[cur_match_len - TDEFL_MIN_MATCH_LEN]]++; } } else { *pLZ_code_buf++ = (mz_uint8)first_trigram; *pLZ_flags = (mz_uint8)(*pLZ_flags >> 1); d->m_huff_count[0][(mz_uint8)first_trigram]++; } if (--num_flags_left == 0) { num_flags_left = 8; pLZ_flags = pLZ_code_buf++; } total_lz_bytes += cur_match_len; lookahead_pos += cur_match_len; dict_size = MZ_MIN(dict_size + cur_match_len, TDEFL_LZ_DICT_SIZE); cur_pos = (cur_pos + cur_match_len) & TDEFL_LZ_DICT_SIZE_MASK; MZ_ASSERT(lookahead_size >= cur_match_len); lookahead_size -= cur_match_len; if (pLZ_code_buf > &d->m_lz_code_buf[TDEFL_LZ_CODE_BUF_SIZE - 8]) { int n; d->m_lookahead_pos = lookahead_pos; d->m_lookahead_size = lookahead_size; d->m_dict_size = dict_size; d->m_total_lz_bytes = total_lz_bytes; d->m_pLZ_code_buf = pLZ_code_buf; d->m_pLZ_flags = pLZ_flags; d->m_num_flags_left = num_flags_left; if ((n = tdefl_flush_block(d, 0)) != 0) return (n < 0) ? MZ_FALSE : MZ_TRUE; total_lz_bytes = d->m_total_lz_bytes; pLZ_code_buf = d->m_pLZ_code_buf; pLZ_flags = d->m_pLZ_flags; num_flags_left = d->m_num_flags_left; } } while (lookahead_size) { mz_uint8 lit = d->m_dict[cur_pos]; total_lz_bytes++; *pLZ_code_buf++ = lit; *pLZ_flags = (mz_uint8)(*pLZ_flags >> 1); if (--num_flags_left == 0) { num_flags_left = 8; pLZ_flags = pLZ_code_buf++; } d->m_huff_count[0][lit]++; lookahead_pos++; dict_size = MZ_MIN(dict_size + 1, TDEFL_LZ_DICT_SIZE); cur_pos = (cur_pos + 1) & TDEFL_LZ_DICT_SIZE_MASK; lookahead_size--; if (pLZ_code_buf > &d->m_lz_code_buf[TDEFL_LZ_CODE_BUF_SIZE - 8]) { int n; d->m_lookahead_pos = lookahead_pos; d->m_lookahead_size = lookahead_size; d->m_dict_size = dict_size; d->m_total_lz_bytes = total_lz_bytes; d->m_pLZ_code_buf = pLZ_code_buf; d->m_pLZ_flags = pLZ_flags; d->m_num_flags_left = num_flags_left; if ((n = tdefl_flush_block(d, 0)) != 0) return (n < 0) ? MZ_FALSE : MZ_TRUE; total_lz_bytes = d->m_total_lz_bytes; pLZ_code_buf = d->m_pLZ_code_buf; pLZ_flags = d->m_pLZ_flags; num_flags_left = d->m_num_flags_left; } } } d->m_lookahead_pos = lookahead_pos; d->m_lookahead_size = lookahead_size; d->m_dict_size = dict_size; d->m_total_lz_bytes = total_lz_bytes; d->m_pLZ_code_buf = pLZ_code_buf; d->m_pLZ_flags = pLZ_flags; d->m_num_flags_left = num_flags_left; return MZ_TRUE; } #endif // MINIZ_USE_UNALIGNED_LOADS_AND_STORES && MINIZ_LITTLE_ENDIAN static MZ_FORCEINLINE void tdefl_record_literal(tdefl_compressor *d, mz_uint8 lit) { d->m_total_lz_bytes++; *d->m_pLZ_code_buf++ = lit; *d->m_pLZ_flags = (mz_uint8)(*d->m_pLZ_flags >> 1); if (--d->m_num_flags_left == 0) { d->m_num_flags_left = 8; d->m_pLZ_flags = d->m_pLZ_code_buf++; } d->m_huff_count[0][lit]++; } static MZ_FORCEINLINE void tdefl_record_match(tdefl_compressor *d, mz_uint match_len, mz_uint match_dist) { mz_uint32 s0, s1; MZ_ASSERT((match_len >= TDEFL_MIN_MATCH_LEN) && (match_dist >= 1) && (match_dist <= TDEFL_LZ_DICT_SIZE)); d->m_total_lz_bytes += match_len; d->m_pLZ_code_buf[0] = (mz_uint8)(match_len - TDEFL_MIN_MATCH_LEN); match_dist -= 1; d->m_pLZ_code_buf[1] = (mz_uint8)(match_dist & 0xFF); d->m_pLZ_code_buf[2] = (mz_uint8)(match_dist >> 8); d->m_pLZ_code_buf += 3; *d->m_pLZ_flags = (mz_uint8)((*d->m_pLZ_flags >> 1) | 0x80); if (--d->m_num_flags_left == 0) { d->m_num_flags_left = 8; d->m_pLZ_flags = d->m_pLZ_code_buf++; } s0 = s_tdefl_small_dist_sym[match_dist & 511]; s1 = s_tdefl_large_dist_sym[(match_dist >> 8) & 127]; d->m_huff_count[1][(match_dist < 512) ? s0 : s1]++; if (match_len >= TDEFL_MIN_MATCH_LEN) d->m_huff_count[0][s_tdefl_len_sym[match_len - TDEFL_MIN_MATCH_LEN]]++; } static mz_bool tdefl_compress_normal(tdefl_compressor *d) { const mz_uint8 *pSrc = d->m_pSrc; size_t src_buf_left = d->m_src_buf_left; tdefl_flush flush = d->m_flush; while ((src_buf_left) || ((flush) && (d->m_lookahead_size))) { mz_uint len_to_move, cur_match_dist, cur_match_len, cur_pos; // Update dictionary and hash chains. Keeps the lookahead size equal to // TDEFL_MAX_MATCH_LEN. if ((d->m_lookahead_size + d->m_dict_size) >= (TDEFL_MIN_MATCH_LEN - 1)) { mz_uint dst_pos = (d->m_lookahead_pos + d->m_lookahead_size) & TDEFL_LZ_DICT_SIZE_MASK, ins_pos = d->m_lookahead_pos + d->m_lookahead_size - 2; mz_uint hash = (d->m_dict[ins_pos & TDEFL_LZ_DICT_SIZE_MASK] << TDEFL_LZ_HASH_SHIFT) ^ d->m_dict[(ins_pos + 1) & TDEFL_LZ_DICT_SIZE_MASK]; mz_uint num_bytes_to_process = (mz_uint)MZ_MIN( src_buf_left, TDEFL_MAX_MATCH_LEN - d->m_lookahead_size); const mz_uint8 *pSrc_end = pSrc + num_bytes_to_process; src_buf_left -= num_bytes_to_process; d->m_lookahead_size += num_bytes_to_process; while (pSrc != pSrc_end) { mz_uint8 c = *pSrc++; d->m_dict[dst_pos] = c; if (dst_pos < (TDEFL_MAX_MATCH_LEN - 1)) d->m_dict[TDEFL_LZ_DICT_SIZE + dst_pos] = c; hash = ((hash << TDEFL_LZ_HASH_SHIFT) ^ c) & (TDEFL_LZ_HASH_SIZE - 1); d->m_next[ins_pos & TDEFL_LZ_DICT_SIZE_MASK] = d->m_hash[hash]; d->m_hash[hash] = (mz_uint16)(ins_pos); dst_pos = (dst_pos + 1) & TDEFL_LZ_DICT_SIZE_MASK; ins_pos++; } } else { while ((src_buf_left) && (d->m_lookahead_size < TDEFL_MAX_MATCH_LEN)) { mz_uint8 c = *pSrc++; mz_uint dst_pos = (d->m_lookahead_pos + d->m_lookahead_size) & TDEFL_LZ_DICT_SIZE_MASK; src_buf_left--; d->m_dict[dst_pos] = c; if (dst_pos < (TDEFL_MAX_MATCH_LEN - 1)) d->m_dict[TDEFL_LZ_DICT_SIZE + dst_pos] = c; if ((++d->m_lookahead_size + d->m_dict_size) >= TDEFL_MIN_MATCH_LEN) { mz_uint ins_pos = d->m_lookahead_pos + (d->m_lookahead_size - 1) - 2; mz_uint hash = ((d->m_dict[ins_pos & TDEFL_LZ_DICT_SIZE_MASK] << (TDEFL_LZ_HASH_SHIFT * 2)) ^ (d->m_dict[(ins_pos + 1) & TDEFL_LZ_DICT_SIZE_MASK] << TDEFL_LZ_HASH_SHIFT) ^ c) & (TDEFL_LZ_HASH_SIZE - 1); d->m_next[ins_pos & TDEFL_LZ_DICT_SIZE_MASK] = d->m_hash[hash]; d->m_hash[hash] = (mz_uint16)(ins_pos); } } } d->m_dict_size = MZ_MIN(TDEFL_LZ_DICT_SIZE - d->m_lookahead_size, d->m_dict_size); if ((!flush) && (d->m_lookahead_size < TDEFL_MAX_MATCH_LEN)) break; // Simple lazy/greedy parsing state machine. len_to_move = 1; cur_match_dist = 0; cur_match_len = d->m_saved_match_len ? d->m_saved_match_len : (TDEFL_MIN_MATCH_LEN - 1); cur_pos = d->m_lookahead_pos & TDEFL_LZ_DICT_SIZE_MASK; if (d->m_flags & (TDEFL_RLE_MATCHES | TDEFL_FORCE_ALL_RAW_BLOCKS)) { if ((d->m_dict_size) && (!(d->m_flags & TDEFL_FORCE_ALL_RAW_BLOCKS))) { mz_uint8 c = d->m_dict[(cur_pos - 1) & TDEFL_LZ_DICT_SIZE_MASK]; cur_match_len = 0; while (cur_match_len < d->m_lookahead_size) { if (d->m_dict[cur_pos + cur_match_len] != c) break; cur_match_len++; } if (cur_match_len < TDEFL_MIN_MATCH_LEN) cur_match_len = 0; else cur_match_dist = 1; } } else { tdefl_find_match(d, d->m_lookahead_pos, d->m_dict_size, d->m_lookahead_size, &cur_match_dist, &cur_match_len); } if (((cur_match_len == TDEFL_MIN_MATCH_LEN) && (cur_match_dist >= 8U * 1024U)) || (cur_pos == cur_match_dist) || ((d->m_flags & TDEFL_FILTER_MATCHES) && (cur_match_len <= 5))) { cur_match_dist = cur_match_len = 0; } if (d->m_saved_match_len) { if (cur_match_len > d->m_saved_match_len) { tdefl_record_literal(d, (mz_uint8)d->m_saved_lit); if (cur_match_len >= 128) { tdefl_record_match(d, cur_match_len, cur_match_dist); d->m_saved_match_len = 0; len_to_move = cur_match_len; } else { d->m_saved_lit = d->m_dict[cur_pos]; d->m_saved_match_dist = cur_match_dist; d->m_saved_match_len = cur_match_len; } } else { tdefl_record_match(d, d->m_saved_match_len, d->m_saved_match_dist); len_to_move = d->m_saved_match_len - 1; d->m_saved_match_len = 0; } } else if (!cur_match_dist) tdefl_record_literal(d, d->m_dict[MZ_MIN(cur_pos, sizeof(d->m_dict) - 1)]); else if ((d->m_greedy_parsing) || (d->m_flags & TDEFL_RLE_MATCHES) || (cur_match_len >= 128)) { tdefl_record_match(d, cur_match_len, cur_match_dist); len_to_move = cur_match_len; } else { d->m_saved_lit = d->m_dict[MZ_MIN(cur_pos, sizeof(d->m_dict) - 1)]; d->m_saved_match_dist = cur_match_dist; d->m_saved_match_len = cur_match_len; } // Move the lookahead forward by len_to_move bytes. d->m_lookahead_pos += len_to_move; MZ_ASSERT(d->m_lookahead_size >= len_to_move); d->m_lookahead_size -= len_to_move; d->m_dict_size = MZ_MIN(d->m_dict_size + len_to_move, (mz_uint)TDEFL_LZ_DICT_SIZE); // Check if it's time to flush the current LZ codes to the internal output // buffer. if ((d->m_pLZ_code_buf > &d->m_lz_code_buf[TDEFL_LZ_CODE_BUF_SIZE - 8]) || ((d->m_total_lz_bytes > 31 * 1024) && (((((mz_uint)(d->m_pLZ_code_buf - d->m_lz_code_buf) * 115) >> 7) >= d->m_total_lz_bytes) || (d->m_flags & TDEFL_FORCE_ALL_RAW_BLOCKS)))) { int n; d->m_pSrc = pSrc; d->m_src_buf_left = src_buf_left; if ((n = tdefl_flush_block(d, 0)) != 0) return (n < 0) ? MZ_FALSE : MZ_TRUE; } } d->m_pSrc = pSrc; d->m_src_buf_left = src_buf_left; return MZ_TRUE; } static tdefl_status tdefl_flush_output_buffer(tdefl_compressor *d) { if (d->m_pIn_buf_size) { *d->m_pIn_buf_size = d->m_pSrc - (const mz_uint8 *)d->m_pIn_buf; } if (d->m_pOut_buf_size) { size_t n = MZ_MIN(*d->m_pOut_buf_size - d->m_out_buf_ofs, d->m_output_flush_remaining); memcpy((mz_uint8 *)d->m_pOut_buf + d->m_out_buf_ofs, d->m_output_buf + d->m_output_flush_ofs, n); d->m_output_flush_ofs += (mz_uint)n; d->m_output_flush_remaining -= (mz_uint)n; d->m_out_buf_ofs += n; *d->m_pOut_buf_size = d->m_out_buf_ofs; } return (d->m_finished && !d->m_output_flush_remaining) ? TDEFL_STATUS_DONE : TDEFL_STATUS_OKAY; } tdefl_status tdefl_compress(tdefl_compressor *d, const void *pIn_buf, size_t *pIn_buf_size, void *pOut_buf, size_t *pOut_buf_size, tdefl_flush flush) { if (!d) { if (pIn_buf_size) *pIn_buf_size = 0; if (pOut_buf_size) *pOut_buf_size = 0; return TDEFL_STATUS_BAD_PARAM; } d->m_pIn_buf = pIn_buf; d->m_pIn_buf_size = pIn_buf_size; d->m_pOut_buf = pOut_buf; d->m_pOut_buf_size = pOut_buf_size; d->m_pSrc = (const mz_uint8 *)(pIn_buf); d->m_src_buf_left = pIn_buf_size ? *pIn_buf_size : 0; d->m_out_buf_ofs = 0; d->m_flush = flush; if (((d->m_pPut_buf_func != NULL) == ((pOut_buf != NULL) || (pOut_buf_size != NULL))) || (d->m_prev_return_status != TDEFL_STATUS_OKAY) || (d->m_wants_to_finish && (flush != TDEFL_FINISH)) || (pIn_buf_size && *pIn_buf_size && !pIn_buf) || (pOut_buf_size && *pOut_buf_size && !pOut_buf)) { if (pIn_buf_size) *pIn_buf_size = 0; if (pOut_buf_size) *pOut_buf_size = 0; return (d->m_prev_return_status = TDEFL_STATUS_BAD_PARAM); } d->m_wants_to_finish |= (flush == TDEFL_FINISH); if ((d->m_output_flush_remaining) || (d->m_finished)) return (d->m_prev_return_status = tdefl_flush_output_buffer(d)); #if MINIZ_USE_UNALIGNED_LOADS_AND_STORES && MINIZ_LITTLE_ENDIAN if (((d->m_flags & TDEFL_MAX_PROBES_MASK) == 1) && ((d->m_flags & TDEFL_GREEDY_PARSING_FLAG) != 0) && ((d->m_flags & (TDEFL_FILTER_MATCHES | TDEFL_FORCE_ALL_RAW_BLOCKS | TDEFL_RLE_MATCHES)) == 0)) { if (!tdefl_compress_fast(d)) return d->m_prev_return_status; } else #endif // #if MINIZ_USE_UNALIGNED_LOADS_AND_STORES && MINIZ_LITTLE_ENDIAN { if (!tdefl_compress_normal(d)) return d->m_prev_return_status; } if ((d->m_flags & (TDEFL_WRITE_ZLIB_HEADER | TDEFL_COMPUTE_ADLER32)) && (pIn_buf)) d->m_adler32 = (mz_uint32)mz_adler32(d->m_adler32, (const mz_uint8 *)pIn_buf, d->m_pSrc - (const mz_uint8 *)pIn_buf); if ((flush) && (!d->m_lookahead_size) && (!d->m_src_buf_left) && (!d->m_output_flush_remaining)) { if (tdefl_flush_block(d, flush) < 0) return d->m_prev_return_status; d->m_finished = (flush == TDEFL_FINISH); if (flush == TDEFL_FULL_FLUSH) { MZ_CLEAR_OBJ(d->m_hash); MZ_CLEAR_OBJ(d->m_next); d->m_dict_size = 0; } } return (d->m_prev_return_status = tdefl_flush_output_buffer(d)); } tdefl_status tdefl_compress_buffer(tdefl_compressor *d, const void *pIn_buf, size_t in_buf_size, tdefl_flush flush) { MZ_ASSERT(d->m_pPut_buf_func); return tdefl_compress(d, pIn_buf, &in_buf_size, NULL, NULL, flush); } tdefl_status tdefl_init(tdefl_compressor *d, tdefl_put_buf_func_ptr pPut_buf_func, void *pPut_buf_user, int flags) { d->m_pPut_buf_func = pPut_buf_func; d->m_pPut_buf_user = pPut_buf_user; d->m_flags = (mz_uint)(flags); d->m_max_probes[0] = 1 + ((flags & 0xFFF) + 2) / 3; d->m_greedy_parsing = (flags & TDEFL_GREEDY_PARSING_FLAG) != 0; d->m_max_probes[1] = 1 + (((flags & 0xFFF) >> 2) + 2) / 3; if (!(flags & TDEFL_NONDETERMINISTIC_PARSING_FLAG)) MZ_CLEAR_OBJ(d->m_hash); d->m_lookahead_pos = d->m_lookahead_size = d->m_dict_size = d->m_total_lz_bytes = d->m_lz_code_buf_dict_pos = d->m_bits_in = 0; d->m_output_flush_ofs = d->m_output_flush_remaining = d->m_finished = d->m_block_index = d->m_bit_buffer = d->m_wants_to_finish = 0; d->m_pLZ_code_buf = d->m_lz_code_buf + 1; d->m_pLZ_flags = d->m_lz_code_buf; d->m_num_flags_left = 8; d->m_pOutput_buf = d->m_output_buf; d->m_pOutput_buf_end = d->m_output_buf; d->m_prev_return_status = TDEFL_STATUS_OKAY; d->m_saved_match_dist = d->m_saved_match_len = d->m_saved_lit = 0; d->m_adler32 = 1; d->m_pIn_buf = NULL; d->m_pOut_buf = NULL; d->m_pIn_buf_size = NULL; d->m_pOut_buf_size = NULL; d->m_flush = TDEFL_NO_FLUSH; d->m_pSrc = NULL; d->m_src_buf_left = 0; d->m_out_buf_ofs = 0; memset(&d->m_huff_count[0][0], 0, sizeof(d->m_huff_count[0][0]) * TDEFL_MAX_HUFF_SYMBOLS_0); memset(&d->m_huff_count[1][0], 0, sizeof(d->m_huff_count[1][0]) * TDEFL_MAX_HUFF_SYMBOLS_1); return TDEFL_STATUS_OKAY; } tdefl_status tdefl_get_prev_return_status(tdefl_compressor *d) { return d->m_prev_return_status; } mz_uint32 tdefl_get_adler32(tdefl_compressor *d) { return d->m_adler32; } mz_bool tdefl_compress_mem_to_output(const void *pBuf, size_t buf_len, tdefl_put_buf_func_ptr pPut_buf_func, void *pPut_buf_user, int flags) { tdefl_compressor *pComp; mz_bool succeeded; if (((buf_len) && (!pBuf)) || (!pPut_buf_func)) return MZ_FALSE; pComp = (tdefl_compressor *)MZ_MALLOC(sizeof(tdefl_compressor)); if (!pComp) return MZ_FALSE; succeeded = (tdefl_init(pComp, pPut_buf_func, pPut_buf_user, flags) == TDEFL_STATUS_OKAY); succeeded = succeeded && (tdefl_compress_buffer(pComp, pBuf, buf_len, TDEFL_FINISH) == TDEFL_STATUS_DONE); MZ_FREE(pComp); return succeeded; } typedef struct { size_t m_size, m_capacity; mz_uint8 *m_pBuf; mz_bool m_expandable; } tdefl_output_buffer; static mz_bool tdefl_output_buffer_putter(const void *pBuf, int len, void *pUser) { tdefl_output_buffer *p = (tdefl_output_buffer *)pUser; size_t new_size = p->m_size + len; if (new_size > p->m_capacity) { size_t new_capacity = p->m_capacity; mz_uint8 *pNew_buf; if (!p->m_expandable) return MZ_FALSE; do { new_capacity = MZ_MAX(128U, new_capacity << 1U); } while (new_size > new_capacity); pNew_buf = (mz_uint8 *)MZ_REALLOC(p->m_pBuf, new_capacity); if (!pNew_buf) return MZ_FALSE; p->m_pBuf = pNew_buf; p->m_capacity = new_capacity; } memcpy((mz_uint8 *)p->m_pBuf + p->m_size, pBuf, len); p->m_size = new_size; return MZ_TRUE; } void *tdefl_compress_mem_to_heap(const void *pSrc_buf, size_t src_buf_len, size_t *pOut_len, int flags) { tdefl_output_buffer out_buf; MZ_CLEAR_OBJ(out_buf); if (!pOut_len) return MZ_FALSE; else *pOut_len = 0; out_buf.m_expandable = MZ_TRUE; if (!tdefl_compress_mem_to_output( pSrc_buf, src_buf_len, tdefl_output_buffer_putter, &out_buf, flags)) return NULL; *pOut_len = out_buf.m_size; return out_buf.m_pBuf; } size_t tdefl_compress_mem_to_mem(void *pOut_buf, size_t out_buf_len, const void *pSrc_buf, size_t src_buf_len, int flags) { tdefl_output_buffer out_buf; MZ_CLEAR_OBJ(out_buf); if (!pOut_buf) return 0; out_buf.m_pBuf = (mz_uint8 *)pOut_buf; out_buf.m_capacity = out_buf_len; if (!tdefl_compress_mem_to_output( pSrc_buf, src_buf_len, tdefl_output_buffer_putter, &out_buf, flags)) return 0; return out_buf.m_size; } #ifndef MINIZ_NO_ZLIB_APIS static const mz_uint s_tdefl_num_probes[11] = {0, 1, 6, 32, 16, 32, 128, 256, 512, 768, 1500}; // level may actually range from [0,10] (10 is a "hidden" max level, where we // want a bit more compression and it's fine if throughput to fall off a cliff // on some files). mz_uint tdefl_create_comp_flags_from_zip_params(int level, int window_bits, int strategy) { mz_uint comp_flags = s_tdefl_num_probes[(level >= 0) ? MZ_MIN(10, level) : MZ_DEFAULT_LEVEL] | ((level <= 3) ? TDEFL_GREEDY_PARSING_FLAG : 0); if (window_bits > 0) comp_flags |= TDEFL_WRITE_ZLIB_HEADER; if (!level) comp_flags |= TDEFL_FORCE_ALL_RAW_BLOCKS; else if (strategy == MZ_FILTERED) comp_flags |= TDEFL_FILTER_MATCHES; else if (strategy == MZ_HUFFMAN_ONLY) comp_flags &= ~TDEFL_MAX_PROBES_MASK; else if (strategy == MZ_FIXED) comp_flags |= TDEFL_FORCE_ALL_STATIC_BLOCKS; else if (strategy == MZ_RLE) comp_flags |= TDEFL_RLE_MATCHES; return comp_flags; } #endif // MINIZ_NO_ZLIB_APIS #ifdef _MSC_VER #pragma warning(push) #pragma warning(disable : 4204) // nonstandard extension used : non-constant // aggregate initializer (also supported by GNU // C and C99, so no big deal) #pragma warning(disable : 4244) // 'initializing': conversion from '__int64' to // 'int', possible loss of data #pragma warning(disable : 4267) // 'argument': conversion from '__int64' to // 'int', possible loss of data #pragma warning(disable : 4996) // 'strdup': The POSIX name for this item is // deprecated. Instead, use the ISO C and C++ // conformant name: _strdup. #endif // Simple PNG writer function by Alex Evans, 2011. Released into the public // domain: https://gist.github.com/908299, more context at // http://altdevblogaday.org/2011/04/06/a-smaller-jpg-encoder/. // This is actually a modification of Alex's original code so PNG files // generated by this function pass pngcheck. void *tdefl_write_image_to_png_file_in_memory_ex(const void *pImage, int w, int h, int num_chans, size_t *pLen_out, mz_uint level, mz_bool flip) { // Using a local copy of this array here in case MINIZ_NO_ZLIB_APIS was // defined. static const mz_uint s_tdefl_png_num_probes[11] = { 0, 1, 6, 32, 16, 32, 128, 256, 512, 768, 1500}; tdefl_compressor *pComp = (tdefl_compressor *)MZ_MALLOC(sizeof(tdefl_compressor)); tdefl_output_buffer out_buf; int i, bpl = w * num_chans, y, z; mz_uint32 c; *pLen_out = 0; if (!pComp) return NULL; MZ_CLEAR_OBJ(out_buf); out_buf.m_expandable = MZ_TRUE; out_buf.m_capacity = 57 + MZ_MAX(64, (1 + bpl) * h); if (NULL == (out_buf.m_pBuf = (mz_uint8 *)MZ_MALLOC(out_buf.m_capacity))) { MZ_FREE(pComp); return NULL; } // write dummy header for (z = 41; z; --z) tdefl_output_buffer_putter(&z, 1, &out_buf); // compress image data tdefl_init( pComp, tdefl_output_buffer_putter, &out_buf, s_tdefl_png_num_probes[MZ_MIN(10, level)] | TDEFL_WRITE_ZLIB_HEADER); for (y = 0; y < h; ++y) { tdefl_compress_buffer(pComp, &z, 1, TDEFL_NO_FLUSH); tdefl_compress_buffer(pComp, (mz_uint8 *)pImage + (flip ? (h - 1 - y) : y) * bpl, bpl, TDEFL_NO_FLUSH); } if (tdefl_compress_buffer(pComp, NULL, 0, TDEFL_FINISH) != TDEFL_STATUS_DONE) { MZ_FREE(pComp); MZ_FREE(out_buf.m_pBuf); return NULL; } // write real header *pLen_out = out_buf.m_size - 41; { static const mz_uint8 chans[] = {0x00, 0x00, 0x04, 0x02, 0x06}; mz_uint8 pnghdr[41] = {0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, 0, 0, (mz_uint8)(w >> 8), (mz_uint8)w, 0, 0, (mz_uint8)(h >> 8), (mz_uint8)h, 8, chans[num_chans], 0, 0, 0, 0, 0, 0, 0, (mz_uint8)(*pLen_out >> 24), (mz_uint8)(*pLen_out >> 16), (mz_uint8)(*pLen_out >> 8), (mz_uint8)*pLen_out, 0x49, 0x44, 0x41, 0x54}; c = (mz_uint32)mz_crc32(MZ_CRC32_INIT, pnghdr + 12, 17); for (i = 0; i < 4; ++i, c <<= 8) ((mz_uint8 *)(pnghdr + 29))[i] = (mz_uint8)(c >> 24); memcpy(out_buf.m_pBuf, pnghdr, 41); } // write footer (IDAT CRC-32, followed by IEND chunk) if (!tdefl_output_buffer_putter( "\0\0\0\0\0\0\0\0\x49\x45\x4e\x44\xae\x42\x60\x82", 16, &out_buf)) { *pLen_out = 0; MZ_FREE(pComp); MZ_FREE(out_buf.m_pBuf); return NULL; } c = (mz_uint32)mz_crc32(MZ_CRC32_INIT, out_buf.m_pBuf + 41 - 4, *pLen_out + 4); for (i = 0; i < 4; ++i, c <<= 8) (out_buf.m_pBuf + out_buf.m_size - 16)[i] = (mz_uint8)(c >> 24); // compute final size of file, grab compressed data buffer and return *pLen_out += 57; MZ_FREE(pComp); return out_buf.m_pBuf; } void *tdefl_write_image_to_png_file_in_memory(const void *pImage, int w, int h, int num_chans, size_t *pLen_out) { // Level 6 corresponds to TDEFL_DEFAULT_MAX_PROBES or MZ_DEFAULT_LEVEL (but we // can't depend on MZ_DEFAULT_LEVEL being available in case the zlib API's // where #defined out) return tdefl_write_image_to_png_file_in_memory_ex(pImage, w, h, num_chans, pLen_out, 6, MZ_FALSE); } // ------------------- .ZIP archive reading #ifndef MINIZ_NO_ARCHIVE_APIS #error "No arvhive APIs" #ifdef MINIZ_NO_STDIO #define MZ_FILE void * #else #include #include #if defined(_MSC_VER) || defined(__MINGW64__) static FILE *mz_fopen(const char *pFilename, const char *pMode) { FILE *pFile = NULL; fopen_s(&pFile, pFilename, pMode); return pFile; } static FILE *mz_freopen(const char *pPath, const char *pMode, FILE *pStream) { FILE *pFile = NULL; if (freopen_s(&pFile, pPath, pMode, pStream)) return NULL; return pFile; } #ifndef MINIZ_NO_TIME #include #endif #define MZ_FILE FILE #define MZ_FOPEN mz_fopen #define MZ_FCLOSE fclose #define MZ_FREAD fread #define MZ_FWRITE fwrite #define MZ_FTELL64 _ftelli64 #define MZ_FSEEK64 _fseeki64 #define MZ_FILE_STAT_STRUCT _stat #define MZ_FILE_STAT _stat #define MZ_FFLUSH fflush #define MZ_FREOPEN mz_freopen #define MZ_DELETE_FILE remove #elif defined(__MINGW32__) #ifndef MINIZ_NO_TIME #include #endif #define MZ_FILE FILE #define MZ_FOPEN(f, m) fopen(f, m) #define MZ_FCLOSE fclose #define MZ_FREAD fread #define MZ_FWRITE fwrite #define MZ_FTELL64 ftello64 #define MZ_FSEEK64 fseeko64 #define MZ_FILE_STAT_STRUCT _stat #define MZ_FILE_STAT _stat #define MZ_FFLUSH fflush #define MZ_FREOPEN(f, m, s) freopen(f, m, s) #define MZ_DELETE_FILE remove #elif defined(__TINYC__) #ifndef MINIZ_NO_TIME #include #endif #define MZ_FILE FILE #define MZ_FOPEN(f, m) fopen(f, m) #define MZ_FCLOSE fclose #define MZ_FREAD fread #define MZ_FWRITE fwrite #define MZ_FTELL64 ftell #define MZ_FSEEK64 fseek #define MZ_FILE_STAT_STRUCT stat #define MZ_FILE_STAT stat #define MZ_FFLUSH fflush #define MZ_FREOPEN(f, m, s) freopen(f, m, s) #define MZ_DELETE_FILE remove #elif defined(__GNUC__) && defined(_LARGEFILE64_SOURCE) && _LARGEFILE64_SOURCE #ifndef MINIZ_NO_TIME #include #endif #define MZ_FILE FILE #define MZ_FOPEN(f, m) fopen64(f, m) #define MZ_FCLOSE fclose #define MZ_FREAD fread #define MZ_FWRITE fwrite #define MZ_FTELL64 ftello64 #define MZ_FSEEK64 fseeko64 #define MZ_FILE_STAT_STRUCT stat64 #define MZ_FILE_STAT stat64 #define MZ_FFLUSH fflush #define MZ_FREOPEN(p, m, s) freopen64(p, m, s) #define MZ_DELETE_FILE remove #else #ifndef MINIZ_NO_TIME #include #endif #define MZ_FILE FILE #define MZ_FOPEN(f, m) fopen(f, m) #define MZ_FCLOSE fclose #define MZ_FREAD fread #define MZ_FWRITE fwrite #define MZ_FTELL64 ftello #define MZ_FSEEK64 fseeko #define MZ_FILE_STAT_STRUCT stat #define MZ_FILE_STAT stat #define MZ_FFLUSH fflush #define MZ_FREOPEN(f, m, s) freopen(f, m, s) #define MZ_DELETE_FILE remove #endif // #ifdef _MSC_VER #endif // #ifdef MINIZ_NO_STDIO #define MZ_TOLOWER(c) ((((c) >= 'A') && ((c) <= 'Z')) ? ((c) - 'A' + 'a') : (c)) // Various ZIP archive enums. To completely avoid cross platform compiler // alignment and platform endian issues, miniz.c doesn't use structs for any of // this stuff. enum { // ZIP archive identifiers and record sizes MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIG = 0x06054b50, MZ_ZIP_CENTRAL_DIR_HEADER_SIG = 0x02014b50, MZ_ZIP_LOCAL_DIR_HEADER_SIG = 0x04034b50, MZ_ZIP_LOCAL_DIR_HEADER_SIZE = 30, MZ_ZIP_CENTRAL_DIR_HEADER_SIZE = 46, MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE = 22, // Central directory header record offsets MZ_ZIP_CDH_SIG_OFS = 0, MZ_ZIP_CDH_VERSION_MADE_BY_OFS = 4, MZ_ZIP_CDH_VERSION_NEEDED_OFS = 6, MZ_ZIP_CDH_BIT_FLAG_OFS = 8, MZ_ZIP_CDH_METHOD_OFS = 10, MZ_ZIP_CDH_FILE_TIME_OFS = 12, MZ_ZIP_CDH_FILE_DATE_OFS = 14, MZ_ZIP_CDH_CRC32_OFS = 16, MZ_ZIP_CDH_COMPRESSED_SIZE_OFS = 20, MZ_ZIP_CDH_DECOMPRESSED_SIZE_OFS = 24, MZ_ZIP_CDH_FILENAME_LEN_OFS = 28, MZ_ZIP_CDH_EXTRA_LEN_OFS = 30, MZ_ZIP_CDH_COMMENT_LEN_OFS = 32, MZ_ZIP_CDH_DISK_START_OFS = 34, MZ_ZIP_CDH_INTERNAL_ATTR_OFS = 36, MZ_ZIP_CDH_EXTERNAL_ATTR_OFS = 38, MZ_ZIP_CDH_LOCAL_HEADER_OFS = 42, // Local directory header offsets MZ_ZIP_LDH_SIG_OFS = 0, MZ_ZIP_LDH_VERSION_NEEDED_OFS = 4, MZ_ZIP_LDH_BIT_FLAG_OFS = 6, MZ_ZIP_LDH_METHOD_OFS = 8, MZ_ZIP_LDH_FILE_TIME_OFS = 10, MZ_ZIP_LDH_FILE_DATE_OFS = 12, MZ_ZIP_LDH_CRC32_OFS = 14, MZ_ZIP_LDH_COMPRESSED_SIZE_OFS = 18, MZ_ZIP_LDH_DECOMPRESSED_SIZE_OFS = 22, MZ_ZIP_LDH_FILENAME_LEN_OFS = 26, MZ_ZIP_LDH_EXTRA_LEN_OFS = 28, // End of central directory offsets MZ_ZIP_ECDH_SIG_OFS = 0, MZ_ZIP_ECDH_NUM_THIS_DISK_OFS = 4, MZ_ZIP_ECDH_NUM_DISK_CDIR_OFS = 6, MZ_ZIP_ECDH_CDIR_NUM_ENTRIES_ON_DISK_OFS = 8, MZ_ZIP_ECDH_CDIR_TOTAL_ENTRIES_OFS = 10, MZ_ZIP_ECDH_CDIR_SIZE_OFS = 12, MZ_ZIP_ECDH_CDIR_OFS_OFS = 16, MZ_ZIP_ECDH_COMMENT_SIZE_OFS = 20, }; typedef struct { void *m_p; size_t m_size, m_capacity; mz_uint m_element_size; } mz_zip_array; struct mz_zip_internal_state_tag { mz_zip_array m_central_dir; mz_zip_array m_central_dir_offsets; mz_zip_array m_sorted_central_dir_offsets; MZ_FILE *m_pFile; void *m_pMem; size_t m_mem_size; size_t m_mem_capacity; }; #define MZ_ZIP_ARRAY_SET_ELEMENT_SIZE(array_ptr, element_size) \ (array_ptr)->m_element_size = element_size #define MZ_ZIP_ARRAY_ELEMENT(array_ptr, element_type, index) \ ((element_type *)((array_ptr)->m_p))[index] static MZ_FORCEINLINE void mz_zip_array_clear(mz_zip_archive *pZip, mz_zip_array *pArray) { pZip->m_pFree(pZip->m_pAlloc_opaque, pArray->m_p); memset(pArray, 0, sizeof(mz_zip_array)); } static mz_bool mz_zip_array_ensure_capacity(mz_zip_archive *pZip, mz_zip_array *pArray, size_t min_new_capacity, mz_uint growing) { void *pNew_p; size_t new_capacity = min_new_capacity; MZ_ASSERT(pArray->m_element_size); if (pArray->m_capacity >= min_new_capacity) return MZ_TRUE; if (growing) { new_capacity = MZ_MAX(1, pArray->m_capacity); while (new_capacity < min_new_capacity) new_capacity *= 2; } if (NULL == (pNew_p = pZip->m_pRealloc(pZip->m_pAlloc_opaque, pArray->m_p, pArray->m_element_size, new_capacity))) return MZ_FALSE; pArray->m_p = pNew_p; pArray->m_capacity = new_capacity; return MZ_TRUE; } static MZ_FORCEINLINE mz_bool mz_zip_array_reserve(mz_zip_archive *pZip, mz_zip_array *pArray, size_t new_capacity, mz_uint growing) { if (new_capacity > pArray->m_capacity) { if (!mz_zip_array_ensure_capacity(pZip, pArray, new_capacity, growing)) return MZ_FALSE; } return MZ_TRUE; } static MZ_FORCEINLINE mz_bool mz_zip_array_resize(mz_zip_archive *pZip, mz_zip_array *pArray, size_t new_size, mz_uint growing) { if (new_size > pArray->m_capacity) { if (!mz_zip_array_ensure_capacity(pZip, pArray, new_size, growing)) return MZ_FALSE; } pArray->m_size = new_size; return MZ_TRUE; } static MZ_FORCEINLINE mz_bool mz_zip_array_ensure_room(mz_zip_archive *pZip, mz_zip_array *pArray, size_t n) { return mz_zip_array_reserve(pZip, pArray, pArray->m_size + n, MZ_TRUE); } static MZ_FORCEINLINE mz_bool mz_zip_array_push_back(mz_zip_archive *pZip, mz_zip_array *pArray, const void *pElements, size_t n) { size_t orig_size = pArray->m_size; if (!mz_zip_array_resize(pZip, pArray, orig_size + n, MZ_TRUE)) return MZ_FALSE; memcpy((mz_uint8 *)pArray->m_p + orig_size * pArray->m_element_size, pElements, n * pArray->m_element_size); return MZ_TRUE; } #ifndef MINIZ_NO_TIME static time_t mz_zip_dos_to_time_t(int dos_time, int dos_date) { struct tm tm; memset(&tm, 0, sizeof(tm)); tm.tm_isdst = -1; tm.tm_year = ((dos_date >> 9) & 127) + 1980 - 1900; tm.tm_mon = ((dos_date >> 5) & 15) - 1; tm.tm_mday = dos_date & 31; tm.tm_hour = (dos_time >> 11) & 31; tm.tm_min = (dos_time >> 5) & 63; tm.tm_sec = (dos_time << 1) & 62; return mktime(&tm); } static void mz_zip_time_to_dos_time(time_t time, mz_uint16 *pDOS_time, mz_uint16 *pDOS_date) { #ifdef _MSC_VER struct tm tm_struct; struct tm *tm = &tm_struct; errno_t err = localtime_s(tm, &time); if (err) { *pDOS_date = 0; *pDOS_time = 0; return; } #else struct tm *tm = localtime(&time); #endif *pDOS_time = (mz_uint16)(((tm->tm_hour) << 11) + ((tm->tm_min) << 5) + ((tm->tm_sec) >> 1)); *pDOS_date = (mz_uint16)(((tm->tm_year + 1900 - 1980) << 9) + ((tm->tm_mon + 1) << 5) + tm->tm_mday); } #endif #ifndef MINIZ_NO_STDIO static mz_bool mz_zip_get_file_modified_time(const char *pFilename, mz_uint16 *pDOS_time, mz_uint16 *pDOS_date) { #ifdef MINIZ_NO_TIME (void)pFilename; *pDOS_date = *pDOS_time = 0; #else struct MZ_FILE_STAT_STRUCT file_stat; // On Linux with x86 glibc, this call will fail on large files (>= 0x80000000 // bytes) unless you compiled with _LARGEFILE64_SOURCE. Argh. if (MZ_FILE_STAT(pFilename, &file_stat) != 0) return MZ_FALSE; mz_zip_time_to_dos_time(file_stat.st_mtime, pDOS_time, pDOS_date); #endif // #ifdef MINIZ_NO_TIME return MZ_TRUE; } #ifndef MINIZ_NO_TIME static mz_bool mz_zip_set_file_times(const char *pFilename, time_t access_time, time_t modified_time) { struct utimbuf t; t.actime = access_time; t.modtime = modified_time; return !utime(pFilename, &t); } #endif // #ifndef MINIZ_NO_TIME #endif // #ifndef MINIZ_NO_STDIO static mz_bool mz_zip_reader_init_internal(mz_zip_archive *pZip, mz_uint32 flags) { (void)flags; if ((!pZip) || (pZip->m_pState) || (pZip->m_zip_mode != MZ_ZIP_MODE_INVALID)) return MZ_FALSE; if (!pZip->m_pAlloc) pZip->m_pAlloc = def_alloc_func; if (!pZip->m_pFree) pZip->m_pFree = def_free_func; if (!pZip->m_pRealloc) pZip->m_pRealloc = def_realloc_func; pZip->m_zip_mode = MZ_ZIP_MODE_READING; pZip->m_archive_size = 0; pZip->m_central_directory_file_ofs = 0; pZip->m_total_files = 0; if (NULL == (pZip->m_pState = (mz_zip_internal_state *)pZip->m_pAlloc( pZip->m_pAlloc_opaque, 1, sizeof(mz_zip_internal_state)))) return MZ_FALSE; memset(pZip->m_pState, 0, sizeof(mz_zip_internal_state)); MZ_ZIP_ARRAY_SET_ELEMENT_SIZE(&pZip->m_pState->m_central_dir, sizeof(mz_uint8)); MZ_ZIP_ARRAY_SET_ELEMENT_SIZE(&pZip->m_pState->m_central_dir_offsets, sizeof(mz_uint32)); MZ_ZIP_ARRAY_SET_ELEMENT_SIZE(&pZip->m_pState->m_sorted_central_dir_offsets, sizeof(mz_uint32)); return MZ_TRUE; } static MZ_FORCEINLINE mz_bool mz_zip_reader_filename_less(const mz_zip_array *pCentral_dir_array, const mz_zip_array *pCentral_dir_offsets, mz_uint l_index, mz_uint r_index) { const mz_uint8 *pL = &MZ_ZIP_ARRAY_ELEMENT( pCentral_dir_array, mz_uint8, MZ_ZIP_ARRAY_ELEMENT(pCentral_dir_offsets, mz_uint32, l_index)), *pE; const mz_uint8 *pR = &MZ_ZIP_ARRAY_ELEMENT( pCentral_dir_array, mz_uint8, MZ_ZIP_ARRAY_ELEMENT(pCentral_dir_offsets, mz_uint32, r_index)); mz_uint l_len = MZ_READ_LE16(pL + MZ_ZIP_CDH_FILENAME_LEN_OFS), r_len = MZ_READ_LE16(pR + MZ_ZIP_CDH_FILENAME_LEN_OFS); mz_uint8 l = 0, r = 0; pL += MZ_ZIP_CENTRAL_DIR_HEADER_SIZE; pR += MZ_ZIP_CENTRAL_DIR_HEADER_SIZE; pE = pL + MZ_MIN(l_len, r_len); while (pL < pE) { if ((l = MZ_TOLOWER(*pL)) != (r = MZ_TOLOWER(*pR))) break; pL++; pR++; } return (pL == pE) ? (l_len < r_len) : (l < r); } #define MZ_SWAP_UINT32(a, b) \ do { \ mz_uint32 t = a; \ a = b; \ b = t; \ } \ MZ_MACRO_END // Heap sort of lowercased filenames, used to help accelerate plain central // directory searches by mz_zip_reader_locate_file(). (Could also use qsort(), // but it could allocate memory.) static void mz_zip_reader_sort_central_dir_offsets_by_filename( mz_zip_archive *pZip) { mz_zip_internal_state *pState = pZip->m_pState; const mz_zip_array *pCentral_dir_offsets = &pState->m_central_dir_offsets; const mz_zip_array *pCentral_dir = &pState->m_central_dir; mz_uint32 *pIndices = &MZ_ZIP_ARRAY_ELEMENT( &pState->m_sorted_central_dir_offsets, mz_uint32, 0); const int size = pZip->m_total_files; int start = (size - 2) >> 1, end; while (start >= 0) { int child, root = start; for (;;) { if ((child = (root << 1) + 1) >= size) break; child += (((child + 1) < size) && (mz_zip_reader_filename_less(pCentral_dir, pCentral_dir_offsets, pIndices[child], pIndices[child + 1]))); if (!mz_zip_reader_filename_less(pCentral_dir, pCentral_dir_offsets, pIndices[root], pIndices[child])) break; MZ_SWAP_UINT32(pIndices[root], pIndices[child]); root = child; } start--; } end = size - 1; while (end > 0) { int child, root = 0; MZ_SWAP_UINT32(pIndices[end], pIndices[0]); for (;;) { if ((child = (root << 1) + 1) >= end) break; child += (((child + 1) < end) && mz_zip_reader_filename_less(pCentral_dir, pCentral_dir_offsets, pIndices[child], pIndices[child + 1])); if (!mz_zip_reader_filename_less(pCentral_dir, pCentral_dir_offsets, pIndices[root], pIndices[child])) break; MZ_SWAP_UINT32(pIndices[root], pIndices[child]); root = child; } end--; } } static mz_bool mz_zip_reader_read_central_dir(mz_zip_archive *pZip, mz_uint32 flags) { mz_uint cdir_size, num_this_disk, cdir_disk_index; mz_uint64 cdir_ofs; mz_int64 cur_file_ofs; const mz_uint8 *p; mz_uint32 buf_u32[4096 / sizeof(mz_uint32)]; mz_uint8 *pBuf = (mz_uint8 *)buf_u32; mz_bool sort_central_dir = ((flags & MZ_ZIP_FLAG_DO_NOT_SORT_CENTRAL_DIRECTORY) == 0); // Basic sanity checks - reject files which are too small, and check the first // 4 bytes of the file to make sure a local header is there. if (pZip->m_archive_size < MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE) return MZ_FALSE; // Find the end of central directory record by scanning the file from the end // towards the beginning. cur_file_ofs = MZ_MAX((mz_int64)pZip->m_archive_size - (mz_int64)sizeof(buf_u32), 0); for (;;) { int i, n = (int)MZ_MIN(sizeof(buf_u32), pZip->m_archive_size - cur_file_ofs); if (pZip->m_pRead(pZip->m_pIO_opaque, cur_file_ofs, pBuf, n) != (mz_uint)n) return MZ_FALSE; for (i = n - 4; i >= 0; --i) if (MZ_READ_LE32(pBuf + i) == MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIG) break; if (i >= 0) { cur_file_ofs += i; break; } if ((!cur_file_ofs) || ((pZip->m_archive_size - cur_file_ofs) >= (0xFFFF + MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE))) return MZ_FALSE; cur_file_ofs = MZ_MAX(cur_file_ofs - (sizeof(buf_u32) - 3), 0); } // Read and verify the end of central directory record. if (pZip->m_pRead(pZip->m_pIO_opaque, cur_file_ofs, pBuf, MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE) != MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE) return MZ_FALSE; if ((MZ_READ_LE32(pBuf + MZ_ZIP_ECDH_SIG_OFS) != MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIG) || ((pZip->m_total_files = MZ_READ_LE16(pBuf + MZ_ZIP_ECDH_CDIR_TOTAL_ENTRIES_OFS)) != MZ_READ_LE16(pBuf + MZ_ZIP_ECDH_CDIR_NUM_ENTRIES_ON_DISK_OFS))) return MZ_FALSE; num_this_disk = MZ_READ_LE16(pBuf + MZ_ZIP_ECDH_NUM_THIS_DISK_OFS); cdir_disk_index = MZ_READ_LE16(pBuf + MZ_ZIP_ECDH_NUM_DISK_CDIR_OFS); if (((num_this_disk | cdir_disk_index) != 0) && ((num_this_disk != 1) || (cdir_disk_index != 1))) return MZ_FALSE; if ((cdir_size = MZ_READ_LE32(pBuf + MZ_ZIP_ECDH_CDIR_SIZE_OFS)) < pZip->m_total_files * MZ_ZIP_CENTRAL_DIR_HEADER_SIZE) return MZ_FALSE; cdir_ofs = MZ_READ_LE32(pBuf + MZ_ZIP_ECDH_CDIR_OFS_OFS); if ((cdir_ofs + (mz_uint64)cdir_size) > pZip->m_archive_size) return MZ_FALSE; pZip->m_central_directory_file_ofs = cdir_ofs; if (pZip->m_total_files) { mz_uint i, n; // Read the entire central directory into a heap block, and allocate another // heap block to hold the unsorted central dir file record offsets, and // another to hold the sorted indices. if ((!mz_zip_array_resize(pZip, &pZip->m_pState->m_central_dir, cdir_size, MZ_FALSE)) || (!mz_zip_array_resize(pZip, &pZip->m_pState->m_central_dir_offsets, pZip->m_total_files, MZ_FALSE))) return MZ_FALSE; if (sort_central_dir) { if (!mz_zip_array_resize(pZip, &pZip->m_pState->m_sorted_central_dir_offsets, pZip->m_total_files, MZ_FALSE)) return MZ_FALSE; } if (pZip->m_pRead(pZip->m_pIO_opaque, cdir_ofs, pZip->m_pState->m_central_dir.m_p, cdir_size) != cdir_size) return MZ_FALSE; // Now create an index into the central directory file records, do some // basic sanity checking on each record, and check for zip64 entries (which // are not yet supported). p = (const mz_uint8 *)pZip->m_pState->m_central_dir.m_p; for (n = cdir_size, i = 0; i < pZip->m_total_files; ++i) { mz_uint total_header_size, comp_size, decomp_size, disk_index; if ((n < MZ_ZIP_CENTRAL_DIR_HEADER_SIZE) || (MZ_READ_LE32(p) != MZ_ZIP_CENTRAL_DIR_HEADER_SIG)) return MZ_FALSE; MZ_ZIP_ARRAY_ELEMENT(&pZip->m_pState->m_central_dir_offsets, mz_uint32, i) = (mz_uint32)(p - (const mz_uint8 *)pZip->m_pState->m_central_dir.m_p); if (sort_central_dir) MZ_ZIP_ARRAY_ELEMENT(&pZip->m_pState->m_sorted_central_dir_offsets, mz_uint32, i) = i; comp_size = MZ_READ_LE32(p + MZ_ZIP_CDH_COMPRESSED_SIZE_OFS); decomp_size = MZ_READ_LE32(p + MZ_ZIP_CDH_DECOMPRESSED_SIZE_OFS); if (((!MZ_READ_LE32(p + MZ_ZIP_CDH_METHOD_OFS)) && (decomp_size != comp_size)) || (decomp_size && !comp_size) || (decomp_size == 0xFFFFFFFF) || (comp_size == 0xFFFFFFFF)) return MZ_FALSE; disk_index = MZ_READ_LE16(p + MZ_ZIP_CDH_DISK_START_OFS); if ((disk_index != num_this_disk) && (disk_index != 1)) return MZ_FALSE; if (((mz_uint64)MZ_READ_LE32(p + MZ_ZIP_CDH_LOCAL_HEADER_OFS) + MZ_ZIP_LOCAL_DIR_HEADER_SIZE + comp_size) > pZip->m_archive_size) return MZ_FALSE; if ((total_header_size = MZ_ZIP_CENTRAL_DIR_HEADER_SIZE + MZ_READ_LE16(p + MZ_ZIP_CDH_FILENAME_LEN_OFS) + MZ_READ_LE16(p + MZ_ZIP_CDH_EXTRA_LEN_OFS) + MZ_READ_LE16(p + MZ_ZIP_CDH_COMMENT_LEN_OFS)) > n) return MZ_FALSE; n -= total_header_size; p += total_header_size; } } if (sort_central_dir) mz_zip_reader_sort_central_dir_offsets_by_filename(pZip); return MZ_TRUE; } mz_bool mz_zip_reader_init(mz_zip_archive *pZip, mz_uint64 size, mz_uint32 flags) { if ((!pZip) || (!pZip->m_pRead)) return MZ_FALSE; if (!mz_zip_reader_init_internal(pZip, flags)) return MZ_FALSE; pZip->m_archive_size = size; if (!mz_zip_reader_read_central_dir(pZip, flags)) { mz_zip_reader_end(pZip); return MZ_FALSE; } return MZ_TRUE; } static size_t mz_zip_mem_read_func(void *pOpaque, mz_uint64 file_ofs, void *pBuf, size_t n) { mz_zip_archive *pZip = (mz_zip_archive *)pOpaque; size_t s = (file_ofs >= pZip->m_archive_size) ? 0 : (size_t)MZ_MIN(pZip->m_archive_size - file_ofs, n); memcpy(pBuf, (const mz_uint8 *)pZip->m_pState->m_pMem + file_ofs, s); return s; } mz_bool mz_zip_reader_init_mem(mz_zip_archive *pZip, const void *pMem, size_t size, mz_uint32 flags) { if (!mz_zip_reader_init_internal(pZip, flags)) return MZ_FALSE; pZip->m_archive_size = size; pZip->m_pRead = mz_zip_mem_read_func; pZip->m_pIO_opaque = pZip; #ifdef __cplusplus pZip->m_pState->m_pMem = const_cast(pMem); #else pZip->m_pState->m_pMem = (void *)pMem; #endif pZip->m_pState->m_mem_size = size; if (!mz_zip_reader_read_central_dir(pZip, flags)) { mz_zip_reader_end(pZip); return MZ_FALSE; } return MZ_TRUE; } #ifndef MINIZ_NO_STDIO static size_t mz_zip_file_read_func(void *pOpaque, mz_uint64 file_ofs, void *pBuf, size_t n) { mz_zip_archive *pZip = (mz_zip_archive *)pOpaque; mz_int64 cur_ofs = MZ_FTELL64(pZip->m_pState->m_pFile); if (((mz_int64)file_ofs < 0) || (((cur_ofs != (mz_int64)file_ofs)) && (MZ_FSEEK64(pZip->m_pState->m_pFile, (mz_int64)file_ofs, SEEK_SET)))) return 0; return MZ_FREAD(pBuf, 1, n, pZip->m_pState->m_pFile); } mz_bool mz_zip_reader_init_file(mz_zip_archive *pZip, const char *pFilename, mz_uint32 flags) { mz_uint64 file_size; MZ_FILE *pFile = MZ_FOPEN(pFilename, "rb"); if (!pFile) return MZ_FALSE; if (MZ_FSEEK64(pFile, 0, SEEK_END)) { MZ_FCLOSE(pFile); return MZ_FALSE; } file_size = MZ_FTELL64(pFile); if (!mz_zip_reader_init_internal(pZip, flags)) { MZ_FCLOSE(pFile); return MZ_FALSE; } pZip->m_pRead = mz_zip_file_read_func; pZip->m_pIO_opaque = pZip; pZip->m_pState->m_pFile = pFile; pZip->m_archive_size = file_size; if (!mz_zip_reader_read_central_dir(pZip, flags)) { mz_zip_reader_end(pZip); return MZ_FALSE; } return MZ_TRUE; } #endif // #ifndef MINIZ_NO_STDIO mz_uint mz_zip_reader_get_num_files(mz_zip_archive *pZip) { return pZip ? pZip->m_total_files : 0; } static MZ_FORCEINLINE const mz_uint8 *mz_zip_reader_get_cdh( mz_zip_archive *pZip, mz_uint file_index) { if ((!pZip) || (!pZip->m_pState) || (file_index >= pZip->m_total_files) || (pZip->m_zip_mode != MZ_ZIP_MODE_READING)) return NULL; return &MZ_ZIP_ARRAY_ELEMENT( &pZip->m_pState->m_central_dir, mz_uint8, MZ_ZIP_ARRAY_ELEMENT(&pZip->m_pState->m_central_dir_offsets, mz_uint32, file_index)); } mz_bool mz_zip_reader_is_file_encrypted(mz_zip_archive *pZip, mz_uint file_index) { mz_uint m_bit_flag; const mz_uint8 *p = mz_zip_reader_get_cdh(pZip, file_index); if (!p) return MZ_FALSE; m_bit_flag = MZ_READ_LE16(p + MZ_ZIP_CDH_BIT_FLAG_OFS); return (m_bit_flag & 1); } mz_bool mz_zip_reader_is_file_a_directory(mz_zip_archive *pZip, mz_uint file_index) { mz_uint filename_len, external_attr; const mz_uint8 *p = mz_zip_reader_get_cdh(pZip, file_index); if (!p) return MZ_FALSE; // First see if the filename ends with a '/' character. filename_len = MZ_READ_LE16(p + MZ_ZIP_CDH_FILENAME_LEN_OFS); if (filename_len) { if (*(p + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE + filename_len - 1) == '/') return MZ_TRUE; } // Bugfix: This code was also checking if the internal attribute was non-zero, // which wasn't correct. // Most/all zip writers (hopefully) set DOS file/directory attributes in the // low 16-bits, so check for the DOS directory flag and ignore the source OS // ID in the created by field. // FIXME: Remove this check? Is it necessary - we already check the filename. external_attr = MZ_READ_LE32(p + MZ_ZIP_CDH_EXTERNAL_ATTR_OFS); if ((external_attr & 0x10) != 0) return MZ_TRUE; return MZ_FALSE; } mz_bool mz_zip_reader_file_stat(mz_zip_archive *pZip, mz_uint file_index, mz_zip_archive_file_stat *pStat) { mz_uint n; const mz_uint8 *p = mz_zip_reader_get_cdh(pZip, file_index); if ((!p) || (!pStat)) return MZ_FALSE; // Unpack the central directory record. pStat->m_file_index = file_index; pStat->m_central_dir_ofs = MZ_ZIP_ARRAY_ELEMENT( &pZip->m_pState->m_central_dir_offsets, mz_uint32, file_index); pStat->m_version_made_by = MZ_READ_LE16(p + MZ_ZIP_CDH_VERSION_MADE_BY_OFS); pStat->m_version_needed = MZ_READ_LE16(p + MZ_ZIP_CDH_VERSION_NEEDED_OFS); pStat->m_bit_flag = MZ_READ_LE16(p + MZ_ZIP_CDH_BIT_FLAG_OFS); pStat->m_method = MZ_READ_LE16(p + MZ_ZIP_CDH_METHOD_OFS); #ifndef MINIZ_NO_TIME pStat->m_time = mz_zip_dos_to_time_t(MZ_READ_LE16(p + MZ_ZIP_CDH_FILE_TIME_OFS), MZ_READ_LE16(p + MZ_ZIP_CDH_FILE_DATE_OFS)); #endif pStat->m_crc32 = MZ_READ_LE32(p + MZ_ZIP_CDH_CRC32_OFS); pStat->m_comp_size = MZ_READ_LE32(p + MZ_ZIP_CDH_COMPRESSED_SIZE_OFS); pStat->m_uncomp_size = MZ_READ_LE32(p + MZ_ZIP_CDH_DECOMPRESSED_SIZE_OFS); pStat->m_internal_attr = MZ_READ_LE16(p + MZ_ZIP_CDH_INTERNAL_ATTR_OFS); pStat->m_external_attr = MZ_READ_LE32(p + MZ_ZIP_CDH_EXTERNAL_ATTR_OFS); pStat->m_local_header_ofs = MZ_READ_LE32(p + MZ_ZIP_CDH_LOCAL_HEADER_OFS); // Copy as much of the filename and comment as possible. n = MZ_READ_LE16(p + MZ_ZIP_CDH_FILENAME_LEN_OFS); n = MZ_MIN(n, MZ_ZIP_MAX_ARCHIVE_FILENAME_SIZE - 1); memcpy(pStat->m_filename, p + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE, n); pStat->m_filename[n] = '\0'; n = MZ_READ_LE16(p + MZ_ZIP_CDH_COMMENT_LEN_OFS); n = MZ_MIN(n, MZ_ZIP_MAX_ARCHIVE_FILE_COMMENT_SIZE - 1); pStat->m_comment_size = n; memcpy(pStat->m_comment, p + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE + MZ_READ_LE16(p + MZ_ZIP_CDH_FILENAME_LEN_OFS) + MZ_READ_LE16(p + MZ_ZIP_CDH_EXTRA_LEN_OFS), n); pStat->m_comment[n] = '\0'; return MZ_TRUE; } mz_uint mz_zip_reader_get_filename(mz_zip_archive *pZip, mz_uint file_index, char *pFilename, mz_uint filename_buf_size) { mz_uint n; const mz_uint8 *p = mz_zip_reader_get_cdh(pZip, file_index); if (!p) { if (filename_buf_size) pFilename[0] = '\0'; return 0; } n = MZ_READ_LE16(p + MZ_ZIP_CDH_FILENAME_LEN_OFS); if (filename_buf_size) { n = MZ_MIN(n, filename_buf_size - 1); memcpy(pFilename, p + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE, n); pFilename[n] = '\0'; } return n + 1; } static MZ_FORCEINLINE mz_bool mz_zip_reader_string_equal(const char *pA, const char *pB, mz_uint len, mz_uint flags) { mz_uint i; if (flags & MZ_ZIP_FLAG_CASE_SENSITIVE) return 0 == memcmp(pA, pB, len); for (i = 0; i < len; ++i) if (MZ_TOLOWER(pA[i]) != MZ_TOLOWER(pB[i])) return MZ_FALSE; return MZ_TRUE; } static MZ_FORCEINLINE int mz_zip_reader_filename_compare( const mz_zip_array *pCentral_dir_array, const mz_zip_array *pCentral_dir_offsets, mz_uint l_index, const char *pR, mz_uint r_len) { const mz_uint8 *pL = &MZ_ZIP_ARRAY_ELEMENT( pCentral_dir_array, mz_uint8, MZ_ZIP_ARRAY_ELEMENT(pCentral_dir_offsets, mz_uint32, l_index)), *pE; mz_uint l_len = MZ_READ_LE16(pL + MZ_ZIP_CDH_FILENAME_LEN_OFS); mz_uint8 l = 0, r = 0; pL += MZ_ZIP_CENTRAL_DIR_HEADER_SIZE; pE = pL + MZ_MIN(l_len, r_len); while (pL < pE) { if ((l = MZ_TOLOWER(*pL)) != (r = MZ_TOLOWER(*pR))) break; pL++; pR++; } return (pL == pE) ? (int)(l_len - r_len) : (l - r); } static int mz_zip_reader_locate_file_binary_search(mz_zip_archive *pZip, const char *pFilename) { mz_zip_internal_state *pState = pZip->m_pState; const mz_zip_array *pCentral_dir_offsets = &pState->m_central_dir_offsets; const mz_zip_array *pCentral_dir = &pState->m_central_dir; mz_uint32 *pIndices = &MZ_ZIP_ARRAY_ELEMENT( &pState->m_sorted_central_dir_offsets, mz_uint32, 0); const int size = pZip->m_total_files; const mz_uint filename_len = (mz_uint)strlen(pFilename); int l = 0, h = size - 1; while (l <= h) { int m = (l + h) >> 1, file_index = pIndices[m], comp = mz_zip_reader_filename_compare(pCentral_dir, pCentral_dir_offsets, file_index, pFilename, filename_len); if (!comp) return file_index; else if (comp < 0) l = m + 1; else h = m - 1; } return -1; } int mz_zip_reader_locate_file(mz_zip_archive *pZip, const char *pName, const char *pComment, mz_uint flags) { mz_uint file_index; size_t name_len, comment_len; if ((!pZip) || (!pZip->m_pState) || (!pName) || (pZip->m_zip_mode != MZ_ZIP_MODE_READING)) return -1; if (((flags & (MZ_ZIP_FLAG_IGNORE_PATH | MZ_ZIP_FLAG_CASE_SENSITIVE)) == 0) && (!pComment) && (pZip->m_pState->m_sorted_central_dir_offsets.m_size)) return mz_zip_reader_locate_file_binary_search(pZip, pName); name_len = strlen(pName); if (name_len > 0xFFFF) return -1; comment_len = pComment ? strlen(pComment) : 0; if (comment_len > 0xFFFF) return -1; for (file_index = 0; file_index < pZip->m_total_files; file_index++) { const mz_uint8 *pHeader = &MZ_ZIP_ARRAY_ELEMENT( &pZip->m_pState->m_central_dir, mz_uint8, MZ_ZIP_ARRAY_ELEMENT(&pZip->m_pState->m_central_dir_offsets, mz_uint32, file_index)); mz_uint filename_len = MZ_READ_LE16(pHeader + MZ_ZIP_CDH_FILENAME_LEN_OFS); const char *pFilename = (const char *)pHeader + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE; if (filename_len < name_len) continue; if (comment_len) { mz_uint file_extra_len = MZ_READ_LE16(pHeader + MZ_ZIP_CDH_EXTRA_LEN_OFS), file_comment_len = MZ_READ_LE16(pHeader + MZ_ZIP_CDH_COMMENT_LEN_OFS); const char *pFile_comment = pFilename + filename_len + file_extra_len; if ((file_comment_len != comment_len) || (!mz_zip_reader_string_equal(pComment, pFile_comment, file_comment_len, flags))) continue; } if ((flags & MZ_ZIP_FLAG_IGNORE_PATH) && (filename_len)) { int ofs = filename_len - 1; do { if ((pFilename[ofs] == '/') || (pFilename[ofs] == '\\') || (pFilename[ofs] == ':')) break; } while (--ofs >= 0); ofs++; pFilename += ofs; filename_len -= ofs; } if ((filename_len == name_len) && (mz_zip_reader_string_equal(pName, pFilename, filename_len, flags))) return file_index; } return -1; } mz_bool mz_zip_reader_extract_to_mem_no_alloc(mz_zip_archive *pZip, mz_uint file_index, void *pBuf, size_t buf_size, mz_uint flags, void *pUser_read_buf, size_t user_read_buf_size) { int status = TINFL_STATUS_DONE; mz_uint64 needed_size, cur_file_ofs, comp_remaining, out_buf_ofs = 0, read_buf_size, read_buf_ofs = 0, read_buf_avail; mz_zip_archive_file_stat file_stat; void *pRead_buf; mz_uint32 local_header_u32[(MZ_ZIP_LOCAL_DIR_HEADER_SIZE + sizeof(mz_uint32) - 1) / sizeof(mz_uint32)]; mz_uint8 *pLocal_header = (mz_uint8 *)local_header_u32; tinfl_decompressor inflator; if ((buf_size) && (!pBuf)) return MZ_FALSE; if (!mz_zip_reader_file_stat(pZip, file_index, &file_stat)) return MZ_FALSE; // Empty file, or a directory (but not always a directory - I've seen odd zips // with directories that have compressed data which inflates to 0 bytes) if (!file_stat.m_comp_size) return MZ_TRUE; // Entry is a subdirectory (I've seen old zips with dir entries which have // compressed deflate data which inflates to 0 bytes, but these entries claim // to uncompress to 512 bytes in the headers). // I'm torn how to handle this case - should it fail instead? if (mz_zip_reader_is_file_a_directory(pZip, file_index)) return MZ_TRUE; // Encryption and patch files are not supported. if (file_stat.m_bit_flag & (1 | 32)) return MZ_FALSE; // This function only supports stored and deflate. if ((!(flags & MZ_ZIP_FLAG_COMPRESSED_DATA)) && (file_stat.m_method != 0) && (file_stat.m_method != MZ_DEFLATED)) return MZ_FALSE; // Ensure supplied output buffer is large enough. needed_size = (flags & MZ_ZIP_FLAG_COMPRESSED_DATA) ? file_stat.m_comp_size : file_stat.m_uncomp_size; if (buf_size < needed_size) return MZ_FALSE; // Read and parse the local directory entry. cur_file_ofs = file_stat.m_local_header_ofs; if (pZip->m_pRead(pZip->m_pIO_opaque, cur_file_ofs, pLocal_header, MZ_ZIP_LOCAL_DIR_HEADER_SIZE) != MZ_ZIP_LOCAL_DIR_HEADER_SIZE) return MZ_FALSE; if (MZ_READ_LE32(pLocal_header) != MZ_ZIP_LOCAL_DIR_HEADER_SIG) return MZ_FALSE; cur_file_ofs += MZ_ZIP_LOCAL_DIR_HEADER_SIZE + MZ_READ_LE16(pLocal_header + MZ_ZIP_LDH_FILENAME_LEN_OFS) + MZ_READ_LE16(pLocal_header + MZ_ZIP_LDH_EXTRA_LEN_OFS); if ((cur_file_ofs + file_stat.m_comp_size) > pZip->m_archive_size) return MZ_FALSE; if ((flags & MZ_ZIP_FLAG_COMPRESSED_DATA) || (!file_stat.m_method)) { // The file is stored or the caller has requested the compressed data. if (pZip->m_pRead(pZip->m_pIO_opaque, cur_file_ofs, pBuf, (size_t)needed_size) != needed_size) return MZ_FALSE; return ((flags & MZ_ZIP_FLAG_COMPRESSED_DATA) != 0) || (mz_crc32(MZ_CRC32_INIT, (const mz_uint8 *)pBuf, (size_t)file_stat.m_uncomp_size) == file_stat.m_crc32); } // Decompress the file either directly from memory or from a file input // buffer. tinfl_init(&inflator); if (pZip->m_pState->m_pMem) { // Read directly from the archive in memory. pRead_buf = (mz_uint8 *)pZip->m_pState->m_pMem + cur_file_ofs; read_buf_size = read_buf_avail = file_stat.m_comp_size; comp_remaining = 0; } else if (pUser_read_buf) { // Use a user provided read buffer. if (!user_read_buf_size) return MZ_FALSE; pRead_buf = (mz_uint8 *)pUser_read_buf; read_buf_size = user_read_buf_size; read_buf_avail = 0; comp_remaining = file_stat.m_comp_size; } else { // Temporarily allocate a read buffer. read_buf_size = MZ_MIN(file_stat.m_comp_size, (mz_uint)MZ_ZIP_MAX_IO_BUF_SIZE); #ifdef _MSC_VER if (((0, sizeof(size_t) == sizeof(mz_uint32))) && (read_buf_size > 0x7FFFFFFF)) #else if (((sizeof(size_t) == sizeof(mz_uint32))) && (read_buf_size > 0x7FFFFFFF)) #endif return MZ_FALSE; if (NULL == (pRead_buf = pZip->m_pAlloc(pZip->m_pAlloc_opaque, 1, (size_t)read_buf_size))) return MZ_FALSE; read_buf_avail = 0; comp_remaining = file_stat.m_comp_size; } do { size_t in_buf_size, out_buf_size = (size_t)(file_stat.m_uncomp_size - out_buf_ofs); if ((!read_buf_avail) && (!pZip->m_pState->m_pMem)) { read_buf_avail = MZ_MIN(read_buf_size, comp_remaining); if (pZip->m_pRead(pZip->m_pIO_opaque, cur_file_ofs, pRead_buf, (size_t)read_buf_avail) != read_buf_avail) { status = TINFL_STATUS_FAILED; break; } cur_file_ofs += read_buf_avail; comp_remaining -= read_buf_avail; read_buf_ofs = 0; } in_buf_size = (size_t)read_buf_avail; status = tinfl_decompress( &inflator, (mz_uint8 *)pRead_buf + read_buf_ofs, &in_buf_size, (mz_uint8 *)pBuf, (mz_uint8 *)pBuf + out_buf_ofs, &out_buf_size, TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF | (comp_remaining ? TINFL_FLAG_HAS_MORE_INPUT : 0)); read_buf_avail -= in_buf_size; read_buf_ofs += in_buf_size; out_buf_ofs += out_buf_size; } while (status == TINFL_STATUS_NEEDS_MORE_INPUT); if (status == TINFL_STATUS_DONE) { // Make sure the entire file was decompressed, and check its CRC. if ((out_buf_ofs != file_stat.m_uncomp_size) || (mz_crc32(MZ_CRC32_INIT, (const mz_uint8 *)pBuf, (size_t)file_stat.m_uncomp_size) != file_stat.m_crc32)) status = TINFL_STATUS_FAILED; } if ((!pZip->m_pState->m_pMem) && (!pUser_read_buf)) pZip->m_pFree(pZip->m_pAlloc_opaque, pRead_buf); return status == TINFL_STATUS_DONE; } mz_bool mz_zip_reader_extract_file_to_mem_no_alloc( mz_zip_archive *pZip, const char *pFilename, void *pBuf, size_t buf_size, mz_uint flags, void *pUser_read_buf, size_t user_read_buf_size) { int file_index = mz_zip_reader_locate_file(pZip, pFilename, NULL, flags); if (file_index < 0) return MZ_FALSE; return mz_zip_reader_extract_to_mem_no_alloc(pZip, file_index, pBuf, buf_size, flags, pUser_read_buf, user_read_buf_size); } mz_bool mz_zip_reader_extract_to_mem(mz_zip_archive *pZip, mz_uint file_index, void *pBuf, size_t buf_size, mz_uint flags) { return mz_zip_reader_extract_to_mem_no_alloc(pZip, file_index, pBuf, buf_size, flags, NULL, 0); } mz_bool mz_zip_reader_extract_file_to_mem(mz_zip_archive *pZip, const char *pFilename, void *pBuf, size_t buf_size, mz_uint flags) { return mz_zip_reader_extract_file_to_mem_no_alloc(pZip, pFilename, pBuf, buf_size, flags, NULL, 0); } void *mz_zip_reader_extract_to_heap(mz_zip_archive *pZip, mz_uint file_index, size_t *pSize, mz_uint flags) { mz_uint64 comp_size, uncomp_size, alloc_size; const mz_uint8 *p = mz_zip_reader_get_cdh(pZip, file_index); void *pBuf; if (pSize) *pSize = 0; if (!p) return NULL; comp_size = MZ_READ_LE32(p + MZ_ZIP_CDH_COMPRESSED_SIZE_OFS); uncomp_size = MZ_READ_LE32(p + MZ_ZIP_CDH_DECOMPRESSED_SIZE_OFS); alloc_size = (flags & MZ_ZIP_FLAG_COMPRESSED_DATA) ? comp_size : uncomp_size; #ifdef _MSC_VER if (((0, sizeof(size_t) == sizeof(mz_uint32))) && (alloc_size > 0x7FFFFFFF)) #else if (((sizeof(size_t) == sizeof(mz_uint32))) && (alloc_size > 0x7FFFFFFF)) #endif return NULL; if (NULL == (pBuf = pZip->m_pAlloc(pZip->m_pAlloc_opaque, 1, (size_t)alloc_size))) return NULL; if (!mz_zip_reader_extract_to_mem(pZip, file_index, pBuf, (size_t)alloc_size, flags)) { pZip->m_pFree(pZip->m_pAlloc_opaque, pBuf); return NULL; } if (pSize) *pSize = (size_t)alloc_size; return pBuf; } void *mz_zip_reader_extract_file_to_heap(mz_zip_archive *pZip, const char *pFilename, size_t *pSize, mz_uint flags) { int file_index = mz_zip_reader_locate_file(pZip, pFilename, NULL, flags); if (file_index < 0) { if (pSize) *pSize = 0; return MZ_FALSE; } return mz_zip_reader_extract_to_heap(pZip, file_index, pSize, flags); } mz_bool mz_zip_reader_extract_to_callback(mz_zip_archive *pZip, mz_uint file_index, mz_file_write_func pCallback, void *pOpaque, mz_uint flags) { int status = TINFL_STATUS_DONE; mz_uint file_crc32 = MZ_CRC32_INIT; mz_uint64 read_buf_size, read_buf_ofs = 0, read_buf_avail, comp_remaining, out_buf_ofs = 0, cur_file_ofs; mz_zip_archive_file_stat file_stat; void *pRead_buf = NULL; void *pWrite_buf = NULL; mz_uint32 local_header_u32[(MZ_ZIP_LOCAL_DIR_HEADER_SIZE + sizeof(mz_uint32) - 1) / sizeof(mz_uint32)]; mz_uint8 *pLocal_header = (mz_uint8 *)local_header_u32; if (!mz_zip_reader_file_stat(pZip, file_index, &file_stat)) return MZ_FALSE; // Empty file, or a directory (but not always a directory - I've seen odd zips // with directories that have compressed data which inflates to 0 bytes) if (!file_stat.m_comp_size) return MZ_TRUE; // Entry is a subdirectory (I've seen old zips with dir entries which have // compressed deflate data which inflates to 0 bytes, but these entries claim // to uncompress to 512 bytes in the headers). // I'm torn how to handle this case - should it fail instead? if (mz_zip_reader_is_file_a_directory(pZip, file_index)) return MZ_TRUE; // Encryption and patch files are not supported. if (file_stat.m_bit_flag & (1 | 32)) return MZ_FALSE; // This function only supports stored and deflate. if ((!(flags & MZ_ZIP_FLAG_COMPRESSED_DATA)) && (file_stat.m_method != 0) && (file_stat.m_method != MZ_DEFLATED)) return MZ_FALSE; // Read and parse the local directory entry. cur_file_ofs = file_stat.m_local_header_ofs; if (pZip->m_pRead(pZip->m_pIO_opaque, cur_file_ofs, pLocal_header, MZ_ZIP_LOCAL_DIR_HEADER_SIZE) != MZ_ZIP_LOCAL_DIR_HEADER_SIZE) return MZ_FALSE; if (MZ_READ_LE32(pLocal_header) != MZ_ZIP_LOCAL_DIR_HEADER_SIG) return MZ_FALSE; cur_file_ofs += MZ_ZIP_LOCAL_DIR_HEADER_SIZE + MZ_READ_LE16(pLocal_header + MZ_ZIP_LDH_FILENAME_LEN_OFS) + MZ_READ_LE16(pLocal_header + MZ_ZIP_LDH_EXTRA_LEN_OFS); if ((cur_file_ofs + file_stat.m_comp_size) > pZip->m_archive_size) return MZ_FALSE; // Decompress the file either directly from memory or from a file input // buffer. if (pZip->m_pState->m_pMem) { pRead_buf = (mz_uint8 *)pZip->m_pState->m_pMem + cur_file_ofs; read_buf_size = read_buf_avail = file_stat.m_comp_size; comp_remaining = 0; } else { read_buf_size = MZ_MIN(file_stat.m_comp_size, (mz_uint)MZ_ZIP_MAX_IO_BUF_SIZE); if (NULL == (pRead_buf = pZip->m_pAlloc(pZip->m_pAlloc_opaque, 1, (size_t)read_buf_size))) return MZ_FALSE; read_buf_avail = 0; comp_remaining = file_stat.m_comp_size; } if ((flags & MZ_ZIP_FLAG_COMPRESSED_DATA) || (!file_stat.m_method)) { // The file is stored or the caller has requested the compressed data. if (pZip->m_pState->m_pMem) { #ifdef _MSC_VER if (((0, sizeof(size_t) == sizeof(mz_uint32))) && (file_stat.m_comp_size > 0xFFFFFFFF)) #else if (((sizeof(size_t) == sizeof(mz_uint32))) && (file_stat.m_comp_size > 0xFFFFFFFF)) #endif return MZ_FALSE; if (pCallback(pOpaque, out_buf_ofs, pRead_buf, (size_t)file_stat.m_comp_size) != file_stat.m_comp_size) status = TINFL_STATUS_FAILED; else if (!(flags & MZ_ZIP_FLAG_COMPRESSED_DATA)) file_crc32 = (mz_uint32)mz_crc32(file_crc32, (const mz_uint8 *)pRead_buf, (size_t)file_stat.m_comp_size); cur_file_ofs += file_stat.m_comp_size; out_buf_ofs += file_stat.m_comp_size; comp_remaining = 0; } else { while (comp_remaining) { read_buf_avail = MZ_MIN(read_buf_size, comp_remaining); if (pZip->m_pRead(pZip->m_pIO_opaque, cur_file_ofs, pRead_buf, (size_t)read_buf_avail) != read_buf_avail) { status = TINFL_STATUS_FAILED; break; } if (!(flags & MZ_ZIP_FLAG_COMPRESSED_DATA)) file_crc32 = (mz_uint32)mz_crc32( file_crc32, (const mz_uint8 *)pRead_buf, (size_t)read_buf_avail); if (pCallback(pOpaque, out_buf_ofs, pRead_buf, (size_t)read_buf_avail) != read_buf_avail) { status = TINFL_STATUS_FAILED; break; } cur_file_ofs += read_buf_avail; out_buf_ofs += read_buf_avail; comp_remaining -= read_buf_avail; } } } else { tinfl_decompressor inflator; tinfl_init(&inflator); if (NULL == (pWrite_buf = pZip->m_pAlloc(pZip->m_pAlloc_opaque, 1, TINFL_LZ_DICT_SIZE))) status = TINFL_STATUS_FAILED; else { do { mz_uint8 *pWrite_buf_cur = (mz_uint8 *)pWrite_buf + (out_buf_ofs & (TINFL_LZ_DICT_SIZE - 1)); size_t in_buf_size, out_buf_size = TINFL_LZ_DICT_SIZE - (out_buf_ofs & (TINFL_LZ_DICT_SIZE - 1)); if ((!read_buf_avail) && (!pZip->m_pState->m_pMem)) { read_buf_avail = MZ_MIN(read_buf_size, comp_remaining); if (pZip->m_pRead(pZip->m_pIO_opaque, cur_file_ofs, pRead_buf, (size_t)read_buf_avail) != read_buf_avail) { status = TINFL_STATUS_FAILED; break; } cur_file_ofs += read_buf_avail; comp_remaining -= read_buf_avail; read_buf_ofs = 0; } in_buf_size = (size_t)read_buf_avail; status = tinfl_decompress( &inflator, (const mz_uint8 *)pRead_buf + read_buf_ofs, &in_buf_size, (mz_uint8 *)pWrite_buf, pWrite_buf_cur, &out_buf_size, comp_remaining ? TINFL_FLAG_HAS_MORE_INPUT : 0); read_buf_avail -= in_buf_size; read_buf_ofs += in_buf_size; if (out_buf_size) { if (pCallback(pOpaque, out_buf_ofs, pWrite_buf_cur, out_buf_size) != out_buf_size) { status = TINFL_STATUS_FAILED; break; } file_crc32 = (mz_uint32)mz_crc32(file_crc32, pWrite_buf_cur, out_buf_size); if ((out_buf_ofs += out_buf_size) > file_stat.m_uncomp_size) { status = TINFL_STATUS_FAILED; break; } } } while ((status == TINFL_STATUS_NEEDS_MORE_INPUT) || (status == TINFL_STATUS_HAS_MORE_OUTPUT)); } } if ((status == TINFL_STATUS_DONE) && (!(flags & MZ_ZIP_FLAG_COMPRESSED_DATA))) { // Make sure the entire file was decompressed, and check its CRC. if ((out_buf_ofs != file_stat.m_uncomp_size) || (file_crc32 != file_stat.m_crc32)) status = TINFL_STATUS_FAILED; } if (!pZip->m_pState->m_pMem) pZip->m_pFree(pZip->m_pAlloc_opaque, pRead_buf); if (pWrite_buf) pZip->m_pFree(pZip->m_pAlloc_opaque, pWrite_buf); return status == TINFL_STATUS_DONE; } mz_bool mz_zip_reader_extract_file_to_callback(mz_zip_archive *pZip, const char *pFilename, mz_file_write_func pCallback, void *pOpaque, mz_uint flags) { int file_index = mz_zip_reader_locate_file(pZip, pFilename, NULL, flags); if (file_index < 0) return MZ_FALSE; return mz_zip_reader_extract_to_callback(pZip, file_index, pCallback, pOpaque, flags); } #ifndef MINIZ_NO_STDIO static size_t mz_zip_file_write_callback(void *pOpaque, mz_uint64 ofs, const void *pBuf, size_t n) { (void)ofs; return MZ_FWRITE(pBuf, 1, n, (MZ_FILE *)pOpaque); } mz_bool mz_zip_reader_extract_to_file(mz_zip_archive *pZip, mz_uint file_index, const char *pDst_filename, mz_uint flags) { mz_bool status; mz_zip_archive_file_stat file_stat; MZ_FILE *pFile; if (!mz_zip_reader_file_stat(pZip, file_index, &file_stat)) return MZ_FALSE; pFile = MZ_FOPEN(pDst_filename, "wb"); if (!pFile) return MZ_FALSE; status = mz_zip_reader_extract_to_callback( pZip, file_index, mz_zip_file_write_callback, pFile, flags); if (MZ_FCLOSE(pFile) == EOF) return MZ_FALSE; #ifndef MINIZ_NO_TIME if (status) mz_zip_set_file_times(pDst_filename, file_stat.m_time, file_stat.m_time); #endif return status; } #endif // #ifndef MINIZ_NO_STDIO mz_bool mz_zip_reader_end(mz_zip_archive *pZip) { if ((!pZip) || (!pZip->m_pState) || (!pZip->m_pAlloc) || (!pZip->m_pFree) || (pZip->m_zip_mode != MZ_ZIP_MODE_READING)) return MZ_FALSE; if (pZip->m_pState) { mz_zip_internal_state *pState = pZip->m_pState; pZip->m_pState = NULL; mz_zip_array_clear(pZip, &pState->m_central_dir); mz_zip_array_clear(pZip, &pState->m_central_dir_offsets); mz_zip_array_clear(pZip, &pState->m_sorted_central_dir_offsets); #ifndef MINIZ_NO_STDIO if (pState->m_pFile) { MZ_FCLOSE(pState->m_pFile); pState->m_pFile = NULL; } #endif // #ifndef MINIZ_NO_STDIO pZip->m_pFree(pZip->m_pAlloc_opaque, pState); } pZip->m_zip_mode = MZ_ZIP_MODE_INVALID; return MZ_TRUE; } #ifndef MINIZ_NO_STDIO mz_bool mz_zip_reader_extract_file_to_file(mz_zip_archive *pZip, const char *pArchive_filename, const char *pDst_filename, mz_uint flags) { int file_index = mz_zip_reader_locate_file(pZip, pArchive_filename, NULL, flags); if (file_index < 0) return MZ_FALSE; return mz_zip_reader_extract_to_file(pZip, file_index, pDst_filename, flags); } #endif // ------------------- .ZIP archive writing #ifndef MINIZ_NO_ARCHIVE_WRITING_APIS static void mz_write_le16(mz_uint8 *p, mz_uint16 v) { p[0] = (mz_uint8)v; p[1] = (mz_uint8)(v >> 8); } static void mz_write_le32(mz_uint8 *p, mz_uint32 v) { p[0] = (mz_uint8)v; p[1] = (mz_uint8)(v >> 8); p[2] = (mz_uint8)(v >> 16); p[3] = (mz_uint8)(v >> 24); } #define MZ_WRITE_LE16(p, v) mz_write_le16((mz_uint8 *)(p), (mz_uint16)(v)) #define MZ_WRITE_LE32(p, v) mz_write_le32((mz_uint8 *)(p), (mz_uint32)(v)) mz_bool mz_zip_writer_init(mz_zip_archive *pZip, mz_uint64 existing_size) { if ((!pZip) || (pZip->m_pState) || (!pZip->m_pWrite) || (pZip->m_zip_mode != MZ_ZIP_MODE_INVALID)) return MZ_FALSE; if (pZip->m_file_offset_alignment) { // Ensure user specified file offset alignment is a power of 2. if (pZip->m_file_offset_alignment & (pZip->m_file_offset_alignment - 1)) return MZ_FALSE; } if (!pZip->m_pAlloc) pZip->m_pAlloc = def_alloc_func; if (!pZip->m_pFree) pZip->m_pFree = def_free_func; if (!pZip->m_pRealloc) pZip->m_pRealloc = def_realloc_func; pZip->m_zip_mode = MZ_ZIP_MODE_WRITING; pZip->m_archive_size = existing_size; pZip->m_central_directory_file_ofs = 0; pZip->m_total_files = 0; if (NULL == (pZip->m_pState = (mz_zip_internal_state *)pZip->m_pAlloc( pZip->m_pAlloc_opaque, 1, sizeof(mz_zip_internal_state)))) return MZ_FALSE; memset(pZip->m_pState, 0, sizeof(mz_zip_internal_state)); MZ_ZIP_ARRAY_SET_ELEMENT_SIZE(&pZip->m_pState->m_central_dir, sizeof(mz_uint8)); MZ_ZIP_ARRAY_SET_ELEMENT_SIZE(&pZip->m_pState->m_central_dir_offsets, sizeof(mz_uint32)); MZ_ZIP_ARRAY_SET_ELEMENT_SIZE(&pZip->m_pState->m_sorted_central_dir_offsets, sizeof(mz_uint32)); return MZ_TRUE; } static size_t mz_zip_heap_write_func(void *pOpaque, mz_uint64 file_ofs, const void *pBuf, size_t n) { mz_zip_archive *pZip = (mz_zip_archive *)pOpaque; mz_zip_internal_state *pState = pZip->m_pState; mz_uint64 new_size = MZ_MAX(file_ofs + n, pState->m_mem_size); #ifdef _MSC_VER if ((!n) || ((0, sizeof(size_t) == sizeof(mz_uint32)) && (new_size > 0x7FFFFFFF))) #else if ((!n) || ((sizeof(size_t) == sizeof(mz_uint32)) && (new_size > 0x7FFFFFFF))) #endif return 0; if (new_size > pState->m_mem_capacity) { void *pNew_block; size_t new_capacity = MZ_MAX(64, pState->m_mem_capacity); while (new_capacity < new_size) new_capacity *= 2; if (NULL == (pNew_block = pZip->m_pRealloc( pZip->m_pAlloc_opaque, pState->m_pMem, 1, new_capacity))) return 0; pState->m_pMem = pNew_block; pState->m_mem_capacity = new_capacity; } memcpy((mz_uint8 *)pState->m_pMem + file_ofs, pBuf, n); pState->m_mem_size = (size_t)new_size; return n; } mz_bool mz_zip_writer_init_heap(mz_zip_archive *pZip, size_t size_to_reserve_at_beginning, size_t initial_allocation_size) { pZip->m_pWrite = mz_zip_heap_write_func; pZip->m_pIO_opaque = pZip; if (!mz_zip_writer_init(pZip, size_to_reserve_at_beginning)) return MZ_FALSE; if (0 != (initial_allocation_size = MZ_MAX(initial_allocation_size, size_to_reserve_at_beginning))) { if (NULL == (pZip->m_pState->m_pMem = pZip->m_pAlloc( pZip->m_pAlloc_opaque, 1, initial_allocation_size))) { mz_zip_writer_end(pZip); return MZ_FALSE; } pZip->m_pState->m_mem_capacity = initial_allocation_size; } return MZ_TRUE; } #ifndef MINIZ_NO_STDIO static size_t mz_zip_file_write_func(void *pOpaque, mz_uint64 file_ofs, const void *pBuf, size_t n) { mz_zip_archive *pZip = (mz_zip_archive *)pOpaque; mz_int64 cur_ofs = MZ_FTELL64(pZip->m_pState->m_pFile); if (((mz_int64)file_ofs < 0) || (((cur_ofs != (mz_int64)file_ofs)) && (MZ_FSEEK64(pZip->m_pState->m_pFile, (mz_int64)file_ofs, SEEK_SET)))) return 0; return MZ_FWRITE(pBuf, 1, n, pZip->m_pState->m_pFile); } mz_bool mz_zip_writer_init_file(mz_zip_archive *pZip, const char *pFilename, mz_uint64 size_to_reserve_at_beginning) { MZ_FILE *pFile; pZip->m_pWrite = mz_zip_file_write_func; pZip->m_pIO_opaque = pZip; if (!mz_zip_writer_init(pZip, size_to_reserve_at_beginning)) return MZ_FALSE; if (NULL == (pFile = MZ_FOPEN(pFilename, "wb"))) { mz_zip_writer_end(pZip); return MZ_FALSE; } pZip->m_pState->m_pFile = pFile; if (size_to_reserve_at_beginning) { mz_uint64 cur_ofs = 0; char buf[4096]; MZ_CLEAR_OBJ(buf); do { size_t n = (size_t)MZ_MIN(sizeof(buf), size_to_reserve_at_beginning); if (pZip->m_pWrite(pZip->m_pIO_opaque, cur_ofs, buf, n) != n) { mz_zip_writer_end(pZip); return MZ_FALSE; } cur_ofs += n; size_to_reserve_at_beginning -= n; } while (size_to_reserve_at_beginning); } return MZ_TRUE; } #endif // #ifndef MINIZ_NO_STDIO mz_bool mz_zip_writer_init_from_reader(mz_zip_archive *pZip, const char *pFilename) { mz_zip_internal_state *pState; if ((!pZip) || (!pZip->m_pState) || (pZip->m_zip_mode != MZ_ZIP_MODE_READING)) return MZ_FALSE; // No sense in trying to write to an archive that's already at the support max // size if ((pZip->m_total_files == 0xFFFF) || ((pZip->m_archive_size + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE + MZ_ZIP_LOCAL_DIR_HEADER_SIZE) > 0xFFFFFFFF)) return MZ_FALSE; pState = pZip->m_pState; if (pState->m_pFile) { #ifdef MINIZ_NO_STDIO pFilename; return MZ_FALSE; #else // Archive is being read from stdio - try to reopen as writable. if (pZip->m_pIO_opaque != pZip) return MZ_FALSE; if (!pFilename) return MZ_FALSE; pZip->m_pWrite = mz_zip_file_write_func; if (NULL == (pState->m_pFile = MZ_FREOPEN(pFilename, "r+b", pState->m_pFile))) { // The mz_zip_archive is now in a bogus state because pState->m_pFile is // NULL, so just close it. mz_zip_reader_end(pZip); return MZ_FALSE; } #endif // #ifdef MINIZ_NO_STDIO } else if (pState->m_pMem) { // Archive lives in a memory block. Assume it's from the heap that we can // resize using the realloc callback. if (pZip->m_pIO_opaque != pZip) return MZ_FALSE; pState->m_mem_capacity = pState->m_mem_size; pZip->m_pWrite = mz_zip_heap_write_func; } // Archive is being read via a user provided read function - make sure the // user has specified a write function too. else if (!pZip->m_pWrite) return MZ_FALSE; // Start writing new files at the archive's current central directory // location. pZip->m_archive_size = pZip->m_central_directory_file_ofs; pZip->m_zip_mode = MZ_ZIP_MODE_WRITING; pZip->m_central_directory_file_ofs = 0; return MZ_TRUE; } mz_bool mz_zip_writer_add_mem(mz_zip_archive *pZip, const char *pArchive_name, const void *pBuf, size_t buf_size, mz_uint level_and_flags) { return mz_zip_writer_add_mem_ex(pZip, pArchive_name, pBuf, buf_size, NULL, 0, level_and_flags, 0, 0); } typedef struct { mz_zip_archive *m_pZip; mz_uint64 m_cur_archive_file_ofs; mz_uint64 m_comp_size; } mz_zip_writer_add_state; static mz_bool mz_zip_writer_add_put_buf_callback(const void *pBuf, int len, void *pUser) { mz_zip_writer_add_state *pState = (mz_zip_writer_add_state *)pUser; if ((int)pState->m_pZip->m_pWrite(pState->m_pZip->m_pIO_opaque, pState->m_cur_archive_file_ofs, pBuf, len) != len) return MZ_FALSE; pState->m_cur_archive_file_ofs += len; pState->m_comp_size += len; return MZ_TRUE; } static mz_bool mz_zip_writer_create_local_dir_header( mz_zip_archive *pZip, mz_uint8 *pDst, mz_uint16 filename_size, mz_uint16 extra_size, mz_uint64 uncomp_size, mz_uint64 comp_size, mz_uint32 uncomp_crc32, mz_uint16 method, mz_uint16 bit_flags, mz_uint16 dos_time, mz_uint16 dos_date) { (void)pZip; memset(pDst, 0, MZ_ZIP_LOCAL_DIR_HEADER_SIZE); MZ_WRITE_LE32(pDst + MZ_ZIP_LDH_SIG_OFS, MZ_ZIP_LOCAL_DIR_HEADER_SIG); MZ_WRITE_LE16(pDst + MZ_ZIP_LDH_VERSION_NEEDED_OFS, method ? 20 : 0); MZ_WRITE_LE16(pDst + MZ_ZIP_LDH_BIT_FLAG_OFS, bit_flags); MZ_WRITE_LE16(pDst + MZ_ZIP_LDH_METHOD_OFS, method); MZ_WRITE_LE16(pDst + MZ_ZIP_LDH_FILE_TIME_OFS, dos_time); MZ_WRITE_LE16(pDst + MZ_ZIP_LDH_FILE_DATE_OFS, dos_date); MZ_WRITE_LE32(pDst + MZ_ZIP_LDH_CRC32_OFS, uncomp_crc32); MZ_WRITE_LE32(pDst + MZ_ZIP_LDH_COMPRESSED_SIZE_OFS, comp_size); MZ_WRITE_LE32(pDst + MZ_ZIP_LDH_DECOMPRESSED_SIZE_OFS, uncomp_size); MZ_WRITE_LE16(pDst + MZ_ZIP_LDH_FILENAME_LEN_OFS, filename_size); MZ_WRITE_LE16(pDst + MZ_ZIP_LDH_EXTRA_LEN_OFS, extra_size); return MZ_TRUE; } static mz_bool mz_zip_writer_create_central_dir_header( mz_zip_archive *pZip, mz_uint8 *pDst, mz_uint16 filename_size, mz_uint16 extra_size, mz_uint16 comment_size, mz_uint64 uncomp_size, mz_uint64 comp_size, mz_uint32 uncomp_crc32, mz_uint16 method, mz_uint16 bit_flags, mz_uint16 dos_time, mz_uint16 dos_date, mz_uint64 local_header_ofs, mz_uint32 ext_attributes) { (void)pZip; memset(pDst, 0, MZ_ZIP_CENTRAL_DIR_HEADER_SIZE); MZ_WRITE_LE32(pDst + MZ_ZIP_CDH_SIG_OFS, MZ_ZIP_CENTRAL_DIR_HEADER_SIG); MZ_WRITE_LE16(pDst + MZ_ZIP_CDH_VERSION_NEEDED_OFS, method ? 20 : 0); MZ_WRITE_LE16(pDst + MZ_ZIP_CDH_BIT_FLAG_OFS, bit_flags); MZ_WRITE_LE16(pDst + MZ_ZIP_CDH_METHOD_OFS, method); MZ_WRITE_LE16(pDst + MZ_ZIP_CDH_FILE_TIME_OFS, dos_time); MZ_WRITE_LE16(pDst + MZ_ZIP_CDH_FILE_DATE_OFS, dos_date); MZ_WRITE_LE32(pDst + MZ_ZIP_CDH_CRC32_OFS, uncomp_crc32); MZ_WRITE_LE32(pDst + MZ_ZIP_CDH_COMPRESSED_SIZE_OFS, comp_size); MZ_WRITE_LE32(pDst + MZ_ZIP_CDH_DECOMPRESSED_SIZE_OFS, uncomp_size); MZ_WRITE_LE16(pDst + MZ_ZIP_CDH_FILENAME_LEN_OFS, filename_size); MZ_WRITE_LE16(pDst + MZ_ZIP_CDH_EXTRA_LEN_OFS, extra_size); MZ_WRITE_LE16(pDst + MZ_ZIP_CDH_COMMENT_LEN_OFS, comment_size); MZ_WRITE_LE32(pDst + MZ_ZIP_CDH_EXTERNAL_ATTR_OFS, ext_attributes); MZ_WRITE_LE32(pDst + MZ_ZIP_CDH_LOCAL_HEADER_OFS, local_header_ofs); return MZ_TRUE; } static mz_bool mz_zip_writer_add_to_central_dir( mz_zip_archive *pZip, const char *pFilename, mz_uint16 filename_size, const void *pExtra, mz_uint16 extra_size, const void *pComment, mz_uint16 comment_size, mz_uint64 uncomp_size, mz_uint64 comp_size, mz_uint32 uncomp_crc32, mz_uint16 method, mz_uint16 bit_flags, mz_uint16 dos_time, mz_uint16 dos_date, mz_uint64 local_header_ofs, mz_uint32 ext_attributes) { mz_zip_internal_state *pState = pZip->m_pState; mz_uint32 central_dir_ofs = (mz_uint32)pState->m_central_dir.m_size; size_t orig_central_dir_size = pState->m_central_dir.m_size; mz_uint8 central_dir_header[MZ_ZIP_CENTRAL_DIR_HEADER_SIZE]; // No zip64 support yet if ((local_header_ofs > 0xFFFFFFFF) || (((mz_uint64)pState->m_central_dir.m_size + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE + filename_size + extra_size + comment_size) > 0xFFFFFFFF)) return MZ_FALSE; if (!mz_zip_writer_create_central_dir_header( pZip, central_dir_header, filename_size, extra_size, comment_size, uncomp_size, comp_size, uncomp_crc32, method, bit_flags, dos_time, dos_date, local_header_ofs, ext_attributes)) return MZ_FALSE; if ((!mz_zip_array_push_back(pZip, &pState->m_central_dir, central_dir_header, MZ_ZIP_CENTRAL_DIR_HEADER_SIZE)) || (!mz_zip_array_push_back(pZip, &pState->m_central_dir, pFilename, filename_size)) || (!mz_zip_array_push_back(pZip, &pState->m_central_dir, pExtra, extra_size)) || (!mz_zip_array_push_back(pZip, &pState->m_central_dir, pComment, comment_size)) || (!mz_zip_array_push_back(pZip, &pState->m_central_dir_offsets, ¢ral_dir_ofs, 1))) { // Try to push the central directory array back into its original state. mz_zip_array_resize(pZip, &pState->m_central_dir, orig_central_dir_size, MZ_FALSE); return MZ_FALSE; } return MZ_TRUE; } static mz_bool mz_zip_writer_validate_archive_name(const char *pArchive_name) { // Basic ZIP archive filename validity checks: Valid filenames cannot start // with a forward slash, cannot contain a drive letter, and cannot use // DOS-style backward slashes. if (*pArchive_name == '/') return MZ_FALSE; while (*pArchive_name) { if ((*pArchive_name == '\\') || (*pArchive_name == ':')) return MZ_FALSE; pArchive_name++; } return MZ_TRUE; } static mz_uint mz_zip_writer_compute_padding_needed_for_file_alignment( mz_zip_archive *pZip) { mz_uint32 n; if (!pZip->m_file_offset_alignment) return 0; n = (mz_uint32)(pZip->m_archive_size & (pZip->m_file_offset_alignment - 1)); return (pZip->m_file_offset_alignment - n) & (pZip->m_file_offset_alignment - 1); } static mz_bool mz_zip_writer_write_zeros(mz_zip_archive *pZip, mz_uint64 cur_file_ofs, mz_uint32 n) { char buf[4096]; memset(buf, 0, MZ_MIN(sizeof(buf), n)); while (n) { mz_uint32 s = MZ_MIN(sizeof(buf), n); if (pZip->m_pWrite(pZip->m_pIO_opaque, cur_file_ofs, buf, s) != s) return MZ_FALSE; cur_file_ofs += s; n -= s; } return MZ_TRUE; } mz_bool mz_zip_writer_add_mem_ex(mz_zip_archive *pZip, const char *pArchive_name, const void *pBuf, size_t buf_size, const void *pComment, mz_uint16 comment_size, mz_uint level_and_flags, mz_uint64 uncomp_size, mz_uint32 uncomp_crc32) { mz_uint16 method = 0, dos_time = 0, dos_date = 0; mz_uint level, ext_attributes = 0, num_alignment_padding_bytes; mz_uint64 local_dir_header_ofs = pZip->m_archive_size, cur_archive_file_ofs = pZip->m_archive_size, comp_size = 0; size_t archive_name_size; mz_uint8 local_dir_header[MZ_ZIP_LOCAL_DIR_HEADER_SIZE]; tdefl_compressor *pComp = NULL; mz_bool store_data_uncompressed; mz_zip_internal_state *pState; if ((int)level_and_flags < 0) level_and_flags = MZ_DEFAULT_LEVEL; level = level_and_flags & 0xF; store_data_uncompressed = ((!level) || (level_and_flags & MZ_ZIP_FLAG_COMPRESSED_DATA)); if ((!pZip) || (!pZip->m_pState) || (pZip->m_zip_mode != MZ_ZIP_MODE_WRITING) || ((buf_size) && (!pBuf)) || (!pArchive_name) || ((comment_size) && (!pComment)) || (pZip->m_total_files == 0xFFFF) || (level > MZ_UBER_COMPRESSION)) return MZ_FALSE; pState = pZip->m_pState; if ((!(level_and_flags & MZ_ZIP_FLAG_COMPRESSED_DATA)) && (uncomp_size)) return MZ_FALSE; // No zip64 support yet if ((buf_size > 0xFFFFFFFF) || (uncomp_size > 0xFFFFFFFF)) return MZ_FALSE; if (!mz_zip_writer_validate_archive_name(pArchive_name)) return MZ_FALSE; #ifndef MINIZ_NO_TIME { time_t cur_time; time(&cur_time); mz_zip_time_to_dos_time(cur_time, &dos_time, &dos_date); } #endif // #ifndef MINIZ_NO_TIME archive_name_size = strlen(pArchive_name); if (archive_name_size > 0xFFFF) return MZ_FALSE; num_alignment_padding_bytes = mz_zip_writer_compute_padding_needed_for_file_alignment(pZip); // no zip64 support yet if ((pZip->m_total_files == 0xFFFF) || ((pZip->m_archive_size + num_alignment_padding_bytes + MZ_ZIP_LOCAL_DIR_HEADER_SIZE + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE + comment_size + archive_name_size) > 0xFFFFFFFF)) return MZ_FALSE; if ((archive_name_size) && (pArchive_name[archive_name_size - 1] == '/')) { // Set DOS Subdirectory attribute bit. ext_attributes |= 0x10; // Subdirectories cannot contain data. if ((buf_size) || (uncomp_size)) return MZ_FALSE; } // Try to do any allocations before writing to the archive, so if an // allocation fails the file remains unmodified. (A good idea if we're doing // an in-place modification.) if ((!mz_zip_array_ensure_room( pZip, &pState->m_central_dir, MZ_ZIP_CENTRAL_DIR_HEADER_SIZE + archive_name_size + comment_size)) || (!mz_zip_array_ensure_room(pZip, &pState->m_central_dir_offsets, 1))) return MZ_FALSE; if ((!store_data_uncompressed) && (buf_size)) { if (NULL == (pComp = (tdefl_compressor *)pZip->m_pAlloc( pZip->m_pAlloc_opaque, 1, sizeof(tdefl_compressor)))) return MZ_FALSE; } if (!mz_zip_writer_write_zeros( pZip, cur_archive_file_ofs, num_alignment_padding_bytes + sizeof(local_dir_header))) { pZip->m_pFree(pZip->m_pAlloc_opaque, pComp); return MZ_FALSE; } local_dir_header_ofs += num_alignment_padding_bytes; if (pZip->m_file_offset_alignment) { MZ_ASSERT((local_dir_header_ofs & (pZip->m_file_offset_alignment - 1)) == 0); } cur_archive_file_ofs += num_alignment_padding_bytes + sizeof(local_dir_header); MZ_CLEAR_OBJ(local_dir_header); if (pZip->m_pWrite(pZip->m_pIO_opaque, cur_archive_file_ofs, pArchive_name, archive_name_size) != archive_name_size) { pZip->m_pFree(pZip->m_pAlloc_opaque, pComp); return MZ_FALSE; } cur_archive_file_ofs += archive_name_size; if (!(level_and_flags & MZ_ZIP_FLAG_COMPRESSED_DATA)) { uncomp_crc32 = (mz_uint32)mz_crc32(MZ_CRC32_INIT, (const mz_uint8 *)pBuf, buf_size); uncomp_size = buf_size; if (uncomp_size <= 3) { level = 0; store_data_uncompressed = MZ_TRUE; } } if (store_data_uncompressed) { if (pZip->m_pWrite(pZip->m_pIO_opaque, cur_archive_file_ofs, pBuf, buf_size) != buf_size) { pZip->m_pFree(pZip->m_pAlloc_opaque, pComp); return MZ_FALSE; } cur_archive_file_ofs += buf_size; comp_size = buf_size; if (level_and_flags & MZ_ZIP_FLAG_COMPRESSED_DATA) method = MZ_DEFLATED; } else if (buf_size) { mz_zip_writer_add_state state; state.m_pZip = pZip; state.m_cur_archive_file_ofs = cur_archive_file_ofs; state.m_comp_size = 0; if ((tdefl_init(pComp, mz_zip_writer_add_put_buf_callback, &state, tdefl_create_comp_flags_from_zip_params( level, -15, MZ_DEFAULT_STRATEGY)) != TDEFL_STATUS_OKAY) || (tdefl_compress_buffer(pComp, pBuf, buf_size, TDEFL_FINISH) != TDEFL_STATUS_DONE)) { pZip->m_pFree(pZip->m_pAlloc_opaque, pComp); return MZ_FALSE; } comp_size = state.m_comp_size; cur_archive_file_ofs = state.m_cur_archive_file_ofs; method = MZ_DEFLATED; } pZip->m_pFree(pZip->m_pAlloc_opaque, pComp); pComp = NULL; // no zip64 support yet if ((comp_size > 0xFFFFFFFF) || (cur_archive_file_ofs > 0xFFFFFFFF)) return MZ_FALSE; if (!mz_zip_writer_create_local_dir_header( pZip, local_dir_header, (mz_uint16)archive_name_size, 0, uncomp_size, comp_size, uncomp_crc32, method, 0, dos_time, dos_date)) return MZ_FALSE; if (pZip->m_pWrite(pZip->m_pIO_opaque, local_dir_header_ofs, local_dir_header, sizeof(local_dir_header)) != sizeof(local_dir_header)) return MZ_FALSE; if (!mz_zip_writer_add_to_central_dir( pZip, pArchive_name, (mz_uint16)archive_name_size, NULL, 0, pComment, comment_size, uncomp_size, comp_size, uncomp_crc32, method, 0, dos_time, dos_date, local_dir_header_ofs, ext_attributes)) return MZ_FALSE; pZip->m_total_files++; pZip->m_archive_size = cur_archive_file_ofs; return MZ_TRUE; } #ifndef MINIZ_NO_STDIO mz_bool mz_zip_writer_add_file(mz_zip_archive *pZip, const char *pArchive_name, const char *pSrc_filename, const void *pComment, mz_uint16 comment_size, mz_uint level_and_flags) { mz_uint uncomp_crc32 = MZ_CRC32_INIT, level, num_alignment_padding_bytes; mz_uint16 method = 0, dos_time = 0, dos_date = 0, ext_attributes = 0; mz_uint64 local_dir_header_ofs = pZip->m_archive_size, cur_archive_file_ofs = pZip->m_archive_size, uncomp_size = 0, comp_size = 0; size_t archive_name_size; mz_uint8 local_dir_header[MZ_ZIP_LOCAL_DIR_HEADER_SIZE]; MZ_FILE *pSrc_file = NULL; if ((int)level_and_flags < 0) level_and_flags = MZ_DEFAULT_LEVEL; level = level_and_flags & 0xF; if ((!pZip) || (!pZip->m_pState) || (pZip->m_zip_mode != MZ_ZIP_MODE_WRITING) || (!pArchive_name) || ((comment_size) && (!pComment)) || (level > MZ_UBER_COMPRESSION)) return MZ_FALSE; if (level_and_flags & MZ_ZIP_FLAG_COMPRESSED_DATA) return MZ_FALSE; if (!mz_zip_writer_validate_archive_name(pArchive_name)) return MZ_FALSE; archive_name_size = strlen(pArchive_name); if (archive_name_size > 0xFFFF) return MZ_FALSE; num_alignment_padding_bytes = mz_zip_writer_compute_padding_needed_for_file_alignment(pZip); // no zip64 support yet if ((pZip->m_total_files == 0xFFFF) || ((pZip->m_archive_size + num_alignment_padding_bytes + MZ_ZIP_LOCAL_DIR_HEADER_SIZE + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE + comment_size + archive_name_size) > 0xFFFFFFFF)) return MZ_FALSE; if (!mz_zip_get_file_modified_time(pSrc_filename, &dos_time, &dos_date)) return MZ_FALSE; pSrc_file = MZ_FOPEN(pSrc_filename, "rb"); if (!pSrc_file) return MZ_FALSE; MZ_FSEEK64(pSrc_file, 0, SEEK_END); uncomp_size = MZ_FTELL64(pSrc_file); MZ_FSEEK64(pSrc_file, 0, SEEK_SET); if (uncomp_size > 0xFFFFFFFF) { // No zip64 support yet MZ_FCLOSE(pSrc_file); return MZ_FALSE; } if (uncomp_size <= 3) level = 0; if (!mz_zip_writer_write_zeros( pZip, cur_archive_file_ofs, num_alignment_padding_bytes + sizeof(local_dir_header))) { MZ_FCLOSE(pSrc_file); return MZ_FALSE; } local_dir_header_ofs += num_alignment_padding_bytes; if (pZip->m_file_offset_alignment) { MZ_ASSERT((local_dir_header_ofs & (pZip->m_file_offset_alignment - 1)) == 0); } cur_archive_file_ofs += num_alignment_padding_bytes + sizeof(local_dir_header); MZ_CLEAR_OBJ(local_dir_header); if (pZip->m_pWrite(pZip->m_pIO_opaque, cur_archive_file_ofs, pArchive_name, archive_name_size) != archive_name_size) { MZ_FCLOSE(pSrc_file); return MZ_FALSE; } cur_archive_file_ofs += archive_name_size; if (uncomp_size) { mz_uint64 uncomp_remaining = uncomp_size; void *pRead_buf = pZip->m_pAlloc(pZip->m_pAlloc_opaque, 1, MZ_ZIP_MAX_IO_BUF_SIZE); if (!pRead_buf) { MZ_FCLOSE(pSrc_file); return MZ_FALSE; } if (!level) { while (uncomp_remaining) { mz_uint n = (mz_uint)MZ_MIN((mz_uint)MZ_ZIP_MAX_IO_BUF_SIZE, uncomp_remaining); if ((MZ_FREAD(pRead_buf, 1, n, pSrc_file) != n) || (pZip->m_pWrite(pZip->m_pIO_opaque, cur_archive_file_ofs, pRead_buf, n) != n)) { pZip->m_pFree(pZip->m_pAlloc_opaque, pRead_buf); MZ_FCLOSE(pSrc_file); return MZ_FALSE; } uncomp_crc32 = (mz_uint32)mz_crc32(uncomp_crc32, (const mz_uint8 *)pRead_buf, n); uncomp_remaining -= n; cur_archive_file_ofs += n; } comp_size = uncomp_size; } else { mz_bool result = MZ_FALSE; mz_zip_writer_add_state state; tdefl_compressor *pComp = (tdefl_compressor *)pZip->m_pAlloc( pZip->m_pAlloc_opaque, 1, sizeof(tdefl_compressor)); if (!pComp) { pZip->m_pFree(pZip->m_pAlloc_opaque, pRead_buf); MZ_FCLOSE(pSrc_file); return MZ_FALSE; } state.m_pZip = pZip; state.m_cur_archive_file_ofs = cur_archive_file_ofs; state.m_comp_size = 0; if (tdefl_init(pComp, mz_zip_writer_add_put_buf_callback, &state, tdefl_create_comp_flags_from_zip_params( level, -15, MZ_DEFAULT_STRATEGY)) != TDEFL_STATUS_OKAY) { pZip->m_pFree(pZip->m_pAlloc_opaque, pComp); pZip->m_pFree(pZip->m_pAlloc_opaque, pRead_buf); MZ_FCLOSE(pSrc_file); return MZ_FALSE; } for (;;) { size_t in_buf_size = (mz_uint32)MZ_MIN(uncomp_remaining, (mz_uint)MZ_ZIP_MAX_IO_BUF_SIZE); tdefl_status status; if (MZ_FREAD(pRead_buf, 1, in_buf_size, pSrc_file) != in_buf_size) break; uncomp_crc32 = (mz_uint32)mz_crc32( uncomp_crc32, (const mz_uint8 *)pRead_buf, in_buf_size); uncomp_remaining -= in_buf_size; status = tdefl_compress_buffer( pComp, pRead_buf, in_buf_size, uncomp_remaining ? TDEFL_NO_FLUSH : TDEFL_FINISH); if (status == TDEFL_STATUS_DONE) { result = MZ_TRUE; break; } else if (status != TDEFL_STATUS_OKAY) break; } pZip->m_pFree(pZip->m_pAlloc_opaque, pComp); if (!result) { pZip->m_pFree(pZip->m_pAlloc_opaque, pRead_buf); MZ_FCLOSE(pSrc_file); return MZ_FALSE; } comp_size = state.m_comp_size; cur_archive_file_ofs = state.m_cur_archive_file_ofs; method = MZ_DEFLATED; } pZip->m_pFree(pZip->m_pAlloc_opaque, pRead_buf); } MZ_FCLOSE(pSrc_file); pSrc_file = NULL; // no zip64 support yet if ((comp_size > 0xFFFFFFFF) || (cur_archive_file_ofs > 0xFFFFFFFF)) return MZ_FALSE; if (!mz_zip_writer_create_local_dir_header( pZip, local_dir_header, (mz_uint16)archive_name_size, 0, uncomp_size, comp_size, uncomp_crc32, method, 0, dos_time, dos_date)) return MZ_FALSE; if (pZip->m_pWrite(pZip->m_pIO_opaque, local_dir_header_ofs, local_dir_header, sizeof(local_dir_header)) != sizeof(local_dir_header)) return MZ_FALSE; if (!mz_zip_writer_add_to_central_dir( pZip, pArchive_name, (mz_uint16)archive_name_size, NULL, 0, pComment, comment_size, uncomp_size, comp_size, uncomp_crc32, method, 0, dos_time, dos_date, local_dir_header_ofs, ext_attributes)) return MZ_FALSE; pZip->m_total_files++; pZip->m_archive_size = cur_archive_file_ofs; return MZ_TRUE; } #endif // #ifndef MINIZ_NO_STDIO mz_bool mz_zip_writer_add_from_zip_reader(mz_zip_archive *pZip, mz_zip_archive *pSource_zip, mz_uint file_index) { mz_uint n, bit_flags, num_alignment_padding_bytes; mz_uint64 comp_bytes_remaining, local_dir_header_ofs; mz_uint64 cur_src_file_ofs, cur_dst_file_ofs; mz_uint32 local_header_u32[(MZ_ZIP_LOCAL_DIR_HEADER_SIZE + sizeof(mz_uint32) - 1) / sizeof(mz_uint32)]; mz_uint8 *pLocal_header = (mz_uint8 *)local_header_u32; mz_uint8 central_header[MZ_ZIP_CENTRAL_DIR_HEADER_SIZE]; size_t orig_central_dir_size; mz_zip_internal_state *pState; void *pBuf; const mz_uint8 *pSrc_central_header; if ((!pZip) || (!pZip->m_pState) || (pZip->m_zip_mode != MZ_ZIP_MODE_WRITING)) return MZ_FALSE; if (NULL == (pSrc_central_header = mz_zip_reader_get_cdh(pSource_zip, file_index))) return MZ_FALSE; pState = pZip->m_pState; num_alignment_padding_bytes = mz_zip_writer_compute_padding_needed_for_file_alignment(pZip); // no zip64 support yet if ((pZip->m_total_files == 0xFFFF) || ((pZip->m_archive_size + num_alignment_padding_bytes + MZ_ZIP_LOCAL_DIR_HEADER_SIZE + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE) > 0xFFFFFFFF)) return MZ_FALSE; cur_src_file_ofs = MZ_READ_LE32(pSrc_central_header + MZ_ZIP_CDH_LOCAL_HEADER_OFS); cur_dst_file_ofs = pZip->m_archive_size; if (pSource_zip->m_pRead(pSource_zip->m_pIO_opaque, cur_src_file_ofs, pLocal_header, MZ_ZIP_LOCAL_DIR_HEADER_SIZE) != MZ_ZIP_LOCAL_DIR_HEADER_SIZE) return MZ_FALSE; if (MZ_READ_LE32(pLocal_header) != MZ_ZIP_LOCAL_DIR_HEADER_SIG) return MZ_FALSE; cur_src_file_ofs += MZ_ZIP_LOCAL_DIR_HEADER_SIZE; if (!mz_zip_writer_write_zeros(pZip, cur_dst_file_ofs, num_alignment_padding_bytes)) return MZ_FALSE; cur_dst_file_ofs += num_alignment_padding_bytes; local_dir_header_ofs = cur_dst_file_ofs; if (pZip->m_file_offset_alignment) { MZ_ASSERT((local_dir_header_ofs & (pZip->m_file_offset_alignment - 1)) == 0); } if (pZip->m_pWrite(pZip->m_pIO_opaque, cur_dst_file_ofs, pLocal_header, MZ_ZIP_LOCAL_DIR_HEADER_SIZE) != MZ_ZIP_LOCAL_DIR_HEADER_SIZE) return MZ_FALSE; cur_dst_file_ofs += MZ_ZIP_LOCAL_DIR_HEADER_SIZE; n = MZ_READ_LE16(pLocal_header + MZ_ZIP_LDH_FILENAME_LEN_OFS) + MZ_READ_LE16(pLocal_header + MZ_ZIP_LDH_EXTRA_LEN_OFS); comp_bytes_remaining = n + MZ_READ_LE32(pSrc_central_header + MZ_ZIP_CDH_COMPRESSED_SIZE_OFS); if (NULL == (pBuf = pZip->m_pAlloc( pZip->m_pAlloc_opaque, 1, (size_t)MZ_MAX(sizeof(mz_uint32) * 4, MZ_MIN((mz_uint)MZ_ZIP_MAX_IO_BUF_SIZE, comp_bytes_remaining))))) return MZ_FALSE; while (comp_bytes_remaining) { n = (mz_uint)MZ_MIN((mz_uint)MZ_ZIP_MAX_IO_BUF_SIZE, comp_bytes_remaining); if (pSource_zip->m_pRead(pSource_zip->m_pIO_opaque, cur_src_file_ofs, pBuf, n) != n) { pZip->m_pFree(pZip->m_pAlloc_opaque, pBuf); return MZ_FALSE; } cur_src_file_ofs += n; if (pZip->m_pWrite(pZip->m_pIO_opaque, cur_dst_file_ofs, pBuf, n) != n) { pZip->m_pFree(pZip->m_pAlloc_opaque, pBuf); return MZ_FALSE; } cur_dst_file_ofs += n; comp_bytes_remaining -= n; } bit_flags = MZ_READ_LE16(pLocal_header + MZ_ZIP_LDH_BIT_FLAG_OFS); if (bit_flags & 8) { // Copy data descriptor if (pSource_zip->m_pRead(pSource_zip->m_pIO_opaque, cur_src_file_ofs, pBuf, sizeof(mz_uint32) * 4) != sizeof(mz_uint32) * 4) { pZip->m_pFree(pZip->m_pAlloc_opaque, pBuf); return MZ_FALSE; } n = sizeof(mz_uint32) * ((MZ_READ_LE32(pBuf) == 0x08074b50) ? 4 : 3); if (pZip->m_pWrite(pZip->m_pIO_opaque, cur_dst_file_ofs, pBuf, n) != n) { pZip->m_pFree(pZip->m_pAlloc_opaque, pBuf); return MZ_FALSE; } cur_src_file_ofs += n; cur_dst_file_ofs += n; } pZip->m_pFree(pZip->m_pAlloc_opaque, pBuf); // no zip64 support yet if (cur_dst_file_ofs > 0xFFFFFFFF) return MZ_FALSE; orig_central_dir_size = pState->m_central_dir.m_size; memcpy(central_header, pSrc_central_header, MZ_ZIP_CENTRAL_DIR_HEADER_SIZE); MZ_WRITE_LE32(central_header + MZ_ZIP_CDH_LOCAL_HEADER_OFS, local_dir_header_ofs); if (!mz_zip_array_push_back(pZip, &pState->m_central_dir, central_header, MZ_ZIP_CENTRAL_DIR_HEADER_SIZE)) return MZ_FALSE; n = MZ_READ_LE16(pSrc_central_header + MZ_ZIP_CDH_FILENAME_LEN_OFS) + MZ_READ_LE16(pSrc_central_header + MZ_ZIP_CDH_EXTRA_LEN_OFS) + MZ_READ_LE16(pSrc_central_header + MZ_ZIP_CDH_COMMENT_LEN_OFS); if (!mz_zip_array_push_back( pZip, &pState->m_central_dir, pSrc_central_header + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE, n)) { mz_zip_array_resize(pZip, &pState->m_central_dir, orig_central_dir_size, MZ_FALSE); return MZ_FALSE; } if (pState->m_central_dir.m_size > 0xFFFFFFFF) return MZ_FALSE; n = (mz_uint32)orig_central_dir_size; if (!mz_zip_array_push_back(pZip, &pState->m_central_dir_offsets, &n, 1)) { mz_zip_array_resize(pZip, &pState->m_central_dir, orig_central_dir_size, MZ_FALSE); return MZ_FALSE; } pZip->m_total_files++; pZip->m_archive_size = cur_dst_file_ofs; return MZ_TRUE; } mz_bool mz_zip_writer_finalize_archive(mz_zip_archive *pZip) { mz_zip_internal_state *pState; mz_uint64 central_dir_ofs, central_dir_size; mz_uint8 hdr[MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE]; if ((!pZip) || (!pZip->m_pState) || (pZip->m_zip_mode != MZ_ZIP_MODE_WRITING)) return MZ_FALSE; pState = pZip->m_pState; // no zip64 support yet if ((pZip->m_total_files > 0xFFFF) || ((pZip->m_archive_size + pState->m_central_dir.m_size + MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE) > 0xFFFFFFFF)) return MZ_FALSE; central_dir_ofs = 0; central_dir_size = 0; if (pZip->m_total_files) { // Write central directory central_dir_ofs = pZip->m_archive_size; central_dir_size = pState->m_central_dir.m_size; pZip->m_central_directory_file_ofs = central_dir_ofs; if (pZip->m_pWrite(pZip->m_pIO_opaque, central_dir_ofs, pState->m_central_dir.m_p, (size_t)central_dir_size) != central_dir_size) return MZ_FALSE; pZip->m_archive_size += central_dir_size; } // Write end of central directory record MZ_CLEAR_OBJ(hdr); MZ_WRITE_LE32(hdr + MZ_ZIP_ECDH_SIG_OFS, MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIG); MZ_WRITE_LE16(hdr + MZ_ZIP_ECDH_CDIR_NUM_ENTRIES_ON_DISK_OFS, pZip->m_total_files); MZ_WRITE_LE16(hdr + MZ_ZIP_ECDH_CDIR_TOTAL_ENTRIES_OFS, pZip->m_total_files); MZ_WRITE_LE32(hdr + MZ_ZIP_ECDH_CDIR_SIZE_OFS, central_dir_size); MZ_WRITE_LE32(hdr + MZ_ZIP_ECDH_CDIR_OFS_OFS, central_dir_ofs); if (pZip->m_pWrite(pZip->m_pIO_opaque, pZip->m_archive_size, hdr, sizeof(hdr)) != sizeof(hdr)) return MZ_FALSE; #ifndef MINIZ_NO_STDIO if ((pState->m_pFile) && (MZ_FFLUSH(pState->m_pFile) == EOF)) return MZ_FALSE; #endif // #ifndef MINIZ_NO_STDIO pZip->m_archive_size += sizeof(hdr); pZip->m_zip_mode = MZ_ZIP_MODE_WRITING_HAS_BEEN_FINALIZED; return MZ_TRUE; } mz_bool mz_zip_writer_finalize_heap_archive(mz_zip_archive *pZip, void **pBuf, size_t *pSize) { if ((!pZip) || (!pZip->m_pState) || (!pBuf) || (!pSize)) return MZ_FALSE; if (pZip->m_pWrite != mz_zip_heap_write_func) return MZ_FALSE; if (!mz_zip_writer_finalize_archive(pZip)) return MZ_FALSE; *pBuf = pZip->m_pState->m_pMem; *pSize = pZip->m_pState->m_mem_size; pZip->m_pState->m_pMem = NULL; pZip->m_pState->m_mem_size = pZip->m_pState->m_mem_capacity = 0; return MZ_TRUE; } mz_bool mz_zip_writer_end(mz_zip_archive *pZip) { mz_zip_internal_state *pState; mz_bool status = MZ_TRUE; if ((!pZip) || (!pZip->m_pState) || (!pZip->m_pAlloc) || (!pZip->m_pFree) || ((pZip->m_zip_mode != MZ_ZIP_MODE_WRITING) && (pZip->m_zip_mode != MZ_ZIP_MODE_WRITING_HAS_BEEN_FINALIZED))) return MZ_FALSE; pState = pZip->m_pState; pZip->m_pState = NULL; mz_zip_array_clear(pZip, &pState->m_central_dir); mz_zip_array_clear(pZip, &pState->m_central_dir_offsets); mz_zip_array_clear(pZip, &pState->m_sorted_central_dir_offsets); #ifndef MINIZ_NO_STDIO if (pState->m_pFile) { MZ_FCLOSE(pState->m_pFile); pState->m_pFile = NULL; } #endif // #ifndef MINIZ_NO_STDIO if ((pZip->m_pWrite == mz_zip_heap_write_func) && (pState->m_pMem)) { pZip->m_pFree(pZip->m_pAlloc_opaque, pState->m_pMem); pState->m_pMem = NULL; } pZip->m_pFree(pZip->m_pAlloc_opaque, pState); pZip->m_zip_mode = MZ_ZIP_MODE_INVALID; return status; } #ifndef MINIZ_NO_STDIO mz_bool mz_zip_add_mem_to_archive_file_in_place( const char *pZip_filename, const char *pArchive_name, const void *pBuf, size_t buf_size, const void *pComment, mz_uint16 comment_size, mz_uint level_and_flags) { mz_bool status, created_new_archive = MZ_FALSE; mz_zip_archive zip_archive; struct MZ_FILE_STAT_STRUCT file_stat; MZ_CLEAR_OBJ(zip_archive); if ((int)level_and_flags < 0) level_and_flags = MZ_DEFAULT_LEVEL; if ((!pZip_filename) || (!pArchive_name) || ((buf_size) && (!pBuf)) || ((comment_size) && (!pComment)) || ((level_and_flags & 0xF) > MZ_UBER_COMPRESSION)) return MZ_FALSE; if (!mz_zip_writer_validate_archive_name(pArchive_name)) return MZ_FALSE; if (MZ_FILE_STAT(pZip_filename, &file_stat) != 0) { // Create a new archive. if (!mz_zip_writer_init_file(&zip_archive, pZip_filename, 0)) return MZ_FALSE; created_new_archive = MZ_TRUE; } else { // Append to an existing archive. if (!mz_zip_reader_init_file( &zip_archive, pZip_filename, level_and_flags | MZ_ZIP_FLAG_DO_NOT_SORT_CENTRAL_DIRECTORY)) return MZ_FALSE; if (!mz_zip_writer_init_from_reader(&zip_archive, pZip_filename)) { mz_zip_reader_end(&zip_archive); return MZ_FALSE; } } status = mz_zip_writer_add_mem_ex(&zip_archive, pArchive_name, pBuf, buf_size, pComment, comment_size, level_and_flags, 0, 0); // Always finalize, even if adding failed for some reason, so we have a valid // central directory. (This may not always succeed, but we can try.) if (!mz_zip_writer_finalize_archive(&zip_archive)) status = MZ_FALSE; if (!mz_zip_writer_end(&zip_archive)) status = MZ_FALSE; if ((!status) && (created_new_archive)) { // It's a new archive and something went wrong, so just delete it. int ignoredStatus = MZ_DELETE_FILE(pZip_filename); (void)ignoredStatus; } return status; } void *mz_zip_extract_archive_file_to_heap(const char *pZip_filename, const char *pArchive_name, size_t *pSize, mz_uint flags) { int file_index; mz_zip_archive zip_archive; void *p = NULL; if (pSize) *pSize = 0; if ((!pZip_filename) || (!pArchive_name)) return NULL; MZ_CLEAR_OBJ(zip_archive); if (!mz_zip_reader_init_file( &zip_archive, pZip_filename, flags | MZ_ZIP_FLAG_DO_NOT_SORT_CENTRAL_DIRECTORY)) return NULL; if ((file_index = mz_zip_reader_locate_file(&zip_archive, pArchive_name, NULL, flags)) >= 0) p = mz_zip_reader_extract_to_heap(&zip_archive, file_index, pSize, flags); mz_zip_reader_end(&zip_archive); return p; } #endif // #ifndef MINIZ_NO_STDIO #endif // #ifndef MINIZ_NO_ARCHIVE_WRITING_APIS #endif // #ifndef MINIZ_NO_ARCHIVE_APIS #ifdef __cplusplus } #endif #endif // MINIZ_HEADER_FILE_ONLY /* This is free and unencumbered software released into the public domain. Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means. In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. For more information, please refer to */ // ---------------------- end of miniz ---------------------------------------- #ifdef __clang__ #pragma clang diagnostic pop #endif #ifdef _MSC_VER #pragma warning(pop) #endif } // namespace miniz #else // Reuse MINIZ_LITTE_ENDIAN macro #if defined(__sparcv9) // Big endian #else #if (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__) || MINIZ_X86_OR_X64_CPU // Set MINIZ_LITTLE_ENDIAN to 1 if the processor is little endian. #define MINIZ_LITTLE_ENDIAN 1 #endif #endif #endif // TINYEXR_USE_MINIZ // static bool IsBigEndian(void) { // union { // unsigned int i; // char c[4]; // } bint = {0x01020304}; // // return bint.c[0] == 1; //} static void SetErrorMessage(const std::string &msg, const char **err) { if (err) { #ifdef _WIN32 (*err) = _strdup(msg.c_str()); #else (*err) = strdup(msg.c_str()); #endif } } static const int kEXRVersionSize = 8; static void cpy2(unsigned short *dst_val, const unsigned short *src_val) { unsigned char *dst = reinterpret_cast(dst_val); const unsigned char *src = reinterpret_cast(src_val); dst[0] = src[0]; dst[1] = src[1]; } static void swap2(unsigned short *val) { #ifdef MINIZ_LITTLE_ENDIAN (void)val; #else unsigned short tmp = *val; unsigned char *dst = reinterpret_cast(val); unsigned char *src = reinterpret_cast(&tmp); dst[0] = src[1]; dst[1] = src[0]; #endif } #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wunused-function" #endif static void cpy4(int *dst_val, const int *src_val) { unsigned char *dst = reinterpret_cast(dst_val); const unsigned char *src = reinterpret_cast(src_val); dst[0] = src[0]; dst[1] = src[1]; dst[2] = src[2]; dst[3] = src[3]; } static void cpy4(unsigned int *dst_val, const unsigned int *src_val) { unsigned char *dst = reinterpret_cast(dst_val); const unsigned char *src = reinterpret_cast(src_val); dst[0] = src[0]; dst[1] = src[1]; dst[2] = src[2]; dst[3] = src[3]; } static void cpy4(float *dst_val, const float *src_val) { unsigned char *dst = reinterpret_cast(dst_val); const unsigned char *src = reinterpret_cast(src_val); dst[0] = src[0]; dst[1] = src[1]; dst[2] = src[2]; dst[3] = src[3]; } #ifdef __clang__ #pragma clang diagnostic pop #endif static void swap4(unsigned int *val) { #ifdef MINIZ_LITTLE_ENDIAN (void)val; #else unsigned int tmp = *val; unsigned char *dst = reinterpret_cast(val); unsigned char *src = reinterpret_cast(&tmp); dst[0] = src[3]; dst[1] = src[2]; dst[2] = src[1]; dst[3] = src[0]; #endif } #if 0 static void cpy8(tinyexr::tinyexr_uint64 *dst_val, const tinyexr::tinyexr_uint64 *src_val) { unsigned char *dst = reinterpret_cast(dst_val); const unsigned char *src = reinterpret_cast(src_val); dst[0] = src[0]; dst[1] = src[1]; dst[2] = src[2]; dst[3] = src[3]; dst[4] = src[4]; dst[5] = src[5]; dst[6] = src[6]; dst[7] = src[7]; } #endif static void swap8(tinyexr::tinyexr_uint64 *val) { #ifdef MINIZ_LITTLE_ENDIAN (void)val; #else tinyexr::tinyexr_uint64 tmp = (*val); unsigned char *dst = reinterpret_cast(val); unsigned char *src = reinterpret_cast(&tmp); dst[0] = src[7]; dst[1] = src[6]; dst[2] = src[5]; dst[3] = src[4]; dst[4] = src[3]; dst[5] = src[2]; dst[6] = src[1]; dst[7] = src[0]; #endif } // https://gist.github.com/rygorous/2156668 // Reuse MINIZ_LITTLE_ENDIAN flag from miniz. union FP32 { unsigned int u; float f; struct { #if MINIZ_LITTLE_ENDIAN unsigned int Mantissa : 23; unsigned int Exponent : 8; unsigned int Sign : 1; #else unsigned int Sign : 1; unsigned int Exponent : 8; unsigned int Mantissa : 23; #endif } s; }; #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wpadded" #endif union FP16 { unsigned short u; struct { #if MINIZ_LITTLE_ENDIAN unsigned int Mantissa : 10; unsigned int Exponent : 5; unsigned int Sign : 1; #else unsigned int Sign : 1; unsigned int Exponent : 5; unsigned int Mantissa : 10; #endif } s; }; #ifdef __clang__ #pragma clang diagnostic pop #endif static FP32 half_to_float(FP16 h) { static const FP32 magic = {113 << 23}; static const unsigned int shifted_exp = 0x7c00 << 13; // exponent mask after shift FP32 o; o.u = (h.u & 0x7fffU) << 13U; // exponent/mantissa bits unsigned int exp_ = shifted_exp & o.u; // just the exponent o.u += (127 - 15) << 23; // exponent adjust // handle exponent special cases if (exp_ == shifted_exp) // Inf/NaN? o.u += (128 - 16) << 23; // extra exp adjust else if (exp_ == 0) // Zero/Denormal? { o.u += 1 << 23; // extra exp adjust o.f -= magic.f; // renormalize } o.u |= (h.u & 0x8000U) << 16U; // sign bit return o; } static FP16 float_to_half_full(FP32 f) { FP16 o = {0}; // Based on ISPC reference code (with minor modifications) if (f.s.Exponent == 0) // Signed zero/denormal (which will underflow) o.s.Exponent = 0; else if (f.s.Exponent == 255) // Inf or NaN (all exponent bits set) { o.s.Exponent = 31; o.s.Mantissa = f.s.Mantissa ? 0x200 : 0; // NaN->qNaN and Inf->Inf } else // Normalized number { // Exponent unbias the single, then bias the halfp int newexp = f.s.Exponent - 127 + 15; if (newexp >= 31) // Overflow, return signed infinity o.s.Exponent = 31; else if (newexp <= 0) // Underflow { if ((14 - newexp) <= 24) // Mantissa might be non-zero { unsigned int mant = f.s.Mantissa | 0x800000; // Hidden 1 bit o.s.Mantissa = mant >> (14 - newexp); if ((mant >> (13 - newexp)) & 1) // Check for rounding o.u++; // Round, might overflow into exp bit, but this is OK } } else { o.s.Exponent = static_cast(newexp); o.s.Mantissa = f.s.Mantissa >> 13; if (f.s.Mantissa & 0x1000) // Check for rounding o.u++; // Round, might overflow to inf, this is OK } } o.s.Sign = f.s.Sign; return o; } // NOTE: From OpenEXR code // #define IMF_INCREASING_Y 0 // #define IMF_DECREASING_Y 1 // #define IMF_RAMDOM_Y 2 // // #define IMF_NO_COMPRESSION 0 // #define IMF_RLE_COMPRESSION 1 // #define IMF_ZIPS_COMPRESSION 2 // #define IMF_ZIP_COMPRESSION 3 // #define IMF_PIZ_COMPRESSION 4 // #define IMF_PXR24_COMPRESSION 5 // #define IMF_B44_COMPRESSION 6 // #define IMF_B44A_COMPRESSION 7 #ifdef __clang__ #pragma clang diagnostic push #if __has_warning("-Wzero-as-null-pointer-constant") #pragma clang diagnostic ignored "-Wzero-as-null-pointer-constant" #endif #endif static const char *ReadString(std::string *s, const char *ptr, size_t len) { // Read untile NULL(\0). const char *p = ptr; const char *q = ptr; while ((size_t(q - ptr) < len) && (*q) != 0) { q++; } if (size_t(q - ptr) >= len) { (*s) = std::string(); return NULL; } (*s) = std::string(p, q); return q + 1; // skip '\0' } static bool ReadAttribute(std::string *name, std::string *type, std::vector *data, size_t *marker_size, const char *marker, size_t size) { size_t name_len = strnlen(marker, size); if (name_len == size) { // String does not have a terminating character. return false; } *name = std::string(marker, name_len); marker += name_len + 1; size -= name_len + 1; size_t type_len = strnlen(marker, size); if (type_len == size) { return false; } *type = std::string(marker, type_len); marker += type_len + 1; size -= type_len + 1; if (size < sizeof(uint32_t)) { return false; } uint32_t data_len; memcpy(&data_len, marker, sizeof(uint32_t)); tinyexr::swap4(reinterpret_cast(&data_len)); if (data_len == 0) { if ((*type).compare("string") == 0) { // Accept empty string attribute. marker += sizeof(uint32_t); size -= sizeof(uint32_t); *marker_size = name_len + 1 + type_len + 1 + sizeof(uint32_t); data->resize(1); (*data)[0] = '\0'; return true; } else { return false; } } marker += sizeof(uint32_t); size -= sizeof(uint32_t); if (size < data_len) { return false; } data->resize(static_cast(data_len)); memcpy(&data->at(0), marker, static_cast(data_len)); *marker_size = name_len + 1 + type_len + 1 + sizeof(uint32_t) + data_len; return true; } static void WriteAttributeToMemory(std::vector *out, const char *name, const char *type, const unsigned char *data, int len) { out->insert(out->end(), name, name + strlen(name) + 1); out->insert(out->end(), type, type + strlen(type) + 1); int outLen = len; tinyexr::swap4(reinterpret_cast(&outLen)); out->insert(out->end(), reinterpret_cast(&outLen), reinterpret_cast(&outLen) + sizeof(int)); out->insert(out->end(), data, data + len); } typedef struct { std::string name; // less than 255 bytes long int pixel_type; int x_sampling; int y_sampling; unsigned char p_linear; unsigned char pad[3]; } ChannelInfo; typedef struct { std::vector channels; std::vector attributes; int data_window[4]; int line_order; int display_window[4]; float screen_window_center[2]; float screen_window_width; float pixel_aspect_ratio; int chunk_count; // Tiled format int tile_size_x; int tile_size_y; int tile_level_mode; int tile_rounding_mode; unsigned int header_len; int compression_type; void clear() { channels.clear(); attributes.clear(); data_window[0] = 0; data_window[1] = 0; data_window[2] = 0; data_window[3] = 0; line_order = 0; display_window[0] = 0; display_window[1] = 0; display_window[2] = 0; display_window[3] = 0; screen_window_center[0] = 0.0f; screen_window_center[1] = 0.0f; screen_window_width = 0.0f; pixel_aspect_ratio = 0.0f; chunk_count = 0; // Tiled format tile_size_x = 0; tile_size_y = 0; tile_level_mode = 0; tile_rounding_mode = 0; header_len = 0; compression_type = 0; } } HeaderInfo; static bool ReadChannelInfo(std::vector &channels, const std::vector &data) { const char *p = reinterpret_cast(&data.at(0)); for (;;) { if ((*p) == 0) { break; } ChannelInfo info; tinyexr_int64 data_len = static_cast(data.size()) - (p - reinterpret_cast(data.data())); if (data_len < 0) { return false; } p = ReadString(&info.name, p, size_t(data_len)); if ((p == NULL) && (info.name.empty())) { // Buffer overrun. Issue #51. return false; } const unsigned char *data_end = reinterpret_cast(p) + 16; if (data_end >= (data.data() + data.size())) { return false; } memcpy(&info.pixel_type, p, sizeof(int)); p += 4; info.p_linear = static_cast(p[0]); // uchar p += 1 + 3; // reserved: uchar[3] memcpy(&info.x_sampling, p, sizeof(int)); // int p += 4; memcpy(&info.y_sampling, p, sizeof(int)); // int p += 4; tinyexr::swap4(reinterpret_cast(&info.pixel_type)); tinyexr::swap4(reinterpret_cast(&info.x_sampling)); tinyexr::swap4(reinterpret_cast(&info.y_sampling)); channels.push_back(info); } return true; } static void WriteChannelInfo(std::vector &data, const std::vector &channels) { size_t sz = 0; // Calculate total size. for (size_t c = 0; c < channels.size(); c++) { sz += strlen(channels[c].name.c_str()) + 1; // +1 for \0 sz += 16; // 4 * int } data.resize(sz + 1); unsigned char *p = &data.at(0); for (size_t c = 0; c < channels.size(); c++) { memcpy(p, channels[c].name.c_str(), strlen(channels[c].name.c_str())); p += strlen(channels[c].name.c_str()); (*p) = '\0'; p++; int pixel_type = channels[c].pixel_type; int x_sampling = channels[c].x_sampling; int y_sampling = channels[c].y_sampling; tinyexr::swap4(reinterpret_cast(&pixel_type)); tinyexr::swap4(reinterpret_cast(&x_sampling)); tinyexr::swap4(reinterpret_cast(&y_sampling)); memcpy(p, &pixel_type, sizeof(int)); p += sizeof(int); (*p) = channels[c].p_linear; p += 4; memcpy(p, &x_sampling, sizeof(int)); p += sizeof(int); memcpy(p, &y_sampling, sizeof(int)); p += sizeof(int); } (*p) = '\0'; } static void CompressZip(unsigned char *dst, tinyexr::tinyexr_uint64 &compressedSize, const unsigned char *src, unsigned long src_size) { std::vector tmpBuf(src_size); // // Apply EXR-specific? postprocess. Grabbed from OpenEXR's // ImfZipCompressor.cpp // // // Reorder the pixel data. // const char *srcPtr = reinterpret_cast(src); { char *t1 = reinterpret_cast(&tmpBuf.at(0)); char *t2 = reinterpret_cast(&tmpBuf.at(0)) + (src_size + 1) / 2; const char *stop = srcPtr + src_size; for (;;) { if (srcPtr < stop) *(t1++) = *(srcPtr++); else break; if (srcPtr < stop) *(t2++) = *(srcPtr++); else break; } } // // Predictor. // { unsigned char *t = &tmpBuf.at(0) + 1; unsigned char *stop = &tmpBuf.at(0) + src_size; int p = t[-1]; while (t < stop) { int d = int(t[0]) - p + (128 + 256); p = t[0]; t[0] = static_cast(d); ++t; } } #if TINYEXR_USE_MINIZ // // Compress the data using miniz // miniz::mz_ulong outSize = miniz::mz_compressBound(src_size); int ret = miniz::mz_compress( dst, &outSize, static_cast(&tmpBuf.at(0)), src_size); assert(ret == miniz::MZ_OK); (void)ret; compressedSize = outSize; #else uLong outSize = compressBound(static_cast(src_size)); int ret = compress(dst, &outSize, static_cast(&tmpBuf.at(0)), src_size); assert(ret == Z_OK); compressedSize = outSize; #endif // Use uncompressed data when compressed data is larger than uncompressed. // (Issue 40) if (compressedSize >= src_size) { compressedSize = src_size; memcpy(dst, src, src_size); } } static bool DecompressZip(unsigned char *dst, unsigned long *uncompressed_size /* inout */, const unsigned char *src, unsigned long src_size) { if ((*uncompressed_size) == src_size) { // Data is not compressed(Issue 40). memcpy(dst, src, src_size); return true; } std::vector tmpBuf(*uncompressed_size); #if TINYEXR_USE_MINIZ int ret = miniz::mz_uncompress(&tmpBuf.at(0), uncompressed_size, src, src_size); if (miniz::MZ_OK != ret) { return false; } #else int ret = uncompress(&tmpBuf.at(0), uncompressed_size, src, src_size); if (Z_OK != ret) { return false; } #endif // // Apply EXR-specific? postprocess. Grabbed from OpenEXR's // ImfZipCompressor.cpp // // Predictor. { unsigned char *t = &tmpBuf.at(0) + 1; unsigned char *stop = &tmpBuf.at(0) + (*uncompressed_size); while (t < stop) { int d = int(t[-1]) + int(t[0]) - 128; t[0] = static_cast(d); ++t; } } // Reorder the pixel data. { const char *t1 = reinterpret_cast(&tmpBuf.at(0)); const char *t2 = reinterpret_cast(&tmpBuf.at(0)) + (*uncompressed_size + 1) / 2; char *s = reinterpret_cast(dst); char *stop = s + (*uncompressed_size); for (;;) { if (s < stop) *(s++) = *(t1++); else break; if (s < stop) *(s++) = *(t2++); else break; } } return true; } // RLE code from OpenEXR -------------------------------------- #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wsign-conversion" #endif #ifdef _MSC_VER #pragma warning(push) #pragma warning(disable : 4204) // nonstandard extension used : non-constant // aggregate initializer (also supported by GNU // C and C99, so no big deal) #pragma warning(disable : 4244) // 'initializing': conversion from '__int64' to // 'int', possible loss of data #pragma warning(disable : 4267) // 'argument': conversion from '__int64' to // 'int', possible loss of data #pragma warning(disable : 4996) // 'strdup': The POSIX name for this item is // deprecated. Instead, use the ISO C and C++ // conformant name: _strdup. #endif const int MIN_RUN_LENGTH = 3; const int MAX_RUN_LENGTH = 127; // // Compress an array of bytes, using run-length encoding, // and return the length of the compressed data. // static int rleCompress(int inLength, const char in[], signed char out[]) { const char *inEnd = in + inLength; const char *runStart = in; const char *runEnd = in + 1; signed char *outWrite = out; while (runStart < inEnd) { while (runEnd < inEnd && *runStart == *runEnd && runEnd - runStart - 1 < MAX_RUN_LENGTH) { ++runEnd; } if (runEnd - runStart >= MIN_RUN_LENGTH) { // // Compressable run // *outWrite++ = static_cast(runEnd - runStart) - 1; *outWrite++ = *(reinterpret_cast(runStart)); runStart = runEnd; } else { // // Uncompressable run // while (runEnd < inEnd && ((runEnd + 1 >= inEnd || *runEnd != *(runEnd + 1)) || (runEnd + 2 >= inEnd || *(runEnd + 1) != *(runEnd + 2))) && runEnd - runStart < MAX_RUN_LENGTH) { ++runEnd; } *outWrite++ = static_cast(runStart - runEnd); while (runStart < runEnd) { *outWrite++ = *(reinterpret_cast(runStart++)); } } ++runEnd; } return static_cast(outWrite - out); } // // Uncompress an array of bytes compressed with rleCompress(). // Returns the length of the oncompressed data, or 0 if the // length of the uncompressed data would be more than maxLength. // static int rleUncompress(int inLength, int maxLength, const signed char in[], char out[]) { char *outStart = out; while (inLength > 0) { if (*in < 0) { int count = -(static_cast(*in++)); inLength -= count + 1; // Fixes #116: Add bounds check to in buffer. if ((0 > (maxLength -= count)) || (inLength < 0)) return 0; memcpy(out, in, count); out += count; in += count; } else { int count = *in++; inLength -= 2; if (0 > (maxLength -= count + 1)) return 0; memset(out, *reinterpret_cast(in), count + 1); out += count + 1; in++; } } return static_cast(out - outStart); } #ifdef __clang__ #pragma clang diagnostic pop #endif // End of RLE code from OpenEXR ----------------------------------- static void CompressRle(unsigned char *dst, tinyexr::tinyexr_uint64 &compressedSize, const unsigned char *src, unsigned long src_size) { std::vector tmpBuf(src_size); // // Apply EXR-specific? postprocess. Grabbed from OpenEXR's // ImfRleCompressor.cpp // // // Reorder the pixel data. // const char *srcPtr = reinterpret_cast(src); { char *t1 = reinterpret_cast(&tmpBuf.at(0)); char *t2 = reinterpret_cast(&tmpBuf.at(0)) + (src_size + 1) / 2; const char *stop = srcPtr + src_size; for (;;) { if (srcPtr < stop) *(t1++) = *(srcPtr++); else break; if (srcPtr < stop) *(t2++) = *(srcPtr++); else break; } } // // Predictor. // { unsigned char *t = &tmpBuf.at(0) + 1; unsigned char *stop = &tmpBuf.at(0) + src_size; int p = t[-1]; while (t < stop) { int d = int(t[0]) - p + (128 + 256); p = t[0]; t[0] = static_cast(d); ++t; } } // outSize will be (srcSiz * 3) / 2 at max. int outSize = rleCompress(static_cast(src_size), reinterpret_cast(&tmpBuf.at(0)), reinterpret_cast(dst)); assert(outSize > 0); compressedSize = static_cast(outSize); // Use uncompressed data when compressed data is larger than uncompressed. // (Issue 40) if (compressedSize >= src_size) { compressedSize = src_size; memcpy(dst, src, src_size); } } static bool DecompressRle(unsigned char *dst, const unsigned long uncompressed_size, const unsigned char *src, unsigned long src_size) { if (uncompressed_size == src_size) { // Data is not compressed(Issue 40). memcpy(dst, src, src_size); return true; } // Workaround for issue #112. // TODO(syoyo): Add more robust out-of-bounds check in `rleUncompress`. if (src_size <= 2) { return false; } std::vector tmpBuf(uncompressed_size); int ret = rleUncompress(static_cast(src_size), static_cast(uncompressed_size), reinterpret_cast(src), reinterpret_cast(&tmpBuf.at(0))); if (ret != static_cast(uncompressed_size)) { return false; } // // Apply EXR-specific? postprocess. Grabbed from OpenEXR's // ImfRleCompressor.cpp // // Predictor. { unsigned char *t = &tmpBuf.at(0) + 1; unsigned char *stop = &tmpBuf.at(0) + uncompressed_size; while (t < stop) { int d = int(t[-1]) + int(t[0]) - 128; t[0] = static_cast(d); ++t; } } // Reorder the pixel data. { const char *t1 = reinterpret_cast(&tmpBuf.at(0)); const char *t2 = reinterpret_cast(&tmpBuf.at(0)) + (uncompressed_size + 1) / 2; char *s = reinterpret_cast(dst); char *stop = s + uncompressed_size; for (;;) { if (s < stop) *(s++) = *(t1++); else break; if (s < stop) *(s++) = *(t2++); else break; } } return true; } #if TINYEXR_USE_PIZ #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wc++11-long-long" #pragma clang diagnostic ignored "-Wold-style-cast" #pragma clang diagnostic ignored "-Wpadded" #pragma clang diagnostic ignored "-Wsign-conversion" #pragma clang diagnostic ignored "-Wc++11-extensions" #pragma clang diagnostic ignored "-Wconversion" #pragma clang diagnostic ignored "-Wc++98-compat-pedantic" #if __has_warning("-Wcast-qual") #pragma clang diagnostic ignored "-Wcast-qual" #endif #endif // // PIZ compress/uncompress, based on OpenEXR's ImfPizCompressor.cpp // // ----------------------------------------------------------------- // Copyright (c) 2004, Industrial Light & Magic, a division of Lucas // Digital Ltd. LLC) // (3 clause BSD license) // struct PIZChannelData { unsigned short *start; unsigned short *end; int nx; int ny; int ys; int size; }; //----------------------------------------------------------------------------- // // 16-bit Haar Wavelet encoding and decoding // // The source code in this file is derived from the encoding // and decoding routines written by Christian Rouet for his // PIZ image file format. // //----------------------------------------------------------------------------- // // Wavelet basis functions without modulo arithmetic; they produce // the best compression ratios when the wavelet-transformed data are // Huffman-encoded, but the wavelet transform works only for 14-bit // data (untransformed data values must be less than (1 << 14)). // inline void wenc14(unsigned short a, unsigned short b, unsigned short &l, unsigned short &h) { short as = static_cast(a); short bs = static_cast(b); short ms = (as + bs) >> 1; short ds = as - bs; l = static_cast(ms); h = static_cast(ds); } inline void wdec14(unsigned short l, unsigned short h, unsigned short &a, unsigned short &b) { short ls = static_cast(l); short hs = static_cast(h); int hi = hs; int ai = ls + (hi & 1) + (hi >> 1); short as = static_cast(ai); short bs = static_cast(ai - hi); a = static_cast(as); b = static_cast(bs); } // // Wavelet basis functions with modulo arithmetic; they work with full // 16-bit data, but Huffman-encoding the wavelet-transformed data doesn't // compress the data quite as well. // const int NBITS = 16; const int A_OFFSET = 1 << (NBITS - 1); const int M_OFFSET = 1 << (NBITS - 1); const int MOD_MASK = (1 << NBITS) - 1; inline void wenc16(unsigned short a, unsigned short b, unsigned short &l, unsigned short &h) { int ao = (a + A_OFFSET) & MOD_MASK; int m = ((ao + b) >> 1); int d = ao - b; if (d < 0) m = (m + M_OFFSET) & MOD_MASK; d &= MOD_MASK; l = static_cast(m); h = static_cast(d); } inline void wdec16(unsigned short l, unsigned short h, unsigned short &a, unsigned short &b) { int m = l; int d = h; int bb = (m - (d >> 1)) & MOD_MASK; int aa = (d + bb - A_OFFSET) & MOD_MASK; b = static_cast(bb); a = static_cast(aa); } // // 2D Wavelet encoding: // static void wav2Encode( unsigned short *in, // io: values are transformed in place int nx, // i : x size int ox, // i : x offset int ny, // i : y size int oy, // i : y offset unsigned short mx) // i : maximum in[x][y] value { bool w14 = (mx < (1 << 14)); int n = (nx > ny) ? ny : nx; int p = 1; // == 1 << level int p2 = 2; // == 1 << (level+1) // // Hierachical loop on smaller dimension n // while (p2 <= n) { unsigned short *py = in; unsigned short *ey = in + oy * (ny - p2); int oy1 = oy * p; int oy2 = oy * p2; int ox1 = ox * p; int ox2 = ox * p2; unsigned short i00, i01, i10, i11; // // Y loop // for (; py <= ey; py += oy2) { unsigned short *px = py; unsigned short *ex = py + ox * (nx - p2); // // X loop // for (; px <= ex; px += ox2) { unsigned short *p01 = px + ox1; unsigned short *p10 = px + oy1; unsigned short *p11 = p10 + ox1; // // 2D wavelet encoding // if (w14) { wenc14(*px, *p01, i00, i01); wenc14(*p10, *p11, i10, i11); wenc14(i00, i10, *px, *p10); wenc14(i01, i11, *p01, *p11); } else { wenc16(*px, *p01, i00, i01); wenc16(*p10, *p11, i10, i11); wenc16(i00, i10, *px, *p10); wenc16(i01, i11, *p01, *p11); } } // // Encode (1D) odd column (still in Y loop) // if (nx & p) { unsigned short *p10 = px + oy1; if (w14) wenc14(*px, *p10, i00, *p10); else wenc16(*px, *p10, i00, *p10); *px = i00; } } // // Encode (1D) odd line (must loop in X) // if (ny & p) { unsigned short *px = py; unsigned short *ex = py + ox * (nx - p2); for (; px <= ex; px += ox2) { unsigned short *p01 = px + ox1; if (w14) wenc14(*px, *p01, i00, *p01); else wenc16(*px, *p01, i00, *p01); *px = i00; } } // // Next level // p = p2; p2 <<= 1; } } // // 2D Wavelet decoding: // static void wav2Decode( unsigned short *in, // io: values are transformed in place int nx, // i : x size int ox, // i : x offset int ny, // i : y size int oy, // i : y offset unsigned short mx) // i : maximum in[x][y] value { bool w14 = (mx < (1 << 14)); int n = (nx > ny) ? ny : nx; int p = 1; int p2; // // Search max level // while (p <= n) p <<= 1; p >>= 1; p2 = p; p >>= 1; // // Hierarchical loop on smaller dimension n // while (p >= 1) { unsigned short *py = in; unsigned short *ey = in + oy * (ny - p2); int oy1 = oy * p; int oy2 = oy * p2; int ox1 = ox * p; int ox2 = ox * p2; unsigned short i00, i01, i10, i11; // // Y loop // for (; py <= ey; py += oy2) { unsigned short *px = py; unsigned short *ex = py + ox * (nx - p2); // // X loop // for (; px <= ex; px += ox2) { unsigned short *p01 = px + ox1; unsigned short *p10 = px + oy1; unsigned short *p11 = p10 + ox1; // // 2D wavelet decoding // if (w14) { wdec14(*px, *p10, i00, i10); wdec14(*p01, *p11, i01, i11); wdec14(i00, i01, *px, *p01); wdec14(i10, i11, *p10, *p11); } else { wdec16(*px, *p10, i00, i10); wdec16(*p01, *p11, i01, i11); wdec16(i00, i01, *px, *p01); wdec16(i10, i11, *p10, *p11); } } // // Decode (1D) odd column (still in Y loop) // if (nx & p) { unsigned short *p10 = px + oy1; if (w14) wdec14(*px, *p10, i00, *p10); else wdec16(*px, *p10, i00, *p10); *px = i00; } } // // Decode (1D) odd line (must loop in X) // if (ny & p) { unsigned short *px = py; unsigned short *ex = py + ox * (nx - p2); for (; px <= ex; px += ox2) { unsigned short *p01 = px + ox1; if (w14) wdec14(*px, *p01, i00, *p01); else wdec16(*px, *p01, i00, *p01); *px = i00; } } // // Next level // p2 = p; p >>= 1; } } //----------------------------------------------------------------------------- // // 16-bit Huffman compression and decompression. // // The source code in this file is derived from the 8-bit // Huffman compression and decompression routines written // by Christian Rouet for his PIZ image file format. // //----------------------------------------------------------------------------- // Adds some modification for tinyexr. const int HUF_ENCBITS = 16; // literal (value) bit length const int HUF_DECBITS = 14; // decoding bit size (>= 8) const int HUF_ENCSIZE = (1 << HUF_ENCBITS) + 1; // encoding table size const int HUF_DECSIZE = 1 << HUF_DECBITS; // decoding table size const int HUF_DECMASK = HUF_DECSIZE - 1; struct HufDec { // short code long code //------------------------------- int len : 8; // code length 0 int lit : 24; // lit p size int *p; // 0 lits }; inline long long hufLength(long long code) { return code & 63; } inline long long hufCode(long long code) { return code >> 6; } inline void outputBits(int nBits, long long bits, long long &c, int &lc, char *&out) { c <<= nBits; lc += nBits; c |= bits; while (lc >= 8) *out++ = static_cast((c >> (lc -= 8))); } inline long long getBits(int nBits, long long &c, int &lc, const char *&in) { while (lc < nBits) { c = (c << 8) | *(reinterpret_cast(in++)); lc += 8; } lc -= nBits; return (c >> lc) & ((1 << nBits) - 1); } // // ENCODING TABLE BUILDING & (UN)PACKING // // // Build a "canonical" Huffman code table: // - for each (uncompressed) symbol, hcode contains the length // of the corresponding code (in the compressed data) // - canonical codes are computed and stored in hcode // - the rules for constructing canonical codes are as follows: // * shorter codes (if filled with zeroes to the right) // have a numerically higher value than longer codes // * for codes with the same length, numerical values // increase with numerical symbol values // - because the canonical code table can be constructed from // symbol lengths alone, the code table can be transmitted // without sending the actual code values // - see http://www.compressconsult.com/huffman/ // static void hufCanonicalCodeTable(long long hcode[HUF_ENCSIZE]) { long long n[59]; // // For each i from 0 through 58, count the // number of different codes of length i, and // store the count in n[i]. // for (int i = 0; i <= 58; ++i) n[i] = 0; for (int i = 0; i < HUF_ENCSIZE; ++i) n[hcode[i]] += 1; // // For each i from 58 through 1, compute the // numerically lowest code with length i, and // store that code in n[i]. // long long c = 0; for (int i = 58; i > 0; --i) { long long nc = ((c + n[i]) >> 1); n[i] = c; c = nc; } // // hcode[i] contains the length, l, of the // code for symbol i. Assign the next available // code of length l to the symbol and store both // l and the code in hcode[i]. // for (int i = 0; i < HUF_ENCSIZE; ++i) { int l = static_cast(hcode[i]); if (l > 0) hcode[i] = l | (n[l]++ << 6); } } // // Compute Huffman codes (based on frq input) and store them in frq: // - code structure is : [63:lsb - 6:msb] | [5-0: bit length]; // - max code length is 58 bits; // - codes outside the range [im-iM] have a null length (unused values); // - original frequencies are destroyed; // - encoding tables are used by hufEncode() and hufBuildDecTable(); // struct FHeapCompare { bool operator()(long long *a, long long *b) { return *a > *b; } }; static void hufBuildEncTable( long long *frq, // io: input frequencies [HUF_ENCSIZE], output table int *im, // o: min frq index int *iM) // o: max frq index { // // This function assumes that when it is called, array frq // indicates the frequency of all possible symbols in the data // that are to be Huffman-encoded. (frq[i] contains the number // of occurrences of symbol i in the data.) // // The loop below does three things: // // 1) Finds the minimum and maximum indices that point // to non-zero entries in frq: // // frq[im] != 0, and frq[i] == 0 for all i < im // frq[iM] != 0, and frq[i] == 0 for all i > iM // // 2) Fills array fHeap with pointers to all non-zero // entries in frq. // // 3) Initializes array hlink such that hlink[i] == i // for all array entries. // std::vector hlink(HUF_ENCSIZE); std::vector fHeap(HUF_ENCSIZE); *im = 0; while (!frq[*im]) (*im)++; int nf = 0; for (int i = *im; i < HUF_ENCSIZE; i++) { hlink[i] = i; if (frq[i]) { fHeap[nf] = &frq[i]; nf++; *iM = i; } } // // Add a pseudo-symbol, with a frequency count of 1, to frq; // adjust the fHeap and hlink array accordingly. Function // hufEncode() uses the pseudo-symbol for run-length encoding. // (*iM)++; frq[*iM] = 1; fHeap[nf] = &frq[*iM]; nf++; // // Build an array, scode, such that scode[i] contains the number // of bits assigned to symbol i. Conceptually this is done by // constructing a tree whose leaves are the symbols with non-zero // frequency: // // Make a heap that contains all symbols with a non-zero frequency, // with the least frequent symbol on top. // // Repeat until only one symbol is left on the heap: // // Take the two least frequent symbols off the top of the heap. // Create a new node that has first two nodes as children, and // whose frequency is the sum of the frequencies of the first // two nodes. Put the new node back into the heap. // // The last node left on the heap is the root of the tree. For each // leaf node, the distance between the root and the leaf is the length // of the code for the corresponding symbol. // // The loop below doesn't actually build the tree; instead we compute // the distances of the leaves from the root on the fly. When a new // node is added to the heap, then that node's descendants are linked // into a single linear list that starts at the new node, and the code // lengths of the descendants (that is, their distance from the root // of the tree) are incremented by one. // std::make_heap(&fHeap[0], &fHeap[nf], FHeapCompare()); std::vector scode(HUF_ENCSIZE); memset(scode.data(), 0, sizeof(long long) * HUF_ENCSIZE); while (nf > 1) { // // Find the indices, mm and m, of the two smallest non-zero frq // values in fHeap, add the smallest frq to the second-smallest // frq, and remove the smallest frq value from fHeap. // int mm = fHeap[0] - frq; std::pop_heap(&fHeap[0], &fHeap[nf], FHeapCompare()); --nf; int m = fHeap[0] - frq; std::pop_heap(&fHeap[0], &fHeap[nf], FHeapCompare()); frq[m] += frq[mm]; std::push_heap(&fHeap[0], &fHeap[nf], FHeapCompare()); // // The entries in scode are linked into lists with the // entries in hlink serving as "next" pointers and with // the end of a list marked by hlink[j] == j. // // Traverse the lists that start at scode[m] and scode[mm]. // For each element visited, increment the length of the // corresponding code by one bit. (If we visit scode[j] // during the traversal, then the code for symbol j becomes // one bit longer.) // // Merge the lists that start at scode[m] and scode[mm] // into a single list that starts at scode[m]. // // // Add a bit to all codes in the first list. // for (int j = m;; j = hlink[j]) { scode[j]++; assert(scode[j] <= 58); if (hlink[j] == j) { // // Merge the two lists. // hlink[j] = mm; break; } } // // Add a bit to all codes in the second list // for (int j = mm;; j = hlink[j]) { scode[j]++; assert(scode[j] <= 58); if (hlink[j] == j) break; } } // // Build a canonical Huffman code table, replacing the code // lengths in scode with (code, code length) pairs. Copy the // code table from scode into frq. // hufCanonicalCodeTable(scode.data()); memcpy(frq, scode.data(), sizeof(long long) * HUF_ENCSIZE); } // // Pack an encoding table: // - only code lengths, not actual codes, are stored // - runs of zeroes are compressed as follows: // // unpacked packed // -------------------------------- // 1 zero 0 (6 bits) // 2 zeroes 59 // 3 zeroes 60 // 4 zeroes 61 // 5 zeroes 62 // n zeroes (6 or more) 63 n-6 (6 + 8 bits) // const int SHORT_ZEROCODE_RUN = 59; const int LONG_ZEROCODE_RUN = 63; const int SHORTEST_LONG_RUN = 2 + LONG_ZEROCODE_RUN - SHORT_ZEROCODE_RUN; const int LONGEST_LONG_RUN = 255 + SHORTEST_LONG_RUN; static void hufPackEncTable( const long long *hcode, // i : encoding table [HUF_ENCSIZE] int im, // i : min hcode index int iM, // i : max hcode index char **pcode) // o: ptr to packed table (updated) { char *p = *pcode; long long c = 0; int lc = 0; for (; im <= iM; im++) { int l = hufLength(hcode[im]); if (l == 0) { int zerun = 1; while ((im < iM) && (zerun < LONGEST_LONG_RUN)) { if (hufLength(hcode[im + 1]) > 0) break; im++; zerun++; } if (zerun >= 2) { if (zerun >= SHORTEST_LONG_RUN) { outputBits(6, LONG_ZEROCODE_RUN, c, lc, p); outputBits(8, zerun - SHORTEST_LONG_RUN, c, lc, p); } else { outputBits(6, SHORT_ZEROCODE_RUN + zerun - 2, c, lc, p); } continue; } } outputBits(6, l, c, lc, p); } if (lc > 0) *p++ = (unsigned char)(c << (8 - lc)); *pcode = p; } // // Unpack an encoding table packed by hufPackEncTable(): // static bool hufUnpackEncTable( const char **pcode, // io: ptr to packed table (updated) int ni, // i : input size (in bytes) int im, // i : min hcode index int iM, // i : max hcode index long long *hcode) // o: encoding table [HUF_ENCSIZE] { memset(hcode, 0, sizeof(long long) * HUF_ENCSIZE); const char *p = *pcode; long long c = 0; int lc = 0; for (; im <= iM; im++) { if (p - *pcode > ni) { return false; } long long l = hcode[im] = getBits(6, c, lc, p); // code length if (l == (long long)LONG_ZEROCODE_RUN) { if (p - *pcode > ni) { return false; } int zerun = getBits(8, c, lc, p) + SHORTEST_LONG_RUN; if (im + zerun > iM + 1) { return false; } while (zerun--) hcode[im++] = 0; im--; } else if (l >= (long long)SHORT_ZEROCODE_RUN) { int zerun = l - SHORT_ZEROCODE_RUN + 2; if (im + zerun > iM + 1) { return false; } while (zerun--) hcode[im++] = 0; im--; } } *pcode = const_cast(p); hufCanonicalCodeTable(hcode); return true; } // // DECODING TABLE BUILDING // // // Clear a newly allocated decoding table so that it contains only zeroes. // static void hufClearDecTable(HufDec *hdecod) // io: (allocated by caller) // decoding table [HUF_DECSIZE] { for (int i = 0; i < HUF_DECSIZE; i++) { hdecod[i].len = 0; hdecod[i].lit = 0; hdecod[i].p = NULL; } // memset(hdecod, 0, sizeof(HufDec) * HUF_DECSIZE); } // // Build a decoding hash table based on the encoding table hcode: // - short codes (<= HUF_DECBITS) are resolved with a single table access; // - long code entry allocations are not optimized, because long codes are // unfrequent; // - decoding tables are used by hufDecode(); // static bool hufBuildDecTable(const long long *hcode, // i : encoding table int im, // i : min index in hcode int iM, // i : max index in hcode HufDec *hdecod) // o: (allocated by caller) // decoding table [HUF_DECSIZE] { // // Init hashtable & loop on all codes. // Assumes that hufClearDecTable(hdecod) has already been called. // for (; im <= iM; im++) { long long c = hufCode(hcode[im]); int l = hufLength(hcode[im]); if (c >> l) { // // Error: c is supposed to be an l-bit code, // but c contains a value that is greater // than the largest l-bit number. // // invalidTableEntry(); return false; } if (l > HUF_DECBITS) { // // Long code: add a secondary entry // HufDec *pl = hdecod + (c >> (l - HUF_DECBITS)); if (pl->len) { // // Error: a short code has already // been stored in table entry *pl. // // invalidTableEntry(); return false; } pl->lit++; if (pl->p) { int *p = pl->p; pl->p = new int[pl->lit]; for (int i = 0; i < pl->lit - 1; ++i) pl->p[i] = p[i]; delete[] p; } else { pl->p = new int[1]; } pl->p[pl->lit - 1] = im; } else if (l) { // // Short code: init all primary entries // HufDec *pl = hdecod + (c << (HUF_DECBITS - l)); for (long long i = 1ULL << (HUF_DECBITS - l); i > 0; i--, pl++) { if (pl->len || pl->p) { // // Error: a short code or a long code has // already been stored in table entry *pl. // // invalidTableEntry(); return false; } pl->len = l; pl->lit = im; } } } return true; } // // Free the long code entries of a decoding table built by hufBuildDecTable() // static void hufFreeDecTable(HufDec *hdecod) // io: Decoding table { for (int i = 0; i < HUF_DECSIZE; i++) { if (hdecod[i].p) { delete[] hdecod[i].p; hdecod[i].p = 0; } } } // // ENCODING // inline void outputCode(long long code, long long &c, int &lc, char *&out) { outputBits(hufLength(code), hufCode(code), c, lc, out); } inline void sendCode(long long sCode, int runCount, long long runCode, long long &c, int &lc, char *&out) { // // Output a run of runCount instances of the symbol sCount. // Output the symbols explicitly, or if that is shorter, output // the sCode symbol once followed by a runCode symbol and runCount // expressed as an 8-bit number. // if (hufLength(sCode) + hufLength(runCode) + 8 < hufLength(sCode) * runCount) { outputCode(sCode, c, lc, out); outputCode(runCode, c, lc, out); outputBits(8, runCount, c, lc, out); } else { while (runCount-- >= 0) outputCode(sCode, c, lc, out); } } // // Encode (compress) ni values based on the Huffman encoding table hcode: // static int hufEncode // return: output size (in bits) (const long long *hcode, // i : encoding table const unsigned short *in, // i : uncompressed input buffer const int ni, // i : input buffer size (in bytes) int rlc, // i : rl code char *out) // o: compressed output buffer { char *outStart = out; long long c = 0; // bits not yet written to out int lc = 0; // number of valid bits in c (LSB) int s = in[0]; int cs = 0; // // Loop on input values // for (int i = 1; i < ni; i++) { // // Count same values or send code // if (s == in[i] && cs < 255) { cs++; } else { sendCode(hcode[s], cs, hcode[rlc], c, lc, out); cs = 0; } s = in[i]; } // // Send remaining code // sendCode(hcode[s], cs, hcode[rlc], c, lc, out); if (lc) *out = (c << (8 - lc)) & 0xff; return (out - outStart) * 8 + lc; } // // DECODING // // // In order to force the compiler to inline them, // getChar() and getCode() are implemented as macros // instead of "inline" functions. // #define getChar(c, lc, in) \ { \ c = (c << 8) | *(unsigned char *)(in++); \ lc += 8; \ } #if 0 #define getCode(po, rlc, c, lc, in, out, ob, oe) \ { \ if (po == rlc) { \ if (lc < 8) getChar(c, lc, in); \ \ lc -= 8; \ \ unsigned char cs = (c >> lc); \ \ if (out + cs > oe) return false; \ \ /* TinyEXR issue 78 */ \ unsigned short s = out[-1]; \ \ while (cs-- > 0) *out++ = s; \ } else if (out < oe) { \ *out++ = po; \ } else { \ return false; \ } \ } #else static bool getCode(int po, int rlc, long long &c, int &lc, const char *&in, const char *in_end, unsigned short *&out, const unsigned short *ob, const unsigned short *oe) { (void)ob; if (po == rlc) { if (lc < 8) { /* TinyEXR issue 78 */ if ((in + 1) >= in_end) { return false; } getChar(c, lc, in); } lc -= 8; unsigned char cs = (c >> lc); if (out + cs > oe) return false; // Bounds check for safety // Issue 100. if ((out - 1) < ob) return false; unsigned short s = out[-1]; while (cs-- > 0) *out++ = s; } else if (out < oe) { *out++ = po; } else { return false; } return true; } #endif // // Decode (uncompress) ni bits based on encoding & decoding tables: // static bool hufDecode(const long long *hcode, // i : encoding table const HufDec *hdecod, // i : decoding table const char *in, // i : compressed input buffer int ni, // i : input size (in bits) int rlc, // i : run-length code int no, // i : expected output size (in bytes) unsigned short *out) // o: uncompressed output buffer { long long c = 0; int lc = 0; unsigned short *outb = out; // begin unsigned short *oe = out + no; // end const char *ie = in + (ni + 7) / 8; // input byte size // // Loop on input bytes // while (in < ie) { getChar(c, lc, in); // // Access decoding table // while (lc >= HUF_DECBITS) { const HufDec pl = hdecod[(c >> (lc - HUF_DECBITS)) & HUF_DECMASK]; if (pl.len) { // // Get short code // lc -= pl.len; // std::cout << "lit = " << pl.lit << std::endl; // std::cout << "rlc = " << rlc << std::endl; // std::cout << "c = " << c << std::endl; // std::cout << "lc = " << lc << std::endl; // std::cout << "in = " << in << std::endl; // std::cout << "out = " << out << std::endl; // std::cout << "oe = " << oe << std::endl; if (!getCode(pl.lit, rlc, c, lc, in, ie, out, outb, oe)) { return false; } } else { if (!pl.p) { return false; } // invalidCode(); // wrong code // // Search long code // int j; for (j = 0; j < pl.lit; j++) { int l = hufLength(hcode[pl.p[j]]); while (lc < l && in < ie) // get more bits getChar(c, lc, in); if (lc >= l) { if (hufCode(hcode[pl.p[j]]) == ((c >> (lc - l)) & (((long long)(1) << l) - 1))) { // // Found : get long code // lc -= l; if (!getCode(pl.p[j], rlc, c, lc, in, ie, out, outb, oe)) { return false; } break; } } } if (j == pl.lit) { return false; // invalidCode(); // Not found } } } } // // Get remaining (short) codes // int i = (8 - ni) & 7; c >>= i; lc -= i; while (lc > 0) { const HufDec pl = hdecod[(c << (HUF_DECBITS - lc)) & HUF_DECMASK]; if (pl.len) { lc -= pl.len; if (!getCode(pl.lit, rlc, c, lc, in, ie, out, outb, oe)) { return false; } } else { return false; // invalidCode(); // wrong (long) code } } if (out - outb != no) { return false; } // notEnoughData (); return true; } static void countFrequencies(std::vector &freq, const unsigned short data[/*n*/], int n) { for (int i = 0; i < HUF_ENCSIZE; ++i) freq[i] = 0; for (int i = 0; i < n; ++i) ++freq[data[i]]; } static void writeUInt(char buf[4], unsigned int i) { unsigned char *b = (unsigned char *)buf; b[0] = i; b[1] = i >> 8; b[2] = i >> 16; b[3] = i >> 24; } static unsigned int readUInt(const char buf[4]) { const unsigned char *b = (const unsigned char *)buf; return (b[0] & 0x000000ff) | ((b[1] << 8) & 0x0000ff00) | ((b[2] << 16) & 0x00ff0000) | ((b[3] << 24) & 0xff000000); } // // EXTERNAL INTERFACE // static int hufCompress(const unsigned short raw[], int nRaw, char compressed[]) { if (nRaw == 0) return 0; std::vector freq(HUF_ENCSIZE); countFrequencies(freq, raw, nRaw); int im = 0; int iM = 0; hufBuildEncTable(freq.data(), &im, &iM); char *tableStart = compressed + 20; char *tableEnd = tableStart; hufPackEncTable(freq.data(), im, iM, &tableEnd); int tableLength = tableEnd - tableStart; char *dataStart = tableEnd; int nBits = hufEncode(freq.data(), raw, nRaw, iM, dataStart); int data_length = (nBits + 7) / 8; writeUInt(compressed, im); writeUInt(compressed + 4, iM); writeUInt(compressed + 8, tableLength); writeUInt(compressed + 12, nBits); writeUInt(compressed + 16, 0); // room for future extensions return dataStart + data_length - compressed; } static bool hufUncompress(const char compressed[], int nCompressed, std::vector *raw) { if (nCompressed == 0) { if (raw->size() != 0) return false; return false; } int im = readUInt(compressed); int iM = readUInt(compressed + 4); // int tableLength = readUInt (compressed + 8); int nBits = readUInt(compressed + 12); if (im < 0 || im >= HUF_ENCSIZE || iM < 0 || iM >= HUF_ENCSIZE) return false; const char *ptr = compressed + 20; // // Fast decoder needs at least 2x64-bits of compressed data, and // needs to be run-able on this platform. Otherwise, fall back // to the original decoder // // if (FastHufDecoder::enabled() && nBits > 128) //{ // FastHufDecoder fhd (ptr, nCompressed - (ptr - compressed), im, iM, iM); // fhd.decode ((unsigned char*)ptr, nBits, raw, nRaw); //} // else { std::vector freq(HUF_ENCSIZE); std::vector hdec(HUF_DECSIZE); hufClearDecTable(&hdec.at(0)); hufUnpackEncTable(&ptr, nCompressed - (ptr - compressed), im, iM, &freq.at(0)); { if (nBits > 8 * (nCompressed - (ptr - compressed))) { return false; } hufBuildDecTable(&freq.at(0), im, iM, &hdec.at(0)); hufDecode(&freq.at(0), &hdec.at(0), ptr, nBits, iM, raw->size(), raw->data()); } // catch (...) //{ // hufFreeDecTable (hdec); // throw; //} hufFreeDecTable(&hdec.at(0)); } return true; } // // Functions to compress the range of values in the pixel data // const int USHORT_RANGE = (1 << 16); const int BITMAP_SIZE = (USHORT_RANGE >> 3); static void bitmapFromData(const unsigned short data[/*nData*/], int nData, unsigned char bitmap[BITMAP_SIZE], unsigned short &minNonZero, unsigned short &maxNonZero) { for (int i = 0; i < BITMAP_SIZE; ++i) bitmap[i] = 0; for (int i = 0; i < nData; ++i) bitmap[data[i] >> 3] |= (1 << (data[i] & 7)); bitmap[0] &= ~1; // zero is not explicitly stored in // the bitmap; we assume that the // data always contain zeroes minNonZero = BITMAP_SIZE - 1; maxNonZero = 0; for (int i = 0; i < BITMAP_SIZE; ++i) { if (bitmap[i]) { if (minNonZero > i) minNonZero = i; if (maxNonZero < i) maxNonZero = i; } } } static unsigned short forwardLutFromBitmap( const unsigned char bitmap[BITMAP_SIZE], unsigned short lut[USHORT_RANGE]) { int k = 0; for (int i = 0; i < USHORT_RANGE; ++i) { if ((i == 0) || (bitmap[i >> 3] & (1 << (i & 7)))) lut[i] = k++; else lut[i] = 0; } return k - 1; // maximum value stored in lut[], } // i.e. number of ones in bitmap minus 1 static unsigned short reverseLutFromBitmap( const unsigned char bitmap[BITMAP_SIZE], unsigned short lut[USHORT_RANGE]) { int k = 0; for (int i = 0; i < USHORT_RANGE; ++i) { if ((i == 0) || (bitmap[i >> 3] & (1 << (i & 7)))) lut[k++] = i; } int n = k - 1; while (k < USHORT_RANGE) lut[k++] = 0; return n; // maximum k where lut[k] is non-zero, } // i.e. number of ones in bitmap minus 1 static void applyLut(const unsigned short lut[USHORT_RANGE], unsigned short data[/*nData*/], int nData) { for (int i = 0; i < nData; ++i) data[i] = lut[data[i]]; } #ifdef __clang__ #pragma clang diagnostic pop #endif // __clang__ #ifdef _MSC_VER #pragma warning(pop) #endif static bool CompressPiz(unsigned char *outPtr, unsigned int *outSize, const unsigned char *inPtr, size_t inSize, const std::vector &channelInfo, int data_width, int num_lines) { std::vector bitmap(BITMAP_SIZE); unsigned short minNonZero; unsigned short maxNonZero; #if !MINIZ_LITTLE_ENDIAN // @todo { PIZ compression on BigEndian architecture. } assert(0); return false; #endif // Assume `inSize` is multiple of 2 or 4. std::vector tmpBuffer(inSize / sizeof(unsigned short)); std::vector channelData(channelInfo.size()); unsigned short *tmpBufferEnd = &tmpBuffer.at(0); for (size_t c = 0; c < channelData.size(); c++) { PIZChannelData &cd = channelData[c]; cd.start = tmpBufferEnd; cd.end = cd.start; cd.nx = data_width; cd.ny = num_lines; // cd.ys = c.channel().ySampling; size_t pixelSize = sizeof(int); // UINT and FLOAT if (channelInfo[c].pixel_type == TINYEXR_PIXELTYPE_HALF) { pixelSize = sizeof(short); } cd.size = static_cast(pixelSize / sizeof(short)); tmpBufferEnd += cd.nx * cd.ny * cd.size; } const unsigned char *ptr = inPtr; for (int y = 0; y < num_lines; ++y) { for (size_t i = 0; i < channelData.size(); ++i) { PIZChannelData &cd = channelData[i]; // if (modp (y, cd.ys) != 0) // continue; size_t n = static_cast(cd.nx * cd.size); memcpy(cd.end, ptr, n * sizeof(unsigned short)); ptr += n * sizeof(unsigned short); cd.end += n; } } bitmapFromData(&tmpBuffer.at(0), static_cast(tmpBuffer.size()), bitmap.data(), minNonZero, maxNonZero); std::vector lut(USHORT_RANGE); unsigned short maxValue = forwardLutFromBitmap(bitmap.data(), lut.data()); applyLut(lut.data(), &tmpBuffer.at(0), static_cast(tmpBuffer.size())); // // Store range compression info in _outBuffer // char *buf = reinterpret_cast(outPtr); memcpy(buf, &minNonZero, sizeof(unsigned short)); buf += sizeof(unsigned short); memcpy(buf, &maxNonZero, sizeof(unsigned short)); buf += sizeof(unsigned short); if (minNonZero <= maxNonZero) { memcpy(buf, reinterpret_cast(&bitmap[0] + minNonZero), maxNonZero - minNonZero + 1); buf += maxNonZero - minNonZero + 1; } // // Apply wavelet encoding // for (size_t i = 0; i < channelData.size(); ++i) { PIZChannelData &cd = channelData[i]; for (int j = 0; j < cd.size; ++j) { wav2Encode(cd.start + j, cd.nx, cd.size, cd.ny, cd.nx * cd.size, maxValue); } } // // Apply Huffman encoding; append the result to _outBuffer // // length header(4byte), then huff data. Initialize length header with zero, // then later fill it by `length`. char *lengthPtr = buf; int zero = 0; memcpy(buf, &zero, sizeof(int)); buf += sizeof(int); int length = hufCompress(&tmpBuffer.at(0), static_cast(tmpBuffer.size()), buf); memcpy(lengthPtr, &length, sizeof(int)); (*outSize) = static_cast( (reinterpret_cast(buf) - outPtr) + static_cast(length)); // Use uncompressed data when compressed data is larger than uncompressed. // (Issue 40) if ((*outSize) >= inSize) { (*outSize) = static_cast(inSize); memcpy(outPtr, inPtr, inSize); } return true; } static bool DecompressPiz(unsigned char *outPtr, const unsigned char *inPtr, size_t tmpBufSize, size_t inLen, int num_channels, const EXRChannelInfo *channels, int data_width, int num_lines) { if (inLen == tmpBufSize) { // Data is not compressed(Issue 40). memcpy(outPtr, inPtr, inLen); return true; } std::vector bitmap(BITMAP_SIZE); unsigned short minNonZero; unsigned short maxNonZero; #if !MINIZ_LITTLE_ENDIAN // @todo { PIZ compression on BigEndian architecture. } assert(0); return false; #endif memset(bitmap.data(), 0, BITMAP_SIZE); const unsigned char *ptr = inPtr; // minNonZero = *(reinterpret_cast(ptr)); tinyexr::cpy2(&minNonZero, reinterpret_cast(ptr)); // maxNonZero = *(reinterpret_cast(ptr + 2)); tinyexr::cpy2(&maxNonZero, reinterpret_cast(ptr + 2)); ptr += 4; if (maxNonZero >= BITMAP_SIZE) { return false; } if (minNonZero <= maxNonZero) { memcpy(reinterpret_cast(&bitmap[0] + minNonZero), ptr, maxNonZero - minNonZero + 1); ptr += maxNonZero - minNonZero + 1; } std::vector lut(USHORT_RANGE); memset(lut.data(), 0, sizeof(unsigned short) * USHORT_RANGE); unsigned short maxValue = reverseLutFromBitmap(bitmap.data(), lut.data()); // // Huffman decoding // int length; // length = *(reinterpret_cast(ptr)); tinyexr::cpy4(&length, reinterpret_cast(ptr)); ptr += sizeof(int); if (size_t((ptr - inPtr) + length) > inLen) { return false; } std::vector tmpBuffer(tmpBufSize); hufUncompress(reinterpret_cast(ptr), length, &tmpBuffer); // // Wavelet decoding // std::vector channelData(static_cast(num_channels)); unsigned short *tmpBufferEnd = &tmpBuffer.at(0); for (size_t i = 0; i < static_cast(num_channels); ++i) { const EXRChannelInfo &chan = channels[i]; size_t pixelSize = sizeof(int); // UINT and FLOAT if (chan.pixel_type == TINYEXR_PIXELTYPE_HALF) { pixelSize = sizeof(short); } channelData[i].start = tmpBufferEnd; channelData[i].end = channelData[i].start; channelData[i].nx = data_width; channelData[i].ny = num_lines; // channelData[i].ys = 1; channelData[i].size = static_cast(pixelSize / sizeof(short)); tmpBufferEnd += channelData[i].nx * channelData[i].ny * channelData[i].size; } for (size_t i = 0; i < channelData.size(); ++i) { PIZChannelData &cd = channelData[i]; for (int j = 0; j < cd.size; ++j) { wav2Decode(cd.start + j, cd.nx, cd.size, cd.ny, cd.nx * cd.size, maxValue); } } // // Expand the pixel data to their original range // applyLut(lut.data(), &tmpBuffer.at(0), static_cast(tmpBufSize)); for (int y = 0; y < num_lines; y++) { for (size_t i = 0; i < channelData.size(); ++i) { PIZChannelData &cd = channelData[i]; // if (modp (y, cd.ys) != 0) // continue; size_t n = static_cast(cd.nx * cd.size); memcpy(outPtr, cd.end, static_cast(n * sizeof(unsigned short))); outPtr += n * sizeof(unsigned short); cd.end += n; } } return true; } #endif // TINYEXR_USE_PIZ #if TINYEXR_USE_ZFP struct ZFPCompressionParam { double rate; int precision; double tolerance; int type; // TINYEXR_ZFP_COMPRESSIONTYPE_* ZFPCompressionParam() { type = TINYEXR_ZFP_COMPRESSIONTYPE_RATE; rate = 2.0; precision = 0; tolerance = 0.0f; } }; bool FindZFPCompressionParam(ZFPCompressionParam *param, const EXRAttribute *attributes, int num_attributes) { bool foundType = false; for (int i = 0; i < num_attributes; i++) { if ((strcmp(attributes[i].name, "zfpCompressionType") == 0) && (attributes[i].size == 1)) { param->type = static_cast(attributes[i].value[0]); foundType = true; } } if (!foundType) { return false; } if (param->type == TINYEXR_ZFP_COMPRESSIONTYPE_RATE) { for (int i = 0; i < num_attributes; i++) { if ((strcmp(attributes[i].name, "zfpCompressionRate") == 0) && (attributes[i].size == 8)) { param->rate = *(reinterpret_cast(attributes[i].value)); return true; } } } else if (param->type == TINYEXR_ZFP_COMPRESSIONTYPE_PRECISION) { for (int i = 0; i < num_attributes; i++) { if ((strcmp(attributes[i].name, "zfpCompressionPrecision") == 0) && (attributes[i].size == 4)) { param->rate = *(reinterpret_cast(attributes[i].value)); return true; } } } else if (param->type == TINYEXR_ZFP_COMPRESSIONTYPE_ACCURACY) { for (int i = 0; i < num_attributes; i++) { if ((strcmp(attributes[i].name, "zfpCompressionTolerance") == 0) && (attributes[i].size == 8)) { param->tolerance = *(reinterpret_cast(attributes[i].value)); return true; } } } else { assert(0); } return false; } // Assume pixel format is FLOAT for all channels. static bool DecompressZfp(float *dst, int dst_width, int dst_num_lines, int num_channels, const unsigned char *src, unsigned long src_size, const ZFPCompressionParam ¶m) { size_t uncompressed_size = dst_width * dst_num_lines * num_channels; if (uncompressed_size == src_size) { // Data is not compressed(Issue 40). memcpy(dst, src, src_size); } zfp_stream *zfp = NULL; zfp_field *field = NULL; assert((dst_width % 4) == 0); assert((dst_num_lines % 4) == 0); if ((dst_width & 3U) || (dst_num_lines & 3U)) { return false; } field = zfp_field_2d(reinterpret_cast(const_cast(src)), zfp_type_float, dst_width, dst_num_lines * num_channels); zfp = zfp_stream_open(NULL); if (param.type == TINYEXR_ZFP_COMPRESSIONTYPE_RATE) { zfp_stream_set_rate(zfp, param.rate, zfp_type_float, /* dimention */ 2, /* write random access */ 0); } else if (param.type == TINYEXR_ZFP_COMPRESSIONTYPE_PRECISION) { zfp_stream_set_precision(zfp, param.precision, zfp_type_float); } else if (param.type == TINYEXR_ZFP_COMPRESSIONTYPE_ACCURACY) { zfp_stream_set_accuracy(zfp, param.tolerance, zfp_type_float); } else { assert(0); } size_t buf_size = zfp_stream_maximum_size(zfp, field); std::vector buf(buf_size); memcpy(&buf.at(0), src, src_size); bitstream *stream = stream_open(&buf.at(0), buf_size); zfp_stream_set_bit_stream(zfp, stream); zfp_stream_rewind(zfp); size_t image_size = dst_width * dst_num_lines; for (int c = 0; c < num_channels; c++) { // decompress 4x4 pixel block. for (int y = 0; y < dst_num_lines; y += 4) { for (int x = 0; x < dst_width; x += 4) { float fblock[16]; zfp_decode_block_float_2(zfp, fblock); for (int j = 0; j < 4; j++) { for (int i = 0; i < 4; i++) { dst[c * image_size + ((y + j) * dst_width + (x + i))] = fblock[j * 4 + i]; } } } } } zfp_field_free(field); zfp_stream_close(zfp); stream_close(stream); return true; } // Assume pixel format is FLOAT for all channels. bool CompressZfp(std::vector *outBuf, unsigned int *outSize, const float *inPtr, int width, int num_lines, int num_channels, const ZFPCompressionParam ¶m) { zfp_stream *zfp = NULL; zfp_field *field = NULL; assert((width % 4) == 0); assert((num_lines % 4) == 0); if ((width & 3U) || (num_lines & 3U)) { return false; } // create input array. field = zfp_field_2d(reinterpret_cast(const_cast(inPtr)), zfp_type_float, width, num_lines * num_channels); zfp = zfp_stream_open(NULL); if (param.type == TINYEXR_ZFP_COMPRESSIONTYPE_RATE) { zfp_stream_set_rate(zfp, param.rate, zfp_type_float, 2, 0); } else if (param.type == TINYEXR_ZFP_COMPRESSIONTYPE_PRECISION) { zfp_stream_set_precision(zfp, param.precision, zfp_type_float); } else if (param.type == TINYEXR_ZFP_COMPRESSIONTYPE_ACCURACY) { zfp_stream_set_accuracy(zfp, param.tolerance, zfp_type_float); } else { assert(0); } size_t buf_size = zfp_stream_maximum_size(zfp, field); outBuf->resize(buf_size); bitstream *stream = stream_open(&outBuf->at(0), buf_size); zfp_stream_set_bit_stream(zfp, stream); zfp_field_free(field); size_t image_size = width * num_lines; for (int c = 0; c < num_channels; c++) { // compress 4x4 pixel block. for (int y = 0; y < num_lines; y += 4) { for (int x = 0; x < width; x += 4) { float fblock[16]; for (int j = 0; j < 4; j++) { for (int i = 0; i < 4; i++) { fblock[j * 4 + i] = inPtr[c * image_size + ((y + j) * width + (x + i))]; } } zfp_encode_block_float_2(zfp, fblock); } } } zfp_stream_flush(zfp); (*outSize) = zfp_stream_compressed_size(zfp); zfp_stream_close(zfp); return true; } #endif // // ----------------------------------------------------------------- // // TODO(syoyo): Refactor function arguments. static bool DecodePixelData(/* out */ unsigned char **out_images, const int *requested_pixel_types, const unsigned char *data_ptr, size_t data_len, int compression_type, int line_order, int width, int height, int x_stride, int y, int line_no, int num_lines, size_t pixel_data_size, size_t num_attributes, const EXRAttribute *attributes, size_t num_channels, const EXRChannelInfo *channels, const std::vector &channel_offset_list) { if (compression_type == TINYEXR_COMPRESSIONTYPE_PIZ) { // PIZ #if TINYEXR_USE_PIZ if ((width == 0) || (num_lines == 0) || (pixel_data_size == 0)) { // Invalid input #90 return false; } // Allocate original data size. std::vector outBuf(static_cast( static_cast(width * num_lines) * pixel_data_size)); size_t tmpBufLen = outBuf.size(); bool ret = tinyexr::DecompressPiz( reinterpret_cast(&outBuf.at(0)), data_ptr, tmpBufLen, data_len, static_cast(num_channels), channels, width, num_lines); if (!ret) { return false; } // For PIZ_COMPRESSION: // pixel sample data for channel 0 for scanline 0 // pixel sample data for channel 1 for scanline 0 // pixel sample data for channel ... for scanline 0 // pixel sample data for channel n for scanline 0 // pixel sample data for channel 0 for scanline 1 // pixel sample data for channel 1 for scanline 1 // pixel sample data for channel ... for scanline 1 // pixel sample data for channel n for scanline 1 // ... for (size_t c = 0; c < static_cast(num_channels); c++) { if (channels[c].pixel_type == TINYEXR_PIXELTYPE_HALF) { for (size_t v = 0; v < static_cast(num_lines); v++) { const unsigned short *line_ptr = reinterpret_cast( &outBuf.at(v * pixel_data_size * static_cast(width) + channel_offset_list[c] * static_cast(width))); for (size_t u = 0; u < static_cast(width); u++) { FP16 hf; // hf.u = line_ptr[u]; // use `cpy` to avoid unaligned memory access when compiler's // optimization is on. tinyexr::cpy2(&(hf.u), line_ptr + u); tinyexr::swap2(reinterpret_cast(&hf.u)); if (requested_pixel_types[c] == TINYEXR_PIXELTYPE_HALF) { unsigned short *image = reinterpret_cast(out_images)[c]; if (line_order == 0) { image += (static_cast(line_no) + v) * static_cast(x_stride) + u; } else { image += static_cast( (height - 1 - (line_no + static_cast(v)))) * static_cast(x_stride) + u; } *image = hf.u; } else { // HALF -> FLOAT FP32 f32 = half_to_float(hf); float *image = reinterpret_cast(out_images)[c]; size_t offset = 0; if (line_order == 0) { offset = (static_cast(line_no) + v) * static_cast(x_stride) + u; } else { offset = static_cast( (height - 1 - (line_no + static_cast(v)))) * static_cast(x_stride) + u; } image += offset; *image = f32.f; } } } } else if (channels[c].pixel_type == TINYEXR_PIXELTYPE_UINT) { assert(requested_pixel_types[c] == TINYEXR_PIXELTYPE_UINT); for (size_t v = 0; v < static_cast(num_lines); v++) { const unsigned int *line_ptr = reinterpret_cast( &outBuf.at(v * pixel_data_size * static_cast(width) + channel_offset_list[c] * static_cast(width))); for (size_t u = 0; u < static_cast(width); u++) { unsigned int val; // val = line_ptr[u]; tinyexr::cpy4(&val, line_ptr + u); tinyexr::swap4(&val); unsigned int *image = reinterpret_cast(out_images)[c]; if (line_order == 0) { image += (static_cast(line_no) + v) * static_cast(x_stride) + u; } else { image += static_cast( (height - 1 - (line_no + static_cast(v)))) * static_cast(x_stride) + u; } *image = val; } } } else if (channels[c].pixel_type == TINYEXR_PIXELTYPE_FLOAT) { assert(requested_pixel_types[c] == TINYEXR_PIXELTYPE_FLOAT); for (size_t v = 0; v < static_cast(num_lines); v++) { const float *line_ptr = reinterpret_cast(&outBuf.at( v * pixel_data_size * static_cast(x_stride) + channel_offset_list[c] * static_cast(x_stride))); for (size_t u = 0; u < static_cast(width); u++) { float val; // val = line_ptr[u]; tinyexr::cpy4(&val, line_ptr + u); tinyexr::swap4(reinterpret_cast(&val)); float *image = reinterpret_cast(out_images)[c]; if (line_order == 0) { image += (static_cast(line_no) + v) * static_cast(x_stride) + u; } else { image += static_cast( (height - 1 - (line_no + static_cast(v)))) * static_cast(x_stride) + u; } *image = val; } } } else { assert(0); } } #else assert(0 && "PIZ is enabled in this build"); return false; #endif } else if (compression_type == TINYEXR_COMPRESSIONTYPE_ZIPS || compression_type == TINYEXR_COMPRESSIONTYPE_ZIP) { // Allocate original data size. std::vector outBuf(static_cast(width) * static_cast(num_lines) * pixel_data_size); unsigned long dstLen = static_cast(outBuf.size()); assert(dstLen > 0); if (!tinyexr::DecompressZip( reinterpret_cast(&outBuf.at(0)), &dstLen, data_ptr, static_cast(data_len))) { return false; } // For ZIP_COMPRESSION: // pixel sample data for channel 0 for scanline 0 // pixel sample data for channel 1 for scanline 0 // pixel sample data for channel ... for scanline 0 // pixel sample data for channel n for scanline 0 // pixel sample data for channel 0 for scanline 1 // pixel sample data for channel 1 for scanline 1 // pixel sample data for channel ... for scanline 1 // pixel sample data for channel n for scanline 1 // ... for (size_t c = 0; c < static_cast(num_channels); c++) { if (channels[c].pixel_type == TINYEXR_PIXELTYPE_HALF) { for (size_t v = 0; v < static_cast(num_lines); v++) { const unsigned short *line_ptr = reinterpret_cast( &outBuf.at(v * static_cast(pixel_data_size) * static_cast(width) + channel_offset_list[c] * static_cast(width))); for (size_t u = 0; u < static_cast(width); u++) { tinyexr::FP16 hf; // hf.u = line_ptr[u]; tinyexr::cpy2(&(hf.u), line_ptr + u); tinyexr::swap2(reinterpret_cast(&hf.u)); if (requested_pixel_types[c] == TINYEXR_PIXELTYPE_HALF) { unsigned short *image = reinterpret_cast(out_images)[c]; if (line_order == 0) { image += (static_cast(line_no) + v) * static_cast(x_stride) + u; } else { image += (static_cast(height) - 1U - (static_cast(line_no) + v)) * static_cast(x_stride) + u; } *image = hf.u; } else { // HALF -> FLOAT tinyexr::FP32 f32 = half_to_float(hf); float *image = reinterpret_cast(out_images)[c]; size_t offset = 0; if (line_order == 0) { offset = (static_cast(line_no) + v) * static_cast(x_stride) + u; } else { offset = (static_cast(height) - 1U - (static_cast(line_no) + v)) * static_cast(x_stride) + u; } image += offset; *image = f32.f; } } } } else if (channels[c].pixel_type == TINYEXR_PIXELTYPE_UINT) { assert(requested_pixel_types[c] == TINYEXR_PIXELTYPE_UINT); for (size_t v = 0; v < static_cast(num_lines); v++) { const unsigned int *line_ptr = reinterpret_cast( &outBuf.at(v * pixel_data_size * static_cast(width) + channel_offset_list[c] * static_cast(width))); for (size_t u = 0; u < static_cast(width); u++) { unsigned int val; // val = line_ptr[u]; tinyexr::cpy4(&val, line_ptr + u); tinyexr::swap4(&val); unsigned int *image = reinterpret_cast(out_images)[c]; if (line_order == 0) { image += (static_cast(line_no) + v) * static_cast(x_stride) + u; } else { image += (static_cast(height) - 1U - (static_cast(line_no) + v)) * static_cast(x_stride) + u; } *image = val; } } } else if (channels[c].pixel_type == TINYEXR_PIXELTYPE_FLOAT) { assert(requested_pixel_types[c] == TINYEXR_PIXELTYPE_FLOAT); for (size_t v = 0; v < static_cast(num_lines); v++) { const float *line_ptr = reinterpret_cast( &outBuf.at(v * pixel_data_size * static_cast(width) + channel_offset_list[c] * static_cast(width))); for (size_t u = 0; u < static_cast(width); u++) { float val; // val = line_ptr[u]; tinyexr::cpy4(&val, line_ptr + u); tinyexr::swap4(reinterpret_cast(&val)); float *image = reinterpret_cast(out_images)[c]; if (line_order == 0) { image += (static_cast(line_no) + v) * static_cast(x_stride) + u; } else { image += (static_cast(height) - 1U - (static_cast(line_no) + v)) * static_cast(x_stride) + u; } *image = val; } } } else { assert(0); return false; } } } else if (compression_type == TINYEXR_COMPRESSIONTYPE_RLE) { // Allocate original data size. std::vector outBuf(static_cast(width) * static_cast(num_lines) * pixel_data_size); unsigned long dstLen = static_cast(outBuf.size()); if (dstLen == 0) { return false; } if (!tinyexr::DecompressRle(reinterpret_cast(&outBuf.at(0)), dstLen, data_ptr, static_cast(data_len))) { return false; } // For RLE_COMPRESSION: // pixel sample data for channel 0 for scanline 0 // pixel sample data for channel 1 for scanline 0 // pixel sample data for channel ... for scanline 0 // pixel sample data for channel n for scanline 0 // pixel sample data for channel 0 for scanline 1 // pixel sample data for channel 1 for scanline 1 // pixel sample data for channel ... for scanline 1 // pixel sample data for channel n for scanline 1 // ... for (size_t c = 0; c < static_cast(num_channels); c++) { if (channels[c].pixel_type == TINYEXR_PIXELTYPE_HALF) { for (size_t v = 0; v < static_cast(num_lines); v++) { const unsigned short *line_ptr = reinterpret_cast( &outBuf.at(v * static_cast(pixel_data_size) * static_cast(width) + channel_offset_list[c] * static_cast(width))); for (size_t u = 0; u < static_cast(width); u++) { tinyexr::FP16 hf; // hf.u = line_ptr[u]; tinyexr::cpy2(&(hf.u), line_ptr + u); tinyexr::swap2(reinterpret_cast(&hf.u)); if (requested_pixel_types[c] == TINYEXR_PIXELTYPE_HALF) { unsigned short *image = reinterpret_cast(out_images)[c]; if (line_order == 0) { image += (static_cast(line_no) + v) * static_cast(x_stride) + u; } else { image += (static_cast(height) - 1U - (static_cast(line_no) + v)) * static_cast(x_stride) + u; } *image = hf.u; } else { // HALF -> FLOAT tinyexr::FP32 f32 = half_to_float(hf); float *image = reinterpret_cast(out_images)[c]; if (line_order == 0) { image += (static_cast(line_no) + v) * static_cast(x_stride) + u; } else { image += (static_cast(height) - 1U - (static_cast(line_no) + v)) * static_cast(x_stride) + u; } *image = f32.f; } } } } else if (channels[c].pixel_type == TINYEXR_PIXELTYPE_UINT) { assert(requested_pixel_types[c] == TINYEXR_PIXELTYPE_UINT); for (size_t v = 0; v < static_cast(num_lines); v++) { const unsigned int *line_ptr = reinterpret_cast( &outBuf.at(v * pixel_data_size * static_cast(width) + channel_offset_list[c] * static_cast(width))); for (size_t u = 0; u < static_cast(width); u++) { unsigned int val; // val = line_ptr[u]; tinyexr::cpy4(&val, line_ptr + u); tinyexr::swap4(&val); unsigned int *image = reinterpret_cast(out_images)[c]; if (line_order == 0) { image += (static_cast(line_no) + v) * static_cast(x_stride) + u; } else { image += (static_cast(height) - 1U - (static_cast(line_no) + v)) * static_cast(x_stride) + u; } *image = val; } } } else if (channels[c].pixel_type == TINYEXR_PIXELTYPE_FLOAT) { assert(requested_pixel_types[c] == TINYEXR_PIXELTYPE_FLOAT); for (size_t v = 0; v < static_cast(num_lines); v++) { const float *line_ptr = reinterpret_cast( &outBuf.at(v * pixel_data_size * static_cast(width) + channel_offset_list[c] * static_cast(width))); for (size_t u = 0; u < static_cast(width); u++) { float val; // val = line_ptr[u]; tinyexr::cpy4(&val, line_ptr + u); tinyexr::swap4(reinterpret_cast(&val)); float *image = reinterpret_cast(out_images)[c]; if (line_order == 0) { image += (static_cast(line_no) + v) * static_cast(x_stride) + u; } else { image += (static_cast(height) - 1U - (static_cast(line_no) + v)) * static_cast(x_stride) + u; } *image = val; } } } else { assert(0); return false; } } } else if (compression_type == TINYEXR_COMPRESSIONTYPE_ZFP) { #if TINYEXR_USE_ZFP tinyexr::ZFPCompressionParam zfp_compression_param; if (!FindZFPCompressionParam(&zfp_compression_param, attributes, num_attributes)) { assert(0); return false; } // Allocate original data size. std::vector outBuf(static_cast(width) * static_cast(num_lines) * pixel_data_size); unsigned long dstLen = outBuf.size(); assert(dstLen > 0); tinyexr::DecompressZfp(reinterpret_cast(&outBuf.at(0)), width, num_lines, num_channels, data_ptr, static_cast(data_len), zfp_compression_param); // For ZFP_COMPRESSION: // pixel sample data for channel 0 for scanline 0 // pixel sample data for channel 1 for scanline 0 // pixel sample data for channel ... for scanline 0 // pixel sample data for channel n for scanline 0 // pixel sample data for channel 0 for scanline 1 // pixel sample data for channel 1 for scanline 1 // pixel sample data for channel ... for scanline 1 // pixel sample data for channel n for scanline 1 // ... for (size_t c = 0; c < static_cast(num_channels); c++) { assert(channels[c].pixel_type == TINYEXR_PIXELTYPE_FLOAT); if (channels[c].pixel_type == TINYEXR_PIXELTYPE_FLOAT) { assert(requested_pixel_types[c] == TINYEXR_PIXELTYPE_FLOAT); for (size_t v = 0; v < static_cast(num_lines); v++) { const float *line_ptr = reinterpret_cast( &outBuf.at(v * pixel_data_size * static_cast(width) + channel_offset_list[c] * static_cast(width))); for (size_t u = 0; u < static_cast(width); u++) { float val; tinyexr::cpy4(&val, line_ptr + u); tinyexr::swap4(reinterpret_cast(&val)); float *image = reinterpret_cast(out_images)[c]; if (line_order == 0) { image += (static_cast(line_no) + v) * static_cast(x_stride) + u; } else { image += (static_cast(height) - 1U - (static_cast(line_no) + v)) * static_cast(x_stride) + u; } *image = val; } } } else { assert(0); return false; } } #else (void)attributes; (void)num_attributes; (void)num_channels; assert(0); return false; #endif } else if (compression_type == TINYEXR_COMPRESSIONTYPE_NONE) { for (size_t c = 0; c < num_channels; c++) { for (size_t v = 0; v < static_cast(num_lines); v++) { if (channels[c].pixel_type == TINYEXR_PIXELTYPE_HALF) { const unsigned short *line_ptr = reinterpret_cast( data_ptr + v * pixel_data_size * size_t(width) + channel_offset_list[c] * static_cast(width)); if (requested_pixel_types[c] == TINYEXR_PIXELTYPE_HALF) { unsigned short *outLine = reinterpret_cast(out_images[c]); if (line_order == 0) { outLine += (size_t(y) + v) * size_t(x_stride); } else { outLine += (size_t(height) - 1 - (size_t(y) + v)) * size_t(x_stride); } for (int u = 0; u < width; u++) { tinyexr::FP16 hf; // hf.u = line_ptr[u]; tinyexr::cpy2(&(hf.u), line_ptr + u); tinyexr::swap2(reinterpret_cast(&hf.u)); outLine[u] = hf.u; } } else if (requested_pixel_types[c] == TINYEXR_PIXELTYPE_FLOAT) { float *outLine = reinterpret_cast(out_images[c]); if (line_order == 0) { outLine += (size_t(y) + v) * size_t(x_stride); } else { outLine += (size_t(height) - 1 - (size_t(y) + v)) * size_t(x_stride); } if (reinterpret_cast(line_ptr + width) > (data_ptr + data_len)) { // Insufficient data size return false; } for (int u = 0; u < width; u++) { tinyexr::FP16 hf; // address may not be aliged. use byte-wise copy for safety.#76 // hf.u = line_ptr[u]; tinyexr::cpy2(&(hf.u), line_ptr + u); tinyexr::swap2(reinterpret_cast(&hf.u)); tinyexr::FP32 f32 = half_to_float(hf); outLine[u] = f32.f; } } else { assert(0); return false; } } else if (channels[c].pixel_type == TINYEXR_PIXELTYPE_FLOAT) { const float *line_ptr = reinterpret_cast( data_ptr + v * pixel_data_size * size_t(width) + channel_offset_list[c] * static_cast(width)); float *outLine = reinterpret_cast(out_images[c]); if (line_order == 0) { outLine += (size_t(y) + v) * size_t(x_stride); } else { outLine += (size_t(height) - 1 - (size_t(y) + v)) * size_t(x_stride); } if (reinterpret_cast(line_ptr + width) > (data_ptr + data_len)) { // Insufficient data size return false; } for (int u = 0; u < width; u++) { float val; tinyexr::cpy4(&val, line_ptr + u); tinyexr::swap4(reinterpret_cast(&val)); outLine[u] = val; } } else if (channels[c].pixel_type == TINYEXR_PIXELTYPE_UINT) { const unsigned int *line_ptr = reinterpret_cast( data_ptr + v * pixel_data_size * size_t(width) + channel_offset_list[c] * static_cast(width)); unsigned int *outLine = reinterpret_cast(out_images[c]); if (line_order == 0) { outLine += (size_t(y) + v) * size_t(x_stride); } else { outLine += (size_t(height) - 1 - (size_t(y) + v)) * size_t(x_stride); } for (int u = 0; u < width; u++) { if (reinterpret_cast(line_ptr + u) >= (data_ptr + data_len)) { // Corrupsed data? return false; } unsigned int val; tinyexr::cpy4(&val, line_ptr + u); tinyexr::swap4(reinterpret_cast(&val)); outLine[u] = val; } } } } } return true; } static void DecodeTiledPixelData( unsigned char **out_images, int *width, int *height, const int *requested_pixel_types, const unsigned char *data_ptr, size_t data_len, int compression_type, int line_order, int data_width, int data_height, int tile_offset_x, int tile_offset_y, int tile_size_x, int tile_size_y, size_t pixel_data_size, size_t num_attributes, const EXRAttribute *attributes, size_t num_channels, const EXRChannelInfo *channels, const std::vector &channel_offset_list) { assert(tile_offset_x * tile_size_x < data_width); assert(tile_offset_y * tile_size_y < data_height); // Compute actual image size in a tile. if ((tile_offset_x + 1) * tile_size_x >= data_width) { (*width) = data_width - (tile_offset_x * tile_size_x); } else { (*width) = tile_size_x; } if ((tile_offset_y + 1) * tile_size_y >= data_height) { (*height) = data_height - (tile_offset_y * tile_size_y); } else { (*height) = tile_size_y; } // Image size = tile size. DecodePixelData(out_images, requested_pixel_types, data_ptr, data_len, compression_type, line_order, (*width), tile_size_y, /* stride */ tile_size_x, /* y */ 0, /* line_no */ 0, (*height), pixel_data_size, num_attributes, attributes, num_channels, channels, channel_offset_list); } static bool ComputeChannelLayout(std::vector *channel_offset_list, int *pixel_data_size, size_t *channel_offset, int num_channels, const EXRChannelInfo *channels) { channel_offset_list->resize(static_cast(num_channels)); (*pixel_data_size) = 0; (*channel_offset) = 0; for (size_t c = 0; c < static_cast(num_channels); c++) { (*channel_offset_list)[c] = (*channel_offset); if (channels[c].pixel_type == TINYEXR_PIXELTYPE_HALF) { (*pixel_data_size) += sizeof(unsigned short); (*channel_offset) += sizeof(unsigned short); } else if (channels[c].pixel_type == TINYEXR_PIXELTYPE_FLOAT) { (*pixel_data_size) += sizeof(float); (*channel_offset) += sizeof(float); } else if (channels[c].pixel_type == TINYEXR_PIXELTYPE_UINT) { (*pixel_data_size) += sizeof(unsigned int); (*channel_offset) += sizeof(unsigned int); } else { // ??? return false; } } return true; } static unsigned char **AllocateImage(int num_channels, const EXRChannelInfo *channels, const int *requested_pixel_types, int data_width, int data_height) { unsigned char **images = reinterpret_cast(static_cast( malloc(sizeof(float *) * static_cast(num_channels)))); for (size_t c = 0; c < static_cast(num_channels); c++) { size_t data_len = static_cast(data_width) * static_cast(data_height); if (channels[c].pixel_type == TINYEXR_PIXELTYPE_HALF) { // pixel_data_size += sizeof(unsigned short); // channel_offset += sizeof(unsigned short); // Alloc internal image for half type. if (requested_pixel_types[c] == TINYEXR_PIXELTYPE_HALF) { images[c] = reinterpret_cast(static_cast( malloc(sizeof(unsigned short) * data_len))); } else if (requested_pixel_types[c] == TINYEXR_PIXELTYPE_FLOAT) { images[c] = reinterpret_cast( static_cast(malloc(sizeof(float) * data_len))); } else { assert(0); } } else if (channels[c].pixel_type == TINYEXR_PIXELTYPE_FLOAT) { // pixel_data_size += sizeof(float); // channel_offset += sizeof(float); images[c] = reinterpret_cast( static_cast(malloc(sizeof(float) * data_len))); } else if (channels[c].pixel_type == TINYEXR_PIXELTYPE_UINT) { // pixel_data_size += sizeof(unsigned int); // channel_offset += sizeof(unsigned int); images[c] = reinterpret_cast( static_cast(malloc(sizeof(unsigned int) * data_len))); } else { assert(0); } } return images; } static int ParseEXRHeader(HeaderInfo *info, bool *empty_header, const EXRVersion *version, std::string *err, const unsigned char *buf, size_t size) { const char *marker = reinterpret_cast(&buf[0]); if (empty_header) { (*empty_header) = false; } if (version->multipart) { if (size > 0 && marker[0] == '\0') { // End of header list. if (empty_header) { (*empty_header) = true; } return TINYEXR_SUCCESS; } } // According to the spec, the header of every OpenEXR file must contain at // least the following attributes: // // channels chlist // compression compression // dataWindow box2i // displayWindow box2i // lineOrder lineOrder // pixelAspectRatio float // screenWindowCenter v2f // screenWindowWidth float bool has_channels = false; bool has_compression = false; bool has_data_window = false; bool has_display_window = false; bool has_line_order = false; bool has_pixel_aspect_ratio = false; bool has_screen_window_center = false; bool has_screen_window_width = false; info->data_window[0] = 0; info->data_window[1] = 0; info->data_window[2] = 0; info->data_window[3] = 0; info->line_order = 0; // @fixme info->display_window[0] = 0; info->display_window[1] = 0; info->display_window[2] = 0; info->display_window[3] = 0; info->screen_window_center[0] = 0.0f; info->screen_window_center[1] = 0.0f; info->screen_window_width = -1.0f; info->pixel_aspect_ratio = -1.0f; info->tile_size_x = -1; info->tile_size_y = -1; info->tile_level_mode = -1; info->tile_rounding_mode = -1; info->attributes.clear(); // Read attributes size_t orig_size = size; for (size_t nattr = 0; nattr < TINYEXR_MAX_HEADER_ATTRIBUTES; nattr++) { if (0 == size) { if (err) { (*err) += "Insufficient data size for attributes.\n"; } return TINYEXR_ERROR_INVALID_DATA; } else if (marker[0] == '\0') { size--; break; } std::string attr_name; std::string attr_type; std::vector data; size_t marker_size; if (!tinyexr::ReadAttribute(&attr_name, &attr_type, &data, &marker_size, marker, size)) { if (err) { (*err) += "Failed to read attribute.\n"; } return TINYEXR_ERROR_INVALID_DATA; } marker += marker_size; size -= marker_size; if (version->tiled && attr_name.compare("tiles") == 0) { unsigned int x_size, y_size; unsigned char tile_mode; assert(data.size() == 9); memcpy(&x_size, &data.at(0), sizeof(int)); memcpy(&y_size, &data.at(4), sizeof(int)); tile_mode = data[8]; tinyexr::swap4(&x_size); tinyexr::swap4(&y_size); info->tile_size_x = static_cast(x_size); info->tile_size_y = static_cast(y_size); // mode = levelMode + roundingMode * 16 info->tile_level_mode = tile_mode & 0x3; info->tile_rounding_mode = (tile_mode >> 4) & 0x1; } else if (attr_name.compare("compression") == 0) { bool ok = false; if (data[0] < TINYEXR_COMPRESSIONTYPE_PIZ) { ok = true; } if (data[0] == TINYEXR_COMPRESSIONTYPE_PIZ) { #if TINYEXR_USE_PIZ ok = true; #else if (err) { (*err) = "PIZ compression is not supported."; } return TINYEXR_ERROR_UNSUPPORTED_FORMAT; #endif } if (data[0] == TINYEXR_COMPRESSIONTYPE_ZFP) { #if TINYEXR_USE_ZFP ok = true; #else if (err) { (*err) = "ZFP compression is not supported."; } return TINYEXR_ERROR_UNSUPPORTED_FORMAT; #endif } if (!ok) { if (err) { (*err) = "Unknown compression type."; } return TINYEXR_ERROR_UNSUPPORTED_FORMAT; } info->compression_type = static_cast(data[0]); has_compression = true; } else if (attr_name.compare("channels") == 0) { // name: zero-terminated string, from 1 to 255 bytes long // pixel type: int, possible values are: UINT = 0 HALF = 1 FLOAT = 2 // pLinear: unsigned char, possible values are 0 and 1 // reserved: three chars, should be zero // xSampling: int // ySampling: int if (!ReadChannelInfo(info->channels, data)) { if (err) { (*err) += "Failed to parse channel info.\n"; } return TINYEXR_ERROR_INVALID_DATA; } if (info->channels.size() < 1) { if (err) { (*err) += "# of channels is zero.\n"; } return TINYEXR_ERROR_INVALID_DATA; } has_channels = true; } else if (attr_name.compare("dataWindow") == 0) { if (data.size() >= 16) { memcpy(&info->data_window[0], &data.at(0), sizeof(int)); memcpy(&info->data_window[1], &data.at(4), sizeof(int)); memcpy(&info->data_window[2], &data.at(8), sizeof(int)); memcpy(&info->data_window[3], &data.at(12), sizeof(int)); tinyexr::swap4(reinterpret_cast(&info->data_window[0])); tinyexr::swap4(reinterpret_cast(&info->data_window[1])); tinyexr::swap4(reinterpret_cast(&info->data_window[2])); tinyexr::swap4(reinterpret_cast(&info->data_window[3])); has_data_window = true; } } else if (attr_name.compare("displayWindow") == 0) { if (data.size() >= 16) { memcpy(&info->display_window[0], &data.at(0), sizeof(int)); memcpy(&info->display_window[1], &data.at(4), sizeof(int)); memcpy(&info->display_window[2], &data.at(8), sizeof(int)); memcpy(&info->display_window[3], &data.at(12), sizeof(int)); tinyexr::swap4( reinterpret_cast(&info->display_window[0])); tinyexr::swap4( reinterpret_cast(&info->display_window[1])); tinyexr::swap4( reinterpret_cast(&info->display_window[2])); tinyexr::swap4( reinterpret_cast(&info->display_window[3])); has_display_window = true; } } else if (attr_name.compare("lineOrder") == 0) { if (data.size() >= 1) { info->line_order = static_cast(data[0]); has_line_order = true; } } else if (attr_name.compare("pixelAspectRatio") == 0) { if (data.size() >= sizeof(float)) { memcpy(&info->pixel_aspect_ratio, &data.at(0), sizeof(float)); tinyexr::swap4( reinterpret_cast(&info->pixel_aspect_ratio)); has_pixel_aspect_ratio = true; } } else if (attr_name.compare("screenWindowCenter") == 0) { if (data.size() >= 8) { memcpy(&info->screen_window_center[0], &data.at(0), sizeof(float)); memcpy(&info->screen_window_center[1], &data.at(4), sizeof(float)); tinyexr::swap4( reinterpret_cast(&info->screen_window_center[0])); tinyexr::swap4( reinterpret_cast(&info->screen_window_center[1])); has_screen_window_center = true; } } else if (attr_name.compare("screenWindowWidth") == 0) { if (data.size() >= sizeof(float)) { memcpy(&info->screen_window_width, &data.at(0), sizeof(float)); tinyexr::swap4( reinterpret_cast(&info->screen_window_width)); has_screen_window_width = true; } } else if (attr_name.compare("chunkCount") == 0) { if (data.size() >= sizeof(int)) { memcpy(&info->chunk_count, &data.at(0), sizeof(int)); tinyexr::swap4(reinterpret_cast(&info->chunk_count)); } } else { // Custom attribute(up to TINYEXR_MAX_CUSTOM_ATTRIBUTES) if (info->attributes.size() < TINYEXR_MAX_CUSTOM_ATTRIBUTES) { EXRAttribute attrib; #ifdef _MSC_VER strncpy_s(attrib.name, attr_name.c_str(), 255); strncpy_s(attrib.type, attr_type.c_str(), 255); #else strncpy(attrib.name, attr_name.c_str(), 255); strncpy(attrib.type, attr_type.c_str(), 255); #endif attrib.name[255] = '\0'; attrib.type[255] = '\0'; attrib.size = static_cast(data.size()); attrib.value = static_cast(malloc(data.size())); memcpy(reinterpret_cast(attrib.value), &data.at(0), data.size()); info->attributes.push_back(attrib); } } } // Check if required attributes exist { std::stringstream ss_err; if (!has_compression) { ss_err << "\"compression\" attribute not found in the header." << std::endl; } if (!has_channels) { ss_err << "\"channels\" attribute not found in the header." << std::endl; } if (!has_line_order) { ss_err << "\"lineOrder\" attribute not found in the header." << std::endl; } if (!has_display_window) { ss_err << "\"displayWindow\" attribute not found in the header." << std::endl; } if (!has_data_window) { ss_err << "\"dataWindow\" attribute not found in the header or invalid." << std::endl; } if (!has_pixel_aspect_ratio) { ss_err << "\"pixelAspectRatio\" attribute not found in the header." << std::endl; } if (!has_screen_window_width) { ss_err << "\"screenWindowWidth\" attribute not found in the header." << std::endl; } if (!has_screen_window_center) { ss_err << "\"screenWindowCenter\" attribute not found in the header." << std::endl; } if (!(ss_err.str().empty())) { if (err) { (*err) += ss_err.str(); } return TINYEXR_ERROR_INVALID_HEADER; } } info->header_len = static_cast(orig_size - size); return TINYEXR_SUCCESS; } // C++ HeaderInfo to C EXRHeader conversion. static void ConvertHeader(EXRHeader *exr_header, const HeaderInfo &info) { exr_header->pixel_aspect_ratio = info.pixel_aspect_ratio; exr_header->screen_window_center[0] = info.screen_window_center[0]; exr_header->screen_window_center[1] = info.screen_window_center[1]; exr_header->screen_window_width = info.screen_window_width; exr_header->chunk_count = info.chunk_count; exr_header->display_window[0] = info.display_window[0]; exr_header->display_window[1] = info.display_window[1]; exr_header->display_window[2] = info.display_window[2]; exr_header->display_window[3] = info.display_window[3]; exr_header->data_window[0] = info.data_window[0]; exr_header->data_window[1] = info.data_window[1]; exr_header->data_window[2] = info.data_window[2]; exr_header->data_window[3] = info.data_window[3]; exr_header->line_order = info.line_order; exr_header->compression_type = info.compression_type; exr_header->tile_size_x = info.tile_size_x; exr_header->tile_size_y = info.tile_size_y; exr_header->tile_level_mode = info.tile_level_mode; exr_header->tile_rounding_mode = info.tile_rounding_mode; exr_header->num_channels = static_cast(info.channels.size()); exr_header->channels = static_cast(malloc( sizeof(EXRChannelInfo) * static_cast(exr_header->num_channels))); for (size_t c = 0; c < static_cast(exr_header->num_channels); c++) { #ifdef _MSC_VER strncpy_s(exr_header->channels[c].name, info.channels[c].name.c_str(), 255); #else strncpy(exr_header->channels[c].name, info.channels[c].name.c_str(), 255); #endif // manually add '\0' for safety. exr_header->channels[c].name[255] = '\0'; exr_header->channels[c].pixel_type = info.channels[c].pixel_type; exr_header->channels[c].p_linear = info.channels[c].p_linear; exr_header->channels[c].x_sampling = info.channels[c].x_sampling; exr_header->channels[c].y_sampling = info.channels[c].y_sampling; } exr_header->pixel_types = static_cast( malloc(sizeof(int) * static_cast(exr_header->num_channels))); for (size_t c = 0; c < static_cast(exr_header->num_channels); c++) { exr_header->pixel_types[c] = info.channels[c].pixel_type; } // Initially fill with values of `pixel_types` exr_header->requested_pixel_types = static_cast( malloc(sizeof(int) * static_cast(exr_header->num_channels))); for (size_t c = 0; c < static_cast(exr_header->num_channels); c++) { exr_header->requested_pixel_types[c] = info.channels[c].pixel_type; } exr_header->num_custom_attributes = static_cast(info.attributes.size()); if (exr_header->num_custom_attributes > 0) { // TODO(syoyo): Report warning when # of attributes exceeds // `TINYEXR_MAX_CUSTOM_ATTRIBUTES` if (exr_header->num_custom_attributes > TINYEXR_MAX_CUSTOM_ATTRIBUTES) { exr_header->num_custom_attributes = TINYEXR_MAX_CUSTOM_ATTRIBUTES; } exr_header->custom_attributes = static_cast(malloc( sizeof(EXRAttribute) * size_t(exr_header->num_custom_attributes))); for (size_t i = 0; i < info.attributes.size(); i++) { memcpy(exr_header->custom_attributes[i].name, info.attributes[i].name, 256); memcpy(exr_header->custom_attributes[i].type, info.attributes[i].type, 256); exr_header->custom_attributes[i].size = info.attributes[i].size; // Just copy poiner exr_header->custom_attributes[i].value = info.attributes[i].value; } } else { exr_header->custom_attributes = NULL; } exr_header->header_len = info.header_len; } static int DecodeChunk(EXRImage *exr_image, const EXRHeader *exr_header, const std::vector &offsets, const unsigned char *head, const size_t size, std::string *err) { int num_channels = exr_header->num_channels; int num_scanline_blocks = 1; if (exr_header->compression_type == TINYEXR_COMPRESSIONTYPE_ZIP) { num_scanline_blocks = 16; } else if (exr_header->compression_type == TINYEXR_COMPRESSIONTYPE_PIZ) { num_scanline_blocks = 32; } else if (exr_header->compression_type == TINYEXR_COMPRESSIONTYPE_ZFP) { num_scanline_blocks = 16; } int data_width = exr_header->data_window[2] - exr_header->data_window[0] + 1; int data_height = exr_header->data_window[3] - exr_header->data_window[1] + 1; if ((data_width < 0) || (data_height < 0)) { if (err) { std::stringstream ss; ss << "Invalid data width or data height: " << data_width << ", " << data_height << std::endl; (*err) += ss.str(); } return TINYEXR_ERROR_INVALID_DATA; } // Do not allow too large data_width and data_height. header invalid? { const int threshold = 1024 * 8192; // heuristics if ((data_width > threshold) || (data_height > threshold)) { if (err) { std::stringstream ss; ss << "data_with or data_height too large. data_width: " << data_width << ", " << "data_height = " << data_height << std::endl; (*err) += ss.str(); } return TINYEXR_ERROR_INVALID_DATA; } } size_t num_blocks = offsets.size(); std::vector channel_offset_list; int pixel_data_size = 0; size_t channel_offset = 0; if (!tinyexr::ComputeChannelLayout(&channel_offset_list, &pixel_data_size, &channel_offset, num_channels, exr_header->channels)) { if (err) { (*err) += "Failed to compute channel layout.\n"; } return TINYEXR_ERROR_INVALID_DATA; } bool invalid_data = false; // TODO(LTE): Use atomic lock for MT safety. if (exr_header->tiled) { // value check if (exr_header->tile_size_x < 0) { if (err) { std::stringstream ss; ss << "Invalid tile size x : " << exr_header->tile_size_x << "\n"; (*err) += ss.str(); } return TINYEXR_ERROR_INVALID_HEADER; } if (exr_header->tile_size_y < 0) { if (err) { std::stringstream ss; ss << "Invalid tile size y : " << exr_header->tile_size_y << "\n"; (*err) += ss.str(); } return TINYEXR_ERROR_INVALID_HEADER; } size_t num_tiles = offsets.size(); // = # of blocks exr_image->tiles = static_cast( calloc(sizeof(EXRTile), static_cast(num_tiles))); for (size_t tile_idx = 0; tile_idx < num_tiles; tile_idx++) { // Allocate memory for each tile. exr_image->tiles[tile_idx].images = tinyexr::AllocateImage( num_channels, exr_header->channels, exr_header->requested_pixel_types, exr_header->tile_size_x, exr_header->tile_size_y); // 16 byte: tile coordinates // 4 byte : data size // ~ : data(uncompressed or compressed) if (offsets[tile_idx] + sizeof(int) * 5 > size) { if (err) { (*err) += "Insufficient data size.\n"; } return TINYEXR_ERROR_INVALID_DATA; } size_t data_size = size_t(size - (offsets[tile_idx] + sizeof(int) * 5)); const unsigned char *data_ptr = reinterpret_cast(head + offsets[tile_idx]); int tile_coordinates[4]; memcpy(tile_coordinates, data_ptr, sizeof(int) * 4); tinyexr::swap4(reinterpret_cast(&tile_coordinates[0])); tinyexr::swap4(reinterpret_cast(&tile_coordinates[1])); tinyexr::swap4(reinterpret_cast(&tile_coordinates[2])); tinyexr::swap4(reinterpret_cast(&tile_coordinates[3])); // @todo{ LoD } if (tile_coordinates[2] != 0) { return TINYEXR_ERROR_UNSUPPORTED_FEATURE; } if (tile_coordinates[3] != 0) { return TINYEXR_ERROR_UNSUPPORTED_FEATURE; } int data_len; memcpy(&data_len, data_ptr + 16, sizeof(int)); // 16 = sizeof(tile_coordinates) tinyexr::swap4(reinterpret_cast(&data_len)); if (data_len < 4 || size_t(data_len) > data_size) { if (err) { (*err) += "Insufficient data length.\n"; } return TINYEXR_ERROR_INVALID_DATA; } // Move to data addr: 20 = 16 + 4; data_ptr += 20; tinyexr::DecodeTiledPixelData( exr_image->tiles[tile_idx].images, &(exr_image->tiles[tile_idx].width), &(exr_image->tiles[tile_idx].height), exr_header->requested_pixel_types, data_ptr, static_cast(data_len), exr_header->compression_type, exr_header->line_order, data_width, data_height, tile_coordinates[0], tile_coordinates[1], exr_header->tile_size_x, exr_header->tile_size_y, static_cast(pixel_data_size), static_cast(exr_header->num_custom_attributes), exr_header->custom_attributes, static_cast(exr_header->num_channels), exr_header->channels, channel_offset_list); exr_image->tiles[tile_idx].offset_x = tile_coordinates[0]; exr_image->tiles[tile_idx].offset_y = tile_coordinates[1]; exr_image->tiles[tile_idx].level_x = tile_coordinates[2]; exr_image->tiles[tile_idx].level_y = tile_coordinates[3]; exr_image->num_tiles = static_cast(num_tiles); } } else { // scanline format // Don't allow too large image(256GB * pixel_data_size or more). Workaround // for #104. size_t total_data_len = size_t(data_width) * size_t(data_height) * size_t(num_channels); if ((total_data_len == 0) || (total_data_len >= 0x4000000000)) { if (err) { std::stringstream ss; ss << "Image data size is zero or too large: width = " << data_width << ", height = " << data_height << ", channels = " << num_channels << std::endl; (*err) += ss.str(); } return TINYEXR_ERROR_INVALID_DATA; } exr_image->images = tinyexr::AllocateImage( num_channels, exr_header->channels, exr_header->requested_pixel_types, data_width, data_height); #ifdef _OPENMP #pragma omp parallel for #endif for (int y = 0; y < static_cast(num_blocks); y++) { size_t y_idx = static_cast(y); if (offsets[y_idx] + sizeof(int) * 2 > size) { invalid_data = true; } else { // 4 byte: scan line // 4 byte: data size // ~ : pixel data(uncompressed or compressed) size_t data_size = size_t(size - (offsets[y_idx] + sizeof(int) * 2)); const unsigned char *data_ptr = reinterpret_cast(head + offsets[y_idx]); int line_no; memcpy(&line_no, data_ptr, sizeof(int)); int data_len; memcpy(&data_len, data_ptr + 4, sizeof(int)); tinyexr::swap4(reinterpret_cast(&line_no)); tinyexr::swap4(reinterpret_cast(&data_len)); if (size_t(data_len) > data_size) { invalid_data = true; } else if (data_len == 0) { // TODO(syoyo): May be ok to raise the threshold for example `data_len // < 4` invalid_data = true; } else { // line_no may be negative. int end_line_no = (std::min)(line_no + num_scanline_blocks, (exr_header->data_window[3] + 1)); int num_lines = end_line_no - line_no; if (num_lines <= 0) { invalid_data = true; } else { // Move to data addr: 8 = 4 + 4; data_ptr += 8; // Adjust line_no with data_window.bmin.y // overflow check tinyexr_int64 lno = static_cast(line_no) - static_cast(exr_header->data_window[1]); if (lno > std::numeric_limits::max()) { line_no = -1; // invalid } else if (lno < -std::numeric_limits::max()) { line_no = -1; // invalid } else { line_no -= exr_header->data_window[1]; } if (line_no < 0) { invalid_data = true; } else { if (!tinyexr::DecodePixelData( exr_image->images, exr_header->requested_pixel_types, data_ptr, static_cast(data_len), exr_header->compression_type, exr_header->line_order, data_width, data_height, data_width, y, line_no, num_lines, static_cast(pixel_data_size), static_cast(exr_header->num_custom_attributes), exr_header->custom_attributes, static_cast(exr_header->num_channels), exr_header->channels, channel_offset_list)) { invalid_data = true; } } } } } } // omp parallel } if (invalid_data) { if (err) { std::stringstream ss; (*err) += "Invalid data found when decoding pixels.\n"; } return TINYEXR_ERROR_INVALID_DATA; } // Overwrite `pixel_type` with `requested_pixel_type`. { for (int c = 0; c < exr_header->num_channels; c++) { exr_header->pixel_types[c] = exr_header->requested_pixel_types[c]; } } { exr_image->num_channels = num_channels; exr_image->width = data_width; exr_image->height = data_height; } return TINYEXR_SUCCESS; } static bool ReconstructLineOffsets( std::vector *offsets, size_t n, const unsigned char *head, const unsigned char *marker, const size_t size) { assert(head < marker); assert(offsets->size() == n); for (size_t i = 0; i < n; i++) { size_t offset = static_cast(marker - head); // Offset should not exceed whole EXR file/data size. if ((offset + sizeof(tinyexr::tinyexr_uint64)) >= size) { return false; } int y; unsigned int data_len; memcpy(&y, marker, sizeof(int)); memcpy(&data_len, marker + 4, sizeof(unsigned int)); if (data_len >= size) { return false; } tinyexr::swap4(reinterpret_cast(&y)); tinyexr::swap4(reinterpret_cast(&data_len)); (*offsets)[i] = offset; marker += data_len + 8; // 8 = 4 bytes(y) + 4 bytes(data_len) } return true; } static int DecodeEXRImage(EXRImage *exr_image, const EXRHeader *exr_header, const unsigned char *head, const unsigned char *marker, const size_t size, const char **err) { if (exr_image == NULL || exr_header == NULL || head == NULL || marker == NULL || (size <= tinyexr::kEXRVersionSize)) { tinyexr::SetErrorMessage("Invalid argument for DecodeEXRImage().", err); return TINYEXR_ERROR_INVALID_ARGUMENT; } int num_scanline_blocks = 1; if (exr_header->compression_type == TINYEXR_COMPRESSIONTYPE_ZIP) { num_scanline_blocks = 16; } else if (exr_header->compression_type == TINYEXR_COMPRESSIONTYPE_PIZ) { num_scanline_blocks = 32; } else if (exr_header->compression_type == TINYEXR_COMPRESSIONTYPE_ZFP) { num_scanline_blocks = 16; } int data_width = exr_header->data_window[2] - exr_header->data_window[0]; if (data_width >= std::numeric_limits::max()) { // Issue 63 tinyexr::SetErrorMessage("Invalid data width value", err); return TINYEXR_ERROR_INVALID_DATA; } data_width++; int data_height = exr_header->data_window[3] - exr_header->data_window[1]; if (data_height >= std::numeric_limits::max()) { tinyexr::SetErrorMessage("Invalid data height value", err); return TINYEXR_ERROR_INVALID_DATA; } data_height++; if ((data_width < 0) || (data_height < 0)) { tinyexr::SetErrorMessage("data width or data height is negative.", err); return TINYEXR_ERROR_INVALID_DATA; } // Do not allow too large data_width and data_height. header invalid? { const int threshold = 1024 * 8192; // heuristics if (data_width > threshold) { tinyexr::SetErrorMessage("data width too large.", err); return TINYEXR_ERROR_INVALID_DATA; } if (data_height > threshold) { tinyexr::SetErrorMessage("data height too large.", err); return TINYEXR_ERROR_INVALID_DATA; } } // Read offset tables. size_t num_blocks = 0; if (exr_header->chunk_count > 0) { // Use `chunkCount` attribute. num_blocks = static_cast(exr_header->chunk_count); } else if (exr_header->tiled) { // @todo { LoD } size_t num_x_tiles = static_cast(data_width) / static_cast(exr_header->tile_size_x); if (num_x_tiles * static_cast(exr_header->tile_size_x) < static_cast(data_width)) { num_x_tiles++; } size_t num_y_tiles = static_cast(data_height) / static_cast(exr_header->tile_size_y); if (num_y_tiles * static_cast(exr_header->tile_size_y) < static_cast(data_height)) { num_y_tiles++; } num_blocks = num_x_tiles * num_y_tiles; } else { num_blocks = static_cast(data_height) / static_cast(num_scanline_blocks); if (num_blocks * static_cast(num_scanline_blocks) < static_cast(data_height)) { num_blocks++; } } std::vector offsets(num_blocks); for (size_t y = 0; y < num_blocks; y++) { tinyexr::tinyexr_uint64 offset; // Issue #81 if ((marker + sizeof(tinyexr_uint64)) >= (head + size)) { tinyexr::SetErrorMessage("Insufficient data size in offset table.", err); return TINYEXR_ERROR_INVALID_DATA; } memcpy(&offset, marker, sizeof(tinyexr::tinyexr_uint64)); tinyexr::swap8(&offset); if (offset >= size) { tinyexr::SetErrorMessage("Invalid offset value in DecodeEXRImage.", err); return TINYEXR_ERROR_INVALID_DATA; } marker += sizeof(tinyexr::tinyexr_uint64); // = 8 offsets[y] = offset; } // If line offsets are invalid, we try to reconstruct it. // See OpenEXR/IlmImf/ImfScanLineInputFile.cpp::readLineOffsets() for details. for (size_t y = 0; y < num_blocks; y++) { if (offsets[y] <= 0) { // TODO(syoyo) Report as warning? // if (err) { // stringstream ss; // ss << "Incomplete lineOffsets." << std::endl; // (*err) += ss.str(); //} bool ret = ReconstructLineOffsets(&offsets, num_blocks, head, marker, size); if (ret) { // OK break; } else { tinyexr::SetErrorMessage( "Cannot reconstruct lineOffset table in DecodeEXRImage.", err); return TINYEXR_ERROR_INVALID_DATA; } } } { std::string e; int ret = DecodeChunk(exr_image, exr_header, offsets, head, size, &e); if (ret != TINYEXR_SUCCESS) { if (!e.empty()) { tinyexr::SetErrorMessage(e, err); } // release memory(if exists) if ((exr_header->num_channels > 0) && exr_image && exr_image->images) { for (size_t c = 0; c < size_t(exr_header->num_channels); c++) { if (exr_image->images[c]) { free(exr_image->images[c]); exr_image->images[c] = NULL; } } free(exr_image->images); exr_image->images = NULL; } } return ret; } } } // namespace tinyexr int LoadEXR(float **out_rgba, int *width, int *height, const char *filename, const char **err) { if (out_rgba == NULL) { tinyexr::SetErrorMessage("Invalid argument for LoadEXR()", err); return TINYEXR_ERROR_INVALID_ARGUMENT; } EXRVersion exr_version; EXRImage exr_image; EXRHeader exr_header; InitEXRHeader(&exr_header); InitEXRImage(&exr_image); { int ret = ParseEXRVersionFromFile(&exr_version, filename); if (ret != TINYEXR_SUCCESS) { tinyexr::SetErrorMessage("Invalid EXR header.", err); return ret; } if (exr_version.multipart || exr_version.non_image) { tinyexr::SetErrorMessage( "Loading multipart or DeepImage is not supported in LoadEXR() API", err); return TINYEXR_ERROR_INVALID_DATA; // @fixme. } } { int ret = ParseEXRHeaderFromFile(&exr_header, &exr_version, filename, err); if (ret != TINYEXR_SUCCESS) { FreeEXRHeader(&exr_header); return ret; } } // Read HALF channel as FLOAT. for (int i = 0; i < exr_header.num_channels; i++) { if (exr_header.pixel_types[i] == TINYEXR_PIXELTYPE_HALF) { exr_header.requested_pixel_types[i] = TINYEXR_PIXELTYPE_FLOAT; } } { int ret = LoadEXRImageFromFile(&exr_image, &exr_header, filename, err); if (ret != TINYEXR_SUCCESS) { FreeEXRHeader(&exr_header); return ret; } } // RGBA int idxR = -1; int idxG = -1; int idxB = -1; int idxA = -1; for (int c = 0; c < exr_header.num_channels; c++) { if (strcmp(exr_header.channels[c].name, "R") == 0) { idxR = c; } else if (strcmp(exr_header.channels[c].name, "G") == 0) { idxG = c; } else if (strcmp(exr_header.channels[c].name, "B") == 0) { idxB = c; } else if (strcmp(exr_header.channels[c].name, "A") == 0) { idxA = c; } } if (exr_header.num_channels == 1) { // Grayscale channel only. (*out_rgba) = reinterpret_cast( malloc(4 * sizeof(float) * static_cast(exr_image.width) * static_cast(exr_image.height))); if (exr_header.tiled) { for (int it = 0; it < exr_image.num_tiles; it++) { for (int j = 0; j < exr_header.tile_size_y; j++) { for (int i = 0; i < exr_header.tile_size_x; i++) { const int ii = exr_image.tiles[it].offset_x * exr_header.tile_size_x + i; const int jj = exr_image.tiles[it].offset_y * exr_header.tile_size_y + j; const int idx = ii + jj * exr_image.width; // out of region check. if (ii >= exr_image.width) { continue; } if (jj >= exr_image.height) { continue; } const int srcIdx = i + j * exr_header.tile_size_x; unsigned char **src = exr_image.tiles[it].images; (*out_rgba)[4 * idx + 0] = reinterpret_cast(src)[0][srcIdx]; (*out_rgba)[4 * idx + 1] = reinterpret_cast(src)[0][srcIdx]; (*out_rgba)[4 * idx + 2] = reinterpret_cast(src)[0][srcIdx]; (*out_rgba)[4 * idx + 3] = reinterpret_cast(src)[0][srcIdx]; } } } } else { for (int i = 0; i < exr_image.width * exr_image.height; i++) { const float val = reinterpret_cast(exr_image.images)[0][i]; (*out_rgba)[4 * i + 0] = val; (*out_rgba)[4 * i + 1] = val; (*out_rgba)[4 * i + 2] = val; (*out_rgba)[4 * i + 3] = val; } } } else { // Assume RGB(A) if (idxR == -1) { tinyexr::SetErrorMessage("R channel not found", err); // @todo { free exr_image } FreeEXRHeader(&exr_header); return TINYEXR_ERROR_INVALID_DATA; } if (idxG == -1) { tinyexr::SetErrorMessage("G channel not found", err); // @todo { free exr_image } FreeEXRHeader(&exr_header); return TINYEXR_ERROR_INVALID_DATA; } if (idxB == -1) { tinyexr::SetErrorMessage("B channel not found", err); // @todo { free exr_image } FreeEXRHeader(&exr_header); return TINYEXR_ERROR_INVALID_DATA; } (*out_rgba) = reinterpret_cast( malloc(4 * sizeof(float) * static_cast(exr_image.width) * static_cast(exr_image.height))); if (exr_header.tiled) { for (int it = 0; it < exr_image.num_tiles; it++) { for (int j = 0; j < exr_header.tile_size_y; j++) { for (int i = 0; i < exr_header.tile_size_x; i++) { const int ii = exr_image.tiles[it].offset_x * exr_header.tile_size_x + i; const int jj = exr_image.tiles[it].offset_y * exr_header.tile_size_y + j; const int idx = ii + jj * exr_image.width; // out of region check. if (ii >= exr_image.width) { continue; } if (jj >= exr_image.height) { continue; } const int srcIdx = i + j * exr_header.tile_size_x; unsigned char **src = exr_image.tiles[it].images; (*out_rgba)[4 * idx + 0] = reinterpret_cast(src)[idxR][srcIdx]; (*out_rgba)[4 * idx + 1] = reinterpret_cast(src)[idxG][srcIdx]; (*out_rgba)[4 * idx + 2] = reinterpret_cast(src)[idxB][srcIdx]; if (idxA != -1) { (*out_rgba)[4 * idx + 3] = reinterpret_cast(src)[idxA][srcIdx]; } else { (*out_rgba)[4 * idx + 3] = 1.0; } } } } } else { for (int i = 0; i < exr_image.width * exr_image.height; i++) { (*out_rgba)[4 * i + 0] = reinterpret_cast(exr_image.images)[idxR][i]; (*out_rgba)[4 * i + 1] = reinterpret_cast(exr_image.images)[idxG][i]; (*out_rgba)[4 * i + 2] = reinterpret_cast(exr_image.images)[idxB][i]; if (idxA != -1) { (*out_rgba)[4 * i + 3] = reinterpret_cast(exr_image.images)[idxA][i]; } else { (*out_rgba)[4 * i + 3] = 1.0; } } } } (*width) = exr_image.width; (*height) = exr_image.height; FreeEXRHeader(&exr_header); FreeEXRImage(&exr_image); return TINYEXR_SUCCESS; } int IsEXR(const char *filename) { EXRVersion exr_version; int ret = ParseEXRVersionFromFile(&exr_version, filename); if (ret != TINYEXR_SUCCESS) { return TINYEXR_ERROR_INVALID_HEADER; } return TINYEXR_SUCCESS; } int ParseEXRHeaderFromMemory(EXRHeader *exr_header, const EXRVersion *version, const unsigned char *memory, size_t size, const char **err) { if (memory == NULL || exr_header == NULL) { tinyexr::SetErrorMessage( "Invalid argument. `memory` or `exr_header` argument is null in " "ParseEXRHeaderFromMemory()", err); // Invalid argument return TINYEXR_ERROR_INVALID_ARGUMENT; } if (size < tinyexr::kEXRVersionSize) { tinyexr::SetErrorMessage("Insufficient header/data size.\n", err); return TINYEXR_ERROR_INVALID_DATA; } const unsigned char *marker = memory + tinyexr::kEXRVersionSize; size_t marker_size = size - tinyexr::kEXRVersionSize; tinyexr::HeaderInfo info; info.clear(); std::string err_str; int ret = ParseEXRHeader(&info, NULL, version, &err_str, marker, marker_size); if (ret != TINYEXR_SUCCESS) { if (err && !err_str.empty()) { tinyexr::SetErrorMessage(err_str, err); } } ConvertHeader(exr_header, info); // transfoer `tiled` from version. exr_header->tiled = version->tiled; return ret; } int LoadEXRFromMemory(float **out_rgba, int *width, int *height, const unsigned char *memory, size_t size, const char **err) { if (out_rgba == NULL || memory == NULL) { tinyexr::SetErrorMessage("Invalid argument for LoadEXRFromMemory", err); return TINYEXR_ERROR_INVALID_ARGUMENT; } EXRVersion exr_version; EXRImage exr_image; EXRHeader exr_header; InitEXRHeader(&exr_header); int ret = ParseEXRVersionFromMemory(&exr_version, memory, size); if (ret != TINYEXR_SUCCESS) { tinyexr::SetErrorMessage("Failed to parse EXR version", err); return ret; } ret = ParseEXRHeaderFromMemory(&exr_header, &exr_version, memory, size, err); if (ret != TINYEXR_SUCCESS) { return ret; } // Read HALF channel as FLOAT. for (int i = 0; i < exr_header.num_channels; i++) { if (exr_header.pixel_types[i] == TINYEXR_PIXELTYPE_HALF) { exr_header.requested_pixel_types[i] = TINYEXR_PIXELTYPE_FLOAT; } } InitEXRImage(&exr_image); ret = LoadEXRImageFromMemory(&exr_image, &exr_header, memory, size, err); if (ret != TINYEXR_SUCCESS) { return ret; } // RGBA int idxR = -1; int idxG = -1; int idxB = -1; int idxA = -1; for (int c = 0; c < exr_header.num_channels; c++) { if (strcmp(exr_header.channels[c].name, "R") == 0) { idxR = c; } else if (strcmp(exr_header.channels[c].name, "G") == 0) { idxG = c; } else if (strcmp(exr_header.channels[c].name, "B") == 0) { idxB = c; } else if (strcmp(exr_header.channels[c].name, "A") == 0) { idxA = c; } } // TODO(syoyo): Refactor removing same code as used in LoadEXR(). if (exr_header.num_channels == 1) { // Grayscale channel only. (*out_rgba) = reinterpret_cast( malloc(4 * sizeof(float) * static_cast(exr_image.width) * static_cast(exr_image.height))); if (exr_header.tiled) { for (int it = 0; it < exr_image.num_tiles; it++) { for (int j = 0; j < exr_header.tile_size_y; j++) { for (int i = 0; i < exr_header.tile_size_x; i++) { const int ii = exr_image.tiles[it].offset_x * exr_header.tile_size_x + i; const int jj = exr_image.tiles[it].offset_y * exr_header.tile_size_y + j; const int idx = ii + jj * exr_image.width; // out of region check. if (ii >= exr_image.width) { continue; } if (jj >= exr_image.height) { continue; } const int srcIdx = i + j * exr_header.tile_size_x; unsigned char **src = exr_image.tiles[it].images; (*out_rgba)[4 * idx + 0] = reinterpret_cast(src)[0][srcIdx]; (*out_rgba)[4 * idx + 1] = reinterpret_cast(src)[0][srcIdx]; (*out_rgba)[4 * idx + 2] = reinterpret_cast(src)[0][srcIdx]; (*out_rgba)[4 * idx + 3] = reinterpret_cast(src)[0][srcIdx]; } } } } else { for (int i = 0; i < exr_image.width * exr_image.height; i++) { const float val = reinterpret_cast(exr_image.images)[0][i]; (*out_rgba)[4 * i + 0] = val; (*out_rgba)[4 * i + 1] = val; (*out_rgba)[4 * i + 2] = val; (*out_rgba)[4 * i + 3] = val; } } } else { // TODO(syoyo): Support non RGBA image. if (idxR == -1) { tinyexr::SetErrorMessage("R channel not found", err); // @todo { free exr_image } return TINYEXR_ERROR_INVALID_DATA; } if (idxG == -1) { tinyexr::SetErrorMessage("G channel not found", err); // @todo { free exr_image } return TINYEXR_ERROR_INVALID_DATA; } if (idxB == -1) { tinyexr::SetErrorMessage("B channel not found", err); // @todo { free exr_image } return TINYEXR_ERROR_INVALID_DATA; } (*out_rgba) = reinterpret_cast( malloc(4 * sizeof(float) * static_cast(exr_image.width) * static_cast(exr_image.height))); if (exr_header.tiled) { for (int it = 0; it < exr_image.num_tiles; it++) { for (int j = 0; j < exr_header.tile_size_y; j++) for (int i = 0; i < exr_header.tile_size_x; i++) { const int ii = exr_image.tiles[it].offset_x * exr_header.tile_size_x + i; const int jj = exr_image.tiles[it].offset_y * exr_header.tile_size_y + j; const int idx = ii + jj * exr_image.width; // out of region check. if (ii >= exr_image.width) { continue; } if (jj >= exr_image.height) { continue; } const int srcIdx = i + j * exr_header.tile_size_x; unsigned char **src = exr_image.tiles[it].images; (*out_rgba)[4 * idx + 0] = reinterpret_cast(src)[idxR][srcIdx]; (*out_rgba)[4 * idx + 1] = reinterpret_cast(src)[idxG][srcIdx]; (*out_rgba)[4 * idx + 2] = reinterpret_cast(src)[idxB][srcIdx]; if (idxA != -1) { (*out_rgba)[4 * idx + 3] = reinterpret_cast(src)[idxA][srcIdx]; } else { (*out_rgba)[4 * idx + 3] = 1.0; } } } } else { for (int i = 0; i < exr_image.width * exr_image.height; i++) { (*out_rgba)[4 * i + 0] = reinterpret_cast(exr_image.images)[idxR][i]; (*out_rgba)[4 * i + 1] = reinterpret_cast(exr_image.images)[idxG][i]; (*out_rgba)[4 * i + 2] = reinterpret_cast(exr_image.images)[idxB][i]; if (idxA != -1) { (*out_rgba)[4 * i + 3] = reinterpret_cast(exr_image.images)[idxA][i]; } else { (*out_rgba)[4 * i + 3] = 1.0; } } } } (*width) = exr_image.width; (*height) = exr_image.height; FreeEXRHeader(&exr_header); FreeEXRImage(&exr_image); return TINYEXR_SUCCESS; } int LoadEXRImageFromFile(EXRImage *exr_image, const EXRHeader *exr_header, const char *filename, const char **err) { if (exr_image == NULL) { tinyexr::SetErrorMessage("Invalid argument for LoadEXRImageFromFile", err); return TINYEXR_ERROR_INVALID_ARGUMENT; } #ifdef _WIN32 FILE *fp = NULL; fopen_s(&fp, filename, "rb"); #else FILE *fp = fopen(filename, "rb"); #endif if (!fp) { tinyexr::SetErrorMessage("Cannot read file " + std::string(filename), err); return TINYEXR_ERROR_CANT_OPEN_FILE; } size_t filesize; // Compute size fseek(fp, 0, SEEK_END); filesize = static_cast(ftell(fp)); fseek(fp, 0, SEEK_SET); if (filesize < 16) { tinyexr::SetErrorMessage("File size too short " + std::string(filename), err); return TINYEXR_ERROR_INVALID_FILE; } std::vector buf(filesize); // @todo { use mmap } { size_t ret; ret = fread(&buf[0], 1, filesize, fp); assert(ret == filesize); fclose(fp); (void)ret; } return LoadEXRImageFromMemory(exr_image, exr_header, &buf.at(0), filesize, err); } int LoadEXRImageFromMemory(EXRImage *exr_image, const EXRHeader *exr_header, const unsigned char *memory, const size_t size, const char **err) { if (exr_image == NULL || memory == NULL || (size < tinyexr::kEXRVersionSize)) { tinyexr::SetErrorMessage("Invalid argument for LoadEXRImageFromMemory", err); return TINYEXR_ERROR_INVALID_ARGUMENT; } if (exr_header->header_len == 0) { tinyexr::SetErrorMessage("EXRHeader variable is not initialized.", err); return TINYEXR_ERROR_INVALID_ARGUMENT; } const unsigned char *head = memory; const unsigned char *marker = reinterpret_cast( memory + exr_header->header_len + 8); // +8 for magic number + version header. return tinyexr::DecodeEXRImage(exr_image, exr_header, head, marker, size, err); } size_t SaveEXRImageToMemory(const EXRImage *exr_image, const EXRHeader *exr_header, unsigned char **memory_out, const char **err) { if (exr_image == NULL || memory_out == NULL || exr_header->compression_type < 0) { tinyexr::SetErrorMessage("Invalid argument for SaveEXRImageToMemory", err); return 0; } #if !TINYEXR_USE_PIZ if (exr_header->compression_type == TINYEXR_COMPRESSIONTYPE_PIZ) { tinyexr::SetErrorMessage("PIZ compression is not supported in this build", err); return 0; } #endif #if !TINYEXR_USE_ZFP if (exr_header->compression_type == TINYEXR_COMPRESSIONTYPE_ZFP) { tinyexr::SetErrorMessage("ZFP compression is not supported in this build", err); return 0; } #endif #if TINYEXR_USE_ZFP for (size_t i = 0; i < static_cast(exr_header->num_channels); i++) { if (exr_header->requested_pixel_types[i] != TINYEXR_PIXELTYPE_FLOAT) { tinyexr::SetErrorMessage("Pixel type must be FLOAT for ZFP compression", err); return 0; } } #endif std::vector memory; // Header { const char header[] = {0x76, 0x2f, 0x31, 0x01}; memory.insert(memory.end(), header, header + 4); } // Version, scanline. { char marker[] = {2, 0, 0, 0}; /* @todo if (exr_header->tiled) { marker[1] |= 0x2; } if (exr_header->long_name) { marker[1] |= 0x4; } if (exr_header->non_image) { marker[1] |= 0x8; } if (exr_header->multipart) { marker[1] |= 0x10; } */ memory.insert(memory.end(), marker, marker + 4); } int num_scanlines = 1; if (exr_header->compression_type == TINYEXR_COMPRESSIONTYPE_ZIP) { num_scanlines = 16; } else if (exr_header->compression_type == TINYEXR_COMPRESSIONTYPE_PIZ) { num_scanlines = 32; } else if (exr_header->compression_type == TINYEXR_COMPRESSIONTYPE_ZFP) { num_scanlines = 16; } // Write attributes. std::vector channels; { std::vector data; for (int c = 0; c < exr_header->num_channels; c++) { tinyexr::ChannelInfo info; info.p_linear = 0; info.pixel_type = exr_header->requested_pixel_types[c]; info.x_sampling = 1; info.y_sampling = 1; info.name = std::string(exr_header->channels[c].name); channels.push_back(info); } tinyexr::WriteChannelInfo(data, channels); tinyexr::WriteAttributeToMemory(&memory, "channels", "chlist", &data.at(0), static_cast(data.size())); } { int comp = exr_header->compression_type; tinyexr::swap4(reinterpret_cast(&comp)); tinyexr::WriteAttributeToMemory( &memory, "compression", "compression", reinterpret_cast(&comp), 1); } { int data[4] = {0, 0, exr_image->width - 1, exr_image->height - 1}; tinyexr::swap4(reinterpret_cast(&data[0])); tinyexr::swap4(reinterpret_cast(&data[1])); tinyexr::swap4(reinterpret_cast(&data[2])); tinyexr::swap4(reinterpret_cast(&data[3])); tinyexr::WriteAttributeToMemory( &memory, "dataWindow", "box2i", reinterpret_cast(data), sizeof(int) * 4); tinyexr::WriteAttributeToMemory( &memory, "displayWindow", "box2i", reinterpret_cast(data), sizeof(int) * 4); } { unsigned char line_order = 0; // @fixme { read line_order from EXRHeader } tinyexr::WriteAttributeToMemory(&memory, "lineOrder", "lineOrder", &line_order, 1); } { float aspectRatio = 1.0f; tinyexr::swap4(reinterpret_cast(&aspectRatio)); tinyexr::WriteAttributeToMemory( &memory, "pixelAspectRatio", "float", reinterpret_cast(&aspectRatio), sizeof(float)); } { float center[2] = {0.0f, 0.0f}; tinyexr::swap4(reinterpret_cast(¢er[0])); tinyexr::swap4(reinterpret_cast(¢er[1])); tinyexr::WriteAttributeToMemory( &memory, "screenWindowCenter", "v2f", reinterpret_cast(center), 2 * sizeof(float)); } { float w = static_cast(exr_image->width); tinyexr::swap4(reinterpret_cast(&w)); tinyexr::WriteAttributeToMemory(&memory, "screenWindowWidth", "float", reinterpret_cast(&w), sizeof(float)); } // Custom attributes if (exr_header->num_custom_attributes > 0) { for (int i = 0; i < exr_header->num_custom_attributes; i++) { tinyexr::WriteAttributeToMemory( &memory, exr_header->custom_attributes[i].name, exr_header->custom_attributes[i].type, reinterpret_cast( exr_header->custom_attributes[i].value), exr_header->custom_attributes[i].size); } } { // end of header unsigned char e = 0; memory.push_back(e); } int num_blocks = exr_image->height / num_scanlines; if (num_blocks * num_scanlines < exr_image->height) { num_blocks++; } std::vector offsets(static_cast(num_blocks)); size_t headerSize = memory.size(); tinyexr::tinyexr_uint64 offset = headerSize + static_cast(num_blocks) * sizeof( tinyexr::tinyexr_int64); // sizeof(header) + sizeof(offsetTable) std::vector > data_list( static_cast(num_blocks)); std::vector channel_offset_list( static_cast(exr_header->num_channels)); int pixel_data_size = 0; size_t channel_offset = 0; for (size_t c = 0; c < static_cast(exr_header->num_channels); c++) { channel_offset_list[c] = channel_offset; if (exr_header->requested_pixel_types[c] == TINYEXR_PIXELTYPE_HALF) { pixel_data_size += sizeof(unsigned short); channel_offset += sizeof(unsigned short); } else if (exr_header->requested_pixel_types[c] == TINYEXR_PIXELTYPE_FLOAT) { pixel_data_size += sizeof(float); channel_offset += sizeof(float); } else if (exr_header->requested_pixel_types[c] == TINYEXR_PIXELTYPE_UINT) { pixel_data_size += sizeof(unsigned int); channel_offset += sizeof(unsigned int); } else { assert(0); } } #if TINYEXR_USE_ZFP tinyexr::ZFPCompressionParam zfp_compression_param; // Use ZFP compression parameter from custom attributes(if such a parameter // exists) { bool ret = tinyexr::FindZFPCompressionParam( &zfp_compression_param, exr_header->custom_attributes, exr_header->num_custom_attributes); if (!ret) { // Use predefined compression parameter. zfp_compression_param.type = 0; zfp_compression_param.rate = 2; } } #endif // Use signed int since some OpenMP compiler doesn't allow unsigned type for // `parallel for` #ifdef _OPENMP #pragma omp parallel for #endif for (int i = 0; i < num_blocks; i++) { size_t ii = static_cast(i); int start_y = num_scanlines * i; int endY = (std::min)(num_scanlines * (i + 1), exr_image->height); int h = endY - start_y; std::vector buf( static_cast(exr_image->width * h * pixel_data_size)); for (size_t c = 0; c < static_cast(exr_header->num_channels); c++) { if (exr_header->pixel_types[c] == TINYEXR_PIXELTYPE_HALF) { if (exr_header->requested_pixel_types[c] == TINYEXR_PIXELTYPE_FLOAT) { for (int y = 0; y < h; y++) { // Assume increasing Y float *line_ptr = reinterpret_cast(&buf.at( static_cast(pixel_data_size * y * exr_image->width) + channel_offset_list[c] * static_cast(exr_image->width))); for (int x = 0; x < exr_image->width; x++) { tinyexr::FP16 h16; h16.u = reinterpret_cast( exr_image->images)[c][(y + start_y) * exr_image->width + x]; tinyexr::FP32 f32 = half_to_float(h16); tinyexr::swap4(reinterpret_cast(&f32.f)); // line_ptr[x] = f32.f; tinyexr::cpy4(line_ptr + x, &(f32.f)); } } } else if (exr_header->requested_pixel_types[c] == TINYEXR_PIXELTYPE_HALF) { for (int y = 0; y < h; y++) { // Assume increasing Y unsigned short *line_ptr = reinterpret_cast( &buf.at(static_cast(pixel_data_size * y * exr_image->width) + channel_offset_list[c] * static_cast(exr_image->width))); for (int x = 0; x < exr_image->width; x++) { unsigned short val = reinterpret_cast( exr_image->images)[c][(y + start_y) * exr_image->width + x]; tinyexr::swap2(&val); // line_ptr[x] = val; tinyexr::cpy2(line_ptr + x, &val); } } } else { assert(0); } } else if (exr_header->pixel_types[c] == TINYEXR_PIXELTYPE_FLOAT) { if (exr_header->requested_pixel_types[c] == TINYEXR_PIXELTYPE_HALF) { for (int y = 0; y < h; y++) { // Assume increasing Y unsigned short *line_ptr = reinterpret_cast( &buf.at(static_cast(pixel_data_size * y * exr_image->width) + channel_offset_list[c] * static_cast(exr_image->width))); for (int x = 0; x < exr_image->width; x++) { tinyexr::FP32 f32; f32.f = reinterpret_cast( exr_image->images)[c][(y + start_y) * exr_image->width + x]; tinyexr::FP16 h16; h16 = float_to_half_full(f32); tinyexr::swap2(reinterpret_cast(&h16.u)); // line_ptr[x] = h16.u; tinyexr::cpy2(line_ptr + x, &(h16.u)); } } } else if (exr_header->requested_pixel_types[c] == TINYEXR_PIXELTYPE_FLOAT) { for (int y = 0; y < h; y++) { // Assume increasing Y float *line_ptr = reinterpret_cast(&buf.at( static_cast(pixel_data_size * y * exr_image->width) + channel_offset_list[c] * static_cast(exr_image->width))); for (int x = 0; x < exr_image->width; x++) { float val = reinterpret_cast( exr_image->images)[c][(y + start_y) * exr_image->width + x]; tinyexr::swap4(reinterpret_cast(&val)); // line_ptr[x] = val; tinyexr::cpy4(line_ptr + x, &val); } } } else { assert(0); } } else if (exr_header->pixel_types[c] == TINYEXR_PIXELTYPE_UINT) { for (int y = 0; y < h; y++) { // Assume increasing Y unsigned int *line_ptr = reinterpret_cast(&buf.at( static_cast(pixel_data_size * y * exr_image->width) + channel_offset_list[c] * static_cast(exr_image->width))); for (int x = 0; x < exr_image->width; x++) { unsigned int val = reinterpret_cast( exr_image->images)[c][(y + start_y) * exr_image->width + x]; tinyexr::swap4(&val); // line_ptr[x] = val; tinyexr::cpy4(line_ptr + x, &val); } } } } if (exr_header->compression_type == TINYEXR_COMPRESSIONTYPE_NONE) { // 4 byte: scan line // 4 byte: data size // ~ : pixel data(uncompressed) std::vector header(8); unsigned int data_len = static_cast(buf.size()); memcpy(&header.at(0), &start_y, sizeof(int)); memcpy(&header.at(4), &data_len, sizeof(unsigned int)); tinyexr::swap4(reinterpret_cast(&header.at(0))); tinyexr::swap4(reinterpret_cast(&header.at(4))); data_list[ii].insert(data_list[ii].end(), header.begin(), header.end()); data_list[ii].insert(data_list[ii].end(), buf.begin(), buf.begin() + data_len); } else if ((exr_header->compression_type == TINYEXR_COMPRESSIONTYPE_ZIPS) || (exr_header->compression_type == TINYEXR_COMPRESSIONTYPE_ZIP)) { #if TINYEXR_USE_MINIZ std::vector block(tinyexr::miniz::mz_compressBound( static_cast(buf.size()))); #else std::vector block( compressBound(static_cast(buf.size()))); #endif tinyexr::tinyexr_uint64 outSize = block.size(); tinyexr::CompressZip(&block.at(0), outSize, reinterpret_cast(&buf.at(0)), static_cast(buf.size())); // 4 byte: scan line // 4 byte: data size // ~ : pixel data(compressed) std::vector header(8); unsigned int data_len = static_cast(outSize); // truncate memcpy(&header.at(0), &start_y, sizeof(int)); memcpy(&header.at(4), &data_len, sizeof(unsigned int)); tinyexr::swap4(reinterpret_cast(&header.at(0))); tinyexr::swap4(reinterpret_cast(&header.at(4))); data_list[ii].insert(data_list[ii].end(), header.begin(), header.end()); data_list[ii].insert(data_list[ii].end(), block.begin(), block.begin() + data_len); } else if (exr_header->compression_type == TINYEXR_COMPRESSIONTYPE_RLE) { // (buf.size() * 3) / 2 would be enough. std::vector block((buf.size() * 3) / 2); tinyexr::tinyexr_uint64 outSize = block.size(); tinyexr::CompressRle(&block.at(0), outSize, reinterpret_cast(&buf.at(0)), static_cast(buf.size())); // 4 byte: scan line // 4 byte: data size // ~ : pixel data(compressed) std::vector header(8); unsigned int data_len = static_cast(outSize); // truncate memcpy(&header.at(0), &start_y, sizeof(int)); memcpy(&header.at(4), &data_len, sizeof(unsigned int)); tinyexr::swap4(reinterpret_cast(&header.at(0))); tinyexr::swap4(reinterpret_cast(&header.at(4))); data_list[ii].insert(data_list[ii].end(), header.begin(), header.end()); data_list[ii].insert(data_list[ii].end(), block.begin(), block.begin() + data_len); } else if (exr_header->compression_type == TINYEXR_COMPRESSIONTYPE_PIZ) { #if TINYEXR_USE_PIZ unsigned int bufLen = 8192 + static_cast( 2 * static_cast( buf.size())); // @fixme { compute good bound. } std::vector block(bufLen); unsigned int outSize = static_cast(block.size()); CompressPiz(&block.at(0), &outSize, reinterpret_cast(&buf.at(0)), buf.size(), channels, exr_image->width, h); // 4 byte: scan line // 4 byte: data size // ~ : pixel data(compressed) std::vector header(8); unsigned int data_len = outSize; memcpy(&header.at(0), &start_y, sizeof(int)); memcpy(&header.at(4), &data_len, sizeof(unsigned int)); tinyexr::swap4(reinterpret_cast(&header.at(0))); tinyexr::swap4(reinterpret_cast(&header.at(4))); data_list[ii].insert(data_list[ii].end(), header.begin(), header.end()); data_list[ii].insert(data_list[ii].end(), block.begin(), block.begin() + data_len); #else assert(0); #endif } else if (exr_header->compression_type == TINYEXR_COMPRESSIONTYPE_ZFP) { #if TINYEXR_USE_ZFP std::vector block; unsigned int outSize; tinyexr::CompressZfp( &block, &outSize, reinterpret_cast(&buf.at(0)), exr_image->width, h, exr_header->num_channels, zfp_compression_param); // 4 byte: scan line // 4 byte: data size // ~ : pixel data(compressed) std::vector header(8); unsigned int data_len = outSize; memcpy(&header.at(0), &start_y, sizeof(int)); memcpy(&header.at(4), &data_len, sizeof(unsigned int)); tinyexr::swap4(reinterpret_cast(&header.at(0))); tinyexr::swap4(reinterpret_cast(&header.at(4))); data_list[ii].insert(data_list[ii].end(), header.begin(), header.end()); data_list[ii].insert(data_list[ii].end(), block.begin(), block.begin() + data_len); #else assert(0); #endif } else { assert(0); } } // omp parallel for (size_t i = 0; i < static_cast(num_blocks); i++) { offsets[i] = offset; tinyexr::swap8(reinterpret_cast(&offsets[i])); offset += data_list[i].size(); } size_t totalSize = static_cast(offset); { memory.insert( memory.end(), reinterpret_cast(&offsets.at(0)), reinterpret_cast(&offsets.at(0)) + sizeof(tinyexr::tinyexr_uint64) * static_cast(num_blocks)); } if (memory.size() == 0) { tinyexr::SetErrorMessage("Output memory size is zero", err); return 0; } (*memory_out) = static_cast(malloc(totalSize)); memcpy((*memory_out), &memory.at(0), memory.size()); unsigned char *memory_ptr = *memory_out + memory.size(); for (size_t i = 0; i < static_cast(num_blocks); i++) { memcpy(memory_ptr, &data_list[i].at(0), data_list[i].size()); memory_ptr += data_list[i].size(); } return totalSize; // OK } int SaveEXRImageToFile(const EXRImage *exr_image, const EXRHeader *exr_header, const char *filename, const char **err) { if (exr_image == NULL || filename == NULL || exr_header->compression_type < 0) { tinyexr::SetErrorMessage("Invalid argument for SaveEXRImageToFile", err); return TINYEXR_ERROR_INVALID_ARGUMENT; } #if !TINYEXR_USE_PIZ if (exr_header->compression_type == TINYEXR_COMPRESSIONTYPE_PIZ) { tinyexr::SetErrorMessage("PIZ compression is not supported in this build", err); return TINYEXR_ERROR_UNSUPPORTED_FEATURE; } #endif #if !TINYEXR_USE_ZFP if (exr_header->compression_type == TINYEXR_COMPRESSIONTYPE_ZFP) { tinyexr::SetErrorMessage("ZFP compression is not supported in this build", err); return TINYEXR_ERROR_UNSUPPORTED_FEATURE; } #endif #ifdef _WIN32 FILE *fp = NULL; fopen_s(&fp, filename, "wb"); #else FILE *fp = fopen(filename, "wb"); #endif if (!fp) { tinyexr::SetErrorMessage("Cannot write a file", err); return TINYEXR_ERROR_CANT_WRITE_FILE; } unsigned char *mem = NULL; size_t mem_size = SaveEXRImageToMemory(exr_image, exr_header, &mem, err); if (mem_size == 0) { return TINYEXR_ERROR_SERIALZATION_FAILED; } size_t written_size = 0; if ((mem_size > 0) && mem) { written_size = fwrite(mem, 1, mem_size, fp); } free(mem); fclose(fp); if (written_size != mem_size) { tinyexr::SetErrorMessage("Cannot write a file", err); return TINYEXR_ERROR_CANT_WRITE_FILE; } return TINYEXR_SUCCESS; } int LoadDeepEXR(DeepImage *deep_image, const char *filename, const char **err) { if (deep_image == NULL) { tinyexr::SetErrorMessage("Invalid argument for LoadDeepEXR", err); return TINYEXR_ERROR_INVALID_ARGUMENT; } #ifdef _MSC_VER FILE *fp = NULL; errno_t errcode = fopen_s(&fp, filename, "rb"); if ((0 != errcode) || (!fp)) { tinyexr::SetErrorMessage("Cannot read a file " + std::string(filename), err); return TINYEXR_ERROR_CANT_OPEN_FILE; } #else FILE *fp = fopen(filename, "rb"); if (!fp) { tinyexr::SetErrorMessage("Cannot read a file " + std::string(filename), err); return TINYEXR_ERROR_CANT_OPEN_FILE; } #endif size_t filesize; // Compute size fseek(fp, 0, SEEK_END); filesize = static_cast(ftell(fp)); fseek(fp, 0, SEEK_SET); if (filesize == 0) { fclose(fp); tinyexr::SetErrorMessage("File size is zero : " + std::string(filename), err); return TINYEXR_ERROR_INVALID_FILE; } std::vector buf(filesize); // @todo { use mmap } { size_t ret; ret = fread(&buf[0], 1, filesize, fp); assert(ret == filesize); (void)ret; } fclose(fp); const char *head = &buf[0]; const char *marker = &buf[0]; // Header check. { const char header[] = {0x76, 0x2f, 0x31, 0x01}; if (memcmp(marker, header, 4) != 0) { tinyexr::SetErrorMessage("Invalid magic number", err); return TINYEXR_ERROR_INVALID_MAGIC_NUMBER; } marker += 4; } // Version, scanline. { // ver 2.0, scanline, deep bit on(0x800) // must be [2, 0, 0, 0] if (marker[0] != 2 || marker[1] != 8 || marker[2] != 0 || marker[3] != 0) { tinyexr::SetErrorMessage("Unsupported version or scanline", err); return TINYEXR_ERROR_UNSUPPORTED_FORMAT; } marker += 4; } int dx = -1; int dy = -1; int dw = -1; int dh = -1; int num_scanline_blocks = 1; // 16 for ZIP compression. int compression_type = -1; int num_channels = -1; std::vector channels; // Read attributes size_t size = filesize - tinyexr::kEXRVersionSize; for (;;) { if (0 == size) { return TINYEXR_ERROR_INVALID_DATA; } else if (marker[0] == '\0') { marker++; size--; break; } std::string attr_name; std::string attr_type; std::vector data; size_t marker_size; if (!tinyexr::ReadAttribute(&attr_name, &attr_type, &data, &marker_size, marker, size)) { std::stringstream ss; ss << "Failed to parse attribute\n"; tinyexr::SetErrorMessage(ss.str(), err); return TINYEXR_ERROR_INVALID_DATA; } marker += marker_size; size -= marker_size; if (attr_name.compare("compression") == 0) { compression_type = data[0]; if (compression_type > TINYEXR_COMPRESSIONTYPE_PIZ) { std::stringstream ss; ss << "Unsupported compression type : " << compression_type; tinyexr::SetErrorMessage(ss.str(), err); return TINYEXR_ERROR_UNSUPPORTED_FORMAT; } if (compression_type == TINYEXR_COMPRESSIONTYPE_ZIP) { num_scanline_blocks = 16; } } else if (attr_name.compare("channels") == 0) { // name: zero-terminated string, from 1 to 255 bytes long // pixel type: int, possible values are: UINT = 0 HALF = 1 FLOAT = 2 // pLinear: unsigned char, possible values are 0 and 1 // reserved: three chars, should be zero // xSampling: int // ySampling: int if (!tinyexr::ReadChannelInfo(channels, data)) { tinyexr::SetErrorMessage("Failed to parse channel info", err); return TINYEXR_ERROR_INVALID_DATA; } num_channels = static_cast(channels.size()); if (num_channels < 1) { tinyexr::SetErrorMessage("Invalid channels format", err); return TINYEXR_ERROR_INVALID_DATA; } } else if (attr_name.compare("dataWindow") == 0) { memcpy(&dx, &data.at(0), sizeof(int)); memcpy(&dy, &data.at(4), sizeof(int)); memcpy(&dw, &data.at(8), sizeof(int)); memcpy(&dh, &data.at(12), sizeof(int)); tinyexr::swap4(reinterpret_cast(&dx)); tinyexr::swap4(reinterpret_cast(&dy)); tinyexr::swap4(reinterpret_cast(&dw)); tinyexr::swap4(reinterpret_cast(&dh)); } else if (attr_name.compare("displayWindow") == 0) { int x; int y; int w; int h; memcpy(&x, &data.at(0), sizeof(int)); memcpy(&y, &data.at(4), sizeof(int)); memcpy(&w, &data.at(8), sizeof(int)); memcpy(&h, &data.at(12), sizeof(int)); tinyexr::swap4(reinterpret_cast(&x)); tinyexr::swap4(reinterpret_cast(&y)); tinyexr::swap4(reinterpret_cast(&w)); tinyexr::swap4(reinterpret_cast(&h)); } } assert(dx >= 0); assert(dy >= 0); assert(dw >= 0); assert(dh >= 0); assert(num_channels >= 1); int data_width = dw - dx + 1; int data_height = dh - dy + 1; std::vector image( static_cast(data_width * data_height * 4)); // 4 = RGBA // Read offset tables. int num_blocks = data_height / num_scanline_blocks; if (num_blocks * num_scanline_blocks < data_height) { num_blocks++; } std::vector offsets(static_cast(num_blocks)); for (size_t y = 0; y < static_cast(num_blocks); y++) { tinyexr::tinyexr_int64 offset; memcpy(&offset, marker, sizeof(tinyexr::tinyexr_int64)); tinyexr::swap8(reinterpret_cast(&offset)); marker += sizeof(tinyexr::tinyexr_int64); // = 8 offsets[y] = offset; } #if TINYEXR_USE_PIZ if ((compression_type == TINYEXR_COMPRESSIONTYPE_NONE) || (compression_type == TINYEXR_COMPRESSIONTYPE_RLE) || (compression_type == TINYEXR_COMPRESSIONTYPE_ZIPS) || (compression_type == TINYEXR_COMPRESSIONTYPE_ZIP) || (compression_type == TINYEXR_COMPRESSIONTYPE_PIZ)) { #else if ((compression_type == TINYEXR_COMPRESSIONTYPE_NONE) || (compression_type == TINYEXR_COMPRESSIONTYPE_RLE) || (compression_type == TINYEXR_COMPRESSIONTYPE_ZIPS) || (compression_type == TINYEXR_COMPRESSIONTYPE_ZIP)) { #endif // OK } else { tinyexr::SetErrorMessage("Unsupported compression format", err); return TINYEXR_ERROR_UNSUPPORTED_FORMAT; } deep_image->image = static_cast( malloc(sizeof(float **) * static_cast(num_channels))); for (int c = 0; c < num_channels; c++) { deep_image->image[c] = static_cast( malloc(sizeof(float *) * static_cast(data_height))); for (int y = 0; y < data_height; y++) { } } deep_image->offset_table = static_cast( malloc(sizeof(int *) * static_cast(data_height))); for (int y = 0; y < data_height; y++) { deep_image->offset_table[y] = static_cast( malloc(sizeof(int) * static_cast(data_width))); } for (size_t y = 0; y < static_cast(num_blocks); y++) { const unsigned char *data_ptr = reinterpret_cast(head + offsets[y]); // int: y coordinate // int64: packed size of pixel offset table // int64: packed size of sample data // int64: unpacked size of sample data // compressed pixel offset table // compressed sample data int line_no; tinyexr::tinyexr_int64 packedOffsetTableSize; tinyexr::tinyexr_int64 packedSampleDataSize; tinyexr::tinyexr_int64 unpackedSampleDataSize; memcpy(&line_no, data_ptr, sizeof(int)); memcpy(&packedOffsetTableSize, data_ptr + 4, sizeof(tinyexr::tinyexr_int64)); memcpy(&packedSampleDataSize, data_ptr + 12, sizeof(tinyexr::tinyexr_int64)); memcpy(&unpackedSampleDataSize, data_ptr + 20, sizeof(tinyexr::tinyexr_int64)); tinyexr::swap4(reinterpret_cast(&line_no)); tinyexr::swap8( reinterpret_cast(&packedOffsetTableSize)); tinyexr::swap8( reinterpret_cast(&packedSampleDataSize)); tinyexr::swap8( reinterpret_cast(&unpackedSampleDataSize)); std::vector pixelOffsetTable(static_cast(data_width)); // decode pixel offset table. { unsigned long dstLen = static_cast(pixelOffsetTable.size() * sizeof(int)); if (!tinyexr::DecompressZip( reinterpret_cast(&pixelOffsetTable.at(0)), &dstLen, data_ptr + 28, static_cast(packedOffsetTableSize))) { return false; } assert(dstLen == pixelOffsetTable.size() * sizeof(int)); for (size_t i = 0; i < static_cast(data_width); i++) { deep_image->offset_table[y][i] = pixelOffsetTable[i]; } } std::vector sample_data( static_cast(unpackedSampleDataSize)); // decode sample data. { unsigned long dstLen = static_cast(unpackedSampleDataSize); if (dstLen) { if (!tinyexr::DecompressZip( reinterpret_cast(&sample_data.at(0)), &dstLen, data_ptr + 28 + packedOffsetTableSize, static_cast(packedSampleDataSize))) { return false; } assert(dstLen == static_cast(unpackedSampleDataSize)); } } // decode sample int sampleSize = -1; std::vector channel_offset_list(static_cast(num_channels)); { int channel_offset = 0; for (size_t i = 0; i < static_cast(num_channels); i++) { channel_offset_list[i] = channel_offset; if (channels[i].pixel_type == TINYEXR_PIXELTYPE_UINT) { // UINT channel_offset += 4; } else if (channels[i].pixel_type == TINYEXR_PIXELTYPE_HALF) { // half channel_offset += 2; } else if (channels[i].pixel_type == TINYEXR_PIXELTYPE_FLOAT) { // float channel_offset += 4; } else { assert(0); } } sampleSize = channel_offset; } assert(sampleSize >= 2); assert(static_cast( pixelOffsetTable[static_cast(data_width - 1)] * sampleSize) == sample_data.size()); int samples_per_line = static_cast(sample_data.size()) / sampleSize; // // Alloc memory // // // pixel data is stored as image[channels][pixel_samples] // { tinyexr::tinyexr_uint64 data_offset = 0; for (size_t c = 0; c < static_cast(num_channels); c++) { deep_image->image[c][y] = static_cast( malloc(sizeof(float) * static_cast(samples_per_line))); if (channels[c].pixel_type == 0) { // UINT for (size_t x = 0; x < static_cast(samples_per_line); x++) { unsigned int ui; unsigned int *src_ptr = reinterpret_cast( &sample_data.at(size_t(data_offset) + x * sizeof(int))); tinyexr::cpy4(&ui, src_ptr); deep_image->image[c][y][x] = static_cast(ui); // @fixme } data_offset += sizeof(unsigned int) * static_cast(samples_per_line); } else if (channels[c].pixel_type == 1) { // half for (size_t x = 0; x < static_cast(samples_per_line); x++) { tinyexr::FP16 f16; const unsigned short *src_ptr = reinterpret_cast( &sample_data.at(size_t(data_offset) + x * sizeof(short))); tinyexr::cpy2(&(f16.u), src_ptr); tinyexr::FP32 f32 = half_to_float(f16); deep_image->image[c][y][x] = f32.f; } data_offset += sizeof(short) * static_cast(samples_per_line); } else { // float for (size_t x = 0; x < static_cast(samples_per_line); x++) { float f; const float *src_ptr = reinterpret_cast( &sample_data.at(size_t(data_offset) + x * sizeof(float))); tinyexr::cpy4(&f, src_ptr); deep_image->image[c][y][x] = f; } data_offset += sizeof(float) * static_cast(samples_per_line); } } } } // y deep_image->width = data_width; deep_image->height = data_height; deep_image->channel_names = static_cast( malloc(sizeof(const char *) * static_cast(num_channels))); for (size_t c = 0; c < static_cast(num_channels); c++) { #ifdef _WIN32 deep_image->channel_names[c] = _strdup(channels[c].name.c_str()); #else deep_image->channel_names[c] = strdup(channels[c].name.c_str()); #endif } deep_image->num_channels = num_channels; return TINYEXR_SUCCESS; } void InitEXRImage(EXRImage *exr_image) { if (exr_image == NULL) { return; } exr_image->width = 0; exr_image->height = 0; exr_image->num_channels = 0; exr_image->images = NULL; exr_image->tiles = NULL; exr_image->num_tiles = 0; } void FreeEXRErrorMessage(const char *msg) { if (msg) { free(reinterpret_cast(const_cast(msg))); } return; } void InitEXRHeader(EXRHeader *exr_header) { if (exr_header == NULL) { return; } memset(exr_header, 0, sizeof(EXRHeader)); } int FreeEXRHeader(EXRHeader *exr_header) { if (exr_header == NULL) { return TINYEXR_ERROR_INVALID_ARGUMENT; } if (exr_header->channels) { free(exr_header->channels); } if (exr_header->pixel_types) { free(exr_header->pixel_types); } if (exr_header->requested_pixel_types) { free(exr_header->requested_pixel_types); } for (int i = 0; i < exr_header->num_custom_attributes; i++) { if (exr_header->custom_attributes[i].value) { free(exr_header->custom_attributes[i].value); } } if (exr_header->custom_attributes) { free(exr_header->custom_attributes); } return TINYEXR_SUCCESS; } int FreeEXRImage(EXRImage *exr_image) { if (exr_image == NULL) { return TINYEXR_ERROR_INVALID_ARGUMENT; } for (int i = 0; i < exr_image->num_channels; i++) { if (exr_image->images && exr_image->images[i]) { free(exr_image->images[i]); } } if (exr_image->images) { free(exr_image->images); } if (exr_image->tiles) { for (int tid = 0; tid < exr_image->num_tiles; tid++) { for (int i = 0; i < exr_image->num_channels; i++) { if (exr_image->tiles[tid].images && exr_image->tiles[tid].images[i]) { free(exr_image->tiles[tid].images[i]); } } if (exr_image->tiles[tid].images) { free(exr_image->tiles[tid].images); } } free(exr_image->tiles); } return TINYEXR_SUCCESS; } int ParseEXRHeaderFromFile(EXRHeader *exr_header, const EXRVersion *exr_version, const char *filename, const char **err) { if (exr_header == NULL || exr_version == NULL || filename == NULL) { tinyexr::SetErrorMessage("Invalid argument for ParseEXRHeaderFromFile", err); return TINYEXR_ERROR_INVALID_ARGUMENT; } #ifdef _WIN32 FILE *fp = NULL; fopen_s(&fp, filename, "rb"); #else FILE *fp = fopen(filename, "rb"); #endif if (!fp) { tinyexr::SetErrorMessage("Cannot read file " + std::string(filename), err); return TINYEXR_ERROR_CANT_OPEN_FILE; } size_t filesize; // Compute size fseek(fp, 0, SEEK_END); filesize = static_cast(ftell(fp)); fseek(fp, 0, SEEK_SET); std::vector buf(filesize); // @todo { use mmap } { size_t ret; ret = fread(&buf[0], 1, filesize, fp); assert(ret == filesize); fclose(fp); if (ret != filesize) { tinyexr::SetErrorMessage("fread() error on " + std::string(filename), err); return TINYEXR_ERROR_INVALID_FILE; } } return ParseEXRHeaderFromMemory(exr_header, exr_version, &buf.at(0), filesize, err); } int ParseEXRMultipartHeaderFromMemory(EXRHeader ***exr_headers, int *num_headers, const EXRVersion *exr_version, const unsigned char *memory, size_t size, const char **err) { if (memory == NULL || exr_headers == NULL || num_headers == NULL || exr_version == NULL) { // Invalid argument tinyexr::SetErrorMessage( "Invalid argument for ParseEXRMultipartHeaderFromMemory", err); return TINYEXR_ERROR_INVALID_ARGUMENT; } if (size < tinyexr::kEXRVersionSize) { tinyexr::SetErrorMessage("Data size too short", err); return TINYEXR_ERROR_INVALID_DATA; } const unsigned char *marker = memory + tinyexr::kEXRVersionSize; size_t marker_size = size - tinyexr::kEXRVersionSize; std::vector infos; for (;;) { tinyexr::HeaderInfo info; info.clear(); std::string err_str; bool empty_header = false; int ret = ParseEXRHeader(&info, &empty_header, exr_version, &err_str, marker, marker_size); if (ret != TINYEXR_SUCCESS) { tinyexr::SetErrorMessage(err_str, err); return ret; } if (empty_header) { marker += 1; // skip '\0' break; } // `chunkCount` must exist in the header. if (info.chunk_count == 0) { tinyexr::SetErrorMessage( "`chunkCount' attribute is not found in the header.", err); return TINYEXR_ERROR_INVALID_DATA; } infos.push_back(info); // move to next header. marker += info.header_len; size -= info.header_len; } // allocate memory for EXRHeader and create array of EXRHeader pointers. (*exr_headers) = static_cast(malloc(sizeof(EXRHeader *) * infos.size())); for (size_t i = 0; i < infos.size(); i++) { EXRHeader *exr_header = static_cast(malloc(sizeof(EXRHeader))); ConvertHeader(exr_header, infos[i]); // transfoer `tiled` from version. exr_header->tiled = exr_version->tiled; (*exr_headers)[i] = exr_header; } (*num_headers) = static_cast(infos.size()); return TINYEXR_SUCCESS; } int ParseEXRMultipartHeaderFromFile(EXRHeader ***exr_headers, int *num_headers, const EXRVersion *exr_version, const char *filename, const char **err) { if (exr_headers == NULL || num_headers == NULL || exr_version == NULL || filename == NULL) { tinyexr::SetErrorMessage( "Invalid argument for ParseEXRMultipartHeaderFromFile()", err); return TINYEXR_ERROR_INVALID_ARGUMENT; } #ifdef _WIN32 FILE *fp = NULL; fopen_s(&fp, filename, "rb"); #else FILE *fp = fopen(filename, "rb"); #endif if (!fp) { tinyexr::SetErrorMessage("Cannot read file " + std::string(filename), err); return TINYEXR_ERROR_CANT_OPEN_FILE; } size_t filesize; // Compute size fseek(fp, 0, SEEK_END); filesize = static_cast(ftell(fp)); fseek(fp, 0, SEEK_SET); std::vector buf(filesize); // @todo { use mmap } { size_t ret; ret = fread(&buf[0], 1, filesize, fp); assert(ret == filesize); fclose(fp); if (ret != filesize) { tinyexr::SetErrorMessage("`fread' error. file may be corrupted.", err); return TINYEXR_ERROR_INVALID_FILE; } } return ParseEXRMultipartHeaderFromMemory( exr_headers, num_headers, exr_version, &buf.at(0), filesize, err); } int ParseEXRVersionFromMemory(EXRVersion *version, const unsigned char *memory, size_t size) { if (version == NULL || memory == NULL) { return TINYEXR_ERROR_INVALID_ARGUMENT; } if (size < tinyexr::kEXRVersionSize) { return TINYEXR_ERROR_INVALID_DATA; } const unsigned char *marker = memory; // Header check. { const char header[] = {0x76, 0x2f, 0x31, 0x01}; if (memcmp(marker, header, 4) != 0) { return TINYEXR_ERROR_INVALID_MAGIC_NUMBER; } marker += 4; } version->tiled = false; version->long_name = false; version->non_image = false; version->multipart = false; // Parse version header. { // must be 2 if (marker[0] != 2) { return TINYEXR_ERROR_INVALID_EXR_VERSION; } if (version == NULL) { return TINYEXR_SUCCESS; // May OK } version->version = 2; if (marker[1] & 0x2) { // 9th bit version->tiled = true; } if (marker[1] & 0x4) { // 10th bit version->long_name = true; } if (marker[1] & 0x8) { // 11th bit version->non_image = true; // (deep image) } if (marker[1] & 0x10) { // 12th bit version->multipart = true; } } return TINYEXR_SUCCESS; } int ParseEXRVersionFromFile(EXRVersion *version, const char *filename) { if (filename == NULL) { return TINYEXR_ERROR_INVALID_ARGUMENT; } #ifdef _WIN32 FILE *fp = NULL; fopen_s(&fp, filename, "rb"); #else FILE *fp = fopen(filename, "rb"); #endif if (!fp) { return TINYEXR_ERROR_CANT_OPEN_FILE; } size_t file_size; // Compute size fseek(fp, 0, SEEK_END); file_size = static_cast(ftell(fp)); fseek(fp, 0, SEEK_SET); if (file_size < tinyexr::kEXRVersionSize) { return TINYEXR_ERROR_INVALID_FILE; } unsigned char buf[tinyexr::kEXRVersionSize]; size_t ret = fread(&buf[0], 1, tinyexr::kEXRVersionSize, fp); fclose(fp); if (ret != tinyexr::kEXRVersionSize) { return TINYEXR_ERROR_INVALID_FILE; } return ParseEXRVersionFromMemory(version, buf, tinyexr::kEXRVersionSize); } int LoadEXRMultipartImageFromMemory(EXRImage *exr_images, const EXRHeader **exr_headers, unsigned int num_parts, const unsigned char *memory, const size_t size, const char **err) { if (exr_images == NULL || exr_headers == NULL || num_parts == 0 || memory == NULL || (size <= tinyexr::kEXRVersionSize)) { tinyexr::SetErrorMessage( "Invalid argument for LoadEXRMultipartImageFromMemory()", err); return TINYEXR_ERROR_INVALID_ARGUMENT; } // compute total header size. size_t total_header_size = 0; for (unsigned int i = 0; i < num_parts; i++) { if (exr_headers[i]->header_len == 0) { tinyexr::SetErrorMessage("EXRHeader variable is not initialized.", err); return TINYEXR_ERROR_INVALID_ARGUMENT; } total_header_size += exr_headers[i]->header_len; } const char *marker = reinterpret_cast( memory + total_header_size + 4 + 4); // +8 for magic number and version header. marker += 1; // Skip empty header. // NOTE 1: // In multipart image, There is 'part number' before chunk data. // 4 byte : part number // 4+ : chunk // // NOTE 2: // EXR spec says 'part number' is 'unsigned long' but actually this is // 'unsigned int(4 bytes)' in OpenEXR implementation... // http://www.openexr.com/openexrfilelayout.pdf // Load chunk offset table. std::vector > chunk_offset_table_list; for (size_t i = 0; i < static_cast(num_parts); i++) { std::vector offset_table( static_cast(exr_headers[i]->chunk_count)); for (size_t c = 0; c < offset_table.size(); c++) { tinyexr::tinyexr_uint64 offset; memcpy(&offset, marker, 8); tinyexr::swap8(&offset); if (offset >= size) { tinyexr::SetErrorMessage("Invalid offset size in EXR header chunks.", err); return TINYEXR_ERROR_INVALID_DATA; } offset_table[c] = offset + 4; // +4 to skip 'part number' marker += 8; } chunk_offset_table_list.push_back(offset_table); } // Decode image. for (size_t i = 0; i < static_cast(num_parts); i++) { std::vector &offset_table = chunk_offset_table_list[i]; // First check 'part number' is identitical to 'i' for (size_t c = 0; c < offset_table.size(); c++) { const unsigned char *part_number_addr = memory + offset_table[c] - 4; // -4 to move to 'part number' field. unsigned int part_no; memcpy(&part_no, part_number_addr, sizeof(unsigned int)); // 4 tinyexr::swap4(&part_no); if (part_no != i) { tinyexr::SetErrorMessage("Invalid `part number' in EXR header chunks.", err); return TINYEXR_ERROR_INVALID_DATA; } } std::string e; int ret = tinyexr::DecodeChunk(&exr_images[i], exr_headers[i], offset_table, memory, size, &e); if (ret != TINYEXR_SUCCESS) { if (!e.empty()) { tinyexr::SetErrorMessage(e, err); } return ret; } } return TINYEXR_SUCCESS; } int LoadEXRMultipartImageFromFile(EXRImage *exr_images, const EXRHeader **exr_headers, unsigned int num_parts, const char *filename, const char **err) { if (exr_images == NULL || exr_headers == NULL || num_parts == 0) { tinyexr::SetErrorMessage( "Invalid argument for LoadEXRMultipartImageFromFile", err); return TINYEXR_ERROR_INVALID_ARGUMENT; } #ifdef _WIN32 FILE *fp = NULL; fopen_s(&fp, filename, "rb"); #else FILE *fp = fopen(filename, "rb"); #endif if (!fp) { tinyexr::SetErrorMessage("Cannot read file " + std::string(filename), err); return TINYEXR_ERROR_CANT_OPEN_FILE; } size_t filesize; // Compute size fseek(fp, 0, SEEK_END); filesize = static_cast(ftell(fp)); fseek(fp, 0, SEEK_SET); std::vector buf(filesize); // @todo { use mmap } { size_t ret; ret = fread(&buf[0], 1, filesize, fp); assert(ret == filesize); fclose(fp); (void)ret; } return LoadEXRMultipartImageFromMemory(exr_images, exr_headers, num_parts, &buf.at(0), filesize, err); } int SaveEXR(const float *data, int width, int height, int components, const int save_as_fp16, const char *outfilename, const char **err) { if ((components == 1) || components == 3 || components == 4) { // OK } else { std::stringstream ss; ss << "Unsupported component value : " << components << std::endl; tinyexr::SetErrorMessage(ss.str(), err); return TINYEXR_ERROR_INVALID_ARGUMENT; } EXRHeader header; InitEXRHeader(&header); if ((width < 16) && (height < 16)) { // No compression for small image. header.compression_type = TINYEXR_COMPRESSIONTYPE_NONE; } else { header.compression_type = TINYEXR_COMPRESSIONTYPE_ZIP; } EXRImage image; InitEXRImage(&image); image.num_channels = components; std::vector images[4]; if (components == 1) { images[0].resize(static_cast(width * height)); memcpy(images[0].data(), data, sizeof(float) * size_t(width * height)); } else { images[0].resize(static_cast(width * height)); images[1].resize(static_cast(width * height)); images[2].resize(static_cast(width * height)); images[3].resize(static_cast(width * height)); // Split RGB(A)RGB(A)RGB(A)... into R, G and B(and A) layers for (size_t i = 0; i < static_cast(width * height); i++) { images[0][i] = data[static_cast(components) * i + 0]; images[1][i] = data[static_cast(components) * i + 1]; images[2][i] = data[static_cast(components) * i + 2]; if (components == 4) { images[3][i] = data[static_cast(components) * i + 3]; } } } float *image_ptr[4] = {0, 0, 0, 0}; if (components == 4) { image_ptr[0] = &(images[3].at(0)); // A image_ptr[1] = &(images[2].at(0)); // B image_ptr[2] = &(images[1].at(0)); // G image_ptr[3] = &(images[0].at(0)); // R } else if (components == 3) { image_ptr[0] = &(images[2].at(0)); // B image_ptr[1] = &(images[1].at(0)); // G image_ptr[2] = &(images[0].at(0)); // R } else if (components == 1) { image_ptr[0] = &(images[0].at(0)); // A } image.images = reinterpret_cast(image_ptr); image.width = width; image.height = height; header.num_channels = components; header.channels = static_cast(malloc( sizeof(EXRChannelInfo) * static_cast(header.num_channels))); // Must be (A)BGR order, since most of EXR viewers expect this channel order. if (components == 4) { #ifdef _MSC_VER strncpy_s(header.channels[0].name, "A", 255); strncpy_s(header.channels[1].name, "B", 255); strncpy_s(header.channels[2].name, "G", 255); strncpy_s(header.channels[3].name, "R", 255); #else strncpy(header.channels[0].name, "A", 255); strncpy(header.channels[1].name, "B", 255); strncpy(header.channels[2].name, "G", 255); strncpy(header.channels[3].name, "R", 255); #endif header.channels[0].name[strlen("A")] = '\0'; header.channels[1].name[strlen("B")] = '\0'; header.channels[2].name[strlen("G")] = '\0'; header.channels[3].name[strlen("R")] = '\0'; } else if (components == 3) { #ifdef _MSC_VER strncpy_s(header.channels[0].name, "B", 255); strncpy_s(header.channels[1].name, "G", 255); strncpy_s(header.channels[2].name, "R", 255); #else strncpy(header.channels[0].name, "B", 255); strncpy(header.channels[1].name, "G", 255); strncpy(header.channels[2].name, "R", 255); #endif header.channels[0].name[strlen("B")] = '\0'; header.channels[1].name[strlen("G")] = '\0'; header.channels[2].name[strlen("R")] = '\0'; } else { #ifdef _MSC_VER strncpy_s(header.channels[0].name, "A", 255); #else strncpy(header.channels[0].name, "A", 255); #endif header.channels[0].name[strlen("A")] = '\0'; } header.pixel_types = static_cast( malloc(sizeof(int) * static_cast(header.num_channels))); header.requested_pixel_types = static_cast( malloc(sizeof(int) * static_cast(header.num_channels))); for (int i = 0; i < header.num_channels; i++) { header.pixel_types[i] = TINYEXR_PIXELTYPE_FLOAT; // pixel type of input image if (save_as_fp16 > 0) { header.requested_pixel_types[i] = TINYEXR_PIXELTYPE_HALF; // save with half(fp16) pixel format } else { header.requested_pixel_types[i] = TINYEXR_PIXELTYPE_FLOAT; // save with float(fp32) pixel format(i.e. // no precision reduction) } } int ret = SaveEXRImageToFile(&image, &header, outfilename, err); if (ret != TINYEXR_SUCCESS) { return ret; } free(header.channels); free(header.pixel_types); free(header.requested_pixel_types); return ret; } #ifdef __clang__ // zero-as-null-ppinter-constant #pragma clang diagnostic pop #endif #endif // TINYEXR_IMPLEMENTATION_DEIFNED #endif // TINYEXR_IMPLEMENTATION ================================================ FILE: src/libraries/utf8/utf8/checked.h ================================================ // Copyright 2006 Nemanja Trifunovic /* Permission is hereby granted, free of charge, to any person or organization obtaining a copy of the software and accompanying documentation covered by this license (the "Software") to use, reproduce, display, distribute, execute, and transmit the Software, and to prepare derivative works of the Software, and to permit third-parties to whom the Software is furnished to do so, all subject to the following: The copyright notices in the Software and this entire statement, including the above license grant, this restriction and the following disclaimer, must be included in all copies of the Software, in whole or in part, and all derivative works of the Software, unless such copies or derivative works are solely in the form of machine-executable object code generated by a source language processor. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #ifndef UTF8_FOR_CPP_CHECKED_H_2675DCD0_9480_4c0c_B92A_CC14C027B731 #define UTF8_FOR_CPP_CHECKED_H_2675DCD0_9480_4c0c_B92A_CC14C027B731 #include "core.h" #include namespace utf8 { // Base for the exceptions that may be thrown from the library class exception : public ::std::exception { }; // Exceptions that may be thrown from the library functions. class invalid_code_point : public exception { uint32_t cp; public: invalid_code_point(uint32_t cp) : cp(cp) {} virtual const char* what() const throw() { return "Invalid code point"; } uint32_t code_point() const {return cp;} }; class invalid_utf8 : public exception { uint8_t u8; public: invalid_utf8 (uint8_t u) : u8(u) {} virtual const char* what() const throw() { return "Invalid UTF-8"; } uint8_t utf8_octet() const {return u8;} }; class invalid_utf16 : public exception { uint16_t u16; public: invalid_utf16 (uint16_t u) : u16(u) {} virtual const char* what() const throw() { return "Invalid UTF-16"; } uint16_t utf16_word() const {return u16;} }; class not_enough_room : public exception { public: virtual const char* what() const throw() { return "Not enough space"; } }; /// The library API - functions intended to be called by the users template octet_iterator append(uint32_t cp, octet_iterator result) { if (!utf8::internal::is_code_point_valid(cp)) throw invalid_code_point(cp); if (cp < 0x80) // one octet *(result++) = static_cast(cp); else if (cp < 0x800) { // two octets *(result++) = static_cast((cp >> 6) | 0xc0); *(result++) = static_cast((cp & 0x3f) | 0x80); } else if (cp < 0x10000) { // three octets *(result++) = static_cast((cp >> 12) | 0xe0); *(result++) = static_cast(((cp >> 6) & 0x3f) | 0x80); *(result++) = static_cast((cp & 0x3f) | 0x80); } else { // four octets *(result++) = static_cast((cp >> 18) | 0xf0); *(result++) = static_cast(((cp >> 12) & 0x3f) | 0x80); *(result++) = static_cast(((cp >> 6) & 0x3f) | 0x80); *(result++) = static_cast((cp & 0x3f) | 0x80); } return result; } template output_iterator replace_invalid(octet_iterator start, octet_iterator end, output_iterator out, uint32_t replacement) { while (start != end) { octet_iterator sequence_start = start; internal::utf_error err_code = utf8::internal::validate_next(start, end); switch (err_code) { case internal::UTF8_OK : for (octet_iterator it = sequence_start; it != start; ++it) *out++ = *it; break; case internal::NOT_ENOUGH_ROOM: throw not_enough_room(); case internal::INVALID_LEAD: out = utf8::append (replacement, out); ++start; break; case internal::INCOMPLETE_SEQUENCE: case internal::OVERLONG_SEQUENCE: case internal::INVALID_CODE_POINT: out = utf8::append (replacement, out); ++start; // just one replacement mark for the sequence while (start != end && utf8::internal::is_trail(*start)) ++start; break; } } return out; } template inline output_iterator replace_invalid(octet_iterator start, octet_iterator end, output_iterator out) { static const uint32_t replacement_marker = utf8::internal::mask16(0xfffd); return utf8::replace_invalid(start, end, out, replacement_marker); } template uint32_t next(octet_iterator& it, octet_iterator end) { uint32_t cp = 0; internal::utf_error err_code = utf8::internal::validate_next(it, end, cp); switch (err_code) { case internal::UTF8_OK : break; case internal::NOT_ENOUGH_ROOM : throw not_enough_room(); case internal::INVALID_LEAD : case internal::INCOMPLETE_SEQUENCE : case internal::OVERLONG_SEQUENCE : throw invalid_utf8(*it); case internal::INVALID_CODE_POINT : throw invalid_code_point(cp); } return cp; } template uint32_t peek_next(octet_iterator it, octet_iterator end) { return utf8::next(it, end); } template uint32_t prior(octet_iterator& it, octet_iterator start) { // can't do much if it == start if (it == start) throw not_enough_room(); octet_iterator end = it; // Go back until we hit either a lead octet or start while (utf8::internal::is_trail(*(--it))) if (it == start) throw invalid_utf8(*it); // error - no lead byte in the sequence return utf8::peek_next(it, end); } /// Deprecated in versions that include "prior" template uint32_t previous(octet_iterator& it, octet_iterator pass_start) { octet_iterator end = it; while (utf8::internal::is_trail(*(--it))) if (it == pass_start) throw invalid_utf8(*it); // error - no lead byte in the sequence octet_iterator temp = it; return utf8::next(temp, end); } template void advance (octet_iterator& it, distance_type n, octet_iterator end) { for (distance_type i = 0; i < n; ++i) utf8::next(it, end); } template typename std::iterator_traits::difference_type distance (octet_iterator first, octet_iterator last) { typename std::iterator_traits::difference_type dist; for (dist = 0; first < last; ++dist) utf8::next(first, last); return dist; } template octet_iterator utf16to8 (u16bit_iterator start, u16bit_iterator end, octet_iterator result) { while (start != end) { uint32_t cp = utf8::internal::mask16(*start++); // Take care of surrogate pairs first if (utf8::internal::is_lead_surrogate(cp)) { if (start != end) { uint32_t trail_surrogate = utf8::internal::mask16(*start++); if (utf8::internal::is_trail_surrogate(trail_surrogate)) cp = (cp << 10) + trail_surrogate + internal::SURROGATE_OFFSET; else throw invalid_utf16(static_cast(trail_surrogate)); } else throw invalid_utf16(static_cast(cp)); } // Lone trail surrogate else if (utf8::internal::is_trail_surrogate(cp)) throw invalid_utf16(static_cast(cp)); result = utf8::append(cp, result); } return result; } template u16bit_iterator utf8to16 (octet_iterator start, octet_iterator end, u16bit_iterator result) { while (start != end) { uint32_t cp = utf8::next(start, end); if (cp > 0xffff) { //make a surrogate pair *result++ = static_cast((cp >> 10) + internal::LEAD_OFFSET); *result++ = static_cast((cp & 0x3ff) + internal::TRAIL_SURROGATE_MIN); } else *result++ = static_cast(cp); } return result; } template octet_iterator utf32to8 (u32bit_iterator start, u32bit_iterator end, octet_iterator result) { while (start != end) result = utf8::append(*(start++), result); return result; } template u32bit_iterator utf8to32 (octet_iterator start, octet_iterator end, u32bit_iterator result) { while (start != end) (*result++) = utf8::next(start, end); return result; } // The iterator class template class iterator : public std::iterator { octet_iterator it; octet_iterator range_start; octet_iterator range_end; public: iterator () {} explicit iterator (const octet_iterator& octet_it, const octet_iterator& range_start, const octet_iterator& range_end) : it(octet_it), range_start(range_start), range_end(range_end) { if (it < range_start || it > range_end) throw std::out_of_range("Invalid utf-8 iterator position"); } // the default "big three" are OK octet_iterator base () const { return it; } uint32_t operator * () const { octet_iterator temp = it; return utf8::next(temp, range_end); } bool operator == (const iterator& rhs) const { if (range_start != rhs.range_start || range_end != rhs.range_end) throw std::logic_error("Comparing utf-8 iterators defined with different ranges"); return (it == rhs.it); } bool operator != (const iterator& rhs) const { return !(operator == (rhs)); } iterator& operator ++ () { utf8::next(it, range_end); return *this; } iterator operator ++ (int) { iterator temp = *this; utf8::next(it, range_end); return temp; } iterator& operator -- () { utf8::prior(it, range_start); return *this; } iterator operator -- (int) { iterator temp = *this; utf8::prior(it, range_start); return temp; } }; // class iterator } // namespace utf8 #endif //header guard ================================================ FILE: src/libraries/utf8/utf8/core.h ================================================ // Copyright 2006 Nemanja Trifunovic /* Permission is hereby granted, free of charge, to any person or organization obtaining a copy of the software and accompanying documentation covered by this license (the "Software") to use, reproduce, display, distribute, execute, and transmit the Software, and to prepare derivative works of the Software, and to permit third-parties to whom the Software is furnished to do so, all subject to the following: The copyright notices in the Software and this entire statement, including the above license grant, this restriction and the following disclaimer, must be included in all copies of the Software, in whole or in part, and all derivative works of the Software, unless such copies or derivative works are solely in the form of machine-executable object code generated by a source language processor. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #ifndef UTF8_FOR_CPP_CORE_H_2675DCD0_9480_4c0c_B92A_CC14C027B731 #define UTF8_FOR_CPP_CORE_H_2675DCD0_9480_4c0c_B92A_CC14C027B731 #include namespace utf8 { // The typedefs for 8-bit, 16-bit and 32-bit unsigned integers // You may need to change them to match your system. // These typedefs have the same names as ones from cstdint, or boost/cstdint typedef unsigned char uint8_t; typedef unsigned short uint16_t; typedef unsigned int uint32_t; // Helper code - not intended to be directly called by the library users. May be changed at any time namespace internal { // Unicode constants // Leading (high) surrogates: 0xd800 - 0xdbff // Trailing (low) surrogates: 0xdc00 - 0xdfff const uint16_t LEAD_SURROGATE_MIN = 0xd800u; const uint16_t LEAD_SURROGATE_MAX = 0xdbffu; const uint16_t TRAIL_SURROGATE_MIN = 0xdc00u; const uint16_t TRAIL_SURROGATE_MAX = 0xdfffu; const uint16_t LEAD_OFFSET = LEAD_SURROGATE_MIN - (0x10000 >> 10); const uint32_t SURROGATE_OFFSET = 0x10000u - (LEAD_SURROGATE_MIN << 10) - TRAIL_SURROGATE_MIN; // Maximum valid value for a Unicode code point const uint32_t CODE_POINT_MAX = 0x0010ffffu; template inline uint8_t mask8(octet_type oc) { return static_cast(0xff & oc); } template inline uint16_t mask16(u16_type oc) { return static_cast(0xffff & oc); } template inline bool is_trail(octet_type oc) { return ((utf8::internal::mask8(oc) >> 6) == 0x2); } template inline bool is_lead_surrogate(u16 cp) { return (cp >= LEAD_SURROGATE_MIN && cp <= LEAD_SURROGATE_MAX); } template inline bool is_trail_surrogate(u16 cp) { return (cp >= TRAIL_SURROGATE_MIN && cp <= TRAIL_SURROGATE_MAX); } template inline bool is_surrogate(u16 cp) { return (cp >= LEAD_SURROGATE_MIN && cp <= TRAIL_SURROGATE_MAX); } template inline bool is_code_point_valid(u32 cp) { return (cp <= CODE_POINT_MAX && !utf8::internal::is_surrogate(cp)); } template inline typename std::iterator_traits::difference_type sequence_length(octet_iterator lead_it) { uint8_t lead = utf8::internal::mask8(*lead_it); if (lead < 0x80) return 1; else if ((lead >> 5) == 0x6) return 2; else if ((lead >> 4) == 0xe) return 3; else if ((lead >> 3) == 0x1e) return 4; else return 0; } template inline bool is_overlong_sequence(uint32_t cp, octet_difference_type length) { if (cp < 0x80) { if (length != 1) return true; } else if (cp < 0x800) { if (length != 2) return true; } else if (cp < 0x10000) { if (length != 3) return true; } return false; } enum utf_error {UTF8_OK, NOT_ENOUGH_ROOM, INVALID_LEAD, INCOMPLETE_SEQUENCE, OVERLONG_SEQUENCE, INVALID_CODE_POINT}; /// Helper for get_sequence_x template utf_error increase_safely(octet_iterator& it, octet_iterator end) { if (++it == end) return NOT_ENOUGH_ROOM; if (!utf8::internal::is_trail(*it)) return INCOMPLETE_SEQUENCE; return UTF8_OK; } #define UTF8_CPP_INCREASE_AND_RETURN_ON_ERROR(IT, END) {utf_error ret = increase_safely(IT, END); if (ret != UTF8_OK) return ret;} /// get_sequence_x functions decode utf-8 sequences of the length x template utf_error get_sequence_1(octet_iterator& it, octet_iterator end, uint32_t& code_point) { if (it == end) return NOT_ENOUGH_ROOM; code_point = utf8::internal::mask8(*it); return UTF8_OK; } template utf_error get_sequence_2(octet_iterator& it, octet_iterator end, uint32_t& code_point) { if (it == end) return NOT_ENOUGH_ROOM; code_point = utf8::internal::mask8(*it); UTF8_CPP_INCREASE_AND_RETURN_ON_ERROR(it, end) code_point = ((code_point << 6) & 0x7ff) + ((*it) & 0x3f); return UTF8_OK; } template utf_error get_sequence_3(octet_iterator& it, octet_iterator end, uint32_t& code_point) { if (it == end) return NOT_ENOUGH_ROOM; code_point = utf8::internal::mask8(*it); UTF8_CPP_INCREASE_AND_RETURN_ON_ERROR(it, end) code_point = ((code_point << 12) & 0xffff) + ((utf8::internal::mask8(*it) << 6) & 0xfff); UTF8_CPP_INCREASE_AND_RETURN_ON_ERROR(it, end) code_point += (*it) & 0x3f; return UTF8_OK; } template utf_error get_sequence_4(octet_iterator& it, octet_iterator end, uint32_t& code_point) { if (it == end) return NOT_ENOUGH_ROOM; code_point = utf8::internal::mask8(*it); UTF8_CPP_INCREASE_AND_RETURN_ON_ERROR(it, end) code_point = ((code_point << 18) & 0x1fffff) + ((utf8::internal::mask8(*it) << 12) & 0x3ffff); UTF8_CPP_INCREASE_AND_RETURN_ON_ERROR(it, end) code_point += (utf8::internal::mask8(*it) << 6) & 0xfff; UTF8_CPP_INCREASE_AND_RETURN_ON_ERROR(it, end) code_point += (*it) & 0x3f; return UTF8_OK; } #undef UTF8_CPP_INCREASE_AND_RETURN_ON_ERROR template utf_error validate_next(octet_iterator& it, octet_iterator end, uint32_t& code_point) { // Save the original value of it so we can go back in case of failure // Of course, it does not make much sense with i.e. stream iterators octet_iterator original_it = it; uint32_t cp = 0; // Determine the sequence length based on the lead octet typedef typename std::iterator_traits::difference_type octet_difference_type; const octet_difference_type length = utf8::internal::sequence_length(it); // Get trail octets and calculate the code point utf_error err = UTF8_OK; switch (length) { case 0: return INVALID_LEAD; case 1: err = utf8::internal::get_sequence_1(it, end, cp); break; case 2: err = utf8::internal::get_sequence_2(it, end, cp); break; case 3: err = utf8::internal::get_sequence_3(it, end, cp); break; case 4: err = utf8::internal::get_sequence_4(it, end, cp); break; } if (err == UTF8_OK) { // Decoding succeeded. Now, security checks... if (utf8::internal::is_code_point_valid(cp)) { if (!utf8::internal::is_overlong_sequence(cp, length)){ // Passed! Return here. code_point = cp; ++it; return UTF8_OK; } else err = OVERLONG_SEQUENCE; } else err = INVALID_CODE_POINT; } // Failure branch - restore the original value of the iterator it = original_it; return err; } template inline utf_error validate_next(octet_iterator& it, octet_iterator end) { uint32_t ignored; return utf8::internal::validate_next(it, end, ignored); } } // namespace internal /// The library API - functions intended to be called by the users // Byte order mark const uint8_t bom[] = {0xef, 0xbb, 0xbf}; template octet_iterator find_invalid(octet_iterator start, octet_iterator end) { octet_iterator result = start; while (result != end) { utf8::internal::utf_error err_code = utf8::internal::validate_next(result, end); if (err_code != internal::UTF8_OK) return result; } return result; } template inline bool is_valid(octet_iterator start, octet_iterator end) { return (utf8::find_invalid(start, end) == end); } template inline bool starts_with_bom (octet_iterator it, octet_iterator end) { return ( ((it != end) && (utf8::internal::mask8(*it++)) == bom[0]) && ((it != end) && (utf8::internal::mask8(*it++)) == bom[1]) && ((it != end) && (utf8::internal::mask8(*it)) == bom[2]) ); } //Deprecated in release 2.3 template inline bool is_bom (octet_iterator it) { return ( (utf8::internal::mask8(*it++)) == bom[0] && (utf8::internal::mask8(*it++)) == bom[1] && (utf8::internal::mask8(*it)) == bom[2] ); } } // namespace utf8 #endif // header guard ================================================ FILE: src/libraries/utf8/utf8/unchecked.h ================================================ // Copyright 2006 Nemanja Trifunovic /* Permission is hereby granted, free of charge, to any person or organization obtaining a copy of the software and accompanying documentation covered by this license (the "Software") to use, reproduce, display, distribute, execute, and transmit the Software, and to prepare derivative works of the Software, and to permit third-parties to whom the Software is furnished to do so, all subject to the following: The copyright notices in the Software and this entire statement, including the above license grant, this restriction and the following disclaimer, must be included in all copies of the Software, in whole or in part, and all derivative works of the Software, unless such copies or derivative works are solely in the form of machine-executable object code generated by a source language processor. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #ifndef UTF8_FOR_CPP_UNCHECKED_H_2675DCD0_9480_4c0c_B92A_CC14C027B731 #define UTF8_FOR_CPP_UNCHECKED_H_2675DCD0_9480_4c0c_B92A_CC14C027B731 #include "core.h" namespace utf8 { namespace unchecked { template octet_iterator append(uint32_t cp, octet_iterator result) { if (cp < 0x80) // one octet *(result++) = static_cast(cp); else if (cp < 0x800) { // two octets *(result++) = static_cast((cp >> 6) | 0xc0); *(result++) = static_cast((cp & 0x3f) | 0x80); } else if (cp < 0x10000) { // three octets *(result++) = static_cast((cp >> 12) | 0xe0); *(result++) = static_cast(((cp >> 6) & 0x3f) | 0x80); *(result++) = static_cast((cp & 0x3f) | 0x80); } else { // four octets *(result++) = static_cast((cp >> 18) | 0xf0); *(result++) = static_cast(((cp >> 12) & 0x3f)| 0x80); *(result++) = static_cast(((cp >> 6) & 0x3f) | 0x80); *(result++) = static_cast((cp & 0x3f) | 0x80); } return result; } template uint32_t next(octet_iterator& it) { uint32_t cp = utf8::internal::mask8(*it); typename std::iterator_traits::difference_type length = utf8::internal::sequence_length(it); switch (length) { case 1: break; case 2: it++; cp = ((cp << 6) & 0x7ff) + ((*it) & 0x3f); break; case 3: ++it; cp = ((cp << 12) & 0xffff) + ((utf8::internal::mask8(*it) << 6) & 0xfff); ++it; cp += (*it) & 0x3f; break; case 4: ++it; cp = ((cp << 18) & 0x1fffff) + ((utf8::internal::mask8(*it) << 12) & 0x3ffff); ++it; cp += (utf8::internal::mask8(*it) << 6) & 0xfff; ++it; cp += (*it) & 0x3f; break; } ++it; return cp; } template uint32_t peek_next(octet_iterator it) { return utf8::unchecked::next(it); } template uint32_t prior(octet_iterator& it) { while (utf8::internal::is_trail(*(--it))) ; octet_iterator temp = it; return utf8::unchecked::next(temp); } // Deprecated in versions that include prior, but only for the sake of consistency (see utf8::previous) template inline uint32_t previous(octet_iterator& it) { return utf8::unchecked::prior(it); } template void advance (octet_iterator& it, distance_type n) { for (distance_type i = 0; i < n; ++i) utf8::unchecked::next(it); } template typename std::iterator_traits::difference_type distance (octet_iterator first, octet_iterator last) { typename std::iterator_traits::difference_type dist; for (dist = 0; first < last; ++dist) utf8::unchecked::next(first); return dist; } template octet_iterator utf16to8 (u16bit_iterator start, u16bit_iterator end, octet_iterator result) { while (start != end) { uint32_t cp = utf8::internal::mask16(*start++); // Take care of surrogate pairs first if (utf8::internal::is_lead_surrogate(cp)) { uint32_t trail_surrogate = utf8::internal::mask16(*start++); cp = (cp << 10) + trail_surrogate + internal::SURROGATE_OFFSET; } result = utf8::unchecked::append(cp, result); } return result; } template u16bit_iterator utf8to16 (octet_iterator start, octet_iterator end, u16bit_iterator result) { while (start < end) { uint32_t cp = utf8::unchecked::next(start); if (cp > 0xffff) { //make a surrogate pair *result++ = static_cast((cp >> 10) + internal::LEAD_OFFSET); *result++ = static_cast((cp & 0x3ff) + internal::TRAIL_SURROGATE_MIN); } else *result++ = static_cast(cp); } return result; } template octet_iterator utf32to8 (u32bit_iterator start, u32bit_iterator end, octet_iterator result) { while (start != end) result = utf8::unchecked::append(*(start++), result); return result; } template u32bit_iterator utf8to32 (octet_iterator start, octet_iterator end, u32bit_iterator result) { while (start < end) (*result++) = utf8::unchecked::next(start); return result; } // The iterator class template class iterator : public std::iterator { octet_iterator it; public: iterator () {} explicit iterator (const octet_iterator& octet_it): it(octet_it) {} // the default "big three" are OK octet_iterator base () const { return it; } uint32_t operator * () const { octet_iterator temp = it; return utf8::unchecked::next(temp); } bool operator == (const iterator& rhs) const { return (it == rhs.it); } bool operator != (const iterator& rhs) const { return !(operator == (rhs)); } iterator& operator ++ () { ::std::advance(it, utf8::internal::sequence_length(it)); return *this; } iterator operator ++ (int) { iterator temp = *this; ::std::advance(it, utf8::internal::sequence_length(it)); return temp; } iterator& operator -- () { utf8::unchecked::prior(it); return *this; } iterator operator -- (int) { iterator temp = *this; utf8::unchecked::prior(it); return temp; } }; // class iterator } // namespace utf8::unchecked } // namespace utf8 #endif // header guard ================================================ FILE: src/libraries/utf8/utf8.h ================================================ // Copyright 2006 Nemanja Trifunovic /* Permission is hereby granted, free of charge, to any person or organization obtaining a copy of the software and accompanying documentation covered by this license (the "Software") to use, reproduce, display, distribute, execute, and transmit the Software, and to prepare derivative works of the Software, and to permit third-parties to whom the Software is furnished to do so, all subject to the following: The copyright notices in the Software and this entire statement, including the above license grant, this restriction and the following disclaimer, must be included in all copies of the Software, in whole or in part, and all derivative works of the Software, unless such copies or derivative works are solely in the form of machine-executable object code generated by a source language processor. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #ifndef UTF8_FOR_CPP_2675DCD0_9480_4c0c_B92A_CC14C027B731 #define UTF8_FOR_CPP_2675DCD0_9480_4c0c_B92A_CC14C027B731 #include "utf8/checked.h" #include "utf8/unchecked.h" #endif // header guard ================================================ FILE: src/libraries/vk_video/vulkan_video_codec_av1std.h ================================================ #ifndef VULKAN_VIDEO_CODEC_AV1STD_H_ #define VULKAN_VIDEO_CODEC_AV1STD_H_ 1 /* ** Copyright 2015-2025 The Khronos Group Inc. ** ** SPDX-License-Identifier: Apache-2.0 */ /* ** This header is generated from the Khronos Vulkan XML API Registry. ** */ #ifdef __cplusplus extern "C" { #endif // vulkan_video_codec_av1std is a preprocessor guard. Do not pass it to API calls. #define vulkan_video_codec_av1std 1 #include "vulkan_video_codecs_common.h" #define STD_VIDEO_AV1_NUM_REF_FRAMES 8 #define STD_VIDEO_AV1_REFS_PER_FRAME 7 #define STD_VIDEO_AV1_TOTAL_REFS_PER_FRAME 8 #define STD_VIDEO_AV1_MAX_TILE_COLS 64 #define STD_VIDEO_AV1_MAX_TILE_ROWS 64 #define STD_VIDEO_AV1_MAX_SEGMENTS 8 #define STD_VIDEO_AV1_SEG_LVL_MAX 8 #define STD_VIDEO_AV1_PRIMARY_REF_NONE 7 #define STD_VIDEO_AV1_SELECT_INTEGER_MV 2 #define STD_VIDEO_AV1_SELECT_SCREEN_CONTENT_TOOLS 2 #define STD_VIDEO_AV1_SKIP_MODE_FRAMES 2 #define STD_VIDEO_AV1_MAX_LOOP_FILTER_STRENGTHS 4 #define STD_VIDEO_AV1_LOOP_FILTER_ADJUSTMENTS 2 #define STD_VIDEO_AV1_MAX_CDEF_FILTER_STRENGTHS 8 #define STD_VIDEO_AV1_MAX_NUM_PLANES 3 #define STD_VIDEO_AV1_GLOBAL_MOTION_PARAMS 6 #define STD_VIDEO_AV1_MAX_NUM_Y_POINTS 14 #define STD_VIDEO_AV1_MAX_NUM_CB_POINTS 10 #define STD_VIDEO_AV1_MAX_NUM_CR_POINTS 10 #define STD_VIDEO_AV1_MAX_NUM_POS_LUMA 24 #define STD_VIDEO_AV1_MAX_NUM_POS_CHROMA 25 typedef enum StdVideoAV1Profile { STD_VIDEO_AV1_PROFILE_MAIN = 0, STD_VIDEO_AV1_PROFILE_HIGH = 1, STD_VIDEO_AV1_PROFILE_PROFESSIONAL = 2, STD_VIDEO_AV1_PROFILE_INVALID = 0x7FFFFFFF, STD_VIDEO_AV1_PROFILE_MAX_ENUM = 0x7FFFFFFF } StdVideoAV1Profile; typedef enum StdVideoAV1Level { STD_VIDEO_AV1_LEVEL_2_0 = 0, STD_VIDEO_AV1_LEVEL_2_1 = 1, STD_VIDEO_AV1_LEVEL_2_2 = 2, STD_VIDEO_AV1_LEVEL_2_3 = 3, STD_VIDEO_AV1_LEVEL_3_0 = 4, STD_VIDEO_AV1_LEVEL_3_1 = 5, STD_VIDEO_AV1_LEVEL_3_2 = 6, STD_VIDEO_AV1_LEVEL_3_3 = 7, STD_VIDEO_AV1_LEVEL_4_0 = 8, STD_VIDEO_AV1_LEVEL_4_1 = 9, STD_VIDEO_AV1_LEVEL_4_2 = 10, STD_VIDEO_AV1_LEVEL_4_3 = 11, STD_VIDEO_AV1_LEVEL_5_0 = 12, STD_VIDEO_AV1_LEVEL_5_1 = 13, STD_VIDEO_AV1_LEVEL_5_2 = 14, STD_VIDEO_AV1_LEVEL_5_3 = 15, STD_VIDEO_AV1_LEVEL_6_0 = 16, STD_VIDEO_AV1_LEVEL_6_1 = 17, STD_VIDEO_AV1_LEVEL_6_2 = 18, STD_VIDEO_AV1_LEVEL_6_3 = 19, STD_VIDEO_AV1_LEVEL_7_0 = 20, STD_VIDEO_AV1_LEVEL_7_1 = 21, STD_VIDEO_AV1_LEVEL_7_2 = 22, STD_VIDEO_AV1_LEVEL_7_3 = 23, STD_VIDEO_AV1_LEVEL_INVALID = 0x7FFFFFFF, STD_VIDEO_AV1_LEVEL_MAX_ENUM = 0x7FFFFFFF } StdVideoAV1Level; typedef enum StdVideoAV1FrameType { STD_VIDEO_AV1_FRAME_TYPE_KEY = 0, STD_VIDEO_AV1_FRAME_TYPE_INTER = 1, STD_VIDEO_AV1_FRAME_TYPE_INTRA_ONLY = 2, STD_VIDEO_AV1_FRAME_TYPE_SWITCH = 3, STD_VIDEO_AV1_FRAME_TYPE_INVALID = 0x7FFFFFFF, STD_VIDEO_AV1_FRAME_TYPE_MAX_ENUM = 0x7FFFFFFF } StdVideoAV1FrameType; typedef enum StdVideoAV1ReferenceName { STD_VIDEO_AV1_REFERENCE_NAME_INTRA_FRAME = 0, STD_VIDEO_AV1_REFERENCE_NAME_LAST_FRAME = 1, STD_VIDEO_AV1_REFERENCE_NAME_LAST2_FRAME = 2, STD_VIDEO_AV1_REFERENCE_NAME_LAST3_FRAME = 3, STD_VIDEO_AV1_REFERENCE_NAME_GOLDEN_FRAME = 4, STD_VIDEO_AV1_REFERENCE_NAME_BWDREF_FRAME = 5, STD_VIDEO_AV1_REFERENCE_NAME_ALTREF2_FRAME = 6, STD_VIDEO_AV1_REFERENCE_NAME_ALTREF_FRAME = 7, STD_VIDEO_AV1_REFERENCE_NAME_INVALID = 0x7FFFFFFF, STD_VIDEO_AV1_REFERENCE_NAME_MAX_ENUM = 0x7FFFFFFF } StdVideoAV1ReferenceName; typedef enum StdVideoAV1InterpolationFilter { STD_VIDEO_AV1_INTERPOLATION_FILTER_EIGHTTAP = 0, STD_VIDEO_AV1_INTERPOLATION_FILTER_EIGHTTAP_SMOOTH = 1, STD_VIDEO_AV1_INTERPOLATION_FILTER_EIGHTTAP_SHARP = 2, STD_VIDEO_AV1_INTERPOLATION_FILTER_BILINEAR = 3, STD_VIDEO_AV1_INTERPOLATION_FILTER_SWITCHABLE = 4, STD_VIDEO_AV1_INTERPOLATION_FILTER_INVALID = 0x7FFFFFFF, STD_VIDEO_AV1_INTERPOLATION_FILTER_MAX_ENUM = 0x7FFFFFFF } StdVideoAV1InterpolationFilter; typedef enum StdVideoAV1TxMode { STD_VIDEO_AV1_TX_MODE_ONLY_4X4 = 0, STD_VIDEO_AV1_TX_MODE_LARGEST = 1, STD_VIDEO_AV1_TX_MODE_SELECT = 2, STD_VIDEO_AV1_TX_MODE_INVALID = 0x7FFFFFFF, STD_VIDEO_AV1_TX_MODE_MAX_ENUM = 0x7FFFFFFF } StdVideoAV1TxMode; typedef enum StdVideoAV1FrameRestorationType { STD_VIDEO_AV1_FRAME_RESTORATION_TYPE_NONE = 0, STD_VIDEO_AV1_FRAME_RESTORATION_TYPE_WIENER = 1, STD_VIDEO_AV1_FRAME_RESTORATION_TYPE_SGRPROJ = 2, STD_VIDEO_AV1_FRAME_RESTORATION_TYPE_SWITCHABLE = 3, STD_VIDEO_AV1_FRAME_RESTORATION_TYPE_INVALID = 0x7FFFFFFF, STD_VIDEO_AV1_FRAME_RESTORATION_TYPE_MAX_ENUM = 0x7FFFFFFF } StdVideoAV1FrameRestorationType; typedef enum StdVideoAV1ColorPrimaries { STD_VIDEO_AV1_COLOR_PRIMARIES_BT_709 = 1, STD_VIDEO_AV1_COLOR_PRIMARIES_UNSPECIFIED = 2, STD_VIDEO_AV1_COLOR_PRIMARIES_BT_470_M = 4, STD_VIDEO_AV1_COLOR_PRIMARIES_BT_470_B_G = 5, STD_VIDEO_AV1_COLOR_PRIMARIES_BT_601 = 6, STD_VIDEO_AV1_COLOR_PRIMARIES_SMPTE_240 = 7, STD_VIDEO_AV1_COLOR_PRIMARIES_GENERIC_FILM = 8, STD_VIDEO_AV1_COLOR_PRIMARIES_BT_2020 = 9, STD_VIDEO_AV1_COLOR_PRIMARIES_XYZ = 10, STD_VIDEO_AV1_COLOR_PRIMARIES_SMPTE_431 = 11, STD_VIDEO_AV1_COLOR_PRIMARIES_SMPTE_432 = 12, STD_VIDEO_AV1_COLOR_PRIMARIES_EBU_3213 = 22, STD_VIDEO_AV1_COLOR_PRIMARIES_INVALID = 0x7FFFFFFF, // STD_VIDEO_AV1_COLOR_PRIMARIES_BT_UNSPECIFIED is a deprecated alias STD_VIDEO_AV1_COLOR_PRIMARIES_BT_UNSPECIFIED = STD_VIDEO_AV1_COLOR_PRIMARIES_UNSPECIFIED, STD_VIDEO_AV1_COLOR_PRIMARIES_MAX_ENUM = 0x7FFFFFFF } StdVideoAV1ColorPrimaries; typedef enum StdVideoAV1TransferCharacteristics { STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_RESERVED_0 = 0, STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_BT_709 = 1, STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_UNSPECIFIED = 2, STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_RESERVED_3 = 3, STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_BT_470_M = 4, STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_BT_470_B_G = 5, STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_BT_601 = 6, STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_SMPTE_240 = 7, STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_LINEAR = 8, STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_LOG_100 = 9, STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_LOG_100_SQRT10 = 10, STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_IEC_61966 = 11, STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_BT_1361 = 12, STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_SRGB = 13, STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_BT_2020_10_BIT = 14, STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_BT_2020_12_BIT = 15, STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_SMPTE_2084 = 16, STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_SMPTE_428 = 17, STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_HLG = 18, STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_INVALID = 0x7FFFFFFF, STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_MAX_ENUM = 0x7FFFFFFF } StdVideoAV1TransferCharacteristics; typedef enum StdVideoAV1MatrixCoefficients { STD_VIDEO_AV1_MATRIX_COEFFICIENTS_IDENTITY = 0, STD_VIDEO_AV1_MATRIX_COEFFICIENTS_BT_709 = 1, STD_VIDEO_AV1_MATRIX_COEFFICIENTS_UNSPECIFIED = 2, STD_VIDEO_AV1_MATRIX_COEFFICIENTS_RESERVED_3 = 3, STD_VIDEO_AV1_MATRIX_COEFFICIENTS_FCC = 4, STD_VIDEO_AV1_MATRIX_COEFFICIENTS_BT_470_B_G = 5, STD_VIDEO_AV1_MATRIX_COEFFICIENTS_BT_601 = 6, STD_VIDEO_AV1_MATRIX_COEFFICIENTS_SMPTE_240 = 7, STD_VIDEO_AV1_MATRIX_COEFFICIENTS_SMPTE_YCGCO = 8, STD_VIDEO_AV1_MATRIX_COEFFICIENTS_BT_2020_NCL = 9, STD_VIDEO_AV1_MATRIX_COEFFICIENTS_BT_2020_CL = 10, STD_VIDEO_AV1_MATRIX_COEFFICIENTS_SMPTE_2085 = 11, STD_VIDEO_AV1_MATRIX_COEFFICIENTS_CHROMAT_NCL = 12, STD_VIDEO_AV1_MATRIX_COEFFICIENTS_CHROMAT_CL = 13, STD_VIDEO_AV1_MATRIX_COEFFICIENTS_ICTCP = 14, STD_VIDEO_AV1_MATRIX_COEFFICIENTS_INVALID = 0x7FFFFFFF, STD_VIDEO_AV1_MATRIX_COEFFICIENTS_MAX_ENUM = 0x7FFFFFFF } StdVideoAV1MatrixCoefficients; typedef enum StdVideoAV1ChromaSamplePosition { STD_VIDEO_AV1_CHROMA_SAMPLE_POSITION_UNKNOWN = 0, STD_VIDEO_AV1_CHROMA_SAMPLE_POSITION_VERTICAL = 1, STD_VIDEO_AV1_CHROMA_SAMPLE_POSITION_COLOCATED = 2, STD_VIDEO_AV1_CHROMA_SAMPLE_POSITION_RESERVED = 3, STD_VIDEO_AV1_CHROMA_SAMPLE_POSITION_INVALID = 0x7FFFFFFF, STD_VIDEO_AV1_CHROMA_SAMPLE_POSITION_MAX_ENUM = 0x7FFFFFFF } StdVideoAV1ChromaSamplePosition; typedef struct StdVideoAV1ColorConfigFlags { uint32_t mono_chrome : 1; uint32_t color_range : 1; uint32_t separate_uv_delta_q : 1; uint32_t color_description_present_flag : 1; uint32_t reserved : 28; } StdVideoAV1ColorConfigFlags; typedef struct StdVideoAV1ColorConfig { StdVideoAV1ColorConfigFlags flags; uint8_t BitDepth; uint8_t subsampling_x; uint8_t subsampling_y; uint8_t reserved1; StdVideoAV1ColorPrimaries color_primaries; StdVideoAV1TransferCharacteristics transfer_characteristics; StdVideoAV1MatrixCoefficients matrix_coefficients; StdVideoAV1ChromaSamplePosition chroma_sample_position; } StdVideoAV1ColorConfig; typedef struct StdVideoAV1TimingInfoFlags { uint32_t equal_picture_interval : 1; uint32_t reserved : 31; } StdVideoAV1TimingInfoFlags; typedef struct StdVideoAV1TimingInfo { StdVideoAV1TimingInfoFlags flags; uint32_t num_units_in_display_tick; uint32_t time_scale; uint32_t num_ticks_per_picture_minus_1; } StdVideoAV1TimingInfo; typedef struct StdVideoAV1LoopFilterFlags { uint32_t loop_filter_delta_enabled : 1; uint32_t loop_filter_delta_update : 1; uint32_t reserved : 30; } StdVideoAV1LoopFilterFlags; typedef struct StdVideoAV1LoopFilter { StdVideoAV1LoopFilterFlags flags; uint8_t loop_filter_level[STD_VIDEO_AV1_MAX_LOOP_FILTER_STRENGTHS]; uint8_t loop_filter_sharpness; uint8_t update_ref_delta; int8_t loop_filter_ref_deltas[STD_VIDEO_AV1_TOTAL_REFS_PER_FRAME]; uint8_t update_mode_delta; int8_t loop_filter_mode_deltas[STD_VIDEO_AV1_LOOP_FILTER_ADJUSTMENTS]; } StdVideoAV1LoopFilter; typedef struct StdVideoAV1QuantizationFlags { uint32_t using_qmatrix : 1; uint32_t diff_uv_delta : 1; uint32_t reserved : 30; } StdVideoAV1QuantizationFlags; typedef struct StdVideoAV1Quantization { StdVideoAV1QuantizationFlags flags; uint8_t base_q_idx; int8_t DeltaQYDc; int8_t DeltaQUDc; int8_t DeltaQUAc; int8_t DeltaQVDc; int8_t DeltaQVAc; uint8_t qm_y; uint8_t qm_u; uint8_t qm_v; } StdVideoAV1Quantization; typedef struct StdVideoAV1Segmentation { uint8_t FeatureEnabled[STD_VIDEO_AV1_MAX_SEGMENTS]; int16_t FeatureData[STD_VIDEO_AV1_MAX_SEGMENTS][STD_VIDEO_AV1_SEG_LVL_MAX]; } StdVideoAV1Segmentation; typedef struct StdVideoAV1TileInfoFlags { uint32_t uniform_tile_spacing_flag : 1; uint32_t reserved : 31; } StdVideoAV1TileInfoFlags; typedef struct StdVideoAV1TileInfo { StdVideoAV1TileInfoFlags flags; uint8_t TileCols; uint8_t TileRows; uint16_t context_update_tile_id; uint8_t tile_size_bytes_minus_1; uint8_t reserved1[7]; const uint16_t* pMiColStarts; const uint16_t* pMiRowStarts; const uint16_t* pWidthInSbsMinus1; const uint16_t* pHeightInSbsMinus1; } StdVideoAV1TileInfo; typedef struct StdVideoAV1CDEF { uint8_t cdef_damping_minus_3; uint8_t cdef_bits; uint8_t cdef_y_pri_strength[STD_VIDEO_AV1_MAX_CDEF_FILTER_STRENGTHS]; uint8_t cdef_y_sec_strength[STD_VIDEO_AV1_MAX_CDEF_FILTER_STRENGTHS]; uint8_t cdef_uv_pri_strength[STD_VIDEO_AV1_MAX_CDEF_FILTER_STRENGTHS]; uint8_t cdef_uv_sec_strength[STD_VIDEO_AV1_MAX_CDEF_FILTER_STRENGTHS]; } StdVideoAV1CDEF; typedef struct StdVideoAV1LoopRestoration { StdVideoAV1FrameRestorationType FrameRestorationType[STD_VIDEO_AV1_MAX_NUM_PLANES]; uint16_t LoopRestorationSize[STD_VIDEO_AV1_MAX_NUM_PLANES]; } StdVideoAV1LoopRestoration; typedef struct StdVideoAV1GlobalMotion { uint8_t GmType[STD_VIDEO_AV1_NUM_REF_FRAMES]; int32_t gm_params[STD_VIDEO_AV1_NUM_REF_FRAMES][STD_VIDEO_AV1_GLOBAL_MOTION_PARAMS]; } StdVideoAV1GlobalMotion; typedef struct StdVideoAV1FilmGrainFlags { uint32_t chroma_scaling_from_luma : 1; uint32_t overlap_flag : 1; uint32_t clip_to_restricted_range : 1; uint32_t update_grain : 1; uint32_t reserved : 28; } StdVideoAV1FilmGrainFlags; typedef struct StdVideoAV1FilmGrain { StdVideoAV1FilmGrainFlags flags; uint8_t grain_scaling_minus_8; uint8_t ar_coeff_lag; uint8_t ar_coeff_shift_minus_6; uint8_t grain_scale_shift; uint16_t grain_seed; uint8_t film_grain_params_ref_idx; uint8_t num_y_points; uint8_t point_y_value[STD_VIDEO_AV1_MAX_NUM_Y_POINTS]; uint8_t point_y_scaling[STD_VIDEO_AV1_MAX_NUM_Y_POINTS]; uint8_t num_cb_points; uint8_t point_cb_value[STD_VIDEO_AV1_MAX_NUM_CB_POINTS]; uint8_t point_cb_scaling[STD_VIDEO_AV1_MAX_NUM_CB_POINTS]; uint8_t num_cr_points; uint8_t point_cr_value[STD_VIDEO_AV1_MAX_NUM_CR_POINTS]; uint8_t point_cr_scaling[STD_VIDEO_AV1_MAX_NUM_CR_POINTS]; int8_t ar_coeffs_y_plus_128[STD_VIDEO_AV1_MAX_NUM_POS_LUMA]; int8_t ar_coeffs_cb_plus_128[STD_VIDEO_AV1_MAX_NUM_POS_CHROMA]; int8_t ar_coeffs_cr_plus_128[STD_VIDEO_AV1_MAX_NUM_POS_CHROMA]; uint8_t cb_mult; uint8_t cb_luma_mult; uint16_t cb_offset; uint8_t cr_mult; uint8_t cr_luma_mult; uint16_t cr_offset; } StdVideoAV1FilmGrain; typedef struct StdVideoAV1SequenceHeaderFlags { uint32_t still_picture : 1; uint32_t reduced_still_picture_header : 1; uint32_t use_128x128_superblock : 1; uint32_t enable_filter_intra : 1; uint32_t enable_intra_edge_filter : 1; uint32_t enable_interintra_compound : 1; uint32_t enable_masked_compound : 1; uint32_t enable_warped_motion : 1; uint32_t enable_dual_filter : 1; uint32_t enable_order_hint : 1; uint32_t enable_jnt_comp : 1; uint32_t enable_ref_frame_mvs : 1; uint32_t frame_id_numbers_present_flag : 1; uint32_t enable_superres : 1; uint32_t enable_cdef : 1; uint32_t enable_restoration : 1; uint32_t film_grain_params_present : 1; uint32_t timing_info_present_flag : 1; uint32_t initial_display_delay_present_flag : 1; uint32_t reserved : 13; } StdVideoAV1SequenceHeaderFlags; typedef struct StdVideoAV1SequenceHeader { StdVideoAV1SequenceHeaderFlags flags; StdVideoAV1Profile seq_profile; uint8_t frame_width_bits_minus_1; uint8_t frame_height_bits_minus_1; uint16_t max_frame_width_minus_1; uint16_t max_frame_height_minus_1; uint8_t delta_frame_id_length_minus_2; uint8_t additional_frame_id_length_minus_1; uint8_t order_hint_bits_minus_1; uint8_t seq_force_integer_mv; uint8_t seq_force_screen_content_tools; uint8_t reserved1[5]; const StdVideoAV1ColorConfig* pColorConfig; const StdVideoAV1TimingInfo* pTimingInfo; } StdVideoAV1SequenceHeader; #ifdef __cplusplus } #endif #endif ================================================ FILE: src/libraries/vk_video/vulkan_video_codec_av1std_decode.h ================================================ #ifndef VULKAN_VIDEO_CODEC_AV1STD_DECODE_H_ #define VULKAN_VIDEO_CODEC_AV1STD_DECODE_H_ 1 /* ** Copyright 2015-2025 The Khronos Group Inc. ** ** SPDX-License-Identifier: Apache-2.0 */ /* ** This header is generated from the Khronos Vulkan XML API Registry. ** */ #ifdef __cplusplus extern "C" { #endif // vulkan_video_codec_av1std_decode is a preprocessor guard. Do not pass it to API calls. #define vulkan_video_codec_av1std_decode 1 #include "vulkan_video_codec_av1std.h" #define VK_STD_VULKAN_VIDEO_CODEC_AV1_DECODE_API_VERSION_1_0_0 VK_MAKE_VIDEO_STD_VERSION(1, 0, 0) #define VK_STD_VULKAN_VIDEO_CODEC_AV1_DECODE_SPEC_VERSION VK_STD_VULKAN_VIDEO_CODEC_AV1_DECODE_API_VERSION_1_0_0 #define VK_STD_VULKAN_VIDEO_CODEC_AV1_DECODE_EXTENSION_NAME "VK_STD_vulkan_video_codec_av1_decode" typedef struct StdVideoDecodeAV1PictureInfoFlags { uint32_t error_resilient_mode : 1; uint32_t disable_cdf_update : 1; uint32_t use_superres : 1; uint32_t render_and_frame_size_different : 1; uint32_t allow_screen_content_tools : 1; uint32_t is_filter_switchable : 1; uint32_t force_integer_mv : 1; uint32_t frame_size_override_flag : 1; uint32_t buffer_removal_time_present_flag : 1; uint32_t allow_intrabc : 1; uint32_t frame_refs_short_signaling : 1; uint32_t allow_high_precision_mv : 1; uint32_t is_motion_mode_switchable : 1; uint32_t use_ref_frame_mvs : 1; uint32_t disable_frame_end_update_cdf : 1; uint32_t allow_warped_motion : 1; uint32_t reduced_tx_set : 1; uint32_t reference_select : 1; uint32_t skip_mode_present : 1; uint32_t delta_q_present : 1; uint32_t delta_lf_present : 1; uint32_t delta_lf_multi : 1; uint32_t segmentation_enabled : 1; uint32_t segmentation_update_map : 1; uint32_t segmentation_temporal_update : 1; uint32_t segmentation_update_data : 1; uint32_t UsesLr : 1; uint32_t usesChromaLr : 1; uint32_t apply_grain : 1; uint32_t reserved : 3; } StdVideoDecodeAV1PictureInfoFlags; typedef struct StdVideoDecodeAV1PictureInfo { StdVideoDecodeAV1PictureInfoFlags flags; StdVideoAV1FrameType frame_type; uint32_t current_frame_id; uint8_t OrderHint; uint8_t primary_ref_frame; uint8_t refresh_frame_flags; uint8_t reserved1; StdVideoAV1InterpolationFilter interpolation_filter; StdVideoAV1TxMode TxMode; uint8_t delta_q_res; uint8_t delta_lf_res; uint8_t SkipModeFrame[STD_VIDEO_AV1_SKIP_MODE_FRAMES]; uint8_t coded_denom; uint8_t reserved2[3]; uint8_t OrderHints[STD_VIDEO_AV1_NUM_REF_FRAMES]; uint32_t expectedFrameId[STD_VIDEO_AV1_NUM_REF_FRAMES]; const StdVideoAV1TileInfo* pTileInfo; const StdVideoAV1Quantization* pQuantization; const StdVideoAV1Segmentation* pSegmentation; const StdVideoAV1LoopFilter* pLoopFilter; const StdVideoAV1CDEF* pCDEF; const StdVideoAV1LoopRestoration* pLoopRestoration; const StdVideoAV1GlobalMotion* pGlobalMotion; const StdVideoAV1FilmGrain* pFilmGrain; } StdVideoDecodeAV1PictureInfo; typedef struct StdVideoDecodeAV1ReferenceInfoFlags { uint32_t disable_frame_end_update_cdf : 1; uint32_t segmentation_enabled : 1; uint32_t reserved : 30; } StdVideoDecodeAV1ReferenceInfoFlags; typedef struct StdVideoDecodeAV1ReferenceInfo { StdVideoDecodeAV1ReferenceInfoFlags flags; uint8_t frame_type; uint8_t RefFrameSignBias; uint8_t OrderHint; uint8_t SavedOrderHints[STD_VIDEO_AV1_NUM_REF_FRAMES]; } StdVideoDecodeAV1ReferenceInfo; #ifdef __cplusplus } #endif #endif ================================================ FILE: src/libraries/vk_video/vulkan_video_codec_av1std_encode.h ================================================ #ifndef VULKAN_VIDEO_CODEC_AV1STD_ENCODE_H_ #define VULKAN_VIDEO_CODEC_AV1STD_ENCODE_H_ 1 /* ** Copyright 2015-2025 The Khronos Group Inc. ** ** SPDX-License-Identifier: Apache-2.0 */ /* ** This header is generated from the Khronos Vulkan XML API Registry. ** */ #ifdef __cplusplus extern "C" { #endif // vulkan_video_codec_av1std_encode is a preprocessor guard. Do not pass it to API calls. #define vulkan_video_codec_av1std_encode 1 #include "vulkan_video_codec_av1std.h" #define VK_STD_VULKAN_VIDEO_CODEC_AV1_ENCODE_API_VERSION_1_0_0 VK_MAKE_VIDEO_STD_VERSION(1, 0, 0) #define VK_STD_VULKAN_VIDEO_CODEC_AV1_ENCODE_SPEC_VERSION VK_STD_VULKAN_VIDEO_CODEC_AV1_ENCODE_API_VERSION_1_0_0 #define VK_STD_VULKAN_VIDEO_CODEC_AV1_ENCODE_EXTENSION_NAME "VK_STD_vulkan_video_codec_av1_encode" typedef struct StdVideoEncodeAV1DecoderModelInfo { uint8_t buffer_delay_length_minus_1; uint8_t buffer_removal_time_length_minus_1; uint8_t frame_presentation_time_length_minus_1; uint8_t reserved1; uint32_t num_units_in_decoding_tick; } StdVideoEncodeAV1DecoderModelInfo; typedef struct StdVideoEncodeAV1ExtensionHeader { uint8_t temporal_id; uint8_t spatial_id; } StdVideoEncodeAV1ExtensionHeader; typedef struct StdVideoEncodeAV1OperatingPointInfoFlags { uint32_t decoder_model_present_for_this_op : 1; uint32_t low_delay_mode_flag : 1; uint32_t initial_display_delay_present_for_this_op : 1; uint32_t reserved : 29; } StdVideoEncodeAV1OperatingPointInfoFlags; typedef struct StdVideoEncodeAV1OperatingPointInfo { StdVideoEncodeAV1OperatingPointInfoFlags flags; uint16_t operating_point_idc; uint8_t seq_level_idx; uint8_t seq_tier; uint32_t decoder_buffer_delay; uint32_t encoder_buffer_delay; uint8_t initial_display_delay_minus_1; } StdVideoEncodeAV1OperatingPointInfo; typedef struct StdVideoEncodeAV1PictureInfoFlags { uint32_t error_resilient_mode : 1; uint32_t disable_cdf_update : 1; uint32_t use_superres : 1; uint32_t render_and_frame_size_different : 1; uint32_t allow_screen_content_tools : 1; uint32_t is_filter_switchable : 1; uint32_t force_integer_mv : 1; uint32_t frame_size_override_flag : 1; uint32_t buffer_removal_time_present_flag : 1; uint32_t allow_intrabc : 1; uint32_t frame_refs_short_signaling : 1; uint32_t allow_high_precision_mv : 1; uint32_t is_motion_mode_switchable : 1; uint32_t use_ref_frame_mvs : 1; uint32_t disable_frame_end_update_cdf : 1; uint32_t allow_warped_motion : 1; uint32_t reduced_tx_set : 1; uint32_t skip_mode_present : 1; uint32_t delta_q_present : 1; uint32_t delta_lf_present : 1; uint32_t delta_lf_multi : 1; uint32_t segmentation_enabled : 1; uint32_t segmentation_update_map : 1; uint32_t segmentation_temporal_update : 1; uint32_t segmentation_update_data : 1; uint32_t UsesLr : 1; uint32_t usesChromaLr : 1; uint32_t show_frame : 1; uint32_t showable_frame : 1; uint32_t reserved : 3; } StdVideoEncodeAV1PictureInfoFlags; typedef struct StdVideoEncodeAV1PictureInfo { StdVideoEncodeAV1PictureInfoFlags flags; StdVideoAV1FrameType frame_type; uint32_t frame_presentation_time; uint32_t current_frame_id; uint8_t order_hint; uint8_t primary_ref_frame; uint8_t refresh_frame_flags; uint8_t coded_denom; uint16_t render_width_minus_1; uint16_t render_height_minus_1; StdVideoAV1InterpolationFilter interpolation_filter; StdVideoAV1TxMode TxMode; uint8_t delta_q_res; uint8_t delta_lf_res; uint8_t ref_order_hint[STD_VIDEO_AV1_NUM_REF_FRAMES]; int8_t ref_frame_idx[STD_VIDEO_AV1_REFS_PER_FRAME]; uint8_t reserved1[3]; uint32_t delta_frame_id_minus_1[STD_VIDEO_AV1_REFS_PER_FRAME]; const StdVideoAV1TileInfo* pTileInfo; const StdVideoAV1Quantization* pQuantization; const StdVideoAV1Segmentation* pSegmentation; const StdVideoAV1LoopFilter* pLoopFilter; const StdVideoAV1CDEF* pCDEF; const StdVideoAV1LoopRestoration* pLoopRestoration; const StdVideoAV1GlobalMotion* pGlobalMotion; const StdVideoEncodeAV1ExtensionHeader* pExtensionHeader; const uint32_t* pBufferRemovalTimes; } StdVideoEncodeAV1PictureInfo; typedef struct StdVideoEncodeAV1ReferenceInfoFlags { uint32_t disable_frame_end_update_cdf : 1; uint32_t segmentation_enabled : 1; uint32_t reserved : 30; } StdVideoEncodeAV1ReferenceInfoFlags; typedef struct StdVideoEncodeAV1ReferenceInfo { StdVideoEncodeAV1ReferenceInfoFlags flags; uint32_t RefFrameId; StdVideoAV1FrameType frame_type; uint8_t OrderHint; uint8_t reserved1[3]; const StdVideoEncodeAV1ExtensionHeader* pExtensionHeader; } StdVideoEncodeAV1ReferenceInfo; #ifdef __cplusplus } #endif #endif ================================================ FILE: src/libraries/vk_video/vulkan_video_codec_h264std.h ================================================ #ifndef VULKAN_VIDEO_CODEC_H264STD_H_ #define VULKAN_VIDEO_CODEC_H264STD_H_ 1 /* ** Copyright 2015-2025 The Khronos Group Inc. ** ** SPDX-License-Identifier: Apache-2.0 */ /* ** This header is generated from the Khronos Vulkan XML API Registry. ** */ #ifdef __cplusplus extern "C" { #endif // vulkan_video_codec_h264std is a preprocessor guard. Do not pass it to API calls. #define vulkan_video_codec_h264std 1 #include "vulkan_video_codecs_common.h" #define STD_VIDEO_H264_CPB_CNT_LIST_SIZE 32 #define STD_VIDEO_H264_SCALING_LIST_4X4_NUM_LISTS 6 #define STD_VIDEO_H264_SCALING_LIST_4X4_NUM_ELEMENTS 16 #define STD_VIDEO_H264_SCALING_LIST_8X8_NUM_LISTS 6 #define STD_VIDEO_H264_SCALING_LIST_8X8_NUM_ELEMENTS 64 #define STD_VIDEO_H264_MAX_NUM_LIST_REF 32 #define STD_VIDEO_H264_MAX_CHROMA_PLANES 2 #define STD_VIDEO_H264_NO_REFERENCE_PICTURE 0xFF typedef enum StdVideoH264ChromaFormatIdc { STD_VIDEO_H264_CHROMA_FORMAT_IDC_MONOCHROME = 0, STD_VIDEO_H264_CHROMA_FORMAT_IDC_420 = 1, STD_VIDEO_H264_CHROMA_FORMAT_IDC_422 = 2, STD_VIDEO_H264_CHROMA_FORMAT_IDC_444 = 3, STD_VIDEO_H264_CHROMA_FORMAT_IDC_INVALID = 0x7FFFFFFF, STD_VIDEO_H264_CHROMA_FORMAT_IDC_MAX_ENUM = 0x7FFFFFFF } StdVideoH264ChromaFormatIdc; typedef enum StdVideoH264ProfileIdc { STD_VIDEO_H264_PROFILE_IDC_BASELINE = 66, STD_VIDEO_H264_PROFILE_IDC_MAIN = 77, STD_VIDEO_H264_PROFILE_IDC_HIGH = 100, STD_VIDEO_H264_PROFILE_IDC_HIGH_444_PREDICTIVE = 244, STD_VIDEO_H264_PROFILE_IDC_INVALID = 0x7FFFFFFF, STD_VIDEO_H264_PROFILE_IDC_MAX_ENUM = 0x7FFFFFFF } StdVideoH264ProfileIdc; typedef enum StdVideoH264LevelIdc { STD_VIDEO_H264_LEVEL_IDC_1_0 = 0, STD_VIDEO_H264_LEVEL_IDC_1_1 = 1, STD_VIDEO_H264_LEVEL_IDC_1_2 = 2, STD_VIDEO_H264_LEVEL_IDC_1_3 = 3, STD_VIDEO_H264_LEVEL_IDC_2_0 = 4, STD_VIDEO_H264_LEVEL_IDC_2_1 = 5, STD_VIDEO_H264_LEVEL_IDC_2_2 = 6, STD_VIDEO_H264_LEVEL_IDC_3_0 = 7, STD_VIDEO_H264_LEVEL_IDC_3_1 = 8, STD_VIDEO_H264_LEVEL_IDC_3_2 = 9, STD_VIDEO_H264_LEVEL_IDC_4_0 = 10, STD_VIDEO_H264_LEVEL_IDC_4_1 = 11, STD_VIDEO_H264_LEVEL_IDC_4_2 = 12, STD_VIDEO_H264_LEVEL_IDC_5_0 = 13, STD_VIDEO_H264_LEVEL_IDC_5_1 = 14, STD_VIDEO_H264_LEVEL_IDC_5_2 = 15, STD_VIDEO_H264_LEVEL_IDC_6_0 = 16, STD_VIDEO_H264_LEVEL_IDC_6_1 = 17, STD_VIDEO_H264_LEVEL_IDC_6_2 = 18, STD_VIDEO_H264_LEVEL_IDC_INVALID = 0x7FFFFFFF, STD_VIDEO_H264_LEVEL_IDC_MAX_ENUM = 0x7FFFFFFF } StdVideoH264LevelIdc; typedef enum StdVideoH264PocType { STD_VIDEO_H264_POC_TYPE_0 = 0, STD_VIDEO_H264_POC_TYPE_1 = 1, STD_VIDEO_H264_POC_TYPE_2 = 2, STD_VIDEO_H264_POC_TYPE_INVALID = 0x7FFFFFFF, STD_VIDEO_H264_POC_TYPE_MAX_ENUM = 0x7FFFFFFF } StdVideoH264PocType; typedef enum StdVideoH264AspectRatioIdc { STD_VIDEO_H264_ASPECT_RATIO_IDC_UNSPECIFIED = 0, STD_VIDEO_H264_ASPECT_RATIO_IDC_SQUARE = 1, STD_VIDEO_H264_ASPECT_RATIO_IDC_12_11 = 2, STD_VIDEO_H264_ASPECT_RATIO_IDC_10_11 = 3, STD_VIDEO_H264_ASPECT_RATIO_IDC_16_11 = 4, STD_VIDEO_H264_ASPECT_RATIO_IDC_40_33 = 5, STD_VIDEO_H264_ASPECT_RATIO_IDC_24_11 = 6, STD_VIDEO_H264_ASPECT_RATIO_IDC_20_11 = 7, STD_VIDEO_H264_ASPECT_RATIO_IDC_32_11 = 8, STD_VIDEO_H264_ASPECT_RATIO_IDC_80_33 = 9, STD_VIDEO_H264_ASPECT_RATIO_IDC_18_11 = 10, STD_VIDEO_H264_ASPECT_RATIO_IDC_15_11 = 11, STD_VIDEO_H264_ASPECT_RATIO_IDC_64_33 = 12, STD_VIDEO_H264_ASPECT_RATIO_IDC_160_99 = 13, STD_VIDEO_H264_ASPECT_RATIO_IDC_4_3 = 14, STD_VIDEO_H264_ASPECT_RATIO_IDC_3_2 = 15, STD_VIDEO_H264_ASPECT_RATIO_IDC_2_1 = 16, STD_VIDEO_H264_ASPECT_RATIO_IDC_EXTENDED_SAR = 255, STD_VIDEO_H264_ASPECT_RATIO_IDC_INVALID = 0x7FFFFFFF, STD_VIDEO_H264_ASPECT_RATIO_IDC_MAX_ENUM = 0x7FFFFFFF } StdVideoH264AspectRatioIdc; typedef enum StdVideoH264WeightedBipredIdc { STD_VIDEO_H264_WEIGHTED_BIPRED_IDC_DEFAULT = 0, STD_VIDEO_H264_WEIGHTED_BIPRED_IDC_EXPLICIT = 1, STD_VIDEO_H264_WEIGHTED_BIPRED_IDC_IMPLICIT = 2, STD_VIDEO_H264_WEIGHTED_BIPRED_IDC_INVALID = 0x7FFFFFFF, STD_VIDEO_H264_WEIGHTED_BIPRED_IDC_MAX_ENUM = 0x7FFFFFFF } StdVideoH264WeightedBipredIdc; typedef enum StdVideoH264ModificationOfPicNumsIdc { STD_VIDEO_H264_MODIFICATION_OF_PIC_NUMS_IDC_SHORT_TERM_SUBTRACT = 0, STD_VIDEO_H264_MODIFICATION_OF_PIC_NUMS_IDC_SHORT_TERM_ADD = 1, STD_VIDEO_H264_MODIFICATION_OF_PIC_NUMS_IDC_LONG_TERM = 2, STD_VIDEO_H264_MODIFICATION_OF_PIC_NUMS_IDC_END = 3, STD_VIDEO_H264_MODIFICATION_OF_PIC_NUMS_IDC_INVALID = 0x7FFFFFFF, STD_VIDEO_H264_MODIFICATION_OF_PIC_NUMS_IDC_MAX_ENUM = 0x7FFFFFFF } StdVideoH264ModificationOfPicNumsIdc; typedef enum StdVideoH264MemMgmtControlOp { STD_VIDEO_H264_MEM_MGMT_CONTROL_OP_END = 0, STD_VIDEO_H264_MEM_MGMT_CONTROL_OP_UNMARK_SHORT_TERM = 1, STD_VIDEO_H264_MEM_MGMT_CONTROL_OP_UNMARK_LONG_TERM = 2, STD_VIDEO_H264_MEM_MGMT_CONTROL_OP_MARK_LONG_TERM = 3, STD_VIDEO_H264_MEM_MGMT_CONTROL_OP_SET_MAX_LONG_TERM_INDEX = 4, STD_VIDEO_H264_MEM_MGMT_CONTROL_OP_UNMARK_ALL = 5, STD_VIDEO_H264_MEM_MGMT_CONTROL_OP_MARK_CURRENT_AS_LONG_TERM = 6, STD_VIDEO_H264_MEM_MGMT_CONTROL_OP_INVALID = 0x7FFFFFFF, STD_VIDEO_H264_MEM_MGMT_CONTROL_OP_MAX_ENUM = 0x7FFFFFFF } StdVideoH264MemMgmtControlOp; typedef enum StdVideoH264CabacInitIdc { STD_VIDEO_H264_CABAC_INIT_IDC_0 = 0, STD_VIDEO_H264_CABAC_INIT_IDC_1 = 1, STD_VIDEO_H264_CABAC_INIT_IDC_2 = 2, STD_VIDEO_H264_CABAC_INIT_IDC_INVALID = 0x7FFFFFFF, STD_VIDEO_H264_CABAC_INIT_IDC_MAX_ENUM = 0x7FFFFFFF } StdVideoH264CabacInitIdc; typedef enum StdVideoH264DisableDeblockingFilterIdc { STD_VIDEO_H264_DISABLE_DEBLOCKING_FILTER_IDC_DISABLED = 0, STD_VIDEO_H264_DISABLE_DEBLOCKING_FILTER_IDC_ENABLED = 1, STD_VIDEO_H264_DISABLE_DEBLOCKING_FILTER_IDC_PARTIAL = 2, STD_VIDEO_H264_DISABLE_DEBLOCKING_FILTER_IDC_INVALID = 0x7FFFFFFF, STD_VIDEO_H264_DISABLE_DEBLOCKING_FILTER_IDC_MAX_ENUM = 0x7FFFFFFF } StdVideoH264DisableDeblockingFilterIdc; typedef enum StdVideoH264SliceType { STD_VIDEO_H264_SLICE_TYPE_P = 0, STD_VIDEO_H264_SLICE_TYPE_B = 1, STD_VIDEO_H264_SLICE_TYPE_I = 2, STD_VIDEO_H264_SLICE_TYPE_INVALID = 0x7FFFFFFF, STD_VIDEO_H264_SLICE_TYPE_MAX_ENUM = 0x7FFFFFFF } StdVideoH264SliceType; typedef enum StdVideoH264PictureType { STD_VIDEO_H264_PICTURE_TYPE_P = 0, STD_VIDEO_H264_PICTURE_TYPE_B = 1, STD_VIDEO_H264_PICTURE_TYPE_I = 2, STD_VIDEO_H264_PICTURE_TYPE_IDR = 5, STD_VIDEO_H264_PICTURE_TYPE_INVALID = 0x7FFFFFFF, STD_VIDEO_H264_PICTURE_TYPE_MAX_ENUM = 0x7FFFFFFF } StdVideoH264PictureType; typedef enum StdVideoH264NonVclNaluType { STD_VIDEO_H264_NON_VCL_NALU_TYPE_SPS = 0, STD_VIDEO_H264_NON_VCL_NALU_TYPE_PPS = 1, STD_VIDEO_H264_NON_VCL_NALU_TYPE_AUD = 2, STD_VIDEO_H264_NON_VCL_NALU_TYPE_PREFIX = 3, STD_VIDEO_H264_NON_VCL_NALU_TYPE_END_OF_SEQUENCE = 4, STD_VIDEO_H264_NON_VCL_NALU_TYPE_END_OF_STREAM = 5, STD_VIDEO_H264_NON_VCL_NALU_TYPE_PRECODED = 6, STD_VIDEO_H264_NON_VCL_NALU_TYPE_INVALID = 0x7FFFFFFF, STD_VIDEO_H264_NON_VCL_NALU_TYPE_MAX_ENUM = 0x7FFFFFFF } StdVideoH264NonVclNaluType; typedef struct StdVideoH264SpsVuiFlags { uint32_t aspect_ratio_info_present_flag : 1; uint32_t overscan_info_present_flag : 1; uint32_t overscan_appropriate_flag : 1; uint32_t video_signal_type_present_flag : 1; uint32_t video_full_range_flag : 1; uint32_t color_description_present_flag : 1; uint32_t chroma_loc_info_present_flag : 1; uint32_t timing_info_present_flag : 1; uint32_t fixed_frame_rate_flag : 1; uint32_t bitstream_restriction_flag : 1; uint32_t nal_hrd_parameters_present_flag : 1; uint32_t vcl_hrd_parameters_present_flag : 1; } StdVideoH264SpsVuiFlags; typedef struct StdVideoH264HrdParameters { uint8_t cpb_cnt_minus1; uint8_t bit_rate_scale; uint8_t cpb_size_scale; uint8_t reserved1; uint32_t bit_rate_value_minus1[STD_VIDEO_H264_CPB_CNT_LIST_SIZE]; uint32_t cpb_size_value_minus1[STD_VIDEO_H264_CPB_CNT_LIST_SIZE]; uint8_t cbr_flag[STD_VIDEO_H264_CPB_CNT_LIST_SIZE]; uint32_t initial_cpb_removal_delay_length_minus1; uint32_t cpb_removal_delay_length_minus1; uint32_t dpb_output_delay_length_minus1; uint32_t time_offset_length; } StdVideoH264HrdParameters; typedef struct StdVideoH264SequenceParameterSetVui { StdVideoH264SpsVuiFlags flags; StdVideoH264AspectRatioIdc aspect_ratio_idc; uint16_t sar_width; uint16_t sar_height; uint8_t video_format; uint8_t colour_primaries; uint8_t transfer_characteristics; uint8_t matrix_coefficients; uint32_t num_units_in_tick; uint32_t time_scale; uint8_t max_num_reorder_frames; uint8_t max_dec_frame_buffering; uint8_t chroma_sample_loc_type_top_field; uint8_t chroma_sample_loc_type_bottom_field; uint32_t reserved1; const StdVideoH264HrdParameters* pHrdParameters; } StdVideoH264SequenceParameterSetVui; typedef struct StdVideoH264SpsFlags { uint32_t constraint_set0_flag : 1; uint32_t constraint_set1_flag : 1; uint32_t constraint_set2_flag : 1; uint32_t constraint_set3_flag : 1; uint32_t constraint_set4_flag : 1; uint32_t constraint_set5_flag : 1; uint32_t direct_8x8_inference_flag : 1; uint32_t mb_adaptive_frame_field_flag : 1; uint32_t frame_mbs_only_flag : 1; uint32_t delta_pic_order_always_zero_flag : 1; uint32_t separate_colour_plane_flag : 1; uint32_t gaps_in_frame_num_value_allowed_flag : 1; uint32_t qpprime_y_zero_transform_bypass_flag : 1; uint32_t frame_cropping_flag : 1; uint32_t seq_scaling_matrix_present_flag : 1; uint32_t vui_parameters_present_flag : 1; } StdVideoH264SpsFlags; typedef struct StdVideoH264ScalingLists { uint16_t scaling_list_present_mask; uint16_t use_default_scaling_matrix_mask; uint8_t ScalingList4x4[STD_VIDEO_H264_SCALING_LIST_4X4_NUM_LISTS][STD_VIDEO_H264_SCALING_LIST_4X4_NUM_ELEMENTS]; uint8_t ScalingList8x8[STD_VIDEO_H264_SCALING_LIST_8X8_NUM_LISTS][STD_VIDEO_H264_SCALING_LIST_8X8_NUM_ELEMENTS]; } StdVideoH264ScalingLists; typedef struct StdVideoH264SequenceParameterSet { StdVideoH264SpsFlags flags; StdVideoH264ProfileIdc profile_idc; StdVideoH264LevelIdc level_idc; StdVideoH264ChromaFormatIdc chroma_format_idc; uint8_t seq_parameter_set_id; uint8_t bit_depth_luma_minus8; uint8_t bit_depth_chroma_minus8; uint8_t log2_max_frame_num_minus4; StdVideoH264PocType pic_order_cnt_type; int32_t offset_for_non_ref_pic; int32_t offset_for_top_to_bottom_field; uint8_t log2_max_pic_order_cnt_lsb_minus4; uint8_t num_ref_frames_in_pic_order_cnt_cycle; uint8_t max_num_ref_frames; uint8_t reserved1; uint32_t pic_width_in_mbs_minus1; uint32_t pic_height_in_map_units_minus1; uint32_t frame_crop_left_offset; uint32_t frame_crop_right_offset; uint32_t frame_crop_top_offset; uint32_t frame_crop_bottom_offset; uint32_t reserved2; const int32_t* pOffsetForRefFrame; const StdVideoH264ScalingLists* pScalingLists; const StdVideoH264SequenceParameterSetVui* pSequenceParameterSetVui; } StdVideoH264SequenceParameterSet; typedef struct StdVideoH264PpsFlags { uint32_t transform_8x8_mode_flag : 1; uint32_t redundant_pic_cnt_present_flag : 1; uint32_t constrained_intra_pred_flag : 1; uint32_t deblocking_filter_control_present_flag : 1; uint32_t weighted_pred_flag : 1; uint32_t bottom_field_pic_order_in_frame_present_flag : 1; uint32_t entropy_coding_mode_flag : 1; uint32_t pic_scaling_matrix_present_flag : 1; } StdVideoH264PpsFlags; typedef struct StdVideoH264PictureParameterSet { StdVideoH264PpsFlags flags; uint8_t seq_parameter_set_id; uint8_t pic_parameter_set_id; uint8_t num_ref_idx_l0_default_active_minus1; uint8_t num_ref_idx_l1_default_active_minus1; StdVideoH264WeightedBipredIdc weighted_bipred_idc; int8_t pic_init_qp_minus26; int8_t pic_init_qs_minus26; int8_t chroma_qp_index_offset; int8_t second_chroma_qp_index_offset; const StdVideoH264ScalingLists* pScalingLists; } StdVideoH264PictureParameterSet; #ifdef __cplusplus } #endif #endif ================================================ FILE: src/libraries/vk_video/vulkan_video_codec_h264std_decode.h ================================================ #ifndef VULKAN_VIDEO_CODEC_H264STD_DECODE_H_ #define VULKAN_VIDEO_CODEC_H264STD_DECODE_H_ 1 /* ** Copyright 2015-2025 The Khronos Group Inc. ** ** SPDX-License-Identifier: Apache-2.0 */ /* ** This header is generated from the Khronos Vulkan XML API Registry. ** */ #ifdef __cplusplus extern "C" { #endif // vulkan_video_codec_h264std_decode is a preprocessor guard. Do not pass it to API calls. #define vulkan_video_codec_h264std_decode 1 #include "vulkan_video_codec_h264std.h" #define VK_STD_VULKAN_VIDEO_CODEC_H264_DECODE_API_VERSION_1_0_0 VK_MAKE_VIDEO_STD_VERSION(1, 0, 0) #define VK_STD_VULKAN_VIDEO_CODEC_H264_DECODE_SPEC_VERSION VK_STD_VULKAN_VIDEO_CODEC_H264_DECODE_API_VERSION_1_0_0 #define VK_STD_VULKAN_VIDEO_CODEC_H264_DECODE_EXTENSION_NAME "VK_STD_vulkan_video_codec_h264_decode" #define STD_VIDEO_DECODE_H264_FIELD_ORDER_COUNT_LIST_SIZE 2 typedef enum StdVideoDecodeH264FieldOrderCount { STD_VIDEO_DECODE_H264_FIELD_ORDER_COUNT_TOP = 0, STD_VIDEO_DECODE_H264_FIELD_ORDER_COUNT_BOTTOM = 1, STD_VIDEO_DECODE_H264_FIELD_ORDER_COUNT_INVALID = 0x7FFFFFFF, STD_VIDEO_DECODE_H264_FIELD_ORDER_COUNT_MAX_ENUM = 0x7FFFFFFF } StdVideoDecodeH264FieldOrderCount; typedef struct StdVideoDecodeH264PictureInfoFlags { uint32_t field_pic_flag : 1; uint32_t is_intra : 1; uint32_t IdrPicFlag : 1; uint32_t bottom_field_flag : 1; uint32_t is_reference : 1; uint32_t complementary_field_pair : 1; } StdVideoDecodeH264PictureInfoFlags; typedef struct StdVideoDecodeH264PictureInfo { StdVideoDecodeH264PictureInfoFlags flags; uint8_t seq_parameter_set_id; uint8_t pic_parameter_set_id; uint8_t reserved1; uint8_t reserved2; uint16_t frame_num; uint16_t idr_pic_id; int32_t PicOrderCnt[STD_VIDEO_DECODE_H264_FIELD_ORDER_COUNT_LIST_SIZE]; } StdVideoDecodeH264PictureInfo; typedef struct StdVideoDecodeH264ReferenceInfoFlags { uint32_t top_field_flag : 1; uint32_t bottom_field_flag : 1; uint32_t used_for_long_term_reference : 1; uint32_t is_non_existing : 1; } StdVideoDecodeH264ReferenceInfoFlags; typedef struct StdVideoDecodeH264ReferenceInfo { StdVideoDecodeH264ReferenceInfoFlags flags; uint16_t FrameNum; uint16_t reserved; int32_t PicOrderCnt[STD_VIDEO_DECODE_H264_FIELD_ORDER_COUNT_LIST_SIZE]; } StdVideoDecodeH264ReferenceInfo; #ifdef __cplusplus } #endif #endif ================================================ FILE: src/libraries/vk_video/vulkan_video_codec_h264std_encode.h ================================================ #ifndef VULKAN_VIDEO_CODEC_H264STD_ENCODE_H_ #define VULKAN_VIDEO_CODEC_H264STD_ENCODE_H_ 1 /* ** Copyright 2015-2025 The Khronos Group Inc. ** ** SPDX-License-Identifier: Apache-2.0 */ /* ** This header is generated from the Khronos Vulkan XML API Registry. ** */ #ifdef __cplusplus extern "C" { #endif // vulkan_video_codec_h264std_encode is a preprocessor guard. Do not pass it to API calls. #define vulkan_video_codec_h264std_encode 1 #include "vulkan_video_codec_h264std.h" #define VK_STD_VULKAN_VIDEO_CODEC_H264_ENCODE_API_VERSION_1_0_0 VK_MAKE_VIDEO_STD_VERSION(1, 0, 0) #define VK_STD_VULKAN_VIDEO_CODEC_H264_ENCODE_SPEC_VERSION VK_STD_VULKAN_VIDEO_CODEC_H264_ENCODE_API_VERSION_1_0_0 #define VK_STD_VULKAN_VIDEO_CODEC_H264_ENCODE_EXTENSION_NAME "VK_STD_vulkan_video_codec_h264_encode" typedef struct StdVideoEncodeH264WeightTableFlags { uint32_t luma_weight_l0_flag; uint32_t chroma_weight_l0_flag; uint32_t luma_weight_l1_flag; uint32_t chroma_weight_l1_flag; } StdVideoEncodeH264WeightTableFlags; typedef struct StdVideoEncodeH264WeightTable { StdVideoEncodeH264WeightTableFlags flags; uint8_t luma_log2_weight_denom; uint8_t chroma_log2_weight_denom; int8_t luma_weight_l0[STD_VIDEO_H264_MAX_NUM_LIST_REF]; int8_t luma_offset_l0[STD_VIDEO_H264_MAX_NUM_LIST_REF]; int8_t chroma_weight_l0[STD_VIDEO_H264_MAX_NUM_LIST_REF][STD_VIDEO_H264_MAX_CHROMA_PLANES]; int8_t chroma_offset_l0[STD_VIDEO_H264_MAX_NUM_LIST_REF][STD_VIDEO_H264_MAX_CHROMA_PLANES]; int8_t luma_weight_l1[STD_VIDEO_H264_MAX_NUM_LIST_REF]; int8_t luma_offset_l1[STD_VIDEO_H264_MAX_NUM_LIST_REF]; int8_t chroma_weight_l1[STD_VIDEO_H264_MAX_NUM_LIST_REF][STD_VIDEO_H264_MAX_CHROMA_PLANES]; int8_t chroma_offset_l1[STD_VIDEO_H264_MAX_NUM_LIST_REF][STD_VIDEO_H264_MAX_CHROMA_PLANES]; } StdVideoEncodeH264WeightTable; typedef struct StdVideoEncodeH264SliceHeaderFlags { uint32_t direct_spatial_mv_pred_flag : 1; uint32_t num_ref_idx_active_override_flag : 1; uint32_t reserved : 30; } StdVideoEncodeH264SliceHeaderFlags; typedef struct StdVideoEncodeH264PictureInfoFlags { uint32_t IdrPicFlag : 1; uint32_t is_reference : 1; uint32_t no_output_of_prior_pics_flag : 1; uint32_t long_term_reference_flag : 1; uint32_t adaptive_ref_pic_marking_mode_flag : 1; uint32_t reserved : 27; } StdVideoEncodeH264PictureInfoFlags; typedef struct StdVideoEncodeH264ReferenceInfoFlags { uint32_t used_for_long_term_reference : 1; uint32_t reserved : 31; } StdVideoEncodeH264ReferenceInfoFlags; typedef struct StdVideoEncodeH264ReferenceListsInfoFlags { uint32_t ref_pic_list_modification_flag_l0 : 1; uint32_t ref_pic_list_modification_flag_l1 : 1; uint32_t reserved : 30; } StdVideoEncodeH264ReferenceListsInfoFlags; typedef struct StdVideoEncodeH264RefListModEntry { StdVideoH264ModificationOfPicNumsIdc modification_of_pic_nums_idc; uint16_t abs_diff_pic_num_minus1; uint16_t long_term_pic_num; } StdVideoEncodeH264RefListModEntry; typedef struct StdVideoEncodeH264RefPicMarkingEntry { StdVideoH264MemMgmtControlOp memory_management_control_operation; uint16_t difference_of_pic_nums_minus1; uint16_t long_term_pic_num; uint16_t long_term_frame_idx; uint16_t max_long_term_frame_idx_plus1; } StdVideoEncodeH264RefPicMarkingEntry; typedef struct StdVideoEncodeH264ReferenceListsInfo { StdVideoEncodeH264ReferenceListsInfoFlags flags; uint8_t num_ref_idx_l0_active_minus1; uint8_t num_ref_idx_l1_active_minus1; uint8_t RefPicList0[STD_VIDEO_H264_MAX_NUM_LIST_REF]; uint8_t RefPicList1[STD_VIDEO_H264_MAX_NUM_LIST_REF]; uint8_t refList0ModOpCount; uint8_t refList1ModOpCount; uint8_t refPicMarkingOpCount; uint8_t reserved1[7]; const StdVideoEncodeH264RefListModEntry* pRefList0ModOperations; const StdVideoEncodeH264RefListModEntry* pRefList1ModOperations; const StdVideoEncodeH264RefPicMarkingEntry* pRefPicMarkingOperations; } StdVideoEncodeH264ReferenceListsInfo; typedef struct StdVideoEncodeH264PictureInfo { StdVideoEncodeH264PictureInfoFlags flags; uint8_t seq_parameter_set_id; uint8_t pic_parameter_set_id; uint16_t idr_pic_id; StdVideoH264PictureType primary_pic_type; uint32_t frame_num; int32_t PicOrderCnt; uint8_t temporal_id; uint8_t reserved1[3]; const StdVideoEncodeH264ReferenceListsInfo* pRefLists; } StdVideoEncodeH264PictureInfo; typedef struct StdVideoEncodeH264ReferenceInfo { StdVideoEncodeH264ReferenceInfoFlags flags; StdVideoH264PictureType primary_pic_type; uint32_t FrameNum; int32_t PicOrderCnt; uint16_t long_term_pic_num; uint16_t long_term_frame_idx; uint8_t temporal_id; } StdVideoEncodeH264ReferenceInfo; typedef struct StdVideoEncodeH264SliceHeader { StdVideoEncodeH264SliceHeaderFlags flags; uint32_t first_mb_in_slice; StdVideoH264SliceType slice_type; int8_t slice_alpha_c0_offset_div2; int8_t slice_beta_offset_div2; int8_t slice_qp_delta; uint8_t reserved1; StdVideoH264CabacInitIdc cabac_init_idc; StdVideoH264DisableDeblockingFilterIdc disable_deblocking_filter_idc; const StdVideoEncodeH264WeightTable* pWeightTable; } StdVideoEncodeH264SliceHeader; #ifdef __cplusplus } #endif #endif ================================================ FILE: src/libraries/vk_video/vulkan_video_codec_h265std.h ================================================ #ifndef VULKAN_VIDEO_CODEC_H265STD_H_ #define VULKAN_VIDEO_CODEC_H265STD_H_ 1 /* ** Copyright 2015-2025 The Khronos Group Inc. ** ** SPDX-License-Identifier: Apache-2.0 */ /* ** This header is generated from the Khronos Vulkan XML API Registry. ** */ #ifdef __cplusplus extern "C" { #endif // vulkan_video_codec_h265std is a preprocessor guard. Do not pass it to API calls. #define vulkan_video_codec_h265std 1 #include "vulkan_video_codecs_common.h" #define STD_VIDEO_H265_CPB_CNT_LIST_SIZE 32 #define STD_VIDEO_H265_SUBLAYERS_LIST_SIZE 7 #define STD_VIDEO_H265_SCALING_LIST_4X4_NUM_LISTS 6 #define STD_VIDEO_H265_SCALING_LIST_4X4_NUM_ELEMENTS 16 #define STD_VIDEO_H265_SCALING_LIST_8X8_NUM_LISTS 6 #define STD_VIDEO_H265_SCALING_LIST_8X8_NUM_ELEMENTS 64 #define STD_VIDEO_H265_SCALING_LIST_16X16_NUM_LISTS 6 #define STD_VIDEO_H265_SCALING_LIST_16X16_NUM_ELEMENTS 64 #define STD_VIDEO_H265_SCALING_LIST_32X32_NUM_LISTS 2 #define STD_VIDEO_H265_SCALING_LIST_32X32_NUM_ELEMENTS 64 #define STD_VIDEO_H265_CHROMA_QP_OFFSET_LIST_SIZE 6 #define STD_VIDEO_H265_CHROMA_QP_OFFSET_TILE_COLS_LIST_SIZE 19 #define STD_VIDEO_H265_CHROMA_QP_OFFSET_TILE_ROWS_LIST_SIZE 21 #define STD_VIDEO_H265_PREDICTOR_PALETTE_COMPONENTS_LIST_SIZE 3 #define STD_VIDEO_H265_PREDICTOR_PALETTE_COMP_ENTRIES_LIST_SIZE 128 #define STD_VIDEO_H265_MAX_NUM_LIST_REF 15 #define STD_VIDEO_H265_MAX_CHROMA_PLANES 2 #define STD_VIDEO_H265_MAX_SHORT_TERM_REF_PIC_SETS 64 #define STD_VIDEO_H265_MAX_DPB_SIZE 16 #define STD_VIDEO_H265_MAX_LONG_TERM_REF_PICS_SPS 32 #define STD_VIDEO_H265_MAX_LONG_TERM_PICS 16 #define STD_VIDEO_H265_MAX_DELTA_POC 48 #define STD_VIDEO_H265_NO_REFERENCE_PICTURE 0xFF typedef enum StdVideoH265ChromaFormatIdc { STD_VIDEO_H265_CHROMA_FORMAT_IDC_MONOCHROME = 0, STD_VIDEO_H265_CHROMA_FORMAT_IDC_420 = 1, STD_VIDEO_H265_CHROMA_FORMAT_IDC_422 = 2, STD_VIDEO_H265_CHROMA_FORMAT_IDC_444 = 3, STD_VIDEO_H265_CHROMA_FORMAT_IDC_INVALID = 0x7FFFFFFF, STD_VIDEO_H265_CHROMA_FORMAT_IDC_MAX_ENUM = 0x7FFFFFFF } StdVideoH265ChromaFormatIdc; typedef enum StdVideoH265ProfileIdc { STD_VIDEO_H265_PROFILE_IDC_MAIN = 1, STD_VIDEO_H265_PROFILE_IDC_MAIN_10 = 2, STD_VIDEO_H265_PROFILE_IDC_MAIN_STILL_PICTURE = 3, STD_VIDEO_H265_PROFILE_IDC_FORMAT_RANGE_EXTENSIONS = 4, STD_VIDEO_H265_PROFILE_IDC_SCC_EXTENSIONS = 9, STD_VIDEO_H265_PROFILE_IDC_INVALID = 0x7FFFFFFF, STD_VIDEO_H265_PROFILE_IDC_MAX_ENUM = 0x7FFFFFFF } StdVideoH265ProfileIdc; typedef enum StdVideoH265LevelIdc { STD_VIDEO_H265_LEVEL_IDC_1_0 = 0, STD_VIDEO_H265_LEVEL_IDC_2_0 = 1, STD_VIDEO_H265_LEVEL_IDC_2_1 = 2, STD_VIDEO_H265_LEVEL_IDC_3_0 = 3, STD_VIDEO_H265_LEVEL_IDC_3_1 = 4, STD_VIDEO_H265_LEVEL_IDC_4_0 = 5, STD_VIDEO_H265_LEVEL_IDC_4_1 = 6, STD_VIDEO_H265_LEVEL_IDC_5_0 = 7, STD_VIDEO_H265_LEVEL_IDC_5_1 = 8, STD_VIDEO_H265_LEVEL_IDC_5_2 = 9, STD_VIDEO_H265_LEVEL_IDC_6_0 = 10, STD_VIDEO_H265_LEVEL_IDC_6_1 = 11, STD_VIDEO_H265_LEVEL_IDC_6_2 = 12, STD_VIDEO_H265_LEVEL_IDC_INVALID = 0x7FFFFFFF, STD_VIDEO_H265_LEVEL_IDC_MAX_ENUM = 0x7FFFFFFF } StdVideoH265LevelIdc; typedef enum StdVideoH265SliceType { STD_VIDEO_H265_SLICE_TYPE_B = 0, STD_VIDEO_H265_SLICE_TYPE_P = 1, STD_VIDEO_H265_SLICE_TYPE_I = 2, STD_VIDEO_H265_SLICE_TYPE_INVALID = 0x7FFFFFFF, STD_VIDEO_H265_SLICE_TYPE_MAX_ENUM = 0x7FFFFFFF } StdVideoH265SliceType; typedef enum StdVideoH265PictureType { STD_VIDEO_H265_PICTURE_TYPE_P = 0, STD_VIDEO_H265_PICTURE_TYPE_B = 1, STD_VIDEO_H265_PICTURE_TYPE_I = 2, STD_VIDEO_H265_PICTURE_TYPE_IDR = 3, STD_VIDEO_H265_PICTURE_TYPE_INVALID = 0x7FFFFFFF, STD_VIDEO_H265_PICTURE_TYPE_MAX_ENUM = 0x7FFFFFFF } StdVideoH265PictureType; typedef enum StdVideoH265AspectRatioIdc { STD_VIDEO_H265_ASPECT_RATIO_IDC_UNSPECIFIED = 0, STD_VIDEO_H265_ASPECT_RATIO_IDC_SQUARE = 1, STD_VIDEO_H265_ASPECT_RATIO_IDC_12_11 = 2, STD_VIDEO_H265_ASPECT_RATIO_IDC_10_11 = 3, STD_VIDEO_H265_ASPECT_RATIO_IDC_16_11 = 4, STD_VIDEO_H265_ASPECT_RATIO_IDC_40_33 = 5, STD_VIDEO_H265_ASPECT_RATIO_IDC_24_11 = 6, STD_VIDEO_H265_ASPECT_RATIO_IDC_20_11 = 7, STD_VIDEO_H265_ASPECT_RATIO_IDC_32_11 = 8, STD_VIDEO_H265_ASPECT_RATIO_IDC_80_33 = 9, STD_VIDEO_H265_ASPECT_RATIO_IDC_18_11 = 10, STD_VIDEO_H265_ASPECT_RATIO_IDC_15_11 = 11, STD_VIDEO_H265_ASPECT_RATIO_IDC_64_33 = 12, STD_VIDEO_H265_ASPECT_RATIO_IDC_160_99 = 13, STD_VIDEO_H265_ASPECT_RATIO_IDC_4_3 = 14, STD_VIDEO_H265_ASPECT_RATIO_IDC_3_2 = 15, STD_VIDEO_H265_ASPECT_RATIO_IDC_2_1 = 16, STD_VIDEO_H265_ASPECT_RATIO_IDC_EXTENDED_SAR = 255, STD_VIDEO_H265_ASPECT_RATIO_IDC_INVALID = 0x7FFFFFFF, STD_VIDEO_H265_ASPECT_RATIO_IDC_MAX_ENUM = 0x7FFFFFFF } StdVideoH265AspectRatioIdc; typedef struct StdVideoH265DecPicBufMgr { uint32_t max_latency_increase_plus1[STD_VIDEO_H265_SUBLAYERS_LIST_SIZE]; uint8_t max_dec_pic_buffering_minus1[STD_VIDEO_H265_SUBLAYERS_LIST_SIZE]; uint8_t max_num_reorder_pics[STD_VIDEO_H265_SUBLAYERS_LIST_SIZE]; } StdVideoH265DecPicBufMgr; typedef struct StdVideoH265SubLayerHrdParameters { uint32_t bit_rate_value_minus1[STD_VIDEO_H265_CPB_CNT_LIST_SIZE]; uint32_t cpb_size_value_minus1[STD_VIDEO_H265_CPB_CNT_LIST_SIZE]; uint32_t cpb_size_du_value_minus1[STD_VIDEO_H265_CPB_CNT_LIST_SIZE]; uint32_t bit_rate_du_value_minus1[STD_VIDEO_H265_CPB_CNT_LIST_SIZE]; uint32_t cbr_flag; } StdVideoH265SubLayerHrdParameters; typedef struct StdVideoH265HrdFlags { uint32_t nal_hrd_parameters_present_flag : 1; uint32_t vcl_hrd_parameters_present_flag : 1; uint32_t sub_pic_hrd_params_present_flag : 1; uint32_t sub_pic_cpb_params_in_pic_timing_sei_flag : 1; uint32_t fixed_pic_rate_general_flag : 8; uint32_t fixed_pic_rate_within_cvs_flag : 8; uint32_t low_delay_hrd_flag : 8; } StdVideoH265HrdFlags; typedef struct StdVideoH265HrdParameters { StdVideoH265HrdFlags flags; uint8_t tick_divisor_minus2; uint8_t du_cpb_removal_delay_increment_length_minus1; uint8_t dpb_output_delay_du_length_minus1; uint8_t bit_rate_scale; uint8_t cpb_size_scale; uint8_t cpb_size_du_scale; uint8_t initial_cpb_removal_delay_length_minus1; uint8_t au_cpb_removal_delay_length_minus1; uint8_t dpb_output_delay_length_minus1; uint8_t cpb_cnt_minus1[STD_VIDEO_H265_SUBLAYERS_LIST_SIZE]; uint16_t elemental_duration_in_tc_minus1[STD_VIDEO_H265_SUBLAYERS_LIST_SIZE]; uint16_t reserved[3]; const StdVideoH265SubLayerHrdParameters* pSubLayerHrdParametersNal; const StdVideoH265SubLayerHrdParameters* pSubLayerHrdParametersVcl; } StdVideoH265HrdParameters; typedef struct StdVideoH265VpsFlags { uint32_t vps_temporal_id_nesting_flag : 1; uint32_t vps_sub_layer_ordering_info_present_flag : 1; uint32_t vps_timing_info_present_flag : 1; uint32_t vps_poc_proportional_to_timing_flag : 1; } StdVideoH265VpsFlags; typedef struct StdVideoH265ProfileTierLevelFlags { uint32_t general_tier_flag : 1; uint32_t general_progressive_source_flag : 1; uint32_t general_interlaced_source_flag : 1; uint32_t general_non_packed_constraint_flag : 1; uint32_t general_frame_only_constraint_flag : 1; } StdVideoH265ProfileTierLevelFlags; typedef struct StdVideoH265ProfileTierLevel { StdVideoH265ProfileTierLevelFlags flags; StdVideoH265ProfileIdc general_profile_idc; StdVideoH265LevelIdc general_level_idc; } StdVideoH265ProfileTierLevel; typedef struct StdVideoH265VideoParameterSet { StdVideoH265VpsFlags flags; uint8_t vps_video_parameter_set_id; uint8_t vps_max_sub_layers_minus1; uint8_t reserved1; uint8_t reserved2; uint32_t vps_num_units_in_tick; uint32_t vps_time_scale; uint32_t vps_num_ticks_poc_diff_one_minus1; uint32_t reserved3; const StdVideoH265DecPicBufMgr* pDecPicBufMgr; const StdVideoH265HrdParameters* pHrdParameters; const StdVideoH265ProfileTierLevel* pProfileTierLevel; } StdVideoH265VideoParameterSet; typedef struct StdVideoH265ScalingLists { uint8_t ScalingList4x4[STD_VIDEO_H265_SCALING_LIST_4X4_NUM_LISTS][STD_VIDEO_H265_SCALING_LIST_4X4_NUM_ELEMENTS]; uint8_t ScalingList8x8[STD_VIDEO_H265_SCALING_LIST_8X8_NUM_LISTS][STD_VIDEO_H265_SCALING_LIST_8X8_NUM_ELEMENTS]; uint8_t ScalingList16x16[STD_VIDEO_H265_SCALING_LIST_16X16_NUM_LISTS][STD_VIDEO_H265_SCALING_LIST_16X16_NUM_ELEMENTS]; uint8_t ScalingList32x32[STD_VIDEO_H265_SCALING_LIST_32X32_NUM_LISTS][STD_VIDEO_H265_SCALING_LIST_32X32_NUM_ELEMENTS]; uint8_t ScalingListDCCoef16x16[STD_VIDEO_H265_SCALING_LIST_16X16_NUM_LISTS]; uint8_t ScalingListDCCoef32x32[STD_VIDEO_H265_SCALING_LIST_32X32_NUM_LISTS]; } StdVideoH265ScalingLists; typedef struct StdVideoH265SpsVuiFlags { uint32_t aspect_ratio_info_present_flag : 1; uint32_t overscan_info_present_flag : 1; uint32_t overscan_appropriate_flag : 1; uint32_t video_signal_type_present_flag : 1; uint32_t video_full_range_flag : 1; uint32_t colour_description_present_flag : 1; uint32_t chroma_loc_info_present_flag : 1; uint32_t neutral_chroma_indication_flag : 1; uint32_t field_seq_flag : 1; uint32_t frame_field_info_present_flag : 1; uint32_t default_display_window_flag : 1; uint32_t vui_timing_info_present_flag : 1; uint32_t vui_poc_proportional_to_timing_flag : 1; uint32_t vui_hrd_parameters_present_flag : 1; uint32_t bitstream_restriction_flag : 1; uint32_t tiles_fixed_structure_flag : 1; uint32_t motion_vectors_over_pic_boundaries_flag : 1; uint32_t restricted_ref_pic_lists_flag : 1; } StdVideoH265SpsVuiFlags; typedef struct StdVideoH265SequenceParameterSetVui { StdVideoH265SpsVuiFlags flags; StdVideoH265AspectRatioIdc aspect_ratio_idc; uint16_t sar_width; uint16_t sar_height; uint8_t video_format; uint8_t colour_primaries; uint8_t transfer_characteristics; uint8_t matrix_coeffs; uint8_t chroma_sample_loc_type_top_field; uint8_t chroma_sample_loc_type_bottom_field; uint8_t reserved1; uint8_t reserved2; uint16_t def_disp_win_left_offset; uint16_t def_disp_win_right_offset; uint16_t def_disp_win_top_offset; uint16_t def_disp_win_bottom_offset; uint32_t vui_num_units_in_tick; uint32_t vui_time_scale; uint32_t vui_num_ticks_poc_diff_one_minus1; uint16_t min_spatial_segmentation_idc; uint16_t reserved3; uint8_t max_bytes_per_pic_denom; uint8_t max_bits_per_min_cu_denom; uint8_t log2_max_mv_length_horizontal; uint8_t log2_max_mv_length_vertical; const StdVideoH265HrdParameters* pHrdParameters; } StdVideoH265SequenceParameterSetVui; typedef struct StdVideoH265PredictorPaletteEntries { uint16_t PredictorPaletteEntries[STD_VIDEO_H265_PREDICTOR_PALETTE_COMPONENTS_LIST_SIZE][STD_VIDEO_H265_PREDICTOR_PALETTE_COMP_ENTRIES_LIST_SIZE]; } StdVideoH265PredictorPaletteEntries; typedef struct StdVideoH265SpsFlags { uint32_t sps_temporal_id_nesting_flag : 1; uint32_t separate_colour_plane_flag : 1; uint32_t conformance_window_flag : 1; uint32_t sps_sub_layer_ordering_info_present_flag : 1; uint32_t scaling_list_enabled_flag : 1; uint32_t sps_scaling_list_data_present_flag : 1; uint32_t amp_enabled_flag : 1; uint32_t sample_adaptive_offset_enabled_flag : 1; uint32_t pcm_enabled_flag : 1; uint32_t pcm_loop_filter_disabled_flag : 1; uint32_t long_term_ref_pics_present_flag : 1; uint32_t sps_temporal_mvp_enabled_flag : 1; uint32_t strong_intra_smoothing_enabled_flag : 1; uint32_t vui_parameters_present_flag : 1; uint32_t sps_extension_present_flag : 1; uint32_t sps_range_extension_flag : 1; uint32_t transform_skip_rotation_enabled_flag : 1; uint32_t transform_skip_context_enabled_flag : 1; uint32_t implicit_rdpcm_enabled_flag : 1; uint32_t explicit_rdpcm_enabled_flag : 1; uint32_t extended_precision_processing_flag : 1; uint32_t intra_smoothing_disabled_flag : 1; uint32_t high_precision_offsets_enabled_flag : 1; uint32_t persistent_rice_adaptation_enabled_flag : 1; uint32_t cabac_bypass_alignment_enabled_flag : 1; uint32_t sps_scc_extension_flag : 1; uint32_t sps_curr_pic_ref_enabled_flag : 1; uint32_t palette_mode_enabled_flag : 1; uint32_t sps_palette_predictor_initializers_present_flag : 1; uint32_t intra_boundary_filtering_disabled_flag : 1; } StdVideoH265SpsFlags; typedef struct StdVideoH265ShortTermRefPicSetFlags { uint32_t inter_ref_pic_set_prediction_flag : 1; uint32_t delta_rps_sign : 1; } StdVideoH265ShortTermRefPicSetFlags; typedef struct StdVideoH265ShortTermRefPicSet { StdVideoH265ShortTermRefPicSetFlags flags; uint32_t delta_idx_minus1; uint16_t use_delta_flag; uint16_t abs_delta_rps_minus1; uint16_t used_by_curr_pic_flag; uint16_t used_by_curr_pic_s0_flag; uint16_t used_by_curr_pic_s1_flag; uint16_t reserved1; uint8_t reserved2; uint8_t reserved3; uint8_t num_negative_pics; uint8_t num_positive_pics; uint16_t delta_poc_s0_minus1[STD_VIDEO_H265_MAX_DPB_SIZE]; uint16_t delta_poc_s1_minus1[STD_VIDEO_H265_MAX_DPB_SIZE]; } StdVideoH265ShortTermRefPicSet; typedef struct StdVideoH265LongTermRefPicsSps { uint32_t used_by_curr_pic_lt_sps_flag; uint32_t lt_ref_pic_poc_lsb_sps[STD_VIDEO_H265_MAX_LONG_TERM_REF_PICS_SPS]; } StdVideoH265LongTermRefPicsSps; typedef struct StdVideoH265SequenceParameterSet { StdVideoH265SpsFlags flags; StdVideoH265ChromaFormatIdc chroma_format_idc; uint32_t pic_width_in_luma_samples; uint32_t pic_height_in_luma_samples; uint8_t sps_video_parameter_set_id; uint8_t sps_max_sub_layers_minus1; uint8_t sps_seq_parameter_set_id; uint8_t bit_depth_luma_minus8; uint8_t bit_depth_chroma_minus8; uint8_t log2_max_pic_order_cnt_lsb_minus4; uint8_t log2_min_luma_coding_block_size_minus3; uint8_t log2_diff_max_min_luma_coding_block_size; uint8_t log2_min_luma_transform_block_size_minus2; uint8_t log2_diff_max_min_luma_transform_block_size; uint8_t max_transform_hierarchy_depth_inter; uint8_t max_transform_hierarchy_depth_intra; uint8_t num_short_term_ref_pic_sets; uint8_t num_long_term_ref_pics_sps; uint8_t pcm_sample_bit_depth_luma_minus1; uint8_t pcm_sample_bit_depth_chroma_minus1; uint8_t log2_min_pcm_luma_coding_block_size_minus3; uint8_t log2_diff_max_min_pcm_luma_coding_block_size; uint8_t reserved1; uint8_t reserved2; uint8_t palette_max_size; uint8_t delta_palette_max_predictor_size; uint8_t motion_vector_resolution_control_idc; uint8_t sps_num_palette_predictor_initializers_minus1; uint32_t conf_win_left_offset; uint32_t conf_win_right_offset; uint32_t conf_win_top_offset; uint32_t conf_win_bottom_offset; const StdVideoH265ProfileTierLevel* pProfileTierLevel; const StdVideoH265DecPicBufMgr* pDecPicBufMgr; const StdVideoH265ScalingLists* pScalingLists; const StdVideoH265ShortTermRefPicSet* pShortTermRefPicSet; const StdVideoH265LongTermRefPicsSps* pLongTermRefPicsSps; const StdVideoH265SequenceParameterSetVui* pSequenceParameterSetVui; const StdVideoH265PredictorPaletteEntries* pPredictorPaletteEntries; } StdVideoH265SequenceParameterSet; typedef struct StdVideoH265PpsFlags { uint32_t dependent_slice_segments_enabled_flag : 1; uint32_t output_flag_present_flag : 1; uint32_t sign_data_hiding_enabled_flag : 1; uint32_t cabac_init_present_flag : 1; uint32_t constrained_intra_pred_flag : 1; uint32_t transform_skip_enabled_flag : 1; uint32_t cu_qp_delta_enabled_flag : 1; uint32_t pps_slice_chroma_qp_offsets_present_flag : 1; uint32_t weighted_pred_flag : 1; uint32_t weighted_bipred_flag : 1; uint32_t transquant_bypass_enabled_flag : 1; uint32_t tiles_enabled_flag : 1; uint32_t entropy_coding_sync_enabled_flag : 1; uint32_t uniform_spacing_flag : 1; uint32_t loop_filter_across_tiles_enabled_flag : 1; uint32_t pps_loop_filter_across_slices_enabled_flag : 1; uint32_t deblocking_filter_control_present_flag : 1; uint32_t deblocking_filter_override_enabled_flag : 1; uint32_t pps_deblocking_filter_disabled_flag : 1; uint32_t pps_scaling_list_data_present_flag : 1; uint32_t lists_modification_present_flag : 1; uint32_t slice_segment_header_extension_present_flag : 1; uint32_t pps_extension_present_flag : 1; uint32_t cross_component_prediction_enabled_flag : 1; uint32_t chroma_qp_offset_list_enabled_flag : 1; uint32_t pps_curr_pic_ref_enabled_flag : 1; uint32_t residual_adaptive_colour_transform_enabled_flag : 1; uint32_t pps_slice_act_qp_offsets_present_flag : 1; uint32_t pps_palette_predictor_initializers_present_flag : 1; uint32_t monochrome_palette_flag : 1; uint32_t pps_range_extension_flag : 1; } StdVideoH265PpsFlags; typedef struct StdVideoH265PictureParameterSet { StdVideoH265PpsFlags flags; uint8_t pps_pic_parameter_set_id; uint8_t pps_seq_parameter_set_id; uint8_t sps_video_parameter_set_id; uint8_t num_extra_slice_header_bits; uint8_t num_ref_idx_l0_default_active_minus1; uint8_t num_ref_idx_l1_default_active_minus1; int8_t init_qp_minus26; uint8_t diff_cu_qp_delta_depth; int8_t pps_cb_qp_offset; int8_t pps_cr_qp_offset; int8_t pps_beta_offset_div2; int8_t pps_tc_offset_div2; uint8_t log2_parallel_merge_level_minus2; uint8_t log2_max_transform_skip_block_size_minus2; uint8_t diff_cu_chroma_qp_offset_depth; uint8_t chroma_qp_offset_list_len_minus1; int8_t cb_qp_offset_list[STD_VIDEO_H265_CHROMA_QP_OFFSET_LIST_SIZE]; int8_t cr_qp_offset_list[STD_VIDEO_H265_CHROMA_QP_OFFSET_LIST_SIZE]; uint8_t log2_sao_offset_scale_luma; uint8_t log2_sao_offset_scale_chroma; int8_t pps_act_y_qp_offset_plus5; int8_t pps_act_cb_qp_offset_plus5; int8_t pps_act_cr_qp_offset_plus3; uint8_t pps_num_palette_predictor_initializers; uint8_t luma_bit_depth_entry_minus8; uint8_t chroma_bit_depth_entry_minus8; uint8_t num_tile_columns_minus1; uint8_t num_tile_rows_minus1; uint8_t reserved1; uint8_t reserved2; uint16_t column_width_minus1[STD_VIDEO_H265_CHROMA_QP_OFFSET_TILE_COLS_LIST_SIZE]; uint16_t row_height_minus1[STD_VIDEO_H265_CHROMA_QP_OFFSET_TILE_ROWS_LIST_SIZE]; uint32_t reserved3; const StdVideoH265ScalingLists* pScalingLists; const StdVideoH265PredictorPaletteEntries* pPredictorPaletteEntries; } StdVideoH265PictureParameterSet; #ifdef __cplusplus } #endif #endif ================================================ FILE: src/libraries/vk_video/vulkan_video_codec_h265std_decode.h ================================================ #ifndef VULKAN_VIDEO_CODEC_H265STD_DECODE_H_ #define VULKAN_VIDEO_CODEC_H265STD_DECODE_H_ 1 /* ** Copyright 2015-2025 The Khronos Group Inc. ** ** SPDX-License-Identifier: Apache-2.0 */ /* ** This header is generated from the Khronos Vulkan XML API Registry. ** */ #ifdef __cplusplus extern "C" { #endif // vulkan_video_codec_h265std_decode is a preprocessor guard. Do not pass it to API calls. #define vulkan_video_codec_h265std_decode 1 #include "vulkan_video_codec_h265std.h" #define VK_STD_VULKAN_VIDEO_CODEC_H265_DECODE_API_VERSION_1_0_0 VK_MAKE_VIDEO_STD_VERSION(1, 0, 0) #define VK_STD_VULKAN_VIDEO_CODEC_H265_DECODE_SPEC_VERSION VK_STD_VULKAN_VIDEO_CODEC_H265_DECODE_API_VERSION_1_0_0 #define VK_STD_VULKAN_VIDEO_CODEC_H265_DECODE_EXTENSION_NAME "VK_STD_vulkan_video_codec_h265_decode" #define STD_VIDEO_DECODE_H265_REF_PIC_SET_LIST_SIZE 8 typedef struct StdVideoDecodeH265PictureInfoFlags { uint32_t IrapPicFlag : 1; uint32_t IdrPicFlag : 1; uint32_t IsReference : 1; uint32_t short_term_ref_pic_set_sps_flag : 1; } StdVideoDecodeH265PictureInfoFlags; typedef struct StdVideoDecodeH265PictureInfo { StdVideoDecodeH265PictureInfoFlags flags; uint8_t sps_video_parameter_set_id; uint8_t pps_seq_parameter_set_id; uint8_t pps_pic_parameter_set_id; uint8_t NumDeltaPocsOfRefRpsIdx; int32_t PicOrderCntVal; uint16_t NumBitsForSTRefPicSetInSlice; uint16_t reserved; uint8_t RefPicSetStCurrBefore[STD_VIDEO_DECODE_H265_REF_PIC_SET_LIST_SIZE]; uint8_t RefPicSetStCurrAfter[STD_VIDEO_DECODE_H265_REF_PIC_SET_LIST_SIZE]; uint8_t RefPicSetLtCurr[STD_VIDEO_DECODE_H265_REF_PIC_SET_LIST_SIZE]; } StdVideoDecodeH265PictureInfo; typedef struct StdVideoDecodeH265ReferenceInfoFlags { uint32_t used_for_long_term_reference : 1; uint32_t unused_for_reference : 1; } StdVideoDecodeH265ReferenceInfoFlags; typedef struct StdVideoDecodeH265ReferenceInfo { StdVideoDecodeH265ReferenceInfoFlags flags; int32_t PicOrderCntVal; } StdVideoDecodeH265ReferenceInfo; #ifdef __cplusplus } #endif #endif ================================================ FILE: src/libraries/vk_video/vulkan_video_codec_h265std_encode.h ================================================ #ifndef VULKAN_VIDEO_CODEC_H265STD_ENCODE_H_ #define VULKAN_VIDEO_CODEC_H265STD_ENCODE_H_ 1 /* ** Copyright 2015-2025 The Khronos Group Inc. ** ** SPDX-License-Identifier: Apache-2.0 */ /* ** This header is generated from the Khronos Vulkan XML API Registry. ** */ #ifdef __cplusplus extern "C" { #endif // vulkan_video_codec_h265std_encode is a preprocessor guard. Do not pass it to API calls. #define vulkan_video_codec_h265std_encode 1 #include "vulkan_video_codec_h265std.h" #define VK_STD_VULKAN_VIDEO_CODEC_H265_ENCODE_API_VERSION_1_0_0 VK_MAKE_VIDEO_STD_VERSION(1, 0, 0) #define VK_STD_VULKAN_VIDEO_CODEC_H265_ENCODE_SPEC_VERSION VK_STD_VULKAN_VIDEO_CODEC_H265_ENCODE_API_VERSION_1_0_0 #define VK_STD_VULKAN_VIDEO_CODEC_H265_ENCODE_EXTENSION_NAME "VK_STD_vulkan_video_codec_h265_encode" typedef struct StdVideoEncodeH265WeightTableFlags { uint16_t luma_weight_l0_flag; uint16_t chroma_weight_l0_flag; uint16_t luma_weight_l1_flag; uint16_t chroma_weight_l1_flag; } StdVideoEncodeH265WeightTableFlags; typedef struct StdVideoEncodeH265WeightTable { StdVideoEncodeH265WeightTableFlags flags; uint8_t luma_log2_weight_denom; int8_t delta_chroma_log2_weight_denom; int8_t delta_luma_weight_l0[STD_VIDEO_H265_MAX_NUM_LIST_REF]; int8_t luma_offset_l0[STD_VIDEO_H265_MAX_NUM_LIST_REF]; int8_t delta_chroma_weight_l0[STD_VIDEO_H265_MAX_NUM_LIST_REF][STD_VIDEO_H265_MAX_CHROMA_PLANES]; int8_t delta_chroma_offset_l0[STD_VIDEO_H265_MAX_NUM_LIST_REF][STD_VIDEO_H265_MAX_CHROMA_PLANES]; int8_t delta_luma_weight_l1[STD_VIDEO_H265_MAX_NUM_LIST_REF]; int8_t luma_offset_l1[STD_VIDEO_H265_MAX_NUM_LIST_REF]; int8_t delta_chroma_weight_l1[STD_VIDEO_H265_MAX_NUM_LIST_REF][STD_VIDEO_H265_MAX_CHROMA_PLANES]; int8_t delta_chroma_offset_l1[STD_VIDEO_H265_MAX_NUM_LIST_REF][STD_VIDEO_H265_MAX_CHROMA_PLANES]; } StdVideoEncodeH265WeightTable; typedef struct StdVideoEncodeH265SliceSegmentHeaderFlags { uint32_t first_slice_segment_in_pic_flag : 1; uint32_t dependent_slice_segment_flag : 1; uint32_t slice_sao_luma_flag : 1; uint32_t slice_sao_chroma_flag : 1; uint32_t num_ref_idx_active_override_flag : 1; uint32_t mvd_l1_zero_flag : 1; uint32_t cabac_init_flag : 1; uint32_t cu_chroma_qp_offset_enabled_flag : 1; uint32_t deblocking_filter_override_flag : 1; uint32_t slice_deblocking_filter_disabled_flag : 1; uint32_t collocated_from_l0_flag : 1; uint32_t slice_loop_filter_across_slices_enabled_flag : 1; uint32_t reserved : 20; } StdVideoEncodeH265SliceSegmentHeaderFlags; typedef struct StdVideoEncodeH265SliceSegmentHeader { StdVideoEncodeH265SliceSegmentHeaderFlags flags; StdVideoH265SliceType slice_type; uint32_t slice_segment_address; uint8_t collocated_ref_idx; uint8_t MaxNumMergeCand; int8_t slice_cb_qp_offset; int8_t slice_cr_qp_offset; int8_t slice_beta_offset_div2; int8_t slice_tc_offset_div2; int8_t slice_act_y_qp_offset; int8_t slice_act_cb_qp_offset; int8_t slice_act_cr_qp_offset; int8_t slice_qp_delta; uint16_t reserved1; const StdVideoEncodeH265WeightTable* pWeightTable; } StdVideoEncodeH265SliceSegmentHeader; typedef struct StdVideoEncodeH265ReferenceListsInfoFlags { uint32_t ref_pic_list_modification_flag_l0 : 1; uint32_t ref_pic_list_modification_flag_l1 : 1; uint32_t reserved : 30; } StdVideoEncodeH265ReferenceListsInfoFlags; typedef struct StdVideoEncodeH265ReferenceListsInfo { StdVideoEncodeH265ReferenceListsInfoFlags flags; uint8_t num_ref_idx_l0_active_minus1; uint8_t num_ref_idx_l1_active_minus1; uint8_t RefPicList0[STD_VIDEO_H265_MAX_NUM_LIST_REF]; uint8_t RefPicList1[STD_VIDEO_H265_MAX_NUM_LIST_REF]; uint8_t list_entry_l0[STD_VIDEO_H265_MAX_NUM_LIST_REF]; uint8_t list_entry_l1[STD_VIDEO_H265_MAX_NUM_LIST_REF]; } StdVideoEncodeH265ReferenceListsInfo; typedef struct StdVideoEncodeH265PictureInfoFlags { uint32_t is_reference : 1; uint32_t IrapPicFlag : 1; uint32_t used_for_long_term_reference : 1; uint32_t discardable_flag : 1; uint32_t cross_layer_bla_flag : 1; uint32_t pic_output_flag : 1; uint32_t no_output_of_prior_pics_flag : 1; uint32_t short_term_ref_pic_set_sps_flag : 1; uint32_t slice_temporal_mvp_enabled_flag : 1; uint32_t reserved : 23; } StdVideoEncodeH265PictureInfoFlags; typedef struct StdVideoEncodeH265LongTermRefPics { uint8_t num_long_term_sps; uint8_t num_long_term_pics; uint8_t lt_idx_sps[STD_VIDEO_H265_MAX_LONG_TERM_REF_PICS_SPS]; uint8_t poc_lsb_lt[STD_VIDEO_H265_MAX_LONG_TERM_PICS]; uint16_t used_by_curr_pic_lt_flag; uint8_t delta_poc_msb_present_flag[STD_VIDEO_H265_MAX_DELTA_POC]; uint8_t delta_poc_msb_cycle_lt[STD_VIDEO_H265_MAX_DELTA_POC]; } StdVideoEncodeH265LongTermRefPics; typedef struct StdVideoEncodeH265PictureInfo { StdVideoEncodeH265PictureInfoFlags flags; StdVideoH265PictureType pic_type; uint8_t sps_video_parameter_set_id; uint8_t pps_seq_parameter_set_id; uint8_t pps_pic_parameter_set_id; uint8_t short_term_ref_pic_set_idx; int32_t PicOrderCntVal; uint8_t TemporalId; uint8_t reserved1[7]; const StdVideoEncodeH265ReferenceListsInfo* pRefLists; const StdVideoH265ShortTermRefPicSet* pShortTermRefPicSet; const StdVideoEncodeH265LongTermRefPics* pLongTermRefPics; } StdVideoEncodeH265PictureInfo; typedef struct StdVideoEncodeH265ReferenceInfoFlags { uint32_t used_for_long_term_reference : 1; uint32_t unused_for_reference : 1; uint32_t reserved : 30; } StdVideoEncodeH265ReferenceInfoFlags; typedef struct StdVideoEncodeH265ReferenceInfo { StdVideoEncodeH265ReferenceInfoFlags flags; StdVideoH265PictureType pic_type; int32_t PicOrderCntVal; uint8_t TemporalId; } StdVideoEncodeH265ReferenceInfo; #ifdef __cplusplus } #endif #endif ================================================ FILE: src/libraries/vk_video/vulkan_video_codecs_common.h ================================================ #ifndef VULKAN_VIDEO_CODECS_COMMON_H_ #define VULKAN_VIDEO_CODECS_COMMON_H_ 1 /* ** Copyright 2015-2025 The Khronos Group Inc. ** ** SPDX-License-Identifier: Apache-2.0 */ /* ** This header is generated from the Khronos Vulkan XML API Registry. ** */ #ifdef __cplusplus extern "C" { #endif // vulkan_video_codecs_common is a preprocessor guard. Do not pass it to API calls. #define vulkan_video_codecs_common 1 #if !defined(VK_NO_STDINT_H) #include #endif #define VK_MAKE_VIDEO_STD_VERSION(major, minor, patch) \ ((((uint32_t)(major)) << 22) | (((uint32_t)(minor)) << 12) | ((uint32_t)(patch))) #ifdef __cplusplus } #endif #endif ================================================ FILE: src/libraries/vma/vk_mem_alloc.h ================================================ // // Copyright (c) 2017-2025 Advanced Micro Devices, Inc. All rights reserved. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. // #ifndef AMD_VULKAN_MEMORY_ALLOCATOR_H #define AMD_VULKAN_MEMORY_ALLOCATOR_H /** \mainpage Vulkan Memory Allocator Version 3.2.1 Copyright (c) 2017-2025 Advanced Micro Devices, Inc. All rights reserved. \n License: MIT \n See also: [product page on GPUOpen](https://gpuopen.com/gaming-product/vulkan-memory-allocator/), [repository on GitHub](https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator) API documentation divided into groups: [Topics](topics.html) General documentation chapters: - User guide - \subpage quick_start - [Project setup](@ref quick_start_project_setup) - [Initialization](@ref quick_start_initialization) - [Resource allocation](@ref quick_start_resource_allocation) - \subpage choosing_memory_type - [Usage](@ref choosing_memory_type_usage) - [Required and preferred flags](@ref choosing_memory_type_required_preferred_flags) - [Explicit memory types](@ref choosing_memory_type_explicit_memory_types) - [Custom memory pools](@ref choosing_memory_type_custom_memory_pools) - [Dedicated allocations](@ref choosing_memory_type_dedicated_allocations) - \subpage memory_mapping - [Copy functions](@ref memory_mapping_copy_functions) - [Mapping functions](@ref memory_mapping_mapping_functions) - [Persistently mapped memory](@ref memory_mapping_persistently_mapped_memory) - [Cache flush and invalidate](@ref memory_mapping_cache_control) - \subpage staying_within_budget - [Querying for budget](@ref staying_within_budget_querying_for_budget) - [Controlling memory usage](@ref staying_within_budget_controlling_memory_usage) - \subpage resource_aliasing - \subpage custom_memory_pools - [Choosing memory type index](@ref custom_memory_pools_MemTypeIndex) - [When not to use custom pools](@ref custom_memory_pools_when_not_use) - [Linear allocation algorithm](@ref linear_algorithm) - [Free-at-once](@ref linear_algorithm_free_at_once) - [Stack](@ref linear_algorithm_stack) - [Double stack](@ref linear_algorithm_double_stack) - [Ring buffer](@ref linear_algorithm_ring_buffer) - \subpage defragmentation - \subpage statistics - [Numeric statistics](@ref statistics_numeric_statistics) - [JSON dump](@ref statistics_json_dump) - \subpage allocation_annotation - [Allocation user data](@ref allocation_user_data) - [Allocation names](@ref allocation_names) - \subpage virtual_allocator - \subpage debugging_memory_usage - [Memory initialization](@ref debugging_memory_usage_initialization) - [Margins](@ref debugging_memory_usage_margins) - [Corruption detection](@ref debugging_memory_usage_corruption_detection) - [Leak detection features](@ref debugging_memory_usage_leak_detection) - \subpage other_api_interop - \subpage usage_patterns - [GPU-only resource](@ref usage_patterns_gpu_only) - [Staging copy for upload](@ref usage_patterns_staging_copy_upload) - [Readback](@ref usage_patterns_readback) - [Advanced data uploading](@ref usage_patterns_advanced_data_uploading) - [Other use cases](@ref usage_patterns_other_use_cases) - \subpage configuration - [Pointers to Vulkan functions](@ref config_Vulkan_functions) - [Custom host memory allocator](@ref custom_memory_allocator) - [Device memory allocation callbacks](@ref allocation_callbacks) - [Device heap memory limit](@ref heap_memory_limit) - Extension support - \subpage vk_khr_dedicated_allocation - \subpage enabling_buffer_device_address - \subpage vk_ext_memory_priority - \subpage vk_amd_device_coherent_memory - \subpage vk_khr_external_memory_win32 - \subpage general_considerations - [Thread safety](@ref general_considerations_thread_safety) - [Versioning and compatibility](@ref general_considerations_versioning_and_compatibility) - [Validation layer warnings](@ref general_considerations_validation_layer_warnings) - [Allocation algorithm](@ref general_considerations_allocation_algorithm) - [Features not supported](@ref general_considerations_features_not_supported) \defgroup group_init Library initialization \brief API elements related to the initialization and management of the entire library, especially #VmaAllocator object. \defgroup group_alloc Memory allocation \brief API elements related to the allocation, deallocation, and management of Vulkan memory, buffers, images. Most basic ones being: vmaCreateBuffer(), vmaCreateImage(). \defgroup group_virtual Virtual allocator \brief API elements related to the mechanism of \ref virtual_allocator - using the core allocation algorithm for user-defined purpose without allocating any real GPU memory. \defgroup group_stats Statistics \brief API elements that query current status of the allocator, from memory usage, budget, to full dump of the internal state in JSON format. See documentation chapter: \ref statistics. */ #ifdef __cplusplus extern "C" { #endif #if !defined(VULKAN_H_) #include #endif #if !defined(VMA_VULKAN_VERSION) #if defined(VK_VERSION_1_4) #define VMA_VULKAN_VERSION 1004000 #elif defined(VK_VERSION_1_3) #define VMA_VULKAN_VERSION 1003000 #elif defined(VK_VERSION_1_2) #define VMA_VULKAN_VERSION 1002000 #elif defined(VK_VERSION_1_1) #define VMA_VULKAN_VERSION 1001000 #else #define VMA_VULKAN_VERSION 1000000 #endif #endif #if defined(__ANDROID__) && defined(VK_NO_PROTOTYPES) && VMA_STATIC_VULKAN_FUNCTIONS extern PFN_vkGetInstanceProcAddr vkGetInstanceProcAddr; extern PFN_vkGetDeviceProcAddr vkGetDeviceProcAddr; extern PFN_vkGetPhysicalDeviceProperties vkGetPhysicalDeviceProperties; extern PFN_vkGetPhysicalDeviceMemoryProperties vkGetPhysicalDeviceMemoryProperties; extern PFN_vkAllocateMemory vkAllocateMemory; extern PFN_vkFreeMemory vkFreeMemory; extern PFN_vkMapMemory vkMapMemory; extern PFN_vkUnmapMemory vkUnmapMemory; extern PFN_vkFlushMappedMemoryRanges vkFlushMappedMemoryRanges; extern PFN_vkInvalidateMappedMemoryRanges vkInvalidateMappedMemoryRanges; extern PFN_vkBindBufferMemory vkBindBufferMemory; extern PFN_vkBindImageMemory vkBindImageMemory; extern PFN_vkGetBufferMemoryRequirements vkGetBufferMemoryRequirements; extern PFN_vkGetImageMemoryRequirements vkGetImageMemoryRequirements; extern PFN_vkCreateBuffer vkCreateBuffer; extern PFN_vkDestroyBuffer vkDestroyBuffer; extern PFN_vkCreateImage vkCreateImage; extern PFN_vkDestroyImage vkDestroyImage; extern PFN_vkCmdCopyBuffer vkCmdCopyBuffer; #if VMA_VULKAN_VERSION >= 1001000 extern PFN_vkGetBufferMemoryRequirements2 vkGetBufferMemoryRequirements2; extern PFN_vkGetImageMemoryRequirements2 vkGetImageMemoryRequirements2; extern PFN_vkBindBufferMemory2 vkBindBufferMemory2; extern PFN_vkBindImageMemory2 vkBindImageMemory2; extern PFN_vkGetPhysicalDeviceMemoryProperties2 vkGetPhysicalDeviceMemoryProperties2; #endif // #if VMA_VULKAN_VERSION >= 1001000 #endif // #if defined(__ANDROID__) && VMA_STATIC_VULKAN_FUNCTIONS && VK_NO_PROTOTYPES #if !defined(VMA_DEDICATED_ALLOCATION) #if VK_KHR_get_memory_requirements2 && VK_KHR_dedicated_allocation #define VMA_DEDICATED_ALLOCATION 1 #else #define VMA_DEDICATED_ALLOCATION 0 #endif #endif #if !defined(VMA_BIND_MEMORY2) #if VK_KHR_bind_memory2 #define VMA_BIND_MEMORY2 1 #else #define VMA_BIND_MEMORY2 0 #endif #endif #if !defined(VMA_MEMORY_BUDGET) #if VK_EXT_memory_budget && (VK_KHR_get_physical_device_properties2 || VMA_VULKAN_VERSION >= 1001000) #define VMA_MEMORY_BUDGET 1 #else #define VMA_MEMORY_BUDGET 0 #endif #endif // Defined to 1 when VK_KHR_buffer_device_address device extension or equivalent core Vulkan 1.2 feature is defined in its headers. #if !defined(VMA_BUFFER_DEVICE_ADDRESS) #if VK_KHR_buffer_device_address || VMA_VULKAN_VERSION >= 1002000 #define VMA_BUFFER_DEVICE_ADDRESS 1 #else #define VMA_BUFFER_DEVICE_ADDRESS 0 #endif #endif // Defined to 1 when VK_EXT_memory_priority device extension is defined in Vulkan headers. #if !defined(VMA_MEMORY_PRIORITY) #if VK_EXT_memory_priority #define VMA_MEMORY_PRIORITY 1 #else #define VMA_MEMORY_PRIORITY 0 #endif #endif // Defined to 1 when VK_KHR_maintenance4 device extension is defined in Vulkan headers. #if !defined(VMA_KHR_MAINTENANCE4) #if VK_KHR_maintenance4 #define VMA_KHR_MAINTENANCE4 1 #else #define VMA_KHR_MAINTENANCE4 0 #endif #endif // Defined to 1 when VK_KHR_maintenance5 device extension is defined in Vulkan headers. #if !defined(VMA_KHR_MAINTENANCE5) #if VK_KHR_maintenance5 #define VMA_KHR_MAINTENANCE5 1 #else #define VMA_KHR_MAINTENANCE5 0 #endif #endif // Defined to 1 when VK_KHR_external_memory device extension is defined in Vulkan headers. #if !defined(VMA_EXTERNAL_MEMORY) #if VK_KHR_external_memory #define VMA_EXTERNAL_MEMORY 1 #else #define VMA_EXTERNAL_MEMORY 0 #endif #endif // Defined to 1 when VK_KHR_external_memory_win32 device extension is defined in Vulkan headers. #if !defined(VMA_EXTERNAL_MEMORY_WIN32) #if VK_KHR_external_memory_win32 #define VMA_EXTERNAL_MEMORY_WIN32 1 #else #define VMA_EXTERNAL_MEMORY_WIN32 0 #endif #endif // Define these macros to decorate all public functions with additional code, // before and after returned type, appropriately. This may be useful for // exporting the functions when compiling VMA as a separate library. Example: // #define VMA_CALL_PRE __declspec(dllexport) // #define VMA_CALL_POST __cdecl #ifndef VMA_CALL_PRE #define VMA_CALL_PRE #endif #ifndef VMA_CALL_POST #define VMA_CALL_POST #endif // Define this macro to decorate pNext pointers with an attribute specifying the Vulkan // structure that will be extended via the pNext chain. #ifndef VMA_EXTENDS_VK_STRUCT #define VMA_EXTENDS_VK_STRUCT(vkStruct) #endif // Define this macro to decorate pointers with an attribute specifying the // length of the array they point to if they are not null. // // The length may be one of // - The name of another parameter in the argument list where the pointer is declared // - The name of another member in the struct where the pointer is declared // - The name of a member of a struct type, meaning the value of that member in // the context of the call. For example // VMA_LEN_IF_NOT_NULL("VkPhysicalDeviceMemoryProperties::memoryHeapCount"), // this means the number of memory heaps available in the device associated // with the VmaAllocator being dealt with. #ifndef VMA_LEN_IF_NOT_NULL #define VMA_LEN_IF_NOT_NULL(len) #endif // The VMA_NULLABLE macro is defined to be _Nullable when compiling with Clang. // see: https://clang.llvm.org/docs/AttributeReference.html#nullable #ifndef VMA_NULLABLE #ifdef __clang__ #define VMA_NULLABLE _Nullable #else #define VMA_NULLABLE #endif #endif // The VMA_NOT_NULL macro is defined to be _Nonnull when compiling with Clang. // see: https://clang.llvm.org/docs/AttributeReference.html#nonnull #ifndef VMA_NOT_NULL #ifdef __clang__ #define VMA_NOT_NULL _Nonnull #else #define VMA_NOT_NULL #endif #endif // If non-dispatchable handles are represented as pointers then we can give // then nullability annotations #ifndef VMA_NOT_NULL_NON_DISPATCHABLE #if defined(__LP64__) || defined(_WIN64) || (defined(__x86_64__) && !defined(__ILP32__) ) || defined(_M_X64) || defined(__ia64) || defined (_M_IA64) || defined(__aarch64__) || defined(__powerpc64__) #define VMA_NOT_NULL_NON_DISPATCHABLE VMA_NOT_NULL #else #define VMA_NOT_NULL_NON_DISPATCHABLE #endif #endif #ifndef VMA_NULLABLE_NON_DISPATCHABLE #if defined(__LP64__) || defined(_WIN64) || (defined(__x86_64__) && !defined(__ILP32__) ) || defined(_M_X64) || defined(__ia64) || defined (_M_IA64) || defined(__aarch64__) || defined(__powerpc64__) #define VMA_NULLABLE_NON_DISPATCHABLE VMA_NULLABLE #else #define VMA_NULLABLE_NON_DISPATCHABLE #endif #endif #ifndef VMA_STATS_STRING_ENABLED #define VMA_STATS_STRING_ENABLED 1 #endif //////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// // // INTERFACE // //////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// // Sections for managing code placement in file, only for development purposes e.g. for convenient folding inside an IDE. #ifndef _VMA_ENUM_DECLARATIONS /** \addtogroup group_init @{ */ /// Flags for created #VmaAllocator. typedef enum VmaAllocatorCreateFlagBits { /** \brief Allocator and all objects created from it will not be synchronized internally, so you must guarantee they are used from only one thread at a time or synchronized externally by you. Using this flag may increase performance because internal mutexes are not used. */ VMA_ALLOCATOR_CREATE_EXTERNALLY_SYNCHRONIZED_BIT = 0x00000001, /** \brief Enables usage of VK_KHR_dedicated_allocation extension. The flag works only if VmaAllocatorCreateInfo::vulkanApiVersion `== VK_API_VERSION_1_0`. When it is `VK_API_VERSION_1_1`, the flag is ignored because the extension has been promoted to Vulkan 1.1. Using this extension will automatically allocate dedicated blocks of memory for some buffers and images instead of suballocating place for them out of bigger memory blocks (as if you explicitly used #VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT flag) when it is recommended by the driver. It may improve performance on some GPUs. You may set this flag only if you found out that following device extensions are supported, you enabled them while creating Vulkan device passed as VmaAllocatorCreateInfo::device, and you want them to be used internally by this library: - VK_KHR_get_memory_requirements2 (device extension) - VK_KHR_dedicated_allocation (device extension) When this flag is set, you can experience following warnings reported by Vulkan validation layer. You can ignore them. > vkBindBufferMemory(): Binding memory to buffer 0x2d but vkGetBufferMemoryRequirements() has not been called on that buffer. */ VMA_ALLOCATOR_CREATE_KHR_DEDICATED_ALLOCATION_BIT = 0x00000002, /** Enables usage of VK_KHR_bind_memory2 extension. The flag works only if VmaAllocatorCreateInfo::vulkanApiVersion `== VK_API_VERSION_1_0`. When it is `VK_API_VERSION_1_1`, the flag is ignored because the extension has been promoted to Vulkan 1.1. You may set this flag only if you found out that this device extension is supported, you enabled it while creating Vulkan device passed as VmaAllocatorCreateInfo::device, and you want it to be used internally by this library. The extension provides functions `vkBindBufferMemory2KHR` and `vkBindImageMemory2KHR`, which allow to pass a chain of `pNext` structures while binding. This flag is required if you use `pNext` parameter in vmaBindBufferMemory2() or vmaBindImageMemory2(). */ VMA_ALLOCATOR_CREATE_KHR_BIND_MEMORY2_BIT = 0x00000004, /** Enables usage of VK_EXT_memory_budget extension. You may set this flag only if you found out that this device extension is supported, you enabled it while creating Vulkan device passed as VmaAllocatorCreateInfo::device, and you want it to be used internally by this library, along with another instance extension VK_KHR_get_physical_device_properties2, which is required by it (or Vulkan 1.1, where this extension is promoted). The extension provides query for current memory usage and budget, which will probably be more accurate than an estimation used by the library otherwise. */ VMA_ALLOCATOR_CREATE_EXT_MEMORY_BUDGET_BIT = 0x00000008, /** Enables usage of VK_AMD_device_coherent_memory extension. You may set this flag only if you: - found out that this device extension is supported and enabled it while creating Vulkan device passed as VmaAllocatorCreateInfo::device, - checked that `VkPhysicalDeviceCoherentMemoryFeaturesAMD::deviceCoherentMemory` is true and set it while creating the Vulkan device, - want it to be used internally by this library. The extension and accompanying device feature provide access to memory types with `VK_MEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMD` and `VK_MEMORY_PROPERTY_DEVICE_UNCACHED_BIT_AMD` flags. They are useful mostly for writing breadcrumb markers - a common method for debugging GPU crash/hang/TDR. When the extension is not enabled, such memory types are still enumerated, but their usage is illegal. To protect from this error, if you don't create the allocator with this flag, it will refuse to allocate any memory or create a custom pool in such memory type, returning `VK_ERROR_FEATURE_NOT_PRESENT`. */ VMA_ALLOCATOR_CREATE_AMD_DEVICE_COHERENT_MEMORY_BIT = 0x00000010, /** Enables usage of "buffer device address" feature, which allows you to use function `vkGetBufferDeviceAddress*` to get raw GPU pointer to a buffer and pass it for usage inside a shader. You may set this flag only if you: 1. (For Vulkan version < 1.2) Found as available and enabled device extension VK_KHR_buffer_device_address. This extension is promoted to core Vulkan 1.2. 2. Found as available and enabled device feature `VkPhysicalDeviceBufferDeviceAddressFeatures::bufferDeviceAddress`. When this flag is set, you can create buffers with `VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT` using VMA. The library automatically adds `VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT` to allocated memory blocks wherever it might be needed. For more information, see documentation chapter \ref enabling_buffer_device_address. */ VMA_ALLOCATOR_CREATE_BUFFER_DEVICE_ADDRESS_BIT = 0x00000020, /** Enables usage of VK_EXT_memory_priority extension in the library. You may set this flag only if you found available and enabled this device extension, along with `VkPhysicalDeviceMemoryPriorityFeaturesEXT::memoryPriority == VK_TRUE`, while creating Vulkan device passed as VmaAllocatorCreateInfo::device. When this flag is used, VmaAllocationCreateInfo::priority and VmaPoolCreateInfo::priority are used to set priorities of allocated Vulkan memory. Without it, these variables are ignored. A priority must be a floating-point value between 0 and 1, indicating the priority of the allocation relative to other memory allocations. Larger values are higher priority. The granularity of the priorities is implementation-dependent. It is automatically passed to every call to `vkAllocateMemory` done by the library using structure `VkMemoryPriorityAllocateInfoEXT`. The value to be used for default priority is 0.5. For more details, see the documentation of the VK_EXT_memory_priority extension. */ VMA_ALLOCATOR_CREATE_EXT_MEMORY_PRIORITY_BIT = 0x00000040, /** Enables usage of VK_KHR_maintenance4 extension in the library. You may set this flag only if you found available and enabled this device extension, while creating Vulkan device passed as VmaAllocatorCreateInfo::device. */ VMA_ALLOCATOR_CREATE_KHR_MAINTENANCE4_BIT = 0x00000080, /** Enables usage of VK_KHR_maintenance5 extension in the library. You should set this flag if you found available and enabled this device extension, while creating Vulkan device passed as VmaAllocatorCreateInfo::device. */ VMA_ALLOCATOR_CREATE_KHR_MAINTENANCE5_BIT = 0x00000100, /** Enables usage of VK_KHR_external_memory_win32 extension in the library. You should set this flag if you found available and enabled this device extension, while creating Vulkan device passed as VmaAllocatorCreateInfo::device. For more information, see \ref vk_khr_external_memory_win32. */ VMA_ALLOCATOR_CREATE_KHR_EXTERNAL_MEMORY_WIN32_BIT = 0x00000200, VMA_ALLOCATOR_CREATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VmaAllocatorCreateFlagBits; /// See #VmaAllocatorCreateFlagBits. typedef VkFlags VmaAllocatorCreateFlags; /** @} */ /** \addtogroup group_alloc @{ */ /// \brief Intended usage of the allocated memory. typedef enum VmaMemoryUsage { /** No intended memory usage specified. Use other members of VmaAllocationCreateInfo to specify your requirements. */ VMA_MEMORY_USAGE_UNKNOWN = 0, /** \deprecated Obsolete, preserved for backward compatibility. Prefers `VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT`. */ VMA_MEMORY_USAGE_GPU_ONLY = 1, /** \deprecated Obsolete, preserved for backward compatibility. Guarantees `VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT` and `VK_MEMORY_PROPERTY_HOST_COHERENT_BIT`. */ VMA_MEMORY_USAGE_CPU_ONLY = 2, /** \deprecated Obsolete, preserved for backward compatibility. Guarantees `VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT`, prefers `VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT`. */ VMA_MEMORY_USAGE_CPU_TO_GPU = 3, /** \deprecated Obsolete, preserved for backward compatibility. Guarantees `VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT`, prefers `VK_MEMORY_PROPERTY_HOST_CACHED_BIT`. */ VMA_MEMORY_USAGE_GPU_TO_CPU = 4, /** \deprecated Obsolete, preserved for backward compatibility. Prefers not `VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT`. */ VMA_MEMORY_USAGE_CPU_COPY = 5, /** Lazily allocated GPU memory having `VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT`. Exists mostly on mobile platforms. Using it on desktop PC or other GPUs with no such memory type present will fail the allocation. Usage: Memory for transient attachment images (color attachments, depth attachments etc.), created with `VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT`. Allocations with this usage are always created as dedicated - it implies #VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT. */ VMA_MEMORY_USAGE_GPU_LAZILY_ALLOCATED = 6, /** Selects best memory type automatically. This flag is recommended for most common use cases. When using this flag, if you want to map the allocation (using vmaMapMemory() or #VMA_ALLOCATION_CREATE_MAPPED_BIT), you must pass one of the flags: #VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT or #VMA_ALLOCATION_CREATE_HOST_ACCESS_RANDOM_BIT in VmaAllocationCreateInfo::flags. It can be used only with functions that let the library know `VkBufferCreateInfo` or `VkImageCreateInfo`, e.g. vmaCreateBuffer(), vmaCreateImage(), vmaFindMemoryTypeIndexForBufferInfo(), vmaFindMemoryTypeIndexForImageInfo() and not with generic memory allocation functions. */ VMA_MEMORY_USAGE_AUTO = 7, /** Selects best memory type automatically with preference for GPU (device) memory. When using this flag, if you want to map the allocation (using vmaMapMemory() or #VMA_ALLOCATION_CREATE_MAPPED_BIT), you must pass one of the flags: #VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT or #VMA_ALLOCATION_CREATE_HOST_ACCESS_RANDOM_BIT in VmaAllocationCreateInfo::flags. It can be used only with functions that let the library know `VkBufferCreateInfo` or `VkImageCreateInfo`, e.g. vmaCreateBuffer(), vmaCreateImage(), vmaFindMemoryTypeIndexForBufferInfo(), vmaFindMemoryTypeIndexForImageInfo() and not with generic memory allocation functions. */ VMA_MEMORY_USAGE_AUTO_PREFER_DEVICE = 8, /** Selects best memory type automatically with preference for CPU (host) memory. When using this flag, if you want to map the allocation (using vmaMapMemory() or #VMA_ALLOCATION_CREATE_MAPPED_BIT), you must pass one of the flags: #VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT or #VMA_ALLOCATION_CREATE_HOST_ACCESS_RANDOM_BIT in VmaAllocationCreateInfo::flags. It can be used only with functions that let the library know `VkBufferCreateInfo` or `VkImageCreateInfo`, e.g. vmaCreateBuffer(), vmaCreateImage(), vmaFindMemoryTypeIndexForBufferInfo(), vmaFindMemoryTypeIndexForImageInfo() and not with generic memory allocation functions. */ VMA_MEMORY_USAGE_AUTO_PREFER_HOST = 9, VMA_MEMORY_USAGE_MAX_ENUM = 0x7FFFFFFF } VmaMemoryUsage; /// Flags to be passed as VmaAllocationCreateInfo::flags. typedef enum VmaAllocationCreateFlagBits { /** \brief Set this flag if the allocation should have its own memory block. Use it for special, big resources, like fullscreen images used as attachments. If you use this flag while creating a buffer or an image, `VkMemoryDedicatedAllocateInfo` structure is applied if possible. */ VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT = 0x00000001, /** \brief Set this flag to only try to allocate from existing `VkDeviceMemory` blocks and never create new such block. If new allocation cannot be placed in any of the existing blocks, allocation fails with `VK_ERROR_OUT_OF_DEVICE_MEMORY` error. You should not use #VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT and #VMA_ALLOCATION_CREATE_NEVER_ALLOCATE_BIT at the same time. It makes no sense. */ VMA_ALLOCATION_CREATE_NEVER_ALLOCATE_BIT = 0x00000002, /** \brief Set this flag to use a memory that will be persistently mapped and retrieve pointer to it. Pointer to mapped memory will be returned through VmaAllocationInfo::pMappedData. It is valid to use this flag for allocation made from memory type that is not `HOST_VISIBLE`. This flag is then ignored and memory is not mapped. This is useful if you need an allocation that is efficient to use on GPU (`DEVICE_LOCAL`) and still want to map it directly if possible on platforms that support it (e.g. Intel GPU). */ VMA_ALLOCATION_CREATE_MAPPED_BIT = 0x00000004, /** \deprecated Preserved for backward compatibility. Consider using vmaSetAllocationName() instead. Set this flag to treat VmaAllocationCreateInfo::pUserData as pointer to a null-terminated string. Instead of copying pointer value, a local copy of the string is made and stored in allocation's `pName`. The string is automatically freed together with the allocation. It is also used in vmaBuildStatsString(). */ VMA_ALLOCATION_CREATE_USER_DATA_COPY_STRING_BIT = 0x00000020, /** Allocation will be created from upper stack in a double stack pool. This flag is only allowed for custom pools created with #VMA_POOL_CREATE_LINEAR_ALGORITHM_BIT flag. */ VMA_ALLOCATION_CREATE_UPPER_ADDRESS_BIT = 0x00000040, /** Create both buffer/image and allocation, but don't bind them together. It is useful when you want to bind yourself to do some more advanced binding, e.g. using some extensions. The flag is meaningful only with functions that bind by default: vmaCreateBuffer(), vmaCreateImage(). Otherwise it is ignored. If you want to make sure the new buffer/image is not tied to the new memory allocation through `VkMemoryDedicatedAllocateInfoKHR` structure in case the allocation ends up in its own memory block, use also flag #VMA_ALLOCATION_CREATE_CAN_ALIAS_BIT. */ VMA_ALLOCATION_CREATE_DONT_BIND_BIT = 0x00000080, /** Create allocation only if additional device memory required for it, if any, won't exceed memory budget. Otherwise return `VK_ERROR_OUT_OF_DEVICE_MEMORY`. */ VMA_ALLOCATION_CREATE_WITHIN_BUDGET_BIT = 0x00000100, /** \brief Set this flag if the allocated memory will have aliasing resources. Usage of this flag prevents supplying `VkMemoryDedicatedAllocateInfoKHR` when #VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT is specified. Otherwise created dedicated memory will not be suitable for aliasing resources, resulting in Vulkan Validation Layer errors. */ VMA_ALLOCATION_CREATE_CAN_ALIAS_BIT = 0x00000200, /** Requests possibility to map the allocation (using vmaMapMemory() or #VMA_ALLOCATION_CREATE_MAPPED_BIT). - If you use #VMA_MEMORY_USAGE_AUTO or other `VMA_MEMORY_USAGE_AUTO*` value, you must use this flag to be able to map the allocation. Otherwise, mapping is incorrect. - If you use other value of #VmaMemoryUsage, this flag is ignored and mapping is always possible in memory types that are `HOST_VISIBLE`. This includes allocations created in \ref custom_memory_pools. Declares that mapped memory will only be written sequentially, e.g. using `memcpy()` or a loop writing number-by-number, never read or accessed randomly, so a memory type can be selected that is uncached and write-combined. \warning Violating this declaration may work correctly, but will likely be very slow. Watch out for implicit reads introduced by doing e.g. `pMappedData[i] += x;` Better prepare your data in a local variable and `memcpy()` it to the mapped pointer all at once. */ VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT = 0x00000400, /** Requests possibility to map the allocation (using vmaMapMemory() or #VMA_ALLOCATION_CREATE_MAPPED_BIT). - If you use #VMA_MEMORY_USAGE_AUTO or other `VMA_MEMORY_USAGE_AUTO*` value, you must use this flag to be able to map the allocation. Otherwise, mapping is incorrect. - If you use other value of #VmaMemoryUsage, this flag is ignored and mapping is always possible in memory types that are `HOST_VISIBLE`. This includes allocations created in \ref custom_memory_pools. Declares that mapped memory can be read, written, and accessed in random order, so a `HOST_CACHED` memory type is preferred. */ VMA_ALLOCATION_CREATE_HOST_ACCESS_RANDOM_BIT = 0x00000800, /** Together with #VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT or #VMA_ALLOCATION_CREATE_HOST_ACCESS_RANDOM_BIT, it says that despite request for host access, a not-`HOST_VISIBLE` memory type can be selected if it may improve performance. By using this flag, you declare that you will check if the allocation ended up in a `HOST_VISIBLE` memory type (e.g. using vmaGetAllocationMemoryProperties()) and if not, you will create some "staging" buffer and issue an explicit transfer to write/read your data. To prepare for this possibility, don't forget to add appropriate flags like `VK_BUFFER_USAGE_TRANSFER_DST_BIT`, `VK_BUFFER_USAGE_TRANSFER_SRC_BIT` to the parameters of created buffer or image. */ VMA_ALLOCATION_CREATE_HOST_ACCESS_ALLOW_TRANSFER_INSTEAD_BIT = 0x00001000, /** Allocation strategy that chooses smallest possible free range for the allocation to minimize memory usage and fragmentation, possibly at the expense of allocation time. */ VMA_ALLOCATION_CREATE_STRATEGY_MIN_MEMORY_BIT = 0x00010000, /** Allocation strategy that chooses first suitable free range for the allocation - not necessarily in terms of the smallest offset but the one that is easiest and fastest to find to minimize allocation time, possibly at the expense of allocation quality. */ VMA_ALLOCATION_CREATE_STRATEGY_MIN_TIME_BIT = 0x00020000, /** Allocation strategy that chooses always the lowest offset in available space. This is not the most efficient strategy but achieves highly packed data. Used internally by defragmentation, not recommended in typical usage. */ VMA_ALLOCATION_CREATE_STRATEGY_MIN_OFFSET_BIT = 0x00040000, /** Alias to #VMA_ALLOCATION_CREATE_STRATEGY_MIN_MEMORY_BIT. */ VMA_ALLOCATION_CREATE_STRATEGY_BEST_FIT_BIT = VMA_ALLOCATION_CREATE_STRATEGY_MIN_MEMORY_BIT, /** Alias to #VMA_ALLOCATION_CREATE_STRATEGY_MIN_TIME_BIT. */ VMA_ALLOCATION_CREATE_STRATEGY_FIRST_FIT_BIT = VMA_ALLOCATION_CREATE_STRATEGY_MIN_TIME_BIT, /** A bit mask to extract only `STRATEGY` bits from entire set of flags. */ VMA_ALLOCATION_CREATE_STRATEGY_MASK = VMA_ALLOCATION_CREATE_STRATEGY_MIN_MEMORY_BIT | VMA_ALLOCATION_CREATE_STRATEGY_MIN_TIME_BIT | VMA_ALLOCATION_CREATE_STRATEGY_MIN_OFFSET_BIT, VMA_ALLOCATION_CREATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VmaAllocationCreateFlagBits; /// See #VmaAllocationCreateFlagBits. typedef VkFlags VmaAllocationCreateFlags; /// Flags to be passed as VmaPoolCreateInfo::flags. typedef enum VmaPoolCreateFlagBits { /** \brief Use this flag if you always allocate only buffers and linear images or only optimal images out of this pool and so Buffer-Image Granularity can be ignored. This is an optional optimization flag. If you always allocate using vmaCreateBuffer(), vmaCreateImage(), vmaAllocateMemoryForBuffer(), then you don't need to use it because allocator knows exact type of your allocations so it can handle Buffer-Image Granularity in the optimal way. If you also allocate using vmaAllocateMemoryForImage() or vmaAllocateMemory(), exact type of such allocations is not known, so allocator must be conservative in handling Buffer-Image Granularity, which can lead to suboptimal allocation (wasted memory). In that case, if you can make sure you always allocate only buffers and linear images or only optimal images out of this pool, use this flag to make allocator disregard Buffer-Image Granularity and so make allocations faster and more optimal. */ VMA_POOL_CREATE_IGNORE_BUFFER_IMAGE_GRANULARITY_BIT = 0x00000002, /** \brief Enables alternative, linear allocation algorithm in this pool. Specify this flag to enable linear allocation algorithm, which always creates new allocations after last one and doesn't reuse space from allocations freed in between. It trades memory consumption for simplified algorithm and data structure, which has better performance and uses less memory for metadata. By using this flag, you can achieve behavior of free-at-once, stack, ring buffer, and double stack. For details, see documentation chapter \ref linear_algorithm. */ VMA_POOL_CREATE_LINEAR_ALGORITHM_BIT = 0x00000004, /** Bit mask to extract only `ALGORITHM` bits from entire set of flags. */ VMA_POOL_CREATE_ALGORITHM_MASK = VMA_POOL_CREATE_LINEAR_ALGORITHM_BIT, VMA_POOL_CREATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VmaPoolCreateFlagBits; /// Flags to be passed as VmaPoolCreateInfo::flags. See #VmaPoolCreateFlagBits. typedef VkFlags VmaPoolCreateFlags; /// Flags to be passed as VmaDefragmentationInfo::flags. typedef enum VmaDefragmentationFlagBits { /* \brief Use simple but fast algorithm for defragmentation. May not achieve best results but will require least time to compute and least allocations to copy. */ VMA_DEFRAGMENTATION_FLAG_ALGORITHM_FAST_BIT = 0x1, /* \brief Default defragmentation algorithm, applied also when no `ALGORITHM` flag is specified. Offers a balance between defragmentation quality and the amount of allocations and bytes that need to be moved. */ VMA_DEFRAGMENTATION_FLAG_ALGORITHM_BALANCED_BIT = 0x2, /* \brief Perform full defragmentation of memory. Can result in notably more time to compute and allocations to copy, but will achieve best memory packing. */ VMA_DEFRAGMENTATION_FLAG_ALGORITHM_FULL_BIT = 0x4, /** \brief Use the most roboust algorithm at the cost of time to compute and number of copies to make. Only available when bufferImageGranularity is greater than 1, since it aims to reduce alignment issues between different types of resources. Otherwise falls back to same behavior as #VMA_DEFRAGMENTATION_FLAG_ALGORITHM_FULL_BIT. */ VMA_DEFRAGMENTATION_FLAG_ALGORITHM_EXTENSIVE_BIT = 0x8, /// A bit mask to extract only `ALGORITHM` bits from entire set of flags. VMA_DEFRAGMENTATION_FLAG_ALGORITHM_MASK = VMA_DEFRAGMENTATION_FLAG_ALGORITHM_FAST_BIT | VMA_DEFRAGMENTATION_FLAG_ALGORITHM_BALANCED_BIT | VMA_DEFRAGMENTATION_FLAG_ALGORITHM_FULL_BIT | VMA_DEFRAGMENTATION_FLAG_ALGORITHM_EXTENSIVE_BIT, VMA_DEFRAGMENTATION_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VmaDefragmentationFlagBits; /// See #VmaDefragmentationFlagBits. typedef VkFlags VmaDefragmentationFlags; /// Operation performed on single defragmentation move. See structure #VmaDefragmentationMove. typedef enum VmaDefragmentationMoveOperation { /// Buffer/image has been recreated at `dstTmpAllocation`, data has been copied, old buffer/image has been destroyed. `srcAllocation` should be changed to point to the new place. This is the default value set by vmaBeginDefragmentationPass(). VMA_DEFRAGMENTATION_MOVE_OPERATION_COPY = 0, /// Set this value if you cannot move the allocation. New place reserved at `dstTmpAllocation` will be freed. `srcAllocation` will remain unchanged. VMA_DEFRAGMENTATION_MOVE_OPERATION_IGNORE = 1, /// Set this value if you decide to abandon the allocation and you destroyed the buffer/image. New place reserved at `dstTmpAllocation` will be freed, along with `srcAllocation`, which will be destroyed. VMA_DEFRAGMENTATION_MOVE_OPERATION_DESTROY = 2, } VmaDefragmentationMoveOperation; /** @} */ /** \addtogroup group_virtual @{ */ /// Flags to be passed as VmaVirtualBlockCreateInfo::flags. typedef enum VmaVirtualBlockCreateFlagBits { /** \brief Enables alternative, linear allocation algorithm in this virtual block. Specify this flag to enable linear allocation algorithm, which always creates new allocations after last one and doesn't reuse space from allocations freed in between. It trades memory consumption for simplified algorithm and data structure, which has better performance and uses less memory for metadata. By using this flag, you can achieve behavior of free-at-once, stack, ring buffer, and double stack. For details, see documentation chapter \ref linear_algorithm. */ VMA_VIRTUAL_BLOCK_CREATE_LINEAR_ALGORITHM_BIT = 0x00000001, /** \brief Bit mask to extract only `ALGORITHM` bits from entire set of flags. */ VMA_VIRTUAL_BLOCK_CREATE_ALGORITHM_MASK = VMA_VIRTUAL_BLOCK_CREATE_LINEAR_ALGORITHM_BIT, VMA_VIRTUAL_BLOCK_CREATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VmaVirtualBlockCreateFlagBits; /// Flags to be passed as VmaVirtualBlockCreateInfo::flags. See #VmaVirtualBlockCreateFlagBits. typedef VkFlags VmaVirtualBlockCreateFlags; /// Flags to be passed as VmaVirtualAllocationCreateInfo::flags. typedef enum VmaVirtualAllocationCreateFlagBits { /** \brief Allocation will be created from upper stack in a double stack pool. This flag is only allowed for virtual blocks created with #VMA_VIRTUAL_BLOCK_CREATE_LINEAR_ALGORITHM_BIT flag. */ VMA_VIRTUAL_ALLOCATION_CREATE_UPPER_ADDRESS_BIT = VMA_ALLOCATION_CREATE_UPPER_ADDRESS_BIT, /** \brief Allocation strategy that tries to minimize memory usage. */ VMA_VIRTUAL_ALLOCATION_CREATE_STRATEGY_MIN_MEMORY_BIT = VMA_ALLOCATION_CREATE_STRATEGY_MIN_MEMORY_BIT, /** \brief Allocation strategy that tries to minimize allocation time. */ VMA_VIRTUAL_ALLOCATION_CREATE_STRATEGY_MIN_TIME_BIT = VMA_ALLOCATION_CREATE_STRATEGY_MIN_TIME_BIT, /** Allocation strategy that chooses always the lowest offset in available space. This is not the most efficient strategy but achieves highly packed data. */ VMA_VIRTUAL_ALLOCATION_CREATE_STRATEGY_MIN_OFFSET_BIT = VMA_ALLOCATION_CREATE_STRATEGY_MIN_OFFSET_BIT, /** \brief A bit mask to extract only `STRATEGY` bits from entire set of flags. These strategy flags are binary compatible with equivalent flags in #VmaAllocationCreateFlagBits. */ VMA_VIRTUAL_ALLOCATION_CREATE_STRATEGY_MASK = VMA_ALLOCATION_CREATE_STRATEGY_MASK, VMA_VIRTUAL_ALLOCATION_CREATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VmaVirtualAllocationCreateFlagBits; /// Flags to be passed as VmaVirtualAllocationCreateInfo::flags. See #VmaVirtualAllocationCreateFlagBits. typedef VkFlags VmaVirtualAllocationCreateFlags; /** @} */ #endif // _VMA_ENUM_DECLARATIONS #ifndef _VMA_DATA_TYPES_DECLARATIONS /** \addtogroup group_init @{ */ /** \struct VmaAllocator \brief Represents main object of this library initialized. Fill structure #VmaAllocatorCreateInfo and call function vmaCreateAllocator() to create it. Call function vmaDestroyAllocator() to destroy it. It is recommended to create just one object of this type per `VkDevice` object, right after Vulkan is initialized and keep it alive until before Vulkan device is destroyed. */ VK_DEFINE_HANDLE(VmaAllocator) /** @} */ /** \addtogroup group_alloc @{ */ /** \struct VmaPool \brief Represents custom memory pool Fill structure VmaPoolCreateInfo and call function vmaCreatePool() to create it. Call function vmaDestroyPool() to destroy it. For more information see [Custom memory pools](@ref choosing_memory_type_custom_memory_pools). */ VK_DEFINE_HANDLE(VmaPool) /** \struct VmaAllocation \brief Represents single memory allocation. It may be either dedicated block of `VkDeviceMemory` or a specific region of a bigger block of this type plus unique offset. There are multiple ways to create such object. You need to fill structure VmaAllocationCreateInfo. For more information see [Choosing memory type](@ref choosing_memory_type). Although the library provides convenience functions that create Vulkan buffer or image, allocate memory for it and bind them together, binding of the allocation to a buffer or an image is out of scope of the allocation itself. Allocation object can exist without buffer/image bound, binding can be done manually by the user, and destruction of it can be done independently of destruction of the allocation. The object also remembers its size and some other information. To retrieve this information, use function vmaGetAllocationInfo() and inspect returned structure VmaAllocationInfo. */ VK_DEFINE_HANDLE(VmaAllocation) /** \struct VmaDefragmentationContext \brief An opaque object that represents started defragmentation process. Fill structure #VmaDefragmentationInfo and call function vmaBeginDefragmentation() to create it. Call function vmaEndDefragmentation() to destroy it. */ VK_DEFINE_HANDLE(VmaDefragmentationContext) /** @} */ /** \addtogroup group_virtual @{ */ /** \struct VmaVirtualAllocation \brief Represents single memory allocation done inside VmaVirtualBlock. Use it as a unique identifier to virtual allocation within the single block. Use value `VK_NULL_HANDLE` to represent a null/invalid allocation. */ VK_DEFINE_NON_DISPATCHABLE_HANDLE(VmaVirtualAllocation) /** @} */ /** \addtogroup group_virtual @{ */ /** \struct VmaVirtualBlock \brief Handle to a virtual block object that allows to use core allocation algorithm without allocating any real GPU memory. Fill in #VmaVirtualBlockCreateInfo structure and use vmaCreateVirtualBlock() to create it. Use vmaDestroyVirtualBlock() to destroy it. For more information, see documentation chapter \ref virtual_allocator. This object is not thread-safe - should not be used from multiple threads simultaneously, must be synchronized externally. */ VK_DEFINE_HANDLE(VmaVirtualBlock) /** @} */ /** \addtogroup group_init @{ */ /// Callback function called after successful vkAllocateMemory. typedef void (VKAPI_PTR* PFN_vmaAllocateDeviceMemoryFunction)( VmaAllocator VMA_NOT_NULL allocator, uint32_t memoryType, VkDeviceMemory VMA_NOT_NULL_NON_DISPATCHABLE memory, VkDeviceSize size, void* VMA_NULLABLE pUserData); /// Callback function called before vkFreeMemory. typedef void (VKAPI_PTR* PFN_vmaFreeDeviceMemoryFunction)( VmaAllocator VMA_NOT_NULL allocator, uint32_t memoryType, VkDeviceMemory VMA_NOT_NULL_NON_DISPATCHABLE memory, VkDeviceSize size, void* VMA_NULLABLE pUserData); /** \brief Set of callbacks that the library will call for `vkAllocateMemory` and `vkFreeMemory`. Provided for informative purpose, e.g. to gather statistics about number of allocations or total amount of memory allocated in Vulkan. Used in VmaAllocatorCreateInfo::pDeviceMemoryCallbacks. */ typedef struct VmaDeviceMemoryCallbacks { /// Optional, can be null. PFN_vmaAllocateDeviceMemoryFunction VMA_NULLABLE pfnAllocate; /// Optional, can be null. PFN_vmaFreeDeviceMemoryFunction VMA_NULLABLE pfnFree; /// Optional, can be null. void* VMA_NULLABLE pUserData; } VmaDeviceMemoryCallbacks; /** \brief Pointers to some Vulkan functions - a subset used by the library. Used in VmaAllocatorCreateInfo::pVulkanFunctions. */ typedef struct VmaVulkanFunctions { /// Required when using VMA_DYNAMIC_VULKAN_FUNCTIONS. PFN_vkGetInstanceProcAddr VMA_NULLABLE vkGetInstanceProcAddr; /// Required when using VMA_DYNAMIC_VULKAN_FUNCTIONS. PFN_vkGetDeviceProcAddr VMA_NULLABLE vkGetDeviceProcAddr; PFN_vkGetPhysicalDeviceProperties VMA_NULLABLE vkGetPhysicalDeviceProperties; PFN_vkGetPhysicalDeviceMemoryProperties VMA_NULLABLE vkGetPhysicalDeviceMemoryProperties; PFN_vkAllocateMemory VMA_NULLABLE vkAllocateMemory; PFN_vkFreeMemory VMA_NULLABLE vkFreeMemory; PFN_vkMapMemory VMA_NULLABLE vkMapMemory; PFN_vkUnmapMemory VMA_NULLABLE vkUnmapMemory; PFN_vkFlushMappedMemoryRanges VMA_NULLABLE vkFlushMappedMemoryRanges; PFN_vkInvalidateMappedMemoryRanges VMA_NULLABLE vkInvalidateMappedMemoryRanges; PFN_vkBindBufferMemory VMA_NULLABLE vkBindBufferMemory; PFN_vkBindImageMemory VMA_NULLABLE vkBindImageMemory; PFN_vkGetBufferMemoryRequirements VMA_NULLABLE vkGetBufferMemoryRequirements; PFN_vkGetImageMemoryRequirements VMA_NULLABLE vkGetImageMemoryRequirements; PFN_vkCreateBuffer VMA_NULLABLE vkCreateBuffer; PFN_vkDestroyBuffer VMA_NULLABLE vkDestroyBuffer; PFN_vkCreateImage VMA_NULLABLE vkCreateImage; PFN_vkDestroyImage VMA_NULLABLE vkDestroyImage; PFN_vkCmdCopyBuffer VMA_NULLABLE vkCmdCopyBuffer; #if VMA_DEDICATED_ALLOCATION || VMA_VULKAN_VERSION >= 1001000 /// Fetch "vkGetBufferMemoryRequirements2" on Vulkan >= 1.1, fetch "vkGetBufferMemoryRequirements2KHR" when using VK_KHR_dedicated_allocation extension. PFN_vkGetBufferMemoryRequirements2KHR VMA_NULLABLE vkGetBufferMemoryRequirements2KHR; /// Fetch "vkGetImageMemoryRequirements2" on Vulkan >= 1.1, fetch "vkGetImageMemoryRequirements2KHR" when using VK_KHR_dedicated_allocation extension. PFN_vkGetImageMemoryRequirements2KHR VMA_NULLABLE vkGetImageMemoryRequirements2KHR; #endif #if VMA_BIND_MEMORY2 || VMA_VULKAN_VERSION >= 1001000 /// Fetch "vkBindBufferMemory2" on Vulkan >= 1.1, fetch "vkBindBufferMemory2KHR" when using VK_KHR_bind_memory2 extension. PFN_vkBindBufferMemory2KHR VMA_NULLABLE vkBindBufferMemory2KHR; /// Fetch "vkBindImageMemory2" on Vulkan >= 1.1, fetch "vkBindImageMemory2KHR" when using VK_KHR_bind_memory2 extension. PFN_vkBindImageMemory2KHR VMA_NULLABLE vkBindImageMemory2KHR; #endif #if VMA_MEMORY_BUDGET || VMA_VULKAN_VERSION >= 1001000 /// Fetch from "vkGetPhysicalDeviceMemoryProperties2" on Vulkan >= 1.1, but you can also fetch it from "vkGetPhysicalDeviceMemoryProperties2KHR" if you enabled extension VK_KHR_get_physical_device_properties2. PFN_vkGetPhysicalDeviceMemoryProperties2KHR VMA_NULLABLE vkGetPhysicalDeviceMemoryProperties2KHR; #endif #if VMA_KHR_MAINTENANCE4 || VMA_VULKAN_VERSION >= 1003000 /// Fetch from "vkGetDeviceBufferMemoryRequirements" on Vulkan >= 1.3, but you can also fetch it from "vkGetDeviceBufferMemoryRequirementsKHR" if you enabled extension VK_KHR_maintenance4. PFN_vkGetDeviceBufferMemoryRequirementsKHR VMA_NULLABLE vkGetDeviceBufferMemoryRequirements; /// Fetch from "vkGetDeviceImageMemoryRequirements" on Vulkan >= 1.3, but you can also fetch it from "vkGetDeviceImageMemoryRequirementsKHR" if you enabled extension VK_KHR_maintenance4. PFN_vkGetDeviceImageMemoryRequirementsKHR VMA_NULLABLE vkGetDeviceImageMemoryRequirements; #endif #if VMA_EXTERNAL_MEMORY_WIN32 PFN_vkGetMemoryWin32HandleKHR VMA_NULLABLE vkGetMemoryWin32HandleKHR; #else void* VMA_NULLABLE vkGetMemoryWin32HandleKHR; #endif } VmaVulkanFunctions; /// Description of a Allocator to be created. typedef struct VmaAllocatorCreateInfo { /// Flags for created allocator. Use #VmaAllocatorCreateFlagBits enum. VmaAllocatorCreateFlags flags; /// Vulkan physical device. /** It must be valid throughout whole lifetime of created allocator. */ VkPhysicalDevice VMA_NOT_NULL physicalDevice; /// Vulkan device. /** It must be valid throughout whole lifetime of created allocator. */ VkDevice VMA_NOT_NULL device; /// Preferred size of a single `VkDeviceMemory` block to be allocated from large heaps > 1 GiB. Optional. /** Set to 0 to use default, which is currently 256 MiB. */ VkDeviceSize preferredLargeHeapBlockSize; /// Custom CPU memory allocation callbacks. Optional. /** Optional, can be null. When specified, will also be used for all CPU-side memory allocations. */ const VkAllocationCallbacks* VMA_NULLABLE pAllocationCallbacks; /// Informative callbacks for `vkAllocateMemory`, `vkFreeMemory`. Optional. /** Optional, can be null. */ const VmaDeviceMemoryCallbacks* VMA_NULLABLE pDeviceMemoryCallbacks; /** \brief Either null or a pointer to an array of limits on maximum number of bytes that can be allocated out of particular Vulkan memory heap. If not NULL, it must be a pointer to an array of `VkPhysicalDeviceMemoryProperties::memoryHeapCount` elements, defining limit on maximum number of bytes that can be allocated out of particular Vulkan memory heap. Any of the elements may be equal to `VK_WHOLE_SIZE`, which means no limit on that heap. This is also the default in case of `pHeapSizeLimit` = NULL. If there is a limit defined for a heap: - If user tries to allocate more memory from that heap using this allocator, the allocation fails with `VK_ERROR_OUT_OF_DEVICE_MEMORY`. - If the limit is smaller than heap size reported in `VkMemoryHeap::size`, the value of this limit will be reported instead when using vmaGetMemoryProperties(). Warning! Using this feature may not be equivalent to installing a GPU with smaller amount of memory, because graphics driver doesn't necessary fail new allocations with `VK_ERROR_OUT_OF_DEVICE_MEMORY` result when memory capacity is exceeded. It may return success and just silently migrate some device memory blocks to system RAM. This driver behavior can also be controlled using VK_AMD_memory_overallocation_behavior extension. */ const VkDeviceSize* VMA_NULLABLE VMA_LEN_IF_NOT_NULL("VkPhysicalDeviceMemoryProperties::memoryHeapCount") pHeapSizeLimit; /** \brief Pointers to Vulkan functions. Can be null. For details see [Pointers to Vulkan functions](@ref config_Vulkan_functions). */ const VmaVulkanFunctions* VMA_NULLABLE pVulkanFunctions; /** \brief Handle to Vulkan instance object. Starting from version 3.0.0 this member is no longer optional, it must be set! */ VkInstance VMA_NOT_NULL instance; /** \brief Optional. Vulkan version that the application uses. It must be a value in the format as created by macro `VK_MAKE_VERSION` or a constant like: `VK_API_VERSION_1_1`, `VK_API_VERSION_1_0`. The patch version number specified is ignored. Only the major and minor versions are considered. Only versions 1.0...1.4 are supported by the current implementation. Leaving it initialized to zero is equivalent to `VK_API_VERSION_1_0`. It must match the Vulkan version used by the application and supported on the selected physical device, so it must be no higher than `VkApplicationInfo::apiVersion` passed to `vkCreateInstance` and no higher than `VkPhysicalDeviceProperties::apiVersion` found on the physical device used. */ uint32_t vulkanApiVersion; #if VMA_EXTERNAL_MEMORY /** \brief Either null or a pointer to an array of external memory handle types for each Vulkan memory type. If not NULL, it must be a pointer to an array of `VkPhysicalDeviceMemoryProperties::memoryTypeCount` elements, defining external memory handle types of particular Vulkan memory type, to be passed using `VkExportMemoryAllocateInfoKHR`. Any of the elements may be equal to 0, which means not to use `VkExportMemoryAllocateInfoKHR` on this memory type. This is also the default in case of `pTypeExternalMemoryHandleTypes` = NULL. */ const VkExternalMemoryHandleTypeFlagsKHR* VMA_NULLABLE VMA_LEN_IF_NOT_NULL("VkPhysicalDeviceMemoryProperties::memoryTypeCount") pTypeExternalMemoryHandleTypes; #endif // #if VMA_EXTERNAL_MEMORY } VmaAllocatorCreateInfo; /// Information about existing #VmaAllocator object. typedef struct VmaAllocatorInfo { /** \brief Handle to Vulkan instance object. This is the same value as has been passed through VmaAllocatorCreateInfo::instance. */ VkInstance VMA_NOT_NULL instance; /** \brief Handle to Vulkan physical device object. This is the same value as has been passed through VmaAllocatorCreateInfo::physicalDevice. */ VkPhysicalDevice VMA_NOT_NULL physicalDevice; /** \brief Handle to Vulkan device object. This is the same value as has been passed through VmaAllocatorCreateInfo::device. */ VkDevice VMA_NOT_NULL device; } VmaAllocatorInfo; /** @} */ /** \addtogroup group_stats @{ */ /** \brief Calculated statistics of memory usage e.g. in a specific memory type, heap, custom pool, or total. These are fast to calculate. See functions: vmaGetHeapBudgets(), vmaGetPoolStatistics(). */ typedef struct VmaStatistics { /** \brief Number of `VkDeviceMemory` objects - Vulkan memory blocks allocated. */ uint32_t blockCount; /** \brief Number of #VmaAllocation objects allocated. Dedicated allocations have their own blocks, so each one adds 1 to `allocationCount` as well as `blockCount`. */ uint32_t allocationCount; /** \brief Number of bytes allocated in `VkDeviceMemory` blocks. \note To avoid confusion, please be aware that what Vulkan calls an "allocation" - a whole `VkDeviceMemory` object (e.g. as in `VkPhysicalDeviceLimits::maxMemoryAllocationCount`) is called a "block" in VMA, while VMA calls "allocation" a #VmaAllocation object that represents a memory region sub-allocated from such block, usually for a single buffer or image. */ VkDeviceSize blockBytes; /** \brief Total number of bytes occupied by all #VmaAllocation objects. Always less or equal than `blockBytes`. Difference `(blockBytes - allocationBytes)` is the amount of memory allocated from Vulkan but unused by any #VmaAllocation. */ VkDeviceSize allocationBytes; } VmaStatistics; /** \brief More detailed statistics than #VmaStatistics. These are slower to calculate. Use for debugging purposes. See functions: vmaCalculateStatistics(), vmaCalculatePoolStatistics(). Previous version of the statistics API provided averages, but they have been removed because they can be easily calculated as: \code VkDeviceSize allocationSizeAvg = detailedStats.statistics.allocationBytes / detailedStats.statistics.allocationCount; VkDeviceSize unusedBytes = detailedStats.statistics.blockBytes - detailedStats.statistics.allocationBytes; VkDeviceSize unusedRangeSizeAvg = unusedBytes / detailedStats.unusedRangeCount; \endcode */ typedef struct VmaDetailedStatistics { /// Basic statistics. VmaStatistics statistics; /// Number of free ranges of memory between allocations. uint32_t unusedRangeCount; /// Smallest allocation size. `VK_WHOLE_SIZE` if there are 0 allocations. VkDeviceSize allocationSizeMin; /// Largest allocation size. 0 if there are 0 allocations. VkDeviceSize allocationSizeMax; /// Smallest empty range size. `VK_WHOLE_SIZE` if there are 0 empty ranges. VkDeviceSize unusedRangeSizeMin; /// Largest empty range size. 0 if there are 0 empty ranges. VkDeviceSize unusedRangeSizeMax; } VmaDetailedStatistics; /** \brief General statistics from current state of the Allocator - total memory usage across all memory heaps and types. These are slower to calculate. Use for debugging purposes. See function vmaCalculateStatistics(). */ typedef struct VmaTotalStatistics { VmaDetailedStatistics memoryType[VK_MAX_MEMORY_TYPES]; VmaDetailedStatistics memoryHeap[VK_MAX_MEMORY_HEAPS]; VmaDetailedStatistics total; } VmaTotalStatistics; /** \brief Statistics of current memory usage and available budget for a specific memory heap. These are fast to calculate. See function vmaGetHeapBudgets(). */ typedef struct VmaBudget { /** \brief Statistics fetched from the library. */ VmaStatistics statistics; /** \brief Estimated current memory usage of the program, in bytes. Fetched from system using VK_EXT_memory_budget extension if enabled. It might be different than `statistics.blockBytes` (usually higher) due to additional implicit objects also occupying the memory, like swapchain, pipelines, descriptor heaps, command buffers, or `VkDeviceMemory` blocks allocated outside of this library, if any. */ VkDeviceSize usage; /** \brief Estimated amount of memory available to the program, in bytes. Fetched from system using VK_EXT_memory_budget extension if enabled. It might be different (most probably smaller) than `VkMemoryHeap::size[heapIndex]` due to factors external to the program, decided by the operating system. Difference `budget - usage` is the amount of additional memory that can probably be allocated without problems. Exceeding the budget may result in various problems. */ VkDeviceSize budget; } VmaBudget; /** @} */ /** \addtogroup group_alloc @{ */ /** \brief Parameters of new #VmaAllocation. To be used with functions like vmaCreateBuffer(), vmaCreateImage(), and many others. */ typedef struct VmaAllocationCreateInfo { /// Use #VmaAllocationCreateFlagBits enum. VmaAllocationCreateFlags flags; /** \brief Intended usage of memory. You can leave #VMA_MEMORY_USAGE_UNKNOWN if you specify memory requirements in other way. \n If `pool` is not null, this member is ignored. */ VmaMemoryUsage usage; /** \brief Flags that must be set in a Memory Type chosen for an allocation. Leave 0 if you specify memory requirements in other way. \n If `pool` is not null, this member is ignored.*/ VkMemoryPropertyFlags requiredFlags; /** \brief Flags that preferably should be set in a memory type chosen for an allocation. Set to 0 if no additional flags are preferred. \n If `pool` is not null, this member is ignored. */ VkMemoryPropertyFlags preferredFlags; /** \brief Bitmask containing one bit set for every memory type acceptable for this allocation. Value 0 is equivalent to `UINT32_MAX` - it means any memory type is accepted if it meets other requirements specified by this structure, with no further restrictions on memory type index. \n If `pool` is not null, this member is ignored. */ uint32_t memoryTypeBits; /** \brief Pool that this allocation should be created in. Leave `VK_NULL_HANDLE` to allocate from default pool. If not null, members: `usage`, `requiredFlags`, `preferredFlags`, `memoryTypeBits` are ignored. */ VmaPool VMA_NULLABLE pool; /** \brief Custom general-purpose pointer that will be stored in #VmaAllocation, can be read as VmaAllocationInfo::pUserData and changed using vmaSetAllocationUserData(). If #VMA_ALLOCATION_CREATE_USER_DATA_COPY_STRING_BIT is used, it must be either null or pointer to a null-terminated string. The string will be then copied to internal buffer, so it doesn't need to be valid after allocation call. */ void* VMA_NULLABLE pUserData; /** \brief A floating-point value between 0 and 1, indicating the priority of the allocation relative to other memory allocations. It is used only when #VMA_ALLOCATOR_CREATE_EXT_MEMORY_PRIORITY_BIT flag was used during creation of the #VmaAllocator object and this allocation ends up as dedicated or is explicitly forced as dedicated using #VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT. Otherwise, it has the priority of a memory block where it is placed and this variable is ignored. */ float priority; } VmaAllocationCreateInfo; /// Describes parameter of created #VmaPool. typedef struct VmaPoolCreateInfo { /** \brief Vulkan memory type index to allocate this pool from. */ uint32_t memoryTypeIndex; /** \brief Use combination of #VmaPoolCreateFlagBits. */ VmaPoolCreateFlags flags; /** \brief Size of a single `VkDeviceMemory` block to be allocated as part of this pool, in bytes. Optional. Specify nonzero to set explicit, constant size of memory blocks used by this pool. Leave 0 to use default and let the library manage block sizes automatically. Sizes of particular blocks may vary. In this case, the pool will also support dedicated allocations. */ VkDeviceSize blockSize; /** \brief Minimum number of blocks to be always allocated in this pool, even if they stay empty. Set to 0 to have no preallocated blocks and allow the pool be completely empty. */ size_t minBlockCount; /** \brief Maximum number of blocks that can be allocated in this pool. Optional. Set to 0 to use default, which is `SIZE_MAX`, which means no limit. Set to same value as VmaPoolCreateInfo::minBlockCount to have fixed amount of memory allocated throughout whole lifetime of this pool. */ size_t maxBlockCount; /** \brief A floating-point value between 0 and 1, indicating the priority of the allocations in this pool relative to other memory allocations. It is used only when #VMA_ALLOCATOR_CREATE_EXT_MEMORY_PRIORITY_BIT flag was used during creation of the #VmaAllocator object. Otherwise, this variable is ignored. */ float priority; /** \brief Additional minimum alignment to be used for all allocations created from this pool. Can be 0. Leave 0 (default) not to impose any additional alignment. If not 0, it must be a power of two. It can be useful in cases where alignment returned by Vulkan by functions like `vkGetBufferMemoryRequirements` is not enough, e.g. when doing interop with OpenGL. */ VkDeviceSize minAllocationAlignment; /** \brief Additional `pNext` chain to be attached to `VkMemoryAllocateInfo` used for every allocation made by this pool. Optional. Optional, can be null. If not null, it must point to a `pNext` chain of structures that can be attached to `VkMemoryAllocateInfo`. It can be useful for special needs such as adding `VkExportMemoryAllocateInfoKHR`. Structures pointed by this member must remain alive and unchanged for the whole lifetime of the custom pool. Please note that some structures, e.g. `VkMemoryPriorityAllocateInfoEXT`, `VkMemoryDedicatedAllocateInfoKHR`, can be attached automatically by this library when using other, more convenient of its features. */ void* VMA_NULLABLE VMA_EXTENDS_VK_STRUCT(VkMemoryAllocateInfo) pMemoryAllocateNext; } VmaPoolCreateInfo; /** @} */ /** \addtogroup group_alloc @{ */ /** Parameters of #VmaAllocation objects, that can be retrieved using function vmaGetAllocationInfo(). There is also an extended version of this structure that carries additional parameters: #VmaAllocationInfo2. */ typedef struct VmaAllocationInfo { /** \brief Memory type index that this allocation was allocated from. It never changes. */ uint32_t memoryType; /** \brief Handle to Vulkan memory object. Same memory object can be shared by multiple allocations. It can change after the allocation is moved during \ref defragmentation. */ VkDeviceMemory VMA_NULLABLE_NON_DISPATCHABLE deviceMemory; /** \brief Offset in `VkDeviceMemory` object to the beginning of this allocation, in bytes. `(deviceMemory, offset)` pair is unique to this allocation. You usually don't need to use this offset. If you create a buffer or an image together with the allocation using e.g. function vmaCreateBuffer(), vmaCreateImage(), functions that operate on these resources refer to the beginning of the buffer or image, not entire device memory block. Functions like vmaMapMemory(), vmaBindBufferMemory() also refer to the beginning of the allocation and apply this offset automatically. It can change after the allocation is moved during \ref defragmentation. */ VkDeviceSize offset; /** \brief Size of this allocation, in bytes. It never changes. \note Allocation size returned in this variable may be greater than the size requested for the resource e.g. as `VkBufferCreateInfo::size`. Whole size of the allocation is accessible for operations on memory e.g. using a pointer after mapping with vmaMapMemory(), but operations on the resource e.g. using `vkCmdCopyBuffer` must be limited to the size of the resource. */ VkDeviceSize size; /** \brief Pointer to the beginning of this allocation as mapped data. If the allocation hasn't been mapped using vmaMapMemory() and hasn't been created with #VMA_ALLOCATION_CREATE_MAPPED_BIT flag, this value is null. It can change after call to vmaMapMemory(), vmaUnmapMemory(). It can also change after the allocation is moved during \ref defragmentation. */ void* VMA_NULLABLE pMappedData; /** \brief Custom general-purpose pointer that was passed as VmaAllocationCreateInfo::pUserData or set using vmaSetAllocationUserData(). It can change after call to vmaSetAllocationUserData() for this allocation. */ void* VMA_NULLABLE pUserData; /** \brief Custom allocation name that was set with vmaSetAllocationName(). It can change after call to vmaSetAllocationName() for this allocation. Another way to set custom name is to pass it in VmaAllocationCreateInfo::pUserData with additional flag #VMA_ALLOCATION_CREATE_USER_DATA_COPY_STRING_BIT set [DEPRECATED]. */ const char* VMA_NULLABLE pName; } VmaAllocationInfo; /// Extended parameters of a #VmaAllocation object that can be retrieved using function vmaGetAllocationInfo2(). typedef struct VmaAllocationInfo2 { /** \brief Basic parameters of the allocation. If you need only these, you can use function vmaGetAllocationInfo() and structure #VmaAllocationInfo instead. */ VmaAllocationInfo allocationInfo; /** \brief Size of the `VkDeviceMemory` block that the allocation belongs to. In case of an allocation with dedicated memory, it will be equal to `allocationInfo.size`. */ VkDeviceSize blockSize; /** \brief `VK_TRUE` if the allocation has dedicated memory, `VK_FALSE` if it was placed as part of a larger memory block. When `VK_TRUE`, it also means `VkMemoryDedicatedAllocateInfo` was used when creating the allocation (if VK_KHR_dedicated_allocation extension or Vulkan version >= 1.1 is enabled). */ VkBool32 dedicatedMemory; } VmaAllocationInfo2; /** Callback function called during vmaBeginDefragmentation() to check custom criterion about ending current defragmentation pass. Should return true if the defragmentation needs to stop current pass. */ typedef VkBool32 (VKAPI_PTR* PFN_vmaCheckDefragmentationBreakFunction)(void* VMA_NULLABLE pUserData); /** \brief Parameters for defragmentation. To be used with function vmaBeginDefragmentation(). */ typedef struct VmaDefragmentationInfo { /// \brief Use combination of #VmaDefragmentationFlagBits. VmaDefragmentationFlags flags; /** \brief Custom pool to be defragmented. If null then default pools will undergo defragmentation process. */ VmaPool VMA_NULLABLE pool; /** \brief Maximum numbers of bytes that can be copied during single pass, while moving allocations to different places. `0` means no limit. */ VkDeviceSize maxBytesPerPass; /** \brief Maximum number of allocations that can be moved during single pass to a different place. `0` means no limit. */ uint32_t maxAllocationsPerPass; /** \brief Optional custom callback for stopping vmaBeginDefragmentation(). Have to return true for breaking current defragmentation pass. */ PFN_vmaCheckDefragmentationBreakFunction VMA_NULLABLE pfnBreakCallback; /// \brief Optional data to pass to custom callback for stopping pass of defragmentation. void* VMA_NULLABLE pBreakCallbackUserData; } VmaDefragmentationInfo; /// Single move of an allocation to be done for defragmentation. typedef struct VmaDefragmentationMove { /// Operation to be performed on the allocation by vmaEndDefragmentationPass(). Default value is #VMA_DEFRAGMENTATION_MOVE_OPERATION_COPY. You can modify it. VmaDefragmentationMoveOperation operation; /// Allocation that should be moved. VmaAllocation VMA_NOT_NULL srcAllocation; /** \brief Temporary allocation pointing to destination memory that will replace `srcAllocation`. \warning Do not store this allocation in your data structures! It exists only temporarily, for the duration of the defragmentation pass, to be used for binding new buffer/image to the destination memory using e.g. vmaBindBufferMemory(). vmaEndDefragmentationPass() will destroy it and make `srcAllocation` point to this memory. */ VmaAllocation VMA_NOT_NULL dstTmpAllocation; } VmaDefragmentationMove; /** \brief Parameters for incremental defragmentation steps. To be used with function vmaBeginDefragmentationPass(). */ typedef struct VmaDefragmentationPassMoveInfo { /// Number of elements in the `pMoves` array. uint32_t moveCount; /** \brief Array of moves to be performed by the user in the current defragmentation pass. Pointer to an array of `moveCount` elements, owned by VMA, created in vmaBeginDefragmentationPass(), destroyed in vmaEndDefragmentationPass(). For each element, you should: 1. Create a new buffer/image in the place pointed by VmaDefragmentationMove::dstMemory + VmaDefragmentationMove::dstOffset. 2. Copy data from the VmaDefragmentationMove::srcAllocation e.g. using `vkCmdCopyBuffer`, `vkCmdCopyImage`. 3. Make sure these commands finished executing on the GPU. 4. Destroy the old buffer/image. Only then you can finish defragmentation pass by calling vmaEndDefragmentationPass(). After this call, the allocation will point to the new place in memory. Alternatively, if you cannot move specific allocation, you can set VmaDefragmentationMove::operation to #VMA_DEFRAGMENTATION_MOVE_OPERATION_IGNORE. Alternatively, if you decide you want to completely remove the allocation: 1. Destroy its buffer/image. 2. Set VmaDefragmentationMove::operation to #VMA_DEFRAGMENTATION_MOVE_OPERATION_DESTROY. Then, after vmaEndDefragmentationPass() the allocation will be freed. */ VmaDefragmentationMove* VMA_NULLABLE VMA_LEN_IF_NOT_NULL(moveCount) pMoves; } VmaDefragmentationPassMoveInfo; /// Statistics returned for defragmentation process in function vmaEndDefragmentation(). typedef struct VmaDefragmentationStats { /// Total number of bytes that have been copied while moving allocations to different places. VkDeviceSize bytesMoved; /// Total number of bytes that have been released to the system by freeing empty `VkDeviceMemory` objects. VkDeviceSize bytesFreed; /// Number of allocations that have been moved to different places. uint32_t allocationsMoved; /// Number of empty `VkDeviceMemory` objects that have been released to the system. uint32_t deviceMemoryBlocksFreed; } VmaDefragmentationStats; /** @} */ /** \addtogroup group_virtual @{ */ /// Parameters of created #VmaVirtualBlock object to be passed to vmaCreateVirtualBlock(). typedef struct VmaVirtualBlockCreateInfo { /** \brief Total size of the virtual block. Sizes can be expressed in bytes or any units you want as long as you are consistent in using them. For example, if you allocate from some array of structures, 1 can mean single instance of entire structure. */ VkDeviceSize size; /** \brief Use combination of #VmaVirtualBlockCreateFlagBits. */ VmaVirtualBlockCreateFlags flags; /** \brief Custom CPU memory allocation callbacks. Optional. Optional, can be null. When specified, they will be used for all CPU-side memory allocations. */ const VkAllocationCallbacks* VMA_NULLABLE pAllocationCallbacks; } VmaVirtualBlockCreateInfo; /// Parameters of created virtual allocation to be passed to vmaVirtualAllocate(). typedef struct VmaVirtualAllocationCreateInfo { /** \brief Size of the allocation. Cannot be zero. */ VkDeviceSize size; /** \brief Required alignment of the allocation. Optional. Must be power of two. Special value 0 has the same meaning as 1 - means no special alignment is required, so allocation can start at any offset. */ VkDeviceSize alignment; /** \brief Use combination of #VmaVirtualAllocationCreateFlagBits. */ VmaVirtualAllocationCreateFlags flags; /** \brief Custom pointer to be associated with the allocation. Optional. It can be any value and can be used for user-defined purposes. It can be fetched or changed later. */ void* VMA_NULLABLE pUserData; } VmaVirtualAllocationCreateInfo; /// Parameters of an existing virtual allocation, returned by vmaGetVirtualAllocationInfo(). typedef struct VmaVirtualAllocationInfo { /** \brief Offset of the allocation. Offset at which the allocation was made. */ VkDeviceSize offset; /** \brief Size of the allocation. Same value as passed in VmaVirtualAllocationCreateInfo::size. */ VkDeviceSize size; /** \brief Custom pointer associated with the allocation. Same value as passed in VmaVirtualAllocationCreateInfo::pUserData or to vmaSetVirtualAllocationUserData(). */ void* VMA_NULLABLE pUserData; } VmaVirtualAllocationInfo; /** @} */ #endif // _VMA_DATA_TYPES_DECLARATIONS #ifndef _VMA_FUNCTION_HEADERS /** \addtogroup group_init @{ */ /// Creates #VmaAllocator object. VMA_CALL_PRE VkResult VMA_CALL_POST vmaCreateAllocator( const VmaAllocatorCreateInfo* VMA_NOT_NULL pCreateInfo, VmaAllocator VMA_NULLABLE* VMA_NOT_NULL pAllocator); /// Destroys allocator object. VMA_CALL_PRE void VMA_CALL_POST vmaDestroyAllocator( VmaAllocator VMA_NULLABLE allocator); /** \brief Returns information about existing #VmaAllocator object - handle to Vulkan device etc. It might be useful if you want to keep just the #VmaAllocator handle and fetch other required handles to `VkPhysicalDevice`, `VkDevice` etc. every time using this function. */ VMA_CALL_PRE void VMA_CALL_POST vmaGetAllocatorInfo( VmaAllocator VMA_NOT_NULL allocator, VmaAllocatorInfo* VMA_NOT_NULL pAllocatorInfo); /** PhysicalDeviceProperties are fetched from physicalDevice by the allocator. You can access it here, without fetching it again on your own. */ VMA_CALL_PRE void VMA_CALL_POST vmaGetPhysicalDeviceProperties( VmaAllocator VMA_NOT_NULL allocator, const VkPhysicalDeviceProperties* VMA_NULLABLE* VMA_NOT_NULL ppPhysicalDeviceProperties); /** PhysicalDeviceMemoryProperties are fetched from physicalDevice by the allocator. You can access it here, without fetching it again on your own. */ VMA_CALL_PRE void VMA_CALL_POST vmaGetMemoryProperties( VmaAllocator VMA_NOT_NULL allocator, const VkPhysicalDeviceMemoryProperties* VMA_NULLABLE* VMA_NOT_NULL ppPhysicalDeviceMemoryProperties); /** \brief Given Memory Type Index, returns Property Flags of this memory type. This is just a convenience function. Same information can be obtained using vmaGetMemoryProperties(). */ VMA_CALL_PRE void VMA_CALL_POST vmaGetMemoryTypeProperties( VmaAllocator VMA_NOT_NULL allocator, uint32_t memoryTypeIndex, VkMemoryPropertyFlags* VMA_NOT_NULL pFlags); /** \brief Sets index of the current frame. */ VMA_CALL_PRE void VMA_CALL_POST vmaSetCurrentFrameIndex( VmaAllocator VMA_NOT_NULL allocator, uint32_t frameIndex); /** @} */ /** \addtogroup group_stats @{ */ /** \brief Retrieves statistics from current state of the Allocator. This function is called "calculate" not "get" because it has to traverse all internal data structures, so it may be quite slow. Use it for debugging purposes. For faster but more brief statistics suitable to be called every frame or every allocation, use vmaGetHeapBudgets(). Note that when using allocator from multiple threads, returned information may immediately become outdated. */ VMA_CALL_PRE void VMA_CALL_POST vmaCalculateStatistics( VmaAllocator VMA_NOT_NULL allocator, VmaTotalStatistics* VMA_NOT_NULL pStats); /** \brief Retrieves information about current memory usage and budget for all memory heaps. \param allocator \param[out] pBudgets Must point to array with number of elements at least equal to number of memory heaps in physical device used. This function is called "get" not "calculate" because it is very fast, suitable to be called every frame or every allocation. For more detailed statistics use vmaCalculateStatistics(). Note that when using allocator from multiple threads, returned information may immediately become outdated. */ VMA_CALL_PRE void VMA_CALL_POST vmaGetHeapBudgets( VmaAllocator VMA_NOT_NULL allocator, VmaBudget* VMA_NOT_NULL VMA_LEN_IF_NOT_NULL("VkPhysicalDeviceMemoryProperties::memoryHeapCount") pBudgets); /** @} */ /** \addtogroup group_alloc @{ */ /** \brief Helps to find memoryTypeIndex, given memoryTypeBits and VmaAllocationCreateInfo. This algorithm tries to find a memory type that: - Is allowed by memoryTypeBits. - Contains all the flags from pAllocationCreateInfo->requiredFlags. - Matches intended usage. - Has as many flags from pAllocationCreateInfo->preferredFlags as possible. \return Returns VK_ERROR_FEATURE_NOT_PRESENT if not found. Receiving such result from this function or any other allocating function probably means that your device doesn't support any memory type with requested features for the specific type of resource you want to use it for. Please check parameters of your resource, like image layout (OPTIMAL versus LINEAR) or mip level count. */ VMA_CALL_PRE VkResult VMA_CALL_POST vmaFindMemoryTypeIndex( VmaAllocator VMA_NOT_NULL allocator, uint32_t memoryTypeBits, const VmaAllocationCreateInfo* VMA_NOT_NULL pAllocationCreateInfo, uint32_t* VMA_NOT_NULL pMemoryTypeIndex); /** \brief Helps to find memoryTypeIndex, given VkBufferCreateInfo and VmaAllocationCreateInfo. It can be useful e.g. to determine value to be used as VmaPoolCreateInfo::memoryTypeIndex. It internally creates a temporary, dummy buffer that never has memory bound. */ VMA_CALL_PRE VkResult VMA_CALL_POST vmaFindMemoryTypeIndexForBufferInfo( VmaAllocator VMA_NOT_NULL allocator, const VkBufferCreateInfo* VMA_NOT_NULL pBufferCreateInfo, const VmaAllocationCreateInfo* VMA_NOT_NULL pAllocationCreateInfo, uint32_t* VMA_NOT_NULL pMemoryTypeIndex); /** \brief Helps to find memoryTypeIndex, given VkImageCreateInfo and VmaAllocationCreateInfo. It can be useful e.g. to determine value to be used as VmaPoolCreateInfo::memoryTypeIndex. It internally creates a temporary, dummy image that never has memory bound. */ VMA_CALL_PRE VkResult VMA_CALL_POST vmaFindMemoryTypeIndexForImageInfo( VmaAllocator VMA_NOT_NULL allocator, const VkImageCreateInfo* VMA_NOT_NULL pImageCreateInfo, const VmaAllocationCreateInfo* VMA_NOT_NULL pAllocationCreateInfo, uint32_t* VMA_NOT_NULL pMemoryTypeIndex); /** \brief Allocates Vulkan device memory and creates #VmaPool object. \param allocator Allocator object. \param pCreateInfo Parameters of pool to create. \param[out] pPool Handle to created pool. */ VMA_CALL_PRE VkResult VMA_CALL_POST vmaCreatePool( VmaAllocator VMA_NOT_NULL allocator, const VmaPoolCreateInfo* VMA_NOT_NULL pCreateInfo, VmaPool VMA_NULLABLE* VMA_NOT_NULL pPool); /** \brief Destroys #VmaPool object and frees Vulkan device memory. */ VMA_CALL_PRE void VMA_CALL_POST vmaDestroyPool( VmaAllocator VMA_NOT_NULL allocator, VmaPool VMA_NULLABLE pool); /** @} */ /** \addtogroup group_stats @{ */ /** \brief Retrieves statistics of existing #VmaPool object. \param allocator Allocator object. \param pool Pool object. \param[out] pPoolStats Statistics of specified pool. Note that when using the pool from multiple threads, returned information may immediately become outdated. */ VMA_CALL_PRE void VMA_CALL_POST vmaGetPoolStatistics( VmaAllocator VMA_NOT_NULL allocator, VmaPool VMA_NOT_NULL pool, VmaStatistics* VMA_NOT_NULL pPoolStats); /** \brief Retrieves detailed statistics of existing #VmaPool object. \param allocator Allocator object. \param pool Pool object. \param[out] pPoolStats Statistics of specified pool. */ VMA_CALL_PRE void VMA_CALL_POST vmaCalculatePoolStatistics( VmaAllocator VMA_NOT_NULL allocator, VmaPool VMA_NOT_NULL pool, VmaDetailedStatistics* VMA_NOT_NULL pPoolStats); /** @} */ /** \addtogroup group_alloc @{ */ /** \brief Checks magic number in margins around all allocations in given memory pool in search for corruptions. Corruption detection is enabled only when `VMA_DEBUG_DETECT_CORRUPTION` macro is defined to nonzero, `VMA_DEBUG_MARGIN` is defined to nonzero and the pool is created in memory type that is `HOST_VISIBLE` and `HOST_COHERENT`. For more information, see [Corruption detection](@ref debugging_memory_usage_corruption_detection). Possible return values: - `VK_ERROR_FEATURE_NOT_PRESENT` - corruption detection is not enabled for specified pool. - `VK_SUCCESS` - corruption detection has been performed and succeeded. - `VK_ERROR_UNKNOWN` - corruption detection has been performed and found memory corruptions around one of the allocations. `VMA_ASSERT` is also fired in that case. - Other value: Error returned by Vulkan, e.g. memory mapping failure. */ VMA_CALL_PRE VkResult VMA_CALL_POST vmaCheckPoolCorruption( VmaAllocator VMA_NOT_NULL allocator, VmaPool VMA_NOT_NULL pool); /** \brief Retrieves name of a custom pool. After the call `ppName` is either null or points to an internally-owned null-terminated string containing name of the pool that was previously set. The pointer becomes invalid when the pool is destroyed or its name is changed using vmaSetPoolName(). */ VMA_CALL_PRE void VMA_CALL_POST vmaGetPoolName( VmaAllocator VMA_NOT_NULL allocator, VmaPool VMA_NOT_NULL pool, const char* VMA_NULLABLE* VMA_NOT_NULL ppName); /** \brief Sets name of a custom pool. `pName` can be either null or pointer to a null-terminated string with new name for the pool. Function makes internal copy of the string, so it can be changed or freed immediately after this call. */ VMA_CALL_PRE void VMA_CALL_POST vmaSetPoolName( VmaAllocator VMA_NOT_NULL allocator, VmaPool VMA_NOT_NULL pool, const char* VMA_NULLABLE pName); /** \brief General purpose memory allocation. \param allocator \param pVkMemoryRequirements \param pCreateInfo \param[out] pAllocation Handle to allocated memory. \param[out] pAllocationInfo Optional. Information about allocated memory. It can be later fetched using function vmaGetAllocationInfo(). You should free the memory using vmaFreeMemory() or vmaFreeMemoryPages(). It is recommended to use vmaAllocateMemoryForBuffer(), vmaAllocateMemoryForImage(), vmaCreateBuffer(), vmaCreateImage() instead whenever possible. */ VMA_CALL_PRE VkResult VMA_CALL_POST vmaAllocateMemory( VmaAllocator VMA_NOT_NULL allocator, const VkMemoryRequirements* VMA_NOT_NULL pVkMemoryRequirements, const VmaAllocationCreateInfo* VMA_NOT_NULL pCreateInfo, VmaAllocation VMA_NULLABLE* VMA_NOT_NULL pAllocation, VmaAllocationInfo* VMA_NULLABLE pAllocationInfo); /** \brief General purpose memory allocation for multiple allocation objects at once. \param allocator Allocator object. \param pVkMemoryRequirements Memory requirements for each allocation. \param pCreateInfo Creation parameters for each allocation. \param allocationCount Number of allocations to make. \param[out] pAllocations Pointer to array that will be filled with handles to created allocations. \param[out] pAllocationInfo Optional. Pointer to array that will be filled with parameters of created allocations. You should free the memory using vmaFreeMemory() or vmaFreeMemoryPages(). Word "pages" is just a suggestion to use this function to allocate pieces of memory needed for sparse binding. It is just a general purpose allocation function able to make multiple allocations at once. It may be internally optimized to be more efficient than calling vmaAllocateMemory() `allocationCount` times. All allocations are made using same parameters. All of them are created out of the same memory pool and type. If any allocation fails, all allocations already made within this function call are also freed, so that when returned result is not `VK_SUCCESS`, `pAllocation` array is always entirely filled with `VK_NULL_HANDLE`. */ VMA_CALL_PRE VkResult VMA_CALL_POST vmaAllocateMemoryPages( VmaAllocator VMA_NOT_NULL allocator, const VkMemoryRequirements* VMA_NOT_NULL VMA_LEN_IF_NOT_NULL(allocationCount) pVkMemoryRequirements, const VmaAllocationCreateInfo* VMA_NOT_NULL VMA_LEN_IF_NOT_NULL(allocationCount) pCreateInfo, size_t allocationCount, VmaAllocation VMA_NULLABLE* VMA_NOT_NULL VMA_LEN_IF_NOT_NULL(allocationCount) pAllocations, VmaAllocationInfo* VMA_NULLABLE VMA_LEN_IF_NOT_NULL(allocationCount) pAllocationInfo); /** \brief Allocates memory suitable for given `VkBuffer`. \param allocator \param buffer \param pCreateInfo \param[out] pAllocation Handle to allocated memory. \param[out] pAllocationInfo Optional. Information about allocated memory. It can be later fetched using function vmaGetAllocationInfo(). It only creates #VmaAllocation. To bind the memory to the buffer, use vmaBindBufferMemory(). This is a special-purpose function. In most cases you should use vmaCreateBuffer(). You must free the allocation using vmaFreeMemory() when no longer needed. */ VMA_CALL_PRE VkResult VMA_CALL_POST vmaAllocateMemoryForBuffer( VmaAllocator VMA_NOT_NULL allocator, VkBuffer VMA_NOT_NULL_NON_DISPATCHABLE buffer, const VmaAllocationCreateInfo* VMA_NOT_NULL pCreateInfo, VmaAllocation VMA_NULLABLE* VMA_NOT_NULL pAllocation, VmaAllocationInfo* VMA_NULLABLE pAllocationInfo); /** \brief Allocates memory suitable for given `VkImage`. \param allocator \param image \param pCreateInfo \param[out] pAllocation Handle to allocated memory. \param[out] pAllocationInfo Optional. Information about allocated memory. It can be later fetched using function vmaGetAllocationInfo(). It only creates #VmaAllocation. To bind the memory to the buffer, use vmaBindImageMemory(). This is a special-purpose function. In most cases you should use vmaCreateImage(). You must free the allocation using vmaFreeMemory() when no longer needed. */ VMA_CALL_PRE VkResult VMA_CALL_POST vmaAllocateMemoryForImage( VmaAllocator VMA_NOT_NULL allocator, VkImage VMA_NOT_NULL_NON_DISPATCHABLE image, const VmaAllocationCreateInfo* VMA_NOT_NULL pCreateInfo, VmaAllocation VMA_NULLABLE* VMA_NOT_NULL pAllocation, VmaAllocationInfo* VMA_NULLABLE pAllocationInfo); /** \brief Frees memory previously allocated using vmaAllocateMemory(), vmaAllocateMemoryForBuffer(), or vmaAllocateMemoryForImage(). Passing `VK_NULL_HANDLE` as `allocation` is valid. Such function call is just skipped. */ VMA_CALL_PRE void VMA_CALL_POST vmaFreeMemory( VmaAllocator VMA_NOT_NULL allocator, const VmaAllocation VMA_NULLABLE allocation); /** \brief Frees memory and destroys multiple allocations. Word "pages" is just a suggestion to use this function to free pieces of memory used for sparse binding. It is just a general purpose function to free memory and destroy allocations made using e.g. vmaAllocateMemory(), vmaAllocateMemoryPages() and other functions. It may be internally optimized to be more efficient than calling vmaFreeMemory() `allocationCount` times. Allocations in `pAllocations` array can come from any memory pools and types. Passing `VK_NULL_HANDLE` as elements of `pAllocations` array is valid. Such entries are just skipped. */ VMA_CALL_PRE void VMA_CALL_POST vmaFreeMemoryPages( VmaAllocator VMA_NOT_NULL allocator, size_t allocationCount, const VmaAllocation VMA_NULLABLE* VMA_NOT_NULL VMA_LEN_IF_NOT_NULL(allocationCount) pAllocations); /** \brief Returns current information about specified allocation. Current parameters of given allocation are returned in `pAllocationInfo`. Although this function doesn't lock any mutex, so it should be quite efficient, you should avoid calling it too often. You can retrieve same VmaAllocationInfo structure while creating your resource, from function vmaCreateBuffer(), vmaCreateImage(). You can remember it if you are sure parameters don't change (e.g. due to defragmentation). There is also a new function vmaGetAllocationInfo2() that offers extended information about the allocation, returned using new structure #VmaAllocationInfo2. */ VMA_CALL_PRE void VMA_CALL_POST vmaGetAllocationInfo( VmaAllocator VMA_NOT_NULL allocator, VmaAllocation VMA_NOT_NULL allocation, VmaAllocationInfo* VMA_NOT_NULL pAllocationInfo); /** \brief Returns extended information about specified allocation. Current parameters of given allocation are returned in `pAllocationInfo`. Extended parameters in structure #VmaAllocationInfo2 include memory block size and a flag telling whether the allocation has dedicated memory. It can be useful e.g. for interop with OpenGL. */ VMA_CALL_PRE void VMA_CALL_POST vmaGetAllocationInfo2( VmaAllocator VMA_NOT_NULL allocator, VmaAllocation VMA_NOT_NULL allocation, VmaAllocationInfo2* VMA_NOT_NULL pAllocationInfo); /** \brief Sets pUserData in given allocation to new value. The value of pointer `pUserData` is copied to allocation's `pUserData`. It is opaque, so you can use it however you want - e.g. as a pointer, ordinal number or some handle to you own data. */ VMA_CALL_PRE void VMA_CALL_POST vmaSetAllocationUserData( VmaAllocator VMA_NOT_NULL allocator, VmaAllocation VMA_NOT_NULL allocation, void* VMA_NULLABLE pUserData); /** \brief Sets pName in given allocation to new value. `pName` must be either null, or pointer to a null-terminated string. The function makes local copy of the string and sets it as allocation's `pName`. String passed as pName doesn't need to be valid for whole lifetime of the allocation - you can free it after this call. String previously pointed by allocation's `pName` is freed from memory. */ VMA_CALL_PRE void VMA_CALL_POST vmaSetAllocationName( VmaAllocator VMA_NOT_NULL allocator, VmaAllocation VMA_NOT_NULL allocation, const char* VMA_NULLABLE pName); /** \brief Given an allocation, returns Property Flags of its memory type. This is just a convenience function. Same information can be obtained using vmaGetAllocationInfo() + vmaGetMemoryProperties(). */ VMA_CALL_PRE void VMA_CALL_POST vmaGetAllocationMemoryProperties( VmaAllocator VMA_NOT_NULL allocator, VmaAllocation VMA_NOT_NULL allocation, VkMemoryPropertyFlags* VMA_NOT_NULL pFlags); #if VMA_EXTERNAL_MEMORY_WIN32 /** \brief Given an allocation, returns Win32 handle that may be imported by other processes or APIs. \param hTargetProcess Must be a valid handle to target process or null. If it's null, the function returns handle for the current process. \param[out] pHandle Output parameter that returns the handle. The function fills `pHandle` with handle that can be used in target process. The handle is fetched using function `vkGetMemoryWin32HandleKHR`. When no longer needed, you must close it using: \code CloseHandle(handle); \endcode You can close it any time, before or after destroying the allocation object. It is reference-counted internally by Windows. Note the handle is returned for the entire `VkDeviceMemory` block that the allocation belongs to. If the allocation is sub-allocated from a larger block, you may need to consider the offset of the allocation (VmaAllocationInfo::offset). If the function fails with `VK_ERROR_FEATURE_NOT_PRESENT` error code, please double-check that VmaVulkanFunctions::vkGetMemoryWin32HandleKHR function pointer is set, e.g. either by using `VMA_DYNAMIC_VULKAN_FUNCTIONS` or by manually passing it through VmaAllocatorCreateInfo::pVulkanFunctions. For more information, see chapter \ref vk_khr_external_memory_win32. */ VMA_CALL_PRE VkResult VMA_CALL_POST vmaGetMemoryWin32Handle(VmaAllocator VMA_NOT_NULL allocator, VmaAllocation VMA_NOT_NULL allocation, HANDLE hTargetProcess, HANDLE* VMA_NOT_NULL pHandle); #endif // VMA_EXTERNAL_MEMORY_WIN32 /** \brief Maps memory represented by given allocation and returns pointer to it. Maps memory represented by given allocation to make it accessible to CPU code. When succeeded, `*ppData` contains pointer to first byte of this memory. \warning If the allocation is part of a bigger `VkDeviceMemory` block, returned pointer is correctly offsetted to the beginning of region assigned to this particular allocation. Unlike the result of `vkMapMemory`, it points to the allocation, not to the beginning of the whole block. You should not add VmaAllocationInfo::offset to it! Mapping is internally reference-counted and synchronized, so despite raw Vulkan function `vkMapMemory()` cannot be used to map same block of `VkDeviceMemory` multiple times simultaneously, it is safe to call this function on allocations assigned to the same memory block. Actual Vulkan memory will be mapped on first mapping and unmapped on last unmapping. If the function succeeded, you must call vmaUnmapMemory() to unmap the allocation when mapping is no longer needed or before freeing the allocation, at the latest. It also safe to call this function multiple times on the same allocation. You must call vmaUnmapMemory() same number of times as you called vmaMapMemory(). It is also safe to call this function on allocation created with #VMA_ALLOCATION_CREATE_MAPPED_BIT flag. Its memory stays mapped all the time. You must still call vmaUnmapMemory() same number of times as you called vmaMapMemory(). You must not call vmaUnmapMemory() additional time to free the "0-th" mapping made automatically due to #VMA_ALLOCATION_CREATE_MAPPED_BIT flag. This function fails when used on allocation made in memory type that is not `HOST_VISIBLE`. This function doesn't automatically flush or invalidate caches. If the allocation is made from a memory types that is not `HOST_COHERENT`, you also need to use vmaInvalidateAllocation() / vmaFlushAllocation(), as required by Vulkan specification. */ VMA_CALL_PRE VkResult VMA_CALL_POST vmaMapMemory( VmaAllocator VMA_NOT_NULL allocator, VmaAllocation VMA_NOT_NULL allocation, void* VMA_NULLABLE* VMA_NOT_NULL ppData); /** \brief Unmaps memory represented by given allocation, mapped previously using vmaMapMemory(). For details, see description of vmaMapMemory(). This function doesn't automatically flush or invalidate caches. If the allocation is made from a memory types that is not `HOST_COHERENT`, you also need to use vmaInvalidateAllocation() / vmaFlushAllocation(), as required by Vulkan specification. */ VMA_CALL_PRE void VMA_CALL_POST vmaUnmapMemory( VmaAllocator VMA_NOT_NULL allocator, VmaAllocation VMA_NOT_NULL allocation); /** \brief Flushes memory of given allocation. Calls `vkFlushMappedMemoryRanges()` for memory associated with given range of given allocation. It needs to be called after writing to a mapped memory for memory types that are not `HOST_COHERENT`. Unmap operation doesn't do that automatically. - `offset` must be relative to the beginning of allocation. - `size` can be `VK_WHOLE_SIZE`. It means all memory from `offset` the the end of given allocation. - `offset` and `size` don't have to be aligned. They are internally rounded down/up to multiply of `nonCoherentAtomSize`. - If `size` is 0, this call is ignored. - If memory type that the `allocation` belongs to is not `HOST_VISIBLE` or it is `HOST_COHERENT`, this call is ignored. Warning! `offset` and `size` are relative to the contents of given `allocation`. If you mean whole allocation, you can pass 0 and `VK_WHOLE_SIZE`, respectively. Do not pass allocation's offset as `offset`!!! This function returns the `VkResult` from `vkFlushMappedMemoryRanges` if it is called, otherwise `VK_SUCCESS`. */ VMA_CALL_PRE VkResult VMA_CALL_POST vmaFlushAllocation( VmaAllocator VMA_NOT_NULL allocator, VmaAllocation VMA_NOT_NULL allocation, VkDeviceSize offset, VkDeviceSize size); /** \brief Invalidates memory of given allocation. Calls `vkInvalidateMappedMemoryRanges()` for memory associated with given range of given allocation. It needs to be called before reading from a mapped memory for memory types that are not `HOST_COHERENT`. Map operation doesn't do that automatically. - `offset` must be relative to the beginning of allocation. - `size` can be `VK_WHOLE_SIZE`. It means all memory from `offset` the the end of given allocation. - `offset` and `size` don't have to be aligned. They are internally rounded down/up to multiply of `nonCoherentAtomSize`. - If `size` is 0, this call is ignored. - If memory type that the `allocation` belongs to is not `HOST_VISIBLE` or it is `HOST_COHERENT`, this call is ignored. Warning! `offset` and `size` are relative to the contents of given `allocation`. If you mean whole allocation, you can pass 0 and `VK_WHOLE_SIZE`, respectively. Do not pass allocation's offset as `offset`!!! This function returns the `VkResult` from `vkInvalidateMappedMemoryRanges` if it is called, otherwise `VK_SUCCESS`. */ VMA_CALL_PRE VkResult VMA_CALL_POST vmaInvalidateAllocation( VmaAllocator VMA_NOT_NULL allocator, VmaAllocation VMA_NOT_NULL allocation, VkDeviceSize offset, VkDeviceSize size); /** \brief Flushes memory of given set of allocations. Calls `vkFlushMappedMemoryRanges()` for memory associated with given ranges of given allocations. For more information, see documentation of vmaFlushAllocation(). \param allocator \param allocationCount \param allocations \param offsets If not null, it must point to an array of offsets of regions to flush, relative to the beginning of respective allocations. Null means all offsets are zero. \param sizes If not null, it must point to an array of sizes of regions to flush in respective allocations. Null means `VK_WHOLE_SIZE` for all allocations. This function returns the `VkResult` from `vkFlushMappedMemoryRanges` if it is called, otherwise `VK_SUCCESS`. */ VMA_CALL_PRE VkResult VMA_CALL_POST vmaFlushAllocations( VmaAllocator VMA_NOT_NULL allocator, uint32_t allocationCount, const VmaAllocation VMA_NOT_NULL* VMA_NULLABLE VMA_LEN_IF_NOT_NULL(allocationCount) allocations, const VkDeviceSize* VMA_NULLABLE VMA_LEN_IF_NOT_NULL(allocationCount) offsets, const VkDeviceSize* VMA_NULLABLE VMA_LEN_IF_NOT_NULL(allocationCount) sizes); /** \brief Invalidates memory of given set of allocations. Calls `vkInvalidateMappedMemoryRanges()` for memory associated with given ranges of given allocations. For more information, see documentation of vmaInvalidateAllocation(). \param allocator \param allocationCount \param allocations \param offsets If not null, it must point to an array of offsets of regions to flush, relative to the beginning of respective allocations. Null means all offsets are zero. \param sizes If not null, it must point to an array of sizes of regions to flush in respective allocations. Null means `VK_WHOLE_SIZE` for all allocations. This function returns the `VkResult` from `vkInvalidateMappedMemoryRanges` if it is called, otherwise `VK_SUCCESS`. */ VMA_CALL_PRE VkResult VMA_CALL_POST vmaInvalidateAllocations( VmaAllocator VMA_NOT_NULL allocator, uint32_t allocationCount, const VmaAllocation VMA_NOT_NULL* VMA_NULLABLE VMA_LEN_IF_NOT_NULL(allocationCount) allocations, const VkDeviceSize* VMA_NULLABLE VMA_LEN_IF_NOT_NULL(allocationCount) offsets, const VkDeviceSize* VMA_NULLABLE VMA_LEN_IF_NOT_NULL(allocationCount) sizes); /** \brief Maps the allocation temporarily if needed, copies data from specified host pointer to it, and flushes the memory from the host caches if needed. \param allocator \param pSrcHostPointer Pointer to the host data that become source of the copy. \param dstAllocation Handle to the allocation that becomes destination of the copy. \param dstAllocationLocalOffset Offset within `dstAllocation` where to write copied data, in bytes. \param size Number of bytes to copy. This is a convenience function that allows to copy data from a host pointer to an allocation easily. Same behavior can be achieved by calling vmaMapMemory(), `memcpy()`, vmaUnmapMemory(), vmaFlushAllocation(). This function can be called only for allocations created in a memory type that has `VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT` flag. It can be ensured e.g. by using #VMA_MEMORY_USAGE_AUTO and #VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT or #VMA_ALLOCATION_CREATE_HOST_ACCESS_RANDOM_BIT. Otherwise, the function will fail and generate a Validation Layers error. `dstAllocationLocalOffset` is relative to the contents of given `dstAllocation`. If you mean whole allocation, you should pass 0. Do not pass allocation's offset within device memory block this parameter! */ VMA_CALL_PRE VkResult VMA_CALL_POST vmaCopyMemoryToAllocation( VmaAllocator VMA_NOT_NULL allocator, const void* VMA_NOT_NULL VMA_LEN_IF_NOT_NULL(size) pSrcHostPointer, VmaAllocation VMA_NOT_NULL dstAllocation, VkDeviceSize dstAllocationLocalOffset, VkDeviceSize size); /** \brief Invalidates memory in the host caches if needed, maps the allocation temporarily if needed, and copies data from it to a specified host pointer. \param allocator \param srcAllocation Handle to the allocation that becomes source of the copy. \param srcAllocationLocalOffset Offset within `srcAllocation` where to read copied data, in bytes. \param pDstHostPointer Pointer to the host memory that become destination of the copy. \param size Number of bytes to copy. This is a convenience function that allows to copy data from an allocation to a host pointer easily. Same behavior can be achieved by calling vmaInvalidateAllocation(), vmaMapMemory(), `memcpy()`, vmaUnmapMemory(). This function should be called only for allocations created in a memory type that has `VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT` and `VK_MEMORY_PROPERTY_HOST_CACHED_BIT` flag. It can be ensured e.g. by using #VMA_MEMORY_USAGE_AUTO and #VMA_ALLOCATION_CREATE_HOST_ACCESS_RANDOM_BIT. Otherwise, the function may fail and generate a Validation Layers error. It may also work very slowly when reading from an uncached memory. `srcAllocationLocalOffset` is relative to the contents of given `srcAllocation`. If you mean whole allocation, you should pass 0. Do not pass allocation's offset within device memory block as this parameter! */ VMA_CALL_PRE VkResult VMA_CALL_POST vmaCopyAllocationToMemory( VmaAllocator VMA_NOT_NULL allocator, VmaAllocation VMA_NOT_NULL srcAllocation, VkDeviceSize srcAllocationLocalOffset, void* VMA_NOT_NULL VMA_LEN_IF_NOT_NULL(size) pDstHostPointer, VkDeviceSize size); /** \brief Checks magic number in margins around all allocations in given memory types (in both default and custom pools) in search for corruptions. \param allocator \param memoryTypeBits Bit mask, where each bit set means that a memory type with that index should be checked. Corruption detection is enabled only when `VMA_DEBUG_DETECT_CORRUPTION` macro is defined to nonzero, `VMA_DEBUG_MARGIN` is defined to nonzero and only for memory types that are `HOST_VISIBLE` and `HOST_COHERENT`. For more information, see [Corruption detection](@ref debugging_memory_usage_corruption_detection). Possible return values: - `VK_ERROR_FEATURE_NOT_PRESENT` - corruption detection is not enabled for any of specified memory types. - `VK_SUCCESS` - corruption detection has been performed and succeeded. - `VK_ERROR_UNKNOWN` - corruption detection has been performed and found memory corruptions around one of the allocations. `VMA_ASSERT` is also fired in that case. - Other value: Error returned by Vulkan, e.g. memory mapping failure. */ VMA_CALL_PRE VkResult VMA_CALL_POST vmaCheckCorruption( VmaAllocator VMA_NOT_NULL allocator, uint32_t memoryTypeBits); /** \brief Begins defragmentation process. \param allocator Allocator object. \param pInfo Structure filled with parameters of defragmentation. \param[out] pContext Context object that must be passed to vmaEndDefragmentation() to finish defragmentation. \returns - `VK_SUCCESS` if defragmentation can begin. - `VK_ERROR_FEATURE_NOT_PRESENT` if defragmentation is not supported. For more information about defragmentation, see documentation chapter: [Defragmentation](@ref defragmentation). */ VMA_CALL_PRE VkResult VMA_CALL_POST vmaBeginDefragmentation( VmaAllocator VMA_NOT_NULL allocator, const VmaDefragmentationInfo* VMA_NOT_NULL pInfo, VmaDefragmentationContext VMA_NULLABLE* VMA_NOT_NULL pContext); /** \brief Ends defragmentation process. \param allocator Allocator object. \param context Context object that has been created by vmaBeginDefragmentation(). \param[out] pStats Optional stats for the defragmentation. Can be null. Use this function to finish defragmentation started by vmaBeginDefragmentation(). */ VMA_CALL_PRE void VMA_CALL_POST vmaEndDefragmentation( VmaAllocator VMA_NOT_NULL allocator, VmaDefragmentationContext VMA_NOT_NULL context, VmaDefragmentationStats* VMA_NULLABLE pStats); /** \brief Starts single defragmentation pass. \param allocator Allocator object. \param context Context object that has been created by vmaBeginDefragmentation(). \param[out] pPassInfo Computed information for current pass. \returns - `VK_SUCCESS` if no more moves are possible. Then you can omit call to vmaEndDefragmentationPass() and simply end whole defragmentation. - `VK_INCOMPLETE` if there are pending moves returned in `pPassInfo`. You need to perform them, call vmaEndDefragmentationPass(), and then preferably try another pass with vmaBeginDefragmentationPass(). */ VMA_CALL_PRE VkResult VMA_CALL_POST vmaBeginDefragmentationPass( VmaAllocator VMA_NOT_NULL allocator, VmaDefragmentationContext VMA_NOT_NULL context, VmaDefragmentationPassMoveInfo* VMA_NOT_NULL pPassInfo); /** \brief Ends single defragmentation pass. \param allocator Allocator object. \param context Context object that has been created by vmaBeginDefragmentation(). \param pPassInfo Computed information for current pass filled by vmaBeginDefragmentationPass() and possibly modified by you. Returns `VK_SUCCESS` if no more moves are possible or `VK_INCOMPLETE` if more defragmentations are possible. Ends incremental defragmentation pass and commits all defragmentation moves from `pPassInfo`. After this call: - Allocations at `pPassInfo[i].srcAllocation` that had `pPassInfo[i].operation ==` #VMA_DEFRAGMENTATION_MOVE_OPERATION_COPY (which is the default) will be pointing to the new destination place. - Allocation at `pPassInfo[i].srcAllocation` that had `pPassInfo[i].operation ==` #VMA_DEFRAGMENTATION_MOVE_OPERATION_DESTROY will be freed. If no more moves are possible you can end whole defragmentation. */ VMA_CALL_PRE VkResult VMA_CALL_POST vmaEndDefragmentationPass( VmaAllocator VMA_NOT_NULL allocator, VmaDefragmentationContext VMA_NOT_NULL context, VmaDefragmentationPassMoveInfo* VMA_NOT_NULL pPassInfo); /** \brief Binds buffer to allocation. Binds specified buffer to region of memory represented by specified allocation. Gets `VkDeviceMemory` handle and offset from the allocation. If you want to create a buffer, allocate memory for it and bind them together separately, you should use this function for binding instead of standard `vkBindBufferMemory()`, because it ensures proper synchronization so that when a `VkDeviceMemory` object is used by multiple allocations, calls to `vkBind*Memory()` or `vkMapMemory()` won't happen from multiple threads simultaneously (which is illegal in Vulkan). It is recommended to use function vmaCreateBuffer() instead of this one. */ VMA_CALL_PRE VkResult VMA_CALL_POST vmaBindBufferMemory( VmaAllocator VMA_NOT_NULL allocator, VmaAllocation VMA_NOT_NULL allocation, VkBuffer VMA_NOT_NULL_NON_DISPATCHABLE buffer); /** \brief Binds buffer to allocation with additional parameters. \param allocator \param allocation \param allocationLocalOffset Additional offset to be added while binding, relative to the beginning of the `allocation`. Normally it should be 0. \param buffer \param pNext A chain of structures to be attached to `VkBindBufferMemoryInfoKHR` structure used internally. Normally it should be null. This function is similar to vmaBindBufferMemory(), but it provides additional parameters. If `pNext` is not null, #VmaAllocator object must have been created with #VMA_ALLOCATOR_CREATE_KHR_BIND_MEMORY2_BIT flag or with VmaAllocatorCreateInfo::vulkanApiVersion `>= VK_API_VERSION_1_1`. Otherwise the call fails. */ VMA_CALL_PRE VkResult VMA_CALL_POST vmaBindBufferMemory2( VmaAllocator VMA_NOT_NULL allocator, VmaAllocation VMA_NOT_NULL allocation, VkDeviceSize allocationLocalOffset, VkBuffer VMA_NOT_NULL_NON_DISPATCHABLE buffer, const void* VMA_NULLABLE VMA_EXTENDS_VK_STRUCT(VkBindBufferMemoryInfoKHR) pNext); /** \brief Binds image to allocation. Binds specified image to region of memory represented by specified allocation. Gets `VkDeviceMemory` handle and offset from the allocation. If you want to create an image, allocate memory for it and bind them together separately, you should use this function for binding instead of standard `vkBindImageMemory()`, because it ensures proper synchronization so that when a `VkDeviceMemory` object is used by multiple allocations, calls to `vkBind*Memory()` or `vkMapMemory()` won't happen from multiple threads simultaneously (which is illegal in Vulkan). It is recommended to use function vmaCreateImage() instead of this one. */ VMA_CALL_PRE VkResult VMA_CALL_POST vmaBindImageMemory( VmaAllocator VMA_NOT_NULL allocator, VmaAllocation VMA_NOT_NULL allocation, VkImage VMA_NOT_NULL_NON_DISPATCHABLE image); /** \brief Binds image to allocation with additional parameters. \param allocator \param allocation \param allocationLocalOffset Additional offset to be added while binding, relative to the beginning of the `allocation`. Normally it should be 0. \param image \param pNext A chain of structures to be attached to `VkBindImageMemoryInfoKHR` structure used internally. Normally it should be null. This function is similar to vmaBindImageMemory(), but it provides additional parameters. If `pNext` is not null, #VmaAllocator object must have been created with #VMA_ALLOCATOR_CREATE_KHR_BIND_MEMORY2_BIT flag or with VmaAllocatorCreateInfo::vulkanApiVersion `>= VK_API_VERSION_1_1`. Otherwise the call fails. */ VMA_CALL_PRE VkResult VMA_CALL_POST vmaBindImageMemory2( VmaAllocator VMA_NOT_NULL allocator, VmaAllocation VMA_NOT_NULL allocation, VkDeviceSize allocationLocalOffset, VkImage VMA_NOT_NULL_NON_DISPATCHABLE image, const void* VMA_NULLABLE VMA_EXTENDS_VK_STRUCT(VkBindImageMemoryInfoKHR) pNext); /** \brief Creates a new `VkBuffer`, allocates and binds memory for it. \param allocator \param pBufferCreateInfo \param pAllocationCreateInfo \param[out] pBuffer Buffer that was created. \param[out] pAllocation Allocation that was created. \param[out] pAllocationInfo Optional. Information about allocated memory. It can be later fetched using function vmaGetAllocationInfo(). This function automatically: -# Creates buffer. -# Allocates appropriate memory for it. -# Binds the buffer with the memory. If any of these operations fail, buffer and allocation are not created, returned value is negative error code, `*pBuffer` and `*pAllocation` are null. If the function succeeded, you must destroy both buffer and allocation when you no longer need them using either convenience function vmaDestroyBuffer() or separately, using `vkDestroyBuffer()` and vmaFreeMemory(). If #VMA_ALLOCATOR_CREATE_KHR_DEDICATED_ALLOCATION_BIT flag was used, VK_KHR_dedicated_allocation extension is used internally to query driver whether it requires or prefers the new buffer to have dedicated allocation. If yes, and if dedicated allocation is possible (#VMA_ALLOCATION_CREATE_NEVER_ALLOCATE_BIT is not used), it creates dedicated allocation for this buffer, just like when using #VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT. \note This function creates a new `VkBuffer`. Sub-allocation of parts of one large buffer, although recommended as a good practice, is out of scope of this library and could be implemented by the user as a higher-level logic on top of VMA. */ VMA_CALL_PRE VkResult VMA_CALL_POST vmaCreateBuffer( VmaAllocator VMA_NOT_NULL allocator, const VkBufferCreateInfo* VMA_NOT_NULL pBufferCreateInfo, const VmaAllocationCreateInfo* VMA_NOT_NULL pAllocationCreateInfo, VkBuffer VMA_NULLABLE_NON_DISPATCHABLE* VMA_NOT_NULL pBuffer, VmaAllocation VMA_NULLABLE* VMA_NOT_NULL pAllocation, VmaAllocationInfo* VMA_NULLABLE pAllocationInfo); /** \brief Creates a buffer with additional minimum alignment. Similar to vmaCreateBuffer() but provides additional parameter `minAlignment` which allows to specify custom, minimum alignment to be used when placing the buffer inside a larger memory block, which may be needed e.g. for interop with OpenGL. */ VMA_CALL_PRE VkResult VMA_CALL_POST vmaCreateBufferWithAlignment( VmaAllocator VMA_NOT_NULL allocator, const VkBufferCreateInfo* VMA_NOT_NULL pBufferCreateInfo, const VmaAllocationCreateInfo* VMA_NOT_NULL pAllocationCreateInfo, VkDeviceSize minAlignment, VkBuffer VMA_NULLABLE_NON_DISPATCHABLE* VMA_NOT_NULL pBuffer, VmaAllocation VMA_NULLABLE* VMA_NOT_NULL pAllocation, VmaAllocationInfo* VMA_NULLABLE pAllocationInfo); /** \brief Creates a new `VkBuffer`, binds already created memory for it. \param allocator \param allocation Allocation that provides memory to be used for binding new buffer to it. \param pBufferCreateInfo \param[out] pBuffer Buffer that was created. This function automatically: -# Creates buffer. -# Binds the buffer with the supplied memory. If any of these operations fail, buffer is not created, returned value is negative error code and `*pBuffer` is null. If the function succeeded, you must destroy the buffer when you no longer need it using `vkDestroyBuffer()`. If you want to also destroy the corresponding allocation you can use convenience function vmaDestroyBuffer(). \note There is a new version of this function augmented with parameter `allocationLocalOffset` - see vmaCreateAliasingBuffer2(). */ VMA_CALL_PRE VkResult VMA_CALL_POST vmaCreateAliasingBuffer( VmaAllocator VMA_NOT_NULL allocator, VmaAllocation VMA_NOT_NULL allocation, const VkBufferCreateInfo* VMA_NOT_NULL pBufferCreateInfo, VkBuffer VMA_NULLABLE_NON_DISPATCHABLE* VMA_NOT_NULL pBuffer); /** \brief Creates a new `VkBuffer`, binds already created memory for it. \param allocator \param allocation Allocation that provides memory to be used for binding new buffer to it. \param allocationLocalOffset Additional offset to be added while binding, relative to the beginning of the allocation. Normally it should be 0. \param pBufferCreateInfo \param[out] pBuffer Buffer that was created. This function automatically: -# Creates buffer. -# Binds the buffer with the supplied memory. If any of these operations fail, buffer is not created, returned value is negative error code and `*pBuffer` is null. If the function succeeded, you must destroy the buffer when you no longer need it using `vkDestroyBuffer()`. If you want to also destroy the corresponding allocation you can use convenience function vmaDestroyBuffer(). \note This is a new version of the function augmented with parameter `allocationLocalOffset`. */ VMA_CALL_PRE VkResult VMA_CALL_POST vmaCreateAliasingBuffer2( VmaAllocator VMA_NOT_NULL allocator, VmaAllocation VMA_NOT_NULL allocation, VkDeviceSize allocationLocalOffset, const VkBufferCreateInfo* VMA_NOT_NULL pBufferCreateInfo, VkBuffer VMA_NULLABLE_NON_DISPATCHABLE* VMA_NOT_NULL pBuffer); /** \brief Destroys Vulkan buffer and frees allocated memory. This is just a convenience function equivalent to: \code vkDestroyBuffer(device, buffer, allocationCallbacks); vmaFreeMemory(allocator, allocation); \endcode It is safe to pass null as buffer and/or allocation. */ VMA_CALL_PRE void VMA_CALL_POST vmaDestroyBuffer( VmaAllocator VMA_NOT_NULL allocator, VkBuffer VMA_NULLABLE_NON_DISPATCHABLE buffer, VmaAllocation VMA_NULLABLE allocation); /// Function similar to vmaCreateBuffer(). VMA_CALL_PRE VkResult VMA_CALL_POST vmaCreateImage( VmaAllocator VMA_NOT_NULL allocator, const VkImageCreateInfo* VMA_NOT_NULL pImageCreateInfo, const VmaAllocationCreateInfo* VMA_NOT_NULL pAllocationCreateInfo, VkImage VMA_NULLABLE_NON_DISPATCHABLE* VMA_NOT_NULL pImage, VmaAllocation VMA_NULLABLE* VMA_NOT_NULL pAllocation, VmaAllocationInfo* VMA_NULLABLE pAllocationInfo); /// Function similar to vmaCreateAliasingBuffer() but for images. VMA_CALL_PRE VkResult VMA_CALL_POST vmaCreateAliasingImage( VmaAllocator VMA_NOT_NULL allocator, VmaAllocation VMA_NOT_NULL allocation, const VkImageCreateInfo* VMA_NOT_NULL pImageCreateInfo, VkImage VMA_NULLABLE_NON_DISPATCHABLE* VMA_NOT_NULL pImage); /// Function similar to vmaCreateAliasingBuffer2() but for images. VMA_CALL_PRE VkResult VMA_CALL_POST vmaCreateAliasingImage2( VmaAllocator VMA_NOT_NULL allocator, VmaAllocation VMA_NOT_NULL allocation, VkDeviceSize allocationLocalOffset, const VkImageCreateInfo* VMA_NOT_NULL pImageCreateInfo, VkImage VMA_NULLABLE_NON_DISPATCHABLE* VMA_NOT_NULL pImage); /** \brief Destroys Vulkan image and frees allocated memory. This is just a convenience function equivalent to: \code vkDestroyImage(device, image, allocationCallbacks); vmaFreeMemory(allocator, allocation); \endcode It is safe to pass null as image and/or allocation. */ VMA_CALL_PRE void VMA_CALL_POST vmaDestroyImage( VmaAllocator VMA_NOT_NULL allocator, VkImage VMA_NULLABLE_NON_DISPATCHABLE image, VmaAllocation VMA_NULLABLE allocation); /** @} */ /** \addtogroup group_virtual @{ */ /** \brief Creates new #VmaVirtualBlock object. \param pCreateInfo Parameters for creation. \param[out] pVirtualBlock Returned virtual block object or `VMA_NULL` if creation failed. */ VMA_CALL_PRE VkResult VMA_CALL_POST vmaCreateVirtualBlock( const VmaVirtualBlockCreateInfo* VMA_NOT_NULL pCreateInfo, VmaVirtualBlock VMA_NULLABLE* VMA_NOT_NULL pVirtualBlock); /** \brief Destroys #VmaVirtualBlock object. Please note that you should consciously handle virtual allocations that could remain unfreed in the block. You should either free them individually using vmaVirtualFree() or call vmaClearVirtualBlock() if you are sure this is what you want. If you do neither, an assert is called. If you keep pointers to some additional metadata associated with your virtual allocations in their `pUserData`, don't forget to free them. */ VMA_CALL_PRE void VMA_CALL_POST vmaDestroyVirtualBlock( VmaVirtualBlock VMA_NULLABLE virtualBlock); /** \brief Returns true of the #VmaVirtualBlock is empty - contains 0 virtual allocations and has all its space available for new allocations. */ VMA_CALL_PRE VkBool32 VMA_CALL_POST vmaIsVirtualBlockEmpty( VmaVirtualBlock VMA_NOT_NULL virtualBlock); /** \brief Returns information about a specific virtual allocation within a virtual block, like its size and `pUserData` pointer. */ VMA_CALL_PRE void VMA_CALL_POST vmaGetVirtualAllocationInfo( VmaVirtualBlock VMA_NOT_NULL virtualBlock, VmaVirtualAllocation VMA_NOT_NULL_NON_DISPATCHABLE allocation, VmaVirtualAllocationInfo* VMA_NOT_NULL pVirtualAllocInfo); /** \brief Allocates new virtual allocation inside given #VmaVirtualBlock. If the allocation fails due to not enough free space available, `VK_ERROR_OUT_OF_DEVICE_MEMORY` is returned (despite the function doesn't ever allocate actual GPU memory). `pAllocation` is then set to `VK_NULL_HANDLE` and `pOffset`, if not null, it set to `UINT64_MAX`. \param virtualBlock Virtual block \param pCreateInfo Parameters for the allocation \param[out] pAllocation Returned handle of the new allocation \param[out] pOffset Returned offset of the new allocation. Optional, can be null. */ VMA_CALL_PRE VkResult VMA_CALL_POST vmaVirtualAllocate( VmaVirtualBlock VMA_NOT_NULL virtualBlock, const VmaVirtualAllocationCreateInfo* VMA_NOT_NULL pCreateInfo, VmaVirtualAllocation VMA_NULLABLE_NON_DISPATCHABLE* VMA_NOT_NULL pAllocation, VkDeviceSize* VMA_NULLABLE pOffset); /** \brief Frees virtual allocation inside given #VmaVirtualBlock. It is correct to call this function with `allocation == VK_NULL_HANDLE` - it does nothing. */ VMA_CALL_PRE void VMA_CALL_POST vmaVirtualFree( VmaVirtualBlock VMA_NOT_NULL virtualBlock, VmaVirtualAllocation VMA_NULLABLE_NON_DISPATCHABLE allocation); /** \brief Frees all virtual allocations inside given #VmaVirtualBlock. You must either call this function or free each virtual allocation individually with vmaVirtualFree() before destroying a virtual block. Otherwise, an assert is called. If you keep pointer to some additional metadata associated with your virtual allocation in its `pUserData`, don't forget to free it as well. */ VMA_CALL_PRE void VMA_CALL_POST vmaClearVirtualBlock( VmaVirtualBlock VMA_NOT_NULL virtualBlock); /** \brief Changes custom pointer associated with given virtual allocation. */ VMA_CALL_PRE void VMA_CALL_POST vmaSetVirtualAllocationUserData( VmaVirtualBlock VMA_NOT_NULL virtualBlock, VmaVirtualAllocation VMA_NOT_NULL_NON_DISPATCHABLE allocation, void* VMA_NULLABLE pUserData); /** \brief Calculates and returns statistics about virtual allocations and memory usage in given #VmaVirtualBlock. This function is fast to call. For more detailed statistics, see vmaCalculateVirtualBlockStatistics(). */ VMA_CALL_PRE void VMA_CALL_POST vmaGetVirtualBlockStatistics( VmaVirtualBlock VMA_NOT_NULL virtualBlock, VmaStatistics* VMA_NOT_NULL pStats); /** \brief Calculates and returns detailed statistics about virtual allocations and memory usage in given #VmaVirtualBlock. This function is slow to call. Use for debugging purposes. For less detailed statistics, see vmaGetVirtualBlockStatistics(). */ VMA_CALL_PRE void VMA_CALL_POST vmaCalculateVirtualBlockStatistics( VmaVirtualBlock VMA_NOT_NULL virtualBlock, VmaDetailedStatistics* VMA_NOT_NULL pStats); /** @} */ #if VMA_STATS_STRING_ENABLED /** \addtogroup group_stats @{ */ /** \brief Builds and returns a null-terminated string in JSON format with information about given #VmaVirtualBlock. \param virtualBlock Virtual block. \param[out] ppStatsString Returned string. \param detailedMap Pass `VK_FALSE` to only obtain statistics as returned by vmaCalculateVirtualBlockStatistics(). Pass `VK_TRUE` to also obtain full list of allocations and free spaces. Returned string must be freed using vmaFreeVirtualBlockStatsString(). */ VMA_CALL_PRE void VMA_CALL_POST vmaBuildVirtualBlockStatsString( VmaVirtualBlock VMA_NOT_NULL virtualBlock, char* VMA_NULLABLE* VMA_NOT_NULL ppStatsString, VkBool32 detailedMap); /// Frees a string returned by vmaBuildVirtualBlockStatsString(). VMA_CALL_PRE void VMA_CALL_POST vmaFreeVirtualBlockStatsString( VmaVirtualBlock VMA_NOT_NULL virtualBlock, char* VMA_NULLABLE pStatsString); /** \brief Builds and returns statistics as a null-terminated string in JSON format. \param allocator \param[out] ppStatsString Must be freed using vmaFreeStatsString() function. \param detailedMap */ VMA_CALL_PRE void VMA_CALL_POST vmaBuildStatsString( VmaAllocator VMA_NOT_NULL allocator, char* VMA_NULLABLE* VMA_NOT_NULL ppStatsString, VkBool32 detailedMap); VMA_CALL_PRE void VMA_CALL_POST vmaFreeStatsString( VmaAllocator VMA_NOT_NULL allocator, char* VMA_NULLABLE pStatsString); /** @} */ #endif // VMA_STATS_STRING_ENABLED #endif // _VMA_FUNCTION_HEADERS #ifdef __cplusplus } #endif #endif // AMD_VULKAN_MEMORY_ALLOCATOR_H //////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// // // IMPLEMENTATION // //////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// // For Visual Studio IntelliSense. #if defined(__cplusplus) && defined(__INTELLISENSE__) #define VMA_IMPLEMENTATION #endif #ifdef VMA_IMPLEMENTATION #undef VMA_IMPLEMENTATION #include #include #include #include #include #include #if !defined(VMA_CPP20) #if __cplusplus >= 202002L || _MSVC_LANG >= 202002L // C++20 #define VMA_CPP20 1 #else #define VMA_CPP20 0 #endif #endif #ifdef _MSC_VER #include // For functions like __popcnt, _BitScanForward etc. #endif #if VMA_CPP20 #include #endif #if VMA_STATS_STRING_ENABLED #include // For snprintf #endif /******************************************************************************* CONFIGURATION SECTION Define some of these macros before each #include of this header or change them here if you need other then default behavior depending on your environment. */ #ifndef _VMA_CONFIGURATION /* Define this macro to 1 to make the library fetch pointers to Vulkan functions internally, like: vulkanFunctions.vkAllocateMemory = &vkAllocateMemory; */ #if !defined(VMA_STATIC_VULKAN_FUNCTIONS) && !defined(VK_NO_PROTOTYPES) #define VMA_STATIC_VULKAN_FUNCTIONS 1 #endif /* Define this macro to 1 to make the library fetch pointers to Vulkan functions internally, like: vulkanFunctions.vkAllocateMemory = (PFN_vkAllocateMemory)vkGetDeviceProcAddr(device, "vkAllocateMemory"); To use this feature in new versions of VMA you now have to pass VmaVulkanFunctions::vkGetInstanceProcAddr and vkGetDeviceProcAddr as VmaAllocatorCreateInfo::pVulkanFunctions. Other members can be null. */ #if !defined(VMA_DYNAMIC_VULKAN_FUNCTIONS) #define VMA_DYNAMIC_VULKAN_FUNCTIONS 1 #endif #ifndef VMA_USE_STL_SHARED_MUTEX #if __cplusplus >= 201703L || _MSVC_LANG >= 201703L // C++17 #define VMA_USE_STL_SHARED_MUTEX 1 // Visual studio defines __cplusplus properly only when passed additional parameter: /Zc:__cplusplus // Otherwise it is always 199711L, despite shared_mutex works since Visual Studio 2015 Update 2. #elif defined(_MSC_FULL_VER) && _MSC_FULL_VER >= 190023918 && __cplusplus == 199711L && _MSVC_LANG >= 201703L #define VMA_USE_STL_SHARED_MUTEX 1 #else #define VMA_USE_STL_SHARED_MUTEX 0 #endif #endif /* Define this macro to include custom header files without having to edit this file directly, e.g.: // Inside of "my_vma_configuration_user_includes.h": #include "my_custom_assert.h" // for MY_CUSTOM_ASSERT #include "my_custom_min.h" // for my_custom_min #include #include // Inside a different file, which includes "vk_mem_alloc.h": #define VMA_CONFIGURATION_USER_INCLUDES_H "my_vma_configuration_user_includes.h" #define VMA_ASSERT(expr) MY_CUSTOM_ASSERT(expr) #define VMA_MIN(v1, v2) (my_custom_min(v1, v2)) #include "vk_mem_alloc.h" ... The following headers are used in this CONFIGURATION section only, so feel free to remove them if not needed. */ #if !defined(VMA_CONFIGURATION_USER_INCLUDES_H) #include // for assert #include // for min, max, swap #include #else #include VMA_CONFIGURATION_USER_INCLUDES_H #endif #ifndef VMA_NULL // Value used as null pointer. Define it to e.g.: nullptr, NULL, 0, (void*)0. #define VMA_NULL nullptr #endif #ifndef VMA_FALLTHROUGH #if __cplusplus >= 201703L || _MSVC_LANG >= 201703L // C++17 #define VMA_FALLTHROUGH [[fallthrough]] #else #define VMA_FALLTHROUGH #endif #endif // Normal assert to check for programmer's errors, especially in Debug configuration. #ifndef VMA_ASSERT #ifdef NDEBUG #define VMA_ASSERT(expr) #else #define VMA_ASSERT(expr) assert(expr) #endif #endif // Assert that will be called very often, like inside data structures e.g. operator[]. // Making it non-empty can make program slow. #ifndef VMA_HEAVY_ASSERT #ifdef NDEBUG #define VMA_HEAVY_ASSERT(expr) #else #define VMA_HEAVY_ASSERT(expr) //VMA_ASSERT(expr) #endif #endif // Assert used for reporting memory leaks - unfreed allocations. #ifndef VMA_ASSERT_LEAK #define VMA_ASSERT_LEAK(expr) VMA_ASSERT(expr) #endif // If your compiler is not compatible with C++17 and definition of // aligned_alloc() function is missing, uncommenting following line may help: //#include #if defined(__ANDROID_API__) && (__ANDROID_API__ < 16) #include static void* vma_aligned_alloc(size_t alignment, size_t size) { // alignment must be >= sizeof(void*) if(alignment < sizeof(void*)) { alignment = sizeof(void*); } return memalign(alignment, size); } #elif defined(__APPLE__) || defined(__ANDROID__) || (defined(__linux__) && defined(__GLIBCXX__) && !defined(_GLIBCXX_HAVE_ALIGNED_ALLOC)) #include #if defined(__APPLE__) #include #endif static void* vma_aligned_alloc(size_t alignment, size_t size) { // Unfortunately, aligned_alloc causes VMA to crash due to it returning null pointers. (At least under 11.4) // Therefore, for now disable this specific exception until a proper solution is found. //#if defined(__APPLE__) && (defined(MAC_OS_X_VERSION_10_16) || defined(__IPHONE_14_0)) //#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_16 || __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_14_0 // // For C++14, usr/include/malloc/_malloc.h declares aligned_alloc()) only // // with the MacOSX11.0 SDK in Xcode 12 (which is what adds // // MAC_OS_X_VERSION_10_16), even though the function is marked // // available for 10.15. That is why the preprocessor checks for 10.16 but // // the __builtin_available checks for 10.15. // // People who use C++17 could call aligned_alloc with the 10.15 SDK already. // if (__builtin_available(macOS 10.15, iOS 13, *)) // return aligned_alloc(alignment, size); //#endif //#endif // alignment must be >= sizeof(void*) if(alignment < sizeof(void*)) { alignment = sizeof(void*); } void *pointer; if(posix_memalign(&pointer, alignment, size) == 0) return pointer; return VMA_NULL; } #elif defined(_WIN32) static void* vma_aligned_alloc(size_t alignment, size_t size) { return _aligned_malloc(size, alignment); } #elif __cplusplus >= 201703L || _MSVC_LANG >= 201703L // C++17 static void* vma_aligned_alloc(size_t alignment, size_t size) { return aligned_alloc(alignment, size); } #else static void* vma_aligned_alloc(size_t alignment, size_t size) { VMA_ASSERT(0 && "Could not implement aligned_alloc automatically. Please enable C++17 or later in your compiler or provide custom implementation of macro VMA_SYSTEM_ALIGNED_MALLOC (and VMA_SYSTEM_ALIGNED_FREE if needed) using the API of your system."); return VMA_NULL; } #endif #if defined(_WIN32) static void vma_aligned_free(void* ptr) { _aligned_free(ptr); } #else static void vma_aligned_free(void* VMA_NULLABLE ptr) { free(ptr); } #endif #ifndef VMA_ALIGN_OF #define VMA_ALIGN_OF(type) (alignof(type)) #endif #ifndef VMA_SYSTEM_ALIGNED_MALLOC #define VMA_SYSTEM_ALIGNED_MALLOC(size, alignment) vma_aligned_alloc((alignment), (size)) #endif #ifndef VMA_SYSTEM_ALIGNED_FREE // VMA_SYSTEM_FREE is the old name, but might have been defined by the user #if defined(VMA_SYSTEM_FREE) #define VMA_SYSTEM_ALIGNED_FREE(ptr) VMA_SYSTEM_FREE(ptr) #else #define VMA_SYSTEM_ALIGNED_FREE(ptr) vma_aligned_free(ptr) #endif #endif #ifndef VMA_COUNT_BITS_SET // Returns number of bits set to 1 in (v) #define VMA_COUNT_BITS_SET(v) VmaCountBitsSet(v) #endif #ifndef VMA_BITSCAN_LSB // Scans integer for index of first nonzero value from the Least Significant Bit (LSB). If mask is 0 then returns UINT8_MAX #define VMA_BITSCAN_LSB(mask) VmaBitScanLSB(mask) #endif #ifndef VMA_BITSCAN_MSB // Scans integer for index of first nonzero value from the Most Significant Bit (MSB). If mask is 0 then returns UINT8_MAX #define VMA_BITSCAN_MSB(mask) VmaBitScanMSB(mask) #endif #ifndef VMA_MIN #define VMA_MIN(v1, v2) ((std::min)((v1), (v2))) #endif #ifndef VMA_MAX #define VMA_MAX(v1, v2) ((std::max)((v1), (v2))) #endif #ifndef VMA_SORT #define VMA_SORT(beg, end, cmp) std::sort(beg, end, cmp) #endif #ifndef VMA_DEBUG_LOG_FORMAT #define VMA_DEBUG_LOG_FORMAT(format, ...) /* #define VMA_DEBUG_LOG_FORMAT(format, ...) do { \ printf((format), __VA_ARGS__); \ printf("\n"); \ } while(false) */ #endif #ifndef VMA_DEBUG_LOG #define VMA_DEBUG_LOG(str) VMA_DEBUG_LOG_FORMAT("%s", (str)) #endif #ifndef VMA_LEAK_LOG_FORMAT #define VMA_LEAK_LOG_FORMAT(format, ...) VMA_DEBUG_LOG_FORMAT(format, __VA_ARGS__) #endif #ifndef VMA_CLASS_NO_COPY #define VMA_CLASS_NO_COPY(className) \ private: \ className(const className&) = delete; \ className& operator=(const className&) = delete; #endif #ifndef VMA_CLASS_NO_COPY_NO_MOVE #define VMA_CLASS_NO_COPY_NO_MOVE(className) \ private: \ className(const className&) = delete; \ className(className&&) = delete; \ className& operator=(const className&) = delete; \ className& operator=(className&&) = delete; #endif // Define this macro to 1 to enable functions: vmaBuildStatsString, vmaFreeStatsString. #if VMA_STATS_STRING_ENABLED static inline void VmaUint32ToStr(char* VMA_NOT_NULL outStr, size_t strLen, uint32_t num) { snprintf(outStr, strLen, "%" PRIu32, num); } static inline void VmaUint64ToStr(char* VMA_NOT_NULL outStr, size_t strLen, uint64_t num) { snprintf(outStr, strLen, "%" PRIu64, num); } static inline void VmaPtrToStr(char* VMA_NOT_NULL outStr, size_t strLen, const void* ptr) { snprintf(outStr, strLen, "%p", ptr); } #endif #ifndef VMA_MUTEX class VmaMutex { VMA_CLASS_NO_COPY_NO_MOVE(VmaMutex) public: VmaMutex() { } void Lock() { m_Mutex.lock(); } void Unlock() { m_Mutex.unlock(); } bool TryLock() { return m_Mutex.try_lock(); } private: std::mutex m_Mutex; }; #define VMA_MUTEX VmaMutex #endif // Read-write mutex, where "read" is shared access, "write" is exclusive access. #ifndef VMA_RW_MUTEX #if VMA_USE_STL_SHARED_MUTEX // Use std::shared_mutex from C++17. #include class VmaRWMutex { public: void LockRead() { m_Mutex.lock_shared(); } void UnlockRead() { m_Mutex.unlock_shared(); } bool TryLockRead() { return m_Mutex.try_lock_shared(); } void LockWrite() { m_Mutex.lock(); } void UnlockWrite() { m_Mutex.unlock(); } bool TryLockWrite() { return m_Mutex.try_lock(); } private: std::shared_mutex m_Mutex; }; #define VMA_RW_MUTEX VmaRWMutex #elif defined(_WIN32) && defined(WINVER) && defined(SRWLOCK_INIT) && WINVER >= 0x0600 // Use SRWLOCK from WinAPI. // Minimum supported client = Windows Vista, server = Windows Server 2008. class VmaRWMutex { public: VmaRWMutex() { InitializeSRWLock(&m_Lock); } void LockRead() { AcquireSRWLockShared(&m_Lock); } void UnlockRead() { ReleaseSRWLockShared(&m_Lock); } bool TryLockRead() { return TryAcquireSRWLockShared(&m_Lock) != FALSE; } void LockWrite() { AcquireSRWLockExclusive(&m_Lock); } void UnlockWrite() { ReleaseSRWLockExclusive(&m_Lock); } bool TryLockWrite() { return TryAcquireSRWLockExclusive(&m_Lock) != FALSE; } private: SRWLOCK m_Lock; }; #define VMA_RW_MUTEX VmaRWMutex #else // Less efficient fallback: Use normal mutex. class VmaRWMutex { public: void LockRead() { m_Mutex.Lock(); } void UnlockRead() { m_Mutex.Unlock(); } bool TryLockRead() { return m_Mutex.TryLock(); } void LockWrite() { m_Mutex.Lock(); } void UnlockWrite() { m_Mutex.Unlock(); } bool TryLockWrite() { return m_Mutex.TryLock(); } private: VMA_MUTEX m_Mutex; }; #define VMA_RW_MUTEX VmaRWMutex #endif // #if VMA_USE_STL_SHARED_MUTEX #endif // #ifndef VMA_RW_MUTEX /* If providing your own implementation, you need to implement a subset of std::atomic. */ #ifndef VMA_ATOMIC_UINT32 #include #define VMA_ATOMIC_UINT32 std::atomic #endif #ifndef VMA_ATOMIC_UINT64 #include #define VMA_ATOMIC_UINT64 std::atomic #endif #ifndef VMA_DEBUG_ALWAYS_DEDICATED_MEMORY /** Every allocation will have its own memory block. Define to 1 for debugging purposes only. */ #define VMA_DEBUG_ALWAYS_DEDICATED_MEMORY (0) #endif #ifndef VMA_MIN_ALIGNMENT /** Minimum alignment of all allocations, in bytes. Set to more than 1 for debugging purposes. Must be power of two. */ #ifdef VMA_DEBUG_ALIGNMENT // Old name #define VMA_MIN_ALIGNMENT VMA_DEBUG_ALIGNMENT #else #define VMA_MIN_ALIGNMENT (1) #endif #endif #ifndef VMA_DEBUG_MARGIN /** Minimum margin after every allocation, in bytes. Set nonzero for debugging purposes only. */ #define VMA_DEBUG_MARGIN (0) #endif #ifndef VMA_DEBUG_INITIALIZE_ALLOCATIONS /** Define this macro to 1 to automatically fill new allocations and destroyed allocations with some bit pattern. */ #define VMA_DEBUG_INITIALIZE_ALLOCATIONS (0) #endif #ifndef VMA_DEBUG_DETECT_CORRUPTION /** Define this macro to 1 together with non-zero value of VMA_DEBUG_MARGIN to enable writing magic value to the margin after every allocation and validating it, so that memory corruptions (out-of-bounds writes) are detected. */ #define VMA_DEBUG_DETECT_CORRUPTION (0) #endif #ifndef VMA_DEBUG_GLOBAL_MUTEX /** Set this to 1 for debugging purposes only, to enable single mutex protecting all entry calls to the library. Can be useful for debugging multithreading issues. */ #define VMA_DEBUG_GLOBAL_MUTEX (0) #endif #ifndef VMA_DEBUG_MIN_BUFFER_IMAGE_GRANULARITY /** Minimum value for VkPhysicalDeviceLimits::bufferImageGranularity. Set to more than 1 for debugging purposes only. Must be power of two. */ #define VMA_DEBUG_MIN_BUFFER_IMAGE_GRANULARITY (1) #endif #ifndef VMA_DEBUG_DONT_EXCEED_MAX_MEMORY_ALLOCATION_COUNT /* Set this to 1 to make VMA never exceed VkPhysicalDeviceLimits::maxMemoryAllocationCount and return error instead of leaving up to Vulkan implementation what to do in such cases. */ #define VMA_DEBUG_DONT_EXCEED_MAX_MEMORY_ALLOCATION_COUNT (0) #endif #ifndef VMA_SMALL_HEAP_MAX_SIZE /// Maximum size of a memory heap in Vulkan to consider it "small". #define VMA_SMALL_HEAP_MAX_SIZE (1024ull * 1024 * 1024) #endif #ifndef VMA_DEFAULT_LARGE_HEAP_BLOCK_SIZE /// Default size of a block allocated as single VkDeviceMemory from a "large" heap. #define VMA_DEFAULT_LARGE_HEAP_BLOCK_SIZE (256ull * 1024 * 1024) #endif /* Mapping hysteresis is a logic that launches when vmaMapMemory/vmaUnmapMemory is called or a persistently mapped allocation is created and destroyed several times in a row. It keeps additional +1 mapping of a device memory block to prevent calling actual vkMapMemory/vkUnmapMemory too many times, which may improve performance and help tools like RenderDoc. */ #ifndef VMA_MAPPING_HYSTERESIS_ENABLED #define VMA_MAPPING_HYSTERESIS_ENABLED 1 #endif #define VMA_VALIDATE(cond) do { if(!(cond)) { \ VMA_ASSERT(0 && "Validation failed: " #cond); \ return false; \ } } while(false) /******************************************************************************* END OF CONFIGURATION */ #endif // _VMA_CONFIGURATION static const uint8_t VMA_ALLOCATION_FILL_PATTERN_CREATED = 0xDC; static const uint8_t VMA_ALLOCATION_FILL_PATTERN_DESTROYED = 0xEF; // Decimal 2139416166, float NaN, little-endian binary 66 E6 84 7F. static const uint32_t VMA_CORRUPTION_DETECTION_MAGIC_VALUE = 0x7F84E666; // Copy of some Vulkan definitions so we don't need to check their existence just to handle few constants. static const uint32_t VK_MEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMD_COPY = 0x00000040; static const uint32_t VK_MEMORY_PROPERTY_DEVICE_UNCACHED_BIT_AMD_COPY = 0x00000080; static const uint32_t VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT_COPY = 0x00020000; static const uint32_t VK_IMAGE_CREATE_DISJOINT_BIT_COPY = 0x00000200; static const int32_t VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT_COPY = 1000158000; static const uint32_t VMA_ALLOCATION_INTERNAL_STRATEGY_MIN_OFFSET = 0x10000000u; static const uint32_t VMA_ALLOCATION_TRY_COUNT = 32; static const uint32_t VMA_VENDOR_ID_AMD = 4098; // This one is tricky. Vulkan specification defines this code as available since // Vulkan 1.0, but doesn't actually define it in Vulkan SDK earlier than 1.2.131. // See pull request #207. #define VK_ERROR_UNKNOWN_COPY ((VkResult)-13) #if VMA_STATS_STRING_ENABLED // Correspond to values of enum VmaSuballocationType. static const char* VMA_SUBALLOCATION_TYPE_NAMES[] = { "FREE", "UNKNOWN", "BUFFER", "IMAGE_UNKNOWN", "IMAGE_LINEAR", "IMAGE_OPTIMAL", }; #endif static VkAllocationCallbacks VmaEmptyAllocationCallbacks = { VMA_NULL, VMA_NULL, VMA_NULL, VMA_NULL, VMA_NULL, VMA_NULL }; #ifndef _VMA_ENUM_DECLARATIONS enum VmaSuballocationType { VMA_SUBALLOCATION_TYPE_FREE = 0, VMA_SUBALLOCATION_TYPE_UNKNOWN = 1, VMA_SUBALLOCATION_TYPE_BUFFER = 2, VMA_SUBALLOCATION_TYPE_IMAGE_UNKNOWN = 3, VMA_SUBALLOCATION_TYPE_IMAGE_LINEAR = 4, VMA_SUBALLOCATION_TYPE_IMAGE_OPTIMAL = 5, VMA_SUBALLOCATION_TYPE_MAX_ENUM = 0x7FFFFFFF }; enum VMA_CACHE_OPERATION { VMA_CACHE_FLUSH, VMA_CACHE_INVALIDATE }; enum class VmaAllocationRequestType { Normal, TLSF, // Used by "Linear" algorithm. UpperAddress, EndOf1st, EndOf2nd, }; #endif // _VMA_ENUM_DECLARATIONS #ifndef _VMA_FORWARD_DECLARATIONS // Opaque handle used by allocation algorithms to identify single allocation in any conforming way. VK_DEFINE_NON_DISPATCHABLE_HANDLE(VmaAllocHandle); struct VmaMutexLock; struct VmaMutexLockRead; struct VmaMutexLockWrite; template struct AtomicTransactionalIncrement; template struct VmaStlAllocator; template class VmaVector; template class VmaSmallVector; template class VmaPoolAllocator; template struct VmaListItem; template class VmaRawList; template class VmaList; template class VmaIntrusiveLinkedList; #if VMA_STATS_STRING_ENABLED class VmaStringBuilder; class VmaJsonWriter; #endif class VmaDeviceMemoryBlock; struct VmaDedicatedAllocationListItemTraits; class VmaDedicatedAllocationList; struct VmaSuballocation; struct VmaSuballocationOffsetLess; struct VmaSuballocationOffsetGreater; struct VmaSuballocationItemSizeLess; typedef VmaList> VmaSuballocationList; struct VmaAllocationRequest; class VmaBlockMetadata; class VmaBlockMetadata_Linear; class VmaBlockMetadata_TLSF; class VmaBlockVector; struct VmaPoolListItemTraits; struct VmaCurrentBudgetData; class VmaAllocationObjectAllocator; #endif // _VMA_FORWARD_DECLARATIONS #ifndef _VMA_FUNCTIONS /* Returns number of bits set to 1 in (v). On specific platforms and compilers you can use intrinsics like: Visual Studio: return __popcnt(v); GCC, Clang: return static_cast(__builtin_popcount(v)); Define macro VMA_COUNT_BITS_SET to provide your optimized implementation. But you need to check in runtime whether user's CPU supports these, as some old processors don't. */ static inline uint32_t VmaCountBitsSet(uint32_t v) { #if VMA_CPP20 return std::popcount(v); #else uint32_t c = v - ((v >> 1) & 0x55555555); c = ((c >> 2) & 0x33333333) + (c & 0x33333333); c = ((c >> 4) + c) & 0x0F0F0F0F; c = ((c >> 8) + c) & 0x00FF00FF; c = ((c >> 16) + c) & 0x0000FFFF; return c; #endif } static inline uint8_t VmaBitScanLSB(uint64_t mask) { #if defined(_MSC_VER) && defined(_WIN64) unsigned long pos; if (_BitScanForward64(&pos, mask)) return static_cast(pos); return UINT8_MAX; #elif VMA_CPP20 if(mask) return static_cast(std::countr_zero(mask)); return UINT8_MAX; #elif defined __GNUC__ || defined __clang__ return static_cast(__builtin_ffsll(mask)) - 1U; #else uint8_t pos = 0; uint64_t bit = 1; do { if (mask & bit) return pos; bit <<= 1; } while (pos++ < 63); return UINT8_MAX; #endif } static inline uint8_t VmaBitScanLSB(uint32_t mask) { #ifdef _MSC_VER unsigned long pos; if (_BitScanForward(&pos, mask)) return static_cast(pos); return UINT8_MAX; #elif VMA_CPP20 if(mask) return static_cast(std::countr_zero(mask)); return UINT8_MAX; #elif defined __GNUC__ || defined __clang__ return static_cast(__builtin_ffs(mask)) - 1U; #else uint8_t pos = 0; uint32_t bit = 1; do { if (mask & bit) return pos; bit <<= 1; } while (pos++ < 31); return UINT8_MAX; #endif } static inline uint8_t VmaBitScanMSB(uint64_t mask) { #if defined(_MSC_VER) && defined(_WIN64) unsigned long pos; if (_BitScanReverse64(&pos, mask)) return static_cast(pos); #elif VMA_CPP20 if(mask) return 63 - static_cast(std::countl_zero(mask)); #elif defined __GNUC__ || defined __clang__ if (mask) return 63 - static_cast(__builtin_clzll(mask)); #else uint8_t pos = 63; uint64_t bit = 1ULL << 63; do { if (mask & bit) return pos; bit >>= 1; } while (pos-- > 0); #endif return UINT8_MAX; } static inline uint8_t VmaBitScanMSB(uint32_t mask) { #ifdef _MSC_VER unsigned long pos; if (_BitScanReverse(&pos, mask)) return static_cast(pos); #elif VMA_CPP20 if(mask) return 31 - static_cast(std::countl_zero(mask)); #elif defined __GNUC__ || defined __clang__ if (mask) return 31 - static_cast(__builtin_clz(mask)); #else uint8_t pos = 31; uint32_t bit = 1UL << 31; do { if (mask & bit) return pos; bit >>= 1; } while (pos-- > 0); #endif return UINT8_MAX; } /* Returns true if given number is a power of two. T must be unsigned integer number or signed integer but always nonnegative. For 0 returns true. */ template inline bool VmaIsPow2(T x) { return (x & (x - 1)) == 0; } // Aligns given value up to nearest multiply of align value. For example: VmaAlignUp(11, 8) = 16. // Use types like uint32_t, uint64_t as T. template static inline T VmaAlignUp(T val, T alignment) { VMA_HEAVY_ASSERT(VmaIsPow2(alignment)); return (val + alignment - 1) & ~(alignment - 1); } // Aligns given value down to nearest multiply of align value. For example: VmaAlignDown(11, 8) = 8. // Use types like uint32_t, uint64_t as T. template static inline T VmaAlignDown(T val, T alignment) { VMA_HEAVY_ASSERT(VmaIsPow2(alignment)); return val & ~(alignment - 1); } // Division with mathematical rounding to nearest number. template static inline T VmaRoundDiv(T x, T y) { return (x + (y / (T)2)) / y; } // Divide by 'y' and round up to nearest integer. template static inline T VmaDivideRoundingUp(T x, T y) { return (x + y - (T)1) / y; } // Returns smallest power of 2 greater or equal to v. static inline uint32_t VmaNextPow2(uint32_t v) { v--; v |= v >> 1; v |= v >> 2; v |= v >> 4; v |= v >> 8; v |= v >> 16; v++; return v; } static inline uint64_t VmaNextPow2(uint64_t v) { v--; v |= v >> 1; v |= v >> 2; v |= v >> 4; v |= v >> 8; v |= v >> 16; v |= v >> 32; v++; return v; } // Returns largest power of 2 less or equal to v. static inline uint32_t VmaPrevPow2(uint32_t v) { v |= v >> 1; v |= v >> 2; v |= v >> 4; v |= v >> 8; v |= v >> 16; v = v ^ (v >> 1); return v; } static inline uint64_t VmaPrevPow2(uint64_t v) { v |= v >> 1; v |= v >> 2; v |= v >> 4; v |= v >> 8; v |= v >> 16; v |= v >> 32; v = v ^ (v >> 1); return v; } static inline bool VmaStrIsEmpty(const char* pStr) { return pStr == VMA_NULL || *pStr == '\0'; } /* Returns true if two memory blocks occupy overlapping pages. ResourceA must be in less memory offset than ResourceB. Algorithm is based on "Vulkan 1.0.39 - A Specification (with all registered Vulkan extensions)" chapter 11.6 "Resource Memory Association", paragraph "Buffer-Image Granularity". */ static inline bool VmaBlocksOnSamePage( VkDeviceSize resourceAOffset, VkDeviceSize resourceASize, VkDeviceSize resourceBOffset, VkDeviceSize pageSize) { VMA_ASSERT(resourceAOffset + resourceASize <= resourceBOffset && resourceASize > 0 && pageSize > 0); VkDeviceSize resourceAEnd = resourceAOffset + resourceASize - 1; VkDeviceSize resourceAEndPage = resourceAEnd & ~(pageSize - 1); VkDeviceSize resourceBStart = resourceBOffset; VkDeviceSize resourceBStartPage = resourceBStart & ~(pageSize - 1); return resourceAEndPage == resourceBStartPage; } /* Returns true if given suballocation types could conflict and must respect VkPhysicalDeviceLimits::bufferImageGranularity. They conflict if one is buffer or linear image and another one is optimal image. If type is unknown, behave conservatively. */ static inline bool VmaIsBufferImageGranularityConflict( VmaSuballocationType suballocType1, VmaSuballocationType suballocType2) { if (suballocType1 > suballocType2) { std::swap(suballocType1, suballocType2); } switch (suballocType1) { case VMA_SUBALLOCATION_TYPE_FREE: return false; case VMA_SUBALLOCATION_TYPE_UNKNOWN: return true; case VMA_SUBALLOCATION_TYPE_BUFFER: return suballocType2 == VMA_SUBALLOCATION_TYPE_IMAGE_UNKNOWN || suballocType2 == VMA_SUBALLOCATION_TYPE_IMAGE_OPTIMAL; case VMA_SUBALLOCATION_TYPE_IMAGE_UNKNOWN: return suballocType2 == VMA_SUBALLOCATION_TYPE_IMAGE_UNKNOWN || suballocType2 == VMA_SUBALLOCATION_TYPE_IMAGE_LINEAR || suballocType2 == VMA_SUBALLOCATION_TYPE_IMAGE_OPTIMAL; case VMA_SUBALLOCATION_TYPE_IMAGE_LINEAR: return suballocType2 == VMA_SUBALLOCATION_TYPE_IMAGE_OPTIMAL; case VMA_SUBALLOCATION_TYPE_IMAGE_OPTIMAL: return false; default: VMA_ASSERT(0); return true; } } static void VmaWriteMagicValue(void* pData, VkDeviceSize offset) { #if VMA_DEBUG_MARGIN > 0 && VMA_DEBUG_DETECT_CORRUPTION uint32_t* pDst = (uint32_t*)((char*)pData + offset); const size_t numberCount = VMA_DEBUG_MARGIN / sizeof(uint32_t); for (size_t i = 0; i < numberCount; ++i, ++pDst) { *pDst = VMA_CORRUPTION_DETECTION_MAGIC_VALUE; } #else // no-op #endif } static bool VmaValidateMagicValue(const void* pData, VkDeviceSize offset) { #if VMA_DEBUG_MARGIN > 0 && VMA_DEBUG_DETECT_CORRUPTION const uint32_t* pSrc = (const uint32_t*)((const char*)pData + offset); const size_t numberCount = VMA_DEBUG_MARGIN / sizeof(uint32_t); for (size_t i = 0; i < numberCount; ++i, ++pSrc) { if (*pSrc != VMA_CORRUPTION_DETECTION_MAGIC_VALUE) { return false; } } #endif return true; } /* Fills structure with parameters of an example buffer to be used for transfers during GPU memory defragmentation. */ static void VmaFillGpuDefragmentationBufferCreateInfo(VkBufferCreateInfo& outBufCreateInfo) { memset(&outBufCreateInfo, 0, sizeof(outBufCreateInfo)); outBufCreateInfo.sType = VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO; outBufCreateInfo.usage = VK_BUFFER_USAGE_TRANSFER_SRC_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT; outBufCreateInfo.size = (VkDeviceSize)VMA_DEFAULT_LARGE_HEAP_BLOCK_SIZE; // Example size. } /* Performs binary search and returns iterator to first element that is greater or equal to (key), according to comparison (cmp). Cmp should return true if first argument is less than second argument. Returned value is the found element, if present in the collection or place where new element with value (key) should be inserted. */ template static IterT VmaBinaryFindFirstNotLess(IterT beg, IterT end, const KeyT& key, const CmpLess& cmp) { size_t down = 0, up = size_t(end - beg); while (down < up) { const size_t mid = down + (up - down) / 2; // Overflow-safe midpoint calculation if (cmp(*(beg + mid), key)) { down = mid + 1; } else { up = mid; } } return beg + down; } template IterT VmaBinaryFindSorted(const IterT& beg, const IterT& end, const KeyT& value, const CmpLess& cmp) { IterT it = VmaBinaryFindFirstNotLess( beg, end, value, cmp); if (it == end || (!cmp(*it, value) && !cmp(value, *it))) { return it; } return end; } /* Returns true if all pointers in the array are not-null and unique. Warning! O(n^2) complexity. Use only inside VMA_HEAVY_ASSERT. T must be pointer type, e.g. VmaAllocation, VmaPool. */ template static bool VmaValidatePointerArray(uint32_t count, const T* arr) { for (uint32_t i = 0; i < count; ++i) { const T iPtr = arr[i]; if (iPtr == VMA_NULL) { return false; } for (uint32_t j = i + 1; j < count; ++j) { if (iPtr == arr[j]) { return false; } } } return true; } template static inline void VmaPnextChainPushFront(MainT* mainStruct, NewT* newStruct) { newStruct->pNext = mainStruct->pNext; mainStruct->pNext = newStruct; } // Finds structure with s->sType == sType in mainStruct->pNext chain. // Returns pointer to it. If not found, returns null. template static inline const FindT* VmaPnextChainFind(const MainT* mainStruct, VkStructureType sType) { for(const VkBaseInStructure* s = (const VkBaseInStructure*)mainStruct->pNext; s != VMA_NULL; s = s->pNext) { if(s->sType == sType) { return (const FindT*)s; } } return VMA_NULL; } // An abstraction over buffer or image `usage` flags, depending on available extensions. struct VmaBufferImageUsage { #if VMA_KHR_MAINTENANCE5 typedef uint64_t BaseType; // VkFlags64 #else typedef uint32_t BaseType; // VkFlags32 #endif static const VmaBufferImageUsage UNKNOWN; BaseType Value; VmaBufferImageUsage() { *this = UNKNOWN; } explicit VmaBufferImageUsage(BaseType usage) : Value(usage) { } VmaBufferImageUsage(const VkBufferCreateInfo &createInfo, bool useKhrMaintenance5); explicit VmaBufferImageUsage(const VkImageCreateInfo &createInfo); bool operator==(const VmaBufferImageUsage& rhs) const { return Value == rhs.Value; } bool operator!=(const VmaBufferImageUsage& rhs) const { return Value != rhs.Value; } bool Contains(BaseType flag) const { return (Value & flag) != 0; } bool ContainsDeviceAccess() const { // This relies on values of VK_IMAGE_USAGE_TRANSFER* being the same as VK_BUFFER_IMAGE_TRANSFER*. return (Value & ~BaseType(VK_BUFFER_USAGE_TRANSFER_DST_BIT | VK_BUFFER_USAGE_TRANSFER_SRC_BIT)) != 0; } }; const VmaBufferImageUsage VmaBufferImageUsage::UNKNOWN = VmaBufferImageUsage(0); VmaBufferImageUsage::VmaBufferImageUsage(const VkBufferCreateInfo &createInfo, bool useKhrMaintenance5) { #if VMA_KHR_MAINTENANCE5 if(useKhrMaintenance5) { // If VkBufferCreateInfo::pNext chain contains VkBufferUsageFlags2CreateInfoKHR, // take usage from it and ignore VkBufferCreateInfo::usage, per specification // of the VK_KHR_maintenance5 extension. const VkBufferUsageFlags2CreateInfoKHR* const usageFlags2 = VmaPnextChainFind(&createInfo, VK_STRUCTURE_TYPE_BUFFER_USAGE_FLAGS_2_CREATE_INFO_KHR); if(usageFlags2) { this->Value = usageFlags2->usage; return; } } #endif this->Value = (BaseType)createInfo.usage; } VmaBufferImageUsage::VmaBufferImageUsage(const VkImageCreateInfo &createInfo) { // Maybe in the future there will be VK_KHR_maintenanceN extension with structure // VkImageUsageFlags2CreateInfoKHR, like the one for buffers... this->Value = (BaseType)createInfo.usage; } // This is the main algorithm that guides the selection of a memory type best for an allocation - // converts usage to required/preferred/not preferred flags. static bool FindMemoryPreferences( bool isIntegratedGPU, const VmaAllocationCreateInfo& allocCreateInfo, VmaBufferImageUsage bufImgUsage, VkMemoryPropertyFlags& outRequiredFlags, VkMemoryPropertyFlags& outPreferredFlags, VkMemoryPropertyFlags& outNotPreferredFlags) { outRequiredFlags = allocCreateInfo.requiredFlags; outPreferredFlags = allocCreateInfo.preferredFlags; outNotPreferredFlags = 0; switch(allocCreateInfo.usage) { case VMA_MEMORY_USAGE_UNKNOWN: break; case VMA_MEMORY_USAGE_GPU_ONLY: if(!isIntegratedGPU || (outPreferredFlags & VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT) == 0) { outPreferredFlags |= VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT; } break; case VMA_MEMORY_USAGE_CPU_ONLY: outRequiredFlags |= VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT; break; case VMA_MEMORY_USAGE_CPU_TO_GPU: outRequiredFlags |= VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT; if(!isIntegratedGPU || (outPreferredFlags & VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT) == 0) { outPreferredFlags |= VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT; } break; case VMA_MEMORY_USAGE_GPU_TO_CPU: outRequiredFlags |= VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT; outPreferredFlags |= VK_MEMORY_PROPERTY_HOST_CACHED_BIT; break; case VMA_MEMORY_USAGE_CPU_COPY: outNotPreferredFlags |= VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT; break; case VMA_MEMORY_USAGE_GPU_LAZILY_ALLOCATED: outRequiredFlags |= VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT; break; case VMA_MEMORY_USAGE_AUTO: case VMA_MEMORY_USAGE_AUTO_PREFER_DEVICE: case VMA_MEMORY_USAGE_AUTO_PREFER_HOST: { if(bufImgUsage == VmaBufferImageUsage::UNKNOWN) { VMA_ASSERT(0 && "VMA_MEMORY_USAGE_AUTO* values can only be used with functions like vmaCreateBuffer, vmaCreateImage so that the details of the created resource are known." " Maybe you use VkBufferUsageFlags2CreateInfoKHR but forgot to use VMA_ALLOCATOR_CREATE_KHR_MAINTENANCE5_BIT?" ); return false; } const bool deviceAccess = bufImgUsage.ContainsDeviceAccess(); const bool hostAccessSequentialWrite = (allocCreateInfo.flags & VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT) != 0; const bool hostAccessRandom = (allocCreateInfo.flags & VMA_ALLOCATION_CREATE_HOST_ACCESS_RANDOM_BIT) != 0; const bool hostAccessAllowTransferInstead = (allocCreateInfo.flags & VMA_ALLOCATION_CREATE_HOST_ACCESS_ALLOW_TRANSFER_INSTEAD_BIT) != 0; const bool preferDevice = allocCreateInfo.usage == VMA_MEMORY_USAGE_AUTO_PREFER_DEVICE; const bool preferHost = allocCreateInfo.usage == VMA_MEMORY_USAGE_AUTO_PREFER_HOST; // CPU random access - e.g. a buffer written to or transferred from GPU to read back on CPU. if(hostAccessRandom) { // Prefer cached. Cannot require it, because some platforms don't have it (e.g. Raspberry Pi - see #362)! outPreferredFlags |= VK_MEMORY_PROPERTY_HOST_CACHED_BIT; if (!isIntegratedGPU && deviceAccess && hostAccessAllowTransferInstead && !preferHost) { // Nice if it will end up in HOST_VISIBLE, but more importantly prefer DEVICE_LOCAL. // Omitting HOST_VISIBLE here is intentional. // In case there is DEVICE_LOCAL | HOST_VISIBLE | HOST_CACHED, it will pick that one. // Otherwise, this will give same weight to DEVICE_LOCAL as HOST_VISIBLE | HOST_CACHED and select the former if occurs first on the list. outPreferredFlags |= VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT; } else { // Always CPU memory. outRequiredFlags |= VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT; } } // CPU sequential write - may be CPU or host-visible GPU memory, uncached and write-combined. else if(hostAccessSequentialWrite) { // Want uncached and write-combined. outNotPreferredFlags |= VK_MEMORY_PROPERTY_HOST_CACHED_BIT; if(!isIntegratedGPU && deviceAccess && hostAccessAllowTransferInstead && !preferHost) { outPreferredFlags |= VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT | VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT; } else { outRequiredFlags |= VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT; // Direct GPU access, CPU sequential write (e.g. a dynamic uniform buffer updated every frame) if(deviceAccess) { // Could go to CPU memory or GPU BAR/unified. Up to the user to decide. If no preference, choose GPU memory. if(preferHost) outNotPreferredFlags |= VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT; else outPreferredFlags |= VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT; } // GPU no direct access, CPU sequential write (e.g. an upload buffer to be transferred to the GPU) else { // Could go to CPU memory or GPU BAR/unified. Up to the user to decide. If no preference, choose CPU memory. if(preferDevice) outPreferredFlags |= VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT; else outNotPreferredFlags |= VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT; } } } // No CPU access else { // if(deviceAccess) // // GPU access, no CPU access (e.g. a color attachment image) - prefer GPU memory, // unless there is a clear preference from the user not to do so. // // else: // // No direct GPU access, no CPU access, just transfers. // It may be staging copy intended for e.g. preserving image for next frame (then better GPU memory) or // a "swap file" copy to free some GPU memory (then better CPU memory). // Up to the user to decide. If no preferece, assume the former and choose GPU memory. if(preferHost) outNotPreferredFlags |= VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT; else outPreferredFlags |= VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT; } break; } default: VMA_ASSERT(0); } // Avoid DEVICE_COHERENT unless explicitly requested. if(((allocCreateInfo.requiredFlags | allocCreateInfo.preferredFlags) & (VK_MEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMD_COPY | VK_MEMORY_PROPERTY_DEVICE_UNCACHED_BIT_AMD_COPY)) == 0) { outNotPreferredFlags |= VK_MEMORY_PROPERTY_DEVICE_UNCACHED_BIT_AMD_COPY; } return true; } //////////////////////////////////////////////////////////////////////////////// // Memory allocation static void* VmaMalloc(const VkAllocationCallbacks* pAllocationCallbacks, size_t size, size_t alignment) { void* result = VMA_NULL; if ((pAllocationCallbacks != VMA_NULL) && (pAllocationCallbacks->pfnAllocation != VMA_NULL)) { result = (*pAllocationCallbacks->pfnAllocation)( pAllocationCallbacks->pUserData, size, alignment, VK_SYSTEM_ALLOCATION_SCOPE_OBJECT); } else { result = VMA_SYSTEM_ALIGNED_MALLOC(size, alignment); } VMA_ASSERT(result != VMA_NULL && "CPU memory allocation failed."); return result; } static void VmaFree(const VkAllocationCallbacks* pAllocationCallbacks, void* ptr) { if ((pAllocationCallbacks != VMA_NULL) && (pAllocationCallbacks->pfnFree != VMA_NULL)) { (*pAllocationCallbacks->pfnFree)(pAllocationCallbacks->pUserData, ptr); } else { VMA_SYSTEM_ALIGNED_FREE(ptr); } } template static T* VmaAllocate(const VkAllocationCallbacks* pAllocationCallbacks) { return (T*)VmaMalloc(pAllocationCallbacks, sizeof(T), VMA_ALIGN_OF(T)); } template static T* VmaAllocateArray(const VkAllocationCallbacks* pAllocationCallbacks, size_t count) { return (T*)VmaMalloc(pAllocationCallbacks, sizeof(T) * count, VMA_ALIGN_OF(T)); } #define vma_new(allocator, type) new(VmaAllocate(allocator))(type) #define vma_new_array(allocator, type, count) new(VmaAllocateArray((allocator), (count)))(type) template static void vma_delete(const VkAllocationCallbacks* pAllocationCallbacks, T* ptr) { ptr->~T(); VmaFree(pAllocationCallbacks, ptr); } template static void vma_delete_array(const VkAllocationCallbacks* pAllocationCallbacks, T* ptr, size_t count) { if (ptr != VMA_NULL) { for (size_t i = count; i--; ) { ptr[i].~T(); } VmaFree(pAllocationCallbacks, ptr); } } static char* VmaCreateStringCopy(const VkAllocationCallbacks* allocs, const char* srcStr) { if (srcStr != VMA_NULL) { const size_t len = strlen(srcStr); char* const result = vma_new_array(allocs, char, len + 1); memcpy(result, srcStr, len + 1); return result; } return VMA_NULL; } #if VMA_STATS_STRING_ENABLED static char* VmaCreateStringCopy(const VkAllocationCallbacks* allocs, const char* srcStr, size_t strLen) { if (srcStr != VMA_NULL) { char* const result = vma_new_array(allocs, char, strLen + 1); memcpy(result, srcStr, strLen); result[strLen] = '\0'; return result; } return VMA_NULL; } #endif // VMA_STATS_STRING_ENABLED static void VmaFreeString(const VkAllocationCallbacks* allocs, char* str) { if (str != VMA_NULL) { const size_t len = strlen(str); vma_delete_array(allocs, str, len + 1); } } template size_t VmaVectorInsertSorted(VectorT& vector, const typename VectorT::value_type& value) { const size_t indexToInsert = VmaBinaryFindFirstNotLess( vector.data(), vector.data() + vector.size(), value, CmpLess()) - vector.data(); VmaVectorInsert(vector, indexToInsert, value); return indexToInsert; } template bool VmaVectorRemoveSorted(VectorT& vector, const typename VectorT::value_type& value) { CmpLess comparator; typename VectorT::iterator it = VmaBinaryFindFirstNotLess( vector.begin(), vector.end(), value, comparator); if ((it != vector.end()) && !comparator(*it, value) && !comparator(value, *it)) { size_t indexToRemove = it - vector.begin(); VmaVectorRemove(vector, indexToRemove); return true; } return false; } #endif // _VMA_FUNCTIONS #ifndef _VMA_STATISTICS_FUNCTIONS static void VmaClearStatistics(VmaStatistics& outStats) { outStats.blockCount = 0; outStats.allocationCount = 0; outStats.blockBytes = 0; outStats.allocationBytes = 0; } static void VmaAddStatistics(VmaStatistics& inoutStats, const VmaStatistics& src) { inoutStats.blockCount += src.blockCount; inoutStats.allocationCount += src.allocationCount; inoutStats.blockBytes += src.blockBytes; inoutStats.allocationBytes += src.allocationBytes; } static void VmaClearDetailedStatistics(VmaDetailedStatistics& outStats) { VmaClearStatistics(outStats.statistics); outStats.unusedRangeCount = 0; outStats.allocationSizeMin = VK_WHOLE_SIZE; outStats.allocationSizeMax = 0; outStats.unusedRangeSizeMin = VK_WHOLE_SIZE; outStats.unusedRangeSizeMax = 0; } static void VmaAddDetailedStatisticsAllocation(VmaDetailedStatistics& inoutStats, VkDeviceSize size) { inoutStats.statistics.allocationCount++; inoutStats.statistics.allocationBytes += size; inoutStats.allocationSizeMin = VMA_MIN(inoutStats.allocationSizeMin, size); inoutStats.allocationSizeMax = VMA_MAX(inoutStats.allocationSizeMax, size); } static void VmaAddDetailedStatisticsUnusedRange(VmaDetailedStatistics& inoutStats, VkDeviceSize size) { inoutStats.unusedRangeCount++; inoutStats.unusedRangeSizeMin = VMA_MIN(inoutStats.unusedRangeSizeMin, size); inoutStats.unusedRangeSizeMax = VMA_MAX(inoutStats.unusedRangeSizeMax, size); } static void VmaAddDetailedStatistics(VmaDetailedStatistics& inoutStats, const VmaDetailedStatistics& src) { VmaAddStatistics(inoutStats.statistics, src.statistics); inoutStats.unusedRangeCount += src.unusedRangeCount; inoutStats.allocationSizeMin = VMA_MIN(inoutStats.allocationSizeMin, src.allocationSizeMin); inoutStats.allocationSizeMax = VMA_MAX(inoutStats.allocationSizeMax, src.allocationSizeMax); inoutStats.unusedRangeSizeMin = VMA_MIN(inoutStats.unusedRangeSizeMin, src.unusedRangeSizeMin); inoutStats.unusedRangeSizeMax = VMA_MAX(inoutStats.unusedRangeSizeMax, src.unusedRangeSizeMax); } #endif // _VMA_STATISTICS_FUNCTIONS #ifndef _VMA_MUTEX_LOCK // Helper RAII class to lock a mutex in constructor and unlock it in destructor (at the end of scope). struct VmaMutexLock { VMA_CLASS_NO_COPY_NO_MOVE(VmaMutexLock) public: VmaMutexLock(VMA_MUTEX& mutex, bool useMutex = true) : m_pMutex(useMutex ? &mutex : VMA_NULL) { if (m_pMutex) { m_pMutex->Lock(); } } ~VmaMutexLock() { if (m_pMutex) { m_pMutex->Unlock(); } } private: VMA_MUTEX* m_pMutex; }; // Helper RAII class to lock a RW mutex in constructor and unlock it in destructor (at the end of scope), for reading. struct VmaMutexLockRead { VMA_CLASS_NO_COPY_NO_MOVE(VmaMutexLockRead) public: VmaMutexLockRead(VMA_RW_MUTEX& mutex, bool useMutex) : m_pMutex(useMutex ? &mutex : VMA_NULL) { if (m_pMutex) { m_pMutex->LockRead(); } } ~VmaMutexLockRead() { if (m_pMutex) { m_pMutex->UnlockRead(); } } private: VMA_RW_MUTEX* m_pMutex; }; // Helper RAII class to lock a RW mutex in constructor and unlock it in destructor (at the end of scope), for writing. struct VmaMutexLockWrite { VMA_CLASS_NO_COPY_NO_MOVE(VmaMutexLockWrite) public: VmaMutexLockWrite(VMA_RW_MUTEX& mutex, bool useMutex) : m_pMutex(useMutex ? &mutex : VMA_NULL) { if (m_pMutex) { m_pMutex->LockWrite(); } } ~VmaMutexLockWrite() { if (m_pMutex) { m_pMutex->UnlockWrite(); } } private: VMA_RW_MUTEX* m_pMutex; }; #if VMA_DEBUG_GLOBAL_MUTEX static VMA_MUTEX gDebugGlobalMutex; #define VMA_DEBUG_GLOBAL_MUTEX_LOCK VmaMutexLock debugGlobalMutexLock(gDebugGlobalMutex, true); #else #define VMA_DEBUG_GLOBAL_MUTEX_LOCK #endif #endif // _VMA_MUTEX_LOCK #ifndef _VMA_ATOMIC_TRANSACTIONAL_INCREMENT // An object that increments given atomic but decrements it back in the destructor unless Commit() is called. template struct AtomicTransactionalIncrement { public: using T = decltype(AtomicT().load()); ~AtomicTransactionalIncrement() { if(m_Atomic) --(*m_Atomic); } void Commit() { m_Atomic = VMA_NULL; } T Increment(AtomicT* atomic) { m_Atomic = atomic; return m_Atomic->fetch_add(1); } private: AtomicT* m_Atomic = VMA_NULL; }; #endif // _VMA_ATOMIC_TRANSACTIONAL_INCREMENT #ifndef _VMA_STL_ALLOCATOR // STL-compatible allocator. template struct VmaStlAllocator { const VkAllocationCallbacks* const m_pCallbacks; typedef T value_type; VmaStlAllocator(const VkAllocationCallbacks* pCallbacks) : m_pCallbacks(pCallbacks) {} template VmaStlAllocator(const VmaStlAllocator& src) : m_pCallbacks(src.m_pCallbacks) {} VmaStlAllocator(const VmaStlAllocator&) = default; VmaStlAllocator& operator=(const VmaStlAllocator&) = delete; T* allocate(size_t n) { return VmaAllocateArray(m_pCallbacks, n); } void deallocate(T* p, size_t n) { VmaFree(m_pCallbacks, p); } template bool operator==(const VmaStlAllocator& rhs) const { return m_pCallbacks == rhs.m_pCallbacks; } template bool operator!=(const VmaStlAllocator& rhs) const { return m_pCallbacks != rhs.m_pCallbacks; } }; #endif // _VMA_STL_ALLOCATOR #ifndef _VMA_VECTOR /* Class with interface compatible with subset of std::vector. T must be POD because constructors and destructors are not called and memcpy is used for these objects. */ template class VmaVector { public: typedef T value_type; typedef T* iterator; typedef const T* const_iterator; VmaVector(const AllocatorT& allocator); VmaVector(size_t count, const AllocatorT& allocator); // This version of the constructor is here for compatibility with pre-C++14 std::vector. // value is unused. VmaVector(size_t count, const T& value, const AllocatorT& allocator) : VmaVector(count, allocator) {} VmaVector(const VmaVector& src); VmaVector& operator=(const VmaVector& rhs); ~VmaVector() { VmaFree(m_Allocator.m_pCallbacks, m_pArray); } bool empty() const { return m_Count == 0; } size_t size() const { return m_Count; } T* data() { return m_pArray; } T& front() { VMA_HEAVY_ASSERT(m_Count > 0); return m_pArray[0]; } T& back() { VMA_HEAVY_ASSERT(m_Count > 0); return m_pArray[m_Count - 1]; } const T* data() const { return m_pArray; } const T& front() const { VMA_HEAVY_ASSERT(m_Count > 0); return m_pArray[0]; } const T& back() const { VMA_HEAVY_ASSERT(m_Count > 0); return m_pArray[m_Count - 1]; } iterator begin() { return m_pArray; } iterator end() { return m_pArray + m_Count; } const_iterator cbegin() const { return m_pArray; } const_iterator cend() const { return m_pArray + m_Count; } const_iterator begin() const { return cbegin(); } const_iterator end() const { return cend(); } void pop_front() { VMA_HEAVY_ASSERT(m_Count > 0); remove(0); } void pop_back() { VMA_HEAVY_ASSERT(m_Count > 0); resize(size() - 1); } void push_front(const T& src) { insert(0, src); } void push_back(const T& src); void reserve(size_t newCapacity, bool freeMemory = false); void resize(size_t newCount); void clear() { resize(0); } void shrink_to_fit(); void insert(size_t index, const T& src); void remove(size_t index); T& operator[](size_t index) { VMA_HEAVY_ASSERT(index < m_Count); return m_pArray[index]; } const T& operator[](size_t index) const { VMA_HEAVY_ASSERT(index < m_Count); return m_pArray[index]; } private: AllocatorT m_Allocator; T* m_pArray; size_t m_Count; size_t m_Capacity; }; #ifndef _VMA_VECTOR_FUNCTIONS template VmaVector::VmaVector(const AllocatorT& allocator) : m_Allocator(allocator), m_pArray(VMA_NULL), m_Count(0), m_Capacity(0) {} template VmaVector::VmaVector(size_t count, const AllocatorT& allocator) : m_Allocator(allocator), m_pArray(count ? (T*)VmaAllocateArray(allocator.m_pCallbacks, count) : VMA_NULL), m_Count(count), m_Capacity(count) {} template VmaVector::VmaVector(const VmaVector& src) : m_Allocator(src.m_Allocator), m_pArray(src.m_Count ? (T*)VmaAllocateArray(src.m_Allocator.m_pCallbacks, src.m_Count) : VMA_NULL), m_Count(src.m_Count), m_Capacity(src.m_Count) { if (m_Count != 0) { memcpy(m_pArray, src.m_pArray, m_Count * sizeof(T)); } } template VmaVector& VmaVector::operator=(const VmaVector& rhs) { if (&rhs != this) { resize(rhs.m_Count); if (m_Count != 0) { memcpy(m_pArray, rhs.m_pArray, m_Count * sizeof(T)); } } return *this; } template void VmaVector::push_back(const T& src) { const size_t newIndex = size(); resize(newIndex + 1); m_pArray[newIndex] = src; } template void VmaVector::reserve(size_t newCapacity, bool freeMemory) { newCapacity = VMA_MAX(newCapacity, m_Count); if ((newCapacity < m_Capacity) && !freeMemory) { newCapacity = m_Capacity; } if (newCapacity != m_Capacity) { T* const newArray = newCapacity ? VmaAllocateArray(m_Allocator, newCapacity) : VMA_NULL; if (m_Count != 0) { memcpy(newArray, m_pArray, m_Count * sizeof(T)); } VmaFree(m_Allocator.m_pCallbacks, m_pArray); m_Capacity = newCapacity; m_pArray = newArray; } } template void VmaVector::resize(size_t newCount) { size_t newCapacity = m_Capacity; if (newCount > m_Capacity) { newCapacity = VMA_MAX(newCount, VMA_MAX(m_Capacity * 3 / 2, (size_t)8)); } if (newCapacity != m_Capacity) { T* const newArray = newCapacity ? VmaAllocateArray(m_Allocator.m_pCallbacks, newCapacity) : VMA_NULL; const size_t elementsToCopy = VMA_MIN(m_Count, newCount); if (elementsToCopy != 0) { memcpy(newArray, m_pArray, elementsToCopy * sizeof(T)); } VmaFree(m_Allocator.m_pCallbacks, m_pArray); m_Capacity = newCapacity; m_pArray = newArray; } m_Count = newCount; } template void VmaVector::shrink_to_fit() { if (m_Capacity > m_Count) { T* newArray = VMA_NULL; if (m_Count > 0) { newArray = VmaAllocateArray(m_Allocator.m_pCallbacks, m_Count); memcpy(newArray, m_pArray, m_Count * sizeof(T)); } VmaFree(m_Allocator.m_pCallbacks, m_pArray); m_Capacity = m_Count; m_pArray = newArray; } } template void VmaVector::insert(size_t index, const T& src) { VMA_HEAVY_ASSERT(index <= m_Count); const size_t oldCount = size(); resize(oldCount + 1); if (index < oldCount) { memmove(m_pArray + (index + 1), m_pArray + index, (oldCount - index) * sizeof(T)); } m_pArray[index] = src; } template void VmaVector::remove(size_t index) { VMA_HEAVY_ASSERT(index < m_Count); const size_t oldCount = size(); if (index < oldCount - 1) { memmove(m_pArray + index, m_pArray + (index + 1), (oldCount - index - 1) * sizeof(T)); } resize(oldCount - 1); } #endif // _VMA_VECTOR_FUNCTIONS template static void VmaVectorInsert(VmaVector& vec, size_t index, const T& item) { vec.insert(index, item); } template static void VmaVectorRemove(VmaVector& vec, size_t index) { vec.remove(index); } #endif // _VMA_VECTOR #ifndef _VMA_SMALL_VECTOR /* This is a vector (a variable-sized array), optimized for the case when the array is small. It contains some number of elements in-place, which allows it to avoid heap allocation when the actual number of elements is below that threshold. This allows normal "small" cases to be fast without losing generality for large inputs. */ template class VmaSmallVector { public: typedef T value_type; typedef T* iterator; VmaSmallVector(const AllocatorT& allocator); VmaSmallVector(size_t count, const AllocatorT& allocator); template VmaSmallVector(const VmaSmallVector&) = delete; template VmaSmallVector& operator=(const VmaSmallVector&) = delete; ~VmaSmallVector() = default; bool empty() const { return m_Count == 0; } size_t size() const { return m_Count; } T* data() { return m_Count > N ? m_DynamicArray.data() : m_StaticArray; } T& front() { VMA_HEAVY_ASSERT(m_Count > 0); return data()[0]; } T& back() { VMA_HEAVY_ASSERT(m_Count > 0); return data()[m_Count - 1]; } const T* data() const { return m_Count > N ? m_DynamicArray.data() : m_StaticArray; } const T& front() const { VMA_HEAVY_ASSERT(m_Count > 0); return data()[0]; } const T& back() const { VMA_HEAVY_ASSERT(m_Count > 0); return data()[m_Count - 1]; } iterator begin() { return data(); } iterator end() { return data() + m_Count; } void pop_front() { VMA_HEAVY_ASSERT(m_Count > 0); remove(0); } void pop_back() { VMA_HEAVY_ASSERT(m_Count > 0); resize(size() - 1); } void push_front(const T& src) { insert(0, src); } void push_back(const T& src); void resize(size_t newCount, bool freeMemory = false); void clear(bool freeMemory = false); void insert(size_t index, const T& src); void remove(size_t index); T& operator[](size_t index) { VMA_HEAVY_ASSERT(index < m_Count); return data()[index]; } const T& operator[](size_t index) const { VMA_HEAVY_ASSERT(index < m_Count); return data()[index]; } private: size_t m_Count; T m_StaticArray[N]; // Used when m_Size <= N VmaVector m_DynamicArray; // Used when m_Size > N }; #ifndef _VMA_SMALL_VECTOR_FUNCTIONS template VmaSmallVector::VmaSmallVector(const AllocatorT& allocator) : m_Count(0), m_DynamicArray(allocator) {} template VmaSmallVector::VmaSmallVector(size_t count, const AllocatorT& allocator) : m_Count(count), m_DynamicArray(count > N ? count : 0, allocator) {} template void VmaSmallVector::push_back(const T& src) { const size_t newIndex = size(); resize(newIndex + 1); data()[newIndex] = src; } template void VmaSmallVector::resize(size_t newCount, bool freeMemory) { if (newCount > N && m_Count > N) { // Any direction, staying in m_DynamicArray m_DynamicArray.resize(newCount); if (freeMemory) { m_DynamicArray.shrink_to_fit(); } } else if (newCount > N && m_Count <= N) { // Growing, moving from m_StaticArray to m_DynamicArray m_DynamicArray.resize(newCount); if (m_Count > 0) { memcpy(m_DynamicArray.data(), m_StaticArray, m_Count * sizeof(T)); } } else if (newCount <= N && m_Count > N) { // Shrinking, moving from m_DynamicArray to m_StaticArray if (newCount > 0) { memcpy(m_StaticArray, m_DynamicArray.data(), newCount * sizeof(T)); } m_DynamicArray.resize(0); if (freeMemory) { m_DynamicArray.shrink_to_fit(); } } else { // Any direction, staying in m_StaticArray - nothing to do here } m_Count = newCount; } template void VmaSmallVector::clear(bool freeMemory) { m_DynamicArray.clear(); if (freeMemory) { m_DynamicArray.shrink_to_fit(); } m_Count = 0; } template void VmaSmallVector::insert(size_t index, const T& src) { VMA_HEAVY_ASSERT(index <= m_Count); const size_t oldCount = size(); resize(oldCount + 1); T* const dataPtr = data(); if (index < oldCount) { // I know, this could be more optimal for case where memmove can be memcpy directly from m_StaticArray to m_DynamicArray. memmove(dataPtr + (index + 1), dataPtr + index, (oldCount - index) * sizeof(T)); } dataPtr[index] = src; } template void VmaSmallVector::remove(size_t index) { VMA_HEAVY_ASSERT(index < m_Count); const size_t oldCount = size(); if (index < oldCount - 1) { // I know, this could be more optimal for case where memmove can be memcpy directly from m_DynamicArray to m_StaticArray. T* const dataPtr = data(); memmove(dataPtr + index, dataPtr + (index + 1), (oldCount - index - 1) * sizeof(T)); } resize(oldCount - 1); } #endif // _VMA_SMALL_VECTOR_FUNCTIONS #endif // _VMA_SMALL_VECTOR #ifndef _VMA_POOL_ALLOCATOR /* Allocator for objects of type T using a list of arrays (pools) to speed up allocation. Number of elements that can be allocated is not bounded because allocator can create multiple blocks. */ template class VmaPoolAllocator { VMA_CLASS_NO_COPY_NO_MOVE(VmaPoolAllocator) public: VmaPoolAllocator(const VkAllocationCallbacks* pAllocationCallbacks, uint32_t firstBlockCapacity); ~VmaPoolAllocator(); template T* Alloc(Types&&... args); void Free(T* ptr); private: union Item { uint32_t NextFreeIndex; alignas(T) char Value[sizeof(T)]; }; struct ItemBlock { Item* pItems; uint32_t Capacity; uint32_t FirstFreeIndex; }; const VkAllocationCallbacks* m_pAllocationCallbacks; const uint32_t m_FirstBlockCapacity; VmaVector> m_ItemBlocks; ItemBlock& CreateNewBlock(); }; #ifndef _VMA_POOL_ALLOCATOR_FUNCTIONS template VmaPoolAllocator::VmaPoolAllocator(const VkAllocationCallbacks* pAllocationCallbacks, uint32_t firstBlockCapacity) : m_pAllocationCallbacks(pAllocationCallbacks), m_FirstBlockCapacity(firstBlockCapacity), m_ItemBlocks(VmaStlAllocator(pAllocationCallbacks)) { VMA_ASSERT(m_FirstBlockCapacity > 1); } template VmaPoolAllocator::~VmaPoolAllocator() { for (size_t i = m_ItemBlocks.size(); i--;) vma_delete_array(m_pAllocationCallbacks, m_ItemBlocks[i].pItems, m_ItemBlocks[i].Capacity); m_ItemBlocks.clear(); } template template T* VmaPoolAllocator::Alloc(Types&&... args) { for (size_t i = m_ItemBlocks.size(); i--; ) { ItemBlock& block = m_ItemBlocks[i]; // This block has some free items: Use first one. if (block.FirstFreeIndex != UINT32_MAX) { Item* const pItem = &block.pItems[block.FirstFreeIndex]; block.FirstFreeIndex = pItem->NextFreeIndex; T* result = (T*)&pItem->Value; new(result)T(std::forward(args)...); // Explicit constructor call. return result; } } // No block has free item: Create new one and use it. ItemBlock& newBlock = CreateNewBlock(); Item* const pItem = &newBlock.pItems[0]; newBlock.FirstFreeIndex = pItem->NextFreeIndex; T* result = (T*)&pItem->Value; new(result) T(std::forward(args)...); // Explicit constructor call. return result; } template void VmaPoolAllocator::Free(T* ptr) { // Search all memory blocks to find ptr. for (size_t i = m_ItemBlocks.size(); i--; ) { ItemBlock& block = m_ItemBlocks[i]; // Casting to union. Item* pItemPtr; memcpy(&pItemPtr, &ptr, sizeof(pItemPtr)); // Check if pItemPtr is in address range of this block. if ((pItemPtr >= block.pItems) && (pItemPtr < block.pItems + block.Capacity)) { ptr->~T(); // Explicit destructor call. const uint32_t index = static_cast(pItemPtr - block.pItems); pItemPtr->NextFreeIndex = block.FirstFreeIndex; block.FirstFreeIndex = index; return; } } VMA_ASSERT(0 && "Pointer doesn't belong to this memory pool."); } template typename VmaPoolAllocator::ItemBlock& VmaPoolAllocator::CreateNewBlock() { const uint32_t newBlockCapacity = m_ItemBlocks.empty() ? m_FirstBlockCapacity : m_ItemBlocks.back().Capacity * 3 / 2; const ItemBlock newBlock = { vma_new_array(m_pAllocationCallbacks, Item, newBlockCapacity), newBlockCapacity, 0 }; m_ItemBlocks.push_back(newBlock); // Setup singly-linked list of all free items in this block. for (uint32_t i = 0; i < newBlockCapacity - 1; ++i) newBlock.pItems[i].NextFreeIndex = i + 1; newBlock.pItems[newBlockCapacity - 1].NextFreeIndex = UINT32_MAX; return m_ItemBlocks.back(); } #endif // _VMA_POOL_ALLOCATOR_FUNCTIONS #endif // _VMA_POOL_ALLOCATOR #ifndef _VMA_RAW_LIST template struct VmaListItem { VmaListItem* pPrev; VmaListItem* pNext; T Value; }; // Doubly linked list. template class VmaRawList { VMA_CLASS_NO_COPY_NO_MOVE(VmaRawList) public: typedef VmaListItem ItemType; VmaRawList(const VkAllocationCallbacks* pAllocationCallbacks); // Intentionally not calling Clear, because that would be unnecessary // computations to return all items to m_ItemAllocator as free. ~VmaRawList() = default; size_t GetCount() const { return m_Count; } bool IsEmpty() const { return m_Count == 0; } ItemType* Front() { return m_pFront; } ItemType* Back() { return m_pBack; } const ItemType* Front() const { return m_pFront; } const ItemType* Back() const { return m_pBack; } ItemType* PushFront(); ItemType* PushBack(); ItemType* PushFront(const T& value); ItemType* PushBack(const T& value); void PopFront(); void PopBack(); // Item can be null - it means PushBack. ItemType* InsertBefore(ItemType* pItem); // Item can be null - it means PushFront. ItemType* InsertAfter(ItemType* pItem); ItemType* InsertBefore(ItemType* pItem, const T& value); ItemType* InsertAfter(ItemType* pItem, const T& value); void Clear(); void Remove(ItemType* pItem); private: const VkAllocationCallbacks* const m_pAllocationCallbacks; VmaPoolAllocator m_ItemAllocator; ItemType* m_pFront; ItemType* m_pBack; size_t m_Count; }; #ifndef _VMA_RAW_LIST_FUNCTIONS template VmaRawList::VmaRawList(const VkAllocationCallbacks* pAllocationCallbacks) : m_pAllocationCallbacks(pAllocationCallbacks), m_ItemAllocator(pAllocationCallbacks, 128), m_pFront(VMA_NULL), m_pBack(VMA_NULL), m_Count(0) {} template VmaListItem* VmaRawList::PushFront() { ItemType* const pNewItem = m_ItemAllocator.Alloc(); pNewItem->pPrev = VMA_NULL; if (IsEmpty()) { pNewItem->pNext = VMA_NULL; m_pFront = pNewItem; m_pBack = pNewItem; m_Count = 1; } else { pNewItem->pNext = m_pFront; m_pFront->pPrev = pNewItem; m_pFront = pNewItem; ++m_Count; } return pNewItem; } template VmaListItem* VmaRawList::PushBack() { ItemType* const pNewItem = m_ItemAllocator.Alloc(); pNewItem->pNext = VMA_NULL; if(IsEmpty()) { pNewItem->pPrev = VMA_NULL; m_pFront = pNewItem; m_pBack = pNewItem; m_Count = 1; } else { pNewItem->pPrev = m_pBack; m_pBack->pNext = pNewItem; m_pBack = pNewItem; ++m_Count; } return pNewItem; } template VmaListItem* VmaRawList::PushFront(const T& value) { ItemType* const pNewItem = PushFront(); pNewItem->Value = value; return pNewItem; } template VmaListItem* VmaRawList::PushBack(const T& value) { ItemType* const pNewItem = PushBack(); pNewItem->Value = value; return pNewItem; } template void VmaRawList::PopFront() { VMA_HEAVY_ASSERT(m_Count > 0); ItemType* const pFrontItem = m_pFront; ItemType* const pNextItem = pFrontItem->pNext; if (pNextItem != VMA_NULL) { pNextItem->pPrev = VMA_NULL; } m_pFront = pNextItem; m_ItemAllocator.Free(pFrontItem); --m_Count; } template void VmaRawList::PopBack() { VMA_HEAVY_ASSERT(m_Count > 0); ItemType* const pBackItem = m_pBack; ItemType* const pPrevItem = pBackItem->pPrev; if(pPrevItem != VMA_NULL) { pPrevItem->pNext = VMA_NULL; } m_pBack = pPrevItem; m_ItemAllocator.Free(pBackItem); --m_Count; } template void VmaRawList::Clear() { if (IsEmpty() == false) { ItemType* pItem = m_pBack; while (pItem != VMA_NULL) { ItemType* const pPrevItem = pItem->pPrev; m_ItemAllocator.Free(pItem); pItem = pPrevItem; } m_pFront = VMA_NULL; m_pBack = VMA_NULL; m_Count = 0; } } template void VmaRawList::Remove(ItemType* pItem) { VMA_HEAVY_ASSERT(pItem != VMA_NULL); VMA_HEAVY_ASSERT(m_Count > 0); if(pItem->pPrev != VMA_NULL) { pItem->pPrev->pNext = pItem->pNext; } else { VMA_HEAVY_ASSERT(m_pFront == pItem); m_pFront = pItem->pNext; } if(pItem->pNext != VMA_NULL) { pItem->pNext->pPrev = pItem->pPrev; } else { VMA_HEAVY_ASSERT(m_pBack == pItem); m_pBack = pItem->pPrev; } m_ItemAllocator.Free(pItem); --m_Count; } template VmaListItem* VmaRawList::InsertBefore(ItemType* pItem) { if(pItem != VMA_NULL) { ItemType* const prevItem = pItem->pPrev; ItemType* const newItem = m_ItemAllocator.Alloc(); newItem->pPrev = prevItem; newItem->pNext = pItem; pItem->pPrev = newItem; if(prevItem != VMA_NULL) { prevItem->pNext = newItem; } else { VMA_HEAVY_ASSERT(m_pFront == pItem); m_pFront = newItem; } ++m_Count; return newItem; } else return PushBack(); } template VmaListItem* VmaRawList::InsertAfter(ItemType* pItem) { if(pItem != VMA_NULL) { ItemType* const nextItem = pItem->pNext; ItemType* const newItem = m_ItemAllocator.Alloc(); newItem->pNext = nextItem; newItem->pPrev = pItem; pItem->pNext = newItem; if(nextItem != VMA_NULL) { nextItem->pPrev = newItem; } else { VMA_HEAVY_ASSERT(m_pBack == pItem); m_pBack = newItem; } ++m_Count; return newItem; } else return PushFront(); } template VmaListItem* VmaRawList::InsertBefore(ItemType* pItem, const T& value) { ItemType* const newItem = InsertBefore(pItem); newItem->Value = value; return newItem; } template VmaListItem* VmaRawList::InsertAfter(ItemType* pItem, const T& value) { ItemType* const newItem = InsertAfter(pItem); newItem->Value = value; return newItem; } #endif // _VMA_RAW_LIST_FUNCTIONS #endif // _VMA_RAW_LIST #ifndef _VMA_LIST template class VmaList { VMA_CLASS_NO_COPY_NO_MOVE(VmaList) public: class reverse_iterator; class const_iterator; class const_reverse_iterator; class iterator { friend class const_iterator; friend class VmaList; public: iterator() : m_pList(VMA_NULL), m_pItem(VMA_NULL) {} iterator(const reverse_iterator& src) : m_pList(src.m_pList), m_pItem(src.m_pItem) {} T& operator*() const { VMA_HEAVY_ASSERT(m_pItem != VMA_NULL); return m_pItem->Value; } T* operator->() const { VMA_HEAVY_ASSERT(m_pItem != VMA_NULL); return &m_pItem->Value; } bool operator==(const iterator& rhs) const { VMA_HEAVY_ASSERT(m_pList == rhs.m_pList); return m_pItem == rhs.m_pItem; } bool operator!=(const iterator& rhs) const { VMA_HEAVY_ASSERT(m_pList == rhs.m_pList); return m_pItem != rhs.m_pItem; } iterator operator++(int) { iterator result = *this; ++*this; return result; } iterator operator--(int) { iterator result = *this; --*this; return result; } iterator& operator++() { VMA_HEAVY_ASSERT(m_pItem != VMA_NULL); m_pItem = m_pItem->pNext; return *this; } iterator& operator--(); private: VmaRawList* m_pList; VmaListItem* m_pItem; iterator(VmaRawList* pList, VmaListItem* pItem) : m_pList(pList), m_pItem(pItem) {} }; class reverse_iterator { friend class const_reverse_iterator; friend class VmaList; public: reverse_iterator() : m_pList(VMA_NULL), m_pItem(VMA_NULL) {} reverse_iterator(const iterator& src) : m_pList(src.m_pList), m_pItem(src.m_pItem) {} T& operator*() const { VMA_HEAVY_ASSERT(m_pItem != VMA_NULL); return m_pItem->Value; } T* operator->() const { VMA_HEAVY_ASSERT(m_pItem != VMA_NULL); return &m_pItem->Value; } bool operator==(const reverse_iterator& rhs) const { VMA_HEAVY_ASSERT(m_pList == rhs.m_pList); return m_pItem == rhs.m_pItem; } bool operator!=(const reverse_iterator& rhs) const { VMA_HEAVY_ASSERT(m_pList == rhs.m_pList); return m_pItem != rhs.m_pItem; } reverse_iterator operator++(int) { reverse_iterator result = *this; ++* this; return result; } reverse_iterator operator--(int) { reverse_iterator result = *this; --* this; return result; } reverse_iterator& operator++() { VMA_HEAVY_ASSERT(m_pItem != VMA_NULL); m_pItem = m_pItem->pPrev; return *this; } reverse_iterator& operator--(); private: VmaRawList* m_pList; VmaListItem* m_pItem; reverse_iterator(VmaRawList* pList, VmaListItem* pItem) : m_pList(pList), m_pItem(pItem) {} }; class const_iterator { friend class VmaList; public: const_iterator() : m_pList(VMA_NULL), m_pItem(VMA_NULL) {} const_iterator(const iterator& src) : m_pList(src.m_pList), m_pItem(src.m_pItem) {} const_iterator(const reverse_iterator& src) : m_pList(src.m_pList), m_pItem(src.m_pItem) {} iterator drop_const() { return { const_cast*>(m_pList), const_cast*>(m_pItem) }; } const T& operator*() const { VMA_HEAVY_ASSERT(m_pItem != VMA_NULL); return m_pItem->Value; } const T* operator->() const { VMA_HEAVY_ASSERT(m_pItem != VMA_NULL); return &m_pItem->Value; } bool operator==(const const_iterator& rhs) const { VMA_HEAVY_ASSERT(m_pList == rhs.m_pList); return m_pItem == rhs.m_pItem; } bool operator!=(const const_iterator& rhs) const { VMA_HEAVY_ASSERT(m_pList == rhs.m_pList); return m_pItem != rhs.m_pItem; } const_iterator operator++(int) { const_iterator result = *this; ++* this; return result; } const_iterator operator--(int) { const_iterator result = *this; --* this; return result; } const_iterator& operator++() { VMA_HEAVY_ASSERT(m_pItem != VMA_NULL); m_pItem = m_pItem->pNext; return *this; } const_iterator& operator--(); private: const VmaRawList* m_pList; const VmaListItem* m_pItem; const_iterator(const VmaRawList* pList, const VmaListItem* pItem) : m_pList(pList), m_pItem(pItem) {} }; class const_reverse_iterator { friend class VmaList; public: const_reverse_iterator() : m_pList(VMA_NULL), m_pItem(VMA_NULL) {} const_reverse_iterator(const reverse_iterator& src) : m_pList(src.m_pList), m_pItem(src.m_pItem) {} const_reverse_iterator(const iterator& src) : m_pList(src.m_pList), m_pItem(src.m_pItem) {} reverse_iterator drop_const() { return { const_cast*>(m_pList), const_cast*>(m_pItem) }; } const T& operator*() const { VMA_HEAVY_ASSERT(m_pItem != VMA_NULL); return m_pItem->Value; } const T* operator->() const { VMA_HEAVY_ASSERT(m_pItem != VMA_NULL); return &m_pItem->Value; } bool operator==(const const_reverse_iterator& rhs) const { VMA_HEAVY_ASSERT(m_pList == rhs.m_pList); return m_pItem == rhs.m_pItem; } bool operator!=(const const_reverse_iterator& rhs) const { VMA_HEAVY_ASSERT(m_pList == rhs.m_pList); return m_pItem != rhs.m_pItem; } const_reverse_iterator operator++(int) { const_reverse_iterator result = *this; ++* this; return result; } const_reverse_iterator operator--(int) { const_reverse_iterator result = *this; --* this; return result; } const_reverse_iterator& operator++() { VMA_HEAVY_ASSERT(m_pItem != VMA_NULL); m_pItem = m_pItem->pPrev; return *this; } const_reverse_iterator& operator--(); private: const VmaRawList* m_pList; const VmaListItem* m_pItem; const_reverse_iterator(const VmaRawList* pList, const VmaListItem* pItem) : m_pList(pList), m_pItem(pItem) {} }; VmaList(const AllocatorT& allocator) : m_RawList(allocator.m_pCallbacks) {} bool empty() const { return m_RawList.IsEmpty(); } size_t size() const { return m_RawList.GetCount(); } iterator begin() { return iterator(&m_RawList, m_RawList.Front()); } iterator end() { return iterator(&m_RawList, VMA_NULL); } const_iterator cbegin() const { return const_iterator(&m_RawList, m_RawList.Front()); } const_iterator cend() const { return const_iterator(&m_RawList, VMA_NULL); } const_iterator begin() const { return cbegin(); } const_iterator end() const { return cend(); } reverse_iterator rbegin() { return reverse_iterator(&m_RawList, m_RawList.Back()); } reverse_iterator rend() { return reverse_iterator(&m_RawList, VMA_NULL); } const_reverse_iterator crbegin() const { return const_reverse_iterator(&m_RawList, m_RawList.Back()); } const_reverse_iterator crend() const { return const_reverse_iterator(&m_RawList, VMA_NULL); } const_reverse_iterator rbegin() const { return crbegin(); } const_reverse_iterator rend() const { return crend(); } void push_back(const T& value) { m_RawList.PushBack(value); } iterator insert(iterator it, const T& value) { return iterator(&m_RawList, m_RawList.InsertBefore(it.m_pItem, value)); } void clear() { m_RawList.Clear(); } void erase(iterator it) { m_RawList.Remove(it.m_pItem); } private: VmaRawList m_RawList; }; #ifndef _VMA_LIST_FUNCTIONS template typename VmaList::iterator& VmaList::iterator::operator--() { if (m_pItem != VMA_NULL) { m_pItem = m_pItem->pPrev; } else { VMA_HEAVY_ASSERT(!m_pList->IsEmpty()); m_pItem = m_pList->Back(); } return *this; } template typename VmaList::reverse_iterator& VmaList::reverse_iterator::operator--() { if (m_pItem != VMA_NULL) { m_pItem = m_pItem->pNext; } else { VMA_HEAVY_ASSERT(!m_pList->IsEmpty()); m_pItem = m_pList->Front(); } return *this; } template typename VmaList::const_iterator& VmaList::const_iterator::operator--() { if (m_pItem != VMA_NULL) { m_pItem = m_pItem->pPrev; } else { VMA_HEAVY_ASSERT(!m_pList->IsEmpty()); m_pItem = m_pList->Back(); } return *this; } template typename VmaList::const_reverse_iterator& VmaList::const_reverse_iterator::operator--() { if (m_pItem != VMA_NULL) { m_pItem = m_pItem->pNext; } else { VMA_HEAVY_ASSERT(!m_pList->IsEmpty()); m_pItem = m_pList->Back(); } return *this; } #endif // _VMA_LIST_FUNCTIONS #endif // _VMA_LIST #ifndef _VMA_INTRUSIVE_LINKED_LIST /* Expected interface of ItemTypeTraits: struct MyItemTypeTraits { typedef MyItem ItemType; static ItemType* GetPrev(const ItemType* item) { return item->myPrevPtr; } static ItemType* GetNext(const ItemType* item) { return item->myNextPtr; } static ItemType*& AccessPrev(ItemType* item) { return item->myPrevPtr; } static ItemType*& AccessNext(ItemType* item) { return item->myNextPtr; } }; */ template class VmaIntrusiveLinkedList { public: typedef typename ItemTypeTraits::ItemType ItemType; static ItemType* GetPrev(const ItemType* item) { return ItemTypeTraits::GetPrev(item); } static ItemType* GetNext(const ItemType* item) { return ItemTypeTraits::GetNext(item); } // Movable, not copyable. VmaIntrusiveLinkedList() = default; VmaIntrusiveLinkedList(VmaIntrusiveLinkedList && src); VmaIntrusiveLinkedList(const VmaIntrusiveLinkedList&) = delete; VmaIntrusiveLinkedList& operator=(VmaIntrusiveLinkedList&& src); VmaIntrusiveLinkedList& operator=(const VmaIntrusiveLinkedList&) = delete; ~VmaIntrusiveLinkedList() { VMA_HEAVY_ASSERT(IsEmpty()); } size_t GetCount() const { return m_Count; } bool IsEmpty() const { return m_Count == 0; } ItemType* Front() { return m_Front; } ItemType* Back() { return m_Back; } const ItemType* Front() const { return m_Front; } const ItemType* Back() const { return m_Back; } void PushBack(ItemType* item); void PushFront(ItemType* item); ItemType* PopBack(); ItemType* PopFront(); // MyItem can be null - it means PushBack. void InsertBefore(ItemType* existingItem, ItemType* newItem); // MyItem can be null - it means PushFront. void InsertAfter(ItemType* existingItem, ItemType* newItem); void Remove(ItemType* item); void RemoveAll(); private: ItemType* m_Front = VMA_NULL; ItemType* m_Back = VMA_NULL; size_t m_Count = 0; }; #ifndef _VMA_INTRUSIVE_LINKED_LIST_FUNCTIONS template VmaIntrusiveLinkedList::VmaIntrusiveLinkedList(VmaIntrusiveLinkedList&& src) : m_Front(src.m_Front), m_Back(src.m_Back), m_Count(src.m_Count) { src.m_Front = src.m_Back = VMA_NULL; src.m_Count = 0; } template VmaIntrusiveLinkedList& VmaIntrusiveLinkedList::operator=(VmaIntrusiveLinkedList&& src) { if (&src != this) { VMA_HEAVY_ASSERT(IsEmpty()); m_Front = src.m_Front; m_Back = src.m_Back; m_Count = src.m_Count; src.m_Front = src.m_Back = VMA_NULL; src.m_Count = 0; } return *this; } template void VmaIntrusiveLinkedList::PushBack(ItemType* item) { VMA_HEAVY_ASSERT(ItemTypeTraits::GetPrev(item) == VMA_NULL && ItemTypeTraits::GetNext(item) == VMA_NULL); if (IsEmpty()) { m_Front = item; m_Back = item; m_Count = 1; } else { ItemTypeTraits::AccessPrev(item) = m_Back; ItemTypeTraits::AccessNext(m_Back) = item; m_Back = item; ++m_Count; } } template void VmaIntrusiveLinkedList::PushFront(ItemType* item) { VMA_HEAVY_ASSERT(ItemTypeTraits::GetPrev(item) == VMA_NULL && ItemTypeTraits::GetNext(item) == VMA_NULL); if (IsEmpty()) { m_Front = item; m_Back = item; m_Count = 1; } else { ItemTypeTraits::AccessNext(item) = m_Front; ItemTypeTraits::AccessPrev(m_Front) = item; m_Front = item; ++m_Count; } } template typename VmaIntrusiveLinkedList::ItemType* VmaIntrusiveLinkedList::PopBack() { VMA_HEAVY_ASSERT(m_Count > 0); ItemType* const backItem = m_Back; ItemType* const prevItem = ItemTypeTraits::GetPrev(backItem); if (prevItem != VMA_NULL) { ItemTypeTraits::AccessNext(prevItem) = VMA_NULL; } m_Back = prevItem; --m_Count; ItemTypeTraits::AccessPrev(backItem) = VMA_NULL; ItemTypeTraits::AccessNext(backItem) = VMA_NULL; return backItem; } template typename VmaIntrusiveLinkedList::ItemType* VmaIntrusiveLinkedList::PopFront() { VMA_HEAVY_ASSERT(m_Count > 0); ItemType* const frontItem = m_Front; ItemType* const nextItem = ItemTypeTraits::GetNext(frontItem); if (nextItem != VMA_NULL) { ItemTypeTraits::AccessPrev(nextItem) = VMA_NULL; } m_Front = nextItem; --m_Count; ItemTypeTraits::AccessPrev(frontItem) = VMA_NULL; ItemTypeTraits::AccessNext(frontItem) = VMA_NULL; return frontItem; } template void VmaIntrusiveLinkedList::InsertBefore(ItemType* existingItem, ItemType* newItem) { VMA_HEAVY_ASSERT(newItem != VMA_NULL && ItemTypeTraits::GetPrev(newItem) == VMA_NULL && ItemTypeTraits::GetNext(newItem) == VMA_NULL); if (existingItem != VMA_NULL) { ItemType* const prevItem = ItemTypeTraits::GetPrev(existingItem); ItemTypeTraits::AccessPrev(newItem) = prevItem; ItemTypeTraits::AccessNext(newItem) = existingItem; ItemTypeTraits::AccessPrev(existingItem) = newItem; if (prevItem != VMA_NULL) { ItemTypeTraits::AccessNext(prevItem) = newItem; } else { VMA_HEAVY_ASSERT(m_Front == existingItem); m_Front = newItem; } ++m_Count; } else PushBack(newItem); } template void VmaIntrusiveLinkedList::InsertAfter(ItemType* existingItem, ItemType* newItem) { VMA_HEAVY_ASSERT(newItem != VMA_NULL && ItemTypeTraits::GetPrev(newItem) == VMA_NULL && ItemTypeTraits::GetNext(newItem) == VMA_NULL); if (existingItem != VMA_NULL) { ItemType* const nextItem = ItemTypeTraits::GetNext(existingItem); ItemTypeTraits::AccessNext(newItem) = nextItem; ItemTypeTraits::AccessPrev(newItem) = existingItem; ItemTypeTraits::AccessNext(existingItem) = newItem; if (nextItem != VMA_NULL) { ItemTypeTraits::AccessPrev(nextItem) = newItem; } else { VMA_HEAVY_ASSERT(m_Back == existingItem); m_Back = newItem; } ++m_Count; } else return PushFront(newItem); } template void VmaIntrusiveLinkedList::Remove(ItemType* item) { VMA_HEAVY_ASSERT(item != VMA_NULL && m_Count > 0); if (ItemTypeTraits::GetPrev(item) != VMA_NULL) { ItemTypeTraits::AccessNext(ItemTypeTraits::AccessPrev(item)) = ItemTypeTraits::GetNext(item); } else { VMA_HEAVY_ASSERT(m_Front == item); m_Front = ItemTypeTraits::GetNext(item); } if (ItemTypeTraits::GetNext(item) != VMA_NULL) { ItemTypeTraits::AccessPrev(ItemTypeTraits::AccessNext(item)) = ItemTypeTraits::GetPrev(item); } else { VMA_HEAVY_ASSERT(m_Back == item); m_Back = ItemTypeTraits::GetPrev(item); } ItemTypeTraits::AccessPrev(item) = VMA_NULL; ItemTypeTraits::AccessNext(item) = VMA_NULL; --m_Count; } template void VmaIntrusiveLinkedList::RemoveAll() { if (!IsEmpty()) { ItemType* item = m_Back; while (item != VMA_NULL) { ItemType* const prevItem = ItemTypeTraits::AccessPrev(item); ItemTypeTraits::AccessPrev(item) = VMA_NULL; ItemTypeTraits::AccessNext(item) = VMA_NULL; item = prevItem; } m_Front = VMA_NULL; m_Back = VMA_NULL; m_Count = 0; } } #endif // _VMA_INTRUSIVE_LINKED_LIST_FUNCTIONS #endif // _VMA_INTRUSIVE_LINKED_LIST #if !defined(_VMA_STRING_BUILDER) && VMA_STATS_STRING_ENABLED class VmaStringBuilder { public: VmaStringBuilder(const VkAllocationCallbacks* allocationCallbacks) : m_Data(VmaStlAllocator(allocationCallbacks)) {} ~VmaStringBuilder() = default; size_t GetLength() const { return m_Data.size(); } const char* GetData() const { return m_Data.data(); } void AddNewLine() { Add('\n'); } void Add(char ch) { m_Data.push_back(ch); } void Add(const char* pStr); void AddNumber(uint32_t num); void AddNumber(uint64_t num); void AddPointer(const void* ptr); private: VmaVector> m_Data; }; #ifndef _VMA_STRING_BUILDER_FUNCTIONS void VmaStringBuilder::Add(const char* pStr) { const size_t strLen = strlen(pStr); if (strLen > 0) { const size_t oldCount = m_Data.size(); m_Data.resize(oldCount + strLen); memcpy(m_Data.data() + oldCount, pStr, strLen); } } void VmaStringBuilder::AddNumber(uint32_t num) { char buf[11]; buf[10] = '\0'; char* p = &buf[10]; do { *--p = '0' + (char)(num % 10); num /= 10; } while (num); Add(p); } void VmaStringBuilder::AddNumber(uint64_t num) { char buf[21]; buf[20] = '\0'; char* p = &buf[20]; do { *--p = '0' + (char)(num % 10); num /= 10; } while (num); Add(p); } void VmaStringBuilder::AddPointer(const void* ptr) { char buf[21]; VmaPtrToStr(buf, sizeof(buf), ptr); Add(buf); } #endif //_VMA_STRING_BUILDER_FUNCTIONS #endif // _VMA_STRING_BUILDER #if !defined(_VMA_JSON_WRITER) && VMA_STATS_STRING_ENABLED /* Allows to conveniently build a correct JSON document to be written to the VmaStringBuilder passed to the constructor. */ class VmaJsonWriter { VMA_CLASS_NO_COPY_NO_MOVE(VmaJsonWriter) public: // sb - string builder to write the document to. Must remain alive for the whole lifetime of this object. VmaJsonWriter(const VkAllocationCallbacks* pAllocationCallbacks, VmaStringBuilder& sb); ~VmaJsonWriter(); // Begins object by writing "{". // Inside an object, you must call pairs of WriteString and a value, e.g.: // j.BeginObject(true); j.WriteString("A"); j.WriteNumber(1); j.WriteString("B"); j.WriteNumber(2); j.EndObject(); // Will write: { "A": 1, "B": 2 } void BeginObject(bool singleLine = false); // Ends object by writing "}". void EndObject(); // Begins array by writing "[". // Inside an array, you can write a sequence of any values. void BeginArray(bool singleLine = false); // Ends array by writing "[". void EndArray(); // Writes a string value inside "". // pStr can contain any ANSI characters, including '"', new line etc. - they will be properly escaped. void WriteString(const char* pStr); // Begins writing a string value. // Call BeginString, ContinueString, ContinueString, ..., EndString instead of // WriteString to conveniently build the string content incrementally, made of // parts including numbers. void BeginString(const char* pStr = VMA_NULL); // Posts next part of an open string. void ContinueString(const char* pStr); // Posts next part of an open string. The number is converted to decimal characters. void ContinueString(uint32_t n); void ContinueString(uint64_t n); // Posts next part of an open string. Pointer value is converted to characters // using "%p" formatting - shown as hexadecimal number, e.g.: 000000081276Ad00 void ContinueString_Pointer(const void* ptr); // Ends writing a string value by writing '"'. void EndString(const char* pStr = VMA_NULL); // Writes a number value. void WriteNumber(uint32_t n); void WriteNumber(uint64_t n); // Writes a boolean value - false or true. void WriteBool(bool b); // Writes a null value. void WriteNull(); private: enum COLLECTION_TYPE { COLLECTION_TYPE_OBJECT, COLLECTION_TYPE_ARRAY, }; struct StackItem { COLLECTION_TYPE type; uint32_t valueCount; bool singleLineMode; }; static const char* const INDENT; VmaStringBuilder& m_SB; VmaVector< StackItem, VmaStlAllocator > m_Stack; bool m_InsideString; void BeginValue(bool isString); void WriteIndent(bool oneLess = false); }; const char* const VmaJsonWriter::INDENT = " "; #ifndef _VMA_JSON_WRITER_FUNCTIONS VmaJsonWriter::VmaJsonWriter(const VkAllocationCallbacks* pAllocationCallbacks, VmaStringBuilder& sb) : m_SB(sb), m_Stack(VmaStlAllocator(pAllocationCallbacks)), m_InsideString(false) {} VmaJsonWriter::~VmaJsonWriter() { VMA_ASSERT(!m_InsideString); VMA_ASSERT(m_Stack.empty()); } void VmaJsonWriter::BeginObject(bool singleLine) { VMA_ASSERT(!m_InsideString); BeginValue(false); m_SB.Add('{'); StackItem item; item.type = COLLECTION_TYPE_OBJECT; item.valueCount = 0; item.singleLineMode = singleLine; m_Stack.push_back(item); } void VmaJsonWriter::EndObject() { VMA_ASSERT(!m_InsideString); WriteIndent(true); m_SB.Add('}'); VMA_ASSERT(!m_Stack.empty() && m_Stack.back().type == COLLECTION_TYPE_OBJECT); m_Stack.pop_back(); } void VmaJsonWriter::BeginArray(bool singleLine) { VMA_ASSERT(!m_InsideString); BeginValue(false); m_SB.Add('['); StackItem item; item.type = COLLECTION_TYPE_ARRAY; item.valueCount = 0; item.singleLineMode = singleLine; m_Stack.push_back(item); } void VmaJsonWriter::EndArray() { VMA_ASSERT(!m_InsideString); WriteIndent(true); m_SB.Add(']'); VMA_ASSERT(!m_Stack.empty() && m_Stack.back().type == COLLECTION_TYPE_ARRAY); m_Stack.pop_back(); } void VmaJsonWriter::WriteString(const char* pStr) { BeginString(pStr); EndString(); } void VmaJsonWriter::BeginString(const char* pStr) { VMA_ASSERT(!m_InsideString); BeginValue(true); m_SB.Add('"'); m_InsideString = true; if (pStr != VMA_NULL && pStr[0] != '\0') { ContinueString(pStr); } } void VmaJsonWriter::ContinueString(const char* pStr) { VMA_ASSERT(m_InsideString); const size_t strLen = strlen(pStr); for (size_t i = 0; i < strLen; ++i) { char ch = pStr[i]; if (ch == '\\') { m_SB.Add("\\\\"); } else if (ch == '"') { m_SB.Add("\\\""); } else if ((uint8_t)ch >= 32) { m_SB.Add(ch); } else switch (ch) { case '\b': m_SB.Add("\\b"); break; case '\f': m_SB.Add("\\f"); break; case '\n': m_SB.Add("\\n"); break; case '\r': m_SB.Add("\\r"); break; case '\t': m_SB.Add("\\t"); break; default: VMA_ASSERT(0 && "Character not currently supported."); } } } void VmaJsonWriter::ContinueString(uint32_t n) { VMA_ASSERT(m_InsideString); m_SB.AddNumber(n); } void VmaJsonWriter::ContinueString(uint64_t n) { VMA_ASSERT(m_InsideString); m_SB.AddNumber(n); } void VmaJsonWriter::ContinueString_Pointer(const void* ptr) { VMA_ASSERT(m_InsideString); m_SB.AddPointer(ptr); } void VmaJsonWriter::EndString(const char* pStr) { VMA_ASSERT(m_InsideString); if (pStr != VMA_NULL && pStr[0] != '\0') { ContinueString(pStr); } m_SB.Add('"'); m_InsideString = false; } void VmaJsonWriter::WriteNumber(uint32_t n) { VMA_ASSERT(!m_InsideString); BeginValue(false); m_SB.AddNumber(n); } void VmaJsonWriter::WriteNumber(uint64_t n) { VMA_ASSERT(!m_InsideString); BeginValue(false); m_SB.AddNumber(n); } void VmaJsonWriter::WriteBool(bool b) { VMA_ASSERT(!m_InsideString); BeginValue(false); m_SB.Add(b ? "true" : "false"); } void VmaJsonWriter::WriteNull() { VMA_ASSERT(!m_InsideString); BeginValue(false); m_SB.Add("null"); } void VmaJsonWriter::BeginValue(bool isString) { if (!m_Stack.empty()) { StackItem& currItem = m_Stack.back(); if (currItem.type == COLLECTION_TYPE_OBJECT && currItem.valueCount % 2 == 0) { VMA_ASSERT(isString); } if (currItem.type == COLLECTION_TYPE_OBJECT && currItem.valueCount % 2 != 0) { m_SB.Add(": "); } else if (currItem.valueCount > 0) { m_SB.Add(", "); WriteIndent(); } else { WriteIndent(); } ++currItem.valueCount; } } void VmaJsonWriter::WriteIndent(bool oneLess) { if (!m_Stack.empty() && !m_Stack.back().singleLineMode) { m_SB.AddNewLine(); size_t count = m_Stack.size(); if (count > 0 && oneLess) { --count; } for (size_t i = 0; i < count; ++i) { m_SB.Add(INDENT); } } } #endif // _VMA_JSON_WRITER_FUNCTIONS static void VmaPrintDetailedStatistics(VmaJsonWriter& json, const VmaDetailedStatistics& stat) { json.BeginObject(); json.WriteString("BlockCount"); json.WriteNumber(stat.statistics.blockCount); json.WriteString("BlockBytes"); json.WriteNumber(stat.statistics.blockBytes); json.WriteString("AllocationCount"); json.WriteNumber(stat.statistics.allocationCount); json.WriteString("AllocationBytes"); json.WriteNumber(stat.statistics.allocationBytes); json.WriteString("UnusedRangeCount"); json.WriteNumber(stat.unusedRangeCount); if (stat.statistics.allocationCount > 1) { json.WriteString("AllocationSizeMin"); json.WriteNumber(stat.allocationSizeMin); json.WriteString("AllocationSizeMax"); json.WriteNumber(stat.allocationSizeMax); } if (stat.unusedRangeCount > 1) { json.WriteString("UnusedRangeSizeMin"); json.WriteNumber(stat.unusedRangeSizeMin); json.WriteString("UnusedRangeSizeMax"); json.WriteNumber(stat.unusedRangeSizeMax); } json.EndObject(); } #endif // _VMA_JSON_WRITER #ifndef _VMA_MAPPING_HYSTERESIS class VmaMappingHysteresis { VMA_CLASS_NO_COPY_NO_MOVE(VmaMappingHysteresis) public: VmaMappingHysteresis() = default; uint32_t GetExtraMapping() const { return m_ExtraMapping; } // Call when Map was called. // Returns true if switched to extra +1 mapping reference count. bool PostMap() { #if VMA_MAPPING_HYSTERESIS_ENABLED if(m_ExtraMapping == 0) { ++m_MajorCounter; if(m_MajorCounter >= COUNTER_MIN_EXTRA_MAPPING) { m_ExtraMapping = 1; m_MajorCounter = 0; m_MinorCounter = 0; return true; } } else // m_ExtraMapping == 1 PostMinorCounter(); #endif // #if VMA_MAPPING_HYSTERESIS_ENABLED return false; } // Call when Unmap was called. void PostUnmap() { #if VMA_MAPPING_HYSTERESIS_ENABLED if(m_ExtraMapping == 0) ++m_MajorCounter; else // m_ExtraMapping == 1 PostMinorCounter(); #endif // #if VMA_MAPPING_HYSTERESIS_ENABLED } // Call when allocation was made from the memory block. void PostAlloc() { #if VMA_MAPPING_HYSTERESIS_ENABLED if(m_ExtraMapping == 1) ++m_MajorCounter; else // m_ExtraMapping == 0 PostMinorCounter(); #endif // #if VMA_MAPPING_HYSTERESIS_ENABLED } // Call when allocation was freed from the memory block. // Returns true if switched to extra -1 mapping reference count. bool PostFree() { #if VMA_MAPPING_HYSTERESIS_ENABLED if(m_ExtraMapping == 1) { ++m_MajorCounter; if(m_MajorCounter >= COUNTER_MIN_EXTRA_MAPPING && m_MajorCounter > m_MinorCounter + 1) { m_ExtraMapping = 0; m_MajorCounter = 0; m_MinorCounter = 0; return true; } } else // m_ExtraMapping == 0 PostMinorCounter(); #endif // #if VMA_MAPPING_HYSTERESIS_ENABLED return false; } private: static const int32_t COUNTER_MIN_EXTRA_MAPPING = 7; uint32_t m_MinorCounter = 0; uint32_t m_MajorCounter = 0; uint32_t m_ExtraMapping = 0; // 0 or 1. void PostMinorCounter() { if(m_MinorCounter < m_MajorCounter) { ++m_MinorCounter; } else if(m_MajorCounter > 0) { --m_MajorCounter; --m_MinorCounter; } } }; #endif // _VMA_MAPPING_HYSTERESIS #if VMA_EXTERNAL_MEMORY_WIN32 class VmaWin32Handle { public: VmaWin32Handle() noexcept : m_hHandle(VMA_NULL) { } explicit VmaWin32Handle(HANDLE hHandle) noexcept : m_hHandle(hHandle) { } ~VmaWin32Handle() noexcept { if (m_hHandle != VMA_NULL) { ::CloseHandle(m_hHandle); } } VMA_CLASS_NO_COPY_NO_MOVE(VmaWin32Handle) public: // Strengthened VkResult GetHandle(VkDevice device, VkDeviceMemory memory, PFN_vkGetMemoryWin32HandleKHR pvkGetMemoryWin32HandleKHR, HANDLE hTargetProcess, bool useMutex, HANDLE* pHandle) noexcept { *pHandle = VMA_NULL; // Try to get handle first. if (m_hHandle != VMA_NULL) { *pHandle = Duplicate(hTargetProcess); return VK_SUCCESS; } VkResult res = VK_SUCCESS; // If failed, try to create it. { VmaMutexLockWrite lock(m_Mutex, useMutex); if (m_hHandle == VMA_NULL) { res = Create(device, memory, pvkGetMemoryWin32HandleKHR, &m_hHandle); } } *pHandle = Duplicate(hTargetProcess); return res; } operator bool() const noexcept { return m_hHandle != VMA_NULL; } private: // Not atomic static VkResult Create(VkDevice device, VkDeviceMemory memory, PFN_vkGetMemoryWin32HandleKHR pvkGetMemoryWin32HandleKHR, HANDLE* pHandle) noexcept { VkResult res = VK_ERROR_FEATURE_NOT_PRESENT; if (pvkGetMemoryWin32HandleKHR != VMA_NULL) { VkMemoryGetWin32HandleInfoKHR handleInfo{ }; handleInfo.sType = VK_STRUCTURE_TYPE_MEMORY_GET_WIN32_HANDLE_INFO_KHR; handleInfo.memory = memory; handleInfo.handleType = VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHR; res = pvkGetMemoryWin32HandleKHR(device, &handleInfo, pHandle); } return res; } HANDLE Duplicate(HANDLE hTargetProcess = VMA_NULL) const noexcept { if (!m_hHandle) return m_hHandle; HANDLE hCurrentProcess = ::GetCurrentProcess(); HANDLE hDupHandle = VMA_NULL; if (!::DuplicateHandle(hCurrentProcess, m_hHandle, hTargetProcess ? hTargetProcess : hCurrentProcess, &hDupHandle, 0, FALSE, DUPLICATE_SAME_ACCESS)) { VMA_ASSERT(0 && "Failed to duplicate handle."); } return hDupHandle; } private: HANDLE m_hHandle; VMA_RW_MUTEX m_Mutex; // Protects access m_Handle }; #else class VmaWin32Handle { // ABI compatibility void* placeholder = VMA_NULL; VMA_RW_MUTEX placeholder2; }; #endif // VMA_EXTERNAL_MEMORY_WIN32 #ifndef _VMA_DEVICE_MEMORY_BLOCK /* Represents a single block of device memory (`VkDeviceMemory`) with all the data about its regions (aka suballocations, #VmaAllocation), assigned and free. Thread-safety: - Access to m_pMetadata must be externally synchronized. - Map, Unmap, Bind* are synchronized internally. */ class VmaDeviceMemoryBlock { VMA_CLASS_NO_COPY_NO_MOVE(VmaDeviceMemoryBlock) public: VmaBlockMetadata* m_pMetadata; VmaDeviceMemoryBlock(VmaAllocator hAllocator); ~VmaDeviceMemoryBlock(); // Always call after construction. void Init( VmaAllocator hAllocator, VmaPool hParentPool, uint32_t newMemoryTypeIndex, VkDeviceMemory newMemory, VkDeviceSize newSize, uint32_t id, uint32_t algorithm, VkDeviceSize bufferImageGranularity); // Always call before destruction. void Destroy(VmaAllocator allocator); VmaPool GetParentPool() const { return m_hParentPool; } VkDeviceMemory GetDeviceMemory() const { return m_hMemory; } uint32_t GetMemoryTypeIndex() const { return m_MemoryTypeIndex; } uint32_t GetId() const { return m_Id; } void* GetMappedData() const { return m_pMappedData; } uint32_t GetMapRefCount() const { return m_MapCount; } // Call when allocation/free was made from m_pMetadata. // Used for m_MappingHysteresis. void PostAlloc(VmaAllocator hAllocator); void PostFree(VmaAllocator hAllocator); // Validates all data structures inside this object. If not valid, returns false. bool Validate() const; VkResult CheckCorruption(VmaAllocator hAllocator); // ppData can be null. VkResult Map(VmaAllocator hAllocator, uint32_t count, void** ppData); void Unmap(VmaAllocator hAllocator, uint32_t count); VkResult WriteMagicValueAfterAllocation(VmaAllocator hAllocator, VkDeviceSize allocOffset, VkDeviceSize allocSize); VkResult ValidateMagicValueAfterAllocation(VmaAllocator hAllocator, VkDeviceSize allocOffset, VkDeviceSize allocSize); VkResult BindBufferMemory( const VmaAllocator hAllocator, const VmaAllocation hAllocation, VkDeviceSize allocationLocalOffset, VkBuffer hBuffer, const void* pNext); VkResult BindImageMemory( const VmaAllocator hAllocator, const VmaAllocation hAllocation, VkDeviceSize allocationLocalOffset, VkImage hImage, const void* pNext); #if VMA_EXTERNAL_MEMORY_WIN32 VkResult CreateWin32Handle( const VmaAllocator hAllocator, PFN_vkGetMemoryWin32HandleKHR pvkGetMemoryWin32HandleKHR, HANDLE hTargetProcess, HANDLE* pHandle)noexcept; #endif // VMA_EXTERNAL_MEMORY_WIN32 private: VmaPool m_hParentPool; // VK_NULL_HANDLE if not belongs to custom pool. uint32_t m_MemoryTypeIndex; uint32_t m_Id; VkDeviceMemory m_hMemory; /* Protects access to m_hMemory so it is not used by multiple threads simultaneously, e.g. vkMapMemory, vkBindBufferMemory. Also protects m_MapCount, m_pMappedData. Allocations, deallocations, any change in m_pMetadata is protected by parent's VmaBlockVector::m_Mutex. */ VMA_MUTEX m_MapAndBindMutex; VmaMappingHysteresis m_MappingHysteresis; uint32_t m_MapCount; void* m_pMappedData; VmaWin32Handle m_Handle; }; #endif // _VMA_DEVICE_MEMORY_BLOCK #ifndef _VMA_ALLOCATION_T struct VmaAllocationExtraData { void* m_pMappedData = VMA_NULL; // Not null means memory is mapped. VmaWin32Handle m_Handle; }; struct VmaAllocation_T { friend struct VmaDedicatedAllocationListItemTraits; enum FLAGS { FLAG_PERSISTENT_MAP = 0x01, FLAG_MAPPING_ALLOWED = 0x02, }; public: enum ALLOCATION_TYPE { ALLOCATION_TYPE_NONE, ALLOCATION_TYPE_BLOCK, ALLOCATION_TYPE_DEDICATED, }; // This struct is allocated using VmaPoolAllocator. VmaAllocation_T(bool mappingAllowed); ~VmaAllocation_T(); void InitBlockAllocation( VmaDeviceMemoryBlock* block, VmaAllocHandle allocHandle, VkDeviceSize alignment, VkDeviceSize size, uint32_t memoryTypeIndex, VmaSuballocationType suballocationType, bool mapped); // pMappedData not null means allocation is created with MAPPED flag. void InitDedicatedAllocation( VmaAllocator allocator, VmaPool hParentPool, uint32_t memoryTypeIndex, VkDeviceMemory hMemory, VmaSuballocationType suballocationType, void* pMappedData, VkDeviceSize size); void Destroy(VmaAllocator allocator); ALLOCATION_TYPE GetType() const { return (ALLOCATION_TYPE)m_Type; } VkDeviceSize GetAlignment() const { return m_Alignment; } VkDeviceSize GetSize() const { return m_Size; } void* GetUserData() const { return m_pUserData; } const char* GetName() const { return m_pName; } VmaSuballocationType GetSuballocationType() const { return (VmaSuballocationType)m_SuballocationType; } VmaDeviceMemoryBlock* GetBlock() const { VMA_ASSERT(m_Type == ALLOCATION_TYPE_BLOCK); return m_BlockAllocation.m_Block; } uint32_t GetMemoryTypeIndex() const { return m_MemoryTypeIndex; } bool IsPersistentMap() const { return (m_Flags & FLAG_PERSISTENT_MAP) != 0; } bool IsMappingAllowed() const { return (m_Flags & FLAG_MAPPING_ALLOWED) != 0; } void SetUserData(VmaAllocator hAllocator, void* pUserData) { m_pUserData = pUserData; } void SetName(VmaAllocator hAllocator, const char* pName); void FreeName(VmaAllocator hAllocator); uint8_t SwapBlockAllocation(VmaAllocator hAllocator, VmaAllocation allocation); VmaAllocHandle GetAllocHandle() const; VkDeviceSize GetOffset() const; VmaPool GetParentPool() const; VkDeviceMemory GetMemory() const; void* GetMappedData() const; void BlockAllocMap(); void BlockAllocUnmap(); VkResult DedicatedAllocMap(VmaAllocator hAllocator, void** ppData); void DedicatedAllocUnmap(VmaAllocator hAllocator); #if VMA_STATS_STRING_ENABLED VmaBufferImageUsage GetBufferImageUsage() const { return m_BufferImageUsage; } void InitBufferUsage(const VkBufferCreateInfo &createInfo, bool useKhrMaintenance5) { VMA_ASSERT(m_BufferImageUsage == VmaBufferImageUsage::UNKNOWN); m_BufferImageUsage = VmaBufferImageUsage(createInfo, useKhrMaintenance5); } void InitImageUsage(const VkImageCreateInfo &createInfo) { VMA_ASSERT(m_BufferImageUsage == VmaBufferImageUsage::UNKNOWN); m_BufferImageUsage = VmaBufferImageUsage(createInfo); } void PrintParameters(class VmaJsonWriter& json) const; #endif #if VMA_EXTERNAL_MEMORY_WIN32 VkResult GetWin32Handle(VmaAllocator hAllocator, HANDLE hTargetProcess, HANDLE* hHandle) noexcept; #endif // VMA_EXTERNAL_MEMORY_WIN32 private: // Allocation out of VmaDeviceMemoryBlock. struct BlockAllocation { VmaDeviceMemoryBlock* m_Block; VmaAllocHandle m_AllocHandle; }; // Allocation for an object that has its own private VkDeviceMemory. struct DedicatedAllocation { VmaPool m_hParentPool; // VK_NULL_HANDLE if not belongs to custom pool. VkDeviceMemory m_hMemory; VmaAllocationExtraData* m_ExtraData; VmaAllocation_T* m_Prev; VmaAllocation_T* m_Next; }; union { // Allocation out of VmaDeviceMemoryBlock. BlockAllocation m_BlockAllocation; // Allocation for an object that has its own private VkDeviceMemory. DedicatedAllocation m_DedicatedAllocation; }; VkDeviceSize m_Alignment; VkDeviceSize m_Size; void* m_pUserData; char* m_pName; uint32_t m_MemoryTypeIndex; uint8_t m_Type; // ALLOCATION_TYPE uint8_t m_SuballocationType; // VmaSuballocationType // Reference counter for vmaMapMemory()/vmaUnmapMemory(). uint8_t m_MapCount; uint8_t m_Flags; // enum FLAGS #if VMA_STATS_STRING_ENABLED VmaBufferImageUsage m_BufferImageUsage; // 0 if unknown. #endif void EnsureExtraData(VmaAllocator hAllocator); }; #endif // _VMA_ALLOCATION_T #ifndef _VMA_DEDICATED_ALLOCATION_LIST_ITEM_TRAITS struct VmaDedicatedAllocationListItemTraits { typedef VmaAllocation_T ItemType; static ItemType* GetPrev(const ItemType* item) { VMA_HEAVY_ASSERT(item->GetType() == VmaAllocation_T::ALLOCATION_TYPE_DEDICATED); return item->m_DedicatedAllocation.m_Prev; } static ItemType* GetNext(const ItemType* item) { VMA_HEAVY_ASSERT(item->GetType() == VmaAllocation_T::ALLOCATION_TYPE_DEDICATED); return item->m_DedicatedAllocation.m_Next; } static ItemType*& AccessPrev(ItemType* item) { VMA_HEAVY_ASSERT(item->GetType() == VmaAllocation_T::ALLOCATION_TYPE_DEDICATED); return item->m_DedicatedAllocation.m_Prev; } static ItemType*& AccessNext(ItemType* item) { VMA_HEAVY_ASSERT(item->GetType() == VmaAllocation_T::ALLOCATION_TYPE_DEDICATED); return item->m_DedicatedAllocation.m_Next; } }; #endif // _VMA_DEDICATED_ALLOCATION_LIST_ITEM_TRAITS #ifndef _VMA_DEDICATED_ALLOCATION_LIST /* Stores linked list of VmaAllocation_T objects. Thread-safe, synchronized internally. */ class VmaDedicatedAllocationList { VMA_CLASS_NO_COPY_NO_MOVE(VmaDedicatedAllocationList) public: VmaDedicatedAllocationList() {} ~VmaDedicatedAllocationList(); void Init(bool useMutex) { m_UseMutex = useMutex; } bool Validate(); void AddDetailedStatistics(VmaDetailedStatistics& inoutStats); void AddStatistics(VmaStatistics& inoutStats); #if VMA_STATS_STRING_ENABLED // Writes JSON array with the list of allocations. void BuildStatsString(VmaJsonWriter& json); #endif bool IsEmpty(); void Register(VmaAllocation alloc); void Unregister(VmaAllocation alloc); private: typedef VmaIntrusiveLinkedList DedicatedAllocationLinkedList; bool m_UseMutex = true; VMA_RW_MUTEX m_Mutex; DedicatedAllocationLinkedList m_AllocationList; }; #ifndef _VMA_DEDICATED_ALLOCATION_LIST_FUNCTIONS VmaDedicatedAllocationList::~VmaDedicatedAllocationList() { VMA_HEAVY_ASSERT(Validate()); if (!m_AllocationList.IsEmpty()) { VMA_ASSERT_LEAK(false && "Unfreed dedicated allocations found!"); } } bool VmaDedicatedAllocationList::Validate() { const size_t declaredCount = m_AllocationList.GetCount(); size_t actualCount = 0; VmaMutexLockRead lock(m_Mutex, m_UseMutex); for (VmaAllocation alloc = m_AllocationList.Front(); alloc != VMA_NULL; alloc = m_AllocationList.GetNext(alloc)) { ++actualCount; } VMA_VALIDATE(actualCount == declaredCount); return true; } void VmaDedicatedAllocationList::AddDetailedStatistics(VmaDetailedStatistics& inoutStats) { for(auto* item = m_AllocationList.Front(); item != VMA_NULL; item = DedicatedAllocationLinkedList::GetNext(item)) { const VkDeviceSize size = item->GetSize(); inoutStats.statistics.blockCount++; inoutStats.statistics.blockBytes += size; VmaAddDetailedStatisticsAllocation(inoutStats, item->GetSize()); } } void VmaDedicatedAllocationList::AddStatistics(VmaStatistics& inoutStats) { VmaMutexLockRead lock(m_Mutex, m_UseMutex); const uint32_t allocCount = (uint32_t)m_AllocationList.GetCount(); inoutStats.blockCount += allocCount; inoutStats.allocationCount += allocCount; for(auto* item = m_AllocationList.Front(); item != VMA_NULL; item = DedicatedAllocationLinkedList::GetNext(item)) { const VkDeviceSize size = item->GetSize(); inoutStats.blockBytes += size; inoutStats.allocationBytes += size; } } #if VMA_STATS_STRING_ENABLED void VmaDedicatedAllocationList::BuildStatsString(VmaJsonWriter& json) { VmaMutexLockRead lock(m_Mutex, m_UseMutex); json.BeginArray(); for (VmaAllocation alloc = m_AllocationList.Front(); alloc != VMA_NULL; alloc = m_AllocationList.GetNext(alloc)) { json.BeginObject(true); alloc->PrintParameters(json); json.EndObject(); } json.EndArray(); } #endif // VMA_STATS_STRING_ENABLED bool VmaDedicatedAllocationList::IsEmpty() { VmaMutexLockRead lock(m_Mutex, m_UseMutex); return m_AllocationList.IsEmpty(); } void VmaDedicatedAllocationList::Register(VmaAllocation alloc) { VmaMutexLockWrite lock(m_Mutex, m_UseMutex); m_AllocationList.PushBack(alloc); } void VmaDedicatedAllocationList::Unregister(VmaAllocation alloc) { VmaMutexLockWrite lock(m_Mutex, m_UseMutex); m_AllocationList.Remove(alloc); } #endif // _VMA_DEDICATED_ALLOCATION_LIST_FUNCTIONS #endif // _VMA_DEDICATED_ALLOCATION_LIST #ifndef _VMA_SUBALLOCATION /* Represents a region of VmaDeviceMemoryBlock that is either assigned and returned as allocated memory block or free. */ struct VmaSuballocation { VkDeviceSize offset; VkDeviceSize size; void* userData; VmaSuballocationType type; }; // Comparator for offsets. struct VmaSuballocationOffsetLess { bool operator()(const VmaSuballocation& lhs, const VmaSuballocation& rhs) const { return lhs.offset < rhs.offset; } }; struct VmaSuballocationOffsetGreater { bool operator()(const VmaSuballocation& lhs, const VmaSuballocation& rhs) const { return lhs.offset > rhs.offset; } }; struct VmaSuballocationItemSizeLess { bool operator()(const VmaSuballocationList::iterator lhs, const VmaSuballocationList::iterator rhs) const { return lhs->size < rhs->size; } bool operator()(const VmaSuballocationList::iterator lhs, VkDeviceSize rhsSize) const { return lhs->size < rhsSize; } }; #endif // _VMA_SUBALLOCATION #ifndef _VMA_ALLOCATION_REQUEST /* Parameters of planned allocation inside a VmaDeviceMemoryBlock. item points to a FREE suballocation. */ struct VmaAllocationRequest { VmaAllocHandle allocHandle; VkDeviceSize size; VmaSuballocationList::iterator item; void* customData; uint64_t algorithmData; VmaAllocationRequestType type; }; #endif // _VMA_ALLOCATION_REQUEST #ifndef _VMA_BLOCK_METADATA /* Data structure used for bookkeeping of allocations and unused ranges of memory in a single VkDeviceMemory block. */ class VmaBlockMetadata { VMA_CLASS_NO_COPY_NO_MOVE(VmaBlockMetadata) public: // pAllocationCallbacks, if not null, must be owned externally - alive and unchanged for the whole lifetime of this object. VmaBlockMetadata(const VkAllocationCallbacks* pAllocationCallbacks, VkDeviceSize bufferImageGranularity, bool isVirtual); virtual ~VmaBlockMetadata() = default; virtual void Init(VkDeviceSize size) { m_Size = size; } bool IsVirtual() const { return m_IsVirtual; } VkDeviceSize GetSize() const { return m_Size; } // Validates all data structures inside this object. If not valid, returns false. virtual bool Validate() const = 0; virtual size_t GetAllocationCount() const = 0; virtual size_t GetFreeRegionsCount() const = 0; virtual VkDeviceSize GetSumFreeSize() const = 0; // Returns true if this block is empty - contains only single free suballocation. virtual bool IsEmpty() const = 0; virtual void GetAllocationInfo(VmaAllocHandle allocHandle, VmaVirtualAllocationInfo& outInfo) = 0; virtual VkDeviceSize GetAllocationOffset(VmaAllocHandle allocHandle) const = 0; virtual void* GetAllocationUserData(VmaAllocHandle allocHandle) const = 0; virtual VmaAllocHandle GetAllocationListBegin() const = 0; virtual VmaAllocHandle GetNextAllocation(VmaAllocHandle prevAlloc) const = 0; virtual VkDeviceSize GetNextFreeRegionSize(VmaAllocHandle alloc) const = 0; // Shouldn't modify blockCount. virtual void AddDetailedStatistics(VmaDetailedStatistics& inoutStats) const = 0; virtual void AddStatistics(VmaStatistics& inoutStats) const = 0; #if VMA_STATS_STRING_ENABLED virtual void PrintDetailedMap(class VmaJsonWriter& json) const = 0; #endif // Tries to find a place for suballocation with given parameters inside this block. // If succeeded, fills pAllocationRequest and returns true. // If failed, returns false. virtual bool CreateAllocationRequest( VkDeviceSize allocSize, VkDeviceSize allocAlignment, bool upperAddress, VmaSuballocationType allocType, // Always one of VMA_ALLOCATION_CREATE_STRATEGY_* or VMA_ALLOCATION_INTERNAL_STRATEGY_* flags. uint32_t strategy, VmaAllocationRequest* pAllocationRequest) = 0; virtual VkResult CheckCorruption(const void* pBlockData) = 0; // Makes actual allocation based on request. Request must already be checked and valid. virtual void Alloc( const VmaAllocationRequest& request, VmaSuballocationType type, void* userData) = 0; // Frees suballocation assigned to given memory region. virtual void Free(VmaAllocHandle allocHandle) = 0; // Frees all allocations. // Careful! Don't call it if there are VmaAllocation objects owned by userData of cleared allocations! virtual void Clear() = 0; virtual void SetAllocationUserData(VmaAllocHandle allocHandle, void* userData) = 0; virtual void DebugLogAllAllocations() const = 0; protected: const VkAllocationCallbacks* GetAllocationCallbacks() const { return m_pAllocationCallbacks; } VkDeviceSize GetBufferImageGranularity() const { return m_BufferImageGranularity; } VkDeviceSize GetDebugMargin() const { return VkDeviceSize(IsVirtual() ? 0 : VMA_DEBUG_MARGIN); } void DebugLogAllocation(VkDeviceSize offset, VkDeviceSize size, void* userData) const; #if VMA_STATS_STRING_ENABLED // mapRefCount == UINT32_MAX means unspecified. void PrintDetailedMap_Begin(class VmaJsonWriter& json, VkDeviceSize unusedBytes, size_t allocationCount, size_t unusedRangeCount) const; void PrintDetailedMap_Allocation(class VmaJsonWriter& json, VkDeviceSize offset, VkDeviceSize size, void* userData) const; void PrintDetailedMap_UnusedRange(class VmaJsonWriter& json, VkDeviceSize offset, VkDeviceSize size) const; void PrintDetailedMap_End(class VmaJsonWriter& json) const; #endif private: VkDeviceSize m_Size; const VkAllocationCallbacks* m_pAllocationCallbacks; const VkDeviceSize m_BufferImageGranularity; const bool m_IsVirtual; }; #ifndef _VMA_BLOCK_METADATA_FUNCTIONS VmaBlockMetadata::VmaBlockMetadata(const VkAllocationCallbacks* pAllocationCallbacks, VkDeviceSize bufferImageGranularity, bool isVirtual) : m_Size(0), m_pAllocationCallbacks(pAllocationCallbacks), m_BufferImageGranularity(bufferImageGranularity), m_IsVirtual(isVirtual) {} void VmaBlockMetadata::DebugLogAllocation(VkDeviceSize offset, VkDeviceSize size, void* userData) const { if (IsVirtual()) { VMA_LEAK_LOG_FORMAT("UNFREED VIRTUAL ALLOCATION; Offset: %" PRIu64 "; Size: %" PRIu64 "; UserData: %p", offset, size, userData); } else { VMA_ASSERT(userData != VMA_NULL); VmaAllocation allocation = reinterpret_cast(userData); userData = allocation->GetUserData(); const char* name = allocation->GetName(); #if VMA_STATS_STRING_ENABLED VMA_LEAK_LOG_FORMAT("UNFREED ALLOCATION; Offset: %" PRIu64 "; Size: %" PRIu64 "; UserData: %p; Name: %s; Type: %s; Usage: %" PRIu64, offset, size, userData, name ? name : "vma_empty", VMA_SUBALLOCATION_TYPE_NAMES[allocation->GetSuballocationType()], (uint64_t)allocation->GetBufferImageUsage().Value); #else VMA_LEAK_LOG_FORMAT("UNFREED ALLOCATION; Offset: %" PRIu64 "; Size: %" PRIu64 "; UserData: %p; Name: %s; Type: %u", offset, size, userData, name ? name : "vma_empty", (unsigned)allocation->GetSuballocationType()); #endif // VMA_STATS_STRING_ENABLED } } #if VMA_STATS_STRING_ENABLED void VmaBlockMetadata::PrintDetailedMap_Begin(class VmaJsonWriter& json, VkDeviceSize unusedBytes, size_t allocationCount, size_t unusedRangeCount) const { json.WriteString("TotalBytes"); json.WriteNumber(GetSize()); json.WriteString("UnusedBytes"); json.WriteNumber(unusedBytes); json.WriteString("Allocations"); json.WriteNumber((uint64_t)allocationCount); json.WriteString("UnusedRanges"); json.WriteNumber((uint64_t)unusedRangeCount); json.WriteString("Suballocations"); json.BeginArray(); } void VmaBlockMetadata::PrintDetailedMap_Allocation(class VmaJsonWriter& json, VkDeviceSize offset, VkDeviceSize size, void* userData) const { json.BeginObject(true); json.WriteString("Offset"); json.WriteNumber(offset); if (IsVirtual()) { json.WriteString("Size"); json.WriteNumber(size); if (userData) { json.WriteString("CustomData"); json.BeginString(); json.ContinueString_Pointer(userData); json.EndString(); } } else { ((VmaAllocation)userData)->PrintParameters(json); } json.EndObject(); } void VmaBlockMetadata::PrintDetailedMap_UnusedRange(class VmaJsonWriter& json, VkDeviceSize offset, VkDeviceSize size) const { json.BeginObject(true); json.WriteString("Offset"); json.WriteNumber(offset); json.WriteString("Type"); json.WriteString(VMA_SUBALLOCATION_TYPE_NAMES[VMA_SUBALLOCATION_TYPE_FREE]); json.WriteString("Size"); json.WriteNumber(size); json.EndObject(); } void VmaBlockMetadata::PrintDetailedMap_End(class VmaJsonWriter& json) const { json.EndArray(); } #endif // VMA_STATS_STRING_ENABLED #endif // _VMA_BLOCK_METADATA_FUNCTIONS #endif // _VMA_BLOCK_METADATA #ifndef _VMA_BLOCK_BUFFER_IMAGE_GRANULARITY // Before deleting object of this class remember to call 'Destroy()' class VmaBlockBufferImageGranularity final { public: struct ValidationContext { const VkAllocationCallbacks* allocCallbacks; uint16_t* pageAllocs; }; VmaBlockBufferImageGranularity(VkDeviceSize bufferImageGranularity); ~VmaBlockBufferImageGranularity(); bool IsEnabled() const { return m_BufferImageGranularity > MAX_LOW_BUFFER_IMAGE_GRANULARITY; } void Init(const VkAllocationCallbacks* pAllocationCallbacks, VkDeviceSize size); // Before destroying object you must call free it's memory void Destroy(const VkAllocationCallbacks* pAllocationCallbacks); void RoundupAllocRequest(VmaSuballocationType allocType, VkDeviceSize& inOutAllocSize, VkDeviceSize& inOutAllocAlignment) const; bool CheckConflictAndAlignUp(VkDeviceSize& inOutAllocOffset, VkDeviceSize allocSize, VkDeviceSize blockOffset, VkDeviceSize blockSize, VmaSuballocationType allocType) const; void AllocPages(uint8_t allocType, VkDeviceSize offset, VkDeviceSize size); void FreePages(VkDeviceSize offset, VkDeviceSize size); void Clear(); ValidationContext StartValidation(const VkAllocationCallbacks* pAllocationCallbacks, bool isVirutal) const; bool Validate(ValidationContext& ctx, VkDeviceSize offset, VkDeviceSize size) const; bool FinishValidation(ValidationContext& ctx) const; private: static const uint16_t MAX_LOW_BUFFER_IMAGE_GRANULARITY = 256; struct RegionInfo { uint8_t allocType; uint16_t allocCount; }; VkDeviceSize m_BufferImageGranularity; uint32_t m_RegionCount; RegionInfo* m_RegionInfo; uint32_t GetStartPage(VkDeviceSize offset) const { return OffsetToPageIndex(offset & ~(m_BufferImageGranularity - 1)); } uint32_t GetEndPage(VkDeviceSize offset, VkDeviceSize size) const { return OffsetToPageIndex((offset + size - 1) & ~(m_BufferImageGranularity - 1)); } uint32_t OffsetToPageIndex(VkDeviceSize offset) const; void AllocPage(RegionInfo& page, uint8_t allocType); }; #ifndef _VMA_BLOCK_BUFFER_IMAGE_GRANULARITY_FUNCTIONS VmaBlockBufferImageGranularity::VmaBlockBufferImageGranularity(VkDeviceSize bufferImageGranularity) : m_BufferImageGranularity(bufferImageGranularity), m_RegionCount(0), m_RegionInfo(VMA_NULL) {} VmaBlockBufferImageGranularity::~VmaBlockBufferImageGranularity() { VMA_ASSERT(m_RegionInfo == VMA_NULL && "Free not called before destroying object!"); } void VmaBlockBufferImageGranularity::Init(const VkAllocationCallbacks* pAllocationCallbacks, VkDeviceSize size) { if (IsEnabled()) { m_RegionCount = static_cast(VmaDivideRoundingUp(size, m_BufferImageGranularity)); m_RegionInfo = vma_new_array(pAllocationCallbacks, RegionInfo, m_RegionCount); memset(m_RegionInfo, 0, m_RegionCount * sizeof(RegionInfo)); } } void VmaBlockBufferImageGranularity::Destroy(const VkAllocationCallbacks* pAllocationCallbacks) { if (m_RegionInfo) { vma_delete_array(pAllocationCallbacks, m_RegionInfo, m_RegionCount); m_RegionInfo = VMA_NULL; } } void VmaBlockBufferImageGranularity::RoundupAllocRequest(VmaSuballocationType allocType, VkDeviceSize& inOutAllocSize, VkDeviceSize& inOutAllocAlignment) const { if (m_BufferImageGranularity > 1 && m_BufferImageGranularity <= MAX_LOW_BUFFER_IMAGE_GRANULARITY) { if (allocType == VMA_SUBALLOCATION_TYPE_UNKNOWN || allocType == VMA_SUBALLOCATION_TYPE_IMAGE_UNKNOWN || allocType == VMA_SUBALLOCATION_TYPE_IMAGE_OPTIMAL) { inOutAllocAlignment = VMA_MAX(inOutAllocAlignment, m_BufferImageGranularity); inOutAllocSize = VmaAlignUp(inOutAllocSize, m_BufferImageGranularity); } } } bool VmaBlockBufferImageGranularity::CheckConflictAndAlignUp(VkDeviceSize& inOutAllocOffset, VkDeviceSize allocSize, VkDeviceSize blockOffset, VkDeviceSize blockSize, VmaSuballocationType allocType) const { if (IsEnabled()) { uint32_t startPage = GetStartPage(inOutAllocOffset); if (m_RegionInfo[startPage].allocCount > 0 && VmaIsBufferImageGranularityConflict(static_cast(m_RegionInfo[startPage].allocType), allocType)) { inOutAllocOffset = VmaAlignUp(inOutAllocOffset, m_BufferImageGranularity); if (blockSize < allocSize + inOutAllocOffset - blockOffset) return true; ++startPage; } uint32_t endPage = GetEndPage(inOutAllocOffset, allocSize); if (endPage != startPage && m_RegionInfo[endPage].allocCount > 0 && VmaIsBufferImageGranularityConflict(static_cast(m_RegionInfo[endPage].allocType), allocType)) { return true; } } return false; } void VmaBlockBufferImageGranularity::AllocPages(uint8_t allocType, VkDeviceSize offset, VkDeviceSize size) { if (IsEnabled()) { uint32_t startPage = GetStartPage(offset); AllocPage(m_RegionInfo[startPage], allocType); uint32_t endPage = GetEndPage(offset, size); if (startPage != endPage) AllocPage(m_RegionInfo[endPage], allocType); } } void VmaBlockBufferImageGranularity::FreePages(VkDeviceSize offset, VkDeviceSize size) { if (IsEnabled()) { uint32_t startPage = GetStartPage(offset); --m_RegionInfo[startPage].allocCount; if (m_RegionInfo[startPage].allocCount == 0) m_RegionInfo[startPage].allocType = VMA_SUBALLOCATION_TYPE_FREE; uint32_t endPage = GetEndPage(offset, size); if (startPage != endPage) { --m_RegionInfo[endPage].allocCount; if (m_RegionInfo[endPage].allocCount == 0) m_RegionInfo[endPage].allocType = VMA_SUBALLOCATION_TYPE_FREE; } } } void VmaBlockBufferImageGranularity::Clear() { if (m_RegionInfo) memset(m_RegionInfo, 0, m_RegionCount * sizeof(RegionInfo)); } VmaBlockBufferImageGranularity::ValidationContext VmaBlockBufferImageGranularity::StartValidation( const VkAllocationCallbacks* pAllocationCallbacks, bool isVirutal) const { ValidationContext ctx{ pAllocationCallbacks, VMA_NULL }; if (!isVirutal && IsEnabled()) { ctx.pageAllocs = vma_new_array(pAllocationCallbacks, uint16_t, m_RegionCount); memset(ctx.pageAllocs, 0, m_RegionCount * sizeof(uint16_t)); } return ctx; } bool VmaBlockBufferImageGranularity::Validate(ValidationContext& ctx, VkDeviceSize offset, VkDeviceSize size) const { if (IsEnabled()) { uint32_t start = GetStartPage(offset); ++ctx.pageAllocs[start]; VMA_VALIDATE(m_RegionInfo[start].allocCount > 0); uint32_t end = GetEndPage(offset, size); if (start != end) { ++ctx.pageAllocs[end]; VMA_VALIDATE(m_RegionInfo[end].allocCount > 0); } } return true; } bool VmaBlockBufferImageGranularity::FinishValidation(ValidationContext& ctx) const { // Check proper page structure if (IsEnabled()) { VMA_ASSERT(ctx.pageAllocs != VMA_NULL && "Validation context not initialized!"); for (uint32_t page = 0; page < m_RegionCount; ++page) { VMA_VALIDATE(ctx.pageAllocs[page] == m_RegionInfo[page].allocCount); } vma_delete_array(ctx.allocCallbacks, ctx.pageAllocs, m_RegionCount); ctx.pageAllocs = VMA_NULL; } return true; } uint32_t VmaBlockBufferImageGranularity::OffsetToPageIndex(VkDeviceSize offset) const { return static_cast(offset >> VMA_BITSCAN_MSB(m_BufferImageGranularity)); } void VmaBlockBufferImageGranularity::AllocPage(RegionInfo& page, uint8_t allocType) { // When current alloc type is free then it can be overridden by new type if (page.allocCount == 0 || (page.allocCount > 0 && page.allocType == VMA_SUBALLOCATION_TYPE_FREE)) page.allocType = allocType; ++page.allocCount; } #endif // _VMA_BLOCK_BUFFER_IMAGE_GRANULARITY_FUNCTIONS #endif // _VMA_BLOCK_BUFFER_IMAGE_GRANULARITY #ifndef _VMA_BLOCK_METADATA_LINEAR /* Allocations and their references in internal data structure look like this: if(m_2ndVectorMode == SECOND_VECTOR_EMPTY): 0 +-------+ | | | | | | +-------+ | Alloc | 1st[m_1stNullItemsBeginCount] +-------+ | Alloc | 1st[m_1stNullItemsBeginCount + 1] +-------+ | ... | +-------+ | Alloc | 1st[1st.size() - 1] +-------+ | | | | | | GetSize() +-------+ if(m_2ndVectorMode == SECOND_VECTOR_RING_BUFFER): 0 +-------+ | Alloc | 2nd[0] +-------+ | Alloc | 2nd[1] +-------+ | ... | +-------+ | Alloc | 2nd[2nd.size() - 1] +-------+ | | | | | | +-------+ | Alloc | 1st[m_1stNullItemsBeginCount] +-------+ | Alloc | 1st[m_1stNullItemsBeginCount + 1] +-------+ | ... | +-------+ | Alloc | 1st[1st.size() - 1] +-------+ | | GetSize() +-------+ if(m_2ndVectorMode == SECOND_VECTOR_DOUBLE_STACK): 0 +-------+ | | | | | | +-------+ | Alloc | 1st[m_1stNullItemsBeginCount] +-------+ | Alloc | 1st[m_1stNullItemsBeginCount + 1] +-------+ | ... | +-------+ | Alloc | 1st[1st.size() - 1] +-------+ | | | | | | +-------+ | Alloc | 2nd[2nd.size() - 1] +-------+ | ... | +-------+ | Alloc | 2nd[1] +-------+ | Alloc | 2nd[0] GetSize() +-------+ */ class VmaBlockMetadata_Linear : public VmaBlockMetadata { VMA_CLASS_NO_COPY_NO_MOVE(VmaBlockMetadata_Linear) public: VmaBlockMetadata_Linear(const VkAllocationCallbacks* pAllocationCallbacks, VkDeviceSize bufferImageGranularity, bool isVirtual); virtual ~VmaBlockMetadata_Linear() = default; VkDeviceSize GetSumFreeSize() const override { return m_SumFreeSize; } bool IsEmpty() const override { return GetAllocationCount() == 0; } VkDeviceSize GetAllocationOffset(VmaAllocHandle allocHandle) const override { return (VkDeviceSize)allocHandle - 1; } void Init(VkDeviceSize size) override; bool Validate() const override; size_t GetAllocationCount() const override; size_t GetFreeRegionsCount() const override; void AddDetailedStatistics(VmaDetailedStatistics& inoutStats) const override; void AddStatistics(VmaStatistics& inoutStats) const override; #if VMA_STATS_STRING_ENABLED void PrintDetailedMap(class VmaJsonWriter& json) const override; #endif bool CreateAllocationRequest( VkDeviceSize allocSize, VkDeviceSize allocAlignment, bool upperAddress, VmaSuballocationType allocType, uint32_t strategy, VmaAllocationRequest* pAllocationRequest) override; VkResult CheckCorruption(const void* pBlockData) override; void Alloc( const VmaAllocationRequest& request, VmaSuballocationType type, void* userData) override; void Free(VmaAllocHandle allocHandle) override; void GetAllocationInfo(VmaAllocHandle allocHandle, VmaVirtualAllocationInfo& outInfo) override; void* GetAllocationUserData(VmaAllocHandle allocHandle) const override; VmaAllocHandle GetAllocationListBegin() const override; VmaAllocHandle GetNextAllocation(VmaAllocHandle prevAlloc) const override; VkDeviceSize GetNextFreeRegionSize(VmaAllocHandle alloc) const override; void Clear() override; void SetAllocationUserData(VmaAllocHandle allocHandle, void* userData) override; void DebugLogAllAllocations() const override; private: /* There are two suballocation vectors, used in ping-pong way. The one with index m_1stVectorIndex is called 1st. The one with index (m_1stVectorIndex ^ 1) is called 2nd. 2nd can be non-empty only when 1st is not empty. When 2nd is not empty, m_2ndVectorMode indicates its mode of operation. */ typedef VmaVector> SuballocationVectorType; enum SECOND_VECTOR_MODE { SECOND_VECTOR_EMPTY, /* Suballocations in 2nd vector are created later than the ones in 1st, but they all have smaller offset. */ SECOND_VECTOR_RING_BUFFER, /* Suballocations in 2nd vector are upper side of double stack. They all have offsets higher than those in 1st vector. Top of this stack means smaller offsets, but higher indices in this vector. */ SECOND_VECTOR_DOUBLE_STACK, }; VkDeviceSize m_SumFreeSize; SuballocationVectorType m_Suballocations0, m_Suballocations1; uint32_t m_1stVectorIndex; SECOND_VECTOR_MODE m_2ndVectorMode; // Number of items in 1st vector with hAllocation = null at the beginning. size_t m_1stNullItemsBeginCount; // Number of other items in 1st vector with hAllocation = null somewhere in the middle. size_t m_1stNullItemsMiddleCount; // Number of items in 2nd vector with hAllocation = null. size_t m_2ndNullItemsCount; SuballocationVectorType& AccessSuballocations1st() { return m_1stVectorIndex ? m_Suballocations1 : m_Suballocations0; } SuballocationVectorType& AccessSuballocations2nd() { return m_1stVectorIndex ? m_Suballocations0 : m_Suballocations1; } const SuballocationVectorType& AccessSuballocations1st() const { return m_1stVectorIndex ? m_Suballocations1 : m_Suballocations0; } const SuballocationVectorType& AccessSuballocations2nd() const { return m_1stVectorIndex ? m_Suballocations0 : m_Suballocations1; } VmaSuballocation& FindSuballocation(VkDeviceSize offset) const; bool ShouldCompact1st() const; void CleanupAfterFree(); bool CreateAllocationRequest_LowerAddress( VkDeviceSize allocSize, VkDeviceSize allocAlignment, VmaSuballocationType allocType, uint32_t strategy, VmaAllocationRequest* pAllocationRequest); bool CreateAllocationRequest_UpperAddress( VkDeviceSize allocSize, VkDeviceSize allocAlignment, VmaSuballocationType allocType, uint32_t strategy, VmaAllocationRequest* pAllocationRequest); }; #ifndef _VMA_BLOCK_METADATA_LINEAR_FUNCTIONS VmaBlockMetadata_Linear::VmaBlockMetadata_Linear(const VkAllocationCallbacks* pAllocationCallbacks, VkDeviceSize bufferImageGranularity, bool isVirtual) : VmaBlockMetadata(pAllocationCallbacks, bufferImageGranularity, isVirtual), m_SumFreeSize(0), m_Suballocations0(VmaStlAllocator(pAllocationCallbacks)), m_Suballocations1(VmaStlAllocator(pAllocationCallbacks)), m_1stVectorIndex(0), m_2ndVectorMode(SECOND_VECTOR_EMPTY), m_1stNullItemsBeginCount(0), m_1stNullItemsMiddleCount(0), m_2ndNullItemsCount(0) {} void VmaBlockMetadata_Linear::Init(VkDeviceSize size) { VmaBlockMetadata::Init(size); m_SumFreeSize = size; } bool VmaBlockMetadata_Linear::Validate() const { const SuballocationVectorType& suballocations1st = AccessSuballocations1st(); const SuballocationVectorType& suballocations2nd = AccessSuballocations2nd(); VMA_VALIDATE(suballocations2nd.empty() == (m_2ndVectorMode == SECOND_VECTOR_EMPTY)); VMA_VALIDATE(!suballocations1st.empty() || suballocations2nd.empty() || m_2ndVectorMode != SECOND_VECTOR_RING_BUFFER); if (!suballocations1st.empty()) { // Null item at the beginning should be accounted into m_1stNullItemsBeginCount. VMA_VALIDATE(suballocations1st[m_1stNullItemsBeginCount].type != VMA_SUBALLOCATION_TYPE_FREE); // Null item at the end should be just pop_back(). VMA_VALIDATE(suballocations1st.back().type != VMA_SUBALLOCATION_TYPE_FREE); } if (!suballocations2nd.empty()) { // Null item at the end should be just pop_back(). VMA_VALIDATE(suballocations2nd.back().type != VMA_SUBALLOCATION_TYPE_FREE); } VMA_VALIDATE(m_1stNullItemsBeginCount + m_1stNullItemsMiddleCount <= suballocations1st.size()); VMA_VALIDATE(m_2ndNullItemsCount <= suballocations2nd.size()); VkDeviceSize sumUsedSize = 0; const size_t suballoc1stCount = suballocations1st.size(); const VkDeviceSize debugMargin = GetDebugMargin(); VkDeviceSize offset = 0; if (m_2ndVectorMode == SECOND_VECTOR_RING_BUFFER) { const size_t suballoc2ndCount = suballocations2nd.size(); size_t nullItem2ndCount = 0; for (size_t i = 0; i < suballoc2ndCount; ++i) { const VmaSuballocation& suballoc = suballocations2nd[i]; const bool currFree = (suballoc.type == VMA_SUBALLOCATION_TYPE_FREE); VmaAllocation const alloc = (VmaAllocation)suballoc.userData; if (!IsVirtual()) { VMA_VALIDATE(currFree == (alloc == VK_NULL_HANDLE)); } VMA_VALIDATE(suballoc.offset >= offset); if (!currFree) { if (!IsVirtual()) { VMA_VALIDATE((VkDeviceSize)alloc->GetAllocHandle() == suballoc.offset + 1); VMA_VALIDATE(alloc->GetSize() == suballoc.size); } sumUsedSize += suballoc.size; } else { ++nullItem2ndCount; } offset = suballoc.offset + suballoc.size + debugMargin; } VMA_VALIDATE(nullItem2ndCount == m_2ndNullItemsCount); } for (size_t i = 0; i < m_1stNullItemsBeginCount; ++i) { const VmaSuballocation& suballoc = suballocations1st[i]; VMA_VALIDATE(suballoc.type == VMA_SUBALLOCATION_TYPE_FREE && suballoc.userData == VMA_NULL); } size_t nullItem1stCount = m_1stNullItemsBeginCount; for (size_t i = m_1stNullItemsBeginCount; i < suballoc1stCount; ++i) { const VmaSuballocation& suballoc = suballocations1st[i]; const bool currFree = (suballoc.type == VMA_SUBALLOCATION_TYPE_FREE); VmaAllocation const alloc = (VmaAllocation)suballoc.userData; if (!IsVirtual()) { VMA_VALIDATE(currFree == (alloc == VK_NULL_HANDLE)); } VMA_VALIDATE(suballoc.offset >= offset); VMA_VALIDATE(i >= m_1stNullItemsBeginCount || currFree); if (!currFree) { if (!IsVirtual()) { VMA_VALIDATE((VkDeviceSize)alloc->GetAllocHandle() == suballoc.offset + 1); VMA_VALIDATE(alloc->GetSize() == suballoc.size); } sumUsedSize += suballoc.size; } else { ++nullItem1stCount; } offset = suballoc.offset + suballoc.size + debugMargin; } VMA_VALIDATE(nullItem1stCount == m_1stNullItemsBeginCount + m_1stNullItemsMiddleCount); if (m_2ndVectorMode == SECOND_VECTOR_DOUBLE_STACK) { const size_t suballoc2ndCount = suballocations2nd.size(); size_t nullItem2ndCount = 0; for (size_t i = suballoc2ndCount; i--; ) { const VmaSuballocation& suballoc = suballocations2nd[i]; const bool currFree = (suballoc.type == VMA_SUBALLOCATION_TYPE_FREE); VmaAllocation const alloc = (VmaAllocation)suballoc.userData; if (!IsVirtual()) { VMA_VALIDATE(currFree == (alloc == VK_NULL_HANDLE)); } VMA_VALIDATE(suballoc.offset >= offset); if (!currFree) { if (!IsVirtual()) { VMA_VALIDATE((VkDeviceSize)alloc->GetAllocHandle() == suballoc.offset + 1); VMA_VALIDATE(alloc->GetSize() == suballoc.size); } sumUsedSize += suballoc.size; } else { ++nullItem2ndCount; } offset = suballoc.offset + suballoc.size + debugMargin; } VMA_VALIDATE(nullItem2ndCount == m_2ndNullItemsCount); } VMA_VALIDATE(offset <= GetSize()); VMA_VALIDATE(m_SumFreeSize == GetSize() - sumUsedSize); return true; } size_t VmaBlockMetadata_Linear::GetAllocationCount() const { return AccessSuballocations1st().size() - m_1stNullItemsBeginCount - m_1stNullItemsMiddleCount + AccessSuballocations2nd().size() - m_2ndNullItemsCount; } size_t VmaBlockMetadata_Linear::GetFreeRegionsCount() const { // Function only used for defragmentation, which is disabled for this algorithm VMA_ASSERT(0); return SIZE_MAX; } void VmaBlockMetadata_Linear::AddDetailedStatistics(VmaDetailedStatistics& inoutStats) const { const VkDeviceSize size = GetSize(); const SuballocationVectorType& suballocations1st = AccessSuballocations1st(); const SuballocationVectorType& suballocations2nd = AccessSuballocations2nd(); const size_t suballoc1stCount = suballocations1st.size(); const size_t suballoc2ndCount = suballocations2nd.size(); inoutStats.statistics.blockCount++; inoutStats.statistics.blockBytes += size; VkDeviceSize lastOffset = 0; if (m_2ndVectorMode == SECOND_VECTOR_RING_BUFFER) { const VkDeviceSize freeSpace2ndTo1stEnd = suballocations1st[m_1stNullItemsBeginCount].offset; size_t nextAlloc2ndIndex = 0; while (lastOffset < freeSpace2ndTo1stEnd) { // Find next non-null allocation or move nextAllocIndex to the end. while (nextAlloc2ndIndex < suballoc2ndCount && suballocations2nd[nextAlloc2ndIndex].userData == VMA_NULL) { ++nextAlloc2ndIndex; } // Found non-null allocation. if (nextAlloc2ndIndex < suballoc2ndCount) { const VmaSuballocation& suballoc = suballocations2nd[nextAlloc2ndIndex]; // 1. Process free space before this allocation. if (lastOffset < suballoc.offset) { // There is free space from lastOffset to suballoc.offset. const VkDeviceSize unusedRangeSize = suballoc.offset - lastOffset; VmaAddDetailedStatisticsUnusedRange(inoutStats, unusedRangeSize); } // 2. Process this allocation. // There is allocation with suballoc.offset, suballoc.size. VmaAddDetailedStatisticsAllocation(inoutStats, suballoc.size); // 3. Prepare for next iteration. lastOffset = suballoc.offset + suballoc.size; ++nextAlloc2ndIndex; } // We are at the end. else { // There is free space from lastOffset to freeSpace2ndTo1stEnd. if (lastOffset < freeSpace2ndTo1stEnd) { const VkDeviceSize unusedRangeSize = freeSpace2ndTo1stEnd - lastOffset; VmaAddDetailedStatisticsUnusedRange(inoutStats, unusedRangeSize); } // End of loop. lastOffset = freeSpace2ndTo1stEnd; } } } size_t nextAlloc1stIndex = m_1stNullItemsBeginCount; const VkDeviceSize freeSpace1stTo2ndEnd = m_2ndVectorMode == SECOND_VECTOR_DOUBLE_STACK ? suballocations2nd.back().offset : size; while (lastOffset < freeSpace1stTo2ndEnd) { // Find next non-null allocation or move nextAllocIndex to the end. while (nextAlloc1stIndex < suballoc1stCount && suballocations1st[nextAlloc1stIndex].userData == VMA_NULL) { ++nextAlloc1stIndex; } // Found non-null allocation. if (nextAlloc1stIndex < suballoc1stCount) { const VmaSuballocation& suballoc = suballocations1st[nextAlloc1stIndex]; // 1. Process free space before this allocation. if (lastOffset < suballoc.offset) { // There is free space from lastOffset to suballoc.offset. const VkDeviceSize unusedRangeSize = suballoc.offset - lastOffset; VmaAddDetailedStatisticsUnusedRange(inoutStats, unusedRangeSize); } // 2. Process this allocation. // There is allocation with suballoc.offset, suballoc.size. VmaAddDetailedStatisticsAllocation(inoutStats, suballoc.size); // 3. Prepare for next iteration. lastOffset = suballoc.offset + suballoc.size; ++nextAlloc1stIndex; } // We are at the end. else { // There is free space from lastOffset to freeSpace1stTo2ndEnd. if (lastOffset < freeSpace1stTo2ndEnd) { const VkDeviceSize unusedRangeSize = freeSpace1stTo2ndEnd - lastOffset; VmaAddDetailedStatisticsUnusedRange(inoutStats, unusedRangeSize); } // End of loop. lastOffset = freeSpace1stTo2ndEnd; } } if (m_2ndVectorMode == SECOND_VECTOR_DOUBLE_STACK) { size_t nextAlloc2ndIndex = suballocations2nd.size() - 1; while (lastOffset < size) { // Find next non-null allocation or move nextAllocIndex to the end. while (nextAlloc2ndIndex != SIZE_MAX && suballocations2nd[nextAlloc2ndIndex].userData == VMA_NULL) { --nextAlloc2ndIndex; } // Found non-null allocation. if (nextAlloc2ndIndex != SIZE_MAX) { const VmaSuballocation& suballoc = suballocations2nd[nextAlloc2ndIndex]; // 1. Process free space before this allocation. if (lastOffset < suballoc.offset) { // There is free space from lastOffset to suballoc.offset. const VkDeviceSize unusedRangeSize = suballoc.offset - lastOffset; VmaAddDetailedStatisticsUnusedRange(inoutStats, unusedRangeSize); } // 2. Process this allocation. // There is allocation with suballoc.offset, suballoc.size. VmaAddDetailedStatisticsAllocation(inoutStats, suballoc.size); // 3. Prepare for next iteration. lastOffset = suballoc.offset + suballoc.size; --nextAlloc2ndIndex; } // We are at the end. else { // There is free space from lastOffset to size. if (lastOffset < size) { const VkDeviceSize unusedRangeSize = size - lastOffset; VmaAddDetailedStatisticsUnusedRange(inoutStats, unusedRangeSize); } // End of loop. lastOffset = size; } } } } void VmaBlockMetadata_Linear::AddStatistics(VmaStatistics& inoutStats) const { const SuballocationVectorType& suballocations1st = AccessSuballocations1st(); const SuballocationVectorType& suballocations2nd = AccessSuballocations2nd(); const VkDeviceSize size = GetSize(); const size_t suballoc1stCount = suballocations1st.size(); const size_t suballoc2ndCount = suballocations2nd.size(); inoutStats.blockCount++; inoutStats.blockBytes += size; inoutStats.allocationBytes += size - m_SumFreeSize; VkDeviceSize lastOffset = 0; if (m_2ndVectorMode == SECOND_VECTOR_RING_BUFFER) { const VkDeviceSize freeSpace2ndTo1stEnd = suballocations1st[m_1stNullItemsBeginCount].offset; size_t nextAlloc2ndIndex = m_1stNullItemsBeginCount; while (lastOffset < freeSpace2ndTo1stEnd) { // Find next non-null allocation or move nextAlloc2ndIndex to the end. while (nextAlloc2ndIndex < suballoc2ndCount && suballocations2nd[nextAlloc2ndIndex].userData == VMA_NULL) { ++nextAlloc2ndIndex; } // Found non-null allocation. if (nextAlloc2ndIndex < suballoc2ndCount) { const VmaSuballocation& suballoc = suballocations2nd[nextAlloc2ndIndex]; // Process this allocation. // There is allocation with suballoc.offset, suballoc.size. ++inoutStats.allocationCount; // Prepare for next iteration. lastOffset = suballoc.offset + suballoc.size; ++nextAlloc2ndIndex; } // We are at the end. else { // End of loop. lastOffset = freeSpace2ndTo1stEnd; } } } size_t nextAlloc1stIndex = m_1stNullItemsBeginCount; const VkDeviceSize freeSpace1stTo2ndEnd = m_2ndVectorMode == SECOND_VECTOR_DOUBLE_STACK ? suballocations2nd.back().offset : size; while (lastOffset < freeSpace1stTo2ndEnd) { // Find next non-null allocation or move nextAllocIndex to the end. while (nextAlloc1stIndex < suballoc1stCount && suballocations1st[nextAlloc1stIndex].userData == VMA_NULL) { ++nextAlloc1stIndex; } // Found non-null allocation. if (nextAlloc1stIndex < suballoc1stCount) { const VmaSuballocation& suballoc = suballocations1st[nextAlloc1stIndex]; // Process this allocation. // There is allocation with suballoc.offset, suballoc.size. ++inoutStats.allocationCount; // Prepare for next iteration. lastOffset = suballoc.offset + suballoc.size; ++nextAlloc1stIndex; } // We are at the end. else { // End of loop. lastOffset = freeSpace1stTo2ndEnd; } } if (m_2ndVectorMode == SECOND_VECTOR_DOUBLE_STACK) { size_t nextAlloc2ndIndex = suballocations2nd.size() - 1; while (lastOffset < size) { // Find next non-null allocation or move nextAlloc2ndIndex to the end. while (nextAlloc2ndIndex != SIZE_MAX && suballocations2nd[nextAlloc2ndIndex].userData == VMA_NULL) { --nextAlloc2ndIndex; } // Found non-null allocation. if (nextAlloc2ndIndex != SIZE_MAX) { const VmaSuballocation& suballoc = suballocations2nd[nextAlloc2ndIndex]; // Process this allocation. // There is allocation with suballoc.offset, suballoc.size. ++inoutStats.allocationCount; // Prepare for next iteration. lastOffset = suballoc.offset + suballoc.size; --nextAlloc2ndIndex; } // We are at the end. else { // End of loop. lastOffset = size; } } } } #if VMA_STATS_STRING_ENABLED void VmaBlockMetadata_Linear::PrintDetailedMap(class VmaJsonWriter& json) const { const VkDeviceSize size = GetSize(); const SuballocationVectorType& suballocations1st = AccessSuballocations1st(); const SuballocationVectorType& suballocations2nd = AccessSuballocations2nd(); const size_t suballoc1stCount = suballocations1st.size(); const size_t suballoc2ndCount = suballocations2nd.size(); // FIRST PASS size_t unusedRangeCount = 0; VkDeviceSize usedBytes = 0; VkDeviceSize lastOffset = 0; size_t alloc2ndCount = 0; if (m_2ndVectorMode == SECOND_VECTOR_RING_BUFFER) { const VkDeviceSize freeSpace2ndTo1stEnd = suballocations1st[m_1stNullItemsBeginCount].offset; size_t nextAlloc2ndIndex = 0; while (lastOffset < freeSpace2ndTo1stEnd) { // Find next non-null allocation or move nextAlloc2ndIndex to the end. while (nextAlloc2ndIndex < suballoc2ndCount && suballocations2nd[nextAlloc2ndIndex].userData == VMA_NULL) { ++nextAlloc2ndIndex; } // Found non-null allocation. if (nextAlloc2ndIndex < suballoc2ndCount) { const VmaSuballocation& suballoc = suballocations2nd[nextAlloc2ndIndex]; // 1. Process free space before this allocation. if (lastOffset < suballoc.offset) { // There is free space from lastOffset to suballoc.offset. ++unusedRangeCount; } // 2. Process this allocation. // There is allocation with suballoc.offset, suballoc.size. ++alloc2ndCount; usedBytes += suballoc.size; // 3. Prepare for next iteration. lastOffset = suballoc.offset + suballoc.size; ++nextAlloc2ndIndex; } // We are at the end. else { if (lastOffset < freeSpace2ndTo1stEnd) { // There is free space from lastOffset to freeSpace2ndTo1stEnd. ++unusedRangeCount; } // End of loop. lastOffset = freeSpace2ndTo1stEnd; } } } size_t nextAlloc1stIndex = m_1stNullItemsBeginCount; size_t alloc1stCount = 0; const VkDeviceSize freeSpace1stTo2ndEnd = m_2ndVectorMode == SECOND_VECTOR_DOUBLE_STACK ? suballocations2nd.back().offset : size; while (lastOffset < freeSpace1stTo2ndEnd) { // Find next non-null allocation or move nextAllocIndex to the end. while (nextAlloc1stIndex < suballoc1stCount && suballocations1st[nextAlloc1stIndex].userData == VMA_NULL) { ++nextAlloc1stIndex; } // Found non-null allocation. if (nextAlloc1stIndex < suballoc1stCount) { const VmaSuballocation& suballoc = suballocations1st[nextAlloc1stIndex]; // 1. Process free space before this allocation. if (lastOffset < suballoc.offset) { // There is free space from lastOffset to suballoc.offset. ++unusedRangeCount; } // 2. Process this allocation. // There is allocation with suballoc.offset, suballoc.size. ++alloc1stCount; usedBytes += suballoc.size; // 3. Prepare for next iteration. lastOffset = suballoc.offset + suballoc.size; ++nextAlloc1stIndex; } // We are at the end. else { if (lastOffset < freeSpace1stTo2ndEnd) { // There is free space from lastOffset to freeSpace1stTo2ndEnd. ++unusedRangeCount; } // End of loop. lastOffset = freeSpace1stTo2ndEnd; } } if (m_2ndVectorMode == SECOND_VECTOR_DOUBLE_STACK) { size_t nextAlloc2ndIndex = suballocations2nd.size() - 1; while (lastOffset < size) { // Find next non-null allocation or move nextAlloc2ndIndex to the end. while (nextAlloc2ndIndex != SIZE_MAX && suballocations2nd[nextAlloc2ndIndex].userData == VMA_NULL) { --nextAlloc2ndIndex; } // Found non-null allocation. if (nextAlloc2ndIndex != SIZE_MAX) { const VmaSuballocation& suballoc = suballocations2nd[nextAlloc2ndIndex]; // 1. Process free space before this allocation. if (lastOffset < suballoc.offset) { // There is free space from lastOffset to suballoc.offset. ++unusedRangeCount; } // 2. Process this allocation. // There is allocation with suballoc.offset, suballoc.size. ++alloc2ndCount; usedBytes += suballoc.size; // 3. Prepare for next iteration. lastOffset = suballoc.offset + suballoc.size; --nextAlloc2ndIndex; } // We are at the end. else { if (lastOffset < size) { // There is free space from lastOffset to size. ++unusedRangeCount; } // End of loop. lastOffset = size; } } } const VkDeviceSize unusedBytes = size - usedBytes; PrintDetailedMap_Begin(json, unusedBytes, alloc1stCount + alloc2ndCount, unusedRangeCount); // SECOND PASS lastOffset = 0; if (m_2ndVectorMode == SECOND_VECTOR_RING_BUFFER) { const VkDeviceSize freeSpace2ndTo1stEnd = suballocations1st[m_1stNullItemsBeginCount].offset; size_t nextAlloc2ndIndex = 0; while (lastOffset < freeSpace2ndTo1stEnd) { // Find next non-null allocation or move nextAlloc2ndIndex to the end. while (nextAlloc2ndIndex < suballoc2ndCount && suballocations2nd[nextAlloc2ndIndex].userData == VMA_NULL) { ++nextAlloc2ndIndex; } // Found non-null allocation. if (nextAlloc2ndIndex < suballoc2ndCount) { const VmaSuballocation& suballoc = suballocations2nd[nextAlloc2ndIndex]; // 1. Process free space before this allocation. if (lastOffset < suballoc.offset) { // There is free space from lastOffset to suballoc.offset. const VkDeviceSize unusedRangeSize = suballoc.offset - lastOffset; PrintDetailedMap_UnusedRange(json, lastOffset, unusedRangeSize); } // 2. Process this allocation. // There is allocation with suballoc.offset, suballoc.size. PrintDetailedMap_Allocation(json, suballoc.offset, suballoc.size, suballoc.userData); // 3. Prepare for next iteration. lastOffset = suballoc.offset + suballoc.size; ++nextAlloc2ndIndex; } // We are at the end. else { if (lastOffset < freeSpace2ndTo1stEnd) { // There is free space from lastOffset to freeSpace2ndTo1stEnd. const VkDeviceSize unusedRangeSize = freeSpace2ndTo1stEnd - lastOffset; PrintDetailedMap_UnusedRange(json, lastOffset, unusedRangeSize); } // End of loop. lastOffset = freeSpace2ndTo1stEnd; } } } nextAlloc1stIndex = m_1stNullItemsBeginCount; while (lastOffset < freeSpace1stTo2ndEnd) { // Find next non-null allocation or move nextAllocIndex to the end. while (nextAlloc1stIndex < suballoc1stCount && suballocations1st[nextAlloc1stIndex].userData == VMA_NULL) { ++nextAlloc1stIndex; } // Found non-null allocation. if (nextAlloc1stIndex < suballoc1stCount) { const VmaSuballocation& suballoc = suballocations1st[nextAlloc1stIndex]; // 1. Process free space before this allocation. if (lastOffset < suballoc.offset) { // There is free space from lastOffset to suballoc.offset. const VkDeviceSize unusedRangeSize = suballoc.offset - lastOffset; PrintDetailedMap_UnusedRange(json, lastOffset, unusedRangeSize); } // 2. Process this allocation. // There is allocation with suballoc.offset, suballoc.size. PrintDetailedMap_Allocation(json, suballoc.offset, suballoc.size, suballoc.userData); // 3. Prepare for next iteration. lastOffset = suballoc.offset + suballoc.size; ++nextAlloc1stIndex; } // We are at the end. else { if (lastOffset < freeSpace1stTo2ndEnd) { // There is free space from lastOffset to freeSpace1stTo2ndEnd. const VkDeviceSize unusedRangeSize = freeSpace1stTo2ndEnd - lastOffset; PrintDetailedMap_UnusedRange(json, lastOffset, unusedRangeSize); } // End of loop. lastOffset = freeSpace1stTo2ndEnd; } } if (m_2ndVectorMode == SECOND_VECTOR_DOUBLE_STACK) { size_t nextAlloc2ndIndex = suballocations2nd.size() - 1; while (lastOffset < size) { // Find next non-null allocation or move nextAlloc2ndIndex to the end. while (nextAlloc2ndIndex != SIZE_MAX && suballocations2nd[nextAlloc2ndIndex].userData == VMA_NULL) { --nextAlloc2ndIndex; } // Found non-null allocation. if (nextAlloc2ndIndex != SIZE_MAX) { const VmaSuballocation& suballoc = suballocations2nd[nextAlloc2ndIndex]; // 1. Process free space before this allocation. if (lastOffset < suballoc.offset) { // There is free space from lastOffset to suballoc.offset. const VkDeviceSize unusedRangeSize = suballoc.offset - lastOffset; PrintDetailedMap_UnusedRange(json, lastOffset, unusedRangeSize); } // 2. Process this allocation. // There is allocation with suballoc.offset, suballoc.size. PrintDetailedMap_Allocation(json, suballoc.offset, suballoc.size, suballoc.userData); // 3. Prepare for next iteration. lastOffset = suballoc.offset + suballoc.size; --nextAlloc2ndIndex; } // We are at the end. else { if (lastOffset < size) { // There is free space from lastOffset to size. const VkDeviceSize unusedRangeSize = size - lastOffset; PrintDetailedMap_UnusedRange(json, lastOffset, unusedRangeSize); } // End of loop. lastOffset = size; } } } PrintDetailedMap_End(json); } #endif // VMA_STATS_STRING_ENABLED bool VmaBlockMetadata_Linear::CreateAllocationRequest( VkDeviceSize allocSize, VkDeviceSize allocAlignment, bool upperAddress, VmaSuballocationType allocType, uint32_t strategy, VmaAllocationRequest* pAllocationRequest) { VMA_ASSERT(allocSize > 0); VMA_ASSERT(allocType != VMA_SUBALLOCATION_TYPE_FREE); VMA_ASSERT(pAllocationRequest != VMA_NULL); VMA_HEAVY_ASSERT(Validate()); if(allocSize > GetSize()) return false; pAllocationRequest->size = allocSize; return upperAddress ? CreateAllocationRequest_UpperAddress( allocSize, allocAlignment, allocType, strategy, pAllocationRequest) : CreateAllocationRequest_LowerAddress( allocSize, allocAlignment, allocType, strategy, pAllocationRequest); } VkResult VmaBlockMetadata_Linear::CheckCorruption(const void* pBlockData) { VMA_ASSERT(!IsVirtual()); SuballocationVectorType& suballocations1st = AccessSuballocations1st(); for (size_t i = m_1stNullItemsBeginCount, count = suballocations1st.size(); i < count; ++i) { const VmaSuballocation& suballoc = suballocations1st[i]; if (suballoc.type != VMA_SUBALLOCATION_TYPE_FREE) { if (!VmaValidateMagicValue(pBlockData, suballoc.offset + suballoc.size)) { VMA_ASSERT(0 && "MEMORY CORRUPTION DETECTED AFTER VALIDATED ALLOCATION!"); return VK_ERROR_UNKNOWN_COPY; } } } SuballocationVectorType& suballocations2nd = AccessSuballocations2nd(); for (size_t i = 0, count = suballocations2nd.size(); i < count; ++i) { const VmaSuballocation& suballoc = suballocations2nd[i]; if (suballoc.type != VMA_SUBALLOCATION_TYPE_FREE) { if (!VmaValidateMagicValue(pBlockData, suballoc.offset + suballoc.size)) { VMA_ASSERT(0 && "MEMORY CORRUPTION DETECTED AFTER VALIDATED ALLOCATION!"); return VK_ERROR_UNKNOWN_COPY; } } } return VK_SUCCESS; } void VmaBlockMetadata_Linear::Alloc( const VmaAllocationRequest& request, VmaSuballocationType type, void* userData) { const VkDeviceSize offset = (VkDeviceSize)request.allocHandle - 1; const VmaSuballocation newSuballoc = { offset, request.size, userData, type }; switch (request.type) { case VmaAllocationRequestType::UpperAddress: { VMA_ASSERT(m_2ndVectorMode != SECOND_VECTOR_RING_BUFFER && "CRITICAL ERROR: Trying to use linear allocator as double stack while it was already used as ring buffer."); SuballocationVectorType& suballocations2nd = AccessSuballocations2nd(); suballocations2nd.push_back(newSuballoc); m_2ndVectorMode = SECOND_VECTOR_DOUBLE_STACK; } break; case VmaAllocationRequestType::EndOf1st: { SuballocationVectorType& suballocations1st = AccessSuballocations1st(); VMA_ASSERT(suballocations1st.empty() || offset >= suballocations1st.back().offset + suballocations1st.back().size); // Check if it fits before the end of the block. VMA_ASSERT(offset + request.size <= GetSize()); suballocations1st.push_back(newSuballoc); } break; case VmaAllocationRequestType::EndOf2nd: { SuballocationVectorType& suballocations1st = AccessSuballocations1st(); // New allocation at the end of 2-part ring buffer, so before first allocation from 1st vector. VMA_ASSERT(!suballocations1st.empty() && offset + request.size <= suballocations1st[m_1stNullItemsBeginCount].offset); SuballocationVectorType& suballocations2nd = AccessSuballocations2nd(); switch (m_2ndVectorMode) { case SECOND_VECTOR_EMPTY: // First allocation from second part ring buffer. VMA_ASSERT(suballocations2nd.empty()); m_2ndVectorMode = SECOND_VECTOR_RING_BUFFER; break; case SECOND_VECTOR_RING_BUFFER: // 2-part ring buffer is already started. VMA_ASSERT(!suballocations2nd.empty()); break; case SECOND_VECTOR_DOUBLE_STACK: VMA_ASSERT(0 && "CRITICAL ERROR: Trying to use linear allocator as ring buffer while it was already used as double stack."); break; default: VMA_ASSERT(0); } suballocations2nd.push_back(newSuballoc); } break; default: VMA_ASSERT(0 && "CRITICAL INTERNAL ERROR."); } m_SumFreeSize -= newSuballoc.size; } void VmaBlockMetadata_Linear::Free(VmaAllocHandle allocHandle) { SuballocationVectorType& suballocations1st = AccessSuballocations1st(); SuballocationVectorType& suballocations2nd = AccessSuballocations2nd(); VkDeviceSize offset = (VkDeviceSize)allocHandle - 1; if (!suballocations1st.empty()) { // First allocation: Mark it as next empty at the beginning. VmaSuballocation& firstSuballoc = suballocations1st[m_1stNullItemsBeginCount]; if (firstSuballoc.offset == offset) { firstSuballoc.type = VMA_SUBALLOCATION_TYPE_FREE; firstSuballoc.userData = VMA_NULL; m_SumFreeSize += firstSuballoc.size; ++m_1stNullItemsBeginCount; CleanupAfterFree(); return; } } // Last allocation in 2-part ring buffer or top of upper stack (same logic). if (m_2ndVectorMode == SECOND_VECTOR_RING_BUFFER || m_2ndVectorMode == SECOND_VECTOR_DOUBLE_STACK) { VmaSuballocation& lastSuballoc = suballocations2nd.back(); if (lastSuballoc.offset == offset) { m_SumFreeSize += lastSuballoc.size; suballocations2nd.pop_back(); CleanupAfterFree(); return; } } // Last allocation in 1st vector. else if (m_2ndVectorMode == SECOND_VECTOR_EMPTY) { VmaSuballocation& lastSuballoc = suballocations1st.back(); if (lastSuballoc.offset == offset) { m_SumFreeSize += lastSuballoc.size; suballocations1st.pop_back(); CleanupAfterFree(); return; } } VmaSuballocation refSuballoc; refSuballoc.offset = offset; // Rest of members stays uninitialized intentionally for better performance. // Item from the middle of 1st vector. { const SuballocationVectorType::iterator it = VmaBinaryFindSorted( suballocations1st.begin() + m_1stNullItemsBeginCount, suballocations1st.end(), refSuballoc, VmaSuballocationOffsetLess()); if (it != suballocations1st.end()) { it->type = VMA_SUBALLOCATION_TYPE_FREE; it->userData = VMA_NULL; ++m_1stNullItemsMiddleCount; m_SumFreeSize += it->size; CleanupAfterFree(); return; } } if (m_2ndVectorMode != SECOND_VECTOR_EMPTY) { // Item from the middle of 2nd vector. const SuballocationVectorType::iterator it = m_2ndVectorMode == SECOND_VECTOR_RING_BUFFER ? VmaBinaryFindSorted(suballocations2nd.begin(), suballocations2nd.end(), refSuballoc, VmaSuballocationOffsetLess()) : VmaBinaryFindSorted(suballocations2nd.begin(), suballocations2nd.end(), refSuballoc, VmaSuballocationOffsetGreater()); if (it != suballocations2nd.end()) { it->type = VMA_SUBALLOCATION_TYPE_FREE; it->userData = VMA_NULL; ++m_2ndNullItemsCount; m_SumFreeSize += it->size; CleanupAfterFree(); return; } } VMA_ASSERT(0 && "Allocation to free not found in linear allocator!"); } void VmaBlockMetadata_Linear::GetAllocationInfo(VmaAllocHandle allocHandle, VmaVirtualAllocationInfo& outInfo) { outInfo.offset = (VkDeviceSize)allocHandle - 1; VmaSuballocation& suballoc = FindSuballocation(outInfo.offset); outInfo.size = suballoc.size; outInfo.pUserData = suballoc.userData; } void* VmaBlockMetadata_Linear::GetAllocationUserData(VmaAllocHandle allocHandle) const { return FindSuballocation((VkDeviceSize)allocHandle - 1).userData; } VmaAllocHandle VmaBlockMetadata_Linear::GetAllocationListBegin() const { // Function only used for defragmentation, which is disabled for this algorithm VMA_ASSERT(0); return VK_NULL_HANDLE; } VmaAllocHandle VmaBlockMetadata_Linear::GetNextAllocation(VmaAllocHandle prevAlloc) const { // Function only used for defragmentation, which is disabled for this algorithm VMA_ASSERT(0); return VK_NULL_HANDLE; } VkDeviceSize VmaBlockMetadata_Linear::GetNextFreeRegionSize(VmaAllocHandle alloc) const { // Function only used for defragmentation, which is disabled for this algorithm VMA_ASSERT(0); return 0; } void VmaBlockMetadata_Linear::Clear() { m_SumFreeSize = GetSize(); m_Suballocations0.clear(); m_Suballocations1.clear(); // Leaving m_1stVectorIndex unchanged - it doesn't matter. m_2ndVectorMode = SECOND_VECTOR_EMPTY; m_1stNullItemsBeginCount = 0; m_1stNullItemsMiddleCount = 0; m_2ndNullItemsCount = 0; } void VmaBlockMetadata_Linear::SetAllocationUserData(VmaAllocHandle allocHandle, void* userData) { VmaSuballocation& suballoc = FindSuballocation((VkDeviceSize)allocHandle - 1); suballoc.userData = userData; } void VmaBlockMetadata_Linear::DebugLogAllAllocations() const { const SuballocationVectorType& suballocations1st = AccessSuballocations1st(); for (auto it = suballocations1st.begin() + m_1stNullItemsBeginCount; it != suballocations1st.end(); ++it) if (it->type != VMA_SUBALLOCATION_TYPE_FREE) DebugLogAllocation(it->offset, it->size, it->userData); const SuballocationVectorType& suballocations2nd = AccessSuballocations2nd(); for (auto it = suballocations2nd.begin(); it != suballocations2nd.end(); ++it) if (it->type != VMA_SUBALLOCATION_TYPE_FREE) DebugLogAllocation(it->offset, it->size, it->userData); } VmaSuballocation& VmaBlockMetadata_Linear::FindSuballocation(VkDeviceSize offset) const { const SuballocationVectorType& suballocations1st = AccessSuballocations1st(); const SuballocationVectorType& suballocations2nd = AccessSuballocations2nd(); VmaSuballocation refSuballoc; refSuballoc.offset = offset; // Rest of members stays uninitialized intentionally for better performance. // Item from the 1st vector. { SuballocationVectorType::const_iterator it = VmaBinaryFindSorted( suballocations1st.begin() + m_1stNullItemsBeginCount, suballocations1st.end(), refSuballoc, VmaSuballocationOffsetLess()); if (it != suballocations1st.end()) { return const_cast(*it); } } if (m_2ndVectorMode != SECOND_VECTOR_EMPTY) { // Rest of members stays uninitialized intentionally for better performance. SuballocationVectorType::const_iterator it = m_2ndVectorMode == SECOND_VECTOR_RING_BUFFER ? VmaBinaryFindSorted(suballocations2nd.begin(), suballocations2nd.end(), refSuballoc, VmaSuballocationOffsetLess()) : VmaBinaryFindSorted(suballocations2nd.begin(), suballocations2nd.end(), refSuballoc, VmaSuballocationOffsetGreater()); if (it != suballocations2nd.end()) { return const_cast(*it); } } VMA_ASSERT(0 && "Allocation not found in linear allocator!"); return const_cast(suballocations1st.back()); // Should never occur. } bool VmaBlockMetadata_Linear::ShouldCompact1st() const { const size_t nullItemCount = m_1stNullItemsBeginCount + m_1stNullItemsMiddleCount; const size_t suballocCount = AccessSuballocations1st().size(); return suballocCount > 32 && nullItemCount * 2 >= (suballocCount - nullItemCount) * 3; } void VmaBlockMetadata_Linear::CleanupAfterFree() { SuballocationVectorType& suballocations1st = AccessSuballocations1st(); SuballocationVectorType& suballocations2nd = AccessSuballocations2nd(); if (IsEmpty()) { suballocations1st.clear(); suballocations2nd.clear(); m_1stNullItemsBeginCount = 0; m_1stNullItemsMiddleCount = 0; m_2ndNullItemsCount = 0; m_2ndVectorMode = SECOND_VECTOR_EMPTY; } else { const size_t suballoc1stCount = suballocations1st.size(); const size_t nullItem1stCount = m_1stNullItemsBeginCount + m_1stNullItemsMiddleCount; VMA_ASSERT(nullItem1stCount <= suballoc1stCount); // Find more null items at the beginning of 1st vector. while (m_1stNullItemsBeginCount < suballoc1stCount && suballocations1st[m_1stNullItemsBeginCount].type == VMA_SUBALLOCATION_TYPE_FREE) { ++m_1stNullItemsBeginCount; --m_1stNullItemsMiddleCount; } // Find more null items at the end of 1st vector. while (m_1stNullItemsMiddleCount > 0 && suballocations1st.back().type == VMA_SUBALLOCATION_TYPE_FREE) { --m_1stNullItemsMiddleCount; suballocations1st.pop_back(); } // Find more null items at the end of 2nd vector. while (m_2ndNullItemsCount > 0 && suballocations2nd.back().type == VMA_SUBALLOCATION_TYPE_FREE) { --m_2ndNullItemsCount; suballocations2nd.pop_back(); } // Find more null items at the beginning of 2nd vector. while (m_2ndNullItemsCount > 0 && suballocations2nd[0].type == VMA_SUBALLOCATION_TYPE_FREE) { --m_2ndNullItemsCount; VmaVectorRemove(suballocations2nd, 0); } if (ShouldCompact1st()) { const size_t nonNullItemCount = suballoc1stCount - nullItem1stCount; size_t srcIndex = m_1stNullItemsBeginCount; for (size_t dstIndex = 0; dstIndex < nonNullItemCount; ++dstIndex) { while (suballocations1st[srcIndex].type == VMA_SUBALLOCATION_TYPE_FREE) { ++srcIndex; } if (dstIndex != srcIndex) { suballocations1st[dstIndex] = suballocations1st[srcIndex]; } ++srcIndex; } suballocations1st.resize(nonNullItemCount); m_1stNullItemsBeginCount = 0; m_1stNullItemsMiddleCount = 0; } // 2nd vector became empty. if (suballocations2nd.empty()) { m_2ndVectorMode = SECOND_VECTOR_EMPTY; } // 1st vector became empty. if (suballocations1st.size() - m_1stNullItemsBeginCount == 0) { suballocations1st.clear(); m_1stNullItemsBeginCount = 0; if (!suballocations2nd.empty() && m_2ndVectorMode == SECOND_VECTOR_RING_BUFFER) { // Swap 1st with 2nd. Now 2nd is empty. m_2ndVectorMode = SECOND_VECTOR_EMPTY; m_1stNullItemsMiddleCount = m_2ndNullItemsCount; while (m_1stNullItemsBeginCount < suballocations2nd.size() && suballocations2nd[m_1stNullItemsBeginCount].type == VMA_SUBALLOCATION_TYPE_FREE) { ++m_1stNullItemsBeginCount; --m_1stNullItemsMiddleCount; } m_2ndNullItemsCount = 0; m_1stVectorIndex ^= 1; } } } VMA_HEAVY_ASSERT(Validate()); } bool VmaBlockMetadata_Linear::CreateAllocationRequest_LowerAddress( VkDeviceSize allocSize, VkDeviceSize allocAlignment, VmaSuballocationType allocType, uint32_t strategy, VmaAllocationRequest* pAllocationRequest) { const VkDeviceSize blockSize = GetSize(); const VkDeviceSize debugMargin = GetDebugMargin(); const VkDeviceSize bufferImageGranularity = GetBufferImageGranularity(); SuballocationVectorType& suballocations1st = AccessSuballocations1st(); SuballocationVectorType& suballocations2nd = AccessSuballocations2nd(); if (m_2ndVectorMode == SECOND_VECTOR_EMPTY || m_2ndVectorMode == SECOND_VECTOR_DOUBLE_STACK) { // Try to allocate at the end of 1st vector. VkDeviceSize resultBaseOffset = 0; if (!suballocations1st.empty()) { const VmaSuballocation& lastSuballoc = suballocations1st.back(); resultBaseOffset = lastSuballoc.offset + lastSuballoc.size + debugMargin; } // Start from offset equal to beginning of free space. VkDeviceSize resultOffset = resultBaseOffset; // Apply alignment. resultOffset = VmaAlignUp(resultOffset, allocAlignment); // Check previous suballocations for BufferImageGranularity conflicts. // Make bigger alignment if necessary. if (bufferImageGranularity > 1 && bufferImageGranularity != allocAlignment && !suballocations1st.empty()) { bool bufferImageGranularityConflict = false; for (size_t prevSuballocIndex = suballocations1st.size(); prevSuballocIndex--; ) { const VmaSuballocation& prevSuballoc = suballocations1st[prevSuballocIndex]; if (VmaBlocksOnSamePage(prevSuballoc.offset, prevSuballoc.size, resultOffset, bufferImageGranularity)) { if (VmaIsBufferImageGranularityConflict(prevSuballoc.type, allocType)) { bufferImageGranularityConflict = true; break; } } else // Already on previous page. break; } if (bufferImageGranularityConflict) { resultOffset = VmaAlignUp(resultOffset, bufferImageGranularity); } } const VkDeviceSize freeSpaceEnd = m_2ndVectorMode == SECOND_VECTOR_DOUBLE_STACK ? suballocations2nd.back().offset : blockSize; // There is enough free space at the end after alignment. if (resultOffset + allocSize + debugMargin <= freeSpaceEnd) { // Check next suballocations for BufferImageGranularity conflicts. // If conflict exists, allocation cannot be made here. if ((allocSize % bufferImageGranularity || resultOffset % bufferImageGranularity) && m_2ndVectorMode == SECOND_VECTOR_DOUBLE_STACK) { for (size_t nextSuballocIndex = suballocations2nd.size(); nextSuballocIndex--; ) { const VmaSuballocation& nextSuballoc = suballocations2nd[nextSuballocIndex]; if (VmaBlocksOnSamePage(resultOffset, allocSize, nextSuballoc.offset, bufferImageGranularity)) { if (VmaIsBufferImageGranularityConflict(allocType, nextSuballoc.type)) { return false; } } else { // Already on previous page. break; } } } // All tests passed: Success. pAllocationRequest->allocHandle = (VmaAllocHandle)(resultOffset + 1); // pAllocationRequest->item, customData unused. pAllocationRequest->type = VmaAllocationRequestType::EndOf1st; return true; } } // Wrap-around to end of 2nd vector. Try to allocate there, watching for the // beginning of 1st vector as the end of free space. if (m_2ndVectorMode == SECOND_VECTOR_EMPTY || m_2ndVectorMode == SECOND_VECTOR_RING_BUFFER) { VMA_ASSERT(!suballocations1st.empty()); VkDeviceSize resultBaseOffset = 0; if (!suballocations2nd.empty()) { const VmaSuballocation& lastSuballoc = suballocations2nd.back(); resultBaseOffset = lastSuballoc.offset + lastSuballoc.size + debugMargin; } // Start from offset equal to beginning of free space. VkDeviceSize resultOffset = resultBaseOffset; // Apply alignment. resultOffset = VmaAlignUp(resultOffset, allocAlignment); // Check previous suballocations for BufferImageGranularity conflicts. // Make bigger alignment if necessary. if (bufferImageGranularity > 1 && bufferImageGranularity != allocAlignment && !suballocations2nd.empty()) { bool bufferImageGranularityConflict = false; for (size_t prevSuballocIndex = suballocations2nd.size(); prevSuballocIndex--; ) { const VmaSuballocation& prevSuballoc = suballocations2nd[prevSuballocIndex]; if (VmaBlocksOnSamePage(prevSuballoc.offset, prevSuballoc.size, resultOffset, bufferImageGranularity)) { if (VmaIsBufferImageGranularityConflict(prevSuballoc.type, allocType)) { bufferImageGranularityConflict = true; break; } } else // Already on previous page. break; } if (bufferImageGranularityConflict) { resultOffset = VmaAlignUp(resultOffset, bufferImageGranularity); } } size_t index1st = m_1stNullItemsBeginCount; // There is enough free space at the end after alignment. if ((index1st == suballocations1st.size() && resultOffset + allocSize + debugMargin <= blockSize) || (index1st < suballocations1st.size() && resultOffset + allocSize + debugMargin <= suballocations1st[index1st].offset)) { // Check next suballocations for BufferImageGranularity conflicts. // If conflict exists, allocation cannot be made here. if (allocSize % bufferImageGranularity || resultOffset % bufferImageGranularity) { for (size_t nextSuballocIndex = index1st; nextSuballocIndex < suballocations1st.size(); nextSuballocIndex++) { const VmaSuballocation& nextSuballoc = suballocations1st[nextSuballocIndex]; if (VmaBlocksOnSamePage(resultOffset, allocSize, nextSuballoc.offset, bufferImageGranularity)) { if (VmaIsBufferImageGranularityConflict(allocType, nextSuballoc.type)) { return false; } } else { // Already on next page. break; } } } // All tests passed: Success. pAllocationRequest->allocHandle = (VmaAllocHandle)(resultOffset + 1); pAllocationRequest->type = VmaAllocationRequestType::EndOf2nd; // pAllocationRequest->item, customData unused. return true; } } return false; } bool VmaBlockMetadata_Linear::CreateAllocationRequest_UpperAddress( VkDeviceSize allocSize, VkDeviceSize allocAlignment, VmaSuballocationType allocType, uint32_t strategy, VmaAllocationRequest* pAllocationRequest) { const VkDeviceSize blockSize = GetSize(); const VkDeviceSize bufferImageGranularity = GetBufferImageGranularity(); SuballocationVectorType& suballocations1st = AccessSuballocations1st(); SuballocationVectorType& suballocations2nd = AccessSuballocations2nd(); if (m_2ndVectorMode == SECOND_VECTOR_RING_BUFFER) { VMA_ASSERT(0 && "Trying to use pool with linear algorithm as double stack, while it is already being used as ring buffer."); return false; } // Try to allocate before 2nd.back(), or end of block if 2nd.empty(). if (allocSize > blockSize) { return false; } VkDeviceSize resultBaseOffset = blockSize - allocSize; if (!suballocations2nd.empty()) { const VmaSuballocation& lastSuballoc = suballocations2nd.back(); resultBaseOffset = lastSuballoc.offset - allocSize; if (allocSize > lastSuballoc.offset) { return false; } } // Start from offset equal to end of free space. VkDeviceSize resultOffset = resultBaseOffset; const VkDeviceSize debugMargin = GetDebugMargin(); // Apply debugMargin at the end. if (debugMargin > 0) { if (resultOffset < debugMargin) { return false; } resultOffset -= debugMargin; } // Apply alignment. resultOffset = VmaAlignDown(resultOffset, allocAlignment); // Check next suballocations from 2nd for BufferImageGranularity conflicts. // Make bigger alignment if necessary. if (bufferImageGranularity > 1 && bufferImageGranularity != allocAlignment && !suballocations2nd.empty()) { bool bufferImageGranularityConflict = false; for (size_t nextSuballocIndex = suballocations2nd.size(); nextSuballocIndex--; ) { const VmaSuballocation& nextSuballoc = suballocations2nd[nextSuballocIndex]; if (VmaBlocksOnSamePage(resultOffset, allocSize, nextSuballoc.offset, bufferImageGranularity)) { if (VmaIsBufferImageGranularityConflict(nextSuballoc.type, allocType)) { bufferImageGranularityConflict = true; break; } } else // Already on previous page. break; } if (bufferImageGranularityConflict) { resultOffset = VmaAlignDown(resultOffset, bufferImageGranularity); } } // There is enough free space. const VkDeviceSize endOf1st = !suballocations1st.empty() ? suballocations1st.back().offset + suballocations1st.back().size : 0; if (endOf1st + debugMargin <= resultOffset) { // Check previous suballocations for BufferImageGranularity conflicts. // If conflict exists, allocation cannot be made here. if (bufferImageGranularity > 1) { for (size_t prevSuballocIndex = suballocations1st.size(); prevSuballocIndex--; ) { const VmaSuballocation& prevSuballoc = suballocations1st[prevSuballocIndex]; if (VmaBlocksOnSamePage(prevSuballoc.offset, prevSuballoc.size, resultOffset, bufferImageGranularity)) { if (VmaIsBufferImageGranularityConflict(allocType, prevSuballoc.type)) { return false; } } else { // Already on next page. break; } } } // All tests passed: Success. pAllocationRequest->allocHandle = (VmaAllocHandle)(resultOffset + 1); // pAllocationRequest->item unused. pAllocationRequest->type = VmaAllocationRequestType::UpperAddress; return true; } return false; } #endif // _VMA_BLOCK_METADATA_LINEAR_FUNCTIONS #endif // _VMA_BLOCK_METADATA_LINEAR #ifndef _VMA_BLOCK_METADATA_TLSF // To not search current larger region if first allocation won't succeed and skip to smaller range // use with VMA_ALLOCATION_CREATE_STRATEGY_MIN_MEMORY_BIT as strategy in CreateAllocationRequest(). // When fragmentation and reusal of previous blocks doesn't matter then use with // VMA_ALLOCATION_CREATE_STRATEGY_MIN_TIME_BIT for fastest alloc time possible. class VmaBlockMetadata_TLSF : public VmaBlockMetadata { VMA_CLASS_NO_COPY_NO_MOVE(VmaBlockMetadata_TLSF) public: VmaBlockMetadata_TLSF(const VkAllocationCallbacks* pAllocationCallbacks, VkDeviceSize bufferImageGranularity, bool isVirtual); virtual ~VmaBlockMetadata_TLSF(); size_t GetAllocationCount() const override { return m_AllocCount; } size_t GetFreeRegionsCount() const override { return m_BlocksFreeCount + 1; } VkDeviceSize GetSumFreeSize() const override { return m_BlocksFreeSize + m_NullBlock->size; } bool IsEmpty() const override { return m_NullBlock->offset == 0; } VkDeviceSize GetAllocationOffset(VmaAllocHandle allocHandle) const override { return ((Block*)allocHandle)->offset; } void Init(VkDeviceSize size) override; bool Validate() const override; void AddDetailedStatistics(VmaDetailedStatistics& inoutStats) const override; void AddStatistics(VmaStatistics& inoutStats) const override; #if VMA_STATS_STRING_ENABLED void PrintDetailedMap(class VmaJsonWriter& json) const override; #endif bool CreateAllocationRequest( VkDeviceSize allocSize, VkDeviceSize allocAlignment, bool upperAddress, VmaSuballocationType allocType, uint32_t strategy, VmaAllocationRequest* pAllocationRequest) override; VkResult CheckCorruption(const void* pBlockData) override; void Alloc( const VmaAllocationRequest& request, VmaSuballocationType type, void* userData) override; void Free(VmaAllocHandle allocHandle) override; void GetAllocationInfo(VmaAllocHandle allocHandle, VmaVirtualAllocationInfo& outInfo) override; void* GetAllocationUserData(VmaAllocHandle allocHandle) const override; VmaAllocHandle GetAllocationListBegin() const override; VmaAllocHandle GetNextAllocation(VmaAllocHandle prevAlloc) const override; VkDeviceSize GetNextFreeRegionSize(VmaAllocHandle alloc) const override; void Clear() override; void SetAllocationUserData(VmaAllocHandle allocHandle, void* userData) override; void DebugLogAllAllocations() const override; private: // According to original paper it should be preferable 4 or 5: // M. Masmano, I. Ripoll, A. Crespo, and J. Real "TLSF: a New Dynamic Memory Allocator for Real-Time Systems" // http://www.gii.upv.es/tlsf/files/ecrts04_tlsf.pdf static const uint8_t SECOND_LEVEL_INDEX = 5; static const uint16_t SMALL_BUFFER_SIZE = 256; static const uint32_t INITIAL_BLOCK_ALLOC_COUNT = 16; static const uint8_t MEMORY_CLASS_SHIFT = 7; static const uint8_t MAX_MEMORY_CLASSES = 65 - MEMORY_CLASS_SHIFT; class Block { public: VkDeviceSize offset; VkDeviceSize size; Block* prevPhysical; Block* nextPhysical; void MarkFree() { prevFree = VMA_NULL; } void MarkTaken() { prevFree = this; } bool IsFree() const { return prevFree != this; } void*& UserData() { VMA_HEAVY_ASSERT(!IsFree()); return userData; } Block*& PrevFree() { return prevFree; } Block*& NextFree() { VMA_HEAVY_ASSERT(IsFree()); return nextFree; } private: Block* prevFree; // Address of the same block here indicates that block is taken union { Block* nextFree; void* userData; }; }; size_t m_AllocCount; // Total number of free blocks besides null block size_t m_BlocksFreeCount; // Total size of free blocks excluding null block VkDeviceSize m_BlocksFreeSize; uint32_t m_IsFreeBitmap; uint8_t m_MemoryClasses; uint32_t m_InnerIsFreeBitmap[MAX_MEMORY_CLASSES]; uint32_t m_ListsCount; /* * 0: 0-3 lists for small buffers * 1+: 0-(2^SLI-1) lists for normal buffers */ Block** m_FreeList; VmaPoolAllocator m_BlockAllocator; Block* m_NullBlock; VmaBlockBufferImageGranularity m_GranularityHandler; uint8_t SizeToMemoryClass(VkDeviceSize size) const; uint16_t SizeToSecondIndex(VkDeviceSize size, uint8_t memoryClass) const; uint32_t GetListIndex(uint8_t memoryClass, uint16_t secondIndex) const; uint32_t GetListIndex(VkDeviceSize size) const; void RemoveFreeBlock(Block* block); void InsertFreeBlock(Block* block); void MergeBlock(Block* block, Block* prev); Block* FindFreeBlock(VkDeviceSize size, uint32_t& listIndex) const; bool CheckBlock( Block& block, uint32_t listIndex, VkDeviceSize allocSize, VkDeviceSize allocAlignment, VmaSuballocationType allocType, VmaAllocationRequest* pAllocationRequest); }; #ifndef _VMA_BLOCK_METADATA_TLSF_FUNCTIONS VmaBlockMetadata_TLSF::VmaBlockMetadata_TLSF(const VkAllocationCallbacks* pAllocationCallbacks, VkDeviceSize bufferImageGranularity, bool isVirtual) : VmaBlockMetadata(pAllocationCallbacks, bufferImageGranularity, isVirtual), m_AllocCount(0), m_BlocksFreeCount(0), m_BlocksFreeSize(0), m_IsFreeBitmap(0), m_MemoryClasses(0), m_ListsCount(0), m_FreeList(VMA_NULL), m_BlockAllocator(pAllocationCallbacks, INITIAL_BLOCK_ALLOC_COUNT), m_NullBlock(VMA_NULL), m_GranularityHandler(bufferImageGranularity) {} VmaBlockMetadata_TLSF::~VmaBlockMetadata_TLSF() { if (m_FreeList) vma_delete_array(GetAllocationCallbacks(), m_FreeList, m_ListsCount); m_GranularityHandler.Destroy(GetAllocationCallbacks()); } void VmaBlockMetadata_TLSF::Init(VkDeviceSize size) { VmaBlockMetadata::Init(size); if (!IsVirtual()) m_GranularityHandler.Init(GetAllocationCallbacks(), size); m_NullBlock = m_BlockAllocator.Alloc(); m_NullBlock->size = size; m_NullBlock->offset = 0; m_NullBlock->prevPhysical = VMA_NULL; m_NullBlock->nextPhysical = VMA_NULL; m_NullBlock->MarkFree(); m_NullBlock->NextFree() = VMA_NULL; m_NullBlock->PrevFree() = VMA_NULL; uint8_t memoryClass = SizeToMemoryClass(size); uint16_t sli = SizeToSecondIndex(size, memoryClass); m_ListsCount = (memoryClass == 0 ? 0 : (memoryClass - 1) * (1UL << SECOND_LEVEL_INDEX) + sli) + 1; if (IsVirtual()) m_ListsCount += 1UL << SECOND_LEVEL_INDEX; else m_ListsCount += 4; m_MemoryClasses = memoryClass + uint8_t(2); memset(m_InnerIsFreeBitmap, 0, MAX_MEMORY_CLASSES * sizeof(uint32_t)); m_FreeList = vma_new_array(GetAllocationCallbacks(), Block*, m_ListsCount); memset(m_FreeList, 0, m_ListsCount * sizeof(Block*)); } bool VmaBlockMetadata_TLSF::Validate() const { VMA_VALIDATE(GetSumFreeSize() <= GetSize()); VkDeviceSize calculatedSize = m_NullBlock->size; VkDeviceSize calculatedFreeSize = m_NullBlock->size; size_t allocCount = 0; size_t freeCount = 0; // Check integrity of free lists for (uint32_t list = 0; list < m_ListsCount; ++list) { Block* block = m_FreeList[list]; if (block != VMA_NULL) { VMA_VALIDATE(block->IsFree()); VMA_VALIDATE(block->PrevFree() == VMA_NULL); while (block->NextFree()) { VMA_VALIDATE(block->NextFree()->IsFree()); VMA_VALIDATE(block->NextFree()->PrevFree() == block); block = block->NextFree(); } } } VkDeviceSize nextOffset = m_NullBlock->offset; auto validateCtx = m_GranularityHandler.StartValidation(GetAllocationCallbacks(), IsVirtual()); VMA_VALIDATE(m_NullBlock->nextPhysical == VMA_NULL); if (m_NullBlock->prevPhysical) { VMA_VALIDATE(m_NullBlock->prevPhysical->nextPhysical == m_NullBlock); } // Check all blocks for (Block* prev = m_NullBlock->prevPhysical; prev != VMA_NULL; prev = prev->prevPhysical) { VMA_VALIDATE(prev->offset + prev->size == nextOffset); nextOffset = prev->offset; calculatedSize += prev->size; uint32_t listIndex = GetListIndex(prev->size); if (prev->IsFree()) { ++freeCount; // Check if free block belongs to free list Block* freeBlock = m_FreeList[listIndex]; VMA_VALIDATE(freeBlock != VMA_NULL); bool found = false; do { if (freeBlock == prev) found = true; freeBlock = freeBlock->NextFree(); } while (!found && freeBlock != VMA_NULL); VMA_VALIDATE(found); calculatedFreeSize += prev->size; } else { ++allocCount; // Check if taken block is not on a free list Block* freeBlock = m_FreeList[listIndex]; while (freeBlock) { VMA_VALIDATE(freeBlock != prev); freeBlock = freeBlock->NextFree(); } if (!IsVirtual()) { VMA_VALIDATE(m_GranularityHandler.Validate(validateCtx, prev->offset, prev->size)); } } if (prev->prevPhysical) { VMA_VALIDATE(prev->prevPhysical->nextPhysical == prev); } } if (!IsVirtual()) { VMA_VALIDATE(m_GranularityHandler.FinishValidation(validateCtx)); } VMA_VALIDATE(nextOffset == 0); VMA_VALIDATE(calculatedSize == GetSize()); VMA_VALIDATE(calculatedFreeSize == GetSumFreeSize()); VMA_VALIDATE(allocCount == m_AllocCount); VMA_VALIDATE(freeCount == m_BlocksFreeCount); return true; } void VmaBlockMetadata_TLSF::AddDetailedStatistics(VmaDetailedStatistics& inoutStats) const { inoutStats.statistics.blockCount++; inoutStats.statistics.blockBytes += GetSize(); if (m_NullBlock->size > 0) VmaAddDetailedStatisticsUnusedRange(inoutStats, m_NullBlock->size); for (Block* block = m_NullBlock->prevPhysical; block != VMA_NULL; block = block->prevPhysical) { if (block->IsFree()) VmaAddDetailedStatisticsUnusedRange(inoutStats, block->size); else VmaAddDetailedStatisticsAllocation(inoutStats, block->size); } } void VmaBlockMetadata_TLSF::AddStatistics(VmaStatistics& inoutStats) const { inoutStats.blockCount++; inoutStats.allocationCount += (uint32_t)m_AllocCount; inoutStats.blockBytes += GetSize(); inoutStats.allocationBytes += GetSize() - GetSumFreeSize(); } #if VMA_STATS_STRING_ENABLED void VmaBlockMetadata_TLSF::PrintDetailedMap(class VmaJsonWriter& json) const { size_t blockCount = m_AllocCount + m_BlocksFreeCount; VmaStlAllocator allocator(GetAllocationCallbacks()); VmaVector> blockList(blockCount, allocator); size_t i = blockCount; for (Block* block = m_NullBlock->prevPhysical; block != VMA_NULL; block = block->prevPhysical) { blockList[--i] = block; } VMA_ASSERT(i == 0); VmaDetailedStatistics stats; VmaClearDetailedStatistics(stats); AddDetailedStatistics(stats); PrintDetailedMap_Begin(json, stats.statistics.blockBytes - stats.statistics.allocationBytes, stats.statistics.allocationCount, stats.unusedRangeCount); for (; i < blockCount; ++i) { Block* block = blockList[i]; if (block->IsFree()) PrintDetailedMap_UnusedRange(json, block->offset, block->size); else PrintDetailedMap_Allocation(json, block->offset, block->size, block->UserData()); } if (m_NullBlock->size > 0) PrintDetailedMap_UnusedRange(json, m_NullBlock->offset, m_NullBlock->size); PrintDetailedMap_End(json); } #endif bool VmaBlockMetadata_TLSF::CreateAllocationRequest( VkDeviceSize allocSize, VkDeviceSize allocAlignment, bool upperAddress, VmaSuballocationType allocType, uint32_t strategy, VmaAllocationRequest* pAllocationRequest) { VMA_ASSERT(allocSize > 0 && "Cannot allocate empty block!"); VMA_ASSERT(!upperAddress && "VMA_ALLOCATION_CREATE_UPPER_ADDRESS_BIT can be used only with linear algorithm."); // For small granularity round up if (!IsVirtual()) m_GranularityHandler.RoundupAllocRequest(allocType, allocSize, allocAlignment); allocSize += GetDebugMargin(); // Quick check for too small pool if (allocSize > GetSumFreeSize()) return false; // If no free blocks in pool then check only null block if (m_BlocksFreeCount == 0) return CheckBlock(*m_NullBlock, m_ListsCount, allocSize, allocAlignment, allocType, pAllocationRequest); // Round up to the next block VkDeviceSize sizeForNextList = allocSize; VkDeviceSize smallSizeStep = VkDeviceSize(SMALL_BUFFER_SIZE / (IsVirtual() ? 1 << SECOND_LEVEL_INDEX : 4)); if (allocSize > SMALL_BUFFER_SIZE) { sizeForNextList += (1ULL << (VMA_BITSCAN_MSB(allocSize) - SECOND_LEVEL_INDEX)); } else if (allocSize > SMALL_BUFFER_SIZE - smallSizeStep) sizeForNextList = SMALL_BUFFER_SIZE + 1; else sizeForNextList += smallSizeStep; uint32_t nextListIndex = m_ListsCount; uint32_t prevListIndex = m_ListsCount; Block* nextListBlock = VMA_NULL; Block* prevListBlock = VMA_NULL; // Check blocks according to strategies if (strategy & VMA_ALLOCATION_CREATE_STRATEGY_MIN_TIME_BIT) { // Quick check for larger block first nextListBlock = FindFreeBlock(sizeForNextList, nextListIndex); if (nextListBlock != VMA_NULL && CheckBlock(*nextListBlock, nextListIndex, allocSize, allocAlignment, allocType, pAllocationRequest)) return true; // If not fitted then null block if (CheckBlock(*m_NullBlock, m_ListsCount, allocSize, allocAlignment, allocType, pAllocationRequest)) return true; // Null block failed, search larger bucket while (nextListBlock) { if (CheckBlock(*nextListBlock, nextListIndex, allocSize, allocAlignment, allocType, pAllocationRequest)) return true; nextListBlock = nextListBlock->NextFree(); } // Failed again, check best fit bucket prevListBlock = FindFreeBlock(allocSize, prevListIndex); while (prevListBlock) { if (CheckBlock(*prevListBlock, prevListIndex, allocSize, allocAlignment, allocType, pAllocationRequest)) return true; prevListBlock = prevListBlock->NextFree(); } } else if (strategy & VMA_ALLOCATION_CREATE_STRATEGY_MIN_MEMORY_BIT) { // Check best fit bucket prevListBlock = FindFreeBlock(allocSize, prevListIndex); while (prevListBlock) { if (CheckBlock(*prevListBlock, prevListIndex, allocSize, allocAlignment, allocType, pAllocationRequest)) return true; prevListBlock = prevListBlock->NextFree(); } // If failed check null block if (CheckBlock(*m_NullBlock, m_ListsCount, allocSize, allocAlignment, allocType, pAllocationRequest)) return true; // Check larger bucket nextListBlock = FindFreeBlock(sizeForNextList, nextListIndex); while (nextListBlock) { if (CheckBlock(*nextListBlock, nextListIndex, allocSize, allocAlignment, allocType, pAllocationRequest)) return true; nextListBlock = nextListBlock->NextFree(); } } else if (strategy & VMA_ALLOCATION_CREATE_STRATEGY_MIN_OFFSET_BIT ) { // Perform search from the start VmaStlAllocator allocator(GetAllocationCallbacks()); VmaVector> blockList(m_BlocksFreeCount, allocator); size_t i = m_BlocksFreeCount; for (Block* block = m_NullBlock->prevPhysical; block != VMA_NULL; block = block->prevPhysical) { if (block->IsFree() && block->size >= allocSize) blockList[--i] = block; } for (; i < m_BlocksFreeCount; ++i) { Block& block = *blockList[i]; if (CheckBlock(block, GetListIndex(block.size), allocSize, allocAlignment, allocType, pAllocationRequest)) return true; } // If failed check null block if (CheckBlock(*m_NullBlock, m_ListsCount, allocSize, allocAlignment, allocType, pAllocationRequest)) return true; // Whole range searched, no more memory return false; } else { // Check larger bucket nextListBlock = FindFreeBlock(sizeForNextList, nextListIndex); while (nextListBlock) { if (CheckBlock(*nextListBlock, nextListIndex, allocSize, allocAlignment, allocType, pAllocationRequest)) return true; nextListBlock = nextListBlock->NextFree(); } // If failed check null block if (CheckBlock(*m_NullBlock, m_ListsCount, allocSize, allocAlignment, allocType, pAllocationRequest)) return true; // Check best fit bucket prevListBlock = FindFreeBlock(allocSize, prevListIndex); while (prevListBlock) { if (CheckBlock(*prevListBlock, prevListIndex, allocSize, allocAlignment, allocType, pAllocationRequest)) return true; prevListBlock = prevListBlock->NextFree(); } } // Worst case, full search has to be done while (++nextListIndex < m_ListsCount) { nextListBlock = m_FreeList[nextListIndex]; while (nextListBlock) { if (CheckBlock(*nextListBlock, nextListIndex, allocSize, allocAlignment, allocType, pAllocationRequest)) return true; nextListBlock = nextListBlock->NextFree(); } } // No more memory sadly return false; } VkResult VmaBlockMetadata_TLSF::CheckCorruption(const void* pBlockData) { for (Block* block = m_NullBlock->prevPhysical; block != VMA_NULL; block = block->prevPhysical) { if (!block->IsFree()) { if (!VmaValidateMagicValue(pBlockData, block->offset + block->size)) { VMA_ASSERT(0 && "MEMORY CORRUPTION DETECTED AFTER VALIDATED ALLOCATION!"); return VK_ERROR_UNKNOWN_COPY; } } } return VK_SUCCESS; } void VmaBlockMetadata_TLSF::Alloc( const VmaAllocationRequest& request, VmaSuballocationType type, void* userData) { VMA_ASSERT(request.type == VmaAllocationRequestType::TLSF); // Get block and pop it from the free list Block* currentBlock = (Block*)request.allocHandle; VkDeviceSize offset = request.algorithmData; VMA_ASSERT(currentBlock != VMA_NULL); VMA_ASSERT(currentBlock->offset <= offset); if (currentBlock != m_NullBlock) RemoveFreeBlock(currentBlock); VkDeviceSize debugMargin = GetDebugMargin(); VkDeviceSize missingAlignment = offset - currentBlock->offset; // Append missing alignment to prev block or create new one if (missingAlignment) { Block* prevBlock = currentBlock->prevPhysical; VMA_ASSERT(prevBlock != VMA_NULL && "There should be no missing alignment at offset 0!"); if (prevBlock->IsFree() && prevBlock->size != debugMargin) { uint32_t oldList = GetListIndex(prevBlock->size); prevBlock->size += missingAlignment; // Check if new size crosses list bucket if (oldList != GetListIndex(prevBlock->size)) { prevBlock->size -= missingAlignment; RemoveFreeBlock(prevBlock); prevBlock->size += missingAlignment; InsertFreeBlock(prevBlock); } else m_BlocksFreeSize += missingAlignment; } else { Block* newBlock = m_BlockAllocator.Alloc(); currentBlock->prevPhysical = newBlock; prevBlock->nextPhysical = newBlock; newBlock->prevPhysical = prevBlock; newBlock->nextPhysical = currentBlock; newBlock->size = missingAlignment; newBlock->offset = currentBlock->offset; newBlock->MarkTaken(); InsertFreeBlock(newBlock); } currentBlock->size -= missingAlignment; currentBlock->offset += missingAlignment; } VkDeviceSize size = request.size + debugMargin; if (currentBlock->size == size) { if (currentBlock == m_NullBlock) { // Setup new null block m_NullBlock = m_BlockAllocator.Alloc(); m_NullBlock->size = 0; m_NullBlock->offset = currentBlock->offset + size; m_NullBlock->prevPhysical = currentBlock; m_NullBlock->nextPhysical = VMA_NULL; m_NullBlock->MarkFree(); m_NullBlock->PrevFree() = VMA_NULL; m_NullBlock->NextFree() = VMA_NULL; currentBlock->nextPhysical = m_NullBlock; currentBlock->MarkTaken(); } } else { VMA_ASSERT(currentBlock->size > size && "Proper block already found, shouldn't find smaller one!"); // Create new free block Block* newBlock = m_BlockAllocator.Alloc(); newBlock->size = currentBlock->size - size; newBlock->offset = currentBlock->offset + size; newBlock->prevPhysical = currentBlock; newBlock->nextPhysical = currentBlock->nextPhysical; currentBlock->nextPhysical = newBlock; currentBlock->size = size; if (currentBlock == m_NullBlock) { m_NullBlock = newBlock; m_NullBlock->MarkFree(); m_NullBlock->NextFree() = VMA_NULL; m_NullBlock->PrevFree() = VMA_NULL; currentBlock->MarkTaken(); } else { newBlock->nextPhysical->prevPhysical = newBlock; newBlock->MarkTaken(); InsertFreeBlock(newBlock); } } currentBlock->UserData() = userData; if (debugMargin > 0) { currentBlock->size -= debugMargin; Block* newBlock = m_BlockAllocator.Alloc(); newBlock->size = debugMargin; newBlock->offset = currentBlock->offset + currentBlock->size; newBlock->prevPhysical = currentBlock; newBlock->nextPhysical = currentBlock->nextPhysical; newBlock->MarkTaken(); currentBlock->nextPhysical->prevPhysical = newBlock; currentBlock->nextPhysical = newBlock; InsertFreeBlock(newBlock); } if (!IsVirtual()) m_GranularityHandler.AllocPages((uint8_t)(uintptr_t)request.customData, currentBlock->offset, currentBlock->size); ++m_AllocCount; } void VmaBlockMetadata_TLSF::Free(VmaAllocHandle allocHandle) { Block* block = (Block*)allocHandle; Block* next = block->nextPhysical; VMA_ASSERT(!block->IsFree() && "Block is already free!"); if (!IsVirtual()) m_GranularityHandler.FreePages(block->offset, block->size); --m_AllocCount; VkDeviceSize debugMargin = GetDebugMargin(); if (debugMargin > 0) { RemoveFreeBlock(next); MergeBlock(next, block); block = next; next = next->nextPhysical; } // Try merging Block* prev = block->prevPhysical; if (prev != VMA_NULL && prev->IsFree() && prev->size != debugMargin) { RemoveFreeBlock(prev); MergeBlock(block, prev); } if (!next->IsFree()) InsertFreeBlock(block); else if (next == m_NullBlock) MergeBlock(m_NullBlock, block); else { RemoveFreeBlock(next); MergeBlock(next, block); InsertFreeBlock(next); } } void VmaBlockMetadata_TLSF::GetAllocationInfo(VmaAllocHandle allocHandle, VmaVirtualAllocationInfo& outInfo) { Block* block = (Block*)allocHandle; VMA_ASSERT(!block->IsFree() && "Cannot get allocation info for free block!"); outInfo.offset = block->offset; outInfo.size = block->size; outInfo.pUserData = block->UserData(); } void* VmaBlockMetadata_TLSF::GetAllocationUserData(VmaAllocHandle allocHandle) const { Block* block = (Block*)allocHandle; VMA_ASSERT(!block->IsFree() && "Cannot get user data for free block!"); return block->UserData(); } VmaAllocHandle VmaBlockMetadata_TLSF::GetAllocationListBegin() const { if (m_AllocCount == 0) return VK_NULL_HANDLE; for (Block* block = m_NullBlock->prevPhysical; block; block = block->prevPhysical) { if (!block->IsFree()) return (VmaAllocHandle)block; } VMA_ASSERT(false && "If m_AllocCount > 0 then should find any allocation!"); return VK_NULL_HANDLE; } VmaAllocHandle VmaBlockMetadata_TLSF::GetNextAllocation(VmaAllocHandle prevAlloc) const { Block* startBlock = (Block*)prevAlloc; VMA_ASSERT(!startBlock->IsFree() && "Incorrect block!"); for (Block* block = startBlock->prevPhysical; block; block = block->prevPhysical) { if (!block->IsFree()) return (VmaAllocHandle)block; } return VK_NULL_HANDLE; } VkDeviceSize VmaBlockMetadata_TLSF::GetNextFreeRegionSize(VmaAllocHandle alloc) const { Block* block = (Block*)alloc; VMA_ASSERT(!block->IsFree() && "Incorrect block!"); if (block->prevPhysical) return block->prevPhysical->IsFree() ? block->prevPhysical->size : 0; return 0; } void VmaBlockMetadata_TLSF::Clear() { m_AllocCount = 0; m_BlocksFreeCount = 0; m_BlocksFreeSize = 0; m_IsFreeBitmap = 0; m_NullBlock->offset = 0; m_NullBlock->size = GetSize(); Block* block = m_NullBlock->prevPhysical; m_NullBlock->prevPhysical = VMA_NULL; while (block) { Block* prev = block->prevPhysical; m_BlockAllocator.Free(block); block = prev; } memset(m_FreeList, 0, m_ListsCount * sizeof(Block*)); memset(m_InnerIsFreeBitmap, 0, m_MemoryClasses * sizeof(uint32_t)); m_GranularityHandler.Clear(); } void VmaBlockMetadata_TLSF::SetAllocationUserData(VmaAllocHandle allocHandle, void* userData) { Block* block = (Block*)allocHandle; VMA_ASSERT(!block->IsFree() && "Trying to set user data for not allocated block!"); block->UserData() = userData; } void VmaBlockMetadata_TLSF::DebugLogAllAllocations() const { for (Block* block = m_NullBlock->prevPhysical; block != VMA_NULL; block = block->prevPhysical) if (!block->IsFree()) DebugLogAllocation(block->offset, block->size, block->UserData()); } uint8_t VmaBlockMetadata_TLSF::SizeToMemoryClass(VkDeviceSize size) const { if (size > SMALL_BUFFER_SIZE) return uint8_t(VMA_BITSCAN_MSB(size) - MEMORY_CLASS_SHIFT); return 0; } uint16_t VmaBlockMetadata_TLSF::SizeToSecondIndex(VkDeviceSize size, uint8_t memoryClass) const { if (memoryClass == 0) { if (IsVirtual()) return static_cast((size - 1) / 8); else return static_cast((size - 1) / 64); } return static_cast((size >> (memoryClass + MEMORY_CLASS_SHIFT - SECOND_LEVEL_INDEX)) ^ (1U << SECOND_LEVEL_INDEX)); } uint32_t VmaBlockMetadata_TLSF::GetListIndex(uint8_t memoryClass, uint16_t secondIndex) const { if (memoryClass == 0) return secondIndex; const uint32_t index = static_cast(memoryClass - 1) * (1 << SECOND_LEVEL_INDEX) + secondIndex; if (IsVirtual()) return index + (1 << SECOND_LEVEL_INDEX); else return index + 4; } uint32_t VmaBlockMetadata_TLSF::GetListIndex(VkDeviceSize size) const { uint8_t memoryClass = SizeToMemoryClass(size); return GetListIndex(memoryClass, SizeToSecondIndex(size, memoryClass)); } void VmaBlockMetadata_TLSF::RemoveFreeBlock(Block* block) { VMA_ASSERT(block != m_NullBlock); VMA_ASSERT(block->IsFree()); if (block->NextFree() != VMA_NULL) block->NextFree()->PrevFree() = block->PrevFree(); if (block->PrevFree() != VMA_NULL) block->PrevFree()->NextFree() = block->NextFree(); else { uint8_t memClass = SizeToMemoryClass(block->size); uint16_t secondIndex = SizeToSecondIndex(block->size, memClass); uint32_t index = GetListIndex(memClass, secondIndex); VMA_ASSERT(m_FreeList[index] == block); m_FreeList[index] = block->NextFree(); if (block->NextFree() == VMA_NULL) { m_InnerIsFreeBitmap[memClass] &= ~(1U << secondIndex); if (m_InnerIsFreeBitmap[memClass] == 0) m_IsFreeBitmap &= ~(1UL << memClass); } } block->MarkTaken(); block->UserData() = VMA_NULL; --m_BlocksFreeCount; m_BlocksFreeSize -= block->size; } void VmaBlockMetadata_TLSF::InsertFreeBlock(Block* block) { VMA_ASSERT(block != m_NullBlock); VMA_ASSERT(!block->IsFree() && "Cannot insert block twice!"); uint8_t memClass = SizeToMemoryClass(block->size); uint16_t secondIndex = SizeToSecondIndex(block->size, memClass); uint32_t index = GetListIndex(memClass, secondIndex); VMA_ASSERT(index < m_ListsCount); block->PrevFree() = VMA_NULL; block->NextFree() = m_FreeList[index]; m_FreeList[index] = block; if (block->NextFree() != VMA_NULL) block->NextFree()->PrevFree() = block; else { m_InnerIsFreeBitmap[memClass] |= 1U << secondIndex; m_IsFreeBitmap |= 1UL << memClass; } ++m_BlocksFreeCount; m_BlocksFreeSize += block->size; } void VmaBlockMetadata_TLSF::MergeBlock(Block* block, Block* prev) { VMA_ASSERT(block->prevPhysical == prev && "Cannot merge separate physical regions!"); VMA_ASSERT(!prev->IsFree() && "Cannot merge block that belongs to free list!"); block->offset = prev->offset; block->size += prev->size; block->prevPhysical = prev->prevPhysical; if (block->prevPhysical) block->prevPhysical->nextPhysical = block; m_BlockAllocator.Free(prev); } VmaBlockMetadata_TLSF::Block* VmaBlockMetadata_TLSF::FindFreeBlock(VkDeviceSize size, uint32_t& listIndex) const { uint8_t memoryClass = SizeToMemoryClass(size); uint32_t innerFreeMap = m_InnerIsFreeBitmap[memoryClass] & (~0U << SizeToSecondIndex(size, memoryClass)); if (!innerFreeMap) { // Check higher levels for available blocks uint32_t freeMap = m_IsFreeBitmap & (~0UL << (memoryClass + 1)); if (!freeMap) return VMA_NULL; // No more memory available // Find lowest free region memoryClass = VMA_BITSCAN_LSB(freeMap); innerFreeMap = m_InnerIsFreeBitmap[memoryClass]; VMA_ASSERT(innerFreeMap != 0); } // Find lowest free subregion listIndex = GetListIndex(memoryClass, VMA_BITSCAN_LSB(innerFreeMap)); VMA_ASSERT(m_FreeList[listIndex]); return m_FreeList[listIndex]; } bool VmaBlockMetadata_TLSF::CheckBlock( Block& block, uint32_t listIndex, VkDeviceSize allocSize, VkDeviceSize allocAlignment, VmaSuballocationType allocType, VmaAllocationRequest* pAllocationRequest) { VMA_ASSERT(block.IsFree() && "Block is already taken!"); VkDeviceSize alignedOffset = VmaAlignUp(block.offset, allocAlignment); if (block.size < allocSize + alignedOffset - block.offset) return false; // Check for granularity conflicts if (!IsVirtual() && m_GranularityHandler.CheckConflictAndAlignUp(alignedOffset, allocSize, block.offset, block.size, allocType)) return false; // Alloc successful pAllocationRequest->type = VmaAllocationRequestType::TLSF; pAllocationRequest->allocHandle = (VmaAllocHandle)█ pAllocationRequest->size = allocSize - GetDebugMargin(); pAllocationRequest->customData = (void*)allocType; pAllocationRequest->algorithmData = alignedOffset; // Place block at the start of list if it's normal block if (listIndex != m_ListsCount && block.PrevFree()) { block.PrevFree()->NextFree() = block.NextFree(); if (block.NextFree()) block.NextFree()->PrevFree() = block.PrevFree(); block.PrevFree() = VMA_NULL; block.NextFree() = m_FreeList[listIndex]; m_FreeList[listIndex] = █ if (block.NextFree()) block.NextFree()->PrevFree() = █ } return true; } #endif // _VMA_BLOCK_METADATA_TLSF_FUNCTIONS #endif // _VMA_BLOCK_METADATA_TLSF #ifndef _VMA_BLOCK_VECTOR /* Sequence of VmaDeviceMemoryBlock. Represents memory blocks allocated for a specific Vulkan memory type. Synchronized internally with a mutex. */ class VmaBlockVector { friend struct VmaDefragmentationContext_T; VMA_CLASS_NO_COPY_NO_MOVE(VmaBlockVector) public: VmaBlockVector( VmaAllocator hAllocator, VmaPool hParentPool, uint32_t memoryTypeIndex, VkDeviceSize preferredBlockSize, size_t minBlockCount, size_t maxBlockCount, VkDeviceSize bufferImageGranularity, bool explicitBlockSize, uint32_t algorithm, float priority, VkDeviceSize minAllocationAlignment, void* pMemoryAllocateNext); ~VmaBlockVector(); VmaAllocator GetAllocator() const { return m_hAllocator; } VmaPool GetParentPool() const { return m_hParentPool; } bool IsCustomPool() const { return m_hParentPool != VMA_NULL; } uint32_t GetMemoryTypeIndex() const { return m_MemoryTypeIndex; } VkDeviceSize GetPreferredBlockSize() const { return m_PreferredBlockSize; } VkDeviceSize GetBufferImageGranularity() const { return m_BufferImageGranularity; } uint32_t GetAlgorithm() const { return m_Algorithm; } bool HasExplicitBlockSize() const { return m_ExplicitBlockSize; } float GetPriority() const { return m_Priority; } const void* GetAllocationNextPtr() const { return m_pMemoryAllocateNext; } // To be used only while the m_Mutex is locked. Used during defragmentation. size_t GetBlockCount() const { return m_Blocks.size(); } // To be used only while the m_Mutex is locked. Used during defragmentation. VmaDeviceMemoryBlock* GetBlock(size_t index) const { return m_Blocks[index]; } VMA_RW_MUTEX &GetMutex() { return m_Mutex; } VkResult CreateMinBlocks(); void AddStatistics(VmaStatistics& inoutStats); void AddDetailedStatistics(VmaDetailedStatistics& inoutStats); bool IsEmpty(); bool IsCorruptionDetectionEnabled() const; VkResult Allocate( VkDeviceSize size, VkDeviceSize alignment, const VmaAllocationCreateInfo& createInfo, VmaSuballocationType suballocType, size_t allocationCount, VmaAllocation* pAllocations); void Free(const VmaAllocation hAllocation); #if VMA_STATS_STRING_ENABLED void PrintDetailedMap(class VmaJsonWriter& json); #endif VkResult CheckCorruption(); private: const VmaAllocator m_hAllocator; const VmaPool m_hParentPool; const uint32_t m_MemoryTypeIndex; const VkDeviceSize m_PreferredBlockSize; const size_t m_MinBlockCount; const size_t m_MaxBlockCount; const VkDeviceSize m_BufferImageGranularity; const bool m_ExplicitBlockSize; const uint32_t m_Algorithm; const float m_Priority; const VkDeviceSize m_MinAllocationAlignment; void* const m_pMemoryAllocateNext; VMA_RW_MUTEX m_Mutex; // Incrementally sorted by sumFreeSize, ascending. VmaVector> m_Blocks; uint32_t m_NextBlockId; bool m_IncrementalSort = true; void SetIncrementalSort(bool val) { m_IncrementalSort = val; } VkDeviceSize CalcMaxBlockSize() const; // Finds and removes given block from vector. void Remove(VmaDeviceMemoryBlock* pBlock); // Performs single step in sorting m_Blocks. They may not be fully sorted // after this call. void IncrementallySortBlocks(); void SortByFreeSize(); VkResult AllocatePage( VkDeviceSize size, VkDeviceSize alignment, const VmaAllocationCreateInfo& createInfo, VmaSuballocationType suballocType, VmaAllocation* pAllocation); VkResult AllocateFromBlock( VmaDeviceMemoryBlock* pBlock, VkDeviceSize size, VkDeviceSize alignment, VmaAllocationCreateFlags allocFlags, void* pUserData, VmaSuballocationType suballocType, uint32_t strategy, VmaAllocation* pAllocation); VkResult CommitAllocationRequest( VmaAllocationRequest& allocRequest, VmaDeviceMemoryBlock* pBlock, VkDeviceSize alignment, VmaAllocationCreateFlags allocFlags, void* pUserData, VmaSuballocationType suballocType, VmaAllocation* pAllocation); VkResult CreateBlock(VkDeviceSize blockSize, size_t* pNewBlockIndex); bool HasEmptyBlock(); }; #endif // _VMA_BLOCK_VECTOR #ifndef _VMA_DEFRAGMENTATION_CONTEXT struct VmaDefragmentationContext_T { VMA_CLASS_NO_COPY_NO_MOVE(VmaDefragmentationContext_T) public: VmaDefragmentationContext_T( VmaAllocator hAllocator, const VmaDefragmentationInfo& info); ~VmaDefragmentationContext_T(); void GetStats(VmaDefragmentationStats& outStats) { outStats = m_GlobalStats; } VkResult DefragmentPassBegin(VmaDefragmentationPassMoveInfo& moveInfo); VkResult DefragmentPassEnd(VmaDefragmentationPassMoveInfo& moveInfo); private: // Max number of allocations to ignore due to size constraints before ending single pass static const uint8_t MAX_ALLOCS_TO_IGNORE = 16; enum class CounterStatus { Pass, Ignore, End }; struct FragmentedBlock { uint32_t data; VmaDeviceMemoryBlock* block; }; struct StateBalanced { VkDeviceSize avgFreeSize = 0; VkDeviceSize avgAllocSize = UINT64_MAX; }; struct StateExtensive { enum class Operation : uint8_t { FindFreeBlockBuffer, FindFreeBlockTexture, FindFreeBlockAll, MoveBuffers, MoveTextures, MoveAll, Cleanup, Done }; Operation operation = Operation::FindFreeBlockTexture; size_t firstFreeBlock = SIZE_MAX; }; struct MoveAllocationData { VkDeviceSize size; VkDeviceSize alignment; VmaSuballocationType type; VmaAllocationCreateFlags flags; VmaDefragmentationMove move = {}; }; const VkDeviceSize m_MaxPassBytes; const uint32_t m_MaxPassAllocations; const PFN_vmaCheckDefragmentationBreakFunction m_BreakCallback; void* m_BreakCallbackUserData; VmaStlAllocator m_MoveAllocator; VmaVector> m_Moves; uint8_t m_IgnoredAllocs = 0; uint32_t m_Algorithm; uint32_t m_BlockVectorCount; VmaBlockVector* m_PoolBlockVector; VmaBlockVector** m_pBlockVectors; size_t m_ImmovableBlockCount = 0; VmaDefragmentationStats m_GlobalStats = { 0 }; VmaDefragmentationStats m_PassStats = { 0 }; void* m_AlgorithmState = VMA_NULL; static MoveAllocationData GetMoveData(VmaAllocHandle handle, VmaBlockMetadata* metadata); CounterStatus CheckCounters(VkDeviceSize bytes); bool IncrementCounters(VkDeviceSize bytes); bool ReallocWithinBlock(VmaBlockVector& vector, VmaDeviceMemoryBlock* block); bool AllocInOtherBlock(size_t start, size_t end, MoveAllocationData& data, VmaBlockVector& vector); bool ComputeDefragmentation(VmaBlockVector& vector, size_t index); bool ComputeDefragmentation_Fast(VmaBlockVector& vector); bool ComputeDefragmentation_Balanced(VmaBlockVector& vector, size_t index, bool update); bool ComputeDefragmentation_Full(VmaBlockVector& vector); bool ComputeDefragmentation_Extensive(VmaBlockVector& vector, size_t index); void UpdateVectorStatistics(VmaBlockVector& vector, StateBalanced& state); bool MoveDataToFreeBlocks(VmaSuballocationType currentType, VmaBlockVector& vector, size_t firstFreeBlock, bool& texturePresent, bool& bufferPresent, bool& otherPresent); }; #endif // _VMA_DEFRAGMENTATION_CONTEXT #ifndef _VMA_POOL_T struct VmaPool_T { friend struct VmaPoolListItemTraits; VMA_CLASS_NO_COPY_NO_MOVE(VmaPool_T) public: VmaBlockVector m_BlockVector; VmaDedicatedAllocationList m_DedicatedAllocations; VmaPool_T( VmaAllocator hAllocator, const VmaPoolCreateInfo& createInfo, VkDeviceSize preferredBlockSize); ~VmaPool_T(); uint32_t GetId() const { return m_Id; } void SetId(uint32_t id) { VMA_ASSERT(m_Id == 0); m_Id = id; } const char* GetName() const { return m_Name; } void SetName(const char* pName); #if VMA_STATS_STRING_ENABLED //void PrintDetailedMap(class VmaStringBuilder& sb); #endif private: uint32_t m_Id; char* m_Name; VmaPool_T* m_PrevPool = VMA_NULL; VmaPool_T* m_NextPool = VMA_NULL; }; struct VmaPoolListItemTraits { typedef VmaPool_T ItemType; static ItemType* GetPrev(const ItemType* item) { return item->m_PrevPool; } static ItemType* GetNext(const ItemType* item) { return item->m_NextPool; } static ItemType*& AccessPrev(ItemType* item) { return item->m_PrevPool; } static ItemType*& AccessNext(ItemType* item) { return item->m_NextPool; } }; #endif // _VMA_POOL_T #ifndef _VMA_CURRENT_BUDGET_DATA struct VmaCurrentBudgetData { VMA_CLASS_NO_COPY_NO_MOVE(VmaCurrentBudgetData) public: VMA_ATOMIC_UINT32 m_BlockCount[VK_MAX_MEMORY_HEAPS]; VMA_ATOMIC_UINT32 m_AllocationCount[VK_MAX_MEMORY_HEAPS]; VMA_ATOMIC_UINT64 m_BlockBytes[VK_MAX_MEMORY_HEAPS]; VMA_ATOMIC_UINT64 m_AllocationBytes[VK_MAX_MEMORY_HEAPS]; #if VMA_MEMORY_BUDGET VMA_ATOMIC_UINT32 m_OperationsSinceBudgetFetch; VMA_RW_MUTEX m_BudgetMutex; uint64_t m_VulkanUsage[VK_MAX_MEMORY_HEAPS]; uint64_t m_VulkanBudget[VK_MAX_MEMORY_HEAPS]; uint64_t m_BlockBytesAtBudgetFetch[VK_MAX_MEMORY_HEAPS]; #endif // VMA_MEMORY_BUDGET VmaCurrentBudgetData(); void AddAllocation(uint32_t heapIndex, VkDeviceSize allocationSize); void RemoveAllocation(uint32_t heapIndex, VkDeviceSize allocationSize); }; #ifndef _VMA_CURRENT_BUDGET_DATA_FUNCTIONS VmaCurrentBudgetData::VmaCurrentBudgetData() { for (uint32_t heapIndex = 0; heapIndex < VK_MAX_MEMORY_HEAPS; ++heapIndex) { m_BlockCount[heapIndex] = 0; m_AllocationCount[heapIndex] = 0; m_BlockBytes[heapIndex] = 0; m_AllocationBytes[heapIndex] = 0; #if VMA_MEMORY_BUDGET m_VulkanUsage[heapIndex] = 0; m_VulkanBudget[heapIndex] = 0; m_BlockBytesAtBudgetFetch[heapIndex] = 0; #endif } #if VMA_MEMORY_BUDGET m_OperationsSinceBudgetFetch = 0; #endif } void VmaCurrentBudgetData::AddAllocation(uint32_t heapIndex, VkDeviceSize allocationSize) { m_AllocationBytes[heapIndex] += allocationSize; ++m_AllocationCount[heapIndex]; #if VMA_MEMORY_BUDGET ++m_OperationsSinceBudgetFetch; #endif } void VmaCurrentBudgetData::RemoveAllocation(uint32_t heapIndex, VkDeviceSize allocationSize) { VMA_ASSERT(m_AllocationBytes[heapIndex] >= allocationSize); m_AllocationBytes[heapIndex] -= allocationSize; VMA_ASSERT(m_AllocationCount[heapIndex] > 0); --m_AllocationCount[heapIndex]; #if VMA_MEMORY_BUDGET ++m_OperationsSinceBudgetFetch; #endif } #endif // _VMA_CURRENT_BUDGET_DATA_FUNCTIONS #endif // _VMA_CURRENT_BUDGET_DATA #ifndef _VMA_ALLOCATION_OBJECT_ALLOCATOR /* Thread-safe wrapper over VmaPoolAllocator free list, for allocation of VmaAllocation_T objects. */ class VmaAllocationObjectAllocator { VMA_CLASS_NO_COPY_NO_MOVE(VmaAllocationObjectAllocator) public: VmaAllocationObjectAllocator(const VkAllocationCallbacks* pAllocationCallbacks) : m_Allocator(pAllocationCallbacks, 1024) {} template VmaAllocation Allocate(Types&&... args); void Free(VmaAllocation hAlloc); private: VMA_MUTEX m_Mutex; VmaPoolAllocator m_Allocator; }; template VmaAllocation VmaAllocationObjectAllocator::Allocate(Types&&... args) { VmaMutexLock mutexLock(m_Mutex); return m_Allocator.Alloc(std::forward(args)...); } void VmaAllocationObjectAllocator::Free(VmaAllocation hAlloc) { VmaMutexLock mutexLock(m_Mutex); m_Allocator.Free(hAlloc); } #endif // _VMA_ALLOCATION_OBJECT_ALLOCATOR #ifndef _VMA_VIRTUAL_BLOCK_T struct VmaVirtualBlock_T { VMA_CLASS_NO_COPY_NO_MOVE(VmaVirtualBlock_T) public: const bool m_AllocationCallbacksSpecified; const VkAllocationCallbacks m_AllocationCallbacks; VmaVirtualBlock_T(const VmaVirtualBlockCreateInfo& createInfo); ~VmaVirtualBlock_T(); VkResult Init() { return VK_SUCCESS; } bool IsEmpty() const { return m_Metadata->IsEmpty(); } void Free(VmaVirtualAllocation allocation) { m_Metadata->Free((VmaAllocHandle)allocation); } void SetAllocationUserData(VmaVirtualAllocation allocation, void* userData) { m_Metadata->SetAllocationUserData((VmaAllocHandle)allocation, userData); } void Clear() { m_Metadata->Clear(); } const VkAllocationCallbacks* GetAllocationCallbacks() const; void GetAllocationInfo(VmaVirtualAllocation allocation, VmaVirtualAllocationInfo& outInfo); VkResult Allocate(const VmaVirtualAllocationCreateInfo& createInfo, VmaVirtualAllocation& outAllocation, VkDeviceSize* outOffset); void GetStatistics(VmaStatistics& outStats) const; void CalculateDetailedStatistics(VmaDetailedStatistics& outStats) const; #if VMA_STATS_STRING_ENABLED void BuildStatsString(bool detailedMap, VmaStringBuilder& sb) const; #endif private: VmaBlockMetadata* m_Metadata; }; #ifndef _VMA_VIRTUAL_BLOCK_T_FUNCTIONS VmaVirtualBlock_T::VmaVirtualBlock_T(const VmaVirtualBlockCreateInfo& createInfo) : m_AllocationCallbacksSpecified(createInfo.pAllocationCallbacks != VMA_NULL), m_AllocationCallbacks(createInfo.pAllocationCallbacks != VMA_NULL ? *createInfo.pAllocationCallbacks : VmaEmptyAllocationCallbacks) { const uint32_t algorithm = createInfo.flags & VMA_VIRTUAL_BLOCK_CREATE_ALGORITHM_MASK; switch (algorithm) { case 0: m_Metadata = vma_new(GetAllocationCallbacks(), VmaBlockMetadata_TLSF)(VK_NULL_HANDLE, 1, true); break; case VMA_VIRTUAL_BLOCK_CREATE_LINEAR_ALGORITHM_BIT: m_Metadata = vma_new(GetAllocationCallbacks(), VmaBlockMetadata_Linear)(VK_NULL_HANDLE, 1, true); break; default: VMA_ASSERT(0); m_Metadata = vma_new(GetAllocationCallbacks(), VmaBlockMetadata_TLSF)(VK_NULL_HANDLE, 1, true); } m_Metadata->Init(createInfo.size); } VmaVirtualBlock_T::~VmaVirtualBlock_T() { // Define macro VMA_DEBUG_LOG_FORMAT or more specialized VMA_LEAK_LOG_FORMAT // to receive the list of the unfreed allocations. if (!m_Metadata->IsEmpty()) m_Metadata->DebugLogAllAllocations(); // This is the most important assert in the entire library. // Hitting it means you have some memory leak - unreleased virtual allocations. VMA_ASSERT_LEAK(m_Metadata->IsEmpty() && "Some virtual allocations were not freed before destruction of this virtual block!"); vma_delete(GetAllocationCallbacks(), m_Metadata); } const VkAllocationCallbacks* VmaVirtualBlock_T::GetAllocationCallbacks() const { return m_AllocationCallbacksSpecified ? &m_AllocationCallbacks : VMA_NULL; } void VmaVirtualBlock_T::GetAllocationInfo(VmaVirtualAllocation allocation, VmaVirtualAllocationInfo& outInfo) { m_Metadata->GetAllocationInfo((VmaAllocHandle)allocation, outInfo); } VkResult VmaVirtualBlock_T::Allocate(const VmaVirtualAllocationCreateInfo& createInfo, VmaVirtualAllocation& outAllocation, VkDeviceSize* outOffset) { VmaAllocationRequest request = {}; if (m_Metadata->CreateAllocationRequest( createInfo.size, // allocSize VMA_MAX(createInfo.alignment, (VkDeviceSize)1), // allocAlignment (createInfo.flags & VMA_VIRTUAL_ALLOCATION_CREATE_UPPER_ADDRESS_BIT) != 0, // upperAddress VMA_SUBALLOCATION_TYPE_UNKNOWN, // allocType - unimportant createInfo.flags & VMA_VIRTUAL_ALLOCATION_CREATE_STRATEGY_MASK, // strategy &request)) { m_Metadata->Alloc(request, VMA_SUBALLOCATION_TYPE_UNKNOWN, // type - unimportant createInfo.pUserData); outAllocation = (VmaVirtualAllocation)request.allocHandle; if(outOffset) *outOffset = m_Metadata->GetAllocationOffset(request.allocHandle); return VK_SUCCESS; } outAllocation = (VmaVirtualAllocation)VK_NULL_HANDLE; if (outOffset) *outOffset = UINT64_MAX; return VK_ERROR_OUT_OF_DEVICE_MEMORY; } void VmaVirtualBlock_T::GetStatistics(VmaStatistics& outStats) const { VmaClearStatistics(outStats); m_Metadata->AddStatistics(outStats); } void VmaVirtualBlock_T::CalculateDetailedStatistics(VmaDetailedStatistics& outStats) const { VmaClearDetailedStatistics(outStats); m_Metadata->AddDetailedStatistics(outStats); } #if VMA_STATS_STRING_ENABLED void VmaVirtualBlock_T::BuildStatsString(bool detailedMap, VmaStringBuilder& sb) const { VmaJsonWriter json(GetAllocationCallbacks(), sb); json.BeginObject(); VmaDetailedStatistics stats; CalculateDetailedStatistics(stats); json.WriteString("Stats"); VmaPrintDetailedStatistics(json, stats); if (detailedMap) { json.WriteString("Details"); json.BeginObject(); m_Metadata->PrintDetailedMap(json); json.EndObject(); } json.EndObject(); } #endif // VMA_STATS_STRING_ENABLED #endif // _VMA_VIRTUAL_BLOCK_T_FUNCTIONS #endif // _VMA_VIRTUAL_BLOCK_T // Main allocator object. struct VmaAllocator_T { VMA_CLASS_NO_COPY_NO_MOVE(VmaAllocator_T) public: const bool m_UseMutex; const uint32_t m_VulkanApiVersion; bool m_UseKhrDedicatedAllocation; // Can be set only if m_VulkanApiVersion < VK_MAKE_VERSION(1, 1, 0). bool m_UseKhrBindMemory2; // Can be set only if m_VulkanApiVersion < VK_MAKE_VERSION(1, 1, 0). bool m_UseExtMemoryBudget; bool m_UseAmdDeviceCoherentMemory; bool m_UseKhrBufferDeviceAddress; bool m_UseExtMemoryPriority; bool m_UseKhrMaintenance4; bool m_UseKhrMaintenance5; bool m_UseKhrExternalMemoryWin32; const VkDevice m_hDevice; const VkInstance m_hInstance; const bool m_AllocationCallbacksSpecified; const VkAllocationCallbacks m_AllocationCallbacks; VmaDeviceMemoryCallbacks m_DeviceMemoryCallbacks; VmaAllocationObjectAllocator m_AllocationObjectAllocator; // Each bit (1 << i) is set if HeapSizeLimit is enabled for that heap, so cannot allocate more than the heap size. uint32_t m_HeapSizeLimitMask; VkPhysicalDeviceProperties m_PhysicalDeviceProperties; VkPhysicalDeviceMemoryProperties m_MemProps; // Default pools. VmaBlockVector* m_pBlockVectors[VK_MAX_MEMORY_TYPES]; VmaDedicatedAllocationList m_DedicatedAllocations[VK_MAX_MEMORY_TYPES]; VmaCurrentBudgetData m_Budget; VMA_ATOMIC_UINT32 m_DeviceMemoryCount; // Total number of VkDeviceMemory objects. VmaAllocator_T(const VmaAllocatorCreateInfo* pCreateInfo); VkResult Init(const VmaAllocatorCreateInfo* pCreateInfo); ~VmaAllocator_T(); const VkAllocationCallbacks* GetAllocationCallbacks() const { return m_AllocationCallbacksSpecified ? &m_AllocationCallbacks : VMA_NULL; } const VmaVulkanFunctions& GetVulkanFunctions() const { return m_VulkanFunctions; } VkPhysicalDevice GetPhysicalDevice() const { return m_PhysicalDevice; } VkDeviceSize GetBufferImageGranularity() const { return VMA_MAX( static_cast(VMA_DEBUG_MIN_BUFFER_IMAGE_GRANULARITY), m_PhysicalDeviceProperties.limits.bufferImageGranularity); } uint32_t GetMemoryHeapCount() const { return m_MemProps.memoryHeapCount; } uint32_t GetMemoryTypeCount() const { return m_MemProps.memoryTypeCount; } uint32_t MemoryTypeIndexToHeapIndex(uint32_t memTypeIndex) const { VMA_ASSERT(memTypeIndex < m_MemProps.memoryTypeCount); return m_MemProps.memoryTypes[memTypeIndex].heapIndex; } // True when specific memory type is HOST_VISIBLE but not HOST_COHERENT. bool IsMemoryTypeNonCoherent(uint32_t memTypeIndex) const { return (m_MemProps.memoryTypes[memTypeIndex].propertyFlags & (VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT)) == VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT; } // Minimum alignment for all allocations in specific memory type. VkDeviceSize GetMemoryTypeMinAlignment(uint32_t memTypeIndex) const { return IsMemoryTypeNonCoherent(memTypeIndex) ? VMA_MAX((VkDeviceSize)VMA_MIN_ALIGNMENT, m_PhysicalDeviceProperties.limits.nonCoherentAtomSize) : (VkDeviceSize)VMA_MIN_ALIGNMENT; } bool IsIntegratedGpu() const { return m_PhysicalDeviceProperties.deviceType == VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU; } uint32_t GetGlobalMemoryTypeBits() const { return m_GlobalMemoryTypeBits; } void GetBufferMemoryRequirements( VkBuffer hBuffer, VkMemoryRequirements& memReq, bool& requiresDedicatedAllocation, bool& prefersDedicatedAllocation) const; void GetImageMemoryRequirements( VkImage hImage, VkMemoryRequirements& memReq, bool& requiresDedicatedAllocation, bool& prefersDedicatedAllocation) const; VkResult FindMemoryTypeIndex( uint32_t memoryTypeBits, const VmaAllocationCreateInfo* pAllocationCreateInfo, VmaBufferImageUsage bufImgUsage, uint32_t* pMemoryTypeIndex) const; // Main allocation function. VkResult AllocateMemory( const VkMemoryRequirements& vkMemReq, bool requiresDedicatedAllocation, bool prefersDedicatedAllocation, VkBuffer dedicatedBuffer, VkImage dedicatedImage, VmaBufferImageUsage dedicatedBufferImageUsage, const VmaAllocationCreateInfo& createInfo, VmaSuballocationType suballocType, size_t allocationCount, VmaAllocation* pAllocations); // Main deallocation function. void FreeMemory( size_t allocationCount, const VmaAllocation* pAllocations); void CalculateStatistics(VmaTotalStatistics* pStats); void GetHeapBudgets( VmaBudget* outBudgets, uint32_t firstHeap, uint32_t heapCount); #if VMA_STATS_STRING_ENABLED void PrintDetailedMap(class VmaJsonWriter& json); #endif void GetAllocationInfo(VmaAllocation hAllocation, VmaAllocationInfo* pAllocationInfo); void GetAllocationInfo2(VmaAllocation hAllocation, VmaAllocationInfo2* pAllocationInfo); VkResult CreatePool(const VmaPoolCreateInfo* pCreateInfo, VmaPool* pPool); void DestroyPool(VmaPool pool); void GetPoolStatistics(VmaPool pool, VmaStatistics* pPoolStats); void CalculatePoolStatistics(VmaPool pool, VmaDetailedStatistics* pPoolStats); void SetCurrentFrameIndex(uint32_t frameIndex); uint32_t GetCurrentFrameIndex() const { return m_CurrentFrameIndex.load(); } VkResult CheckPoolCorruption(VmaPool hPool); VkResult CheckCorruption(uint32_t memoryTypeBits); // Call to Vulkan function vkAllocateMemory with accompanying bookkeeping. VkResult AllocateVulkanMemory(const VkMemoryAllocateInfo* pAllocateInfo, VkDeviceMemory* pMemory); // Call to Vulkan function vkFreeMemory with accompanying bookkeeping. void FreeVulkanMemory(uint32_t memoryType, VkDeviceSize size, VkDeviceMemory hMemory); // Call to Vulkan function vkBindBufferMemory or vkBindBufferMemory2KHR. VkResult BindVulkanBuffer( VkDeviceMemory memory, VkDeviceSize memoryOffset, VkBuffer buffer, const void* pNext); // Call to Vulkan function vkBindImageMemory or vkBindImageMemory2KHR. VkResult BindVulkanImage( VkDeviceMemory memory, VkDeviceSize memoryOffset, VkImage image, const void* pNext); VkResult Map(VmaAllocation hAllocation, void** ppData); void Unmap(VmaAllocation hAllocation); VkResult BindBufferMemory( VmaAllocation hAllocation, VkDeviceSize allocationLocalOffset, VkBuffer hBuffer, const void* pNext); VkResult BindImageMemory( VmaAllocation hAllocation, VkDeviceSize allocationLocalOffset, VkImage hImage, const void* pNext); VkResult FlushOrInvalidateAllocation( VmaAllocation hAllocation, VkDeviceSize offset, VkDeviceSize size, VMA_CACHE_OPERATION op); VkResult FlushOrInvalidateAllocations( uint32_t allocationCount, const VmaAllocation* allocations, const VkDeviceSize* offsets, const VkDeviceSize* sizes, VMA_CACHE_OPERATION op); VkResult CopyMemoryToAllocation( const void* pSrcHostPointer, VmaAllocation dstAllocation, VkDeviceSize dstAllocationLocalOffset, VkDeviceSize size); VkResult CopyAllocationToMemory( VmaAllocation srcAllocation, VkDeviceSize srcAllocationLocalOffset, void* pDstHostPointer, VkDeviceSize size); void FillAllocation(const VmaAllocation hAllocation, uint8_t pattern); /* Returns bit mask of memory types that can support defragmentation on GPU as they support creation of required buffer for copy operations. */ uint32_t GetGpuDefragmentationMemoryTypeBits(); #if VMA_EXTERNAL_MEMORY VkExternalMemoryHandleTypeFlagsKHR GetExternalMemoryHandleTypeFlags(uint32_t memTypeIndex) const { return m_TypeExternalMemoryHandleTypes[memTypeIndex]; } #endif // #if VMA_EXTERNAL_MEMORY private: VkDeviceSize m_PreferredLargeHeapBlockSize; VkPhysicalDevice m_PhysicalDevice; VMA_ATOMIC_UINT32 m_CurrentFrameIndex; VMA_ATOMIC_UINT32 m_GpuDefragmentationMemoryTypeBits; // UINT32_MAX means uninitialized. #if VMA_EXTERNAL_MEMORY VkExternalMemoryHandleTypeFlagsKHR m_TypeExternalMemoryHandleTypes[VK_MAX_MEMORY_TYPES]; #endif // #if VMA_EXTERNAL_MEMORY VMA_RW_MUTEX m_PoolsMutex; typedef VmaIntrusiveLinkedList PoolList; // Protected by m_PoolsMutex. PoolList m_Pools; uint32_t m_NextPoolId; VmaVulkanFunctions m_VulkanFunctions; // Global bit mask AND-ed with any memoryTypeBits to disallow certain memory types. uint32_t m_GlobalMemoryTypeBits; void ImportVulkanFunctions(const VmaVulkanFunctions* pVulkanFunctions); #if VMA_STATIC_VULKAN_FUNCTIONS == 1 void ImportVulkanFunctions_Static(); #endif void ImportVulkanFunctions_Custom(const VmaVulkanFunctions* pVulkanFunctions); #if VMA_DYNAMIC_VULKAN_FUNCTIONS == 1 void ImportVulkanFunctions_Dynamic(); #endif void ValidateVulkanFunctions(); VkDeviceSize CalcPreferredBlockSize(uint32_t memTypeIndex); VkResult AllocateMemoryOfType( VmaPool pool, VkDeviceSize size, VkDeviceSize alignment, bool dedicatedPreferred, VkBuffer dedicatedBuffer, VkImage dedicatedImage, VmaBufferImageUsage dedicatedBufferImageUsage, const VmaAllocationCreateInfo& createInfo, uint32_t memTypeIndex, VmaSuballocationType suballocType, VmaDedicatedAllocationList& dedicatedAllocations, VmaBlockVector& blockVector, size_t allocationCount, VmaAllocation* pAllocations); // Helper function only to be used inside AllocateDedicatedMemory. VkResult AllocateDedicatedMemoryPage( VmaPool pool, VkDeviceSize size, VmaSuballocationType suballocType, uint32_t memTypeIndex, const VkMemoryAllocateInfo& allocInfo, bool map, bool isUserDataString, bool isMappingAllowed, void* pUserData, VmaAllocation* pAllocation); // Allocates and registers new VkDeviceMemory specifically for dedicated allocations. VkResult AllocateDedicatedMemory( VmaPool pool, VkDeviceSize size, VmaSuballocationType suballocType, VmaDedicatedAllocationList& dedicatedAllocations, uint32_t memTypeIndex, bool map, bool isUserDataString, bool isMappingAllowed, bool canAliasMemory, void* pUserData, float priority, VkBuffer dedicatedBuffer, VkImage dedicatedImage, VmaBufferImageUsage dedicatedBufferImageUsage, size_t allocationCount, VmaAllocation* pAllocations, const void* pNextChain = VMA_NULL); void FreeDedicatedMemory(const VmaAllocation allocation); VkResult CalcMemTypeParams( VmaAllocationCreateInfo& outCreateInfo, uint32_t memTypeIndex, VkDeviceSize size, size_t allocationCount); VkResult CalcAllocationParams( VmaAllocationCreateInfo& outCreateInfo, bool dedicatedRequired, bool dedicatedPreferred); /* Calculates and returns bit mask of memory types that can support defragmentation on GPU as they support creation of required buffer for copy operations. */ uint32_t CalculateGpuDefragmentationMemoryTypeBits() const; uint32_t CalculateGlobalMemoryTypeBits() const; bool GetFlushOrInvalidateRange( VmaAllocation allocation, VkDeviceSize offset, VkDeviceSize size, VkMappedMemoryRange& outRange) const; #if VMA_MEMORY_BUDGET void UpdateVulkanBudget(); #endif // #if VMA_MEMORY_BUDGET }; #ifndef _VMA_MEMORY_FUNCTIONS static void* VmaMalloc(VmaAllocator hAllocator, size_t size, size_t alignment) { return VmaMalloc(&hAllocator->m_AllocationCallbacks, size, alignment); } static void VmaFree(VmaAllocator hAllocator, void* ptr) { VmaFree(&hAllocator->m_AllocationCallbacks, ptr); } template static T* VmaAllocate(VmaAllocator hAllocator) { return (T*)VmaMalloc(hAllocator, sizeof(T), VMA_ALIGN_OF(T)); } template static T* VmaAllocateArray(VmaAllocator hAllocator, size_t count) { return (T*)VmaMalloc(hAllocator, sizeof(T) * count, VMA_ALIGN_OF(T)); } template static void vma_delete(VmaAllocator hAllocator, T* ptr) { if(ptr != VMA_NULL) { ptr->~T(); VmaFree(hAllocator, ptr); } } template static void vma_delete_array(VmaAllocator hAllocator, T* ptr, size_t count) { if(ptr != VMA_NULL) { for(size_t i = count; i--; ) ptr[i].~T(); VmaFree(hAllocator, ptr); } } #endif // _VMA_MEMORY_FUNCTIONS #ifndef _VMA_DEVICE_MEMORY_BLOCK_FUNCTIONS VmaDeviceMemoryBlock::VmaDeviceMemoryBlock(VmaAllocator hAllocator) : m_pMetadata(VMA_NULL), m_MemoryTypeIndex(UINT32_MAX), m_Id(0), m_hMemory(VK_NULL_HANDLE), m_MapCount(0), m_pMappedData(VMA_NULL){} VmaDeviceMemoryBlock::~VmaDeviceMemoryBlock() { VMA_ASSERT_LEAK(m_MapCount == 0 && "VkDeviceMemory block is being destroyed while it is still mapped."); VMA_ASSERT_LEAK(m_hMemory == VK_NULL_HANDLE); } void VmaDeviceMemoryBlock::Init( VmaAllocator hAllocator, VmaPool hParentPool, uint32_t newMemoryTypeIndex, VkDeviceMemory newMemory, VkDeviceSize newSize, uint32_t id, uint32_t algorithm, VkDeviceSize bufferImageGranularity) { VMA_ASSERT(m_hMemory == VK_NULL_HANDLE); m_hParentPool = hParentPool; m_MemoryTypeIndex = newMemoryTypeIndex; m_Id = id; m_hMemory = newMemory; switch (algorithm) { case 0: m_pMetadata = vma_new(hAllocator, VmaBlockMetadata_TLSF)(hAllocator->GetAllocationCallbacks(), bufferImageGranularity, false); // isVirtual break; case VMA_POOL_CREATE_LINEAR_ALGORITHM_BIT: m_pMetadata = vma_new(hAllocator, VmaBlockMetadata_Linear)(hAllocator->GetAllocationCallbacks(), bufferImageGranularity, false); // isVirtual break; default: VMA_ASSERT(0); m_pMetadata = vma_new(hAllocator, VmaBlockMetadata_TLSF)(hAllocator->GetAllocationCallbacks(), bufferImageGranularity, false); // isVirtual } m_pMetadata->Init(newSize); } void VmaDeviceMemoryBlock::Destroy(VmaAllocator allocator) { // Define macro VMA_DEBUG_LOG_FORMAT or more specialized VMA_LEAK_LOG_FORMAT // to receive the list of the unfreed allocations. if (!m_pMetadata->IsEmpty()) m_pMetadata->DebugLogAllAllocations(); // This is the most important assert in the entire library. // Hitting it means you have some memory leak - unreleased VmaAllocation objects. VMA_ASSERT_LEAK(m_pMetadata->IsEmpty() && "Some allocations were not freed before destruction of this memory block!"); VMA_ASSERT_LEAK(m_hMemory != VK_NULL_HANDLE); allocator->FreeVulkanMemory(m_MemoryTypeIndex, m_pMetadata->GetSize(), m_hMemory); m_hMemory = VK_NULL_HANDLE; vma_delete(allocator, m_pMetadata); m_pMetadata = VMA_NULL; } void VmaDeviceMemoryBlock::PostAlloc(VmaAllocator hAllocator) { VmaMutexLock lock(m_MapAndBindMutex, hAllocator->m_UseMutex); m_MappingHysteresis.PostAlloc(); } void VmaDeviceMemoryBlock::PostFree(VmaAllocator hAllocator) { VmaMutexLock lock(m_MapAndBindMutex, hAllocator->m_UseMutex); if(m_MappingHysteresis.PostFree()) { VMA_ASSERT(m_MappingHysteresis.GetExtraMapping() == 0); if (m_MapCount == 0) { m_pMappedData = VMA_NULL; (*hAllocator->GetVulkanFunctions().vkUnmapMemory)(hAllocator->m_hDevice, m_hMemory); } } } bool VmaDeviceMemoryBlock::Validate() const { VMA_VALIDATE((m_hMemory != VK_NULL_HANDLE) && (m_pMetadata->GetSize() != 0)); return m_pMetadata->Validate(); } VkResult VmaDeviceMemoryBlock::CheckCorruption(VmaAllocator hAllocator) { void* pData = VMA_NULL; VkResult res = Map(hAllocator, 1, &pData); if (res != VK_SUCCESS) { return res; } res = m_pMetadata->CheckCorruption(pData); Unmap(hAllocator, 1); return res; } VkResult VmaDeviceMemoryBlock::Map(VmaAllocator hAllocator, uint32_t count, void** ppData) { if (count == 0) { return VK_SUCCESS; } VmaMutexLock lock(m_MapAndBindMutex, hAllocator->m_UseMutex); const uint32_t oldTotalMapCount = m_MapCount + m_MappingHysteresis.GetExtraMapping(); if (oldTotalMapCount != 0) { VMA_ASSERT(m_pMappedData != VMA_NULL); m_MappingHysteresis.PostMap(); m_MapCount += count; if (ppData != VMA_NULL) { *ppData = m_pMappedData; } return VK_SUCCESS; } else { VkResult result = (*hAllocator->GetVulkanFunctions().vkMapMemory)( hAllocator->m_hDevice, m_hMemory, 0, // offset VK_WHOLE_SIZE, 0, // flags &m_pMappedData); if (result == VK_SUCCESS) { VMA_ASSERT(m_pMappedData != VMA_NULL); m_MappingHysteresis.PostMap(); m_MapCount = count; if (ppData != VMA_NULL) { *ppData = m_pMappedData; } } return result; } } void VmaDeviceMemoryBlock::Unmap(VmaAllocator hAllocator, uint32_t count) { if (count == 0) { return; } VmaMutexLock lock(m_MapAndBindMutex, hAllocator->m_UseMutex); if (m_MapCount >= count) { m_MapCount -= count; const uint32_t totalMapCount = m_MapCount + m_MappingHysteresis.GetExtraMapping(); if (totalMapCount == 0) { m_pMappedData = VMA_NULL; (*hAllocator->GetVulkanFunctions().vkUnmapMemory)(hAllocator->m_hDevice, m_hMemory); } m_MappingHysteresis.PostUnmap(); } else { VMA_ASSERT(0 && "VkDeviceMemory block is being unmapped while it was not previously mapped."); } } VkResult VmaDeviceMemoryBlock::WriteMagicValueAfterAllocation(VmaAllocator hAllocator, VkDeviceSize allocOffset, VkDeviceSize allocSize) { VMA_ASSERT(VMA_DEBUG_MARGIN > 0 && VMA_DEBUG_MARGIN % 4 == 0 && VMA_DEBUG_DETECT_CORRUPTION); void* pData; VkResult res = Map(hAllocator, 1, &pData); if (res != VK_SUCCESS) { return res; } VmaWriteMagicValue(pData, allocOffset + allocSize); Unmap(hAllocator, 1); return VK_SUCCESS; } VkResult VmaDeviceMemoryBlock::ValidateMagicValueAfterAllocation(VmaAllocator hAllocator, VkDeviceSize allocOffset, VkDeviceSize allocSize) { VMA_ASSERT(VMA_DEBUG_MARGIN > 0 && VMA_DEBUG_MARGIN % 4 == 0 && VMA_DEBUG_DETECT_CORRUPTION); void* pData; VkResult res = Map(hAllocator, 1, &pData); if (res != VK_SUCCESS) { return res; } if (!VmaValidateMagicValue(pData, allocOffset + allocSize)) { VMA_ASSERT(0 && "MEMORY CORRUPTION DETECTED AFTER FREED ALLOCATION!"); } Unmap(hAllocator, 1); return VK_SUCCESS; } VkResult VmaDeviceMemoryBlock::BindBufferMemory( const VmaAllocator hAllocator, const VmaAllocation hAllocation, VkDeviceSize allocationLocalOffset, VkBuffer hBuffer, const void* pNext) { VMA_ASSERT(hAllocation->GetType() == VmaAllocation_T::ALLOCATION_TYPE_BLOCK && hAllocation->GetBlock() == this); VMA_ASSERT(allocationLocalOffset < hAllocation->GetSize() && "Invalid allocationLocalOffset. Did you forget that this offset is relative to the beginning of the allocation, not the whole memory block?"); const VkDeviceSize memoryOffset = hAllocation->GetOffset() + allocationLocalOffset; // This lock is important so that we don't call vkBind... and/or vkMap... simultaneously on the same VkDeviceMemory from multiple threads. VmaMutexLock lock(m_MapAndBindMutex, hAllocator->m_UseMutex); return hAllocator->BindVulkanBuffer(m_hMemory, memoryOffset, hBuffer, pNext); } VkResult VmaDeviceMemoryBlock::BindImageMemory( const VmaAllocator hAllocator, const VmaAllocation hAllocation, VkDeviceSize allocationLocalOffset, VkImage hImage, const void* pNext) { VMA_ASSERT(hAllocation->GetType() == VmaAllocation_T::ALLOCATION_TYPE_BLOCK && hAllocation->GetBlock() == this); VMA_ASSERT(allocationLocalOffset < hAllocation->GetSize() && "Invalid allocationLocalOffset. Did you forget that this offset is relative to the beginning of the allocation, not the whole memory block?"); const VkDeviceSize memoryOffset = hAllocation->GetOffset() + allocationLocalOffset; // This lock is important so that we don't call vkBind... and/or vkMap... simultaneously on the same VkDeviceMemory from multiple threads. VmaMutexLock lock(m_MapAndBindMutex, hAllocator->m_UseMutex); return hAllocator->BindVulkanImage(m_hMemory, memoryOffset, hImage, pNext); } #if VMA_EXTERNAL_MEMORY_WIN32 VkResult VmaDeviceMemoryBlock::CreateWin32Handle(const VmaAllocator hAllocator, PFN_vkGetMemoryWin32HandleKHR pvkGetMemoryWin32HandleKHR, HANDLE hTargetProcess, HANDLE* pHandle) noexcept { VMA_ASSERT(pHandle); return m_Handle.GetHandle(hAllocator->m_hDevice, m_hMemory, pvkGetMemoryWin32HandleKHR, hTargetProcess, hAllocator->m_UseMutex, pHandle); } #endif // VMA_EXTERNAL_MEMORY_WIN32 #endif // _VMA_DEVICE_MEMORY_BLOCK_FUNCTIONS #ifndef _VMA_ALLOCATION_T_FUNCTIONS VmaAllocation_T::VmaAllocation_T(bool mappingAllowed) : m_Alignment{ 1 }, m_Size{ 0 }, m_pUserData{ VMA_NULL }, m_pName{ VMA_NULL }, m_MemoryTypeIndex{ 0 }, m_Type{ (uint8_t)ALLOCATION_TYPE_NONE }, m_SuballocationType{ (uint8_t)VMA_SUBALLOCATION_TYPE_UNKNOWN }, m_MapCount{ 0 }, m_Flags{ 0 } { if(mappingAllowed) m_Flags |= (uint8_t)FLAG_MAPPING_ALLOWED; } VmaAllocation_T::~VmaAllocation_T() { VMA_ASSERT_LEAK(m_MapCount == 0 && "Allocation was not unmapped before destruction."); // Check if owned string was freed. VMA_ASSERT(m_pName == VMA_NULL); } void VmaAllocation_T::InitBlockAllocation( VmaDeviceMemoryBlock* block, VmaAllocHandle allocHandle, VkDeviceSize alignment, VkDeviceSize size, uint32_t memoryTypeIndex, VmaSuballocationType suballocationType, bool mapped) { VMA_ASSERT(m_Type == ALLOCATION_TYPE_NONE); VMA_ASSERT(block != VMA_NULL); m_Type = (uint8_t)ALLOCATION_TYPE_BLOCK; m_Alignment = alignment; m_Size = size; m_MemoryTypeIndex = memoryTypeIndex; if(mapped) { VMA_ASSERT(IsMappingAllowed() && "Mapping is not allowed on this allocation! Please use one of the new VMA_ALLOCATION_CREATE_HOST_ACCESS_* flags when creating it."); m_Flags |= (uint8_t)FLAG_PERSISTENT_MAP; } m_SuballocationType = (uint8_t)suballocationType; m_BlockAllocation.m_Block = block; m_BlockAllocation.m_AllocHandle = allocHandle; } void VmaAllocation_T::InitDedicatedAllocation( VmaAllocator allocator, VmaPool hParentPool, uint32_t memoryTypeIndex, VkDeviceMemory hMemory, VmaSuballocationType suballocationType, void* pMappedData, VkDeviceSize size) { VMA_ASSERT(m_Type == ALLOCATION_TYPE_NONE); VMA_ASSERT(hMemory != VK_NULL_HANDLE); m_Type = (uint8_t)ALLOCATION_TYPE_DEDICATED; m_Alignment = 0; m_Size = size; m_MemoryTypeIndex = memoryTypeIndex; m_SuballocationType = (uint8_t)suballocationType; m_DedicatedAllocation.m_ExtraData = VMA_NULL; m_DedicatedAllocation.m_hParentPool = hParentPool; m_DedicatedAllocation.m_hMemory = hMemory; m_DedicatedAllocation.m_Prev = VMA_NULL; m_DedicatedAllocation.m_Next = VMA_NULL; if (pMappedData != VMA_NULL) { VMA_ASSERT(IsMappingAllowed() && "Mapping is not allowed on this allocation! Please use one of the new VMA_ALLOCATION_CREATE_HOST_ACCESS_* flags when creating it."); m_Flags |= (uint8_t)FLAG_PERSISTENT_MAP; EnsureExtraData(allocator); m_DedicatedAllocation.m_ExtraData->m_pMappedData = pMappedData; } } void VmaAllocation_T::Destroy(VmaAllocator allocator) { FreeName(allocator); if (GetType() == ALLOCATION_TYPE_DEDICATED) { vma_delete(allocator, m_DedicatedAllocation.m_ExtraData); } } void VmaAllocation_T::SetName(VmaAllocator hAllocator, const char* pName) { VMA_ASSERT(pName == VMA_NULL || pName != m_pName); FreeName(hAllocator); if (pName != VMA_NULL) m_pName = VmaCreateStringCopy(hAllocator->GetAllocationCallbacks(), pName); } uint8_t VmaAllocation_T::SwapBlockAllocation(VmaAllocator hAllocator, VmaAllocation allocation) { VMA_ASSERT(allocation != VMA_NULL); VMA_ASSERT(m_Type == ALLOCATION_TYPE_BLOCK); VMA_ASSERT(allocation->m_Type == ALLOCATION_TYPE_BLOCK); if (m_MapCount != 0) m_BlockAllocation.m_Block->Unmap(hAllocator, m_MapCount); m_BlockAllocation.m_Block->m_pMetadata->SetAllocationUserData(m_BlockAllocation.m_AllocHandle, allocation); std::swap(m_BlockAllocation, allocation->m_BlockAllocation); m_BlockAllocation.m_Block->m_pMetadata->SetAllocationUserData(m_BlockAllocation.m_AllocHandle, this); #if VMA_STATS_STRING_ENABLED std::swap(m_BufferImageUsage, allocation->m_BufferImageUsage); #endif return m_MapCount; } VmaAllocHandle VmaAllocation_T::GetAllocHandle() const { switch (m_Type) { case ALLOCATION_TYPE_BLOCK: return m_BlockAllocation.m_AllocHandle; case ALLOCATION_TYPE_DEDICATED: return VK_NULL_HANDLE; default: VMA_ASSERT(0); return VK_NULL_HANDLE; } } VkDeviceSize VmaAllocation_T::GetOffset() const { switch (m_Type) { case ALLOCATION_TYPE_BLOCK: return m_BlockAllocation.m_Block->m_pMetadata->GetAllocationOffset(m_BlockAllocation.m_AllocHandle); case ALLOCATION_TYPE_DEDICATED: return 0; default: VMA_ASSERT(0); return 0; } } VmaPool VmaAllocation_T::GetParentPool() const { switch (m_Type) { case ALLOCATION_TYPE_BLOCK: return m_BlockAllocation.m_Block->GetParentPool(); case ALLOCATION_TYPE_DEDICATED: return m_DedicatedAllocation.m_hParentPool; default: VMA_ASSERT(0); return VK_NULL_HANDLE; } } VkDeviceMemory VmaAllocation_T::GetMemory() const { switch (m_Type) { case ALLOCATION_TYPE_BLOCK: return m_BlockAllocation.m_Block->GetDeviceMemory(); case ALLOCATION_TYPE_DEDICATED: return m_DedicatedAllocation.m_hMemory; default: VMA_ASSERT(0); return VK_NULL_HANDLE; } } void* VmaAllocation_T::GetMappedData() const { switch (m_Type) { case ALLOCATION_TYPE_BLOCK: if (m_MapCount != 0 || IsPersistentMap()) { void* pBlockData = m_BlockAllocation.m_Block->GetMappedData(); VMA_ASSERT(pBlockData != VMA_NULL); return (char*)pBlockData + GetOffset(); } else { return VMA_NULL; } break; case ALLOCATION_TYPE_DEDICATED: VMA_ASSERT((m_DedicatedAllocation.m_ExtraData != VMA_NULL && m_DedicatedAllocation.m_ExtraData->m_pMappedData != VMA_NULL) == (m_MapCount != 0 || IsPersistentMap())); return m_DedicatedAllocation.m_ExtraData != VMA_NULL ? m_DedicatedAllocation.m_ExtraData->m_pMappedData : VMA_NULL; default: VMA_ASSERT(0); return VMA_NULL; } } void VmaAllocation_T::BlockAllocMap() { VMA_ASSERT(GetType() == ALLOCATION_TYPE_BLOCK); VMA_ASSERT(IsMappingAllowed() && "Mapping is not allowed on this allocation! Please use one of the new VMA_ALLOCATION_CREATE_HOST_ACCESS_* flags when creating it."); if (m_MapCount < 0xFF) { ++m_MapCount; } else { VMA_ASSERT(0 && "Allocation mapped too many times simultaneously."); } } void VmaAllocation_T::BlockAllocUnmap() { VMA_ASSERT(GetType() == ALLOCATION_TYPE_BLOCK); if (m_MapCount > 0) { --m_MapCount; } else { VMA_ASSERT(0 && "Unmapping allocation not previously mapped."); } } VkResult VmaAllocation_T::DedicatedAllocMap(VmaAllocator hAllocator, void** ppData) { VMA_ASSERT(GetType() == ALLOCATION_TYPE_DEDICATED); VMA_ASSERT(IsMappingAllowed() && "Mapping is not allowed on this allocation! Please use one of the new VMA_ALLOCATION_CREATE_HOST_ACCESS_* flags when creating it."); EnsureExtraData(hAllocator); if (m_MapCount != 0 || IsPersistentMap()) { if (m_MapCount < 0xFF) { VMA_ASSERT(m_DedicatedAllocation.m_ExtraData->m_pMappedData != VMA_NULL); *ppData = m_DedicatedAllocation.m_ExtraData->m_pMappedData; ++m_MapCount; return VK_SUCCESS; } else { VMA_ASSERT(0 && "Dedicated allocation mapped too many times simultaneously."); return VK_ERROR_MEMORY_MAP_FAILED; } } else { VkResult result = (*hAllocator->GetVulkanFunctions().vkMapMemory)( hAllocator->m_hDevice, m_DedicatedAllocation.m_hMemory, 0, // offset VK_WHOLE_SIZE, 0, // flags ppData); if (result == VK_SUCCESS) { m_DedicatedAllocation.m_ExtraData->m_pMappedData = *ppData; m_MapCount = 1; } return result; } } void VmaAllocation_T::DedicatedAllocUnmap(VmaAllocator hAllocator) { VMA_ASSERT(GetType() == ALLOCATION_TYPE_DEDICATED); if (m_MapCount > 0) { --m_MapCount; if (m_MapCount == 0 && !IsPersistentMap()) { VMA_ASSERT(m_DedicatedAllocation.m_ExtraData != VMA_NULL); m_DedicatedAllocation.m_ExtraData->m_pMappedData = VMA_NULL; (*hAllocator->GetVulkanFunctions().vkUnmapMemory)( hAllocator->m_hDevice, m_DedicatedAllocation.m_hMemory); } } else { VMA_ASSERT(0 && "Unmapping dedicated allocation not previously mapped."); } } #if VMA_STATS_STRING_ENABLED void VmaAllocation_T::PrintParameters(class VmaJsonWriter& json) const { json.WriteString("Type"); json.WriteString(VMA_SUBALLOCATION_TYPE_NAMES[m_SuballocationType]); json.WriteString("Size"); json.WriteNumber(m_Size); json.WriteString("Usage"); json.WriteNumber(m_BufferImageUsage.Value); // It may be uint32_t or uint64_t. if (m_pUserData != VMA_NULL) { json.WriteString("CustomData"); json.BeginString(); json.ContinueString_Pointer(m_pUserData); json.EndString(); } if (m_pName != VMA_NULL) { json.WriteString("Name"); json.WriteString(m_pName); } } #if VMA_EXTERNAL_MEMORY_WIN32 VkResult VmaAllocation_T::GetWin32Handle(VmaAllocator hAllocator, HANDLE hTargetProcess, HANDLE* pHandle) noexcept { auto pvkGetMemoryWin32HandleKHR = hAllocator->GetVulkanFunctions().vkGetMemoryWin32HandleKHR; switch (m_Type) { case ALLOCATION_TYPE_BLOCK: return m_BlockAllocation.m_Block->CreateWin32Handle(hAllocator, pvkGetMemoryWin32HandleKHR, hTargetProcess, pHandle); case ALLOCATION_TYPE_DEDICATED: EnsureExtraData(hAllocator); return m_DedicatedAllocation.m_ExtraData->m_Handle.GetHandle(hAllocator->m_hDevice, m_DedicatedAllocation.m_hMemory, pvkGetMemoryWin32HandleKHR, hTargetProcess, hAllocator->m_UseMutex, pHandle); default: VMA_ASSERT(0); return VK_ERROR_FEATURE_NOT_PRESENT; } } #endif // VMA_EXTERNAL_MEMORY_WIN32 #endif // VMA_STATS_STRING_ENABLED void VmaAllocation_T::EnsureExtraData(VmaAllocator hAllocator) { if (m_DedicatedAllocation.m_ExtraData == VMA_NULL) { m_DedicatedAllocation.m_ExtraData = vma_new(hAllocator, VmaAllocationExtraData)(); } } void VmaAllocation_T::FreeName(VmaAllocator hAllocator) { if(m_pName) { VmaFreeString(hAllocator->GetAllocationCallbacks(), m_pName); m_pName = VMA_NULL; } } #endif // _VMA_ALLOCATION_T_FUNCTIONS #ifndef _VMA_BLOCK_VECTOR_FUNCTIONS VmaBlockVector::VmaBlockVector( VmaAllocator hAllocator, VmaPool hParentPool, uint32_t memoryTypeIndex, VkDeviceSize preferredBlockSize, size_t minBlockCount, size_t maxBlockCount, VkDeviceSize bufferImageGranularity, bool explicitBlockSize, uint32_t algorithm, float priority, VkDeviceSize minAllocationAlignment, void* pMemoryAllocateNext) : m_hAllocator(hAllocator), m_hParentPool(hParentPool), m_MemoryTypeIndex(memoryTypeIndex), m_PreferredBlockSize(preferredBlockSize), m_MinBlockCount(minBlockCount), m_MaxBlockCount(maxBlockCount), m_BufferImageGranularity(bufferImageGranularity), m_ExplicitBlockSize(explicitBlockSize), m_Algorithm(algorithm), m_Priority(priority), m_MinAllocationAlignment(minAllocationAlignment), m_pMemoryAllocateNext(pMemoryAllocateNext), m_Blocks(VmaStlAllocator(hAllocator->GetAllocationCallbacks())), m_NextBlockId(0) {} VmaBlockVector::~VmaBlockVector() { for (size_t i = m_Blocks.size(); i--; ) { m_Blocks[i]->Destroy(m_hAllocator); vma_delete(m_hAllocator, m_Blocks[i]); } } VkResult VmaBlockVector::CreateMinBlocks() { for (size_t i = 0; i < m_MinBlockCount; ++i) { VkResult res = CreateBlock(m_PreferredBlockSize, VMA_NULL); if (res != VK_SUCCESS) { return res; } } return VK_SUCCESS; } void VmaBlockVector::AddStatistics(VmaStatistics& inoutStats) { VmaMutexLockRead lock(m_Mutex, m_hAllocator->m_UseMutex); const size_t blockCount = m_Blocks.size(); for (uint32_t blockIndex = 0; blockIndex < blockCount; ++blockIndex) { const VmaDeviceMemoryBlock* const pBlock = m_Blocks[blockIndex]; VMA_ASSERT(pBlock); VMA_HEAVY_ASSERT(pBlock->Validate()); pBlock->m_pMetadata->AddStatistics(inoutStats); } } void VmaBlockVector::AddDetailedStatistics(VmaDetailedStatistics& inoutStats) { VmaMutexLockRead lock(m_Mutex, m_hAllocator->m_UseMutex); const size_t blockCount = m_Blocks.size(); for (uint32_t blockIndex = 0; blockIndex < blockCount; ++blockIndex) { const VmaDeviceMemoryBlock* const pBlock = m_Blocks[blockIndex]; VMA_ASSERT(pBlock); VMA_HEAVY_ASSERT(pBlock->Validate()); pBlock->m_pMetadata->AddDetailedStatistics(inoutStats); } } bool VmaBlockVector::IsEmpty() { VmaMutexLockRead lock(m_Mutex, m_hAllocator->m_UseMutex); return m_Blocks.empty(); } bool VmaBlockVector::IsCorruptionDetectionEnabled() const { const uint32_t requiredMemFlags = VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT; return (VMA_DEBUG_DETECT_CORRUPTION != 0) && (VMA_DEBUG_MARGIN > 0) && (m_Algorithm == 0 || m_Algorithm == VMA_POOL_CREATE_LINEAR_ALGORITHM_BIT) && (m_hAllocator->m_MemProps.memoryTypes[m_MemoryTypeIndex].propertyFlags & requiredMemFlags) == requiredMemFlags; } VkResult VmaBlockVector::Allocate( VkDeviceSize size, VkDeviceSize alignment, const VmaAllocationCreateInfo& createInfo, VmaSuballocationType suballocType, size_t allocationCount, VmaAllocation* pAllocations) { size_t allocIndex; VkResult res = VK_SUCCESS; alignment = VMA_MAX(alignment, m_MinAllocationAlignment); if (IsCorruptionDetectionEnabled()) { size = VmaAlignUp(size, sizeof(VMA_CORRUPTION_DETECTION_MAGIC_VALUE)); alignment = VmaAlignUp(alignment, sizeof(VMA_CORRUPTION_DETECTION_MAGIC_VALUE)); } { VmaMutexLockWrite lock(m_Mutex, m_hAllocator->m_UseMutex); for (allocIndex = 0; allocIndex < allocationCount; ++allocIndex) { res = AllocatePage( size, alignment, createInfo, suballocType, pAllocations + allocIndex); if (res != VK_SUCCESS) { break; } } } if (res != VK_SUCCESS) { // Free all already created allocations. while (allocIndex--) Free(pAllocations[allocIndex]); memset(pAllocations, 0, sizeof(VmaAllocation) * allocationCount); } return res; } VkResult VmaBlockVector::AllocatePage( VkDeviceSize size, VkDeviceSize alignment, const VmaAllocationCreateInfo& createInfo, VmaSuballocationType suballocType, VmaAllocation* pAllocation) { const bool isUpperAddress = (createInfo.flags & VMA_ALLOCATION_CREATE_UPPER_ADDRESS_BIT) != 0; VkDeviceSize freeMemory; { const uint32_t heapIndex = m_hAllocator->MemoryTypeIndexToHeapIndex(m_MemoryTypeIndex); VmaBudget heapBudget = {}; m_hAllocator->GetHeapBudgets(&heapBudget, heapIndex, 1); freeMemory = (heapBudget.usage < heapBudget.budget) ? (heapBudget.budget - heapBudget.usage) : 0; } const bool canFallbackToDedicated = !HasExplicitBlockSize() && (createInfo.flags & VMA_ALLOCATION_CREATE_NEVER_ALLOCATE_BIT) == 0; const bool canCreateNewBlock = ((createInfo.flags & VMA_ALLOCATION_CREATE_NEVER_ALLOCATE_BIT) == 0) && (m_Blocks.size() < m_MaxBlockCount) && (freeMemory >= size || !canFallbackToDedicated); uint32_t strategy = createInfo.flags & VMA_ALLOCATION_CREATE_STRATEGY_MASK; // Upper address can only be used with linear allocator and within single memory block. if (isUpperAddress && (m_Algorithm != VMA_POOL_CREATE_LINEAR_ALGORITHM_BIT || m_MaxBlockCount > 1)) { return VK_ERROR_FEATURE_NOT_PRESENT; } // Early reject: requested allocation size is larger that maximum block size for this block vector. if (size + VMA_DEBUG_MARGIN > m_PreferredBlockSize) { return VK_ERROR_OUT_OF_DEVICE_MEMORY; } // 1. Search existing allocations. Try to allocate. if (m_Algorithm == VMA_POOL_CREATE_LINEAR_ALGORITHM_BIT) { // Use only last block. if (!m_Blocks.empty()) { VmaDeviceMemoryBlock* const pCurrBlock = m_Blocks.back(); VMA_ASSERT(pCurrBlock); VkResult res = AllocateFromBlock( pCurrBlock, size, alignment, createInfo.flags, createInfo.pUserData, suballocType, strategy, pAllocation); if (res == VK_SUCCESS) { VMA_DEBUG_LOG_FORMAT(" Returned from last block #%" PRIu32, pCurrBlock->GetId()); IncrementallySortBlocks(); return VK_SUCCESS; } } } else { if (strategy != VMA_ALLOCATION_CREATE_STRATEGY_MIN_TIME_BIT) // MIN_MEMORY or default { const bool isHostVisible = (m_hAllocator->m_MemProps.memoryTypes[m_MemoryTypeIndex].propertyFlags & VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT) != 0; if(isHostVisible) { const bool isMappingAllowed = (createInfo.flags & (VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT | VMA_ALLOCATION_CREATE_HOST_ACCESS_RANDOM_BIT)) != 0; /* For non-mappable allocations, check blocks that are not mapped first. For mappable allocations, check blocks that are already mapped first. This way, having many blocks, we will separate mappable and non-mappable allocations, hopefully limiting the number of blocks that are mapped, which will help tools like RenderDoc. */ for(size_t mappingI = 0; mappingI < 2; ++mappingI) { // Forward order in m_Blocks - prefer blocks with smallest amount of free space. for (size_t blockIndex = 0; blockIndex < m_Blocks.size(); ++blockIndex) { VmaDeviceMemoryBlock* const pCurrBlock = m_Blocks[blockIndex]; VMA_ASSERT(pCurrBlock); const bool isBlockMapped = pCurrBlock->GetMappedData() != VMA_NULL; if((mappingI == 0) == (isMappingAllowed == isBlockMapped)) { VkResult res = AllocateFromBlock( pCurrBlock, size, alignment, createInfo.flags, createInfo.pUserData, suballocType, strategy, pAllocation); if (res == VK_SUCCESS) { VMA_DEBUG_LOG_FORMAT(" Returned from existing block #%" PRIu32, pCurrBlock->GetId()); IncrementallySortBlocks(); return VK_SUCCESS; } } } } } else { // Forward order in m_Blocks - prefer blocks with smallest amount of free space. for (size_t blockIndex = 0; blockIndex < m_Blocks.size(); ++blockIndex) { VmaDeviceMemoryBlock* const pCurrBlock = m_Blocks[blockIndex]; VMA_ASSERT(pCurrBlock); VkResult res = AllocateFromBlock( pCurrBlock, size, alignment, createInfo.flags, createInfo.pUserData, suballocType, strategy, pAllocation); if (res == VK_SUCCESS) { VMA_DEBUG_LOG_FORMAT(" Returned from existing block #%" PRIu32, pCurrBlock->GetId()); IncrementallySortBlocks(); return VK_SUCCESS; } } } } else // VMA_ALLOCATION_CREATE_STRATEGY_MIN_TIME_BIT { // Backward order in m_Blocks - prefer blocks with largest amount of free space. for (size_t blockIndex = m_Blocks.size(); blockIndex--; ) { VmaDeviceMemoryBlock* const pCurrBlock = m_Blocks[blockIndex]; VMA_ASSERT(pCurrBlock); VkResult res = AllocateFromBlock(pCurrBlock, size, alignment, createInfo.flags, createInfo.pUserData, suballocType, strategy, pAllocation); if (res == VK_SUCCESS) { VMA_DEBUG_LOG_FORMAT(" Returned from existing block #%" PRIu32, pCurrBlock->GetId()); IncrementallySortBlocks(); return VK_SUCCESS; } } } } // 2. Try to create new block. if (canCreateNewBlock) { // Calculate optimal size for new block. VkDeviceSize newBlockSize = m_PreferredBlockSize; uint32_t newBlockSizeShift = 0; const uint32_t NEW_BLOCK_SIZE_SHIFT_MAX = 3; if (!m_ExplicitBlockSize) { // Allocate 1/8, 1/4, 1/2 as first blocks. const VkDeviceSize maxExistingBlockSize = CalcMaxBlockSize(); for (uint32_t i = 0; i < NEW_BLOCK_SIZE_SHIFT_MAX; ++i) { const VkDeviceSize smallerNewBlockSize = newBlockSize / 2; if (smallerNewBlockSize > maxExistingBlockSize && smallerNewBlockSize >= size * 2) { newBlockSize = smallerNewBlockSize; ++newBlockSizeShift; } else { break; } } } size_t newBlockIndex = 0; VkResult res = (newBlockSize <= freeMemory || !canFallbackToDedicated) ? CreateBlock(newBlockSize, &newBlockIndex) : VK_ERROR_OUT_OF_DEVICE_MEMORY; // Allocation of this size failed? Try 1/2, 1/4, 1/8 of m_PreferredBlockSize. if (!m_ExplicitBlockSize) { while (res < 0 && newBlockSizeShift < NEW_BLOCK_SIZE_SHIFT_MAX) { const VkDeviceSize smallerNewBlockSize = newBlockSize / 2; if (smallerNewBlockSize >= size) { newBlockSize = smallerNewBlockSize; ++newBlockSizeShift; res = (newBlockSize <= freeMemory || !canFallbackToDedicated) ? CreateBlock(newBlockSize, &newBlockIndex) : VK_ERROR_OUT_OF_DEVICE_MEMORY; } else { break; } } } if (res == VK_SUCCESS) { VmaDeviceMemoryBlock* const pBlock = m_Blocks[newBlockIndex]; VMA_ASSERT(pBlock->m_pMetadata->GetSize() >= size); res = AllocateFromBlock( pBlock, size, alignment, createInfo.flags, createInfo.pUserData, suballocType, strategy, pAllocation); if (res == VK_SUCCESS) { VMA_DEBUG_LOG_FORMAT(" Created new block #%" PRIu32 " Size=%" PRIu64, pBlock->GetId(), newBlockSize); IncrementallySortBlocks(); return VK_SUCCESS; } else { // Allocation from new block failed, possibly due to VMA_DEBUG_MARGIN or alignment. return VK_ERROR_OUT_OF_DEVICE_MEMORY; } } } return VK_ERROR_OUT_OF_DEVICE_MEMORY; } void VmaBlockVector::Free(const VmaAllocation hAllocation) { VmaDeviceMemoryBlock* pBlockToDelete = VMA_NULL; bool budgetExceeded = false; { const uint32_t heapIndex = m_hAllocator->MemoryTypeIndexToHeapIndex(m_MemoryTypeIndex); VmaBudget heapBudget = {}; m_hAllocator->GetHeapBudgets(&heapBudget, heapIndex, 1); budgetExceeded = heapBudget.usage >= heapBudget.budget; } // Scope for lock. { VmaMutexLockWrite lock(m_Mutex, m_hAllocator->m_UseMutex); VmaDeviceMemoryBlock* pBlock = hAllocation->GetBlock(); if (IsCorruptionDetectionEnabled()) { VkResult res = pBlock->ValidateMagicValueAfterAllocation(m_hAllocator, hAllocation->GetOffset(), hAllocation->GetSize()); VMA_ASSERT(res == VK_SUCCESS && "Couldn't map block memory to validate magic value."); } if (hAllocation->IsPersistentMap()) { pBlock->Unmap(m_hAllocator, 1); } const bool hadEmptyBlockBeforeFree = HasEmptyBlock(); pBlock->m_pMetadata->Free(hAllocation->GetAllocHandle()); pBlock->PostFree(m_hAllocator); VMA_HEAVY_ASSERT(pBlock->Validate()); VMA_DEBUG_LOG_FORMAT(" Freed from MemoryTypeIndex=%" PRIu32, m_MemoryTypeIndex); const bool canDeleteBlock = m_Blocks.size() > m_MinBlockCount; // pBlock became empty after this deallocation. if (pBlock->m_pMetadata->IsEmpty()) { // Already had empty block. We don't want to have two, so delete this one. if ((hadEmptyBlockBeforeFree || budgetExceeded) && canDeleteBlock) { pBlockToDelete = pBlock; Remove(pBlock); } // else: We now have one empty block - leave it. A hysteresis to avoid allocating whole block back and forth. } // pBlock didn't become empty, but we have another empty block - find and free that one. // (This is optional, heuristics.) else if (hadEmptyBlockBeforeFree && canDeleteBlock) { VmaDeviceMemoryBlock* pLastBlock = m_Blocks.back(); if (pLastBlock->m_pMetadata->IsEmpty()) { pBlockToDelete = pLastBlock; m_Blocks.pop_back(); } } IncrementallySortBlocks(); m_hAllocator->m_Budget.RemoveAllocation(m_hAllocator->MemoryTypeIndexToHeapIndex(m_MemoryTypeIndex), hAllocation->GetSize()); hAllocation->Destroy(m_hAllocator); m_hAllocator->m_AllocationObjectAllocator.Free(hAllocation); } // Destruction of a free block. Deferred until this point, outside of mutex // lock, for performance reason. if (pBlockToDelete != VMA_NULL) { VMA_DEBUG_LOG_FORMAT(" Deleted empty block #%" PRIu32, pBlockToDelete->GetId()); pBlockToDelete->Destroy(m_hAllocator); vma_delete(m_hAllocator, pBlockToDelete); } } VkDeviceSize VmaBlockVector::CalcMaxBlockSize() const { VkDeviceSize result = 0; for (size_t i = m_Blocks.size(); i--; ) { result = VMA_MAX(result, m_Blocks[i]->m_pMetadata->GetSize()); if (result >= m_PreferredBlockSize) { break; } } return result; } void VmaBlockVector::Remove(VmaDeviceMemoryBlock* pBlock) { for (uint32_t blockIndex = 0; blockIndex < m_Blocks.size(); ++blockIndex) { if (m_Blocks[blockIndex] == pBlock) { VmaVectorRemove(m_Blocks, blockIndex); return; } } VMA_ASSERT(0); } void VmaBlockVector::IncrementallySortBlocks() { if (!m_IncrementalSort) return; if (m_Algorithm != VMA_POOL_CREATE_LINEAR_ALGORITHM_BIT) { // Bubble sort only until first swap. for (size_t i = 1; i < m_Blocks.size(); ++i) { if (m_Blocks[i - 1]->m_pMetadata->GetSumFreeSize() > m_Blocks[i]->m_pMetadata->GetSumFreeSize()) { std::swap(m_Blocks[i - 1], m_Blocks[i]); return; } } } } void VmaBlockVector::SortByFreeSize() { VMA_SORT(m_Blocks.begin(), m_Blocks.end(), [](VmaDeviceMemoryBlock* b1, VmaDeviceMemoryBlock* b2) -> bool { return b1->m_pMetadata->GetSumFreeSize() < b2->m_pMetadata->GetSumFreeSize(); }); } VkResult VmaBlockVector::AllocateFromBlock( VmaDeviceMemoryBlock* pBlock, VkDeviceSize size, VkDeviceSize alignment, VmaAllocationCreateFlags allocFlags, void* pUserData, VmaSuballocationType suballocType, uint32_t strategy, VmaAllocation* pAllocation) { const bool isUpperAddress = (allocFlags & VMA_ALLOCATION_CREATE_UPPER_ADDRESS_BIT) != 0; VmaAllocationRequest currRequest = {}; if (pBlock->m_pMetadata->CreateAllocationRequest( size, alignment, isUpperAddress, suballocType, strategy, &currRequest)) { return CommitAllocationRequest(currRequest, pBlock, alignment, allocFlags, pUserData, suballocType, pAllocation); } return VK_ERROR_OUT_OF_DEVICE_MEMORY; } VkResult VmaBlockVector::CommitAllocationRequest( VmaAllocationRequest& allocRequest, VmaDeviceMemoryBlock* pBlock, VkDeviceSize alignment, VmaAllocationCreateFlags allocFlags, void* pUserData, VmaSuballocationType suballocType, VmaAllocation* pAllocation) { const bool mapped = (allocFlags & VMA_ALLOCATION_CREATE_MAPPED_BIT) != 0; const bool isUserDataString = (allocFlags & VMA_ALLOCATION_CREATE_USER_DATA_COPY_STRING_BIT) != 0; const bool isMappingAllowed = (allocFlags & (VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT | VMA_ALLOCATION_CREATE_HOST_ACCESS_RANDOM_BIT)) != 0; pBlock->PostAlloc(m_hAllocator); // Allocate from pCurrBlock. if (mapped) { VkResult res = pBlock->Map(m_hAllocator, 1, VMA_NULL); if (res != VK_SUCCESS) { return res; } } *pAllocation = m_hAllocator->m_AllocationObjectAllocator.Allocate(isMappingAllowed); pBlock->m_pMetadata->Alloc(allocRequest, suballocType, *pAllocation); (*pAllocation)->InitBlockAllocation( pBlock, allocRequest.allocHandle, alignment, allocRequest.size, // Not size, as actual allocation size may be larger than requested! m_MemoryTypeIndex, suballocType, mapped); VMA_HEAVY_ASSERT(pBlock->Validate()); if (isUserDataString) (*pAllocation)->SetName(m_hAllocator, (const char*)pUserData); else (*pAllocation)->SetUserData(m_hAllocator, pUserData); m_hAllocator->m_Budget.AddAllocation(m_hAllocator->MemoryTypeIndexToHeapIndex(m_MemoryTypeIndex), allocRequest.size); if (VMA_DEBUG_INITIALIZE_ALLOCATIONS) { m_hAllocator->FillAllocation(*pAllocation, VMA_ALLOCATION_FILL_PATTERN_CREATED); } if (IsCorruptionDetectionEnabled()) { VkResult res = pBlock->WriteMagicValueAfterAllocation(m_hAllocator, (*pAllocation)->GetOffset(), allocRequest.size); VMA_ASSERT(res == VK_SUCCESS && "Couldn't map block memory to write magic value."); } return VK_SUCCESS; } VkResult VmaBlockVector::CreateBlock(VkDeviceSize blockSize, size_t* pNewBlockIndex) { VkMemoryAllocateInfo allocInfo = { VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO }; allocInfo.pNext = m_pMemoryAllocateNext; allocInfo.memoryTypeIndex = m_MemoryTypeIndex; allocInfo.allocationSize = blockSize; #if VMA_BUFFER_DEVICE_ADDRESS // Every standalone block can potentially contain a buffer with VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT - always enable the feature. VkMemoryAllocateFlagsInfoKHR allocFlagsInfo = { VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO_KHR }; if (m_hAllocator->m_UseKhrBufferDeviceAddress) { allocFlagsInfo.flags = VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT_KHR; VmaPnextChainPushFront(&allocInfo, &allocFlagsInfo); } #endif // VMA_BUFFER_DEVICE_ADDRESS #if VMA_MEMORY_PRIORITY VkMemoryPriorityAllocateInfoEXT priorityInfo = { VK_STRUCTURE_TYPE_MEMORY_PRIORITY_ALLOCATE_INFO_EXT }; if (m_hAllocator->m_UseExtMemoryPriority) { VMA_ASSERT(m_Priority >= 0.f && m_Priority <= 1.f); priorityInfo.priority = m_Priority; VmaPnextChainPushFront(&allocInfo, &priorityInfo); } #endif // VMA_MEMORY_PRIORITY #if VMA_EXTERNAL_MEMORY // Attach VkExportMemoryAllocateInfoKHR if necessary. VkExportMemoryAllocateInfoKHR exportMemoryAllocInfo = { VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_KHR }; exportMemoryAllocInfo.handleTypes = m_hAllocator->GetExternalMemoryHandleTypeFlags(m_MemoryTypeIndex); if (exportMemoryAllocInfo.handleTypes != 0) { VmaPnextChainPushFront(&allocInfo, &exportMemoryAllocInfo); } #endif // VMA_EXTERNAL_MEMORY VkDeviceMemory mem = VK_NULL_HANDLE; VkResult res = m_hAllocator->AllocateVulkanMemory(&allocInfo, &mem); if (res < 0) { return res; } // New VkDeviceMemory successfully created. // Create new Allocation for it. VmaDeviceMemoryBlock* const pBlock = vma_new(m_hAllocator, VmaDeviceMemoryBlock)(m_hAllocator); pBlock->Init( m_hAllocator, m_hParentPool, m_MemoryTypeIndex, mem, allocInfo.allocationSize, m_NextBlockId++, m_Algorithm, m_BufferImageGranularity); m_Blocks.push_back(pBlock); if (pNewBlockIndex != VMA_NULL) { *pNewBlockIndex = m_Blocks.size() - 1; } return VK_SUCCESS; } bool VmaBlockVector::HasEmptyBlock() { for (size_t index = 0, count = m_Blocks.size(); index < count; ++index) { VmaDeviceMemoryBlock* const pBlock = m_Blocks[index]; if (pBlock->m_pMetadata->IsEmpty()) { return true; } } return false; } #if VMA_STATS_STRING_ENABLED void VmaBlockVector::PrintDetailedMap(class VmaJsonWriter& json) { VmaMutexLockRead lock(m_Mutex, m_hAllocator->m_UseMutex); json.BeginObject(); for (size_t i = 0; i < m_Blocks.size(); ++i) { json.BeginString(); json.ContinueString(m_Blocks[i]->GetId()); json.EndString(); json.BeginObject(); json.WriteString("MapRefCount"); json.WriteNumber(m_Blocks[i]->GetMapRefCount()); m_Blocks[i]->m_pMetadata->PrintDetailedMap(json); json.EndObject(); } json.EndObject(); } #endif // VMA_STATS_STRING_ENABLED VkResult VmaBlockVector::CheckCorruption() { if (!IsCorruptionDetectionEnabled()) { return VK_ERROR_FEATURE_NOT_PRESENT; } VmaMutexLockRead lock(m_Mutex, m_hAllocator->m_UseMutex); for (uint32_t blockIndex = 0; blockIndex < m_Blocks.size(); ++blockIndex) { VmaDeviceMemoryBlock* const pBlock = m_Blocks[blockIndex]; VMA_ASSERT(pBlock); VkResult res = pBlock->CheckCorruption(m_hAllocator); if (res != VK_SUCCESS) { return res; } } return VK_SUCCESS; } #endif // _VMA_BLOCK_VECTOR_FUNCTIONS #ifndef _VMA_DEFRAGMENTATION_CONTEXT_FUNCTIONS VmaDefragmentationContext_T::VmaDefragmentationContext_T( VmaAllocator hAllocator, const VmaDefragmentationInfo& info) : m_MaxPassBytes(info.maxBytesPerPass == 0 ? VK_WHOLE_SIZE : info.maxBytesPerPass), m_MaxPassAllocations(info.maxAllocationsPerPass == 0 ? UINT32_MAX : info.maxAllocationsPerPass), m_BreakCallback(info.pfnBreakCallback), m_BreakCallbackUserData(info.pBreakCallbackUserData), m_MoveAllocator(hAllocator->GetAllocationCallbacks()), m_Moves(m_MoveAllocator) { m_Algorithm = info.flags & VMA_DEFRAGMENTATION_FLAG_ALGORITHM_MASK; if (info.pool != VMA_NULL) { m_BlockVectorCount = 1; m_PoolBlockVector = &info.pool->m_BlockVector; m_pBlockVectors = &m_PoolBlockVector; m_PoolBlockVector->SetIncrementalSort(false); m_PoolBlockVector->SortByFreeSize(); } else { m_BlockVectorCount = hAllocator->GetMemoryTypeCount(); m_PoolBlockVector = VMA_NULL; m_pBlockVectors = hAllocator->m_pBlockVectors; for (uint32_t i = 0; i < m_BlockVectorCount; ++i) { VmaBlockVector* vector = m_pBlockVectors[i]; if (vector != VMA_NULL) { vector->SetIncrementalSort(false); vector->SortByFreeSize(); } } } switch (m_Algorithm) { case 0: // Default algorithm m_Algorithm = VMA_DEFRAGMENTATION_FLAG_ALGORITHM_BALANCED_BIT; m_AlgorithmState = vma_new_array(hAllocator, StateBalanced, m_BlockVectorCount); break; case VMA_DEFRAGMENTATION_FLAG_ALGORITHM_BALANCED_BIT: m_AlgorithmState = vma_new_array(hAllocator, StateBalanced, m_BlockVectorCount); break; case VMA_DEFRAGMENTATION_FLAG_ALGORITHM_EXTENSIVE_BIT: if (hAllocator->GetBufferImageGranularity() > 1) { m_AlgorithmState = vma_new_array(hAllocator, StateExtensive, m_BlockVectorCount); } break; } } VmaDefragmentationContext_T::~VmaDefragmentationContext_T() { if (m_PoolBlockVector != VMA_NULL) { m_PoolBlockVector->SetIncrementalSort(true); } else { for (uint32_t i = 0; i < m_BlockVectorCount; ++i) { VmaBlockVector* vector = m_pBlockVectors[i]; if (vector != VMA_NULL) vector->SetIncrementalSort(true); } } if (m_AlgorithmState) { switch (m_Algorithm) { case VMA_DEFRAGMENTATION_FLAG_ALGORITHM_BALANCED_BIT: vma_delete_array(m_MoveAllocator.m_pCallbacks, reinterpret_cast(m_AlgorithmState), m_BlockVectorCount); break; case VMA_DEFRAGMENTATION_FLAG_ALGORITHM_EXTENSIVE_BIT: vma_delete_array(m_MoveAllocator.m_pCallbacks, reinterpret_cast(m_AlgorithmState), m_BlockVectorCount); break; default: VMA_ASSERT(0); } } } VkResult VmaDefragmentationContext_T::DefragmentPassBegin(VmaDefragmentationPassMoveInfo& moveInfo) { if (m_PoolBlockVector != VMA_NULL) { VmaMutexLockWrite lock(m_PoolBlockVector->GetMutex(), m_PoolBlockVector->GetAllocator()->m_UseMutex); if (m_PoolBlockVector->GetBlockCount() > 1) ComputeDefragmentation(*m_PoolBlockVector, 0); else if (m_PoolBlockVector->GetBlockCount() == 1) ReallocWithinBlock(*m_PoolBlockVector, m_PoolBlockVector->GetBlock(0)); } else { for (uint32_t i = 0; i < m_BlockVectorCount; ++i) { if (m_pBlockVectors[i] != VMA_NULL) { VmaMutexLockWrite lock(m_pBlockVectors[i]->GetMutex(), m_pBlockVectors[i]->GetAllocator()->m_UseMutex); if (m_pBlockVectors[i]->GetBlockCount() > 1) { if (ComputeDefragmentation(*m_pBlockVectors[i], i)) break; } else if (m_pBlockVectors[i]->GetBlockCount() == 1) { if (ReallocWithinBlock(*m_pBlockVectors[i], m_pBlockVectors[i]->GetBlock(0))) break; } } } } moveInfo.moveCount = static_cast(m_Moves.size()); if (moveInfo.moveCount > 0) { moveInfo.pMoves = m_Moves.data(); return VK_INCOMPLETE; } moveInfo.pMoves = VMA_NULL; return VK_SUCCESS; } VkResult VmaDefragmentationContext_T::DefragmentPassEnd(VmaDefragmentationPassMoveInfo& moveInfo) { VMA_ASSERT(moveInfo.moveCount > 0 ? moveInfo.pMoves != VMA_NULL : true); VkResult result = VK_SUCCESS; VmaStlAllocator blockAllocator(m_MoveAllocator.m_pCallbacks); VmaVector> immovableBlocks(blockAllocator); VmaVector> mappedBlocks(blockAllocator); VmaAllocator allocator = VMA_NULL; for (uint32_t i = 0; i < moveInfo.moveCount; ++i) { VmaDefragmentationMove& move = moveInfo.pMoves[i]; size_t prevCount = 0, currentCount = 0; VkDeviceSize freedBlockSize = 0; uint32_t vectorIndex; VmaBlockVector* vector; if (m_PoolBlockVector != VMA_NULL) { vectorIndex = 0; vector = m_PoolBlockVector; } else { vectorIndex = move.srcAllocation->GetMemoryTypeIndex(); vector = m_pBlockVectors[vectorIndex]; VMA_ASSERT(vector != VMA_NULL); } switch (move.operation) { case VMA_DEFRAGMENTATION_MOVE_OPERATION_COPY: { uint8_t mapCount = move.srcAllocation->SwapBlockAllocation(vector->m_hAllocator, move.dstTmpAllocation); if (mapCount > 0) { allocator = vector->m_hAllocator; VmaDeviceMemoryBlock* newMapBlock = move.srcAllocation->GetBlock(); bool notPresent = true; for (FragmentedBlock& block : mappedBlocks) { if (block.block == newMapBlock) { notPresent = false; block.data += mapCount; break; } } if (notPresent) mappedBlocks.push_back({ mapCount, newMapBlock }); } // Scope for locks, Free have it's own lock { VmaMutexLockRead lock(vector->GetMutex(), vector->GetAllocator()->m_UseMutex); prevCount = vector->GetBlockCount(); freedBlockSize = move.dstTmpAllocation->GetBlock()->m_pMetadata->GetSize(); } vector->Free(move.dstTmpAllocation); { VmaMutexLockRead lock(vector->GetMutex(), vector->GetAllocator()->m_UseMutex); currentCount = vector->GetBlockCount(); } result = VK_INCOMPLETE; break; } case VMA_DEFRAGMENTATION_MOVE_OPERATION_IGNORE: { m_PassStats.bytesMoved -= move.srcAllocation->GetSize(); --m_PassStats.allocationsMoved; vector->Free(move.dstTmpAllocation); VmaDeviceMemoryBlock* newBlock = move.srcAllocation->GetBlock(); bool notPresent = true; for (const FragmentedBlock& block : immovableBlocks) { if (block.block == newBlock) { notPresent = false; break; } } if (notPresent) immovableBlocks.push_back({ vectorIndex, newBlock }); break; } case VMA_DEFRAGMENTATION_MOVE_OPERATION_DESTROY: { m_PassStats.bytesMoved -= move.srcAllocation->GetSize(); --m_PassStats.allocationsMoved; // Scope for locks, Free have it's own lock { VmaMutexLockRead lock(vector->GetMutex(), vector->GetAllocator()->m_UseMutex); prevCount = vector->GetBlockCount(); freedBlockSize = move.srcAllocation->GetBlock()->m_pMetadata->GetSize(); } vector->Free(move.srcAllocation); { VmaMutexLockRead lock(vector->GetMutex(), vector->GetAllocator()->m_UseMutex); currentCount = vector->GetBlockCount(); } freedBlockSize *= prevCount - currentCount; VkDeviceSize dstBlockSize; { VmaMutexLockRead lock(vector->GetMutex(), vector->GetAllocator()->m_UseMutex); dstBlockSize = move.dstTmpAllocation->GetBlock()->m_pMetadata->GetSize(); } vector->Free(move.dstTmpAllocation); { VmaMutexLockRead lock(vector->GetMutex(), vector->GetAllocator()->m_UseMutex); freedBlockSize += dstBlockSize * (currentCount - vector->GetBlockCount()); currentCount = vector->GetBlockCount(); } result = VK_INCOMPLETE; break; } default: VMA_ASSERT(0); } if (prevCount > currentCount) { size_t freedBlocks = prevCount - currentCount; m_PassStats.deviceMemoryBlocksFreed += static_cast(freedBlocks); m_PassStats.bytesFreed += freedBlockSize; } if(m_Algorithm == VMA_DEFRAGMENTATION_FLAG_ALGORITHM_EXTENSIVE_BIT && m_AlgorithmState != VMA_NULL) { // Avoid unnecessary tries to allocate when new free block is available StateExtensive& state = reinterpret_cast(m_AlgorithmState)[vectorIndex]; if (state.firstFreeBlock != SIZE_MAX) { const size_t diff = prevCount - currentCount; if (state.firstFreeBlock >= diff) { state.firstFreeBlock -= diff; if (state.firstFreeBlock != 0) state.firstFreeBlock -= vector->GetBlock(state.firstFreeBlock - 1)->m_pMetadata->IsEmpty(); } else state.firstFreeBlock = 0; } } } moveInfo.moveCount = 0; moveInfo.pMoves = VMA_NULL; m_Moves.clear(); // Update stats m_GlobalStats.allocationsMoved += m_PassStats.allocationsMoved; m_GlobalStats.bytesFreed += m_PassStats.bytesFreed; m_GlobalStats.bytesMoved += m_PassStats.bytesMoved; m_GlobalStats.deviceMemoryBlocksFreed += m_PassStats.deviceMemoryBlocksFreed; m_PassStats = { 0 }; // Move blocks with immovable allocations according to algorithm if (immovableBlocks.size() > 0) { do { if(m_Algorithm == VMA_DEFRAGMENTATION_FLAG_ALGORITHM_EXTENSIVE_BIT) { if (m_AlgorithmState != VMA_NULL) { bool swapped = false; // Move to the start of free blocks range for (const FragmentedBlock& block : immovableBlocks) { StateExtensive& state = reinterpret_cast(m_AlgorithmState)[block.data]; if (state.operation != StateExtensive::Operation::Cleanup) { VmaBlockVector* vector = m_pBlockVectors[block.data]; VmaMutexLockWrite lock(vector->GetMutex(), vector->GetAllocator()->m_UseMutex); for (size_t i = 0, count = vector->GetBlockCount() - m_ImmovableBlockCount; i < count; ++i) { if (vector->GetBlock(i) == block.block) { std::swap(vector->m_Blocks[i], vector->m_Blocks[vector->GetBlockCount() - ++m_ImmovableBlockCount]); if (state.firstFreeBlock != SIZE_MAX) { if (i + 1 < state.firstFreeBlock) { if (state.firstFreeBlock > 1) std::swap(vector->m_Blocks[i], vector->m_Blocks[--state.firstFreeBlock]); else --state.firstFreeBlock; } } swapped = true; break; } } } } if (swapped) result = VK_INCOMPLETE; break; } } // Move to the beginning for (const FragmentedBlock& block : immovableBlocks) { VmaBlockVector* vector = m_pBlockVectors[block.data]; VmaMutexLockWrite lock(vector->GetMutex(), vector->GetAllocator()->m_UseMutex); for (size_t i = m_ImmovableBlockCount; i < vector->GetBlockCount(); ++i) { if (vector->GetBlock(i) == block.block) { std::swap(vector->m_Blocks[i], vector->m_Blocks[m_ImmovableBlockCount++]); break; } } } } while (false); } // Bulk-map destination blocks for (const FragmentedBlock& block : mappedBlocks) { VkResult res = block.block->Map(allocator, block.data, VMA_NULL); VMA_ASSERT(res == VK_SUCCESS); } return result; } bool VmaDefragmentationContext_T::ComputeDefragmentation(VmaBlockVector& vector, size_t index) { switch (m_Algorithm) { case VMA_DEFRAGMENTATION_FLAG_ALGORITHM_FAST_BIT: return ComputeDefragmentation_Fast(vector); case VMA_DEFRAGMENTATION_FLAG_ALGORITHM_BALANCED_BIT: return ComputeDefragmentation_Balanced(vector, index, true); case VMA_DEFRAGMENTATION_FLAG_ALGORITHM_FULL_BIT: return ComputeDefragmentation_Full(vector); case VMA_DEFRAGMENTATION_FLAG_ALGORITHM_EXTENSIVE_BIT: return ComputeDefragmentation_Extensive(vector, index); default: VMA_ASSERT(0); return ComputeDefragmentation_Balanced(vector, index, true); } } VmaDefragmentationContext_T::MoveAllocationData VmaDefragmentationContext_T::GetMoveData( VmaAllocHandle handle, VmaBlockMetadata* metadata) { MoveAllocationData moveData; moveData.move.srcAllocation = (VmaAllocation)metadata->GetAllocationUserData(handle); moveData.size = moveData.move.srcAllocation->GetSize(); moveData.alignment = moveData.move.srcAllocation->GetAlignment(); moveData.type = moveData.move.srcAllocation->GetSuballocationType(); moveData.flags = 0; if (moveData.move.srcAllocation->IsPersistentMap()) moveData.flags |= VMA_ALLOCATION_CREATE_MAPPED_BIT; if (moveData.move.srcAllocation->IsMappingAllowed()) moveData.flags |= VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT | VMA_ALLOCATION_CREATE_HOST_ACCESS_RANDOM_BIT; return moveData; } VmaDefragmentationContext_T::CounterStatus VmaDefragmentationContext_T::CheckCounters(VkDeviceSize bytes) { // Check custom criteria if exists if (m_BreakCallback && m_BreakCallback(m_BreakCallbackUserData)) return CounterStatus::End; // Ignore allocation if will exceed max size for copy if (m_PassStats.bytesMoved + bytes > m_MaxPassBytes) { if (++m_IgnoredAllocs < MAX_ALLOCS_TO_IGNORE) return CounterStatus::Ignore; else return CounterStatus::End; } else m_IgnoredAllocs = 0; return CounterStatus::Pass; } bool VmaDefragmentationContext_T::IncrementCounters(VkDeviceSize bytes) { m_PassStats.bytesMoved += bytes; // Early return when max found if (++m_PassStats.allocationsMoved >= m_MaxPassAllocations || m_PassStats.bytesMoved >= m_MaxPassBytes) { VMA_ASSERT((m_PassStats.allocationsMoved == m_MaxPassAllocations || m_PassStats.bytesMoved == m_MaxPassBytes) && "Exceeded maximal pass threshold!"); return true; } return false; } bool VmaDefragmentationContext_T::ReallocWithinBlock(VmaBlockVector& vector, VmaDeviceMemoryBlock* block) { VmaBlockMetadata* metadata = block->m_pMetadata; for (VmaAllocHandle handle = metadata->GetAllocationListBegin(); handle != VK_NULL_HANDLE; handle = metadata->GetNextAllocation(handle)) { MoveAllocationData moveData = GetMoveData(handle, metadata); // Ignore newly created allocations by defragmentation algorithm if (moveData.move.srcAllocation->GetUserData() == this) continue; switch (CheckCounters(moveData.move.srcAllocation->GetSize())) { case CounterStatus::Ignore: continue; case CounterStatus::End: return true; case CounterStatus::Pass: break; default: VMA_ASSERT(0); } VkDeviceSize offset = moveData.move.srcAllocation->GetOffset(); if (offset != 0 && metadata->GetSumFreeSize() >= moveData.size) { VmaAllocationRequest request = {}; if (metadata->CreateAllocationRequest( moveData.size, moveData.alignment, false, moveData.type, VMA_ALLOCATION_CREATE_STRATEGY_MIN_OFFSET_BIT, &request)) { if (metadata->GetAllocationOffset(request.allocHandle) < offset) { if (vector.CommitAllocationRequest( request, block, moveData.alignment, moveData.flags, this, moveData.type, &moveData.move.dstTmpAllocation) == VK_SUCCESS) { m_Moves.push_back(moveData.move); if (IncrementCounters(moveData.size)) return true; } } } } } return false; } bool VmaDefragmentationContext_T::AllocInOtherBlock(size_t start, size_t end, MoveAllocationData& data, VmaBlockVector& vector) { for (; start < end; ++start) { VmaDeviceMemoryBlock* dstBlock = vector.GetBlock(start); if (dstBlock->m_pMetadata->GetSumFreeSize() >= data.size) { if (vector.AllocateFromBlock(dstBlock, data.size, data.alignment, data.flags, this, data.type, 0, &data.move.dstTmpAllocation) == VK_SUCCESS) { m_Moves.push_back(data.move); if (IncrementCounters(data.size)) return true; break; } } } return false; } bool VmaDefragmentationContext_T::ComputeDefragmentation_Fast(VmaBlockVector& vector) { // Move only between blocks // Go through allocations in last blocks and try to fit them inside first ones for (size_t i = vector.GetBlockCount() - 1; i > m_ImmovableBlockCount; --i) { VmaBlockMetadata* metadata = vector.GetBlock(i)->m_pMetadata; for (VmaAllocHandle handle = metadata->GetAllocationListBegin(); handle != VK_NULL_HANDLE; handle = metadata->GetNextAllocation(handle)) { MoveAllocationData moveData = GetMoveData(handle, metadata); // Ignore newly created allocations by defragmentation algorithm if (moveData.move.srcAllocation->GetUserData() == this) continue; switch (CheckCounters(moveData.move.srcAllocation->GetSize())) { case CounterStatus::Ignore: continue; case CounterStatus::End: return true; case CounterStatus::Pass: break; default: VMA_ASSERT(0); } // Check all previous blocks for free space if (AllocInOtherBlock(0, i, moveData, vector)) return true; } } return false; } bool VmaDefragmentationContext_T::ComputeDefragmentation_Balanced(VmaBlockVector& vector, size_t index, bool update) { // Go over every allocation and try to fit it in previous blocks at lowest offsets, // if not possible: realloc within single block to minimize offset (exclude offset == 0), // but only if there are noticeable gaps between them (some heuristic, ex. average size of allocation in block) VMA_ASSERT(m_AlgorithmState != VMA_NULL); StateBalanced& vectorState = reinterpret_cast(m_AlgorithmState)[index]; if (update && vectorState.avgAllocSize == UINT64_MAX) UpdateVectorStatistics(vector, vectorState); const size_t startMoveCount = m_Moves.size(); VkDeviceSize minimalFreeRegion = vectorState.avgFreeSize / 2; for (size_t i = vector.GetBlockCount() - 1; i > m_ImmovableBlockCount; --i) { VmaDeviceMemoryBlock* block = vector.GetBlock(i); VmaBlockMetadata* metadata = block->m_pMetadata; VkDeviceSize prevFreeRegionSize = 0; for (VmaAllocHandle handle = metadata->GetAllocationListBegin(); handle != VK_NULL_HANDLE; handle = metadata->GetNextAllocation(handle)) { MoveAllocationData moveData = GetMoveData(handle, metadata); // Ignore newly created allocations by defragmentation algorithm if (moveData.move.srcAllocation->GetUserData() == this) continue; switch (CheckCounters(moveData.move.srcAllocation->GetSize())) { case CounterStatus::Ignore: continue; case CounterStatus::End: return true; case CounterStatus::Pass: break; default: VMA_ASSERT(0); } // Check all previous blocks for free space const size_t prevMoveCount = m_Moves.size(); if (AllocInOtherBlock(0, i, moveData, vector)) return true; VkDeviceSize nextFreeRegionSize = metadata->GetNextFreeRegionSize(handle); // If no room found then realloc within block for lower offset VkDeviceSize offset = moveData.move.srcAllocation->GetOffset(); if (prevMoveCount == m_Moves.size() && offset != 0 && metadata->GetSumFreeSize() >= moveData.size) { // Check if realloc will make sense if (prevFreeRegionSize >= minimalFreeRegion || nextFreeRegionSize >= minimalFreeRegion || moveData.size <= vectorState.avgFreeSize || moveData.size <= vectorState.avgAllocSize) { VmaAllocationRequest request = {}; if (metadata->CreateAllocationRequest( moveData.size, moveData.alignment, false, moveData.type, VMA_ALLOCATION_CREATE_STRATEGY_MIN_OFFSET_BIT, &request)) { if (metadata->GetAllocationOffset(request.allocHandle) < offset) { if (vector.CommitAllocationRequest( request, block, moveData.alignment, moveData.flags, this, moveData.type, &moveData.move.dstTmpAllocation) == VK_SUCCESS) { m_Moves.push_back(moveData.move); if (IncrementCounters(moveData.size)) return true; } } } } } prevFreeRegionSize = nextFreeRegionSize; } } // No moves performed, update statistics to current vector state if (startMoveCount == m_Moves.size() && !update) { vectorState.avgAllocSize = UINT64_MAX; return ComputeDefragmentation_Balanced(vector, index, false); } return false; } bool VmaDefragmentationContext_T::ComputeDefragmentation_Full(VmaBlockVector& vector) { // Go over every allocation and try to fit it in previous blocks at lowest offsets, // if not possible: realloc within single block to minimize offset (exclude offset == 0) for (size_t i = vector.GetBlockCount() - 1; i > m_ImmovableBlockCount; --i) { VmaDeviceMemoryBlock* block = vector.GetBlock(i); VmaBlockMetadata* metadata = block->m_pMetadata; for (VmaAllocHandle handle = metadata->GetAllocationListBegin(); handle != VK_NULL_HANDLE; handle = metadata->GetNextAllocation(handle)) { MoveAllocationData moveData = GetMoveData(handle, metadata); // Ignore newly created allocations by defragmentation algorithm if (moveData.move.srcAllocation->GetUserData() == this) continue; switch (CheckCounters(moveData.move.srcAllocation->GetSize())) { case CounterStatus::Ignore: continue; case CounterStatus::End: return true; case CounterStatus::Pass: break; default: VMA_ASSERT(0); } // Check all previous blocks for free space const size_t prevMoveCount = m_Moves.size(); if (AllocInOtherBlock(0, i, moveData, vector)) return true; // If no room found then realloc within block for lower offset VkDeviceSize offset = moveData.move.srcAllocation->GetOffset(); if (prevMoveCount == m_Moves.size() && offset != 0 && metadata->GetSumFreeSize() >= moveData.size) { VmaAllocationRequest request = {}; if (metadata->CreateAllocationRequest( moveData.size, moveData.alignment, false, moveData.type, VMA_ALLOCATION_CREATE_STRATEGY_MIN_OFFSET_BIT, &request)) { if (metadata->GetAllocationOffset(request.allocHandle) < offset) { if (vector.CommitAllocationRequest( request, block, moveData.alignment, moveData.flags, this, moveData.type, &moveData.move.dstTmpAllocation) == VK_SUCCESS) { m_Moves.push_back(moveData.move); if (IncrementCounters(moveData.size)) return true; } } } } } } return false; } bool VmaDefragmentationContext_T::ComputeDefragmentation_Extensive(VmaBlockVector& vector, size_t index) { // First free single block, then populate it to the brim, then free another block, and so on // Fallback to previous algorithm since without granularity conflicts it can achieve max packing if (vector.m_BufferImageGranularity == 1) return ComputeDefragmentation_Full(vector); VMA_ASSERT(m_AlgorithmState != VMA_NULL); StateExtensive& vectorState = reinterpret_cast(m_AlgorithmState)[index]; bool texturePresent = false, bufferPresent = false, otherPresent = false; switch (vectorState.operation) { case StateExtensive::Operation::Done: // Vector defragmented return false; case StateExtensive::Operation::FindFreeBlockBuffer: case StateExtensive::Operation::FindFreeBlockTexture: case StateExtensive::Operation::FindFreeBlockAll: { // No more blocks to free, just perform fast realloc and move to cleanup if (vectorState.firstFreeBlock == 0) { vectorState.operation = StateExtensive::Operation::Cleanup; return ComputeDefragmentation_Fast(vector); } // No free blocks, have to clear last one size_t last = (vectorState.firstFreeBlock == SIZE_MAX ? vector.GetBlockCount() : vectorState.firstFreeBlock) - 1; VmaBlockMetadata* freeMetadata = vector.GetBlock(last)->m_pMetadata; const size_t prevMoveCount = m_Moves.size(); for (VmaAllocHandle handle = freeMetadata->GetAllocationListBegin(); handle != VK_NULL_HANDLE; handle = freeMetadata->GetNextAllocation(handle)) { MoveAllocationData moveData = GetMoveData(handle, freeMetadata); switch (CheckCounters(moveData.move.srcAllocation->GetSize())) { case CounterStatus::Ignore: continue; case CounterStatus::End: return true; case CounterStatus::Pass: break; default: VMA_ASSERT(0); } // Check all previous blocks for free space if (AllocInOtherBlock(0, last, moveData, vector)) { // Full clear performed already if (prevMoveCount != m_Moves.size() && freeMetadata->GetNextAllocation(handle) == VK_NULL_HANDLE) vectorState.firstFreeBlock = last; return true; } } if (prevMoveCount == m_Moves.size()) { // Cannot perform full clear, have to move data in other blocks around if (last != 0) { for (size_t i = last - 1; i; --i) { if (ReallocWithinBlock(vector, vector.GetBlock(i))) return true; } } if (prevMoveCount == m_Moves.size()) { // No possible reallocs within blocks, try to move them around fast return ComputeDefragmentation_Fast(vector); } } else { switch (vectorState.operation) { case StateExtensive::Operation::FindFreeBlockBuffer: vectorState.operation = StateExtensive::Operation::MoveBuffers; break; case StateExtensive::Operation::FindFreeBlockTexture: vectorState.operation = StateExtensive::Operation::MoveTextures; break; case StateExtensive::Operation::FindFreeBlockAll: vectorState.operation = StateExtensive::Operation::MoveAll; break; default: VMA_ASSERT(0); vectorState.operation = StateExtensive::Operation::MoveTextures; } vectorState.firstFreeBlock = last; // Nothing done, block found without reallocations, can perform another reallocs in same pass return ComputeDefragmentation_Extensive(vector, index); } break; } case StateExtensive::Operation::MoveTextures: { if (MoveDataToFreeBlocks(VMA_SUBALLOCATION_TYPE_IMAGE_OPTIMAL, vector, vectorState.firstFreeBlock, texturePresent, bufferPresent, otherPresent)) { if (texturePresent) { vectorState.operation = StateExtensive::Operation::FindFreeBlockTexture; return ComputeDefragmentation_Extensive(vector, index); } if (!bufferPresent && !otherPresent) { vectorState.operation = StateExtensive::Operation::Cleanup; break; } // No more textures to move, check buffers vectorState.operation = StateExtensive::Operation::MoveBuffers; bufferPresent = false; otherPresent = false; } else break; VMA_FALLTHROUGH; // Fallthrough } case StateExtensive::Operation::MoveBuffers: { if (MoveDataToFreeBlocks(VMA_SUBALLOCATION_TYPE_BUFFER, vector, vectorState.firstFreeBlock, texturePresent, bufferPresent, otherPresent)) { if (bufferPresent) { vectorState.operation = StateExtensive::Operation::FindFreeBlockBuffer; return ComputeDefragmentation_Extensive(vector, index); } if (!otherPresent) { vectorState.operation = StateExtensive::Operation::Cleanup; break; } // No more buffers to move, check all others vectorState.operation = StateExtensive::Operation::MoveAll; otherPresent = false; } else break; VMA_FALLTHROUGH; // Fallthrough } case StateExtensive::Operation::MoveAll: { if (MoveDataToFreeBlocks(VMA_SUBALLOCATION_TYPE_FREE, vector, vectorState.firstFreeBlock, texturePresent, bufferPresent, otherPresent)) { if (otherPresent) { vectorState.operation = StateExtensive::Operation::FindFreeBlockBuffer; return ComputeDefragmentation_Extensive(vector, index); } // Everything moved vectorState.operation = StateExtensive::Operation::Cleanup; } break; } case StateExtensive::Operation::Cleanup: // Cleanup is handled below so that other operations may reuse the cleanup code. This case is here to prevent the unhandled enum value warning (C4062). break; } if (vectorState.operation == StateExtensive::Operation::Cleanup) { // All other work done, pack data in blocks even tighter if possible const size_t prevMoveCount = m_Moves.size(); for (size_t i = 0; i < vector.GetBlockCount(); ++i) { if (ReallocWithinBlock(vector, vector.GetBlock(i))) return true; } if (prevMoveCount == m_Moves.size()) vectorState.operation = StateExtensive::Operation::Done; } return false; } void VmaDefragmentationContext_T::UpdateVectorStatistics(VmaBlockVector& vector, StateBalanced& state) { size_t allocCount = 0; size_t freeCount = 0; state.avgFreeSize = 0; state.avgAllocSize = 0; for (size_t i = 0; i < vector.GetBlockCount(); ++i) { VmaBlockMetadata* metadata = vector.GetBlock(i)->m_pMetadata; allocCount += metadata->GetAllocationCount(); freeCount += metadata->GetFreeRegionsCount(); state.avgFreeSize += metadata->GetSumFreeSize(); state.avgAllocSize += metadata->GetSize(); } state.avgAllocSize = (state.avgAllocSize - state.avgFreeSize) / allocCount; state.avgFreeSize /= freeCount; } bool VmaDefragmentationContext_T::MoveDataToFreeBlocks(VmaSuballocationType currentType, VmaBlockVector& vector, size_t firstFreeBlock, bool& texturePresent, bool& bufferPresent, bool& otherPresent) { const size_t prevMoveCount = m_Moves.size(); for (size_t i = firstFreeBlock ; i;) { VmaDeviceMemoryBlock* block = vector.GetBlock(--i); VmaBlockMetadata* metadata = block->m_pMetadata; for (VmaAllocHandle handle = metadata->GetAllocationListBegin(); handle != VK_NULL_HANDLE; handle = metadata->GetNextAllocation(handle)) { MoveAllocationData moveData = GetMoveData(handle, metadata); // Ignore newly created allocations by defragmentation algorithm if (moveData.move.srcAllocation->GetUserData() == this) continue; switch (CheckCounters(moveData.move.srcAllocation->GetSize())) { case CounterStatus::Ignore: continue; case CounterStatus::End: return true; case CounterStatus::Pass: break; default: VMA_ASSERT(0); } // Move only single type of resources at once if (!VmaIsBufferImageGranularityConflict(moveData.type, currentType)) { // Try to fit allocation into free blocks if (AllocInOtherBlock(firstFreeBlock, vector.GetBlockCount(), moveData, vector)) return false; } if (!VmaIsBufferImageGranularityConflict(moveData.type, VMA_SUBALLOCATION_TYPE_IMAGE_OPTIMAL)) texturePresent = true; else if (!VmaIsBufferImageGranularityConflict(moveData.type, VMA_SUBALLOCATION_TYPE_BUFFER)) bufferPresent = true; else otherPresent = true; } } return prevMoveCount == m_Moves.size(); } #endif // _VMA_DEFRAGMENTATION_CONTEXT_FUNCTIONS #ifndef _VMA_POOL_T_FUNCTIONS VmaPool_T::VmaPool_T( VmaAllocator hAllocator, const VmaPoolCreateInfo& createInfo, VkDeviceSize preferredBlockSize) : m_BlockVector( hAllocator, this, // hParentPool createInfo.memoryTypeIndex, createInfo.blockSize != 0 ? createInfo.blockSize : preferredBlockSize, createInfo.minBlockCount, createInfo.maxBlockCount, (createInfo.flags& VMA_POOL_CREATE_IGNORE_BUFFER_IMAGE_GRANULARITY_BIT) != 0 ? 1 : hAllocator->GetBufferImageGranularity(), createInfo.blockSize != 0, // explicitBlockSize createInfo.flags & VMA_POOL_CREATE_ALGORITHM_MASK, // algorithm createInfo.priority, VMA_MAX(hAllocator->GetMemoryTypeMinAlignment(createInfo.memoryTypeIndex), createInfo.minAllocationAlignment), createInfo.pMemoryAllocateNext), m_Id(0), m_Name(VMA_NULL) {} VmaPool_T::~VmaPool_T() { VMA_ASSERT(m_PrevPool == VMA_NULL && m_NextPool == VMA_NULL); const VkAllocationCallbacks* allocs = m_BlockVector.GetAllocator()->GetAllocationCallbacks(); VmaFreeString(allocs, m_Name); } void VmaPool_T::SetName(const char* pName) { const VkAllocationCallbacks* allocs = m_BlockVector.GetAllocator()->GetAllocationCallbacks(); VmaFreeString(allocs, m_Name); if (pName != VMA_NULL) { m_Name = VmaCreateStringCopy(allocs, pName); } else { m_Name = VMA_NULL; } } #endif // _VMA_POOL_T_FUNCTIONS #ifndef _VMA_ALLOCATOR_T_FUNCTIONS VmaAllocator_T::VmaAllocator_T(const VmaAllocatorCreateInfo* pCreateInfo) : m_UseMutex((pCreateInfo->flags & VMA_ALLOCATOR_CREATE_EXTERNALLY_SYNCHRONIZED_BIT) == 0), m_VulkanApiVersion(pCreateInfo->vulkanApiVersion != 0 ? pCreateInfo->vulkanApiVersion : VK_API_VERSION_1_0), m_UseKhrDedicatedAllocation((pCreateInfo->flags & VMA_ALLOCATOR_CREATE_KHR_DEDICATED_ALLOCATION_BIT) != 0), m_UseKhrBindMemory2((pCreateInfo->flags & VMA_ALLOCATOR_CREATE_KHR_BIND_MEMORY2_BIT) != 0), m_UseExtMemoryBudget((pCreateInfo->flags & VMA_ALLOCATOR_CREATE_EXT_MEMORY_BUDGET_BIT) != 0), m_UseAmdDeviceCoherentMemory((pCreateInfo->flags & VMA_ALLOCATOR_CREATE_AMD_DEVICE_COHERENT_MEMORY_BIT) != 0), m_UseKhrBufferDeviceAddress((pCreateInfo->flags & VMA_ALLOCATOR_CREATE_BUFFER_DEVICE_ADDRESS_BIT) != 0), m_UseExtMemoryPriority((pCreateInfo->flags & VMA_ALLOCATOR_CREATE_EXT_MEMORY_PRIORITY_BIT) != 0), m_UseKhrMaintenance4((pCreateInfo->flags & VMA_ALLOCATOR_CREATE_KHR_MAINTENANCE4_BIT) != 0), m_UseKhrMaintenance5((pCreateInfo->flags & VMA_ALLOCATOR_CREATE_KHR_MAINTENANCE5_BIT) != 0), m_UseKhrExternalMemoryWin32((pCreateInfo->flags & VMA_ALLOCATOR_CREATE_KHR_EXTERNAL_MEMORY_WIN32_BIT) != 0), m_hDevice(pCreateInfo->device), m_hInstance(pCreateInfo->instance), m_AllocationCallbacksSpecified(pCreateInfo->pAllocationCallbacks != VMA_NULL), m_AllocationCallbacks(pCreateInfo->pAllocationCallbacks ? *pCreateInfo->pAllocationCallbacks : VmaEmptyAllocationCallbacks), m_AllocationObjectAllocator(&m_AllocationCallbacks), m_HeapSizeLimitMask(0), m_DeviceMemoryCount(0), m_PreferredLargeHeapBlockSize(0), m_PhysicalDevice(pCreateInfo->physicalDevice), m_GpuDefragmentationMemoryTypeBits(UINT32_MAX), m_NextPoolId(0), m_GlobalMemoryTypeBits(UINT32_MAX) { if(m_VulkanApiVersion >= VK_MAKE_VERSION(1, 1, 0)) { m_UseKhrDedicatedAllocation = false; m_UseKhrBindMemory2 = false; } if(VMA_DEBUG_DETECT_CORRUPTION) { // Needs to be multiply of uint32_t size because we are going to write VMA_CORRUPTION_DETECTION_MAGIC_VALUE to it. VMA_ASSERT(VMA_DEBUG_MARGIN % sizeof(uint32_t) == 0); } VMA_ASSERT(pCreateInfo->physicalDevice && pCreateInfo->device && pCreateInfo->instance); if(m_VulkanApiVersion < VK_MAKE_VERSION(1, 1, 0)) { #if !(VMA_DEDICATED_ALLOCATION) if((pCreateInfo->flags & VMA_ALLOCATOR_CREATE_KHR_DEDICATED_ALLOCATION_BIT) != 0) { VMA_ASSERT(0 && "VMA_ALLOCATOR_CREATE_KHR_DEDICATED_ALLOCATION_BIT set but required extensions are disabled by preprocessor macros."); } #endif #if !(VMA_BIND_MEMORY2) if((pCreateInfo->flags & VMA_ALLOCATOR_CREATE_KHR_BIND_MEMORY2_BIT) != 0) { VMA_ASSERT(0 && "VMA_ALLOCATOR_CREATE_KHR_BIND_MEMORY2_BIT set but required extension is disabled by preprocessor macros."); } #endif } #if !(VMA_MEMORY_BUDGET) if((pCreateInfo->flags & VMA_ALLOCATOR_CREATE_EXT_MEMORY_BUDGET_BIT) != 0) { VMA_ASSERT(0 && "VMA_ALLOCATOR_CREATE_EXT_MEMORY_BUDGET_BIT set but required extension is disabled by preprocessor macros."); } #endif #if !(VMA_BUFFER_DEVICE_ADDRESS) if(m_UseKhrBufferDeviceAddress) { VMA_ASSERT(0 && "VMA_ALLOCATOR_CREATE_BUFFER_DEVICE_ADDRESS_BIT is set but required extension or Vulkan 1.2 is not available in your Vulkan header or its support in VMA has been disabled by a preprocessor macro."); } #endif #if VMA_VULKAN_VERSION < 1004000 VMA_ASSERT(m_VulkanApiVersion < VK_MAKE_VERSION(1, 4, 0) && "vulkanApiVersion >= VK_API_VERSION_1_4 but required Vulkan version is disabled by preprocessor macros."); #endif #if VMA_VULKAN_VERSION < 1003000 VMA_ASSERT(m_VulkanApiVersion < VK_MAKE_VERSION(1, 3, 0) && "vulkanApiVersion >= VK_API_VERSION_1_3 but required Vulkan version is disabled by preprocessor macros."); #endif #if VMA_VULKAN_VERSION < 1002000 VMA_ASSERT(m_VulkanApiVersion < VK_MAKE_VERSION(1, 2, 0) && "vulkanApiVersion >= VK_API_VERSION_1_2 but required Vulkan version is disabled by preprocessor macros."); #endif #if VMA_VULKAN_VERSION < 1001000 VMA_ASSERT(m_VulkanApiVersion < VK_MAKE_VERSION(1, 1, 0) && "vulkanApiVersion >= VK_API_VERSION_1_1 but required Vulkan version is disabled by preprocessor macros."); #endif #if !(VMA_MEMORY_PRIORITY) if(m_UseExtMemoryPriority) { VMA_ASSERT(0 && "VMA_ALLOCATOR_CREATE_EXT_MEMORY_PRIORITY_BIT is set but required extension is not available in your Vulkan header or its support in VMA has been disabled by a preprocessor macro."); } #endif #if !(VMA_KHR_MAINTENANCE4) if(m_UseKhrMaintenance4) { VMA_ASSERT(0 && "VMA_ALLOCATOR_CREATE_KHR_MAINTENANCE4_BIT is set but required extension is not available in your Vulkan header or its support in VMA has been disabled by a preprocessor macro."); } #endif #if !(VMA_KHR_MAINTENANCE5) if(m_UseKhrMaintenance5) { VMA_ASSERT(0 && "VMA_ALLOCATOR_CREATE_KHR_MAINTENANCE5_BIT is set but required extension is not available in your Vulkan header or its support in VMA has been disabled by a preprocessor macro."); } #endif #if !(VMA_KHR_MAINTENANCE5) if(m_UseKhrMaintenance5) { VMA_ASSERT(0 && "VMA_ALLOCATOR_CREATE_KHR_MAINTENANCE5_BIT is set but required extension is not available in your Vulkan header or its support in VMA has been disabled by a preprocessor macro."); } #endif #if !(VMA_EXTERNAL_MEMORY_WIN32) if(m_UseKhrExternalMemoryWin32) { VMA_ASSERT(0 && "VMA_ALLOCATOR_CREATE_KHR_EXTERNAL_MEMORY_WIN32_BIT is set but required extension is not available in your Vulkan header or its support in VMA has been disabled by a preprocessor macro."); } #endif memset(&m_DeviceMemoryCallbacks, 0 ,sizeof(m_DeviceMemoryCallbacks)); memset(&m_PhysicalDeviceProperties, 0, sizeof(m_PhysicalDeviceProperties)); memset(&m_MemProps, 0, sizeof(m_MemProps)); memset(&m_pBlockVectors, 0, sizeof(m_pBlockVectors)); memset(&m_VulkanFunctions, 0, sizeof(m_VulkanFunctions)); #if VMA_EXTERNAL_MEMORY memset(&m_TypeExternalMemoryHandleTypes, 0, sizeof(m_TypeExternalMemoryHandleTypes)); #endif // #if VMA_EXTERNAL_MEMORY if(pCreateInfo->pDeviceMemoryCallbacks != VMA_NULL) { m_DeviceMemoryCallbacks.pUserData = pCreateInfo->pDeviceMemoryCallbacks->pUserData; m_DeviceMemoryCallbacks.pfnAllocate = pCreateInfo->pDeviceMemoryCallbacks->pfnAllocate; m_DeviceMemoryCallbacks.pfnFree = pCreateInfo->pDeviceMemoryCallbacks->pfnFree; } ImportVulkanFunctions(pCreateInfo->pVulkanFunctions); (*m_VulkanFunctions.vkGetPhysicalDeviceProperties)(m_PhysicalDevice, &m_PhysicalDeviceProperties); (*m_VulkanFunctions.vkGetPhysicalDeviceMemoryProperties)(m_PhysicalDevice, &m_MemProps); VMA_ASSERT(VmaIsPow2(VMA_MIN_ALIGNMENT)); VMA_ASSERT(VmaIsPow2(VMA_DEBUG_MIN_BUFFER_IMAGE_GRANULARITY)); VMA_ASSERT(VmaIsPow2(m_PhysicalDeviceProperties.limits.bufferImageGranularity)); VMA_ASSERT(VmaIsPow2(m_PhysicalDeviceProperties.limits.nonCoherentAtomSize)); m_PreferredLargeHeapBlockSize = (pCreateInfo->preferredLargeHeapBlockSize != 0) ? pCreateInfo->preferredLargeHeapBlockSize : static_cast(VMA_DEFAULT_LARGE_HEAP_BLOCK_SIZE); m_GlobalMemoryTypeBits = CalculateGlobalMemoryTypeBits(); #if VMA_EXTERNAL_MEMORY if(pCreateInfo->pTypeExternalMemoryHandleTypes != VMA_NULL) { memcpy(m_TypeExternalMemoryHandleTypes, pCreateInfo->pTypeExternalMemoryHandleTypes, sizeof(VkExternalMemoryHandleTypeFlagsKHR) * GetMemoryTypeCount()); } #endif // #if VMA_EXTERNAL_MEMORY if(pCreateInfo->pHeapSizeLimit != VMA_NULL) { for(uint32_t heapIndex = 0; heapIndex < GetMemoryHeapCount(); ++heapIndex) { const VkDeviceSize limit = pCreateInfo->pHeapSizeLimit[heapIndex]; if(limit != VK_WHOLE_SIZE) { m_HeapSizeLimitMask |= 1u << heapIndex; if(limit < m_MemProps.memoryHeaps[heapIndex].size) { m_MemProps.memoryHeaps[heapIndex].size = limit; } } } } for(uint32_t memTypeIndex = 0; memTypeIndex < GetMemoryTypeCount(); ++memTypeIndex) { // Create only supported types if((m_GlobalMemoryTypeBits & (1u << memTypeIndex)) != 0) { const VkDeviceSize preferredBlockSize = CalcPreferredBlockSize(memTypeIndex); m_pBlockVectors[memTypeIndex] = vma_new(this, VmaBlockVector)( this, VK_NULL_HANDLE, // hParentPool memTypeIndex, preferredBlockSize, 0, SIZE_MAX, GetBufferImageGranularity(), false, // explicitBlockSize 0, // algorithm 0.5f, // priority (0.5 is the default per Vulkan spec) GetMemoryTypeMinAlignment(memTypeIndex), // minAllocationAlignment VMA_NULL); // // pMemoryAllocateNext // No need to call m_pBlockVectors[memTypeIndex][blockVectorTypeIndex]->CreateMinBlocks here, // because minBlockCount is 0. } } } VkResult VmaAllocator_T::Init(const VmaAllocatorCreateInfo* pCreateInfo) { VkResult res = VK_SUCCESS; #if VMA_MEMORY_BUDGET if(m_UseExtMemoryBudget) { UpdateVulkanBudget(); } #endif // #if VMA_MEMORY_BUDGET return res; } VmaAllocator_T::~VmaAllocator_T() { VMA_ASSERT(m_Pools.IsEmpty()); for(size_t memTypeIndex = GetMemoryTypeCount(); memTypeIndex--; ) { vma_delete(this, m_pBlockVectors[memTypeIndex]); } } void VmaAllocator_T::ImportVulkanFunctions(const VmaVulkanFunctions* pVulkanFunctions) { #if VMA_STATIC_VULKAN_FUNCTIONS == 1 ImportVulkanFunctions_Static(); #endif if(pVulkanFunctions != VMA_NULL) { ImportVulkanFunctions_Custom(pVulkanFunctions); } #if VMA_DYNAMIC_VULKAN_FUNCTIONS == 1 ImportVulkanFunctions_Dynamic(); #endif ValidateVulkanFunctions(); } #if VMA_STATIC_VULKAN_FUNCTIONS == 1 void VmaAllocator_T::ImportVulkanFunctions_Static() { // Vulkan 1.0 m_VulkanFunctions.vkGetInstanceProcAddr = (PFN_vkGetInstanceProcAddr)vkGetInstanceProcAddr; m_VulkanFunctions.vkGetDeviceProcAddr = (PFN_vkGetDeviceProcAddr)vkGetDeviceProcAddr; m_VulkanFunctions.vkGetPhysicalDeviceProperties = (PFN_vkGetPhysicalDeviceProperties)vkGetPhysicalDeviceProperties; m_VulkanFunctions.vkGetPhysicalDeviceMemoryProperties = (PFN_vkGetPhysicalDeviceMemoryProperties)vkGetPhysicalDeviceMemoryProperties; m_VulkanFunctions.vkAllocateMemory = (PFN_vkAllocateMemory)vkAllocateMemory; m_VulkanFunctions.vkFreeMemory = (PFN_vkFreeMemory)vkFreeMemory; m_VulkanFunctions.vkMapMemory = (PFN_vkMapMemory)vkMapMemory; m_VulkanFunctions.vkUnmapMemory = (PFN_vkUnmapMemory)vkUnmapMemory; m_VulkanFunctions.vkFlushMappedMemoryRanges = (PFN_vkFlushMappedMemoryRanges)vkFlushMappedMemoryRanges; m_VulkanFunctions.vkInvalidateMappedMemoryRanges = (PFN_vkInvalidateMappedMemoryRanges)vkInvalidateMappedMemoryRanges; m_VulkanFunctions.vkBindBufferMemory = (PFN_vkBindBufferMemory)vkBindBufferMemory; m_VulkanFunctions.vkBindImageMemory = (PFN_vkBindImageMemory)vkBindImageMemory; m_VulkanFunctions.vkGetBufferMemoryRequirements = (PFN_vkGetBufferMemoryRequirements)vkGetBufferMemoryRequirements; m_VulkanFunctions.vkGetImageMemoryRequirements = (PFN_vkGetImageMemoryRequirements)vkGetImageMemoryRequirements; m_VulkanFunctions.vkCreateBuffer = (PFN_vkCreateBuffer)vkCreateBuffer; m_VulkanFunctions.vkDestroyBuffer = (PFN_vkDestroyBuffer)vkDestroyBuffer; m_VulkanFunctions.vkCreateImage = (PFN_vkCreateImage)vkCreateImage; m_VulkanFunctions.vkDestroyImage = (PFN_vkDestroyImage)vkDestroyImage; m_VulkanFunctions.vkCmdCopyBuffer = (PFN_vkCmdCopyBuffer)vkCmdCopyBuffer; // Vulkan 1.1 #if VMA_VULKAN_VERSION >= 1001000 if(m_VulkanApiVersion >= VK_MAKE_VERSION(1, 1, 0)) { m_VulkanFunctions.vkGetBufferMemoryRequirements2KHR = (PFN_vkGetBufferMemoryRequirements2)vkGetBufferMemoryRequirements2; m_VulkanFunctions.vkGetImageMemoryRequirements2KHR = (PFN_vkGetImageMemoryRequirements2)vkGetImageMemoryRequirements2; m_VulkanFunctions.vkBindBufferMemory2KHR = (PFN_vkBindBufferMemory2)vkBindBufferMemory2; m_VulkanFunctions.vkBindImageMemory2KHR = (PFN_vkBindImageMemory2)vkBindImageMemory2; } #endif #if VMA_VULKAN_VERSION >= 1001000 if(m_VulkanApiVersion >= VK_MAKE_VERSION(1, 1, 0)) { m_VulkanFunctions.vkGetPhysicalDeviceMemoryProperties2KHR = (PFN_vkGetPhysicalDeviceMemoryProperties2)vkGetPhysicalDeviceMemoryProperties2; } #endif #if VMA_VULKAN_VERSION >= 1003000 if(m_VulkanApiVersion >= VK_MAKE_VERSION(1, 3, 0)) { m_VulkanFunctions.vkGetDeviceBufferMemoryRequirements = (PFN_vkGetDeviceBufferMemoryRequirements)vkGetDeviceBufferMemoryRequirements; m_VulkanFunctions.vkGetDeviceImageMemoryRequirements = (PFN_vkGetDeviceImageMemoryRequirements)vkGetDeviceImageMemoryRequirements; } #endif } #endif // VMA_STATIC_VULKAN_FUNCTIONS == 1 void VmaAllocator_T::ImportVulkanFunctions_Custom(const VmaVulkanFunctions* pVulkanFunctions) { VMA_ASSERT(pVulkanFunctions != VMA_NULL); #define VMA_COPY_IF_NOT_NULL(funcName) \ if(pVulkanFunctions->funcName != VMA_NULL) m_VulkanFunctions.funcName = pVulkanFunctions->funcName; VMA_COPY_IF_NOT_NULL(vkGetInstanceProcAddr); VMA_COPY_IF_NOT_NULL(vkGetDeviceProcAddr); VMA_COPY_IF_NOT_NULL(vkGetPhysicalDeviceProperties); VMA_COPY_IF_NOT_NULL(vkGetPhysicalDeviceMemoryProperties); VMA_COPY_IF_NOT_NULL(vkAllocateMemory); VMA_COPY_IF_NOT_NULL(vkFreeMemory); VMA_COPY_IF_NOT_NULL(vkMapMemory); VMA_COPY_IF_NOT_NULL(vkUnmapMemory); VMA_COPY_IF_NOT_NULL(vkFlushMappedMemoryRanges); VMA_COPY_IF_NOT_NULL(vkInvalidateMappedMemoryRanges); VMA_COPY_IF_NOT_NULL(vkBindBufferMemory); VMA_COPY_IF_NOT_NULL(vkBindImageMemory); VMA_COPY_IF_NOT_NULL(vkGetBufferMemoryRequirements); VMA_COPY_IF_NOT_NULL(vkGetImageMemoryRequirements); VMA_COPY_IF_NOT_NULL(vkCreateBuffer); VMA_COPY_IF_NOT_NULL(vkDestroyBuffer); VMA_COPY_IF_NOT_NULL(vkCreateImage); VMA_COPY_IF_NOT_NULL(vkDestroyImage); VMA_COPY_IF_NOT_NULL(vkCmdCopyBuffer); #if VMA_DEDICATED_ALLOCATION || VMA_VULKAN_VERSION >= 1001000 VMA_COPY_IF_NOT_NULL(vkGetBufferMemoryRequirements2KHR); VMA_COPY_IF_NOT_NULL(vkGetImageMemoryRequirements2KHR); #endif #if VMA_BIND_MEMORY2 || VMA_VULKAN_VERSION >= 1001000 VMA_COPY_IF_NOT_NULL(vkBindBufferMemory2KHR); VMA_COPY_IF_NOT_NULL(vkBindImageMemory2KHR); #endif #if VMA_MEMORY_BUDGET || VMA_VULKAN_VERSION >= 1001000 VMA_COPY_IF_NOT_NULL(vkGetPhysicalDeviceMemoryProperties2KHR); #endif #if VMA_KHR_MAINTENANCE4 || VMA_VULKAN_VERSION >= 1003000 VMA_COPY_IF_NOT_NULL(vkGetDeviceBufferMemoryRequirements); VMA_COPY_IF_NOT_NULL(vkGetDeviceImageMemoryRequirements); #endif #if VMA_EXTERNAL_MEMORY_WIN32 VMA_COPY_IF_NOT_NULL(vkGetMemoryWin32HandleKHR); #endif #undef VMA_COPY_IF_NOT_NULL } #if VMA_DYNAMIC_VULKAN_FUNCTIONS == 1 void VmaAllocator_T::ImportVulkanFunctions_Dynamic() { VMA_ASSERT(m_VulkanFunctions.vkGetInstanceProcAddr && m_VulkanFunctions.vkGetDeviceProcAddr && "To use VMA_DYNAMIC_VULKAN_FUNCTIONS in new versions of VMA you now have to pass " "VmaVulkanFunctions::vkGetInstanceProcAddr and vkGetDeviceProcAddr as VmaAllocatorCreateInfo::pVulkanFunctions. " "Other members can be null."); #define VMA_FETCH_INSTANCE_FUNC(memberName, functionPointerType, functionNameString) \ if(m_VulkanFunctions.memberName == VMA_NULL) \ m_VulkanFunctions.memberName = \ (functionPointerType)m_VulkanFunctions.vkGetInstanceProcAddr(m_hInstance, functionNameString); #define VMA_FETCH_DEVICE_FUNC(memberName, functionPointerType, functionNameString) \ if(m_VulkanFunctions.memberName == VMA_NULL) \ m_VulkanFunctions.memberName = \ (functionPointerType)m_VulkanFunctions.vkGetDeviceProcAddr(m_hDevice, functionNameString); VMA_FETCH_INSTANCE_FUNC(vkGetPhysicalDeviceProperties, PFN_vkGetPhysicalDeviceProperties, "vkGetPhysicalDeviceProperties"); VMA_FETCH_INSTANCE_FUNC(vkGetPhysicalDeviceMemoryProperties, PFN_vkGetPhysicalDeviceMemoryProperties, "vkGetPhysicalDeviceMemoryProperties"); VMA_FETCH_DEVICE_FUNC(vkAllocateMemory, PFN_vkAllocateMemory, "vkAllocateMemory"); VMA_FETCH_DEVICE_FUNC(vkFreeMemory, PFN_vkFreeMemory, "vkFreeMemory"); VMA_FETCH_DEVICE_FUNC(vkMapMemory, PFN_vkMapMemory, "vkMapMemory"); VMA_FETCH_DEVICE_FUNC(vkUnmapMemory, PFN_vkUnmapMemory, "vkUnmapMemory"); VMA_FETCH_DEVICE_FUNC(vkFlushMappedMemoryRanges, PFN_vkFlushMappedMemoryRanges, "vkFlushMappedMemoryRanges"); VMA_FETCH_DEVICE_FUNC(vkInvalidateMappedMemoryRanges, PFN_vkInvalidateMappedMemoryRanges, "vkInvalidateMappedMemoryRanges"); VMA_FETCH_DEVICE_FUNC(vkBindBufferMemory, PFN_vkBindBufferMemory, "vkBindBufferMemory"); VMA_FETCH_DEVICE_FUNC(vkBindImageMemory, PFN_vkBindImageMemory, "vkBindImageMemory"); VMA_FETCH_DEVICE_FUNC(vkGetBufferMemoryRequirements, PFN_vkGetBufferMemoryRequirements, "vkGetBufferMemoryRequirements"); VMA_FETCH_DEVICE_FUNC(vkGetImageMemoryRequirements, PFN_vkGetImageMemoryRequirements, "vkGetImageMemoryRequirements"); VMA_FETCH_DEVICE_FUNC(vkCreateBuffer, PFN_vkCreateBuffer, "vkCreateBuffer"); VMA_FETCH_DEVICE_FUNC(vkDestroyBuffer, PFN_vkDestroyBuffer, "vkDestroyBuffer"); VMA_FETCH_DEVICE_FUNC(vkCreateImage, PFN_vkCreateImage, "vkCreateImage"); VMA_FETCH_DEVICE_FUNC(vkDestroyImage, PFN_vkDestroyImage, "vkDestroyImage"); VMA_FETCH_DEVICE_FUNC(vkCmdCopyBuffer, PFN_vkCmdCopyBuffer, "vkCmdCopyBuffer"); #if VMA_VULKAN_VERSION >= 1001000 if(m_VulkanApiVersion >= VK_MAKE_VERSION(1, 1, 0)) { VMA_FETCH_DEVICE_FUNC(vkGetBufferMemoryRequirements2KHR, PFN_vkGetBufferMemoryRequirements2, "vkGetBufferMemoryRequirements2"); VMA_FETCH_DEVICE_FUNC(vkGetImageMemoryRequirements2KHR, PFN_vkGetImageMemoryRequirements2, "vkGetImageMemoryRequirements2"); VMA_FETCH_DEVICE_FUNC(vkBindBufferMemory2KHR, PFN_vkBindBufferMemory2, "vkBindBufferMemory2"); VMA_FETCH_DEVICE_FUNC(vkBindImageMemory2KHR, PFN_vkBindImageMemory2, "vkBindImageMemory2"); } #endif #if VMA_MEMORY_BUDGET || VMA_VULKAN_VERSION >= 1001000 if(m_VulkanApiVersion >= VK_MAKE_VERSION(1, 1, 0)) { VMA_FETCH_INSTANCE_FUNC(vkGetPhysicalDeviceMemoryProperties2KHR, PFN_vkGetPhysicalDeviceMemoryProperties2KHR, "vkGetPhysicalDeviceMemoryProperties2"); // Try to fetch the pointer from the other name, based on suspected driver bug - see issue #410. VMA_FETCH_INSTANCE_FUNC(vkGetPhysicalDeviceMemoryProperties2KHR, PFN_vkGetPhysicalDeviceMemoryProperties2KHR, "vkGetPhysicalDeviceMemoryProperties2KHR"); } else if(m_UseExtMemoryBudget) { VMA_FETCH_INSTANCE_FUNC(vkGetPhysicalDeviceMemoryProperties2KHR, PFN_vkGetPhysicalDeviceMemoryProperties2KHR, "vkGetPhysicalDeviceMemoryProperties2KHR"); // Try to fetch the pointer from the other name, based on suspected driver bug - see issue #410. VMA_FETCH_INSTANCE_FUNC(vkGetPhysicalDeviceMemoryProperties2KHR, PFN_vkGetPhysicalDeviceMemoryProperties2KHR, "vkGetPhysicalDeviceMemoryProperties2"); } #endif #if VMA_DEDICATED_ALLOCATION if(m_UseKhrDedicatedAllocation) { VMA_FETCH_DEVICE_FUNC(vkGetBufferMemoryRequirements2KHR, PFN_vkGetBufferMemoryRequirements2KHR, "vkGetBufferMemoryRequirements2KHR"); VMA_FETCH_DEVICE_FUNC(vkGetImageMemoryRequirements2KHR, PFN_vkGetImageMemoryRequirements2KHR, "vkGetImageMemoryRequirements2KHR"); } #endif #if VMA_BIND_MEMORY2 if(m_UseKhrBindMemory2) { VMA_FETCH_DEVICE_FUNC(vkBindBufferMemory2KHR, PFN_vkBindBufferMemory2KHR, "vkBindBufferMemory2KHR"); VMA_FETCH_DEVICE_FUNC(vkBindImageMemory2KHR, PFN_vkBindImageMemory2KHR, "vkBindImageMemory2KHR"); } #endif // #if VMA_BIND_MEMORY2 #if VMA_MEMORY_BUDGET || VMA_VULKAN_VERSION >= 1001000 if(m_VulkanApiVersion >= VK_MAKE_VERSION(1, 1, 0)) { VMA_FETCH_INSTANCE_FUNC(vkGetPhysicalDeviceMemoryProperties2KHR, PFN_vkGetPhysicalDeviceMemoryProperties2KHR, "vkGetPhysicalDeviceMemoryProperties2"); } else if(m_UseExtMemoryBudget) { VMA_FETCH_INSTANCE_FUNC(vkGetPhysicalDeviceMemoryProperties2KHR, PFN_vkGetPhysicalDeviceMemoryProperties2KHR, "vkGetPhysicalDeviceMemoryProperties2KHR"); } #endif // #if VMA_MEMORY_BUDGET #if VMA_VULKAN_VERSION >= 1003000 if(m_VulkanApiVersion >= VK_MAKE_VERSION(1, 3, 0)) { VMA_FETCH_DEVICE_FUNC(vkGetDeviceBufferMemoryRequirements, PFN_vkGetDeviceBufferMemoryRequirements, "vkGetDeviceBufferMemoryRequirements"); VMA_FETCH_DEVICE_FUNC(vkGetDeviceImageMemoryRequirements, PFN_vkGetDeviceImageMemoryRequirements, "vkGetDeviceImageMemoryRequirements"); } #endif #if VMA_KHR_MAINTENANCE4 if(m_UseKhrMaintenance4) { VMA_FETCH_DEVICE_FUNC(vkGetDeviceBufferMemoryRequirements, PFN_vkGetDeviceBufferMemoryRequirementsKHR, "vkGetDeviceBufferMemoryRequirementsKHR"); VMA_FETCH_DEVICE_FUNC(vkGetDeviceImageMemoryRequirements, PFN_vkGetDeviceImageMemoryRequirementsKHR, "vkGetDeviceImageMemoryRequirementsKHR"); } #endif #if VMA_EXTERNAL_MEMORY_WIN32 if (m_UseKhrExternalMemoryWin32) { VMA_FETCH_DEVICE_FUNC(vkGetMemoryWin32HandleKHR, PFN_vkGetMemoryWin32HandleKHR, "vkGetMemoryWin32HandleKHR"); } #endif #undef VMA_FETCH_DEVICE_FUNC #undef VMA_FETCH_INSTANCE_FUNC } #endif // VMA_DYNAMIC_VULKAN_FUNCTIONS == 1 void VmaAllocator_T::ValidateVulkanFunctions() { VMA_ASSERT(m_VulkanFunctions.vkGetPhysicalDeviceProperties != VMA_NULL); VMA_ASSERT(m_VulkanFunctions.vkGetPhysicalDeviceMemoryProperties != VMA_NULL); VMA_ASSERT(m_VulkanFunctions.vkAllocateMemory != VMA_NULL); VMA_ASSERT(m_VulkanFunctions.vkFreeMemory != VMA_NULL); VMA_ASSERT(m_VulkanFunctions.vkMapMemory != VMA_NULL); VMA_ASSERT(m_VulkanFunctions.vkUnmapMemory != VMA_NULL); VMA_ASSERT(m_VulkanFunctions.vkFlushMappedMemoryRanges != VMA_NULL); VMA_ASSERT(m_VulkanFunctions.vkInvalidateMappedMemoryRanges != VMA_NULL); VMA_ASSERT(m_VulkanFunctions.vkBindBufferMemory != VMA_NULL); VMA_ASSERT(m_VulkanFunctions.vkBindImageMemory != VMA_NULL); VMA_ASSERT(m_VulkanFunctions.vkGetBufferMemoryRequirements != VMA_NULL); VMA_ASSERT(m_VulkanFunctions.vkGetImageMemoryRequirements != VMA_NULL); VMA_ASSERT(m_VulkanFunctions.vkCreateBuffer != VMA_NULL); VMA_ASSERT(m_VulkanFunctions.vkDestroyBuffer != VMA_NULL); VMA_ASSERT(m_VulkanFunctions.vkCreateImage != VMA_NULL); VMA_ASSERT(m_VulkanFunctions.vkDestroyImage != VMA_NULL); VMA_ASSERT(m_VulkanFunctions.vkCmdCopyBuffer != VMA_NULL); #if VMA_DEDICATED_ALLOCATION || VMA_VULKAN_VERSION >= 1001000 if(m_VulkanApiVersion >= VK_MAKE_VERSION(1, 1, 0) || m_UseKhrDedicatedAllocation) { VMA_ASSERT(m_VulkanFunctions.vkGetBufferMemoryRequirements2KHR != VMA_NULL); VMA_ASSERT(m_VulkanFunctions.vkGetImageMemoryRequirements2KHR != VMA_NULL); } #endif #if VMA_BIND_MEMORY2 || VMA_VULKAN_VERSION >= 1001000 if(m_VulkanApiVersion >= VK_MAKE_VERSION(1, 1, 0) || m_UseKhrBindMemory2) { VMA_ASSERT(m_VulkanFunctions.vkBindBufferMemory2KHR != VMA_NULL); VMA_ASSERT(m_VulkanFunctions.vkBindImageMemory2KHR != VMA_NULL); } #endif #if VMA_MEMORY_BUDGET || VMA_VULKAN_VERSION >= 1001000 if(m_UseExtMemoryBudget || m_VulkanApiVersion >= VK_MAKE_VERSION(1, 1, 0)) { VMA_ASSERT(m_VulkanFunctions.vkGetPhysicalDeviceMemoryProperties2KHR != VMA_NULL); } #endif #if VMA_EXTERNAL_MEMORY_WIN32 if (m_UseKhrExternalMemoryWin32) { VMA_ASSERT(m_VulkanFunctions.vkGetMemoryWin32HandleKHR != VMA_NULL); } #endif // Not validating these due to suspected driver bugs with these function // pointers being null despite correct extension or Vulkan version is enabled. // See issue #397. Their usage in VMA is optional anyway. // // VMA_ASSERT(m_VulkanFunctions.vkGetDeviceBufferMemoryRequirements != VMA_NULL); // VMA_ASSERT(m_VulkanFunctions.vkGetDeviceImageMemoryRequirements != VMA_NULL); } VkDeviceSize VmaAllocator_T::CalcPreferredBlockSize(uint32_t memTypeIndex) { const uint32_t heapIndex = MemoryTypeIndexToHeapIndex(memTypeIndex); const VkDeviceSize heapSize = m_MemProps.memoryHeaps[heapIndex].size; const bool isSmallHeap = heapSize <= VMA_SMALL_HEAP_MAX_SIZE; return VmaAlignUp(isSmallHeap ? (heapSize / 8) : m_PreferredLargeHeapBlockSize, (VkDeviceSize)32); } VkResult VmaAllocator_T::AllocateMemoryOfType( VmaPool pool, VkDeviceSize size, VkDeviceSize alignment, bool dedicatedPreferred, VkBuffer dedicatedBuffer, VkImage dedicatedImage, VmaBufferImageUsage dedicatedBufferImageUsage, const VmaAllocationCreateInfo& createInfo, uint32_t memTypeIndex, VmaSuballocationType suballocType, VmaDedicatedAllocationList& dedicatedAllocations, VmaBlockVector& blockVector, size_t allocationCount, VmaAllocation* pAllocations) { VMA_ASSERT(pAllocations != VMA_NULL); VMA_DEBUG_LOG_FORMAT(" AllocateMemory: MemoryTypeIndex=%" PRIu32 ", AllocationCount=%zu, Size=%" PRIu64, memTypeIndex, allocationCount, size); VmaAllocationCreateInfo finalCreateInfo = createInfo; VkResult res = CalcMemTypeParams( finalCreateInfo, memTypeIndex, size, allocationCount); if(res != VK_SUCCESS) return res; if((finalCreateInfo.flags & VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT) != 0) { return AllocateDedicatedMemory( pool, size, suballocType, dedicatedAllocations, memTypeIndex, (finalCreateInfo.flags & VMA_ALLOCATION_CREATE_MAPPED_BIT) != 0, (finalCreateInfo.flags & VMA_ALLOCATION_CREATE_USER_DATA_COPY_STRING_BIT) != 0, (finalCreateInfo.flags & (VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT | VMA_ALLOCATION_CREATE_HOST_ACCESS_RANDOM_BIT)) != 0, (finalCreateInfo.flags & VMA_ALLOCATION_CREATE_CAN_ALIAS_BIT) != 0, finalCreateInfo.pUserData, finalCreateInfo.priority, dedicatedBuffer, dedicatedImage, dedicatedBufferImageUsage, allocationCount, pAllocations, blockVector.GetAllocationNextPtr()); } else { const bool canAllocateDedicated = (finalCreateInfo.flags & VMA_ALLOCATION_CREATE_NEVER_ALLOCATE_BIT) == 0 && (pool == VK_NULL_HANDLE || !blockVector.HasExplicitBlockSize()); if(canAllocateDedicated) { // Heuristics: Allocate dedicated memory if requested size if greater than half of preferred block size. if(size > blockVector.GetPreferredBlockSize() / 2) { dedicatedPreferred = true; } // Protection against creating each allocation as dedicated when we reach or exceed heap size/budget, // which can quickly deplete maxMemoryAllocationCount: Don't prefer dedicated allocations when above // 3/4 of the maximum allocation count. if(m_PhysicalDeviceProperties.limits.maxMemoryAllocationCount < UINT32_MAX / 4 && m_DeviceMemoryCount.load() > m_PhysicalDeviceProperties.limits.maxMemoryAllocationCount * 3 / 4) { dedicatedPreferred = false; } if(dedicatedPreferred) { res = AllocateDedicatedMemory( pool, size, suballocType, dedicatedAllocations, memTypeIndex, (finalCreateInfo.flags & VMA_ALLOCATION_CREATE_MAPPED_BIT) != 0, (finalCreateInfo.flags & VMA_ALLOCATION_CREATE_USER_DATA_COPY_STRING_BIT) != 0, (finalCreateInfo.flags & (VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT | VMA_ALLOCATION_CREATE_HOST_ACCESS_RANDOM_BIT)) != 0, (finalCreateInfo.flags & VMA_ALLOCATION_CREATE_CAN_ALIAS_BIT) != 0, finalCreateInfo.pUserData, finalCreateInfo.priority, dedicatedBuffer, dedicatedImage, dedicatedBufferImageUsage, allocationCount, pAllocations, blockVector.GetAllocationNextPtr()); if(res == VK_SUCCESS) { // Succeeded: AllocateDedicatedMemory function already filled pMemory, nothing more to do here. VMA_DEBUG_LOG(" Allocated as DedicatedMemory"); return VK_SUCCESS; } } } res = blockVector.Allocate( size, alignment, finalCreateInfo, suballocType, allocationCount, pAllocations); if(res == VK_SUCCESS) return VK_SUCCESS; // Try dedicated memory. if(canAllocateDedicated && !dedicatedPreferred) { res = AllocateDedicatedMemory( pool, size, suballocType, dedicatedAllocations, memTypeIndex, (finalCreateInfo.flags & VMA_ALLOCATION_CREATE_MAPPED_BIT) != 0, (finalCreateInfo.flags & VMA_ALLOCATION_CREATE_USER_DATA_COPY_STRING_BIT) != 0, (finalCreateInfo.flags & (VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT | VMA_ALLOCATION_CREATE_HOST_ACCESS_RANDOM_BIT)) != 0, (finalCreateInfo.flags & VMA_ALLOCATION_CREATE_CAN_ALIAS_BIT) != 0, finalCreateInfo.pUserData, finalCreateInfo.priority, dedicatedBuffer, dedicatedImage, dedicatedBufferImageUsage, allocationCount, pAllocations, blockVector.GetAllocationNextPtr()); if(res == VK_SUCCESS) { // Succeeded: AllocateDedicatedMemory function already filled pMemory, nothing more to do here. VMA_DEBUG_LOG(" Allocated as DedicatedMemory"); return VK_SUCCESS; } } // Everything failed: Return error code. VMA_DEBUG_LOG(" vkAllocateMemory FAILED"); return res; } } VkResult VmaAllocator_T::AllocateDedicatedMemory( VmaPool pool, VkDeviceSize size, VmaSuballocationType suballocType, VmaDedicatedAllocationList& dedicatedAllocations, uint32_t memTypeIndex, bool map, bool isUserDataString, bool isMappingAllowed, bool canAliasMemory, void* pUserData, float priority, VkBuffer dedicatedBuffer, VkImage dedicatedImage, VmaBufferImageUsage dedicatedBufferImageUsage, size_t allocationCount, VmaAllocation* pAllocations, const void* pNextChain) { VMA_ASSERT(allocationCount > 0 && pAllocations); VkMemoryAllocateInfo allocInfo = { VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO }; allocInfo.memoryTypeIndex = memTypeIndex; allocInfo.allocationSize = size; allocInfo.pNext = pNextChain; #if VMA_DEDICATED_ALLOCATION || VMA_VULKAN_VERSION >= 1001000 VkMemoryDedicatedAllocateInfoKHR dedicatedAllocInfo = { VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO_KHR }; if(!canAliasMemory) { if(m_UseKhrDedicatedAllocation || m_VulkanApiVersion >= VK_MAKE_VERSION(1, 1, 0)) { if(dedicatedBuffer != VK_NULL_HANDLE) { VMA_ASSERT(dedicatedImage == VK_NULL_HANDLE); dedicatedAllocInfo.buffer = dedicatedBuffer; VmaPnextChainPushFront(&allocInfo, &dedicatedAllocInfo); } else if(dedicatedImage != VK_NULL_HANDLE) { dedicatedAllocInfo.image = dedicatedImage; VmaPnextChainPushFront(&allocInfo, &dedicatedAllocInfo); } } } #endif // #if VMA_DEDICATED_ALLOCATION || VMA_VULKAN_VERSION >= 1001000 #if VMA_BUFFER_DEVICE_ADDRESS VkMemoryAllocateFlagsInfoKHR allocFlagsInfo = { VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO_KHR }; if(m_UseKhrBufferDeviceAddress) { bool canContainBufferWithDeviceAddress = true; if(dedicatedBuffer != VK_NULL_HANDLE) { canContainBufferWithDeviceAddress = dedicatedBufferImageUsage == VmaBufferImageUsage::UNKNOWN || dedicatedBufferImageUsage.Contains(VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT_EXT); } else if(dedicatedImage != VK_NULL_HANDLE) { canContainBufferWithDeviceAddress = false; } if(canContainBufferWithDeviceAddress) { allocFlagsInfo.flags = VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT_KHR; VmaPnextChainPushFront(&allocInfo, &allocFlagsInfo); } } #endif // #if VMA_BUFFER_DEVICE_ADDRESS #if VMA_MEMORY_PRIORITY VkMemoryPriorityAllocateInfoEXT priorityInfo = { VK_STRUCTURE_TYPE_MEMORY_PRIORITY_ALLOCATE_INFO_EXT }; if(m_UseExtMemoryPriority) { VMA_ASSERT(priority >= 0.f && priority <= 1.f); priorityInfo.priority = priority; VmaPnextChainPushFront(&allocInfo, &priorityInfo); } #endif // #if VMA_MEMORY_PRIORITY #if VMA_EXTERNAL_MEMORY // Attach VkExportMemoryAllocateInfoKHR if necessary. VkExportMemoryAllocateInfoKHR exportMemoryAllocInfo = { VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_KHR }; exportMemoryAllocInfo.handleTypes = GetExternalMemoryHandleTypeFlags(memTypeIndex); if(exportMemoryAllocInfo.handleTypes != 0) { VmaPnextChainPushFront(&allocInfo, &exportMemoryAllocInfo); } #endif // #if VMA_EXTERNAL_MEMORY size_t allocIndex; VkResult res = VK_SUCCESS; for(allocIndex = 0; allocIndex < allocationCount; ++allocIndex) { res = AllocateDedicatedMemoryPage( pool, size, suballocType, memTypeIndex, allocInfo, map, isUserDataString, isMappingAllowed, pUserData, pAllocations + allocIndex); if(res != VK_SUCCESS) { break; } } if(res == VK_SUCCESS) { for (allocIndex = 0; allocIndex < allocationCount; ++allocIndex) { dedicatedAllocations.Register(pAllocations[allocIndex]); } VMA_DEBUG_LOG_FORMAT(" Allocated DedicatedMemory Count=%zu, MemoryTypeIndex=#%" PRIu32, allocationCount, memTypeIndex); } else { // Free all already created allocations. while(allocIndex--) { VmaAllocation currAlloc = pAllocations[allocIndex]; VkDeviceMemory hMemory = currAlloc->GetMemory(); /* There is no need to call this, because Vulkan spec allows to skip vkUnmapMemory before vkFreeMemory. if(currAlloc->GetMappedData() != VMA_NULL) { (*m_VulkanFunctions.vkUnmapMemory)(m_hDevice, hMemory); } */ FreeVulkanMemory(memTypeIndex, currAlloc->GetSize(), hMemory); m_Budget.RemoveAllocation(MemoryTypeIndexToHeapIndex(memTypeIndex), currAlloc->GetSize()); m_AllocationObjectAllocator.Free(currAlloc); } memset(pAllocations, 0, sizeof(VmaAllocation) * allocationCount); } return res; } VkResult VmaAllocator_T::AllocateDedicatedMemoryPage( VmaPool pool, VkDeviceSize size, VmaSuballocationType suballocType, uint32_t memTypeIndex, const VkMemoryAllocateInfo& allocInfo, bool map, bool isUserDataString, bool isMappingAllowed, void* pUserData, VmaAllocation* pAllocation) { VkDeviceMemory hMemory = VK_NULL_HANDLE; VkResult res = AllocateVulkanMemory(&allocInfo, &hMemory); if(res < 0) { VMA_DEBUG_LOG(" vkAllocateMemory FAILED"); return res; } void* pMappedData = VMA_NULL; if(map) { res = (*m_VulkanFunctions.vkMapMemory)( m_hDevice, hMemory, 0, VK_WHOLE_SIZE, 0, &pMappedData); if(res < 0) { VMA_DEBUG_LOG(" vkMapMemory FAILED"); FreeVulkanMemory(memTypeIndex, size, hMemory); return res; } } *pAllocation = m_AllocationObjectAllocator.Allocate(isMappingAllowed); (*pAllocation)->InitDedicatedAllocation(this, pool, memTypeIndex, hMemory, suballocType, pMappedData, size); if (isUserDataString) (*pAllocation)->SetName(this, (const char*)pUserData); else (*pAllocation)->SetUserData(this, pUserData); m_Budget.AddAllocation(MemoryTypeIndexToHeapIndex(memTypeIndex), size); if(VMA_DEBUG_INITIALIZE_ALLOCATIONS) { FillAllocation(*pAllocation, VMA_ALLOCATION_FILL_PATTERN_CREATED); } return VK_SUCCESS; } void VmaAllocator_T::GetBufferMemoryRequirements( VkBuffer hBuffer, VkMemoryRequirements& memReq, bool& requiresDedicatedAllocation, bool& prefersDedicatedAllocation) const { #if VMA_DEDICATED_ALLOCATION || VMA_VULKAN_VERSION >= 1001000 if(m_UseKhrDedicatedAllocation || m_VulkanApiVersion >= VK_MAKE_VERSION(1, 1, 0)) { VkBufferMemoryRequirementsInfo2KHR memReqInfo = { VK_STRUCTURE_TYPE_BUFFER_MEMORY_REQUIREMENTS_INFO_2_KHR }; memReqInfo.buffer = hBuffer; VkMemoryDedicatedRequirementsKHR memDedicatedReq = { VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS_KHR }; VkMemoryRequirements2KHR memReq2 = { VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2_KHR }; VmaPnextChainPushFront(&memReq2, &memDedicatedReq); (*m_VulkanFunctions.vkGetBufferMemoryRequirements2KHR)(m_hDevice, &memReqInfo, &memReq2); memReq = memReq2.memoryRequirements; requiresDedicatedAllocation = (memDedicatedReq.requiresDedicatedAllocation != VK_FALSE); prefersDedicatedAllocation = (memDedicatedReq.prefersDedicatedAllocation != VK_FALSE); } else #endif // #if VMA_DEDICATED_ALLOCATION || VMA_VULKAN_VERSION >= 1001000 { (*m_VulkanFunctions.vkGetBufferMemoryRequirements)(m_hDevice, hBuffer, &memReq); requiresDedicatedAllocation = false; prefersDedicatedAllocation = false; } } void VmaAllocator_T::GetImageMemoryRequirements( VkImage hImage, VkMemoryRequirements& memReq, bool& requiresDedicatedAllocation, bool& prefersDedicatedAllocation) const { #if VMA_DEDICATED_ALLOCATION || VMA_VULKAN_VERSION >= 1001000 if(m_UseKhrDedicatedAllocation || m_VulkanApiVersion >= VK_MAKE_VERSION(1, 1, 0)) { VkImageMemoryRequirementsInfo2KHR memReqInfo = { VK_STRUCTURE_TYPE_IMAGE_MEMORY_REQUIREMENTS_INFO_2_KHR }; memReqInfo.image = hImage; VkMemoryDedicatedRequirementsKHR memDedicatedReq = { VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS_KHR }; VkMemoryRequirements2KHR memReq2 = { VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2_KHR }; VmaPnextChainPushFront(&memReq2, &memDedicatedReq); (*m_VulkanFunctions.vkGetImageMemoryRequirements2KHR)(m_hDevice, &memReqInfo, &memReq2); memReq = memReq2.memoryRequirements; requiresDedicatedAllocation = (memDedicatedReq.requiresDedicatedAllocation != VK_FALSE); prefersDedicatedAllocation = (memDedicatedReq.prefersDedicatedAllocation != VK_FALSE); } else #endif // #if VMA_DEDICATED_ALLOCATION || VMA_VULKAN_VERSION >= 1001000 { (*m_VulkanFunctions.vkGetImageMemoryRequirements)(m_hDevice, hImage, &memReq); requiresDedicatedAllocation = false; prefersDedicatedAllocation = false; } } VkResult VmaAllocator_T::FindMemoryTypeIndex( uint32_t memoryTypeBits, const VmaAllocationCreateInfo* pAllocationCreateInfo, VmaBufferImageUsage bufImgUsage, uint32_t* pMemoryTypeIndex) const { memoryTypeBits &= GetGlobalMemoryTypeBits(); if(pAllocationCreateInfo->memoryTypeBits != 0) { memoryTypeBits &= pAllocationCreateInfo->memoryTypeBits; } VkMemoryPropertyFlags requiredFlags = 0, preferredFlags = 0, notPreferredFlags = 0; if(!FindMemoryPreferences( IsIntegratedGpu(), *pAllocationCreateInfo, bufImgUsage, requiredFlags, preferredFlags, notPreferredFlags)) { return VK_ERROR_FEATURE_NOT_PRESENT; } *pMemoryTypeIndex = UINT32_MAX; uint32_t minCost = UINT32_MAX; for(uint32_t memTypeIndex = 0, memTypeBit = 1; memTypeIndex < GetMemoryTypeCount(); ++memTypeIndex, memTypeBit <<= 1) { // This memory type is acceptable according to memoryTypeBits bitmask. if((memTypeBit & memoryTypeBits) != 0) { const VkMemoryPropertyFlags currFlags = m_MemProps.memoryTypes[memTypeIndex].propertyFlags; // This memory type contains requiredFlags. if((requiredFlags & ~currFlags) == 0) { // Calculate cost as number of bits from preferredFlags not present in this memory type. uint32_t currCost = VMA_COUNT_BITS_SET(preferredFlags & ~currFlags) + VMA_COUNT_BITS_SET(currFlags & notPreferredFlags); // Remember memory type with lowest cost. if(currCost < minCost) { *pMemoryTypeIndex = memTypeIndex; if(currCost == 0) { return VK_SUCCESS; } minCost = currCost; } } } } return (*pMemoryTypeIndex != UINT32_MAX) ? VK_SUCCESS : VK_ERROR_FEATURE_NOT_PRESENT; } VkResult VmaAllocator_T::CalcMemTypeParams( VmaAllocationCreateInfo& inoutCreateInfo, uint32_t memTypeIndex, VkDeviceSize size, size_t allocationCount) { // If memory type is not HOST_VISIBLE, disable MAPPED. if((inoutCreateInfo.flags & VMA_ALLOCATION_CREATE_MAPPED_BIT) != 0 && (m_MemProps.memoryTypes[memTypeIndex].propertyFlags & VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT) == 0) { inoutCreateInfo.flags &= ~VMA_ALLOCATION_CREATE_MAPPED_BIT; } if((inoutCreateInfo.flags & VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT) != 0 && (inoutCreateInfo.flags & VMA_ALLOCATION_CREATE_WITHIN_BUDGET_BIT) != 0) { const uint32_t heapIndex = MemoryTypeIndexToHeapIndex(memTypeIndex); VmaBudget heapBudget = {}; GetHeapBudgets(&heapBudget, heapIndex, 1); if(heapBudget.usage + size * allocationCount > heapBudget.budget) { return VK_ERROR_OUT_OF_DEVICE_MEMORY; } } return VK_SUCCESS; } VkResult VmaAllocator_T::CalcAllocationParams( VmaAllocationCreateInfo& inoutCreateInfo, bool dedicatedRequired, bool dedicatedPreferred) { VMA_ASSERT((inoutCreateInfo.flags & (VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT | VMA_ALLOCATION_CREATE_HOST_ACCESS_RANDOM_BIT)) != (VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT | VMA_ALLOCATION_CREATE_HOST_ACCESS_RANDOM_BIT) && "Specifying both flags VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT and VMA_ALLOCATION_CREATE_HOST_ACCESS_RANDOM_BIT is incorrect."); VMA_ASSERT((((inoutCreateInfo.flags & VMA_ALLOCATION_CREATE_HOST_ACCESS_ALLOW_TRANSFER_INSTEAD_BIT) == 0 || (inoutCreateInfo.flags & (VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT | VMA_ALLOCATION_CREATE_HOST_ACCESS_RANDOM_BIT)) != 0)) && "Specifying VMA_ALLOCATION_CREATE_HOST_ACCESS_ALLOW_TRANSFER_INSTEAD_BIT requires also VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT or VMA_ALLOCATION_CREATE_HOST_ACCESS_RANDOM_BIT."); if(inoutCreateInfo.usage == VMA_MEMORY_USAGE_AUTO || inoutCreateInfo.usage == VMA_MEMORY_USAGE_AUTO_PREFER_DEVICE || inoutCreateInfo.usage == VMA_MEMORY_USAGE_AUTO_PREFER_HOST) { if((inoutCreateInfo.flags & VMA_ALLOCATION_CREATE_MAPPED_BIT) != 0) { VMA_ASSERT((inoutCreateInfo.flags & (VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT | VMA_ALLOCATION_CREATE_HOST_ACCESS_RANDOM_BIT)) != 0 && "When using VMA_ALLOCATION_CREATE_MAPPED_BIT and usage = VMA_MEMORY_USAGE_AUTO*, you must also specify VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT or VMA_ALLOCATION_CREATE_HOST_ACCESS_RANDOM_BIT."); } } // If memory is lazily allocated, it should be always dedicated. if(dedicatedRequired || inoutCreateInfo.usage == VMA_MEMORY_USAGE_GPU_LAZILY_ALLOCATED) { inoutCreateInfo.flags |= VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT; } if(inoutCreateInfo.pool != VK_NULL_HANDLE) { if(inoutCreateInfo.pool->m_BlockVector.HasExplicitBlockSize() && (inoutCreateInfo.flags & VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT) != 0) { VMA_ASSERT(0 && "Specifying VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT while current custom pool doesn't support dedicated allocations."); return VK_ERROR_FEATURE_NOT_PRESENT; } inoutCreateInfo.priority = inoutCreateInfo.pool->m_BlockVector.GetPriority(); } if((inoutCreateInfo.flags & VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT) != 0 && (inoutCreateInfo.flags & VMA_ALLOCATION_CREATE_NEVER_ALLOCATE_BIT) != 0) { VMA_ASSERT(0 && "Specifying VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT together with VMA_ALLOCATION_CREATE_NEVER_ALLOCATE_BIT makes no sense."); return VK_ERROR_FEATURE_NOT_PRESENT; } if(VMA_DEBUG_ALWAYS_DEDICATED_MEMORY && (inoutCreateInfo.flags & VMA_ALLOCATION_CREATE_NEVER_ALLOCATE_BIT) != 0) { inoutCreateInfo.flags |= VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT; } // Non-auto USAGE values imply HOST_ACCESS flags. // And so does VMA_MEMORY_USAGE_UNKNOWN because it is used with custom pools. // Which specific flag is used doesn't matter. They change things only when used with VMA_MEMORY_USAGE_AUTO*. // Otherwise they just protect from assert on mapping. if(inoutCreateInfo.usage != VMA_MEMORY_USAGE_AUTO && inoutCreateInfo.usage != VMA_MEMORY_USAGE_AUTO_PREFER_DEVICE && inoutCreateInfo.usage != VMA_MEMORY_USAGE_AUTO_PREFER_HOST) { if((inoutCreateInfo.flags & (VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT | VMA_ALLOCATION_CREATE_HOST_ACCESS_RANDOM_BIT)) == 0) { inoutCreateInfo.flags |= VMA_ALLOCATION_CREATE_HOST_ACCESS_RANDOM_BIT; } } return VK_SUCCESS; } VkResult VmaAllocator_T::AllocateMemory( const VkMemoryRequirements& vkMemReq, bool requiresDedicatedAllocation, bool prefersDedicatedAllocation, VkBuffer dedicatedBuffer, VkImage dedicatedImage, VmaBufferImageUsage dedicatedBufferImageUsage, const VmaAllocationCreateInfo& createInfo, VmaSuballocationType suballocType, size_t allocationCount, VmaAllocation* pAllocations) { memset(pAllocations, 0, sizeof(VmaAllocation) * allocationCount); VMA_ASSERT(VmaIsPow2(vkMemReq.alignment)); if(vkMemReq.size == 0) { return VK_ERROR_INITIALIZATION_FAILED; } VmaAllocationCreateInfo createInfoFinal = createInfo; VkResult res = CalcAllocationParams(createInfoFinal, requiresDedicatedAllocation, prefersDedicatedAllocation); if(res != VK_SUCCESS) return res; if(createInfoFinal.pool != VK_NULL_HANDLE) { VmaBlockVector& blockVector = createInfoFinal.pool->m_BlockVector; return AllocateMemoryOfType( createInfoFinal.pool, vkMemReq.size, vkMemReq.alignment, prefersDedicatedAllocation, dedicatedBuffer, dedicatedImage, dedicatedBufferImageUsage, createInfoFinal, blockVector.GetMemoryTypeIndex(), suballocType, createInfoFinal.pool->m_DedicatedAllocations, blockVector, allocationCount, pAllocations); } else { // Bit mask of memory Vulkan types acceptable for this allocation. uint32_t memoryTypeBits = vkMemReq.memoryTypeBits; uint32_t memTypeIndex = UINT32_MAX; res = FindMemoryTypeIndex(memoryTypeBits, &createInfoFinal, dedicatedBufferImageUsage, &memTypeIndex); // Can't find any single memory type matching requirements. res is VK_ERROR_FEATURE_NOT_PRESENT. if(res != VK_SUCCESS) return res; do { VmaBlockVector* blockVector = m_pBlockVectors[memTypeIndex]; VMA_ASSERT(blockVector && "Trying to use unsupported memory type!"); res = AllocateMemoryOfType( VK_NULL_HANDLE, vkMemReq.size, vkMemReq.alignment, requiresDedicatedAllocation || prefersDedicatedAllocation, dedicatedBuffer, dedicatedImage, dedicatedBufferImageUsage, createInfoFinal, memTypeIndex, suballocType, m_DedicatedAllocations[memTypeIndex], *blockVector, allocationCount, pAllocations); // Allocation succeeded if(res == VK_SUCCESS) return VK_SUCCESS; // Remove old memTypeIndex from list of possibilities. memoryTypeBits &= ~(1u << memTypeIndex); // Find alternative memTypeIndex. res = FindMemoryTypeIndex(memoryTypeBits, &createInfoFinal, dedicatedBufferImageUsage, &memTypeIndex); } while(res == VK_SUCCESS); // No other matching memory type index could be found. // Not returning res, which is VK_ERROR_FEATURE_NOT_PRESENT, because we already failed to allocate once. return VK_ERROR_OUT_OF_DEVICE_MEMORY; } } void VmaAllocator_T::FreeMemory( size_t allocationCount, const VmaAllocation* pAllocations) { VMA_ASSERT(pAllocations); for(size_t allocIndex = allocationCount; allocIndex--; ) { VmaAllocation allocation = pAllocations[allocIndex]; if(allocation != VK_NULL_HANDLE) { if(VMA_DEBUG_INITIALIZE_ALLOCATIONS) { FillAllocation(allocation, VMA_ALLOCATION_FILL_PATTERN_DESTROYED); } switch(allocation->GetType()) { case VmaAllocation_T::ALLOCATION_TYPE_BLOCK: { VmaBlockVector* pBlockVector = VMA_NULL; VmaPool hPool = allocation->GetParentPool(); if(hPool != VK_NULL_HANDLE) { pBlockVector = &hPool->m_BlockVector; } else { const uint32_t memTypeIndex = allocation->GetMemoryTypeIndex(); pBlockVector = m_pBlockVectors[memTypeIndex]; VMA_ASSERT(pBlockVector && "Trying to free memory of unsupported type!"); } pBlockVector->Free(allocation); } break; case VmaAllocation_T::ALLOCATION_TYPE_DEDICATED: FreeDedicatedMemory(allocation); break; default: VMA_ASSERT(0); } } } } void VmaAllocator_T::CalculateStatistics(VmaTotalStatistics* pStats) { // Initialize. VmaClearDetailedStatistics(pStats->total); for(uint32_t i = 0; i < VK_MAX_MEMORY_TYPES; ++i) VmaClearDetailedStatistics(pStats->memoryType[i]); for(uint32_t i = 0; i < VK_MAX_MEMORY_HEAPS; ++i) VmaClearDetailedStatistics(pStats->memoryHeap[i]); // Process default pools. for(uint32_t memTypeIndex = 0; memTypeIndex < GetMemoryTypeCount(); ++memTypeIndex) { VmaBlockVector* const pBlockVector = m_pBlockVectors[memTypeIndex]; if (pBlockVector != VMA_NULL) pBlockVector->AddDetailedStatistics(pStats->memoryType[memTypeIndex]); } // Process custom pools. { VmaMutexLockRead lock(m_PoolsMutex, m_UseMutex); for(VmaPool pool = m_Pools.Front(); pool != VMA_NULL; pool = m_Pools.GetNext(pool)) { VmaBlockVector& blockVector = pool->m_BlockVector; const uint32_t memTypeIndex = blockVector.GetMemoryTypeIndex(); blockVector.AddDetailedStatistics(pStats->memoryType[memTypeIndex]); pool->m_DedicatedAllocations.AddDetailedStatistics(pStats->memoryType[memTypeIndex]); } } // Process dedicated allocations. for(uint32_t memTypeIndex = 0; memTypeIndex < GetMemoryTypeCount(); ++memTypeIndex) { m_DedicatedAllocations[memTypeIndex].AddDetailedStatistics(pStats->memoryType[memTypeIndex]); } // Sum from memory types to memory heaps. for(uint32_t memTypeIndex = 0; memTypeIndex < GetMemoryTypeCount(); ++memTypeIndex) { const uint32_t memHeapIndex = m_MemProps.memoryTypes[memTypeIndex].heapIndex; VmaAddDetailedStatistics(pStats->memoryHeap[memHeapIndex], pStats->memoryType[memTypeIndex]); } // Sum from memory heaps to total. for(uint32_t memHeapIndex = 0; memHeapIndex < GetMemoryHeapCount(); ++memHeapIndex) VmaAddDetailedStatistics(pStats->total, pStats->memoryHeap[memHeapIndex]); VMA_ASSERT(pStats->total.statistics.allocationCount == 0 || pStats->total.allocationSizeMax >= pStats->total.allocationSizeMin); VMA_ASSERT(pStats->total.unusedRangeCount == 0 || pStats->total.unusedRangeSizeMax >= pStats->total.unusedRangeSizeMin); } void VmaAllocator_T::GetHeapBudgets(VmaBudget* outBudgets, uint32_t firstHeap, uint32_t heapCount) { #if VMA_MEMORY_BUDGET if(m_UseExtMemoryBudget) { if(m_Budget.m_OperationsSinceBudgetFetch < 30) { VmaMutexLockRead lockRead(m_Budget.m_BudgetMutex, m_UseMutex); for(uint32_t i = 0; i < heapCount; ++i, ++outBudgets) { const uint32_t heapIndex = firstHeap + i; outBudgets->statistics.blockCount = m_Budget.m_BlockCount[heapIndex]; outBudgets->statistics.allocationCount = m_Budget.m_AllocationCount[heapIndex]; outBudgets->statistics.blockBytes = m_Budget.m_BlockBytes[heapIndex]; outBudgets->statistics.allocationBytes = m_Budget.m_AllocationBytes[heapIndex]; if(m_Budget.m_VulkanUsage[heapIndex] + outBudgets->statistics.blockBytes > m_Budget.m_BlockBytesAtBudgetFetch[heapIndex]) { outBudgets->usage = m_Budget.m_VulkanUsage[heapIndex] + outBudgets->statistics.blockBytes - m_Budget.m_BlockBytesAtBudgetFetch[heapIndex]; } else { outBudgets->usage = 0; } // Have to take MIN with heap size because explicit HeapSizeLimit is included in it. outBudgets->budget = VMA_MIN( m_Budget.m_VulkanBudget[heapIndex], m_MemProps.memoryHeaps[heapIndex].size); } } else { UpdateVulkanBudget(); // Outside of mutex lock GetHeapBudgets(outBudgets, firstHeap, heapCount); // Recursion } } else #endif { for(uint32_t i = 0; i < heapCount; ++i, ++outBudgets) { const uint32_t heapIndex = firstHeap + i; outBudgets->statistics.blockCount = m_Budget.m_BlockCount[heapIndex]; outBudgets->statistics.allocationCount = m_Budget.m_AllocationCount[heapIndex]; outBudgets->statistics.blockBytes = m_Budget.m_BlockBytes[heapIndex]; outBudgets->statistics.allocationBytes = m_Budget.m_AllocationBytes[heapIndex]; outBudgets->usage = outBudgets->statistics.blockBytes; outBudgets->budget = m_MemProps.memoryHeaps[heapIndex].size * 8 / 10; // 80% heuristics. } } } void VmaAllocator_T::GetAllocationInfo(VmaAllocation hAllocation, VmaAllocationInfo* pAllocationInfo) { pAllocationInfo->memoryType = hAllocation->GetMemoryTypeIndex(); pAllocationInfo->deviceMemory = hAllocation->GetMemory(); pAllocationInfo->offset = hAllocation->GetOffset(); pAllocationInfo->size = hAllocation->GetSize(); pAllocationInfo->pMappedData = hAllocation->GetMappedData(); pAllocationInfo->pUserData = hAllocation->GetUserData(); pAllocationInfo->pName = hAllocation->GetName(); } void VmaAllocator_T::GetAllocationInfo2(VmaAllocation hAllocation, VmaAllocationInfo2* pAllocationInfo) { GetAllocationInfo(hAllocation, &pAllocationInfo->allocationInfo); switch (hAllocation->GetType()) { case VmaAllocation_T::ALLOCATION_TYPE_BLOCK: pAllocationInfo->blockSize = hAllocation->GetBlock()->m_pMetadata->GetSize(); pAllocationInfo->dedicatedMemory = VK_FALSE; break; case VmaAllocation_T::ALLOCATION_TYPE_DEDICATED: pAllocationInfo->blockSize = pAllocationInfo->allocationInfo.size; pAllocationInfo->dedicatedMemory = VK_TRUE; break; default: VMA_ASSERT(0); } } VkResult VmaAllocator_T::CreatePool(const VmaPoolCreateInfo* pCreateInfo, VmaPool* pPool) { VMA_DEBUG_LOG_FORMAT(" CreatePool: MemoryTypeIndex=%" PRIu32 ", flags=%" PRIu32, pCreateInfo->memoryTypeIndex, pCreateInfo->flags); VmaPoolCreateInfo newCreateInfo = *pCreateInfo; // Protection against uninitialized new structure member. If garbage data are left there, this pointer dereference would crash. if(pCreateInfo->pMemoryAllocateNext) { VMA_ASSERT(((const VkBaseInStructure*)pCreateInfo->pMemoryAllocateNext)->sType != 0); } if(newCreateInfo.maxBlockCount == 0) { newCreateInfo.maxBlockCount = SIZE_MAX; } if(newCreateInfo.minBlockCount > newCreateInfo.maxBlockCount) { return VK_ERROR_INITIALIZATION_FAILED; } // Memory type index out of range or forbidden. if(pCreateInfo->memoryTypeIndex >= GetMemoryTypeCount() || ((1u << pCreateInfo->memoryTypeIndex) & m_GlobalMemoryTypeBits) == 0) { return VK_ERROR_FEATURE_NOT_PRESENT; } if(newCreateInfo.minAllocationAlignment > 0) { VMA_ASSERT(VmaIsPow2(newCreateInfo.minAllocationAlignment)); } const VkDeviceSize preferredBlockSize = CalcPreferredBlockSize(newCreateInfo.memoryTypeIndex); *pPool = vma_new(this, VmaPool_T)(this, newCreateInfo, preferredBlockSize); VkResult res = (*pPool)->m_BlockVector.CreateMinBlocks(); if(res != VK_SUCCESS) { vma_delete(this, *pPool); *pPool = VMA_NULL; return res; } // Add to m_Pools. { VmaMutexLockWrite lock(m_PoolsMutex, m_UseMutex); (*pPool)->SetId(m_NextPoolId++); m_Pools.PushBack(*pPool); } return VK_SUCCESS; } void VmaAllocator_T::DestroyPool(VmaPool pool) { // Remove from m_Pools. { VmaMutexLockWrite lock(m_PoolsMutex, m_UseMutex); m_Pools.Remove(pool); } vma_delete(this, pool); } void VmaAllocator_T::GetPoolStatistics(VmaPool pool, VmaStatistics* pPoolStats) { VmaClearStatistics(*pPoolStats); pool->m_BlockVector.AddStatistics(*pPoolStats); pool->m_DedicatedAllocations.AddStatistics(*pPoolStats); } void VmaAllocator_T::CalculatePoolStatistics(VmaPool pool, VmaDetailedStatistics* pPoolStats) { VmaClearDetailedStatistics(*pPoolStats); pool->m_BlockVector.AddDetailedStatistics(*pPoolStats); pool->m_DedicatedAllocations.AddDetailedStatistics(*pPoolStats); } void VmaAllocator_T::SetCurrentFrameIndex(uint32_t frameIndex) { m_CurrentFrameIndex.store(frameIndex); #if VMA_MEMORY_BUDGET if(m_UseExtMemoryBudget) { UpdateVulkanBudget(); } #endif // #if VMA_MEMORY_BUDGET } VkResult VmaAllocator_T::CheckPoolCorruption(VmaPool hPool) { return hPool->m_BlockVector.CheckCorruption(); } VkResult VmaAllocator_T::CheckCorruption(uint32_t memoryTypeBits) { VkResult finalRes = VK_ERROR_FEATURE_NOT_PRESENT; // Process default pools. for(uint32_t memTypeIndex = 0; memTypeIndex < GetMemoryTypeCount(); ++memTypeIndex) { VmaBlockVector* const pBlockVector = m_pBlockVectors[memTypeIndex]; if(pBlockVector != VMA_NULL) { VkResult localRes = pBlockVector->CheckCorruption(); switch(localRes) { case VK_ERROR_FEATURE_NOT_PRESENT: break; case VK_SUCCESS: finalRes = VK_SUCCESS; break; default: return localRes; } } } // Process custom pools. { VmaMutexLockRead lock(m_PoolsMutex, m_UseMutex); for(VmaPool pool = m_Pools.Front(); pool != VMA_NULL; pool = m_Pools.GetNext(pool)) { if(((1u << pool->m_BlockVector.GetMemoryTypeIndex()) & memoryTypeBits) != 0) { VkResult localRes = pool->m_BlockVector.CheckCorruption(); switch(localRes) { case VK_ERROR_FEATURE_NOT_PRESENT: break; case VK_SUCCESS: finalRes = VK_SUCCESS; break; default: return localRes; } } } } return finalRes; } VkResult VmaAllocator_T::AllocateVulkanMemory(const VkMemoryAllocateInfo* pAllocateInfo, VkDeviceMemory* pMemory) { AtomicTransactionalIncrement deviceMemoryCountIncrement; const uint64_t prevDeviceMemoryCount = deviceMemoryCountIncrement.Increment(&m_DeviceMemoryCount); #if VMA_DEBUG_DONT_EXCEED_MAX_MEMORY_ALLOCATION_COUNT if(prevDeviceMemoryCount >= m_PhysicalDeviceProperties.limits.maxMemoryAllocationCount) { return VK_ERROR_TOO_MANY_OBJECTS; } #endif const uint32_t heapIndex = MemoryTypeIndexToHeapIndex(pAllocateInfo->memoryTypeIndex); // HeapSizeLimit is in effect for this heap. if((m_HeapSizeLimitMask & (1u << heapIndex)) != 0) { const VkDeviceSize heapSize = m_MemProps.memoryHeaps[heapIndex].size; VkDeviceSize blockBytes = m_Budget.m_BlockBytes[heapIndex]; for(;;) { const VkDeviceSize blockBytesAfterAllocation = blockBytes + pAllocateInfo->allocationSize; if(blockBytesAfterAllocation > heapSize) { return VK_ERROR_OUT_OF_DEVICE_MEMORY; } if(m_Budget.m_BlockBytes[heapIndex].compare_exchange_strong(blockBytes, blockBytesAfterAllocation)) { break; } } } else { m_Budget.m_BlockBytes[heapIndex] += pAllocateInfo->allocationSize; } ++m_Budget.m_BlockCount[heapIndex]; // VULKAN CALL vkAllocateMemory. VkResult res = (*m_VulkanFunctions.vkAllocateMemory)(m_hDevice, pAllocateInfo, GetAllocationCallbacks(), pMemory); if(res == VK_SUCCESS) { #if VMA_MEMORY_BUDGET ++m_Budget.m_OperationsSinceBudgetFetch; #endif // Informative callback. if(m_DeviceMemoryCallbacks.pfnAllocate != VMA_NULL) { (*m_DeviceMemoryCallbacks.pfnAllocate)(this, pAllocateInfo->memoryTypeIndex, *pMemory, pAllocateInfo->allocationSize, m_DeviceMemoryCallbacks.pUserData); } deviceMemoryCountIncrement.Commit(); } else { --m_Budget.m_BlockCount[heapIndex]; m_Budget.m_BlockBytes[heapIndex] -= pAllocateInfo->allocationSize; } return res; } void VmaAllocator_T::FreeVulkanMemory(uint32_t memoryType, VkDeviceSize size, VkDeviceMemory hMemory) { // Informative callback. if(m_DeviceMemoryCallbacks.pfnFree != VMA_NULL) { (*m_DeviceMemoryCallbacks.pfnFree)(this, memoryType, hMemory, size, m_DeviceMemoryCallbacks.pUserData); } // VULKAN CALL vkFreeMemory. (*m_VulkanFunctions.vkFreeMemory)(m_hDevice, hMemory, GetAllocationCallbacks()); const uint32_t heapIndex = MemoryTypeIndexToHeapIndex(memoryType); --m_Budget.m_BlockCount[heapIndex]; m_Budget.m_BlockBytes[heapIndex] -= size; --m_DeviceMemoryCount; } VkResult VmaAllocator_T::BindVulkanBuffer( VkDeviceMemory memory, VkDeviceSize memoryOffset, VkBuffer buffer, const void* pNext) { if(pNext != VMA_NULL) { #if VMA_VULKAN_VERSION >= 1001000 || VMA_BIND_MEMORY2 if((m_UseKhrBindMemory2 || m_VulkanApiVersion >= VK_MAKE_VERSION(1, 1, 0)) && m_VulkanFunctions.vkBindBufferMemory2KHR != VMA_NULL) { VkBindBufferMemoryInfoKHR bindBufferMemoryInfo = { VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO_KHR }; bindBufferMemoryInfo.pNext = pNext; bindBufferMemoryInfo.buffer = buffer; bindBufferMemoryInfo.memory = memory; bindBufferMemoryInfo.memoryOffset = memoryOffset; return (*m_VulkanFunctions.vkBindBufferMemory2KHR)(m_hDevice, 1, &bindBufferMemoryInfo); } else #endif // #if VMA_VULKAN_VERSION >= 1001000 || VMA_BIND_MEMORY2 { return VK_ERROR_EXTENSION_NOT_PRESENT; } } else { return (*m_VulkanFunctions.vkBindBufferMemory)(m_hDevice, buffer, memory, memoryOffset); } } VkResult VmaAllocator_T::BindVulkanImage( VkDeviceMemory memory, VkDeviceSize memoryOffset, VkImage image, const void* pNext) { if(pNext != VMA_NULL) { #if VMA_VULKAN_VERSION >= 1001000 || VMA_BIND_MEMORY2 if((m_UseKhrBindMemory2 || m_VulkanApiVersion >= VK_MAKE_VERSION(1, 1, 0)) && m_VulkanFunctions.vkBindImageMemory2KHR != VMA_NULL) { VkBindImageMemoryInfoKHR bindBufferMemoryInfo = { VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO_KHR }; bindBufferMemoryInfo.pNext = pNext; bindBufferMemoryInfo.image = image; bindBufferMemoryInfo.memory = memory; bindBufferMemoryInfo.memoryOffset = memoryOffset; return (*m_VulkanFunctions.vkBindImageMemory2KHR)(m_hDevice, 1, &bindBufferMemoryInfo); } else #endif // #if VMA_BIND_MEMORY2 { return VK_ERROR_EXTENSION_NOT_PRESENT; } } else { return (*m_VulkanFunctions.vkBindImageMemory)(m_hDevice, image, memory, memoryOffset); } } VkResult VmaAllocator_T::Map(VmaAllocation hAllocation, void** ppData) { switch(hAllocation->GetType()) { case VmaAllocation_T::ALLOCATION_TYPE_BLOCK: { VmaDeviceMemoryBlock* const pBlock = hAllocation->GetBlock(); char *pBytes = VMA_NULL; VkResult res = pBlock->Map(this, 1, (void**)&pBytes); if(res == VK_SUCCESS) { *ppData = pBytes + (ptrdiff_t)hAllocation->GetOffset(); hAllocation->BlockAllocMap(); } return res; } case VmaAllocation_T::ALLOCATION_TYPE_DEDICATED: return hAllocation->DedicatedAllocMap(this, ppData); default: VMA_ASSERT(0); return VK_ERROR_MEMORY_MAP_FAILED; } } void VmaAllocator_T::Unmap(VmaAllocation hAllocation) { switch(hAllocation->GetType()) { case VmaAllocation_T::ALLOCATION_TYPE_BLOCK: { VmaDeviceMemoryBlock* const pBlock = hAllocation->GetBlock(); hAllocation->BlockAllocUnmap(); pBlock->Unmap(this, 1); } break; case VmaAllocation_T::ALLOCATION_TYPE_DEDICATED: hAllocation->DedicatedAllocUnmap(this); break; default: VMA_ASSERT(0); } } VkResult VmaAllocator_T::BindBufferMemory( VmaAllocation hAllocation, VkDeviceSize allocationLocalOffset, VkBuffer hBuffer, const void* pNext) { VkResult res = VK_ERROR_UNKNOWN_COPY; switch(hAllocation->GetType()) { case VmaAllocation_T::ALLOCATION_TYPE_DEDICATED: res = BindVulkanBuffer(hAllocation->GetMemory(), allocationLocalOffset, hBuffer, pNext); break; case VmaAllocation_T::ALLOCATION_TYPE_BLOCK: { VmaDeviceMemoryBlock* const pBlock = hAllocation->GetBlock(); VMA_ASSERT(pBlock && "Binding buffer to allocation that doesn't belong to any block."); res = pBlock->BindBufferMemory(this, hAllocation, allocationLocalOffset, hBuffer, pNext); break; } default: VMA_ASSERT(0); } return res; } VkResult VmaAllocator_T::BindImageMemory( VmaAllocation hAllocation, VkDeviceSize allocationLocalOffset, VkImage hImage, const void* pNext) { VkResult res = VK_ERROR_UNKNOWN_COPY; switch(hAllocation->GetType()) { case VmaAllocation_T::ALLOCATION_TYPE_DEDICATED: res = BindVulkanImage(hAllocation->GetMemory(), allocationLocalOffset, hImage, pNext); break; case VmaAllocation_T::ALLOCATION_TYPE_BLOCK: { VmaDeviceMemoryBlock* pBlock = hAllocation->GetBlock(); VMA_ASSERT(pBlock && "Binding image to allocation that doesn't belong to any block."); res = pBlock->BindImageMemory(this, hAllocation, allocationLocalOffset, hImage, pNext); break; } default: VMA_ASSERT(0); } return res; } VkResult VmaAllocator_T::FlushOrInvalidateAllocation( VmaAllocation hAllocation, VkDeviceSize offset, VkDeviceSize size, VMA_CACHE_OPERATION op) { VkResult res = VK_SUCCESS; VkMappedMemoryRange memRange = {}; if(GetFlushOrInvalidateRange(hAllocation, offset, size, memRange)) { switch(op) { case VMA_CACHE_FLUSH: res = (*GetVulkanFunctions().vkFlushMappedMemoryRanges)(m_hDevice, 1, &memRange); break; case VMA_CACHE_INVALIDATE: res = (*GetVulkanFunctions().vkInvalidateMappedMemoryRanges)(m_hDevice, 1, &memRange); break; default: VMA_ASSERT(0); } } // else: Just ignore this call. return res; } VkResult VmaAllocator_T::FlushOrInvalidateAllocations( uint32_t allocationCount, const VmaAllocation* allocations, const VkDeviceSize* offsets, const VkDeviceSize* sizes, VMA_CACHE_OPERATION op) { typedef VmaStlAllocator RangeAllocator; typedef VmaSmallVector RangeVector; RangeVector ranges = RangeVector(RangeAllocator(GetAllocationCallbacks())); for(uint32_t allocIndex = 0; allocIndex < allocationCount; ++allocIndex) { const VmaAllocation alloc = allocations[allocIndex]; const VkDeviceSize offset = offsets != VMA_NULL ? offsets[allocIndex] : 0; const VkDeviceSize size = sizes != VMA_NULL ? sizes[allocIndex] : VK_WHOLE_SIZE; VkMappedMemoryRange newRange; if(GetFlushOrInvalidateRange(alloc, offset, size, newRange)) { ranges.push_back(newRange); } } VkResult res = VK_SUCCESS; if(!ranges.empty()) { switch(op) { case VMA_CACHE_FLUSH: res = (*GetVulkanFunctions().vkFlushMappedMemoryRanges)(m_hDevice, (uint32_t)ranges.size(), ranges.data()); break; case VMA_CACHE_INVALIDATE: res = (*GetVulkanFunctions().vkInvalidateMappedMemoryRanges)(m_hDevice, (uint32_t)ranges.size(), ranges.data()); break; default: VMA_ASSERT(0); } } // else: Just ignore this call. return res; } VkResult VmaAllocator_T::CopyMemoryToAllocation( const void* pSrcHostPointer, VmaAllocation dstAllocation, VkDeviceSize dstAllocationLocalOffset, VkDeviceSize size) { void* dstMappedData = VMA_NULL; VkResult res = Map(dstAllocation, &dstMappedData); if(res == VK_SUCCESS) { memcpy((char*)dstMappedData + dstAllocationLocalOffset, pSrcHostPointer, (size_t)size); Unmap(dstAllocation); res = FlushOrInvalidateAllocation(dstAllocation, dstAllocationLocalOffset, size, VMA_CACHE_FLUSH); } return res; } VkResult VmaAllocator_T::CopyAllocationToMemory( VmaAllocation srcAllocation, VkDeviceSize srcAllocationLocalOffset, void* pDstHostPointer, VkDeviceSize size) { void* srcMappedData = VMA_NULL; VkResult res = Map(srcAllocation, &srcMappedData); if(res == VK_SUCCESS) { res = FlushOrInvalidateAllocation(srcAllocation, srcAllocationLocalOffset, size, VMA_CACHE_INVALIDATE); if(res == VK_SUCCESS) { memcpy(pDstHostPointer, (const char*)srcMappedData + srcAllocationLocalOffset, (size_t)size); Unmap(srcAllocation); } } return res; } void VmaAllocator_T::FreeDedicatedMemory(const VmaAllocation allocation) { VMA_ASSERT(allocation && allocation->GetType() == VmaAllocation_T::ALLOCATION_TYPE_DEDICATED); const uint32_t memTypeIndex = allocation->GetMemoryTypeIndex(); VmaPool parentPool = allocation->GetParentPool(); if(parentPool == VK_NULL_HANDLE) { // Default pool m_DedicatedAllocations[memTypeIndex].Unregister(allocation); } else { // Custom pool parentPool->m_DedicatedAllocations.Unregister(allocation); } VkDeviceMemory hMemory = allocation->GetMemory(); /* There is no need to call this, because Vulkan spec allows to skip vkUnmapMemory before vkFreeMemory. if(allocation->GetMappedData() != VMA_NULL) { (*m_VulkanFunctions.vkUnmapMemory)(m_hDevice, hMemory); } */ FreeVulkanMemory(memTypeIndex, allocation->GetSize(), hMemory); m_Budget.RemoveAllocation(MemoryTypeIndexToHeapIndex(allocation->GetMemoryTypeIndex()), allocation->GetSize()); allocation->Destroy(this); m_AllocationObjectAllocator.Free(allocation); VMA_DEBUG_LOG_FORMAT(" Freed DedicatedMemory MemoryTypeIndex=%" PRIu32, memTypeIndex); } uint32_t VmaAllocator_T::CalculateGpuDefragmentationMemoryTypeBits() const { VkBufferCreateInfo dummyBufCreateInfo; VmaFillGpuDefragmentationBufferCreateInfo(dummyBufCreateInfo); uint32_t memoryTypeBits = 0; // Create buffer. VkBuffer buf = VK_NULL_HANDLE; VkResult res = (*GetVulkanFunctions().vkCreateBuffer)( m_hDevice, &dummyBufCreateInfo, GetAllocationCallbacks(), &buf); if(res == VK_SUCCESS) { // Query for supported memory types. VkMemoryRequirements memReq; (*GetVulkanFunctions().vkGetBufferMemoryRequirements)(m_hDevice, buf, &memReq); memoryTypeBits = memReq.memoryTypeBits; // Destroy buffer. (*GetVulkanFunctions().vkDestroyBuffer)(m_hDevice, buf, GetAllocationCallbacks()); } return memoryTypeBits; } uint32_t VmaAllocator_T::CalculateGlobalMemoryTypeBits() const { // Make sure memory information is already fetched. VMA_ASSERT(GetMemoryTypeCount() > 0); uint32_t memoryTypeBits = UINT32_MAX; if(!m_UseAmdDeviceCoherentMemory) { // Exclude memory types that have VK_MEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMD. for(uint32_t memTypeIndex = 0; memTypeIndex < GetMemoryTypeCount(); ++memTypeIndex) { if((m_MemProps.memoryTypes[memTypeIndex].propertyFlags & VK_MEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMD_COPY) != 0) { memoryTypeBits &= ~(1u << memTypeIndex); } } } return memoryTypeBits; } bool VmaAllocator_T::GetFlushOrInvalidateRange( VmaAllocation allocation, VkDeviceSize offset, VkDeviceSize size, VkMappedMemoryRange& outRange) const { const uint32_t memTypeIndex = allocation->GetMemoryTypeIndex(); if(size > 0 && IsMemoryTypeNonCoherent(memTypeIndex)) { const VkDeviceSize nonCoherentAtomSize = m_PhysicalDeviceProperties.limits.nonCoherentAtomSize; const VkDeviceSize allocationSize = allocation->GetSize(); VMA_ASSERT(offset <= allocationSize); outRange.sType = VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE; outRange.pNext = VMA_NULL; outRange.memory = allocation->GetMemory(); switch(allocation->GetType()) { case VmaAllocation_T::ALLOCATION_TYPE_DEDICATED: outRange.offset = VmaAlignDown(offset, nonCoherentAtomSize); if(size == VK_WHOLE_SIZE) { outRange.size = allocationSize - outRange.offset; } else { VMA_ASSERT(offset + size <= allocationSize); outRange.size = VMA_MIN( VmaAlignUp(size + (offset - outRange.offset), nonCoherentAtomSize), allocationSize - outRange.offset); } break; case VmaAllocation_T::ALLOCATION_TYPE_BLOCK: { // 1. Still within this allocation. outRange.offset = VmaAlignDown(offset, nonCoherentAtomSize); if(size == VK_WHOLE_SIZE) { size = allocationSize - offset; } else { VMA_ASSERT(offset + size <= allocationSize); } outRange.size = VmaAlignUp(size + (offset - outRange.offset), nonCoherentAtomSize); // 2. Adjust to whole block. const VkDeviceSize allocationOffset = allocation->GetOffset(); VMA_ASSERT(allocationOffset % nonCoherentAtomSize == 0); const VkDeviceSize blockSize = allocation->GetBlock()->m_pMetadata->GetSize(); outRange.offset += allocationOffset; outRange.size = VMA_MIN(outRange.size, blockSize - outRange.offset); break; } default: VMA_ASSERT(0); } return true; } return false; } #if VMA_MEMORY_BUDGET void VmaAllocator_T::UpdateVulkanBudget() { VMA_ASSERT(m_UseExtMemoryBudget); VkPhysicalDeviceMemoryProperties2KHR memProps = { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2_KHR }; VkPhysicalDeviceMemoryBudgetPropertiesEXT budgetProps = { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_BUDGET_PROPERTIES_EXT }; VmaPnextChainPushFront(&memProps, &budgetProps); GetVulkanFunctions().vkGetPhysicalDeviceMemoryProperties2KHR(m_PhysicalDevice, &memProps); { VmaMutexLockWrite lockWrite(m_Budget.m_BudgetMutex, m_UseMutex); for(uint32_t heapIndex = 0; heapIndex < GetMemoryHeapCount(); ++heapIndex) { m_Budget.m_VulkanUsage[heapIndex] = budgetProps.heapUsage[heapIndex]; m_Budget.m_VulkanBudget[heapIndex] = budgetProps.heapBudget[heapIndex]; m_Budget.m_BlockBytesAtBudgetFetch[heapIndex] = m_Budget.m_BlockBytes[heapIndex].load(); // Some bugged drivers return the budget incorrectly, e.g. 0 or much bigger than heap size. if(m_Budget.m_VulkanBudget[heapIndex] == 0) { m_Budget.m_VulkanBudget[heapIndex] = m_MemProps.memoryHeaps[heapIndex].size * 8 / 10; // 80% heuristics. } else if(m_Budget.m_VulkanBudget[heapIndex] > m_MemProps.memoryHeaps[heapIndex].size) { m_Budget.m_VulkanBudget[heapIndex] = m_MemProps.memoryHeaps[heapIndex].size; } if(m_Budget.m_VulkanUsage[heapIndex] == 0 && m_Budget.m_BlockBytesAtBudgetFetch[heapIndex] > 0) { m_Budget.m_VulkanUsage[heapIndex] = m_Budget.m_BlockBytesAtBudgetFetch[heapIndex]; } } m_Budget.m_OperationsSinceBudgetFetch = 0; } } #endif // VMA_MEMORY_BUDGET void VmaAllocator_T::FillAllocation(const VmaAllocation hAllocation, uint8_t pattern) { if(VMA_DEBUG_INITIALIZE_ALLOCATIONS && hAllocation->IsMappingAllowed() && (m_MemProps.memoryTypes[hAllocation->GetMemoryTypeIndex()].propertyFlags & VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT) != 0) { void* pData = VMA_NULL; VkResult res = Map(hAllocation, &pData); if(res == VK_SUCCESS) { memset(pData, (int)pattern, (size_t)hAllocation->GetSize()); FlushOrInvalidateAllocation(hAllocation, 0, VK_WHOLE_SIZE, VMA_CACHE_FLUSH); Unmap(hAllocation); } else { VMA_ASSERT(0 && "VMA_DEBUG_INITIALIZE_ALLOCATIONS is enabled, but couldn't map memory to fill allocation."); } } } uint32_t VmaAllocator_T::GetGpuDefragmentationMemoryTypeBits() { uint32_t memoryTypeBits = m_GpuDefragmentationMemoryTypeBits.load(); if(memoryTypeBits == UINT32_MAX) { memoryTypeBits = CalculateGpuDefragmentationMemoryTypeBits(); m_GpuDefragmentationMemoryTypeBits.store(memoryTypeBits); } return memoryTypeBits; } #if VMA_STATS_STRING_ENABLED void VmaAllocator_T::PrintDetailedMap(VmaJsonWriter& json) { json.WriteString("DefaultPools"); json.BeginObject(); { for (uint32_t memTypeIndex = 0; memTypeIndex < GetMemoryTypeCount(); ++memTypeIndex) { VmaBlockVector* pBlockVector = m_pBlockVectors[memTypeIndex]; VmaDedicatedAllocationList& dedicatedAllocList = m_DedicatedAllocations[memTypeIndex]; if (pBlockVector != VMA_NULL) { json.BeginString("Type "); json.ContinueString(memTypeIndex); json.EndString(); json.BeginObject(); { json.WriteString("PreferredBlockSize"); json.WriteNumber(pBlockVector->GetPreferredBlockSize()); json.WriteString("Blocks"); pBlockVector->PrintDetailedMap(json); json.WriteString("DedicatedAllocations"); dedicatedAllocList.BuildStatsString(json); } json.EndObject(); } } } json.EndObject(); json.WriteString("CustomPools"); json.BeginObject(); { VmaMutexLockRead lock(m_PoolsMutex, m_UseMutex); if (!m_Pools.IsEmpty()) { for (uint32_t memTypeIndex = 0; memTypeIndex < GetMemoryTypeCount(); ++memTypeIndex) { bool displayType = true; size_t index = 0; for (VmaPool pool = m_Pools.Front(); pool != VMA_NULL; pool = m_Pools.GetNext(pool)) { VmaBlockVector& blockVector = pool->m_BlockVector; if (blockVector.GetMemoryTypeIndex() == memTypeIndex) { if (displayType) { json.BeginString("Type "); json.ContinueString(memTypeIndex); json.EndString(); json.BeginArray(); displayType = false; } json.BeginObject(); { json.WriteString("Name"); json.BeginString(); json.ContinueString((uint64_t)index++); if (pool->GetName()) { json.ContinueString(" - "); json.ContinueString(pool->GetName()); } json.EndString(); json.WriteString("PreferredBlockSize"); json.WriteNumber(blockVector.GetPreferredBlockSize()); json.WriteString("Blocks"); blockVector.PrintDetailedMap(json); json.WriteString("DedicatedAllocations"); pool->m_DedicatedAllocations.BuildStatsString(json); } json.EndObject(); } } if (!displayType) json.EndArray(); } } } json.EndObject(); } #endif // VMA_STATS_STRING_ENABLED #endif // _VMA_ALLOCATOR_T_FUNCTIONS #ifndef _VMA_PUBLIC_INTERFACE VMA_CALL_PRE VkResult VMA_CALL_POST vmaCreateAllocator( const VmaAllocatorCreateInfo* pCreateInfo, VmaAllocator* pAllocator) { VMA_ASSERT(pCreateInfo && pAllocator); VMA_ASSERT(pCreateInfo->vulkanApiVersion == 0 || (VK_VERSION_MAJOR(pCreateInfo->vulkanApiVersion) == 1 && VK_VERSION_MINOR(pCreateInfo->vulkanApiVersion) <= 4)); VMA_DEBUG_LOG("vmaCreateAllocator"); *pAllocator = vma_new(pCreateInfo->pAllocationCallbacks, VmaAllocator_T)(pCreateInfo); VkResult result = (*pAllocator)->Init(pCreateInfo); if(result < 0) { vma_delete(pCreateInfo->pAllocationCallbacks, *pAllocator); *pAllocator = VK_NULL_HANDLE; } return result; } VMA_CALL_PRE void VMA_CALL_POST vmaDestroyAllocator( VmaAllocator allocator) { if(allocator != VK_NULL_HANDLE) { VMA_DEBUG_LOG("vmaDestroyAllocator"); VkAllocationCallbacks allocationCallbacks = allocator->m_AllocationCallbacks; // Have to copy the callbacks when destroying. vma_delete(&allocationCallbacks, allocator); } } VMA_CALL_PRE void VMA_CALL_POST vmaGetAllocatorInfo(VmaAllocator allocator, VmaAllocatorInfo* pAllocatorInfo) { VMA_ASSERT(allocator && pAllocatorInfo); pAllocatorInfo->instance = allocator->m_hInstance; pAllocatorInfo->physicalDevice = allocator->GetPhysicalDevice(); pAllocatorInfo->device = allocator->m_hDevice; } VMA_CALL_PRE void VMA_CALL_POST vmaGetPhysicalDeviceProperties( VmaAllocator allocator, const VkPhysicalDeviceProperties **ppPhysicalDeviceProperties) { VMA_ASSERT(allocator && ppPhysicalDeviceProperties); *ppPhysicalDeviceProperties = &allocator->m_PhysicalDeviceProperties; } VMA_CALL_PRE void VMA_CALL_POST vmaGetMemoryProperties( VmaAllocator allocator, const VkPhysicalDeviceMemoryProperties** ppPhysicalDeviceMemoryProperties) { VMA_ASSERT(allocator && ppPhysicalDeviceMemoryProperties); *ppPhysicalDeviceMemoryProperties = &allocator->m_MemProps; } VMA_CALL_PRE void VMA_CALL_POST vmaGetMemoryTypeProperties( VmaAllocator allocator, uint32_t memoryTypeIndex, VkMemoryPropertyFlags* pFlags) { VMA_ASSERT(allocator && pFlags); VMA_ASSERT(memoryTypeIndex < allocator->GetMemoryTypeCount()); *pFlags = allocator->m_MemProps.memoryTypes[memoryTypeIndex].propertyFlags; } VMA_CALL_PRE void VMA_CALL_POST vmaSetCurrentFrameIndex( VmaAllocator allocator, uint32_t frameIndex) { VMA_ASSERT(allocator); VMA_DEBUG_GLOBAL_MUTEX_LOCK allocator->SetCurrentFrameIndex(frameIndex); } VMA_CALL_PRE void VMA_CALL_POST vmaCalculateStatistics( VmaAllocator allocator, VmaTotalStatistics* pStats) { VMA_ASSERT(allocator && pStats); VMA_DEBUG_GLOBAL_MUTEX_LOCK allocator->CalculateStatistics(pStats); } VMA_CALL_PRE void VMA_CALL_POST vmaGetHeapBudgets( VmaAllocator allocator, VmaBudget* pBudgets) { VMA_ASSERT(allocator && pBudgets); VMA_DEBUG_GLOBAL_MUTEX_LOCK allocator->GetHeapBudgets(pBudgets, 0, allocator->GetMemoryHeapCount()); } #if VMA_STATS_STRING_ENABLED VMA_CALL_PRE void VMA_CALL_POST vmaBuildStatsString( VmaAllocator allocator, char** ppStatsString, VkBool32 detailedMap) { VMA_ASSERT(allocator && ppStatsString); VMA_DEBUG_GLOBAL_MUTEX_LOCK VmaStringBuilder sb(allocator->GetAllocationCallbacks()); { VmaBudget budgets[VK_MAX_MEMORY_HEAPS]; allocator->GetHeapBudgets(budgets, 0, allocator->GetMemoryHeapCount()); VmaTotalStatistics stats; allocator->CalculateStatistics(&stats); VmaJsonWriter json(allocator->GetAllocationCallbacks(), sb); json.BeginObject(); { json.WriteString("General"); json.BeginObject(); { const VkPhysicalDeviceProperties& deviceProperties = allocator->m_PhysicalDeviceProperties; const VkPhysicalDeviceMemoryProperties& memoryProperties = allocator->m_MemProps; json.WriteString("API"); json.WriteString("Vulkan"); json.WriteString("apiVersion"); json.BeginString(); json.ContinueString(VK_VERSION_MAJOR(deviceProperties.apiVersion)); json.ContinueString("."); json.ContinueString(VK_VERSION_MINOR(deviceProperties.apiVersion)); json.ContinueString("."); json.ContinueString(VK_VERSION_PATCH(deviceProperties.apiVersion)); json.EndString(); json.WriteString("GPU"); json.WriteString(deviceProperties.deviceName); json.WriteString("deviceType"); json.WriteNumber(static_cast(deviceProperties.deviceType)); json.WriteString("maxMemoryAllocationCount"); json.WriteNumber(deviceProperties.limits.maxMemoryAllocationCount); json.WriteString("bufferImageGranularity"); json.WriteNumber(deviceProperties.limits.bufferImageGranularity); json.WriteString("nonCoherentAtomSize"); json.WriteNumber(deviceProperties.limits.nonCoherentAtomSize); json.WriteString("memoryHeapCount"); json.WriteNumber(memoryProperties.memoryHeapCount); json.WriteString("memoryTypeCount"); json.WriteNumber(memoryProperties.memoryTypeCount); } json.EndObject(); } { json.WriteString("Total"); VmaPrintDetailedStatistics(json, stats.total); } { json.WriteString("MemoryInfo"); json.BeginObject(); { for (uint32_t heapIndex = 0; heapIndex < allocator->GetMemoryHeapCount(); ++heapIndex) { json.BeginString("Heap "); json.ContinueString(heapIndex); json.EndString(); json.BeginObject(); { const VkMemoryHeap& heapInfo = allocator->m_MemProps.memoryHeaps[heapIndex]; json.WriteString("Flags"); json.BeginArray(true); { if (heapInfo.flags & VK_MEMORY_HEAP_DEVICE_LOCAL_BIT) json.WriteString("DEVICE_LOCAL"); #if VMA_VULKAN_VERSION >= 1001000 if (heapInfo.flags & VK_MEMORY_HEAP_MULTI_INSTANCE_BIT) json.WriteString("MULTI_INSTANCE"); #endif VkMemoryHeapFlags flags = heapInfo.flags & ~(VK_MEMORY_HEAP_DEVICE_LOCAL_BIT #if VMA_VULKAN_VERSION >= 1001000 | VK_MEMORY_HEAP_MULTI_INSTANCE_BIT #endif ); if (flags != 0) json.WriteNumber(flags); } json.EndArray(); json.WriteString("Size"); json.WriteNumber(heapInfo.size); json.WriteString("Budget"); json.BeginObject(); { json.WriteString("BudgetBytes"); json.WriteNumber(budgets[heapIndex].budget); json.WriteString("UsageBytes"); json.WriteNumber(budgets[heapIndex].usage); } json.EndObject(); json.WriteString("Stats"); VmaPrintDetailedStatistics(json, stats.memoryHeap[heapIndex]); json.WriteString("MemoryPools"); json.BeginObject(); { for (uint32_t typeIndex = 0; typeIndex < allocator->GetMemoryTypeCount(); ++typeIndex) { if (allocator->MemoryTypeIndexToHeapIndex(typeIndex) == heapIndex) { json.BeginString("Type "); json.ContinueString(typeIndex); json.EndString(); json.BeginObject(); { json.WriteString("Flags"); json.BeginArray(true); { VkMemoryPropertyFlags flags = allocator->m_MemProps.memoryTypes[typeIndex].propertyFlags; if (flags & VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT) json.WriteString("DEVICE_LOCAL"); if (flags & VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT) json.WriteString("HOST_VISIBLE"); if (flags & VK_MEMORY_PROPERTY_HOST_COHERENT_BIT) json.WriteString("HOST_COHERENT"); if (flags & VK_MEMORY_PROPERTY_HOST_CACHED_BIT) json.WriteString("HOST_CACHED"); if (flags & VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT) json.WriteString("LAZILY_ALLOCATED"); #if VMA_VULKAN_VERSION >= 1001000 if (flags & VK_MEMORY_PROPERTY_PROTECTED_BIT) json.WriteString("PROTECTED"); #endif #if VK_AMD_device_coherent_memory if (flags & VK_MEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMD_COPY) json.WriteString("DEVICE_COHERENT_AMD"); if (flags & VK_MEMORY_PROPERTY_DEVICE_UNCACHED_BIT_AMD_COPY) json.WriteString("DEVICE_UNCACHED_AMD"); #endif flags &= ~(VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT #if VMA_VULKAN_VERSION >= 1001000 | VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT #endif #if VK_AMD_device_coherent_memory | VK_MEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMD_COPY | VK_MEMORY_PROPERTY_DEVICE_UNCACHED_BIT_AMD_COPY #endif | VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT | VK_MEMORY_PROPERTY_HOST_CACHED_BIT); if (flags != 0) json.WriteNumber(flags); } json.EndArray(); json.WriteString("Stats"); VmaPrintDetailedStatistics(json, stats.memoryType[typeIndex]); } json.EndObject(); } } } json.EndObject(); } json.EndObject(); } } json.EndObject(); } if (detailedMap == VK_TRUE) allocator->PrintDetailedMap(json); json.EndObject(); } *ppStatsString = VmaCreateStringCopy(allocator->GetAllocationCallbacks(), sb.GetData(), sb.GetLength()); } VMA_CALL_PRE void VMA_CALL_POST vmaFreeStatsString( VmaAllocator allocator, char* pStatsString) { if(pStatsString != VMA_NULL) { VMA_ASSERT(allocator); VmaFreeString(allocator->GetAllocationCallbacks(), pStatsString); } } #endif // VMA_STATS_STRING_ENABLED /* This function is not protected by any mutex because it just reads immutable data. */ VMA_CALL_PRE VkResult VMA_CALL_POST vmaFindMemoryTypeIndex( VmaAllocator allocator, uint32_t memoryTypeBits, const VmaAllocationCreateInfo* pAllocationCreateInfo, uint32_t* pMemoryTypeIndex) { VMA_ASSERT(allocator != VK_NULL_HANDLE); VMA_ASSERT(pAllocationCreateInfo != VMA_NULL); VMA_ASSERT(pMemoryTypeIndex != VMA_NULL); return allocator->FindMemoryTypeIndex(memoryTypeBits, pAllocationCreateInfo, VmaBufferImageUsage::UNKNOWN, pMemoryTypeIndex); } VMA_CALL_PRE VkResult VMA_CALL_POST vmaFindMemoryTypeIndexForBufferInfo( VmaAllocator allocator, const VkBufferCreateInfo* pBufferCreateInfo, const VmaAllocationCreateInfo* pAllocationCreateInfo, uint32_t* pMemoryTypeIndex) { VMA_ASSERT(allocator != VK_NULL_HANDLE); VMA_ASSERT(pBufferCreateInfo != VMA_NULL); VMA_ASSERT(pAllocationCreateInfo != VMA_NULL); VMA_ASSERT(pMemoryTypeIndex != VMA_NULL); const VkDevice hDev = allocator->m_hDevice; const VmaVulkanFunctions* funcs = &allocator->GetVulkanFunctions(); VkResult res; #if VMA_KHR_MAINTENANCE4 || VMA_VULKAN_VERSION >= 1003000 if(funcs->vkGetDeviceBufferMemoryRequirements) { // Can query straight from VkBufferCreateInfo :) VkDeviceBufferMemoryRequirementsKHR devBufMemReq = {VK_STRUCTURE_TYPE_DEVICE_BUFFER_MEMORY_REQUIREMENTS_KHR}; devBufMemReq.pCreateInfo = pBufferCreateInfo; VkMemoryRequirements2 memReq = {VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2}; (*funcs->vkGetDeviceBufferMemoryRequirements)(hDev, &devBufMemReq, &memReq); res = allocator->FindMemoryTypeIndex( memReq.memoryRequirements.memoryTypeBits, pAllocationCreateInfo, VmaBufferImageUsage(*pBufferCreateInfo, allocator->m_UseKhrMaintenance5), pMemoryTypeIndex); } else #endif // VMA_KHR_MAINTENANCE4 || VMA_VULKAN_VERSION >= 1003000 { // Must create a dummy buffer to query :( VkBuffer hBuffer = VK_NULL_HANDLE; res = funcs->vkCreateBuffer( hDev, pBufferCreateInfo, allocator->GetAllocationCallbacks(), &hBuffer); if(res == VK_SUCCESS) { VkMemoryRequirements memReq = {}; funcs->vkGetBufferMemoryRequirements(hDev, hBuffer, &memReq); res = allocator->FindMemoryTypeIndex( memReq.memoryTypeBits, pAllocationCreateInfo, VmaBufferImageUsage(*pBufferCreateInfo, allocator->m_UseKhrMaintenance5), pMemoryTypeIndex); funcs->vkDestroyBuffer( hDev, hBuffer, allocator->GetAllocationCallbacks()); } } return res; } VMA_CALL_PRE VkResult VMA_CALL_POST vmaFindMemoryTypeIndexForImageInfo( VmaAllocator allocator, const VkImageCreateInfo* pImageCreateInfo, const VmaAllocationCreateInfo* pAllocationCreateInfo, uint32_t* pMemoryTypeIndex) { VMA_ASSERT(allocator != VK_NULL_HANDLE); VMA_ASSERT(pImageCreateInfo != VMA_NULL); VMA_ASSERT(pAllocationCreateInfo != VMA_NULL); VMA_ASSERT(pMemoryTypeIndex != VMA_NULL); const VkDevice hDev = allocator->m_hDevice; const VmaVulkanFunctions* funcs = &allocator->GetVulkanFunctions(); VkResult res; #if VMA_KHR_MAINTENANCE4 || VMA_VULKAN_VERSION >= 1003000 if(funcs->vkGetDeviceImageMemoryRequirements) { // Can query straight from VkImageCreateInfo :) VkDeviceImageMemoryRequirementsKHR devImgMemReq = {VK_STRUCTURE_TYPE_DEVICE_IMAGE_MEMORY_REQUIREMENTS_KHR}; devImgMemReq.pCreateInfo = pImageCreateInfo; VMA_ASSERT(pImageCreateInfo->tiling != VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT_COPY && (pImageCreateInfo->flags & VK_IMAGE_CREATE_DISJOINT_BIT_COPY) == 0 && "Cannot use this VkImageCreateInfo with vmaFindMemoryTypeIndexForImageInfo as I don't know what to pass as VkDeviceImageMemoryRequirements::planeAspect."); VkMemoryRequirements2 memReq = {VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2}; (*funcs->vkGetDeviceImageMemoryRequirements)(hDev, &devImgMemReq, &memReq); res = allocator->FindMemoryTypeIndex( memReq.memoryRequirements.memoryTypeBits, pAllocationCreateInfo, VmaBufferImageUsage(*pImageCreateInfo), pMemoryTypeIndex); } else #endif // VMA_KHR_MAINTENANCE4 || VMA_VULKAN_VERSION >= 1003000 { // Must create a dummy image to query :( VkImage hImage = VK_NULL_HANDLE; res = funcs->vkCreateImage( hDev, pImageCreateInfo, allocator->GetAllocationCallbacks(), &hImage); if(res == VK_SUCCESS) { VkMemoryRequirements memReq = {}; funcs->vkGetImageMemoryRequirements(hDev, hImage, &memReq); res = allocator->FindMemoryTypeIndex( memReq.memoryTypeBits, pAllocationCreateInfo, VmaBufferImageUsage(*pImageCreateInfo), pMemoryTypeIndex); funcs->vkDestroyImage( hDev, hImage, allocator->GetAllocationCallbacks()); } } return res; } VMA_CALL_PRE VkResult VMA_CALL_POST vmaCreatePool( VmaAllocator allocator, const VmaPoolCreateInfo* pCreateInfo, VmaPool* pPool) { VMA_ASSERT(allocator && pCreateInfo && pPool); VMA_DEBUG_LOG("vmaCreatePool"); VMA_DEBUG_GLOBAL_MUTEX_LOCK return allocator->CreatePool(pCreateInfo, pPool); } VMA_CALL_PRE void VMA_CALL_POST vmaDestroyPool( VmaAllocator allocator, VmaPool pool) { VMA_ASSERT(allocator); if(pool == VK_NULL_HANDLE) { return; } VMA_DEBUG_LOG("vmaDestroyPool"); VMA_DEBUG_GLOBAL_MUTEX_LOCK allocator->DestroyPool(pool); } VMA_CALL_PRE void VMA_CALL_POST vmaGetPoolStatistics( VmaAllocator allocator, VmaPool pool, VmaStatistics* pPoolStats) { VMA_ASSERT(allocator && pool && pPoolStats); VMA_DEBUG_GLOBAL_MUTEX_LOCK allocator->GetPoolStatistics(pool, pPoolStats); } VMA_CALL_PRE void VMA_CALL_POST vmaCalculatePoolStatistics( VmaAllocator allocator, VmaPool pool, VmaDetailedStatistics* pPoolStats) { VMA_ASSERT(allocator && pool && pPoolStats); VMA_DEBUG_GLOBAL_MUTEX_LOCK allocator->CalculatePoolStatistics(pool, pPoolStats); } VMA_CALL_PRE VkResult VMA_CALL_POST vmaCheckPoolCorruption(VmaAllocator allocator, VmaPool pool) { VMA_ASSERT(allocator && pool); VMA_DEBUG_GLOBAL_MUTEX_LOCK VMA_DEBUG_LOG("vmaCheckPoolCorruption"); return allocator->CheckPoolCorruption(pool); } VMA_CALL_PRE void VMA_CALL_POST vmaGetPoolName( VmaAllocator allocator, VmaPool pool, const char** ppName) { VMA_ASSERT(allocator && pool && ppName); VMA_DEBUG_LOG("vmaGetPoolName"); VMA_DEBUG_GLOBAL_MUTEX_LOCK *ppName = pool->GetName(); } VMA_CALL_PRE void VMA_CALL_POST vmaSetPoolName( VmaAllocator allocator, VmaPool pool, const char* pName) { VMA_ASSERT(allocator && pool); VMA_DEBUG_LOG("vmaSetPoolName"); VMA_DEBUG_GLOBAL_MUTEX_LOCK pool->SetName(pName); } VMA_CALL_PRE VkResult VMA_CALL_POST vmaAllocateMemory( VmaAllocator allocator, const VkMemoryRequirements* pVkMemoryRequirements, const VmaAllocationCreateInfo* pCreateInfo, VmaAllocation* pAllocation, VmaAllocationInfo* pAllocationInfo) { VMA_ASSERT(allocator && pVkMemoryRequirements && pCreateInfo && pAllocation); VMA_DEBUG_LOG("vmaAllocateMemory"); VMA_DEBUG_GLOBAL_MUTEX_LOCK VkResult result = allocator->AllocateMemory( *pVkMemoryRequirements, false, // requiresDedicatedAllocation false, // prefersDedicatedAllocation VK_NULL_HANDLE, // dedicatedBuffer VK_NULL_HANDLE, // dedicatedImage VmaBufferImageUsage::UNKNOWN, // dedicatedBufferImageUsage *pCreateInfo, VMA_SUBALLOCATION_TYPE_UNKNOWN, 1, // allocationCount pAllocation); if(pAllocationInfo != VMA_NULL && result == VK_SUCCESS) { allocator->GetAllocationInfo(*pAllocation, pAllocationInfo); } return result; } VMA_CALL_PRE VkResult VMA_CALL_POST vmaAllocateMemoryPages( VmaAllocator allocator, const VkMemoryRequirements* pVkMemoryRequirements, const VmaAllocationCreateInfo* pCreateInfo, size_t allocationCount, VmaAllocation* pAllocations, VmaAllocationInfo* pAllocationInfo) { if(allocationCount == 0) { return VK_SUCCESS; } VMA_ASSERT(allocator && pVkMemoryRequirements && pCreateInfo && pAllocations); VMA_DEBUG_LOG("vmaAllocateMemoryPages"); VMA_DEBUG_GLOBAL_MUTEX_LOCK VkResult result = allocator->AllocateMemory( *pVkMemoryRequirements, false, // requiresDedicatedAllocation false, // prefersDedicatedAllocation VK_NULL_HANDLE, // dedicatedBuffer VK_NULL_HANDLE, // dedicatedImage VmaBufferImageUsage::UNKNOWN, // dedicatedBufferImageUsage *pCreateInfo, VMA_SUBALLOCATION_TYPE_UNKNOWN, allocationCount, pAllocations); if(pAllocationInfo != VMA_NULL && result == VK_SUCCESS) { for(size_t i = 0; i < allocationCount; ++i) { allocator->GetAllocationInfo(pAllocations[i], pAllocationInfo + i); } } return result; } VMA_CALL_PRE VkResult VMA_CALL_POST vmaAllocateMemoryForBuffer( VmaAllocator allocator, VkBuffer buffer, const VmaAllocationCreateInfo* pCreateInfo, VmaAllocation* pAllocation, VmaAllocationInfo* pAllocationInfo) { VMA_ASSERT(allocator && buffer != VK_NULL_HANDLE && pCreateInfo && pAllocation); VMA_DEBUG_LOG("vmaAllocateMemoryForBuffer"); VMA_DEBUG_GLOBAL_MUTEX_LOCK VkMemoryRequirements vkMemReq = {}; bool requiresDedicatedAllocation = false; bool prefersDedicatedAllocation = false; allocator->GetBufferMemoryRequirements(buffer, vkMemReq, requiresDedicatedAllocation, prefersDedicatedAllocation); VkResult result = allocator->AllocateMemory( vkMemReq, requiresDedicatedAllocation, prefersDedicatedAllocation, buffer, // dedicatedBuffer VK_NULL_HANDLE, // dedicatedImage VmaBufferImageUsage::UNKNOWN, // dedicatedBufferImageUsage *pCreateInfo, VMA_SUBALLOCATION_TYPE_BUFFER, 1, // allocationCount pAllocation); if(pAllocationInfo && result == VK_SUCCESS) { allocator->GetAllocationInfo(*pAllocation, pAllocationInfo); } return result; } VMA_CALL_PRE VkResult VMA_CALL_POST vmaAllocateMemoryForImage( VmaAllocator allocator, VkImage image, const VmaAllocationCreateInfo* pCreateInfo, VmaAllocation* pAllocation, VmaAllocationInfo* pAllocationInfo) { VMA_ASSERT(allocator && image != VK_NULL_HANDLE && pCreateInfo && pAllocation); VMA_DEBUG_LOG("vmaAllocateMemoryForImage"); VMA_DEBUG_GLOBAL_MUTEX_LOCK VkMemoryRequirements vkMemReq = {}; bool requiresDedicatedAllocation = false; bool prefersDedicatedAllocation = false; allocator->GetImageMemoryRequirements(image, vkMemReq, requiresDedicatedAllocation, prefersDedicatedAllocation); VkResult result = allocator->AllocateMemory( vkMemReq, requiresDedicatedAllocation, prefersDedicatedAllocation, VK_NULL_HANDLE, // dedicatedBuffer image, // dedicatedImage VmaBufferImageUsage::UNKNOWN, // dedicatedBufferImageUsage *pCreateInfo, VMA_SUBALLOCATION_TYPE_IMAGE_UNKNOWN, 1, // allocationCount pAllocation); if(pAllocationInfo && result == VK_SUCCESS) { allocator->GetAllocationInfo(*pAllocation, pAllocationInfo); } return result; } VMA_CALL_PRE void VMA_CALL_POST vmaFreeMemory( VmaAllocator allocator, VmaAllocation allocation) { VMA_ASSERT(allocator); if(allocation == VK_NULL_HANDLE) { return; } VMA_DEBUG_LOG("vmaFreeMemory"); VMA_DEBUG_GLOBAL_MUTEX_LOCK allocator->FreeMemory( 1, // allocationCount &allocation); } VMA_CALL_PRE void VMA_CALL_POST vmaFreeMemoryPages( VmaAllocator allocator, size_t allocationCount, const VmaAllocation* pAllocations) { if(allocationCount == 0) { return; } VMA_ASSERT(allocator); VMA_DEBUG_LOG("vmaFreeMemoryPages"); VMA_DEBUG_GLOBAL_MUTEX_LOCK allocator->FreeMemory(allocationCount, pAllocations); } VMA_CALL_PRE void VMA_CALL_POST vmaGetAllocationInfo( VmaAllocator allocator, VmaAllocation allocation, VmaAllocationInfo* pAllocationInfo) { VMA_ASSERT(allocator && allocation && pAllocationInfo); VMA_DEBUG_GLOBAL_MUTEX_LOCK allocator->GetAllocationInfo(allocation, pAllocationInfo); } VMA_CALL_PRE void VMA_CALL_POST vmaGetAllocationInfo2( VmaAllocator allocator, VmaAllocation allocation, VmaAllocationInfo2* pAllocationInfo) { VMA_ASSERT(allocator && allocation && pAllocationInfo); VMA_DEBUG_GLOBAL_MUTEX_LOCK allocator->GetAllocationInfo2(allocation, pAllocationInfo); } VMA_CALL_PRE void VMA_CALL_POST vmaSetAllocationUserData( VmaAllocator allocator, VmaAllocation allocation, void* pUserData) { VMA_ASSERT(allocator && allocation); VMA_DEBUG_GLOBAL_MUTEX_LOCK allocation->SetUserData(allocator, pUserData); } VMA_CALL_PRE void VMA_CALL_POST vmaSetAllocationName( VmaAllocator VMA_NOT_NULL allocator, VmaAllocation VMA_NOT_NULL allocation, const char* VMA_NULLABLE pName) { allocation->SetName(allocator, pName); } VMA_CALL_PRE void VMA_CALL_POST vmaGetAllocationMemoryProperties( VmaAllocator VMA_NOT_NULL allocator, VmaAllocation VMA_NOT_NULL allocation, VkMemoryPropertyFlags* VMA_NOT_NULL pFlags) { VMA_ASSERT(allocator && allocation && pFlags); const uint32_t memTypeIndex = allocation->GetMemoryTypeIndex(); *pFlags = allocator->m_MemProps.memoryTypes[memTypeIndex].propertyFlags; } VMA_CALL_PRE VkResult VMA_CALL_POST vmaMapMemory( VmaAllocator allocator, VmaAllocation allocation, void** ppData) { VMA_ASSERT(allocator && allocation && ppData); VMA_DEBUG_GLOBAL_MUTEX_LOCK return allocator->Map(allocation, ppData); } VMA_CALL_PRE void VMA_CALL_POST vmaUnmapMemory( VmaAllocator allocator, VmaAllocation allocation) { VMA_ASSERT(allocator && allocation); VMA_DEBUG_GLOBAL_MUTEX_LOCK allocator->Unmap(allocation); } VMA_CALL_PRE VkResult VMA_CALL_POST vmaFlushAllocation( VmaAllocator allocator, VmaAllocation allocation, VkDeviceSize offset, VkDeviceSize size) { VMA_ASSERT(allocator && allocation); VMA_DEBUG_LOG("vmaFlushAllocation"); VMA_DEBUG_GLOBAL_MUTEX_LOCK return allocator->FlushOrInvalidateAllocation(allocation, offset, size, VMA_CACHE_FLUSH); } VMA_CALL_PRE VkResult VMA_CALL_POST vmaInvalidateAllocation( VmaAllocator allocator, VmaAllocation allocation, VkDeviceSize offset, VkDeviceSize size) { VMA_ASSERT(allocator && allocation); VMA_DEBUG_LOG("vmaInvalidateAllocation"); VMA_DEBUG_GLOBAL_MUTEX_LOCK return allocator->FlushOrInvalidateAllocation(allocation, offset, size, VMA_CACHE_INVALIDATE); } VMA_CALL_PRE VkResult VMA_CALL_POST vmaFlushAllocations( VmaAllocator allocator, uint32_t allocationCount, const VmaAllocation* allocations, const VkDeviceSize* offsets, const VkDeviceSize* sizes) { VMA_ASSERT(allocator); if(allocationCount == 0) { return VK_SUCCESS; } VMA_ASSERT(allocations); VMA_DEBUG_LOG("vmaFlushAllocations"); VMA_DEBUG_GLOBAL_MUTEX_LOCK return allocator->FlushOrInvalidateAllocations(allocationCount, allocations, offsets, sizes, VMA_CACHE_FLUSH); } VMA_CALL_PRE VkResult VMA_CALL_POST vmaInvalidateAllocations( VmaAllocator allocator, uint32_t allocationCount, const VmaAllocation* allocations, const VkDeviceSize* offsets, const VkDeviceSize* sizes) { VMA_ASSERT(allocator); if(allocationCount == 0) { return VK_SUCCESS; } VMA_ASSERT(allocations); VMA_DEBUG_LOG("vmaInvalidateAllocations"); VMA_DEBUG_GLOBAL_MUTEX_LOCK return allocator->FlushOrInvalidateAllocations(allocationCount, allocations, offsets, sizes, VMA_CACHE_INVALIDATE); } VMA_CALL_PRE VkResult VMA_CALL_POST vmaCopyMemoryToAllocation( VmaAllocator allocator, const void* pSrcHostPointer, VmaAllocation dstAllocation, VkDeviceSize dstAllocationLocalOffset, VkDeviceSize size) { VMA_ASSERT(allocator && pSrcHostPointer && dstAllocation); if(size == 0) { return VK_SUCCESS; } VMA_DEBUG_LOG("vmaCopyMemoryToAllocation"); VMA_DEBUG_GLOBAL_MUTEX_LOCK return allocator->CopyMemoryToAllocation(pSrcHostPointer, dstAllocation, dstAllocationLocalOffset, size); } VMA_CALL_PRE VkResult VMA_CALL_POST vmaCopyAllocationToMemory( VmaAllocator allocator, VmaAllocation srcAllocation, VkDeviceSize srcAllocationLocalOffset, void* pDstHostPointer, VkDeviceSize size) { VMA_ASSERT(allocator && srcAllocation && pDstHostPointer); if(size == 0) { return VK_SUCCESS; } VMA_DEBUG_LOG("vmaCopyAllocationToMemory"); VMA_DEBUG_GLOBAL_MUTEX_LOCK return allocator->CopyAllocationToMemory(srcAllocation, srcAllocationLocalOffset, pDstHostPointer, size); } VMA_CALL_PRE VkResult VMA_CALL_POST vmaCheckCorruption( VmaAllocator allocator, uint32_t memoryTypeBits) { VMA_ASSERT(allocator); VMA_DEBUG_LOG("vmaCheckCorruption"); VMA_DEBUG_GLOBAL_MUTEX_LOCK return allocator->CheckCorruption(memoryTypeBits); } VMA_CALL_PRE VkResult VMA_CALL_POST vmaBeginDefragmentation( VmaAllocator allocator, const VmaDefragmentationInfo* pInfo, VmaDefragmentationContext* pContext) { VMA_ASSERT(allocator && pInfo && pContext); VMA_DEBUG_LOG("vmaBeginDefragmentation"); if (pInfo->pool != VMA_NULL) { // Check if run on supported algorithms if (pInfo->pool->m_BlockVector.GetAlgorithm() & VMA_POOL_CREATE_LINEAR_ALGORITHM_BIT) return VK_ERROR_FEATURE_NOT_PRESENT; } VMA_DEBUG_GLOBAL_MUTEX_LOCK *pContext = vma_new(allocator, VmaDefragmentationContext_T)(allocator, *pInfo); return VK_SUCCESS; } VMA_CALL_PRE void VMA_CALL_POST vmaEndDefragmentation( VmaAllocator allocator, VmaDefragmentationContext context, VmaDefragmentationStats* pStats) { VMA_ASSERT(allocator && context); VMA_DEBUG_LOG("vmaEndDefragmentation"); VMA_DEBUG_GLOBAL_MUTEX_LOCK if (pStats) context->GetStats(*pStats); vma_delete(allocator, context); } VMA_CALL_PRE VkResult VMA_CALL_POST vmaBeginDefragmentationPass( VmaAllocator VMA_NOT_NULL allocator, VmaDefragmentationContext VMA_NOT_NULL context, VmaDefragmentationPassMoveInfo* VMA_NOT_NULL pPassInfo) { VMA_ASSERT(context && pPassInfo); VMA_DEBUG_LOG("vmaBeginDefragmentationPass"); VMA_DEBUG_GLOBAL_MUTEX_LOCK return context->DefragmentPassBegin(*pPassInfo); } VMA_CALL_PRE VkResult VMA_CALL_POST vmaEndDefragmentationPass( VmaAllocator VMA_NOT_NULL allocator, VmaDefragmentationContext VMA_NOT_NULL context, VmaDefragmentationPassMoveInfo* VMA_NOT_NULL pPassInfo) { VMA_ASSERT(context && pPassInfo); VMA_DEBUG_LOG("vmaEndDefragmentationPass"); VMA_DEBUG_GLOBAL_MUTEX_LOCK return context->DefragmentPassEnd(*pPassInfo); } VMA_CALL_PRE VkResult VMA_CALL_POST vmaBindBufferMemory( VmaAllocator allocator, VmaAllocation allocation, VkBuffer buffer) { VMA_ASSERT(allocator && allocation && buffer); VMA_DEBUG_LOG("vmaBindBufferMemory"); VMA_DEBUG_GLOBAL_MUTEX_LOCK return allocator->BindBufferMemory(allocation, 0, buffer, VMA_NULL); } VMA_CALL_PRE VkResult VMA_CALL_POST vmaBindBufferMemory2( VmaAllocator allocator, VmaAllocation allocation, VkDeviceSize allocationLocalOffset, VkBuffer buffer, const void* pNext) { VMA_ASSERT(allocator && allocation && buffer); VMA_DEBUG_LOG("vmaBindBufferMemory2"); VMA_DEBUG_GLOBAL_MUTEX_LOCK return allocator->BindBufferMemory(allocation, allocationLocalOffset, buffer, pNext); } VMA_CALL_PRE VkResult VMA_CALL_POST vmaBindImageMemory( VmaAllocator allocator, VmaAllocation allocation, VkImage image) { VMA_ASSERT(allocator && allocation && image); VMA_DEBUG_LOG("vmaBindImageMemory"); VMA_DEBUG_GLOBAL_MUTEX_LOCK return allocator->BindImageMemory(allocation, 0, image, VMA_NULL); } VMA_CALL_PRE VkResult VMA_CALL_POST vmaBindImageMemory2( VmaAllocator allocator, VmaAllocation allocation, VkDeviceSize allocationLocalOffset, VkImage image, const void* pNext) { VMA_ASSERT(allocator && allocation && image); VMA_DEBUG_LOG("vmaBindImageMemory2"); VMA_DEBUG_GLOBAL_MUTEX_LOCK return allocator->BindImageMemory(allocation, allocationLocalOffset, image, pNext); } VMA_CALL_PRE VkResult VMA_CALL_POST vmaCreateBuffer( VmaAllocator allocator, const VkBufferCreateInfo* pBufferCreateInfo, const VmaAllocationCreateInfo* pAllocationCreateInfo, VkBuffer* pBuffer, VmaAllocation* pAllocation, VmaAllocationInfo* pAllocationInfo) { VMA_ASSERT(allocator && pBufferCreateInfo && pAllocationCreateInfo && pBuffer && pAllocation); if(pBufferCreateInfo->size == 0) { return VK_ERROR_INITIALIZATION_FAILED; } if((pBufferCreateInfo->usage & VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT_COPY) != 0 && !allocator->m_UseKhrBufferDeviceAddress) { VMA_ASSERT(0 && "Creating a buffer with VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT is not valid if VMA_ALLOCATOR_CREATE_BUFFER_DEVICE_ADDRESS_BIT was not used."); return VK_ERROR_INITIALIZATION_FAILED; } VMA_DEBUG_LOG("vmaCreateBuffer"); VMA_DEBUG_GLOBAL_MUTEX_LOCK *pBuffer = VK_NULL_HANDLE; *pAllocation = VK_NULL_HANDLE; // 1. Create VkBuffer. VkResult res = (*allocator->GetVulkanFunctions().vkCreateBuffer)( allocator->m_hDevice, pBufferCreateInfo, allocator->GetAllocationCallbacks(), pBuffer); if(res >= 0) { // 2. vkGetBufferMemoryRequirements. VkMemoryRequirements vkMemReq = {}; bool requiresDedicatedAllocation = false; bool prefersDedicatedAllocation = false; allocator->GetBufferMemoryRequirements(*pBuffer, vkMemReq, requiresDedicatedAllocation, prefersDedicatedAllocation); // 3. Allocate memory using allocator. res = allocator->AllocateMemory( vkMemReq, requiresDedicatedAllocation, prefersDedicatedAllocation, *pBuffer, // dedicatedBuffer VK_NULL_HANDLE, // dedicatedImage VmaBufferImageUsage(*pBufferCreateInfo, allocator->m_UseKhrMaintenance5), // dedicatedBufferImageUsage *pAllocationCreateInfo, VMA_SUBALLOCATION_TYPE_BUFFER, 1, // allocationCount pAllocation); if(res >= 0) { // 3. Bind buffer with memory. if((pAllocationCreateInfo->flags & VMA_ALLOCATION_CREATE_DONT_BIND_BIT) == 0) { res = allocator->BindBufferMemory(*pAllocation, 0, *pBuffer, VMA_NULL); } if(res >= 0) { // All steps succeeded. #if VMA_STATS_STRING_ENABLED (*pAllocation)->InitBufferUsage(*pBufferCreateInfo, allocator->m_UseKhrMaintenance5); #endif if(pAllocationInfo != VMA_NULL) { allocator->GetAllocationInfo(*pAllocation, pAllocationInfo); } return VK_SUCCESS; } allocator->FreeMemory( 1, // allocationCount pAllocation); *pAllocation = VK_NULL_HANDLE; (*allocator->GetVulkanFunctions().vkDestroyBuffer)(allocator->m_hDevice, *pBuffer, allocator->GetAllocationCallbacks()); *pBuffer = VK_NULL_HANDLE; return res; } (*allocator->GetVulkanFunctions().vkDestroyBuffer)(allocator->m_hDevice, *pBuffer, allocator->GetAllocationCallbacks()); *pBuffer = VK_NULL_HANDLE; return res; } return res; } VMA_CALL_PRE VkResult VMA_CALL_POST vmaCreateBufferWithAlignment( VmaAllocator allocator, const VkBufferCreateInfo* pBufferCreateInfo, const VmaAllocationCreateInfo* pAllocationCreateInfo, VkDeviceSize minAlignment, VkBuffer* pBuffer, VmaAllocation* pAllocation, VmaAllocationInfo* pAllocationInfo) { VMA_ASSERT(allocator && pBufferCreateInfo && pAllocationCreateInfo && VmaIsPow2(minAlignment) && pBuffer && pAllocation); if(pBufferCreateInfo->size == 0) { return VK_ERROR_INITIALIZATION_FAILED; } if((pBufferCreateInfo->usage & VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT_COPY) != 0 && !allocator->m_UseKhrBufferDeviceAddress) { VMA_ASSERT(0 && "Creating a buffer with VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT is not valid if VMA_ALLOCATOR_CREATE_BUFFER_DEVICE_ADDRESS_BIT was not used."); return VK_ERROR_INITIALIZATION_FAILED; } VMA_DEBUG_LOG("vmaCreateBufferWithAlignment"); VMA_DEBUG_GLOBAL_MUTEX_LOCK *pBuffer = VK_NULL_HANDLE; *pAllocation = VK_NULL_HANDLE; // 1. Create VkBuffer. VkResult res = (*allocator->GetVulkanFunctions().vkCreateBuffer)( allocator->m_hDevice, pBufferCreateInfo, allocator->GetAllocationCallbacks(), pBuffer); if(res >= 0) { // 2. vkGetBufferMemoryRequirements. VkMemoryRequirements vkMemReq = {}; bool requiresDedicatedAllocation = false; bool prefersDedicatedAllocation = false; allocator->GetBufferMemoryRequirements(*pBuffer, vkMemReq, requiresDedicatedAllocation, prefersDedicatedAllocation); // 2a. Include minAlignment vkMemReq.alignment = VMA_MAX(vkMemReq.alignment, minAlignment); // 3. Allocate memory using allocator. res = allocator->AllocateMemory( vkMemReq, requiresDedicatedAllocation, prefersDedicatedAllocation, *pBuffer, // dedicatedBuffer VK_NULL_HANDLE, // dedicatedImage VmaBufferImageUsage(*pBufferCreateInfo, allocator->m_UseKhrMaintenance5), // dedicatedBufferImageUsage *pAllocationCreateInfo, VMA_SUBALLOCATION_TYPE_BUFFER, 1, // allocationCount pAllocation); if(res >= 0) { // 3. Bind buffer with memory. if((pAllocationCreateInfo->flags & VMA_ALLOCATION_CREATE_DONT_BIND_BIT) == 0) { res = allocator->BindBufferMemory(*pAllocation, 0, *pBuffer, VMA_NULL); } if(res >= 0) { // All steps succeeded. #if VMA_STATS_STRING_ENABLED (*pAllocation)->InitBufferUsage(*pBufferCreateInfo, allocator->m_UseKhrMaintenance5); #endif if(pAllocationInfo != VMA_NULL) { allocator->GetAllocationInfo(*pAllocation, pAllocationInfo); } return VK_SUCCESS; } allocator->FreeMemory( 1, // allocationCount pAllocation); *pAllocation = VK_NULL_HANDLE; (*allocator->GetVulkanFunctions().vkDestroyBuffer)(allocator->m_hDevice, *pBuffer, allocator->GetAllocationCallbacks()); *pBuffer = VK_NULL_HANDLE; return res; } (*allocator->GetVulkanFunctions().vkDestroyBuffer)(allocator->m_hDevice, *pBuffer, allocator->GetAllocationCallbacks()); *pBuffer = VK_NULL_HANDLE; return res; } return res; } VMA_CALL_PRE VkResult VMA_CALL_POST vmaCreateAliasingBuffer( VmaAllocator VMA_NOT_NULL allocator, VmaAllocation VMA_NOT_NULL allocation, const VkBufferCreateInfo* VMA_NOT_NULL pBufferCreateInfo, VkBuffer VMA_NULLABLE_NON_DISPATCHABLE* VMA_NOT_NULL pBuffer) { return vmaCreateAliasingBuffer2(allocator, allocation, 0, pBufferCreateInfo, pBuffer); } VMA_CALL_PRE VkResult VMA_CALL_POST vmaCreateAliasingBuffer2( VmaAllocator VMA_NOT_NULL allocator, VmaAllocation VMA_NOT_NULL allocation, VkDeviceSize allocationLocalOffset, const VkBufferCreateInfo* VMA_NOT_NULL pBufferCreateInfo, VkBuffer VMA_NULLABLE_NON_DISPATCHABLE* VMA_NOT_NULL pBuffer) { VMA_ASSERT(allocator && pBufferCreateInfo && pBuffer && allocation); VMA_ASSERT(allocationLocalOffset + pBufferCreateInfo->size <= allocation->GetSize()); VMA_DEBUG_LOG("vmaCreateAliasingBuffer2"); *pBuffer = VK_NULL_HANDLE; if (pBufferCreateInfo->size == 0) { return VK_ERROR_INITIALIZATION_FAILED; } if ((pBufferCreateInfo->usage & VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT_COPY) != 0 && !allocator->m_UseKhrBufferDeviceAddress) { VMA_ASSERT(0 && "Creating a buffer with VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT is not valid if VMA_ALLOCATOR_CREATE_BUFFER_DEVICE_ADDRESS_BIT was not used."); return VK_ERROR_INITIALIZATION_FAILED; } VMA_DEBUG_GLOBAL_MUTEX_LOCK // 1. Create VkBuffer. VkResult res = (*allocator->GetVulkanFunctions().vkCreateBuffer)( allocator->m_hDevice, pBufferCreateInfo, allocator->GetAllocationCallbacks(), pBuffer); if (res >= 0) { // 2. Bind buffer with memory. res = allocator->BindBufferMemory(allocation, allocationLocalOffset, *pBuffer, VMA_NULL); if (res >= 0) { return VK_SUCCESS; } (*allocator->GetVulkanFunctions().vkDestroyBuffer)(allocator->m_hDevice, *pBuffer, allocator->GetAllocationCallbacks()); } return res; } VMA_CALL_PRE void VMA_CALL_POST vmaDestroyBuffer( VmaAllocator allocator, VkBuffer buffer, VmaAllocation allocation) { VMA_ASSERT(allocator); if(buffer == VK_NULL_HANDLE && allocation == VK_NULL_HANDLE) { return; } VMA_DEBUG_LOG("vmaDestroyBuffer"); VMA_DEBUG_GLOBAL_MUTEX_LOCK if(buffer != VK_NULL_HANDLE) { (*allocator->GetVulkanFunctions().vkDestroyBuffer)(allocator->m_hDevice, buffer, allocator->GetAllocationCallbacks()); } if(allocation != VK_NULL_HANDLE) { allocator->FreeMemory( 1, // allocationCount &allocation); } } VMA_CALL_PRE VkResult VMA_CALL_POST vmaCreateImage( VmaAllocator allocator, const VkImageCreateInfo* pImageCreateInfo, const VmaAllocationCreateInfo* pAllocationCreateInfo, VkImage* pImage, VmaAllocation* pAllocation, VmaAllocationInfo* pAllocationInfo) { VMA_ASSERT(allocator && pImageCreateInfo && pAllocationCreateInfo && pImage && pAllocation); if(pImageCreateInfo->extent.width == 0 || pImageCreateInfo->extent.height == 0 || pImageCreateInfo->extent.depth == 0 || pImageCreateInfo->mipLevels == 0 || pImageCreateInfo->arrayLayers == 0) { return VK_ERROR_INITIALIZATION_FAILED; } VMA_DEBUG_LOG("vmaCreateImage"); VMA_DEBUG_GLOBAL_MUTEX_LOCK *pImage = VK_NULL_HANDLE; *pAllocation = VK_NULL_HANDLE; // 1. Create VkImage. VkResult res = (*allocator->GetVulkanFunctions().vkCreateImage)( allocator->m_hDevice, pImageCreateInfo, allocator->GetAllocationCallbacks(), pImage); if(res == VK_SUCCESS) { VmaSuballocationType suballocType = pImageCreateInfo->tiling == VK_IMAGE_TILING_OPTIMAL ? VMA_SUBALLOCATION_TYPE_IMAGE_OPTIMAL : VMA_SUBALLOCATION_TYPE_IMAGE_LINEAR; // 2. Allocate memory using allocator. VkMemoryRequirements vkMemReq = {}; bool requiresDedicatedAllocation = false; bool prefersDedicatedAllocation = false; allocator->GetImageMemoryRequirements(*pImage, vkMemReq, requiresDedicatedAllocation, prefersDedicatedAllocation); res = allocator->AllocateMemory( vkMemReq, requiresDedicatedAllocation, prefersDedicatedAllocation, VK_NULL_HANDLE, // dedicatedBuffer *pImage, // dedicatedImage VmaBufferImageUsage(*pImageCreateInfo), // dedicatedBufferImageUsage *pAllocationCreateInfo, suballocType, 1, // allocationCount pAllocation); if(res == VK_SUCCESS) { // 3. Bind image with memory. if((pAllocationCreateInfo->flags & VMA_ALLOCATION_CREATE_DONT_BIND_BIT) == 0) { res = allocator->BindImageMemory(*pAllocation, 0, *pImage, VMA_NULL); } if(res == VK_SUCCESS) { // All steps succeeded. #if VMA_STATS_STRING_ENABLED (*pAllocation)->InitImageUsage(*pImageCreateInfo); #endif if(pAllocationInfo != VMA_NULL) { allocator->GetAllocationInfo(*pAllocation, pAllocationInfo); } return VK_SUCCESS; } allocator->FreeMemory( 1, // allocationCount pAllocation); *pAllocation = VK_NULL_HANDLE; (*allocator->GetVulkanFunctions().vkDestroyImage)(allocator->m_hDevice, *pImage, allocator->GetAllocationCallbacks()); *pImage = VK_NULL_HANDLE; return res; } (*allocator->GetVulkanFunctions().vkDestroyImage)(allocator->m_hDevice, *pImage, allocator->GetAllocationCallbacks()); *pImage = VK_NULL_HANDLE; return res; } return res; } VMA_CALL_PRE VkResult VMA_CALL_POST vmaCreateAliasingImage( VmaAllocator VMA_NOT_NULL allocator, VmaAllocation VMA_NOT_NULL allocation, const VkImageCreateInfo* VMA_NOT_NULL pImageCreateInfo, VkImage VMA_NULLABLE_NON_DISPATCHABLE* VMA_NOT_NULL pImage) { return vmaCreateAliasingImage2(allocator, allocation, 0, pImageCreateInfo, pImage); } VMA_CALL_PRE VkResult VMA_CALL_POST vmaCreateAliasingImage2( VmaAllocator VMA_NOT_NULL allocator, VmaAllocation VMA_NOT_NULL allocation, VkDeviceSize allocationLocalOffset, const VkImageCreateInfo* VMA_NOT_NULL pImageCreateInfo, VkImage VMA_NULLABLE_NON_DISPATCHABLE* VMA_NOT_NULL pImage) { VMA_ASSERT(allocator && pImageCreateInfo && pImage && allocation); *pImage = VK_NULL_HANDLE; VMA_DEBUG_LOG("vmaCreateImage2"); if (pImageCreateInfo->extent.width == 0 || pImageCreateInfo->extent.height == 0 || pImageCreateInfo->extent.depth == 0 || pImageCreateInfo->mipLevels == 0 || pImageCreateInfo->arrayLayers == 0) { return VK_ERROR_INITIALIZATION_FAILED; } VMA_DEBUG_GLOBAL_MUTEX_LOCK // 1. Create VkImage. VkResult res = (*allocator->GetVulkanFunctions().vkCreateImage)( allocator->m_hDevice, pImageCreateInfo, allocator->GetAllocationCallbacks(), pImage); if (res >= 0) { // 2. Bind image with memory. res = allocator->BindImageMemory(allocation, allocationLocalOffset, *pImage, VMA_NULL); if (res >= 0) { return VK_SUCCESS; } (*allocator->GetVulkanFunctions().vkDestroyImage)(allocator->m_hDevice, *pImage, allocator->GetAllocationCallbacks()); } return res; } VMA_CALL_PRE void VMA_CALL_POST vmaDestroyImage( VmaAllocator VMA_NOT_NULL allocator, VkImage VMA_NULLABLE_NON_DISPATCHABLE image, VmaAllocation VMA_NULLABLE allocation) { VMA_ASSERT(allocator); if(image == VK_NULL_HANDLE && allocation == VK_NULL_HANDLE) { return; } VMA_DEBUG_LOG("vmaDestroyImage"); VMA_DEBUG_GLOBAL_MUTEX_LOCK if(image != VK_NULL_HANDLE) { (*allocator->GetVulkanFunctions().vkDestroyImage)(allocator->m_hDevice, image, allocator->GetAllocationCallbacks()); } if(allocation != VK_NULL_HANDLE) { allocator->FreeMemory( 1, // allocationCount &allocation); } } VMA_CALL_PRE VkResult VMA_CALL_POST vmaCreateVirtualBlock( const VmaVirtualBlockCreateInfo* VMA_NOT_NULL pCreateInfo, VmaVirtualBlock VMA_NULLABLE * VMA_NOT_NULL pVirtualBlock) { VMA_ASSERT(pCreateInfo && pVirtualBlock); VMA_ASSERT(pCreateInfo->size > 0); VMA_DEBUG_LOG("vmaCreateVirtualBlock"); VMA_DEBUG_GLOBAL_MUTEX_LOCK; *pVirtualBlock = vma_new(pCreateInfo->pAllocationCallbacks, VmaVirtualBlock_T)(*pCreateInfo); VkResult res = (*pVirtualBlock)->Init(); if(res < 0) { vma_delete(pCreateInfo->pAllocationCallbacks, *pVirtualBlock); *pVirtualBlock = VK_NULL_HANDLE; } return res; } VMA_CALL_PRE void VMA_CALL_POST vmaDestroyVirtualBlock(VmaVirtualBlock VMA_NULLABLE virtualBlock) { if(virtualBlock != VK_NULL_HANDLE) { VMA_DEBUG_LOG("vmaDestroyVirtualBlock"); VMA_DEBUG_GLOBAL_MUTEX_LOCK; VkAllocationCallbacks allocationCallbacks = virtualBlock->m_AllocationCallbacks; // Have to copy the callbacks when destroying. vma_delete(&allocationCallbacks, virtualBlock); } } VMA_CALL_PRE VkBool32 VMA_CALL_POST vmaIsVirtualBlockEmpty(VmaVirtualBlock VMA_NOT_NULL virtualBlock) { VMA_ASSERT(virtualBlock != VK_NULL_HANDLE); VMA_DEBUG_LOG("vmaIsVirtualBlockEmpty"); VMA_DEBUG_GLOBAL_MUTEX_LOCK; return virtualBlock->IsEmpty() ? VK_TRUE : VK_FALSE; } VMA_CALL_PRE void VMA_CALL_POST vmaGetVirtualAllocationInfo(VmaVirtualBlock VMA_NOT_NULL virtualBlock, VmaVirtualAllocation VMA_NOT_NULL_NON_DISPATCHABLE allocation, VmaVirtualAllocationInfo* VMA_NOT_NULL pVirtualAllocInfo) { VMA_ASSERT(virtualBlock != VK_NULL_HANDLE && pVirtualAllocInfo != VMA_NULL); VMA_DEBUG_LOG("vmaGetVirtualAllocationInfo"); VMA_DEBUG_GLOBAL_MUTEX_LOCK; virtualBlock->GetAllocationInfo(allocation, *pVirtualAllocInfo); } VMA_CALL_PRE VkResult VMA_CALL_POST vmaVirtualAllocate(VmaVirtualBlock VMA_NOT_NULL virtualBlock, const VmaVirtualAllocationCreateInfo* VMA_NOT_NULL pCreateInfo, VmaVirtualAllocation VMA_NULLABLE_NON_DISPATCHABLE* VMA_NOT_NULL pAllocation, VkDeviceSize* VMA_NULLABLE pOffset) { VMA_ASSERT(virtualBlock != VK_NULL_HANDLE && pCreateInfo != VMA_NULL && pAllocation != VMA_NULL); VMA_DEBUG_LOG("vmaVirtualAllocate"); VMA_DEBUG_GLOBAL_MUTEX_LOCK; return virtualBlock->Allocate(*pCreateInfo, *pAllocation, pOffset); } VMA_CALL_PRE void VMA_CALL_POST vmaVirtualFree(VmaVirtualBlock VMA_NOT_NULL virtualBlock, VmaVirtualAllocation VMA_NULLABLE_NON_DISPATCHABLE allocation) { if(allocation != VK_NULL_HANDLE) { VMA_ASSERT(virtualBlock != VK_NULL_HANDLE); VMA_DEBUG_LOG("vmaVirtualFree"); VMA_DEBUG_GLOBAL_MUTEX_LOCK; virtualBlock->Free(allocation); } } VMA_CALL_PRE void VMA_CALL_POST vmaClearVirtualBlock(VmaVirtualBlock VMA_NOT_NULL virtualBlock) { VMA_ASSERT(virtualBlock != VK_NULL_HANDLE); VMA_DEBUG_LOG("vmaClearVirtualBlock"); VMA_DEBUG_GLOBAL_MUTEX_LOCK; virtualBlock->Clear(); } VMA_CALL_PRE void VMA_CALL_POST vmaSetVirtualAllocationUserData(VmaVirtualBlock VMA_NOT_NULL virtualBlock, VmaVirtualAllocation VMA_NOT_NULL_NON_DISPATCHABLE allocation, void* VMA_NULLABLE pUserData) { VMA_ASSERT(virtualBlock != VK_NULL_HANDLE); VMA_DEBUG_LOG("vmaSetVirtualAllocationUserData"); VMA_DEBUG_GLOBAL_MUTEX_LOCK; virtualBlock->SetAllocationUserData(allocation, pUserData); } VMA_CALL_PRE void VMA_CALL_POST vmaGetVirtualBlockStatistics(VmaVirtualBlock VMA_NOT_NULL virtualBlock, VmaStatistics* VMA_NOT_NULL pStats) { VMA_ASSERT(virtualBlock != VK_NULL_HANDLE && pStats != VMA_NULL); VMA_DEBUG_LOG("vmaGetVirtualBlockStatistics"); VMA_DEBUG_GLOBAL_MUTEX_LOCK; virtualBlock->GetStatistics(*pStats); } VMA_CALL_PRE void VMA_CALL_POST vmaCalculateVirtualBlockStatistics(VmaVirtualBlock VMA_NOT_NULL virtualBlock, VmaDetailedStatistics* VMA_NOT_NULL pStats) { VMA_ASSERT(virtualBlock != VK_NULL_HANDLE && pStats != VMA_NULL); VMA_DEBUG_LOG("vmaCalculateVirtualBlockStatistics"); VMA_DEBUG_GLOBAL_MUTEX_LOCK; virtualBlock->CalculateDetailedStatistics(*pStats); } #if VMA_STATS_STRING_ENABLED VMA_CALL_PRE void VMA_CALL_POST vmaBuildVirtualBlockStatsString(VmaVirtualBlock VMA_NOT_NULL virtualBlock, char* VMA_NULLABLE * VMA_NOT_NULL ppStatsString, VkBool32 detailedMap) { VMA_ASSERT(virtualBlock != VK_NULL_HANDLE && ppStatsString != VMA_NULL); VMA_DEBUG_GLOBAL_MUTEX_LOCK; const VkAllocationCallbacks* allocationCallbacks = virtualBlock->GetAllocationCallbacks(); VmaStringBuilder sb(allocationCallbacks); virtualBlock->BuildStatsString(detailedMap != VK_FALSE, sb); *ppStatsString = VmaCreateStringCopy(allocationCallbacks, sb.GetData(), sb.GetLength()); } VMA_CALL_PRE void VMA_CALL_POST vmaFreeVirtualBlockStatsString(VmaVirtualBlock VMA_NOT_NULL virtualBlock, char* VMA_NULLABLE pStatsString) { if(pStatsString != VMA_NULL) { VMA_ASSERT(virtualBlock != VK_NULL_HANDLE); VMA_DEBUG_GLOBAL_MUTEX_LOCK; VmaFreeString(virtualBlock->GetAllocationCallbacks(), pStatsString); } } #if VMA_EXTERNAL_MEMORY_WIN32 VMA_CALL_PRE VkResult VMA_CALL_POST vmaGetMemoryWin32Handle(VmaAllocator VMA_NOT_NULL allocator, VmaAllocation VMA_NOT_NULL allocation, HANDLE hTargetProcess, HANDLE* VMA_NOT_NULL pHandle) { VMA_ASSERT(allocator && allocation && pHandle); VMA_DEBUG_GLOBAL_MUTEX_LOCK; return allocation->GetWin32Handle(allocator, hTargetProcess, pHandle); } #endif // VMA_EXTERNAL_MEMORY_WIN32 #endif // VMA_STATS_STRING_ENABLED #endif // _VMA_PUBLIC_INTERFACE #endif // VMA_IMPLEMENTATION /** \page quick_start Quick start \section quick_start_project_setup Project setup Vulkan Memory Allocator comes in form of a "stb-style" single header file. While you can pull the entire repository e.g. as Git module, there is also Cmake script provided, you don't need to build it as a separate library project. You can add file "vk_mem_alloc.h" directly to your project and submit it to code repository next to your other source files. "Single header" doesn't mean that everything is contained in C/C++ declarations, like it tends to be in case of inline functions or C++ templates. It means that implementation is bundled with interface in a single file and needs to be extracted using preprocessor macro. If you don't do it properly, it will result in linker errors. To do it properly: -# Include "vk_mem_alloc.h" file in each CPP file where you want to use the library. This includes declarations of all members of the library. -# In exactly one CPP file define following macro before this include. It enables also internal definitions. \code #define VMA_IMPLEMENTATION #include "vk_mem_alloc.h" \endcode It may be a good idea to create dedicated CPP file just for this purpose, e.g. "VmaUsage.cpp". This library includes header ``, which in turn includes `` on Windows. If you need some specific macros defined before including these headers (like `WIN32_LEAN_AND_MEAN` or `WINVER` for Windows, `VK_USE_PLATFORM_WIN32_KHR` for Vulkan), you must define them before every `#include` of this library. It may be a good idea to create a dedicate header file for this purpose, e.g. "VmaUsage.h", that will be included in other source files instead of VMA header directly. This library is written in C++, but has C-compatible interface. Thus, you can include and use "vk_mem_alloc.h" in C or C++ code, but full implementation with `VMA_IMPLEMENTATION` macro must be compiled as C++, NOT as C. Some features of C++14 are used and required. Features of C++20 are used optionally when available. Some headers of standard C and C++ library are used, but STL containers, RTTI, or C++ exceptions are not used. \section quick_start_initialization Initialization VMA offers library interface in a style similar to Vulkan, with object handles like #VmaAllocation, structures describing parameters of objects to be created like #VmaAllocationCreateInfo, and errors codes returned from functions using `VkResult` type. The first and the main object that needs to be created is #VmaAllocator. It represents the initialization of the entire library. Only one such object should be created per `VkDevice`. You should create it at program startup, after `VkDevice` was created, and before any device memory allocator needs to be made. It must be destroyed before `VkDevice` is destroyed. At program startup: -# Initialize Vulkan to have `VkInstance`, `VkPhysicalDevice`, `VkDevice` object. -# Fill VmaAllocatorCreateInfo structure and call vmaCreateAllocator() to create #VmaAllocator object. Only members `physicalDevice`, `device`, `instance` are required. However, you should inform the library which Vulkan version do you use by setting VmaAllocatorCreateInfo::vulkanApiVersion and which extensions did you enable by setting VmaAllocatorCreateInfo::flags. Otherwise, VMA would use only features of Vulkan 1.0 core with no extensions. See below for details. \subsection quick_start_initialization_selecting_vulkan_version Selecting Vulkan version VMA supports Vulkan version down to 1.0, for backward compatibility. If you want to use higher version, you need to inform the library about it. This is a two-step process. Step 1: Compile time. By default, VMA compiles with code supporting the highest Vulkan version found in the included `` that is also supported by the library. If this is OK, you don't need to do anything. However, if you want to compile VMA as if only some lower Vulkan version was available, define macro `VMA_VULKAN_VERSION` before every `#include "vk_mem_alloc.h"`. It should have decimal numeric value in form of ABBBCCC, where A = major, BBB = minor, CCC = patch Vulkan version. For example, to compile against Vulkan 1.2: \code #define VMA_VULKAN_VERSION 1002000 // Vulkan 1.2 #include "vk_mem_alloc.h" \endcode Step 2: Runtime. Even when compiled with higher Vulkan version available, VMA can use only features of a lower version, which is configurable during creation of the #VmaAllocator object. By default, only Vulkan 1.0 is used. To initialize the allocator with support for higher Vulkan version, you need to set member VmaAllocatorCreateInfo::vulkanApiVersion to an appropriate value, e.g. using constants like `VK_API_VERSION_1_2`. See code sample below. \subsection quick_start_initialization_importing_vulkan_functions Importing Vulkan functions You may need to configure importing Vulkan functions. There are 3 ways to do this: -# **If you link with Vulkan static library** (e.g. "vulkan-1.lib" on Windows): - You don't need to do anything. - VMA will use these, as macro `VMA_STATIC_VULKAN_FUNCTIONS` is defined to 1 by default. -# **If you want VMA to fetch pointers to Vulkan functions dynamically** using `vkGetInstanceProcAddr`, `vkGetDeviceProcAddr` (this is the option presented in the example below): - Define `VMA_STATIC_VULKAN_FUNCTIONS` to 0, `VMA_DYNAMIC_VULKAN_FUNCTIONS` to 1. - Provide pointers to these two functions via VmaVulkanFunctions::vkGetInstanceProcAddr, VmaVulkanFunctions::vkGetDeviceProcAddr. - The library will fetch pointers to all other functions it needs internally. -# **If you fetch pointers to all Vulkan functions in a custom way**, e.g. using some loader like [Volk](https://github.com/zeux/volk): - Define `VMA_STATIC_VULKAN_FUNCTIONS` and `VMA_DYNAMIC_VULKAN_FUNCTIONS` to 0. - Pass these pointers via structure #VmaVulkanFunctions. \subsection quick_start_initialization_enabling_extensions Enabling extensions VMA can automatically use following Vulkan extensions. If you found them available on the selected physical device and you enabled them while creating `VkInstance` / `VkDevice` object, inform VMA about their availability by setting appropriate flags in VmaAllocatorCreateInfo::flags. Vulkan extension | VMA flag ------------------------------|----------------------------------------------------- VK_KHR_dedicated_allocation | #VMA_ALLOCATOR_CREATE_KHR_DEDICATED_ALLOCATION_BIT VK_KHR_bind_memory2 | #VMA_ALLOCATOR_CREATE_KHR_BIND_MEMORY2_BIT VK_KHR_maintenance4 | #VMA_ALLOCATOR_CREATE_KHR_MAINTENANCE4_BIT VK_KHR_maintenance5 | #VMA_ALLOCATOR_CREATE_KHR_MAINTENANCE5_BIT VK_EXT_memory_budget | #VMA_ALLOCATOR_CREATE_EXT_MEMORY_BUDGET_BIT VK_KHR_buffer_device_address | #VMA_ALLOCATOR_CREATE_BUFFER_DEVICE_ADDRESS_BIT VK_EXT_memory_priority | #VMA_ALLOCATOR_CREATE_EXT_MEMORY_PRIORITY_BIT VK_AMD_device_coherent_memory | #VMA_ALLOCATOR_CREATE_AMD_DEVICE_COHERENT_MEMORY_BIT VK_KHR_external_memory_win32 | #VMA_ALLOCATOR_CREATE_KHR_EXTERNAL_MEMORY_WIN32_BIT Example with fetching pointers to Vulkan functions dynamically: \code #define VMA_STATIC_VULKAN_FUNCTIONS 0 #define VMA_DYNAMIC_VULKAN_FUNCTIONS 1 #include "vk_mem_alloc.h" ... VmaVulkanFunctions vulkanFunctions = {}; vulkanFunctions.vkGetInstanceProcAddr = &vkGetInstanceProcAddr; vulkanFunctions.vkGetDeviceProcAddr = &vkGetDeviceProcAddr; VmaAllocatorCreateInfo allocatorCreateInfo = {}; allocatorCreateInfo.flags = VMA_ALLOCATOR_CREATE_EXT_MEMORY_BUDGET_BIT; allocatorCreateInfo.vulkanApiVersion = VK_API_VERSION_1_2; allocatorCreateInfo.physicalDevice = physicalDevice; allocatorCreateInfo.device = device; allocatorCreateInfo.instance = instance; allocatorCreateInfo.pVulkanFunctions = &vulkanFunctions; VmaAllocator allocator; vmaCreateAllocator(&allocatorCreateInfo, &allocator); // Entire program... // At the end, don't forget to: vmaDestroyAllocator(allocator); \endcode \subsection quick_start_initialization_other_config Other configuration options There are additional configuration options available through preprocessor macros that you can define before including VMA header and through parameters passed in #VmaAllocatorCreateInfo. They include a possibility to use your own callbacks for host memory allocations (`VkAllocationCallbacks`), callbacks for device memory allocations (instead of `vkAllocateMemory`, `vkFreeMemory`), or your custom `VMA_ASSERT` macro, among others. For more information, see: @ref configuration. \section quick_start_resource_allocation Resource allocation When you want to create a buffer or image: -# Fill `VkBufferCreateInfo` / `VkImageCreateInfo` structure. -# Fill VmaAllocationCreateInfo structure. -# Call vmaCreateBuffer() / vmaCreateImage() to get `VkBuffer`/`VkImage` with memory already allocated and bound to it, plus #VmaAllocation objects that represents its underlying memory. \code VkBufferCreateInfo bufferInfo = { VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO }; bufferInfo.size = 65536; bufferInfo.usage = VK_BUFFER_USAGE_VERTEX_BUFFER_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT; VmaAllocationCreateInfo allocInfo = {}; allocInfo.usage = VMA_MEMORY_USAGE_AUTO; VkBuffer buffer; VmaAllocation allocation; vmaCreateBuffer(allocator, &bufferInfo, &allocInfo, &buffer, &allocation, nullptr); \endcode Don't forget to destroy your buffer and allocation objects when no longer needed: \code vmaDestroyBuffer(allocator, buffer, allocation); \endcode If you need to map the buffer, you must set flag #VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT or #VMA_ALLOCATION_CREATE_HOST_ACCESS_RANDOM_BIT in VmaAllocationCreateInfo::flags. There are many additional parameters that can control the choice of memory type to be used for the allocation and other features. For more information, see documentation chapters: @ref choosing_memory_type, @ref memory_mapping. \page choosing_memory_type Choosing memory type Physical devices in Vulkan support various combinations of memory heaps and types. Help with choosing correct and optimal memory type for your specific resource is one of the key features of this library. You can use it by filling appropriate members of VmaAllocationCreateInfo structure, as described below. You can also combine multiple methods. -# If you just want to find memory type index that meets your requirements, you can use function: vmaFindMemoryTypeIndexForBufferInfo(), vmaFindMemoryTypeIndexForImageInfo(), vmaFindMemoryTypeIndex(). -# If you want to allocate a region of device memory without association with any specific image or buffer, you can use function vmaAllocateMemory(). Usage of this function is not recommended and usually not needed. vmaAllocateMemoryPages() function is also provided for creating multiple allocations at once, which may be useful for sparse binding. -# If you already have a buffer or an image created, you want to allocate memory for it and then you will bind it yourself, you can use function vmaAllocateMemoryForBuffer(), vmaAllocateMemoryForImage(). For binding you should use functions: vmaBindBufferMemory(), vmaBindImageMemory() or their extended versions: vmaBindBufferMemory2(), vmaBindImageMemory2(). -# If you want to create a buffer or an image, allocate memory for it, and bind them together, all in one call, you can use function vmaCreateBuffer(), vmaCreateImage(). This is the easiest and recommended way to use this library! When using 3. or 4., the library internally queries Vulkan for memory types supported for that buffer or image (function `vkGetBufferMemoryRequirements()`) and uses only one of these types. If no memory type can be found that meets all the requirements, these functions return `VK_ERROR_FEATURE_NOT_PRESENT`. You can leave VmaAllocationCreateInfo structure completely filled with zeros. It means no requirements are specified for memory type. It is valid, although not very useful. \section choosing_memory_type_usage Usage The easiest way to specify memory requirements is to fill member VmaAllocationCreateInfo::usage using one of the values of enum #VmaMemoryUsage. It defines high level, common usage types. Since version 3 of the library, it is recommended to use #VMA_MEMORY_USAGE_AUTO to let it select best memory type for your resource automatically. For example, if you want to create a uniform buffer that will be filled using transfer only once or infrequently and then used for rendering every frame as a uniform buffer, you can do it using following code. The buffer will most likely end up in a memory type with `VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT` to be fast to access by the GPU device. \code VkBufferCreateInfo bufferInfo = { VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO }; bufferInfo.size = 65536; bufferInfo.usage = VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT; VmaAllocationCreateInfo allocInfo = {}; allocInfo.usage = VMA_MEMORY_USAGE_AUTO; VkBuffer buffer; VmaAllocation allocation; vmaCreateBuffer(allocator, &bufferInfo, &allocInfo, &buffer, &allocation, nullptr); \endcode If you have a preference for putting the resource in GPU (device) memory or CPU (host) memory on systems with discrete graphics card that have the memories separate, you can use #VMA_MEMORY_USAGE_AUTO_PREFER_DEVICE or #VMA_MEMORY_USAGE_AUTO_PREFER_HOST. When using `VMA_MEMORY_USAGE_AUTO*` while you want to map the allocated memory, you also need to specify one of the host access flags: #VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT or #VMA_ALLOCATION_CREATE_HOST_ACCESS_RANDOM_BIT. This will help the library decide about preferred memory type to ensure it has `VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT` so you can map it. For example, a staging buffer that will be filled via mapped pointer and then used as a source of transfer to the buffer described previously can be created like this. It will likely end up in a memory type that is `HOST_VISIBLE` and `HOST_COHERENT` but not `HOST_CACHED` (meaning uncached, write-combined) and not `DEVICE_LOCAL` (meaning system RAM). \code VkBufferCreateInfo stagingBufferInfo = { VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO }; stagingBufferInfo.size = 65536; stagingBufferInfo.usage = VK_BUFFER_USAGE_TRANSFER_SRC_BIT; VmaAllocationCreateInfo stagingAllocInfo = {}; stagingAllocInfo.usage = VMA_MEMORY_USAGE_AUTO; stagingAllocInfo.flags = VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT; VkBuffer stagingBuffer; VmaAllocation stagingAllocation; vmaCreateBuffer(allocator, &stagingBufferInfo, &stagingAllocInfo, &stagingBuffer, &stagingAllocation, nullptr); \endcode For more examples of creating different kinds of resources, see chapter \ref usage_patterns. See also: @ref memory_mapping. Usage values `VMA_MEMORY_USAGE_AUTO*` are legal to use only when the library knows about the resource being created by having `VkBufferCreateInfo` / `VkImageCreateInfo` passed, so they work with functions like: vmaCreateBuffer(), vmaCreateImage(), vmaFindMemoryTypeIndexForBufferInfo() etc. If you allocate raw memory using function vmaAllocateMemory(), you have to use other means of selecting memory type, as described below. \note Old usage values (`VMA_MEMORY_USAGE_GPU_ONLY`, `VMA_MEMORY_USAGE_CPU_ONLY`, `VMA_MEMORY_USAGE_CPU_TO_GPU`, `VMA_MEMORY_USAGE_GPU_TO_CPU`, `VMA_MEMORY_USAGE_CPU_COPY`) are still available and work same way as in previous versions of the library for backward compatibility, but they are deprecated. \section choosing_memory_type_required_preferred_flags Required and preferred flags You can specify more detailed requirements by filling members VmaAllocationCreateInfo::requiredFlags and VmaAllocationCreateInfo::preferredFlags with a combination of bits from enum `VkMemoryPropertyFlags`. For example, if you want to create a buffer that will be persistently mapped on host (so it must be `HOST_VISIBLE`) and preferably will also be `HOST_COHERENT` and `HOST_CACHED`, use following code: \code VmaAllocationCreateInfo allocInfo = {}; allocInfo.requiredFlags = VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT; allocInfo.preferredFlags = VK_MEMORY_PROPERTY_HOST_COHERENT_BIT | VK_MEMORY_PROPERTY_HOST_CACHED_BIT; allocInfo.flags = VMA_ALLOCATION_CREATE_HOST_ACCESS_RANDOM_BIT | VMA_ALLOCATION_CREATE_MAPPED_BIT; VkBuffer buffer; VmaAllocation allocation; vmaCreateBuffer(allocator, &bufferInfo, &allocInfo, &buffer, &allocation, nullptr); \endcode A memory type is chosen that has all the required flags and as many preferred flags set as possible. Value passed in VmaAllocationCreateInfo::usage is internally converted to a set of required and preferred flags, plus some extra "magic" (heuristics). \section choosing_memory_type_explicit_memory_types Explicit memory types If you inspected memory types available on the physical device and you have a preference for memory types that you want to use, you can fill member VmaAllocationCreateInfo::memoryTypeBits. It is a bit mask, where each bit set means that a memory type with that index is allowed to be used for the allocation. Special value 0, just like `UINT32_MAX`, means there are no restrictions to memory type index. Please note that this member is NOT just a memory type index. Still you can use it to choose just one, specific memory type. For example, if you already determined that your buffer should be created in memory type 2, use following code: \code uint32_t memoryTypeIndex = 2; VmaAllocationCreateInfo allocInfo = {}; allocInfo.memoryTypeBits = 1u << memoryTypeIndex; VkBuffer buffer; VmaAllocation allocation; vmaCreateBuffer(allocator, &bufferInfo, &allocInfo, &buffer, &allocation, nullptr); \endcode You can also use this parameter to exclude some memory types. If you inspect memory heaps and types available on the current physical device and you determine that for some reason you don't want to use a specific memory type for the allocation, you can enable automatic memory type selection but exclude certain memory type or types by setting all bits of `memoryTypeBits` to 1 except the ones you choose. \code // ... uint32_t excludedMemoryTypeIndex = 2; VmaAllocationCreateInfo allocInfo = {}; allocInfo.usage = VMA_MEMORY_USAGE_AUTO; allocInfo.memoryTypeBits = ~(1u << excludedMemoryTypeIndex); // ... \endcode \section choosing_memory_type_custom_memory_pools Custom memory pools If you allocate from custom memory pool, all the ways of specifying memory requirements described above are not applicable and the aforementioned members of VmaAllocationCreateInfo structure are ignored. Memory type is selected explicitly when creating the pool and then used to make all the allocations from that pool. For further details, see \ref custom_memory_pools. \section choosing_memory_type_dedicated_allocations Dedicated allocations Memory for allocations is reserved out of larger block of `VkDeviceMemory` allocated from Vulkan internally. That is the main feature of this whole library. You can still request a separate memory block to be created for an allocation, just like you would do in a trivial solution without using any allocator. In that case, a buffer or image is always bound to that memory at offset 0. This is called a "dedicated allocation". You can explicitly request it by using flag #VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT. The library can also internally decide to use dedicated allocation in some cases, e.g.: - When the size of the allocation is large. - When [VK_KHR_dedicated_allocation](@ref vk_khr_dedicated_allocation) extension is enabled and it reports that dedicated allocation is required or recommended for the resource. - When allocation of next big memory block fails due to not enough device memory, but allocation with the exact requested size succeeds. \page memory_mapping Memory mapping To "map memory" in Vulkan means to obtain a CPU pointer to `VkDeviceMemory`, to be able to read from it or write to it in CPU code. Mapping is possible only of memory allocated from a memory type that has `VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT` flag. Functions `vkMapMemory()`, `vkUnmapMemory()` are designed for this purpose. You can use them directly with memory allocated by this library, but it is not recommended because of following issue: Mapping the same `VkDeviceMemory` block multiple times is illegal - only one mapping at a time is allowed. This includes mapping disjoint regions. Mapping is not reference-counted internally by Vulkan. It is also not thread-safe. Because of this, Vulkan Memory Allocator provides following facilities: \note If you want to be able to map an allocation, you need to specify one of the flags #VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT or #VMA_ALLOCATION_CREATE_HOST_ACCESS_RANDOM_BIT in VmaAllocationCreateInfo::flags. These flags are required for an allocation to be mappable when using #VMA_MEMORY_USAGE_AUTO or other `VMA_MEMORY_USAGE_AUTO*` enum values. For other usage values they are ignored and every such allocation made in `HOST_VISIBLE` memory type is mappable, but these flags can still be used for consistency. \section memory_mapping_copy_functions Copy functions The easiest way to copy data from a host pointer to an allocation is to use convenience function vmaCopyMemoryToAllocation(). It automatically maps the Vulkan memory temporarily (if not already mapped), performs `memcpy`, and calls `vkFlushMappedMemoryRanges` (if required - if memory type is not `HOST_COHERENT`). It is also the safest one, because using `memcpy` avoids a risk of accidentally introducing memory reads (e.g. by doing `pMappedVectors[i] += v`), which may be very slow on memory types that are not `HOST_CACHED`. \code struct ConstantBuffer { ... }; ConstantBuffer constantBufferData = ... VkBufferCreateInfo bufCreateInfo = { VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO }; bufCreateInfo.size = sizeof(ConstantBuffer); bufCreateInfo.usage = VK_BUFFER_USAGE_TRANSFER_SRC_BIT; VmaAllocationCreateInfo allocCreateInfo = {}; allocCreateInfo.usage = VMA_MEMORY_USAGE_AUTO; allocCreateInfo.flags = VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT; VkBuffer buf; VmaAllocation alloc; vmaCreateBuffer(allocator, &bufCreateInfo, &allocCreateInfo, &buf, &alloc, nullptr); vmaCopyMemoryToAllocation(allocator, &constantBufferData, alloc, 0, sizeof(ConstantBuffer)); \endcode Copy in the other direction - from an allocation to a host pointer can be performed the same way using function vmaCopyAllocationToMemory(). \section memory_mapping_mapping_functions Mapping functions The library provides following functions for mapping of a specific allocation: vmaMapMemory(), vmaUnmapMemory(). They are safer and more convenient to use than standard Vulkan functions. You can map an allocation multiple times simultaneously - mapping is reference-counted internally. You can also map different allocations simultaneously regardless of whether they use the same `VkDeviceMemory` block. The way it is implemented is that the library always maps entire memory block, not just region of the allocation. For further details, see description of vmaMapMemory() function. Example: \code // Having these objects initialized: struct ConstantBuffer { ... }; ConstantBuffer constantBufferData = ... VmaAllocator allocator = ... VkBuffer constantBuffer = ... VmaAllocation constantBufferAllocation = ... // You can map and fill your buffer using following code: void* mappedData; vmaMapMemory(allocator, constantBufferAllocation, &mappedData); memcpy(mappedData, &constantBufferData, sizeof(constantBufferData)); vmaUnmapMemory(allocator, constantBufferAllocation); \endcode When mapping, you may see a warning from Vulkan validation layer similar to this one: Mapping an image with layout VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL can result in undefined behavior if this memory is used by the device. Only GENERAL or PREINITIALIZED should be used. It happens because the library maps entire `VkDeviceMemory` block, where different types of images and buffers may end up together, especially on GPUs with unified memory like Intel. You can safely ignore it if you are sure you access only memory of the intended object that you wanted to map. \section memory_mapping_persistently_mapped_memory Persistently mapped memory Keeping your memory persistently mapped is generally OK in Vulkan. You don't need to unmap it before using its data on the GPU. The library provides a special feature designed for that: Allocations made with #VMA_ALLOCATION_CREATE_MAPPED_BIT flag set in VmaAllocationCreateInfo::flags stay mapped all the time, so you can just access CPU pointer to it any time without a need to call any "map" or "unmap" function. Example: \code VkBufferCreateInfo bufCreateInfo = { VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO }; bufCreateInfo.size = sizeof(ConstantBuffer); bufCreateInfo.usage = VK_BUFFER_USAGE_TRANSFER_SRC_BIT; VmaAllocationCreateInfo allocCreateInfo = {}; allocCreateInfo.usage = VMA_MEMORY_USAGE_AUTO; allocCreateInfo.flags = VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT | VMA_ALLOCATION_CREATE_MAPPED_BIT; VkBuffer buf; VmaAllocation alloc; VmaAllocationInfo allocInfo; vmaCreateBuffer(allocator, &bufCreateInfo, &allocCreateInfo, &buf, &alloc, &allocInfo); // Buffer is already mapped. You can access its memory. memcpy(allocInfo.pMappedData, &constantBufferData, sizeof(constantBufferData)); \endcode \note #VMA_ALLOCATION_CREATE_MAPPED_BIT by itself doesn't guarantee that the allocation will end up in a mappable memory type. For this, you need to also specify #VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT or #VMA_ALLOCATION_CREATE_HOST_ACCESS_RANDOM_BIT. #VMA_ALLOCATION_CREATE_MAPPED_BIT only guarantees that if the memory is `HOST_VISIBLE`, the allocation will be mapped on creation. For an example of how to make use of this fact, see section \ref usage_patterns_advanced_data_uploading. \section memory_mapping_cache_control Cache flush and invalidate Memory in Vulkan doesn't need to be unmapped before using it on GPU, but unless a memory types has `VK_MEMORY_PROPERTY_HOST_COHERENT_BIT` flag set, you need to manually **invalidate** cache before reading of mapped pointer and **flush** cache after writing to mapped pointer. Map/unmap operations don't do that automatically. Vulkan provides following functions for this purpose `vkFlushMappedMemoryRanges()`, `vkInvalidateMappedMemoryRanges()`, but this library provides more convenient functions that refer to given allocation object: vmaFlushAllocation(), vmaInvalidateAllocation(), or multiple objects at once: vmaFlushAllocations(), vmaInvalidateAllocations(). Regions of memory specified for flush/invalidate must be aligned to `VkPhysicalDeviceLimits::nonCoherentAtomSize`. This is automatically ensured by the library. In any memory type that is `HOST_VISIBLE` but not `HOST_COHERENT`, all allocations within blocks are aligned to this value, so their offsets are always multiply of `nonCoherentAtomSize` and two different allocations never share same "line" of this size. Also, Windows drivers from all 3 PC GPU vendors (AMD, Intel, NVIDIA) currently provide `HOST_COHERENT` flag on all memory types that are `HOST_VISIBLE`, so on PC you may not need to bother. \page staying_within_budget Staying within budget When developing a graphics-intensive game or program, it is important to avoid allocating more GPU memory than it is physically available. When the memory is over-committed, various bad things can happen, depending on the specific GPU, graphics driver, and operating system: - It may just work without any problems. - The application may slow down because some memory blocks are moved to system RAM and the GPU has to access them through PCI Express bus. - A new allocation may take very long time to complete, even few seconds, and possibly freeze entire system. - The new allocation may fail with `VK_ERROR_OUT_OF_DEVICE_MEMORY`. - It may even result in GPU crash (TDR), observed as `VK_ERROR_DEVICE_LOST` returned somewhere later. \section staying_within_budget_querying_for_budget Querying for budget To query for current memory usage and available budget, use function vmaGetHeapBudgets(). Returned structure #VmaBudget contains quantities expressed in bytes, per Vulkan memory heap. Please note that this function returns different information and works faster than vmaCalculateStatistics(). vmaGetHeapBudgets() can be called every frame or even before every allocation, while vmaCalculateStatistics() is intended to be used rarely, only to obtain statistical information, e.g. for debugging purposes. It is recommended to use VK_EXT_memory_budget device extension to obtain information about the budget from Vulkan device. VMA is able to use this extension automatically. When not enabled, the allocator behaves same way, but then it estimates current usage and available budget based on its internal information and Vulkan memory heap sizes, which may be less precise. In order to use this extension: 1. Make sure extensions VK_EXT_memory_budget and VK_KHR_get_physical_device_properties2 required by it are available and enable them. Please note that the first is a device extension and the second is instance extension! 2. Use flag #VMA_ALLOCATOR_CREATE_EXT_MEMORY_BUDGET_BIT when creating #VmaAllocator object. 3. Make sure to call vmaSetCurrentFrameIndex() every frame. Budget is queried from Vulkan inside of it to avoid overhead of querying it with every allocation. \section staying_within_budget_controlling_memory_usage Controlling memory usage There are many ways in which you can try to stay within the budget. First, when making new allocation requires allocating a new memory block, the library tries not to exceed the budget automatically. If a block with default recommended size (e.g. 256 MB) would go over budget, a smaller block is allocated, possibly even dedicated memory for just this resource. If the size of the requested resource plus current memory usage is more than the budget, by default the library still tries to create it, leaving it to the Vulkan implementation whether the allocation succeeds or fails. You can change this behavior by using #VMA_ALLOCATION_CREATE_WITHIN_BUDGET_BIT flag. With it, the allocation is not made if it would exceed the budget or if the budget is already exceeded. VMA then tries to make the allocation from the next eligible Vulkan memory type. If all of them fail, the call then fails with `VK_ERROR_OUT_OF_DEVICE_MEMORY`. Example usage pattern may be to pass the #VMA_ALLOCATION_CREATE_WITHIN_BUDGET_BIT flag when creating resources that are not essential for the application (e.g. the texture of a specific object) and not to pass it when creating critically important resources (e.g. render targets). On AMD graphics cards there is a custom vendor extension available: VK_AMD_memory_overallocation_behavior that allows to control the behavior of the Vulkan implementation in out-of-memory cases - whether it should fail with an error code or still allow the allocation. Usage of this extension involves only passing extra structure on Vulkan device creation, so it is out of scope of this library. Finally, you can also use #VMA_ALLOCATION_CREATE_NEVER_ALLOCATE_BIT flag to make sure a new allocation is created only when it fits inside one of the existing memory blocks. If it would require to allocate a new block, if fails instead with `VK_ERROR_OUT_OF_DEVICE_MEMORY`. This also ensures that the function call is very fast because it never goes to Vulkan to obtain a new block. \note Creating \ref custom_memory_pools with VmaPoolCreateInfo::minBlockCount set to more than 0 will currently try to allocate memory blocks without checking whether they fit within budget. \page resource_aliasing Resource aliasing (overlap) New explicit graphics APIs (Vulkan and Direct3D 12), thanks to manual memory management, give an opportunity to alias (overlap) multiple resources in the same region of memory - a feature not available in the old APIs (Direct3D 11, OpenGL). It can be useful to save video memory, but it must be used with caution. For example, if you know the flow of your whole render frame in advance, you are going to use some intermediate textures or buffers only during a small range of render passes, and you know these ranges don't overlap in time, you can bind these resources to the same place in memory, even if they have completely different parameters (width, height, format etc.). ![Resource aliasing (overlap)](../gfx/Aliasing.png) Such scenario is possible using VMA, but you need to create your images manually. Then you need to calculate parameters of an allocation to be made using formula: - allocation size = max(size of each image) - allocation alignment = max(alignment of each image) - allocation memoryTypeBits = bitwise AND(memoryTypeBits of each image) Following example shows two different images bound to the same place in memory, allocated to fit largest of them. \code // A 512x512 texture to be sampled. VkImageCreateInfo img1CreateInfo = { VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO }; img1CreateInfo.imageType = VK_IMAGE_TYPE_2D; img1CreateInfo.extent.width = 512; img1CreateInfo.extent.height = 512; img1CreateInfo.extent.depth = 1; img1CreateInfo.mipLevels = 10; img1CreateInfo.arrayLayers = 1; img1CreateInfo.format = VK_FORMAT_R8G8B8A8_SRGB; img1CreateInfo.tiling = VK_IMAGE_TILING_OPTIMAL; img1CreateInfo.initialLayout = VK_IMAGE_LAYOUT_UNDEFINED; img1CreateInfo.usage = VK_IMAGE_USAGE_TRANSFER_DST_BIT | VK_IMAGE_USAGE_SAMPLED_BIT; img1CreateInfo.samples = VK_SAMPLE_COUNT_1_BIT; // A full screen texture to be used as color attachment. VkImageCreateInfo img2CreateInfo = { VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO }; img2CreateInfo.imageType = VK_IMAGE_TYPE_2D; img2CreateInfo.extent.width = 1920; img2CreateInfo.extent.height = 1080; img2CreateInfo.extent.depth = 1; img2CreateInfo.mipLevels = 1; img2CreateInfo.arrayLayers = 1; img2CreateInfo.format = VK_FORMAT_R8G8B8A8_UNORM; img2CreateInfo.tiling = VK_IMAGE_TILING_OPTIMAL; img2CreateInfo.initialLayout = VK_IMAGE_LAYOUT_UNDEFINED; img2CreateInfo.usage = VK_IMAGE_USAGE_SAMPLED_BIT | VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT; img2CreateInfo.samples = VK_SAMPLE_COUNT_1_BIT; VkImage img1; res = vkCreateImage(device, &img1CreateInfo, nullptr, &img1); VkImage img2; res = vkCreateImage(device, &img2CreateInfo, nullptr, &img2); VkMemoryRequirements img1MemReq; vkGetImageMemoryRequirements(device, img1, &img1MemReq); VkMemoryRequirements img2MemReq; vkGetImageMemoryRequirements(device, img2, &img2MemReq); VkMemoryRequirements finalMemReq = {}; finalMemReq.size = std::max(img1MemReq.size, img2MemReq.size); finalMemReq.alignment = std::max(img1MemReq.alignment, img2MemReq.alignment); finalMemReq.memoryTypeBits = img1MemReq.memoryTypeBits & img2MemReq.memoryTypeBits; // Validate if(finalMemReq.memoryTypeBits != 0) VmaAllocationCreateInfo allocCreateInfo = {}; allocCreateInfo.preferredFlags = VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT; VmaAllocation alloc; res = vmaAllocateMemory(allocator, &finalMemReq, &allocCreateInfo, &alloc, nullptr); res = vmaBindImageMemory(allocator, alloc, img1); res = vmaBindImageMemory(allocator, alloc, img2); // You can use img1, img2 here, but not at the same time! vmaFreeMemory(allocator, alloc); vkDestroyImage(allocator, img2, nullptr); vkDestroyImage(allocator, img1, nullptr); \endcode VMA also provides convenience functions that create a buffer or image and bind it to memory represented by an existing #VmaAllocation: vmaCreateAliasingBuffer(), vmaCreateAliasingBuffer2(), vmaCreateAliasingImage(), vmaCreateAliasingImage2(). Versions with "2" offer additional parameter `allocationLocalOffset`. Remember that using resources that alias in memory requires proper synchronization. You need to issue a memory barrier to make sure commands that use `img1` and `img2` don't overlap on GPU timeline. You also need to treat a resource after aliasing as uninitialized - containing garbage data. For example, if you use `img1` and then want to use `img2`, you need to issue an image memory barrier for `img2` with `oldLayout` = `VK_IMAGE_LAYOUT_UNDEFINED`. Additional considerations: - Vulkan also allows to interpret contents of memory between aliasing resources consistently in some cases. See chapter 11.8. "Memory Aliasing" of Vulkan specification or `VK_IMAGE_CREATE_ALIAS_BIT` flag. - You can create more complex layout where different images and buffers are bound at different offsets inside one large allocation. For example, one can imagine a big texture used in some render passes, aliasing with a set of many small buffers used between in some further passes. To bind a resource at non-zero offset in an allocation, use vmaBindBufferMemory2() / vmaBindImageMemory2(). - Before allocating memory for the resources you want to alias, check `memoryTypeBits` returned in memory requirements of each resource to make sure the bits overlap. Some GPUs may expose multiple memory types suitable e.g. only for buffers or images with `COLOR_ATTACHMENT` usage, so the sets of memory types supported by your resources may be disjoint. Aliasing them is not possible in that case. \page custom_memory_pools Custom memory pools A memory pool contains a number of `VkDeviceMemory` blocks. The library automatically creates and manages default pool for each memory type available on the device. Default memory pool automatically grows in size. Size of allocated blocks is also variable and managed automatically. You are using default pools whenever you leave VmaAllocationCreateInfo::pool = null. You can create custom pool and allocate memory out of it. It can be useful if you want to: - Keep certain kind of allocations separate from others. - Enforce particular, fixed size of Vulkan memory blocks. - Limit maximum amount of Vulkan memory allocated for that pool. - Reserve minimum or fixed amount of Vulkan memory always preallocated for that pool. - Use extra parameters for a set of your allocations that are available in #VmaPoolCreateInfo but not in #VmaAllocationCreateInfo - e.g., custom minimum alignment, custom `pNext` chain. - Perform defragmentation on a specific subset of your allocations. To use custom memory pools: -# Fill VmaPoolCreateInfo structure. -# Call vmaCreatePool() to obtain #VmaPool handle. -# When making an allocation, set VmaAllocationCreateInfo::pool to this handle. You don't need to specify any other parameters of this structure, like `usage`. Example: \code // Find memoryTypeIndex for the pool. VkBufferCreateInfo sampleBufCreateInfo = { VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO }; sampleBufCreateInfo.size = 0x10000; // Doesn't matter. sampleBufCreateInfo.usage = VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT; VmaAllocationCreateInfo sampleAllocCreateInfo = {}; sampleAllocCreateInfo.usage = VMA_MEMORY_USAGE_AUTO; uint32_t memTypeIndex; VkResult res = vmaFindMemoryTypeIndexForBufferInfo(allocator, &sampleBufCreateInfo, &sampleAllocCreateInfo, &memTypeIndex); // Check res... // Create a pool that can have at most 2 blocks, 128 MiB each. VmaPoolCreateInfo poolCreateInfo = {}; poolCreateInfo.memoryTypeIndex = memTypeIndex; poolCreateInfo.blockSize = 128ull * 1024 * 1024; poolCreateInfo.maxBlockCount = 2; VmaPool pool; res = vmaCreatePool(allocator, &poolCreateInfo, &pool); // Check res... // Allocate a buffer out of it. VkBufferCreateInfo bufCreateInfo = { VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO }; bufCreateInfo.size = 1024; bufCreateInfo.usage = VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT; VmaAllocationCreateInfo allocCreateInfo = {}; allocCreateInfo.pool = pool; VkBuffer buf; VmaAllocation alloc; res = vmaCreateBuffer(allocator, &bufCreateInfo, &allocCreateInfo, &buf, &alloc, nullptr); // Check res... \endcode You have to free all allocations made from this pool before destroying it. \code vmaDestroyBuffer(allocator, buf, alloc); vmaDestroyPool(allocator, pool); \endcode New versions of this library support creating dedicated allocations in custom pools. It is supported only when VmaPoolCreateInfo::blockSize = 0. To use this feature, set VmaAllocationCreateInfo::pool to the pointer to your custom pool and VmaAllocationCreateInfo::flags to #VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT. \section custom_memory_pools_MemTypeIndex Choosing memory type index When creating a pool, you must explicitly specify memory type index. To find the one suitable for your buffers or images, you can use helper functions vmaFindMemoryTypeIndexForBufferInfo(), vmaFindMemoryTypeIndexForImageInfo(). You need to provide structures with example parameters of buffers or images that you are going to create in that pool. \code VkBufferCreateInfo exampleBufCreateInfo = { VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO }; exampleBufCreateInfo.size = 1024; // Doesn't matter exampleBufCreateInfo.usage = VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT; VmaAllocationCreateInfo allocCreateInfo = {}; allocCreateInfo.usage = VMA_MEMORY_USAGE_AUTO; uint32_t memTypeIndex; vmaFindMemoryTypeIndexForBufferInfo(allocator, &exampleBufCreateInfo, &allocCreateInfo, &memTypeIndex); VmaPoolCreateInfo poolCreateInfo = {}; poolCreateInfo.memoryTypeIndex = memTypeIndex; // ... \endcode When creating buffers/images allocated in that pool, provide following parameters: - `VkBufferCreateInfo`: Prefer to pass same parameters as above. Otherwise you risk creating resources in a memory type that is not suitable for them, which may result in undefined behavior. Using different `VK_BUFFER_USAGE_` flags may work, but you shouldn't create images in a pool intended for buffers or the other way around. - VmaAllocationCreateInfo: You don't need to pass same parameters. Fill only `pool` member. Other members are ignored anyway. \section custom_memory_pools_when_not_use When not to use custom pools Custom pools are commonly overused by VMA users. While it may feel natural to keep some logical groups of resources separate in memory, in most cases it does more harm than good. Using custom pool shouldn't be your first choice. Instead, please make all allocations from default pools first and only use custom pools if you can prove and measure that it is beneficial in some way, e.g. it results in lower memory usage, better performance, etc. Using custom pools has disadvantages: - Each pool has its own collection of `VkDeviceMemory` blocks. Some of them may be partially or even completely empty. Spreading allocations across multiple pools increases the amount of wasted (allocated but unbound) memory. - You must manually choose specific memory type to be used by a custom pool (set as VmaPoolCreateInfo::memoryTypeIndex). When using default pools, best memory type for each of your allocations can be selected automatically using a carefully design algorithm that works across all kinds of GPUs. - If an allocation from a custom pool at specific memory type fails, entire allocation operation returns failure. When using default pools, VMA tries another compatible memory type. - If you set VmaPoolCreateInfo::blockSize != 0, each memory block has the same size, while default pools start from small blocks and only allocate next blocks larger and larger up to the preferred block size. Many of the common concerns can be addressed in a different way than using custom pools: - If you want to keep your allocations of certain size (small versus large) or certain lifetime (transient versus long lived) separate, you likely don't need to. VMA uses a high quality allocation algorithm that manages memory well in various cases. Please measure and check if using custom pools provides a benefit. - If you want to keep your images and buffers separate, you don't need to. VMA respects `bufferImageGranularity` limit automatically. - If you want to keep your mapped and not mapped allocations separate, you don't need to. VMA respects `nonCoherentAtomSize` limit automatically. It also maps only those `VkDeviceMemory` blocks that need to map any allocation. It even tries to keep mappable and non-mappable allocations in separate blocks to minimize the amount of mapped memory. - If you want to choose a custom size for the default memory block, you can set it globally instead using VmaAllocatorCreateInfo::preferredLargeHeapBlockSize. - If you want to select specific memory type for your allocation, you can set VmaAllocationCreateInfo::memoryTypeBits to `(1u << myMemoryTypeIndex)` instead. - If you need to create a buffer with certain minimum alignment, you can still do it using default pools with dedicated function vmaCreateBufferWithAlignment(). \section linear_algorithm Linear allocation algorithm Each Vulkan memory block managed by this library has accompanying metadata that keeps track of used and unused regions. By default, the metadata structure and algorithm tries to find best place for new allocations among free regions to optimize memory usage. This way you can allocate and free objects in any order. ![Default allocation algorithm](../gfx/Linear_allocator_1_algo_default.png) Sometimes there is a need to use simpler, linear allocation algorithm. You can create custom pool that uses such algorithm by adding flag #VMA_POOL_CREATE_LINEAR_ALGORITHM_BIT to VmaPoolCreateInfo::flags while creating #VmaPool object. Then an alternative metadata management is used. It always creates new allocations after last one and doesn't reuse free regions after allocations freed in the middle. It results in better allocation performance and less memory consumed by metadata. ![Linear allocation algorithm](../gfx/Linear_allocator_2_algo_linear.png) With this one flag, you can create a custom pool that can be used in many ways: free-at-once, stack, double stack, and ring buffer. See below for details. You don't need to specify explicitly which of these options you are going to use - it is detected automatically. \subsection linear_algorithm_free_at_once Free-at-once In a pool that uses linear algorithm, you still need to free all the allocations individually, e.g. by using vmaFreeMemory() or vmaDestroyBuffer(). You can free them in any order. New allocations are always made after last one - free space in the middle is not reused. However, when you release all the allocation and the pool becomes empty, allocation starts from the beginning again. This way you can use linear algorithm to speed up creation of allocations that you are going to release all at once. ![Free-at-once](../gfx/Linear_allocator_3_free_at_once.png) This mode is also available for pools created with VmaPoolCreateInfo::maxBlockCount value that allows multiple memory blocks. \subsection linear_algorithm_stack Stack When you free an allocation that was created last, its space can be reused. Thanks to this, if you always release allocations in the order opposite to their creation (LIFO - Last In First Out), you can achieve behavior of a stack. ![Stack](../gfx/Linear_allocator_4_stack.png) This mode is also available for pools created with VmaPoolCreateInfo::maxBlockCount value that allows multiple memory blocks. \subsection linear_algorithm_double_stack Double stack The space reserved by a custom pool with linear algorithm may be used by two stacks: - First, default one, growing up from offset 0. - Second, "upper" one, growing down from the end towards lower offsets. To make allocation from the upper stack, add flag #VMA_ALLOCATION_CREATE_UPPER_ADDRESS_BIT to VmaAllocationCreateInfo::flags. ![Double stack](../gfx/Linear_allocator_7_double_stack.png) Double stack is available only in pools with one memory block - VmaPoolCreateInfo::maxBlockCount must be 1. Otherwise behavior is undefined. When the two stacks' ends meet so there is not enough space between them for a new allocation, such allocation fails with usual `VK_ERROR_OUT_OF_DEVICE_MEMORY` error. \subsection linear_algorithm_ring_buffer Ring buffer When you free some allocations from the beginning and there is not enough free space for a new one at the end of a pool, allocator's "cursor" wraps around to the beginning and starts allocation there. Thanks to this, if you always release allocations in the same order as you created them (FIFO - First In First Out), you can achieve behavior of a ring buffer / queue. ![Ring buffer](../gfx/Linear_allocator_5_ring_buffer.png) Ring buffer is available only in pools with one memory block - VmaPoolCreateInfo::maxBlockCount must be 1. Otherwise behavior is undefined. \note \ref defragmentation is not supported in custom pools created with #VMA_POOL_CREATE_LINEAR_ALGORITHM_BIT. \page defragmentation Defragmentation Interleaved allocations and deallocations of many objects of varying size can cause fragmentation over time, which can lead to a situation where the library is unable to find a continuous range of free memory for a new allocation despite there is enough free space, just scattered across many small free ranges between existing allocations. To mitigate this problem, you can use defragmentation feature. It doesn't happen automatically though and needs your cooperation, because VMA is a low level library that only allocates memory. It cannot recreate buffers and images in a new place as it doesn't remember the contents of `VkBufferCreateInfo` / `VkImageCreateInfo` structures. It cannot copy their contents as it doesn't record any commands to a command buffer. Example: \code VmaDefragmentationInfo defragInfo = {}; defragInfo.pool = myPool; defragInfo.flags = VMA_DEFRAGMENTATION_FLAG_ALGORITHM_FAST_BIT; VmaDefragmentationContext defragCtx; VkResult res = vmaBeginDefragmentation(allocator, &defragInfo, &defragCtx); // Check res... for(;;) { VmaDefragmentationPassMoveInfo pass; res = vmaBeginDefragmentationPass(allocator, defragCtx, &pass); if(res == VK_SUCCESS) break; else if(res != VK_INCOMPLETE) // Handle error... for(uint32_t i = 0; i < pass.moveCount; ++i) { // Inspect pass.pMoves[i].srcAllocation, identify what buffer/image it represents. VmaAllocationInfo allocInfo; vmaGetAllocationInfo(allocator, pass.pMoves[i].srcAllocation, &allocInfo); MyEngineResourceData* resData = (MyEngineResourceData*)allocInfo.pUserData; // Recreate and bind this buffer/image at: pass.pMoves[i].dstMemory, pass.pMoves[i].dstOffset. VkImageCreateInfo imgCreateInfo = ... VkImage newImg; res = vkCreateImage(device, &imgCreateInfo, nullptr, &newImg); // Check res... res = vmaBindImageMemory(allocator, pass.pMoves[i].dstTmpAllocation, newImg); // Check res... // Issue a vkCmdCopyBuffer/vkCmdCopyImage to copy its content to the new place. vkCmdCopyImage(cmdBuf, resData->img, ..., newImg, ...); } // Make sure the copy commands finished executing. vkWaitForFences(...); // Destroy old buffers/images bound with pass.pMoves[i].srcAllocation. for(uint32_t i = 0; i < pass.moveCount; ++i) { // ... vkDestroyImage(device, resData->img, nullptr); } // Update appropriate descriptors to point to the new places... res = vmaEndDefragmentationPass(allocator, defragCtx, &pass); if(res == VK_SUCCESS) break; else if(res != VK_INCOMPLETE) // Handle error... } vmaEndDefragmentation(allocator, defragCtx, nullptr); \endcode Although functions like vmaCreateBuffer(), vmaCreateImage(), vmaDestroyBuffer(), vmaDestroyImage() create/destroy an allocation and a buffer/image at once, these are just a shortcut for creating the resource, allocating memory, and binding them together. Defragmentation works on memory allocations only. You must handle the rest manually. Defragmentation is an iterative process that should repreat "passes" as long as related functions return `VK_INCOMPLETE` not `VK_SUCCESS`. In each pass: 1. vmaBeginDefragmentationPass() function call: - Calculates and returns the list of allocations to be moved in this pass. Note this can be a time-consuming process. - Reserves destination memory for them by creating temporary destination allocations that you can query for their `VkDeviceMemory` + offset using vmaGetAllocationInfo(). 2. Inside the pass, **you should**: - Inspect the returned list of allocations to be moved. - Create new buffers/images and bind them at the returned destination temporary allocations. - Copy data from source to destination resources if necessary. - Destroy the source buffers/images, but NOT their allocations. 3. vmaEndDefragmentationPass() function call: - Frees the source memory reserved for the allocations that are moved. - Modifies source #VmaAllocation objects that are moved to point to the destination reserved memory. - Frees `VkDeviceMemory` blocks that became empty. Unlike in previous iterations of the defragmentation API, there is no list of "movable" allocations passed as a parameter. Defragmentation algorithm tries to move all suitable allocations. You can, however, refuse to move some of them inside a defragmentation pass, by setting `pass.pMoves[i].operation` to #VMA_DEFRAGMENTATION_MOVE_OPERATION_IGNORE. This is not recommended and may result in suboptimal packing of the allocations after defragmentation. If you cannot ensure any allocation can be moved, it is better to keep movable allocations separate in a custom pool. Inside a pass, for each allocation that should be moved: - You should copy its data from the source to the destination place by calling e.g. `vkCmdCopyBuffer()`, `vkCmdCopyImage()`. - You need to make sure these commands finished executing before destroying the source buffers/images and before calling vmaEndDefragmentationPass(). - If a resource doesn't contain any meaningful data, e.g. it is a transient color attachment image to be cleared, filled, and used temporarily in each rendering frame, you can just recreate this image without copying its data. - If the resource is in `HOST_VISIBLE` and `HOST_CACHED` memory, you can copy its data on the CPU using `memcpy()`. - If you cannot move the allocation, you can set `pass.pMoves[i].operation` to #VMA_DEFRAGMENTATION_MOVE_OPERATION_IGNORE. This will cancel the move. - vmaEndDefragmentationPass() will then free the destination memory not the source memory of the allocation, leaving it unchanged. - If you decide the allocation is unimportant and can be destroyed instead of moved (e.g. it wasn't used for long time), you can set `pass.pMoves[i].operation` to #VMA_DEFRAGMENTATION_MOVE_OPERATION_DESTROY. - vmaEndDefragmentationPass() will then free both source and destination memory, and will destroy the source #VmaAllocation object. You can defragment a specific custom pool by setting VmaDefragmentationInfo::pool (like in the example above) or all the default pools by setting this member to null. Defragmentation is always performed in each pool separately. Allocations are never moved between different Vulkan memory types. The size of the destination memory reserved for a moved allocation is the same as the original one. Alignment of an allocation as it was determined using `vkGetBufferMemoryRequirements()` etc. is also respected after defragmentation. Buffers/images should be recreated with the same `VkBufferCreateInfo` / `VkImageCreateInfo` parameters as the original ones. You can perform the defragmentation incrementally to limit the number of allocations and bytes to be moved in each pass, e.g. to call it in sync with render frames and not to experience too big hitches. See members: VmaDefragmentationInfo::maxBytesPerPass, VmaDefragmentationInfo::maxAllocationsPerPass. It is also safe to perform the defragmentation asynchronously to render frames and other Vulkan and VMA usage, possibly from multiple threads, with the exception that allocations returned in VmaDefragmentationPassMoveInfo::pMoves shouldn't be destroyed until the defragmentation pass is ended. Mapping is preserved on allocations that are moved during defragmentation. Whether through #VMA_ALLOCATION_CREATE_MAPPED_BIT or vmaMapMemory(), the allocations are mapped at their new place. Of course, pointer to the mapped data changes, so it needs to be queried using VmaAllocationInfo::pMappedData. \note Defragmentation is not supported in custom pools created with #VMA_POOL_CREATE_LINEAR_ALGORITHM_BIT. \page statistics Statistics This library contains several functions that return information about its internal state, especially the amount of memory allocated from Vulkan. \section statistics_numeric_statistics Numeric statistics If you need to obtain basic statistics about memory usage per heap, together with current budget, you can call function vmaGetHeapBudgets() and inspect structure #VmaBudget. This is useful to keep track of memory usage and stay within budget (see also \ref staying_within_budget). Example: \code uint32_t heapIndex = ... VmaBudget budgets[VK_MAX_MEMORY_HEAPS]; vmaGetHeapBudgets(allocator, budgets); printf("My heap currently has %u allocations taking %llu B,\n", budgets[heapIndex].statistics.allocationCount, budgets[heapIndex].statistics.allocationBytes); printf("allocated out of %u Vulkan device memory blocks taking %llu B,\n", budgets[heapIndex].statistics.blockCount, budgets[heapIndex].statistics.blockBytes); printf("Vulkan reports total usage %llu B with budget %llu B.\n", budgets[heapIndex].usage, budgets[heapIndex].budget); \endcode You can query for more detailed statistics per memory heap, type, and totals, including minimum and maximum allocation size and unused range size, by calling function vmaCalculateStatistics() and inspecting structure #VmaTotalStatistics. This function is slower though, as it has to traverse all the internal data structures, so it should be used only for debugging purposes. You can query for statistics of a custom pool using function vmaGetPoolStatistics() or vmaCalculatePoolStatistics(). You can query for information about a specific allocation using function vmaGetAllocationInfo(). It fill structure #VmaAllocationInfo. \section statistics_json_dump JSON dump You can dump internal state of the allocator to a string in JSON format using function vmaBuildStatsString(). The result is guaranteed to be correct JSON. It uses ANSI encoding. Any strings provided by user (see [Allocation names](@ref allocation_names)) are copied as-is and properly escaped for JSON, so if they use UTF-8, ISO-8859-2 or any other encoding, this JSON string can be treated as using this encoding. It must be freed using function vmaFreeStatsString(). The format of this JSON string is not part of official documentation of the library, but it will not change in backward-incompatible way without increasing library major version number and appropriate mention in changelog. The JSON string contains all the data that can be obtained using vmaCalculateStatistics(). It can also contain detailed map of allocated memory blocks and their regions - free and occupied by allocations. This allows e.g. to visualize the memory or assess fragmentation. \page allocation_annotation Allocation names and user data \section allocation_user_data Allocation user data You can annotate allocations with your own information, e.g. for debugging purposes. To do that, fill VmaAllocationCreateInfo::pUserData field when creating an allocation. It is an opaque `void*` pointer. You can use it e.g. as a pointer, some handle, index, key, ordinal number or any other value that would associate the allocation with your custom metadata. It is useful to identify appropriate data structures in your engine given #VmaAllocation, e.g. when doing \ref defragmentation. \code VkBufferCreateInfo bufCreateInfo = ... MyBufferMetadata* pMetadata = CreateBufferMetadata(); VmaAllocationCreateInfo allocCreateInfo = {}; allocCreateInfo.usage = VMA_MEMORY_USAGE_AUTO; allocCreateInfo.pUserData = pMetadata; VkBuffer buffer; VmaAllocation allocation; vmaCreateBuffer(allocator, &bufCreateInfo, &allocCreateInfo, &buffer, &allocation, nullptr); \endcode The pointer may be later retrieved as VmaAllocationInfo::pUserData: \code VmaAllocationInfo allocInfo; vmaGetAllocationInfo(allocator, allocation, &allocInfo); MyBufferMetadata* pMetadata = (MyBufferMetadata*)allocInfo.pUserData; \endcode It can also be changed using function vmaSetAllocationUserData(). Values of (non-zero) allocations' `pUserData` are printed in JSON report created by vmaBuildStatsString() in hexadecimal form. \section allocation_names Allocation names An allocation can also carry a null-terminated string, giving a name to the allocation. To set it, call vmaSetAllocationName(). The library creates internal copy of the string, so the pointer you pass doesn't need to be valid for whole lifetime of the allocation. You can free it after the call. \code std::string imageName = "Texture: "; imageName += fileName; vmaSetAllocationName(allocator, allocation, imageName.c_str()); \endcode The string can be later retrieved by inspecting VmaAllocationInfo::pName. It is also printed in JSON report created by vmaBuildStatsString(). \note Setting string name to VMA allocation doesn't automatically set it to the Vulkan buffer or image created with it. You must do it manually using an extension like VK_EXT_debug_utils, which is independent of this library. \page virtual_allocator Virtual allocator As an extra feature, the core allocation algorithm of the library is exposed through a simple and convenient API of "virtual allocator". It doesn't allocate any real GPU memory. It just keeps track of used and free regions of a "virtual block". You can use it to allocate your own memory or other objects, even completely unrelated to Vulkan. A common use case is sub-allocation of pieces of one large GPU buffer. \section virtual_allocator_creating_virtual_block Creating virtual block To use this functionality, there is no main "allocator" object. You don't need to have #VmaAllocator object created. All you need to do is to create a separate #VmaVirtualBlock object for each block of memory you want to be managed by the allocator: -# Fill in #VmaVirtualBlockCreateInfo structure. -# Call vmaCreateVirtualBlock(). Get new #VmaVirtualBlock object. Example: \code VmaVirtualBlockCreateInfo blockCreateInfo = {}; blockCreateInfo.size = 1048576; // 1 MB VmaVirtualBlock block; VkResult res = vmaCreateVirtualBlock(&blockCreateInfo, &block); \endcode \section virtual_allocator_making_virtual_allocations Making virtual allocations #VmaVirtualBlock object contains internal data structure that keeps track of free and occupied regions using the same code as the main Vulkan memory allocator. Similarly to #VmaAllocation for standard GPU allocations, there is #VmaVirtualAllocation type that represents an opaque handle to an allocation within the virtual block. In order to make such allocation: -# Fill in #VmaVirtualAllocationCreateInfo structure. -# Call vmaVirtualAllocate(). Get new #VmaVirtualAllocation object that represents the allocation. You can also receive `VkDeviceSize offset` that was assigned to the allocation. Example: \code VmaVirtualAllocationCreateInfo allocCreateInfo = {}; allocCreateInfo.size = 4096; // 4 KB VmaVirtualAllocation alloc; VkDeviceSize offset; res = vmaVirtualAllocate(block, &allocCreateInfo, &alloc, &offset); if(res == VK_SUCCESS) { // Use the 4 KB of your memory starting at offset. } else { // Allocation failed - no space for it could be found. Handle this error! } \endcode \section virtual_allocator_deallocation Deallocation When no longer needed, an allocation can be freed by calling vmaVirtualFree(). You can only pass to this function an allocation that was previously returned by vmaVirtualAllocate() called for the same #VmaVirtualBlock. When whole block is no longer needed, the block object can be released by calling vmaDestroyVirtualBlock(). All allocations must be freed before the block is destroyed, which is checked internally by an assert. However, if you don't want to call vmaVirtualFree() for each allocation, you can use vmaClearVirtualBlock() to free them all at once - a feature not available in normal Vulkan memory allocator. Example: \code vmaVirtualFree(block, alloc); vmaDestroyVirtualBlock(block); \endcode \section virtual_allocator_allocation_parameters Allocation parameters You can attach a custom pointer to each allocation by using vmaSetVirtualAllocationUserData(). Its default value is null. It can be used to store any data that needs to be associated with that allocation - e.g. an index, a handle, or a pointer to some larger data structure containing more information. Example: \code struct CustomAllocData { std::string m_AllocName; }; CustomAllocData* allocData = new CustomAllocData(); allocData->m_AllocName = "My allocation 1"; vmaSetVirtualAllocationUserData(block, alloc, allocData); \endcode The pointer can later be fetched, along with allocation offset and size, by passing the allocation handle to function vmaGetVirtualAllocationInfo() and inspecting returned structure #VmaVirtualAllocationInfo. If you allocated a new object to be used as the custom pointer, don't forget to delete that object before freeing the allocation! Example: \code VmaVirtualAllocationInfo allocInfo; vmaGetVirtualAllocationInfo(block, alloc, &allocInfo); delete (CustomAllocData*)allocInfo.pUserData; vmaVirtualFree(block, alloc); \endcode \section virtual_allocator_alignment_and_units Alignment and units It feels natural to express sizes and offsets in bytes. If an offset of an allocation needs to be aligned to a multiply of some number (e.g. 4 bytes), you can fill optional member VmaVirtualAllocationCreateInfo::alignment to request it. Example: \code VmaVirtualAllocationCreateInfo allocCreateInfo = {}; allocCreateInfo.size = 4096; // 4 KB allocCreateInfo.alignment = 4; // Returned offset must be a multiply of 4 B VmaVirtualAllocation alloc; res = vmaVirtualAllocate(block, &allocCreateInfo, &alloc, nullptr); \endcode Alignments of different allocations made from one block may vary. However, if all alignments and sizes are always multiply of some size e.g. 4 B or `sizeof(MyDataStruct)`, you can express all sizes, alignments, and offsets in multiples of that size instead of individual bytes. It might be more convenient, but you need to make sure to use this new unit consistently in all the places: - VmaVirtualBlockCreateInfo::size - VmaVirtualAllocationCreateInfo::size and VmaVirtualAllocationCreateInfo::alignment - Using offset returned by vmaVirtualAllocate() or in VmaVirtualAllocationInfo::offset \section virtual_allocator_statistics Statistics You can obtain statistics of a virtual block using vmaGetVirtualBlockStatistics() (to get brief statistics that are fast to calculate) or vmaCalculateVirtualBlockStatistics() (to get more detailed statistics, slower to calculate). The functions fill structures #VmaStatistics, #VmaDetailedStatistics respectively - same as used by the normal Vulkan memory allocator. Example: \code VmaStatistics stats; vmaGetVirtualBlockStatistics(block, &stats); printf("My virtual block has %llu bytes used by %u virtual allocations\n", stats.allocationBytes, stats.allocationCount); \endcode You can also request a full list of allocations and free regions as a string in JSON format by calling vmaBuildVirtualBlockStatsString(). Returned string must be later freed using vmaFreeVirtualBlockStatsString(). The format of this string differs from the one returned by the main Vulkan allocator, but it is similar. \section virtual_allocator_additional_considerations Additional considerations The "virtual allocator" functionality is implemented on a level of individual memory blocks. Keeping track of a whole collection of blocks, allocating new ones when out of free space, deleting empty ones, and deciding which one to try first for a new allocation must be implemented by the user. Alternative allocation algorithms are supported, just like in custom pools of the real GPU memory. See enum #VmaVirtualBlockCreateFlagBits to learn how to specify them (e.g. #VMA_VIRTUAL_BLOCK_CREATE_LINEAR_ALGORITHM_BIT). You can find their description in chapter \ref custom_memory_pools. Allocation strategies are also supported. See enum #VmaVirtualAllocationCreateFlagBits to learn how to specify them (e.g. #VMA_VIRTUAL_ALLOCATION_CREATE_STRATEGY_MIN_TIME_BIT). Following features are supported only by the allocator of the real GPU memory and not by virtual allocations: buffer-image granularity, `VMA_DEBUG_MARGIN`, `VMA_MIN_ALIGNMENT`. \page debugging_memory_usage Debugging incorrect memory usage If you suspect a bug with memory usage, like usage of uninitialized memory or memory being overwritten out of bounds of an allocation, you can use debug features of this library to verify this. \section debugging_memory_usage_initialization Memory initialization If you experience a bug with incorrect and nondeterministic data in your program and you suspect uninitialized memory to be used, you can enable automatic memory initialization to verify this. To do it, define macro `VMA_DEBUG_INITIALIZE_ALLOCATIONS` to 1. \code #define VMA_DEBUG_INITIALIZE_ALLOCATIONS 1 #include "vk_mem_alloc.h" \endcode It makes memory of new allocations initialized to bit pattern `0xDCDCDCDC`. Before an allocation is destroyed, its memory is filled with bit pattern `0xEFEFEFEF`. Memory is automatically mapped and unmapped if necessary. If you find these values while debugging your program, good chances are that you incorrectly read Vulkan memory that is allocated but not initialized, or already freed, respectively. Memory initialization works only with memory types that are `HOST_VISIBLE` and with allocations that can be mapped. It works also with dedicated allocations. \section debugging_memory_usage_margins Margins By default, allocations are laid out in memory blocks next to each other if possible (considering required alignment, `bufferImageGranularity`, and `nonCoherentAtomSize`). ![Allocations without margin](../gfx/Margins_1.png) Define macro `VMA_DEBUG_MARGIN` to some non-zero value (e.g. 16) to enforce specified number of bytes as a margin after every allocation. \code #define VMA_DEBUG_MARGIN 16 #include "vk_mem_alloc.h" \endcode ![Allocations with margin](../gfx/Margins_2.png) If your bug goes away after enabling margins, it means it may be caused by memory being overwritten outside of allocation boundaries. It is not 100% certain though. Change in application behavior may also be caused by different order and distribution of allocations across memory blocks after margins are applied. Margins work with all types of memory. Margin is applied only to allocations made out of memory blocks and not to dedicated allocations, which have their own memory block of specific size. It is thus not applied to allocations made using #VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT flag or those automatically decided to put into dedicated allocations, e.g. due to its large size or recommended by VK_KHR_dedicated_allocation extension. Margins appear in [JSON dump](@ref statistics_json_dump) as part of free space. Note that enabling margins increases memory usage and fragmentation. Margins do not apply to \ref virtual_allocator. \section debugging_memory_usage_corruption_detection Corruption detection You can additionally define macro `VMA_DEBUG_DETECT_CORRUPTION` to 1 to enable validation of contents of the margins. \code #define VMA_DEBUG_MARGIN 16 #define VMA_DEBUG_DETECT_CORRUPTION 1 #include "vk_mem_alloc.h" \endcode When this feature is enabled, number of bytes specified as `VMA_DEBUG_MARGIN` (it must be multiply of 4) after every allocation is filled with a magic number. This idea is also know as "canary". Memory is automatically mapped and unmapped if necessary. This number is validated automatically when the allocation is destroyed. If it is not equal to the expected value, `VMA_ASSERT()` is executed. It clearly means that either CPU or GPU overwritten the memory outside of boundaries of the allocation, which indicates a serious bug. You can also explicitly request checking margins of all allocations in all memory blocks that belong to specified memory types by using function vmaCheckCorruption(), or in memory blocks that belong to specified custom pool, by using function vmaCheckPoolCorruption(). Margin validation (corruption detection) works only for memory types that are `HOST_VISIBLE` and `HOST_COHERENT`. \section debugging_memory_usage_leak_detection Leak detection features At allocation and allocator destruction time VMA checks for unfreed and unmapped blocks using `VMA_ASSERT_LEAK()`. This macro defaults to an assertion, triggering a typically fatal error in Debug builds, and doing nothing in Release builds. You can provide your own definition of `VMA_ASSERT_LEAK()` to change this behavior. At memory block destruction time VMA lists out all unfreed allocations using the `VMA_LEAK_LOG_FORMAT()` macro, which defaults to `VMA_DEBUG_LOG_FORMAT`, which in turn defaults to a no-op. If you're having trouble with leaks - for example, the aforementioned assertion triggers, but you don't quite know \em why -, overriding this macro to print out the the leaking blocks, combined with assigning individual names to allocations using vmaSetAllocationName(), can greatly aid in fixing them. \page other_api_interop Interop with other graphics APIs VMA provides some features that help with interoperability with other graphics APIs, e.g. OpenGL. \section opengl_interop_exporting_memory Exporting memory If you want to attach `VkExportMemoryAllocateInfoKHR` or other structure to `pNext` chain of memory allocations made by the library: You can create \ref custom_memory_pools for such allocations. Define and fill in your `VkExportMemoryAllocateInfoKHR` structure and attach it to VmaPoolCreateInfo::pMemoryAllocateNext while creating the custom pool. Please note that the structure must remain alive and unchanged for the whole lifetime of the #VmaPool, not only while creating it, as no copy of the structure is made, but its original pointer is used for each allocation instead. If you want to export all memory allocated by VMA from certain memory types, also dedicated allocations or other allocations made from default pools, an alternative solution is to fill in VmaAllocatorCreateInfo::pTypeExternalMemoryHandleTypes. It should point to an array with `VkExternalMemoryHandleTypeFlagsKHR` to be automatically passed by the library through `VkExportMemoryAllocateInfoKHR` on each allocation made from a specific memory type. Please note that new versions of the library also support dedicated allocations created in custom pools. You should not mix these two methods in a way that allows to apply both to the same memory type. Otherwise, `VkExportMemoryAllocateInfoKHR` structure would be attached twice to the `pNext` chain of `VkMemoryAllocateInfo`. \section opengl_interop_custom_alignment Custom alignment Buffers or images exported to a different API like OpenGL may require a different alignment, higher than the one used by the library automatically, queried from functions like `vkGetBufferMemoryRequirements`. To impose such alignment: You can create \ref custom_memory_pools for such allocations. Set VmaPoolCreateInfo::minAllocationAlignment member to the minimum alignment required for each allocation to be made out of this pool. The alignment actually used will be the maximum of this member and the alignment returned for the specific buffer or image from a function like `vkGetBufferMemoryRequirements`, which is called by VMA automatically. If you want to create a buffer with a specific minimum alignment out of default pools, use special function vmaCreateBufferWithAlignment(), which takes additional parameter `minAlignment`. Note the problem of alignment affects only resources placed inside bigger `VkDeviceMemory` blocks and not dedicated allocations, as these, by definition, always have alignment = 0 because the resource is bound to the beginning of its dedicated block. You can ensure that an allocation is created as dedicated by using #VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT. Contrary to Direct3D 12, Vulkan doesn't have a concept of alignment of the entire memory block passed on its allocation. \section opengl_interop_extended_allocation_information Extended allocation information If you want to rely on VMA to allocate your buffers and images inside larger memory blocks, but you need to know the size of the entire block and whether the allocation was made with its own dedicated memory, use function vmaGetAllocationInfo2() to retrieve extended allocation information in structure #VmaAllocationInfo2. \page usage_patterns Recommended usage patterns Vulkan gives great flexibility in memory allocation. This chapter shows the most common patterns. See also slides from talk: [Sawicki, Adam. Advanced Graphics Techniques Tutorial: Memory management in Vulkan and DX12. Game Developers Conference, 2018](https://www.gdcvault.com/play/1025458/Advanced-Graphics-Techniques-Tutorial-New) \section usage_patterns_gpu_only GPU-only resource When: Any resources that you frequently write and read on GPU, e.g. images used as color attachments (aka "render targets"), depth-stencil attachments, images/buffers used as storage image/buffer (aka "Unordered Access View (UAV)"). What to do: Let the library select the optimal memory type, which will likely have `VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT`. \code VkImageCreateInfo imgCreateInfo = { VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO }; imgCreateInfo.imageType = VK_IMAGE_TYPE_2D; imgCreateInfo.extent.width = 3840; imgCreateInfo.extent.height = 2160; imgCreateInfo.extent.depth = 1; imgCreateInfo.mipLevels = 1; imgCreateInfo.arrayLayers = 1; imgCreateInfo.format = VK_FORMAT_R8G8B8A8_UNORM; imgCreateInfo.tiling = VK_IMAGE_TILING_OPTIMAL; imgCreateInfo.initialLayout = VK_IMAGE_LAYOUT_UNDEFINED; imgCreateInfo.usage = VK_IMAGE_USAGE_SAMPLED_BIT | VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT; imgCreateInfo.samples = VK_SAMPLE_COUNT_1_BIT; VmaAllocationCreateInfo allocCreateInfo = {}; allocCreateInfo.usage = VMA_MEMORY_USAGE_AUTO; allocCreateInfo.flags = VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT; allocCreateInfo.priority = 1.0f; VkImage img; VmaAllocation alloc; vmaCreateImage(allocator, &imgCreateInfo, &allocCreateInfo, &img, &alloc, nullptr); \endcode Also consider: Consider creating them as dedicated allocations using #VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT, especially if they are large or if you plan to destroy and recreate them with different sizes e.g. when display resolution changes. Prefer to create such resources first and all other GPU resources (like textures and vertex buffers) later. When VK_EXT_memory_priority extension is enabled, it is also worth setting high priority to such allocation to decrease chances to be evicted to system memory by the operating system. \section usage_patterns_staging_copy_upload Staging copy for upload When: A "staging" buffer than you want to map and fill from CPU code, then use as a source of transfer to some GPU resource. What to do: Use flag #VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT. Let the library select the optimal memory type, which will always have `VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT`. \code VkBufferCreateInfo bufCreateInfo = { VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO }; bufCreateInfo.size = 65536; bufCreateInfo.usage = VK_BUFFER_USAGE_TRANSFER_SRC_BIT; VmaAllocationCreateInfo allocCreateInfo = {}; allocCreateInfo.usage = VMA_MEMORY_USAGE_AUTO; allocCreateInfo.flags = VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT | VMA_ALLOCATION_CREATE_MAPPED_BIT; VkBuffer buf; VmaAllocation alloc; VmaAllocationInfo allocInfo; vmaCreateBuffer(allocator, &bufCreateInfo, &allocCreateInfo, &buf, &alloc, &allocInfo); ... memcpy(allocInfo.pMappedData, myData, myDataSize); \endcode Also consider: You can map the allocation using vmaMapMemory() or you can create it as persistenly mapped using #VMA_ALLOCATION_CREATE_MAPPED_BIT, as in the example above. \section usage_patterns_readback Readback When: Buffers for data written by or transferred from the GPU that you want to read back on the CPU, e.g. results of some computations. What to do: Use flag #VMA_ALLOCATION_CREATE_HOST_ACCESS_RANDOM_BIT. Let the library select the optimal memory type, which will always have `VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT` and `VK_MEMORY_PROPERTY_HOST_CACHED_BIT`. \code VkBufferCreateInfo bufCreateInfo = { VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO }; bufCreateInfo.size = 65536; bufCreateInfo.usage = VK_BUFFER_USAGE_TRANSFER_DST_BIT; VmaAllocationCreateInfo allocCreateInfo = {}; allocCreateInfo.usage = VMA_MEMORY_USAGE_AUTO; allocCreateInfo.flags = VMA_ALLOCATION_CREATE_HOST_ACCESS_RANDOM_BIT | VMA_ALLOCATION_CREATE_MAPPED_BIT; VkBuffer buf; VmaAllocation alloc; VmaAllocationInfo allocInfo; vmaCreateBuffer(allocator, &bufCreateInfo, &allocCreateInfo, &buf, &alloc, &allocInfo); ... const float* downloadedData = (const float*)allocInfo.pMappedData; \endcode \section usage_patterns_advanced_data_uploading Advanced data uploading For resources that you frequently write on CPU via mapped pointer and frequently read on GPU e.g. as a uniform buffer (also called "dynamic"), multiple options are possible: -# Easiest solution is to have one copy of the resource in `HOST_VISIBLE` memory, even if it means system RAM (not `DEVICE_LOCAL`) on systems with a discrete graphics card, and make the device reach out to that resource directly. - Reads performed by the device will then go through PCI Express bus. The performance of this access may be limited, but it may be fine depending on the size of this resource (whether it is small enough to quickly end up in GPU cache) and the sparsity of access. -# On systems with unified memory (e.g. AMD APU or Intel integrated graphics, mobile chips), a memory type may be available that is both `HOST_VISIBLE` (available for mapping) and `DEVICE_LOCAL` (fast to access from the GPU). Then, it is likely the best choice for such type of resource. -# Systems with a discrete graphics card and separate video memory may or may not expose a memory type that is both `HOST_VISIBLE` and `DEVICE_LOCAL`, also known as Base Address Register (BAR). If they do, it represents a piece of VRAM (or entire VRAM, if ReBAR is enabled in the motherboard BIOS) that is available to CPU for mapping. - Writes performed by the host to that memory go through PCI Express bus. The performance of these writes may be limited, but it may be fine, especially on PCIe 4.0, as long as rules of using uncached and write-combined memory are followed - only sequential writes and no reads. -# Finally, you may need or prefer to create a separate copy of the resource in `DEVICE_LOCAL` memory, a separate "staging" copy in `HOST_VISIBLE` memory and perform an explicit transfer command between them. Thankfully, VMA offers an aid to create and use such resources in the the way optimal for the current Vulkan device. To help the library make the best choice, use flag #VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT together with #VMA_ALLOCATION_CREATE_HOST_ACCESS_ALLOW_TRANSFER_INSTEAD_BIT. It will then prefer a memory type that is both `DEVICE_LOCAL` and `HOST_VISIBLE` (integrated memory or BAR), but if no such memory type is available or allocation from it fails (PC graphics cards have only 256 MB of BAR by default, unless ReBAR is supported and enabled in BIOS), it will fall back to `DEVICE_LOCAL` memory for fast GPU access. It is then up to you to detect that the allocation ended up in a memory type that is not `HOST_VISIBLE`, so you need to create another "staging" allocation and perform explicit transfers. \code VkBufferCreateInfo bufCreateInfo = { VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO }; bufCreateInfo.size = 65536; bufCreateInfo.usage = VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT; VmaAllocationCreateInfo allocCreateInfo = {}; allocCreateInfo.usage = VMA_MEMORY_USAGE_AUTO; allocCreateInfo.flags = VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT | VMA_ALLOCATION_CREATE_HOST_ACCESS_ALLOW_TRANSFER_INSTEAD_BIT | VMA_ALLOCATION_CREATE_MAPPED_BIT; VkBuffer buf; VmaAllocation alloc; VmaAllocationInfo allocInfo; VkResult result = vmaCreateBuffer(allocator, &bufCreateInfo, &allocCreateInfo, &buf, &alloc, &allocInfo); // Check result... VkMemoryPropertyFlags memPropFlags; vmaGetAllocationMemoryProperties(allocator, alloc, &memPropFlags); if(memPropFlags & VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT) { // Allocation ended up in a mappable memory and is already mapped - write to it directly. // [Executed in runtime]: memcpy(allocInfo.pMappedData, myData, myDataSize); result = vmaFlushAllocation(allocator, alloc, 0, VK_WHOLE_SIZE); // Check result... VkBufferMemoryBarrier bufMemBarrier = { VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER }; bufMemBarrier.srcAccessMask = VK_ACCESS_HOST_WRITE_BIT; bufMemBarrier.dstAccessMask = VK_ACCESS_UNIFORM_READ_BIT; bufMemBarrier.srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED; bufMemBarrier.dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED; bufMemBarrier.buffer = buf; bufMemBarrier.offset = 0; bufMemBarrier.size = VK_WHOLE_SIZE; vkCmdPipelineBarrier(cmdBuf, VK_PIPELINE_STAGE_HOST_BIT, VK_PIPELINE_STAGE_VERTEX_SHADER_BIT, 0, 0, nullptr, 1, &bufMemBarrier, 0, nullptr); } else { // Allocation ended up in a non-mappable memory - a transfer using a staging buffer is required. VkBufferCreateInfo stagingBufCreateInfo = { VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO }; stagingBufCreateInfo.size = 65536; stagingBufCreateInfo.usage = VK_BUFFER_USAGE_TRANSFER_SRC_BIT; VmaAllocationCreateInfo stagingAllocCreateInfo = {}; stagingAllocCreateInfo.usage = VMA_MEMORY_USAGE_AUTO; stagingAllocCreateInfo.flags = VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT | VMA_ALLOCATION_CREATE_MAPPED_BIT; VkBuffer stagingBuf; VmaAllocation stagingAlloc; VmaAllocationInfo stagingAllocInfo; result = vmaCreateBuffer(allocator, &stagingBufCreateInfo, &stagingAllocCreateInfo, &stagingBuf, &stagingAlloc, &stagingAllocInfo); // Check result... // [Executed in runtime]: memcpy(stagingAllocInfo.pMappedData, myData, myDataSize); result = vmaFlushAllocation(allocator, stagingAlloc, 0, VK_WHOLE_SIZE); // Check result... VkBufferMemoryBarrier bufMemBarrier = { VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER }; bufMemBarrier.srcAccessMask = VK_ACCESS_HOST_WRITE_BIT; bufMemBarrier.dstAccessMask = VK_ACCESS_TRANSFER_READ_BIT; bufMemBarrier.srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED; bufMemBarrier.dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED; bufMemBarrier.buffer = stagingBuf; bufMemBarrier.offset = 0; bufMemBarrier.size = VK_WHOLE_SIZE; vkCmdPipelineBarrier(cmdBuf, VK_PIPELINE_STAGE_HOST_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT, 0, 0, nullptr, 1, &bufMemBarrier, 0, nullptr); VkBufferCopy bufCopy = { 0, // srcOffset 0, // dstOffset, myDataSize, // size }; vkCmdCopyBuffer(cmdBuf, stagingBuf, buf, 1, &bufCopy); VkBufferMemoryBarrier bufMemBarrier2 = { VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER }; bufMemBarrier2.srcAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT; bufMemBarrier2.dstAccessMask = VK_ACCESS_UNIFORM_READ_BIT; // We created a uniform buffer bufMemBarrier2.srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED; bufMemBarrier2.dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED; bufMemBarrier2.buffer = buf; bufMemBarrier2.offset = 0; bufMemBarrier2.size = VK_WHOLE_SIZE; vkCmdPipelineBarrier(cmdBuf, VK_PIPELINE_STAGE_TRANSFER_BIT, VK_PIPELINE_STAGE_VERTEX_SHADER_BIT, 0, 0, nullptr, 1, &bufMemBarrier2, 0, nullptr); } \endcode \section usage_patterns_other_use_cases Other use cases Here are some other, less obvious use cases and their recommended settings: - An image that is used only as transfer source and destination, but it should stay on the device, as it is used to temporarily store a copy of some texture, e.g. from the current to the next frame, for temporal antialiasing or other temporal effects. - Use `VkImageCreateInfo::usage = VK_IMAGE_USAGE_TRANSFER_SRC_BIT | VK_IMAGE_USAGE_TRANSFER_DST_BIT` - Use VmaAllocationCreateInfo::usage = #VMA_MEMORY_USAGE_AUTO - An image that is used only as transfer source and destination, but it should be placed in the system RAM despite it doesn't need to be mapped, because it serves as a "swap" copy to evict least recently used textures from VRAM. - Use `VkImageCreateInfo::usage = VK_IMAGE_USAGE_TRANSFER_SRC_BIT | VK_IMAGE_USAGE_TRANSFER_DST_BIT` - Use VmaAllocationCreateInfo::usage = #VMA_MEMORY_USAGE_AUTO_PREFER_HOST, as VMA needs a hint here to differentiate from the previous case. - A buffer that you want to map and write from the CPU, directly read from the GPU (e.g. as a uniform or vertex buffer), but you have a clear preference to place it in device or host memory due to its large size. - Use `VkBufferCreateInfo::usage = VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT` - Use VmaAllocationCreateInfo::usage = #VMA_MEMORY_USAGE_AUTO_PREFER_DEVICE or #VMA_MEMORY_USAGE_AUTO_PREFER_HOST - Use VmaAllocationCreateInfo::flags = #VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT \page configuration Configuration Please check "CONFIGURATION SECTION" in the code to find macros that you can define before each include of this file or change directly in this file to provide your own implementation of basic facilities like assert, `min()` and `max()` functions, mutex, atomic etc. For example, define `VMA_ASSERT(expr)` before including the library to provide custom implementation of the assertion, compatible with your project. By default it is defined to standard C `assert(expr)` in `_DEBUG` configuration and empty otherwise. Similarly, you can define `VMA_LEAK_LOG_FORMAT` macro to enable printing of leaked (unfreed) allocations, including their names and other parameters. Example: \code #define VMA_LEAK_LOG_FORMAT(format, ...) do { \ printf((format), __VA_ARGS__); \ printf("\n"); \ } while(false) \endcode \section config_Vulkan_functions Pointers to Vulkan functions There are multiple ways to import pointers to Vulkan functions in the library. In the simplest case you don't need to do anything. If the compilation or linking of your program or the initialization of the #VmaAllocator doesn't work for you, you can try to reconfigure it. First, the allocator tries to fetch pointers to Vulkan functions linked statically, like this: \code m_VulkanFunctions.vkAllocateMemory = (PFN_vkAllocateMemory)vkAllocateMemory; \endcode If you want to disable this feature, set configuration macro: `#define VMA_STATIC_VULKAN_FUNCTIONS 0`. Second, you can provide the pointers yourself by setting member VmaAllocatorCreateInfo::pVulkanFunctions. You can fetch them e.g. using functions `vkGetInstanceProcAddr` and `vkGetDeviceProcAddr` or by using a helper library like [volk](https://github.com/zeux/volk). Third, VMA tries to fetch remaining pointers that are still null by calling `vkGetInstanceProcAddr` and `vkGetDeviceProcAddr` on its own. You need to only fill in VmaVulkanFunctions::vkGetInstanceProcAddr and VmaVulkanFunctions::vkGetDeviceProcAddr. Other pointers will be fetched automatically. If you want to disable this feature, set configuration macro: `#define VMA_DYNAMIC_VULKAN_FUNCTIONS 0`. Finally, all the function pointers required by the library (considering selected Vulkan version and enabled extensions) are checked with `VMA_ASSERT` if they are not null. \section custom_memory_allocator Custom host memory allocator If you use custom allocator for CPU memory rather than default operator `new` and `delete` from C++, you can make this library using your allocator as well by filling optional member VmaAllocatorCreateInfo::pAllocationCallbacks. These functions will be passed to Vulkan, as well as used by the library itself to make any CPU-side allocations. \section allocation_callbacks Device memory allocation callbacks The library makes calls to `vkAllocateMemory()` and `vkFreeMemory()` internally. You can setup callbacks to be informed about these calls, e.g. for the purpose of gathering some statistics. To do it, fill optional member VmaAllocatorCreateInfo::pDeviceMemoryCallbacks. \section heap_memory_limit Device heap memory limit When device memory of certain heap runs out of free space, new allocations may fail (returning error code) or they may succeed, silently pushing some existing_ memory blocks from GPU VRAM to system RAM (which degrades performance). This behavior is implementation-dependent - it depends on GPU vendor and graphics driver. On AMD cards it can be controlled while creating Vulkan device object by using VK_AMD_memory_overallocation_behavior extension, if available. Alternatively, if you want to test how your program behaves with limited amount of Vulkan device memory available without switching your graphics card to one that really has smaller VRAM, you can use a feature of this library intended for this purpose. To do it, fill optional member VmaAllocatorCreateInfo::pHeapSizeLimit. \page vk_khr_dedicated_allocation VK_KHR_dedicated_allocation VK_KHR_dedicated_allocation is a Vulkan extension which can be used to improve performance on some GPUs. It augments Vulkan API with possibility to query driver whether it prefers particular buffer or image to have its own, dedicated allocation (separate `VkDeviceMemory` block) for better efficiency - to be able to do some internal optimizations. The extension is supported by this library. It will be used automatically when enabled. It has been promoted to core Vulkan 1.1, so if you use eligible Vulkan version and inform VMA about it by setting VmaAllocatorCreateInfo::vulkanApiVersion, you are all set. Otherwise, if you want to use it as an extension: 1 . When creating Vulkan device, check if following 2 device extensions are supported (call `vkEnumerateDeviceExtensionProperties()`). If yes, enable them (fill `VkDeviceCreateInfo::ppEnabledExtensionNames`). - VK_KHR_get_memory_requirements2 - VK_KHR_dedicated_allocation If you enabled these extensions: 2 . Use #VMA_ALLOCATOR_CREATE_KHR_DEDICATED_ALLOCATION_BIT flag when creating your #VmaAllocator to inform the library that you enabled required extensions and you want the library to use them. \code allocatorInfo.flags |= VMA_ALLOCATOR_CREATE_KHR_DEDICATED_ALLOCATION_BIT; vmaCreateAllocator(&allocatorInfo, &allocator); \endcode That is all. The extension will be automatically used whenever you create a buffer using vmaCreateBuffer() or image using vmaCreateImage(). When using the extension together with Vulkan Validation Layer, you will receive warnings like this: _vkBindBufferMemory(): Binding memory to buffer 0x33 but vkGetBufferMemoryRequirements() has not been called on that buffer._ It is OK, you should just ignore it. It happens because you use function `vkGetBufferMemoryRequirements2KHR()` instead of standard `vkGetBufferMemoryRequirements()`, while the validation layer seems to be unaware of it. To learn more about this extension, see: - [VK_KHR_dedicated_allocation in Vulkan specification](https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/chap50.html#VK_KHR_dedicated_allocation) - [VK_KHR_dedicated_allocation unofficial manual](http://asawicki.info/articles/VK_KHR_dedicated_allocation.php5) \page vk_ext_memory_priority VK_EXT_memory_priority VK_EXT_memory_priority is a device extension that allows to pass additional "priority" value to Vulkan memory allocations that the implementation may use prefer certain buffers and images that are critical for performance to stay in device-local memory in cases when the memory is over-subscribed, while some others may be moved to the system memory. VMA offers convenient usage of this extension. If you enable it, you can pass "priority" parameter when creating allocations or custom pools and the library automatically passes the value to Vulkan using this extension. If you want to use this extension in connection with VMA, follow these steps: \section vk_ext_memory_priority_initialization Initialization 1) Call `vkEnumerateDeviceExtensionProperties` for the physical device. Check if the extension is supported - if returned array of `VkExtensionProperties` contains "VK_EXT_memory_priority". 2) Call `vkGetPhysicalDeviceFeatures2` for the physical device instead of old `vkGetPhysicalDeviceFeatures`. Attach additional structure `VkPhysicalDeviceMemoryPriorityFeaturesEXT` to `VkPhysicalDeviceFeatures2::pNext` to be returned. Check if the device feature is really supported - check if `VkPhysicalDeviceMemoryPriorityFeaturesEXT::memoryPriority` is true. 3) While creating device with `vkCreateDevice`, enable this extension - add "VK_EXT_memory_priority" to the list passed as `VkDeviceCreateInfo::ppEnabledExtensionNames`. 4) While creating the device, also don't set `VkDeviceCreateInfo::pEnabledFeatures`. Fill in `VkPhysicalDeviceFeatures2` structure instead and pass it as `VkDeviceCreateInfo::pNext`. Enable this device feature - attach additional structure `VkPhysicalDeviceMemoryPriorityFeaturesEXT` to `VkPhysicalDeviceFeatures2::pNext` chain and set its member `memoryPriority` to `VK_TRUE`. 5) While creating #VmaAllocator with vmaCreateAllocator() inform VMA that you have enabled this extension and feature - add #VMA_ALLOCATOR_CREATE_EXT_MEMORY_PRIORITY_BIT to VmaAllocatorCreateInfo::flags. \section vk_ext_memory_priority_usage Usage When using this extension, you should initialize following member: - VmaAllocationCreateInfo::priority when creating a dedicated allocation with #VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT. - VmaPoolCreateInfo::priority when creating a custom pool. It should be a floating-point value between `0.0f` and `1.0f`, where recommended default is `0.5f`. Memory allocated with higher value can be treated by the Vulkan implementation as higher priority and so it can have lower chances of being pushed out to system memory, experiencing degraded performance. It might be a good idea to create performance-critical resources like color-attachment or depth-stencil images as dedicated and set high priority to them. For example: \code VkImageCreateInfo imgCreateInfo = { VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO }; imgCreateInfo.imageType = VK_IMAGE_TYPE_2D; imgCreateInfo.extent.width = 3840; imgCreateInfo.extent.height = 2160; imgCreateInfo.extent.depth = 1; imgCreateInfo.mipLevels = 1; imgCreateInfo.arrayLayers = 1; imgCreateInfo.format = VK_FORMAT_R8G8B8A8_UNORM; imgCreateInfo.tiling = VK_IMAGE_TILING_OPTIMAL; imgCreateInfo.initialLayout = VK_IMAGE_LAYOUT_UNDEFINED; imgCreateInfo.usage = VK_IMAGE_USAGE_SAMPLED_BIT | VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT; imgCreateInfo.samples = VK_SAMPLE_COUNT_1_BIT; VmaAllocationCreateInfo allocCreateInfo = {}; allocCreateInfo.usage = VMA_MEMORY_USAGE_AUTO; allocCreateInfo.flags = VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT; allocCreateInfo.priority = 1.0f; VkImage img; VmaAllocation alloc; vmaCreateImage(allocator, &imgCreateInfo, &allocCreateInfo, &img, &alloc, nullptr); \endcode `priority` member is ignored in the following situations: - Allocations created in custom pools: They inherit the priority, along with all other allocation parameters from the parameters passed in #VmaPoolCreateInfo when the pool was created. - Allocations created in default pools: They inherit the priority from the parameters VMA used when creating default pools, which means `priority == 0.5f`. \page vk_amd_device_coherent_memory VK_AMD_device_coherent_memory VK_AMD_device_coherent_memory is a device extension that enables access to additional memory types with `VK_MEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMD` and `VK_MEMORY_PROPERTY_DEVICE_UNCACHED_BIT_AMD` flag. It is useful mostly for allocation of buffers intended for writing "breadcrumb markers" in between passes or draw calls, which in turn are useful for debugging GPU crash/hang/TDR cases. When the extension is available but has not been enabled, Vulkan physical device still exposes those memory types, but their usage is forbidden. VMA automatically takes care of that - it returns `VK_ERROR_FEATURE_NOT_PRESENT` when an attempt to allocate memory of such type is made. If you want to use this extension in connection with VMA, follow these steps: \section vk_amd_device_coherent_memory_initialization Initialization 1) Call `vkEnumerateDeviceExtensionProperties` for the physical device. Check if the extension is supported - if returned array of `VkExtensionProperties` contains "VK_AMD_device_coherent_memory". 2) Call `vkGetPhysicalDeviceFeatures2` for the physical device instead of old `vkGetPhysicalDeviceFeatures`. Attach additional structure `VkPhysicalDeviceCoherentMemoryFeaturesAMD` to `VkPhysicalDeviceFeatures2::pNext` to be returned. Check if the device feature is really supported - check if `VkPhysicalDeviceCoherentMemoryFeaturesAMD::deviceCoherentMemory` is true. 3) While creating device with `vkCreateDevice`, enable this extension - add "VK_AMD_device_coherent_memory" to the list passed as `VkDeviceCreateInfo::ppEnabledExtensionNames`. 4) While creating the device, also don't set `VkDeviceCreateInfo::pEnabledFeatures`. Fill in `VkPhysicalDeviceFeatures2` structure instead and pass it as `VkDeviceCreateInfo::pNext`. Enable this device feature - attach additional structure `VkPhysicalDeviceCoherentMemoryFeaturesAMD` to `VkPhysicalDeviceFeatures2::pNext` and set its member `deviceCoherentMemory` to `VK_TRUE`. 5) While creating #VmaAllocator with vmaCreateAllocator() inform VMA that you have enabled this extension and feature - add #VMA_ALLOCATOR_CREATE_AMD_DEVICE_COHERENT_MEMORY_BIT to VmaAllocatorCreateInfo::flags. \section vk_amd_device_coherent_memory_usage Usage After following steps described above, you can create VMA allocations and custom pools out of the special `DEVICE_COHERENT` and `DEVICE_UNCACHED` memory types on eligible devices. There are multiple ways to do it, for example: - You can request or prefer to allocate out of such memory types by adding `VK_MEMORY_PROPERTY_DEVICE_UNCACHED_BIT_AMD` to VmaAllocationCreateInfo::requiredFlags or VmaAllocationCreateInfo::preferredFlags. Those flags can be freely mixed with other ways of \ref choosing_memory_type, like setting VmaAllocationCreateInfo::usage. - If you manually found memory type index to use for this purpose, force allocation from this specific index by setting VmaAllocationCreateInfo::memoryTypeBits `= 1u << index`. \section vk_amd_device_coherent_memory_more_information More information To learn more about this extension, see [VK_AMD_device_coherent_memory in Vulkan specification](https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_AMD_device_coherent_memory.html) Example use of this extension can be found in the code of the sample and test suite accompanying this library. \page vk_khr_external_memory_win32 VK_KHR_external_memory_win32 On Windows, the VK_KHR_external_memory_win32 device extension allows exporting a Win32 `HANDLE` of a `VkDeviceMemory` block, to be able to reference the memory on other Vulkan logical devices or instances, in multiple processes, and/or in multiple APIs. VMA offers support for it. \section vk_khr_external_memory_win32_initialization Initialization 1) Make sure the extension is defined in the code by including following header before including VMA: \code #include \endcode 2) Check if "VK_KHR_external_memory_win32" is available among device extensions. Enable it when creating the `VkDevice` object. 3) Enable the usage of this extension in VMA by setting flag #VMA_ALLOCATOR_CREATE_KHR_EXTERNAL_MEMORY_WIN32_BIT when calling vmaCreateAllocator(). 4) Make sure that VMA has access to the `vkGetMemoryWin32HandleKHR` function by either enabling `VMA_DYNAMIC_VULKAN_FUNCTIONS` macro or setting VmaVulkanFunctions::vkGetMemoryWin32HandleKHR explicitly. For more information, see \ref quick_start_initialization_importing_vulkan_functions. \section vk_khr_external_memory_win32_preparations Preparations You can find example usage among tests, in file "Tests.cpp", function `TestWin32Handles()`. To use the extenion, buffers need to be created with `VkExternalMemoryBufferCreateInfoKHR` attached to their `pNext` chain, and memory allocations need to be made with `VkExportMemoryAllocateInfoKHR` attached to their `pNext` chain. To make use of them, you need to use \ref custom_memory_pools. Example: \code // Define an example buffer and allocation parameters. VkExternalMemoryBufferCreateInfoKHR externalMemBufCreateInfo = { VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO_KHR, nullptr, VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT }; VkBufferCreateInfo exampleBufCreateInfo = { VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO }; exampleBufCreateInfo.size = 0x10000; // Doesn't matter here. exampleBufCreateInfo.usage = VK_BUFFER_USAGE_TRANSFER_SRC_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT; exampleBufCreateInfo.pNext = &externalMemBufCreateInfo; VmaAllocationCreateInfo exampleAllocCreateInfo = {}; exampleAllocCreateInfo.usage = VMA_MEMORY_USAGE_AUTO; // Find memory type index to use for the custom pool. uint32_t memTypeIndex; VkResult res = vmaFindMemoryTypeIndexForBufferInfo(g_Allocator, &exampleBufCreateInfo, &exampleAllocCreateInfo, &memTypeIndex); // Check res... // Create a custom pool. constexpr static VkExportMemoryAllocateInfoKHR exportMemAllocInfo = { VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_KHR, nullptr, VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT }; VmaPoolCreateInfo poolCreateInfo = {}; poolCreateInfo.memoryTypeIndex = memTypeIndex; poolCreateInfo.pMemoryAllocateNext = (void*)&exportMemAllocInfo; VmaPool pool; res = vmaCreatePool(g_Allocator, &poolCreateInfo, &pool); // Check res... // YOUR OTHER CODE COMES HERE.... // At the end, don't forget to destroy it! vmaDestroyPool(g_Allocator, pool); \endcode Note that the structure passed as VmaPoolCreateInfo::pMemoryAllocateNext must remain alive and unchanged for the whole lifetime of the custom pool, because it will be used when the pool allocates a new device memory block. No copy is made internally. This is why variable `exportMemAllocInfo` is defined as `static`. \section vk_khr_external_memory_win32_memory_allocation Memory allocation Finally, you can create a buffer with an allocation out of the custom pool. The buffer should use same flags as the sample buffer used to find the memory type. It should also specify `VkExternalMemoryBufferCreateInfoKHR` in its `pNext` chain. \code VkExternalMemoryBufferCreateInfoKHR externalMemBufCreateInfo = { VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO_KHR, nullptr, VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT }; VkBufferCreateInfo bufCreateInfo = { VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO }; bufCreateInfo.size = // Your desired buffer size. bufCreateInfo.usage = VK_BUFFER_USAGE_TRANSFER_SRC_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT; bufCreateInfo.pNext = &externalMemBufCreateInfo; VmaAllocationCreateInfo allocCreateInfo = {}; allocCreateInfo.pool = pool; // It is enough to set this one member. VkBuffer buf; VmaAllocation alloc; res = vmaCreateBuffer(g_Allocator, &bufCreateInfo, &allocCreateInfo, &buf, &alloc, nullptr); // Check res... // YOUR OTHER CODE COMES HERE.... // At the end, don't forget to destroy it! vmaDestroyBuffer(g_Allocator, buf, alloc); \endcode If you need each allocation to have its own device memory block and start at offset 0, you can still do by using #VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT flag. It works also with custom pools. \section vk_khr_external_memory_win32_exporting_win32_handle Exporting Win32 handle After the allocation is created, you can acquire a Win32 `HANDLE` to the `VkDeviceMemory` block it belongs to. VMA function vmaGetMemoryWin32Handle() is a replacement of the Vulkan function `vkGetMemoryWin32HandleKHR`. \code HANDLE handle; res = vmaGetMemoryWin32Handle(g_Allocator, alloc, nullptr, &handle); // Check res... // YOUR OTHER CODE COMES HERE.... // At the end, you must close the handle. CloseHandle(handle); \endcode Documentation of the VK_KHR_external_memory_win32 extension states that: > If handleType is defined as an NT handle, vkGetMemoryWin32HandleKHR must be called no more than once for each valid unique combination of memory and handleType. This is ensured automatically inside VMA. The library fetches the handle on first use, remembers it internally, and closes it when the memory block or dedicated allocation is destroyed. Every time you call vmaGetMemoryWin32Handle(), VMA calls `DuplicateHandle` and returns a new handle that you need to close. For further information, please check documentation of the vmaGetMemoryWin32Handle() function. \page enabling_buffer_device_address Enabling buffer device address Device extension VK_KHR_buffer_device_address allow to fetch raw GPU pointer to a buffer and pass it for usage in a shader code. It has been promoted to core Vulkan 1.2. If you want to use this feature in connection with VMA, follow these steps: \section enabling_buffer_device_address_initialization Initialization 1) (For Vulkan version < 1.2) Call `vkEnumerateDeviceExtensionProperties` for the physical device. Check if the extension is supported - if returned array of `VkExtensionProperties` contains "VK_KHR_buffer_device_address". 2) Call `vkGetPhysicalDeviceFeatures2` for the physical device instead of old `vkGetPhysicalDeviceFeatures`. Attach additional structure `VkPhysicalDeviceBufferDeviceAddressFeatures*` to `VkPhysicalDeviceFeatures2::pNext` to be returned. Check if the device feature is really supported - check if `VkPhysicalDeviceBufferDeviceAddressFeatures::bufferDeviceAddress` is true. 3) (For Vulkan version < 1.2) While creating device with `vkCreateDevice`, enable this extension - add "VK_KHR_buffer_device_address" to the list passed as `VkDeviceCreateInfo::ppEnabledExtensionNames`. 4) While creating the device, also don't set `VkDeviceCreateInfo::pEnabledFeatures`. Fill in `VkPhysicalDeviceFeatures2` structure instead and pass it as `VkDeviceCreateInfo::pNext`. Enable this device feature - attach additional structure `VkPhysicalDeviceBufferDeviceAddressFeatures*` to `VkPhysicalDeviceFeatures2::pNext` and set its member `bufferDeviceAddress` to `VK_TRUE`. 5) While creating #VmaAllocator with vmaCreateAllocator() inform VMA that you have enabled this feature - add #VMA_ALLOCATOR_CREATE_BUFFER_DEVICE_ADDRESS_BIT to VmaAllocatorCreateInfo::flags. \section enabling_buffer_device_address_usage Usage After following steps described above, you can create buffers with `VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT*` using VMA. The library automatically adds `VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT*` to allocated memory blocks wherever it might be needed. Please note that the library supports only `VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT*`. The second part of this functionality related to "capture and replay" is not supported, as it is intended for usage in debugging tools like RenderDoc, not in everyday Vulkan usage. \section enabling_buffer_device_address_more_information More information To learn more about this extension, see [VK_KHR_buffer_device_address in Vulkan specification](https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/chap46.html#VK_KHR_buffer_device_address) Example use of this extension can be found in the code of the sample and test suite accompanying this library. \page general_considerations General considerations \section general_considerations_thread_safety Thread safety - The library has no global state, so separate #VmaAllocator objects can be used independently. There should be no need to create multiple such objects though - one per `VkDevice` is enough. - By default, all calls to functions that take #VmaAllocator as first parameter are safe to call from multiple threads simultaneously because they are synchronized internally when needed. This includes allocation and deallocation from default memory pool, as well as custom #VmaPool. - When the allocator is created with #VMA_ALLOCATOR_CREATE_EXTERNALLY_SYNCHRONIZED_BIT flag, calls to functions that take such #VmaAllocator object must be synchronized externally. - Access to a #VmaAllocation object must be externally synchronized. For example, you must not call vmaGetAllocationInfo() and vmaMapMemory() from different threads at the same time if you pass the same #VmaAllocation object to these functions. - #VmaVirtualBlock is not safe to be used from multiple threads simultaneously. \section general_considerations_versioning_and_compatibility Versioning and compatibility The library uses [**Semantic Versioning**](https://semver.org/), which means version numbers follow convention: Major.Minor.Patch (e.g. 2.3.0), where: - Incremented Patch version means a release is backward- and forward-compatible, introducing only some internal improvements, bug fixes, optimizations etc. or changes that are out of scope of the official API described in this documentation. - Incremented Minor version means a release is backward-compatible, so existing code that uses the library should continue to work, while some new symbols could have been added: new structures, functions, new values in existing enums and bit flags, new structure members, but not new function parameters. - Incrementing Major version means a release could break some backward compatibility. All changes between official releases are documented in file "CHANGELOG.md". \warning Backward compatibility is considered on the level of C++ source code, not binary linkage. Adding new members to existing structures is treated as backward compatible if initializing the new members to binary zero results in the old behavior. You should always fully initialize all library structures to zeros and not rely on their exact binary size. \section general_considerations_validation_layer_warnings Validation layer warnings When using this library, you can meet following types of warnings issued by Vulkan validation layer. They don't necessarily indicate a bug, so you may need to just ignore them. - *vkBindBufferMemory(): Binding memory to buffer 0xeb8e4 but vkGetBufferMemoryRequirements() has not been called on that buffer.* - It happens when VK_KHR_dedicated_allocation extension is enabled. `vkGetBufferMemoryRequirements2KHR` function is used instead, while validation layer seems to be unaware of it. - *Mapping an image with layout VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL can result in undefined behavior if this memory is used by the device. Only GENERAL or PREINITIALIZED should be used.* - It happens when you map a buffer or image, because the library maps entire `VkDeviceMemory` block, where different types of images and buffers may end up together, especially on GPUs with unified memory like Intel. - *Non-linear image 0xebc91 is aliased with linear buffer 0xeb8e4 which may indicate a bug.* - It may happen when you use [defragmentation](@ref defragmentation). \section general_considerations_allocation_algorithm Allocation algorithm The library uses following algorithm for allocation, in order: -# Try to find free range of memory in existing blocks. -# If failed, try to create a new block of `VkDeviceMemory`, with preferred block size. -# If failed, try to create such block with size / 2, size / 4, size / 8. -# If failed, try to allocate separate `VkDeviceMemory` for this allocation, just like when you use #VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT. -# If failed, choose other memory type that meets the requirements specified in VmaAllocationCreateInfo and go to point 1. -# If failed, return `VK_ERROR_OUT_OF_DEVICE_MEMORY`. \section general_considerations_features_not_supported Features not supported Features deliberately excluded from the scope of this library: -# **Data transfer.** Uploading (streaming) and downloading data of buffers and images between CPU and GPU memory and related synchronization is responsibility of the user. Defining some "texture" object that would automatically stream its data from a staging copy in CPU memory to GPU memory would rather be a feature of another, higher-level library implemented on top of VMA. VMA doesn't record any commands to a `VkCommandBuffer`. It just allocates memory. -# **Recreation of buffers and images.** Although the library has functions for buffer and image creation: vmaCreateBuffer(), vmaCreateImage(), you need to recreate these objects yourself after defragmentation. That is because the big structures `VkBufferCreateInfo`, `VkImageCreateInfo` are not stored in #VmaAllocation object. -# **Handling CPU memory allocation failures.** When dynamically creating small C++ objects in CPU memory (not Vulkan memory), allocation failures are not checked and handled gracefully, because that would complicate code significantly and is usually not needed in desktop PC applications anyway. Success of an allocation is just checked with an assert. -# **Code free of any compiler warnings.** Maintaining the library to compile and work correctly on so many different platforms is hard enough. Being free of any warnings, on any version of any compiler, is simply not feasible. There are many preprocessor macros that make some variables unused, function parameters unreferenced, or conditional expressions constant in some configurations. The code of this library should not be bigger or more complicated just to silence these warnings. It is recommended to disable such warnings instead. -# This is a C++ library with C interface. **Bindings or ports to any other programming languages** are welcome as external projects but are not going to be included into this repository. */ ================================================ FILE: src/libraries/volk/volk.c ================================================ /* This file is part of volk library; see volk.h for version/license details */ /* clang-format off */ #include "volk.h" #ifdef _WIN32 typedef const char* LPCSTR; typedef struct HINSTANCE__* HINSTANCE; typedef HINSTANCE HMODULE; #if defined(_MINWINDEF_) /* minwindef.h defines FARPROC, and attempting to redefine it may conflict with -Wstrict-prototypes */ #elif defined(_WIN64) typedef __int64 (__stdcall* FARPROC)(void); #else typedef int (__stdcall* FARPROC)(void); #endif #else # include #endif #ifdef __APPLE__ # include #endif #ifdef __cplusplus extern "C" { #endif #ifdef _WIN32 __declspec(dllimport) HMODULE __stdcall LoadLibraryA(LPCSTR); __declspec(dllimport) FARPROC __stdcall GetProcAddress(HMODULE, LPCSTR); __declspec(dllimport) int __stdcall FreeLibrary(HMODULE); #endif #if defined(__GNUC__) # define VOLK_DISABLE_GCC_PEDANTIC_WARNINGS \ _Pragma("GCC diagnostic push") \ _Pragma("GCC diagnostic ignored \"-Wpedantic\"") # define VOLK_RESTORE_GCC_PEDANTIC_WARNINGS \ _Pragma("GCC diagnostic pop") #else # define VOLK_DISABLE_GCC_PEDANTIC_WARNINGS # define VOLK_RESTORE_GCC_PEDANTIC_WARNINGS #endif static void* loadedModule = NULL; static VkInstance loadedInstance = VK_NULL_HANDLE; static VkDevice loadedDevice = VK_NULL_HANDLE; static void volkGenLoadLoader(void* context, PFN_vkVoidFunction (*load)(void*, const char*)); static void volkGenLoadInstance(void* context, PFN_vkVoidFunction (*load)(void*, const char*)); static void volkGenLoadDevice(void* context, PFN_vkVoidFunction (*load)(void*, const char*)); static void volkGenLoadDeviceTable(struct VolkDeviceTable* table, void* context, PFN_vkVoidFunction (*load)(void*, const char*)); static PFN_vkVoidFunction vkGetInstanceProcAddrStub(void* context, const char* name) { return vkGetInstanceProcAddr((VkInstance)context, name); } static PFN_vkVoidFunction vkGetDeviceProcAddrStub(void* context, const char* name) { return vkGetDeviceProcAddr((VkDevice)context, name); } static PFN_vkVoidFunction nullProcAddrStub(void* context, const char* name) { (void)context; (void)name; return NULL; } VkResult volkInitialize(void) { #if defined(_WIN32) HMODULE module = LoadLibraryA("vulkan-1.dll"); if (!module) return VK_ERROR_INITIALIZATION_FAILED; // note: function pointer is cast through void function pointer to silence cast-function-type warning on gcc8 vkGetInstanceProcAddr = (PFN_vkGetInstanceProcAddr)(void(*)(void))GetProcAddress(module, "vkGetInstanceProcAddr"); #elif defined(__APPLE__) void* module = dlopen("libvulkan.dylib", RTLD_NOW | RTLD_LOCAL); if (!module) module = dlopen("libvulkan.1.dylib", RTLD_NOW | RTLD_LOCAL); if (!module) module = dlopen("libMoltenVK.dylib", RTLD_NOW | RTLD_LOCAL); // Add support for using Vulkan and MoltenVK in a Framework. App store rules for iOS // strictly enforce no .dylib's. If they aren't found it just falls through if (!module) module = dlopen("vulkan.framework/vulkan", RTLD_NOW | RTLD_LOCAL); if (!module) module = dlopen("MoltenVK.framework/MoltenVK", RTLD_NOW | RTLD_LOCAL); // modern versions of macOS don't search /usr/local/lib automatically contrary to what man dlopen says // Vulkan SDK uses this as the system-wide installation location, so we're going to fallback to this if all else fails if (!module && getenv("DYLD_FALLBACK_LIBRARY_PATH") == NULL) module = dlopen("/usr/local/lib/libvulkan.dylib", RTLD_NOW | RTLD_LOCAL); if (!module) return VK_ERROR_INITIALIZATION_FAILED; vkGetInstanceProcAddr = (PFN_vkGetInstanceProcAddr)dlsym(module, "vkGetInstanceProcAddr"); #else void* module = dlopen("libvulkan.so.1", RTLD_NOW | RTLD_LOCAL); if (!module) module = dlopen("libvulkan.so", RTLD_NOW | RTLD_LOCAL); if (!module) return VK_ERROR_INITIALIZATION_FAILED; VOLK_DISABLE_GCC_PEDANTIC_WARNINGS vkGetInstanceProcAddr = (PFN_vkGetInstanceProcAddr)dlsym(module, "vkGetInstanceProcAddr"); VOLK_RESTORE_GCC_PEDANTIC_WARNINGS #endif loadedModule = module; volkGenLoadLoader(NULL, vkGetInstanceProcAddrStub); return VK_SUCCESS; } void volkInitializeCustom(PFN_vkGetInstanceProcAddr handler) { vkGetInstanceProcAddr = handler; loadedModule = NULL; volkGenLoadLoader(NULL, vkGetInstanceProcAddrStub); } void volkFinalize(void) { if (loadedModule) { #if defined(_WIN32) FreeLibrary((HMODULE)loadedModule); #else dlclose(loadedModule); #endif } vkGetInstanceProcAddr = NULL; volkGenLoadLoader(NULL, nullProcAddrStub); volkGenLoadInstance(NULL, nullProcAddrStub); volkGenLoadDevice(NULL, nullProcAddrStub); loadedModule = NULL; loadedInstance = VK_NULL_HANDLE; loadedDevice = VK_NULL_HANDLE; } uint32_t volkGetInstanceVersion(void) { #if defined(VK_VERSION_1_1) uint32_t apiVersion = 0; if (vkEnumerateInstanceVersion && vkEnumerateInstanceVersion(&apiVersion) == VK_SUCCESS) return apiVersion; #endif if (vkCreateInstance) return VK_API_VERSION_1_0; return 0; } void volkLoadInstance(VkInstance instance) { loadedInstance = instance; volkGenLoadInstance(instance, vkGetInstanceProcAddrStub); volkGenLoadDevice(instance, vkGetInstanceProcAddrStub); } void volkLoadInstanceOnly(VkInstance instance) { loadedInstance = instance; volkGenLoadInstance(instance, vkGetInstanceProcAddrStub); } VkInstance volkGetLoadedInstance(void) { return loadedInstance; } void volkLoadDevice(VkDevice device) { loadedDevice = device; volkGenLoadDevice(device, vkGetDeviceProcAddrStub); } VkDevice volkGetLoadedDevice(void) { return loadedDevice; } void volkLoadDeviceTable(struct VolkDeviceTable* table, VkDevice device) { volkGenLoadDeviceTable(table, device, vkGetDeviceProcAddrStub); } static void volkGenLoadLoader(void* context, PFN_vkVoidFunction (*load)(void*, const char*)) { /* VOLK_GENERATE_LOAD_LOADER */ #if defined(VK_VERSION_1_0) vkCreateInstance = (PFN_vkCreateInstance)load(context, "vkCreateInstance"); vkEnumerateInstanceExtensionProperties = (PFN_vkEnumerateInstanceExtensionProperties)load(context, "vkEnumerateInstanceExtensionProperties"); vkEnumerateInstanceLayerProperties = (PFN_vkEnumerateInstanceLayerProperties)load(context, "vkEnumerateInstanceLayerProperties"); #endif /* defined(VK_VERSION_1_0) */ #if defined(VK_VERSION_1_1) vkEnumerateInstanceVersion = (PFN_vkEnumerateInstanceVersion)load(context, "vkEnumerateInstanceVersion"); #endif /* defined(VK_VERSION_1_1) */ /* VOLK_GENERATE_LOAD_LOADER */ } static void volkGenLoadInstance(void* context, PFN_vkVoidFunction (*load)(void*, const char*)) { /* VOLK_GENERATE_LOAD_INSTANCE */ #if defined(VK_VERSION_1_0) vkCreateDevice = (PFN_vkCreateDevice)load(context, "vkCreateDevice"); vkDestroyInstance = (PFN_vkDestroyInstance)load(context, "vkDestroyInstance"); vkEnumerateDeviceExtensionProperties = (PFN_vkEnumerateDeviceExtensionProperties)load(context, "vkEnumerateDeviceExtensionProperties"); vkEnumerateDeviceLayerProperties = (PFN_vkEnumerateDeviceLayerProperties)load(context, "vkEnumerateDeviceLayerProperties"); vkEnumeratePhysicalDevices = (PFN_vkEnumeratePhysicalDevices)load(context, "vkEnumeratePhysicalDevices"); vkGetDeviceProcAddr = (PFN_vkGetDeviceProcAddr)load(context, "vkGetDeviceProcAddr"); vkGetPhysicalDeviceFeatures = (PFN_vkGetPhysicalDeviceFeatures)load(context, "vkGetPhysicalDeviceFeatures"); vkGetPhysicalDeviceFormatProperties = (PFN_vkGetPhysicalDeviceFormatProperties)load(context, "vkGetPhysicalDeviceFormatProperties"); vkGetPhysicalDeviceImageFormatProperties = (PFN_vkGetPhysicalDeviceImageFormatProperties)load(context, "vkGetPhysicalDeviceImageFormatProperties"); vkGetPhysicalDeviceMemoryProperties = (PFN_vkGetPhysicalDeviceMemoryProperties)load(context, "vkGetPhysicalDeviceMemoryProperties"); vkGetPhysicalDeviceProperties = (PFN_vkGetPhysicalDeviceProperties)load(context, "vkGetPhysicalDeviceProperties"); vkGetPhysicalDeviceQueueFamilyProperties = (PFN_vkGetPhysicalDeviceQueueFamilyProperties)load(context, "vkGetPhysicalDeviceQueueFamilyProperties"); vkGetPhysicalDeviceSparseImageFormatProperties = (PFN_vkGetPhysicalDeviceSparseImageFormatProperties)load(context, "vkGetPhysicalDeviceSparseImageFormatProperties"); #endif /* defined(VK_VERSION_1_0) */ #if defined(VK_VERSION_1_1) vkEnumeratePhysicalDeviceGroups = (PFN_vkEnumeratePhysicalDeviceGroups)load(context, "vkEnumeratePhysicalDeviceGroups"); vkGetPhysicalDeviceExternalBufferProperties = (PFN_vkGetPhysicalDeviceExternalBufferProperties)load(context, "vkGetPhysicalDeviceExternalBufferProperties"); vkGetPhysicalDeviceExternalFenceProperties = (PFN_vkGetPhysicalDeviceExternalFenceProperties)load(context, "vkGetPhysicalDeviceExternalFenceProperties"); vkGetPhysicalDeviceExternalSemaphoreProperties = (PFN_vkGetPhysicalDeviceExternalSemaphoreProperties)load(context, "vkGetPhysicalDeviceExternalSemaphoreProperties"); vkGetPhysicalDeviceFeatures2 = (PFN_vkGetPhysicalDeviceFeatures2)load(context, "vkGetPhysicalDeviceFeatures2"); vkGetPhysicalDeviceFormatProperties2 = (PFN_vkGetPhysicalDeviceFormatProperties2)load(context, "vkGetPhysicalDeviceFormatProperties2"); vkGetPhysicalDeviceImageFormatProperties2 = (PFN_vkGetPhysicalDeviceImageFormatProperties2)load(context, "vkGetPhysicalDeviceImageFormatProperties2"); vkGetPhysicalDeviceMemoryProperties2 = (PFN_vkGetPhysicalDeviceMemoryProperties2)load(context, "vkGetPhysicalDeviceMemoryProperties2"); vkGetPhysicalDeviceProperties2 = (PFN_vkGetPhysicalDeviceProperties2)load(context, "vkGetPhysicalDeviceProperties2"); vkGetPhysicalDeviceQueueFamilyProperties2 = (PFN_vkGetPhysicalDeviceQueueFamilyProperties2)load(context, "vkGetPhysicalDeviceQueueFamilyProperties2"); vkGetPhysicalDeviceSparseImageFormatProperties2 = (PFN_vkGetPhysicalDeviceSparseImageFormatProperties2)load(context, "vkGetPhysicalDeviceSparseImageFormatProperties2"); #endif /* defined(VK_VERSION_1_1) */ #if defined(VK_VERSION_1_3) vkGetPhysicalDeviceToolProperties = (PFN_vkGetPhysicalDeviceToolProperties)load(context, "vkGetPhysicalDeviceToolProperties"); #endif /* defined(VK_VERSION_1_3) */ #if defined(VK_EXT_acquire_drm_display) vkAcquireDrmDisplayEXT = (PFN_vkAcquireDrmDisplayEXT)load(context, "vkAcquireDrmDisplayEXT"); vkGetDrmDisplayEXT = (PFN_vkGetDrmDisplayEXT)load(context, "vkGetDrmDisplayEXT"); #endif /* defined(VK_EXT_acquire_drm_display) */ #if defined(VK_EXT_acquire_xlib_display) vkAcquireXlibDisplayEXT = (PFN_vkAcquireXlibDisplayEXT)load(context, "vkAcquireXlibDisplayEXT"); vkGetRandROutputDisplayEXT = (PFN_vkGetRandROutputDisplayEXT)load(context, "vkGetRandROutputDisplayEXT"); #endif /* defined(VK_EXT_acquire_xlib_display) */ #if defined(VK_EXT_calibrated_timestamps) vkGetPhysicalDeviceCalibrateableTimeDomainsEXT = (PFN_vkGetPhysicalDeviceCalibrateableTimeDomainsEXT)load(context, "vkGetPhysicalDeviceCalibrateableTimeDomainsEXT"); #endif /* defined(VK_EXT_calibrated_timestamps) */ #if defined(VK_EXT_debug_report) vkCreateDebugReportCallbackEXT = (PFN_vkCreateDebugReportCallbackEXT)load(context, "vkCreateDebugReportCallbackEXT"); vkDebugReportMessageEXT = (PFN_vkDebugReportMessageEXT)load(context, "vkDebugReportMessageEXT"); vkDestroyDebugReportCallbackEXT = (PFN_vkDestroyDebugReportCallbackEXT)load(context, "vkDestroyDebugReportCallbackEXT"); #endif /* defined(VK_EXT_debug_report) */ #if defined(VK_EXT_debug_utils) vkCmdBeginDebugUtilsLabelEXT = (PFN_vkCmdBeginDebugUtilsLabelEXT)load(context, "vkCmdBeginDebugUtilsLabelEXT"); vkCmdEndDebugUtilsLabelEXT = (PFN_vkCmdEndDebugUtilsLabelEXT)load(context, "vkCmdEndDebugUtilsLabelEXT"); vkCmdInsertDebugUtilsLabelEXT = (PFN_vkCmdInsertDebugUtilsLabelEXT)load(context, "vkCmdInsertDebugUtilsLabelEXT"); vkCreateDebugUtilsMessengerEXT = (PFN_vkCreateDebugUtilsMessengerEXT)load(context, "vkCreateDebugUtilsMessengerEXT"); vkDestroyDebugUtilsMessengerEXT = (PFN_vkDestroyDebugUtilsMessengerEXT)load(context, "vkDestroyDebugUtilsMessengerEXT"); vkQueueBeginDebugUtilsLabelEXT = (PFN_vkQueueBeginDebugUtilsLabelEXT)load(context, "vkQueueBeginDebugUtilsLabelEXT"); vkQueueEndDebugUtilsLabelEXT = (PFN_vkQueueEndDebugUtilsLabelEXT)load(context, "vkQueueEndDebugUtilsLabelEXT"); vkQueueInsertDebugUtilsLabelEXT = (PFN_vkQueueInsertDebugUtilsLabelEXT)load(context, "vkQueueInsertDebugUtilsLabelEXT"); vkSetDebugUtilsObjectNameEXT = (PFN_vkSetDebugUtilsObjectNameEXT)load(context, "vkSetDebugUtilsObjectNameEXT"); vkSetDebugUtilsObjectTagEXT = (PFN_vkSetDebugUtilsObjectTagEXT)load(context, "vkSetDebugUtilsObjectTagEXT"); vkSubmitDebugUtilsMessageEXT = (PFN_vkSubmitDebugUtilsMessageEXT)load(context, "vkSubmitDebugUtilsMessageEXT"); #endif /* defined(VK_EXT_debug_utils) */ #if defined(VK_EXT_direct_mode_display) vkReleaseDisplayEXT = (PFN_vkReleaseDisplayEXT)load(context, "vkReleaseDisplayEXT"); #endif /* defined(VK_EXT_direct_mode_display) */ #if defined(VK_EXT_directfb_surface) vkCreateDirectFBSurfaceEXT = (PFN_vkCreateDirectFBSurfaceEXT)load(context, "vkCreateDirectFBSurfaceEXT"); vkGetPhysicalDeviceDirectFBPresentationSupportEXT = (PFN_vkGetPhysicalDeviceDirectFBPresentationSupportEXT)load(context, "vkGetPhysicalDeviceDirectFBPresentationSupportEXT"); #endif /* defined(VK_EXT_directfb_surface) */ #if defined(VK_EXT_display_surface_counter) vkGetPhysicalDeviceSurfaceCapabilities2EXT = (PFN_vkGetPhysicalDeviceSurfaceCapabilities2EXT)load(context, "vkGetPhysicalDeviceSurfaceCapabilities2EXT"); #endif /* defined(VK_EXT_display_surface_counter) */ #if defined(VK_EXT_full_screen_exclusive) vkGetPhysicalDeviceSurfacePresentModes2EXT = (PFN_vkGetPhysicalDeviceSurfacePresentModes2EXT)load(context, "vkGetPhysicalDeviceSurfacePresentModes2EXT"); #endif /* defined(VK_EXT_full_screen_exclusive) */ #if defined(VK_EXT_headless_surface) vkCreateHeadlessSurfaceEXT = (PFN_vkCreateHeadlessSurfaceEXT)load(context, "vkCreateHeadlessSurfaceEXT"); #endif /* defined(VK_EXT_headless_surface) */ #if defined(VK_EXT_metal_surface) vkCreateMetalSurfaceEXT = (PFN_vkCreateMetalSurfaceEXT)load(context, "vkCreateMetalSurfaceEXT"); #endif /* defined(VK_EXT_metal_surface) */ #if defined(VK_EXT_sample_locations) vkGetPhysicalDeviceMultisamplePropertiesEXT = (PFN_vkGetPhysicalDeviceMultisamplePropertiesEXT)load(context, "vkGetPhysicalDeviceMultisamplePropertiesEXT"); #endif /* defined(VK_EXT_sample_locations) */ #if defined(VK_EXT_tooling_info) vkGetPhysicalDeviceToolPropertiesEXT = (PFN_vkGetPhysicalDeviceToolPropertiesEXT)load(context, "vkGetPhysicalDeviceToolPropertiesEXT"); #endif /* defined(VK_EXT_tooling_info) */ #if defined(VK_FUCHSIA_imagepipe_surface) vkCreateImagePipeSurfaceFUCHSIA = (PFN_vkCreateImagePipeSurfaceFUCHSIA)load(context, "vkCreateImagePipeSurfaceFUCHSIA"); #endif /* defined(VK_FUCHSIA_imagepipe_surface) */ #if defined(VK_GGP_stream_descriptor_surface) vkCreateStreamDescriptorSurfaceGGP = (PFN_vkCreateStreamDescriptorSurfaceGGP)load(context, "vkCreateStreamDescriptorSurfaceGGP"); #endif /* defined(VK_GGP_stream_descriptor_surface) */ #if defined(VK_KHR_android_surface) vkCreateAndroidSurfaceKHR = (PFN_vkCreateAndroidSurfaceKHR)load(context, "vkCreateAndroidSurfaceKHR"); #endif /* defined(VK_KHR_android_surface) */ #if defined(VK_KHR_calibrated_timestamps) vkGetPhysicalDeviceCalibrateableTimeDomainsKHR = (PFN_vkGetPhysicalDeviceCalibrateableTimeDomainsKHR)load(context, "vkGetPhysicalDeviceCalibrateableTimeDomainsKHR"); #endif /* defined(VK_KHR_calibrated_timestamps) */ #if defined(VK_KHR_cooperative_matrix) vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR = (PFN_vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR)load(context, "vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR"); #endif /* defined(VK_KHR_cooperative_matrix) */ #if defined(VK_KHR_device_group_creation) vkEnumeratePhysicalDeviceGroupsKHR = (PFN_vkEnumeratePhysicalDeviceGroupsKHR)load(context, "vkEnumeratePhysicalDeviceGroupsKHR"); #endif /* defined(VK_KHR_device_group_creation) */ #if defined(VK_KHR_display) vkCreateDisplayModeKHR = (PFN_vkCreateDisplayModeKHR)load(context, "vkCreateDisplayModeKHR"); vkCreateDisplayPlaneSurfaceKHR = (PFN_vkCreateDisplayPlaneSurfaceKHR)load(context, "vkCreateDisplayPlaneSurfaceKHR"); vkGetDisplayModePropertiesKHR = (PFN_vkGetDisplayModePropertiesKHR)load(context, "vkGetDisplayModePropertiesKHR"); vkGetDisplayPlaneCapabilitiesKHR = (PFN_vkGetDisplayPlaneCapabilitiesKHR)load(context, "vkGetDisplayPlaneCapabilitiesKHR"); vkGetDisplayPlaneSupportedDisplaysKHR = (PFN_vkGetDisplayPlaneSupportedDisplaysKHR)load(context, "vkGetDisplayPlaneSupportedDisplaysKHR"); vkGetPhysicalDeviceDisplayPlanePropertiesKHR = (PFN_vkGetPhysicalDeviceDisplayPlanePropertiesKHR)load(context, "vkGetPhysicalDeviceDisplayPlanePropertiesKHR"); vkGetPhysicalDeviceDisplayPropertiesKHR = (PFN_vkGetPhysicalDeviceDisplayPropertiesKHR)load(context, "vkGetPhysicalDeviceDisplayPropertiesKHR"); #endif /* defined(VK_KHR_display) */ #if defined(VK_KHR_external_fence_capabilities) vkGetPhysicalDeviceExternalFencePropertiesKHR = (PFN_vkGetPhysicalDeviceExternalFencePropertiesKHR)load(context, "vkGetPhysicalDeviceExternalFencePropertiesKHR"); #endif /* defined(VK_KHR_external_fence_capabilities) */ #if defined(VK_KHR_external_memory_capabilities) vkGetPhysicalDeviceExternalBufferPropertiesKHR = (PFN_vkGetPhysicalDeviceExternalBufferPropertiesKHR)load(context, "vkGetPhysicalDeviceExternalBufferPropertiesKHR"); #endif /* defined(VK_KHR_external_memory_capabilities) */ #if defined(VK_KHR_external_semaphore_capabilities) vkGetPhysicalDeviceExternalSemaphorePropertiesKHR = (PFN_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR)load(context, "vkGetPhysicalDeviceExternalSemaphorePropertiesKHR"); #endif /* defined(VK_KHR_external_semaphore_capabilities) */ #if defined(VK_KHR_fragment_shading_rate) vkGetPhysicalDeviceFragmentShadingRatesKHR = (PFN_vkGetPhysicalDeviceFragmentShadingRatesKHR)load(context, "vkGetPhysicalDeviceFragmentShadingRatesKHR"); #endif /* defined(VK_KHR_fragment_shading_rate) */ #if defined(VK_KHR_get_display_properties2) vkGetDisplayModeProperties2KHR = (PFN_vkGetDisplayModeProperties2KHR)load(context, "vkGetDisplayModeProperties2KHR"); vkGetDisplayPlaneCapabilities2KHR = (PFN_vkGetDisplayPlaneCapabilities2KHR)load(context, "vkGetDisplayPlaneCapabilities2KHR"); vkGetPhysicalDeviceDisplayPlaneProperties2KHR = (PFN_vkGetPhysicalDeviceDisplayPlaneProperties2KHR)load(context, "vkGetPhysicalDeviceDisplayPlaneProperties2KHR"); vkGetPhysicalDeviceDisplayProperties2KHR = (PFN_vkGetPhysicalDeviceDisplayProperties2KHR)load(context, "vkGetPhysicalDeviceDisplayProperties2KHR"); #endif /* defined(VK_KHR_get_display_properties2) */ #if defined(VK_KHR_get_physical_device_properties2) vkGetPhysicalDeviceFeatures2KHR = (PFN_vkGetPhysicalDeviceFeatures2KHR)load(context, "vkGetPhysicalDeviceFeatures2KHR"); vkGetPhysicalDeviceFormatProperties2KHR = (PFN_vkGetPhysicalDeviceFormatProperties2KHR)load(context, "vkGetPhysicalDeviceFormatProperties2KHR"); vkGetPhysicalDeviceImageFormatProperties2KHR = (PFN_vkGetPhysicalDeviceImageFormatProperties2KHR)load(context, "vkGetPhysicalDeviceImageFormatProperties2KHR"); vkGetPhysicalDeviceMemoryProperties2KHR = (PFN_vkGetPhysicalDeviceMemoryProperties2KHR)load(context, "vkGetPhysicalDeviceMemoryProperties2KHR"); vkGetPhysicalDeviceProperties2KHR = (PFN_vkGetPhysicalDeviceProperties2KHR)load(context, "vkGetPhysicalDeviceProperties2KHR"); vkGetPhysicalDeviceQueueFamilyProperties2KHR = (PFN_vkGetPhysicalDeviceQueueFamilyProperties2KHR)load(context, "vkGetPhysicalDeviceQueueFamilyProperties2KHR"); vkGetPhysicalDeviceSparseImageFormatProperties2KHR = (PFN_vkGetPhysicalDeviceSparseImageFormatProperties2KHR)load(context, "vkGetPhysicalDeviceSparseImageFormatProperties2KHR"); #endif /* defined(VK_KHR_get_physical_device_properties2) */ #if defined(VK_KHR_get_surface_capabilities2) vkGetPhysicalDeviceSurfaceCapabilities2KHR = (PFN_vkGetPhysicalDeviceSurfaceCapabilities2KHR)load(context, "vkGetPhysicalDeviceSurfaceCapabilities2KHR"); vkGetPhysicalDeviceSurfaceFormats2KHR = (PFN_vkGetPhysicalDeviceSurfaceFormats2KHR)load(context, "vkGetPhysicalDeviceSurfaceFormats2KHR"); #endif /* defined(VK_KHR_get_surface_capabilities2) */ #if defined(VK_KHR_performance_query) vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR = (PFN_vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR)load(context, "vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR"); vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR = (PFN_vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR)load(context, "vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR"); #endif /* defined(VK_KHR_performance_query) */ #if defined(VK_KHR_surface) vkDestroySurfaceKHR = (PFN_vkDestroySurfaceKHR)load(context, "vkDestroySurfaceKHR"); vkGetPhysicalDeviceSurfaceCapabilitiesKHR = (PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR)load(context, "vkGetPhysicalDeviceSurfaceCapabilitiesKHR"); vkGetPhysicalDeviceSurfaceFormatsKHR = (PFN_vkGetPhysicalDeviceSurfaceFormatsKHR)load(context, "vkGetPhysicalDeviceSurfaceFormatsKHR"); vkGetPhysicalDeviceSurfacePresentModesKHR = (PFN_vkGetPhysicalDeviceSurfacePresentModesKHR)load(context, "vkGetPhysicalDeviceSurfacePresentModesKHR"); vkGetPhysicalDeviceSurfaceSupportKHR = (PFN_vkGetPhysicalDeviceSurfaceSupportKHR)load(context, "vkGetPhysicalDeviceSurfaceSupportKHR"); #endif /* defined(VK_KHR_surface) */ #if defined(VK_KHR_video_encode_queue) vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR = (PFN_vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR)load(context, "vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR"); #endif /* defined(VK_KHR_video_encode_queue) */ #if defined(VK_KHR_video_queue) vkGetPhysicalDeviceVideoCapabilitiesKHR = (PFN_vkGetPhysicalDeviceVideoCapabilitiesKHR)load(context, "vkGetPhysicalDeviceVideoCapabilitiesKHR"); vkGetPhysicalDeviceVideoFormatPropertiesKHR = (PFN_vkGetPhysicalDeviceVideoFormatPropertiesKHR)load(context, "vkGetPhysicalDeviceVideoFormatPropertiesKHR"); #endif /* defined(VK_KHR_video_queue) */ #if defined(VK_KHR_wayland_surface) vkCreateWaylandSurfaceKHR = (PFN_vkCreateWaylandSurfaceKHR)load(context, "vkCreateWaylandSurfaceKHR"); vkGetPhysicalDeviceWaylandPresentationSupportKHR = (PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR)load(context, "vkGetPhysicalDeviceWaylandPresentationSupportKHR"); #endif /* defined(VK_KHR_wayland_surface) */ #if defined(VK_KHR_win32_surface) vkCreateWin32SurfaceKHR = (PFN_vkCreateWin32SurfaceKHR)load(context, "vkCreateWin32SurfaceKHR"); vkGetPhysicalDeviceWin32PresentationSupportKHR = (PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR)load(context, "vkGetPhysicalDeviceWin32PresentationSupportKHR"); #endif /* defined(VK_KHR_win32_surface) */ #if defined(VK_KHR_xcb_surface) vkCreateXcbSurfaceKHR = (PFN_vkCreateXcbSurfaceKHR)load(context, "vkCreateXcbSurfaceKHR"); vkGetPhysicalDeviceXcbPresentationSupportKHR = (PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR)load(context, "vkGetPhysicalDeviceXcbPresentationSupportKHR"); #endif /* defined(VK_KHR_xcb_surface) */ #if defined(VK_KHR_xlib_surface) vkCreateXlibSurfaceKHR = (PFN_vkCreateXlibSurfaceKHR)load(context, "vkCreateXlibSurfaceKHR"); vkGetPhysicalDeviceXlibPresentationSupportKHR = (PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR)load(context, "vkGetPhysicalDeviceXlibPresentationSupportKHR"); #endif /* defined(VK_KHR_xlib_surface) */ #if defined(VK_MVK_ios_surface) vkCreateIOSSurfaceMVK = (PFN_vkCreateIOSSurfaceMVK)load(context, "vkCreateIOSSurfaceMVK"); #endif /* defined(VK_MVK_ios_surface) */ #if defined(VK_MVK_macos_surface) vkCreateMacOSSurfaceMVK = (PFN_vkCreateMacOSSurfaceMVK)load(context, "vkCreateMacOSSurfaceMVK"); #endif /* defined(VK_MVK_macos_surface) */ #if defined(VK_NN_vi_surface) vkCreateViSurfaceNN = (PFN_vkCreateViSurfaceNN)load(context, "vkCreateViSurfaceNN"); #endif /* defined(VK_NN_vi_surface) */ #if defined(VK_NV_acquire_winrt_display) vkAcquireWinrtDisplayNV = (PFN_vkAcquireWinrtDisplayNV)load(context, "vkAcquireWinrtDisplayNV"); vkGetWinrtDisplayNV = (PFN_vkGetWinrtDisplayNV)load(context, "vkGetWinrtDisplayNV"); #endif /* defined(VK_NV_acquire_winrt_display) */ #if defined(VK_NV_cooperative_matrix) vkGetPhysicalDeviceCooperativeMatrixPropertiesNV = (PFN_vkGetPhysicalDeviceCooperativeMatrixPropertiesNV)load(context, "vkGetPhysicalDeviceCooperativeMatrixPropertiesNV"); #endif /* defined(VK_NV_cooperative_matrix) */ #if defined(VK_NV_cooperative_matrix2) vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV = (PFN_vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV)load(context, "vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV"); #endif /* defined(VK_NV_cooperative_matrix2) */ #if defined(VK_NV_cooperative_vector) vkGetPhysicalDeviceCooperativeVectorPropertiesNV = (PFN_vkGetPhysicalDeviceCooperativeVectorPropertiesNV)load(context, "vkGetPhysicalDeviceCooperativeVectorPropertiesNV"); #endif /* defined(VK_NV_cooperative_vector) */ #if defined(VK_NV_coverage_reduction_mode) vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV = (PFN_vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV)load(context, "vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV"); #endif /* defined(VK_NV_coverage_reduction_mode) */ #if defined(VK_NV_external_memory_capabilities) vkGetPhysicalDeviceExternalImageFormatPropertiesNV = (PFN_vkGetPhysicalDeviceExternalImageFormatPropertiesNV)load(context, "vkGetPhysicalDeviceExternalImageFormatPropertiesNV"); #endif /* defined(VK_NV_external_memory_capabilities) */ #if defined(VK_NV_optical_flow) vkGetPhysicalDeviceOpticalFlowImageFormatsNV = (PFN_vkGetPhysicalDeviceOpticalFlowImageFormatsNV)load(context, "vkGetPhysicalDeviceOpticalFlowImageFormatsNV"); #endif /* defined(VK_NV_optical_flow) */ #if defined(VK_QNX_screen_surface) vkCreateScreenSurfaceQNX = (PFN_vkCreateScreenSurfaceQNX)load(context, "vkCreateScreenSurfaceQNX"); vkGetPhysicalDeviceScreenPresentationSupportQNX = (PFN_vkGetPhysicalDeviceScreenPresentationSupportQNX)load(context, "vkGetPhysicalDeviceScreenPresentationSupportQNX"); #endif /* defined(VK_QNX_screen_surface) */ #if (defined(VK_KHR_device_group) && defined(VK_KHR_surface)) || (defined(VK_KHR_swapchain) && defined(VK_VERSION_1_1)) vkGetPhysicalDevicePresentRectanglesKHR = (PFN_vkGetPhysicalDevicePresentRectanglesKHR)load(context, "vkGetPhysicalDevicePresentRectanglesKHR"); #endif /* (defined(VK_KHR_device_group) && defined(VK_KHR_surface)) || (defined(VK_KHR_swapchain) && defined(VK_VERSION_1_1)) */ /* VOLK_GENERATE_LOAD_INSTANCE */ } static void volkGenLoadDevice(void* context, PFN_vkVoidFunction (*load)(void*, const char*)) { /* VOLK_GENERATE_LOAD_DEVICE */ #if defined(VK_VERSION_1_0) vkAllocateCommandBuffers = (PFN_vkAllocateCommandBuffers)load(context, "vkAllocateCommandBuffers"); vkAllocateDescriptorSets = (PFN_vkAllocateDescriptorSets)load(context, "vkAllocateDescriptorSets"); vkAllocateMemory = (PFN_vkAllocateMemory)load(context, "vkAllocateMemory"); vkBeginCommandBuffer = (PFN_vkBeginCommandBuffer)load(context, "vkBeginCommandBuffer"); vkBindBufferMemory = (PFN_vkBindBufferMemory)load(context, "vkBindBufferMemory"); vkBindImageMemory = (PFN_vkBindImageMemory)load(context, "vkBindImageMemory"); vkCmdBeginQuery = (PFN_vkCmdBeginQuery)load(context, "vkCmdBeginQuery"); vkCmdBeginRenderPass = (PFN_vkCmdBeginRenderPass)load(context, "vkCmdBeginRenderPass"); vkCmdBindDescriptorSets = (PFN_vkCmdBindDescriptorSets)load(context, "vkCmdBindDescriptorSets"); vkCmdBindIndexBuffer = (PFN_vkCmdBindIndexBuffer)load(context, "vkCmdBindIndexBuffer"); vkCmdBindPipeline = (PFN_vkCmdBindPipeline)load(context, "vkCmdBindPipeline"); vkCmdBindVertexBuffers = (PFN_vkCmdBindVertexBuffers)load(context, "vkCmdBindVertexBuffers"); vkCmdBlitImage = (PFN_vkCmdBlitImage)load(context, "vkCmdBlitImage"); vkCmdClearAttachments = (PFN_vkCmdClearAttachments)load(context, "vkCmdClearAttachments"); vkCmdClearColorImage = (PFN_vkCmdClearColorImage)load(context, "vkCmdClearColorImage"); vkCmdClearDepthStencilImage = (PFN_vkCmdClearDepthStencilImage)load(context, "vkCmdClearDepthStencilImage"); vkCmdCopyBuffer = (PFN_vkCmdCopyBuffer)load(context, "vkCmdCopyBuffer"); vkCmdCopyBufferToImage = (PFN_vkCmdCopyBufferToImage)load(context, "vkCmdCopyBufferToImage"); vkCmdCopyImage = (PFN_vkCmdCopyImage)load(context, "vkCmdCopyImage"); vkCmdCopyImageToBuffer = (PFN_vkCmdCopyImageToBuffer)load(context, "vkCmdCopyImageToBuffer"); vkCmdCopyQueryPoolResults = (PFN_vkCmdCopyQueryPoolResults)load(context, "vkCmdCopyQueryPoolResults"); vkCmdDispatch = (PFN_vkCmdDispatch)load(context, "vkCmdDispatch"); vkCmdDispatchIndirect = (PFN_vkCmdDispatchIndirect)load(context, "vkCmdDispatchIndirect"); vkCmdDraw = (PFN_vkCmdDraw)load(context, "vkCmdDraw"); vkCmdDrawIndexed = (PFN_vkCmdDrawIndexed)load(context, "vkCmdDrawIndexed"); vkCmdDrawIndexedIndirect = (PFN_vkCmdDrawIndexedIndirect)load(context, "vkCmdDrawIndexedIndirect"); vkCmdDrawIndirect = (PFN_vkCmdDrawIndirect)load(context, "vkCmdDrawIndirect"); vkCmdEndQuery = (PFN_vkCmdEndQuery)load(context, "vkCmdEndQuery"); vkCmdEndRenderPass = (PFN_vkCmdEndRenderPass)load(context, "vkCmdEndRenderPass"); vkCmdExecuteCommands = (PFN_vkCmdExecuteCommands)load(context, "vkCmdExecuteCommands"); vkCmdFillBuffer = (PFN_vkCmdFillBuffer)load(context, "vkCmdFillBuffer"); vkCmdNextSubpass = (PFN_vkCmdNextSubpass)load(context, "vkCmdNextSubpass"); vkCmdPipelineBarrier = (PFN_vkCmdPipelineBarrier)load(context, "vkCmdPipelineBarrier"); vkCmdPushConstants = (PFN_vkCmdPushConstants)load(context, "vkCmdPushConstants"); vkCmdResetEvent = (PFN_vkCmdResetEvent)load(context, "vkCmdResetEvent"); vkCmdResetQueryPool = (PFN_vkCmdResetQueryPool)load(context, "vkCmdResetQueryPool"); vkCmdResolveImage = (PFN_vkCmdResolveImage)load(context, "vkCmdResolveImage"); vkCmdSetBlendConstants = (PFN_vkCmdSetBlendConstants)load(context, "vkCmdSetBlendConstants"); vkCmdSetDepthBias = (PFN_vkCmdSetDepthBias)load(context, "vkCmdSetDepthBias"); vkCmdSetDepthBounds = (PFN_vkCmdSetDepthBounds)load(context, "vkCmdSetDepthBounds"); vkCmdSetEvent = (PFN_vkCmdSetEvent)load(context, "vkCmdSetEvent"); vkCmdSetLineWidth = (PFN_vkCmdSetLineWidth)load(context, "vkCmdSetLineWidth"); vkCmdSetScissor = (PFN_vkCmdSetScissor)load(context, "vkCmdSetScissor"); vkCmdSetStencilCompareMask = (PFN_vkCmdSetStencilCompareMask)load(context, "vkCmdSetStencilCompareMask"); vkCmdSetStencilReference = (PFN_vkCmdSetStencilReference)load(context, "vkCmdSetStencilReference"); vkCmdSetStencilWriteMask = (PFN_vkCmdSetStencilWriteMask)load(context, "vkCmdSetStencilWriteMask"); vkCmdSetViewport = (PFN_vkCmdSetViewport)load(context, "vkCmdSetViewport"); vkCmdUpdateBuffer = (PFN_vkCmdUpdateBuffer)load(context, "vkCmdUpdateBuffer"); vkCmdWaitEvents = (PFN_vkCmdWaitEvents)load(context, "vkCmdWaitEvents"); vkCmdWriteTimestamp = (PFN_vkCmdWriteTimestamp)load(context, "vkCmdWriteTimestamp"); vkCreateBuffer = (PFN_vkCreateBuffer)load(context, "vkCreateBuffer"); vkCreateBufferView = (PFN_vkCreateBufferView)load(context, "vkCreateBufferView"); vkCreateCommandPool = (PFN_vkCreateCommandPool)load(context, "vkCreateCommandPool"); vkCreateComputePipelines = (PFN_vkCreateComputePipelines)load(context, "vkCreateComputePipelines"); vkCreateDescriptorPool = (PFN_vkCreateDescriptorPool)load(context, "vkCreateDescriptorPool"); vkCreateDescriptorSetLayout = (PFN_vkCreateDescriptorSetLayout)load(context, "vkCreateDescriptorSetLayout"); vkCreateEvent = (PFN_vkCreateEvent)load(context, "vkCreateEvent"); vkCreateFence = (PFN_vkCreateFence)load(context, "vkCreateFence"); vkCreateFramebuffer = (PFN_vkCreateFramebuffer)load(context, "vkCreateFramebuffer"); vkCreateGraphicsPipelines = (PFN_vkCreateGraphicsPipelines)load(context, "vkCreateGraphicsPipelines"); vkCreateImage = (PFN_vkCreateImage)load(context, "vkCreateImage"); vkCreateImageView = (PFN_vkCreateImageView)load(context, "vkCreateImageView"); vkCreatePipelineCache = (PFN_vkCreatePipelineCache)load(context, "vkCreatePipelineCache"); vkCreatePipelineLayout = (PFN_vkCreatePipelineLayout)load(context, "vkCreatePipelineLayout"); vkCreateQueryPool = (PFN_vkCreateQueryPool)load(context, "vkCreateQueryPool"); vkCreateRenderPass = (PFN_vkCreateRenderPass)load(context, "vkCreateRenderPass"); vkCreateSampler = (PFN_vkCreateSampler)load(context, "vkCreateSampler"); vkCreateSemaphore = (PFN_vkCreateSemaphore)load(context, "vkCreateSemaphore"); vkCreateShaderModule = (PFN_vkCreateShaderModule)load(context, "vkCreateShaderModule"); vkDestroyBuffer = (PFN_vkDestroyBuffer)load(context, "vkDestroyBuffer"); vkDestroyBufferView = (PFN_vkDestroyBufferView)load(context, "vkDestroyBufferView"); vkDestroyCommandPool = (PFN_vkDestroyCommandPool)load(context, "vkDestroyCommandPool"); vkDestroyDescriptorPool = (PFN_vkDestroyDescriptorPool)load(context, "vkDestroyDescriptorPool"); vkDestroyDescriptorSetLayout = (PFN_vkDestroyDescriptorSetLayout)load(context, "vkDestroyDescriptorSetLayout"); vkDestroyDevice = (PFN_vkDestroyDevice)load(context, "vkDestroyDevice"); vkDestroyEvent = (PFN_vkDestroyEvent)load(context, "vkDestroyEvent"); vkDestroyFence = (PFN_vkDestroyFence)load(context, "vkDestroyFence"); vkDestroyFramebuffer = (PFN_vkDestroyFramebuffer)load(context, "vkDestroyFramebuffer"); vkDestroyImage = (PFN_vkDestroyImage)load(context, "vkDestroyImage"); vkDestroyImageView = (PFN_vkDestroyImageView)load(context, "vkDestroyImageView"); vkDestroyPipeline = (PFN_vkDestroyPipeline)load(context, "vkDestroyPipeline"); vkDestroyPipelineCache = (PFN_vkDestroyPipelineCache)load(context, "vkDestroyPipelineCache"); vkDestroyPipelineLayout = (PFN_vkDestroyPipelineLayout)load(context, "vkDestroyPipelineLayout"); vkDestroyQueryPool = (PFN_vkDestroyQueryPool)load(context, "vkDestroyQueryPool"); vkDestroyRenderPass = (PFN_vkDestroyRenderPass)load(context, "vkDestroyRenderPass"); vkDestroySampler = (PFN_vkDestroySampler)load(context, "vkDestroySampler"); vkDestroySemaphore = (PFN_vkDestroySemaphore)load(context, "vkDestroySemaphore"); vkDestroyShaderModule = (PFN_vkDestroyShaderModule)load(context, "vkDestroyShaderModule"); vkDeviceWaitIdle = (PFN_vkDeviceWaitIdle)load(context, "vkDeviceWaitIdle"); vkEndCommandBuffer = (PFN_vkEndCommandBuffer)load(context, "vkEndCommandBuffer"); vkFlushMappedMemoryRanges = (PFN_vkFlushMappedMemoryRanges)load(context, "vkFlushMappedMemoryRanges"); vkFreeCommandBuffers = (PFN_vkFreeCommandBuffers)load(context, "vkFreeCommandBuffers"); vkFreeDescriptorSets = (PFN_vkFreeDescriptorSets)load(context, "vkFreeDescriptorSets"); vkFreeMemory = (PFN_vkFreeMemory)load(context, "vkFreeMemory"); vkGetBufferMemoryRequirements = (PFN_vkGetBufferMemoryRequirements)load(context, "vkGetBufferMemoryRequirements"); vkGetDeviceMemoryCommitment = (PFN_vkGetDeviceMemoryCommitment)load(context, "vkGetDeviceMemoryCommitment"); vkGetDeviceQueue = (PFN_vkGetDeviceQueue)load(context, "vkGetDeviceQueue"); vkGetEventStatus = (PFN_vkGetEventStatus)load(context, "vkGetEventStatus"); vkGetFenceStatus = (PFN_vkGetFenceStatus)load(context, "vkGetFenceStatus"); vkGetImageMemoryRequirements = (PFN_vkGetImageMemoryRequirements)load(context, "vkGetImageMemoryRequirements"); vkGetImageSparseMemoryRequirements = (PFN_vkGetImageSparseMemoryRequirements)load(context, "vkGetImageSparseMemoryRequirements"); vkGetImageSubresourceLayout = (PFN_vkGetImageSubresourceLayout)load(context, "vkGetImageSubresourceLayout"); vkGetPipelineCacheData = (PFN_vkGetPipelineCacheData)load(context, "vkGetPipelineCacheData"); vkGetQueryPoolResults = (PFN_vkGetQueryPoolResults)load(context, "vkGetQueryPoolResults"); vkGetRenderAreaGranularity = (PFN_vkGetRenderAreaGranularity)load(context, "vkGetRenderAreaGranularity"); vkInvalidateMappedMemoryRanges = (PFN_vkInvalidateMappedMemoryRanges)load(context, "vkInvalidateMappedMemoryRanges"); vkMapMemory = (PFN_vkMapMemory)load(context, "vkMapMemory"); vkMergePipelineCaches = (PFN_vkMergePipelineCaches)load(context, "vkMergePipelineCaches"); vkQueueBindSparse = (PFN_vkQueueBindSparse)load(context, "vkQueueBindSparse"); vkQueueSubmit = (PFN_vkQueueSubmit)load(context, "vkQueueSubmit"); vkQueueWaitIdle = (PFN_vkQueueWaitIdle)load(context, "vkQueueWaitIdle"); vkResetCommandBuffer = (PFN_vkResetCommandBuffer)load(context, "vkResetCommandBuffer"); vkResetCommandPool = (PFN_vkResetCommandPool)load(context, "vkResetCommandPool"); vkResetDescriptorPool = (PFN_vkResetDescriptorPool)load(context, "vkResetDescriptorPool"); vkResetEvent = (PFN_vkResetEvent)load(context, "vkResetEvent"); vkResetFences = (PFN_vkResetFences)load(context, "vkResetFences"); vkSetEvent = (PFN_vkSetEvent)load(context, "vkSetEvent"); vkUnmapMemory = (PFN_vkUnmapMemory)load(context, "vkUnmapMemory"); vkUpdateDescriptorSets = (PFN_vkUpdateDescriptorSets)load(context, "vkUpdateDescriptorSets"); vkWaitForFences = (PFN_vkWaitForFences)load(context, "vkWaitForFences"); #endif /* defined(VK_VERSION_1_0) */ #if defined(VK_VERSION_1_1) vkBindBufferMemory2 = (PFN_vkBindBufferMemory2)load(context, "vkBindBufferMemory2"); vkBindImageMemory2 = (PFN_vkBindImageMemory2)load(context, "vkBindImageMemory2"); vkCmdDispatchBase = (PFN_vkCmdDispatchBase)load(context, "vkCmdDispatchBase"); vkCmdSetDeviceMask = (PFN_vkCmdSetDeviceMask)load(context, "vkCmdSetDeviceMask"); vkCreateDescriptorUpdateTemplate = (PFN_vkCreateDescriptorUpdateTemplate)load(context, "vkCreateDescriptorUpdateTemplate"); vkCreateSamplerYcbcrConversion = (PFN_vkCreateSamplerYcbcrConversion)load(context, "vkCreateSamplerYcbcrConversion"); vkDestroyDescriptorUpdateTemplate = (PFN_vkDestroyDescriptorUpdateTemplate)load(context, "vkDestroyDescriptorUpdateTemplate"); vkDestroySamplerYcbcrConversion = (PFN_vkDestroySamplerYcbcrConversion)load(context, "vkDestroySamplerYcbcrConversion"); vkGetBufferMemoryRequirements2 = (PFN_vkGetBufferMemoryRequirements2)load(context, "vkGetBufferMemoryRequirements2"); vkGetDescriptorSetLayoutSupport = (PFN_vkGetDescriptorSetLayoutSupport)load(context, "vkGetDescriptorSetLayoutSupport"); vkGetDeviceGroupPeerMemoryFeatures = (PFN_vkGetDeviceGroupPeerMemoryFeatures)load(context, "vkGetDeviceGroupPeerMemoryFeatures"); vkGetDeviceQueue2 = (PFN_vkGetDeviceQueue2)load(context, "vkGetDeviceQueue2"); vkGetImageMemoryRequirements2 = (PFN_vkGetImageMemoryRequirements2)load(context, "vkGetImageMemoryRequirements2"); vkGetImageSparseMemoryRequirements2 = (PFN_vkGetImageSparseMemoryRequirements2)load(context, "vkGetImageSparseMemoryRequirements2"); vkTrimCommandPool = (PFN_vkTrimCommandPool)load(context, "vkTrimCommandPool"); vkUpdateDescriptorSetWithTemplate = (PFN_vkUpdateDescriptorSetWithTemplate)load(context, "vkUpdateDescriptorSetWithTemplate"); #endif /* defined(VK_VERSION_1_1) */ #if defined(VK_VERSION_1_2) vkCmdBeginRenderPass2 = (PFN_vkCmdBeginRenderPass2)load(context, "vkCmdBeginRenderPass2"); vkCmdDrawIndexedIndirectCount = (PFN_vkCmdDrawIndexedIndirectCount)load(context, "vkCmdDrawIndexedIndirectCount"); vkCmdDrawIndirectCount = (PFN_vkCmdDrawIndirectCount)load(context, "vkCmdDrawIndirectCount"); vkCmdEndRenderPass2 = (PFN_vkCmdEndRenderPass2)load(context, "vkCmdEndRenderPass2"); vkCmdNextSubpass2 = (PFN_vkCmdNextSubpass2)load(context, "vkCmdNextSubpass2"); vkCreateRenderPass2 = (PFN_vkCreateRenderPass2)load(context, "vkCreateRenderPass2"); vkGetBufferDeviceAddress = (PFN_vkGetBufferDeviceAddress)load(context, "vkGetBufferDeviceAddress"); vkGetBufferOpaqueCaptureAddress = (PFN_vkGetBufferOpaqueCaptureAddress)load(context, "vkGetBufferOpaqueCaptureAddress"); vkGetDeviceMemoryOpaqueCaptureAddress = (PFN_vkGetDeviceMemoryOpaqueCaptureAddress)load(context, "vkGetDeviceMemoryOpaqueCaptureAddress"); vkGetSemaphoreCounterValue = (PFN_vkGetSemaphoreCounterValue)load(context, "vkGetSemaphoreCounterValue"); vkResetQueryPool = (PFN_vkResetQueryPool)load(context, "vkResetQueryPool"); vkSignalSemaphore = (PFN_vkSignalSemaphore)load(context, "vkSignalSemaphore"); vkWaitSemaphores = (PFN_vkWaitSemaphores)load(context, "vkWaitSemaphores"); #endif /* defined(VK_VERSION_1_2) */ #if defined(VK_VERSION_1_3) vkCmdBeginRendering = (PFN_vkCmdBeginRendering)load(context, "vkCmdBeginRendering"); vkCmdBindVertexBuffers2 = (PFN_vkCmdBindVertexBuffers2)load(context, "vkCmdBindVertexBuffers2"); vkCmdBlitImage2 = (PFN_vkCmdBlitImage2)load(context, "vkCmdBlitImage2"); vkCmdCopyBuffer2 = (PFN_vkCmdCopyBuffer2)load(context, "vkCmdCopyBuffer2"); vkCmdCopyBufferToImage2 = (PFN_vkCmdCopyBufferToImage2)load(context, "vkCmdCopyBufferToImage2"); vkCmdCopyImage2 = (PFN_vkCmdCopyImage2)load(context, "vkCmdCopyImage2"); vkCmdCopyImageToBuffer2 = (PFN_vkCmdCopyImageToBuffer2)load(context, "vkCmdCopyImageToBuffer2"); vkCmdEndRendering = (PFN_vkCmdEndRendering)load(context, "vkCmdEndRendering"); vkCmdPipelineBarrier2 = (PFN_vkCmdPipelineBarrier2)load(context, "vkCmdPipelineBarrier2"); vkCmdResetEvent2 = (PFN_vkCmdResetEvent2)load(context, "vkCmdResetEvent2"); vkCmdResolveImage2 = (PFN_vkCmdResolveImage2)load(context, "vkCmdResolveImage2"); vkCmdSetCullMode = (PFN_vkCmdSetCullMode)load(context, "vkCmdSetCullMode"); vkCmdSetDepthBiasEnable = (PFN_vkCmdSetDepthBiasEnable)load(context, "vkCmdSetDepthBiasEnable"); vkCmdSetDepthBoundsTestEnable = (PFN_vkCmdSetDepthBoundsTestEnable)load(context, "vkCmdSetDepthBoundsTestEnable"); vkCmdSetDepthCompareOp = (PFN_vkCmdSetDepthCompareOp)load(context, "vkCmdSetDepthCompareOp"); vkCmdSetDepthTestEnable = (PFN_vkCmdSetDepthTestEnable)load(context, "vkCmdSetDepthTestEnable"); vkCmdSetDepthWriteEnable = (PFN_vkCmdSetDepthWriteEnable)load(context, "vkCmdSetDepthWriteEnable"); vkCmdSetEvent2 = (PFN_vkCmdSetEvent2)load(context, "vkCmdSetEvent2"); vkCmdSetFrontFace = (PFN_vkCmdSetFrontFace)load(context, "vkCmdSetFrontFace"); vkCmdSetPrimitiveRestartEnable = (PFN_vkCmdSetPrimitiveRestartEnable)load(context, "vkCmdSetPrimitiveRestartEnable"); vkCmdSetPrimitiveTopology = (PFN_vkCmdSetPrimitiveTopology)load(context, "vkCmdSetPrimitiveTopology"); vkCmdSetRasterizerDiscardEnable = (PFN_vkCmdSetRasterizerDiscardEnable)load(context, "vkCmdSetRasterizerDiscardEnable"); vkCmdSetScissorWithCount = (PFN_vkCmdSetScissorWithCount)load(context, "vkCmdSetScissorWithCount"); vkCmdSetStencilOp = (PFN_vkCmdSetStencilOp)load(context, "vkCmdSetStencilOp"); vkCmdSetStencilTestEnable = (PFN_vkCmdSetStencilTestEnable)load(context, "vkCmdSetStencilTestEnable"); vkCmdSetViewportWithCount = (PFN_vkCmdSetViewportWithCount)load(context, "vkCmdSetViewportWithCount"); vkCmdWaitEvents2 = (PFN_vkCmdWaitEvents2)load(context, "vkCmdWaitEvents2"); vkCmdWriteTimestamp2 = (PFN_vkCmdWriteTimestamp2)load(context, "vkCmdWriteTimestamp2"); vkCreatePrivateDataSlot = (PFN_vkCreatePrivateDataSlot)load(context, "vkCreatePrivateDataSlot"); vkDestroyPrivateDataSlot = (PFN_vkDestroyPrivateDataSlot)load(context, "vkDestroyPrivateDataSlot"); vkGetDeviceBufferMemoryRequirements = (PFN_vkGetDeviceBufferMemoryRequirements)load(context, "vkGetDeviceBufferMemoryRequirements"); vkGetDeviceImageMemoryRequirements = (PFN_vkGetDeviceImageMemoryRequirements)load(context, "vkGetDeviceImageMemoryRequirements"); vkGetDeviceImageSparseMemoryRequirements = (PFN_vkGetDeviceImageSparseMemoryRequirements)load(context, "vkGetDeviceImageSparseMemoryRequirements"); vkGetPrivateData = (PFN_vkGetPrivateData)load(context, "vkGetPrivateData"); vkQueueSubmit2 = (PFN_vkQueueSubmit2)load(context, "vkQueueSubmit2"); vkSetPrivateData = (PFN_vkSetPrivateData)load(context, "vkSetPrivateData"); #endif /* defined(VK_VERSION_1_3) */ #if defined(VK_VERSION_1_4) vkCmdBindDescriptorSets2 = (PFN_vkCmdBindDescriptorSets2)load(context, "vkCmdBindDescriptorSets2"); vkCmdBindIndexBuffer2 = (PFN_vkCmdBindIndexBuffer2)load(context, "vkCmdBindIndexBuffer2"); vkCmdPushConstants2 = (PFN_vkCmdPushConstants2)load(context, "vkCmdPushConstants2"); vkCmdPushDescriptorSet = (PFN_vkCmdPushDescriptorSet)load(context, "vkCmdPushDescriptorSet"); vkCmdPushDescriptorSet2 = (PFN_vkCmdPushDescriptorSet2)load(context, "vkCmdPushDescriptorSet2"); vkCmdPushDescriptorSetWithTemplate = (PFN_vkCmdPushDescriptorSetWithTemplate)load(context, "vkCmdPushDescriptorSetWithTemplate"); vkCmdPushDescriptorSetWithTemplate2 = (PFN_vkCmdPushDescriptorSetWithTemplate2)load(context, "vkCmdPushDescriptorSetWithTemplate2"); vkCmdSetLineStipple = (PFN_vkCmdSetLineStipple)load(context, "vkCmdSetLineStipple"); vkCmdSetRenderingAttachmentLocations = (PFN_vkCmdSetRenderingAttachmentLocations)load(context, "vkCmdSetRenderingAttachmentLocations"); vkCmdSetRenderingInputAttachmentIndices = (PFN_vkCmdSetRenderingInputAttachmentIndices)load(context, "vkCmdSetRenderingInputAttachmentIndices"); vkCopyImageToImage = (PFN_vkCopyImageToImage)load(context, "vkCopyImageToImage"); vkCopyImageToMemory = (PFN_vkCopyImageToMemory)load(context, "vkCopyImageToMemory"); vkCopyMemoryToImage = (PFN_vkCopyMemoryToImage)load(context, "vkCopyMemoryToImage"); vkGetDeviceImageSubresourceLayout = (PFN_vkGetDeviceImageSubresourceLayout)load(context, "vkGetDeviceImageSubresourceLayout"); vkGetImageSubresourceLayout2 = (PFN_vkGetImageSubresourceLayout2)load(context, "vkGetImageSubresourceLayout2"); vkGetRenderingAreaGranularity = (PFN_vkGetRenderingAreaGranularity)load(context, "vkGetRenderingAreaGranularity"); vkMapMemory2 = (PFN_vkMapMemory2)load(context, "vkMapMemory2"); vkTransitionImageLayout = (PFN_vkTransitionImageLayout)load(context, "vkTransitionImageLayout"); vkUnmapMemory2 = (PFN_vkUnmapMemory2)load(context, "vkUnmapMemory2"); #endif /* defined(VK_VERSION_1_4) */ #if defined(VK_AMDX_shader_enqueue) vkCmdDispatchGraphAMDX = (PFN_vkCmdDispatchGraphAMDX)load(context, "vkCmdDispatchGraphAMDX"); vkCmdDispatchGraphIndirectAMDX = (PFN_vkCmdDispatchGraphIndirectAMDX)load(context, "vkCmdDispatchGraphIndirectAMDX"); vkCmdDispatchGraphIndirectCountAMDX = (PFN_vkCmdDispatchGraphIndirectCountAMDX)load(context, "vkCmdDispatchGraphIndirectCountAMDX"); vkCmdInitializeGraphScratchMemoryAMDX = (PFN_vkCmdInitializeGraphScratchMemoryAMDX)load(context, "vkCmdInitializeGraphScratchMemoryAMDX"); vkCreateExecutionGraphPipelinesAMDX = (PFN_vkCreateExecutionGraphPipelinesAMDX)load(context, "vkCreateExecutionGraphPipelinesAMDX"); vkGetExecutionGraphPipelineNodeIndexAMDX = (PFN_vkGetExecutionGraphPipelineNodeIndexAMDX)load(context, "vkGetExecutionGraphPipelineNodeIndexAMDX"); vkGetExecutionGraphPipelineScratchSizeAMDX = (PFN_vkGetExecutionGraphPipelineScratchSizeAMDX)load(context, "vkGetExecutionGraphPipelineScratchSizeAMDX"); #endif /* defined(VK_AMDX_shader_enqueue) */ #if defined(VK_AMD_anti_lag) vkAntiLagUpdateAMD = (PFN_vkAntiLagUpdateAMD)load(context, "vkAntiLagUpdateAMD"); #endif /* defined(VK_AMD_anti_lag) */ #if defined(VK_AMD_buffer_marker) vkCmdWriteBufferMarkerAMD = (PFN_vkCmdWriteBufferMarkerAMD)load(context, "vkCmdWriteBufferMarkerAMD"); #endif /* defined(VK_AMD_buffer_marker) */ #if defined(VK_AMD_buffer_marker) && (defined(VK_VERSION_1_3) || defined(VK_KHR_synchronization2)) vkCmdWriteBufferMarker2AMD = (PFN_vkCmdWriteBufferMarker2AMD)load(context, "vkCmdWriteBufferMarker2AMD"); #endif /* defined(VK_AMD_buffer_marker) && (defined(VK_VERSION_1_3) || defined(VK_KHR_synchronization2)) */ #if defined(VK_AMD_display_native_hdr) vkSetLocalDimmingAMD = (PFN_vkSetLocalDimmingAMD)load(context, "vkSetLocalDimmingAMD"); #endif /* defined(VK_AMD_display_native_hdr) */ #if defined(VK_AMD_draw_indirect_count) vkCmdDrawIndexedIndirectCountAMD = (PFN_vkCmdDrawIndexedIndirectCountAMD)load(context, "vkCmdDrawIndexedIndirectCountAMD"); vkCmdDrawIndirectCountAMD = (PFN_vkCmdDrawIndirectCountAMD)load(context, "vkCmdDrawIndirectCountAMD"); #endif /* defined(VK_AMD_draw_indirect_count) */ #if defined(VK_AMD_shader_info) vkGetShaderInfoAMD = (PFN_vkGetShaderInfoAMD)load(context, "vkGetShaderInfoAMD"); #endif /* defined(VK_AMD_shader_info) */ #if defined(VK_ANDROID_external_memory_android_hardware_buffer) vkGetAndroidHardwareBufferPropertiesANDROID = (PFN_vkGetAndroidHardwareBufferPropertiesANDROID)load(context, "vkGetAndroidHardwareBufferPropertiesANDROID"); vkGetMemoryAndroidHardwareBufferANDROID = (PFN_vkGetMemoryAndroidHardwareBufferANDROID)load(context, "vkGetMemoryAndroidHardwareBufferANDROID"); #endif /* defined(VK_ANDROID_external_memory_android_hardware_buffer) */ #if defined(VK_EXT_attachment_feedback_loop_dynamic_state) vkCmdSetAttachmentFeedbackLoopEnableEXT = (PFN_vkCmdSetAttachmentFeedbackLoopEnableEXT)load(context, "vkCmdSetAttachmentFeedbackLoopEnableEXT"); #endif /* defined(VK_EXT_attachment_feedback_loop_dynamic_state) */ #if defined(VK_EXT_buffer_device_address) vkGetBufferDeviceAddressEXT = (PFN_vkGetBufferDeviceAddressEXT)load(context, "vkGetBufferDeviceAddressEXT"); #endif /* defined(VK_EXT_buffer_device_address) */ #if defined(VK_EXT_calibrated_timestamps) vkGetCalibratedTimestampsEXT = (PFN_vkGetCalibratedTimestampsEXT)load(context, "vkGetCalibratedTimestampsEXT"); #endif /* defined(VK_EXT_calibrated_timestamps) */ #if defined(VK_EXT_color_write_enable) vkCmdSetColorWriteEnableEXT = (PFN_vkCmdSetColorWriteEnableEXT)load(context, "vkCmdSetColorWriteEnableEXT"); #endif /* defined(VK_EXT_color_write_enable) */ #if defined(VK_EXT_conditional_rendering) vkCmdBeginConditionalRenderingEXT = (PFN_vkCmdBeginConditionalRenderingEXT)load(context, "vkCmdBeginConditionalRenderingEXT"); vkCmdEndConditionalRenderingEXT = (PFN_vkCmdEndConditionalRenderingEXT)load(context, "vkCmdEndConditionalRenderingEXT"); #endif /* defined(VK_EXT_conditional_rendering) */ #if defined(VK_EXT_debug_marker) vkCmdDebugMarkerBeginEXT = (PFN_vkCmdDebugMarkerBeginEXT)load(context, "vkCmdDebugMarkerBeginEXT"); vkCmdDebugMarkerEndEXT = (PFN_vkCmdDebugMarkerEndEXT)load(context, "vkCmdDebugMarkerEndEXT"); vkCmdDebugMarkerInsertEXT = (PFN_vkCmdDebugMarkerInsertEXT)load(context, "vkCmdDebugMarkerInsertEXT"); vkDebugMarkerSetObjectNameEXT = (PFN_vkDebugMarkerSetObjectNameEXT)load(context, "vkDebugMarkerSetObjectNameEXT"); vkDebugMarkerSetObjectTagEXT = (PFN_vkDebugMarkerSetObjectTagEXT)load(context, "vkDebugMarkerSetObjectTagEXT"); #endif /* defined(VK_EXT_debug_marker) */ #if defined(VK_EXT_depth_bias_control) vkCmdSetDepthBias2EXT = (PFN_vkCmdSetDepthBias2EXT)load(context, "vkCmdSetDepthBias2EXT"); #endif /* defined(VK_EXT_depth_bias_control) */ #if defined(VK_EXT_descriptor_buffer) vkCmdBindDescriptorBufferEmbeddedSamplersEXT = (PFN_vkCmdBindDescriptorBufferEmbeddedSamplersEXT)load(context, "vkCmdBindDescriptorBufferEmbeddedSamplersEXT"); vkCmdBindDescriptorBuffersEXT = (PFN_vkCmdBindDescriptorBuffersEXT)load(context, "vkCmdBindDescriptorBuffersEXT"); vkCmdSetDescriptorBufferOffsetsEXT = (PFN_vkCmdSetDescriptorBufferOffsetsEXT)load(context, "vkCmdSetDescriptorBufferOffsetsEXT"); vkGetBufferOpaqueCaptureDescriptorDataEXT = (PFN_vkGetBufferOpaqueCaptureDescriptorDataEXT)load(context, "vkGetBufferOpaqueCaptureDescriptorDataEXT"); vkGetDescriptorEXT = (PFN_vkGetDescriptorEXT)load(context, "vkGetDescriptorEXT"); vkGetDescriptorSetLayoutBindingOffsetEXT = (PFN_vkGetDescriptorSetLayoutBindingOffsetEXT)load(context, "vkGetDescriptorSetLayoutBindingOffsetEXT"); vkGetDescriptorSetLayoutSizeEXT = (PFN_vkGetDescriptorSetLayoutSizeEXT)load(context, "vkGetDescriptorSetLayoutSizeEXT"); vkGetImageOpaqueCaptureDescriptorDataEXT = (PFN_vkGetImageOpaqueCaptureDescriptorDataEXT)load(context, "vkGetImageOpaqueCaptureDescriptorDataEXT"); vkGetImageViewOpaqueCaptureDescriptorDataEXT = (PFN_vkGetImageViewOpaqueCaptureDescriptorDataEXT)load(context, "vkGetImageViewOpaqueCaptureDescriptorDataEXT"); vkGetSamplerOpaqueCaptureDescriptorDataEXT = (PFN_vkGetSamplerOpaqueCaptureDescriptorDataEXT)load(context, "vkGetSamplerOpaqueCaptureDescriptorDataEXT"); #endif /* defined(VK_EXT_descriptor_buffer) */ #if defined(VK_EXT_descriptor_buffer) && (defined(VK_KHR_acceleration_structure) || defined(VK_NV_ray_tracing)) vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT = (PFN_vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT)load(context, "vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT"); #endif /* defined(VK_EXT_descriptor_buffer) && (defined(VK_KHR_acceleration_structure) || defined(VK_NV_ray_tracing)) */ #if defined(VK_EXT_device_fault) vkGetDeviceFaultInfoEXT = (PFN_vkGetDeviceFaultInfoEXT)load(context, "vkGetDeviceFaultInfoEXT"); #endif /* defined(VK_EXT_device_fault) */ #if defined(VK_EXT_device_generated_commands) vkCmdExecuteGeneratedCommandsEXT = (PFN_vkCmdExecuteGeneratedCommandsEXT)load(context, "vkCmdExecuteGeneratedCommandsEXT"); vkCmdPreprocessGeneratedCommandsEXT = (PFN_vkCmdPreprocessGeneratedCommandsEXT)load(context, "vkCmdPreprocessGeneratedCommandsEXT"); vkCreateIndirectCommandsLayoutEXT = (PFN_vkCreateIndirectCommandsLayoutEXT)load(context, "vkCreateIndirectCommandsLayoutEXT"); vkCreateIndirectExecutionSetEXT = (PFN_vkCreateIndirectExecutionSetEXT)load(context, "vkCreateIndirectExecutionSetEXT"); vkDestroyIndirectCommandsLayoutEXT = (PFN_vkDestroyIndirectCommandsLayoutEXT)load(context, "vkDestroyIndirectCommandsLayoutEXT"); vkDestroyIndirectExecutionSetEXT = (PFN_vkDestroyIndirectExecutionSetEXT)load(context, "vkDestroyIndirectExecutionSetEXT"); vkGetGeneratedCommandsMemoryRequirementsEXT = (PFN_vkGetGeneratedCommandsMemoryRequirementsEXT)load(context, "vkGetGeneratedCommandsMemoryRequirementsEXT"); vkUpdateIndirectExecutionSetPipelineEXT = (PFN_vkUpdateIndirectExecutionSetPipelineEXT)load(context, "vkUpdateIndirectExecutionSetPipelineEXT"); vkUpdateIndirectExecutionSetShaderEXT = (PFN_vkUpdateIndirectExecutionSetShaderEXT)load(context, "vkUpdateIndirectExecutionSetShaderEXT"); #endif /* defined(VK_EXT_device_generated_commands) */ #if defined(VK_EXT_discard_rectangles) vkCmdSetDiscardRectangleEXT = (PFN_vkCmdSetDiscardRectangleEXT)load(context, "vkCmdSetDiscardRectangleEXT"); #endif /* defined(VK_EXT_discard_rectangles) */ #if defined(VK_EXT_discard_rectangles) && VK_EXT_DISCARD_RECTANGLES_SPEC_VERSION >= 2 vkCmdSetDiscardRectangleEnableEXT = (PFN_vkCmdSetDiscardRectangleEnableEXT)load(context, "vkCmdSetDiscardRectangleEnableEXT"); vkCmdSetDiscardRectangleModeEXT = (PFN_vkCmdSetDiscardRectangleModeEXT)load(context, "vkCmdSetDiscardRectangleModeEXT"); #endif /* defined(VK_EXT_discard_rectangles) && VK_EXT_DISCARD_RECTANGLES_SPEC_VERSION >= 2 */ #if defined(VK_EXT_display_control) vkDisplayPowerControlEXT = (PFN_vkDisplayPowerControlEXT)load(context, "vkDisplayPowerControlEXT"); vkGetSwapchainCounterEXT = (PFN_vkGetSwapchainCounterEXT)load(context, "vkGetSwapchainCounterEXT"); vkRegisterDeviceEventEXT = (PFN_vkRegisterDeviceEventEXT)load(context, "vkRegisterDeviceEventEXT"); vkRegisterDisplayEventEXT = (PFN_vkRegisterDisplayEventEXT)load(context, "vkRegisterDisplayEventEXT"); #endif /* defined(VK_EXT_display_control) */ #if defined(VK_EXT_external_memory_host) vkGetMemoryHostPointerPropertiesEXT = (PFN_vkGetMemoryHostPointerPropertiesEXT)load(context, "vkGetMemoryHostPointerPropertiesEXT"); #endif /* defined(VK_EXT_external_memory_host) */ #if defined(VK_EXT_external_memory_metal) vkGetMemoryMetalHandleEXT = (PFN_vkGetMemoryMetalHandleEXT)load(context, "vkGetMemoryMetalHandleEXT"); vkGetMemoryMetalHandlePropertiesEXT = (PFN_vkGetMemoryMetalHandlePropertiesEXT)load(context, "vkGetMemoryMetalHandlePropertiesEXT"); #endif /* defined(VK_EXT_external_memory_metal) */ #if defined(VK_EXT_full_screen_exclusive) vkAcquireFullScreenExclusiveModeEXT = (PFN_vkAcquireFullScreenExclusiveModeEXT)load(context, "vkAcquireFullScreenExclusiveModeEXT"); vkReleaseFullScreenExclusiveModeEXT = (PFN_vkReleaseFullScreenExclusiveModeEXT)load(context, "vkReleaseFullScreenExclusiveModeEXT"); #endif /* defined(VK_EXT_full_screen_exclusive) */ #if defined(VK_EXT_full_screen_exclusive) && (defined(VK_KHR_device_group) || defined(VK_VERSION_1_1)) vkGetDeviceGroupSurfacePresentModes2EXT = (PFN_vkGetDeviceGroupSurfacePresentModes2EXT)load(context, "vkGetDeviceGroupSurfacePresentModes2EXT"); #endif /* defined(VK_EXT_full_screen_exclusive) && (defined(VK_KHR_device_group) || defined(VK_VERSION_1_1)) */ #if defined(VK_EXT_hdr_metadata) vkSetHdrMetadataEXT = (PFN_vkSetHdrMetadataEXT)load(context, "vkSetHdrMetadataEXT"); #endif /* defined(VK_EXT_hdr_metadata) */ #if defined(VK_EXT_host_image_copy) vkCopyImageToImageEXT = (PFN_vkCopyImageToImageEXT)load(context, "vkCopyImageToImageEXT"); vkCopyImageToMemoryEXT = (PFN_vkCopyImageToMemoryEXT)load(context, "vkCopyImageToMemoryEXT"); vkCopyMemoryToImageEXT = (PFN_vkCopyMemoryToImageEXT)load(context, "vkCopyMemoryToImageEXT"); vkTransitionImageLayoutEXT = (PFN_vkTransitionImageLayoutEXT)load(context, "vkTransitionImageLayoutEXT"); #endif /* defined(VK_EXT_host_image_copy) */ #if defined(VK_EXT_host_query_reset) vkResetQueryPoolEXT = (PFN_vkResetQueryPoolEXT)load(context, "vkResetQueryPoolEXT"); #endif /* defined(VK_EXT_host_query_reset) */ #if defined(VK_EXT_image_drm_format_modifier) vkGetImageDrmFormatModifierPropertiesEXT = (PFN_vkGetImageDrmFormatModifierPropertiesEXT)load(context, "vkGetImageDrmFormatModifierPropertiesEXT"); #endif /* defined(VK_EXT_image_drm_format_modifier) */ #if defined(VK_EXT_line_rasterization) vkCmdSetLineStippleEXT = (PFN_vkCmdSetLineStippleEXT)load(context, "vkCmdSetLineStippleEXT"); #endif /* defined(VK_EXT_line_rasterization) */ #if defined(VK_EXT_mesh_shader) vkCmdDrawMeshTasksEXT = (PFN_vkCmdDrawMeshTasksEXT)load(context, "vkCmdDrawMeshTasksEXT"); vkCmdDrawMeshTasksIndirectEXT = (PFN_vkCmdDrawMeshTasksIndirectEXT)load(context, "vkCmdDrawMeshTasksIndirectEXT"); #endif /* defined(VK_EXT_mesh_shader) */ #if defined(VK_EXT_mesh_shader) && (defined(VK_KHR_draw_indirect_count) || defined(VK_VERSION_1_2)) vkCmdDrawMeshTasksIndirectCountEXT = (PFN_vkCmdDrawMeshTasksIndirectCountEXT)load(context, "vkCmdDrawMeshTasksIndirectCountEXT"); #endif /* defined(VK_EXT_mesh_shader) && (defined(VK_KHR_draw_indirect_count) || defined(VK_VERSION_1_2)) */ #if defined(VK_EXT_metal_objects) vkExportMetalObjectsEXT = (PFN_vkExportMetalObjectsEXT)load(context, "vkExportMetalObjectsEXT"); #endif /* defined(VK_EXT_metal_objects) */ #if defined(VK_EXT_multi_draw) vkCmdDrawMultiEXT = (PFN_vkCmdDrawMultiEXT)load(context, "vkCmdDrawMultiEXT"); vkCmdDrawMultiIndexedEXT = (PFN_vkCmdDrawMultiIndexedEXT)load(context, "vkCmdDrawMultiIndexedEXT"); #endif /* defined(VK_EXT_multi_draw) */ #if defined(VK_EXT_opacity_micromap) vkBuildMicromapsEXT = (PFN_vkBuildMicromapsEXT)load(context, "vkBuildMicromapsEXT"); vkCmdBuildMicromapsEXT = (PFN_vkCmdBuildMicromapsEXT)load(context, "vkCmdBuildMicromapsEXT"); vkCmdCopyMemoryToMicromapEXT = (PFN_vkCmdCopyMemoryToMicromapEXT)load(context, "vkCmdCopyMemoryToMicromapEXT"); vkCmdCopyMicromapEXT = (PFN_vkCmdCopyMicromapEXT)load(context, "vkCmdCopyMicromapEXT"); vkCmdCopyMicromapToMemoryEXT = (PFN_vkCmdCopyMicromapToMemoryEXT)load(context, "vkCmdCopyMicromapToMemoryEXT"); vkCmdWriteMicromapsPropertiesEXT = (PFN_vkCmdWriteMicromapsPropertiesEXT)load(context, "vkCmdWriteMicromapsPropertiesEXT"); vkCopyMemoryToMicromapEXT = (PFN_vkCopyMemoryToMicromapEXT)load(context, "vkCopyMemoryToMicromapEXT"); vkCopyMicromapEXT = (PFN_vkCopyMicromapEXT)load(context, "vkCopyMicromapEXT"); vkCopyMicromapToMemoryEXT = (PFN_vkCopyMicromapToMemoryEXT)load(context, "vkCopyMicromapToMemoryEXT"); vkCreateMicromapEXT = (PFN_vkCreateMicromapEXT)load(context, "vkCreateMicromapEXT"); vkDestroyMicromapEXT = (PFN_vkDestroyMicromapEXT)load(context, "vkDestroyMicromapEXT"); vkGetDeviceMicromapCompatibilityEXT = (PFN_vkGetDeviceMicromapCompatibilityEXT)load(context, "vkGetDeviceMicromapCompatibilityEXT"); vkGetMicromapBuildSizesEXT = (PFN_vkGetMicromapBuildSizesEXT)load(context, "vkGetMicromapBuildSizesEXT"); vkWriteMicromapsPropertiesEXT = (PFN_vkWriteMicromapsPropertiesEXT)load(context, "vkWriteMicromapsPropertiesEXT"); #endif /* defined(VK_EXT_opacity_micromap) */ #if defined(VK_EXT_pageable_device_local_memory) vkSetDeviceMemoryPriorityEXT = (PFN_vkSetDeviceMemoryPriorityEXT)load(context, "vkSetDeviceMemoryPriorityEXT"); #endif /* defined(VK_EXT_pageable_device_local_memory) */ #if defined(VK_EXT_pipeline_properties) vkGetPipelinePropertiesEXT = (PFN_vkGetPipelinePropertiesEXT)load(context, "vkGetPipelinePropertiesEXT"); #endif /* defined(VK_EXT_pipeline_properties) */ #if defined(VK_EXT_private_data) vkCreatePrivateDataSlotEXT = (PFN_vkCreatePrivateDataSlotEXT)load(context, "vkCreatePrivateDataSlotEXT"); vkDestroyPrivateDataSlotEXT = (PFN_vkDestroyPrivateDataSlotEXT)load(context, "vkDestroyPrivateDataSlotEXT"); vkGetPrivateDataEXT = (PFN_vkGetPrivateDataEXT)load(context, "vkGetPrivateDataEXT"); vkSetPrivateDataEXT = (PFN_vkSetPrivateDataEXT)load(context, "vkSetPrivateDataEXT"); #endif /* defined(VK_EXT_private_data) */ #if defined(VK_EXT_sample_locations) vkCmdSetSampleLocationsEXT = (PFN_vkCmdSetSampleLocationsEXT)load(context, "vkCmdSetSampleLocationsEXT"); #endif /* defined(VK_EXT_sample_locations) */ #if defined(VK_EXT_shader_module_identifier) vkGetShaderModuleCreateInfoIdentifierEXT = (PFN_vkGetShaderModuleCreateInfoIdentifierEXT)load(context, "vkGetShaderModuleCreateInfoIdentifierEXT"); vkGetShaderModuleIdentifierEXT = (PFN_vkGetShaderModuleIdentifierEXT)load(context, "vkGetShaderModuleIdentifierEXT"); #endif /* defined(VK_EXT_shader_module_identifier) */ #if defined(VK_EXT_shader_object) vkCmdBindShadersEXT = (PFN_vkCmdBindShadersEXT)load(context, "vkCmdBindShadersEXT"); vkCreateShadersEXT = (PFN_vkCreateShadersEXT)load(context, "vkCreateShadersEXT"); vkDestroyShaderEXT = (PFN_vkDestroyShaderEXT)load(context, "vkDestroyShaderEXT"); vkGetShaderBinaryDataEXT = (PFN_vkGetShaderBinaryDataEXT)load(context, "vkGetShaderBinaryDataEXT"); #endif /* defined(VK_EXT_shader_object) */ #if defined(VK_EXT_swapchain_maintenance1) vkReleaseSwapchainImagesEXT = (PFN_vkReleaseSwapchainImagesEXT)load(context, "vkReleaseSwapchainImagesEXT"); #endif /* defined(VK_EXT_swapchain_maintenance1) */ #if defined(VK_EXT_transform_feedback) vkCmdBeginQueryIndexedEXT = (PFN_vkCmdBeginQueryIndexedEXT)load(context, "vkCmdBeginQueryIndexedEXT"); vkCmdBeginTransformFeedbackEXT = (PFN_vkCmdBeginTransformFeedbackEXT)load(context, "vkCmdBeginTransformFeedbackEXT"); vkCmdBindTransformFeedbackBuffersEXT = (PFN_vkCmdBindTransformFeedbackBuffersEXT)load(context, "vkCmdBindTransformFeedbackBuffersEXT"); vkCmdDrawIndirectByteCountEXT = (PFN_vkCmdDrawIndirectByteCountEXT)load(context, "vkCmdDrawIndirectByteCountEXT"); vkCmdEndQueryIndexedEXT = (PFN_vkCmdEndQueryIndexedEXT)load(context, "vkCmdEndQueryIndexedEXT"); vkCmdEndTransformFeedbackEXT = (PFN_vkCmdEndTransformFeedbackEXT)load(context, "vkCmdEndTransformFeedbackEXT"); #endif /* defined(VK_EXT_transform_feedback) */ #if defined(VK_EXT_validation_cache) vkCreateValidationCacheEXT = (PFN_vkCreateValidationCacheEXT)load(context, "vkCreateValidationCacheEXT"); vkDestroyValidationCacheEXT = (PFN_vkDestroyValidationCacheEXT)load(context, "vkDestroyValidationCacheEXT"); vkGetValidationCacheDataEXT = (PFN_vkGetValidationCacheDataEXT)load(context, "vkGetValidationCacheDataEXT"); vkMergeValidationCachesEXT = (PFN_vkMergeValidationCachesEXT)load(context, "vkMergeValidationCachesEXT"); #endif /* defined(VK_EXT_validation_cache) */ #if defined(VK_FUCHSIA_buffer_collection) vkCreateBufferCollectionFUCHSIA = (PFN_vkCreateBufferCollectionFUCHSIA)load(context, "vkCreateBufferCollectionFUCHSIA"); vkDestroyBufferCollectionFUCHSIA = (PFN_vkDestroyBufferCollectionFUCHSIA)load(context, "vkDestroyBufferCollectionFUCHSIA"); vkGetBufferCollectionPropertiesFUCHSIA = (PFN_vkGetBufferCollectionPropertiesFUCHSIA)load(context, "vkGetBufferCollectionPropertiesFUCHSIA"); vkSetBufferCollectionBufferConstraintsFUCHSIA = (PFN_vkSetBufferCollectionBufferConstraintsFUCHSIA)load(context, "vkSetBufferCollectionBufferConstraintsFUCHSIA"); vkSetBufferCollectionImageConstraintsFUCHSIA = (PFN_vkSetBufferCollectionImageConstraintsFUCHSIA)load(context, "vkSetBufferCollectionImageConstraintsFUCHSIA"); #endif /* defined(VK_FUCHSIA_buffer_collection) */ #if defined(VK_FUCHSIA_external_memory) vkGetMemoryZirconHandleFUCHSIA = (PFN_vkGetMemoryZirconHandleFUCHSIA)load(context, "vkGetMemoryZirconHandleFUCHSIA"); vkGetMemoryZirconHandlePropertiesFUCHSIA = (PFN_vkGetMemoryZirconHandlePropertiesFUCHSIA)load(context, "vkGetMemoryZirconHandlePropertiesFUCHSIA"); #endif /* defined(VK_FUCHSIA_external_memory) */ #if defined(VK_FUCHSIA_external_semaphore) vkGetSemaphoreZirconHandleFUCHSIA = (PFN_vkGetSemaphoreZirconHandleFUCHSIA)load(context, "vkGetSemaphoreZirconHandleFUCHSIA"); vkImportSemaphoreZirconHandleFUCHSIA = (PFN_vkImportSemaphoreZirconHandleFUCHSIA)load(context, "vkImportSemaphoreZirconHandleFUCHSIA"); #endif /* defined(VK_FUCHSIA_external_semaphore) */ #if defined(VK_GOOGLE_display_timing) vkGetPastPresentationTimingGOOGLE = (PFN_vkGetPastPresentationTimingGOOGLE)load(context, "vkGetPastPresentationTimingGOOGLE"); vkGetRefreshCycleDurationGOOGLE = (PFN_vkGetRefreshCycleDurationGOOGLE)load(context, "vkGetRefreshCycleDurationGOOGLE"); #endif /* defined(VK_GOOGLE_display_timing) */ #if defined(VK_HUAWEI_cluster_culling_shader) vkCmdDrawClusterHUAWEI = (PFN_vkCmdDrawClusterHUAWEI)load(context, "vkCmdDrawClusterHUAWEI"); vkCmdDrawClusterIndirectHUAWEI = (PFN_vkCmdDrawClusterIndirectHUAWEI)load(context, "vkCmdDrawClusterIndirectHUAWEI"); #endif /* defined(VK_HUAWEI_cluster_culling_shader) */ #if defined(VK_HUAWEI_invocation_mask) vkCmdBindInvocationMaskHUAWEI = (PFN_vkCmdBindInvocationMaskHUAWEI)load(context, "vkCmdBindInvocationMaskHUAWEI"); #endif /* defined(VK_HUAWEI_invocation_mask) */ #if defined(VK_HUAWEI_subpass_shading) && VK_HUAWEI_SUBPASS_SHADING_SPEC_VERSION >= 2 vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI = (PFN_vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI)load(context, "vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI"); #endif /* defined(VK_HUAWEI_subpass_shading) && VK_HUAWEI_SUBPASS_SHADING_SPEC_VERSION >= 2 */ #if defined(VK_HUAWEI_subpass_shading) vkCmdSubpassShadingHUAWEI = (PFN_vkCmdSubpassShadingHUAWEI)load(context, "vkCmdSubpassShadingHUAWEI"); #endif /* defined(VK_HUAWEI_subpass_shading) */ #if defined(VK_INTEL_performance_query) vkAcquirePerformanceConfigurationINTEL = (PFN_vkAcquirePerformanceConfigurationINTEL)load(context, "vkAcquirePerformanceConfigurationINTEL"); vkCmdSetPerformanceMarkerINTEL = (PFN_vkCmdSetPerformanceMarkerINTEL)load(context, "vkCmdSetPerformanceMarkerINTEL"); vkCmdSetPerformanceOverrideINTEL = (PFN_vkCmdSetPerformanceOverrideINTEL)load(context, "vkCmdSetPerformanceOverrideINTEL"); vkCmdSetPerformanceStreamMarkerINTEL = (PFN_vkCmdSetPerformanceStreamMarkerINTEL)load(context, "vkCmdSetPerformanceStreamMarkerINTEL"); vkGetPerformanceParameterINTEL = (PFN_vkGetPerformanceParameterINTEL)load(context, "vkGetPerformanceParameterINTEL"); vkInitializePerformanceApiINTEL = (PFN_vkInitializePerformanceApiINTEL)load(context, "vkInitializePerformanceApiINTEL"); vkQueueSetPerformanceConfigurationINTEL = (PFN_vkQueueSetPerformanceConfigurationINTEL)load(context, "vkQueueSetPerformanceConfigurationINTEL"); vkReleasePerformanceConfigurationINTEL = (PFN_vkReleasePerformanceConfigurationINTEL)load(context, "vkReleasePerformanceConfigurationINTEL"); vkUninitializePerformanceApiINTEL = (PFN_vkUninitializePerformanceApiINTEL)load(context, "vkUninitializePerformanceApiINTEL"); #endif /* defined(VK_INTEL_performance_query) */ #if defined(VK_KHR_acceleration_structure) vkBuildAccelerationStructuresKHR = (PFN_vkBuildAccelerationStructuresKHR)load(context, "vkBuildAccelerationStructuresKHR"); vkCmdBuildAccelerationStructuresIndirectKHR = (PFN_vkCmdBuildAccelerationStructuresIndirectKHR)load(context, "vkCmdBuildAccelerationStructuresIndirectKHR"); vkCmdBuildAccelerationStructuresKHR = (PFN_vkCmdBuildAccelerationStructuresKHR)load(context, "vkCmdBuildAccelerationStructuresKHR"); vkCmdCopyAccelerationStructureKHR = (PFN_vkCmdCopyAccelerationStructureKHR)load(context, "vkCmdCopyAccelerationStructureKHR"); vkCmdCopyAccelerationStructureToMemoryKHR = (PFN_vkCmdCopyAccelerationStructureToMemoryKHR)load(context, "vkCmdCopyAccelerationStructureToMemoryKHR"); vkCmdCopyMemoryToAccelerationStructureKHR = (PFN_vkCmdCopyMemoryToAccelerationStructureKHR)load(context, "vkCmdCopyMemoryToAccelerationStructureKHR"); vkCmdWriteAccelerationStructuresPropertiesKHR = (PFN_vkCmdWriteAccelerationStructuresPropertiesKHR)load(context, "vkCmdWriteAccelerationStructuresPropertiesKHR"); vkCopyAccelerationStructureKHR = (PFN_vkCopyAccelerationStructureKHR)load(context, "vkCopyAccelerationStructureKHR"); vkCopyAccelerationStructureToMemoryKHR = (PFN_vkCopyAccelerationStructureToMemoryKHR)load(context, "vkCopyAccelerationStructureToMemoryKHR"); vkCopyMemoryToAccelerationStructureKHR = (PFN_vkCopyMemoryToAccelerationStructureKHR)load(context, "vkCopyMemoryToAccelerationStructureKHR"); vkCreateAccelerationStructureKHR = (PFN_vkCreateAccelerationStructureKHR)load(context, "vkCreateAccelerationStructureKHR"); vkDestroyAccelerationStructureKHR = (PFN_vkDestroyAccelerationStructureKHR)load(context, "vkDestroyAccelerationStructureKHR"); vkGetAccelerationStructureBuildSizesKHR = (PFN_vkGetAccelerationStructureBuildSizesKHR)load(context, "vkGetAccelerationStructureBuildSizesKHR"); vkGetAccelerationStructureDeviceAddressKHR = (PFN_vkGetAccelerationStructureDeviceAddressKHR)load(context, "vkGetAccelerationStructureDeviceAddressKHR"); vkGetDeviceAccelerationStructureCompatibilityKHR = (PFN_vkGetDeviceAccelerationStructureCompatibilityKHR)load(context, "vkGetDeviceAccelerationStructureCompatibilityKHR"); vkWriteAccelerationStructuresPropertiesKHR = (PFN_vkWriteAccelerationStructuresPropertiesKHR)load(context, "vkWriteAccelerationStructuresPropertiesKHR"); #endif /* defined(VK_KHR_acceleration_structure) */ #if defined(VK_KHR_bind_memory2) vkBindBufferMemory2KHR = (PFN_vkBindBufferMemory2KHR)load(context, "vkBindBufferMemory2KHR"); vkBindImageMemory2KHR = (PFN_vkBindImageMemory2KHR)load(context, "vkBindImageMemory2KHR"); #endif /* defined(VK_KHR_bind_memory2) */ #if defined(VK_KHR_buffer_device_address) vkGetBufferDeviceAddressKHR = (PFN_vkGetBufferDeviceAddressKHR)load(context, "vkGetBufferDeviceAddressKHR"); vkGetBufferOpaqueCaptureAddressKHR = (PFN_vkGetBufferOpaqueCaptureAddressKHR)load(context, "vkGetBufferOpaqueCaptureAddressKHR"); vkGetDeviceMemoryOpaqueCaptureAddressKHR = (PFN_vkGetDeviceMemoryOpaqueCaptureAddressKHR)load(context, "vkGetDeviceMemoryOpaqueCaptureAddressKHR"); #endif /* defined(VK_KHR_buffer_device_address) */ #if defined(VK_KHR_calibrated_timestamps) vkGetCalibratedTimestampsKHR = (PFN_vkGetCalibratedTimestampsKHR)load(context, "vkGetCalibratedTimestampsKHR"); #endif /* defined(VK_KHR_calibrated_timestamps) */ #if defined(VK_KHR_copy_commands2) vkCmdBlitImage2KHR = (PFN_vkCmdBlitImage2KHR)load(context, "vkCmdBlitImage2KHR"); vkCmdCopyBuffer2KHR = (PFN_vkCmdCopyBuffer2KHR)load(context, "vkCmdCopyBuffer2KHR"); vkCmdCopyBufferToImage2KHR = (PFN_vkCmdCopyBufferToImage2KHR)load(context, "vkCmdCopyBufferToImage2KHR"); vkCmdCopyImage2KHR = (PFN_vkCmdCopyImage2KHR)load(context, "vkCmdCopyImage2KHR"); vkCmdCopyImageToBuffer2KHR = (PFN_vkCmdCopyImageToBuffer2KHR)load(context, "vkCmdCopyImageToBuffer2KHR"); vkCmdResolveImage2KHR = (PFN_vkCmdResolveImage2KHR)load(context, "vkCmdResolveImage2KHR"); #endif /* defined(VK_KHR_copy_commands2) */ #if defined(VK_KHR_create_renderpass2) vkCmdBeginRenderPass2KHR = (PFN_vkCmdBeginRenderPass2KHR)load(context, "vkCmdBeginRenderPass2KHR"); vkCmdEndRenderPass2KHR = (PFN_vkCmdEndRenderPass2KHR)load(context, "vkCmdEndRenderPass2KHR"); vkCmdNextSubpass2KHR = (PFN_vkCmdNextSubpass2KHR)load(context, "vkCmdNextSubpass2KHR"); vkCreateRenderPass2KHR = (PFN_vkCreateRenderPass2KHR)load(context, "vkCreateRenderPass2KHR"); #endif /* defined(VK_KHR_create_renderpass2) */ #if defined(VK_KHR_deferred_host_operations) vkCreateDeferredOperationKHR = (PFN_vkCreateDeferredOperationKHR)load(context, "vkCreateDeferredOperationKHR"); vkDeferredOperationJoinKHR = (PFN_vkDeferredOperationJoinKHR)load(context, "vkDeferredOperationJoinKHR"); vkDestroyDeferredOperationKHR = (PFN_vkDestroyDeferredOperationKHR)load(context, "vkDestroyDeferredOperationKHR"); vkGetDeferredOperationMaxConcurrencyKHR = (PFN_vkGetDeferredOperationMaxConcurrencyKHR)load(context, "vkGetDeferredOperationMaxConcurrencyKHR"); vkGetDeferredOperationResultKHR = (PFN_vkGetDeferredOperationResultKHR)load(context, "vkGetDeferredOperationResultKHR"); #endif /* defined(VK_KHR_deferred_host_operations) */ #if defined(VK_KHR_descriptor_update_template) vkCreateDescriptorUpdateTemplateKHR = (PFN_vkCreateDescriptorUpdateTemplateKHR)load(context, "vkCreateDescriptorUpdateTemplateKHR"); vkDestroyDescriptorUpdateTemplateKHR = (PFN_vkDestroyDescriptorUpdateTemplateKHR)load(context, "vkDestroyDescriptorUpdateTemplateKHR"); vkUpdateDescriptorSetWithTemplateKHR = (PFN_vkUpdateDescriptorSetWithTemplateKHR)load(context, "vkUpdateDescriptorSetWithTemplateKHR"); #endif /* defined(VK_KHR_descriptor_update_template) */ #if defined(VK_KHR_device_group) vkCmdDispatchBaseKHR = (PFN_vkCmdDispatchBaseKHR)load(context, "vkCmdDispatchBaseKHR"); vkCmdSetDeviceMaskKHR = (PFN_vkCmdSetDeviceMaskKHR)load(context, "vkCmdSetDeviceMaskKHR"); vkGetDeviceGroupPeerMemoryFeaturesKHR = (PFN_vkGetDeviceGroupPeerMemoryFeaturesKHR)load(context, "vkGetDeviceGroupPeerMemoryFeaturesKHR"); #endif /* defined(VK_KHR_device_group) */ #if defined(VK_KHR_display_swapchain) vkCreateSharedSwapchainsKHR = (PFN_vkCreateSharedSwapchainsKHR)load(context, "vkCreateSharedSwapchainsKHR"); #endif /* defined(VK_KHR_display_swapchain) */ #if defined(VK_KHR_draw_indirect_count) vkCmdDrawIndexedIndirectCountKHR = (PFN_vkCmdDrawIndexedIndirectCountKHR)load(context, "vkCmdDrawIndexedIndirectCountKHR"); vkCmdDrawIndirectCountKHR = (PFN_vkCmdDrawIndirectCountKHR)load(context, "vkCmdDrawIndirectCountKHR"); #endif /* defined(VK_KHR_draw_indirect_count) */ #if defined(VK_KHR_dynamic_rendering) vkCmdBeginRenderingKHR = (PFN_vkCmdBeginRenderingKHR)load(context, "vkCmdBeginRenderingKHR"); vkCmdEndRenderingKHR = (PFN_vkCmdEndRenderingKHR)load(context, "vkCmdEndRenderingKHR"); #endif /* defined(VK_KHR_dynamic_rendering) */ #if defined(VK_KHR_dynamic_rendering_local_read) vkCmdSetRenderingAttachmentLocationsKHR = (PFN_vkCmdSetRenderingAttachmentLocationsKHR)load(context, "vkCmdSetRenderingAttachmentLocationsKHR"); vkCmdSetRenderingInputAttachmentIndicesKHR = (PFN_vkCmdSetRenderingInputAttachmentIndicesKHR)load(context, "vkCmdSetRenderingInputAttachmentIndicesKHR"); #endif /* defined(VK_KHR_dynamic_rendering_local_read) */ #if defined(VK_KHR_external_fence_fd) vkGetFenceFdKHR = (PFN_vkGetFenceFdKHR)load(context, "vkGetFenceFdKHR"); vkImportFenceFdKHR = (PFN_vkImportFenceFdKHR)load(context, "vkImportFenceFdKHR"); #endif /* defined(VK_KHR_external_fence_fd) */ #if defined(VK_KHR_external_fence_win32) vkGetFenceWin32HandleKHR = (PFN_vkGetFenceWin32HandleKHR)load(context, "vkGetFenceWin32HandleKHR"); vkImportFenceWin32HandleKHR = (PFN_vkImportFenceWin32HandleKHR)load(context, "vkImportFenceWin32HandleKHR"); #endif /* defined(VK_KHR_external_fence_win32) */ #if defined(VK_KHR_external_memory_fd) vkGetMemoryFdKHR = (PFN_vkGetMemoryFdKHR)load(context, "vkGetMemoryFdKHR"); vkGetMemoryFdPropertiesKHR = (PFN_vkGetMemoryFdPropertiesKHR)load(context, "vkGetMemoryFdPropertiesKHR"); #endif /* defined(VK_KHR_external_memory_fd) */ #if defined(VK_KHR_external_memory_win32) vkGetMemoryWin32HandleKHR = (PFN_vkGetMemoryWin32HandleKHR)load(context, "vkGetMemoryWin32HandleKHR"); vkGetMemoryWin32HandlePropertiesKHR = (PFN_vkGetMemoryWin32HandlePropertiesKHR)load(context, "vkGetMemoryWin32HandlePropertiesKHR"); #endif /* defined(VK_KHR_external_memory_win32) */ #if defined(VK_KHR_external_semaphore_fd) vkGetSemaphoreFdKHR = (PFN_vkGetSemaphoreFdKHR)load(context, "vkGetSemaphoreFdKHR"); vkImportSemaphoreFdKHR = (PFN_vkImportSemaphoreFdKHR)load(context, "vkImportSemaphoreFdKHR"); #endif /* defined(VK_KHR_external_semaphore_fd) */ #if defined(VK_KHR_external_semaphore_win32) vkGetSemaphoreWin32HandleKHR = (PFN_vkGetSemaphoreWin32HandleKHR)load(context, "vkGetSemaphoreWin32HandleKHR"); vkImportSemaphoreWin32HandleKHR = (PFN_vkImportSemaphoreWin32HandleKHR)load(context, "vkImportSemaphoreWin32HandleKHR"); #endif /* defined(VK_KHR_external_semaphore_win32) */ #if defined(VK_KHR_fragment_shading_rate) vkCmdSetFragmentShadingRateKHR = (PFN_vkCmdSetFragmentShadingRateKHR)load(context, "vkCmdSetFragmentShadingRateKHR"); #endif /* defined(VK_KHR_fragment_shading_rate) */ #if defined(VK_KHR_get_memory_requirements2) vkGetBufferMemoryRequirements2KHR = (PFN_vkGetBufferMemoryRequirements2KHR)load(context, "vkGetBufferMemoryRequirements2KHR"); vkGetImageMemoryRequirements2KHR = (PFN_vkGetImageMemoryRequirements2KHR)load(context, "vkGetImageMemoryRequirements2KHR"); vkGetImageSparseMemoryRequirements2KHR = (PFN_vkGetImageSparseMemoryRequirements2KHR)load(context, "vkGetImageSparseMemoryRequirements2KHR"); #endif /* defined(VK_KHR_get_memory_requirements2) */ #if defined(VK_KHR_line_rasterization) vkCmdSetLineStippleKHR = (PFN_vkCmdSetLineStippleKHR)load(context, "vkCmdSetLineStippleKHR"); #endif /* defined(VK_KHR_line_rasterization) */ #if defined(VK_KHR_maintenance1) vkTrimCommandPoolKHR = (PFN_vkTrimCommandPoolKHR)load(context, "vkTrimCommandPoolKHR"); #endif /* defined(VK_KHR_maintenance1) */ #if defined(VK_KHR_maintenance3) vkGetDescriptorSetLayoutSupportKHR = (PFN_vkGetDescriptorSetLayoutSupportKHR)load(context, "vkGetDescriptorSetLayoutSupportKHR"); #endif /* defined(VK_KHR_maintenance3) */ #if defined(VK_KHR_maintenance4) vkGetDeviceBufferMemoryRequirementsKHR = (PFN_vkGetDeviceBufferMemoryRequirementsKHR)load(context, "vkGetDeviceBufferMemoryRequirementsKHR"); vkGetDeviceImageMemoryRequirementsKHR = (PFN_vkGetDeviceImageMemoryRequirementsKHR)load(context, "vkGetDeviceImageMemoryRequirementsKHR"); vkGetDeviceImageSparseMemoryRequirementsKHR = (PFN_vkGetDeviceImageSparseMemoryRequirementsKHR)load(context, "vkGetDeviceImageSparseMemoryRequirementsKHR"); #endif /* defined(VK_KHR_maintenance4) */ #if defined(VK_KHR_maintenance5) vkCmdBindIndexBuffer2KHR = (PFN_vkCmdBindIndexBuffer2KHR)load(context, "vkCmdBindIndexBuffer2KHR"); vkGetDeviceImageSubresourceLayoutKHR = (PFN_vkGetDeviceImageSubresourceLayoutKHR)load(context, "vkGetDeviceImageSubresourceLayoutKHR"); vkGetImageSubresourceLayout2KHR = (PFN_vkGetImageSubresourceLayout2KHR)load(context, "vkGetImageSubresourceLayout2KHR"); vkGetRenderingAreaGranularityKHR = (PFN_vkGetRenderingAreaGranularityKHR)load(context, "vkGetRenderingAreaGranularityKHR"); #endif /* defined(VK_KHR_maintenance5) */ #if defined(VK_KHR_maintenance6) vkCmdBindDescriptorSets2KHR = (PFN_vkCmdBindDescriptorSets2KHR)load(context, "vkCmdBindDescriptorSets2KHR"); vkCmdPushConstants2KHR = (PFN_vkCmdPushConstants2KHR)load(context, "vkCmdPushConstants2KHR"); #endif /* defined(VK_KHR_maintenance6) */ #if defined(VK_KHR_maintenance6) && defined(VK_KHR_push_descriptor) vkCmdPushDescriptorSet2KHR = (PFN_vkCmdPushDescriptorSet2KHR)load(context, "vkCmdPushDescriptorSet2KHR"); vkCmdPushDescriptorSetWithTemplate2KHR = (PFN_vkCmdPushDescriptorSetWithTemplate2KHR)load(context, "vkCmdPushDescriptorSetWithTemplate2KHR"); #endif /* defined(VK_KHR_maintenance6) && defined(VK_KHR_push_descriptor) */ #if defined(VK_KHR_maintenance6) && defined(VK_EXT_descriptor_buffer) vkCmdBindDescriptorBufferEmbeddedSamplers2EXT = (PFN_vkCmdBindDescriptorBufferEmbeddedSamplers2EXT)load(context, "vkCmdBindDescriptorBufferEmbeddedSamplers2EXT"); vkCmdSetDescriptorBufferOffsets2EXT = (PFN_vkCmdSetDescriptorBufferOffsets2EXT)load(context, "vkCmdSetDescriptorBufferOffsets2EXT"); #endif /* defined(VK_KHR_maintenance6) && defined(VK_EXT_descriptor_buffer) */ #if defined(VK_KHR_map_memory2) vkMapMemory2KHR = (PFN_vkMapMemory2KHR)load(context, "vkMapMemory2KHR"); vkUnmapMemory2KHR = (PFN_vkUnmapMemory2KHR)load(context, "vkUnmapMemory2KHR"); #endif /* defined(VK_KHR_map_memory2) */ #if defined(VK_KHR_performance_query) vkAcquireProfilingLockKHR = (PFN_vkAcquireProfilingLockKHR)load(context, "vkAcquireProfilingLockKHR"); vkReleaseProfilingLockKHR = (PFN_vkReleaseProfilingLockKHR)load(context, "vkReleaseProfilingLockKHR"); #endif /* defined(VK_KHR_performance_query) */ #if defined(VK_KHR_pipeline_binary) vkCreatePipelineBinariesKHR = (PFN_vkCreatePipelineBinariesKHR)load(context, "vkCreatePipelineBinariesKHR"); vkDestroyPipelineBinaryKHR = (PFN_vkDestroyPipelineBinaryKHR)load(context, "vkDestroyPipelineBinaryKHR"); vkGetPipelineBinaryDataKHR = (PFN_vkGetPipelineBinaryDataKHR)load(context, "vkGetPipelineBinaryDataKHR"); vkGetPipelineKeyKHR = (PFN_vkGetPipelineKeyKHR)load(context, "vkGetPipelineKeyKHR"); vkReleaseCapturedPipelineDataKHR = (PFN_vkReleaseCapturedPipelineDataKHR)load(context, "vkReleaseCapturedPipelineDataKHR"); #endif /* defined(VK_KHR_pipeline_binary) */ #if defined(VK_KHR_pipeline_executable_properties) vkGetPipelineExecutableInternalRepresentationsKHR = (PFN_vkGetPipelineExecutableInternalRepresentationsKHR)load(context, "vkGetPipelineExecutableInternalRepresentationsKHR"); vkGetPipelineExecutablePropertiesKHR = (PFN_vkGetPipelineExecutablePropertiesKHR)load(context, "vkGetPipelineExecutablePropertiesKHR"); vkGetPipelineExecutableStatisticsKHR = (PFN_vkGetPipelineExecutableStatisticsKHR)load(context, "vkGetPipelineExecutableStatisticsKHR"); #endif /* defined(VK_KHR_pipeline_executable_properties) */ #if defined(VK_KHR_present_wait) vkWaitForPresentKHR = (PFN_vkWaitForPresentKHR)load(context, "vkWaitForPresentKHR"); #endif /* defined(VK_KHR_present_wait) */ #if defined(VK_KHR_push_descriptor) vkCmdPushDescriptorSetKHR = (PFN_vkCmdPushDescriptorSetKHR)load(context, "vkCmdPushDescriptorSetKHR"); #endif /* defined(VK_KHR_push_descriptor) */ #if defined(VK_KHR_ray_tracing_maintenance1) && defined(VK_KHR_ray_tracing_pipeline) vkCmdTraceRaysIndirect2KHR = (PFN_vkCmdTraceRaysIndirect2KHR)load(context, "vkCmdTraceRaysIndirect2KHR"); #endif /* defined(VK_KHR_ray_tracing_maintenance1) && defined(VK_KHR_ray_tracing_pipeline) */ #if defined(VK_KHR_ray_tracing_pipeline) vkCmdSetRayTracingPipelineStackSizeKHR = (PFN_vkCmdSetRayTracingPipelineStackSizeKHR)load(context, "vkCmdSetRayTracingPipelineStackSizeKHR"); vkCmdTraceRaysIndirectKHR = (PFN_vkCmdTraceRaysIndirectKHR)load(context, "vkCmdTraceRaysIndirectKHR"); vkCmdTraceRaysKHR = (PFN_vkCmdTraceRaysKHR)load(context, "vkCmdTraceRaysKHR"); vkCreateRayTracingPipelinesKHR = (PFN_vkCreateRayTracingPipelinesKHR)load(context, "vkCreateRayTracingPipelinesKHR"); vkGetRayTracingCaptureReplayShaderGroupHandlesKHR = (PFN_vkGetRayTracingCaptureReplayShaderGroupHandlesKHR)load(context, "vkGetRayTracingCaptureReplayShaderGroupHandlesKHR"); vkGetRayTracingShaderGroupHandlesKHR = (PFN_vkGetRayTracingShaderGroupHandlesKHR)load(context, "vkGetRayTracingShaderGroupHandlesKHR"); vkGetRayTracingShaderGroupStackSizeKHR = (PFN_vkGetRayTracingShaderGroupStackSizeKHR)load(context, "vkGetRayTracingShaderGroupStackSizeKHR"); #endif /* defined(VK_KHR_ray_tracing_pipeline) */ #if defined(VK_KHR_sampler_ycbcr_conversion) vkCreateSamplerYcbcrConversionKHR = (PFN_vkCreateSamplerYcbcrConversionKHR)load(context, "vkCreateSamplerYcbcrConversionKHR"); vkDestroySamplerYcbcrConversionKHR = (PFN_vkDestroySamplerYcbcrConversionKHR)load(context, "vkDestroySamplerYcbcrConversionKHR"); #endif /* defined(VK_KHR_sampler_ycbcr_conversion) */ #if defined(VK_KHR_shared_presentable_image) vkGetSwapchainStatusKHR = (PFN_vkGetSwapchainStatusKHR)load(context, "vkGetSwapchainStatusKHR"); #endif /* defined(VK_KHR_shared_presentable_image) */ #if defined(VK_KHR_swapchain) vkAcquireNextImageKHR = (PFN_vkAcquireNextImageKHR)load(context, "vkAcquireNextImageKHR"); vkCreateSwapchainKHR = (PFN_vkCreateSwapchainKHR)load(context, "vkCreateSwapchainKHR"); vkDestroySwapchainKHR = (PFN_vkDestroySwapchainKHR)load(context, "vkDestroySwapchainKHR"); vkGetSwapchainImagesKHR = (PFN_vkGetSwapchainImagesKHR)load(context, "vkGetSwapchainImagesKHR"); vkQueuePresentKHR = (PFN_vkQueuePresentKHR)load(context, "vkQueuePresentKHR"); #endif /* defined(VK_KHR_swapchain) */ #if defined(VK_KHR_synchronization2) vkCmdPipelineBarrier2KHR = (PFN_vkCmdPipelineBarrier2KHR)load(context, "vkCmdPipelineBarrier2KHR"); vkCmdResetEvent2KHR = (PFN_vkCmdResetEvent2KHR)load(context, "vkCmdResetEvent2KHR"); vkCmdSetEvent2KHR = (PFN_vkCmdSetEvent2KHR)load(context, "vkCmdSetEvent2KHR"); vkCmdWaitEvents2KHR = (PFN_vkCmdWaitEvents2KHR)load(context, "vkCmdWaitEvents2KHR"); vkCmdWriteTimestamp2KHR = (PFN_vkCmdWriteTimestamp2KHR)load(context, "vkCmdWriteTimestamp2KHR"); vkQueueSubmit2KHR = (PFN_vkQueueSubmit2KHR)load(context, "vkQueueSubmit2KHR"); #endif /* defined(VK_KHR_synchronization2) */ #if defined(VK_KHR_timeline_semaphore) vkGetSemaphoreCounterValueKHR = (PFN_vkGetSemaphoreCounterValueKHR)load(context, "vkGetSemaphoreCounterValueKHR"); vkSignalSemaphoreKHR = (PFN_vkSignalSemaphoreKHR)load(context, "vkSignalSemaphoreKHR"); vkWaitSemaphoresKHR = (PFN_vkWaitSemaphoresKHR)load(context, "vkWaitSemaphoresKHR"); #endif /* defined(VK_KHR_timeline_semaphore) */ #if defined(VK_KHR_video_decode_queue) vkCmdDecodeVideoKHR = (PFN_vkCmdDecodeVideoKHR)load(context, "vkCmdDecodeVideoKHR"); #endif /* defined(VK_KHR_video_decode_queue) */ #if defined(VK_KHR_video_encode_queue) vkCmdEncodeVideoKHR = (PFN_vkCmdEncodeVideoKHR)load(context, "vkCmdEncodeVideoKHR"); vkGetEncodedVideoSessionParametersKHR = (PFN_vkGetEncodedVideoSessionParametersKHR)load(context, "vkGetEncodedVideoSessionParametersKHR"); #endif /* defined(VK_KHR_video_encode_queue) */ #if defined(VK_KHR_video_queue) vkBindVideoSessionMemoryKHR = (PFN_vkBindVideoSessionMemoryKHR)load(context, "vkBindVideoSessionMemoryKHR"); vkCmdBeginVideoCodingKHR = (PFN_vkCmdBeginVideoCodingKHR)load(context, "vkCmdBeginVideoCodingKHR"); vkCmdControlVideoCodingKHR = (PFN_vkCmdControlVideoCodingKHR)load(context, "vkCmdControlVideoCodingKHR"); vkCmdEndVideoCodingKHR = (PFN_vkCmdEndVideoCodingKHR)load(context, "vkCmdEndVideoCodingKHR"); vkCreateVideoSessionKHR = (PFN_vkCreateVideoSessionKHR)load(context, "vkCreateVideoSessionKHR"); vkCreateVideoSessionParametersKHR = (PFN_vkCreateVideoSessionParametersKHR)load(context, "vkCreateVideoSessionParametersKHR"); vkDestroyVideoSessionKHR = (PFN_vkDestroyVideoSessionKHR)load(context, "vkDestroyVideoSessionKHR"); vkDestroyVideoSessionParametersKHR = (PFN_vkDestroyVideoSessionParametersKHR)load(context, "vkDestroyVideoSessionParametersKHR"); vkGetVideoSessionMemoryRequirementsKHR = (PFN_vkGetVideoSessionMemoryRequirementsKHR)load(context, "vkGetVideoSessionMemoryRequirementsKHR"); vkUpdateVideoSessionParametersKHR = (PFN_vkUpdateVideoSessionParametersKHR)load(context, "vkUpdateVideoSessionParametersKHR"); #endif /* defined(VK_KHR_video_queue) */ #if defined(VK_NVX_binary_import) vkCmdCuLaunchKernelNVX = (PFN_vkCmdCuLaunchKernelNVX)load(context, "vkCmdCuLaunchKernelNVX"); vkCreateCuFunctionNVX = (PFN_vkCreateCuFunctionNVX)load(context, "vkCreateCuFunctionNVX"); vkCreateCuModuleNVX = (PFN_vkCreateCuModuleNVX)load(context, "vkCreateCuModuleNVX"); vkDestroyCuFunctionNVX = (PFN_vkDestroyCuFunctionNVX)load(context, "vkDestroyCuFunctionNVX"); vkDestroyCuModuleNVX = (PFN_vkDestroyCuModuleNVX)load(context, "vkDestroyCuModuleNVX"); #endif /* defined(VK_NVX_binary_import) */ #if defined(VK_NVX_image_view_handle) vkGetImageViewHandleNVX = (PFN_vkGetImageViewHandleNVX)load(context, "vkGetImageViewHandleNVX"); #endif /* defined(VK_NVX_image_view_handle) */ #if defined(VK_NVX_image_view_handle) && VK_NVX_IMAGE_VIEW_HANDLE_SPEC_VERSION >= 3 vkGetImageViewHandle64NVX = (PFN_vkGetImageViewHandle64NVX)load(context, "vkGetImageViewHandle64NVX"); #endif /* defined(VK_NVX_image_view_handle) && VK_NVX_IMAGE_VIEW_HANDLE_SPEC_VERSION >= 3 */ #if defined(VK_NVX_image_view_handle) && VK_NVX_IMAGE_VIEW_HANDLE_SPEC_VERSION >= 2 vkGetImageViewAddressNVX = (PFN_vkGetImageViewAddressNVX)load(context, "vkGetImageViewAddressNVX"); #endif /* defined(VK_NVX_image_view_handle) && VK_NVX_IMAGE_VIEW_HANDLE_SPEC_VERSION >= 2 */ #if defined(VK_NV_clip_space_w_scaling) vkCmdSetViewportWScalingNV = (PFN_vkCmdSetViewportWScalingNV)load(context, "vkCmdSetViewportWScalingNV"); #endif /* defined(VK_NV_clip_space_w_scaling) */ #if defined(VK_NV_cluster_acceleration_structure) vkCmdBuildClusterAccelerationStructureIndirectNV = (PFN_vkCmdBuildClusterAccelerationStructureIndirectNV)load(context, "vkCmdBuildClusterAccelerationStructureIndirectNV"); vkGetClusterAccelerationStructureBuildSizesNV = (PFN_vkGetClusterAccelerationStructureBuildSizesNV)load(context, "vkGetClusterAccelerationStructureBuildSizesNV"); #endif /* defined(VK_NV_cluster_acceleration_structure) */ #if defined(VK_NV_cooperative_vector) vkCmdConvertCooperativeVectorMatrixNV = (PFN_vkCmdConvertCooperativeVectorMatrixNV)load(context, "vkCmdConvertCooperativeVectorMatrixNV"); vkConvertCooperativeVectorMatrixNV = (PFN_vkConvertCooperativeVectorMatrixNV)load(context, "vkConvertCooperativeVectorMatrixNV"); #endif /* defined(VK_NV_cooperative_vector) */ #if defined(VK_NV_copy_memory_indirect) vkCmdCopyMemoryIndirectNV = (PFN_vkCmdCopyMemoryIndirectNV)load(context, "vkCmdCopyMemoryIndirectNV"); vkCmdCopyMemoryToImageIndirectNV = (PFN_vkCmdCopyMemoryToImageIndirectNV)load(context, "vkCmdCopyMemoryToImageIndirectNV"); #endif /* defined(VK_NV_copy_memory_indirect) */ #if defined(VK_NV_cuda_kernel_launch) vkCmdCudaLaunchKernelNV = (PFN_vkCmdCudaLaunchKernelNV)load(context, "vkCmdCudaLaunchKernelNV"); vkCreateCudaFunctionNV = (PFN_vkCreateCudaFunctionNV)load(context, "vkCreateCudaFunctionNV"); vkCreateCudaModuleNV = (PFN_vkCreateCudaModuleNV)load(context, "vkCreateCudaModuleNV"); vkDestroyCudaFunctionNV = (PFN_vkDestroyCudaFunctionNV)load(context, "vkDestroyCudaFunctionNV"); vkDestroyCudaModuleNV = (PFN_vkDestroyCudaModuleNV)load(context, "vkDestroyCudaModuleNV"); vkGetCudaModuleCacheNV = (PFN_vkGetCudaModuleCacheNV)load(context, "vkGetCudaModuleCacheNV"); #endif /* defined(VK_NV_cuda_kernel_launch) */ #if defined(VK_NV_device_diagnostic_checkpoints) vkCmdSetCheckpointNV = (PFN_vkCmdSetCheckpointNV)load(context, "vkCmdSetCheckpointNV"); vkGetQueueCheckpointDataNV = (PFN_vkGetQueueCheckpointDataNV)load(context, "vkGetQueueCheckpointDataNV"); #endif /* defined(VK_NV_device_diagnostic_checkpoints) */ #if defined(VK_NV_device_diagnostic_checkpoints) && (defined(VK_VERSION_1_3) || defined(VK_KHR_synchronization2)) vkGetQueueCheckpointData2NV = (PFN_vkGetQueueCheckpointData2NV)load(context, "vkGetQueueCheckpointData2NV"); #endif /* defined(VK_NV_device_diagnostic_checkpoints) && (defined(VK_VERSION_1_3) || defined(VK_KHR_synchronization2)) */ #if defined(VK_NV_device_generated_commands) vkCmdBindPipelineShaderGroupNV = (PFN_vkCmdBindPipelineShaderGroupNV)load(context, "vkCmdBindPipelineShaderGroupNV"); vkCmdExecuteGeneratedCommandsNV = (PFN_vkCmdExecuteGeneratedCommandsNV)load(context, "vkCmdExecuteGeneratedCommandsNV"); vkCmdPreprocessGeneratedCommandsNV = (PFN_vkCmdPreprocessGeneratedCommandsNV)load(context, "vkCmdPreprocessGeneratedCommandsNV"); vkCreateIndirectCommandsLayoutNV = (PFN_vkCreateIndirectCommandsLayoutNV)load(context, "vkCreateIndirectCommandsLayoutNV"); vkDestroyIndirectCommandsLayoutNV = (PFN_vkDestroyIndirectCommandsLayoutNV)load(context, "vkDestroyIndirectCommandsLayoutNV"); vkGetGeneratedCommandsMemoryRequirementsNV = (PFN_vkGetGeneratedCommandsMemoryRequirementsNV)load(context, "vkGetGeneratedCommandsMemoryRequirementsNV"); #endif /* defined(VK_NV_device_generated_commands) */ #if defined(VK_NV_device_generated_commands_compute) vkCmdUpdatePipelineIndirectBufferNV = (PFN_vkCmdUpdatePipelineIndirectBufferNV)load(context, "vkCmdUpdatePipelineIndirectBufferNV"); vkGetPipelineIndirectDeviceAddressNV = (PFN_vkGetPipelineIndirectDeviceAddressNV)load(context, "vkGetPipelineIndirectDeviceAddressNV"); vkGetPipelineIndirectMemoryRequirementsNV = (PFN_vkGetPipelineIndirectMemoryRequirementsNV)load(context, "vkGetPipelineIndirectMemoryRequirementsNV"); #endif /* defined(VK_NV_device_generated_commands_compute) */ #if defined(VK_NV_external_memory_rdma) vkGetMemoryRemoteAddressNV = (PFN_vkGetMemoryRemoteAddressNV)load(context, "vkGetMemoryRemoteAddressNV"); #endif /* defined(VK_NV_external_memory_rdma) */ #if defined(VK_NV_external_memory_win32) vkGetMemoryWin32HandleNV = (PFN_vkGetMemoryWin32HandleNV)load(context, "vkGetMemoryWin32HandleNV"); #endif /* defined(VK_NV_external_memory_win32) */ #if defined(VK_NV_fragment_shading_rate_enums) vkCmdSetFragmentShadingRateEnumNV = (PFN_vkCmdSetFragmentShadingRateEnumNV)load(context, "vkCmdSetFragmentShadingRateEnumNV"); #endif /* defined(VK_NV_fragment_shading_rate_enums) */ #if defined(VK_NV_low_latency2) vkGetLatencyTimingsNV = (PFN_vkGetLatencyTimingsNV)load(context, "vkGetLatencyTimingsNV"); vkLatencySleepNV = (PFN_vkLatencySleepNV)load(context, "vkLatencySleepNV"); vkQueueNotifyOutOfBandNV = (PFN_vkQueueNotifyOutOfBandNV)load(context, "vkQueueNotifyOutOfBandNV"); vkSetLatencyMarkerNV = (PFN_vkSetLatencyMarkerNV)load(context, "vkSetLatencyMarkerNV"); vkSetLatencySleepModeNV = (PFN_vkSetLatencySleepModeNV)load(context, "vkSetLatencySleepModeNV"); #endif /* defined(VK_NV_low_latency2) */ #if defined(VK_NV_memory_decompression) vkCmdDecompressMemoryIndirectCountNV = (PFN_vkCmdDecompressMemoryIndirectCountNV)load(context, "vkCmdDecompressMemoryIndirectCountNV"); vkCmdDecompressMemoryNV = (PFN_vkCmdDecompressMemoryNV)load(context, "vkCmdDecompressMemoryNV"); #endif /* defined(VK_NV_memory_decompression) */ #if defined(VK_NV_mesh_shader) vkCmdDrawMeshTasksIndirectNV = (PFN_vkCmdDrawMeshTasksIndirectNV)load(context, "vkCmdDrawMeshTasksIndirectNV"); vkCmdDrawMeshTasksNV = (PFN_vkCmdDrawMeshTasksNV)load(context, "vkCmdDrawMeshTasksNV"); #endif /* defined(VK_NV_mesh_shader) */ #if defined(VK_NV_mesh_shader) && (defined(VK_KHR_draw_indirect_count) || defined(VK_VERSION_1_2)) vkCmdDrawMeshTasksIndirectCountNV = (PFN_vkCmdDrawMeshTasksIndirectCountNV)load(context, "vkCmdDrawMeshTasksIndirectCountNV"); #endif /* defined(VK_NV_mesh_shader) && (defined(VK_KHR_draw_indirect_count) || defined(VK_VERSION_1_2)) */ #if defined(VK_NV_optical_flow) vkBindOpticalFlowSessionImageNV = (PFN_vkBindOpticalFlowSessionImageNV)load(context, "vkBindOpticalFlowSessionImageNV"); vkCmdOpticalFlowExecuteNV = (PFN_vkCmdOpticalFlowExecuteNV)load(context, "vkCmdOpticalFlowExecuteNV"); vkCreateOpticalFlowSessionNV = (PFN_vkCreateOpticalFlowSessionNV)load(context, "vkCreateOpticalFlowSessionNV"); vkDestroyOpticalFlowSessionNV = (PFN_vkDestroyOpticalFlowSessionNV)load(context, "vkDestroyOpticalFlowSessionNV"); #endif /* defined(VK_NV_optical_flow) */ #if defined(VK_NV_partitioned_acceleration_structure) vkCmdBuildPartitionedAccelerationStructuresNV = (PFN_vkCmdBuildPartitionedAccelerationStructuresNV)load(context, "vkCmdBuildPartitionedAccelerationStructuresNV"); vkGetPartitionedAccelerationStructuresBuildSizesNV = (PFN_vkGetPartitionedAccelerationStructuresBuildSizesNV)load(context, "vkGetPartitionedAccelerationStructuresBuildSizesNV"); #endif /* defined(VK_NV_partitioned_acceleration_structure) */ #if defined(VK_NV_ray_tracing) vkBindAccelerationStructureMemoryNV = (PFN_vkBindAccelerationStructureMemoryNV)load(context, "vkBindAccelerationStructureMemoryNV"); vkCmdBuildAccelerationStructureNV = (PFN_vkCmdBuildAccelerationStructureNV)load(context, "vkCmdBuildAccelerationStructureNV"); vkCmdCopyAccelerationStructureNV = (PFN_vkCmdCopyAccelerationStructureNV)load(context, "vkCmdCopyAccelerationStructureNV"); vkCmdTraceRaysNV = (PFN_vkCmdTraceRaysNV)load(context, "vkCmdTraceRaysNV"); vkCmdWriteAccelerationStructuresPropertiesNV = (PFN_vkCmdWriteAccelerationStructuresPropertiesNV)load(context, "vkCmdWriteAccelerationStructuresPropertiesNV"); vkCompileDeferredNV = (PFN_vkCompileDeferredNV)load(context, "vkCompileDeferredNV"); vkCreateAccelerationStructureNV = (PFN_vkCreateAccelerationStructureNV)load(context, "vkCreateAccelerationStructureNV"); vkCreateRayTracingPipelinesNV = (PFN_vkCreateRayTracingPipelinesNV)load(context, "vkCreateRayTracingPipelinesNV"); vkDestroyAccelerationStructureNV = (PFN_vkDestroyAccelerationStructureNV)load(context, "vkDestroyAccelerationStructureNV"); vkGetAccelerationStructureHandleNV = (PFN_vkGetAccelerationStructureHandleNV)load(context, "vkGetAccelerationStructureHandleNV"); vkGetAccelerationStructureMemoryRequirementsNV = (PFN_vkGetAccelerationStructureMemoryRequirementsNV)load(context, "vkGetAccelerationStructureMemoryRequirementsNV"); vkGetRayTracingShaderGroupHandlesNV = (PFN_vkGetRayTracingShaderGroupHandlesNV)load(context, "vkGetRayTracingShaderGroupHandlesNV"); #endif /* defined(VK_NV_ray_tracing) */ #if defined(VK_NV_scissor_exclusive) && VK_NV_SCISSOR_EXCLUSIVE_SPEC_VERSION >= 2 vkCmdSetExclusiveScissorEnableNV = (PFN_vkCmdSetExclusiveScissorEnableNV)load(context, "vkCmdSetExclusiveScissorEnableNV"); #endif /* defined(VK_NV_scissor_exclusive) && VK_NV_SCISSOR_EXCLUSIVE_SPEC_VERSION >= 2 */ #if defined(VK_NV_scissor_exclusive) vkCmdSetExclusiveScissorNV = (PFN_vkCmdSetExclusiveScissorNV)load(context, "vkCmdSetExclusiveScissorNV"); #endif /* defined(VK_NV_scissor_exclusive) */ #if defined(VK_NV_shading_rate_image) vkCmdBindShadingRateImageNV = (PFN_vkCmdBindShadingRateImageNV)load(context, "vkCmdBindShadingRateImageNV"); vkCmdSetCoarseSampleOrderNV = (PFN_vkCmdSetCoarseSampleOrderNV)load(context, "vkCmdSetCoarseSampleOrderNV"); vkCmdSetViewportShadingRatePaletteNV = (PFN_vkCmdSetViewportShadingRatePaletteNV)load(context, "vkCmdSetViewportShadingRatePaletteNV"); #endif /* defined(VK_NV_shading_rate_image) */ #if defined(VK_QCOM_tile_properties) vkGetDynamicRenderingTilePropertiesQCOM = (PFN_vkGetDynamicRenderingTilePropertiesQCOM)load(context, "vkGetDynamicRenderingTilePropertiesQCOM"); vkGetFramebufferTilePropertiesQCOM = (PFN_vkGetFramebufferTilePropertiesQCOM)load(context, "vkGetFramebufferTilePropertiesQCOM"); #endif /* defined(VK_QCOM_tile_properties) */ #if defined(VK_QNX_external_memory_screen_buffer) vkGetScreenBufferPropertiesQNX = (PFN_vkGetScreenBufferPropertiesQNX)load(context, "vkGetScreenBufferPropertiesQNX"); #endif /* defined(VK_QNX_external_memory_screen_buffer) */ #if defined(VK_VALVE_descriptor_set_host_mapping) vkGetDescriptorSetHostMappingVALVE = (PFN_vkGetDescriptorSetHostMappingVALVE)load(context, "vkGetDescriptorSetHostMappingVALVE"); vkGetDescriptorSetLayoutHostMappingInfoVALVE = (PFN_vkGetDescriptorSetLayoutHostMappingInfoVALVE)load(context, "vkGetDescriptorSetLayoutHostMappingInfoVALVE"); #endif /* defined(VK_VALVE_descriptor_set_host_mapping) */ #if (defined(VK_EXT_depth_clamp_control)) || (defined(VK_EXT_shader_object) && defined(VK_EXT_depth_clamp_control)) vkCmdSetDepthClampRangeEXT = (PFN_vkCmdSetDepthClampRangeEXT)load(context, "vkCmdSetDepthClampRangeEXT"); #endif /* (defined(VK_EXT_depth_clamp_control)) || (defined(VK_EXT_shader_object) && defined(VK_EXT_depth_clamp_control)) */ #if (defined(VK_EXT_extended_dynamic_state)) || (defined(VK_EXT_shader_object)) vkCmdBindVertexBuffers2EXT = (PFN_vkCmdBindVertexBuffers2EXT)load(context, "vkCmdBindVertexBuffers2EXT"); vkCmdSetCullModeEXT = (PFN_vkCmdSetCullModeEXT)load(context, "vkCmdSetCullModeEXT"); vkCmdSetDepthBoundsTestEnableEXT = (PFN_vkCmdSetDepthBoundsTestEnableEXT)load(context, "vkCmdSetDepthBoundsTestEnableEXT"); vkCmdSetDepthCompareOpEXT = (PFN_vkCmdSetDepthCompareOpEXT)load(context, "vkCmdSetDepthCompareOpEXT"); vkCmdSetDepthTestEnableEXT = (PFN_vkCmdSetDepthTestEnableEXT)load(context, "vkCmdSetDepthTestEnableEXT"); vkCmdSetDepthWriteEnableEXT = (PFN_vkCmdSetDepthWriteEnableEXT)load(context, "vkCmdSetDepthWriteEnableEXT"); vkCmdSetFrontFaceEXT = (PFN_vkCmdSetFrontFaceEXT)load(context, "vkCmdSetFrontFaceEXT"); vkCmdSetPrimitiveTopologyEXT = (PFN_vkCmdSetPrimitiveTopologyEXT)load(context, "vkCmdSetPrimitiveTopologyEXT"); vkCmdSetScissorWithCountEXT = (PFN_vkCmdSetScissorWithCountEXT)load(context, "vkCmdSetScissorWithCountEXT"); vkCmdSetStencilOpEXT = (PFN_vkCmdSetStencilOpEXT)load(context, "vkCmdSetStencilOpEXT"); vkCmdSetStencilTestEnableEXT = (PFN_vkCmdSetStencilTestEnableEXT)load(context, "vkCmdSetStencilTestEnableEXT"); vkCmdSetViewportWithCountEXT = (PFN_vkCmdSetViewportWithCountEXT)load(context, "vkCmdSetViewportWithCountEXT"); #endif /* (defined(VK_EXT_extended_dynamic_state)) || (defined(VK_EXT_shader_object)) */ #if (defined(VK_EXT_extended_dynamic_state2)) || (defined(VK_EXT_shader_object)) vkCmdSetDepthBiasEnableEXT = (PFN_vkCmdSetDepthBiasEnableEXT)load(context, "vkCmdSetDepthBiasEnableEXT"); vkCmdSetLogicOpEXT = (PFN_vkCmdSetLogicOpEXT)load(context, "vkCmdSetLogicOpEXT"); vkCmdSetPatchControlPointsEXT = (PFN_vkCmdSetPatchControlPointsEXT)load(context, "vkCmdSetPatchControlPointsEXT"); vkCmdSetPrimitiveRestartEnableEXT = (PFN_vkCmdSetPrimitiveRestartEnableEXT)load(context, "vkCmdSetPrimitiveRestartEnableEXT"); vkCmdSetRasterizerDiscardEnableEXT = (PFN_vkCmdSetRasterizerDiscardEnableEXT)load(context, "vkCmdSetRasterizerDiscardEnableEXT"); #endif /* (defined(VK_EXT_extended_dynamic_state2)) || (defined(VK_EXT_shader_object)) */ #if (defined(VK_EXT_extended_dynamic_state3)) || (defined(VK_EXT_shader_object)) vkCmdSetAlphaToCoverageEnableEXT = (PFN_vkCmdSetAlphaToCoverageEnableEXT)load(context, "vkCmdSetAlphaToCoverageEnableEXT"); vkCmdSetAlphaToOneEnableEXT = (PFN_vkCmdSetAlphaToOneEnableEXT)load(context, "vkCmdSetAlphaToOneEnableEXT"); vkCmdSetColorBlendEnableEXT = (PFN_vkCmdSetColorBlendEnableEXT)load(context, "vkCmdSetColorBlendEnableEXT"); vkCmdSetColorBlendEquationEXT = (PFN_vkCmdSetColorBlendEquationEXT)load(context, "vkCmdSetColorBlendEquationEXT"); vkCmdSetColorWriteMaskEXT = (PFN_vkCmdSetColorWriteMaskEXT)load(context, "vkCmdSetColorWriteMaskEXT"); vkCmdSetDepthClampEnableEXT = (PFN_vkCmdSetDepthClampEnableEXT)load(context, "vkCmdSetDepthClampEnableEXT"); vkCmdSetLogicOpEnableEXT = (PFN_vkCmdSetLogicOpEnableEXT)load(context, "vkCmdSetLogicOpEnableEXT"); vkCmdSetPolygonModeEXT = (PFN_vkCmdSetPolygonModeEXT)load(context, "vkCmdSetPolygonModeEXT"); vkCmdSetRasterizationSamplesEXT = (PFN_vkCmdSetRasterizationSamplesEXT)load(context, "vkCmdSetRasterizationSamplesEXT"); vkCmdSetSampleMaskEXT = (PFN_vkCmdSetSampleMaskEXT)load(context, "vkCmdSetSampleMaskEXT"); #endif /* (defined(VK_EXT_extended_dynamic_state3)) || (defined(VK_EXT_shader_object)) */ #if (defined(VK_EXT_extended_dynamic_state3) && (defined(VK_KHR_maintenance2) || defined(VK_VERSION_1_1))) || (defined(VK_EXT_shader_object)) vkCmdSetTessellationDomainOriginEXT = (PFN_vkCmdSetTessellationDomainOriginEXT)load(context, "vkCmdSetTessellationDomainOriginEXT"); #endif /* (defined(VK_EXT_extended_dynamic_state3) && (defined(VK_KHR_maintenance2) || defined(VK_VERSION_1_1))) || (defined(VK_EXT_shader_object)) */ #if (defined(VK_EXT_extended_dynamic_state3) && defined(VK_EXT_transform_feedback)) || (defined(VK_EXT_shader_object) && defined(VK_EXT_transform_feedback)) vkCmdSetRasterizationStreamEXT = (PFN_vkCmdSetRasterizationStreamEXT)load(context, "vkCmdSetRasterizationStreamEXT"); #endif /* (defined(VK_EXT_extended_dynamic_state3) && defined(VK_EXT_transform_feedback)) || (defined(VK_EXT_shader_object) && defined(VK_EXT_transform_feedback)) */ #if (defined(VK_EXT_extended_dynamic_state3) && defined(VK_EXT_conservative_rasterization)) || (defined(VK_EXT_shader_object) && defined(VK_EXT_conservative_rasterization)) vkCmdSetConservativeRasterizationModeEXT = (PFN_vkCmdSetConservativeRasterizationModeEXT)load(context, "vkCmdSetConservativeRasterizationModeEXT"); vkCmdSetExtraPrimitiveOverestimationSizeEXT = (PFN_vkCmdSetExtraPrimitiveOverestimationSizeEXT)load(context, "vkCmdSetExtraPrimitiveOverestimationSizeEXT"); #endif /* (defined(VK_EXT_extended_dynamic_state3) && defined(VK_EXT_conservative_rasterization)) || (defined(VK_EXT_shader_object) && defined(VK_EXT_conservative_rasterization)) */ #if (defined(VK_EXT_extended_dynamic_state3) && defined(VK_EXT_depth_clip_enable)) || (defined(VK_EXT_shader_object) && defined(VK_EXT_depth_clip_enable)) vkCmdSetDepthClipEnableEXT = (PFN_vkCmdSetDepthClipEnableEXT)load(context, "vkCmdSetDepthClipEnableEXT"); #endif /* (defined(VK_EXT_extended_dynamic_state3) && defined(VK_EXT_depth_clip_enable)) || (defined(VK_EXT_shader_object) && defined(VK_EXT_depth_clip_enable)) */ #if (defined(VK_EXT_extended_dynamic_state3) && defined(VK_EXT_sample_locations)) || (defined(VK_EXT_shader_object) && defined(VK_EXT_sample_locations)) vkCmdSetSampleLocationsEnableEXT = (PFN_vkCmdSetSampleLocationsEnableEXT)load(context, "vkCmdSetSampleLocationsEnableEXT"); #endif /* (defined(VK_EXT_extended_dynamic_state3) && defined(VK_EXT_sample_locations)) || (defined(VK_EXT_shader_object) && defined(VK_EXT_sample_locations)) */ #if (defined(VK_EXT_extended_dynamic_state3) && defined(VK_EXT_blend_operation_advanced)) || (defined(VK_EXT_shader_object) && defined(VK_EXT_blend_operation_advanced)) vkCmdSetColorBlendAdvancedEXT = (PFN_vkCmdSetColorBlendAdvancedEXT)load(context, "vkCmdSetColorBlendAdvancedEXT"); #endif /* (defined(VK_EXT_extended_dynamic_state3) && defined(VK_EXT_blend_operation_advanced)) || (defined(VK_EXT_shader_object) && defined(VK_EXT_blend_operation_advanced)) */ #if (defined(VK_EXT_extended_dynamic_state3) && defined(VK_EXT_provoking_vertex)) || (defined(VK_EXT_shader_object) && defined(VK_EXT_provoking_vertex)) vkCmdSetProvokingVertexModeEXT = (PFN_vkCmdSetProvokingVertexModeEXT)load(context, "vkCmdSetProvokingVertexModeEXT"); #endif /* (defined(VK_EXT_extended_dynamic_state3) && defined(VK_EXT_provoking_vertex)) || (defined(VK_EXT_shader_object) && defined(VK_EXT_provoking_vertex)) */ #if (defined(VK_EXT_extended_dynamic_state3) && defined(VK_EXT_line_rasterization)) || (defined(VK_EXT_shader_object) && defined(VK_EXT_line_rasterization)) vkCmdSetLineRasterizationModeEXT = (PFN_vkCmdSetLineRasterizationModeEXT)load(context, "vkCmdSetLineRasterizationModeEXT"); vkCmdSetLineStippleEnableEXT = (PFN_vkCmdSetLineStippleEnableEXT)load(context, "vkCmdSetLineStippleEnableEXT"); #endif /* (defined(VK_EXT_extended_dynamic_state3) && defined(VK_EXT_line_rasterization)) || (defined(VK_EXT_shader_object) && defined(VK_EXT_line_rasterization)) */ #if (defined(VK_EXT_extended_dynamic_state3) && defined(VK_EXT_depth_clip_control)) || (defined(VK_EXT_shader_object) && defined(VK_EXT_depth_clip_control)) vkCmdSetDepthClipNegativeOneToOneEXT = (PFN_vkCmdSetDepthClipNegativeOneToOneEXT)load(context, "vkCmdSetDepthClipNegativeOneToOneEXT"); #endif /* (defined(VK_EXT_extended_dynamic_state3) && defined(VK_EXT_depth_clip_control)) || (defined(VK_EXT_shader_object) && defined(VK_EXT_depth_clip_control)) */ #if (defined(VK_EXT_extended_dynamic_state3) && defined(VK_NV_clip_space_w_scaling)) || (defined(VK_EXT_shader_object) && defined(VK_NV_clip_space_w_scaling)) vkCmdSetViewportWScalingEnableNV = (PFN_vkCmdSetViewportWScalingEnableNV)load(context, "vkCmdSetViewportWScalingEnableNV"); #endif /* (defined(VK_EXT_extended_dynamic_state3) && defined(VK_NV_clip_space_w_scaling)) || (defined(VK_EXT_shader_object) && defined(VK_NV_clip_space_w_scaling)) */ #if (defined(VK_EXT_extended_dynamic_state3) && defined(VK_NV_viewport_swizzle)) || (defined(VK_EXT_shader_object) && defined(VK_NV_viewport_swizzle)) vkCmdSetViewportSwizzleNV = (PFN_vkCmdSetViewportSwizzleNV)load(context, "vkCmdSetViewportSwizzleNV"); #endif /* (defined(VK_EXT_extended_dynamic_state3) && defined(VK_NV_viewport_swizzle)) || (defined(VK_EXT_shader_object) && defined(VK_NV_viewport_swizzle)) */ #if (defined(VK_EXT_extended_dynamic_state3) && defined(VK_NV_fragment_coverage_to_color)) || (defined(VK_EXT_shader_object) && defined(VK_NV_fragment_coverage_to_color)) vkCmdSetCoverageToColorEnableNV = (PFN_vkCmdSetCoverageToColorEnableNV)load(context, "vkCmdSetCoverageToColorEnableNV"); vkCmdSetCoverageToColorLocationNV = (PFN_vkCmdSetCoverageToColorLocationNV)load(context, "vkCmdSetCoverageToColorLocationNV"); #endif /* (defined(VK_EXT_extended_dynamic_state3) && defined(VK_NV_fragment_coverage_to_color)) || (defined(VK_EXT_shader_object) && defined(VK_NV_fragment_coverage_to_color)) */ #if (defined(VK_EXT_extended_dynamic_state3) && defined(VK_NV_framebuffer_mixed_samples)) || (defined(VK_EXT_shader_object) && defined(VK_NV_framebuffer_mixed_samples)) vkCmdSetCoverageModulationModeNV = (PFN_vkCmdSetCoverageModulationModeNV)load(context, "vkCmdSetCoverageModulationModeNV"); vkCmdSetCoverageModulationTableEnableNV = (PFN_vkCmdSetCoverageModulationTableEnableNV)load(context, "vkCmdSetCoverageModulationTableEnableNV"); vkCmdSetCoverageModulationTableNV = (PFN_vkCmdSetCoverageModulationTableNV)load(context, "vkCmdSetCoverageModulationTableNV"); #endif /* (defined(VK_EXT_extended_dynamic_state3) && defined(VK_NV_framebuffer_mixed_samples)) || (defined(VK_EXT_shader_object) && defined(VK_NV_framebuffer_mixed_samples)) */ #if (defined(VK_EXT_extended_dynamic_state3) && defined(VK_NV_shading_rate_image)) || (defined(VK_EXT_shader_object) && defined(VK_NV_shading_rate_image)) vkCmdSetShadingRateImageEnableNV = (PFN_vkCmdSetShadingRateImageEnableNV)load(context, "vkCmdSetShadingRateImageEnableNV"); #endif /* (defined(VK_EXT_extended_dynamic_state3) && defined(VK_NV_shading_rate_image)) || (defined(VK_EXT_shader_object) && defined(VK_NV_shading_rate_image)) */ #if (defined(VK_EXT_extended_dynamic_state3) && defined(VK_NV_representative_fragment_test)) || (defined(VK_EXT_shader_object) && defined(VK_NV_representative_fragment_test)) vkCmdSetRepresentativeFragmentTestEnableNV = (PFN_vkCmdSetRepresentativeFragmentTestEnableNV)load(context, "vkCmdSetRepresentativeFragmentTestEnableNV"); #endif /* (defined(VK_EXT_extended_dynamic_state3) && defined(VK_NV_representative_fragment_test)) || (defined(VK_EXT_shader_object) && defined(VK_NV_representative_fragment_test)) */ #if (defined(VK_EXT_extended_dynamic_state3) && defined(VK_NV_coverage_reduction_mode)) || (defined(VK_EXT_shader_object) && defined(VK_NV_coverage_reduction_mode)) vkCmdSetCoverageReductionModeNV = (PFN_vkCmdSetCoverageReductionModeNV)load(context, "vkCmdSetCoverageReductionModeNV"); #endif /* (defined(VK_EXT_extended_dynamic_state3) && defined(VK_NV_coverage_reduction_mode)) || (defined(VK_EXT_shader_object) && defined(VK_NV_coverage_reduction_mode)) */ #if (defined(VK_EXT_host_image_copy)) || (defined(VK_EXT_image_compression_control)) vkGetImageSubresourceLayout2EXT = (PFN_vkGetImageSubresourceLayout2EXT)load(context, "vkGetImageSubresourceLayout2EXT"); #endif /* (defined(VK_EXT_host_image_copy)) || (defined(VK_EXT_image_compression_control)) */ #if (defined(VK_EXT_shader_object)) || (defined(VK_EXT_vertex_input_dynamic_state)) vkCmdSetVertexInputEXT = (PFN_vkCmdSetVertexInputEXT)load(context, "vkCmdSetVertexInputEXT"); #endif /* (defined(VK_EXT_shader_object)) || (defined(VK_EXT_vertex_input_dynamic_state)) */ #if (defined(VK_KHR_descriptor_update_template) && defined(VK_KHR_push_descriptor)) || (defined(VK_KHR_push_descriptor) && (defined(VK_VERSION_1_1) || defined(VK_KHR_descriptor_update_template))) vkCmdPushDescriptorSetWithTemplateKHR = (PFN_vkCmdPushDescriptorSetWithTemplateKHR)load(context, "vkCmdPushDescriptorSetWithTemplateKHR"); #endif /* (defined(VK_KHR_descriptor_update_template) && defined(VK_KHR_push_descriptor)) || (defined(VK_KHR_push_descriptor) && (defined(VK_VERSION_1_1) || defined(VK_KHR_descriptor_update_template))) */ #if (defined(VK_KHR_device_group) && defined(VK_KHR_surface)) || (defined(VK_KHR_swapchain) && defined(VK_VERSION_1_1)) vkGetDeviceGroupPresentCapabilitiesKHR = (PFN_vkGetDeviceGroupPresentCapabilitiesKHR)load(context, "vkGetDeviceGroupPresentCapabilitiesKHR"); vkGetDeviceGroupSurfacePresentModesKHR = (PFN_vkGetDeviceGroupSurfacePresentModesKHR)load(context, "vkGetDeviceGroupSurfacePresentModesKHR"); #endif /* (defined(VK_KHR_device_group) && defined(VK_KHR_surface)) || (defined(VK_KHR_swapchain) && defined(VK_VERSION_1_1)) */ #if (defined(VK_KHR_device_group) && defined(VK_KHR_swapchain)) || (defined(VK_KHR_swapchain) && defined(VK_VERSION_1_1)) vkAcquireNextImage2KHR = (PFN_vkAcquireNextImage2KHR)load(context, "vkAcquireNextImage2KHR"); #endif /* (defined(VK_KHR_device_group) && defined(VK_KHR_swapchain)) || (defined(VK_KHR_swapchain) && defined(VK_VERSION_1_1)) */ /* VOLK_GENERATE_LOAD_DEVICE */ } static void volkGenLoadDeviceTable(struct VolkDeviceTable* table, void* context, PFN_vkVoidFunction (*load)(void*, const char*)) { /* VOLK_GENERATE_LOAD_DEVICE_TABLE */ #if defined(VK_VERSION_1_0) table->vkAllocateCommandBuffers = (PFN_vkAllocateCommandBuffers)load(context, "vkAllocateCommandBuffers"); table->vkAllocateDescriptorSets = (PFN_vkAllocateDescriptorSets)load(context, "vkAllocateDescriptorSets"); table->vkAllocateMemory = (PFN_vkAllocateMemory)load(context, "vkAllocateMemory"); table->vkBeginCommandBuffer = (PFN_vkBeginCommandBuffer)load(context, "vkBeginCommandBuffer"); table->vkBindBufferMemory = (PFN_vkBindBufferMemory)load(context, "vkBindBufferMemory"); table->vkBindImageMemory = (PFN_vkBindImageMemory)load(context, "vkBindImageMemory"); table->vkCmdBeginQuery = (PFN_vkCmdBeginQuery)load(context, "vkCmdBeginQuery"); table->vkCmdBeginRenderPass = (PFN_vkCmdBeginRenderPass)load(context, "vkCmdBeginRenderPass"); table->vkCmdBindDescriptorSets = (PFN_vkCmdBindDescriptorSets)load(context, "vkCmdBindDescriptorSets"); table->vkCmdBindIndexBuffer = (PFN_vkCmdBindIndexBuffer)load(context, "vkCmdBindIndexBuffer"); table->vkCmdBindPipeline = (PFN_vkCmdBindPipeline)load(context, "vkCmdBindPipeline"); table->vkCmdBindVertexBuffers = (PFN_vkCmdBindVertexBuffers)load(context, "vkCmdBindVertexBuffers"); table->vkCmdBlitImage = (PFN_vkCmdBlitImage)load(context, "vkCmdBlitImage"); table->vkCmdClearAttachments = (PFN_vkCmdClearAttachments)load(context, "vkCmdClearAttachments"); table->vkCmdClearColorImage = (PFN_vkCmdClearColorImage)load(context, "vkCmdClearColorImage"); table->vkCmdClearDepthStencilImage = (PFN_vkCmdClearDepthStencilImage)load(context, "vkCmdClearDepthStencilImage"); table->vkCmdCopyBuffer = (PFN_vkCmdCopyBuffer)load(context, "vkCmdCopyBuffer"); table->vkCmdCopyBufferToImage = (PFN_vkCmdCopyBufferToImage)load(context, "vkCmdCopyBufferToImage"); table->vkCmdCopyImage = (PFN_vkCmdCopyImage)load(context, "vkCmdCopyImage"); table->vkCmdCopyImageToBuffer = (PFN_vkCmdCopyImageToBuffer)load(context, "vkCmdCopyImageToBuffer"); table->vkCmdCopyQueryPoolResults = (PFN_vkCmdCopyQueryPoolResults)load(context, "vkCmdCopyQueryPoolResults"); table->vkCmdDispatch = (PFN_vkCmdDispatch)load(context, "vkCmdDispatch"); table->vkCmdDispatchIndirect = (PFN_vkCmdDispatchIndirect)load(context, "vkCmdDispatchIndirect"); table->vkCmdDraw = (PFN_vkCmdDraw)load(context, "vkCmdDraw"); table->vkCmdDrawIndexed = (PFN_vkCmdDrawIndexed)load(context, "vkCmdDrawIndexed"); table->vkCmdDrawIndexedIndirect = (PFN_vkCmdDrawIndexedIndirect)load(context, "vkCmdDrawIndexedIndirect"); table->vkCmdDrawIndirect = (PFN_vkCmdDrawIndirect)load(context, "vkCmdDrawIndirect"); table->vkCmdEndQuery = (PFN_vkCmdEndQuery)load(context, "vkCmdEndQuery"); table->vkCmdEndRenderPass = (PFN_vkCmdEndRenderPass)load(context, "vkCmdEndRenderPass"); table->vkCmdExecuteCommands = (PFN_vkCmdExecuteCommands)load(context, "vkCmdExecuteCommands"); table->vkCmdFillBuffer = (PFN_vkCmdFillBuffer)load(context, "vkCmdFillBuffer"); table->vkCmdNextSubpass = (PFN_vkCmdNextSubpass)load(context, "vkCmdNextSubpass"); table->vkCmdPipelineBarrier = (PFN_vkCmdPipelineBarrier)load(context, "vkCmdPipelineBarrier"); table->vkCmdPushConstants = (PFN_vkCmdPushConstants)load(context, "vkCmdPushConstants"); table->vkCmdResetEvent = (PFN_vkCmdResetEvent)load(context, "vkCmdResetEvent"); table->vkCmdResetQueryPool = (PFN_vkCmdResetQueryPool)load(context, "vkCmdResetQueryPool"); table->vkCmdResolveImage = (PFN_vkCmdResolveImage)load(context, "vkCmdResolveImage"); table->vkCmdSetBlendConstants = (PFN_vkCmdSetBlendConstants)load(context, "vkCmdSetBlendConstants"); table->vkCmdSetDepthBias = (PFN_vkCmdSetDepthBias)load(context, "vkCmdSetDepthBias"); table->vkCmdSetDepthBounds = (PFN_vkCmdSetDepthBounds)load(context, "vkCmdSetDepthBounds"); table->vkCmdSetEvent = (PFN_vkCmdSetEvent)load(context, "vkCmdSetEvent"); table->vkCmdSetLineWidth = (PFN_vkCmdSetLineWidth)load(context, "vkCmdSetLineWidth"); table->vkCmdSetScissor = (PFN_vkCmdSetScissor)load(context, "vkCmdSetScissor"); table->vkCmdSetStencilCompareMask = (PFN_vkCmdSetStencilCompareMask)load(context, "vkCmdSetStencilCompareMask"); table->vkCmdSetStencilReference = (PFN_vkCmdSetStencilReference)load(context, "vkCmdSetStencilReference"); table->vkCmdSetStencilWriteMask = (PFN_vkCmdSetStencilWriteMask)load(context, "vkCmdSetStencilWriteMask"); table->vkCmdSetViewport = (PFN_vkCmdSetViewport)load(context, "vkCmdSetViewport"); table->vkCmdUpdateBuffer = (PFN_vkCmdUpdateBuffer)load(context, "vkCmdUpdateBuffer"); table->vkCmdWaitEvents = (PFN_vkCmdWaitEvents)load(context, "vkCmdWaitEvents"); table->vkCmdWriteTimestamp = (PFN_vkCmdWriteTimestamp)load(context, "vkCmdWriteTimestamp"); table->vkCreateBuffer = (PFN_vkCreateBuffer)load(context, "vkCreateBuffer"); table->vkCreateBufferView = (PFN_vkCreateBufferView)load(context, "vkCreateBufferView"); table->vkCreateCommandPool = (PFN_vkCreateCommandPool)load(context, "vkCreateCommandPool"); table->vkCreateComputePipelines = (PFN_vkCreateComputePipelines)load(context, "vkCreateComputePipelines"); table->vkCreateDescriptorPool = (PFN_vkCreateDescriptorPool)load(context, "vkCreateDescriptorPool"); table->vkCreateDescriptorSetLayout = (PFN_vkCreateDescriptorSetLayout)load(context, "vkCreateDescriptorSetLayout"); table->vkCreateEvent = (PFN_vkCreateEvent)load(context, "vkCreateEvent"); table->vkCreateFence = (PFN_vkCreateFence)load(context, "vkCreateFence"); table->vkCreateFramebuffer = (PFN_vkCreateFramebuffer)load(context, "vkCreateFramebuffer"); table->vkCreateGraphicsPipelines = (PFN_vkCreateGraphicsPipelines)load(context, "vkCreateGraphicsPipelines"); table->vkCreateImage = (PFN_vkCreateImage)load(context, "vkCreateImage"); table->vkCreateImageView = (PFN_vkCreateImageView)load(context, "vkCreateImageView"); table->vkCreatePipelineCache = (PFN_vkCreatePipelineCache)load(context, "vkCreatePipelineCache"); table->vkCreatePipelineLayout = (PFN_vkCreatePipelineLayout)load(context, "vkCreatePipelineLayout"); table->vkCreateQueryPool = (PFN_vkCreateQueryPool)load(context, "vkCreateQueryPool"); table->vkCreateRenderPass = (PFN_vkCreateRenderPass)load(context, "vkCreateRenderPass"); table->vkCreateSampler = (PFN_vkCreateSampler)load(context, "vkCreateSampler"); table->vkCreateSemaphore = (PFN_vkCreateSemaphore)load(context, "vkCreateSemaphore"); table->vkCreateShaderModule = (PFN_vkCreateShaderModule)load(context, "vkCreateShaderModule"); table->vkDestroyBuffer = (PFN_vkDestroyBuffer)load(context, "vkDestroyBuffer"); table->vkDestroyBufferView = (PFN_vkDestroyBufferView)load(context, "vkDestroyBufferView"); table->vkDestroyCommandPool = (PFN_vkDestroyCommandPool)load(context, "vkDestroyCommandPool"); table->vkDestroyDescriptorPool = (PFN_vkDestroyDescriptorPool)load(context, "vkDestroyDescriptorPool"); table->vkDestroyDescriptorSetLayout = (PFN_vkDestroyDescriptorSetLayout)load(context, "vkDestroyDescriptorSetLayout"); table->vkDestroyDevice = (PFN_vkDestroyDevice)load(context, "vkDestroyDevice"); table->vkDestroyEvent = (PFN_vkDestroyEvent)load(context, "vkDestroyEvent"); table->vkDestroyFence = (PFN_vkDestroyFence)load(context, "vkDestroyFence"); table->vkDestroyFramebuffer = (PFN_vkDestroyFramebuffer)load(context, "vkDestroyFramebuffer"); table->vkDestroyImage = (PFN_vkDestroyImage)load(context, "vkDestroyImage"); table->vkDestroyImageView = (PFN_vkDestroyImageView)load(context, "vkDestroyImageView"); table->vkDestroyPipeline = (PFN_vkDestroyPipeline)load(context, "vkDestroyPipeline"); table->vkDestroyPipelineCache = (PFN_vkDestroyPipelineCache)load(context, "vkDestroyPipelineCache"); table->vkDestroyPipelineLayout = (PFN_vkDestroyPipelineLayout)load(context, "vkDestroyPipelineLayout"); table->vkDestroyQueryPool = (PFN_vkDestroyQueryPool)load(context, "vkDestroyQueryPool"); table->vkDestroyRenderPass = (PFN_vkDestroyRenderPass)load(context, "vkDestroyRenderPass"); table->vkDestroySampler = (PFN_vkDestroySampler)load(context, "vkDestroySampler"); table->vkDestroySemaphore = (PFN_vkDestroySemaphore)load(context, "vkDestroySemaphore"); table->vkDestroyShaderModule = (PFN_vkDestroyShaderModule)load(context, "vkDestroyShaderModule"); table->vkDeviceWaitIdle = (PFN_vkDeviceWaitIdle)load(context, "vkDeviceWaitIdle"); table->vkEndCommandBuffer = (PFN_vkEndCommandBuffer)load(context, "vkEndCommandBuffer"); table->vkFlushMappedMemoryRanges = (PFN_vkFlushMappedMemoryRanges)load(context, "vkFlushMappedMemoryRanges"); table->vkFreeCommandBuffers = (PFN_vkFreeCommandBuffers)load(context, "vkFreeCommandBuffers"); table->vkFreeDescriptorSets = (PFN_vkFreeDescriptorSets)load(context, "vkFreeDescriptorSets"); table->vkFreeMemory = (PFN_vkFreeMemory)load(context, "vkFreeMemory"); table->vkGetBufferMemoryRequirements = (PFN_vkGetBufferMemoryRequirements)load(context, "vkGetBufferMemoryRequirements"); table->vkGetDeviceMemoryCommitment = (PFN_vkGetDeviceMemoryCommitment)load(context, "vkGetDeviceMemoryCommitment"); table->vkGetDeviceQueue = (PFN_vkGetDeviceQueue)load(context, "vkGetDeviceQueue"); table->vkGetEventStatus = (PFN_vkGetEventStatus)load(context, "vkGetEventStatus"); table->vkGetFenceStatus = (PFN_vkGetFenceStatus)load(context, "vkGetFenceStatus"); table->vkGetImageMemoryRequirements = (PFN_vkGetImageMemoryRequirements)load(context, "vkGetImageMemoryRequirements"); table->vkGetImageSparseMemoryRequirements = (PFN_vkGetImageSparseMemoryRequirements)load(context, "vkGetImageSparseMemoryRequirements"); table->vkGetImageSubresourceLayout = (PFN_vkGetImageSubresourceLayout)load(context, "vkGetImageSubresourceLayout"); table->vkGetPipelineCacheData = (PFN_vkGetPipelineCacheData)load(context, "vkGetPipelineCacheData"); table->vkGetQueryPoolResults = (PFN_vkGetQueryPoolResults)load(context, "vkGetQueryPoolResults"); table->vkGetRenderAreaGranularity = (PFN_vkGetRenderAreaGranularity)load(context, "vkGetRenderAreaGranularity"); table->vkInvalidateMappedMemoryRanges = (PFN_vkInvalidateMappedMemoryRanges)load(context, "vkInvalidateMappedMemoryRanges"); table->vkMapMemory = (PFN_vkMapMemory)load(context, "vkMapMemory"); table->vkMergePipelineCaches = (PFN_vkMergePipelineCaches)load(context, "vkMergePipelineCaches"); table->vkQueueBindSparse = (PFN_vkQueueBindSparse)load(context, "vkQueueBindSparse"); table->vkQueueSubmit = (PFN_vkQueueSubmit)load(context, "vkQueueSubmit"); table->vkQueueWaitIdle = (PFN_vkQueueWaitIdle)load(context, "vkQueueWaitIdle"); table->vkResetCommandBuffer = (PFN_vkResetCommandBuffer)load(context, "vkResetCommandBuffer"); table->vkResetCommandPool = (PFN_vkResetCommandPool)load(context, "vkResetCommandPool"); table->vkResetDescriptorPool = (PFN_vkResetDescriptorPool)load(context, "vkResetDescriptorPool"); table->vkResetEvent = (PFN_vkResetEvent)load(context, "vkResetEvent"); table->vkResetFences = (PFN_vkResetFences)load(context, "vkResetFences"); table->vkSetEvent = (PFN_vkSetEvent)load(context, "vkSetEvent"); table->vkUnmapMemory = (PFN_vkUnmapMemory)load(context, "vkUnmapMemory"); table->vkUpdateDescriptorSets = (PFN_vkUpdateDescriptorSets)load(context, "vkUpdateDescriptorSets"); table->vkWaitForFences = (PFN_vkWaitForFences)load(context, "vkWaitForFences"); #endif /* defined(VK_VERSION_1_0) */ #if defined(VK_VERSION_1_1) table->vkBindBufferMemory2 = (PFN_vkBindBufferMemory2)load(context, "vkBindBufferMemory2"); table->vkBindImageMemory2 = (PFN_vkBindImageMemory2)load(context, "vkBindImageMemory2"); table->vkCmdDispatchBase = (PFN_vkCmdDispatchBase)load(context, "vkCmdDispatchBase"); table->vkCmdSetDeviceMask = (PFN_vkCmdSetDeviceMask)load(context, "vkCmdSetDeviceMask"); table->vkCreateDescriptorUpdateTemplate = (PFN_vkCreateDescriptorUpdateTemplate)load(context, "vkCreateDescriptorUpdateTemplate"); table->vkCreateSamplerYcbcrConversion = (PFN_vkCreateSamplerYcbcrConversion)load(context, "vkCreateSamplerYcbcrConversion"); table->vkDestroyDescriptorUpdateTemplate = (PFN_vkDestroyDescriptorUpdateTemplate)load(context, "vkDestroyDescriptorUpdateTemplate"); table->vkDestroySamplerYcbcrConversion = (PFN_vkDestroySamplerYcbcrConversion)load(context, "vkDestroySamplerYcbcrConversion"); table->vkGetBufferMemoryRequirements2 = (PFN_vkGetBufferMemoryRequirements2)load(context, "vkGetBufferMemoryRequirements2"); table->vkGetDescriptorSetLayoutSupport = (PFN_vkGetDescriptorSetLayoutSupport)load(context, "vkGetDescriptorSetLayoutSupport"); table->vkGetDeviceGroupPeerMemoryFeatures = (PFN_vkGetDeviceGroupPeerMemoryFeatures)load(context, "vkGetDeviceGroupPeerMemoryFeatures"); table->vkGetDeviceQueue2 = (PFN_vkGetDeviceQueue2)load(context, "vkGetDeviceQueue2"); table->vkGetImageMemoryRequirements2 = (PFN_vkGetImageMemoryRequirements2)load(context, "vkGetImageMemoryRequirements2"); table->vkGetImageSparseMemoryRequirements2 = (PFN_vkGetImageSparseMemoryRequirements2)load(context, "vkGetImageSparseMemoryRequirements2"); table->vkTrimCommandPool = (PFN_vkTrimCommandPool)load(context, "vkTrimCommandPool"); table->vkUpdateDescriptorSetWithTemplate = (PFN_vkUpdateDescriptorSetWithTemplate)load(context, "vkUpdateDescriptorSetWithTemplate"); #endif /* defined(VK_VERSION_1_1) */ #if defined(VK_VERSION_1_2) table->vkCmdBeginRenderPass2 = (PFN_vkCmdBeginRenderPass2)load(context, "vkCmdBeginRenderPass2"); table->vkCmdDrawIndexedIndirectCount = (PFN_vkCmdDrawIndexedIndirectCount)load(context, "vkCmdDrawIndexedIndirectCount"); table->vkCmdDrawIndirectCount = (PFN_vkCmdDrawIndirectCount)load(context, "vkCmdDrawIndirectCount"); table->vkCmdEndRenderPass2 = (PFN_vkCmdEndRenderPass2)load(context, "vkCmdEndRenderPass2"); table->vkCmdNextSubpass2 = (PFN_vkCmdNextSubpass2)load(context, "vkCmdNextSubpass2"); table->vkCreateRenderPass2 = (PFN_vkCreateRenderPass2)load(context, "vkCreateRenderPass2"); table->vkGetBufferDeviceAddress = (PFN_vkGetBufferDeviceAddress)load(context, "vkGetBufferDeviceAddress"); table->vkGetBufferOpaqueCaptureAddress = (PFN_vkGetBufferOpaqueCaptureAddress)load(context, "vkGetBufferOpaqueCaptureAddress"); table->vkGetDeviceMemoryOpaqueCaptureAddress = (PFN_vkGetDeviceMemoryOpaqueCaptureAddress)load(context, "vkGetDeviceMemoryOpaqueCaptureAddress"); table->vkGetSemaphoreCounterValue = (PFN_vkGetSemaphoreCounterValue)load(context, "vkGetSemaphoreCounterValue"); table->vkResetQueryPool = (PFN_vkResetQueryPool)load(context, "vkResetQueryPool"); table->vkSignalSemaphore = (PFN_vkSignalSemaphore)load(context, "vkSignalSemaphore"); table->vkWaitSemaphores = (PFN_vkWaitSemaphores)load(context, "vkWaitSemaphores"); #endif /* defined(VK_VERSION_1_2) */ #if defined(VK_VERSION_1_3) table->vkCmdBeginRendering = (PFN_vkCmdBeginRendering)load(context, "vkCmdBeginRendering"); table->vkCmdBindVertexBuffers2 = (PFN_vkCmdBindVertexBuffers2)load(context, "vkCmdBindVertexBuffers2"); table->vkCmdBlitImage2 = (PFN_vkCmdBlitImage2)load(context, "vkCmdBlitImage2"); table->vkCmdCopyBuffer2 = (PFN_vkCmdCopyBuffer2)load(context, "vkCmdCopyBuffer2"); table->vkCmdCopyBufferToImage2 = (PFN_vkCmdCopyBufferToImage2)load(context, "vkCmdCopyBufferToImage2"); table->vkCmdCopyImage2 = (PFN_vkCmdCopyImage2)load(context, "vkCmdCopyImage2"); table->vkCmdCopyImageToBuffer2 = (PFN_vkCmdCopyImageToBuffer2)load(context, "vkCmdCopyImageToBuffer2"); table->vkCmdEndRendering = (PFN_vkCmdEndRendering)load(context, "vkCmdEndRendering"); table->vkCmdPipelineBarrier2 = (PFN_vkCmdPipelineBarrier2)load(context, "vkCmdPipelineBarrier2"); table->vkCmdResetEvent2 = (PFN_vkCmdResetEvent2)load(context, "vkCmdResetEvent2"); table->vkCmdResolveImage2 = (PFN_vkCmdResolveImage2)load(context, "vkCmdResolveImage2"); table->vkCmdSetCullMode = (PFN_vkCmdSetCullMode)load(context, "vkCmdSetCullMode"); table->vkCmdSetDepthBiasEnable = (PFN_vkCmdSetDepthBiasEnable)load(context, "vkCmdSetDepthBiasEnable"); table->vkCmdSetDepthBoundsTestEnable = (PFN_vkCmdSetDepthBoundsTestEnable)load(context, "vkCmdSetDepthBoundsTestEnable"); table->vkCmdSetDepthCompareOp = (PFN_vkCmdSetDepthCompareOp)load(context, "vkCmdSetDepthCompareOp"); table->vkCmdSetDepthTestEnable = (PFN_vkCmdSetDepthTestEnable)load(context, "vkCmdSetDepthTestEnable"); table->vkCmdSetDepthWriteEnable = (PFN_vkCmdSetDepthWriteEnable)load(context, "vkCmdSetDepthWriteEnable"); table->vkCmdSetEvent2 = (PFN_vkCmdSetEvent2)load(context, "vkCmdSetEvent2"); table->vkCmdSetFrontFace = (PFN_vkCmdSetFrontFace)load(context, "vkCmdSetFrontFace"); table->vkCmdSetPrimitiveRestartEnable = (PFN_vkCmdSetPrimitiveRestartEnable)load(context, "vkCmdSetPrimitiveRestartEnable"); table->vkCmdSetPrimitiveTopology = (PFN_vkCmdSetPrimitiveTopology)load(context, "vkCmdSetPrimitiveTopology"); table->vkCmdSetRasterizerDiscardEnable = (PFN_vkCmdSetRasterizerDiscardEnable)load(context, "vkCmdSetRasterizerDiscardEnable"); table->vkCmdSetScissorWithCount = (PFN_vkCmdSetScissorWithCount)load(context, "vkCmdSetScissorWithCount"); table->vkCmdSetStencilOp = (PFN_vkCmdSetStencilOp)load(context, "vkCmdSetStencilOp"); table->vkCmdSetStencilTestEnable = (PFN_vkCmdSetStencilTestEnable)load(context, "vkCmdSetStencilTestEnable"); table->vkCmdSetViewportWithCount = (PFN_vkCmdSetViewportWithCount)load(context, "vkCmdSetViewportWithCount"); table->vkCmdWaitEvents2 = (PFN_vkCmdWaitEvents2)load(context, "vkCmdWaitEvents2"); table->vkCmdWriteTimestamp2 = (PFN_vkCmdWriteTimestamp2)load(context, "vkCmdWriteTimestamp2"); table->vkCreatePrivateDataSlot = (PFN_vkCreatePrivateDataSlot)load(context, "vkCreatePrivateDataSlot"); table->vkDestroyPrivateDataSlot = (PFN_vkDestroyPrivateDataSlot)load(context, "vkDestroyPrivateDataSlot"); table->vkGetDeviceBufferMemoryRequirements = (PFN_vkGetDeviceBufferMemoryRequirements)load(context, "vkGetDeviceBufferMemoryRequirements"); table->vkGetDeviceImageMemoryRequirements = (PFN_vkGetDeviceImageMemoryRequirements)load(context, "vkGetDeviceImageMemoryRequirements"); table->vkGetDeviceImageSparseMemoryRequirements = (PFN_vkGetDeviceImageSparseMemoryRequirements)load(context, "vkGetDeviceImageSparseMemoryRequirements"); table->vkGetPrivateData = (PFN_vkGetPrivateData)load(context, "vkGetPrivateData"); table->vkQueueSubmit2 = (PFN_vkQueueSubmit2)load(context, "vkQueueSubmit2"); table->vkSetPrivateData = (PFN_vkSetPrivateData)load(context, "vkSetPrivateData"); #endif /* defined(VK_VERSION_1_3) */ #if defined(VK_VERSION_1_4) table->vkCmdBindDescriptorSets2 = (PFN_vkCmdBindDescriptorSets2)load(context, "vkCmdBindDescriptorSets2"); table->vkCmdBindIndexBuffer2 = (PFN_vkCmdBindIndexBuffer2)load(context, "vkCmdBindIndexBuffer2"); table->vkCmdPushConstants2 = (PFN_vkCmdPushConstants2)load(context, "vkCmdPushConstants2"); table->vkCmdPushDescriptorSet = (PFN_vkCmdPushDescriptorSet)load(context, "vkCmdPushDescriptorSet"); table->vkCmdPushDescriptorSet2 = (PFN_vkCmdPushDescriptorSet2)load(context, "vkCmdPushDescriptorSet2"); table->vkCmdPushDescriptorSetWithTemplate = (PFN_vkCmdPushDescriptorSetWithTemplate)load(context, "vkCmdPushDescriptorSetWithTemplate"); table->vkCmdPushDescriptorSetWithTemplate2 = (PFN_vkCmdPushDescriptorSetWithTemplate2)load(context, "vkCmdPushDescriptorSetWithTemplate2"); table->vkCmdSetLineStipple = (PFN_vkCmdSetLineStipple)load(context, "vkCmdSetLineStipple"); table->vkCmdSetRenderingAttachmentLocations = (PFN_vkCmdSetRenderingAttachmentLocations)load(context, "vkCmdSetRenderingAttachmentLocations"); table->vkCmdSetRenderingInputAttachmentIndices = (PFN_vkCmdSetRenderingInputAttachmentIndices)load(context, "vkCmdSetRenderingInputAttachmentIndices"); table->vkCopyImageToImage = (PFN_vkCopyImageToImage)load(context, "vkCopyImageToImage"); table->vkCopyImageToMemory = (PFN_vkCopyImageToMemory)load(context, "vkCopyImageToMemory"); table->vkCopyMemoryToImage = (PFN_vkCopyMemoryToImage)load(context, "vkCopyMemoryToImage"); table->vkGetDeviceImageSubresourceLayout = (PFN_vkGetDeviceImageSubresourceLayout)load(context, "vkGetDeviceImageSubresourceLayout"); table->vkGetImageSubresourceLayout2 = (PFN_vkGetImageSubresourceLayout2)load(context, "vkGetImageSubresourceLayout2"); table->vkGetRenderingAreaGranularity = (PFN_vkGetRenderingAreaGranularity)load(context, "vkGetRenderingAreaGranularity"); table->vkMapMemory2 = (PFN_vkMapMemory2)load(context, "vkMapMemory2"); table->vkTransitionImageLayout = (PFN_vkTransitionImageLayout)load(context, "vkTransitionImageLayout"); table->vkUnmapMemory2 = (PFN_vkUnmapMemory2)load(context, "vkUnmapMemory2"); #endif /* defined(VK_VERSION_1_4) */ #if defined(VK_AMDX_shader_enqueue) table->vkCmdDispatchGraphAMDX = (PFN_vkCmdDispatchGraphAMDX)load(context, "vkCmdDispatchGraphAMDX"); table->vkCmdDispatchGraphIndirectAMDX = (PFN_vkCmdDispatchGraphIndirectAMDX)load(context, "vkCmdDispatchGraphIndirectAMDX"); table->vkCmdDispatchGraphIndirectCountAMDX = (PFN_vkCmdDispatchGraphIndirectCountAMDX)load(context, "vkCmdDispatchGraphIndirectCountAMDX"); table->vkCmdInitializeGraphScratchMemoryAMDX = (PFN_vkCmdInitializeGraphScratchMemoryAMDX)load(context, "vkCmdInitializeGraphScratchMemoryAMDX"); table->vkCreateExecutionGraphPipelinesAMDX = (PFN_vkCreateExecutionGraphPipelinesAMDX)load(context, "vkCreateExecutionGraphPipelinesAMDX"); table->vkGetExecutionGraphPipelineNodeIndexAMDX = (PFN_vkGetExecutionGraphPipelineNodeIndexAMDX)load(context, "vkGetExecutionGraphPipelineNodeIndexAMDX"); table->vkGetExecutionGraphPipelineScratchSizeAMDX = (PFN_vkGetExecutionGraphPipelineScratchSizeAMDX)load(context, "vkGetExecutionGraphPipelineScratchSizeAMDX"); #endif /* defined(VK_AMDX_shader_enqueue) */ #if defined(VK_AMD_anti_lag) table->vkAntiLagUpdateAMD = (PFN_vkAntiLagUpdateAMD)load(context, "vkAntiLagUpdateAMD"); #endif /* defined(VK_AMD_anti_lag) */ #if defined(VK_AMD_buffer_marker) table->vkCmdWriteBufferMarkerAMD = (PFN_vkCmdWriteBufferMarkerAMD)load(context, "vkCmdWriteBufferMarkerAMD"); #endif /* defined(VK_AMD_buffer_marker) */ #if defined(VK_AMD_buffer_marker) && (defined(VK_VERSION_1_3) || defined(VK_KHR_synchronization2)) table->vkCmdWriteBufferMarker2AMD = (PFN_vkCmdWriteBufferMarker2AMD)load(context, "vkCmdWriteBufferMarker2AMD"); #endif /* defined(VK_AMD_buffer_marker) && (defined(VK_VERSION_1_3) || defined(VK_KHR_synchronization2)) */ #if defined(VK_AMD_display_native_hdr) table->vkSetLocalDimmingAMD = (PFN_vkSetLocalDimmingAMD)load(context, "vkSetLocalDimmingAMD"); #endif /* defined(VK_AMD_display_native_hdr) */ #if defined(VK_AMD_draw_indirect_count) table->vkCmdDrawIndexedIndirectCountAMD = (PFN_vkCmdDrawIndexedIndirectCountAMD)load(context, "vkCmdDrawIndexedIndirectCountAMD"); table->vkCmdDrawIndirectCountAMD = (PFN_vkCmdDrawIndirectCountAMD)load(context, "vkCmdDrawIndirectCountAMD"); #endif /* defined(VK_AMD_draw_indirect_count) */ #if defined(VK_AMD_shader_info) table->vkGetShaderInfoAMD = (PFN_vkGetShaderInfoAMD)load(context, "vkGetShaderInfoAMD"); #endif /* defined(VK_AMD_shader_info) */ #if defined(VK_ANDROID_external_memory_android_hardware_buffer) table->vkGetAndroidHardwareBufferPropertiesANDROID = (PFN_vkGetAndroidHardwareBufferPropertiesANDROID)load(context, "vkGetAndroidHardwareBufferPropertiesANDROID"); table->vkGetMemoryAndroidHardwareBufferANDROID = (PFN_vkGetMemoryAndroidHardwareBufferANDROID)load(context, "vkGetMemoryAndroidHardwareBufferANDROID"); #endif /* defined(VK_ANDROID_external_memory_android_hardware_buffer) */ #if defined(VK_EXT_attachment_feedback_loop_dynamic_state) table->vkCmdSetAttachmentFeedbackLoopEnableEXT = (PFN_vkCmdSetAttachmentFeedbackLoopEnableEXT)load(context, "vkCmdSetAttachmentFeedbackLoopEnableEXT"); #endif /* defined(VK_EXT_attachment_feedback_loop_dynamic_state) */ #if defined(VK_EXT_buffer_device_address) table->vkGetBufferDeviceAddressEXT = (PFN_vkGetBufferDeviceAddressEXT)load(context, "vkGetBufferDeviceAddressEXT"); #endif /* defined(VK_EXT_buffer_device_address) */ #if defined(VK_EXT_calibrated_timestamps) table->vkGetCalibratedTimestampsEXT = (PFN_vkGetCalibratedTimestampsEXT)load(context, "vkGetCalibratedTimestampsEXT"); #endif /* defined(VK_EXT_calibrated_timestamps) */ #if defined(VK_EXT_color_write_enable) table->vkCmdSetColorWriteEnableEXT = (PFN_vkCmdSetColorWriteEnableEXT)load(context, "vkCmdSetColorWriteEnableEXT"); #endif /* defined(VK_EXT_color_write_enable) */ #if defined(VK_EXT_conditional_rendering) table->vkCmdBeginConditionalRenderingEXT = (PFN_vkCmdBeginConditionalRenderingEXT)load(context, "vkCmdBeginConditionalRenderingEXT"); table->vkCmdEndConditionalRenderingEXT = (PFN_vkCmdEndConditionalRenderingEXT)load(context, "vkCmdEndConditionalRenderingEXT"); #endif /* defined(VK_EXT_conditional_rendering) */ #if defined(VK_EXT_debug_marker) table->vkCmdDebugMarkerBeginEXT = (PFN_vkCmdDebugMarkerBeginEXT)load(context, "vkCmdDebugMarkerBeginEXT"); table->vkCmdDebugMarkerEndEXT = (PFN_vkCmdDebugMarkerEndEXT)load(context, "vkCmdDebugMarkerEndEXT"); table->vkCmdDebugMarkerInsertEXT = (PFN_vkCmdDebugMarkerInsertEXT)load(context, "vkCmdDebugMarkerInsertEXT"); table->vkDebugMarkerSetObjectNameEXT = (PFN_vkDebugMarkerSetObjectNameEXT)load(context, "vkDebugMarkerSetObjectNameEXT"); table->vkDebugMarkerSetObjectTagEXT = (PFN_vkDebugMarkerSetObjectTagEXT)load(context, "vkDebugMarkerSetObjectTagEXT"); #endif /* defined(VK_EXT_debug_marker) */ #if defined(VK_EXT_depth_bias_control) table->vkCmdSetDepthBias2EXT = (PFN_vkCmdSetDepthBias2EXT)load(context, "vkCmdSetDepthBias2EXT"); #endif /* defined(VK_EXT_depth_bias_control) */ #if defined(VK_EXT_descriptor_buffer) table->vkCmdBindDescriptorBufferEmbeddedSamplersEXT = (PFN_vkCmdBindDescriptorBufferEmbeddedSamplersEXT)load(context, "vkCmdBindDescriptorBufferEmbeddedSamplersEXT"); table->vkCmdBindDescriptorBuffersEXT = (PFN_vkCmdBindDescriptorBuffersEXT)load(context, "vkCmdBindDescriptorBuffersEXT"); table->vkCmdSetDescriptorBufferOffsetsEXT = (PFN_vkCmdSetDescriptorBufferOffsetsEXT)load(context, "vkCmdSetDescriptorBufferOffsetsEXT"); table->vkGetBufferOpaqueCaptureDescriptorDataEXT = (PFN_vkGetBufferOpaqueCaptureDescriptorDataEXT)load(context, "vkGetBufferOpaqueCaptureDescriptorDataEXT"); table->vkGetDescriptorEXT = (PFN_vkGetDescriptorEXT)load(context, "vkGetDescriptorEXT"); table->vkGetDescriptorSetLayoutBindingOffsetEXT = (PFN_vkGetDescriptorSetLayoutBindingOffsetEXT)load(context, "vkGetDescriptorSetLayoutBindingOffsetEXT"); table->vkGetDescriptorSetLayoutSizeEXT = (PFN_vkGetDescriptorSetLayoutSizeEXT)load(context, "vkGetDescriptorSetLayoutSizeEXT"); table->vkGetImageOpaqueCaptureDescriptorDataEXT = (PFN_vkGetImageOpaqueCaptureDescriptorDataEXT)load(context, "vkGetImageOpaqueCaptureDescriptorDataEXT"); table->vkGetImageViewOpaqueCaptureDescriptorDataEXT = (PFN_vkGetImageViewOpaqueCaptureDescriptorDataEXT)load(context, "vkGetImageViewOpaqueCaptureDescriptorDataEXT"); table->vkGetSamplerOpaqueCaptureDescriptorDataEXT = (PFN_vkGetSamplerOpaqueCaptureDescriptorDataEXT)load(context, "vkGetSamplerOpaqueCaptureDescriptorDataEXT"); #endif /* defined(VK_EXT_descriptor_buffer) */ #if defined(VK_EXT_descriptor_buffer) && (defined(VK_KHR_acceleration_structure) || defined(VK_NV_ray_tracing)) table->vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT = (PFN_vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT)load(context, "vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT"); #endif /* defined(VK_EXT_descriptor_buffer) && (defined(VK_KHR_acceleration_structure) || defined(VK_NV_ray_tracing)) */ #if defined(VK_EXT_device_fault) table->vkGetDeviceFaultInfoEXT = (PFN_vkGetDeviceFaultInfoEXT)load(context, "vkGetDeviceFaultInfoEXT"); #endif /* defined(VK_EXT_device_fault) */ #if defined(VK_EXT_device_generated_commands) table->vkCmdExecuteGeneratedCommandsEXT = (PFN_vkCmdExecuteGeneratedCommandsEXT)load(context, "vkCmdExecuteGeneratedCommandsEXT"); table->vkCmdPreprocessGeneratedCommandsEXT = (PFN_vkCmdPreprocessGeneratedCommandsEXT)load(context, "vkCmdPreprocessGeneratedCommandsEXT"); table->vkCreateIndirectCommandsLayoutEXT = (PFN_vkCreateIndirectCommandsLayoutEXT)load(context, "vkCreateIndirectCommandsLayoutEXT"); table->vkCreateIndirectExecutionSetEXT = (PFN_vkCreateIndirectExecutionSetEXT)load(context, "vkCreateIndirectExecutionSetEXT"); table->vkDestroyIndirectCommandsLayoutEXT = (PFN_vkDestroyIndirectCommandsLayoutEXT)load(context, "vkDestroyIndirectCommandsLayoutEXT"); table->vkDestroyIndirectExecutionSetEXT = (PFN_vkDestroyIndirectExecutionSetEXT)load(context, "vkDestroyIndirectExecutionSetEXT"); table->vkGetGeneratedCommandsMemoryRequirementsEXT = (PFN_vkGetGeneratedCommandsMemoryRequirementsEXT)load(context, "vkGetGeneratedCommandsMemoryRequirementsEXT"); table->vkUpdateIndirectExecutionSetPipelineEXT = (PFN_vkUpdateIndirectExecutionSetPipelineEXT)load(context, "vkUpdateIndirectExecutionSetPipelineEXT"); table->vkUpdateIndirectExecutionSetShaderEXT = (PFN_vkUpdateIndirectExecutionSetShaderEXT)load(context, "vkUpdateIndirectExecutionSetShaderEXT"); #endif /* defined(VK_EXT_device_generated_commands) */ #if defined(VK_EXT_discard_rectangles) table->vkCmdSetDiscardRectangleEXT = (PFN_vkCmdSetDiscardRectangleEXT)load(context, "vkCmdSetDiscardRectangleEXT"); #endif /* defined(VK_EXT_discard_rectangles) */ #if defined(VK_EXT_discard_rectangles) && VK_EXT_DISCARD_RECTANGLES_SPEC_VERSION >= 2 table->vkCmdSetDiscardRectangleEnableEXT = (PFN_vkCmdSetDiscardRectangleEnableEXT)load(context, "vkCmdSetDiscardRectangleEnableEXT"); table->vkCmdSetDiscardRectangleModeEXT = (PFN_vkCmdSetDiscardRectangleModeEXT)load(context, "vkCmdSetDiscardRectangleModeEXT"); #endif /* defined(VK_EXT_discard_rectangles) && VK_EXT_DISCARD_RECTANGLES_SPEC_VERSION >= 2 */ #if defined(VK_EXT_display_control) table->vkDisplayPowerControlEXT = (PFN_vkDisplayPowerControlEXT)load(context, "vkDisplayPowerControlEXT"); table->vkGetSwapchainCounterEXT = (PFN_vkGetSwapchainCounterEXT)load(context, "vkGetSwapchainCounterEXT"); table->vkRegisterDeviceEventEXT = (PFN_vkRegisterDeviceEventEXT)load(context, "vkRegisterDeviceEventEXT"); table->vkRegisterDisplayEventEXT = (PFN_vkRegisterDisplayEventEXT)load(context, "vkRegisterDisplayEventEXT"); #endif /* defined(VK_EXT_display_control) */ #if defined(VK_EXT_external_memory_host) table->vkGetMemoryHostPointerPropertiesEXT = (PFN_vkGetMemoryHostPointerPropertiesEXT)load(context, "vkGetMemoryHostPointerPropertiesEXT"); #endif /* defined(VK_EXT_external_memory_host) */ #if defined(VK_EXT_external_memory_metal) table->vkGetMemoryMetalHandleEXT = (PFN_vkGetMemoryMetalHandleEXT)load(context, "vkGetMemoryMetalHandleEXT"); table->vkGetMemoryMetalHandlePropertiesEXT = (PFN_vkGetMemoryMetalHandlePropertiesEXT)load(context, "vkGetMemoryMetalHandlePropertiesEXT"); #endif /* defined(VK_EXT_external_memory_metal) */ #if defined(VK_EXT_full_screen_exclusive) table->vkAcquireFullScreenExclusiveModeEXT = (PFN_vkAcquireFullScreenExclusiveModeEXT)load(context, "vkAcquireFullScreenExclusiveModeEXT"); table->vkReleaseFullScreenExclusiveModeEXT = (PFN_vkReleaseFullScreenExclusiveModeEXT)load(context, "vkReleaseFullScreenExclusiveModeEXT"); #endif /* defined(VK_EXT_full_screen_exclusive) */ #if defined(VK_EXT_full_screen_exclusive) && (defined(VK_KHR_device_group) || defined(VK_VERSION_1_1)) table->vkGetDeviceGroupSurfacePresentModes2EXT = (PFN_vkGetDeviceGroupSurfacePresentModes2EXT)load(context, "vkGetDeviceGroupSurfacePresentModes2EXT"); #endif /* defined(VK_EXT_full_screen_exclusive) && (defined(VK_KHR_device_group) || defined(VK_VERSION_1_1)) */ #if defined(VK_EXT_hdr_metadata) table->vkSetHdrMetadataEXT = (PFN_vkSetHdrMetadataEXT)load(context, "vkSetHdrMetadataEXT"); #endif /* defined(VK_EXT_hdr_metadata) */ #if defined(VK_EXT_host_image_copy) table->vkCopyImageToImageEXT = (PFN_vkCopyImageToImageEXT)load(context, "vkCopyImageToImageEXT"); table->vkCopyImageToMemoryEXT = (PFN_vkCopyImageToMemoryEXT)load(context, "vkCopyImageToMemoryEXT"); table->vkCopyMemoryToImageEXT = (PFN_vkCopyMemoryToImageEXT)load(context, "vkCopyMemoryToImageEXT"); table->vkTransitionImageLayoutEXT = (PFN_vkTransitionImageLayoutEXT)load(context, "vkTransitionImageLayoutEXT"); #endif /* defined(VK_EXT_host_image_copy) */ #if defined(VK_EXT_host_query_reset) table->vkResetQueryPoolEXT = (PFN_vkResetQueryPoolEXT)load(context, "vkResetQueryPoolEXT"); #endif /* defined(VK_EXT_host_query_reset) */ #if defined(VK_EXT_image_drm_format_modifier) table->vkGetImageDrmFormatModifierPropertiesEXT = (PFN_vkGetImageDrmFormatModifierPropertiesEXT)load(context, "vkGetImageDrmFormatModifierPropertiesEXT"); #endif /* defined(VK_EXT_image_drm_format_modifier) */ #if defined(VK_EXT_line_rasterization) table->vkCmdSetLineStippleEXT = (PFN_vkCmdSetLineStippleEXT)load(context, "vkCmdSetLineStippleEXT"); #endif /* defined(VK_EXT_line_rasterization) */ #if defined(VK_EXT_mesh_shader) table->vkCmdDrawMeshTasksEXT = (PFN_vkCmdDrawMeshTasksEXT)load(context, "vkCmdDrawMeshTasksEXT"); table->vkCmdDrawMeshTasksIndirectEXT = (PFN_vkCmdDrawMeshTasksIndirectEXT)load(context, "vkCmdDrawMeshTasksIndirectEXT"); #endif /* defined(VK_EXT_mesh_shader) */ #if defined(VK_EXT_mesh_shader) && (defined(VK_KHR_draw_indirect_count) || defined(VK_VERSION_1_2)) table->vkCmdDrawMeshTasksIndirectCountEXT = (PFN_vkCmdDrawMeshTasksIndirectCountEXT)load(context, "vkCmdDrawMeshTasksIndirectCountEXT"); #endif /* defined(VK_EXT_mesh_shader) && (defined(VK_KHR_draw_indirect_count) || defined(VK_VERSION_1_2)) */ #if defined(VK_EXT_metal_objects) table->vkExportMetalObjectsEXT = (PFN_vkExportMetalObjectsEXT)load(context, "vkExportMetalObjectsEXT"); #endif /* defined(VK_EXT_metal_objects) */ #if defined(VK_EXT_multi_draw) table->vkCmdDrawMultiEXT = (PFN_vkCmdDrawMultiEXT)load(context, "vkCmdDrawMultiEXT"); table->vkCmdDrawMultiIndexedEXT = (PFN_vkCmdDrawMultiIndexedEXT)load(context, "vkCmdDrawMultiIndexedEXT"); #endif /* defined(VK_EXT_multi_draw) */ #if defined(VK_EXT_opacity_micromap) table->vkBuildMicromapsEXT = (PFN_vkBuildMicromapsEXT)load(context, "vkBuildMicromapsEXT"); table->vkCmdBuildMicromapsEXT = (PFN_vkCmdBuildMicromapsEXT)load(context, "vkCmdBuildMicromapsEXT"); table->vkCmdCopyMemoryToMicromapEXT = (PFN_vkCmdCopyMemoryToMicromapEXT)load(context, "vkCmdCopyMemoryToMicromapEXT"); table->vkCmdCopyMicromapEXT = (PFN_vkCmdCopyMicromapEXT)load(context, "vkCmdCopyMicromapEXT"); table->vkCmdCopyMicromapToMemoryEXT = (PFN_vkCmdCopyMicromapToMemoryEXT)load(context, "vkCmdCopyMicromapToMemoryEXT"); table->vkCmdWriteMicromapsPropertiesEXT = (PFN_vkCmdWriteMicromapsPropertiesEXT)load(context, "vkCmdWriteMicromapsPropertiesEXT"); table->vkCopyMemoryToMicromapEXT = (PFN_vkCopyMemoryToMicromapEXT)load(context, "vkCopyMemoryToMicromapEXT"); table->vkCopyMicromapEXT = (PFN_vkCopyMicromapEXT)load(context, "vkCopyMicromapEXT"); table->vkCopyMicromapToMemoryEXT = (PFN_vkCopyMicromapToMemoryEXT)load(context, "vkCopyMicromapToMemoryEXT"); table->vkCreateMicromapEXT = (PFN_vkCreateMicromapEXT)load(context, "vkCreateMicromapEXT"); table->vkDestroyMicromapEXT = (PFN_vkDestroyMicromapEXT)load(context, "vkDestroyMicromapEXT"); table->vkGetDeviceMicromapCompatibilityEXT = (PFN_vkGetDeviceMicromapCompatibilityEXT)load(context, "vkGetDeviceMicromapCompatibilityEXT"); table->vkGetMicromapBuildSizesEXT = (PFN_vkGetMicromapBuildSizesEXT)load(context, "vkGetMicromapBuildSizesEXT"); table->vkWriteMicromapsPropertiesEXT = (PFN_vkWriteMicromapsPropertiesEXT)load(context, "vkWriteMicromapsPropertiesEXT"); #endif /* defined(VK_EXT_opacity_micromap) */ #if defined(VK_EXT_pageable_device_local_memory) table->vkSetDeviceMemoryPriorityEXT = (PFN_vkSetDeviceMemoryPriorityEXT)load(context, "vkSetDeviceMemoryPriorityEXT"); #endif /* defined(VK_EXT_pageable_device_local_memory) */ #if defined(VK_EXT_pipeline_properties) table->vkGetPipelinePropertiesEXT = (PFN_vkGetPipelinePropertiesEXT)load(context, "vkGetPipelinePropertiesEXT"); #endif /* defined(VK_EXT_pipeline_properties) */ #if defined(VK_EXT_private_data) table->vkCreatePrivateDataSlotEXT = (PFN_vkCreatePrivateDataSlotEXT)load(context, "vkCreatePrivateDataSlotEXT"); table->vkDestroyPrivateDataSlotEXT = (PFN_vkDestroyPrivateDataSlotEXT)load(context, "vkDestroyPrivateDataSlotEXT"); table->vkGetPrivateDataEXT = (PFN_vkGetPrivateDataEXT)load(context, "vkGetPrivateDataEXT"); table->vkSetPrivateDataEXT = (PFN_vkSetPrivateDataEXT)load(context, "vkSetPrivateDataEXT"); #endif /* defined(VK_EXT_private_data) */ #if defined(VK_EXT_sample_locations) table->vkCmdSetSampleLocationsEXT = (PFN_vkCmdSetSampleLocationsEXT)load(context, "vkCmdSetSampleLocationsEXT"); #endif /* defined(VK_EXT_sample_locations) */ #if defined(VK_EXT_shader_module_identifier) table->vkGetShaderModuleCreateInfoIdentifierEXT = (PFN_vkGetShaderModuleCreateInfoIdentifierEXT)load(context, "vkGetShaderModuleCreateInfoIdentifierEXT"); table->vkGetShaderModuleIdentifierEXT = (PFN_vkGetShaderModuleIdentifierEXT)load(context, "vkGetShaderModuleIdentifierEXT"); #endif /* defined(VK_EXT_shader_module_identifier) */ #if defined(VK_EXT_shader_object) table->vkCmdBindShadersEXT = (PFN_vkCmdBindShadersEXT)load(context, "vkCmdBindShadersEXT"); table->vkCreateShadersEXT = (PFN_vkCreateShadersEXT)load(context, "vkCreateShadersEXT"); table->vkDestroyShaderEXT = (PFN_vkDestroyShaderEXT)load(context, "vkDestroyShaderEXT"); table->vkGetShaderBinaryDataEXT = (PFN_vkGetShaderBinaryDataEXT)load(context, "vkGetShaderBinaryDataEXT"); #endif /* defined(VK_EXT_shader_object) */ #if defined(VK_EXT_swapchain_maintenance1) table->vkReleaseSwapchainImagesEXT = (PFN_vkReleaseSwapchainImagesEXT)load(context, "vkReleaseSwapchainImagesEXT"); #endif /* defined(VK_EXT_swapchain_maintenance1) */ #if defined(VK_EXT_transform_feedback) table->vkCmdBeginQueryIndexedEXT = (PFN_vkCmdBeginQueryIndexedEXT)load(context, "vkCmdBeginQueryIndexedEXT"); table->vkCmdBeginTransformFeedbackEXT = (PFN_vkCmdBeginTransformFeedbackEXT)load(context, "vkCmdBeginTransformFeedbackEXT"); table->vkCmdBindTransformFeedbackBuffersEXT = (PFN_vkCmdBindTransformFeedbackBuffersEXT)load(context, "vkCmdBindTransformFeedbackBuffersEXT"); table->vkCmdDrawIndirectByteCountEXT = (PFN_vkCmdDrawIndirectByteCountEXT)load(context, "vkCmdDrawIndirectByteCountEXT"); table->vkCmdEndQueryIndexedEXT = (PFN_vkCmdEndQueryIndexedEXT)load(context, "vkCmdEndQueryIndexedEXT"); table->vkCmdEndTransformFeedbackEXT = (PFN_vkCmdEndTransformFeedbackEXT)load(context, "vkCmdEndTransformFeedbackEXT"); #endif /* defined(VK_EXT_transform_feedback) */ #if defined(VK_EXT_validation_cache) table->vkCreateValidationCacheEXT = (PFN_vkCreateValidationCacheEXT)load(context, "vkCreateValidationCacheEXT"); table->vkDestroyValidationCacheEXT = (PFN_vkDestroyValidationCacheEXT)load(context, "vkDestroyValidationCacheEXT"); table->vkGetValidationCacheDataEXT = (PFN_vkGetValidationCacheDataEXT)load(context, "vkGetValidationCacheDataEXT"); table->vkMergeValidationCachesEXT = (PFN_vkMergeValidationCachesEXT)load(context, "vkMergeValidationCachesEXT"); #endif /* defined(VK_EXT_validation_cache) */ #if defined(VK_FUCHSIA_buffer_collection) table->vkCreateBufferCollectionFUCHSIA = (PFN_vkCreateBufferCollectionFUCHSIA)load(context, "vkCreateBufferCollectionFUCHSIA"); table->vkDestroyBufferCollectionFUCHSIA = (PFN_vkDestroyBufferCollectionFUCHSIA)load(context, "vkDestroyBufferCollectionFUCHSIA"); table->vkGetBufferCollectionPropertiesFUCHSIA = (PFN_vkGetBufferCollectionPropertiesFUCHSIA)load(context, "vkGetBufferCollectionPropertiesFUCHSIA"); table->vkSetBufferCollectionBufferConstraintsFUCHSIA = (PFN_vkSetBufferCollectionBufferConstraintsFUCHSIA)load(context, "vkSetBufferCollectionBufferConstraintsFUCHSIA"); table->vkSetBufferCollectionImageConstraintsFUCHSIA = (PFN_vkSetBufferCollectionImageConstraintsFUCHSIA)load(context, "vkSetBufferCollectionImageConstraintsFUCHSIA"); #endif /* defined(VK_FUCHSIA_buffer_collection) */ #if defined(VK_FUCHSIA_external_memory) table->vkGetMemoryZirconHandleFUCHSIA = (PFN_vkGetMemoryZirconHandleFUCHSIA)load(context, "vkGetMemoryZirconHandleFUCHSIA"); table->vkGetMemoryZirconHandlePropertiesFUCHSIA = (PFN_vkGetMemoryZirconHandlePropertiesFUCHSIA)load(context, "vkGetMemoryZirconHandlePropertiesFUCHSIA"); #endif /* defined(VK_FUCHSIA_external_memory) */ #if defined(VK_FUCHSIA_external_semaphore) table->vkGetSemaphoreZirconHandleFUCHSIA = (PFN_vkGetSemaphoreZirconHandleFUCHSIA)load(context, "vkGetSemaphoreZirconHandleFUCHSIA"); table->vkImportSemaphoreZirconHandleFUCHSIA = (PFN_vkImportSemaphoreZirconHandleFUCHSIA)load(context, "vkImportSemaphoreZirconHandleFUCHSIA"); #endif /* defined(VK_FUCHSIA_external_semaphore) */ #if defined(VK_GOOGLE_display_timing) table->vkGetPastPresentationTimingGOOGLE = (PFN_vkGetPastPresentationTimingGOOGLE)load(context, "vkGetPastPresentationTimingGOOGLE"); table->vkGetRefreshCycleDurationGOOGLE = (PFN_vkGetRefreshCycleDurationGOOGLE)load(context, "vkGetRefreshCycleDurationGOOGLE"); #endif /* defined(VK_GOOGLE_display_timing) */ #if defined(VK_HUAWEI_cluster_culling_shader) table->vkCmdDrawClusterHUAWEI = (PFN_vkCmdDrawClusterHUAWEI)load(context, "vkCmdDrawClusterHUAWEI"); table->vkCmdDrawClusterIndirectHUAWEI = (PFN_vkCmdDrawClusterIndirectHUAWEI)load(context, "vkCmdDrawClusterIndirectHUAWEI"); #endif /* defined(VK_HUAWEI_cluster_culling_shader) */ #if defined(VK_HUAWEI_invocation_mask) table->vkCmdBindInvocationMaskHUAWEI = (PFN_vkCmdBindInvocationMaskHUAWEI)load(context, "vkCmdBindInvocationMaskHUAWEI"); #endif /* defined(VK_HUAWEI_invocation_mask) */ #if defined(VK_HUAWEI_subpass_shading) && VK_HUAWEI_SUBPASS_SHADING_SPEC_VERSION >= 2 table->vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI = (PFN_vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI)load(context, "vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI"); #endif /* defined(VK_HUAWEI_subpass_shading) && VK_HUAWEI_SUBPASS_SHADING_SPEC_VERSION >= 2 */ #if defined(VK_HUAWEI_subpass_shading) table->vkCmdSubpassShadingHUAWEI = (PFN_vkCmdSubpassShadingHUAWEI)load(context, "vkCmdSubpassShadingHUAWEI"); #endif /* defined(VK_HUAWEI_subpass_shading) */ #if defined(VK_INTEL_performance_query) table->vkAcquirePerformanceConfigurationINTEL = (PFN_vkAcquirePerformanceConfigurationINTEL)load(context, "vkAcquirePerformanceConfigurationINTEL"); table->vkCmdSetPerformanceMarkerINTEL = (PFN_vkCmdSetPerformanceMarkerINTEL)load(context, "vkCmdSetPerformanceMarkerINTEL"); table->vkCmdSetPerformanceOverrideINTEL = (PFN_vkCmdSetPerformanceOverrideINTEL)load(context, "vkCmdSetPerformanceOverrideINTEL"); table->vkCmdSetPerformanceStreamMarkerINTEL = (PFN_vkCmdSetPerformanceStreamMarkerINTEL)load(context, "vkCmdSetPerformanceStreamMarkerINTEL"); table->vkGetPerformanceParameterINTEL = (PFN_vkGetPerformanceParameterINTEL)load(context, "vkGetPerformanceParameterINTEL"); table->vkInitializePerformanceApiINTEL = (PFN_vkInitializePerformanceApiINTEL)load(context, "vkInitializePerformanceApiINTEL"); table->vkQueueSetPerformanceConfigurationINTEL = (PFN_vkQueueSetPerformanceConfigurationINTEL)load(context, "vkQueueSetPerformanceConfigurationINTEL"); table->vkReleasePerformanceConfigurationINTEL = (PFN_vkReleasePerformanceConfigurationINTEL)load(context, "vkReleasePerformanceConfigurationINTEL"); table->vkUninitializePerformanceApiINTEL = (PFN_vkUninitializePerformanceApiINTEL)load(context, "vkUninitializePerformanceApiINTEL"); #endif /* defined(VK_INTEL_performance_query) */ #if defined(VK_KHR_acceleration_structure) table->vkBuildAccelerationStructuresKHR = (PFN_vkBuildAccelerationStructuresKHR)load(context, "vkBuildAccelerationStructuresKHR"); table->vkCmdBuildAccelerationStructuresIndirectKHR = (PFN_vkCmdBuildAccelerationStructuresIndirectKHR)load(context, "vkCmdBuildAccelerationStructuresIndirectKHR"); table->vkCmdBuildAccelerationStructuresKHR = (PFN_vkCmdBuildAccelerationStructuresKHR)load(context, "vkCmdBuildAccelerationStructuresKHR"); table->vkCmdCopyAccelerationStructureKHR = (PFN_vkCmdCopyAccelerationStructureKHR)load(context, "vkCmdCopyAccelerationStructureKHR"); table->vkCmdCopyAccelerationStructureToMemoryKHR = (PFN_vkCmdCopyAccelerationStructureToMemoryKHR)load(context, "vkCmdCopyAccelerationStructureToMemoryKHR"); table->vkCmdCopyMemoryToAccelerationStructureKHR = (PFN_vkCmdCopyMemoryToAccelerationStructureKHR)load(context, "vkCmdCopyMemoryToAccelerationStructureKHR"); table->vkCmdWriteAccelerationStructuresPropertiesKHR = (PFN_vkCmdWriteAccelerationStructuresPropertiesKHR)load(context, "vkCmdWriteAccelerationStructuresPropertiesKHR"); table->vkCopyAccelerationStructureKHR = (PFN_vkCopyAccelerationStructureKHR)load(context, "vkCopyAccelerationStructureKHR"); table->vkCopyAccelerationStructureToMemoryKHR = (PFN_vkCopyAccelerationStructureToMemoryKHR)load(context, "vkCopyAccelerationStructureToMemoryKHR"); table->vkCopyMemoryToAccelerationStructureKHR = (PFN_vkCopyMemoryToAccelerationStructureKHR)load(context, "vkCopyMemoryToAccelerationStructureKHR"); table->vkCreateAccelerationStructureKHR = (PFN_vkCreateAccelerationStructureKHR)load(context, "vkCreateAccelerationStructureKHR"); table->vkDestroyAccelerationStructureKHR = (PFN_vkDestroyAccelerationStructureKHR)load(context, "vkDestroyAccelerationStructureKHR"); table->vkGetAccelerationStructureBuildSizesKHR = (PFN_vkGetAccelerationStructureBuildSizesKHR)load(context, "vkGetAccelerationStructureBuildSizesKHR"); table->vkGetAccelerationStructureDeviceAddressKHR = (PFN_vkGetAccelerationStructureDeviceAddressKHR)load(context, "vkGetAccelerationStructureDeviceAddressKHR"); table->vkGetDeviceAccelerationStructureCompatibilityKHR = (PFN_vkGetDeviceAccelerationStructureCompatibilityKHR)load(context, "vkGetDeviceAccelerationStructureCompatibilityKHR"); table->vkWriteAccelerationStructuresPropertiesKHR = (PFN_vkWriteAccelerationStructuresPropertiesKHR)load(context, "vkWriteAccelerationStructuresPropertiesKHR"); #endif /* defined(VK_KHR_acceleration_structure) */ #if defined(VK_KHR_bind_memory2) table->vkBindBufferMemory2KHR = (PFN_vkBindBufferMemory2KHR)load(context, "vkBindBufferMemory2KHR"); table->vkBindImageMemory2KHR = (PFN_vkBindImageMemory2KHR)load(context, "vkBindImageMemory2KHR"); #endif /* defined(VK_KHR_bind_memory2) */ #if defined(VK_KHR_buffer_device_address) table->vkGetBufferDeviceAddressKHR = (PFN_vkGetBufferDeviceAddressKHR)load(context, "vkGetBufferDeviceAddressKHR"); table->vkGetBufferOpaqueCaptureAddressKHR = (PFN_vkGetBufferOpaqueCaptureAddressKHR)load(context, "vkGetBufferOpaqueCaptureAddressKHR"); table->vkGetDeviceMemoryOpaqueCaptureAddressKHR = (PFN_vkGetDeviceMemoryOpaqueCaptureAddressKHR)load(context, "vkGetDeviceMemoryOpaqueCaptureAddressKHR"); #endif /* defined(VK_KHR_buffer_device_address) */ #if defined(VK_KHR_calibrated_timestamps) table->vkGetCalibratedTimestampsKHR = (PFN_vkGetCalibratedTimestampsKHR)load(context, "vkGetCalibratedTimestampsKHR"); #endif /* defined(VK_KHR_calibrated_timestamps) */ #if defined(VK_KHR_copy_commands2) table->vkCmdBlitImage2KHR = (PFN_vkCmdBlitImage2KHR)load(context, "vkCmdBlitImage2KHR"); table->vkCmdCopyBuffer2KHR = (PFN_vkCmdCopyBuffer2KHR)load(context, "vkCmdCopyBuffer2KHR"); table->vkCmdCopyBufferToImage2KHR = (PFN_vkCmdCopyBufferToImage2KHR)load(context, "vkCmdCopyBufferToImage2KHR"); table->vkCmdCopyImage2KHR = (PFN_vkCmdCopyImage2KHR)load(context, "vkCmdCopyImage2KHR"); table->vkCmdCopyImageToBuffer2KHR = (PFN_vkCmdCopyImageToBuffer2KHR)load(context, "vkCmdCopyImageToBuffer2KHR"); table->vkCmdResolveImage2KHR = (PFN_vkCmdResolveImage2KHR)load(context, "vkCmdResolveImage2KHR"); #endif /* defined(VK_KHR_copy_commands2) */ #if defined(VK_KHR_create_renderpass2) table->vkCmdBeginRenderPass2KHR = (PFN_vkCmdBeginRenderPass2KHR)load(context, "vkCmdBeginRenderPass2KHR"); table->vkCmdEndRenderPass2KHR = (PFN_vkCmdEndRenderPass2KHR)load(context, "vkCmdEndRenderPass2KHR"); table->vkCmdNextSubpass2KHR = (PFN_vkCmdNextSubpass2KHR)load(context, "vkCmdNextSubpass2KHR"); table->vkCreateRenderPass2KHR = (PFN_vkCreateRenderPass2KHR)load(context, "vkCreateRenderPass2KHR"); #endif /* defined(VK_KHR_create_renderpass2) */ #if defined(VK_KHR_deferred_host_operations) table->vkCreateDeferredOperationKHR = (PFN_vkCreateDeferredOperationKHR)load(context, "vkCreateDeferredOperationKHR"); table->vkDeferredOperationJoinKHR = (PFN_vkDeferredOperationJoinKHR)load(context, "vkDeferredOperationJoinKHR"); table->vkDestroyDeferredOperationKHR = (PFN_vkDestroyDeferredOperationKHR)load(context, "vkDestroyDeferredOperationKHR"); table->vkGetDeferredOperationMaxConcurrencyKHR = (PFN_vkGetDeferredOperationMaxConcurrencyKHR)load(context, "vkGetDeferredOperationMaxConcurrencyKHR"); table->vkGetDeferredOperationResultKHR = (PFN_vkGetDeferredOperationResultKHR)load(context, "vkGetDeferredOperationResultKHR"); #endif /* defined(VK_KHR_deferred_host_operations) */ #if defined(VK_KHR_descriptor_update_template) table->vkCreateDescriptorUpdateTemplateKHR = (PFN_vkCreateDescriptorUpdateTemplateKHR)load(context, "vkCreateDescriptorUpdateTemplateKHR"); table->vkDestroyDescriptorUpdateTemplateKHR = (PFN_vkDestroyDescriptorUpdateTemplateKHR)load(context, "vkDestroyDescriptorUpdateTemplateKHR"); table->vkUpdateDescriptorSetWithTemplateKHR = (PFN_vkUpdateDescriptorSetWithTemplateKHR)load(context, "vkUpdateDescriptorSetWithTemplateKHR"); #endif /* defined(VK_KHR_descriptor_update_template) */ #if defined(VK_KHR_device_group) table->vkCmdDispatchBaseKHR = (PFN_vkCmdDispatchBaseKHR)load(context, "vkCmdDispatchBaseKHR"); table->vkCmdSetDeviceMaskKHR = (PFN_vkCmdSetDeviceMaskKHR)load(context, "vkCmdSetDeviceMaskKHR"); table->vkGetDeviceGroupPeerMemoryFeaturesKHR = (PFN_vkGetDeviceGroupPeerMemoryFeaturesKHR)load(context, "vkGetDeviceGroupPeerMemoryFeaturesKHR"); #endif /* defined(VK_KHR_device_group) */ #if defined(VK_KHR_display_swapchain) table->vkCreateSharedSwapchainsKHR = (PFN_vkCreateSharedSwapchainsKHR)load(context, "vkCreateSharedSwapchainsKHR"); #endif /* defined(VK_KHR_display_swapchain) */ #if defined(VK_KHR_draw_indirect_count) table->vkCmdDrawIndexedIndirectCountKHR = (PFN_vkCmdDrawIndexedIndirectCountKHR)load(context, "vkCmdDrawIndexedIndirectCountKHR"); table->vkCmdDrawIndirectCountKHR = (PFN_vkCmdDrawIndirectCountKHR)load(context, "vkCmdDrawIndirectCountKHR"); #endif /* defined(VK_KHR_draw_indirect_count) */ #if defined(VK_KHR_dynamic_rendering) table->vkCmdBeginRenderingKHR = (PFN_vkCmdBeginRenderingKHR)load(context, "vkCmdBeginRenderingKHR"); table->vkCmdEndRenderingKHR = (PFN_vkCmdEndRenderingKHR)load(context, "vkCmdEndRenderingKHR"); #endif /* defined(VK_KHR_dynamic_rendering) */ #if defined(VK_KHR_dynamic_rendering_local_read) table->vkCmdSetRenderingAttachmentLocationsKHR = (PFN_vkCmdSetRenderingAttachmentLocationsKHR)load(context, "vkCmdSetRenderingAttachmentLocationsKHR"); table->vkCmdSetRenderingInputAttachmentIndicesKHR = (PFN_vkCmdSetRenderingInputAttachmentIndicesKHR)load(context, "vkCmdSetRenderingInputAttachmentIndicesKHR"); #endif /* defined(VK_KHR_dynamic_rendering_local_read) */ #if defined(VK_KHR_external_fence_fd) table->vkGetFenceFdKHR = (PFN_vkGetFenceFdKHR)load(context, "vkGetFenceFdKHR"); table->vkImportFenceFdKHR = (PFN_vkImportFenceFdKHR)load(context, "vkImportFenceFdKHR"); #endif /* defined(VK_KHR_external_fence_fd) */ #if defined(VK_KHR_external_fence_win32) table->vkGetFenceWin32HandleKHR = (PFN_vkGetFenceWin32HandleKHR)load(context, "vkGetFenceWin32HandleKHR"); table->vkImportFenceWin32HandleKHR = (PFN_vkImportFenceWin32HandleKHR)load(context, "vkImportFenceWin32HandleKHR"); #endif /* defined(VK_KHR_external_fence_win32) */ #if defined(VK_KHR_external_memory_fd) table->vkGetMemoryFdKHR = (PFN_vkGetMemoryFdKHR)load(context, "vkGetMemoryFdKHR"); table->vkGetMemoryFdPropertiesKHR = (PFN_vkGetMemoryFdPropertiesKHR)load(context, "vkGetMemoryFdPropertiesKHR"); #endif /* defined(VK_KHR_external_memory_fd) */ #if defined(VK_KHR_external_memory_win32) table->vkGetMemoryWin32HandleKHR = (PFN_vkGetMemoryWin32HandleKHR)load(context, "vkGetMemoryWin32HandleKHR"); table->vkGetMemoryWin32HandlePropertiesKHR = (PFN_vkGetMemoryWin32HandlePropertiesKHR)load(context, "vkGetMemoryWin32HandlePropertiesKHR"); #endif /* defined(VK_KHR_external_memory_win32) */ #if defined(VK_KHR_external_semaphore_fd) table->vkGetSemaphoreFdKHR = (PFN_vkGetSemaphoreFdKHR)load(context, "vkGetSemaphoreFdKHR"); table->vkImportSemaphoreFdKHR = (PFN_vkImportSemaphoreFdKHR)load(context, "vkImportSemaphoreFdKHR"); #endif /* defined(VK_KHR_external_semaphore_fd) */ #if defined(VK_KHR_external_semaphore_win32) table->vkGetSemaphoreWin32HandleKHR = (PFN_vkGetSemaphoreWin32HandleKHR)load(context, "vkGetSemaphoreWin32HandleKHR"); table->vkImportSemaphoreWin32HandleKHR = (PFN_vkImportSemaphoreWin32HandleKHR)load(context, "vkImportSemaphoreWin32HandleKHR"); #endif /* defined(VK_KHR_external_semaphore_win32) */ #if defined(VK_KHR_fragment_shading_rate) table->vkCmdSetFragmentShadingRateKHR = (PFN_vkCmdSetFragmentShadingRateKHR)load(context, "vkCmdSetFragmentShadingRateKHR"); #endif /* defined(VK_KHR_fragment_shading_rate) */ #if defined(VK_KHR_get_memory_requirements2) table->vkGetBufferMemoryRequirements2KHR = (PFN_vkGetBufferMemoryRequirements2KHR)load(context, "vkGetBufferMemoryRequirements2KHR"); table->vkGetImageMemoryRequirements2KHR = (PFN_vkGetImageMemoryRequirements2KHR)load(context, "vkGetImageMemoryRequirements2KHR"); table->vkGetImageSparseMemoryRequirements2KHR = (PFN_vkGetImageSparseMemoryRequirements2KHR)load(context, "vkGetImageSparseMemoryRequirements2KHR"); #endif /* defined(VK_KHR_get_memory_requirements2) */ #if defined(VK_KHR_line_rasterization) table->vkCmdSetLineStippleKHR = (PFN_vkCmdSetLineStippleKHR)load(context, "vkCmdSetLineStippleKHR"); #endif /* defined(VK_KHR_line_rasterization) */ #if defined(VK_KHR_maintenance1) table->vkTrimCommandPoolKHR = (PFN_vkTrimCommandPoolKHR)load(context, "vkTrimCommandPoolKHR"); #endif /* defined(VK_KHR_maintenance1) */ #if defined(VK_KHR_maintenance3) table->vkGetDescriptorSetLayoutSupportKHR = (PFN_vkGetDescriptorSetLayoutSupportKHR)load(context, "vkGetDescriptorSetLayoutSupportKHR"); #endif /* defined(VK_KHR_maintenance3) */ #if defined(VK_KHR_maintenance4) table->vkGetDeviceBufferMemoryRequirementsKHR = (PFN_vkGetDeviceBufferMemoryRequirementsKHR)load(context, "vkGetDeviceBufferMemoryRequirementsKHR"); table->vkGetDeviceImageMemoryRequirementsKHR = (PFN_vkGetDeviceImageMemoryRequirementsKHR)load(context, "vkGetDeviceImageMemoryRequirementsKHR"); table->vkGetDeviceImageSparseMemoryRequirementsKHR = (PFN_vkGetDeviceImageSparseMemoryRequirementsKHR)load(context, "vkGetDeviceImageSparseMemoryRequirementsKHR"); #endif /* defined(VK_KHR_maintenance4) */ #if defined(VK_KHR_maintenance5) table->vkCmdBindIndexBuffer2KHR = (PFN_vkCmdBindIndexBuffer2KHR)load(context, "vkCmdBindIndexBuffer2KHR"); table->vkGetDeviceImageSubresourceLayoutKHR = (PFN_vkGetDeviceImageSubresourceLayoutKHR)load(context, "vkGetDeviceImageSubresourceLayoutKHR"); table->vkGetImageSubresourceLayout2KHR = (PFN_vkGetImageSubresourceLayout2KHR)load(context, "vkGetImageSubresourceLayout2KHR"); table->vkGetRenderingAreaGranularityKHR = (PFN_vkGetRenderingAreaGranularityKHR)load(context, "vkGetRenderingAreaGranularityKHR"); #endif /* defined(VK_KHR_maintenance5) */ #if defined(VK_KHR_maintenance6) table->vkCmdBindDescriptorSets2KHR = (PFN_vkCmdBindDescriptorSets2KHR)load(context, "vkCmdBindDescriptorSets2KHR"); table->vkCmdPushConstants2KHR = (PFN_vkCmdPushConstants2KHR)load(context, "vkCmdPushConstants2KHR"); #endif /* defined(VK_KHR_maintenance6) */ #if defined(VK_KHR_maintenance6) && defined(VK_KHR_push_descriptor) table->vkCmdPushDescriptorSet2KHR = (PFN_vkCmdPushDescriptorSet2KHR)load(context, "vkCmdPushDescriptorSet2KHR"); table->vkCmdPushDescriptorSetWithTemplate2KHR = (PFN_vkCmdPushDescriptorSetWithTemplate2KHR)load(context, "vkCmdPushDescriptorSetWithTemplate2KHR"); #endif /* defined(VK_KHR_maintenance6) && defined(VK_KHR_push_descriptor) */ #if defined(VK_KHR_maintenance6) && defined(VK_EXT_descriptor_buffer) table->vkCmdBindDescriptorBufferEmbeddedSamplers2EXT = (PFN_vkCmdBindDescriptorBufferEmbeddedSamplers2EXT)load(context, "vkCmdBindDescriptorBufferEmbeddedSamplers2EXT"); table->vkCmdSetDescriptorBufferOffsets2EXT = (PFN_vkCmdSetDescriptorBufferOffsets2EXT)load(context, "vkCmdSetDescriptorBufferOffsets2EXT"); #endif /* defined(VK_KHR_maintenance6) && defined(VK_EXT_descriptor_buffer) */ #if defined(VK_KHR_map_memory2) table->vkMapMemory2KHR = (PFN_vkMapMemory2KHR)load(context, "vkMapMemory2KHR"); table->vkUnmapMemory2KHR = (PFN_vkUnmapMemory2KHR)load(context, "vkUnmapMemory2KHR"); #endif /* defined(VK_KHR_map_memory2) */ #if defined(VK_KHR_performance_query) table->vkAcquireProfilingLockKHR = (PFN_vkAcquireProfilingLockKHR)load(context, "vkAcquireProfilingLockKHR"); table->vkReleaseProfilingLockKHR = (PFN_vkReleaseProfilingLockKHR)load(context, "vkReleaseProfilingLockKHR"); #endif /* defined(VK_KHR_performance_query) */ #if defined(VK_KHR_pipeline_binary) table->vkCreatePipelineBinariesKHR = (PFN_vkCreatePipelineBinariesKHR)load(context, "vkCreatePipelineBinariesKHR"); table->vkDestroyPipelineBinaryKHR = (PFN_vkDestroyPipelineBinaryKHR)load(context, "vkDestroyPipelineBinaryKHR"); table->vkGetPipelineBinaryDataKHR = (PFN_vkGetPipelineBinaryDataKHR)load(context, "vkGetPipelineBinaryDataKHR"); table->vkGetPipelineKeyKHR = (PFN_vkGetPipelineKeyKHR)load(context, "vkGetPipelineKeyKHR"); table->vkReleaseCapturedPipelineDataKHR = (PFN_vkReleaseCapturedPipelineDataKHR)load(context, "vkReleaseCapturedPipelineDataKHR"); #endif /* defined(VK_KHR_pipeline_binary) */ #if defined(VK_KHR_pipeline_executable_properties) table->vkGetPipelineExecutableInternalRepresentationsKHR = (PFN_vkGetPipelineExecutableInternalRepresentationsKHR)load(context, "vkGetPipelineExecutableInternalRepresentationsKHR"); table->vkGetPipelineExecutablePropertiesKHR = (PFN_vkGetPipelineExecutablePropertiesKHR)load(context, "vkGetPipelineExecutablePropertiesKHR"); table->vkGetPipelineExecutableStatisticsKHR = (PFN_vkGetPipelineExecutableStatisticsKHR)load(context, "vkGetPipelineExecutableStatisticsKHR"); #endif /* defined(VK_KHR_pipeline_executable_properties) */ #if defined(VK_KHR_present_wait) table->vkWaitForPresentKHR = (PFN_vkWaitForPresentKHR)load(context, "vkWaitForPresentKHR"); #endif /* defined(VK_KHR_present_wait) */ #if defined(VK_KHR_push_descriptor) table->vkCmdPushDescriptorSetKHR = (PFN_vkCmdPushDescriptorSetKHR)load(context, "vkCmdPushDescriptorSetKHR"); #endif /* defined(VK_KHR_push_descriptor) */ #if defined(VK_KHR_ray_tracing_maintenance1) && defined(VK_KHR_ray_tracing_pipeline) table->vkCmdTraceRaysIndirect2KHR = (PFN_vkCmdTraceRaysIndirect2KHR)load(context, "vkCmdTraceRaysIndirect2KHR"); #endif /* defined(VK_KHR_ray_tracing_maintenance1) && defined(VK_KHR_ray_tracing_pipeline) */ #if defined(VK_KHR_ray_tracing_pipeline) table->vkCmdSetRayTracingPipelineStackSizeKHR = (PFN_vkCmdSetRayTracingPipelineStackSizeKHR)load(context, "vkCmdSetRayTracingPipelineStackSizeKHR"); table->vkCmdTraceRaysIndirectKHR = (PFN_vkCmdTraceRaysIndirectKHR)load(context, "vkCmdTraceRaysIndirectKHR"); table->vkCmdTraceRaysKHR = (PFN_vkCmdTraceRaysKHR)load(context, "vkCmdTraceRaysKHR"); table->vkCreateRayTracingPipelinesKHR = (PFN_vkCreateRayTracingPipelinesKHR)load(context, "vkCreateRayTracingPipelinesKHR"); table->vkGetRayTracingCaptureReplayShaderGroupHandlesKHR = (PFN_vkGetRayTracingCaptureReplayShaderGroupHandlesKHR)load(context, "vkGetRayTracingCaptureReplayShaderGroupHandlesKHR"); table->vkGetRayTracingShaderGroupHandlesKHR = (PFN_vkGetRayTracingShaderGroupHandlesKHR)load(context, "vkGetRayTracingShaderGroupHandlesKHR"); table->vkGetRayTracingShaderGroupStackSizeKHR = (PFN_vkGetRayTracingShaderGroupStackSizeKHR)load(context, "vkGetRayTracingShaderGroupStackSizeKHR"); #endif /* defined(VK_KHR_ray_tracing_pipeline) */ #if defined(VK_KHR_sampler_ycbcr_conversion) table->vkCreateSamplerYcbcrConversionKHR = (PFN_vkCreateSamplerYcbcrConversionKHR)load(context, "vkCreateSamplerYcbcrConversionKHR"); table->vkDestroySamplerYcbcrConversionKHR = (PFN_vkDestroySamplerYcbcrConversionKHR)load(context, "vkDestroySamplerYcbcrConversionKHR"); #endif /* defined(VK_KHR_sampler_ycbcr_conversion) */ #if defined(VK_KHR_shared_presentable_image) table->vkGetSwapchainStatusKHR = (PFN_vkGetSwapchainStatusKHR)load(context, "vkGetSwapchainStatusKHR"); #endif /* defined(VK_KHR_shared_presentable_image) */ #if defined(VK_KHR_swapchain) table->vkAcquireNextImageKHR = (PFN_vkAcquireNextImageKHR)load(context, "vkAcquireNextImageKHR"); table->vkCreateSwapchainKHR = (PFN_vkCreateSwapchainKHR)load(context, "vkCreateSwapchainKHR"); table->vkDestroySwapchainKHR = (PFN_vkDestroySwapchainKHR)load(context, "vkDestroySwapchainKHR"); table->vkGetSwapchainImagesKHR = (PFN_vkGetSwapchainImagesKHR)load(context, "vkGetSwapchainImagesKHR"); table->vkQueuePresentKHR = (PFN_vkQueuePresentKHR)load(context, "vkQueuePresentKHR"); #endif /* defined(VK_KHR_swapchain) */ #if defined(VK_KHR_synchronization2) table->vkCmdPipelineBarrier2KHR = (PFN_vkCmdPipelineBarrier2KHR)load(context, "vkCmdPipelineBarrier2KHR"); table->vkCmdResetEvent2KHR = (PFN_vkCmdResetEvent2KHR)load(context, "vkCmdResetEvent2KHR"); table->vkCmdSetEvent2KHR = (PFN_vkCmdSetEvent2KHR)load(context, "vkCmdSetEvent2KHR"); table->vkCmdWaitEvents2KHR = (PFN_vkCmdWaitEvents2KHR)load(context, "vkCmdWaitEvents2KHR"); table->vkCmdWriteTimestamp2KHR = (PFN_vkCmdWriteTimestamp2KHR)load(context, "vkCmdWriteTimestamp2KHR"); table->vkQueueSubmit2KHR = (PFN_vkQueueSubmit2KHR)load(context, "vkQueueSubmit2KHR"); #endif /* defined(VK_KHR_synchronization2) */ #if defined(VK_KHR_timeline_semaphore) table->vkGetSemaphoreCounterValueKHR = (PFN_vkGetSemaphoreCounterValueKHR)load(context, "vkGetSemaphoreCounterValueKHR"); table->vkSignalSemaphoreKHR = (PFN_vkSignalSemaphoreKHR)load(context, "vkSignalSemaphoreKHR"); table->vkWaitSemaphoresKHR = (PFN_vkWaitSemaphoresKHR)load(context, "vkWaitSemaphoresKHR"); #endif /* defined(VK_KHR_timeline_semaphore) */ #if defined(VK_KHR_video_decode_queue) table->vkCmdDecodeVideoKHR = (PFN_vkCmdDecodeVideoKHR)load(context, "vkCmdDecodeVideoKHR"); #endif /* defined(VK_KHR_video_decode_queue) */ #if defined(VK_KHR_video_encode_queue) table->vkCmdEncodeVideoKHR = (PFN_vkCmdEncodeVideoKHR)load(context, "vkCmdEncodeVideoKHR"); table->vkGetEncodedVideoSessionParametersKHR = (PFN_vkGetEncodedVideoSessionParametersKHR)load(context, "vkGetEncodedVideoSessionParametersKHR"); #endif /* defined(VK_KHR_video_encode_queue) */ #if defined(VK_KHR_video_queue) table->vkBindVideoSessionMemoryKHR = (PFN_vkBindVideoSessionMemoryKHR)load(context, "vkBindVideoSessionMemoryKHR"); table->vkCmdBeginVideoCodingKHR = (PFN_vkCmdBeginVideoCodingKHR)load(context, "vkCmdBeginVideoCodingKHR"); table->vkCmdControlVideoCodingKHR = (PFN_vkCmdControlVideoCodingKHR)load(context, "vkCmdControlVideoCodingKHR"); table->vkCmdEndVideoCodingKHR = (PFN_vkCmdEndVideoCodingKHR)load(context, "vkCmdEndVideoCodingKHR"); table->vkCreateVideoSessionKHR = (PFN_vkCreateVideoSessionKHR)load(context, "vkCreateVideoSessionKHR"); table->vkCreateVideoSessionParametersKHR = (PFN_vkCreateVideoSessionParametersKHR)load(context, "vkCreateVideoSessionParametersKHR"); table->vkDestroyVideoSessionKHR = (PFN_vkDestroyVideoSessionKHR)load(context, "vkDestroyVideoSessionKHR"); table->vkDestroyVideoSessionParametersKHR = (PFN_vkDestroyVideoSessionParametersKHR)load(context, "vkDestroyVideoSessionParametersKHR"); table->vkGetVideoSessionMemoryRequirementsKHR = (PFN_vkGetVideoSessionMemoryRequirementsKHR)load(context, "vkGetVideoSessionMemoryRequirementsKHR"); table->vkUpdateVideoSessionParametersKHR = (PFN_vkUpdateVideoSessionParametersKHR)load(context, "vkUpdateVideoSessionParametersKHR"); #endif /* defined(VK_KHR_video_queue) */ #if defined(VK_NVX_binary_import) table->vkCmdCuLaunchKernelNVX = (PFN_vkCmdCuLaunchKernelNVX)load(context, "vkCmdCuLaunchKernelNVX"); table->vkCreateCuFunctionNVX = (PFN_vkCreateCuFunctionNVX)load(context, "vkCreateCuFunctionNVX"); table->vkCreateCuModuleNVX = (PFN_vkCreateCuModuleNVX)load(context, "vkCreateCuModuleNVX"); table->vkDestroyCuFunctionNVX = (PFN_vkDestroyCuFunctionNVX)load(context, "vkDestroyCuFunctionNVX"); table->vkDestroyCuModuleNVX = (PFN_vkDestroyCuModuleNVX)load(context, "vkDestroyCuModuleNVX"); #endif /* defined(VK_NVX_binary_import) */ #if defined(VK_NVX_image_view_handle) table->vkGetImageViewHandleNVX = (PFN_vkGetImageViewHandleNVX)load(context, "vkGetImageViewHandleNVX"); #endif /* defined(VK_NVX_image_view_handle) */ #if defined(VK_NVX_image_view_handle) && VK_NVX_IMAGE_VIEW_HANDLE_SPEC_VERSION >= 3 table->vkGetImageViewHandle64NVX = (PFN_vkGetImageViewHandle64NVX)load(context, "vkGetImageViewHandle64NVX"); #endif /* defined(VK_NVX_image_view_handle) && VK_NVX_IMAGE_VIEW_HANDLE_SPEC_VERSION >= 3 */ #if defined(VK_NVX_image_view_handle) && VK_NVX_IMAGE_VIEW_HANDLE_SPEC_VERSION >= 2 table->vkGetImageViewAddressNVX = (PFN_vkGetImageViewAddressNVX)load(context, "vkGetImageViewAddressNVX"); #endif /* defined(VK_NVX_image_view_handle) && VK_NVX_IMAGE_VIEW_HANDLE_SPEC_VERSION >= 2 */ #if defined(VK_NV_clip_space_w_scaling) table->vkCmdSetViewportWScalingNV = (PFN_vkCmdSetViewportWScalingNV)load(context, "vkCmdSetViewportWScalingNV"); #endif /* defined(VK_NV_clip_space_w_scaling) */ #if defined(VK_NV_cluster_acceleration_structure) table->vkCmdBuildClusterAccelerationStructureIndirectNV = (PFN_vkCmdBuildClusterAccelerationStructureIndirectNV)load(context, "vkCmdBuildClusterAccelerationStructureIndirectNV"); table->vkGetClusterAccelerationStructureBuildSizesNV = (PFN_vkGetClusterAccelerationStructureBuildSizesNV)load(context, "vkGetClusterAccelerationStructureBuildSizesNV"); #endif /* defined(VK_NV_cluster_acceleration_structure) */ #if defined(VK_NV_cooperative_vector) table->vkCmdConvertCooperativeVectorMatrixNV = (PFN_vkCmdConvertCooperativeVectorMatrixNV)load(context, "vkCmdConvertCooperativeVectorMatrixNV"); table->vkConvertCooperativeVectorMatrixNV = (PFN_vkConvertCooperativeVectorMatrixNV)load(context, "vkConvertCooperativeVectorMatrixNV"); #endif /* defined(VK_NV_cooperative_vector) */ #if defined(VK_NV_copy_memory_indirect) table->vkCmdCopyMemoryIndirectNV = (PFN_vkCmdCopyMemoryIndirectNV)load(context, "vkCmdCopyMemoryIndirectNV"); table->vkCmdCopyMemoryToImageIndirectNV = (PFN_vkCmdCopyMemoryToImageIndirectNV)load(context, "vkCmdCopyMemoryToImageIndirectNV"); #endif /* defined(VK_NV_copy_memory_indirect) */ #if defined(VK_NV_cuda_kernel_launch) table->vkCmdCudaLaunchKernelNV = (PFN_vkCmdCudaLaunchKernelNV)load(context, "vkCmdCudaLaunchKernelNV"); table->vkCreateCudaFunctionNV = (PFN_vkCreateCudaFunctionNV)load(context, "vkCreateCudaFunctionNV"); table->vkCreateCudaModuleNV = (PFN_vkCreateCudaModuleNV)load(context, "vkCreateCudaModuleNV"); table->vkDestroyCudaFunctionNV = (PFN_vkDestroyCudaFunctionNV)load(context, "vkDestroyCudaFunctionNV"); table->vkDestroyCudaModuleNV = (PFN_vkDestroyCudaModuleNV)load(context, "vkDestroyCudaModuleNV"); table->vkGetCudaModuleCacheNV = (PFN_vkGetCudaModuleCacheNV)load(context, "vkGetCudaModuleCacheNV"); #endif /* defined(VK_NV_cuda_kernel_launch) */ #if defined(VK_NV_device_diagnostic_checkpoints) table->vkCmdSetCheckpointNV = (PFN_vkCmdSetCheckpointNV)load(context, "vkCmdSetCheckpointNV"); table->vkGetQueueCheckpointDataNV = (PFN_vkGetQueueCheckpointDataNV)load(context, "vkGetQueueCheckpointDataNV"); #endif /* defined(VK_NV_device_diagnostic_checkpoints) */ #if defined(VK_NV_device_diagnostic_checkpoints) && (defined(VK_VERSION_1_3) || defined(VK_KHR_synchronization2)) table->vkGetQueueCheckpointData2NV = (PFN_vkGetQueueCheckpointData2NV)load(context, "vkGetQueueCheckpointData2NV"); #endif /* defined(VK_NV_device_diagnostic_checkpoints) && (defined(VK_VERSION_1_3) || defined(VK_KHR_synchronization2)) */ #if defined(VK_NV_device_generated_commands) table->vkCmdBindPipelineShaderGroupNV = (PFN_vkCmdBindPipelineShaderGroupNV)load(context, "vkCmdBindPipelineShaderGroupNV"); table->vkCmdExecuteGeneratedCommandsNV = (PFN_vkCmdExecuteGeneratedCommandsNV)load(context, "vkCmdExecuteGeneratedCommandsNV"); table->vkCmdPreprocessGeneratedCommandsNV = (PFN_vkCmdPreprocessGeneratedCommandsNV)load(context, "vkCmdPreprocessGeneratedCommandsNV"); table->vkCreateIndirectCommandsLayoutNV = (PFN_vkCreateIndirectCommandsLayoutNV)load(context, "vkCreateIndirectCommandsLayoutNV"); table->vkDestroyIndirectCommandsLayoutNV = (PFN_vkDestroyIndirectCommandsLayoutNV)load(context, "vkDestroyIndirectCommandsLayoutNV"); table->vkGetGeneratedCommandsMemoryRequirementsNV = (PFN_vkGetGeneratedCommandsMemoryRequirementsNV)load(context, "vkGetGeneratedCommandsMemoryRequirementsNV"); #endif /* defined(VK_NV_device_generated_commands) */ #if defined(VK_NV_device_generated_commands_compute) table->vkCmdUpdatePipelineIndirectBufferNV = (PFN_vkCmdUpdatePipelineIndirectBufferNV)load(context, "vkCmdUpdatePipelineIndirectBufferNV"); table->vkGetPipelineIndirectDeviceAddressNV = (PFN_vkGetPipelineIndirectDeviceAddressNV)load(context, "vkGetPipelineIndirectDeviceAddressNV"); table->vkGetPipelineIndirectMemoryRequirementsNV = (PFN_vkGetPipelineIndirectMemoryRequirementsNV)load(context, "vkGetPipelineIndirectMemoryRequirementsNV"); #endif /* defined(VK_NV_device_generated_commands_compute) */ #if defined(VK_NV_external_memory_rdma) table->vkGetMemoryRemoteAddressNV = (PFN_vkGetMemoryRemoteAddressNV)load(context, "vkGetMemoryRemoteAddressNV"); #endif /* defined(VK_NV_external_memory_rdma) */ #if defined(VK_NV_external_memory_win32) table->vkGetMemoryWin32HandleNV = (PFN_vkGetMemoryWin32HandleNV)load(context, "vkGetMemoryWin32HandleNV"); #endif /* defined(VK_NV_external_memory_win32) */ #if defined(VK_NV_fragment_shading_rate_enums) table->vkCmdSetFragmentShadingRateEnumNV = (PFN_vkCmdSetFragmentShadingRateEnumNV)load(context, "vkCmdSetFragmentShadingRateEnumNV"); #endif /* defined(VK_NV_fragment_shading_rate_enums) */ #if defined(VK_NV_low_latency2) table->vkGetLatencyTimingsNV = (PFN_vkGetLatencyTimingsNV)load(context, "vkGetLatencyTimingsNV"); table->vkLatencySleepNV = (PFN_vkLatencySleepNV)load(context, "vkLatencySleepNV"); table->vkQueueNotifyOutOfBandNV = (PFN_vkQueueNotifyOutOfBandNV)load(context, "vkQueueNotifyOutOfBandNV"); table->vkSetLatencyMarkerNV = (PFN_vkSetLatencyMarkerNV)load(context, "vkSetLatencyMarkerNV"); table->vkSetLatencySleepModeNV = (PFN_vkSetLatencySleepModeNV)load(context, "vkSetLatencySleepModeNV"); #endif /* defined(VK_NV_low_latency2) */ #if defined(VK_NV_memory_decompression) table->vkCmdDecompressMemoryIndirectCountNV = (PFN_vkCmdDecompressMemoryIndirectCountNV)load(context, "vkCmdDecompressMemoryIndirectCountNV"); table->vkCmdDecompressMemoryNV = (PFN_vkCmdDecompressMemoryNV)load(context, "vkCmdDecompressMemoryNV"); #endif /* defined(VK_NV_memory_decompression) */ #if defined(VK_NV_mesh_shader) table->vkCmdDrawMeshTasksIndirectNV = (PFN_vkCmdDrawMeshTasksIndirectNV)load(context, "vkCmdDrawMeshTasksIndirectNV"); table->vkCmdDrawMeshTasksNV = (PFN_vkCmdDrawMeshTasksNV)load(context, "vkCmdDrawMeshTasksNV"); #endif /* defined(VK_NV_mesh_shader) */ #if defined(VK_NV_mesh_shader) && (defined(VK_KHR_draw_indirect_count) || defined(VK_VERSION_1_2)) table->vkCmdDrawMeshTasksIndirectCountNV = (PFN_vkCmdDrawMeshTasksIndirectCountNV)load(context, "vkCmdDrawMeshTasksIndirectCountNV"); #endif /* defined(VK_NV_mesh_shader) && (defined(VK_KHR_draw_indirect_count) || defined(VK_VERSION_1_2)) */ #if defined(VK_NV_optical_flow) table->vkBindOpticalFlowSessionImageNV = (PFN_vkBindOpticalFlowSessionImageNV)load(context, "vkBindOpticalFlowSessionImageNV"); table->vkCmdOpticalFlowExecuteNV = (PFN_vkCmdOpticalFlowExecuteNV)load(context, "vkCmdOpticalFlowExecuteNV"); table->vkCreateOpticalFlowSessionNV = (PFN_vkCreateOpticalFlowSessionNV)load(context, "vkCreateOpticalFlowSessionNV"); table->vkDestroyOpticalFlowSessionNV = (PFN_vkDestroyOpticalFlowSessionNV)load(context, "vkDestroyOpticalFlowSessionNV"); #endif /* defined(VK_NV_optical_flow) */ #if defined(VK_NV_partitioned_acceleration_structure) table->vkCmdBuildPartitionedAccelerationStructuresNV = (PFN_vkCmdBuildPartitionedAccelerationStructuresNV)load(context, "vkCmdBuildPartitionedAccelerationStructuresNV"); table->vkGetPartitionedAccelerationStructuresBuildSizesNV = (PFN_vkGetPartitionedAccelerationStructuresBuildSizesNV)load(context, "vkGetPartitionedAccelerationStructuresBuildSizesNV"); #endif /* defined(VK_NV_partitioned_acceleration_structure) */ #if defined(VK_NV_ray_tracing) table->vkBindAccelerationStructureMemoryNV = (PFN_vkBindAccelerationStructureMemoryNV)load(context, "vkBindAccelerationStructureMemoryNV"); table->vkCmdBuildAccelerationStructureNV = (PFN_vkCmdBuildAccelerationStructureNV)load(context, "vkCmdBuildAccelerationStructureNV"); table->vkCmdCopyAccelerationStructureNV = (PFN_vkCmdCopyAccelerationStructureNV)load(context, "vkCmdCopyAccelerationStructureNV"); table->vkCmdTraceRaysNV = (PFN_vkCmdTraceRaysNV)load(context, "vkCmdTraceRaysNV"); table->vkCmdWriteAccelerationStructuresPropertiesNV = (PFN_vkCmdWriteAccelerationStructuresPropertiesNV)load(context, "vkCmdWriteAccelerationStructuresPropertiesNV"); table->vkCompileDeferredNV = (PFN_vkCompileDeferredNV)load(context, "vkCompileDeferredNV"); table->vkCreateAccelerationStructureNV = (PFN_vkCreateAccelerationStructureNV)load(context, "vkCreateAccelerationStructureNV"); table->vkCreateRayTracingPipelinesNV = (PFN_vkCreateRayTracingPipelinesNV)load(context, "vkCreateRayTracingPipelinesNV"); table->vkDestroyAccelerationStructureNV = (PFN_vkDestroyAccelerationStructureNV)load(context, "vkDestroyAccelerationStructureNV"); table->vkGetAccelerationStructureHandleNV = (PFN_vkGetAccelerationStructureHandleNV)load(context, "vkGetAccelerationStructureHandleNV"); table->vkGetAccelerationStructureMemoryRequirementsNV = (PFN_vkGetAccelerationStructureMemoryRequirementsNV)load(context, "vkGetAccelerationStructureMemoryRequirementsNV"); table->vkGetRayTracingShaderGroupHandlesNV = (PFN_vkGetRayTracingShaderGroupHandlesNV)load(context, "vkGetRayTracingShaderGroupHandlesNV"); #endif /* defined(VK_NV_ray_tracing) */ #if defined(VK_NV_scissor_exclusive) && VK_NV_SCISSOR_EXCLUSIVE_SPEC_VERSION >= 2 table->vkCmdSetExclusiveScissorEnableNV = (PFN_vkCmdSetExclusiveScissorEnableNV)load(context, "vkCmdSetExclusiveScissorEnableNV"); #endif /* defined(VK_NV_scissor_exclusive) && VK_NV_SCISSOR_EXCLUSIVE_SPEC_VERSION >= 2 */ #if defined(VK_NV_scissor_exclusive) table->vkCmdSetExclusiveScissorNV = (PFN_vkCmdSetExclusiveScissorNV)load(context, "vkCmdSetExclusiveScissorNV"); #endif /* defined(VK_NV_scissor_exclusive) */ #if defined(VK_NV_shading_rate_image) table->vkCmdBindShadingRateImageNV = (PFN_vkCmdBindShadingRateImageNV)load(context, "vkCmdBindShadingRateImageNV"); table->vkCmdSetCoarseSampleOrderNV = (PFN_vkCmdSetCoarseSampleOrderNV)load(context, "vkCmdSetCoarseSampleOrderNV"); table->vkCmdSetViewportShadingRatePaletteNV = (PFN_vkCmdSetViewportShadingRatePaletteNV)load(context, "vkCmdSetViewportShadingRatePaletteNV"); #endif /* defined(VK_NV_shading_rate_image) */ #if defined(VK_QCOM_tile_properties) table->vkGetDynamicRenderingTilePropertiesQCOM = (PFN_vkGetDynamicRenderingTilePropertiesQCOM)load(context, "vkGetDynamicRenderingTilePropertiesQCOM"); table->vkGetFramebufferTilePropertiesQCOM = (PFN_vkGetFramebufferTilePropertiesQCOM)load(context, "vkGetFramebufferTilePropertiesQCOM"); #endif /* defined(VK_QCOM_tile_properties) */ #if defined(VK_QNX_external_memory_screen_buffer) table->vkGetScreenBufferPropertiesQNX = (PFN_vkGetScreenBufferPropertiesQNX)load(context, "vkGetScreenBufferPropertiesQNX"); #endif /* defined(VK_QNX_external_memory_screen_buffer) */ #if defined(VK_VALVE_descriptor_set_host_mapping) table->vkGetDescriptorSetHostMappingVALVE = (PFN_vkGetDescriptorSetHostMappingVALVE)load(context, "vkGetDescriptorSetHostMappingVALVE"); table->vkGetDescriptorSetLayoutHostMappingInfoVALVE = (PFN_vkGetDescriptorSetLayoutHostMappingInfoVALVE)load(context, "vkGetDescriptorSetLayoutHostMappingInfoVALVE"); #endif /* defined(VK_VALVE_descriptor_set_host_mapping) */ #if (defined(VK_EXT_depth_clamp_control)) || (defined(VK_EXT_shader_object) && defined(VK_EXT_depth_clamp_control)) table->vkCmdSetDepthClampRangeEXT = (PFN_vkCmdSetDepthClampRangeEXT)load(context, "vkCmdSetDepthClampRangeEXT"); #endif /* (defined(VK_EXT_depth_clamp_control)) || (defined(VK_EXT_shader_object) && defined(VK_EXT_depth_clamp_control)) */ #if (defined(VK_EXT_extended_dynamic_state)) || (defined(VK_EXT_shader_object)) table->vkCmdBindVertexBuffers2EXT = (PFN_vkCmdBindVertexBuffers2EXT)load(context, "vkCmdBindVertexBuffers2EXT"); table->vkCmdSetCullModeEXT = (PFN_vkCmdSetCullModeEXT)load(context, "vkCmdSetCullModeEXT"); table->vkCmdSetDepthBoundsTestEnableEXT = (PFN_vkCmdSetDepthBoundsTestEnableEXT)load(context, "vkCmdSetDepthBoundsTestEnableEXT"); table->vkCmdSetDepthCompareOpEXT = (PFN_vkCmdSetDepthCompareOpEXT)load(context, "vkCmdSetDepthCompareOpEXT"); table->vkCmdSetDepthTestEnableEXT = (PFN_vkCmdSetDepthTestEnableEXT)load(context, "vkCmdSetDepthTestEnableEXT"); table->vkCmdSetDepthWriteEnableEXT = (PFN_vkCmdSetDepthWriteEnableEXT)load(context, "vkCmdSetDepthWriteEnableEXT"); table->vkCmdSetFrontFaceEXT = (PFN_vkCmdSetFrontFaceEXT)load(context, "vkCmdSetFrontFaceEXT"); table->vkCmdSetPrimitiveTopologyEXT = (PFN_vkCmdSetPrimitiveTopologyEXT)load(context, "vkCmdSetPrimitiveTopologyEXT"); table->vkCmdSetScissorWithCountEXT = (PFN_vkCmdSetScissorWithCountEXT)load(context, "vkCmdSetScissorWithCountEXT"); table->vkCmdSetStencilOpEXT = (PFN_vkCmdSetStencilOpEXT)load(context, "vkCmdSetStencilOpEXT"); table->vkCmdSetStencilTestEnableEXT = (PFN_vkCmdSetStencilTestEnableEXT)load(context, "vkCmdSetStencilTestEnableEXT"); table->vkCmdSetViewportWithCountEXT = (PFN_vkCmdSetViewportWithCountEXT)load(context, "vkCmdSetViewportWithCountEXT"); #endif /* (defined(VK_EXT_extended_dynamic_state)) || (defined(VK_EXT_shader_object)) */ #if (defined(VK_EXT_extended_dynamic_state2)) || (defined(VK_EXT_shader_object)) table->vkCmdSetDepthBiasEnableEXT = (PFN_vkCmdSetDepthBiasEnableEXT)load(context, "vkCmdSetDepthBiasEnableEXT"); table->vkCmdSetLogicOpEXT = (PFN_vkCmdSetLogicOpEXT)load(context, "vkCmdSetLogicOpEXT"); table->vkCmdSetPatchControlPointsEXT = (PFN_vkCmdSetPatchControlPointsEXT)load(context, "vkCmdSetPatchControlPointsEXT"); table->vkCmdSetPrimitiveRestartEnableEXT = (PFN_vkCmdSetPrimitiveRestartEnableEXT)load(context, "vkCmdSetPrimitiveRestartEnableEXT"); table->vkCmdSetRasterizerDiscardEnableEXT = (PFN_vkCmdSetRasterizerDiscardEnableEXT)load(context, "vkCmdSetRasterizerDiscardEnableEXT"); #endif /* (defined(VK_EXT_extended_dynamic_state2)) || (defined(VK_EXT_shader_object)) */ #if (defined(VK_EXT_extended_dynamic_state3)) || (defined(VK_EXT_shader_object)) table->vkCmdSetAlphaToCoverageEnableEXT = (PFN_vkCmdSetAlphaToCoverageEnableEXT)load(context, "vkCmdSetAlphaToCoverageEnableEXT"); table->vkCmdSetAlphaToOneEnableEXT = (PFN_vkCmdSetAlphaToOneEnableEXT)load(context, "vkCmdSetAlphaToOneEnableEXT"); table->vkCmdSetColorBlendEnableEXT = (PFN_vkCmdSetColorBlendEnableEXT)load(context, "vkCmdSetColorBlendEnableEXT"); table->vkCmdSetColorBlendEquationEXT = (PFN_vkCmdSetColorBlendEquationEXT)load(context, "vkCmdSetColorBlendEquationEXT"); table->vkCmdSetColorWriteMaskEXT = (PFN_vkCmdSetColorWriteMaskEXT)load(context, "vkCmdSetColorWriteMaskEXT"); table->vkCmdSetDepthClampEnableEXT = (PFN_vkCmdSetDepthClampEnableEXT)load(context, "vkCmdSetDepthClampEnableEXT"); table->vkCmdSetLogicOpEnableEXT = (PFN_vkCmdSetLogicOpEnableEXT)load(context, "vkCmdSetLogicOpEnableEXT"); table->vkCmdSetPolygonModeEXT = (PFN_vkCmdSetPolygonModeEXT)load(context, "vkCmdSetPolygonModeEXT"); table->vkCmdSetRasterizationSamplesEXT = (PFN_vkCmdSetRasterizationSamplesEXT)load(context, "vkCmdSetRasterizationSamplesEXT"); table->vkCmdSetSampleMaskEXT = (PFN_vkCmdSetSampleMaskEXT)load(context, "vkCmdSetSampleMaskEXT"); #endif /* (defined(VK_EXT_extended_dynamic_state3)) || (defined(VK_EXT_shader_object)) */ #if (defined(VK_EXT_extended_dynamic_state3) && (defined(VK_KHR_maintenance2) || defined(VK_VERSION_1_1))) || (defined(VK_EXT_shader_object)) table->vkCmdSetTessellationDomainOriginEXT = (PFN_vkCmdSetTessellationDomainOriginEXT)load(context, "vkCmdSetTessellationDomainOriginEXT"); #endif /* (defined(VK_EXT_extended_dynamic_state3) && (defined(VK_KHR_maintenance2) || defined(VK_VERSION_1_1))) || (defined(VK_EXT_shader_object)) */ #if (defined(VK_EXT_extended_dynamic_state3) && defined(VK_EXT_transform_feedback)) || (defined(VK_EXT_shader_object) && defined(VK_EXT_transform_feedback)) table->vkCmdSetRasterizationStreamEXT = (PFN_vkCmdSetRasterizationStreamEXT)load(context, "vkCmdSetRasterizationStreamEXT"); #endif /* (defined(VK_EXT_extended_dynamic_state3) && defined(VK_EXT_transform_feedback)) || (defined(VK_EXT_shader_object) && defined(VK_EXT_transform_feedback)) */ #if (defined(VK_EXT_extended_dynamic_state3) && defined(VK_EXT_conservative_rasterization)) || (defined(VK_EXT_shader_object) && defined(VK_EXT_conservative_rasterization)) table->vkCmdSetConservativeRasterizationModeEXT = (PFN_vkCmdSetConservativeRasterizationModeEXT)load(context, "vkCmdSetConservativeRasterizationModeEXT"); table->vkCmdSetExtraPrimitiveOverestimationSizeEXT = (PFN_vkCmdSetExtraPrimitiveOverestimationSizeEXT)load(context, "vkCmdSetExtraPrimitiveOverestimationSizeEXT"); #endif /* (defined(VK_EXT_extended_dynamic_state3) && defined(VK_EXT_conservative_rasterization)) || (defined(VK_EXT_shader_object) && defined(VK_EXT_conservative_rasterization)) */ #if (defined(VK_EXT_extended_dynamic_state3) && defined(VK_EXT_depth_clip_enable)) || (defined(VK_EXT_shader_object) && defined(VK_EXT_depth_clip_enable)) table->vkCmdSetDepthClipEnableEXT = (PFN_vkCmdSetDepthClipEnableEXT)load(context, "vkCmdSetDepthClipEnableEXT"); #endif /* (defined(VK_EXT_extended_dynamic_state3) && defined(VK_EXT_depth_clip_enable)) || (defined(VK_EXT_shader_object) && defined(VK_EXT_depth_clip_enable)) */ #if (defined(VK_EXT_extended_dynamic_state3) && defined(VK_EXT_sample_locations)) || (defined(VK_EXT_shader_object) && defined(VK_EXT_sample_locations)) table->vkCmdSetSampleLocationsEnableEXT = (PFN_vkCmdSetSampleLocationsEnableEXT)load(context, "vkCmdSetSampleLocationsEnableEXT"); #endif /* (defined(VK_EXT_extended_dynamic_state3) && defined(VK_EXT_sample_locations)) || (defined(VK_EXT_shader_object) && defined(VK_EXT_sample_locations)) */ #if (defined(VK_EXT_extended_dynamic_state3) && defined(VK_EXT_blend_operation_advanced)) || (defined(VK_EXT_shader_object) && defined(VK_EXT_blend_operation_advanced)) table->vkCmdSetColorBlendAdvancedEXT = (PFN_vkCmdSetColorBlendAdvancedEXT)load(context, "vkCmdSetColorBlendAdvancedEXT"); #endif /* (defined(VK_EXT_extended_dynamic_state3) && defined(VK_EXT_blend_operation_advanced)) || (defined(VK_EXT_shader_object) && defined(VK_EXT_blend_operation_advanced)) */ #if (defined(VK_EXT_extended_dynamic_state3) && defined(VK_EXT_provoking_vertex)) || (defined(VK_EXT_shader_object) && defined(VK_EXT_provoking_vertex)) table->vkCmdSetProvokingVertexModeEXT = (PFN_vkCmdSetProvokingVertexModeEXT)load(context, "vkCmdSetProvokingVertexModeEXT"); #endif /* (defined(VK_EXT_extended_dynamic_state3) && defined(VK_EXT_provoking_vertex)) || (defined(VK_EXT_shader_object) && defined(VK_EXT_provoking_vertex)) */ #if (defined(VK_EXT_extended_dynamic_state3) && defined(VK_EXT_line_rasterization)) || (defined(VK_EXT_shader_object) && defined(VK_EXT_line_rasterization)) table->vkCmdSetLineRasterizationModeEXT = (PFN_vkCmdSetLineRasterizationModeEXT)load(context, "vkCmdSetLineRasterizationModeEXT"); table->vkCmdSetLineStippleEnableEXT = (PFN_vkCmdSetLineStippleEnableEXT)load(context, "vkCmdSetLineStippleEnableEXT"); #endif /* (defined(VK_EXT_extended_dynamic_state3) && defined(VK_EXT_line_rasterization)) || (defined(VK_EXT_shader_object) && defined(VK_EXT_line_rasterization)) */ #if (defined(VK_EXT_extended_dynamic_state3) && defined(VK_EXT_depth_clip_control)) || (defined(VK_EXT_shader_object) && defined(VK_EXT_depth_clip_control)) table->vkCmdSetDepthClipNegativeOneToOneEXT = (PFN_vkCmdSetDepthClipNegativeOneToOneEXT)load(context, "vkCmdSetDepthClipNegativeOneToOneEXT"); #endif /* (defined(VK_EXT_extended_dynamic_state3) && defined(VK_EXT_depth_clip_control)) || (defined(VK_EXT_shader_object) && defined(VK_EXT_depth_clip_control)) */ #if (defined(VK_EXT_extended_dynamic_state3) && defined(VK_NV_clip_space_w_scaling)) || (defined(VK_EXT_shader_object) && defined(VK_NV_clip_space_w_scaling)) table->vkCmdSetViewportWScalingEnableNV = (PFN_vkCmdSetViewportWScalingEnableNV)load(context, "vkCmdSetViewportWScalingEnableNV"); #endif /* (defined(VK_EXT_extended_dynamic_state3) && defined(VK_NV_clip_space_w_scaling)) || (defined(VK_EXT_shader_object) && defined(VK_NV_clip_space_w_scaling)) */ #if (defined(VK_EXT_extended_dynamic_state3) && defined(VK_NV_viewport_swizzle)) || (defined(VK_EXT_shader_object) && defined(VK_NV_viewport_swizzle)) table->vkCmdSetViewportSwizzleNV = (PFN_vkCmdSetViewportSwizzleNV)load(context, "vkCmdSetViewportSwizzleNV"); #endif /* (defined(VK_EXT_extended_dynamic_state3) && defined(VK_NV_viewport_swizzle)) || (defined(VK_EXT_shader_object) && defined(VK_NV_viewport_swizzle)) */ #if (defined(VK_EXT_extended_dynamic_state3) && defined(VK_NV_fragment_coverage_to_color)) || (defined(VK_EXT_shader_object) && defined(VK_NV_fragment_coverage_to_color)) table->vkCmdSetCoverageToColorEnableNV = (PFN_vkCmdSetCoverageToColorEnableNV)load(context, "vkCmdSetCoverageToColorEnableNV"); table->vkCmdSetCoverageToColorLocationNV = (PFN_vkCmdSetCoverageToColorLocationNV)load(context, "vkCmdSetCoverageToColorLocationNV"); #endif /* (defined(VK_EXT_extended_dynamic_state3) && defined(VK_NV_fragment_coverage_to_color)) || (defined(VK_EXT_shader_object) && defined(VK_NV_fragment_coverage_to_color)) */ #if (defined(VK_EXT_extended_dynamic_state3) && defined(VK_NV_framebuffer_mixed_samples)) || (defined(VK_EXT_shader_object) && defined(VK_NV_framebuffer_mixed_samples)) table->vkCmdSetCoverageModulationModeNV = (PFN_vkCmdSetCoverageModulationModeNV)load(context, "vkCmdSetCoverageModulationModeNV"); table->vkCmdSetCoverageModulationTableEnableNV = (PFN_vkCmdSetCoverageModulationTableEnableNV)load(context, "vkCmdSetCoverageModulationTableEnableNV"); table->vkCmdSetCoverageModulationTableNV = (PFN_vkCmdSetCoverageModulationTableNV)load(context, "vkCmdSetCoverageModulationTableNV"); #endif /* (defined(VK_EXT_extended_dynamic_state3) && defined(VK_NV_framebuffer_mixed_samples)) || (defined(VK_EXT_shader_object) && defined(VK_NV_framebuffer_mixed_samples)) */ #if (defined(VK_EXT_extended_dynamic_state3) && defined(VK_NV_shading_rate_image)) || (defined(VK_EXT_shader_object) && defined(VK_NV_shading_rate_image)) table->vkCmdSetShadingRateImageEnableNV = (PFN_vkCmdSetShadingRateImageEnableNV)load(context, "vkCmdSetShadingRateImageEnableNV"); #endif /* (defined(VK_EXT_extended_dynamic_state3) && defined(VK_NV_shading_rate_image)) || (defined(VK_EXT_shader_object) && defined(VK_NV_shading_rate_image)) */ #if (defined(VK_EXT_extended_dynamic_state3) && defined(VK_NV_representative_fragment_test)) || (defined(VK_EXT_shader_object) && defined(VK_NV_representative_fragment_test)) table->vkCmdSetRepresentativeFragmentTestEnableNV = (PFN_vkCmdSetRepresentativeFragmentTestEnableNV)load(context, "vkCmdSetRepresentativeFragmentTestEnableNV"); #endif /* (defined(VK_EXT_extended_dynamic_state3) && defined(VK_NV_representative_fragment_test)) || (defined(VK_EXT_shader_object) && defined(VK_NV_representative_fragment_test)) */ #if (defined(VK_EXT_extended_dynamic_state3) && defined(VK_NV_coverage_reduction_mode)) || (defined(VK_EXT_shader_object) && defined(VK_NV_coverage_reduction_mode)) table->vkCmdSetCoverageReductionModeNV = (PFN_vkCmdSetCoverageReductionModeNV)load(context, "vkCmdSetCoverageReductionModeNV"); #endif /* (defined(VK_EXT_extended_dynamic_state3) && defined(VK_NV_coverage_reduction_mode)) || (defined(VK_EXT_shader_object) && defined(VK_NV_coverage_reduction_mode)) */ #if (defined(VK_EXT_host_image_copy)) || (defined(VK_EXT_image_compression_control)) table->vkGetImageSubresourceLayout2EXT = (PFN_vkGetImageSubresourceLayout2EXT)load(context, "vkGetImageSubresourceLayout2EXT"); #endif /* (defined(VK_EXT_host_image_copy)) || (defined(VK_EXT_image_compression_control)) */ #if (defined(VK_EXT_shader_object)) || (defined(VK_EXT_vertex_input_dynamic_state)) table->vkCmdSetVertexInputEXT = (PFN_vkCmdSetVertexInputEXT)load(context, "vkCmdSetVertexInputEXT"); #endif /* (defined(VK_EXT_shader_object)) || (defined(VK_EXT_vertex_input_dynamic_state)) */ #if (defined(VK_KHR_descriptor_update_template) && defined(VK_KHR_push_descriptor)) || (defined(VK_KHR_push_descriptor) && (defined(VK_VERSION_1_1) || defined(VK_KHR_descriptor_update_template))) table->vkCmdPushDescriptorSetWithTemplateKHR = (PFN_vkCmdPushDescriptorSetWithTemplateKHR)load(context, "vkCmdPushDescriptorSetWithTemplateKHR"); #endif /* (defined(VK_KHR_descriptor_update_template) && defined(VK_KHR_push_descriptor)) || (defined(VK_KHR_push_descriptor) && (defined(VK_VERSION_1_1) || defined(VK_KHR_descriptor_update_template))) */ #if (defined(VK_KHR_device_group) && defined(VK_KHR_surface)) || (defined(VK_KHR_swapchain) && defined(VK_VERSION_1_1)) table->vkGetDeviceGroupPresentCapabilitiesKHR = (PFN_vkGetDeviceGroupPresentCapabilitiesKHR)load(context, "vkGetDeviceGroupPresentCapabilitiesKHR"); table->vkGetDeviceGroupSurfacePresentModesKHR = (PFN_vkGetDeviceGroupSurfacePresentModesKHR)load(context, "vkGetDeviceGroupSurfacePresentModesKHR"); #endif /* (defined(VK_KHR_device_group) && defined(VK_KHR_surface)) || (defined(VK_KHR_swapchain) && defined(VK_VERSION_1_1)) */ #if (defined(VK_KHR_device_group) && defined(VK_KHR_swapchain)) || (defined(VK_KHR_swapchain) && defined(VK_VERSION_1_1)) table->vkAcquireNextImage2KHR = (PFN_vkAcquireNextImage2KHR)load(context, "vkAcquireNextImage2KHR"); #endif /* (defined(VK_KHR_device_group) && defined(VK_KHR_swapchain)) || (defined(VK_KHR_swapchain) && defined(VK_VERSION_1_1)) */ /* VOLK_GENERATE_LOAD_DEVICE_TABLE */ } #ifdef __GNUC__ #ifdef VOLK_DEFAULT_VISIBILITY # pragma GCC visibility push(default) #else # pragma GCC visibility push(hidden) #endif #endif /* VOLK_GENERATE_PROTOTYPES_C */ #if defined(VK_VERSION_1_0) PFN_vkAllocateCommandBuffers vkAllocateCommandBuffers; PFN_vkAllocateDescriptorSets vkAllocateDescriptorSets; PFN_vkAllocateMemory vkAllocateMemory; PFN_vkBeginCommandBuffer vkBeginCommandBuffer; PFN_vkBindBufferMemory vkBindBufferMemory; PFN_vkBindImageMemory vkBindImageMemory; PFN_vkCmdBeginQuery vkCmdBeginQuery; PFN_vkCmdBeginRenderPass vkCmdBeginRenderPass; PFN_vkCmdBindDescriptorSets vkCmdBindDescriptorSets; PFN_vkCmdBindIndexBuffer vkCmdBindIndexBuffer; PFN_vkCmdBindPipeline vkCmdBindPipeline; PFN_vkCmdBindVertexBuffers vkCmdBindVertexBuffers; PFN_vkCmdBlitImage vkCmdBlitImage; PFN_vkCmdClearAttachments vkCmdClearAttachments; PFN_vkCmdClearColorImage vkCmdClearColorImage; PFN_vkCmdClearDepthStencilImage vkCmdClearDepthStencilImage; PFN_vkCmdCopyBuffer vkCmdCopyBuffer; PFN_vkCmdCopyBufferToImage vkCmdCopyBufferToImage; PFN_vkCmdCopyImage vkCmdCopyImage; PFN_vkCmdCopyImageToBuffer vkCmdCopyImageToBuffer; PFN_vkCmdCopyQueryPoolResults vkCmdCopyQueryPoolResults; PFN_vkCmdDispatch vkCmdDispatch; PFN_vkCmdDispatchIndirect vkCmdDispatchIndirect; PFN_vkCmdDraw vkCmdDraw; PFN_vkCmdDrawIndexed vkCmdDrawIndexed; PFN_vkCmdDrawIndexedIndirect vkCmdDrawIndexedIndirect; PFN_vkCmdDrawIndirect vkCmdDrawIndirect; PFN_vkCmdEndQuery vkCmdEndQuery; PFN_vkCmdEndRenderPass vkCmdEndRenderPass; PFN_vkCmdExecuteCommands vkCmdExecuteCommands; PFN_vkCmdFillBuffer vkCmdFillBuffer; PFN_vkCmdNextSubpass vkCmdNextSubpass; PFN_vkCmdPipelineBarrier vkCmdPipelineBarrier; PFN_vkCmdPushConstants vkCmdPushConstants; PFN_vkCmdResetEvent vkCmdResetEvent; PFN_vkCmdResetQueryPool vkCmdResetQueryPool; PFN_vkCmdResolveImage vkCmdResolveImage; PFN_vkCmdSetBlendConstants vkCmdSetBlendConstants; PFN_vkCmdSetDepthBias vkCmdSetDepthBias; PFN_vkCmdSetDepthBounds vkCmdSetDepthBounds; PFN_vkCmdSetEvent vkCmdSetEvent; PFN_vkCmdSetLineWidth vkCmdSetLineWidth; PFN_vkCmdSetScissor vkCmdSetScissor; PFN_vkCmdSetStencilCompareMask vkCmdSetStencilCompareMask; PFN_vkCmdSetStencilReference vkCmdSetStencilReference; PFN_vkCmdSetStencilWriteMask vkCmdSetStencilWriteMask; PFN_vkCmdSetViewport vkCmdSetViewport; PFN_vkCmdUpdateBuffer vkCmdUpdateBuffer; PFN_vkCmdWaitEvents vkCmdWaitEvents; PFN_vkCmdWriteTimestamp vkCmdWriteTimestamp; PFN_vkCreateBuffer vkCreateBuffer; PFN_vkCreateBufferView vkCreateBufferView; PFN_vkCreateCommandPool vkCreateCommandPool; PFN_vkCreateComputePipelines vkCreateComputePipelines; PFN_vkCreateDescriptorPool vkCreateDescriptorPool; PFN_vkCreateDescriptorSetLayout vkCreateDescriptorSetLayout; PFN_vkCreateDevice vkCreateDevice; PFN_vkCreateEvent vkCreateEvent; PFN_vkCreateFence vkCreateFence; PFN_vkCreateFramebuffer vkCreateFramebuffer; PFN_vkCreateGraphicsPipelines vkCreateGraphicsPipelines; PFN_vkCreateImage vkCreateImage; PFN_vkCreateImageView vkCreateImageView; PFN_vkCreateInstance vkCreateInstance; PFN_vkCreatePipelineCache vkCreatePipelineCache; PFN_vkCreatePipelineLayout vkCreatePipelineLayout; PFN_vkCreateQueryPool vkCreateQueryPool; PFN_vkCreateRenderPass vkCreateRenderPass; PFN_vkCreateSampler vkCreateSampler; PFN_vkCreateSemaphore vkCreateSemaphore; PFN_vkCreateShaderModule vkCreateShaderModule; PFN_vkDestroyBuffer vkDestroyBuffer; PFN_vkDestroyBufferView vkDestroyBufferView; PFN_vkDestroyCommandPool vkDestroyCommandPool; PFN_vkDestroyDescriptorPool vkDestroyDescriptorPool; PFN_vkDestroyDescriptorSetLayout vkDestroyDescriptorSetLayout; PFN_vkDestroyDevice vkDestroyDevice; PFN_vkDestroyEvent vkDestroyEvent; PFN_vkDestroyFence vkDestroyFence; PFN_vkDestroyFramebuffer vkDestroyFramebuffer; PFN_vkDestroyImage vkDestroyImage; PFN_vkDestroyImageView vkDestroyImageView; PFN_vkDestroyInstance vkDestroyInstance; PFN_vkDestroyPipeline vkDestroyPipeline; PFN_vkDestroyPipelineCache vkDestroyPipelineCache; PFN_vkDestroyPipelineLayout vkDestroyPipelineLayout; PFN_vkDestroyQueryPool vkDestroyQueryPool; PFN_vkDestroyRenderPass vkDestroyRenderPass; PFN_vkDestroySampler vkDestroySampler; PFN_vkDestroySemaphore vkDestroySemaphore; PFN_vkDestroyShaderModule vkDestroyShaderModule; PFN_vkDeviceWaitIdle vkDeviceWaitIdle; PFN_vkEndCommandBuffer vkEndCommandBuffer; PFN_vkEnumerateDeviceExtensionProperties vkEnumerateDeviceExtensionProperties; PFN_vkEnumerateDeviceLayerProperties vkEnumerateDeviceLayerProperties; PFN_vkEnumerateInstanceExtensionProperties vkEnumerateInstanceExtensionProperties; PFN_vkEnumerateInstanceLayerProperties vkEnumerateInstanceLayerProperties; PFN_vkEnumeratePhysicalDevices vkEnumeratePhysicalDevices; PFN_vkFlushMappedMemoryRanges vkFlushMappedMemoryRanges; PFN_vkFreeCommandBuffers vkFreeCommandBuffers; PFN_vkFreeDescriptorSets vkFreeDescriptorSets; PFN_vkFreeMemory vkFreeMemory; PFN_vkGetBufferMemoryRequirements vkGetBufferMemoryRequirements; PFN_vkGetDeviceMemoryCommitment vkGetDeviceMemoryCommitment; PFN_vkGetDeviceProcAddr vkGetDeviceProcAddr; PFN_vkGetDeviceQueue vkGetDeviceQueue; PFN_vkGetEventStatus vkGetEventStatus; PFN_vkGetFenceStatus vkGetFenceStatus; PFN_vkGetImageMemoryRequirements vkGetImageMemoryRequirements; PFN_vkGetImageSparseMemoryRequirements vkGetImageSparseMemoryRequirements; PFN_vkGetImageSubresourceLayout vkGetImageSubresourceLayout; PFN_vkGetInstanceProcAddr vkGetInstanceProcAddr; PFN_vkGetPhysicalDeviceFeatures vkGetPhysicalDeviceFeatures; PFN_vkGetPhysicalDeviceFormatProperties vkGetPhysicalDeviceFormatProperties; PFN_vkGetPhysicalDeviceImageFormatProperties vkGetPhysicalDeviceImageFormatProperties; PFN_vkGetPhysicalDeviceMemoryProperties vkGetPhysicalDeviceMemoryProperties; PFN_vkGetPhysicalDeviceProperties vkGetPhysicalDeviceProperties; PFN_vkGetPhysicalDeviceQueueFamilyProperties vkGetPhysicalDeviceQueueFamilyProperties; PFN_vkGetPhysicalDeviceSparseImageFormatProperties vkGetPhysicalDeviceSparseImageFormatProperties; PFN_vkGetPipelineCacheData vkGetPipelineCacheData; PFN_vkGetQueryPoolResults vkGetQueryPoolResults; PFN_vkGetRenderAreaGranularity vkGetRenderAreaGranularity; PFN_vkInvalidateMappedMemoryRanges vkInvalidateMappedMemoryRanges; PFN_vkMapMemory vkMapMemory; PFN_vkMergePipelineCaches vkMergePipelineCaches; PFN_vkQueueBindSparse vkQueueBindSparse; PFN_vkQueueSubmit vkQueueSubmit; PFN_vkQueueWaitIdle vkQueueWaitIdle; PFN_vkResetCommandBuffer vkResetCommandBuffer; PFN_vkResetCommandPool vkResetCommandPool; PFN_vkResetDescriptorPool vkResetDescriptorPool; PFN_vkResetEvent vkResetEvent; PFN_vkResetFences vkResetFences; PFN_vkSetEvent vkSetEvent; PFN_vkUnmapMemory vkUnmapMemory; PFN_vkUpdateDescriptorSets vkUpdateDescriptorSets; PFN_vkWaitForFences vkWaitForFences; #endif /* defined(VK_VERSION_1_0) */ #if defined(VK_VERSION_1_1) PFN_vkBindBufferMemory2 vkBindBufferMemory2; PFN_vkBindImageMemory2 vkBindImageMemory2; PFN_vkCmdDispatchBase vkCmdDispatchBase; PFN_vkCmdSetDeviceMask vkCmdSetDeviceMask; PFN_vkCreateDescriptorUpdateTemplate vkCreateDescriptorUpdateTemplate; PFN_vkCreateSamplerYcbcrConversion vkCreateSamplerYcbcrConversion; PFN_vkDestroyDescriptorUpdateTemplate vkDestroyDescriptorUpdateTemplate; PFN_vkDestroySamplerYcbcrConversion vkDestroySamplerYcbcrConversion; PFN_vkEnumerateInstanceVersion vkEnumerateInstanceVersion; PFN_vkEnumeratePhysicalDeviceGroups vkEnumeratePhysicalDeviceGroups; PFN_vkGetBufferMemoryRequirements2 vkGetBufferMemoryRequirements2; PFN_vkGetDescriptorSetLayoutSupport vkGetDescriptorSetLayoutSupport; PFN_vkGetDeviceGroupPeerMemoryFeatures vkGetDeviceGroupPeerMemoryFeatures; PFN_vkGetDeviceQueue2 vkGetDeviceQueue2; PFN_vkGetImageMemoryRequirements2 vkGetImageMemoryRequirements2; PFN_vkGetImageSparseMemoryRequirements2 vkGetImageSparseMemoryRequirements2; PFN_vkGetPhysicalDeviceExternalBufferProperties vkGetPhysicalDeviceExternalBufferProperties; PFN_vkGetPhysicalDeviceExternalFenceProperties vkGetPhysicalDeviceExternalFenceProperties; PFN_vkGetPhysicalDeviceExternalSemaphoreProperties vkGetPhysicalDeviceExternalSemaphoreProperties; PFN_vkGetPhysicalDeviceFeatures2 vkGetPhysicalDeviceFeatures2; PFN_vkGetPhysicalDeviceFormatProperties2 vkGetPhysicalDeviceFormatProperties2; PFN_vkGetPhysicalDeviceImageFormatProperties2 vkGetPhysicalDeviceImageFormatProperties2; PFN_vkGetPhysicalDeviceMemoryProperties2 vkGetPhysicalDeviceMemoryProperties2; PFN_vkGetPhysicalDeviceProperties2 vkGetPhysicalDeviceProperties2; PFN_vkGetPhysicalDeviceQueueFamilyProperties2 vkGetPhysicalDeviceQueueFamilyProperties2; PFN_vkGetPhysicalDeviceSparseImageFormatProperties2 vkGetPhysicalDeviceSparseImageFormatProperties2; PFN_vkTrimCommandPool vkTrimCommandPool; PFN_vkUpdateDescriptorSetWithTemplate vkUpdateDescriptorSetWithTemplate; #endif /* defined(VK_VERSION_1_1) */ #if defined(VK_VERSION_1_2) PFN_vkCmdBeginRenderPass2 vkCmdBeginRenderPass2; PFN_vkCmdDrawIndexedIndirectCount vkCmdDrawIndexedIndirectCount; PFN_vkCmdDrawIndirectCount vkCmdDrawIndirectCount; PFN_vkCmdEndRenderPass2 vkCmdEndRenderPass2; PFN_vkCmdNextSubpass2 vkCmdNextSubpass2; PFN_vkCreateRenderPass2 vkCreateRenderPass2; PFN_vkGetBufferDeviceAddress vkGetBufferDeviceAddress; PFN_vkGetBufferOpaqueCaptureAddress vkGetBufferOpaqueCaptureAddress; PFN_vkGetDeviceMemoryOpaqueCaptureAddress vkGetDeviceMemoryOpaqueCaptureAddress; PFN_vkGetSemaphoreCounterValue vkGetSemaphoreCounterValue; PFN_vkResetQueryPool vkResetQueryPool; PFN_vkSignalSemaphore vkSignalSemaphore; PFN_vkWaitSemaphores vkWaitSemaphores; #endif /* defined(VK_VERSION_1_2) */ #if defined(VK_VERSION_1_3) PFN_vkCmdBeginRendering vkCmdBeginRendering; PFN_vkCmdBindVertexBuffers2 vkCmdBindVertexBuffers2; PFN_vkCmdBlitImage2 vkCmdBlitImage2; PFN_vkCmdCopyBuffer2 vkCmdCopyBuffer2; PFN_vkCmdCopyBufferToImage2 vkCmdCopyBufferToImage2; PFN_vkCmdCopyImage2 vkCmdCopyImage2; PFN_vkCmdCopyImageToBuffer2 vkCmdCopyImageToBuffer2; PFN_vkCmdEndRendering vkCmdEndRendering; PFN_vkCmdPipelineBarrier2 vkCmdPipelineBarrier2; PFN_vkCmdResetEvent2 vkCmdResetEvent2; PFN_vkCmdResolveImage2 vkCmdResolveImage2; PFN_vkCmdSetCullMode vkCmdSetCullMode; PFN_vkCmdSetDepthBiasEnable vkCmdSetDepthBiasEnable; PFN_vkCmdSetDepthBoundsTestEnable vkCmdSetDepthBoundsTestEnable; PFN_vkCmdSetDepthCompareOp vkCmdSetDepthCompareOp; PFN_vkCmdSetDepthTestEnable vkCmdSetDepthTestEnable; PFN_vkCmdSetDepthWriteEnable vkCmdSetDepthWriteEnable; PFN_vkCmdSetEvent2 vkCmdSetEvent2; PFN_vkCmdSetFrontFace vkCmdSetFrontFace; PFN_vkCmdSetPrimitiveRestartEnable vkCmdSetPrimitiveRestartEnable; PFN_vkCmdSetPrimitiveTopology vkCmdSetPrimitiveTopology; PFN_vkCmdSetRasterizerDiscardEnable vkCmdSetRasterizerDiscardEnable; PFN_vkCmdSetScissorWithCount vkCmdSetScissorWithCount; PFN_vkCmdSetStencilOp vkCmdSetStencilOp; PFN_vkCmdSetStencilTestEnable vkCmdSetStencilTestEnable; PFN_vkCmdSetViewportWithCount vkCmdSetViewportWithCount; PFN_vkCmdWaitEvents2 vkCmdWaitEvents2; PFN_vkCmdWriteTimestamp2 vkCmdWriteTimestamp2; PFN_vkCreatePrivateDataSlot vkCreatePrivateDataSlot; PFN_vkDestroyPrivateDataSlot vkDestroyPrivateDataSlot; PFN_vkGetDeviceBufferMemoryRequirements vkGetDeviceBufferMemoryRequirements; PFN_vkGetDeviceImageMemoryRequirements vkGetDeviceImageMemoryRequirements; PFN_vkGetDeviceImageSparseMemoryRequirements vkGetDeviceImageSparseMemoryRequirements; PFN_vkGetPhysicalDeviceToolProperties vkGetPhysicalDeviceToolProperties; PFN_vkGetPrivateData vkGetPrivateData; PFN_vkQueueSubmit2 vkQueueSubmit2; PFN_vkSetPrivateData vkSetPrivateData; #endif /* defined(VK_VERSION_1_3) */ #if defined(VK_VERSION_1_4) PFN_vkCmdBindDescriptorSets2 vkCmdBindDescriptorSets2; PFN_vkCmdBindIndexBuffer2 vkCmdBindIndexBuffer2; PFN_vkCmdPushConstants2 vkCmdPushConstants2; PFN_vkCmdPushDescriptorSet vkCmdPushDescriptorSet; PFN_vkCmdPushDescriptorSet2 vkCmdPushDescriptorSet2; PFN_vkCmdPushDescriptorSetWithTemplate vkCmdPushDescriptorSetWithTemplate; PFN_vkCmdPushDescriptorSetWithTemplate2 vkCmdPushDescriptorSetWithTemplate2; PFN_vkCmdSetLineStipple vkCmdSetLineStipple; PFN_vkCmdSetRenderingAttachmentLocations vkCmdSetRenderingAttachmentLocations; PFN_vkCmdSetRenderingInputAttachmentIndices vkCmdSetRenderingInputAttachmentIndices; PFN_vkCopyImageToImage vkCopyImageToImage; PFN_vkCopyImageToMemory vkCopyImageToMemory; PFN_vkCopyMemoryToImage vkCopyMemoryToImage; PFN_vkGetDeviceImageSubresourceLayout vkGetDeviceImageSubresourceLayout; PFN_vkGetImageSubresourceLayout2 vkGetImageSubresourceLayout2; PFN_vkGetRenderingAreaGranularity vkGetRenderingAreaGranularity; PFN_vkMapMemory2 vkMapMemory2; PFN_vkTransitionImageLayout vkTransitionImageLayout; PFN_vkUnmapMemory2 vkUnmapMemory2; #endif /* defined(VK_VERSION_1_4) */ #if defined(VK_AMDX_shader_enqueue) PFN_vkCmdDispatchGraphAMDX vkCmdDispatchGraphAMDX; PFN_vkCmdDispatchGraphIndirectAMDX vkCmdDispatchGraphIndirectAMDX; PFN_vkCmdDispatchGraphIndirectCountAMDX vkCmdDispatchGraphIndirectCountAMDX; PFN_vkCmdInitializeGraphScratchMemoryAMDX vkCmdInitializeGraphScratchMemoryAMDX; PFN_vkCreateExecutionGraphPipelinesAMDX vkCreateExecutionGraphPipelinesAMDX; PFN_vkGetExecutionGraphPipelineNodeIndexAMDX vkGetExecutionGraphPipelineNodeIndexAMDX; PFN_vkGetExecutionGraphPipelineScratchSizeAMDX vkGetExecutionGraphPipelineScratchSizeAMDX; #endif /* defined(VK_AMDX_shader_enqueue) */ #if defined(VK_AMD_anti_lag) PFN_vkAntiLagUpdateAMD vkAntiLagUpdateAMD; #endif /* defined(VK_AMD_anti_lag) */ #if defined(VK_AMD_buffer_marker) PFN_vkCmdWriteBufferMarkerAMD vkCmdWriteBufferMarkerAMD; #endif /* defined(VK_AMD_buffer_marker) */ #if defined(VK_AMD_buffer_marker) && (defined(VK_VERSION_1_3) || defined(VK_KHR_synchronization2)) PFN_vkCmdWriteBufferMarker2AMD vkCmdWriteBufferMarker2AMD; #endif /* defined(VK_AMD_buffer_marker) && (defined(VK_VERSION_1_3) || defined(VK_KHR_synchronization2)) */ #if defined(VK_AMD_display_native_hdr) PFN_vkSetLocalDimmingAMD vkSetLocalDimmingAMD; #endif /* defined(VK_AMD_display_native_hdr) */ #if defined(VK_AMD_draw_indirect_count) PFN_vkCmdDrawIndexedIndirectCountAMD vkCmdDrawIndexedIndirectCountAMD; PFN_vkCmdDrawIndirectCountAMD vkCmdDrawIndirectCountAMD; #endif /* defined(VK_AMD_draw_indirect_count) */ #if defined(VK_AMD_shader_info) PFN_vkGetShaderInfoAMD vkGetShaderInfoAMD; #endif /* defined(VK_AMD_shader_info) */ #if defined(VK_ANDROID_external_memory_android_hardware_buffer) PFN_vkGetAndroidHardwareBufferPropertiesANDROID vkGetAndroidHardwareBufferPropertiesANDROID; PFN_vkGetMemoryAndroidHardwareBufferANDROID vkGetMemoryAndroidHardwareBufferANDROID; #endif /* defined(VK_ANDROID_external_memory_android_hardware_buffer) */ #if defined(VK_EXT_acquire_drm_display) PFN_vkAcquireDrmDisplayEXT vkAcquireDrmDisplayEXT; PFN_vkGetDrmDisplayEXT vkGetDrmDisplayEXT; #endif /* defined(VK_EXT_acquire_drm_display) */ #if defined(VK_EXT_acquire_xlib_display) PFN_vkAcquireXlibDisplayEXT vkAcquireXlibDisplayEXT; PFN_vkGetRandROutputDisplayEXT vkGetRandROutputDisplayEXT; #endif /* defined(VK_EXT_acquire_xlib_display) */ #if defined(VK_EXT_attachment_feedback_loop_dynamic_state) PFN_vkCmdSetAttachmentFeedbackLoopEnableEXT vkCmdSetAttachmentFeedbackLoopEnableEXT; #endif /* defined(VK_EXT_attachment_feedback_loop_dynamic_state) */ #if defined(VK_EXT_buffer_device_address) PFN_vkGetBufferDeviceAddressEXT vkGetBufferDeviceAddressEXT; #endif /* defined(VK_EXT_buffer_device_address) */ #if defined(VK_EXT_calibrated_timestamps) PFN_vkGetCalibratedTimestampsEXT vkGetCalibratedTimestampsEXT; PFN_vkGetPhysicalDeviceCalibrateableTimeDomainsEXT vkGetPhysicalDeviceCalibrateableTimeDomainsEXT; #endif /* defined(VK_EXT_calibrated_timestamps) */ #if defined(VK_EXT_color_write_enable) PFN_vkCmdSetColorWriteEnableEXT vkCmdSetColorWriteEnableEXT; #endif /* defined(VK_EXT_color_write_enable) */ #if defined(VK_EXT_conditional_rendering) PFN_vkCmdBeginConditionalRenderingEXT vkCmdBeginConditionalRenderingEXT; PFN_vkCmdEndConditionalRenderingEXT vkCmdEndConditionalRenderingEXT; #endif /* defined(VK_EXT_conditional_rendering) */ #if defined(VK_EXT_debug_marker) PFN_vkCmdDebugMarkerBeginEXT vkCmdDebugMarkerBeginEXT; PFN_vkCmdDebugMarkerEndEXT vkCmdDebugMarkerEndEXT; PFN_vkCmdDebugMarkerInsertEXT vkCmdDebugMarkerInsertEXT; PFN_vkDebugMarkerSetObjectNameEXT vkDebugMarkerSetObjectNameEXT; PFN_vkDebugMarkerSetObjectTagEXT vkDebugMarkerSetObjectTagEXT; #endif /* defined(VK_EXT_debug_marker) */ #if defined(VK_EXT_debug_report) PFN_vkCreateDebugReportCallbackEXT vkCreateDebugReportCallbackEXT; PFN_vkDebugReportMessageEXT vkDebugReportMessageEXT; PFN_vkDestroyDebugReportCallbackEXT vkDestroyDebugReportCallbackEXT; #endif /* defined(VK_EXT_debug_report) */ #if defined(VK_EXT_debug_utils) PFN_vkCmdBeginDebugUtilsLabelEXT vkCmdBeginDebugUtilsLabelEXT; PFN_vkCmdEndDebugUtilsLabelEXT vkCmdEndDebugUtilsLabelEXT; PFN_vkCmdInsertDebugUtilsLabelEXT vkCmdInsertDebugUtilsLabelEXT; PFN_vkCreateDebugUtilsMessengerEXT vkCreateDebugUtilsMessengerEXT; PFN_vkDestroyDebugUtilsMessengerEXT vkDestroyDebugUtilsMessengerEXT; PFN_vkQueueBeginDebugUtilsLabelEXT vkQueueBeginDebugUtilsLabelEXT; PFN_vkQueueEndDebugUtilsLabelEXT vkQueueEndDebugUtilsLabelEXT; PFN_vkQueueInsertDebugUtilsLabelEXT vkQueueInsertDebugUtilsLabelEXT; PFN_vkSetDebugUtilsObjectNameEXT vkSetDebugUtilsObjectNameEXT; PFN_vkSetDebugUtilsObjectTagEXT vkSetDebugUtilsObjectTagEXT; PFN_vkSubmitDebugUtilsMessageEXT vkSubmitDebugUtilsMessageEXT; #endif /* defined(VK_EXT_debug_utils) */ #if defined(VK_EXT_depth_bias_control) PFN_vkCmdSetDepthBias2EXT vkCmdSetDepthBias2EXT; #endif /* defined(VK_EXT_depth_bias_control) */ #if defined(VK_EXT_descriptor_buffer) PFN_vkCmdBindDescriptorBufferEmbeddedSamplersEXT vkCmdBindDescriptorBufferEmbeddedSamplersEXT; PFN_vkCmdBindDescriptorBuffersEXT vkCmdBindDescriptorBuffersEXT; PFN_vkCmdSetDescriptorBufferOffsetsEXT vkCmdSetDescriptorBufferOffsetsEXT; PFN_vkGetBufferOpaqueCaptureDescriptorDataEXT vkGetBufferOpaqueCaptureDescriptorDataEXT; PFN_vkGetDescriptorEXT vkGetDescriptorEXT; PFN_vkGetDescriptorSetLayoutBindingOffsetEXT vkGetDescriptorSetLayoutBindingOffsetEXT; PFN_vkGetDescriptorSetLayoutSizeEXT vkGetDescriptorSetLayoutSizeEXT; PFN_vkGetImageOpaqueCaptureDescriptorDataEXT vkGetImageOpaqueCaptureDescriptorDataEXT; PFN_vkGetImageViewOpaqueCaptureDescriptorDataEXT vkGetImageViewOpaqueCaptureDescriptorDataEXT; PFN_vkGetSamplerOpaqueCaptureDescriptorDataEXT vkGetSamplerOpaqueCaptureDescriptorDataEXT; #endif /* defined(VK_EXT_descriptor_buffer) */ #if defined(VK_EXT_descriptor_buffer) && (defined(VK_KHR_acceleration_structure) || defined(VK_NV_ray_tracing)) PFN_vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT; #endif /* defined(VK_EXT_descriptor_buffer) && (defined(VK_KHR_acceleration_structure) || defined(VK_NV_ray_tracing)) */ #if defined(VK_EXT_device_fault) PFN_vkGetDeviceFaultInfoEXT vkGetDeviceFaultInfoEXT; #endif /* defined(VK_EXT_device_fault) */ #if defined(VK_EXT_device_generated_commands) PFN_vkCmdExecuteGeneratedCommandsEXT vkCmdExecuteGeneratedCommandsEXT; PFN_vkCmdPreprocessGeneratedCommandsEXT vkCmdPreprocessGeneratedCommandsEXT; PFN_vkCreateIndirectCommandsLayoutEXT vkCreateIndirectCommandsLayoutEXT; PFN_vkCreateIndirectExecutionSetEXT vkCreateIndirectExecutionSetEXT; PFN_vkDestroyIndirectCommandsLayoutEXT vkDestroyIndirectCommandsLayoutEXT; PFN_vkDestroyIndirectExecutionSetEXT vkDestroyIndirectExecutionSetEXT; PFN_vkGetGeneratedCommandsMemoryRequirementsEXT vkGetGeneratedCommandsMemoryRequirementsEXT; PFN_vkUpdateIndirectExecutionSetPipelineEXT vkUpdateIndirectExecutionSetPipelineEXT; PFN_vkUpdateIndirectExecutionSetShaderEXT vkUpdateIndirectExecutionSetShaderEXT; #endif /* defined(VK_EXT_device_generated_commands) */ #if defined(VK_EXT_direct_mode_display) PFN_vkReleaseDisplayEXT vkReleaseDisplayEXT; #endif /* defined(VK_EXT_direct_mode_display) */ #if defined(VK_EXT_directfb_surface) PFN_vkCreateDirectFBSurfaceEXT vkCreateDirectFBSurfaceEXT; PFN_vkGetPhysicalDeviceDirectFBPresentationSupportEXT vkGetPhysicalDeviceDirectFBPresentationSupportEXT; #endif /* defined(VK_EXT_directfb_surface) */ #if defined(VK_EXT_discard_rectangles) PFN_vkCmdSetDiscardRectangleEXT vkCmdSetDiscardRectangleEXT; #endif /* defined(VK_EXT_discard_rectangles) */ #if defined(VK_EXT_discard_rectangles) && VK_EXT_DISCARD_RECTANGLES_SPEC_VERSION >= 2 PFN_vkCmdSetDiscardRectangleEnableEXT vkCmdSetDiscardRectangleEnableEXT; PFN_vkCmdSetDiscardRectangleModeEXT vkCmdSetDiscardRectangleModeEXT; #endif /* defined(VK_EXT_discard_rectangles) && VK_EXT_DISCARD_RECTANGLES_SPEC_VERSION >= 2 */ #if defined(VK_EXT_display_control) PFN_vkDisplayPowerControlEXT vkDisplayPowerControlEXT; PFN_vkGetSwapchainCounterEXT vkGetSwapchainCounterEXT; PFN_vkRegisterDeviceEventEXT vkRegisterDeviceEventEXT; PFN_vkRegisterDisplayEventEXT vkRegisterDisplayEventEXT; #endif /* defined(VK_EXT_display_control) */ #if defined(VK_EXT_display_surface_counter) PFN_vkGetPhysicalDeviceSurfaceCapabilities2EXT vkGetPhysicalDeviceSurfaceCapabilities2EXT; #endif /* defined(VK_EXT_display_surface_counter) */ #if defined(VK_EXT_external_memory_host) PFN_vkGetMemoryHostPointerPropertiesEXT vkGetMemoryHostPointerPropertiesEXT; #endif /* defined(VK_EXT_external_memory_host) */ #if defined(VK_EXT_external_memory_metal) PFN_vkGetMemoryMetalHandleEXT vkGetMemoryMetalHandleEXT; PFN_vkGetMemoryMetalHandlePropertiesEXT vkGetMemoryMetalHandlePropertiesEXT; #endif /* defined(VK_EXT_external_memory_metal) */ #if defined(VK_EXT_full_screen_exclusive) PFN_vkAcquireFullScreenExclusiveModeEXT vkAcquireFullScreenExclusiveModeEXT; PFN_vkGetPhysicalDeviceSurfacePresentModes2EXT vkGetPhysicalDeviceSurfacePresentModes2EXT; PFN_vkReleaseFullScreenExclusiveModeEXT vkReleaseFullScreenExclusiveModeEXT; #endif /* defined(VK_EXT_full_screen_exclusive) */ #if defined(VK_EXT_full_screen_exclusive) && (defined(VK_KHR_device_group) || defined(VK_VERSION_1_1)) PFN_vkGetDeviceGroupSurfacePresentModes2EXT vkGetDeviceGroupSurfacePresentModes2EXT; #endif /* defined(VK_EXT_full_screen_exclusive) && (defined(VK_KHR_device_group) || defined(VK_VERSION_1_1)) */ #if defined(VK_EXT_hdr_metadata) PFN_vkSetHdrMetadataEXT vkSetHdrMetadataEXT; #endif /* defined(VK_EXT_hdr_metadata) */ #if defined(VK_EXT_headless_surface) PFN_vkCreateHeadlessSurfaceEXT vkCreateHeadlessSurfaceEXT; #endif /* defined(VK_EXT_headless_surface) */ #if defined(VK_EXT_host_image_copy) PFN_vkCopyImageToImageEXT vkCopyImageToImageEXT; PFN_vkCopyImageToMemoryEXT vkCopyImageToMemoryEXT; PFN_vkCopyMemoryToImageEXT vkCopyMemoryToImageEXT; PFN_vkTransitionImageLayoutEXT vkTransitionImageLayoutEXT; #endif /* defined(VK_EXT_host_image_copy) */ #if defined(VK_EXT_host_query_reset) PFN_vkResetQueryPoolEXT vkResetQueryPoolEXT; #endif /* defined(VK_EXT_host_query_reset) */ #if defined(VK_EXT_image_drm_format_modifier) PFN_vkGetImageDrmFormatModifierPropertiesEXT vkGetImageDrmFormatModifierPropertiesEXT; #endif /* defined(VK_EXT_image_drm_format_modifier) */ #if defined(VK_EXT_line_rasterization) PFN_vkCmdSetLineStippleEXT vkCmdSetLineStippleEXT; #endif /* defined(VK_EXT_line_rasterization) */ #if defined(VK_EXT_mesh_shader) PFN_vkCmdDrawMeshTasksEXT vkCmdDrawMeshTasksEXT; PFN_vkCmdDrawMeshTasksIndirectEXT vkCmdDrawMeshTasksIndirectEXT; #endif /* defined(VK_EXT_mesh_shader) */ #if defined(VK_EXT_mesh_shader) && (defined(VK_KHR_draw_indirect_count) || defined(VK_VERSION_1_2)) PFN_vkCmdDrawMeshTasksIndirectCountEXT vkCmdDrawMeshTasksIndirectCountEXT; #endif /* defined(VK_EXT_mesh_shader) && (defined(VK_KHR_draw_indirect_count) || defined(VK_VERSION_1_2)) */ #if defined(VK_EXT_metal_objects) PFN_vkExportMetalObjectsEXT vkExportMetalObjectsEXT; #endif /* defined(VK_EXT_metal_objects) */ #if defined(VK_EXT_metal_surface) PFN_vkCreateMetalSurfaceEXT vkCreateMetalSurfaceEXT; #endif /* defined(VK_EXT_metal_surface) */ #if defined(VK_EXT_multi_draw) PFN_vkCmdDrawMultiEXT vkCmdDrawMultiEXT; PFN_vkCmdDrawMultiIndexedEXT vkCmdDrawMultiIndexedEXT; #endif /* defined(VK_EXT_multi_draw) */ #if defined(VK_EXT_opacity_micromap) PFN_vkBuildMicromapsEXT vkBuildMicromapsEXT; PFN_vkCmdBuildMicromapsEXT vkCmdBuildMicromapsEXT; PFN_vkCmdCopyMemoryToMicromapEXT vkCmdCopyMemoryToMicromapEXT; PFN_vkCmdCopyMicromapEXT vkCmdCopyMicromapEXT; PFN_vkCmdCopyMicromapToMemoryEXT vkCmdCopyMicromapToMemoryEXT; PFN_vkCmdWriteMicromapsPropertiesEXT vkCmdWriteMicromapsPropertiesEXT; PFN_vkCopyMemoryToMicromapEXT vkCopyMemoryToMicromapEXT; PFN_vkCopyMicromapEXT vkCopyMicromapEXT; PFN_vkCopyMicromapToMemoryEXT vkCopyMicromapToMemoryEXT; PFN_vkCreateMicromapEXT vkCreateMicromapEXT; PFN_vkDestroyMicromapEXT vkDestroyMicromapEXT; PFN_vkGetDeviceMicromapCompatibilityEXT vkGetDeviceMicromapCompatibilityEXT; PFN_vkGetMicromapBuildSizesEXT vkGetMicromapBuildSizesEXT; PFN_vkWriteMicromapsPropertiesEXT vkWriteMicromapsPropertiesEXT; #endif /* defined(VK_EXT_opacity_micromap) */ #if defined(VK_EXT_pageable_device_local_memory) PFN_vkSetDeviceMemoryPriorityEXT vkSetDeviceMemoryPriorityEXT; #endif /* defined(VK_EXT_pageable_device_local_memory) */ #if defined(VK_EXT_pipeline_properties) PFN_vkGetPipelinePropertiesEXT vkGetPipelinePropertiesEXT; #endif /* defined(VK_EXT_pipeline_properties) */ #if defined(VK_EXT_private_data) PFN_vkCreatePrivateDataSlotEXT vkCreatePrivateDataSlotEXT; PFN_vkDestroyPrivateDataSlotEXT vkDestroyPrivateDataSlotEXT; PFN_vkGetPrivateDataEXT vkGetPrivateDataEXT; PFN_vkSetPrivateDataEXT vkSetPrivateDataEXT; #endif /* defined(VK_EXT_private_data) */ #if defined(VK_EXT_sample_locations) PFN_vkCmdSetSampleLocationsEXT vkCmdSetSampleLocationsEXT; PFN_vkGetPhysicalDeviceMultisamplePropertiesEXT vkGetPhysicalDeviceMultisamplePropertiesEXT; #endif /* defined(VK_EXT_sample_locations) */ #if defined(VK_EXT_shader_module_identifier) PFN_vkGetShaderModuleCreateInfoIdentifierEXT vkGetShaderModuleCreateInfoIdentifierEXT; PFN_vkGetShaderModuleIdentifierEXT vkGetShaderModuleIdentifierEXT; #endif /* defined(VK_EXT_shader_module_identifier) */ #if defined(VK_EXT_shader_object) PFN_vkCmdBindShadersEXT vkCmdBindShadersEXT; PFN_vkCreateShadersEXT vkCreateShadersEXT; PFN_vkDestroyShaderEXT vkDestroyShaderEXT; PFN_vkGetShaderBinaryDataEXT vkGetShaderBinaryDataEXT; #endif /* defined(VK_EXT_shader_object) */ #if defined(VK_EXT_swapchain_maintenance1) PFN_vkReleaseSwapchainImagesEXT vkReleaseSwapchainImagesEXT; #endif /* defined(VK_EXT_swapchain_maintenance1) */ #if defined(VK_EXT_tooling_info) PFN_vkGetPhysicalDeviceToolPropertiesEXT vkGetPhysicalDeviceToolPropertiesEXT; #endif /* defined(VK_EXT_tooling_info) */ #if defined(VK_EXT_transform_feedback) PFN_vkCmdBeginQueryIndexedEXT vkCmdBeginQueryIndexedEXT; PFN_vkCmdBeginTransformFeedbackEXT vkCmdBeginTransformFeedbackEXT; PFN_vkCmdBindTransformFeedbackBuffersEXT vkCmdBindTransformFeedbackBuffersEXT; PFN_vkCmdDrawIndirectByteCountEXT vkCmdDrawIndirectByteCountEXT; PFN_vkCmdEndQueryIndexedEXT vkCmdEndQueryIndexedEXT; PFN_vkCmdEndTransformFeedbackEXT vkCmdEndTransformFeedbackEXT; #endif /* defined(VK_EXT_transform_feedback) */ #if defined(VK_EXT_validation_cache) PFN_vkCreateValidationCacheEXT vkCreateValidationCacheEXT; PFN_vkDestroyValidationCacheEXT vkDestroyValidationCacheEXT; PFN_vkGetValidationCacheDataEXT vkGetValidationCacheDataEXT; PFN_vkMergeValidationCachesEXT vkMergeValidationCachesEXT; #endif /* defined(VK_EXT_validation_cache) */ #if defined(VK_FUCHSIA_buffer_collection) PFN_vkCreateBufferCollectionFUCHSIA vkCreateBufferCollectionFUCHSIA; PFN_vkDestroyBufferCollectionFUCHSIA vkDestroyBufferCollectionFUCHSIA; PFN_vkGetBufferCollectionPropertiesFUCHSIA vkGetBufferCollectionPropertiesFUCHSIA; PFN_vkSetBufferCollectionBufferConstraintsFUCHSIA vkSetBufferCollectionBufferConstraintsFUCHSIA; PFN_vkSetBufferCollectionImageConstraintsFUCHSIA vkSetBufferCollectionImageConstraintsFUCHSIA; #endif /* defined(VK_FUCHSIA_buffer_collection) */ #if defined(VK_FUCHSIA_external_memory) PFN_vkGetMemoryZirconHandleFUCHSIA vkGetMemoryZirconHandleFUCHSIA; PFN_vkGetMemoryZirconHandlePropertiesFUCHSIA vkGetMemoryZirconHandlePropertiesFUCHSIA; #endif /* defined(VK_FUCHSIA_external_memory) */ #if defined(VK_FUCHSIA_external_semaphore) PFN_vkGetSemaphoreZirconHandleFUCHSIA vkGetSemaphoreZirconHandleFUCHSIA; PFN_vkImportSemaphoreZirconHandleFUCHSIA vkImportSemaphoreZirconHandleFUCHSIA; #endif /* defined(VK_FUCHSIA_external_semaphore) */ #if defined(VK_FUCHSIA_imagepipe_surface) PFN_vkCreateImagePipeSurfaceFUCHSIA vkCreateImagePipeSurfaceFUCHSIA; #endif /* defined(VK_FUCHSIA_imagepipe_surface) */ #if defined(VK_GGP_stream_descriptor_surface) PFN_vkCreateStreamDescriptorSurfaceGGP vkCreateStreamDescriptorSurfaceGGP; #endif /* defined(VK_GGP_stream_descriptor_surface) */ #if defined(VK_GOOGLE_display_timing) PFN_vkGetPastPresentationTimingGOOGLE vkGetPastPresentationTimingGOOGLE; PFN_vkGetRefreshCycleDurationGOOGLE vkGetRefreshCycleDurationGOOGLE; #endif /* defined(VK_GOOGLE_display_timing) */ #if defined(VK_HUAWEI_cluster_culling_shader) PFN_vkCmdDrawClusterHUAWEI vkCmdDrawClusterHUAWEI; PFN_vkCmdDrawClusterIndirectHUAWEI vkCmdDrawClusterIndirectHUAWEI; #endif /* defined(VK_HUAWEI_cluster_culling_shader) */ #if defined(VK_HUAWEI_invocation_mask) PFN_vkCmdBindInvocationMaskHUAWEI vkCmdBindInvocationMaskHUAWEI; #endif /* defined(VK_HUAWEI_invocation_mask) */ #if defined(VK_HUAWEI_subpass_shading) && VK_HUAWEI_SUBPASS_SHADING_SPEC_VERSION >= 2 PFN_vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI; #endif /* defined(VK_HUAWEI_subpass_shading) && VK_HUAWEI_SUBPASS_SHADING_SPEC_VERSION >= 2 */ #if defined(VK_HUAWEI_subpass_shading) PFN_vkCmdSubpassShadingHUAWEI vkCmdSubpassShadingHUAWEI; #endif /* defined(VK_HUAWEI_subpass_shading) */ #if defined(VK_INTEL_performance_query) PFN_vkAcquirePerformanceConfigurationINTEL vkAcquirePerformanceConfigurationINTEL; PFN_vkCmdSetPerformanceMarkerINTEL vkCmdSetPerformanceMarkerINTEL; PFN_vkCmdSetPerformanceOverrideINTEL vkCmdSetPerformanceOverrideINTEL; PFN_vkCmdSetPerformanceStreamMarkerINTEL vkCmdSetPerformanceStreamMarkerINTEL; PFN_vkGetPerformanceParameterINTEL vkGetPerformanceParameterINTEL; PFN_vkInitializePerformanceApiINTEL vkInitializePerformanceApiINTEL; PFN_vkQueueSetPerformanceConfigurationINTEL vkQueueSetPerformanceConfigurationINTEL; PFN_vkReleasePerformanceConfigurationINTEL vkReleasePerformanceConfigurationINTEL; PFN_vkUninitializePerformanceApiINTEL vkUninitializePerformanceApiINTEL; #endif /* defined(VK_INTEL_performance_query) */ #if defined(VK_KHR_acceleration_structure) PFN_vkBuildAccelerationStructuresKHR vkBuildAccelerationStructuresKHR; PFN_vkCmdBuildAccelerationStructuresIndirectKHR vkCmdBuildAccelerationStructuresIndirectKHR; PFN_vkCmdBuildAccelerationStructuresKHR vkCmdBuildAccelerationStructuresKHR; PFN_vkCmdCopyAccelerationStructureKHR vkCmdCopyAccelerationStructureKHR; PFN_vkCmdCopyAccelerationStructureToMemoryKHR vkCmdCopyAccelerationStructureToMemoryKHR; PFN_vkCmdCopyMemoryToAccelerationStructureKHR vkCmdCopyMemoryToAccelerationStructureKHR; PFN_vkCmdWriteAccelerationStructuresPropertiesKHR vkCmdWriteAccelerationStructuresPropertiesKHR; PFN_vkCopyAccelerationStructureKHR vkCopyAccelerationStructureKHR; PFN_vkCopyAccelerationStructureToMemoryKHR vkCopyAccelerationStructureToMemoryKHR; PFN_vkCopyMemoryToAccelerationStructureKHR vkCopyMemoryToAccelerationStructureKHR; PFN_vkCreateAccelerationStructureKHR vkCreateAccelerationStructureKHR; PFN_vkDestroyAccelerationStructureKHR vkDestroyAccelerationStructureKHR; PFN_vkGetAccelerationStructureBuildSizesKHR vkGetAccelerationStructureBuildSizesKHR; PFN_vkGetAccelerationStructureDeviceAddressKHR vkGetAccelerationStructureDeviceAddressKHR; PFN_vkGetDeviceAccelerationStructureCompatibilityKHR vkGetDeviceAccelerationStructureCompatibilityKHR; PFN_vkWriteAccelerationStructuresPropertiesKHR vkWriteAccelerationStructuresPropertiesKHR; #endif /* defined(VK_KHR_acceleration_structure) */ #if defined(VK_KHR_android_surface) PFN_vkCreateAndroidSurfaceKHR vkCreateAndroidSurfaceKHR; #endif /* defined(VK_KHR_android_surface) */ #if defined(VK_KHR_bind_memory2) PFN_vkBindBufferMemory2KHR vkBindBufferMemory2KHR; PFN_vkBindImageMemory2KHR vkBindImageMemory2KHR; #endif /* defined(VK_KHR_bind_memory2) */ #if defined(VK_KHR_buffer_device_address) PFN_vkGetBufferDeviceAddressKHR vkGetBufferDeviceAddressKHR; PFN_vkGetBufferOpaqueCaptureAddressKHR vkGetBufferOpaqueCaptureAddressKHR; PFN_vkGetDeviceMemoryOpaqueCaptureAddressKHR vkGetDeviceMemoryOpaqueCaptureAddressKHR; #endif /* defined(VK_KHR_buffer_device_address) */ #if defined(VK_KHR_calibrated_timestamps) PFN_vkGetCalibratedTimestampsKHR vkGetCalibratedTimestampsKHR; PFN_vkGetPhysicalDeviceCalibrateableTimeDomainsKHR vkGetPhysicalDeviceCalibrateableTimeDomainsKHR; #endif /* defined(VK_KHR_calibrated_timestamps) */ #if defined(VK_KHR_cooperative_matrix) PFN_vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR; #endif /* defined(VK_KHR_cooperative_matrix) */ #if defined(VK_KHR_copy_commands2) PFN_vkCmdBlitImage2KHR vkCmdBlitImage2KHR; PFN_vkCmdCopyBuffer2KHR vkCmdCopyBuffer2KHR; PFN_vkCmdCopyBufferToImage2KHR vkCmdCopyBufferToImage2KHR; PFN_vkCmdCopyImage2KHR vkCmdCopyImage2KHR; PFN_vkCmdCopyImageToBuffer2KHR vkCmdCopyImageToBuffer2KHR; PFN_vkCmdResolveImage2KHR vkCmdResolveImage2KHR; #endif /* defined(VK_KHR_copy_commands2) */ #if defined(VK_KHR_create_renderpass2) PFN_vkCmdBeginRenderPass2KHR vkCmdBeginRenderPass2KHR; PFN_vkCmdEndRenderPass2KHR vkCmdEndRenderPass2KHR; PFN_vkCmdNextSubpass2KHR vkCmdNextSubpass2KHR; PFN_vkCreateRenderPass2KHR vkCreateRenderPass2KHR; #endif /* defined(VK_KHR_create_renderpass2) */ #if defined(VK_KHR_deferred_host_operations) PFN_vkCreateDeferredOperationKHR vkCreateDeferredOperationKHR; PFN_vkDeferredOperationJoinKHR vkDeferredOperationJoinKHR; PFN_vkDestroyDeferredOperationKHR vkDestroyDeferredOperationKHR; PFN_vkGetDeferredOperationMaxConcurrencyKHR vkGetDeferredOperationMaxConcurrencyKHR; PFN_vkGetDeferredOperationResultKHR vkGetDeferredOperationResultKHR; #endif /* defined(VK_KHR_deferred_host_operations) */ #if defined(VK_KHR_descriptor_update_template) PFN_vkCreateDescriptorUpdateTemplateKHR vkCreateDescriptorUpdateTemplateKHR; PFN_vkDestroyDescriptorUpdateTemplateKHR vkDestroyDescriptorUpdateTemplateKHR; PFN_vkUpdateDescriptorSetWithTemplateKHR vkUpdateDescriptorSetWithTemplateKHR; #endif /* defined(VK_KHR_descriptor_update_template) */ #if defined(VK_KHR_device_group) PFN_vkCmdDispatchBaseKHR vkCmdDispatchBaseKHR; PFN_vkCmdSetDeviceMaskKHR vkCmdSetDeviceMaskKHR; PFN_vkGetDeviceGroupPeerMemoryFeaturesKHR vkGetDeviceGroupPeerMemoryFeaturesKHR; #endif /* defined(VK_KHR_device_group) */ #if defined(VK_KHR_device_group_creation) PFN_vkEnumeratePhysicalDeviceGroupsKHR vkEnumeratePhysicalDeviceGroupsKHR; #endif /* defined(VK_KHR_device_group_creation) */ #if defined(VK_KHR_display) PFN_vkCreateDisplayModeKHR vkCreateDisplayModeKHR; PFN_vkCreateDisplayPlaneSurfaceKHR vkCreateDisplayPlaneSurfaceKHR; PFN_vkGetDisplayModePropertiesKHR vkGetDisplayModePropertiesKHR; PFN_vkGetDisplayPlaneCapabilitiesKHR vkGetDisplayPlaneCapabilitiesKHR; PFN_vkGetDisplayPlaneSupportedDisplaysKHR vkGetDisplayPlaneSupportedDisplaysKHR; PFN_vkGetPhysicalDeviceDisplayPlanePropertiesKHR vkGetPhysicalDeviceDisplayPlanePropertiesKHR; PFN_vkGetPhysicalDeviceDisplayPropertiesKHR vkGetPhysicalDeviceDisplayPropertiesKHR; #endif /* defined(VK_KHR_display) */ #if defined(VK_KHR_display_swapchain) PFN_vkCreateSharedSwapchainsKHR vkCreateSharedSwapchainsKHR; #endif /* defined(VK_KHR_display_swapchain) */ #if defined(VK_KHR_draw_indirect_count) PFN_vkCmdDrawIndexedIndirectCountKHR vkCmdDrawIndexedIndirectCountKHR; PFN_vkCmdDrawIndirectCountKHR vkCmdDrawIndirectCountKHR; #endif /* defined(VK_KHR_draw_indirect_count) */ #if defined(VK_KHR_dynamic_rendering) PFN_vkCmdBeginRenderingKHR vkCmdBeginRenderingKHR; PFN_vkCmdEndRenderingKHR vkCmdEndRenderingKHR; #endif /* defined(VK_KHR_dynamic_rendering) */ #if defined(VK_KHR_dynamic_rendering_local_read) PFN_vkCmdSetRenderingAttachmentLocationsKHR vkCmdSetRenderingAttachmentLocationsKHR; PFN_vkCmdSetRenderingInputAttachmentIndicesKHR vkCmdSetRenderingInputAttachmentIndicesKHR; #endif /* defined(VK_KHR_dynamic_rendering_local_read) */ #if defined(VK_KHR_external_fence_capabilities) PFN_vkGetPhysicalDeviceExternalFencePropertiesKHR vkGetPhysicalDeviceExternalFencePropertiesKHR; #endif /* defined(VK_KHR_external_fence_capabilities) */ #if defined(VK_KHR_external_fence_fd) PFN_vkGetFenceFdKHR vkGetFenceFdKHR; PFN_vkImportFenceFdKHR vkImportFenceFdKHR; #endif /* defined(VK_KHR_external_fence_fd) */ #if defined(VK_KHR_external_fence_win32) PFN_vkGetFenceWin32HandleKHR vkGetFenceWin32HandleKHR; PFN_vkImportFenceWin32HandleKHR vkImportFenceWin32HandleKHR; #endif /* defined(VK_KHR_external_fence_win32) */ #if defined(VK_KHR_external_memory_capabilities) PFN_vkGetPhysicalDeviceExternalBufferPropertiesKHR vkGetPhysicalDeviceExternalBufferPropertiesKHR; #endif /* defined(VK_KHR_external_memory_capabilities) */ #if defined(VK_KHR_external_memory_fd) PFN_vkGetMemoryFdKHR vkGetMemoryFdKHR; PFN_vkGetMemoryFdPropertiesKHR vkGetMemoryFdPropertiesKHR; #endif /* defined(VK_KHR_external_memory_fd) */ #if defined(VK_KHR_external_memory_win32) PFN_vkGetMemoryWin32HandleKHR vkGetMemoryWin32HandleKHR; PFN_vkGetMemoryWin32HandlePropertiesKHR vkGetMemoryWin32HandlePropertiesKHR; #endif /* defined(VK_KHR_external_memory_win32) */ #if defined(VK_KHR_external_semaphore_capabilities) PFN_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR vkGetPhysicalDeviceExternalSemaphorePropertiesKHR; #endif /* defined(VK_KHR_external_semaphore_capabilities) */ #if defined(VK_KHR_external_semaphore_fd) PFN_vkGetSemaphoreFdKHR vkGetSemaphoreFdKHR; PFN_vkImportSemaphoreFdKHR vkImportSemaphoreFdKHR; #endif /* defined(VK_KHR_external_semaphore_fd) */ #if defined(VK_KHR_external_semaphore_win32) PFN_vkGetSemaphoreWin32HandleKHR vkGetSemaphoreWin32HandleKHR; PFN_vkImportSemaphoreWin32HandleKHR vkImportSemaphoreWin32HandleKHR; #endif /* defined(VK_KHR_external_semaphore_win32) */ #if defined(VK_KHR_fragment_shading_rate) PFN_vkCmdSetFragmentShadingRateKHR vkCmdSetFragmentShadingRateKHR; PFN_vkGetPhysicalDeviceFragmentShadingRatesKHR vkGetPhysicalDeviceFragmentShadingRatesKHR; #endif /* defined(VK_KHR_fragment_shading_rate) */ #if defined(VK_KHR_get_display_properties2) PFN_vkGetDisplayModeProperties2KHR vkGetDisplayModeProperties2KHR; PFN_vkGetDisplayPlaneCapabilities2KHR vkGetDisplayPlaneCapabilities2KHR; PFN_vkGetPhysicalDeviceDisplayPlaneProperties2KHR vkGetPhysicalDeviceDisplayPlaneProperties2KHR; PFN_vkGetPhysicalDeviceDisplayProperties2KHR vkGetPhysicalDeviceDisplayProperties2KHR; #endif /* defined(VK_KHR_get_display_properties2) */ #if defined(VK_KHR_get_memory_requirements2) PFN_vkGetBufferMemoryRequirements2KHR vkGetBufferMemoryRequirements2KHR; PFN_vkGetImageMemoryRequirements2KHR vkGetImageMemoryRequirements2KHR; PFN_vkGetImageSparseMemoryRequirements2KHR vkGetImageSparseMemoryRequirements2KHR; #endif /* defined(VK_KHR_get_memory_requirements2) */ #if defined(VK_KHR_get_physical_device_properties2) PFN_vkGetPhysicalDeviceFeatures2KHR vkGetPhysicalDeviceFeatures2KHR; PFN_vkGetPhysicalDeviceFormatProperties2KHR vkGetPhysicalDeviceFormatProperties2KHR; PFN_vkGetPhysicalDeviceImageFormatProperties2KHR vkGetPhysicalDeviceImageFormatProperties2KHR; PFN_vkGetPhysicalDeviceMemoryProperties2KHR vkGetPhysicalDeviceMemoryProperties2KHR; PFN_vkGetPhysicalDeviceProperties2KHR vkGetPhysicalDeviceProperties2KHR; PFN_vkGetPhysicalDeviceQueueFamilyProperties2KHR vkGetPhysicalDeviceQueueFamilyProperties2KHR; PFN_vkGetPhysicalDeviceSparseImageFormatProperties2KHR vkGetPhysicalDeviceSparseImageFormatProperties2KHR; #endif /* defined(VK_KHR_get_physical_device_properties2) */ #if defined(VK_KHR_get_surface_capabilities2) PFN_vkGetPhysicalDeviceSurfaceCapabilities2KHR vkGetPhysicalDeviceSurfaceCapabilities2KHR; PFN_vkGetPhysicalDeviceSurfaceFormats2KHR vkGetPhysicalDeviceSurfaceFormats2KHR; #endif /* defined(VK_KHR_get_surface_capabilities2) */ #if defined(VK_KHR_line_rasterization) PFN_vkCmdSetLineStippleKHR vkCmdSetLineStippleKHR; #endif /* defined(VK_KHR_line_rasterization) */ #if defined(VK_KHR_maintenance1) PFN_vkTrimCommandPoolKHR vkTrimCommandPoolKHR; #endif /* defined(VK_KHR_maintenance1) */ #if defined(VK_KHR_maintenance3) PFN_vkGetDescriptorSetLayoutSupportKHR vkGetDescriptorSetLayoutSupportKHR; #endif /* defined(VK_KHR_maintenance3) */ #if defined(VK_KHR_maintenance4) PFN_vkGetDeviceBufferMemoryRequirementsKHR vkGetDeviceBufferMemoryRequirementsKHR; PFN_vkGetDeviceImageMemoryRequirementsKHR vkGetDeviceImageMemoryRequirementsKHR; PFN_vkGetDeviceImageSparseMemoryRequirementsKHR vkGetDeviceImageSparseMemoryRequirementsKHR; #endif /* defined(VK_KHR_maintenance4) */ #if defined(VK_KHR_maintenance5) PFN_vkCmdBindIndexBuffer2KHR vkCmdBindIndexBuffer2KHR; PFN_vkGetDeviceImageSubresourceLayoutKHR vkGetDeviceImageSubresourceLayoutKHR; PFN_vkGetImageSubresourceLayout2KHR vkGetImageSubresourceLayout2KHR; PFN_vkGetRenderingAreaGranularityKHR vkGetRenderingAreaGranularityKHR; #endif /* defined(VK_KHR_maintenance5) */ #if defined(VK_KHR_maintenance6) PFN_vkCmdBindDescriptorSets2KHR vkCmdBindDescriptorSets2KHR; PFN_vkCmdPushConstants2KHR vkCmdPushConstants2KHR; #endif /* defined(VK_KHR_maintenance6) */ #if defined(VK_KHR_maintenance6) && defined(VK_KHR_push_descriptor) PFN_vkCmdPushDescriptorSet2KHR vkCmdPushDescriptorSet2KHR; PFN_vkCmdPushDescriptorSetWithTemplate2KHR vkCmdPushDescriptorSetWithTemplate2KHR; #endif /* defined(VK_KHR_maintenance6) && defined(VK_KHR_push_descriptor) */ #if defined(VK_KHR_maintenance6) && defined(VK_EXT_descriptor_buffer) PFN_vkCmdBindDescriptorBufferEmbeddedSamplers2EXT vkCmdBindDescriptorBufferEmbeddedSamplers2EXT; PFN_vkCmdSetDescriptorBufferOffsets2EXT vkCmdSetDescriptorBufferOffsets2EXT; #endif /* defined(VK_KHR_maintenance6) && defined(VK_EXT_descriptor_buffer) */ #if defined(VK_KHR_map_memory2) PFN_vkMapMemory2KHR vkMapMemory2KHR; PFN_vkUnmapMemory2KHR vkUnmapMemory2KHR; #endif /* defined(VK_KHR_map_memory2) */ #if defined(VK_KHR_performance_query) PFN_vkAcquireProfilingLockKHR vkAcquireProfilingLockKHR; PFN_vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR; PFN_vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR; PFN_vkReleaseProfilingLockKHR vkReleaseProfilingLockKHR; #endif /* defined(VK_KHR_performance_query) */ #if defined(VK_KHR_pipeline_binary) PFN_vkCreatePipelineBinariesKHR vkCreatePipelineBinariesKHR; PFN_vkDestroyPipelineBinaryKHR vkDestroyPipelineBinaryKHR; PFN_vkGetPipelineBinaryDataKHR vkGetPipelineBinaryDataKHR; PFN_vkGetPipelineKeyKHR vkGetPipelineKeyKHR; PFN_vkReleaseCapturedPipelineDataKHR vkReleaseCapturedPipelineDataKHR; #endif /* defined(VK_KHR_pipeline_binary) */ #if defined(VK_KHR_pipeline_executable_properties) PFN_vkGetPipelineExecutableInternalRepresentationsKHR vkGetPipelineExecutableInternalRepresentationsKHR; PFN_vkGetPipelineExecutablePropertiesKHR vkGetPipelineExecutablePropertiesKHR; PFN_vkGetPipelineExecutableStatisticsKHR vkGetPipelineExecutableStatisticsKHR; #endif /* defined(VK_KHR_pipeline_executable_properties) */ #if defined(VK_KHR_present_wait) PFN_vkWaitForPresentKHR vkWaitForPresentKHR; #endif /* defined(VK_KHR_present_wait) */ #if defined(VK_KHR_push_descriptor) PFN_vkCmdPushDescriptorSetKHR vkCmdPushDescriptorSetKHR; #endif /* defined(VK_KHR_push_descriptor) */ #if defined(VK_KHR_ray_tracing_maintenance1) && defined(VK_KHR_ray_tracing_pipeline) PFN_vkCmdTraceRaysIndirect2KHR vkCmdTraceRaysIndirect2KHR; #endif /* defined(VK_KHR_ray_tracing_maintenance1) && defined(VK_KHR_ray_tracing_pipeline) */ #if defined(VK_KHR_ray_tracing_pipeline) PFN_vkCmdSetRayTracingPipelineStackSizeKHR vkCmdSetRayTracingPipelineStackSizeKHR; PFN_vkCmdTraceRaysIndirectKHR vkCmdTraceRaysIndirectKHR; PFN_vkCmdTraceRaysKHR vkCmdTraceRaysKHR; PFN_vkCreateRayTracingPipelinesKHR vkCreateRayTracingPipelinesKHR; PFN_vkGetRayTracingCaptureReplayShaderGroupHandlesKHR vkGetRayTracingCaptureReplayShaderGroupHandlesKHR; PFN_vkGetRayTracingShaderGroupHandlesKHR vkGetRayTracingShaderGroupHandlesKHR; PFN_vkGetRayTracingShaderGroupStackSizeKHR vkGetRayTracingShaderGroupStackSizeKHR; #endif /* defined(VK_KHR_ray_tracing_pipeline) */ #if defined(VK_KHR_sampler_ycbcr_conversion) PFN_vkCreateSamplerYcbcrConversionKHR vkCreateSamplerYcbcrConversionKHR; PFN_vkDestroySamplerYcbcrConversionKHR vkDestroySamplerYcbcrConversionKHR; #endif /* defined(VK_KHR_sampler_ycbcr_conversion) */ #if defined(VK_KHR_shared_presentable_image) PFN_vkGetSwapchainStatusKHR vkGetSwapchainStatusKHR; #endif /* defined(VK_KHR_shared_presentable_image) */ #if defined(VK_KHR_surface) PFN_vkDestroySurfaceKHR vkDestroySurfaceKHR; PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR vkGetPhysicalDeviceSurfaceCapabilitiesKHR; PFN_vkGetPhysicalDeviceSurfaceFormatsKHR vkGetPhysicalDeviceSurfaceFormatsKHR; PFN_vkGetPhysicalDeviceSurfacePresentModesKHR vkGetPhysicalDeviceSurfacePresentModesKHR; PFN_vkGetPhysicalDeviceSurfaceSupportKHR vkGetPhysicalDeviceSurfaceSupportKHR; #endif /* defined(VK_KHR_surface) */ #if defined(VK_KHR_swapchain) PFN_vkAcquireNextImageKHR vkAcquireNextImageKHR; PFN_vkCreateSwapchainKHR vkCreateSwapchainKHR; PFN_vkDestroySwapchainKHR vkDestroySwapchainKHR; PFN_vkGetSwapchainImagesKHR vkGetSwapchainImagesKHR; PFN_vkQueuePresentKHR vkQueuePresentKHR; #endif /* defined(VK_KHR_swapchain) */ #if defined(VK_KHR_synchronization2) PFN_vkCmdPipelineBarrier2KHR vkCmdPipelineBarrier2KHR; PFN_vkCmdResetEvent2KHR vkCmdResetEvent2KHR; PFN_vkCmdSetEvent2KHR vkCmdSetEvent2KHR; PFN_vkCmdWaitEvents2KHR vkCmdWaitEvents2KHR; PFN_vkCmdWriteTimestamp2KHR vkCmdWriteTimestamp2KHR; PFN_vkQueueSubmit2KHR vkQueueSubmit2KHR; #endif /* defined(VK_KHR_synchronization2) */ #if defined(VK_KHR_timeline_semaphore) PFN_vkGetSemaphoreCounterValueKHR vkGetSemaphoreCounterValueKHR; PFN_vkSignalSemaphoreKHR vkSignalSemaphoreKHR; PFN_vkWaitSemaphoresKHR vkWaitSemaphoresKHR; #endif /* defined(VK_KHR_timeline_semaphore) */ #if defined(VK_KHR_video_decode_queue) PFN_vkCmdDecodeVideoKHR vkCmdDecodeVideoKHR; #endif /* defined(VK_KHR_video_decode_queue) */ #if defined(VK_KHR_video_encode_queue) PFN_vkCmdEncodeVideoKHR vkCmdEncodeVideoKHR; PFN_vkGetEncodedVideoSessionParametersKHR vkGetEncodedVideoSessionParametersKHR; PFN_vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR; #endif /* defined(VK_KHR_video_encode_queue) */ #if defined(VK_KHR_video_queue) PFN_vkBindVideoSessionMemoryKHR vkBindVideoSessionMemoryKHR; PFN_vkCmdBeginVideoCodingKHR vkCmdBeginVideoCodingKHR; PFN_vkCmdControlVideoCodingKHR vkCmdControlVideoCodingKHR; PFN_vkCmdEndVideoCodingKHR vkCmdEndVideoCodingKHR; PFN_vkCreateVideoSessionKHR vkCreateVideoSessionKHR; PFN_vkCreateVideoSessionParametersKHR vkCreateVideoSessionParametersKHR; PFN_vkDestroyVideoSessionKHR vkDestroyVideoSessionKHR; PFN_vkDestroyVideoSessionParametersKHR vkDestroyVideoSessionParametersKHR; PFN_vkGetPhysicalDeviceVideoCapabilitiesKHR vkGetPhysicalDeviceVideoCapabilitiesKHR; PFN_vkGetPhysicalDeviceVideoFormatPropertiesKHR vkGetPhysicalDeviceVideoFormatPropertiesKHR; PFN_vkGetVideoSessionMemoryRequirementsKHR vkGetVideoSessionMemoryRequirementsKHR; PFN_vkUpdateVideoSessionParametersKHR vkUpdateVideoSessionParametersKHR; #endif /* defined(VK_KHR_video_queue) */ #if defined(VK_KHR_wayland_surface) PFN_vkCreateWaylandSurfaceKHR vkCreateWaylandSurfaceKHR; PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR vkGetPhysicalDeviceWaylandPresentationSupportKHR; #endif /* defined(VK_KHR_wayland_surface) */ #if defined(VK_KHR_win32_surface) PFN_vkCreateWin32SurfaceKHR vkCreateWin32SurfaceKHR; PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR vkGetPhysicalDeviceWin32PresentationSupportKHR; #endif /* defined(VK_KHR_win32_surface) */ #if defined(VK_KHR_xcb_surface) PFN_vkCreateXcbSurfaceKHR vkCreateXcbSurfaceKHR; PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR vkGetPhysicalDeviceXcbPresentationSupportKHR; #endif /* defined(VK_KHR_xcb_surface) */ #if defined(VK_KHR_xlib_surface) PFN_vkCreateXlibSurfaceKHR vkCreateXlibSurfaceKHR; PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR vkGetPhysicalDeviceXlibPresentationSupportKHR; #endif /* defined(VK_KHR_xlib_surface) */ #if defined(VK_MVK_ios_surface) PFN_vkCreateIOSSurfaceMVK vkCreateIOSSurfaceMVK; #endif /* defined(VK_MVK_ios_surface) */ #if defined(VK_MVK_macos_surface) PFN_vkCreateMacOSSurfaceMVK vkCreateMacOSSurfaceMVK; #endif /* defined(VK_MVK_macos_surface) */ #if defined(VK_NN_vi_surface) PFN_vkCreateViSurfaceNN vkCreateViSurfaceNN; #endif /* defined(VK_NN_vi_surface) */ #if defined(VK_NVX_binary_import) PFN_vkCmdCuLaunchKernelNVX vkCmdCuLaunchKernelNVX; PFN_vkCreateCuFunctionNVX vkCreateCuFunctionNVX; PFN_vkCreateCuModuleNVX vkCreateCuModuleNVX; PFN_vkDestroyCuFunctionNVX vkDestroyCuFunctionNVX; PFN_vkDestroyCuModuleNVX vkDestroyCuModuleNVX; #endif /* defined(VK_NVX_binary_import) */ #if defined(VK_NVX_image_view_handle) PFN_vkGetImageViewHandleNVX vkGetImageViewHandleNVX; #endif /* defined(VK_NVX_image_view_handle) */ #if defined(VK_NVX_image_view_handle) && VK_NVX_IMAGE_VIEW_HANDLE_SPEC_VERSION >= 3 PFN_vkGetImageViewHandle64NVX vkGetImageViewHandle64NVX; #endif /* defined(VK_NVX_image_view_handle) && VK_NVX_IMAGE_VIEW_HANDLE_SPEC_VERSION >= 3 */ #if defined(VK_NVX_image_view_handle) && VK_NVX_IMAGE_VIEW_HANDLE_SPEC_VERSION >= 2 PFN_vkGetImageViewAddressNVX vkGetImageViewAddressNVX; #endif /* defined(VK_NVX_image_view_handle) && VK_NVX_IMAGE_VIEW_HANDLE_SPEC_VERSION >= 2 */ #if defined(VK_NV_acquire_winrt_display) PFN_vkAcquireWinrtDisplayNV vkAcquireWinrtDisplayNV; PFN_vkGetWinrtDisplayNV vkGetWinrtDisplayNV; #endif /* defined(VK_NV_acquire_winrt_display) */ #if defined(VK_NV_clip_space_w_scaling) PFN_vkCmdSetViewportWScalingNV vkCmdSetViewportWScalingNV; #endif /* defined(VK_NV_clip_space_w_scaling) */ #if defined(VK_NV_cluster_acceleration_structure) PFN_vkCmdBuildClusterAccelerationStructureIndirectNV vkCmdBuildClusterAccelerationStructureIndirectNV; PFN_vkGetClusterAccelerationStructureBuildSizesNV vkGetClusterAccelerationStructureBuildSizesNV; #endif /* defined(VK_NV_cluster_acceleration_structure) */ #if defined(VK_NV_cooperative_matrix) PFN_vkGetPhysicalDeviceCooperativeMatrixPropertiesNV vkGetPhysicalDeviceCooperativeMatrixPropertiesNV; #endif /* defined(VK_NV_cooperative_matrix) */ #if defined(VK_NV_cooperative_matrix2) PFN_vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV; #endif /* defined(VK_NV_cooperative_matrix2) */ #if defined(VK_NV_cooperative_vector) PFN_vkCmdConvertCooperativeVectorMatrixNV vkCmdConvertCooperativeVectorMatrixNV; PFN_vkConvertCooperativeVectorMatrixNV vkConvertCooperativeVectorMatrixNV; PFN_vkGetPhysicalDeviceCooperativeVectorPropertiesNV vkGetPhysicalDeviceCooperativeVectorPropertiesNV; #endif /* defined(VK_NV_cooperative_vector) */ #if defined(VK_NV_copy_memory_indirect) PFN_vkCmdCopyMemoryIndirectNV vkCmdCopyMemoryIndirectNV; PFN_vkCmdCopyMemoryToImageIndirectNV vkCmdCopyMemoryToImageIndirectNV; #endif /* defined(VK_NV_copy_memory_indirect) */ #if defined(VK_NV_coverage_reduction_mode) PFN_vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV; #endif /* defined(VK_NV_coverage_reduction_mode) */ #if defined(VK_NV_cuda_kernel_launch) PFN_vkCmdCudaLaunchKernelNV vkCmdCudaLaunchKernelNV; PFN_vkCreateCudaFunctionNV vkCreateCudaFunctionNV; PFN_vkCreateCudaModuleNV vkCreateCudaModuleNV; PFN_vkDestroyCudaFunctionNV vkDestroyCudaFunctionNV; PFN_vkDestroyCudaModuleNV vkDestroyCudaModuleNV; PFN_vkGetCudaModuleCacheNV vkGetCudaModuleCacheNV; #endif /* defined(VK_NV_cuda_kernel_launch) */ #if defined(VK_NV_device_diagnostic_checkpoints) PFN_vkCmdSetCheckpointNV vkCmdSetCheckpointNV; PFN_vkGetQueueCheckpointDataNV vkGetQueueCheckpointDataNV; #endif /* defined(VK_NV_device_diagnostic_checkpoints) */ #if defined(VK_NV_device_diagnostic_checkpoints) && (defined(VK_VERSION_1_3) || defined(VK_KHR_synchronization2)) PFN_vkGetQueueCheckpointData2NV vkGetQueueCheckpointData2NV; #endif /* defined(VK_NV_device_diagnostic_checkpoints) && (defined(VK_VERSION_1_3) || defined(VK_KHR_synchronization2)) */ #if defined(VK_NV_device_generated_commands) PFN_vkCmdBindPipelineShaderGroupNV vkCmdBindPipelineShaderGroupNV; PFN_vkCmdExecuteGeneratedCommandsNV vkCmdExecuteGeneratedCommandsNV; PFN_vkCmdPreprocessGeneratedCommandsNV vkCmdPreprocessGeneratedCommandsNV; PFN_vkCreateIndirectCommandsLayoutNV vkCreateIndirectCommandsLayoutNV; PFN_vkDestroyIndirectCommandsLayoutNV vkDestroyIndirectCommandsLayoutNV; PFN_vkGetGeneratedCommandsMemoryRequirementsNV vkGetGeneratedCommandsMemoryRequirementsNV; #endif /* defined(VK_NV_device_generated_commands) */ #if defined(VK_NV_device_generated_commands_compute) PFN_vkCmdUpdatePipelineIndirectBufferNV vkCmdUpdatePipelineIndirectBufferNV; PFN_vkGetPipelineIndirectDeviceAddressNV vkGetPipelineIndirectDeviceAddressNV; PFN_vkGetPipelineIndirectMemoryRequirementsNV vkGetPipelineIndirectMemoryRequirementsNV; #endif /* defined(VK_NV_device_generated_commands_compute) */ #if defined(VK_NV_external_memory_capabilities) PFN_vkGetPhysicalDeviceExternalImageFormatPropertiesNV vkGetPhysicalDeviceExternalImageFormatPropertiesNV; #endif /* defined(VK_NV_external_memory_capabilities) */ #if defined(VK_NV_external_memory_rdma) PFN_vkGetMemoryRemoteAddressNV vkGetMemoryRemoteAddressNV; #endif /* defined(VK_NV_external_memory_rdma) */ #if defined(VK_NV_external_memory_win32) PFN_vkGetMemoryWin32HandleNV vkGetMemoryWin32HandleNV; #endif /* defined(VK_NV_external_memory_win32) */ #if defined(VK_NV_fragment_shading_rate_enums) PFN_vkCmdSetFragmentShadingRateEnumNV vkCmdSetFragmentShadingRateEnumNV; #endif /* defined(VK_NV_fragment_shading_rate_enums) */ #if defined(VK_NV_low_latency2) PFN_vkGetLatencyTimingsNV vkGetLatencyTimingsNV; PFN_vkLatencySleepNV vkLatencySleepNV; PFN_vkQueueNotifyOutOfBandNV vkQueueNotifyOutOfBandNV; PFN_vkSetLatencyMarkerNV vkSetLatencyMarkerNV; PFN_vkSetLatencySleepModeNV vkSetLatencySleepModeNV; #endif /* defined(VK_NV_low_latency2) */ #if defined(VK_NV_memory_decompression) PFN_vkCmdDecompressMemoryIndirectCountNV vkCmdDecompressMemoryIndirectCountNV; PFN_vkCmdDecompressMemoryNV vkCmdDecompressMemoryNV; #endif /* defined(VK_NV_memory_decompression) */ #if defined(VK_NV_mesh_shader) PFN_vkCmdDrawMeshTasksIndirectNV vkCmdDrawMeshTasksIndirectNV; PFN_vkCmdDrawMeshTasksNV vkCmdDrawMeshTasksNV; #endif /* defined(VK_NV_mesh_shader) */ #if defined(VK_NV_mesh_shader) && (defined(VK_KHR_draw_indirect_count) || defined(VK_VERSION_1_2)) PFN_vkCmdDrawMeshTasksIndirectCountNV vkCmdDrawMeshTasksIndirectCountNV; #endif /* defined(VK_NV_mesh_shader) && (defined(VK_KHR_draw_indirect_count) || defined(VK_VERSION_1_2)) */ #if defined(VK_NV_optical_flow) PFN_vkBindOpticalFlowSessionImageNV vkBindOpticalFlowSessionImageNV; PFN_vkCmdOpticalFlowExecuteNV vkCmdOpticalFlowExecuteNV; PFN_vkCreateOpticalFlowSessionNV vkCreateOpticalFlowSessionNV; PFN_vkDestroyOpticalFlowSessionNV vkDestroyOpticalFlowSessionNV; PFN_vkGetPhysicalDeviceOpticalFlowImageFormatsNV vkGetPhysicalDeviceOpticalFlowImageFormatsNV; #endif /* defined(VK_NV_optical_flow) */ #if defined(VK_NV_partitioned_acceleration_structure) PFN_vkCmdBuildPartitionedAccelerationStructuresNV vkCmdBuildPartitionedAccelerationStructuresNV; PFN_vkGetPartitionedAccelerationStructuresBuildSizesNV vkGetPartitionedAccelerationStructuresBuildSizesNV; #endif /* defined(VK_NV_partitioned_acceleration_structure) */ #if defined(VK_NV_ray_tracing) PFN_vkBindAccelerationStructureMemoryNV vkBindAccelerationStructureMemoryNV; PFN_vkCmdBuildAccelerationStructureNV vkCmdBuildAccelerationStructureNV; PFN_vkCmdCopyAccelerationStructureNV vkCmdCopyAccelerationStructureNV; PFN_vkCmdTraceRaysNV vkCmdTraceRaysNV; PFN_vkCmdWriteAccelerationStructuresPropertiesNV vkCmdWriteAccelerationStructuresPropertiesNV; PFN_vkCompileDeferredNV vkCompileDeferredNV; PFN_vkCreateAccelerationStructureNV vkCreateAccelerationStructureNV; PFN_vkCreateRayTracingPipelinesNV vkCreateRayTracingPipelinesNV; PFN_vkDestroyAccelerationStructureNV vkDestroyAccelerationStructureNV; PFN_vkGetAccelerationStructureHandleNV vkGetAccelerationStructureHandleNV; PFN_vkGetAccelerationStructureMemoryRequirementsNV vkGetAccelerationStructureMemoryRequirementsNV; PFN_vkGetRayTracingShaderGroupHandlesNV vkGetRayTracingShaderGroupHandlesNV; #endif /* defined(VK_NV_ray_tracing) */ #if defined(VK_NV_scissor_exclusive) && VK_NV_SCISSOR_EXCLUSIVE_SPEC_VERSION >= 2 PFN_vkCmdSetExclusiveScissorEnableNV vkCmdSetExclusiveScissorEnableNV; #endif /* defined(VK_NV_scissor_exclusive) && VK_NV_SCISSOR_EXCLUSIVE_SPEC_VERSION >= 2 */ #if defined(VK_NV_scissor_exclusive) PFN_vkCmdSetExclusiveScissorNV vkCmdSetExclusiveScissorNV; #endif /* defined(VK_NV_scissor_exclusive) */ #if defined(VK_NV_shading_rate_image) PFN_vkCmdBindShadingRateImageNV vkCmdBindShadingRateImageNV; PFN_vkCmdSetCoarseSampleOrderNV vkCmdSetCoarseSampleOrderNV; PFN_vkCmdSetViewportShadingRatePaletteNV vkCmdSetViewportShadingRatePaletteNV; #endif /* defined(VK_NV_shading_rate_image) */ #if defined(VK_QCOM_tile_properties) PFN_vkGetDynamicRenderingTilePropertiesQCOM vkGetDynamicRenderingTilePropertiesQCOM; PFN_vkGetFramebufferTilePropertiesQCOM vkGetFramebufferTilePropertiesQCOM; #endif /* defined(VK_QCOM_tile_properties) */ #if defined(VK_QNX_external_memory_screen_buffer) PFN_vkGetScreenBufferPropertiesQNX vkGetScreenBufferPropertiesQNX; #endif /* defined(VK_QNX_external_memory_screen_buffer) */ #if defined(VK_QNX_screen_surface) PFN_vkCreateScreenSurfaceQNX vkCreateScreenSurfaceQNX; PFN_vkGetPhysicalDeviceScreenPresentationSupportQNX vkGetPhysicalDeviceScreenPresentationSupportQNX; #endif /* defined(VK_QNX_screen_surface) */ #if defined(VK_VALVE_descriptor_set_host_mapping) PFN_vkGetDescriptorSetHostMappingVALVE vkGetDescriptorSetHostMappingVALVE; PFN_vkGetDescriptorSetLayoutHostMappingInfoVALVE vkGetDescriptorSetLayoutHostMappingInfoVALVE; #endif /* defined(VK_VALVE_descriptor_set_host_mapping) */ #if (defined(VK_EXT_depth_clamp_control)) || (defined(VK_EXT_shader_object) && defined(VK_EXT_depth_clamp_control)) PFN_vkCmdSetDepthClampRangeEXT vkCmdSetDepthClampRangeEXT; #endif /* (defined(VK_EXT_depth_clamp_control)) || (defined(VK_EXT_shader_object) && defined(VK_EXT_depth_clamp_control)) */ #if (defined(VK_EXT_extended_dynamic_state)) || (defined(VK_EXT_shader_object)) PFN_vkCmdBindVertexBuffers2EXT vkCmdBindVertexBuffers2EXT; PFN_vkCmdSetCullModeEXT vkCmdSetCullModeEXT; PFN_vkCmdSetDepthBoundsTestEnableEXT vkCmdSetDepthBoundsTestEnableEXT; PFN_vkCmdSetDepthCompareOpEXT vkCmdSetDepthCompareOpEXT; PFN_vkCmdSetDepthTestEnableEXT vkCmdSetDepthTestEnableEXT; PFN_vkCmdSetDepthWriteEnableEXT vkCmdSetDepthWriteEnableEXT; PFN_vkCmdSetFrontFaceEXT vkCmdSetFrontFaceEXT; PFN_vkCmdSetPrimitiveTopologyEXT vkCmdSetPrimitiveTopologyEXT; PFN_vkCmdSetScissorWithCountEXT vkCmdSetScissorWithCountEXT; PFN_vkCmdSetStencilOpEXT vkCmdSetStencilOpEXT; PFN_vkCmdSetStencilTestEnableEXT vkCmdSetStencilTestEnableEXT; PFN_vkCmdSetViewportWithCountEXT vkCmdSetViewportWithCountEXT; #endif /* (defined(VK_EXT_extended_dynamic_state)) || (defined(VK_EXT_shader_object)) */ #if (defined(VK_EXT_extended_dynamic_state2)) || (defined(VK_EXT_shader_object)) PFN_vkCmdSetDepthBiasEnableEXT vkCmdSetDepthBiasEnableEXT; PFN_vkCmdSetLogicOpEXT vkCmdSetLogicOpEXT; PFN_vkCmdSetPatchControlPointsEXT vkCmdSetPatchControlPointsEXT; PFN_vkCmdSetPrimitiveRestartEnableEXT vkCmdSetPrimitiveRestartEnableEXT; PFN_vkCmdSetRasterizerDiscardEnableEXT vkCmdSetRasterizerDiscardEnableEXT; #endif /* (defined(VK_EXT_extended_dynamic_state2)) || (defined(VK_EXT_shader_object)) */ #if (defined(VK_EXT_extended_dynamic_state3)) || (defined(VK_EXT_shader_object)) PFN_vkCmdSetAlphaToCoverageEnableEXT vkCmdSetAlphaToCoverageEnableEXT; PFN_vkCmdSetAlphaToOneEnableEXT vkCmdSetAlphaToOneEnableEXT; PFN_vkCmdSetColorBlendEnableEXT vkCmdSetColorBlendEnableEXT; PFN_vkCmdSetColorBlendEquationEXT vkCmdSetColorBlendEquationEXT; PFN_vkCmdSetColorWriteMaskEXT vkCmdSetColorWriteMaskEXT; PFN_vkCmdSetDepthClampEnableEXT vkCmdSetDepthClampEnableEXT; PFN_vkCmdSetLogicOpEnableEXT vkCmdSetLogicOpEnableEXT; PFN_vkCmdSetPolygonModeEXT vkCmdSetPolygonModeEXT; PFN_vkCmdSetRasterizationSamplesEXT vkCmdSetRasterizationSamplesEXT; PFN_vkCmdSetSampleMaskEXT vkCmdSetSampleMaskEXT; #endif /* (defined(VK_EXT_extended_dynamic_state3)) || (defined(VK_EXT_shader_object)) */ #if (defined(VK_EXT_extended_dynamic_state3) && (defined(VK_KHR_maintenance2) || defined(VK_VERSION_1_1))) || (defined(VK_EXT_shader_object)) PFN_vkCmdSetTessellationDomainOriginEXT vkCmdSetTessellationDomainOriginEXT; #endif /* (defined(VK_EXT_extended_dynamic_state3) && (defined(VK_KHR_maintenance2) || defined(VK_VERSION_1_1))) || (defined(VK_EXT_shader_object)) */ #if (defined(VK_EXT_extended_dynamic_state3) && defined(VK_EXT_transform_feedback)) || (defined(VK_EXT_shader_object) && defined(VK_EXT_transform_feedback)) PFN_vkCmdSetRasterizationStreamEXT vkCmdSetRasterizationStreamEXT; #endif /* (defined(VK_EXT_extended_dynamic_state3) && defined(VK_EXT_transform_feedback)) || (defined(VK_EXT_shader_object) && defined(VK_EXT_transform_feedback)) */ #if (defined(VK_EXT_extended_dynamic_state3) && defined(VK_EXT_conservative_rasterization)) || (defined(VK_EXT_shader_object) && defined(VK_EXT_conservative_rasterization)) PFN_vkCmdSetConservativeRasterizationModeEXT vkCmdSetConservativeRasterizationModeEXT; PFN_vkCmdSetExtraPrimitiveOverestimationSizeEXT vkCmdSetExtraPrimitiveOverestimationSizeEXT; #endif /* (defined(VK_EXT_extended_dynamic_state3) && defined(VK_EXT_conservative_rasterization)) || (defined(VK_EXT_shader_object) && defined(VK_EXT_conservative_rasterization)) */ #if (defined(VK_EXT_extended_dynamic_state3) && defined(VK_EXT_depth_clip_enable)) || (defined(VK_EXT_shader_object) && defined(VK_EXT_depth_clip_enable)) PFN_vkCmdSetDepthClipEnableEXT vkCmdSetDepthClipEnableEXT; #endif /* (defined(VK_EXT_extended_dynamic_state3) && defined(VK_EXT_depth_clip_enable)) || (defined(VK_EXT_shader_object) && defined(VK_EXT_depth_clip_enable)) */ #if (defined(VK_EXT_extended_dynamic_state3) && defined(VK_EXT_sample_locations)) || (defined(VK_EXT_shader_object) && defined(VK_EXT_sample_locations)) PFN_vkCmdSetSampleLocationsEnableEXT vkCmdSetSampleLocationsEnableEXT; #endif /* (defined(VK_EXT_extended_dynamic_state3) && defined(VK_EXT_sample_locations)) || (defined(VK_EXT_shader_object) && defined(VK_EXT_sample_locations)) */ #if (defined(VK_EXT_extended_dynamic_state3) && defined(VK_EXT_blend_operation_advanced)) || (defined(VK_EXT_shader_object) && defined(VK_EXT_blend_operation_advanced)) PFN_vkCmdSetColorBlendAdvancedEXT vkCmdSetColorBlendAdvancedEXT; #endif /* (defined(VK_EXT_extended_dynamic_state3) && defined(VK_EXT_blend_operation_advanced)) || (defined(VK_EXT_shader_object) && defined(VK_EXT_blend_operation_advanced)) */ #if (defined(VK_EXT_extended_dynamic_state3) && defined(VK_EXT_provoking_vertex)) || (defined(VK_EXT_shader_object) && defined(VK_EXT_provoking_vertex)) PFN_vkCmdSetProvokingVertexModeEXT vkCmdSetProvokingVertexModeEXT; #endif /* (defined(VK_EXT_extended_dynamic_state3) && defined(VK_EXT_provoking_vertex)) || (defined(VK_EXT_shader_object) && defined(VK_EXT_provoking_vertex)) */ #if (defined(VK_EXT_extended_dynamic_state3) && defined(VK_EXT_line_rasterization)) || (defined(VK_EXT_shader_object) && defined(VK_EXT_line_rasterization)) PFN_vkCmdSetLineRasterizationModeEXT vkCmdSetLineRasterizationModeEXT; PFN_vkCmdSetLineStippleEnableEXT vkCmdSetLineStippleEnableEXT; #endif /* (defined(VK_EXT_extended_dynamic_state3) && defined(VK_EXT_line_rasterization)) || (defined(VK_EXT_shader_object) && defined(VK_EXT_line_rasterization)) */ #if (defined(VK_EXT_extended_dynamic_state3) && defined(VK_EXT_depth_clip_control)) || (defined(VK_EXT_shader_object) && defined(VK_EXT_depth_clip_control)) PFN_vkCmdSetDepthClipNegativeOneToOneEXT vkCmdSetDepthClipNegativeOneToOneEXT; #endif /* (defined(VK_EXT_extended_dynamic_state3) && defined(VK_EXT_depth_clip_control)) || (defined(VK_EXT_shader_object) && defined(VK_EXT_depth_clip_control)) */ #if (defined(VK_EXT_extended_dynamic_state3) && defined(VK_NV_clip_space_w_scaling)) || (defined(VK_EXT_shader_object) && defined(VK_NV_clip_space_w_scaling)) PFN_vkCmdSetViewportWScalingEnableNV vkCmdSetViewportWScalingEnableNV; #endif /* (defined(VK_EXT_extended_dynamic_state3) && defined(VK_NV_clip_space_w_scaling)) || (defined(VK_EXT_shader_object) && defined(VK_NV_clip_space_w_scaling)) */ #if (defined(VK_EXT_extended_dynamic_state3) && defined(VK_NV_viewport_swizzle)) || (defined(VK_EXT_shader_object) && defined(VK_NV_viewport_swizzle)) PFN_vkCmdSetViewportSwizzleNV vkCmdSetViewportSwizzleNV; #endif /* (defined(VK_EXT_extended_dynamic_state3) && defined(VK_NV_viewport_swizzle)) || (defined(VK_EXT_shader_object) && defined(VK_NV_viewport_swizzle)) */ #if (defined(VK_EXT_extended_dynamic_state3) && defined(VK_NV_fragment_coverage_to_color)) || (defined(VK_EXT_shader_object) && defined(VK_NV_fragment_coverage_to_color)) PFN_vkCmdSetCoverageToColorEnableNV vkCmdSetCoverageToColorEnableNV; PFN_vkCmdSetCoverageToColorLocationNV vkCmdSetCoverageToColorLocationNV; #endif /* (defined(VK_EXT_extended_dynamic_state3) && defined(VK_NV_fragment_coverage_to_color)) || (defined(VK_EXT_shader_object) && defined(VK_NV_fragment_coverage_to_color)) */ #if (defined(VK_EXT_extended_dynamic_state3) && defined(VK_NV_framebuffer_mixed_samples)) || (defined(VK_EXT_shader_object) && defined(VK_NV_framebuffer_mixed_samples)) PFN_vkCmdSetCoverageModulationModeNV vkCmdSetCoverageModulationModeNV; PFN_vkCmdSetCoverageModulationTableEnableNV vkCmdSetCoverageModulationTableEnableNV; PFN_vkCmdSetCoverageModulationTableNV vkCmdSetCoverageModulationTableNV; #endif /* (defined(VK_EXT_extended_dynamic_state3) && defined(VK_NV_framebuffer_mixed_samples)) || (defined(VK_EXT_shader_object) && defined(VK_NV_framebuffer_mixed_samples)) */ #if (defined(VK_EXT_extended_dynamic_state3) && defined(VK_NV_shading_rate_image)) || (defined(VK_EXT_shader_object) && defined(VK_NV_shading_rate_image)) PFN_vkCmdSetShadingRateImageEnableNV vkCmdSetShadingRateImageEnableNV; #endif /* (defined(VK_EXT_extended_dynamic_state3) && defined(VK_NV_shading_rate_image)) || (defined(VK_EXT_shader_object) && defined(VK_NV_shading_rate_image)) */ #if (defined(VK_EXT_extended_dynamic_state3) && defined(VK_NV_representative_fragment_test)) || (defined(VK_EXT_shader_object) && defined(VK_NV_representative_fragment_test)) PFN_vkCmdSetRepresentativeFragmentTestEnableNV vkCmdSetRepresentativeFragmentTestEnableNV; #endif /* (defined(VK_EXT_extended_dynamic_state3) && defined(VK_NV_representative_fragment_test)) || (defined(VK_EXT_shader_object) && defined(VK_NV_representative_fragment_test)) */ #if (defined(VK_EXT_extended_dynamic_state3) && defined(VK_NV_coverage_reduction_mode)) || (defined(VK_EXT_shader_object) && defined(VK_NV_coverage_reduction_mode)) PFN_vkCmdSetCoverageReductionModeNV vkCmdSetCoverageReductionModeNV; #endif /* (defined(VK_EXT_extended_dynamic_state3) && defined(VK_NV_coverage_reduction_mode)) || (defined(VK_EXT_shader_object) && defined(VK_NV_coverage_reduction_mode)) */ #if (defined(VK_EXT_host_image_copy)) || (defined(VK_EXT_image_compression_control)) PFN_vkGetImageSubresourceLayout2EXT vkGetImageSubresourceLayout2EXT; #endif /* (defined(VK_EXT_host_image_copy)) || (defined(VK_EXT_image_compression_control)) */ #if (defined(VK_EXT_shader_object)) || (defined(VK_EXT_vertex_input_dynamic_state)) PFN_vkCmdSetVertexInputEXT vkCmdSetVertexInputEXT; #endif /* (defined(VK_EXT_shader_object)) || (defined(VK_EXT_vertex_input_dynamic_state)) */ #if (defined(VK_KHR_descriptor_update_template) && defined(VK_KHR_push_descriptor)) || (defined(VK_KHR_push_descriptor) && (defined(VK_VERSION_1_1) || defined(VK_KHR_descriptor_update_template))) PFN_vkCmdPushDescriptorSetWithTemplateKHR vkCmdPushDescriptorSetWithTemplateKHR; #endif /* (defined(VK_KHR_descriptor_update_template) && defined(VK_KHR_push_descriptor)) || (defined(VK_KHR_push_descriptor) && (defined(VK_VERSION_1_1) || defined(VK_KHR_descriptor_update_template))) */ #if (defined(VK_KHR_device_group) && defined(VK_KHR_surface)) || (defined(VK_KHR_swapchain) && defined(VK_VERSION_1_1)) PFN_vkGetDeviceGroupPresentCapabilitiesKHR vkGetDeviceGroupPresentCapabilitiesKHR; PFN_vkGetDeviceGroupSurfacePresentModesKHR vkGetDeviceGroupSurfacePresentModesKHR; PFN_vkGetPhysicalDevicePresentRectanglesKHR vkGetPhysicalDevicePresentRectanglesKHR; #endif /* (defined(VK_KHR_device_group) && defined(VK_KHR_surface)) || (defined(VK_KHR_swapchain) && defined(VK_VERSION_1_1)) */ #if (defined(VK_KHR_device_group) && defined(VK_KHR_swapchain)) || (defined(VK_KHR_swapchain) && defined(VK_VERSION_1_1)) PFN_vkAcquireNextImage2KHR vkAcquireNextImage2KHR; #endif /* (defined(VK_KHR_device_group) && defined(VK_KHR_swapchain)) || (defined(VK_KHR_swapchain) && defined(VK_VERSION_1_1)) */ /* VOLK_GENERATE_PROTOTYPES_C */ #ifdef __GNUC__ # pragma GCC visibility pop #endif #ifdef __cplusplus } #endif /* clang-format on */ ================================================ FILE: src/libraries/volk/volk.h ================================================ /** * volk * * Copyright (C) 2018-2025, by Arseny Kapoulkine (arseny.kapoulkine@gmail.com) * Report bugs and download new versions at https://github.com/zeux/volk * * This library is distributed under the MIT License. See notice at the end of this file. */ /* clang-format off */ #ifndef VOLK_H_ #define VOLK_H_ #if defined(VULKAN_H_) && !defined(VK_NO_PROTOTYPES) # error To use volk, you need to define VK_NO_PROTOTYPES before including vulkan.h #endif /* VOLK_GENERATE_VERSION_DEFINE */ #define VOLK_HEADER_VERSION 307 /* VOLK_GENERATE_VERSION_DEFINE */ #ifndef VK_NO_PROTOTYPES # define VK_NO_PROTOTYPES #endif #ifndef VULKAN_H_ # ifdef VOLK_VULKAN_H_PATH # include VOLK_VULKAN_H_PATH # elif defined(VK_USE_PLATFORM_WIN32_KHR) # include # include /* When VK_USE_PLATFORM_WIN32_KHR is defined, instead of including vulkan.h directly, we include individual parts of the SDK * This is necessary to avoid including which is very heavy - it takes 200ms to parse without WIN32_LEAN_AND_MEAN * and 100ms to parse with it. vulkan_win32.h only needs a few symbols that are easy to redefine ourselves. */ typedef unsigned long DWORD; typedef const wchar_t* LPCWSTR; typedef void* HANDLE; typedef struct HINSTANCE__* HINSTANCE; typedef struct HWND__* HWND; typedef struct HMONITOR__* HMONITOR; typedef struct _SECURITY_ATTRIBUTES SECURITY_ATTRIBUTES; # include # ifdef VK_ENABLE_BETA_EXTENSIONS # include # endif # else # include # endif #endif #ifdef __cplusplus extern "C" { #endif struct VolkDeviceTable; /** * Initialize library by loading Vulkan loader; call this function before creating the Vulkan instance. * * Returns VK_SUCCESS on success and VK_ERROR_INITIALIZATION_FAILED otherwise. */ VkResult volkInitialize(void); /** * Initialize library by providing a custom handler to load global symbols. * * This function can be used instead of volkInitialize. * The handler function pointer will be asked to load global Vulkan symbols which require no instance * (such as vkCreateInstance, vkEnumerateInstance* and vkEnumerateInstanceVersion if available). */ void volkInitializeCustom(PFN_vkGetInstanceProcAddr handler); /** * Finalize library by unloading Vulkan loader and resetting global symbols to NULL. * * This function does not need to be called on process exit (as loader will be unloaded automatically) or if volkInitialize failed. * In general this function is optional to call but may be useful in rare cases eg if volk needs to be reinitialized multiple times. */ void volkFinalize(void); /** * Get Vulkan instance version supported by the Vulkan loader, or 0 if Vulkan isn't supported * * Returns 0 if volkInitialize wasn't called or failed. */ uint32_t volkGetInstanceVersion(void); /** * Load global function pointers using application-created VkInstance; call this function after creating the Vulkan instance. */ void volkLoadInstance(VkInstance instance); /** * Load global function pointers using application-created VkInstance; call this function after creating the Vulkan instance. * Skips loading device-based function pointers, requires usage of volkLoadDevice afterwards. */ void volkLoadInstanceOnly(VkInstance instance); /** * Load global function pointers using application-created VkDevice; call this function after creating the Vulkan device. * * Note: this is not suitable for applications that want to use multiple VkDevice objects concurrently. */ void volkLoadDevice(VkDevice device); /** * Return last VkInstance for which global function pointers have been loaded via volkLoadInstance(), * or VK_NULL_HANDLE if volkLoadInstance() has not been called. */ VkInstance volkGetLoadedInstance(void); /** * Return last VkDevice for which global function pointers have been loaded via volkLoadDevice(), * or VK_NULL_HANDLE if volkLoadDevice() has not been called. */ VkDevice volkGetLoadedDevice(void); /** * Load function pointers using application-created VkDevice into a table. * Application should use function pointers from that table instead of using global function pointers. */ void volkLoadDeviceTable(struct VolkDeviceTable* table, VkDevice device); /** * Device-specific function pointer table */ struct VolkDeviceTable { /* VOLK_GENERATE_DEVICE_TABLE */ #if defined(VK_VERSION_1_0) PFN_vkAllocateCommandBuffers vkAllocateCommandBuffers; PFN_vkAllocateDescriptorSets vkAllocateDescriptorSets; PFN_vkAllocateMemory vkAllocateMemory; PFN_vkBeginCommandBuffer vkBeginCommandBuffer; PFN_vkBindBufferMemory vkBindBufferMemory; PFN_vkBindImageMemory vkBindImageMemory; PFN_vkCmdBeginQuery vkCmdBeginQuery; PFN_vkCmdBeginRenderPass vkCmdBeginRenderPass; PFN_vkCmdBindDescriptorSets vkCmdBindDescriptorSets; PFN_vkCmdBindIndexBuffer vkCmdBindIndexBuffer; PFN_vkCmdBindPipeline vkCmdBindPipeline; PFN_vkCmdBindVertexBuffers vkCmdBindVertexBuffers; PFN_vkCmdBlitImage vkCmdBlitImage; PFN_vkCmdClearAttachments vkCmdClearAttachments; PFN_vkCmdClearColorImage vkCmdClearColorImage; PFN_vkCmdClearDepthStencilImage vkCmdClearDepthStencilImage; PFN_vkCmdCopyBuffer vkCmdCopyBuffer; PFN_vkCmdCopyBufferToImage vkCmdCopyBufferToImage; PFN_vkCmdCopyImage vkCmdCopyImage; PFN_vkCmdCopyImageToBuffer vkCmdCopyImageToBuffer; PFN_vkCmdCopyQueryPoolResults vkCmdCopyQueryPoolResults; PFN_vkCmdDispatch vkCmdDispatch; PFN_vkCmdDispatchIndirect vkCmdDispatchIndirect; PFN_vkCmdDraw vkCmdDraw; PFN_vkCmdDrawIndexed vkCmdDrawIndexed; PFN_vkCmdDrawIndexedIndirect vkCmdDrawIndexedIndirect; PFN_vkCmdDrawIndirect vkCmdDrawIndirect; PFN_vkCmdEndQuery vkCmdEndQuery; PFN_vkCmdEndRenderPass vkCmdEndRenderPass; PFN_vkCmdExecuteCommands vkCmdExecuteCommands; PFN_vkCmdFillBuffer vkCmdFillBuffer; PFN_vkCmdNextSubpass vkCmdNextSubpass; PFN_vkCmdPipelineBarrier vkCmdPipelineBarrier; PFN_vkCmdPushConstants vkCmdPushConstants; PFN_vkCmdResetEvent vkCmdResetEvent; PFN_vkCmdResetQueryPool vkCmdResetQueryPool; PFN_vkCmdResolveImage vkCmdResolveImage; PFN_vkCmdSetBlendConstants vkCmdSetBlendConstants; PFN_vkCmdSetDepthBias vkCmdSetDepthBias; PFN_vkCmdSetDepthBounds vkCmdSetDepthBounds; PFN_vkCmdSetEvent vkCmdSetEvent; PFN_vkCmdSetLineWidth vkCmdSetLineWidth; PFN_vkCmdSetScissor vkCmdSetScissor; PFN_vkCmdSetStencilCompareMask vkCmdSetStencilCompareMask; PFN_vkCmdSetStencilReference vkCmdSetStencilReference; PFN_vkCmdSetStencilWriteMask vkCmdSetStencilWriteMask; PFN_vkCmdSetViewport vkCmdSetViewport; PFN_vkCmdUpdateBuffer vkCmdUpdateBuffer; PFN_vkCmdWaitEvents vkCmdWaitEvents; PFN_vkCmdWriteTimestamp vkCmdWriteTimestamp; PFN_vkCreateBuffer vkCreateBuffer; PFN_vkCreateBufferView vkCreateBufferView; PFN_vkCreateCommandPool vkCreateCommandPool; PFN_vkCreateComputePipelines vkCreateComputePipelines; PFN_vkCreateDescriptorPool vkCreateDescriptorPool; PFN_vkCreateDescriptorSetLayout vkCreateDescriptorSetLayout; PFN_vkCreateEvent vkCreateEvent; PFN_vkCreateFence vkCreateFence; PFN_vkCreateFramebuffer vkCreateFramebuffer; PFN_vkCreateGraphicsPipelines vkCreateGraphicsPipelines; PFN_vkCreateImage vkCreateImage; PFN_vkCreateImageView vkCreateImageView; PFN_vkCreatePipelineCache vkCreatePipelineCache; PFN_vkCreatePipelineLayout vkCreatePipelineLayout; PFN_vkCreateQueryPool vkCreateQueryPool; PFN_vkCreateRenderPass vkCreateRenderPass; PFN_vkCreateSampler vkCreateSampler; PFN_vkCreateSemaphore vkCreateSemaphore; PFN_vkCreateShaderModule vkCreateShaderModule; PFN_vkDestroyBuffer vkDestroyBuffer; PFN_vkDestroyBufferView vkDestroyBufferView; PFN_vkDestroyCommandPool vkDestroyCommandPool; PFN_vkDestroyDescriptorPool vkDestroyDescriptorPool; PFN_vkDestroyDescriptorSetLayout vkDestroyDescriptorSetLayout; PFN_vkDestroyDevice vkDestroyDevice; PFN_vkDestroyEvent vkDestroyEvent; PFN_vkDestroyFence vkDestroyFence; PFN_vkDestroyFramebuffer vkDestroyFramebuffer; PFN_vkDestroyImage vkDestroyImage; PFN_vkDestroyImageView vkDestroyImageView; PFN_vkDestroyPipeline vkDestroyPipeline; PFN_vkDestroyPipelineCache vkDestroyPipelineCache; PFN_vkDestroyPipelineLayout vkDestroyPipelineLayout; PFN_vkDestroyQueryPool vkDestroyQueryPool; PFN_vkDestroyRenderPass vkDestroyRenderPass; PFN_vkDestroySampler vkDestroySampler; PFN_vkDestroySemaphore vkDestroySemaphore; PFN_vkDestroyShaderModule vkDestroyShaderModule; PFN_vkDeviceWaitIdle vkDeviceWaitIdle; PFN_vkEndCommandBuffer vkEndCommandBuffer; PFN_vkFlushMappedMemoryRanges vkFlushMappedMemoryRanges; PFN_vkFreeCommandBuffers vkFreeCommandBuffers; PFN_vkFreeDescriptorSets vkFreeDescriptorSets; PFN_vkFreeMemory vkFreeMemory; PFN_vkGetBufferMemoryRequirements vkGetBufferMemoryRequirements; PFN_vkGetDeviceMemoryCommitment vkGetDeviceMemoryCommitment; PFN_vkGetDeviceQueue vkGetDeviceQueue; PFN_vkGetEventStatus vkGetEventStatus; PFN_vkGetFenceStatus vkGetFenceStatus; PFN_vkGetImageMemoryRequirements vkGetImageMemoryRequirements; PFN_vkGetImageSparseMemoryRequirements vkGetImageSparseMemoryRequirements; PFN_vkGetImageSubresourceLayout vkGetImageSubresourceLayout; PFN_vkGetPipelineCacheData vkGetPipelineCacheData; PFN_vkGetQueryPoolResults vkGetQueryPoolResults; PFN_vkGetRenderAreaGranularity vkGetRenderAreaGranularity; PFN_vkInvalidateMappedMemoryRanges vkInvalidateMappedMemoryRanges; PFN_vkMapMemory vkMapMemory; PFN_vkMergePipelineCaches vkMergePipelineCaches; PFN_vkQueueBindSparse vkQueueBindSparse; PFN_vkQueueSubmit vkQueueSubmit; PFN_vkQueueWaitIdle vkQueueWaitIdle; PFN_vkResetCommandBuffer vkResetCommandBuffer; PFN_vkResetCommandPool vkResetCommandPool; PFN_vkResetDescriptorPool vkResetDescriptorPool; PFN_vkResetEvent vkResetEvent; PFN_vkResetFences vkResetFences; PFN_vkSetEvent vkSetEvent; PFN_vkUnmapMemory vkUnmapMemory; PFN_vkUpdateDescriptorSets vkUpdateDescriptorSets; PFN_vkWaitForFences vkWaitForFences; #endif /* defined(VK_VERSION_1_0) */ #if defined(VK_VERSION_1_1) PFN_vkBindBufferMemory2 vkBindBufferMemory2; PFN_vkBindImageMemory2 vkBindImageMemory2; PFN_vkCmdDispatchBase vkCmdDispatchBase; PFN_vkCmdSetDeviceMask vkCmdSetDeviceMask; PFN_vkCreateDescriptorUpdateTemplate vkCreateDescriptorUpdateTemplate; PFN_vkCreateSamplerYcbcrConversion vkCreateSamplerYcbcrConversion; PFN_vkDestroyDescriptorUpdateTemplate vkDestroyDescriptorUpdateTemplate; PFN_vkDestroySamplerYcbcrConversion vkDestroySamplerYcbcrConversion; PFN_vkGetBufferMemoryRequirements2 vkGetBufferMemoryRequirements2; PFN_vkGetDescriptorSetLayoutSupport vkGetDescriptorSetLayoutSupport; PFN_vkGetDeviceGroupPeerMemoryFeatures vkGetDeviceGroupPeerMemoryFeatures; PFN_vkGetDeviceQueue2 vkGetDeviceQueue2; PFN_vkGetImageMemoryRequirements2 vkGetImageMemoryRequirements2; PFN_vkGetImageSparseMemoryRequirements2 vkGetImageSparseMemoryRequirements2; PFN_vkTrimCommandPool vkTrimCommandPool; PFN_vkUpdateDescriptorSetWithTemplate vkUpdateDescriptorSetWithTemplate; #endif /* defined(VK_VERSION_1_1) */ #if defined(VK_VERSION_1_2) PFN_vkCmdBeginRenderPass2 vkCmdBeginRenderPass2; PFN_vkCmdDrawIndexedIndirectCount vkCmdDrawIndexedIndirectCount; PFN_vkCmdDrawIndirectCount vkCmdDrawIndirectCount; PFN_vkCmdEndRenderPass2 vkCmdEndRenderPass2; PFN_vkCmdNextSubpass2 vkCmdNextSubpass2; PFN_vkCreateRenderPass2 vkCreateRenderPass2; PFN_vkGetBufferDeviceAddress vkGetBufferDeviceAddress; PFN_vkGetBufferOpaqueCaptureAddress vkGetBufferOpaqueCaptureAddress; PFN_vkGetDeviceMemoryOpaqueCaptureAddress vkGetDeviceMemoryOpaqueCaptureAddress; PFN_vkGetSemaphoreCounterValue vkGetSemaphoreCounterValue; PFN_vkResetQueryPool vkResetQueryPool; PFN_vkSignalSemaphore vkSignalSemaphore; PFN_vkWaitSemaphores vkWaitSemaphores; #endif /* defined(VK_VERSION_1_2) */ #if defined(VK_VERSION_1_3) PFN_vkCmdBeginRendering vkCmdBeginRendering; PFN_vkCmdBindVertexBuffers2 vkCmdBindVertexBuffers2; PFN_vkCmdBlitImage2 vkCmdBlitImage2; PFN_vkCmdCopyBuffer2 vkCmdCopyBuffer2; PFN_vkCmdCopyBufferToImage2 vkCmdCopyBufferToImage2; PFN_vkCmdCopyImage2 vkCmdCopyImage2; PFN_vkCmdCopyImageToBuffer2 vkCmdCopyImageToBuffer2; PFN_vkCmdEndRendering vkCmdEndRendering; PFN_vkCmdPipelineBarrier2 vkCmdPipelineBarrier2; PFN_vkCmdResetEvent2 vkCmdResetEvent2; PFN_vkCmdResolveImage2 vkCmdResolveImage2; PFN_vkCmdSetCullMode vkCmdSetCullMode; PFN_vkCmdSetDepthBiasEnable vkCmdSetDepthBiasEnable; PFN_vkCmdSetDepthBoundsTestEnable vkCmdSetDepthBoundsTestEnable; PFN_vkCmdSetDepthCompareOp vkCmdSetDepthCompareOp; PFN_vkCmdSetDepthTestEnable vkCmdSetDepthTestEnable; PFN_vkCmdSetDepthWriteEnable vkCmdSetDepthWriteEnable; PFN_vkCmdSetEvent2 vkCmdSetEvent2; PFN_vkCmdSetFrontFace vkCmdSetFrontFace; PFN_vkCmdSetPrimitiveRestartEnable vkCmdSetPrimitiveRestartEnable; PFN_vkCmdSetPrimitiveTopology vkCmdSetPrimitiveTopology; PFN_vkCmdSetRasterizerDiscardEnable vkCmdSetRasterizerDiscardEnable; PFN_vkCmdSetScissorWithCount vkCmdSetScissorWithCount; PFN_vkCmdSetStencilOp vkCmdSetStencilOp; PFN_vkCmdSetStencilTestEnable vkCmdSetStencilTestEnable; PFN_vkCmdSetViewportWithCount vkCmdSetViewportWithCount; PFN_vkCmdWaitEvents2 vkCmdWaitEvents2; PFN_vkCmdWriteTimestamp2 vkCmdWriteTimestamp2; PFN_vkCreatePrivateDataSlot vkCreatePrivateDataSlot; PFN_vkDestroyPrivateDataSlot vkDestroyPrivateDataSlot; PFN_vkGetDeviceBufferMemoryRequirements vkGetDeviceBufferMemoryRequirements; PFN_vkGetDeviceImageMemoryRequirements vkGetDeviceImageMemoryRequirements; PFN_vkGetDeviceImageSparseMemoryRequirements vkGetDeviceImageSparseMemoryRequirements; PFN_vkGetPrivateData vkGetPrivateData; PFN_vkQueueSubmit2 vkQueueSubmit2; PFN_vkSetPrivateData vkSetPrivateData; #endif /* defined(VK_VERSION_1_3) */ #if defined(VK_VERSION_1_4) PFN_vkCmdBindDescriptorSets2 vkCmdBindDescriptorSets2; PFN_vkCmdBindIndexBuffer2 vkCmdBindIndexBuffer2; PFN_vkCmdPushConstants2 vkCmdPushConstants2; PFN_vkCmdPushDescriptorSet vkCmdPushDescriptorSet; PFN_vkCmdPushDescriptorSet2 vkCmdPushDescriptorSet2; PFN_vkCmdPushDescriptorSetWithTemplate vkCmdPushDescriptorSetWithTemplate; PFN_vkCmdPushDescriptorSetWithTemplate2 vkCmdPushDescriptorSetWithTemplate2; PFN_vkCmdSetLineStipple vkCmdSetLineStipple; PFN_vkCmdSetRenderingAttachmentLocations vkCmdSetRenderingAttachmentLocations; PFN_vkCmdSetRenderingInputAttachmentIndices vkCmdSetRenderingInputAttachmentIndices; PFN_vkCopyImageToImage vkCopyImageToImage; PFN_vkCopyImageToMemory vkCopyImageToMemory; PFN_vkCopyMemoryToImage vkCopyMemoryToImage; PFN_vkGetDeviceImageSubresourceLayout vkGetDeviceImageSubresourceLayout; PFN_vkGetImageSubresourceLayout2 vkGetImageSubresourceLayout2; PFN_vkGetRenderingAreaGranularity vkGetRenderingAreaGranularity; PFN_vkMapMemory2 vkMapMemory2; PFN_vkTransitionImageLayout vkTransitionImageLayout; PFN_vkUnmapMemory2 vkUnmapMemory2; #endif /* defined(VK_VERSION_1_4) */ #if defined(VK_AMDX_shader_enqueue) PFN_vkCmdDispatchGraphAMDX vkCmdDispatchGraphAMDX; PFN_vkCmdDispatchGraphIndirectAMDX vkCmdDispatchGraphIndirectAMDX; PFN_vkCmdDispatchGraphIndirectCountAMDX vkCmdDispatchGraphIndirectCountAMDX; PFN_vkCmdInitializeGraphScratchMemoryAMDX vkCmdInitializeGraphScratchMemoryAMDX; PFN_vkCreateExecutionGraphPipelinesAMDX vkCreateExecutionGraphPipelinesAMDX; PFN_vkGetExecutionGraphPipelineNodeIndexAMDX vkGetExecutionGraphPipelineNodeIndexAMDX; PFN_vkGetExecutionGraphPipelineScratchSizeAMDX vkGetExecutionGraphPipelineScratchSizeAMDX; #endif /* defined(VK_AMDX_shader_enqueue) */ #if defined(VK_AMD_anti_lag) PFN_vkAntiLagUpdateAMD vkAntiLagUpdateAMD; #endif /* defined(VK_AMD_anti_lag) */ #if defined(VK_AMD_buffer_marker) PFN_vkCmdWriteBufferMarkerAMD vkCmdWriteBufferMarkerAMD; #endif /* defined(VK_AMD_buffer_marker) */ #if defined(VK_AMD_buffer_marker) && (defined(VK_VERSION_1_3) || defined(VK_KHR_synchronization2)) PFN_vkCmdWriteBufferMarker2AMD vkCmdWriteBufferMarker2AMD; #endif /* defined(VK_AMD_buffer_marker) && (defined(VK_VERSION_1_3) || defined(VK_KHR_synchronization2)) */ #if defined(VK_AMD_display_native_hdr) PFN_vkSetLocalDimmingAMD vkSetLocalDimmingAMD; #endif /* defined(VK_AMD_display_native_hdr) */ #if defined(VK_AMD_draw_indirect_count) PFN_vkCmdDrawIndexedIndirectCountAMD vkCmdDrawIndexedIndirectCountAMD; PFN_vkCmdDrawIndirectCountAMD vkCmdDrawIndirectCountAMD; #endif /* defined(VK_AMD_draw_indirect_count) */ #if defined(VK_AMD_shader_info) PFN_vkGetShaderInfoAMD vkGetShaderInfoAMD; #endif /* defined(VK_AMD_shader_info) */ #if defined(VK_ANDROID_external_memory_android_hardware_buffer) PFN_vkGetAndroidHardwareBufferPropertiesANDROID vkGetAndroidHardwareBufferPropertiesANDROID; PFN_vkGetMemoryAndroidHardwareBufferANDROID vkGetMemoryAndroidHardwareBufferANDROID; #endif /* defined(VK_ANDROID_external_memory_android_hardware_buffer) */ #if defined(VK_EXT_attachment_feedback_loop_dynamic_state) PFN_vkCmdSetAttachmentFeedbackLoopEnableEXT vkCmdSetAttachmentFeedbackLoopEnableEXT; #endif /* defined(VK_EXT_attachment_feedback_loop_dynamic_state) */ #if defined(VK_EXT_buffer_device_address) PFN_vkGetBufferDeviceAddressEXT vkGetBufferDeviceAddressEXT; #endif /* defined(VK_EXT_buffer_device_address) */ #if defined(VK_EXT_calibrated_timestamps) PFN_vkGetCalibratedTimestampsEXT vkGetCalibratedTimestampsEXT; #endif /* defined(VK_EXT_calibrated_timestamps) */ #if defined(VK_EXT_color_write_enable) PFN_vkCmdSetColorWriteEnableEXT vkCmdSetColorWriteEnableEXT; #endif /* defined(VK_EXT_color_write_enable) */ #if defined(VK_EXT_conditional_rendering) PFN_vkCmdBeginConditionalRenderingEXT vkCmdBeginConditionalRenderingEXT; PFN_vkCmdEndConditionalRenderingEXT vkCmdEndConditionalRenderingEXT; #endif /* defined(VK_EXT_conditional_rendering) */ #if defined(VK_EXT_debug_marker) PFN_vkCmdDebugMarkerBeginEXT vkCmdDebugMarkerBeginEXT; PFN_vkCmdDebugMarkerEndEXT vkCmdDebugMarkerEndEXT; PFN_vkCmdDebugMarkerInsertEXT vkCmdDebugMarkerInsertEXT; PFN_vkDebugMarkerSetObjectNameEXT vkDebugMarkerSetObjectNameEXT; PFN_vkDebugMarkerSetObjectTagEXT vkDebugMarkerSetObjectTagEXT; #endif /* defined(VK_EXT_debug_marker) */ #if defined(VK_EXT_depth_bias_control) PFN_vkCmdSetDepthBias2EXT vkCmdSetDepthBias2EXT; #endif /* defined(VK_EXT_depth_bias_control) */ #if defined(VK_EXT_descriptor_buffer) PFN_vkCmdBindDescriptorBufferEmbeddedSamplersEXT vkCmdBindDescriptorBufferEmbeddedSamplersEXT; PFN_vkCmdBindDescriptorBuffersEXT vkCmdBindDescriptorBuffersEXT; PFN_vkCmdSetDescriptorBufferOffsetsEXT vkCmdSetDescriptorBufferOffsetsEXT; PFN_vkGetBufferOpaqueCaptureDescriptorDataEXT vkGetBufferOpaqueCaptureDescriptorDataEXT; PFN_vkGetDescriptorEXT vkGetDescriptorEXT; PFN_vkGetDescriptorSetLayoutBindingOffsetEXT vkGetDescriptorSetLayoutBindingOffsetEXT; PFN_vkGetDescriptorSetLayoutSizeEXT vkGetDescriptorSetLayoutSizeEXT; PFN_vkGetImageOpaqueCaptureDescriptorDataEXT vkGetImageOpaqueCaptureDescriptorDataEXT; PFN_vkGetImageViewOpaqueCaptureDescriptorDataEXT vkGetImageViewOpaqueCaptureDescriptorDataEXT; PFN_vkGetSamplerOpaqueCaptureDescriptorDataEXT vkGetSamplerOpaqueCaptureDescriptorDataEXT; #endif /* defined(VK_EXT_descriptor_buffer) */ #if defined(VK_EXT_descriptor_buffer) && (defined(VK_KHR_acceleration_structure) || defined(VK_NV_ray_tracing)) PFN_vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT; #endif /* defined(VK_EXT_descriptor_buffer) && (defined(VK_KHR_acceleration_structure) || defined(VK_NV_ray_tracing)) */ #if defined(VK_EXT_device_fault) PFN_vkGetDeviceFaultInfoEXT vkGetDeviceFaultInfoEXT; #endif /* defined(VK_EXT_device_fault) */ #if defined(VK_EXT_device_generated_commands) PFN_vkCmdExecuteGeneratedCommandsEXT vkCmdExecuteGeneratedCommandsEXT; PFN_vkCmdPreprocessGeneratedCommandsEXT vkCmdPreprocessGeneratedCommandsEXT; PFN_vkCreateIndirectCommandsLayoutEXT vkCreateIndirectCommandsLayoutEXT; PFN_vkCreateIndirectExecutionSetEXT vkCreateIndirectExecutionSetEXT; PFN_vkDestroyIndirectCommandsLayoutEXT vkDestroyIndirectCommandsLayoutEXT; PFN_vkDestroyIndirectExecutionSetEXT vkDestroyIndirectExecutionSetEXT; PFN_vkGetGeneratedCommandsMemoryRequirementsEXT vkGetGeneratedCommandsMemoryRequirementsEXT; PFN_vkUpdateIndirectExecutionSetPipelineEXT vkUpdateIndirectExecutionSetPipelineEXT; PFN_vkUpdateIndirectExecutionSetShaderEXT vkUpdateIndirectExecutionSetShaderEXT; #endif /* defined(VK_EXT_device_generated_commands) */ #if defined(VK_EXT_discard_rectangles) PFN_vkCmdSetDiscardRectangleEXT vkCmdSetDiscardRectangleEXT; #endif /* defined(VK_EXT_discard_rectangles) */ #if defined(VK_EXT_discard_rectangles) && VK_EXT_DISCARD_RECTANGLES_SPEC_VERSION >= 2 PFN_vkCmdSetDiscardRectangleEnableEXT vkCmdSetDiscardRectangleEnableEXT; PFN_vkCmdSetDiscardRectangleModeEXT vkCmdSetDiscardRectangleModeEXT; #endif /* defined(VK_EXT_discard_rectangles) && VK_EXT_DISCARD_RECTANGLES_SPEC_VERSION >= 2 */ #if defined(VK_EXT_display_control) PFN_vkDisplayPowerControlEXT vkDisplayPowerControlEXT; PFN_vkGetSwapchainCounterEXT vkGetSwapchainCounterEXT; PFN_vkRegisterDeviceEventEXT vkRegisterDeviceEventEXT; PFN_vkRegisterDisplayEventEXT vkRegisterDisplayEventEXT; #endif /* defined(VK_EXT_display_control) */ #if defined(VK_EXT_external_memory_host) PFN_vkGetMemoryHostPointerPropertiesEXT vkGetMemoryHostPointerPropertiesEXT; #endif /* defined(VK_EXT_external_memory_host) */ #if defined(VK_EXT_external_memory_metal) PFN_vkGetMemoryMetalHandleEXT vkGetMemoryMetalHandleEXT; PFN_vkGetMemoryMetalHandlePropertiesEXT vkGetMemoryMetalHandlePropertiesEXT; #endif /* defined(VK_EXT_external_memory_metal) */ #if defined(VK_EXT_full_screen_exclusive) PFN_vkAcquireFullScreenExclusiveModeEXT vkAcquireFullScreenExclusiveModeEXT; PFN_vkReleaseFullScreenExclusiveModeEXT vkReleaseFullScreenExclusiveModeEXT; #endif /* defined(VK_EXT_full_screen_exclusive) */ #if defined(VK_EXT_full_screen_exclusive) && (defined(VK_KHR_device_group) || defined(VK_VERSION_1_1)) PFN_vkGetDeviceGroupSurfacePresentModes2EXT vkGetDeviceGroupSurfacePresentModes2EXT; #endif /* defined(VK_EXT_full_screen_exclusive) && (defined(VK_KHR_device_group) || defined(VK_VERSION_1_1)) */ #if defined(VK_EXT_hdr_metadata) PFN_vkSetHdrMetadataEXT vkSetHdrMetadataEXT; #endif /* defined(VK_EXT_hdr_metadata) */ #if defined(VK_EXT_host_image_copy) PFN_vkCopyImageToImageEXT vkCopyImageToImageEXT; PFN_vkCopyImageToMemoryEXT vkCopyImageToMemoryEXT; PFN_vkCopyMemoryToImageEXT vkCopyMemoryToImageEXT; PFN_vkTransitionImageLayoutEXT vkTransitionImageLayoutEXT; #endif /* defined(VK_EXT_host_image_copy) */ #if defined(VK_EXT_host_query_reset) PFN_vkResetQueryPoolEXT vkResetQueryPoolEXT; #endif /* defined(VK_EXT_host_query_reset) */ #if defined(VK_EXT_image_drm_format_modifier) PFN_vkGetImageDrmFormatModifierPropertiesEXT vkGetImageDrmFormatModifierPropertiesEXT; #endif /* defined(VK_EXT_image_drm_format_modifier) */ #if defined(VK_EXT_line_rasterization) PFN_vkCmdSetLineStippleEXT vkCmdSetLineStippleEXT; #endif /* defined(VK_EXT_line_rasterization) */ #if defined(VK_EXT_mesh_shader) PFN_vkCmdDrawMeshTasksEXT vkCmdDrawMeshTasksEXT; PFN_vkCmdDrawMeshTasksIndirectEXT vkCmdDrawMeshTasksIndirectEXT; #endif /* defined(VK_EXT_mesh_shader) */ #if defined(VK_EXT_mesh_shader) && (defined(VK_KHR_draw_indirect_count) || defined(VK_VERSION_1_2)) PFN_vkCmdDrawMeshTasksIndirectCountEXT vkCmdDrawMeshTasksIndirectCountEXT; #endif /* defined(VK_EXT_mesh_shader) && (defined(VK_KHR_draw_indirect_count) || defined(VK_VERSION_1_2)) */ #if defined(VK_EXT_metal_objects) PFN_vkExportMetalObjectsEXT vkExportMetalObjectsEXT; #endif /* defined(VK_EXT_metal_objects) */ #if defined(VK_EXT_multi_draw) PFN_vkCmdDrawMultiEXT vkCmdDrawMultiEXT; PFN_vkCmdDrawMultiIndexedEXT vkCmdDrawMultiIndexedEXT; #endif /* defined(VK_EXT_multi_draw) */ #if defined(VK_EXT_opacity_micromap) PFN_vkBuildMicromapsEXT vkBuildMicromapsEXT; PFN_vkCmdBuildMicromapsEXT vkCmdBuildMicromapsEXT; PFN_vkCmdCopyMemoryToMicromapEXT vkCmdCopyMemoryToMicromapEXT; PFN_vkCmdCopyMicromapEXT vkCmdCopyMicromapEXT; PFN_vkCmdCopyMicromapToMemoryEXT vkCmdCopyMicromapToMemoryEXT; PFN_vkCmdWriteMicromapsPropertiesEXT vkCmdWriteMicromapsPropertiesEXT; PFN_vkCopyMemoryToMicromapEXT vkCopyMemoryToMicromapEXT; PFN_vkCopyMicromapEXT vkCopyMicromapEXT; PFN_vkCopyMicromapToMemoryEXT vkCopyMicromapToMemoryEXT; PFN_vkCreateMicromapEXT vkCreateMicromapEXT; PFN_vkDestroyMicromapEXT vkDestroyMicromapEXT; PFN_vkGetDeviceMicromapCompatibilityEXT vkGetDeviceMicromapCompatibilityEXT; PFN_vkGetMicromapBuildSizesEXT vkGetMicromapBuildSizesEXT; PFN_vkWriteMicromapsPropertiesEXT vkWriteMicromapsPropertiesEXT; #endif /* defined(VK_EXT_opacity_micromap) */ #if defined(VK_EXT_pageable_device_local_memory) PFN_vkSetDeviceMemoryPriorityEXT vkSetDeviceMemoryPriorityEXT; #endif /* defined(VK_EXT_pageable_device_local_memory) */ #if defined(VK_EXT_pipeline_properties) PFN_vkGetPipelinePropertiesEXT vkGetPipelinePropertiesEXT; #endif /* defined(VK_EXT_pipeline_properties) */ #if defined(VK_EXT_private_data) PFN_vkCreatePrivateDataSlotEXT vkCreatePrivateDataSlotEXT; PFN_vkDestroyPrivateDataSlotEXT vkDestroyPrivateDataSlotEXT; PFN_vkGetPrivateDataEXT vkGetPrivateDataEXT; PFN_vkSetPrivateDataEXT vkSetPrivateDataEXT; #endif /* defined(VK_EXT_private_data) */ #if defined(VK_EXT_sample_locations) PFN_vkCmdSetSampleLocationsEXT vkCmdSetSampleLocationsEXT; #endif /* defined(VK_EXT_sample_locations) */ #if defined(VK_EXT_shader_module_identifier) PFN_vkGetShaderModuleCreateInfoIdentifierEXT vkGetShaderModuleCreateInfoIdentifierEXT; PFN_vkGetShaderModuleIdentifierEXT vkGetShaderModuleIdentifierEXT; #endif /* defined(VK_EXT_shader_module_identifier) */ #if defined(VK_EXT_shader_object) PFN_vkCmdBindShadersEXT vkCmdBindShadersEXT; PFN_vkCreateShadersEXT vkCreateShadersEXT; PFN_vkDestroyShaderEXT vkDestroyShaderEXT; PFN_vkGetShaderBinaryDataEXT vkGetShaderBinaryDataEXT; #endif /* defined(VK_EXT_shader_object) */ #if defined(VK_EXT_swapchain_maintenance1) PFN_vkReleaseSwapchainImagesEXT vkReleaseSwapchainImagesEXT; #endif /* defined(VK_EXT_swapchain_maintenance1) */ #if defined(VK_EXT_transform_feedback) PFN_vkCmdBeginQueryIndexedEXT vkCmdBeginQueryIndexedEXT; PFN_vkCmdBeginTransformFeedbackEXT vkCmdBeginTransformFeedbackEXT; PFN_vkCmdBindTransformFeedbackBuffersEXT vkCmdBindTransformFeedbackBuffersEXT; PFN_vkCmdDrawIndirectByteCountEXT vkCmdDrawIndirectByteCountEXT; PFN_vkCmdEndQueryIndexedEXT vkCmdEndQueryIndexedEXT; PFN_vkCmdEndTransformFeedbackEXT vkCmdEndTransformFeedbackEXT; #endif /* defined(VK_EXT_transform_feedback) */ #if defined(VK_EXT_validation_cache) PFN_vkCreateValidationCacheEXT vkCreateValidationCacheEXT; PFN_vkDestroyValidationCacheEXT vkDestroyValidationCacheEXT; PFN_vkGetValidationCacheDataEXT vkGetValidationCacheDataEXT; PFN_vkMergeValidationCachesEXT vkMergeValidationCachesEXT; #endif /* defined(VK_EXT_validation_cache) */ #if defined(VK_FUCHSIA_buffer_collection) PFN_vkCreateBufferCollectionFUCHSIA vkCreateBufferCollectionFUCHSIA; PFN_vkDestroyBufferCollectionFUCHSIA vkDestroyBufferCollectionFUCHSIA; PFN_vkGetBufferCollectionPropertiesFUCHSIA vkGetBufferCollectionPropertiesFUCHSIA; PFN_vkSetBufferCollectionBufferConstraintsFUCHSIA vkSetBufferCollectionBufferConstraintsFUCHSIA; PFN_vkSetBufferCollectionImageConstraintsFUCHSIA vkSetBufferCollectionImageConstraintsFUCHSIA; #endif /* defined(VK_FUCHSIA_buffer_collection) */ #if defined(VK_FUCHSIA_external_memory) PFN_vkGetMemoryZirconHandleFUCHSIA vkGetMemoryZirconHandleFUCHSIA; PFN_vkGetMemoryZirconHandlePropertiesFUCHSIA vkGetMemoryZirconHandlePropertiesFUCHSIA; #endif /* defined(VK_FUCHSIA_external_memory) */ #if defined(VK_FUCHSIA_external_semaphore) PFN_vkGetSemaphoreZirconHandleFUCHSIA vkGetSemaphoreZirconHandleFUCHSIA; PFN_vkImportSemaphoreZirconHandleFUCHSIA vkImportSemaphoreZirconHandleFUCHSIA; #endif /* defined(VK_FUCHSIA_external_semaphore) */ #if defined(VK_GOOGLE_display_timing) PFN_vkGetPastPresentationTimingGOOGLE vkGetPastPresentationTimingGOOGLE; PFN_vkGetRefreshCycleDurationGOOGLE vkGetRefreshCycleDurationGOOGLE; #endif /* defined(VK_GOOGLE_display_timing) */ #if defined(VK_HUAWEI_cluster_culling_shader) PFN_vkCmdDrawClusterHUAWEI vkCmdDrawClusterHUAWEI; PFN_vkCmdDrawClusterIndirectHUAWEI vkCmdDrawClusterIndirectHUAWEI; #endif /* defined(VK_HUAWEI_cluster_culling_shader) */ #if defined(VK_HUAWEI_invocation_mask) PFN_vkCmdBindInvocationMaskHUAWEI vkCmdBindInvocationMaskHUAWEI; #endif /* defined(VK_HUAWEI_invocation_mask) */ #if defined(VK_HUAWEI_subpass_shading) && VK_HUAWEI_SUBPASS_SHADING_SPEC_VERSION >= 2 PFN_vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI; #endif /* defined(VK_HUAWEI_subpass_shading) && VK_HUAWEI_SUBPASS_SHADING_SPEC_VERSION >= 2 */ #if defined(VK_HUAWEI_subpass_shading) PFN_vkCmdSubpassShadingHUAWEI vkCmdSubpassShadingHUAWEI; #endif /* defined(VK_HUAWEI_subpass_shading) */ #if defined(VK_INTEL_performance_query) PFN_vkAcquirePerformanceConfigurationINTEL vkAcquirePerformanceConfigurationINTEL; PFN_vkCmdSetPerformanceMarkerINTEL vkCmdSetPerformanceMarkerINTEL; PFN_vkCmdSetPerformanceOverrideINTEL vkCmdSetPerformanceOverrideINTEL; PFN_vkCmdSetPerformanceStreamMarkerINTEL vkCmdSetPerformanceStreamMarkerINTEL; PFN_vkGetPerformanceParameterINTEL vkGetPerformanceParameterINTEL; PFN_vkInitializePerformanceApiINTEL vkInitializePerformanceApiINTEL; PFN_vkQueueSetPerformanceConfigurationINTEL vkQueueSetPerformanceConfigurationINTEL; PFN_vkReleasePerformanceConfigurationINTEL vkReleasePerformanceConfigurationINTEL; PFN_vkUninitializePerformanceApiINTEL vkUninitializePerformanceApiINTEL; #endif /* defined(VK_INTEL_performance_query) */ #if defined(VK_KHR_acceleration_structure) PFN_vkBuildAccelerationStructuresKHR vkBuildAccelerationStructuresKHR; PFN_vkCmdBuildAccelerationStructuresIndirectKHR vkCmdBuildAccelerationStructuresIndirectKHR; PFN_vkCmdBuildAccelerationStructuresKHR vkCmdBuildAccelerationStructuresKHR; PFN_vkCmdCopyAccelerationStructureKHR vkCmdCopyAccelerationStructureKHR; PFN_vkCmdCopyAccelerationStructureToMemoryKHR vkCmdCopyAccelerationStructureToMemoryKHR; PFN_vkCmdCopyMemoryToAccelerationStructureKHR vkCmdCopyMemoryToAccelerationStructureKHR; PFN_vkCmdWriteAccelerationStructuresPropertiesKHR vkCmdWriteAccelerationStructuresPropertiesKHR; PFN_vkCopyAccelerationStructureKHR vkCopyAccelerationStructureKHR; PFN_vkCopyAccelerationStructureToMemoryKHR vkCopyAccelerationStructureToMemoryKHR; PFN_vkCopyMemoryToAccelerationStructureKHR vkCopyMemoryToAccelerationStructureKHR; PFN_vkCreateAccelerationStructureKHR vkCreateAccelerationStructureKHR; PFN_vkDestroyAccelerationStructureKHR vkDestroyAccelerationStructureKHR; PFN_vkGetAccelerationStructureBuildSizesKHR vkGetAccelerationStructureBuildSizesKHR; PFN_vkGetAccelerationStructureDeviceAddressKHR vkGetAccelerationStructureDeviceAddressKHR; PFN_vkGetDeviceAccelerationStructureCompatibilityKHR vkGetDeviceAccelerationStructureCompatibilityKHR; PFN_vkWriteAccelerationStructuresPropertiesKHR vkWriteAccelerationStructuresPropertiesKHR; #endif /* defined(VK_KHR_acceleration_structure) */ #if defined(VK_KHR_bind_memory2) PFN_vkBindBufferMemory2KHR vkBindBufferMemory2KHR; PFN_vkBindImageMemory2KHR vkBindImageMemory2KHR; #endif /* defined(VK_KHR_bind_memory2) */ #if defined(VK_KHR_buffer_device_address) PFN_vkGetBufferDeviceAddressKHR vkGetBufferDeviceAddressKHR; PFN_vkGetBufferOpaqueCaptureAddressKHR vkGetBufferOpaqueCaptureAddressKHR; PFN_vkGetDeviceMemoryOpaqueCaptureAddressKHR vkGetDeviceMemoryOpaqueCaptureAddressKHR; #endif /* defined(VK_KHR_buffer_device_address) */ #if defined(VK_KHR_calibrated_timestamps) PFN_vkGetCalibratedTimestampsKHR vkGetCalibratedTimestampsKHR; #endif /* defined(VK_KHR_calibrated_timestamps) */ #if defined(VK_KHR_copy_commands2) PFN_vkCmdBlitImage2KHR vkCmdBlitImage2KHR; PFN_vkCmdCopyBuffer2KHR vkCmdCopyBuffer2KHR; PFN_vkCmdCopyBufferToImage2KHR vkCmdCopyBufferToImage2KHR; PFN_vkCmdCopyImage2KHR vkCmdCopyImage2KHR; PFN_vkCmdCopyImageToBuffer2KHR vkCmdCopyImageToBuffer2KHR; PFN_vkCmdResolveImage2KHR vkCmdResolveImage2KHR; #endif /* defined(VK_KHR_copy_commands2) */ #if defined(VK_KHR_create_renderpass2) PFN_vkCmdBeginRenderPass2KHR vkCmdBeginRenderPass2KHR; PFN_vkCmdEndRenderPass2KHR vkCmdEndRenderPass2KHR; PFN_vkCmdNextSubpass2KHR vkCmdNextSubpass2KHR; PFN_vkCreateRenderPass2KHR vkCreateRenderPass2KHR; #endif /* defined(VK_KHR_create_renderpass2) */ #if defined(VK_KHR_deferred_host_operations) PFN_vkCreateDeferredOperationKHR vkCreateDeferredOperationKHR; PFN_vkDeferredOperationJoinKHR vkDeferredOperationJoinKHR; PFN_vkDestroyDeferredOperationKHR vkDestroyDeferredOperationKHR; PFN_vkGetDeferredOperationMaxConcurrencyKHR vkGetDeferredOperationMaxConcurrencyKHR; PFN_vkGetDeferredOperationResultKHR vkGetDeferredOperationResultKHR; #endif /* defined(VK_KHR_deferred_host_operations) */ #if defined(VK_KHR_descriptor_update_template) PFN_vkCreateDescriptorUpdateTemplateKHR vkCreateDescriptorUpdateTemplateKHR; PFN_vkDestroyDescriptorUpdateTemplateKHR vkDestroyDescriptorUpdateTemplateKHR; PFN_vkUpdateDescriptorSetWithTemplateKHR vkUpdateDescriptorSetWithTemplateKHR; #endif /* defined(VK_KHR_descriptor_update_template) */ #if defined(VK_KHR_device_group) PFN_vkCmdDispatchBaseKHR vkCmdDispatchBaseKHR; PFN_vkCmdSetDeviceMaskKHR vkCmdSetDeviceMaskKHR; PFN_vkGetDeviceGroupPeerMemoryFeaturesKHR vkGetDeviceGroupPeerMemoryFeaturesKHR; #endif /* defined(VK_KHR_device_group) */ #if defined(VK_KHR_display_swapchain) PFN_vkCreateSharedSwapchainsKHR vkCreateSharedSwapchainsKHR; #endif /* defined(VK_KHR_display_swapchain) */ #if defined(VK_KHR_draw_indirect_count) PFN_vkCmdDrawIndexedIndirectCountKHR vkCmdDrawIndexedIndirectCountKHR; PFN_vkCmdDrawIndirectCountKHR vkCmdDrawIndirectCountKHR; #endif /* defined(VK_KHR_draw_indirect_count) */ #if defined(VK_KHR_dynamic_rendering) PFN_vkCmdBeginRenderingKHR vkCmdBeginRenderingKHR; PFN_vkCmdEndRenderingKHR vkCmdEndRenderingKHR; #endif /* defined(VK_KHR_dynamic_rendering) */ #if defined(VK_KHR_dynamic_rendering_local_read) PFN_vkCmdSetRenderingAttachmentLocationsKHR vkCmdSetRenderingAttachmentLocationsKHR; PFN_vkCmdSetRenderingInputAttachmentIndicesKHR vkCmdSetRenderingInputAttachmentIndicesKHR; #endif /* defined(VK_KHR_dynamic_rendering_local_read) */ #if defined(VK_KHR_external_fence_fd) PFN_vkGetFenceFdKHR vkGetFenceFdKHR; PFN_vkImportFenceFdKHR vkImportFenceFdKHR; #endif /* defined(VK_KHR_external_fence_fd) */ #if defined(VK_KHR_external_fence_win32) PFN_vkGetFenceWin32HandleKHR vkGetFenceWin32HandleKHR; PFN_vkImportFenceWin32HandleKHR vkImportFenceWin32HandleKHR; #endif /* defined(VK_KHR_external_fence_win32) */ #if defined(VK_KHR_external_memory_fd) PFN_vkGetMemoryFdKHR vkGetMemoryFdKHR; PFN_vkGetMemoryFdPropertiesKHR vkGetMemoryFdPropertiesKHR; #endif /* defined(VK_KHR_external_memory_fd) */ #if defined(VK_KHR_external_memory_win32) PFN_vkGetMemoryWin32HandleKHR vkGetMemoryWin32HandleKHR; PFN_vkGetMemoryWin32HandlePropertiesKHR vkGetMemoryWin32HandlePropertiesKHR; #endif /* defined(VK_KHR_external_memory_win32) */ #if defined(VK_KHR_external_semaphore_fd) PFN_vkGetSemaphoreFdKHR vkGetSemaphoreFdKHR; PFN_vkImportSemaphoreFdKHR vkImportSemaphoreFdKHR; #endif /* defined(VK_KHR_external_semaphore_fd) */ #if defined(VK_KHR_external_semaphore_win32) PFN_vkGetSemaphoreWin32HandleKHR vkGetSemaphoreWin32HandleKHR; PFN_vkImportSemaphoreWin32HandleKHR vkImportSemaphoreWin32HandleKHR; #endif /* defined(VK_KHR_external_semaphore_win32) */ #if defined(VK_KHR_fragment_shading_rate) PFN_vkCmdSetFragmentShadingRateKHR vkCmdSetFragmentShadingRateKHR; #endif /* defined(VK_KHR_fragment_shading_rate) */ #if defined(VK_KHR_get_memory_requirements2) PFN_vkGetBufferMemoryRequirements2KHR vkGetBufferMemoryRequirements2KHR; PFN_vkGetImageMemoryRequirements2KHR vkGetImageMemoryRequirements2KHR; PFN_vkGetImageSparseMemoryRequirements2KHR vkGetImageSparseMemoryRequirements2KHR; #endif /* defined(VK_KHR_get_memory_requirements2) */ #if defined(VK_KHR_line_rasterization) PFN_vkCmdSetLineStippleKHR vkCmdSetLineStippleKHR; #endif /* defined(VK_KHR_line_rasterization) */ #if defined(VK_KHR_maintenance1) PFN_vkTrimCommandPoolKHR vkTrimCommandPoolKHR; #endif /* defined(VK_KHR_maintenance1) */ #if defined(VK_KHR_maintenance3) PFN_vkGetDescriptorSetLayoutSupportKHR vkGetDescriptorSetLayoutSupportKHR; #endif /* defined(VK_KHR_maintenance3) */ #if defined(VK_KHR_maintenance4) PFN_vkGetDeviceBufferMemoryRequirementsKHR vkGetDeviceBufferMemoryRequirementsKHR; PFN_vkGetDeviceImageMemoryRequirementsKHR vkGetDeviceImageMemoryRequirementsKHR; PFN_vkGetDeviceImageSparseMemoryRequirementsKHR vkGetDeviceImageSparseMemoryRequirementsKHR; #endif /* defined(VK_KHR_maintenance4) */ #if defined(VK_KHR_maintenance5) PFN_vkCmdBindIndexBuffer2KHR vkCmdBindIndexBuffer2KHR; PFN_vkGetDeviceImageSubresourceLayoutKHR vkGetDeviceImageSubresourceLayoutKHR; PFN_vkGetImageSubresourceLayout2KHR vkGetImageSubresourceLayout2KHR; PFN_vkGetRenderingAreaGranularityKHR vkGetRenderingAreaGranularityKHR; #endif /* defined(VK_KHR_maintenance5) */ #if defined(VK_KHR_maintenance6) PFN_vkCmdBindDescriptorSets2KHR vkCmdBindDescriptorSets2KHR; PFN_vkCmdPushConstants2KHR vkCmdPushConstants2KHR; #endif /* defined(VK_KHR_maintenance6) */ #if defined(VK_KHR_maintenance6) && defined(VK_KHR_push_descriptor) PFN_vkCmdPushDescriptorSet2KHR vkCmdPushDescriptorSet2KHR; PFN_vkCmdPushDescriptorSetWithTemplate2KHR vkCmdPushDescriptorSetWithTemplate2KHR; #endif /* defined(VK_KHR_maintenance6) && defined(VK_KHR_push_descriptor) */ #if defined(VK_KHR_maintenance6) && defined(VK_EXT_descriptor_buffer) PFN_vkCmdBindDescriptorBufferEmbeddedSamplers2EXT vkCmdBindDescriptorBufferEmbeddedSamplers2EXT; PFN_vkCmdSetDescriptorBufferOffsets2EXT vkCmdSetDescriptorBufferOffsets2EXT; #endif /* defined(VK_KHR_maintenance6) && defined(VK_EXT_descriptor_buffer) */ #if defined(VK_KHR_map_memory2) PFN_vkMapMemory2KHR vkMapMemory2KHR; PFN_vkUnmapMemory2KHR vkUnmapMemory2KHR; #endif /* defined(VK_KHR_map_memory2) */ #if defined(VK_KHR_performance_query) PFN_vkAcquireProfilingLockKHR vkAcquireProfilingLockKHR; PFN_vkReleaseProfilingLockKHR vkReleaseProfilingLockKHR; #endif /* defined(VK_KHR_performance_query) */ #if defined(VK_KHR_pipeline_binary) PFN_vkCreatePipelineBinariesKHR vkCreatePipelineBinariesKHR; PFN_vkDestroyPipelineBinaryKHR vkDestroyPipelineBinaryKHR; PFN_vkGetPipelineBinaryDataKHR vkGetPipelineBinaryDataKHR; PFN_vkGetPipelineKeyKHR vkGetPipelineKeyKHR; PFN_vkReleaseCapturedPipelineDataKHR vkReleaseCapturedPipelineDataKHR; #endif /* defined(VK_KHR_pipeline_binary) */ #if defined(VK_KHR_pipeline_executable_properties) PFN_vkGetPipelineExecutableInternalRepresentationsKHR vkGetPipelineExecutableInternalRepresentationsKHR; PFN_vkGetPipelineExecutablePropertiesKHR vkGetPipelineExecutablePropertiesKHR; PFN_vkGetPipelineExecutableStatisticsKHR vkGetPipelineExecutableStatisticsKHR; #endif /* defined(VK_KHR_pipeline_executable_properties) */ #if defined(VK_KHR_present_wait) PFN_vkWaitForPresentKHR vkWaitForPresentKHR; #endif /* defined(VK_KHR_present_wait) */ #if defined(VK_KHR_push_descriptor) PFN_vkCmdPushDescriptorSetKHR vkCmdPushDescriptorSetKHR; #endif /* defined(VK_KHR_push_descriptor) */ #if defined(VK_KHR_ray_tracing_maintenance1) && defined(VK_KHR_ray_tracing_pipeline) PFN_vkCmdTraceRaysIndirect2KHR vkCmdTraceRaysIndirect2KHR; #endif /* defined(VK_KHR_ray_tracing_maintenance1) && defined(VK_KHR_ray_tracing_pipeline) */ #if defined(VK_KHR_ray_tracing_pipeline) PFN_vkCmdSetRayTracingPipelineStackSizeKHR vkCmdSetRayTracingPipelineStackSizeKHR; PFN_vkCmdTraceRaysIndirectKHR vkCmdTraceRaysIndirectKHR; PFN_vkCmdTraceRaysKHR vkCmdTraceRaysKHR; PFN_vkCreateRayTracingPipelinesKHR vkCreateRayTracingPipelinesKHR; PFN_vkGetRayTracingCaptureReplayShaderGroupHandlesKHR vkGetRayTracingCaptureReplayShaderGroupHandlesKHR; PFN_vkGetRayTracingShaderGroupHandlesKHR vkGetRayTracingShaderGroupHandlesKHR; PFN_vkGetRayTracingShaderGroupStackSizeKHR vkGetRayTracingShaderGroupStackSizeKHR; #endif /* defined(VK_KHR_ray_tracing_pipeline) */ #if defined(VK_KHR_sampler_ycbcr_conversion) PFN_vkCreateSamplerYcbcrConversionKHR vkCreateSamplerYcbcrConversionKHR; PFN_vkDestroySamplerYcbcrConversionKHR vkDestroySamplerYcbcrConversionKHR; #endif /* defined(VK_KHR_sampler_ycbcr_conversion) */ #if defined(VK_KHR_shared_presentable_image) PFN_vkGetSwapchainStatusKHR vkGetSwapchainStatusKHR; #endif /* defined(VK_KHR_shared_presentable_image) */ #if defined(VK_KHR_swapchain) PFN_vkAcquireNextImageKHR vkAcquireNextImageKHR; PFN_vkCreateSwapchainKHR vkCreateSwapchainKHR; PFN_vkDestroySwapchainKHR vkDestroySwapchainKHR; PFN_vkGetSwapchainImagesKHR vkGetSwapchainImagesKHR; PFN_vkQueuePresentKHR vkQueuePresentKHR; #endif /* defined(VK_KHR_swapchain) */ #if defined(VK_KHR_synchronization2) PFN_vkCmdPipelineBarrier2KHR vkCmdPipelineBarrier2KHR; PFN_vkCmdResetEvent2KHR vkCmdResetEvent2KHR; PFN_vkCmdSetEvent2KHR vkCmdSetEvent2KHR; PFN_vkCmdWaitEvents2KHR vkCmdWaitEvents2KHR; PFN_vkCmdWriteTimestamp2KHR vkCmdWriteTimestamp2KHR; PFN_vkQueueSubmit2KHR vkQueueSubmit2KHR; #endif /* defined(VK_KHR_synchronization2) */ #if defined(VK_KHR_timeline_semaphore) PFN_vkGetSemaphoreCounterValueKHR vkGetSemaphoreCounterValueKHR; PFN_vkSignalSemaphoreKHR vkSignalSemaphoreKHR; PFN_vkWaitSemaphoresKHR vkWaitSemaphoresKHR; #endif /* defined(VK_KHR_timeline_semaphore) */ #if defined(VK_KHR_video_decode_queue) PFN_vkCmdDecodeVideoKHR vkCmdDecodeVideoKHR; #endif /* defined(VK_KHR_video_decode_queue) */ #if defined(VK_KHR_video_encode_queue) PFN_vkCmdEncodeVideoKHR vkCmdEncodeVideoKHR; PFN_vkGetEncodedVideoSessionParametersKHR vkGetEncodedVideoSessionParametersKHR; #endif /* defined(VK_KHR_video_encode_queue) */ #if defined(VK_KHR_video_queue) PFN_vkBindVideoSessionMemoryKHR vkBindVideoSessionMemoryKHR; PFN_vkCmdBeginVideoCodingKHR vkCmdBeginVideoCodingKHR; PFN_vkCmdControlVideoCodingKHR vkCmdControlVideoCodingKHR; PFN_vkCmdEndVideoCodingKHR vkCmdEndVideoCodingKHR; PFN_vkCreateVideoSessionKHR vkCreateVideoSessionKHR; PFN_vkCreateVideoSessionParametersKHR vkCreateVideoSessionParametersKHR; PFN_vkDestroyVideoSessionKHR vkDestroyVideoSessionKHR; PFN_vkDestroyVideoSessionParametersKHR vkDestroyVideoSessionParametersKHR; PFN_vkGetVideoSessionMemoryRequirementsKHR vkGetVideoSessionMemoryRequirementsKHR; PFN_vkUpdateVideoSessionParametersKHR vkUpdateVideoSessionParametersKHR; #endif /* defined(VK_KHR_video_queue) */ #if defined(VK_NVX_binary_import) PFN_vkCmdCuLaunchKernelNVX vkCmdCuLaunchKernelNVX; PFN_vkCreateCuFunctionNVX vkCreateCuFunctionNVX; PFN_vkCreateCuModuleNVX vkCreateCuModuleNVX; PFN_vkDestroyCuFunctionNVX vkDestroyCuFunctionNVX; PFN_vkDestroyCuModuleNVX vkDestroyCuModuleNVX; #endif /* defined(VK_NVX_binary_import) */ #if defined(VK_NVX_image_view_handle) PFN_vkGetImageViewHandleNVX vkGetImageViewHandleNVX; #endif /* defined(VK_NVX_image_view_handle) */ #if defined(VK_NVX_image_view_handle) && VK_NVX_IMAGE_VIEW_HANDLE_SPEC_VERSION >= 3 PFN_vkGetImageViewHandle64NVX vkGetImageViewHandle64NVX; #endif /* defined(VK_NVX_image_view_handle) && VK_NVX_IMAGE_VIEW_HANDLE_SPEC_VERSION >= 3 */ #if defined(VK_NVX_image_view_handle) && VK_NVX_IMAGE_VIEW_HANDLE_SPEC_VERSION >= 2 PFN_vkGetImageViewAddressNVX vkGetImageViewAddressNVX; #endif /* defined(VK_NVX_image_view_handle) && VK_NVX_IMAGE_VIEW_HANDLE_SPEC_VERSION >= 2 */ #if defined(VK_NV_clip_space_w_scaling) PFN_vkCmdSetViewportWScalingNV vkCmdSetViewportWScalingNV; #endif /* defined(VK_NV_clip_space_w_scaling) */ #if defined(VK_NV_cluster_acceleration_structure) PFN_vkCmdBuildClusterAccelerationStructureIndirectNV vkCmdBuildClusterAccelerationStructureIndirectNV; PFN_vkGetClusterAccelerationStructureBuildSizesNV vkGetClusterAccelerationStructureBuildSizesNV; #endif /* defined(VK_NV_cluster_acceleration_structure) */ #if defined(VK_NV_cooperative_vector) PFN_vkCmdConvertCooperativeVectorMatrixNV vkCmdConvertCooperativeVectorMatrixNV; PFN_vkConvertCooperativeVectorMatrixNV vkConvertCooperativeVectorMatrixNV; #endif /* defined(VK_NV_cooperative_vector) */ #if defined(VK_NV_copy_memory_indirect) PFN_vkCmdCopyMemoryIndirectNV vkCmdCopyMemoryIndirectNV; PFN_vkCmdCopyMemoryToImageIndirectNV vkCmdCopyMemoryToImageIndirectNV; #endif /* defined(VK_NV_copy_memory_indirect) */ #if defined(VK_NV_cuda_kernel_launch) PFN_vkCmdCudaLaunchKernelNV vkCmdCudaLaunchKernelNV; PFN_vkCreateCudaFunctionNV vkCreateCudaFunctionNV; PFN_vkCreateCudaModuleNV vkCreateCudaModuleNV; PFN_vkDestroyCudaFunctionNV vkDestroyCudaFunctionNV; PFN_vkDestroyCudaModuleNV vkDestroyCudaModuleNV; PFN_vkGetCudaModuleCacheNV vkGetCudaModuleCacheNV; #endif /* defined(VK_NV_cuda_kernel_launch) */ #if defined(VK_NV_device_diagnostic_checkpoints) PFN_vkCmdSetCheckpointNV vkCmdSetCheckpointNV; PFN_vkGetQueueCheckpointDataNV vkGetQueueCheckpointDataNV; #endif /* defined(VK_NV_device_diagnostic_checkpoints) */ #if defined(VK_NV_device_diagnostic_checkpoints) && (defined(VK_VERSION_1_3) || defined(VK_KHR_synchronization2)) PFN_vkGetQueueCheckpointData2NV vkGetQueueCheckpointData2NV; #endif /* defined(VK_NV_device_diagnostic_checkpoints) && (defined(VK_VERSION_1_3) || defined(VK_KHR_synchronization2)) */ #if defined(VK_NV_device_generated_commands) PFN_vkCmdBindPipelineShaderGroupNV vkCmdBindPipelineShaderGroupNV; PFN_vkCmdExecuteGeneratedCommandsNV vkCmdExecuteGeneratedCommandsNV; PFN_vkCmdPreprocessGeneratedCommandsNV vkCmdPreprocessGeneratedCommandsNV; PFN_vkCreateIndirectCommandsLayoutNV vkCreateIndirectCommandsLayoutNV; PFN_vkDestroyIndirectCommandsLayoutNV vkDestroyIndirectCommandsLayoutNV; PFN_vkGetGeneratedCommandsMemoryRequirementsNV vkGetGeneratedCommandsMemoryRequirementsNV; #endif /* defined(VK_NV_device_generated_commands) */ #if defined(VK_NV_device_generated_commands_compute) PFN_vkCmdUpdatePipelineIndirectBufferNV vkCmdUpdatePipelineIndirectBufferNV; PFN_vkGetPipelineIndirectDeviceAddressNV vkGetPipelineIndirectDeviceAddressNV; PFN_vkGetPipelineIndirectMemoryRequirementsNV vkGetPipelineIndirectMemoryRequirementsNV; #endif /* defined(VK_NV_device_generated_commands_compute) */ #if defined(VK_NV_external_memory_rdma) PFN_vkGetMemoryRemoteAddressNV vkGetMemoryRemoteAddressNV; #endif /* defined(VK_NV_external_memory_rdma) */ #if defined(VK_NV_external_memory_win32) PFN_vkGetMemoryWin32HandleNV vkGetMemoryWin32HandleNV; #endif /* defined(VK_NV_external_memory_win32) */ #if defined(VK_NV_fragment_shading_rate_enums) PFN_vkCmdSetFragmentShadingRateEnumNV vkCmdSetFragmentShadingRateEnumNV; #endif /* defined(VK_NV_fragment_shading_rate_enums) */ #if defined(VK_NV_low_latency2) PFN_vkGetLatencyTimingsNV vkGetLatencyTimingsNV; PFN_vkLatencySleepNV vkLatencySleepNV; PFN_vkQueueNotifyOutOfBandNV vkQueueNotifyOutOfBandNV; PFN_vkSetLatencyMarkerNV vkSetLatencyMarkerNV; PFN_vkSetLatencySleepModeNV vkSetLatencySleepModeNV; #endif /* defined(VK_NV_low_latency2) */ #if defined(VK_NV_memory_decompression) PFN_vkCmdDecompressMemoryIndirectCountNV vkCmdDecompressMemoryIndirectCountNV; PFN_vkCmdDecompressMemoryNV vkCmdDecompressMemoryNV; #endif /* defined(VK_NV_memory_decompression) */ #if defined(VK_NV_mesh_shader) PFN_vkCmdDrawMeshTasksIndirectNV vkCmdDrawMeshTasksIndirectNV; PFN_vkCmdDrawMeshTasksNV vkCmdDrawMeshTasksNV; #endif /* defined(VK_NV_mesh_shader) */ #if defined(VK_NV_mesh_shader) && (defined(VK_KHR_draw_indirect_count) || defined(VK_VERSION_1_2)) PFN_vkCmdDrawMeshTasksIndirectCountNV vkCmdDrawMeshTasksIndirectCountNV; #endif /* defined(VK_NV_mesh_shader) && (defined(VK_KHR_draw_indirect_count) || defined(VK_VERSION_1_2)) */ #if defined(VK_NV_optical_flow) PFN_vkBindOpticalFlowSessionImageNV vkBindOpticalFlowSessionImageNV; PFN_vkCmdOpticalFlowExecuteNV vkCmdOpticalFlowExecuteNV; PFN_vkCreateOpticalFlowSessionNV vkCreateOpticalFlowSessionNV; PFN_vkDestroyOpticalFlowSessionNV vkDestroyOpticalFlowSessionNV; #endif /* defined(VK_NV_optical_flow) */ #if defined(VK_NV_partitioned_acceleration_structure) PFN_vkCmdBuildPartitionedAccelerationStructuresNV vkCmdBuildPartitionedAccelerationStructuresNV; PFN_vkGetPartitionedAccelerationStructuresBuildSizesNV vkGetPartitionedAccelerationStructuresBuildSizesNV; #endif /* defined(VK_NV_partitioned_acceleration_structure) */ #if defined(VK_NV_ray_tracing) PFN_vkBindAccelerationStructureMemoryNV vkBindAccelerationStructureMemoryNV; PFN_vkCmdBuildAccelerationStructureNV vkCmdBuildAccelerationStructureNV; PFN_vkCmdCopyAccelerationStructureNV vkCmdCopyAccelerationStructureNV; PFN_vkCmdTraceRaysNV vkCmdTraceRaysNV; PFN_vkCmdWriteAccelerationStructuresPropertiesNV vkCmdWriteAccelerationStructuresPropertiesNV; PFN_vkCompileDeferredNV vkCompileDeferredNV; PFN_vkCreateAccelerationStructureNV vkCreateAccelerationStructureNV; PFN_vkCreateRayTracingPipelinesNV vkCreateRayTracingPipelinesNV; PFN_vkDestroyAccelerationStructureNV vkDestroyAccelerationStructureNV; PFN_vkGetAccelerationStructureHandleNV vkGetAccelerationStructureHandleNV; PFN_vkGetAccelerationStructureMemoryRequirementsNV vkGetAccelerationStructureMemoryRequirementsNV; PFN_vkGetRayTracingShaderGroupHandlesNV vkGetRayTracingShaderGroupHandlesNV; #endif /* defined(VK_NV_ray_tracing) */ #if defined(VK_NV_scissor_exclusive) && VK_NV_SCISSOR_EXCLUSIVE_SPEC_VERSION >= 2 PFN_vkCmdSetExclusiveScissorEnableNV vkCmdSetExclusiveScissorEnableNV; #endif /* defined(VK_NV_scissor_exclusive) && VK_NV_SCISSOR_EXCLUSIVE_SPEC_VERSION >= 2 */ #if defined(VK_NV_scissor_exclusive) PFN_vkCmdSetExclusiveScissorNV vkCmdSetExclusiveScissorNV; #endif /* defined(VK_NV_scissor_exclusive) */ #if defined(VK_NV_shading_rate_image) PFN_vkCmdBindShadingRateImageNV vkCmdBindShadingRateImageNV; PFN_vkCmdSetCoarseSampleOrderNV vkCmdSetCoarseSampleOrderNV; PFN_vkCmdSetViewportShadingRatePaletteNV vkCmdSetViewportShadingRatePaletteNV; #endif /* defined(VK_NV_shading_rate_image) */ #if defined(VK_QCOM_tile_properties) PFN_vkGetDynamicRenderingTilePropertiesQCOM vkGetDynamicRenderingTilePropertiesQCOM; PFN_vkGetFramebufferTilePropertiesQCOM vkGetFramebufferTilePropertiesQCOM; #endif /* defined(VK_QCOM_tile_properties) */ #if defined(VK_QNX_external_memory_screen_buffer) PFN_vkGetScreenBufferPropertiesQNX vkGetScreenBufferPropertiesQNX; #endif /* defined(VK_QNX_external_memory_screen_buffer) */ #if defined(VK_VALVE_descriptor_set_host_mapping) PFN_vkGetDescriptorSetHostMappingVALVE vkGetDescriptorSetHostMappingVALVE; PFN_vkGetDescriptorSetLayoutHostMappingInfoVALVE vkGetDescriptorSetLayoutHostMappingInfoVALVE; #endif /* defined(VK_VALVE_descriptor_set_host_mapping) */ #if (defined(VK_EXT_depth_clamp_control)) || (defined(VK_EXT_shader_object) && defined(VK_EXT_depth_clamp_control)) PFN_vkCmdSetDepthClampRangeEXT vkCmdSetDepthClampRangeEXT; #endif /* (defined(VK_EXT_depth_clamp_control)) || (defined(VK_EXT_shader_object) && defined(VK_EXT_depth_clamp_control)) */ #if (defined(VK_EXT_extended_dynamic_state)) || (defined(VK_EXT_shader_object)) PFN_vkCmdBindVertexBuffers2EXT vkCmdBindVertexBuffers2EXT; PFN_vkCmdSetCullModeEXT vkCmdSetCullModeEXT; PFN_vkCmdSetDepthBoundsTestEnableEXT vkCmdSetDepthBoundsTestEnableEXT; PFN_vkCmdSetDepthCompareOpEXT vkCmdSetDepthCompareOpEXT; PFN_vkCmdSetDepthTestEnableEXT vkCmdSetDepthTestEnableEXT; PFN_vkCmdSetDepthWriteEnableEXT vkCmdSetDepthWriteEnableEXT; PFN_vkCmdSetFrontFaceEXT vkCmdSetFrontFaceEXT; PFN_vkCmdSetPrimitiveTopologyEXT vkCmdSetPrimitiveTopologyEXT; PFN_vkCmdSetScissorWithCountEXT vkCmdSetScissorWithCountEXT; PFN_vkCmdSetStencilOpEXT vkCmdSetStencilOpEXT; PFN_vkCmdSetStencilTestEnableEXT vkCmdSetStencilTestEnableEXT; PFN_vkCmdSetViewportWithCountEXT vkCmdSetViewportWithCountEXT; #endif /* (defined(VK_EXT_extended_dynamic_state)) || (defined(VK_EXT_shader_object)) */ #if (defined(VK_EXT_extended_dynamic_state2)) || (defined(VK_EXT_shader_object)) PFN_vkCmdSetDepthBiasEnableEXT vkCmdSetDepthBiasEnableEXT; PFN_vkCmdSetLogicOpEXT vkCmdSetLogicOpEXT; PFN_vkCmdSetPatchControlPointsEXT vkCmdSetPatchControlPointsEXT; PFN_vkCmdSetPrimitiveRestartEnableEXT vkCmdSetPrimitiveRestartEnableEXT; PFN_vkCmdSetRasterizerDiscardEnableEXT vkCmdSetRasterizerDiscardEnableEXT; #endif /* (defined(VK_EXT_extended_dynamic_state2)) || (defined(VK_EXT_shader_object)) */ #if (defined(VK_EXT_extended_dynamic_state3)) || (defined(VK_EXT_shader_object)) PFN_vkCmdSetAlphaToCoverageEnableEXT vkCmdSetAlphaToCoverageEnableEXT; PFN_vkCmdSetAlphaToOneEnableEXT vkCmdSetAlphaToOneEnableEXT; PFN_vkCmdSetColorBlendEnableEXT vkCmdSetColorBlendEnableEXT; PFN_vkCmdSetColorBlendEquationEXT vkCmdSetColorBlendEquationEXT; PFN_vkCmdSetColorWriteMaskEXT vkCmdSetColorWriteMaskEXT; PFN_vkCmdSetDepthClampEnableEXT vkCmdSetDepthClampEnableEXT; PFN_vkCmdSetLogicOpEnableEXT vkCmdSetLogicOpEnableEXT; PFN_vkCmdSetPolygonModeEXT vkCmdSetPolygonModeEXT; PFN_vkCmdSetRasterizationSamplesEXT vkCmdSetRasterizationSamplesEXT; PFN_vkCmdSetSampleMaskEXT vkCmdSetSampleMaskEXT; #endif /* (defined(VK_EXT_extended_dynamic_state3)) || (defined(VK_EXT_shader_object)) */ #if (defined(VK_EXT_extended_dynamic_state3) && (defined(VK_KHR_maintenance2) || defined(VK_VERSION_1_1))) || (defined(VK_EXT_shader_object)) PFN_vkCmdSetTessellationDomainOriginEXT vkCmdSetTessellationDomainOriginEXT; #endif /* (defined(VK_EXT_extended_dynamic_state3) && (defined(VK_KHR_maintenance2) || defined(VK_VERSION_1_1))) || (defined(VK_EXT_shader_object)) */ #if (defined(VK_EXT_extended_dynamic_state3) && defined(VK_EXT_transform_feedback)) || (defined(VK_EXT_shader_object) && defined(VK_EXT_transform_feedback)) PFN_vkCmdSetRasterizationStreamEXT vkCmdSetRasterizationStreamEXT; #endif /* (defined(VK_EXT_extended_dynamic_state3) && defined(VK_EXT_transform_feedback)) || (defined(VK_EXT_shader_object) && defined(VK_EXT_transform_feedback)) */ #if (defined(VK_EXT_extended_dynamic_state3) && defined(VK_EXT_conservative_rasterization)) || (defined(VK_EXT_shader_object) && defined(VK_EXT_conservative_rasterization)) PFN_vkCmdSetConservativeRasterizationModeEXT vkCmdSetConservativeRasterizationModeEXT; PFN_vkCmdSetExtraPrimitiveOverestimationSizeEXT vkCmdSetExtraPrimitiveOverestimationSizeEXT; #endif /* (defined(VK_EXT_extended_dynamic_state3) && defined(VK_EXT_conservative_rasterization)) || (defined(VK_EXT_shader_object) && defined(VK_EXT_conservative_rasterization)) */ #if (defined(VK_EXT_extended_dynamic_state3) && defined(VK_EXT_depth_clip_enable)) || (defined(VK_EXT_shader_object) && defined(VK_EXT_depth_clip_enable)) PFN_vkCmdSetDepthClipEnableEXT vkCmdSetDepthClipEnableEXT; #endif /* (defined(VK_EXT_extended_dynamic_state3) && defined(VK_EXT_depth_clip_enable)) || (defined(VK_EXT_shader_object) && defined(VK_EXT_depth_clip_enable)) */ #if (defined(VK_EXT_extended_dynamic_state3) && defined(VK_EXT_sample_locations)) || (defined(VK_EXT_shader_object) && defined(VK_EXT_sample_locations)) PFN_vkCmdSetSampleLocationsEnableEXT vkCmdSetSampleLocationsEnableEXT; #endif /* (defined(VK_EXT_extended_dynamic_state3) && defined(VK_EXT_sample_locations)) || (defined(VK_EXT_shader_object) && defined(VK_EXT_sample_locations)) */ #if (defined(VK_EXT_extended_dynamic_state3) && defined(VK_EXT_blend_operation_advanced)) || (defined(VK_EXT_shader_object) && defined(VK_EXT_blend_operation_advanced)) PFN_vkCmdSetColorBlendAdvancedEXT vkCmdSetColorBlendAdvancedEXT; #endif /* (defined(VK_EXT_extended_dynamic_state3) && defined(VK_EXT_blend_operation_advanced)) || (defined(VK_EXT_shader_object) && defined(VK_EXT_blend_operation_advanced)) */ #if (defined(VK_EXT_extended_dynamic_state3) && defined(VK_EXT_provoking_vertex)) || (defined(VK_EXT_shader_object) && defined(VK_EXT_provoking_vertex)) PFN_vkCmdSetProvokingVertexModeEXT vkCmdSetProvokingVertexModeEXT; #endif /* (defined(VK_EXT_extended_dynamic_state3) && defined(VK_EXT_provoking_vertex)) || (defined(VK_EXT_shader_object) && defined(VK_EXT_provoking_vertex)) */ #if (defined(VK_EXT_extended_dynamic_state3) && defined(VK_EXT_line_rasterization)) || (defined(VK_EXT_shader_object) && defined(VK_EXT_line_rasterization)) PFN_vkCmdSetLineRasterizationModeEXT vkCmdSetLineRasterizationModeEXT; PFN_vkCmdSetLineStippleEnableEXT vkCmdSetLineStippleEnableEXT; #endif /* (defined(VK_EXT_extended_dynamic_state3) && defined(VK_EXT_line_rasterization)) || (defined(VK_EXT_shader_object) && defined(VK_EXT_line_rasterization)) */ #if (defined(VK_EXT_extended_dynamic_state3) && defined(VK_EXT_depth_clip_control)) || (defined(VK_EXT_shader_object) && defined(VK_EXT_depth_clip_control)) PFN_vkCmdSetDepthClipNegativeOneToOneEXT vkCmdSetDepthClipNegativeOneToOneEXT; #endif /* (defined(VK_EXT_extended_dynamic_state3) && defined(VK_EXT_depth_clip_control)) || (defined(VK_EXT_shader_object) && defined(VK_EXT_depth_clip_control)) */ #if (defined(VK_EXT_extended_dynamic_state3) && defined(VK_NV_clip_space_w_scaling)) || (defined(VK_EXT_shader_object) && defined(VK_NV_clip_space_w_scaling)) PFN_vkCmdSetViewportWScalingEnableNV vkCmdSetViewportWScalingEnableNV; #endif /* (defined(VK_EXT_extended_dynamic_state3) && defined(VK_NV_clip_space_w_scaling)) || (defined(VK_EXT_shader_object) && defined(VK_NV_clip_space_w_scaling)) */ #if (defined(VK_EXT_extended_dynamic_state3) && defined(VK_NV_viewport_swizzle)) || (defined(VK_EXT_shader_object) && defined(VK_NV_viewport_swizzle)) PFN_vkCmdSetViewportSwizzleNV vkCmdSetViewportSwizzleNV; #endif /* (defined(VK_EXT_extended_dynamic_state3) && defined(VK_NV_viewport_swizzle)) || (defined(VK_EXT_shader_object) && defined(VK_NV_viewport_swizzle)) */ #if (defined(VK_EXT_extended_dynamic_state3) && defined(VK_NV_fragment_coverage_to_color)) || (defined(VK_EXT_shader_object) && defined(VK_NV_fragment_coverage_to_color)) PFN_vkCmdSetCoverageToColorEnableNV vkCmdSetCoverageToColorEnableNV; PFN_vkCmdSetCoverageToColorLocationNV vkCmdSetCoverageToColorLocationNV; #endif /* (defined(VK_EXT_extended_dynamic_state3) && defined(VK_NV_fragment_coverage_to_color)) || (defined(VK_EXT_shader_object) && defined(VK_NV_fragment_coverage_to_color)) */ #if (defined(VK_EXT_extended_dynamic_state3) && defined(VK_NV_framebuffer_mixed_samples)) || (defined(VK_EXT_shader_object) && defined(VK_NV_framebuffer_mixed_samples)) PFN_vkCmdSetCoverageModulationModeNV vkCmdSetCoverageModulationModeNV; PFN_vkCmdSetCoverageModulationTableEnableNV vkCmdSetCoverageModulationTableEnableNV; PFN_vkCmdSetCoverageModulationTableNV vkCmdSetCoverageModulationTableNV; #endif /* (defined(VK_EXT_extended_dynamic_state3) && defined(VK_NV_framebuffer_mixed_samples)) || (defined(VK_EXT_shader_object) && defined(VK_NV_framebuffer_mixed_samples)) */ #if (defined(VK_EXT_extended_dynamic_state3) && defined(VK_NV_shading_rate_image)) || (defined(VK_EXT_shader_object) && defined(VK_NV_shading_rate_image)) PFN_vkCmdSetShadingRateImageEnableNV vkCmdSetShadingRateImageEnableNV; #endif /* (defined(VK_EXT_extended_dynamic_state3) && defined(VK_NV_shading_rate_image)) || (defined(VK_EXT_shader_object) && defined(VK_NV_shading_rate_image)) */ #if (defined(VK_EXT_extended_dynamic_state3) && defined(VK_NV_representative_fragment_test)) || (defined(VK_EXT_shader_object) && defined(VK_NV_representative_fragment_test)) PFN_vkCmdSetRepresentativeFragmentTestEnableNV vkCmdSetRepresentativeFragmentTestEnableNV; #endif /* (defined(VK_EXT_extended_dynamic_state3) && defined(VK_NV_representative_fragment_test)) || (defined(VK_EXT_shader_object) && defined(VK_NV_representative_fragment_test)) */ #if (defined(VK_EXT_extended_dynamic_state3) && defined(VK_NV_coverage_reduction_mode)) || (defined(VK_EXT_shader_object) && defined(VK_NV_coverage_reduction_mode)) PFN_vkCmdSetCoverageReductionModeNV vkCmdSetCoverageReductionModeNV; #endif /* (defined(VK_EXT_extended_dynamic_state3) && defined(VK_NV_coverage_reduction_mode)) || (defined(VK_EXT_shader_object) && defined(VK_NV_coverage_reduction_mode)) */ #if (defined(VK_EXT_host_image_copy)) || (defined(VK_EXT_image_compression_control)) PFN_vkGetImageSubresourceLayout2EXT vkGetImageSubresourceLayout2EXT; #endif /* (defined(VK_EXT_host_image_copy)) || (defined(VK_EXT_image_compression_control)) */ #if (defined(VK_EXT_shader_object)) || (defined(VK_EXT_vertex_input_dynamic_state)) PFN_vkCmdSetVertexInputEXT vkCmdSetVertexInputEXT; #endif /* (defined(VK_EXT_shader_object)) || (defined(VK_EXT_vertex_input_dynamic_state)) */ #if (defined(VK_KHR_descriptor_update_template) && defined(VK_KHR_push_descriptor)) || (defined(VK_KHR_push_descriptor) && (defined(VK_VERSION_1_1) || defined(VK_KHR_descriptor_update_template))) PFN_vkCmdPushDescriptorSetWithTemplateKHR vkCmdPushDescriptorSetWithTemplateKHR; #endif /* (defined(VK_KHR_descriptor_update_template) && defined(VK_KHR_push_descriptor)) || (defined(VK_KHR_push_descriptor) && (defined(VK_VERSION_1_1) || defined(VK_KHR_descriptor_update_template))) */ #if (defined(VK_KHR_device_group) && defined(VK_KHR_surface)) || (defined(VK_KHR_swapchain) && defined(VK_VERSION_1_1)) PFN_vkGetDeviceGroupPresentCapabilitiesKHR vkGetDeviceGroupPresentCapabilitiesKHR; PFN_vkGetDeviceGroupSurfacePresentModesKHR vkGetDeviceGroupSurfacePresentModesKHR; #endif /* (defined(VK_KHR_device_group) && defined(VK_KHR_surface)) || (defined(VK_KHR_swapchain) && defined(VK_VERSION_1_1)) */ #if (defined(VK_KHR_device_group) && defined(VK_KHR_swapchain)) || (defined(VK_KHR_swapchain) && defined(VK_VERSION_1_1)) PFN_vkAcquireNextImage2KHR vkAcquireNextImage2KHR; #endif /* (defined(VK_KHR_device_group) && defined(VK_KHR_swapchain)) || (defined(VK_KHR_swapchain) && defined(VK_VERSION_1_1)) */ /* VOLK_GENERATE_DEVICE_TABLE */ }; /* VOLK_GENERATE_PROTOTYPES_H */ #if defined(VK_VERSION_1_0) extern PFN_vkAllocateCommandBuffers vkAllocateCommandBuffers; extern PFN_vkAllocateDescriptorSets vkAllocateDescriptorSets; extern PFN_vkAllocateMemory vkAllocateMemory; extern PFN_vkBeginCommandBuffer vkBeginCommandBuffer; extern PFN_vkBindBufferMemory vkBindBufferMemory; extern PFN_vkBindImageMemory vkBindImageMemory; extern PFN_vkCmdBeginQuery vkCmdBeginQuery; extern PFN_vkCmdBeginRenderPass vkCmdBeginRenderPass; extern PFN_vkCmdBindDescriptorSets vkCmdBindDescriptorSets; extern PFN_vkCmdBindIndexBuffer vkCmdBindIndexBuffer; extern PFN_vkCmdBindPipeline vkCmdBindPipeline; extern PFN_vkCmdBindVertexBuffers vkCmdBindVertexBuffers; extern PFN_vkCmdBlitImage vkCmdBlitImage; extern PFN_vkCmdClearAttachments vkCmdClearAttachments; extern PFN_vkCmdClearColorImage vkCmdClearColorImage; extern PFN_vkCmdClearDepthStencilImage vkCmdClearDepthStencilImage; extern PFN_vkCmdCopyBuffer vkCmdCopyBuffer; extern PFN_vkCmdCopyBufferToImage vkCmdCopyBufferToImage; extern PFN_vkCmdCopyImage vkCmdCopyImage; extern PFN_vkCmdCopyImageToBuffer vkCmdCopyImageToBuffer; extern PFN_vkCmdCopyQueryPoolResults vkCmdCopyQueryPoolResults; extern PFN_vkCmdDispatch vkCmdDispatch; extern PFN_vkCmdDispatchIndirect vkCmdDispatchIndirect; extern PFN_vkCmdDraw vkCmdDraw; extern PFN_vkCmdDrawIndexed vkCmdDrawIndexed; extern PFN_vkCmdDrawIndexedIndirect vkCmdDrawIndexedIndirect; extern PFN_vkCmdDrawIndirect vkCmdDrawIndirect; extern PFN_vkCmdEndQuery vkCmdEndQuery; extern PFN_vkCmdEndRenderPass vkCmdEndRenderPass; extern PFN_vkCmdExecuteCommands vkCmdExecuteCommands; extern PFN_vkCmdFillBuffer vkCmdFillBuffer; extern PFN_vkCmdNextSubpass vkCmdNextSubpass; extern PFN_vkCmdPipelineBarrier vkCmdPipelineBarrier; extern PFN_vkCmdPushConstants vkCmdPushConstants; extern PFN_vkCmdResetEvent vkCmdResetEvent; extern PFN_vkCmdResetQueryPool vkCmdResetQueryPool; extern PFN_vkCmdResolveImage vkCmdResolveImage; extern PFN_vkCmdSetBlendConstants vkCmdSetBlendConstants; extern PFN_vkCmdSetDepthBias vkCmdSetDepthBias; extern PFN_vkCmdSetDepthBounds vkCmdSetDepthBounds; extern PFN_vkCmdSetEvent vkCmdSetEvent; extern PFN_vkCmdSetLineWidth vkCmdSetLineWidth; extern PFN_vkCmdSetScissor vkCmdSetScissor; extern PFN_vkCmdSetStencilCompareMask vkCmdSetStencilCompareMask; extern PFN_vkCmdSetStencilReference vkCmdSetStencilReference; extern PFN_vkCmdSetStencilWriteMask vkCmdSetStencilWriteMask; extern PFN_vkCmdSetViewport vkCmdSetViewport; extern PFN_vkCmdUpdateBuffer vkCmdUpdateBuffer; extern PFN_vkCmdWaitEvents vkCmdWaitEvents; extern PFN_vkCmdWriteTimestamp vkCmdWriteTimestamp; extern PFN_vkCreateBuffer vkCreateBuffer; extern PFN_vkCreateBufferView vkCreateBufferView; extern PFN_vkCreateCommandPool vkCreateCommandPool; extern PFN_vkCreateComputePipelines vkCreateComputePipelines; extern PFN_vkCreateDescriptorPool vkCreateDescriptorPool; extern PFN_vkCreateDescriptorSetLayout vkCreateDescriptorSetLayout; extern PFN_vkCreateDevice vkCreateDevice; extern PFN_vkCreateEvent vkCreateEvent; extern PFN_vkCreateFence vkCreateFence; extern PFN_vkCreateFramebuffer vkCreateFramebuffer; extern PFN_vkCreateGraphicsPipelines vkCreateGraphicsPipelines; extern PFN_vkCreateImage vkCreateImage; extern PFN_vkCreateImageView vkCreateImageView; extern PFN_vkCreateInstance vkCreateInstance; extern PFN_vkCreatePipelineCache vkCreatePipelineCache; extern PFN_vkCreatePipelineLayout vkCreatePipelineLayout; extern PFN_vkCreateQueryPool vkCreateQueryPool; extern PFN_vkCreateRenderPass vkCreateRenderPass; extern PFN_vkCreateSampler vkCreateSampler; extern PFN_vkCreateSemaphore vkCreateSemaphore; extern PFN_vkCreateShaderModule vkCreateShaderModule; extern PFN_vkDestroyBuffer vkDestroyBuffer; extern PFN_vkDestroyBufferView vkDestroyBufferView; extern PFN_vkDestroyCommandPool vkDestroyCommandPool; extern PFN_vkDestroyDescriptorPool vkDestroyDescriptorPool; extern PFN_vkDestroyDescriptorSetLayout vkDestroyDescriptorSetLayout; extern PFN_vkDestroyDevice vkDestroyDevice; extern PFN_vkDestroyEvent vkDestroyEvent; extern PFN_vkDestroyFence vkDestroyFence; extern PFN_vkDestroyFramebuffer vkDestroyFramebuffer; extern PFN_vkDestroyImage vkDestroyImage; extern PFN_vkDestroyImageView vkDestroyImageView; extern PFN_vkDestroyInstance vkDestroyInstance; extern PFN_vkDestroyPipeline vkDestroyPipeline; extern PFN_vkDestroyPipelineCache vkDestroyPipelineCache; extern PFN_vkDestroyPipelineLayout vkDestroyPipelineLayout; extern PFN_vkDestroyQueryPool vkDestroyQueryPool; extern PFN_vkDestroyRenderPass vkDestroyRenderPass; extern PFN_vkDestroySampler vkDestroySampler; extern PFN_vkDestroySemaphore vkDestroySemaphore; extern PFN_vkDestroyShaderModule vkDestroyShaderModule; extern PFN_vkDeviceWaitIdle vkDeviceWaitIdle; extern PFN_vkEndCommandBuffer vkEndCommandBuffer; extern PFN_vkEnumerateDeviceExtensionProperties vkEnumerateDeviceExtensionProperties; extern PFN_vkEnumerateDeviceLayerProperties vkEnumerateDeviceLayerProperties; extern PFN_vkEnumerateInstanceExtensionProperties vkEnumerateInstanceExtensionProperties; extern PFN_vkEnumerateInstanceLayerProperties vkEnumerateInstanceLayerProperties; extern PFN_vkEnumeratePhysicalDevices vkEnumeratePhysicalDevices; extern PFN_vkFlushMappedMemoryRanges vkFlushMappedMemoryRanges; extern PFN_vkFreeCommandBuffers vkFreeCommandBuffers; extern PFN_vkFreeDescriptorSets vkFreeDescriptorSets; extern PFN_vkFreeMemory vkFreeMemory; extern PFN_vkGetBufferMemoryRequirements vkGetBufferMemoryRequirements; extern PFN_vkGetDeviceMemoryCommitment vkGetDeviceMemoryCommitment; extern PFN_vkGetDeviceProcAddr vkGetDeviceProcAddr; extern PFN_vkGetDeviceQueue vkGetDeviceQueue; extern PFN_vkGetEventStatus vkGetEventStatus; extern PFN_vkGetFenceStatus vkGetFenceStatus; extern PFN_vkGetImageMemoryRequirements vkGetImageMemoryRequirements; extern PFN_vkGetImageSparseMemoryRequirements vkGetImageSparseMemoryRequirements; extern PFN_vkGetImageSubresourceLayout vkGetImageSubresourceLayout; extern PFN_vkGetInstanceProcAddr vkGetInstanceProcAddr; extern PFN_vkGetPhysicalDeviceFeatures vkGetPhysicalDeviceFeatures; extern PFN_vkGetPhysicalDeviceFormatProperties vkGetPhysicalDeviceFormatProperties; extern PFN_vkGetPhysicalDeviceImageFormatProperties vkGetPhysicalDeviceImageFormatProperties; extern PFN_vkGetPhysicalDeviceMemoryProperties vkGetPhysicalDeviceMemoryProperties; extern PFN_vkGetPhysicalDeviceProperties vkGetPhysicalDeviceProperties; extern PFN_vkGetPhysicalDeviceQueueFamilyProperties vkGetPhysicalDeviceQueueFamilyProperties; extern PFN_vkGetPhysicalDeviceSparseImageFormatProperties vkGetPhysicalDeviceSparseImageFormatProperties; extern PFN_vkGetPipelineCacheData vkGetPipelineCacheData; extern PFN_vkGetQueryPoolResults vkGetQueryPoolResults; extern PFN_vkGetRenderAreaGranularity vkGetRenderAreaGranularity; extern PFN_vkInvalidateMappedMemoryRanges vkInvalidateMappedMemoryRanges; extern PFN_vkMapMemory vkMapMemory; extern PFN_vkMergePipelineCaches vkMergePipelineCaches; extern PFN_vkQueueBindSparse vkQueueBindSparse; extern PFN_vkQueueSubmit vkQueueSubmit; extern PFN_vkQueueWaitIdle vkQueueWaitIdle; extern PFN_vkResetCommandBuffer vkResetCommandBuffer; extern PFN_vkResetCommandPool vkResetCommandPool; extern PFN_vkResetDescriptorPool vkResetDescriptorPool; extern PFN_vkResetEvent vkResetEvent; extern PFN_vkResetFences vkResetFences; extern PFN_vkSetEvent vkSetEvent; extern PFN_vkUnmapMemory vkUnmapMemory; extern PFN_vkUpdateDescriptorSets vkUpdateDescriptorSets; extern PFN_vkWaitForFences vkWaitForFences; #endif /* defined(VK_VERSION_1_0) */ #if defined(VK_VERSION_1_1) extern PFN_vkBindBufferMemory2 vkBindBufferMemory2; extern PFN_vkBindImageMemory2 vkBindImageMemory2; extern PFN_vkCmdDispatchBase vkCmdDispatchBase; extern PFN_vkCmdSetDeviceMask vkCmdSetDeviceMask; extern PFN_vkCreateDescriptorUpdateTemplate vkCreateDescriptorUpdateTemplate; extern PFN_vkCreateSamplerYcbcrConversion vkCreateSamplerYcbcrConversion; extern PFN_vkDestroyDescriptorUpdateTemplate vkDestroyDescriptorUpdateTemplate; extern PFN_vkDestroySamplerYcbcrConversion vkDestroySamplerYcbcrConversion; extern PFN_vkEnumerateInstanceVersion vkEnumerateInstanceVersion; extern PFN_vkEnumeratePhysicalDeviceGroups vkEnumeratePhysicalDeviceGroups; extern PFN_vkGetBufferMemoryRequirements2 vkGetBufferMemoryRequirements2; extern PFN_vkGetDescriptorSetLayoutSupport vkGetDescriptorSetLayoutSupport; extern PFN_vkGetDeviceGroupPeerMemoryFeatures vkGetDeviceGroupPeerMemoryFeatures; extern PFN_vkGetDeviceQueue2 vkGetDeviceQueue2; extern PFN_vkGetImageMemoryRequirements2 vkGetImageMemoryRequirements2; extern PFN_vkGetImageSparseMemoryRequirements2 vkGetImageSparseMemoryRequirements2; extern PFN_vkGetPhysicalDeviceExternalBufferProperties vkGetPhysicalDeviceExternalBufferProperties; extern PFN_vkGetPhysicalDeviceExternalFenceProperties vkGetPhysicalDeviceExternalFenceProperties; extern PFN_vkGetPhysicalDeviceExternalSemaphoreProperties vkGetPhysicalDeviceExternalSemaphoreProperties; extern PFN_vkGetPhysicalDeviceFeatures2 vkGetPhysicalDeviceFeatures2; extern PFN_vkGetPhysicalDeviceFormatProperties2 vkGetPhysicalDeviceFormatProperties2; extern PFN_vkGetPhysicalDeviceImageFormatProperties2 vkGetPhysicalDeviceImageFormatProperties2; extern PFN_vkGetPhysicalDeviceMemoryProperties2 vkGetPhysicalDeviceMemoryProperties2; extern PFN_vkGetPhysicalDeviceProperties2 vkGetPhysicalDeviceProperties2; extern PFN_vkGetPhysicalDeviceQueueFamilyProperties2 vkGetPhysicalDeviceQueueFamilyProperties2; extern PFN_vkGetPhysicalDeviceSparseImageFormatProperties2 vkGetPhysicalDeviceSparseImageFormatProperties2; extern PFN_vkTrimCommandPool vkTrimCommandPool; extern PFN_vkUpdateDescriptorSetWithTemplate vkUpdateDescriptorSetWithTemplate; #endif /* defined(VK_VERSION_1_1) */ #if defined(VK_VERSION_1_2) extern PFN_vkCmdBeginRenderPass2 vkCmdBeginRenderPass2; extern PFN_vkCmdDrawIndexedIndirectCount vkCmdDrawIndexedIndirectCount; extern PFN_vkCmdDrawIndirectCount vkCmdDrawIndirectCount; extern PFN_vkCmdEndRenderPass2 vkCmdEndRenderPass2; extern PFN_vkCmdNextSubpass2 vkCmdNextSubpass2; extern PFN_vkCreateRenderPass2 vkCreateRenderPass2; extern PFN_vkGetBufferDeviceAddress vkGetBufferDeviceAddress; extern PFN_vkGetBufferOpaqueCaptureAddress vkGetBufferOpaqueCaptureAddress; extern PFN_vkGetDeviceMemoryOpaqueCaptureAddress vkGetDeviceMemoryOpaqueCaptureAddress; extern PFN_vkGetSemaphoreCounterValue vkGetSemaphoreCounterValue; extern PFN_vkResetQueryPool vkResetQueryPool; extern PFN_vkSignalSemaphore vkSignalSemaphore; extern PFN_vkWaitSemaphores vkWaitSemaphores; #endif /* defined(VK_VERSION_1_2) */ #if defined(VK_VERSION_1_3) extern PFN_vkCmdBeginRendering vkCmdBeginRendering; extern PFN_vkCmdBindVertexBuffers2 vkCmdBindVertexBuffers2; extern PFN_vkCmdBlitImage2 vkCmdBlitImage2; extern PFN_vkCmdCopyBuffer2 vkCmdCopyBuffer2; extern PFN_vkCmdCopyBufferToImage2 vkCmdCopyBufferToImage2; extern PFN_vkCmdCopyImage2 vkCmdCopyImage2; extern PFN_vkCmdCopyImageToBuffer2 vkCmdCopyImageToBuffer2; extern PFN_vkCmdEndRendering vkCmdEndRendering; extern PFN_vkCmdPipelineBarrier2 vkCmdPipelineBarrier2; extern PFN_vkCmdResetEvent2 vkCmdResetEvent2; extern PFN_vkCmdResolveImage2 vkCmdResolveImage2; extern PFN_vkCmdSetCullMode vkCmdSetCullMode; extern PFN_vkCmdSetDepthBiasEnable vkCmdSetDepthBiasEnable; extern PFN_vkCmdSetDepthBoundsTestEnable vkCmdSetDepthBoundsTestEnable; extern PFN_vkCmdSetDepthCompareOp vkCmdSetDepthCompareOp; extern PFN_vkCmdSetDepthTestEnable vkCmdSetDepthTestEnable; extern PFN_vkCmdSetDepthWriteEnable vkCmdSetDepthWriteEnable; extern PFN_vkCmdSetEvent2 vkCmdSetEvent2; extern PFN_vkCmdSetFrontFace vkCmdSetFrontFace; extern PFN_vkCmdSetPrimitiveRestartEnable vkCmdSetPrimitiveRestartEnable; extern PFN_vkCmdSetPrimitiveTopology vkCmdSetPrimitiveTopology; extern PFN_vkCmdSetRasterizerDiscardEnable vkCmdSetRasterizerDiscardEnable; extern PFN_vkCmdSetScissorWithCount vkCmdSetScissorWithCount; extern PFN_vkCmdSetStencilOp vkCmdSetStencilOp; extern PFN_vkCmdSetStencilTestEnable vkCmdSetStencilTestEnable; extern PFN_vkCmdSetViewportWithCount vkCmdSetViewportWithCount; extern PFN_vkCmdWaitEvents2 vkCmdWaitEvents2; extern PFN_vkCmdWriteTimestamp2 vkCmdWriteTimestamp2; extern PFN_vkCreatePrivateDataSlot vkCreatePrivateDataSlot; extern PFN_vkDestroyPrivateDataSlot vkDestroyPrivateDataSlot; extern PFN_vkGetDeviceBufferMemoryRequirements vkGetDeviceBufferMemoryRequirements; extern PFN_vkGetDeviceImageMemoryRequirements vkGetDeviceImageMemoryRequirements; extern PFN_vkGetDeviceImageSparseMemoryRequirements vkGetDeviceImageSparseMemoryRequirements; extern PFN_vkGetPhysicalDeviceToolProperties vkGetPhysicalDeviceToolProperties; extern PFN_vkGetPrivateData vkGetPrivateData; extern PFN_vkQueueSubmit2 vkQueueSubmit2; extern PFN_vkSetPrivateData vkSetPrivateData; #endif /* defined(VK_VERSION_1_3) */ #if defined(VK_VERSION_1_4) extern PFN_vkCmdBindDescriptorSets2 vkCmdBindDescriptorSets2; extern PFN_vkCmdBindIndexBuffer2 vkCmdBindIndexBuffer2; extern PFN_vkCmdPushConstants2 vkCmdPushConstants2; extern PFN_vkCmdPushDescriptorSet vkCmdPushDescriptorSet; extern PFN_vkCmdPushDescriptorSet2 vkCmdPushDescriptorSet2; extern PFN_vkCmdPushDescriptorSetWithTemplate vkCmdPushDescriptorSetWithTemplate; extern PFN_vkCmdPushDescriptorSetWithTemplate2 vkCmdPushDescriptorSetWithTemplate2; extern PFN_vkCmdSetLineStipple vkCmdSetLineStipple; extern PFN_vkCmdSetRenderingAttachmentLocations vkCmdSetRenderingAttachmentLocations; extern PFN_vkCmdSetRenderingInputAttachmentIndices vkCmdSetRenderingInputAttachmentIndices; extern PFN_vkCopyImageToImage vkCopyImageToImage; extern PFN_vkCopyImageToMemory vkCopyImageToMemory; extern PFN_vkCopyMemoryToImage vkCopyMemoryToImage; extern PFN_vkGetDeviceImageSubresourceLayout vkGetDeviceImageSubresourceLayout; extern PFN_vkGetImageSubresourceLayout2 vkGetImageSubresourceLayout2; extern PFN_vkGetRenderingAreaGranularity vkGetRenderingAreaGranularity; extern PFN_vkMapMemory2 vkMapMemory2; extern PFN_vkTransitionImageLayout vkTransitionImageLayout; extern PFN_vkUnmapMemory2 vkUnmapMemory2; #endif /* defined(VK_VERSION_1_4) */ #if defined(VK_AMDX_shader_enqueue) extern PFN_vkCmdDispatchGraphAMDX vkCmdDispatchGraphAMDX; extern PFN_vkCmdDispatchGraphIndirectAMDX vkCmdDispatchGraphIndirectAMDX; extern PFN_vkCmdDispatchGraphIndirectCountAMDX vkCmdDispatchGraphIndirectCountAMDX; extern PFN_vkCmdInitializeGraphScratchMemoryAMDX vkCmdInitializeGraphScratchMemoryAMDX; extern PFN_vkCreateExecutionGraphPipelinesAMDX vkCreateExecutionGraphPipelinesAMDX; extern PFN_vkGetExecutionGraphPipelineNodeIndexAMDX vkGetExecutionGraphPipelineNodeIndexAMDX; extern PFN_vkGetExecutionGraphPipelineScratchSizeAMDX vkGetExecutionGraphPipelineScratchSizeAMDX; #endif /* defined(VK_AMDX_shader_enqueue) */ #if defined(VK_AMD_anti_lag) extern PFN_vkAntiLagUpdateAMD vkAntiLagUpdateAMD; #endif /* defined(VK_AMD_anti_lag) */ #if defined(VK_AMD_buffer_marker) extern PFN_vkCmdWriteBufferMarkerAMD vkCmdWriteBufferMarkerAMD; #endif /* defined(VK_AMD_buffer_marker) */ #if defined(VK_AMD_buffer_marker) && (defined(VK_VERSION_1_3) || defined(VK_KHR_synchronization2)) extern PFN_vkCmdWriteBufferMarker2AMD vkCmdWriteBufferMarker2AMD; #endif /* defined(VK_AMD_buffer_marker) && (defined(VK_VERSION_1_3) || defined(VK_KHR_synchronization2)) */ #if defined(VK_AMD_display_native_hdr) extern PFN_vkSetLocalDimmingAMD vkSetLocalDimmingAMD; #endif /* defined(VK_AMD_display_native_hdr) */ #if defined(VK_AMD_draw_indirect_count) extern PFN_vkCmdDrawIndexedIndirectCountAMD vkCmdDrawIndexedIndirectCountAMD; extern PFN_vkCmdDrawIndirectCountAMD vkCmdDrawIndirectCountAMD; #endif /* defined(VK_AMD_draw_indirect_count) */ #if defined(VK_AMD_shader_info) extern PFN_vkGetShaderInfoAMD vkGetShaderInfoAMD; #endif /* defined(VK_AMD_shader_info) */ #if defined(VK_ANDROID_external_memory_android_hardware_buffer) extern PFN_vkGetAndroidHardwareBufferPropertiesANDROID vkGetAndroidHardwareBufferPropertiesANDROID; extern PFN_vkGetMemoryAndroidHardwareBufferANDROID vkGetMemoryAndroidHardwareBufferANDROID; #endif /* defined(VK_ANDROID_external_memory_android_hardware_buffer) */ #if defined(VK_EXT_acquire_drm_display) extern PFN_vkAcquireDrmDisplayEXT vkAcquireDrmDisplayEXT; extern PFN_vkGetDrmDisplayEXT vkGetDrmDisplayEXT; #endif /* defined(VK_EXT_acquire_drm_display) */ #if defined(VK_EXT_acquire_xlib_display) extern PFN_vkAcquireXlibDisplayEXT vkAcquireXlibDisplayEXT; extern PFN_vkGetRandROutputDisplayEXT vkGetRandROutputDisplayEXT; #endif /* defined(VK_EXT_acquire_xlib_display) */ #if defined(VK_EXT_attachment_feedback_loop_dynamic_state) extern PFN_vkCmdSetAttachmentFeedbackLoopEnableEXT vkCmdSetAttachmentFeedbackLoopEnableEXT; #endif /* defined(VK_EXT_attachment_feedback_loop_dynamic_state) */ #if defined(VK_EXT_buffer_device_address) extern PFN_vkGetBufferDeviceAddressEXT vkGetBufferDeviceAddressEXT; #endif /* defined(VK_EXT_buffer_device_address) */ #if defined(VK_EXT_calibrated_timestamps) extern PFN_vkGetCalibratedTimestampsEXT vkGetCalibratedTimestampsEXT; extern PFN_vkGetPhysicalDeviceCalibrateableTimeDomainsEXT vkGetPhysicalDeviceCalibrateableTimeDomainsEXT; #endif /* defined(VK_EXT_calibrated_timestamps) */ #if defined(VK_EXT_color_write_enable) extern PFN_vkCmdSetColorWriteEnableEXT vkCmdSetColorWriteEnableEXT; #endif /* defined(VK_EXT_color_write_enable) */ #if defined(VK_EXT_conditional_rendering) extern PFN_vkCmdBeginConditionalRenderingEXT vkCmdBeginConditionalRenderingEXT; extern PFN_vkCmdEndConditionalRenderingEXT vkCmdEndConditionalRenderingEXT; #endif /* defined(VK_EXT_conditional_rendering) */ #if defined(VK_EXT_debug_marker) extern PFN_vkCmdDebugMarkerBeginEXT vkCmdDebugMarkerBeginEXT; extern PFN_vkCmdDebugMarkerEndEXT vkCmdDebugMarkerEndEXT; extern PFN_vkCmdDebugMarkerInsertEXT vkCmdDebugMarkerInsertEXT; extern PFN_vkDebugMarkerSetObjectNameEXT vkDebugMarkerSetObjectNameEXT; extern PFN_vkDebugMarkerSetObjectTagEXT vkDebugMarkerSetObjectTagEXT; #endif /* defined(VK_EXT_debug_marker) */ #if defined(VK_EXT_debug_report) extern PFN_vkCreateDebugReportCallbackEXT vkCreateDebugReportCallbackEXT; extern PFN_vkDebugReportMessageEXT vkDebugReportMessageEXT; extern PFN_vkDestroyDebugReportCallbackEXT vkDestroyDebugReportCallbackEXT; #endif /* defined(VK_EXT_debug_report) */ #if defined(VK_EXT_debug_utils) extern PFN_vkCmdBeginDebugUtilsLabelEXT vkCmdBeginDebugUtilsLabelEXT; extern PFN_vkCmdEndDebugUtilsLabelEXT vkCmdEndDebugUtilsLabelEXT; extern PFN_vkCmdInsertDebugUtilsLabelEXT vkCmdInsertDebugUtilsLabelEXT; extern PFN_vkCreateDebugUtilsMessengerEXT vkCreateDebugUtilsMessengerEXT; extern PFN_vkDestroyDebugUtilsMessengerEXT vkDestroyDebugUtilsMessengerEXT; extern PFN_vkQueueBeginDebugUtilsLabelEXT vkQueueBeginDebugUtilsLabelEXT; extern PFN_vkQueueEndDebugUtilsLabelEXT vkQueueEndDebugUtilsLabelEXT; extern PFN_vkQueueInsertDebugUtilsLabelEXT vkQueueInsertDebugUtilsLabelEXT; extern PFN_vkSetDebugUtilsObjectNameEXT vkSetDebugUtilsObjectNameEXT; extern PFN_vkSetDebugUtilsObjectTagEXT vkSetDebugUtilsObjectTagEXT; extern PFN_vkSubmitDebugUtilsMessageEXT vkSubmitDebugUtilsMessageEXT; #endif /* defined(VK_EXT_debug_utils) */ #if defined(VK_EXT_depth_bias_control) extern PFN_vkCmdSetDepthBias2EXT vkCmdSetDepthBias2EXT; #endif /* defined(VK_EXT_depth_bias_control) */ #if defined(VK_EXT_descriptor_buffer) extern PFN_vkCmdBindDescriptorBufferEmbeddedSamplersEXT vkCmdBindDescriptorBufferEmbeddedSamplersEXT; extern PFN_vkCmdBindDescriptorBuffersEXT vkCmdBindDescriptorBuffersEXT; extern PFN_vkCmdSetDescriptorBufferOffsetsEXT vkCmdSetDescriptorBufferOffsetsEXT; extern PFN_vkGetBufferOpaqueCaptureDescriptorDataEXT vkGetBufferOpaqueCaptureDescriptorDataEXT; extern PFN_vkGetDescriptorEXT vkGetDescriptorEXT; extern PFN_vkGetDescriptorSetLayoutBindingOffsetEXT vkGetDescriptorSetLayoutBindingOffsetEXT; extern PFN_vkGetDescriptorSetLayoutSizeEXT vkGetDescriptorSetLayoutSizeEXT; extern PFN_vkGetImageOpaqueCaptureDescriptorDataEXT vkGetImageOpaqueCaptureDescriptorDataEXT; extern PFN_vkGetImageViewOpaqueCaptureDescriptorDataEXT vkGetImageViewOpaqueCaptureDescriptorDataEXT; extern PFN_vkGetSamplerOpaqueCaptureDescriptorDataEXT vkGetSamplerOpaqueCaptureDescriptorDataEXT; #endif /* defined(VK_EXT_descriptor_buffer) */ #if defined(VK_EXT_descriptor_buffer) && (defined(VK_KHR_acceleration_structure) || defined(VK_NV_ray_tracing)) extern PFN_vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT; #endif /* defined(VK_EXT_descriptor_buffer) && (defined(VK_KHR_acceleration_structure) || defined(VK_NV_ray_tracing)) */ #if defined(VK_EXT_device_fault) extern PFN_vkGetDeviceFaultInfoEXT vkGetDeviceFaultInfoEXT; #endif /* defined(VK_EXT_device_fault) */ #if defined(VK_EXT_device_generated_commands) extern PFN_vkCmdExecuteGeneratedCommandsEXT vkCmdExecuteGeneratedCommandsEXT; extern PFN_vkCmdPreprocessGeneratedCommandsEXT vkCmdPreprocessGeneratedCommandsEXT; extern PFN_vkCreateIndirectCommandsLayoutEXT vkCreateIndirectCommandsLayoutEXT; extern PFN_vkCreateIndirectExecutionSetEXT vkCreateIndirectExecutionSetEXT; extern PFN_vkDestroyIndirectCommandsLayoutEXT vkDestroyIndirectCommandsLayoutEXT; extern PFN_vkDestroyIndirectExecutionSetEXT vkDestroyIndirectExecutionSetEXT; extern PFN_vkGetGeneratedCommandsMemoryRequirementsEXT vkGetGeneratedCommandsMemoryRequirementsEXT; extern PFN_vkUpdateIndirectExecutionSetPipelineEXT vkUpdateIndirectExecutionSetPipelineEXT; extern PFN_vkUpdateIndirectExecutionSetShaderEXT vkUpdateIndirectExecutionSetShaderEXT; #endif /* defined(VK_EXT_device_generated_commands) */ #if defined(VK_EXT_direct_mode_display) extern PFN_vkReleaseDisplayEXT vkReleaseDisplayEXT; #endif /* defined(VK_EXT_direct_mode_display) */ #if defined(VK_EXT_directfb_surface) extern PFN_vkCreateDirectFBSurfaceEXT vkCreateDirectFBSurfaceEXT; extern PFN_vkGetPhysicalDeviceDirectFBPresentationSupportEXT vkGetPhysicalDeviceDirectFBPresentationSupportEXT; #endif /* defined(VK_EXT_directfb_surface) */ #if defined(VK_EXT_discard_rectangles) extern PFN_vkCmdSetDiscardRectangleEXT vkCmdSetDiscardRectangleEXT; #endif /* defined(VK_EXT_discard_rectangles) */ #if defined(VK_EXT_discard_rectangles) && VK_EXT_DISCARD_RECTANGLES_SPEC_VERSION >= 2 extern PFN_vkCmdSetDiscardRectangleEnableEXT vkCmdSetDiscardRectangleEnableEXT; extern PFN_vkCmdSetDiscardRectangleModeEXT vkCmdSetDiscardRectangleModeEXT; #endif /* defined(VK_EXT_discard_rectangles) && VK_EXT_DISCARD_RECTANGLES_SPEC_VERSION >= 2 */ #if defined(VK_EXT_display_control) extern PFN_vkDisplayPowerControlEXT vkDisplayPowerControlEXT; extern PFN_vkGetSwapchainCounterEXT vkGetSwapchainCounterEXT; extern PFN_vkRegisterDeviceEventEXT vkRegisterDeviceEventEXT; extern PFN_vkRegisterDisplayEventEXT vkRegisterDisplayEventEXT; #endif /* defined(VK_EXT_display_control) */ #if defined(VK_EXT_display_surface_counter) extern PFN_vkGetPhysicalDeviceSurfaceCapabilities2EXT vkGetPhysicalDeviceSurfaceCapabilities2EXT; #endif /* defined(VK_EXT_display_surface_counter) */ #if defined(VK_EXT_external_memory_host) extern PFN_vkGetMemoryHostPointerPropertiesEXT vkGetMemoryHostPointerPropertiesEXT; #endif /* defined(VK_EXT_external_memory_host) */ #if defined(VK_EXT_external_memory_metal) extern PFN_vkGetMemoryMetalHandleEXT vkGetMemoryMetalHandleEXT; extern PFN_vkGetMemoryMetalHandlePropertiesEXT vkGetMemoryMetalHandlePropertiesEXT; #endif /* defined(VK_EXT_external_memory_metal) */ #if defined(VK_EXT_full_screen_exclusive) extern PFN_vkAcquireFullScreenExclusiveModeEXT vkAcquireFullScreenExclusiveModeEXT; extern PFN_vkGetPhysicalDeviceSurfacePresentModes2EXT vkGetPhysicalDeviceSurfacePresentModes2EXT; extern PFN_vkReleaseFullScreenExclusiveModeEXT vkReleaseFullScreenExclusiveModeEXT; #endif /* defined(VK_EXT_full_screen_exclusive) */ #if defined(VK_EXT_full_screen_exclusive) && (defined(VK_KHR_device_group) || defined(VK_VERSION_1_1)) extern PFN_vkGetDeviceGroupSurfacePresentModes2EXT vkGetDeviceGroupSurfacePresentModes2EXT; #endif /* defined(VK_EXT_full_screen_exclusive) && (defined(VK_KHR_device_group) || defined(VK_VERSION_1_1)) */ #if defined(VK_EXT_hdr_metadata) extern PFN_vkSetHdrMetadataEXT vkSetHdrMetadataEXT; #endif /* defined(VK_EXT_hdr_metadata) */ #if defined(VK_EXT_headless_surface) extern PFN_vkCreateHeadlessSurfaceEXT vkCreateHeadlessSurfaceEXT; #endif /* defined(VK_EXT_headless_surface) */ #if defined(VK_EXT_host_image_copy) extern PFN_vkCopyImageToImageEXT vkCopyImageToImageEXT; extern PFN_vkCopyImageToMemoryEXT vkCopyImageToMemoryEXT; extern PFN_vkCopyMemoryToImageEXT vkCopyMemoryToImageEXT; extern PFN_vkTransitionImageLayoutEXT vkTransitionImageLayoutEXT; #endif /* defined(VK_EXT_host_image_copy) */ #if defined(VK_EXT_host_query_reset) extern PFN_vkResetQueryPoolEXT vkResetQueryPoolEXT; #endif /* defined(VK_EXT_host_query_reset) */ #if defined(VK_EXT_image_drm_format_modifier) extern PFN_vkGetImageDrmFormatModifierPropertiesEXT vkGetImageDrmFormatModifierPropertiesEXT; #endif /* defined(VK_EXT_image_drm_format_modifier) */ #if defined(VK_EXT_line_rasterization) extern PFN_vkCmdSetLineStippleEXT vkCmdSetLineStippleEXT; #endif /* defined(VK_EXT_line_rasterization) */ #if defined(VK_EXT_mesh_shader) extern PFN_vkCmdDrawMeshTasksEXT vkCmdDrawMeshTasksEXT; extern PFN_vkCmdDrawMeshTasksIndirectEXT vkCmdDrawMeshTasksIndirectEXT; #endif /* defined(VK_EXT_mesh_shader) */ #if defined(VK_EXT_mesh_shader) && (defined(VK_KHR_draw_indirect_count) || defined(VK_VERSION_1_2)) extern PFN_vkCmdDrawMeshTasksIndirectCountEXT vkCmdDrawMeshTasksIndirectCountEXT; #endif /* defined(VK_EXT_mesh_shader) && (defined(VK_KHR_draw_indirect_count) || defined(VK_VERSION_1_2)) */ #if defined(VK_EXT_metal_objects) extern PFN_vkExportMetalObjectsEXT vkExportMetalObjectsEXT; #endif /* defined(VK_EXT_metal_objects) */ #if defined(VK_EXT_metal_surface) extern PFN_vkCreateMetalSurfaceEXT vkCreateMetalSurfaceEXT; #endif /* defined(VK_EXT_metal_surface) */ #if defined(VK_EXT_multi_draw) extern PFN_vkCmdDrawMultiEXT vkCmdDrawMultiEXT; extern PFN_vkCmdDrawMultiIndexedEXT vkCmdDrawMultiIndexedEXT; #endif /* defined(VK_EXT_multi_draw) */ #if defined(VK_EXT_opacity_micromap) extern PFN_vkBuildMicromapsEXT vkBuildMicromapsEXT; extern PFN_vkCmdBuildMicromapsEXT vkCmdBuildMicromapsEXT; extern PFN_vkCmdCopyMemoryToMicromapEXT vkCmdCopyMemoryToMicromapEXT; extern PFN_vkCmdCopyMicromapEXT vkCmdCopyMicromapEXT; extern PFN_vkCmdCopyMicromapToMemoryEXT vkCmdCopyMicromapToMemoryEXT; extern PFN_vkCmdWriteMicromapsPropertiesEXT vkCmdWriteMicromapsPropertiesEXT; extern PFN_vkCopyMemoryToMicromapEXT vkCopyMemoryToMicromapEXT; extern PFN_vkCopyMicromapEXT vkCopyMicromapEXT; extern PFN_vkCopyMicromapToMemoryEXT vkCopyMicromapToMemoryEXT; extern PFN_vkCreateMicromapEXT vkCreateMicromapEXT; extern PFN_vkDestroyMicromapEXT vkDestroyMicromapEXT; extern PFN_vkGetDeviceMicromapCompatibilityEXT vkGetDeviceMicromapCompatibilityEXT; extern PFN_vkGetMicromapBuildSizesEXT vkGetMicromapBuildSizesEXT; extern PFN_vkWriteMicromapsPropertiesEXT vkWriteMicromapsPropertiesEXT; #endif /* defined(VK_EXT_opacity_micromap) */ #if defined(VK_EXT_pageable_device_local_memory) extern PFN_vkSetDeviceMemoryPriorityEXT vkSetDeviceMemoryPriorityEXT; #endif /* defined(VK_EXT_pageable_device_local_memory) */ #if defined(VK_EXT_pipeline_properties) extern PFN_vkGetPipelinePropertiesEXT vkGetPipelinePropertiesEXT; #endif /* defined(VK_EXT_pipeline_properties) */ #if defined(VK_EXT_private_data) extern PFN_vkCreatePrivateDataSlotEXT vkCreatePrivateDataSlotEXT; extern PFN_vkDestroyPrivateDataSlotEXT vkDestroyPrivateDataSlotEXT; extern PFN_vkGetPrivateDataEXT vkGetPrivateDataEXT; extern PFN_vkSetPrivateDataEXT vkSetPrivateDataEXT; #endif /* defined(VK_EXT_private_data) */ #if defined(VK_EXT_sample_locations) extern PFN_vkCmdSetSampleLocationsEXT vkCmdSetSampleLocationsEXT; extern PFN_vkGetPhysicalDeviceMultisamplePropertiesEXT vkGetPhysicalDeviceMultisamplePropertiesEXT; #endif /* defined(VK_EXT_sample_locations) */ #if defined(VK_EXT_shader_module_identifier) extern PFN_vkGetShaderModuleCreateInfoIdentifierEXT vkGetShaderModuleCreateInfoIdentifierEXT; extern PFN_vkGetShaderModuleIdentifierEXT vkGetShaderModuleIdentifierEXT; #endif /* defined(VK_EXT_shader_module_identifier) */ #if defined(VK_EXT_shader_object) extern PFN_vkCmdBindShadersEXT vkCmdBindShadersEXT; extern PFN_vkCreateShadersEXT vkCreateShadersEXT; extern PFN_vkDestroyShaderEXT vkDestroyShaderEXT; extern PFN_vkGetShaderBinaryDataEXT vkGetShaderBinaryDataEXT; #endif /* defined(VK_EXT_shader_object) */ #if defined(VK_EXT_swapchain_maintenance1) extern PFN_vkReleaseSwapchainImagesEXT vkReleaseSwapchainImagesEXT; #endif /* defined(VK_EXT_swapchain_maintenance1) */ #if defined(VK_EXT_tooling_info) extern PFN_vkGetPhysicalDeviceToolPropertiesEXT vkGetPhysicalDeviceToolPropertiesEXT; #endif /* defined(VK_EXT_tooling_info) */ #if defined(VK_EXT_transform_feedback) extern PFN_vkCmdBeginQueryIndexedEXT vkCmdBeginQueryIndexedEXT; extern PFN_vkCmdBeginTransformFeedbackEXT vkCmdBeginTransformFeedbackEXT; extern PFN_vkCmdBindTransformFeedbackBuffersEXT vkCmdBindTransformFeedbackBuffersEXT; extern PFN_vkCmdDrawIndirectByteCountEXT vkCmdDrawIndirectByteCountEXT; extern PFN_vkCmdEndQueryIndexedEXT vkCmdEndQueryIndexedEXT; extern PFN_vkCmdEndTransformFeedbackEXT vkCmdEndTransformFeedbackEXT; #endif /* defined(VK_EXT_transform_feedback) */ #if defined(VK_EXT_validation_cache) extern PFN_vkCreateValidationCacheEXT vkCreateValidationCacheEXT; extern PFN_vkDestroyValidationCacheEXT vkDestroyValidationCacheEXT; extern PFN_vkGetValidationCacheDataEXT vkGetValidationCacheDataEXT; extern PFN_vkMergeValidationCachesEXT vkMergeValidationCachesEXT; #endif /* defined(VK_EXT_validation_cache) */ #if defined(VK_FUCHSIA_buffer_collection) extern PFN_vkCreateBufferCollectionFUCHSIA vkCreateBufferCollectionFUCHSIA; extern PFN_vkDestroyBufferCollectionFUCHSIA vkDestroyBufferCollectionFUCHSIA; extern PFN_vkGetBufferCollectionPropertiesFUCHSIA vkGetBufferCollectionPropertiesFUCHSIA; extern PFN_vkSetBufferCollectionBufferConstraintsFUCHSIA vkSetBufferCollectionBufferConstraintsFUCHSIA; extern PFN_vkSetBufferCollectionImageConstraintsFUCHSIA vkSetBufferCollectionImageConstraintsFUCHSIA; #endif /* defined(VK_FUCHSIA_buffer_collection) */ #if defined(VK_FUCHSIA_external_memory) extern PFN_vkGetMemoryZirconHandleFUCHSIA vkGetMemoryZirconHandleFUCHSIA; extern PFN_vkGetMemoryZirconHandlePropertiesFUCHSIA vkGetMemoryZirconHandlePropertiesFUCHSIA; #endif /* defined(VK_FUCHSIA_external_memory) */ #if defined(VK_FUCHSIA_external_semaphore) extern PFN_vkGetSemaphoreZirconHandleFUCHSIA vkGetSemaphoreZirconHandleFUCHSIA; extern PFN_vkImportSemaphoreZirconHandleFUCHSIA vkImportSemaphoreZirconHandleFUCHSIA; #endif /* defined(VK_FUCHSIA_external_semaphore) */ #if defined(VK_FUCHSIA_imagepipe_surface) extern PFN_vkCreateImagePipeSurfaceFUCHSIA vkCreateImagePipeSurfaceFUCHSIA; #endif /* defined(VK_FUCHSIA_imagepipe_surface) */ #if defined(VK_GGP_stream_descriptor_surface) extern PFN_vkCreateStreamDescriptorSurfaceGGP vkCreateStreamDescriptorSurfaceGGP; #endif /* defined(VK_GGP_stream_descriptor_surface) */ #if defined(VK_GOOGLE_display_timing) extern PFN_vkGetPastPresentationTimingGOOGLE vkGetPastPresentationTimingGOOGLE; extern PFN_vkGetRefreshCycleDurationGOOGLE vkGetRefreshCycleDurationGOOGLE; #endif /* defined(VK_GOOGLE_display_timing) */ #if defined(VK_HUAWEI_cluster_culling_shader) extern PFN_vkCmdDrawClusterHUAWEI vkCmdDrawClusterHUAWEI; extern PFN_vkCmdDrawClusterIndirectHUAWEI vkCmdDrawClusterIndirectHUAWEI; #endif /* defined(VK_HUAWEI_cluster_culling_shader) */ #if defined(VK_HUAWEI_invocation_mask) extern PFN_vkCmdBindInvocationMaskHUAWEI vkCmdBindInvocationMaskHUAWEI; #endif /* defined(VK_HUAWEI_invocation_mask) */ #if defined(VK_HUAWEI_subpass_shading) && VK_HUAWEI_SUBPASS_SHADING_SPEC_VERSION >= 2 extern PFN_vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI; #endif /* defined(VK_HUAWEI_subpass_shading) && VK_HUAWEI_SUBPASS_SHADING_SPEC_VERSION >= 2 */ #if defined(VK_HUAWEI_subpass_shading) extern PFN_vkCmdSubpassShadingHUAWEI vkCmdSubpassShadingHUAWEI; #endif /* defined(VK_HUAWEI_subpass_shading) */ #if defined(VK_INTEL_performance_query) extern PFN_vkAcquirePerformanceConfigurationINTEL vkAcquirePerformanceConfigurationINTEL; extern PFN_vkCmdSetPerformanceMarkerINTEL vkCmdSetPerformanceMarkerINTEL; extern PFN_vkCmdSetPerformanceOverrideINTEL vkCmdSetPerformanceOverrideINTEL; extern PFN_vkCmdSetPerformanceStreamMarkerINTEL vkCmdSetPerformanceStreamMarkerINTEL; extern PFN_vkGetPerformanceParameterINTEL vkGetPerformanceParameterINTEL; extern PFN_vkInitializePerformanceApiINTEL vkInitializePerformanceApiINTEL; extern PFN_vkQueueSetPerformanceConfigurationINTEL vkQueueSetPerformanceConfigurationINTEL; extern PFN_vkReleasePerformanceConfigurationINTEL vkReleasePerformanceConfigurationINTEL; extern PFN_vkUninitializePerformanceApiINTEL vkUninitializePerformanceApiINTEL; #endif /* defined(VK_INTEL_performance_query) */ #if defined(VK_KHR_acceleration_structure) extern PFN_vkBuildAccelerationStructuresKHR vkBuildAccelerationStructuresKHR; extern PFN_vkCmdBuildAccelerationStructuresIndirectKHR vkCmdBuildAccelerationStructuresIndirectKHR; extern PFN_vkCmdBuildAccelerationStructuresKHR vkCmdBuildAccelerationStructuresKHR; extern PFN_vkCmdCopyAccelerationStructureKHR vkCmdCopyAccelerationStructureKHR; extern PFN_vkCmdCopyAccelerationStructureToMemoryKHR vkCmdCopyAccelerationStructureToMemoryKHR; extern PFN_vkCmdCopyMemoryToAccelerationStructureKHR vkCmdCopyMemoryToAccelerationStructureKHR; extern PFN_vkCmdWriteAccelerationStructuresPropertiesKHR vkCmdWriteAccelerationStructuresPropertiesKHR; extern PFN_vkCopyAccelerationStructureKHR vkCopyAccelerationStructureKHR; extern PFN_vkCopyAccelerationStructureToMemoryKHR vkCopyAccelerationStructureToMemoryKHR; extern PFN_vkCopyMemoryToAccelerationStructureKHR vkCopyMemoryToAccelerationStructureKHR; extern PFN_vkCreateAccelerationStructureKHR vkCreateAccelerationStructureKHR; extern PFN_vkDestroyAccelerationStructureKHR vkDestroyAccelerationStructureKHR; extern PFN_vkGetAccelerationStructureBuildSizesKHR vkGetAccelerationStructureBuildSizesKHR; extern PFN_vkGetAccelerationStructureDeviceAddressKHR vkGetAccelerationStructureDeviceAddressKHR; extern PFN_vkGetDeviceAccelerationStructureCompatibilityKHR vkGetDeviceAccelerationStructureCompatibilityKHR; extern PFN_vkWriteAccelerationStructuresPropertiesKHR vkWriteAccelerationStructuresPropertiesKHR; #endif /* defined(VK_KHR_acceleration_structure) */ #if defined(VK_KHR_android_surface) extern PFN_vkCreateAndroidSurfaceKHR vkCreateAndroidSurfaceKHR; #endif /* defined(VK_KHR_android_surface) */ #if defined(VK_KHR_bind_memory2) extern PFN_vkBindBufferMemory2KHR vkBindBufferMemory2KHR; extern PFN_vkBindImageMemory2KHR vkBindImageMemory2KHR; #endif /* defined(VK_KHR_bind_memory2) */ #if defined(VK_KHR_buffer_device_address) extern PFN_vkGetBufferDeviceAddressKHR vkGetBufferDeviceAddressKHR; extern PFN_vkGetBufferOpaqueCaptureAddressKHR vkGetBufferOpaqueCaptureAddressKHR; extern PFN_vkGetDeviceMemoryOpaqueCaptureAddressKHR vkGetDeviceMemoryOpaqueCaptureAddressKHR; #endif /* defined(VK_KHR_buffer_device_address) */ #if defined(VK_KHR_calibrated_timestamps) extern PFN_vkGetCalibratedTimestampsKHR vkGetCalibratedTimestampsKHR; extern PFN_vkGetPhysicalDeviceCalibrateableTimeDomainsKHR vkGetPhysicalDeviceCalibrateableTimeDomainsKHR; #endif /* defined(VK_KHR_calibrated_timestamps) */ #if defined(VK_KHR_cooperative_matrix) extern PFN_vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR; #endif /* defined(VK_KHR_cooperative_matrix) */ #if defined(VK_KHR_copy_commands2) extern PFN_vkCmdBlitImage2KHR vkCmdBlitImage2KHR; extern PFN_vkCmdCopyBuffer2KHR vkCmdCopyBuffer2KHR; extern PFN_vkCmdCopyBufferToImage2KHR vkCmdCopyBufferToImage2KHR; extern PFN_vkCmdCopyImage2KHR vkCmdCopyImage2KHR; extern PFN_vkCmdCopyImageToBuffer2KHR vkCmdCopyImageToBuffer2KHR; extern PFN_vkCmdResolveImage2KHR vkCmdResolveImage2KHR; #endif /* defined(VK_KHR_copy_commands2) */ #if defined(VK_KHR_create_renderpass2) extern PFN_vkCmdBeginRenderPass2KHR vkCmdBeginRenderPass2KHR; extern PFN_vkCmdEndRenderPass2KHR vkCmdEndRenderPass2KHR; extern PFN_vkCmdNextSubpass2KHR vkCmdNextSubpass2KHR; extern PFN_vkCreateRenderPass2KHR vkCreateRenderPass2KHR; #endif /* defined(VK_KHR_create_renderpass2) */ #if defined(VK_KHR_deferred_host_operations) extern PFN_vkCreateDeferredOperationKHR vkCreateDeferredOperationKHR; extern PFN_vkDeferredOperationJoinKHR vkDeferredOperationJoinKHR; extern PFN_vkDestroyDeferredOperationKHR vkDestroyDeferredOperationKHR; extern PFN_vkGetDeferredOperationMaxConcurrencyKHR vkGetDeferredOperationMaxConcurrencyKHR; extern PFN_vkGetDeferredOperationResultKHR vkGetDeferredOperationResultKHR; #endif /* defined(VK_KHR_deferred_host_operations) */ #if defined(VK_KHR_descriptor_update_template) extern PFN_vkCreateDescriptorUpdateTemplateKHR vkCreateDescriptorUpdateTemplateKHR; extern PFN_vkDestroyDescriptorUpdateTemplateKHR vkDestroyDescriptorUpdateTemplateKHR; extern PFN_vkUpdateDescriptorSetWithTemplateKHR vkUpdateDescriptorSetWithTemplateKHR; #endif /* defined(VK_KHR_descriptor_update_template) */ #if defined(VK_KHR_device_group) extern PFN_vkCmdDispatchBaseKHR vkCmdDispatchBaseKHR; extern PFN_vkCmdSetDeviceMaskKHR vkCmdSetDeviceMaskKHR; extern PFN_vkGetDeviceGroupPeerMemoryFeaturesKHR vkGetDeviceGroupPeerMemoryFeaturesKHR; #endif /* defined(VK_KHR_device_group) */ #if defined(VK_KHR_device_group_creation) extern PFN_vkEnumeratePhysicalDeviceGroupsKHR vkEnumeratePhysicalDeviceGroupsKHR; #endif /* defined(VK_KHR_device_group_creation) */ #if defined(VK_KHR_display) extern PFN_vkCreateDisplayModeKHR vkCreateDisplayModeKHR; extern PFN_vkCreateDisplayPlaneSurfaceKHR vkCreateDisplayPlaneSurfaceKHR; extern PFN_vkGetDisplayModePropertiesKHR vkGetDisplayModePropertiesKHR; extern PFN_vkGetDisplayPlaneCapabilitiesKHR vkGetDisplayPlaneCapabilitiesKHR; extern PFN_vkGetDisplayPlaneSupportedDisplaysKHR vkGetDisplayPlaneSupportedDisplaysKHR; extern PFN_vkGetPhysicalDeviceDisplayPlanePropertiesKHR vkGetPhysicalDeviceDisplayPlanePropertiesKHR; extern PFN_vkGetPhysicalDeviceDisplayPropertiesKHR vkGetPhysicalDeviceDisplayPropertiesKHR; #endif /* defined(VK_KHR_display) */ #if defined(VK_KHR_display_swapchain) extern PFN_vkCreateSharedSwapchainsKHR vkCreateSharedSwapchainsKHR; #endif /* defined(VK_KHR_display_swapchain) */ #if defined(VK_KHR_draw_indirect_count) extern PFN_vkCmdDrawIndexedIndirectCountKHR vkCmdDrawIndexedIndirectCountKHR; extern PFN_vkCmdDrawIndirectCountKHR vkCmdDrawIndirectCountKHR; #endif /* defined(VK_KHR_draw_indirect_count) */ #if defined(VK_KHR_dynamic_rendering) extern PFN_vkCmdBeginRenderingKHR vkCmdBeginRenderingKHR; extern PFN_vkCmdEndRenderingKHR vkCmdEndRenderingKHR; #endif /* defined(VK_KHR_dynamic_rendering) */ #if defined(VK_KHR_dynamic_rendering_local_read) extern PFN_vkCmdSetRenderingAttachmentLocationsKHR vkCmdSetRenderingAttachmentLocationsKHR; extern PFN_vkCmdSetRenderingInputAttachmentIndicesKHR vkCmdSetRenderingInputAttachmentIndicesKHR; #endif /* defined(VK_KHR_dynamic_rendering_local_read) */ #if defined(VK_KHR_external_fence_capabilities) extern PFN_vkGetPhysicalDeviceExternalFencePropertiesKHR vkGetPhysicalDeviceExternalFencePropertiesKHR; #endif /* defined(VK_KHR_external_fence_capabilities) */ #if defined(VK_KHR_external_fence_fd) extern PFN_vkGetFenceFdKHR vkGetFenceFdKHR; extern PFN_vkImportFenceFdKHR vkImportFenceFdKHR; #endif /* defined(VK_KHR_external_fence_fd) */ #if defined(VK_KHR_external_fence_win32) extern PFN_vkGetFenceWin32HandleKHR vkGetFenceWin32HandleKHR; extern PFN_vkImportFenceWin32HandleKHR vkImportFenceWin32HandleKHR; #endif /* defined(VK_KHR_external_fence_win32) */ #if defined(VK_KHR_external_memory_capabilities) extern PFN_vkGetPhysicalDeviceExternalBufferPropertiesKHR vkGetPhysicalDeviceExternalBufferPropertiesKHR; #endif /* defined(VK_KHR_external_memory_capabilities) */ #if defined(VK_KHR_external_memory_fd) extern PFN_vkGetMemoryFdKHR vkGetMemoryFdKHR; extern PFN_vkGetMemoryFdPropertiesKHR vkGetMemoryFdPropertiesKHR; #endif /* defined(VK_KHR_external_memory_fd) */ #if defined(VK_KHR_external_memory_win32) extern PFN_vkGetMemoryWin32HandleKHR vkGetMemoryWin32HandleKHR; extern PFN_vkGetMemoryWin32HandlePropertiesKHR vkGetMemoryWin32HandlePropertiesKHR; #endif /* defined(VK_KHR_external_memory_win32) */ #if defined(VK_KHR_external_semaphore_capabilities) extern PFN_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR vkGetPhysicalDeviceExternalSemaphorePropertiesKHR; #endif /* defined(VK_KHR_external_semaphore_capabilities) */ #if defined(VK_KHR_external_semaphore_fd) extern PFN_vkGetSemaphoreFdKHR vkGetSemaphoreFdKHR; extern PFN_vkImportSemaphoreFdKHR vkImportSemaphoreFdKHR; #endif /* defined(VK_KHR_external_semaphore_fd) */ #if defined(VK_KHR_external_semaphore_win32) extern PFN_vkGetSemaphoreWin32HandleKHR vkGetSemaphoreWin32HandleKHR; extern PFN_vkImportSemaphoreWin32HandleKHR vkImportSemaphoreWin32HandleKHR; #endif /* defined(VK_KHR_external_semaphore_win32) */ #if defined(VK_KHR_fragment_shading_rate) extern PFN_vkCmdSetFragmentShadingRateKHR vkCmdSetFragmentShadingRateKHR; extern PFN_vkGetPhysicalDeviceFragmentShadingRatesKHR vkGetPhysicalDeviceFragmentShadingRatesKHR; #endif /* defined(VK_KHR_fragment_shading_rate) */ #if defined(VK_KHR_get_display_properties2) extern PFN_vkGetDisplayModeProperties2KHR vkGetDisplayModeProperties2KHR; extern PFN_vkGetDisplayPlaneCapabilities2KHR vkGetDisplayPlaneCapabilities2KHR; extern PFN_vkGetPhysicalDeviceDisplayPlaneProperties2KHR vkGetPhysicalDeviceDisplayPlaneProperties2KHR; extern PFN_vkGetPhysicalDeviceDisplayProperties2KHR vkGetPhysicalDeviceDisplayProperties2KHR; #endif /* defined(VK_KHR_get_display_properties2) */ #if defined(VK_KHR_get_memory_requirements2) extern PFN_vkGetBufferMemoryRequirements2KHR vkGetBufferMemoryRequirements2KHR; extern PFN_vkGetImageMemoryRequirements2KHR vkGetImageMemoryRequirements2KHR; extern PFN_vkGetImageSparseMemoryRequirements2KHR vkGetImageSparseMemoryRequirements2KHR; #endif /* defined(VK_KHR_get_memory_requirements2) */ #if defined(VK_KHR_get_physical_device_properties2) extern PFN_vkGetPhysicalDeviceFeatures2KHR vkGetPhysicalDeviceFeatures2KHR; extern PFN_vkGetPhysicalDeviceFormatProperties2KHR vkGetPhysicalDeviceFormatProperties2KHR; extern PFN_vkGetPhysicalDeviceImageFormatProperties2KHR vkGetPhysicalDeviceImageFormatProperties2KHR; extern PFN_vkGetPhysicalDeviceMemoryProperties2KHR vkGetPhysicalDeviceMemoryProperties2KHR; extern PFN_vkGetPhysicalDeviceProperties2KHR vkGetPhysicalDeviceProperties2KHR; extern PFN_vkGetPhysicalDeviceQueueFamilyProperties2KHR vkGetPhysicalDeviceQueueFamilyProperties2KHR; extern PFN_vkGetPhysicalDeviceSparseImageFormatProperties2KHR vkGetPhysicalDeviceSparseImageFormatProperties2KHR; #endif /* defined(VK_KHR_get_physical_device_properties2) */ #if defined(VK_KHR_get_surface_capabilities2) extern PFN_vkGetPhysicalDeviceSurfaceCapabilities2KHR vkGetPhysicalDeviceSurfaceCapabilities2KHR; extern PFN_vkGetPhysicalDeviceSurfaceFormats2KHR vkGetPhysicalDeviceSurfaceFormats2KHR; #endif /* defined(VK_KHR_get_surface_capabilities2) */ #if defined(VK_KHR_line_rasterization) extern PFN_vkCmdSetLineStippleKHR vkCmdSetLineStippleKHR; #endif /* defined(VK_KHR_line_rasterization) */ #if defined(VK_KHR_maintenance1) extern PFN_vkTrimCommandPoolKHR vkTrimCommandPoolKHR; #endif /* defined(VK_KHR_maintenance1) */ #if defined(VK_KHR_maintenance3) extern PFN_vkGetDescriptorSetLayoutSupportKHR vkGetDescriptorSetLayoutSupportKHR; #endif /* defined(VK_KHR_maintenance3) */ #if defined(VK_KHR_maintenance4) extern PFN_vkGetDeviceBufferMemoryRequirementsKHR vkGetDeviceBufferMemoryRequirementsKHR; extern PFN_vkGetDeviceImageMemoryRequirementsKHR vkGetDeviceImageMemoryRequirementsKHR; extern PFN_vkGetDeviceImageSparseMemoryRequirementsKHR vkGetDeviceImageSparseMemoryRequirementsKHR; #endif /* defined(VK_KHR_maintenance4) */ #if defined(VK_KHR_maintenance5) extern PFN_vkCmdBindIndexBuffer2KHR vkCmdBindIndexBuffer2KHR; extern PFN_vkGetDeviceImageSubresourceLayoutKHR vkGetDeviceImageSubresourceLayoutKHR; extern PFN_vkGetImageSubresourceLayout2KHR vkGetImageSubresourceLayout2KHR; extern PFN_vkGetRenderingAreaGranularityKHR vkGetRenderingAreaGranularityKHR; #endif /* defined(VK_KHR_maintenance5) */ #if defined(VK_KHR_maintenance6) extern PFN_vkCmdBindDescriptorSets2KHR vkCmdBindDescriptorSets2KHR; extern PFN_vkCmdPushConstants2KHR vkCmdPushConstants2KHR; #endif /* defined(VK_KHR_maintenance6) */ #if defined(VK_KHR_maintenance6) && defined(VK_KHR_push_descriptor) extern PFN_vkCmdPushDescriptorSet2KHR vkCmdPushDescriptorSet2KHR; extern PFN_vkCmdPushDescriptorSetWithTemplate2KHR vkCmdPushDescriptorSetWithTemplate2KHR; #endif /* defined(VK_KHR_maintenance6) && defined(VK_KHR_push_descriptor) */ #if defined(VK_KHR_maintenance6) && defined(VK_EXT_descriptor_buffer) extern PFN_vkCmdBindDescriptorBufferEmbeddedSamplers2EXT vkCmdBindDescriptorBufferEmbeddedSamplers2EXT; extern PFN_vkCmdSetDescriptorBufferOffsets2EXT vkCmdSetDescriptorBufferOffsets2EXT; #endif /* defined(VK_KHR_maintenance6) && defined(VK_EXT_descriptor_buffer) */ #if defined(VK_KHR_map_memory2) extern PFN_vkMapMemory2KHR vkMapMemory2KHR; extern PFN_vkUnmapMemory2KHR vkUnmapMemory2KHR; #endif /* defined(VK_KHR_map_memory2) */ #if defined(VK_KHR_performance_query) extern PFN_vkAcquireProfilingLockKHR vkAcquireProfilingLockKHR; extern PFN_vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR; extern PFN_vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR; extern PFN_vkReleaseProfilingLockKHR vkReleaseProfilingLockKHR; #endif /* defined(VK_KHR_performance_query) */ #if defined(VK_KHR_pipeline_binary) extern PFN_vkCreatePipelineBinariesKHR vkCreatePipelineBinariesKHR; extern PFN_vkDestroyPipelineBinaryKHR vkDestroyPipelineBinaryKHR; extern PFN_vkGetPipelineBinaryDataKHR vkGetPipelineBinaryDataKHR; extern PFN_vkGetPipelineKeyKHR vkGetPipelineKeyKHR; extern PFN_vkReleaseCapturedPipelineDataKHR vkReleaseCapturedPipelineDataKHR; #endif /* defined(VK_KHR_pipeline_binary) */ #if defined(VK_KHR_pipeline_executable_properties) extern PFN_vkGetPipelineExecutableInternalRepresentationsKHR vkGetPipelineExecutableInternalRepresentationsKHR; extern PFN_vkGetPipelineExecutablePropertiesKHR vkGetPipelineExecutablePropertiesKHR; extern PFN_vkGetPipelineExecutableStatisticsKHR vkGetPipelineExecutableStatisticsKHR; #endif /* defined(VK_KHR_pipeline_executable_properties) */ #if defined(VK_KHR_present_wait) extern PFN_vkWaitForPresentKHR vkWaitForPresentKHR; #endif /* defined(VK_KHR_present_wait) */ #if defined(VK_KHR_push_descriptor) extern PFN_vkCmdPushDescriptorSetKHR vkCmdPushDescriptorSetKHR; #endif /* defined(VK_KHR_push_descriptor) */ #if defined(VK_KHR_ray_tracing_maintenance1) && defined(VK_KHR_ray_tracing_pipeline) extern PFN_vkCmdTraceRaysIndirect2KHR vkCmdTraceRaysIndirect2KHR; #endif /* defined(VK_KHR_ray_tracing_maintenance1) && defined(VK_KHR_ray_tracing_pipeline) */ #if defined(VK_KHR_ray_tracing_pipeline) extern PFN_vkCmdSetRayTracingPipelineStackSizeKHR vkCmdSetRayTracingPipelineStackSizeKHR; extern PFN_vkCmdTraceRaysIndirectKHR vkCmdTraceRaysIndirectKHR; extern PFN_vkCmdTraceRaysKHR vkCmdTraceRaysKHR; extern PFN_vkCreateRayTracingPipelinesKHR vkCreateRayTracingPipelinesKHR; extern PFN_vkGetRayTracingCaptureReplayShaderGroupHandlesKHR vkGetRayTracingCaptureReplayShaderGroupHandlesKHR; extern PFN_vkGetRayTracingShaderGroupHandlesKHR vkGetRayTracingShaderGroupHandlesKHR; extern PFN_vkGetRayTracingShaderGroupStackSizeKHR vkGetRayTracingShaderGroupStackSizeKHR; #endif /* defined(VK_KHR_ray_tracing_pipeline) */ #if defined(VK_KHR_sampler_ycbcr_conversion) extern PFN_vkCreateSamplerYcbcrConversionKHR vkCreateSamplerYcbcrConversionKHR; extern PFN_vkDestroySamplerYcbcrConversionKHR vkDestroySamplerYcbcrConversionKHR; #endif /* defined(VK_KHR_sampler_ycbcr_conversion) */ #if defined(VK_KHR_shared_presentable_image) extern PFN_vkGetSwapchainStatusKHR vkGetSwapchainStatusKHR; #endif /* defined(VK_KHR_shared_presentable_image) */ #if defined(VK_KHR_surface) extern PFN_vkDestroySurfaceKHR vkDestroySurfaceKHR; extern PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR vkGetPhysicalDeviceSurfaceCapabilitiesKHR; extern PFN_vkGetPhysicalDeviceSurfaceFormatsKHR vkGetPhysicalDeviceSurfaceFormatsKHR; extern PFN_vkGetPhysicalDeviceSurfacePresentModesKHR vkGetPhysicalDeviceSurfacePresentModesKHR; extern PFN_vkGetPhysicalDeviceSurfaceSupportKHR vkGetPhysicalDeviceSurfaceSupportKHR; #endif /* defined(VK_KHR_surface) */ #if defined(VK_KHR_swapchain) extern PFN_vkAcquireNextImageKHR vkAcquireNextImageKHR; extern PFN_vkCreateSwapchainKHR vkCreateSwapchainKHR; extern PFN_vkDestroySwapchainKHR vkDestroySwapchainKHR; extern PFN_vkGetSwapchainImagesKHR vkGetSwapchainImagesKHR; extern PFN_vkQueuePresentKHR vkQueuePresentKHR; #endif /* defined(VK_KHR_swapchain) */ #if defined(VK_KHR_synchronization2) extern PFN_vkCmdPipelineBarrier2KHR vkCmdPipelineBarrier2KHR; extern PFN_vkCmdResetEvent2KHR vkCmdResetEvent2KHR; extern PFN_vkCmdSetEvent2KHR vkCmdSetEvent2KHR; extern PFN_vkCmdWaitEvents2KHR vkCmdWaitEvents2KHR; extern PFN_vkCmdWriteTimestamp2KHR vkCmdWriteTimestamp2KHR; extern PFN_vkQueueSubmit2KHR vkQueueSubmit2KHR; #endif /* defined(VK_KHR_synchronization2) */ #if defined(VK_KHR_timeline_semaphore) extern PFN_vkGetSemaphoreCounterValueKHR vkGetSemaphoreCounterValueKHR; extern PFN_vkSignalSemaphoreKHR vkSignalSemaphoreKHR; extern PFN_vkWaitSemaphoresKHR vkWaitSemaphoresKHR; #endif /* defined(VK_KHR_timeline_semaphore) */ #if defined(VK_KHR_video_decode_queue) extern PFN_vkCmdDecodeVideoKHR vkCmdDecodeVideoKHR; #endif /* defined(VK_KHR_video_decode_queue) */ #if defined(VK_KHR_video_encode_queue) extern PFN_vkCmdEncodeVideoKHR vkCmdEncodeVideoKHR; extern PFN_vkGetEncodedVideoSessionParametersKHR vkGetEncodedVideoSessionParametersKHR; extern PFN_vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR; #endif /* defined(VK_KHR_video_encode_queue) */ #if defined(VK_KHR_video_queue) extern PFN_vkBindVideoSessionMemoryKHR vkBindVideoSessionMemoryKHR; extern PFN_vkCmdBeginVideoCodingKHR vkCmdBeginVideoCodingKHR; extern PFN_vkCmdControlVideoCodingKHR vkCmdControlVideoCodingKHR; extern PFN_vkCmdEndVideoCodingKHR vkCmdEndVideoCodingKHR; extern PFN_vkCreateVideoSessionKHR vkCreateVideoSessionKHR; extern PFN_vkCreateVideoSessionParametersKHR vkCreateVideoSessionParametersKHR; extern PFN_vkDestroyVideoSessionKHR vkDestroyVideoSessionKHR; extern PFN_vkDestroyVideoSessionParametersKHR vkDestroyVideoSessionParametersKHR; extern PFN_vkGetPhysicalDeviceVideoCapabilitiesKHR vkGetPhysicalDeviceVideoCapabilitiesKHR; extern PFN_vkGetPhysicalDeviceVideoFormatPropertiesKHR vkGetPhysicalDeviceVideoFormatPropertiesKHR; extern PFN_vkGetVideoSessionMemoryRequirementsKHR vkGetVideoSessionMemoryRequirementsKHR; extern PFN_vkUpdateVideoSessionParametersKHR vkUpdateVideoSessionParametersKHR; #endif /* defined(VK_KHR_video_queue) */ #if defined(VK_KHR_wayland_surface) extern PFN_vkCreateWaylandSurfaceKHR vkCreateWaylandSurfaceKHR; extern PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR vkGetPhysicalDeviceWaylandPresentationSupportKHR; #endif /* defined(VK_KHR_wayland_surface) */ #if defined(VK_KHR_win32_surface) extern PFN_vkCreateWin32SurfaceKHR vkCreateWin32SurfaceKHR; extern PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR vkGetPhysicalDeviceWin32PresentationSupportKHR; #endif /* defined(VK_KHR_win32_surface) */ #if defined(VK_KHR_xcb_surface) extern PFN_vkCreateXcbSurfaceKHR vkCreateXcbSurfaceKHR; extern PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR vkGetPhysicalDeviceXcbPresentationSupportKHR; #endif /* defined(VK_KHR_xcb_surface) */ #if defined(VK_KHR_xlib_surface) extern PFN_vkCreateXlibSurfaceKHR vkCreateXlibSurfaceKHR; extern PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR vkGetPhysicalDeviceXlibPresentationSupportKHR; #endif /* defined(VK_KHR_xlib_surface) */ #if defined(VK_MVK_ios_surface) extern PFN_vkCreateIOSSurfaceMVK vkCreateIOSSurfaceMVK; #endif /* defined(VK_MVK_ios_surface) */ #if defined(VK_MVK_macos_surface) extern PFN_vkCreateMacOSSurfaceMVK vkCreateMacOSSurfaceMVK; #endif /* defined(VK_MVK_macos_surface) */ #if defined(VK_NN_vi_surface) extern PFN_vkCreateViSurfaceNN vkCreateViSurfaceNN; #endif /* defined(VK_NN_vi_surface) */ #if defined(VK_NVX_binary_import) extern PFN_vkCmdCuLaunchKernelNVX vkCmdCuLaunchKernelNVX; extern PFN_vkCreateCuFunctionNVX vkCreateCuFunctionNVX; extern PFN_vkCreateCuModuleNVX vkCreateCuModuleNVX; extern PFN_vkDestroyCuFunctionNVX vkDestroyCuFunctionNVX; extern PFN_vkDestroyCuModuleNVX vkDestroyCuModuleNVX; #endif /* defined(VK_NVX_binary_import) */ #if defined(VK_NVX_image_view_handle) extern PFN_vkGetImageViewHandleNVX vkGetImageViewHandleNVX; #endif /* defined(VK_NVX_image_view_handle) */ #if defined(VK_NVX_image_view_handle) && VK_NVX_IMAGE_VIEW_HANDLE_SPEC_VERSION >= 3 extern PFN_vkGetImageViewHandle64NVX vkGetImageViewHandle64NVX; #endif /* defined(VK_NVX_image_view_handle) && VK_NVX_IMAGE_VIEW_HANDLE_SPEC_VERSION >= 3 */ #if defined(VK_NVX_image_view_handle) && VK_NVX_IMAGE_VIEW_HANDLE_SPEC_VERSION >= 2 extern PFN_vkGetImageViewAddressNVX vkGetImageViewAddressNVX; #endif /* defined(VK_NVX_image_view_handle) && VK_NVX_IMAGE_VIEW_HANDLE_SPEC_VERSION >= 2 */ #if defined(VK_NV_acquire_winrt_display) extern PFN_vkAcquireWinrtDisplayNV vkAcquireWinrtDisplayNV; extern PFN_vkGetWinrtDisplayNV vkGetWinrtDisplayNV; #endif /* defined(VK_NV_acquire_winrt_display) */ #if defined(VK_NV_clip_space_w_scaling) extern PFN_vkCmdSetViewportWScalingNV vkCmdSetViewportWScalingNV; #endif /* defined(VK_NV_clip_space_w_scaling) */ #if defined(VK_NV_cluster_acceleration_structure) extern PFN_vkCmdBuildClusterAccelerationStructureIndirectNV vkCmdBuildClusterAccelerationStructureIndirectNV; extern PFN_vkGetClusterAccelerationStructureBuildSizesNV vkGetClusterAccelerationStructureBuildSizesNV; #endif /* defined(VK_NV_cluster_acceleration_structure) */ #if defined(VK_NV_cooperative_matrix) extern PFN_vkGetPhysicalDeviceCooperativeMatrixPropertiesNV vkGetPhysicalDeviceCooperativeMatrixPropertiesNV; #endif /* defined(VK_NV_cooperative_matrix) */ #if defined(VK_NV_cooperative_matrix2) extern PFN_vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV; #endif /* defined(VK_NV_cooperative_matrix2) */ #if defined(VK_NV_cooperative_vector) extern PFN_vkCmdConvertCooperativeVectorMatrixNV vkCmdConvertCooperativeVectorMatrixNV; extern PFN_vkConvertCooperativeVectorMatrixNV vkConvertCooperativeVectorMatrixNV; extern PFN_vkGetPhysicalDeviceCooperativeVectorPropertiesNV vkGetPhysicalDeviceCooperativeVectorPropertiesNV; #endif /* defined(VK_NV_cooperative_vector) */ #if defined(VK_NV_copy_memory_indirect) extern PFN_vkCmdCopyMemoryIndirectNV vkCmdCopyMemoryIndirectNV; extern PFN_vkCmdCopyMemoryToImageIndirectNV vkCmdCopyMemoryToImageIndirectNV; #endif /* defined(VK_NV_copy_memory_indirect) */ #if defined(VK_NV_coverage_reduction_mode) extern PFN_vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV; #endif /* defined(VK_NV_coverage_reduction_mode) */ #if defined(VK_NV_cuda_kernel_launch) extern PFN_vkCmdCudaLaunchKernelNV vkCmdCudaLaunchKernelNV; extern PFN_vkCreateCudaFunctionNV vkCreateCudaFunctionNV; extern PFN_vkCreateCudaModuleNV vkCreateCudaModuleNV; extern PFN_vkDestroyCudaFunctionNV vkDestroyCudaFunctionNV; extern PFN_vkDestroyCudaModuleNV vkDestroyCudaModuleNV; extern PFN_vkGetCudaModuleCacheNV vkGetCudaModuleCacheNV; #endif /* defined(VK_NV_cuda_kernel_launch) */ #if defined(VK_NV_device_diagnostic_checkpoints) extern PFN_vkCmdSetCheckpointNV vkCmdSetCheckpointNV; extern PFN_vkGetQueueCheckpointDataNV vkGetQueueCheckpointDataNV; #endif /* defined(VK_NV_device_diagnostic_checkpoints) */ #if defined(VK_NV_device_diagnostic_checkpoints) && (defined(VK_VERSION_1_3) || defined(VK_KHR_synchronization2)) extern PFN_vkGetQueueCheckpointData2NV vkGetQueueCheckpointData2NV; #endif /* defined(VK_NV_device_diagnostic_checkpoints) && (defined(VK_VERSION_1_3) || defined(VK_KHR_synchronization2)) */ #if defined(VK_NV_device_generated_commands) extern PFN_vkCmdBindPipelineShaderGroupNV vkCmdBindPipelineShaderGroupNV; extern PFN_vkCmdExecuteGeneratedCommandsNV vkCmdExecuteGeneratedCommandsNV; extern PFN_vkCmdPreprocessGeneratedCommandsNV vkCmdPreprocessGeneratedCommandsNV; extern PFN_vkCreateIndirectCommandsLayoutNV vkCreateIndirectCommandsLayoutNV; extern PFN_vkDestroyIndirectCommandsLayoutNV vkDestroyIndirectCommandsLayoutNV; extern PFN_vkGetGeneratedCommandsMemoryRequirementsNV vkGetGeneratedCommandsMemoryRequirementsNV; #endif /* defined(VK_NV_device_generated_commands) */ #if defined(VK_NV_device_generated_commands_compute) extern PFN_vkCmdUpdatePipelineIndirectBufferNV vkCmdUpdatePipelineIndirectBufferNV; extern PFN_vkGetPipelineIndirectDeviceAddressNV vkGetPipelineIndirectDeviceAddressNV; extern PFN_vkGetPipelineIndirectMemoryRequirementsNV vkGetPipelineIndirectMemoryRequirementsNV; #endif /* defined(VK_NV_device_generated_commands_compute) */ #if defined(VK_NV_external_memory_capabilities) extern PFN_vkGetPhysicalDeviceExternalImageFormatPropertiesNV vkGetPhysicalDeviceExternalImageFormatPropertiesNV; #endif /* defined(VK_NV_external_memory_capabilities) */ #if defined(VK_NV_external_memory_rdma) extern PFN_vkGetMemoryRemoteAddressNV vkGetMemoryRemoteAddressNV; #endif /* defined(VK_NV_external_memory_rdma) */ #if defined(VK_NV_external_memory_win32) extern PFN_vkGetMemoryWin32HandleNV vkGetMemoryWin32HandleNV; #endif /* defined(VK_NV_external_memory_win32) */ #if defined(VK_NV_fragment_shading_rate_enums) extern PFN_vkCmdSetFragmentShadingRateEnumNV vkCmdSetFragmentShadingRateEnumNV; #endif /* defined(VK_NV_fragment_shading_rate_enums) */ #if defined(VK_NV_low_latency2) extern PFN_vkGetLatencyTimingsNV vkGetLatencyTimingsNV; extern PFN_vkLatencySleepNV vkLatencySleepNV; extern PFN_vkQueueNotifyOutOfBandNV vkQueueNotifyOutOfBandNV; extern PFN_vkSetLatencyMarkerNV vkSetLatencyMarkerNV; extern PFN_vkSetLatencySleepModeNV vkSetLatencySleepModeNV; #endif /* defined(VK_NV_low_latency2) */ #if defined(VK_NV_memory_decompression) extern PFN_vkCmdDecompressMemoryIndirectCountNV vkCmdDecompressMemoryIndirectCountNV; extern PFN_vkCmdDecompressMemoryNV vkCmdDecompressMemoryNV; #endif /* defined(VK_NV_memory_decompression) */ #if defined(VK_NV_mesh_shader) extern PFN_vkCmdDrawMeshTasksIndirectNV vkCmdDrawMeshTasksIndirectNV; extern PFN_vkCmdDrawMeshTasksNV vkCmdDrawMeshTasksNV; #endif /* defined(VK_NV_mesh_shader) */ #if defined(VK_NV_mesh_shader) && (defined(VK_KHR_draw_indirect_count) || defined(VK_VERSION_1_2)) extern PFN_vkCmdDrawMeshTasksIndirectCountNV vkCmdDrawMeshTasksIndirectCountNV; #endif /* defined(VK_NV_mesh_shader) && (defined(VK_KHR_draw_indirect_count) || defined(VK_VERSION_1_2)) */ #if defined(VK_NV_optical_flow) extern PFN_vkBindOpticalFlowSessionImageNV vkBindOpticalFlowSessionImageNV; extern PFN_vkCmdOpticalFlowExecuteNV vkCmdOpticalFlowExecuteNV; extern PFN_vkCreateOpticalFlowSessionNV vkCreateOpticalFlowSessionNV; extern PFN_vkDestroyOpticalFlowSessionNV vkDestroyOpticalFlowSessionNV; extern PFN_vkGetPhysicalDeviceOpticalFlowImageFormatsNV vkGetPhysicalDeviceOpticalFlowImageFormatsNV; #endif /* defined(VK_NV_optical_flow) */ #if defined(VK_NV_partitioned_acceleration_structure) extern PFN_vkCmdBuildPartitionedAccelerationStructuresNV vkCmdBuildPartitionedAccelerationStructuresNV; extern PFN_vkGetPartitionedAccelerationStructuresBuildSizesNV vkGetPartitionedAccelerationStructuresBuildSizesNV; #endif /* defined(VK_NV_partitioned_acceleration_structure) */ #if defined(VK_NV_ray_tracing) extern PFN_vkBindAccelerationStructureMemoryNV vkBindAccelerationStructureMemoryNV; extern PFN_vkCmdBuildAccelerationStructureNV vkCmdBuildAccelerationStructureNV; extern PFN_vkCmdCopyAccelerationStructureNV vkCmdCopyAccelerationStructureNV; extern PFN_vkCmdTraceRaysNV vkCmdTraceRaysNV; extern PFN_vkCmdWriteAccelerationStructuresPropertiesNV vkCmdWriteAccelerationStructuresPropertiesNV; extern PFN_vkCompileDeferredNV vkCompileDeferredNV; extern PFN_vkCreateAccelerationStructureNV vkCreateAccelerationStructureNV; extern PFN_vkCreateRayTracingPipelinesNV vkCreateRayTracingPipelinesNV; extern PFN_vkDestroyAccelerationStructureNV vkDestroyAccelerationStructureNV; extern PFN_vkGetAccelerationStructureHandleNV vkGetAccelerationStructureHandleNV; extern PFN_vkGetAccelerationStructureMemoryRequirementsNV vkGetAccelerationStructureMemoryRequirementsNV; extern PFN_vkGetRayTracingShaderGroupHandlesNV vkGetRayTracingShaderGroupHandlesNV; #endif /* defined(VK_NV_ray_tracing) */ #if defined(VK_NV_scissor_exclusive) && VK_NV_SCISSOR_EXCLUSIVE_SPEC_VERSION >= 2 extern PFN_vkCmdSetExclusiveScissorEnableNV vkCmdSetExclusiveScissorEnableNV; #endif /* defined(VK_NV_scissor_exclusive) && VK_NV_SCISSOR_EXCLUSIVE_SPEC_VERSION >= 2 */ #if defined(VK_NV_scissor_exclusive) extern PFN_vkCmdSetExclusiveScissorNV vkCmdSetExclusiveScissorNV; #endif /* defined(VK_NV_scissor_exclusive) */ #if defined(VK_NV_shading_rate_image) extern PFN_vkCmdBindShadingRateImageNV vkCmdBindShadingRateImageNV; extern PFN_vkCmdSetCoarseSampleOrderNV vkCmdSetCoarseSampleOrderNV; extern PFN_vkCmdSetViewportShadingRatePaletteNV vkCmdSetViewportShadingRatePaletteNV; #endif /* defined(VK_NV_shading_rate_image) */ #if defined(VK_QCOM_tile_properties) extern PFN_vkGetDynamicRenderingTilePropertiesQCOM vkGetDynamicRenderingTilePropertiesQCOM; extern PFN_vkGetFramebufferTilePropertiesQCOM vkGetFramebufferTilePropertiesQCOM; #endif /* defined(VK_QCOM_tile_properties) */ #if defined(VK_QNX_external_memory_screen_buffer) extern PFN_vkGetScreenBufferPropertiesQNX vkGetScreenBufferPropertiesQNX; #endif /* defined(VK_QNX_external_memory_screen_buffer) */ #if defined(VK_QNX_screen_surface) extern PFN_vkCreateScreenSurfaceQNX vkCreateScreenSurfaceQNX; extern PFN_vkGetPhysicalDeviceScreenPresentationSupportQNX vkGetPhysicalDeviceScreenPresentationSupportQNX; #endif /* defined(VK_QNX_screen_surface) */ #if defined(VK_VALVE_descriptor_set_host_mapping) extern PFN_vkGetDescriptorSetHostMappingVALVE vkGetDescriptorSetHostMappingVALVE; extern PFN_vkGetDescriptorSetLayoutHostMappingInfoVALVE vkGetDescriptorSetLayoutHostMappingInfoVALVE; #endif /* defined(VK_VALVE_descriptor_set_host_mapping) */ #if (defined(VK_EXT_depth_clamp_control)) || (defined(VK_EXT_shader_object) && defined(VK_EXT_depth_clamp_control)) extern PFN_vkCmdSetDepthClampRangeEXT vkCmdSetDepthClampRangeEXT; #endif /* (defined(VK_EXT_depth_clamp_control)) || (defined(VK_EXT_shader_object) && defined(VK_EXT_depth_clamp_control)) */ #if (defined(VK_EXT_extended_dynamic_state)) || (defined(VK_EXT_shader_object)) extern PFN_vkCmdBindVertexBuffers2EXT vkCmdBindVertexBuffers2EXT; extern PFN_vkCmdSetCullModeEXT vkCmdSetCullModeEXT; extern PFN_vkCmdSetDepthBoundsTestEnableEXT vkCmdSetDepthBoundsTestEnableEXT; extern PFN_vkCmdSetDepthCompareOpEXT vkCmdSetDepthCompareOpEXT; extern PFN_vkCmdSetDepthTestEnableEXT vkCmdSetDepthTestEnableEXT; extern PFN_vkCmdSetDepthWriteEnableEXT vkCmdSetDepthWriteEnableEXT; extern PFN_vkCmdSetFrontFaceEXT vkCmdSetFrontFaceEXT; extern PFN_vkCmdSetPrimitiveTopologyEXT vkCmdSetPrimitiveTopologyEXT; extern PFN_vkCmdSetScissorWithCountEXT vkCmdSetScissorWithCountEXT; extern PFN_vkCmdSetStencilOpEXT vkCmdSetStencilOpEXT; extern PFN_vkCmdSetStencilTestEnableEXT vkCmdSetStencilTestEnableEXT; extern PFN_vkCmdSetViewportWithCountEXT vkCmdSetViewportWithCountEXT; #endif /* (defined(VK_EXT_extended_dynamic_state)) || (defined(VK_EXT_shader_object)) */ #if (defined(VK_EXT_extended_dynamic_state2)) || (defined(VK_EXT_shader_object)) extern PFN_vkCmdSetDepthBiasEnableEXT vkCmdSetDepthBiasEnableEXT; extern PFN_vkCmdSetLogicOpEXT vkCmdSetLogicOpEXT; extern PFN_vkCmdSetPatchControlPointsEXT vkCmdSetPatchControlPointsEXT; extern PFN_vkCmdSetPrimitiveRestartEnableEXT vkCmdSetPrimitiveRestartEnableEXT; extern PFN_vkCmdSetRasterizerDiscardEnableEXT vkCmdSetRasterizerDiscardEnableEXT; #endif /* (defined(VK_EXT_extended_dynamic_state2)) || (defined(VK_EXT_shader_object)) */ #if (defined(VK_EXT_extended_dynamic_state3)) || (defined(VK_EXT_shader_object)) extern PFN_vkCmdSetAlphaToCoverageEnableEXT vkCmdSetAlphaToCoverageEnableEXT; extern PFN_vkCmdSetAlphaToOneEnableEXT vkCmdSetAlphaToOneEnableEXT; extern PFN_vkCmdSetColorBlendEnableEXT vkCmdSetColorBlendEnableEXT; extern PFN_vkCmdSetColorBlendEquationEXT vkCmdSetColorBlendEquationEXT; extern PFN_vkCmdSetColorWriteMaskEXT vkCmdSetColorWriteMaskEXT; extern PFN_vkCmdSetDepthClampEnableEXT vkCmdSetDepthClampEnableEXT; extern PFN_vkCmdSetLogicOpEnableEXT vkCmdSetLogicOpEnableEXT; extern PFN_vkCmdSetPolygonModeEXT vkCmdSetPolygonModeEXT; extern PFN_vkCmdSetRasterizationSamplesEXT vkCmdSetRasterizationSamplesEXT; extern PFN_vkCmdSetSampleMaskEXT vkCmdSetSampleMaskEXT; #endif /* (defined(VK_EXT_extended_dynamic_state3)) || (defined(VK_EXT_shader_object)) */ #if (defined(VK_EXT_extended_dynamic_state3) && (defined(VK_KHR_maintenance2) || defined(VK_VERSION_1_1))) || (defined(VK_EXT_shader_object)) extern PFN_vkCmdSetTessellationDomainOriginEXT vkCmdSetTessellationDomainOriginEXT; #endif /* (defined(VK_EXT_extended_dynamic_state3) && (defined(VK_KHR_maintenance2) || defined(VK_VERSION_1_1))) || (defined(VK_EXT_shader_object)) */ #if (defined(VK_EXT_extended_dynamic_state3) && defined(VK_EXT_transform_feedback)) || (defined(VK_EXT_shader_object) && defined(VK_EXT_transform_feedback)) extern PFN_vkCmdSetRasterizationStreamEXT vkCmdSetRasterizationStreamEXT; #endif /* (defined(VK_EXT_extended_dynamic_state3) && defined(VK_EXT_transform_feedback)) || (defined(VK_EXT_shader_object) && defined(VK_EXT_transform_feedback)) */ #if (defined(VK_EXT_extended_dynamic_state3) && defined(VK_EXT_conservative_rasterization)) || (defined(VK_EXT_shader_object) && defined(VK_EXT_conservative_rasterization)) extern PFN_vkCmdSetConservativeRasterizationModeEXT vkCmdSetConservativeRasterizationModeEXT; extern PFN_vkCmdSetExtraPrimitiveOverestimationSizeEXT vkCmdSetExtraPrimitiveOverestimationSizeEXT; #endif /* (defined(VK_EXT_extended_dynamic_state3) && defined(VK_EXT_conservative_rasterization)) || (defined(VK_EXT_shader_object) && defined(VK_EXT_conservative_rasterization)) */ #if (defined(VK_EXT_extended_dynamic_state3) && defined(VK_EXT_depth_clip_enable)) || (defined(VK_EXT_shader_object) && defined(VK_EXT_depth_clip_enable)) extern PFN_vkCmdSetDepthClipEnableEXT vkCmdSetDepthClipEnableEXT; #endif /* (defined(VK_EXT_extended_dynamic_state3) && defined(VK_EXT_depth_clip_enable)) || (defined(VK_EXT_shader_object) && defined(VK_EXT_depth_clip_enable)) */ #if (defined(VK_EXT_extended_dynamic_state3) && defined(VK_EXT_sample_locations)) || (defined(VK_EXT_shader_object) && defined(VK_EXT_sample_locations)) extern PFN_vkCmdSetSampleLocationsEnableEXT vkCmdSetSampleLocationsEnableEXT; #endif /* (defined(VK_EXT_extended_dynamic_state3) && defined(VK_EXT_sample_locations)) || (defined(VK_EXT_shader_object) && defined(VK_EXT_sample_locations)) */ #if (defined(VK_EXT_extended_dynamic_state3) && defined(VK_EXT_blend_operation_advanced)) || (defined(VK_EXT_shader_object) && defined(VK_EXT_blend_operation_advanced)) extern PFN_vkCmdSetColorBlendAdvancedEXT vkCmdSetColorBlendAdvancedEXT; #endif /* (defined(VK_EXT_extended_dynamic_state3) && defined(VK_EXT_blend_operation_advanced)) || (defined(VK_EXT_shader_object) && defined(VK_EXT_blend_operation_advanced)) */ #if (defined(VK_EXT_extended_dynamic_state3) && defined(VK_EXT_provoking_vertex)) || (defined(VK_EXT_shader_object) && defined(VK_EXT_provoking_vertex)) extern PFN_vkCmdSetProvokingVertexModeEXT vkCmdSetProvokingVertexModeEXT; #endif /* (defined(VK_EXT_extended_dynamic_state3) && defined(VK_EXT_provoking_vertex)) || (defined(VK_EXT_shader_object) && defined(VK_EXT_provoking_vertex)) */ #if (defined(VK_EXT_extended_dynamic_state3) && defined(VK_EXT_line_rasterization)) || (defined(VK_EXT_shader_object) && defined(VK_EXT_line_rasterization)) extern PFN_vkCmdSetLineRasterizationModeEXT vkCmdSetLineRasterizationModeEXT; extern PFN_vkCmdSetLineStippleEnableEXT vkCmdSetLineStippleEnableEXT; #endif /* (defined(VK_EXT_extended_dynamic_state3) && defined(VK_EXT_line_rasterization)) || (defined(VK_EXT_shader_object) && defined(VK_EXT_line_rasterization)) */ #if (defined(VK_EXT_extended_dynamic_state3) && defined(VK_EXT_depth_clip_control)) || (defined(VK_EXT_shader_object) && defined(VK_EXT_depth_clip_control)) extern PFN_vkCmdSetDepthClipNegativeOneToOneEXT vkCmdSetDepthClipNegativeOneToOneEXT; #endif /* (defined(VK_EXT_extended_dynamic_state3) && defined(VK_EXT_depth_clip_control)) || (defined(VK_EXT_shader_object) && defined(VK_EXT_depth_clip_control)) */ #if (defined(VK_EXT_extended_dynamic_state3) && defined(VK_NV_clip_space_w_scaling)) || (defined(VK_EXT_shader_object) && defined(VK_NV_clip_space_w_scaling)) extern PFN_vkCmdSetViewportWScalingEnableNV vkCmdSetViewportWScalingEnableNV; #endif /* (defined(VK_EXT_extended_dynamic_state3) && defined(VK_NV_clip_space_w_scaling)) || (defined(VK_EXT_shader_object) && defined(VK_NV_clip_space_w_scaling)) */ #if (defined(VK_EXT_extended_dynamic_state3) && defined(VK_NV_viewport_swizzle)) || (defined(VK_EXT_shader_object) && defined(VK_NV_viewport_swizzle)) extern PFN_vkCmdSetViewportSwizzleNV vkCmdSetViewportSwizzleNV; #endif /* (defined(VK_EXT_extended_dynamic_state3) && defined(VK_NV_viewport_swizzle)) || (defined(VK_EXT_shader_object) && defined(VK_NV_viewport_swizzle)) */ #if (defined(VK_EXT_extended_dynamic_state3) && defined(VK_NV_fragment_coverage_to_color)) || (defined(VK_EXT_shader_object) && defined(VK_NV_fragment_coverage_to_color)) extern PFN_vkCmdSetCoverageToColorEnableNV vkCmdSetCoverageToColorEnableNV; extern PFN_vkCmdSetCoverageToColorLocationNV vkCmdSetCoverageToColorLocationNV; #endif /* (defined(VK_EXT_extended_dynamic_state3) && defined(VK_NV_fragment_coverage_to_color)) || (defined(VK_EXT_shader_object) && defined(VK_NV_fragment_coverage_to_color)) */ #if (defined(VK_EXT_extended_dynamic_state3) && defined(VK_NV_framebuffer_mixed_samples)) || (defined(VK_EXT_shader_object) && defined(VK_NV_framebuffer_mixed_samples)) extern PFN_vkCmdSetCoverageModulationModeNV vkCmdSetCoverageModulationModeNV; extern PFN_vkCmdSetCoverageModulationTableEnableNV vkCmdSetCoverageModulationTableEnableNV; extern PFN_vkCmdSetCoverageModulationTableNV vkCmdSetCoverageModulationTableNV; #endif /* (defined(VK_EXT_extended_dynamic_state3) && defined(VK_NV_framebuffer_mixed_samples)) || (defined(VK_EXT_shader_object) && defined(VK_NV_framebuffer_mixed_samples)) */ #if (defined(VK_EXT_extended_dynamic_state3) && defined(VK_NV_shading_rate_image)) || (defined(VK_EXT_shader_object) && defined(VK_NV_shading_rate_image)) extern PFN_vkCmdSetShadingRateImageEnableNV vkCmdSetShadingRateImageEnableNV; #endif /* (defined(VK_EXT_extended_dynamic_state3) && defined(VK_NV_shading_rate_image)) || (defined(VK_EXT_shader_object) && defined(VK_NV_shading_rate_image)) */ #if (defined(VK_EXT_extended_dynamic_state3) && defined(VK_NV_representative_fragment_test)) || (defined(VK_EXT_shader_object) && defined(VK_NV_representative_fragment_test)) extern PFN_vkCmdSetRepresentativeFragmentTestEnableNV vkCmdSetRepresentativeFragmentTestEnableNV; #endif /* (defined(VK_EXT_extended_dynamic_state3) && defined(VK_NV_representative_fragment_test)) || (defined(VK_EXT_shader_object) && defined(VK_NV_representative_fragment_test)) */ #if (defined(VK_EXT_extended_dynamic_state3) && defined(VK_NV_coverage_reduction_mode)) || (defined(VK_EXT_shader_object) && defined(VK_NV_coverage_reduction_mode)) extern PFN_vkCmdSetCoverageReductionModeNV vkCmdSetCoverageReductionModeNV; #endif /* (defined(VK_EXT_extended_dynamic_state3) && defined(VK_NV_coverage_reduction_mode)) || (defined(VK_EXT_shader_object) && defined(VK_NV_coverage_reduction_mode)) */ #if (defined(VK_EXT_host_image_copy)) || (defined(VK_EXT_image_compression_control)) extern PFN_vkGetImageSubresourceLayout2EXT vkGetImageSubresourceLayout2EXT; #endif /* (defined(VK_EXT_host_image_copy)) || (defined(VK_EXT_image_compression_control)) */ #if (defined(VK_EXT_shader_object)) || (defined(VK_EXT_vertex_input_dynamic_state)) extern PFN_vkCmdSetVertexInputEXT vkCmdSetVertexInputEXT; #endif /* (defined(VK_EXT_shader_object)) || (defined(VK_EXT_vertex_input_dynamic_state)) */ #if (defined(VK_KHR_descriptor_update_template) && defined(VK_KHR_push_descriptor)) || (defined(VK_KHR_push_descriptor) && (defined(VK_VERSION_1_1) || defined(VK_KHR_descriptor_update_template))) extern PFN_vkCmdPushDescriptorSetWithTemplateKHR vkCmdPushDescriptorSetWithTemplateKHR; #endif /* (defined(VK_KHR_descriptor_update_template) && defined(VK_KHR_push_descriptor)) || (defined(VK_KHR_push_descriptor) && (defined(VK_VERSION_1_1) || defined(VK_KHR_descriptor_update_template))) */ #if (defined(VK_KHR_device_group) && defined(VK_KHR_surface)) || (defined(VK_KHR_swapchain) && defined(VK_VERSION_1_1)) extern PFN_vkGetDeviceGroupPresentCapabilitiesKHR vkGetDeviceGroupPresentCapabilitiesKHR; extern PFN_vkGetDeviceGroupSurfacePresentModesKHR vkGetDeviceGroupSurfacePresentModesKHR; extern PFN_vkGetPhysicalDevicePresentRectanglesKHR vkGetPhysicalDevicePresentRectanglesKHR; #endif /* (defined(VK_KHR_device_group) && defined(VK_KHR_surface)) || (defined(VK_KHR_swapchain) && defined(VK_VERSION_1_1)) */ #if (defined(VK_KHR_device_group) && defined(VK_KHR_swapchain)) || (defined(VK_KHR_swapchain) && defined(VK_VERSION_1_1)) extern PFN_vkAcquireNextImage2KHR vkAcquireNextImage2KHR; #endif /* (defined(VK_KHR_device_group) && defined(VK_KHR_swapchain)) || (defined(VK_KHR_swapchain) && defined(VK_VERSION_1_1)) */ /* VOLK_GENERATE_PROTOTYPES_H */ #ifdef __cplusplus } #endif #endif #ifdef VOLK_IMPLEMENTATION #undef VOLK_IMPLEMENTATION /* Prevent tools like dependency checkers from detecting a cyclic dependency */ #define VOLK_SOURCE "volk.c" #include VOLK_SOURCE #endif /** * Copyright (c) 2018-2025 Arseny Kapoulkine * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ /* clang-format on */ ================================================ FILE: src/libraries/vulkanheaders/vk_icd.h ================================================ /* * Copyright 2015-2023 The Khronos Group Inc. * Copyright 2015-2023 Valve Corporation * Copyright 2015-2023 LunarG, Inc. * * SPDX-License-Identifier: Apache-2.0 */ #pragma once #include "vulkan.h" #include // Loader-ICD version negotiation API. Versions add the following features: // Version 0 - Initial. Doesn't support vk_icdGetInstanceProcAddr // or vk_icdNegotiateLoaderICDInterfaceVersion. // Version 1 - Add support for vk_icdGetInstanceProcAddr. // Version 2 - Add Loader/ICD Interface version negotiation // via vk_icdNegotiateLoaderICDInterfaceVersion. // Version 3 - Add ICD creation/destruction of KHR_surface objects. // Version 4 - Add unknown physical device extension querying via // vk_icdGetPhysicalDeviceProcAddr. // Version 5 - Tells ICDs that the loader is now paying attention to the // application version of Vulkan passed into the ApplicationInfo // structure during vkCreateInstance. This will tell the ICD // that if the loader is older, it should automatically fail a // call for any API version > 1.0. Otherwise, the loader will // manually determine if it can support the expected version. // Version 6 - Add support for vk_icdEnumerateAdapterPhysicalDevices. // Version 7 - If an ICD supports any of the following functions, they must be // queryable with vk_icdGetInstanceProcAddr: // vk_icdNegotiateLoaderICDInterfaceVersion // vk_icdGetPhysicalDeviceProcAddr // vk_icdEnumerateAdapterPhysicalDevices (Windows only) // In addition, these functions no longer need to be exported directly. // This version allows drivers provided through the extension // VK_LUNARG_direct_driver_loading be able to support the entire // Driver-Loader interface. #define CURRENT_LOADER_ICD_INTERFACE_VERSION 7 #define MIN_SUPPORTED_LOADER_ICD_INTERFACE_VERSION 0 #define MIN_PHYS_DEV_EXTENSION_ICD_INTERFACE_VERSION 4 // Old typedefs that don't follow a proper naming convention but are preserved for compatibility typedef VkResult(VKAPI_PTR *PFN_vkNegotiateLoaderICDInterfaceVersion)(uint32_t *pVersion); // This is defined in vk_layer.h which will be found by the loader, but if an ICD is building against this // file directly, it won't be found. #ifndef PFN_GetPhysicalDeviceProcAddr typedef PFN_vkVoidFunction(VKAPI_PTR *PFN_GetPhysicalDeviceProcAddr)(VkInstance instance, const char *pName); #endif // Typedefs for loader/ICD interface typedef VkResult (VKAPI_PTR *PFN_vk_icdNegotiateLoaderICDInterfaceVersion)(uint32_t* pVersion); typedef PFN_vkVoidFunction (VKAPI_PTR *PFN_vk_icdGetInstanceProcAddr)(VkInstance instance, const char* pName); typedef PFN_vkVoidFunction (VKAPI_PTR *PFN_vk_icdGetPhysicalDeviceProcAddr)(VkInstance instance, const char* pName); #if defined(VK_USE_PLATFORM_WIN32_KHR) typedef VkResult (VKAPI_PTR *PFN_vk_icdEnumerateAdapterPhysicalDevices)(VkInstance instance, LUID adapterLUID, uint32_t* pPhysicalDeviceCount, VkPhysicalDevice* pPhysicalDevices); #endif // Prototypes for loader/ICD interface #if !defined(VK_NO_PROTOTYPES) #ifdef __cplusplus extern "C" { #endif VKAPI_ATTR VkResult VKAPI_CALL vk_icdNegotiateLoaderICDInterfaceVersion(uint32_t* pVersion); VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vk_icdGetInstanceProcAddr(VkInstance instance, const char* pName); VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vk_icdGetPhysicalDeviceProcAddr(VkInstance instance, const char* pName); #if defined(VK_USE_PLATFORM_WIN32_KHR) VKAPI_ATTR VkResult VKAPI_CALL vk_icdEnumerateAdapterPhysicalDevices(VkInstance instance, LUID adapterLUID, uint32_t* pPhysicalDeviceCount, VkPhysicalDevice* pPhysicalDevices); #endif #ifdef __cplusplus } #endif #endif /* * The ICD must reserve space for a pointer for the loader's dispatch * table, at the start of . * The ICD must initialize this variable using the SET_LOADER_MAGIC_VALUE macro. */ #define ICD_LOADER_MAGIC 0x01CDC0DE typedef union { uintptr_t loaderMagic; void *loaderData; } VK_LOADER_DATA; static inline void set_loader_magic_value(void *pNewObject) { VK_LOADER_DATA *loader_info = (VK_LOADER_DATA *)pNewObject; loader_info->loaderMagic = ICD_LOADER_MAGIC; } static inline bool valid_loader_magic_value(void *pNewObject) { const VK_LOADER_DATA *loader_info = (VK_LOADER_DATA *)pNewObject; return (loader_info->loaderMagic & 0xffffffff) == ICD_LOADER_MAGIC; } /* * Windows and Linux ICDs will treat VkSurfaceKHR as a pointer to a struct that * contains the platform-specific connection and surface information. */ typedef enum { VK_ICD_WSI_PLATFORM_MIR, VK_ICD_WSI_PLATFORM_WAYLAND, VK_ICD_WSI_PLATFORM_WIN32, VK_ICD_WSI_PLATFORM_XCB, VK_ICD_WSI_PLATFORM_XLIB, VK_ICD_WSI_PLATFORM_ANDROID, VK_ICD_WSI_PLATFORM_MACOS, VK_ICD_WSI_PLATFORM_IOS, VK_ICD_WSI_PLATFORM_DISPLAY, VK_ICD_WSI_PLATFORM_HEADLESS, VK_ICD_WSI_PLATFORM_METAL, VK_ICD_WSI_PLATFORM_DIRECTFB, VK_ICD_WSI_PLATFORM_VI, VK_ICD_WSI_PLATFORM_GGP, VK_ICD_WSI_PLATFORM_SCREEN, VK_ICD_WSI_PLATFORM_FUCHSIA, } VkIcdWsiPlatform; typedef struct { VkIcdWsiPlatform platform; } VkIcdSurfaceBase; #ifdef VK_USE_PLATFORM_MIR_KHR typedef struct { VkIcdSurfaceBase base; MirConnection *connection; MirSurface *mirSurface; } VkIcdSurfaceMir; #endif // VK_USE_PLATFORM_MIR_KHR #ifdef VK_USE_PLATFORM_WAYLAND_KHR typedef struct { VkIcdSurfaceBase base; struct wl_display *display; struct wl_surface *surface; } VkIcdSurfaceWayland; #endif // VK_USE_PLATFORM_WAYLAND_KHR #ifdef VK_USE_PLATFORM_WIN32_KHR typedef struct { VkIcdSurfaceBase base; HINSTANCE hinstance; HWND hwnd; } VkIcdSurfaceWin32; #endif // VK_USE_PLATFORM_WIN32_KHR #ifdef VK_USE_PLATFORM_XCB_KHR typedef struct { VkIcdSurfaceBase base; xcb_connection_t *connection; xcb_window_t window; } VkIcdSurfaceXcb; #endif // VK_USE_PLATFORM_XCB_KHR #ifdef VK_USE_PLATFORM_XLIB_KHR typedef struct { VkIcdSurfaceBase base; Display *dpy; Window window; } VkIcdSurfaceXlib; #endif // VK_USE_PLATFORM_XLIB_KHR #ifdef VK_USE_PLATFORM_DIRECTFB_EXT typedef struct { VkIcdSurfaceBase base; IDirectFB *dfb; IDirectFBSurface *surface; } VkIcdSurfaceDirectFB; #endif // VK_USE_PLATFORM_DIRECTFB_EXT #ifdef VK_USE_PLATFORM_ANDROID_KHR typedef struct { VkIcdSurfaceBase base; struct ANativeWindow *window; } VkIcdSurfaceAndroid; #endif // VK_USE_PLATFORM_ANDROID_KHR #ifdef VK_USE_PLATFORM_MACOS_MVK typedef struct { VkIcdSurfaceBase base; const void *pView; } VkIcdSurfaceMacOS; #endif // VK_USE_PLATFORM_MACOS_MVK #ifdef VK_USE_PLATFORM_IOS_MVK typedef struct { VkIcdSurfaceBase base; const void *pView; } VkIcdSurfaceIOS; #endif // VK_USE_PLATFORM_IOS_MVK #ifdef VK_USE_PLATFORM_GGP typedef struct { VkIcdSurfaceBase base; GgpStreamDescriptor streamDescriptor; } VkIcdSurfaceGgp; #endif // VK_USE_PLATFORM_GGP typedef struct { VkIcdSurfaceBase base; VkDisplayModeKHR displayMode; uint32_t planeIndex; uint32_t planeStackIndex; VkSurfaceTransformFlagBitsKHR transform; float globalAlpha; VkDisplayPlaneAlphaFlagBitsKHR alphaMode; VkExtent2D imageExtent; } VkIcdSurfaceDisplay; typedef struct { VkIcdSurfaceBase base; } VkIcdSurfaceHeadless; #ifdef VK_USE_PLATFORM_METAL_EXT typedef struct { VkIcdSurfaceBase base; const CAMetalLayer *pLayer; } VkIcdSurfaceMetal; #endif // VK_USE_PLATFORM_METAL_EXT #ifdef VK_USE_PLATFORM_VI_NN typedef struct { VkIcdSurfaceBase base; void *window; } VkIcdSurfaceVi; #endif // VK_USE_PLATFORM_VI_NN #ifdef VK_USE_PLATFORM_SCREEN_QNX typedef struct { VkIcdSurfaceBase base; struct _screen_context *context; struct _screen_window *window; } VkIcdSurfaceScreen; #endif // VK_USE_PLATFORM_SCREEN_QNX #ifdef VK_USE_PLATFORM_FUCHSIA typedef struct { VkIcdSurfaceBase base; } VkIcdSurfaceImagePipe; #endif // VK_USE_PLATFORM_FUCHSIA ================================================ FILE: src/libraries/vulkanheaders/vk_layer.h ================================================ /* * Copyright 2015-2023 The Khronos Group Inc. * Copyright 2015-2023 Valve Corporation * Copyright 2015-2023 LunarG, Inc. * * SPDX-License-Identifier: Apache-2.0 */ #pragma once /* Need to define dispatch table * Core struct can then have ptr to dispatch table at the top * Along with object ptrs for current and next OBJ */ #include "vulkan_core.h" #define MAX_NUM_UNKNOWN_EXTS 250 // Loader-Layer version negotiation API. Versions add the following features: // Versions 0/1 - Initial. Doesn't support vk_layerGetPhysicalDeviceProcAddr // or vk_icdNegotiateLoaderLayerInterfaceVersion. // Version 2 - Add support for vk_layerGetPhysicalDeviceProcAddr and // vk_icdNegotiateLoaderLayerInterfaceVersion. #define CURRENT_LOADER_LAYER_INTERFACE_VERSION 2 #define MIN_SUPPORTED_LOADER_LAYER_INTERFACE_VERSION 1 #define VK_CURRENT_CHAIN_VERSION 1 // Typedef for use in the interfaces below typedef PFN_vkVoidFunction (VKAPI_PTR *PFN_GetPhysicalDeviceProcAddr)(VkInstance instance, const char* pName); // Version negotiation values typedef enum VkNegotiateLayerStructType { LAYER_NEGOTIATE_UNINTIALIZED = 0, LAYER_NEGOTIATE_INTERFACE_STRUCT = 1, } VkNegotiateLayerStructType; // Version negotiation structures typedef struct VkNegotiateLayerInterface { VkNegotiateLayerStructType sType; void *pNext; uint32_t loaderLayerInterfaceVersion; PFN_vkGetInstanceProcAddr pfnGetInstanceProcAddr; PFN_vkGetDeviceProcAddr pfnGetDeviceProcAddr; PFN_GetPhysicalDeviceProcAddr pfnGetPhysicalDeviceProcAddr; } VkNegotiateLayerInterface; // Version negotiation functions typedef VkResult (VKAPI_PTR *PFN_vkNegotiateLoaderLayerInterfaceVersion)(VkNegotiateLayerInterface *pVersionStruct); // Function prototype for unknown physical device extension command typedef VkResult(VKAPI_PTR *PFN_PhysDevExt)(VkPhysicalDevice phys_device); // ------------------------------------------------------------------------------------------------ // CreateInstance and CreateDevice support structures /* Sub type of structure for instance and device loader ext of CreateInfo. * When sType == VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO * or sType == VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO * then VkLayerFunction indicates struct type pointed to by pNext */ typedef enum VkLayerFunction_ { VK_LAYER_LINK_INFO = 0, VK_LOADER_DATA_CALLBACK = 1, VK_LOADER_LAYER_CREATE_DEVICE_CALLBACK = 2, VK_LOADER_FEATURES = 3, } VkLayerFunction; typedef struct VkLayerInstanceLink_ { struct VkLayerInstanceLink_ *pNext; PFN_vkGetInstanceProcAddr pfnNextGetInstanceProcAddr; PFN_GetPhysicalDeviceProcAddr pfnNextGetPhysicalDeviceProcAddr; } VkLayerInstanceLink; /* * When creating the device chain the loader needs to pass * down information about it's device structure needed at * the end of the chain. Passing the data via the * VkLayerDeviceInfo avoids issues with finding the * exact instance being used. */ typedef struct VkLayerDeviceInfo_ { void *device_info; PFN_vkGetInstanceProcAddr pfnNextGetInstanceProcAddr; } VkLayerDeviceInfo; typedef VkResult (VKAPI_PTR *PFN_vkSetInstanceLoaderData)(VkInstance instance, void *object); typedef VkResult (VKAPI_PTR *PFN_vkSetDeviceLoaderData)(VkDevice device, void *object); typedef VkResult (VKAPI_PTR *PFN_vkLayerCreateDevice)(VkInstance instance, VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkDevice *pDevice, PFN_vkGetInstanceProcAddr layerGIPA, PFN_vkGetDeviceProcAddr *nextGDPA); typedef void (VKAPI_PTR *PFN_vkLayerDestroyDevice)(VkDevice physicalDevice, const VkAllocationCallbacks *pAllocator, PFN_vkDestroyDevice destroyFunction); typedef enum VkLoaderFeastureFlagBits { VK_LOADER_FEATURE_PHYSICAL_DEVICE_SORTING = 0x00000001, } VkLoaderFlagBits; typedef VkFlags VkLoaderFeatureFlags; typedef struct { VkStructureType sType; // VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO const void *pNext; VkLayerFunction function; union { VkLayerInstanceLink *pLayerInfo; PFN_vkSetInstanceLoaderData pfnSetInstanceLoaderData; struct { PFN_vkLayerCreateDevice pfnLayerCreateDevice; PFN_vkLayerDestroyDevice pfnLayerDestroyDevice; } layerDevice; VkLoaderFeatureFlags loaderFeatures; } u; } VkLayerInstanceCreateInfo; typedef struct VkLayerDeviceLink_ { struct VkLayerDeviceLink_ *pNext; PFN_vkGetInstanceProcAddr pfnNextGetInstanceProcAddr; PFN_vkGetDeviceProcAddr pfnNextGetDeviceProcAddr; } VkLayerDeviceLink; typedef struct { VkStructureType sType; // VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO const void *pNext; VkLayerFunction function; union { VkLayerDeviceLink *pLayerInfo; PFN_vkSetDeviceLoaderData pfnSetDeviceLoaderData; } u; } VkLayerDeviceCreateInfo; #ifdef __cplusplus extern "C" { #endif VKAPI_ATTR VkResult VKAPI_CALL vkNegotiateLoaderLayerInterfaceVersion(VkNegotiateLayerInterface *pVersionStruct); typedef enum VkChainType { VK_CHAIN_TYPE_UNKNOWN = 0, VK_CHAIN_TYPE_ENUMERATE_INSTANCE_EXTENSION_PROPERTIES = 1, VK_CHAIN_TYPE_ENUMERATE_INSTANCE_LAYER_PROPERTIES = 2, VK_CHAIN_TYPE_ENUMERATE_INSTANCE_VERSION = 3, } VkChainType; typedef struct VkChainHeader { VkChainType type; uint32_t version; uint32_t size; } VkChainHeader; typedef struct VkEnumerateInstanceExtensionPropertiesChain { VkChainHeader header; VkResult(VKAPI_PTR *pfnNextLayer)(const struct VkEnumerateInstanceExtensionPropertiesChain *, const char *, uint32_t *, VkExtensionProperties *); const struct VkEnumerateInstanceExtensionPropertiesChain *pNextLink; #if defined(__cplusplus) inline VkResult CallDown(const char *pLayerName, uint32_t *pPropertyCount, VkExtensionProperties *pProperties) const { return pfnNextLayer(pNextLink, pLayerName, pPropertyCount, pProperties); } #endif } VkEnumerateInstanceExtensionPropertiesChain; typedef struct VkEnumerateInstanceLayerPropertiesChain { VkChainHeader header; VkResult(VKAPI_PTR *pfnNextLayer)(const struct VkEnumerateInstanceLayerPropertiesChain *, uint32_t *, VkLayerProperties *); const struct VkEnumerateInstanceLayerPropertiesChain *pNextLink; #if defined(__cplusplus) inline VkResult CallDown(uint32_t *pPropertyCount, VkLayerProperties *pProperties) const { return pfnNextLayer(pNextLink, pPropertyCount, pProperties); } #endif } VkEnumerateInstanceLayerPropertiesChain; typedef struct VkEnumerateInstanceVersionChain { VkChainHeader header; VkResult(VKAPI_PTR *pfnNextLayer)(const struct VkEnumerateInstanceVersionChain *, uint32_t *); const struct VkEnumerateInstanceVersionChain *pNextLink; #if defined(__cplusplus) inline VkResult CallDown(uint32_t *pApiVersion) const { return pfnNextLayer(pNextLink, pApiVersion); } #endif } VkEnumerateInstanceVersionChain; #ifdef __cplusplus } #endif ================================================ FILE: src/libraries/vulkanheaders/vk_platform.h ================================================ // // File: vk_platform.h // /* ** Copyright 2014-2025 The Khronos Group Inc. ** ** SPDX-License-Identifier: Apache-2.0 */ #ifndef VK_PLATFORM_H_ #define VK_PLATFORM_H_ #ifdef __cplusplus extern "C" { #endif // __cplusplus /* *************************************************************************************************** * Platform-specific directives and type declarations *************************************************************************************************** */ /* Platform-specific calling convention macros. * * Platforms should define these so that Vulkan clients call Vulkan commands * with the same calling conventions that the Vulkan implementation expects. * * VKAPI_ATTR - Placed before the return type in function declarations. * Useful for C++11 and GCC/Clang-style function attribute syntax. * VKAPI_CALL - Placed after the return type in function declarations. * Useful for MSVC-style calling convention syntax. * VKAPI_PTR - Placed between the '(' and '*' in function pointer types. * * Function declaration: VKAPI_ATTR void VKAPI_CALL vkCommand(void); * Function pointer type: typedef void (VKAPI_PTR *PFN_vkCommand)(void); */ #if defined(_WIN32) // On Windows, Vulkan commands use the stdcall convention #define VKAPI_ATTR #define VKAPI_CALL __stdcall #define VKAPI_PTR VKAPI_CALL #elif defined(__ANDROID__) && defined(__ARM_ARCH) && __ARM_ARCH < 7 #error "Vulkan is not supported for the 'armeabi' NDK ABI" #elif defined(__ANDROID__) && defined(__ARM_ARCH) && __ARM_ARCH >= 7 && defined(__ARM_32BIT_STATE) // On Android 32-bit ARM targets, Vulkan functions use the "hardfloat" // calling convention, i.e. float parameters are passed in registers. This // is true even if the rest of the application passes floats on the stack, // as it does by default when compiling for the armeabi-v7a NDK ABI. #define VKAPI_ATTR __attribute__((pcs("aapcs-vfp"))) #define VKAPI_CALL #define VKAPI_PTR VKAPI_ATTR #else // On other platforms, use the default calling convention #define VKAPI_ATTR #define VKAPI_CALL #define VKAPI_PTR #endif #if !defined(VK_NO_STDDEF_H) #include #endif // !defined(VK_NO_STDDEF_H) #if !defined(VK_NO_STDINT_H) #if defined(_MSC_VER) && (_MSC_VER < 1600) typedef signed __int8 int8_t; typedef unsigned __int8 uint8_t; typedef signed __int16 int16_t; typedef unsigned __int16 uint16_t; typedef signed __int32 int32_t; typedef unsigned __int32 uint32_t; typedef signed __int64 int64_t; typedef unsigned __int64 uint64_t; #else #include #endif #endif // !defined(VK_NO_STDINT_H) #ifdef __cplusplus } // extern "C" #endif // __cplusplus #endif ================================================ FILE: src/libraries/vulkanheaders/vulkan.h ================================================ #ifndef VULKAN_H_ #define VULKAN_H_ 1 /* ** Copyright 2015-2025 The Khronos Group Inc. ** ** SPDX-License-Identifier: Apache-2.0 */ #include "vk_platform.h" #include "vulkan_core.h" #ifdef VK_USE_PLATFORM_ANDROID_KHR #include "vulkan_android.h" #endif #ifdef VK_USE_PLATFORM_FUCHSIA #include #include "vulkan_fuchsia.h" #endif #ifdef VK_USE_PLATFORM_IOS_MVK #include "vulkan_ios.h" #endif #ifdef VK_USE_PLATFORM_MACOS_MVK #include "vulkan_macos.h" #endif #ifdef VK_USE_PLATFORM_METAL_EXT #include "vulkan_metal.h" #endif #ifdef VK_USE_PLATFORM_VI_NN #include "vulkan_vi.h" #endif #ifdef VK_USE_PLATFORM_WAYLAND_KHR #include "vulkan_wayland.h" #endif #ifdef VK_USE_PLATFORM_WIN32_KHR #include #include "vulkan_win32.h" #endif #ifdef VK_USE_PLATFORM_XCB_KHR #include #include "vulkan_xcb.h" #endif #ifdef VK_USE_PLATFORM_XLIB_KHR #include #include "vulkan_xlib.h" #endif #ifdef VK_USE_PLATFORM_DIRECTFB_EXT #include #include "vulkan_directfb.h" #endif #ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT #include #include #include "vulkan_xlib_xrandr.h" #endif #ifdef VK_USE_PLATFORM_GGP #include #include "vulkan_ggp.h" #endif #ifdef VK_USE_PLATFORM_SCREEN_QNX #include #include "vulkan_screen.h" #endif #ifdef VK_USE_PLATFORM_SCI #include #include #include "vulkan_sci.h" #endif #ifdef VK_ENABLE_BETA_EXTENSIONS #include "vulkan_beta.h" #endif #endif // VULKAN_H_ ================================================ FILE: src/libraries/vulkanheaders/vulkan.hpp ================================================ // Copyright 2015-2025 The Khronos Group Inc. // // SPDX-License-Identifier: Apache-2.0 OR MIT // // This header is generated from the Khronos Vulkan XML API Registry. #ifndef VULKAN_HPP #define VULKAN_HPP #include #if defined( VULKAN_HPP_ENABLE_STD_MODULE ) && defined( VULKAN_HPP_STD_MODULE ) # include import VULKAN_HPP_STD_MODULE; #else # include # include // ArrayWrapperND # include // strnlen # include // std::string # include // std::exchange #endif #include #if 17 <= VULKAN_HPP_CPP_VERSION && !( defined( VULKAN_HPP_ENABLE_STD_MODULE ) && defined( VULKAN_HPP_STD_MODULE ) ) # include #endif #if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) && !( defined( VULKAN_HPP_ENABLE_STD_MODULE ) && defined( VULKAN_HPP_STD_MODULE ) ) # include // std::tie # include // std::vector #endif #if !defined( VULKAN_HPP_NO_EXCEPTIONS ) && !( defined( VULKAN_HPP_ENABLE_STD_MODULE ) && defined( VULKAN_HPP_STD_MODULE ) ) # include // std::is_error_code_enum #endif #if ( VULKAN_HPP_ASSERT == assert ) # include #endif #if VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL == 1 # if defined( __unix__ ) || defined( __APPLE__ ) || defined( __QNX__ ) || defined( __Fuchsia__ ) # include # elif defined( _WIN32 ) && !defined( VULKAN_HPP_NO_WIN32_PROTOTYPES ) using HINSTANCE = struct HINSTANCE__ *; # if defined( _WIN64 ) using FARPROC = int64_t( __stdcall * )(); # else using FARPROC = int( __stdcall * )(); # endif extern "C" __declspec( dllimport ) HINSTANCE __stdcall LoadLibraryA( char const * lpLibFileName ); extern "C" __declspec( dllimport ) int __stdcall FreeLibrary( HINSTANCE hLibModule ); extern "C" __declspec( dllimport ) FARPROC __stdcall GetProcAddress( HINSTANCE hModule, const char * lpProcName ); # endif #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) && !( defined( VULKAN_HPP_ENABLE_STD_MODULE ) && defined( VULKAN_HPP_STD_MODULE ) ) # include #endif #if defined( VULKAN_HPP_SUPPORT_SPAN ) && !( defined( VULKAN_HPP_ENABLE_STD_MODULE ) && defined( VULKAN_HPP_STD_MODULE ) ) # include #endif static_assert( VK_HEADER_VERSION == 307, "Wrong VK_HEADER_VERSION!" ); // includes through some other header // this results in major(x) being resolved to gnu_dev_major(x) // which is an expression in a constructor initializer list. #if defined( major ) # undef major #endif #if defined( minor ) # undef minor #endif // Windows defines MemoryBarrier which is deprecated and collides // with the VULKAN_HPP_NAMESPACE::MemoryBarrier struct. #if defined( MemoryBarrier ) # undef MemoryBarrier #endif // XLib.h defines True/False, which collides with our vk::True/vk::False // -> undef them and provide some namepace-secure constexpr #if defined( True ) # undef True constexpr int True = 1; #endif #if defined( False ) # undef False constexpr int False = 0; #endif namespace VULKAN_HPP_NAMESPACE { template class ArrayWrapper1D : public std::array { public: VULKAN_HPP_CONSTEXPR ArrayWrapper1D() VULKAN_HPP_NOEXCEPT : std::array() {} VULKAN_HPP_CONSTEXPR ArrayWrapper1D( std::array const & data ) VULKAN_HPP_NOEXCEPT : std::array( data ) {} template ::value, int>::type = 0> VULKAN_HPP_CONSTEXPR_14 ArrayWrapper1D( std::string const & data ) VULKAN_HPP_NOEXCEPT { copy( data.data(), data.length() ); } #if 17 <= VULKAN_HPP_CPP_VERSION template ::value, int>::type = 0> VULKAN_HPP_CONSTEXPR_14 ArrayWrapper1D( std::string_view data ) VULKAN_HPP_NOEXCEPT { copy( data.data(), data.length() ); } #endif #if ( VK_USE_64_BIT_PTR_DEFINES == 0 ) // on 32 bit compiles, needs overloads on index type int to resolve ambiguities VULKAN_HPP_CONSTEXPR T const & operator[]( int index ) const VULKAN_HPP_NOEXCEPT { return std::array::operator[]( index ); } T & operator[]( int index ) VULKAN_HPP_NOEXCEPT { return std::array::operator[]( index ); } #endif operator T const *() const VULKAN_HPP_NOEXCEPT { return this->data(); } operator T *() VULKAN_HPP_NOEXCEPT { return this->data(); } template ::value, int>::type = 0> operator std::string() const { return std::string( this->data(), strnlen( this->data(), N ) ); } #if 17 <= VULKAN_HPP_CPP_VERSION template ::value, int>::type = 0> operator std::string_view() const { return std::string_view( this->data(), strnlen( this->data(), N ) ); } #endif private: VULKAN_HPP_CONSTEXPR_14 void copy( char const * data, size_t len ) VULKAN_HPP_NOEXCEPT { size_t n = ( std::min )( N - 1, len ); for ( size_t i = 0; i < n; ++i ) { ( *this )[i] = data[i]; } ( *this )[n] = 0; } }; // relational operators between ArrayWrapper1D of chars with potentially different sizes #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) template std::strong_ordering operator<=>( ArrayWrapper1D const & lhs, ArrayWrapper1D const & rhs ) VULKAN_HPP_NOEXCEPT { int result = strcmp( lhs.data(), rhs.data() ); return ( result < 0 ) ? std::strong_ordering::less : ( ( result > 0 ) ? std::strong_ordering::greater : std::strong_ordering::equal ); } #else template bool operator<( ArrayWrapper1D const & lhs, ArrayWrapper1D const & rhs ) VULKAN_HPP_NOEXCEPT { return strcmp( lhs.data(), rhs.data() ) < 0; } template bool operator<=( ArrayWrapper1D const & lhs, ArrayWrapper1D const & rhs ) VULKAN_HPP_NOEXCEPT { return strcmp( lhs.data(), rhs.data() ) <= 0; } template bool operator>( ArrayWrapper1D const & lhs, ArrayWrapper1D const & rhs ) VULKAN_HPP_NOEXCEPT { return strcmp( lhs.data(), rhs.data() ) > 0; } template bool operator>=( ArrayWrapper1D const & lhs, ArrayWrapper1D const & rhs ) VULKAN_HPP_NOEXCEPT { return strcmp( lhs.data(), rhs.data() ) >= 0; } #endif template bool operator==( ArrayWrapper1D const & lhs, ArrayWrapper1D const & rhs ) VULKAN_HPP_NOEXCEPT { return strcmp( lhs.data(), rhs.data() ) == 0; } template bool operator!=( ArrayWrapper1D const & lhs, ArrayWrapper1D const & rhs ) VULKAN_HPP_NOEXCEPT { return strcmp( lhs.data(), rhs.data() ) != 0; } // specialization of relational operators between std::string and arrays of chars #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) template std::strong_ordering operator<=>( std::string const & lhs, ArrayWrapper1D const & rhs ) VULKAN_HPP_NOEXCEPT { return lhs <=> rhs.data(); } #else template bool operator<( std::string const & lhs, ArrayWrapper1D const & rhs ) VULKAN_HPP_NOEXCEPT { return lhs < rhs.data(); } template bool operator<=( std::string const & lhs, ArrayWrapper1D const & rhs ) VULKAN_HPP_NOEXCEPT { return lhs <= rhs.data(); } template bool operator>( std::string const & lhs, ArrayWrapper1D const & rhs ) VULKAN_HPP_NOEXCEPT { return lhs > rhs.data(); } template bool operator>=( std::string const & lhs, ArrayWrapper1D const & rhs ) VULKAN_HPP_NOEXCEPT { return lhs >= rhs.data(); } #endif template bool operator==( std::string const & lhs, ArrayWrapper1D const & rhs ) VULKAN_HPP_NOEXCEPT { return lhs == rhs.data(); } template bool operator!=( std::string const & lhs, ArrayWrapper1D const & rhs ) VULKAN_HPP_NOEXCEPT { return lhs != rhs.data(); } template class ArrayWrapper2D : public std::array, N> { public: VULKAN_HPP_CONSTEXPR ArrayWrapper2D() VULKAN_HPP_NOEXCEPT : std::array, N>() {} VULKAN_HPP_CONSTEXPR ArrayWrapper2D( std::array, N> const & data ) VULKAN_HPP_NOEXCEPT : std::array, N>( *reinterpret_cast, N> const *>( &data ) ) { } }; #if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) template class ArrayProxy { public: VULKAN_HPP_CONSTEXPR ArrayProxy() VULKAN_HPP_NOEXCEPT : m_count( 0 ) , m_ptr( nullptr ) { } VULKAN_HPP_CONSTEXPR ArrayProxy( std::nullptr_t ) VULKAN_HPP_NOEXCEPT : m_count( 0 ) , m_ptr( nullptr ) { } ArrayProxy( T const & value ) VULKAN_HPP_NOEXCEPT : m_count( 1 ) , m_ptr( &value ) { } ArrayProxy( uint32_t count, T const * ptr ) VULKAN_HPP_NOEXCEPT : m_count( count ) , m_ptr( ptr ) { } template ArrayProxy( T const ( &ptr )[C] ) VULKAN_HPP_NOEXCEPT : m_count( C ) , m_ptr( ptr ) { } # if __GNUC__ >= 9 # pragma GCC diagnostic push # pragma GCC diagnostic ignored "-Winit-list-lifetime" # endif ArrayProxy( std::initializer_list const & list ) VULKAN_HPP_NOEXCEPT : m_count( static_cast( list.size() ) ) , m_ptr( list.begin() ) { } template ::value, int>::type = 0> ArrayProxy( std::initializer_list::type> const & list ) VULKAN_HPP_NOEXCEPT : m_count( static_cast( list.size() ) ) , m_ptr( list.begin() ) { } # if __GNUC__ >= 9 # pragma GCC diagnostic pop # endif // Any type with a .data() return type implicitly convertible to T*, and a .size() return type implicitly // convertible to size_t. The const version can capture temporaries, with lifetime ending at end of statement. template ().data() ), T *>::value && std::is_convertible().size() ), std::size_t>::value>::type * = nullptr> ArrayProxy( V const & v ) VULKAN_HPP_NOEXCEPT : m_count( static_cast( v.size() ) ) , m_ptr( v.data() ) { } const T * begin() const VULKAN_HPP_NOEXCEPT { return m_ptr; } const T * end() const VULKAN_HPP_NOEXCEPT { return m_ptr + m_count; } const T & front() const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( m_count && m_ptr ); return *m_ptr; } const T & back() const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( m_count && m_ptr ); return *( m_ptr + m_count - 1 ); } bool empty() const VULKAN_HPP_NOEXCEPT { return ( m_count == 0 ); } uint32_t size() const VULKAN_HPP_NOEXCEPT { return m_count; } T const * data() const VULKAN_HPP_NOEXCEPT { return m_ptr; } private: uint32_t m_count; T const * m_ptr; }; template class ArrayProxyNoTemporaries { public: VULKAN_HPP_CONSTEXPR ArrayProxyNoTemporaries() VULKAN_HPP_NOEXCEPT : m_count( 0 ) , m_ptr( nullptr ) { } VULKAN_HPP_CONSTEXPR ArrayProxyNoTemporaries( std::nullptr_t ) VULKAN_HPP_NOEXCEPT : m_count( 0 ) , m_ptr( nullptr ) { } template ::value && std::is_lvalue_reference::value, int>::type = 0> ArrayProxyNoTemporaries( B && value ) VULKAN_HPP_NOEXCEPT : m_count( 1 ) , m_ptr( &value ) { } ArrayProxyNoTemporaries( uint32_t count, T * ptr ) VULKAN_HPP_NOEXCEPT : m_count( count ) , m_ptr( ptr ) { } template ArrayProxyNoTemporaries( T ( &ptr )[C] ) VULKAN_HPP_NOEXCEPT : m_count( C ) , m_ptr( ptr ) { } template ArrayProxyNoTemporaries( T ( &&ptr )[C] ) = delete; // Any l-value reference with a .data() return type implicitly convertible to T*, and a .size() return type implicitly convertible to size_t. template ().begin() ), T *>::value && std::is_convertible().data() ), T *>::value && std::is_convertible().size() ), std::size_t>::value && std::is_lvalue_reference::value, int>::type = 0> ArrayProxyNoTemporaries( V && v ) VULKAN_HPP_NOEXCEPT : m_count( static_cast( v.size() ) ) , m_ptr( v.data() ) { } // Any l-value reference with a .begin() return type implicitly convertible to T*, and a .size() return type implicitly convertible to size_t. template ().begin() ), T *>::value && std::is_convertible().size() ), std::size_t>::value && std::is_lvalue_reference::value, int>::type = 0> ArrayProxyNoTemporaries( V && v ) VULKAN_HPP_NOEXCEPT : m_count( static_cast( v.size() ) ) , m_ptr( v.begin() ) { } const T * begin() const VULKAN_HPP_NOEXCEPT { return m_ptr; } const T * end() const VULKAN_HPP_NOEXCEPT { return m_ptr + m_count; } const T & front() const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( m_count && m_ptr ); return *m_ptr; } const T & back() const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( m_count && m_ptr ); return *( m_ptr + m_count - 1 ); } bool empty() const VULKAN_HPP_NOEXCEPT { return ( m_count == 0 ); } uint32_t size() const VULKAN_HPP_NOEXCEPT { return m_count; } T * data() const VULKAN_HPP_NOEXCEPT { return m_ptr; } private: uint32_t m_count; T * m_ptr; }; template class StridedArrayProxy : protected ArrayProxy { public: using ArrayProxy::ArrayProxy; StridedArrayProxy( uint32_t count, T const * ptr, uint32_t stride ) VULKAN_HPP_NOEXCEPT : ArrayProxy( count, ptr ) , m_stride( stride ) { VULKAN_HPP_ASSERT( sizeof( T ) <= stride ); } using ArrayProxy::begin; const T * end() const VULKAN_HPP_NOEXCEPT { return reinterpret_cast( static_cast( begin() ) + size() * m_stride ); } using ArrayProxy::front; const T & back() const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( begin() && size() ); return *reinterpret_cast( static_cast( begin() ) + ( size() - 1 ) * m_stride ); } using ArrayProxy::empty; using ArrayProxy::size; using ArrayProxy::data; uint32_t stride() const { return m_stride; } private: uint32_t m_stride = sizeof( T ); }; template class Optional { public: Optional( RefType & reference ) VULKAN_HPP_NOEXCEPT { m_ptr = &reference; } Optional( RefType * ptr ) VULKAN_HPP_NOEXCEPT { m_ptr = ptr; } Optional( std::nullptr_t ) VULKAN_HPP_NOEXCEPT { m_ptr = nullptr; } operator RefType *() const VULKAN_HPP_NOEXCEPT { return m_ptr; } RefType const * operator->() const VULKAN_HPP_NOEXCEPT { return m_ptr; } explicit operator bool() const VULKAN_HPP_NOEXCEPT { return !!m_ptr; } private: RefType * m_ptr; }; template struct StructExtends { enum { value = false }; }; template struct IsPartOfStructureChain { static const bool valid = false; }; template struct IsPartOfStructureChain { static const bool valid = std::is_same::value || IsPartOfStructureChain::valid; }; template struct StructureChainContains { static const bool value = std::is_same>::type>::value || StructureChainContains::value; }; template struct StructureChainContains<0, T, ChainElements...> { static const bool value = std::is_same>::type>::value; }; template struct StructureChainValidation { using TestType = typename std::tuple_element>::type; static const bool valid = StructExtends>::type>::value && ( TestType::allowDuplicate || !StructureChainContains::value ) && StructureChainValidation::valid; }; template struct StructureChainValidation<0, ChainElements...> { static const bool valid = true; }; template class StructureChain : public std::tuple { // Note: StructureChain has no move constructor or move assignment operator, as it is not supposed to contain movable containers. // In order to get a copy-operation on a move-operations, those functions are neither deleted nor defaulted. public: StructureChain() VULKAN_HPP_NOEXCEPT { static_assert( StructureChainValidation::valid, "The structure chain is not valid!" ); link(); } StructureChain( StructureChain const & rhs ) VULKAN_HPP_NOEXCEPT : std::tuple( rhs ) { static_assert( StructureChainValidation::valid, "The structure chain is not valid!" ); link( &std::get<0>( *this ), &std::get<0>( rhs ), reinterpret_cast( &std::get<0>( *this ) ), reinterpret_cast( &std::get<0>( rhs ) ) ); } StructureChain( ChainElements const &... elems ) VULKAN_HPP_NOEXCEPT : std::tuple( elems... ) { static_assert( StructureChainValidation::valid, "The structure chain is not valid!" ); link(); } StructureChain & operator=( StructureChain const & rhs ) VULKAN_HPP_NOEXCEPT { std::tuple::operator=( rhs ); link( &std::get<0>( *this ), &std::get<0>( rhs ), reinterpret_cast( &std::get<0>( *this ) ), reinterpret_cast( &std::get<0>( rhs ) ) ); return *this; } template >::type, size_t Which = 0> T & get() VULKAN_HPP_NOEXCEPT { return std::get::value>( static_cast &>( *this ) ); } template >::type, size_t Which = 0> T const & get() const VULKAN_HPP_NOEXCEPT { return std::get::value>( static_cast const &>( *this ) ); } template std::tuple get() VULKAN_HPP_NOEXCEPT { return std::tie( get(), get(), get()... ); } template std::tuple get() const VULKAN_HPP_NOEXCEPT { return std::tie( get(), get(), get()... ); } // assign a complete structure to the StructureChain without modifying the chaining template >::type, size_t Which = 0> StructureChain & assign( const T & rhs ) VULKAN_HPP_NOEXCEPT { T & lhs = get(); auto pNext = lhs.pNext; lhs = rhs; lhs.pNext = pNext; return *this; } template typename std::enable_if>::type>::value && ( Which == 0 ), bool>::type isLinked() const VULKAN_HPP_NOEXCEPT { return true; } template typename std::enable_if>::type>::value || ( Which != 0 ), bool>::type isLinked() const VULKAN_HPP_NOEXCEPT { static_assert( IsPartOfStructureChain::valid, "Can't unlink Structure that's not part of this StructureChain!" ); return isLinked( reinterpret_cast( &get() ) ); } template typename std::enable_if>::type>::value || ( Which != 0 ), void>::type relink() VULKAN_HPP_NOEXCEPT { static_assert( IsPartOfStructureChain::valid, "Can't relink Structure that's not part of this StructureChain!" ); auto pNext = reinterpret_cast( &get() ); VULKAN_HPP_ASSERT( !isLinked( pNext ) ); auto & headElement = std::get<0>( static_cast &>( *this ) ); pNext->pNext = reinterpret_cast( headElement.pNext ); headElement.pNext = pNext; } template typename std::enable_if>::type>::value || ( Which != 0 ), void>::type unlink() VULKAN_HPP_NOEXCEPT { static_assert( IsPartOfStructureChain::valid, "Can't unlink Structure that's not part of this StructureChain!" ); unlink( reinterpret_cast( &get() ) ); } private: template struct ChainElementIndex : ChainElementIndex { }; template struct ChainElementIndex::value, void>::type, First, Types...> : ChainElementIndex { }; template struct ChainElementIndex::value, void>::type, First, Types...> : ChainElementIndex { }; template struct ChainElementIndex::value, void>::type, First, Types...> : std::integral_constant { }; bool isLinked( VkBaseInStructure const * pNext ) const VULKAN_HPP_NOEXCEPT { VkBaseInStructure const * elementPtr = reinterpret_cast( &std::get<0>( static_cast const &>( *this ) ) ); while ( elementPtr ) { if ( elementPtr->pNext == pNext ) { return true; } elementPtr = elementPtr->pNext; } return false; } template typename std::enable_if::type link() VULKAN_HPP_NOEXCEPT { auto & x = std::get( static_cast &>( *this ) ); x.pNext = &std::get( static_cast &>( *this ) ); link(); } template typename std::enable_if::type link() VULKAN_HPP_NOEXCEPT { } void link( void * dstBase, void const * srcBase, VkBaseOutStructure * dst, VkBaseInStructure const * src ) { while ( src->pNext ) { std::ptrdiff_t offset = reinterpret_cast( src->pNext ) - reinterpret_cast( srcBase ); dst->pNext = reinterpret_cast( reinterpret_cast( dstBase ) + offset ); dst = dst->pNext; src = src->pNext; } dst->pNext = nullptr; } void unlink( VkBaseOutStructure const * pNext ) VULKAN_HPP_NOEXCEPT { VkBaseOutStructure * elementPtr = reinterpret_cast( &std::get<0>( static_cast &>( *this ) ) ); while ( elementPtr && ( elementPtr->pNext != pNext ) ) { elementPtr = elementPtr->pNext; } if ( elementPtr ) { elementPtr->pNext = pNext->pNext; } else { VULKAN_HPP_ASSERT( false ); // fires, if the ClassType member has already been unlinked ! } } }; // interupt the VULKAN_HPP_NAMESPACE for a moment to add specializations of std::tuple_size and std::tuple_element for the StructureChain! } namespace std { template struct tuple_size> { static constexpr size_t value = std::tuple_size>::value; }; template struct tuple_element> { using type = typename std::tuple_element>::type; }; } // namespace std namespace VULKAN_HPP_NAMESPACE { # if !defined( VULKAN_HPP_NO_SMART_HANDLE ) template class UniqueHandleTraits; template class UniqueHandle : public UniqueHandleTraits::deleter { private: using Deleter = typename UniqueHandleTraits::deleter; public: using element_type = Type; UniqueHandle() : Deleter(), m_value() {} explicit UniqueHandle( Type const & value, Deleter const & deleter = Deleter() ) VULKAN_HPP_NOEXCEPT : Deleter( deleter ) , m_value( value ) { } UniqueHandle( UniqueHandle const & ) = delete; UniqueHandle( UniqueHandle && other ) VULKAN_HPP_NOEXCEPT : Deleter( std::move( static_cast( other ) ) ) , m_value( other.release() ) { } ~UniqueHandle() VULKAN_HPP_NOEXCEPT { if ( m_value ) { this->destroy( m_value ); } } UniqueHandle & operator=( UniqueHandle const & ) = delete; UniqueHandle & operator=( UniqueHandle && other ) VULKAN_HPP_NOEXCEPT { reset( other.release() ); *static_cast( this ) = std::move( static_cast( other ) ); return *this; } explicit operator bool() const VULKAN_HPP_NOEXCEPT { return m_value.operator bool(); } # if defined( VULKAN_HPP_SMART_HANDLE_IMPLICIT_CAST ) operator Type() const VULKAN_HPP_NOEXCEPT { return m_value; } # endif Type const * operator->() const VULKAN_HPP_NOEXCEPT { return &m_value; } Type * operator->() VULKAN_HPP_NOEXCEPT { return &m_value; } Type const & operator*() const VULKAN_HPP_NOEXCEPT { return m_value; } Type & operator*() VULKAN_HPP_NOEXCEPT { return m_value; } const Type & get() const VULKAN_HPP_NOEXCEPT { return m_value; } Type & get() VULKAN_HPP_NOEXCEPT { return m_value; } void reset( Type const & value = Type() ) VULKAN_HPP_NOEXCEPT { if ( m_value != value ) { if ( m_value ) { this->destroy( m_value ); } m_value = value; } } Type release() VULKAN_HPP_NOEXCEPT { Type value = m_value; m_value = nullptr; return value; } void swap( UniqueHandle & rhs ) VULKAN_HPP_NOEXCEPT { std::swap( m_value, rhs.m_value ); std::swap( static_cast( *this ), static_cast( rhs ) ); } private: Type m_value; }; template VULKAN_HPP_INLINE std::vector uniqueToRaw( std::vector const & handles ) { std::vector newBuffer( handles.size() ); std::transform( handles.begin(), handles.end(), newBuffer.begin(), []( UniqueType const & handle ) { return handle.get(); } ); return newBuffer; } template VULKAN_HPP_INLINE void swap( UniqueHandle & lhs, UniqueHandle & rhs ) VULKAN_HPP_NOEXCEPT { lhs.swap( rhs ); } # endif #endif // VULKAN_HPP_DISABLE_ENHANCED_MODE namespace detail { class DispatchLoaderBase { public: DispatchLoaderBase() = default; DispatchLoaderBase( std::nullptr_t ) #if !defined( NDEBUG ) : m_valid( false ) #endif { } #if !defined( NDEBUG ) size_t getVkHeaderVersion() const { VULKAN_HPP_ASSERT( m_valid ); return vkHeaderVersion; } private: size_t vkHeaderVersion = VK_HEADER_VERSION; bool m_valid = true; #endif }; #if !defined( VK_NO_PROTOTYPES ) || ( defined( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC ) && ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 0 ) ) class DispatchLoaderStatic : public DispatchLoaderBase { public: //=== VK_VERSION_1_0 === VkResult vkCreateInstance( const VkInstanceCreateInfo * pCreateInfo, const VkAllocationCallbacks * pAllocator, VkInstance * pInstance ) const VULKAN_HPP_NOEXCEPT { return ::vkCreateInstance( pCreateInfo, pAllocator, pInstance ); } void vkDestroyInstance( VkInstance instance, const VkAllocationCallbacks * pAllocator ) const VULKAN_HPP_NOEXCEPT { return ::vkDestroyInstance( instance, pAllocator ); } VkResult vkEnumeratePhysicalDevices( VkInstance instance, uint32_t * pPhysicalDeviceCount, VkPhysicalDevice * pPhysicalDevices ) const VULKAN_HPP_NOEXCEPT { return ::vkEnumeratePhysicalDevices( instance, pPhysicalDeviceCount, pPhysicalDevices ); } void vkGetPhysicalDeviceFeatures( VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures * pFeatures ) const VULKAN_HPP_NOEXCEPT { return ::vkGetPhysicalDeviceFeatures( physicalDevice, pFeatures ); } void vkGetPhysicalDeviceFormatProperties( VkPhysicalDevice physicalDevice, VkFormat format, VkFormatProperties * pFormatProperties ) const VULKAN_HPP_NOEXCEPT { return ::vkGetPhysicalDeviceFormatProperties( physicalDevice, format, pFormatProperties ); } VkResult vkGetPhysicalDeviceImageFormatProperties( VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkImageTiling tiling, VkImageUsageFlags usage, VkImageCreateFlags flags, VkImageFormatProperties * pImageFormatProperties ) const VULKAN_HPP_NOEXCEPT { return ::vkGetPhysicalDeviceImageFormatProperties( physicalDevice, format, type, tiling, usage, flags, pImageFormatProperties ); } void vkGetPhysicalDeviceProperties( VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties * pProperties ) const VULKAN_HPP_NOEXCEPT { return ::vkGetPhysicalDeviceProperties( physicalDevice, pProperties ); } void vkGetPhysicalDeviceQueueFamilyProperties( VkPhysicalDevice physicalDevice, uint32_t * pQueueFamilyPropertyCount, VkQueueFamilyProperties * pQueueFamilyProperties ) const VULKAN_HPP_NOEXCEPT { return ::vkGetPhysicalDeviceQueueFamilyProperties( physicalDevice, pQueueFamilyPropertyCount, pQueueFamilyProperties ); } void vkGetPhysicalDeviceMemoryProperties( VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties * pMemoryProperties ) const VULKAN_HPP_NOEXCEPT { return ::vkGetPhysicalDeviceMemoryProperties( physicalDevice, pMemoryProperties ); } PFN_vkVoidFunction vkGetInstanceProcAddr( VkInstance instance, const char * pName ) const VULKAN_HPP_NOEXCEPT { return ::vkGetInstanceProcAddr( instance, pName ); } PFN_vkVoidFunction vkGetDeviceProcAddr( VkDevice device, const char * pName ) const VULKAN_HPP_NOEXCEPT { return ::vkGetDeviceProcAddr( device, pName ); } VkResult vkCreateDevice( VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo * pCreateInfo, const VkAllocationCallbacks * pAllocator, VkDevice * pDevice ) const VULKAN_HPP_NOEXCEPT { return ::vkCreateDevice( physicalDevice, pCreateInfo, pAllocator, pDevice ); } void vkDestroyDevice( VkDevice device, const VkAllocationCallbacks * pAllocator ) const VULKAN_HPP_NOEXCEPT { return ::vkDestroyDevice( device, pAllocator ); } VkResult vkEnumerateInstanceExtensionProperties( const char * pLayerName, uint32_t * pPropertyCount, VkExtensionProperties * pProperties ) const VULKAN_HPP_NOEXCEPT { return ::vkEnumerateInstanceExtensionProperties( pLayerName, pPropertyCount, pProperties ); } VkResult vkEnumerateDeviceExtensionProperties( VkPhysicalDevice physicalDevice, const char * pLayerName, uint32_t * pPropertyCount, VkExtensionProperties * pProperties ) const VULKAN_HPP_NOEXCEPT { return ::vkEnumerateDeviceExtensionProperties( physicalDevice, pLayerName, pPropertyCount, pProperties ); } VkResult vkEnumerateInstanceLayerProperties( uint32_t * pPropertyCount, VkLayerProperties * pProperties ) const VULKAN_HPP_NOEXCEPT { return ::vkEnumerateInstanceLayerProperties( pPropertyCount, pProperties ); } VkResult vkEnumerateDeviceLayerProperties( VkPhysicalDevice physicalDevice, uint32_t * pPropertyCount, VkLayerProperties * pProperties ) const VULKAN_HPP_NOEXCEPT { return ::vkEnumerateDeviceLayerProperties( physicalDevice, pPropertyCount, pProperties ); } void vkGetDeviceQueue( VkDevice device, uint32_t queueFamilyIndex, uint32_t queueIndex, VkQueue * pQueue ) const VULKAN_HPP_NOEXCEPT { return ::vkGetDeviceQueue( device, queueFamilyIndex, queueIndex, pQueue ); } VkResult vkQueueSubmit( VkQueue queue, uint32_t submitCount, const VkSubmitInfo * pSubmits, VkFence fence ) const VULKAN_HPP_NOEXCEPT { return ::vkQueueSubmit( queue, submitCount, pSubmits, fence ); } VkResult vkQueueWaitIdle( VkQueue queue ) const VULKAN_HPP_NOEXCEPT { return ::vkQueueWaitIdle( queue ); } VkResult vkDeviceWaitIdle( VkDevice device ) const VULKAN_HPP_NOEXCEPT { return ::vkDeviceWaitIdle( device ); } VkResult vkAllocateMemory( VkDevice device, const VkMemoryAllocateInfo * pAllocateInfo, const VkAllocationCallbacks * pAllocator, VkDeviceMemory * pMemory ) const VULKAN_HPP_NOEXCEPT { return ::vkAllocateMemory( device, pAllocateInfo, pAllocator, pMemory ); } void vkFreeMemory( VkDevice device, VkDeviceMemory memory, const VkAllocationCallbacks * pAllocator ) const VULKAN_HPP_NOEXCEPT { return ::vkFreeMemory( device, memory, pAllocator ); } VkResult vkMapMemory( VkDevice device, VkDeviceMemory memory, VkDeviceSize offset, VkDeviceSize size, VkMemoryMapFlags flags, void ** ppData ) const VULKAN_HPP_NOEXCEPT { return ::vkMapMemory( device, memory, offset, size, flags, ppData ); } void vkUnmapMemory( VkDevice device, VkDeviceMemory memory ) const VULKAN_HPP_NOEXCEPT { return ::vkUnmapMemory( device, memory ); } VkResult vkFlushMappedMemoryRanges( VkDevice device, uint32_t memoryRangeCount, const VkMappedMemoryRange * pMemoryRanges ) const VULKAN_HPP_NOEXCEPT { return ::vkFlushMappedMemoryRanges( device, memoryRangeCount, pMemoryRanges ); } VkResult vkInvalidateMappedMemoryRanges( VkDevice device, uint32_t memoryRangeCount, const VkMappedMemoryRange * pMemoryRanges ) const VULKAN_HPP_NOEXCEPT { return ::vkInvalidateMappedMemoryRanges( device, memoryRangeCount, pMemoryRanges ); } void vkGetDeviceMemoryCommitment( VkDevice device, VkDeviceMemory memory, VkDeviceSize * pCommittedMemoryInBytes ) const VULKAN_HPP_NOEXCEPT { return ::vkGetDeviceMemoryCommitment( device, memory, pCommittedMemoryInBytes ); } VkResult vkBindBufferMemory( VkDevice device, VkBuffer buffer, VkDeviceMemory memory, VkDeviceSize memoryOffset ) const VULKAN_HPP_NOEXCEPT { return ::vkBindBufferMemory( device, buffer, memory, memoryOffset ); } VkResult vkBindImageMemory( VkDevice device, VkImage image, VkDeviceMemory memory, VkDeviceSize memoryOffset ) const VULKAN_HPP_NOEXCEPT { return ::vkBindImageMemory( device, image, memory, memoryOffset ); } void vkGetBufferMemoryRequirements( VkDevice device, VkBuffer buffer, VkMemoryRequirements * pMemoryRequirements ) const VULKAN_HPP_NOEXCEPT { return ::vkGetBufferMemoryRequirements( device, buffer, pMemoryRequirements ); } void vkGetImageMemoryRequirements( VkDevice device, VkImage image, VkMemoryRequirements * pMemoryRequirements ) const VULKAN_HPP_NOEXCEPT { return ::vkGetImageMemoryRequirements( device, image, pMemoryRequirements ); } void vkGetImageSparseMemoryRequirements( VkDevice device, VkImage image, uint32_t * pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements * pSparseMemoryRequirements ) const VULKAN_HPP_NOEXCEPT { return ::vkGetImageSparseMemoryRequirements( device, image, pSparseMemoryRequirementCount, pSparseMemoryRequirements ); } void vkGetPhysicalDeviceSparseImageFormatProperties( VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkSampleCountFlagBits samples, VkImageUsageFlags usage, VkImageTiling tiling, uint32_t * pPropertyCount, VkSparseImageFormatProperties * pProperties ) const VULKAN_HPP_NOEXCEPT { return ::vkGetPhysicalDeviceSparseImageFormatProperties( physicalDevice, format, type, samples, usage, tiling, pPropertyCount, pProperties ); } VkResult vkQueueBindSparse( VkQueue queue, uint32_t bindInfoCount, const VkBindSparseInfo * pBindInfo, VkFence fence ) const VULKAN_HPP_NOEXCEPT { return ::vkQueueBindSparse( queue, bindInfoCount, pBindInfo, fence ); } VkResult vkCreateFence( VkDevice device, const VkFenceCreateInfo * pCreateInfo, const VkAllocationCallbacks * pAllocator, VkFence * pFence ) const VULKAN_HPP_NOEXCEPT { return ::vkCreateFence( device, pCreateInfo, pAllocator, pFence ); } void vkDestroyFence( VkDevice device, VkFence fence, const VkAllocationCallbacks * pAllocator ) const VULKAN_HPP_NOEXCEPT { return ::vkDestroyFence( device, fence, pAllocator ); } VkResult vkResetFences( VkDevice device, uint32_t fenceCount, const VkFence * pFences ) const VULKAN_HPP_NOEXCEPT { return ::vkResetFences( device, fenceCount, pFences ); } VkResult vkGetFenceStatus( VkDevice device, VkFence fence ) const VULKAN_HPP_NOEXCEPT { return ::vkGetFenceStatus( device, fence ); } VkResult vkWaitForFences( VkDevice device, uint32_t fenceCount, const VkFence * pFences, VkBool32 waitAll, uint64_t timeout ) const VULKAN_HPP_NOEXCEPT { return ::vkWaitForFences( device, fenceCount, pFences, waitAll, timeout ); } VkResult vkCreateSemaphore( VkDevice device, const VkSemaphoreCreateInfo * pCreateInfo, const VkAllocationCallbacks * pAllocator, VkSemaphore * pSemaphore ) const VULKAN_HPP_NOEXCEPT { return ::vkCreateSemaphore( device, pCreateInfo, pAllocator, pSemaphore ); } void vkDestroySemaphore( VkDevice device, VkSemaphore semaphore, const VkAllocationCallbacks * pAllocator ) const VULKAN_HPP_NOEXCEPT { return ::vkDestroySemaphore( device, semaphore, pAllocator ); } VkResult vkCreateEvent( VkDevice device, const VkEventCreateInfo * pCreateInfo, const VkAllocationCallbacks * pAllocator, VkEvent * pEvent ) const VULKAN_HPP_NOEXCEPT { return ::vkCreateEvent( device, pCreateInfo, pAllocator, pEvent ); } void vkDestroyEvent( VkDevice device, VkEvent event, const VkAllocationCallbacks * pAllocator ) const VULKAN_HPP_NOEXCEPT { return ::vkDestroyEvent( device, event, pAllocator ); } VkResult vkGetEventStatus( VkDevice device, VkEvent event ) const VULKAN_HPP_NOEXCEPT { return ::vkGetEventStatus( device, event ); } VkResult vkSetEvent( VkDevice device, VkEvent event ) const VULKAN_HPP_NOEXCEPT { return ::vkSetEvent( device, event ); } VkResult vkResetEvent( VkDevice device, VkEvent event ) const VULKAN_HPP_NOEXCEPT { return ::vkResetEvent( device, event ); } VkResult vkCreateQueryPool( VkDevice device, const VkQueryPoolCreateInfo * pCreateInfo, const VkAllocationCallbacks * pAllocator, VkQueryPool * pQueryPool ) const VULKAN_HPP_NOEXCEPT { return ::vkCreateQueryPool( device, pCreateInfo, pAllocator, pQueryPool ); } void vkDestroyQueryPool( VkDevice device, VkQueryPool queryPool, const VkAllocationCallbacks * pAllocator ) const VULKAN_HPP_NOEXCEPT { return ::vkDestroyQueryPool( device, queryPool, pAllocator ); } VkResult vkGetQueryPoolResults( VkDevice device, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, size_t dataSize, void * pData, VkDeviceSize stride, VkQueryResultFlags flags ) const VULKAN_HPP_NOEXCEPT { return ::vkGetQueryPoolResults( device, queryPool, firstQuery, queryCount, dataSize, pData, stride, flags ); } VkResult vkCreateBuffer( VkDevice device, const VkBufferCreateInfo * pCreateInfo, const VkAllocationCallbacks * pAllocator, VkBuffer * pBuffer ) const VULKAN_HPP_NOEXCEPT { return ::vkCreateBuffer( device, pCreateInfo, pAllocator, pBuffer ); } void vkDestroyBuffer( VkDevice device, VkBuffer buffer, const VkAllocationCallbacks * pAllocator ) const VULKAN_HPP_NOEXCEPT { return ::vkDestroyBuffer( device, buffer, pAllocator ); } VkResult vkCreateBufferView( VkDevice device, const VkBufferViewCreateInfo * pCreateInfo, const VkAllocationCallbacks * pAllocator, VkBufferView * pView ) const VULKAN_HPP_NOEXCEPT { return ::vkCreateBufferView( device, pCreateInfo, pAllocator, pView ); } void vkDestroyBufferView( VkDevice device, VkBufferView bufferView, const VkAllocationCallbacks * pAllocator ) const VULKAN_HPP_NOEXCEPT { return ::vkDestroyBufferView( device, bufferView, pAllocator ); } VkResult vkCreateImage( VkDevice device, const VkImageCreateInfo * pCreateInfo, const VkAllocationCallbacks * pAllocator, VkImage * pImage ) const VULKAN_HPP_NOEXCEPT { return ::vkCreateImage( device, pCreateInfo, pAllocator, pImage ); } void vkDestroyImage( VkDevice device, VkImage image, const VkAllocationCallbacks * pAllocator ) const VULKAN_HPP_NOEXCEPT { return ::vkDestroyImage( device, image, pAllocator ); } void vkGetImageSubresourceLayout( VkDevice device, VkImage image, const VkImageSubresource * pSubresource, VkSubresourceLayout * pLayout ) const VULKAN_HPP_NOEXCEPT { return ::vkGetImageSubresourceLayout( device, image, pSubresource, pLayout ); } VkResult vkCreateImageView( VkDevice device, const VkImageViewCreateInfo * pCreateInfo, const VkAllocationCallbacks * pAllocator, VkImageView * pView ) const VULKAN_HPP_NOEXCEPT { return ::vkCreateImageView( device, pCreateInfo, pAllocator, pView ); } void vkDestroyImageView( VkDevice device, VkImageView imageView, const VkAllocationCallbacks * pAllocator ) const VULKAN_HPP_NOEXCEPT { return ::vkDestroyImageView( device, imageView, pAllocator ); } VkResult vkCreateShaderModule( VkDevice device, const VkShaderModuleCreateInfo * pCreateInfo, const VkAllocationCallbacks * pAllocator, VkShaderModule * pShaderModule ) const VULKAN_HPP_NOEXCEPT { return ::vkCreateShaderModule( device, pCreateInfo, pAllocator, pShaderModule ); } void vkDestroyShaderModule( VkDevice device, VkShaderModule shaderModule, const VkAllocationCallbacks * pAllocator ) const VULKAN_HPP_NOEXCEPT { return ::vkDestroyShaderModule( device, shaderModule, pAllocator ); } VkResult vkCreatePipelineCache( VkDevice device, const VkPipelineCacheCreateInfo * pCreateInfo, const VkAllocationCallbacks * pAllocator, VkPipelineCache * pPipelineCache ) const VULKAN_HPP_NOEXCEPT { return ::vkCreatePipelineCache( device, pCreateInfo, pAllocator, pPipelineCache ); } void vkDestroyPipelineCache( VkDevice device, VkPipelineCache pipelineCache, const VkAllocationCallbacks * pAllocator ) const VULKAN_HPP_NOEXCEPT { return ::vkDestroyPipelineCache( device, pipelineCache, pAllocator ); } VkResult vkGetPipelineCacheData( VkDevice device, VkPipelineCache pipelineCache, size_t * pDataSize, void * pData ) const VULKAN_HPP_NOEXCEPT { return ::vkGetPipelineCacheData( device, pipelineCache, pDataSize, pData ); } VkResult vkMergePipelineCaches( VkDevice device, VkPipelineCache dstCache, uint32_t srcCacheCount, const VkPipelineCache * pSrcCaches ) const VULKAN_HPP_NOEXCEPT { return ::vkMergePipelineCaches( device, dstCache, srcCacheCount, pSrcCaches ); } VkResult vkCreateGraphicsPipelines( VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkGraphicsPipelineCreateInfo * pCreateInfos, const VkAllocationCallbacks * pAllocator, VkPipeline * pPipelines ) const VULKAN_HPP_NOEXCEPT { return ::vkCreateGraphicsPipelines( device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines ); } VkResult vkCreateComputePipelines( VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkComputePipelineCreateInfo * pCreateInfos, const VkAllocationCallbacks * pAllocator, VkPipeline * pPipelines ) const VULKAN_HPP_NOEXCEPT { return ::vkCreateComputePipelines( device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines ); } void vkDestroyPipeline( VkDevice device, VkPipeline pipeline, const VkAllocationCallbacks * pAllocator ) const VULKAN_HPP_NOEXCEPT { return ::vkDestroyPipeline( device, pipeline, pAllocator ); } VkResult vkCreatePipelineLayout( VkDevice device, const VkPipelineLayoutCreateInfo * pCreateInfo, const VkAllocationCallbacks * pAllocator, VkPipelineLayout * pPipelineLayout ) const VULKAN_HPP_NOEXCEPT { return ::vkCreatePipelineLayout( device, pCreateInfo, pAllocator, pPipelineLayout ); } void vkDestroyPipelineLayout( VkDevice device, VkPipelineLayout pipelineLayout, const VkAllocationCallbacks * pAllocator ) const VULKAN_HPP_NOEXCEPT { return ::vkDestroyPipelineLayout( device, pipelineLayout, pAllocator ); } VkResult vkCreateSampler( VkDevice device, const VkSamplerCreateInfo * pCreateInfo, const VkAllocationCallbacks * pAllocator, VkSampler * pSampler ) const VULKAN_HPP_NOEXCEPT { return ::vkCreateSampler( device, pCreateInfo, pAllocator, pSampler ); } void vkDestroySampler( VkDevice device, VkSampler sampler, const VkAllocationCallbacks * pAllocator ) const VULKAN_HPP_NOEXCEPT { return ::vkDestroySampler( device, sampler, pAllocator ); } VkResult vkCreateDescriptorSetLayout( VkDevice device, const VkDescriptorSetLayoutCreateInfo * pCreateInfo, const VkAllocationCallbacks * pAllocator, VkDescriptorSetLayout * pSetLayout ) const VULKAN_HPP_NOEXCEPT { return ::vkCreateDescriptorSetLayout( device, pCreateInfo, pAllocator, pSetLayout ); } void vkDestroyDescriptorSetLayout( VkDevice device, VkDescriptorSetLayout descriptorSetLayout, const VkAllocationCallbacks * pAllocator ) const VULKAN_HPP_NOEXCEPT { return ::vkDestroyDescriptorSetLayout( device, descriptorSetLayout, pAllocator ); } VkResult vkCreateDescriptorPool( VkDevice device, const VkDescriptorPoolCreateInfo * pCreateInfo, const VkAllocationCallbacks * pAllocator, VkDescriptorPool * pDescriptorPool ) const VULKAN_HPP_NOEXCEPT { return ::vkCreateDescriptorPool( device, pCreateInfo, pAllocator, pDescriptorPool ); } void vkDestroyDescriptorPool( VkDevice device, VkDescriptorPool descriptorPool, const VkAllocationCallbacks * pAllocator ) const VULKAN_HPP_NOEXCEPT { return ::vkDestroyDescriptorPool( device, descriptorPool, pAllocator ); } VkResult vkResetDescriptorPool( VkDevice device, VkDescriptorPool descriptorPool, VkDescriptorPoolResetFlags flags ) const VULKAN_HPP_NOEXCEPT { return ::vkResetDescriptorPool( device, descriptorPool, flags ); } VkResult vkAllocateDescriptorSets( VkDevice device, const VkDescriptorSetAllocateInfo * pAllocateInfo, VkDescriptorSet * pDescriptorSets ) const VULKAN_HPP_NOEXCEPT { return ::vkAllocateDescriptorSets( device, pAllocateInfo, pDescriptorSets ); } VkResult vkFreeDescriptorSets( VkDevice device, VkDescriptorPool descriptorPool, uint32_t descriptorSetCount, const VkDescriptorSet * pDescriptorSets ) const VULKAN_HPP_NOEXCEPT { return ::vkFreeDescriptorSets( device, descriptorPool, descriptorSetCount, pDescriptorSets ); } void vkUpdateDescriptorSets( VkDevice device, uint32_t descriptorWriteCount, const VkWriteDescriptorSet * pDescriptorWrites, uint32_t descriptorCopyCount, const VkCopyDescriptorSet * pDescriptorCopies ) const VULKAN_HPP_NOEXCEPT { return ::vkUpdateDescriptorSets( device, descriptorWriteCount, pDescriptorWrites, descriptorCopyCount, pDescriptorCopies ); } VkResult vkCreateFramebuffer( VkDevice device, const VkFramebufferCreateInfo * pCreateInfo, const VkAllocationCallbacks * pAllocator, VkFramebuffer * pFramebuffer ) const VULKAN_HPP_NOEXCEPT { return ::vkCreateFramebuffer( device, pCreateInfo, pAllocator, pFramebuffer ); } void vkDestroyFramebuffer( VkDevice device, VkFramebuffer framebuffer, const VkAllocationCallbacks * pAllocator ) const VULKAN_HPP_NOEXCEPT { return ::vkDestroyFramebuffer( device, framebuffer, pAllocator ); } VkResult vkCreateRenderPass( VkDevice device, const VkRenderPassCreateInfo * pCreateInfo, const VkAllocationCallbacks * pAllocator, VkRenderPass * pRenderPass ) const VULKAN_HPP_NOEXCEPT { return ::vkCreateRenderPass( device, pCreateInfo, pAllocator, pRenderPass ); } void vkDestroyRenderPass( VkDevice device, VkRenderPass renderPass, const VkAllocationCallbacks * pAllocator ) const VULKAN_HPP_NOEXCEPT { return ::vkDestroyRenderPass( device, renderPass, pAllocator ); } void vkGetRenderAreaGranularity( VkDevice device, VkRenderPass renderPass, VkExtent2D * pGranularity ) const VULKAN_HPP_NOEXCEPT { return ::vkGetRenderAreaGranularity( device, renderPass, pGranularity ); } VkResult vkCreateCommandPool( VkDevice device, const VkCommandPoolCreateInfo * pCreateInfo, const VkAllocationCallbacks * pAllocator, VkCommandPool * pCommandPool ) const VULKAN_HPP_NOEXCEPT { return ::vkCreateCommandPool( device, pCreateInfo, pAllocator, pCommandPool ); } void vkDestroyCommandPool( VkDevice device, VkCommandPool commandPool, const VkAllocationCallbacks * pAllocator ) const VULKAN_HPP_NOEXCEPT { return ::vkDestroyCommandPool( device, commandPool, pAllocator ); } VkResult vkResetCommandPool( VkDevice device, VkCommandPool commandPool, VkCommandPoolResetFlags flags ) const VULKAN_HPP_NOEXCEPT { return ::vkResetCommandPool( device, commandPool, flags ); } VkResult vkAllocateCommandBuffers( VkDevice device, const VkCommandBufferAllocateInfo * pAllocateInfo, VkCommandBuffer * pCommandBuffers ) const VULKAN_HPP_NOEXCEPT { return ::vkAllocateCommandBuffers( device, pAllocateInfo, pCommandBuffers ); } void vkFreeCommandBuffers( VkDevice device, VkCommandPool commandPool, uint32_t commandBufferCount, const VkCommandBuffer * pCommandBuffers ) const VULKAN_HPP_NOEXCEPT { return ::vkFreeCommandBuffers( device, commandPool, commandBufferCount, pCommandBuffers ); } VkResult vkBeginCommandBuffer( VkCommandBuffer commandBuffer, const VkCommandBufferBeginInfo * pBeginInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkBeginCommandBuffer( commandBuffer, pBeginInfo ); } VkResult vkEndCommandBuffer( VkCommandBuffer commandBuffer ) const VULKAN_HPP_NOEXCEPT { return ::vkEndCommandBuffer( commandBuffer ); } VkResult vkResetCommandBuffer( VkCommandBuffer commandBuffer, VkCommandBufferResetFlags flags ) const VULKAN_HPP_NOEXCEPT { return ::vkResetCommandBuffer( commandBuffer, flags ); } void vkCmdBindPipeline( VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdBindPipeline( commandBuffer, pipelineBindPoint, pipeline ); } void vkCmdSetViewport( VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, const VkViewport * pViewports ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetViewport( commandBuffer, firstViewport, viewportCount, pViewports ); } void vkCmdSetScissor( VkCommandBuffer commandBuffer, uint32_t firstScissor, uint32_t scissorCount, const VkRect2D * pScissors ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetScissor( commandBuffer, firstScissor, scissorCount, pScissors ); } void vkCmdSetLineWidth( VkCommandBuffer commandBuffer, float lineWidth ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetLineWidth( commandBuffer, lineWidth ); } void vkCmdSetDepthBias( VkCommandBuffer commandBuffer, float depthBiasConstantFactor, float depthBiasClamp, float depthBiasSlopeFactor ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetDepthBias( commandBuffer, depthBiasConstantFactor, depthBiasClamp, depthBiasSlopeFactor ); } void vkCmdSetBlendConstants( VkCommandBuffer commandBuffer, const float blendConstants[4] ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetBlendConstants( commandBuffer, blendConstants ); } void vkCmdSetDepthBounds( VkCommandBuffer commandBuffer, float minDepthBounds, float maxDepthBounds ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetDepthBounds( commandBuffer, minDepthBounds, maxDepthBounds ); } void vkCmdSetStencilCompareMask( VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t compareMask ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetStencilCompareMask( commandBuffer, faceMask, compareMask ); } void vkCmdSetStencilWriteMask( VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t writeMask ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetStencilWriteMask( commandBuffer, faceMask, writeMask ); } void vkCmdSetStencilReference( VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t reference ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetStencilReference( commandBuffer, faceMask, reference ); } void vkCmdBindDescriptorSets( VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, uint32_t firstSet, uint32_t descriptorSetCount, const VkDescriptorSet * pDescriptorSets, uint32_t dynamicOffsetCount, const uint32_t * pDynamicOffsets ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdBindDescriptorSets( commandBuffer, pipelineBindPoint, layout, firstSet, descriptorSetCount, pDescriptorSets, dynamicOffsetCount, pDynamicOffsets ); } void vkCmdBindIndexBuffer( VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkIndexType indexType ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdBindIndexBuffer( commandBuffer, buffer, offset, indexType ); } void vkCmdBindVertexBuffers( VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, const VkBuffer * pBuffers, const VkDeviceSize * pOffsets ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdBindVertexBuffers( commandBuffer, firstBinding, bindingCount, pBuffers, pOffsets ); } void vkCmdDraw( VkCommandBuffer commandBuffer, uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdDraw( commandBuffer, vertexCount, instanceCount, firstVertex, firstInstance ); } void vkCmdDrawIndexed( VkCommandBuffer commandBuffer, uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, int32_t vertexOffset, uint32_t firstInstance ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdDrawIndexed( commandBuffer, indexCount, instanceCount, firstIndex, vertexOffset, firstInstance ); } void vkCmdDrawIndirect( VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdDrawIndirect( commandBuffer, buffer, offset, drawCount, stride ); } void vkCmdDrawIndexedIndirect( VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdDrawIndexedIndirect( commandBuffer, buffer, offset, drawCount, stride ); } void vkCmdDispatch( VkCommandBuffer commandBuffer, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdDispatch( commandBuffer, groupCountX, groupCountY, groupCountZ ); } void vkCmdDispatchIndirect( VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdDispatchIndirect( commandBuffer, buffer, offset ); } void vkCmdCopyBuffer( VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkBuffer dstBuffer, uint32_t regionCount, const VkBufferCopy * pRegions ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdCopyBuffer( commandBuffer, srcBuffer, dstBuffer, regionCount, pRegions ); } void vkCmdCopyImage( VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageCopy * pRegions ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdCopyImage( commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, pRegions ); } void vkCmdBlitImage( VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageBlit * pRegions, VkFilter filter ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdBlitImage( commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, pRegions, filter ); } void vkCmdCopyBufferToImage( VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkBufferImageCopy * pRegions ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdCopyBufferToImage( commandBuffer, srcBuffer, dstImage, dstImageLayout, regionCount, pRegions ); } void vkCmdCopyImageToBuffer( VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkBuffer dstBuffer, uint32_t regionCount, const VkBufferImageCopy * pRegions ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdCopyImageToBuffer( commandBuffer, srcImage, srcImageLayout, dstBuffer, regionCount, pRegions ); } void vkCmdUpdateBuffer( VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize dataSize, const void * pData ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdUpdateBuffer( commandBuffer, dstBuffer, dstOffset, dataSize, pData ); } void vkCmdFillBuffer( VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize size, uint32_t data ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdFillBuffer( commandBuffer, dstBuffer, dstOffset, size, data ); } void vkCmdClearColorImage( VkCommandBuffer commandBuffer, VkImage image, VkImageLayout imageLayout, const VkClearColorValue * pColor, uint32_t rangeCount, const VkImageSubresourceRange * pRanges ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdClearColorImage( commandBuffer, image, imageLayout, pColor, rangeCount, pRanges ); } void vkCmdClearDepthStencilImage( VkCommandBuffer commandBuffer, VkImage image, VkImageLayout imageLayout, const VkClearDepthStencilValue * pDepthStencil, uint32_t rangeCount, const VkImageSubresourceRange * pRanges ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdClearDepthStencilImage( commandBuffer, image, imageLayout, pDepthStencil, rangeCount, pRanges ); } void vkCmdClearAttachments( VkCommandBuffer commandBuffer, uint32_t attachmentCount, const VkClearAttachment * pAttachments, uint32_t rectCount, const VkClearRect * pRects ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdClearAttachments( commandBuffer, attachmentCount, pAttachments, rectCount, pRects ); } void vkCmdResolveImage( VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageResolve * pRegions ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdResolveImage( commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, pRegions ); } void vkCmdSetEvent( VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetEvent( commandBuffer, event, stageMask ); } void vkCmdResetEvent( VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdResetEvent( commandBuffer, event, stageMask ); } void vkCmdWaitEvents( VkCommandBuffer commandBuffer, uint32_t eventCount, const VkEvent * pEvents, VkPipelineStageFlags srcStageMask, VkPipelineStageFlags dstStageMask, uint32_t memoryBarrierCount, const VkMemoryBarrier * pMemoryBarriers, uint32_t bufferMemoryBarrierCount, const VkBufferMemoryBarrier * pBufferMemoryBarriers, uint32_t imageMemoryBarrierCount, const VkImageMemoryBarrier * pImageMemoryBarriers ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdWaitEvents( commandBuffer, eventCount, pEvents, srcStageMask, dstStageMask, memoryBarrierCount, pMemoryBarriers, bufferMemoryBarrierCount, pBufferMemoryBarriers, imageMemoryBarrierCount, pImageMemoryBarriers ); } void vkCmdPipelineBarrier( VkCommandBuffer commandBuffer, VkPipelineStageFlags srcStageMask, VkPipelineStageFlags dstStageMask, VkDependencyFlags dependencyFlags, uint32_t memoryBarrierCount, const VkMemoryBarrier * pMemoryBarriers, uint32_t bufferMemoryBarrierCount, const VkBufferMemoryBarrier * pBufferMemoryBarriers, uint32_t imageMemoryBarrierCount, const VkImageMemoryBarrier * pImageMemoryBarriers ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdPipelineBarrier( commandBuffer, srcStageMask, dstStageMask, dependencyFlags, memoryBarrierCount, pMemoryBarriers, bufferMemoryBarrierCount, pBufferMemoryBarriers, imageMemoryBarrierCount, pImageMemoryBarriers ); } void vkCmdBeginQuery( VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, VkQueryControlFlags flags ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdBeginQuery( commandBuffer, queryPool, query, flags ); } void vkCmdEndQuery( VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdEndQuery( commandBuffer, queryPool, query ); } void vkCmdResetQueryPool( VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdResetQueryPool( commandBuffer, queryPool, firstQuery, queryCount ); } void vkCmdWriteTimestamp( VkCommandBuffer commandBuffer, VkPipelineStageFlagBits pipelineStage, VkQueryPool queryPool, uint32_t query ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdWriteTimestamp( commandBuffer, pipelineStage, queryPool, query ); } void vkCmdCopyQueryPoolResults( VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize stride, VkQueryResultFlags flags ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdCopyQueryPoolResults( commandBuffer, queryPool, firstQuery, queryCount, dstBuffer, dstOffset, stride, flags ); } void vkCmdPushConstants( VkCommandBuffer commandBuffer, VkPipelineLayout layout, VkShaderStageFlags stageFlags, uint32_t offset, uint32_t size, const void * pValues ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdPushConstants( commandBuffer, layout, stageFlags, offset, size, pValues ); } void vkCmdBeginRenderPass( VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo * pRenderPassBegin, VkSubpassContents contents ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdBeginRenderPass( commandBuffer, pRenderPassBegin, contents ); } void vkCmdNextSubpass( VkCommandBuffer commandBuffer, VkSubpassContents contents ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdNextSubpass( commandBuffer, contents ); } void vkCmdEndRenderPass( VkCommandBuffer commandBuffer ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdEndRenderPass( commandBuffer ); } void vkCmdExecuteCommands( VkCommandBuffer commandBuffer, uint32_t commandBufferCount, const VkCommandBuffer * pCommandBuffers ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdExecuteCommands( commandBuffer, commandBufferCount, pCommandBuffers ); } //=== VK_VERSION_1_1 === VkResult vkEnumerateInstanceVersion( uint32_t * pApiVersion ) const VULKAN_HPP_NOEXCEPT { return ::vkEnumerateInstanceVersion( pApiVersion ); } VkResult vkBindBufferMemory2( VkDevice device, uint32_t bindInfoCount, const VkBindBufferMemoryInfo * pBindInfos ) const VULKAN_HPP_NOEXCEPT { return ::vkBindBufferMemory2( device, bindInfoCount, pBindInfos ); } VkResult vkBindImageMemory2( VkDevice device, uint32_t bindInfoCount, const VkBindImageMemoryInfo * pBindInfos ) const VULKAN_HPP_NOEXCEPT { return ::vkBindImageMemory2( device, bindInfoCount, pBindInfos ); } void vkGetDeviceGroupPeerMemoryFeatures( VkDevice device, uint32_t heapIndex, uint32_t localDeviceIndex, uint32_t remoteDeviceIndex, VkPeerMemoryFeatureFlags * pPeerMemoryFeatures ) const VULKAN_HPP_NOEXCEPT { return ::vkGetDeviceGroupPeerMemoryFeatures( device, heapIndex, localDeviceIndex, remoteDeviceIndex, pPeerMemoryFeatures ); } void vkCmdSetDeviceMask( VkCommandBuffer commandBuffer, uint32_t deviceMask ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetDeviceMask( commandBuffer, deviceMask ); } void vkCmdDispatchBase( VkCommandBuffer commandBuffer, uint32_t baseGroupX, uint32_t baseGroupY, uint32_t baseGroupZ, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdDispatchBase( commandBuffer, baseGroupX, baseGroupY, baseGroupZ, groupCountX, groupCountY, groupCountZ ); } VkResult vkEnumeratePhysicalDeviceGroups( VkInstance instance, uint32_t * pPhysicalDeviceGroupCount, VkPhysicalDeviceGroupProperties * pPhysicalDeviceGroupProperties ) const VULKAN_HPP_NOEXCEPT { return ::vkEnumeratePhysicalDeviceGroups( instance, pPhysicalDeviceGroupCount, pPhysicalDeviceGroupProperties ); } void vkGetImageMemoryRequirements2( VkDevice device, const VkImageMemoryRequirementsInfo2 * pInfo, VkMemoryRequirements2 * pMemoryRequirements ) const VULKAN_HPP_NOEXCEPT { return ::vkGetImageMemoryRequirements2( device, pInfo, pMemoryRequirements ); } void vkGetBufferMemoryRequirements2( VkDevice device, const VkBufferMemoryRequirementsInfo2 * pInfo, VkMemoryRequirements2 * pMemoryRequirements ) const VULKAN_HPP_NOEXCEPT { return ::vkGetBufferMemoryRequirements2( device, pInfo, pMemoryRequirements ); } void vkGetImageSparseMemoryRequirements2( VkDevice device, const VkImageSparseMemoryRequirementsInfo2 * pInfo, uint32_t * pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements2 * pSparseMemoryRequirements ) const VULKAN_HPP_NOEXCEPT { return ::vkGetImageSparseMemoryRequirements2( device, pInfo, pSparseMemoryRequirementCount, pSparseMemoryRequirements ); } void vkGetPhysicalDeviceFeatures2( VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures2 * pFeatures ) const VULKAN_HPP_NOEXCEPT { return ::vkGetPhysicalDeviceFeatures2( physicalDevice, pFeatures ); } void vkGetPhysicalDeviceProperties2( VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties2 * pProperties ) const VULKAN_HPP_NOEXCEPT { return ::vkGetPhysicalDeviceProperties2( physicalDevice, pProperties ); } void vkGetPhysicalDeviceFormatProperties2( VkPhysicalDevice physicalDevice, VkFormat format, VkFormatProperties2 * pFormatProperties ) const VULKAN_HPP_NOEXCEPT { return ::vkGetPhysicalDeviceFormatProperties2( physicalDevice, format, pFormatProperties ); } VkResult vkGetPhysicalDeviceImageFormatProperties2( VkPhysicalDevice physicalDevice, const VkPhysicalDeviceImageFormatInfo2 * pImageFormatInfo, VkImageFormatProperties2 * pImageFormatProperties ) const VULKAN_HPP_NOEXCEPT { return ::vkGetPhysicalDeviceImageFormatProperties2( physicalDevice, pImageFormatInfo, pImageFormatProperties ); } void vkGetPhysicalDeviceQueueFamilyProperties2( VkPhysicalDevice physicalDevice, uint32_t * pQueueFamilyPropertyCount, VkQueueFamilyProperties2 * pQueueFamilyProperties ) const VULKAN_HPP_NOEXCEPT { return ::vkGetPhysicalDeviceQueueFamilyProperties2( physicalDevice, pQueueFamilyPropertyCount, pQueueFamilyProperties ); } void vkGetPhysicalDeviceMemoryProperties2( VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties2 * pMemoryProperties ) const VULKAN_HPP_NOEXCEPT { return ::vkGetPhysicalDeviceMemoryProperties2( physicalDevice, pMemoryProperties ); } void vkGetPhysicalDeviceSparseImageFormatProperties2( VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSparseImageFormatInfo2 * pFormatInfo, uint32_t * pPropertyCount, VkSparseImageFormatProperties2 * pProperties ) const VULKAN_HPP_NOEXCEPT { return ::vkGetPhysicalDeviceSparseImageFormatProperties2( physicalDevice, pFormatInfo, pPropertyCount, pProperties ); } void vkTrimCommandPool( VkDevice device, VkCommandPool commandPool, VkCommandPoolTrimFlags flags ) const VULKAN_HPP_NOEXCEPT { return ::vkTrimCommandPool( device, commandPool, flags ); } void vkGetDeviceQueue2( VkDevice device, const VkDeviceQueueInfo2 * pQueueInfo, VkQueue * pQueue ) const VULKAN_HPP_NOEXCEPT { return ::vkGetDeviceQueue2( device, pQueueInfo, pQueue ); } VkResult vkCreateSamplerYcbcrConversion( VkDevice device, const VkSamplerYcbcrConversionCreateInfo * pCreateInfo, const VkAllocationCallbacks * pAllocator, VkSamplerYcbcrConversion * pYcbcrConversion ) const VULKAN_HPP_NOEXCEPT { return ::vkCreateSamplerYcbcrConversion( device, pCreateInfo, pAllocator, pYcbcrConversion ); } void vkDestroySamplerYcbcrConversion( VkDevice device, VkSamplerYcbcrConversion ycbcrConversion, const VkAllocationCallbacks * pAllocator ) const VULKAN_HPP_NOEXCEPT { return ::vkDestroySamplerYcbcrConversion( device, ycbcrConversion, pAllocator ); } VkResult vkCreateDescriptorUpdateTemplate( VkDevice device, const VkDescriptorUpdateTemplateCreateInfo * pCreateInfo, const VkAllocationCallbacks * pAllocator, VkDescriptorUpdateTemplate * pDescriptorUpdateTemplate ) const VULKAN_HPP_NOEXCEPT { return ::vkCreateDescriptorUpdateTemplate( device, pCreateInfo, pAllocator, pDescriptorUpdateTemplate ); } void vkDestroyDescriptorUpdateTemplate( VkDevice device, VkDescriptorUpdateTemplate descriptorUpdateTemplate, const VkAllocationCallbacks * pAllocator ) const VULKAN_HPP_NOEXCEPT { return ::vkDestroyDescriptorUpdateTemplate( device, descriptorUpdateTemplate, pAllocator ); } void vkUpdateDescriptorSetWithTemplate( VkDevice device, VkDescriptorSet descriptorSet, VkDescriptorUpdateTemplate descriptorUpdateTemplate, const void * pData ) const VULKAN_HPP_NOEXCEPT { return ::vkUpdateDescriptorSetWithTemplate( device, descriptorSet, descriptorUpdateTemplate, pData ); } void vkGetPhysicalDeviceExternalBufferProperties( VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalBufferInfo * pExternalBufferInfo, VkExternalBufferProperties * pExternalBufferProperties ) const VULKAN_HPP_NOEXCEPT { return ::vkGetPhysicalDeviceExternalBufferProperties( physicalDevice, pExternalBufferInfo, pExternalBufferProperties ); } void vkGetPhysicalDeviceExternalFenceProperties( VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalFenceInfo * pExternalFenceInfo, VkExternalFenceProperties * pExternalFenceProperties ) const VULKAN_HPP_NOEXCEPT { return ::vkGetPhysicalDeviceExternalFenceProperties( physicalDevice, pExternalFenceInfo, pExternalFenceProperties ); } void vkGetPhysicalDeviceExternalSemaphoreProperties( VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalSemaphoreInfo * pExternalSemaphoreInfo, VkExternalSemaphoreProperties * pExternalSemaphoreProperties ) const VULKAN_HPP_NOEXCEPT { return ::vkGetPhysicalDeviceExternalSemaphoreProperties( physicalDevice, pExternalSemaphoreInfo, pExternalSemaphoreProperties ); } void vkGetDescriptorSetLayoutSupport( VkDevice device, const VkDescriptorSetLayoutCreateInfo * pCreateInfo, VkDescriptorSetLayoutSupport * pSupport ) const VULKAN_HPP_NOEXCEPT { return ::vkGetDescriptorSetLayoutSupport( device, pCreateInfo, pSupport ); } //=== VK_VERSION_1_2 === void vkCmdDrawIndirectCount( VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdDrawIndirectCount( commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride ); } void vkCmdDrawIndexedIndirectCount( VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdDrawIndexedIndirectCount( commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride ); } VkResult vkCreateRenderPass2( VkDevice device, const VkRenderPassCreateInfo2 * pCreateInfo, const VkAllocationCallbacks * pAllocator, VkRenderPass * pRenderPass ) const VULKAN_HPP_NOEXCEPT { return ::vkCreateRenderPass2( device, pCreateInfo, pAllocator, pRenderPass ); } void vkCmdBeginRenderPass2( VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo * pRenderPassBegin, const VkSubpassBeginInfo * pSubpassBeginInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdBeginRenderPass2( commandBuffer, pRenderPassBegin, pSubpassBeginInfo ); } void vkCmdNextSubpass2( VkCommandBuffer commandBuffer, const VkSubpassBeginInfo * pSubpassBeginInfo, const VkSubpassEndInfo * pSubpassEndInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdNextSubpass2( commandBuffer, pSubpassBeginInfo, pSubpassEndInfo ); } void vkCmdEndRenderPass2( VkCommandBuffer commandBuffer, const VkSubpassEndInfo * pSubpassEndInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdEndRenderPass2( commandBuffer, pSubpassEndInfo ); } void vkResetQueryPool( VkDevice device, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount ) const VULKAN_HPP_NOEXCEPT { return ::vkResetQueryPool( device, queryPool, firstQuery, queryCount ); } VkResult vkGetSemaphoreCounterValue( VkDevice device, VkSemaphore semaphore, uint64_t * pValue ) const VULKAN_HPP_NOEXCEPT { return ::vkGetSemaphoreCounterValue( device, semaphore, pValue ); } VkResult vkWaitSemaphores( VkDevice device, const VkSemaphoreWaitInfo * pWaitInfo, uint64_t timeout ) const VULKAN_HPP_NOEXCEPT { return ::vkWaitSemaphores( device, pWaitInfo, timeout ); } VkResult vkSignalSemaphore( VkDevice device, const VkSemaphoreSignalInfo * pSignalInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkSignalSemaphore( device, pSignalInfo ); } VkDeviceAddress vkGetBufferDeviceAddress( VkDevice device, const VkBufferDeviceAddressInfo * pInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkGetBufferDeviceAddress( device, pInfo ); } uint64_t vkGetBufferOpaqueCaptureAddress( VkDevice device, const VkBufferDeviceAddressInfo * pInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkGetBufferOpaqueCaptureAddress( device, pInfo ); } uint64_t vkGetDeviceMemoryOpaqueCaptureAddress( VkDevice device, const VkDeviceMemoryOpaqueCaptureAddressInfo * pInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkGetDeviceMemoryOpaqueCaptureAddress( device, pInfo ); } //=== VK_VERSION_1_3 === VkResult vkGetPhysicalDeviceToolProperties( VkPhysicalDevice physicalDevice, uint32_t * pToolCount, VkPhysicalDeviceToolProperties * pToolProperties ) const VULKAN_HPP_NOEXCEPT { return ::vkGetPhysicalDeviceToolProperties( physicalDevice, pToolCount, pToolProperties ); } VkResult vkCreatePrivateDataSlot( VkDevice device, const VkPrivateDataSlotCreateInfo * pCreateInfo, const VkAllocationCallbacks * pAllocator, VkPrivateDataSlot * pPrivateDataSlot ) const VULKAN_HPP_NOEXCEPT { return ::vkCreatePrivateDataSlot( device, pCreateInfo, pAllocator, pPrivateDataSlot ); } void vkDestroyPrivateDataSlot( VkDevice device, VkPrivateDataSlot privateDataSlot, const VkAllocationCallbacks * pAllocator ) const VULKAN_HPP_NOEXCEPT { return ::vkDestroyPrivateDataSlot( device, privateDataSlot, pAllocator ); } VkResult vkSetPrivateData( VkDevice device, VkObjectType objectType, uint64_t objectHandle, VkPrivateDataSlot privateDataSlot, uint64_t data ) const VULKAN_HPP_NOEXCEPT { return ::vkSetPrivateData( device, objectType, objectHandle, privateDataSlot, data ); } void vkGetPrivateData( VkDevice device, VkObjectType objectType, uint64_t objectHandle, VkPrivateDataSlot privateDataSlot, uint64_t * pData ) const VULKAN_HPP_NOEXCEPT { return ::vkGetPrivateData( device, objectType, objectHandle, privateDataSlot, pData ); } void vkCmdSetEvent2( VkCommandBuffer commandBuffer, VkEvent event, const VkDependencyInfo * pDependencyInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetEvent2( commandBuffer, event, pDependencyInfo ); } void vkCmdResetEvent2( VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags2 stageMask ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdResetEvent2( commandBuffer, event, stageMask ); } void vkCmdWaitEvents2( VkCommandBuffer commandBuffer, uint32_t eventCount, const VkEvent * pEvents, const VkDependencyInfo * pDependencyInfos ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdWaitEvents2( commandBuffer, eventCount, pEvents, pDependencyInfos ); } void vkCmdPipelineBarrier2( VkCommandBuffer commandBuffer, const VkDependencyInfo * pDependencyInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdPipelineBarrier2( commandBuffer, pDependencyInfo ); } void vkCmdWriteTimestamp2( VkCommandBuffer commandBuffer, VkPipelineStageFlags2 stage, VkQueryPool queryPool, uint32_t query ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdWriteTimestamp2( commandBuffer, stage, queryPool, query ); } VkResult vkQueueSubmit2( VkQueue queue, uint32_t submitCount, const VkSubmitInfo2 * pSubmits, VkFence fence ) const VULKAN_HPP_NOEXCEPT { return ::vkQueueSubmit2( queue, submitCount, pSubmits, fence ); } void vkCmdCopyBuffer2( VkCommandBuffer commandBuffer, const VkCopyBufferInfo2 * pCopyBufferInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdCopyBuffer2( commandBuffer, pCopyBufferInfo ); } void vkCmdCopyImage2( VkCommandBuffer commandBuffer, const VkCopyImageInfo2 * pCopyImageInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdCopyImage2( commandBuffer, pCopyImageInfo ); } void vkCmdCopyBufferToImage2( VkCommandBuffer commandBuffer, const VkCopyBufferToImageInfo2 * pCopyBufferToImageInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdCopyBufferToImage2( commandBuffer, pCopyBufferToImageInfo ); } void vkCmdCopyImageToBuffer2( VkCommandBuffer commandBuffer, const VkCopyImageToBufferInfo2 * pCopyImageToBufferInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdCopyImageToBuffer2( commandBuffer, pCopyImageToBufferInfo ); } void vkCmdBlitImage2( VkCommandBuffer commandBuffer, const VkBlitImageInfo2 * pBlitImageInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdBlitImage2( commandBuffer, pBlitImageInfo ); } void vkCmdResolveImage2( VkCommandBuffer commandBuffer, const VkResolveImageInfo2 * pResolveImageInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdResolveImage2( commandBuffer, pResolveImageInfo ); } void vkCmdBeginRendering( VkCommandBuffer commandBuffer, const VkRenderingInfo * pRenderingInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdBeginRendering( commandBuffer, pRenderingInfo ); } void vkCmdEndRendering( VkCommandBuffer commandBuffer ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdEndRendering( commandBuffer ); } void vkCmdSetCullMode( VkCommandBuffer commandBuffer, VkCullModeFlags cullMode ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetCullMode( commandBuffer, cullMode ); } void vkCmdSetFrontFace( VkCommandBuffer commandBuffer, VkFrontFace frontFace ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetFrontFace( commandBuffer, frontFace ); } void vkCmdSetPrimitiveTopology( VkCommandBuffer commandBuffer, VkPrimitiveTopology primitiveTopology ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetPrimitiveTopology( commandBuffer, primitiveTopology ); } void vkCmdSetViewportWithCount( VkCommandBuffer commandBuffer, uint32_t viewportCount, const VkViewport * pViewports ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetViewportWithCount( commandBuffer, viewportCount, pViewports ); } void vkCmdSetScissorWithCount( VkCommandBuffer commandBuffer, uint32_t scissorCount, const VkRect2D * pScissors ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetScissorWithCount( commandBuffer, scissorCount, pScissors ); } void vkCmdBindVertexBuffers2( VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, const VkBuffer * pBuffers, const VkDeviceSize * pOffsets, const VkDeviceSize * pSizes, const VkDeviceSize * pStrides ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdBindVertexBuffers2( commandBuffer, firstBinding, bindingCount, pBuffers, pOffsets, pSizes, pStrides ); } void vkCmdSetDepthTestEnable( VkCommandBuffer commandBuffer, VkBool32 depthTestEnable ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetDepthTestEnable( commandBuffer, depthTestEnable ); } void vkCmdSetDepthWriteEnable( VkCommandBuffer commandBuffer, VkBool32 depthWriteEnable ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetDepthWriteEnable( commandBuffer, depthWriteEnable ); } void vkCmdSetDepthCompareOp( VkCommandBuffer commandBuffer, VkCompareOp depthCompareOp ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetDepthCompareOp( commandBuffer, depthCompareOp ); } void vkCmdSetDepthBoundsTestEnable( VkCommandBuffer commandBuffer, VkBool32 depthBoundsTestEnable ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetDepthBoundsTestEnable( commandBuffer, depthBoundsTestEnable ); } void vkCmdSetStencilTestEnable( VkCommandBuffer commandBuffer, VkBool32 stencilTestEnable ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetStencilTestEnable( commandBuffer, stencilTestEnable ); } void vkCmdSetStencilOp( VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, VkStencilOp failOp, VkStencilOp passOp, VkStencilOp depthFailOp, VkCompareOp compareOp ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetStencilOp( commandBuffer, faceMask, failOp, passOp, depthFailOp, compareOp ); } void vkCmdSetRasterizerDiscardEnable( VkCommandBuffer commandBuffer, VkBool32 rasterizerDiscardEnable ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetRasterizerDiscardEnable( commandBuffer, rasterizerDiscardEnable ); } void vkCmdSetDepthBiasEnable( VkCommandBuffer commandBuffer, VkBool32 depthBiasEnable ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetDepthBiasEnable( commandBuffer, depthBiasEnable ); } void vkCmdSetPrimitiveRestartEnable( VkCommandBuffer commandBuffer, VkBool32 primitiveRestartEnable ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetPrimitiveRestartEnable( commandBuffer, primitiveRestartEnable ); } void vkGetDeviceBufferMemoryRequirements( VkDevice device, const VkDeviceBufferMemoryRequirements * pInfo, VkMemoryRequirements2 * pMemoryRequirements ) const VULKAN_HPP_NOEXCEPT { return ::vkGetDeviceBufferMemoryRequirements( device, pInfo, pMemoryRequirements ); } void vkGetDeviceImageMemoryRequirements( VkDevice device, const VkDeviceImageMemoryRequirements * pInfo, VkMemoryRequirements2 * pMemoryRequirements ) const VULKAN_HPP_NOEXCEPT { return ::vkGetDeviceImageMemoryRequirements( device, pInfo, pMemoryRequirements ); } void vkGetDeviceImageSparseMemoryRequirements( VkDevice device, const VkDeviceImageMemoryRequirements * pInfo, uint32_t * pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements2 * pSparseMemoryRequirements ) const VULKAN_HPP_NOEXCEPT { return ::vkGetDeviceImageSparseMemoryRequirements( device, pInfo, pSparseMemoryRequirementCount, pSparseMemoryRequirements ); } //=== VK_VERSION_1_4 === void vkCmdSetLineStipple( VkCommandBuffer commandBuffer, uint32_t lineStippleFactor, uint16_t lineStipplePattern ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetLineStipple( commandBuffer, lineStippleFactor, lineStipplePattern ); } VkResult vkMapMemory2( VkDevice device, const VkMemoryMapInfo * pMemoryMapInfo, void ** ppData ) const VULKAN_HPP_NOEXCEPT { return ::vkMapMemory2( device, pMemoryMapInfo, ppData ); } VkResult vkUnmapMemory2( VkDevice device, const VkMemoryUnmapInfo * pMemoryUnmapInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkUnmapMemory2( device, pMemoryUnmapInfo ); } void vkCmdBindIndexBuffer2( VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkDeviceSize size, VkIndexType indexType ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdBindIndexBuffer2( commandBuffer, buffer, offset, size, indexType ); } void vkGetRenderingAreaGranularity( VkDevice device, const VkRenderingAreaInfo * pRenderingAreaInfo, VkExtent2D * pGranularity ) const VULKAN_HPP_NOEXCEPT { return ::vkGetRenderingAreaGranularity( device, pRenderingAreaInfo, pGranularity ); } void vkGetDeviceImageSubresourceLayout( VkDevice device, const VkDeviceImageSubresourceInfo * pInfo, VkSubresourceLayout2 * pLayout ) const VULKAN_HPP_NOEXCEPT { return ::vkGetDeviceImageSubresourceLayout( device, pInfo, pLayout ); } void vkGetImageSubresourceLayout2( VkDevice device, VkImage image, const VkImageSubresource2 * pSubresource, VkSubresourceLayout2 * pLayout ) const VULKAN_HPP_NOEXCEPT { return ::vkGetImageSubresourceLayout2( device, image, pSubresource, pLayout ); } void vkCmdPushDescriptorSet( VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, uint32_t set, uint32_t descriptorWriteCount, const VkWriteDescriptorSet * pDescriptorWrites ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdPushDescriptorSet( commandBuffer, pipelineBindPoint, layout, set, descriptorWriteCount, pDescriptorWrites ); } void vkCmdPushDescriptorSetWithTemplate( VkCommandBuffer commandBuffer, VkDescriptorUpdateTemplate descriptorUpdateTemplate, VkPipelineLayout layout, uint32_t set, const void * pData ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdPushDescriptorSetWithTemplate( commandBuffer, descriptorUpdateTemplate, layout, set, pData ); } void vkCmdSetRenderingAttachmentLocations( VkCommandBuffer commandBuffer, const VkRenderingAttachmentLocationInfo * pLocationInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetRenderingAttachmentLocations( commandBuffer, pLocationInfo ); } void vkCmdSetRenderingInputAttachmentIndices( VkCommandBuffer commandBuffer, const VkRenderingInputAttachmentIndexInfo * pInputAttachmentIndexInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetRenderingInputAttachmentIndices( commandBuffer, pInputAttachmentIndexInfo ); } void vkCmdBindDescriptorSets2( VkCommandBuffer commandBuffer, const VkBindDescriptorSetsInfo * pBindDescriptorSetsInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdBindDescriptorSets2( commandBuffer, pBindDescriptorSetsInfo ); } void vkCmdPushConstants2( VkCommandBuffer commandBuffer, const VkPushConstantsInfo * pPushConstantsInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdPushConstants2( commandBuffer, pPushConstantsInfo ); } void vkCmdPushDescriptorSet2( VkCommandBuffer commandBuffer, const VkPushDescriptorSetInfo * pPushDescriptorSetInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdPushDescriptorSet2( commandBuffer, pPushDescriptorSetInfo ); } void vkCmdPushDescriptorSetWithTemplate2( VkCommandBuffer commandBuffer, const VkPushDescriptorSetWithTemplateInfo * pPushDescriptorSetWithTemplateInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdPushDescriptorSetWithTemplate2( commandBuffer, pPushDescriptorSetWithTemplateInfo ); } VkResult vkCopyMemoryToImage( VkDevice device, const VkCopyMemoryToImageInfo * pCopyMemoryToImageInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkCopyMemoryToImage( device, pCopyMemoryToImageInfo ); } VkResult vkCopyImageToMemory( VkDevice device, const VkCopyImageToMemoryInfo * pCopyImageToMemoryInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkCopyImageToMemory( device, pCopyImageToMemoryInfo ); } VkResult vkCopyImageToImage( VkDevice device, const VkCopyImageToImageInfo * pCopyImageToImageInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkCopyImageToImage( device, pCopyImageToImageInfo ); } VkResult vkTransitionImageLayout( VkDevice device, uint32_t transitionCount, const VkHostImageLayoutTransitionInfo * pTransitions ) const VULKAN_HPP_NOEXCEPT { return ::vkTransitionImageLayout( device, transitionCount, pTransitions ); } //=== VK_KHR_surface === void vkDestroySurfaceKHR( VkInstance instance, VkSurfaceKHR surface, const VkAllocationCallbacks * pAllocator ) const VULKAN_HPP_NOEXCEPT { return ::vkDestroySurfaceKHR( instance, surface, pAllocator ); } VkResult vkGetPhysicalDeviceSurfaceSupportKHR( VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, VkSurfaceKHR surface, VkBool32 * pSupported ) const VULKAN_HPP_NOEXCEPT { return ::vkGetPhysicalDeviceSurfaceSupportKHR( physicalDevice, queueFamilyIndex, surface, pSupported ); } VkResult vkGetPhysicalDeviceSurfaceCapabilitiesKHR( VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, VkSurfaceCapabilitiesKHR * pSurfaceCapabilities ) const VULKAN_HPP_NOEXCEPT { return ::vkGetPhysicalDeviceSurfaceCapabilitiesKHR( physicalDevice, surface, pSurfaceCapabilities ); } VkResult vkGetPhysicalDeviceSurfaceFormatsKHR( VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, uint32_t * pSurfaceFormatCount, VkSurfaceFormatKHR * pSurfaceFormats ) const VULKAN_HPP_NOEXCEPT { return ::vkGetPhysicalDeviceSurfaceFormatsKHR( physicalDevice, surface, pSurfaceFormatCount, pSurfaceFormats ); } VkResult vkGetPhysicalDeviceSurfacePresentModesKHR( VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, uint32_t * pPresentModeCount, VkPresentModeKHR * pPresentModes ) const VULKAN_HPP_NOEXCEPT { return ::vkGetPhysicalDeviceSurfacePresentModesKHR( physicalDevice, surface, pPresentModeCount, pPresentModes ); } //=== VK_KHR_swapchain === VkResult vkCreateSwapchainKHR( VkDevice device, const VkSwapchainCreateInfoKHR * pCreateInfo, const VkAllocationCallbacks * pAllocator, VkSwapchainKHR * pSwapchain ) const VULKAN_HPP_NOEXCEPT { return ::vkCreateSwapchainKHR( device, pCreateInfo, pAllocator, pSwapchain ); } void vkDestroySwapchainKHR( VkDevice device, VkSwapchainKHR swapchain, const VkAllocationCallbacks * pAllocator ) const VULKAN_HPP_NOEXCEPT { return ::vkDestroySwapchainKHR( device, swapchain, pAllocator ); } VkResult vkGetSwapchainImagesKHR( VkDevice device, VkSwapchainKHR swapchain, uint32_t * pSwapchainImageCount, VkImage * pSwapchainImages ) const VULKAN_HPP_NOEXCEPT { return ::vkGetSwapchainImagesKHR( device, swapchain, pSwapchainImageCount, pSwapchainImages ); } VkResult vkAcquireNextImageKHR( VkDevice device, VkSwapchainKHR swapchain, uint64_t timeout, VkSemaphore semaphore, VkFence fence, uint32_t * pImageIndex ) const VULKAN_HPP_NOEXCEPT { return ::vkAcquireNextImageKHR( device, swapchain, timeout, semaphore, fence, pImageIndex ); } VkResult vkQueuePresentKHR( VkQueue queue, const VkPresentInfoKHR * pPresentInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkQueuePresentKHR( queue, pPresentInfo ); } VkResult vkGetDeviceGroupPresentCapabilitiesKHR( VkDevice device, VkDeviceGroupPresentCapabilitiesKHR * pDeviceGroupPresentCapabilities ) const VULKAN_HPP_NOEXCEPT { return ::vkGetDeviceGroupPresentCapabilitiesKHR( device, pDeviceGroupPresentCapabilities ); } VkResult vkGetDeviceGroupSurfacePresentModesKHR( VkDevice device, VkSurfaceKHR surface, VkDeviceGroupPresentModeFlagsKHR * pModes ) const VULKAN_HPP_NOEXCEPT { return ::vkGetDeviceGroupSurfacePresentModesKHR( device, surface, pModes ); } VkResult vkGetPhysicalDevicePresentRectanglesKHR( VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, uint32_t * pRectCount, VkRect2D * pRects ) const VULKAN_HPP_NOEXCEPT { return ::vkGetPhysicalDevicePresentRectanglesKHR( physicalDevice, surface, pRectCount, pRects ); } VkResult vkAcquireNextImage2KHR( VkDevice device, const VkAcquireNextImageInfoKHR * pAcquireInfo, uint32_t * pImageIndex ) const VULKAN_HPP_NOEXCEPT { return ::vkAcquireNextImage2KHR( device, pAcquireInfo, pImageIndex ); } //=== VK_KHR_display === VkResult vkGetPhysicalDeviceDisplayPropertiesKHR( VkPhysicalDevice physicalDevice, uint32_t * pPropertyCount, VkDisplayPropertiesKHR * pProperties ) const VULKAN_HPP_NOEXCEPT { return ::vkGetPhysicalDeviceDisplayPropertiesKHR( physicalDevice, pPropertyCount, pProperties ); } VkResult vkGetPhysicalDeviceDisplayPlanePropertiesKHR( VkPhysicalDevice physicalDevice, uint32_t * pPropertyCount, VkDisplayPlanePropertiesKHR * pProperties ) const VULKAN_HPP_NOEXCEPT { return ::vkGetPhysicalDeviceDisplayPlanePropertiesKHR( physicalDevice, pPropertyCount, pProperties ); } VkResult vkGetDisplayPlaneSupportedDisplaysKHR( VkPhysicalDevice physicalDevice, uint32_t planeIndex, uint32_t * pDisplayCount, VkDisplayKHR * pDisplays ) const VULKAN_HPP_NOEXCEPT { return ::vkGetDisplayPlaneSupportedDisplaysKHR( physicalDevice, planeIndex, pDisplayCount, pDisplays ); } VkResult vkGetDisplayModePropertiesKHR( VkPhysicalDevice physicalDevice, VkDisplayKHR display, uint32_t * pPropertyCount, VkDisplayModePropertiesKHR * pProperties ) const VULKAN_HPP_NOEXCEPT { return ::vkGetDisplayModePropertiesKHR( physicalDevice, display, pPropertyCount, pProperties ); } VkResult vkCreateDisplayModeKHR( VkPhysicalDevice physicalDevice, VkDisplayKHR display, const VkDisplayModeCreateInfoKHR * pCreateInfo, const VkAllocationCallbacks * pAllocator, VkDisplayModeKHR * pMode ) const VULKAN_HPP_NOEXCEPT { return ::vkCreateDisplayModeKHR( physicalDevice, display, pCreateInfo, pAllocator, pMode ); } VkResult vkGetDisplayPlaneCapabilitiesKHR( VkPhysicalDevice physicalDevice, VkDisplayModeKHR mode, uint32_t planeIndex, VkDisplayPlaneCapabilitiesKHR * pCapabilities ) const VULKAN_HPP_NOEXCEPT { return ::vkGetDisplayPlaneCapabilitiesKHR( physicalDevice, mode, planeIndex, pCapabilities ); } VkResult vkCreateDisplayPlaneSurfaceKHR( VkInstance instance, const VkDisplaySurfaceCreateInfoKHR * pCreateInfo, const VkAllocationCallbacks * pAllocator, VkSurfaceKHR * pSurface ) const VULKAN_HPP_NOEXCEPT { return ::vkCreateDisplayPlaneSurfaceKHR( instance, pCreateInfo, pAllocator, pSurface ); } //=== VK_KHR_display_swapchain === VkResult vkCreateSharedSwapchainsKHR( VkDevice device, uint32_t swapchainCount, const VkSwapchainCreateInfoKHR * pCreateInfos, const VkAllocationCallbacks * pAllocator, VkSwapchainKHR * pSwapchains ) const VULKAN_HPP_NOEXCEPT { return ::vkCreateSharedSwapchainsKHR( device, swapchainCount, pCreateInfos, pAllocator, pSwapchains ); } # if defined( VK_USE_PLATFORM_XLIB_KHR ) //=== VK_KHR_xlib_surface === VkResult vkCreateXlibSurfaceKHR( VkInstance instance, const VkXlibSurfaceCreateInfoKHR * pCreateInfo, const VkAllocationCallbacks * pAllocator, VkSurfaceKHR * pSurface ) const VULKAN_HPP_NOEXCEPT { return ::vkCreateXlibSurfaceKHR( instance, pCreateInfo, pAllocator, pSurface ); } VkBool32 vkGetPhysicalDeviceXlibPresentationSupportKHR( VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, Display * dpy, VisualID visualID ) const VULKAN_HPP_NOEXCEPT { return ::vkGetPhysicalDeviceXlibPresentationSupportKHR( physicalDevice, queueFamilyIndex, dpy, visualID ); } # endif /*VK_USE_PLATFORM_XLIB_KHR*/ # if defined( VK_USE_PLATFORM_XCB_KHR ) //=== VK_KHR_xcb_surface === VkResult vkCreateXcbSurfaceKHR( VkInstance instance, const VkXcbSurfaceCreateInfoKHR * pCreateInfo, const VkAllocationCallbacks * pAllocator, VkSurfaceKHR * pSurface ) const VULKAN_HPP_NOEXCEPT { return ::vkCreateXcbSurfaceKHR( instance, pCreateInfo, pAllocator, pSurface ); } VkBool32 vkGetPhysicalDeviceXcbPresentationSupportKHR( VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, xcb_connection_t * connection, xcb_visualid_t visual_id ) const VULKAN_HPP_NOEXCEPT { return ::vkGetPhysicalDeviceXcbPresentationSupportKHR( physicalDevice, queueFamilyIndex, connection, visual_id ); } # endif /*VK_USE_PLATFORM_XCB_KHR*/ # if defined( VK_USE_PLATFORM_WAYLAND_KHR ) //=== VK_KHR_wayland_surface === VkResult vkCreateWaylandSurfaceKHR( VkInstance instance, const VkWaylandSurfaceCreateInfoKHR * pCreateInfo, const VkAllocationCallbacks * pAllocator, VkSurfaceKHR * pSurface ) const VULKAN_HPP_NOEXCEPT { return ::vkCreateWaylandSurfaceKHR( instance, pCreateInfo, pAllocator, pSurface ); } VkBool32 vkGetPhysicalDeviceWaylandPresentationSupportKHR( VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, struct wl_display * display ) const VULKAN_HPP_NOEXCEPT { return ::vkGetPhysicalDeviceWaylandPresentationSupportKHR( physicalDevice, queueFamilyIndex, display ); } # endif /*VK_USE_PLATFORM_WAYLAND_KHR*/ # if defined( VK_USE_PLATFORM_ANDROID_KHR ) //=== VK_KHR_android_surface === VkResult vkCreateAndroidSurfaceKHR( VkInstance instance, const VkAndroidSurfaceCreateInfoKHR * pCreateInfo, const VkAllocationCallbacks * pAllocator, VkSurfaceKHR * pSurface ) const VULKAN_HPP_NOEXCEPT { return ::vkCreateAndroidSurfaceKHR( instance, pCreateInfo, pAllocator, pSurface ); } # endif /*VK_USE_PLATFORM_ANDROID_KHR*/ # if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_KHR_win32_surface === VkResult vkCreateWin32SurfaceKHR( VkInstance instance, const VkWin32SurfaceCreateInfoKHR * pCreateInfo, const VkAllocationCallbacks * pAllocator, VkSurfaceKHR * pSurface ) const VULKAN_HPP_NOEXCEPT { return ::vkCreateWin32SurfaceKHR( instance, pCreateInfo, pAllocator, pSurface ); } VkBool32 vkGetPhysicalDeviceWin32PresentationSupportKHR( VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex ) const VULKAN_HPP_NOEXCEPT { return ::vkGetPhysicalDeviceWin32PresentationSupportKHR( physicalDevice, queueFamilyIndex ); } # endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_EXT_debug_report === VkResult vkCreateDebugReportCallbackEXT( VkInstance instance, const VkDebugReportCallbackCreateInfoEXT * pCreateInfo, const VkAllocationCallbacks * pAllocator, VkDebugReportCallbackEXT * pCallback ) const VULKAN_HPP_NOEXCEPT { return ::vkCreateDebugReportCallbackEXT( instance, pCreateInfo, pAllocator, pCallback ); } void vkDestroyDebugReportCallbackEXT( VkInstance instance, VkDebugReportCallbackEXT callback, const VkAllocationCallbacks * pAllocator ) const VULKAN_HPP_NOEXCEPT { return ::vkDestroyDebugReportCallbackEXT( instance, callback, pAllocator ); } void vkDebugReportMessageEXT( VkInstance instance, VkDebugReportFlagsEXT flags, VkDebugReportObjectTypeEXT objectType, uint64_t object, size_t location, int32_t messageCode, const char * pLayerPrefix, const char * pMessage ) const VULKAN_HPP_NOEXCEPT { return ::vkDebugReportMessageEXT( instance, flags, objectType, object, location, messageCode, pLayerPrefix, pMessage ); } //=== VK_EXT_debug_marker === VkResult vkDebugMarkerSetObjectTagEXT( VkDevice device, const VkDebugMarkerObjectTagInfoEXT * pTagInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkDebugMarkerSetObjectTagEXT( device, pTagInfo ); } VkResult vkDebugMarkerSetObjectNameEXT( VkDevice device, const VkDebugMarkerObjectNameInfoEXT * pNameInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkDebugMarkerSetObjectNameEXT( device, pNameInfo ); } void vkCmdDebugMarkerBeginEXT( VkCommandBuffer commandBuffer, const VkDebugMarkerMarkerInfoEXT * pMarkerInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdDebugMarkerBeginEXT( commandBuffer, pMarkerInfo ); } void vkCmdDebugMarkerEndEXT( VkCommandBuffer commandBuffer ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdDebugMarkerEndEXT( commandBuffer ); } void vkCmdDebugMarkerInsertEXT( VkCommandBuffer commandBuffer, const VkDebugMarkerMarkerInfoEXT * pMarkerInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdDebugMarkerInsertEXT( commandBuffer, pMarkerInfo ); } //=== VK_KHR_video_queue === VkResult vkGetPhysicalDeviceVideoCapabilitiesKHR( VkPhysicalDevice physicalDevice, const VkVideoProfileInfoKHR * pVideoProfile, VkVideoCapabilitiesKHR * pCapabilities ) const VULKAN_HPP_NOEXCEPT { return ::vkGetPhysicalDeviceVideoCapabilitiesKHR( physicalDevice, pVideoProfile, pCapabilities ); } VkResult vkGetPhysicalDeviceVideoFormatPropertiesKHR( VkPhysicalDevice physicalDevice, const VkPhysicalDeviceVideoFormatInfoKHR * pVideoFormatInfo, uint32_t * pVideoFormatPropertyCount, VkVideoFormatPropertiesKHR * pVideoFormatProperties ) const VULKAN_HPP_NOEXCEPT { return ::vkGetPhysicalDeviceVideoFormatPropertiesKHR( physicalDevice, pVideoFormatInfo, pVideoFormatPropertyCount, pVideoFormatProperties ); } VkResult vkCreateVideoSessionKHR( VkDevice device, const VkVideoSessionCreateInfoKHR * pCreateInfo, const VkAllocationCallbacks * pAllocator, VkVideoSessionKHR * pVideoSession ) const VULKAN_HPP_NOEXCEPT { return ::vkCreateVideoSessionKHR( device, pCreateInfo, pAllocator, pVideoSession ); } void vkDestroyVideoSessionKHR( VkDevice device, VkVideoSessionKHR videoSession, const VkAllocationCallbacks * pAllocator ) const VULKAN_HPP_NOEXCEPT { return ::vkDestroyVideoSessionKHR( device, videoSession, pAllocator ); } VkResult vkGetVideoSessionMemoryRequirementsKHR( VkDevice device, VkVideoSessionKHR videoSession, uint32_t * pMemoryRequirementsCount, VkVideoSessionMemoryRequirementsKHR * pMemoryRequirements ) const VULKAN_HPP_NOEXCEPT { return ::vkGetVideoSessionMemoryRequirementsKHR( device, videoSession, pMemoryRequirementsCount, pMemoryRequirements ); } VkResult vkBindVideoSessionMemoryKHR( VkDevice device, VkVideoSessionKHR videoSession, uint32_t bindSessionMemoryInfoCount, const VkBindVideoSessionMemoryInfoKHR * pBindSessionMemoryInfos ) const VULKAN_HPP_NOEXCEPT { return ::vkBindVideoSessionMemoryKHR( device, videoSession, bindSessionMemoryInfoCount, pBindSessionMemoryInfos ); } VkResult vkCreateVideoSessionParametersKHR( VkDevice device, const VkVideoSessionParametersCreateInfoKHR * pCreateInfo, const VkAllocationCallbacks * pAllocator, VkVideoSessionParametersKHR * pVideoSessionParameters ) const VULKAN_HPP_NOEXCEPT { return ::vkCreateVideoSessionParametersKHR( device, pCreateInfo, pAllocator, pVideoSessionParameters ); } VkResult vkUpdateVideoSessionParametersKHR( VkDevice device, VkVideoSessionParametersKHR videoSessionParameters, const VkVideoSessionParametersUpdateInfoKHR * pUpdateInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkUpdateVideoSessionParametersKHR( device, videoSessionParameters, pUpdateInfo ); } void vkDestroyVideoSessionParametersKHR( VkDevice device, VkVideoSessionParametersKHR videoSessionParameters, const VkAllocationCallbacks * pAllocator ) const VULKAN_HPP_NOEXCEPT { return ::vkDestroyVideoSessionParametersKHR( device, videoSessionParameters, pAllocator ); } void vkCmdBeginVideoCodingKHR( VkCommandBuffer commandBuffer, const VkVideoBeginCodingInfoKHR * pBeginInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdBeginVideoCodingKHR( commandBuffer, pBeginInfo ); } void vkCmdEndVideoCodingKHR( VkCommandBuffer commandBuffer, const VkVideoEndCodingInfoKHR * pEndCodingInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdEndVideoCodingKHR( commandBuffer, pEndCodingInfo ); } void vkCmdControlVideoCodingKHR( VkCommandBuffer commandBuffer, const VkVideoCodingControlInfoKHR * pCodingControlInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdControlVideoCodingKHR( commandBuffer, pCodingControlInfo ); } //=== VK_KHR_video_decode_queue === void vkCmdDecodeVideoKHR( VkCommandBuffer commandBuffer, const VkVideoDecodeInfoKHR * pDecodeInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdDecodeVideoKHR( commandBuffer, pDecodeInfo ); } //=== VK_EXT_transform_feedback === void vkCmdBindTransformFeedbackBuffersEXT( VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, const VkBuffer * pBuffers, const VkDeviceSize * pOffsets, const VkDeviceSize * pSizes ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdBindTransformFeedbackBuffersEXT( commandBuffer, firstBinding, bindingCount, pBuffers, pOffsets, pSizes ); } void vkCmdBeginTransformFeedbackEXT( VkCommandBuffer commandBuffer, uint32_t firstCounterBuffer, uint32_t counterBufferCount, const VkBuffer * pCounterBuffers, const VkDeviceSize * pCounterBufferOffsets ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdBeginTransformFeedbackEXT( commandBuffer, firstCounterBuffer, counterBufferCount, pCounterBuffers, pCounterBufferOffsets ); } void vkCmdEndTransformFeedbackEXT( VkCommandBuffer commandBuffer, uint32_t firstCounterBuffer, uint32_t counterBufferCount, const VkBuffer * pCounterBuffers, const VkDeviceSize * pCounterBufferOffsets ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdEndTransformFeedbackEXT( commandBuffer, firstCounterBuffer, counterBufferCount, pCounterBuffers, pCounterBufferOffsets ); } void vkCmdBeginQueryIndexedEXT( VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, VkQueryControlFlags flags, uint32_t index ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdBeginQueryIndexedEXT( commandBuffer, queryPool, query, flags, index ); } void vkCmdEndQueryIndexedEXT( VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, uint32_t index ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdEndQueryIndexedEXT( commandBuffer, queryPool, query, index ); } void vkCmdDrawIndirectByteCountEXT( VkCommandBuffer commandBuffer, uint32_t instanceCount, uint32_t firstInstance, VkBuffer counterBuffer, VkDeviceSize counterBufferOffset, uint32_t counterOffset, uint32_t vertexStride ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdDrawIndirectByteCountEXT( commandBuffer, instanceCount, firstInstance, counterBuffer, counterBufferOffset, counterOffset, vertexStride ); } //=== VK_NVX_binary_import === VkResult vkCreateCuModuleNVX( VkDevice device, const VkCuModuleCreateInfoNVX * pCreateInfo, const VkAllocationCallbacks * pAllocator, VkCuModuleNVX * pModule ) const VULKAN_HPP_NOEXCEPT { return ::vkCreateCuModuleNVX( device, pCreateInfo, pAllocator, pModule ); } VkResult vkCreateCuFunctionNVX( VkDevice device, const VkCuFunctionCreateInfoNVX * pCreateInfo, const VkAllocationCallbacks * pAllocator, VkCuFunctionNVX * pFunction ) const VULKAN_HPP_NOEXCEPT { return ::vkCreateCuFunctionNVX( device, pCreateInfo, pAllocator, pFunction ); } void vkDestroyCuModuleNVX( VkDevice device, VkCuModuleNVX module, const VkAllocationCallbacks * pAllocator ) const VULKAN_HPP_NOEXCEPT { return ::vkDestroyCuModuleNVX( device, module, pAllocator ); } void vkDestroyCuFunctionNVX( VkDevice device, VkCuFunctionNVX function, const VkAllocationCallbacks * pAllocator ) const VULKAN_HPP_NOEXCEPT { return ::vkDestroyCuFunctionNVX( device, function, pAllocator ); } void vkCmdCuLaunchKernelNVX( VkCommandBuffer commandBuffer, const VkCuLaunchInfoNVX * pLaunchInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdCuLaunchKernelNVX( commandBuffer, pLaunchInfo ); } //=== VK_NVX_image_view_handle === uint32_t vkGetImageViewHandleNVX( VkDevice device, const VkImageViewHandleInfoNVX * pInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkGetImageViewHandleNVX( device, pInfo ); } uint64_t vkGetImageViewHandle64NVX( VkDevice device, const VkImageViewHandleInfoNVX * pInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkGetImageViewHandle64NVX( device, pInfo ); } VkResult vkGetImageViewAddressNVX( VkDevice device, VkImageView imageView, VkImageViewAddressPropertiesNVX * pProperties ) const VULKAN_HPP_NOEXCEPT { return ::vkGetImageViewAddressNVX( device, imageView, pProperties ); } //=== VK_AMD_draw_indirect_count === void vkCmdDrawIndirectCountAMD( VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdDrawIndirectCountAMD( commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride ); } void vkCmdDrawIndexedIndirectCountAMD( VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdDrawIndexedIndirectCountAMD( commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride ); } //=== VK_AMD_shader_info === VkResult vkGetShaderInfoAMD( VkDevice device, VkPipeline pipeline, VkShaderStageFlagBits shaderStage, VkShaderInfoTypeAMD infoType, size_t * pInfoSize, void * pInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkGetShaderInfoAMD( device, pipeline, shaderStage, infoType, pInfoSize, pInfo ); } //=== VK_KHR_dynamic_rendering === void vkCmdBeginRenderingKHR( VkCommandBuffer commandBuffer, const VkRenderingInfo * pRenderingInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdBeginRenderingKHR( commandBuffer, pRenderingInfo ); } void vkCmdEndRenderingKHR( VkCommandBuffer commandBuffer ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdEndRenderingKHR( commandBuffer ); } # if defined( VK_USE_PLATFORM_GGP ) //=== VK_GGP_stream_descriptor_surface === VkResult vkCreateStreamDescriptorSurfaceGGP( VkInstance instance, const VkStreamDescriptorSurfaceCreateInfoGGP * pCreateInfo, const VkAllocationCallbacks * pAllocator, VkSurfaceKHR * pSurface ) const VULKAN_HPP_NOEXCEPT { return ::vkCreateStreamDescriptorSurfaceGGP( instance, pCreateInfo, pAllocator, pSurface ); } # endif /*VK_USE_PLATFORM_GGP*/ //=== VK_NV_external_memory_capabilities === VkResult vkGetPhysicalDeviceExternalImageFormatPropertiesNV( VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkImageTiling tiling, VkImageUsageFlags usage, VkImageCreateFlags flags, VkExternalMemoryHandleTypeFlagsNV externalHandleType, VkExternalImageFormatPropertiesNV * pExternalImageFormatProperties ) const VULKAN_HPP_NOEXCEPT { return ::vkGetPhysicalDeviceExternalImageFormatPropertiesNV( physicalDevice, format, type, tiling, usage, flags, externalHandleType, pExternalImageFormatProperties ); } # if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_NV_external_memory_win32 === VkResult vkGetMemoryWin32HandleNV( VkDevice device, VkDeviceMemory memory, VkExternalMemoryHandleTypeFlagsNV handleType, HANDLE * pHandle ) const VULKAN_HPP_NOEXCEPT { return ::vkGetMemoryWin32HandleNV( device, memory, handleType, pHandle ); } # endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_KHR_get_physical_device_properties2 === void vkGetPhysicalDeviceFeatures2KHR( VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures2 * pFeatures ) const VULKAN_HPP_NOEXCEPT { return ::vkGetPhysicalDeviceFeatures2KHR( physicalDevice, pFeatures ); } void vkGetPhysicalDeviceProperties2KHR( VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties2 * pProperties ) const VULKAN_HPP_NOEXCEPT { return ::vkGetPhysicalDeviceProperties2KHR( physicalDevice, pProperties ); } void vkGetPhysicalDeviceFormatProperties2KHR( VkPhysicalDevice physicalDevice, VkFormat format, VkFormatProperties2 * pFormatProperties ) const VULKAN_HPP_NOEXCEPT { return ::vkGetPhysicalDeviceFormatProperties2KHR( physicalDevice, format, pFormatProperties ); } VkResult vkGetPhysicalDeviceImageFormatProperties2KHR( VkPhysicalDevice physicalDevice, const VkPhysicalDeviceImageFormatInfo2 * pImageFormatInfo, VkImageFormatProperties2 * pImageFormatProperties ) const VULKAN_HPP_NOEXCEPT { return ::vkGetPhysicalDeviceImageFormatProperties2KHR( physicalDevice, pImageFormatInfo, pImageFormatProperties ); } void vkGetPhysicalDeviceQueueFamilyProperties2KHR( VkPhysicalDevice physicalDevice, uint32_t * pQueueFamilyPropertyCount, VkQueueFamilyProperties2 * pQueueFamilyProperties ) const VULKAN_HPP_NOEXCEPT { return ::vkGetPhysicalDeviceQueueFamilyProperties2KHR( physicalDevice, pQueueFamilyPropertyCount, pQueueFamilyProperties ); } void vkGetPhysicalDeviceMemoryProperties2KHR( VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties2 * pMemoryProperties ) const VULKAN_HPP_NOEXCEPT { return ::vkGetPhysicalDeviceMemoryProperties2KHR( physicalDevice, pMemoryProperties ); } void vkGetPhysicalDeviceSparseImageFormatProperties2KHR( VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSparseImageFormatInfo2 * pFormatInfo, uint32_t * pPropertyCount, VkSparseImageFormatProperties2 * pProperties ) const VULKAN_HPP_NOEXCEPT { return ::vkGetPhysicalDeviceSparseImageFormatProperties2KHR( physicalDevice, pFormatInfo, pPropertyCount, pProperties ); } //=== VK_KHR_device_group === void vkGetDeviceGroupPeerMemoryFeaturesKHR( VkDevice device, uint32_t heapIndex, uint32_t localDeviceIndex, uint32_t remoteDeviceIndex, VkPeerMemoryFeatureFlags * pPeerMemoryFeatures ) const VULKAN_HPP_NOEXCEPT { return ::vkGetDeviceGroupPeerMemoryFeaturesKHR( device, heapIndex, localDeviceIndex, remoteDeviceIndex, pPeerMemoryFeatures ); } void vkCmdSetDeviceMaskKHR( VkCommandBuffer commandBuffer, uint32_t deviceMask ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetDeviceMaskKHR( commandBuffer, deviceMask ); } void vkCmdDispatchBaseKHR( VkCommandBuffer commandBuffer, uint32_t baseGroupX, uint32_t baseGroupY, uint32_t baseGroupZ, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdDispatchBaseKHR( commandBuffer, baseGroupX, baseGroupY, baseGroupZ, groupCountX, groupCountY, groupCountZ ); } # if defined( VK_USE_PLATFORM_VI_NN ) //=== VK_NN_vi_surface === VkResult vkCreateViSurfaceNN( VkInstance instance, const VkViSurfaceCreateInfoNN * pCreateInfo, const VkAllocationCallbacks * pAllocator, VkSurfaceKHR * pSurface ) const VULKAN_HPP_NOEXCEPT { return ::vkCreateViSurfaceNN( instance, pCreateInfo, pAllocator, pSurface ); } # endif /*VK_USE_PLATFORM_VI_NN*/ //=== VK_KHR_maintenance1 === void vkTrimCommandPoolKHR( VkDevice device, VkCommandPool commandPool, VkCommandPoolTrimFlags flags ) const VULKAN_HPP_NOEXCEPT { return ::vkTrimCommandPoolKHR( device, commandPool, flags ); } //=== VK_KHR_device_group_creation === VkResult vkEnumeratePhysicalDeviceGroupsKHR( VkInstance instance, uint32_t * pPhysicalDeviceGroupCount, VkPhysicalDeviceGroupProperties * pPhysicalDeviceGroupProperties ) const VULKAN_HPP_NOEXCEPT { return ::vkEnumeratePhysicalDeviceGroupsKHR( instance, pPhysicalDeviceGroupCount, pPhysicalDeviceGroupProperties ); } //=== VK_KHR_external_memory_capabilities === void vkGetPhysicalDeviceExternalBufferPropertiesKHR( VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalBufferInfo * pExternalBufferInfo, VkExternalBufferProperties * pExternalBufferProperties ) const VULKAN_HPP_NOEXCEPT { return ::vkGetPhysicalDeviceExternalBufferPropertiesKHR( physicalDevice, pExternalBufferInfo, pExternalBufferProperties ); } # if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_KHR_external_memory_win32 === VkResult vkGetMemoryWin32HandleKHR( VkDevice device, const VkMemoryGetWin32HandleInfoKHR * pGetWin32HandleInfo, HANDLE * pHandle ) const VULKAN_HPP_NOEXCEPT { return ::vkGetMemoryWin32HandleKHR( device, pGetWin32HandleInfo, pHandle ); } VkResult vkGetMemoryWin32HandlePropertiesKHR( VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, HANDLE handle, VkMemoryWin32HandlePropertiesKHR * pMemoryWin32HandleProperties ) const VULKAN_HPP_NOEXCEPT { return ::vkGetMemoryWin32HandlePropertiesKHR( device, handleType, handle, pMemoryWin32HandleProperties ); } # endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_KHR_external_memory_fd === VkResult vkGetMemoryFdKHR( VkDevice device, const VkMemoryGetFdInfoKHR * pGetFdInfo, int * pFd ) const VULKAN_HPP_NOEXCEPT { return ::vkGetMemoryFdKHR( device, pGetFdInfo, pFd ); } VkResult vkGetMemoryFdPropertiesKHR( VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, int fd, VkMemoryFdPropertiesKHR * pMemoryFdProperties ) const VULKAN_HPP_NOEXCEPT { return ::vkGetMemoryFdPropertiesKHR( device, handleType, fd, pMemoryFdProperties ); } //=== VK_KHR_external_semaphore_capabilities === void vkGetPhysicalDeviceExternalSemaphorePropertiesKHR( VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalSemaphoreInfo * pExternalSemaphoreInfo, VkExternalSemaphoreProperties * pExternalSemaphoreProperties ) const VULKAN_HPP_NOEXCEPT { return ::vkGetPhysicalDeviceExternalSemaphorePropertiesKHR( physicalDevice, pExternalSemaphoreInfo, pExternalSemaphoreProperties ); } # if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_KHR_external_semaphore_win32 === VkResult vkImportSemaphoreWin32HandleKHR( VkDevice device, const VkImportSemaphoreWin32HandleInfoKHR * pImportSemaphoreWin32HandleInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkImportSemaphoreWin32HandleKHR( device, pImportSemaphoreWin32HandleInfo ); } VkResult vkGetSemaphoreWin32HandleKHR( VkDevice device, const VkSemaphoreGetWin32HandleInfoKHR * pGetWin32HandleInfo, HANDLE * pHandle ) const VULKAN_HPP_NOEXCEPT { return ::vkGetSemaphoreWin32HandleKHR( device, pGetWin32HandleInfo, pHandle ); } # endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_KHR_external_semaphore_fd === VkResult vkImportSemaphoreFdKHR( VkDevice device, const VkImportSemaphoreFdInfoKHR * pImportSemaphoreFdInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkImportSemaphoreFdKHR( device, pImportSemaphoreFdInfo ); } VkResult vkGetSemaphoreFdKHR( VkDevice device, const VkSemaphoreGetFdInfoKHR * pGetFdInfo, int * pFd ) const VULKAN_HPP_NOEXCEPT { return ::vkGetSemaphoreFdKHR( device, pGetFdInfo, pFd ); } //=== VK_KHR_push_descriptor === void vkCmdPushDescriptorSetKHR( VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, uint32_t set, uint32_t descriptorWriteCount, const VkWriteDescriptorSet * pDescriptorWrites ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdPushDescriptorSetKHR( commandBuffer, pipelineBindPoint, layout, set, descriptorWriteCount, pDescriptorWrites ); } void vkCmdPushDescriptorSetWithTemplateKHR( VkCommandBuffer commandBuffer, VkDescriptorUpdateTemplate descriptorUpdateTemplate, VkPipelineLayout layout, uint32_t set, const void * pData ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdPushDescriptorSetWithTemplateKHR( commandBuffer, descriptorUpdateTemplate, layout, set, pData ); } //=== VK_EXT_conditional_rendering === void vkCmdBeginConditionalRenderingEXT( VkCommandBuffer commandBuffer, const VkConditionalRenderingBeginInfoEXT * pConditionalRenderingBegin ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdBeginConditionalRenderingEXT( commandBuffer, pConditionalRenderingBegin ); } void vkCmdEndConditionalRenderingEXT( VkCommandBuffer commandBuffer ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdEndConditionalRenderingEXT( commandBuffer ); } //=== VK_KHR_descriptor_update_template === VkResult vkCreateDescriptorUpdateTemplateKHR( VkDevice device, const VkDescriptorUpdateTemplateCreateInfo * pCreateInfo, const VkAllocationCallbacks * pAllocator, VkDescriptorUpdateTemplate * pDescriptorUpdateTemplate ) const VULKAN_HPP_NOEXCEPT { return ::vkCreateDescriptorUpdateTemplateKHR( device, pCreateInfo, pAllocator, pDescriptorUpdateTemplate ); } void vkDestroyDescriptorUpdateTemplateKHR( VkDevice device, VkDescriptorUpdateTemplate descriptorUpdateTemplate, const VkAllocationCallbacks * pAllocator ) const VULKAN_HPP_NOEXCEPT { return ::vkDestroyDescriptorUpdateTemplateKHR( device, descriptorUpdateTemplate, pAllocator ); } void vkUpdateDescriptorSetWithTemplateKHR( VkDevice device, VkDescriptorSet descriptorSet, VkDescriptorUpdateTemplate descriptorUpdateTemplate, const void * pData ) const VULKAN_HPP_NOEXCEPT { return ::vkUpdateDescriptorSetWithTemplateKHR( device, descriptorSet, descriptorUpdateTemplate, pData ); } //=== VK_NV_clip_space_w_scaling === void vkCmdSetViewportWScalingNV( VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, const VkViewportWScalingNV * pViewportWScalings ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetViewportWScalingNV( commandBuffer, firstViewport, viewportCount, pViewportWScalings ); } //=== VK_EXT_direct_mode_display === VkResult vkReleaseDisplayEXT( VkPhysicalDevice physicalDevice, VkDisplayKHR display ) const VULKAN_HPP_NOEXCEPT { return ::vkReleaseDisplayEXT( physicalDevice, display ); } # if defined( VK_USE_PLATFORM_XLIB_XRANDR_EXT ) //=== VK_EXT_acquire_xlib_display === VkResult vkAcquireXlibDisplayEXT( VkPhysicalDevice physicalDevice, Display * dpy, VkDisplayKHR display ) const VULKAN_HPP_NOEXCEPT { return ::vkAcquireXlibDisplayEXT( physicalDevice, dpy, display ); } VkResult vkGetRandROutputDisplayEXT( VkPhysicalDevice physicalDevice, Display * dpy, RROutput rrOutput, VkDisplayKHR * pDisplay ) const VULKAN_HPP_NOEXCEPT { return ::vkGetRandROutputDisplayEXT( physicalDevice, dpy, rrOutput, pDisplay ); } # endif /*VK_USE_PLATFORM_XLIB_XRANDR_EXT*/ //=== VK_EXT_display_surface_counter === VkResult vkGetPhysicalDeviceSurfaceCapabilities2EXT( VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, VkSurfaceCapabilities2EXT * pSurfaceCapabilities ) const VULKAN_HPP_NOEXCEPT { return ::vkGetPhysicalDeviceSurfaceCapabilities2EXT( physicalDevice, surface, pSurfaceCapabilities ); } //=== VK_EXT_display_control === VkResult vkDisplayPowerControlEXT( VkDevice device, VkDisplayKHR display, const VkDisplayPowerInfoEXT * pDisplayPowerInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkDisplayPowerControlEXT( device, display, pDisplayPowerInfo ); } VkResult vkRegisterDeviceEventEXT( VkDevice device, const VkDeviceEventInfoEXT * pDeviceEventInfo, const VkAllocationCallbacks * pAllocator, VkFence * pFence ) const VULKAN_HPP_NOEXCEPT { return ::vkRegisterDeviceEventEXT( device, pDeviceEventInfo, pAllocator, pFence ); } VkResult vkRegisterDisplayEventEXT( VkDevice device, VkDisplayKHR display, const VkDisplayEventInfoEXT * pDisplayEventInfo, const VkAllocationCallbacks * pAllocator, VkFence * pFence ) const VULKAN_HPP_NOEXCEPT { return ::vkRegisterDisplayEventEXT( device, display, pDisplayEventInfo, pAllocator, pFence ); } VkResult vkGetSwapchainCounterEXT( VkDevice device, VkSwapchainKHR swapchain, VkSurfaceCounterFlagBitsEXT counter, uint64_t * pCounterValue ) const VULKAN_HPP_NOEXCEPT { return ::vkGetSwapchainCounterEXT( device, swapchain, counter, pCounterValue ); } //=== VK_GOOGLE_display_timing === VkResult vkGetRefreshCycleDurationGOOGLE( VkDevice device, VkSwapchainKHR swapchain, VkRefreshCycleDurationGOOGLE * pDisplayTimingProperties ) const VULKAN_HPP_NOEXCEPT { return ::vkGetRefreshCycleDurationGOOGLE( device, swapchain, pDisplayTimingProperties ); } VkResult vkGetPastPresentationTimingGOOGLE( VkDevice device, VkSwapchainKHR swapchain, uint32_t * pPresentationTimingCount, VkPastPresentationTimingGOOGLE * pPresentationTimings ) const VULKAN_HPP_NOEXCEPT { return ::vkGetPastPresentationTimingGOOGLE( device, swapchain, pPresentationTimingCount, pPresentationTimings ); } //=== VK_EXT_discard_rectangles === void vkCmdSetDiscardRectangleEXT( VkCommandBuffer commandBuffer, uint32_t firstDiscardRectangle, uint32_t discardRectangleCount, const VkRect2D * pDiscardRectangles ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetDiscardRectangleEXT( commandBuffer, firstDiscardRectangle, discardRectangleCount, pDiscardRectangles ); } void vkCmdSetDiscardRectangleEnableEXT( VkCommandBuffer commandBuffer, VkBool32 discardRectangleEnable ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetDiscardRectangleEnableEXT( commandBuffer, discardRectangleEnable ); } void vkCmdSetDiscardRectangleModeEXT( VkCommandBuffer commandBuffer, VkDiscardRectangleModeEXT discardRectangleMode ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetDiscardRectangleModeEXT( commandBuffer, discardRectangleMode ); } //=== VK_EXT_hdr_metadata === void vkSetHdrMetadataEXT( VkDevice device, uint32_t swapchainCount, const VkSwapchainKHR * pSwapchains, const VkHdrMetadataEXT * pMetadata ) const VULKAN_HPP_NOEXCEPT { return ::vkSetHdrMetadataEXT( device, swapchainCount, pSwapchains, pMetadata ); } //=== VK_KHR_create_renderpass2 === VkResult vkCreateRenderPass2KHR( VkDevice device, const VkRenderPassCreateInfo2 * pCreateInfo, const VkAllocationCallbacks * pAllocator, VkRenderPass * pRenderPass ) const VULKAN_HPP_NOEXCEPT { return ::vkCreateRenderPass2KHR( device, pCreateInfo, pAllocator, pRenderPass ); } void vkCmdBeginRenderPass2KHR( VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo * pRenderPassBegin, const VkSubpassBeginInfo * pSubpassBeginInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdBeginRenderPass2KHR( commandBuffer, pRenderPassBegin, pSubpassBeginInfo ); } void vkCmdNextSubpass2KHR( VkCommandBuffer commandBuffer, const VkSubpassBeginInfo * pSubpassBeginInfo, const VkSubpassEndInfo * pSubpassEndInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdNextSubpass2KHR( commandBuffer, pSubpassBeginInfo, pSubpassEndInfo ); } void vkCmdEndRenderPass2KHR( VkCommandBuffer commandBuffer, const VkSubpassEndInfo * pSubpassEndInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdEndRenderPass2KHR( commandBuffer, pSubpassEndInfo ); } //=== VK_KHR_shared_presentable_image === VkResult vkGetSwapchainStatusKHR( VkDevice device, VkSwapchainKHR swapchain ) const VULKAN_HPP_NOEXCEPT { return ::vkGetSwapchainStatusKHR( device, swapchain ); } //=== VK_KHR_external_fence_capabilities === void vkGetPhysicalDeviceExternalFencePropertiesKHR( VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalFenceInfo * pExternalFenceInfo, VkExternalFenceProperties * pExternalFenceProperties ) const VULKAN_HPP_NOEXCEPT { return ::vkGetPhysicalDeviceExternalFencePropertiesKHR( physicalDevice, pExternalFenceInfo, pExternalFenceProperties ); } # if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_KHR_external_fence_win32 === VkResult vkImportFenceWin32HandleKHR( VkDevice device, const VkImportFenceWin32HandleInfoKHR * pImportFenceWin32HandleInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkImportFenceWin32HandleKHR( device, pImportFenceWin32HandleInfo ); } VkResult vkGetFenceWin32HandleKHR( VkDevice device, const VkFenceGetWin32HandleInfoKHR * pGetWin32HandleInfo, HANDLE * pHandle ) const VULKAN_HPP_NOEXCEPT { return ::vkGetFenceWin32HandleKHR( device, pGetWin32HandleInfo, pHandle ); } # endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_KHR_external_fence_fd === VkResult vkImportFenceFdKHR( VkDevice device, const VkImportFenceFdInfoKHR * pImportFenceFdInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkImportFenceFdKHR( device, pImportFenceFdInfo ); } VkResult vkGetFenceFdKHR( VkDevice device, const VkFenceGetFdInfoKHR * pGetFdInfo, int * pFd ) const VULKAN_HPP_NOEXCEPT { return ::vkGetFenceFdKHR( device, pGetFdInfo, pFd ); } //=== VK_KHR_performance_query === VkResult vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR( VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, uint32_t * pCounterCount, VkPerformanceCounterKHR * pCounters, VkPerformanceCounterDescriptionKHR * pCounterDescriptions ) const VULKAN_HPP_NOEXCEPT { return ::vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR( physicalDevice, queueFamilyIndex, pCounterCount, pCounters, pCounterDescriptions ); } void vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR( VkPhysicalDevice physicalDevice, const VkQueryPoolPerformanceCreateInfoKHR * pPerformanceQueryCreateInfo, uint32_t * pNumPasses ) const VULKAN_HPP_NOEXCEPT { return ::vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR( physicalDevice, pPerformanceQueryCreateInfo, pNumPasses ); } VkResult vkAcquireProfilingLockKHR( VkDevice device, const VkAcquireProfilingLockInfoKHR * pInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkAcquireProfilingLockKHR( device, pInfo ); } void vkReleaseProfilingLockKHR( VkDevice device ) const VULKAN_HPP_NOEXCEPT { return ::vkReleaseProfilingLockKHR( device ); } //=== VK_KHR_get_surface_capabilities2 === VkResult vkGetPhysicalDeviceSurfaceCapabilities2KHR( VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSurfaceInfo2KHR * pSurfaceInfo, VkSurfaceCapabilities2KHR * pSurfaceCapabilities ) const VULKAN_HPP_NOEXCEPT { return ::vkGetPhysicalDeviceSurfaceCapabilities2KHR( physicalDevice, pSurfaceInfo, pSurfaceCapabilities ); } VkResult vkGetPhysicalDeviceSurfaceFormats2KHR( VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSurfaceInfo2KHR * pSurfaceInfo, uint32_t * pSurfaceFormatCount, VkSurfaceFormat2KHR * pSurfaceFormats ) const VULKAN_HPP_NOEXCEPT { return ::vkGetPhysicalDeviceSurfaceFormats2KHR( physicalDevice, pSurfaceInfo, pSurfaceFormatCount, pSurfaceFormats ); } //=== VK_KHR_get_display_properties2 === VkResult vkGetPhysicalDeviceDisplayProperties2KHR( VkPhysicalDevice physicalDevice, uint32_t * pPropertyCount, VkDisplayProperties2KHR * pProperties ) const VULKAN_HPP_NOEXCEPT { return ::vkGetPhysicalDeviceDisplayProperties2KHR( physicalDevice, pPropertyCount, pProperties ); } VkResult vkGetPhysicalDeviceDisplayPlaneProperties2KHR( VkPhysicalDevice physicalDevice, uint32_t * pPropertyCount, VkDisplayPlaneProperties2KHR * pProperties ) const VULKAN_HPP_NOEXCEPT { return ::vkGetPhysicalDeviceDisplayPlaneProperties2KHR( physicalDevice, pPropertyCount, pProperties ); } VkResult vkGetDisplayModeProperties2KHR( VkPhysicalDevice physicalDevice, VkDisplayKHR display, uint32_t * pPropertyCount, VkDisplayModeProperties2KHR * pProperties ) const VULKAN_HPP_NOEXCEPT { return ::vkGetDisplayModeProperties2KHR( physicalDevice, display, pPropertyCount, pProperties ); } VkResult vkGetDisplayPlaneCapabilities2KHR( VkPhysicalDevice physicalDevice, const VkDisplayPlaneInfo2KHR * pDisplayPlaneInfo, VkDisplayPlaneCapabilities2KHR * pCapabilities ) const VULKAN_HPP_NOEXCEPT { return ::vkGetDisplayPlaneCapabilities2KHR( physicalDevice, pDisplayPlaneInfo, pCapabilities ); } # if defined( VK_USE_PLATFORM_IOS_MVK ) //=== VK_MVK_ios_surface === VkResult vkCreateIOSSurfaceMVK( VkInstance instance, const VkIOSSurfaceCreateInfoMVK * pCreateInfo, const VkAllocationCallbacks * pAllocator, VkSurfaceKHR * pSurface ) const VULKAN_HPP_NOEXCEPT { return ::vkCreateIOSSurfaceMVK( instance, pCreateInfo, pAllocator, pSurface ); } # endif /*VK_USE_PLATFORM_IOS_MVK*/ # if defined( VK_USE_PLATFORM_MACOS_MVK ) //=== VK_MVK_macos_surface === VkResult vkCreateMacOSSurfaceMVK( VkInstance instance, const VkMacOSSurfaceCreateInfoMVK * pCreateInfo, const VkAllocationCallbacks * pAllocator, VkSurfaceKHR * pSurface ) const VULKAN_HPP_NOEXCEPT { return ::vkCreateMacOSSurfaceMVK( instance, pCreateInfo, pAllocator, pSurface ); } # endif /*VK_USE_PLATFORM_MACOS_MVK*/ //=== VK_EXT_debug_utils === VkResult vkSetDebugUtilsObjectNameEXT( VkDevice device, const VkDebugUtilsObjectNameInfoEXT * pNameInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkSetDebugUtilsObjectNameEXT( device, pNameInfo ); } VkResult vkSetDebugUtilsObjectTagEXT( VkDevice device, const VkDebugUtilsObjectTagInfoEXT * pTagInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkSetDebugUtilsObjectTagEXT( device, pTagInfo ); } void vkQueueBeginDebugUtilsLabelEXT( VkQueue queue, const VkDebugUtilsLabelEXT * pLabelInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkQueueBeginDebugUtilsLabelEXT( queue, pLabelInfo ); } void vkQueueEndDebugUtilsLabelEXT( VkQueue queue ) const VULKAN_HPP_NOEXCEPT { return ::vkQueueEndDebugUtilsLabelEXT( queue ); } void vkQueueInsertDebugUtilsLabelEXT( VkQueue queue, const VkDebugUtilsLabelEXT * pLabelInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkQueueInsertDebugUtilsLabelEXT( queue, pLabelInfo ); } void vkCmdBeginDebugUtilsLabelEXT( VkCommandBuffer commandBuffer, const VkDebugUtilsLabelEXT * pLabelInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdBeginDebugUtilsLabelEXT( commandBuffer, pLabelInfo ); } void vkCmdEndDebugUtilsLabelEXT( VkCommandBuffer commandBuffer ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdEndDebugUtilsLabelEXT( commandBuffer ); } void vkCmdInsertDebugUtilsLabelEXT( VkCommandBuffer commandBuffer, const VkDebugUtilsLabelEXT * pLabelInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdInsertDebugUtilsLabelEXT( commandBuffer, pLabelInfo ); } VkResult vkCreateDebugUtilsMessengerEXT( VkInstance instance, const VkDebugUtilsMessengerCreateInfoEXT * pCreateInfo, const VkAllocationCallbacks * pAllocator, VkDebugUtilsMessengerEXT * pMessenger ) const VULKAN_HPP_NOEXCEPT { return ::vkCreateDebugUtilsMessengerEXT( instance, pCreateInfo, pAllocator, pMessenger ); } void vkDestroyDebugUtilsMessengerEXT( VkInstance instance, VkDebugUtilsMessengerEXT messenger, const VkAllocationCallbacks * pAllocator ) const VULKAN_HPP_NOEXCEPT { return ::vkDestroyDebugUtilsMessengerEXT( instance, messenger, pAllocator ); } void vkSubmitDebugUtilsMessageEXT( VkInstance instance, VkDebugUtilsMessageSeverityFlagBitsEXT messageSeverity, VkDebugUtilsMessageTypeFlagsEXT messageTypes, const VkDebugUtilsMessengerCallbackDataEXT * pCallbackData ) const VULKAN_HPP_NOEXCEPT { return ::vkSubmitDebugUtilsMessageEXT( instance, messageSeverity, messageTypes, pCallbackData ); } # if defined( VK_USE_PLATFORM_ANDROID_KHR ) //=== VK_ANDROID_external_memory_android_hardware_buffer === VkResult vkGetAndroidHardwareBufferPropertiesANDROID( VkDevice device, const struct AHardwareBuffer * buffer, VkAndroidHardwareBufferPropertiesANDROID * pProperties ) const VULKAN_HPP_NOEXCEPT { return ::vkGetAndroidHardwareBufferPropertiesANDROID( device, buffer, pProperties ); } VkResult vkGetMemoryAndroidHardwareBufferANDROID( VkDevice device, const VkMemoryGetAndroidHardwareBufferInfoANDROID * pInfo, struct AHardwareBuffer ** pBuffer ) const VULKAN_HPP_NOEXCEPT { return ::vkGetMemoryAndroidHardwareBufferANDROID( device, pInfo, pBuffer ); } # endif /*VK_USE_PLATFORM_ANDROID_KHR*/ # if defined( VK_ENABLE_BETA_EXTENSIONS ) //=== VK_AMDX_shader_enqueue === VkResult vkCreateExecutionGraphPipelinesAMDX( VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkExecutionGraphPipelineCreateInfoAMDX * pCreateInfos, const VkAllocationCallbacks * pAllocator, VkPipeline * pPipelines ) const VULKAN_HPP_NOEXCEPT { return ::vkCreateExecutionGraphPipelinesAMDX( device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines ); } VkResult vkGetExecutionGraphPipelineScratchSizeAMDX( VkDevice device, VkPipeline executionGraph, VkExecutionGraphPipelineScratchSizeAMDX * pSizeInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkGetExecutionGraphPipelineScratchSizeAMDX( device, executionGraph, pSizeInfo ); } VkResult vkGetExecutionGraphPipelineNodeIndexAMDX( VkDevice device, VkPipeline executionGraph, const VkPipelineShaderStageNodeCreateInfoAMDX * pNodeInfo, uint32_t * pNodeIndex ) const VULKAN_HPP_NOEXCEPT { return ::vkGetExecutionGraphPipelineNodeIndexAMDX( device, executionGraph, pNodeInfo, pNodeIndex ); } void vkCmdInitializeGraphScratchMemoryAMDX( VkCommandBuffer commandBuffer, VkPipeline executionGraph, VkDeviceAddress scratch, VkDeviceSize scratchSize ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdInitializeGraphScratchMemoryAMDX( commandBuffer, executionGraph, scratch, scratchSize ); } void vkCmdDispatchGraphAMDX( VkCommandBuffer commandBuffer, VkDeviceAddress scratch, VkDeviceSize scratchSize, const VkDispatchGraphCountInfoAMDX * pCountInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdDispatchGraphAMDX( commandBuffer, scratch, scratchSize, pCountInfo ); } void vkCmdDispatchGraphIndirectAMDX( VkCommandBuffer commandBuffer, VkDeviceAddress scratch, VkDeviceSize scratchSize, const VkDispatchGraphCountInfoAMDX * pCountInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdDispatchGraphIndirectAMDX( commandBuffer, scratch, scratchSize, pCountInfo ); } void vkCmdDispatchGraphIndirectCountAMDX( VkCommandBuffer commandBuffer, VkDeviceAddress scratch, VkDeviceSize scratchSize, VkDeviceAddress countInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdDispatchGraphIndirectCountAMDX( commandBuffer, scratch, scratchSize, countInfo ); } # endif /*VK_ENABLE_BETA_EXTENSIONS*/ //=== VK_EXT_sample_locations === void vkCmdSetSampleLocationsEXT( VkCommandBuffer commandBuffer, const VkSampleLocationsInfoEXT * pSampleLocationsInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetSampleLocationsEXT( commandBuffer, pSampleLocationsInfo ); } void vkGetPhysicalDeviceMultisamplePropertiesEXT( VkPhysicalDevice physicalDevice, VkSampleCountFlagBits samples, VkMultisamplePropertiesEXT * pMultisampleProperties ) const VULKAN_HPP_NOEXCEPT { return ::vkGetPhysicalDeviceMultisamplePropertiesEXT( physicalDevice, samples, pMultisampleProperties ); } //=== VK_KHR_get_memory_requirements2 === void vkGetImageMemoryRequirements2KHR( VkDevice device, const VkImageMemoryRequirementsInfo2 * pInfo, VkMemoryRequirements2 * pMemoryRequirements ) const VULKAN_HPP_NOEXCEPT { return ::vkGetImageMemoryRequirements2KHR( device, pInfo, pMemoryRequirements ); } void vkGetBufferMemoryRequirements2KHR( VkDevice device, const VkBufferMemoryRequirementsInfo2 * pInfo, VkMemoryRequirements2 * pMemoryRequirements ) const VULKAN_HPP_NOEXCEPT { return ::vkGetBufferMemoryRequirements2KHR( device, pInfo, pMemoryRequirements ); } void vkGetImageSparseMemoryRequirements2KHR( VkDevice device, const VkImageSparseMemoryRequirementsInfo2 * pInfo, uint32_t * pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements2 * pSparseMemoryRequirements ) const VULKAN_HPP_NOEXCEPT { return ::vkGetImageSparseMemoryRequirements2KHR( device, pInfo, pSparseMemoryRequirementCount, pSparseMemoryRequirements ); } //=== VK_KHR_acceleration_structure === VkResult vkCreateAccelerationStructureKHR( VkDevice device, const VkAccelerationStructureCreateInfoKHR * pCreateInfo, const VkAllocationCallbacks * pAllocator, VkAccelerationStructureKHR * pAccelerationStructure ) const VULKAN_HPP_NOEXCEPT { return ::vkCreateAccelerationStructureKHR( device, pCreateInfo, pAllocator, pAccelerationStructure ); } void vkDestroyAccelerationStructureKHR( VkDevice device, VkAccelerationStructureKHR accelerationStructure, const VkAllocationCallbacks * pAllocator ) const VULKAN_HPP_NOEXCEPT { return ::vkDestroyAccelerationStructureKHR( device, accelerationStructure, pAllocator ); } void vkCmdBuildAccelerationStructuresKHR( VkCommandBuffer commandBuffer, uint32_t infoCount, const VkAccelerationStructureBuildGeometryInfoKHR * pInfos, const VkAccelerationStructureBuildRangeInfoKHR * const * ppBuildRangeInfos ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdBuildAccelerationStructuresKHR( commandBuffer, infoCount, pInfos, ppBuildRangeInfos ); } void vkCmdBuildAccelerationStructuresIndirectKHR( VkCommandBuffer commandBuffer, uint32_t infoCount, const VkAccelerationStructureBuildGeometryInfoKHR * pInfos, const VkDeviceAddress * pIndirectDeviceAddresses, const uint32_t * pIndirectStrides, const uint32_t * const * ppMaxPrimitiveCounts ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdBuildAccelerationStructuresIndirectKHR( commandBuffer, infoCount, pInfos, pIndirectDeviceAddresses, pIndirectStrides, ppMaxPrimitiveCounts ); } VkResult vkBuildAccelerationStructuresKHR( VkDevice device, VkDeferredOperationKHR deferredOperation, uint32_t infoCount, const VkAccelerationStructureBuildGeometryInfoKHR * pInfos, const VkAccelerationStructureBuildRangeInfoKHR * const * ppBuildRangeInfos ) const VULKAN_HPP_NOEXCEPT { return ::vkBuildAccelerationStructuresKHR( device, deferredOperation, infoCount, pInfos, ppBuildRangeInfos ); } VkResult vkCopyAccelerationStructureKHR( VkDevice device, VkDeferredOperationKHR deferredOperation, const VkCopyAccelerationStructureInfoKHR * pInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkCopyAccelerationStructureKHR( device, deferredOperation, pInfo ); } VkResult vkCopyAccelerationStructureToMemoryKHR( VkDevice device, VkDeferredOperationKHR deferredOperation, const VkCopyAccelerationStructureToMemoryInfoKHR * pInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkCopyAccelerationStructureToMemoryKHR( device, deferredOperation, pInfo ); } VkResult vkCopyMemoryToAccelerationStructureKHR( VkDevice device, VkDeferredOperationKHR deferredOperation, const VkCopyMemoryToAccelerationStructureInfoKHR * pInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkCopyMemoryToAccelerationStructureKHR( device, deferredOperation, pInfo ); } VkResult vkWriteAccelerationStructuresPropertiesKHR( VkDevice device, uint32_t accelerationStructureCount, const VkAccelerationStructureKHR * pAccelerationStructures, VkQueryType queryType, size_t dataSize, void * pData, size_t stride ) const VULKAN_HPP_NOEXCEPT { return ::vkWriteAccelerationStructuresPropertiesKHR( device, accelerationStructureCount, pAccelerationStructures, queryType, dataSize, pData, stride ); } void vkCmdCopyAccelerationStructureKHR( VkCommandBuffer commandBuffer, const VkCopyAccelerationStructureInfoKHR * pInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdCopyAccelerationStructureKHR( commandBuffer, pInfo ); } void vkCmdCopyAccelerationStructureToMemoryKHR( VkCommandBuffer commandBuffer, const VkCopyAccelerationStructureToMemoryInfoKHR * pInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdCopyAccelerationStructureToMemoryKHR( commandBuffer, pInfo ); } void vkCmdCopyMemoryToAccelerationStructureKHR( VkCommandBuffer commandBuffer, const VkCopyMemoryToAccelerationStructureInfoKHR * pInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdCopyMemoryToAccelerationStructureKHR( commandBuffer, pInfo ); } VkDeviceAddress vkGetAccelerationStructureDeviceAddressKHR( VkDevice device, const VkAccelerationStructureDeviceAddressInfoKHR * pInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkGetAccelerationStructureDeviceAddressKHR( device, pInfo ); } void vkCmdWriteAccelerationStructuresPropertiesKHR( VkCommandBuffer commandBuffer, uint32_t accelerationStructureCount, const VkAccelerationStructureKHR * pAccelerationStructures, VkQueryType queryType, VkQueryPool queryPool, uint32_t firstQuery ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdWriteAccelerationStructuresPropertiesKHR( commandBuffer, accelerationStructureCount, pAccelerationStructures, queryType, queryPool, firstQuery ); } void vkGetDeviceAccelerationStructureCompatibilityKHR( VkDevice device, const VkAccelerationStructureVersionInfoKHR * pVersionInfo, VkAccelerationStructureCompatibilityKHR * pCompatibility ) const VULKAN_HPP_NOEXCEPT { return ::vkGetDeviceAccelerationStructureCompatibilityKHR( device, pVersionInfo, pCompatibility ); } void vkGetAccelerationStructureBuildSizesKHR( VkDevice device, VkAccelerationStructureBuildTypeKHR buildType, const VkAccelerationStructureBuildGeometryInfoKHR * pBuildInfo, const uint32_t * pMaxPrimitiveCounts, VkAccelerationStructureBuildSizesInfoKHR * pSizeInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkGetAccelerationStructureBuildSizesKHR( device, buildType, pBuildInfo, pMaxPrimitiveCounts, pSizeInfo ); } //=== VK_KHR_ray_tracing_pipeline === void vkCmdTraceRaysKHR( VkCommandBuffer commandBuffer, const VkStridedDeviceAddressRegionKHR * pRaygenShaderBindingTable, const VkStridedDeviceAddressRegionKHR * pMissShaderBindingTable, const VkStridedDeviceAddressRegionKHR * pHitShaderBindingTable, const VkStridedDeviceAddressRegionKHR * pCallableShaderBindingTable, uint32_t width, uint32_t height, uint32_t depth ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdTraceRaysKHR( commandBuffer, pRaygenShaderBindingTable, pMissShaderBindingTable, pHitShaderBindingTable, pCallableShaderBindingTable, width, height, depth ); } VkResult vkCreateRayTracingPipelinesKHR( VkDevice device, VkDeferredOperationKHR deferredOperation, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkRayTracingPipelineCreateInfoKHR * pCreateInfos, const VkAllocationCallbacks * pAllocator, VkPipeline * pPipelines ) const VULKAN_HPP_NOEXCEPT { return ::vkCreateRayTracingPipelinesKHR( device, deferredOperation, pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines ); } VkResult vkGetRayTracingShaderGroupHandlesKHR( VkDevice device, VkPipeline pipeline, uint32_t firstGroup, uint32_t groupCount, size_t dataSize, void * pData ) const VULKAN_HPP_NOEXCEPT { return ::vkGetRayTracingShaderGroupHandlesKHR( device, pipeline, firstGroup, groupCount, dataSize, pData ); } VkResult vkGetRayTracingCaptureReplayShaderGroupHandlesKHR( VkDevice device, VkPipeline pipeline, uint32_t firstGroup, uint32_t groupCount, size_t dataSize, void * pData ) const VULKAN_HPP_NOEXCEPT { return ::vkGetRayTracingCaptureReplayShaderGroupHandlesKHR( device, pipeline, firstGroup, groupCount, dataSize, pData ); } void vkCmdTraceRaysIndirectKHR( VkCommandBuffer commandBuffer, const VkStridedDeviceAddressRegionKHR * pRaygenShaderBindingTable, const VkStridedDeviceAddressRegionKHR * pMissShaderBindingTable, const VkStridedDeviceAddressRegionKHR * pHitShaderBindingTable, const VkStridedDeviceAddressRegionKHR * pCallableShaderBindingTable, VkDeviceAddress indirectDeviceAddress ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdTraceRaysIndirectKHR( commandBuffer, pRaygenShaderBindingTable, pMissShaderBindingTable, pHitShaderBindingTable, pCallableShaderBindingTable, indirectDeviceAddress ); } VkDeviceSize vkGetRayTracingShaderGroupStackSizeKHR( VkDevice device, VkPipeline pipeline, uint32_t group, VkShaderGroupShaderKHR groupShader ) const VULKAN_HPP_NOEXCEPT { return ::vkGetRayTracingShaderGroupStackSizeKHR( device, pipeline, group, groupShader ); } void vkCmdSetRayTracingPipelineStackSizeKHR( VkCommandBuffer commandBuffer, uint32_t pipelineStackSize ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetRayTracingPipelineStackSizeKHR( commandBuffer, pipelineStackSize ); } //=== VK_KHR_sampler_ycbcr_conversion === VkResult vkCreateSamplerYcbcrConversionKHR( VkDevice device, const VkSamplerYcbcrConversionCreateInfo * pCreateInfo, const VkAllocationCallbacks * pAllocator, VkSamplerYcbcrConversion * pYcbcrConversion ) const VULKAN_HPP_NOEXCEPT { return ::vkCreateSamplerYcbcrConversionKHR( device, pCreateInfo, pAllocator, pYcbcrConversion ); } void vkDestroySamplerYcbcrConversionKHR( VkDevice device, VkSamplerYcbcrConversion ycbcrConversion, const VkAllocationCallbacks * pAllocator ) const VULKAN_HPP_NOEXCEPT { return ::vkDestroySamplerYcbcrConversionKHR( device, ycbcrConversion, pAllocator ); } //=== VK_KHR_bind_memory2 === VkResult vkBindBufferMemory2KHR( VkDevice device, uint32_t bindInfoCount, const VkBindBufferMemoryInfo * pBindInfos ) const VULKAN_HPP_NOEXCEPT { return ::vkBindBufferMemory2KHR( device, bindInfoCount, pBindInfos ); } VkResult vkBindImageMemory2KHR( VkDevice device, uint32_t bindInfoCount, const VkBindImageMemoryInfo * pBindInfos ) const VULKAN_HPP_NOEXCEPT { return ::vkBindImageMemory2KHR( device, bindInfoCount, pBindInfos ); } //=== VK_EXT_image_drm_format_modifier === VkResult vkGetImageDrmFormatModifierPropertiesEXT( VkDevice device, VkImage image, VkImageDrmFormatModifierPropertiesEXT * pProperties ) const VULKAN_HPP_NOEXCEPT { return ::vkGetImageDrmFormatModifierPropertiesEXT( device, image, pProperties ); } //=== VK_EXT_validation_cache === VkResult vkCreateValidationCacheEXT( VkDevice device, const VkValidationCacheCreateInfoEXT * pCreateInfo, const VkAllocationCallbacks * pAllocator, VkValidationCacheEXT * pValidationCache ) const VULKAN_HPP_NOEXCEPT { return ::vkCreateValidationCacheEXT( device, pCreateInfo, pAllocator, pValidationCache ); } void vkDestroyValidationCacheEXT( VkDevice device, VkValidationCacheEXT validationCache, const VkAllocationCallbacks * pAllocator ) const VULKAN_HPP_NOEXCEPT { return ::vkDestroyValidationCacheEXT( device, validationCache, pAllocator ); } VkResult vkMergeValidationCachesEXT( VkDevice device, VkValidationCacheEXT dstCache, uint32_t srcCacheCount, const VkValidationCacheEXT * pSrcCaches ) const VULKAN_HPP_NOEXCEPT { return ::vkMergeValidationCachesEXT( device, dstCache, srcCacheCount, pSrcCaches ); } VkResult vkGetValidationCacheDataEXT( VkDevice device, VkValidationCacheEXT validationCache, size_t * pDataSize, void * pData ) const VULKAN_HPP_NOEXCEPT { return ::vkGetValidationCacheDataEXT( device, validationCache, pDataSize, pData ); } //=== VK_NV_shading_rate_image === void vkCmdBindShadingRateImageNV( VkCommandBuffer commandBuffer, VkImageView imageView, VkImageLayout imageLayout ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdBindShadingRateImageNV( commandBuffer, imageView, imageLayout ); } void vkCmdSetViewportShadingRatePaletteNV( VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, const VkShadingRatePaletteNV * pShadingRatePalettes ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetViewportShadingRatePaletteNV( commandBuffer, firstViewport, viewportCount, pShadingRatePalettes ); } void vkCmdSetCoarseSampleOrderNV( VkCommandBuffer commandBuffer, VkCoarseSampleOrderTypeNV sampleOrderType, uint32_t customSampleOrderCount, const VkCoarseSampleOrderCustomNV * pCustomSampleOrders ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetCoarseSampleOrderNV( commandBuffer, sampleOrderType, customSampleOrderCount, pCustomSampleOrders ); } //=== VK_NV_ray_tracing === VkResult vkCreateAccelerationStructureNV( VkDevice device, const VkAccelerationStructureCreateInfoNV * pCreateInfo, const VkAllocationCallbacks * pAllocator, VkAccelerationStructureNV * pAccelerationStructure ) const VULKAN_HPP_NOEXCEPT { return ::vkCreateAccelerationStructureNV( device, pCreateInfo, pAllocator, pAccelerationStructure ); } void vkDestroyAccelerationStructureNV( VkDevice device, VkAccelerationStructureNV accelerationStructure, const VkAllocationCallbacks * pAllocator ) const VULKAN_HPP_NOEXCEPT { return ::vkDestroyAccelerationStructureNV( device, accelerationStructure, pAllocator ); } void vkGetAccelerationStructureMemoryRequirementsNV( VkDevice device, const VkAccelerationStructureMemoryRequirementsInfoNV * pInfo, VkMemoryRequirements2KHR * pMemoryRequirements ) const VULKAN_HPP_NOEXCEPT { return ::vkGetAccelerationStructureMemoryRequirementsNV( device, pInfo, pMemoryRequirements ); } VkResult vkBindAccelerationStructureMemoryNV( VkDevice device, uint32_t bindInfoCount, const VkBindAccelerationStructureMemoryInfoNV * pBindInfos ) const VULKAN_HPP_NOEXCEPT { return ::vkBindAccelerationStructureMemoryNV( device, bindInfoCount, pBindInfos ); } void vkCmdBuildAccelerationStructureNV( VkCommandBuffer commandBuffer, const VkAccelerationStructureInfoNV * pInfo, VkBuffer instanceData, VkDeviceSize instanceOffset, VkBool32 update, VkAccelerationStructureNV dst, VkAccelerationStructureNV src, VkBuffer scratch, VkDeviceSize scratchOffset ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdBuildAccelerationStructureNV( commandBuffer, pInfo, instanceData, instanceOffset, update, dst, src, scratch, scratchOffset ); } void vkCmdCopyAccelerationStructureNV( VkCommandBuffer commandBuffer, VkAccelerationStructureNV dst, VkAccelerationStructureNV src, VkCopyAccelerationStructureModeKHR mode ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdCopyAccelerationStructureNV( commandBuffer, dst, src, mode ); } void vkCmdTraceRaysNV( VkCommandBuffer commandBuffer, VkBuffer raygenShaderBindingTableBuffer, VkDeviceSize raygenShaderBindingOffset, VkBuffer missShaderBindingTableBuffer, VkDeviceSize missShaderBindingOffset, VkDeviceSize missShaderBindingStride, VkBuffer hitShaderBindingTableBuffer, VkDeviceSize hitShaderBindingOffset, VkDeviceSize hitShaderBindingStride, VkBuffer callableShaderBindingTableBuffer, VkDeviceSize callableShaderBindingOffset, VkDeviceSize callableShaderBindingStride, uint32_t width, uint32_t height, uint32_t depth ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdTraceRaysNV( commandBuffer, raygenShaderBindingTableBuffer, raygenShaderBindingOffset, missShaderBindingTableBuffer, missShaderBindingOffset, missShaderBindingStride, hitShaderBindingTableBuffer, hitShaderBindingOffset, hitShaderBindingStride, callableShaderBindingTableBuffer, callableShaderBindingOffset, callableShaderBindingStride, width, height, depth ); } VkResult vkCreateRayTracingPipelinesNV( VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkRayTracingPipelineCreateInfoNV * pCreateInfos, const VkAllocationCallbacks * pAllocator, VkPipeline * pPipelines ) const VULKAN_HPP_NOEXCEPT { return ::vkCreateRayTracingPipelinesNV( device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines ); } VkResult vkGetRayTracingShaderGroupHandlesNV( VkDevice device, VkPipeline pipeline, uint32_t firstGroup, uint32_t groupCount, size_t dataSize, void * pData ) const VULKAN_HPP_NOEXCEPT { return ::vkGetRayTracingShaderGroupHandlesNV( device, pipeline, firstGroup, groupCount, dataSize, pData ); } VkResult vkGetAccelerationStructureHandleNV( VkDevice device, VkAccelerationStructureNV accelerationStructure, size_t dataSize, void * pData ) const VULKAN_HPP_NOEXCEPT { return ::vkGetAccelerationStructureHandleNV( device, accelerationStructure, dataSize, pData ); } void vkCmdWriteAccelerationStructuresPropertiesNV( VkCommandBuffer commandBuffer, uint32_t accelerationStructureCount, const VkAccelerationStructureNV * pAccelerationStructures, VkQueryType queryType, VkQueryPool queryPool, uint32_t firstQuery ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdWriteAccelerationStructuresPropertiesNV( commandBuffer, accelerationStructureCount, pAccelerationStructures, queryType, queryPool, firstQuery ); } VkResult vkCompileDeferredNV( VkDevice device, VkPipeline pipeline, uint32_t shader ) const VULKAN_HPP_NOEXCEPT { return ::vkCompileDeferredNV( device, pipeline, shader ); } //=== VK_KHR_maintenance3 === void vkGetDescriptorSetLayoutSupportKHR( VkDevice device, const VkDescriptorSetLayoutCreateInfo * pCreateInfo, VkDescriptorSetLayoutSupport * pSupport ) const VULKAN_HPP_NOEXCEPT { return ::vkGetDescriptorSetLayoutSupportKHR( device, pCreateInfo, pSupport ); } //=== VK_KHR_draw_indirect_count === void vkCmdDrawIndirectCountKHR( VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdDrawIndirectCountKHR( commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride ); } void vkCmdDrawIndexedIndirectCountKHR( VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdDrawIndexedIndirectCountKHR( commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride ); } //=== VK_EXT_external_memory_host === VkResult vkGetMemoryHostPointerPropertiesEXT( VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, const void * pHostPointer, VkMemoryHostPointerPropertiesEXT * pMemoryHostPointerProperties ) const VULKAN_HPP_NOEXCEPT { return ::vkGetMemoryHostPointerPropertiesEXT( device, handleType, pHostPointer, pMemoryHostPointerProperties ); } //=== VK_AMD_buffer_marker === void vkCmdWriteBufferMarkerAMD( VkCommandBuffer commandBuffer, VkPipelineStageFlagBits pipelineStage, VkBuffer dstBuffer, VkDeviceSize dstOffset, uint32_t marker ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdWriteBufferMarkerAMD( commandBuffer, pipelineStage, dstBuffer, dstOffset, marker ); } void vkCmdWriteBufferMarker2AMD( VkCommandBuffer commandBuffer, VkPipelineStageFlags2 stage, VkBuffer dstBuffer, VkDeviceSize dstOffset, uint32_t marker ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdWriteBufferMarker2AMD( commandBuffer, stage, dstBuffer, dstOffset, marker ); } //=== VK_EXT_calibrated_timestamps === VkResult vkGetPhysicalDeviceCalibrateableTimeDomainsEXT( VkPhysicalDevice physicalDevice, uint32_t * pTimeDomainCount, VkTimeDomainKHR * pTimeDomains ) const VULKAN_HPP_NOEXCEPT { return ::vkGetPhysicalDeviceCalibrateableTimeDomainsEXT( physicalDevice, pTimeDomainCount, pTimeDomains ); } VkResult vkGetCalibratedTimestampsEXT( VkDevice device, uint32_t timestampCount, const VkCalibratedTimestampInfoKHR * pTimestampInfos, uint64_t * pTimestamps, uint64_t * pMaxDeviation ) const VULKAN_HPP_NOEXCEPT { return ::vkGetCalibratedTimestampsEXT( device, timestampCount, pTimestampInfos, pTimestamps, pMaxDeviation ); } //=== VK_NV_mesh_shader === void vkCmdDrawMeshTasksNV( VkCommandBuffer commandBuffer, uint32_t taskCount, uint32_t firstTask ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdDrawMeshTasksNV( commandBuffer, taskCount, firstTask ); } void vkCmdDrawMeshTasksIndirectNV( VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdDrawMeshTasksIndirectNV( commandBuffer, buffer, offset, drawCount, stride ); } void vkCmdDrawMeshTasksIndirectCountNV( VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdDrawMeshTasksIndirectCountNV( commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride ); } //=== VK_NV_scissor_exclusive === void vkCmdSetExclusiveScissorEnableNV( VkCommandBuffer commandBuffer, uint32_t firstExclusiveScissor, uint32_t exclusiveScissorCount, const VkBool32 * pExclusiveScissorEnables ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetExclusiveScissorEnableNV( commandBuffer, firstExclusiveScissor, exclusiveScissorCount, pExclusiveScissorEnables ); } void vkCmdSetExclusiveScissorNV( VkCommandBuffer commandBuffer, uint32_t firstExclusiveScissor, uint32_t exclusiveScissorCount, const VkRect2D * pExclusiveScissors ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetExclusiveScissorNV( commandBuffer, firstExclusiveScissor, exclusiveScissorCount, pExclusiveScissors ); } //=== VK_NV_device_diagnostic_checkpoints === void vkCmdSetCheckpointNV( VkCommandBuffer commandBuffer, const void * pCheckpointMarker ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetCheckpointNV( commandBuffer, pCheckpointMarker ); } void vkGetQueueCheckpointDataNV( VkQueue queue, uint32_t * pCheckpointDataCount, VkCheckpointDataNV * pCheckpointData ) const VULKAN_HPP_NOEXCEPT { return ::vkGetQueueCheckpointDataNV( queue, pCheckpointDataCount, pCheckpointData ); } void vkGetQueueCheckpointData2NV( VkQueue queue, uint32_t * pCheckpointDataCount, VkCheckpointData2NV * pCheckpointData ) const VULKAN_HPP_NOEXCEPT { return ::vkGetQueueCheckpointData2NV( queue, pCheckpointDataCount, pCheckpointData ); } //=== VK_KHR_timeline_semaphore === VkResult vkGetSemaphoreCounterValueKHR( VkDevice device, VkSemaphore semaphore, uint64_t * pValue ) const VULKAN_HPP_NOEXCEPT { return ::vkGetSemaphoreCounterValueKHR( device, semaphore, pValue ); } VkResult vkWaitSemaphoresKHR( VkDevice device, const VkSemaphoreWaitInfo * pWaitInfo, uint64_t timeout ) const VULKAN_HPP_NOEXCEPT { return ::vkWaitSemaphoresKHR( device, pWaitInfo, timeout ); } VkResult vkSignalSemaphoreKHR( VkDevice device, const VkSemaphoreSignalInfo * pSignalInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkSignalSemaphoreKHR( device, pSignalInfo ); } //=== VK_INTEL_performance_query === VkResult vkInitializePerformanceApiINTEL( VkDevice device, const VkInitializePerformanceApiInfoINTEL * pInitializeInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkInitializePerformanceApiINTEL( device, pInitializeInfo ); } void vkUninitializePerformanceApiINTEL( VkDevice device ) const VULKAN_HPP_NOEXCEPT { return ::vkUninitializePerformanceApiINTEL( device ); } VkResult vkCmdSetPerformanceMarkerINTEL( VkCommandBuffer commandBuffer, const VkPerformanceMarkerInfoINTEL * pMarkerInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetPerformanceMarkerINTEL( commandBuffer, pMarkerInfo ); } VkResult vkCmdSetPerformanceStreamMarkerINTEL( VkCommandBuffer commandBuffer, const VkPerformanceStreamMarkerInfoINTEL * pMarkerInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetPerformanceStreamMarkerINTEL( commandBuffer, pMarkerInfo ); } VkResult vkCmdSetPerformanceOverrideINTEL( VkCommandBuffer commandBuffer, const VkPerformanceOverrideInfoINTEL * pOverrideInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetPerformanceOverrideINTEL( commandBuffer, pOverrideInfo ); } VkResult vkAcquirePerformanceConfigurationINTEL( VkDevice device, const VkPerformanceConfigurationAcquireInfoINTEL * pAcquireInfo, VkPerformanceConfigurationINTEL * pConfiguration ) const VULKAN_HPP_NOEXCEPT { return ::vkAcquirePerformanceConfigurationINTEL( device, pAcquireInfo, pConfiguration ); } VkResult vkReleasePerformanceConfigurationINTEL( VkDevice device, VkPerformanceConfigurationINTEL configuration ) const VULKAN_HPP_NOEXCEPT { return ::vkReleasePerformanceConfigurationINTEL( device, configuration ); } VkResult vkQueueSetPerformanceConfigurationINTEL( VkQueue queue, VkPerformanceConfigurationINTEL configuration ) const VULKAN_HPP_NOEXCEPT { return ::vkQueueSetPerformanceConfigurationINTEL( queue, configuration ); } VkResult vkGetPerformanceParameterINTEL( VkDevice device, VkPerformanceParameterTypeINTEL parameter, VkPerformanceValueINTEL * pValue ) const VULKAN_HPP_NOEXCEPT { return ::vkGetPerformanceParameterINTEL( device, parameter, pValue ); } //=== VK_AMD_display_native_hdr === void vkSetLocalDimmingAMD( VkDevice device, VkSwapchainKHR swapChain, VkBool32 localDimmingEnable ) const VULKAN_HPP_NOEXCEPT { return ::vkSetLocalDimmingAMD( device, swapChain, localDimmingEnable ); } # if defined( VK_USE_PLATFORM_FUCHSIA ) //=== VK_FUCHSIA_imagepipe_surface === VkResult vkCreateImagePipeSurfaceFUCHSIA( VkInstance instance, const VkImagePipeSurfaceCreateInfoFUCHSIA * pCreateInfo, const VkAllocationCallbacks * pAllocator, VkSurfaceKHR * pSurface ) const VULKAN_HPP_NOEXCEPT { return ::vkCreateImagePipeSurfaceFUCHSIA( instance, pCreateInfo, pAllocator, pSurface ); } # endif /*VK_USE_PLATFORM_FUCHSIA*/ # if defined( VK_USE_PLATFORM_METAL_EXT ) //=== VK_EXT_metal_surface === VkResult vkCreateMetalSurfaceEXT( VkInstance instance, const VkMetalSurfaceCreateInfoEXT * pCreateInfo, const VkAllocationCallbacks * pAllocator, VkSurfaceKHR * pSurface ) const VULKAN_HPP_NOEXCEPT { return ::vkCreateMetalSurfaceEXT( instance, pCreateInfo, pAllocator, pSurface ); } # endif /*VK_USE_PLATFORM_METAL_EXT*/ //=== VK_KHR_fragment_shading_rate === VkResult vkGetPhysicalDeviceFragmentShadingRatesKHR( VkPhysicalDevice physicalDevice, uint32_t * pFragmentShadingRateCount, VkPhysicalDeviceFragmentShadingRateKHR * pFragmentShadingRates ) const VULKAN_HPP_NOEXCEPT { return ::vkGetPhysicalDeviceFragmentShadingRatesKHR( physicalDevice, pFragmentShadingRateCount, pFragmentShadingRates ); } void vkCmdSetFragmentShadingRateKHR( VkCommandBuffer commandBuffer, const VkExtent2D * pFragmentSize, const VkFragmentShadingRateCombinerOpKHR combinerOps[2] ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetFragmentShadingRateKHR( commandBuffer, pFragmentSize, combinerOps ); } //=== VK_KHR_dynamic_rendering_local_read === void vkCmdSetRenderingAttachmentLocationsKHR( VkCommandBuffer commandBuffer, const VkRenderingAttachmentLocationInfo * pLocationInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetRenderingAttachmentLocationsKHR( commandBuffer, pLocationInfo ); } void vkCmdSetRenderingInputAttachmentIndicesKHR( VkCommandBuffer commandBuffer, const VkRenderingInputAttachmentIndexInfo * pInputAttachmentIndexInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetRenderingInputAttachmentIndicesKHR( commandBuffer, pInputAttachmentIndexInfo ); } //=== VK_EXT_buffer_device_address === VkDeviceAddress vkGetBufferDeviceAddressEXT( VkDevice device, const VkBufferDeviceAddressInfo * pInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkGetBufferDeviceAddressEXT( device, pInfo ); } //=== VK_EXT_tooling_info === VkResult vkGetPhysicalDeviceToolPropertiesEXT( VkPhysicalDevice physicalDevice, uint32_t * pToolCount, VkPhysicalDeviceToolProperties * pToolProperties ) const VULKAN_HPP_NOEXCEPT { return ::vkGetPhysicalDeviceToolPropertiesEXT( physicalDevice, pToolCount, pToolProperties ); } //=== VK_KHR_present_wait === VkResult vkWaitForPresentKHR( VkDevice device, VkSwapchainKHR swapchain, uint64_t presentId, uint64_t timeout ) const VULKAN_HPP_NOEXCEPT { return ::vkWaitForPresentKHR( device, swapchain, presentId, timeout ); } //=== VK_NV_cooperative_matrix === VkResult vkGetPhysicalDeviceCooperativeMatrixPropertiesNV( VkPhysicalDevice physicalDevice, uint32_t * pPropertyCount, VkCooperativeMatrixPropertiesNV * pProperties ) const VULKAN_HPP_NOEXCEPT { return ::vkGetPhysicalDeviceCooperativeMatrixPropertiesNV( physicalDevice, pPropertyCount, pProperties ); } //=== VK_NV_coverage_reduction_mode === VkResult vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV( VkPhysicalDevice physicalDevice, uint32_t * pCombinationCount, VkFramebufferMixedSamplesCombinationNV * pCombinations ) const VULKAN_HPP_NOEXCEPT { return ::vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV( physicalDevice, pCombinationCount, pCombinations ); } # if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_EXT_full_screen_exclusive === VkResult vkGetPhysicalDeviceSurfacePresentModes2EXT( VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSurfaceInfo2KHR * pSurfaceInfo, uint32_t * pPresentModeCount, VkPresentModeKHR * pPresentModes ) const VULKAN_HPP_NOEXCEPT { return ::vkGetPhysicalDeviceSurfacePresentModes2EXT( physicalDevice, pSurfaceInfo, pPresentModeCount, pPresentModes ); } VkResult vkAcquireFullScreenExclusiveModeEXT( VkDevice device, VkSwapchainKHR swapchain ) const VULKAN_HPP_NOEXCEPT { return ::vkAcquireFullScreenExclusiveModeEXT( device, swapchain ); } VkResult vkReleaseFullScreenExclusiveModeEXT( VkDevice device, VkSwapchainKHR swapchain ) const VULKAN_HPP_NOEXCEPT { return ::vkReleaseFullScreenExclusiveModeEXT( device, swapchain ); } VkResult vkGetDeviceGroupSurfacePresentModes2EXT( VkDevice device, const VkPhysicalDeviceSurfaceInfo2KHR * pSurfaceInfo, VkDeviceGroupPresentModeFlagsKHR * pModes ) const VULKAN_HPP_NOEXCEPT { return ::vkGetDeviceGroupSurfacePresentModes2EXT( device, pSurfaceInfo, pModes ); } # endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_EXT_headless_surface === VkResult vkCreateHeadlessSurfaceEXT( VkInstance instance, const VkHeadlessSurfaceCreateInfoEXT * pCreateInfo, const VkAllocationCallbacks * pAllocator, VkSurfaceKHR * pSurface ) const VULKAN_HPP_NOEXCEPT { return ::vkCreateHeadlessSurfaceEXT( instance, pCreateInfo, pAllocator, pSurface ); } //=== VK_KHR_buffer_device_address === VkDeviceAddress vkGetBufferDeviceAddressKHR( VkDevice device, const VkBufferDeviceAddressInfo * pInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkGetBufferDeviceAddressKHR( device, pInfo ); } uint64_t vkGetBufferOpaqueCaptureAddressKHR( VkDevice device, const VkBufferDeviceAddressInfo * pInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkGetBufferOpaqueCaptureAddressKHR( device, pInfo ); } uint64_t vkGetDeviceMemoryOpaqueCaptureAddressKHR( VkDevice device, const VkDeviceMemoryOpaqueCaptureAddressInfo * pInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkGetDeviceMemoryOpaqueCaptureAddressKHR( device, pInfo ); } //=== VK_EXT_line_rasterization === void vkCmdSetLineStippleEXT( VkCommandBuffer commandBuffer, uint32_t lineStippleFactor, uint16_t lineStipplePattern ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetLineStippleEXT( commandBuffer, lineStippleFactor, lineStipplePattern ); } //=== VK_EXT_host_query_reset === void vkResetQueryPoolEXT( VkDevice device, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount ) const VULKAN_HPP_NOEXCEPT { return ::vkResetQueryPoolEXT( device, queryPool, firstQuery, queryCount ); } //=== VK_EXT_extended_dynamic_state === void vkCmdSetCullModeEXT( VkCommandBuffer commandBuffer, VkCullModeFlags cullMode ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetCullModeEXT( commandBuffer, cullMode ); } void vkCmdSetFrontFaceEXT( VkCommandBuffer commandBuffer, VkFrontFace frontFace ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetFrontFaceEXT( commandBuffer, frontFace ); } void vkCmdSetPrimitiveTopologyEXT( VkCommandBuffer commandBuffer, VkPrimitiveTopology primitiveTopology ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetPrimitiveTopologyEXT( commandBuffer, primitiveTopology ); } void vkCmdSetViewportWithCountEXT( VkCommandBuffer commandBuffer, uint32_t viewportCount, const VkViewport * pViewports ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetViewportWithCountEXT( commandBuffer, viewportCount, pViewports ); } void vkCmdSetScissorWithCountEXT( VkCommandBuffer commandBuffer, uint32_t scissorCount, const VkRect2D * pScissors ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetScissorWithCountEXT( commandBuffer, scissorCount, pScissors ); } void vkCmdBindVertexBuffers2EXT( VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, const VkBuffer * pBuffers, const VkDeviceSize * pOffsets, const VkDeviceSize * pSizes, const VkDeviceSize * pStrides ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdBindVertexBuffers2EXT( commandBuffer, firstBinding, bindingCount, pBuffers, pOffsets, pSizes, pStrides ); } void vkCmdSetDepthTestEnableEXT( VkCommandBuffer commandBuffer, VkBool32 depthTestEnable ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetDepthTestEnableEXT( commandBuffer, depthTestEnable ); } void vkCmdSetDepthWriteEnableEXT( VkCommandBuffer commandBuffer, VkBool32 depthWriteEnable ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetDepthWriteEnableEXT( commandBuffer, depthWriteEnable ); } void vkCmdSetDepthCompareOpEXT( VkCommandBuffer commandBuffer, VkCompareOp depthCompareOp ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetDepthCompareOpEXT( commandBuffer, depthCompareOp ); } void vkCmdSetDepthBoundsTestEnableEXT( VkCommandBuffer commandBuffer, VkBool32 depthBoundsTestEnable ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetDepthBoundsTestEnableEXT( commandBuffer, depthBoundsTestEnable ); } void vkCmdSetStencilTestEnableEXT( VkCommandBuffer commandBuffer, VkBool32 stencilTestEnable ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetStencilTestEnableEXT( commandBuffer, stencilTestEnable ); } void vkCmdSetStencilOpEXT( VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, VkStencilOp failOp, VkStencilOp passOp, VkStencilOp depthFailOp, VkCompareOp compareOp ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetStencilOpEXT( commandBuffer, faceMask, failOp, passOp, depthFailOp, compareOp ); } //=== VK_KHR_deferred_host_operations === VkResult vkCreateDeferredOperationKHR( VkDevice device, const VkAllocationCallbacks * pAllocator, VkDeferredOperationKHR * pDeferredOperation ) const VULKAN_HPP_NOEXCEPT { return ::vkCreateDeferredOperationKHR( device, pAllocator, pDeferredOperation ); } void vkDestroyDeferredOperationKHR( VkDevice device, VkDeferredOperationKHR operation, const VkAllocationCallbacks * pAllocator ) const VULKAN_HPP_NOEXCEPT { return ::vkDestroyDeferredOperationKHR( device, operation, pAllocator ); } uint32_t vkGetDeferredOperationMaxConcurrencyKHR( VkDevice device, VkDeferredOperationKHR operation ) const VULKAN_HPP_NOEXCEPT { return ::vkGetDeferredOperationMaxConcurrencyKHR( device, operation ); } VkResult vkGetDeferredOperationResultKHR( VkDevice device, VkDeferredOperationKHR operation ) const VULKAN_HPP_NOEXCEPT { return ::vkGetDeferredOperationResultKHR( device, operation ); } VkResult vkDeferredOperationJoinKHR( VkDevice device, VkDeferredOperationKHR operation ) const VULKAN_HPP_NOEXCEPT { return ::vkDeferredOperationJoinKHR( device, operation ); } //=== VK_KHR_pipeline_executable_properties === VkResult vkGetPipelineExecutablePropertiesKHR( VkDevice device, const VkPipelineInfoKHR * pPipelineInfo, uint32_t * pExecutableCount, VkPipelineExecutablePropertiesKHR * pProperties ) const VULKAN_HPP_NOEXCEPT { return ::vkGetPipelineExecutablePropertiesKHR( device, pPipelineInfo, pExecutableCount, pProperties ); } VkResult vkGetPipelineExecutableStatisticsKHR( VkDevice device, const VkPipelineExecutableInfoKHR * pExecutableInfo, uint32_t * pStatisticCount, VkPipelineExecutableStatisticKHR * pStatistics ) const VULKAN_HPP_NOEXCEPT { return ::vkGetPipelineExecutableStatisticsKHR( device, pExecutableInfo, pStatisticCount, pStatistics ); } VkResult vkGetPipelineExecutableInternalRepresentationsKHR( VkDevice device, const VkPipelineExecutableInfoKHR * pExecutableInfo, uint32_t * pInternalRepresentationCount, VkPipelineExecutableInternalRepresentationKHR * pInternalRepresentations ) const VULKAN_HPP_NOEXCEPT { return ::vkGetPipelineExecutableInternalRepresentationsKHR( device, pExecutableInfo, pInternalRepresentationCount, pInternalRepresentations ); } //=== VK_EXT_host_image_copy === VkResult vkCopyMemoryToImageEXT( VkDevice device, const VkCopyMemoryToImageInfo * pCopyMemoryToImageInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkCopyMemoryToImageEXT( device, pCopyMemoryToImageInfo ); } VkResult vkCopyImageToMemoryEXT( VkDevice device, const VkCopyImageToMemoryInfo * pCopyImageToMemoryInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkCopyImageToMemoryEXT( device, pCopyImageToMemoryInfo ); } VkResult vkCopyImageToImageEXT( VkDevice device, const VkCopyImageToImageInfo * pCopyImageToImageInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkCopyImageToImageEXT( device, pCopyImageToImageInfo ); } VkResult vkTransitionImageLayoutEXT( VkDevice device, uint32_t transitionCount, const VkHostImageLayoutTransitionInfo * pTransitions ) const VULKAN_HPP_NOEXCEPT { return ::vkTransitionImageLayoutEXT( device, transitionCount, pTransitions ); } void vkGetImageSubresourceLayout2EXT( VkDevice device, VkImage image, const VkImageSubresource2 * pSubresource, VkSubresourceLayout2 * pLayout ) const VULKAN_HPP_NOEXCEPT { return ::vkGetImageSubresourceLayout2EXT( device, image, pSubresource, pLayout ); } //=== VK_KHR_map_memory2 === VkResult vkMapMemory2KHR( VkDevice device, const VkMemoryMapInfo * pMemoryMapInfo, void ** ppData ) const VULKAN_HPP_NOEXCEPT { return ::vkMapMemory2KHR( device, pMemoryMapInfo, ppData ); } VkResult vkUnmapMemory2KHR( VkDevice device, const VkMemoryUnmapInfo * pMemoryUnmapInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkUnmapMemory2KHR( device, pMemoryUnmapInfo ); } //=== VK_EXT_swapchain_maintenance1 === VkResult vkReleaseSwapchainImagesEXT( VkDevice device, const VkReleaseSwapchainImagesInfoEXT * pReleaseInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkReleaseSwapchainImagesEXT( device, pReleaseInfo ); } //=== VK_NV_device_generated_commands === void vkGetGeneratedCommandsMemoryRequirementsNV( VkDevice device, const VkGeneratedCommandsMemoryRequirementsInfoNV * pInfo, VkMemoryRequirements2 * pMemoryRequirements ) const VULKAN_HPP_NOEXCEPT { return ::vkGetGeneratedCommandsMemoryRequirementsNV( device, pInfo, pMemoryRequirements ); } void vkCmdPreprocessGeneratedCommandsNV( VkCommandBuffer commandBuffer, const VkGeneratedCommandsInfoNV * pGeneratedCommandsInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdPreprocessGeneratedCommandsNV( commandBuffer, pGeneratedCommandsInfo ); } void vkCmdExecuteGeneratedCommandsNV( VkCommandBuffer commandBuffer, VkBool32 isPreprocessed, const VkGeneratedCommandsInfoNV * pGeneratedCommandsInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdExecuteGeneratedCommandsNV( commandBuffer, isPreprocessed, pGeneratedCommandsInfo ); } void vkCmdBindPipelineShaderGroupNV( VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline, uint32_t groupIndex ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdBindPipelineShaderGroupNV( commandBuffer, pipelineBindPoint, pipeline, groupIndex ); } VkResult vkCreateIndirectCommandsLayoutNV( VkDevice device, const VkIndirectCommandsLayoutCreateInfoNV * pCreateInfo, const VkAllocationCallbacks * pAllocator, VkIndirectCommandsLayoutNV * pIndirectCommandsLayout ) const VULKAN_HPP_NOEXCEPT { return ::vkCreateIndirectCommandsLayoutNV( device, pCreateInfo, pAllocator, pIndirectCommandsLayout ); } void vkDestroyIndirectCommandsLayoutNV( VkDevice device, VkIndirectCommandsLayoutNV indirectCommandsLayout, const VkAllocationCallbacks * pAllocator ) const VULKAN_HPP_NOEXCEPT { return ::vkDestroyIndirectCommandsLayoutNV( device, indirectCommandsLayout, pAllocator ); } //=== VK_EXT_depth_bias_control === void vkCmdSetDepthBias2EXT( VkCommandBuffer commandBuffer, const VkDepthBiasInfoEXT * pDepthBiasInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetDepthBias2EXT( commandBuffer, pDepthBiasInfo ); } //=== VK_EXT_acquire_drm_display === VkResult vkAcquireDrmDisplayEXT( VkPhysicalDevice physicalDevice, int32_t drmFd, VkDisplayKHR display ) const VULKAN_HPP_NOEXCEPT { return ::vkAcquireDrmDisplayEXT( physicalDevice, drmFd, display ); } VkResult vkGetDrmDisplayEXT( VkPhysicalDevice physicalDevice, int32_t drmFd, uint32_t connectorId, VkDisplayKHR * display ) const VULKAN_HPP_NOEXCEPT { return ::vkGetDrmDisplayEXT( physicalDevice, drmFd, connectorId, display ); } //=== VK_EXT_private_data === VkResult vkCreatePrivateDataSlotEXT( VkDevice device, const VkPrivateDataSlotCreateInfo * pCreateInfo, const VkAllocationCallbacks * pAllocator, VkPrivateDataSlot * pPrivateDataSlot ) const VULKAN_HPP_NOEXCEPT { return ::vkCreatePrivateDataSlotEXT( device, pCreateInfo, pAllocator, pPrivateDataSlot ); } void vkDestroyPrivateDataSlotEXT( VkDevice device, VkPrivateDataSlot privateDataSlot, const VkAllocationCallbacks * pAllocator ) const VULKAN_HPP_NOEXCEPT { return ::vkDestroyPrivateDataSlotEXT( device, privateDataSlot, pAllocator ); } VkResult vkSetPrivateDataEXT( VkDevice device, VkObjectType objectType, uint64_t objectHandle, VkPrivateDataSlot privateDataSlot, uint64_t data ) const VULKAN_HPP_NOEXCEPT { return ::vkSetPrivateDataEXT( device, objectType, objectHandle, privateDataSlot, data ); } void vkGetPrivateDataEXT( VkDevice device, VkObjectType objectType, uint64_t objectHandle, VkPrivateDataSlot privateDataSlot, uint64_t * pData ) const VULKAN_HPP_NOEXCEPT { return ::vkGetPrivateDataEXT( device, objectType, objectHandle, privateDataSlot, pData ); } //=== VK_KHR_video_encode_queue === VkResult vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR( VkPhysicalDevice physicalDevice, const VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR * pQualityLevelInfo, VkVideoEncodeQualityLevelPropertiesKHR * pQualityLevelProperties ) const VULKAN_HPP_NOEXCEPT { return ::vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR( physicalDevice, pQualityLevelInfo, pQualityLevelProperties ); } VkResult vkGetEncodedVideoSessionParametersKHR( VkDevice device, const VkVideoEncodeSessionParametersGetInfoKHR * pVideoSessionParametersInfo, VkVideoEncodeSessionParametersFeedbackInfoKHR * pFeedbackInfo, size_t * pDataSize, void * pData ) const VULKAN_HPP_NOEXCEPT { return ::vkGetEncodedVideoSessionParametersKHR( device, pVideoSessionParametersInfo, pFeedbackInfo, pDataSize, pData ); } void vkCmdEncodeVideoKHR( VkCommandBuffer commandBuffer, const VkVideoEncodeInfoKHR * pEncodeInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdEncodeVideoKHR( commandBuffer, pEncodeInfo ); } # if defined( VK_ENABLE_BETA_EXTENSIONS ) //=== VK_NV_cuda_kernel_launch === VkResult vkCreateCudaModuleNV( VkDevice device, const VkCudaModuleCreateInfoNV * pCreateInfo, const VkAllocationCallbacks * pAllocator, VkCudaModuleNV * pModule ) const VULKAN_HPP_NOEXCEPT { return ::vkCreateCudaModuleNV( device, pCreateInfo, pAllocator, pModule ); } VkResult vkGetCudaModuleCacheNV( VkDevice device, VkCudaModuleNV module, size_t * pCacheSize, void * pCacheData ) const VULKAN_HPP_NOEXCEPT { return ::vkGetCudaModuleCacheNV( device, module, pCacheSize, pCacheData ); } VkResult vkCreateCudaFunctionNV( VkDevice device, const VkCudaFunctionCreateInfoNV * pCreateInfo, const VkAllocationCallbacks * pAllocator, VkCudaFunctionNV * pFunction ) const VULKAN_HPP_NOEXCEPT { return ::vkCreateCudaFunctionNV( device, pCreateInfo, pAllocator, pFunction ); } void vkDestroyCudaModuleNV( VkDevice device, VkCudaModuleNV module, const VkAllocationCallbacks * pAllocator ) const VULKAN_HPP_NOEXCEPT { return ::vkDestroyCudaModuleNV( device, module, pAllocator ); } void vkDestroyCudaFunctionNV( VkDevice device, VkCudaFunctionNV function, const VkAllocationCallbacks * pAllocator ) const VULKAN_HPP_NOEXCEPT { return ::vkDestroyCudaFunctionNV( device, function, pAllocator ); } void vkCmdCudaLaunchKernelNV( VkCommandBuffer commandBuffer, const VkCudaLaunchInfoNV * pLaunchInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdCudaLaunchKernelNV( commandBuffer, pLaunchInfo ); } # endif /*VK_ENABLE_BETA_EXTENSIONS*/ # if defined( VK_USE_PLATFORM_METAL_EXT ) //=== VK_EXT_metal_objects === void vkExportMetalObjectsEXT( VkDevice device, VkExportMetalObjectsInfoEXT * pMetalObjectsInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkExportMetalObjectsEXT( device, pMetalObjectsInfo ); } # endif /*VK_USE_PLATFORM_METAL_EXT*/ //=== VK_KHR_synchronization2 === void vkCmdSetEvent2KHR( VkCommandBuffer commandBuffer, VkEvent event, const VkDependencyInfo * pDependencyInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetEvent2KHR( commandBuffer, event, pDependencyInfo ); } void vkCmdResetEvent2KHR( VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags2 stageMask ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdResetEvent2KHR( commandBuffer, event, stageMask ); } void vkCmdWaitEvents2KHR( VkCommandBuffer commandBuffer, uint32_t eventCount, const VkEvent * pEvents, const VkDependencyInfo * pDependencyInfos ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdWaitEvents2KHR( commandBuffer, eventCount, pEvents, pDependencyInfos ); } void vkCmdPipelineBarrier2KHR( VkCommandBuffer commandBuffer, const VkDependencyInfo * pDependencyInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdPipelineBarrier2KHR( commandBuffer, pDependencyInfo ); } void vkCmdWriteTimestamp2KHR( VkCommandBuffer commandBuffer, VkPipelineStageFlags2 stage, VkQueryPool queryPool, uint32_t query ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdWriteTimestamp2KHR( commandBuffer, stage, queryPool, query ); } VkResult vkQueueSubmit2KHR( VkQueue queue, uint32_t submitCount, const VkSubmitInfo2 * pSubmits, VkFence fence ) const VULKAN_HPP_NOEXCEPT { return ::vkQueueSubmit2KHR( queue, submitCount, pSubmits, fence ); } //=== VK_EXT_descriptor_buffer === void vkGetDescriptorSetLayoutSizeEXT( VkDevice device, VkDescriptorSetLayout layout, VkDeviceSize * pLayoutSizeInBytes ) const VULKAN_HPP_NOEXCEPT { return ::vkGetDescriptorSetLayoutSizeEXT( device, layout, pLayoutSizeInBytes ); } void vkGetDescriptorSetLayoutBindingOffsetEXT( VkDevice device, VkDescriptorSetLayout layout, uint32_t binding, VkDeviceSize * pOffset ) const VULKAN_HPP_NOEXCEPT { return ::vkGetDescriptorSetLayoutBindingOffsetEXT( device, layout, binding, pOffset ); } void vkGetDescriptorEXT( VkDevice device, const VkDescriptorGetInfoEXT * pDescriptorInfo, size_t dataSize, void * pDescriptor ) const VULKAN_HPP_NOEXCEPT { return ::vkGetDescriptorEXT( device, pDescriptorInfo, dataSize, pDescriptor ); } void vkCmdBindDescriptorBuffersEXT( VkCommandBuffer commandBuffer, uint32_t bufferCount, const VkDescriptorBufferBindingInfoEXT * pBindingInfos ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdBindDescriptorBuffersEXT( commandBuffer, bufferCount, pBindingInfos ); } void vkCmdSetDescriptorBufferOffsetsEXT( VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, uint32_t firstSet, uint32_t setCount, const uint32_t * pBufferIndices, const VkDeviceSize * pOffsets ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetDescriptorBufferOffsetsEXT( commandBuffer, pipelineBindPoint, layout, firstSet, setCount, pBufferIndices, pOffsets ); } void vkCmdBindDescriptorBufferEmbeddedSamplersEXT( VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, uint32_t set ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdBindDescriptorBufferEmbeddedSamplersEXT( commandBuffer, pipelineBindPoint, layout, set ); } VkResult vkGetBufferOpaqueCaptureDescriptorDataEXT( VkDevice device, const VkBufferCaptureDescriptorDataInfoEXT * pInfo, void * pData ) const VULKAN_HPP_NOEXCEPT { return ::vkGetBufferOpaqueCaptureDescriptorDataEXT( device, pInfo, pData ); } VkResult vkGetImageOpaqueCaptureDescriptorDataEXT( VkDevice device, const VkImageCaptureDescriptorDataInfoEXT * pInfo, void * pData ) const VULKAN_HPP_NOEXCEPT { return ::vkGetImageOpaqueCaptureDescriptorDataEXT( device, pInfo, pData ); } VkResult vkGetImageViewOpaqueCaptureDescriptorDataEXT( VkDevice device, const VkImageViewCaptureDescriptorDataInfoEXT * pInfo, void * pData ) const VULKAN_HPP_NOEXCEPT { return ::vkGetImageViewOpaqueCaptureDescriptorDataEXT( device, pInfo, pData ); } VkResult vkGetSamplerOpaqueCaptureDescriptorDataEXT( VkDevice device, const VkSamplerCaptureDescriptorDataInfoEXT * pInfo, void * pData ) const VULKAN_HPP_NOEXCEPT { return ::vkGetSamplerOpaqueCaptureDescriptorDataEXT( device, pInfo, pData ); } VkResult vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT( VkDevice device, const VkAccelerationStructureCaptureDescriptorDataInfoEXT * pInfo, void * pData ) const VULKAN_HPP_NOEXCEPT { return ::vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT( device, pInfo, pData ); } //=== VK_NV_fragment_shading_rate_enums === void vkCmdSetFragmentShadingRateEnumNV( VkCommandBuffer commandBuffer, VkFragmentShadingRateNV shadingRate, const VkFragmentShadingRateCombinerOpKHR combinerOps[2] ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetFragmentShadingRateEnumNV( commandBuffer, shadingRate, combinerOps ); } //=== VK_EXT_mesh_shader === void vkCmdDrawMeshTasksEXT( VkCommandBuffer commandBuffer, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdDrawMeshTasksEXT( commandBuffer, groupCountX, groupCountY, groupCountZ ); } void vkCmdDrawMeshTasksIndirectEXT( VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdDrawMeshTasksIndirectEXT( commandBuffer, buffer, offset, drawCount, stride ); } void vkCmdDrawMeshTasksIndirectCountEXT( VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdDrawMeshTasksIndirectCountEXT( commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride ); } //=== VK_KHR_copy_commands2 === void vkCmdCopyBuffer2KHR( VkCommandBuffer commandBuffer, const VkCopyBufferInfo2 * pCopyBufferInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdCopyBuffer2KHR( commandBuffer, pCopyBufferInfo ); } void vkCmdCopyImage2KHR( VkCommandBuffer commandBuffer, const VkCopyImageInfo2 * pCopyImageInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdCopyImage2KHR( commandBuffer, pCopyImageInfo ); } void vkCmdCopyBufferToImage2KHR( VkCommandBuffer commandBuffer, const VkCopyBufferToImageInfo2 * pCopyBufferToImageInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdCopyBufferToImage2KHR( commandBuffer, pCopyBufferToImageInfo ); } void vkCmdCopyImageToBuffer2KHR( VkCommandBuffer commandBuffer, const VkCopyImageToBufferInfo2 * pCopyImageToBufferInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdCopyImageToBuffer2KHR( commandBuffer, pCopyImageToBufferInfo ); } void vkCmdBlitImage2KHR( VkCommandBuffer commandBuffer, const VkBlitImageInfo2 * pBlitImageInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdBlitImage2KHR( commandBuffer, pBlitImageInfo ); } void vkCmdResolveImage2KHR( VkCommandBuffer commandBuffer, const VkResolveImageInfo2 * pResolveImageInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdResolveImage2KHR( commandBuffer, pResolveImageInfo ); } //=== VK_EXT_device_fault === VkResult vkGetDeviceFaultInfoEXT( VkDevice device, VkDeviceFaultCountsEXT * pFaultCounts, VkDeviceFaultInfoEXT * pFaultInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkGetDeviceFaultInfoEXT( device, pFaultCounts, pFaultInfo ); } # if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_NV_acquire_winrt_display === VkResult vkAcquireWinrtDisplayNV( VkPhysicalDevice physicalDevice, VkDisplayKHR display ) const VULKAN_HPP_NOEXCEPT { return ::vkAcquireWinrtDisplayNV( physicalDevice, display ); } VkResult vkGetWinrtDisplayNV( VkPhysicalDevice physicalDevice, uint32_t deviceRelativeId, VkDisplayKHR * pDisplay ) const VULKAN_HPP_NOEXCEPT { return ::vkGetWinrtDisplayNV( physicalDevice, deviceRelativeId, pDisplay ); } # endif /*VK_USE_PLATFORM_WIN32_KHR*/ # if defined( VK_USE_PLATFORM_DIRECTFB_EXT ) //=== VK_EXT_directfb_surface === VkResult vkCreateDirectFBSurfaceEXT( VkInstance instance, const VkDirectFBSurfaceCreateInfoEXT * pCreateInfo, const VkAllocationCallbacks * pAllocator, VkSurfaceKHR * pSurface ) const VULKAN_HPP_NOEXCEPT { return ::vkCreateDirectFBSurfaceEXT( instance, pCreateInfo, pAllocator, pSurface ); } VkBool32 vkGetPhysicalDeviceDirectFBPresentationSupportEXT( VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, IDirectFB * dfb ) const VULKAN_HPP_NOEXCEPT { return ::vkGetPhysicalDeviceDirectFBPresentationSupportEXT( physicalDevice, queueFamilyIndex, dfb ); } # endif /*VK_USE_PLATFORM_DIRECTFB_EXT*/ //=== VK_EXT_vertex_input_dynamic_state === void vkCmdSetVertexInputEXT( VkCommandBuffer commandBuffer, uint32_t vertexBindingDescriptionCount, const VkVertexInputBindingDescription2EXT * pVertexBindingDescriptions, uint32_t vertexAttributeDescriptionCount, const VkVertexInputAttributeDescription2EXT * pVertexAttributeDescriptions ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetVertexInputEXT( commandBuffer, vertexBindingDescriptionCount, pVertexBindingDescriptions, vertexAttributeDescriptionCount, pVertexAttributeDescriptions ); } # if defined( VK_USE_PLATFORM_FUCHSIA ) //=== VK_FUCHSIA_external_memory === VkResult vkGetMemoryZirconHandleFUCHSIA( VkDevice device, const VkMemoryGetZirconHandleInfoFUCHSIA * pGetZirconHandleInfo, zx_handle_t * pZirconHandle ) const VULKAN_HPP_NOEXCEPT { return ::vkGetMemoryZirconHandleFUCHSIA( device, pGetZirconHandleInfo, pZirconHandle ); } VkResult vkGetMemoryZirconHandlePropertiesFUCHSIA( VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, zx_handle_t zirconHandle, VkMemoryZirconHandlePropertiesFUCHSIA * pMemoryZirconHandleProperties ) const VULKAN_HPP_NOEXCEPT { return ::vkGetMemoryZirconHandlePropertiesFUCHSIA( device, handleType, zirconHandle, pMemoryZirconHandleProperties ); } # endif /*VK_USE_PLATFORM_FUCHSIA*/ # if defined( VK_USE_PLATFORM_FUCHSIA ) //=== VK_FUCHSIA_external_semaphore === VkResult vkImportSemaphoreZirconHandleFUCHSIA( VkDevice device, const VkImportSemaphoreZirconHandleInfoFUCHSIA * pImportSemaphoreZirconHandleInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkImportSemaphoreZirconHandleFUCHSIA( device, pImportSemaphoreZirconHandleInfo ); } VkResult vkGetSemaphoreZirconHandleFUCHSIA( VkDevice device, const VkSemaphoreGetZirconHandleInfoFUCHSIA * pGetZirconHandleInfo, zx_handle_t * pZirconHandle ) const VULKAN_HPP_NOEXCEPT { return ::vkGetSemaphoreZirconHandleFUCHSIA( device, pGetZirconHandleInfo, pZirconHandle ); } # endif /*VK_USE_PLATFORM_FUCHSIA*/ # if defined( VK_USE_PLATFORM_FUCHSIA ) //=== VK_FUCHSIA_buffer_collection === VkResult vkCreateBufferCollectionFUCHSIA( VkDevice device, const VkBufferCollectionCreateInfoFUCHSIA * pCreateInfo, const VkAllocationCallbacks * pAllocator, VkBufferCollectionFUCHSIA * pCollection ) const VULKAN_HPP_NOEXCEPT { return ::vkCreateBufferCollectionFUCHSIA( device, pCreateInfo, pAllocator, pCollection ); } VkResult vkSetBufferCollectionImageConstraintsFUCHSIA( VkDevice device, VkBufferCollectionFUCHSIA collection, const VkImageConstraintsInfoFUCHSIA * pImageConstraintsInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkSetBufferCollectionImageConstraintsFUCHSIA( device, collection, pImageConstraintsInfo ); } VkResult vkSetBufferCollectionBufferConstraintsFUCHSIA( VkDevice device, VkBufferCollectionFUCHSIA collection, const VkBufferConstraintsInfoFUCHSIA * pBufferConstraintsInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkSetBufferCollectionBufferConstraintsFUCHSIA( device, collection, pBufferConstraintsInfo ); } void vkDestroyBufferCollectionFUCHSIA( VkDevice device, VkBufferCollectionFUCHSIA collection, const VkAllocationCallbacks * pAllocator ) const VULKAN_HPP_NOEXCEPT { return ::vkDestroyBufferCollectionFUCHSIA( device, collection, pAllocator ); } VkResult vkGetBufferCollectionPropertiesFUCHSIA( VkDevice device, VkBufferCollectionFUCHSIA collection, VkBufferCollectionPropertiesFUCHSIA * pProperties ) const VULKAN_HPP_NOEXCEPT { return ::vkGetBufferCollectionPropertiesFUCHSIA( device, collection, pProperties ); } # endif /*VK_USE_PLATFORM_FUCHSIA*/ //=== VK_HUAWEI_subpass_shading === VkResult vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI( VkDevice device, VkRenderPass renderpass, VkExtent2D * pMaxWorkgroupSize ) const VULKAN_HPP_NOEXCEPT { return ::vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI( device, renderpass, pMaxWorkgroupSize ); } void vkCmdSubpassShadingHUAWEI( VkCommandBuffer commandBuffer ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSubpassShadingHUAWEI( commandBuffer ); } //=== VK_HUAWEI_invocation_mask === void vkCmdBindInvocationMaskHUAWEI( VkCommandBuffer commandBuffer, VkImageView imageView, VkImageLayout imageLayout ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdBindInvocationMaskHUAWEI( commandBuffer, imageView, imageLayout ); } //=== VK_NV_external_memory_rdma === VkResult vkGetMemoryRemoteAddressNV( VkDevice device, const VkMemoryGetRemoteAddressInfoNV * pMemoryGetRemoteAddressInfo, VkRemoteAddressNV * pAddress ) const VULKAN_HPP_NOEXCEPT { return ::vkGetMemoryRemoteAddressNV( device, pMemoryGetRemoteAddressInfo, pAddress ); } //=== VK_EXT_pipeline_properties === VkResult vkGetPipelinePropertiesEXT( VkDevice device, const VkPipelineInfoEXT * pPipelineInfo, VkBaseOutStructure * pPipelineProperties ) const VULKAN_HPP_NOEXCEPT { return ::vkGetPipelinePropertiesEXT( device, pPipelineInfo, pPipelineProperties ); } //=== VK_EXT_extended_dynamic_state2 === void vkCmdSetPatchControlPointsEXT( VkCommandBuffer commandBuffer, uint32_t patchControlPoints ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetPatchControlPointsEXT( commandBuffer, patchControlPoints ); } void vkCmdSetRasterizerDiscardEnableEXT( VkCommandBuffer commandBuffer, VkBool32 rasterizerDiscardEnable ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetRasterizerDiscardEnableEXT( commandBuffer, rasterizerDiscardEnable ); } void vkCmdSetDepthBiasEnableEXT( VkCommandBuffer commandBuffer, VkBool32 depthBiasEnable ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetDepthBiasEnableEXT( commandBuffer, depthBiasEnable ); } void vkCmdSetLogicOpEXT( VkCommandBuffer commandBuffer, VkLogicOp logicOp ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetLogicOpEXT( commandBuffer, logicOp ); } void vkCmdSetPrimitiveRestartEnableEXT( VkCommandBuffer commandBuffer, VkBool32 primitiveRestartEnable ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetPrimitiveRestartEnableEXT( commandBuffer, primitiveRestartEnable ); } # if defined( VK_USE_PLATFORM_SCREEN_QNX ) //=== VK_QNX_screen_surface === VkResult vkCreateScreenSurfaceQNX( VkInstance instance, const VkScreenSurfaceCreateInfoQNX * pCreateInfo, const VkAllocationCallbacks * pAllocator, VkSurfaceKHR * pSurface ) const VULKAN_HPP_NOEXCEPT { return ::vkCreateScreenSurfaceQNX( instance, pCreateInfo, pAllocator, pSurface ); } VkBool32 vkGetPhysicalDeviceScreenPresentationSupportQNX( VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, struct _screen_window * window ) const VULKAN_HPP_NOEXCEPT { return ::vkGetPhysicalDeviceScreenPresentationSupportQNX( physicalDevice, queueFamilyIndex, window ); } # endif /*VK_USE_PLATFORM_SCREEN_QNX*/ //=== VK_EXT_color_write_enable === void vkCmdSetColorWriteEnableEXT( VkCommandBuffer commandBuffer, uint32_t attachmentCount, const VkBool32 * pColorWriteEnables ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetColorWriteEnableEXT( commandBuffer, attachmentCount, pColorWriteEnables ); } //=== VK_KHR_ray_tracing_maintenance1 === void vkCmdTraceRaysIndirect2KHR( VkCommandBuffer commandBuffer, VkDeviceAddress indirectDeviceAddress ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdTraceRaysIndirect2KHR( commandBuffer, indirectDeviceAddress ); } //=== VK_EXT_multi_draw === void vkCmdDrawMultiEXT( VkCommandBuffer commandBuffer, uint32_t drawCount, const VkMultiDrawInfoEXT * pVertexInfo, uint32_t instanceCount, uint32_t firstInstance, uint32_t stride ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdDrawMultiEXT( commandBuffer, drawCount, pVertexInfo, instanceCount, firstInstance, stride ); } void vkCmdDrawMultiIndexedEXT( VkCommandBuffer commandBuffer, uint32_t drawCount, const VkMultiDrawIndexedInfoEXT * pIndexInfo, uint32_t instanceCount, uint32_t firstInstance, uint32_t stride, const int32_t * pVertexOffset ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdDrawMultiIndexedEXT( commandBuffer, drawCount, pIndexInfo, instanceCount, firstInstance, stride, pVertexOffset ); } //=== VK_EXT_opacity_micromap === VkResult vkCreateMicromapEXT( VkDevice device, const VkMicromapCreateInfoEXT * pCreateInfo, const VkAllocationCallbacks * pAllocator, VkMicromapEXT * pMicromap ) const VULKAN_HPP_NOEXCEPT { return ::vkCreateMicromapEXT( device, pCreateInfo, pAllocator, pMicromap ); } void vkDestroyMicromapEXT( VkDevice device, VkMicromapEXT micromap, const VkAllocationCallbacks * pAllocator ) const VULKAN_HPP_NOEXCEPT { return ::vkDestroyMicromapEXT( device, micromap, pAllocator ); } void vkCmdBuildMicromapsEXT( VkCommandBuffer commandBuffer, uint32_t infoCount, const VkMicromapBuildInfoEXT * pInfos ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdBuildMicromapsEXT( commandBuffer, infoCount, pInfos ); } VkResult vkBuildMicromapsEXT( VkDevice device, VkDeferredOperationKHR deferredOperation, uint32_t infoCount, const VkMicromapBuildInfoEXT * pInfos ) const VULKAN_HPP_NOEXCEPT { return ::vkBuildMicromapsEXT( device, deferredOperation, infoCount, pInfos ); } VkResult vkCopyMicromapEXT( VkDevice device, VkDeferredOperationKHR deferredOperation, const VkCopyMicromapInfoEXT * pInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkCopyMicromapEXT( device, deferredOperation, pInfo ); } VkResult vkCopyMicromapToMemoryEXT( VkDevice device, VkDeferredOperationKHR deferredOperation, const VkCopyMicromapToMemoryInfoEXT * pInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkCopyMicromapToMemoryEXT( device, deferredOperation, pInfo ); } VkResult vkCopyMemoryToMicromapEXT( VkDevice device, VkDeferredOperationKHR deferredOperation, const VkCopyMemoryToMicromapInfoEXT * pInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkCopyMemoryToMicromapEXT( device, deferredOperation, pInfo ); } VkResult vkWriteMicromapsPropertiesEXT( VkDevice device, uint32_t micromapCount, const VkMicromapEXT * pMicromaps, VkQueryType queryType, size_t dataSize, void * pData, size_t stride ) const VULKAN_HPP_NOEXCEPT { return ::vkWriteMicromapsPropertiesEXT( device, micromapCount, pMicromaps, queryType, dataSize, pData, stride ); } void vkCmdCopyMicromapEXT( VkCommandBuffer commandBuffer, const VkCopyMicromapInfoEXT * pInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdCopyMicromapEXT( commandBuffer, pInfo ); } void vkCmdCopyMicromapToMemoryEXT( VkCommandBuffer commandBuffer, const VkCopyMicromapToMemoryInfoEXT * pInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdCopyMicromapToMemoryEXT( commandBuffer, pInfo ); } void vkCmdCopyMemoryToMicromapEXT( VkCommandBuffer commandBuffer, const VkCopyMemoryToMicromapInfoEXT * pInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdCopyMemoryToMicromapEXT( commandBuffer, pInfo ); } void vkCmdWriteMicromapsPropertiesEXT( VkCommandBuffer commandBuffer, uint32_t micromapCount, const VkMicromapEXT * pMicromaps, VkQueryType queryType, VkQueryPool queryPool, uint32_t firstQuery ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdWriteMicromapsPropertiesEXT( commandBuffer, micromapCount, pMicromaps, queryType, queryPool, firstQuery ); } void vkGetDeviceMicromapCompatibilityEXT( VkDevice device, const VkMicromapVersionInfoEXT * pVersionInfo, VkAccelerationStructureCompatibilityKHR * pCompatibility ) const VULKAN_HPP_NOEXCEPT { return ::vkGetDeviceMicromapCompatibilityEXT( device, pVersionInfo, pCompatibility ); } void vkGetMicromapBuildSizesEXT( VkDevice device, VkAccelerationStructureBuildTypeKHR buildType, const VkMicromapBuildInfoEXT * pBuildInfo, VkMicromapBuildSizesInfoEXT * pSizeInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkGetMicromapBuildSizesEXT( device, buildType, pBuildInfo, pSizeInfo ); } //=== VK_HUAWEI_cluster_culling_shader === void vkCmdDrawClusterHUAWEI( VkCommandBuffer commandBuffer, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdDrawClusterHUAWEI( commandBuffer, groupCountX, groupCountY, groupCountZ ); } void vkCmdDrawClusterIndirectHUAWEI( VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdDrawClusterIndirectHUAWEI( commandBuffer, buffer, offset ); } //=== VK_EXT_pageable_device_local_memory === void vkSetDeviceMemoryPriorityEXT( VkDevice device, VkDeviceMemory memory, float priority ) const VULKAN_HPP_NOEXCEPT { return ::vkSetDeviceMemoryPriorityEXT( device, memory, priority ); } //=== VK_KHR_maintenance4 === void vkGetDeviceBufferMemoryRequirementsKHR( VkDevice device, const VkDeviceBufferMemoryRequirements * pInfo, VkMemoryRequirements2 * pMemoryRequirements ) const VULKAN_HPP_NOEXCEPT { return ::vkGetDeviceBufferMemoryRequirementsKHR( device, pInfo, pMemoryRequirements ); } void vkGetDeviceImageMemoryRequirementsKHR( VkDevice device, const VkDeviceImageMemoryRequirements * pInfo, VkMemoryRequirements2 * pMemoryRequirements ) const VULKAN_HPP_NOEXCEPT { return ::vkGetDeviceImageMemoryRequirementsKHR( device, pInfo, pMemoryRequirements ); } void vkGetDeviceImageSparseMemoryRequirementsKHR( VkDevice device, const VkDeviceImageMemoryRequirements * pInfo, uint32_t * pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements2 * pSparseMemoryRequirements ) const VULKAN_HPP_NOEXCEPT { return ::vkGetDeviceImageSparseMemoryRequirementsKHR( device, pInfo, pSparseMemoryRequirementCount, pSparseMemoryRequirements ); } //=== VK_VALVE_descriptor_set_host_mapping === void vkGetDescriptorSetLayoutHostMappingInfoVALVE( VkDevice device, const VkDescriptorSetBindingReferenceVALVE * pBindingReference, VkDescriptorSetLayoutHostMappingInfoVALVE * pHostMapping ) const VULKAN_HPP_NOEXCEPT { return ::vkGetDescriptorSetLayoutHostMappingInfoVALVE( device, pBindingReference, pHostMapping ); } void vkGetDescriptorSetHostMappingVALVE( VkDevice device, VkDescriptorSet descriptorSet, void ** ppData ) const VULKAN_HPP_NOEXCEPT { return ::vkGetDescriptorSetHostMappingVALVE( device, descriptorSet, ppData ); } //=== VK_NV_copy_memory_indirect === void vkCmdCopyMemoryIndirectNV( VkCommandBuffer commandBuffer, VkDeviceAddress copyBufferAddress, uint32_t copyCount, uint32_t stride ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdCopyMemoryIndirectNV( commandBuffer, copyBufferAddress, copyCount, stride ); } void vkCmdCopyMemoryToImageIndirectNV( VkCommandBuffer commandBuffer, VkDeviceAddress copyBufferAddress, uint32_t copyCount, uint32_t stride, VkImage dstImage, VkImageLayout dstImageLayout, const VkImageSubresourceLayers * pImageSubresources ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdCopyMemoryToImageIndirectNV( commandBuffer, copyBufferAddress, copyCount, stride, dstImage, dstImageLayout, pImageSubresources ); } //=== VK_NV_memory_decompression === void vkCmdDecompressMemoryNV( VkCommandBuffer commandBuffer, uint32_t decompressRegionCount, const VkDecompressMemoryRegionNV * pDecompressMemoryRegions ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdDecompressMemoryNV( commandBuffer, decompressRegionCount, pDecompressMemoryRegions ); } void vkCmdDecompressMemoryIndirectCountNV( VkCommandBuffer commandBuffer, VkDeviceAddress indirectCommandsAddress, VkDeviceAddress indirectCommandsCountAddress, uint32_t stride ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdDecompressMemoryIndirectCountNV( commandBuffer, indirectCommandsAddress, indirectCommandsCountAddress, stride ); } //=== VK_NV_device_generated_commands_compute === void vkGetPipelineIndirectMemoryRequirementsNV( VkDevice device, const VkComputePipelineCreateInfo * pCreateInfo, VkMemoryRequirements2 * pMemoryRequirements ) const VULKAN_HPP_NOEXCEPT { return ::vkGetPipelineIndirectMemoryRequirementsNV( device, pCreateInfo, pMemoryRequirements ); } void vkCmdUpdatePipelineIndirectBufferNV( VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdUpdatePipelineIndirectBufferNV( commandBuffer, pipelineBindPoint, pipeline ); } VkDeviceAddress vkGetPipelineIndirectDeviceAddressNV( VkDevice device, const VkPipelineIndirectDeviceAddressInfoNV * pInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkGetPipelineIndirectDeviceAddressNV( device, pInfo ); } //=== VK_EXT_extended_dynamic_state3 === void vkCmdSetDepthClampEnableEXT( VkCommandBuffer commandBuffer, VkBool32 depthClampEnable ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetDepthClampEnableEXT( commandBuffer, depthClampEnable ); } void vkCmdSetPolygonModeEXT( VkCommandBuffer commandBuffer, VkPolygonMode polygonMode ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetPolygonModeEXT( commandBuffer, polygonMode ); } void vkCmdSetRasterizationSamplesEXT( VkCommandBuffer commandBuffer, VkSampleCountFlagBits rasterizationSamples ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetRasterizationSamplesEXT( commandBuffer, rasterizationSamples ); } void vkCmdSetSampleMaskEXT( VkCommandBuffer commandBuffer, VkSampleCountFlagBits samples, const VkSampleMask * pSampleMask ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetSampleMaskEXT( commandBuffer, samples, pSampleMask ); } void vkCmdSetAlphaToCoverageEnableEXT( VkCommandBuffer commandBuffer, VkBool32 alphaToCoverageEnable ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetAlphaToCoverageEnableEXT( commandBuffer, alphaToCoverageEnable ); } void vkCmdSetAlphaToOneEnableEXT( VkCommandBuffer commandBuffer, VkBool32 alphaToOneEnable ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetAlphaToOneEnableEXT( commandBuffer, alphaToOneEnable ); } void vkCmdSetLogicOpEnableEXT( VkCommandBuffer commandBuffer, VkBool32 logicOpEnable ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetLogicOpEnableEXT( commandBuffer, logicOpEnable ); } void vkCmdSetColorBlendEnableEXT( VkCommandBuffer commandBuffer, uint32_t firstAttachment, uint32_t attachmentCount, const VkBool32 * pColorBlendEnables ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetColorBlendEnableEXT( commandBuffer, firstAttachment, attachmentCount, pColorBlendEnables ); } void vkCmdSetColorBlendEquationEXT( VkCommandBuffer commandBuffer, uint32_t firstAttachment, uint32_t attachmentCount, const VkColorBlendEquationEXT * pColorBlendEquations ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetColorBlendEquationEXT( commandBuffer, firstAttachment, attachmentCount, pColorBlendEquations ); } void vkCmdSetColorWriteMaskEXT( VkCommandBuffer commandBuffer, uint32_t firstAttachment, uint32_t attachmentCount, const VkColorComponentFlags * pColorWriteMasks ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetColorWriteMaskEXT( commandBuffer, firstAttachment, attachmentCount, pColorWriteMasks ); } void vkCmdSetTessellationDomainOriginEXT( VkCommandBuffer commandBuffer, VkTessellationDomainOrigin domainOrigin ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetTessellationDomainOriginEXT( commandBuffer, domainOrigin ); } void vkCmdSetRasterizationStreamEXT( VkCommandBuffer commandBuffer, uint32_t rasterizationStream ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetRasterizationStreamEXT( commandBuffer, rasterizationStream ); } void vkCmdSetConservativeRasterizationModeEXT( VkCommandBuffer commandBuffer, VkConservativeRasterizationModeEXT conservativeRasterizationMode ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetConservativeRasterizationModeEXT( commandBuffer, conservativeRasterizationMode ); } void vkCmdSetExtraPrimitiveOverestimationSizeEXT( VkCommandBuffer commandBuffer, float extraPrimitiveOverestimationSize ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetExtraPrimitiveOverestimationSizeEXT( commandBuffer, extraPrimitiveOverestimationSize ); } void vkCmdSetDepthClipEnableEXT( VkCommandBuffer commandBuffer, VkBool32 depthClipEnable ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetDepthClipEnableEXT( commandBuffer, depthClipEnable ); } void vkCmdSetSampleLocationsEnableEXT( VkCommandBuffer commandBuffer, VkBool32 sampleLocationsEnable ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetSampleLocationsEnableEXT( commandBuffer, sampleLocationsEnable ); } void vkCmdSetColorBlendAdvancedEXT( VkCommandBuffer commandBuffer, uint32_t firstAttachment, uint32_t attachmentCount, const VkColorBlendAdvancedEXT * pColorBlendAdvanced ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetColorBlendAdvancedEXT( commandBuffer, firstAttachment, attachmentCount, pColorBlendAdvanced ); } void vkCmdSetProvokingVertexModeEXT( VkCommandBuffer commandBuffer, VkProvokingVertexModeEXT provokingVertexMode ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetProvokingVertexModeEXT( commandBuffer, provokingVertexMode ); } void vkCmdSetLineRasterizationModeEXT( VkCommandBuffer commandBuffer, VkLineRasterizationModeEXT lineRasterizationMode ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetLineRasterizationModeEXT( commandBuffer, lineRasterizationMode ); } void vkCmdSetLineStippleEnableEXT( VkCommandBuffer commandBuffer, VkBool32 stippledLineEnable ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetLineStippleEnableEXT( commandBuffer, stippledLineEnable ); } void vkCmdSetDepthClipNegativeOneToOneEXT( VkCommandBuffer commandBuffer, VkBool32 negativeOneToOne ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetDepthClipNegativeOneToOneEXT( commandBuffer, negativeOneToOne ); } void vkCmdSetViewportWScalingEnableNV( VkCommandBuffer commandBuffer, VkBool32 viewportWScalingEnable ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetViewportWScalingEnableNV( commandBuffer, viewportWScalingEnable ); } void vkCmdSetViewportSwizzleNV( VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, const VkViewportSwizzleNV * pViewportSwizzles ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetViewportSwizzleNV( commandBuffer, firstViewport, viewportCount, pViewportSwizzles ); } void vkCmdSetCoverageToColorEnableNV( VkCommandBuffer commandBuffer, VkBool32 coverageToColorEnable ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetCoverageToColorEnableNV( commandBuffer, coverageToColorEnable ); } void vkCmdSetCoverageToColorLocationNV( VkCommandBuffer commandBuffer, uint32_t coverageToColorLocation ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetCoverageToColorLocationNV( commandBuffer, coverageToColorLocation ); } void vkCmdSetCoverageModulationModeNV( VkCommandBuffer commandBuffer, VkCoverageModulationModeNV coverageModulationMode ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetCoverageModulationModeNV( commandBuffer, coverageModulationMode ); } void vkCmdSetCoverageModulationTableEnableNV( VkCommandBuffer commandBuffer, VkBool32 coverageModulationTableEnable ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetCoverageModulationTableEnableNV( commandBuffer, coverageModulationTableEnable ); } void vkCmdSetCoverageModulationTableNV( VkCommandBuffer commandBuffer, uint32_t coverageModulationTableCount, const float * pCoverageModulationTable ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetCoverageModulationTableNV( commandBuffer, coverageModulationTableCount, pCoverageModulationTable ); } void vkCmdSetShadingRateImageEnableNV( VkCommandBuffer commandBuffer, VkBool32 shadingRateImageEnable ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetShadingRateImageEnableNV( commandBuffer, shadingRateImageEnable ); } void vkCmdSetRepresentativeFragmentTestEnableNV( VkCommandBuffer commandBuffer, VkBool32 representativeFragmentTestEnable ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetRepresentativeFragmentTestEnableNV( commandBuffer, representativeFragmentTestEnable ); } void vkCmdSetCoverageReductionModeNV( VkCommandBuffer commandBuffer, VkCoverageReductionModeNV coverageReductionMode ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetCoverageReductionModeNV( commandBuffer, coverageReductionMode ); } //=== VK_EXT_shader_module_identifier === void vkGetShaderModuleIdentifierEXT( VkDevice device, VkShaderModule shaderModule, VkShaderModuleIdentifierEXT * pIdentifier ) const VULKAN_HPP_NOEXCEPT { return ::vkGetShaderModuleIdentifierEXT( device, shaderModule, pIdentifier ); } void vkGetShaderModuleCreateInfoIdentifierEXT( VkDevice device, const VkShaderModuleCreateInfo * pCreateInfo, VkShaderModuleIdentifierEXT * pIdentifier ) const VULKAN_HPP_NOEXCEPT { return ::vkGetShaderModuleCreateInfoIdentifierEXT( device, pCreateInfo, pIdentifier ); } //=== VK_NV_optical_flow === VkResult vkGetPhysicalDeviceOpticalFlowImageFormatsNV( VkPhysicalDevice physicalDevice, const VkOpticalFlowImageFormatInfoNV * pOpticalFlowImageFormatInfo, uint32_t * pFormatCount, VkOpticalFlowImageFormatPropertiesNV * pImageFormatProperties ) const VULKAN_HPP_NOEXCEPT { return ::vkGetPhysicalDeviceOpticalFlowImageFormatsNV( physicalDevice, pOpticalFlowImageFormatInfo, pFormatCount, pImageFormatProperties ); } VkResult vkCreateOpticalFlowSessionNV( VkDevice device, const VkOpticalFlowSessionCreateInfoNV * pCreateInfo, const VkAllocationCallbacks * pAllocator, VkOpticalFlowSessionNV * pSession ) const VULKAN_HPP_NOEXCEPT { return ::vkCreateOpticalFlowSessionNV( device, pCreateInfo, pAllocator, pSession ); } void vkDestroyOpticalFlowSessionNV( VkDevice device, VkOpticalFlowSessionNV session, const VkAllocationCallbacks * pAllocator ) const VULKAN_HPP_NOEXCEPT { return ::vkDestroyOpticalFlowSessionNV( device, session, pAllocator ); } VkResult vkBindOpticalFlowSessionImageNV( VkDevice device, VkOpticalFlowSessionNV session, VkOpticalFlowSessionBindingPointNV bindingPoint, VkImageView view, VkImageLayout layout ) const VULKAN_HPP_NOEXCEPT { return ::vkBindOpticalFlowSessionImageNV( device, session, bindingPoint, view, layout ); } void vkCmdOpticalFlowExecuteNV( VkCommandBuffer commandBuffer, VkOpticalFlowSessionNV session, const VkOpticalFlowExecuteInfoNV * pExecuteInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdOpticalFlowExecuteNV( commandBuffer, session, pExecuteInfo ); } //=== VK_KHR_maintenance5 === void vkCmdBindIndexBuffer2KHR( VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkDeviceSize size, VkIndexType indexType ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdBindIndexBuffer2KHR( commandBuffer, buffer, offset, size, indexType ); } void vkGetRenderingAreaGranularityKHR( VkDevice device, const VkRenderingAreaInfo * pRenderingAreaInfo, VkExtent2D * pGranularity ) const VULKAN_HPP_NOEXCEPT { return ::vkGetRenderingAreaGranularityKHR( device, pRenderingAreaInfo, pGranularity ); } void vkGetDeviceImageSubresourceLayoutKHR( VkDevice device, const VkDeviceImageSubresourceInfo * pInfo, VkSubresourceLayout2 * pLayout ) const VULKAN_HPP_NOEXCEPT { return ::vkGetDeviceImageSubresourceLayoutKHR( device, pInfo, pLayout ); } void vkGetImageSubresourceLayout2KHR( VkDevice device, VkImage image, const VkImageSubresource2 * pSubresource, VkSubresourceLayout2 * pLayout ) const VULKAN_HPP_NOEXCEPT { return ::vkGetImageSubresourceLayout2KHR( device, image, pSubresource, pLayout ); } //=== VK_AMD_anti_lag === void vkAntiLagUpdateAMD( VkDevice device, const VkAntiLagDataAMD * pData ) const VULKAN_HPP_NOEXCEPT { return ::vkAntiLagUpdateAMD( device, pData ); } //=== VK_EXT_shader_object === VkResult vkCreateShadersEXT( VkDevice device, uint32_t createInfoCount, const VkShaderCreateInfoEXT * pCreateInfos, const VkAllocationCallbacks * pAllocator, VkShaderEXT * pShaders ) const VULKAN_HPP_NOEXCEPT { return ::vkCreateShadersEXT( device, createInfoCount, pCreateInfos, pAllocator, pShaders ); } void vkDestroyShaderEXT( VkDevice device, VkShaderEXT shader, const VkAllocationCallbacks * pAllocator ) const VULKAN_HPP_NOEXCEPT { return ::vkDestroyShaderEXT( device, shader, pAllocator ); } VkResult vkGetShaderBinaryDataEXT( VkDevice device, VkShaderEXT shader, size_t * pDataSize, void * pData ) const VULKAN_HPP_NOEXCEPT { return ::vkGetShaderBinaryDataEXT( device, shader, pDataSize, pData ); } void vkCmdBindShadersEXT( VkCommandBuffer commandBuffer, uint32_t stageCount, const VkShaderStageFlagBits * pStages, const VkShaderEXT * pShaders ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdBindShadersEXT( commandBuffer, stageCount, pStages, pShaders ); } void vkCmdSetDepthClampRangeEXT( VkCommandBuffer commandBuffer, VkDepthClampModeEXT depthClampMode, const VkDepthClampRangeEXT * pDepthClampRange ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetDepthClampRangeEXT( commandBuffer, depthClampMode, pDepthClampRange ); } //=== VK_KHR_pipeline_binary === VkResult vkCreatePipelineBinariesKHR( VkDevice device, const VkPipelineBinaryCreateInfoKHR * pCreateInfo, const VkAllocationCallbacks * pAllocator, VkPipelineBinaryHandlesInfoKHR * pBinaries ) const VULKAN_HPP_NOEXCEPT { return ::vkCreatePipelineBinariesKHR( device, pCreateInfo, pAllocator, pBinaries ); } void vkDestroyPipelineBinaryKHR( VkDevice device, VkPipelineBinaryKHR pipelineBinary, const VkAllocationCallbacks * pAllocator ) const VULKAN_HPP_NOEXCEPT { return ::vkDestroyPipelineBinaryKHR( device, pipelineBinary, pAllocator ); } VkResult vkGetPipelineKeyKHR( VkDevice device, const VkPipelineCreateInfoKHR * pPipelineCreateInfo, VkPipelineBinaryKeyKHR * pPipelineKey ) const VULKAN_HPP_NOEXCEPT { return ::vkGetPipelineKeyKHR( device, pPipelineCreateInfo, pPipelineKey ); } VkResult vkGetPipelineBinaryDataKHR( VkDevice device, const VkPipelineBinaryDataInfoKHR * pInfo, VkPipelineBinaryKeyKHR * pPipelineBinaryKey, size_t * pPipelineBinaryDataSize, void * pPipelineBinaryData ) const VULKAN_HPP_NOEXCEPT { return ::vkGetPipelineBinaryDataKHR( device, pInfo, pPipelineBinaryKey, pPipelineBinaryDataSize, pPipelineBinaryData ); } VkResult vkReleaseCapturedPipelineDataKHR( VkDevice device, const VkReleaseCapturedPipelineDataInfoKHR * pInfo, const VkAllocationCallbacks * pAllocator ) const VULKAN_HPP_NOEXCEPT { return ::vkReleaseCapturedPipelineDataKHR( device, pInfo, pAllocator ); } //=== VK_QCOM_tile_properties === VkResult vkGetFramebufferTilePropertiesQCOM( VkDevice device, VkFramebuffer framebuffer, uint32_t * pPropertiesCount, VkTilePropertiesQCOM * pProperties ) const VULKAN_HPP_NOEXCEPT { return ::vkGetFramebufferTilePropertiesQCOM( device, framebuffer, pPropertiesCount, pProperties ); } VkResult vkGetDynamicRenderingTilePropertiesQCOM( VkDevice device, const VkRenderingInfo * pRenderingInfo, VkTilePropertiesQCOM * pProperties ) const VULKAN_HPP_NOEXCEPT { return ::vkGetDynamicRenderingTilePropertiesQCOM( device, pRenderingInfo, pProperties ); } //=== VK_NV_cooperative_vector === VkResult vkGetPhysicalDeviceCooperativeVectorPropertiesNV( VkPhysicalDevice physicalDevice, uint32_t * pPropertyCount, VkCooperativeVectorPropertiesNV * pProperties ) const VULKAN_HPP_NOEXCEPT { return ::vkGetPhysicalDeviceCooperativeVectorPropertiesNV( physicalDevice, pPropertyCount, pProperties ); } VkResult vkConvertCooperativeVectorMatrixNV( VkDevice device, const VkConvertCooperativeVectorMatrixInfoNV * pInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkConvertCooperativeVectorMatrixNV( device, pInfo ); } void vkCmdConvertCooperativeVectorMatrixNV( VkCommandBuffer commandBuffer, uint32_t infoCount, const VkConvertCooperativeVectorMatrixInfoNV * pInfos ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdConvertCooperativeVectorMatrixNV( commandBuffer, infoCount, pInfos ); } //=== VK_NV_low_latency2 === VkResult vkSetLatencySleepModeNV( VkDevice device, VkSwapchainKHR swapchain, const VkLatencySleepModeInfoNV * pSleepModeInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkSetLatencySleepModeNV( device, swapchain, pSleepModeInfo ); } VkResult vkLatencySleepNV( VkDevice device, VkSwapchainKHR swapchain, const VkLatencySleepInfoNV * pSleepInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkLatencySleepNV( device, swapchain, pSleepInfo ); } void vkSetLatencyMarkerNV( VkDevice device, VkSwapchainKHR swapchain, const VkSetLatencyMarkerInfoNV * pLatencyMarkerInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkSetLatencyMarkerNV( device, swapchain, pLatencyMarkerInfo ); } void vkGetLatencyTimingsNV( VkDevice device, VkSwapchainKHR swapchain, VkGetLatencyMarkerInfoNV * pLatencyMarkerInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkGetLatencyTimingsNV( device, swapchain, pLatencyMarkerInfo ); } void vkQueueNotifyOutOfBandNV( VkQueue queue, const VkOutOfBandQueueTypeInfoNV * pQueueTypeInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkQueueNotifyOutOfBandNV( queue, pQueueTypeInfo ); } //=== VK_KHR_cooperative_matrix === VkResult vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR( VkPhysicalDevice physicalDevice, uint32_t * pPropertyCount, VkCooperativeMatrixPropertiesKHR * pProperties ) const VULKAN_HPP_NOEXCEPT { return ::vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR( physicalDevice, pPropertyCount, pProperties ); } //=== VK_EXT_attachment_feedback_loop_dynamic_state === void vkCmdSetAttachmentFeedbackLoopEnableEXT( VkCommandBuffer commandBuffer, VkImageAspectFlags aspectMask ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetAttachmentFeedbackLoopEnableEXT( commandBuffer, aspectMask ); } # if defined( VK_USE_PLATFORM_SCREEN_QNX ) //=== VK_QNX_external_memory_screen_buffer === VkResult vkGetScreenBufferPropertiesQNX( VkDevice device, const struct _screen_buffer * buffer, VkScreenBufferPropertiesQNX * pProperties ) const VULKAN_HPP_NOEXCEPT { return ::vkGetScreenBufferPropertiesQNX( device, buffer, pProperties ); } # endif /*VK_USE_PLATFORM_SCREEN_QNX*/ //=== VK_KHR_line_rasterization === void vkCmdSetLineStippleKHR( VkCommandBuffer commandBuffer, uint32_t lineStippleFactor, uint16_t lineStipplePattern ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetLineStippleKHR( commandBuffer, lineStippleFactor, lineStipplePattern ); } //=== VK_KHR_calibrated_timestamps === VkResult vkGetPhysicalDeviceCalibrateableTimeDomainsKHR( VkPhysicalDevice physicalDevice, uint32_t * pTimeDomainCount, VkTimeDomainKHR * pTimeDomains ) const VULKAN_HPP_NOEXCEPT { return ::vkGetPhysicalDeviceCalibrateableTimeDomainsKHR( physicalDevice, pTimeDomainCount, pTimeDomains ); } VkResult vkGetCalibratedTimestampsKHR( VkDevice device, uint32_t timestampCount, const VkCalibratedTimestampInfoKHR * pTimestampInfos, uint64_t * pTimestamps, uint64_t * pMaxDeviation ) const VULKAN_HPP_NOEXCEPT { return ::vkGetCalibratedTimestampsKHR( device, timestampCount, pTimestampInfos, pTimestamps, pMaxDeviation ); } //=== VK_KHR_maintenance6 === void vkCmdBindDescriptorSets2KHR( VkCommandBuffer commandBuffer, const VkBindDescriptorSetsInfo * pBindDescriptorSetsInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdBindDescriptorSets2KHR( commandBuffer, pBindDescriptorSetsInfo ); } void vkCmdPushConstants2KHR( VkCommandBuffer commandBuffer, const VkPushConstantsInfo * pPushConstantsInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdPushConstants2KHR( commandBuffer, pPushConstantsInfo ); } void vkCmdPushDescriptorSet2KHR( VkCommandBuffer commandBuffer, const VkPushDescriptorSetInfo * pPushDescriptorSetInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdPushDescriptorSet2KHR( commandBuffer, pPushDescriptorSetInfo ); } void vkCmdPushDescriptorSetWithTemplate2KHR( VkCommandBuffer commandBuffer, const VkPushDescriptorSetWithTemplateInfo * pPushDescriptorSetWithTemplateInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdPushDescriptorSetWithTemplate2KHR( commandBuffer, pPushDescriptorSetWithTemplateInfo ); } void vkCmdSetDescriptorBufferOffsets2EXT( VkCommandBuffer commandBuffer, const VkSetDescriptorBufferOffsetsInfoEXT * pSetDescriptorBufferOffsetsInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdSetDescriptorBufferOffsets2EXT( commandBuffer, pSetDescriptorBufferOffsetsInfo ); } void vkCmdBindDescriptorBufferEmbeddedSamplers2EXT( VkCommandBuffer commandBuffer, const VkBindDescriptorBufferEmbeddedSamplersInfoEXT * pBindDescriptorBufferEmbeddedSamplersInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdBindDescriptorBufferEmbeddedSamplers2EXT( commandBuffer, pBindDescriptorBufferEmbeddedSamplersInfo ); } //=== VK_NV_cluster_acceleration_structure === void vkGetClusterAccelerationStructureBuildSizesNV( VkDevice device, const VkClusterAccelerationStructureInputInfoNV * pInfo, VkAccelerationStructureBuildSizesInfoKHR * pSizeInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkGetClusterAccelerationStructureBuildSizesNV( device, pInfo, pSizeInfo ); } void vkCmdBuildClusterAccelerationStructureIndirectNV( VkCommandBuffer commandBuffer, const VkClusterAccelerationStructureCommandsInfoNV * pCommandInfos ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdBuildClusterAccelerationStructureIndirectNV( commandBuffer, pCommandInfos ); } //=== VK_NV_partitioned_acceleration_structure === void vkGetPartitionedAccelerationStructuresBuildSizesNV( VkDevice device, const VkPartitionedAccelerationStructureInstancesInputNV * pInfo, VkAccelerationStructureBuildSizesInfoKHR * pSizeInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkGetPartitionedAccelerationStructuresBuildSizesNV( device, pInfo, pSizeInfo ); } void vkCmdBuildPartitionedAccelerationStructuresNV( VkCommandBuffer commandBuffer, const VkBuildPartitionedAccelerationStructureInfoNV * pBuildInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdBuildPartitionedAccelerationStructuresNV( commandBuffer, pBuildInfo ); } //=== VK_EXT_device_generated_commands === void vkGetGeneratedCommandsMemoryRequirementsEXT( VkDevice device, const VkGeneratedCommandsMemoryRequirementsInfoEXT * pInfo, VkMemoryRequirements2 * pMemoryRequirements ) const VULKAN_HPP_NOEXCEPT { return ::vkGetGeneratedCommandsMemoryRequirementsEXT( device, pInfo, pMemoryRequirements ); } void vkCmdPreprocessGeneratedCommandsEXT( VkCommandBuffer commandBuffer, const VkGeneratedCommandsInfoEXT * pGeneratedCommandsInfo, VkCommandBuffer stateCommandBuffer ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdPreprocessGeneratedCommandsEXT( commandBuffer, pGeneratedCommandsInfo, stateCommandBuffer ); } void vkCmdExecuteGeneratedCommandsEXT( VkCommandBuffer commandBuffer, VkBool32 isPreprocessed, const VkGeneratedCommandsInfoEXT * pGeneratedCommandsInfo ) const VULKAN_HPP_NOEXCEPT { return ::vkCmdExecuteGeneratedCommandsEXT( commandBuffer, isPreprocessed, pGeneratedCommandsInfo ); } VkResult vkCreateIndirectCommandsLayoutEXT( VkDevice device, const VkIndirectCommandsLayoutCreateInfoEXT * pCreateInfo, const VkAllocationCallbacks * pAllocator, VkIndirectCommandsLayoutEXT * pIndirectCommandsLayout ) const VULKAN_HPP_NOEXCEPT { return ::vkCreateIndirectCommandsLayoutEXT( device, pCreateInfo, pAllocator, pIndirectCommandsLayout ); } void vkDestroyIndirectCommandsLayoutEXT( VkDevice device, VkIndirectCommandsLayoutEXT indirectCommandsLayout, const VkAllocationCallbacks * pAllocator ) const VULKAN_HPP_NOEXCEPT { return ::vkDestroyIndirectCommandsLayoutEXT( device, indirectCommandsLayout, pAllocator ); } VkResult vkCreateIndirectExecutionSetEXT( VkDevice device, const VkIndirectExecutionSetCreateInfoEXT * pCreateInfo, const VkAllocationCallbacks * pAllocator, VkIndirectExecutionSetEXT * pIndirectExecutionSet ) const VULKAN_HPP_NOEXCEPT { return ::vkCreateIndirectExecutionSetEXT( device, pCreateInfo, pAllocator, pIndirectExecutionSet ); } void vkDestroyIndirectExecutionSetEXT( VkDevice device, VkIndirectExecutionSetEXT indirectExecutionSet, const VkAllocationCallbacks * pAllocator ) const VULKAN_HPP_NOEXCEPT { return ::vkDestroyIndirectExecutionSetEXT( device, indirectExecutionSet, pAllocator ); } void vkUpdateIndirectExecutionSetPipelineEXT( VkDevice device, VkIndirectExecutionSetEXT indirectExecutionSet, uint32_t executionSetWriteCount, const VkWriteIndirectExecutionSetPipelineEXT * pExecutionSetWrites ) const VULKAN_HPP_NOEXCEPT { return ::vkUpdateIndirectExecutionSetPipelineEXT( device, indirectExecutionSet, executionSetWriteCount, pExecutionSetWrites ); } void vkUpdateIndirectExecutionSetShaderEXT( VkDevice device, VkIndirectExecutionSetEXT indirectExecutionSet, uint32_t executionSetWriteCount, const VkWriteIndirectExecutionSetShaderEXT * pExecutionSetWrites ) const VULKAN_HPP_NOEXCEPT { return ::vkUpdateIndirectExecutionSetShaderEXT( device, indirectExecutionSet, executionSetWriteCount, pExecutionSetWrites ); } //=== VK_NV_cooperative_matrix2 === VkResult vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV( VkPhysicalDevice physicalDevice, uint32_t * pPropertyCount, VkCooperativeMatrixFlexibleDimensionsPropertiesNV * pProperties ) const VULKAN_HPP_NOEXCEPT { return ::vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV( physicalDevice, pPropertyCount, pProperties ); } # if defined( VK_USE_PLATFORM_METAL_EXT ) //=== VK_EXT_external_memory_metal === VkResult vkGetMemoryMetalHandleEXT( VkDevice device, const VkMemoryGetMetalHandleInfoEXT * pGetMetalHandleInfo, void ** pHandle ) const VULKAN_HPP_NOEXCEPT { return ::vkGetMemoryMetalHandleEXT( device, pGetMetalHandleInfo, pHandle ); } VkResult vkGetMemoryMetalHandlePropertiesEXT( VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, const void * pHandle, VkMemoryMetalHandlePropertiesEXT * pMemoryMetalHandleProperties ) const VULKAN_HPP_NOEXCEPT { return ::vkGetMemoryMetalHandlePropertiesEXT( device, handleType, pHandle, pMemoryMetalHandleProperties ); } # endif /*VK_USE_PLATFORM_METAL_EXT*/ }; inline DispatchLoaderStatic & getDispatchLoaderStatic() { static DispatchLoaderStatic dls; return dls; } #endif } // namespace detail #if ( 14 <= VULKAN_HPP_CPP_VERSION ) using std::exchange; #else template VULKAN_HPP_CONSTEXPR_14 VULKAN_HPP_INLINE T exchange( T & obj, U && newValue ) { T oldValue = std::move( obj ); obj = std::forward( newValue ); return oldValue; } #endif #if !defined( VULKAN_HPP_NO_SMART_HANDLE ) struct AllocationCallbacks; namespace detail { template class ObjectDestroy { public: ObjectDestroy() = default; ObjectDestroy( OwnerType owner, Optional allocationCallbacks VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & dispatch VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) VULKAN_HPP_NOEXCEPT : m_owner( owner ) , m_allocationCallbacks( allocationCallbacks ) , m_dispatch( &dispatch ) { } OwnerType getOwner() const VULKAN_HPP_NOEXCEPT { return m_owner; } Optional getAllocator() const VULKAN_HPP_NOEXCEPT { return m_allocationCallbacks; } Dispatch const & getDispatch() const VULKAN_HPP_NOEXCEPT { return *m_dispatch; } protected: template void destroy( T t ) VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( m_owner && m_dispatch ); m_owner.destroy( t, m_allocationCallbacks, *m_dispatch ); } private: OwnerType m_owner = {}; Optional m_allocationCallbacks = nullptr; Dispatch const * m_dispatch = nullptr; }; class NoParent; template class ObjectDestroy { public: ObjectDestroy() = default; ObjectDestroy( Optional allocationCallbacks, Dispatch const & dispatch VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) VULKAN_HPP_NOEXCEPT : m_allocationCallbacks( allocationCallbacks ) , m_dispatch( &dispatch ) { } Optional getAllocator() const VULKAN_HPP_NOEXCEPT { return m_allocationCallbacks; } Dispatch const & getDispatch() const VULKAN_HPP_NOEXCEPT { return *m_dispatch; } protected: template void destroy( T t ) VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( m_dispatch ); t.destroy( m_allocationCallbacks, *m_dispatch ); } private: Optional m_allocationCallbacks = nullptr; Dispatch const * m_dispatch = nullptr; }; template class ObjectFree { public: ObjectFree() = default; ObjectFree( OwnerType owner, Optional allocationCallbacks VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & dispatch VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) VULKAN_HPP_NOEXCEPT : m_owner( owner ) , m_allocationCallbacks( allocationCallbacks ) , m_dispatch( &dispatch ) { } OwnerType getOwner() const VULKAN_HPP_NOEXCEPT { return m_owner; } Optional getAllocator() const VULKAN_HPP_NOEXCEPT { return m_allocationCallbacks; } Dispatch const & getDispatch() const VULKAN_HPP_NOEXCEPT { return *m_dispatch; } protected: template void destroy( T t ) VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( m_owner && m_dispatch ); ( m_owner.free )( t, m_allocationCallbacks, *m_dispatch ); } private: OwnerType m_owner = {}; Optional m_allocationCallbacks = nullptr; Dispatch const * m_dispatch = nullptr; }; template class ObjectRelease { public: ObjectRelease() = default; ObjectRelease( OwnerType owner, Dispatch const & dispatch VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) VULKAN_HPP_NOEXCEPT : m_owner( owner ) , m_dispatch( &dispatch ) { } OwnerType getOwner() const VULKAN_HPP_NOEXCEPT { return m_owner; } Dispatch const & getDispatch() const VULKAN_HPP_NOEXCEPT { return *m_dispatch; } protected: template void destroy( T t ) VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( m_owner && m_dispatch ); m_owner.release( t, *m_dispatch ); } private: OwnerType m_owner = {}; Dispatch const * m_dispatch = nullptr; }; template class PoolFree { public: PoolFree() = default; PoolFree( OwnerType owner, PoolType pool, Dispatch const & dispatch VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) VULKAN_HPP_NOEXCEPT : m_owner( owner ) , m_pool( pool ) , m_dispatch( &dispatch ) { } OwnerType getOwner() const VULKAN_HPP_NOEXCEPT { return m_owner; } PoolType getPool() const VULKAN_HPP_NOEXCEPT { return m_pool; } Dispatch const & getDispatch() const VULKAN_HPP_NOEXCEPT { return *m_dispatch; } protected: template void destroy( T t ) VULKAN_HPP_NOEXCEPT { ( m_owner.free )( m_pool, t, *m_dispatch ); } private: OwnerType m_owner = OwnerType(); PoolType m_pool = PoolType(); Dispatch const * m_dispatch = nullptr; }; } // namespace detail #endif // !VULKAN_HPP_NO_SMART_HANDLE //================== //=== BASE TYPEs === //================== using Bool32 = uint32_t; using DeviceAddress = uint64_t; using DeviceSize = uint64_t; using RemoteAddressNV = void *; using SampleMask = uint32_t; template struct CppType { }; } // namespace VULKAN_HPP_NAMESPACE #include #if !defined( VULKAN_HPP_NO_TO_STRING ) # include #endif #ifndef VULKAN_HPP_NO_EXCEPTIONS namespace std { template <> struct is_error_code_enum : public true_type { }; } // namespace std #endif namespace VULKAN_HPP_NAMESPACE { #ifndef VULKAN_HPP_NO_EXCEPTIONS class ErrorCategoryImpl : public std::error_category { public: virtual const char * name() const VULKAN_HPP_NOEXCEPT override { return VULKAN_HPP_NAMESPACE_STRING "::Result"; } virtual std::string message( int ev ) const override { # if defined( VULKAN_HPP_NO_TO_STRING ) return std::to_string( ev ); # else return VULKAN_HPP_NAMESPACE::to_string( static_cast( ev ) ); # endif } }; class Error { public: Error() VULKAN_HPP_NOEXCEPT = default; Error( const Error & ) VULKAN_HPP_NOEXCEPT = default; virtual ~Error() VULKAN_HPP_NOEXCEPT = default; virtual const char * what() const VULKAN_HPP_NOEXCEPT = 0; }; class LogicError : public Error , public std::logic_error { public: explicit LogicError( const std::string & what ) : Error(), std::logic_error( what ) {} explicit LogicError( char const * what ) : Error(), std::logic_error( what ) {} virtual const char * what() const VULKAN_HPP_NOEXCEPT { return std::logic_error::what(); } }; class SystemError : public Error , public std::system_error { public: SystemError( std::error_code ec ) : Error(), std::system_error( ec ) {} SystemError( std::error_code ec, std::string const & what ) : Error(), std::system_error( ec, what ) {} SystemError( std::error_code ec, char const * what ) : Error(), std::system_error( ec, what ) {} SystemError( int ev, std::error_category const & ecat ) : Error(), std::system_error( ev, ecat ) {} SystemError( int ev, std::error_category const & ecat, std::string const & what ) : Error(), std::system_error( ev, ecat, what ) {} SystemError( int ev, std::error_category const & ecat, char const * what ) : Error(), std::system_error( ev, ecat, what ) {} virtual const char * what() const VULKAN_HPP_NOEXCEPT { return std::system_error::what(); } }; VULKAN_HPP_INLINE const std::error_category & errorCategory() VULKAN_HPP_NOEXCEPT { static ErrorCategoryImpl instance; return instance; } VULKAN_HPP_INLINE std::error_code make_error_code( Result e ) VULKAN_HPP_NOEXCEPT { return std::error_code( static_cast( e ), errorCategory() ); } VULKAN_HPP_INLINE std::error_condition make_error_condition( Result e ) VULKAN_HPP_NOEXCEPT { return std::error_condition( static_cast( e ), errorCategory() ); } class OutOfHostMemoryError : public SystemError { public: OutOfHostMemoryError( std::string const & message ) : SystemError( make_error_code( Result::eErrorOutOfHostMemory ), message ) {} OutOfHostMemoryError( char const * message ) : SystemError( make_error_code( Result::eErrorOutOfHostMemory ), message ) {} }; class OutOfDeviceMemoryError : public SystemError { public: OutOfDeviceMemoryError( std::string const & message ) : SystemError( make_error_code( Result::eErrorOutOfDeviceMemory ), message ) {} OutOfDeviceMemoryError( char const * message ) : SystemError( make_error_code( Result::eErrorOutOfDeviceMemory ), message ) {} }; class InitializationFailedError : public SystemError { public: InitializationFailedError( std::string const & message ) : SystemError( make_error_code( Result::eErrorInitializationFailed ), message ) {} InitializationFailedError( char const * message ) : SystemError( make_error_code( Result::eErrorInitializationFailed ), message ) {} }; class DeviceLostError : public SystemError { public: DeviceLostError( std::string const & message ) : SystemError( make_error_code( Result::eErrorDeviceLost ), message ) {} DeviceLostError( char const * message ) : SystemError( make_error_code( Result::eErrorDeviceLost ), message ) {} }; class MemoryMapFailedError : public SystemError { public: MemoryMapFailedError( std::string const & message ) : SystemError( make_error_code( Result::eErrorMemoryMapFailed ), message ) {} MemoryMapFailedError( char const * message ) : SystemError( make_error_code( Result::eErrorMemoryMapFailed ), message ) {} }; class LayerNotPresentError : public SystemError { public: LayerNotPresentError( std::string const & message ) : SystemError( make_error_code( Result::eErrorLayerNotPresent ), message ) {} LayerNotPresentError( char const * message ) : SystemError( make_error_code( Result::eErrorLayerNotPresent ), message ) {} }; class ExtensionNotPresentError : public SystemError { public: ExtensionNotPresentError( std::string const & message ) : SystemError( make_error_code( Result::eErrorExtensionNotPresent ), message ) {} ExtensionNotPresentError( char const * message ) : SystemError( make_error_code( Result::eErrorExtensionNotPresent ), message ) {} }; class FeatureNotPresentError : public SystemError { public: FeatureNotPresentError( std::string const & message ) : SystemError( make_error_code( Result::eErrorFeatureNotPresent ), message ) {} FeatureNotPresentError( char const * message ) : SystemError( make_error_code( Result::eErrorFeatureNotPresent ), message ) {} }; class IncompatibleDriverError : public SystemError { public: IncompatibleDriverError( std::string const & message ) : SystemError( make_error_code( Result::eErrorIncompatibleDriver ), message ) {} IncompatibleDriverError( char const * message ) : SystemError( make_error_code( Result::eErrorIncompatibleDriver ), message ) {} }; class TooManyObjectsError : public SystemError { public: TooManyObjectsError( std::string const & message ) : SystemError( make_error_code( Result::eErrorTooManyObjects ), message ) {} TooManyObjectsError( char const * message ) : SystemError( make_error_code( Result::eErrorTooManyObjects ), message ) {} }; class FormatNotSupportedError : public SystemError { public: FormatNotSupportedError( std::string const & message ) : SystemError( make_error_code( Result::eErrorFormatNotSupported ), message ) {} FormatNotSupportedError( char const * message ) : SystemError( make_error_code( Result::eErrorFormatNotSupported ), message ) {} }; class FragmentedPoolError : public SystemError { public: FragmentedPoolError( std::string const & message ) : SystemError( make_error_code( Result::eErrorFragmentedPool ), message ) {} FragmentedPoolError( char const * message ) : SystemError( make_error_code( Result::eErrorFragmentedPool ), message ) {} }; class UnknownError : public SystemError { public: UnknownError( std::string const & message ) : SystemError( make_error_code( Result::eErrorUnknown ), message ) {} UnknownError( char const * message ) : SystemError( make_error_code( Result::eErrorUnknown ), message ) {} }; class OutOfPoolMemoryError : public SystemError { public: OutOfPoolMemoryError( std::string const & message ) : SystemError( make_error_code( Result::eErrorOutOfPoolMemory ), message ) {} OutOfPoolMemoryError( char const * message ) : SystemError( make_error_code( Result::eErrorOutOfPoolMemory ), message ) {} }; class InvalidExternalHandleError : public SystemError { public: InvalidExternalHandleError( std::string const & message ) : SystemError( make_error_code( Result::eErrorInvalidExternalHandle ), message ) {} InvalidExternalHandleError( char const * message ) : SystemError( make_error_code( Result::eErrorInvalidExternalHandle ), message ) {} }; class FragmentationError : public SystemError { public: FragmentationError( std::string const & message ) : SystemError( make_error_code( Result::eErrorFragmentation ), message ) {} FragmentationError( char const * message ) : SystemError( make_error_code( Result::eErrorFragmentation ), message ) {} }; class InvalidOpaqueCaptureAddressError : public SystemError { public: InvalidOpaqueCaptureAddressError( std::string const & message ) : SystemError( make_error_code( Result::eErrorInvalidOpaqueCaptureAddress ), message ) {} InvalidOpaqueCaptureAddressError( char const * message ) : SystemError( make_error_code( Result::eErrorInvalidOpaqueCaptureAddress ), message ) {} }; class NotPermittedError : public SystemError { public: NotPermittedError( std::string const & message ) : SystemError( make_error_code( Result::eErrorNotPermitted ), message ) {} NotPermittedError( char const * message ) : SystemError( make_error_code( Result::eErrorNotPermitted ), message ) {} }; class SurfaceLostKHRError : public SystemError { public: SurfaceLostKHRError( std::string const & message ) : SystemError( make_error_code( Result::eErrorSurfaceLostKHR ), message ) {} SurfaceLostKHRError( char const * message ) : SystemError( make_error_code( Result::eErrorSurfaceLostKHR ), message ) {} }; class NativeWindowInUseKHRError : public SystemError { public: NativeWindowInUseKHRError( std::string const & message ) : SystemError( make_error_code( Result::eErrorNativeWindowInUseKHR ), message ) {} NativeWindowInUseKHRError( char const * message ) : SystemError( make_error_code( Result::eErrorNativeWindowInUseKHR ), message ) {} }; class OutOfDateKHRError : public SystemError { public: OutOfDateKHRError( std::string const & message ) : SystemError( make_error_code( Result::eErrorOutOfDateKHR ), message ) {} OutOfDateKHRError( char const * message ) : SystemError( make_error_code( Result::eErrorOutOfDateKHR ), message ) {} }; class IncompatibleDisplayKHRError : public SystemError { public: IncompatibleDisplayKHRError( std::string const & message ) : SystemError( make_error_code( Result::eErrorIncompatibleDisplayKHR ), message ) {} IncompatibleDisplayKHRError( char const * message ) : SystemError( make_error_code( Result::eErrorIncompatibleDisplayKHR ), message ) {} }; class ValidationFailedEXTError : public SystemError { public: ValidationFailedEXTError( std::string const & message ) : SystemError( make_error_code( Result::eErrorValidationFailedEXT ), message ) {} ValidationFailedEXTError( char const * message ) : SystemError( make_error_code( Result::eErrorValidationFailedEXT ), message ) {} }; class InvalidShaderNVError : public SystemError { public: InvalidShaderNVError( std::string const & message ) : SystemError( make_error_code( Result::eErrorInvalidShaderNV ), message ) {} InvalidShaderNVError( char const * message ) : SystemError( make_error_code( Result::eErrorInvalidShaderNV ), message ) {} }; class ImageUsageNotSupportedKHRError : public SystemError { public: ImageUsageNotSupportedKHRError( std::string const & message ) : SystemError( make_error_code( Result::eErrorImageUsageNotSupportedKHR ), message ) {} ImageUsageNotSupportedKHRError( char const * message ) : SystemError( make_error_code( Result::eErrorImageUsageNotSupportedKHR ), message ) {} }; class VideoPictureLayoutNotSupportedKHRError : public SystemError { public: VideoPictureLayoutNotSupportedKHRError( std::string const & message ) : SystemError( make_error_code( Result::eErrorVideoPictureLayoutNotSupportedKHR ), message ) { } VideoPictureLayoutNotSupportedKHRError( char const * message ) : SystemError( make_error_code( Result::eErrorVideoPictureLayoutNotSupportedKHR ), message ) { } }; class VideoProfileOperationNotSupportedKHRError : public SystemError { public: VideoProfileOperationNotSupportedKHRError( std::string const & message ) : SystemError( make_error_code( Result::eErrorVideoProfileOperationNotSupportedKHR ), message ) { } VideoProfileOperationNotSupportedKHRError( char const * message ) : SystemError( make_error_code( Result::eErrorVideoProfileOperationNotSupportedKHR ), message ) { } }; class VideoProfileFormatNotSupportedKHRError : public SystemError { public: VideoProfileFormatNotSupportedKHRError( std::string const & message ) : SystemError( make_error_code( Result::eErrorVideoProfileFormatNotSupportedKHR ), message ) { } VideoProfileFormatNotSupportedKHRError( char const * message ) : SystemError( make_error_code( Result::eErrorVideoProfileFormatNotSupportedKHR ), message ) { } }; class VideoProfileCodecNotSupportedKHRError : public SystemError { public: VideoProfileCodecNotSupportedKHRError( std::string const & message ) : SystemError( make_error_code( Result::eErrorVideoProfileCodecNotSupportedKHR ), message ) { } VideoProfileCodecNotSupportedKHRError( char const * message ) : SystemError( make_error_code( Result::eErrorVideoProfileCodecNotSupportedKHR ), message ) {} }; class VideoStdVersionNotSupportedKHRError : public SystemError { public: VideoStdVersionNotSupportedKHRError( std::string const & message ) : SystemError( make_error_code( Result::eErrorVideoStdVersionNotSupportedKHR ), message ) { } VideoStdVersionNotSupportedKHRError( char const * message ) : SystemError( make_error_code( Result::eErrorVideoStdVersionNotSupportedKHR ), message ) {} }; class InvalidDrmFormatModifierPlaneLayoutEXTError : public SystemError { public: InvalidDrmFormatModifierPlaneLayoutEXTError( std::string const & message ) : SystemError( make_error_code( Result::eErrorInvalidDrmFormatModifierPlaneLayoutEXT ), message ) { } InvalidDrmFormatModifierPlaneLayoutEXTError( char const * message ) : SystemError( make_error_code( Result::eErrorInvalidDrmFormatModifierPlaneLayoutEXT ), message ) { } }; # if defined( VK_USE_PLATFORM_WIN32_KHR ) class FullScreenExclusiveModeLostEXTError : public SystemError { public: FullScreenExclusiveModeLostEXTError( std::string const & message ) : SystemError( make_error_code( Result::eErrorFullScreenExclusiveModeLostEXT ), message ) { } FullScreenExclusiveModeLostEXTError( char const * message ) : SystemError( make_error_code( Result::eErrorFullScreenExclusiveModeLostEXT ), message ) {} }; # endif /*VK_USE_PLATFORM_WIN32_KHR*/ class InvalidVideoStdParametersKHRError : public SystemError { public: InvalidVideoStdParametersKHRError( std::string const & message ) : SystemError( make_error_code( Result::eErrorInvalidVideoStdParametersKHR ), message ) {} InvalidVideoStdParametersKHRError( char const * message ) : SystemError( make_error_code( Result::eErrorInvalidVideoStdParametersKHR ), message ) {} }; class CompressionExhaustedEXTError : public SystemError { public: CompressionExhaustedEXTError( std::string const & message ) : SystemError( make_error_code( Result::eErrorCompressionExhaustedEXT ), message ) {} CompressionExhaustedEXTError( char const * message ) : SystemError( make_error_code( Result::eErrorCompressionExhaustedEXT ), message ) {} }; class NotEnoughSpaceKHRError : public SystemError { public: NotEnoughSpaceKHRError( std::string const & message ) : SystemError( make_error_code( Result::eErrorNotEnoughSpaceKHR ), message ) {} NotEnoughSpaceKHRError( char const * message ) : SystemError( make_error_code( Result::eErrorNotEnoughSpaceKHR ), message ) {} }; namespace detail { [[noreturn]] VULKAN_HPP_INLINE void throwResultException( Result result, char const * message ) { switch ( result ) { case Result::eErrorOutOfHostMemory: throw OutOfHostMemoryError( message ); case Result::eErrorOutOfDeviceMemory: throw OutOfDeviceMemoryError( message ); case Result::eErrorInitializationFailed: throw InitializationFailedError( message ); case Result::eErrorDeviceLost: throw DeviceLostError( message ); case Result::eErrorMemoryMapFailed: throw MemoryMapFailedError( message ); case Result::eErrorLayerNotPresent: throw LayerNotPresentError( message ); case Result::eErrorExtensionNotPresent: throw ExtensionNotPresentError( message ); case Result::eErrorFeatureNotPresent: throw FeatureNotPresentError( message ); case Result::eErrorIncompatibleDriver: throw IncompatibleDriverError( message ); case Result::eErrorTooManyObjects: throw TooManyObjectsError( message ); case Result::eErrorFormatNotSupported: throw FormatNotSupportedError( message ); case Result::eErrorFragmentedPool: throw FragmentedPoolError( message ); case Result::eErrorUnknown: throw UnknownError( message ); case Result::eErrorOutOfPoolMemory: throw OutOfPoolMemoryError( message ); case Result::eErrorInvalidExternalHandle: throw InvalidExternalHandleError( message ); case Result::eErrorFragmentation: throw FragmentationError( message ); case Result::eErrorInvalidOpaqueCaptureAddress: throw InvalidOpaqueCaptureAddressError( message ); case Result::eErrorNotPermitted: throw NotPermittedError( message ); case Result::eErrorSurfaceLostKHR: throw SurfaceLostKHRError( message ); case Result::eErrorNativeWindowInUseKHR: throw NativeWindowInUseKHRError( message ); case Result::eErrorOutOfDateKHR: throw OutOfDateKHRError( message ); case Result::eErrorIncompatibleDisplayKHR: throw IncompatibleDisplayKHRError( message ); case Result::eErrorValidationFailedEXT: throw ValidationFailedEXTError( message ); case Result::eErrorInvalidShaderNV: throw InvalidShaderNVError( message ); case Result::eErrorImageUsageNotSupportedKHR: throw ImageUsageNotSupportedKHRError( message ); case Result::eErrorVideoPictureLayoutNotSupportedKHR: throw VideoPictureLayoutNotSupportedKHRError( message ); case Result::eErrorVideoProfileOperationNotSupportedKHR: throw VideoProfileOperationNotSupportedKHRError( message ); case Result::eErrorVideoProfileFormatNotSupportedKHR: throw VideoProfileFormatNotSupportedKHRError( message ); case Result::eErrorVideoProfileCodecNotSupportedKHR: throw VideoProfileCodecNotSupportedKHRError( message ); case Result::eErrorVideoStdVersionNotSupportedKHR: throw VideoStdVersionNotSupportedKHRError( message ); case Result::eErrorInvalidDrmFormatModifierPlaneLayoutEXT: throw InvalidDrmFormatModifierPlaneLayoutEXTError( message ); # if defined( VK_USE_PLATFORM_WIN32_KHR ) case Result::eErrorFullScreenExclusiveModeLostEXT: throw FullScreenExclusiveModeLostEXTError( message ); # endif /*VK_USE_PLATFORM_WIN32_KHR*/ case Result::eErrorInvalidVideoStdParametersKHR: throw InvalidVideoStdParametersKHRError( message ); case Result::eErrorCompressionExhaustedEXT: throw CompressionExhaustedEXTError( message ); case Result::eErrorNotEnoughSpaceKHR: throw NotEnoughSpaceKHRError( message ); default: throw SystemError( make_error_code( result ), message ); } } } // namespace detail #endif template struct ResultValue { #ifdef VULKAN_HPP_HAS_NOEXCEPT ResultValue( Result r, T & v ) VULKAN_HPP_NOEXCEPT( VULKAN_HPP_NOEXCEPT( T( v ) ) ) #else ResultValue( Result r, T & v ) #endif : result( r ), value( v ) { } #ifdef VULKAN_HPP_HAS_NOEXCEPT ResultValue( Result r, T && v ) VULKAN_HPP_NOEXCEPT( VULKAN_HPP_NOEXCEPT( T( std::move( v ) ) ) ) #else ResultValue( Result r, T && v ) #endif : result( r ), value( std::move( v ) ) { } Result result; T value; operator std::tuple() VULKAN_HPP_NOEXCEPT { return std::tuple( result, value ); } }; #if !defined( VULKAN_HPP_NO_SMART_HANDLE ) template struct ResultValue> { # ifdef VULKAN_HPP_HAS_NOEXCEPT ResultValue( Result r, UniqueHandle && v ) VULKAN_HPP_NOEXCEPT # else ResultValue( Result r, UniqueHandle && v ) # endif : result( r ) , value( std::move( v ) ) { } VULKAN_HPP_DEPRECATED( "asTuple() on an l-value is deprecated, as it implicitly moves the UniqueHandle out of the ResultValue. Use asTuple() on an r-value instead, requiring to explicitly move the UniqueHandle." ) std::tuple> asTuple() & { return std::make_tuple( result, std::move( value ) ); } std::tuple> asTuple() && { return std::make_tuple( result, std::move( value ) ); } Result result; UniqueHandle value; }; template struct ResultValue>> { # ifdef VULKAN_HPP_HAS_NOEXCEPT ResultValue( Result r, std::vector> && v ) VULKAN_HPP_NOEXCEPT # else ResultValue( Result r, std::vector> && v ) # endif : result( r ) , value( std::move( v ) ) { } VULKAN_HPP_DEPRECATED( "asTuple() on an l-value is deprecated, as it implicitly moves the UniqueHandle out of the ResultValue. Use asTuple() on an r-value instead, requiring to explicitly move the UniqueHandle." ) std::tuple>> asTuple() & { return std::make_tuple( result, std::move( value ) ); } std::tuple>> asTuple() && { return std::make_tuple( result, std::move( value ) ); } Result result; std::vector> value; }; #endif template struct ResultValueType { #ifdef VULKAN_HPP_NO_EXCEPTIONS using type = ResultValue; #else using type = T; #endif }; template <> struct ResultValueType { #ifdef VULKAN_HPP_NO_EXCEPTIONS using type = Result; #else using type = void; #endif }; namespace detail { template void ignore( T const & ) VULKAN_HPP_NOEXCEPT { } VULKAN_HPP_INLINE typename VULKAN_HPP_NAMESPACE::ResultValueType::type createResultValueType( VULKAN_HPP_NAMESPACE::Result result ) { #ifdef VULKAN_HPP_NO_EXCEPTIONS return result; #else VULKAN_HPP_NAMESPACE::detail::ignore( result ); #endif } template VULKAN_HPP_INLINE typename VULKAN_HPP_NAMESPACE::ResultValueType::type createResultValueType( VULKAN_HPP_NAMESPACE::Result result, T & data ) { #ifdef VULKAN_HPP_NO_EXCEPTIONS return ResultValue( result, data ); #else VULKAN_HPP_NAMESPACE::detail::ignore( result ); return data; #endif } template VULKAN_HPP_INLINE typename VULKAN_HPP_NAMESPACE::ResultValueType::type createResultValueType( VULKAN_HPP_NAMESPACE::Result result, T && data ) { #ifdef VULKAN_HPP_NO_EXCEPTIONS return ResultValue( result, std::move( data ) ); #else VULKAN_HPP_NAMESPACE::detail::ignore( result ); return std::move( data ); #endif } } // namespace detail namespace detail { VULKAN_HPP_INLINE void resultCheck( Result result, char const * message ) { #ifdef VULKAN_HPP_NO_EXCEPTIONS VULKAN_HPP_NAMESPACE::detail::ignore( result ); // just in case VULKAN_HPP_ASSERT_ON_RESULT is empty VULKAN_HPP_NAMESPACE::detail::ignore( message ); VULKAN_HPP_ASSERT_ON_RESULT( result == Result::eSuccess ); #else if ( result != Result::eSuccess ) { VULKAN_HPP_NAMESPACE::detail::throwResultException( result, message ); } #endif } VULKAN_HPP_INLINE void resultCheck( Result result, char const * message, std::initializer_list successCodes ) { #ifdef VULKAN_HPP_NO_EXCEPTIONS VULKAN_HPP_NAMESPACE::detail::ignore( result ); // just in case VULKAN_HPP_ASSERT_ON_RESULT is empty VULKAN_HPP_NAMESPACE::detail::ignore( message ); VULKAN_HPP_NAMESPACE::detail::ignore( successCodes ); // just in case VULKAN_HPP_ASSERT_ON_RESULT is empty VULKAN_HPP_ASSERT_ON_RESULT( std::find( successCodes.begin(), successCodes.end(), result ) != successCodes.end() ); #else if ( std::find( successCodes.begin(), successCodes.end(), result ) == successCodes.end() ) { VULKAN_HPP_NAMESPACE::detail::throwResultException( result, message ); } #endif } } // namespace detail //=========================== //=== CONSTEXPR CONSTANTs === //=========================== //=== VK_VERSION_1_0 === VULKAN_HPP_CONSTEXPR_INLINE uint32_t AttachmentUnused = VK_ATTACHMENT_UNUSED; VULKAN_HPP_CONSTEXPR_INLINE uint32_t False = VK_FALSE; VULKAN_HPP_CONSTEXPR_INLINE float LodClampNone = VK_LOD_CLAMP_NONE; VULKAN_HPP_CONSTEXPR_INLINE uint32_t QueueFamilyIgnored = VK_QUEUE_FAMILY_IGNORED; VULKAN_HPP_CONSTEXPR_INLINE uint32_t RemainingArrayLayers = VK_REMAINING_ARRAY_LAYERS; VULKAN_HPP_CONSTEXPR_INLINE uint32_t RemainingMipLevels = VK_REMAINING_MIP_LEVELS; VULKAN_HPP_CONSTEXPR_INLINE uint32_t SubpassExternal = VK_SUBPASS_EXTERNAL; VULKAN_HPP_CONSTEXPR_INLINE uint32_t True = VK_TRUE; VULKAN_HPP_CONSTEXPR_INLINE uint64_t WholeSize = VK_WHOLE_SIZE; VULKAN_HPP_CONSTEXPR_INLINE uint32_t MaxMemoryTypes = VK_MAX_MEMORY_TYPES; VULKAN_HPP_CONSTEXPR_INLINE uint32_t MaxPhysicalDeviceNameSize = VK_MAX_PHYSICAL_DEVICE_NAME_SIZE; VULKAN_HPP_CONSTEXPR_INLINE uint32_t UuidSize = VK_UUID_SIZE; VULKAN_HPP_CONSTEXPR_INLINE uint32_t MaxExtensionNameSize = VK_MAX_EXTENSION_NAME_SIZE; VULKAN_HPP_CONSTEXPR_INLINE uint32_t MaxDescriptionSize = VK_MAX_DESCRIPTION_SIZE; VULKAN_HPP_CONSTEXPR_INLINE uint32_t MaxMemoryHeaps = VK_MAX_MEMORY_HEAPS; //=== VK_VERSION_1_1 === VULKAN_HPP_CONSTEXPR_INLINE uint32_t MaxDeviceGroupSize = VK_MAX_DEVICE_GROUP_SIZE; VULKAN_HPP_CONSTEXPR_INLINE uint32_t LuidSize = VK_LUID_SIZE; VULKAN_HPP_CONSTEXPR_INLINE uint32_t QueueFamilyExternal = VK_QUEUE_FAMILY_EXTERNAL; //=== VK_VERSION_1_2 === VULKAN_HPP_CONSTEXPR_INLINE uint32_t MaxDriverNameSize = VK_MAX_DRIVER_NAME_SIZE; VULKAN_HPP_CONSTEXPR_INLINE uint32_t MaxDriverInfoSize = VK_MAX_DRIVER_INFO_SIZE; //=== VK_VERSION_1_4 === VULKAN_HPP_CONSTEXPR_INLINE uint32_t MaxGlobalPrioritySize = VK_MAX_GLOBAL_PRIORITY_SIZE; //=== VK_KHR_device_group_creation === VULKAN_HPP_CONSTEXPR_INLINE uint32_t MaxDeviceGroupSizeKHR = VK_MAX_DEVICE_GROUP_SIZE_KHR; //=== VK_KHR_external_memory_capabilities === VULKAN_HPP_CONSTEXPR_INLINE uint32_t LuidSizeKHR = VK_LUID_SIZE_KHR; //=== VK_KHR_external_memory === VULKAN_HPP_CONSTEXPR_INLINE uint32_t QueueFamilyExternalKHR = VK_QUEUE_FAMILY_EXTERNAL_KHR; //=== VK_EXT_queue_family_foreign === VULKAN_HPP_CONSTEXPR_INLINE uint32_t QueueFamilyForeignEXT = VK_QUEUE_FAMILY_FOREIGN_EXT; #if defined( VK_ENABLE_BETA_EXTENSIONS ) //=== VK_AMDX_shader_enqueue === VULKAN_HPP_CONSTEXPR_INLINE uint32_t ShaderIndexUnusedAMDX = VK_SHADER_INDEX_UNUSED_AMDX; #endif /*VK_ENABLE_BETA_EXTENSIONS*/ //=== VK_KHR_ray_tracing_pipeline === VULKAN_HPP_CONSTEXPR_INLINE uint32_t ShaderUnusedKHR = VK_SHADER_UNUSED_KHR; //=== VK_NV_ray_tracing === VULKAN_HPP_CONSTEXPR_INLINE uint32_t ShaderUnusedNV = VK_SHADER_UNUSED_NV; //=== VK_KHR_global_priority === VULKAN_HPP_CONSTEXPR_INLINE uint32_t MaxGlobalPrioritySizeKHR = VK_MAX_GLOBAL_PRIORITY_SIZE_KHR; //=== VK_KHR_driver_properties === VULKAN_HPP_CONSTEXPR_INLINE uint32_t MaxDriverNameSizeKHR = VK_MAX_DRIVER_NAME_SIZE_KHR; VULKAN_HPP_CONSTEXPR_INLINE uint32_t MaxDriverInfoSizeKHR = VK_MAX_DRIVER_INFO_SIZE_KHR; //=== VK_EXT_global_priority_query === VULKAN_HPP_CONSTEXPR_INLINE uint32_t MaxGlobalPrioritySizeEXT = VK_MAX_GLOBAL_PRIORITY_SIZE_EXT; //=== VK_EXT_image_sliced_view_of_3d === VULKAN_HPP_CONSTEXPR_INLINE uint32_t Remaining3DSlicesEXT = VK_REMAINING_3D_SLICES_EXT; //=== VK_EXT_shader_module_identifier === VULKAN_HPP_CONSTEXPR_INLINE uint32_t MaxShaderModuleIdentifierSizeEXT = VK_MAX_SHADER_MODULE_IDENTIFIER_SIZE_EXT; //=== VK_KHR_pipeline_binary === VULKAN_HPP_CONSTEXPR_INLINE uint32_t MaxPipelineBinaryKeySizeKHR = VK_MAX_PIPELINE_BINARY_KEY_SIZE_KHR; //=== VK_KHR_video_decode_av1 === VULKAN_HPP_CONSTEXPR_INLINE uint32_t MaxVideoAv1ReferencesPerFrameKHR = VK_MAX_VIDEO_AV1_REFERENCES_PER_FRAME_KHR; //=== VK_NV_partitioned_acceleration_structure === VULKAN_HPP_CONSTEXPR_INLINE uint32_t PartitionedAccelerationStructurePartitionIndexGlobalNV = VK_PARTITIONED_ACCELERATION_STRUCTURE_PARTITION_INDEX_GLOBAL_NV; //======================== //=== CONSTEXPR VALUEs === //======================== VULKAN_HPP_CONSTEXPR_INLINE uint32_t HeaderVersion = VK_HEADER_VERSION; VULKAN_HPP_CONSTEXPR_INLINE uint32_t Use64BitPtrDefines = VK_USE_64_BIT_PTR_DEFINES; //========================= //=== CONSTEXPR CALLEEs === //========================= template ::value>::type> VULKAN_HPP_CONSTEXPR uint32_t apiVersionMajor( T const version ) { return ( ( (uint32_t)( version ) >> 22U ) & 0x7FU ); } template ::value>::type> VULKAN_HPP_CONSTEXPR uint32_t apiVersionMinor( T const version ) { return ( ( (uint32_t)( version ) >> 12U ) & 0x3FFU ); } template ::value>::type> VULKAN_HPP_CONSTEXPR uint32_t apiVersionPatch( T const version ) { return ( (uint32_t)(version)&0xFFFU ); } template ::value>::type> VULKAN_HPP_CONSTEXPR uint32_t apiVersionVariant( T const version ) { return ( (uint32_t)( version ) >> 29U ); } template ::value>::type> VULKAN_HPP_CONSTEXPR uint32_t makeApiVersion( T const variant, T const major, T const minor, T const patch ) { return ( ( ( (uint32_t)( variant ) ) << 29U ) | ( ( (uint32_t)( major ) ) << 22U ) | ( ( (uint32_t)( minor ) ) << 12U ) | ( (uint32_t)( patch ) ) ); } template ::value>::type> VULKAN_HPP_DEPRECATED( "This define is deprecated. VK_MAKE_API_VERSION should be used instead." ) VULKAN_HPP_CONSTEXPR uint32_t makeVersion( T const major, T const minor, T const patch ) { return ( ( ( (uint32_t)( major ) ) << 22U ) | ( ( (uint32_t)( minor ) ) << 12U ) | ( (uint32_t)( patch ) ) ); } template ::value>::type> VULKAN_HPP_DEPRECATED( "This define is deprecated. VK_API_VERSION_MAJOR should be used instead." ) VULKAN_HPP_CONSTEXPR uint32_t versionMajor( T const version ) { return ( (uint32_t)( version ) >> 22U ); } template ::value>::type> VULKAN_HPP_DEPRECATED( "This define is deprecated. VK_API_VERSION_MINOR should be used instead." ) VULKAN_HPP_CONSTEXPR uint32_t versionMinor( T const version ) { return ( ( (uint32_t)( version ) >> 12U ) & 0x3FFU ); } template ::value>::type> VULKAN_HPP_DEPRECATED( "This define is deprecated. VK_API_VERSION_PATCH should be used instead." ) VULKAN_HPP_CONSTEXPR uint32_t versionPatch( T const version ) { return ( (uint32_t)(version)&0xFFFU ); } //========================= //=== CONSTEXPR CALLERs === //========================= VULKAN_HPP_CONSTEXPR_INLINE auto ApiVersion = makeApiVersion( 0, 1, 0, 0 ); VULKAN_HPP_CONSTEXPR_INLINE auto ApiVersion10 = makeApiVersion( 0, 1, 0, 0 ); VULKAN_HPP_CONSTEXPR_INLINE auto ApiVersion11 = makeApiVersion( 0, 1, 1, 0 ); VULKAN_HPP_CONSTEXPR_INLINE auto ApiVersion12 = makeApiVersion( 0, 1, 2, 0 ); VULKAN_HPP_CONSTEXPR_INLINE auto ApiVersion13 = makeApiVersion( 0, 1, 3, 0 ); VULKAN_HPP_CONSTEXPR_INLINE auto ApiVersion14 = makeApiVersion( 0, 1, 4, 0 ); VULKAN_HPP_CONSTEXPR_INLINE auto HeaderVersionComplete = makeApiVersion( 0, 1, 4, VK_HEADER_VERSION ); //================================= //=== CONSTEXPR EXTENSION NAMEs === //================================= //=== VK_KHR_surface === VULKAN_HPP_CONSTEXPR_INLINE auto KHRSurfaceExtensionName = VK_KHR_SURFACE_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRSurfaceSpecVersion = VK_KHR_SURFACE_SPEC_VERSION; //=== VK_KHR_swapchain === VULKAN_HPP_CONSTEXPR_INLINE auto KHRSwapchainExtensionName = VK_KHR_SWAPCHAIN_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRSwapchainSpecVersion = VK_KHR_SWAPCHAIN_SPEC_VERSION; //=== VK_KHR_display === VULKAN_HPP_CONSTEXPR_INLINE auto KHRDisplayExtensionName = VK_KHR_DISPLAY_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRDisplaySpecVersion = VK_KHR_DISPLAY_SPEC_VERSION; //=== VK_KHR_display_swapchain === VULKAN_HPP_CONSTEXPR_INLINE auto KHRDisplaySwapchainExtensionName = VK_KHR_DISPLAY_SWAPCHAIN_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRDisplaySwapchainSpecVersion = VK_KHR_DISPLAY_SWAPCHAIN_SPEC_VERSION; #if defined( VK_USE_PLATFORM_XLIB_KHR ) //=== VK_KHR_xlib_surface === VULKAN_HPP_CONSTEXPR_INLINE auto KHRXlibSurfaceExtensionName = VK_KHR_XLIB_SURFACE_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRXlibSurfaceSpecVersion = VK_KHR_XLIB_SURFACE_SPEC_VERSION; #endif /*VK_USE_PLATFORM_XLIB_KHR*/ #if defined( VK_USE_PLATFORM_XCB_KHR ) //=== VK_KHR_xcb_surface === VULKAN_HPP_CONSTEXPR_INLINE auto KHRXcbSurfaceExtensionName = VK_KHR_XCB_SURFACE_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRXcbSurfaceSpecVersion = VK_KHR_XCB_SURFACE_SPEC_VERSION; #endif /*VK_USE_PLATFORM_XCB_KHR*/ #if defined( VK_USE_PLATFORM_WAYLAND_KHR ) //=== VK_KHR_wayland_surface === VULKAN_HPP_CONSTEXPR_INLINE auto KHRWaylandSurfaceExtensionName = VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRWaylandSurfaceSpecVersion = VK_KHR_WAYLAND_SURFACE_SPEC_VERSION; #endif /*VK_USE_PLATFORM_WAYLAND_KHR*/ #if defined( VK_USE_PLATFORM_ANDROID_KHR ) //=== VK_KHR_android_surface === VULKAN_HPP_CONSTEXPR_INLINE auto KHRAndroidSurfaceExtensionName = VK_KHR_ANDROID_SURFACE_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRAndroidSurfaceSpecVersion = VK_KHR_ANDROID_SURFACE_SPEC_VERSION; #endif /*VK_USE_PLATFORM_ANDROID_KHR*/ #if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_KHR_win32_surface === VULKAN_HPP_CONSTEXPR_INLINE auto KHRWin32SurfaceExtensionName = VK_KHR_WIN32_SURFACE_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRWin32SurfaceSpecVersion = VK_KHR_WIN32_SURFACE_SPEC_VERSION; #endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_EXT_debug_report === VULKAN_HPP_DEPRECATED( "The VK_EXT_debug_report extension has been deprecated by VK_EXT_debug_utils." ) VULKAN_HPP_CONSTEXPR_INLINE auto EXTDebugReportExtensionName = VK_EXT_DEBUG_REPORT_EXTENSION_NAME; VULKAN_HPP_DEPRECATED( "The VK_EXT_debug_report extension has been deprecated by VK_EXT_debug_utils." ) VULKAN_HPP_CONSTEXPR_INLINE auto EXTDebugReportSpecVersion = VK_EXT_DEBUG_REPORT_SPEC_VERSION; //=== VK_NV_glsl_shader === VULKAN_HPP_DEPRECATED( "The VK_NV_glsl_shader extension has been deprecated." ) VULKAN_HPP_CONSTEXPR_INLINE auto NVGlslShaderExtensionName = VK_NV_GLSL_SHADER_EXTENSION_NAME; VULKAN_HPP_DEPRECATED( "The VK_NV_glsl_shader extension has been deprecated." ) VULKAN_HPP_CONSTEXPR_INLINE auto NVGlslShaderSpecVersion = VK_NV_GLSL_SHADER_SPEC_VERSION; //=== VK_EXT_depth_range_unrestricted === VULKAN_HPP_CONSTEXPR_INLINE auto EXTDepthRangeUnrestrictedExtensionName = VK_EXT_DEPTH_RANGE_UNRESTRICTED_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTDepthRangeUnrestrictedSpecVersion = VK_EXT_DEPTH_RANGE_UNRESTRICTED_SPEC_VERSION; //=== VK_KHR_sampler_mirror_clamp_to_edge === VULKAN_HPP_CONSTEXPR_INLINE auto KHRSamplerMirrorClampToEdgeExtensionName = VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRSamplerMirrorClampToEdgeSpecVersion = VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_SPEC_VERSION; //=== VK_IMG_filter_cubic === VULKAN_HPP_CONSTEXPR_INLINE auto IMGFilterCubicExtensionName = VK_IMG_FILTER_CUBIC_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto IMGFilterCubicSpecVersion = VK_IMG_FILTER_CUBIC_SPEC_VERSION; //=== VK_AMD_rasterization_order === VULKAN_HPP_CONSTEXPR_INLINE auto AMDRasterizationOrderExtensionName = VK_AMD_RASTERIZATION_ORDER_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto AMDRasterizationOrderSpecVersion = VK_AMD_RASTERIZATION_ORDER_SPEC_VERSION; //=== VK_AMD_shader_trinary_minmax === VULKAN_HPP_CONSTEXPR_INLINE auto AMDShaderTrinaryMinmaxExtensionName = VK_AMD_SHADER_TRINARY_MINMAX_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto AMDShaderTrinaryMinmaxSpecVersion = VK_AMD_SHADER_TRINARY_MINMAX_SPEC_VERSION; //=== VK_AMD_shader_explicit_vertex_parameter === VULKAN_HPP_CONSTEXPR_INLINE auto AMDShaderExplicitVertexParameterExtensionName = VK_AMD_SHADER_EXPLICIT_VERTEX_PARAMETER_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto AMDShaderExplicitVertexParameterSpecVersion = VK_AMD_SHADER_EXPLICIT_VERTEX_PARAMETER_SPEC_VERSION; //=== VK_EXT_debug_marker === VULKAN_HPP_CONSTEXPR_INLINE auto EXTDebugMarkerExtensionName = VK_EXT_DEBUG_MARKER_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTDebugMarkerSpecVersion = VK_EXT_DEBUG_MARKER_SPEC_VERSION; //=== VK_KHR_video_queue === VULKAN_HPP_CONSTEXPR_INLINE auto KHRVideoQueueExtensionName = VK_KHR_VIDEO_QUEUE_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRVideoQueueSpecVersion = VK_KHR_VIDEO_QUEUE_SPEC_VERSION; //=== VK_KHR_video_decode_queue === VULKAN_HPP_CONSTEXPR_INLINE auto KHRVideoDecodeQueueExtensionName = VK_KHR_VIDEO_DECODE_QUEUE_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRVideoDecodeQueueSpecVersion = VK_KHR_VIDEO_DECODE_QUEUE_SPEC_VERSION; //=== VK_AMD_gcn_shader === VULKAN_HPP_CONSTEXPR_INLINE auto AMDGcnShaderExtensionName = VK_AMD_GCN_SHADER_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto AMDGcnShaderSpecVersion = VK_AMD_GCN_SHADER_SPEC_VERSION; //=== VK_NV_dedicated_allocation === VULKAN_HPP_DEPRECATED( "The VK_NV_dedicated_allocation extension has been deprecated by VK_KHR_dedicated_allocation." ) VULKAN_HPP_CONSTEXPR_INLINE auto NVDedicatedAllocationExtensionName = VK_NV_DEDICATED_ALLOCATION_EXTENSION_NAME; VULKAN_HPP_DEPRECATED( "The VK_NV_dedicated_allocation extension has been deprecated by VK_KHR_dedicated_allocation." ) VULKAN_HPP_CONSTEXPR_INLINE auto NVDedicatedAllocationSpecVersion = VK_NV_DEDICATED_ALLOCATION_SPEC_VERSION; //=== VK_EXT_transform_feedback === VULKAN_HPP_CONSTEXPR_INLINE auto EXTTransformFeedbackExtensionName = VK_EXT_TRANSFORM_FEEDBACK_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTTransformFeedbackSpecVersion = VK_EXT_TRANSFORM_FEEDBACK_SPEC_VERSION; //=== VK_NVX_binary_import === VULKAN_HPP_CONSTEXPR_INLINE auto NVXBinaryImportExtensionName = VK_NVX_BINARY_IMPORT_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto NVXBinaryImportSpecVersion = VK_NVX_BINARY_IMPORT_SPEC_VERSION; //=== VK_NVX_image_view_handle === VULKAN_HPP_CONSTEXPR_INLINE auto NVXImageViewHandleExtensionName = VK_NVX_IMAGE_VIEW_HANDLE_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto NVXImageViewHandleSpecVersion = VK_NVX_IMAGE_VIEW_HANDLE_SPEC_VERSION; //=== VK_AMD_draw_indirect_count === VULKAN_HPP_CONSTEXPR_INLINE auto AMDDrawIndirectCountExtensionName = VK_AMD_DRAW_INDIRECT_COUNT_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto AMDDrawIndirectCountSpecVersion = VK_AMD_DRAW_INDIRECT_COUNT_SPEC_VERSION; //=== VK_AMD_negative_viewport_height === VULKAN_HPP_DEPRECATED( "The VK_AMD_negative_viewport_height extension has been obsoleted by VK_KHR_maintenance1." ) VULKAN_HPP_CONSTEXPR_INLINE auto AMDNegativeViewportHeightExtensionName = VK_AMD_NEGATIVE_VIEWPORT_HEIGHT_EXTENSION_NAME; VULKAN_HPP_DEPRECATED( "The VK_AMD_negative_viewport_height extension has been obsoleted by VK_KHR_maintenance1." ) VULKAN_HPP_CONSTEXPR_INLINE auto AMDNegativeViewportHeightSpecVersion = VK_AMD_NEGATIVE_VIEWPORT_HEIGHT_SPEC_VERSION; //=== VK_AMD_gpu_shader_half_float === VULKAN_HPP_DEPRECATED( "The VK_AMD_gpu_shader_half_float extension has been deprecated by VK_KHR_shader_float16_int8." ) VULKAN_HPP_CONSTEXPR_INLINE auto AMDGpuShaderHalfFloatExtensionName = VK_AMD_GPU_SHADER_HALF_FLOAT_EXTENSION_NAME; VULKAN_HPP_DEPRECATED( "The VK_AMD_gpu_shader_half_float extension has been deprecated by VK_KHR_shader_float16_int8." ) VULKAN_HPP_CONSTEXPR_INLINE auto AMDGpuShaderHalfFloatSpecVersion = VK_AMD_GPU_SHADER_HALF_FLOAT_SPEC_VERSION; //=== VK_AMD_shader_ballot === VULKAN_HPP_CONSTEXPR_INLINE auto AMDShaderBallotExtensionName = VK_AMD_SHADER_BALLOT_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto AMDShaderBallotSpecVersion = VK_AMD_SHADER_BALLOT_SPEC_VERSION; //=== VK_KHR_video_encode_h264 === VULKAN_HPP_CONSTEXPR_INLINE auto KHRVideoEncodeH264ExtensionName = VK_KHR_VIDEO_ENCODE_H264_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRVideoEncodeH264SpecVersion = VK_KHR_VIDEO_ENCODE_H264_SPEC_VERSION; //=== VK_KHR_video_encode_h265 === VULKAN_HPP_CONSTEXPR_INLINE auto KHRVideoEncodeH265ExtensionName = VK_KHR_VIDEO_ENCODE_H265_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRVideoEncodeH265SpecVersion = VK_KHR_VIDEO_ENCODE_H265_SPEC_VERSION; //=== VK_KHR_video_decode_h264 === VULKAN_HPP_CONSTEXPR_INLINE auto KHRVideoDecodeH264ExtensionName = VK_KHR_VIDEO_DECODE_H264_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRVideoDecodeH264SpecVersion = VK_KHR_VIDEO_DECODE_H264_SPEC_VERSION; //=== VK_AMD_texture_gather_bias_lod === VULKAN_HPP_CONSTEXPR_INLINE auto AMDTextureGatherBiasLodExtensionName = VK_AMD_TEXTURE_GATHER_BIAS_LOD_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto AMDTextureGatherBiasLodSpecVersion = VK_AMD_TEXTURE_GATHER_BIAS_LOD_SPEC_VERSION; //=== VK_AMD_shader_info === VULKAN_HPP_CONSTEXPR_INLINE auto AMDShaderInfoExtensionName = VK_AMD_SHADER_INFO_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto AMDShaderInfoSpecVersion = VK_AMD_SHADER_INFO_SPEC_VERSION; //=== VK_KHR_dynamic_rendering === VULKAN_HPP_CONSTEXPR_INLINE auto KHRDynamicRenderingExtensionName = VK_KHR_DYNAMIC_RENDERING_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRDynamicRenderingSpecVersion = VK_KHR_DYNAMIC_RENDERING_SPEC_VERSION; //=== VK_AMD_shader_image_load_store_lod === VULKAN_HPP_CONSTEXPR_INLINE auto AMDShaderImageLoadStoreLodExtensionName = VK_AMD_SHADER_IMAGE_LOAD_STORE_LOD_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto AMDShaderImageLoadStoreLodSpecVersion = VK_AMD_SHADER_IMAGE_LOAD_STORE_LOD_SPEC_VERSION; #if defined( VK_USE_PLATFORM_GGP ) //=== VK_GGP_stream_descriptor_surface === VULKAN_HPP_CONSTEXPR_INLINE auto GGPStreamDescriptorSurfaceExtensionName = VK_GGP_STREAM_DESCRIPTOR_SURFACE_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto GGPStreamDescriptorSurfaceSpecVersion = VK_GGP_STREAM_DESCRIPTOR_SURFACE_SPEC_VERSION; #endif /*VK_USE_PLATFORM_GGP*/ //=== VK_NV_corner_sampled_image === VULKAN_HPP_CONSTEXPR_INLINE auto NVCornerSampledImageExtensionName = VK_NV_CORNER_SAMPLED_IMAGE_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto NVCornerSampledImageSpecVersion = VK_NV_CORNER_SAMPLED_IMAGE_SPEC_VERSION; //=== VK_KHR_multiview === VULKAN_HPP_CONSTEXPR_INLINE auto KHRMultiviewExtensionName = VK_KHR_MULTIVIEW_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRMultiviewSpecVersion = VK_KHR_MULTIVIEW_SPEC_VERSION; //=== VK_IMG_format_pvrtc === VULKAN_HPP_DEPRECATED( "The VK_IMG_format_pvrtc extension has been deprecated." ) VULKAN_HPP_CONSTEXPR_INLINE auto IMGFormatPvrtcExtensionName = VK_IMG_FORMAT_PVRTC_EXTENSION_NAME; VULKAN_HPP_DEPRECATED( "The VK_IMG_format_pvrtc extension has been deprecated." ) VULKAN_HPP_CONSTEXPR_INLINE auto IMGFormatPvrtcSpecVersion = VK_IMG_FORMAT_PVRTC_SPEC_VERSION; //=== VK_NV_external_memory_capabilities === VULKAN_HPP_DEPRECATED( "The VK_NV_external_memory_capabilities extension has been deprecated by VK_KHR_external_memory_capabilities." ) VULKAN_HPP_CONSTEXPR_INLINE auto NVExternalMemoryCapabilitiesExtensionName = VK_NV_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME; VULKAN_HPP_DEPRECATED( "The VK_NV_external_memory_capabilities extension has been deprecated by VK_KHR_external_memory_capabilities." ) VULKAN_HPP_CONSTEXPR_INLINE auto NVExternalMemoryCapabilitiesSpecVersion = VK_NV_EXTERNAL_MEMORY_CAPABILITIES_SPEC_VERSION; //=== VK_NV_external_memory === VULKAN_HPP_DEPRECATED( "The VK_NV_external_memory extension has been deprecated by VK_KHR_external_memory." ) VULKAN_HPP_CONSTEXPR_INLINE auto NVExternalMemoryExtensionName = VK_NV_EXTERNAL_MEMORY_EXTENSION_NAME; VULKAN_HPP_DEPRECATED( "The VK_NV_external_memory extension has been deprecated by VK_KHR_external_memory." ) VULKAN_HPP_CONSTEXPR_INLINE auto NVExternalMemorySpecVersion = VK_NV_EXTERNAL_MEMORY_SPEC_VERSION; #if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_NV_external_memory_win32 === VULKAN_HPP_DEPRECATED( "The VK_NV_external_memory_win32 extension has been deprecated by VK_KHR_external_memory_win32." ) VULKAN_HPP_CONSTEXPR_INLINE auto NVExternalMemoryWin32ExtensionName = VK_NV_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME; VULKAN_HPP_DEPRECATED( "The VK_NV_external_memory_win32 extension has been deprecated by VK_KHR_external_memory_win32." ) VULKAN_HPP_CONSTEXPR_INLINE auto NVExternalMemoryWin32SpecVersion = VK_NV_EXTERNAL_MEMORY_WIN32_SPEC_VERSION; #endif /*VK_USE_PLATFORM_WIN32_KHR*/ #if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_NV_win32_keyed_mutex === VULKAN_HPP_CONSTEXPR_INLINE auto NVWin32KeyedMutexExtensionName = VK_NV_WIN32_KEYED_MUTEX_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto NVWin32KeyedMutexSpecVersion = VK_NV_WIN32_KEYED_MUTEX_SPEC_VERSION; #endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_KHR_get_physical_device_properties2 === VULKAN_HPP_CONSTEXPR_INLINE auto KHRGetPhysicalDeviceProperties2ExtensionName = VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRGetPhysicalDeviceProperties2SpecVersion = VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_SPEC_VERSION; //=== VK_KHR_device_group === VULKAN_HPP_CONSTEXPR_INLINE auto KHRDeviceGroupExtensionName = VK_KHR_DEVICE_GROUP_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRDeviceGroupSpecVersion = VK_KHR_DEVICE_GROUP_SPEC_VERSION; //=== VK_EXT_validation_flags === VULKAN_HPP_DEPRECATED( "The VK_EXT_validation_flags extension has been deprecated by VK_EXT_layer_settings." ) VULKAN_HPP_CONSTEXPR_INLINE auto EXTValidationFlagsExtensionName = VK_EXT_VALIDATION_FLAGS_EXTENSION_NAME; VULKAN_HPP_DEPRECATED( "The VK_EXT_validation_flags extension has been deprecated by VK_EXT_layer_settings." ) VULKAN_HPP_CONSTEXPR_INLINE auto EXTValidationFlagsSpecVersion = VK_EXT_VALIDATION_FLAGS_SPEC_VERSION; #if defined( VK_USE_PLATFORM_VI_NN ) //=== VK_NN_vi_surface === VULKAN_HPP_CONSTEXPR_INLINE auto NNViSurfaceExtensionName = VK_NN_VI_SURFACE_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto NNViSurfaceSpecVersion = VK_NN_VI_SURFACE_SPEC_VERSION; #endif /*VK_USE_PLATFORM_VI_NN*/ //=== VK_KHR_shader_draw_parameters === VULKAN_HPP_CONSTEXPR_INLINE auto KHRShaderDrawParametersExtensionName = VK_KHR_SHADER_DRAW_PARAMETERS_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRShaderDrawParametersSpecVersion = VK_KHR_SHADER_DRAW_PARAMETERS_SPEC_VERSION; //=== VK_EXT_shader_subgroup_ballot === VULKAN_HPP_DEPRECATED( "The VK_EXT_shader_subgroup_ballot extension has been deprecated by VK_VERSION_1_2." ) VULKAN_HPP_CONSTEXPR_INLINE auto EXTShaderSubgroupBallotExtensionName = VK_EXT_SHADER_SUBGROUP_BALLOT_EXTENSION_NAME; VULKAN_HPP_DEPRECATED( "The VK_EXT_shader_subgroup_ballot extension has been deprecated by VK_VERSION_1_2." ) VULKAN_HPP_CONSTEXPR_INLINE auto EXTShaderSubgroupBallotSpecVersion = VK_EXT_SHADER_SUBGROUP_BALLOT_SPEC_VERSION; //=== VK_EXT_shader_subgroup_vote === VULKAN_HPP_DEPRECATED( "The VK_EXT_shader_subgroup_vote extension has been deprecated by VK_VERSION_1_1." ) VULKAN_HPP_CONSTEXPR_INLINE auto EXTShaderSubgroupVoteExtensionName = VK_EXT_SHADER_SUBGROUP_VOTE_EXTENSION_NAME; VULKAN_HPP_DEPRECATED( "The VK_EXT_shader_subgroup_vote extension has been deprecated by VK_VERSION_1_1." ) VULKAN_HPP_CONSTEXPR_INLINE auto EXTShaderSubgroupVoteSpecVersion = VK_EXT_SHADER_SUBGROUP_VOTE_SPEC_VERSION; //=== VK_EXT_texture_compression_astc_hdr === VULKAN_HPP_CONSTEXPR_INLINE auto EXTTextureCompressionAstcHdrExtensionName = VK_EXT_TEXTURE_COMPRESSION_ASTC_HDR_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTTextureCompressionAstcHdrSpecVersion = VK_EXT_TEXTURE_COMPRESSION_ASTC_HDR_SPEC_VERSION; //=== VK_EXT_astc_decode_mode === VULKAN_HPP_CONSTEXPR_INLINE auto EXTAstcDecodeModeExtensionName = VK_EXT_ASTC_DECODE_MODE_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTAstcDecodeModeSpecVersion = VK_EXT_ASTC_DECODE_MODE_SPEC_VERSION; //=== VK_EXT_pipeline_robustness === VULKAN_HPP_CONSTEXPR_INLINE auto EXTPipelineRobustnessExtensionName = VK_EXT_PIPELINE_ROBUSTNESS_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTPipelineRobustnessSpecVersion = VK_EXT_PIPELINE_ROBUSTNESS_SPEC_VERSION; //=== VK_KHR_maintenance1 === VULKAN_HPP_CONSTEXPR_INLINE auto KHRMaintenance1ExtensionName = VK_KHR_MAINTENANCE_1_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRMaintenance1SpecVersion = VK_KHR_MAINTENANCE_1_SPEC_VERSION; //=== VK_KHR_device_group_creation === VULKAN_HPP_CONSTEXPR_INLINE auto KHRDeviceGroupCreationExtensionName = VK_KHR_DEVICE_GROUP_CREATION_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRDeviceGroupCreationSpecVersion = VK_KHR_DEVICE_GROUP_CREATION_SPEC_VERSION; //=== VK_KHR_external_memory_capabilities === VULKAN_HPP_CONSTEXPR_INLINE auto KHRExternalMemoryCapabilitiesExtensionName = VK_KHR_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRExternalMemoryCapabilitiesSpecVersion = VK_KHR_EXTERNAL_MEMORY_CAPABILITIES_SPEC_VERSION; //=== VK_KHR_external_memory === VULKAN_HPP_CONSTEXPR_INLINE auto KHRExternalMemoryExtensionName = VK_KHR_EXTERNAL_MEMORY_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRExternalMemorySpecVersion = VK_KHR_EXTERNAL_MEMORY_SPEC_VERSION; #if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_KHR_external_memory_win32 === VULKAN_HPP_CONSTEXPR_INLINE auto KHRExternalMemoryWin32ExtensionName = VK_KHR_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRExternalMemoryWin32SpecVersion = VK_KHR_EXTERNAL_MEMORY_WIN32_SPEC_VERSION; #endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_KHR_external_memory_fd === VULKAN_HPP_CONSTEXPR_INLINE auto KHRExternalMemoryFdExtensionName = VK_KHR_EXTERNAL_MEMORY_FD_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRExternalMemoryFdSpecVersion = VK_KHR_EXTERNAL_MEMORY_FD_SPEC_VERSION; #if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_KHR_win32_keyed_mutex === VULKAN_HPP_CONSTEXPR_INLINE auto KHRWin32KeyedMutexExtensionName = VK_KHR_WIN32_KEYED_MUTEX_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRWin32KeyedMutexSpecVersion = VK_KHR_WIN32_KEYED_MUTEX_SPEC_VERSION; #endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_KHR_external_semaphore_capabilities === VULKAN_HPP_CONSTEXPR_INLINE auto KHRExternalSemaphoreCapabilitiesExtensionName = VK_KHR_EXTERNAL_SEMAPHORE_CAPABILITIES_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRExternalSemaphoreCapabilitiesSpecVersion = VK_KHR_EXTERNAL_SEMAPHORE_CAPABILITIES_SPEC_VERSION; //=== VK_KHR_external_semaphore === VULKAN_HPP_CONSTEXPR_INLINE auto KHRExternalSemaphoreExtensionName = VK_KHR_EXTERNAL_SEMAPHORE_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRExternalSemaphoreSpecVersion = VK_KHR_EXTERNAL_SEMAPHORE_SPEC_VERSION; #if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_KHR_external_semaphore_win32 === VULKAN_HPP_CONSTEXPR_INLINE auto KHRExternalSemaphoreWin32ExtensionName = VK_KHR_EXTERNAL_SEMAPHORE_WIN32_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRExternalSemaphoreWin32SpecVersion = VK_KHR_EXTERNAL_SEMAPHORE_WIN32_SPEC_VERSION; #endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_KHR_external_semaphore_fd === VULKAN_HPP_CONSTEXPR_INLINE auto KHRExternalSemaphoreFdExtensionName = VK_KHR_EXTERNAL_SEMAPHORE_FD_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRExternalSemaphoreFdSpecVersion = VK_KHR_EXTERNAL_SEMAPHORE_FD_SPEC_VERSION; //=== VK_KHR_push_descriptor === VULKAN_HPP_CONSTEXPR_INLINE auto KHRPushDescriptorExtensionName = VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRPushDescriptorSpecVersion = VK_KHR_PUSH_DESCRIPTOR_SPEC_VERSION; //=== VK_EXT_conditional_rendering === VULKAN_HPP_CONSTEXPR_INLINE auto EXTConditionalRenderingExtensionName = VK_EXT_CONDITIONAL_RENDERING_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTConditionalRenderingSpecVersion = VK_EXT_CONDITIONAL_RENDERING_SPEC_VERSION; //=== VK_KHR_shader_float16_int8 === VULKAN_HPP_CONSTEXPR_INLINE auto KHRShaderFloat16Int8ExtensionName = VK_KHR_SHADER_FLOAT16_INT8_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRShaderFloat16Int8SpecVersion = VK_KHR_SHADER_FLOAT16_INT8_SPEC_VERSION; //=== VK_KHR_16bit_storage === VULKAN_HPP_CONSTEXPR_INLINE auto KHR16BitStorageExtensionName = VK_KHR_16BIT_STORAGE_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHR16BitStorageSpecVersion = VK_KHR_16BIT_STORAGE_SPEC_VERSION; //=== VK_KHR_incremental_present === VULKAN_HPP_CONSTEXPR_INLINE auto KHRIncrementalPresentExtensionName = VK_KHR_INCREMENTAL_PRESENT_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRIncrementalPresentSpecVersion = VK_KHR_INCREMENTAL_PRESENT_SPEC_VERSION; //=== VK_KHR_descriptor_update_template === VULKAN_HPP_CONSTEXPR_INLINE auto KHRDescriptorUpdateTemplateExtensionName = VK_KHR_DESCRIPTOR_UPDATE_TEMPLATE_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRDescriptorUpdateTemplateSpecVersion = VK_KHR_DESCRIPTOR_UPDATE_TEMPLATE_SPEC_VERSION; //=== VK_NV_clip_space_w_scaling === VULKAN_HPP_CONSTEXPR_INLINE auto NVClipSpaceWScalingExtensionName = VK_NV_CLIP_SPACE_W_SCALING_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto NVClipSpaceWScalingSpecVersion = VK_NV_CLIP_SPACE_W_SCALING_SPEC_VERSION; //=== VK_EXT_direct_mode_display === VULKAN_HPP_CONSTEXPR_INLINE auto EXTDirectModeDisplayExtensionName = VK_EXT_DIRECT_MODE_DISPLAY_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTDirectModeDisplaySpecVersion = VK_EXT_DIRECT_MODE_DISPLAY_SPEC_VERSION; #if defined( VK_USE_PLATFORM_XLIB_XRANDR_EXT ) //=== VK_EXT_acquire_xlib_display === VULKAN_HPP_CONSTEXPR_INLINE auto EXTAcquireXlibDisplayExtensionName = VK_EXT_ACQUIRE_XLIB_DISPLAY_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTAcquireXlibDisplaySpecVersion = VK_EXT_ACQUIRE_XLIB_DISPLAY_SPEC_VERSION; #endif /*VK_USE_PLATFORM_XLIB_XRANDR_EXT*/ //=== VK_EXT_display_surface_counter === VULKAN_HPP_CONSTEXPR_INLINE auto EXTDisplaySurfaceCounterExtensionName = VK_EXT_DISPLAY_SURFACE_COUNTER_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTDisplaySurfaceCounterSpecVersion = VK_EXT_DISPLAY_SURFACE_COUNTER_SPEC_VERSION; //=== VK_EXT_display_control === VULKAN_HPP_CONSTEXPR_INLINE auto EXTDisplayControlExtensionName = VK_EXT_DISPLAY_CONTROL_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTDisplayControlSpecVersion = VK_EXT_DISPLAY_CONTROL_SPEC_VERSION; //=== VK_GOOGLE_display_timing === VULKAN_HPP_CONSTEXPR_INLINE auto GOOGLEDisplayTimingExtensionName = VK_GOOGLE_DISPLAY_TIMING_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto GOOGLEDisplayTimingSpecVersion = VK_GOOGLE_DISPLAY_TIMING_SPEC_VERSION; //=== VK_NV_sample_mask_override_coverage === VULKAN_HPP_CONSTEXPR_INLINE auto NVSampleMaskOverrideCoverageExtensionName = VK_NV_SAMPLE_MASK_OVERRIDE_COVERAGE_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto NVSampleMaskOverrideCoverageSpecVersion = VK_NV_SAMPLE_MASK_OVERRIDE_COVERAGE_SPEC_VERSION; //=== VK_NV_geometry_shader_passthrough === VULKAN_HPP_CONSTEXPR_INLINE auto NVGeometryShaderPassthroughExtensionName = VK_NV_GEOMETRY_SHADER_PASSTHROUGH_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto NVGeometryShaderPassthroughSpecVersion = VK_NV_GEOMETRY_SHADER_PASSTHROUGH_SPEC_VERSION; //=== VK_NV_viewport_array2 === VULKAN_HPP_CONSTEXPR_INLINE auto NVViewportArray2ExtensionName = VK_NV_VIEWPORT_ARRAY_2_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto NVViewportArray2SpecVersion = VK_NV_VIEWPORT_ARRAY_2_SPEC_VERSION; //=== VK_NVX_multiview_per_view_attributes === VULKAN_HPP_CONSTEXPR_INLINE auto NVXMultiviewPerViewAttributesExtensionName = VK_NVX_MULTIVIEW_PER_VIEW_ATTRIBUTES_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto NVXMultiviewPerViewAttributesSpecVersion = VK_NVX_MULTIVIEW_PER_VIEW_ATTRIBUTES_SPEC_VERSION; //=== VK_NV_viewport_swizzle === VULKAN_HPP_CONSTEXPR_INLINE auto NVViewportSwizzleExtensionName = VK_NV_VIEWPORT_SWIZZLE_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto NVViewportSwizzleSpecVersion = VK_NV_VIEWPORT_SWIZZLE_SPEC_VERSION; //=== VK_EXT_discard_rectangles === VULKAN_HPP_CONSTEXPR_INLINE auto EXTDiscardRectanglesExtensionName = VK_EXT_DISCARD_RECTANGLES_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTDiscardRectanglesSpecVersion = VK_EXT_DISCARD_RECTANGLES_SPEC_VERSION; //=== VK_EXT_conservative_rasterization === VULKAN_HPP_CONSTEXPR_INLINE auto EXTConservativeRasterizationExtensionName = VK_EXT_CONSERVATIVE_RASTERIZATION_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTConservativeRasterizationSpecVersion = VK_EXT_CONSERVATIVE_RASTERIZATION_SPEC_VERSION; //=== VK_EXT_depth_clip_enable === VULKAN_HPP_CONSTEXPR_INLINE auto EXTDepthClipEnableExtensionName = VK_EXT_DEPTH_CLIP_ENABLE_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTDepthClipEnableSpecVersion = VK_EXT_DEPTH_CLIP_ENABLE_SPEC_VERSION; //=== VK_EXT_swapchain_colorspace === VULKAN_HPP_CONSTEXPR_INLINE auto EXTSwapchainColorSpaceExtensionName = VK_EXT_SWAPCHAIN_COLOR_SPACE_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTSwapchainColorSpaceSpecVersion = VK_EXT_SWAPCHAIN_COLOR_SPACE_SPEC_VERSION; //=== VK_EXT_hdr_metadata === VULKAN_HPP_CONSTEXPR_INLINE auto EXTHdrMetadataExtensionName = VK_EXT_HDR_METADATA_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTHdrMetadataSpecVersion = VK_EXT_HDR_METADATA_SPEC_VERSION; //=== VK_KHR_imageless_framebuffer === VULKAN_HPP_CONSTEXPR_INLINE auto KHRImagelessFramebufferExtensionName = VK_KHR_IMAGELESS_FRAMEBUFFER_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRImagelessFramebufferSpecVersion = VK_KHR_IMAGELESS_FRAMEBUFFER_SPEC_VERSION; //=== VK_KHR_create_renderpass2 === VULKAN_HPP_CONSTEXPR_INLINE auto KHRCreateRenderpass2ExtensionName = VK_KHR_CREATE_RENDERPASS_2_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRCreateRenderpass2SpecVersion = VK_KHR_CREATE_RENDERPASS_2_SPEC_VERSION; //=== VK_IMG_relaxed_line_rasterization === VULKAN_HPP_CONSTEXPR_INLINE auto IMGRelaxedLineRasterizationExtensionName = VK_IMG_RELAXED_LINE_RASTERIZATION_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto IMGRelaxedLineRasterizationSpecVersion = VK_IMG_RELAXED_LINE_RASTERIZATION_SPEC_VERSION; //=== VK_KHR_shared_presentable_image === VULKAN_HPP_CONSTEXPR_INLINE auto KHRSharedPresentableImageExtensionName = VK_KHR_SHARED_PRESENTABLE_IMAGE_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRSharedPresentableImageSpecVersion = VK_KHR_SHARED_PRESENTABLE_IMAGE_SPEC_VERSION; //=== VK_KHR_external_fence_capabilities === VULKAN_HPP_CONSTEXPR_INLINE auto KHRExternalFenceCapabilitiesExtensionName = VK_KHR_EXTERNAL_FENCE_CAPABILITIES_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRExternalFenceCapabilitiesSpecVersion = VK_KHR_EXTERNAL_FENCE_CAPABILITIES_SPEC_VERSION; //=== VK_KHR_external_fence === VULKAN_HPP_CONSTEXPR_INLINE auto KHRExternalFenceExtensionName = VK_KHR_EXTERNAL_FENCE_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRExternalFenceSpecVersion = VK_KHR_EXTERNAL_FENCE_SPEC_VERSION; #if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_KHR_external_fence_win32 === VULKAN_HPP_CONSTEXPR_INLINE auto KHRExternalFenceWin32ExtensionName = VK_KHR_EXTERNAL_FENCE_WIN32_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRExternalFenceWin32SpecVersion = VK_KHR_EXTERNAL_FENCE_WIN32_SPEC_VERSION; #endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_KHR_external_fence_fd === VULKAN_HPP_CONSTEXPR_INLINE auto KHRExternalFenceFdExtensionName = VK_KHR_EXTERNAL_FENCE_FD_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRExternalFenceFdSpecVersion = VK_KHR_EXTERNAL_FENCE_FD_SPEC_VERSION; //=== VK_KHR_performance_query === VULKAN_HPP_CONSTEXPR_INLINE auto KHRPerformanceQueryExtensionName = VK_KHR_PERFORMANCE_QUERY_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRPerformanceQuerySpecVersion = VK_KHR_PERFORMANCE_QUERY_SPEC_VERSION; //=== VK_KHR_maintenance2 === VULKAN_HPP_CONSTEXPR_INLINE auto KHRMaintenance2ExtensionName = VK_KHR_MAINTENANCE_2_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRMaintenance2SpecVersion = VK_KHR_MAINTENANCE_2_SPEC_VERSION; //=== VK_KHR_get_surface_capabilities2 === VULKAN_HPP_CONSTEXPR_INLINE auto KHRGetSurfaceCapabilities2ExtensionName = VK_KHR_GET_SURFACE_CAPABILITIES_2_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRGetSurfaceCapabilities2SpecVersion = VK_KHR_GET_SURFACE_CAPABILITIES_2_SPEC_VERSION; //=== VK_KHR_variable_pointers === VULKAN_HPP_CONSTEXPR_INLINE auto KHRVariablePointersExtensionName = VK_KHR_VARIABLE_POINTERS_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRVariablePointersSpecVersion = VK_KHR_VARIABLE_POINTERS_SPEC_VERSION; //=== VK_KHR_get_display_properties2 === VULKAN_HPP_CONSTEXPR_INLINE auto KHRGetDisplayProperties2ExtensionName = VK_KHR_GET_DISPLAY_PROPERTIES_2_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRGetDisplayProperties2SpecVersion = VK_KHR_GET_DISPLAY_PROPERTIES_2_SPEC_VERSION; #if defined( VK_USE_PLATFORM_IOS_MVK ) //=== VK_MVK_ios_surface === VULKAN_HPP_DEPRECATED( "The VK_MVK_ios_surface extension has been deprecated by VK_EXT_metal_surface." ) VULKAN_HPP_CONSTEXPR_INLINE auto MVKIosSurfaceExtensionName = VK_MVK_IOS_SURFACE_EXTENSION_NAME; VULKAN_HPP_DEPRECATED( "The VK_MVK_ios_surface extension has been deprecated by VK_EXT_metal_surface." ) VULKAN_HPP_CONSTEXPR_INLINE auto MVKIosSurfaceSpecVersion = VK_MVK_IOS_SURFACE_SPEC_VERSION; #endif /*VK_USE_PLATFORM_IOS_MVK*/ #if defined( VK_USE_PLATFORM_MACOS_MVK ) //=== VK_MVK_macos_surface === VULKAN_HPP_DEPRECATED( "The VK_MVK_macos_surface extension has been deprecated by VK_EXT_metal_surface." ) VULKAN_HPP_CONSTEXPR_INLINE auto MVKMacosSurfaceExtensionName = VK_MVK_MACOS_SURFACE_EXTENSION_NAME; VULKAN_HPP_DEPRECATED( "The VK_MVK_macos_surface extension has been deprecated by VK_EXT_metal_surface." ) VULKAN_HPP_CONSTEXPR_INLINE auto MVKMacosSurfaceSpecVersion = VK_MVK_MACOS_SURFACE_SPEC_VERSION; #endif /*VK_USE_PLATFORM_MACOS_MVK*/ //=== VK_EXT_external_memory_dma_buf === VULKAN_HPP_CONSTEXPR_INLINE auto EXTExternalMemoryDmaBufExtensionName = VK_EXT_EXTERNAL_MEMORY_DMA_BUF_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTExternalMemoryDmaBufSpecVersion = VK_EXT_EXTERNAL_MEMORY_DMA_BUF_SPEC_VERSION; //=== VK_EXT_queue_family_foreign === VULKAN_HPP_CONSTEXPR_INLINE auto EXTQueueFamilyForeignExtensionName = VK_EXT_QUEUE_FAMILY_FOREIGN_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTQueueFamilyForeignSpecVersion = VK_EXT_QUEUE_FAMILY_FOREIGN_SPEC_VERSION; //=== VK_KHR_dedicated_allocation === VULKAN_HPP_CONSTEXPR_INLINE auto KHRDedicatedAllocationExtensionName = VK_KHR_DEDICATED_ALLOCATION_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRDedicatedAllocationSpecVersion = VK_KHR_DEDICATED_ALLOCATION_SPEC_VERSION; //=== VK_EXT_debug_utils === VULKAN_HPP_CONSTEXPR_INLINE auto EXTDebugUtilsExtensionName = VK_EXT_DEBUG_UTILS_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTDebugUtilsSpecVersion = VK_EXT_DEBUG_UTILS_SPEC_VERSION; #if defined( VK_USE_PLATFORM_ANDROID_KHR ) //=== VK_ANDROID_external_memory_android_hardware_buffer === VULKAN_HPP_CONSTEXPR_INLINE auto ANDROIDExternalMemoryAndroidHardwareBufferExtensionName = VK_ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto ANDROIDExternalMemoryAndroidHardwareBufferSpecVersion = VK_ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER_SPEC_VERSION; #endif /*VK_USE_PLATFORM_ANDROID_KHR*/ //=== VK_EXT_sampler_filter_minmax === VULKAN_HPP_CONSTEXPR_INLINE auto EXTSamplerFilterMinmaxExtensionName = VK_EXT_SAMPLER_FILTER_MINMAX_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTSamplerFilterMinmaxSpecVersion = VK_EXT_SAMPLER_FILTER_MINMAX_SPEC_VERSION; //=== VK_KHR_storage_buffer_storage_class === VULKAN_HPP_CONSTEXPR_INLINE auto KHRStorageBufferStorageClassExtensionName = VK_KHR_STORAGE_BUFFER_STORAGE_CLASS_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRStorageBufferStorageClassSpecVersion = VK_KHR_STORAGE_BUFFER_STORAGE_CLASS_SPEC_VERSION; //=== VK_AMD_gpu_shader_int16 === VULKAN_HPP_DEPRECATED( "The VK_AMD_gpu_shader_int16 extension has been deprecated by VK_KHR_shader_float16_int8." ) VULKAN_HPP_CONSTEXPR_INLINE auto AMDGpuShaderInt16ExtensionName = VK_AMD_GPU_SHADER_INT16_EXTENSION_NAME; VULKAN_HPP_DEPRECATED( "The VK_AMD_gpu_shader_int16 extension has been deprecated by VK_KHR_shader_float16_int8." ) VULKAN_HPP_CONSTEXPR_INLINE auto AMDGpuShaderInt16SpecVersion = VK_AMD_GPU_SHADER_INT16_SPEC_VERSION; #if defined( VK_ENABLE_BETA_EXTENSIONS ) //=== VK_AMDX_shader_enqueue === VULKAN_HPP_CONSTEXPR_INLINE auto AMDXShaderEnqueueExtensionName = VK_AMDX_SHADER_ENQUEUE_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto AMDXShaderEnqueueSpecVersion = VK_AMDX_SHADER_ENQUEUE_SPEC_VERSION; #endif /*VK_ENABLE_BETA_EXTENSIONS*/ //=== VK_AMD_mixed_attachment_samples === VULKAN_HPP_CONSTEXPR_INLINE auto AMDMixedAttachmentSamplesExtensionName = VK_AMD_MIXED_ATTACHMENT_SAMPLES_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto AMDMixedAttachmentSamplesSpecVersion = VK_AMD_MIXED_ATTACHMENT_SAMPLES_SPEC_VERSION; //=== VK_AMD_shader_fragment_mask === VULKAN_HPP_CONSTEXPR_INLINE auto AMDShaderFragmentMaskExtensionName = VK_AMD_SHADER_FRAGMENT_MASK_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto AMDShaderFragmentMaskSpecVersion = VK_AMD_SHADER_FRAGMENT_MASK_SPEC_VERSION; //=== VK_EXT_inline_uniform_block === VULKAN_HPP_CONSTEXPR_INLINE auto EXTInlineUniformBlockExtensionName = VK_EXT_INLINE_UNIFORM_BLOCK_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTInlineUniformBlockSpecVersion = VK_EXT_INLINE_UNIFORM_BLOCK_SPEC_VERSION; //=== VK_EXT_shader_stencil_export === VULKAN_HPP_CONSTEXPR_INLINE auto EXTShaderStencilExportExtensionName = VK_EXT_SHADER_STENCIL_EXPORT_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTShaderStencilExportSpecVersion = VK_EXT_SHADER_STENCIL_EXPORT_SPEC_VERSION; //=== VK_EXT_sample_locations === VULKAN_HPP_CONSTEXPR_INLINE auto EXTSampleLocationsExtensionName = VK_EXT_SAMPLE_LOCATIONS_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTSampleLocationsSpecVersion = VK_EXT_SAMPLE_LOCATIONS_SPEC_VERSION; //=== VK_KHR_relaxed_block_layout === VULKAN_HPP_CONSTEXPR_INLINE auto KHRRelaxedBlockLayoutExtensionName = VK_KHR_RELAXED_BLOCK_LAYOUT_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRRelaxedBlockLayoutSpecVersion = VK_KHR_RELAXED_BLOCK_LAYOUT_SPEC_VERSION; //=== VK_KHR_get_memory_requirements2 === VULKAN_HPP_CONSTEXPR_INLINE auto KHRGetMemoryRequirements2ExtensionName = VK_KHR_GET_MEMORY_REQUIREMENTS_2_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRGetMemoryRequirements2SpecVersion = VK_KHR_GET_MEMORY_REQUIREMENTS_2_SPEC_VERSION; //=== VK_KHR_image_format_list === VULKAN_HPP_CONSTEXPR_INLINE auto KHRImageFormatListExtensionName = VK_KHR_IMAGE_FORMAT_LIST_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRImageFormatListSpecVersion = VK_KHR_IMAGE_FORMAT_LIST_SPEC_VERSION; //=== VK_EXT_blend_operation_advanced === VULKAN_HPP_CONSTEXPR_INLINE auto EXTBlendOperationAdvancedExtensionName = VK_EXT_BLEND_OPERATION_ADVANCED_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTBlendOperationAdvancedSpecVersion = VK_EXT_BLEND_OPERATION_ADVANCED_SPEC_VERSION; //=== VK_NV_fragment_coverage_to_color === VULKAN_HPP_CONSTEXPR_INLINE auto NVFragmentCoverageToColorExtensionName = VK_NV_FRAGMENT_COVERAGE_TO_COLOR_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto NVFragmentCoverageToColorSpecVersion = VK_NV_FRAGMENT_COVERAGE_TO_COLOR_SPEC_VERSION; //=== VK_KHR_acceleration_structure === VULKAN_HPP_CONSTEXPR_INLINE auto KHRAccelerationStructureExtensionName = VK_KHR_ACCELERATION_STRUCTURE_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRAccelerationStructureSpecVersion = VK_KHR_ACCELERATION_STRUCTURE_SPEC_VERSION; //=== VK_KHR_ray_tracing_pipeline === VULKAN_HPP_CONSTEXPR_INLINE auto KHRRayTracingPipelineExtensionName = VK_KHR_RAY_TRACING_PIPELINE_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRRayTracingPipelineSpecVersion = VK_KHR_RAY_TRACING_PIPELINE_SPEC_VERSION; //=== VK_KHR_ray_query === VULKAN_HPP_CONSTEXPR_INLINE auto KHRRayQueryExtensionName = VK_KHR_RAY_QUERY_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRRayQuerySpecVersion = VK_KHR_RAY_QUERY_SPEC_VERSION; //=== VK_NV_framebuffer_mixed_samples === VULKAN_HPP_CONSTEXPR_INLINE auto NVFramebufferMixedSamplesExtensionName = VK_NV_FRAMEBUFFER_MIXED_SAMPLES_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto NVFramebufferMixedSamplesSpecVersion = VK_NV_FRAMEBUFFER_MIXED_SAMPLES_SPEC_VERSION; //=== VK_NV_fill_rectangle === VULKAN_HPP_CONSTEXPR_INLINE auto NVFillRectangleExtensionName = VK_NV_FILL_RECTANGLE_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto NVFillRectangleSpecVersion = VK_NV_FILL_RECTANGLE_SPEC_VERSION; //=== VK_NV_shader_sm_builtins === VULKAN_HPP_CONSTEXPR_INLINE auto NVShaderSmBuiltinsExtensionName = VK_NV_SHADER_SM_BUILTINS_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto NVShaderSmBuiltinsSpecVersion = VK_NV_SHADER_SM_BUILTINS_SPEC_VERSION; //=== VK_EXT_post_depth_coverage === VULKAN_HPP_CONSTEXPR_INLINE auto EXTPostDepthCoverageExtensionName = VK_EXT_POST_DEPTH_COVERAGE_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTPostDepthCoverageSpecVersion = VK_EXT_POST_DEPTH_COVERAGE_SPEC_VERSION; //=== VK_KHR_sampler_ycbcr_conversion === VULKAN_HPP_CONSTEXPR_INLINE auto KHRSamplerYcbcrConversionExtensionName = VK_KHR_SAMPLER_YCBCR_CONVERSION_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRSamplerYcbcrConversionSpecVersion = VK_KHR_SAMPLER_YCBCR_CONVERSION_SPEC_VERSION; //=== VK_KHR_bind_memory2 === VULKAN_HPP_CONSTEXPR_INLINE auto KHRBindMemory2ExtensionName = VK_KHR_BIND_MEMORY_2_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRBindMemory2SpecVersion = VK_KHR_BIND_MEMORY_2_SPEC_VERSION; //=== VK_EXT_image_drm_format_modifier === VULKAN_HPP_CONSTEXPR_INLINE auto EXTImageDrmFormatModifierExtensionName = VK_EXT_IMAGE_DRM_FORMAT_MODIFIER_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTImageDrmFormatModifierSpecVersion = VK_EXT_IMAGE_DRM_FORMAT_MODIFIER_SPEC_VERSION; //=== VK_EXT_validation_cache === VULKAN_HPP_CONSTEXPR_INLINE auto EXTValidationCacheExtensionName = VK_EXT_VALIDATION_CACHE_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTValidationCacheSpecVersion = VK_EXT_VALIDATION_CACHE_SPEC_VERSION; //=== VK_EXT_descriptor_indexing === VULKAN_HPP_CONSTEXPR_INLINE auto EXTDescriptorIndexingExtensionName = VK_EXT_DESCRIPTOR_INDEXING_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTDescriptorIndexingSpecVersion = VK_EXT_DESCRIPTOR_INDEXING_SPEC_VERSION; //=== VK_EXT_shader_viewport_index_layer === VULKAN_HPP_CONSTEXPR_INLINE auto EXTShaderViewportIndexLayerExtensionName = VK_EXT_SHADER_VIEWPORT_INDEX_LAYER_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTShaderViewportIndexLayerSpecVersion = VK_EXT_SHADER_VIEWPORT_INDEX_LAYER_SPEC_VERSION; #if defined( VK_ENABLE_BETA_EXTENSIONS ) //=== VK_KHR_portability_subset === VULKAN_HPP_CONSTEXPR_INLINE auto KHRPortabilitySubsetExtensionName = VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRPortabilitySubsetSpecVersion = VK_KHR_PORTABILITY_SUBSET_SPEC_VERSION; #endif /*VK_ENABLE_BETA_EXTENSIONS*/ //=== VK_NV_shading_rate_image === VULKAN_HPP_CONSTEXPR_INLINE auto NVShadingRateImageExtensionName = VK_NV_SHADING_RATE_IMAGE_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto NVShadingRateImageSpecVersion = VK_NV_SHADING_RATE_IMAGE_SPEC_VERSION; //=== VK_NV_ray_tracing === VULKAN_HPP_DEPRECATED( "The VK_NV_ray_tracing extension has been deprecated by VK_KHR_ray_tracing_pipeline." ) VULKAN_HPP_CONSTEXPR_INLINE auto NVRayTracingExtensionName = VK_NV_RAY_TRACING_EXTENSION_NAME; VULKAN_HPP_DEPRECATED( "The VK_NV_ray_tracing extension has been deprecated by VK_KHR_ray_tracing_pipeline." ) VULKAN_HPP_CONSTEXPR_INLINE auto NVRayTracingSpecVersion = VK_NV_RAY_TRACING_SPEC_VERSION; //=== VK_NV_representative_fragment_test === VULKAN_HPP_CONSTEXPR_INLINE auto NVRepresentativeFragmentTestExtensionName = VK_NV_REPRESENTATIVE_FRAGMENT_TEST_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto NVRepresentativeFragmentTestSpecVersion = VK_NV_REPRESENTATIVE_FRAGMENT_TEST_SPEC_VERSION; //=== VK_KHR_maintenance3 === VULKAN_HPP_CONSTEXPR_INLINE auto KHRMaintenance3ExtensionName = VK_KHR_MAINTENANCE_3_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRMaintenance3SpecVersion = VK_KHR_MAINTENANCE_3_SPEC_VERSION; //=== VK_KHR_draw_indirect_count === VULKAN_HPP_CONSTEXPR_INLINE auto KHRDrawIndirectCountExtensionName = VK_KHR_DRAW_INDIRECT_COUNT_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRDrawIndirectCountSpecVersion = VK_KHR_DRAW_INDIRECT_COUNT_SPEC_VERSION; //=== VK_EXT_filter_cubic === VULKAN_HPP_CONSTEXPR_INLINE auto EXTFilterCubicExtensionName = VK_EXT_FILTER_CUBIC_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTFilterCubicSpecVersion = VK_EXT_FILTER_CUBIC_SPEC_VERSION; //=== VK_QCOM_render_pass_shader_resolve === VULKAN_HPP_CONSTEXPR_INLINE auto QCOMRenderPassShaderResolveExtensionName = VK_QCOM_RENDER_PASS_SHADER_RESOLVE_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto QCOMRenderPassShaderResolveSpecVersion = VK_QCOM_RENDER_PASS_SHADER_RESOLVE_SPEC_VERSION; //=== VK_EXT_global_priority === VULKAN_HPP_CONSTEXPR_INLINE auto EXTGlobalPriorityExtensionName = VK_EXT_GLOBAL_PRIORITY_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTGlobalPrioritySpecVersion = VK_EXT_GLOBAL_PRIORITY_SPEC_VERSION; //=== VK_KHR_shader_subgroup_extended_types === VULKAN_HPP_CONSTEXPR_INLINE auto KHRShaderSubgroupExtendedTypesExtensionName = VK_KHR_SHADER_SUBGROUP_EXTENDED_TYPES_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRShaderSubgroupExtendedTypesSpecVersion = VK_KHR_SHADER_SUBGROUP_EXTENDED_TYPES_SPEC_VERSION; //=== VK_KHR_8bit_storage === VULKAN_HPP_CONSTEXPR_INLINE auto KHR8BitStorageExtensionName = VK_KHR_8BIT_STORAGE_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHR8BitStorageSpecVersion = VK_KHR_8BIT_STORAGE_SPEC_VERSION; //=== VK_EXT_external_memory_host === VULKAN_HPP_CONSTEXPR_INLINE auto EXTExternalMemoryHostExtensionName = VK_EXT_EXTERNAL_MEMORY_HOST_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTExternalMemoryHostSpecVersion = VK_EXT_EXTERNAL_MEMORY_HOST_SPEC_VERSION; //=== VK_AMD_buffer_marker === VULKAN_HPP_CONSTEXPR_INLINE auto AMDBufferMarkerExtensionName = VK_AMD_BUFFER_MARKER_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto AMDBufferMarkerSpecVersion = VK_AMD_BUFFER_MARKER_SPEC_VERSION; //=== VK_KHR_shader_atomic_int64 === VULKAN_HPP_CONSTEXPR_INLINE auto KHRShaderAtomicInt64ExtensionName = VK_KHR_SHADER_ATOMIC_INT64_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRShaderAtomicInt64SpecVersion = VK_KHR_SHADER_ATOMIC_INT64_SPEC_VERSION; //=== VK_KHR_shader_clock === VULKAN_HPP_CONSTEXPR_INLINE auto KHRShaderClockExtensionName = VK_KHR_SHADER_CLOCK_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRShaderClockSpecVersion = VK_KHR_SHADER_CLOCK_SPEC_VERSION; //=== VK_AMD_pipeline_compiler_control === VULKAN_HPP_CONSTEXPR_INLINE auto AMDPipelineCompilerControlExtensionName = VK_AMD_PIPELINE_COMPILER_CONTROL_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto AMDPipelineCompilerControlSpecVersion = VK_AMD_PIPELINE_COMPILER_CONTROL_SPEC_VERSION; //=== VK_EXT_calibrated_timestamps === VULKAN_HPP_CONSTEXPR_INLINE auto EXTCalibratedTimestampsExtensionName = VK_EXT_CALIBRATED_TIMESTAMPS_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTCalibratedTimestampsSpecVersion = VK_EXT_CALIBRATED_TIMESTAMPS_SPEC_VERSION; //=== VK_AMD_shader_core_properties === VULKAN_HPP_CONSTEXPR_INLINE auto AMDShaderCorePropertiesExtensionName = VK_AMD_SHADER_CORE_PROPERTIES_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto AMDShaderCorePropertiesSpecVersion = VK_AMD_SHADER_CORE_PROPERTIES_SPEC_VERSION; //=== VK_KHR_video_decode_h265 === VULKAN_HPP_CONSTEXPR_INLINE auto KHRVideoDecodeH265ExtensionName = VK_KHR_VIDEO_DECODE_H265_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRVideoDecodeH265SpecVersion = VK_KHR_VIDEO_DECODE_H265_SPEC_VERSION; //=== VK_KHR_global_priority === VULKAN_HPP_CONSTEXPR_INLINE auto KHRGlobalPriorityExtensionName = VK_KHR_GLOBAL_PRIORITY_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRGlobalPrioritySpecVersion = VK_KHR_GLOBAL_PRIORITY_SPEC_VERSION; //=== VK_AMD_memory_overallocation_behavior === VULKAN_HPP_CONSTEXPR_INLINE auto AMDMemoryOverallocationBehaviorExtensionName = VK_AMD_MEMORY_OVERALLOCATION_BEHAVIOR_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto AMDMemoryOverallocationBehaviorSpecVersion = VK_AMD_MEMORY_OVERALLOCATION_BEHAVIOR_SPEC_VERSION; //=== VK_EXT_vertex_attribute_divisor === VULKAN_HPP_CONSTEXPR_INLINE auto EXTVertexAttributeDivisorExtensionName = VK_EXT_VERTEX_ATTRIBUTE_DIVISOR_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTVertexAttributeDivisorSpecVersion = VK_EXT_VERTEX_ATTRIBUTE_DIVISOR_SPEC_VERSION; #if defined( VK_USE_PLATFORM_GGP ) //=== VK_GGP_frame_token === VULKAN_HPP_CONSTEXPR_INLINE auto GGPFrameTokenExtensionName = VK_GGP_FRAME_TOKEN_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto GGPFrameTokenSpecVersion = VK_GGP_FRAME_TOKEN_SPEC_VERSION; #endif /*VK_USE_PLATFORM_GGP*/ //=== VK_EXT_pipeline_creation_feedback === VULKAN_HPP_CONSTEXPR_INLINE auto EXTPipelineCreationFeedbackExtensionName = VK_EXT_PIPELINE_CREATION_FEEDBACK_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTPipelineCreationFeedbackSpecVersion = VK_EXT_PIPELINE_CREATION_FEEDBACK_SPEC_VERSION; //=== VK_KHR_driver_properties === VULKAN_HPP_CONSTEXPR_INLINE auto KHRDriverPropertiesExtensionName = VK_KHR_DRIVER_PROPERTIES_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRDriverPropertiesSpecVersion = VK_KHR_DRIVER_PROPERTIES_SPEC_VERSION; //=== VK_KHR_shader_float_controls === VULKAN_HPP_CONSTEXPR_INLINE auto KHRShaderFloatControlsExtensionName = VK_KHR_SHADER_FLOAT_CONTROLS_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRShaderFloatControlsSpecVersion = VK_KHR_SHADER_FLOAT_CONTROLS_SPEC_VERSION; //=== VK_NV_shader_subgroup_partitioned === VULKAN_HPP_CONSTEXPR_INLINE auto NVShaderSubgroupPartitionedExtensionName = VK_NV_SHADER_SUBGROUP_PARTITIONED_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto NVShaderSubgroupPartitionedSpecVersion = VK_NV_SHADER_SUBGROUP_PARTITIONED_SPEC_VERSION; //=== VK_KHR_depth_stencil_resolve === VULKAN_HPP_CONSTEXPR_INLINE auto KHRDepthStencilResolveExtensionName = VK_KHR_DEPTH_STENCIL_RESOLVE_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRDepthStencilResolveSpecVersion = VK_KHR_DEPTH_STENCIL_RESOLVE_SPEC_VERSION; //=== VK_KHR_swapchain_mutable_format === VULKAN_HPP_CONSTEXPR_INLINE auto KHRSwapchainMutableFormatExtensionName = VK_KHR_SWAPCHAIN_MUTABLE_FORMAT_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRSwapchainMutableFormatSpecVersion = VK_KHR_SWAPCHAIN_MUTABLE_FORMAT_SPEC_VERSION; //=== VK_NV_compute_shader_derivatives === VULKAN_HPP_CONSTEXPR_INLINE auto NVComputeShaderDerivativesExtensionName = VK_NV_COMPUTE_SHADER_DERIVATIVES_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto NVComputeShaderDerivativesSpecVersion = VK_NV_COMPUTE_SHADER_DERIVATIVES_SPEC_VERSION; //=== VK_NV_mesh_shader === VULKAN_HPP_CONSTEXPR_INLINE auto NVMeshShaderExtensionName = VK_NV_MESH_SHADER_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto NVMeshShaderSpecVersion = VK_NV_MESH_SHADER_SPEC_VERSION; //=== VK_NV_fragment_shader_barycentric === VULKAN_HPP_CONSTEXPR_INLINE auto NVFragmentShaderBarycentricExtensionName = VK_NV_FRAGMENT_SHADER_BARYCENTRIC_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto NVFragmentShaderBarycentricSpecVersion = VK_NV_FRAGMENT_SHADER_BARYCENTRIC_SPEC_VERSION; //=== VK_NV_shader_image_footprint === VULKAN_HPP_CONSTEXPR_INLINE auto NVShaderImageFootprintExtensionName = VK_NV_SHADER_IMAGE_FOOTPRINT_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto NVShaderImageFootprintSpecVersion = VK_NV_SHADER_IMAGE_FOOTPRINT_SPEC_VERSION; //=== VK_NV_scissor_exclusive === VULKAN_HPP_CONSTEXPR_INLINE auto NVScissorExclusiveExtensionName = VK_NV_SCISSOR_EXCLUSIVE_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto NVScissorExclusiveSpecVersion = VK_NV_SCISSOR_EXCLUSIVE_SPEC_VERSION; //=== VK_NV_device_diagnostic_checkpoints === VULKAN_HPP_CONSTEXPR_INLINE auto NVDeviceDiagnosticCheckpointsExtensionName = VK_NV_DEVICE_DIAGNOSTIC_CHECKPOINTS_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto NVDeviceDiagnosticCheckpointsSpecVersion = VK_NV_DEVICE_DIAGNOSTIC_CHECKPOINTS_SPEC_VERSION; //=== VK_KHR_timeline_semaphore === VULKAN_HPP_CONSTEXPR_INLINE auto KHRTimelineSemaphoreExtensionName = VK_KHR_TIMELINE_SEMAPHORE_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRTimelineSemaphoreSpecVersion = VK_KHR_TIMELINE_SEMAPHORE_SPEC_VERSION; //=== VK_INTEL_shader_integer_functions2 === VULKAN_HPP_CONSTEXPR_INLINE auto INTELShaderIntegerFunctions2ExtensionName = VK_INTEL_SHADER_INTEGER_FUNCTIONS_2_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto INTELShaderIntegerFunctions2SpecVersion = VK_INTEL_SHADER_INTEGER_FUNCTIONS_2_SPEC_VERSION; //=== VK_INTEL_performance_query === VULKAN_HPP_CONSTEXPR_INLINE auto INTELPerformanceQueryExtensionName = VK_INTEL_PERFORMANCE_QUERY_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto INTELPerformanceQuerySpecVersion = VK_INTEL_PERFORMANCE_QUERY_SPEC_VERSION; //=== VK_KHR_vulkan_memory_model === VULKAN_HPP_CONSTEXPR_INLINE auto KHRVulkanMemoryModelExtensionName = VK_KHR_VULKAN_MEMORY_MODEL_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRVulkanMemoryModelSpecVersion = VK_KHR_VULKAN_MEMORY_MODEL_SPEC_VERSION; //=== VK_EXT_pci_bus_info === VULKAN_HPP_CONSTEXPR_INLINE auto EXTPciBusInfoExtensionName = VK_EXT_PCI_BUS_INFO_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTPciBusInfoSpecVersion = VK_EXT_PCI_BUS_INFO_SPEC_VERSION; //=== VK_AMD_display_native_hdr === VULKAN_HPP_CONSTEXPR_INLINE auto AMDDisplayNativeHdrExtensionName = VK_AMD_DISPLAY_NATIVE_HDR_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto AMDDisplayNativeHdrSpecVersion = VK_AMD_DISPLAY_NATIVE_HDR_SPEC_VERSION; #if defined( VK_USE_PLATFORM_FUCHSIA ) //=== VK_FUCHSIA_imagepipe_surface === VULKAN_HPP_CONSTEXPR_INLINE auto FUCHSIAImagepipeSurfaceExtensionName = VK_FUCHSIA_IMAGEPIPE_SURFACE_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto FUCHSIAImagepipeSurfaceSpecVersion = VK_FUCHSIA_IMAGEPIPE_SURFACE_SPEC_VERSION; #endif /*VK_USE_PLATFORM_FUCHSIA*/ //=== VK_KHR_shader_terminate_invocation === VULKAN_HPP_CONSTEXPR_INLINE auto KHRShaderTerminateInvocationExtensionName = VK_KHR_SHADER_TERMINATE_INVOCATION_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRShaderTerminateInvocationSpecVersion = VK_KHR_SHADER_TERMINATE_INVOCATION_SPEC_VERSION; #if defined( VK_USE_PLATFORM_METAL_EXT ) //=== VK_EXT_metal_surface === VULKAN_HPP_CONSTEXPR_INLINE auto EXTMetalSurfaceExtensionName = VK_EXT_METAL_SURFACE_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTMetalSurfaceSpecVersion = VK_EXT_METAL_SURFACE_SPEC_VERSION; #endif /*VK_USE_PLATFORM_METAL_EXT*/ //=== VK_EXT_fragment_density_map === VULKAN_HPP_CONSTEXPR_INLINE auto EXTFragmentDensityMapExtensionName = VK_EXT_FRAGMENT_DENSITY_MAP_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTFragmentDensityMapSpecVersion = VK_EXT_FRAGMENT_DENSITY_MAP_SPEC_VERSION; //=== VK_EXT_scalar_block_layout === VULKAN_HPP_CONSTEXPR_INLINE auto EXTScalarBlockLayoutExtensionName = VK_EXT_SCALAR_BLOCK_LAYOUT_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTScalarBlockLayoutSpecVersion = VK_EXT_SCALAR_BLOCK_LAYOUT_SPEC_VERSION; //=== VK_GOOGLE_hlsl_functionality1 === VULKAN_HPP_CONSTEXPR_INLINE auto GOOGLEHlslFunctionality1ExtensionName = VK_GOOGLE_HLSL_FUNCTIONALITY_1_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto GOOGLEHlslFunctionality1SpecVersion = VK_GOOGLE_HLSL_FUNCTIONALITY_1_SPEC_VERSION; //=== VK_GOOGLE_decorate_string === VULKAN_HPP_CONSTEXPR_INLINE auto GOOGLEDecorateStringExtensionName = VK_GOOGLE_DECORATE_STRING_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto GOOGLEDecorateStringSpecVersion = VK_GOOGLE_DECORATE_STRING_SPEC_VERSION; //=== VK_EXT_subgroup_size_control === VULKAN_HPP_CONSTEXPR_INLINE auto EXTSubgroupSizeControlExtensionName = VK_EXT_SUBGROUP_SIZE_CONTROL_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTSubgroupSizeControlSpecVersion = VK_EXT_SUBGROUP_SIZE_CONTROL_SPEC_VERSION; //=== VK_KHR_fragment_shading_rate === VULKAN_HPP_CONSTEXPR_INLINE auto KHRFragmentShadingRateExtensionName = VK_KHR_FRAGMENT_SHADING_RATE_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRFragmentShadingRateSpecVersion = VK_KHR_FRAGMENT_SHADING_RATE_SPEC_VERSION; //=== VK_AMD_shader_core_properties2 === VULKAN_HPP_CONSTEXPR_INLINE auto AMDShaderCoreProperties2ExtensionName = VK_AMD_SHADER_CORE_PROPERTIES_2_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto AMDShaderCoreProperties2SpecVersion = VK_AMD_SHADER_CORE_PROPERTIES_2_SPEC_VERSION; //=== VK_AMD_device_coherent_memory === VULKAN_HPP_CONSTEXPR_INLINE auto AMDDeviceCoherentMemoryExtensionName = VK_AMD_DEVICE_COHERENT_MEMORY_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto AMDDeviceCoherentMemorySpecVersion = VK_AMD_DEVICE_COHERENT_MEMORY_SPEC_VERSION; //=== VK_KHR_dynamic_rendering_local_read === VULKAN_HPP_CONSTEXPR_INLINE auto KHRDynamicRenderingLocalReadExtensionName = VK_KHR_DYNAMIC_RENDERING_LOCAL_READ_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRDynamicRenderingLocalReadSpecVersion = VK_KHR_DYNAMIC_RENDERING_LOCAL_READ_SPEC_VERSION; //=== VK_EXT_shader_image_atomic_int64 === VULKAN_HPP_CONSTEXPR_INLINE auto EXTShaderImageAtomicInt64ExtensionName = VK_EXT_SHADER_IMAGE_ATOMIC_INT64_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTShaderImageAtomicInt64SpecVersion = VK_EXT_SHADER_IMAGE_ATOMIC_INT64_SPEC_VERSION; //=== VK_KHR_shader_quad_control === VULKAN_HPP_CONSTEXPR_INLINE auto KHRShaderQuadControlExtensionName = VK_KHR_SHADER_QUAD_CONTROL_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRShaderQuadControlSpecVersion = VK_KHR_SHADER_QUAD_CONTROL_SPEC_VERSION; //=== VK_KHR_spirv_1_4 === VULKAN_HPP_CONSTEXPR_INLINE auto KHRSpirv14ExtensionName = VK_KHR_SPIRV_1_4_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRSpirv14SpecVersion = VK_KHR_SPIRV_1_4_SPEC_VERSION; //=== VK_EXT_memory_budget === VULKAN_HPP_CONSTEXPR_INLINE auto EXTMemoryBudgetExtensionName = VK_EXT_MEMORY_BUDGET_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTMemoryBudgetSpecVersion = VK_EXT_MEMORY_BUDGET_SPEC_VERSION; //=== VK_EXT_memory_priority === VULKAN_HPP_CONSTEXPR_INLINE auto EXTMemoryPriorityExtensionName = VK_EXT_MEMORY_PRIORITY_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTMemoryPrioritySpecVersion = VK_EXT_MEMORY_PRIORITY_SPEC_VERSION; //=== VK_KHR_surface_protected_capabilities === VULKAN_HPP_CONSTEXPR_INLINE auto KHRSurfaceProtectedCapabilitiesExtensionName = VK_KHR_SURFACE_PROTECTED_CAPABILITIES_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRSurfaceProtectedCapabilitiesSpecVersion = VK_KHR_SURFACE_PROTECTED_CAPABILITIES_SPEC_VERSION; //=== VK_NV_dedicated_allocation_image_aliasing === VULKAN_HPP_CONSTEXPR_INLINE auto NVDedicatedAllocationImageAliasingExtensionName = VK_NV_DEDICATED_ALLOCATION_IMAGE_ALIASING_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto NVDedicatedAllocationImageAliasingSpecVersion = VK_NV_DEDICATED_ALLOCATION_IMAGE_ALIASING_SPEC_VERSION; //=== VK_KHR_separate_depth_stencil_layouts === VULKAN_HPP_CONSTEXPR_INLINE auto KHRSeparateDepthStencilLayoutsExtensionName = VK_KHR_SEPARATE_DEPTH_STENCIL_LAYOUTS_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRSeparateDepthStencilLayoutsSpecVersion = VK_KHR_SEPARATE_DEPTH_STENCIL_LAYOUTS_SPEC_VERSION; //=== VK_EXT_buffer_device_address === VULKAN_HPP_DEPRECATED( "The VK_EXT_buffer_device_address extension has been deprecated by VK_KHR_buffer_device_address." ) VULKAN_HPP_CONSTEXPR_INLINE auto EXTBufferDeviceAddressExtensionName = VK_EXT_BUFFER_DEVICE_ADDRESS_EXTENSION_NAME; VULKAN_HPP_DEPRECATED( "The VK_EXT_buffer_device_address extension has been deprecated by VK_KHR_buffer_device_address." ) VULKAN_HPP_CONSTEXPR_INLINE auto EXTBufferDeviceAddressSpecVersion = VK_EXT_BUFFER_DEVICE_ADDRESS_SPEC_VERSION; //=== VK_EXT_tooling_info === VULKAN_HPP_CONSTEXPR_INLINE auto EXTToolingInfoExtensionName = VK_EXT_TOOLING_INFO_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTToolingInfoSpecVersion = VK_EXT_TOOLING_INFO_SPEC_VERSION; //=== VK_EXT_separate_stencil_usage === VULKAN_HPP_CONSTEXPR_INLINE auto EXTSeparateStencilUsageExtensionName = VK_EXT_SEPARATE_STENCIL_USAGE_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTSeparateStencilUsageSpecVersion = VK_EXT_SEPARATE_STENCIL_USAGE_SPEC_VERSION; //=== VK_EXT_validation_features === VULKAN_HPP_DEPRECATED( "The VK_EXT_validation_features extension has been deprecated by VK_EXT_layer_settings." ) VULKAN_HPP_CONSTEXPR_INLINE auto EXTValidationFeaturesExtensionName = VK_EXT_VALIDATION_FEATURES_EXTENSION_NAME; VULKAN_HPP_DEPRECATED( "The VK_EXT_validation_features extension has been deprecated by VK_EXT_layer_settings." ) VULKAN_HPP_CONSTEXPR_INLINE auto EXTValidationFeaturesSpecVersion = VK_EXT_VALIDATION_FEATURES_SPEC_VERSION; //=== VK_KHR_present_wait === VULKAN_HPP_CONSTEXPR_INLINE auto KHRPresentWaitExtensionName = VK_KHR_PRESENT_WAIT_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRPresentWaitSpecVersion = VK_KHR_PRESENT_WAIT_SPEC_VERSION; //=== VK_NV_cooperative_matrix === VULKAN_HPP_CONSTEXPR_INLINE auto NVCooperativeMatrixExtensionName = VK_NV_COOPERATIVE_MATRIX_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto NVCooperativeMatrixSpecVersion = VK_NV_COOPERATIVE_MATRIX_SPEC_VERSION; //=== VK_NV_coverage_reduction_mode === VULKAN_HPP_CONSTEXPR_INLINE auto NVCoverageReductionModeExtensionName = VK_NV_COVERAGE_REDUCTION_MODE_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto NVCoverageReductionModeSpecVersion = VK_NV_COVERAGE_REDUCTION_MODE_SPEC_VERSION; //=== VK_EXT_fragment_shader_interlock === VULKAN_HPP_CONSTEXPR_INLINE auto EXTFragmentShaderInterlockExtensionName = VK_EXT_FRAGMENT_SHADER_INTERLOCK_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTFragmentShaderInterlockSpecVersion = VK_EXT_FRAGMENT_SHADER_INTERLOCK_SPEC_VERSION; //=== VK_EXT_ycbcr_image_arrays === VULKAN_HPP_CONSTEXPR_INLINE auto EXTYcbcrImageArraysExtensionName = VK_EXT_YCBCR_IMAGE_ARRAYS_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTYcbcrImageArraysSpecVersion = VK_EXT_YCBCR_IMAGE_ARRAYS_SPEC_VERSION; //=== VK_KHR_uniform_buffer_standard_layout === VULKAN_HPP_CONSTEXPR_INLINE auto KHRUniformBufferStandardLayoutExtensionName = VK_KHR_UNIFORM_BUFFER_STANDARD_LAYOUT_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRUniformBufferStandardLayoutSpecVersion = VK_KHR_UNIFORM_BUFFER_STANDARD_LAYOUT_SPEC_VERSION; //=== VK_EXT_provoking_vertex === VULKAN_HPP_CONSTEXPR_INLINE auto EXTProvokingVertexExtensionName = VK_EXT_PROVOKING_VERTEX_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTProvokingVertexSpecVersion = VK_EXT_PROVOKING_VERTEX_SPEC_VERSION; #if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_EXT_full_screen_exclusive === VULKAN_HPP_CONSTEXPR_INLINE auto EXTFullScreenExclusiveExtensionName = VK_EXT_FULL_SCREEN_EXCLUSIVE_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTFullScreenExclusiveSpecVersion = VK_EXT_FULL_SCREEN_EXCLUSIVE_SPEC_VERSION; #endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_EXT_headless_surface === VULKAN_HPP_CONSTEXPR_INLINE auto EXTHeadlessSurfaceExtensionName = VK_EXT_HEADLESS_SURFACE_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTHeadlessSurfaceSpecVersion = VK_EXT_HEADLESS_SURFACE_SPEC_VERSION; //=== VK_KHR_buffer_device_address === VULKAN_HPP_CONSTEXPR_INLINE auto KHRBufferDeviceAddressExtensionName = VK_KHR_BUFFER_DEVICE_ADDRESS_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRBufferDeviceAddressSpecVersion = VK_KHR_BUFFER_DEVICE_ADDRESS_SPEC_VERSION; //=== VK_EXT_line_rasterization === VULKAN_HPP_CONSTEXPR_INLINE auto EXTLineRasterizationExtensionName = VK_EXT_LINE_RASTERIZATION_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTLineRasterizationSpecVersion = VK_EXT_LINE_RASTERIZATION_SPEC_VERSION; //=== VK_EXT_shader_atomic_float === VULKAN_HPP_CONSTEXPR_INLINE auto EXTShaderAtomicFloatExtensionName = VK_EXT_SHADER_ATOMIC_FLOAT_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTShaderAtomicFloatSpecVersion = VK_EXT_SHADER_ATOMIC_FLOAT_SPEC_VERSION; //=== VK_EXT_host_query_reset === VULKAN_HPP_CONSTEXPR_INLINE auto EXTHostQueryResetExtensionName = VK_EXT_HOST_QUERY_RESET_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTHostQueryResetSpecVersion = VK_EXT_HOST_QUERY_RESET_SPEC_VERSION; //=== VK_EXT_index_type_uint8 === VULKAN_HPP_CONSTEXPR_INLINE auto EXTIndexTypeUint8ExtensionName = VK_EXT_INDEX_TYPE_UINT8_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTIndexTypeUint8SpecVersion = VK_EXT_INDEX_TYPE_UINT8_SPEC_VERSION; //=== VK_EXT_extended_dynamic_state === VULKAN_HPP_CONSTEXPR_INLINE auto EXTExtendedDynamicStateExtensionName = VK_EXT_EXTENDED_DYNAMIC_STATE_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTExtendedDynamicStateSpecVersion = VK_EXT_EXTENDED_DYNAMIC_STATE_SPEC_VERSION; //=== VK_KHR_deferred_host_operations === VULKAN_HPP_CONSTEXPR_INLINE auto KHRDeferredHostOperationsExtensionName = VK_KHR_DEFERRED_HOST_OPERATIONS_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRDeferredHostOperationsSpecVersion = VK_KHR_DEFERRED_HOST_OPERATIONS_SPEC_VERSION; //=== VK_KHR_pipeline_executable_properties === VULKAN_HPP_CONSTEXPR_INLINE auto KHRPipelineExecutablePropertiesExtensionName = VK_KHR_PIPELINE_EXECUTABLE_PROPERTIES_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRPipelineExecutablePropertiesSpecVersion = VK_KHR_PIPELINE_EXECUTABLE_PROPERTIES_SPEC_VERSION; //=== VK_EXT_host_image_copy === VULKAN_HPP_CONSTEXPR_INLINE auto EXTHostImageCopyExtensionName = VK_EXT_HOST_IMAGE_COPY_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTHostImageCopySpecVersion = VK_EXT_HOST_IMAGE_COPY_SPEC_VERSION; //=== VK_KHR_map_memory2 === VULKAN_HPP_CONSTEXPR_INLINE auto KHRMapMemory2ExtensionName = VK_KHR_MAP_MEMORY_2_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRMapMemory2SpecVersion = VK_KHR_MAP_MEMORY_2_SPEC_VERSION; //=== VK_EXT_map_memory_placed === VULKAN_HPP_CONSTEXPR_INLINE auto EXTMapMemoryPlacedExtensionName = VK_EXT_MAP_MEMORY_PLACED_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTMapMemoryPlacedSpecVersion = VK_EXT_MAP_MEMORY_PLACED_SPEC_VERSION; //=== VK_EXT_shader_atomic_float2 === VULKAN_HPP_CONSTEXPR_INLINE auto EXTShaderAtomicFloat2ExtensionName = VK_EXT_SHADER_ATOMIC_FLOAT_2_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTShaderAtomicFloat2SpecVersion = VK_EXT_SHADER_ATOMIC_FLOAT_2_SPEC_VERSION; //=== VK_EXT_surface_maintenance1 === VULKAN_HPP_CONSTEXPR_INLINE auto EXTSurfaceMaintenance1ExtensionName = VK_EXT_SURFACE_MAINTENANCE_1_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTSurfaceMaintenance1SpecVersion = VK_EXT_SURFACE_MAINTENANCE_1_SPEC_VERSION; //=== VK_EXT_swapchain_maintenance1 === VULKAN_HPP_CONSTEXPR_INLINE auto EXTSwapchainMaintenance1ExtensionName = VK_EXT_SWAPCHAIN_MAINTENANCE_1_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTSwapchainMaintenance1SpecVersion = VK_EXT_SWAPCHAIN_MAINTENANCE_1_SPEC_VERSION; //=== VK_EXT_shader_demote_to_helper_invocation === VULKAN_HPP_CONSTEXPR_INLINE auto EXTShaderDemoteToHelperInvocationExtensionName = VK_EXT_SHADER_DEMOTE_TO_HELPER_INVOCATION_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTShaderDemoteToHelperInvocationSpecVersion = VK_EXT_SHADER_DEMOTE_TO_HELPER_INVOCATION_SPEC_VERSION; //=== VK_NV_device_generated_commands === VULKAN_HPP_CONSTEXPR_INLINE auto NVDeviceGeneratedCommandsExtensionName = VK_NV_DEVICE_GENERATED_COMMANDS_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto NVDeviceGeneratedCommandsSpecVersion = VK_NV_DEVICE_GENERATED_COMMANDS_SPEC_VERSION; //=== VK_NV_inherited_viewport_scissor === VULKAN_HPP_CONSTEXPR_INLINE auto NVInheritedViewportScissorExtensionName = VK_NV_INHERITED_VIEWPORT_SCISSOR_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto NVInheritedViewportScissorSpecVersion = VK_NV_INHERITED_VIEWPORT_SCISSOR_SPEC_VERSION; //=== VK_KHR_shader_integer_dot_product === VULKAN_HPP_CONSTEXPR_INLINE auto KHRShaderIntegerDotProductExtensionName = VK_KHR_SHADER_INTEGER_DOT_PRODUCT_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRShaderIntegerDotProductSpecVersion = VK_KHR_SHADER_INTEGER_DOT_PRODUCT_SPEC_VERSION; //=== VK_EXT_texel_buffer_alignment === VULKAN_HPP_CONSTEXPR_INLINE auto EXTTexelBufferAlignmentExtensionName = VK_EXT_TEXEL_BUFFER_ALIGNMENT_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTTexelBufferAlignmentSpecVersion = VK_EXT_TEXEL_BUFFER_ALIGNMENT_SPEC_VERSION; //=== VK_QCOM_render_pass_transform === VULKAN_HPP_CONSTEXPR_INLINE auto QCOMRenderPassTransformExtensionName = VK_QCOM_RENDER_PASS_TRANSFORM_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto QCOMRenderPassTransformSpecVersion = VK_QCOM_RENDER_PASS_TRANSFORM_SPEC_VERSION; //=== VK_EXT_depth_bias_control === VULKAN_HPP_CONSTEXPR_INLINE auto EXTDepthBiasControlExtensionName = VK_EXT_DEPTH_BIAS_CONTROL_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTDepthBiasControlSpecVersion = VK_EXT_DEPTH_BIAS_CONTROL_SPEC_VERSION; //=== VK_EXT_device_memory_report === VULKAN_HPP_CONSTEXPR_INLINE auto EXTDeviceMemoryReportExtensionName = VK_EXT_DEVICE_MEMORY_REPORT_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTDeviceMemoryReportSpecVersion = VK_EXT_DEVICE_MEMORY_REPORT_SPEC_VERSION; //=== VK_EXT_acquire_drm_display === VULKAN_HPP_CONSTEXPR_INLINE auto EXTAcquireDrmDisplayExtensionName = VK_EXT_ACQUIRE_DRM_DISPLAY_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTAcquireDrmDisplaySpecVersion = VK_EXT_ACQUIRE_DRM_DISPLAY_SPEC_VERSION; //=== VK_EXT_robustness2 === VULKAN_HPP_CONSTEXPR_INLINE auto EXTRobustness2ExtensionName = VK_EXT_ROBUSTNESS_2_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTRobustness2SpecVersion = VK_EXT_ROBUSTNESS_2_SPEC_VERSION; //=== VK_EXT_custom_border_color === VULKAN_HPP_CONSTEXPR_INLINE auto EXTCustomBorderColorExtensionName = VK_EXT_CUSTOM_BORDER_COLOR_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTCustomBorderColorSpecVersion = VK_EXT_CUSTOM_BORDER_COLOR_SPEC_VERSION; //=== VK_GOOGLE_user_type === VULKAN_HPP_CONSTEXPR_INLINE auto GOOGLEUserTypeExtensionName = VK_GOOGLE_USER_TYPE_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto GOOGLEUserTypeSpecVersion = VK_GOOGLE_USER_TYPE_SPEC_VERSION; //=== VK_KHR_pipeline_library === VULKAN_HPP_CONSTEXPR_INLINE auto KHRPipelineLibraryExtensionName = VK_KHR_PIPELINE_LIBRARY_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRPipelineLibrarySpecVersion = VK_KHR_PIPELINE_LIBRARY_SPEC_VERSION; //=== VK_NV_present_barrier === VULKAN_HPP_CONSTEXPR_INLINE auto NVPresentBarrierExtensionName = VK_NV_PRESENT_BARRIER_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto NVPresentBarrierSpecVersion = VK_NV_PRESENT_BARRIER_SPEC_VERSION; //=== VK_KHR_shader_non_semantic_info === VULKAN_HPP_CONSTEXPR_INLINE auto KHRShaderNonSemanticInfoExtensionName = VK_KHR_SHADER_NON_SEMANTIC_INFO_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRShaderNonSemanticInfoSpecVersion = VK_KHR_SHADER_NON_SEMANTIC_INFO_SPEC_VERSION; //=== VK_KHR_present_id === VULKAN_HPP_CONSTEXPR_INLINE auto KHRPresentIdExtensionName = VK_KHR_PRESENT_ID_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRPresentIdSpecVersion = VK_KHR_PRESENT_ID_SPEC_VERSION; //=== VK_EXT_private_data === VULKAN_HPP_CONSTEXPR_INLINE auto EXTPrivateDataExtensionName = VK_EXT_PRIVATE_DATA_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTPrivateDataSpecVersion = VK_EXT_PRIVATE_DATA_SPEC_VERSION; //=== VK_EXT_pipeline_creation_cache_control === VULKAN_HPP_CONSTEXPR_INLINE auto EXTPipelineCreationCacheControlExtensionName = VK_EXT_PIPELINE_CREATION_CACHE_CONTROL_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTPipelineCreationCacheControlSpecVersion = VK_EXT_PIPELINE_CREATION_CACHE_CONTROL_SPEC_VERSION; //=== VK_KHR_video_encode_queue === VULKAN_HPP_CONSTEXPR_INLINE auto KHRVideoEncodeQueueExtensionName = VK_KHR_VIDEO_ENCODE_QUEUE_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRVideoEncodeQueueSpecVersion = VK_KHR_VIDEO_ENCODE_QUEUE_SPEC_VERSION; //=== VK_NV_device_diagnostics_config === VULKAN_HPP_CONSTEXPR_INLINE auto NVDeviceDiagnosticsConfigExtensionName = VK_NV_DEVICE_DIAGNOSTICS_CONFIG_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto NVDeviceDiagnosticsConfigSpecVersion = VK_NV_DEVICE_DIAGNOSTICS_CONFIG_SPEC_VERSION; //=== VK_QCOM_render_pass_store_ops === VULKAN_HPP_CONSTEXPR_INLINE auto QCOMRenderPassStoreOpsExtensionName = VK_QCOM_RENDER_PASS_STORE_OPS_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto QCOMRenderPassStoreOpsSpecVersion = VK_QCOM_RENDER_PASS_STORE_OPS_SPEC_VERSION; #if defined( VK_ENABLE_BETA_EXTENSIONS ) //=== VK_NV_cuda_kernel_launch === VULKAN_HPP_CONSTEXPR_INLINE auto NVCudaKernelLaunchExtensionName = VK_NV_CUDA_KERNEL_LAUNCH_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto NVCudaKernelLaunchSpecVersion = VK_NV_CUDA_KERNEL_LAUNCH_SPEC_VERSION; #endif /*VK_ENABLE_BETA_EXTENSIONS*/ //=== VK_NV_low_latency === VULKAN_HPP_CONSTEXPR_INLINE auto NVLowLatencyExtensionName = VK_NV_LOW_LATENCY_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto NVLowLatencySpecVersion = VK_NV_LOW_LATENCY_SPEC_VERSION; #if defined( VK_USE_PLATFORM_METAL_EXT ) //=== VK_EXT_metal_objects === VULKAN_HPP_CONSTEXPR_INLINE auto EXTMetalObjectsExtensionName = VK_EXT_METAL_OBJECTS_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTMetalObjectsSpecVersion = VK_EXT_METAL_OBJECTS_SPEC_VERSION; #endif /*VK_USE_PLATFORM_METAL_EXT*/ //=== VK_KHR_synchronization2 === VULKAN_HPP_CONSTEXPR_INLINE auto KHRSynchronization2ExtensionName = VK_KHR_SYNCHRONIZATION_2_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRSynchronization2SpecVersion = VK_KHR_SYNCHRONIZATION_2_SPEC_VERSION; //=== VK_EXT_descriptor_buffer === VULKAN_HPP_CONSTEXPR_INLINE auto EXTDescriptorBufferExtensionName = VK_EXT_DESCRIPTOR_BUFFER_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTDescriptorBufferSpecVersion = VK_EXT_DESCRIPTOR_BUFFER_SPEC_VERSION; //=== VK_EXT_graphics_pipeline_library === VULKAN_HPP_CONSTEXPR_INLINE auto EXTGraphicsPipelineLibraryExtensionName = VK_EXT_GRAPHICS_PIPELINE_LIBRARY_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTGraphicsPipelineLibrarySpecVersion = VK_EXT_GRAPHICS_PIPELINE_LIBRARY_SPEC_VERSION; //=== VK_AMD_shader_early_and_late_fragment_tests === VULKAN_HPP_CONSTEXPR_INLINE auto AMDShaderEarlyAndLateFragmentTestsExtensionName = VK_AMD_SHADER_EARLY_AND_LATE_FRAGMENT_TESTS_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto AMDShaderEarlyAndLateFragmentTestsSpecVersion = VK_AMD_SHADER_EARLY_AND_LATE_FRAGMENT_TESTS_SPEC_VERSION; //=== VK_KHR_fragment_shader_barycentric === VULKAN_HPP_CONSTEXPR_INLINE auto KHRFragmentShaderBarycentricExtensionName = VK_KHR_FRAGMENT_SHADER_BARYCENTRIC_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRFragmentShaderBarycentricSpecVersion = VK_KHR_FRAGMENT_SHADER_BARYCENTRIC_SPEC_VERSION; //=== VK_KHR_shader_subgroup_uniform_control_flow === VULKAN_HPP_CONSTEXPR_INLINE auto KHRShaderSubgroupUniformControlFlowExtensionName = VK_KHR_SHADER_SUBGROUP_UNIFORM_CONTROL_FLOW_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRShaderSubgroupUniformControlFlowSpecVersion = VK_KHR_SHADER_SUBGROUP_UNIFORM_CONTROL_FLOW_SPEC_VERSION; //=== VK_KHR_zero_initialize_workgroup_memory === VULKAN_HPP_CONSTEXPR_INLINE auto KHRZeroInitializeWorkgroupMemoryExtensionName = VK_KHR_ZERO_INITIALIZE_WORKGROUP_MEMORY_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRZeroInitializeWorkgroupMemorySpecVersion = VK_KHR_ZERO_INITIALIZE_WORKGROUP_MEMORY_SPEC_VERSION; //=== VK_NV_fragment_shading_rate_enums === VULKAN_HPP_CONSTEXPR_INLINE auto NVFragmentShadingRateEnumsExtensionName = VK_NV_FRAGMENT_SHADING_RATE_ENUMS_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto NVFragmentShadingRateEnumsSpecVersion = VK_NV_FRAGMENT_SHADING_RATE_ENUMS_SPEC_VERSION; //=== VK_NV_ray_tracing_motion_blur === VULKAN_HPP_CONSTEXPR_INLINE auto NVRayTracingMotionBlurExtensionName = VK_NV_RAY_TRACING_MOTION_BLUR_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto NVRayTracingMotionBlurSpecVersion = VK_NV_RAY_TRACING_MOTION_BLUR_SPEC_VERSION; //=== VK_EXT_mesh_shader === VULKAN_HPP_CONSTEXPR_INLINE auto EXTMeshShaderExtensionName = VK_EXT_MESH_SHADER_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTMeshShaderSpecVersion = VK_EXT_MESH_SHADER_SPEC_VERSION; //=== VK_EXT_ycbcr_2plane_444_formats === VULKAN_HPP_CONSTEXPR_INLINE auto EXTYcbcr2Plane444FormatsExtensionName = VK_EXT_YCBCR_2PLANE_444_FORMATS_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTYcbcr2Plane444FormatsSpecVersion = VK_EXT_YCBCR_2PLANE_444_FORMATS_SPEC_VERSION; //=== VK_EXT_fragment_density_map2 === VULKAN_HPP_CONSTEXPR_INLINE auto EXTFragmentDensityMap2ExtensionName = VK_EXT_FRAGMENT_DENSITY_MAP_2_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTFragmentDensityMap2SpecVersion = VK_EXT_FRAGMENT_DENSITY_MAP_2_SPEC_VERSION; //=== VK_QCOM_rotated_copy_commands === VULKAN_HPP_CONSTEXPR_INLINE auto QCOMRotatedCopyCommandsExtensionName = VK_QCOM_ROTATED_COPY_COMMANDS_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto QCOMRotatedCopyCommandsSpecVersion = VK_QCOM_ROTATED_COPY_COMMANDS_SPEC_VERSION; //=== VK_EXT_image_robustness === VULKAN_HPP_CONSTEXPR_INLINE auto EXTImageRobustnessExtensionName = VK_EXT_IMAGE_ROBUSTNESS_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTImageRobustnessSpecVersion = VK_EXT_IMAGE_ROBUSTNESS_SPEC_VERSION; //=== VK_KHR_workgroup_memory_explicit_layout === VULKAN_HPP_CONSTEXPR_INLINE auto KHRWorkgroupMemoryExplicitLayoutExtensionName = VK_KHR_WORKGROUP_MEMORY_EXPLICIT_LAYOUT_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRWorkgroupMemoryExplicitLayoutSpecVersion = VK_KHR_WORKGROUP_MEMORY_EXPLICIT_LAYOUT_SPEC_VERSION; //=== VK_KHR_copy_commands2 === VULKAN_HPP_CONSTEXPR_INLINE auto KHRCopyCommands2ExtensionName = VK_KHR_COPY_COMMANDS_2_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRCopyCommands2SpecVersion = VK_KHR_COPY_COMMANDS_2_SPEC_VERSION; //=== VK_EXT_image_compression_control === VULKAN_HPP_CONSTEXPR_INLINE auto EXTImageCompressionControlExtensionName = VK_EXT_IMAGE_COMPRESSION_CONTROL_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTImageCompressionControlSpecVersion = VK_EXT_IMAGE_COMPRESSION_CONTROL_SPEC_VERSION; //=== VK_EXT_attachment_feedback_loop_layout === VULKAN_HPP_CONSTEXPR_INLINE auto EXTAttachmentFeedbackLoopLayoutExtensionName = VK_EXT_ATTACHMENT_FEEDBACK_LOOP_LAYOUT_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTAttachmentFeedbackLoopLayoutSpecVersion = VK_EXT_ATTACHMENT_FEEDBACK_LOOP_LAYOUT_SPEC_VERSION; //=== VK_EXT_4444_formats === VULKAN_HPP_CONSTEXPR_INLINE auto EXT4444FormatsExtensionName = VK_EXT_4444_FORMATS_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXT4444FormatsSpecVersion = VK_EXT_4444_FORMATS_SPEC_VERSION; //=== VK_EXT_device_fault === VULKAN_HPP_CONSTEXPR_INLINE auto EXTDeviceFaultExtensionName = VK_EXT_DEVICE_FAULT_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTDeviceFaultSpecVersion = VK_EXT_DEVICE_FAULT_SPEC_VERSION; //=== VK_ARM_rasterization_order_attachment_access === VULKAN_HPP_CONSTEXPR_INLINE auto ARMRasterizationOrderAttachmentAccessExtensionName = VK_ARM_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto ARMRasterizationOrderAttachmentAccessSpecVersion = VK_ARM_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_SPEC_VERSION; //=== VK_EXT_rgba10x6_formats === VULKAN_HPP_CONSTEXPR_INLINE auto EXTRgba10X6FormatsExtensionName = VK_EXT_RGBA10X6_FORMATS_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTRgba10X6FormatsSpecVersion = VK_EXT_RGBA10X6_FORMATS_SPEC_VERSION; #if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_NV_acquire_winrt_display === VULKAN_HPP_CONSTEXPR_INLINE auto NVAcquireWinrtDisplayExtensionName = VK_NV_ACQUIRE_WINRT_DISPLAY_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto NVAcquireWinrtDisplaySpecVersion = VK_NV_ACQUIRE_WINRT_DISPLAY_SPEC_VERSION; #endif /*VK_USE_PLATFORM_WIN32_KHR*/ #if defined( VK_USE_PLATFORM_DIRECTFB_EXT ) //=== VK_EXT_directfb_surface === VULKAN_HPP_CONSTEXPR_INLINE auto EXTDirectfbSurfaceExtensionName = VK_EXT_DIRECTFB_SURFACE_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTDirectfbSurfaceSpecVersion = VK_EXT_DIRECTFB_SURFACE_SPEC_VERSION; #endif /*VK_USE_PLATFORM_DIRECTFB_EXT*/ //=== VK_VALVE_mutable_descriptor_type === VULKAN_HPP_CONSTEXPR_INLINE auto VALVEMutableDescriptorTypeExtensionName = VK_VALVE_MUTABLE_DESCRIPTOR_TYPE_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto VALVEMutableDescriptorTypeSpecVersion = VK_VALVE_MUTABLE_DESCRIPTOR_TYPE_SPEC_VERSION; //=== VK_EXT_vertex_input_dynamic_state === VULKAN_HPP_CONSTEXPR_INLINE auto EXTVertexInputDynamicStateExtensionName = VK_EXT_VERTEX_INPUT_DYNAMIC_STATE_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTVertexInputDynamicStateSpecVersion = VK_EXT_VERTEX_INPUT_DYNAMIC_STATE_SPEC_VERSION; //=== VK_EXT_physical_device_drm === VULKAN_HPP_CONSTEXPR_INLINE auto EXTPhysicalDeviceDrmExtensionName = VK_EXT_PHYSICAL_DEVICE_DRM_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTPhysicalDeviceDrmSpecVersion = VK_EXT_PHYSICAL_DEVICE_DRM_SPEC_VERSION; //=== VK_EXT_device_address_binding_report === VULKAN_HPP_CONSTEXPR_INLINE auto EXTDeviceAddressBindingReportExtensionName = VK_EXT_DEVICE_ADDRESS_BINDING_REPORT_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTDeviceAddressBindingReportSpecVersion = VK_EXT_DEVICE_ADDRESS_BINDING_REPORT_SPEC_VERSION; //=== VK_EXT_depth_clip_control === VULKAN_HPP_CONSTEXPR_INLINE auto EXTDepthClipControlExtensionName = VK_EXT_DEPTH_CLIP_CONTROL_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTDepthClipControlSpecVersion = VK_EXT_DEPTH_CLIP_CONTROL_SPEC_VERSION; //=== VK_EXT_primitive_topology_list_restart === VULKAN_HPP_CONSTEXPR_INLINE auto EXTPrimitiveTopologyListRestartExtensionName = VK_EXT_PRIMITIVE_TOPOLOGY_LIST_RESTART_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTPrimitiveTopologyListRestartSpecVersion = VK_EXT_PRIMITIVE_TOPOLOGY_LIST_RESTART_SPEC_VERSION; //=== VK_KHR_format_feature_flags2 === VULKAN_HPP_CONSTEXPR_INLINE auto KHRFormatFeatureFlags2ExtensionName = VK_KHR_FORMAT_FEATURE_FLAGS_2_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRFormatFeatureFlags2SpecVersion = VK_KHR_FORMAT_FEATURE_FLAGS_2_SPEC_VERSION; //=== VK_EXT_present_mode_fifo_latest_ready === VULKAN_HPP_CONSTEXPR_INLINE auto EXTPresentModeFifoLatestReadyExtensionName = VK_EXT_PRESENT_MODE_FIFO_LATEST_READY_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTPresentModeFifoLatestReadySpecVersion = VK_EXT_PRESENT_MODE_FIFO_LATEST_READY_SPEC_VERSION; #if defined( VK_USE_PLATFORM_FUCHSIA ) //=== VK_FUCHSIA_external_memory === VULKAN_HPP_CONSTEXPR_INLINE auto FUCHSIAExternalMemoryExtensionName = VK_FUCHSIA_EXTERNAL_MEMORY_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto FUCHSIAExternalMemorySpecVersion = VK_FUCHSIA_EXTERNAL_MEMORY_SPEC_VERSION; #endif /*VK_USE_PLATFORM_FUCHSIA*/ #if defined( VK_USE_PLATFORM_FUCHSIA ) //=== VK_FUCHSIA_external_semaphore === VULKAN_HPP_CONSTEXPR_INLINE auto FUCHSIAExternalSemaphoreExtensionName = VK_FUCHSIA_EXTERNAL_SEMAPHORE_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto FUCHSIAExternalSemaphoreSpecVersion = VK_FUCHSIA_EXTERNAL_SEMAPHORE_SPEC_VERSION; #endif /*VK_USE_PLATFORM_FUCHSIA*/ #if defined( VK_USE_PLATFORM_FUCHSIA ) //=== VK_FUCHSIA_buffer_collection === VULKAN_HPP_CONSTEXPR_INLINE auto FUCHSIABufferCollectionExtensionName = VK_FUCHSIA_BUFFER_COLLECTION_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto FUCHSIABufferCollectionSpecVersion = VK_FUCHSIA_BUFFER_COLLECTION_SPEC_VERSION; #endif /*VK_USE_PLATFORM_FUCHSIA*/ //=== VK_HUAWEI_subpass_shading === VULKAN_HPP_CONSTEXPR_INLINE auto HUAWEISubpassShadingExtensionName = VK_HUAWEI_SUBPASS_SHADING_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto HUAWEISubpassShadingSpecVersion = VK_HUAWEI_SUBPASS_SHADING_SPEC_VERSION; //=== VK_HUAWEI_invocation_mask === VULKAN_HPP_CONSTEXPR_INLINE auto HUAWEIInvocationMaskExtensionName = VK_HUAWEI_INVOCATION_MASK_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto HUAWEIInvocationMaskSpecVersion = VK_HUAWEI_INVOCATION_MASK_SPEC_VERSION; //=== VK_NV_external_memory_rdma === VULKAN_HPP_CONSTEXPR_INLINE auto NVExternalMemoryRdmaExtensionName = VK_NV_EXTERNAL_MEMORY_RDMA_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto NVExternalMemoryRdmaSpecVersion = VK_NV_EXTERNAL_MEMORY_RDMA_SPEC_VERSION; //=== VK_EXT_pipeline_properties === VULKAN_HPP_CONSTEXPR_INLINE auto EXTPipelinePropertiesExtensionName = VK_EXT_PIPELINE_PROPERTIES_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTPipelinePropertiesSpecVersion = VK_EXT_PIPELINE_PROPERTIES_SPEC_VERSION; //=== VK_EXT_frame_boundary === VULKAN_HPP_CONSTEXPR_INLINE auto EXTFrameBoundaryExtensionName = VK_EXT_FRAME_BOUNDARY_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTFrameBoundarySpecVersion = VK_EXT_FRAME_BOUNDARY_SPEC_VERSION; //=== VK_EXT_multisampled_render_to_single_sampled === VULKAN_HPP_CONSTEXPR_INLINE auto EXTMultisampledRenderToSingleSampledExtensionName = VK_EXT_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTMultisampledRenderToSingleSampledSpecVersion = VK_EXT_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_SPEC_VERSION; //=== VK_EXT_extended_dynamic_state2 === VULKAN_HPP_CONSTEXPR_INLINE auto EXTExtendedDynamicState2ExtensionName = VK_EXT_EXTENDED_DYNAMIC_STATE_2_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTExtendedDynamicState2SpecVersion = VK_EXT_EXTENDED_DYNAMIC_STATE_2_SPEC_VERSION; #if defined( VK_USE_PLATFORM_SCREEN_QNX ) //=== VK_QNX_screen_surface === VULKAN_HPP_CONSTEXPR_INLINE auto QNXScreenSurfaceExtensionName = VK_QNX_SCREEN_SURFACE_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto QNXScreenSurfaceSpecVersion = VK_QNX_SCREEN_SURFACE_SPEC_VERSION; #endif /*VK_USE_PLATFORM_SCREEN_QNX*/ //=== VK_EXT_color_write_enable === VULKAN_HPP_CONSTEXPR_INLINE auto EXTColorWriteEnableExtensionName = VK_EXT_COLOR_WRITE_ENABLE_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTColorWriteEnableSpecVersion = VK_EXT_COLOR_WRITE_ENABLE_SPEC_VERSION; //=== VK_EXT_primitives_generated_query === VULKAN_HPP_CONSTEXPR_INLINE auto EXTPrimitivesGeneratedQueryExtensionName = VK_EXT_PRIMITIVES_GENERATED_QUERY_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTPrimitivesGeneratedQuerySpecVersion = VK_EXT_PRIMITIVES_GENERATED_QUERY_SPEC_VERSION; //=== VK_KHR_ray_tracing_maintenance1 === VULKAN_HPP_CONSTEXPR_INLINE auto KHRRayTracingMaintenance1ExtensionName = VK_KHR_RAY_TRACING_MAINTENANCE_1_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRRayTracingMaintenance1SpecVersion = VK_KHR_RAY_TRACING_MAINTENANCE_1_SPEC_VERSION; //=== VK_EXT_global_priority_query === VULKAN_HPP_CONSTEXPR_INLINE auto EXTGlobalPriorityQueryExtensionName = VK_EXT_GLOBAL_PRIORITY_QUERY_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTGlobalPriorityQuerySpecVersion = VK_EXT_GLOBAL_PRIORITY_QUERY_SPEC_VERSION; //=== VK_EXT_image_view_min_lod === VULKAN_HPP_CONSTEXPR_INLINE auto EXTImageViewMinLodExtensionName = VK_EXT_IMAGE_VIEW_MIN_LOD_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTImageViewMinLodSpecVersion = VK_EXT_IMAGE_VIEW_MIN_LOD_SPEC_VERSION; //=== VK_EXT_multi_draw === VULKAN_HPP_CONSTEXPR_INLINE auto EXTMultiDrawExtensionName = VK_EXT_MULTI_DRAW_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTMultiDrawSpecVersion = VK_EXT_MULTI_DRAW_SPEC_VERSION; //=== VK_EXT_image_2d_view_of_3d === VULKAN_HPP_CONSTEXPR_INLINE auto EXTImage2DViewOf3DExtensionName = VK_EXT_IMAGE_2D_VIEW_OF_3D_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTImage2DViewOf3DSpecVersion = VK_EXT_IMAGE_2D_VIEW_OF_3D_SPEC_VERSION; //=== VK_KHR_portability_enumeration === VULKAN_HPP_CONSTEXPR_INLINE auto KHRPortabilityEnumerationExtensionName = VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRPortabilityEnumerationSpecVersion = VK_KHR_PORTABILITY_ENUMERATION_SPEC_VERSION; //=== VK_EXT_shader_tile_image === VULKAN_HPP_CONSTEXPR_INLINE auto EXTShaderTileImageExtensionName = VK_EXT_SHADER_TILE_IMAGE_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTShaderTileImageSpecVersion = VK_EXT_SHADER_TILE_IMAGE_SPEC_VERSION; //=== VK_EXT_opacity_micromap === VULKAN_HPP_CONSTEXPR_INLINE auto EXTOpacityMicromapExtensionName = VK_EXT_OPACITY_MICROMAP_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTOpacityMicromapSpecVersion = VK_EXT_OPACITY_MICROMAP_SPEC_VERSION; #if defined( VK_ENABLE_BETA_EXTENSIONS ) //=== VK_NV_displacement_micromap === VULKAN_HPP_CONSTEXPR_INLINE auto NVDisplacementMicromapExtensionName = VK_NV_DISPLACEMENT_MICROMAP_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto NVDisplacementMicromapSpecVersion = VK_NV_DISPLACEMENT_MICROMAP_SPEC_VERSION; #endif /*VK_ENABLE_BETA_EXTENSIONS*/ //=== VK_EXT_load_store_op_none === VULKAN_HPP_CONSTEXPR_INLINE auto EXTLoadStoreOpNoneExtensionName = VK_EXT_LOAD_STORE_OP_NONE_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTLoadStoreOpNoneSpecVersion = VK_EXT_LOAD_STORE_OP_NONE_SPEC_VERSION; //=== VK_HUAWEI_cluster_culling_shader === VULKAN_HPP_CONSTEXPR_INLINE auto HUAWEIClusterCullingShaderExtensionName = VK_HUAWEI_CLUSTER_CULLING_SHADER_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto HUAWEIClusterCullingShaderSpecVersion = VK_HUAWEI_CLUSTER_CULLING_SHADER_SPEC_VERSION; //=== VK_EXT_border_color_swizzle === VULKAN_HPP_CONSTEXPR_INLINE auto EXTBorderColorSwizzleExtensionName = VK_EXT_BORDER_COLOR_SWIZZLE_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTBorderColorSwizzleSpecVersion = VK_EXT_BORDER_COLOR_SWIZZLE_SPEC_VERSION; //=== VK_EXT_pageable_device_local_memory === VULKAN_HPP_CONSTEXPR_INLINE auto EXTPageableDeviceLocalMemoryExtensionName = VK_EXT_PAGEABLE_DEVICE_LOCAL_MEMORY_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTPageableDeviceLocalMemorySpecVersion = VK_EXT_PAGEABLE_DEVICE_LOCAL_MEMORY_SPEC_VERSION; //=== VK_KHR_maintenance4 === VULKAN_HPP_CONSTEXPR_INLINE auto KHRMaintenance4ExtensionName = VK_KHR_MAINTENANCE_4_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRMaintenance4SpecVersion = VK_KHR_MAINTENANCE_4_SPEC_VERSION; //=== VK_ARM_shader_core_properties === VULKAN_HPP_CONSTEXPR_INLINE auto ARMShaderCorePropertiesExtensionName = VK_ARM_SHADER_CORE_PROPERTIES_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto ARMShaderCorePropertiesSpecVersion = VK_ARM_SHADER_CORE_PROPERTIES_SPEC_VERSION; //=== VK_KHR_shader_subgroup_rotate === VULKAN_HPP_CONSTEXPR_INLINE auto KHRShaderSubgroupRotateExtensionName = VK_KHR_SHADER_SUBGROUP_ROTATE_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRShaderSubgroupRotateSpecVersion = VK_KHR_SHADER_SUBGROUP_ROTATE_SPEC_VERSION; //=== VK_ARM_scheduling_controls === VULKAN_HPP_CONSTEXPR_INLINE auto ARMSchedulingControlsExtensionName = VK_ARM_SCHEDULING_CONTROLS_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto ARMSchedulingControlsSpecVersion = VK_ARM_SCHEDULING_CONTROLS_SPEC_VERSION; //=== VK_EXT_image_sliced_view_of_3d === VULKAN_HPP_CONSTEXPR_INLINE auto EXTImageSlicedViewOf3DExtensionName = VK_EXT_IMAGE_SLICED_VIEW_OF_3D_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTImageSlicedViewOf3DSpecVersion = VK_EXT_IMAGE_SLICED_VIEW_OF_3D_SPEC_VERSION; //=== VK_VALVE_descriptor_set_host_mapping === VULKAN_HPP_CONSTEXPR_INLINE auto VALVEDescriptorSetHostMappingExtensionName = VK_VALVE_DESCRIPTOR_SET_HOST_MAPPING_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto VALVEDescriptorSetHostMappingSpecVersion = VK_VALVE_DESCRIPTOR_SET_HOST_MAPPING_SPEC_VERSION; //=== VK_EXT_depth_clamp_zero_one === VULKAN_HPP_CONSTEXPR_INLINE auto EXTDepthClampZeroOneExtensionName = VK_EXT_DEPTH_CLAMP_ZERO_ONE_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTDepthClampZeroOneSpecVersion = VK_EXT_DEPTH_CLAMP_ZERO_ONE_SPEC_VERSION; //=== VK_EXT_non_seamless_cube_map === VULKAN_HPP_CONSTEXPR_INLINE auto EXTNonSeamlessCubeMapExtensionName = VK_EXT_NON_SEAMLESS_CUBE_MAP_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTNonSeamlessCubeMapSpecVersion = VK_EXT_NON_SEAMLESS_CUBE_MAP_SPEC_VERSION; //=== VK_ARM_render_pass_striped === VULKAN_HPP_CONSTEXPR_INLINE auto ARMRenderPassStripedExtensionName = VK_ARM_RENDER_PASS_STRIPED_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto ARMRenderPassStripedSpecVersion = VK_ARM_RENDER_PASS_STRIPED_SPEC_VERSION; //=== VK_QCOM_fragment_density_map_offset === VULKAN_HPP_CONSTEXPR_INLINE auto QCOMFragmentDensityMapOffsetExtensionName = VK_QCOM_FRAGMENT_DENSITY_MAP_OFFSET_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto QCOMFragmentDensityMapOffsetSpecVersion = VK_QCOM_FRAGMENT_DENSITY_MAP_OFFSET_SPEC_VERSION; //=== VK_NV_copy_memory_indirect === VULKAN_HPP_CONSTEXPR_INLINE auto NVCopyMemoryIndirectExtensionName = VK_NV_COPY_MEMORY_INDIRECT_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto NVCopyMemoryIndirectSpecVersion = VK_NV_COPY_MEMORY_INDIRECT_SPEC_VERSION; //=== VK_NV_memory_decompression === VULKAN_HPP_CONSTEXPR_INLINE auto NVMemoryDecompressionExtensionName = VK_NV_MEMORY_DECOMPRESSION_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto NVMemoryDecompressionSpecVersion = VK_NV_MEMORY_DECOMPRESSION_SPEC_VERSION; //=== VK_NV_device_generated_commands_compute === VULKAN_HPP_CONSTEXPR_INLINE auto NVDeviceGeneratedCommandsComputeExtensionName = VK_NV_DEVICE_GENERATED_COMMANDS_COMPUTE_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto NVDeviceGeneratedCommandsComputeSpecVersion = VK_NV_DEVICE_GENERATED_COMMANDS_COMPUTE_SPEC_VERSION; //=== VK_NV_ray_tracing_linear_swept_spheres === VULKAN_HPP_CONSTEXPR_INLINE auto NVRayTracingLinearSweptSpheresExtensionName = VK_NV_RAY_TRACING_LINEAR_SWEPT_SPHERES_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto NVRayTracingLinearSweptSpheresSpecVersion = VK_NV_RAY_TRACING_LINEAR_SWEPT_SPHERES_SPEC_VERSION; //=== VK_NV_linear_color_attachment === VULKAN_HPP_CONSTEXPR_INLINE auto NVLinearColorAttachmentExtensionName = VK_NV_LINEAR_COLOR_ATTACHMENT_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto NVLinearColorAttachmentSpecVersion = VK_NV_LINEAR_COLOR_ATTACHMENT_SPEC_VERSION; //=== VK_GOOGLE_surfaceless_query === VULKAN_HPP_CONSTEXPR_INLINE auto GOOGLESurfacelessQueryExtensionName = VK_GOOGLE_SURFACELESS_QUERY_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto GOOGLESurfacelessQuerySpecVersion = VK_GOOGLE_SURFACELESS_QUERY_SPEC_VERSION; //=== VK_KHR_shader_maximal_reconvergence === VULKAN_HPP_CONSTEXPR_INLINE auto KHRShaderMaximalReconvergenceExtensionName = VK_KHR_SHADER_MAXIMAL_RECONVERGENCE_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRShaderMaximalReconvergenceSpecVersion = VK_KHR_SHADER_MAXIMAL_RECONVERGENCE_SPEC_VERSION; //=== VK_EXT_image_compression_control_swapchain === VULKAN_HPP_CONSTEXPR_INLINE auto EXTImageCompressionControlSwapchainExtensionName = VK_EXT_IMAGE_COMPRESSION_CONTROL_SWAPCHAIN_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTImageCompressionControlSwapchainSpecVersion = VK_EXT_IMAGE_COMPRESSION_CONTROL_SWAPCHAIN_SPEC_VERSION; //=== VK_QCOM_image_processing === VULKAN_HPP_CONSTEXPR_INLINE auto QCOMImageProcessingExtensionName = VK_QCOM_IMAGE_PROCESSING_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto QCOMImageProcessingSpecVersion = VK_QCOM_IMAGE_PROCESSING_SPEC_VERSION; //=== VK_EXT_nested_command_buffer === VULKAN_HPP_CONSTEXPR_INLINE auto EXTNestedCommandBufferExtensionName = VK_EXT_NESTED_COMMAND_BUFFER_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTNestedCommandBufferSpecVersion = VK_EXT_NESTED_COMMAND_BUFFER_SPEC_VERSION; //=== VK_EXT_external_memory_acquire_unmodified === VULKAN_HPP_CONSTEXPR_INLINE auto EXTExternalMemoryAcquireUnmodifiedExtensionName = VK_EXT_EXTERNAL_MEMORY_ACQUIRE_UNMODIFIED_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTExternalMemoryAcquireUnmodifiedSpecVersion = VK_EXT_EXTERNAL_MEMORY_ACQUIRE_UNMODIFIED_SPEC_VERSION; //=== VK_EXT_extended_dynamic_state3 === VULKAN_HPP_CONSTEXPR_INLINE auto EXTExtendedDynamicState3ExtensionName = VK_EXT_EXTENDED_DYNAMIC_STATE_3_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTExtendedDynamicState3SpecVersion = VK_EXT_EXTENDED_DYNAMIC_STATE_3_SPEC_VERSION; //=== VK_EXT_subpass_merge_feedback === VULKAN_HPP_CONSTEXPR_INLINE auto EXTSubpassMergeFeedbackExtensionName = VK_EXT_SUBPASS_MERGE_FEEDBACK_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTSubpassMergeFeedbackSpecVersion = VK_EXT_SUBPASS_MERGE_FEEDBACK_SPEC_VERSION; //=== VK_LUNARG_direct_driver_loading === VULKAN_HPP_CONSTEXPR_INLINE auto LUNARGDirectDriverLoadingExtensionName = VK_LUNARG_DIRECT_DRIVER_LOADING_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto LUNARGDirectDriverLoadingSpecVersion = VK_LUNARG_DIRECT_DRIVER_LOADING_SPEC_VERSION; //=== VK_EXT_shader_module_identifier === VULKAN_HPP_CONSTEXPR_INLINE auto EXTShaderModuleIdentifierExtensionName = VK_EXT_SHADER_MODULE_IDENTIFIER_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTShaderModuleIdentifierSpecVersion = VK_EXT_SHADER_MODULE_IDENTIFIER_SPEC_VERSION; //=== VK_EXT_rasterization_order_attachment_access === VULKAN_HPP_CONSTEXPR_INLINE auto EXTRasterizationOrderAttachmentAccessExtensionName = VK_EXT_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTRasterizationOrderAttachmentAccessSpecVersion = VK_EXT_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_SPEC_VERSION; //=== VK_NV_optical_flow === VULKAN_HPP_CONSTEXPR_INLINE auto NVOpticalFlowExtensionName = VK_NV_OPTICAL_FLOW_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto NVOpticalFlowSpecVersion = VK_NV_OPTICAL_FLOW_SPEC_VERSION; //=== VK_EXT_legacy_dithering === VULKAN_HPP_CONSTEXPR_INLINE auto EXTLegacyDitheringExtensionName = VK_EXT_LEGACY_DITHERING_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTLegacyDitheringSpecVersion = VK_EXT_LEGACY_DITHERING_SPEC_VERSION; //=== VK_EXT_pipeline_protected_access === VULKAN_HPP_CONSTEXPR_INLINE auto EXTPipelineProtectedAccessExtensionName = VK_EXT_PIPELINE_PROTECTED_ACCESS_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTPipelineProtectedAccessSpecVersion = VK_EXT_PIPELINE_PROTECTED_ACCESS_SPEC_VERSION; #if defined( VK_USE_PLATFORM_ANDROID_KHR ) //=== VK_ANDROID_external_format_resolve === VULKAN_HPP_CONSTEXPR_INLINE auto ANDROIDExternalFormatResolveExtensionName = VK_ANDROID_EXTERNAL_FORMAT_RESOLVE_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto ANDROIDExternalFormatResolveSpecVersion = VK_ANDROID_EXTERNAL_FORMAT_RESOLVE_SPEC_VERSION; #endif /*VK_USE_PLATFORM_ANDROID_KHR*/ //=== VK_KHR_maintenance5 === VULKAN_HPP_CONSTEXPR_INLINE auto KHRMaintenance5ExtensionName = VK_KHR_MAINTENANCE_5_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRMaintenance5SpecVersion = VK_KHR_MAINTENANCE_5_SPEC_VERSION; //=== VK_AMD_anti_lag === VULKAN_HPP_CONSTEXPR_INLINE auto AMDAntiLagExtensionName = VK_AMD_ANTI_LAG_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto AMDAntiLagSpecVersion = VK_AMD_ANTI_LAG_SPEC_VERSION; //=== VK_KHR_ray_tracing_position_fetch === VULKAN_HPP_CONSTEXPR_INLINE auto KHRRayTracingPositionFetchExtensionName = VK_KHR_RAY_TRACING_POSITION_FETCH_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRRayTracingPositionFetchSpecVersion = VK_KHR_RAY_TRACING_POSITION_FETCH_SPEC_VERSION; //=== VK_EXT_shader_object === VULKAN_HPP_CONSTEXPR_INLINE auto EXTShaderObjectExtensionName = VK_EXT_SHADER_OBJECT_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTShaderObjectSpecVersion = VK_EXT_SHADER_OBJECT_SPEC_VERSION; //=== VK_KHR_pipeline_binary === VULKAN_HPP_CONSTEXPR_INLINE auto KHRPipelineBinaryExtensionName = VK_KHR_PIPELINE_BINARY_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRPipelineBinarySpecVersion = VK_KHR_PIPELINE_BINARY_SPEC_VERSION; //=== VK_QCOM_tile_properties === VULKAN_HPP_CONSTEXPR_INLINE auto QCOMTilePropertiesExtensionName = VK_QCOM_TILE_PROPERTIES_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto QCOMTilePropertiesSpecVersion = VK_QCOM_TILE_PROPERTIES_SPEC_VERSION; //=== VK_SEC_amigo_profiling === VULKAN_HPP_CONSTEXPR_INLINE auto SECAmigoProfilingExtensionName = VK_SEC_AMIGO_PROFILING_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto SECAmigoProfilingSpecVersion = VK_SEC_AMIGO_PROFILING_SPEC_VERSION; //=== VK_QCOM_multiview_per_view_viewports === VULKAN_HPP_CONSTEXPR_INLINE auto QCOMMultiviewPerViewViewportsExtensionName = VK_QCOM_MULTIVIEW_PER_VIEW_VIEWPORTS_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto QCOMMultiviewPerViewViewportsSpecVersion = VK_QCOM_MULTIVIEW_PER_VIEW_VIEWPORTS_SPEC_VERSION; //=== VK_NV_ray_tracing_invocation_reorder === VULKAN_HPP_CONSTEXPR_INLINE auto NVRayTracingInvocationReorderExtensionName = VK_NV_RAY_TRACING_INVOCATION_REORDER_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto NVRayTracingInvocationReorderSpecVersion = VK_NV_RAY_TRACING_INVOCATION_REORDER_SPEC_VERSION; //=== VK_NV_cooperative_vector === VULKAN_HPP_CONSTEXPR_INLINE auto NVCooperativeVectorExtensionName = VK_NV_COOPERATIVE_VECTOR_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto NVCooperativeVectorSpecVersion = VK_NV_COOPERATIVE_VECTOR_SPEC_VERSION; //=== VK_NV_extended_sparse_address_space === VULKAN_HPP_CONSTEXPR_INLINE auto NVExtendedSparseAddressSpaceExtensionName = VK_NV_EXTENDED_SPARSE_ADDRESS_SPACE_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto NVExtendedSparseAddressSpaceSpecVersion = VK_NV_EXTENDED_SPARSE_ADDRESS_SPACE_SPEC_VERSION; //=== VK_EXT_mutable_descriptor_type === VULKAN_HPP_CONSTEXPR_INLINE auto EXTMutableDescriptorTypeExtensionName = VK_EXT_MUTABLE_DESCRIPTOR_TYPE_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTMutableDescriptorTypeSpecVersion = VK_EXT_MUTABLE_DESCRIPTOR_TYPE_SPEC_VERSION; //=== VK_EXT_legacy_vertex_attributes === VULKAN_HPP_CONSTEXPR_INLINE auto EXTLegacyVertexAttributesExtensionName = VK_EXT_LEGACY_VERTEX_ATTRIBUTES_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTLegacyVertexAttributesSpecVersion = VK_EXT_LEGACY_VERTEX_ATTRIBUTES_SPEC_VERSION; //=== VK_EXT_layer_settings === VULKAN_HPP_CONSTEXPR_INLINE auto EXTLayerSettingsExtensionName = VK_EXT_LAYER_SETTINGS_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTLayerSettingsSpecVersion = VK_EXT_LAYER_SETTINGS_SPEC_VERSION; //=== VK_ARM_shader_core_builtins === VULKAN_HPP_CONSTEXPR_INLINE auto ARMShaderCoreBuiltinsExtensionName = VK_ARM_SHADER_CORE_BUILTINS_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto ARMShaderCoreBuiltinsSpecVersion = VK_ARM_SHADER_CORE_BUILTINS_SPEC_VERSION; //=== VK_EXT_pipeline_library_group_handles === VULKAN_HPP_CONSTEXPR_INLINE auto EXTPipelineLibraryGroupHandlesExtensionName = VK_EXT_PIPELINE_LIBRARY_GROUP_HANDLES_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTPipelineLibraryGroupHandlesSpecVersion = VK_EXT_PIPELINE_LIBRARY_GROUP_HANDLES_SPEC_VERSION; //=== VK_EXT_dynamic_rendering_unused_attachments === VULKAN_HPP_CONSTEXPR_INLINE auto EXTDynamicRenderingUnusedAttachmentsExtensionName = VK_EXT_DYNAMIC_RENDERING_UNUSED_ATTACHMENTS_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTDynamicRenderingUnusedAttachmentsSpecVersion = VK_EXT_DYNAMIC_RENDERING_UNUSED_ATTACHMENTS_SPEC_VERSION; //=== VK_NV_low_latency2 === VULKAN_HPP_CONSTEXPR_INLINE auto NVLowLatency2ExtensionName = VK_NV_LOW_LATENCY_2_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto NVLowLatency2SpecVersion = VK_NV_LOW_LATENCY_2_SPEC_VERSION; //=== VK_KHR_cooperative_matrix === VULKAN_HPP_CONSTEXPR_INLINE auto KHRCooperativeMatrixExtensionName = VK_KHR_COOPERATIVE_MATRIX_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRCooperativeMatrixSpecVersion = VK_KHR_COOPERATIVE_MATRIX_SPEC_VERSION; //=== VK_QCOM_multiview_per_view_render_areas === VULKAN_HPP_CONSTEXPR_INLINE auto QCOMMultiviewPerViewRenderAreasExtensionName = VK_QCOM_MULTIVIEW_PER_VIEW_RENDER_AREAS_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto QCOMMultiviewPerViewRenderAreasSpecVersion = VK_QCOM_MULTIVIEW_PER_VIEW_RENDER_AREAS_SPEC_VERSION; //=== VK_KHR_compute_shader_derivatives === VULKAN_HPP_CONSTEXPR_INLINE auto KHRComputeShaderDerivativesExtensionName = VK_KHR_COMPUTE_SHADER_DERIVATIVES_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRComputeShaderDerivativesSpecVersion = VK_KHR_COMPUTE_SHADER_DERIVATIVES_SPEC_VERSION; //=== VK_KHR_video_decode_av1 === VULKAN_HPP_CONSTEXPR_INLINE auto KHRVideoDecodeAv1ExtensionName = VK_KHR_VIDEO_DECODE_AV1_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRVideoDecodeAv1SpecVersion = VK_KHR_VIDEO_DECODE_AV1_SPEC_VERSION; //=== VK_KHR_video_encode_av1 === VULKAN_HPP_CONSTEXPR_INLINE auto KHRVideoEncodeAv1ExtensionName = VK_KHR_VIDEO_ENCODE_AV1_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRVideoEncodeAv1SpecVersion = VK_KHR_VIDEO_ENCODE_AV1_SPEC_VERSION; //=== VK_KHR_video_maintenance1 === VULKAN_HPP_CONSTEXPR_INLINE auto KHRVideoMaintenance1ExtensionName = VK_KHR_VIDEO_MAINTENANCE_1_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRVideoMaintenance1SpecVersion = VK_KHR_VIDEO_MAINTENANCE_1_SPEC_VERSION; //=== VK_NV_per_stage_descriptor_set === VULKAN_HPP_CONSTEXPR_INLINE auto NVPerStageDescriptorSetExtensionName = VK_NV_PER_STAGE_DESCRIPTOR_SET_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto NVPerStageDescriptorSetSpecVersion = VK_NV_PER_STAGE_DESCRIPTOR_SET_SPEC_VERSION; //=== VK_QCOM_image_processing2 === VULKAN_HPP_CONSTEXPR_INLINE auto QCOMImageProcessing2ExtensionName = VK_QCOM_IMAGE_PROCESSING_2_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto QCOMImageProcessing2SpecVersion = VK_QCOM_IMAGE_PROCESSING_2_SPEC_VERSION; //=== VK_QCOM_filter_cubic_weights === VULKAN_HPP_CONSTEXPR_INLINE auto QCOMFilterCubicWeightsExtensionName = VK_QCOM_FILTER_CUBIC_WEIGHTS_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto QCOMFilterCubicWeightsSpecVersion = VK_QCOM_FILTER_CUBIC_WEIGHTS_SPEC_VERSION; //=== VK_QCOM_ycbcr_degamma === VULKAN_HPP_CONSTEXPR_INLINE auto QCOMYcbcrDegammaExtensionName = VK_QCOM_YCBCR_DEGAMMA_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto QCOMYcbcrDegammaSpecVersion = VK_QCOM_YCBCR_DEGAMMA_SPEC_VERSION; //=== VK_QCOM_filter_cubic_clamp === VULKAN_HPP_CONSTEXPR_INLINE auto QCOMFilterCubicClampExtensionName = VK_QCOM_FILTER_CUBIC_CLAMP_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto QCOMFilterCubicClampSpecVersion = VK_QCOM_FILTER_CUBIC_CLAMP_SPEC_VERSION; //=== VK_EXT_attachment_feedback_loop_dynamic_state === VULKAN_HPP_CONSTEXPR_INLINE auto EXTAttachmentFeedbackLoopDynamicStateExtensionName = VK_EXT_ATTACHMENT_FEEDBACK_LOOP_DYNAMIC_STATE_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTAttachmentFeedbackLoopDynamicStateSpecVersion = VK_EXT_ATTACHMENT_FEEDBACK_LOOP_DYNAMIC_STATE_SPEC_VERSION; //=== VK_KHR_vertex_attribute_divisor === VULKAN_HPP_CONSTEXPR_INLINE auto KHRVertexAttributeDivisorExtensionName = VK_KHR_VERTEX_ATTRIBUTE_DIVISOR_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRVertexAttributeDivisorSpecVersion = VK_KHR_VERTEX_ATTRIBUTE_DIVISOR_SPEC_VERSION; //=== VK_KHR_load_store_op_none === VULKAN_HPP_CONSTEXPR_INLINE auto KHRLoadStoreOpNoneExtensionName = VK_KHR_LOAD_STORE_OP_NONE_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRLoadStoreOpNoneSpecVersion = VK_KHR_LOAD_STORE_OP_NONE_SPEC_VERSION; //=== VK_KHR_shader_float_controls2 === VULKAN_HPP_CONSTEXPR_INLINE auto KHRShaderFloatControls2ExtensionName = VK_KHR_SHADER_FLOAT_CONTROLS_2_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRShaderFloatControls2SpecVersion = VK_KHR_SHADER_FLOAT_CONTROLS_2_SPEC_VERSION; #if defined( VK_USE_PLATFORM_SCREEN_QNX ) //=== VK_QNX_external_memory_screen_buffer === VULKAN_HPP_CONSTEXPR_INLINE auto QNXExternalMemoryScreenBufferExtensionName = VK_QNX_EXTERNAL_MEMORY_SCREEN_BUFFER_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto QNXExternalMemoryScreenBufferSpecVersion = VK_QNX_EXTERNAL_MEMORY_SCREEN_BUFFER_SPEC_VERSION; #endif /*VK_USE_PLATFORM_SCREEN_QNX*/ //=== VK_MSFT_layered_driver === VULKAN_HPP_CONSTEXPR_INLINE auto MSFTLayeredDriverExtensionName = VK_MSFT_LAYERED_DRIVER_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto MSFTLayeredDriverSpecVersion = VK_MSFT_LAYERED_DRIVER_SPEC_VERSION; //=== VK_KHR_index_type_uint8 === VULKAN_HPP_CONSTEXPR_INLINE auto KHRIndexTypeUint8ExtensionName = VK_KHR_INDEX_TYPE_UINT8_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRIndexTypeUint8SpecVersion = VK_KHR_INDEX_TYPE_UINT8_SPEC_VERSION; //=== VK_KHR_line_rasterization === VULKAN_HPP_CONSTEXPR_INLINE auto KHRLineRasterizationExtensionName = VK_KHR_LINE_RASTERIZATION_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRLineRasterizationSpecVersion = VK_KHR_LINE_RASTERIZATION_SPEC_VERSION; //=== VK_KHR_calibrated_timestamps === VULKAN_HPP_CONSTEXPR_INLINE auto KHRCalibratedTimestampsExtensionName = VK_KHR_CALIBRATED_TIMESTAMPS_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRCalibratedTimestampsSpecVersion = VK_KHR_CALIBRATED_TIMESTAMPS_SPEC_VERSION; //=== VK_KHR_shader_expect_assume === VULKAN_HPP_CONSTEXPR_INLINE auto KHRShaderExpectAssumeExtensionName = VK_KHR_SHADER_EXPECT_ASSUME_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRShaderExpectAssumeSpecVersion = VK_KHR_SHADER_EXPECT_ASSUME_SPEC_VERSION; //=== VK_KHR_maintenance6 === VULKAN_HPP_CONSTEXPR_INLINE auto KHRMaintenance6ExtensionName = VK_KHR_MAINTENANCE_6_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRMaintenance6SpecVersion = VK_KHR_MAINTENANCE_6_SPEC_VERSION; //=== VK_NV_descriptor_pool_overallocation === VULKAN_HPP_CONSTEXPR_INLINE auto NVDescriptorPoolOverallocationExtensionName = VK_NV_DESCRIPTOR_POOL_OVERALLOCATION_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto NVDescriptorPoolOverallocationSpecVersion = VK_NV_DESCRIPTOR_POOL_OVERALLOCATION_SPEC_VERSION; //=== VK_NV_display_stereo === VULKAN_HPP_CONSTEXPR_INLINE auto NVDisplayStereoExtensionName = VK_NV_DISPLAY_STEREO_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto NVDisplayStereoSpecVersion = VK_NV_DISPLAY_STEREO_SPEC_VERSION; //=== VK_KHR_video_encode_quantization_map === VULKAN_HPP_CONSTEXPR_INLINE auto KHRVideoEncodeQuantizationMapExtensionName = VK_KHR_VIDEO_ENCODE_QUANTIZATION_MAP_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRVideoEncodeQuantizationMapSpecVersion = VK_KHR_VIDEO_ENCODE_QUANTIZATION_MAP_SPEC_VERSION; //=== VK_NV_raw_access_chains === VULKAN_HPP_CONSTEXPR_INLINE auto NVRawAccessChainsExtensionName = VK_NV_RAW_ACCESS_CHAINS_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto NVRawAccessChainsSpecVersion = VK_NV_RAW_ACCESS_CHAINS_SPEC_VERSION; //=== VK_KHR_shader_relaxed_extended_instruction === VULKAN_HPP_CONSTEXPR_INLINE auto KHRShaderRelaxedExtendedInstructionExtensionName = VK_KHR_SHADER_RELAXED_EXTENDED_INSTRUCTION_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRShaderRelaxedExtendedInstructionSpecVersion = VK_KHR_SHADER_RELAXED_EXTENDED_INSTRUCTION_SPEC_VERSION; //=== VK_NV_command_buffer_inheritance === VULKAN_HPP_CONSTEXPR_INLINE auto NVCommandBufferInheritanceExtensionName = VK_NV_COMMAND_BUFFER_INHERITANCE_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto NVCommandBufferInheritanceSpecVersion = VK_NV_COMMAND_BUFFER_INHERITANCE_SPEC_VERSION; //=== VK_KHR_maintenance7 === VULKAN_HPP_CONSTEXPR_INLINE auto KHRMaintenance7ExtensionName = VK_KHR_MAINTENANCE_7_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRMaintenance7SpecVersion = VK_KHR_MAINTENANCE_7_SPEC_VERSION; //=== VK_NV_shader_atomic_float16_vector === VULKAN_HPP_CONSTEXPR_INLINE auto NVShaderAtomicFloat16VectorExtensionName = VK_NV_SHADER_ATOMIC_FLOAT16_VECTOR_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto NVShaderAtomicFloat16VectorSpecVersion = VK_NV_SHADER_ATOMIC_FLOAT16_VECTOR_SPEC_VERSION; //=== VK_EXT_shader_replicated_composites === VULKAN_HPP_CONSTEXPR_INLINE auto EXTShaderReplicatedCompositesExtensionName = VK_EXT_SHADER_REPLICATED_COMPOSITES_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTShaderReplicatedCompositesSpecVersion = VK_EXT_SHADER_REPLICATED_COMPOSITES_SPEC_VERSION; //=== VK_NV_ray_tracing_validation === VULKAN_HPP_CONSTEXPR_INLINE auto NVRayTracingValidationExtensionName = VK_NV_RAY_TRACING_VALIDATION_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto NVRayTracingValidationSpecVersion = VK_NV_RAY_TRACING_VALIDATION_SPEC_VERSION; //=== VK_NV_cluster_acceleration_structure === VULKAN_HPP_CONSTEXPR_INLINE auto NVClusterAccelerationStructureExtensionName = VK_NV_CLUSTER_ACCELERATION_STRUCTURE_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto NVClusterAccelerationStructureSpecVersion = VK_NV_CLUSTER_ACCELERATION_STRUCTURE_SPEC_VERSION; //=== VK_NV_partitioned_acceleration_structure === VULKAN_HPP_CONSTEXPR_INLINE auto NVPartitionedAccelerationStructureExtensionName = VK_NV_PARTITIONED_ACCELERATION_STRUCTURE_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto NVPartitionedAccelerationStructureSpecVersion = VK_NV_PARTITIONED_ACCELERATION_STRUCTURE_SPEC_VERSION; //=== VK_EXT_device_generated_commands === VULKAN_HPP_CONSTEXPR_INLINE auto EXTDeviceGeneratedCommandsExtensionName = VK_EXT_DEVICE_GENERATED_COMMANDS_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTDeviceGeneratedCommandsSpecVersion = VK_EXT_DEVICE_GENERATED_COMMANDS_SPEC_VERSION; //=== VK_KHR_maintenance8 === VULKAN_HPP_CONSTEXPR_INLINE auto KHRMaintenance8ExtensionName = VK_KHR_MAINTENANCE_8_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRMaintenance8SpecVersion = VK_KHR_MAINTENANCE_8_SPEC_VERSION; //=== VK_MESA_image_alignment_control === VULKAN_HPP_CONSTEXPR_INLINE auto MESAImageAlignmentControlExtensionName = VK_MESA_IMAGE_ALIGNMENT_CONTROL_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto MESAImageAlignmentControlSpecVersion = VK_MESA_IMAGE_ALIGNMENT_CONTROL_SPEC_VERSION; //=== VK_EXT_depth_clamp_control === VULKAN_HPP_CONSTEXPR_INLINE auto EXTDepthClampControlExtensionName = VK_EXT_DEPTH_CLAMP_CONTROL_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTDepthClampControlSpecVersion = VK_EXT_DEPTH_CLAMP_CONTROL_SPEC_VERSION; //=== VK_KHR_video_maintenance2 === VULKAN_HPP_CONSTEXPR_INLINE auto KHRVideoMaintenance2ExtensionName = VK_KHR_VIDEO_MAINTENANCE_2_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRVideoMaintenance2SpecVersion = VK_KHR_VIDEO_MAINTENANCE_2_SPEC_VERSION; //=== VK_HUAWEI_hdr_vivid === VULKAN_HPP_CONSTEXPR_INLINE auto HUAWEIHdrVividExtensionName = VK_HUAWEI_HDR_VIVID_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto HUAWEIHdrVividSpecVersion = VK_HUAWEI_HDR_VIVID_SPEC_VERSION; //=== VK_NV_cooperative_matrix2 === VULKAN_HPP_CONSTEXPR_INLINE auto NVCooperativeMatrix2ExtensionName = VK_NV_COOPERATIVE_MATRIX_2_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto NVCooperativeMatrix2SpecVersion = VK_NV_COOPERATIVE_MATRIX_2_SPEC_VERSION; //=== VK_ARM_pipeline_opacity_micromap === VULKAN_HPP_CONSTEXPR_INLINE auto ARMPipelineOpacityMicromapExtensionName = VK_ARM_PIPELINE_OPACITY_MICROMAP_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto ARMPipelineOpacityMicromapSpecVersion = VK_ARM_PIPELINE_OPACITY_MICROMAP_SPEC_VERSION; #if defined( VK_USE_PLATFORM_METAL_EXT ) //=== VK_EXT_external_memory_metal === VULKAN_HPP_CONSTEXPR_INLINE auto EXTExternalMemoryMetalExtensionName = VK_EXT_EXTERNAL_MEMORY_METAL_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTExternalMemoryMetalSpecVersion = VK_EXT_EXTERNAL_MEMORY_METAL_SPEC_VERSION; #endif /*VK_USE_PLATFORM_METAL_EXT*/ //=== VK_KHR_depth_clamp_zero_one === VULKAN_HPP_CONSTEXPR_INLINE auto KHRDepthClampZeroOneExtensionName = VK_KHR_DEPTH_CLAMP_ZERO_ONE_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto KHRDepthClampZeroOneSpecVersion = VK_KHR_DEPTH_CLAMP_ZERO_ONE_SPEC_VERSION; //=== VK_EXT_vertex_attribute_robustness === VULKAN_HPP_CONSTEXPR_INLINE auto EXTVertexAttributeRobustnessExtensionName = VK_EXT_VERTEX_ATTRIBUTE_ROBUSTNESS_EXTENSION_NAME; VULKAN_HPP_CONSTEXPR_INLINE auto EXTVertexAttributeRobustnessSpecVersion = VK_EXT_VERTEX_ATTRIBUTE_ROBUSTNESS_SPEC_VERSION; } // namespace VULKAN_HPP_NAMESPACE // clang-format off #include #include #include // clang-format on namespace VULKAN_HPP_NAMESPACE { #if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) //======================= //=== STRUCTS EXTENDS === //======================= //=== VK_VERSION_1_0 === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_VERSION_1_1 === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_VERSION_1_2 === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_VERSION_1_3 === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; # if defined( VK_ENABLE_BETA_EXTENSIONS ) template <> struct StructExtends { enum { value = true }; }; # endif /*VK_ENABLE_BETA_EXTENSIONS*/ template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_VERSION_1_4 === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_KHR_swapchain === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_KHR_display_swapchain === template <> struct StructExtends { enum { value = true }; }; //=== VK_EXT_debug_report === template <> struct StructExtends { enum { value = true }; }; //=== VK_AMD_rasterization_order === template <> struct StructExtends { enum { value = true }; }; //=== VK_KHR_video_queue === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_KHR_video_decode_queue === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_NV_dedicated_allocation === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_EXT_transform_feedback === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_NVX_binary_import === template <> struct StructExtends { enum { value = true }; }; //=== VK_KHR_video_encode_h264 === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_KHR_video_encode_h265 === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_KHR_video_decode_h264 === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_AMD_texture_gather_bias_lod === template <> struct StructExtends { enum { value = true }; }; //=== VK_NV_corner_sampled_image === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_NV_external_memory === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; # if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_NV_external_memory_win32 === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; # endif /*VK_USE_PLATFORM_WIN32_KHR*/ # if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_NV_win32_keyed_mutex === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; # endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_EXT_validation_flags === template <> struct StructExtends { enum { value = true }; }; //=== VK_EXT_astc_decode_mode === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; # if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_KHR_external_memory_win32 === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; # endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_KHR_external_memory_fd === template <> struct StructExtends { enum { value = true }; }; # if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_KHR_win32_keyed_mutex === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; # endif /*VK_USE_PLATFORM_WIN32_KHR*/ # if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_KHR_external_semaphore_win32 === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; # endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_EXT_conditional_rendering === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_KHR_incremental_present === template <> struct StructExtends { enum { value = true }; }; //=== VK_NV_clip_space_w_scaling === template <> struct StructExtends { enum { value = true }; }; //=== VK_EXT_display_control === template <> struct StructExtends { enum { value = true }; }; //=== VK_GOOGLE_display_timing === template <> struct StructExtends { enum { value = true }; }; //=== VK_NVX_multiview_per_view_attributes === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_NV_viewport_swizzle === template <> struct StructExtends { enum { value = true }; }; //=== VK_EXT_discard_rectangles === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_EXT_conservative_rasterization === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_EXT_depth_clip_enable === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_IMG_relaxed_line_rasterization === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_KHR_shared_presentable_image === template <> struct StructExtends { enum { value = true }; }; # if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_KHR_external_fence_win32 === template <> struct StructExtends { enum { value = true }; }; # endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_KHR_performance_query === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_EXT_debug_utils === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; # if defined( VK_USE_PLATFORM_ANDROID_KHR ) //=== VK_ANDROID_external_memory_android_hardware_buffer === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; # endif /*VK_USE_PLATFORM_ANDROID_KHR*/ # if defined( VK_ENABLE_BETA_EXTENSIONS ) //=== VK_AMDX_shader_enqueue === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; # endif /*VK_ENABLE_BETA_EXTENSIONS*/ //=== VK_AMD_mixed_attachment_samples === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_EXT_sample_locations === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_EXT_blend_operation_advanced === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_NV_fragment_coverage_to_color === template <> struct StructExtends { enum { value = true }; }; //=== VK_KHR_acceleration_structure === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_KHR_ray_tracing_pipeline === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_KHR_ray_query === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_NV_framebuffer_mixed_samples === template <> struct StructExtends { enum { value = true }; }; //=== VK_NV_shader_sm_builtins === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_EXT_image_drm_format_modifier === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_EXT_validation_cache === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; # if defined( VK_ENABLE_BETA_EXTENSIONS ) //=== VK_KHR_portability_subset === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; # endif /*VK_ENABLE_BETA_EXTENSIONS*/ //=== VK_NV_shading_rate_image === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_NV_ray_tracing === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_NV_representative_fragment_test === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_EXT_filter_cubic === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_EXT_external_memory_host === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_KHR_shader_clock === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_AMD_pipeline_compiler_control === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; # if defined( VK_ENABLE_BETA_EXTENSIONS ) template <> struct StructExtends { enum { value = true }; }; # endif /*VK_ENABLE_BETA_EXTENSIONS*/ //=== VK_AMD_shader_core_properties === template <> struct StructExtends { enum { value = true }; }; //=== VK_KHR_video_decode_h265 === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_AMD_memory_overallocation_behavior === template <> struct StructExtends { enum { value = true }; }; //=== VK_EXT_vertex_attribute_divisor === template <> struct StructExtends { enum { value = true }; }; # if defined( VK_USE_PLATFORM_GGP ) //=== VK_GGP_frame_token === template <> struct StructExtends { enum { value = true }; }; # endif /*VK_USE_PLATFORM_GGP*/ //=== VK_NV_mesh_shader === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_NV_shader_image_footprint === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_NV_scissor_exclusive === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_NV_device_diagnostic_checkpoints === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_INTEL_shader_integer_functions2 === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_INTEL_performance_query === template <> struct StructExtends { enum { value = true }; }; //=== VK_EXT_pci_bus_info === template <> struct StructExtends { enum { value = true }; }; //=== VK_AMD_display_native_hdr === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_EXT_fragment_density_map === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_KHR_fragment_shading_rate === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_AMD_shader_core_properties2 === template <> struct StructExtends { enum { value = true }; }; //=== VK_AMD_device_coherent_memory === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_EXT_shader_image_atomic_int64 === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_KHR_shader_quad_control === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_EXT_memory_budget === template <> struct StructExtends { enum { value = true }; }; //=== VK_EXT_memory_priority === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_KHR_surface_protected_capabilities === template <> struct StructExtends { enum { value = true }; }; //=== VK_NV_dedicated_allocation_image_aliasing === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_EXT_buffer_device_address === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_EXT_validation_features === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_KHR_present_wait === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_NV_cooperative_matrix === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_NV_coverage_reduction_mode === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_EXT_fragment_shader_interlock === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_EXT_ycbcr_image_arrays === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_EXT_provoking_vertex === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; # if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_EXT_full_screen_exclusive === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; # endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_EXT_shader_atomic_float === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_EXT_extended_dynamic_state === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_KHR_pipeline_executable_properties === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_EXT_map_memory_placed === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_EXT_shader_atomic_float2 === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_EXT_surface_maintenance1 === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_EXT_swapchain_maintenance1 === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_NV_device_generated_commands === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_NV_inherited_viewport_scissor === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_EXT_texel_buffer_alignment === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_QCOM_render_pass_transform === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_EXT_depth_bias_control === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_EXT_device_memory_report === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_EXT_robustness2 === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_EXT_custom_border_color === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_KHR_pipeline_library === template <> struct StructExtends { enum { value = true }; }; //=== VK_NV_present_barrier === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_KHR_present_id === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_KHR_video_encode_queue === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_NV_device_diagnostics_config === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; # if defined( VK_ENABLE_BETA_EXTENSIONS ) //=== VK_NV_cuda_kernel_launch === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; # endif /*VK_ENABLE_BETA_EXTENSIONS*/ //=== VK_NV_low_latency === template <> struct StructExtends { enum { value = true }; }; # if defined( VK_USE_PLATFORM_METAL_EXT ) //=== VK_EXT_metal_objects === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; # endif /*VK_USE_PLATFORM_METAL_EXT*/ //=== VK_EXT_descriptor_buffer === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_EXT_graphics_pipeline_library === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_AMD_shader_early_and_late_fragment_tests === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_KHR_fragment_shader_barycentric === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_KHR_shader_subgroup_uniform_control_flow === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_NV_fragment_shading_rate_enums === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_NV_ray_tracing_motion_blur === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_EXT_mesh_shader === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_EXT_ycbcr_2plane_444_formats === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_EXT_fragment_density_map2 === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_QCOM_rotated_copy_commands === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_KHR_workgroup_memory_explicit_layout === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_EXT_image_compression_control === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_EXT_attachment_feedback_loop_layout === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_EXT_4444_formats === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_EXT_device_fault === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_EXT_rgba10x6_formats === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_EXT_vertex_input_dynamic_state === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_EXT_physical_device_drm === template <> struct StructExtends { enum { value = true }; }; //=== VK_EXT_device_address_binding_report === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_EXT_depth_clip_control === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_EXT_primitive_topology_list_restart === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_EXT_present_mode_fifo_latest_ready === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; # if defined( VK_USE_PLATFORM_FUCHSIA ) //=== VK_FUCHSIA_external_memory === template <> struct StructExtends { enum { value = true }; }; # endif /*VK_USE_PLATFORM_FUCHSIA*/ # if defined( VK_USE_PLATFORM_FUCHSIA ) //=== VK_FUCHSIA_buffer_collection === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; # endif /*VK_USE_PLATFORM_FUCHSIA*/ //=== VK_HUAWEI_subpass_shading === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_HUAWEI_invocation_mask === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_NV_external_memory_rdma === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_EXT_pipeline_properties === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_EXT_frame_boundary === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_EXT_multisampled_render_to_single_sampled === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_EXT_extended_dynamic_state2 === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_EXT_color_write_enable === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_EXT_primitives_generated_query === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_KHR_ray_tracing_maintenance1 === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_EXT_image_view_min_lod === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_EXT_multi_draw === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_EXT_image_2d_view_of_3d === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_EXT_shader_tile_image === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_EXT_opacity_micromap === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; # if defined( VK_ENABLE_BETA_EXTENSIONS ) //=== VK_NV_displacement_micromap === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; # endif /*VK_ENABLE_BETA_EXTENSIONS*/ //=== VK_HUAWEI_cluster_culling_shader === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_EXT_border_color_swizzle === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_EXT_pageable_device_local_memory === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_ARM_shader_core_properties === template <> struct StructExtends { enum { value = true }; }; //=== VK_ARM_scheduling_controls === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_EXT_image_sliced_view_of_3d === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_VALVE_descriptor_set_host_mapping === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_EXT_non_seamless_cube_map === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_ARM_render_pass_striped === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_QCOM_fragment_density_map_offset === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_NV_copy_memory_indirect === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_NV_memory_decompression === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_NV_device_generated_commands_compute === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_NV_ray_tracing_linear_swept_spheres === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_NV_linear_color_attachment === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_KHR_shader_maximal_reconvergence === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_EXT_image_compression_control_swapchain === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_QCOM_image_processing === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_EXT_nested_command_buffer === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_EXT_external_memory_acquire_unmodified === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_EXT_extended_dynamic_state3 === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_EXT_subpass_merge_feedback === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_LUNARG_direct_driver_loading === template <> struct StructExtends { enum { value = true }; }; //=== VK_EXT_shader_module_identifier === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_EXT_rasterization_order_attachment_access === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_NV_optical_flow === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_EXT_legacy_dithering === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; # if defined( VK_USE_PLATFORM_ANDROID_KHR ) //=== VK_ANDROID_external_format_resolve === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; # endif /*VK_USE_PLATFORM_ANDROID_KHR*/ //=== VK_AMD_anti_lag === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_KHR_ray_tracing_position_fetch === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_EXT_shader_object === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_KHR_pipeline_binary === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_QCOM_tile_properties === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_SEC_amigo_profiling === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_QCOM_multiview_per_view_viewports === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_NV_ray_tracing_invocation_reorder === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_NV_cooperative_vector === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_NV_extended_sparse_address_space === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_EXT_mutable_descriptor_type === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_EXT_legacy_vertex_attributes === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_EXT_layer_settings === template <> struct StructExtends { enum { value = true }; }; //=== VK_ARM_shader_core_builtins === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_EXT_pipeline_library_group_handles === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_EXT_dynamic_rendering_unused_attachments === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_NV_low_latency2 === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_KHR_cooperative_matrix === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_QCOM_multiview_per_view_render_areas === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_KHR_compute_shader_derivatives === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_KHR_video_decode_av1 === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_KHR_video_encode_av1 === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_KHR_video_maintenance1 === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_NV_per_stage_descriptor_set === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_QCOM_image_processing2 === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_QCOM_filter_cubic_weights === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_QCOM_ycbcr_degamma === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_QCOM_filter_cubic_clamp === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_EXT_attachment_feedback_loop_dynamic_state === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; # if defined( VK_USE_PLATFORM_SCREEN_QNX ) //=== VK_QNX_external_memory_screen_buffer === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; # endif /*VK_USE_PLATFORM_SCREEN_QNX*/ //=== VK_MSFT_layered_driver === template <> struct StructExtends { enum { value = true }; }; //=== VK_NV_descriptor_pool_overallocation === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_NV_display_stereo === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_KHR_video_encode_quantization_map === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_NV_raw_access_chains === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_KHR_shader_relaxed_extended_instruction === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_NV_command_buffer_inheritance === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_KHR_maintenance7 === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_NV_shader_atomic_float16_vector === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_EXT_shader_replicated_composites === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_NV_ray_tracing_validation === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_NV_cluster_acceleration_structure === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_NV_partitioned_acceleration_structure === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_EXT_device_generated_commands === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_KHR_maintenance8 === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_MESA_image_alignment_control === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_EXT_depth_clamp_control === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_KHR_video_maintenance2 === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_HUAWEI_hdr_vivid === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_NV_cooperative_matrix2 === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_ARM_pipeline_opacity_micromap === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; # if defined( VK_USE_PLATFORM_METAL_EXT ) //=== VK_EXT_external_memory_metal === template <> struct StructExtends { enum { value = true }; }; # endif /*VK_USE_PLATFORM_METAL_EXT*/ //=== VK_KHR_depth_clamp_zero_one === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; //=== VK_EXT_vertex_attribute_robustness === template <> struct StructExtends { enum { value = true }; }; template <> struct StructExtends { enum { value = true }; }; #endif // VULKAN_HPP_DISABLE_ENHANCED_MODE namespace detail { #if VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL class DynamicLoader { public: # ifdef VULKAN_HPP_NO_EXCEPTIONS DynamicLoader( std::string const & vulkanLibraryName = {} ) VULKAN_HPP_NOEXCEPT # else DynamicLoader( std::string const & vulkanLibraryName = {} ) # endif { if ( !vulkanLibraryName.empty() ) { # if defined( _WIN32 ) m_library = ::LoadLibraryA( vulkanLibraryName.c_str() ); # elif defined( __unix__ ) || defined( __APPLE__ ) || defined( __QNX__ ) || defined( __Fuchsia__ ) m_library = dlopen( vulkanLibraryName.c_str(), RTLD_NOW | RTLD_LOCAL ); # else # error unsupported platform # endif } else { # if defined( _WIN32 ) m_library = ::LoadLibraryA( "vulkan-1.dll" ); # elif defined( __APPLE__ ) m_library = dlopen( "libvulkan.dylib", RTLD_NOW | RTLD_LOCAL ); if ( !m_library ) { m_library = dlopen( "libvulkan.1.dylib", RTLD_NOW | RTLD_LOCAL ); } if ( !m_library ) { m_library = dlopen( "libMoltenVK.dylib", RTLD_NOW | RTLD_LOCAL ); } // Add support for using Vulkan and MoltenVK in a Framework. App store rules for iOS // strictly enforce no .dylib's. If they aren't found it just falls through if ( !m_library ) { m_library = dlopen( "vulkan.framework/vulkan", RTLD_NOW | RTLD_LOCAL ); } if ( !m_library ) { m_library = dlopen( "MoltenVK.framework/MoltenVK", RTLD_NOW | RTLD_LOCAL ); } // modern versions of macOS don't search /usr/local/lib automatically contrary to what man dlopen says // Vulkan SDK uses this as the system-wide installation location, so we're going to fallback to this if all else fails if ( !m_library && ( getenv( "DYLD_FALLBACK_LIBRARY_PATH" ) == NULL ) ) { m_library = dlopen( "/usr/local/lib/libvulkan.dylib", RTLD_NOW | RTLD_LOCAL ); } # elif defined( __unix__ ) || defined( __QNX__ ) || defined( __Fuchsia__ ) m_library = dlopen( "libvulkan.so", RTLD_NOW | RTLD_LOCAL ); if ( !m_library ) { m_library = dlopen( "libvulkan.so.1", RTLD_NOW | RTLD_LOCAL ); } # else # error unsupported platform # endif } # ifndef VULKAN_HPP_NO_EXCEPTIONS if ( !m_library ) { // NOTE there should be an InitializationFailedError, but msvc insists on the symbol does not exist within the scope of this function. throw std::runtime_error( "Failed to load vulkan library!" ); } # endif } DynamicLoader( DynamicLoader const & ) = delete; DynamicLoader( DynamicLoader && other ) VULKAN_HPP_NOEXCEPT : m_library( other.m_library ) { other.m_library = nullptr; } DynamicLoader & operator=( DynamicLoader const & ) = delete; DynamicLoader & operator=( DynamicLoader && other ) VULKAN_HPP_NOEXCEPT { std::swap( m_library, other.m_library ); return *this; } ~DynamicLoader() VULKAN_HPP_NOEXCEPT { if ( m_library ) { # if defined( __unix__ ) || defined( __APPLE__ ) || defined( __QNX__ ) || defined( __Fuchsia__ ) dlclose( m_library ); # elif defined( _WIN32 ) ::FreeLibrary( m_library ); # else # error unsupported platform # endif } } template T getProcAddress( const char * function ) const VULKAN_HPP_NOEXCEPT { # if defined( __unix__ ) || defined( __APPLE__ ) || defined( __QNX__ ) || defined( __Fuchsia__ ) return (T)dlsym( m_library, function ); # elif defined( _WIN32 ) return ( T )::GetProcAddress( m_library, function ); # else # error unsupported platform # endif } bool success() const VULKAN_HPP_NOEXCEPT { return m_library != nullptr; } private: # if defined( __unix__ ) || defined( __APPLE__ ) || defined( __QNX__ ) || defined( __Fuchsia__ ) void * m_library; # elif defined( _WIN32 ) ::HINSTANCE m_library; # else # error unsupported platform # endif }; #endif using PFN_dummy = void ( * )(); class DispatchLoaderDynamic : public DispatchLoaderBase { public: //=== VK_VERSION_1_0 === PFN_vkCreateInstance vkCreateInstance = 0; PFN_vkDestroyInstance vkDestroyInstance = 0; PFN_vkEnumeratePhysicalDevices vkEnumeratePhysicalDevices = 0; PFN_vkGetPhysicalDeviceFeatures vkGetPhysicalDeviceFeatures = 0; PFN_vkGetPhysicalDeviceFormatProperties vkGetPhysicalDeviceFormatProperties = 0; PFN_vkGetPhysicalDeviceImageFormatProperties vkGetPhysicalDeviceImageFormatProperties = 0; PFN_vkGetPhysicalDeviceProperties vkGetPhysicalDeviceProperties = 0; PFN_vkGetPhysicalDeviceQueueFamilyProperties vkGetPhysicalDeviceQueueFamilyProperties = 0; PFN_vkGetPhysicalDeviceMemoryProperties vkGetPhysicalDeviceMemoryProperties = 0; PFN_vkGetInstanceProcAddr vkGetInstanceProcAddr = 0; PFN_vkGetDeviceProcAddr vkGetDeviceProcAddr = 0; PFN_vkCreateDevice vkCreateDevice = 0; PFN_vkDestroyDevice vkDestroyDevice = 0; PFN_vkEnumerateInstanceExtensionProperties vkEnumerateInstanceExtensionProperties = 0; PFN_vkEnumerateDeviceExtensionProperties vkEnumerateDeviceExtensionProperties = 0; PFN_vkEnumerateInstanceLayerProperties vkEnumerateInstanceLayerProperties = 0; PFN_vkEnumerateDeviceLayerProperties vkEnumerateDeviceLayerProperties = 0; PFN_vkGetDeviceQueue vkGetDeviceQueue = 0; PFN_vkQueueSubmit vkQueueSubmit = 0; PFN_vkQueueWaitIdle vkQueueWaitIdle = 0; PFN_vkDeviceWaitIdle vkDeviceWaitIdle = 0; PFN_vkAllocateMemory vkAllocateMemory = 0; PFN_vkFreeMemory vkFreeMemory = 0; PFN_vkMapMemory vkMapMemory = 0; PFN_vkUnmapMemory vkUnmapMemory = 0; PFN_vkFlushMappedMemoryRanges vkFlushMappedMemoryRanges = 0; PFN_vkInvalidateMappedMemoryRanges vkInvalidateMappedMemoryRanges = 0; PFN_vkGetDeviceMemoryCommitment vkGetDeviceMemoryCommitment = 0; PFN_vkBindBufferMemory vkBindBufferMemory = 0; PFN_vkBindImageMemory vkBindImageMemory = 0; PFN_vkGetBufferMemoryRequirements vkGetBufferMemoryRequirements = 0; PFN_vkGetImageMemoryRequirements vkGetImageMemoryRequirements = 0; PFN_vkGetImageSparseMemoryRequirements vkGetImageSparseMemoryRequirements = 0; PFN_vkGetPhysicalDeviceSparseImageFormatProperties vkGetPhysicalDeviceSparseImageFormatProperties = 0; PFN_vkQueueBindSparse vkQueueBindSparse = 0; PFN_vkCreateFence vkCreateFence = 0; PFN_vkDestroyFence vkDestroyFence = 0; PFN_vkResetFences vkResetFences = 0; PFN_vkGetFenceStatus vkGetFenceStatus = 0; PFN_vkWaitForFences vkWaitForFences = 0; PFN_vkCreateSemaphore vkCreateSemaphore = 0; PFN_vkDestroySemaphore vkDestroySemaphore = 0; PFN_vkCreateEvent vkCreateEvent = 0; PFN_vkDestroyEvent vkDestroyEvent = 0; PFN_vkGetEventStatus vkGetEventStatus = 0; PFN_vkSetEvent vkSetEvent = 0; PFN_vkResetEvent vkResetEvent = 0; PFN_vkCreateQueryPool vkCreateQueryPool = 0; PFN_vkDestroyQueryPool vkDestroyQueryPool = 0; PFN_vkGetQueryPoolResults vkGetQueryPoolResults = 0; PFN_vkCreateBuffer vkCreateBuffer = 0; PFN_vkDestroyBuffer vkDestroyBuffer = 0; PFN_vkCreateBufferView vkCreateBufferView = 0; PFN_vkDestroyBufferView vkDestroyBufferView = 0; PFN_vkCreateImage vkCreateImage = 0; PFN_vkDestroyImage vkDestroyImage = 0; PFN_vkGetImageSubresourceLayout vkGetImageSubresourceLayout = 0; PFN_vkCreateImageView vkCreateImageView = 0; PFN_vkDestroyImageView vkDestroyImageView = 0; PFN_vkCreateShaderModule vkCreateShaderModule = 0; PFN_vkDestroyShaderModule vkDestroyShaderModule = 0; PFN_vkCreatePipelineCache vkCreatePipelineCache = 0; PFN_vkDestroyPipelineCache vkDestroyPipelineCache = 0; PFN_vkGetPipelineCacheData vkGetPipelineCacheData = 0; PFN_vkMergePipelineCaches vkMergePipelineCaches = 0; PFN_vkCreateGraphicsPipelines vkCreateGraphicsPipelines = 0; PFN_vkCreateComputePipelines vkCreateComputePipelines = 0; PFN_vkDestroyPipeline vkDestroyPipeline = 0; PFN_vkCreatePipelineLayout vkCreatePipelineLayout = 0; PFN_vkDestroyPipelineLayout vkDestroyPipelineLayout = 0; PFN_vkCreateSampler vkCreateSampler = 0; PFN_vkDestroySampler vkDestroySampler = 0; PFN_vkCreateDescriptorSetLayout vkCreateDescriptorSetLayout = 0; PFN_vkDestroyDescriptorSetLayout vkDestroyDescriptorSetLayout = 0; PFN_vkCreateDescriptorPool vkCreateDescriptorPool = 0; PFN_vkDestroyDescriptorPool vkDestroyDescriptorPool = 0; PFN_vkResetDescriptorPool vkResetDescriptorPool = 0; PFN_vkAllocateDescriptorSets vkAllocateDescriptorSets = 0; PFN_vkFreeDescriptorSets vkFreeDescriptorSets = 0; PFN_vkUpdateDescriptorSets vkUpdateDescriptorSets = 0; PFN_vkCreateFramebuffer vkCreateFramebuffer = 0; PFN_vkDestroyFramebuffer vkDestroyFramebuffer = 0; PFN_vkCreateRenderPass vkCreateRenderPass = 0; PFN_vkDestroyRenderPass vkDestroyRenderPass = 0; PFN_vkGetRenderAreaGranularity vkGetRenderAreaGranularity = 0; PFN_vkCreateCommandPool vkCreateCommandPool = 0; PFN_vkDestroyCommandPool vkDestroyCommandPool = 0; PFN_vkResetCommandPool vkResetCommandPool = 0; PFN_vkAllocateCommandBuffers vkAllocateCommandBuffers = 0; PFN_vkFreeCommandBuffers vkFreeCommandBuffers = 0; PFN_vkBeginCommandBuffer vkBeginCommandBuffer = 0; PFN_vkEndCommandBuffer vkEndCommandBuffer = 0; PFN_vkResetCommandBuffer vkResetCommandBuffer = 0; PFN_vkCmdBindPipeline vkCmdBindPipeline = 0; PFN_vkCmdSetViewport vkCmdSetViewport = 0; PFN_vkCmdSetScissor vkCmdSetScissor = 0; PFN_vkCmdSetLineWidth vkCmdSetLineWidth = 0; PFN_vkCmdSetDepthBias vkCmdSetDepthBias = 0; PFN_vkCmdSetBlendConstants vkCmdSetBlendConstants = 0; PFN_vkCmdSetDepthBounds vkCmdSetDepthBounds = 0; PFN_vkCmdSetStencilCompareMask vkCmdSetStencilCompareMask = 0; PFN_vkCmdSetStencilWriteMask vkCmdSetStencilWriteMask = 0; PFN_vkCmdSetStencilReference vkCmdSetStencilReference = 0; PFN_vkCmdBindDescriptorSets vkCmdBindDescriptorSets = 0; PFN_vkCmdBindIndexBuffer vkCmdBindIndexBuffer = 0; PFN_vkCmdBindVertexBuffers vkCmdBindVertexBuffers = 0; PFN_vkCmdDraw vkCmdDraw = 0; PFN_vkCmdDrawIndexed vkCmdDrawIndexed = 0; PFN_vkCmdDrawIndirect vkCmdDrawIndirect = 0; PFN_vkCmdDrawIndexedIndirect vkCmdDrawIndexedIndirect = 0; PFN_vkCmdDispatch vkCmdDispatch = 0; PFN_vkCmdDispatchIndirect vkCmdDispatchIndirect = 0; PFN_vkCmdCopyBuffer vkCmdCopyBuffer = 0; PFN_vkCmdCopyImage vkCmdCopyImage = 0; PFN_vkCmdBlitImage vkCmdBlitImage = 0; PFN_vkCmdCopyBufferToImage vkCmdCopyBufferToImage = 0; PFN_vkCmdCopyImageToBuffer vkCmdCopyImageToBuffer = 0; PFN_vkCmdUpdateBuffer vkCmdUpdateBuffer = 0; PFN_vkCmdFillBuffer vkCmdFillBuffer = 0; PFN_vkCmdClearColorImage vkCmdClearColorImage = 0; PFN_vkCmdClearDepthStencilImage vkCmdClearDepthStencilImage = 0; PFN_vkCmdClearAttachments vkCmdClearAttachments = 0; PFN_vkCmdResolveImage vkCmdResolveImage = 0; PFN_vkCmdSetEvent vkCmdSetEvent = 0; PFN_vkCmdResetEvent vkCmdResetEvent = 0; PFN_vkCmdWaitEvents vkCmdWaitEvents = 0; PFN_vkCmdPipelineBarrier vkCmdPipelineBarrier = 0; PFN_vkCmdBeginQuery vkCmdBeginQuery = 0; PFN_vkCmdEndQuery vkCmdEndQuery = 0; PFN_vkCmdResetQueryPool vkCmdResetQueryPool = 0; PFN_vkCmdWriteTimestamp vkCmdWriteTimestamp = 0; PFN_vkCmdCopyQueryPoolResults vkCmdCopyQueryPoolResults = 0; PFN_vkCmdPushConstants vkCmdPushConstants = 0; PFN_vkCmdBeginRenderPass vkCmdBeginRenderPass = 0; PFN_vkCmdNextSubpass vkCmdNextSubpass = 0; PFN_vkCmdEndRenderPass vkCmdEndRenderPass = 0; PFN_vkCmdExecuteCommands vkCmdExecuteCommands = 0; //=== VK_VERSION_1_1 === PFN_vkEnumerateInstanceVersion vkEnumerateInstanceVersion = 0; PFN_vkBindBufferMemory2 vkBindBufferMemory2 = 0; PFN_vkBindImageMemory2 vkBindImageMemory2 = 0; PFN_vkGetDeviceGroupPeerMemoryFeatures vkGetDeviceGroupPeerMemoryFeatures = 0; PFN_vkCmdSetDeviceMask vkCmdSetDeviceMask = 0; PFN_vkCmdDispatchBase vkCmdDispatchBase = 0; PFN_vkEnumeratePhysicalDeviceGroups vkEnumeratePhysicalDeviceGroups = 0; PFN_vkGetImageMemoryRequirements2 vkGetImageMemoryRequirements2 = 0; PFN_vkGetBufferMemoryRequirements2 vkGetBufferMemoryRequirements2 = 0; PFN_vkGetImageSparseMemoryRequirements2 vkGetImageSparseMemoryRequirements2 = 0; PFN_vkGetPhysicalDeviceFeatures2 vkGetPhysicalDeviceFeatures2 = 0; PFN_vkGetPhysicalDeviceProperties2 vkGetPhysicalDeviceProperties2 = 0; PFN_vkGetPhysicalDeviceFormatProperties2 vkGetPhysicalDeviceFormatProperties2 = 0; PFN_vkGetPhysicalDeviceImageFormatProperties2 vkGetPhysicalDeviceImageFormatProperties2 = 0; PFN_vkGetPhysicalDeviceQueueFamilyProperties2 vkGetPhysicalDeviceQueueFamilyProperties2 = 0; PFN_vkGetPhysicalDeviceMemoryProperties2 vkGetPhysicalDeviceMemoryProperties2 = 0; PFN_vkGetPhysicalDeviceSparseImageFormatProperties2 vkGetPhysicalDeviceSparseImageFormatProperties2 = 0; PFN_vkTrimCommandPool vkTrimCommandPool = 0; PFN_vkGetDeviceQueue2 vkGetDeviceQueue2 = 0; PFN_vkCreateSamplerYcbcrConversion vkCreateSamplerYcbcrConversion = 0; PFN_vkDestroySamplerYcbcrConversion vkDestroySamplerYcbcrConversion = 0; PFN_vkCreateDescriptorUpdateTemplate vkCreateDescriptorUpdateTemplate = 0; PFN_vkDestroyDescriptorUpdateTemplate vkDestroyDescriptorUpdateTemplate = 0; PFN_vkUpdateDescriptorSetWithTemplate vkUpdateDescriptorSetWithTemplate = 0; PFN_vkGetPhysicalDeviceExternalBufferProperties vkGetPhysicalDeviceExternalBufferProperties = 0; PFN_vkGetPhysicalDeviceExternalFenceProperties vkGetPhysicalDeviceExternalFenceProperties = 0; PFN_vkGetPhysicalDeviceExternalSemaphoreProperties vkGetPhysicalDeviceExternalSemaphoreProperties = 0; PFN_vkGetDescriptorSetLayoutSupport vkGetDescriptorSetLayoutSupport = 0; //=== VK_VERSION_1_2 === PFN_vkCmdDrawIndirectCount vkCmdDrawIndirectCount = 0; PFN_vkCmdDrawIndexedIndirectCount vkCmdDrawIndexedIndirectCount = 0; PFN_vkCreateRenderPass2 vkCreateRenderPass2 = 0; PFN_vkCmdBeginRenderPass2 vkCmdBeginRenderPass2 = 0; PFN_vkCmdNextSubpass2 vkCmdNextSubpass2 = 0; PFN_vkCmdEndRenderPass2 vkCmdEndRenderPass2 = 0; PFN_vkResetQueryPool vkResetQueryPool = 0; PFN_vkGetSemaphoreCounterValue vkGetSemaphoreCounterValue = 0; PFN_vkWaitSemaphores vkWaitSemaphores = 0; PFN_vkSignalSemaphore vkSignalSemaphore = 0; PFN_vkGetBufferDeviceAddress vkGetBufferDeviceAddress = 0; PFN_vkGetBufferOpaqueCaptureAddress vkGetBufferOpaqueCaptureAddress = 0; PFN_vkGetDeviceMemoryOpaqueCaptureAddress vkGetDeviceMemoryOpaqueCaptureAddress = 0; //=== VK_VERSION_1_3 === PFN_vkGetPhysicalDeviceToolProperties vkGetPhysicalDeviceToolProperties = 0; PFN_vkCreatePrivateDataSlot vkCreatePrivateDataSlot = 0; PFN_vkDestroyPrivateDataSlot vkDestroyPrivateDataSlot = 0; PFN_vkSetPrivateData vkSetPrivateData = 0; PFN_vkGetPrivateData vkGetPrivateData = 0; PFN_vkCmdSetEvent2 vkCmdSetEvent2 = 0; PFN_vkCmdResetEvent2 vkCmdResetEvent2 = 0; PFN_vkCmdWaitEvents2 vkCmdWaitEvents2 = 0; PFN_vkCmdPipelineBarrier2 vkCmdPipelineBarrier2 = 0; PFN_vkCmdWriteTimestamp2 vkCmdWriteTimestamp2 = 0; PFN_vkQueueSubmit2 vkQueueSubmit2 = 0; PFN_vkCmdCopyBuffer2 vkCmdCopyBuffer2 = 0; PFN_vkCmdCopyImage2 vkCmdCopyImage2 = 0; PFN_vkCmdCopyBufferToImage2 vkCmdCopyBufferToImage2 = 0; PFN_vkCmdCopyImageToBuffer2 vkCmdCopyImageToBuffer2 = 0; PFN_vkCmdBlitImage2 vkCmdBlitImage2 = 0; PFN_vkCmdResolveImage2 vkCmdResolveImage2 = 0; PFN_vkCmdBeginRendering vkCmdBeginRendering = 0; PFN_vkCmdEndRendering vkCmdEndRendering = 0; PFN_vkCmdSetCullMode vkCmdSetCullMode = 0; PFN_vkCmdSetFrontFace vkCmdSetFrontFace = 0; PFN_vkCmdSetPrimitiveTopology vkCmdSetPrimitiveTopology = 0; PFN_vkCmdSetViewportWithCount vkCmdSetViewportWithCount = 0; PFN_vkCmdSetScissorWithCount vkCmdSetScissorWithCount = 0; PFN_vkCmdBindVertexBuffers2 vkCmdBindVertexBuffers2 = 0; PFN_vkCmdSetDepthTestEnable vkCmdSetDepthTestEnable = 0; PFN_vkCmdSetDepthWriteEnable vkCmdSetDepthWriteEnable = 0; PFN_vkCmdSetDepthCompareOp vkCmdSetDepthCompareOp = 0; PFN_vkCmdSetDepthBoundsTestEnable vkCmdSetDepthBoundsTestEnable = 0; PFN_vkCmdSetStencilTestEnable vkCmdSetStencilTestEnable = 0; PFN_vkCmdSetStencilOp vkCmdSetStencilOp = 0; PFN_vkCmdSetRasterizerDiscardEnable vkCmdSetRasterizerDiscardEnable = 0; PFN_vkCmdSetDepthBiasEnable vkCmdSetDepthBiasEnable = 0; PFN_vkCmdSetPrimitiveRestartEnable vkCmdSetPrimitiveRestartEnable = 0; PFN_vkGetDeviceBufferMemoryRequirements vkGetDeviceBufferMemoryRequirements = 0; PFN_vkGetDeviceImageMemoryRequirements vkGetDeviceImageMemoryRequirements = 0; PFN_vkGetDeviceImageSparseMemoryRequirements vkGetDeviceImageSparseMemoryRequirements = 0; //=== VK_VERSION_1_4 === PFN_vkCmdSetLineStipple vkCmdSetLineStipple = 0; PFN_vkMapMemory2 vkMapMemory2 = 0; PFN_vkUnmapMemory2 vkUnmapMemory2 = 0; PFN_vkCmdBindIndexBuffer2 vkCmdBindIndexBuffer2 = 0; PFN_vkGetRenderingAreaGranularity vkGetRenderingAreaGranularity = 0; PFN_vkGetDeviceImageSubresourceLayout vkGetDeviceImageSubresourceLayout = 0; PFN_vkGetImageSubresourceLayout2 vkGetImageSubresourceLayout2 = 0; PFN_vkCmdPushDescriptorSet vkCmdPushDescriptorSet = 0; PFN_vkCmdPushDescriptorSetWithTemplate vkCmdPushDescriptorSetWithTemplate = 0; PFN_vkCmdSetRenderingAttachmentLocations vkCmdSetRenderingAttachmentLocations = 0; PFN_vkCmdSetRenderingInputAttachmentIndices vkCmdSetRenderingInputAttachmentIndices = 0; PFN_vkCmdBindDescriptorSets2 vkCmdBindDescriptorSets2 = 0; PFN_vkCmdPushConstants2 vkCmdPushConstants2 = 0; PFN_vkCmdPushDescriptorSet2 vkCmdPushDescriptorSet2 = 0; PFN_vkCmdPushDescriptorSetWithTemplate2 vkCmdPushDescriptorSetWithTemplate2 = 0; PFN_vkCopyMemoryToImage vkCopyMemoryToImage = 0; PFN_vkCopyImageToMemory vkCopyImageToMemory = 0; PFN_vkCopyImageToImage vkCopyImageToImage = 0; PFN_vkTransitionImageLayout vkTransitionImageLayout = 0; //=== VK_KHR_surface === PFN_vkDestroySurfaceKHR vkDestroySurfaceKHR = 0; PFN_vkGetPhysicalDeviceSurfaceSupportKHR vkGetPhysicalDeviceSurfaceSupportKHR = 0; PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR vkGetPhysicalDeviceSurfaceCapabilitiesKHR = 0; PFN_vkGetPhysicalDeviceSurfaceFormatsKHR vkGetPhysicalDeviceSurfaceFormatsKHR = 0; PFN_vkGetPhysicalDeviceSurfacePresentModesKHR vkGetPhysicalDeviceSurfacePresentModesKHR = 0; //=== VK_KHR_swapchain === PFN_vkCreateSwapchainKHR vkCreateSwapchainKHR = 0; PFN_vkDestroySwapchainKHR vkDestroySwapchainKHR = 0; PFN_vkGetSwapchainImagesKHR vkGetSwapchainImagesKHR = 0; PFN_vkAcquireNextImageKHR vkAcquireNextImageKHR = 0; PFN_vkQueuePresentKHR vkQueuePresentKHR = 0; PFN_vkGetDeviceGroupPresentCapabilitiesKHR vkGetDeviceGroupPresentCapabilitiesKHR = 0; PFN_vkGetDeviceGroupSurfacePresentModesKHR vkGetDeviceGroupSurfacePresentModesKHR = 0; PFN_vkGetPhysicalDevicePresentRectanglesKHR vkGetPhysicalDevicePresentRectanglesKHR = 0; PFN_vkAcquireNextImage2KHR vkAcquireNextImage2KHR = 0; //=== VK_KHR_display === PFN_vkGetPhysicalDeviceDisplayPropertiesKHR vkGetPhysicalDeviceDisplayPropertiesKHR = 0; PFN_vkGetPhysicalDeviceDisplayPlanePropertiesKHR vkGetPhysicalDeviceDisplayPlanePropertiesKHR = 0; PFN_vkGetDisplayPlaneSupportedDisplaysKHR vkGetDisplayPlaneSupportedDisplaysKHR = 0; PFN_vkGetDisplayModePropertiesKHR vkGetDisplayModePropertiesKHR = 0; PFN_vkCreateDisplayModeKHR vkCreateDisplayModeKHR = 0; PFN_vkGetDisplayPlaneCapabilitiesKHR vkGetDisplayPlaneCapabilitiesKHR = 0; PFN_vkCreateDisplayPlaneSurfaceKHR vkCreateDisplayPlaneSurfaceKHR = 0; //=== VK_KHR_display_swapchain === PFN_vkCreateSharedSwapchainsKHR vkCreateSharedSwapchainsKHR = 0; #if defined( VK_USE_PLATFORM_XLIB_KHR ) //=== VK_KHR_xlib_surface === PFN_vkCreateXlibSurfaceKHR vkCreateXlibSurfaceKHR = 0; PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR vkGetPhysicalDeviceXlibPresentationSupportKHR = 0; #else PFN_dummy vkCreateXlibSurfaceKHR_placeholder = 0; PFN_dummy vkGetPhysicalDeviceXlibPresentationSupportKHR_placeholder = 0; #endif /*VK_USE_PLATFORM_XLIB_KHR*/ #if defined( VK_USE_PLATFORM_XCB_KHR ) //=== VK_KHR_xcb_surface === PFN_vkCreateXcbSurfaceKHR vkCreateXcbSurfaceKHR = 0; PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR vkGetPhysicalDeviceXcbPresentationSupportKHR = 0; #else PFN_dummy vkCreateXcbSurfaceKHR_placeholder = 0; PFN_dummy vkGetPhysicalDeviceXcbPresentationSupportKHR_placeholder = 0; #endif /*VK_USE_PLATFORM_XCB_KHR*/ #if defined( VK_USE_PLATFORM_WAYLAND_KHR ) //=== VK_KHR_wayland_surface === PFN_vkCreateWaylandSurfaceKHR vkCreateWaylandSurfaceKHR = 0; PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR vkGetPhysicalDeviceWaylandPresentationSupportKHR = 0; #else PFN_dummy vkCreateWaylandSurfaceKHR_placeholder = 0; PFN_dummy vkGetPhysicalDeviceWaylandPresentationSupportKHR_placeholder = 0; #endif /*VK_USE_PLATFORM_WAYLAND_KHR*/ #if defined( VK_USE_PLATFORM_ANDROID_KHR ) //=== VK_KHR_android_surface === PFN_vkCreateAndroidSurfaceKHR vkCreateAndroidSurfaceKHR = 0; #else PFN_dummy vkCreateAndroidSurfaceKHR_placeholder = 0; #endif /*VK_USE_PLATFORM_ANDROID_KHR*/ #if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_KHR_win32_surface === PFN_vkCreateWin32SurfaceKHR vkCreateWin32SurfaceKHR = 0; PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR vkGetPhysicalDeviceWin32PresentationSupportKHR = 0; #else PFN_dummy vkCreateWin32SurfaceKHR_placeholder = 0; PFN_dummy vkGetPhysicalDeviceWin32PresentationSupportKHR_placeholder = 0; #endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_EXT_debug_report === PFN_vkCreateDebugReportCallbackEXT vkCreateDebugReportCallbackEXT = 0; PFN_vkDestroyDebugReportCallbackEXT vkDestroyDebugReportCallbackEXT = 0; PFN_vkDebugReportMessageEXT vkDebugReportMessageEXT = 0; //=== VK_EXT_debug_marker === PFN_vkDebugMarkerSetObjectTagEXT vkDebugMarkerSetObjectTagEXT = 0; PFN_vkDebugMarkerSetObjectNameEXT vkDebugMarkerSetObjectNameEXT = 0; PFN_vkCmdDebugMarkerBeginEXT vkCmdDebugMarkerBeginEXT = 0; PFN_vkCmdDebugMarkerEndEXT vkCmdDebugMarkerEndEXT = 0; PFN_vkCmdDebugMarkerInsertEXT vkCmdDebugMarkerInsertEXT = 0; //=== VK_KHR_video_queue === PFN_vkGetPhysicalDeviceVideoCapabilitiesKHR vkGetPhysicalDeviceVideoCapabilitiesKHR = 0; PFN_vkGetPhysicalDeviceVideoFormatPropertiesKHR vkGetPhysicalDeviceVideoFormatPropertiesKHR = 0; PFN_vkCreateVideoSessionKHR vkCreateVideoSessionKHR = 0; PFN_vkDestroyVideoSessionKHR vkDestroyVideoSessionKHR = 0; PFN_vkGetVideoSessionMemoryRequirementsKHR vkGetVideoSessionMemoryRequirementsKHR = 0; PFN_vkBindVideoSessionMemoryKHR vkBindVideoSessionMemoryKHR = 0; PFN_vkCreateVideoSessionParametersKHR vkCreateVideoSessionParametersKHR = 0; PFN_vkUpdateVideoSessionParametersKHR vkUpdateVideoSessionParametersKHR = 0; PFN_vkDestroyVideoSessionParametersKHR vkDestroyVideoSessionParametersKHR = 0; PFN_vkCmdBeginVideoCodingKHR vkCmdBeginVideoCodingKHR = 0; PFN_vkCmdEndVideoCodingKHR vkCmdEndVideoCodingKHR = 0; PFN_vkCmdControlVideoCodingKHR vkCmdControlVideoCodingKHR = 0; //=== VK_KHR_video_decode_queue === PFN_vkCmdDecodeVideoKHR vkCmdDecodeVideoKHR = 0; //=== VK_EXT_transform_feedback === PFN_vkCmdBindTransformFeedbackBuffersEXT vkCmdBindTransformFeedbackBuffersEXT = 0; PFN_vkCmdBeginTransformFeedbackEXT vkCmdBeginTransformFeedbackEXT = 0; PFN_vkCmdEndTransformFeedbackEXT vkCmdEndTransformFeedbackEXT = 0; PFN_vkCmdBeginQueryIndexedEXT vkCmdBeginQueryIndexedEXT = 0; PFN_vkCmdEndQueryIndexedEXT vkCmdEndQueryIndexedEXT = 0; PFN_vkCmdDrawIndirectByteCountEXT vkCmdDrawIndirectByteCountEXT = 0; //=== VK_NVX_binary_import === PFN_vkCreateCuModuleNVX vkCreateCuModuleNVX = 0; PFN_vkCreateCuFunctionNVX vkCreateCuFunctionNVX = 0; PFN_vkDestroyCuModuleNVX vkDestroyCuModuleNVX = 0; PFN_vkDestroyCuFunctionNVX vkDestroyCuFunctionNVX = 0; PFN_vkCmdCuLaunchKernelNVX vkCmdCuLaunchKernelNVX = 0; //=== VK_NVX_image_view_handle === PFN_vkGetImageViewHandleNVX vkGetImageViewHandleNVX = 0; PFN_vkGetImageViewHandle64NVX vkGetImageViewHandle64NVX = 0; PFN_vkGetImageViewAddressNVX vkGetImageViewAddressNVX = 0; //=== VK_AMD_draw_indirect_count === PFN_vkCmdDrawIndirectCountAMD vkCmdDrawIndirectCountAMD = 0; PFN_vkCmdDrawIndexedIndirectCountAMD vkCmdDrawIndexedIndirectCountAMD = 0; //=== VK_AMD_shader_info === PFN_vkGetShaderInfoAMD vkGetShaderInfoAMD = 0; //=== VK_KHR_dynamic_rendering === PFN_vkCmdBeginRenderingKHR vkCmdBeginRenderingKHR = 0; PFN_vkCmdEndRenderingKHR vkCmdEndRenderingKHR = 0; #if defined( VK_USE_PLATFORM_GGP ) //=== VK_GGP_stream_descriptor_surface === PFN_vkCreateStreamDescriptorSurfaceGGP vkCreateStreamDescriptorSurfaceGGP = 0; #else PFN_dummy vkCreateStreamDescriptorSurfaceGGP_placeholder = 0; #endif /*VK_USE_PLATFORM_GGP*/ //=== VK_NV_external_memory_capabilities === PFN_vkGetPhysicalDeviceExternalImageFormatPropertiesNV vkGetPhysicalDeviceExternalImageFormatPropertiesNV = 0; #if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_NV_external_memory_win32 === PFN_vkGetMemoryWin32HandleNV vkGetMemoryWin32HandleNV = 0; #else PFN_dummy vkGetMemoryWin32HandleNV_placeholder = 0; #endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_KHR_get_physical_device_properties2 === PFN_vkGetPhysicalDeviceFeatures2KHR vkGetPhysicalDeviceFeatures2KHR = 0; PFN_vkGetPhysicalDeviceProperties2KHR vkGetPhysicalDeviceProperties2KHR = 0; PFN_vkGetPhysicalDeviceFormatProperties2KHR vkGetPhysicalDeviceFormatProperties2KHR = 0; PFN_vkGetPhysicalDeviceImageFormatProperties2KHR vkGetPhysicalDeviceImageFormatProperties2KHR = 0; PFN_vkGetPhysicalDeviceQueueFamilyProperties2KHR vkGetPhysicalDeviceQueueFamilyProperties2KHR = 0; PFN_vkGetPhysicalDeviceMemoryProperties2KHR vkGetPhysicalDeviceMemoryProperties2KHR = 0; PFN_vkGetPhysicalDeviceSparseImageFormatProperties2KHR vkGetPhysicalDeviceSparseImageFormatProperties2KHR = 0; //=== VK_KHR_device_group === PFN_vkGetDeviceGroupPeerMemoryFeaturesKHR vkGetDeviceGroupPeerMemoryFeaturesKHR = 0; PFN_vkCmdSetDeviceMaskKHR vkCmdSetDeviceMaskKHR = 0; PFN_vkCmdDispatchBaseKHR vkCmdDispatchBaseKHR = 0; #if defined( VK_USE_PLATFORM_VI_NN ) //=== VK_NN_vi_surface === PFN_vkCreateViSurfaceNN vkCreateViSurfaceNN = 0; #else PFN_dummy vkCreateViSurfaceNN_placeholder = 0; #endif /*VK_USE_PLATFORM_VI_NN*/ //=== VK_KHR_maintenance1 === PFN_vkTrimCommandPoolKHR vkTrimCommandPoolKHR = 0; //=== VK_KHR_device_group_creation === PFN_vkEnumeratePhysicalDeviceGroupsKHR vkEnumeratePhysicalDeviceGroupsKHR = 0; //=== VK_KHR_external_memory_capabilities === PFN_vkGetPhysicalDeviceExternalBufferPropertiesKHR vkGetPhysicalDeviceExternalBufferPropertiesKHR = 0; #if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_KHR_external_memory_win32 === PFN_vkGetMemoryWin32HandleKHR vkGetMemoryWin32HandleKHR = 0; PFN_vkGetMemoryWin32HandlePropertiesKHR vkGetMemoryWin32HandlePropertiesKHR = 0; #else PFN_dummy vkGetMemoryWin32HandleKHR_placeholder = 0; PFN_dummy vkGetMemoryWin32HandlePropertiesKHR_placeholder = 0; #endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_KHR_external_memory_fd === PFN_vkGetMemoryFdKHR vkGetMemoryFdKHR = 0; PFN_vkGetMemoryFdPropertiesKHR vkGetMemoryFdPropertiesKHR = 0; //=== VK_KHR_external_semaphore_capabilities === PFN_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR vkGetPhysicalDeviceExternalSemaphorePropertiesKHR = 0; #if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_KHR_external_semaphore_win32 === PFN_vkImportSemaphoreWin32HandleKHR vkImportSemaphoreWin32HandleKHR = 0; PFN_vkGetSemaphoreWin32HandleKHR vkGetSemaphoreWin32HandleKHR = 0; #else PFN_dummy vkImportSemaphoreWin32HandleKHR_placeholder = 0; PFN_dummy vkGetSemaphoreWin32HandleKHR_placeholder = 0; #endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_KHR_external_semaphore_fd === PFN_vkImportSemaphoreFdKHR vkImportSemaphoreFdKHR = 0; PFN_vkGetSemaphoreFdKHR vkGetSemaphoreFdKHR = 0; //=== VK_KHR_push_descriptor === PFN_vkCmdPushDescriptorSetKHR vkCmdPushDescriptorSetKHR = 0; PFN_vkCmdPushDescriptorSetWithTemplateKHR vkCmdPushDescriptorSetWithTemplateKHR = 0; //=== VK_EXT_conditional_rendering === PFN_vkCmdBeginConditionalRenderingEXT vkCmdBeginConditionalRenderingEXT = 0; PFN_vkCmdEndConditionalRenderingEXT vkCmdEndConditionalRenderingEXT = 0; //=== VK_KHR_descriptor_update_template === PFN_vkCreateDescriptorUpdateTemplateKHR vkCreateDescriptorUpdateTemplateKHR = 0; PFN_vkDestroyDescriptorUpdateTemplateKHR vkDestroyDescriptorUpdateTemplateKHR = 0; PFN_vkUpdateDescriptorSetWithTemplateKHR vkUpdateDescriptorSetWithTemplateKHR = 0; //=== VK_NV_clip_space_w_scaling === PFN_vkCmdSetViewportWScalingNV vkCmdSetViewportWScalingNV = 0; //=== VK_EXT_direct_mode_display === PFN_vkReleaseDisplayEXT vkReleaseDisplayEXT = 0; #if defined( VK_USE_PLATFORM_XLIB_XRANDR_EXT ) //=== VK_EXT_acquire_xlib_display === PFN_vkAcquireXlibDisplayEXT vkAcquireXlibDisplayEXT = 0; PFN_vkGetRandROutputDisplayEXT vkGetRandROutputDisplayEXT = 0; #else PFN_dummy vkAcquireXlibDisplayEXT_placeholder = 0; PFN_dummy vkGetRandROutputDisplayEXT_placeholder = 0; #endif /*VK_USE_PLATFORM_XLIB_XRANDR_EXT*/ //=== VK_EXT_display_surface_counter === PFN_vkGetPhysicalDeviceSurfaceCapabilities2EXT vkGetPhysicalDeviceSurfaceCapabilities2EXT = 0; //=== VK_EXT_display_control === PFN_vkDisplayPowerControlEXT vkDisplayPowerControlEXT = 0; PFN_vkRegisterDeviceEventEXT vkRegisterDeviceEventEXT = 0; PFN_vkRegisterDisplayEventEXT vkRegisterDisplayEventEXT = 0; PFN_vkGetSwapchainCounterEXT vkGetSwapchainCounterEXT = 0; //=== VK_GOOGLE_display_timing === PFN_vkGetRefreshCycleDurationGOOGLE vkGetRefreshCycleDurationGOOGLE = 0; PFN_vkGetPastPresentationTimingGOOGLE vkGetPastPresentationTimingGOOGLE = 0; //=== VK_EXT_discard_rectangles === PFN_vkCmdSetDiscardRectangleEXT vkCmdSetDiscardRectangleEXT = 0; PFN_vkCmdSetDiscardRectangleEnableEXT vkCmdSetDiscardRectangleEnableEXT = 0; PFN_vkCmdSetDiscardRectangleModeEXT vkCmdSetDiscardRectangleModeEXT = 0; //=== VK_EXT_hdr_metadata === PFN_vkSetHdrMetadataEXT vkSetHdrMetadataEXT = 0; //=== VK_KHR_create_renderpass2 === PFN_vkCreateRenderPass2KHR vkCreateRenderPass2KHR = 0; PFN_vkCmdBeginRenderPass2KHR vkCmdBeginRenderPass2KHR = 0; PFN_vkCmdNextSubpass2KHR vkCmdNextSubpass2KHR = 0; PFN_vkCmdEndRenderPass2KHR vkCmdEndRenderPass2KHR = 0; //=== VK_KHR_shared_presentable_image === PFN_vkGetSwapchainStatusKHR vkGetSwapchainStatusKHR = 0; //=== VK_KHR_external_fence_capabilities === PFN_vkGetPhysicalDeviceExternalFencePropertiesKHR vkGetPhysicalDeviceExternalFencePropertiesKHR = 0; #if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_KHR_external_fence_win32 === PFN_vkImportFenceWin32HandleKHR vkImportFenceWin32HandleKHR = 0; PFN_vkGetFenceWin32HandleKHR vkGetFenceWin32HandleKHR = 0; #else PFN_dummy vkImportFenceWin32HandleKHR_placeholder = 0; PFN_dummy vkGetFenceWin32HandleKHR_placeholder = 0; #endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_KHR_external_fence_fd === PFN_vkImportFenceFdKHR vkImportFenceFdKHR = 0; PFN_vkGetFenceFdKHR vkGetFenceFdKHR = 0; //=== VK_KHR_performance_query === PFN_vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR = 0; PFN_vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR = 0; PFN_vkAcquireProfilingLockKHR vkAcquireProfilingLockKHR = 0; PFN_vkReleaseProfilingLockKHR vkReleaseProfilingLockKHR = 0; //=== VK_KHR_get_surface_capabilities2 === PFN_vkGetPhysicalDeviceSurfaceCapabilities2KHR vkGetPhysicalDeviceSurfaceCapabilities2KHR = 0; PFN_vkGetPhysicalDeviceSurfaceFormats2KHR vkGetPhysicalDeviceSurfaceFormats2KHR = 0; //=== VK_KHR_get_display_properties2 === PFN_vkGetPhysicalDeviceDisplayProperties2KHR vkGetPhysicalDeviceDisplayProperties2KHR = 0; PFN_vkGetPhysicalDeviceDisplayPlaneProperties2KHR vkGetPhysicalDeviceDisplayPlaneProperties2KHR = 0; PFN_vkGetDisplayModeProperties2KHR vkGetDisplayModeProperties2KHR = 0; PFN_vkGetDisplayPlaneCapabilities2KHR vkGetDisplayPlaneCapabilities2KHR = 0; #if defined( VK_USE_PLATFORM_IOS_MVK ) //=== VK_MVK_ios_surface === PFN_vkCreateIOSSurfaceMVK vkCreateIOSSurfaceMVK = 0; #else PFN_dummy vkCreateIOSSurfaceMVK_placeholder = 0; #endif /*VK_USE_PLATFORM_IOS_MVK*/ #if defined( VK_USE_PLATFORM_MACOS_MVK ) //=== VK_MVK_macos_surface === PFN_vkCreateMacOSSurfaceMVK vkCreateMacOSSurfaceMVK = 0; #else PFN_dummy vkCreateMacOSSurfaceMVK_placeholder = 0; #endif /*VK_USE_PLATFORM_MACOS_MVK*/ //=== VK_EXT_debug_utils === PFN_vkSetDebugUtilsObjectNameEXT vkSetDebugUtilsObjectNameEXT = 0; PFN_vkSetDebugUtilsObjectTagEXT vkSetDebugUtilsObjectTagEXT = 0; PFN_vkQueueBeginDebugUtilsLabelEXT vkQueueBeginDebugUtilsLabelEXT = 0; PFN_vkQueueEndDebugUtilsLabelEXT vkQueueEndDebugUtilsLabelEXT = 0; PFN_vkQueueInsertDebugUtilsLabelEXT vkQueueInsertDebugUtilsLabelEXT = 0; PFN_vkCmdBeginDebugUtilsLabelEXT vkCmdBeginDebugUtilsLabelEXT = 0; PFN_vkCmdEndDebugUtilsLabelEXT vkCmdEndDebugUtilsLabelEXT = 0; PFN_vkCmdInsertDebugUtilsLabelEXT vkCmdInsertDebugUtilsLabelEXT = 0; PFN_vkCreateDebugUtilsMessengerEXT vkCreateDebugUtilsMessengerEXT = 0; PFN_vkDestroyDebugUtilsMessengerEXT vkDestroyDebugUtilsMessengerEXT = 0; PFN_vkSubmitDebugUtilsMessageEXT vkSubmitDebugUtilsMessageEXT = 0; #if defined( VK_USE_PLATFORM_ANDROID_KHR ) //=== VK_ANDROID_external_memory_android_hardware_buffer === PFN_vkGetAndroidHardwareBufferPropertiesANDROID vkGetAndroidHardwareBufferPropertiesANDROID = 0; PFN_vkGetMemoryAndroidHardwareBufferANDROID vkGetMemoryAndroidHardwareBufferANDROID = 0; #else PFN_dummy vkGetAndroidHardwareBufferPropertiesANDROID_placeholder = 0; PFN_dummy vkGetMemoryAndroidHardwareBufferANDROID_placeholder = 0; #endif /*VK_USE_PLATFORM_ANDROID_KHR*/ #if defined( VK_ENABLE_BETA_EXTENSIONS ) //=== VK_AMDX_shader_enqueue === PFN_vkCreateExecutionGraphPipelinesAMDX vkCreateExecutionGraphPipelinesAMDX = 0; PFN_vkGetExecutionGraphPipelineScratchSizeAMDX vkGetExecutionGraphPipelineScratchSizeAMDX = 0; PFN_vkGetExecutionGraphPipelineNodeIndexAMDX vkGetExecutionGraphPipelineNodeIndexAMDX = 0; PFN_vkCmdInitializeGraphScratchMemoryAMDX vkCmdInitializeGraphScratchMemoryAMDX = 0; PFN_vkCmdDispatchGraphAMDX vkCmdDispatchGraphAMDX = 0; PFN_vkCmdDispatchGraphIndirectAMDX vkCmdDispatchGraphIndirectAMDX = 0; PFN_vkCmdDispatchGraphIndirectCountAMDX vkCmdDispatchGraphIndirectCountAMDX = 0; #else PFN_dummy vkCreateExecutionGraphPipelinesAMDX_placeholder = 0; PFN_dummy vkGetExecutionGraphPipelineScratchSizeAMDX_placeholder = 0; PFN_dummy vkGetExecutionGraphPipelineNodeIndexAMDX_placeholder = 0; PFN_dummy vkCmdInitializeGraphScratchMemoryAMDX_placeholder = 0; PFN_dummy vkCmdDispatchGraphAMDX_placeholder = 0; PFN_dummy vkCmdDispatchGraphIndirectAMDX_placeholder = 0; PFN_dummy vkCmdDispatchGraphIndirectCountAMDX_placeholder = 0; #endif /*VK_ENABLE_BETA_EXTENSIONS*/ //=== VK_EXT_sample_locations === PFN_vkCmdSetSampleLocationsEXT vkCmdSetSampleLocationsEXT = 0; PFN_vkGetPhysicalDeviceMultisamplePropertiesEXT vkGetPhysicalDeviceMultisamplePropertiesEXT = 0; //=== VK_KHR_get_memory_requirements2 === PFN_vkGetImageMemoryRequirements2KHR vkGetImageMemoryRequirements2KHR = 0; PFN_vkGetBufferMemoryRequirements2KHR vkGetBufferMemoryRequirements2KHR = 0; PFN_vkGetImageSparseMemoryRequirements2KHR vkGetImageSparseMemoryRequirements2KHR = 0; //=== VK_KHR_acceleration_structure === PFN_vkCreateAccelerationStructureKHR vkCreateAccelerationStructureKHR = 0; PFN_vkDestroyAccelerationStructureKHR vkDestroyAccelerationStructureKHR = 0; PFN_vkCmdBuildAccelerationStructuresKHR vkCmdBuildAccelerationStructuresKHR = 0; PFN_vkCmdBuildAccelerationStructuresIndirectKHR vkCmdBuildAccelerationStructuresIndirectKHR = 0; PFN_vkBuildAccelerationStructuresKHR vkBuildAccelerationStructuresKHR = 0; PFN_vkCopyAccelerationStructureKHR vkCopyAccelerationStructureKHR = 0; PFN_vkCopyAccelerationStructureToMemoryKHR vkCopyAccelerationStructureToMemoryKHR = 0; PFN_vkCopyMemoryToAccelerationStructureKHR vkCopyMemoryToAccelerationStructureKHR = 0; PFN_vkWriteAccelerationStructuresPropertiesKHR vkWriteAccelerationStructuresPropertiesKHR = 0; PFN_vkCmdCopyAccelerationStructureKHR vkCmdCopyAccelerationStructureKHR = 0; PFN_vkCmdCopyAccelerationStructureToMemoryKHR vkCmdCopyAccelerationStructureToMemoryKHR = 0; PFN_vkCmdCopyMemoryToAccelerationStructureKHR vkCmdCopyMemoryToAccelerationStructureKHR = 0; PFN_vkGetAccelerationStructureDeviceAddressKHR vkGetAccelerationStructureDeviceAddressKHR = 0; PFN_vkCmdWriteAccelerationStructuresPropertiesKHR vkCmdWriteAccelerationStructuresPropertiesKHR = 0; PFN_vkGetDeviceAccelerationStructureCompatibilityKHR vkGetDeviceAccelerationStructureCompatibilityKHR = 0; PFN_vkGetAccelerationStructureBuildSizesKHR vkGetAccelerationStructureBuildSizesKHR = 0; //=== VK_KHR_ray_tracing_pipeline === PFN_vkCmdTraceRaysKHR vkCmdTraceRaysKHR = 0; PFN_vkCreateRayTracingPipelinesKHR vkCreateRayTracingPipelinesKHR = 0; PFN_vkGetRayTracingShaderGroupHandlesKHR vkGetRayTracingShaderGroupHandlesKHR = 0; PFN_vkGetRayTracingCaptureReplayShaderGroupHandlesKHR vkGetRayTracingCaptureReplayShaderGroupHandlesKHR = 0; PFN_vkCmdTraceRaysIndirectKHR vkCmdTraceRaysIndirectKHR = 0; PFN_vkGetRayTracingShaderGroupStackSizeKHR vkGetRayTracingShaderGroupStackSizeKHR = 0; PFN_vkCmdSetRayTracingPipelineStackSizeKHR vkCmdSetRayTracingPipelineStackSizeKHR = 0; //=== VK_KHR_sampler_ycbcr_conversion === PFN_vkCreateSamplerYcbcrConversionKHR vkCreateSamplerYcbcrConversionKHR = 0; PFN_vkDestroySamplerYcbcrConversionKHR vkDestroySamplerYcbcrConversionKHR = 0; //=== VK_KHR_bind_memory2 === PFN_vkBindBufferMemory2KHR vkBindBufferMemory2KHR = 0; PFN_vkBindImageMemory2KHR vkBindImageMemory2KHR = 0; //=== VK_EXT_image_drm_format_modifier === PFN_vkGetImageDrmFormatModifierPropertiesEXT vkGetImageDrmFormatModifierPropertiesEXT = 0; //=== VK_EXT_validation_cache === PFN_vkCreateValidationCacheEXT vkCreateValidationCacheEXT = 0; PFN_vkDestroyValidationCacheEXT vkDestroyValidationCacheEXT = 0; PFN_vkMergeValidationCachesEXT vkMergeValidationCachesEXT = 0; PFN_vkGetValidationCacheDataEXT vkGetValidationCacheDataEXT = 0; //=== VK_NV_shading_rate_image === PFN_vkCmdBindShadingRateImageNV vkCmdBindShadingRateImageNV = 0; PFN_vkCmdSetViewportShadingRatePaletteNV vkCmdSetViewportShadingRatePaletteNV = 0; PFN_vkCmdSetCoarseSampleOrderNV vkCmdSetCoarseSampleOrderNV = 0; //=== VK_NV_ray_tracing === PFN_vkCreateAccelerationStructureNV vkCreateAccelerationStructureNV = 0; PFN_vkDestroyAccelerationStructureNV vkDestroyAccelerationStructureNV = 0; PFN_vkGetAccelerationStructureMemoryRequirementsNV vkGetAccelerationStructureMemoryRequirementsNV = 0; PFN_vkBindAccelerationStructureMemoryNV vkBindAccelerationStructureMemoryNV = 0; PFN_vkCmdBuildAccelerationStructureNV vkCmdBuildAccelerationStructureNV = 0; PFN_vkCmdCopyAccelerationStructureNV vkCmdCopyAccelerationStructureNV = 0; PFN_vkCmdTraceRaysNV vkCmdTraceRaysNV = 0; PFN_vkCreateRayTracingPipelinesNV vkCreateRayTracingPipelinesNV = 0; PFN_vkGetRayTracingShaderGroupHandlesNV vkGetRayTracingShaderGroupHandlesNV = 0; PFN_vkGetAccelerationStructureHandleNV vkGetAccelerationStructureHandleNV = 0; PFN_vkCmdWriteAccelerationStructuresPropertiesNV vkCmdWriteAccelerationStructuresPropertiesNV = 0; PFN_vkCompileDeferredNV vkCompileDeferredNV = 0; //=== VK_KHR_maintenance3 === PFN_vkGetDescriptorSetLayoutSupportKHR vkGetDescriptorSetLayoutSupportKHR = 0; //=== VK_KHR_draw_indirect_count === PFN_vkCmdDrawIndirectCountKHR vkCmdDrawIndirectCountKHR = 0; PFN_vkCmdDrawIndexedIndirectCountKHR vkCmdDrawIndexedIndirectCountKHR = 0; //=== VK_EXT_external_memory_host === PFN_vkGetMemoryHostPointerPropertiesEXT vkGetMemoryHostPointerPropertiesEXT = 0; //=== VK_AMD_buffer_marker === PFN_vkCmdWriteBufferMarkerAMD vkCmdWriteBufferMarkerAMD = 0; PFN_vkCmdWriteBufferMarker2AMD vkCmdWriteBufferMarker2AMD = 0; //=== VK_EXT_calibrated_timestamps === PFN_vkGetPhysicalDeviceCalibrateableTimeDomainsEXT vkGetPhysicalDeviceCalibrateableTimeDomainsEXT = 0; PFN_vkGetCalibratedTimestampsEXT vkGetCalibratedTimestampsEXT = 0; //=== VK_NV_mesh_shader === PFN_vkCmdDrawMeshTasksNV vkCmdDrawMeshTasksNV = 0; PFN_vkCmdDrawMeshTasksIndirectNV vkCmdDrawMeshTasksIndirectNV = 0; PFN_vkCmdDrawMeshTasksIndirectCountNV vkCmdDrawMeshTasksIndirectCountNV = 0; //=== VK_NV_scissor_exclusive === PFN_vkCmdSetExclusiveScissorEnableNV vkCmdSetExclusiveScissorEnableNV = 0; PFN_vkCmdSetExclusiveScissorNV vkCmdSetExclusiveScissorNV = 0; //=== VK_NV_device_diagnostic_checkpoints === PFN_vkCmdSetCheckpointNV vkCmdSetCheckpointNV = 0; PFN_vkGetQueueCheckpointDataNV vkGetQueueCheckpointDataNV = 0; PFN_vkGetQueueCheckpointData2NV vkGetQueueCheckpointData2NV = 0; //=== VK_KHR_timeline_semaphore === PFN_vkGetSemaphoreCounterValueKHR vkGetSemaphoreCounterValueKHR = 0; PFN_vkWaitSemaphoresKHR vkWaitSemaphoresKHR = 0; PFN_vkSignalSemaphoreKHR vkSignalSemaphoreKHR = 0; //=== VK_INTEL_performance_query === PFN_vkInitializePerformanceApiINTEL vkInitializePerformanceApiINTEL = 0; PFN_vkUninitializePerformanceApiINTEL vkUninitializePerformanceApiINTEL = 0; PFN_vkCmdSetPerformanceMarkerINTEL vkCmdSetPerformanceMarkerINTEL = 0; PFN_vkCmdSetPerformanceStreamMarkerINTEL vkCmdSetPerformanceStreamMarkerINTEL = 0; PFN_vkCmdSetPerformanceOverrideINTEL vkCmdSetPerformanceOverrideINTEL = 0; PFN_vkAcquirePerformanceConfigurationINTEL vkAcquirePerformanceConfigurationINTEL = 0; PFN_vkReleasePerformanceConfigurationINTEL vkReleasePerformanceConfigurationINTEL = 0; PFN_vkQueueSetPerformanceConfigurationINTEL vkQueueSetPerformanceConfigurationINTEL = 0; PFN_vkGetPerformanceParameterINTEL vkGetPerformanceParameterINTEL = 0; //=== VK_AMD_display_native_hdr === PFN_vkSetLocalDimmingAMD vkSetLocalDimmingAMD = 0; #if defined( VK_USE_PLATFORM_FUCHSIA ) //=== VK_FUCHSIA_imagepipe_surface === PFN_vkCreateImagePipeSurfaceFUCHSIA vkCreateImagePipeSurfaceFUCHSIA = 0; #else PFN_dummy vkCreateImagePipeSurfaceFUCHSIA_placeholder = 0; #endif /*VK_USE_PLATFORM_FUCHSIA*/ #if defined( VK_USE_PLATFORM_METAL_EXT ) //=== VK_EXT_metal_surface === PFN_vkCreateMetalSurfaceEXT vkCreateMetalSurfaceEXT = 0; #else PFN_dummy vkCreateMetalSurfaceEXT_placeholder = 0; #endif /*VK_USE_PLATFORM_METAL_EXT*/ //=== VK_KHR_fragment_shading_rate === PFN_vkGetPhysicalDeviceFragmentShadingRatesKHR vkGetPhysicalDeviceFragmentShadingRatesKHR = 0; PFN_vkCmdSetFragmentShadingRateKHR vkCmdSetFragmentShadingRateKHR = 0; //=== VK_KHR_dynamic_rendering_local_read === PFN_vkCmdSetRenderingAttachmentLocationsKHR vkCmdSetRenderingAttachmentLocationsKHR = 0; PFN_vkCmdSetRenderingInputAttachmentIndicesKHR vkCmdSetRenderingInputAttachmentIndicesKHR = 0; //=== VK_EXT_buffer_device_address === PFN_vkGetBufferDeviceAddressEXT vkGetBufferDeviceAddressEXT = 0; //=== VK_EXT_tooling_info === PFN_vkGetPhysicalDeviceToolPropertiesEXT vkGetPhysicalDeviceToolPropertiesEXT = 0; //=== VK_KHR_present_wait === PFN_vkWaitForPresentKHR vkWaitForPresentKHR = 0; //=== VK_NV_cooperative_matrix === PFN_vkGetPhysicalDeviceCooperativeMatrixPropertiesNV vkGetPhysicalDeviceCooperativeMatrixPropertiesNV = 0; //=== VK_NV_coverage_reduction_mode === PFN_vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV = 0; #if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_EXT_full_screen_exclusive === PFN_vkGetPhysicalDeviceSurfacePresentModes2EXT vkGetPhysicalDeviceSurfacePresentModes2EXT = 0; PFN_vkAcquireFullScreenExclusiveModeEXT vkAcquireFullScreenExclusiveModeEXT = 0; PFN_vkReleaseFullScreenExclusiveModeEXT vkReleaseFullScreenExclusiveModeEXT = 0; PFN_vkGetDeviceGroupSurfacePresentModes2EXT vkGetDeviceGroupSurfacePresentModes2EXT = 0; #else PFN_dummy vkGetPhysicalDeviceSurfacePresentModes2EXT_placeholder = 0; PFN_dummy vkAcquireFullScreenExclusiveModeEXT_placeholder = 0; PFN_dummy vkReleaseFullScreenExclusiveModeEXT_placeholder = 0; PFN_dummy vkGetDeviceGroupSurfacePresentModes2EXT_placeholder = 0; #endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_EXT_headless_surface === PFN_vkCreateHeadlessSurfaceEXT vkCreateHeadlessSurfaceEXT = 0; //=== VK_KHR_buffer_device_address === PFN_vkGetBufferDeviceAddressKHR vkGetBufferDeviceAddressKHR = 0; PFN_vkGetBufferOpaqueCaptureAddressKHR vkGetBufferOpaqueCaptureAddressKHR = 0; PFN_vkGetDeviceMemoryOpaqueCaptureAddressKHR vkGetDeviceMemoryOpaqueCaptureAddressKHR = 0; //=== VK_EXT_line_rasterization === PFN_vkCmdSetLineStippleEXT vkCmdSetLineStippleEXT = 0; //=== VK_EXT_host_query_reset === PFN_vkResetQueryPoolEXT vkResetQueryPoolEXT = 0; //=== VK_EXT_extended_dynamic_state === PFN_vkCmdSetCullModeEXT vkCmdSetCullModeEXT = 0; PFN_vkCmdSetFrontFaceEXT vkCmdSetFrontFaceEXT = 0; PFN_vkCmdSetPrimitiveTopologyEXT vkCmdSetPrimitiveTopologyEXT = 0; PFN_vkCmdSetViewportWithCountEXT vkCmdSetViewportWithCountEXT = 0; PFN_vkCmdSetScissorWithCountEXT vkCmdSetScissorWithCountEXT = 0; PFN_vkCmdBindVertexBuffers2EXT vkCmdBindVertexBuffers2EXT = 0; PFN_vkCmdSetDepthTestEnableEXT vkCmdSetDepthTestEnableEXT = 0; PFN_vkCmdSetDepthWriteEnableEXT vkCmdSetDepthWriteEnableEXT = 0; PFN_vkCmdSetDepthCompareOpEXT vkCmdSetDepthCompareOpEXT = 0; PFN_vkCmdSetDepthBoundsTestEnableEXT vkCmdSetDepthBoundsTestEnableEXT = 0; PFN_vkCmdSetStencilTestEnableEXT vkCmdSetStencilTestEnableEXT = 0; PFN_vkCmdSetStencilOpEXT vkCmdSetStencilOpEXT = 0; //=== VK_KHR_deferred_host_operations === PFN_vkCreateDeferredOperationKHR vkCreateDeferredOperationKHR = 0; PFN_vkDestroyDeferredOperationKHR vkDestroyDeferredOperationKHR = 0; PFN_vkGetDeferredOperationMaxConcurrencyKHR vkGetDeferredOperationMaxConcurrencyKHR = 0; PFN_vkGetDeferredOperationResultKHR vkGetDeferredOperationResultKHR = 0; PFN_vkDeferredOperationJoinKHR vkDeferredOperationJoinKHR = 0; //=== VK_KHR_pipeline_executable_properties === PFN_vkGetPipelineExecutablePropertiesKHR vkGetPipelineExecutablePropertiesKHR = 0; PFN_vkGetPipelineExecutableStatisticsKHR vkGetPipelineExecutableStatisticsKHR = 0; PFN_vkGetPipelineExecutableInternalRepresentationsKHR vkGetPipelineExecutableInternalRepresentationsKHR = 0; //=== VK_EXT_host_image_copy === PFN_vkCopyMemoryToImageEXT vkCopyMemoryToImageEXT = 0; PFN_vkCopyImageToMemoryEXT vkCopyImageToMemoryEXT = 0; PFN_vkCopyImageToImageEXT vkCopyImageToImageEXT = 0; PFN_vkTransitionImageLayoutEXT vkTransitionImageLayoutEXT = 0; PFN_vkGetImageSubresourceLayout2EXT vkGetImageSubresourceLayout2EXT = 0; //=== VK_KHR_map_memory2 === PFN_vkMapMemory2KHR vkMapMemory2KHR = 0; PFN_vkUnmapMemory2KHR vkUnmapMemory2KHR = 0; //=== VK_EXT_swapchain_maintenance1 === PFN_vkReleaseSwapchainImagesEXT vkReleaseSwapchainImagesEXT = 0; //=== VK_NV_device_generated_commands === PFN_vkGetGeneratedCommandsMemoryRequirementsNV vkGetGeneratedCommandsMemoryRequirementsNV = 0; PFN_vkCmdPreprocessGeneratedCommandsNV vkCmdPreprocessGeneratedCommandsNV = 0; PFN_vkCmdExecuteGeneratedCommandsNV vkCmdExecuteGeneratedCommandsNV = 0; PFN_vkCmdBindPipelineShaderGroupNV vkCmdBindPipelineShaderGroupNV = 0; PFN_vkCreateIndirectCommandsLayoutNV vkCreateIndirectCommandsLayoutNV = 0; PFN_vkDestroyIndirectCommandsLayoutNV vkDestroyIndirectCommandsLayoutNV = 0; //=== VK_EXT_depth_bias_control === PFN_vkCmdSetDepthBias2EXT vkCmdSetDepthBias2EXT = 0; //=== VK_EXT_acquire_drm_display === PFN_vkAcquireDrmDisplayEXT vkAcquireDrmDisplayEXT = 0; PFN_vkGetDrmDisplayEXT vkGetDrmDisplayEXT = 0; //=== VK_EXT_private_data === PFN_vkCreatePrivateDataSlotEXT vkCreatePrivateDataSlotEXT = 0; PFN_vkDestroyPrivateDataSlotEXT vkDestroyPrivateDataSlotEXT = 0; PFN_vkSetPrivateDataEXT vkSetPrivateDataEXT = 0; PFN_vkGetPrivateDataEXT vkGetPrivateDataEXT = 0; //=== VK_KHR_video_encode_queue === PFN_vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR = 0; PFN_vkGetEncodedVideoSessionParametersKHR vkGetEncodedVideoSessionParametersKHR = 0; PFN_vkCmdEncodeVideoKHR vkCmdEncodeVideoKHR = 0; #if defined( VK_ENABLE_BETA_EXTENSIONS ) //=== VK_NV_cuda_kernel_launch === PFN_vkCreateCudaModuleNV vkCreateCudaModuleNV = 0; PFN_vkGetCudaModuleCacheNV vkGetCudaModuleCacheNV = 0; PFN_vkCreateCudaFunctionNV vkCreateCudaFunctionNV = 0; PFN_vkDestroyCudaModuleNV vkDestroyCudaModuleNV = 0; PFN_vkDestroyCudaFunctionNV vkDestroyCudaFunctionNV = 0; PFN_vkCmdCudaLaunchKernelNV vkCmdCudaLaunchKernelNV = 0; #else PFN_dummy vkCreateCudaModuleNV_placeholder = 0; PFN_dummy vkGetCudaModuleCacheNV_placeholder = 0; PFN_dummy vkCreateCudaFunctionNV_placeholder = 0; PFN_dummy vkDestroyCudaModuleNV_placeholder = 0; PFN_dummy vkDestroyCudaFunctionNV_placeholder = 0; PFN_dummy vkCmdCudaLaunchKernelNV_placeholder = 0; #endif /*VK_ENABLE_BETA_EXTENSIONS*/ #if defined( VK_USE_PLATFORM_METAL_EXT ) //=== VK_EXT_metal_objects === PFN_vkExportMetalObjectsEXT vkExportMetalObjectsEXT = 0; #else PFN_dummy vkExportMetalObjectsEXT_placeholder = 0; #endif /*VK_USE_PLATFORM_METAL_EXT*/ //=== VK_KHR_synchronization2 === PFN_vkCmdSetEvent2KHR vkCmdSetEvent2KHR = 0; PFN_vkCmdResetEvent2KHR vkCmdResetEvent2KHR = 0; PFN_vkCmdWaitEvents2KHR vkCmdWaitEvents2KHR = 0; PFN_vkCmdPipelineBarrier2KHR vkCmdPipelineBarrier2KHR = 0; PFN_vkCmdWriteTimestamp2KHR vkCmdWriteTimestamp2KHR = 0; PFN_vkQueueSubmit2KHR vkQueueSubmit2KHR = 0; //=== VK_EXT_descriptor_buffer === PFN_vkGetDescriptorSetLayoutSizeEXT vkGetDescriptorSetLayoutSizeEXT = 0; PFN_vkGetDescriptorSetLayoutBindingOffsetEXT vkGetDescriptorSetLayoutBindingOffsetEXT = 0; PFN_vkGetDescriptorEXT vkGetDescriptorEXT = 0; PFN_vkCmdBindDescriptorBuffersEXT vkCmdBindDescriptorBuffersEXT = 0; PFN_vkCmdSetDescriptorBufferOffsetsEXT vkCmdSetDescriptorBufferOffsetsEXT = 0; PFN_vkCmdBindDescriptorBufferEmbeddedSamplersEXT vkCmdBindDescriptorBufferEmbeddedSamplersEXT = 0; PFN_vkGetBufferOpaqueCaptureDescriptorDataEXT vkGetBufferOpaqueCaptureDescriptorDataEXT = 0; PFN_vkGetImageOpaqueCaptureDescriptorDataEXT vkGetImageOpaqueCaptureDescriptorDataEXT = 0; PFN_vkGetImageViewOpaqueCaptureDescriptorDataEXT vkGetImageViewOpaqueCaptureDescriptorDataEXT = 0; PFN_vkGetSamplerOpaqueCaptureDescriptorDataEXT vkGetSamplerOpaqueCaptureDescriptorDataEXT = 0; PFN_vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT = 0; //=== VK_NV_fragment_shading_rate_enums === PFN_vkCmdSetFragmentShadingRateEnumNV vkCmdSetFragmentShadingRateEnumNV = 0; //=== VK_EXT_mesh_shader === PFN_vkCmdDrawMeshTasksEXT vkCmdDrawMeshTasksEXT = 0; PFN_vkCmdDrawMeshTasksIndirectEXT vkCmdDrawMeshTasksIndirectEXT = 0; PFN_vkCmdDrawMeshTasksIndirectCountEXT vkCmdDrawMeshTasksIndirectCountEXT = 0; //=== VK_KHR_copy_commands2 === PFN_vkCmdCopyBuffer2KHR vkCmdCopyBuffer2KHR = 0; PFN_vkCmdCopyImage2KHR vkCmdCopyImage2KHR = 0; PFN_vkCmdCopyBufferToImage2KHR vkCmdCopyBufferToImage2KHR = 0; PFN_vkCmdCopyImageToBuffer2KHR vkCmdCopyImageToBuffer2KHR = 0; PFN_vkCmdBlitImage2KHR vkCmdBlitImage2KHR = 0; PFN_vkCmdResolveImage2KHR vkCmdResolveImage2KHR = 0; //=== VK_EXT_device_fault === PFN_vkGetDeviceFaultInfoEXT vkGetDeviceFaultInfoEXT = 0; #if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_NV_acquire_winrt_display === PFN_vkAcquireWinrtDisplayNV vkAcquireWinrtDisplayNV = 0; PFN_vkGetWinrtDisplayNV vkGetWinrtDisplayNV = 0; #else PFN_dummy vkAcquireWinrtDisplayNV_placeholder = 0; PFN_dummy vkGetWinrtDisplayNV_placeholder = 0; #endif /*VK_USE_PLATFORM_WIN32_KHR*/ #if defined( VK_USE_PLATFORM_DIRECTFB_EXT ) //=== VK_EXT_directfb_surface === PFN_vkCreateDirectFBSurfaceEXT vkCreateDirectFBSurfaceEXT = 0; PFN_vkGetPhysicalDeviceDirectFBPresentationSupportEXT vkGetPhysicalDeviceDirectFBPresentationSupportEXT = 0; #else PFN_dummy vkCreateDirectFBSurfaceEXT_placeholder = 0; PFN_dummy vkGetPhysicalDeviceDirectFBPresentationSupportEXT_placeholder = 0; #endif /*VK_USE_PLATFORM_DIRECTFB_EXT*/ //=== VK_EXT_vertex_input_dynamic_state === PFN_vkCmdSetVertexInputEXT vkCmdSetVertexInputEXT = 0; #if defined( VK_USE_PLATFORM_FUCHSIA ) //=== VK_FUCHSIA_external_memory === PFN_vkGetMemoryZirconHandleFUCHSIA vkGetMemoryZirconHandleFUCHSIA = 0; PFN_vkGetMemoryZirconHandlePropertiesFUCHSIA vkGetMemoryZirconHandlePropertiesFUCHSIA = 0; #else PFN_dummy vkGetMemoryZirconHandleFUCHSIA_placeholder = 0; PFN_dummy vkGetMemoryZirconHandlePropertiesFUCHSIA_placeholder = 0; #endif /*VK_USE_PLATFORM_FUCHSIA*/ #if defined( VK_USE_PLATFORM_FUCHSIA ) //=== VK_FUCHSIA_external_semaphore === PFN_vkImportSemaphoreZirconHandleFUCHSIA vkImportSemaphoreZirconHandleFUCHSIA = 0; PFN_vkGetSemaphoreZirconHandleFUCHSIA vkGetSemaphoreZirconHandleFUCHSIA = 0; #else PFN_dummy vkImportSemaphoreZirconHandleFUCHSIA_placeholder = 0; PFN_dummy vkGetSemaphoreZirconHandleFUCHSIA_placeholder = 0; #endif /*VK_USE_PLATFORM_FUCHSIA*/ #if defined( VK_USE_PLATFORM_FUCHSIA ) //=== VK_FUCHSIA_buffer_collection === PFN_vkCreateBufferCollectionFUCHSIA vkCreateBufferCollectionFUCHSIA = 0; PFN_vkSetBufferCollectionImageConstraintsFUCHSIA vkSetBufferCollectionImageConstraintsFUCHSIA = 0; PFN_vkSetBufferCollectionBufferConstraintsFUCHSIA vkSetBufferCollectionBufferConstraintsFUCHSIA = 0; PFN_vkDestroyBufferCollectionFUCHSIA vkDestroyBufferCollectionFUCHSIA = 0; PFN_vkGetBufferCollectionPropertiesFUCHSIA vkGetBufferCollectionPropertiesFUCHSIA = 0; #else PFN_dummy vkCreateBufferCollectionFUCHSIA_placeholder = 0; PFN_dummy vkSetBufferCollectionImageConstraintsFUCHSIA_placeholder = 0; PFN_dummy vkSetBufferCollectionBufferConstraintsFUCHSIA_placeholder = 0; PFN_dummy vkDestroyBufferCollectionFUCHSIA_placeholder = 0; PFN_dummy vkGetBufferCollectionPropertiesFUCHSIA_placeholder = 0; #endif /*VK_USE_PLATFORM_FUCHSIA*/ //=== VK_HUAWEI_subpass_shading === PFN_vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI = 0; PFN_vkCmdSubpassShadingHUAWEI vkCmdSubpassShadingHUAWEI = 0; //=== VK_HUAWEI_invocation_mask === PFN_vkCmdBindInvocationMaskHUAWEI vkCmdBindInvocationMaskHUAWEI = 0; //=== VK_NV_external_memory_rdma === PFN_vkGetMemoryRemoteAddressNV vkGetMemoryRemoteAddressNV = 0; //=== VK_EXT_pipeline_properties === PFN_vkGetPipelinePropertiesEXT vkGetPipelinePropertiesEXT = 0; //=== VK_EXT_extended_dynamic_state2 === PFN_vkCmdSetPatchControlPointsEXT vkCmdSetPatchControlPointsEXT = 0; PFN_vkCmdSetRasterizerDiscardEnableEXT vkCmdSetRasterizerDiscardEnableEXT = 0; PFN_vkCmdSetDepthBiasEnableEXT vkCmdSetDepthBiasEnableEXT = 0; PFN_vkCmdSetLogicOpEXT vkCmdSetLogicOpEXT = 0; PFN_vkCmdSetPrimitiveRestartEnableEXT vkCmdSetPrimitiveRestartEnableEXT = 0; #if defined( VK_USE_PLATFORM_SCREEN_QNX ) //=== VK_QNX_screen_surface === PFN_vkCreateScreenSurfaceQNX vkCreateScreenSurfaceQNX = 0; PFN_vkGetPhysicalDeviceScreenPresentationSupportQNX vkGetPhysicalDeviceScreenPresentationSupportQNX = 0; #else PFN_dummy vkCreateScreenSurfaceQNX_placeholder = 0; PFN_dummy vkGetPhysicalDeviceScreenPresentationSupportQNX_placeholder = 0; #endif /*VK_USE_PLATFORM_SCREEN_QNX*/ //=== VK_EXT_color_write_enable === PFN_vkCmdSetColorWriteEnableEXT vkCmdSetColorWriteEnableEXT = 0; //=== VK_KHR_ray_tracing_maintenance1 === PFN_vkCmdTraceRaysIndirect2KHR vkCmdTraceRaysIndirect2KHR = 0; //=== VK_EXT_multi_draw === PFN_vkCmdDrawMultiEXT vkCmdDrawMultiEXT = 0; PFN_vkCmdDrawMultiIndexedEXT vkCmdDrawMultiIndexedEXT = 0; //=== VK_EXT_opacity_micromap === PFN_vkCreateMicromapEXT vkCreateMicromapEXT = 0; PFN_vkDestroyMicromapEXT vkDestroyMicromapEXT = 0; PFN_vkCmdBuildMicromapsEXT vkCmdBuildMicromapsEXT = 0; PFN_vkBuildMicromapsEXT vkBuildMicromapsEXT = 0; PFN_vkCopyMicromapEXT vkCopyMicromapEXT = 0; PFN_vkCopyMicromapToMemoryEXT vkCopyMicromapToMemoryEXT = 0; PFN_vkCopyMemoryToMicromapEXT vkCopyMemoryToMicromapEXT = 0; PFN_vkWriteMicromapsPropertiesEXT vkWriteMicromapsPropertiesEXT = 0; PFN_vkCmdCopyMicromapEXT vkCmdCopyMicromapEXT = 0; PFN_vkCmdCopyMicromapToMemoryEXT vkCmdCopyMicromapToMemoryEXT = 0; PFN_vkCmdCopyMemoryToMicromapEXT vkCmdCopyMemoryToMicromapEXT = 0; PFN_vkCmdWriteMicromapsPropertiesEXT vkCmdWriteMicromapsPropertiesEXT = 0; PFN_vkGetDeviceMicromapCompatibilityEXT vkGetDeviceMicromapCompatibilityEXT = 0; PFN_vkGetMicromapBuildSizesEXT vkGetMicromapBuildSizesEXT = 0; //=== VK_HUAWEI_cluster_culling_shader === PFN_vkCmdDrawClusterHUAWEI vkCmdDrawClusterHUAWEI = 0; PFN_vkCmdDrawClusterIndirectHUAWEI vkCmdDrawClusterIndirectHUAWEI = 0; //=== VK_EXT_pageable_device_local_memory === PFN_vkSetDeviceMemoryPriorityEXT vkSetDeviceMemoryPriorityEXT = 0; //=== VK_KHR_maintenance4 === PFN_vkGetDeviceBufferMemoryRequirementsKHR vkGetDeviceBufferMemoryRequirementsKHR = 0; PFN_vkGetDeviceImageMemoryRequirementsKHR vkGetDeviceImageMemoryRequirementsKHR = 0; PFN_vkGetDeviceImageSparseMemoryRequirementsKHR vkGetDeviceImageSparseMemoryRequirementsKHR = 0; //=== VK_VALVE_descriptor_set_host_mapping === PFN_vkGetDescriptorSetLayoutHostMappingInfoVALVE vkGetDescriptorSetLayoutHostMappingInfoVALVE = 0; PFN_vkGetDescriptorSetHostMappingVALVE vkGetDescriptorSetHostMappingVALVE = 0; //=== VK_NV_copy_memory_indirect === PFN_vkCmdCopyMemoryIndirectNV vkCmdCopyMemoryIndirectNV = 0; PFN_vkCmdCopyMemoryToImageIndirectNV vkCmdCopyMemoryToImageIndirectNV = 0; //=== VK_NV_memory_decompression === PFN_vkCmdDecompressMemoryNV vkCmdDecompressMemoryNV = 0; PFN_vkCmdDecompressMemoryIndirectCountNV vkCmdDecompressMemoryIndirectCountNV = 0; //=== VK_NV_device_generated_commands_compute === PFN_vkGetPipelineIndirectMemoryRequirementsNV vkGetPipelineIndirectMemoryRequirementsNV = 0; PFN_vkCmdUpdatePipelineIndirectBufferNV vkCmdUpdatePipelineIndirectBufferNV = 0; PFN_vkGetPipelineIndirectDeviceAddressNV vkGetPipelineIndirectDeviceAddressNV = 0; //=== VK_EXT_extended_dynamic_state3 === PFN_vkCmdSetDepthClampEnableEXT vkCmdSetDepthClampEnableEXT = 0; PFN_vkCmdSetPolygonModeEXT vkCmdSetPolygonModeEXT = 0; PFN_vkCmdSetRasterizationSamplesEXT vkCmdSetRasterizationSamplesEXT = 0; PFN_vkCmdSetSampleMaskEXT vkCmdSetSampleMaskEXT = 0; PFN_vkCmdSetAlphaToCoverageEnableEXT vkCmdSetAlphaToCoverageEnableEXT = 0; PFN_vkCmdSetAlphaToOneEnableEXT vkCmdSetAlphaToOneEnableEXT = 0; PFN_vkCmdSetLogicOpEnableEXT vkCmdSetLogicOpEnableEXT = 0; PFN_vkCmdSetColorBlendEnableEXT vkCmdSetColorBlendEnableEXT = 0; PFN_vkCmdSetColorBlendEquationEXT vkCmdSetColorBlendEquationEXT = 0; PFN_vkCmdSetColorWriteMaskEXT vkCmdSetColorWriteMaskEXT = 0; PFN_vkCmdSetTessellationDomainOriginEXT vkCmdSetTessellationDomainOriginEXT = 0; PFN_vkCmdSetRasterizationStreamEXT vkCmdSetRasterizationStreamEXT = 0; PFN_vkCmdSetConservativeRasterizationModeEXT vkCmdSetConservativeRasterizationModeEXT = 0; PFN_vkCmdSetExtraPrimitiveOverestimationSizeEXT vkCmdSetExtraPrimitiveOverestimationSizeEXT = 0; PFN_vkCmdSetDepthClipEnableEXT vkCmdSetDepthClipEnableEXT = 0; PFN_vkCmdSetSampleLocationsEnableEXT vkCmdSetSampleLocationsEnableEXT = 0; PFN_vkCmdSetColorBlendAdvancedEXT vkCmdSetColorBlendAdvancedEXT = 0; PFN_vkCmdSetProvokingVertexModeEXT vkCmdSetProvokingVertexModeEXT = 0; PFN_vkCmdSetLineRasterizationModeEXT vkCmdSetLineRasterizationModeEXT = 0; PFN_vkCmdSetLineStippleEnableEXT vkCmdSetLineStippleEnableEXT = 0; PFN_vkCmdSetDepthClipNegativeOneToOneEXT vkCmdSetDepthClipNegativeOneToOneEXT = 0; PFN_vkCmdSetViewportWScalingEnableNV vkCmdSetViewportWScalingEnableNV = 0; PFN_vkCmdSetViewportSwizzleNV vkCmdSetViewportSwizzleNV = 0; PFN_vkCmdSetCoverageToColorEnableNV vkCmdSetCoverageToColorEnableNV = 0; PFN_vkCmdSetCoverageToColorLocationNV vkCmdSetCoverageToColorLocationNV = 0; PFN_vkCmdSetCoverageModulationModeNV vkCmdSetCoverageModulationModeNV = 0; PFN_vkCmdSetCoverageModulationTableEnableNV vkCmdSetCoverageModulationTableEnableNV = 0; PFN_vkCmdSetCoverageModulationTableNV vkCmdSetCoverageModulationTableNV = 0; PFN_vkCmdSetShadingRateImageEnableNV vkCmdSetShadingRateImageEnableNV = 0; PFN_vkCmdSetRepresentativeFragmentTestEnableNV vkCmdSetRepresentativeFragmentTestEnableNV = 0; PFN_vkCmdSetCoverageReductionModeNV vkCmdSetCoverageReductionModeNV = 0; //=== VK_EXT_shader_module_identifier === PFN_vkGetShaderModuleIdentifierEXT vkGetShaderModuleIdentifierEXT = 0; PFN_vkGetShaderModuleCreateInfoIdentifierEXT vkGetShaderModuleCreateInfoIdentifierEXT = 0; //=== VK_NV_optical_flow === PFN_vkGetPhysicalDeviceOpticalFlowImageFormatsNV vkGetPhysicalDeviceOpticalFlowImageFormatsNV = 0; PFN_vkCreateOpticalFlowSessionNV vkCreateOpticalFlowSessionNV = 0; PFN_vkDestroyOpticalFlowSessionNV vkDestroyOpticalFlowSessionNV = 0; PFN_vkBindOpticalFlowSessionImageNV vkBindOpticalFlowSessionImageNV = 0; PFN_vkCmdOpticalFlowExecuteNV vkCmdOpticalFlowExecuteNV = 0; //=== VK_KHR_maintenance5 === PFN_vkCmdBindIndexBuffer2KHR vkCmdBindIndexBuffer2KHR = 0; PFN_vkGetRenderingAreaGranularityKHR vkGetRenderingAreaGranularityKHR = 0; PFN_vkGetDeviceImageSubresourceLayoutKHR vkGetDeviceImageSubresourceLayoutKHR = 0; PFN_vkGetImageSubresourceLayout2KHR vkGetImageSubresourceLayout2KHR = 0; //=== VK_AMD_anti_lag === PFN_vkAntiLagUpdateAMD vkAntiLagUpdateAMD = 0; //=== VK_EXT_shader_object === PFN_vkCreateShadersEXT vkCreateShadersEXT = 0; PFN_vkDestroyShaderEXT vkDestroyShaderEXT = 0; PFN_vkGetShaderBinaryDataEXT vkGetShaderBinaryDataEXT = 0; PFN_vkCmdBindShadersEXT vkCmdBindShadersEXT = 0; PFN_vkCmdSetDepthClampRangeEXT vkCmdSetDepthClampRangeEXT = 0; //=== VK_KHR_pipeline_binary === PFN_vkCreatePipelineBinariesKHR vkCreatePipelineBinariesKHR = 0; PFN_vkDestroyPipelineBinaryKHR vkDestroyPipelineBinaryKHR = 0; PFN_vkGetPipelineKeyKHR vkGetPipelineKeyKHR = 0; PFN_vkGetPipelineBinaryDataKHR vkGetPipelineBinaryDataKHR = 0; PFN_vkReleaseCapturedPipelineDataKHR vkReleaseCapturedPipelineDataKHR = 0; //=== VK_QCOM_tile_properties === PFN_vkGetFramebufferTilePropertiesQCOM vkGetFramebufferTilePropertiesQCOM = 0; PFN_vkGetDynamicRenderingTilePropertiesQCOM vkGetDynamicRenderingTilePropertiesQCOM = 0; //=== VK_NV_cooperative_vector === PFN_vkGetPhysicalDeviceCooperativeVectorPropertiesNV vkGetPhysicalDeviceCooperativeVectorPropertiesNV = 0; PFN_vkConvertCooperativeVectorMatrixNV vkConvertCooperativeVectorMatrixNV = 0; PFN_vkCmdConvertCooperativeVectorMatrixNV vkCmdConvertCooperativeVectorMatrixNV = 0; //=== VK_NV_low_latency2 === PFN_vkSetLatencySleepModeNV vkSetLatencySleepModeNV = 0; PFN_vkLatencySleepNV vkLatencySleepNV = 0; PFN_vkSetLatencyMarkerNV vkSetLatencyMarkerNV = 0; PFN_vkGetLatencyTimingsNV vkGetLatencyTimingsNV = 0; PFN_vkQueueNotifyOutOfBandNV vkQueueNotifyOutOfBandNV = 0; //=== VK_KHR_cooperative_matrix === PFN_vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR = 0; //=== VK_EXT_attachment_feedback_loop_dynamic_state === PFN_vkCmdSetAttachmentFeedbackLoopEnableEXT vkCmdSetAttachmentFeedbackLoopEnableEXT = 0; #if defined( VK_USE_PLATFORM_SCREEN_QNX ) //=== VK_QNX_external_memory_screen_buffer === PFN_vkGetScreenBufferPropertiesQNX vkGetScreenBufferPropertiesQNX = 0; #else PFN_dummy vkGetScreenBufferPropertiesQNX_placeholder = 0; #endif /*VK_USE_PLATFORM_SCREEN_QNX*/ //=== VK_KHR_line_rasterization === PFN_vkCmdSetLineStippleKHR vkCmdSetLineStippleKHR = 0; //=== VK_KHR_calibrated_timestamps === PFN_vkGetPhysicalDeviceCalibrateableTimeDomainsKHR vkGetPhysicalDeviceCalibrateableTimeDomainsKHR = 0; PFN_vkGetCalibratedTimestampsKHR vkGetCalibratedTimestampsKHR = 0; //=== VK_KHR_maintenance6 === PFN_vkCmdBindDescriptorSets2KHR vkCmdBindDescriptorSets2KHR = 0; PFN_vkCmdPushConstants2KHR vkCmdPushConstants2KHR = 0; PFN_vkCmdPushDescriptorSet2KHR vkCmdPushDescriptorSet2KHR = 0; PFN_vkCmdPushDescriptorSetWithTemplate2KHR vkCmdPushDescriptorSetWithTemplate2KHR = 0; PFN_vkCmdSetDescriptorBufferOffsets2EXT vkCmdSetDescriptorBufferOffsets2EXT = 0; PFN_vkCmdBindDescriptorBufferEmbeddedSamplers2EXT vkCmdBindDescriptorBufferEmbeddedSamplers2EXT = 0; //=== VK_NV_cluster_acceleration_structure === PFN_vkGetClusterAccelerationStructureBuildSizesNV vkGetClusterAccelerationStructureBuildSizesNV = 0; PFN_vkCmdBuildClusterAccelerationStructureIndirectNV vkCmdBuildClusterAccelerationStructureIndirectNV = 0; //=== VK_NV_partitioned_acceleration_structure === PFN_vkGetPartitionedAccelerationStructuresBuildSizesNV vkGetPartitionedAccelerationStructuresBuildSizesNV = 0; PFN_vkCmdBuildPartitionedAccelerationStructuresNV vkCmdBuildPartitionedAccelerationStructuresNV = 0; //=== VK_EXT_device_generated_commands === PFN_vkGetGeneratedCommandsMemoryRequirementsEXT vkGetGeneratedCommandsMemoryRequirementsEXT = 0; PFN_vkCmdPreprocessGeneratedCommandsEXT vkCmdPreprocessGeneratedCommandsEXT = 0; PFN_vkCmdExecuteGeneratedCommandsEXT vkCmdExecuteGeneratedCommandsEXT = 0; PFN_vkCreateIndirectCommandsLayoutEXT vkCreateIndirectCommandsLayoutEXT = 0; PFN_vkDestroyIndirectCommandsLayoutEXT vkDestroyIndirectCommandsLayoutEXT = 0; PFN_vkCreateIndirectExecutionSetEXT vkCreateIndirectExecutionSetEXT = 0; PFN_vkDestroyIndirectExecutionSetEXT vkDestroyIndirectExecutionSetEXT = 0; PFN_vkUpdateIndirectExecutionSetPipelineEXT vkUpdateIndirectExecutionSetPipelineEXT = 0; PFN_vkUpdateIndirectExecutionSetShaderEXT vkUpdateIndirectExecutionSetShaderEXT = 0; //=== VK_NV_cooperative_matrix2 === PFN_vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV = 0; #if defined( VK_USE_PLATFORM_METAL_EXT ) //=== VK_EXT_external_memory_metal === PFN_vkGetMemoryMetalHandleEXT vkGetMemoryMetalHandleEXT = 0; PFN_vkGetMemoryMetalHandlePropertiesEXT vkGetMemoryMetalHandlePropertiesEXT = 0; #else PFN_dummy vkGetMemoryMetalHandleEXT_placeholder = 0; PFN_dummy vkGetMemoryMetalHandlePropertiesEXT_placeholder = 0; #endif /*VK_USE_PLATFORM_METAL_EXT*/ public: DispatchLoaderDynamic() VULKAN_HPP_NOEXCEPT = default; DispatchLoaderDynamic( DispatchLoaderDynamic const & rhs ) VULKAN_HPP_NOEXCEPT = default; DispatchLoaderDynamic( PFN_vkGetInstanceProcAddr getInstanceProcAddr ) VULKAN_HPP_NOEXCEPT { init( getInstanceProcAddr ); } // This interface does not require a linked vulkan library. DispatchLoaderDynamic( VkInstance instance, PFN_vkGetInstanceProcAddr getInstanceProcAddr, VkDevice device = {}, PFN_vkGetDeviceProcAddr getDeviceProcAddr = nullptr ) VULKAN_HPP_NOEXCEPT { init( instance, getInstanceProcAddr, device, getDeviceProcAddr ); } template void init() { static DynamicLoader dl; init( dl ); } template void init( DynamicLoader const & dl ) VULKAN_HPP_NOEXCEPT { PFN_vkGetInstanceProcAddr getInstanceProcAddr = dl.template getProcAddress( "vkGetInstanceProcAddr" ); init( getInstanceProcAddr ); } void init( PFN_vkGetInstanceProcAddr getInstanceProcAddr ) VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getInstanceProcAddr ); vkGetInstanceProcAddr = getInstanceProcAddr; //=== VK_VERSION_1_0 === vkCreateInstance = PFN_vkCreateInstance( vkGetInstanceProcAddr( NULL, "vkCreateInstance" ) ); vkEnumerateInstanceExtensionProperties = PFN_vkEnumerateInstanceExtensionProperties( vkGetInstanceProcAddr( NULL, "vkEnumerateInstanceExtensionProperties" ) ); vkEnumerateInstanceLayerProperties = PFN_vkEnumerateInstanceLayerProperties( vkGetInstanceProcAddr( NULL, "vkEnumerateInstanceLayerProperties" ) ); //=== VK_VERSION_1_1 === vkEnumerateInstanceVersion = PFN_vkEnumerateInstanceVersion( vkGetInstanceProcAddr( NULL, "vkEnumerateInstanceVersion" ) ); } // This interface does not require a linked vulkan library. void init( VkInstance instance, PFN_vkGetInstanceProcAddr getInstanceProcAddr, VkDevice device = {}, PFN_vkGetDeviceProcAddr /*getDeviceProcAddr*/ = nullptr ) VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( instance && getInstanceProcAddr ); vkGetInstanceProcAddr = getInstanceProcAddr; init( VULKAN_HPP_NAMESPACE::Instance( instance ) ); if ( device ) { init( VULKAN_HPP_NAMESPACE::Device( device ) ); } } void init( VULKAN_HPP_NAMESPACE::Instance instanceCpp ) VULKAN_HPP_NOEXCEPT { VkInstance instance = static_cast( instanceCpp ); //=== VK_VERSION_1_0 === vkDestroyInstance = PFN_vkDestroyInstance( vkGetInstanceProcAddr( instance, "vkDestroyInstance" ) ); vkEnumeratePhysicalDevices = PFN_vkEnumeratePhysicalDevices( vkGetInstanceProcAddr( instance, "vkEnumeratePhysicalDevices" ) ); vkGetPhysicalDeviceFeatures = PFN_vkGetPhysicalDeviceFeatures( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceFeatures" ) ); vkGetPhysicalDeviceFormatProperties = PFN_vkGetPhysicalDeviceFormatProperties( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceFormatProperties" ) ); vkGetPhysicalDeviceImageFormatProperties = PFN_vkGetPhysicalDeviceImageFormatProperties( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceImageFormatProperties" ) ); vkGetPhysicalDeviceProperties = PFN_vkGetPhysicalDeviceProperties( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceProperties" ) ); vkGetPhysicalDeviceQueueFamilyProperties = PFN_vkGetPhysicalDeviceQueueFamilyProperties( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceQueueFamilyProperties" ) ); vkGetPhysicalDeviceMemoryProperties = PFN_vkGetPhysicalDeviceMemoryProperties( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceMemoryProperties" ) ); vkGetDeviceProcAddr = PFN_vkGetDeviceProcAddr( vkGetInstanceProcAddr( instance, "vkGetDeviceProcAddr" ) ); vkCreateDevice = PFN_vkCreateDevice( vkGetInstanceProcAddr( instance, "vkCreateDevice" ) ); vkDestroyDevice = PFN_vkDestroyDevice( vkGetInstanceProcAddr( instance, "vkDestroyDevice" ) ); vkEnumerateDeviceExtensionProperties = PFN_vkEnumerateDeviceExtensionProperties( vkGetInstanceProcAddr( instance, "vkEnumerateDeviceExtensionProperties" ) ); vkEnumerateDeviceLayerProperties = PFN_vkEnumerateDeviceLayerProperties( vkGetInstanceProcAddr( instance, "vkEnumerateDeviceLayerProperties" ) ); vkGetDeviceQueue = PFN_vkGetDeviceQueue( vkGetInstanceProcAddr( instance, "vkGetDeviceQueue" ) ); vkQueueSubmit = PFN_vkQueueSubmit( vkGetInstanceProcAddr( instance, "vkQueueSubmit" ) ); vkQueueWaitIdle = PFN_vkQueueWaitIdle( vkGetInstanceProcAddr( instance, "vkQueueWaitIdle" ) ); vkDeviceWaitIdle = PFN_vkDeviceWaitIdle( vkGetInstanceProcAddr( instance, "vkDeviceWaitIdle" ) ); vkAllocateMemory = PFN_vkAllocateMemory( vkGetInstanceProcAddr( instance, "vkAllocateMemory" ) ); vkFreeMemory = PFN_vkFreeMemory( vkGetInstanceProcAddr( instance, "vkFreeMemory" ) ); vkMapMemory = PFN_vkMapMemory( vkGetInstanceProcAddr( instance, "vkMapMemory" ) ); vkUnmapMemory = PFN_vkUnmapMemory( vkGetInstanceProcAddr( instance, "vkUnmapMemory" ) ); vkFlushMappedMemoryRanges = PFN_vkFlushMappedMemoryRanges( vkGetInstanceProcAddr( instance, "vkFlushMappedMemoryRanges" ) ); vkInvalidateMappedMemoryRanges = PFN_vkInvalidateMappedMemoryRanges( vkGetInstanceProcAddr( instance, "vkInvalidateMappedMemoryRanges" ) ); vkGetDeviceMemoryCommitment = PFN_vkGetDeviceMemoryCommitment( vkGetInstanceProcAddr( instance, "vkGetDeviceMemoryCommitment" ) ); vkBindBufferMemory = PFN_vkBindBufferMemory( vkGetInstanceProcAddr( instance, "vkBindBufferMemory" ) ); vkBindImageMemory = PFN_vkBindImageMemory( vkGetInstanceProcAddr( instance, "vkBindImageMemory" ) ); vkGetBufferMemoryRequirements = PFN_vkGetBufferMemoryRequirements( vkGetInstanceProcAddr( instance, "vkGetBufferMemoryRequirements" ) ); vkGetImageMemoryRequirements = PFN_vkGetImageMemoryRequirements( vkGetInstanceProcAddr( instance, "vkGetImageMemoryRequirements" ) ); vkGetImageSparseMemoryRequirements = PFN_vkGetImageSparseMemoryRequirements( vkGetInstanceProcAddr( instance, "vkGetImageSparseMemoryRequirements" ) ); vkGetPhysicalDeviceSparseImageFormatProperties = PFN_vkGetPhysicalDeviceSparseImageFormatProperties( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceSparseImageFormatProperties" ) ); vkQueueBindSparse = PFN_vkQueueBindSparse( vkGetInstanceProcAddr( instance, "vkQueueBindSparse" ) ); vkCreateFence = PFN_vkCreateFence( vkGetInstanceProcAddr( instance, "vkCreateFence" ) ); vkDestroyFence = PFN_vkDestroyFence( vkGetInstanceProcAddr( instance, "vkDestroyFence" ) ); vkResetFences = PFN_vkResetFences( vkGetInstanceProcAddr( instance, "vkResetFences" ) ); vkGetFenceStatus = PFN_vkGetFenceStatus( vkGetInstanceProcAddr( instance, "vkGetFenceStatus" ) ); vkWaitForFences = PFN_vkWaitForFences( vkGetInstanceProcAddr( instance, "vkWaitForFences" ) ); vkCreateSemaphore = PFN_vkCreateSemaphore( vkGetInstanceProcAddr( instance, "vkCreateSemaphore" ) ); vkDestroySemaphore = PFN_vkDestroySemaphore( vkGetInstanceProcAddr( instance, "vkDestroySemaphore" ) ); vkCreateEvent = PFN_vkCreateEvent( vkGetInstanceProcAddr( instance, "vkCreateEvent" ) ); vkDestroyEvent = PFN_vkDestroyEvent( vkGetInstanceProcAddr( instance, "vkDestroyEvent" ) ); vkGetEventStatus = PFN_vkGetEventStatus( vkGetInstanceProcAddr( instance, "vkGetEventStatus" ) ); vkSetEvent = PFN_vkSetEvent( vkGetInstanceProcAddr( instance, "vkSetEvent" ) ); vkResetEvent = PFN_vkResetEvent( vkGetInstanceProcAddr( instance, "vkResetEvent" ) ); vkCreateQueryPool = PFN_vkCreateQueryPool( vkGetInstanceProcAddr( instance, "vkCreateQueryPool" ) ); vkDestroyQueryPool = PFN_vkDestroyQueryPool( vkGetInstanceProcAddr( instance, "vkDestroyQueryPool" ) ); vkGetQueryPoolResults = PFN_vkGetQueryPoolResults( vkGetInstanceProcAddr( instance, "vkGetQueryPoolResults" ) ); vkCreateBuffer = PFN_vkCreateBuffer( vkGetInstanceProcAddr( instance, "vkCreateBuffer" ) ); vkDestroyBuffer = PFN_vkDestroyBuffer( vkGetInstanceProcAddr( instance, "vkDestroyBuffer" ) ); vkCreateBufferView = PFN_vkCreateBufferView( vkGetInstanceProcAddr( instance, "vkCreateBufferView" ) ); vkDestroyBufferView = PFN_vkDestroyBufferView( vkGetInstanceProcAddr( instance, "vkDestroyBufferView" ) ); vkCreateImage = PFN_vkCreateImage( vkGetInstanceProcAddr( instance, "vkCreateImage" ) ); vkDestroyImage = PFN_vkDestroyImage( vkGetInstanceProcAddr( instance, "vkDestroyImage" ) ); vkGetImageSubresourceLayout = PFN_vkGetImageSubresourceLayout( vkGetInstanceProcAddr( instance, "vkGetImageSubresourceLayout" ) ); vkCreateImageView = PFN_vkCreateImageView( vkGetInstanceProcAddr( instance, "vkCreateImageView" ) ); vkDestroyImageView = PFN_vkDestroyImageView( vkGetInstanceProcAddr( instance, "vkDestroyImageView" ) ); vkCreateShaderModule = PFN_vkCreateShaderModule( vkGetInstanceProcAddr( instance, "vkCreateShaderModule" ) ); vkDestroyShaderModule = PFN_vkDestroyShaderModule( vkGetInstanceProcAddr( instance, "vkDestroyShaderModule" ) ); vkCreatePipelineCache = PFN_vkCreatePipelineCache( vkGetInstanceProcAddr( instance, "vkCreatePipelineCache" ) ); vkDestroyPipelineCache = PFN_vkDestroyPipelineCache( vkGetInstanceProcAddr( instance, "vkDestroyPipelineCache" ) ); vkGetPipelineCacheData = PFN_vkGetPipelineCacheData( vkGetInstanceProcAddr( instance, "vkGetPipelineCacheData" ) ); vkMergePipelineCaches = PFN_vkMergePipelineCaches( vkGetInstanceProcAddr( instance, "vkMergePipelineCaches" ) ); vkCreateGraphicsPipelines = PFN_vkCreateGraphicsPipelines( vkGetInstanceProcAddr( instance, "vkCreateGraphicsPipelines" ) ); vkCreateComputePipelines = PFN_vkCreateComputePipelines( vkGetInstanceProcAddr( instance, "vkCreateComputePipelines" ) ); vkDestroyPipeline = PFN_vkDestroyPipeline( vkGetInstanceProcAddr( instance, "vkDestroyPipeline" ) ); vkCreatePipelineLayout = PFN_vkCreatePipelineLayout( vkGetInstanceProcAddr( instance, "vkCreatePipelineLayout" ) ); vkDestroyPipelineLayout = PFN_vkDestroyPipelineLayout( vkGetInstanceProcAddr( instance, "vkDestroyPipelineLayout" ) ); vkCreateSampler = PFN_vkCreateSampler( vkGetInstanceProcAddr( instance, "vkCreateSampler" ) ); vkDestroySampler = PFN_vkDestroySampler( vkGetInstanceProcAddr( instance, "vkDestroySampler" ) ); vkCreateDescriptorSetLayout = PFN_vkCreateDescriptorSetLayout( vkGetInstanceProcAddr( instance, "vkCreateDescriptorSetLayout" ) ); vkDestroyDescriptorSetLayout = PFN_vkDestroyDescriptorSetLayout( vkGetInstanceProcAddr( instance, "vkDestroyDescriptorSetLayout" ) ); vkCreateDescriptorPool = PFN_vkCreateDescriptorPool( vkGetInstanceProcAddr( instance, "vkCreateDescriptorPool" ) ); vkDestroyDescriptorPool = PFN_vkDestroyDescriptorPool( vkGetInstanceProcAddr( instance, "vkDestroyDescriptorPool" ) ); vkResetDescriptorPool = PFN_vkResetDescriptorPool( vkGetInstanceProcAddr( instance, "vkResetDescriptorPool" ) ); vkAllocateDescriptorSets = PFN_vkAllocateDescriptorSets( vkGetInstanceProcAddr( instance, "vkAllocateDescriptorSets" ) ); vkFreeDescriptorSets = PFN_vkFreeDescriptorSets( vkGetInstanceProcAddr( instance, "vkFreeDescriptorSets" ) ); vkUpdateDescriptorSets = PFN_vkUpdateDescriptorSets( vkGetInstanceProcAddr( instance, "vkUpdateDescriptorSets" ) ); vkCreateFramebuffer = PFN_vkCreateFramebuffer( vkGetInstanceProcAddr( instance, "vkCreateFramebuffer" ) ); vkDestroyFramebuffer = PFN_vkDestroyFramebuffer( vkGetInstanceProcAddr( instance, "vkDestroyFramebuffer" ) ); vkCreateRenderPass = PFN_vkCreateRenderPass( vkGetInstanceProcAddr( instance, "vkCreateRenderPass" ) ); vkDestroyRenderPass = PFN_vkDestroyRenderPass( vkGetInstanceProcAddr( instance, "vkDestroyRenderPass" ) ); vkGetRenderAreaGranularity = PFN_vkGetRenderAreaGranularity( vkGetInstanceProcAddr( instance, "vkGetRenderAreaGranularity" ) ); vkCreateCommandPool = PFN_vkCreateCommandPool( vkGetInstanceProcAddr( instance, "vkCreateCommandPool" ) ); vkDestroyCommandPool = PFN_vkDestroyCommandPool( vkGetInstanceProcAddr( instance, "vkDestroyCommandPool" ) ); vkResetCommandPool = PFN_vkResetCommandPool( vkGetInstanceProcAddr( instance, "vkResetCommandPool" ) ); vkAllocateCommandBuffers = PFN_vkAllocateCommandBuffers( vkGetInstanceProcAddr( instance, "vkAllocateCommandBuffers" ) ); vkFreeCommandBuffers = PFN_vkFreeCommandBuffers( vkGetInstanceProcAddr( instance, "vkFreeCommandBuffers" ) ); vkBeginCommandBuffer = PFN_vkBeginCommandBuffer( vkGetInstanceProcAddr( instance, "vkBeginCommandBuffer" ) ); vkEndCommandBuffer = PFN_vkEndCommandBuffer( vkGetInstanceProcAddr( instance, "vkEndCommandBuffer" ) ); vkResetCommandBuffer = PFN_vkResetCommandBuffer( vkGetInstanceProcAddr( instance, "vkResetCommandBuffer" ) ); vkCmdBindPipeline = PFN_vkCmdBindPipeline( vkGetInstanceProcAddr( instance, "vkCmdBindPipeline" ) ); vkCmdSetViewport = PFN_vkCmdSetViewport( vkGetInstanceProcAddr( instance, "vkCmdSetViewport" ) ); vkCmdSetScissor = PFN_vkCmdSetScissor( vkGetInstanceProcAddr( instance, "vkCmdSetScissor" ) ); vkCmdSetLineWidth = PFN_vkCmdSetLineWidth( vkGetInstanceProcAddr( instance, "vkCmdSetLineWidth" ) ); vkCmdSetDepthBias = PFN_vkCmdSetDepthBias( vkGetInstanceProcAddr( instance, "vkCmdSetDepthBias" ) ); vkCmdSetBlendConstants = PFN_vkCmdSetBlendConstants( vkGetInstanceProcAddr( instance, "vkCmdSetBlendConstants" ) ); vkCmdSetDepthBounds = PFN_vkCmdSetDepthBounds( vkGetInstanceProcAddr( instance, "vkCmdSetDepthBounds" ) ); vkCmdSetStencilCompareMask = PFN_vkCmdSetStencilCompareMask( vkGetInstanceProcAddr( instance, "vkCmdSetStencilCompareMask" ) ); vkCmdSetStencilWriteMask = PFN_vkCmdSetStencilWriteMask( vkGetInstanceProcAddr( instance, "vkCmdSetStencilWriteMask" ) ); vkCmdSetStencilReference = PFN_vkCmdSetStencilReference( vkGetInstanceProcAddr( instance, "vkCmdSetStencilReference" ) ); vkCmdBindDescriptorSets = PFN_vkCmdBindDescriptorSets( vkGetInstanceProcAddr( instance, "vkCmdBindDescriptorSets" ) ); vkCmdBindIndexBuffer = PFN_vkCmdBindIndexBuffer( vkGetInstanceProcAddr( instance, "vkCmdBindIndexBuffer" ) ); vkCmdBindVertexBuffers = PFN_vkCmdBindVertexBuffers( vkGetInstanceProcAddr( instance, "vkCmdBindVertexBuffers" ) ); vkCmdDraw = PFN_vkCmdDraw( vkGetInstanceProcAddr( instance, "vkCmdDraw" ) ); vkCmdDrawIndexed = PFN_vkCmdDrawIndexed( vkGetInstanceProcAddr( instance, "vkCmdDrawIndexed" ) ); vkCmdDrawIndirect = PFN_vkCmdDrawIndirect( vkGetInstanceProcAddr( instance, "vkCmdDrawIndirect" ) ); vkCmdDrawIndexedIndirect = PFN_vkCmdDrawIndexedIndirect( vkGetInstanceProcAddr( instance, "vkCmdDrawIndexedIndirect" ) ); vkCmdDispatch = PFN_vkCmdDispatch( vkGetInstanceProcAddr( instance, "vkCmdDispatch" ) ); vkCmdDispatchIndirect = PFN_vkCmdDispatchIndirect( vkGetInstanceProcAddr( instance, "vkCmdDispatchIndirect" ) ); vkCmdCopyBuffer = PFN_vkCmdCopyBuffer( vkGetInstanceProcAddr( instance, "vkCmdCopyBuffer" ) ); vkCmdCopyImage = PFN_vkCmdCopyImage( vkGetInstanceProcAddr( instance, "vkCmdCopyImage" ) ); vkCmdBlitImage = PFN_vkCmdBlitImage( vkGetInstanceProcAddr( instance, "vkCmdBlitImage" ) ); vkCmdCopyBufferToImage = PFN_vkCmdCopyBufferToImage( vkGetInstanceProcAddr( instance, "vkCmdCopyBufferToImage" ) ); vkCmdCopyImageToBuffer = PFN_vkCmdCopyImageToBuffer( vkGetInstanceProcAddr( instance, "vkCmdCopyImageToBuffer" ) ); vkCmdUpdateBuffer = PFN_vkCmdUpdateBuffer( vkGetInstanceProcAddr( instance, "vkCmdUpdateBuffer" ) ); vkCmdFillBuffer = PFN_vkCmdFillBuffer( vkGetInstanceProcAddr( instance, "vkCmdFillBuffer" ) ); vkCmdClearColorImage = PFN_vkCmdClearColorImage( vkGetInstanceProcAddr( instance, "vkCmdClearColorImage" ) ); vkCmdClearDepthStencilImage = PFN_vkCmdClearDepthStencilImage( vkGetInstanceProcAddr( instance, "vkCmdClearDepthStencilImage" ) ); vkCmdClearAttachments = PFN_vkCmdClearAttachments( vkGetInstanceProcAddr( instance, "vkCmdClearAttachments" ) ); vkCmdResolveImage = PFN_vkCmdResolveImage( vkGetInstanceProcAddr( instance, "vkCmdResolveImage" ) ); vkCmdSetEvent = PFN_vkCmdSetEvent( vkGetInstanceProcAddr( instance, "vkCmdSetEvent" ) ); vkCmdResetEvent = PFN_vkCmdResetEvent( vkGetInstanceProcAddr( instance, "vkCmdResetEvent" ) ); vkCmdWaitEvents = PFN_vkCmdWaitEvents( vkGetInstanceProcAddr( instance, "vkCmdWaitEvents" ) ); vkCmdPipelineBarrier = PFN_vkCmdPipelineBarrier( vkGetInstanceProcAddr( instance, "vkCmdPipelineBarrier" ) ); vkCmdBeginQuery = PFN_vkCmdBeginQuery( vkGetInstanceProcAddr( instance, "vkCmdBeginQuery" ) ); vkCmdEndQuery = PFN_vkCmdEndQuery( vkGetInstanceProcAddr( instance, "vkCmdEndQuery" ) ); vkCmdResetQueryPool = PFN_vkCmdResetQueryPool( vkGetInstanceProcAddr( instance, "vkCmdResetQueryPool" ) ); vkCmdWriteTimestamp = PFN_vkCmdWriteTimestamp( vkGetInstanceProcAddr( instance, "vkCmdWriteTimestamp" ) ); vkCmdCopyQueryPoolResults = PFN_vkCmdCopyQueryPoolResults( vkGetInstanceProcAddr( instance, "vkCmdCopyQueryPoolResults" ) ); vkCmdPushConstants = PFN_vkCmdPushConstants( vkGetInstanceProcAddr( instance, "vkCmdPushConstants" ) ); vkCmdBeginRenderPass = PFN_vkCmdBeginRenderPass( vkGetInstanceProcAddr( instance, "vkCmdBeginRenderPass" ) ); vkCmdNextSubpass = PFN_vkCmdNextSubpass( vkGetInstanceProcAddr( instance, "vkCmdNextSubpass" ) ); vkCmdEndRenderPass = PFN_vkCmdEndRenderPass( vkGetInstanceProcAddr( instance, "vkCmdEndRenderPass" ) ); vkCmdExecuteCommands = PFN_vkCmdExecuteCommands( vkGetInstanceProcAddr( instance, "vkCmdExecuteCommands" ) ); //=== VK_VERSION_1_1 === vkBindBufferMemory2 = PFN_vkBindBufferMemory2( vkGetInstanceProcAddr( instance, "vkBindBufferMemory2" ) ); vkBindImageMemory2 = PFN_vkBindImageMemory2( vkGetInstanceProcAddr( instance, "vkBindImageMemory2" ) ); vkGetDeviceGroupPeerMemoryFeatures = PFN_vkGetDeviceGroupPeerMemoryFeatures( vkGetInstanceProcAddr( instance, "vkGetDeviceGroupPeerMemoryFeatures" ) ); vkCmdSetDeviceMask = PFN_vkCmdSetDeviceMask( vkGetInstanceProcAddr( instance, "vkCmdSetDeviceMask" ) ); vkCmdDispatchBase = PFN_vkCmdDispatchBase( vkGetInstanceProcAddr( instance, "vkCmdDispatchBase" ) ); vkEnumeratePhysicalDeviceGroups = PFN_vkEnumeratePhysicalDeviceGroups( vkGetInstanceProcAddr( instance, "vkEnumeratePhysicalDeviceGroups" ) ); vkGetImageMemoryRequirements2 = PFN_vkGetImageMemoryRequirements2( vkGetInstanceProcAddr( instance, "vkGetImageMemoryRequirements2" ) ); vkGetBufferMemoryRequirements2 = PFN_vkGetBufferMemoryRequirements2( vkGetInstanceProcAddr( instance, "vkGetBufferMemoryRequirements2" ) ); vkGetImageSparseMemoryRequirements2 = PFN_vkGetImageSparseMemoryRequirements2( vkGetInstanceProcAddr( instance, "vkGetImageSparseMemoryRequirements2" ) ); vkGetPhysicalDeviceFeatures2 = PFN_vkGetPhysicalDeviceFeatures2( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceFeatures2" ) ); vkGetPhysicalDeviceProperties2 = PFN_vkGetPhysicalDeviceProperties2( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceProperties2" ) ); vkGetPhysicalDeviceFormatProperties2 = PFN_vkGetPhysicalDeviceFormatProperties2( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceFormatProperties2" ) ); vkGetPhysicalDeviceImageFormatProperties2 = PFN_vkGetPhysicalDeviceImageFormatProperties2( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceImageFormatProperties2" ) ); vkGetPhysicalDeviceQueueFamilyProperties2 = PFN_vkGetPhysicalDeviceQueueFamilyProperties2( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceQueueFamilyProperties2" ) ); vkGetPhysicalDeviceMemoryProperties2 = PFN_vkGetPhysicalDeviceMemoryProperties2( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceMemoryProperties2" ) ); vkGetPhysicalDeviceSparseImageFormatProperties2 = PFN_vkGetPhysicalDeviceSparseImageFormatProperties2( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceSparseImageFormatProperties2" ) ); vkTrimCommandPool = PFN_vkTrimCommandPool( vkGetInstanceProcAddr( instance, "vkTrimCommandPool" ) ); vkGetDeviceQueue2 = PFN_vkGetDeviceQueue2( vkGetInstanceProcAddr( instance, "vkGetDeviceQueue2" ) ); vkCreateSamplerYcbcrConversion = PFN_vkCreateSamplerYcbcrConversion( vkGetInstanceProcAddr( instance, "vkCreateSamplerYcbcrConversion" ) ); vkDestroySamplerYcbcrConversion = PFN_vkDestroySamplerYcbcrConversion( vkGetInstanceProcAddr( instance, "vkDestroySamplerYcbcrConversion" ) ); vkCreateDescriptorUpdateTemplate = PFN_vkCreateDescriptorUpdateTemplate( vkGetInstanceProcAddr( instance, "vkCreateDescriptorUpdateTemplate" ) ); vkDestroyDescriptorUpdateTemplate = PFN_vkDestroyDescriptorUpdateTemplate( vkGetInstanceProcAddr( instance, "vkDestroyDescriptorUpdateTemplate" ) ); vkUpdateDescriptorSetWithTemplate = PFN_vkUpdateDescriptorSetWithTemplate( vkGetInstanceProcAddr( instance, "vkUpdateDescriptorSetWithTemplate" ) ); vkGetPhysicalDeviceExternalBufferProperties = PFN_vkGetPhysicalDeviceExternalBufferProperties( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceExternalBufferProperties" ) ); vkGetPhysicalDeviceExternalFenceProperties = PFN_vkGetPhysicalDeviceExternalFenceProperties( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceExternalFenceProperties" ) ); vkGetPhysicalDeviceExternalSemaphoreProperties = PFN_vkGetPhysicalDeviceExternalSemaphoreProperties( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceExternalSemaphoreProperties" ) ); vkGetDescriptorSetLayoutSupport = PFN_vkGetDescriptorSetLayoutSupport( vkGetInstanceProcAddr( instance, "vkGetDescriptorSetLayoutSupport" ) ); //=== VK_VERSION_1_2 === vkCmdDrawIndirectCount = PFN_vkCmdDrawIndirectCount( vkGetInstanceProcAddr( instance, "vkCmdDrawIndirectCount" ) ); vkCmdDrawIndexedIndirectCount = PFN_vkCmdDrawIndexedIndirectCount( vkGetInstanceProcAddr( instance, "vkCmdDrawIndexedIndirectCount" ) ); vkCreateRenderPass2 = PFN_vkCreateRenderPass2( vkGetInstanceProcAddr( instance, "vkCreateRenderPass2" ) ); vkCmdBeginRenderPass2 = PFN_vkCmdBeginRenderPass2( vkGetInstanceProcAddr( instance, "vkCmdBeginRenderPass2" ) ); vkCmdNextSubpass2 = PFN_vkCmdNextSubpass2( vkGetInstanceProcAddr( instance, "vkCmdNextSubpass2" ) ); vkCmdEndRenderPass2 = PFN_vkCmdEndRenderPass2( vkGetInstanceProcAddr( instance, "vkCmdEndRenderPass2" ) ); vkResetQueryPool = PFN_vkResetQueryPool( vkGetInstanceProcAddr( instance, "vkResetQueryPool" ) ); vkGetSemaphoreCounterValue = PFN_vkGetSemaphoreCounterValue( vkGetInstanceProcAddr( instance, "vkGetSemaphoreCounterValue" ) ); vkWaitSemaphores = PFN_vkWaitSemaphores( vkGetInstanceProcAddr( instance, "vkWaitSemaphores" ) ); vkSignalSemaphore = PFN_vkSignalSemaphore( vkGetInstanceProcAddr( instance, "vkSignalSemaphore" ) ); vkGetBufferDeviceAddress = PFN_vkGetBufferDeviceAddress( vkGetInstanceProcAddr( instance, "vkGetBufferDeviceAddress" ) ); vkGetBufferOpaqueCaptureAddress = PFN_vkGetBufferOpaqueCaptureAddress( vkGetInstanceProcAddr( instance, "vkGetBufferOpaqueCaptureAddress" ) ); vkGetDeviceMemoryOpaqueCaptureAddress = PFN_vkGetDeviceMemoryOpaqueCaptureAddress( vkGetInstanceProcAddr( instance, "vkGetDeviceMemoryOpaqueCaptureAddress" ) ); //=== VK_VERSION_1_3 === vkGetPhysicalDeviceToolProperties = PFN_vkGetPhysicalDeviceToolProperties( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceToolProperties" ) ); vkCreatePrivateDataSlot = PFN_vkCreatePrivateDataSlot( vkGetInstanceProcAddr( instance, "vkCreatePrivateDataSlot" ) ); vkDestroyPrivateDataSlot = PFN_vkDestroyPrivateDataSlot( vkGetInstanceProcAddr( instance, "vkDestroyPrivateDataSlot" ) ); vkSetPrivateData = PFN_vkSetPrivateData( vkGetInstanceProcAddr( instance, "vkSetPrivateData" ) ); vkGetPrivateData = PFN_vkGetPrivateData( vkGetInstanceProcAddr( instance, "vkGetPrivateData" ) ); vkCmdSetEvent2 = PFN_vkCmdSetEvent2( vkGetInstanceProcAddr( instance, "vkCmdSetEvent2" ) ); vkCmdResetEvent2 = PFN_vkCmdResetEvent2( vkGetInstanceProcAddr( instance, "vkCmdResetEvent2" ) ); vkCmdWaitEvents2 = PFN_vkCmdWaitEvents2( vkGetInstanceProcAddr( instance, "vkCmdWaitEvents2" ) ); vkCmdPipelineBarrier2 = PFN_vkCmdPipelineBarrier2( vkGetInstanceProcAddr( instance, "vkCmdPipelineBarrier2" ) ); vkCmdWriteTimestamp2 = PFN_vkCmdWriteTimestamp2( vkGetInstanceProcAddr( instance, "vkCmdWriteTimestamp2" ) ); vkQueueSubmit2 = PFN_vkQueueSubmit2( vkGetInstanceProcAddr( instance, "vkQueueSubmit2" ) ); vkCmdCopyBuffer2 = PFN_vkCmdCopyBuffer2( vkGetInstanceProcAddr( instance, "vkCmdCopyBuffer2" ) ); vkCmdCopyImage2 = PFN_vkCmdCopyImage2( vkGetInstanceProcAddr( instance, "vkCmdCopyImage2" ) ); vkCmdCopyBufferToImage2 = PFN_vkCmdCopyBufferToImage2( vkGetInstanceProcAddr( instance, "vkCmdCopyBufferToImage2" ) ); vkCmdCopyImageToBuffer2 = PFN_vkCmdCopyImageToBuffer2( vkGetInstanceProcAddr( instance, "vkCmdCopyImageToBuffer2" ) ); vkCmdBlitImage2 = PFN_vkCmdBlitImage2( vkGetInstanceProcAddr( instance, "vkCmdBlitImage2" ) ); vkCmdResolveImage2 = PFN_vkCmdResolveImage2( vkGetInstanceProcAddr( instance, "vkCmdResolveImage2" ) ); vkCmdBeginRendering = PFN_vkCmdBeginRendering( vkGetInstanceProcAddr( instance, "vkCmdBeginRendering" ) ); vkCmdEndRendering = PFN_vkCmdEndRendering( vkGetInstanceProcAddr( instance, "vkCmdEndRendering" ) ); vkCmdSetCullMode = PFN_vkCmdSetCullMode( vkGetInstanceProcAddr( instance, "vkCmdSetCullMode" ) ); vkCmdSetFrontFace = PFN_vkCmdSetFrontFace( vkGetInstanceProcAddr( instance, "vkCmdSetFrontFace" ) ); vkCmdSetPrimitiveTopology = PFN_vkCmdSetPrimitiveTopology( vkGetInstanceProcAddr( instance, "vkCmdSetPrimitiveTopology" ) ); vkCmdSetViewportWithCount = PFN_vkCmdSetViewportWithCount( vkGetInstanceProcAddr( instance, "vkCmdSetViewportWithCount" ) ); vkCmdSetScissorWithCount = PFN_vkCmdSetScissorWithCount( vkGetInstanceProcAddr( instance, "vkCmdSetScissorWithCount" ) ); vkCmdBindVertexBuffers2 = PFN_vkCmdBindVertexBuffers2( vkGetInstanceProcAddr( instance, "vkCmdBindVertexBuffers2" ) ); vkCmdSetDepthTestEnable = PFN_vkCmdSetDepthTestEnable( vkGetInstanceProcAddr( instance, "vkCmdSetDepthTestEnable" ) ); vkCmdSetDepthWriteEnable = PFN_vkCmdSetDepthWriteEnable( vkGetInstanceProcAddr( instance, "vkCmdSetDepthWriteEnable" ) ); vkCmdSetDepthCompareOp = PFN_vkCmdSetDepthCompareOp( vkGetInstanceProcAddr( instance, "vkCmdSetDepthCompareOp" ) ); vkCmdSetDepthBoundsTestEnable = PFN_vkCmdSetDepthBoundsTestEnable( vkGetInstanceProcAddr( instance, "vkCmdSetDepthBoundsTestEnable" ) ); vkCmdSetStencilTestEnable = PFN_vkCmdSetStencilTestEnable( vkGetInstanceProcAddr( instance, "vkCmdSetStencilTestEnable" ) ); vkCmdSetStencilOp = PFN_vkCmdSetStencilOp( vkGetInstanceProcAddr( instance, "vkCmdSetStencilOp" ) ); vkCmdSetRasterizerDiscardEnable = PFN_vkCmdSetRasterizerDiscardEnable( vkGetInstanceProcAddr( instance, "vkCmdSetRasterizerDiscardEnable" ) ); vkCmdSetDepthBiasEnable = PFN_vkCmdSetDepthBiasEnable( vkGetInstanceProcAddr( instance, "vkCmdSetDepthBiasEnable" ) ); vkCmdSetPrimitiveRestartEnable = PFN_vkCmdSetPrimitiveRestartEnable( vkGetInstanceProcAddr( instance, "vkCmdSetPrimitiveRestartEnable" ) ); vkGetDeviceBufferMemoryRequirements = PFN_vkGetDeviceBufferMemoryRequirements( vkGetInstanceProcAddr( instance, "vkGetDeviceBufferMemoryRequirements" ) ); vkGetDeviceImageMemoryRequirements = PFN_vkGetDeviceImageMemoryRequirements( vkGetInstanceProcAddr( instance, "vkGetDeviceImageMemoryRequirements" ) ); vkGetDeviceImageSparseMemoryRequirements = PFN_vkGetDeviceImageSparseMemoryRequirements( vkGetInstanceProcAddr( instance, "vkGetDeviceImageSparseMemoryRequirements" ) ); //=== VK_VERSION_1_4 === vkCmdSetLineStipple = PFN_vkCmdSetLineStipple( vkGetInstanceProcAddr( instance, "vkCmdSetLineStipple" ) ); vkMapMemory2 = PFN_vkMapMemory2( vkGetInstanceProcAddr( instance, "vkMapMemory2" ) ); vkUnmapMemory2 = PFN_vkUnmapMemory2( vkGetInstanceProcAddr( instance, "vkUnmapMemory2" ) ); vkCmdBindIndexBuffer2 = PFN_vkCmdBindIndexBuffer2( vkGetInstanceProcAddr( instance, "vkCmdBindIndexBuffer2" ) ); vkGetRenderingAreaGranularity = PFN_vkGetRenderingAreaGranularity( vkGetInstanceProcAddr( instance, "vkGetRenderingAreaGranularity" ) ); vkGetDeviceImageSubresourceLayout = PFN_vkGetDeviceImageSubresourceLayout( vkGetInstanceProcAddr( instance, "vkGetDeviceImageSubresourceLayout" ) ); vkGetImageSubresourceLayout2 = PFN_vkGetImageSubresourceLayout2( vkGetInstanceProcAddr( instance, "vkGetImageSubresourceLayout2" ) ); vkCmdPushDescriptorSet = PFN_vkCmdPushDescriptorSet( vkGetInstanceProcAddr( instance, "vkCmdPushDescriptorSet" ) ); vkCmdPushDescriptorSetWithTemplate = PFN_vkCmdPushDescriptorSetWithTemplate( vkGetInstanceProcAddr( instance, "vkCmdPushDescriptorSetWithTemplate" ) ); vkCmdSetRenderingAttachmentLocations = PFN_vkCmdSetRenderingAttachmentLocations( vkGetInstanceProcAddr( instance, "vkCmdSetRenderingAttachmentLocations" ) ); vkCmdSetRenderingInputAttachmentIndices = PFN_vkCmdSetRenderingInputAttachmentIndices( vkGetInstanceProcAddr( instance, "vkCmdSetRenderingInputAttachmentIndices" ) ); vkCmdBindDescriptorSets2 = PFN_vkCmdBindDescriptorSets2( vkGetInstanceProcAddr( instance, "vkCmdBindDescriptorSets2" ) ); vkCmdPushConstants2 = PFN_vkCmdPushConstants2( vkGetInstanceProcAddr( instance, "vkCmdPushConstants2" ) ); vkCmdPushDescriptorSet2 = PFN_vkCmdPushDescriptorSet2( vkGetInstanceProcAddr( instance, "vkCmdPushDescriptorSet2" ) ); vkCmdPushDescriptorSetWithTemplate2 = PFN_vkCmdPushDescriptorSetWithTemplate2( vkGetInstanceProcAddr( instance, "vkCmdPushDescriptorSetWithTemplate2" ) ); vkCopyMemoryToImage = PFN_vkCopyMemoryToImage( vkGetInstanceProcAddr( instance, "vkCopyMemoryToImage" ) ); vkCopyImageToMemory = PFN_vkCopyImageToMemory( vkGetInstanceProcAddr( instance, "vkCopyImageToMemory" ) ); vkCopyImageToImage = PFN_vkCopyImageToImage( vkGetInstanceProcAddr( instance, "vkCopyImageToImage" ) ); vkTransitionImageLayout = PFN_vkTransitionImageLayout( vkGetInstanceProcAddr( instance, "vkTransitionImageLayout" ) ); //=== VK_KHR_surface === vkDestroySurfaceKHR = PFN_vkDestroySurfaceKHR( vkGetInstanceProcAddr( instance, "vkDestroySurfaceKHR" ) ); vkGetPhysicalDeviceSurfaceSupportKHR = PFN_vkGetPhysicalDeviceSurfaceSupportKHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceSurfaceSupportKHR" ) ); vkGetPhysicalDeviceSurfaceCapabilitiesKHR = PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceSurfaceCapabilitiesKHR" ) ); vkGetPhysicalDeviceSurfaceFormatsKHR = PFN_vkGetPhysicalDeviceSurfaceFormatsKHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceSurfaceFormatsKHR" ) ); vkGetPhysicalDeviceSurfacePresentModesKHR = PFN_vkGetPhysicalDeviceSurfacePresentModesKHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceSurfacePresentModesKHR" ) ); //=== VK_KHR_swapchain === vkCreateSwapchainKHR = PFN_vkCreateSwapchainKHR( vkGetInstanceProcAddr( instance, "vkCreateSwapchainKHR" ) ); vkDestroySwapchainKHR = PFN_vkDestroySwapchainKHR( vkGetInstanceProcAddr( instance, "vkDestroySwapchainKHR" ) ); vkGetSwapchainImagesKHR = PFN_vkGetSwapchainImagesKHR( vkGetInstanceProcAddr( instance, "vkGetSwapchainImagesKHR" ) ); vkAcquireNextImageKHR = PFN_vkAcquireNextImageKHR( vkGetInstanceProcAddr( instance, "vkAcquireNextImageKHR" ) ); vkQueuePresentKHR = PFN_vkQueuePresentKHR( vkGetInstanceProcAddr( instance, "vkQueuePresentKHR" ) ); vkGetDeviceGroupPresentCapabilitiesKHR = PFN_vkGetDeviceGroupPresentCapabilitiesKHR( vkGetInstanceProcAddr( instance, "vkGetDeviceGroupPresentCapabilitiesKHR" ) ); vkGetDeviceGroupSurfacePresentModesKHR = PFN_vkGetDeviceGroupSurfacePresentModesKHR( vkGetInstanceProcAddr( instance, "vkGetDeviceGroupSurfacePresentModesKHR" ) ); vkGetPhysicalDevicePresentRectanglesKHR = PFN_vkGetPhysicalDevicePresentRectanglesKHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDevicePresentRectanglesKHR" ) ); vkAcquireNextImage2KHR = PFN_vkAcquireNextImage2KHR( vkGetInstanceProcAddr( instance, "vkAcquireNextImage2KHR" ) ); //=== VK_KHR_display === vkGetPhysicalDeviceDisplayPropertiesKHR = PFN_vkGetPhysicalDeviceDisplayPropertiesKHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceDisplayPropertiesKHR" ) ); vkGetPhysicalDeviceDisplayPlanePropertiesKHR = PFN_vkGetPhysicalDeviceDisplayPlanePropertiesKHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceDisplayPlanePropertiesKHR" ) ); vkGetDisplayPlaneSupportedDisplaysKHR = PFN_vkGetDisplayPlaneSupportedDisplaysKHR( vkGetInstanceProcAddr( instance, "vkGetDisplayPlaneSupportedDisplaysKHR" ) ); vkGetDisplayModePropertiesKHR = PFN_vkGetDisplayModePropertiesKHR( vkGetInstanceProcAddr( instance, "vkGetDisplayModePropertiesKHR" ) ); vkCreateDisplayModeKHR = PFN_vkCreateDisplayModeKHR( vkGetInstanceProcAddr( instance, "vkCreateDisplayModeKHR" ) ); vkGetDisplayPlaneCapabilitiesKHR = PFN_vkGetDisplayPlaneCapabilitiesKHR( vkGetInstanceProcAddr( instance, "vkGetDisplayPlaneCapabilitiesKHR" ) ); vkCreateDisplayPlaneSurfaceKHR = PFN_vkCreateDisplayPlaneSurfaceKHR( vkGetInstanceProcAddr( instance, "vkCreateDisplayPlaneSurfaceKHR" ) ); //=== VK_KHR_display_swapchain === vkCreateSharedSwapchainsKHR = PFN_vkCreateSharedSwapchainsKHR( vkGetInstanceProcAddr( instance, "vkCreateSharedSwapchainsKHR" ) ); #if defined( VK_USE_PLATFORM_XLIB_KHR ) //=== VK_KHR_xlib_surface === vkCreateXlibSurfaceKHR = PFN_vkCreateXlibSurfaceKHR( vkGetInstanceProcAddr( instance, "vkCreateXlibSurfaceKHR" ) ); vkGetPhysicalDeviceXlibPresentationSupportKHR = PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceXlibPresentationSupportKHR" ) ); #endif /*VK_USE_PLATFORM_XLIB_KHR*/ #if defined( VK_USE_PLATFORM_XCB_KHR ) //=== VK_KHR_xcb_surface === vkCreateXcbSurfaceKHR = PFN_vkCreateXcbSurfaceKHR( vkGetInstanceProcAddr( instance, "vkCreateXcbSurfaceKHR" ) ); vkGetPhysicalDeviceXcbPresentationSupportKHR = PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceXcbPresentationSupportKHR" ) ); #endif /*VK_USE_PLATFORM_XCB_KHR*/ #if defined( VK_USE_PLATFORM_WAYLAND_KHR ) //=== VK_KHR_wayland_surface === vkCreateWaylandSurfaceKHR = PFN_vkCreateWaylandSurfaceKHR( vkGetInstanceProcAddr( instance, "vkCreateWaylandSurfaceKHR" ) ); vkGetPhysicalDeviceWaylandPresentationSupportKHR = PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceWaylandPresentationSupportKHR" ) ); #endif /*VK_USE_PLATFORM_WAYLAND_KHR*/ #if defined( VK_USE_PLATFORM_ANDROID_KHR ) //=== VK_KHR_android_surface === vkCreateAndroidSurfaceKHR = PFN_vkCreateAndroidSurfaceKHR( vkGetInstanceProcAddr( instance, "vkCreateAndroidSurfaceKHR" ) ); #endif /*VK_USE_PLATFORM_ANDROID_KHR*/ #if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_KHR_win32_surface === vkCreateWin32SurfaceKHR = PFN_vkCreateWin32SurfaceKHR( vkGetInstanceProcAddr( instance, "vkCreateWin32SurfaceKHR" ) ); vkGetPhysicalDeviceWin32PresentationSupportKHR = PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceWin32PresentationSupportKHR" ) ); #endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_EXT_debug_report === vkCreateDebugReportCallbackEXT = PFN_vkCreateDebugReportCallbackEXT( vkGetInstanceProcAddr( instance, "vkCreateDebugReportCallbackEXT" ) ); vkDestroyDebugReportCallbackEXT = PFN_vkDestroyDebugReportCallbackEXT( vkGetInstanceProcAddr( instance, "vkDestroyDebugReportCallbackEXT" ) ); vkDebugReportMessageEXT = PFN_vkDebugReportMessageEXT( vkGetInstanceProcAddr( instance, "vkDebugReportMessageEXT" ) ); //=== VK_EXT_debug_marker === vkDebugMarkerSetObjectTagEXT = PFN_vkDebugMarkerSetObjectTagEXT( vkGetInstanceProcAddr( instance, "vkDebugMarkerSetObjectTagEXT" ) ); vkDebugMarkerSetObjectNameEXT = PFN_vkDebugMarkerSetObjectNameEXT( vkGetInstanceProcAddr( instance, "vkDebugMarkerSetObjectNameEXT" ) ); vkCmdDebugMarkerBeginEXT = PFN_vkCmdDebugMarkerBeginEXT( vkGetInstanceProcAddr( instance, "vkCmdDebugMarkerBeginEXT" ) ); vkCmdDebugMarkerEndEXT = PFN_vkCmdDebugMarkerEndEXT( vkGetInstanceProcAddr( instance, "vkCmdDebugMarkerEndEXT" ) ); vkCmdDebugMarkerInsertEXT = PFN_vkCmdDebugMarkerInsertEXT( vkGetInstanceProcAddr( instance, "vkCmdDebugMarkerInsertEXT" ) ); //=== VK_KHR_video_queue === vkGetPhysicalDeviceVideoCapabilitiesKHR = PFN_vkGetPhysicalDeviceVideoCapabilitiesKHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceVideoCapabilitiesKHR" ) ); vkGetPhysicalDeviceVideoFormatPropertiesKHR = PFN_vkGetPhysicalDeviceVideoFormatPropertiesKHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceVideoFormatPropertiesKHR" ) ); vkCreateVideoSessionKHR = PFN_vkCreateVideoSessionKHR( vkGetInstanceProcAddr( instance, "vkCreateVideoSessionKHR" ) ); vkDestroyVideoSessionKHR = PFN_vkDestroyVideoSessionKHR( vkGetInstanceProcAddr( instance, "vkDestroyVideoSessionKHR" ) ); vkGetVideoSessionMemoryRequirementsKHR = PFN_vkGetVideoSessionMemoryRequirementsKHR( vkGetInstanceProcAddr( instance, "vkGetVideoSessionMemoryRequirementsKHR" ) ); vkBindVideoSessionMemoryKHR = PFN_vkBindVideoSessionMemoryKHR( vkGetInstanceProcAddr( instance, "vkBindVideoSessionMemoryKHR" ) ); vkCreateVideoSessionParametersKHR = PFN_vkCreateVideoSessionParametersKHR( vkGetInstanceProcAddr( instance, "vkCreateVideoSessionParametersKHR" ) ); vkUpdateVideoSessionParametersKHR = PFN_vkUpdateVideoSessionParametersKHR( vkGetInstanceProcAddr( instance, "vkUpdateVideoSessionParametersKHR" ) ); vkDestroyVideoSessionParametersKHR = PFN_vkDestroyVideoSessionParametersKHR( vkGetInstanceProcAddr( instance, "vkDestroyVideoSessionParametersKHR" ) ); vkCmdBeginVideoCodingKHR = PFN_vkCmdBeginVideoCodingKHR( vkGetInstanceProcAddr( instance, "vkCmdBeginVideoCodingKHR" ) ); vkCmdEndVideoCodingKHR = PFN_vkCmdEndVideoCodingKHR( vkGetInstanceProcAddr( instance, "vkCmdEndVideoCodingKHR" ) ); vkCmdControlVideoCodingKHR = PFN_vkCmdControlVideoCodingKHR( vkGetInstanceProcAddr( instance, "vkCmdControlVideoCodingKHR" ) ); //=== VK_KHR_video_decode_queue === vkCmdDecodeVideoKHR = PFN_vkCmdDecodeVideoKHR( vkGetInstanceProcAddr( instance, "vkCmdDecodeVideoKHR" ) ); //=== VK_EXT_transform_feedback === vkCmdBindTransformFeedbackBuffersEXT = PFN_vkCmdBindTransformFeedbackBuffersEXT( vkGetInstanceProcAddr( instance, "vkCmdBindTransformFeedbackBuffersEXT" ) ); vkCmdBeginTransformFeedbackEXT = PFN_vkCmdBeginTransformFeedbackEXT( vkGetInstanceProcAddr( instance, "vkCmdBeginTransformFeedbackEXT" ) ); vkCmdEndTransformFeedbackEXT = PFN_vkCmdEndTransformFeedbackEXT( vkGetInstanceProcAddr( instance, "vkCmdEndTransformFeedbackEXT" ) ); vkCmdBeginQueryIndexedEXT = PFN_vkCmdBeginQueryIndexedEXT( vkGetInstanceProcAddr( instance, "vkCmdBeginQueryIndexedEXT" ) ); vkCmdEndQueryIndexedEXT = PFN_vkCmdEndQueryIndexedEXT( vkGetInstanceProcAddr( instance, "vkCmdEndQueryIndexedEXT" ) ); vkCmdDrawIndirectByteCountEXT = PFN_vkCmdDrawIndirectByteCountEXT( vkGetInstanceProcAddr( instance, "vkCmdDrawIndirectByteCountEXT" ) ); //=== VK_NVX_binary_import === vkCreateCuModuleNVX = PFN_vkCreateCuModuleNVX( vkGetInstanceProcAddr( instance, "vkCreateCuModuleNVX" ) ); vkCreateCuFunctionNVX = PFN_vkCreateCuFunctionNVX( vkGetInstanceProcAddr( instance, "vkCreateCuFunctionNVX" ) ); vkDestroyCuModuleNVX = PFN_vkDestroyCuModuleNVX( vkGetInstanceProcAddr( instance, "vkDestroyCuModuleNVX" ) ); vkDestroyCuFunctionNVX = PFN_vkDestroyCuFunctionNVX( vkGetInstanceProcAddr( instance, "vkDestroyCuFunctionNVX" ) ); vkCmdCuLaunchKernelNVX = PFN_vkCmdCuLaunchKernelNVX( vkGetInstanceProcAddr( instance, "vkCmdCuLaunchKernelNVX" ) ); //=== VK_NVX_image_view_handle === vkGetImageViewHandleNVX = PFN_vkGetImageViewHandleNVX( vkGetInstanceProcAddr( instance, "vkGetImageViewHandleNVX" ) ); vkGetImageViewHandle64NVX = PFN_vkGetImageViewHandle64NVX( vkGetInstanceProcAddr( instance, "vkGetImageViewHandle64NVX" ) ); vkGetImageViewAddressNVX = PFN_vkGetImageViewAddressNVX( vkGetInstanceProcAddr( instance, "vkGetImageViewAddressNVX" ) ); //=== VK_AMD_draw_indirect_count === vkCmdDrawIndirectCountAMD = PFN_vkCmdDrawIndirectCountAMD( vkGetInstanceProcAddr( instance, "vkCmdDrawIndirectCountAMD" ) ); if ( !vkCmdDrawIndirectCount ) vkCmdDrawIndirectCount = vkCmdDrawIndirectCountAMD; vkCmdDrawIndexedIndirectCountAMD = PFN_vkCmdDrawIndexedIndirectCountAMD( vkGetInstanceProcAddr( instance, "vkCmdDrawIndexedIndirectCountAMD" ) ); if ( !vkCmdDrawIndexedIndirectCount ) vkCmdDrawIndexedIndirectCount = vkCmdDrawIndexedIndirectCountAMD; //=== VK_AMD_shader_info === vkGetShaderInfoAMD = PFN_vkGetShaderInfoAMD( vkGetInstanceProcAddr( instance, "vkGetShaderInfoAMD" ) ); //=== VK_KHR_dynamic_rendering === vkCmdBeginRenderingKHR = PFN_vkCmdBeginRenderingKHR( vkGetInstanceProcAddr( instance, "vkCmdBeginRenderingKHR" ) ); if ( !vkCmdBeginRendering ) vkCmdBeginRendering = vkCmdBeginRenderingKHR; vkCmdEndRenderingKHR = PFN_vkCmdEndRenderingKHR( vkGetInstanceProcAddr( instance, "vkCmdEndRenderingKHR" ) ); if ( !vkCmdEndRendering ) vkCmdEndRendering = vkCmdEndRenderingKHR; #if defined( VK_USE_PLATFORM_GGP ) //=== VK_GGP_stream_descriptor_surface === vkCreateStreamDescriptorSurfaceGGP = PFN_vkCreateStreamDescriptorSurfaceGGP( vkGetInstanceProcAddr( instance, "vkCreateStreamDescriptorSurfaceGGP" ) ); #endif /*VK_USE_PLATFORM_GGP*/ //=== VK_NV_external_memory_capabilities === vkGetPhysicalDeviceExternalImageFormatPropertiesNV = PFN_vkGetPhysicalDeviceExternalImageFormatPropertiesNV( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceExternalImageFormatPropertiesNV" ) ); #if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_NV_external_memory_win32 === vkGetMemoryWin32HandleNV = PFN_vkGetMemoryWin32HandleNV( vkGetInstanceProcAddr( instance, "vkGetMemoryWin32HandleNV" ) ); #endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_KHR_get_physical_device_properties2 === vkGetPhysicalDeviceFeatures2KHR = PFN_vkGetPhysicalDeviceFeatures2KHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceFeatures2KHR" ) ); if ( !vkGetPhysicalDeviceFeatures2 ) vkGetPhysicalDeviceFeatures2 = vkGetPhysicalDeviceFeatures2KHR; vkGetPhysicalDeviceProperties2KHR = PFN_vkGetPhysicalDeviceProperties2KHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceProperties2KHR" ) ); if ( !vkGetPhysicalDeviceProperties2 ) vkGetPhysicalDeviceProperties2 = vkGetPhysicalDeviceProperties2KHR; vkGetPhysicalDeviceFormatProperties2KHR = PFN_vkGetPhysicalDeviceFormatProperties2KHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceFormatProperties2KHR" ) ); if ( !vkGetPhysicalDeviceFormatProperties2 ) vkGetPhysicalDeviceFormatProperties2 = vkGetPhysicalDeviceFormatProperties2KHR; vkGetPhysicalDeviceImageFormatProperties2KHR = PFN_vkGetPhysicalDeviceImageFormatProperties2KHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceImageFormatProperties2KHR" ) ); if ( !vkGetPhysicalDeviceImageFormatProperties2 ) vkGetPhysicalDeviceImageFormatProperties2 = vkGetPhysicalDeviceImageFormatProperties2KHR; vkGetPhysicalDeviceQueueFamilyProperties2KHR = PFN_vkGetPhysicalDeviceQueueFamilyProperties2KHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceQueueFamilyProperties2KHR" ) ); if ( !vkGetPhysicalDeviceQueueFamilyProperties2 ) vkGetPhysicalDeviceQueueFamilyProperties2 = vkGetPhysicalDeviceQueueFamilyProperties2KHR; vkGetPhysicalDeviceMemoryProperties2KHR = PFN_vkGetPhysicalDeviceMemoryProperties2KHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceMemoryProperties2KHR" ) ); if ( !vkGetPhysicalDeviceMemoryProperties2 ) vkGetPhysicalDeviceMemoryProperties2 = vkGetPhysicalDeviceMemoryProperties2KHR; vkGetPhysicalDeviceSparseImageFormatProperties2KHR = PFN_vkGetPhysicalDeviceSparseImageFormatProperties2KHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceSparseImageFormatProperties2KHR" ) ); if ( !vkGetPhysicalDeviceSparseImageFormatProperties2 ) vkGetPhysicalDeviceSparseImageFormatProperties2 = vkGetPhysicalDeviceSparseImageFormatProperties2KHR; //=== VK_KHR_device_group === vkGetDeviceGroupPeerMemoryFeaturesKHR = PFN_vkGetDeviceGroupPeerMemoryFeaturesKHR( vkGetInstanceProcAddr( instance, "vkGetDeviceGroupPeerMemoryFeaturesKHR" ) ); if ( !vkGetDeviceGroupPeerMemoryFeatures ) vkGetDeviceGroupPeerMemoryFeatures = vkGetDeviceGroupPeerMemoryFeaturesKHR; vkCmdSetDeviceMaskKHR = PFN_vkCmdSetDeviceMaskKHR( vkGetInstanceProcAddr( instance, "vkCmdSetDeviceMaskKHR" ) ); if ( !vkCmdSetDeviceMask ) vkCmdSetDeviceMask = vkCmdSetDeviceMaskKHR; vkCmdDispatchBaseKHR = PFN_vkCmdDispatchBaseKHR( vkGetInstanceProcAddr( instance, "vkCmdDispatchBaseKHR" ) ); if ( !vkCmdDispatchBase ) vkCmdDispatchBase = vkCmdDispatchBaseKHR; #if defined( VK_USE_PLATFORM_VI_NN ) //=== VK_NN_vi_surface === vkCreateViSurfaceNN = PFN_vkCreateViSurfaceNN( vkGetInstanceProcAddr( instance, "vkCreateViSurfaceNN" ) ); #endif /*VK_USE_PLATFORM_VI_NN*/ //=== VK_KHR_maintenance1 === vkTrimCommandPoolKHR = PFN_vkTrimCommandPoolKHR( vkGetInstanceProcAddr( instance, "vkTrimCommandPoolKHR" ) ); if ( !vkTrimCommandPool ) vkTrimCommandPool = vkTrimCommandPoolKHR; //=== VK_KHR_device_group_creation === vkEnumeratePhysicalDeviceGroupsKHR = PFN_vkEnumeratePhysicalDeviceGroupsKHR( vkGetInstanceProcAddr( instance, "vkEnumeratePhysicalDeviceGroupsKHR" ) ); if ( !vkEnumeratePhysicalDeviceGroups ) vkEnumeratePhysicalDeviceGroups = vkEnumeratePhysicalDeviceGroupsKHR; //=== VK_KHR_external_memory_capabilities === vkGetPhysicalDeviceExternalBufferPropertiesKHR = PFN_vkGetPhysicalDeviceExternalBufferPropertiesKHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceExternalBufferPropertiesKHR" ) ); if ( !vkGetPhysicalDeviceExternalBufferProperties ) vkGetPhysicalDeviceExternalBufferProperties = vkGetPhysicalDeviceExternalBufferPropertiesKHR; #if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_KHR_external_memory_win32 === vkGetMemoryWin32HandleKHR = PFN_vkGetMemoryWin32HandleKHR( vkGetInstanceProcAddr( instance, "vkGetMemoryWin32HandleKHR" ) ); vkGetMemoryWin32HandlePropertiesKHR = PFN_vkGetMemoryWin32HandlePropertiesKHR( vkGetInstanceProcAddr( instance, "vkGetMemoryWin32HandlePropertiesKHR" ) ); #endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_KHR_external_memory_fd === vkGetMemoryFdKHR = PFN_vkGetMemoryFdKHR( vkGetInstanceProcAddr( instance, "vkGetMemoryFdKHR" ) ); vkGetMemoryFdPropertiesKHR = PFN_vkGetMemoryFdPropertiesKHR( vkGetInstanceProcAddr( instance, "vkGetMemoryFdPropertiesKHR" ) ); //=== VK_KHR_external_semaphore_capabilities === vkGetPhysicalDeviceExternalSemaphorePropertiesKHR = PFN_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceExternalSemaphorePropertiesKHR" ) ); if ( !vkGetPhysicalDeviceExternalSemaphoreProperties ) vkGetPhysicalDeviceExternalSemaphoreProperties = vkGetPhysicalDeviceExternalSemaphorePropertiesKHR; #if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_KHR_external_semaphore_win32 === vkImportSemaphoreWin32HandleKHR = PFN_vkImportSemaphoreWin32HandleKHR( vkGetInstanceProcAddr( instance, "vkImportSemaphoreWin32HandleKHR" ) ); vkGetSemaphoreWin32HandleKHR = PFN_vkGetSemaphoreWin32HandleKHR( vkGetInstanceProcAddr( instance, "vkGetSemaphoreWin32HandleKHR" ) ); #endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_KHR_external_semaphore_fd === vkImportSemaphoreFdKHR = PFN_vkImportSemaphoreFdKHR( vkGetInstanceProcAddr( instance, "vkImportSemaphoreFdKHR" ) ); vkGetSemaphoreFdKHR = PFN_vkGetSemaphoreFdKHR( vkGetInstanceProcAddr( instance, "vkGetSemaphoreFdKHR" ) ); //=== VK_KHR_push_descriptor === vkCmdPushDescriptorSetKHR = PFN_vkCmdPushDescriptorSetKHR( vkGetInstanceProcAddr( instance, "vkCmdPushDescriptorSetKHR" ) ); if ( !vkCmdPushDescriptorSet ) vkCmdPushDescriptorSet = vkCmdPushDescriptorSetKHR; vkCmdPushDescriptorSetWithTemplateKHR = PFN_vkCmdPushDescriptorSetWithTemplateKHR( vkGetInstanceProcAddr( instance, "vkCmdPushDescriptorSetWithTemplateKHR" ) ); if ( !vkCmdPushDescriptorSetWithTemplate ) vkCmdPushDescriptorSetWithTemplate = vkCmdPushDescriptorSetWithTemplateKHR; //=== VK_EXT_conditional_rendering === vkCmdBeginConditionalRenderingEXT = PFN_vkCmdBeginConditionalRenderingEXT( vkGetInstanceProcAddr( instance, "vkCmdBeginConditionalRenderingEXT" ) ); vkCmdEndConditionalRenderingEXT = PFN_vkCmdEndConditionalRenderingEXT( vkGetInstanceProcAddr( instance, "vkCmdEndConditionalRenderingEXT" ) ); //=== VK_KHR_descriptor_update_template === vkCreateDescriptorUpdateTemplateKHR = PFN_vkCreateDescriptorUpdateTemplateKHR( vkGetInstanceProcAddr( instance, "vkCreateDescriptorUpdateTemplateKHR" ) ); if ( !vkCreateDescriptorUpdateTemplate ) vkCreateDescriptorUpdateTemplate = vkCreateDescriptorUpdateTemplateKHR; vkDestroyDescriptorUpdateTemplateKHR = PFN_vkDestroyDescriptorUpdateTemplateKHR( vkGetInstanceProcAddr( instance, "vkDestroyDescriptorUpdateTemplateKHR" ) ); if ( !vkDestroyDescriptorUpdateTemplate ) vkDestroyDescriptorUpdateTemplate = vkDestroyDescriptorUpdateTemplateKHR; vkUpdateDescriptorSetWithTemplateKHR = PFN_vkUpdateDescriptorSetWithTemplateKHR( vkGetInstanceProcAddr( instance, "vkUpdateDescriptorSetWithTemplateKHR" ) ); if ( !vkUpdateDescriptorSetWithTemplate ) vkUpdateDescriptorSetWithTemplate = vkUpdateDescriptorSetWithTemplateKHR; //=== VK_NV_clip_space_w_scaling === vkCmdSetViewportWScalingNV = PFN_vkCmdSetViewportWScalingNV( vkGetInstanceProcAddr( instance, "vkCmdSetViewportWScalingNV" ) ); //=== VK_EXT_direct_mode_display === vkReleaseDisplayEXT = PFN_vkReleaseDisplayEXT( vkGetInstanceProcAddr( instance, "vkReleaseDisplayEXT" ) ); #if defined( VK_USE_PLATFORM_XLIB_XRANDR_EXT ) //=== VK_EXT_acquire_xlib_display === vkAcquireXlibDisplayEXT = PFN_vkAcquireXlibDisplayEXT( vkGetInstanceProcAddr( instance, "vkAcquireXlibDisplayEXT" ) ); vkGetRandROutputDisplayEXT = PFN_vkGetRandROutputDisplayEXT( vkGetInstanceProcAddr( instance, "vkGetRandROutputDisplayEXT" ) ); #endif /*VK_USE_PLATFORM_XLIB_XRANDR_EXT*/ //=== VK_EXT_display_surface_counter === vkGetPhysicalDeviceSurfaceCapabilities2EXT = PFN_vkGetPhysicalDeviceSurfaceCapabilities2EXT( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceSurfaceCapabilities2EXT" ) ); //=== VK_EXT_display_control === vkDisplayPowerControlEXT = PFN_vkDisplayPowerControlEXT( vkGetInstanceProcAddr( instance, "vkDisplayPowerControlEXT" ) ); vkRegisterDeviceEventEXT = PFN_vkRegisterDeviceEventEXT( vkGetInstanceProcAddr( instance, "vkRegisterDeviceEventEXT" ) ); vkRegisterDisplayEventEXT = PFN_vkRegisterDisplayEventEXT( vkGetInstanceProcAddr( instance, "vkRegisterDisplayEventEXT" ) ); vkGetSwapchainCounterEXT = PFN_vkGetSwapchainCounterEXT( vkGetInstanceProcAddr( instance, "vkGetSwapchainCounterEXT" ) ); //=== VK_GOOGLE_display_timing === vkGetRefreshCycleDurationGOOGLE = PFN_vkGetRefreshCycleDurationGOOGLE( vkGetInstanceProcAddr( instance, "vkGetRefreshCycleDurationGOOGLE" ) ); vkGetPastPresentationTimingGOOGLE = PFN_vkGetPastPresentationTimingGOOGLE( vkGetInstanceProcAddr( instance, "vkGetPastPresentationTimingGOOGLE" ) ); //=== VK_EXT_discard_rectangles === vkCmdSetDiscardRectangleEXT = PFN_vkCmdSetDiscardRectangleEXT( vkGetInstanceProcAddr( instance, "vkCmdSetDiscardRectangleEXT" ) ); vkCmdSetDiscardRectangleEnableEXT = PFN_vkCmdSetDiscardRectangleEnableEXT( vkGetInstanceProcAddr( instance, "vkCmdSetDiscardRectangleEnableEXT" ) ); vkCmdSetDiscardRectangleModeEXT = PFN_vkCmdSetDiscardRectangleModeEXT( vkGetInstanceProcAddr( instance, "vkCmdSetDiscardRectangleModeEXT" ) ); //=== VK_EXT_hdr_metadata === vkSetHdrMetadataEXT = PFN_vkSetHdrMetadataEXT( vkGetInstanceProcAddr( instance, "vkSetHdrMetadataEXT" ) ); //=== VK_KHR_create_renderpass2 === vkCreateRenderPass2KHR = PFN_vkCreateRenderPass2KHR( vkGetInstanceProcAddr( instance, "vkCreateRenderPass2KHR" ) ); if ( !vkCreateRenderPass2 ) vkCreateRenderPass2 = vkCreateRenderPass2KHR; vkCmdBeginRenderPass2KHR = PFN_vkCmdBeginRenderPass2KHR( vkGetInstanceProcAddr( instance, "vkCmdBeginRenderPass2KHR" ) ); if ( !vkCmdBeginRenderPass2 ) vkCmdBeginRenderPass2 = vkCmdBeginRenderPass2KHR; vkCmdNextSubpass2KHR = PFN_vkCmdNextSubpass2KHR( vkGetInstanceProcAddr( instance, "vkCmdNextSubpass2KHR" ) ); if ( !vkCmdNextSubpass2 ) vkCmdNextSubpass2 = vkCmdNextSubpass2KHR; vkCmdEndRenderPass2KHR = PFN_vkCmdEndRenderPass2KHR( vkGetInstanceProcAddr( instance, "vkCmdEndRenderPass2KHR" ) ); if ( !vkCmdEndRenderPass2 ) vkCmdEndRenderPass2 = vkCmdEndRenderPass2KHR; //=== VK_KHR_shared_presentable_image === vkGetSwapchainStatusKHR = PFN_vkGetSwapchainStatusKHR( vkGetInstanceProcAddr( instance, "vkGetSwapchainStatusKHR" ) ); //=== VK_KHR_external_fence_capabilities === vkGetPhysicalDeviceExternalFencePropertiesKHR = PFN_vkGetPhysicalDeviceExternalFencePropertiesKHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceExternalFencePropertiesKHR" ) ); if ( !vkGetPhysicalDeviceExternalFenceProperties ) vkGetPhysicalDeviceExternalFenceProperties = vkGetPhysicalDeviceExternalFencePropertiesKHR; #if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_KHR_external_fence_win32 === vkImportFenceWin32HandleKHR = PFN_vkImportFenceWin32HandleKHR( vkGetInstanceProcAddr( instance, "vkImportFenceWin32HandleKHR" ) ); vkGetFenceWin32HandleKHR = PFN_vkGetFenceWin32HandleKHR( vkGetInstanceProcAddr( instance, "vkGetFenceWin32HandleKHR" ) ); #endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_KHR_external_fence_fd === vkImportFenceFdKHR = PFN_vkImportFenceFdKHR( vkGetInstanceProcAddr( instance, "vkImportFenceFdKHR" ) ); vkGetFenceFdKHR = PFN_vkGetFenceFdKHR( vkGetInstanceProcAddr( instance, "vkGetFenceFdKHR" ) ); //=== VK_KHR_performance_query === vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR = PFN_vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR( vkGetInstanceProcAddr( instance, "vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR" ) ); vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR = PFN_vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR" ) ); vkAcquireProfilingLockKHR = PFN_vkAcquireProfilingLockKHR( vkGetInstanceProcAddr( instance, "vkAcquireProfilingLockKHR" ) ); vkReleaseProfilingLockKHR = PFN_vkReleaseProfilingLockKHR( vkGetInstanceProcAddr( instance, "vkReleaseProfilingLockKHR" ) ); //=== VK_KHR_get_surface_capabilities2 === vkGetPhysicalDeviceSurfaceCapabilities2KHR = PFN_vkGetPhysicalDeviceSurfaceCapabilities2KHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceSurfaceCapabilities2KHR" ) ); vkGetPhysicalDeviceSurfaceFormats2KHR = PFN_vkGetPhysicalDeviceSurfaceFormats2KHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceSurfaceFormats2KHR" ) ); //=== VK_KHR_get_display_properties2 === vkGetPhysicalDeviceDisplayProperties2KHR = PFN_vkGetPhysicalDeviceDisplayProperties2KHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceDisplayProperties2KHR" ) ); vkGetPhysicalDeviceDisplayPlaneProperties2KHR = PFN_vkGetPhysicalDeviceDisplayPlaneProperties2KHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceDisplayPlaneProperties2KHR" ) ); vkGetDisplayModeProperties2KHR = PFN_vkGetDisplayModeProperties2KHR( vkGetInstanceProcAddr( instance, "vkGetDisplayModeProperties2KHR" ) ); vkGetDisplayPlaneCapabilities2KHR = PFN_vkGetDisplayPlaneCapabilities2KHR( vkGetInstanceProcAddr( instance, "vkGetDisplayPlaneCapabilities2KHR" ) ); #if defined( VK_USE_PLATFORM_IOS_MVK ) //=== VK_MVK_ios_surface === vkCreateIOSSurfaceMVK = PFN_vkCreateIOSSurfaceMVK( vkGetInstanceProcAddr( instance, "vkCreateIOSSurfaceMVK" ) ); #endif /*VK_USE_PLATFORM_IOS_MVK*/ #if defined( VK_USE_PLATFORM_MACOS_MVK ) //=== VK_MVK_macos_surface === vkCreateMacOSSurfaceMVK = PFN_vkCreateMacOSSurfaceMVK( vkGetInstanceProcAddr( instance, "vkCreateMacOSSurfaceMVK" ) ); #endif /*VK_USE_PLATFORM_MACOS_MVK*/ //=== VK_EXT_debug_utils === vkSetDebugUtilsObjectNameEXT = PFN_vkSetDebugUtilsObjectNameEXT( vkGetInstanceProcAddr( instance, "vkSetDebugUtilsObjectNameEXT" ) ); vkSetDebugUtilsObjectTagEXT = PFN_vkSetDebugUtilsObjectTagEXT( vkGetInstanceProcAddr( instance, "vkSetDebugUtilsObjectTagEXT" ) ); vkQueueBeginDebugUtilsLabelEXT = PFN_vkQueueBeginDebugUtilsLabelEXT( vkGetInstanceProcAddr( instance, "vkQueueBeginDebugUtilsLabelEXT" ) ); vkQueueEndDebugUtilsLabelEXT = PFN_vkQueueEndDebugUtilsLabelEXT( vkGetInstanceProcAddr( instance, "vkQueueEndDebugUtilsLabelEXT" ) ); vkQueueInsertDebugUtilsLabelEXT = PFN_vkQueueInsertDebugUtilsLabelEXT( vkGetInstanceProcAddr( instance, "vkQueueInsertDebugUtilsLabelEXT" ) ); vkCmdBeginDebugUtilsLabelEXT = PFN_vkCmdBeginDebugUtilsLabelEXT( vkGetInstanceProcAddr( instance, "vkCmdBeginDebugUtilsLabelEXT" ) ); vkCmdEndDebugUtilsLabelEXT = PFN_vkCmdEndDebugUtilsLabelEXT( vkGetInstanceProcAddr( instance, "vkCmdEndDebugUtilsLabelEXT" ) ); vkCmdInsertDebugUtilsLabelEXT = PFN_vkCmdInsertDebugUtilsLabelEXT( vkGetInstanceProcAddr( instance, "vkCmdInsertDebugUtilsLabelEXT" ) ); vkCreateDebugUtilsMessengerEXT = PFN_vkCreateDebugUtilsMessengerEXT( vkGetInstanceProcAddr( instance, "vkCreateDebugUtilsMessengerEXT" ) ); vkDestroyDebugUtilsMessengerEXT = PFN_vkDestroyDebugUtilsMessengerEXT( vkGetInstanceProcAddr( instance, "vkDestroyDebugUtilsMessengerEXT" ) ); vkSubmitDebugUtilsMessageEXT = PFN_vkSubmitDebugUtilsMessageEXT( vkGetInstanceProcAddr( instance, "vkSubmitDebugUtilsMessageEXT" ) ); #if defined( VK_USE_PLATFORM_ANDROID_KHR ) //=== VK_ANDROID_external_memory_android_hardware_buffer === vkGetAndroidHardwareBufferPropertiesANDROID = PFN_vkGetAndroidHardwareBufferPropertiesANDROID( vkGetInstanceProcAddr( instance, "vkGetAndroidHardwareBufferPropertiesANDROID" ) ); vkGetMemoryAndroidHardwareBufferANDROID = PFN_vkGetMemoryAndroidHardwareBufferANDROID( vkGetInstanceProcAddr( instance, "vkGetMemoryAndroidHardwareBufferANDROID" ) ); #endif /*VK_USE_PLATFORM_ANDROID_KHR*/ #if defined( VK_ENABLE_BETA_EXTENSIONS ) //=== VK_AMDX_shader_enqueue === vkCreateExecutionGraphPipelinesAMDX = PFN_vkCreateExecutionGraphPipelinesAMDX( vkGetInstanceProcAddr( instance, "vkCreateExecutionGraphPipelinesAMDX" ) ); vkGetExecutionGraphPipelineScratchSizeAMDX = PFN_vkGetExecutionGraphPipelineScratchSizeAMDX( vkGetInstanceProcAddr( instance, "vkGetExecutionGraphPipelineScratchSizeAMDX" ) ); vkGetExecutionGraphPipelineNodeIndexAMDX = PFN_vkGetExecutionGraphPipelineNodeIndexAMDX( vkGetInstanceProcAddr( instance, "vkGetExecutionGraphPipelineNodeIndexAMDX" ) ); vkCmdInitializeGraphScratchMemoryAMDX = PFN_vkCmdInitializeGraphScratchMemoryAMDX( vkGetInstanceProcAddr( instance, "vkCmdInitializeGraphScratchMemoryAMDX" ) ); vkCmdDispatchGraphAMDX = PFN_vkCmdDispatchGraphAMDX( vkGetInstanceProcAddr( instance, "vkCmdDispatchGraphAMDX" ) ); vkCmdDispatchGraphIndirectAMDX = PFN_vkCmdDispatchGraphIndirectAMDX( vkGetInstanceProcAddr( instance, "vkCmdDispatchGraphIndirectAMDX" ) ); vkCmdDispatchGraphIndirectCountAMDX = PFN_vkCmdDispatchGraphIndirectCountAMDX( vkGetInstanceProcAddr( instance, "vkCmdDispatchGraphIndirectCountAMDX" ) ); #endif /*VK_ENABLE_BETA_EXTENSIONS*/ //=== VK_EXT_sample_locations === vkCmdSetSampleLocationsEXT = PFN_vkCmdSetSampleLocationsEXT( vkGetInstanceProcAddr( instance, "vkCmdSetSampleLocationsEXT" ) ); vkGetPhysicalDeviceMultisamplePropertiesEXT = PFN_vkGetPhysicalDeviceMultisamplePropertiesEXT( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceMultisamplePropertiesEXT" ) ); //=== VK_KHR_get_memory_requirements2 === vkGetImageMemoryRequirements2KHR = PFN_vkGetImageMemoryRequirements2KHR( vkGetInstanceProcAddr( instance, "vkGetImageMemoryRequirements2KHR" ) ); if ( !vkGetImageMemoryRequirements2 ) vkGetImageMemoryRequirements2 = vkGetImageMemoryRequirements2KHR; vkGetBufferMemoryRequirements2KHR = PFN_vkGetBufferMemoryRequirements2KHR( vkGetInstanceProcAddr( instance, "vkGetBufferMemoryRequirements2KHR" ) ); if ( !vkGetBufferMemoryRequirements2 ) vkGetBufferMemoryRequirements2 = vkGetBufferMemoryRequirements2KHR; vkGetImageSparseMemoryRequirements2KHR = PFN_vkGetImageSparseMemoryRequirements2KHR( vkGetInstanceProcAddr( instance, "vkGetImageSparseMemoryRequirements2KHR" ) ); if ( !vkGetImageSparseMemoryRequirements2 ) vkGetImageSparseMemoryRequirements2 = vkGetImageSparseMemoryRequirements2KHR; //=== VK_KHR_acceleration_structure === vkCreateAccelerationStructureKHR = PFN_vkCreateAccelerationStructureKHR( vkGetInstanceProcAddr( instance, "vkCreateAccelerationStructureKHR" ) ); vkDestroyAccelerationStructureKHR = PFN_vkDestroyAccelerationStructureKHR( vkGetInstanceProcAddr( instance, "vkDestroyAccelerationStructureKHR" ) ); vkCmdBuildAccelerationStructuresKHR = PFN_vkCmdBuildAccelerationStructuresKHR( vkGetInstanceProcAddr( instance, "vkCmdBuildAccelerationStructuresKHR" ) ); vkCmdBuildAccelerationStructuresIndirectKHR = PFN_vkCmdBuildAccelerationStructuresIndirectKHR( vkGetInstanceProcAddr( instance, "vkCmdBuildAccelerationStructuresIndirectKHR" ) ); vkBuildAccelerationStructuresKHR = PFN_vkBuildAccelerationStructuresKHR( vkGetInstanceProcAddr( instance, "vkBuildAccelerationStructuresKHR" ) ); vkCopyAccelerationStructureKHR = PFN_vkCopyAccelerationStructureKHR( vkGetInstanceProcAddr( instance, "vkCopyAccelerationStructureKHR" ) ); vkCopyAccelerationStructureToMemoryKHR = PFN_vkCopyAccelerationStructureToMemoryKHR( vkGetInstanceProcAddr( instance, "vkCopyAccelerationStructureToMemoryKHR" ) ); vkCopyMemoryToAccelerationStructureKHR = PFN_vkCopyMemoryToAccelerationStructureKHR( vkGetInstanceProcAddr( instance, "vkCopyMemoryToAccelerationStructureKHR" ) ); vkWriteAccelerationStructuresPropertiesKHR = PFN_vkWriteAccelerationStructuresPropertiesKHR( vkGetInstanceProcAddr( instance, "vkWriteAccelerationStructuresPropertiesKHR" ) ); vkCmdCopyAccelerationStructureKHR = PFN_vkCmdCopyAccelerationStructureKHR( vkGetInstanceProcAddr( instance, "vkCmdCopyAccelerationStructureKHR" ) ); vkCmdCopyAccelerationStructureToMemoryKHR = PFN_vkCmdCopyAccelerationStructureToMemoryKHR( vkGetInstanceProcAddr( instance, "vkCmdCopyAccelerationStructureToMemoryKHR" ) ); vkCmdCopyMemoryToAccelerationStructureKHR = PFN_vkCmdCopyMemoryToAccelerationStructureKHR( vkGetInstanceProcAddr( instance, "vkCmdCopyMemoryToAccelerationStructureKHR" ) ); vkGetAccelerationStructureDeviceAddressKHR = PFN_vkGetAccelerationStructureDeviceAddressKHR( vkGetInstanceProcAddr( instance, "vkGetAccelerationStructureDeviceAddressKHR" ) ); vkCmdWriteAccelerationStructuresPropertiesKHR = PFN_vkCmdWriteAccelerationStructuresPropertiesKHR( vkGetInstanceProcAddr( instance, "vkCmdWriteAccelerationStructuresPropertiesKHR" ) ); vkGetDeviceAccelerationStructureCompatibilityKHR = PFN_vkGetDeviceAccelerationStructureCompatibilityKHR( vkGetInstanceProcAddr( instance, "vkGetDeviceAccelerationStructureCompatibilityKHR" ) ); vkGetAccelerationStructureBuildSizesKHR = PFN_vkGetAccelerationStructureBuildSizesKHR( vkGetInstanceProcAddr( instance, "vkGetAccelerationStructureBuildSizesKHR" ) ); //=== VK_KHR_ray_tracing_pipeline === vkCmdTraceRaysKHR = PFN_vkCmdTraceRaysKHR( vkGetInstanceProcAddr( instance, "vkCmdTraceRaysKHR" ) ); vkCreateRayTracingPipelinesKHR = PFN_vkCreateRayTracingPipelinesKHR( vkGetInstanceProcAddr( instance, "vkCreateRayTracingPipelinesKHR" ) ); vkGetRayTracingShaderGroupHandlesKHR = PFN_vkGetRayTracingShaderGroupHandlesKHR( vkGetInstanceProcAddr( instance, "vkGetRayTracingShaderGroupHandlesKHR" ) ); vkGetRayTracingCaptureReplayShaderGroupHandlesKHR = PFN_vkGetRayTracingCaptureReplayShaderGroupHandlesKHR( vkGetInstanceProcAddr( instance, "vkGetRayTracingCaptureReplayShaderGroupHandlesKHR" ) ); vkCmdTraceRaysIndirectKHR = PFN_vkCmdTraceRaysIndirectKHR( vkGetInstanceProcAddr( instance, "vkCmdTraceRaysIndirectKHR" ) ); vkGetRayTracingShaderGroupStackSizeKHR = PFN_vkGetRayTracingShaderGroupStackSizeKHR( vkGetInstanceProcAddr( instance, "vkGetRayTracingShaderGroupStackSizeKHR" ) ); vkCmdSetRayTracingPipelineStackSizeKHR = PFN_vkCmdSetRayTracingPipelineStackSizeKHR( vkGetInstanceProcAddr( instance, "vkCmdSetRayTracingPipelineStackSizeKHR" ) ); //=== VK_KHR_sampler_ycbcr_conversion === vkCreateSamplerYcbcrConversionKHR = PFN_vkCreateSamplerYcbcrConversionKHR( vkGetInstanceProcAddr( instance, "vkCreateSamplerYcbcrConversionKHR" ) ); if ( !vkCreateSamplerYcbcrConversion ) vkCreateSamplerYcbcrConversion = vkCreateSamplerYcbcrConversionKHR; vkDestroySamplerYcbcrConversionKHR = PFN_vkDestroySamplerYcbcrConversionKHR( vkGetInstanceProcAddr( instance, "vkDestroySamplerYcbcrConversionKHR" ) ); if ( !vkDestroySamplerYcbcrConversion ) vkDestroySamplerYcbcrConversion = vkDestroySamplerYcbcrConversionKHR; //=== VK_KHR_bind_memory2 === vkBindBufferMemory2KHR = PFN_vkBindBufferMemory2KHR( vkGetInstanceProcAddr( instance, "vkBindBufferMemory2KHR" ) ); if ( !vkBindBufferMemory2 ) vkBindBufferMemory2 = vkBindBufferMemory2KHR; vkBindImageMemory2KHR = PFN_vkBindImageMemory2KHR( vkGetInstanceProcAddr( instance, "vkBindImageMemory2KHR" ) ); if ( !vkBindImageMemory2 ) vkBindImageMemory2 = vkBindImageMemory2KHR; //=== VK_EXT_image_drm_format_modifier === vkGetImageDrmFormatModifierPropertiesEXT = PFN_vkGetImageDrmFormatModifierPropertiesEXT( vkGetInstanceProcAddr( instance, "vkGetImageDrmFormatModifierPropertiesEXT" ) ); //=== VK_EXT_validation_cache === vkCreateValidationCacheEXT = PFN_vkCreateValidationCacheEXT( vkGetInstanceProcAddr( instance, "vkCreateValidationCacheEXT" ) ); vkDestroyValidationCacheEXT = PFN_vkDestroyValidationCacheEXT( vkGetInstanceProcAddr( instance, "vkDestroyValidationCacheEXT" ) ); vkMergeValidationCachesEXT = PFN_vkMergeValidationCachesEXT( vkGetInstanceProcAddr( instance, "vkMergeValidationCachesEXT" ) ); vkGetValidationCacheDataEXT = PFN_vkGetValidationCacheDataEXT( vkGetInstanceProcAddr( instance, "vkGetValidationCacheDataEXT" ) ); //=== VK_NV_shading_rate_image === vkCmdBindShadingRateImageNV = PFN_vkCmdBindShadingRateImageNV( vkGetInstanceProcAddr( instance, "vkCmdBindShadingRateImageNV" ) ); vkCmdSetViewportShadingRatePaletteNV = PFN_vkCmdSetViewportShadingRatePaletteNV( vkGetInstanceProcAddr( instance, "vkCmdSetViewportShadingRatePaletteNV" ) ); vkCmdSetCoarseSampleOrderNV = PFN_vkCmdSetCoarseSampleOrderNV( vkGetInstanceProcAddr( instance, "vkCmdSetCoarseSampleOrderNV" ) ); //=== VK_NV_ray_tracing === vkCreateAccelerationStructureNV = PFN_vkCreateAccelerationStructureNV( vkGetInstanceProcAddr( instance, "vkCreateAccelerationStructureNV" ) ); vkDestroyAccelerationStructureNV = PFN_vkDestroyAccelerationStructureNV( vkGetInstanceProcAddr( instance, "vkDestroyAccelerationStructureNV" ) ); vkGetAccelerationStructureMemoryRequirementsNV = PFN_vkGetAccelerationStructureMemoryRequirementsNV( vkGetInstanceProcAddr( instance, "vkGetAccelerationStructureMemoryRequirementsNV" ) ); vkBindAccelerationStructureMemoryNV = PFN_vkBindAccelerationStructureMemoryNV( vkGetInstanceProcAddr( instance, "vkBindAccelerationStructureMemoryNV" ) ); vkCmdBuildAccelerationStructureNV = PFN_vkCmdBuildAccelerationStructureNV( vkGetInstanceProcAddr( instance, "vkCmdBuildAccelerationStructureNV" ) ); vkCmdCopyAccelerationStructureNV = PFN_vkCmdCopyAccelerationStructureNV( vkGetInstanceProcAddr( instance, "vkCmdCopyAccelerationStructureNV" ) ); vkCmdTraceRaysNV = PFN_vkCmdTraceRaysNV( vkGetInstanceProcAddr( instance, "vkCmdTraceRaysNV" ) ); vkCreateRayTracingPipelinesNV = PFN_vkCreateRayTracingPipelinesNV( vkGetInstanceProcAddr( instance, "vkCreateRayTracingPipelinesNV" ) ); vkGetRayTracingShaderGroupHandlesNV = PFN_vkGetRayTracingShaderGroupHandlesNV( vkGetInstanceProcAddr( instance, "vkGetRayTracingShaderGroupHandlesNV" ) ); if ( !vkGetRayTracingShaderGroupHandlesKHR ) vkGetRayTracingShaderGroupHandlesKHR = vkGetRayTracingShaderGroupHandlesNV; vkGetAccelerationStructureHandleNV = PFN_vkGetAccelerationStructureHandleNV( vkGetInstanceProcAddr( instance, "vkGetAccelerationStructureHandleNV" ) ); vkCmdWriteAccelerationStructuresPropertiesNV = PFN_vkCmdWriteAccelerationStructuresPropertiesNV( vkGetInstanceProcAddr( instance, "vkCmdWriteAccelerationStructuresPropertiesNV" ) ); vkCompileDeferredNV = PFN_vkCompileDeferredNV( vkGetInstanceProcAddr( instance, "vkCompileDeferredNV" ) ); //=== VK_KHR_maintenance3 === vkGetDescriptorSetLayoutSupportKHR = PFN_vkGetDescriptorSetLayoutSupportKHR( vkGetInstanceProcAddr( instance, "vkGetDescriptorSetLayoutSupportKHR" ) ); if ( !vkGetDescriptorSetLayoutSupport ) vkGetDescriptorSetLayoutSupport = vkGetDescriptorSetLayoutSupportKHR; //=== VK_KHR_draw_indirect_count === vkCmdDrawIndirectCountKHR = PFN_vkCmdDrawIndirectCountKHR( vkGetInstanceProcAddr( instance, "vkCmdDrawIndirectCountKHR" ) ); if ( !vkCmdDrawIndirectCount ) vkCmdDrawIndirectCount = vkCmdDrawIndirectCountKHR; vkCmdDrawIndexedIndirectCountKHR = PFN_vkCmdDrawIndexedIndirectCountKHR( vkGetInstanceProcAddr( instance, "vkCmdDrawIndexedIndirectCountKHR" ) ); if ( !vkCmdDrawIndexedIndirectCount ) vkCmdDrawIndexedIndirectCount = vkCmdDrawIndexedIndirectCountKHR; //=== VK_EXT_external_memory_host === vkGetMemoryHostPointerPropertiesEXT = PFN_vkGetMemoryHostPointerPropertiesEXT( vkGetInstanceProcAddr( instance, "vkGetMemoryHostPointerPropertiesEXT" ) ); //=== VK_AMD_buffer_marker === vkCmdWriteBufferMarkerAMD = PFN_vkCmdWriteBufferMarkerAMD( vkGetInstanceProcAddr( instance, "vkCmdWriteBufferMarkerAMD" ) ); vkCmdWriteBufferMarker2AMD = PFN_vkCmdWriteBufferMarker2AMD( vkGetInstanceProcAddr( instance, "vkCmdWriteBufferMarker2AMD" ) ); //=== VK_EXT_calibrated_timestamps === vkGetPhysicalDeviceCalibrateableTimeDomainsEXT = PFN_vkGetPhysicalDeviceCalibrateableTimeDomainsEXT( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceCalibrateableTimeDomainsEXT" ) ); if ( !vkGetPhysicalDeviceCalibrateableTimeDomainsKHR ) vkGetPhysicalDeviceCalibrateableTimeDomainsKHR = vkGetPhysicalDeviceCalibrateableTimeDomainsEXT; vkGetCalibratedTimestampsEXT = PFN_vkGetCalibratedTimestampsEXT( vkGetInstanceProcAddr( instance, "vkGetCalibratedTimestampsEXT" ) ); if ( !vkGetCalibratedTimestampsKHR ) vkGetCalibratedTimestampsKHR = vkGetCalibratedTimestampsEXT; //=== VK_NV_mesh_shader === vkCmdDrawMeshTasksNV = PFN_vkCmdDrawMeshTasksNV( vkGetInstanceProcAddr( instance, "vkCmdDrawMeshTasksNV" ) ); vkCmdDrawMeshTasksIndirectNV = PFN_vkCmdDrawMeshTasksIndirectNV( vkGetInstanceProcAddr( instance, "vkCmdDrawMeshTasksIndirectNV" ) ); vkCmdDrawMeshTasksIndirectCountNV = PFN_vkCmdDrawMeshTasksIndirectCountNV( vkGetInstanceProcAddr( instance, "vkCmdDrawMeshTasksIndirectCountNV" ) ); //=== VK_NV_scissor_exclusive === vkCmdSetExclusiveScissorEnableNV = PFN_vkCmdSetExclusiveScissorEnableNV( vkGetInstanceProcAddr( instance, "vkCmdSetExclusiveScissorEnableNV" ) ); vkCmdSetExclusiveScissorNV = PFN_vkCmdSetExclusiveScissorNV( vkGetInstanceProcAddr( instance, "vkCmdSetExclusiveScissorNV" ) ); //=== VK_NV_device_diagnostic_checkpoints === vkCmdSetCheckpointNV = PFN_vkCmdSetCheckpointNV( vkGetInstanceProcAddr( instance, "vkCmdSetCheckpointNV" ) ); vkGetQueueCheckpointDataNV = PFN_vkGetQueueCheckpointDataNV( vkGetInstanceProcAddr( instance, "vkGetQueueCheckpointDataNV" ) ); vkGetQueueCheckpointData2NV = PFN_vkGetQueueCheckpointData2NV( vkGetInstanceProcAddr( instance, "vkGetQueueCheckpointData2NV" ) ); //=== VK_KHR_timeline_semaphore === vkGetSemaphoreCounterValueKHR = PFN_vkGetSemaphoreCounterValueKHR( vkGetInstanceProcAddr( instance, "vkGetSemaphoreCounterValueKHR" ) ); if ( !vkGetSemaphoreCounterValue ) vkGetSemaphoreCounterValue = vkGetSemaphoreCounterValueKHR; vkWaitSemaphoresKHR = PFN_vkWaitSemaphoresKHR( vkGetInstanceProcAddr( instance, "vkWaitSemaphoresKHR" ) ); if ( !vkWaitSemaphores ) vkWaitSemaphores = vkWaitSemaphoresKHR; vkSignalSemaphoreKHR = PFN_vkSignalSemaphoreKHR( vkGetInstanceProcAddr( instance, "vkSignalSemaphoreKHR" ) ); if ( !vkSignalSemaphore ) vkSignalSemaphore = vkSignalSemaphoreKHR; //=== VK_INTEL_performance_query === vkInitializePerformanceApiINTEL = PFN_vkInitializePerformanceApiINTEL( vkGetInstanceProcAddr( instance, "vkInitializePerformanceApiINTEL" ) ); vkUninitializePerformanceApiINTEL = PFN_vkUninitializePerformanceApiINTEL( vkGetInstanceProcAddr( instance, "vkUninitializePerformanceApiINTEL" ) ); vkCmdSetPerformanceMarkerINTEL = PFN_vkCmdSetPerformanceMarkerINTEL( vkGetInstanceProcAddr( instance, "vkCmdSetPerformanceMarkerINTEL" ) ); vkCmdSetPerformanceStreamMarkerINTEL = PFN_vkCmdSetPerformanceStreamMarkerINTEL( vkGetInstanceProcAddr( instance, "vkCmdSetPerformanceStreamMarkerINTEL" ) ); vkCmdSetPerformanceOverrideINTEL = PFN_vkCmdSetPerformanceOverrideINTEL( vkGetInstanceProcAddr( instance, "vkCmdSetPerformanceOverrideINTEL" ) ); vkAcquirePerformanceConfigurationINTEL = PFN_vkAcquirePerformanceConfigurationINTEL( vkGetInstanceProcAddr( instance, "vkAcquirePerformanceConfigurationINTEL" ) ); vkReleasePerformanceConfigurationINTEL = PFN_vkReleasePerformanceConfigurationINTEL( vkGetInstanceProcAddr( instance, "vkReleasePerformanceConfigurationINTEL" ) ); vkQueueSetPerformanceConfigurationINTEL = PFN_vkQueueSetPerformanceConfigurationINTEL( vkGetInstanceProcAddr( instance, "vkQueueSetPerformanceConfigurationINTEL" ) ); vkGetPerformanceParameterINTEL = PFN_vkGetPerformanceParameterINTEL( vkGetInstanceProcAddr( instance, "vkGetPerformanceParameterINTEL" ) ); //=== VK_AMD_display_native_hdr === vkSetLocalDimmingAMD = PFN_vkSetLocalDimmingAMD( vkGetInstanceProcAddr( instance, "vkSetLocalDimmingAMD" ) ); #if defined( VK_USE_PLATFORM_FUCHSIA ) //=== VK_FUCHSIA_imagepipe_surface === vkCreateImagePipeSurfaceFUCHSIA = PFN_vkCreateImagePipeSurfaceFUCHSIA( vkGetInstanceProcAddr( instance, "vkCreateImagePipeSurfaceFUCHSIA" ) ); #endif /*VK_USE_PLATFORM_FUCHSIA*/ #if defined( VK_USE_PLATFORM_METAL_EXT ) //=== VK_EXT_metal_surface === vkCreateMetalSurfaceEXT = PFN_vkCreateMetalSurfaceEXT( vkGetInstanceProcAddr( instance, "vkCreateMetalSurfaceEXT" ) ); #endif /*VK_USE_PLATFORM_METAL_EXT*/ //=== VK_KHR_fragment_shading_rate === vkGetPhysicalDeviceFragmentShadingRatesKHR = PFN_vkGetPhysicalDeviceFragmentShadingRatesKHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceFragmentShadingRatesKHR" ) ); vkCmdSetFragmentShadingRateKHR = PFN_vkCmdSetFragmentShadingRateKHR( vkGetInstanceProcAddr( instance, "vkCmdSetFragmentShadingRateKHR" ) ); //=== VK_KHR_dynamic_rendering_local_read === vkCmdSetRenderingAttachmentLocationsKHR = PFN_vkCmdSetRenderingAttachmentLocationsKHR( vkGetInstanceProcAddr( instance, "vkCmdSetRenderingAttachmentLocationsKHR" ) ); if ( !vkCmdSetRenderingAttachmentLocations ) vkCmdSetRenderingAttachmentLocations = vkCmdSetRenderingAttachmentLocationsKHR; vkCmdSetRenderingInputAttachmentIndicesKHR = PFN_vkCmdSetRenderingInputAttachmentIndicesKHR( vkGetInstanceProcAddr( instance, "vkCmdSetRenderingInputAttachmentIndicesKHR" ) ); if ( !vkCmdSetRenderingInputAttachmentIndices ) vkCmdSetRenderingInputAttachmentIndices = vkCmdSetRenderingInputAttachmentIndicesKHR; //=== VK_EXT_buffer_device_address === vkGetBufferDeviceAddressEXT = PFN_vkGetBufferDeviceAddressEXT( vkGetInstanceProcAddr( instance, "vkGetBufferDeviceAddressEXT" ) ); if ( !vkGetBufferDeviceAddress ) vkGetBufferDeviceAddress = vkGetBufferDeviceAddressEXT; //=== VK_EXT_tooling_info === vkGetPhysicalDeviceToolPropertiesEXT = PFN_vkGetPhysicalDeviceToolPropertiesEXT( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceToolPropertiesEXT" ) ); if ( !vkGetPhysicalDeviceToolProperties ) vkGetPhysicalDeviceToolProperties = vkGetPhysicalDeviceToolPropertiesEXT; //=== VK_KHR_present_wait === vkWaitForPresentKHR = PFN_vkWaitForPresentKHR( vkGetInstanceProcAddr( instance, "vkWaitForPresentKHR" ) ); //=== VK_NV_cooperative_matrix === vkGetPhysicalDeviceCooperativeMatrixPropertiesNV = PFN_vkGetPhysicalDeviceCooperativeMatrixPropertiesNV( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceCooperativeMatrixPropertiesNV" ) ); //=== VK_NV_coverage_reduction_mode === vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV = PFN_vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV" ) ); #if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_EXT_full_screen_exclusive === vkGetPhysicalDeviceSurfacePresentModes2EXT = PFN_vkGetPhysicalDeviceSurfacePresentModes2EXT( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceSurfacePresentModes2EXT" ) ); vkAcquireFullScreenExclusiveModeEXT = PFN_vkAcquireFullScreenExclusiveModeEXT( vkGetInstanceProcAddr( instance, "vkAcquireFullScreenExclusiveModeEXT" ) ); vkReleaseFullScreenExclusiveModeEXT = PFN_vkReleaseFullScreenExclusiveModeEXT( vkGetInstanceProcAddr( instance, "vkReleaseFullScreenExclusiveModeEXT" ) ); vkGetDeviceGroupSurfacePresentModes2EXT = PFN_vkGetDeviceGroupSurfacePresentModes2EXT( vkGetInstanceProcAddr( instance, "vkGetDeviceGroupSurfacePresentModes2EXT" ) ); #endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_EXT_headless_surface === vkCreateHeadlessSurfaceEXT = PFN_vkCreateHeadlessSurfaceEXT( vkGetInstanceProcAddr( instance, "vkCreateHeadlessSurfaceEXT" ) ); //=== VK_KHR_buffer_device_address === vkGetBufferDeviceAddressKHR = PFN_vkGetBufferDeviceAddressKHR( vkGetInstanceProcAddr( instance, "vkGetBufferDeviceAddressKHR" ) ); if ( !vkGetBufferDeviceAddress ) vkGetBufferDeviceAddress = vkGetBufferDeviceAddressKHR; vkGetBufferOpaqueCaptureAddressKHR = PFN_vkGetBufferOpaqueCaptureAddressKHR( vkGetInstanceProcAddr( instance, "vkGetBufferOpaqueCaptureAddressKHR" ) ); if ( !vkGetBufferOpaqueCaptureAddress ) vkGetBufferOpaqueCaptureAddress = vkGetBufferOpaqueCaptureAddressKHR; vkGetDeviceMemoryOpaqueCaptureAddressKHR = PFN_vkGetDeviceMemoryOpaqueCaptureAddressKHR( vkGetInstanceProcAddr( instance, "vkGetDeviceMemoryOpaqueCaptureAddressKHR" ) ); if ( !vkGetDeviceMemoryOpaqueCaptureAddress ) vkGetDeviceMemoryOpaqueCaptureAddress = vkGetDeviceMemoryOpaqueCaptureAddressKHR; //=== VK_EXT_line_rasterization === vkCmdSetLineStippleEXT = PFN_vkCmdSetLineStippleEXT( vkGetInstanceProcAddr( instance, "vkCmdSetLineStippleEXT" ) ); if ( !vkCmdSetLineStipple ) vkCmdSetLineStipple = vkCmdSetLineStippleEXT; //=== VK_EXT_host_query_reset === vkResetQueryPoolEXT = PFN_vkResetQueryPoolEXT( vkGetInstanceProcAddr( instance, "vkResetQueryPoolEXT" ) ); if ( !vkResetQueryPool ) vkResetQueryPool = vkResetQueryPoolEXT; //=== VK_EXT_extended_dynamic_state === vkCmdSetCullModeEXT = PFN_vkCmdSetCullModeEXT( vkGetInstanceProcAddr( instance, "vkCmdSetCullModeEXT" ) ); if ( !vkCmdSetCullMode ) vkCmdSetCullMode = vkCmdSetCullModeEXT; vkCmdSetFrontFaceEXT = PFN_vkCmdSetFrontFaceEXT( vkGetInstanceProcAddr( instance, "vkCmdSetFrontFaceEXT" ) ); if ( !vkCmdSetFrontFace ) vkCmdSetFrontFace = vkCmdSetFrontFaceEXT; vkCmdSetPrimitiveTopologyEXT = PFN_vkCmdSetPrimitiveTopologyEXT( vkGetInstanceProcAddr( instance, "vkCmdSetPrimitiveTopologyEXT" ) ); if ( !vkCmdSetPrimitiveTopology ) vkCmdSetPrimitiveTopology = vkCmdSetPrimitiveTopologyEXT; vkCmdSetViewportWithCountEXT = PFN_vkCmdSetViewportWithCountEXT( vkGetInstanceProcAddr( instance, "vkCmdSetViewportWithCountEXT" ) ); if ( !vkCmdSetViewportWithCount ) vkCmdSetViewportWithCount = vkCmdSetViewportWithCountEXT; vkCmdSetScissorWithCountEXT = PFN_vkCmdSetScissorWithCountEXT( vkGetInstanceProcAddr( instance, "vkCmdSetScissorWithCountEXT" ) ); if ( !vkCmdSetScissorWithCount ) vkCmdSetScissorWithCount = vkCmdSetScissorWithCountEXT; vkCmdBindVertexBuffers2EXT = PFN_vkCmdBindVertexBuffers2EXT( vkGetInstanceProcAddr( instance, "vkCmdBindVertexBuffers2EXT" ) ); if ( !vkCmdBindVertexBuffers2 ) vkCmdBindVertexBuffers2 = vkCmdBindVertexBuffers2EXT; vkCmdSetDepthTestEnableEXT = PFN_vkCmdSetDepthTestEnableEXT( vkGetInstanceProcAddr( instance, "vkCmdSetDepthTestEnableEXT" ) ); if ( !vkCmdSetDepthTestEnable ) vkCmdSetDepthTestEnable = vkCmdSetDepthTestEnableEXT; vkCmdSetDepthWriteEnableEXT = PFN_vkCmdSetDepthWriteEnableEXT( vkGetInstanceProcAddr( instance, "vkCmdSetDepthWriteEnableEXT" ) ); if ( !vkCmdSetDepthWriteEnable ) vkCmdSetDepthWriteEnable = vkCmdSetDepthWriteEnableEXT; vkCmdSetDepthCompareOpEXT = PFN_vkCmdSetDepthCompareOpEXT( vkGetInstanceProcAddr( instance, "vkCmdSetDepthCompareOpEXT" ) ); if ( !vkCmdSetDepthCompareOp ) vkCmdSetDepthCompareOp = vkCmdSetDepthCompareOpEXT; vkCmdSetDepthBoundsTestEnableEXT = PFN_vkCmdSetDepthBoundsTestEnableEXT( vkGetInstanceProcAddr( instance, "vkCmdSetDepthBoundsTestEnableEXT" ) ); if ( !vkCmdSetDepthBoundsTestEnable ) vkCmdSetDepthBoundsTestEnable = vkCmdSetDepthBoundsTestEnableEXT; vkCmdSetStencilTestEnableEXT = PFN_vkCmdSetStencilTestEnableEXT( vkGetInstanceProcAddr( instance, "vkCmdSetStencilTestEnableEXT" ) ); if ( !vkCmdSetStencilTestEnable ) vkCmdSetStencilTestEnable = vkCmdSetStencilTestEnableEXT; vkCmdSetStencilOpEXT = PFN_vkCmdSetStencilOpEXT( vkGetInstanceProcAddr( instance, "vkCmdSetStencilOpEXT" ) ); if ( !vkCmdSetStencilOp ) vkCmdSetStencilOp = vkCmdSetStencilOpEXT; //=== VK_KHR_deferred_host_operations === vkCreateDeferredOperationKHR = PFN_vkCreateDeferredOperationKHR( vkGetInstanceProcAddr( instance, "vkCreateDeferredOperationKHR" ) ); vkDestroyDeferredOperationKHR = PFN_vkDestroyDeferredOperationKHR( vkGetInstanceProcAddr( instance, "vkDestroyDeferredOperationKHR" ) ); vkGetDeferredOperationMaxConcurrencyKHR = PFN_vkGetDeferredOperationMaxConcurrencyKHR( vkGetInstanceProcAddr( instance, "vkGetDeferredOperationMaxConcurrencyKHR" ) ); vkGetDeferredOperationResultKHR = PFN_vkGetDeferredOperationResultKHR( vkGetInstanceProcAddr( instance, "vkGetDeferredOperationResultKHR" ) ); vkDeferredOperationJoinKHR = PFN_vkDeferredOperationJoinKHR( vkGetInstanceProcAddr( instance, "vkDeferredOperationJoinKHR" ) ); //=== VK_KHR_pipeline_executable_properties === vkGetPipelineExecutablePropertiesKHR = PFN_vkGetPipelineExecutablePropertiesKHR( vkGetInstanceProcAddr( instance, "vkGetPipelineExecutablePropertiesKHR" ) ); vkGetPipelineExecutableStatisticsKHR = PFN_vkGetPipelineExecutableStatisticsKHR( vkGetInstanceProcAddr( instance, "vkGetPipelineExecutableStatisticsKHR" ) ); vkGetPipelineExecutableInternalRepresentationsKHR = PFN_vkGetPipelineExecutableInternalRepresentationsKHR( vkGetInstanceProcAddr( instance, "vkGetPipelineExecutableInternalRepresentationsKHR" ) ); //=== VK_EXT_host_image_copy === vkCopyMemoryToImageEXT = PFN_vkCopyMemoryToImageEXT( vkGetInstanceProcAddr( instance, "vkCopyMemoryToImageEXT" ) ); if ( !vkCopyMemoryToImage ) vkCopyMemoryToImage = vkCopyMemoryToImageEXT; vkCopyImageToMemoryEXT = PFN_vkCopyImageToMemoryEXT( vkGetInstanceProcAddr( instance, "vkCopyImageToMemoryEXT" ) ); if ( !vkCopyImageToMemory ) vkCopyImageToMemory = vkCopyImageToMemoryEXT; vkCopyImageToImageEXT = PFN_vkCopyImageToImageEXT( vkGetInstanceProcAddr( instance, "vkCopyImageToImageEXT" ) ); if ( !vkCopyImageToImage ) vkCopyImageToImage = vkCopyImageToImageEXT; vkTransitionImageLayoutEXT = PFN_vkTransitionImageLayoutEXT( vkGetInstanceProcAddr( instance, "vkTransitionImageLayoutEXT" ) ); if ( !vkTransitionImageLayout ) vkTransitionImageLayout = vkTransitionImageLayoutEXT; vkGetImageSubresourceLayout2EXT = PFN_vkGetImageSubresourceLayout2EXT( vkGetInstanceProcAddr( instance, "vkGetImageSubresourceLayout2EXT" ) ); if ( !vkGetImageSubresourceLayout2 ) vkGetImageSubresourceLayout2 = vkGetImageSubresourceLayout2EXT; //=== VK_KHR_map_memory2 === vkMapMemory2KHR = PFN_vkMapMemory2KHR( vkGetInstanceProcAddr( instance, "vkMapMemory2KHR" ) ); if ( !vkMapMemory2 ) vkMapMemory2 = vkMapMemory2KHR; vkUnmapMemory2KHR = PFN_vkUnmapMemory2KHR( vkGetInstanceProcAddr( instance, "vkUnmapMemory2KHR" ) ); if ( !vkUnmapMemory2 ) vkUnmapMemory2 = vkUnmapMemory2KHR; //=== VK_EXT_swapchain_maintenance1 === vkReleaseSwapchainImagesEXT = PFN_vkReleaseSwapchainImagesEXT( vkGetInstanceProcAddr( instance, "vkReleaseSwapchainImagesEXT" ) ); //=== VK_NV_device_generated_commands === vkGetGeneratedCommandsMemoryRequirementsNV = PFN_vkGetGeneratedCommandsMemoryRequirementsNV( vkGetInstanceProcAddr( instance, "vkGetGeneratedCommandsMemoryRequirementsNV" ) ); vkCmdPreprocessGeneratedCommandsNV = PFN_vkCmdPreprocessGeneratedCommandsNV( vkGetInstanceProcAddr( instance, "vkCmdPreprocessGeneratedCommandsNV" ) ); vkCmdExecuteGeneratedCommandsNV = PFN_vkCmdExecuteGeneratedCommandsNV( vkGetInstanceProcAddr( instance, "vkCmdExecuteGeneratedCommandsNV" ) ); vkCmdBindPipelineShaderGroupNV = PFN_vkCmdBindPipelineShaderGroupNV( vkGetInstanceProcAddr( instance, "vkCmdBindPipelineShaderGroupNV" ) ); vkCreateIndirectCommandsLayoutNV = PFN_vkCreateIndirectCommandsLayoutNV( vkGetInstanceProcAddr( instance, "vkCreateIndirectCommandsLayoutNV" ) ); vkDestroyIndirectCommandsLayoutNV = PFN_vkDestroyIndirectCommandsLayoutNV( vkGetInstanceProcAddr( instance, "vkDestroyIndirectCommandsLayoutNV" ) ); //=== VK_EXT_depth_bias_control === vkCmdSetDepthBias2EXT = PFN_vkCmdSetDepthBias2EXT( vkGetInstanceProcAddr( instance, "vkCmdSetDepthBias2EXT" ) ); //=== VK_EXT_acquire_drm_display === vkAcquireDrmDisplayEXT = PFN_vkAcquireDrmDisplayEXT( vkGetInstanceProcAddr( instance, "vkAcquireDrmDisplayEXT" ) ); vkGetDrmDisplayEXT = PFN_vkGetDrmDisplayEXT( vkGetInstanceProcAddr( instance, "vkGetDrmDisplayEXT" ) ); //=== VK_EXT_private_data === vkCreatePrivateDataSlotEXT = PFN_vkCreatePrivateDataSlotEXT( vkGetInstanceProcAddr( instance, "vkCreatePrivateDataSlotEXT" ) ); if ( !vkCreatePrivateDataSlot ) vkCreatePrivateDataSlot = vkCreatePrivateDataSlotEXT; vkDestroyPrivateDataSlotEXT = PFN_vkDestroyPrivateDataSlotEXT( vkGetInstanceProcAddr( instance, "vkDestroyPrivateDataSlotEXT" ) ); if ( !vkDestroyPrivateDataSlot ) vkDestroyPrivateDataSlot = vkDestroyPrivateDataSlotEXT; vkSetPrivateDataEXT = PFN_vkSetPrivateDataEXT( vkGetInstanceProcAddr( instance, "vkSetPrivateDataEXT" ) ); if ( !vkSetPrivateData ) vkSetPrivateData = vkSetPrivateDataEXT; vkGetPrivateDataEXT = PFN_vkGetPrivateDataEXT( vkGetInstanceProcAddr( instance, "vkGetPrivateDataEXT" ) ); if ( !vkGetPrivateData ) vkGetPrivateData = vkGetPrivateDataEXT; //=== VK_KHR_video_encode_queue === vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR = PFN_vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR" ) ); vkGetEncodedVideoSessionParametersKHR = PFN_vkGetEncodedVideoSessionParametersKHR( vkGetInstanceProcAddr( instance, "vkGetEncodedVideoSessionParametersKHR" ) ); vkCmdEncodeVideoKHR = PFN_vkCmdEncodeVideoKHR( vkGetInstanceProcAddr( instance, "vkCmdEncodeVideoKHR" ) ); #if defined( VK_ENABLE_BETA_EXTENSIONS ) //=== VK_NV_cuda_kernel_launch === vkCreateCudaModuleNV = PFN_vkCreateCudaModuleNV( vkGetInstanceProcAddr( instance, "vkCreateCudaModuleNV" ) ); vkGetCudaModuleCacheNV = PFN_vkGetCudaModuleCacheNV( vkGetInstanceProcAddr( instance, "vkGetCudaModuleCacheNV" ) ); vkCreateCudaFunctionNV = PFN_vkCreateCudaFunctionNV( vkGetInstanceProcAddr( instance, "vkCreateCudaFunctionNV" ) ); vkDestroyCudaModuleNV = PFN_vkDestroyCudaModuleNV( vkGetInstanceProcAddr( instance, "vkDestroyCudaModuleNV" ) ); vkDestroyCudaFunctionNV = PFN_vkDestroyCudaFunctionNV( vkGetInstanceProcAddr( instance, "vkDestroyCudaFunctionNV" ) ); vkCmdCudaLaunchKernelNV = PFN_vkCmdCudaLaunchKernelNV( vkGetInstanceProcAddr( instance, "vkCmdCudaLaunchKernelNV" ) ); #endif /*VK_ENABLE_BETA_EXTENSIONS*/ #if defined( VK_USE_PLATFORM_METAL_EXT ) //=== VK_EXT_metal_objects === vkExportMetalObjectsEXT = PFN_vkExportMetalObjectsEXT( vkGetInstanceProcAddr( instance, "vkExportMetalObjectsEXT" ) ); #endif /*VK_USE_PLATFORM_METAL_EXT*/ //=== VK_KHR_synchronization2 === vkCmdSetEvent2KHR = PFN_vkCmdSetEvent2KHR( vkGetInstanceProcAddr( instance, "vkCmdSetEvent2KHR" ) ); if ( !vkCmdSetEvent2 ) vkCmdSetEvent2 = vkCmdSetEvent2KHR; vkCmdResetEvent2KHR = PFN_vkCmdResetEvent2KHR( vkGetInstanceProcAddr( instance, "vkCmdResetEvent2KHR" ) ); if ( !vkCmdResetEvent2 ) vkCmdResetEvent2 = vkCmdResetEvent2KHR; vkCmdWaitEvents2KHR = PFN_vkCmdWaitEvents2KHR( vkGetInstanceProcAddr( instance, "vkCmdWaitEvents2KHR" ) ); if ( !vkCmdWaitEvents2 ) vkCmdWaitEvents2 = vkCmdWaitEvents2KHR; vkCmdPipelineBarrier2KHR = PFN_vkCmdPipelineBarrier2KHR( vkGetInstanceProcAddr( instance, "vkCmdPipelineBarrier2KHR" ) ); if ( !vkCmdPipelineBarrier2 ) vkCmdPipelineBarrier2 = vkCmdPipelineBarrier2KHR; vkCmdWriteTimestamp2KHR = PFN_vkCmdWriteTimestamp2KHR( vkGetInstanceProcAddr( instance, "vkCmdWriteTimestamp2KHR" ) ); if ( !vkCmdWriteTimestamp2 ) vkCmdWriteTimestamp2 = vkCmdWriteTimestamp2KHR; vkQueueSubmit2KHR = PFN_vkQueueSubmit2KHR( vkGetInstanceProcAddr( instance, "vkQueueSubmit2KHR" ) ); if ( !vkQueueSubmit2 ) vkQueueSubmit2 = vkQueueSubmit2KHR; //=== VK_EXT_descriptor_buffer === vkGetDescriptorSetLayoutSizeEXT = PFN_vkGetDescriptorSetLayoutSizeEXT( vkGetInstanceProcAddr( instance, "vkGetDescriptorSetLayoutSizeEXT" ) ); vkGetDescriptorSetLayoutBindingOffsetEXT = PFN_vkGetDescriptorSetLayoutBindingOffsetEXT( vkGetInstanceProcAddr( instance, "vkGetDescriptorSetLayoutBindingOffsetEXT" ) ); vkGetDescriptorEXT = PFN_vkGetDescriptorEXT( vkGetInstanceProcAddr( instance, "vkGetDescriptorEXT" ) ); vkCmdBindDescriptorBuffersEXT = PFN_vkCmdBindDescriptorBuffersEXT( vkGetInstanceProcAddr( instance, "vkCmdBindDescriptorBuffersEXT" ) ); vkCmdSetDescriptorBufferOffsetsEXT = PFN_vkCmdSetDescriptorBufferOffsetsEXT( vkGetInstanceProcAddr( instance, "vkCmdSetDescriptorBufferOffsetsEXT" ) ); vkCmdBindDescriptorBufferEmbeddedSamplersEXT = PFN_vkCmdBindDescriptorBufferEmbeddedSamplersEXT( vkGetInstanceProcAddr( instance, "vkCmdBindDescriptorBufferEmbeddedSamplersEXT" ) ); vkGetBufferOpaqueCaptureDescriptorDataEXT = PFN_vkGetBufferOpaqueCaptureDescriptorDataEXT( vkGetInstanceProcAddr( instance, "vkGetBufferOpaqueCaptureDescriptorDataEXT" ) ); vkGetImageOpaqueCaptureDescriptorDataEXT = PFN_vkGetImageOpaqueCaptureDescriptorDataEXT( vkGetInstanceProcAddr( instance, "vkGetImageOpaqueCaptureDescriptorDataEXT" ) ); vkGetImageViewOpaqueCaptureDescriptorDataEXT = PFN_vkGetImageViewOpaqueCaptureDescriptorDataEXT( vkGetInstanceProcAddr( instance, "vkGetImageViewOpaqueCaptureDescriptorDataEXT" ) ); vkGetSamplerOpaqueCaptureDescriptorDataEXT = PFN_vkGetSamplerOpaqueCaptureDescriptorDataEXT( vkGetInstanceProcAddr( instance, "vkGetSamplerOpaqueCaptureDescriptorDataEXT" ) ); vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT = PFN_vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT( vkGetInstanceProcAddr( instance, "vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT" ) ); //=== VK_NV_fragment_shading_rate_enums === vkCmdSetFragmentShadingRateEnumNV = PFN_vkCmdSetFragmentShadingRateEnumNV( vkGetInstanceProcAddr( instance, "vkCmdSetFragmentShadingRateEnumNV" ) ); //=== VK_EXT_mesh_shader === vkCmdDrawMeshTasksEXT = PFN_vkCmdDrawMeshTasksEXT( vkGetInstanceProcAddr( instance, "vkCmdDrawMeshTasksEXT" ) ); vkCmdDrawMeshTasksIndirectEXT = PFN_vkCmdDrawMeshTasksIndirectEXT( vkGetInstanceProcAddr( instance, "vkCmdDrawMeshTasksIndirectEXT" ) ); vkCmdDrawMeshTasksIndirectCountEXT = PFN_vkCmdDrawMeshTasksIndirectCountEXT( vkGetInstanceProcAddr( instance, "vkCmdDrawMeshTasksIndirectCountEXT" ) ); //=== VK_KHR_copy_commands2 === vkCmdCopyBuffer2KHR = PFN_vkCmdCopyBuffer2KHR( vkGetInstanceProcAddr( instance, "vkCmdCopyBuffer2KHR" ) ); if ( !vkCmdCopyBuffer2 ) vkCmdCopyBuffer2 = vkCmdCopyBuffer2KHR; vkCmdCopyImage2KHR = PFN_vkCmdCopyImage2KHR( vkGetInstanceProcAddr( instance, "vkCmdCopyImage2KHR" ) ); if ( !vkCmdCopyImage2 ) vkCmdCopyImage2 = vkCmdCopyImage2KHR; vkCmdCopyBufferToImage2KHR = PFN_vkCmdCopyBufferToImage2KHR( vkGetInstanceProcAddr( instance, "vkCmdCopyBufferToImage2KHR" ) ); if ( !vkCmdCopyBufferToImage2 ) vkCmdCopyBufferToImage2 = vkCmdCopyBufferToImage2KHR; vkCmdCopyImageToBuffer2KHR = PFN_vkCmdCopyImageToBuffer2KHR( vkGetInstanceProcAddr( instance, "vkCmdCopyImageToBuffer2KHR" ) ); if ( !vkCmdCopyImageToBuffer2 ) vkCmdCopyImageToBuffer2 = vkCmdCopyImageToBuffer2KHR; vkCmdBlitImage2KHR = PFN_vkCmdBlitImage2KHR( vkGetInstanceProcAddr( instance, "vkCmdBlitImage2KHR" ) ); if ( !vkCmdBlitImage2 ) vkCmdBlitImage2 = vkCmdBlitImage2KHR; vkCmdResolveImage2KHR = PFN_vkCmdResolveImage2KHR( vkGetInstanceProcAddr( instance, "vkCmdResolveImage2KHR" ) ); if ( !vkCmdResolveImage2 ) vkCmdResolveImage2 = vkCmdResolveImage2KHR; //=== VK_EXT_device_fault === vkGetDeviceFaultInfoEXT = PFN_vkGetDeviceFaultInfoEXT( vkGetInstanceProcAddr( instance, "vkGetDeviceFaultInfoEXT" ) ); #if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_NV_acquire_winrt_display === vkAcquireWinrtDisplayNV = PFN_vkAcquireWinrtDisplayNV( vkGetInstanceProcAddr( instance, "vkAcquireWinrtDisplayNV" ) ); vkGetWinrtDisplayNV = PFN_vkGetWinrtDisplayNV( vkGetInstanceProcAddr( instance, "vkGetWinrtDisplayNV" ) ); #endif /*VK_USE_PLATFORM_WIN32_KHR*/ #if defined( VK_USE_PLATFORM_DIRECTFB_EXT ) //=== VK_EXT_directfb_surface === vkCreateDirectFBSurfaceEXT = PFN_vkCreateDirectFBSurfaceEXT( vkGetInstanceProcAddr( instance, "vkCreateDirectFBSurfaceEXT" ) ); vkGetPhysicalDeviceDirectFBPresentationSupportEXT = PFN_vkGetPhysicalDeviceDirectFBPresentationSupportEXT( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceDirectFBPresentationSupportEXT" ) ); #endif /*VK_USE_PLATFORM_DIRECTFB_EXT*/ //=== VK_EXT_vertex_input_dynamic_state === vkCmdSetVertexInputEXT = PFN_vkCmdSetVertexInputEXT( vkGetInstanceProcAddr( instance, "vkCmdSetVertexInputEXT" ) ); #if defined( VK_USE_PLATFORM_FUCHSIA ) //=== VK_FUCHSIA_external_memory === vkGetMemoryZirconHandleFUCHSIA = PFN_vkGetMemoryZirconHandleFUCHSIA( vkGetInstanceProcAddr( instance, "vkGetMemoryZirconHandleFUCHSIA" ) ); vkGetMemoryZirconHandlePropertiesFUCHSIA = PFN_vkGetMemoryZirconHandlePropertiesFUCHSIA( vkGetInstanceProcAddr( instance, "vkGetMemoryZirconHandlePropertiesFUCHSIA" ) ); #endif /*VK_USE_PLATFORM_FUCHSIA*/ #if defined( VK_USE_PLATFORM_FUCHSIA ) //=== VK_FUCHSIA_external_semaphore === vkImportSemaphoreZirconHandleFUCHSIA = PFN_vkImportSemaphoreZirconHandleFUCHSIA( vkGetInstanceProcAddr( instance, "vkImportSemaphoreZirconHandleFUCHSIA" ) ); vkGetSemaphoreZirconHandleFUCHSIA = PFN_vkGetSemaphoreZirconHandleFUCHSIA( vkGetInstanceProcAddr( instance, "vkGetSemaphoreZirconHandleFUCHSIA" ) ); #endif /*VK_USE_PLATFORM_FUCHSIA*/ #if defined( VK_USE_PLATFORM_FUCHSIA ) //=== VK_FUCHSIA_buffer_collection === vkCreateBufferCollectionFUCHSIA = PFN_vkCreateBufferCollectionFUCHSIA( vkGetInstanceProcAddr( instance, "vkCreateBufferCollectionFUCHSIA" ) ); vkSetBufferCollectionImageConstraintsFUCHSIA = PFN_vkSetBufferCollectionImageConstraintsFUCHSIA( vkGetInstanceProcAddr( instance, "vkSetBufferCollectionImageConstraintsFUCHSIA" ) ); vkSetBufferCollectionBufferConstraintsFUCHSIA = PFN_vkSetBufferCollectionBufferConstraintsFUCHSIA( vkGetInstanceProcAddr( instance, "vkSetBufferCollectionBufferConstraintsFUCHSIA" ) ); vkDestroyBufferCollectionFUCHSIA = PFN_vkDestroyBufferCollectionFUCHSIA( vkGetInstanceProcAddr( instance, "vkDestroyBufferCollectionFUCHSIA" ) ); vkGetBufferCollectionPropertiesFUCHSIA = PFN_vkGetBufferCollectionPropertiesFUCHSIA( vkGetInstanceProcAddr( instance, "vkGetBufferCollectionPropertiesFUCHSIA" ) ); #endif /*VK_USE_PLATFORM_FUCHSIA*/ //=== VK_HUAWEI_subpass_shading === vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI = PFN_vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI( vkGetInstanceProcAddr( instance, "vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI" ) ); vkCmdSubpassShadingHUAWEI = PFN_vkCmdSubpassShadingHUAWEI( vkGetInstanceProcAddr( instance, "vkCmdSubpassShadingHUAWEI" ) ); //=== VK_HUAWEI_invocation_mask === vkCmdBindInvocationMaskHUAWEI = PFN_vkCmdBindInvocationMaskHUAWEI( vkGetInstanceProcAddr( instance, "vkCmdBindInvocationMaskHUAWEI" ) ); //=== VK_NV_external_memory_rdma === vkGetMemoryRemoteAddressNV = PFN_vkGetMemoryRemoteAddressNV( vkGetInstanceProcAddr( instance, "vkGetMemoryRemoteAddressNV" ) ); //=== VK_EXT_pipeline_properties === vkGetPipelinePropertiesEXT = PFN_vkGetPipelinePropertiesEXT( vkGetInstanceProcAddr( instance, "vkGetPipelinePropertiesEXT" ) ); //=== VK_EXT_extended_dynamic_state2 === vkCmdSetPatchControlPointsEXT = PFN_vkCmdSetPatchControlPointsEXT( vkGetInstanceProcAddr( instance, "vkCmdSetPatchControlPointsEXT" ) ); vkCmdSetRasterizerDiscardEnableEXT = PFN_vkCmdSetRasterizerDiscardEnableEXT( vkGetInstanceProcAddr( instance, "vkCmdSetRasterizerDiscardEnableEXT" ) ); if ( !vkCmdSetRasterizerDiscardEnable ) vkCmdSetRasterizerDiscardEnable = vkCmdSetRasterizerDiscardEnableEXT; vkCmdSetDepthBiasEnableEXT = PFN_vkCmdSetDepthBiasEnableEXT( vkGetInstanceProcAddr( instance, "vkCmdSetDepthBiasEnableEXT" ) ); if ( !vkCmdSetDepthBiasEnable ) vkCmdSetDepthBiasEnable = vkCmdSetDepthBiasEnableEXT; vkCmdSetLogicOpEXT = PFN_vkCmdSetLogicOpEXT( vkGetInstanceProcAddr( instance, "vkCmdSetLogicOpEXT" ) ); vkCmdSetPrimitiveRestartEnableEXT = PFN_vkCmdSetPrimitiveRestartEnableEXT( vkGetInstanceProcAddr( instance, "vkCmdSetPrimitiveRestartEnableEXT" ) ); if ( !vkCmdSetPrimitiveRestartEnable ) vkCmdSetPrimitiveRestartEnable = vkCmdSetPrimitiveRestartEnableEXT; #if defined( VK_USE_PLATFORM_SCREEN_QNX ) //=== VK_QNX_screen_surface === vkCreateScreenSurfaceQNX = PFN_vkCreateScreenSurfaceQNX( vkGetInstanceProcAddr( instance, "vkCreateScreenSurfaceQNX" ) ); vkGetPhysicalDeviceScreenPresentationSupportQNX = PFN_vkGetPhysicalDeviceScreenPresentationSupportQNX( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceScreenPresentationSupportQNX" ) ); #endif /*VK_USE_PLATFORM_SCREEN_QNX*/ //=== VK_EXT_color_write_enable === vkCmdSetColorWriteEnableEXT = PFN_vkCmdSetColorWriteEnableEXT( vkGetInstanceProcAddr( instance, "vkCmdSetColorWriteEnableEXT" ) ); //=== VK_KHR_ray_tracing_maintenance1 === vkCmdTraceRaysIndirect2KHR = PFN_vkCmdTraceRaysIndirect2KHR( vkGetInstanceProcAddr( instance, "vkCmdTraceRaysIndirect2KHR" ) ); //=== VK_EXT_multi_draw === vkCmdDrawMultiEXT = PFN_vkCmdDrawMultiEXT( vkGetInstanceProcAddr( instance, "vkCmdDrawMultiEXT" ) ); vkCmdDrawMultiIndexedEXT = PFN_vkCmdDrawMultiIndexedEXT( vkGetInstanceProcAddr( instance, "vkCmdDrawMultiIndexedEXT" ) ); //=== VK_EXT_opacity_micromap === vkCreateMicromapEXT = PFN_vkCreateMicromapEXT( vkGetInstanceProcAddr( instance, "vkCreateMicromapEXT" ) ); vkDestroyMicromapEXT = PFN_vkDestroyMicromapEXT( vkGetInstanceProcAddr( instance, "vkDestroyMicromapEXT" ) ); vkCmdBuildMicromapsEXT = PFN_vkCmdBuildMicromapsEXT( vkGetInstanceProcAddr( instance, "vkCmdBuildMicromapsEXT" ) ); vkBuildMicromapsEXT = PFN_vkBuildMicromapsEXT( vkGetInstanceProcAddr( instance, "vkBuildMicromapsEXT" ) ); vkCopyMicromapEXT = PFN_vkCopyMicromapEXT( vkGetInstanceProcAddr( instance, "vkCopyMicromapEXT" ) ); vkCopyMicromapToMemoryEXT = PFN_vkCopyMicromapToMemoryEXT( vkGetInstanceProcAddr( instance, "vkCopyMicromapToMemoryEXT" ) ); vkCopyMemoryToMicromapEXT = PFN_vkCopyMemoryToMicromapEXT( vkGetInstanceProcAddr( instance, "vkCopyMemoryToMicromapEXT" ) ); vkWriteMicromapsPropertiesEXT = PFN_vkWriteMicromapsPropertiesEXT( vkGetInstanceProcAddr( instance, "vkWriteMicromapsPropertiesEXT" ) ); vkCmdCopyMicromapEXT = PFN_vkCmdCopyMicromapEXT( vkGetInstanceProcAddr( instance, "vkCmdCopyMicromapEXT" ) ); vkCmdCopyMicromapToMemoryEXT = PFN_vkCmdCopyMicromapToMemoryEXT( vkGetInstanceProcAddr( instance, "vkCmdCopyMicromapToMemoryEXT" ) ); vkCmdCopyMemoryToMicromapEXT = PFN_vkCmdCopyMemoryToMicromapEXT( vkGetInstanceProcAddr( instance, "vkCmdCopyMemoryToMicromapEXT" ) ); vkCmdWriteMicromapsPropertiesEXT = PFN_vkCmdWriteMicromapsPropertiesEXT( vkGetInstanceProcAddr( instance, "vkCmdWriteMicromapsPropertiesEXT" ) ); vkGetDeviceMicromapCompatibilityEXT = PFN_vkGetDeviceMicromapCompatibilityEXT( vkGetInstanceProcAddr( instance, "vkGetDeviceMicromapCompatibilityEXT" ) ); vkGetMicromapBuildSizesEXT = PFN_vkGetMicromapBuildSizesEXT( vkGetInstanceProcAddr( instance, "vkGetMicromapBuildSizesEXT" ) ); //=== VK_HUAWEI_cluster_culling_shader === vkCmdDrawClusterHUAWEI = PFN_vkCmdDrawClusterHUAWEI( vkGetInstanceProcAddr( instance, "vkCmdDrawClusterHUAWEI" ) ); vkCmdDrawClusterIndirectHUAWEI = PFN_vkCmdDrawClusterIndirectHUAWEI( vkGetInstanceProcAddr( instance, "vkCmdDrawClusterIndirectHUAWEI" ) ); //=== VK_EXT_pageable_device_local_memory === vkSetDeviceMemoryPriorityEXT = PFN_vkSetDeviceMemoryPriorityEXT( vkGetInstanceProcAddr( instance, "vkSetDeviceMemoryPriorityEXT" ) ); //=== VK_KHR_maintenance4 === vkGetDeviceBufferMemoryRequirementsKHR = PFN_vkGetDeviceBufferMemoryRequirementsKHR( vkGetInstanceProcAddr( instance, "vkGetDeviceBufferMemoryRequirementsKHR" ) ); if ( !vkGetDeviceBufferMemoryRequirements ) vkGetDeviceBufferMemoryRequirements = vkGetDeviceBufferMemoryRequirementsKHR; vkGetDeviceImageMemoryRequirementsKHR = PFN_vkGetDeviceImageMemoryRequirementsKHR( vkGetInstanceProcAddr( instance, "vkGetDeviceImageMemoryRequirementsKHR" ) ); if ( !vkGetDeviceImageMemoryRequirements ) vkGetDeviceImageMemoryRequirements = vkGetDeviceImageMemoryRequirementsKHR; vkGetDeviceImageSparseMemoryRequirementsKHR = PFN_vkGetDeviceImageSparseMemoryRequirementsKHR( vkGetInstanceProcAddr( instance, "vkGetDeviceImageSparseMemoryRequirementsKHR" ) ); if ( !vkGetDeviceImageSparseMemoryRequirements ) vkGetDeviceImageSparseMemoryRequirements = vkGetDeviceImageSparseMemoryRequirementsKHR; //=== VK_VALVE_descriptor_set_host_mapping === vkGetDescriptorSetLayoutHostMappingInfoVALVE = PFN_vkGetDescriptorSetLayoutHostMappingInfoVALVE( vkGetInstanceProcAddr( instance, "vkGetDescriptorSetLayoutHostMappingInfoVALVE" ) ); vkGetDescriptorSetHostMappingVALVE = PFN_vkGetDescriptorSetHostMappingVALVE( vkGetInstanceProcAddr( instance, "vkGetDescriptorSetHostMappingVALVE" ) ); //=== VK_NV_copy_memory_indirect === vkCmdCopyMemoryIndirectNV = PFN_vkCmdCopyMemoryIndirectNV( vkGetInstanceProcAddr( instance, "vkCmdCopyMemoryIndirectNV" ) ); vkCmdCopyMemoryToImageIndirectNV = PFN_vkCmdCopyMemoryToImageIndirectNV( vkGetInstanceProcAddr( instance, "vkCmdCopyMemoryToImageIndirectNV" ) ); //=== VK_NV_memory_decompression === vkCmdDecompressMemoryNV = PFN_vkCmdDecompressMemoryNV( vkGetInstanceProcAddr( instance, "vkCmdDecompressMemoryNV" ) ); vkCmdDecompressMemoryIndirectCountNV = PFN_vkCmdDecompressMemoryIndirectCountNV( vkGetInstanceProcAddr( instance, "vkCmdDecompressMemoryIndirectCountNV" ) ); //=== VK_NV_device_generated_commands_compute === vkGetPipelineIndirectMemoryRequirementsNV = PFN_vkGetPipelineIndirectMemoryRequirementsNV( vkGetInstanceProcAddr( instance, "vkGetPipelineIndirectMemoryRequirementsNV" ) ); vkCmdUpdatePipelineIndirectBufferNV = PFN_vkCmdUpdatePipelineIndirectBufferNV( vkGetInstanceProcAddr( instance, "vkCmdUpdatePipelineIndirectBufferNV" ) ); vkGetPipelineIndirectDeviceAddressNV = PFN_vkGetPipelineIndirectDeviceAddressNV( vkGetInstanceProcAddr( instance, "vkGetPipelineIndirectDeviceAddressNV" ) ); //=== VK_EXT_extended_dynamic_state3 === vkCmdSetDepthClampEnableEXT = PFN_vkCmdSetDepthClampEnableEXT( vkGetInstanceProcAddr( instance, "vkCmdSetDepthClampEnableEXT" ) ); vkCmdSetPolygonModeEXT = PFN_vkCmdSetPolygonModeEXT( vkGetInstanceProcAddr( instance, "vkCmdSetPolygonModeEXT" ) ); vkCmdSetRasterizationSamplesEXT = PFN_vkCmdSetRasterizationSamplesEXT( vkGetInstanceProcAddr( instance, "vkCmdSetRasterizationSamplesEXT" ) ); vkCmdSetSampleMaskEXT = PFN_vkCmdSetSampleMaskEXT( vkGetInstanceProcAddr( instance, "vkCmdSetSampleMaskEXT" ) ); vkCmdSetAlphaToCoverageEnableEXT = PFN_vkCmdSetAlphaToCoverageEnableEXT( vkGetInstanceProcAddr( instance, "vkCmdSetAlphaToCoverageEnableEXT" ) ); vkCmdSetAlphaToOneEnableEXT = PFN_vkCmdSetAlphaToOneEnableEXT( vkGetInstanceProcAddr( instance, "vkCmdSetAlphaToOneEnableEXT" ) ); vkCmdSetLogicOpEnableEXT = PFN_vkCmdSetLogicOpEnableEXT( vkGetInstanceProcAddr( instance, "vkCmdSetLogicOpEnableEXT" ) ); vkCmdSetColorBlendEnableEXT = PFN_vkCmdSetColorBlendEnableEXT( vkGetInstanceProcAddr( instance, "vkCmdSetColorBlendEnableEXT" ) ); vkCmdSetColorBlendEquationEXT = PFN_vkCmdSetColorBlendEquationEXT( vkGetInstanceProcAddr( instance, "vkCmdSetColorBlendEquationEXT" ) ); vkCmdSetColorWriteMaskEXT = PFN_vkCmdSetColorWriteMaskEXT( vkGetInstanceProcAddr( instance, "vkCmdSetColorWriteMaskEXT" ) ); vkCmdSetTessellationDomainOriginEXT = PFN_vkCmdSetTessellationDomainOriginEXT( vkGetInstanceProcAddr( instance, "vkCmdSetTessellationDomainOriginEXT" ) ); vkCmdSetRasterizationStreamEXT = PFN_vkCmdSetRasterizationStreamEXT( vkGetInstanceProcAddr( instance, "vkCmdSetRasterizationStreamEXT" ) ); vkCmdSetConservativeRasterizationModeEXT = PFN_vkCmdSetConservativeRasterizationModeEXT( vkGetInstanceProcAddr( instance, "vkCmdSetConservativeRasterizationModeEXT" ) ); vkCmdSetExtraPrimitiveOverestimationSizeEXT = PFN_vkCmdSetExtraPrimitiveOverestimationSizeEXT( vkGetInstanceProcAddr( instance, "vkCmdSetExtraPrimitiveOverestimationSizeEXT" ) ); vkCmdSetDepthClipEnableEXT = PFN_vkCmdSetDepthClipEnableEXT( vkGetInstanceProcAddr( instance, "vkCmdSetDepthClipEnableEXT" ) ); vkCmdSetSampleLocationsEnableEXT = PFN_vkCmdSetSampleLocationsEnableEXT( vkGetInstanceProcAddr( instance, "vkCmdSetSampleLocationsEnableEXT" ) ); vkCmdSetColorBlendAdvancedEXT = PFN_vkCmdSetColorBlendAdvancedEXT( vkGetInstanceProcAddr( instance, "vkCmdSetColorBlendAdvancedEXT" ) ); vkCmdSetProvokingVertexModeEXT = PFN_vkCmdSetProvokingVertexModeEXT( vkGetInstanceProcAddr( instance, "vkCmdSetProvokingVertexModeEXT" ) ); vkCmdSetLineRasterizationModeEXT = PFN_vkCmdSetLineRasterizationModeEXT( vkGetInstanceProcAddr( instance, "vkCmdSetLineRasterizationModeEXT" ) ); vkCmdSetLineStippleEnableEXT = PFN_vkCmdSetLineStippleEnableEXT( vkGetInstanceProcAddr( instance, "vkCmdSetLineStippleEnableEXT" ) ); vkCmdSetDepthClipNegativeOneToOneEXT = PFN_vkCmdSetDepthClipNegativeOneToOneEXT( vkGetInstanceProcAddr( instance, "vkCmdSetDepthClipNegativeOneToOneEXT" ) ); vkCmdSetViewportWScalingEnableNV = PFN_vkCmdSetViewportWScalingEnableNV( vkGetInstanceProcAddr( instance, "vkCmdSetViewportWScalingEnableNV" ) ); vkCmdSetViewportSwizzleNV = PFN_vkCmdSetViewportSwizzleNV( vkGetInstanceProcAddr( instance, "vkCmdSetViewportSwizzleNV" ) ); vkCmdSetCoverageToColorEnableNV = PFN_vkCmdSetCoverageToColorEnableNV( vkGetInstanceProcAddr( instance, "vkCmdSetCoverageToColorEnableNV" ) ); vkCmdSetCoverageToColorLocationNV = PFN_vkCmdSetCoverageToColorLocationNV( vkGetInstanceProcAddr( instance, "vkCmdSetCoverageToColorLocationNV" ) ); vkCmdSetCoverageModulationModeNV = PFN_vkCmdSetCoverageModulationModeNV( vkGetInstanceProcAddr( instance, "vkCmdSetCoverageModulationModeNV" ) ); vkCmdSetCoverageModulationTableEnableNV = PFN_vkCmdSetCoverageModulationTableEnableNV( vkGetInstanceProcAddr( instance, "vkCmdSetCoverageModulationTableEnableNV" ) ); vkCmdSetCoverageModulationTableNV = PFN_vkCmdSetCoverageModulationTableNV( vkGetInstanceProcAddr( instance, "vkCmdSetCoverageModulationTableNV" ) ); vkCmdSetShadingRateImageEnableNV = PFN_vkCmdSetShadingRateImageEnableNV( vkGetInstanceProcAddr( instance, "vkCmdSetShadingRateImageEnableNV" ) ); vkCmdSetRepresentativeFragmentTestEnableNV = PFN_vkCmdSetRepresentativeFragmentTestEnableNV( vkGetInstanceProcAddr( instance, "vkCmdSetRepresentativeFragmentTestEnableNV" ) ); vkCmdSetCoverageReductionModeNV = PFN_vkCmdSetCoverageReductionModeNV( vkGetInstanceProcAddr( instance, "vkCmdSetCoverageReductionModeNV" ) ); //=== VK_EXT_shader_module_identifier === vkGetShaderModuleIdentifierEXT = PFN_vkGetShaderModuleIdentifierEXT( vkGetInstanceProcAddr( instance, "vkGetShaderModuleIdentifierEXT" ) ); vkGetShaderModuleCreateInfoIdentifierEXT = PFN_vkGetShaderModuleCreateInfoIdentifierEXT( vkGetInstanceProcAddr( instance, "vkGetShaderModuleCreateInfoIdentifierEXT" ) ); //=== VK_NV_optical_flow === vkGetPhysicalDeviceOpticalFlowImageFormatsNV = PFN_vkGetPhysicalDeviceOpticalFlowImageFormatsNV( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceOpticalFlowImageFormatsNV" ) ); vkCreateOpticalFlowSessionNV = PFN_vkCreateOpticalFlowSessionNV( vkGetInstanceProcAddr( instance, "vkCreateOpticalFlowSessionNV" ) ); vkDestroyOpticalFlowSessionNV = PFN_vkDestroyOpticalFlowSessionNV( vkGetInstanceProcAddr( instance, "vkDestroyOpticalFlowSessionNV" ) ); vkBindOpticalFlowSessionImageNV = PFN_vkBindOpticalFlowSessionImageNV( vkGetInstanceProcAddr( instance, "vkBindOpticalFlowSessionImageNV" ) ); vkCmdOpticalFlowExecuteNV = PFN_vkCmdOpticalFlowExecuteNV( vkGetInstanceProcAddr( instance, "vkCmdOpticalFlowExecuteNV" ) ); //=== VK_KHR_maintenance5 === vkCmdBindIndexBuffer2KHR = PFN_vkCmdBindIndexBuffer2KHR( vkGetInstanceProcAddr( instance, "vkCmdBindIndexBuffer2KHR" ) ); if ( !vkCmdBindIndexBuffer2 ) vkCmdBindIndexBuffer2 = vkCmdBindIndexBuffer2KHR; vkGetRenderingAreaGranularityKHR = PFN_vkGetRenderingAreaGranularityKHR( vkGetInstanceProcAddr( instance, "vkGetRenderingAreaGranularityKHR" ) ); if ( !vkGetRenderingAreaGranularity ) vkGetRenderingAreaGranularity = vkGetRenderingAreaGranularityKHR; vkGetDeviceImageSubresourceLayoutKHR = PFN_vkGetDeviceImageSubresourceLayoutKHR( vkGetInstanceProcAddr( instance, "vkGetDeviceImageSubresourceLayoutKHR" ) ); if ( !vkGetDeviceImageSubresourceLayout ) vkGetDeviceImageSubresourceLayout = vkGetDeviceImageSubresourceLayoutKHR; vkGetImageSubresourceLayout2KHR = PFN_vkGetImageSubresourceLayout2KHR( vkGetInstanceProcAddr( instance, "vkGetImageSubresourceLayout2KHR" ) ); if ( !vkGetImageSubresourceLayout2 ) vkGetImageSubresourceLayout2 = vkGetImageSubresourceLayout2KHR; //=== VK_AMD_anti_lag === vkAntiLagUpdateAMD = PFN_vkAntiLagUpdateAMD( vkGetInstanceProcAddr( instance, "vkAntiLagUpdateAMD" ) ); //=== VK_EXT_shader_object === vkCreateShadersEXT = PFN_vkCreateShadersEXT( vkGetInstanceProcAddr( instance, "vkCreateShadersEXT" ) ); vkDestroyShaderEXT = PFN_vkDestroyShaderEXT( vkGetInstanceProcAddr( instance, "vkDestroyShaderEXT" ) ); vkGetShaderBinaryDataEXT = PFN_vkGetShaderBinaryDataEXT( vkGetInstanceProcAddr( instance, "vkGetShaderBinaryDataEXT" ) ); vkCmdBindShadersEXT = PFN_vkCmdBindShadersEXT( vkGetInstanceProcAddr( instance, "vkCmdBindShadersEXT" ) ); vkCmdSetDepthClampRangeEXT = PFN_vkCmdSetDepthClampRangeEXT( vkGetInstanceProcAddr( instance, "vkCmdSetDepthClampRangeEXT" ) ); //=== VK_KHR_pipeline_binary === vkCreatePipelineBinariesKHR = PFN_vkCreatePipelineBinariesKHR( vkGetInstanceProcAddr( instance, "vkCreatePipelineBinariesKHR" ) ); vkDestroyPipelineBinaryKHR = PFN_vkDestroyPipelineBinaryKHR( vkGetInstanceProcAddr( instance, "vkDestroyPipelineBinaryKHR" ) ); vkGetPipelineKeyKHR = PFN_vkGetPipelineKeyKHR( vkGetInstanceProcAddr( instance, "vkGetPipelineKeyKHR" ) ); vkGetPipelineBinaryDataKHR = PFN_vkGetPipelineBinaryDataKHR( vkGetInstanceProcAddr( instance, "vkGetPipelineBinaryDataKHR" ) ); vkReleaseCapturedPipelineDataKHR = PFN_vkReleaseCapturedPipelineDataKHR( vkGetInstanceProcAddr( instance, "vkReleaseCapturedPipelineDataKHR" ) ); //=== VK_QCOM_tile_properties === vkGetFramebufferTilePropertiesQCOM = PFN_vkGetFramebufferTilePropertiesQCOM( vkGetInstanceProcAddr( instance, "vkGetFramebufferTilePropertiesQCOM" ) ); vkGetDynamicRenderingTilePropertiesQCOM = PFN_vkGetDynamicRenderingTilePropertiesQCOM( vkGetInstanceProcAddr( instance, "vkGetDynamicRenderingTilePropertiesQCOM" ) ); //=== VK_NV_cooperative_vector === vkGetPhysicalDeviceCooperativeVectorPropertiesNV = PFN_vkGetPhysicalDeviceCooperativeVectorPropertiesNV( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceCooperativeVectorPropertiesNV" ) ); vkConvertCooperativeVectorMatrixNV = PFN_vkConvertCooperativeVectorMatrixNV( vkGetInstanceProcAddr( instance, "vkConvertCooperativeVectorMatrixNV" ) ); vkCmdConvertCooperativeVectorMatrixNV = PFN_vkCmdConvertCooperativeVectorMatrixNV( vkGetInstanceProcAddr( instance, "vkCmdConvertCooperativeVectorMatrixNV" ) ); //=== VK_NV_low_latency2 === vkSetLatencySleepModeNV = PFN_vkSetLatencySleepModeNV( vkGetInstanceProcAddr( instance, "vkSetLatencySleepModeNV" ) ); vkLatencySleepNV = PFN_vkLatencySleepNV( vkGetInstanceProcAddr( instance, "vkLatencySleepNV" ) ); vkSetLatencyMarkerNV = PFN_vkSetLatencyMarkerNV( vkGetInstanceProcAddr( instance, "vkSetLatencyMarkerNV" ) ); vkGetLatencyTimingsNV = PFN_vkGetLatencyTimingsNV( vkGetInstanceProcAddr( instance, "vkGetLatencyTimingsNV" ) ); vkQueueNotifyOutOfBandNV = PFN_vkQueueNotifyOutOfBandNV( vkGetInstanceProcAddr( instance, "vkQueueNotifyOutOfBandNV" ) ); //=== VK_KHR_cooperative_matrix === vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR = PFN_vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR" ) ); //=== VK_EXT_attachment_feedback_loop_dynamic_state === vkCmdSetAttachmentFeedbackLoopEnableEXT = PFN_vkCmdSetAttachmentFeedbackLoopEnableEXT( vkGetInstanceProcAddr( instance, "vkCmdSetAttachmentFeedbackLoopEnableEXT" ) ); #if defined( VK_USE_PLATFORM_SCREEN_QNX ) //=== VK_QNX_external_memory_screen_buffer === vkGetScreenBufferPropertiesQNX = PFN_vkGetScreenBufferPropertiesQNX( vkGetInstanceProcAddr( instance, "vkGetScreenBufferPropertiesQNX" ) ); #endif /*VK_USE_PLATFORM_SCREEN_QNX*/ //=== VK_KHR_line_rasterization === vkCmdSetLineStippleKHR = PFN_vkCmdSetLineStippleKHR( vkGetInstanceProcAddr( instance, "vkCmdSetLineStippleKHR" ) ); if ( !vkCmdSetLineStipple ) vkCmdSetLineStipple = vkCmdSetLineStippleKHR; //=== VK_KHR_calibrated_timestamps === vkGetPhysicalDeviceCalibrateableTimeDomainsKHR = PFN_vkGetPhysicalDeviceCalibrateableTimeDomainsKHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceCalibrateableTimeDomainsKHR" ) ); vkGetCalibratedTimestampsKHR = PFN_vkGetCalibratedTimestampsKHR( vkGetInstanceProcAddr( instance, "vkGetCalibratedTimestampsKHR" ) ); //=== VK_KHR_maintenance6 === vkCmdBindDescriptorSets2KHR = PFN_vkCmdBindDescriptorSets2KHR( vkGetInstanceProcAddr( instance, "vkCmdBindDescriptorSets2KHR" ) ); if ( !vkCmdBindDescriptorSets2 ) vkCmdBindDescriptorSets2 = vkCmdBindDescriptorSets2KHR; vkCmdPushConstants2KHR = PFN_vkCmdPushConstants2KHR( vkGetInstanceProcAddr( instance, "vkCmdPushConstants2KHR" ) ); if ( !vkCmdPushConstants2 ) vkCmdPushConstants2 = vkCmdPushConstants2KHR; vkCmdPushDescriptorSet2KHR = PFN_vkCmdPushDescriptorSet2KHR( vkGetInstanceProcAddr( instance, "vkCmdPushDescriptorSet2KHR" ) ); if ( !vkCmdPushDescriptorSet2 ) vkCmdPushDescriptorSet2 = vkCmdPushDescriptorSet2KHR; vkCmdPushDescriptorSetWithTemplate2KHR = PFN_vkCmdPushDescriptorSetWithTemplate2KHR( vkGetInstanceProcAddr( instance, "vkCmdPushDescriptorSetWithTemplate2KHR" ) ); if ( !vkCmdPushDescriptorSetWithTemplate2 ) vkCmdPushDescriptorSetWithTemplate2 = vkCmdPushDescriptorSetWithTemplate2KHR; vkCmdSetDescriptorBufferOffsets2EXT = PFN_vkCmdSetDescriptorBufferOffsets2EXT( vkGetInstanceProcAddr( instance, "vkCmdSetDescriptorBufferOffsets2EXT" ) ); vkCmdBindDescriptorBufferEmbeddedSamplers2EXT = PFN_vkCmdBindDescriptorBufferEmbeddedSamplers2EXT( vkGetInstanceProcAddr( instance, "vkCmdBindDescriptorBufferEmbeddedSamplers2EXT" ) ); //=== VK_NV_cluster_acceleration_structure === vkGetClusterAccelerationStructureBuildSizesNV = PFN_vkGetClusterAccelerationStructureBuildSizesNV( vkGetInstanceProcAddr( instance, "vkGetClusterAccelerationStructureBuildSizesNV" ) ); vkCmdBuildClusterAccelerationStructureIndirectNV = PFN_vkCmdBuildClusterAccelerationStructureIndirectNV( vkGetInstanceProcAddr( instance, "vkCmdBuildClusterAccelerationStructureIndirectNV" ) ); //=== VK_NV_partitioned_acceleration_structure === vkGetPartitionedAccelerationStructuresBuildSizesNV = PFN_vkGetPartitionedAccelerationStructuresBuildSizesNV( vkGetInstanceProcAddr( instance, "vkGetPartitionedAccelerationStructuresBuildSizesNV" ) ); vkCmdBuildPartitionedAccelerationStructuresNV = PFN_vkCmdBuildPartitionedAccelerationStructuresNV( vkGetInstanceProcAddr( instance, "vkCmdBuildPartitionedAccelerationStructuresNV" ) ); //=== VK_EXT_device_generated_commands === vkGetGeneratedCommandsMemoryRequirementsEXT = PFN_vkGetGeneratedCommandsMemoryRequirementsEXT( vkGetInstanceProcAddr( instance, "vkGetGeneratedCommandsMemoryRequirementsEXT" ) ); vkCmdPreprocessGeneratedCommandsEXT = PFN_vkCmdPreprocessGeneratedCommandsEXT( vkGetInstanceProcAddr( instance, "vkCmdPreprocessGeneratedCommandsEXT" ) ); vkCmdExecuteGeneratedCommandsEXT = PFN_vkCmdExecuteGeneratedCommandsEXT( vkGetInstanceProcAddr( instance, "vkCmdExecuteGeneratedCommandsEXT" ) ); vkCreateIndirectCommandsLayoutEXT = PFN_vkCreateIndirectCommandsLayoutEXT( vkGetInstanceProcAddr( instance, "vkCreateIndirectCommandsLayoutEXT" ) ); vkDestroyIndirectCommandsLayoutEXT = PFN_vkDestroyIndirectCommandsLayoutEXT( vkGetInstanceProcAddr( instance, "vkDestroyIndirectCommandsLayoutEXT" ) ); vkCreateIndirectExecutionSetEXT = PFN_vkCreateIndirectExecutionSetEXT( vkGetInstanceProcAddr( instance, "vkCreateIndirectExecutionSetEXT" ) ); vkDestroyIndirectExecutionSetEXT = PFN_vkDestroyIndirectExecutionSetEXT( vkGetInstanceProcAddr( instance, "vkDestroyIndirectExecutionSetEXT" ) ); vkUpdateIndirectExecutionSetPipelineEXT = PFN_vkUpdateIndirectExecutionSetPipelineEXT( vkGetInstanceProcAddr( instance, "vkUpdateIndirectExecutionSetPipelineEXT" ) ); vkUpdateIndirectExecutionSetShaderEXT = PFN_vkUpdateIndirectExecutionSetShaderEXT( vkGetInstanceProcAddr( instance, "vkUpdateIndirectExecutionSetShaderEXT" ) ); //=== VK_NV_cooperative_matrix2 === vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV = PFN_vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV" ) ); #if defined( VK_USE_PLATFORM_METAL_EXT ) //=== VK_EXT_external_memory_metal === vkGetMemoryMetalHandleEXT = PFN_vkGetMemoryMetalHandleEXT( vkGetInstanceProcAddr( instance, "vkGetMemoryMetalHandleEXT" ) ); vkGetMemoryMetalHandlePropertiesEXT = PFN_vkGetMemoryMetalHandlePropertiesEXT( vkGetInstanceProcAddr( instance, "vkGetMemoryMetalHandlePropertiesEXT" ) ); #endif /*VK_USE_PLATFORM_METAL_EXT*/ } void init( VULKAN_HPP_NAMESPACE::Device deviceCpp ) VULKAN_HPP_NOEXCEPT { VkDevice device = static_cast( deviceCpp ); //=== VK_VERSION_1_0 === vkGetDeviceProcAddr = PFN_vkGetDeviceProcAddr( vkGetDeviceProcAddr( device, "vkGetDeviceProcAddr" ) ); vkDestroyDevice = PFN_vkDestroyDevice( vkGetDeviceProcAddr( device, "vkDestroyDevice" ) ); vkGetDeviceQueue = PFN_vkGetDeviceQueue( vkGetDeviceProcAddr( device, "vkGetDeviceQueue" ) ); vkQueueSubmit = PFN_vkQueueSubmit( vkGetDeviceProcAddr( device, "vkQueueSubmit" ) ); vkQueueWaitIdle = PFN_vkQueueWaitIdle( vkGetDeviceProcAddr( device, "vkQueueWaitIdle" ) ); vkDeviceWaitIdle = PFN_vkDeviceWaitIdle( vkGetDeviceProcAddr( device, "vkDeviceWaitIdle" ) ); vkAllocateMemory = PFN_vkAllocateMemory( vkGetDeviceProcAddr( device, "vkAllocateMemory" ) ); vkFreeMemory = PFN_vkFreeMemory( vkGetDeviceProcAddr( device, "vkFreeMemory" ) ); vkMapMemory = PFN_vkMapMemory( vkGetDeviceProcAddr( device, "vkMapMemory" ) ); vkUnmapMemory = PFN_vkUnmapMemory( vkGetDeviceProcAddr( device, "vkUnmapMemory" ) ); vkFlushMappedMemoryRanges = PFN_vkFlushMappedMemoryRanges( vkGetDeviceProcAddr( device, "vkFlushMappedMemoryRanges" ) ); vkInvalidateMappedMemoryRanges = PFN_vkInvalidateMappedMemoryRanges( vkGetDeviceProcAddr( device, "vkInvalidateMappedMemoryRanges" ) ); vkGetDeviceMemoryCommitment = PFN_vkGetDeviceMemoryCommitment( vkGetDeviceProcAddr( device, "vkGetDeviceMemoryCommitment" ) ); vkBindBufferMemory = PFN_vkBindBufferMemory( vkGetDeviceProcAddr( device, "vkBindBufferMemory" ) ); vkBindImageMemory = PFN_vkBindImageMemory( vkGetDeviceProcAddr( device, "vkBindImageMemory" ) ); vkGetBufferMemoryRequirements = PFN_vkGetBufferMemoryRequirements( vkGetDeviceProcAddr( device, "vkGetBufferMemoryRequirements" ) ); vkGetImageMemoryRequirements = PFN_vkGetImageMemoryRequirements( vkGetDeviceProcAddr( device, "vkGetImageMemoryRequirements" ) ); vkGetImageSparseMemoryRequirements = PFN_vkGetImageSparseMemoryRequirements( vkGetDeviceProcAddr( device, "vkGetImageSparseMemoryRequirements" ) ); vkQueueBindSparse = PFN_vkQueueBindSparse( vkGetDeviceProcAddr( device, "vkQueueBindSparse" ) ); vkCreateFence = PFN_vkCreateFence( vkGetDeviceProcAddr( device, "vkCreateFence" ) ); vkDestroyFence = PFN_vkDestroyFence( vkGetDeviceProcAddr( device, "vkDestroyFence" ) ); vkResetFences = PFN_vkResetFences( vkGetDeviceProcAddr( device, "vkResetFences" ) ); vkGetFenceStatus = PFN_vkGetFenceStatus( vkGetDeviceProcAddr( device, "vkGetFenceStatus" ) ); vkWaitForFences = PFN_vkWaitForFences( vkGetDeviceProcAddr( device, "vkWaitForFences" ) ); vkCreateSemaphore = PFN_vkCreateSemaphore( vkGetDeviceProcAddr( device, "vkCreateSemaphore" ) ); vkDestroySemaphore = PFN_vkDestroySemaphore( vkGetDeviceProcAddr( device, "vkDestroySemaphore" ) ); vkCreateEvent = PFN_vkCreateEvent( vkGetDeviceProcAddr( device, "vkCreateEvent" ) ); vkDestroyEvent = PFN_vkDestroyEvent( vkGetDeviceProcAddr( device, "vkDestroyEvent" ) ); vkGetEventStatus = PFN_vkGetEventStatus( vkGetDeviceProcAddr( device, "vkGetEventStatus" ) ); vkSetEvent = PFN_vkSetEvent( vkGetDeviceProcAddr( device, "vkSetEvent" ) ); vkResetEvent = PFN_vkResetEvent( vkGetDeviceProcAddr( device, "vkResetEvent" ) ); vkCreateQueryPool = PFN_vkCreateQueryPool( vkGetDeviceProcAddr( device, "vkCreateQueryPool" ) ); vkDestroyQueryPool = PFN_vkDestroyQueryPool( vkGetDeviceProcAddr( device, "vkDestroyQueryPool" ) ); vkGetQueryPoolResults = PFN_vkGetQueryPoolResults( vkGetDeviceProcAddr( device, "vkGetQueryPoolResults" ) ); vkCreateBuffer = PFN_vkCreateBuffer( vkGetDeviceProcAddr( device, "vkCreateBuffer" ) ); vkDestroyBuffer = PFN_vkDestroyBuffer( vkGetDeviceProcAddr( device, "vkDestroyBuffer" ) ); vkCreateBufferView = PFN_vkCreateBufferView( vkGetDeviceProcAddr( device, "vkCreateBufferView" ) ); vkDestroyBufferView = PFN_vkDestroyBufferView( vkGetDeviceProcAddr( device, "vkDestroyBufferView" ) ); vkCreateImage = PFN_vkCreateImage( vkGetDeviceProcAddr( device, "vkCreateImage" ) ); vkDestroyImage = PFN_vkDestroyImage( vkGetDeviceProcAddr( device, "vkDestroyImage" ) ); vkGetImageSubresourceLayout = PFN_vkGetImageSubresourceLayout( vkGetDeviceProcAddr( device, "vkGetImageSubresourceLayout" ) ); vkCreateImageView = PFN_vkCreateImageView( vkGetDeviceProcAddr( device, "vkCreateImageView" ) ); vkDestroyImageView = PFN_vkDestroyImageView( vkGetDeviceProcAddr( device, "vkDestroyImageView" ) ); vkCreateShaderModule = PFN_vkCreateShaderModule( vkGetDeviceProcAddr( device, "vkCreateShaderModule" ) ); vkDestroyShaderModule = PFN_vkDestroyShaderModule( vkGetDeviceProcAddr( device, "vkDestroyShaderModule" ) ); vkCreatePipelineCache = PFN_vkCreatePipelineCache( vkGetDeviceProcAddr( device, "vkCreatePipelineCache" ) ); vkDestroyPipelineCache = PFN_vkDestroyPipelineCache( vkGetDeviceProcAddr( device, "vkDestroyPipelineCache" ) ); vkGetPipelineCacheData = PFN_vkGetPipelineCacheData( vkGetDeviceProcAddr( device, "vkGetPipelineCacheData" ) ); vkMergePipelineCaches = PFN_vkMergePipelineCaches( vkGetDeviceProcAddr( device, "vkMergePipelineCaches" ) ); vkCreateGraphicsPipelines = PFN_vkCreateGraphicsPipelines( vkGetDeviceProcAddr( device, "vkCreateGraphicsPipelines" ) ); vkCreateComputePipelines = PFN_vkCreateComputePipelines( vkGetDeviceProcAddr( device, "vkCreateComputePipelines" ) ); vkDestroyPipeline = PFN_vkDestroyPipeline( vkGetDeviceProcAddr( device, "vkDestroyPipeline" ) ); vkCreatePipelineLayout = PFN_vkCreatePipelineLayout( vkGetDeviceProcAddr( device, "vkCreatePipelineLayout" ) ); vkDestroyPipelineLayout = PFN_vkDestroyPipelineLayout( vkGetDeviceProcAddr( device, "vkDestroyPipelineLayout" ) ); vkCreateSampler = PFN_vkCreateSampler( vkGetDeviceProcAddr( device, "vkCreateSampler" ) ); vkDestroySampler = PFN_vkDestroySampler( vkGetDeviceProcAddr( device, "vkDestroySampler" ) ); vkCreateDescriptorSetLayout = PFN_vkCreateDescriptorSetLayout( vkGetDeviceProcAddr( device, "vkCreateDescriptorSetLayout" ) ); vkDestroyDescriptorSetLayout = PFN_vkDestroyDescriptorSetLayout( vkGetDeviceProcAddr( device, "vkDestroyDescriptorSetLayout" ) ); vkCreateDescriptorPool = PFN_vkCreateDescriptorPool( vkGetDeviceProcAddr( device, "vkCreateDescriptorPool" ) ); vkDestroyDescriptorPool = PFN_vkDestroyDescriptorPool( vkGetDeviceProcAddr( device, "vkDestroyDescriptorPool" ) ); vkResetDescriptorPool = PFN_vkResetDescriptorPool( vkGetDeviceProcAddr( device, "vkResetDescriptorPool" ) ); vkAllocateDescriptorSets = PFN_vkAllocateDescriptorSets( vkGetDeviceProcAddr( device, "vkAllocateDescriptorSets" ) ); vkFreeDescriptorSets = PFN_vkFreeDescriptorSets( vkGetDeviceProcAddr( device, "vkFreeDescriptorSets" ) ); vkUpdateDescriptorSets = PFN_vkUpdateDescriptorSets( vkGetDeviceProcAddr( device, "vkUpdateDescriptorSets" ) ); vkCreateFramebuffer = PFN_vkCreateFramebuffer( vkGetDeviceProcAddr( device, "vkCreateFramebuffer" ) ); vkDestroyFramebuffer = PFN_vkDestroyFramebuffer( vkGetDeviceProcAddr( device, "vkDestroyFramebuffer" ) ); vkCreateRenderPass = PFN_vkCreateRenderPass( vkGetDeviceProcAddr( device, "vkCreateRenderPass" ) ); vkDestroyRenderPass = PFN_vkDestroyRenderPass( vkGetDeviceProcAddr( device, "vkDestroyRenderPass" ) ); vkGetRenderAreaGranularity = PFN_vkGetRenderAreaGranularity( vkGetDeviceProcAddr( device, "vkGetRenderAreaGranularity" ) ); vkCreateCommandPool = PFN_vkCreateCommandPool( vkGetDeviceProcAddr( device, "vkCreateCommandPool" ) ); vkDestroyCommandPool = PFN_vkDestroyCommandPool( vkGetDeviceProcAddr( device, "vkDestroyCommandPool" ) ); vkResetCommandPool = PFN_vkResetCommandPool( vkGetDeviceProcAddr( device, "vkResetCommandPool" ) ); vkAllocateCommandBuffers = PFN_vkAllocateCommandBuffers( vkGetDeviceProcAddr( device, "vkAllocateCommandBuffers" ) ); vkFreeCommandBuffers = PFN_vkFreeCommandBuffers( vkGetDeviceProcAddr( device, "vkFreeCommandBuffers" ) ); vkBeginCommandBuffer = PFN_vkBeginCommandBuffer( vkGetDeviceProcAddr( device, "vkBeginCommandBuffer" ) ); vkEndCommandBuffer = PFN_vkEndCommandBuffer( vkGetDeviceProcAddr( device, "vkEndCommandBuffer" ) ); vkResetCommandBuffer = PFN_vkResetCommandBuffer( vkGetDeviceProcAddr( device, "vkResetCommandBuffer" ) ); vkCmdBindPipeline = PFN_vkCmdBindPipeline( vkGetDeviceProcAddr( device, "vkCmdBindPipeline" ) ); vkCmdSetViewport = PFN_vkCmdSetViewport( vkGetDeviceProcAddr( device, "vkCmdSetViewport" ) ); vkCmdSetScissor = PFN_vkCmdSetScissor( vkGetDeviceProcAddr( device, "vkCmdSetScissor" ) ); vkCmdSetLineWidth = PFN_vkCmdSetLineWidth( vkGetDeviceProcAddr( device, "vkCmdSetLineWidth" ) ); vkCmdSetDepthBias = PFN_vkCmdSetDepthBias( vkGetDeviceProcAddr( device, "vkCmdSetDepthBias" ) ); vkCmdSetBlendConstants = PFN_vkCmdSetBlendConstants( vkGetDeviceProcAddr( device, "vkCmdSetBlendConstants" ) ); vkCmdSetDepthBounds = PFN_vkCmdSetDepthBounds( vkGetDeviceProcAddr( device, "vkCmdSetDepthBounds" ) ); vkCmdSetStencilCompareMask = PFN_vkCmdSetStencilCompareMask( vkGetDeviceProcAddr( device, "vkCmdSetStencilCompareMask" ) ); vkCmdSetStencilWriteMask = PFN_vkCmdSetStencilWriteMask( vkGetDeviceProcAddr( device, "vkCmdSetStencilWriteMask" ) ); vkCmdSetStencilReference = PFN_vkCmdSetStencilReference( vkGetDeviceProcAddr( device, "vkCmdSetStencilReference" ) ); vkCmdBindDescriptorSets = PFN_vkCmdBindDescriptorSets( vkGetDeviceProcAddr( device, "vkCmdBindDescriptorSets" ) ); vkCmdBindIndexBuffer = PFN_vkCmdBindIndexBuffer( vkGetDeviceProcAddr( device, "vkCmdBindIndexBuffer" ) ); vkCmdBindVertexBuffers = PFN_vkCmdBindVertexBuffers( vkGetDeviceProcAddr( device, "vkCmdBindVertexBuffers" ) ); vkCmdDraw = PFN_vkCmdDraw( vkGetDeviceProcAddr( device, "vkCmdDraw" ) ); vkCmdDrawIndexed = PFN_vkCmdDrawIndexed( vkGetDeviceProcAddr( device, "vkCmdDrawIndexed" ) ); vkCmdDrawIndirect = PFN_vkCmdDrawIndirect( vkGetDeviceProcAddr( device, "vkCmdDrawIndirect" ) ); vkCmdDrawIndexedIndirect = PFN_vkCmdDrawIndexedIndirect( vkGetDeviceProcAddr( device, "vkCmdDrawIndexedIndirect" ) ); vkCmdDispatch = PFN_vkCmdDispatch( vkGetDeviceProcAddr( device, "vkCmdDispatch" ) ); vkCmdDispatchIndirect = PFN_vkCmdDispatchIndirect( vkGetDeviceProcAddr( device, "vkCmdDispatchIndirect" ) ); vkCmdCopyBuffer = PFN_vkCmdCopyBuffer( vkGetDeviceProcAddr( device, "vkCmdCopyBuffer" ) ); vkCmdCopyImage = PFN_vkCmdCopyImage( vkGetDeviceProcAddr( device, "vkCmdCopyImage" ) ); vkCmdBlitImage = PFN_vkCmdBlitImage( vkGetDeviceProcAddr( device, "vkCmdBlitImage" ) ); vkCmdCopyBufferToImage = PFN_vkCmdCopyBufferToImage( vkGetDeviceProcAddr( device, "vkCmdCopyBufferToImage" ) ); vkCmdCopyImageToBuffer = PFN_vkCmdCopyImageToBuffer( vkGetDeviceProcAddr( device, "vkCmdCopyImageToBuffer" ) ); vkCmdUpdateBuffer = PFN_vkCmdUpdateBuffer( vkGetDeviceProcAddr( device, "vkCmdUpdateBuffer" ) ); vkCmdFillBuffer = PFN_vkCmdFillBuffer( vkGetDeviceProcAddr( device, "vkCmdFillBuffer" ) ); vkCmdClearColorImage = PFN_vkCmdClearColorImage( vkGetDeviceProcAddr( device, "vkCmdClearColorImage" ) ); vkCmdClearDepthStencilImage = PFN_vkCmdClearDepthStencilImage( vkGetDeviceProcAddr( device, "vkCmdClearDepthStencilImage" ) ); vkCmdClearAttachments = PFN_vkCmdClearAttachments( vkGetDeviceProcAddr( device, "vkCmdClearAttachments" ) ); vkCmdResolveImage = PFN_vkCmdResolveImage( vkGetDeviceProcAddr( device, "vkCmdResolveImage" ) ); vkCmdSetEvent = PFN_vkCmdSetEvent( vkGetDeviceProcAddr( device, "vkCmdSetEvent" ) ); vkCmdResetEvent = PFN_vkCmdResetEvent( vkGetDeviceProcAddr( device, "vkCmdResetEvent" ) ); vkCmdWaitEvents = PFN_vkCmdWaitEvents( vkGetDeviceProcAddr( device, "vkCmdWaitEvents" ) ); vkCmdPipelineBarrier = PFN_vkCmdPipelineBarrier( vkGetDeviceProcAddr( device, "vkCmdPipelineBarrier" ) ); vkCmdBeginQuery = PFN_vkCmdBeginQuery( vkGetDeviceProcAddr( device, "vkCmdBeginQuery" ) ); vkCmdEndQuery = PFN_vkCmdEndQuery( vkGetDeviceProcAddr( device, "vkCmdEndQuery" ) ); vkCmdResetQueryPool = PFN_vkCmdResetQueryPool( vkGetDeviceProcAddr( device, "vkCmdResetQueryPool" ) ); vkCmdWriteTimestamp = PFN_vkCmdWriteTimestamp( vkGetDeviceProcAddr( device, "vkCmdWriteTimestamp" ) ); vkCmdCopyQueryPoolResults = PFN_vkCmdCopyQueryPoolResults( vkGetDeviceProcAddr( device, "vkCmdCopyQueryPoolResults" ) ); vkCmdPushConstants = PFN_vkCmdPushConstants( vkGetDeviceProcAddr( device, "vkCmdPushConstants" ) ); vkCmdBeginRenderPass = PFN_vkCmdBeginRenderPass( vkGetDeviceProcAddr( device, "vkCmdBeginRenderPass" ) ); vkCmdNextSubpass = PFN_vkCmdNextSubpass( vkGetDeviceProcAddr( device, "vkCmdNextSubpass" ) ); vkCmdEndRenderPass = PFN_vkCmdEndRenderPass( vkGetDeviceProcAddr( device, "vkCmdEndRenderPass" ) ); vkCmdExecuteCommands = PFN_vkCmdExecuteCommands( vkGetDeviceProcAddr( device, "vkCmdExecuteCommands" ) ); //=== VK_VERSION_1_1 === vkBindBufferMemory2 = PFN_vkBindBufferMemory2( vkGetDeviceProcAddr( device, "vkBindBufferMemory2" ) ); vkBindImageMemory2 = PFN_vkBindImageMemory2( vkGetDeviceProcAddr( device, "vkBindImageMemory2" ) ); vkGetDeviceGroupPeerMemoryFeatures = PFN_vkGetDeviceGroupPeerMemoryFeatures( vkGetDeviceProcAddr( device, "vkGetDeviceGroupPeerMemoryFeatures" ) ); vkCmdSetDeviceMask = PFN_vkCmdSetDeviceMask( vkGetDeviceProcAddr( device, "vkCmdSetDeviceMask" ) ); vkCmdDispatchBase = PFN_vkCmdDispatchBase( vkGetDeviceProcAddr( device, "vkCmdDispatchBase" ) ); vkGetImageMemoryRequirements2 = PFN_vkGetImageMemoryRequirements2( vkGetDeviceProcAddr( device, "vkGetImageMemoryRequirements2" ) ); vkGetBufferMemoryRequirements2 = PFN_vkGetBufferMemoryRequirements2( vkGetDeviceProcAddr( device, "vkGetBufferMemoryRequirements2" ) ); vkGetImageSparseMemoryRequirements2 = PFN_vkGetImageSparseMemoryRequirements2( vkGetDeviceProcAddr( device, "vkGetImageSparseMemoryRequirements2" ) ); vkTrimCommandPool = PFN_vkTrimCommandPool( vkGetDeviceProcAddr( device, "vkTrimCommandPool" ) ); vkGetDeviceQueue2 = PFN_vkGetDeviceQueue2( vkGetDeviceProcAddr( device, "vkGetDeviceQueue2" ) ); vkCreateSamplerYcbcrConversion = PFN_vkCreateSamplerYcbcrConversion( vkGetDeviceProcAddr( device, "vkCreateSamplerYcbcrConversion" ) ); vkDestroySamplerYcbcrConversion = PFN_vkDestroySamplerYcbcrConversion( vkGetDeviceProcAddr( device, "vkDestroySamplerYcbcrConversion" ) ); vkCreateDescriptorUpdateTemplate = PFN_vkCreateDescriptorUpdateTemplate( vkGetDeviceProcAddr( device, "vkCreateDescriptorUpdateTemplate" ) ); vkDestroyDescriptorUpdateTemplate = PFN_vkDestroyDescriptorUpdateTemplate( vkGetDeviceProcAddr( device, "vkDestroyDescriptorUpdateTemplate" ) ); vkUpdateDescriptorSetWithTemplate = PFN_vkUpdateDescriptorSetWithTemplate( vkGetDeviceProcAddr( device, "vkUpdateDescriptorSetWithTemplate" ) ); vkGetDescriptorSetLayoutSupport = PFN_vkGetDescriptorSetLayoutSupport( vkGetDeviceProcAddr( device, "vkGetDescriptorSetLayoutSupport" ) ); //=== VK_VERSION_1_2 === vkCmdDrawIndirectCount = PFN_vkCmdDrawIndirectCount( vkGetDeviceProcAddr( device, "vkCmdDrawIndirectCount" ) ); vkCmdDrawIndexedIndirectCount = PFN_vkCmdDrawIndexedIndirectCount( vkGetDeviceProcAddr( device, "vkCmdDrawIndexedIndirectCount" ) ); vkCreateRenderPass2 = PFN_vkCreateRenderPass2( vkGetDeviceProcAddr( device, "vkCreateRenderPass2" ) ); vkCmdBeginRenderPass2 = PFN_vkCmdBeginRenderPass2( vkGetDeviceProcAddr( device, "vkCmdBeginRenderPass2" ) ); vkCmdNextSubpass2 = PFN_vkCmdNextSubpass2( vkGetDeviceProcAddr( device, "vkCmdNextSubpass2" ) ); vkCmdEndRenderPass2 = PFN_vkCmdEndRenderPass2( vkGetDeviceProcAddr( device, "vkCmdEndRenderPass2" ) ); vkResetQueryPool = PFN_vkResetQueryPool( vkGetDeviceProcAddr( device, "vkResetQueryPool" ) ); vkGetSemaphoreCounterValue = PFN_vkGetSemaphoreCounterValue( vkGetDeviceProcAddr( device, "vkGetSemaphoreCounterValue" ) ); vkWaitSemaphores = PFN_vkWaitSemaphores( vkGetDeviceProcAddr( device, "vkWaitSemaphores" ) ); vkSignalSemaphore = PFN_vkSignalSemaphore( vkGetDeviceProcAddr( device, "vkSignalSemaphore" ) ); vkGetBufferDeviceAddress = PFN_vkGetBufferDeviceAddress( vkGetDeviceProcAddr( device, "vkGetBufferDeviceAddress" ) ); vkGetBufferOpaqueCaptureAddress = PFN_vkGetBufferOpaqueCaptureAddress( vkGetDeviceProcAddr( device, "vkGetBufferOpaqueCaptureAddress" ) ); vkGetDeviceMemoryOpaqueCaptureAddress = PFN_vkGetDeviceMemoryOpaqueCaptureAddress( vkGetDeviceProcAddr( device, "vkGetDeviceMemoryOpaqueCaptureAddress" ) ); //=== VK_VERSION_1_3 === vkCreatePrivateDataSlot = PFN_vkCreatePrivateDataSlot( vkGetDeviceProcAddr( device, "vkCreatePrivateDataSlot" ) ); vkDestroyPrivateDataSlot = PFN_vkDestroyPrivateDataSlot( vkGetDeviceProcAddr( device, "vkDestroyPrivateDataSlot" ) ); vkSetPrivateData = PFN_vkSetPrivateData( vkGetDeviceProcAddr( device, "vkSetPrivateData" ) ); vkGetPrivateData = PFN_vkGetPrivateData( vkGetDeviceProcAddr( device, "vkGetPrivateData" ) ); vkCmdSetEvent2 = PFN_vkCmdSetEvent2( vkGetDeviceProcAddr( device, "vkCmdSetEvent2" ) ); vkCmdResetEvent2 = PFN_vkCmdResetEvent2( vkGetDeviceProcAddr( device, "vkCmdResetEvent2" ) ); vkCmdWaitEvents2 = PFN_vkCmdWaitEvents2( vkGetDeviceProcAddr( device, "vkCmdWaitEvents2" ) ); vkCmdPipelineBarrier2 = PFN_vkCmdPipelineBarrier2( vkGetDeviceProcAddr( device, "vkCmdPipelineBarrier2" ) ); vkCmdWriteTimestamp2 = PFN_vkCmdWriteTimestamp2( vkGetDeviceProcAddr( device, "vkCmdWriteTimestamp2" ) ); vkQueueSubmit2 = PFN_vkQueueSubmit2( vkGetDeviceProcAddr( device, "vkQueueSubmit2" ) ); vkCmdCopyBuffer2 = PFN_vkCmdCopyBuffer2( vkGetDeviceProcAddr( device, "vkCmdCopyBuffer2" ) ); vkCmdCopyImage2 = PFN_vkCmdCopyImage2( vkGetDeviceProcAddr( device, "vkCmdCopyImage2" ) ); vkCmdCopyBufferToImage2 = PFN_vkCmdCopyBufferToImage2( vkGetDeviceProcAddr( device, "vkCmdCopyBufferToImage2" ) ); vkCmdCopyImageToBuffer2 = PFN_vkCmdCopyImageToBuffer2( vkGetDeviceProcAddr( device, "vkCmdCopyImageToBuffer2" ) ); vkCmdBlitImage2 = PFN_vkCmdBlitImage2( vkGetDeviceProcAddr( device, "vkCmdBlitImage2" ) ); vkCmdResolveImage2 = PFN_vkCmdResolveImage2( vkGetDeviceProcAddr( device, "vkCmdResolveImage2" ) ); vkCmdBeginRendering = PFN_vkCmdBeginRendering( vkGetDeviceProcAddr( device, "vkCmdBeginRendering" ) ); vkCmdEndRendering = PFN_vkCmdEndRendering( vkGetDeviceProcAddr( device, "vkCmdEndRendering" ) ); vkCmdSetCullMode = PFN_vkCmdSetCullMode( vkGetDeviceProcAddr( device, "vkCmdSetCullMode" ) ); vkCmdSetFrontFace = PFN_vkCmdSetFrontFace( vkGetDeviceProcAddr( device, "vkCmdSetFrontFace" ) ); vkCmdSetPrimitiveTopology = PFN_vkCmdSetPrimitiveTopology( vkGetDeviceProcAddr( device, "vkCmdSetPrimitiveTopology" ) ); vkCmdSetViewportWithCount = PFN_vkCmdSetViewportWithCount( vkGetDeviceProcAddr( device, "vkCmdSetViewportWithCount" ) ); vkCmdSetScissorWithCount = PFN_vkCmdSetScissorWithCount( vkGetDeviceProcAddr( device, "vkCmdSetScissorWithCount" ) ); vkCmdBindVertexBuffers2 = PFN_vkCmdBindVertexBuffers2( vkGetDeviceProcAddr( device, "vkCmdBindVertexBuffers2" ) ); vkCmdSetDepthTestEnable = PFN_vkCmdSetDepthTestEnable( vkGetDeviceProcAddr( device, "vkCmdSetDepthTestEnable" ) ); vkCmdSetDepthWriteEnable = PFN_vkCmdSetDepthWriteEnable( vkGetDeviceProcAddr( device, "vkCmdSetDepthWriteEnable" ) ); vkCmdSetDepthCompareOp = PFN_vkCmdSetDepthCompareOp( vkGetDeviceProcAddr( device, "vkCmdSetDepthCompareOp" ) ); vkCmdSetDepthBoundsTestEnable = PFN_vkCmdSetDepthBoundsTestEnable( vkGetDeviceProcAddr( device, "vkCmdSetDepthBoundsTestEnable" ) ); vkCmdSetStencilTestEnable = PFN_vkCmdSetStencilTestEnable( vkGetDeviceProcAddr( device, "vkCmdSetStencilTestEnable" ) ); vkCmdSetStencilOp = PFN_vkCmdSetStencilOp( vkGetDeviceProcAddr( device, "vkCmdSetStencilOp" ) ); vkCmdSetRasterizerDiscardEnable = PFN_vkCmdSetRasterizerDiscardEnable( vkGetDeviceProcAddr( device, "vkCmdSetRasterizerDiscardEnable" ) ); vkCmdSetDepthBiasEnable = PFN_vkCmdSetDepthBiasEnable( vkGetDeviceProcAddr( device, "vkCmdSetDepthBiasEnable" ) ); vkCmdSetPrimitiveRestartEnable = PFN_vkCmdSetPrimitiveRestartEnable( vkGetDeviceProcAddr( device, "vkCmdSetPrimitiveRestartEnable" ) ); vkGetDeviceBufferMemoryRequirements = PFN_vkGetDeviceBufferMemoryRequirements( vkGetDeviceProcAddr( device, "vkGetDeviceBufferMemoryRequirements" ) ); vkGetDeviceImageMemoryRequirements = PFN_vkGetDeviceImageMemoryRequirements( vkGetDeviceProcAddr( device, "vkGetDeviceImageMemoryRequirements" ) ); vkGetDeviceImageSparseMemoryRequirements = PFN_vkGetDeviceImageSparseMemoryRequirements( vkGetDeviceProcAddr( device, "vkGetDeviceImageSparseMemoryRequirements" ) ); //=== VK_VERSION_1_4 === vkCmdSetLineStipple = PFN_vkCmdSetLineStipple( vkGetDeviceProcAddr( device, "vkCmdSetLineStipple" ) ); vkMapMemory2 = PFN_vkMapMemory2( vkGetDeviceProcAddr( device, "vkMapMemory2" ) ); vkUnmapMemory2 = PFN_vkUnmapMemory2( vkGetDeviceProcAddr( device, "vkUnmapMemory2" ) ); vkCmdBindIndexBuffer2 = PFN_vkCmdBindIndexBuffer2( vkGetDeviceProcAddr( device, "vkCmdBindIndexBuffer2" ) ); vkGetRenderingAreaGranularity = PFN_vkGetRenderingAreaGranularity( vkGetDeviceProcAddr( device, "vkGetRenderingAreaGranularity" ) ); vkGetDeviceImageSubresourceLayout = PFN_vkGetDeviceImageSubresourceLayout( vkGetDeviceProcAddr( device, "vkGetDeviceImageSubresourceLayout" ) ); vkGetImageSubresourceLayout2 = PFN_vkGetImageSubresourceLayout2( vkGetDeviceProcAddr( device, "vkGetImageSubresourceLayout2" ) ); vkCmdPushDescriptorSet = PFN_vkCmdPushDescriptorSet( vkGetDeviceProcAddr( device, "vkCmdPushDescriptorSet" ) ); vkCmdPushDescriptorSetWithTemplate = PFN_vkCmdPushDescriptorSetWithTemplate( vkGetDeviceProcAddr( device, "vkCmdPushDescriptorSetWithTemplate" ) ); vkCmdSetRenderingAttachmentLocations = PFN_vkCmdSetRenderingAttachmentLocations( vkGetDeviceProcAddr( device, "vkCmdSetRenderingAttachmentLocations" ) ); vkCmdSetRenderingInputAttachmentIndices = PFN_vkCmdSetRenderingInputAttachmentIndices( vkGetDeviceProcAddr( device, "vkCmdSetRenderingInputAttachmentIndices" ) ); vkCmdBindDescriptorSets2 = PFN_vkCmdBindDescriptorSets2( vkGetDeviceProcAddr( device, "vkCmdBindDescriptorSets2" ) ); vkCmdPushConstants2 = PFN_vkCmdPushConstants2( vkGetDeviceProcAddr( device, "vkCmdPushConstants2" ) ); vkCmdPushDescriptorSet2 = PFN_vkCmdPushDescriptorSet2( vkGetDeviceProcAddr( device, "vkCmdPushDescriptorSet2" ) ); vkCmdPushDescriptorSetWithTemplate2 = PFN_vkCmdPushDescriptorSetWithTemplate2( vkGetDeviceProcAddr( device, "vkCmdPushDescriptorSetWithTemplate2" ) ); vkCopyMemoryToImage = PFN_vkCopyMemoryToImage( vkGetDeviceProcAddr( device, "vkCopyMemoryToImage" ) ); vkCopyImageToMemory = PFN_vkCopyImageToMemory( vkGetDeviceProcAddr( device, "vkCopyImageToMemory" ) ); vkCopyImageToImage = PFN_vkCopyImageToImage( vkGetDeviceProcAddr( device, "vkCopyImageToImage" ) ); vkTransitionImageLayout = PFN_vkTransitionImageLayout( vkGetDeviceProcAddr( device, "vkTransitionImageLayout" ) ); //=== VK_KHR_swapchain === vkCreateSwapchainKHR = PFN_vkCreateSwapchainKHR( vkGetDeviceProcAddr( device, "vkCreateSwapchainKHR" ) ); vkDestroySwapchainKHR = PFN_vkDestroySwapchainKHR( vkGetDeviceProcAddr( device, "vkDestroySwapchainKHR" ) ); vkGetSwapchainImagesKHR = PFN_vkGetSwapchainImagesKHR( vkGetDeviceProcAddr( device, "vkGetSwapchainImagesKHR" ) ); vkAcquireNextImageKHR = PFN_vkAcquireNextImageKHR( vkGetDeviceProcAddr( device, "vkAcquireNextImageKHR" ) ); vkQueuePresentKHR = PFN_vkQueuePresentKHR( vkGetDeviceProcAddr( device, "vkQueuePresentKHR" ) ); vkGetDeviceGroupPresentCapabilitiesKHR = PFN_vkGetDeviceGroupPresentCapabilitiesKHR( vkGetDeviceProcAddr( device, "vkGetDeviceGroupPresentCapabilitiesKHR" ) ); vkGetDeviceGroupSurfacePresentModesKHR = PFN_vkGetDeviceGroupSurfacePresentModesKHR( vkGetDeviceProcAddr( device, "vkGetDeviceGroupSurfacePresentModesKHR" ) ); vkAcquireNextImage2KHR = PFN_vkAcquireNextImage2KHR( vkGetDeviceProcAddr( device, "vkAcquireNextImage2KHR" ) ); //=== VK_KHR_display_swapchain === vkCreateSharedSwapchainsKHR = PFN_vkCreateSharedSwapchainsKHR( vkGetDeviceProcAddr( device, "vkCreateSharedSwapchainsKHR" ) ); //=== VK_EXT_debug_marker === vkDebugMarkerSetObjectTagEXT = PFN_vkDebugMarkerSetObjectTagEXT( vkGetDeviceProcAddr( device, "vkDebugMarkerSetObjectTagEXT" ) ); vkDebugMarkerSetObjectNameEXT = PFN_vkDebugMarkerSetObjectNameEXT( vkGetDeviceProcAddr( device, "vkDebugMarkerSetObjectNameEXT" ) ); vkCmdDebugMarkerBeginEXT = PFN_vkCmdDebugMarkerBeginEXT( vkGetDeviceProcAddr( device, "vkCmdDebugMarkerBeginEXT" ) ); vkCmdDebugMarkerEndEXT = PFN_vkCmdDebugMarkerEndEXT( vkGetDeviceProcAddr( device, "vkCmdDebugMarkerEndEXT" ) ); vkCmdDebugMarkerInsertEXT = PFN_vkCmdDebugMarkerInsertEXT( vkGetDeviceProcAddr( device, "vkCmdDebugMarkerInsertEXT" ) ); //=== VK_KHR_video_queue === vkCreateVideoSessionKHR = PFN_vkCreateVideoSessionKHR( vkGetDeviceProcAddr( device, "vkCreateVideoSessionKHR" ) ); vkDestroyVideoSessionKHR = PFN_vkDestroyVideoSessionKHR( vkGetDeviceProcAddr( device, "vkDestroyVideoSessionKHR" ) ); vkGetVideoSessionMemoryRequirementsKHR = PFN_vkGetVideoSessionMemoryRequirementsKHR( vkGetDeviceProcAddr( device, "vkGetVideoSessionMemoryRequirementsKHR" ) ); vkBindVideoSessionMemoryKHR = PFN_vkBindVideoSessionMemoryKHR( vkGetDeviceProcAddr( device, "vkBindVideoSessionMemoryKHR" ) ); vkCreateVideoSessionParametersKHR = PFN_vkCreateVideoSessionParametersKHR( vkGetDeviceProcAddr( device, "vkCreateVideoSessionParametersKHR" ) ); vkUpdateVideoSessionParametersKHR = PFN_vkUpdateVideoSessionParametersKHR( vkGetDeviceProcAddr( device, "vkUpdateVideoSessionParametersKHR" ) ); vkDestroyVideoSessionParametersKHR = PFN_vkDestroyVideoSessionParametersKHR( vkGetDeviceProcAddr( device, "vkDestroyVideoSessionParametersKHR" ) ); vkCmdBeginVideoCodingKHR = PFN_vkCmdBeginVideoCodingKHR( vkGetDeviceProcAddr( device, "vkCmdBeginVideoCodingKHR" ) ); vkCmdEndVideoCodingKHR = PFN_vkCmdEndVideoCodingKHR( vkGetDeviceProcAddr( device, "vkCmdEndVideoCodingKHR" ) ); vkCmdControlVideoCodingKHR = PFN_vkCmdControlVideoCodingKHR( vkGetDeviceProcAddr( device, "vkCmdControlVideoCodingKHR" ) ); //=== VK_KHR_video_decode_queue === vkCmdDecodeVideoKHR = PFN_vkCmdDecodeVideoKHR( vkGetDeviceProcAddr( device, "vkCmdDecodeVideoKHR" ) ); //=== VK_EXT_transform_feedback === vkCmdBindTransformFeedbackBuffersEXT = PFN_vkCmdBindTransformFeedbackBuffersEXT( vkGetDeviceProcAddr( device, "vkCmdBindTransformFeedbackBuffersEXT" ) ); vkCmdBeginTransformFeedbackEXT = PFN_vkCmdBeginTransformFeedbackEXT( vkGetDeviceProcAddr( device, "vkCmdBeginTransformFeedbackEXT" ) ); vkCmdEndTransformFeedbackEXT = PFN_vkCmdEndTransformFeedbackEXT( vkGetDeviceProcAddr( device, "vkCmdEndTransformFeedbackEXT" ) ); vkCmdBeginQueryIndexedEXT = PFN_vkCmdBeginQueryIndexedEXT( vkGetDeviceProcAddr( device, "vkCmdBeginQueryIndexedEXT" ) ); vkCmdEndQueryIndexedEXT = PFN_vkCmdEndQueryIndexedEXT( vkGetDeviceProcAddr( device, "vkCmdEndQueryIndexedEXT" ) ); vkCmdDrawIndirectByteCountEXT = PFN_vkCmdDrawIndirectByteCountEXT( vkGetDeviceProcAddr( device, "vkCmdDrawIndirectByteCountEXT" ) ); //=== VK_NVX_binary_import === vkCreateCuModuleNVX = PFN_vkCreateCuModuleNVX( vkGetDeviceProcAddr( device, "vkCreateCuModuleNVX" ) ); vkCreateCuFunctionNVX = PFN_vkCreateCuFunctionNVX( vkGetDeviceProcAddr( device, "vkCreateCuFunctionNVX" ) ); vkDestroyCuModuleNVX = PFN_vkDestroyCuModuleNVX( vkGetDeviceProcAddr( device, "vkDestroyCuModuleNVX" ) ); vkDestroyCuFunctionNVX = PFN_vkDestroyCuFunctionNVX( vkGetDeviceProcAddr( device, "vkDestroyCuFunctionNVX" ) ); vkCmdCuLaunchKernelNVX = PFN_vkCmdCuLaunchKernelNVX( vkGetDeviceProcAddr( device, "vkCmdCuLaunchKernelNVX" ) ); //=== VK_NVX_image_view_handle === vkGetImageViewHandleNVX = PFN_vkGetImageViewHandleNVX( vkGetDeviceProcAddr( device, "vkGetImageViewHandleNVX" ) ); vkGetImageViewHandle64NVX = PFN_vkGetImageViewHandle64NVX( vkGetDeviceProcAddr( device, "vkGetImageViewHandle64NVX" ) ); vkGetImageViewAddressNVX = PFN_vkGetImageViewAddressNVX( vkGetDeviceProcAddr( device, "vkGetImageViewAddressNVX" ) ); //=== VK_AMD_draw_indirect_count === vkCmdDrawIndirectCountAMD = PFN_vkCmdDrawIndirectCountAMD( vkGetDeviceProcAddr( device, "vkCmdDrawIndirectCountAMD" ) ); if ( !vkCmdDrawIndirectCount ) vkCmdDrawIndirectCount = vkCmdDrawIndirectCountAMD; vkCmdDrawIndexedIndirectCountAMD = PFN_vkCmdDrawIndexedIndirectCountAMD( vkGetDeviceProcAddr( device, "vkCmdDrawIndexedIndirectCountAMD" ) ); if ( !vkCmdDrawIndexedIndirectCount ) vkCmdDrawIndexedIndirectCount = vkCmdDrawIndexedIndirectCountAMD; //=== VK_AMD_shader_info === vkGetShaderInfoAMD = PFN_vkGetShaderInfoAMD( vkGetDeviceProcAddr( device, "vkGetShaderInfoAMD" ) ); //=== VK_KHR_dynamic_rendering === vkCmdBeginRenderingKHR = PFN_vkCmdBeginRenderingKHR( vkGetDeviceProcAddr( device, "vkCmdBeginRenderingKHR" ) ); if ( !vkCmdBeginRendering ) vkCmdBeginRendering = vkCmdBeginRenderingKHR; vkCmdEndRenderingKHR = PFN_vkCmdEndRenderingKHR( vkGetDeviceProcAddr( device, "vkCmdEndRenderingKHR" ) ); if ( !vkCmdEndRendering ) vkCmdEndRendering = vkCmdEndRenderingKHR; #if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_NV_external_memory_win32 === vkGetMemoryWin32HandleNV = PFN_vkGetMemoryWin32HandleNV( vkGetDeviceProcAddr( device, "vkGetMemoryWin32HandleNV" ) ); #endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_KHR_device_group === vkGetDeviceGroupPeerMemoryFeaturesKHR = PFN_vkGetDeviceGroupPeerMemoryFeaturesKHR( vkGetDeviceProcAddr( device, "vkGetDeviceGroupPeerMemoryFeaturesKHR" ) ); if ( !vkGetDeviceGroupPeerMemoryFeatures ) vkGetDeviceGroupPeerMemoryFeatures = vkGetDeviceGroupPeerMemoryFeaturesKHR; vkCmdSetDeviceMaskKHR = PFN_vkCmdSetDeviceMaskKHR( vkGetDeviceProcAddr( device, "vkCmdSetDeviceMaskKHR" ) ); if ( !vkCmdSetDeviceMask ) vkCmdSetDeviceMask = vkCmdSetDeviceMaskKHR; vkCmdDispatchBaseKHR = PFN_vkCmdDispatchBaseKHR( vkGetDeviceProcAddr( device, "vkCmdDispatchBaseKHR" ) ); if ( !vkCmdDispatchBase ) vkCmdDispatchBase = vkCmdDispatchBaseKHR; //=== VK_KHR_maintenance1 === vkTrimCommandPoolKHR = PFN_vkTrimCommandPoolKHR( vkGetDeviceProcAddr( device, "vkTrimCommandPoolKHR" ) ); if ( !vkTrimCommandPool ) vkTrimCommandPool = vkTrimCommandPoolKHR; #if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_KHR_external_memory_win32 === vkGetMemoryWin32HandleKHR = PFN_vkGetMemoryWin32HandleKHR( vkGetDeviceProcAddr( device, "vkGetMemoryWin32HandleKHR" ) ); vkGetMemoryWin32HandlePropertiesKHR = PFN_vkGetMemoryWin32HandlePropertiesKHR( vkGetDeviceProcAddr( device, "vkGetMemoryWin32HandlePropertiesKHR" ) ); #endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_KHR_external_memory_fd === vkGetMemoryFdKHR = PFN_vkGetMemoryFdKHR( vkGetDeviceProcAddr( device, "vkGetMemoryFdKHR" ) ); vkGetMemoryFdPropertiesKHR = PFN_vkGetMemoryFdPropertiesKHR( vkGetDeviceProcAddr( device, "vkGetMemoryFdPropertiesKHR" ) ); #if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_KHR_external_semaphore_win32 === vkImportSemaphoreWin32HandleKHR = PFN_vkImportSemaphoreWin32HandleKHR( vkGetDeviceProcAddr( device, "vkImportSemaphoreWin32HandleKHR" ) ); vkGetSemaphoreWin32HandleKHR = PFN_vkGetSemaphoreWin32HandleKHR( vkGetDeviceProcAddr( device, "vkGetSemaphoreWin32HandleKHR" ) ); #endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_KHR_external_semaphore_fd === vkImportSemaphoreFdKHR = PFN_vkImportSemaphoreFdKHR( vkGetDeviceProcAddr( device, "vkImportSemaphoreFdKHR" ) ); vkGetSemaphoreFdKHR = PFN_vkGetSemaphoreFdKHR( vkGetDeviceProcAddr( device, "vkGetSemaphoreFdKHR" ) ); //=== VK_KHR_push_descriptor === vkCmdPushDescriptorSetKHR = PFN_vkCmdPushDescriptorSetKHR( vkGetDeviceProcAddr( device, "vkCmdPushDescriptorSetKHR" ) ); if ( !vkCmdPushDescriptorSet ) vkCmdPushDescriptorSet = vkCmdPushDescriptorSetKHR; vkCmdPushDescriptorSetWithTemplateKHR = PFN_vkCmdPushDescriptorSetWithTemplateKHR( vkGetDeviceProcAddr( device, "vkCmdPushDescriptorSetWithTemplateKHR" ) ); if ( !vkCmdPushDescriptorSetWithTemplate ) vkCmdPushDescriptorSetWithTemplate = vkCmdPushDescriptorSetWithTemplateKHR; //=== VK_EXT_conditional_rendering === vkCmdBeginConditionalRenderingEXT = PFN_vkCmdBeginConditionalRenderingEXT( vkGetDeviceProcAddr( device, "vkCmdBeginConditionalRenderingEXT" ) ); vkCmdEndConditionalRenderingEXT = PFN_vkCmdEndConditionalRenderingEXT( vkGetDeviceProcAddr( device, "vkCmdEndConditionalRenderingEXT" ) ); //=== VK_KHR_descriptor_update_template === vkCreateDescriptorUpdateTemplateKHR = PFN_vkCreateDescriptorUpdateTemplateKHR( vkGetDeviceProcAddr( device, "vkCreateDescriptorUpdateTemplateKHR" ) ); if ( !vkCreateDescriptorUpdateTemplate ) vkCreateDescriptorUpdateTemplate = vkCreateDescriptorUpdateTemplateKHR; vkDestroyDescriptorUpdateTemplateKHR = PFN_vkDestroyDescriptorUpdateTemplateKHR( vkGetDeviceProcAddr( device, "vkDestroyDescriptorUpdateTemplateKHR" ) ); if ( !vkDestroyDescriptorUpdateTemplate ) vkDestroyDescriptorUpdateTemplate = vkDestroyDescriptorUpdateTemplateKHR; vkUpdateDescriptorSetWithTemplateKHR = PFN_vkUpdateDescriptorSetWithTemplateKHR( vkGetDeviceProcAddr( device, "vkUpdateDescriptorSetWithTemplateKHR" ) ); if ( !vkUpdateDescriptorSetWithTemplate ) vkUpdateDescriptorSetWithTemplate = vkUpdateDescriptorSetWithTemplateKHR; //=== VK_NV_clip_space_w_scaling === vkCmdSetViewportWScalingNV = PFN_vkCmdSetViewportWScalingNV( vkGetDeviceProcAddr( device, "vkCmdSetViewportWScalingNV" ) ); //=== VK_EXT_display_control === vkDisplayPowerControlEXT = PFN_vkDisplayPowerControlEXT( vkGetDeviceProcAddr( device, "vkDisplayPowerControlEXT" ) ); vkRegisterDeviceEventEXT = PFN_vkRegisterDeviceEventEXT( vkGetDeviceProcAddr( device, "vkRegisterDeviceEventEXT" ) ); vkRegisterDisplayEventEXT = PFN_vkRegisterDisplayEventEXT( vkGetDeviceProcAddr( device, "vkRegisterDisplayEventEXT" ) ); vkGetSwapchainCounterEXT = PFN_vkGetSwapchainCounterEXT( vkGetDeviceProcAddr( device, "vkGetSwapchainCounterEXT" ) ); //=== VK_GOOGLE_display_timing === vkGetRefreshCycleDurationGOOGLE = PFN_vkGetRefreshCycleDurationGOOGLE( vkGetDeviceProcAddr( device, "vkGetRefreshCycleDurationGOOGLE" ) ); vkGetPastPresentationTimingGOOGLE = PFN_vkGetPastPresentationTimingGOOGLE( vkGetDeviceProcAddr( device, "vkGetPastPresentationTimingGOOGLE" ) ); //=== VK_EXT_discard_rectangles === vkCmdSetDiscardRectangleEXT = PFN_vkCmdSetDiscardRectangleEXT( vkGetDeviceProcAddr( device, "vkCmdSetDiscardRectangleEXT" ) ); vkCmdSetDiscardRectangleEnableEXT = PFN_vkCmdSetDiscardRectangleEnableEXT( vkGetDeviceProcAddr( device, "vkCmdSetDiscardRectangleEnableEXT" ) ); vkCmdSetDiscardRectangleModeEXT = PFN_vkCmdSetDiscardRectangleModeEXT( vkGetDeviceProcAddr( device, "vkCmdSetDiscardRectangleModeEXT" ) ); //=== VK_EXT_hdr_metadata === vkSetHdrMetadataEXT = PFN_vkSetHdrMetadataEXT( vkGetDeviceProcAddr( device, "vkSetHdrMetadataEXT" ) ); //=== VK_KHR_create_renderpass2 === vkCreateRenderPass2KHR = PFN_vkCreateRenderPass2KHR( vkGetDeviceProcAddr( device, "vkCreateRenderPass2KHR" ) ); if ( !vkCreateRenderPass2 ) vkCreateRenderPass2 = vkCreateRenderPass2KHR; vkCmdBeginRenderPass2KHR = PFN_vkCmdBeginRenderPass2KHR( vkGetDeviceProcAddr( device, "vkCmdBeginRenderPass2KHR" ) ); if ( !vkCmdBeginRenderPass2 ) vkCmdBeginRenderPass2 = vkCmdBeginRenderPass2KHR; vkCmdNextSubpass2KHR = PFN_vkCmdNextSubpass2KHR( vkGetDeviceProcAddr( device, "vkCmdNextSubpass2KHR" ) ); if ( !vkCmdNextSubpass2 ) vkCmdNextSubpass2 = vkCmdNextSubpass2KHR; vkCmdEndRenderPass2KHR = PFN_vkCmdEndRenderPass2KHR( vkGetDeviceProcAddr( device, "vkCmdEndRenderPass2KHR" ) ); if ( !vkCmdEndRenderPass2 ) vkCmdEndRenderPass2 = vkCmdEndRenderPass2KHR; //=== VK_KHR_shared_presentable_image === vkGetSwapchainStatusKHR = PFN_vkGetSwapchainStatusKHR( vkGetDeviceProcAddr( device, "vkGetSwapchainStatusKHR" ) ); #if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_KHR_external_fence_win32 === vkImportFenceWin32HandleKHR = PFN_vkImportFenceWin32HandleKHR( vkGetDeviceProcAddr( device, "vkImportFenceWin32HandleKHR" ) ); vkGetFenceWin32HandleKHR = PFN_vkGetFenceWin32HandleKHR( vkGetDeviceProcAddr( device, "vkGetFenceWin32HandleKHR" ) ); #endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_KHR_external_fence_fd === vkImportFenceFdKHR = PFN_vkImportFenceFdKHR( vkGetDeviceProcAddr( device, "vkImportFenceFdKHR" ) ); vkGetFenceFdKHR = PFN_vkGetFenceFdKHR( vkGetDeviceProcAddr( device, "vkGetFenceFdKHR" ) ); //=== VK_KHR_performance_query === vkAcquireProfilingLockKHR = PFN_vkAcquireProfilingLockKHR( vkGetDeviceProcAddr( device, "vkAcquireProfilingLockKHR" ) ); vkReleaseProfilingLockKHR = PFN_vkReleaseProfilingLockKHR( vkGetDeviceProcAddr( device, "vkReleaseProfilingLockKHR" ) ); //=== VK_EXT_debug_utils === vkSetDebugUtilsObjectNameEXT = PFN_vkSetDebugUtilsObjectNameEXT( vkGetDeviceProcAddr( device, "vkSetDebugUtilsObjectNameEXT" ) ); vkSetDebugUtilsObjectTagEXT = PFN_vkSetDebugUtilsObjectTagEXT( vkGetDeviceProcAddr( device, "vkSetDebugUtilsObjectTagEXT" ) ); vkQueueBeginDebugUtilsLabelEXT = PFN_vkQueueBeginDebugUtilsLabelEXT( vkGetDeviceProcAddr( device, "vkQueueBeginDebugUtilsLabelEXT" ) ); vkQueueEndDebugUtilsLabelEXT = PFN_vkQueueEndDebugUtilsLabelEXT( vkGetDeviceProcAddr( device, "vkQueueEndDebugUtilsLabelEXT" ) ); vkQueueInsertDebugUtilsLabelEXT = PFN_vkQueueInsertDebugUtilsLabelEXT( vkGetDeviceProcAddr( device, "vkQueueInsertDebugUtilsLabelEXT" ) ); vkCmdBeginDebugUtilsLabelEXT = PFN_vkCmdBeginDebugUtilsLabelEXT( vkGetDeviceProcAddr( device, "vkCmdBeginDebugUtilsLabelEXT" ) ); vkCmdEndDebugUtilsLabelEXT = PFN_vkCmdEndDebugUtilsLabelEXT( vkGetDeviceProcAddr( device, "vkCmdEndDebugUtilsLabelEXT" ) ); vkCmdInsertDebugUtilsLabelEXT = PFN_vkCmdInsertDebugUtilsLabelEXT( vkGetDeviceProcAddr( device, "vkCmdInsertDebugUtilsLabelEXT" ) ); #if defined( VK_USE_PLATFORM_ANDROID_KHR ) //=== VK_ANDROID_external_memory_android_hardware_buffer === vkGetAndroidHardwareBufferPropertiesANDROID = PFN_vkGetAndroidHardwareBufferPropertiesANDROID( vkGetDeviceProcAddr( device, "vkGetAndroidHardwareBufferPropertiesANDROID" ) ); vkGetMemoryAndroidHardwareBufferANDROID = PFN_vkGetMemoryAndroidHardwareBufferANDROID( vkGetDeviceProcAddr( device, "vkGetMemoryAndroidHardwareBufferANDROID" ) ); #endif /*VK_USE_PLATFORM_ANDROID_KHR*/ #if defined( VK_ENABLE_BETA_EXTENSIONS ) //=== VK_AMDX_shader_enqueue === vkCreateExecutionGraphPipelinesAMDX = PFN_vkCreateExecutionGraphPipelinesAMDX( vkGetDeviceProcAddr( device, "vkCreateExecutionGraphPipelinesAMDX" ) ); vkGetExecutionGraphPipelineScratchSizeAMDX = PFN_vkGetExecutionGraphPipelineScratchSizeAMDX( vkGetDeviceProcAddr( device, "vkGetExecutionGraphPipelineScratchSizeAMDX" ) ); vkGetExecutionGraphPipelineNodeIndexAMDX = PFN_vkGetExecutionGraphPipelineNodeIndexAMDX( vkGetDeviceProcAddr( device, "vkGetExecutionGraphPipelineNodeIndexAMDX" ) ); vkCmdInitializeGraphScratchMemoryAMDX = PFN_vkCmdInitializeGraphScratchMemoryAMDX( vkGetDeviceProcAddr( device, "vkCmdInitializeGraphScratchMemoryAMDX" ) ); vkCmdDispatchGraphAMDX = PFN_vkCmdDispatchGraphAMDX( vkGetDeviceProcAddr( device, "vkCmdDispatchGraphAMDX" ) ); vkCmdDispatchGraphIndirectAMDX = PFN_vkCmdDispatchGraphIndirectAMDX( vkGetDeviceProcAddr( device, "vkCmdDispatchGraphIndirectAMDX" ) ); vkCmdDispatchGraphIndirectCountAMDX = PFN_vkCmdDispatchGraphIndirectCountAMDX( vkGetDeviceProcAddr( device, "vkCmdDispatchGraphIndirectCountAMDX" ) ); #endif /*VK_ENABLE_BETA_EXTENSIONS*/ //=== VK_EXT_sample_locations === vkCmdSetSampleLocationsEXT = PFN_vkCmdSetSampleLocationsEXT( vkGetDeviceProcAddr( device, "vkCmdSetSampleLocationsEXT" ) ); //=== VK_KHR_get_memory_requirements2 === vkGetImageMemoryRequirements2KHR = PFN_vkGetImageMemoryRequirements2KHR( vkGetDeviceProcAddr( device, "vkGetImageMemoryRequirements2KHR" ) ); if ( !vkGetImageMemoryRequirements2 ) vkGetImageMemoryRequirements2 = vkGetImageMemoryRequirements2KHR; vkGetBufferMemoryRequirements2KHR = PFN_vkGetBufferMemoryRequirements2KHR( vkGetDeviceProcAddr( device, "vkGetBufferMemoryRequirements2KHR" ) ); if ( !vkGetBufferMemoryRequirements2 ) vkGetBufferMemoryRequirements2 = vkGetBufferMemoryRequirements2KHR; vkGetImageSparseMemoryRequirements2KHR = PFN_vkGetImageSparseMemoryRequirements2KHR( vkGetDeviceProcAddr( device, "vkGetImageSparseMemoryRequirements2KHR" ) ); if ( !vkGetImageSparseMemoryRequirements2 ) vkGetImageSparseMemoryRequirements2 = vkGetImageSparseMemoryRequirements2KHR; //=== VK_KHR_acceleration_structure === vkCreateAccelerationStructureKHR = PFN_vkCreateAccelerationStructureKHR( vkGetDeviceProcAddr( device, "vkCreateAccelerationStructureKHR" ) ); vkDestroyAccelerationStructureKHR = PFN_vkDestroyAccelerationStructureKHR( vkGetDeviceProcAddr( device, "vkDestroyAccelerationStructureKHR" ) ); vkCmdBuildAccelerationStructuresKHR = PFN_vkCmdBuildAccelerationStructuresKHR( vkGetDeviceProcAddr( device, "vkCmdBuildAccelerationStructuresKHR" ) ); vkCmdBuildAccelerationStructuresIndirectKHR = PFN_vkCmdBuildAccelerationStructuresIndirectKHR( vkGetDeviceProcAddr( device, "vkCmdBuildAccelerationStructuresIndirectKHR" ) ); vkBuildAccelerationStructuresKHR = PFN_vkBuildAccelerationStructuresKHR( vkGetDeviceProcAddr( device, "vkBuildAccelerationStructuresKHR" ) ); vkCopyAccelerationStructureKHR = PFN_vkCopyAccelerationStructureKHR( vkGetDeviceProcAddr( device, "vkCopyAccelerationStructureKHR" ) ); vkCopyAccelerationStructureToMemoryKHR = PFN_vkCopyAccelerationStructureToMemoryKHR( vkGetDeviceProcAddr( device, "vkCopyAccelerationStructureToMemoryKHR" ) ); vkCopyMemoryToAccelerationStructureKHR = PFN_vkCopyMemoryToAccelerationStructureKHR( vkGetDeviceProcAddr( device, "vkCopyMemoryToAccelerationStructureKHR" ) ); vkWriteAccelerationStructuresPropertiesKHR = PFN_vkWriteAccelerationStructuresPropertiesKHR( vkGetDeviceProcAddr( device, "vkWriteAccelerationStructuresPropertiesKHR" ) ); vkCmdCopyAccelerationStructureKHR = PFN_vkCmdCopyAccelerationStructureKHR( vkGetDeviceProcAddr( device, "vkCmdCopyAccelerationStructureKHR" ) ); vkCmdCopyAccelerationStructureToMemoryKHR = PFN_vkCmdCopyAccelerationStructureToMemoryKHR( vkGetDeviceProcAddr( device, "vkCmdCopyAccelerationStructureToMemoryKHR" ) ); vkCmdCopyMemoryToAccelerationStructureKHR = PFN_vkCmdCopyMemoryToAccelerationStructureKHR( vkGetDeviceProcAddr( device, "vkCmdCopyMemoryToAccelerationStructureKHR" ) ); vkGetAccelerationStructureDeviceAddressKHR = PFN_vkGetAccelerationStructureDeviceAddressKHR( vkGetDeviceProcAddr( device, "vkGetAccelerationStructureDeviceAddressKHR" ) ); vkCmdWriteAccelerationStructuresPropertiesKHR = PFN_vkCmdWriteAccelerationStructuresPropertiesKHR( vkGetDeviceProcAddr( device, "vkCmdWriteAccelerationStructuresPropertiesKHR" ) ); vkGetDeviceAccelerationStructureCompatibilityKHR = PFN_vkGetDeviceAccelerationStructureCompatibilityKHR( vkGetDeviceProcAddr( device, "vkGetDeviceAccelerationStructureCompatibilityKHR" ) ); vkGetAccelerationStructureBuildSizesKHR = PFN_vkGetAccelerationStructureBuildSizesKHR( vkGetDeviceProcAddr( device, "vkGetAccelerationStructureBuildSizesKHR" ) ); //=== VK_KHR_ray_tracing_pipeline === vkCmdTraceRaysKHR = PFN_vkCmdTraceRaysKHR( vkGetDeviceProcAddr( device, "vkCmdTraceRaysKHR" ) ); vkCreateRayTracingPipelinesKHR = PFN_vkCreateRayTracingPipelinesKHR( vkGetDeviceProcAddr( device, "vkCreateRayTracingPipelinesKHR" ) ); vkGetRayTracingShaderGroupHandlesKHR = PFN_vkGetRayTracingShaderGroupHandlesKHR( vkGetDeviceProcAddr( device, "vkGetRayTracingShaderGroupHandlesKHR" ) ); vkGetRayTracingCaptureReplayShaderGroupHandlesKHR = PFN_vkGetRayTracingCaptureReplayShaderGroupHandlesKHR( vkGetDeviceProcAddr( device, "vkGetRayTracingCaptureReplayShaderGroupHandlesKHR" ) ); vkCmdTraceRaysIndirectKHR = PFN_vkCmdTraceRaysIndirectKHR( vkGetDeviceProcAddr( device, "vkCmdTraceRaysIndirectKHR" ) ); vkGetRayTracingShaderGroupStackSizeKHR = PFN_vkGetRayTracingShaderGroupStackSizeKHR( vkGetDeviceProcAddr( device, "vkGetRayTracingShaderGroupStackSizeKHR" ) ); vkCmdSetRayTracingPipelineStackSizeKHR = PFN_vkCmdSetRayTracingPipelineStackSizeKHR( vkGetDeviceProcAddr( device, "vkCmdSetRayTracingPipelineStackSizeKHR" ) ); //=== VK_KHR_sampler_ycbcr_conversion === vkCreateSamplerYcbcrConversionKHR = PFN_vkCreateSamplerYcbcrConversionKHR( vkGetDeviceProcAddr( device, "vkCreateSamplerYcbcrConversionKHR" ) ); if ( !vkCreateSamplerYcbcrConversion ) vkCreateSamplerYcbcrConversion = vkCreateSamplerYcbcrConversionKHR; vkDestroySamplerYcbcrConversionKHR = PFN_vkDestroySamplerYcbcrConversionKHR( vkGetDeviceProcAddr( device, "vkDestroySamplerYcbcrConversionKHR" ) ); if ( !vkDestroySamplerYcbcrConversion ) vkDestroySamplerYcbcrConversion = vkDestroySamplerYcbcrConversionKHR; //=== VK_KHR_bind_memory2 === vkBindBufferMemory2KHR = PFN_vkBindBufferMemory2KHR( vkGetDeviceProcAddr( device, "vkBindBufferMemory2KHR" ) ); if ( !vkBindBufferMemory2 ) vkBindBufferMemory2 = vkBindBufferMemory2KHR; vkBindImageMemory2KHR = PFN_vkBindImageMemory2KHR( vkGetDeviceProcAddr( device, "vkBindImageMemory2KHR" ) ); if ( !vkBindImageMemory2 ) vkBindImageMemory2 = vkBindImageMemory2KHR; //=== VK_EXT_image_drm_format_modifier === vkGetImageDrmFormatModifierPropertiesEXT = PFN_vkGetImageDrmFormatModifierPropertiesEXT( vkGetDeviceProcAddr( device, "vkGetImageDrmFormatModifierPropertiesEXT" ) ); //=== VK_EXT_validation_cache === vkCreateValidationCacheEXT = PFN_vkCreateValidationCacheEXT( vkGetDeviceProcAddr( device, "vkCreateValidationCacheEXT" ) ); vkDestroyValidationCacheEXT = PFN_vkDestroyValidationCacheEXT( vkGetDeviceProcAddr( device, "vkDestroyValidationCacheEXT" ) ); vkMergeValidationCachesEXT = PFN_vkMergeValidationCachesEXT( vkGetDeviceProcAddr( device, "vkMergeValidationCachesEXT" ) ); vkGetValidationCacheDataEXT = PFN_vkGetValidationCacheDataEXT( vkGetDeviceProcAddr( device, "vkGetValidationCacheDataEXT" ) ); //=== VK_NV_shading_rate_image === vkCmdBindShadingRateImageNV = PFN_vkCmdBindShadingRateImageNV( vkGetDeviceProcAddr( device, "vkCmdBindShadingRateImageNV" ) ); vkCmdSetViewportShadingRatePaletteNV = PFN_vkCmdSetViewportShadingRatePaletteNV( vkGetDeviceProcAddr( device, "vkCmdSetViewportShadingRatePaletteNV" ) ); vkCmdSetCoarseSampleOrderNV = PFN_vkCmdSetCoarseSampleOrderNV( vkGetDeviceProcAddr( device, "vkCmdSetCoarseSampleOrderNV" ) ); //=== VK_NV_ray_tracing === vkCreateAccelerationStructureNV = PFN_vkCreateAccelerationStructureNV( vkGetDeviceProcAddr( device, "vkCreateAccelerationStructureNV" ) ); vkDestroyAccelerationStructureNV = PFN_vkDestroyAccelerationStructureNV( vkGetDeviceProcAddr( device, "vkDestroyAccelerationStructureNV" ) ); vkGetAccelerationStructureMemoryRequirementsNV = PFN_vkGetAccelerationStructureMemoryRequirementsNV( vkGetDeviceProcAddr( device, "vkGetAccelerationStructureMemoryRequirementsNV" ) ); vkBindAccelerationStructureMemoryNV = PFN_vkBindAccelerationStructureMemoryNV( vkGetDeviceProcAddr( device, "vkBindAccelerationStructureMemoryNV" ) ); vkCmdBuildAccelerationStructureNV = PFN_vkCmdBuildAccelerationStructureNV( vkGetDeviceProcAddr( device, "vkCmdBuildAccelerationStructureNV" ) ); vkCmdCopyAccelerationStructureNV = PFN_vkCmdCopyAccelerationStructureNV( vkGetDeviceProcAddr( device, "vkCmdCopyAccelerationStructureNV" ) ); vkCmdTraceRaysNV = PFN_vkCmdTraceRaysNV( vkGetDeviceProcAddr( device, "vkCmdTraceRaysNV" ) ); vkCreateRayTracingPipelinesNV = PFN_vkCreateRayTracingPipelinesNV( vkGetDeviceProcAddr( device, "vkCreateRayTracingPipelinesNV" ) ); vkGetRayTracingShaderGroupHandlesNV = PFN_vkGetRayTracingShaderGroupHandlesNV( vkGetDeviceProcAddr( device, "vkGetRayTracingShaderGroupHandlesNV" ) ); if ( !vkGetRayTracingShaderGroupHandlesKHR ) vkGetRayTracingShaderGroupHandlesKHR = vkGetRayTracingShaderGroupHandlesNV; vkGetAccelerationStructureHandleNV = PFN_vkGetAccelerationStructureHandleNV( vkGetDeviceProcAddr( device, "vkGetAccelerationStructureHandleNV" ) ); vkCmdWriteAccelerationStructuresPropertiesNV = PFN_vkCmdWriteAccelerationStructuresPropertiesNV( vkGetDeviceProcAddr( device, "vkCmdWriteAccelerationStructuresPropertiesNV" ) ); vkCompileDeferredNV = PFN_vkCompileDeferredNV( vkGetDeviceProcAddr( device, "vkCompileDeferredNV" ) ); //=== VK_KHR_maintenance3 === vkGetDescriptorSetLayoutSupportKHR = PFN_vkGetDescriptorSetLayoutSupportKHR( vkGetDeviceProcAddr( device, "vkGetDescriptorSetLayoutSupportKHR" ) ); if ( !vkGetDescriptorSetLayoutSupport ) vkGetDescriptorSetLayoutSupport = vkGetDescriptorSetLayoutSupportKHR; //=== VK_KHR_draw_indirect_count === vkCmdDrawIndirectCountKHR = PFN_vkCmdDrawIndirectCountKHR( vkGetDeviceProcAddr( device, "vkCmdDrawIndirectCountKHR" ) ); if ( !vkCmdDrawIndirectCount ) vkCmdDrawIndirectCount = vkCmdDrawIndirectCountKHR; vkCmdDrawIndexedIndirectCountKHR = PFN_vkCmdDrawIndexedIndirectCountKHR( vkGetDeviceProcAddr( device, "vkCmdDrawIndexedIndirectCountKHR" ) ); if ( !vkCmdDrawIndexedIndirectCount ) vkCmdDrawIndexedIndirectCount = vkCmdDrawIndexedIndirectCountKHR; //=== VK_EXT_external_memory_host === vkGetMemoryHostPointerPropertiesEXT = PFN_vkGetMemoryHostPointerPropertiesEXT( vkGetDeviceProcAddr( device, "vkGetMemoryHostPointerPropertiesEXT" ) ); //=== VK_AMD_buffer_marker === vkCmdWriteBufferMarkerAMD = PFN_vkCmdWriteBufferMarkerAMD( vkGetDeviceProcAddr( device, "vkCmdWriteBufferMarkerAMD" ) ); vkCmdWriteBufferMarker2AMD = PFN_vkCmdWriteBufferMarker2AMD( vkGetDeviceProcAddr( device, "vkCmdWriteBufferMarker2AMD" ) ); //=== VK_EXT_calibrated_timestamps === vkGetCalibratedTimestampsEXT = PFN_vkGetCalibratedTimestampsEXT( vkGetDeviceProcAddr( device, "vkGetCalibratedTimestampsEXT" ) ); if ( !vkGetCalibratedTimestampsKHR ) vkGetCalibratedTimestampsKHR = vkGetCalibratedTimestampsEXT; //=== VK_NV_mesh_shader === vkCmdDrawMeshTasksNV = PFN_vkCmdDrawMeshTasksNV( vkGetDeviceProcAddr( device, "vkCmdDrawMeshTasksNV" ) ); vkCmdDrawMeshTasksIndirectNV = PFN_vkCmdDrawMeshTasksIndirectNV( vkGetDeviceProcAddr( device, "vkCmdDrawMeshTasksIndirectNV" ) ); vkCmdDrawMeshTasksIndirectCountNV = PFN_vkCmdDrawMeshTasksIndirectCountNV( vkGetDeviceProcAddr( device, "vkCmdDrawMeshTasksIndirectCountNV" ) ); //=== VK_NV_scissor_exclusive === vkCmdSetExclusiveScissorEnableNV = PFN_vkCmdSetExclusiveScissorEnableNV( vkGetDeviceProcAddr( device, "vkCmdSetExclusiveScissorEnableNV" ) ); vkCmdSetExclusiveScissorNV = PFN_vkCmdSetExclusiveScissorNV( vkGetDeviceProcAddr( device, "vkCmdSetExclusiveScissorNV" ) ); //=== VK_NV_device_diagnostic_checkpoints === vkCmdSetCheckpointNV = PFN_vkCmdSetCheckpointNV( vkGetDeviceProcAddr( device, "vkCmdSetCheckpointNV" ) ); vkGetQueueCheckpointDataNV = PFN_vkGetQueueCheckpointDataNV( vkGetDeviceProcAddr( device, "vkGetQueueCheckpointDataNV" ) ); vkGetQueueCheckpointData2NV = PFN_vkGetQueueCheckpointData2NV( vkGetDeviceProcAddr( device, "vkGetQueueCheckpointData2NV" ) ); //=== VK_KHR_timeline_semaphore === vkGetSemaphoreCounterValueKHR = PFN_vkGetSemaphoreCounterValueKHR( vkGetDeviceProcAddr( device, "vkGetSemaphoreCounterValueKHR" ) ); if ( !vkGetSemaphoreCounterValue ) vkGetSemaphoreCounterValue = vkGetSemaphoreCounterValueKHR; vkWaitSemaphoresKHR = PFN_vkWaitSemaphoresKHR( vkGetDeviceProcAddr( device, "vkWaitSemaphoresKHR" ) ); if ( !vkWaitSemaphores ) vkWaitSemaphores = vkWaitSemaphoresKHR; vkSignalSemaphoreKHR = PFN_vkSignalSemaphoreKHR( vkGetDeviceProcAddr( device, "vkSignalSemaphoreKHR" ) ); if ( !vkSignalSemaphore ) vkSignalSemaphore = vkSignalSemaphoreKHR; //=== VK_INTEL_performance_query === vkInitializePerformanceApiINTEL = PFN_vkInitializePerformanceApiINTEL( vkGetDeviceProcAddr( device, "vkInitializePerformanceApiINTEL" ) ); vkUninitializePerformanceApiINTEL = PFN_vkUninitializePerformanceApiINTEL( vkGetDeviceProcAddr( device, "vkUninitializePerformanceApiINTEL" ) ); vkCmdSetPerformanceMarkerINTEL = PFN_vkCmdSetPerformanceMarkerINTEL( vkGetDeviceProcAddr( device, "vkCmdSetPerformanceMarkerINTEL" ) ); vkCmdSetPerformanceStreamMarkerINTEL = PFN_vkCmdSetPerformanceStreamMarkerINTEL( vkGetDeviceProcAddr( device, "vkCmdSetPerformanceStreamMarkerINTEL" ) ); vkCmdSetPerformanceOverrideINTEL = PFN_vkCmdSetPerformanceOverrideINTEL( vkGetDeviceProcAddr( device, "vkCmdSetPerformanceOverrideINTEL" ) ); vkAcquirePerformanceConfigurationINTEL = PFN_vkAcquirePerformanceConfigurationINTEL( vkGetDeviceProcAddr( device, "vkAcquirePerformanceConfigurationINTEL" ) ); vkReleasePerformanceConfigurationINTEL = PFN_vkReleasePerformanceConfigurationINTEL( vkGetDeviceProcAddr( device, "vkReleasePerformanceConfigurationINTEL" ) ); vkQueueSetPerformanceConfigurationINTEL = PFN_vkQueueSetPerformanceConfigurationINTEL( vkGetDeviceProcAddr( device, "vkQueueSetPerformanceConfigurationINTEL" ) ); vkGetPerformanceParameterINTEL = PFN_vkGetPerformanceParameterINTEL( vkGetDeviceProcAddr( device, "vkGetPerformanceParameterINTEL" ) ); //=== VK_AMD_display_native_hdr === vkSetLocalDimmingAMD = PFN_vkSetLocalDimmingAMD( vkGetDeviceProcAddr( device, "vkSetLocalDimmingAMD" ) ); //=== VK_KHR_fragment_shading_rate === vkCmdSetFragmentShadingRateKHR = PFN_vkCmdSetFragmentShadingRateKHR( vkGetDeviceProcAddr( device, "vkCmdSetFragmentShadingRateKHR" ) ); //=== VK_KHR_dynamic_rendering_local_read === vkCmdSetRenderingAttachmentLocationsKHR = PFN_vkCmdSetRenderingAttachmentLocationsKHR( vkGetDeviceProcAddr( device, "vkCmdSetRenderingAttachmentLocationsKHR" ) ); if ( !vkCmdSetRenderingAttachmentLocations ) vkCmdSetRenderingAttachmentLocations = vkCmdSetRenderingAttachmentLocationsKHR; vkCmdSetRenderingInputAttachmentIndicesKHR = PFN_vkCmdSetRenderingInputAttachmentIndicesKHR( vkGetDeviceProcAddr( device, "vkCmdSetRenderingInputAttachmentIndicesKHR" ) ); if ( !vkCmdSetRenderingInputAttachmentIndices ) vkCmdSetRenderingInputAttachmentIndices = vkCmdSetRenderingInputAttachmentIndicesKHR; //=== VK_EXT_buffer_device_address === vkGetBufferDeviceAddressEXT = PFN_vkGetBufferDeviceAddressEXT( vkGetDeviceProcAddr( device, "vkGetBufferDeviceAddressEXT" ) ); if ( !vkGetBufferDeviceAddress ) vkGetBufferDeviceAddress = vkGetBufferDeviceAddressEXT; //=== VK_KHR_present_wait === vkWaitForPresentKHR = PFN_vkWaitForPresentKHR( vkGetDeviceProcAddr( device, "vkWaitForPresentKHR" ) ); #if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_EXT_full_screen_exclusive === vkAcquireFullScreenExclusiveModeEXT = PFN_vkAcquireFullScreenExclusiveModeEXT( vkGetDeviceProcAddr( device, "vkAcquireFullScreenExclusiveModeEXT" ) ); vkReleaseFullScreenExclusiveModeEXT = PFN_vkReleaseFullScreenExclusiveModeEXT( vkGetDeviceProcAddr( device, "vkReleaseFullScreenExclusiveModeEXT" ) ); vkGetDeviceGroupSurfacePresentModes2EXT = PFN_vkGetDeviceGroupSurfacePresentModes2EXT( vkGetDeviceProcAddr( device, "vkGetDeviceGroupSurfacePresentModes2EXT" ) ); #endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_KHR_buffer_device_address === vkGetBufferDeviceAddressKHR = PFN_vkGetBufferDeviceAddressKHR( vkGetDeviceProcAddr( device, "vkGetBufferDeviceAddressKHR" ) ); if ( !vkGetBufferDeviceAddress ) vkGetBufferDeviceAddress = vkGetBufferDeviceAddressKHR; vkGetBufferOpaqueCaptureAddressKHR = PFN_vkGetBufferOpaqueCaptureAddressKHR( vkGetDeviceProcAddr( device, "vkGetBufferOpaqueCaptureAddressKHR" ) ); if ( !vkGetBufferOpaqueCaptureAddress ) vkGetBufferOpaqueCaptureAddress = vkGetBufferOpaqueCaptureAddressKHR; vkGetDeviceMemoryOpaqueCaptureAddressKHR = PFN_vkGetDeviceMemoryOpaqueCaptureAddressKHR( vkGetDeviceProcAddr( device, "vkGetDeviceMemoryOpaqueCaptureAddressKHR" ) ); if ( !vkGetDeviceMemoryOpaqueCaptureAddress ) vkGetDeviceMemoryOpaqueCaptureAddress = vkGetDeviceMemoryOpaqueCaptureAddressKHR; //=== VK_EXT_line_rasterization === vkCmdSetLineStippleEXT = PFN_vkCmdSetLineStippleEXT( vkGetDeviceProcAddr( device, "vkCmdSetLineStippleEXT" ) ); if ( !vkCmdSetLineStipple ) vkCmdSetLineStipple = vkCmdSetLineStippleEXT; //=== VK_EXT_host_query_reset === vkResetQueryPoolEXT = PFN_vkResetQueryPoolEXT( vkGetDeviceProcAddr( device, "vkResetQueryPoolEXT" ) ); if ( !vkResetQueryPool ) vkResetQueryPool = vkResetQueryPoolEXT; //=== VK_EXT_extended_dynamic_state === vkCmdSetCullModeEXT = PFN_vkCmdSetCullModeEXT( vkGetDeviceProcAddr( device, "vkCmdSetCullModeEXT" ) ); if ( !vkCmdSetCullMode ) vkCmdSetCullMode = vkCmdSetCullModeEXT; vkCmdSetFrontFaceEXT = PFN_vkCmdSetFrontFaceEXT( vkGetDeviceProcAddr( device, "vkCmdSetFrontFaceEXT" ) ); if ( !vkCmdSetFrontFace ) vkCmdSetFrontFace = vkCmdSetFrontFaceEXT; vkCmdSetPrimitiveTopologyEXT = PFN_vkCmdSetPrimitiveTopologyEXT( vkGetDeviceProcAddr( device, "vkCmdSetPrimitiveTopologyEXT" ) ); if ( !vkCmdSetPrimitiveTopology ) vkCmdSetPrimitiveTopology = vkCmdSetPrimitiveTopologyEXT; vkCmdSetViewportWithCountEXT = PFN_vkCmdSetViewportWithCountEXT( vkGetDeviceProcAddr( device, "vkCmdSetViewportWithCountEXT" ) ); if ( !vkCmdSetViewportWithCount ) vkCmdSetViewportWithCount = vkCmdSetViewportWithCountEXT; vkCmdSetScissorWithCountEXT = PFN_vkCmdSetScissorWithCountEXT( vkGetDeviceProcAddr( device, "vkCmdSetScissorWithCountEXT" ) ); if ( !vkCmdSetScissorWithCount ) vkCmdSetScissorWithCount = vkCmdSetScissorWithCountEXT; vkCmdBindVertexBuffers2EXT = PFN_vkCmdBindVertexBuffers2EXT( vkGetDeviceProcAddr( device, "vkCmdBindVertexBuffers2EXT" ) ); if ( !vkCmdBindVertexBuffers2 ) vkCmdBindVertexBuffers2 = vkCmdBindVertexBuffers2EXT; vkCmdSetDepthTestEnableEXT = PFN_vkCmdSetDepthTestEnableEXT( vkGetDeviceProcAddr( device, "vkCmdSetDepthTestEnableEXT" ) ); if ( !vkCmdSetDepthTestEnable ) vkCmdSetDepthTestEnable = vkCmdSetDepthTestEnableEXT; vkCmdSetDepthWriteEnableEXT = PFN_vkCmdSetDepthWriteEnableEXT( vkGetDeviceProcAddr( device, "vkCmdSetDepthWriteEnableEXT" ) ); if ( !vkCmdSetDepthWriteEnable ) vkCmdSetDepthWriteEnable = vkCmdSetDepthWriteEnableEXT; vkCmdSetDepthCompareOpEXT = PFN_vkCmdSetDepthCompareOpEXT( vkGetDeviceProcAddr( device, "vkCmdSetDepthCompareOpEXT" ) ); if ( !vkCmdSetDepthCompareOp ) vkCmdSetDepthCompareOp = vkCmdSetDepthCompareOpEXT; vkCmdSetDepthBoundsTestEnableEXT = PFN_vkCmdSetDepthBoundsTestEnableEXT( vkGetDeviceProcAddr( device, "vkCmdSetDepthBoundsTestEnableEXT" ) ); if ( !vkCmdSetDepthBoundsTestEnable ) vkCmdSetDepthBoundsTestEnable = vkCmdSetDepthBoundsTestEnableEXT; vkCmdSetStencilTestEnableEXT = PFN_vkCmdSetStencilTestEnableEXT( vkGetDeviceProcAddr( device, "vkCmdSetStencilTestEnableEXT" ) ); if ( !vkCmdSetStencilTestEnable ) vkCmdSetStencilTestEnable = vkCmdSetStencilTestEnableEXT; vkCmdSetStencilOpEXT = PFN_vkCmdSetStencilOpEXT( vkGetDeviceProcAddr( device, "vkCmdSetStencilOpEXT" ) ); if ( !vkCmdSetStencilOp ) vkCmdSetStencilOp = vkCmdSetStencilOpEXT; //=== VK_KHR_deferred_host_operations === vkCreateDeferredOperationKHR = PFN_vkCreateDeferredOperationKHR( vkGetDeviceProcAddr( device, "vkCreateDeferredOperationKHR" ) ); vkDestroyDeferredOperationKHR = PFN_vkDestroyDeferredOperationKHR( vkGetDeviceProcAddr( device, "vkDestroyDeferredOperationKHR" ) ); vkGetDeferredOperationMaxConcurrencyKHR = PFN_vkGetDeferredOperationMaxConcurrencyKHR( vkGetDeviceProcAddr( device, "vkGetDeferredOperationMaxConcurrencyKHR" ) ); vkGetDeferredOperationResultKHR = PFN_vkGetDeferredOperationResultKHR( vkGetDeviceProcAddr( device, "vkGetDeferredOperationResultKHR" ) ); vkDeferredOperationJoinKHR = PFN_vkDeferredOperationJoinKHR( vkGetDeviceProcAddr( device, "vkDeferredOperationJoinKHR" ) ); //=== VK_KHR_pipeline_executable_properties === vkGetPipelineExecutablePropertiesKHR = PFN_vkGetPipelineExecutablePropertiesKHR( vkGetDeviceProcAddr( device, "vkGetPipelineExecutablePropertiesKHR" ) ); vkGetPipelineExecutableStatisticsKHR = PFN_vkGetPipelineExecutableStatisticsKHR( vkGetDeviceProcAddr( device, "vkGetPipelineExecutableStatisticsKHR" ) ); vkGetPipelineExecutableInternalRepresentationsKHR = PFN_vkGetPipelineExecutableInternalRepresentationsKHR( vkGetDeviceProcAddr( device, "vkGetPipelineExecutableInternalRepresentationsKHR" ) ); //=== VK_EXT_host_image_copy === vkCopyMemoryToImageEXT = PFN_vkCopyMemoryToImageEXT( vkGetDeviceProcAddr( device, "vkCopyMemoryToImageEXT" ) ); if ( !vkCopyMemoryToImage ) vkCopyMemoryToImage = vkCopyMemoryToImageEXT; vkCopyImageToMemoryEXT = PFN_vkCopyImageToMemoryEXT( vkGetDeviceProcAddr( device, "vkCopyImageToMemoryEXT" ) ); if ( !vkCopyImageToMemory ) vkCopyImageToMemory = vkCopyImageToMemoryEXT; vkCopyImageToImageEXT = PFN_vkCopyImageToImageEXT( vkGetDeviceProcAddr( device, "vkCopyImageToImageEXT" ) ); if ( !vkCopyImageToImage ) vkCopyImageToImage = vkCopyImageToImageEXT; vkTransitionImageLayoutEXT = PFN_vkTransitionImageLayoutEXT( vkGetDeviceProcAddr( device, "vkTransitionImageLayoutEXT" ) ); if ( !vkTransitionImageLayout ) vkTransitionImageLayout = vkTransitionImageLayoutEXT; vkGetImageSubresourceLayout2EXT = PFN_vkGetImageSubresourceLayout2EXT( vkGetDeviceProcAddr( device, "vkGetImageSubresourceLayout2EXT" ) ); if ( !vkGetImageSubresourceLayout2 ) vkGetImageSubresourceLayout2 = vkGetImageSubresourceLayout2EXT; //=== VK_KHR_map_memory2 === vkMapMemory2KHR = PFN_vkMapMemory2KHR( vkGetDeviceProcAddr( device, "vkMapMemory2KHR" ) ); if ( !vkMapMemory2 ) vkMapMemory2 = vkMapMemory2KHR; vkUnmapMemory2KHR = PFN_vkUnmapMemory2KHR( vkGetDeviceProcAddr( device, "vkUnmapMemory2KHR" ) ); if ( !vkUnmapMemory2 ) vkUnmapMemory2 = vkUnmapMemory2KHR; //=== VK_EXT_swapchain_maintenance1 === vkReleaseSwapchainImagesEXT = PFN_vkReleaseSwapchainImagesEXT( vkGetDeviceProcAddr( device, "vkReleaseSwapchainImagesEXT" ) ); //=== VK_NV_device_generated_commands === vkGetGeneratedCommandsMemoryRequirementsNV = PFN_vkGetGeneratedCommandsMemoryRequirementsNV( vkGetDeviceProcAddr( device, "vkGetGeneratedCommandsMemoryRequirementsNV" ) ); vkCmdPreprocessGeneratedCommandsNV = PFN_vkCmdPreprocessGeneratedCommandsNV( vkGetDeviceProcAddr( device, "vkCmdPreprocessGeneratedCommandsNV" ) ); vkCmdExecuteGeneratedCommandsNV = PFN_vkCmdExecuteGeneratedCommandsNV( vkGetDeviceProcAddr( device, "vkCmdExecuteGeneratedCommandsNV" ) ); vkCmdBindPipelineShaderGroupNV = PFN_vkCmdBindPipelineShaderGroupNV( vkGetDeviceProcAddr( device, "vkCmdBindPipelineShaderGroupNV" ) ); vkCreateIndirectCommandsLayoutNV = PFN_vkCreateIndirectCommandsLayoutNV( vkGetDeviceProcAddr( device, "vkCreateIndirectCommandsLayoutNV" ) ); vkDestroyIndirectCommandsLayoutNV = PFN_vkDestroyIndirectCommandsLayoutNV( vkGetDeviceProcAddr( device, "vkDestroyIndirectCommandsLayoutNV" ) ); //=== VK_EXT_depth_bias_control === vkCmdSetDepthBias2EXT = PFN_vkCmdSetDepthBias2EXT( vkGetDeviceProcAddr( device, "vkCmdSetDepthBias2EXT" ) ); //=== VK_EXT_private_data === vkCreatePrivateDataSlotEXT = PFN_vkCreatePrivateDataSlotEXT( vkGetDeviceProcAddr( device, "vkCreatePrivateDataSlotEXT" ) ); if ( !vkCreatePrivateDataSlot ) vkCreatePrivateDataSlot = vkCreatePrivateDataSlotEXT; vkDestroyPrivateDataSlotEXT = PFN_vkDestroyPrivateDataSlotEXT( vkGetDeviceProcAddr( device, "vkDestroyPrivateDataSlotEXT" ) ); if ( !vkDestroyPrivateDataSlot ) vkDestroyPrivateDataSlot = vkDestroyPrivateDataSlotEXT; vkSetPrivateDataEXT = PFN_vkSetPrivateDataEXT( vkGetDeviceProcAddr( device, "vkSetPrivateDataEXT" ) ); if ( !vkSetPrivateData ) vkSetPrivateData = vkSetPrivateDataEXT; vkGetPrivateDataEXT = PFN_vkGetPrivateDataEXT( vkGetDeviceProcAddr( device, "vkGetPrivateDataEXT" ) ); if ( !vkGetPrivateData ) vkGetPrivateData = vkGetPrivateDataEXT; //=== VK_KHR_video_encode_queue === vkGetEncodedVideoSessionParametersKHR = PFN_vkGetEncodedVideoSessionParametersKHR( vkGetDeviceProcAddr( device, "vkGetEncodedVideoSessionParametersKHR" ) ); vkCmdEncodeVideoKHR = PFN_vkCmdEncodeVideoKHR( vkGetDeviceProcAddr( device, "vkCmdEncodeVideoKHR" ) ); #if defined( VK_ENABLE_BETA_EXTENSIONS ) //=== VK_NV_cuda_kernel_launch === vkCreateCudaModuleNV = PFN_vkCreateCudaModuleNV( vkGetDeviceProcAddr( device, "vkCreateCudaModuleNV" ) ); vkGetCudaModuleCacheNV = PFN_vkGetCudaModuleCacheNV( vkGetDeviceProcAddr( device, "vkGetCudaModuleCacheNV" ) ); vkCreateCudaFunctionNV = PFN_vkCreateCudaFunctionNV( vkGetDeviceProcAddr( device, "vkCreateCudaFunctionNV" ) ); vkDestroyCudaModuleNV = PFN_vkDestroyCudaModuleNV( vkGetDeviceProcAddr( device, "vkDestroyCudaModuleNV" ) ); vkDestroyCudaFunctionNV = PFN_vkDestroyCudaFunctionNV( vkGetDeviceProcAddr( device, "vkDestroyCudaFunctionNV" ) ); vkCmdCudaLaunchKernelNV = PFN_vkCmdCudaLaunchKernelNV( vkGetDeviceProcAddr( device, "vkCmdCudaLaunchKernelNV" ) ); #endif /*VK_ENABLE_BETA_EXTENSIONS*/ #if defined( VK_USE_PLATFORM_METAL_EXT ) //=== VK_EXT_metal_objects === vkExportMetalObjectsEXT = PFN_vkExportMetalObjectsEXT( vkGetDeviceProcAddr( device, "vkExportMetalObjectsEXT" ) ); #endif /*VK_USE_PLATFORM_METAL_EXT*/ //=== VK_KHR_synchronization2 === vkCmdSetEvent2KHR = PFN_vkCmdSetEvent2KHR( vkGetDeviceProcAddr( device, "vkCmdSetEvent2KHR" ) ); if ( !vkCmdSetEvent2 ) vkCmdSetEvent2 = vkCmdSetEvent2KHR; vkCmdResetEvent2KHR = PFN_vkCmdResetEvent2KHR( vkGetDeviceProcAddr( device, "vkCmdResetEvent2KHR" ) ); if ( !vkCmdResetEvent2 ) vkCmdResetEvent2 = vkCmdResetEvent2KHR; vkCmdWaitEvents2KHR = PFN_vkCmdWaitEvents2KHR( vkGetDeviceProcAddr( device, "vkCmdWaitEvents2KHR" ) ); if ( !vkCmdWaitEvents2 ) vkCmdWaitEvents2 = vkCmdWaitEvents2KHR; vkCmdPipelineBarrier2KHR = PFN_vkCmdPipelineBarrier2KHR( vkGetDeviceProcAddr( device, "vkCmdPipelineBarrier2KHR" ) ); if ( !vkCmdPipelineBarrier2 ) vkCmdPipelineBarrier2 = vkCmdPipelineBarrier2KHR; vkCmdWriteTimestamp2KHR = PFN_vkCmdWriteTimestamp2KHR( vkGetDeviceProcAddr( device, "vkCmdWriteTimestamp2KHR" ) ); if ( !vkCmdWriteTimestamp2 ) vkCmdWriteTimestamp2 = vkCmdWriteTimestamp2KHR; vkQueueSubmit2KHR = PFN_vkQueueSubmit2KHR( vkGetDeviceProcAddr( device, "vkQueueSubmit2KHR" ) ); if ( !vkQueueSubmit2 ) vkQueueSubmit2 = vkQueueSubmit2KHR; //=== VK_EXT_descriptor_buffer === vkGetDescriptorSetLayoutSizeEXT = PFN_vkGetDescriptorSetLayoutSizeEXT( vkGetDeviceProcAddr( device, "vkGetDescriptorSetLayoutSizeEXT" ) ); vkGetDescriptorSetLayoutBindingOffsetEXT = PFN_vkGetDescriptorSetLayoutBindingOffsetEXT( vkGetDeviceProcAddr( device, "vkGetDescriptorSetLayoutBindingOffsetEXT" ) ); vkGetDescriptorEXT = PFN_vkGetDescriptorEXT( vkGetDeviceProcAddr( device, "vkGetDescriptorEXT" ) ); vkCmdBindDescriptorBuffersEXT = PFN_vkCmdBindDescriptorBuffersEXT( vkGetDeviceProcAddr( device, "vkCmdBindDescriptorBuffersEXT" ) ); vkCmdSetDescriptorBufferOffsetsEXT = PFN_vkCmdSetDescriptorBufferOffsetsEXT( vkGetDeviceProcAddr( device, "vkCmdSetDescriptorBufferOffsetsEXT" ) ); vkCmdBindDescriptorBufferEmbeddedSamplersEXT = PFN_vkCmdBindDescriptorBufferEmbeddedSamplersEXT( vkGetDeviceProcAddr( device, "vkCmdBindDescriptorBufferEmbeddedSamplersEXT" ) ); vkGetBufferOpaqueCaptureDescriptorDataEXT = PFN_vkGetBufferOpaqueCaptureDescriptorDataEXT( vkGetDeviceProcAddr( device, "vkGetBufferOpaqueCaptureDescriptorDataEXT" ) ); vkGetImageOpaqueCaptureDescriptorDataEXT = PFN_vkGetImageOpaqueCaptureDescriptorDataEXT( vkGetDeviceProcAddr( device, "vkGetImageOpaqueCaptureDescriptorDataEXT" ) ); vkGetImageViewOpaqueCaptureDescriptorDataEXT = PFN_vkGetImageViewOpaqueCaptureDescriptorDataEXT( vkGetDeviceProcAddr( device, "vkGetImageViewOpaqueCaptureDescriptorDataEXT" ) ); vkGetSamplerOpaqueCaptureDescriptorDataEXT = PFN_vkGetSamplerOpaqueCaptureDescriptorDataEXT( vkGetDeviceProcAddr( device, "vkGetSamplerOpaqueCaptureDescriptorDataEXT" ) ); vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT = PFN_vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT( vkGetDeviceProcAddr( device, "vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT" ) ); //=== VK_NV_fragment_shading_rate_enums === vkCmdSetFragmentShadingRateEnumNV = PFN_vkCmdSetFragmentShadingRateEnumNV( vkGetDeviceProcAddr( device, "vkCmdSetFragmentShadingRateEnumNV" ) ); //=== VK_EXT_mesh_shader === vkCmdDrawMeshTasksEXT = PFN_vkCmdDrawMeshTasksEXT( vkGetDeviceProcAddr( device, "vkCmdDrawMeshTasksEXT" ) ); vkCmdDrawMeshTasksIndirectEXT = PFN_vkCmdDrawMeshTasksIndirectEXT( vkGetDeviceProcAddr( device, "vkCmdDrawMeshTasksIndirectEXT" ) ); vkCmdDrawMeshTasksIndirectCountEXT = PFN_vkCmdDrawMeshTasksIndirectCountEXT( vkGetDeviceProcAddr( device, "vkCmdDrawMeshTasksIndirectCountEXT" ) ); //=== VK_KHR_copy_commands2 === vkCmdCopyBuffer2KHR = PFN_vkCmdCopyBuffer2KHR( vkGetDeviceProcAddr( device, "vkCmdCopyBuffer2KHR" ) ); if ( !vkCmdCopyBuffer2 ) vkCmdCopyBuffer2 = vkCmdCopyBuffer2KHR; vkCmdCopyImage2KHR = PFN_vkCmdCopyImage2KHR( vkGetDeviceProcAddr( device, "vkCmdCopyImage2KHR" ) ); if ( !vkCmdCopyImage2 ) vkCmdCopyImage2 = vkCmdCopyImage2KHR; vkCmdCopyBufferToImage2KHR = PFN_vkCmdCopyBufferToImage2KHR( vkGetDeviceProcAddr( device, "vkCmdCopyBufferToImage2KHR" ) ); if ( !vkCmdCopyBufferToImage2 ) vkCmdCopyBufferToImage2 = vkCmdCopyBufferToImage2KHR; vkCmdCopyImageToBuffer2KHR = PFN_vkCmdCopyImageToBuffer2KHR( vkGetDeviceProcAddr( device, "vkCmdCopyImageToBuffer2KHR" ) ); if ( !vkCmdCopyImageToBuffer2 ) vkCmdCopyImageToBuffer2 = vkCmdCopyImageToBuffer2KHR; vkCmdBlitImage2KHR = PFN_vkCmdBlitImage2KHR( vkGetDeviceProcAddr( device, "vkCmdBlitImage2KHR" ) ); if ( !vkCmdBlitImage2 ) vkCmdBlitImage2 = vkCmdBlitImage2KHR; vkCmdResolveImage2KHR = PFN_vkCmdResolveImage2KHR( vkGetDeviceProcAddr( device, "vkCmdResolveImage2KHR" ) ); if ( !vkCmdResolveImage2 ) vkCmdResolveImage2 = vkCmdResolveImage2KHR; //=== VK_EXT_device_fault === vkGetDeviceFaultInfoEXT = PFN_vkGetDeviceFaultInfoEXT( vkGetDeviceProcAddr( device, "vkGetDeviceFaultInfoEXT" ) ); //=== VK_EXT_vertex_input_dynamic_state === vkCmdSetVertexInputEXT = PFN_vkCmdSetVertexInputEXT( vkGetDeviceProcAddr( device, "vkCmdSetVertexInputEXT" ) ); #if defined( VK_USE_PLATFORM_FUCHSIA ) //=== VK_FUCHSIA_external_memory === vkGetMemoryZirconHandleFUCHSIA = PFN_vkGetMemoryZirconHandleFUCHSIA( vkGetDeviceProcAddr( device, "vkGetMemoryZirconHandleFUCHSIA" ) ); vkGetMemoryZirconHandlePropertiesFUCHSIA = PFN_vkGetMemoryZirconHandlePropertiesFUCHSIA( vkGetDeviceProcAddr( device, "vkGetMemoryZirconHandlePropertiesFUCHSIA" ) ); #endif /*VK_USE_PLATFORM_FUCHSIA*/ #if defined( VK_USE_PLATFORM_FUCHSIA ) //=== VK_FUCHSIA_external_semaphore === vkImportSemaphoreZirconHandleFUCHSIA = PFN_vkImportSemaphoreZirconHandleFUCHSIA( vkGetDeviceProcAddr( device, "vkImportSemaphoreZirconHandleFUCHSIA" ) ); vkGetSemaphoreZirconHandleFUCHSIA = PFN_vkGetSemaphoreZirconHandleFUCHSIA( vkGetDeviceProcAddr( device, "vkGetSemaphoreZirconHandleFUCHSIA" ) ); #endif /*VK_USE_PLATFORM_FUCHSIA*/ #if defined( VK_USE_PLATFORM_FUCHSIA ) //=== VK_FUCHSIA_buffer_collection === vkCreateBufferCollectionFUCHSIA = PFN_vkCreateBufferCollectionFUCHSIA( vkGetDeviceProcAddr( device, "vkCreateBufferCollectionFUCHSIA" ) ); vkSetBufferCollectionImageConstraintsFUCHSIA = PFN_vkSetBufferCollectionImageConstraintsFUCHSIA( vkGetDeviceProcAddr( device, "vkSetBufferCollectionImageConstraintsFUCHSIA" ) ); vkSetBufferCollectionBufferConstraintsFUCHSIA = PFN_vkSetBufferCollectionBufferConstraintsFUCHSIA( vkGetDeviceProcAddr( device, "vkSetBufferCollectionBufferConstraintsFUCHSIA" ) ); vkDestroyBufferCollectionFUCHSIA = PFN_vkDestroyBufferCollectionFUCHSIA( vkGetDeviceProcAddr( device, "vkDestroyBufferCollectionFUCHSIA" ) ); vkGetBufferCollectionPropertiesFUCHSIA = PFN_vkGetBufferCollectionPropertiesFUCHSIA( vkGetDeviceProcAddr( device, "vkGetBufferCollectionPropertiesFUCHSIA" ) ); #endif /*VK_USE_PLATFORM_FUCHSIA*/ //=== VK_HUAWEI_subpass_shading === vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI = PFN_vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI( vkGetDeviceProcAddr( device, "vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI" ) ); vkCmdSubpassShadingHUAWEI = PFN_vkCmdSubpassShadingHUAWEI( vkGetDeviceProcAddr( device, "vkCmdSubpassShadingHUAWEI" ) ); //=== VK_HUAWEI_invocation_mask === vkCmdBindInvocationMaskHUAWEI = PFN_vkCmdBindInvocationMaskHUAWEI( vkGetDeviceProcAddr( device, "vkCmdBindInvocationMaskHUAWEI" ) ); //=== VK_NV_external_memory_rdma === vkGetMemoryRemoteAddressNV = PFN_vkGetMemoryRemoteAddressNV( vkGetDeviceProcAddr( device, "vkGetMemoryRemoteAddressNV" ) ); //=== VK_EXT_pipeline_properties === vkGetPipelinePropertiesEXT = PFN_vkGetPipelinePropertiesEXT( vkGetDeviceProcAddr( device, "vkGetPipelinePropertiesEXT" ) ); //=== VK_EXT_extended_dynamic_state2 === vkCmdSetPatchControlPointsEXT = PFN_vkCmdSetPatchControlPointsEXT( vkGetDeviceProcAddr( device, "vkCmdSetPatchControlPointsEXT" ) ); vkCmdSetRasterizerDiscardEnableEXT = PFN_vkCmdSetRasterizerDiscardEnableEXT( vkGetDeviceProcAddr( device, "vkCmdSetRasterizerDiscardEnableEXT" ) ); if ( !vkCmdSetRasterizerDiscardEnable ) vkCmdSetRasterizerDiscardEnable = vkCmdSetRasterizerDiscardEnableEXT; vkCmdSetDepthBiasEnableEXT = PFN_vkCmdSetDepthBiasEnableEXT( vkGetDeviceProcAddr( device, "vkCmdSetDepthBiasEnableEXT" ) ); if ( !vkCmdSetDepthBiasEnable ) vkCmdSetDepthBiasEnable = vkCmdSetDepthBiasEnableEXT; vkCmdSetLogicOpEXT = PFN_vkCmdSetLogicOpEXT( vkGetDeviceProcAddr( device, "vkCmdSetLogicOpEXT" ) ); vkCmdSetPrimitiveRestartEnableEXT = PFN_vkCmdSetPrimitiveRestartEnableEXT( vkGetDeviceProcAddr( device, "vkCmdSetPrimitiveRestartEnableEXT" ) ); if ( !vkCmdSetPrimitiveRestartEnable ) vkCmdSetPrimitiveRestartEnable = vkCmdSetPrimitiveRestartEnableEXT; //=== VK_EXT_color_write_enable === vkCmdSetColorWriteEnableEXT = PFN_vkCmdSetColorWriteEnableEXT( vkGetDeviceProcAddr( device, "vkCmdSetColorWriteEnableEXT" ) ); //=== VK_KHR_ray_tracing_maintenance1 === vkCmdTraceRaysIndirect2KHR = PFN_vkCmdTraceRaysIndirect2KHR( vkGetDeviceProcAddr( device, "vkCmdTraceRaysIndirect2KHR" ) ); //=== VK_EXT_multi_draw === vkCmdDrawMultiEXT = PFN_vkCmdDrawMultiEXT( vkGetDeviceProcAddr( device, "vkCmdDrawMultiEXT" ) ); vkCmdDrawMultiIndexedEXT = PFN_vkCmdDrawMultiIndexedEXT( vkGetDeviceProcAddr( device, "vkCmdDrawMultiIndexedEXT" ) ); //=== VK_EXT_opacity_micromap === vkCreateMicromapEXT = PFN_vkCreateMicromapEXT( vkGetDeviceProcAddr( device, "vkCreateMicromapEXT" ) ); vkDestroyMicromapEXT = PFN_vkDestroyMicromapEXT( vkGetDeviceProcAddr( device, "vkDestroyMicromapEXT" ) ); vkCmdBuildMicromapsEXT = PFN_vkCmdBuildMicromapsEXT( vkGetDeviceProcAddr( device, "vkCmdBuildMicromapsEXT" ) ); vkBuildMicromapsEXT = PFN_vkBuildMicromapsEXT( vkGetDeviceProcAddr( device, "vkBuildMicromapsEXT" ) ); vkCopyMicromapEXT = PFN_vkCopyMicromapEXT( vkGetDeviceProcAddr( device, "vkCopyMicromapEXT" ) ); vkCopyMicromapToMemoryEXT = PFN_vkCopyMicromapToMemoryEXT( vkGetDeviceProcAddr( device, "vkCopyMicromapToMemoryEXT" ) ); vkCopyMemoryToMicromapEXT = PFN_vkCopyMemoryToMicromapEXT( vkGetDeviceProcAddr( device, "vkCopyMemoryToMicromapEXT" ) ); vkWriteMicromapsPropertiesEXT = PFN_vkWriteMicromapsPropertiesEXT( vkGetDeviceProcAddr( device, "vkWriteMicromapsPropertiesEXT" ) ); vkCmdCopyMicromapEXT = PFN_vkCmdCopyMicromapEXT( vkGetDeviceProcAddr( device, "vkCmdCopyMicromapEXT" ) ); vkCmdCopyMicromapToMemoryEXT = PFN_vkCmdCopyMicromapToMemoryEXT( vkGetDeviceProcAddr( device, "vkCmdCopyMicromapToMemoryEXT" ) ); vkCmdCopyMemoryToMicromapEXT = PFN_vkCmdCopyMemoryToMicromapEXT( vkGetDeviceProcAddr( device, "vkCmdCopyMemoryToMicromapEXT" ) ); vkCmdWriteMicromapsPropertiesEXT = PFN_vkCmdWriteMicromapsPropertiesEXT( vkGetDeviceProcAddr( device, "vkCmdWriteMicromapsPropertiesEXT" ) ); vkGetDeviceMicromapCompatibilityEXT = PFN_vkGetDeviceMicromapCompatibilityEXT( vkGetDeviceProcAddr( device, "vkGetDeviceMicromapCompatibilityEXT" ) ); vkGetMicromapBuildSizesEXT = PFN_vkGetMicromapBuildSizesEXT( vkGetDeviceProcAddr( device, "vkGetMicromapBuildSizesEXT" ) ); //=== VK_HUAWEI_cluster_culling_shader === vkCmdDrawClusterHUAWEI = PFN_vkCmdDrawClusterHUAWEI( vkGetDeviceProcAddr( device, "vkCmdDrawClusterHUAWEI" ) ); vkCmdDrawClusterIndirectHUAWEI = PFN_vkCmdDrawClusterIndirectHUAWEI( vkGetDeviceProcAddr( device, "vkCmdDrawClusterIndirectHUAWEI" ) ); //=== VK_EXT_pageable_device_local_memory === vkSetDeviceMemoryPriorityEXT = PFN_vkSetDeviceMemoryPriorityEXT( vkGetDeviceProcAddr( device, "vkSetDeviceMemoryPriorityEXT" ) ); //=== VK_KHR_maintenance4 === vkGetDeviceBufferMemoryRequirementsKHR = PFN_vkGetDeviceBufferMemoryRequirementsKHR( vkGetDeviceProcAddr( device, "vkGetDeviceBufferMemoryRequirementsKHR" ) ); if ( !vkGetDeviceBufferMemoryRequirements ) vkGetDeviceBufferMemoryRequirements = vkGetDeviceBufferMemoryRequirementsKHR; vkGetDeviceImageMemoryRequirementsKHR = PFN_vkGetDeviceImageMemoryRequirementsKHR( vkGetDeviceProcAddr( device, "vkGetDeviceImageMemoryRequirementsKHR" ) ); if ( !vkGetDeviceImageMemoryRequirements ) vkGetDeviceImageMemoryRequirements = vkGetDeviceImageMemoryRequirementsKHR; vkGetDeviceImageSparseMemoryRequirementsKHR = PFN_vkGetDeviceImageSparseMemoryRequirementsKHR( vkGetDeviceProcAddr( device, "vkGetDeviceImageSparseMemoryRequirementsKHR" ) ); if ( !vkGetDeviceImageSparseMemoryRequirements ) vkGetDeviceImageSparseMemoryRequirements = vkGetDeviceImageSparseMemoryRequirementsKHR; //=== VK_VALVE_descriptor_set_host_mapping === vkGetDescriptorSetLayoutHostMappingInfoVALVE = PFN_vkGetDescriptorSetLayoutHostMappingInfoVALVE( vkGetDeviceProcAddr( device, "vkGetDescriptorSetLayoutHostMappingInfoVALVE" ) ); vkGetDescriptorSetHostMappingVALVE = PFN_vkGetDescriptorSetHostMappingVALVE( vkGetDeviceProcAddr( device, "vkGetDescriptorSetHostMappingVALVE" ) ); //=== VK_NV_copy_memory_indirect === vkCmdCopyMemoryIndirectNV = PFN_vkCmdCopyMemoryIndirectNV( vkGetDeviceProcAddr( device, "vkCmdCopyMemoryIndirectNV" ) ); vkCmdCopyMemoryToImageIndirectNV = PFN_vkCmdCopyMemoryToImageIndirectNV( vkGetDeviceProcAddr( device, "vkCmdCopyMemoryToImageIndirectNV" ) ); //=== VK_NV_memory_decompression === vkCmdDecompressMemoryNV = PFN_vkCmdDecompressMemoryNV( vkGetDeviceProcAddr( device, "vkCmdDecompressMemoryNV" ) ); vkCmdDecompressMemoryIndirectCountNV = PFN_vkCmdDecompressMemoryIndirectCountNV( vkGetDeviceProcAddr( device, "vkCmdDecompressMemoryIndirectCountNV" ) ); //=== VK_NV_device_generated_commands_compute === vkGetPipelineIndirectMemoryRequirementsNV = PFN_vkGetPipelineIndirectMemoryRequirementsNV( vkGetDeviceProcAddr( device, "vkGetPipelineIndirectMemoryRequirementsNV" ) ); vkCmdUpdatePipelineIndirectBufferNV = PFN_vkCmdUpdatePipelineIndirectBufferNV( vkGetDeviceProcAddr( device, "vkCmdUpdatePipelineIndirectBufferNV" ) ); vkGetPipelineIndirectDeviceAddressNV = PFN_vkGetPipelineIndirectDeviceAddressNV( vkGetDeviceProcAddr( device, "vkGetPipelineIndirectDeviceAddressNV" ) ); //=== VK_EXT_extended_dynamic_state3 === vkCmdSetDepthClampEnableEXT = PFN_vkCmdSetDepthClampEnableEXT( vkGetDeviceProcAddr( device, "vkCmdSetDepthClampEnableEXT" ) ); vkCmdSetPolygonModeEXT = PFN_vkCmdSetPolygonModeEXT( vkGetDeviceProcAddr( device, "vkCmdSetPolygonModeEXT" ) ); vkCmdSetRasterizationSamplesEXT = PFN_vkCmdSetRasterizationSamplesEXT( vkGetDeviceProcAddr( device, "vkCmdSetRasterizationSamplesEXT" ) ); vkCmdSetSampleMaskEXT = PFN_vkCmdSetSampleMaskEXT( vkGetDeviceProcAddr( device, "vkCmdSetSampleMaskEXT" ) ); vkCmdSetAlphaToCoverageEnableEXT = PFN_vkCmdSetAlphaToCoverageEnableEXT( vkGetDeviceProcAddr( device, "vkCmdSetAlphaToCoverageEnableEXT" ) ); vkCmdSetAlphaToOneEnableEXT = PFN_vkCmdSetAlphaToOneEnableEXT( vkGetDeviceProcAddr( device, "vkCmdSetAlphaToOneEnableEXT" ) ); vkCmdSetLogicOpEnableEXT = PFN_vkCmdSetLogicOpEnableEXT( vkGetDeviceProcAddr( device, "vkCmdSetLogicOpEnableEXT" ) ); vkCmdSetColorBlendEnableEXT = PFN_vkCmdSetColorBlendEnableEXT( vkGetDeviceProcAddr( device, "vkCmdSetColorBlendEnableEXT" ) ); vkCmdSetColorBlendEquationEXT = PFN_vkCmdSetColorBlendEquationEXT( vkGetDeviceProcAddr( device, "vkCmdSetColorBlendEquationEXT" ) ); vkCmdSetColorWriteMaskEXT = PFN_vkCmdSetColorWriteMaskEXT( vkGetDeviceProcAddr( device, "vkCmdSetColorWriteMaskEXT" ) ); vkCmdSetTessellationDomainOriginEXT = PFN_vkCmdSetTessellationDomainOriginEXT( vkGetDeviceProcAddr( device, "vkCmdSetTessellationDomainOriginEXT" ) ); vkCmdSetRasterizationStreamEXT = PFN_vkCmdSetRasterizationStreamEXT( vkGetDeviceProcAddr( device, "vkCmdSetRasterizationStreamEXT" ) ); vkCmdSetConservativeRasterizationModeEXT = PFN_vkCmdSetConservativeRasterizationModeEXT( vkGetDeviceProcAddr( device, "vkCmdSetConservativeRasterizationModeEXT" ) ); vkCmdSetExtraPrimitiveOverestimationSizeEXT = PFN_vkCmdSetExtraPrimitiveOverestimationSizeEXT( vkGetDeviceProcAddr( device, "vkCmdSetExtraPrimitiveOverestimationSizeEXT" ) ); vkCmdSetDepthClipEnableEXT = PFN_vkCmdSetDepthClipEnableEXT( vkGetDeviceProcAddr( device, "vkCmdSetDepthClipEnableEXT" ) ); vkCmdSetSampleLocationsEnableEXT = PFN_vkCmdSetSampleLocationsEnableEXT( vkGetDeviceProcAddr( device, "vkCmdSetSampleLocationsEnableEXT" ) ); vkCmdSetColorBlendAdvancedEXT = PFN_vkCmdSetColorBlendAdvancedEXT( vkGetDeviceProcAddr( device, "vkCmdSetColorBlendAdvancedEXT" ) ); vkCmdSetProvokingVertexModeEXT = PFN_vkCmdSetProvokingVertexModeEXT( vkGetDeviceProcAddr( device, "vkCmdSetProvokingVertexModeEXT" ) ); vkCmdSetLineRasterizationModeEXT = PFN_vkCmdSetLineRasterizationModeEXT( vkGetDeviceProcAddr( device, "vkCmdSetLineRasterizationModeEXT" ) ); vkCmdSetLineStippleEnableEXT = PFN_vkCmdSetLineStippleEnableEXT( vkGetDeviceProcAddr( device, "vkCmdSetLineStippleEnableEXT" ) ); vkCmdSetDepthClipNegativeOneToOneEXT = PFN_vkCmdSetDepthClipNegativeOneToOneEXT( vkGetDeviceProcAddr( device, "vkCmdSetDepthClipNegativeOneToOneEXT" ) ); vkCmdSetViewportWScalingEnableNV = PFN_vkCmdSetViewportWScalingEnableNV( vkGetDeviceProcAddr( device, "vkCmdSetViewportWScalingEnableNV" ) ); vkCmdSetViewportSwizzleNV = PFN_vkCmdSetViewportSwizzleNV( vkGetDeviceProcAddr( device, "vkCmdSetViewportSwizzleNV" ) ); vkCmdSetCoverageToColorEnableNV = PFN_vkCmdSetCoverageToColorEnableNV( vkGetDeviceProcAddr( device, "vkCmdSetCoverageToColorEnableNV" ) ); vkCmdSetCoverageToColorLocationNV = PFN_vkCmdSetCoverageToColorLocationNV( vkGetDeviceProcAddr( device, "vkCmdSetCoverageToColorLocationNV" ) ); vkCmdSetCoverageModulationModeNV = PFN_vkCmdSetCoverageModulationModeNV( vkGetDeviceProcAddr( device, "vkCmdSetCoverageModulationModeNV" ) ); vkCmdSetCoverageModulationTableEnableNV = PFN_vkCmdSetCoverageModulationTableEnableNV( vkGetDeviceProcAddr( device, "vkCmdSetCoverageModulationTableEnableNV" ) ); vkCmdSetCoverageModulationTableNV = PFN_vkCmdSetCoverageModulationTableNV( vkGetDeviceProcAddr( device, "vkCmdSetCoverageModulationTableNV" ) ); vkCmdSetShadingRateImageEnableNV = PFN_vkCmdSetShadingRateImageEnableNV( vkGetDeviceProcAddr( device, "vkCmdSetShadingRateImageEnableNV" ) ); vkCmdSetRepresentativeFragmentTestEnableNV = PFN_vkCmdSetRepresentativeFragmentTestEnableNV( vkGetDeviceProcAddr( device, "vkCmdSetRepresentativeFragmentTestEnableNV" ) ); vkCmdSetCoverageReductionModeNV = PFN_vkCmdSetCoverageReductionModeNV( vkGetDeviceProcAddr( device, "vkCmdSetCoverageReductionModeNV" ) ); //=== VK_EXT_shader_module_identifier === vkGetShaderModuleIdentifierEXT = PFN_vkGetShaderModuleIdentifierEXT( vkGetDeviceProcAddr( device, "vkGetShaderModuleIdentifierEXT" ) ); vkGetShaderModuleCreateInfoIdentifierEXT = PFN_vkGetShaderModuleCreateInfoIdentifierEXT( vkGetDeviceProcAddr( device, "vkGetShaderModuleCreateInfoIdentifierEXT" ) ); //=== VK_NV_optical_flow === vkCreateOpticalFlowSessionNV = PFN_vkCreateOpticalFlowSessionNV( vkGetDeviceProcAddr( device, "vkCreateOpticalFlowSessionNV" ) ); vkDestroyOpticalFlowSessionNV = PFN_vkDestroyOpticalFlowSessionNV( vkGetDeviceProcAddr( device, "vkDestroyOpticalFlowSessionNV" ) ); vkBindOpticalFlowSessionImageNV = PFN_vkBindOpticalFlowSessionImageNV( vkGetDeviceProcAddr( device, "vkBindOpticalFlowSessionImageNV" ) ); vkCmdOpticalFlowExecuteNV = PFN_vkCmdOpticalFlowExecuteNV( vkGetDeviceProcAddr( device, "vkCmdOpticalFlowExecuteNV" ) ); //=== VK_KHR_maintenance5 === vkCmdBindIndexBuffer2KHR = PFN_vkCmdBindIndexBuffer2KHR( vkGetDeviceProcAddr( device, "vkCmdBindIndexBuffer2KHR" ) ); if ( !vkCmdBindIndexBuffer2 ) vkCmdBindIndexBuffer2 = vkCmdBindIndexBuffer2KHR; vkGetRenderingAreaGranularityKHR = PFN_vkGetRenderingAreaGranularityKHR( vkGetDeviceProcAddr( device, "vkGetRenderingAreaGranularityKHR" ) ); if ( !vkGetRenderingAreaGranularity ) vkGetRenderingAreaGranularity = vkGetRenderingAreaGranularityKHR; vkGetDeviceImageSubresourceLayoutKHR = PFN_vkGetDeviceImageSubresourceLayoutKHR( vkGetDeviceProcAddr( device, "vkGetDeviceImageSubresourceLayoutKHR" ) ); if ( !vkGetDeviceImageSubresourceLayout ) vkGetDeviceImageSubresourceLayout = vkGetDeviceImageSubresourceLayoutKHR; vkGetImageSubresourceLayout2KHR = PFN_vkGetImageSubresourceLayout2KHR( vkGetDeviceProcAddr( device, "vkGetImageSubresourceLayout2KHR" ) ); if ( !vkGetImageSubresourceLayout2 ) vkGetImageSubresourceLayout2 = vkGetImageSubresourceLayout2KHR; //=== VK_AMD_anti_lag === vkAntiLagUpdateAMD = PFN_vkAntiLagUpdateAMD( vkGetDeviceProcAddr( device, "vkAntiLagUpdateAMD" ) ); //=== VK_EXT_shader_object === vkCreateShadersEXT = PFN_vkCreateShadersEXT( vkGetDeviceProcAddr( device, "vkCreateShadersEXT" ) ); vkDestroyShaderEXT = PFN_vkDestroyShaderEXT( vkGetDeviceProcAddr( device, "vkDestroyShaderEXT" ) ); vkGetShaderBinaryDataEXT = PFN_vkGetShaderBinaryDataEXT( vkGetDeviceProcAddr( device, "vkGetShaderBinaryDataEXT" ) ); vkCmdBindShadersEXT = PFN_vkCmdBindShadersEXT( vkGetDeviceProcAddr( device, "vkCmdBindShadersEXT" ) ); vkCmdSetDepthClampRangeEXT = PFN_vkCmdSetDepthClampRangeEXT( vkGetDeviceProcAddr( device, "vkCmdSetDepthClampRangeEXT" ) ); //=== VK_KHR_pipeline_binary === vkCreatePipelineBinariesKHR = PFN_vkCreatePipelineBinariesKHR( vkGetDeviceProcAddr( device, "vkCreatePipelineBinariesKHR" ) ); vkDestroyPipelineBinaryKHR = PFN_vkDestroyPipelineBinaryKHR( vkGetDeviceProcAddr( device, "vkDestroyPipelineBinaryKHR" ) ); vkGetPipelineKeyKHR = PFN_vkGetPipelineKeyKHR( vkGetDeviceProcAddr( device, "vkGetPipelineKeyKHR" ) ); vkGetPipelineBinaryDataKHR = PFN_vkGetPipelineBinaryDataKHR( vkGetDeviceProcAddr( device, "vkGetPipelineBinaryDataKHR" ) ); vkReleaseCapturedPipelineDataKHR = PFN_vkReleaseCapturedPipelineDataKHR( vkGetDeviceProcAddr( device, "vkReleaseCapturedPipelineDataKHR" ) ); //=== VK_QCOM_tile_properties === vkGetFramebufferTilePropertiesQCOM = PFN_vkGetFramebufferTilePropertiesQCOM( vkGetDeviceProcAddr( device, "vkGetFramebufferTilePropertiesQCOM" ) ); vkGetDynamicRenderingTilePropertiesQCOM = PFN_vkGetDynamicRenderingTilePropertiesQCOM( vkGetDeviceProcAddr( device, "vkGetDynamicRenderingTilePropertiesQCOM" ) ); //=== VK_NV_cooperative_vector === vkConvertCooperativeVectorMatrixNV = PFN_vkConvertCooperativeVectorMatrixNV( vkGetDeviceProcAddr( device, "vkConvertCooperativeVectorMatrixNV" ) ); vkCmdConvertCooperativeVectorMatrixNV = PFN_vkCmdConvertCooperativeVectorMatrixNV( vkGetDeviceProcAddr( device, "vkCmdConvertCooperativeVectorMatrixNV" ) ); //=== VK_NV_low_latency2 === vkSetLatencySleepModeNV = PFN_vkSetLatencySleepModeNV( vkGetDeviceProcAddr( device, "vkSetLatencySleepModeNV" ) ); vkLatencySleepNV = PFN_vkLatencySleepNV( vkGetDeviceProcAddr( device, "vkLatencySleepNV" ) ); vkSetLatencyMarkerNV = PFN_vkSetLatencyMarkerNV( vkGetDeviceProcAddr( device, "vkSetLatencyMarkerNV" ) ); vkGetLatencyTimingsNV = PFN_vkGetLatencyTimingsNV( vkGetDeviceProcAddr( device, "vkGetLatencyTimingsNV" ) ); vkQueueNotifyOutOfBandNV = PFN_vkQueueNotifyOutOfBandNV( vkGetDeviceProcAddr( device, "vkQueueNotifyOutOfBandNV" ) ); //=== VK_EXT_attachment_feedback_loop_dynamic_state === vkCmdSetAttachmentFeedbackLoopEnableEXT = PFN_vkCmdSetAttachmentFeedbackLoopEnableEXT( vkGetDeviceProcAddr( device, "vkCmdSetAttachmentFeedbackLoopEnableEXT" ) ); #if defined( VK_USE_PLATFORM_SCREEN_QNX ) //=== VK_QNX_external_memory_screen_buffer === vkGetScreenBufferPropertiesQNX = PFN_vkGetScreenBufferPropertiesQNX( vkGetDeviceProcAddr( device, "vkGetScreenBufferPropertiesQNX" ) ); #endif /*VK_USE_PLATFORM_SCREEN_QNX*/ //=== VK_KHR_line_rasterization === vkCmdSetLineStippleKHR = PFN_vkCmdSetLineStippleKHR( vkGetDeviceProcAddr( device, "vkCmdSetLineStippleKHR" ) ); if ( !vkCmdSetLineStipple ) vkCmdSetLineStipple = vkCmdSetLineStippleKHR; //=== VK_KHR_calibrated_timestamps === vkGetCalibratedTimestampsKHR = PFN_vkGetCalibratedTimestampsKHR( vkGetDeviceProcAddr( device, "vkGetCalibratedTimestampsKHR" ) ); //=== VK_KHR_maintenance6 === vkCmdBindDescriptorSets2KHR = PFN_vkCmdBindDescriptorSets2KHR( vkGetDeviceProcAddr( device, "vkCmdBindDescriptorSets2KHR" ) ); if ( !vkCmdBindDescriptorSets2 ) vkCmdBindDescriptorSets2 = vkCmdBindDescriptorSets2KHR; vkCmdPushConstants2KHR = PFN_vkCmdPushConstants2KHR( vkGetDeviceProcAddr( device, "vkCmdPushConstants2KHR" ) ); if ( !vkCmdPushConstants2 ) vkCmdPushConstants2 = vkCmdPushConstants2KHR; vkCmdPushDescriptorSet2KHR = PFN_vkCmdPushDescriptorSet2KHR( vkGetDeviceProcAddr( device, "vkCmdPushDescriptorSet2KHR" ) ); if ( !vkCmdPushDescriptorSet2 ) vkCmdPushDescriptorSet2 = vkCmdPushDescriptorSet2KHR; vkCmdPushDescriptorSetWithTemplate2KHR = PFN_vkCmdPushDescriptorSetWithTemplate2KHR( vkGetDeviceProcAddr( device, "vkCmdPushDescriptorSetWithTemplate2KHR" ) ); if ( !vkCmdPushDescriptorSetWithTemplate2 ) vkCmdPushDescriptorSetWithTemplate2 = vkCmdPushDescriptorSetWithTemplate2KHR; vkCmdSetDescriptorBufferOffsets2EXT = PFN_vkCmdSetDescriptorBufferOffsets2EXT( vkGetDeviceProcAddr( device, "vkCmdSetDescriptorBufferOffsets2EXT" ) ); vkCmdBindDescriptorBufferEmbeddedSamplers2EXT = PFN_vkCmdBindDescriptorBufferEmbeddedSamplers2EXT( vkGetDeviceProcAddr( device, "vkCmdBindDescriptorBufferEmbeddedSamplers2EXT" ) ); //=== VK_NV_cluster_acceleration_structure === vkGetClusterAccelerationStructureBuildSizesNV = PFN_vkGetClusterAccelerationStructureBuildSizesNV( vkGetDeviceProcAddr( device, "vkGetClusterAccelerationStructureBuildSizesNV" ) ); vkCmdBuildClusterAccelerationStructureIndirectNV = PFN_vkCmdBuildClusterAccelerationStructureIndirectNV( vkGetDeviceProcAddr( device, "vkCmdBuildClusterAccelerationStructureIndirectNV" ) ); //=== VK_NV_partitioned_acceleration_structure === vkGetPartitionedAccelerationStructuresBuildSizesNV = PFN_vkGetPartitionedAccelerationStructuresBuildSizesNV( vkGetDeviceProcAddr( device, "vkGetPartitionedAccelerationStructuresBuildSizesNV" ) ); vkCmdBuildPartitionedAccelerationStructuresNV = PFN_vkCmdBuildPartitionedAccelerationStructuresNV( vkGetDeviceProcAddr( device, "vkCmdBuildPartitionedAccelerationStructuresNV" ) ); //=== VK_EXT_device_generated_commands === vkGetGeneratedCommandsMemoryRequirementsEXT = PFN_vkGetGeneratedCommandsMemoryRequirementsEXT( vkGetDeviceProcAddr( device, "vkGetGeneratedCommandsMemoryRequirementsEXT" ) ); vkCmdPreprocessGeneratedCommandsEXT = PFN_vkCmdPreprocessGeneratedCommandsEXT( vkGetDeviceProcAddr( device, "vkCmdPreprocessGeneratedCommandsEXT" ) ); vkCmdExecuteGeneratedCommandsEXT = PFN_vkCmdExecuteGeneratedCommandsEXT( vkGetDeviceProcAddr( device, "vkCmdExecuteGeneratedCommandsEXT" ) ); vkCreateIndirectCommandsLayoutEXT = PFN_vkCreateIndirectCommandsLayoutEXT( vkGetDeviceProcAddr( device, "vkCreateIndirectCommandsLayoutEXT" ) ); vkDestroyIndirectCommandsLayoutEXT = PFN_vkDestroyIndirectCommandsLayoutEXT( vkGetDeviceProcAddr( device, "vkDestroyIndirectCommandsLayoutEXT" ) ); vkCreateIndirectExecutionSetEXT = PFN_vkCreateIndirectExecutionSetEXT( vkGetDeviceProcAddr( device, "vkCreateIndirectExecutionSetEXT" ) ); vkDestroyIndirectExecutionSetEXT = PFN_vkDestroyIndirectExecutionSetEXT( vkGetDeviceProcAddr( device, "vkDestroyIndirectExecutionSetEXT" ) ); vkUpdateIndirectExecutionSetPipelineEXT = PFN_vkUpdateIndirectExecutionSetPipelineEXT( vkGetDeviceProcAddr( device, "vkUpdateIndirectExecutionSetPipelineEXT" ) ); vkUpdateIndirectExecutionSetShaderEXT = PFN_vkUpdateIndirectExecutionSetShaderEXT( vkGetDeviceProcAddr( device, "vkUpdateIndirectExecutionSetShaderEXT" ) ); #if defined( VK_USE_PLATFORM_METAL_EXT ) //=== VK_EXT_external_memory_metal === vkGetMemoryMetalHandleEXT = PFN_vkGetMemoryMetalHandleEXT( vkGetDeviceProcAddr( device, "vkGetMemoryMetalHandleEXT" ) ); vkGetMemoryMetalHandlePropertiesEXT = PFN_vkGetMemoryMetalHandlePropertiesEXT( vkGetDeviceProcAddr( device, "vkGetMemoryMetalHandlePropertiesEXT" ) ); #endif /*VK_USE_PLATFORM_METAL_EXT*/ } template void init( VULKAN_HPP_NAMESPACE::Instance const & instance, VULKAN_HPP_NAMESPACE::Device const & device, DynamicLoader const & dl ) VULKAN_HPP_NOEXCEPT { PFN_vkGetInstanceProcAddr getInstanceProcAddr = dl.template getProcAddress( "vkGetInstanceProcAddr" ); PFN_vkGetDeviceProcAddr getDeviceProcAddr = dl.template getProcAddress( "vkGetDeviceProcAddr" ); init( static_cast( instance ), getInstanceProcAddr, static_cast( device ), device ? getDeviceProcAddr : nullptr ); } template void init( VULKAN_HPP_NAMESPACE::Instance const & instance, VULKAN_HPP_NAMESPACE::Device const & device ) VULKAN_HPP_NOEXCEPT { static DynamicLoader dl; init( instance, device, dl ); } }; } // namespace detail } // namespace VULKAN_HPP_NAMESPACE #endif ================================================ FILE: src/libraries/vulkanheaders/vulkan_android.h ================================================ #ifndef VULKAN_ANDROID_H_ #define VULKAN_ANDROID_H_ 1 /* ** Copyright 2015-2025 The Khronos Group Inc. ** ** SPDX-License-Identifier: Apache-2.0 */ /* ** This header is generated from the Khronos Vulkan XML API Registry. ** */ #ifdef __cplusplus extern "C" { #endif // VK_KHR_android_surface is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_android_surface 1 struct ANativeWindow; #define VK_KHR_ANDROID_SURFACE_SPEC_VERSION 6 #define VK_KHR_ANDROID_SURFACE_EXTENSION_NAME "VK_KHR_android_surface" typedef VkFlags VkAndroidSurfaceCreateFlagsKHR; typedef struct VkAndroidSurfaceCreateInfoKHR { VkStructureType sType; const void* pNext; VkAndroidSurfaceCreateFlagsKHR flags; struct ANativeWindow* window; } VkAndroidSurfaceCreateInfoKHR; typedef VkResult (VKAPI_PTR *PFN_vkCreateAndroidSurfaceKHR)(VkInstance instance, const VkAndroidSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkCreateAndroidSurfaceKHR( VkInstance instance, const VkAndroidSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); #endif // VK_ANDROID_external_memory_android_hardware_buffer is a preprocessor guard. Do not pass it to API calls. #define VK_ANDROID_external_memory_android_hardware_buffer 1 struct AHardwareBuffer; #define VK_ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER_SPEC_VERSION 5 #define VK_ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER_EXTENSION_NAME "VK_ANDROID_external_memory_android_hardware_buffer" typedef struct VkAndroidHardwareBufferUsageANDROID { VkStructureType sType; void* pNext; uint64_t androidHardwareBufferUsage; } VkAndroidHardwareBufferUsageANDROID; typedef struct VkAndroidHardwareBufferPropertiesANDROID { VkStructureType sType; void* pNext; VkDeviceSize allocationSize; uint32_t memoryTypeBits; } VkAndroidHardwareBufferPropertiesANDROID; typedef struct VkAndroidHardwareBufferFormatPropertiesANDROID { VkStructureType sType; void* pNext; VkFormat format; uint64_t externalFormat; VkFormatFeatureFlags formatFeatures; VkComponentMapping samplerYcbcrConversionComponents; VkSamplerYcbcrModelConversion suggestedYcbcrModel; VkSamplerYcbcrRange suggestedYcbcrRange; VkChromaLocation suggestedXChromaOffset; VkChromaLocation suggestedYChromaOffset; } VkAndroidHardwareBufferFormatPropertiesANDROID; typedef struct VkImportAndroidHardwareBufferInfoANDROID { VkStructureType sType; const void* pNext; struct AHardwareBuffer* buffer; } VkImportAndroidHardwareBufferInfoANDROID; typedef struct VkMemoryGetAndroidHardwareBufferInfoANDROID { VkStructureType sType; const void* pNext; VkDeviceMemory memory; } VkMemoryGetAndroidHardwareBufferInfoANDROID; typedef struct VkExternalFormatANDROID { VkStructureType sType; void* pNext; uint64_t externalFormat; } VkExternalFormatANDROID; typedef struct VkAndroidHardwareBufferFormatProperties2ANDROID { VkStructureType sType; void* pNext; VkFormat format; uint64_t externalFormat; VkFormatFeatureFlags2 formatFeatures; VkComponentMapping samplerYcbcrConversionComponents; VkSamplerYcbcrModelConversion suggestedYcbcrModel; VkSamplerYcbcrRange suggestedYcbcrRange; VkChromaLocation suggestedXChromaOffset; VkChromaLocation suggestedYChromaOffset; } VkAndroidHardwareBufferFormatProperties2ANDROID; typedef VkResult (VKAPI_PTR *PFN_vkGetAndroidHardwareBufferPropertiesANDROID)(VkDevice device, const struct AHardwareBuffer* buffer, VkAndroidHardwareBufferPropertiesANDROID* pProperties); typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryAndroidHardwareBufferANDROID)(VkDevice device, const VkMemoryGetAndroidHardwareBufferInfoANDROID* pInfo, struct AHardwareBuffer** pBuffer); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkGetAndroidHardwareBufferPropertiesANDROID( VkDevice device, const struct AHardwareBuffer* buffer, VkAndroidHardwareBufferPropertiesANDROID* pProperties); VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryAndroidHardwareBufferANDROID( VkDevice device, const VkMemoryGetAndroidHardwareBufferInfoANDROID* pInfo, struct AHardwareBuffer** pBuffer); #endif // VK_ANDROID_external_format_resolve is a preprocessor guard. Do not pass it to API calls. #define VK_ANDROID_external_format_resolve 1 #define VK_ANDROID_EXTERNAL_FORMAT_RESOLVE_SPEC_VERSION 1 #define VK_ANDROID_EXTERNAL_FORMAT_RESOLVE_EXTENSION_NAME "VK_ANDROID_external_format_resolve" typedef struct VkPhysicalDeviceExternalFormatResolveFeaturesANDROID { VkStructureType sType; void* pNext; VkBool32 externalFormatResolve; } VkPhysicalDeviceExternalFormatResolveFeaturesANDROID; typedef struct VkPhysicalDeviceExternalFormatResolvePropertiesANDROID { VkStructureType sType; void* pNext; VkBool32 nullColorAttachmentWithExternalFormatResolve; VkChromaLocation externalFormatResolveChromaOffsetX; VkChromaLocation externalFormatResolveChromaOffsetY; } VkPhysicalDeviceExternalFormatResolvePropertiesANDROID; typedef struct VkAndroidHardwareBufferFormatResolvePropertiesANDROID { VkStructureType sType; void* pNext; VkFormat colorAttachmentFormat; } VkAndroidHardwareBufferFormatResolvePropertiesANDROID; #ifdef __cplusplus } #endif #endif ================================================ FILE: src/libraries/vulkanheaders/vulkan_beta.h ================================================ #ifndef VULKAN_BETA_H_ #define VULKAN_BETA_H_ 1 /* ** Copyright 2015-2025 The Khronos Group Inc. ** ** SPDX-License-Identifier: Apache-2.0 */ /* ** This header is generated from the Khronos Vulkan XML API Registry. ** */ #ifdef __cplusplus extern "C" { #endif // VK_KHR_portability_subset is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_portability_subset 1 #define VK_KHR_PORTABILITY_SUBSET_SPEC_VERSION 1 #define VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME "VK_KHR_portability_subset" typedef struct VkPhysicalDevicePortabilitySubsetFeaturesKHR { VkStructureType sType; void* pNext; VkBool32 constantAlphaColorBlendFactors; VkBool32 events; VkBool32 imageViewFormatReinterpretation; VkBool32 imageViewFormatSwizzle; VkBool32 imageView2DOn3DImage; VkBool32 multisampleArrayImage; VkBool32 mutableComparisonSamplers; VkBool32 pointPolygons; VkBool32 samplerMipLodBias; VkBool32 separateStencilMaskRef; VkBool32 shaderSampleRateInterpolationFunctions; VkBool32 tessellationIsolines; VkBool32 tessellationPointMode; VkBool32 triangleFans; VkBool32 vertexAttributeAccessBeyondStride; } VkPhysicalDevicePortabilitySubsetFeaturesKHR; typedef struct VkPhysicalDevicePortabilitySubsetPropertiesKHR { VkStructureType sType; void* pNext; uint32_t minVertexInputBindingStrideAlignment; } VkPhysicalDevicePortabilitySubsetPropertiesKHR; // VK_AMDX_shader_enqueue is a preprocessor guard. Do not pass it to API calls. #define VK_AMDX_shader_enqueue 1 #define VK_AMDX_SHADER_ENQUEUE_SPEC_VERSION 2 #define VK_AMDX_SHADER_ENQUEUE_EXTENSION_NAME "VK_AMDX_shader_enqueue" #define VK_SHADER_INDEX_UNUSED_AMDX (~0U) typedef struct VkPhysicalDeviceShaderEnqueueFeaturesAMDX { VkStructureType sType; void* pNext; VkBool32 shaderEnqueue; VkBool32 shaderMeshEnqueue; } VkPhysicalDeviceShaderEnqueueFeaturesAMDX; typedef struct VkPhysicalDeviceShaderEnqueuePropertiesAMDX { VkStructureType sType; void* pNext; uint32_t maxExecutionGraphDepth; uint32_t maxExecutionGraphShaderOutputNodes; uint32_t maxExecutionGraphShaderPayloadSize; uint32_t maxExecutionGraphShaderPayloadCount; uint32_t executionGraphDispatchAddressAlignment; uint32_t maxExecutionGraphWorkgroupCount[3]; uint32_t maxExecutionGraphWorkgroups; } VkPhysicalDeviceShaderEnqueuePropertiesAMDX; typedef struct VkExecutionGraphPipelineScratchSizeAMDX { VkStructureType sType; void* pNext; VkDeviceSize minSize; VkDeviceSize maxSize; VkDeviceSize sizeGranularity; } VkExecutionGraphPipelineScratchSizeAMDX; typedef struct VkExecutionGraphPipelineCreateInfoAMDX { VkStructureType sType; const void* pNext; VkPipelineCreateFlags flags; uint32_t stageCount; const VkPipelineShaderStageCreateInfo* pStages; const VkPipelineLibraryCreateInfoKHR* pLibraryInfo; VkPipelineLayout layout; VkPipeline basePipelineHandle; int32_t basePipelineIndex; } VkExecutionGraphPipelineCreateInfoAMDX; typedef union VkDeviceOrHostAddressConstAMDX { VkDeviceAddress deviceAddress; const void* hostAddress; } VkDeviceOrHostAddressConstAMDX; typedef struct VkDispatchGraphInfoAMDX { uint32_t nodeIndex; uint32_t payloadCount; VkDeviceOrHostAddressConstAMDX payloads; uint64_t payloadStride; } VkDispatchGraphInfoAMDX; typedef struct VkDispatchGraphCountInfoAMDX { uint32_t count; VkDeviceOrHostAddressConstAMDX infos; uint64_t stride; } VkDispatchGraphCountInfoAMDX; typedef struct VkPipelineShaderStageNodeCreateInfoAMDX { VkStructureType sType; const void* pNext; const char* pName; uint32_t index; } VkPipelineShaderStageNodeCreateInfoAMDX; typedef VkResult (VKAPI_PTR *PFN_vkCreateExecutionGraphPipelinesAMDX)(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkExecutionGraphPipelineCreateInfoAMDX* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines); typedef VkResult (VKAPI_PTR *PFN_vkGetExecutionGraphPipelineScratchSizeAMDX)(VkDevice device, VkPipeline executionGraph, VkExecutionGraphPipelineScratchSizeAMDX* pSizeInfo); typedef VkResult (VKAPI_PTR *PFN_vkGetExecutionGraphPipelineNodeIndexAMDX)(VkDevice device, VkPipeline executionGraph, const VkPipelineShaderStageNodeCreateInfoAMDX* pNodeInfo, uint32_t* pNodeIndex); typedef void (VKAPI_PTR *PFN_vkCmdInitializeGraphScratchMemoryAMDX)(VkCommandBuffer commandBuffer, VkPipeline executionGraph, VkDeviceAddress scratch, VkDeviceSize scratchSize); typedef void (VKAPI_PTR *PFN_vkCmdDispatchGraphAMDX)(VkCommandBuffer commandBuffer, VkDeviceAddress scratch, VkDeviceSize scratchSize, const VkDispatchGraphCountInfoAMDX* pCountInfo); typedef void (VKAPI_PTR *PFN_vkCmdDispatchGraphIndirectAMDX)(VkCommandBuffer commandBuffer, VkDeviceAddress scratch, VkDeviceSize scratchSize, const VkDispatchGraphCountInfoAMDX* pCountInfo); typedef void (VKAPI_PTR *PFN_vkCmdDispatchGraphIndirectCountAMDX)(VkCommandBuffer commandBuffer, VkDeviceAddress scratch, VkDeviceSize scratchSize, VkDeviceAddress countInfo); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkCreateExecutionGraphPipelinesAMDX( VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkExecutionGraphPipelineCreateInfoAMDX* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines); VKAPI_ATTR VkResult VKAPI_CALL vkGetExecutionGraphPipelineScratchSizeAMDX( VkDevice device, VkPipeline executionGraph, VkExecutionGraphPipelineScratchSizeAMDX* pSizeInfo); VKAPI_ATTR VkResult VKAPI_CALL vkGetExecutionGraphPipelineNodeIndexAMDX( VkDevice device, VkPipeline executionGraph, const VkPipelineShaderStageNodeCreateInfoAMDX* pNodeInfo, uint32_t* pNodeIndex); VKAPI_ATTR void VKAPI_CALL vkCmdInitializeGraphScratchMemoryAMDX( VkCommandBuffer commandBuffer, VkPipeline executionGraph, VkDeviceAddress scratch, VkDeviceSize scratchSize); VKAPI_ATTR void VKAPI_CALL vkCmdDispatchGraphAMDX( VkCommandBuffer commandBuffer, VkDeviceAddress scratch, VkDeviceSize scratchSize, const VkDispatchGraphCountInfoAMDX* pCountInfo); VKAPI_ATTR void VKAPI_CALL vkCmdDispatchGraphIndirectAMDX( VkCommandBuffer commandBuffer, VkDeviceAddress scratch, VkDeviceSize scratchSize, const VkDispatchGraphCountInfoAMDX* pCountInfo); VKAPI_ATTR void VKAPI_CALL vkCmdDispatchGraphIndirectCountAMDX( VkCommandBuffer commandBuffer, VkDeviceAddress scratch, VkDeviceSize scratchSize, VkDeviceAddress countInfo); #endif // VK_NV_displacement_micromap is a preprocessor guard. Do not pass it to API calls. #define VK_NV_displacement_micromap 1 #define VK_NV_DISPLACEMENT_MICROMAP_SPEC_VERSION 2 #define VK_NV_DISPLACEMENT_MICROMAP_EXTENSION_NAME "VK_NV_displacement_micromap" typedef enum VkDisplacementMicromapFormatNV { VK_DISPLACEMENT_MICROMAP_FORMAT_64_TRIANGLES_64_BYTES_NV = 1, VK_DISPLACEMENT_MICROMAP_FORMAT_256_TRIANGLES_128_BYTES_NV = 2, VK_DISPLACEMENT_MICROMAP_FORMAT_1024_TRIANGLES_128_BYTES_NV = 3, VK_DISPLACEMENT_MICROMAP_FORMAT_MAX_ENUM_NV = 0x7FFFFFFF } VkDisplacementMicromapFormatNV; typedef struct VkPhysicalDeviceDisplacementMicromapFeaturesNV { VkStructureType sType; void* pNext; VkBool32 displacementMicromap; } VkPhysicalDeviceDisplacementMicromapFeaturesNV; typedef struct VkPhysicalDeviceDisplacementMicromapPropertiesNV { VkStructureType sType; void* pNext; uint32_t maxDisplacementMicromapSubdivisionLevel; } VkPhysicalDeviceDisplacementMicromapPropertiesNV; typedef struct VkAccelerationStructureTrianglesDisplacementMicromapNV { VkStructureType sType; void* pNext; VkFormat displacementBiasAndScaleFormat; VkFormat displacementVectorFormat; VkDeviceOrHostAddressConstKHR displacementBiasAndScaleBuffer; VkDeviceSize displacementBiasAndScaleStride; VkDeviceOrHostAddressConstKHR displacementVectorBuffer; VkDeviceSize displacementVectorStride; VkDeviceOrHostAddressConstKHR displacedMicromapPrimitiveFlags; VkDeviceSize displacedMicromapPrimitiveFlagsStride; VkIndexType indexType; VkDeviceOrHostAddressConstKHR indexBuffer; VkDeviceSize indexStride; uint32_t baseTriangle; uint32_t usageCountsCount; const VkMicromapUsageEXT* pUsageCounts; const VkMicromapUsageEXT* const* ppUsageCounts; VkMicromapEXT micromap; } VkAccelerationStructureTrianglesDisplacementMicromapNV; #ifdef __cplusplus } #endif #endif ================================================ FILE: src/libraries/vulkanheaders/vulkan_core.h ================================================ #ifndef VULKAN_CORE_H_ #define VULKAN_CORE_H_ 1 /* ** Copyright 2015-2025 The Khronos Group Inc. ** ** SPDX-License-Identifier: Apache-2.0 */ /* ** This header is generated from the Khronos Vulkan XML API Registry. ** */ #ifdef __cplusplus extern "C" { #endif // VK_VERSION_1_0 is a preprocessor guard. Do not pass it to API calls. #define VK_VERSION_1_0 1 #include "vk_platform.h" #define VK_DEFINE_HANDLE(object) typedef struct object##_T* object; #ifndef VK_USE_64_BIT_PTR_DEFINES #if defined(__LP64__) || defined(_WIN64) || (defined(__x86_64__) && !defined(__ILP32__) ) || defined(_M_X64) || defined(__ia64) || defined (_M_IA64) || defined(__aarch64__) || defined(__powerpc64__) || (defined(__riscv) && __riscv_xlen == 64) #define VK_USE_64_BIT_PTR_DEFINES 1 #else #define VK_USE_64_BIT_PTR_DEFINES 0 #endif #endif #ifndef VK_DEFINE_NON_DISPATCHABLE_HANDLE #if (VK_USE_64_BIT_PTR_DEFINES==1) #if (defined(__cplusplus) && (__cplusplus >= 201103L)) || (defined(_MSVC_LANG) && (_MSVC_LANG >= 201103L)) #define VK_NULL_HANDLE nullptr #else #define VK_NULL_HANDLE ((void*)0) #endif #else #define VK_NULL_HANDLE 0ULL #endif #endif #ifndef VK_NULL_HANDLE #define VK_NULL_HANDLE 0 #endif #ifndef VK_DEFINE_NON_DISPATCHABLE_HANDLE #if (VK_USE_64_BIT_PTR_DEFINES==1) #define VK_DEFINE_NON_DISPATCHABLE_HANDLE(object) typedef struct object##_T *object; #else #define VK_DEFINE_NON_DISPATCHABLE_HANDLE(object) typedef uint64_t object; #endif #endif #define VK_MAKE_API_VERSION(variant, major, minor, patch) \ ((((uint32_t)(variant)) << 29U) | (((uint32_t)(major)) << 22U) | (((uint32_t)(minor)) << 12U) | ((uint32_t)(patch))) // DEPRECATED: This define has been removed. Specific version defines (e.g. VK_API_VERSION_1_0), or the VK_MAKE_VERSION macro, should be used instead. //#define VK_API_VERSION VK_MAKE_API_VERSION(0, 1, 0, 0) // Patch version should always be set to 0 // Vulkan 1.0 version number #define VK_API_VERSION_1_0 VK_MAKE_API_VERSION(0, 1, 0, 0)// Patch version should always be set to 0 // Version of this file #define VK_HEADER_VERSION 307 // Complete version of this file #define VK_HEADER_VERSION_COMPLETE VK_MAKE_API_VERSION(0, 1, 4, VK_HEADER_VERSION) // VK_MAKE_VERSION is deprecated, but no reason was given in the API XML // DEPRECATED: This define is deprecated. VK_MAKE_API_VERSION should be used instead. #define VK_MAKE_VERSION(major, minor, patch) \ ((((uint32_t)(major)) << 22U) | (((uint32_t)(minor)) << 12U) | ((uint32_t)(patch))) // VK_VERSION_MAJOR is deprecated, but no reason was given in the API XML // DEPRECATED: This define is deprecated. VK_API_VERSION_MAJOR should be used instead. #define VK_VERSION_MAJOR(version) ((uint32_t)(version) >> 22U) // VK_VERSION_MINOR is deprecated, but no reason was given in the API XML // DEPRECATED: This define is deprecated. VK_API_VERSION_MINOR should be used instead. #define VK_VERSION_MINOR(version) (((uint32_t)(version) >> 12U) & 0x3FFU) // VK_VERSION_PATCH is deprecated, but no reason was given in the API XML // DEPRECATED: This define is deprecated. VK_API_VERSION_PATCH should be used instead. #define VK_VERSION_PATCH(version) ((uint32_t)(version) & 0xFFFU) #define VK_API_VERSION_VARIANT(version) ((uint32_t)(version) >> 29U) #define VK_API_VERSION_MAJOR(version) (((uint32_t)(version) >> 22U) & 0x7FU) #define VK_API_VERSION_MINOR(version) (((uint32_t)(version) >> 12U) & 0x3FFU) #define VK_API_VERSION_PATCH(version) ((uint32_t)(version) & 0xFFFU) typedef uint32_t VkBool32; typedef uint64_t VkDeviceAddress; typedef uint64_t VkDeviceSize; typedef uint32_t VkFlags; typedef uint32_t VkSampleMask; VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkBuffer) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkImage) VK_DEFINE_HANDLE(VkInstance) VK_DEFINE_HANDLE(VkPhysicalDevice) VK_DEFINE_HANDLE(VkDevice) VK_DEFINE_HANDLE(VkQueue) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSemaphore) VK_DEFINE_HANDLE(VkCommandBuffer) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkFence) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDeviceMemory) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkEvent) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkQueryPool) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkBufferView) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkImageView) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkShaderModule) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkPipelineCache) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkPipelineLayout) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkPipeline) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkRenderPass) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorSetLayout) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSampler) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorSet) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorPool) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkFramebuffer) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkCommandPool) #define VK_ATTACHMENT_UNUSED (~0U) #define VK_FALSE 0U #define VK_LOD_CLAMP_NONE 1000.0F #define VK_QUEUE_FAMILY_IGNORED (~0U) #define VK_REMAINING_ARRAY_LAYERS (~0U) #define VK_REMAINING_MIP_LEVELS (~0U) #define VK_SUBPASS_EXTERNAL (~0U) #define VK_TRUE 1U #define VK_WHOLE_SIZE (~0ULL) #define VK_MAX_MEMORY_TYPES 32U #define VK_MAX_PHYSICAL_DEVICE_NAME_SIZE 256U #define VK_UUID_SIZE 16U #define VK_MAX_EXTENSION_NAME_SIZE 256U #define VK_MAX_DESCRIPTION_SIZE 256U #define VK_MAX_MEMORY_HEAPS 16U typedef enum VkResult { VK_SUCCESS = 0, VK_NOT_READY = 1, VK_TIMEOUT = 2, VK_EVENT_SET = 3, VK_EVENT_RESET = 4, VK_INCOMPLETE = 5, VK_ERROR_OUT_OF_HOST_MEMORY = -1, VK_ERROR_OUT_OF_DEVICE_MEMORY = -2, VK_ERROR_INITIALIZATION_FAILED = -3, VK_ERROR_DEVICE_LOST = -4, VK_ERROR_MEMORY_MAP_FAILED = -5, VK_ERROR_LAYER_NOT_PRESENT = -6, VK_ERROR_EXTENSION_NOT_PRESENT = -7, VK_ERROR_FEATURE_NOT_PRESENT = -8, VK_ERROR_INCOMPATIBLE_DRIVER = -9, VK_ERROR_TOO_MANY_OBJECTS = -10, VK_ERROR_FORMAT_NOT_SUPPORTED = -11, VK_ERROR_FRAGMENTED_POOL = -12, VK_ERROR_UNKNOWN = -13, VK_ERROR_OUT_OF_POOL_MEMORY = -1000069000, VK_ERROR_INVALID_EXTERNAL_HANDLE = -1000072003, VK_ERROR_FRAGMENTATION = -1000161000, VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS = -1000257000, VK_PIPELINE_COMPILE_REQUIRED = 1000297000, VK_ERROR_NOT_PERMITTED = -1000174001, VK_ERROR_SURFACE_LOST_KHR = -1000000000, VK_ERROR_NATIVE_WINDOW_IN_USE_KHR = -1000000001, VK_SUBOPTIMAL_KHR = 1000001003, VK_ERROR_OUT_OF_DATE_KHR = -1000001004, VK_ERROR_INCOMPATIBLE_DISPLAY_KHR = -1000003001, VK_ERROR_VALIDATION_FAILED_EXT = -1000011001, VK_ERROR_INVALID_SHADER_NV = -1000012000, VK_ERROR_IMAGE_USAGE_NOT_SUPPORTED_KHR = -1000023000, VK_ERROR_VIDEO_PICTURE_LAYOUT_NOT_SUPPORTED_KHR = -1000023001, VK_ERROR_VIDEO_PROFILE_OPERATION_NOT_SUPPORTED_KHR = -1000023002, VK_ERROR_VIDEO_PROFILE_FORMAT_NOT_SUPPORTED_KHR = -1000023003, VK_ERROR_VIDEO_PROFILE_CODEC_NOT_SUPPORTED_KHR = -1000023004, VK_ERROR_VIDEO_STD_VERSION_NOT_SUPPORTED_KHR = -1000023005, VK_ERROR_INVALID_DRM_FORMAT_MODIFIER_PLANE_LAYOUT_EXT = -1000158000, VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT = -1000255000, VK_THREAD_IDLE_KHR = 1000268000, VK_THREAD_DONE_KHR = 1000268001, VK_OPERATION_DEFERRED_KHR = 1000268002, VK_OPERATION_NOT_DEFERRED_KHR = 1000268003, VK_ERROR_INVALID_VIDEO_STD_PARAMETERS_KHR = -1000299000, VK_ERROR_COMPRESSION_EXHAUSTED_EXT = -1000338000, VK_INCOMPATIBLE_SHADER_BINARY_EXT = 1000482000, VK_PIPELINE_BINARY_MISSING_KHR = 1000483000, VK_ERROR_NOT_ENOUGH_SPACE_KHR = -1000483000, VK_ERROR_OUT_OF_POOL_MEMORY_KHR = VK_ERROR_OUT_OF_POOL_MEMORY, VK_ERROR_INVALID_EXTERNAL_HANDLE_KHR = VK_ERROR_INVALID_EXTERNAL_HANDLE, VK_ERROR_FRAGMENTATION_EXT = VK_ERROR_FRAGMENTATION, VK_ERROR_NOT_PERMITTED_EXT = VK_ERROR_NOT_PERMITTED, VK_ERROR_NOT_PERMITTED_KHR = VK_ERROR_NOT_PERMITTED, VK_ERROR_INVALID_DEVICE_ADDRESS_EXT = VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS, VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS_KHR = VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS, VK_PIPELINE_COMPILE_REQUIRED_EXT = VK_PIPELINE_COMPILE_REQUIRED, VK_ERROR_PIPELINE_COMPILE_REQUIRED_EXT = VK_PIPELINE_COMPILE_REQUIRED, // VK_ERROR_INCOMPATIBLE_SHADER_BINARY_EXT is a deprecated alias VK_ERROR_INCOMPATIBLE_SHADER_BINARY_EXT = VK_INCOMPATIBLE_SHADER_BINARY_EXT, VK_RESULT_MAX_ENUM = 0x7FFFFFFF } VkResult; typedef enum VkStructureType { VK_STRUCTURE_TYPE_APPLICATION_INFO = 0, VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO = 1, VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO = 2, VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO = 3, VK_STRUCTURE_TYPE_SUBMIT_INFO = 4, VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO = 5, VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE = 6, VK_STRUCTURE_TYPE_BIND_SPARSE_INFO = 7, VK_STRUCTURE_TYPE_FENCE_CREATE_INFO = 8, VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO = 9, VK_STRUCTURE_TYPE_EVENT_CREATE_INFO = 10, VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO = 11, VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO = 12, VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO = 13, VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO = 14, VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO = 15, VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO = 16, VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO = 17, VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO = 18, VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO = 19, VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO = 20, VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO = 21, VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO = 22, VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO = 23, VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO = 24, VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO = 25, VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO = 26, VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO = 27, VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO = 28, VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO = 29, VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO = 30, VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO = 31, VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO = 32, VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO = 33, VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO = 34, VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET = 35, VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET = 36, VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO = 37, VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO = 38, VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO = 39, VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO = 40, VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO = 41, VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO = 42, VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO = 43, VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER = 44, VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER = 45, VK_STRUCTURE_TYPE_MEMORY_BARRIER = 46, VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO = 47, VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO = 48, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_PROPERTIES = 1000094000, VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO = 1000157000, VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO = 1000157001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES = 1000083000, VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS = 1000127000, VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO = 1000127001, VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO = 1000060000, VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO = 1000060003, VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO = 1000060004, VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO = 1000060005, VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO = 1000060006, VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO = 1000060013, VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO = 1000060014, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES = 1000070000, VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO = 1000070001, VK_STRUCTURE_TYPE_BUFFER_MEMORY_REQUIREMENTS_INFO_2 = 1000146000, VK_STRUCTURE_TYPE_IMAGE_MEMORY_REQUIREMENTS_INFO_2 = 1000146001, VK_STRUCTURE_TYPE_IMAGE_SPARSE_MEMORY_REQUIREMENTS_INFO_2 = 1000146002, VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2 = 1000146003, VK_STRUCTURE_TYPE_SPARSE_IMAGE_MEMORY_REQUIREMENTS_2 = 1000146004, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2 = 1000059000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2 = 1000059001, VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2 = 1000059002, VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2 = 1000059003, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2 = 1000059004, VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2 = 1000059005, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2 = 1000059006, VK_STRUCTURE_TYPE_SPARSE_IMAGE_FORMAT_PROPERTIES_2 = 1000059007, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2 = 1000059008, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES = 1000117000, VK_STRUCTURE_TYPE_RENDER_PASS_INPUT_ATTACHMENT_ASPECT_CREATE_INFO = 1000117001, VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO = 1000117002, VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO = 1000117003, VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO = 1000053000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES = 1000053001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES = 1000053002, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES = 1000120000, VK_STRUCTURE_TYPE_PROTECTED_SUBMIT_INFO = 1000145000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_FEATURES = 1000145001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_PROPERTIES = 1000145002, VK_STRUCTURE_TYPE_DEVICE_QUEUE_INFO_2 = 1000145003, VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_CREATE_INFO = 1000156000, VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO = 1000156001, VK_STRUCTURE_TYPE_BIND_IMAGE_PLANE_MEMORY_INFO = 1000156002, VK_STRUCTURE_TYPE_IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO = 1000156003, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES = 1000156004, VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES = 1000156005, VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO = 1000085000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO = 1000071000, VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES = 1000071001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO = 1000071002, VK_STRUCTURE_TYPE_EXTERNAL_BUFFER_PROPERTIES = 1000071003, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES = 1000071004, VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO = 1000072000, VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO = 1000072001, VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO = 1000072002, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FENCE_INFO = 1000112000, VK_STRUCTURE_TYPE_EXTERNAL_FENCE_PROPERTIES = 1000112001, VK_STRUCTURE_TYPE_EXPORT_FENCE_CREATE_INFO = 1000113000, VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO = 1000077000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO = 1000076000, VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES = 1000076001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES = 1000168000, VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_SUPPORT = 1000168001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETERS_FEATURES = 1000063000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_FEATURES = 49, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_PROPERTIES = 50, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_FEATURES = 51, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_PROPERTIES = 52, VK_STRUCTURE_TYPE_IMAGE_FORMAT_LIST_CREATE_INFO = 1000147000, VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_2 = 1000109000, VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_2 = 1000109001, VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_2 = 1000109002, VK_STRUCTURE_TYPE_SUBPASS_DEPENDENCY_2 = 1000109003, VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO_2 = 1000109004, VK_STRUCTURE_TYPE_SUBPASS_BEGIN_INFO = 1000109005, VK_STRUCTURE_TYPE_SUBPASS_END_INFO = 1000109006, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES = 1000177000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES = 1000196000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES = 1000180000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT16_INT8_FEATURES = 1000082000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT_CONTROLS_PROPERTIES = 1000197000, VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_BINDING_FLAGS_CREATE_INFO = 1000161000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES = 1000161001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_PROPERTIES = 1000161002, VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_ALLOCATE_INFO = 1000161003, VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_LAYOUT_SUPPORT = 1000161004, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_STENCIL_RESOLVE_PROPERTIES = 1000199000, VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_DEPTH_STENCIL_RESOLVE = 1000199001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCALAR_BLOCK_LAYOUT_FEATURES = 1000221000, VK_STRUCTURE_TYPE_IMAGE_STENCIL_USAGE_CREATE_INFO = 1000246000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_FILTER_MINMAX_PROPERTIES = 1000130000, VK_STRUCTURE_TYPE_SAMPLER_REDUCTION_MODE_CREATE_INFO = 1000130001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_MEMORY_MODEL_FEATURES = 1000211000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGELESS_FRAMEBUFFER_FEATURES = 1000108000, VK_STRUCTURE_TYPE_FRAMEBUFFER_ATTACHMENTS_CREATE_INFO = 1000108001, VK_STRUCTURE_TYPE_FRAMEBUFFER_ATTACHMENT_IMAGE_INFO = 1000108002, VK_STRUCTURE_TYPE_RENDER_PASS_ATTACHMENT_BEGIN_INFO = 1000108003, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_UNIFORM_BUFFER_STANDARD_LAYOUT_FEATURES = 1000253000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_EXTENDED_TYPES_FEATURES = 1000175000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SEPARATE_DEPTH_STENCIL_LAYOUTS_FEATURES = 1000241000, VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_STENCIL_LAYOUT = 1000241001, VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_STENCIL_LAYOUT = 1000241002, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES = 1000261000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_FEATURES = 1000207000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_PROPERTIES = 1000207001, VK_STRUCTURE_TYPE_SEMAPHORE_TYPE_CREATE_INFO = 1000207002, VK_STRUCTURE_TYPE_TIMELINE_SEMAPHORE_SUBMIT_INFO = 1000207003, VK_STRUCTURE_TYPE_SEMAPHORE_WAIT_INFO = 1000207004, VK_STRUCTURE_TYPE_SEMAPHORE_SIGNAL_INFO = 1000207005, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES = 1000257000, VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO = 1000244001, VK_STRUCTURE_TYPE_BUFFER_OPAQUE_CAPTURE_ADDRESS_CREATE_INFO = 1000257002, VK_STRUCTURE_TYPE_MEMORY_OPAQUE_CAPTURE_ADDRESS_ALLOCATE_INFO = 1000257003, VK_STRUCTURE_TYPE_DEVICE_MEMORY_OPAQUE_CAPTURE_ADDRESS_INFO = 1000257004, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_3_FEATURES = 53, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_3_PROPERTIES = 54, VK_STRUCTURE_TYPE_PIPELINE_CREATION_FEEDBACK_CREATE_INFO = 1000192000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_TERMINATE_INVOCATION_FEATURES = 1000215000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TOOL_PROPERTIES = 1000245000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DEMOTE_TO_HELPER_INVOCATION_FEATURES = 1000276000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIVATE_DATA_FEATURES = 1000295000, VK_STRUCTURE_TYPE_DEVICE_PRIVATE_DATA_CREATE_INFO = 1000295001, VK_STRUCTURE_TYPE_PRIVATE_DATA_SLOT_CREATE_INFO = 1000295002, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_CREATION_CACHE_CONTROL_FEATURES = 1000297000, VK_STRUCTURE_TYPE_MEMORY_BARRIER_2 = 1000314000, VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER_2 = 1000314001, VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER_2 = 1000314002, VK_STRUCTURE_TYPE_DEPENDENCY_INFO = 1000314003, VK_STRUCTURE_TYPE_SUBMIT_INFO_2 = 1000314004, VK_STRUCTURE_TYPE_SEMAPHORE_SUBMIT_INFO = 1000314005, VK_STRUCTURE_TYPE_COMMAND_BUFFER_SUBMIT_INFO = 1000314006, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SYNCHRONIZATION_2_FEATURES = 1000314007, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ZERO_INITIALIZE_WORKGROUP_MEMORY_FEATURES = 1000325000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_ROBUSTNESS_FEATURES = 1000335000, VK_STRUCTURE_TYPE_COPY_BUFFER_INFO_2 = 1000337000, VK_STRUCTURE_TYPE_COPY_IMAGE_INFO_2 = 1000337001, VK_STRUCTURE_TYPE_COPY_BUFFER_TO_IMAGE_INFO_2 = 1000337002, VK_STRUCTURE_TYPE_COPY_IMAGE_TO_BUFFER_INFO_2 = 1000337003, VK_STRUCTURE_TYPE_BLIT_IMAGE_INFO_2 = 1000337004, VK_STRUCTURE_TYPE_RESOLVE_IMAGE_INFO_2 = 1000337005, VK_STRUCTURE_TYPE_BUFFER_COPY_2 = 1000337006, VK_STRUCTURE_TYPE_IMAGE_COPY_2 = 1000337007, VK_STRUCTURE_TYPE_IMAGE_BLIT_2 = 1000337008, VK_STRUCTURE_TYPE_BUFFER_IMAGE_COPY_2 = 1000337009, VK_STRUCTURE_TYPE_IMAGE_RESOLVE_2 = 1000337010, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_PROPERTIES = 1000225000, VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_REQUIRED_SUBGROUP_SIZE_CREATE_INFO = 1000225001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_FEATURES = 1000225002, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_FEATURES = 1000138000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_PROPERTIES = 1000138001, VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_INLINE_UNIFORM_BLOCK = 1000138002, VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_INLINE_UNIFORM_BLOCK_CREATE_INFO = 1000138003, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXTURE_COMPRESSION_ASTC_HDR_FEATURES = 1000066000, VK_STRUCTURE_TYPE_RENDERING_INFO = 1000044000, VK_STRUCTURE_TYPE_RENDERING_ATTACHMENT_INFO = 1000044001, VK_STRUCTURE_TYPE_PIPELINE_RENDERING_CREATE_INFO = 1000044002, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_FEATURES = 1000044003, VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_RENDERING_INFO = 1000044004, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_FEATURES = 1000280000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_PROPERTIES = 1000280001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_PROPERTIES = 1000281001, VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_3 = 1000360000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_4_FEATURES = 1000413000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_4_PROPERTIES = 1000413001, VK_STRUCTURE_TYPE_DEVICE_BUFFER_MEMORY_REQUIREMENTS = 1000413002, VK_STRUCTURE_TYPE_DEVICE_IMAGE_MEMORY_REQUIREMENTS = 1000413003, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_4_FEATURES = 55, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_4_PROPERTIES = 56, VK_STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO = 1000174000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GLOBAL_PRIORITY_QUERY_FEATURES = 1000388000, VK_STRUCTURE_TYPE_QUEUE_FAMILY_GLOBAL_PRIORITY_PROPERTIES = 1000388001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_ROTATE_FEATURES = 1000416000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT_CONTROLS_2_FEATURES = 1000528000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_EXPECT_ASSUME_FEATURES = 1000544000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES = 1000259000, VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_LINE_STATE_CREATE_INFO = 1000259001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_PROPERTIES = 1000259002, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES = 1000525000, VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO = 1000190001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES = 1000190002, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INDEX_TYPE_UINT8_FEATURES = 1000265000, VK_STRUCTURE_TYPE_MEMORY_MAP_INFO = 1000271000, VK_STRUCTURE_TYPE_MEMORY_UNMAP_INFO = 1000271001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_5_FEATURES = 1000470000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_5_PROPERTIES = 1000470001, VK_STRUCTURE_TYPE_RENDERING_AREA_INFO = 1000470003, VK_STRUCTURE_TYPE_DEVICE_IMAGE_SUBRESOURCE_INFO = 1000470004, VK_STRUCTURE_TYPE_SUBRESOURCE_LAYOUT_2 = 1000338002, VK_STRUCTURE_TYPE_IMAGE_SUBRESOURCE_2 = 1000338003, VK_STRUCTURE_TYPE_PIPELINE_CREATE_FLAGS_2_CREATE_INFO = 1000470005, VK_STRUCTURE_TYPE_BUFFER_USAGE_FLAGS_2_CREATE_INFO = 1000470006, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES = 1000080000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_LOCAL_READ_FEATURES = 1000232000, VK_STRUCTURE_TYPE_RENDERING_ATTACHMENT_LOCATION_INFO = 1000232001, VK_STRUCTURE_TYPE_RENDERING_INPUT_ATTACHMENT_INDEX_INFO = 1000232002, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_6_FEATURES = 1000545000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_6_PROPERTIES = 1000545001, VK_STRUCTURE_TYPE_BIND_MEMORY_STATUS = 1000545002, VK_STRUCTURE_TYPE_BIND_DESCRIPTOR_SETS_INFO = 1000545003, VK_STRUCTURE_TYPE_PUSH_CONSTANTS_INFO = 1000545004, VK_STRUCTURE_TYPE_PUSH_DESCRIPTOR_SET_INFO = 1000545005, VK_STRUCTURE_TYPE_PUSH_DESCRIPTOR_SET_WITH_TEMPLATE_INFO = 1000545006, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_PROTECTED_ACCESS_FEATURES = 1000466000, VK_STRUCTURE_TYPE_PIPELINE_ROBUSTNESS_CREATE_INFO = 1000068000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_ROBUSTNESS_FEATURES = 1000068001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_ROBUSTNESS_PROPERTIES = 1000068002, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_IMAGE_COPY_FEATURES = 1000270000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_IMAGE_COPY_PROPERTIES = 1000270001, VK_STRUCTURE_TYPE_MEMORY_TO_IMAGE_COPY = 1000270002, VK_STRUCTURE_TYPE_IMAGE_TO_MEMORY_COPY = 1000270003, VK_STRUCTURE_TYPE_COPY_IMAGE_TO_MEMORY_INFO = 1000270004, VK_STRUCTURE_TYPE_COPY_MEMORY_TO_IMAGE_INFO = 1000270005, VK_STRUCTURE_TYPE_HOST_IMAGE_LAYOUT_TRANSITION_INFO = 1000270006, VK_STRUCTURE_TYPE_COPY_IMAGE_TO_IMAGE_INFO = 1000270007, VK_STRUCTURE_TYPE_SUBRESOURCE_HOST_MEMCPY_SIZE = 1000270008, VK_STRUCTURE_TYPE_HOST_IMAGE_COPY_DEVICE_PERFORMANCE_QUERY = 1000270009, VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR = 1000001000, VK_STRUCTURE_TYPE_PRESENT_INFO_KHR = 1000001001, VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_CAPABILITIES_KHR = 1000060007, VK_STRUCTURE_TYPE_IMAGE_SWAPCHAIN_CREATE_INFO_KHR = 1000060008, VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHR = 1000060009, VK_STRUCTURE_TYPE_ACQUIRE_NEXT_IMAGE_INFO_KHR = 1000060010, VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_INFO_KHR = 1000060011, VK_STRUCTURE_TYPE_DEVICE_GROUP_SWAPCHAIN_CREATE_INFO_KHR = 1000060012, VK_STRUCTURE_TYPE_DISPLAY_MODE_CREATE_INFO_KHR = 1000002000, VK_STRUCTURE_TYPE_DISPLAY_SURFACE_CREATE_INFO_KHR = 1000002001, VK_STRUCTURE_TYPE_DISPLAY_PRESENT_INFO_KHR = 1000003000, VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR = 1000004000, VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR = 1000005000, VK_STRUCTURE_TYPE_WAYLAND_SURFACE_CREATE_INFO_KHR = 1000006000, VK_STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR = 1000008000, VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR = 1000009000, VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT = 1000011000, VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_RASTERIZATION_ORDER_AMD = 1000018000, VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_NAME_INFO_EXT = 1000022000, VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_TAG_INFO_EXT = 1000022001, VK_STRUCTURE_TYPE_DEBUG_MARKER_MARKER_INFO_EXT = 1000022002, VK_STRUCTURE_TYPE_VIDEO_PROFILE_INFO_KHR = 1000023000, VK_STRUCTURE_TYPE_VIDEO_CAPABILITIES_KHR = 1000023001, VK_STRUCTURE_TYPE_VIDEO_PICTURE_RESOURCE_INFO_KHR = 1000023002, VK_STRUCTURE_TYPE_VIDEO_SESSION_MEMORY_REQUIREMENTS_KHR = 1000023003, VK_STRUCTURE_TYPE_BIND_VIDEO_SESSION_MEMORY_INFO_KHR = 1000023004, VK_STRUCTURE_TYPE_VIDEO_SESSION_CREATE_INFO_KHR = 1000023005, VK_STRUCTURE_TYPE_VIDEO_SESSION_PARAMETERS_CREATE_INFO_KHR = 1000023006, VK_STRUCTURE_TYPE_VIDEO_SESSION_PARAMETERS_UPDATE_INFO_KHR = 1000023007, VK_STRUCTURE_TYPE_VIDEO_BEGIN_CODING_INFO_KHR = 1000023008, VK_STRUCTURE_TYPE_VIDEO_END_CODING_INFO_KHR = 1000023009, VK_STRUCTURE_TYPE_VIDEO_CODING_CONTROL_INFO_KHR = 1000023010, VK_STRUCTURE_TYPE_VIDEO_REFERENCE_SLOT_INFO_KHR = 1000023011, VK_STRUCTURE_TYPE_QUEUE_FAMILY_VIDEO_PROPERTIES_KHR = 1000023012, VK_STRUCTURE_TYPE_VIDEO_PROFILE_LIST_INFO_KHR = 1000023013, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VIDEO_FORMAT_INFO_KHR = 1000023014, VK_STRUCTURE_TYPE_VIDEO_FORMAT_PROPERTIES_KHR = 1000023015, VK_STRUCTURE_TYPE_QUEUE_FAMILY_QUERY_RESULT_STATUS_PROPERTIES_KHR = 1000023016, VK_STRUCTURE_TYPE_VIDEO_DECODE_INFO_KHR = 1000024000, VK_STRUCTURE_TYPE_VIDEO_DECODE_CAPABILITIES_KHR = 1000024001, VK_STRUCTURE_TYPE_VIDEO_DECODE_USAGE_INFO_KHR = 1000024002, VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_IMAGE_CREATE_INFO_NV = 1000026000, VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_BUFFER_CREATE_INFO_NV = 1000026001, VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV = 1000026002, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_FEATURES_EXT = 1000028000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_PROPERTIES_EXT = 1000028001, VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_STREAM_CREATE_INFO_EXT = 1000028002, VK_STRUCTURE_TYPE_CU_MODULE_CREATE_INFO_NVX = 1000029000, VK_STRUCTURE_TYPE_CU_FUNCTION_CREATE_INFO_NVX = 1000029001, VK_STRUCTURE_TYPE_CU_LAUNCH_INFO_NVX = 1000029002, VK_STRUCTURE_TYPE_CU_MODULE_TEXTURING_MODE_CREATE_INFO_NVX = 1000029004, VK_STRUCTURE_TYPE_IMAGE_VIEW_HANDLE_INFO_NVX = 1000030000, VK_STRUCTURE_TYPE_IMAGE_VIEW_ADDRESS_PROPERTIES_NVX = 1000030001, VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_CAPABILITIES_KHR = 1000038000, VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_SESSION_PARAMETERS_CREATE_INFO_KHR = 1000038001, VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_SESSION_PARAMETERS_ADD_INFO_KHR = 1000038002, VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_PICTURE_INFO_KHR = 1000038003, VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_DPB_SLOT_INFO_KHR = 1000038004, VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_NALU_SLICE_INFO_KHR = 1000038005, VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_GOP_REMAINING_FRAME_INFO_KHR = 1000038006, VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_PROFILE_INFO_KHR = 1000038007, VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_RATE_CONTROL_INFO_KHR = 1000038008, VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_RATE_CONTROL_LAYER_INFO_KHR = 1000038009, VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_SESSION_CREATE_INFO_KHR = 1000038010, VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_QUALITY_LEVEL_PROPERTIES_KHR = 1000038011, VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_SESSION_PARAMETERS_GET_INFO_KHR = 1000038012, VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_SESSION_PARAMETERS_FEEDBACK_INFO_KHR = 1000038013, VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_CAPABILITIES_KHR = 1000039000, VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_SESSION_PARAMETERS_CREATE_INFO_KHR = 1000039001, VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_SESSION_PARAMETERS_ADD_INFO_KHR = 1000039002, VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_PICTURE_INFO_KHR = 1000039003, VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_DPB_SLOT_INFO_KHR = 1000039004, VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_NALU_SLICE_SEGMENT_INFO_KHR = 1000039005, VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_GOP_REMAINING_FRAME_INFO_KHR = 1000039006, VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_PROFILE_INFO_KHR = 1000039007, VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_RATE_CONTROL_INFO_KHR = 1000039009, VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_RATE_CONTROL_LAYER_INFO_KHR = 1000039010, VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_SESSION_CREATE_INFO_KHR = 1000039011, VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_QUALITY_LEVEL_PROPERTIES_KHR = 1000039012, VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_SESSION_PARAMETERS_GET_INFO_KHR = 1000039013, VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_SESSION_PARAMETERS_FEEDBACK_INFO_KHR = 1000039014, VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_CAPABILITIES_KHR = 1000040000, VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_PICTURE_INFO_KHR = 1000040001, VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_PROFILE_INFO_KHR = 1000040003, VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_SESSION_PARAMETERS_CREATE_INFO_KHR = 1000040004, VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_SESSION_PARAMETERS_ADD_INFO_KHR = 1000040005, VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_DPB_SLOT_INFO_KHR = 1000040006, VK_STRUCTURE_TYPE_TEXTURE_LOD_GATHER_FORMAT_PROPERTIES_AMD = 1000041000, VK_STRUCTURE_TYPE_STREAM_DESCRIPTOR_SURFACE_CREATE_INFO_GGP = 1000049000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CORNER_SAMPLED_IMAGE_FEATURES_NV = 1000050000, VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_NV = 1000056000, VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_NV = 1000056001, VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_NV = 1000057000, VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_NV = 1000057001, VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_NV = 1000058000, VK_STRUCTURE_TYPE_VALIDATION_FLAGS_EXT = 1000061000, VK_STRUCTURE_TYPE_VI_SURFACE_CREATE_INFO_NN = 1000062000, VK_STRUCTURE_TYPE_IMAGE_VIEW_ASTC_DECODE_MODE_EXT = 1000067000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ASTC_DECODE_FEATURES_EXT = 1000067001, VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_KHR = 1000073000, VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_KHR = 1000073001, VK_STRUCTURE_TYPE_MEMORY_WIN32_HANDLE_PROPERTIES_KHR = 1000073002, VK_STRUCTURE_TYPE_MEMORY_GET_WIN32_HANDLE_INFO_KHR = 1000073003, VK_STRUCTURE_TYPE_IMPORT_MEMORY_FD_INFO_KHR = 1000074000, VK_STRUCTURE_TYPE_MEMORY_FD_PROPERTIES_KHR = 1000074001, VK_STRUCTURE_TYPE_MEMORY_GET_FD_INFO_KHR = 1000074002, VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_KHR = 1000075000, VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR = 1000078000, VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR = 1000078001, VK_STRUCTURE_TYPE_D3D12_FENCE_SUBMIT_INFO_KHR = 1000078002, VK_STRUCTURE_TYPE_SEMAPHORE_GET_WIN32_HANDLE_INFO_KHR = 1000078003, VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_FD_INFO_KHR = 1000079000, VK_STRUCTURE_TYPE_SEMAPHORE_GET_FD_INFO_KHR = 1000079001, VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_CONDITIONAL_RENDERING_INFO_EXT = 1000081000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONDITIONAL_RENDERING_FEATURES_EXT = 1000081001, VK_STRUCTURE_TYPE_CONDITIONAL_RENDERING_BEGIN_INFO_EXT = 1000081002, VK_STRUCTURE_TYPE_PRESENT_REGIONS_KHR = 1000084000, VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_W_SCALING_STATE_CREATE_INFO_NV = 1000087000, VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_EXT = 1000090000, VK_STRUCTURE_TYPE_DISPLAY_POWER_INFO_EXT = 1000091000, VK_STRUCTURE_TYPE_DEVICE_EVENT_INFO_EXT = 1000091001, VK_STRUCTURE_TYPE_DISPLAY_EVENT_INFO_EXT = 1000091002, VK_STRUCTURE_TYPE_SWAPCHAIN_COUNTER_CREATE_INFO_EXT = 1000091003, VK_STRUCTURE_TYPE_PRESENT_TIMES_INFO_GOOGLE = 1000092000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_ATTRIBUTES_PROPERTIES_NVX = 1000097000, VK_STRUCTURE_TYPE_MULTIVIEW_PER_VIEW_ATTRIBUTES_INFO_NVX = 1000044009, VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_SWIZZLE_STATE_CREATE_INFO_NV = 1000098000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DISCARD_RECTANGLE_PROPERTIES_EXT = 1000099000, VK_STRUCTURE_TYPE_PIPELINE_DISCARD_RECTANGLE_STATE_CREATE_INFO_EXT = 1000099001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONSERVATIVE_RASTERIZATION_PROPERTIES_EXT = 1000101000, VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_CONSERVATIVE_STATE_CREATE_INFO_EXT = 1000101001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLIP_ENABLE_FEATURES_EXT = 1000102000, VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_DEPTH_CLIP_STATE_CREATE_INFO_EXT = 1000102001, VK_STRUCTURE_TYPE_HDR_METADATA_EXT = 1000105000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RELAXED_LINE_RASTERIZATION_FEATURES_IMG = 1000110000, VK_STRUCTURE_TYPE_SHARED_PRESENT_SURFACE_CAPABILITIES_KHR = 1000111000, VK_STRUCTURE_TYPE_IMPORT_FENCE_WIN32_HANDLE_INFO_KHR = 1000114000, VK_STRUCTURE_TYPE_EXPORT_FENCE_WIN32_HANDLE_INFO_KHR = 1000114001, VK_STRUCTURE_TYPE_FENCE_GET_WIN32_HANDLE_INFO_KHR = 1000114002, VK_STRUCTURE_TYPE_IMPORT_FENCE_FD_INFO_KHR = 1000115000, VK_STRUCTURE_TYPE_FENCE_GET_FD_INFO_KHR = 1000115001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PERFORMANCE_QUERY_FEATURES_KHR = 1000116000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PERFORMANCE_QUERY_PROPERTIES_KHR = 1000116001, VK_STRUCTURE_TYPE_QUERY_POOL_PERFORMANCE_CREATE_INFO_KHR = 1000116002, VK_STRUCTURE_TYPE_PERFORMANCE_QUERY_SUBMIT_INFO_KHR = 1000116003, VK_STRUCTURE_TYPE_ACQUIRE_PROFILING_LOCK_INFO_KHR = 1000116004, VK_STRUCTURE_TYPE_PERFORMANCE_COUNTER_KHR = 1000116005, VK_STRUCTURE_TYPE_PERFORMANCE_COUNTER_DESCRIPTION_KHR = 1000116006, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SURFACE_INFO_2_KHR = 1000119000, VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_KHR = 1000119001, VK_STRUCTURE_TYPE_SURFACE_FORMAT_2_KHR = 1000119002, VK_STRUCTURE_TYPE_DISPLAY_PROPERTIES_2_KHR = 1000121000, VK_STRUCTURE_TYPE_DISPLAY_PLANE_PROPERTIES_2_KHR = 1000121001, VK_STRUCTURE_TYPE_DISPLAY_MODE_PROPERTIES_2_KHR = 1000121002, VK_STRUCTURE_TYPE_DISPLAY_PLANE_INFO_2_KHR = 1000121003, VK_STRUCTURE_TYPE_DISPLAY_PLANE_CAPABILITIES_2_KHR = 1000121004, VK_STRUCTURE_TYPE_IOS_SURFACE_CREATE_INFO_MVK = 1000122000, VK_STRUCTURE_TYPE_MACOS_SURFACE_CREATE_INFO_MVK = 1000123000, VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT = 1000128000, VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_TAG_INFO_EXT = 1000128001, VK_STRUCTURE_TYPE_DEBUG_UTILS_LABEL_EXT = 1000128002, VK_STRUCTURE_TYPE_DEBUG_UTILS_MESSENGER_CALLBACK_DATA_EXT = 1000128003, VK_STRUCTURE_TYPE_DEBUG_UTILS_MESSENGER_CREATE_INFO_EXT = 1000128004, VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_USAGE_ANDROID = 1000129000, VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_PROPERTIES_ANDROID = 1000129001, VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_FORMAT_PROPERTIES_ANDROID = 1000129002, VK_STRUCTURE_TYPE_IMPORT_ANDROID_HARDWARE_BUFFER_INFO_ANDROID = 1000129003, VK_STRUCTURE_TYPE_MEMORY_GET_ANDROID_HARDWARE_BUFFER_INFO_ANDROID = 1000129004, VK_STRUCTURE_TYPE_EXTERNAL_FORMAT_ANDROID = 1000129005, VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_FORMAT_PROPERTIES_2_ANDROID = 1000129006, #ifdef VK_ENABLE_BETA_EXTENSIONS VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ENQUEUE_FEATURES_AMDX = 1000134000, #endif #ifdef VK_ENABLE_BETA_EXTENSIONS VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ENQUEUE_PROPERTIES_AMDX = 1000134001, #endif #ifdef VK_ENABLE_BETA_EXTENSIONS VK_STRUCTURE_TYPE_EXECUTION_GRAPH_PIPELINE_SCRATCH_SIZE_AMDX = 1000134002, #endif #ifdef VK_ENABLE_BETA_EXTENSIONS VK_STRUCTURE_TYPE_EXECUTION_GRAPH_PIPELINE_CREATE_INFO_AMDX = 1000134003, #endif #ifdef VK_ENABLE_BETA_EXTENSIONS VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_NODE_CREATE_INFO_AMDX = 1000134004, #endif VK_STRUCTURE_TYPE_ATTACHMENT_SAMPLE_COUNT_INFO_AMD = 1000044008, VK_STRUCTURE_TYPE_SAMPLE_LOCATIONS_INFO_EXT = 1000143000, VK_STRUCTURE_TYPE_RENDER_PASS_SAMPLE_LOCATIONS_BEGIN_INFO_EXT = 1000143001, VK_STRUCTURE_TYPE_PIPELINE_SAMPLE_LOCATIONS_STATE_CREATE_INFO_EXT = 1000143002, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLE_LOCATIONS_PROPERTIES_EXT = 1000143003, VK_STRUCTURE_TYPE_MULTISAMPLE_PROPERTIES_EXT = 1000143004, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_FEATURES_EXT = 1000148000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_PROPERTIES_EXT = 1000148001, VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_ADVANCED_STATE_CREATE_INFO_EXT = 1000148002, VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_TO_COLOR_STATE_CREATE_INFO_NV = 1000149000, VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_KHR = 1000150007, VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_BUILD_GEOMETRY_INFO_KHR = 1000150000, VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_DEVICE_ADDRESS_INFO_KHR = 1000150002, VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_AABBS_DATA_KHR = 1000150003, VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_INSTANCES_DATA_KHR = 1000150004, VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_TRIANGLES_DATA_KHR = 1000150005, VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_KHR = 1000150006, VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_VERSION_INFO_KHR = 1000150009, VK_STRUCTURE_TYPE_COPY_ACCELERATION_STRUCTURE_INFO_KHR = 1000150010, VK_STRUCTURE_TYPE_COPY_ACCELERATION_STRUCTURE_TO_MEMORY_INFO_KHR = 1000150011, VK_STRUCTURE_TYPE_COPY_MEMORY_TO_ACCELERATION_STRUCTURE_INFO_KHR = 1000150012, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ACCELERATION_STRUCTURE_FEATURES_KHR = 1000150013, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ACCELERATION_STRUCTURE_PROPERTIES_KHR = 1000150014, VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_CREATE_INFO_KHR = 1000150017, VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_BUILD_SIZES_INFO_KHR = 1000150020, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_FEATURES_KHR = 1000347000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_PROPERTIES_KHR = 1000347001, VK_STRUCTURE_TYPE_RAY_TRACING_PIPELINE_CREATE_INFO_KHR = 1000150015, VK_STRUCTURE_TYPE_RAY_TRACING_SHADER_GROUP_CREATE_INFO_KHR = 1000150016, VK_STRUCTURE_TYPE_RAY_TRACING_PIPELINE_INTERFACE_CREATE_INFO_KHR = 1000150018, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_QUERY_FEATURES_KHR = 1000348013, VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_MODULATION_STATE_CREATE_INFO_NV = 1000152000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SM_BUILTINS_FEATURES_NV = 1000154000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SM_BUILTINS_PROPERTIES_NV = 1000154001, VK_STRUCTURE_TYPE_DRM_FORMAT_MODIFIER_PROPERTIES_LIST_EXT = 1000158000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_DRM_FORMAT_MODIFIER_INFO_EXT = 1000158002, VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_LIST_CREATE_INFO_EXT = 1000158003, VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_EXPLICIT_CREATE_INFO_EXT = 1000158004, VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_PROPERTIES_EXT = 1000158005, VK_STRUCTURE_TYPE_DRM_FORMAT_MODIFIER_PROPERTIES_LIST_2_EXT = 1000158006, VK_STRUCTURE_TYPE_VALIDATION_CACHE_CREATE_INFO_EXT = 1000160000, VK_STRUCTURE_TYPE_SHADER_MODULE_VALIDATION_CACHE_CREATE_INFO_EXT = 1000160001, #ifdef VK_ENABLE_BETA_EXTENSIONS VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PORTABILITY_SUBSET_FEATURES_KHR = 1000163000, #endif #ifdef VK_ENABLE_BETA_EXTENSIONS VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PORTABILITY_SUBSET_PROPERTIES_KHR = 1000163001, #endif VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_SHADING_RATE_IMAGE_STATE_CREATE_INFO_NV = 1000164000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADING_RATE_IMAGE_FEATURES_NV = 1000164001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADING_RATE_IMAGE_PROPERTIES_NV = 1000164002, VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_COARSE_SAMPLE_ORDER_STATE_CREATE_INFO_NV = 1000164005, VK_STRUCTURE_TYPE_RAY_TRACING_PIPELINE_CREATE_INFO_NV = 1000165000, VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_CREATE_INFO_NV = 1000165001, VK_STRUCTURE_TYPE_GEOMETRY_NV = 1000165003, VK_STRUCTURE_TYPE_GEOMETRY_TRIANGLES_NV = 1000165004, VK_STRUCTURE_TYPE_GEOMETRY_AABB_NV = 1000165005, VK_STRUCTURE_TYPE_BIND_ACCELERATION_STRUCTURE_MEMORY_INFO_NV = 1000165006, VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_NV = 1000165007, VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_INFO_NV = 1000165008, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PROPERTIES_NV = 1000165009, VK_STRUCTURE_TYPE_RAY_TRACING_SHADER_GROUP_CREATE_INFO_NV = 1000165011, VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_INFO_NV = 1000165012, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_REPRESENTATIVE_FRAGMENT_TEST_FEATURES_NV = 1000166000, VK_STRUCTURE_TYPE_PIPELINE_REPRESENTATIVE_FRAGMENT_TEST_STATE_CREATE_INFO_NV = 1000166001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_VIEW_IMAGE_FORMAT_INFO_EXT = 1000170000, VK_STRUCTURE_TYPE_FILTER_CUBIC_IMAGE_VIEW_IMAGE_FORMAT_PROPERTIES_EXT = 1000170001, VK_STRUCTURE_TYPE_IMPORT_MEMORY_HOST_POINTER_INFO_EXT = 1000178000, VK_STRUCTURE_TYPE_MEMORY_HOST_POINTER_PROPERTIES_EXT = 1000178001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_MEMORY_HOST_PROPERTIES_EXT = 1000178002, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CLOCK_FEATURES_KHR = 1000181000, VK_STRUCTURE_TYPE_PIPELINE_COMPILER_CONTROL_CREATE_INFO_AMD = 1000183000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_AMD = 1000185000, VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_CAPABILITIES_KHR = 1000187000, VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_SESSION_PARAMETERS_CREATE_INFO_KHR = 1000187001, VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_SESSION_PARAMETERS_ADD_INFO_KHR = 1000187002, VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_PROFILE_INFO_KHR = 1000187003, VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_PICTURE_INFO_KHR = 1000187004, VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_DPB_SLOT_INFO_KHR = 1000187005, VK_STRUCTURE_TYPE_DEVICE_MEMORY_OVERALLOCATION_CREATE_INFO_AMD = 1000189000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES_EXT = 1000190000, VK_STRUCTURE_TYPE_PRESENT_FRAME_TOKEN_GGP = 1000191000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_FEATURES_NV = 1000202000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_PROPERTIES_NV = 1000202001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_IMAGE_FOOTPRINT_FEATURES_NV = 1000204000, VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_EXCLUSIVE_SCISSOR_STATE_CREATE_INFO_NV = 1000205000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXCLUSIVE_SCISSOR_FEATURES_NV = 1000205002, VK_STRUCTURE_TYPE_CHECKPOINT_DATA_NV = 1000206000, VK_STRUCTURE_TYPE_QUEUE_FAMILY_CHECKPOINT_PROPERTIES_NV = 1000206001, VK_STRUCTURE_TYPE_QUEUE_FAMILY_CHECKPOINT_PROPERTIES_2_NV = 1000314008, VK_STRUCTURE_TYPE_CHECKPOINT_DATA_2_NV = 1000314009, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_FUNCTIONS_2_FEATURES_INTEL = 1000209000, VK_STRUCTURE_TYPE_QUERY_POOL_PERFORMANCE_QUERY_CREATE_INFO_INTEL = 1000210000, VK_STRUCTURE_TYPE_INITIALIZE_PERFORMANCE_API_INFO_INTEL = 1000210001, VK_STRUCTURE_TYPE_PERFORMANCE_MARKER_INFO_INTEL = 1000210002, VK_STRUCTURE_TYPE_PERFORMANCE_STREAM_MARKER_INFO_INTEL = 1000210003, VK_STRUCTURE_TYPE_PERFORMANCE_OVERRIDE_INFO_INTEL = 1000210004, VK_STRUCTURE_TYPE_PERFORMANCE_CONFIGURATION_ACQUIRE_INFO_INTEL = 1000210005, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PCI_BUS_INFO_PROPERTIES_EXT = 1000212000, VK_STRUCTURE_TYPE_DISPLAY_NATIVE_HDR_SURFACE_CAPABILITIES_AMD = 1000213000, VK_STRUCTURE_TYPE_SWAPCHAIN_DISPLAY_NATIVE_HDR_CREATE_INFO_AMD = 1000213001, VK_STRUCTURE_TYPE_IMAGEPIPE_SURFACE_CREATE_INFO_FUCHSIA = 1000214000, VK_STRUCTURE_TYPE_METAL_SURFACE_CREATE_INFO_EXT = 1000217000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_FEATURES_EXT = 1000218000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_PROPERTIES_EXT = 1000218001, VK_STRUCTURE_TYPE_RENDER_PASS_FRAGMENT_DENSITY_MAP_CREATE_INFO_EXT = 1000218002, VK_STRUCTURE_TYPE_RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_INFO_EXT = 1000044007, VK_STRUCTURE_TYPE_FRAGMENT_SHADING_RATE_ATTACHMENT_INFO_KHR = 1000226000, VK_STRUCTURE_TYPE_PIPELINE_FRAGMENT_SHADING_RATE_STATE_CREATE_INFO_KHR = 1000226001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_PROPERTIES_KHR = 1000226002, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_FEATURES_KHR = 1000226003, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_KHR = 1000226004, VK_STRUCTURE_TYPE_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_INFO_KHR = 1000044006, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_2_AMD = 1000227000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COHERENT_MEMORY_FEATURES_AMD = 1000229000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_IMAGE_ATOMIC_INT64_FEATURES_EXT = 1000234000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_QUAD_CONTROL_FEATURES_KHR = 1000235000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_BUDGET_PROPERTIES_EXT = 1000237000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PRIORITY_FEATURES_EXT = 1000238000, VK_STRUCTURE_TYPE_MEMORY_PRIORITY_ALLOCATE_INFO_EXT = 1000238001, VK_STRUCTURE_TYPE_SURFACE_PROTECTED_CAPABILITIES_KHR = 1000239000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEDICATED_ALLOCATION_IMAGE_ALIASING_FEATURES_NV = 1000240000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_EXT = 1000244000, VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_CREATE_INFO_EXT = 1000244002, VK_STRUCTURE_TYPE_VALIDATION_FEATURES_EXT = 1000247000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_WAIT_FEATURES_KHR = 1000248000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_FEATURES_NV = 1000249000, VK_STRUCTURE_TYPE_COOPERATIVE_MATRIX_PROPERTIES_NV = 1000249001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_PROPERTIES_NV = 1000249002, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COVERAGE_REDUCTION_MODE_FEATURES_NV = 1000250000, VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_REDUCTION_STATE_CREATE_INFO_NV = 1000250001, VK_STRUCTURE_TYPE_FRAMEBUFFER_MIXED_SAMPLES_COMBINATION_NV = 1000250002, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_INTERLOCK_FEATURES_EXT = 1000251000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_YCBCR_IMAGE_ARRAYS_FEATURES_EXT = 1000252000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROVOKING_VERTEX_FEATURES_EXT = 1000254000, VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_PROVOKING_VERTEX_STATE_CREATE_INFO_EXT = 1000254001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROVOKING_VERTEX_PROPERTIES_EXT = 1000254002, VK_STRUCTURE_TYPE_SURFACE_FULL_SCREEN_EXCLUSIVE_INFO_EXT = 1000255000, VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_FULL_SCREEN_EXCLUSIVE_EXT = 1000255002, VK_STRUCTURE_TYPE_SURFACE_FULL_SCREEN_EXCLUSIVE_WIN32_INFO_EXT = 1000255001, VK_STRUCTURE_TYPE_HEADLESS_SURFACE_CREATE_INFO_EXT = 1000256000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_FEATURES_EXT = 1000260000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_FEATURES_EXT = 1000267000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_EXECUTABLE_PROPERTIES_FEATURES_KHR = 1000269000, VK_STRUCTURE_TYPE_PIPELINE_INFO_KHR = 1000269001, VK_STRUCTURE_TYPE_PIPELINE_EXECUTABLE_PROPERTIES_KHR = 1000269002, VK_STRUCTURE_TYPE_PIPELINE_EXECUTABLE_INFO_KHR = 1000269003, VK_STRUCTURE_TYPE_PIPELINE_EXECUTABLE_STATISTIC_KHR = 1000269004, VK_STRUCTURE_TYPE_PIPELINE_EXECUTABLE_INTERNAL_REPRESENTATION_KHR = 1000269005, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAP_MEMORY_PLACED_FEATURES_EXT = 1000272000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAP_MEMORY_PLACED_PROPERTIES_EXT = 1000272001, VK_STRUCTURE_TYPE_MEMORY_MAP_PLACED_INFO_EXT = 1000272002, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_2_FEATURES_EXT = 1000273000, VK_STRUCTURE_TYPE_SURFACE_PRESENT_MODE_EXT = 1000274000, VK_STRUCTURE_TYPE_SURFACE_PRESENT_SCALING_CAPABILITIES_EXT = 1000274001, VK_STRUCTURE_TYPE_SURFACE_PRESENT_MODE_COMPATIBILITY_EXT = 1000274002, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SWAPCHAIN_MAINTENANCE_1_FEATURES_EXT = 1000275000, VK_STRUCTURE_TYPE_SWAPCHAIN_PRESENT_FENCE_INFO_EXT = 1000275001, VK_STRUCTURE_TYPE_SWAPCHAIN_PRESENT_MODES_CREATE_INFO_EXT = 1000275002, VK_STRUCTURE_TYPE_SWAPCHAIN_PRESENT_MODE_INFO_EXT = 1000275003, VK_STRUCTURE_TYPE_SWAPCHAIN_PRESENT_SCALING_CREATE_INFO_EXT = 1000275004, VK_STRUCTURE_TYPE_RELEASE_SWAPCHAIN_IMAGES_INFO_EXT = 1000275005, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_GENERATED_COMMANDS_PROPERTIES_NV = 1000277000, VK_STRUCTURE_TYPE_GRAPHICS_SHADER_GROUP_CREATE_INFO_NV = 1000277001, VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_SHADER_GROUPS_CREATE_INFO_NV = 1000277002, VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_TOKEN_NV = 1000277003, VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_NV = 1000277004, VK_STRUCTURE_TYPE_GENERATED_COMMANDS_INFO_NV = 1000277005, VK_STRUCTURE_TYPE_GENERATED_COMMANDS_MEMORY_REQUIREMENTS_INFO_NV = 1000277006, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_GENERATED_COMMANDS_FEATURES_NV = 1000277007, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INHERITED_VIEWPORT_SCISSOR_FEATURES_NV = 1000278000, VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_VIEWPORT_SCISSOR_INFO_NV = 1000278001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_FEATURES_EXT = 1000281000, VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_RENDER_PASS_TRANSFORM_INFO_QCOM = 1000282000, VK_STRUCTURE_TYPE_RENDER_PASS_TRANSFORM_BEGIN_INFO_QCOM = 1000282001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_BIAS_CONTROL_FEATURES_EXT = 1000283000, VK_STRUCTURE_TYPE_DEPTH_BIAS_INFO_EXT = 1000283001, VK_STRUCTURE_TYPE_DEPTH_BIAS_REPRESENTATION_INFO_EXT = 1000283002, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_MEMORY_REPORT_FEATURES_EXT = 1000284000, VK_STRUCTURE_TYPE_DEVICE_DEVICE_MEMORY_REPORT_CREATE_INFO_EXT = 1000284001, VK_STRUCTURE_TYPE_DEVICE_MEMORY_REPORT_CALLBACK_DATA_EXT = 1000284002, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ROBUSTNESS_2_FEATURES_EXT = 1000286000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ROBUSTNESS_2_PROPERTIES_EXT = 1000286001, VK_STRUCTURE_TYPE_SAMPLER_CUSTOM_BORDER_COLOR_CREATE_INFO_EXT = 1000287000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_PROPERTIES_EXT = 1000287001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_FEATURES_EXT = 1000287002, VK_STRUCTURE_TYPE_PIPELINE_LIBRARY_CREATE_INFO_KHR = 1000290000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_BARRIER_FEATURES_NV = 1000292000, VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_PRESENT_BARRIER_NV = 1000292001, VK_STRUCTURE_TYPE_SWAPCHAIN_PRESENT_BARRIER_CREATE_INFO_NV = 1000292002, VK_STRUCTURE_TYPE_PRESENT_ID_KHR = 1000294000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_ID_FEATURES_KHR = 1000294001, VK_STRUCTURE_TYPE_VIDEO_ENCODE_INFO_KHR = 1000299000, VK_STRUCTURE_TYPE_VIDEO_ENCODE_RATE_CONTROL_INFO_KHR = 1000299001, VK_STRUCTURE_TYPE_VIDEO_ENCODE_RATE_CONTROL_LAYER_INFO_KHR = 1000299002, VK_STRUCTURE_TYPE_VIDEO_ENCODE_CAPABILITIES_KHR = 1000299003, VK_STRUCTURE_TYPE_VIDEO_ENCODE_USAGE_INFO_KHR = 1000299004, VK_STRUCTURE_TYPE_QUERY_POOL_VIDEO_ENCODE_FEEDBACK_CREATE_INFO_KHR = 1000299005, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VIDEO_ENCODE_QUALITY_LEVEL_INFO_KHR = 1000299006, VK_STRUCTURE_TYPE_VIDEO_ENCODE_QUALITY_LEVEL_PROPERTIES_KHR = 1000299007, VK_STRUCTURE_TYPE_VIDEO_ENCODE_QUALITY_LEVEL_INFO_KHR = 1000299008, VK_STRUCTURE_TYPE_VIDEO_ENCODE_SESSION_PARAMETERS_GET_INFO_KHR = 1000299009, VK_STRUCTURE_TYPE_VIDEO_ENCODE_SESSION_PARAMETERS_FEEDBACK_INFO_KHR = 1000299010, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DIAGNOSTICS_CONFIG_FEATURES_NV = 1000300000, VK_STRUCTURE_TYPE_DEVICE_DIAGNOSTICS_CONFIG_CREATE_INFO_NV = 1000300001, VK_STRUCTURE_TYPE_CUDA_MODULE_CREATE_INFO_NV = 1000307000, VK_STRUCTURE_TYPE_CUDA_FUNCTION_CREATE_INFO_NV = 1000307001, VK_STRUCTURE_TYPE_CUDA_LAUNCH_INFO_NV = 1000307002, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUDA_KERNEL_LAUNCH_FEATURES_NV = 1000307003, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUDA_KERNEL_LAUNCH_PROPERTIES_NV = 1000307004, VK_STRUCTURE_TYPE_QUERY_LOW_LATENCY_SUPPORT_NV = 1000310000, VK_STRUCTURE_TYPE_EXPORT_METAL_OBJECT_CREATE_INFO_EXT = 1000311000, VK_STRUCTURE_TYPE_EXPORT_METAL_OBJECTS_INFO_EXT = 1000311001, VK_STRUCTURE_TYPE_EXPORT_METAL_DEVICE_INFO_EXT = 1000311002, VK_STRUCTURE_TYPE_EXPORT_METAL_COMMAND_QUEUE_INFO_EXT = 1000311003, VK_STRUCTURE_TYPE_EXPORT_METAL_BUFFER_INFO_EXT = 1000311004, VK_STRUCTURE_TYPE_IMPORT_METAL_BUFFER_INFO_EXT = 1000311005, VK_STRUCTURE_TYPE_EXPORT_METAL_TEXTURE_INFO_EXT = 1000311006, VK_STRUCTURE_TYPE_IMPORT_METAL_TEXTURE_INFO_EXT = 1000311007, VK_STRUCTURE_TYPE_EXPORT_METAL_IO_SURFACE_INFO_EXT = 1000311008, VK_STRUCTURE_TYPE_IMPORT_METAL_IO_SURFACE_INFO_EXT = 1000311009, VK_STRUCTURE_TYPE_EXPORT_METAL_SHARED_EVENT_INFO_EXT = 1000311010, VK_STRUCTURE_TYPE_IMPORT_METAL_SHARED_EVENT_INFO_EXT = 1000311011, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_BUFFER_PROPERTIES_EXT = 1000316000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_BUFFER_DENSITY_MAP_PROPERTIES_EXT = 1000316001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_BUFFER_FEATURES_EXT = 1000316002, VK_STRUCTURE_TYPE_DESCRIPTOR_ADDRESS_INFO_EXT = 1000316003, VK_STRUCTURE_TYPE_DESCRIPTOR_GET_INFO_EXT = 1000316004, VK_STRUCTURE_TYPE_BUFFER_CAPTURE_DESCRIPTOR_DATA_INFO_EXT = 1000316005, VK_STRUCTURE_TYPE_IMAGE_CAPTURE_DESCRIPTOR_DATA_INFO_EXT = 1000316006, VK_STRUCTURE_TYPE_IMAGE_VIEW_CAPTURE_DESCRIPTOR_DATA_INFO_EXT = 1000316007, VK_STRUCTURE_TYPE_SAMPLER_CAPTURE_DESCRIPTOR_DATA_INFO_EXT = 1000316008, VK_STRUCTURE_TYPE_OPAQUE_CAPTURE_DESCRIPTOR_DATA_CREATE_INFO_EXT = 1000316010, VK_STRUCTURE_TYPE_DESCRIPTOR_BUFFER_BINDING_INFO_EXT = 1000316011, VK_STRUCTURE_TYPE_DESCRIPTOR_BUFFER_BINDING_PUSH_DESCRIPTOR_BUFFER_HANDLE_EXT = 1000316012, VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_CAPTURE_DESCRIPTOR_DATA_INFO_EXT = 1000316009, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GRAPHICS_PIPELINE_LIBRARY_FEATURES_EXT = 1000320000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GRAPHICS_PIPELINE_LIBRARY_PROPERTIES_EXT = 1000320001, VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_LIBRARY_CREATE_INFO_EXT = 1000320002, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_EARLY_AND_LATE_FRAGMENT_TESTS_FEATURES_AMD = 1000321000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_FEATURES_KHR = 1000203000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_PROPERTIES_KHR = 1000322000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_UNIFORM_CONTROL_FLOW_FEATURES_KHR = 1000323000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_ENUMS_PROPERTIES_NV = 1000326000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_ENUMS_FEATURES_NV = 1000326001, VK_STRUCTURE_TYPE_PIPELINE_FRAGMENT_SHADING_RATE_ENUM_STATE_CREATE_INFO_NV = 1000326002, VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_MOTION_TRIANGLES_DATA_NV = 1000327000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_MOTION_BLUR_FEATURES_NV = 1000327001, VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_MOTION_INFO_NV = 1000327002, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_FEATURES_EXT = 1000328000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_PROPERTIES_EXT = 1000328001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_YCBCR_2_PLANE_444_FORMATS_FEATURES_EXT = 1000330000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_2_FEATURES_EXT = 1000332000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_2_PROPERTIES_EXT = 1000332001, VK_STRUCTURE_TYPE_COPY_COMMAND_TRANSFORM_INFO_QCOM = 1000333000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_WORKGROUP_MEMORY_EXPLICIT_LAYOUT_FEATURES_KHR = 1000336000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_COMPRESSION_CONTROL_FEATURES_EXT = 1000338000, VK_STRUCTURE_TYPE_IMAGE_COMPRESSION_CONTROL_EXT = 1000338001, VK_STRUCTURE_TYPE_IMAGE_COMPRESSION_PROPERTIES_EXT = 1000338004, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ATTACHMENT_FEEDBACK_LOOP_LAYOUT_FEATURES_EXT = 1000339000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_4444_FORMATS_FEATURES_EXT = 1000340000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FAULT_FEATURES_EXT = 1000341000, VK_STRUCTURE_TYPE_DEVICE_FAULT_COUNTS_EXT = 1000341001, VK_STRUCTURE_TYPE_DEVICE_FAULT_INFO_EXT = 1000341002, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RGBA10X6_FORMATS_FEATURES_EXT = 1000344000, VK_STRUCTURE_TYPE_DIRECTFB_SURFACE_CREATE_INFO_EXT = 1000346000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_INPUT_DYNAMIC_STATE_FEATURES_EXT = 1000352000, VK_STRUCTURE_TYPE_VERTEX_INPUT_BINDING_DESCRIPTION_2_EXT = 1000352001, VK_STRUCTURE_TYPE_VERTEX_INPUT_ATTRIBUTE_DESCRIPTION_2_EXT = 1000352002, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRM_PROPERTIES_EXT = 1000353000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ADDRESS_BINDING_REPORT_FEATURES_EXT = 1000354000, VK_STRUCTURE_TYPE_DEVICE_ADDRESS_BINDING_CALLBACK_DATA_EXT = 1000354001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLIP_CONTROL_FEATURES_EXT = 1000355000, VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_DEPTH_CLIP_CONTROL_CREATE_INFO_EXT = 1000355001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIMITIVE_TOPOLOGY_LIST_RESTART_FEATURES_EXT = 1000356000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_MODE_FIFO_LATEST_READY_FEATURES_EXT = 1000361000, VK_STRUCTURE_TYPE_IMPORT_MEMORY_ZIRCON_HANDLE_INFO_FUCHSIA = 1000364000, VK_STRUCTURE_TYPE_MEMORY_ZIRCON_HANDLE_PROPERTIES_FUCHSIA = 1000364001, VK_STRUCTURE_TYPE_MEMORY_GET_ZIRCON_HANDLE_INFO_FUCHSIA = 1000364002, VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_ZIRCON_HANDLE_INFO_FUCHSIA = 1000365000, VK_STRUCTURE_TYPE_SEMAPHORE_GET_ZIRCON_HANDLE_INFO_FUCHSIA = 1000365001, VK_STRUCTURE_TYPE_BUFFER_COLLECTION_CREATE_INFO_FUCHSIA = 1000366000, VK_STRUCTURE_TYPE_IMPORT_MEMORY_BUFFER_COLLECTION_FUCHSIA = 1000366001, VK_STRUCTURE_TYPE_BUFFER_COLLECTION_IMAGE_CREATE_INFO_FUCHSIA = 1000366002, VK_STRUCTURE_TYPE_BUFFER_COLLECTION_PROPERTIES_FUCHSIA = 1000366003, VK_STRUCTURE_TYPE_BUFFER_CONSTRAINTS_INFO_FUCHSIA = 1000366004, VK_STRUCTURE_TYPE_BUFFER_COLLECTION_BUFFER_CREATE_INFO_FUCHSIA = 1000366005, VK_STRUCTURE_TYPE_IMAGE_CONSTRAINTS_INFO_FUCHSIA = 1000366006, VK_STRUCTURE_TYPE_IMAGE_FORMAT_CONSTRAINTS_INFO_FUCHSIA = 1000366007, VK_STRUCTURE_TYPE_SYSMEM_COLOR_SPACE_FUCHSIA = 1000366008, VK_STRUCTURE_TYPE_BUFFER_COLLECTION_CONSTRAINTS_INFO_FUCHSIA = 1000366009, VK_STRUCTURE_TYPE_SUBPASS_SHADING_PIPELINE_CREATE_INFO_HUAWEI = 1000369000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBPASS_SHADING_FEATURES_HUAWEI = 1000369001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBPASS_SHADING_PROPERTIES_HUAWEI = 1000369002, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INVOCATION_MASK_FEATURES_HUAWEI = 1000370000, VK_STRUCTURE_TYPE_MEMORY_GET_REMOTE_ADDRESS_INFO_NV = 1000371000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_MEMORY_RDMA_FEATURES_NV = 1000371001, VK_STRUCTURE_TYPE_PIPELINE_PROPERTIES_IDENTIFIER_EXT = 1000372000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_PROPERTIES_FEATURES_EXT = 1000372001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAME_BOUNDARY_FEATURES_EXT = 1000375000, VK_STRUCTURE_TYPE_FRAME_BOUNDARY_EXT = 1000375001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_FEATURES_EXT = 1000376000, VK_STRUCTURE_TYPE_SUBPASS_RESOLVE_PERFORMANCE_QUERY_EXT = 1000376001, VK_STRUCTURE_TYPE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_INFO_EXT = 1000376002, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_2_FEATURES_EXT = 1000377000, VK_STRUCTURE_TYPE_SCREEN_SURFACE_CREATE_INFO_QNX = 1000378000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COLOR_WRITE_ENABLE_FEATURES_EXT = 1000381000, VK_STRUCTURE_TYPE_PIPELINE_COLOR_WRITE_CREATE_INFO_EXT = 1000381001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIMITIVES_GENERATED_QUERY_FEATURES_EXT = 1000382000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_MAINTENANCE_1_FEATURES_KHR = 1000386000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_VIEW_MIN_LOD_FEATURES_EXT = 1000391000, VK_STRUCTURE_TYPE_IMAGE_VIEW_MIN_LOD_CREATE_INFO_EXT = 1000391001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTI_DRAW_FEATURES_EXT = 1000392000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTI_DRAW_PROPERTIES_EXT = 1000392001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_2D_VIEW_OF_3D_FEATURES_EXT = 1000393000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_TILE_IMAGE_FEATURES_EXT = 1000395000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_TILE_IMAGE_PROPERTIES_EXT = 1000395001, VK_STRUCTURE_TYPE_MICROMAP_BUILD_INFO_EXT = 1000396000, VK_STRUCTURE_TYPE_MICROMAP_VERSION_INFO_EXT = 1000396001, VK_STRUCTURE_TYPE_COPY_MICROMAP_INFO_EXT = 1000396002, VK_STRUCTURE_TYPE_COPY_MICROMAP_TO_MEMORY_INFO_EXT = 1000396003, VK_STRUCTURE_TYPE_COPY_MEMORY_TO_MICROMAP_INFO_EXT = 1000396004, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_OPACITY_MICROMAP_FEATURES_EXT = 1000396005, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_OPACITY_MICROMAP_PROPERTIES_EXT = 1000396006, VK_STRUCTURE_TYPE_MICROMAP_CREATE_INFO_EXT = 1000396007, VK_STRUCTURE_TYPE_MICROMAP_BUILD_SIZES_INFO_EXT = 1000396008, VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_TRIANGLES_OPACITY_MICROMAP_EXT = 1000396009, #ifdef VK_ENABLE_BETA_EXTENSIONS VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DISPLACEMENT_MICROMAP_FEATURES_NV = 1000397000, #endif #ifdef VK_ENABLE_BETA_EXTENSIONS VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DISPLACEMENT_MICROMAP_PROPERTIES_NV = 1000397001, #endif #ifdef VK_ENABLE_BETA_EXTENSIONS VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_TRIANGLES_DISPLACEMENT_MICROMAP_NV = 1000397002, #endif VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CLUSTER_CULLING_SHADER_FEATURES_HUAWEI = 1000404000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CLUSTER_CULLING_SHADER_PROPERTIES_HUAWEI = 1000404001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CLUSTER_CULLING_SHADER_VRS_FEATURES_HUAWEI = 1000404002, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BORDER_COLOR_SWIZZLE_FEATURES_EXT = 1000411000, VK_STRUCTURE_TYPE_SAMPLER_BORDER_COLOR_COMPONENT_MAPPING_CREATE_INFO_EXT = 1000411001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PAGEABLE_DEVICE_LOCAL_MEMORY_FEATURES_EXT = 1000412000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_ARM = 1000415000, VK_STRUCTURE_TYPE_DEVICE_QUEUE_SHADER_CORE_CONTROL_CREATE_INFO_ARM = 1000417000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCHEDULING_CONTROLS_FEATURES_ARM = 1000417001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCHEDULING_CONTROLS_PROPERTIES_ARM = 1000417002, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_SLICED_VIEW_OF_3D_FEATURES_EXT = 1000418000, VK_STRUCTURE_TYPE_IMAGE_VIEW_SLICED_CREATE_INFO_EXT = 1000418001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_SET_HOST_MAPPING_FEATURES_VALVE = 1000420000, VK_STRUCTURE_TYPE_DESCRIPTOR_SET_BINDING_REFERENCE_VALVE = 1000420001, VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_HOST_MAPPING_INFO_VALVE = 1000420002, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_NON_SEAMLESS_CUBE_MAP_FEATURES_EXT = 1000422000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RENDER_PASS_STRIPED_FEATURES_ARM = 1000424000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RENDER_PASS_STRIPED_PROPERTIES_ARM = 1000424001, VK_STRUCTURE_TYPE_RENDER_PASS_STRIPE_BEGIN_INFO_ARM = 1000424002, VK_STRUCTURE_TYPE_RENDER_PASS_STRIPE_INFO_ARM = 1000424003, VK_STRUCTURE_TYPE_RENDER_PASS_STRIPE_SUBMIT_INFO_ARM = 1000424004, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_OFFSET_FEATURES_QCOM = 1000425000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_OFFSET_PROPERTIES_QCOM = 1000425001, VK_STRUCTURE_TYPE_SUBPASS_FRAGMENT_DENSITY_MAP_OFFSET_END_INFO_QCOM = 1000425002, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COPY_MEMORY_INDIRECT_FEATURES_NV = 1000426000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COPY_MEMORY_INDIRECT_PROPERTIES_NV = 1000426001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_DECOMPRESSION_FEATURES_NV = 1000427000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_DECOMPRESSION_PROPERTIES_NV = 1000427001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_GENERATED_COMMANDS_COMPUTE_FEATURES_NV = 1000428000, VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_INDIRECT_BUFFER_INFO_NV = 1000428001, VK_STRUCTURE_TYPE_PIPELINE_INDIRECT_DEVICE_ADDRESS_INFO_NV = 1000428002, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_LINEAR_SWEPT_SPHERES_FEATURES_NV = 1000429008, VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_LINEAR_SWEPT_SPHERES_DATA_NV = 1000429009, VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_SPHERES_DATA_NV = 1000429010, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINEAR_COLOR_ATTACHMENT_FEATURES_NV = 1000430000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_MAXIMAL_RECONVERGENCE_FEATURES_KHR = 1000434000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_COMPRESSION_CONTROL_SWAPCHAIN_FEATURES_EXT = 1000437000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_PROCESSING_FEATURES_QCOM = 1000440000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_PROCESSING_PROPERTIES_QCOM = 1000440001, VK_STRUCTURE_TYPE_IMAGE_VIEW_SAMPLE_WEIGHT_CREATE_INFO_QCOM = 1000440002, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_NESTED_COMMAND_BUFFER_FEATURES_EXT = 1000451000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_NESTED_COMMAND_BUFFER_PROPERTIES_EXT = 1000451001, VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_ACQUIRE_UNMODIFIED_EXT = 1000453000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_3_FEATURES_EXT = 1000455000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_3_PROPERTIES_EXT = 1000455001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBPASS_MERGE_FEEDBACK_FEATURES_EXT = 1000458000, VK_STRUCTURE_TYPE_RENDER_PASS_CREATION_CONTROL_EXT = 1000458001, VK_STRUCTURE_TYPE_RENDER_PASS_CREATION_FEEDBACK_CREATE_INFO_EXT = 1000458002, VK_STRUCTURE_TYPE_RENDER_PASS_SUBPASS_FEEDBACK_CREATE_INFO_EXT = 1000458003, VK_STRUCTURE_TYPE_DIRECT_DRIVER_LOADING_INFO_LUNARG = 1000459000, VK_STRUCTURE_TYPE_DIRECT_DRIVER_LOADING_LIST_LUNARG = 1000459001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_MODULE_IDENTIFIER_FEATURES_EXT = 1000462000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_MODULE_IDENTIFIER_PROPERTIES_EXT = 1000462001, VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_MODULE_IDENTIFIER_CREATE_INFO_EXT = 1000462002, VK_STRUCTURE_TYPE_SHADER_MODULE_IDENTIFIER_EXT = 1000462003, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_FEATURES_EXT = 1000342000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_OPTICAL_FLOW_FEATURES_NV = 1000464000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_OPTICAL_FLOW_PROPERTIES_NV = 1000464001, VK_STRUCTURE_TYPE_OPTICAL_FLOW_IMAGE_FORMAT_INFO_NV = 1000464002, VK_STRUCTURE_TYPE_OPTICAL_FLOW_IMAGE_FORMAT_PROPERTIES_NV = 1000464003, VK_STRUCTURE_TYPE_OPTICAL_FLOW_SESSION_CREATE_INFO_NV = 1000464004, VK_STRUCTURE_TYPE_OPTICAL_FLOW_EXECUTE_INFO_NV = 1000464005, VK_STRUCTURE_TYPE_OPTICAL_FLOW_SESSION_CREATE_PRIVATE_DATA_INFO_NV = 1000464010, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LEGACY_DITHERING_FEATURES_EXT = 1000465000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FORMAT_RESOLVE_FEATURES_ANDROID = 1000468000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FORMAT_RESOLVE_PROPERTIES_ANDROID = 1000468001, VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_FORMAT_RESOLVE_PROPERTIES_ANDROID = 1000468002, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ANTI_LAG_FEATURES_AMD = 1000476000, VK_STRUCTURE_TYPE_ANTI_LAG_DATA_AMD = 1000476001, VK_STRUCTURE_TYPE_ANTI_LAG_PRESENTATION_INFO_AMD = 1000476002, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_POSITION_FETCH_FEATURES_KHR = 1000481000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_OBJECT_FEATURES_EXT = 1000482000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_OBJECT_PROPERTIES_EXT = 1000482001, VK_STRUCTURE_TYPE_SHADER_CREATE_INFO_EXT = 1000482002, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_BINARY_FEATURES_KHR = 1000483000, VK_STRUCTURE_TYPE_PIPELINE_BINARY_CREATE_INFO_KHR = 1000483001, VK_STRUCTURE_TYPE_PIPELINE_BINARY_INFO_KHR = 1000483002, VK_STRUCTURE_TYPE_PIPELINE_BINARY_KEY_KHR = 1000483003, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_BINARY_PROPERTIES_KHR = 1000483004, VK_STRUCTURE_TYPE_RELEASE_CAPTURED_PIPELINE_DATA_INFO_KHR = 1000483005, VK_STRUCTURE_TYPE_PIPELINE_BINARY_DATA_INFO_KHR = 1000483006, VK_STRUCTURE_TYPE_PIPELINE_CREATE_INFO_KHR = 1000483007, VK_STRUCTURE_TYPE_DEVICE_PIPELINE_BINARY_INTERNAL_CACHE_CONTROL_KHR = 1000483008, VK_STRUCTURE_TYPE_PIPELINE_BINARY_HANDLES_INFO_KHR = 1000483009, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TILE_PROPERTIES_FEATURES_QCOM = 1000484000, VK_STRUCTURE_TYPE_TILE_PROPERTIES_QCOM = 1000484001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_AMIGO_PROFILING_FEATURES_SEC = 1000485000, VK_STRUCTURE_TYPE_AMIGO_PROFILING_SUBMIT_INFO_SEC = 1000485001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_VIEWPORTS_FEATURES_QCOM = 1000488000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_INVOCATION_REORDER_FEATURES_NV = 1000490000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_INVOCATION_REORDER_PROPERTIES_NV = 1000490001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_VECTOR_FEATURES_NV = 1000491000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_VECTOR_PROPERTIES_NV = 1000491001, VK_STRUCTURE_TYPE_COOPERATIVE_VECTOR_PROPERTIES_NV = 1000491002, VK_STRUCTURE_TYPE_CONVERT_COOPERATIVE_VECTOR_MATRIX_INFO_NV = 1000491004, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_SPARSE_ADDRESS_SPACE_FEATURES_NV = 1000492000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_SPARSE_ADDRESS_SPACE_PROPERTIES_NV = 1000492001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MUTABLE_DESCRIPTOR_TYPE_FEATURES_EXT = 1000351000, VK_STRUCTURE_TYPE_MUTABLE_DESCRIPTOR_TYPE_CREATE_INFO_EXT = 1000351002, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LEGACY_VERTEX_ATTRIBUTES_FEATURES_EXT = 1000495000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LEGACY_VERTEX_ATTRIBUTES_PROPERTIES_EXT = 1000495001, VK_STRUCTURE_TYPE_LAYER_SETTINGS_CREATE_INFO_EXT = 1000496000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CORE_BUILTINS_FEATURES_ARM = 1000497000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CORE_BUILTINS_PROPERTIES_ARM = 1000497001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_LIBRARY_GROUP_HANDLES_FEATURES_EXT = 1000498000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_UNUSED_ATTACHMENTS_FEATURES_EXT = 1000499000, VK_STRUCTURE_TYPE_LATENCY_SLEEP_MODE_INFO_NV = 1000505000, VK_STRUCTURE_TYPE_LATENCY_SLEEP_INFO_NV = 1000505001, VK_STRUCTURE_TYPE_SET_LATENCY_MARKER_INFO_NV = 1000505002, VK_STRUCTURE_TYPE_GET_LATENCY_MARKER_INFO_NV = 1000505003, VK_STRUCTURE_TYPE_LATENCY_TIMINGS_FRAME_REPORT_NV = 1000505004, VK_STRUCTURE_TYPE_LATENCY_SUBMISSION_PRESENT_ID_NV = 1000505005, VK_STRUCTURE_TYPE_OUT_OF_BAND_QUEUE_TYPE_INFO_NV = 1000505006, VK_STRUCTURE_TYPE_SWAPCHAIN_LATENCY_CREATE_INFO_NV = 1000505007, VK_STRUCTURE_TYPE_LATENCY_SURFACE_CAPABILITIES_NV = 1000505008, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_FEATURES_KHR = 1000506000, VK_STRUCTURE_TYPE_COOPERATIVE_MATRIX_PROPERTIES_KHR = 1000506001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_PROPERTIES_KHR = 1000506002, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_RENDER_AREAS_FEATURES_QCOM = 1000510000, VK_STRUCTURE_TYPE_MULTIVIEW_PER_VIEW_RENDER_AREAS_RENDER_PASS_BEGIN_INFO_QCOM = 1000510001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_FEATURES_KHR = 1000201000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_PROPERTIES_KHR = 1000511000, VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_CAPABILITIES_KHR = 1000512000, VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_PICTURE_INFO_KHR = 1000512001, VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_PROFILE_INFO_KHR = 1000512003, VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_SESSION_PARAMETERS_CREATE_INFO_KHR = 1000512004, VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_DPB_SLOT_INFO_KHR = 1000512005, VK_STRUCTURE_TYPE_VIDEO_ENCODE_AV1_CAPABILITIES_KHR = 1000513000, VK_STRUCTURE_TYPE_VIDEO_ENCODE_AV1_SESSION_PARAMETERS_CREATE_INFO_KHR = 1000513001, VK_STRUCTURE_TYPE_VIDEO_ENCODE_AV1_PICTURE_INFO_KHR = 1000513002, VK_STRUCTURE_TYPE_VIDEO_ENCODE_AV1_DPB_SLOT_INFO_KHR = 1000513003, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VIDEO_ENCODE_AV1_FEATURES_KHR = 1000513004, VK_STRUCTURE_TYPE_VIDEO_ENCODE_AV1_PROFILE_INFO_KHR = 1000513005, VK_STRUCTURE_TYPE_VIDEO_ENCODE_AV1_RATE_CONTROL_INFO_KHR = 1000513006, VK_STRUCTURE_TYPE_VIDEO_ENCODE_AV1_RATE_CONTROL_LAYER_INFO_KHR = 1000513007, VK_STRUCTURE_TYPE_VIDEO_ENCODE_AV1_QUALITY_LEVEL_PROPERTIES_KHR = 1000513008, VK_STRUCTURE_TYPE_VIDEO_ENCODE_AV1_SESSION_CREATE_INFO_KHR = 1000513009, VK_STRUCTURE_TYPE_VIDEO_ENCODE_AV1_GOP_REMAINING_FRAME_INFO_KHR = 1000513010, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VIDEO_MAINTENANCE_1_FEATURES_KHR = 1000515000, VK_STRUCTURE_TYPE_VIDEO_INLINE_QUERY_INFO_KHR = 1000515001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PER_STAGE_DESCRIPTOR_SET_FEATURES_NV = 1000516000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_PROCESSING_2_FEATURES_QCOM = 1000518000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_PROCESSING_2_PROPERTIES_QCOM = 1000518001, VK_STRUCTURE_TYPE_SAMPLER_BLOCK_MATCH_WINDOW_CREATE_INFO_QCOM = 1000518002, VK_STRUCTURE_TYPE_SAMPLER_CUBIC_WEIGHTS_CREATE_INFO_QCOM = 1000519000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUBIC_WEIGHTS_FEATURES_QCOM = 1000519001, VK_STRUCTURE_TYPE_BLIT_IMAGE_CUBIC_WEIGHTS_INFO_QCOM = 1000519002, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_YCBCR_DEGAMMA_FEATURES_QCOM = 1000520000, VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_YCBCR_DEGAMMA_CREATE_INFO_QCOM = 1000520001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUBIC_CLAMP_FEATURES_QCOM = 1000521000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ATTACHMENT_FEEDBACK_LOOP_DYNAMIC_STATE_FEATURES_EXT = 1000524000, VK_STRUCTURE_TYPE_SCREEN_BUFFER_PROPERTIES_QNX = 1000529000, VK_STRUCTURE_TYPE_SCREEN_BUFFER_FORMAT_PROPERTIES_QNX = 1000529001, VK_STRUCTURE_TYPE_IMPORT_SCREEN_BUFFER_INFO_QNX = 1000529002, VK_STRUCTURE_TYPE_EXTERNAL_FORMAT_QNX = 1000529003, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_MEMORY_SCREEN_BUFFER_FEATURES_QNX = 1000529004, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LAYERED_DRIVER_PROPERTIES_MSFT = 1000530000, VK_STRUCTURE_TYPE_CALIBRATED_TIMESTAMP_INFO_KHR = 1000184000, VK_STRUCTURE_TYPE_SET_DESCRIPTOR_BUFFER_OFFSETS_INFO_EXT = 1000545007, VK_STRUCTURE_TYPE_BIND_DESCRIPTOR_BUFFER_EMBEDDED_SAMPLERS_INFO_EXT = 1000545008, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_POOL_OVERALLOCATION_FEATURES_NV = 1000546000, VK_STRUCTURE_TYPE_DISPLAY_SURFACE_STEREO_CREATE_INFO_NV = 1000551000, VK_STRUCTURE_TYPE_DISPLAY_MODE_STEREO_PROPERTIES_NV = 1000551001, VK_STRUCTURE_TYPE_VIDEO_ENCODE_QUANTIZATION_MAP_CAPABILITIES_KHR = 1000553000, VK_STRUCTURE_TYPE_VIDEO_FORMAT_QUANTIZATION_MAP_PROPERTIES_KHR = 1000553001, VK_STRUCTURE_TYPE_VIDEO_ENCODE_QUANTIZATION_MAP_INFO_KHR = 1000553002, VK_STRUCTURE_TYPE_VIDEO_ENCODE_QUANTIZATION_MAP_SESSION_PARAMETERS_CREATE_INFO_KHR = 1000553005, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VIDEO_ENCODE_QUANTIZATION_MAP_FEATURES_KHR = 1000553009, VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_QUANTIZATION_MAP_CAPABILITIES_KHR = 1000553003, VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_QUANTIZATION_MAP_CAPABILITIES_KHR = 1000553004, VK_STRUCTURE_TYPE_VIDEO_FORMAT_H265_QUANTIZATION_MAP_PROPERTIES_KHR = 1000553006, VK_STRUCTURE_TYPE_VIDEO_ENCODE_AV1_QUANTIZATION_MAP_CAPABILITIES_KHR = 1000553007, VK_STRUCTURE_TYPE_VIDEO_FORMAT_AV1_QUANTIZATION_MAP_PROPERTIES_KHR = 1000553008, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAW_ACCESS_CHAINS_FEATURES_NV = 1000555000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_RELAXED_EXTENDED_INSTRUCTION_FEATURES_KHR = 1000558000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COMMAND_BUFFER_INHERITANCE_FEATURES_NV = 1000559000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_7_FEATURES_KHR = 1000562000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_7_PROPERTIES_KHR = 1000562001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LAYERED_API_PROPERTIES_LIST_KHR = 1000562002, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LAYERED_API_PROPERTIES_KHR = 1000562003, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LAYERED_API_VULKAN_PROPERTIES_KHR = 1000562004, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT16_VECTOR_FEATURES_NV = 1000563000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_REPLICATED_COMPOSITES_FEATURES_EXT = 1000564000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_VALIDATION_FEATURES_NV = 1000568000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CLUSTER_ACCELERATION_STRUCTURE_FEATURES_NV = 1000569000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CLUSTER_ACCELERATION_STRUCTURE_PROPERTIES_NV = 1000569001, VK_STRUCTURE_TYPE_CLUSTER_ACCELERATION_STRUCTURE_CLUSTERS_BOTTOM_LEVEL_INPUT_NV = 1000569002, VK_STRUCTURE_TYPE_CLUSTER_ACCELERATION_STRUCTURE_TRIANGLE_CLUSTER_INPUT_NV = 1000569003, VK_STRUCTURE_TYPE_CLUSTER_ACCELERATION_STRUCTURE_MOVE_OBJECTS_INPUT_NV = 1000569004, VK_STRUCTURE_TYPE_CLUSTER_ACCELERATION_STRUCTURE_INPUT_INFO_NV = 1000569005, VK_STRUCTURE_TYPE_CLUSTER_ACCELERATION_STRUCTURE_COMMANDS_INFO_NV = 1000569006, VK_STRUCTURE_TYPE_RAY_TRACING_PIPELINE_CLUSTER_ACCELERATION_STRUCTURE_CREATE_INFO_NV = 1000569007, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PARTITIONED_ACCELERATION_STRUCTURE_FEATURES_NV = 1000570000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PARTITIONED_ACCELERATION_STRUCTURE_PROPERTIES_NV = 1000570001, VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_PARTITIONED_ACCELERATION_STRUCTURE_NV = 1000570002, VK_STRUCTURE_TYPE_PARTITIONED_ACCELERATION_STRUCTURE_INSTANCES_INPUT_NV = 1000570003, VK_STRUCTURE_TYPE_BUILD_PARTITIONED_ACCELERATION_STRUCTURE_INFO_NV = 1000570004, VK_STRUCTURE_TYPE_PARTITIONED_ACCELERATION_STRUCTURE_FLAGS_NV = 1000570005, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_GENERATED_COMMANDS_FEATURES_EXT = 1000572000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_GENERATED_COMMANDS_PROPERTIES_EXT = 1000572001, VK_STRUCTURE_TYPE_GENERATED_COMMANDS_MEMORY_REQUIREMENTS_INFO_EXT = 1000572002, VK_STRUCTURE_TYPE_INDIRECT_EXECUTION_SET_CREATE_INFO_EXT = 1000572003, VK_STRUCTURE_TYPE_GENERATED_COMMANDS_INFO_EXT = 1000572004, VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_EXT = 1000572006, VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_TOKEN_EXT = 1000572007, VK_STRUCTURE_TYPE_WRITE_INDIRECT_EXECUTION_SET_PIPELINE_EXT = 1000572008, VK_STRUCTURE_TYPE_WRITE_INDIRECT_EXECUTION_SET_SHADER_EXT = 1000572009, VK_STRUCTURE_TYPE_INDIRECT_EXECUTION_SET_PIPELINE_INFO_EXT = 1000572010, VK_STRUCTURE_TYPE_INDIRECT_EXECUTION_SET_SHADER_INFO_EXT = 1000572011, VK_STRUCTURE_TYPE_INDIRECT_EXECUTION_SET_SHADER_LAYOUT_INFO_EXT = 1000572012, VK_STRUCTURE_TYPE_GENERATED_COMMANDS_PIPELINE_INFO_EXT = 1000572013, VK_STRUCTURE_TYPE_GENERATED_COMMANDS_SHADER_INFO_EXT = 1000572014, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_8_FEATURES_KHR = 1000574000, VK_STRUCTURE_TYPE_MEMORY_BARRIER_ACCESS_FLAGS_3_KHR = 1000574002, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_ALIGNMENT_CONTROL_FEATURES_MESA = 1000575000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_ALIGNMENT_CONTROL_PROPERTIES_MESA = 1000575001, VK_STRUCTURE_TYPE_IMAGE_ALIGNMENT_CONTROL_CREATE_INFO_MESA = 1000575002, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLAMP_CONTROL_FEATURES_EXT = 1000582000, VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_DEPTH_CLAMP_CONTROL_CREATE_INFO_EXT = 1000582001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VIDEO_MAINTENANCE_2_FEATURES_KHR = 1000586000, VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_INLINE_SESSION_PARAMETERS_INFO_KHR = 1000586001, VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_INLINE_SESSION_PARAMETERS_INFO_KHR = 1000586002, VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_INLINE_SESSION_PARAMETERS_INFO_KHR = 1000586003, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HDR_VIVID_FEATURES_HUAWEI = 1000590000, VK_STRUCTURE_TYPE_HDR_VIVID_DYNAMIC_METADATA_HUAWEI = 1000590001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_2_FEATURES_NV = 1000593000, VK_STRUCTURE_TYPE_COOPERATIVE_MATRIX_FLEXIBLE_DIMENSIONS_PROPERTIES_NV = 1000593001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_2_PROPERTIES_NV = 1000593002, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_OPACITY_MICROMAP_FEATURES_ARM = 1000596000, VK_STRUCTURE_TYPE_IMPORT_MEMORY_METAL_HANDLE_INFO_EXT = 1000602000, VK_STRUCTURE_TYPE_MEMORY_METAL_HANDLE_PROPERTIES_EXT = 1000602001, VK_STRUCTURE_TYPE_MEMORY_GET_METAL_HANDLE_INFO_EXT = 1000602002, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLAMP_ZERO_ONE_FEATURES_KHR = 1000421000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_ROBUSTNESS_FEATURES_EXT = 1000608000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTER_FEATURES = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETER_FEATURES = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETERS_FEATURES, // VK_STRUCTURE_TYPE_DEBUG_REPORT_CREATE_INFO_EXT is a deprecated alias VK_STRUCTURE_TYPE_DEBUG_REPORT_CREATE_INFO_EXT = VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT, VK_STRUCTURE_TYPE_RENDERING_INFO_KHR = VK_STRUCTURE_TYPE_RENDERING_INFO, VK_STRUCTURE_TYPE_RENDERING_ATTACHMENT_INFO_KHR = VK_STRUCTURE_TYPE_RENDERING_ATTACHMENT_INFO, VK_STRUCTURE_TYPE_PIPELINE_RENDERING_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_PIPELINE_RENDERING_CREATE_INFO, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_FEATURES, VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_RENDERING_INFO_KHR = VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_RENDERING_INFO, VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2, VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2_KHR = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2, VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2_KHR = VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2, VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2_KHR = VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2, VK_STRUCTURE_TYPE_SPARSE_IMAGE_FORMAT_PROPERTIES_2_KHR = VK_STRUCTURE_TYPE_SPARSE_IMAGE_FORMAT_PROPERTIES_2, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2, VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO_KHR = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO, VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO_KHR = VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO, VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO_KHR = VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO, VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO_KHR = VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO, VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO_KHR = VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO, VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO_KHR = VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO, VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO_KHR = VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXTURE_COMPRESSION_ASTC_HDR_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXTURE_COMPRESSION_ASTC_HDR_FEATURES, VK_STRUCTURE_TYPE_PIPELINE_ROBUSTNESS_CREATE_INFO_EXT = VK_STRUCTURE_TYPE_PIPELINE_ROBUSTNESS_CREATE_INFO, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_ROBUSTNESS_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_ROBUSTNESS_FEATURES, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_ROBUSTNESS_PROPERTIES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_ROBUSTNESS_PROPERTIES, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES, VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO, VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES_KHR = VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO, VK_STRUCTURE_TYPE_EXTERNAL_BUFFER_PROPERTIES_KHR = VK_STRUCTURE_TYPE_EXTERNAL_BUFFER_PROPERTIES, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES, VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO, VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO, VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_KHR = VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO, VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES_KHR = VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES, VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT16_INT8_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT16_INT8_FEATURES, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT16_INT8_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT16_INT8_FEATURES, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES, VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO, // VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES2_EXT is a deprecated alias VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES2_EXT = VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_EXT, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGELESS_FRAMEBUFFER_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGELESS_FRAMEBUFFER_FEATURES, VK_STRUCTURE_TYPE_FRAMEBUFFER_ATTACHMENTS_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_FRAMEBUFFER_ATTACHMENTS_CREATE_INFO, VK_STRUCTURE_TYPE_FRAMEBUFFER_ATTACHMENT_IMAGE_INFO_KHR = VK_STRUCTURE_TYPE_FRAMEBUFFER_ATTACHMENT_IMAGE_INFO, VK_STRUCTURE_TYPE_RENDER_PASS_ATTACHMENT_BEGIN_INFO_KHR = VK_STRUCTURE_TYPE_RENDER_PASS_ATTACHMENT_BEGIN_INFO, VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_2_KHR = VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_2, VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_2_KHR = VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_2, VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_2_KHR = VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_2, VK_STRUCTURE_TYPE_SUBPASS_DEPENDENCY_2_KHR = VK_STRUCTURE_TYPE_SUBPASS_DEPENDENCY_2, VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO_2_KHR = VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO_2, VK_STRUCTURE_TYPE_SUBPASS_BEGIN_INFO_KHR = VK_STRUCTURE_TYPE_SUBPASS_BEGIN_INFO, VK_STRUCTURE_TYPE_SUBPASS_END_INFO_KHR = VK_STRUCTURE_TYPE_SUBPASS_END_INFO, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FENCE_INFO_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FENCE_INFO, VK_STRUCTURE_TYPE_EXTERNAL_FENCE_PROPERTIES_KHR = VK_STRUCTURE_TYPE_EXTERNAL_FENCE_PROPERTIES, VK_STRUCTURE_TYPE_EXPORT_FENCE_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_EXPORT_FENCE_CREATE_INFO, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES, VK_STRUCTURE_TYPE_RENDER_PASS_INPUT_ATTACHMENT_ASPECT_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_RENDER_PASS_INPUT_ATTACHMENT_ASPECT_CREATE_INFO, VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO, VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTER_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES_KHR, VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS_KHR = VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS, VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO_KHR = VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_FILTER_MINMAX_PROPERTIES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_FILTER_MINMAX_PROPERTIES, VK_STRUCTURE_TYPE_SAMPLER_REDUCTION_MODE_CREATE_INFO_EXT = VK_STRUCTURE_TYPE_SAMPLER_REDUCTION_MODE_CREATE_INFO, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_FEATURES, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_PROPERTIES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_PROPERTIES, VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_INLINE_UNIFORM_BLOCK_EXT = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_INLINE_UNIFORM_BLOCK, VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_INLINE_UNIFORM_BLOCK_CREATE_INFO_EXT = VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_INLINE_UNIFORM_BLOCK_CREATE_INFO, VK_STRUCTURE_TYPE_BUFFER_MEMORY_REQUIREMENTS_INFO_2_KHR = VK_STRUCTURE_TYPE_BUFFER_MEMORY_REQUIREMENTS_INFO_2, VK_STRUCTURE_TYPE_IMAGE_MEMORY_REQUIREMENTS_INFO_2_KHR = VK_STRUCTURE_TYPE_IMAGE_MEMORY_REQUIREMENTS_INFO_2, VK_STRUCTURE_TYPE_IMAGE_SPARSE_MEMORY_REQUIREMENTS_INFO_2_KHR = VK_STRUCTURE_TYPE_IMAGE_SPARSE_MEMORY_REQUIREMENTS_INFO_2, VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2_KHR = VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2, VK_STRUCTURE_TYPE_SPARSE_IMAGE_MEMORY_REQUIREMENTS_2_KHR = VK_STRUCTURE_TYPE_SPARSE_IMAGE_MEMORY_REQUIREMENTS_2, VK_STRUCTURE_TYPE_IMAGE_FORMAT_LIST_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_IMAGE_FORMAT_LIST_CREATE_INFO, VK_STRUCTURE_TYPE_ATTACHMENT_SAMPLE_COUNT_INFO_NV = VK_STRUCTURE_TYPE_ATTACHMENT_SAMPLE_COUNT_INFO_AMD, VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_CREATE_INFO, VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO_KHR = VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO, VK_STRUCTURE_TYPE_BIND_IMAGE_PLANE_MEMORY_INFO_KHR = VK_STRUCTURE_TYPE_BIND_IMAGE_PLANE_MEMORY_INFO, VK_STRUCTURE_TYPE_IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO_KHR = VK_STRUCTURE_TYPE_IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES, VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES_KHR = VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES, VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO_KHR = VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO, VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO_KHR = VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO, VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_BINDING_FLAGS_CREATE_INFO_EXT = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_BINDING_FLAGS_CREATE_INFO, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_PROPERTIES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_PROPERTIES, VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_ALLOCATE_INFO_EXT = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_ALLOCATE_INFO, VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_LAYOUT_SUPPORT_EXT = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_LAYOUT_SUPPORT, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES, VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_SUPPORT_KHR = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_SUPPORT, VK_STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_EXT = VK_STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_EXTENDED_TYPES_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_EXTENDED_TYPES_FEATURES, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES, VK_STRUCTURE_TYPE_CALIBRATED_TIMESTAMP_INFO_EXT = VK_STRUCTURE_TYPE_CALIBRATED_TIMESTAMP_INFO_KHR, VK_STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GLOBAL_PRIORITY_QUERY_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GLOBAL_PRIORITY_QUERY_FEATURES, VK_STRUCTURE_TYPE_QUEUE_FAMILY_GLOBAL_PRIORITY_PROPERTIES_KHR = VK_STRUCTURE_TYPE_QUEUE_FAMILY_GLOBAL_PRIORITY_PROPERTIES, VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO_EXT = VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES, VK_STRUCTURE_TYPE_PIPELINE_CREATION_FEEDBACK_CREATE_INFO_EXT = VK_STRUCTURE_TYPE_PIPELINE_CREATION_FEEDBACK_CREATE_INFO, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT_CONTROLS_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT_CONTROLS_PROPERTIES, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_STENCIL_RESOLVE_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_STENCIL_RESOLVE_PROPERTIES, VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_DEPTH_STENCIL_RESOLVE_KHR = VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_DEPTH_STENCIL_RESOLVE, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_FEATURES_NV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_FEATURES_KHR, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_FEATURES_NV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_FEATURES_KHR, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_FEATURES, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_PROPERTIES, VK_STRUCTURE_TYPE_SEMAPHORE_TYPE_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_SEMAPHORE_TYPE_CREATE_INFO, VK_STRUCTURE_TYPE_TIMELINE_SEMAPHORE_SUBMIT_INFO_KHR = VK_STRUCTURE_TYPE_TIMELINE_SEMAPHORE_SUBMIT_INFO, VK_STRUCTURE_TYPE_SEMAPHORE_WAIT_INFO_KHR = VK_STRUCTURE_TYPE_SEMAPHORE_WAIT_INFO, VK_STRUCTURE_TYPE_SEMAPHORE_SIGNAL_INFO_KHR = VK_STRUCTURE_TYPE_SEMAPHORE_SIGNAL_INFO, // VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO_INTEL is a deprecated alias VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO_INTEL = VK_STRUCTURE_TYPE_QUERY_POOL_PERFORMANCE_QUERY_CREATE_INFO_INTEL, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_MEMORY_MODEL_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_MEMORY_MODEL_FEATURES, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_TERMINATE_INVOCATION_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_TERMINATE_INVOCATION_FEATURES, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCALAR_BLOCK_LAYOUT_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCALAR_BLOCK_LAYOUT_FEATURES, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_PROPERTIES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_PROPERTIES, VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_REQUIRED_SUBGROUP_SIZE_CREATE_INFO_EXT = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_REQUIRED_SUBGROUP_SIZE_CREATE_INFO, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_FEATURES, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_LOCAL_READ_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_LOCAL_READ_FEATURES, VK_STRUCTURE_TYPE_RENDERING_ATTACHMENT_LOCATION_INFO_KHR = VK_STRUCTURE_TYPE_RENDERING_ATTACHMENT_LOCATION_INFO, VK_STRUCTURE_TYPE_RENDERING_INPUT_ATTACHMENT_INDEX_INFO_KHR = VK_STRUCTURE_TYPE_RENDERING_INPUT_ATTACHMENT_INDEX_INFO, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SEPARATE_DEPTH_STENCIL_LAYOUTS_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SEPARATE_DEPTH_STENCIL_LAYOUTS_FEATURES, VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_STENCIL_LAYOUT_KHR = VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_STENCIL_LAYOUT, VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_STENCIL_LAYOUT_KHR = VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_STENCIL_LAYOUT, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_ADDRESS_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_EXT, VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO_EXT = VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TOOL_PROPERTIES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TOOL_PROPERTIES, VK_STRUCTURE_TYPE_IMAGE_STENCIL_USAGE_CREATE_INFO_EXT = VK_STRUCTURE_TYPE_IMAGE_STENCIL_USAGE_CREATE_INFO, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_UNIFORM_BUFFER_STANDARD_LAYOUT_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_UNIFORM_BUFFER_STANDARD_LAYOUT_FEATURES, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES, VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO_KHR = VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO, VK_STRUCTURE_TYPE_BUFFER_OPAQUE_CAPTURE_ADDRESS_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_BUFFER_OPAQUE_CAPTURE_ADDRESS_CREATE_INFO, VK_STRUCTURE_TYPE_MEMORY_OPAQUE_CAPTURE_ADDRESS_ALLOCATE_INFO_KHR = VK_STRUCTURE_TYPE_MEMORY_OPAQUE_CAPTURE_ADDRESS_ALLOCATE_INFO, VK_STRUCTURE_TYPE_DEVICE_MEMORY_OPAQUE_CAPTURE_ADDRESS_INFO_KHR = VK_STRUCTURE_TYPE_DEVICE_MEMORY_OPAQUE_CAPTURE_ADDRESS_INFO, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES, VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_LINE_STATE_CREATE_INFO_EXT = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_LINE_STATE_CREATE_INFO, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_PROPERTIES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_PROPERTIES, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INDEX_TYPE_UINT8_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INDEX_TYPE_UINT8_FEATURES, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_IMAGE_COPY_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_IMAGE_COPY_FEATURES, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_IMAGE_COPY_PROPERTIES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_IMAGE_COPY_PROPERTIES, VK_STRUCTURE_TYPE_MEMORY_TO_IMAGE_COPY_EXT = VK_STRUCTURE_TYPE_MEMORY_TO_IMAGE_COPY, VK_STRUCTURE_TYPE_IMAGE_TO_MEMORY_COPY_EXT = VK_STRUCTURE_TYPE_IMAGE_TO_MEMORY_COPY, VK_STRUCTURE_TYPE_COPY_IMAGE_TO_MEMORY_INFO_EXT = VK_STRUCTURE_TYPE_COPY_IMAGE_TO_MEMORY_INFO, VK_STRUCTURE_TYPE_COPY_MEMORY_TO_IMAGE_INFO_EXT = VK_STRUCTURE_TYPE_COPY_MEMORY_TO_IMAGE_INFO, VK_STRUCTURE_TYPE_HOST_IMAGE_LAYOUT_TRANSITION_INFO_EXT = VK_STRUCTURE_TYPE_HOST_IMAGE_LAYOUT_TRANSITION_INFO, VK_STRUCTURE_TYPE_COPY_IMAGE_TO_IMAGE_INFO_EXT = VK_STRUCTURE_TYPE_COPY_IMAGE_TO_IMAGE_INFO, VK_STRUCTURE_TYPE_SUBRESOURCE_HOST_MEMCPY_SIZE_EXT = VK_STRUCTURE_TYPE_SUBRESOURCE_HOST_MEMCPY_SIZE, VK_STRUCTURE_TYPE_HOST_IMAGE_COPY_DEVICE_PERFORMANCE_QUERY_EXT = VK_STRUCTURE_TYPE_HOST_IMAGE_COPY_DEVICE_PERFORMANCE_QUERY, VK_STRUCTURE_TYPE_MEMORY_MAP_INFO_KHR = VK_STRUCTURE_TYPE_MEMORY_MAP_INFO, VK_STRUCTURE_TYPE_MEMORY_UNMAP_INFO_KHR = VK_STRUCTURE_TYPE_MEMORY_UNMAP_INFO, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DEMOTE_TO_HELPER_INVOCATION_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DEMOTE_TO_HELPER_INVOCATION_FEATURES, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_FEATURES, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_PROPERTIES, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_PROPERTIES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_PROPERTIES, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIVATE_DATA_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIVATE_DATA_FEATURES, VK_STRUCTURE_TYPE_DEVICE_PRIVATE_DATA_CREATE_INFO_EXT = VK_STRUCTURE_TYPE_DEVICE_PRIVATE_DATA_CREATE_INFO, VK_STRUCTURE_TYPE_PRIVATE_DATA_SLOT_CREATE_INFO_EXT = VK_STRUCTURE_TYPE_PRIVATE_DATA_SLOT_CREATE_INFO, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_CREATION_CACHE_CONTROL_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_CREATION_CACHE_CONTROL_FEATURES, VK_STRUCTURE_TYPE_MEMORY_BARRIER_2_KHR = VK_STRUCTURE_TYPE_MEMORY_BARRIER_2, VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER_2_KHR = VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER_2, VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER_2_KHR = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER_2, VK_STRUCTURE_TYPE_DEPENDENCY_INFO_KHR = VK_STRUCTURE_TYPE_DEPENDENCY_INFO, VK_STRUCTURE_TYPE_SUBMIT_INFO_2_KHR = VK_STRUCTURE_TYPE_SUBMIT_INFO_2, VK_STRUCTURE_TYPE_SEMAPHORE_SUBMIT_INFO_KHR = VK_STRUCTURE_TYPE_SEMAPHORE_SUBMIT_INFO, VK_STRUCTURE_TYPE_COMMAND_BUFFER_SUBMIT_INFO_KHR = VK_STRUCTURE_TYPE_COMMAND_BUFFER_SUBMIT_INFO, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SYNCHRONIZATION_2_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SYNCHRONIZATION_2_FEATURES, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ZERO_INITIALIZE_WORKGROUP_MEMORY_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ZERO_INITIALIZE_WORKGROUP_MEMORY_FEATURES, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_ROBUSTNESS_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_ROBUSTNESS_FEATURES, VK_STRUCTURE_TYPE_COPY_BUFFER_INFO_2_KHR = VK_STRUCTURE_TYPE_COPY_BUFFER_INFO_2, VK_STRUCTURE_TYPE_COPY_IMAGE_INFO_2_KHR = VK_STRUCTURE_TYPE_COPY_IMAGE_INFO_2, VK_STRUCTURE_TYPE_COPY_BUFFER_TO_IMAGE_INFO_2_KHR = VK_STRUCTURE_TYPE_COPY_BUFFER_TO_IMAGE_INFO_2, VK_STRUCTURE_TYPE_COPY_IMAGE_TO_BUFFER_INFO_2_KHR = VK_STRUCTURE_TYPE_COPY_IMAGE_TO_BUFFER_INFO_2, VK_STRUCTURE_TYPE_BLIT_IMAGE_INFO_2_KHR = VK_STRUCTURE_TYPE_BLIT_IMAGE_INFO_2, VK_STRUCTURE_TYPE_RESOLVE_IMAGE_INFO_2_KHR = VK_STRUCTURE_TYPE_RESOLVE_IMAGE_INFO_2, VK_STRUCTURE_TYPE_BUFFER_COPY_2_KHR = VK_STRUCTURE_TYPE_BUFFER_COPY_2, VK_STRUCTURE_TYPE_IMAGE_COPY_2_KHR = VK_STRUCTURE_TYPE_IMAGE_COPY_2, VK_STRUCTURE_TYPE_IMAGE_BLIT_2_KHR = VK_STRUCTURE_TYPE_IMAGE_BLIT_2, VK_STRUCTURE_TYPE_BUFFER_IMAGE_COPY_2_KHR = VK_STRUCTURE_TYPE_BUFFER_IMAGE_COPY_2, VK_STRUCTURE_TYPE_IMAGE_RESOLVE_2_KHR = VK_STRUCTURE_TYPE_IMAGE_RESOLVE_2, VK_STRUCTURE_TYPE_SUBRESOURCE_LAYOUT_2_EXT = VK_STRUCTURE_TYPE_SUBRESOURCE_LAYOUT_2, VK_STRUCTURE_TYPE_IMAGE_SUBRESOURCE_2_EXT = VK_STRUCTURE_TYPE_IMAGE_SUBRESOURCE_2, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_FEATURES_ARM = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_FEATURES_EXT, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MUTABLE_DESCRIPTOR_TYPE_FEATURES_VALVE = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MUTABLE_DESCRIPTOR_TYPE_FEATURES_EXT, VK_STRUCTURE_TYPE_MUTABLE_DESCRIPTOR_TYPE_CREATE_INFO_VALVE = VK_STRUCTURE_TYPE_MUTABLE_DESCRIPTOR_TYPE_CREATE_INFO_EXT, VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_3_KHR = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_3, VK_STRUCTURE_TYPE_PIPELINE_INFO_EXT = VK_STRUCTURE_TYPE_PIPELINE_INFO_KHR, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GLOBAL_PRIORITY_QUERY_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GLOBAL_PRIORITY_QUERY_FEATURES, VK_STRUCTURE_TYPE_QUEUE_FAMILY_GLOBAL_PRIORITY_PROPERTIES_EXT = VK_STRUCTURE_TYPE_QUEUE_FAMILY_GLOBAL_PRIORITY_PROPERTIES, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_4_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_4_FEATURES, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_4_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_4_PROPERTIES, VK_STRUCTURE_TYPE_DEVICE_BUFFER_MEMORY_REQUIREMENTS_KHR = VK_STRUCTURE_TYPE_DEVICE_BUFFER_MEMORY_REQUIREMENTS, VK_STRUCTURE_TYPE_DEVICE_IMAGE_MEMORY_REQUIREMENTS_KHR = VK_STRUCTURE_TYPE_DEVICE_IMAGE_MEMORY_REQUIREMENTS, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_ROTATE_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_ROTATE_FEATURES, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLAMP_ZERO_ONE_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLAMP_ZERO_ONE_FEATURES_KHR, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_PROTECTED_ACCESS_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_PROTECTED_ACCESS_FEATURES, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_5_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_5_FEATURES, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_5_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_5_PROPERTIES, VK_STRUCTURE_TYPE_RENDERING_AREA_INFO_KHR = VK_STRUCTURE_TYPE_RENDERING_AREA_INFO, VK_STRUCTURE_TYPE_DEVICE_IMAGE_SUBRESOURCE_INFO_KHR = VK_STRUCTURE_TYPE_DEVICE_IMAGE_SUBRESOURCE_INFO, VK_STRUCTURE_TYPE_SUBRESOURCE_LAYOUT_2_KHR = VK_STRUCTURE_TYPE_SUBRESOURCE_LAYOUT_2, VK_STRUCTURE_TYPE_IMAGE_SUBRESOURCE_2_KHR = VK_STRUCTURE_TYPE_IMAGE_SUBRESOURCE_2, VK_STRUCTURE_TYPE_PIPELINE_CREATE_FLAGS_2_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_PIPELINE_CREATE_FLAGS_2_CREATE_INFO, VK_STRUCTURE_TYPE_BUFFER_USAGE_FLAGS_2_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_BUFFER_USAGE_FLAGS_2_CREATE_INFO, VK_STRUCTURE_TYPE_SHADER_REQUIRED_SUBGROUP_SIZE_CREATE_INFO_EXT = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_REQUIRED_SUBGROUP_SIZE_CREATE_INFO, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES, VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT_CONTROLS_2_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT_CONTROLS_2_FEATURES, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INDEX_TYPE_UINT8_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INDEX_TYPE_UINT8_FEATURES, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES, VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_LINE_STATE_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_LINE_STATE_CREATE_INFO, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_PROPERTIES, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_EXPECT_ASSUME_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_EXPECT_ASSUME_FEATURES, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_6_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_6_FEATURES, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_6_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_6_PROPERTIES, VK_STRUCTURE_TYPE_BIND_MEMORY_STATUS_KHR = VK_STRUCTURE_TYPE_BIND_MEMORY_STATUS, VK_STRUCTURE_TYPE_BIND_DESCRIPTOR_SETS_INFO_KHR = VK_STRUCTURE_TYPE_BIND_DESCRIPTOR_SETS_INFO, VK_STRUCTURE_TYPE_PUSH_CONSTANTS_INFO_KHR = VK_STRUCTURE_TYPE_PUSH_CONSTANTS_INFO, VK_STRUCTURE_TYPE_PUSH_DESCRIPTOR_SET_INFO_KHR = VK_STRUCTURE_TYPE_PUSH_DESCRIPTOR_SET_INFO, VK_STRUCTURE_TYPE_PUSH_DESCRIPTOR_SET_WITH_TEMPLATE_INFO_KHR = VK_STRUCTURE_TYPE_PUSH_DESCRIPTOR_SET_WITH_TEMPLATE_INFO, VK_STRUCTURE_TYPE_MAX_ENUM = 0x7FFFFFFF } VkStructureType; typedef enum VkPipelineCacheHeaderVersion { VK_PIPELINE_CACHE_HEADER_VERSION_ONE = 1, VK_PIPELINE_CACHE_HEADER_VERSION_MAX_ENUM = 0x7FFFFFFF } VkPipelineCacheHeaderVersion; typedef enum VkImageLayout { VK_IMAGE_LAYOUT_UNDEFINED = 0, VK_IMAGE_LAYOUT_GENERAL = 1, VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL = 2, VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL = 3, VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL = 4, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL = 5, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL = 6, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL = 7, VK_IMAGE_LAYOUT_PREINITIALIZED = 8, VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL = 1000117000, VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL = 1000117001, VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL = 1000241000, VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL = 1000241001, VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL = 1000241002, VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL = 1000241003, VK_IMAGE_LAYOUT_READ_ONLY_OPTIMAL = 1000314000, VK_IMAGE_LAYOUT_ATTACHMENT_OPTIMAL = 1000314001, VK_IMAGE_LAYOUT_RENDERING_LOCAL_READ = 1000232000, VK_IMAGE_LAYOUT_PRESENT_SRC_KHR = 1000001002, VK_IMAGE_LAYOUT_VIDEO_DECODE_DST_KHR = 1000024000, VK_IMAGE_LAYOUT_VIDEO_DECODE_SRC_KHR = 1000024001, VK_IMAGE_LAYOUT_VIDEO_DECODE_DPB_KHR = 1000024002, VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR = 1000111000, VK_IMAGE_LAYOUT_FRAGMENT_DENSITY_MAP_OPTIMAL_EXT = 1000218000, VK_IMAGE_LAYOUT_FRAGMENT_SHADING_RATE_ATTACHMENT_OPTIMAL_KHR = 1000164003, VK_IMAGE_LAYOUT_VIDEO_ENCODE_DST_KHR = 1000299000, VK_IMAGE_LAYOUT_VIDEO_ENCODE_SRC_KHR = 1000299001, VK_IMAGE_LAYOUT_VIDEO_ENCODE_DPB_KHR = 1000299002, VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT = 1000339000, VK_IMAGE_LAYOUT_VIDEO_ENCODE_QUANTIZATION_MAP_KHR = 1000553000, VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL_KHR = VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL, VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL_KHR = VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL, VK_IMAGE_LAYOUT_SHADING_RATE_OPTIMAL_NV = VK_IMAGE_LAYOUT_FRAGMENT_SHADING_RATE_ATTACHMENT_OPTIMAL_KHR, VK_IMAGE_LAYOUT_RENDERING_LOCAL_READ_KHR = VK_IMAGE_LAYOUT_RENDERING_LOCAL_READ, VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL_KHR = VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL, VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL_KHR = VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL, VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL_KHR = VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL, VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL_KHR = VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL, VK_IMAGE_LAYOUT_READ_ONLY_OPTIMAL_KHR = VK_IMAGE_LAYOUT_READ_ONLY_OPTIMAL, VK_IMAGE_LAYOUT_ATTACHMENT_OPTIMAL_KHR = VK_IMAGE_LAYOUT_ATTACHMENT_OPTIMAL, VK_IMAGE_LAYOUT_MAX_ENUM = 0x7FFFFFFF } VkImageLayout; typedef enum VkObjectType { VK_OBJECT_TYPE_UNKNOWN = 0, VK_OBJECT_TYPE_INSTANCE = 1, VK_OBJECT_TYPE_PHYSICAL_DEVICE = 2, VK_OBJECT_TYPE_DEVICE = 3, VK_OBJECT_TYPE_QUEUE = 4, VK_OBJECT_TYPE_SEMAPHORE = 5, VK_OBJECT_TYPE_COMMAND_BUFFER = 6, VK_OBJECT_TYPE_FENCE = 7, VK_OBJECT_TYPE_DEVICE_MEMORY = 8, VK_OBJECT_TYPE_BUFFER = 9, VK_OBJECT_TYPE_IMAGE = 10, VK_OBJECT_TYPE_EVENT = 11, VK_OBJECT_TYPE_QUERY_POOL = 12, VK_OBJECT_TYPE_BUFFER_VIEW = 13, VK_OBJECT_TYPE_IMAGE_VIEW = 14, VK_OBJECT_TYPE_SHADER_MODULE = 15, VK_OBJECT_TYPE_PIPELINE_CACHE = 16, VK_OBJECT_TYPE_PIPELINE_LAYOUT = 17, VK_OBJECT_TYPE_RENDER_PASS = 18, VK_OBJECT_TYPE_PIPELINE = 19, VK_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT = 20, VK_OBJECT_TYPE_SAMPLER = 21, VK_OBJECT_TYPE_DESCRIPTOR_POOL = 22, VK_OBJECT_TYPE_DESCRIPTOR_SET = 23, VK_OBJECT_TYPE_FRAMEBUFFER = 24, VK_OBJECT_TYPE_COMMAND_POOL = 25, VK_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION = 1000156000, VK_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE = 1000085000, VK_OBJECT_TYPE_PRIVATE_DATA_SLOT = 1000295000, VK_OBJECT_TYPE_SURFACE_KHR = 1000000000, VK_OBJECT_TYPE_SWAPCHAIN_KHR = 1000001000, VK_OBJECT_TYPE_DISPLAY_KHR = 1000002000, VK_OBJECT_TYPE_DISPLAY_MODE_KHR = 1000002001, VK_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT = 1000011000, VK_OBJECT_TYPE_VIDEO_SESSION_KHR = 1000023000, VK_OBJECT_TYPE_VIDEO_SESSION_PARAMETERS_KHR = 1000023001, VK_OBJECT_TYPE_CU_MODULE_NVX = 1000029000, VK_OBJECT_TYPE_CU_FUNCTION_NVX = 1000029001, VK_OBJECT_TYPE_DEBUG_UTILS_MESSENGER_EXT = 1000128000, VK_OBJECT_TYPE_ACCELERATION_STRUCTURE_KHR = 1000150000, VK_OBJECT_TYPE_VALIDATION_CACHE_EXT = 1000160000, VK_OBJECT_TYPE_ACCELERATION_STRUCTURE_NV = 1000165000, VK_OBJECT_TYPE_PERFORMANCE_CONFIGURATION_INTEL = 1000210000, VK_OBJECT_TYPE_DEFERRED_OPERATION_KHR = 1000268000, VK_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NV = 1000277000, VK_OBJECT_TYPE_CUDA_MODULE_NV = 1000307000, VK_OBJECT_TYPE_CUDA_FUNCTION_NV = 1000307001, VK_OBJECT_TYPE_BUFFER_COLLECTION_FUCHSIA = 1000366000, VK_OBJECT_TYPE_MICROMAP_EXT = 1000396000, VK_OBJECT_TYPE_OPTICAL_FLOW_SESSION_NV = 1000464000, VK_OBJECT_TYPE_SHADER_EXT = 1000482000, VK_OBJECT_TYPE_PIPELINE_BINARY_KHR = 1000483000, VK_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_EXT = 1000572000, VK_OBJECT_TYPE_INDIRECT_EXECUTION_SET_EXT = 1000572001, VK_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_KHR = VK_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE, VK_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION_KHR = VK_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION, VK_OBJECT_TYPE_PRIVATE_DATA_SLOT_EXT = VK_OBJECT_TYPE_PRIVATE_DATA_SLOT, VK_OBJECT_TYPE_MAX_ENUM = 0x7FFFFFFF } VkObjectType; typedef enum VkVendorId { VK_VENDOR_ID_KHRONOS = 0x10000, VK_VENDOR_ID_VIV = 0x10001, VK_VENDOR_ID_VSI = 0x10002, VK_VENDOR_ID_KAZAN = 0x10003, VK_VENDOR_ID_CODEPLAY = 0x10004, VK_VENDOR_ID_MESA = 0x10005, VK_VENDOR_ID_POCL = 0x10006, VK_VENDOR_ID_MOBILEYE = 0x10007, VK_VENDOR_ID_MAX_ENUM = 0x7FFFFFFF } VkVendorId; typedef enum VkSystemAllocationScope { VK_SYSTEM_ALLOCATION_SCOPE_COMMAND = 0, VK_SYSTEM_ALLOCATION_SCOPE_OBJECT = 1, VK_SYSTEM_ALLOCATION_SCOPE_CACHE = 2, VK_SYSTEM_ALLOCATION_SCOPE_DEVICE = 3, VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE = 4, VK_SYSTEM_ALLOCATION_SCOPE_MAX_ENUM = 0x7FFFFFFF } VkSystemAllocationScope; typedef enum VkInternalAllocationType { VK_INTERNAL_ALLOCATION_TYPE_EXECUTABLE = 0, VK_INTERNAL_ALLOCATION_TYPE_MAX_ENUM = 0x7FFFFFFF } VkInternalAllocationType; typedef enum VkFormat { VK_FORMAT_UNDEFINED = 0, VK_FORMAT_R4G4_UNORM_PACK8 = 1, VK_FORMAT_R4G4B4A4_UNORM_PACK16 = 2, VK_FORMAT_B4G4R4A4_UNORM_PACK16 = 3, VK_FORMAT_R5G6B5_UNORM_PACK16 = 4, VK_FORMAT_B5G6R5_UNORM_PACK16 = 5, VK_FORMAT_R5G5B5A1_UNORM_PACK16 = 6, VK_FORMAT_B5G5R5A1_UNORM_PACK16 = 7, VK_FORMAT_A1R5G5B5_UNORM_PACK16 = 8, VK_FORMAT_R8_UNORM = 9, VK_FORMAT_R8_SNORM = 10, VK_FORMAT_R8_USCALED = 11, VK_FORMAT_R8_SSCALED = 12, VK_FORMAT_R8_UINT = 13, VK_FORMAT_R8_SINT = 14, VK_FORMAT_R8_SRGB = 15, VK_FORMAT_R8G8_UNORM = 16, VK_FORMAT_R8G8_SNORM = 17, VK_FORMAT_R8G8_USCALED = 18, VK_FORMAT_R8G8_SSCALED = 19, VK_FORMAT_R8G8_UINT = 20, VK_FORMAT_R8G8_SINT = 21, VK_FORMAT_R8G8_SRGB = 22, VK_FORMAT_R8G8B8_UNORM = 23, VK_FORMAT_R8G8B8_SNORM = 24, VK_FORMAT_R8G8B8_USCALED = 25, VK_FORMAT_R8G8B8_SSCALED = 26, VK_FORMAT_R8G8B8_UINT = 27, VK_FORMAT_R8G8B8_SINT = 28, VK_FORMAT_R8G8B8_SRGB = 29, VK_FORMAT_B8G8R8_UNORM = 30, VK_FORMAT_B8G8R8_SNORM = 31, VK_FORMAT_B8G8R8_USCALED = 32, VK_FORMAT_B8G8R8_SSCALED = 33, VK_FORMAT_B8G8R8_UINT = 34, VK_FORMAT_B8G8R8_SINT = 35, VK_FORMAT_B8G8R8_SRGB = 36, VK_FORMAT_R8G8B8A8_UNORM = 37, VK_FORMAT_R8G8B8A8_SNORM = 38, VK_FORMAT_R8G8B8A8_USCALED = 39, VK_FORMAT_R8G8B8A8_SSCALED = 40, VK_FORMAT_R8G8B8A8_UINT = 41, VK_FORMAT_R8G8B8A8_SINT = 42, VK_FORMAT_R8G8B8A8_SRGB = 43, VK_FORMAT_B8G8R8A8_UNORM = 44, VK_FORMAT_B8G8R8A8_SNORM = 45, VK_FORMAT_B8G8R8A8_USCALED = 46, VK_FORMAT_B8G8R8A8_SSCALED = 47, VK_FORMAT_B8G8R8A8_UINT = 48, VK_FORMAT_B8G8R8A8_SINT = 49, VK_FORMAT_B8G8R8A8_SRGB = 50, VK_FORMAT_A8B8G8R8_UNORM_PACK32 = 51, VK_FORMAT_A8B8G8R8_SNORM_PACK32 = 52, VK_FORMAT_A8B8G8R8_USCALED_PACK32 = 53, VK_FORMAT_A8B8G8R8_SSCALED_PACK32 = 54, VK_FORMAT_A8B8G8R8_UINT_PACK32 = 55, VK_FORMAT_A8B8G8R8_SINT_PACK32 = 56, VK_FORMAT_A8B8G8R8_SRGB_PACK32 = 57, VK_FORMAT_A2R10G10B10_UNORM_PACK32 = 58, VK_FORMAT_A2R10G10B10_SNORM_PACK32 = 59, VK_FORMAT_A2R10G10B10_USCALED_PACK32 = 60, VK_FORMAT_A2R10G10B10_SSCALED_PACK32 = 61, VK_FORMAT_A2R10G10B10_UINT_PACK32 = 62, VK_FORMAT_A2R10G10B10_SINT_PACK32 = 63, VK_FORMAT_A2B10G10R10_UNORM_PACK32 = 64, VK_FORMAT_A2B10G10R10_SNORM_PACK32 = 65, VK_FORMAT_A2B10G10R10_USCALED_PACK32 = 66, VK_FORMAT_A2B10G10R10_SSCALED_PACK32 = 67, VK_FORMAT_A2B10G10R10_UINT_PACK32 = 68, VK_FORMAT_A2B10G10R10_SINT_PACK32 = 69, VK_FORMAT_R16_UNORM = 70, VK_FORMAT_R16_SNORM = 71, VK_FORMAT_R16_USCALED = 72, VK_FORMAT_R16_SSCALED = 73, VK_FORMAT_R16_UINT = 74, VK_FORMAT_R16_SINT = 75, VK_FORMAT_R16_SFLOAT = 76, VK_FORMAT_R16G16_UNORM = 77, VK_FORMAT_R16G16_SNORM = 78, VK_FORMAT_R16G16_USCALED = 79, VK_FORMAT_R16G16_SSCALED = 80, VK_FORMAT_R16G16_UINT = 81, VK_FORMAT_R16G16_SINT = 82, VK_FORMAT_R16G16_SFLOAT = 83, VK_FORMAT_R16G16B16_UNORM = 84, VK_FORMAT_R16G16B16_SNORM = 85, VK_FORMAT_R16G16B16_USCALED = 86, VK_FORMAT_R16G16B16_SSCALED = 87, VK_FORMAT_R16G16B16_UINT = 88, VK_FORMAT_R16G16B16_SINT = 89, VK_FORMAT_R16G16B16_SFLOAT = 90, VK_FORMAT_R16G16B16A16_UNORM = 91, VK_FORMAT_R16G16B16A16_SNORM = 92, VK_FORMAT_R16G16B16A16_USCALED = 93, VK_FORMAT_R16G16B16A16_SSCALED = 94, VK_FORMAT_R16G16B16A16_UINT = 95, VK_FORMAT_R16G16B16A16_SINT = 96, VK_FORMAT_R16G16B16A16_SFLOAT = 97, VK_FORMAT_R32_UINT = 98, VK_FORMAT_R32_SINT = 99, VK_FORMAT_R32_SFLOAT = 100, VK_FORMAT_R32G32_UINT = 101, VK_FORMAT_R32G32_SINT = 102, VK_FORMAT_R32G32_SFLOAT = 103, VK_FORMAT_R32G32B32_UINT = 104, VK_FORMAT_R32G32B32_SINT = 105, VK_FORMAT_R32G32B32_SFLOAT = 106, VK_FORMAT_R32G32B32A32_UINT = 107, VK_FORMAT_R32G32B32A32_SINT = 108, VK_FORMAT_R32G32B32A32_SFLOAT = 109, VK_FORMAT_R64_UINT = 110, VK_FORMAT_R64_SINT = 111, VK_FORMAT_R64_SFLOAT = 112, VK_FORMAT_R64G64_UINT = 113, VK_FORMAT_R64G64_SINT = 114, VK_FORMAT_R64G64_SFLOAT = 115, VK_FORMAT_R64G64B64_UINT = 116, VK_FORMAT_R64G64B64_SINT = 117, VK_FORMAT_R64G64B64_SFLOAT = 118, VK_FORMAT_R64G64B64A64_UINT = 119, VK_FORMAT_R64G64B64A64_SINT = 120, VK_FORMAT_R64G64B64A64_SFLOAT = 121, VK_FORMAT_B10G11R11_UFLOAT_PACK32 = 122, VK_FORMAT_E5B9G9R9_UFLOAT_PACK32 = 123, VK_FORMAT_D16_UNORM = 124, VK_FORMAT_X8_D24_UNORM_PACK32 = 125, VK_FORMAT_D32_SFLOAT = 126, VK_FORMAT_S8_UINT = 127, VK_FORMAT_D16_UNORM_S8_UINT = 128, VK_FORMAT_D24_UNORM_S8_UINT = 129, VK_FORMAT_D32_SFLOAT_S8_UINT = 130, VK_FORMAT_BC1_RGB_UNORM_BLOCK = 131, VK_FORMAT_BC1_RGB_SRGB_BLOCK = 132, VK_FORMAT_BC1_RGBA_UNORM_BLOCK = 133, VK_FORMAT_BC1_RGBA_SRGB_BLOCK = 134, VK_FORMAT_BC2_UNORM_BLOCK = 135, VK_FORMAT_BC2_SRGB_BLOCK = 136, VK_FORMAT_BC3_UNORM_BLOCK = 137, VK_FORMAT_BC3_SRGB_BLOCK = 138, VK_FORMAT_BC4_UNORM_BLOCK = 139, VK_FORMAT_BC4_SNORM_BLOCK = 140, VK_FORMAT_BC5_UNORM_BLOCK = 141, VK_FORMAT_BC5_SNORM_BLOCK = 142, VK_FORMAT_BC6H_UFLOAT_BLOCK = 143, VK_FORMAT_BC6H_SFLOAT_BLOCK = 144, VK_FORMAT_BC7_UNORM_BLOCK = 145, VK_FORMAT_BC7_SRGB_BLOCK = 146, VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK = 147, VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK = 148, VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK = 149, VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK = 150, VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK = 151, VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK = 152, VK_FORMAT_EAC_R11_UNORM_BLOCK = 153, VK_FORMAT_EAC_R11_SNORM_BLOCK = 154, VK_FORMAT_EAC_R11G11_UNORM_BLOCK = 155, VK_FORMAT_EAC_R11G11_SNORM_BLOCK = 156, VK_FORMAT_ASTC_4x4_UNORM_BLOCK = 157, VK_FORMAT_ASTC_4x4_SRGB_BLOCK = 158, VK_FORMAT_ASTC_5x4_UNORM_BLOCK = 159, VK_FORMAT_ASTC_5x4_SRGB_BLOCK = 160, VK_FORMAT_ASTC_5x5_UNORM_BLOCK = 161, VK_FORMAT_ASTC_5x5_SRGB_BLOCK = 162, VK_FORMAT_ASTC_6x5_UNORM_BLOCK = 163, VK_FORMAT_ASTC_6x5_SRGB_BLOCK = 164, VK_FORMAT_ASTC_6x6_UNORM_BLOCK = 165, VK_FORMAT_ASTC_6x6_SRGB_BLOCK = 166, VK_FORMAT_ASTC_8x5_UNORM_BLOCK = 167, VK_FORMAT_ASTC_8x5_SRGB_BLOCK = 168, VK_FORMAT_ASTC_8x6_UNORM_BLOCK = 169, VK_FORMAT_ASTC_8x6_SRGB_BLOCK = 170, VK_FORMAT_ASTC_8x8_UNORM_BLOCK = 171, VK_FORMAT_ASTC_8x8_SRGB_BLOCK = 172, VK_FORMAT_ASTC_10x5_UNORM_BLOCK = 173, VK_FORMAT_ASTC_10x5_SRGB_BLOCK = 174, VK_FORMAT_ASTC_10x6_UNORM_BLOCK = 175, VK_FORMAT_ASTC_10x6_SRGB_BLOCK = 176, VK_FORMAT_ASTC_10x8_UNORM_BLOCK = 177, VK_FORMAT_ASTC_10x8_SRGB_BLOCK = 178, VK_FORMAT_ASTC_10x10_UNORM_BLOCK = 179, VK_FORMAT_ASTC_10x10_SRGB_BLOCK = 180, VK_FORMAT_ASTC_12x10_UNORM_BLOCK = 181, VK_FORMAT_ASTC_12x10_SRGB_BLOCK = 182, VK_FORMAT_ASTC_12x12_UNORM_BLOCK = 183, VK_FORMAT_ASTC_12x12_SRGB_BLOCK = 184, VK_FORMAT_G8B8G8R8_422_UNORM = 1000156000, VK_FORMAT_B8G8R8G8_422_UNORM = 1000156001, VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM = 1000156002, VK_FORMAT_G8_B8R8_2PLANE_420_UNORM = 1000156003, VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM = 1000156004, VK_FORMAT_G8_B8R8_2PLANE_422_UNORM = 1000156005, VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM = 1000156006, VK_FORMAT_R10X6_UNORM_PACK16 = 1000156007, VK_FORMAT_R10X6G10X6_UNORM_2PACK16 = 1000156008, VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16 = 1000156009, VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16 = 1000156010, VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16 = 1000156011, VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16 = 1000156012, VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16 = 1000156013, VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16 = 1000156014, VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16 = 1000156015, VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16 = 1000156016, VK_FORMAT_R12X4_UNORM_PACK16 = 1000156017, VK_FORMAT_R12X4G12X4_UNORM_2PACK16 = 1000156018, VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16 = 1000156019, VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16 = 1000156020, VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16 = 1000156021, VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16 = 1000156022, VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16 = 1000156023, VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16 = 1000156024, VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16 = 1000156025, VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16 = 1000156026, VK_FORMAT_G16B16G16R16_422_UNORM = 1000156027, VK_FORMAT_B16G16R16G16_422_UNORM = 1000156028, VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM = 1000156029, VK_FORMAT_G16_B16R16_2PLANE_420_UNORM = 1000156030, VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM = 1000156031, VK_FORMAT_G16_B16R16_2PLANE_422_UNORM = 1000156032, VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM = 1000156033, VK_FORMAT_G8_B8R8_2PLANE_444_UNORM = 1000330000, VK_FORMAT_G10X6_B10X6R10X6_2PLANE_444_UNORM_3PACK16 = 1000330001, VK_FORMAT_G12X4_B12X4R12X4_2PLANE_444_UNORM_3PACK16 = 1000330002, VK_FORMAT_G16_B16R16_2PLANE_444_UNORM = 1000330003, VK_FORMAT_A4R4G4B4_UNORM_PACK16 = 1000340000, VK_FORMAT_A4B4G4R4_UNORM_PACK16 = 1000340001, VK_FORMAT_ASTC_4x4_SFLOAT_BLOCK = 1000066000, VK_FORMAT_ASTC_5x4_SFLOAT_BLOCK = 1000066001, VK_FORMAT_ASTC_5x5_SFLOAT_BLOCK = 1000066002, VK_FORMAT_ASTC_6x5_SFLOAT_BLOCK = 1000066003, VK_FORMAT_ASTC_6x6_SFLOAT_BLOCK = 1000066004, VK_FORMAT_ASTC_8x5_SFLOAT_BLOCK = 1000066005, VK_FORMAT_ASTC_8x6_SFLOAT_BLOCK = 1000066006, VK_FORMAT_ASTC_8x8_SFLOAT_BLOCK = 1000066007, VK_FORMAT_ASTC_10x5_SFLOAT_BLOCK = 1000066008, VK_FORMAT_ASTC_10x6_SFLOAT_BLOCK = 1000066009, VK_FORMAT_ASTC_10x8_SFLOAT_BLOCK = 1000066010, VK_FORMAT_ASTC_10x10_SFLOAT_BLOCK = 1000066011, VK_FORMAT_ASTC_12x10_SFLOAT_BLOCK = 1000066012, VK_FORMAT_ASTC_12x12_SFLOAT_BLOCK = 1000066013, VK_FORMAT_A1B5G5R5_UNORM_PACK16 = 1000470000, VK_FORMAT_A8_UNORM = 1000470001, VK_FORMAT_PVRTC1_2BPP_UNORM_BLOCK_IMG = 1000054000, VK_FORMAT_PVRTC1_4BPP_UNORM_BLOCK_IMG = 1000054001, VK_FORMAT_PVRTC2_2BPP_UNORM_BLOCK_IMG = 1000054002, VK_FORMAT_PVRTC2_4BPP_UNORM_BLOCK_IMG = 1000054003, VK_FORMAT_PVRTC1_2BPP_SRGB_BLOCK_IMG = 1000054004, VK_FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG = 1000054005, VK_FORMAT_PVRTC2_2BPP_SRGB_BLOCK_IMG = 1000054006, VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG = 1000054007, VK_FORMAT_R16G16_SFIXED5_NV = 1000464000, VK_FORMAT_ASTC_4x4_SFLOAT_BLOCK_EXT = VK_FORMAT_ASTC_4x4_SFLOAT_BLOCK, VK_FORMAT_ASTC_5x4_SFLOAT_BLOCK_EXT = VK_FORMAT_ASTC_5x4_SFLOAT_BLOCK, VK_FORMAT_ASTC_5x5_SFLOAT_BLOCK_EXT = VK_FORMAT_ASTC_5x5_SFLOAT_BLOCK, VK_FORMAT_ASTC_6x5_SFLOAT_BLOCK_EXT = VK_FORMAT_ASTC_6x5_SFLOAT_BLOCK, VK_FORMAT_ASTC_6x6_SFLOAT_BLOCK_EXT = VK_FORMAT_ASTC_6x6_SFLOAT_BLOCK, VK_FORMAT_ASTC_8x5_SFLOAT_BLOCK_EXT = VK_FORMAT_ASTC_8x5_SFLOAT_BLOCK, VK_FORMAT_ASTC_8x6_SFLOAT_BLOCK_EXT = VK_FORMAT_ASTC_8x6_SFLOAT_BLOCK, VK_FORMAT_ASTC_8x8_SFLOAT_BLOCK_EXT = VK_FORMAT_ASTC_8x8_SFLOAT_BLOCK, VK_FORMAT_ASTC_10x5_SFLOAT_BLOCK_EXT = VK_FORMAT_ASTC_10x5_SFLOAT_BLOCK, VK_FORMAT_ASTC_10x6_SFLOAT_BLOCK_EXT = VK_FORMAT_ASTC_10x6_SFLOAT_BLOCK, VK_FORMAT_ASTC_10x8_SFLOAT_BLOCK_EXT = VK_FORMAT_ASTC_10x8_SFLOAT_BLOCK, VK_FORMAT_ASTC_10x10_SFLOAT_BLOCK_EXT = VK_FORMAT_ASTC_10x10_SFLOAT_BLOCK, VK_FORMAT_ASTC_12x10_SFLOAT_BLOCK_EXT = VK_FORMAT_ASTC_12x10_SFLOAT_BLOCK, VK_FORMAT_ASTC_12x12_SFLOAT_BLOCK_EXT = VK_FORMAT_ASTC_12x12_SFLOAT_BLOCK, VK_FORMAT_G8B8G8R8_422_UNORM_KHR = VK_FORMAT_G8B8G8R8_422_UNORM, VK_FORMAT_B8G8R8G8_422_UNORM_KHR = VK_FORMAT_B8G8R8G8_422_UNORM, VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM_KHR = VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM, VK_FORMAT_G8_B8R8_2PLANE_420_UNORM_KHR = VK_FORMAT_G8_B8R8_2PLANE_420_UNORM, VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM_KHR = VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM, VK_FORMAT_G8_B8R8_2PLANE_422_UNORM_KHR = VK_FORMAT_G8_B8R8_2PLANE_422_UNORM, VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM_KHR = VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM, VK_FORMAT_R10X6_UNORM_PACK16_KHR = VK_FORMAT_R10X6_UNORM_PACK16, VK_FORMAT_R10X6G10X6_UNORM_2PACK16_KHR = VK_FORMAT_R10X6G10X6_UNORM_2PACK16, VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16_KHR = VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16, VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16_KHR = VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16, VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16_KHR = VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16, VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16_KHR = VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16, VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16_KHR = VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16, VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16_KHR = VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16, VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16_KHR = VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16, VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16_KHR = VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16, VK_FORMAT_R12X4_UNORM_PACK16_KHR = VK_FORMAT_R12X4_UNORM_PACK16, VK_FORMAT_R12X4G12X4_UNORM_2PACK16_KHR = VK_FORMAT_R12X4G12X4_UNORM_2PACK16, VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16_KHR = VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16, VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16_KHR = VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16, VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16_KHR = VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16, VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16_KHR = VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16, VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16_KHR = VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16, VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16_KHR = VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16, VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16_KHR = VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16, VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16_KHR = VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16, VK_FORMAT_G16B16G16R16_422_UNORM_KHR = VK_FORMAT_G16B16G16R16_422_UNORM, VK_FORMAT_B16G16R16G16_422_UNORM_KHR = VK_FORMAT_B16G16R16G16_422_UNORM, VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM_KHR = VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM, VK_FORMAT_G16_B16R16_2PLANE_420_UNORM_KHR = VK_FORMAT_G16_B16R16_2PLANE_420_UNORM, VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM_KHR = VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM, VK_FORMAT_G16_B16R16_2PLANE_422_UNORM_KHR = VK_FORMAT_G16_B16R16_2PLANE_422_UNORM, VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM_KHR = VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM, VK_FORMAT_G8_B8R8_2PLANE_444_UNORM_EXT = VK_FORMAT_G8_B8R8_2PLANE_444_UNORM, VK_FORMAT_G10X6_B10X6R10X6_2PLANE_444_UNORM_3PACK16_EXT = VK_FORMAT_G10X6_B10X6R10X6_2PLANE_444_UNORM_3PACK16, VK_FORMAT_G12X4_B12X4R12X4_2PLANE_444_UNORM_3PACK16_EXT = VK_FORMAT_G12X4_B12X4R12X4_2PLANE_444_UNORM_3PACK16, VK_FORMAT_G16_B16R16_2PLANE_444_UNORM_EXT = VK_FORMAT_G16_B16R16_2PLANE_444_UNORM, VK_FORMAT_A4R4G4B4_UNORM_PACK16_EXT = VK_FORMAT_A4R4G4B4_UNORM_PACK16, VK_FORMAT_A4B4G4R4_UNORM_PACK16_EXT = VK_FORMAT_A4B4G4R4_UNORM_PACK16, // VK_FORMAT_R16G16_S10_5_NV is a deprecated alias VK_FORMAT_R16G16_S10_5_NV = VK_FORMAT_R16G16_SFIXED5_NV, VK_FORMAT_A1B5G5R5_UNORM_PACK16_KHR = VK_FORMAT_A1B5G5R5_UNORM_PACK16, VK_FORMAT_A8_UNORM_KHR = VK_FORMAT_A8_UNORM, VK_FORMAT_MAX_ENUM = 0x7FFFFFFF } VkFormat; typedef enum VkImageTiling { VK_IMAGE_TILING_OPTIMAL = 0, VK_IMAGE_TILING_LINEAR = 1, VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT = 1000158000, VK_IMAGE_TILING_MAX_ENUM = 0x7FFFFFFF } VkImageTiling; typedef enum VkImageType { VK_IMAGE_TYPE_1D = 0, VK_IMAGE_TYPE_2D = 1, VK_IMAGE_TYPE_3D = 2, VK_IMAGE_TYPE_MAX_ENUM = 0x7FFFFFFF } VkImageType; typedef enum VkPhysicalDeviceType { VK_PHYSICAL_DEVICE_TYPE_OTHER = 0, VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU = 1, VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU = 2, VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU = 3, VK_PHYSICAL_DEVICE_TYPE_CPU = 4, VK_PHYSICAL_DEVICE_TYPE_MAX_ENUM = 0x7FFFFFFF } VkPhysicalDeviceType; typedef enum VkQueryType { VK_QUERY_TYPE_OCCLUSION = 0, VK_QUERY_TYPE_PIPELINE_STATISTICS = 1, VK_QUERY_TYPE_TIMESTAMP = 2, VK_QUERY_TYPE_RESULT_STATUS_ONLY_KHR = 1000023000, VK_QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT = 1000028004, VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR = 1000116000, VK_QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_KHR = 1000150000, VK_QUERY_TYPE_ACCELERATION_STRUCTURE_SERIALIZATION_SIZE_KHR = 1000150001, VK_QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_NV = 1000165000, VK_QUERY_TYPE_PERFORMANCE_QUERY_INTEL = 1000210000, VK_QUERY_TYPE_VIDEO_ENCODE_FEEDBACK_KHR = 1000299000, VK_QUERY_TYPE_MESH_PRIMITIVES_GENERATED_EXT = 1000328000, VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT = 1000382000, VK_QUERY_TYPE_ACCELERATION_STRUCTURE_SERIALIZATION_BOTTOM_LEVEL_POINTERS_KHR = 1000386000, VK_QUERY_TYPE_ACCELERATION_STRUCTURE_SIZE_KHR = 1000386001, VK_QUERY_TYPE_MICROMAP_SERIALIZATION_SIZE_EXT = 1000396000, VK_QUERY_TYPE_MICROMAP_COMPACTED_SIZE_EXT = 1000396001, VK_QUERY_TYPE_MAX_ENUM = 0x7FFFFFFF } VkQueryType; typedef enum VkSharingMode { VK_SHARING_MODE_EXCLUSIVE = 0, VK_SHARING_MODE_CONCURRENT = 1, VK_SHARING_MODE_MAX_ENUM = 0x7FFFFFFF } VkSharingMode; typedef enum VkComponentSwizzle { VK_COMPONENT_SWIZZLE_IDENTITY = 0, VK_COMPONENT_SWIZZLE_ZERO = 1, VK_COMPONENT_SWIZZLE_ONE = 2, VK_COMPONENT_SWIZZLE_R = 3, VK_COMPONENT_SWIZZLE_G = 4, VK_COMPONENT_SWIZZLE_B = 5, VK_COMPONENT_SWIZZLE_A = 6, VK_COMPONENT_SWIZZLE_MAX_ENUM = 0x7FFFFFFF } VkComponentSwizzle; typedef enum VkImageViewType { VK_IMAGE_VIEW_TYPE_1D = 0, VK_IMAGE_VIEW_TYPE_2D = 1, VK_IMAGE_VIEW_TYPE_3D = 2, VK_IMAGE_VIEW_TYPE_CUBE = 3, VK_IMAGE_VIEW_TYPE_1D_ARRAY = 4, VK_IMAGE_VIEW_TYPE_2D_ARRAY = 5, VK_IMAGE_VIEW_TYPE_CUBE_ARRAY = 6, VK_IMAGE_VIEW_TYPE_MAX_ENUM = 0x7FFFFFFF } VkImageViewType; typedef enum VkBlendFactor { VK_BLEND_FACTOR_ZERO = 0, VK_BLEND_FACTOR_ONE = 1, VK_BLEND_FACTOR_SRC_COLOR = 2, VK_BLEND_FACTOR_ONE_MINUS_SRC_COLOR = 3, VK_BLEND_FACTOR_DST_COLOR = 4, VK_BLEND_FACTOR_ONE_MINUS_DST_COLOR = 5, VK_BLEND_FACTOR_SRC_ALPHA = 6, VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA = 7, VK_BLEND_FACTOR_DST_ALPHA = 8, VK_BLEND_FACTOR_ONE_MINUS_DST_ALPHA = 9, VK_BLEND_FACTOR_CONSTANT_COLOR = 10, VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR = 11, VK_BLEND_FACTOR_CONSTANT_ALPHA = 12, VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA = 13, VK_BLEND_FACTOR_SRC_ALPHA_SATURATE = 14, VK_BLEND_FACTOR_SRC1_COLOR = 15, VK_BLEND_FACTOR_ONE_MINUS_SRC1_COLOR = 16, VK_BLEND_FACTOR_SRC1_ALPHA = 17, VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA = 18, VK_BLEND_FACTOR_MAX_ENUM = 0x7FFFFFFF } VkBlendFactor; typedef enum VkBlendOp { VK_BLEND_OP_ADD = 0, VK_BLEND_OP_SUBTRACT = 1, VK_BLEND_OP_REVERSE_SUBTRACT = 2, VK_BLEND_OP_MIN = 3, VK_BLEND_OP_MAX = 4, VK_BLEND_OP_ZERO_EXT = 1000148000, VK_BLEND_OP_SRC_EXT = 1000148001, VK_BLEND_OP_DST_EXT = 1000148002, VK_BLEND_OP_SRC_OVER_EXT = 1000148003, VK_BLEND_OP_DST_OVER_EXT = 1000148004, VK_BLEND_OP_SRC_IN_EXT = 1000148005, VK_BLEND_OP_DST_IN_EXT = 1000148006, VK_BLEND_OP_SRC_OUT_EXT = 1000148007, VK_BLEND_OP_DST_OUT_EXT = 1000148008, VK_BLEND_OP_SRC_ATOP_EXT = 1000148009, VK_BLEND_OP_DST_ATOP_EXT = 1000148010, VK_BLEND_OP_XOR_EXT = 1000148011, VK_BLEND_OP_MULTIPLY_EXT = 1000148012, VK_BLEND_OP_SCREEN_EXT = 1000148013, VK_BLEND_OP_OVERLAY_EXT = 1000148014, VK_BLEND_OP_DARKEN_EXT = 1000148015, VK_BLEND_OP_LIGHTEN_EXT = 1000148016, VK_BLEND_OP_COLORDODGE_EXT = 1000148017, VK_BLEND_OP_COLORBURN_EXT = 1000148018, VK_BLEND_OP_HARDLIGHT_EXT = 1000148019, VK_BLEND_OP_SOFTLIGHT_EXT = 1000148020, VK_BLEND_OP_DIFFERENCE_EXT = 1000148021, VK_BLEND_OP_EXCLUSION_EXT = 1000148022, VK_BLEND_OP_INVERT_EXT = 1000148023, VK_BLEND_OP_INVERT_RGB_EXT = 1000148024, VK_BLEND_OP_LINEARDODGE_EXT = 1000148025, VK_BLEND_OP_LINEARBURN_EXT = 1000148026, VK_BLEND_OP_VIVIDLIGHT_EXT = 1000148027, VK_BLEND_OP_LINEARLIGHT_EXT = 1000148028, VK_BLEND_OP_PINLIGHT_EXT = 1000148029, VK_BLEND_OP_HARDMIX_EXT = 1000148030, VK_BLEND_OP_HSL_HUE_EXT = 1000148031, VK_BLEND_OP_HSL_SATURATION_EXT = 1000148032, VK_BLEND_OP_HSL_COLOR_EXT = 1000148033, VK_BLEND_OP_HSL_LUMINOSITY_EXT = 1000148034, VK_BLEND_OP_PLUS_EXT = 1000148035, VK_BLEND_OP_PLUS_CLAMPED_EXT = 1000148036, VK_BLEND_OP_PLUS_CLAMPED_ALPHA_EXT = 1000148037, VK_BLEND_OP_PLUS_DARKER_EXT = 1000148038, VK_BLEND_OP_MINUS_EXT = 1000148039, VK_BLEND_OP_MINUS_CLAMPED_EXT = 1000148040, VK_BLEND_OP_CONTRAST_EXT = 1000148041, VK_BLEND_OP_INVERT_OVG_EXT = 1000148042, VK_BLEND_OP_RED_EXT = 1000148043, VK_BLEND_OP_GREEN_EXT = 1000148044, VK_BLEND_OP_BLUE_EXT = 1000148045, VK_BLEND_OP_MAX_ENUM = 0x7FFFFFFF } VkBlendOp; typedef enum VkCompareOp { VK_COMPARE_OP_NEVER = 0, VK_COMPARE_OP_LESS = 1, VK_COMPARE_OP_EQUAL = 2, VK_COMPARE_OP_LESS_OR_EQUAL = 3, VK_COMPARE_OP_GREATER = 4, VK_COMPARE_OP_NOT_EQUAL = 5, VK_COMPARE_OP_GREATER_OR_EQUAL = 6, VK_COMPARE_OP_ALWAYS = 7, VK_COMPARE_OP_MAX_ENUM = 0x7FFFFFFF } VkCompareOp; typedef enum VkDynamicState { VK_DYNAMIC_STATE_VIEWPORT = 0, VK_DYNAMIC_STATE_SCISSOR = 1, VK_DYNAMIC_STATE_LINE_WIDTH = 2, VK_DYNAMIC_STATE_DEPTH_BIAS = 3, VK_DYNAMIC_STATE_BLEND_CONSTANTS = 4, VK_DYNAMIC_STATE_DEPTH_BOUNDS = 5, VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK = 6, VK_DYNAMIC_STATE_STENCIL_WRITE_MASK = 7, VK_DYNAMIC_STATE_STENCIL_REFERENCE = 8, VK_DYNAMIC_STATE_CULL_MODE = 1000267000, VK_DYNAMIC_STATE_FRONT_FACE = 1000267001, VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY = 1000267002, VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT = 1000267003, VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT = 1000267004, VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE = 1000267005, VK_DYNAMIC_STATE_DEPTH_TEST_ENABLE = 1000267006, VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE = 1000267007, VK_DYNAMIC_STATE_DEPTH_COMPARE_OP = 1000267008, VK_DYNAMIC_STATE_DEPTH_BOUNDS_TEST_ENABLE = 1000267009, VK_DYNAMIC_STATE_STENCIL_TEST_ENABLE = 1000267010, VK_DYNAMIC_STATE_STENCIL_OP = 1000267011, VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE = 1000377001, VK_DYNAMIC_STATE_DEPTH_BIAS_ENABLE = 1000377002, VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE = 1000377004, VK_DYNAMIC_STATE_LINE_STIPPLE = 1000259000, VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV = 1000087000, VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT = 1000099000, VK_DYNAMIC_STATE_DISCARD_RECTANGLE_ENABLE_EXT = 1000099001, VK_DYNAMIC_STATE_DISCARD_RECTANGLE_MODE_EXT = 1000099002, VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT = 1000143000, VK_DYNAMIC_STATE_RAY_TRACING_PIPELINE_STACK_SIZE_KHR = 1000347000, VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV = 1000164004, VK_DYNAMIC_STATE_VIEWPORT_COARSE_SAMPLE_ORDER_NV = 1000164006, VK_DYNAMIC_STATE_EXCLUSIVE_SCISSOR_ENABLE_NV = 1000205000, VK_DYNAMIC_STATE_EXCLUSIVE_SCISSOR_NV = 1000205001, VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR = 1000226000, VK_DYNAMIC_STATE_VERTEX_INPUT_EXT = 1000352000, VK_DYNAMIC_STATE_PATCH_CONTROL_POINTS_EXT = 1000377000, VK_DYNAMIC_STATE_LOGIC_OP_EXT = 1000377003, VK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXT = 1000381000, VK_DYNAMIC_STATE_DEPTH_CLAMP_ENABLE_EXT = 1000455003, VK_DYNAMIC_STATE_POLYGON_MODE_EXT = 1000455004, VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT = 1000455005, VK_DYNAMIC_STATE_SAMPLE_MASK_EXT = 1000455006, VK_DYNAMIC_STATE_ALPHA_TO_COVERAGE_ENABLE_EXT = 1000455007, VK_DYNAMIC_STATE_ALPHA_TO_ONE_ENABLE_EXT = 1000455008, VK_DYNAMIC_STATE_LOGIC_OP_ENABLE_EXT = 1000455009, VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT = 1000455010, VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT = 1000455011, VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT = 1000455012, VK_DYNAMIC_STATE_TESSELLATION_DOMAIN_ORIGIN_EXT = 1000455002, VK_DYNAMIC_STATE_RASTERIZATION_STREAM_EXT = 1000455013, VK_DYNAMIC_STATE_CONSERVATIVE_RASTERIZATION_MODE_EXT = 1000455014, VK_DYNAMIC_STATE_EXTRA_PRIMITIVE_OVERESTIMATION_SIZE_EXT = 1000455015, VK_DYNAMIC_STATE_DEPTH_CLIP_ENABLE_EXT = 1000455016, VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT = 1000455017, VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT = 1000455018, VK_DYNAMIC_STATE_PROVOKING_VERTEX_MODE_EXT = 1000455019, VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT = 1000455020, VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT = 1000455021, VK_DYNAMIC_STATE_DEPTH_CLIP_NEGATIVE_ONE_TO_ONE_EXT = 1000455022, VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_ENABLE_NV = 1000455023, VK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV = 1000455024, VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_ENABLE_NV = 1000455025, VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_LOCATION_NV = 1000455026, VK_DYNAMIC_STATE_COVERAGE_MODULATION_MODE_NV = 1000455027, VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_ENABLE_NV = 1000455028, VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_NV = 1000455029, VK_DYNAMIC_STATE_SHADING_RATE_IMAGE_ENABLE_NV = 1000455030, VK_DYNAMIC_STATE_REPRESENTATIVE_FRAGMENT_TEST_ENABLE_NV = 1000455031, VK_DYNAMIC_STATE_COVERAGE_REDUCTION_MODE_NV = 1000455032, VK_DYNAMIC_STATE_ATTACHMENT_FEEDBACK_LOOP_ENABLE_EXT = 1000524000, VK_DYNAMIC_STATE_DEPTH_CLAMP_RANGE_EXT = 1000582000, VK_DYNAMIC_STATE_LINE_STIPPLE_EXT = VK_DYNAMIC_STATE_LINE_STIPPLE, VK_DYNAMIC_STATE_CULL_MODE_EXT = VK_DYNAMIC_STATE_CULL_MODE, VK_DYNAMIC_STATE_FRONT_FACE_EXT = VK_DYNAMIC_STATE_FRONT_FACE, VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY_EXT = VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY, VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT = VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT, VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT_EXT = VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT, VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE_EXT = VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE, VK_DYNAMIC_STATE_DEPTH_TEST_ENABLE_EXT = VK_DYNAMIC_STATE_DEPTH_TEST_ENABLE, VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE_EXT = VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE, VK_DYNAMIC_STATE_DEPTH_COMPARE_OP_EXT = VK_DYNAMIC_STATE_DEPTH_COMPARE_OP, VK_DYNAMIC_STATE_DEPTH_BOUNDS_TEST_ENABLE_EXT = VK_DYNAMIC_STATE_DEPTH_BOUNDS_TEST_ENABLE, VK_DYNAMIC_STATE_STENCIL_TEST_ENABLE_EXT = VK_DYNAMIC_STATE_STENCIL_TEST_ENABLE, VK_DYNAMIC_STATE_STENCIL_OP_EXT = VK_DYNAMIC_STATE_STENCIL_OP, VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE_EXT = VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE, VK_DYNAMIC_STATE_DEPTH_BIAS_ENABLE_EXT = VK_DYNAMIC_STATE_DEPTH_BIAS_ENABLE, VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE_EXT = VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE, VK_DYNAMIC_STATE_LINE_STIPPLE_KHR = VK_DYNAMIC_STATE_LINE_STIPPLE, VK_DYNAMIC_STATE_MAX_ENUM = 0x7FFFFFFF } VkDynamicState; typedef enum VkFrontFace { VK_FRONT_FACE_COUNTER_CLOCKWISE = 0, VK_FRONT_FACE_CLOCKWISE = 1, VK_FRONT_FACE_MAX_ENUM = 0x7FFFFFFF } VkFrontFace; typedef enum VkVertexInputRate { VK_VERTEX_INPUT_RATE_VERTEX = 0, VK_VERTEX_INPUT_RATE_INSTANCE = 1, VK_VERTEX_INPUT_RATE_MAX_ENUM = 0x7FFFFFFF } VkVertexInputRate; typedef enum VkPrimitiveTopology { VK_PRIMITIVE_TOPOLOGY_POINT_LIST = 0, VK_PRIMITIVE_TOPOLOGY_LINE_LIST = 1, VK_PRIMITIVE_TOPOLOGY_LINE_STRIP = 2, VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST = 3, VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP = 4, VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN = 5, VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY = 6, VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY = 7, VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY = 8, VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY = 9, VK_PRIMITIVE_TOPOLOGY_PATCH_LIST = 10, VK_PRIMITIVE_TOPOLOGY_MAX_ENUM = 0x7FFFFFFF } VkPrimitiveTopology; typedef enum VkPolygonMode { VK_POLYGON_MODE_FILL = 0, VK_POLYGON_MODE_LINE = 1, VK_POLYGON_MODE_POINT = 2, VK_POLYGON_MODE_FILL_RECTANGLE_NV = 1000153000, VK_POLYGON_MODE_MAX_ENUM = 0x7FFFFFFF } VkPolygonMode; typedef enum VkStencilOp { VK_STENCIL_OP_KEEP = 0, VK_STENCIL_OP_ZERO = 1, VK_STENCIL_OP_REPLACE = 2, VK_STENCIL_OP_INCREMENT_AND_CLAMP = 3, VK_STENCIL_OP_DECREMENT_AND_CLAMP = 4, VK_STENCIL_OP_INVERT = 5, VK_STENCIL_OP_INCREMENT_AND_WRAP = 6, VK_STENCIL_OP_DECREMENT_AND_WRAP = 7, VK_STENCIL_OP_MAX_ENUM = 0x7FFFFFFF } VkStencilOp; typedef enum VkLogicOp { VK_LOGIC_OP_CLEAR = 0, VK_LOGIC_OP_AND = 1, VK_LOGIC_OP_AND_REVERSE = 2, VK_LOGIC_OP_COPY = 3, VK_LOGIC_OP_AND_INVERTED = 4, VK_LOGIC_OP_NO_OP = 5, VK_LOGIC_OP_XOR = 6, VK_LOGIC_OP_OR = 7, VK_LOGIC_OP_NOR = 8, VK_LOGIC_OP_EQUIVALENT = 9, VK_LOGIC_OP_INVERT = 10, VK_LOGIC_OP_OR_REVERSE = 11, VK_LOGIC_OP_COPY_INVERTED = 12, VK_LOGIC_OP_OR_INVERTED = 13, VK_LOGIC_OP_NAND = 14, VK_LOGIC_OP_SET = 15, VK_LOGIC_OP_MAX_ENUM = 0x7FFFFFFF } VkLogicOp; typedef enum VkBorderColor { VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK = 0, VK_BORDER_COLOR_INT_TRANSPARENT_BLACK = 1, VK_BORDER_COLOR_FLOAT_OPAQUE_BLACK = 2, VK_BORDER_COLOR_INT_OPAQUE_BLACK = 3, VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE = 4, VK_BORDER_COLOR_INT_OPAQUE_WHITE = 5, VK_BORDER_COLOR_FLOAT_CUSTOM_EXT = 1000287003, VK_BORDER_COLOR_INT_CUSTOM_EXT = 1000287004, VK_BORDER_COLOR_MAX_ENUM = 0x7FFFFFFF } VkBorderColor; typedef enum VkFilter { VK_FILTER_NEAREST = 0, VK_FILTER_LINEAR = 1, VK_FILTER_CUBIC_EXT = 1000015000, VK_FILTER_CUBIC_IMG = VK_FILTER_CUBIC_EXT, VK_FILTER_MAX_ENUM = 0x7FFFFFFF } VkFilter; typedef enum VkSamplerAddressMode { VK_SAMPLER_ADDRESS_MODE_REPEAT = 0, VK_SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT = 1, VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE = 2, VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER = 3, VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE = 4, // VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE_KHR is a deprecated alias VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE_KHR = VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE, VK_SAMPLER_ADDRESS_MODE_MAX_ENUM = 0x7FFFFFFF } VkSamplerAddressMode; typedef enum VkSamplerMipmapMode { VK_SAMPLER_MIPMAP_MODE_NEAREST = 0, VK_SAMPLER_MIPMAP_MODE_LINEAR = 1, VK_SAMPLER_MIPMAP_MODE_MAX_ENUM = 0x7FFFFFFF } VkSamplerMipmapMode; typedef enum VkDescriptorType { VK_DESCRIPTOR_TYPE_SAMPLER = 0, VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER = 1, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE = 2, VK_DESCRIPTOR_TYPE_STORAGE_IMAGE = 3, VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER = 4, VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER = 5, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER = 6, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER = 7, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC = 8, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC = 9, VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT = 10, VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK = 1000138000, VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR = 1000150000, VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_NV = 1000165000, VK_DESCRIPTOR_TYPE_SAMPLE_WEIGHT_IMAGE_QCOM = 1000440000, VK_DESCRIPTOR_TYPE_BLOCK_MATCH_IMAGE_QCOM = 1000440001, VK_DESCRIPTOR_TYPE_MUTABLE_EXT = 1000351000, VK_DESCRIPTOR_TYPE_PARTITIONED_ACCELERATION_STRUCTURE_NV = 1000570000, VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK_EXT = VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK, VK_DESCRIPTOR_TYPE_MUTABLE_VALVE = VK_DESCRIPTOR_TYPE_MUTABLE_EXT, VK_DESCRIPTOR_TYPE_MAX_ENUM = 0x7FFFFFFF } VkDescriptorType; typedef enum VkAttachmentLoadOp { VK_ATTACHMENT_LOAD_OP_LOAD = 0, VK_ATTACHMENT_LOAD_OP_CLEAR = 1, VK_ATTACHMENT_LOAD_OP_DONT_CARE = 2, VK_ATTACHMENT_LOAD_OP_NONE = 1000400000, VK_ATTACHMENT_LOAD_OP_NONE_EXT = VK_ATTACHMENT_LOAD_OP_NONE, VK_ATTACHMENT_LOAD_OP_NONE_KHR = VK_ATTACHMENT_LOAD_OP_NONE, VK_ATTACHMENT_LOAD_OP_MAX_ENUM = 0x7FFFFFFF } VkAttachmentLoadOp; typedef enum VkAttachmentStoreOp { VK_ATTACHMENT_STORE_OP_STORE = 0, VK_ATTACHMENT_STORE_OP_DONT_CARE = 1, VK_ATTACHMENT_STORE_OP_NONE = 1000301000, VK_ATTACHMENT_STORE_OP_NONE_KHR = VK_ATTACHMENT_STORE_OP_NONE, VK_ATTACHMENT_STORE_OP_NONE_QCOM = VK_ATTACHMENT_STORE_OP_NONE, VK_ATTACHMENT_STORE_OP_NONE_EXT = VK_ATTACHMENT_STORE_OP_NONE, VK_ATTACHMENT_STORE_OP_MAX_ENUM = 0x7FFFFFFF } VkAttachmentStoreOp; typedef enum VkPipelineBindPoint { VK_PIPELINE_BIND_POINT_GRAPHICS = 0, VK_PIPELINE_BIND_POINT_COMPUTE = 1, #ifdef VK_ENABLE_BETA_EXTENSIONS VK_PIPELINE_BIND_POINT_EXECUTION_GRAPH_AMDX = 1000134000, #endif VK_PIPELINE_BIND_POINT_RAY_TRACING_KHR = 1000165000, VK_PIPELINE_BIND_POINT_SUBPASS_SHADING_HUAWEI = 1000369003, VK_PIPELINE_BIND_POINT_RAY_TRACING_NV = VK_PIPELINE_BIND_POINT_RAY_TRACING_KHR, VK_PIPELINE_BIND_POINT_MAX_ENUM = 0x7FFFFFFF } VkPipelineBindPoint; typedef enum VkCommandBufferLevel { VK_COMMAND_BUFFER_LEVEL_PRIMARY = 0, VK_COMMAND_BUFFER_LEVEL_SECONDARY = 1, VK_COMMAND_BUFFER_LEVEL_MAX_ENUM = 0x7FFFFFFF } VkCommandBufferLevel; typedef enum VkIndexType { VK_INDEX_TYPE_UINT16 = 0, VK_INDEX_TYPE_UINT32 = 1, VK_INDEX_TYPE_UINT8 = 1000265000, VK_INDEX_TYPE_NONE_KHR = 1000165000, VK_INDEX_TYPE_NONE_NV = VK_INDEX_TYPE_NONE_KHR, VK_INDEX_TYPE_UINT8_EXT = VK_INDEX_TYPE_UINT8, VK_INDEX_TYPE_UINT8_KHR = VK_INDEX_TYPE_UINT8, VK_INDEX_TYPE_MAX_ENUM = 0x7FFFFFFF } VkIndexType; typedef enum VkSubpassContents { VK_SUBPASS_CONTENTS_INLINE = 0, VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS = 1, VK_SUBPASS_CONTENTS_INLINE_AND_SECONDARY_COMMAND_BUFFERS_KHR = 1000451000, VK_SUBPASS_CONTENTS_INLINE_AND_SECONDARY_COMMAND_BUFFERS_EXT = VK_SUBPASS_CONTENTS_INLINE_AND_SECONDARY_COMMAND_BUFFERS_KHR, VK_SUBPASS_CONTENTS_MAX_ENUM = 0x7FFFFFFF } VkSubpassContents; typedef enum VkAccessFlagBits { VK_ACCESS_INDIRECT_COMMAND_READ_BIT = 0x00000001, VK_ACCESS_INDEX_READ_BIT = 0x00000002, VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT = 0x00000004, VK_ACCESS_UNIFORM_READ_BIT = 0x00000008, VK_ACCESS_INPUT_ATTACHMENT_READ_BIT = 0x00000010, VK_ACCESS_SHADER_READ_BIT = 0x00000020, VK_ACCESS_SHADER_WRITE_BIT = 0x00000040, VK_ACCESS_COLOR_ATTACHMENT_READ_BIT = 0x00000080, VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT = 0x00000100, VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT = 0x00000200, VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT = 0x00000400, VK_ACCESS_TRANSFER_READ_BIT = 0x00000800, VK_ACCESS_TRANSFER_WRITE_BIT = 0x00001000, VK_ACCESS_HOST_READ_BIT = 0x00002000, VK_ACCESS_HOST_WRITE_BIT = 0x00004000, VK_ACCESS_MEMORY_READ_BIT = 0x00008000, VK_ACCESS_MEMORY_WRITE_BIT = 0x00010000, VK_ACCESS_NONE = 0, VK_ACCESS_TRANSFORM_FEEDBACK_WRITE_BIT_EXT = 0x02000000, VK_ACCESS_TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT = 0x04000000, VK_ACCESS_TRANSFORM_FEEDBACK_COUNTER_WRITE_BIT_EXT = 0x08000000, VK_ACCESS_CONDITIONAL_RENDERING_READ_BIT_EXT = 0x00100000, VK_ACCESS_COLOR_ATTACHMENT_READ_NONCOHERENT_BIT_EXT = 0x00080000, VK_ACCESS_ACCELERATION_STRUCTURE_READ_BIT_KHR = 0x00200000, VK_ACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_KHR = 0x00400000, VK_ACCESS_FRAGMENT_DENSITY_MAP_READ_BIT_EXT = 0x01000000, VK_ACCESS_FRAGMENT_SHADING_RATE_ATTACHMENT_READ_BIT_KHR = 0x00800000, VK_ACCESS_COMMAND_PREPROCESS_READ_BIT_NV = 0x00020000, VK_ACCESS_COMMAND_PREPROCESS_WRITE_BIT_NV = 0x00040000, VK_ACCESS_SHADING_RATE_IMAGE_READ_BIT_NV = VK_ACCESS_FRAGMENT_SHADING_RATE_ATTACHMENT_READ_BIT_KHR, VK_ACCESS_ACCELERATION_STRUCTURE_READ_BIT_NV = VK_ACCESS_ACCELERATION_STRUCTURE_READ_BIT_KHR, VK_ACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_NV = VK_ACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_KHR, VK_ACCESS_NONE_KHR = VK_ACCESS_NONE, VK_ACCESS_COMMAND_PREPROCESS_READ_BIT_EXT = VK_ACCESS_COMMAND_PREPROCESS_READ_BIT_NV, VK_ACCESS_COMMAND_PREPROCESS_WRITE_BIT_EXT = VK_ACCESS_COMMAND_PREPROCESS_WRITE_BIT_NV, VK_ACCESS_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VkAccessFlagBits; typedef VkFlags VkAccessFlags; typedef enum VkImageAspectFlagBits { VK_IMAGE_ASPECT_COLOR_BIT = 0x00000001, VK_IMAGE_ASPECT_DEPTH_BIT = 0x00000002, VK_IMAGE_ASPECT_STENCIL_BIT = 0x00000004, VK_IMAGE_ASPECT_METADATA_BIT = 0x00000008, VK_IMAGE_ASPECT_PLANE_0_BIT = 0x00000010, VK_IMAGE_ASPECT_PLANE_1_BIT = 0x00000020, VK_IMAGE_ASPECT_PLANE_2_BIT = 0x00000040, VK_IMAGE_ASPECT_NONE = 0, VK_IMAGE_ASPECT_MEMORY_PLANE_0_BIT_EXT = 0x00000080, VK_IMAGE_ASPECT_MEMORY_PLANE_1_BIT_EXT = 0x00000100, VK_IMAGE_ASPECT_MEMORY_PLANE_2_BIT_EXT = 0x00000200, VK_IMAGE_ASPECT_MEMORY_PLANE_3_BIT_EXT = 0x00000400, VK_IMAGE_ASPECT_PLANE_0_BIT_KHR = VK_IMAGE_ASPECT_PLANE_0_BIT, VK_IMAGE_ASPECT_PLANE_1_BIT_KHR = VK_IMAGE_ASPECT_PLANE_1_BIT, VK_IMAGE_ASPECT_PLANE_2_BIT_KHR = VK_IMAGE_ASPECT_PLANE_2_BIT, VK_IMAGE_ASPECT_NONE_KHR = VK_IMAGE_ASPECT_NONE, VK_IMAGE_ASPECT_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VkImageAspectFlagBits; typedef VkFlags VkImageAspectFlags; typedef enum VkFormatFeatureFlagBits { VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT = 0x00000001, VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT = 0x00000002, VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT = 0x00000004, VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT = 0x00000008, VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT = 0x00000010, VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT = 0x00000020, VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT = 0x00000040, VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT = 0x00000080, VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT = 0x00000100, VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT = 0x00000200, VK_FORMAT_FEATURE_BLIT_SRC_BIT = 0x00000400, VK_FORMAT_FEATURE_BLIT_DST_BIT = 0x00000800, VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT = 0x00001000, VK_FORMAT_FEATURE_TRANSFER_SRC_BIT = 0x00004000, VK_FORMAT_FEATURE_TRANSFER_DST_BIT = 0x00008000, VK_FORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT = 0x00020000, VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT = 0x00040000, VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT = 0x00080000, VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_BIT = 0x00100000, VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT = 0x00200000, VK_FORMAT_FEATURE_DISJOINT_BIT = 0x00400000, VK_FORMAT_FEATURE_COSITED_CHROMA_SAMPLES_BIT = 0x00800000, VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT = 0x00010000, VK_FORMAT_FEATURE_VIDEO_DECODE_OUTPUT_BIT_KHR = 0x02000000, VK_FORMAT_FEATURE_VIDEO_DECODE_DPB_BIT_KHR = 0x04000000, VK_FORMAT_FEATURE_ACCELERATION_STRUCTURE_VERTEX_BUFFER_BIT_KHR = 0x20000000, VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT = 0x00002000, VK_FORMAT_FEATURE_FRAGMENT_DENSITY_MAP_BIT_EXT = 0x01000000, VK_FORMAT_FEATURE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR = 0x40000000, VK_FORMAT_FEATURE_VIDEO_ENCODE_INPUT_BIT_KHR = 0x08000000, VK_FORMAT_FEATURE_VIDEO_ENCODE_DPB_BIT_KHR = 0x10000000, VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_IMG = VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT, VK_FORMAT_FEATURE_TRANSFER_SRC_BIT_KHR = VK_FORMAT_FEATURE_TRANSFER_SRC_BIT, VK_FORMAT_FEATURE_TRANSFER_DST_BIT_KHR = VK_FORMAT_FEATURE_TRANSFER_DST_BIT, VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT_EXT = VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT, VK_FORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT_KHR = VK_FORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT, VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT_KHR = VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT, VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT_KHR = VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT, VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_BIT_KHR = VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_BIT, VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT_KHR = VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT, VK_FORMAT_FEATURE_DISJOINT_BIT_KHR = VK_FORMAT_FEATURE_DISJOINT_BIT, VK_FORMAT_FEATURE_COSITED_CHROMA_SAMPLES_BIT_KHR = VK_FORMAT_FEATURE_COSITED_CHROMA_SAMPLES_BIT, VK_FORMAT_FEATURE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VkFormatFeatureFlagBits; typedef VkFlags VkFormatFeatureFlags; typedef enum VkImageCreateFlagBits { VK_IMAGE_CREATE_SPARSE_BINDING_BIT = 0x00000001, VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT = 0x00000002, VK_IMAGE_CREATE_SPARSE_ALIASED_BIT = 0x00000004, VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT = 0x00000008, VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT = 0x00000010, VK_IMAGE_CREATE_ALIAS_BIT = 0x00000400, VK_IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT = 0x00000040, VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT = 0x00000020, VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT = 0x00000080, VK_IMAGE_CREATE_EXTENDED_USAGE_BIT = 0x00000100, VK_IMAGE_CREATE_PROTECTED_BIT = 0x00000800, VK_IMAGE_CREATE_DISJOINT_BIT = 0x00000200, VK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NV = 0x00002000, VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT = 0x00001000, VK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT = 0x00004000, VK_IMAGE_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT = 0x00010000, VK_IMAGE_CREATE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_BIT_EXT = 0x00040000, VK_IMAGE_CREATE_2D_VIEW_COMPATIBLE_BIT_EXT = 0x00020000, VK_IMAGE_CREATE_FRAGMENT_DENSITY_MAP_OFFSET_BIT_QCOM = 0x00008000, VK_IMAGE_CREATE_VIDEO_PROFILE_INDEPENDENT_BIT_KHR = 0x00100000, VK_IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT_KHR = VK_IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT, VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT_KHR = VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT, VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT_KHR = VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT, VK_IMAGE_CREATE_EXTENDED_USAGE_BIT_KHR = VK_IMAGE_CREATE_EXTENDED_USAGE_BIT, VK_IMAGE_CREATE_DISJOINT_BIT_KHR = VK_IMAGE_CREATE_DISJOINT_BIT, VK_IMAGE_CREATE_ALIAS_BIT_KHR = VK_IMAGE_CREATE_ALIAS_BIT, VK_IMAGE_CREATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VkImageCreateFlagBits; typedef VkFlags VkImageCreateFlags; typedef enum VkSampleCountFlagBits { VK_SAMPLE_COUNT_1_BIT = 0x00000001, VK_SAMPLE_COUNT_2_BIT = 0x00000002, VK_SAMPLE_COUNT_4_BIT = 0x00000004, VK_SAMPLE_COUNT_8_BIT = 0x00000008, VK_SAMPLE_COUNT_16_BIT = 0x00000010, VK_SAMPLE_COUNT_32_BIT = 0x00000020, VK_SAMPLE_COUNT_64_BIT = 0x00000040, VK_SAMPLE_COUNT_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VkSampleCountFlagBits; typedef VkFlags VkSampleCountFlags; typedef enum VkImageUsageFlagBits { VK_IMAGE_USAGE_TRANSFER_SRC_BIT = 0x00000001, VK_IMAGE_USAGE_TRANSFER_DST_BIT = 0x00000002, VK_IMAGE_USAGE_SAMPLED_BIT = 0x00000004, VK_IMAGE_USAGE_STORAGE_BIT = 0x00000008, VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT = 0x00000010, VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT = 0x00000020, VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT = 0x00000040, VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT = 0x00000080, VK_IMAGE_USAGE_HOST_TRANSFER_BIT = 0x00400000, VK_IMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHR = 0x00000400, VK_IMAGE_USAGE_VIDEO_DECODE_SRC_BIT_KHR = 0x00000800, VK_IMAGE_USAGE_VIDEO_DECODE_DPB_BIT_KHR = 0x00001000, VK_IMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT = 0x00000200, VK_IMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR = 0x00000100, VK_IMAGE_USAGE_VIDEO_ENCODE_DST_BIT_KHR = 0x00002000, VK_IMAGE_USAGE_VIDEO_ENCODE_SRC_BIT_KHR = 0x00004000, VK_IMAGE_USAGE_VIDEO_ENCODE_DPB_BIT_KHR = 0x00008000, VK_IMAGE_USAGE_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT = 0x00080000, VK_IMAGE_USAGE_INVOCATION_MASK_BIT_HUAWEI = 0x00040000, VK_IMAGE_USAGE_SAMPLE_WEIGHT_BIT_QCOM = 0x00100000, VK_IMAGE_USAGE_SAMPLE_BLOCK_MATCH_BIT_QCOM = 0x00200000, VK_IMAGE_USAGE_VIDEO_ENCODE_QUANTIZATION_DELTA_MAP_BIT_KHR = 0x02000000, VK_IMAGE_USAGE_VIDEO_ENCODE_EMPHASIS_MAP_BIT_KHR = 0x04000000, VK_IMAGE_USAGE_SHADING_RATE_IMAGE_BIT_NV = VK_IMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR, VK_IMAGE_USAGE_HOST_TRANSFER_BIT_EXT = VK_IMAGE_USAGE_HOST_TRANSFER_BIT, VK_IMAGE_USAGE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VkImageUsageFlagBits; typedef VkFlags VkImageUsageFlags; typedef enum VkInstanceCreateFlagBits { VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR = 0x00000001, VK_INSTANCE_CREATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VkInstanceCreateFlagBits; typedef VkFlags VkInstanceCreateFlags; typedef enum VkMemoryHeapFlagBits { VK_MEMORY_HEAP_DEVICE_LOCAL_BIT = 0x00000001, VK_MEMORY_HEAP_MULTI_INSTANCE_BIT = 0x00000002, VK_MEMORY_HEAP_MULTI_INSTANCE_BIT_KHR = VK_MEMORY_HEAP_MULTI_INSTANCE_BIT, VK_MEMORY_HEAP_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VkMemoryHeapFlagBits; typedef VkFlags VkMemoryHeapFlags; typedef enum VkMemoryPropertyFlagBits { VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT = 0x00000001, VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT = 0x00000002, VK_MEMORY_PROPERTY_HOST_COHERENT_BIT = 0x00000004, VK_MEMORY_PROPERTY_HOST_CACHED_BIT = 0x00000008, VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT = 0x00000010, VK_MEMORY_PROPERTY_PROTECTED_BIT = 0x00000020, VK_MEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMD = 0x00000040, VK_MEMORY_PROPERTY_DEVICE_UNCACHED_BIT_AMD = 0x00000080, VK_MEMORY_PROPERTY_RDMA_CAPABLE_BIT_NV = 0x00000100, VK_MEMORY_PROPERTY_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VkMemoryPropertyFlagBits; typedef VkFlags VkMemoryPropertyFlags; typedef enum VkQueueFlagBits { VK_QUEUE_GRAPHICS_BIT = 0x00000001, VK_QUEUE_COMPUTE_BIT = 0x00000002, VK_QUEUE_TRANSFER_BIT = 0x00000004, VK_QUEUE_SPARSE_BINDING_BIT = 0x00000008, VK_QUEUE_PROTECTED_BIT = 0x00000010, VK_QUEUE_VIDEO_DECODE_BIT_KHR = 0x00000020, VK_QUEUE_VIDEO_ENCODE_BIT_KHR = 0x00000040, VK_QUEUE_OPTICAL_FLOW_BIT_NV = 0x00000100, VK_QUEUE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VkQueueFlagBits; typedef VkFlags VkQueueFlags; typedef VkFlags VkDeviceCreateFlags; typedef enum VkDeviceQueueCreateFlagBits { VK_DEVICE_QUEUE_CREATE_PROTECTED_BIT = 0x00000001, VK_DEVICE_QUEUE_CREATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VkDeviceQueueCreateFlagBits; typedef VkFlags VkDeviceQueueCreateFlags; typedef enum VkPipelineStageFlagBits { VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT = 0x00000001, VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT = 0x00000002, VK_PIPELINE_STAGE_VERTEX_INPUT_BIT = 0x00000004, VK_PIPELINE_STAGE_VERTEX_SHADER_BIT = 0x00000008, VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT = 0x00000010, VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT = 0x00000020, VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT = 0x00000040, VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT = 0x00000080, VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT = 0x00000100, VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT = 0x00000200, VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT = 0x00000400, VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT = 0x00000800, VK_PIPELINE_STAGE_TRANSFER_BIT = 0x00001000, VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT = 0x00002000, VK_PIPELINE_STAGE_HOST_BIT = 0x00004000, VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT = 0x00008000, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT = 0x00010000, VK_PIPELINE_STAGE_NONE = 0, VK_PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT = 0x01000000, VK_PIPELINE_STAGE_CONDITIONAL_RENDERING_BIT_EXT = 0x00040000, VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR = 0x02000000, VK_PIPELINE_STAGE_RAY_TRACING_SHADER_BIT_KHR = 0x00200000, VK_PIPELINE_STAGE_FRAGMENT_DENSITY_PROCESS_BIT_EXT = 0x00800000, VK_PIPELINE_STAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR = 0x00400000, VK_PIPELINE_STAGE_COMMAND_PREPROCESS_BIT_NV = 0x00020000, VK_PIPELINE_STAGE_TASK_SHADER_BIT_EXT = 0x00080000, VK_PIPELINE_STAGE_MESH_SHADER_BIT_EXT = 0x00100000, VK_PIPELINE_STAGE_SHADING_RATE_IMAGE_BIT_NV = VK_PIPELINE_STAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR, VK_PIPELINE_STAGE_RAY_TRACING_SHADER_BIT_NV = VK_PIPELINE_STAGE_RAY_TRACING_SHADER_BIT_KHR, VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_NV = VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR, VK_PIPELINE_STAGE_TASK_SHADER_BIT_NV = VK_PIPELINE_STAGE_TASK_SHADER_BIT_EXT, VK_PIPELINE_STAGE_MESH_SHADER_BIT_NV = VK_PIPELINE_STAGE_MESH_SHADER_BIT_EXT, VK_PIPELINE_STAGE_NONE_KHR = VK_PIPELINE_STAGE_NONE, VK_PIPELINE_STAGE_COMMAND_PREPROCESS_BIT_EXT = VK_PIPELINE_STAGE_COMMAND_PREPROCESS_BIT_NV, VK_PIPELINE_STAGE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VkPipelineStageFlagBits; typedef VkFlags VkPipelineStageFlags; typedef enum VkMemoryMapFlagBits { VK_MEMORY_MAP_PLACED_BIT_EXT = 0x00000001, VK_MEMORY_MAP_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VkMemoryMapFlagBits; typedef VkFlags VkMemoryMapFlags; typedef enum VkSparseMemoryBindFlagBits { VK_SPARSE_MEMORY_BIND_METADATA_BIT = 0x00000001, VK_SPARSE_MEMORY_BIND_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VkSparseMemoryBindFlagBits; typedef VkFlags VkSparseMemoryBindFlags; typedef enum VkSparseImageFormatFlagBits { VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT = 0x00000001, VK_SPARSE_IMAGE_FORMAT_ALIGNED_MIP_SIZE_BIT = 0x00000002, VK_SPARSE_IMAGE_FORMAT_NONSTANDARD_BLOCK_SIZE_BIT = 0x00000004, VK_SPARSE_IMAGE_FORMAT_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VkSparseImageFormatFlagBits; typedef VkFlags VkSparseImageFormatFlags; typedef enum VkFenceCreateFlagBits { VK_FENCE_CREATE_SIGNALED_BIT = 0x00000001, VK_FENCE_CREATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VkFenceCreateFlagBits; typedef VkFlags VkFenceCreateFlags; typedef VkFlags VkSemaphoreCreateFlags; typedef enum VkEventCreateFlagBits { VK_EVENT_CREATE_DEVICE_ONLY_BIT = 0x00000001, VK_EVENT_CREATE_DEVICE_ONLY_BIT_KHR = VK_EVENT_CREATE_DEVICE_ONLY_BIT, VK_EVENT_CREATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VkEventCreateFlagBits; typedef VkFlags VkEventCreateFlags; typedef enum VkQueryPipelineStatisticFlagBits { VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_VERTICES_BIT = 0x00000001, VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_PRIMITIVES_BIT = 0x00000002, VK_QUERY_PIPELINE_STATISTIC_VERTEX_SHADER_INVOCATIONS_BIT = 0x00000004, VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_INVOCATIONS_BIT = 0x00000008, VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_PRIMITIVES_BIT = 0x00000010, VK_QUERY_PIPELINE_STATISTIC_CLIPPING_INVOCATIONS_BIT = 0x00000020, VK_QUERY_PIPELINE_STATISTIC_CLIPPING_PRIMITIVES_BIT = 0x00000040, VK_QUERY_PIPELINE_STATISTIC_FRAGMENT_SHADER_INVOCATIONS_BIT = 0x00000080, VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_CONTROL_SHADER_PATCHES_BIT = 0x00000100, VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_EVALUATION_SHADER_INVOCATIONS_BIT = 0x00000200, VK_QUERY_PIPELINE_STATISTIC_COMPUTE_SHADER_INVOCATIONS_BIT = 0x00000400, VK_QUERY_PIPELINE_STATISTIC_TASK_SHADER_INVOCATIONS_BIT_EXT = 0x00000800, VK_QUERY_PIPELINE_STATISTIC_MESH_SHADER_INVOCATIONS_BIT_EXT = 0x00001000, VK_QUERY_PIPELINE_STATISTIC_CLUSTER_CULLING_SHADER_INVOCATIONS_BIT_HUAWEI = 0x00002000, VK_QUERY_PIPELINE_STATISTIC_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VkQueryPipelineStatisticFlagBits; typedef VkFlags VkQueryPipelineStatisticFlags; typedef VkFlags VkQueryPoolCreateFlags; typedef enum VkQueryResultFlagBits { VK_QUERY_RESULT_64_BIT = 0x00000001, VK_QUERY_RESULT_WAIT_BIT = 0x00000002, VK_QUERY_RESULT_WITH_AVAILABILITY_BIT = 0x00000004, VK_QUERY_RESULT_PARTIAL_BIT = 0x00000008, VK_QUERY_RESULT_WITH_STATUS_BIT_KHR = 0x00000010, VK_QUERY_RESULT_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VkQueryResultFlagBits; typedef VkFlags VkQueryResultFlags; typedef enum VkBufferCreateFlagBits { VK_BUFFER_CREATE_SPARSE_BINDING_BIT = 0x00000001, VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT = 0x00000002, VK_BUFFER_CREATE_SPARSE_ALIASED_BIT = 0x00000004, VK_BUFFER_CREATE_PROTECTED_BIT = 0x00000008, VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT = 0x00000010, VK_BUFFER_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT = 0x00000020, VK_BUFFER_CREATE_VIDEO_PROFILE_INDEPENDENT_BIT_KHR = 0x00000040, VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_EXT = VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT, VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_KHR = VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT, VK_BUFFER_CREATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VkBufferCreateFlagBits; typedef VkFlags VkBufferCreateFlags; typedef enum VkBufferUsageFlagBits { VK_BUFFER_USAGE_TRANSFER_SRC_BIT = 0x00000001, VK_BUFFER_USAGE_TRANSFER_DST_BIT = 0x00000002, VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT = 0x00000004, VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT = 0x00000008, VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT = 0x00000010, VK_BUFFER_USAGE_STORAGE_BUFFER_BIT = 0x00000020, VK_BUFFER_USAGE_INDEX_BUFFER_BIT = 0x00000040, VK_BUFFER_USAGE_VERTEX_BUFFER_BIT = 0x00000080, VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT = 0x00000100, VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT = 0x00020000, VK_BUFFER_USAGE_VIDEO_DECODE_SRC_BIT_KHR = 0x00002000, VK_BUFFER_USAGE_VIDEO_DECODE_DST_BIT_KHR = 0x00004000, VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT = 0x00000800, VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_COUNTER_BUFFER_BIT_EXT = 0x00001000, VK_BUFFER_USAGE_CONDITIONAL_RENDERING_BIT_EXT = 0x00000200, #ifdef VK_ENABLE_BETA_EXTENSIONS VK_BUFFER_USAGE_EXECUTION_GRAPH_SCRATCH_BIT_AMDX = 0x02000000, #endif VK_BUFFER_USAGE_ACCELERATION_STRUCTURE_BUILD_INPUT_READ_ONLY_BIT_KHR = 0x00080000, VK_BUFFER_USAGE_ACCELERATION_STRUCTURE_STORAGE_BIT_KHR = 0x00100000, VK_BUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHR = 0x00000400, VK_BUFFER_USAGE_VIDEO_ENCODE_DST_BIT_KHR = 0x00008000, VK_BUFFER_USAGE_VIDEO_ENCODE_SRC_BIT_KHR = 0x00010000, VK_BUFFER_USAGE_SAMPLER_DESCRIPTOR_BUFFER_BIT_EXT = 0x00200000, VK_BUFFER_USAGE_RESOURCE_DESCRIPTOR_BUFFER_BIT_EXT = 0x00400000, VK_BUFFER_USAGE_PUSH_DESCRIPTORS_DESCRIPTOR_BUFFER_BIT_EXT = 0x04000000, VK_BUFFER_USAGE_MICROMAP_BUILD_INPUT_READ_ONLY_BIT_EXT = 0x00800000, VK_BUFFER_USAGE_MICROMAP_STORAGE_BIT_EXT = 0x01000000, VK_BUFFER_USAGE_RAY_TRACING_BIT_NV = VK_BUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHR, VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT_EXT = VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT, VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT_KHR = VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT, VK_BUFFER_USAGE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VkBufferUsageFlagBits; typedef VkFlags VkBufferUsageFlags; typedef VkFlags VkBufferViewCreateFlags; typedef enum VkImageViewCreateFlagBits { VK_IMAGE_VIEW_CREATE_FRAGMENT_DENSITY_MAP_DYNAMIC_BIT_EXT = 0x00000001, VK_IMAGE_VIEW_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT = 0x00000004, VK_IMAGE_VIEW_CREATE_FRAGMENT_DENSITY_MAP_DEFERRED_BIT_EXT = 0x00000002, VK_IMAGE_VIEW_CREATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VkImageViewCreateFlagBits; typedef VkFlags VkImageViewCreateFlags; typedef VkFlags VkShaderModuleCreateFlags; typedef enum VkPipelineCacheCreateFlagBits { VK_PIPELINE_CACHE_CREATE_EXTERNALLY_SYNCHRONIZED_BIT = 0x00000001, VK_PIPELINE_CACHE_CREATE_INTERNALLY_SYNCHRONIZED_MERGE_BIT_KHR = 0x00000008, VK_PIPELINE_CACHE_CREATE_EXTERNALLY_SYNCHRONIZED_BIT_EXT = VK_PIPELINE_CACHE_CREATE_EXTERNALLY_SYNCHRONIZED_BIT, VK_PIPELINE_CACHE_CREATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VkPipelineCacheCreateFlagBits; typedef VkFlags VkPipelineCacheCreateFlags; typedef enum VkColorComponentFlagBits { VK_COLOR_COMPONENT_R_BIT = 0x00000001, VK_COLOR_COMPONENT_G_BIT = 0x00000002, VK_COLOR_COMPONENT_B_BIT = 0x00000004, VK_COLOR_COMPONENT_A_BIT = 0x00000008, VK_COLOR_COMPONENT_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VkColorComponentFlagBits; typedef VkFlags VkColorComponentFlags; typedef enum VkPipelineCreateFlagBits { VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT = 0x00000001, VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT = 0x00000002, VK_PIPELINE_CREATE_DERIVATIVE_BIT = 0x00000004, VK_PIPELINE_CREATE_VIEW_INDEX_FROM_DEVICE_INDEX_BIT = 0x00000008, VK_PIPELINE_CREATE_DISPATCH_BASE_BIT = 0x00000010, VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT = 0x00000100, VK_PIPELINE_CREATE_EARLY_RETURN_ON_FAILURE_BIT = 0x00000200, VK_PIPELINE_CREATE_NO_PROTECTED_ACCESS_BIT = 0x08000000, VK_PIPELINE_CREATE_PROTECTED_ACCESS_ONLY_BIT = 0x40000000, VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHR = 0x00004000, VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR = 0x00008000, VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_MISS_SHADERS_BIT_KHR = 0x00010000, VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR = 0x00020000, VK_PIPELINE_CREATE_RAY_TRACING_SKIP_TRIANGLES_BIT_KHR = 0x00001000, VK_PIPELINE_CREATE_RAY_TRACING_SKIP_AABBS_BIT_KHR = 0x00002000, VK_PIPELINE_CREATE_RAY_TRACING_SHADER_GROUP_HANDLE_CAPTURE_REPLAY_BIT_KHR = 0x00080000, VK_PIPELINE_CREATE_DEFER_COMPILE_BIT_NV = 0x00000020, VK_PIPELINE_CREATE_RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT = 0x00400000, VK_PIPELINE_CREATE_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR = 0x00200000, VK_PIPELINE_CREATE_CAPTURE_STATISTICS_BIT_KHR = 0x00000040, VK_PIPELINE_CREATE_CAPTURE_INTERNAL_REPRESENTATIONS_BIT_KHR = 0x00000080, VK_PIPELINE_CREATE_INDIRECT_BINDABLE_BIT_NV = 0x00040000, VK_PIPELINE_CREATE_LIBRARY_BIT_KHR = 0x00000800, VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT = 0x20000000, VK_PIPELINE_CREATE_RETAIN_LINK_TIME_OPTIMIZATION_INFO_BIT_EXT = 0x00800000, VK_PIPELINE_CREATE_LINK_TIME_OPTIMIZATION_BIT_EXT = 0x00000400, VK_PIPELINE_CREATE_RAY_TRACING_ALLOW_MOTION_BIT_NV = 0x00100000, VK_PIPELINE_CREATE_COLOR_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT = 0x02000000, VK_PIPELINE_CREATE_DEPTH_STENCIL_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT = 0x04000000, VK_PIPELINE_CREATE_RAY_TRACING_OPACITY_MICROMAP_BIT_EXT = 0x01000000, #ifdef VK_ENABLE_BETA_EXTENSIONS VK_PIPELINE_CREATE_RAY_TRACING_DISPLACEMENT_MICROMAP_BIT_NV = 0x10000000, #endif VK_PIPELINE_CREATE_DISPATCH_BASE = VK_PIPELINE_CREATE_DISPATCH_BASE_BIT, VK_PIPELINE_CREATE_VIEW_INDEX_FROM_DEVICE_INDEX_BIT_KHR = VK_PIPELINE_CREATE_VIEW_INDEX_FROM_DEVICE_INDEX_BIT, VK_PIPELINE_CREATE_DISPATCH_BASE_KHR = VK_PIPELINE_CREATE_DISPATCH_BASE, // VK_PIPELINE_RASTERIZATION_STATE_CREATE_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT is a deprecated alias VK_PIPELINE_RASTERIZATION_STATE_CREATE_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT = VK_PIPELINE_CREATE_RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT, // VK_PIPELINE_RASTERIZATION_STATE_CREATE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR is a deprecated alias VK_PIPELINE_RASTERIZATION_STATE_CREATE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR = VK_PIPELINE_CREATE_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR, VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT_EXT = VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT, VK_PIPELINE_CREATE_EARLY_RETURN_ON_FAILURE_BIT_EXT = VK_PIPELINE_CREATE_EARLY_RETURN_ON_FAILURE_BIT, VK_PIPELINE_CREATE_NO_PROTECTED_ACCESS_BIT_EXT = VK_PIPELINE_CREATE_NO_PROTECTED_ACCESS_BIT, VK_PIPELINE_CREATE_PROTECTED_ACCESS_ONLY_BIT_EXT = VK_PIPELINE_CREATE_PROTECTED_ACCESS_ONLY_BIT, VK_PIPELINE_CREATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VkPipelineCreateFlagBits; typedef VkFlags VkPipelineCreateFlags; typedef enum VkPipelineShaderStageCreateFlagBits { VK_PIPELINE_SHADER_STAGE_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT = 0x00000001, VK_PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT = 0x00000002, VK_PIPELINE_SHADER_STAGE_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT_EXT = VK_PIPELINE_SHADER_STAGE_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT, VK_PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT_EXT = VK_PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT, VK_PIPELINE_SHADER_STAGE_CREATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VkPipelineShaderStageCreateFlagBits; typedef VkFlags VkPipelineShaderStageCreateFlags; typedef enum VkShaderStageFlagBits { VK_SHADER_STAGE_VERTEX_BIT = 0x00000001, VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT = 0x00000002, VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT = 0x00000004, VK_SHADER_STAGE_GEOMETRY_BIT = 0x00000008, VK_SHADER_STAGE_FRAGMENT_BIT = 0x00000010, VK_SHADER_STAGE_COMPUTE_BIT = 0x00000020, VK_SHADER_STAGE_ALL_GRAPHICS = 0x0000001F, VK_SHADER_STAGE_ALL = 0x7FFFFFFF, VK_SHADER_STAGE_RAYGEN_BIT_KHR = 0x00000100, VK_SHADER_STAGE_ANY_HIT_BIT_KHR = 0x00000200, VK_SHADER_STAGE_CLOSEST_HIT_BIT_KHR = 0x00000400, VK_SHADER_STAGE_MISS_BIT_KHR = 0x00000800, VK_SHADER_STAGE_INTERSECTION_BIT_KHR = 0x00001000, VK_SHADER_STAGE_CALLABLE_BIT_KHR = 0x00002000, VK_SHADER_STAGE_TASK_BIT_EXT = 0x00000040, VK_SHADER_STAGE_MESH_BIT_EXT = 0x00000080, VK_SHADER_STAGE_SUBPASS_SHADING_BIT_HUAWEI = 0x00004000, VK_SHADER_STAGE_CLUSTER_CULLING_BIT_HUAWEI = 0x00080000, VK_SHADER_STAGE_RAYGEN_BIT_NV = VK_SHADER_STAGE_RAYGEN_BIT_KHR, VK_SHADER_STAGE_ANY_HIT_BIT_NV = VK_SHADER_STAGE_ANY_HIT_BIT_KHR, VK_SHADER_STAGE_CLOSEST_HIT_BIT_NV = VK_SHADER_STAGE_CLOSEST_HIT_BIT_KHR, VK_SHADER_STAGE_MISS_BIT_NV = VK_SHADER_STAGE_MISS_BIT_KHR, VK_SHADER_STAGE_INTERSECTION_BIT_NV = VK_SHADER_STAGE_INTERSECTION_BIT_KHR, VK_SHADER_STAGE_CALLABLE_BIT_NV = VK_SHADER_STAGE_CALLABLE_BIT_KHR, VK_SHADER_STAGE_TASK_BIT_NV = VK_SHADER_STAGE_TASK_BIT_EXT, VK_SHADER_STAGE_MESH_BIT_NV = VK_SHADER_STAGE_MESH_BIT_EXT, VK_SHADER_STAGE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VkShaderStageFlagBits; typedef enum VkCullModeFlagBits { VK_CULL_MODE_NONE = 0, VK_CULL_MODE_FRONT_BIT = 0x00000001, VK_CULL_MODE_BACK_BIT = 0x00000002, VK_CULL_MODE_FRONT_AND_BACK = 0x00000003, VK_CULL_MODE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VkCullModeFlagBits; typedef VkFlags VkCullModeFlags; typedef VkFlags VkPipelineVertexInputStateCreateFlags; typedef VkFlags VkPipelineInputAssemblyStateCreateFlags; typedef VkFlags VkPipelineTessellationStateCreateFlags; typedef VkFlags VkPipelineViewportStateCreateFlags; typedef VkFlags VkPipelineRasterizationStateCreateFlags; typedef VkFlags VkPipelineMultisampleStateCreateFlags; typedef enum VkPipelineDepthStencilStateCreateFlagBits { VK_PIPELINE_DEPTH_STENCIL_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_DEPTH_ACCESS_BIT_EXT = 0x00000001, VK_PIPELINE_DEPTH_STENCIL_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_STENCIL_ACCESS_BIT_EXT = 0x00000002, VK_PIPELINE_DEPTH_STENCIL_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_DEPTH_ACCESS_BIT_ARM = VK_PIPELINE_DEPTH_STENCIL_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_DEPTH_ACCESS_BIT_EXT, VK_PIPELINE_DEPTH_STENCIL_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_STENCIL_ACCESS_BIT_ARM = VK_PIPELINE_DEPTH_STENCIL_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_STENCIL_ACCESS_BIT_EXT, VK_PIPELINE_DEPTH_STENCIL_STATE_CREATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VkPipelineDepthStencilStateCreateFlagBits; typedef VkFlags VkPipelineDepthStencilStateCreateFlags; typedef enum VkPipelineColorBlendStateCreateFlagBits { VK_PIPELINE_COLOR_BLEND_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_BIT_EXT = 0x00000001, VK_PIPELINE_COLOR_BLEND_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_BIT_ARM = VK_PIPELINE_COLOR_BLEND_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_BIT_EXT, VK_PIPELINE_COLOR_BLEND_STATE_CREATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VkPipelineColorBlendStateCreateFlagBits; typedef VkFlags VkPipelineColorBlendStateCreateFlags; typedef VkFlags VkPipelineDynamicStateCreateFlags; typedef enum VkPipelineLayoutCreateFlagBits { VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT = 0x00000002, VK_PIPELINE_LAYOUT_CREATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VkPipelineLayoutCreateFlagBits; typedef VkFlags VkPipelineLayoutCreateFlags; typedef VkFlags VkShaderStageFlags; typedef enum VkSamplerCreateFlagBits { VK_SAMPLER_CREATE_SUBSAMPLED_BIT_EXT = 0x00000001, VK_SAMPLER_CREATE_SUBSAMPLED_COARSE_RECONSTRUCTION_BIT_EXT = 0x00000002, VK_SAMPLER_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT = 0x00000008, VK_SAMPLER_CREATE_NON_SEAMLESS_CUBE_MAP_BIT_EXT = 0x00000004, VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM = 0x00000010, VK_SAMPLER_CREATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VkSamplerCreateFlagBits; typedef VkFlags VkSamplerCreateFlags; typedef enum VkDescriptorPoolCreateFlagBits { VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT = 0x00000001, VK_DESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT = 0x00000002, VK_DESCRIPTOR_POOL_CREATE_HOST_ONLY_BIT_EXT = 0x00000004, VK_DESCRIPTOR_POOL_CREATE_ALLOW_OVERALLOCATION_SETS_BIT_NV = 0x00000008, VK_DESCRIPTOR_POOL_CREATE_ALLOW_OVERALLOCATION_POOLS_BIT_NV = 0x00000010, VK_DESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT_EXT = VK_DESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT, VK_DESCRIPTOR_POOL_CREATE_HOST_ONLY_BIT_VALVE = VK_DESCRIPTOR_POOL_CREATE_HOST_ONLY_BIT_EXT, VK_DESCRIPTOR_POOL_CREATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VkDescriptorPoolCreateFlagBits; typedef VkFlags VkDescriptorPoolCreateFlags; typedef VkFlags VkDescriptorPoolResetFlags; typedef enum VkDescriptorSetLayoutCreateFlagBits { VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT = 0x00000002, VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT = 0x00000001, VK_DESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT = 0x00000010, VK_DESCRIPTOR_SET_LAYOUT_CREATE_EMBEDDED_IMMUTABLE_SAMPLERS_BIT_EXT = 0x00000020, VK_DESCRIPTOR_SET_LAYOUT_CREATE_INDIRECT_BINDABLE_BIT_NV = 0x00000080, VK_DESCRIPTOR_SET_LAYOUT_CREATE_HOST_ONLY_POOL_BIT_EXT = 0x00000004, VK_DESCRIPTOR_SET_LAYOUT_CREATE_PER_STAGE_BIT_NV = 0x00000040, VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR = VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT, VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT_EXT = VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT, VK_DESCRIPTOR_SET_LAYOUT_CREATE_HOST_ONLY_POOL_BIT_VALVE = VK_DESCRIPTOR_SET_LAYOUT_CREATE_HOST_ONLY_POOL_BIT_EXT, VK_DESCRIPTOR_SET_LAYOUT_CREATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VkDescriptorSetLayoutCreateFlagBits; typedef VkFlags VkDescriptorSetLayoutCreateFlags; typedef enum VkAttachmentDescriptionFlagBits { VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT = 0x00000001, VK_ATTACHMENT_DESCRIPTION_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VkAttachmentDescriptionFlagBits; typedef VkFlags VkAttachmentDescriptionFlags; typedef enum VkDependencyFlagBits { VK_DEPENDENCY_BY_REGION_BIT = 0x00000001, VK_DEPENDENCY_DEVICE_GROUP_BIT = 0x00000004, VK_DEPENDENCY_VIEW_LOCAL_BIT = 0x00000002, VK_DEPENDENCY_FEEDBACK_LOOP_BIT_EXT = 0x00000008, VK_DEPENDENCY_QUEUE_FAMILY_OWNERSHIP_TRANSFER_USE_ALL_STAGES_BIT_KHR = 0x00000020, VK_DEPENDENCY_VIEW_LOCAL_BIT_KHR = VK_DEPENDENCY_VIEW_LOCAL_BIT, VK_DEPENDENCY_DEVICE_GROUP_BIT_KHR = VK_DEPENDENCY_DEVICE_GROUP_BIT, VK_DEPENDENCY_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VkDependencyFlagBits; typedef VkFlags VkDependencyFlags; typedef enum VkFramebufferCreateFlagBits { VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT = 0x00000001, VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT_KHR = VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, VK_FRAMEBUFFER_CREATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VkFramebufferCreateFlagBits; typedef VkFlags VkFramebufferCreateFlags; typedef enum VkRenderPassCreateFlagBits { VK_RENDER_PASS_CREATE_TRANSFORM_BIT_QCOM = 0x00000002, VK_RENDER_PASS_CREATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VkRenderPassCreateFlagBits; typedef VkFlags VkRenderPassCreateFlags; typedef enum VkSubpassDescriptionFlagBits { VK_SUBPASS_DESCRIPTION_PER_VIEW_ATTRIBUTES_BIT_NVX = 0x00000001, VK_SUBPASS_DESCRIPTION_PER_VIEW_POSITION_X_ONLY_BIT_NVX = 0x00000002, VK_SUBPASS_DESCRIPTION_FRAGMENT_REGION_BIT_QCOM = 0x00000004, VK_SUBPASS_DESCRIPTION_SHADER_RESOLVE_BIT_QCOM = 0x00000008, VK_SUBPASS_DESCRIPTION_RASTERIZATION_ORDER_ATTACHMENT_COLOR_ACCESS_BIT_EXT = 0x00000010, VK_SUBPASS_DESCRIPTION_RASTERIZATION_ORDER_ATTACHMENT_DEPTH_ACCESS_BIT_EXT = 0x00000020, VK_SUBPASS_DESCRIPTION_RASTERIZATION_ORDER_ATTACHMENT_STENCIL_ACCESS_BIT_EXT = 0x00000040, VK_SUBPASS_DESCRIPTION_ENABLE_LEGACY_DITHERING_BIT_EXT = 0x00000080, VK_SUBPASS_DESCRIPTION_RASTERIZATION_ORDER_ATTACHMENT_COLOR_ACCESS_BIT_ARM = VK_SUBPASS_DESCRIPTION_RASTERIZATION_ORDER_ATTACHMENT_COLOR_ACCESS_BIT_EXT, VK_SUBPASS_DESCRIPTION_RASTERIZATION_ORDER_ATTACHMENT_DEPTH_ACCESS_BIT_ARM = VK_SUBPASS_DESCRIPTION_RASTERIZATION_ORDER_ATTACHMENT_DEPTH_ACCESS_BIT_EXT, VK_SUBPASS_DESCRIPTION_RASTERIZATION_ORDER_ATTACHMENT_STENCIL_ACCESS_BIT_ARM = VK_SUBPASS_DESCRIPTION_RASTERIZATION_ORDER_ATTACHMENT_STENCIL_ACCESS_BIT_EXT, VK_SUBPASS_DESCRIPTION_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VkSubpassDescriptionFlagBits; typedef VkFlags VkSubpassDescriptionFlags; typedef enum VkCommandPoolCreateFlagBits { VK_COMMAND_POOL_CREATE_TRANSIENT_BIT = 0x00000001, VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT = 0x00000002, VK_COMMAND_POOL_CREATE_PROTECTED_BIT = 0x00000004, VK_COMMAND_POOL_CREATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VkCommandPoolCreateFlagBits; typedef VkFlags VkCommandPoolCreateFlags; typedef enum VkCommandPoolResetFlagBits { VK_COMMAND_POOL_RESET_RELEASE_RESOURCES_BIT = 0x00000001, VK_COMMAND_POOL_RESET_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VkCommandPoolResetFlagBits; typedef VkFlags VkCommandPoolResetFlags; typedef enum VkCommandBufferUsageFlagBits { VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT = 0x00000001, VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT = 0x00000002, VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT = 0x00000004, VK_COMMAND_BUFFER_USAGE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VkCommandBufferUsageFlagBits; typedef VkFlags VkCommandBufferUsageFlags; typedef enum VkQueryControlFlagBits { VK_QUERY_CONTROL_PRECISE_BIT = 0x00000001, VK_QUERY_CONTROL_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VkQueryControlFlagBits; typedef VkFlags VkQueryControlFlags; typedef enum VkCommandBufferResetFlagBits { VK_COMMAND_BUFFER_RESET_RELEASE_RESOURCES_BIT = 0x00000001, VK_COMMAND_BUFFER_RESET_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VkCommandBufferResetFlagBits; typedef VkFlags VkCommandBufferResetFlags; typedef enum VkStencilFaceFlagBits { VK_STENCIL_FACE_FRONT_BIT = 0x00000001, VK_STENCIL_FACE_BACK_BIT = 0x00000002, VK_STENCIL_FACE_FRONT_AND_BACK = 0x00000003, // VK_STENCIL_FRONT_AND_BACK is a deprecated alias VK_STENCIL_FRONT_AND_BACK = VK_STENCIL_FACE_FRONT_AND_BACK, VK_STENCIL_FACE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VkStencilFaceFlagBits; typedef VkFlags VkStencilFaceFlags; typedef struct VkExtent2D { uint32_t width; uint32_t height; } VkExtent2D; typedef struct VkExtent3D { uint32_t width; uint32_t height; uint32_t depth; } VkExtent3D; typedef struct VkOffset2D { int32_t x; int32_t y; } VkOffset2D; typedef struct VkOffset3D { int32_t x; int32_t y; int32_t z; } VkOffset3D; typedef struct VkRect2D { VkOffset2D offset; VkExtent2D extent; } VkRect2D; typedef struct VkBaseInStructure { VkStructureType sType; const struct VkBaseInStructure* pNext; } VkBaseInStructure; typedef struct VkBaseOutStructure { VkStructureType sType; struct VkBaseOutStructure* pNext; } VkBaseOutStructure; typedef struct VkBufferMemoryBarrier { VkStructureType sType; const void* pNext; VkAccessFlags srcAccessMask; VkAccessFlags dstAccessMask; uint32_t srcQueueFamilyIndex; uint32_t dstQueueFamilyIndex; VkBuffer buffer; VkDeviceSize offset; VkDeviceSize size; } VkBufferMemoryBarrier; typedef struct VkDispatchIndirectCommand { uint32_t x; uint32_t y; uint32_t z; } VkDispatchIndirectCommand; typedef struct VkDrawIndexedIndirectCommand { uint32_t indexCount; uint32_t instanceCount; uint32_t firstIndex; int32_t vertexOffset; uint32_t firstInstance; } VkDrawIndexedIndirectCommand; typedef struct VkDrawIndirectCommand { uint32_t vertexCount; uint32_t instanceCount; uint32_t firstVertex; uint32_t firstInstance; } VkDrawIndirectCommand; typedef struct VkImageSubresourceRange { VkImageAspectFlags aspectMask; uint32_t baseMipLevel; uint32_t levelCount; uint32_t baseArrayLayer; uint32_t layerCount; } VkImageSubresourceRange; typedef struct VkImageMemoryBarrier { VkStructureType sType; const void* pNext; VkAccessFlags srcAccessMask; VkAccessFlags dstAccessMask; VkImageLayout oldLayout; VkImageLayout newLayout; uint32_t srcQueueFamilyIndex; uint32_t dstQueueFamilyIndex; VkImage image; VkImageSubresourceRange subresourceRange; } VkImageMemoryBarrier; typedef struct VkMemoryBarrier { VkStructureType sType; const void* pNext; VkAccessFlags srcAccessMask; VkAccessFlags dstAccessMask; } VkMemoryBarrier; typedef struct VkPipelineCacheHeaderVersionOne { uint32_t headerSize; VkPipelineCacheHeaderVersion headerVersion; uint32_t vendorID; uint32_t deviceID; uint8_t pipelineCacheUUID[VK_UUID_SIZE]; } VkPipelineCacheHeaderVersionOne; typedef void* (VKAPI_PTR *PFN_vkAllocationFunction)( void* pUserData, size_t size, size_t alignment, VkSystemAllocationScope allocationScope); typedef void (VKAPI_PTR *PFN_vkFreeFunction)( void* pUserData, void* pMemory); typedef void (VKAPI_PTR *PFN_vkInternalAllocationNotification)( void* pUserData, size_t size, VkInternalAllocationType allocationType, VkSystemAllocationScope allocationScope); typedef void (VKAPI_PTR *PFN_vkInternalFreeNotification)( void* pUserData, size_t size, VkInternalAllocationType allocationType, VkSystemAllocationScope allocationScope); typedef void* (VKAPI_PTR *PFN_vkReallocationFunction)( void* pUserData, void* pOriginal, size_t size, size_t alignment, VkSystemAllocationScope allocationScope); typedef void (VKAPI_PTR *PFN_vkVoidFunction)(void); typedef struct VkAllocationCallbacks { void* pUserData; PFN_vkAllocationFunction pfnAllocation; PFN_vkReallocationFunction pfnReallocation; PFN_vkFreeFunction pfnFree; PFN_vkInternalAllocationNotification pfnInternalAllocation; PFN_vkInternalFreeNotification pfnInternalFree; } VkAllocationCallbacks; typedef struct VkApplicationInfo { VkStructureType sType; const void* pNext; const char* pApplicationName; uint32_t applicationVersion; const char* pEngineName; uint32_t engineVersion; uint32_t apiVersion; } VkApplicationInfo; typedef struct VkFormatProperties { VkFormatFeatureFlags linearTilingFeatures; VkFormatFeatureFlags optimalTilingFeatures; VkFormatFeatureFlags bufferFeatures; } VkFormatProperties; typedef struct VkImageFormatProperties { VkExtent3D maxExtent; uint32_t maxMipLevels; uint32_t maxArrayLayers; VkSampleCountFlags sampleCounts; VkDeviceSize maxResourceSize; } VkImageFormatProperties; typedef struct VkInstanceCreateInfo { VkStructureType sType; const void* pNext; VkInstanceCreateFlags flags; const VkApplicationInfo* pApplicationInfo; uint32_t enabledLayerCount; const char* const* ppEnabledLayerNames; uint32_t enabledExtensionCount; const char* const* ppEnabledExtensionNames; } VkInstanceCreateInfo; typedef struct VkMemoryHeap { VkDeviceSize size; VkMemoryHeapFlags flags; } VkMemoryHeap; typedef struct VkMemoryType { VkMemoryPropertyFlags propertyFlags; uint32_t heapIndex; } VkMemoryType; typedef struct VkPhysicalDeviceFeatures { VkBool32 robustBufferAccess; VkBool32 fullDrawIndexUint32; VkBool32 imageCubeArray; VkBool32 independentBlend; VkBool32 geometryShader; VkBool32 tessellationShader; VkBool32 sampleRateShading; VkBool32 dualSrcBlend; VkBool32 logicOp; VkBool32 multiDrawIndirect; VkBool32 drawIndirectFirstInstance; VkBool32 depthClamp; VkBool32 depthBiasClamp; VkBool32 fillModeNonSolid; VkBool32 depthBounds; VkBool32 wideLines; VkBool32 largePoints; VkBool32 alphaToOne; VkBool32 multiViewport; VkBool32 samplerAnisotropy; VkBool32 textureCompressionETC2; VkBool32 textureCompressionASTC_LDR; VkBool32 textureCompressionBC; VkBool32 occlusionQueryPrecise; VkBool32 pipelineStatisticsQuery; VkBool32 vertexPipelineStoresAndAtomics; VkBool32 fragmentStoresAndAtomics; VkBool32 shaderTessellationAndGeometryPointSize; VkBool32 shaderImageGatherExtended; VkBool32 shaderStorageImageExtendedFormats; VkBool32 shaderStorageImageMultisample; VkBool32 shaderStorageImageReadWithoutFormat; VkBool32 shaderStorageImageWriteWithoutFormat; VkBool32 shaderUniformBufferArrayDynamicIndexing; VkBool32 shaderSampledImageArrayDynamicIndexing; VkBool32 shaderStorageBufferArrayDynamicIndexing; VkBool32 shaderStorageImageArrayDynamicIndexing; VkBool32 shaderClipDistance; VkBool32 shaderCullDistance; VkBool32 shaderFloat64; VkBool32 shaderInt64; VkBool32 shaderInt16; VkBool32 shaderResourceResidency; VkBool32 shaderResourceMinLod; VkBool32 sparseBinding; VkBool32 sparseResidencyBuffer; VkBool32 sparseResidencyImage2D; VkBool32 sparseResidencyImage3D; VkBool32 sparseResidency2Samples; VkBool32 sparseResidency4Samples; VkBool32 sparseResidency8Samples; VkBool32 sparseResidency16Samples; VkBool32 sparseResidencyAliased; VkBool32 variableMultisampleRate; VkBool32 inheritedQueries; } VkPhysicalDeviceFeatures; typedef struct VkPhysicalDeviceLimits { uint32_t maxImageDimension1D; uint32_t maxImageDimension2D; uint32_t maxImageDimension3D; uint32_t maxImageDimensionCube; uint32_t maxImageArrayLayers; uint32_t maxTexelBufferElements; uint32_t maxUniformBufferRange; uint32_t maxStorageBufferRange; uint32_t maxPushConstantsSize; uint32_t maxMemoryAllocationCount; uint32_t maxSamplerAllocationCount; VkDeviceSize bufferImageGranularity; VkDeviceSize sparseAddressSpaceSize; uint32_t maxBoundDescriptorSets; uint32_t maxPerStageDescriptorSamplers; uint32_t maxPerStageDescriptorUniformBuffers; uint32_t maxPerStageDescriptorStorageBuffers; uint32_t maxPerStageDescriptorSampledImages; uint32_t maxPerStageDescriptorStorageImages; uint32_t maxPerStageDescriptorInputAttachments; uint32_t maxPerStageResources; uint32_t maxDescriptorSetSamplers; uint32_t maxDescriptorSetUniformBuffers; uint32_t maxDescriptorSetUniformBuffersDynamic; uint32_t maxDescriptorSetStorageBuffers; uint32_t maxDescriptorSetStorageBuffersDynamic; uint32_t maxDescriptorSetSampledImages; uint32_t maxDescriptorSetStorageImages; uint32_t maxDescriptorSetInputAttachments; uint32_t maxVertexInputAttributes; uint32_t maxVertexInputBindings; uint32_t maxVertexInputAttributeOffset; uint32_t maxVertexInputBindingStride; uint32_t maxVertexOutputComponents; uint32_t maxTessellationGenerationLevel; uint32_t maxTessellationPatchSize; uint32_t maxTessellationControlPerVertexInputComponents; uint32_t maxTessellationControlPerVertexOutputComponents; uint32_t maxTessellationControlPerPatchOutputComponents; uint32_t maxTessellationControlTotalOutputComponents; uint32_t maxTessellationEvaluationInputComponents; uint32_t maxTessellationEvaluationOutputComponents; uint32_t maxGeometryShaderInvocations; uint32_t maxGeometryInputComponents; uint32_t maxGeometryOutputComponents; uint32_t maxGeometryOutputVertices; uint32_t maxGeometryTotalOutputComponents; uint32_t maxFragmentInputComponents; uint32_t maxFragmentOutputAttachments; uint32_t maxFragmentDualSrcAttachments; uint32_t maxFragmentCombinedOutputResources; uint32_t maxComputeSharedMemorySize; uint32_t maxComputeWorkGroupCount[3]; uint32_t maxComputeWorkGroupInvocations; uint32_t maxComputeWorkGroupSize[3]; uint32_t subPixelPrecisionBits; uint32_t subTexelPrecisionBits; uint32_t mipmapPrecisionBits; uint32_t maxDrawIndexedIndexValue; uint32_t maxDrawIndirectCount; float maxSamplerLodBias; float maxSamplerAnisotropy; uint32_t maxViewports; uint32_t maxViewportDimensions[2]; float viewportBoundsRange[2]; uint32_t viewportSubPixelBits; size_t minMemoryMapAlignment; VkDeviceSize minTexelBufferOffsetAlignment; VkDeviceSize minUniformBufferOffsetAlignment; VkDeviceSize minStorageBufferOffsetAlignment; int32_t minTexelOffset; uint32_t maxTexelOffset; int32_t minTexelGatherOffset; uint32_t maxTexelGatherOffset; float minInterpolationOffset; float maxInterpolationOffset; uint32_t subPixelInterpolationOffsetBits; uint32_t maxFramebufferWidth; uint32_t maxFramebufferHeight; uint32_t maxFramebufferLayers; VkSampleCountFlags framebufferColorSampleCounts; VkSampleCountFlags framebufferDepthSampleCounts; VkSampleCountFlags framebufferStencilSampleCounts; VkSampleCountFlags framebufferNoAttachmentsSampleCounts; uint32_t maxColorAttachments; VkSampleCountFlags sampledImageColorSampleCounts; VkSampleCountFlags sampledImageIntegerSampleCounts; VkSampleCountFlags sampledImageDepthSampleCounts; VkSampleCountFlags sampledImageStencilSampleCounts; VkSampleCountFlags storageImageSampleCounts; uint32_t maxSampleMaskWords; VkBool32 timestampComputeAndGraphics; float timestampPeriod; uint32_t maxClipDistances; uint32_t maxCullDistances; uint32_t maxCombinedClipAndCullDistances; uint32_t discreteQueuePriorities; float pointSizeRange[2]; float lineWidthRange[2]; float pointSizeGranularity; float lineWidthGranularity; VkBool32 strictLines; VkBool32 standardSampleLocations; VkDeviceSize optimalBufferCopyOffsetAlignment; VkDeviceSize optimalBufferCopyRowPitchAlignment; VkDeviceSize nonCoherentAtomSize; } VkPhysicalDeviceLimits; typedef struct VkPhysicalDeviceMemoryProperties { uint32_t memoryTypeCount; VkMemoryType memoryTypes[VK_MAX_MEMORY_TYPES]; uint32_t memoryHeapCount; VkMemoryHeap memoryHeaps[VK_MAX_MEMORY_HEAPS]; } VkPhysicalDeviceMemoryProperties; typedef struct VkPhysicalDeviceSparseProperties { VkBool32 residencyStandard2DBlockShape; VkBool32 residencyStandard2DMultisampleBlockShape; VkBool32 residencyStandard3DBlockShape; VkBool32 residencyAlignedMipSize; VkBool32 residencyNonResidentStrict; } VkPhysicalDeviceSparseProperties; typedef struct VkPhysicalDeviceProperties { uint32_t apiVersion; uint32_t driverVersion; uint32_t vendorID; uint32_t deviceID; VkPhysicalDeviceType deviceType; char deviceName[VK_MAX_PHYSICAL_DEVICE_NAME_SIZE]; uint8_t pipelineCacheUUID[VK_UUID_SIZE]; VkPhysicalDeviceLimits limits; VkPhysicalDeviceSparseProperties sparseProperties; } VkPhysicalDeviceProperties; typedef struct VkQueueFamilyProperties { VkQueueFlags queueFlags; uint32_t queueCount; uint32_t timestampValidBits; VkExtent3D minImageTransferGranularity; } VkQueueFamilyProperties; typedef struct VkDeviceQueueCreateInfo { VkStructureType sType; const void* pNext; VkDeviceQueueCreateFlags flags; uint32_t queueFamilyIndex; uint32_t queueCount; const float* pQueuePriorities; } VkDeviceQueueCreateInfo; typedef struct VkDeviceCreateInfo { VkStructureType sType; const void* pNext; VkDeviceCreateFlags flags; uint32_t queueCreateInfoCount; const VkDeviceQueueCreateInfo* pQueueCreateInfos; // enabledLayerCount is deprecated and should not be used uint32_t enabledLayerCount; // ppEnabledLayerNames is deprecated and should not be used const char* const* ppEnabledLayerNames; uint32_t enabledExtensionCount; const char* const* ppEnabledExtensionNames; const VkPhysicalDeviceFeatures* pEnabledFeatures; } VkDeviceCreateInfo; typedef struct VkExtensionProperties { char extensionName[VK_MAX_EXTENSION_NAME_SIZE]; uint32_t specVersion; } VkExtensionProperties; typedef struct VkLayerProperties { char layerName[VK_MAX_EXTENSION_NAME_SIZE]; uint32_t specVersion; uint32_t implementationVersion; char description[VK_MAX_DESCRIPTION_SIZE]; } VkLayerProperties; typedef struct VkSubmitInfo { VkStructureType sType; const void* pNext; uint32_t waitSemaphoreCount; const VkSemaphore* pWaitSemaphores; const VkPipelineStageFlags* pWaitDstStageMask; uint32_t commandBufferCount; const VkCommandBuffer* pCommandBuffers; uint32_t signalSemaphoreCount; const VkSemaphore* pSignalSemaphores; } VkSubmitInfo; typedef struct VkMappedMemoryRange { VkStructureType sType; const void* pNext; VkDeviceMemory memory; VkDeviceSize offset; VkDeviceSize size; } VkMappedMemoryRange; typedef struct VkMemoryAllocateInfo { VkStructureType sType; const void* pNext; VkDeviceSize allocationSize; uint32_t memoryTypeIndex; } VkMemoryAllocateInfo; typedef struct VkMemoryRequirements { VkDeviceSize size; VkDeviceSize alignment; uint32_t memoryTypeBits; } VkMemoryRequirements; typedef struct VkSparseMemoryBind { VkDeviceSize resourceOffset; VkDeviceSize size; VkDeviceMemory memory; VkDeviceSize memoryOffset; VkSparseMemoryBindFlags flags; } VkSparseMemoryBind; typedef struct VkSparseBufferMemoryBindInfo { VkBuffer buffer; uint32_t bindCount; const VkSparseMemoryBind* pBinds; } VkSparseBufferMemoryBindInfo; typedef struct VkSparseImageOpaqueMemoryBindInfo { VkImage image; uint32_t bindCount; const VkSparseMemoryBind* pBinds; } VkSparseImageOpaqueMemoryBindInfo; typedef struct VkImageSubresource { VkImageAspectFlags aspectMask; uint32_t mipLevel; uint32_t arrayLayer; } VkImageSubresource; typedef struct VkSparseImageMemoryBind { VkImageSubresource subresource; VkOffset3D offset; VkExtent3D extent; VkDeviceMemory memory; VkDeviceSize memoryOffset; VkSparseMemoryBindFlags flags; } VkSparseImageMemoryBind; typedef struct VkSparseImageMemoryBindInfo { VkImage image; uint32_t bindCount; const VkSparseImageMemoryBind* pBinds; } VkSparseImageMemoryBindInfo; typedef struct VkBindSparseInfo { VkStructureType sType; const void* pNext; uint32_t waitSemaphoreCount; const VkSemaphore* pWaitSemaphores; uint32_t bufferBindCount; const VkSparseBufferMemoryBindInfo* pBufferBinds; uint32_t imageOpaqueBindCount; const VkSparseImageOpaqueMemoryBindInfo* pImageOpaqueBinds; uint32_t imageBindCount; const VkSparseImageMemoryBindInfo* pImageBinds; uint32_t signalSemaphoreCount; const VkSemaphore* pSignalSemaphores; } VkBindSparseInfo; typedef struct VkSparseImageFormatProperties { VkImageAspectFlags aspectMask; VkExtent3D imageGranularity; VkSparseImageFormatFlags flags; } VkSparseImageFormatProperties; typedef struct VkSparseImageMemoryRequirements { VkSparseImageFormatProperties formatProperties; uint32_t imageMipTailFirstLod; VkDeviceSize imageMipTailSize; VkDeviceSize imageMipTailOffset; VkDeviceSize imageMipTailStride; } VkSparseImageMemoryRequirements; typedef struct VkFenceCreateInfo { VkStructureType sType; const void* pNext; VkFenceCreateFlags flags; } VkFenceCreateInfo; typedef struct VkSemaphoreCreateInfo { VkStructureType sType; const void* pNext; VkSemaphoreCreateFlags flags; } VkSemaphoreCreateInfo; typedef struct VkEventCreateInfo { VkStructureType sType; const void* pNext; VkEventCreateFlags flags; } VkEventCreateInfo; typedef struct VkQueryPoolCreateInfo { VkStructureType sType; const void* pNext; VkQueryPoolCreateFlags flags; VkQueryType queryType; uint32_t queryCount; VkQueryPipelineStatisticFlags pipelineStatistics; } VkQueryPoolCreateInfo; typedef struct VkBufferCreateInfo { VkStructureType sType; const void* pNext; VkBufferCreateFlags flags; VkDeviceSize size; VkBufferUsageFlags usage; VkSharingMode sharingMode; uint32_t queueFamilyIndexCount; const uint32_t* pQueueFamilyIndices; } VkBufferCreateInfo; typedef struct VkBufferViewCreateInfo { VkStructureType sType; const void* pNext; VkBufferViewCreateFlags flags; VkBuffer buffer; VkFormat format; VkDeviceSize offset; VkDeviceSize range; } VkBufferViewCreateInfo; typedef struct VkImageCreateInfo { VkStructureType sType; const void* pNext; VkImageCreateFlags flags; VkImageType imageType; VkFormat format; VkExtent3D extent; uint32_t mipLevels; uint32_t arrayLayers; VkSampleCountFlagBits samples; VkImageTiling tiling; VkImageUsageFlags usage; VkSharingMode sharingMode; uint32_t queueFamilyIndexCount; const uint32_t* pQueueFamilyIndices; VkImageLayout initialLayout; } VkImageCreateInfo; typedef struct VkSubresourceLayout { VkDeviceSize offset; VkDeviceSize size; VkDeviceSize rowPitch; VkDeviceSize arrayPitch; VkDeviceSize depthPitch; } VkSubresourceLayout; typedef struct VkComponentMapping { VkComponentSwizzle r; VkComponentSwizzle g; VkComponentSwizzle b; VkComponentSwizzle a; } VkComponentMapping; typedef struct VkImageViewCreateInfo { VkStructureType sType; const void* pNext; VkImageViewCreateFlags flags; VkImage image; VkImageViewType viewType; VkFormat format; VkComponentMapping components; VkImageSubresourceRange subresourceRange; } VkImageViewCreateInfo; typedef struct VkShaderModuleCreateInfo { VkStructureType sType; const void* pNext; VkShaderModuleCreateFlags flags; size_t codeSize; const uint32_t* pCode; } VkShaderModuleCreateInfo; typedef struct VkPipelineCacheCreateInfo { VkStructureType sType; const void* pNext; VkPipelineCacheCreateFlags flags; size_t initialDataSize; const void* pInitialData; } VkPipelineCacheCreateInfo; typedef struct VkSpecializationMapEntry { uint32_t constantID; uint32_t offset; size_t size; } VkSpecializationMapEntry; typedef struct VkSpecializationInfo { uint32_t mapEntryCount; const VkSpecializationMapEntry* pMapEntries; size_t dataSize; const void* pData; } VkSpecializationInfo; typedef struct VkPipelineShaderStageCreateInfo { VkStructureType sType; const void* pNext; VkPipelineShaderStageCreateFlags flags; VkShaderStageFlagBits stage; VkShaderModule module; const char* pName; const VkSpecializationInfo* pSpecializationInfo; } VkPipelineShaderStageCreateInfo; typedef struct VkComputePipelineCreateInfo { VkStructureType sType; const void* pNext; VkPipelineCreateFlags flags; VkPipelineShaderStageCreateInfo stage; VkPipelineLayout layout; VkPipeline basePipelineHandle; int32_t basePipelineIndex; } VkComputePipelineCreateInfo; typedef struct VkVertexInputBindingDescription { uint32_t binding; uint32_t stride; VkVertexInputRate inputRate; } VkVertexInputBindingDescription; typedef struct VkVertexInputAttributeDescription { uint32_t location; uint32_t binding; VkFormat format; uint32_t offset; } VkVertexInputAttributeDescription; typedef struct VkPipelineVertexInputStateCreateInfo { VkStructureType sType; const void* pNext; VkPipelineVertexInputStateCreateFlags flags; uint32_t vertexBindingDescriptionCount; const VkVertexInputBindingDescription* pVertexBindingDescriptions; uint32_t vertexAttributeDescriptionCount; const VkVertexInputAttributeDescription* pVertexAttributeDescriptions; } VkPipelineVertexInputStateCreateInfo; typedef struct VkPipelineInputAssemblyStateCreateInfo { VkStructureType sType; const void* pNext; VkPipelineInputAssemblyStateCreateFlags flags; VkPrimitiveTopology topology; VkBool32 primitiveRestartEnable; } VkPipelineInputAssemblyStateCreateInfo; typedef struct VkPipelineTessellationStateCreateInfo { VkStructureType sType; const void* pNext; VkPipelineTessellationStateCreateFlags flags; uint32_t patchControlPoints; } VkPipelineTessellationStateCreateInfo; typedef struct VkViewport { float x; float y; float width; float height; float minDepth; float maxDepth; } VkViewport; typedef struct VkPipelineViewportStateCreateInfo { VkStructureType sType; const void* pNext; VkPipelineViewportStateCreateFlags flags; uint32_t viewportCount; const VkViewport* pViewports; uint32_t scissorCount; const VkRect2D* pScissors; } VkPipelineViewportStateCreateInfo; typedef struct VkPipelineRasterizationStateCreateInfo { VkStructureType sType; const void* pNext; VkPipelineRasterizationStateCreateFlags flags; VkBool32 depthClampEnable; VkBool32 rasterizerDiscardEnable; VkPolygonMode polygonMode; VkCullModeFlags cullMode; VkFrontFace frontFace; VkBool32 depthBiasEnable; float depthBiasConstantFactor; float depthBiasClamp; float depthBiasSlopeFactor; float lineWidth; } VkPipelineRasterizationStateCreateInfo; typedef struct VkPipelineMultisampleStateCreateInfo { VkStructureType sType; const void* pNext; VkPipelineMultisampleStateCreateFlags flags; VkSampleCountFlagBits rasterizationSamples; VkBool32 sampleShadingEnable; float minSampleShading; const VkSampleMask* pSampleMask; VkBool32 alphaToCoverageEnable; VkBool32 alphaToOneEnable; } VkPipelineMultisampleStateCreateInfo; typedef struct VkStencilOpState { VkStencilOp failOp; VkStencilOp passOp; VkStencilOp depthFailOp; VkCompareOp compareOp; uint32_t compareMask; uint32_t writeMask; uint32_t reference; } VkStencilOpState; typedef struct VkPipelineDepthStencilStateCreateInfo { VkStructureType sType; const void* pNext; VkPipelineDepthStencilStateCreateFlags flags; VkBool32 depthTestEnable; VkBool32 depthWriteEnable; VkCompareOp depthCompareOp; VkBool32 depthBoundsTestEnable; VkBool32 stencilTestEnable; VkStencilOpState front; VkStencilOpState back; float minDepthBounds; float maxDepthBounds; } VkPipelineDepthStencilStateCreateInfo; typedef struct VkPipelineColorBlendAttachmentState { VkBool32 blendEnable; VkBlendFactor srcColorBlendFactor; VkBlendFactor dstColorBlendFactor; VkBlendOp colorBlendOp; VkBlendFactor srcAlphaBlendFactor; VkBlendFactor dstAlphaBlendFactor; VkBlendOp alphaBlendOp; VkColorComponentFlags colorWriteMask; } VkPipelineColorBlendAttachmentState; typedef struct VkPipelineColorBlendStateCreateInfo { VkStructureType sType; const void* pNext; VkPipelineColorBlendStateCreateFlags flags; VkBool32 logicOpEnable; VkLogicOp logicOp; uint32_t attachmentCount; const VkPipelineColorBlendAttachmentState* pAttachments; float blendConstants[4]; } VkPipelineColorBlendStateCreateInfo; typedef struct VkPipelineDynamicStateCreateInfo { VkStructureType sType; const void* pNext; VkPipelineDynamicStateCreateFlags flags; uint32_t dynamicStateCount; const VkDynamicState* pDynamicStates; } VkPipelineDynamicStateCreateInfo; typedef struct VkGraphicsPipelineCreateInfo { VkStructureType sType; const void* pNext; VkPipelineCreateFlags flags; uint32_t stageCount; const VkPipelineShaderStageCreateInfo* pStages; const VkPipelineVertexInputStateCreateInfo* pVertexInputState; const VkPipelineInputAssemblyStateCreateInfo* pInputAssemblyState; const VkPipelineTessellationStateCreateInfo* pTessellationState; const VkPipelineViewportStateCreateInfo* pViewportState; const VkPipelineRasterizationStateCreateInfo* pRasterizationState; const VkPipelineMultisampleStateCreateInfo* pMultisampleState; const VkPipelineDepthStencilStateCreateInfo* pDepthStencilState; const VkPipelineColorBlendStateCreateInfo* pColorBlendState; const VkPipelineDynamicStateCreateInfo* pDynamicState; VkPipelineLayout layout; VkRenderPass renderPass; uint32_t subpass; VkPipeline basePipelineHandle; int32_t basePipelineIndex; } VkGraphicsPipelineCreateInfo; typedef struct VkPushConstantRange { VkShaderStageFlags stageFlags; uint32_t offset; uint32_t size; } VkPushConstantRange; typedef struct VkPipelineLayoutCreateInfo { VkStructureType sType; const void* pNext; VkPipelineLayoutCreateFlags flags; uint32_t setLayoutCount; const VkDescriptorSetLayout* pSetLayouts; uint32_t pushConstantRangeCount; const VkPushConstantRange* pPushConstantRanges; } VkPipelineLayoutCreateInfo; typedef struct VkSamplerCreateInfo { VkStructureType sType; const void* pNext; VkSamplerCreateFlags flags; VkFilter magFilter; VkFilter minFilter; VkSamplerMipmapMode mipmapMode; VkSamplerAddressMode addressModeU; VkSamplerAddressMode addressModeV; VkSamplerAddressMode addressModeW; float mipLodBias; VkBool32 anisotropyEnable; float maxAnisotropy; VkBool32 compareEnable; VkCompareOp compareOp; float minLod; float maxLod; VkBorderColor borderColor; VkBool32 unnormalizedCoordinates; } VkSamplerCreateInfo; typedef struct VkCopyDescriptorSet { VkStructureType sType; const void* pNext; VkDescriptorSet srcSet; uint32_t srcBinding; uint32_t srcArrayElement; VkDescriptorSet dstSet; uint32_t dstBinding; uint32_t dstArrayElement; uint32_t descriptorCount; } VkCopyDescriptorSet; typedef struct VkDescriptorBufferInfo { VkBuffer buffer; VkDeviceSize offset; VkDeviceSize range; } VkDescriptorBufferInfo; typedef struct VkDescriptorImageInfo { VkSampler sampler; VkImageView imageView; VkImageLayout imageLayout; } VkDescriptorImageInfo; typedef struct VkDescriptorPoolSize { VkDescriptorType type; uint32_t descriptorCount; } VkDescriptorPoolSize; typedef struct VkDescriptorPoolCreateInfo { VkStructureType sType; const void* pNext; VkDescriptorPoolCreateFlags flags; uint32_t maxSets; uint32_t poolSizeCount; const VkDescriptorPoolSize* pPoolSizes; } VkDescriptorPoolCreateInfo; typedef struct VkDescriptorSetAllocateInfo { VkStructureType sType; const void* pNext; VkDescriptorPool descriptorPool; uint32_t descriptorSetCount; const VkDescriptorSetLayout* pSetLayouts; } VkDescriptorSetAllocateInfo; typedef struct VkDescriptorSetLayoutBinding { uint32_t binding; VkDescriptorType descriptorType; uint32_t descriptorCount; VkShaderStageFlags stageFlags; const VkSampler* pImmutableSamplers; } VkDescriptorSetLayoutBinding; typedef struct VkDescriptorSetLayoutCreateInfo { VkStructureType sType; const void* pNext; VkDescriptorSetLayoutCreateFlags flags; uint32_t bindingCount; const VkDescriptorSetLayoutBinding* pBindings; } VkDescriptorSetLayoutCreateInfo; typedef struct VkWriteDescriptorSet { VkStructureType sType; const void* pNext; VkDescriptorSet dstSet; uint32_t dstBinding; uint32_t dstArrayElement; uint32_t descriptorCount; VkDescriptorType descriptorType; const VkDescriptorImageInfo* pImageInfo; const VkDescriptorBufferInfo* pBufferInfo; const VkBufferView* pTexelBufferView; } VkWriteDescriptorSet; typedef struct VkAttachmentDescription { VkAttachmentDescriptionFlags flags; VkFormat format; VkSampleCountFlagBits samples; VkAttachmentLoadOp loadOp; VkAttachmentStoreOp storeOp; VkAttachmentLoadOp stencilLoadOp; VkAttachmentStoreOp stencilStoreOp; VkImageLayout initialLayout; VkImageLayout finalLayout; } VkAttachmentDescription; typedef struct VkAttachmentReference { uint32_t attachment; VkImageLayout layout; } VkAttachmentReference; typedef struct VkFramebufferCreateInfo { VkStructureType sType; const void* pNext; VkFramebufferCreateFlags flags; VkRenderPass renderPass; uint32_t attachmentCount; const VkImageView* pAttachments; uint32_t width; uint32_t height; uint32_t layers; } VkFramebufferCreateInfo; typedef struct VkSubpassDescription { VkSubpassDescriptionFlags flags; VkPipelineBindPoint pipelineBindPoint; uint32_t inputAttachmentCount; const VkAttachmentReference* pInputAttachments; uint32_t colorAttachmentCount; const VkAttachmentReference* pColorAttachments; const VkAttachmentReference* pResolveAttachments; const VkAttachmentReference* pDepthStencilAttachment; uint32_t preserveAttachmentCount; const uint32_t* pPreserveAttachments; } VkSubpassDescription; typedef struct VkSubpassDependency { uint32_t srcSubpass; uint32_t dstSubpass; VkPipelineStageFlags srcStageMask; VkPipelineStageFlags dstStageMask; VkAccessFlags srcAccessMask; VkAccessFlags dstAccessMask; VkDependencyFlags dependencyFlags; } VkSubpassDependency; typedef struct VkRenderPassCreateInfo { VkStructureType sType; const void* pNext; VkRenderPassCreateFlags flags; uint32_t attachmentCount; const VkAttachmentDescription* pAttachments; uint32_t subpassCount; const VkSubpassDescription* pSubpasses; uint32_t dependencyCount; const VkSubpassDependency* pDependencies; } VkRenderPassCreateInfo; typedef struct VkCommandPoolCreateInfo { VkStructureType sType; const void* pNext; VkCommandPoolCreateFlags flags; uint32_t queueFamilyIndex; } VkCommandPoolCreateInfo; typedef struct VkCommandBufferAllocateInfo { VkStructureType sType; const void* pNext; VkCommandPool commandPool; VkCommandBufferLevel level; uint32_t commandBufferCount; } VkCommandBufferAllocateInfo; typedef struct VkCommandBufferInheritanceInfo { VkStructureType sType; const void* pNext; VkRenderPass renderPass; uint32_t subpass; VkFramebuffer framebuffer; VkBool32 occlusionQueryEnable; VkQueryControlFlags queryFlags; VkQueryPipelineStatisticFlags pipelineStatistics; } VkCommandBufferInheritanceInfo; typedef struct VkCommandBufferBeginInfo { VkStructureType sType; const void* pNext; VkCommandBufferUsageFlags flags; const VkCommandBufferInheritanceInfo* pInheritanceInfo; } VkCommandBufferBeginInfo; typedef struct VkBufferCopy { VkDeviceSize srcOffset; VkDeviceSize dstOffset; VkDeviceSize size; } VkBufferCopy; typedef struct VkImageSubresourceLayers { VkImageAspectFlags aspectMask; uint32_t mipLevel; uint32_t baseArrayLayer; uint32_t layerCount; } VkImageSubresourceLayers; typedef struct VkBufferImageCopy { VkDeviceSize bufferOffset; uint32_t bufferRowLength; uint32_t bufferImageHeight; VkImageSubresourceLayers imageSubresource; VkOffset3D imageOffset; VkExtent3D imageExtent; } VkBufferImageCopy; typedef union VkClearColorValue { float float32[4]; int32_t int32[4]; uint32_t uint32[4]; } VkClearColorValue; typedef struct VkClearDepthStencilValue { float depth; uint32_t stencil; } VkClearDepthStencilValue; typedef union VkClearValue { VkClearColorValue color; VkClearDepthStencilValue depthStencil; } VkClearValue; typedef struct VkClearAttachment { VkImageAspectFlags aspectMask; uint32_t colorAttachment; VkClearValue clearValue; } VkClearAttachment; typedef struct VkClearRect { VkRect2D rect; uint32_t baseArrayLayer; uint32_t layerCount; } VkClearRect; typedef struct VkImageBlit { VkImageSubresourceLayers srcSubresource; VkOffset3D srcOffsets[2]; VkImageSubresourceLayers dstSubresource; VkOffset3D dstOffsets[2]; } VkImageBlit; typedef struct VkImageCopy { VkImageSubresourceLayers srcSubresource; VkOffset3D srcOffset; VkImageSubresourceLayers dstSubresource; VkOffset3D dstOffset; VkExtent3D extent; } VkImageCopy; typedef struct VkImageResolve { VkImageSubresourceLayers srcSubresource; VkOffset3D srcOffset; VkImageSubresourceLayers dstSubresource; VkOffset3D dstOffset; VkExtent3D extent; } VkImageResolve; typedef struct VkRenderPassBeginInfo { VkStructureType sType; const void* pNext; VkRenderPass renderPass; VkFramebuffer framebuffer; VkRect2D renderArea; uint32_t clearValueCount; const VkClearValue* pClearValues; } VkRenderPassBeginInfo; typedef VkResult (VKAPI_PTR *PFN_vkCreateInstance)(const VkInstanceCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkInstance* pInstance); typedef void (VKAPI_PTR *PFN_vkDestroyInstance)(VkInstance instance, const VkAllocationCallbacks* pAllocator); typedef VkResult (VKAPI_PTR *PFN_vkEnumeratePhysicalDevices)(VkInstance instance, uint32_t* pPhysicalDeviceCount, VkPhysicalDevice* pPhysicalDevices); typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceFeatures)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures* pFeatures); typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceFormatProperties)(VkPhysicalDevice physicalDevice, VkFormat format, VkFormatProperties* pFormatProperties); typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceImageFormatProperties)(VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkImageTiling tiling, VkImageUsageFlags usage, VkImageCreateFlags flags, VkImageFormatProperties* pImageFormatProperties); typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceProperties)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties* pProperties); typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceQueueFamilyProperties)(VkPhysicalDevice physicalDevice, uint32_t* pQueueFamilyPropertyCount, VkQueueFamilyProperties* pQueueFamilyProperties); typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceMemoryProperties)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties* pMemoryProperties); typedef PFN_vkVoidFunction (VKAPI_PTR *PFN_vkGetInstanceProcAddr)(VkInstance instance, const char* pName); typedef PFN_vkVoidFunction (VKAPI_PTR *PFN_vkGetDeviceProcAddr)(VkDevice device, const char* pName); typedef VkResult (VKAPI_PTR *PFN_vkCreateDevice)(VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDevice* pDevice); typedef void (VKAPI_PTR *PFN_vkDestroyDevice)(VkDevice device, const VkAllocationCallbacks* pAllocator); typedef VkResult (VKAPI_PTR *PFN_vkEnumerateInstanceExtensionProperties)(const char* pLayerName, uint32_t* pPropertyCount, VkExtensionProperties* pProperties); typedef VkResult (VKAPI_PTR *PFN_vkEnumerateDeviceExtensionProperties)(VkPhysicalDevice physicalDevice, const char* pLayerName, uint32_t* pPropertyCount, VkExtensionProperties* pProperties); typedef VkResult (VKAPI_PTR *PFN_vkEnumerateInstanceLayerProperties)(uint32_t* pPropertyCount, VkLayerProperties* pProperties); typedef VkResult (VKAPI_PTR *PFN_vkEnumerateDeviceLayerProperties)(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkLayerProperties* pProperties); typedef void (VKAPI_PTR *PFN_vkGetDeviceQueue)(VkDevice device, uint32_t queueFamilyIndex, uint32_t queueIndex, VkQueue* pQueue); typedef VkResult (VKAPI_PTR *PFN_vkQueueSubmit)(VkQueue queue, uint32_t submitCount, const VkSubmitInfo* pSubmits, VkFence fence); typedef VkResult (VKAPI_PTR *PFN_vkQueueWaitIdle)(VkQueue queue); typedef VkResult (VKAPI_PTR *PFN_vkDeviceWaitIdle)(VkDevice device); typedef VkResult (VKAPI_PTR *PFN_vkAllocateMemory)(VkDevice device, const VkMemoryAllocateInfo* pAllocateInfo, const VkAllocationCallbacks* pAllocator, VkDeviceMemory* pMemory); typedef void (VKAPI_PTR *PFN_vkFreeMemory)(VkDevice device, VkDeviceMemory memory, const VkAllocationCallbacks* pAllocator); typedef VkResult (VKAPI_PTR *PFN_vkMapMemory)(VkDevice device, VkDeviceMemory memory, VkDeviceSize offset, VkDeviceSize size, VkMemoryMapFlags flags, void** ppData); typedef void (VKAPI_PTR *PFN_vkUnmapMemory)(VkDevice device, VkDeviceMemory memory); typedef VkResult (VKAPI_PTR *PFN_vkFlushMappedMemoryRanges)(VkDevice device, uint32_t memoryRangeCount, const VkMappedMemoryRange* pMemoryRanges); typedef VkResult (VKAPI_PTR *PFN_vkInvalidateMappedMemoryRanges)(VkDevice device, uint32_t memoryRangeCount, const VkMappedMemoryRange* pMemoryRanges); typedef void (VKAPI_PTR *PFN_vkGetDeviceMemoryCommitment)(VkDevice device, VkDeviceMemory memory, VkDeviceSize* pCommittedMemoryInBytes); typedef VkResult (VKAPI_PTR *PFN_vkBindBufferMemory)(VkDevice device, VkBuffer buffer, VkDeviceMemory memory, VkDeviceSize memoryOffset); typedef VkResult (VKAPI_PTR *PFN_vkBindImageMemory)(VkDevice device, VkImage image, VkDeviceMemory memory, VkDeviceSize memoryOffset); typedef void (VKAPI_PTR *PFN_vkGetBufferMemoryRequirements)(VkDevice device, VkBuffer buffer, VkMemoryRequirements* pMemoryRequirements); typedef void (VKAPI_PTR *PFN_vkGetImageMemoryRequirements)(VkDevice device, VkImage image, VkMemoryRequirements* pMemoryRequirements); typedef void (VKAPI_PTR *PFN_vkGetImageSparseMemoryRequirements)(VkDevice device, VkImage image, uint32_t* pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements* pSparseMemoryRequirements); typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceSparseImageFormatProperties)(VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkSampleCountFlagBits samples, VkImageUsageFlags usage, VkImageTiling tiling, uint32_t* pPropertyCount, VkSparseImageFormatProperties* pProperties); typedef VkResult (VKAPI_PTR *PFN_vkQueueBindSparse)(VkQueue queue, uint32_t bindInfoCount, const VkBindSparseInfo* pBindInfo, VkFence fence); typedef VkResult (VKAPI_PTR *PFN_vkCreateFence)(VkDevice device, const VkFenceCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkFence* pFence); typedef void (VKAPI_PTR *PFN_vkDestroyFence)(VkDevice device, VkFence fence, const VkAllocationCallbacks* pAllocator); typedef VkResult (VKAPI_PTR *PFN_vkResetFences)(VkDevice device, uint32_t fenceCount, const VkFence* pFences); typedef VkResult (VKAPI_PTR *PFN_vkGetFenceStatus)(VkDevice device, VkFence fence); typedef VkResult (VKAPI_PTR *PFN_vkWaitForFences)(VkDevice device, uint32_t fenceCount, const VkFence* pFences, VkBool32 waitAll, uint64_t timeout); typedef VkResult (VKAPI_PTR *PFN_vkCreateSemaphore)(VkDevice device, const VkSemaphoreCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSemaphore* pSemaphore); typedef void (VKAPI_PTR *PFN_vkDestroySemaphore)(VkDevice device, VkSemaphore semaphore, const VkAllocationCallbacks* pAllocator); typedef VkResult (VKAPI_PTR *PFN_vkCreateEvent)(VkDevice device, const VkEventCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkEvent* pEvent); typedef void (VKAPI_PTR *PFN_vkDestroyEvent)(VkDevice device, VkEvent event, const VkAllocationCallbacks* pAllocator); typedef VkResult (VKAPI_PTR *PFN_vkGetEventStatus)(VkDevice device, VkEvent event); typedef VkResult (VKAPI_PTR *PFN_vkSetEvent)(VkDevice device, VkEvent event); typedef VkResult (VKAPI_PTR *PFN_vkResetEvent)(VkDevice device, VkEvent event); typedef VkResult (VKAPI_PTR *PFN_vkCreateQueryPool)(VkDevice device, const VkQueryPoolCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkQueryPool* pQueryPool); typedef void (VKAPI_PTR *PFN_vkDestroyQueryPool)(VkDevice device, VkQueryPool queryPool, const VkAllocationCallbacks* pAllocator); typedef VkResult (VKAPI_PTR *PFN_vkGetQueryPoolResults)(VkDevice device, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, size_t dataSize, void* pData, VkDeviceSize stride, VkQueryResultFlags flags); typedef VkResult (VKAPI_PTR *PFN_vkCreateBuffer)(VkDevice device, const VkBufferCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkBuffer* pBuffer); typedef void (VKAPI_PTR *PFN_vkDestroyBuffer)(VkDevice device, VkBuffer buffer, const VkAllocationCallbacks* pAllocator); typedef VkResult (VKAPI_PTR *PFN_vkCreateBufferView)(VkDevice device, const VkBufferViewCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkBufferView* pView); typedef void (VKAPI_PTR *PFN_vkDestroyBufferView)(VkDevice device, VkBufferView bufferView, const VkAllocationCallbacks* pAllocator); typedef VkResult (VKAPI_PTR *PFN_vkCreateImage)(VkDevice device, const VkImageCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkImage* pImage); typedef void (VKAPI_PTR *PFN_vkDestroyImage)(VkDevice device, VkImage image, const VkAllocationCallbacks* pAllocator); typedef void (VKAPI_PTR *PFN_vkGetImageSubresourceLayout)(VkDevice device, VkImage image, const VkImageSubresource* pSubresource, VkSubresourceLayout* pLayout); typedef VkResult (VKAPI_PTR *PFN_vkCreateImageView)(VkDevice device, const VkImageViewCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkImageView* pView); typedef void (VKAPI_PTR *PFN_vkDestroyImageView)(VkDevice device, VkImageView imageView, const VkAllocationCallbacks* pAllocator); typedef VkResult (VKAPI_PTR *PFN_vkCreateShaderModule)(VkDevice device, const VkShaderModuleCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkShaderModule* pShaderModule); typedef void (VKAPI_PTR *PFN_vkDestroyShaderModule)(VkDevice device, VkShaderModule shaderModule, const VkAllocationCallbacks* pAllocator); typedef VkResult (VKAPI_PTR *PFN_vkCreatePipelineCache)(VkDevice device, const VkPipelineCacheCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkPipelineCache* pPipelineCache); typedef void (VKAPI_PTR *PFN_vkDestroyPipelineCache)(VkDevice device, VkPipelineCache pipelineCache, const VkAllocationCallbacks* pAllocator); typedef VkResult (VKAPI_PTR *PFN_vkGetPipelineCacheData)(VkDevice device, VkPipelineCache pipelineCache, size_t* pDataSize, void* pData); typedef VkResult (VKAPI_PTR *PFN_vkMergePipelineCaches)(VkDevice device, VkPipelineCache dstCache, uint32_t srcCacheCount, const VkPipelineCache* pSrcCaches); typedef VkResult (VKAPI_PTR *PFN_vkCreateGraphicsPipelines)(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkGraphicsPipelineCreateInfo* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines); typedef VkResult (VKAPI_PTR *PFN_vkCreateComputePipelines)(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkComputePipelineCreateInfo* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines); typedef void (VKAPI_PTR *PFN_vkDestroyPipeline)(VkDevice device, VkPipeline pipeline, const VkAllocationCallbacks* pAllocator); typedef VkResult (VKAPI_PTR *PFN_vkCreatePipelineLayout)(VkDevice device, const VkPipelineLayoutCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkPipelineLayout* pPipelineLayout); typedef void (VKAPI_PTR *PFN_vkDestroyPipelineLayout)(VkDevice device, VkPipelineLayout pipelineLayout, const VkAllocationCallbacks* pAllocator); typedef VkResult (VKAPI_PTR *PFN_vkCreateSampler)(VkDevice device, const VkSamplerCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSampler* pSampler); typedef void (VKAPI_PTR *PFN_vkDestroySampler)(VkDevice device, VkSampler sampler, const VkAllocationCallbacks* pAllocator); typedef VkResult (VKAPI_PTR *PFN_vkCreateDescriptorSetLayout)(VkDevice device, const VkDescriptorSetLayoutCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDescriptorSetLayout* pSetLayout); typedef void (VKAPI_PTR *PFN_vkDestroyDescriptorSetLayout)(VkDevice device, VkDescriptorSetLayout descriptorSetLayout, const VkAllocationCallbacks* pAllocator); typedef VkResult (VKAPI_PTR *PFN_vkCreateDescriptorPool)(VkDevice device, const VkDescriptorPoolCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDescriptorPool* pDescriptorPool); typedef void (VKAPI_PTR *PFN_vkDestroyDescriptorPool)(VkDevice device, VkDescriptorPool descriptorPool, const VkAllocationCallbacks* pAllocator); typedef VkResult (VKAPI_PTR *PFN_vkResetDescriptorPool)(VkDevice device, VkDescriptorPool descriptorPool, VkDescriptorPoolResetFlags flags); typedef VkResult (VKAPI_PTR *PFN_vkAllocateDescriptorSets)(VkDevice device, const VkDescriptorSetAllocateInfo* pAllocateInfo, VkDescriptorSet* pDescriptorSets); typedef VkResult (VKAPI_PTR *PFN_vkFreeDescriptorSets)(VkDevice device, VkDescriptorPool descriptorPool, uint32_t descriptorSetCount, const VkDescriptorSet* pDescriptorSets); typedef void (VKAPI_PTR *PFN_vkUpdateDescriptorSets)(VkDevice device, uint32_t descriptorWriteCount, const VkWriteDescriptorSet* pDescriptorWrites, uint32_t descriptorCopyCount, const VkCopyDescriptorSet* pDescriptorCopies); typedef VkResult (VKAPI_PTR *PFN_vkCreateFramebuffer)(VkDevice device, const VkFramebufferCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkFramebuffer* pFramebuffer); typedef void (VKAPI_PTR *PFN_vkDestroyFramebuffer)(VkDevice device, VkFramebuffer framebuffer, const VkAllocationCallbacks* pAllocator); typedef VkResult (VKAPI_PTR *PFN_vkCreateRenderPass)(VkDevice device, const VkRenderPassCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkRenderPass* pRenderPass); typedef void (VKAPI_PTR *PFN_vkDestroyRenderPass)(VkDevice device, VkRenderPass renderPass, const VkAllocationCallbacks* pAllocator); typedef void (VKAPI_PTR *PFN_vkGetRenderAreaGranularity)(VkDevice device, VkRenderPass renderPass, VkExtent2D* pGranularity); typedef VkResult (VKAPI_PTR *PFN_vkCreateCommandPool)(VkDevice device, const VkCommandPoolCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkCommandPool* pCommandPool); typedef void (VKAPI_PTR *PFN_vkDestroyCommandPool)(VkDevice device, VkCommandPool commandPool, const VkAllocationCallbacks* pAllocator); typedef VkResult (VKAPI_PTR *PFN_vkResetCommandPool)(VkDevice device, VkCommandPool commandPool, VkCommandPoolResetFlags flags); typedef VkResult (VKAPI_PTR *PFN_vkAllocateCommandBuffers)(VkDevice device, const VkCommandBufferAllocateInfo* pAllocateInfo, VkCommandBuffer* pCommandBuffers); typedef void (VKAPI_PTR *PFN_vkFreeCommandBuffers)(VkDevice device, VkCommandPool commandPool, uint32_t commandBufferCount, const VkCommandBuffer* pCommandBuffers); typedef VkResult (VKAPI_PTR *PFN_vkBeginCommandBuffer)(VkCommandBuffer commandBuffer, const VkCommandBufferBeginInfo* pBeginInfo); typedef VkResult (VKAPI_PTR *PFN_vkEndCommandBuffer)(VkCommandBuffer commandBuffer); typedef VkResult (VKAPI_PTR *PFN_vkResetCommandBuffer)(VkCommandBuffer commandBuffer, VkCommandBufferResetFlags flags); typedef void (VKAPI_PTR *PFN_vkCmdBindPipeline)(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline); typedef void (VKAPI_PTR *PFN_vkCmdSetViewport)(VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, const VkViewport* pViewports); typedef void (VKAPI_PTR *PFN_vkCmdSetScissor)(VkCommandBuffer commandBuffer, uint32_t firstScissor, uint32_t scissorCount, const VkRect2D* pScissors); typedef void (VKAPI_PTR *PFN_vkCmdSetLineWidth)(VkCommandBuffer commandBuffer, float lineWidth); typedef void (VKAPI_PTR *PFN_vkCmdSetDepthBias)(VkCommandBuffer commandBuffer, float depthBiasConstantFactor, float depthBiasClamp, float depthBiasSlopeFactor); typedef void (VKAPI_PTR *PFN_vkCmdSetBlendConstants)(VkCommandBuffer commandBuffer, const float blendConstants[4]); typedef void (VKAPI_PTR *PFN_vkCmdSetDepthBounds)(VkCommandBuffer commandBuffer, float minDepthBounds, float maxDepthBounds); typedef void (VKAPI_PTR *PFN_vkCmdSetStencilCompareMask)(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t compareMask); typedef void (VKAPI_PTR *PFN_vkCmdSetStencilWriteMask)(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t writeMask); typedef void (VKAPI_PTR *PFN_vkCmdSetStencilReference)(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t reference); typedef void (VKAPI_PTR *PFN_vkCmdBindDescriptorSets)(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, uint32_t firstSet, uint32_t descriptorSetCount, const VkDescriptorSet* pDescriptorSets, uint32_t dynamicOffsetCount, const uint32_t* pDynamicOffsets); typedef void (VKAPI_PTR *PFN_vkCmdBindIndexBuffer)(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkIndexType indexType); typedef void (VKAPI_PTR *PFN_vkCmdBindVertexBuffers)(VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, const VkBuffer* pBuffers, const VkDeviceSize* pOffsets); typedef void (VKAPI_PTR *PFN_vkCmdDraw)(VkCommandBuffer commandBuffer, uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance); typedef void (VKAPI_PTR *PFN_vkCmdDrawIndexed)(VkCommandBuffer commandBuffer, uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, int32_t vertexOffset, uint32_t firstInstance); typedef void (VKAPI_PTR *PFN_vkCmdDrawIndirect)(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride); typedef void (VKAPI_PTR *PFN_vkCmdDrawIndexedIndirect)(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride); typedef void (VKAPI_PTR *PFN_vkCmdDispatch)(VkCommandBuffer commandBuffer, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ); typedef void (VKAPI_PTR *PFN_vkCmdDispatchIndirect)(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset); typedef void (VKAPI_PTR *PFN_vkCmdCopyBuffer)(VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkBuffer dstBuffer, uint32_t regionCount, const VkBufferCopy* pRegions); typedef void (VKAPI_PTR *PFN_vkCmdCopyImage)(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageCopy* pRegions); typedef void (VKAPI_PTR *PFN_vkCmdBlitImage)(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageBlit* pRegions, VkFilter filter); typedef void (VKAPI_PTR *PFN_vkCmdCopyBufferToImage)(VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkBufferImageCopy* pRegions); typedef void (VKAPI_PTR *PFN_vkCmdCopyImageToBuffer)(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkBuffer dstBuffer, uint32_t regionCount, const VkBufferImageCopy* pRegions); typedef void (VKAPI_PTR *PFN_vkCmdUpdateBuffer)(VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize dataSize, const void* pData); typedef void (VKAPI_PTR *PFN_vkCmdFillBuffer)(VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize size, uint32_t data); typedef void (VKAPI_PTR *PFN_vkCmdClearColorImage)(VkCommandBuffer commandBuffer, VkImage image, VkImageLayout imageLayout, const VkClearColorValue* pColor, uint32_t rangeCount, const VkImageSubresourceRange* pRanges); typedef void (VKAPI_PTR *PFN_vkCmdClearDepthStencilImage)(VkCommandBuffer commandBuffer, VkImage image, VkImageLayout imageLayout, const VkClearDepthStencilValue* pDepthStencil, uint32_t rangeCount, const VkImageSubresourceRange* pRanges); typedef void (VKAPI_PTR *PFN_vkCmdClearAttachments)(VkCommandBuffer commandBuffer, uint32_t attachmentCount, const VkClearAttachment* pAttachments, uint32_t rectCount, const VkClearRect* pRects); typedef void (VKAPI_PTR *PFN_vkCmdResolveImage)(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageResolve* pRegions); typedef void (VKAPI_PTR *PFN_vkCmdSetEvent)(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask); typedef void (VKAPI_PTR *PFN_vkCmdResetEvent)(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask); typedef void (VKAPI_PTR *PFN_vkCmdWaitEvents)(VkCommandBuffer commandBuffer, uint32_t eventCount, const VkEvent* pEvents, VkPipelineStageFlags srcStageMask, VkPipelineStageFlags dstStageMask, uint32_t memoryBarrierCount, const VkMemoryBarrier* pMemoryBarriers, uint32_t bufferMemoryBarrierCount, const VkBufferMemoryBarrier* pBufferMemoryBarriers, uint32_t imageMemoryBarrierCount, const VkImageMemoryBarrier* pImageMemoryBarriers); typedef void (VKAPI_PTR *PFN_vkCmdPipelineBarrier)(VkCommandBuffer commandBuffer, VkPipelineStageFlags srcStageMask, VkPipelineStageFlags dstStageMask, VkDependencyFlags dependencyFlags, uint32_t memoryBarrierCount, const VkMemoryBarrier* pMemoryBarriers, uint32_t bufferMemoryBarrierCount, const VkBufferMemoryBarrier* pBufferMemoryBarriers, uint32_t imageMemoryBarrierCount, const VkImageMemoryBarrier* pImageMemoryBarriers); typedef void (VKAPI_PTR *PFN_vkCmdBeginQuery)(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, VkQueryControlFlags flags); typedef void (VKAPI_PTR *PFN_vkCmdEndQuery)(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query); typedef void (VKAPI_PTR *PFN_vkCmdResetQueryPool)(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount); typedef void (VKAPI_PTR *PFN_vkCmdWriteTimestamp)(VkCommandBuffer commandBuffer, VkPipelineStageFlagBits pipelineStage, VkQueryPool queryPool, uint32_t query); typedef void (VKAPI_PTR *PFN_vkCmdCopyQueryPoolResults)(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize stride, VkQueryResultFlags flags); typedef void (VKAPI_PTR *PFN_vkCmdPushConstants)(VkCommandBuffer commandBuffer, VkPipelineLayout layout, VkShaderStageFlags stageFlags, uint32_t offset, uint32_t size, const void* pValues); typedef void (VKAPI_PTR *PFN_vkCmdBeginRenderPass)(VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo* pRenderPassBegin, VkSubpassContents contents); typedef void (VKAPI_PTR *PFN_vkCmdNextSubpass)(VkCommandBuffer commandBuffer, VkSubpassContents contents); typedef void (VKAPI_PTR *PFN_vkCmdEndRenderPass)(VkCommandBuffer commandBuffer); typedef void (VKAPI_PTR *PFN_vkCmdExecuteCommands)(VkCommandBuffer commandBuffer, uint32_t commandBufferCount, const VkCommandBuffer* pCommandBuffers); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkCreateInstance( const VkInstanceCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkInstance* pInstance); VKAPI_ATTR void VKAPI_CALL vkDestroyInstance( VkInstance instance, const VkAllocationCallbacks* pAllocator); VKAPI_ATTR VkResult VKAPI_CALL vkEnumeratePhysicalDevices( VkInstance instance, uint32_t* pPhysicalDeviceCount, VkPhysicalDevice* pPhysicalDevices); VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceFeatures( VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures* pFeatures); VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceFormatProperties( VkPhysicalDevice physicalDevice, VkFormat format, VkFormatProperties* pFormatProperties); VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceImageFormatProperties( VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkImageTiling tiling, VkImageUsageFlags usage, VkImageCreateFlags flags, VkImageFormatProperties* pImageFormatProperties); VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceProperties( VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties* pProperties); VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceQueueFamilyProperties( VkPhysicalDevice physicalDevice, uint32_t* pQueueFamilyPropertyCount, VkQueueFamilyProperties* pQueueFamilyProperties); VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceMemoryProperties( VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties* pMemoryProperties); VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vkGetInstanceProcAddr( VkInstance instance, const char* pName); VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vkGetDeviceProcAddr( VkDevice device, const char* pName); VKAPI_ATTR VkResult VKAPI_CALL vkCreateDevice( VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDevice* pDevice); VKAPI_ATTR void VKAPI_CALL vkDestroyDevice( VkDevice device, const VkAllocationCallbacks* pAllocator); VKAPI_ATTR VkResult VKAPI_CALL vkEnumerateInstanceExtensionProperties( const char* pLayerName, uint32_t* pPropertyCount, VkExtensionProperties* pProperties); VKAPI_ATTR VkResult VKAPI_CALL vkEnumerateDeviceExtensionProperties( VkPhysicalDevice physicalDevice, const char* pLayerName, uint32_t* pPropertyCount, VkExtensionProperties* pProperties); VKAPI_ATTR VkResult VKAPI_CALL vkEnumerateInstanceLayerProperties( uint32_t* pPropertyCount, VkLayerProperties* pProperties); VKAPI_ATTR VkResult VKAPI_CALL vkEnumerateDeviceLayerProperties( VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkLayerProperties* pProperties); VKAPI_ATTR void VKAPI_CALL vkGetDeviceQueue( VkDevice device, uint32_t queueFamilyIndex, uint32_t queueIndex, VkQueue* pQueue); VKAPI_ATTR VkResult VKAPI_CALL vkQueueSubmit( VkQueue queue, uint32_t submitCount, const VkSubmitInfo* pSubmits, VkFence fence); VKAPI_ATTR VkResult VKAPI_CALL vkQueueWaitIdle( VkQueue queue); VKAPI_ATTR VkResult VKAPI_CALL vkDeviceWaitIdle( VkDevice device); VKAPI_ATTR VkResult VKAPI_CALL vkAllocateMemory( VkDevice device, const VkMemoryAllocateInfo* pAllocateInfo, const VkAllocationCallbacks* pAllocator, VkDeviceMemory* pMemory); VKAPI_ATTR void VKAPI_CALL vkFreeMemory( VkDevice device, VkDeviceMemory memory, const VkAllocationCallbacks* pAllocator); VKAPI_ATTR VkResult VKAPI_CALL vkMapMemory( VkDevice device, VkDeviceMemory memory, VkDeviceSize offset, VkDeviceSize size, VkMemoryMapFlags flags, void** ppData); VKAPI_ATTR void VKAPI_CALL vkUnmapMemory( VkDevice device, VkDeviceMemory memory); VKAPI_ATTR VkResult VKAPI_CALL vkFlushMappedMemoryRanges( VkDevice device, uint32_t memoryRangeCount, const VkMappedMemoryRange* pMemoryRanges); VKAPI_ATTR VkResult VKAPI_CALL vkInvalidateMappedMemoryRanges( VkDevice device, uint32_t memoryRangeCount, const VkMappedMemoryRange* pMemoryRanges); VKAPI_ATTR void VKAPI_CALL vkGetDeviceMemoryCommitment( VkDevice device, VkDeviceMemory memory, VkDeviceSize* pCommittedMemoryInBytes); VKAPI_ATTR VkResult VKAPI_CALL vkBindBufferMemory( VkDevice device, VkBuffer buffer, VkDeviceMemory memory, VkDeviceSize memoryOffset); VKAPI_ATTR VkResult VKAPI_CALL vkBindImageMemory( VkDevice device, VkImage image, VkDeviceMemory memory, VkDeviceSize memoryOffset); VKAPI_ATTR void VKAPI_CALL vkGetBufferMemoryRequirements( VkDevice device, VkBuffer buffer, VkMemoryRequirements* pMemoryRequirements); VKAPI_ATTR void VKAPI_CALL vkGetImageMemoryRequirements( VkDevice device, VkImage image, VkMemoryRequirements* pMemoryRequirements); VKAPI_ATTR void VKAPI_CALL vkGetImageSparseMemoryRequirements( VkDevice device, VkImage image, uint32_t* pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements* pSparseMemoryRequirements); VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceSparseImageFormatProperties( VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkSampleCountFlagBits samples, VkImageUsageFlags usage, VkImageTiling tiling, uint32_t* pPropertyCount, VkSparseImageFormatProperties* pProperties); VKAPI_ATTR VkResult VKAPI_CALL vkQueueBindSparse( VkQueue queue, uint32_t bindInfoCount, const VkBindSparseInfo* pBindInfo, VkFence fence); VKAPI_ATTR VkResult VKAPI_CALL vkCreateFence( VkDevice device, const VkFenceCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkFence* pFence); VKAPI_ATTR void VKAPI_CALL vkDestroyFence( VkDevice device, VkFence fence, const VkAllocationCallbacks* pAllocator); VKAPI_ATTR VkResult VKAPI_CALL vkResetFences( VkDevice device, uint32_t fenceCount, const VkFence* pFences); VKAPI_ATTR VkResult VKAPI_CALL vkGetFenceStatus( VkDevice device, VkFence fence); VKAPI_ATTR VkResult VKAPI_CALL vkWaitForFences( VkDevice device, uint32_t fenceCount, const VkFence* pFences, VkBool32 waitAll, uint64_t timeout); VKAPI_ATTR VkResult VKAPI_CALL vkCreateSemaphore( VkDevice device, const VkSemaphoreCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSemaphore* pSemaphore); VKAPI_ATTR void VKAPI_CALL vkDestroySemaphore( VkDevice device, VkSemaphore semaphore, const VkAllocationCallbacks* pAllocator); VKAPI_ATTR VkResult VKAPI_CALL vkCreateEvent( VkDevice device, const VkEventCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkEvent* pEvent); VKAPI_ATTR void VKAPI_CALL vkDestroyEvent( VkDevice device, VkEvent event, const VkAllocationCallbacks* pAllocator); VKAPI_ATTR VkResult VKAPI_CALL vkGetEventStatus( VkDevice device, VkEvent event); VKAPI_ATTR VkResult VKAPI_CALL vkSetEvent( VkDevice device, VkEvent event); VKAPI_ATTR VkResult VKAPI_CALL vkResetEvent( VkDevice device, VkEvent event); VKAPI_ATTR VkResult VKAPI_CALL vkCreateQueryPool( VkDevice device, const VkQueryPoolCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkQueryPool* pQueryPool); VKAPI_ATTR void VKAPI_CALL vkDestroyQueryPool( VkDevice device, VkQueryPool queryPool, const VkAllocationCallbacks* pAllocator); VKAPI_ATTR VkResult VKAPI_CALL vkGetQueryPoolResults( VkDevice device, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, size_t dataSize, void* pData, VkDeviceSize stride, VkQueryResultFlags flags); VKAPI_ATTR VkResult VKAPI_CALL vkCreateBuffer( VkDevice device, const VkBufferCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkBuffer* pBuffer); VKAPI_ATTR void VKAPI_CALL vkDestroyBuffer( VkDevice device, VkBuffer buffer, const VkAllocationCallbacks* pAllocator); VKAPI_ATTR VkResult VKAPI_CALL vkCreateBufferView( VkDevice device, const VkBufferViewCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkBufferView* pView); VKAPI_ATTR void VKAPI_CALL vkDestroyBufferView( VkDevice device, VkBufferView bufferView, const VkAllocationCallbacks* pAllocator); VKAPI_ATTR VkResult VKAPI_CALL vkCreateImage( VkDevice device, const VkImageCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkImage* pImage); VKAPI_ATTR void VKAPI_CALL vkDestroyImage( VkDevice device, VkImage image, const VkAllocationCallbacks* pAllocator); VKAPI_ATTR void VKAPI_CALL vkGetImageSubresourceLayout( VkDevice device, VkImage image, const VkImageSubresource* pSubresource, VkSubresourceLayout* pLayout); VKAPI_ATTR VkResult VKAPI_CALL vkCreateImageView( VkDevice device, const VkImageViewCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkImageView* pView); VKAPI_ATTR void VKAPI_CALL vkDestroyImageView( VkDevice device, VkImageView imageView, const VkAllocationCallbacks* pAllocator); VKAPI_ATTR VkResult VKAPI_CALL vkCreateShaderModule( VkDevice device, const VkShaderModuleCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkShaderModule* pShaderModule); VKAPI_ATTR void VKAPI_CALL vkDestroyShaderModule( VkDevice device, VkShaderModule shaderModule, const VkAllocationCallbacks* pAllocator); VKAPI_ATTR VkResult VKAPI_CALL vkCreatePipelineCache( VkDevice device, const VkPipelineCacheCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkPipelineCache* pPipelineCache); VKAPI_ATTR void VKAPI_CALL vkDestroyPipelineCache( VkDevice device, VkPipelineCache pipelineCache, const VkAllocationCallbacks* pAllocator); VKAPI_ATTR VkResult VKAPI_CALL vkGetPipelineCacheData( VkDevice device, VkPipelineCache pipelineCache, size_t* pDataSize, void* pData); VKAPI_ATTR VkResult VKAPI_CALL vkMergePipelineCaches( VkDevice device, VkPipelineCache dstCache, uint32_t srcCacheCount, const VkPipelineCache* pSrcCaches); VKAPI_ATTR VkResult VKAPI_CALL vkCreateGraphicsPipelines( VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkGraphicsPipelineCreateInfo* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines); VKAPI_ATTR VkResult VKAPI_CALL vkCreateComputePipelines( VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkComputePipelineCreateInfo* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines); VKAPI_ATTR void VKAPI_CALL vkDestroyPipeline( VkDevice device, VkPipeline pipeline, const VkAllocationCallbacks* pAllocator); VKAPI_ATTR VkResult VKAPI_CALL vkCreatePipelineLayout( VkDevice device, const VkPipelineLayoutCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkPipelineLayout* pPipelineLayout); VKAPI_ATTR void VKAPI_CALL vkDestroyPipelineLayout( VkDevice device, VkPipelineLayout pipelineLayout, const VkAllocationCallbacks* pAllocator); VKAPI_ATTR VkResult VKAPI_CALL vkCreateSampler( VkDevice device, const VkSamplerCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSampler* pSampler); VKAPI_ATTR void VKAPI_CALL vkDestroySampler( VkDevice device, VkSampler sampler, const VkAllocationCallbacks* pAllocator); VKAPI_ATTR VkResult VKAPI_CALL vkCreateDescriptorSetLayout( VkDevice device, const VkDescriptorSetLayoutCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDescriptorSetLayout* pSetLayout); VKAPI_ATTR void VKAPI_CALL vkDestroyDescriptorSetLayout( VkDevice device, VkDescriptorSetLayout descriptorSetLayout, const VkAllocationCallbacks* pAllocator); VKAPI_ATTR VkResult VKAPI_CALL vkCreateDescriptorPool( VkDevice device, const VkDescriptorPoolCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDescriptorPool* pDescriptorPool); VKAPI_ATTR void VKAPI_CALL vkDestroyDescriptorPool( VkDevice device, VkDescriptorPool descriptorPool, const VkAllocationCallbacks* pAllocator); VKAPI_ATTR VkResult VKAPI_CALL vkResetDescriptorPool( VkDevice device, VkDescriptorPool descriptorPool, VkDescriptorPoolResetFlags flags); VKAPI_ATTR VkResult VKAPI_CALL vkAllocateDescriptorSets( VkDevice device, const VkDescriptorSetAllocateInfo* pAllocateInfo, VkDescriptorSet* pDescriptorSets); VKAPI_ATTR VkResult VKAPI_CALL vkFreeDescriptorSets( VkDevice device, VkDescriptorPool descriptorPool, uint32_t descriptorSetCount, const VkDescriptorSet* pDescriptorSets); VKAPI_ATTR void VKAPI_CALL vkUpdateDescriptorSets( VkDevice device, uint32_t descriptorWriteCount, const VkWriteDescriptorSet* pDescriptorWrites, uint32_t descriptorCopyCount, const VkCopyDescriptorSet* pDescriptorCopies); VKAPI_ATTR VkResult VKAPI_CALL vkCreateFramebuffer( VkDevice device, const VkFramebufferCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkFramebuffer* pFramebuffer); VKAPI_ATTR void VKAPI_CALL vkDestroyFramebuffer( VkDevice device, VkFramebuffer framebuffer, const VkAllocationCallbacks* pAllocator); VKAPI_ATTR VkResult VKAPI_CALL vkCreateRenderPass( VkDevice device, const VkRenderPassCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkRenderPass* pRenderPass); VKAPI_ATTR void VKAPI_CALL vkDestroyRenderPass( VkDevice device, VkRenderPass renderPass, const VkAllocationCallbacks* pAllocator); VKAPI_ATTR void VKAPI_CALL vkGetRenderAreaGranularity( VkDevice device, VkRenderPass renderPass, VkExtent2D* pGranularity); VKAPI_ATTR VkResult VKAPI_CALL vkCreateCommandPool( VkDevice device, const VkCommandPoolCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkCommandPool* pCommandPool); VKAPI_ATTR void VKAPI_CALL vkDestroyCommandPool( VkDevice device, VkCommandPool commandPool, const VkAllocationCallbacks* pAllocator); VKAPI_ATTR VkResult VKAPI_CALL vkResetCommandPool( VkDevice device, VkCommandPool commandPool, VkCommandPoolResetFlags flags); VKAPI_ATTR VkResult VKAPI_CALL vkAllocateCommandBuffers( VkDevice device, const VkCommandBufferAllocateInfo* pAllocateInfo, VkCommandBuffer* pCommandBuffers); VKAPI_ATTR void VKAPI_CALL vkFreeCommandBuffers( VkDevice device, VkCommandPool commandPool, uint32_t commandBufferCount, const VkCommandBuffer* pCommandBuffers); VKAPI_ATTR VkResult VKAPI_CALL vkBeginCommandBuffer( VkCommandBuffer commandBuffer, const VkCommandBufferBeginInfo* pBeginInfo); VKAPI_ATTR VkResult VKAPI_CALL vkEndCommandBuffer( VkCommandBuffer commandBuffer); VKAPI_ATTR VkResult VKAPI_CALL vkResetCommandBuffer( VkCommandBuffer commandBuffer, VkCommandBufferResetFlags flags); VKAPI_ATTR void VKAPI_CALL vkCmdBindPipeline( VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline); VKAPI_ATTR void VKAPI_CALL vkCmdSetViewport( VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, const VkViewport* pViewports); VKAPI_ATTR void VKAPI_CALL vkCmdSetScissor( VkCommandBuffer commandBuffer, uint32_t firstScissor, uint32_t scissorCount, const VkRect2D* pScissors); VKAPI_ATTR void VKAPI_CALL vkCmdSetLineWidth( VkCommandBuffer commandBuffer, float lineWidth); VKAPI_ATTR void VKAPI_CALL vkCmdSetDepthBias( VkCommandBuffer commandBuffer, float depthBiasConstantFactor, float depthBiasClamp, float depthBiasSlopeFactor); VKAPI_ATTR void VKAPI_CALL vkCmdSetBlendConstants( VkCommandBuffer commandBuffer, const float blendConstants[4]); VKAPI_ATTR void VKAPI_CALL vkCmdSetDepthBounds( VkCommandBuffer commandBuffer, float minDepthBounds, float maxDepthBounds); VKAPI_ATTR void VKAPI_CALL vkCmdSetStencilCompareMask( VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t compareMask); VKAPI_ATTR void VKAPI_CALL vkCmdSetStencilWriteMask( VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t writeMask); VKAPI_ATTR void VKAPI_CALL vkCmdSetStencilReference( VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t reference); VKAPI_ATTR void VKAPI_CALL vkCmdBindDescriptorSets( VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, uint32_t firstSet, uint32_t descriptorSetCount, const VkDescriptorSet* pDescriptorSets, uint32_t dynamicOffsetCount, const uint32_t* pDynamicOffsets); VKAPI_ATTR void VKAPI_CALL vkCmdBindIndexBuffer( VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkIndexType indexType); VKAPI_ATTR void VKAPI_CALL vkCmdBindVertexBuffers( VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, const VkBuffer* pBuffers, const VkDeviceSize* pOffsets); VKAPI_ATTR void VKAPI_CALL vkCmdDraw( VkCommandBuffer commandBuffer, uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance); VKAPI_ATTR void VKAPI_CALL vkCmdDrawIndexed( VkCommandBuffer commandBuffer, uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, int32_t vertexOffset, uint32_t firstInstance); VKAPI_ATTR void VKAPI_CALL vkCmdDrawIndirect( VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride); VKAPI_ATTR void VKAPI_CALL vkCmdDrawIndexedIndirect( VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride); VKAPI_ATTR void VKAPI_CALL vkCmdDispatch( VkCommandBuffer commandBuffer, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ); VKAPI_ATTR void VKAPI_CALL vkCmdDispatchIndirect( VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset); VKAPI_ATTR void VKAPI_CALL vkCmdCopyBuffer( VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkBuffer dstBuffer, uint32_t regionCount, const VkBufferCopy* pRegions); VKAPI_ATTR void VKAPI_CALL vkCmdCopyImage( VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageCopy* pRegions); VKAPI_ATTR void VKAPI_CALL vkCmdBlitImage( VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageBlit* pRegions, VkFilter filter); VKAPI_ATTR void VKAPI_CALL vkCmdCopyBufferToImage( VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkBufferImageCopy* pRegions); VKAPI_ATTR void VKAPI_CALL vkCmdCopyImageToBuffer( VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkBuffer dstBuffer, uint32_t regionCount, const VkBufferImageCopy* pRegions); VKAPI_ATTR void VKAPI_CALL vkCmdUpdateBuffer( VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize dataSize, const void* pData); VKAPI_ATTR void VKAPI_CALL vkCmdFillBuffer( VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize size, uint32_t data); VKAPI_ATTR void VKAPI_CALL vkCmdClearColorImage( VkCommandBuffer commandBuffer, VkImage image, VkImageLayout imageLayout, const VkClearColorValue* pColor, uint32_t rangeCount, const VkImageSubresourceRange* pRanges); VKAPI_ATTR void VKAPI_CALL vkCmdClearDepthStencilImage( VkCommandBuffer commandBuffer, VkImage image, VkImageLayout imageLayout, const VkClearDepthStencilValue* pDepthStencil, uint32_t rangeCount, const VkImageSubresourceRange* pRanges); VKAPI_ATTR void VKAPI_CALL vkCmdClearAttachments( VkCommandBuffer commandBuffer, uint32_t attachmentCount, const VkClearAttachment* pAttachments, uint32_t rectCount, const VkClearRect* pRects); VKAPI_ATTR void VKAPI_CALL vkCmdResolveImage( VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageResolve* pRegions); VKAPI_ATTR void VKAPI_CALL vkCmdSetEvent( VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask); VKAPI_ATTR void VKAPI_CALL vkCmdResetEvent( VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask); VKAPI_ATTR void VKAPI_CALL vkCmdWaitEvents( VkCommandBuffer commandBuffer, uint32_t eventCount, const VkEvent* pEvents, VkPipelineStageFlags srcStageMask, VkPipelineStageFlags dstStageMask, uint32_t memoryBarrierCount, const VkMemoryBarrier* pMemoryBarriers, uint32_t bufferMemoryBarrierCount, const VkBufferMemoryBarrier* pBufferMemoryBarriers, uint32_t imageMemoryBarrierCount, const VkImageMemoryBarrier* pImageMemoryBarriers); VKAPI_ATTR void VKAPI_CALL vkCmdPipelineBarrier( VkCommandBuffer commandBuffer, VkPipelineStageFlags srcStageMask, VkPipelineStageFlags dstStageMask, VkDependencyFlags dependencyFlags, uint32_t memoryBarrierCount, const VkMemoryBarrier* pMemoryBarriers, uint32_t bufferMemoryBarrierCount, const VkBufferMemoryBarrier* pBufferMemoryBarriers, uint32_t imageMemoryBarrierCount, const VkImageMemoryBarrier* pImageMemoryBarriers); VKAPI_ATTR void VKAPI_CALL vkCmdBeginQuery( VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, VkQueryControlFlags flags); VKAPI_ATTR void VKAPI_CALL vkCmdEndQuery( VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query); VKAPI_ATTR void VKAPI_CALL vkCmdResetQueryPool( VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount); VKAPI_ATTR void VKAPI_CALL vkCmdWriteTimestamp( VkCommandBuffer commandBuffer, VkPipelineStageFlagBits pipelineStage, VkQueryPool queryPool, uint32_t query); VKAPI_ATTR void VKAPI_CALL vkCmdCopyQueryPoolResults( VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize stride, VkQueryResultFlags flags); VKAPI_ATTR void VKAPI_CALL vkCmdPushConstants( VkCommandBuffer commandBuffer, VkPipelineLayout layout, VkShaderStageFlags stageFlags, uint32_t offset, uint32_t size, const void* pValues); VKAPI_ATTR void VKAPI_CALL vkCmdBeginRenderPass( VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo* pRenderPassBegin, VkSubpassContents contents); VKAPI_ATTR void VKAPI_CALL vkCmdNextSubpass( VkCommandBuffer commandBuffer, VkSubpassContents contents); VKAPI_ATTR void VKAPI_CALL vkCmdEndRenderPass( VkCommandBuffer commandBuffer); VKAPI_ATTR void VKAPI_CALL vkCmdExecuteCommands( VkCommandBuffer commandBuffer, uint32_t commandBufferCount, const VkCommandBuffer* pCommandBuffers); #endif // VK_VERSION_1_1 is a preprocessor guard. Do not pass it to API calls. #define VK_VERSION_1_1 1 // Vulkan 1.1 version number #define VK_API_VERSION_1_1 VK_MAKE_API_VERSION(0, 1, 1, 0)// Patch version should always be set to 0 VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSamplerYcbcrConversion) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorUpdateTemplate) #define VK_MAX_DEVICE_GROUP_SIZE 32U #define VK_LUID_SIZE 8U #define VK_QUEUE_FAMILY_EXTERNAL (~1U) typedef enum VkPointClippingBehavior { VK_POINT_CLIPPING_BEHAVIOR_ALL_CLIP_PLANES = 0, VK_POINT_CLIPPING_BEHAVIOR_USER_CLIP_PLANES_ONLY = 1, VK_POINT_CLIPPING_BEHAVIOR_ALL_CLIP_PLANES_KHR = VK_POINT_CLIPPING_BEHAVIOR_ALL_CLIP_PLANES, VK_POINT_CLIPPING_BEHAVIOR_USER_CLIP_PLANES_ONLY_KHR = VK_POINT_CLIPPING_BEHAVIOR_USER_CLIP_PLANES_ONLY, VK_POINT_CLIPPING_BEHAVIOR_MAX_ENUM = 0x7FFFFFFF } VkPointClippingBehavior; typedef enum VkTessellationDomainOrigin { VK_TESSELLATION_DOMAIN_ORIGIN_UPPER_LEFT = 0, VK_TESSELLATION_DOMAIN_ORIGIN_LOWER_LEFT = 1, VK_TESSELLATION_DOMAIN_ORIGIN_UPPER_LEFT_KHR = VK_TESSELLATION_DOMAIN_ORIGIN_UPPER_LEFT, VK_TESSELLATION_DOMAIN_ORIGIN_LOWER_LEFT_KHR = VK_TESSELLATION_DOMAIN_ORIGIN_LOWER_LEFT, VK_TESSELLATION_DOMAIN_ORIGIN_MAX_ENUM = 0x7FFFFFFF } VkTessellationDomainOrigin; typedef enum VkSamplerYcbcrModelConversion { VK_SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY = 0, VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_IDENTITY = 1, VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_709 = 2, VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_601 = 3, VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_2020 = 4, VK_SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY_KHR = VK_SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY, VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_IDENTITY_KHR = VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_IDENTITY, VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_709_KHR = VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_709, VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_601_KHR = VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_601, VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_2020_KHR = VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_2020, VK_SAMPLER_YCBCR_MODEL_CONVERSION_MAX_ENUM = 0x7FFFFFFF } VkSamplerYcbcrModelConversion; typedef enum VkSamplerYcbcrRange { VK_SAMPLER_YCBCR_RANGE_ITU_FULL = 0, VK_SAMPLER_YCBCR_RANGE_ITU_NARROW = 1, VK_SAMPLER_YCBCR_RANGE_ITU_FULL_KHR = VK_SAMPLER_YCBCR_RANGE_ITU_FULL, VK_SAMPLER_YCBCR_RANGE_ITU_NARROW_KHR = VK_SAMPLER_YCBCR_RANGE_ITU_NARROW, VK_SAMPLER_YCBCR_RANGE_MAX_ENUM = 0x7FFFFFFF } VkSamplerYcbcrRange; typedef enum VkChromaLocation { VK_CHROMA_LOCATION_COSITED_EVEN = 0, VK_CHROMA_LOCATION_MIDPOINT = 1, VK_CHROMA_LOCATION_COSITED_EVEN_KHR = VK_CHROMA_LOCATION_COSITED_EVEN, VK_CHROMA_LOCATION_MIDPOINT_KHR = VK_CHROMA_LOCATION_MIDPOINT, VK_CHROMA_LOCATION_MAX_ENUM = 0x7FFFFFFF } VkChromaLocation; typedef enum VkDescriptorUpdateTemplateType { VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET = 0, VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS = 1, VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR = VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS, VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET_KHR = VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET, VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_MAX_ENUM = 0x7FFFFFFF } VkDescriptorUpdateTemplateType; typedef enum VkSubgroupFeatureFlagBits { VK_SUBGROUP_FEATURE_BASIC_BIT = 0x00000001, VK_SUBGROUP_FEATURE_VOTE_BIT = 0x00000002, VK_SUBGROUP_FEATURE_ARITHMETIC_BIT = 0x00000004, VK_SUBGROUP_FEATURE_BALLOT_BIT = 0x00000008, VK_SUBGROUP_FEATURE_SHUFFLE_BIT = 0x00000010, VK_SUBGROUP_FEATURE_SHUFFLE_RELATIVE_BIT = 0x00000020, VK_SUBGROUP_FEATURE_CLUSTERED_BIT = 0x00000040, VK_SUBGROUP_FEATURE_QUAD_BIT = 0x00000080, VK_SUBGROUP_FEATURE_ROTATE_BIT = 0x00000200, VK_SUBGROUP_FEATURE_ROTATE_CLUSTERED_BIT = 0x00000400, VK_SUBGROUP_FEATURE_PARTITIONED_BIT_NV = 0x00000100, VK_SUBGROUP_FEATURE_ROTATE_BIT_KHR = VK_SUBGROUP_FEATURE_ROTATE_BIT, VK_SUBGROUP_FEATURE_ROTATE_CLUSTERED_BIT_KHR = VK_SUBGROUP_FEATURE_ROTATE_CLUSTERED_BIT, VK_SUBGROUP_FEATURE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VkSubgroupFeatureFlagBits; typedef VkFlags VkSubgroupFeatureFlags; typedef enum VkPeerMemoryFeatureFlagBits { VK_PEER_MEMORY_FEATURE_COPY_SRC_BIT = 0x00000001, VK_PEER_MEMORY_FEATURE_COPY_DST_BIT = 0x00000002, VK_PEER_MEMORY_FEATURE_GENERIC_SRC_BIT = 0x00000004, VK_PEER_MEMORY_FEATURE_GENERIC_DST_BIT = 0x00000008, VK_PEER_MEMORY_FEATURE_COPY_SRC_BIT_KHR = VK_PEER_MEMORY_FEATURE_COPY_SRC_BIT, VK_PEER_MEMORY_FEATURE_COPY_DST_BIT_KHR = VK_PEER_MEMORY_FEATURE_COPY_DST_BIT, VK_PEER_MEMORY_FEATURE_GENERIC_SRC_BIT_KHR = VK_PEER_MEMORY_FEATURE_GENERIC_SRC_BIT, VK_PEER_MEMORY_FEATURE_GENERIC_DST_BIT_KHR = VK_PEER_MEMORY_FEATURE_GENERIC_DST_BIT, VK_PEER_MEMORY_FEATURE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VkPeerMemoryFeatureFlagBits; typedef VkFlags VkPeerMemoryFeatureFlags; typedef enum VkMemoryAllocateFlagBits { VK_MEMORY_ALLOCATE_DEVICE_MASK_BIT = 0x00000001, VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT = 0x00000002, VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT = 0x00000004, VK_MEMORY_ALLOCATE_DEVICE_MASK_BIT_KHR = VK_MEMORY_ALLOCATE_DEVICE_MASK_BIT, VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT_KHR = VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT, VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_KHR = VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT, VK_MEMORY_ALLOCATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VkMemoryAllocateFlagBits; typedef VkFlags VkMemoryAllocateFlags; typedef VkFlags VkCommandPoolTrimFlags; typedef VkFlags VkDescriptorUpdateTemplateCreateFlags; typedef enum VkExternalMemoryHandleTypeFlagBits { VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT = 0x00000001, VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT = 0x00000002, VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT = 0x00000004, VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT = 0x00000008, VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT = 0x00000010, VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT = 0x00000020, VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT = 0x00000040, VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT = 0x00000200, VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID = 0x00000400, VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_ALLOCATION_BIT_EXT = 0x00000080, VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_MAPPED_FOREIGN_MEMORY_BIT_EXT = 0x00000100, VK_EXTERNAL_MEMORY_HANDLE_TYPE_ZIRCON_VMO_BIT_FUCHSIA = 0x00000800, VK_EXTERNAL_MEMORY_HANDLE_TYPE_RDMA_ADDRESS_BIT_NV = 0x00001000, VK_EXTERNAL_MEMORY_HANDLE_TYPE_SCREEN_BUFFER_BIT_QNX = 0x00004000, VK_EXTERNAL_MEMORY_HANDLE_TYPE_MTLBUFFER_BIT_EXT = 0x00010000, VK_EXTERNAL_MEMORY_HANDLE_TYPE_MTLTEXTURE_BIT_EXT = 0x00020000, VK_EXTERNAL_MEMORY_HANDLE_TYPE_MTLHEAP_BIT_EXT = 0x00040000, VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT_KHR = VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT, VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHR = VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT, VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_KHR = VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT, VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT_KHR = VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT, VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT_KHR = VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT, VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT_KHR = VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT, VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT_KHR = VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT, VK_EXTERNAL_MEMORY_HANDLE_TYPE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VkExternalMemoryHandleTypeFlagBits; typedef VkFlags VkExternalMemoryHandleTypeFlags; typedef enum VkExternalMemoryFeatureFlagBits { VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT = 0x00000001, VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT = 0x00000002, VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT = 0x00000004, VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT_KHR = VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT, VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_KHR = VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT, VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_KHR = VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT, VK_EXTERNAL_MEMORY_FEATURE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VkExternalMemoryFeatureFlagBits; typedef VkFlags VkExternalMemoryFeatureFlags; typedef enum VkExternalFenceHandleTypeFlagBits { VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_FD_BIT = 0x00000001, VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_BIT = 0x00000002, VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT = 0x00000004, VK_EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BIT = 0x00000008, VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_FD_BIT_KHR = VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_FD_BIT, VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHR = VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_BIT, VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_KHR = VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT, VK_EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BIT_KHR = VK_EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BIT, VK_EXTERNAL_FENCE_HANDLE_TYPE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VkExternalFenceHandleTypeFlagBits; typedef VkFlags VkExternalFenceHandleTypeFlags; typedef enum VkExternalFenceFeatureFlagBits { VK_EXTERNAL_FENCE_FEATURE_EXPORTABLE_BIT = 0x00000001, VK_EXTERNAL_FENCE_FEATURE_IMPORTABLE_BIT = 0x00000002, VK_EXTERNAL_FENCE_FEATURE_EXPORTABLE_BIT_KHR = VK_EXTERNAL_FENCE_FEATURE_EXPORTABLE_BIT, VK_EXTERNAL_FENCE_FEATURE_IMPORTABLE_BIT_KHR = VK_EXTERNAL_FENCE_FEATURE_IMPORTABLE_BIT, VK_EXTERNAL_FENCE_FEATURE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VkExternalFenceFeatureFlagBits; typedef VkFlags VkExternalFenceFeatureFlags; typedef enum VkFenceImportFlagBits { VK_FENCE_IMPORT_TEMPORARY_BIT = 0x00000001, VK_FENCE_IMPORT_TEMPORARY_BIT_KHR = VK_FENCE_IMPORT_TEMPORARY_BIT, VK_FENCE_IMPORT_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VkFenceImportFlagBits; typedef VkFlags VkFenceImportFlags; typedef enum VkSemaphoreImportFlagBits { VK_SEMAPHORE_IMPORT_TEMPORARY_BIT = 0x00000001, VK_SEMAPHORE_IMPORT_TEMPORARY_BIT_KHR = VK_SEMAPHORE_IMPORT_TEMPORARY_BIT, VK_SEMAPHORE_IMPORT_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VkSemaphoreImportFlagBits; typedef VkFlags VkSemaphoreImportFlags; typedef enum VkExternalSemaphoreHandleTypeFlagBits { VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT = 0x00000001, VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT = 0x00000002, VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT = 0x00000004, VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT = 0x00000008, VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT = 0x00000010, VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_ZIRCON_EVENT_BIT_FUCHSIA = 0x00000080, VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_FENCE_BIT = VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT, VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT_KHR = VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT, VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHR = VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT, VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_KHR = VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT, VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT_KHR = VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT, VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT_KHR = VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT, VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VkExternalSemaphoreHandleTypeFlagBits; typedef VkFlags VkExternalSemaphoreHandleTypeFlags; typedef enum VkExternalSemaphoreFeatureFlagBits { VK_EXTERNAL_SEMAPHORE_FEATURE_EXPORTABLE_BIT = 0x00000001, VK_EXTERNAL_SEMAPHORE_FEATURE_IMPORTABLE_BIT = 0x00000002, VK_EXTERNAL_SEMAPHORE_FEATURE_EXPORTABLE_BIT_KHR = VK_EXTERNAL_SEMAPHORE_FEATURE_EXPORTABLE_BIT, VK_EXTERNAL_SEMAPHORE_FEATURE_IMPORTABLE_BIT_KHR = VK_EXTERNAL_SEMAPHORE_FEATURE_IMPORTABLE_BIT, VK_EXTERNAL_SEMAPHORE_FEATURE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VkExternalSemaphoreFeatureFlagBits; typedef VkFlags VkExternalSemaphoreFeatureFlags; typedef struct VkPhysicalDeviceSubgroupProperties { VkStructureType sType; void* pNext; uint32_t subgroupSize; VkShaderStageFlags supportedStages; VkSubgroupFeatureFlags supportedOperations; VkBool32 quadOperationsInAllStages; } VkPhysicalDeviceSubgroupProperties; typedef struct VkBindBufferMemoryInfo { VkStructureType sType; const void* pNext; VkBuffer buffer; VkDeviceMemory memory; VkDeviceSize memoryOffset; } VkBindBufferMemoryInfo; typedef struct VkBindImageMemoryInfo { VkStructureType sType; const void* pNext; VkImage image; VkDeviceMemory memory; VkDeviceSize memoryOffset; } VkBindImageMemoryInfo; typedef struct VkPhysicalDevice16BitStorageFeatures { VkStructureType sType; void* pNext; VkBool32 storageBuffer16BitAccess; VkBool32 uniformAndStorageBuffer16BitAccess; VkBool32 storagePushConstant16; VkBool32 storageInputOutput16; } VkPhysicalDevice16BitStorageFeatures; typedef struct VkMemoryDedicatedRequirements { VkStructureType sType; void* pNext; VkBool32 prefersDedicatedAllocation; VkBool32 requiresDedicatedAllocation; } VkMemoryDedicatedRequirements; typedef struct VkMemoryDedicatedAllocateInfo { VkStructureType sType; const void* pNext; VkImage image; VkBuffer buffer; } VkMemoryDedicatedAllocateInfo; typedef struct VkMemoryAllocateFlagsInfo { VkStructureType sType; const void* pNext; VkMemoryAllocateFlags flags; uint32_t deviceMask; } VkMemoryAllocateFlagsInfo; typedef struct VkDeviceGroupRenderPassBeginInfo { VkStructureType sType; const void* pNext; uint32_t deviceMask; uint32_t deviceRenderAreaCount; const VkRect2D* pDeviceRenderAreas; } VkDeviceGroupRenderPassBeginInfo; typedef struct VkDeviceGroupCommandBufferBeginInfo { VkStructureType sType; const void* pNext; uint32_t deviceMask; } VkDeviceGroupCommandBufferBeginInfo; typedef struct VkDeviceGroupSubmitInfo { VkStructureType sType; const void* pNext; uint32_t waitSemaphoreCount; const uint32_t* pWaitSemaphoreDeviceIndices; uint32_t commandBufferCount; const uint32_t* pCommandBufferDeviceMasks; uint32_t signalSemaphoreCount; const uint32_t* pSignalSemaphoreDeviceIndices; } VkDeviceGroupSubmitInfo; typedef struct VkDeviceGroupBindSparseInfo { VkStructureType sType; const void* pNext; uint32_t resourceDeviceIndex; uint32_t memoryDeviceIndex; } VkDeviceGroupBindSparseInfo; typedef struct VkBindBufferMemoryDeviceGroupInfo { VkStructureType sType; const void* pNext; uint32_t deviceIndexCount; const uint32_t* pDeviceIndices; } VkBindBufferMemoryDeviceGroupInfo; typedef struct VkBindImageMemoryDeviceGroupInfo { VkStructureType sType; const void* pNext; uint32_t deviceIndexCount; const uint32_t* pDeviceIndices; uint32_t splitInstanceBindRegionCount; const VkRect2D* pSplitInstanceBindRegions; } VkBindImageMemoryDeviceGroupInfo; typedef struct VkPhysicalDeviceGroupProperties { VkStructureType sType; void* pNext; uint32_t physicalDeviceCount; VkPhysicalDevice physicalDevices[VK_MAX_DEVICE_GROUP_SIZE]; VkBool32 subsetAllocation; } VkPhysicalDeviceGroupProperties; typedef struct VkDeviceGroupDeviceCreateInfo { VkStructureType sType; const void* pNext; uint32_t physicalDeviceCount; const VkPhysicalDevice* pPhysicalDevices; } VkDeviceGroupDeviceCreateInfo; typedef struct VkBufferMemoryRequirementsInfo2 { VkStructureType sType; const void* pNext; VkBuffer buffer; } VkBufferMemoryRequirementsInfo2; typedef struct VkImageMemoryRequirementsInfo2 { VkStructureType sType; const void* pNext; VkImage image; } VkImageMemoryRequirementsInfo2; typedef struct VkImageSparseMemoryRequirementsInfo2 { VkStructureType sType; const void* pNext; VkImage image; } VkImageSparseMemoryRequirementsInfo2; typedef struct VkMemoryRequirements2 { VkStructureType sType; void* pNext; VkMemoryRequirements memoryRequirements; } VkMemoryRequirements2; typedef struct VkSparseImageMemoryRequirements2 { VkStructureType sType; void* pNext; VkSparseImageMemoryRequirements memoryRequirements; } VkSparseImageMemoryRequirements2; typedef struct VkPhysicalDeviceFeatures2 { VkStructureType sType; void* pNext; VkPhysicalDeviceFeatures features; } VkPhysicalDeviceFeatures2; typedef struct VkPhysicalDeviceProperties2 { VkStructureType sType; void* pNext; VkPhysicalDeviceProperties properties; } VkPhysicalDeviceProperties2; typedef struct VkFormatProperties2 { VkStructureType sType; void* pNext; VkFormatProperties formatProperties; } VkFormatProperties2; typedef struct VkImageFormatProperties2 { VkStructureType sType; void* pNext; VkImageFormatProperties imageFormatProperties; } VkImageFormatProperties2; typedef struct VkPhysicalDeviceImageFormatInfo2 { VkStructureType sType; const void* pNext; VkFormat format; VkImageType type; VkImageTiling tiling; VkImageUsageFlags usage; VkImageCreateFlags flags; } VkPhysicalDeviceImageFormatInfo2; typedef struct VkQueueFamilyProperties2 { VkStructureType sType; void* pNext; VkQueueFamilyProperties queueFamilyProperties; } VkQueueFamilyProperties2; typedef struct VkPhysicalDeviceMemoryProperties2 { VkStructureType sType; void* pNext; VkPhysicalDeviceMemoryProperties memoryProperties; } VkPhysicalDeviceMemoryProperties2; typedef struct VkSparseImageFormatProperties2 { VkStructureType sType; void* pNext; VkSparseImageFormatProperties properties; } VkSparseImageFormatProperties2; typedef struct VkPhysicalDeviceSparseImageFormatInfo2 { VkStructureType sType; const void* pNext; VkFormat format; VkImageType type; VkSampleCountFlagBits samples; VkImageUsageFlags usage; VkImageTiling tiling; } VkPhysicalDeviceSparseImageFormatInfo2; typedef struct VkPhysicalDevicePointClippingProperties { VkStructureType sType; void* pNext; VkPointClippingBehavior pointClippingBehavior; } VkPhysicalDevicePointClippingProperties; typedef struct VkInputAttachmentAspectReference { uint32_t subpass; uint32_t inputAttachmentIndex; VkImageAspectFlags aspectMask; } VkInputAttachmentAspectReference; typedef struct VkRenderPassInputAttachmentAspectCreateInfo { VkStructureType sType; const void* pNext; uint32_t aspectReferenceCount; const VkInputAttachmentAspectReference* pAspectReferences; } VkRenderPassInputAttachmentAspectCreateInfo; typedef struct VkImageViewUsageCreateInfo { VkStructureType sType; const void* pNext; VkImageUsageFlags usage; } VkImageViewUsageCreateInfo; typedef struct VkPipelineTessellationDomainOriginStateCreateInfo { VkStructureType sType; const void* pNext; VkTessellationDomainOrigin domainOrigin; } VkPipelineTessellationDomainOriginStateCreateInfo; typedef struct VkRenderPassMultiviewCreateInfo { VkStructureType sType; const void* pNext; uint32_t subpassCount; const uint32_t* pViewMasks; uint32_t dependencyCount; const int32_t* pViewOffsets; uint32_t correlationMaskCount; const uint32_t* pCorrelationMasks; } VkRenderPassMultiviewCreateInfo; typedef struct VkPhysicalDeviceMultiviewFeatures { VkStructureType sType; void* pNext; VkBool32 multiview; VkBool32 multiviewGeometryShader; VkBool32 multiviewTessellationShader; } VkPhysicalDeviceMultiviewFeatures; typedef struct VkPhysicalDeviceMultiviewProperties { VkStructureType sType; void* pNext; uint32_t maxMultiviewViewCount; uint32_t maxMultiviewInstanceIndex; } VkPhysicalDeviceMultiviewProperties; typedef struct VkPhysicalDeviceVariablePointersFeatures { VkStructureType sType; void* pNext; VkBool32 variablePointersStorageBuffer; VkBool32 variablePointers; } VkPhysicalDeviceVariablePointersFeatures; typedef VkPhysicalDeviceVariablePointersFeatures VkPhysicalDeviceVariablePointerFeatures; typedef struct VkPhysicalDeviceProtectedMemoryFeatures { VkStructureType sType; void* pNext; VkBool32 protectedMemory; } VkPhysicalDeviceProtectedMemoryFeatures; typedef struct VkPhysicalDeviceProtectedMemoryProperties { VkStructureType sType; void* pNext; VkBool32 protectedNoFault; } VkPhysicalDeviceProtectedMemoryProperties; typedef struct VkDeviceQueueInfo2 { VkStructureType sType; const void* pNext; VkDeviceQueueCreateFlags flags; uint32_t queueFamilyIndex; uint32_t queueIndex; } VkDeviceQueueInfo2; typedef struct VkProtectedSubmitInfo { VkStructureType sType; const void* pNext; VkBool32 protectedSubmit; } VkProtectedSubmitInfo; typedef struct VkSamplerYcbcrConversionCreateInfo { VkStructureType sType; const void* pNext; VkFormat format; VkSamplerYcbcrModelConversion ycbcrModel; VkSamplerYcbcrRange ycbcrRange; VkComponentMapping components; VkChromaLocation xChromaOffset; VkChromaLocation yChromaOffset; VkFilter chromaFilter; VkBool32 forceExplicitReconstruction; } VkSamplerYcbcrConversionCreateInfo; typedef struct VkSamplerYcbcrConversionInfo { VkStructureType sType; const void* pNext; VkSamplerYcbcrConversion conversion; } VkSamplerYcbcrConversionInfo; typedef struct VkBindImagePlaneMemoryInfo { VkStructureType sType; const void* pNext; VkImageAspectFlagBits planeAspect; } VkBindImagePlaneMemoryInfo; typedef struct VkImagePlaneMemoryRequirementsInfo { VkStructureType sType; const void* pNext; VkImageAspectFlagBits planeAspect; } VkImagePlaneMemoryRequirementsInfo; typedef struct VkPhysicalDeviceSamplerYcbcrConversionFeatures { VkStructureType sType; void* pNext; VkBool32 samplerYcbcrConversion; } VkPhysicalDeviceSamplerYcbcrConversionFeatures; typedef struct VkSamplerYcbcrConversionImageFormatProperties { VkStructureType sType; void* pNext; uint32_t combinedImageSamplerDescriptorCount; } VkSamplerYcbcrConversionImageFormatProperties; typedef struct VkDescriptorUpdateTemplateEntry { uint32_t dstBinding; uint32_t dstArrayElement; uint32_t descriptorCount; VkDescriptorType descriptorType; size_t offset; size_t stride; } VkDescriptorUpdateTemplateEntry; typedef struct VkDescriptorUpdateTemplateCreateInfo { VkStructureType sType; const void* pNext; VkDescriptorUpdateTemplateCreateFlags flags; uint32_t descriptorUpdateEntryCount; const VkDescriptorUpdateTemplateEntry* pDescriptorUpdateEntries; VkDescriptorUpdateTemplateType templateType; VkDescriptorSetLayout descriptorSetLayout; VkPipelineBindPoint pipelineBindPoint; VkPipelineLayout pipelineLayout; uint32_t set; } VkDescriptorUpdateTemplateCreateInfo; typedef struct VkExternalMemoryProperties { VkExternalMemoryFeatureFlags externalMemoryFeatures; VkExternalMemoryHandleTypeFlags exportFromImportedHandleTypes; VkExternalMemoryHandleTypeFlags compatibleHandleTypes; } VkExternalMemoryProperties; typedef struct VkPhysicalDeviceExternalImageFormatInfo { VkStructureType sType; const void* pNext; VkExternalMemoryHandleTypeFlagBits handleType; } VkPhysicalDeviceExternalImageFormatInfo; typedef struct VkExternalImageFormatProperties { VkStructureType sType; void* pNext; VkExternalMemoryProperties externalMemoryProperties; } VkExternalImageFormatProperties; typedef struct VkPhysicalDeviceExternalBufferInfo { VkStructureType sType; const void* pNext; VkBufferCreateFlags flags; VkBufferUsageFlags usage; VkExternalMemoryHandleTypeFlagBits handleType; } VkPhysicalDeviceExternalBufferInfo; typedef struct VkExternalBufferProperties { VkStructureType sType; void* pNext; VkExternalMemoryProperties externalMemoryProperties; } VkExternalBufferProperties; typedef struct VkPhysicalDeviceIDProperties { VkStructureType sType; void* pNext; uint8_t deviceUUID[VK_UUID_SIZE]; uint8_t driverUUID[VK_UUID_SIZE]; uint8_t deviceLUID[VK_LUID_SIZE]; uint32_t deviceNodeMask; VkBool32 deviceLUIDValid; } VkPhysicalDeviceIDProperties; typedef struct VkExternalMemoryImageCreateInfo { VkStructureType sType; const void* pNext; VkExternalMemoryHandleTypeFlags handleTypes; } VkExternalMemoryImageCreateInfo; typedef struct VkExternalMemoryBufferCreateInfo { VkStructureType sType; const void* pNext; VkExternalMemoryHandleTypeFlags handleTypes; } VkExternalMemoryBufferCreateInfo; typedef struct VkExportMemoryAllocateInfo { VkStructureType sType; const void* pNext; VkExternalMemoryHandleTypeFlags handleTypes; } VkExportMemoryAllocateInfo; typedef struct VkPhysicalDeviceExternalFenceInfo { VkStructureType sType; const void* pNext; VkExternalFenceHandleTypeFlagBits handleType; } VkPhysicalDeviceExternalFenceInfo; typedef struct VkExternalFenceProperties { VkStructureType sType; void* pNext; VkExternalFenceHandleTypeFlags exportFromImportedHandleTypes; VkExternalFenceHandleTypeFlags compatibleHandleTypes; VkExternalFenceFeatureFlags externalFenceFeatures; } VkExternalFenceProperties; typedef struct VkExportFenceCreateInfo { VkStructureType sType; const void* pNext; VkExternalFenceHandleTypeFlags handleTypes; } VkExportFenceCreateInfo; typedef struct VkExportSemaphoreCreateInfo { VkStructureType sType; const void* pNext; VkExternalSemaphoreHandleTypeFlags handleTypes; } VkExportSemaphoreCreateInfo; typedef struct VkPhysicalDeviceExternalSemaphoreInfo { VkStructureType sType; const void* pNext; VkExternalSemaphoreHandleTypeFlagBits handleType; } VkPhysicalDeviceExternalSemaphoreInfo; typedef struct VkExternalSemaphoreProperties { VkStructureType sType; void* pNext; VkExternalSemaphoreHandleTypeFlags exportFromImportedHandleTypes; VkExternalSemaphoreHandleTypeFlags compatibleHandleTypes; VkExternalSemaphoreFeatureFlags externalSemaphoreFeatures; } VkExternalSemaphoreProperties; typedef struct VkPhysicalDeviceMaintenance3Properties { VkStructureType sType; void* pNext; uint32_t maxPerSetDescriptors; VkDeviceSize maxMemoryAllocationSize; } VkPhysicalDeviceMaintenance3Properties; typedef struct VkDescriptorSetLayoutSupport { VkStructureType sType; void* pNext; VkBool32 supported; } VkDescriptorSetLayoutSupport; typedef struct VkPhysicalDeviceShaderDrawParametersFeatures { VkStructureType sType; void* pNext; VkBool32 shaderDrawParameters; } VkPhysicalDeviceShaderDrawParametersFeatures; typedef VkPhysicalDeviceShaderDrawParametersFeatures VkPhysicalDeviceShaderDrawParameterFeatures; typedef VkResult (VKAPI_PTR *PFN_vkEnumerateInstanceVersion)(uint32_t* pApiVersion); typedef VkResult (VKAPI_PTR *PFN_vkBindBufferMemory2)(VkDevice device, uint32_t bindInfoCount, const VkBindBufferMemoryInfo* pBindInfos); typedef VkResult (VKAPI_PTR *PFN_vkBindImageMemory2)(VkDevice device, uint32_t bindInfoCount, const VkBindImageMemoryInfo* pBindInfos); typedef void (VKAPI_PTR *PFN_vkGetDeviceGroupPeerMemoryFeatures)(VkDevice device, uint32_t heapIndex, uint32_t localDeviceIndex, uint32_t remoteDeviceIndex, VkPeerMemoryFeatureFlags* pPeerMemoryFeatures); typedef void (VKAPI_PTR *PFN_vkCmdSetDeviceMask)(VkCommandBuffer commandBuffer, uint32_t deviceMask); typedef void (VKAPI_PTR *PFN_vkCmdDispatchBase)(VkCommandBuffer commandBuffer, uint32_t baseGroupX, uint32_t baseGroupY, uint32_t baseGroupZ, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ); typedef VkResult (VKAPI_PTR *PFN_vkEnumeratePhysicalDeviceGroups)(VkInstance instance, uint32_t* pPhysicalDeviceGroupCount, VkPhysicalDeviceGroupProperties* pPhysicalDeviceGroupProperties); typedef void (VKAPI_PTR *PFN_vkGetImageMemoryRequirements2)(VkDevice device, const VkImageMemoryRequirementsInfo2* pInfo, VkMemoryRequirements2* pMemoryRequirements); typedef void (VKAPI_PTR *PFN_vkGetBufferMemoryRequirements2)(VkDevice device, const VkBufferMemoryRequirementsInfo2* pInfo, VkMemoryRequirements2* pMemoryRequirements); typedef void (VKAPI_PTR *PFN_vkGetImageSparseMemoryRequirements2)(VkDevice device, const VkImageSparseMemoryRequirementsInfo2* pInfo, uint32_t* pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements2* pSparseMemoryRequirements); typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceFeatures2)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures2* pFeatures); typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceProperties2)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties2* pProperties); typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceFormatProperties2)(VkPhysicalDevice physicalDevice, VkFormat format, VkFormatProperties2* pFormatProperties); typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceImageFormatProperties2)(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceImageFormatInfo2* pImageFormatInfo, VkImageFormatProperties2* pImageFormatProperties); typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceQueueFamilyProperties2)(VkPhysicalDevice physicalDevice, uint32_t* pQueueFamilyPropertyCount, VkQueueFamilyProperties2* pQueueFamilyProperties); typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceMemoryProperties2)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties2* pMemoryProperties); typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceSparseImageFormatProperties2)(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSparseImageFormatInfo2* pFormatInfo, uint32_t* pPropertyCount, VkSparseImageFormatProperties2* pProperties); typedef void (VKAPI_PTR *PFN_vkTrimCommandPool)(VkDevice device, VkCommandPool commandPool, VkCommandPoolTrimFlags flags); typedef void (VKAPI_PTR *PFN_vkGetDeviceQueue2)(VkDevice device, const VkDeviceQueueInfo2* pQueueInfo, VkQueue* pQueue); typedef VkResult (VKAPI_PTR *PFN_vkCreateSamplerYcbcrConversion)(VkDevice device, const VkSamplerYcbcrConversionCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSamplerYcbcrConversion* pYcbcrConversion); typedef void (VKAPI_PTR *PFN_vkDestroySamplerYcbcrConversion)(VkDevice device, VkSamplerYcbcrConversion ycbcrConversion, const VkAllocationCallbacks* pAllocator); typedef VkResult (VKAPI_PTR *PFN_vkCreateDescriptorUpdateTemplate)(VkDevice device, const VkDescriptorUpdateTemplateCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDescriptorUpdateTemplate* pDescriptorUpdateTemplate); typedef void (VKAPI_PTR *PFN_vkDestroyDescriptorUpdateTemplate)(VkDevice device, VkDescriptorUpdateTemplate descriptorUpdateTemplate, const VkAllocationCallbacks* pAllocator); typedef void (VKAPI_PTR *PFN_vkUpdateDescriptorSetWithTemplate)(VkDevice device, VkDescriptorSet descriptorSet, VkDescriptorUpdateTemplate descriptorUpdateTemplate, const void* pData); typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceExternalBufferProperties)(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalBufferInfo* pExternalBufferInfo, VkExternalBufferProperties* pExternalBufferProperties); typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceExternalFenceProperties)(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalFenceInfo* pExternalFenceInfo, VkExternalFenceProperties* pExternalFenceProperties); typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceExternalSemaphoreProperties)(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo, VkExternalSemaphoreProperties* pExternalSemaphoreProperties); typedef void (VKAPI_PTR *PFN_vkGetDescriptorSetLayoutSupport)(VkDevice device, const VkDescriptorSetLayoutCreateInfo* pCreateInfo, VkDescriptorSetLayoutSupport* pSupport); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkEnumerateInstanceVersion( uint32_t* pApiVersion); VKAPI_ATTR VkResult VKAPI_CALL vkBindBufferMemory2( VkDevice device, uint32_t bindInfoCount, const VkBindBufferMemoryInfo* pBindInfos); VKAPI_ATTR VkResult VKAPI_CALL vkBindImageMemory2( VkDevice device, uint32_t bindInfoCount, const VkBindImageMemoryInfo* pBindInfos); VKAPI_ATTR void VKAPI_CALL vkGetDeviceGroupPeerMemoryFeatures( VkDevice device, uint32_t heapIndex, uint32_t localDeviceIndex, uint32_t remoteDeviceIndex, VkPeerMemoryFeatureFlags* pPeerMemoryFeatures); VKAPI_ATTR void VKAPI_CALL vkCmdSetDeviceMask( VkCommandBuffer commandBuffer, uint32_t deviceMask); VKAPI_ATTR void VKAPI_CALL vkCmdDispatchBase( VkCommandBuffer commandBuffer, uint32_t baseGroupX, uint32_t baseGroupY, uint32_t baseGroupZ, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ); VKAPI_ATTR VkResult VKAPI_CALL vkEnumeratePhysicalDeviceGroups( VkInstance instance, uint32_t* pPhysicalDeviceGroupCount, VkPhysicalDeviceGroupProperties* pPhysicalDeviceGroupProperties); VKAPI_ATTR void VKAPI_CALL vkGetImageMemoryRequirements2( VkDevice device, const VkImageMemoryRequirementsInfo2* pInfo, VkMemoryRequirements2* pMemoryRequirements); VKAPI_ATTR void VKAPI_CALL vkGetBufferMemoryRequirements2( VkDevice device, const VkBufferMemoryRequirementsInfo2* pInfo, VkMemoryRequirements2* pMemoryRequirements); VKAPI_ATTR void VKAPI_CALL vkGetImageSparseMemoryRequirements2( VkDevice device, const VkImageSparseMemoryRequirementsInfo2* pInfo, uint32_t* pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements2* pSparseMemoryRequirements); VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceFeatures2( VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures2* pFeatures); VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceProperties2( VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties2* pProperties); VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceFormatProperties2( VkPhysicalDevice physicalDevice, VkFormat format, VkFormatProperties2* pFormatProperties); VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceImageFormatProperties2( VkPhysicalDevice physicalDevice, const VkPhysicalDeviceImageFormatInfo2* pImageFormatInfo, VkImageFormatProperties2* pImageFormatProperties); VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceQueueFamilyProperties2( VkPhysicalDevice physicalDevice, uint32_t* pQueueFamilyPropertyCount, VkQueueFamilyProperties2* pQueueFamilyProperties); VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceMemoryProperties2( VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties2* pMemoryProperties); VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceSparseImageFormatProperties2( VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSparseImageFormatInfo2* pFormatInfo, uint32_t* pPropertyCount, VkSparseImageFormatProperties2* pProperties); VKAPI_ATTR void VKAPI_CALL vkTrimCommandPool( VkDevice device, VkCommandPool commandPool, VkCommandPoolTrimFlags flags); VKAPI_ATTR void VKAPI_CALL vkGetDeviceQueue2( VkDevice device, const VkDeviceQueueInfo2* pQueueInfo, VkQueue* pQueue); VKAPI_ATTR VkResult VKAPI_CALL vkCreateSamplerYcbcrConversion( VkDevice device, const VkSamplerYcbcrConversionCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSamplerYcbcrConversion* pYcbcrConversion); VKAPI_ATTR void VKAPI_CALL vkDestroySamplerYcbcrConversion( VkDevice device, VkSamplerYcbcrConversion ycbcrConversion, const VkAllocationCallbacks* pAllocator); VKAPI_ATTR VkResult VKAPI_CALL vkCreateDescriptorUpdateTemplate( VkDevice device, const VkDescriptorUpdateTemplateCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDescriptorUpdateTemplate* pDescriptorUpdateTemplate); VKAPI_ATTR void VKAPI_CALL vkDestroyDescriptorUpdateTemplate( VkDevice device, VkDescriptorUpdateTemplate descriptorUpdateTemplate, const VkAllocationCallbacks* pAllocator); VKAPI_ATTR void VKAPI_CALL vkUpdateDescriptorSetWithTemplate( VkDevice device, VkDescriptorSet descriptorSet, VkDescriptorUpdateTemplate descriptorUpdateTemplate, const void* pData); VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceExternalBufferProperties( VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalBufferInfo* pExternalBufferInfo, VkExternalBufferProperties* pExternalBufferProperties); VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceExternalFenceProperties( VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalFenceInfo* pExternalFenceInfo, VkExternalFenceProperties* pExternalFenceProperties); VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceExternalSemaphoreProperties( VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo, VkExternalSemaphoreProperties* pExternalSemaphoreProperties); VKAPI_ATTR void VKAPI_CALL vkGetDescriptorSetLayoutSupport( VkDevice device, const VkDescriptorSetLayoutCreateInfo* pCreateInfo, VkDescriptorSetLayoutSupport* pSupport); #endif // VK_VERSION_1_2 is a preprocessor guard. Do not pass it to API calls. #define VK_VERSION_1_2 1 // Vulkan 1.2 version number #define VK_API_VERSION_1_2 VK_MAKE_API_VERSION(0, 1, 2, 0)// Patch version should always be set to 0 #define VK_MAX_DRIVER_NAME_SIZE 256U #define VK_MAX_DRIVER_INFO_SIZE 256U typedef enum VkDriverId { VK_DRIVER_ID_AMD_PROPRIETARY = 1, VK_DRIVER_ID_AMD_OPEN_SOURCE = 2, VK_DRIVER_ID_MESA_RADV = 3, VK_DRIVER_ID_NVIDIA_PROPRIETARY = 4, VK_DRIVER_ID_INTEL_PROPRIETARY_WINDOWS = 5, VK_DRIVER_ID_INTEL_OPEN_SOURCE_MESA = 6, VK_DRIVER_ID_IMAGINATION_PROPRIETARY = 7, VK_DRIVER_ID_QUALCOMM_PROPRIETARY = 8, VK_DRIVER_ID_ARM_PROPRIETARY = 9, VK_DRIVER_ID_GOOGLE_SWIFTSHADER = 10, VK_DRIVER_ID_GGP_PROPRIETARY = 11, VK_DRIVER_ID_BROADCOM_PROPRIETARY = 12, VK_DRIVER_ID_MESA_LLVMPIPE = 13, VK_DRIVER_ID_MOLTENVK = 14, VK_DRIVER_ID_COREAVI_PROPRIETARY = 15, VK_DRIVER_ID_JUICE_PROPRIETARY = 16, VK_DRIVER_ID_VERISILICON_PROPRIETARY = 17, VK_DRIVER_ID_MESA_TURNIP = 18, VK_DRIVER_ID_MESA_V3DV = 19, VK_DRIVER_ID_MESA_PANVK = 20, VK_DRIVER_ID_SAMSUNG_PROPRIETARY = 21, VK_DRIVER_ID_MESA_VENUS = 22, VK_DRIVER_ID_MESA_DOZEN = 23, VK_DRIVER_ID_MESA_NVK = 24, VK_DRIVER_ID_IMAGINATION_OPEN_SOURCE_MESA = 25, VK_DRIVER_ID_MESA_HONEYKRISP = 26, VK_DRIVER_ID_VULKAN_SC_EMULATION_ON_VULKAN = 27, VK_DRIVER_ID_AMD_PROPRIETARY_KHR = VK_DRIVER_ID_AMD_PROPRIETARY, VK_DRIVER_ID_AMD_OPEN_SOURCE_KHR = VK_DRIVER_ID_AMD_OPEN_SOURCE, VK_DRIVER_ID_MESA_RADV_KHR = VK_DRIVER_ID_MESA_RADV, VK_DRIVER_ID_NVIDIA_PROPRIETARY_KHR = VK_DRIVER_ID_NVIDIA_PROPRIETARY, VK_DRIVER_ID_INTEL_PROPRIETARY_WINDOWS_KHR = VK_DRIVER_ID_INTEL_PROPRIETARY_WINDOWS, VK_DRIVER_ID_INTEL_OPEN_SOURCE_MESA_KHR = VK_DRIVER_ID_INTEL_OPEN_SOURCE_MESA, VK_DRIVER_ID_IMAGINATION_PROPRIETARY_KHR = VK_DRIVER_ID_IMAGINATION_PROPRIETARY, VK_DRIVER_ID_QUALCOMM_PROPRIETARY_KHR = VK_DRIVER_ID_QUALCOMM_PROPRIETARY, VK_DRIVER_ID_ARM_PROPRIETARY_KHR = VK_DRIVER_ID_ARM_PROPRIETARY, VK_DRIVER_ID_GOOGLE_SWIFTSHADER_KHR = VK_DRIVER_ID_GOOGLE_SWIFTSHADER, VK_DRIVER_ID_GGP_PROPRIETARY_KHR = VK_DRIVER_ID_GGP_PROPRIETARY, VK_DRIVER_ID_BROADCOM_PROPRIETARY_KHR = VK_DRIVER_ID_BROADCOM_PROPRIETARY, VK_DRIVER_ID_MAX_ENUM = 0x7FFFFFFF } VkDriverId; typedef enum VkShaderFloatControlsIndependence { VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_32_BIT_ONLY = 0, VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_ALL = 1, VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_NONE = 2, VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_32_BIT_ONLY_KHR = VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_32_BIT_ONLY, VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_ALL_KHR = VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_ALL, VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_NONE_KHR = VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_NONE, VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_MAX_ENUM = 0x7FFFFFFF } VkShaderFloatControlsIndependence; typedef enum VkSamplerReductionMode { VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE = 0, VK_SAMPLER_REDUCTION_MODE_MIN = 1, VK_SAMPLER_REDUCTION_MODE_MAX = 2, VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM = 1000521000, VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_EXT = VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, VK_SAMPLER_REDUCTION_MODE_MIN_EXT = VK_SAMPLER_REDUCTION_MODE_MIN, VK_SAMPLER_REDUCTION_MODE_MAX_EXT = VK_SAMPLER_REDUCTION_MODE_MAX, VK_SAMPLER_REDUCTION_MODE_MAX_ENUM = 0x7FFFFFFF } VkSamplerReductionMode; typedef enum VkSemaphoreType { VK_SEMAPHORE_TYPE_BINARY = 0, VK_SEMAPHORE_TYPE_TIMELINE = 1, VK_SEMAPHORE_TYPE_BINARY_KHR = VK_SEMAPHORE_TYPE_BINARY, VK_SEMAPHORE_TYPE_TIMELINE_KHR = VK_SEMAPHORE_TYPE_TIMELINE, VK_SEMAPHORE_TYPE_MAX_ENUM = 0x7FFFFFFF } VkSemaphoreType; typedef enum VkResolveModeFlagBits { VK_RESOLVE_MODE_NONE = 0, VK_RESOLVE_MODE_SAMPLE_ZERO_BIT = 0x00000001, VK_RESOLVE_MODE_AVERAGE_BIT = 0x00000002, VK_RESOLVE_MODE_MIN_BIT = 0x00000004, VK_RESOLVE_MODE_MAX_BIT = 0x00000008, VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_ANDROID = 0x00000010, VK_RESOLVE_MODE_NONE_KHR = VK_RESOLVE_MODE_NONE, VK_RESOLVE_MODE_SAMPLE_ZERO_BIT_KHR = VK_RESOLVE_MODE_SAMPLE_ZERO_BIT, VK_RESOLVE_MODE_AVERAGE_BIT_KHR = VK_RESOLVE_MODE_AVERAGE_BIT, VK_RESOLVE_MODE_MIN_BIT_KHR = VK_RESOLVE_MODE_MIN_BIT, VK_RESOLVE_MODE_MAX_BIT_KHR = VK_RESOLVE_MODE_MAX_BIT, VK_RESOLVE_MODE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VkResolveModeFlagBits; typedef VkFlags VkResolveModeFlags; typedef enum VkDescriptorBindingFlagBits { VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT = 0x00000001, VK_DESCRIPTOR_BINDING_UPDATE_UNUSED_WHILE_PENDING_BIT = 0x00000002, VK_DESCRIPTOR_BINDING_PARTIALLY_BOUND_BIT = 0x00000004, VK_DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT = 0x00000008, VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT_EXT = VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT, VK_DESCRIPTOR_BINDING_UPDATE_UNUSED_WHILE_PENDING_BIT_EXT = VK_DESCRIPTOR_BINDING_UPDATE_UNUSED_WHILE_PENDING_BIT, VK_DESCRIPTOR_BINDING_PARTIALLY_BOUND_BIT_EXT = VK_DESCRIPTOR_BINDING_PARTIALLY_BOUND_BIT, VK_DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT_EXT = VK_DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT, VK_DESCRIPTOR_BINDING_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VkDescriptorBindingFlagBits; typedef VkFlags VkDescriptorBindingFlags; typedef enum VkSemaphoreWaitFlagBits { VK_SEMAPHORE_WAIT_ANY_BIT = 0x00000001, VK_SEMAPHORE_WAIT_ANY_BIT_KHR = VK_SEMAPHORE_WAIT_ANY_BIT, VK_SEMAPHORE_WAIT_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VkSemaphoreWaitFlagBits; typedef VkFlags VkSemaphoreWaitFlags; typedef struct VkPhysicalDeviceVulkan11Features { VkStructureType sType; void* pNext; VkBool32 storageBuffer16BitAccess; VkBool32 uniformAndStorageBuffer16BitAccess; VkBool32 storagePushConstant16; VkBool32 storageInputOutput16; VkBool32 multiview; VkBool32 multiviewGeometryShader; VkBool32 multiviewTessellationShader; VkBool32 variablePointersStorageBuffer; VkBool32 variablePointers; VkBool32 protectedMemory; VkBool32 samplerYcbcrConversion; VkBool32 shaderDrawParameters; } VkPhysicalDeviceVulkan11Features; typedef struct VkPhysicalDeviceVulkan11Properties { VkStructureType sType; void* pNext; uint8_t deviceUUID[VK_UUID_SIZE]; uint8_t driverUUID[VK_UUID_SIZE]; uint8_t deviceLUID[VK_LUID_SIZE]; uint32_t deviceNodeMask; VkBool32 deviceLUIDValid; uint32_t subgroupSize; VkShaderStageFlags subgroupSupportedStages; VkSubgroupFeatureFlags subgroupSupportedOperations; VkBool32 subgroupQuadOperationsInAllStages; VkPointClippingBehavior pointClippingBehavior; uint32_t maxMultiviewViewCount; uint32_t maxMultiviewInstanceIndex; VkBool32 protectedNoFault; uint32_t maxPerSetDescriptors; VkDeviceSize maxMemoryAllocationSize; } VkPhysicalDeviceVulkan11Properties; typedef struct VkPhysicalDeviceVulkan12Features { VkStructureType sType; void* pNext; VkBool32 samplerMirrorClampToEdge; VkBool32 drawIndirectCount; VkBool32 storageBuffer8BitAccess; VkBool32 uniformAndStorageBuffer8BitAccess; VkBool32 storagePushConstant8; VkBool32 shaderBufferInt64Atomics; VkBool32 shaderSharedInt64Atomics; VkBool32 shaderFloat16; VkBool32 shaderInt8; VkBool32 descriptorIndexing; VkBool32 shaderInputAttachmentArrayDynamicIndexing; VkBool32 shaderUniformTexelBufferArrayDynamicIndexing; VkBool32 shaderStorageTexelBufferArrayDynamicIndexing; VkBool32 shaderUniformBufferArrayNonUniformIndexing; VkBool32 shaderSampledImageArrayNonUniformIndexing; VkBool32 shaderStorageBufferArrayNonUniformIndexing; VkBool32 shaderStorageImageArrayNonUniformIndexing; VkBool32 shaderInputAttachmentArrayNonUniformIndexing; VkBool32 shaderUniformTexelBufferArrayNonUniformIndexing; VkBool32 shaderStorageTexelBufferArrayNonUniformIndexing; VkBool32 descriptorBindingUniformBufferUpdateAfterBind; VkBool32 descriptorBindingSampledImageUpdateAfterBind; VkBool32 descriptorBindingStorageImageUpdateAfterBind; VkBool32 descriptorBindingStorageBufferUpdateAfterBind; VkBool32 descriptorBindingUniformTexelBufferUpdateAfterBind; VkBool32 descriptorBindingStorageTexelBufferUpdateAfterBind; VkBool32 descriptorBindingUpdateUnusedWhilePending; VkBool32 descriptorBindingPartiallyBound; VkBool32 descriptorBindingVariableDescriptorCount; VkBool32 runtimeDescriptorArray; VkBool32 samplerFilterMinmax; VkBool32 scalarBlockLayout; VkBool32 imagelessFramebuffer; VkBool32 uniformBufferStandardLayout; VkBool32 shaderSubgroupExtendedTypes; VkBool32 separateDepthStencilLayouts; VkBool32 hostQueryReset; VkBool32 timelineSemaphore; VkBool32 bufferDeviceAddress; VkBool32 bufferDeviceAddressCaptureReplay; VkBool32 bufferDeviceAddressMultiDevice; VkBool32 vulkanMemoryModel; VkBool32 vulkanMemoryModelDeviceScope; VkBool32 vulkanMemoryModelAvailabilityVisibilityChains; VkBool32 shaderOutputViewportIndex; VkBool32 shaderOutputLayer; VkBool32 subgroupBroadcastDynamicId; } VkPhysicalDeviceVulkan12Features; typedef struct VkConformanceVersion { uint8_t major; uint8_t minor; uint8_t subminor; uint8_t patch; } VkConformanceVersion; typedef struct VkPhysicalDeviceVulkan12Properties { VkStructureType sType; void* pNext; VkDriverId driverID; char driverName[VK_MAX_DRIVER_NAME_SIZE]; char driverInfo[VK_MAX_DRIVER_INFO_SIZE]; VkConformanceVersion conformanceVersion; VkShaderFloatControlsIndependence denormBehaviorIndependence; VkShaderFloatControlsIndependence roundingModeIndependence; VkBool32 shaderSignedZeroInfNanPreserveFloat16; VkBool32 shaderSignedZeroInfNanPreserveFloat32; VkBool32 shaderSignedZeroInfNanPreserveFloat64; VkBool32 shaderDenormPreserveFloat16; VkBool32 shaderDenormPreserveFloat32; VkBool32 shaderDenormPreserveFloat64; VkBool32 shaderDenormFlushToZeroFloat16; VkBool32 shaderDenormFlushToZeroFloat32; VkBool32 shaderDenormFlushToZeroFloat64; VkBool32 shaderRoundingModeRTEFloat16; VkBool32 shaderRoundingModeRTEFloat32; VkBool32 shaderRoundingModeRTEFloat64; VkBool32 shaderRoundingModeRTZFloat16; VkBool32 shaderRoundingModeRTZFloat32; VkBool32 shaderRoundingModeRTZFloat64; uint32_t maxUpdateAfterBindDescriptorsInAllPools; VkBool32 shaderUniformBufferArrayNonUniformIndexingNative; VkBool32 shaderSampledImageArrayNonUniformIndexingNative; VkBool32 shaderStorageBufferArrayNonUniformIndexingNative; VkBool32 shaderStorageImageArrayNonUniformIndexingNative; VkBool32 shaderInputAttachmentArrayNonUniformIndexingNative; VkBool32 robustBufferAccessUpdateAfterBind; VkBool32 quadDivergentImplicitLod; uint32_t maxPerStageDescriptorUpdateAfterBindSamplers; uint32_t maxPerStageDescriptorUpdateAfterBindUniformBuffers; uint32_t maxPerStageDescriptorUpdateAfterBindStorageBuffers; uint32_t maxPerStageDescriptorUpdateAfterBindSampledImages; uint32_t maxPerStageDescriptorUpdateAfterBindStorageImages; uint32_t maxPerStageDescriptorUpdateAfterBindInputAttachments; uint32_t maxPerStageUpdateAfterBindResources; uint32_t maxDescriptorSetUpdateAfterBindSamplers; uint32_t maxDescriptorSetUpdateAfterBindUniformBuffers; uint32_t maxDescriptorSetUpdateAfterBindUniformBuffersDynamic; uint32_t maxDescriptorSetUpdateAfterBindStorageBuffers; uint32_t maxDescriptorSetUpdateAfterBindStorageBuffersDynamic; uint32_t maxDescriptorSetUpdateAfterBindSampledImages; uint32_t maxDescriptorSetUpdateAfterBindStorageImages; uint32_t maxDescriptorSetUpdateAfterBindInputAttachments; VkResolveModeFlags supportedDepthResolveModes; VkResolveModeFlags supportedStencilResolveModes; VkBool32 independentResolveNone; VkBool32 independentResolve; VkBool32 filterMinmaxSingleComponentFormats; VkBool32 filterMinmaxImageComponentMapping; uint64_t maxTimelineSemaphoreValueDifference; VkSampleCountFlags framebufferIntegerColorSampleCounts; } VkPhysicalDeviceVulkan12Properties; typedef struct VkImageFormatListCreateInfo { VkStructureType sType; const void* pNext; uint32_t viewFormatCount; const VkFormat* pViewFormats; } VkImageFormatListCreateInfo; typedef struct VkAttachmentDescription2 { VkStructureType sType; const void* pNext; VkAttachmentDescriptionFlags flags; VkFormat format; VkSampleCountFlagBits samples; VkAttachmentLoadOp loadOp; VkAttachmentStoreOp storeOp; VkAttachmentLoadOp stencilLoadOp; VkAttachmentStoreOp stencilStoreOp; VkImageLayout initialLayout; VkImageLayout finalLayout; } VkAttachmentDescription2; typedef struct VkAttachmentReference2 { VkStructureType sType; const void* pNext; uint32_t attachment; VkImageLayout layout; VkImageAspectFlags aspectMask; } VkAttachmentReference2; typedef struct VkSubpassDescription2 { VkStructureType sType; const void* pNext; VkSubpassDescriptionFlags flags; VkPipelineBindPoint pipelineBindPoint; uint32_t viewMask; uint32_t inputAttachmentCount; const VkAttachmentReference2* pInputAttachments; uint32_t colorAttachmentCount; const VkAttachmentReference2* pColorAttachments; const VkAttachmentReference2* pResolveAttachments; const VkAttachmentReference2* pDepthStencilAttachment; uint32_t preserveAttachmentCount; const uint32_t* pPreserveAttachments; } VkSubpassDescription2; typedef struct VkSubpassDependency2 { VkStructureType sType; const void* pNext; uint32_t srcSubpass; uint32_t dstSubpass; VkPipelineStageFlags srcStageMask; VkPipelineStageFlags dstStageMask; VkAccessFlags srcAccessMask; VkAccessFlags dstAccessMask; VkDependencyFlags dependencyFlags; int32_t viewOffset; } VkSubpassDependency2; typedef struct VkRenderPassCreateInfo2 { VkStructureType sType; const void* pNext; VkRenderPassCreateFlags flags; uint32_t attachmentCount; const VkAttachmentDescription2* pAttachments; uint32_t subpassCount; const VkSubpassDescription2* pSubpasses; uint32_t dependencyCount; const VkSubpassDependency2* pDependencies; uint32_t correlatedViewMaskCount; const uint32_t* pCorrelatedViewMasks; } VkRenderPassCreateInfo2; typedef struct VkSubpassBeginInfo { VkStructureType sType; const void* pNext; VkSubpassContents contents; } VkSubpassBeginInfo; typedef struct VkSubpassEndInfo { VkStructureType sType; const void* pNext; } VkSubpassEndInfo; typedef struct VkPhysicalDevice8BitStorageFeatures { VkStructureType sType; void* pNext; VkBool32 storageBuffer8BitAccess; VkBool32 uniformAndStorageBuffer8BitAccess; VkBool32 storagePushConstant8; } VkPhysicalDevice8BitStorageFeatures; typedef struct VkPhysicalDeviceDriverProperties { VkStructureType sType; void* pNext; VkDriverId driverID; char driverName[VK_MAX_DRIVER_NAME_SIZE]; char driverInfo[VK_MAX_DRIVER_INFO_SIZE]; VkConformanceVersion conformanceVersion; } VkPhysicalDeviceDriverProperties; typedef struct VkPhysicalDeviceShaderAtomicInt64Features { VkStructureType sType; void* pNext; VkBool32 shaderBufferInt64Atomics; VkBool32 shaderSharedInt64Atomics; } VkPhysicalDeviceShaderAtomicInt64Features; typedef struct VkPhysicalDeviceShaderFloat16Int8Features { VkStructureType sType; void* pNext; VkBool32 shaderFloat16; VkBool32 shaderInt8; } VkPhysicalDeviceShaderFloat16Int8Features; typedef struct VkPhysicalDeviceFloatControlsProperties { VkStructureType sType; void* pNext; VkShaderFloatControlsIndependence denormBehaviorIndependence; VkShaderFloatControlsIndependence roundingModeIndependence; VkBool32 shaderSignedZeroInfNanPreserveFloat16; VkBool32 shaderSignedZeroInfNanPreserveFloat32; VkBool32 shaderSignedZeroInfNanPreserveFloat64; VkBool32 shaderDenormPreserveFloat16; VkBool32 shaderDenormPreserveFloat32; VkBool32 shaderDenormPreserveFloat64; VkBool32 shaderDenormFlushToZeroFloat16; VkBool32 shaderDenormFlushToZeroFloat32; VkBool32 shaderDenormFlushToZeroFloat64; VkBool32 shaderRoundingModeRTEFloat16; VkBool32 shaderRoundingModeRTEFloat32; VkBool32 shaderRoundingModeRTEFloat64; VkBool32 shaderRoundingModeRTZFloat16; VkBool32 shaderRoundingModeRTZFloat32; VkBool32 shaderRoundingModeRTZFloat64; } VkPhysicalDeviceFloatControlsProperties; typedef struct VkDescriptorSetLayoutBindingFlagsCreateInfo { VkStructureType sType; const void* pNext; uint32_t bindingCount; const VkDescriptorBindingFlags* pBindingFlags; } VkDescriptorSetLayoutBindingFlagsCreateInfo; typedef struct VkPhysicalDeviceDescriptorIndexingFeatures { VkStructureType sType; void* pNext; VkBool32 shaderInputAttachmentArrayDynamicIndexing; VkBool32 shaderUniformTexelBufferArrayDynamicIndexing; VkBool32 shaderStorageTexelBufferArrayDynamicIndexing; VkBool32 shaderUniformBufferArrayNonUniformIndexing; VkBool32 shaderSampledImageArrayNonUniformIndexing; VkBool32 shaderStorageBufferArrayNonUniformIndexing; VkBool32 shaderStorageImageArrayNonUniformIndexing; VkBool32 shaderInputAttachmentArrayNonUniformIndexing; VkBool32 shaderUniformTexelBufferArrayNonUniformIndexing; VkBool32 shaderStorageTexelBufferArrayNonUniformIndexing; VkBool32 descriptorBindingUniformBufferUpdateAfterBind; VkBool32 descriptorBindingSampledImageUpdateAfterBind; VkBool32 descriptorBindingStorageImageUpdateAfterBind; VkBool32 descriptorBindingStorageBufferUpdateAfterBind; VkBool32 descriptorBindingUniformTexelBufferUpdateAfterBind; VkBool32 descriptorBindingStorageTexelBufferUpdateAfterBind; VkBool32 descriptorBindingUpdateUnusedWhilePending; VkBool32 descriptorBindingPartiallyBound; VkBool32 descriptorBindingVariableDescriptorCount; VkBool32 runtimeDescriptorArray; } VkPhysicalDeviceDescriptorIndexingFeatures; typedef struct VkPhysicalDeviceDescriptorIndexingProperties { VkStructureType sType; void* pNext; uint32_t maxUpdateAfterBindDescriptorsInAllPools; VkBool32 shaderUniformBufferArrayNonUniformIndexingNative; VkBool32 shaderSampledImageArrayNonUniformIndexingNative; VkBool32 shaderStorageBufferArrayNonUniformIndexingNative; VkBool32 shaderStorageImageArrayNonUniformIndexingNative; VkBool32 shaderInputAttachmentArrayNonUniformIndexingNative; VkBool32 robustBufferAccessUpdateAfterBind; VkBool32 quadDivergentImplicitLod; uint32_t maxPerStageDescriptorUpdateAfterBindSamplers; uint32_t maxPerStageDescriptorUpdateAfterBindUniformBuffers; uint32_t maxPerStageDescriptorUpdateAfterBindStorageBuffers; uint32_t maxPerStageDescriptorUpdateAfterBindSampledImages; uint32_t maxPerStageDescriptorUpdateAfterBindStorageImages; uint32_t maxPerStageDescriptorUpdateAfterBindInputAttachments; uint32_t maxPerStageUpdateAfterBindResources; uint32_t maxDescriptorSetUpdateAfterBindSamplers; uint32_t maxDescriptorSetUpdateAfterBindUniformBuffers; uint32_t maxDescriptorSetUpdateAfterBindUniformBuffersDynamic; uint32_t maxDescriptorSetUpdateAfterBindStorageBuffers; uint32_t maxDescriptorSetUpdateAfterBindStorageBuffersDynamic; uint32_t maxDescriptorSetUpdateAfterBindSampledImages; uint32_t maxDescriptorSetUpdateAfterBindStorageImages; uint32_t maxDescriptorSetUpdateAfterBindInputAttachments; } VkPhysicalDeviceDescriptorIndexingProperties; typedef struct VkDescriptorSetVariableDescriptorCountAllocateInfo { VkStructureType sType; const void* pNext; uint32_t descriptorSetCount; const uint32_t* pDescriptorCounts; } VkDescriptorSetVariableDescriptorCountAllocateInfo; typedef struct VkDescriptorSetVariableDescriptorCountLayoutSupport { VkStructureType sType; void* pNext; uint32_t maxVariableDescriptorCount; } VkDescriptorSetVariableDescriptorCountLayoutSupport; typedef struct VkSubpassDescriptionDepthStencilResolve { VkStructureType sType; const void* pNext; VkResolveModeFlagBits depthResolveMode; VkResolveModeFlagBits stencilResolveMode; const VkAttachmentReference2* pDepthStencilResolveAttachment; } VkSubpassDescriptionDepthStencilResolve; typedef struct VkPhysicalDeviceDepthStencilResolveProperties { VkStructureType sType; void* pNext; VkResolveModeFlags supportedDepthResolveModes; VkResolveModeFlags supportedStencilResolveModes; VkBool32 independentResolveNone; VkBool32 independentResolve; } VkPhysicalDeviceDepthStencilResolveProperties; typedef struct VkPhysicalDeviceScalarBlockLayoutFeatures { VkStructureType sType; void* pNext; VkBool32 scalarBlockLayout; } VkPhysicalDeviceScalarBlockLayoutFeatures; typedef struct VkImageStencilUsageCreateInfo { VkStructureType sType; const void* pNext; VkImageUsageFlags stencilUsage; } VkImageStencilUsageCreateInfo; typedef struct VkSamplerReductionModeCreateInfo { VkStructureType sType; const void* pNext; VkSamplerReductionMode reductionMode; } VkSamplerReductionModeCreateInfo; typedef struct VkPhysicalDeviceSamplerFilterMinmaxProperties { VkStructureType sType; void* pNext; VkBool32 filterMinmaxSingleComponentFormats; VkBool32 filterMinmaxImageComponentMapping; } VkPhysicalDeviceSamplerFilterMinmaxProperties; typedef struct VkPhysicalDeviceVulkanMemoryModelFeatures { VkStructureType sType; void* pNext; VkBool32 vulkanMemoryModel; VkBool32 vulkanMemoryModelDeviceScope; VkBool32 vulkanMemoryModelAvailabilityVisibilityChains; } VkPhysicalDeviceVulkanMemoryModelFeatures; typedef struct VkPhysicalDeviceImagelessFramebufferFeatures { VkStructureType sType; void* pNext; VkBool32 imagelessFramebuffer; } VkPhysicalDeviceImagelessFramebufferFeatures; typedef struct VkFramebufferAttachmentImageInfo { VkStructureType sType; const void* pNext; VkImageCreateFlags flags; VkImageUsageFlags usage; uint32_t width; uint32_t height; uint32_t layerCount; uint32_t viewFormatCount; const VkFormat* pViewFormats; } VkFramebufferAttachmentImageInfo; typedef struct VkFramebufferAttachmentsCreateInfo { VkStructureType sType; const void* pNext; uint32_t attachmentImageInfoCount; const VkFramebufferAttachmentImageInfo* pAttachmentImageInfos; } VkFramebufferAttachmentsCreateInfo; typedef struct VkRenderPassAttachmentBeginInfo { VkStructureType sType; const void* pNext; uint32_t attachmentCount; const VkImageView* pAttachments; } VkRenderPassAttachmentBeginInfo; typedef struct VkPhysicalDeviceUniformBufferStandardLayoutFeatures { VkStructureType sType; void* pNext; VkBool32 uniformBufferStandardLayout; } VkPhysicalDeviceUniformBufferStandardLayoutFeatures; typedef struct VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures { VkStructureType sType; void* pNext; VkBool32 shaderSubgroupExtendedTypes; } VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures; typedef struct VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures { VkStructureType sType; void* pNext; VkBool32 separateDepthStencilLayouts; } VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures; typedef struct VkAttachmentReferenceStencilLayout { VkStructureType sType; void* pNext; VkImageLayout stencilLayout; } VkAttachmentReferenceStencilLayout; typedef struct VkAttachmentDescriptionStencilLayout { VkStructureType sType; void* pNext; VkImageLayout stencilInitialLayout; VkImageLayout stencilFinalLayout; } VkAttachmentDescriptionStencilLayout; typedef struct VkPhysicalDeviceHostQueryResetFeatures { VkStructureType sType; void* pNext; VkBool32 hostQueryReset; } VkPhysicalDeviceHostQueryResetFeatures; typedef struct VkPhysicalDeviceTimelineSemaphoreFeatures { VkStructureType sType; void* pNext; VkBool32 timelineSemaphore; } VkPhysicalDeviceTimelineSemaphoreFeatures; typedef struct VkPhysicalDeviceTimelineSemaphoreProperties { VkStructureType sType; void* pNext; uint64_t maxTimelineSemaphoreValueDifference; } VkPhysicalDeviceTimelineSemaphoreProperties; typedef struct VkSemaphoreTypeCreateInfo { VkStructureType sType; const void* pNext; VkSemaphoreType semaphoreType; uint64_t initialValue; } VkSemaphoreTypeCreateInfo; typedef struct VkTimelineSemaphoreSubmitInfo { VkStructureType sType; const void* pNext; uint32_t waitSemaphoreValueCount; const uint64_t* pWaitSemaphoreValues; uint32_t signalSemaphoreValueCount; const uint64_t* pSignalSemaphoreValues; } VkTimelineSemaphoreSubmitInfo; typedef struct VkSemaphoreWaitInfo { VkStructureType sType; const void* pNext; VkSemaphoreWaitFlags flags; uint32_t semaphoreCount; const VkSemaphore* pSemaphores; const uint64_t* pValues; } VkSemaphoreWaitInfo; typedef struct VkSemaphoreSignalInfo { VkStructureType sType; const void* pNext; VkSemaphore semaphore; uint64_t value; } VkSemaphoreSignalInfo; typedef struct VkPhysicalDeviceBufferDeviceAddressFeatures { VkStructureType sType; void* pNext; VkBool32 bufferDeviceAddress; VkBool32 bufferDeviceAddressCaptureReplay; VkBool32 bufferDeviceAddressMultiDevice; } VkPhysicalDeviceBufferDeviceAddressFeatures; typedef struct VkBufferDeviceAddressInfo { VkStructureType sType; const void* pNext; VkBuffer buffer; } VkBufferDeviceAddressInfo; typedef struct VkBufferOpaqueCaptureAddressCreateInfo { VkStructureType sType; const void* pNext; uint64_t opaqueCaptureAddress; } VkBufferOpaqueCaptureAddressCreateInfo; typedef struct VkMemoryOpaqueCaptureAddressAllocateInfo { VkStructureType sType; const void* pNext; uint64_t opaqueCaptureAddress; } VkMemoryOpaqueCaptureAddressAllocateInfo; typedef struct VkDeviceMemoryOpaqueCaptureAddressInfo { VkStructureType sType; const void* pNext; VkDeviceMemory memory; } VkDeviceMemoryOpaqueCaptureAddressInfo; typedef void (VKAPI_PTR *PFN_vkCmdDrawIndirectCount)(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride); typedef void (VKAPI_PTR *PFN_vkCmdDrawIndexedIndirectCount)(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride); typedef VkResult (VKAPI_PTR *PFN_vkCreateRenderPass2)(VkDevice device, const VkRenderPassCreateInfo2* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkRenderPass* pRenderPass); typedef void (VKAPI_PTR *PFN_vkCmdBeginRenderPass2)(VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo* pRenderPassBegin, const VkSubpassBeginInfo* pSubpassBeginInfo); typedef void (VKAPI_PTR *PFN_vkCmdNextSubpass2)(VkCommandBuffer commandBuffer, const VkSubpassBeginInfo* pSubpassBeginInfo, const VkSubpassEndInfo* pSubpassEndInfo); typedef void (VKAPI_PTR *PFN_vkCmdEndRenderPass2)(VkCommandBuffer commandBuffer, const VkSubpassEndInfo* pSubpassEndInfo); typedef void (VKAPI_PTR *PFN_vkResetQueryPool)(VkDevice device, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount); typedef VkResult (VKAPI_PTR *PFN_vkGetSemaphoreCounterValue)(VkDevice device, VkSemaphore semaphore, uint64_t* pValue); typedef VkResult (VKAPI_PTR *PFN_vkWaitSemaphores)(VkDevice device, const VkSemaphoreWaitInfo* pWaitInfo, uint64_t timeout); typedef VkResult (VKAPI_PTR *PFN_vkSignalSemaphore)(VkDevice device, const VkSemaphoreSignalInfo* pSignalInfo); typedef VkDeviceAddress (VKAPI_PTR *PFN_vkGetBufferDeviceAddress)(VkDevice device, const VkBufferDeviceAddressInfo* pInfo); typedef uint64_t (VKAPI_PTR *PFN_vkGetBufferOpaqueCaptureAddress)(VkDevice device, const VkBufferDeviceAddressInfo* pInfo); typedef uint64_t (VKAPI_PTR *PFN_vkGetDeviceMemoryOpaqueCaptureAddress)(VkDevice device, const VkDeviceMemoryOpaqueCaptureAddressInfo* pInfo); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR void VKAPI_CALL vkCmdDrawIndirectCount( VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride); VKAPI_ATTR void VKAPI_CALL vkCmdDrawIndexedIndirectCount( VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride); VKAPI_ATTR VkResult VKAPI_CALL vkCreateRenderPass2( VkDevice device, const VkRenderPassCreateInfo2* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkRenderPass* pRenderPass); VKAPI_ATTR void VKAPI_CALL vkCmdBeginRenderPass2( VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo* pRenderPassBegin, const VkSubpassBeginInfo* pSubpassBeginInfo); VKAPI_ATTR void VKAPI_CALL vkCmdNextSubpass2( VkCommandBuffer commandBuffer, const VkSubpassBeginInfo* pSubpassBeginInfo, const VkSubpassEndInfo* pSubpassEndInfo); VKAPI_ATTR void VKAPI_CALL vkCmdEndRenderPass2( VkCommandBuffer commandBuffer, const VkSubpassEndInfo* pSubpassEndInfo); VKAPI_ATTR void VKAPI_CALL vkResetQueryPool( VkDevice device, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount); VKAPI_ATTR VkResult VKAPI_CALL vkGetSemaphoreCounterValue( VkDevice device, VkSemaphore semaphore, uint64_t* pValue); VKAPI_ATTR VkResult VKAPI_CALL vkWaitSemaphores( VkDevice device, const VkSemaphoreWaitInfo* pWaitInfo, uint64_t timeout); VKAPI_ATTR VkResult VKAPI_CALL vkSignalSemaphore( VkDevice device, const VkSemaphoreSignalInfo* pSignalInfo); VKAPI_ATTR VkDeviceAddress VKAPI_CALL vkGetBufferDeviceAddress( VkDevice device, const VkBufferDeviceAddressInfo* pInfo); VKAPI_ATTR uint64_t VKAPI_CALL vkGetBufferOpaqueCaptureAddress( VkDevice device, const VkBufferDeviceAddressInfo* pInfo); VKAPI_ATTR uint64_t VKAPI_CALL vkGetDeviceMemoryOpaqueCaptureAddress( VkDevice device, const VkDeviceMemoryOpaqueCaptureAddressInfo* pInfo); #endif // VK_VERSION_1_3 is a preprocessor guard. Do not pass it to API calls. #define VK_VERSION_1_3 1 // Vulkan 1.3 version number #define VK_API_VERSION_1_3 VK_MAKE_API_VERSION(0, 1, 3, 0)// Patch version should always be set to 0 typedef uint64_t VkFlags64; VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkPrivateDataSlot) typedef enum VkPipelineCreationFeedbackFlagBits { VK_PIPELINE_CREATION_FEEDBACK_VALID_BIT = 0x00000001, VK_PIPELINE_CREATION_FEEDBACK_APPLICATION_PIPELINE_CACHE_HIT_BIT = 0x00000002, VK_PIPELINE_CREATION_FEEDBACK_BASE_PIPELINE_ACCELERATION_BIT = 0x00000004, VK_PIPELINE_CREATION_FEEDBACK_VALID_BIT_EXT = VK_PIPELINE_CREATION_FEEDBACK_VALID_BIT, VK_PIPELINE_CREATION_FEEDBACK_APPLICATION_PIPELINE_CACHE_HIT_BIT_EXT = VK_PIPELINE_CREATION_FEEDBACK_APPLICATION_PIPELINE_CACHE_HIT_BIT, VK_PIPELINE_CREATION_FEEDBACK_BASE_PIPELINE_ACCELERATION_BIT_EXT = VK_PIPELINE_CREATION_FEEDBACK_BASE_PIPELINE_ACCELERATION_BIT, VK_PIPELINE_CREATION_FEEDBACK_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VkPipelineCreationFeedbackFlagBits; typedef VkFlags VkPipelineCreationFeedbackFlags; typedef enum VkToolPurposeFlagBits { VK_TOOL_PURPOSE_VALIDATION_BIT = 0x00000001, VK_TOOL_PURPOSE_PROFILING_BIT = 0x00000002, VK_TOOL_PURPOSE_TRACING_BIT = 0x00000004, VK_TOOL_PURPOSE_ADDITIONAL_FEATURES_BIT = 0x00000008, VK_TOOL_PURPOSE_MODIFYING_FEATURES_BIT = 0x00000010, VK_TOOL_PURPOSE_DEBUG_REPORTING_BIT_EXT = 0x00000020, VK_TOOL_PURPOSE_DEBUG_MARKERS_BIT_EXT = 0x00000040, VK_TOOL_PURPOSE_VALIDATION_BIT_EXT = VK_TOOL_PURPOSE_VALIDATION_BIT, VK_TOOL_PURPOSE_PROFILING_BIT_EXT = VK_TOOL_PURPOSE_PROFILING_BIT, VK_TOOL_PURPOSE_TRACING_BIT_EXT = VK_TOOL_PURPOSE_TRACING_BIT, VK_TOOL_PURPOSE_ADDITIONAL_FEATURES_BIT_EXT = VK_TOOL_PURPOSE_ADDITIONAL_FEATURES_BIT, VK_TOOL_PURPOSE_MODIFYING_FEATURES_BIT_EXT = VK_TOOL_PURPOSE_MODIFYING_FEATURES_BIT, VK_TOOL_PURPOSE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VkToolPurposeFlagBits; typedef VkFlags VkToolPurposeFlags; typedef VkFlags VkPrivateDataSlotCreateFlags; typedef VkFlags64 VkPipelineStageFlags2; // Flag bits for VkPipelineStageFlagBits2 typedef VkFlags64 VkPipelineStageFlagBits2; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_NONE = 0ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_TOP_OF_PIPE_BIT = 0x00000001ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_DRAW_INDIRECT_BIT = 0x00000002ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_VERTEX_INPUT_BIT = 0x00000004ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_VERTEX_SHADER_BIT = 0x00000008ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_TESSELLATION_CONTROL_SHADER_BIT = 0x00000010ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_TESSELLATION_EVALUATION_SHADER_BIT = 0x00000020ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_GEOMETRY_SHADER_BIT = 0x00000040ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT = 0x00000080ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_EARLY_FRAGMENT_TESTS_BIT = 0x00000100ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_LATE_FRAGMENT_TESTS_BIT = 0x00000200ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT = 0x00000400ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT = 0x00000800ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_ALL_TRANSFER_BIT = 0x00001000ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_TRANSFER_BIT = 0x00001000ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_BOTTOM_OF_PIPE_BIT = 0x00002000ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_HOST_BIT = 0x00004000ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT = 0x00008000ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT = 0x00010000ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_COPY_BIT = 0x100000000ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_RESOLVE_BIT = 0x200000000ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_BLIT_BIT = 0x400000000ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_CLEAR_BIT = 0x800000000ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_INDEX_INPUT_BIT = 0x1000000000ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_VERTEX_ATTRIBUTE_INPUT_BIT = 0x2000000000ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_PRE_RASTERIZATION_SHADERS_BIT = 0x4000000000ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_VIDEO_DECODE_BIT_KHR = 0x04000000ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_VIDEO_ENCODE_BIT_KHR = 0x08000000ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_NONE_KHR = 0ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_TOP_OF_PIPE_BIT_KHR = 0x00000001ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_DRAW_INDIRECT_BIT_KHR = 0x00000002ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_VERTEX_INPUT_BIT_KHR = 0x00000004ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_VERTEX_SHADER_BIT_KHR = 0x00000008ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_TESSELLATION_CONTROL_SHADER_BIT_KHR = 0x00000010ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_TESSELLATION_EVALUATION_SHADER_BIT_KHR = 0x00000020ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_GEOMETRY_SHADER_BIT_KHR = 0x00000040ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT_KHR = 0x00000080ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_EARLY_FRAGMENT_TESTS_BIT_KHR = 0x00000100ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_LATE_FRAGMENT_TESTS_BIT_KHR = 0x00000200ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT_KHR = 0x00000400ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT_KHR = 0x00000800ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_ALL_TRANSFER_BIT_KHR = 0x00001000ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_TRANSFER_BIT_KHR = 0x00001000ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_BOTTOM_OF_PIPE_BIT_KHR = 0x00002000ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_HOST_BIT_KHR = 0x00004000ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT_KHR = 0x00008000ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT_KHR = 0x00010000ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_COPY_BIT_KHR = 0x100000000ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_RESOLVE_BIT_KHR = 0x200000000ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_BLIT_BIT_KHR = 0x400000000ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_CLEAR_BIT_KHR = 0x800000000ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_INDEX_INPUT_BIT_KHR = 0x1000000000ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_VERTEX_ATTRIBUTE_INPUT_BIT_KHR = 0x2000000000ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_PRE_RASTERIZATION_SHADERS_BIT_KHR = 0x4000000000ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_TRANSFORM_FEEDBACK_BIT_EXT = 0x01000000ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_CONDITIONAL_RENDERING_BIT_EXT = 0x00040000ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_COMMAND_PREPROCESS_BIT_NV = 0x00020000ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_COMMAND_PREPROCESS_BIT_EXT = 0x00020000ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR = 0x00400000ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_SHADING_RATE_IMAGE_BIT_NV = 0x00400000ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR = 0x02000000ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_KHR = 0x00200000ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_NV = 0x00200000ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_NV = 0x02000000ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_FRAGMENT_DENSITY_PROCESS_BIT_EXT = 0x00800000ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_TASK_SHADER_BIT_NV = 0x00080000ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_MESH_SHADER_BIT_NV = 0x00100000ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_TASK_SHADER_BIT_EXT = 0x00080000ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_MESH_SHADER_BIT_EXT = 0x00100000ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_SUBPASS_SHADER_BIT_HUAWEI = 0x8000000000ULL; // VK_PIPELINE_STAGE_2_SUBPASS_SHADING_BIT_HUAWEI is a deprecated alias static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_SUBPASS_SHADING_BIT_HUAWEI = 0x8000000000ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_INVOCATION_MASK_BIT_HUAWEI = 0x10000000000ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_COPY_BIT_KHR = 0x10000000ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXT = 0x40000000ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_CLUSTER_CULLING_SHADER_BIT_HUAWEI = 0x20000000000ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_OPTICAL_FLOW_BIT_NV = 0x20000000ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_CONVERT_COOPERATIVE_VECTOR_MATRIX_BIT_NV = 0x100000000000ULL; typedef VkFlags64 VkAccessFlags2; // Flag bits for VkAccessFlagBits2 typedef VkFlags64 VkAccessFlagBits2; static const VkAccessFlagBits2 VK_ACCESS_2_NONE = 0ULL; static const VkAccessFlagBits2 VK_ACCESS_2_INDIRECT_COMMAND_READ_BIT = 0x00000001ULL; static const VkAccessFlagBits2 VK_ACCESS_2_INDEX_READ_BIT = 0x00000002ULL; static const VkAccessFlagBits2 VK_ACCESS_2_VERTEX_ATTRIBUTE_READ_BIT = 0x00000004ULL; static const VkAccessFlagBits2 VK_ACCESS_2_UNIFORM_READ_BIT = 0x00000008ULL; static const VkAccessFlagBits2 VK_ACCESS_2_INPUT_ATTACHMENT_READ_BIT = 0x00000010ULL; static const VkAccessFlagBits2 VK_ACCESS_2_SHADER_READ_BIT = 0x00000020ULL; static const VkAccessFlagBits2 VK_ACCESS_2_SHADER_WRITE_BIT = 0x00000040ULL; static const VkAccessFlagBits2 VK_ACCESS_2_COLOR_ATTACHMENT_READ_BIT = 0x00000080ULL; static const VkAccessFlagBits2 VK_ACCESS_2_COLOR_ATTACHMENT_WRITE_BIT = 0x00000100ULL; static const VkAccessFlagBits2 VK_ACCESS_2_DEPTH_STENCIL_ATTACHMENT_READ_BIT = 0x00000200ULL; static const VkAccessFlagBits2 VK_ACCESS_2_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT = 0x00000400ULL; static const VkAccessFlagBits2 VK_ACCESS_2_TRANSFER_READ_BIT = 0x00000800ULL; static const VkAccessFlagBits2 VK_ACCESS_2_TRANSFER_WRITE_BIT = 0x00001000ULL; static const VkAccessFlagBits2 VK_ACCESS_2_HOST_READ_BIT = 0x00002000ULL; static const VkAccessFlagBits2 VK_ACCESS_2_HOST_WRITE_BIT = 0x00004000ULL; static const VkAccessFlagBits2 VK_ACCESS_2_MEMORY_READ_BIT = 0x00008000ULL; static const VkAccessFlagBits2 VK_ACCESS_2_MEMORY_WRITE_BIT = 0x00010000ULL; static const VkAccessFlagBits2 VK_ACCESS_2_SHADER_SAMPLED_READ_BIT = 0x100000000ULL; static const VkAccessFlagBits2 VK_ACCESS_2_SHADER_STORAGE_READ_BIT = 0x200000000ULL; static const VkAccessFlagBits2 VK_ACCESS_2_SHADER_STORAGE_WRITE_BIT = 0x400000000ULL; static const VkAccessFlagBits2 VK_ACCESS_2_VIDEO_DECODE_READ_BIT_KHR = 0x800000000ULL; static const VkAccessFlagBits2 VK_ACCESS_2_VIDEO_DECODE_WRITE_BIT_KHR = 0x1000000000ULL; static const VkAccessFlagBits2 VK_ACCESS_2_VIDEO_ENCODE_READ_BIT_KHR = 0x2000000000ULL; static const VkAccessFlagBits2 VK_ACCESS_2_VIDEO_ENCODE_WRITE_BIT_KHR = 0x4000000000ULL; static const VkAccessFlagBits2 VK_ACCESS_2_NONE_KHR = 0ULL; static const VkAccessFlagBits2 VK_ACCESS_2_INDIRECT_COMMAND_READ_BIT_KHR = 0x00000001ULL; static const VkAccessFlagBits2 VK_ACCESS_2_INDEX_READ_BIT_KHR = 0x00000002ULL; static const VkAccessFlagBits2 VK_ACCESS_2_VERTEX_ATTRIBUTE_READ_BIT_KHR = 0x00000004ULL; static const VkAccessFlagBits2 VK_ACCESS_2_UNIFORM_READ_BIT_KHR = 0x00000008ULL; static const VkAccessFlagBits2 VK_ACCESS_2_INPUT_ATTACHMENT_READ_BIT_KHR = 0x00000010ULL; static const VkAccessFlagBits2 VK_ACCESS_2_SHADER_READ_BIT_KHR = 0x00000020ULL; static const VkAccessFlagBits2 VK_ACCESS_2_SHADER_WRITE_BIT_KHR = 0x00000040ULL; static const VkAccessFlagBits2 VK_ACCESS_2_COLOR_ATTACHMENT_READ_BIT_KHR = 0x00000080ULL; static const VkAccessFlagBits2 VK_ACCESS_2_COLOR_ATTACHMENT_WRITE_BIT_KHR = 0x00000100ULL; static const VkAccessFlagBits2 VK_ACCESS_2_DEPTH_STENCIL_ATTACHMENT_READ_BIT_KHR = 0x00000200ULL; static const VkAccessFlagBits2 VK_ACCESS_2_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT_KHR = 0x00000400ULL; static const VkAccessFlagBits2 VK_ACCESS_2_TRANSFER_READ_BIT_KHR = 0x00000800ULL; static const VkAccessFlagBits2 VK_ACCESS_2_TRANSFER_WRITE_BIT_KHR = 0x00001000ULL; static const VkAccessFlagBits2 VK_ACCESS_2_HOST_READ_BIT_KHR = 0x00002000ULL; static const VkAccessFlagBits2 VK_ACCESS_2_HOST_WRITE_BIT_KHR = 0x00004000ULL; static const VkAccessFlagBits2 VK_ACCESS_2_MEMORY_READ_BIT_KHR = 0x00008000ULL; static const VkAccessFlagBits2 VK_ACCESS_2_MEMORY_WRITE_BIT_KHR = 0x00010000ULL; static const VkAccessFlagBits2 VK_ACCESS_2_SHADER_SAMPLED_READ_BIT_KHR = 0x100000000ULL; static const VkAccessFlagBits2 VK_ACCESS_2_SHADER_STORAGE_READ_BIT_KHR = 0x200000000ULL; static const VkAccessFlagBits2 VK_ACCESS_2_SHADER_STORAGE_WRITE_BIT_KHR = 0x400000000ULL; static const VkAccessFlagBits2 VK_ACCESS_2_TRANSFORM_FEEDBACK_WRITE_BIT_EXT = 0x02000000ULL; static const VkAccessFlagBits2 VK_ACCESS_2_TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT = 0x04000000ULL; static const VkAccessFlagBits2 VK_ACCESS_2_TRANSFORM_FEEDBACK_COUNTER_WRITE_BIT_EXT = 0x08000000ULL; static const VkAccessFlagBits2 VK_ACCESS_2_CONDITIONAL_RENDERING_READ_BIT_EXT = 0x00100000ULL; static const VkAccessFlagBits2 VK_ACCESS_2_COMMAND_PREPROCESS_READ_BIT_NV = 0x00020000ULL; static const VkAccessFlagBits2 VK_ACCESS_2_COMMAND_PREPROCESS_WRITE_BIT_NV = 0x00040000ULL; static const VkAccessFlagBits2 VK_ACCESS_2_COMMAND_PREPROCESS_READ_BIT_EXT = 0x00020000ULL; static const VkAccessFlagBits2 VK_ACCESS_2_COMMAND_PREPROCESS_WRITE_BIT_EXT = 0x00040000ULL; static const VkAccessFlagBits2 VK_ACCESS_2_FRAGMENT_SHADING_RATE_ATTACHMENT_READ_BIT_KHR = 0x00800000ULL; static const VkAccessFlagBits2 VK_ACCESS_2_SHADING_RATE_IMAGE_READ_BIT_NV = 0x00800000ULL; static const VkAccessFlagBits2 VK_ACCESS_2_ACCELERATION_STRUCTURE_READ_BIT_KHR = 0x00200000ULL; static const VkAccessFlagBits2 VK_ACCESS_2_ACCELERATION_STRUCTURE_WRITE_BIT_KHR = 0x00400000ULL; static const VkAccessFlagBits2 VK_ACCESS_2_ACCELERATION_STRUCTURE_READ_BIT_NV = 0x00200000ULL; static const VkAccessFlagBits2 VK_ACCESS_2_ACCELERATION_STRUCTURE_WRITE_BIT_NV = 0x00400000ULL; static const VkAccessFlagBits2 VK_ACCESS_2_FRAGMENT_DENSITY_MAP_READ_BIT_EXT = 0x01000000ULL; static const VkAccessFlagBits2 VK_ACCESS_2_COLOR_ATTACHMENT_READ_NONCOHERENT_BIT_EXT = 0x00080000ULL; static const VkAccessFlagBits2 VK_ACCESS_2_DESCRIPTOR_BUFFER_READ_BIT_EXT = 0x20000000000ULL; static const VkAccessFlagBits2 VK_ACCESS_2_INVOCATION_MASK_READ_BIT_HUAWEI = 0x8000000000ULL; static const VkAccessFlagBits2 VK_ACCESS_2_SHADER_BINDING_TABLE_READ_BIT_KHR = 0x10000000000ULL; static const VkAccessFlagBits2 VK_ACCESS_2_MICROMAP_READ_BIT_EXT = 0x100000000000ULL; static const VkAccessFlagBits2 VK_ACCESS_2_MICROMAP_WRITE_BIT_EXT = 0x200000000000ULL; static const VkAccessFlagBits2 VK_ACCESS_2_OPTICAL_FLOW_READ_BIT_NV = 0x40000000000ULL; static const VkAccessFlagBits2 VK_ACCESS_2_OPTICAL_FLOW_WRITE_BIT_NV = 0x80000000000ULL; typedef enum VkSubmitFlagBits { VK_SUBMIT_PROTECTED_BIT = 0x00000001, VK_SUBMIT_PROTECTED_BIT_KHR = VK_SUBMIT_PROTECTED_BIT, VK_SUBMIT_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VkSubmitFlagBits; typedef VkFlags VkSubmitFlags; typedef enum VkRenderingFlagBits { VK_RENDERING_CONTENTS_SECONDARY_COMMAND_BUFFERS_BIT = 0x00000001, VK_RENDERING_SUSPENDING_BIT = 0x00000002, VK_RENDERING_RESUMING_BIT = 0x00000004, VK_RENDERING_ENABLE_LEGACY_DITHERING_BIT_EXT = 0x00000008, VK_RENDERING_CONTENTS_INLINE_BIT_KHR = 0x00000010, VK_RENDERING_CONTENTS_SECONDARY_COMMAND_BUFFERS_BIT_KHR = VK_RENDERING_CONTENTS_SECONDARY_COMMAND_BUFFERS_BIT, VK_RENDERING_SUSPENDING_BIT_KHR = VK_RENDERING_SUSPENDING_BIT, VK_RENDERING_RESUMING_BIT_KHR = VK_RENDERING_RESUMING_BIT, VK_RENDERING_CONTENTS_INLINE_BIT_EXT = VK_RENDERING_CONTENTS_INLINE_BIT_KHR, VK_RENDERING_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VkRenderingFlagBits; typedef VkFlags VkRenderingFlags; typedef VkFlags64 VkFormatFeatureFlags2; // Flag bits for VkFormatFeatureFlagBits2 typedef VkFlags64 VkFormatFeatureFlagBits2; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_BIT = 0x00000001ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_STORAGE_IMAGE_BIT = 0x00000002ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_STORAGE_IMAGE_ATOMIC_BIT = 0x00000004ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_UNIFORM_TEXEL_BUFFER_BIT = 0x00000008ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_STORAGE_TEXEL_BUFFER_BIT = 0x00000010ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_STORAGE_TEXEL_BUFFER_ATOMIC_BIT = 0x00000020ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_VERTEX_BUFFER_BIT = 0x00000040ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_COLOR_ATTACHMENT_BIT = 0x00000080ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_COLOR_ATTACHMENT_BLEND_BIT = 0x00000100ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_DEPTH_STENCIL_ATTACHMENT_BIT = 0x00000200ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_BLIT_SRC_BIT = 0x00000400ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_BLIT_DST_BIT = 0x00000800ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_FILTER_LINEAR_BIT = 0x00001000ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_TRANSFER_SRC_BIT = 0x00004000ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_TRANSFER_DST_BIT = 0x00008000ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_FILTER_MINMAX_BIT = 0x00010000ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_MIDPOINT_CHROMA_SAMPLES_BIT = 0x00020000ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT = 0x00040000ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT = 0x00080000ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_BIT = 0x00100000ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT = 0x00200000ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_DISJOINT_BIT = 0x00400000ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_COSITED_CHROMA_SAMPLES_BIT = 0x00800000ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT = 0x80000000ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT = 0x100000000ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT = 0x200000000ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_FILTER_CUBIC_BIT = 0x00002000ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_HOST_IMAGE_TRANSFER_BIT = 0x400000000000ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_VIDEO_DECODE_OUTPUT_BIT_KHR = 0x02000000ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_VIDEO_DECODE_DPB_BIT_KHR = 0x04000000ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_ACCELERATION_STRUCTURE_VERTEX_BUFFER_BIT_KHR = 0x20000000ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_FRAGMENT_DENSITY_MAP_BIT_EXT = 0x01000000ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR = 0x40000000ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_HOST_IMAGE_TRANSFER_BIT_EXT = 0x400000000000ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_VIDEO_ENCODE_INPUT_BIT_KHR = 0x08000000ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_VIDEO_ENCODE_DPB_BIT_KHR = 0x10000000ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_BIT_KHR = 0x00000001ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_STORAGE_IMAGE_BIT_KHR = 0x00000002ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_STORAGE_IMAGE_ATOMIC_BIT_KHR = 0x00000004ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_UNIFORM_TEXEL_BUFFER_BIT_KHR = 0x00000008ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_STORAGE_TEXEL_BUFFER_BIT_KHR = 0x00000010ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_STORAGE_TEXEL_BUFFER_ATOMIC_BIT_KHR = 0x00000020ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_VERTEX_BUFFER_BIT_KHR = 0x00000040ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_COLOR_ATTACHMENT_BIT_KHR = 0x00000080ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_COLOR_ATTACHMENT_BLEND_BIT_KHR = 0x00000100ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_DEPTH_STENCIL_ATTACHMENT_BIT_KHR = 0x00000200ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_BLIT_SRC_BIT_KHR = 0x00000400ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_BLIT_DST_BIT_KHR = 0x00000800ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_FILTER_LINEAR_BIT_KHR = 0x00001000ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_TRANSFER_SRC_BIT_KHR = 0x00004000ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_TRANSFER_DST_BIT_KHR = 0x00008000ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_MIDPOINT_CHROMA_SAMPLES_BIT_KHR = 0x00020000ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT_KHR = 0x00040000ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT_KHR = 0x00080000ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_BIT_KHR = 0x00100000ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT_KHR = 0x00200000ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_DISJOINT_BIT_KHR = 0x00400000ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_COSITED_CHROMA_SAMPLES_BIT_KHR = 0x00800000ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT_KHR = 0x80000000ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT_KHR = 0x100000000ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT_KHR = 0x200000000ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_FILTER_MINMAX_BIT_KHR = 0x00010000ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT = 0x00002000ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_ACCELERATION_STRUCTURE_RADIUS_BUFFER_BIT_NV = 0x8000000000000ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_LINEAR_COLOR_ATTACHMENT_BIT_NV = 0x4000000000ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_WEIGHT_IMAGE_BIT_QCOM = 0x400000000ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_WEIGHT_SAMPLED_IMAGE_BIT_QCOM = 0x800000000ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM = 0x1000000000ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_BOX_FILTER_SAMPLED_BIT_QCOM = 0x2000000000ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_OPTICAL_FLOW_IMAGE_BIT_NV = 0x10000000000ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_OPTICAL_FLOW_VECTOR_BIT_NV = 0x20000000000ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_OPTICAL_FLOW_COST_BIT_NV = 0x40000000000ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_VIDEO_ENCODE_QUANTIZATION_DELTA_MAP_BIT_KHR = 0x2000000000000ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_VIDEO_ENCODE_EMPHASIS_MAP_BIT_KHR = 0x4000000000000ULL; typedef struct VkPhysicalDeviceVulkan13Features { VkStructureType sType; void* pNext; VkBool32 robustImageAccess; VkBool32 inlineUniformBlock; VkBool32 descriptorBindingInlineUniformBlockUpdateAfterBind; VkBool32 pipelineCreationCacheControl; VkBool32 privateData; VkBool32 shaderDemoteToHelperInvocation; VkBool32 shaderTerminateInvocation; VkBool32 subgroupSizeControl; VkBool32 computeFullSubgroups; VkBool32 synchronization2; VkBool32 textureCompressionASTC_HDR; VkBool32 shaderZeroInitializeWorkgroupMemory; VkBool32 dynamicRendering; VkBool32 shaderIntegerDotProduct; VkBool32 maintenance4; } VkPhysicalDeviceVulkan13Features; typedef struct VkPhysicalDeviceVulkan13Properties { VkStructureType sType; void* pNext; uint32_t minSubgroupSize; uint32_t maxSubgroupSize; uint32_t maxComputeWorkgroupSubgroups; VkShaderStageFlags requiredSubgroupSizeStages; uint32_t maxInlineUniformBlockSize; uint32_t maxPerStageDescriptorInlineUniformBlocks; uint32_t maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks; uint32_t maxDescriptorSetInlineUniformBlocks; uint32_t maxDescriptorSetUpdateAfterBindInlineUniformBlocks; uint32_t maxInlineUniformTotalSize; VkBool32 integerDotProduct8BitUnsignedAccelerated; VkBool32 integerDotProduct8BitSignedAccelerated; VkBool32 integerDotProduct8BitMixedSignednessAccelerated; VkBool32 integerDotProduct4x8BitPackedUnsignedAccelerated; VkBool32 integerDotProduct4x8BitPackedSignedAccelerated; VkBool32 integerDotProduct4x8BitPackedMixedSignednessAccelerated; VkBool32 integerDotProduct16BitUnsignedAccelerated; VkBool32 integerDotProduct16BitSignedAccelerated; VkBool32 integerDotProduct16BitMixedSignednessAccelerated; VkBool32 integerDotProduct32BitUnsignedAccelerated; VkBool32 integerDotProduct32BitSignedAccelerated; VkBool32 integerDotProduct32BitMixedSignednessAccelerated; VkBool32 integerDotProduct64BitUnsignedAccelerated; VkBool32 integerDotProduct64BitSignedAccelerated; VkBool32 integerDotProduct64BitMixedSignednessAccelerated; VkBool32 integerDotProductAccumulatingSaturating8BitUnsignedAccelerated; VkBool32 integerDotProductAccumulatingSaturating8BitSignedAccelerated; VkBool32 integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated; VkBool32 integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated; VkBool32 integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated; VkBool32 integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated; VkBool32 integerDotProductAccumulatingSaturating16BitUnsignedAccelerated; VkBool32 integerDotProductAccumulatingSaturating16BitSignedAccelerated; VkBool32 integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated; VkBool32 integerDotProductAccumulatingSaturating32BitUnsignedAccelerated; VkBool32 integerDotProductAccumulatingSaturating32BitSignedAccelerated; VkBool32 integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated; VkBool32 integerDotProductAccumulatingSaturating64BitUnsignedAccelerated; VkBool32 integerDotProductAccumulatingSaturating64BitSignedAccelerated; VkBool32 integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated; VkDeviceSize storageTexelBufferOffsetAlignmentBytes; VkBool32 storageTexelBufferOffsetSingleTexelAlignment; VkDeviceSize uniformTexelBufferOffsetAlignmentBytes; VkBool32 uniformTexelBufferOffsetSingleTexelAlignment; VkDeviceSize maxBufferSize; } VkPhysicalDeviceVulkan13Properties; typedef struct VkPipelineCreationFeedback { VkPipelineCreationFeedbackFlags flags; uint64_t duration; } VkPipelineCreationFeedback; typedef struct VkPipelineCreationFeedbackCreateInfo { VkStructureType sType; const void* pNext; VkPipelineCreationFeedback* pPipelineCreationFeedback; uint32_t pipelineStageCreationFeedbackCount; VkPipelineCreationFeedback* pPipelineStageCreationFeedbacks; } VkPipelineCreationFeedbackCreateInfo; typedef struct VkPhysicalDeviceShaderTerminateInvocationFeatures { VkStructureType sType; void* pNext; VkBool32 shaderTerminateInvocation; } VkPhysicalDeviceShaderTerminateInvocationFeatures; typedef struct VkPhysicalDeviceToolProperties { VkStructureType sType; void* pNext; char name[VK_MAX_EXTENSION_NAME_SIZE]; char version[VK_MAX_EXTENSION_NAME_SIZE]; VkToolPurposeFlags purposes; char description[VK_MAX_DESCRIPTION_SIZE]; char layer[VK_MAX_EXTENSION_NAME_SIZE]; } VkPhysicalDeviceToolProperties; typedef struct VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures { VkStructureType sType; void* pNext; VkBool32 shaderDemoteToHelperInvocation; } VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures; typedef struct VkPhysicalDevicePrivateDataFeatures { VkStructureType sType; void* pNext; VkBool32 privateData; } VkPhysicalDevicePrivateDataFeatures; typedef struct VkDevicePrivateDataCreateInfo { VkStructureType sType; const void* pNext; uint32_t privateDataSlotRequestCount; } VkDevicePrivateDataCreateInfo; typedef struct VkPrivateDataSlotCreateInfo { VkStructureType sType; const void* pNext; VkPrivateDataSlotCreateFlags flags; } VkPrivateDataSlotCreateInfo; typedef struct VkPhysicalDevicePipelineCreationCacheControlFeatures { VkStructureType sType; void* pNext; VkBool32 pipelineCreationCacheControl; } VkPhysicalDevicePipelineCreationCacheControlFeatures; typedef struct VkMemoryBarrier2 { VkStructureType sType; const void* pNext; VkPipelineStageFlags2 srcStageMask; VkAccessFlags2 srcAccessMask; VkPipelineStageFlags2 dstStageMask; VkAccessFlags2 dstAccessMask; } VkMemoryBarrier2; typedef struct VkBufferMemoryBarrier2 { VkStructureType sType; const void* pNext; VkPipelineStageFlags2 srcStageMask; VkAccessFlags2 srcAccessMask; VkPipelineStageFlags2 dstStageMask; VkAccessFlags2 dstAccessMask; uint32_t srcQueueFamilyIndex; uint32_t dstQueueFamilyIndex; VkBuffer buffer; VkDeviceSize offset; VkDeviceSize size; } VkBufferMemoryBarrier2; typedef struct VkImageMemoryBarrier2 { VkStructureType sType; const void* pNext; VkPipelineStageFlags2 srcStageMask; VkAccessFlags2 srcAccessMask; VkPipelineStageFlags2 dstStageMask; VkAccessFlags2 dstAccessMask; VkImageLayout oldLayout; VkImageLayout newLayout; uint32_t srcQueueFamilyIndex; uint32_t dstQueueFamilyIndex; VkImage image; VkImageSubresourceRange subresourceRange; } VkImageMemoryBarrier2; typedef struct VkDependencyInfo { VkStructureType sType; const void* pNext; VkDependencyFlags dependencyFlags; uint32_t memoryBarrierCount; const VkMemoryBarrier2* pMemoryBarriers; uint32_t bufferMemoryBarrierCount; const VkBufferMemoryBarrier2* pBufferMemoryBarriers; uint32_t imageMemoryBarrierCount; const VkImageMemoryBarrier2* pImageMemoryBarriers; } VkDependencyInfo; typedef struct VkSemaphoreSubmitInfo { VkStructureType sType; const void* pNext; VkSemaphore semaphore; uint64_t value; VkPipelineStageFlags2 stageMask; uint32_t deviceIndex; } VkSemaphoreSubmitInfo; typedef struct VkCommandBufferSubmitInfo { VkStructureType sType; const void* pNext; VkCommandBuffer commandBuffer; uint32_t deviceMask; } VkCommandBufferSubmitInfo; typedef struct VkSubmitInfo2 { VkStructureType sType; const void* pNext; VkSubmitFlags flags; uint32_t waitSemaphoreInfoCount; const VkSemaphoreSubmitInfo* pWaitSemaphoreInfos; uint32_t commandBufferInfoCount; const VkCommandBufferSubmitInfo* pCommandBufferInfos; uint32_t signalSemaphoreInfoCount; const VkSemaphoreSubmitInfo* pSignalSemaphoreInfos; } VkSubmitInfo2; typedef struct VkPhysicalDeviceSynchronization2Features { VkStructureType sType; void* pNext; VkBool32 synchronization2; } VkPhysicalDeviceSynchronization2Features; typedef struct VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures { VkStructureType sType; void* pNext; VkBool32 shaderZeroInitializeWorkgroupMemory; } VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures; typedef struct VkPhysicalDeviceImageRobustnessFeatures { VkStructureType sType; void* pNext; VkBool32 robustImageAccess; } VkPhysicalDeviceImageRobustnessFeatures; typedef struct VkBufferCopy2 { VkStructureType sType; const void* pNext; VkDeviceSize srcOffset; VkDeviceSize dstOffset; VkDeviceSize size; } VkBufferCopy2; typedef struct VkCopyBufferInfo2 { VkStructureType sType; const void* pNext; VkBuffer srcBuffer; VkBuffer dstBuffer; uint32_t regionCount; const VkBufferCopy2* pRegions; } VkCopyBufferInfo2; typedef struct VkImageCopy2 { VkStructureType sType; const void* pNext; VkImageSubresourceLayers srcSubresource; VkOffset3D srcOffset; VkImageSubresourceLayers dstSubresource; VkOffset3D dstOffset; VkExtent3D extent; } VkImageCopy2; typedef struct VkCopyImageInfo2 { VkStructureType sType; const void* pNext; VkImage srcImage; VkImageLayout srcImageLayout; VkImage dstImage; VkImageLayout dstImageLayout; uint32_t regionCount; const VkImageCopy2* pRegions; } VkCopyImageInfo2; typedef struct VkBufferImageCopy2 { VkStructureType sType; const void* pNext; VkDeviceSize bufferOffset; uint32_t bufferRowLength; uint32_t bufferImageHeight; VkImageSubresourceLayers imageSubresource; VkOffset3D imageOffset; VkExtent3D imageExtent; } VkBufferImageCopy2; typedef struct VkCopyBufferToImageInfo2 { VkStructureType sType; const void* pNext; VkBuffer srcBuffer; VkImage dstImage; VkImageLayout dstImageLayout; uint32_t regionCount; const VkBufferImageCopy2* pRegions; } VkCopyBufferToImageInfo2; typedef struct VkCopyImageToBufferInfo2 { VkStructureType sType; const void* pNext; VkImage srcImage; VkImageLayout srcImageLayout; VkBuffer dstBuffer; uint32_t regionCount; const VkBufferImageCopy2* pRegions; } VkCopyImageToBufferInfo2; typedef struct VkImageBlit2 { VkStructureType sType; const void* pNext; VkImageSubresourceLayers srcSubresource; VkOffset3D srcOffsets[2]; VkImageSubresourceLayers dstSubresource; VkOffset3D dstOffsets[2]; } VkImageBlit2; typedef struct VkBlitImageInfo2 { VkStructureType sType; const void* pNext; VkImage srcImage; VkImageLayout srcImageLayout; VkImage dstImage; VkImageLayout dstImageLayout; uint32_t regionCount; const VkImageBlit2* pRegions; VkFilter filter; } VkBlitImageInfo2; typedef struct VkImageResolve2 { VkStructureType sType; const void* pNext; VkImageSubresourceLayers srcSubresource; VkOffset3D srcOffset; VkImageSubresourceLayers dstSubresource; VkOffset3D dstOffset; VkExtent3D extent; } VkImageResolve2; typedef struct VkResolveImageInfo2 { VkStructureType sType; const void* pNext; VkImage srcImage; VkImageLayout srcImageLayout; VkImage dstImage; VkImageLayout dstImageLayout; uint32_t regionCount; const VkImageResolve2* pRegions; } VkResolveImageInfo2; typedef struct VkPhysicalDeviceSubgroupSizeControlFeatures { VkStructureType sType; void* pNext; VkBool32 subgroupSizeControl; VkBool32 computeFullSubgroups; } VkPhysicalDeviceSubgroupSizeControlFeatures; typedef struct VkPhysicalDeviceSubgroupSizeControlProperties { VkStructureType sType; void* pNext; uint32_t minSubgroupSize; uint32_t maxSubgroupSize; uint32_t maxComputeWorkgroupSubgroups; VkShaderStageFlags requiredSubgroupSizeStages; } VkPhysicalDeviceSubgroupSizeControlProperties; typedef struct VkPipelineShaderStageRequiredSubgroupSizeCreateInfo { VkStructureType sType; void* pNext; uint32_t requiredSubgroupSize; } VkPipelineShaderStageRequiredSubgroupSizeCreateInfo; typedef struct VkPhysicalDeviceInlineUniformBlockFeatures { VkStructureType sType; void* pNext; VkBool32 inlineUniformBlock; VkBool32 descriptorBindingInlineUniformBlockUpdateAfterBind; } VkPhysicalDeviceInlineUniformBlockFeatures; typedef struct VkPhysicalDeviceInlineUniformBlockProperties { VkStructureType sType; void* pNext; uint32_t maxInlineUniformBlockSize; uint32_t maxPerStageDescriptorInlineUniformBlocks; uint32_t maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks; uint32_t maxDescriptorSetInlineUniformBlocks; uint32_t maxDescriptorSetUpdateAfterBindInlineUniformBlocks; } VkPhysicalDeviceInlineUniformBlockProperties; typedef struct VkWriteDescriptorSetInlineUniformBlock { VkStructureType sType; const void* pNext; uint32_t dataSize; const void* pData; } VkWriteDescriptorSetInlineUniformBlock; typedef struct VkDescriptorPoolInlineUniformBlockCreateInfo { VkStructureType sType; const void* pNext; uint32_t maxInlineUniformBlockBindings; } VkDescriptorPoolInlineUniformBlockCreateInfo; typedef struct VkPhysicalDeviceTextureCompressionASTCHDRFeatures { VkStructureType sType; void* pNext; VkBool32 textureCompressionASTC_HDR; } VkPhysicalDeviceTextureCompressionASTCHDRFeatures; typedef struct VkRenderingAttachmentInfo { VkStructureType sType; const void* pNext; VkImageView imageView; VkImageLayout imageLayout; VkResolveModeFlagBits resolveMode; VkImageView resolveImageView; VkImageLayout resolveImageLayout; VkAttachmentLoadOp loadOp; VkAttachmentStoreOp storeOp; VkClearValue clearValue; } VkRenderingAttachmentInfo; typedef struct VkRenderingInfo { VkStructureType sType; const void* pNext; VkRenderingFlags flags; VkRect2D renderArea; uint32_t layerCount; uint32_t viewMask; uint32_t colorAttachmentCount; const VkRenderingAttachmentInfo* pColorAttachments; const VkRenderingAttachmentInfo* pDepthAttachment; const VkRenderingAttachmentInfo* pStencilAttachment; } VkRenderingInfo; typedef struct VkPipelineRenderingCreateInfo { VkStructureType sType; const void* pNext; uint32_t viewMask; uint32_t colorAttachmentCount; const VkFormat* pColorAttachmentFormats; VkFormat depthAttachmentFormat; VkFormat stencilAttachmentFormat; } VkPipelineRenderingCreateInfo; typedef struct VkPhysicalDeviceDynamicRenderingFeatures { VkStructureType sType; void* pNext; VkBool32 dynamicRendering; } VkPhysicalDeviceDynamicRenderingFeatures; typedef struct VkCommandBufferInheritanceRenderingInfo { VkStructureType sType; const void* pNext; VkRenderingFlags flags; uint32_t viewMask; uint32_t colorAttachmentCount; const VkFormat* pColorAttachmentFormats; VkFormat depthAttachmentFormat; VkFormat stencilAttachmentFormat; VkSampleCountFlagBits rasterizationSamples; } VkCommandBufferInheritanceRenderingInfo; typedef struct VkPhysicalDeviceShaderIntegerDotProductFeatures { VkStructureType sType; void* pNext; VkBool32 shaderIntegerDotProduct; } VkPhysicalDeviceShaderIntegerDotProductFeatures; typedef struct VkPhysicalDeviceShaderIntegerDotProductProperties { VkStructureType sType; void* pNext; VkBool32 integerDotProduct8BitUnsignedAccelerated; VkBool32 integerDotProduct8BitSignedAccelerated; VkBool32 integerDotProduct8BitMixedSignednessAccelerated; VkBool32 integerDotProduct4x8BitPackedUnsignedAccelerated; VkBool32 integerDotProduct4x8BitPackedSignedAccelerated; VkBool32 integerDotProduct4x8BitPackedMixedSignednessAccelerated; VkBool32 integerDotProduct16BitUnsignedAccelerated; VkBool32 integerDotProduct16BitSignedAccelerated; VkBool32 integerDotProduct16BitMixedSignednessAccelerated; VkBool32 integerDotProduct32BitUnsignedAccelerated; VkBool32 integerDotProduct32BitSignedAccelerated; VkBool32 integerDotProduct32BitMixedSignednessAccelerated; VkBool32 integerDotProduct64BitUnsignedAccelerated; VkBool32 integerDotProduct64BitSignedAccelerated; VkBool32 integerDotProduct64BitMixedSignednessAccelerated; VkBool32 integerDotProductAccumulatingSaturating8BitUnsignedAccelerated; VkBool32 integerDotProductAccumulatingSaturating8BitSignedAccelerated; VkBool32 integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated; VkBool32 integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated; VkBool32 integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated; VkBool32 integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated; VkBool32 integerDotProductAccumulatingSaturating16BitUnsignedAccelerated; VkBool32 integerDotProductAccumulatingSaturating16BitSignedAccelerated; VkBool32 integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated; VkBool32 integerDotProductAccumulatingSaturating32BitUnsignedAccelerated; VkBool32 integerDotProductAccumulatingSaturating32BitSignedAccelerated; VkBool32 integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated; VkBool32 integerDotProductAccumulatingSaturating64BitUnsignedAccelerated; VkBool32 integerDotProductAccumulatingSaturating64BitSignedAccelerated; VkBool32 integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated; } VkPhysicalDeviceShaderIntegerDotProductProperties; typedef struct VkPhysicalDeviceTexelBufferAlignmentProperties { VkStructureType sType; void* pNext; VkDeviceSize storageTexelBufferOffsetAlignmentBytes; VkBool32 storageTexelBufferOffsetSingleTexelAlignment; VkDeviceSize uniformTexelBufferOffsetAlignmentBytes; VkBool32 uniformTexelBufferOffsetSingleTexelAlignment; } VkPhysicalDeviceTexelBufferAlignmentProperties; typedef struct VkFormatProperties3 { VkStructureType sType; void* pNext; VkFormatFeatureFlags2 linearTilingFeatures; VkFormatFeatureFlags2 optimalTilingFeatures; VkFormatFeatureFlags2 bufferFeatures; } VkFormatProperties3; typedef struct VkPhysicalDeviceMaintenance4Features { VkStructureType sType; void* pNext; VkBool32 maintenance4; } VkPhysicalDeviceMaintenance4Features; typedef struct VkPhysicalDeviceMaintenance4Properties { VkStructureType sType; void* pNext; VkDeviceSize maxBufferSize; } VkPhysicalDeviceMaintenance4Properties; typedef struct VkDeviceBufferMemoryRequirements { VkStructureType sType; const void* pNext; const VkBufferCreateInfo* pCreateInfo; } VkDeviceBufferMemoryRequirements; typedef struct VkDeviceImageMemoryRequirements { VkStructureType sType; const void* pNext; const VkImageCreateInfo* pCreateInfo; VkImageAspectFlagBits planeAspect; } VkDeviceImageMemoryRequirements; typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceToolProperties)(VkPhysicalDevice physicalDevice, uint32_t* pToolCount, VkPhysicalDeviceToolProperties* pToolProperties); typedef VkResult (VKAPI_PTR *PFN_vkCreatePrivateDataSlot)(VkDevice device, const VkPrivateDataSlotCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkPrivateDataSlot* pPrivateDataSlot); typedef void (VKAPI_PTR *PFN_vkDestroyPrivateDataSlot)(VkDevice device, VkPrivateDataSlot privateDataSlot, const VkAllocationCallbacks* pAllocator); typedef VkResult (VKAPI_PTR *PFN_vkSetPrivateData)(VkDevice device, VkObjectType objectType, uint64_t objectHandle, VkPrivateDataSlot privateDataSlot, uint64_t data); typedef void (VKAPI_PTR *PFN_vkGetPrivateData)(VkDevice device, VkObjectType objectType, uint64_t objectHandle, VkPrivateDataSlot privateDataSlot, uint64_t* pData); typedef void (VKAPI_PTR *PFN_vkCmdSetEvent2)(VkCommandBuffer commandBuffer, VkEvent event, const VkDependencyInfo* pDependencyInfo); typedef void (VKAPI_PTR *PFN_vkCmdResetEvent2)(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags2 stageMask); typedef void (VKAPI_PTR *PFN_vkCmdWaitEvents2)(VkCommandBuffer commandBuffer, uint32_t eventCount, const VkEvent* pEvents, const VkDependencyInfo* pDependencyInfos); typedef void (VKAPI_PTR *PFN_vkCmdPipelineBarrier2)(VkCommandBuffer commandBuffer, const VkDependencyInfo* pDependencyInfo); typedef void (VKAPI_PTR *PFN_vkCmdWriteTimestamp2)(VkCommandBuffer commandBuffer, VkPipelineStageFlags2 stage, VkQueryPool queryPool, uint32_t query); typedef VkResult (VKAPI_PTR *PFN_vkQueueSubmit2)(VkQueue queue, uint32_t submitCount, const VkSubmitInfo2* pSubmits, VkFence fence); typedef void (VKAPI_PTR *PFN_vkCmdCopyBuffer2)(VkCommandBuffer commandBuffer, const VkCopyBufferInfo2* pCopyBufferInfo); typedef void (VKAPI_PTR *PFN_vkCmdCopyImage2)(VkCommandBuffer commandBuffer, const VkCopyImageInfo2* pCopyImageInfo); typedef void (VKAPI_PTR *PFN_vkCmdCopyBufferToImage2)(VkCommandBuffer commandBuffer, const VkCopyBufferToImageInfo2* pCopyBufferToImageInfo); typedef void (VKAPI_PTR *PFN_vkCmdCopyImageToBuffer2)(VkCommandBuffer commandBuffer, const VkCopyImageToBufferInfo2* pCopyImageToBufferInfo); typedef void (VKAPI_PTR *PFN_vkCmdBlitImage2)(VkCommandBuffer commandBuffer, const VkBlitImageInfo2* pBlitImageInfo); typedef void (VKAPI_PTR *PFN_vkCmdResolveImage2)(VkCommandBuffer commandBuffer, const VkResolveImageInfo2* pResolveImageInfo); typedef void (VKAPI_PTR *PFN_vkCmdBeginRendering)(VkCommandBuffer commandBuffer, const VkRenderingInfo* pRenderingInfo); typedef void (VKAPI_PTR *PFN_vkCmdEndRendering)(VkCommandBuffer commandBuffer); typedef void (VKAPI_PTR *PFN_vkCmdSetCullMode)(VkCommandBuffer commandBuffer, VkCullModeFlags cullMode); typedef void (VKAPI_PTR *PFN_vkCmdSetFrontFace)(VkCommandBuffer commandBuffer, VkFrontFace frontFace); typedef void (VKAPI_PTR *PFN_vkCmdSetPrimitiveTopology)(VkCommandBuffer commandBuffer, VkPrimitiveTopology primitiveTopology); typedef void (VKAPI_PTR *PFN_vkCmdSetViewportWithCount)(VkCommandBuffer commandBuffer, uint32_t viewportCount, const VkViewport* pViewports); typedef void (VKAPI_PTR *PFN_vkCmdSetScissorWithCount)(VkCommandBuffer commandBuffer, uint32_t scissorCount, const VkRect2D* pScissors); typedef void (VKAPI_PTR *PFN_vkCmdBindVertexBuffers2)(VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, const VkBuffer* pBuffers, const VkDeviceSize* pOffsets, const VkDeviceSize* pSizes, const VkDeviceSize* pStrides); typedef void (VKAPI_PTR *PFN_vkCmdSetDepthTestEnable)(VkCommandBuffer commandBuffer, VkBool32 depthTestEnable); typedef void (VKAPI_PTR *PFN_vkCmdSetDepthWriteEnable)(VkCommandBuffer commandBuffer, VkBool32 depthWriteEnable); typedef void (VKAPI_PTR *PFN_vkCmdSetDepthCompareOp)(VkCommandBuffer commandBuffer, VkCompareOp depthCompareOp); typedef void (VKAPI_PTR *PFN_vkCmdSetDepthBoundsTestEnable)(VkCommandBuffer commandBuffer, VkBool32 depthBoundsTestEnable); typedef void (VKAPI_PTR *PFN_vkCmdSetStencilTestEnable)(VkCommandBuffer commandBuffer, VkBool32 stencilTestEnable); typedef void (VKAPI_PTR *PFN_vkCmdSetStencilOp)(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, VkStencilOp failOp, VkStencilOp passOp, VkStencilOp depthFailOp, VkCompareOp compareOp); typedef void (VKAPI_PTR *PFN_vkCmdSetRasterizerDiscardEnable)(VkCommandBuffer commandBuffer, VkBool32 rasterizerDiscardEnable); typedef void (VKAPI_PTR *PFN_vkCmdSetDepthBiasEnable)(VkCommandBuffer commandBuffer, VkBool32 depthBiasEnable); typedef void (VKAPI_PTR *PFN_vkCmdSetPrimitiveRestartEnable)(VkCommandBuffer commandBuffer, VkBool32 primitiveRestartEnable); typedef void (VKAPI_PTR *PFN_vkGetDeviceBufferMemoryRequirements)(VkDevice device, const VkDeviceBufferMemoryRequirements* pInfo, VkMemoryRequirements2* pMemoryRequirements); typedef void (VKAPI_PTR *PFN_vkGetDeviceImageMemoryRequirements)(VkDevice device, const VkDeviceImageMemoryRequirements* pInfo, VkMemoryRequirements2* pMemoryRequirements); typedef void (VKAPI_PTR *PFN_vkGetDeviceImageSparseMemoryRequirements)(VkDevice device, const VkDeviceImageMemoryRequirements* pInfo, uint32_t* pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements2* pSparseMemoryRequirements); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceToolProperties( VkPhysicalDevice physicalDevice, uint32_t* pToolCount, VkPhysicalDeviceToolProperties* pToolProperties); VKAPI_ATTR VkResult VKAPI_CALL vkCreatePrivateDataSlot( VkDevice device, const VkPrivateDataSlotCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkPrivateDataSlot* pPrivateDataSlot); VKAPI_ATTR void VKAPI_CALL vkDestroyPrivateDataSlot( VkDevice device, VkPrivateDataSlot privateDataSlot, const VkAllocationCallbacks* pAllocator); VKAPI_ATTR VkResult VKAPI_CALL vkSetPrivateData( VkDevice device, VkObjectType objectType, uint64_t objectHandle, VkPrivateDataSlot privateDataSlot, uint64_t data); VKAPI_ATTR void VKAPI_CALL vkGetPrivateData( VkDevice device, VkObjectType objectType, uint64_t objectHandle, VkPrivateDataSlot privateDataSlot, uint64_t* pData); VKAPI_ATTR void VKAPI_CALL vkCmdSetEvent2( VkCommandBuffer commandBuffer, VkEvent event, const VkDependencyInfo* pDependencyInfo); VKAPI_ATTR void VKAPI_CALL vkCmdResetEvent2( VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags2 stageMask); VKAPI_ATTR void VKAPI_CALL vkCmdWaitEvents2( VkCommandBuffer commandBuffer, uint32_t eventCount, const VkEvent* pEvents, const VkDependencyInfo* pDependencyInfos); VKAPI_ATTR void VKAPI_CALL vkCmdPipelineBarrier2( VkCommandBuffer commandBuffer, const VkDependencyInfo* pDependencyInfo); VKAPI_ATTR void VKAPI_CALL vkCmdWriteTimestamp2( VkCommandBuffer commandBuffer, VkPipelineStageFlags2 stage, VkQueryPool queryPool, uint32_t query); VKAPI_ATTR VkResult VKAPI_CALL vkQueueSubmit2( VkQueue queue, uint32_t submitCount, const VkSubmitInfo2* pSubmits, VkFence fence); VKAPI_ATTR void VKAPI_CALL vkCmdCopyBuffer2( VkCommandBuffer commandBuffer, const VkCopyBufferInfo2* pCopyBufferInfo); VKAPI_ATTR void VKAPI_CALL vkCmdCopyImage2( VkCommandBuffer commandBuffer, const VkCopyImageInfo2* pCopyImageInfo); VKAPI_ATTR void VKAPI_CALL vkCmdCopyBufferToImage2( VkCommandBuffer commandBuffer, const VkCopyBufferToImageInfo2* pCopyBufferToImageInfo); VKAPI_ATTR void VKAPI_CALL vkCmdCopyImageToBuffer2( VkCommandBuffer commandBuffer, const VkCopyImageToBufferInfo2* pCopyImageToBufferInfo); VKAPI_ATTR void VKAPI_CALL vkCmdBlitImage2( VkCommandBuffer commandBuffer, const VkBlitImageInfo2* pBlitImageInfo); VKAPI_ATTR void VKAPI_CALL vkCmdResolveImage2( VkCommandBuffer commandBuffer, const VkResolveImageInfo2* pResolveImageInfo); VKAPI_ATTR void VKAPI_CALL vkCmdBeginRendering( VkCommandBuffer commandBuffer, const VkRenderingInfo* pRenderingInfo); VKAPI_ATTR void VKAPI_CALL vkCmdEndRendering( VkCommandBuffer commandBuffer); VKAPI_ATTR void VKAPI_CALL vkCmdSetCullMode( VkCommandBuffer commandBuffer, VkCullModeFlags cullMode); VKAPI_ATTR void VKAPI_CALL vkCmdSetFrontFace( VkCommandBuffer commandBuffer, VkFrontFace frontFace); VKAPI_ATTR void VKAPI_CALL vkCmdSetPrimitiveTopology( VkCommandBuffer commandBuffer, VkPrimitiveTopology primitiveTopology); VKAPI_ATTR void VKAPI_CALL vkCmdSetViewportWithCount( VkCommandBuffer commandBuffer, uint32_t viewportCount, const VkViewport* pViewports); VKAPI_ATTR void VKAPI_CALL vkCmdSetScissorWithCount( VkCommandBuffer commandBuffer, uint32_t scissorCount, const VkRect2D* pScissors); VKAPI_ATTR void VKAPI_CALL vkCmdBindVertexBuffers2( VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, const VkBuffer* pBuffers, const VkDeviceSize* pOffsets, const VkDeviceSize* pSizes, const VkDeviceSize* pStrides); VKAPI_ATTR void VKAPI_CALL vkCmdSetDepthTestEnable( VkCommandBuffer commandBuffer, VkBool32 depthTestEnable); VKAPI_ATTR void VKAPI_CALL vkCmdSetDepthWriteEnable( VkCommandBuffer commandBuffer, VkBool32 depthWriteEnable); VKAPI_ATTR void VKAPI_CALL vkCmdSetDepthCompareOp( VkCommandBuffer commandBuffer, VkCompareOp depthCompareOp); VKAPI_ATTR void VKAPI_CALL vkCmdSetDepthBoundsTestEnable( VkCommandBuffer commandBuffer, VkBool32 depthBoundsTestEnable); VKAPI_ATTR void VKAPI_CALL vkCmdSetStencilTestEnable( VkCommandBuffer commandBuffer, VkBool32 stencilTestEnable); VKAPI_ATTR void VKAPI_CALL vkCmdSetStencilOp( VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, VkStencilOp failOp, VkStencilOp passOp, VkStencilOp depthFailOp, VkCompareOp compareOp); VKAPI_ATTR void VKAPI_CALL vkCmdSetRasterizerDiscardEnable( VkCommandBuffer commandBuffer, VkBool32 rasterizerDiscardEnable); VKAPI_ATTR void VKAPI_CALL vkCmdSetDepthBiasEnable( VkCommandBuffer commandBuffer, VkBool32 depthBiasEnable); VKAPI_ATTR void VKAPI_CALL vkCmdSetPrimitiveRestartEnable( VkCommandBuffer commandBuffer, VkBool32 primitiveRestartEnable); VKAPI_ATTR void VKAPI_CALL vkGetDeviceBufferMemoryRequirements( VkDevice device, const VkDeviceBufferMemoryRequirements* pInfo, VkMemoryRequirements2* pMemoryRequirements); VKAPI_ATTR void VKAPI_CALL vkGetDeviceImageMemoryRequirements( VkDevice device, const VkDeviceImageMemoryRequirements* pInfo, VkMemoryRequirements2* pMemoryRequirements); VKAPI_ATTR void VKAPI_CALL vkGetDeviceImageSparseMemoryRequirements( VkDevice device, const VkDeviceImageMemoryRequirements* pInfo, uint32_t* pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements2* pSparseMemoryRequirements); #endif // VK_VERSION_1_4 is a preprocessor guard. Do not pass it to API calls. #define VK_VERSION_1_4 1 // Vulkan 1.4 version number #define VK_API_VERSION_1_4 VK_MAKE_API_VERSION(0, 1, 4, 0)// Patch version should always be set to 0 #define VK_MAX_GLOBAL_PRIORITY_SIZE 16U typedef enum VkPipelineRobustnessBufferBehavior { VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_DEVICE_DEFAULT = 0, VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_DISABLED = 1, VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS = 2, VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 = 3, VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_DEVICE_DEFAULT_EXT = VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_DEVICE_DEFAULT, VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_DISABLED_EXT = VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_DISABLED, VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_EXT = VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS, VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2_EXT = VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2, VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_MAX_ENUM = 0x7FFFFFFF } VkPipelineRobustnessBufferBehavior; typedef enum VkPipelineRobustnessImageBehavior { VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_DEVICE_DEFAULT = 0, VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_DISABLED = 1, VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_ROBUST_IMAGE_ACCESS = 2, VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_ROBUST_IMAGE_ACCESS_2 = 3, VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_DEVICE_DEFAULT_EXT = VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_DEVICE_DEFAULT, VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_DISABLED_EXT = VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_DISABLED, VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_ROBUST_IMAGE_ACCESS_EXT = VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_ROBUST_IMAGE_ACCESS, VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_ROBUST_IMAGE_ACCESS_2_EXT = VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_ROBUST_IMAGE_ACCESS_2, VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_MAX_ENUM = 0x7FFFFFFF } VkPipelineRobustnessImageBehavior; typedef enum VkQueueGlobalPriority { VK_QUEUE_GLOBAL_PRIORITY_LOW = 128, VK_QUEUE_GLOBAL_PRIORITY_MEDIUM = 256, VK_QUEUE_GLOBAL_PRIORITY_HIGH = 512, VK_QUEUE_GLOBAL_PRIORITY_REALTIME = 1024, VK_QUEUE_GLOBAL_PRIORITY_LOW_EXT = VK_QUEUE_GLOBAL_PRIORITY_LOW, VK_QUEUE_GLOBAL_PRIORITY_MEDIUM_EXT = VK_QUEUE_GLOBAL_PRIORITY_MEDIUM, VK_QUEUE_GLOBAL_PRIORITY_HIGH_EXT = VK_QUEUE_GLOBAL_PRIORITY_HIGH, VK_QUEUE_GLOBAL_PRIORITY_REALTIME_EXT = VK_QUEUE_GLOBAL_PRIORITY_REALTIME, VK_QUEUE_GLOBAL_PRIORITY_LOW_KHR = VK_QUEUE_GLOBAL_PRIORITY_LOW, VK_QUEUE_GLOBAL_PRIORITY_MEDIUM_KHR = VK_QUEUE_GLOBAL_PRIORITY_MEDIUM, VK_QUEUE_GLOBAL_PRIORITY_HIGH_KHR = VK_QUEUE_GLOBAL_PRIORITY_HIGH, VK_QUEUE_GLOBAL_PRIORITY_REALTIME_KHR = VK_QUEUE_GLOBAL_PRIORITY_REALTIME, VK_QUEUE_GLOBAL_PRIORITY_MAX_ENUM = 0x7FFFFFFF } VkQueueGlobalPriority; typedef enum VkLineRasterizationMode { VK_LINE_RASTERIZATION_MODE_DEFAULT = 0, VK_LINE_RASTERIZATION_MODE_RECTANGULAR = 1, VK_LINE_RASTERIZATION_MODE_BRESENHAM = 2, VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH = 3, VK_LINE_RASTERIZATION_MODE_DEFAULT_EXT = VK_LINE_RASTERIZATION_MODE_DEFAULT, VK_LINE_RASTERIZATION_MODE_RECTANGULAR_EXT = VK_LINE_RASTERIZATION_MODE_RECTANGULAR, VK_LINE_RASTERIZATION_MODE_BRESENHAM_EXT = VK_LINE_RASTERIZATION_MODE_BRESENHAM, VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH_EXT = VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH, VK_LINE_RASTERIZATION_MODE_DEFAULT_KHR = VK_LINE_RASTERIZATION_MODE_DEFAULT, VK_LINE_RASTERIZATION_MODE_RECTANGULAR_KHR = VK_LINE_RASTERIZATION_MODE_RECTANGULAR, VK_LINE_RASTERIZATION_MODE_BRESENHAM_KHR = VK_LINE_RASTERIZATION_MODE_BRESENHAM, VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH_KHR = VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH, VK_LINE_RASTERIZATION_MODE_MAX_ENUM = 0x7FFFFFFF } VkLineRasterizationMode; typedef enum VkMemoryUnmapFlagBits { VK_MEMORY_UNMAP_RESERVE_BIT_EXT = 0x00000001, VK_MEMORY_UNMAP_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VkMemoryUnmapFlagBits; typedef VkFlags VkMemoryUnmapFlags; typedef VkFlags64 VkPipelineCreateFlags2; // Flag bits for VkPipelineCreateFlagBits2 typedef VkFlags64 VkPipelineCreateFlagBits2; static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_DISABLE_OPTIMIZATION_BIT = 0x00000001ULL; static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_ALLOW_DERIVATIVES_BIT = 0x00000002ULL; static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_DERIVATIVE_BIT = 0x00000004ULL; static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_VIEW_INDEX_FROM_DEVICE_INDEX_BIT = 0x00000008ULL; static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_DISPATCH_BASE_BIT = 0x00000010ULL; static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT = 0x00000100ULL; static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_EARLY_RETURN_ON_FAILURE_BIT = 0x00000200ULL; static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_NO_PROTECTED_ACCESS_BIT = 0x08000000ULL; static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_PROTECTED_ACCESS_ONLY_BIT = 0x40000000ULL; #ifdef VK_ENABLE_BETA_EXTENSIONS static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_EXECUTION_GRAPH_BIT_AMDX = 0x100000000ULL; #endif static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_RAY_TRACING_SKIP_BUILT_IN_PRIMITIVES_BIT_KHR = 0x00001000ULL; static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_RAY_TRACING_ALLOW_SPHERES_AND_LINEAR_SWEPT_SPHERES_BIT_NV = 0x200000000ULL; static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_ENABLE_LEGACY_DITHERING_BIT_EXT = 0x400000000ULL; static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_DISABLE_OPTIMIZATION_BIT_KHR = 0x00000001ULL; static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_ALLOW_DERIVATIVES_BIT_KHR = 0x00000002ULL; static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_DERIVATIVE_BIT_KHR = 0x00000004ULL; static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_VIEW_INDEX_FROM_DEVICE_INDEX_BIT_KHR = 0x00000008ULL; static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_DISPATCH_BASE_BIT_KHR = 0x00000010ULL; static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_DEFER_COMPILE_BIT_NV = 0x00000020ULL; static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_CAPTURE_STATISTICS_BIT_KHR = 0x00000040ULL; static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_CAPTURE_INTERNAL_REPRESENTATIONS_BIT_KHR = 0x00000080ULL; static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT_KHR = 0x00000100ULL; static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_EARLY_RETURN_ON_FAILURE_BIT_KHR = 0x00000200ULL; static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_LINK_TIME_OPTIMIZATION_BIT_EXT = 0x00000400ULL; static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_RETAIN_LINK_TIME_OPTIMIZATION_INFO_BIT_EXT = 0x00800000ULL; static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_LIBRARY_BIT_KHR = 0x00000800ULL; static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_RAY_TRACING_SKIP_TRIANGLES_BIT_KHR = 0x00001000ULL; static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_RAY_TRACING_SKIP_AABBS_BIT_KHR = 0x00002000ULL; static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHR = 0x00004000ULL; static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR = 0x00008000ULL; static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_RAY_TRACING_NO_NULL_MISS_SHADERS_BIT_KHR = 0x00010000ULL; static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR = 0x00020000ULL; static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_RAY_TRACING_SHADER_GROUP_HANDLE_CAPTURE_REPLAY_BIT_KHR = 0x00080000ULL; static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_INDIRECT_BINDABLE_BIT_NV = 0x00040000ULL; static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_RAY_TRACING_ALLOW_MOTION_BIT_NV = 0x00100000ULL; static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR = 0x00200000ULL; static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT = 0x00400000ULL; static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_RAY_TRACING_OPACITY_MICROMAP_BIT_EXT = 0x01000000ULL; static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_COLOR_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT = 0x02000000ULL; static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_DEPTH_STENCIL_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT = 0x04000000ULL; static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_NO_PROTECTED_ACCESS_BIT_EXT = 0x08000000ULL; static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_PROTECTED_ACCESS_ONLY_BIT_EXT = 0x40000000ULL; static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_RAY_TRACING_DISPLACEMENT_MICROMAP_BIT_NV = 0x10000000ULL; static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_DESCRIPTOR_BUFFER_BIT_EXT = 0x20000000ULL; static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_DISALLOW_OPACITY_MICROMAP_BIT_ARM = 0x2000000000ULL; static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_CAPTURE_DATA_BIT_KHR = 0x80000000ULL; static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_INDIRECT_BINDABLE_BIT_EXT = 0x4000000000ULL; typedef VkFlags64 VkBufferUsageFlags2; // Flag bits for VkBufferUsageFlagBits2 typedef VkFlags64 VkBufferUsageFlagBits2; static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_TRANSFER_SRC_BIT = 0x00000001ULL; static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_TRANSFER_DST_BIT = 0x00000002ULL; static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_UNIFORM_TEXEL_BUFFER_BIT = 0x00000004ULL; static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_STORAGE_TEXEL_BUFFER_BIT = 0x00000008ULL; static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_UNIFORM_BUFFER_BIT = 0x00000010ULL; static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_STORAGE_BUFFER_BIT = 0x00000020ULL; static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_INDEX_BUFFER_BIT = 0x00000040ULL; static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_VERTEX_BUFFER_BIT = 0x00000080ULL; static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_INDIRECT_BUFFER_BIT = 0x00000100ULL; static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_SHADER_DEVICE_ADDRESS_BIT = 0x00020000ULL; #ifdef VK_ENABLE_BETA_EXTENSIONS static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_EXECUTION_GRAPH_SCRATCH_BIT_AMDX = 0x02000000ULL; #endif static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_TRANSFER_SRC_BIT_KHR = 0x00000001ULL; static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_TRANSFER_DST_BIT_KHR = 0x00000002ULL; static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_UNIFORM_TEXEL_BUFFER_BIT_KHR = 0x00000004ULL; static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_STORAGE_TEXEL_BUFFER_BIT_KHR = 0x00000008ULL; static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_UNIFORM_BUFFER_BIT_KHR = 0x00000010ULL; static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_STORAGE_BUFFER_BIT_KHR = 0x00000020ULL; static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_INDEX_BUFFER_BIT_KHR = 0x00000040ULL; static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_VERTEX_BUFFER_BIT_KHR = 0x00000080ULL; static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_INDIRECT_BUFFER_BIT_KHR = 0x00000100ULL; static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_CONDITIONAL_RENDERING_BIT_EXT = 0x00000200ULL; static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_SHADER_BINDING_TABLE_BIT_KHR = 0x00000400ULL; static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_RAY_TRACING_BIT_NV = 0x00000400ULL; static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT = 0x00000800ULL; static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_TRANSFORM_FEEDBACK_COUNTER_BUFFER_BIT_EXT = 0x00001000ULL; static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_VIDEO_DECODE_SRC_BIT_KHR = 0x00002000ULL; static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_VIDEO_DECODE_DST_BIT_KHR = 0x00004000ULL; static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_VIDEO_ENCODE_DST_BIT_KHR = 0x00008000ULL; static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_VIDEO_ENCODE_SRC_BIT_KHR = 0x00010000ULL; static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_SHADER_DEVICE_ADDRESS_BIT_KHR = 0x00020000ULL; static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_ACCELERATION_STRUCTURE_BUILD_INPUT_READ_ONLY_BIT_KHR = 0x00080000ULL; static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_ACCELERATION_STRUCTURE_STORAGE_BIT_KHR = 0x00100000ULL; static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_SAMPLER_DESCRIPTOR_BUFFER_BIT_EXT = 0x00200000ULL; static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_RESOURCE_DESCRIPTOR_BUFFER_BIT_EXT = 0x00400000ULL; static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_PUSH_DESCRIPTORS_DESCRIPTOR_BUFFER_BIT_EXT = 0x04000000ULL; static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_MICROMAP_BUILD_INPUT_READ_ONLY_BIT_EXT = 0x00800000ULL; static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_MICROMAP_STORAGE_BIT_EXT = 0x01000000ULL; static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_PREPROCESS_BUFFER_BIT_EXT = 0x80000000ULL; typedef enum VkHostImageCopyFlagBits { VK_HOST_IMAGE_COPY_MEMCPY = 0x00000001, VK_HOST_IMAGE_COPY_MEMCPY_EXT = VK_HOST_IMAGE_COPY_MEMCPY, VK_HOST_IMAGE_COPY_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VkHostImageCopyFlagBits; typedef VkFlags VkHostImageCopyFlags; typedef struct VkPhysicalDeviceVulkan14Features { VkStructureType sType; void* pNext; VkBool32 globalPriorityQuery; VkBool32 shaderSubgroupRotate; VkBool32 shaderSubgroupRotateClustered; VkBool32 shaderFloatControls2; VkBool32 shaderExpectAssume; VkBool32 rectangularLines; VkBool32 bresenhamLines; VkBool32 smoothLines; VkBool32 stippledRectangularLines; VkBool32 stippledBresenhamLines; VkBool32 stippledSmoothLines; VkBool32 vertexAttributeInstanceRateDivisor; VkBool32 vertexAttributeInstanceRateZeroDivisor; VkBool32 indexTypeUint8; VkBool32 dynamicRenderingLocalRead; VkBool32 maintenance5; VkBool32 maintenance6; VkBool32 pipelineProtectedAccess; VkBool32 pipelineRobustness; VkBool32 hostImageCopy; VkBool32 pushDescriptor; } VkPhysicalDeviceVulkan14Features; typedef struct VkPhysicalDeviceVulkan14Properties { VkStructureType sType; void* pNext; uint32_t lineSubPixelPrecisionBits; uint32_t maxVertexAttribDivisor; VkBool32 supportsNonZeroFirstInstance; uint32_t maxPushDescriptors; VkBool32 dynamicRenderingLocalReadDepthStencilAttachments; VkBool32 dynamicRenderingLocalReadMultisampledAttachments; VkBool32 earlyFragmentMultisampleCoverageAfterSampleCounting; VkBool32 earlyFragmentSampleMaskTestBeforeSampleCounting; VkBool32 depthStencilSwizzleOneSupport; VkBool32 polygonModePointSize; VkBool32 nonStrictSinglePixelWideLinesUseParallelogram; VkBool32 nonStrictWideLinesUseParallelogram; VkBool32 blockTexelViewCompatibleMultipleLayers; uint32_t maxCombinedImageSamplerDescriptorCount; VkBool32 fragmentShadingRateClampCombinerInputs; VkPipelineRobustnessBufferBehavior defaultRobustnessStorageBuffers; VkPipelineRobustnessBufferBehavior defaultRobustnessUniformBuffers; VkPipelineRobustnessBufferBehavior defaultRobustnessVertexInputs; VkPipelineRobustnessImageBehavior defaultRobustnessImages; uint32_t copySrcLayoutCount; VkImageLayout* pCopySrcLayouts; uint32_t copyDstLayoutCount; VkImageLayout* pCopyDstLayouts; uint8_t optimalTilingLayoutUUID[VK_UUID_SIZE]; VkBool32 identicalMemoryTypeRequirements; } VkPhysicalDeviceVulkan14Properties; typedef struct VkDeviceQueueGlobalPriorityCreateInfo { VkStructureType sType; const void* pNext; VkQueueGlobalPriority globalPriority; } VkDeviceQueueGlobalPriorityCreateInfo; typedef struct VkPhysicalDeviceGlobalPriorityQueryFeatures { VkStructureType sType; void* pNext; VkBool32 globalPriorityQuery; } VkPhysicalDeviceGlobalPriorityQueryFeatures; typedef struct VkQueueFamilyGlobalPriorityProperties { VkStructureType sType; void* pNext; uint32_t priorityCount; VkQueueGlobalPriority priorities[VK_MAX_GLOBAL_PRIORITY_SIZE]; } VkQueueFamilyGlobalPriorityProperties; typedef struct VkPhysicalDeviceShaderSubgroupRotateFeatures { VkStructureType sType; void* pNext; VkBool32 shaderSubgroupRotate; VkBool32 shaderSubgroupRotateClustered; } VkPhysicalDeviceShaderSubgroupRotateFeatures; typedef struct VkPhysicalDeviceShaderFloatControls2Features { VkStructureType sType; void* pNext; VkBool32 shaderFloatControls2; } VkPhysicalDeviceShaderFloatControls2Features; typedef struct VkPhysicalDeviceShaderExpectAssumeFeatures { VkStructureType sType; void* pNext; VkBool32 shaderExpectAssume; } VkPhysicalDeviceShaderExpectAssumeFeatures; typedef struct VkPhysicalDeviceLineRasterizationFeatures { VkStructureType sType; void* pNext; VkBool32 rectangularLines; VkBool32 bresenhamLines; VkBool32 smoothLines; VkBool32 stippledRectangularLines; VkBool32 stippledBresenhamLines; VkBool32 stippledSmoothLines; } VkPhysicalDeviceLineRasterizationFeatures; typedef struct VkPhysicalDeviceLineRasterizationProperties { VkStructureType sType; void* pNext; uint32_t lineSubPixelPrecisionBits; } VkPhysicalDeviceLineRasterizationProperties; typedef struct VkPipelineRasterizationLineStateCreateInfo { VkStructureType sType; const void* pNext; VkLineRasterizationMode lineRasterizationMode; VkBool32 stippledLineEnable; uint32_t lineStippleFactor; uint16_t lineStipplePattern; } VkPipelineRasterizationLineStateCreateInfo; typedef struct VkPhysicalDeviceVertexAttributeDivisorProperties { VkStructureType sType; void* pNext; uint32_t maxVertexAttribDivisor; VkBool32 supportsNonZeroFirstInstance; } VkPhysicalDeviceVertexAttributeDivisorProperties; typedef struct VkVertexInputBindingDivisorDescription { uint32_t binding; uint32_t divisor; } VkVertexInputBindingDivisorDescription; typedef struct VkPipelineVertexInputDivisorStateCreateInfo { VkStructureType sType; const void* pNext; uint32_t vertexBindingDivisorCount; const VkVertexInputBindingDivisorDescription* pVertexBindingDivisors; } VkPipelineVertexInputDivisorStateCreateInfo; typedef struct VkPhysicalDeviceVertexAttributeDivisorFeatures { VkStructureType sType; void* pNext; VkBool32 vertexAttributeInstanceRateDivisor; VkBool32 vertexAttributeInstanceRateZeroDivisor; } VkPhysicalDeviceVertexAttributeDivisorFeatures; typedef struct VkPhysicalDeviceIndexTypeUint8Features { VkStructureType sType; void* pNext; VkBool32 indexTypeUint8; } VkPhysicalDeviceIndexTypeUint8Features; typedef struct VkMemoryMapInfo { VkStructureType sType; const void* pNext; VkMemoryMapFlags flags; VkDeviceMemory memory; VkDeviceSize offset; VkDeviceSize size; } VkMemoryMapInfo; typedef struct VkMemoryUnmapInfo { VkStructureType sType; const void* pNext; VkMemoryUnmapFlags flags; VkDeviceMemory memory; } VkMemoryUnmapInfo; typedef struct VkPhysicalDeviceMaintenance5Features { VkStructureType sType; void* pNext; VkBool32 maintenance5; } VkPhysicalDeviceMaintenance5Features; typedef struct VkPhysicalDeviceMaintenance5Properties { VkStructureType sType; void* pNext; VkBool32 earlyFragmentMultisampleCoverageAfterSampleCounting; VkBool32 earlyFragmentSampleMaskTestBeforeSampleCounting; VkBool32 depthStencilSwizzleOneSupport; VkBool32 polygonModePointSize; VkBool32 nonStrictSinglePixelWideLinesUseParallelogram; VkBool32 nonStrictWideLinesUseParallelogram; } VkPhysicalDeviceMaintenance5Properties; typedef struct VkRenderingAreaInfo { VkStructureType sType; const void* pNext; uint32_t viewMask; uint32_t colorAttachmentCount; const VkFormat* pColorAttachmentFormats; VkFormat depthAttachmentFormat; VkFormat stencilAttachmentFormat; } VkRenderingAreaInfo; typedef struct VkImageSubresource2 { VkStructureType sType; void* pNext; VkImageSubresource imageSubresource; } VkImageSubresource2; typedef struct VkDeviceImageSubresourceInfo { VkStructureType sType; const void* pNext; const VkImageCreateInfo* pCreateInfo; const VkImageSubresource2* pSubresource; } VkDeviceImageSubresourceInfo; typedef struct VkSubresourceLayout2 { VkStructureType sType; void* pNext; VkSubresourceLayout subresourceLayout; } VkSubresourceLayout2; typedef struct VkPipelineCreateFlags2CreateInfo { VkStructureType sType; const void* pNext; VkPipelineCreateFlags2 flags; } VkPipelineCreateFlags2CreateInfo; typedef struct VkBufferUsageFlags2CreateInfo { VkStructureType sType; const void* pNext; VkBufferUsageFlags2 usage; } VkBufferUsageFlags2CreateInfo; typedef struct VkPhysicalDevicePushDescriptorProperties { VkStructureType sType; void* pNext; uint32_t maxPushDescriptors; } VkPhysicalDevicePushDescriptorProperties; typedef struct VkPhysicalDeviceDynamicRenderingLocalReadFeatures { VkStructureType sType; void* pNext; VkBool32 dynamicRenderingLocalRead; } VkPhysicalDeviceDynamicRenderingLocalReadFeatures; typedef struct VkRenderingAttachmentLocationInfo { VkStructureType sType; const void* pNext; uint32_t colorAttachmentCount; const uint32_t* pColorAttachmentLocations; } VkRenderingAttachmentLocationInfo; typedef struct VkRenderingInputAttachmentIndexInfo { VkStructureType sType; const void* pNext; uint32_t colorAttachmentCount; const uint32_t* pColorAttachmentInputIndices; const uint32_t* pDepthInputAttachmentIndex; const uint32_t* pStencilInputAttachmentIndex; } VkRenderingInputAttachmentIndexInfo; typedef struct VkPhysicalDeviceMaintenance6Features { VkStructureType sType; void* pNext; VkBool32 maintenance6; } VkPhysicalDeviceMaintenance6Features; typedef struct VkPhysicalDeviceMaintenance6Properties { VkStructureType sType; void* pNext; VkBool32 blockTexelViewCompatibleMultipleLayers; uint32_t maxCombinedImageSamplerDescriptorCount; VkBool32 fragmentShadingRateClampCombinerInputs; } VkPhysicalDeviceMaintenance6Properties; typedef struct VkBindMemoryStatus { VkStructureType sType; const void* pNext; VkResult* pResult; } VkBindMemoryStatus; typedef struct VkBindDescriptorSetsInfo { VkStructureType sType; const void* pNext; VkShaderStageFlags stageFlags; VkPipelineLayout layout; uint32_t firstSet; uint32_t descriptorSetCount; const VkDescriptorSet* pDescriptorSets; uint32_t dynamicOffsetCount; const uint32_t* pDynamicOffsets; } VkBindDescriptorSetsInfo; typedef struct VkPushConstantsInfo { VkStructureType sType; const void* pNext; VkPipelineLayout layout; VkShaderStageFlags stageFlags; uint32_t offset; uint32_t size; const void* pValues; } VkPushConstantsInfo; typedef struct VkPushDescriptorSetInfo { VkStructureType sType; const void* pNext; VkShaderStageFlags stageFlags; VkPipelineLayout layout; uint32_t set; uint32_t descriptorWriteCount; const VkWriteDescriptorSet* pDescriptorWrites; } VkPushDescriptorSetInfo; typedef struct VkPushDescriptorSetWithTemplateInfo { VkStructureType sType; const void* pNext; VkDescriptorUpdateTemplate descriptorUpdateTemplate; VkPipelineLayout layout; uint32_t set; const void* pData; } VkPushDescriptorSetWithTemplateInfo; typedef struct VkPhysicalDevicePipelineProtectedAccessFeatures { VkStructureType sType; void* pNext; VkBool32 pipelineProtectedAccess; } VkPhysicalDevicePipelineProtectedAccessFeatures; typedef struct VkPhysicalDevicePipelineRobustnessFeatures { VkStructureType sType; void* pNext; VkBool32 pipelineRobustness; } VkPhysicalDevicePipelineRobustnessFeatures; typedef struct VkPhysicalDevicePipelineRobustnessProperties { VkStructureType sType; void* pNext; VkPipelineRobustnessBufferBehavior defaultRobustnessStorageBuffers; VkPipelineRobustnessBufferBehavior defaultRobustnessUniformBuffers; VkPipelineRobustnessBufferBehavior defaultRobustnessVertexInputs; VkPipelineRobustnessImageBehavior defaultRobustnessImages; } VkPhysicalDevicePipelineRobustnessProperties; typedef struct VkPipelineRobustnessCreateInfo { VkStructureType sType; const void* pNext; VkPipelineRobustnessBufferBehavior storageBuffers; VkPipelineRobustnessBufferBehavior uniformBuffers; VkPipelineRobustnessBufferBehavior vertexInputs; VkPipelineRobustnessImageBehavior images; } VkPipelineRobustnessCreateInfo; typedef struct VkPhysicalDeviceHostImageCopyFeatures { VkStructureType sType; void* pNext; VkBool32 hostImageCopy; } VkPhysicalDeviceHostImageCopyFeatures; typedef struct VkPhysicalDeviceHostImageCopyProperties { VkStructureType sType; void* pNext; uint32_t copySrcLayoutCount; VkImageLayout* pCopySrcLayouts; uint32_t copyDstLayoutCount; VkImageLayout* pCopyDstLayouts; uint8_t optimalTilingLayoutUUID[VK_UUID_SIZE]; VkBool32 identicalMemoryTypeRequirements; } VkPhysicalDeviceHostImageCopyProperties; typedef struct VkMemoryToImageCopy { VkStructureType sType; const void* pNext; const void* pHostPointer; uint32_t memoryRowLength; uint32_t memoryImageHeight; VkImageSubresourceLayers imageSubresource; VkOffset3D imageOffset; VkExtent3D imageExtent; } VkMemoryToImageCopy; typedef struct VkImageToMemoryCopy { VkStructureType sType; const void* pNext; void* pHostPointer; uint32_t memoryRowLength; uint32_t memoryImageHeight; VkImageSubresourceLayers imageSubresource; VkOffset3D imageOffset; VkExtent3D imageExtent; } VkImageToMemoryCopy; typedef struct VkCopyMemoryToImageInfo { VkStructureType sType; const void* pNext; VkHostImageCopyFlags flags; VkImage dstImage; VkImageLayout dstImageLayout; uint32_t regionCount; const VkMemoryToImageCopy* pRegions; } VkCopyMemoryToImageInfo; typedef struct VkCopyImageToMemoryInfo { VkStructureType sType; const void* pNext; VkHostImageCopyFlags flags; VkImage srcImage; VkImageLayout srcImageLayout; uint32_t regionCount; const VkImageToMemoryCopy* pRegions; } VkCopyImageToMemoryInfo; typedef struct VkCopyImageToImageInfo { VkStructureType sType; const void* pNext; VkHostImageCopyFlags flags; VkImage srcImage; VkImageLayout srcImageLayout; VkImage dstImage; VkImageLayout dstImageLayout; uint32_t regionCount; const VkImageCopy2* pRegions; } VkCopyImageToImageInfo; typedef struct VkHostImageLayoutTransitionInfo { VkStructureType sType; const void* pNext; VkImage image; VkImageLayout oldLayout; VkImageLayout newLayout; VkImageSubresourceRange subresourceRange; } VkHostImageLayoutTransitionInfo; typedef struct VkSubresourceHostMemcpySize { VkStructureType sType; void* pNext; VkDeviceSize size; } VkSubresourceHostMemcpySize; typedef struct VkHostImageCopyDevicePerformanceQuery { VkStructureType sType; void* pNext; VkBool32 optimalDeviceAccess; VkBool32 identicalMemoryLayout; } VkHostImageCopyDevicePerformanceQuery; typedef void (VKAPI_PTR *PFN_vkCmdSetLineStipple)(VkCommandBuffer commandBuffer, uint32_t lineStippleFactor, uint16_t lineStipplePattern); typedef VkResult (VKAPI_PTR *PFN_vkMapMemory2)(VkDevice device, const VkMemoryMapInfo* pMemoryMapInfo, void** ppData); typedef VkResult (VKAPI_PTR *PFN_vkUnmapMemory2)(VkDevice device, const VkMemoryUnmapInfo* pMemoryUnmapInfo); typedef void (VKAPI_PTR *PFN_vkCmdBindIndexBuffer2)(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkDeviceSize size, VkIndexType indexType); typedef void (VKAPI_PTR *PFN_vkGetRenderingAreaGranularity)(VkDevice device, const VkRenderingAreaInfo* pRenderingAreaInfo, VkExtent2D* pGranularity); typedef void (VKAPI_PTR *PFN_vkGetDeviceImageSubresourceLayout)(VkDevice device, const VkDeviceImageSubresourceInfo* pInfo, VkSubresourceLayout2* pLayout); typedef void (VKAPI_PTR *PFN_vkGetImageSubresourceLayout2)(VkDevice device, VkImage image, const VkImageSubresource2* pSubresource, VkSubresourceLayout2* pLayout); typedef void (VKAPI_PTR *PFN_vkCmdPushDescriptorSet)(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, uint32_t set, uint32_t descriptorWriteCount, const VkWriteDescriptorSet* pDescriptorWrites); typedef void (VKAPI_PTR *PFN_vkCmdPushDescriptorSetWithTemplate)(VkCommandBuffer commandBuffer, VkDescriptorUpdateTemplate descriptorUpdateTemplate, VkPipelineLayout layout, uint32_t set, const void* pData); typedef void (VKAPI_PTR *PFN_vkCmdSetRenderingAttachmentLocations)(VkCommandBuffer commandBuffer, const VkRenderingAttachmentLocationInfo* pLocationInfo); typedef void (VKAPI_PTR *PFN_vkCmdSetRenderingInputAttachmentIndices)(VkCommandBuffer commandBuffer, const VkRenderingInputAttachmentIndexInfo* pInputAttachmentIndexInfo); typedef void (VKAPI_PTR *PFN_vkCmdBindDescriptorSets2)(VkCommandBuffer commandBuffer, const VkBindDescriptorSetsInfo* pBindDescriptorSetsInfo); typedef void (VKAPI_PTR *PFN_vkCmdPushConstants2)(VkCommandBuffer commandBuffer, const VkPushConstantsInfo* pPushConstantsInfo); typedef void (VKAPI_PTR *PFN_vkCmdPushDescriptorSet2)(VkCommandBuffer commandBuffer, const VkPushDescriptorSetInfo* pPushDescriptorSetInfo); typedef void (VKAPI_PTR *PFN_vkCmdPushDescriptorSetWithTemplate2)(VkCommandBuffer commandBuffer, const VkPushDescriptorSetWithTemplateInfo* pPushDescriptorSetWithTemplateInfo); typedef VkResult (VKAPI_PTR *PFN_vkCopyMemoryToImage)(VkDevice device, const VkCopyMemoryToImageInfo* pCopyMemoryToImageInfo); typedef VkResult (VKAPI_PTR *PFN_vkCopyImageToMemory)(VkDevice device, const VkCopyImageToMemoryInfo* pCopyImageToMemoryInfo); typedef VkResult (VKAPI_PTR *PFN_vkCopyImageToImage)(VkDevice device, const VkCopyImageToImageInfo* pCopyImageToImageInfo); typedef VkResult (VKAPI_PTR *PFN_vkTransitionImageLayout)(VkDevice device, uint32_t transitionCount, const VkHostImageLayoutTransitionInfo* pTransitions); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR void VKAPI_CALL vkCmdSetLineStipple( VkCommandBuffer commandBuffer, uint32_t lineStippleFactor, uint16_t lineStipplePattern); VKAPI_ATTR VkResult VKAPI_CALL vkMapMemory2( VkDevice device, const VkMemoryMapInfo* pMemoryMapInfo, void** ppData); VKAPI_ATTR VkResult VKAPI_CALL vkUnmapMemory2( VkDevice device, const VkMemoryUnmapInfo* pMemoryUnmapInfo); VKAPI_ATTR void VKAPI_CALL vkCmdBindIndexBuffer2( VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkDeviceSize size, VkIndexType indexType); VKAPI_ATTR void VKAPI_CALL vkGetRenderingAreaGranularity( VkDevice device, const VkRenderingAreaInfo* pRenderingAreaInfo, VkExtent2D* pGranularity); VKAPI_ATTR void VKAPI_CALL vkGetDeviceImageSubresourceLayout( VkDevice device, const VkDeviceImageSubresourceInfo* pInfo, VkSubresourceLayout2* pLayout); VKAPI_ATTR void VKAPI_CALL vkGetImageSubresourceLayout2( VkDevice device, VkImage image, const VkImageSubresource2* pSubresource, VkSubresourceLayout2* pLayout); VKAPI_ATTR void VKAPI_CALL vkCmdPushDescriptorSet( VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, uint32_t set, uint32_t descriptorWriteCount, const VkWriteDescriptorSet* pDescriptorWrites); VKAPI_ATTR void VKAPI_CALL vkCmdPushDescriptorSetWithTemplate( VkCommandBuffer commandBuffer, VkDescriptorUpdateTemplate descriptorUpdateTemplate, VkPipelineLayout layout, uint32_t set, const void* pData); VKAPI_ATTR void VKAPI_CALL vkCmdSetRenderingAttachmentLocations( VkCommandBuffer commandBuffer, const VkRenderingAttachmentLocationInfo* pLocationInfo); VKAPI_ATTR void VKAPI_CALL vkCmdSetRenderingInputAttachmentIndices( VkCommandBuffer commandBuffer, const VkRenderingInputAttachmentIndexInfo* pInputAttachmentIndexInfo); VKAPI_ATTR void VKAPI_CALL vkCmdBindDescriptorSets2( VkCommandBuffer commandBuffer, const VkBindDescriptorSetsInfo* pBindDescriptorSetsInfo); VKAPI_ATTR void VKAPI_CALL vkCmdPushConstants2( VkCommandBuffer commandBuffer, const VkPushConstantsInfo* pPushConstantsInfo); VKAPI_ATTR void VKAPI_CALL vkCmdPushDescriptorSet2( VkCommandBuffer commandBuffer, const VkPushDescriptorSetInfo* pPushDescriptorSetInfo); VKAPI_ATTR void VKAPI_CALL vkCmdPushDescriptorSetWithTemplate2( VkCommandBuffer commandBuffer, const VkPushDescriptorSetWithTemplateInfo* pPushDescriptorSetWithTemplateInfo); VKAPI_ATTR VkResult VKAPI_CALL vkCopyMemoryToImage( VkDevice device, const VkCopyMemoryToImageInfo* pCopyMemoryToImageInfo); VKAPI_ATTR VkResult VKAPI_CALL vkCopyImageToMemory( VkDevice device, const VkCopyImageToMemoryInfo* pCopyImageToMemoryInfo); VKAPI_ATTR VkResult VKAPI_CALL vkCopyImageToImage( VkDevice device, const VkCopyImageToImageInfo* pCopyImageToImageInfo); VKAPI_ATTR VkResult VKAPI_CALL vkTransitionImageLayout( VkDevice device, uint32_t transitionCount, const VkHostImageLayoutTransitionInfo* pTransitions); #endif // VK_KHR_surface is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_surface 1 VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSurfaceKHR) #define VK_KHR_SURFACE_SPEC_VERSION 25 #define VK_KHR_SURFACE_EXTENSION_NAME "VK_KHR_surface" typedef enum VkPresentModeKHR { VK_PRESENT_MODE_IMMEDIATE_KHR = 0, VK_PRESENT_MODE_MAILBOX_KHR = 1, VK_PRESENT_MODE_FIFO_KHR = 2, VK_PRESENT_MODE_FIFO_RELAXED_KHR = 3, VK_PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR = 1000111000, VK_PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR = 1000111001, VK_PRESENT_MODE_FIFO_LATEST_READY_EXT = 1000361000, VK_PRESENT_MODE_MAX_ENUM_KHR = 0x7FFFFFFF } VkPresentModeKHR; typedef enum VkColorSpaceKHR { VK_COLOR_SPACE_SRGB_NONLINEAR_KHR = 0, VK_COLOR_SPACE_DISPLAY_P3_NONLINEAR_EXT = 1000104001, VK_COLOR_SPACE_EXTENDED_SRGB_LINEAR_EXT = 1000104002, VK_COLOR_SPACE_DISPLAY_P3_LINEAR_EXT = 1000104003, VK_COLOR_SPACE_DCI_P3_NONLINEAR_EXT = 1000104004, VK_COLOR_SPACE_BT709_LINEAR_EXT = 1000104005, VK_COLOR_SPACE_BT709_NONLINEAR_EXT = 1000104006, VK_COLOR_SPACE_BT2020_LINEAR_EXT = 1000104007, VK_COLOR_SPACE_HDR10_ST2084_EXT = 1000104008, // VK_COLOR_SPACE_DOLBYVISION_EXT is deprecated, but no reason was given in the API XML VK_COLOR_SPACE_DOLBYVISION_EXT = 1000104009, VK_COLOR_SPACE_HDR10_HLG_EXT = 1000104010, VK_COLOR_SPACE_ADOBERGB_LINEAR_EXT = 1000104011, VK_COLOR_SPACE_ADOBERGB_NONLINEAR_EXT = 1000104012, VK_COLOR_SPACE_PASS_THROUGH_EXT = 1000104013, VK_COLOR_SPACE_EXTENDED_SRGB_NONLINEAR_EXT = 1000104014, VK_COLOR_SPACE_DISPLAY_NATIVE_AMD = 1000213000, // VK_COLORSPACE_SRGB_NONLINEAR_KHR is a deprecated alias VK_COLORSPACE_SRGB_NONLINEAR_KHR = VK_COLOR_SPACE_SRGB_NONLINEAR_KHR, // VK_COLOR_SPACE_DCI_P3_LINEAR_EXT is a deprecated alias VK_COLOR_SPACE_DCI_P3_LINEAR_EXT = VK_COLOR_SPACE_DISPLAY_P3_LINEAR_EXT, VK_COLOR_SPACE_MAX_ENUM_KHR = 0x7FFFFFFF } VkColorSpaceKHR; typedef enum VkSurfaceTransformFlagBitsKHR { VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR = 0x00000001, VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR = 0x00000002, VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR = 0x00000004, VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR = 0x00000008, VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_BIT_KHR = 0x00000010, VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_90_BIT_KHR = 0x00000020, VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_180_BIT_KHR = 0x00000040, VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR = 0x00000080, VK_SURFACE_TRANSFORM_INHERIT_BIT_KHR = 0x00000100, VK_SURFACE_TRANSFORM_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF } VkSurfaceTransformFlagBitsKHR; typedef enum VkCompositeAlphaFlagBitsKHR { VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR = 0x00000001, VK_COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR = 0x00000002, VK_COMPOSITE_ALPHA_POST_MULTIPLIED_BIT_KHR = 0x00000004, VK_COMPOSITE_ALPHA_INHERIT_BIT_KHR = 0x00000008, VK_COMPOSITE_ALPHA_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF } VkCompositeAlphaFlagBitsKHR; typedef VkFlags VkCompositeAlphaFlagsKHR; typedef VkFlags VkSurfaceTransformFlagsKHR; typedef struct VkSurfaceCapabilitiesKHR { uint32_t minImageCount; uint32_t maxImageCount; VkExtent2D currentExtent; VkExtent2D minImageExtent; VkExtent2D maxImageExtent; uint32_t maxImageArrayLayers; VkSurfaceTransformFlagsKHR supportedTransforms; VkSurfaceTransformFlagBitsKHR currentTransform; VkCompositeAlphaFlagsKHR supportedCompositeAlpha; VkImageUsageFlags supportedUsageFlags; } VkSurfaceCapabilitiesKHR; typedef struct VkSurfaceFormatKHR { VkFormat format; VkColorSpaceKHR colorSpace; } VkSurfaceFormatKHR; typedef void (VKAPI_PTR *PFN_vkDestroySurfaceKHR)(VkInstance instance, VkSurfaceKHR surface, const VkAllocationCallbacks* pAllocator); typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceSurfaceSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, VkSurfaceKHR surface, VkBool32* pSupported); typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR)(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, VkSurfaceCapabilitiesKHR* pSurfaceCapabilities); typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceSurfaceFormatsKHR)(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, uint32_t* pSurfaceFormatCount, VkSurfaceFormatKHR* pSurfaceFormats); typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceSurfacePresentModesKHR)(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, uint32_t* pPresentModeCount, VkPresentModeKHR* pPresentModes); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR void VKAPI_CALL vkDestroySurfaceKHR( VkInstance instance, VkSurfaceKHR surface, const VkAllocationCallbacks* pAllocator); VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfaceSupportKHR( VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, VkSurfaceKHR surface, VkBool32* pSupported); VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfaceCapabilitiesKHR( VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, VkSurfaceCapabilitiesKHR* pSurfaceCapabilities); VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfaceFormatsKHR( VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, uint32_t* pSurfaceFormatCount, VkSurfaceFormatKHR* pSurfaceFormats); VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfacePresentModesKHR( VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, uint32_t* pPresentModeCount, VkPresentModeKHR* pPresentModes); #endif // VK_KHR_swapchain is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_swapchain 1 VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSwapchainKHR) #define VK_KHR_SWAPCHAIN_SPEC_VERSION 70 #define VK_KHR_SWAPCHAIN_EXTENSION_NAME "VK_KHR_swapchain" typedef enum VkSwapchainCreateFlagBitsKHR { VK_SWAPCHAIN_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT_KHR = 0x00000001, VK_SWAPCHAIN_CREATE_PROTECTED_BIT_KHR = 0x00000002, VK_SWAPCHAIN_CREATE_MUTABLE_FORMAT_BIT_KHR = 0x00000004, VK_SWAPCHAIN_CREATE_DEFERRED_MEMORY_ALLOCATION_BIT_EXT = 0x00000008, VK_SWAPCHAIN_CREATE_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF } VkSwapchainCreateFlagBitsKHR; typedef VkFlags VkSwapchainCreateFlagsKHR; typedef enum VkDeviceGroupPresentModeFlagBitsKHR { VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_BIT_KHR = 0x00000001, VK_DEVICE_GROUP_PRESENT_MODE_REMOTE_BIT_KHR = 0x00000002, VK_DEVICE_GROUP_PRESENT_MODE_SUM_BIT_KHR = 0x00000004, VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_MULTI_DEVICE_BIT_KHR = 0x00000008, VK_DEVICE_GROUP_PRESENT_MODE_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF } VkDeviceGroupPresentModeFlagBitsKHR; typedef VkFlags VkDeviceGroupPresentModeFlagsKHR; typedef struct VkSwapchainCreateInfoKHR { VkStructureType sType; const void* pNext; VkSwapchainCreateFlagsKHR flags; VkSurfaceKHR surface; uint32_t minImageCount; VkFormat imageFormat; VkColorSpaceKHR imageColorSpace; VkExtent2D imageExtent; uint32_t imageArrayLayers; VkImageUsageFlags imageUsage; VkSharingMode imageSharingMode; uint32_t queueFamilyIndexCount; const uint32_t* pQueueFamilyIndices; VkSurfaceTransformFlagBitsKHR preTransform; VkCompositeAlphaFlagBitsKHR compositeAlpha; VkPresentModeKHR presentMode; VkBool32 clipped; VkSwapchainKHR oldSwapchain; } VkSwapchainCreateInfoKHR; typedef struct VkPresentInfoKHR { VkStructureType sType; const void* pNext; uint32_t waitSemaphoreCount; const VkSemaphore* pWaitSemaphores; uint32_t swapchainCount; const VkSwapchainKHR* pSwapchains; const uint32_t* pImageIndices; VkResult* pResults; } VkPresentInfoKHR; typedef struct VkImageSwapchainCreateInfoKHR { VkStructureType sType; const void* pNext; VkSwapchainKHR swapchain; } VkImageSwapchainCreateInfoKHR; typedef struct VkBindImageMemorySwapchainInfoKHR { VkStructureType sType; const void* pNext; VkSwapchainKHR swapchain; uint32_t imageIndex; } VkBindImageMemorySwapchainInfoKHR; typedef struct VkAcquireNextImageInfoKHR { VkStructureType sType; const void* pNext; VkSwapchainKHR swapchain; uint64_t timeout; VkSemaphore semaphore; VkFence fence; uint32_t deviceMask; } VkAcquireNextImageInfoKHR; typedef struct VkDeviceGroupPresentCapabilitiesKHR { VkStructureType sType; void* pNext; uint32_t presentMask[VK_MAX_DEVICE_GROUP_SIZE]; VkDeviceGroupPresentModeFlagsKHR modes; } VkDeviceGroupPresentCapabilitiesKHR; typedef struct VkDeviceGroupPresentInfoKHR { VkStructureType sType; const void* pNext; uint32_t swapchainCount; const uint32_t* pDeviceMasks; VkDeviceGroupPresentModeFlagBitsKHR mode; } VkDeviceGroupPresentInfoKHR; typedef struct VkDeviceGroupSwapchainCreateInfoKHR { VkStructureType sType; const void* pNext; VkDeviceGroupPresentModeFlagsKHR modes; } VkDeviceGroupSwapchainCreateInfoKHR; typedef VkResult (VKAPI_PTR *PFN_vkCreateSwapchainKHR)(VkDevice device, const VkSwapchainCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSwapchainKHR* pSwapchain); typedef void (VKAPI_PTR *PFN_vkDestroySwapchainKHR)(VkDevice device, VkSwapchainKHR swapchain, const VkAllocationCallbacks* pAllocator); typedef VkResult (VKAPI_PTR *PFN_vkGetSwapchainImagesKHR)(VkDevice device, VkSwapchainKHR swapchain, uint32_t* pSwapchainImageCount, VkImage* pSwapchainImages); typedef VkResult (VKAPI_PTR *PFN_vkAcquireNextImageKHR)(VkDevice device, VkSwapchainKHR swapchain, uint64_t timeout, VkSemaphore semaphore, VkFence fence, uint32_t* pImageIndex); typedef VkResult (VKAPI_PTR *PFN_vkQueuePresentKHR)(VkQueue queue, const VkPresentInfoKHR* pPresentInfo); typedef VkResult (VKAPI_PTR *PFN_vkGetDeviceGroupPresentCapabilitiesKHR)(VkDevice device, VkDeviceGroupPresentCapabilitiesKHR* pDeviceGroupPresentCapabilities); typedef VkResult (VKAPI_PTR *PFN_vkGetDeviceGroupSurfacePresentModesKHR)(VkDevice device, VkSurfaceKHR surface, VkDeviceGroupPresentModeFlagsKHR* pModes); typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDevicePresentRectanglesKHR)(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, uint32_t* pRectCount, VkRect2D* pRects); typedef VkResult (VKAPI_PTR *PFN_vkAcquireNextImage2KHR)(VkDevice device, const VkAcquireNextImageInfoKHR* pAcquireInfo, uint32_t* pImageIndex); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkCreateSwapchainKHR( VkDevice device, const VkSwapchainCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSwapchainKHR* pSwapchain); VKAPI_ATTR void VKAPI_CALL vkDestroySwapchainKHR( VkDevice device, VkSwapchainKHR swapchain, const VkAllocationCallbacks* pAllocator); VKAPI_ATTR VkResult VKAPI_CALL vkGetSwapchainImagesKHR( VkDevice device, VkSwapchainKHR swapchain, uint32_t* pSwapchainImageCount, VkImage* pSwapchainImages); VKAPI_ATTR VkResult VKAPI_CALL vkAcquireNextImageKHR( VkDevice device, VkSwapchainKHR swapchain, uint64_t timeout, VkSemaphore semaphore, VkFence fence, uint32_t* pImageIndex); VKAPI_ATTR VkResult VKAPI_CALL vkQueuePresentKHR( VkQueue queue, const VkPresentInfoKHR* pPresentInfo); VKAPI_ATTR VkResult VKAPI_CALL vkGetDeviceGroupPresentCapabilitiesKHR( VkDevice device, VkDeviceGroupPresentCapabilitiesKHR* pDeviceGroupPresentCapabilities); VKAPI_ATTR VkResult VKAPI_CALL vkGetDeviceGroupSurfacePresentModesKHR( VkDevice device, VkSurfaceKHR surface, VkDeviceGroupPresentModeFlagsKHR* pModes); VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDevicePresentRectanglesKHR( VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, uint32_t* pRectCount, VkRect2D* pRects); VKAPI_ATTR VkResult VKAPI_CALL vkAcquireNextImage2KHR( VkDevice device, const VkAcquireNextImageInfoKHR* pAcquireInfo, uint32_t* pImageIndex); #endif // VK_KHR_display is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_display 1 VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDisplayKHR) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDisplayModeKHR) #define VK_KHR_DISPLAY_SPEC_VERSION 23 #define VK_KHR_DISPLAY_EXTENSION_NAME "VK_KHR_display" typedef VkFlags VkDisplayModeCreateFlagsKHR; typedef enum VkDisplayPlaneAlphaFlagBitsKHR { VK_DISPLAY_PLANE_ALPHA_OPAQUE_BIT_KHR = 0x00000001, VK_DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR = 0x00000002, VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_BIT_KHR = 0x00000004, VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_PREMULTIPLIED_BIT_KHR = 0x00000008, VK_DISPLAY_PLANE_ALPHA_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF } VkDisplayPlaneAlphaFlagBitsKHR; typedef VkFlags VkDisplayPlaneAlphaFlagsKHR; typedef VkFlags VkDisplaySurfaceCreateFlagsKHR; typedef struct VkDisplayModeParametersKHR { VkExtent2D visibleRegion; uint32_t refreshRate; } VkDisplayModeParametersKHR; typedef struct VkDisplayModeCreateInfoKHR { VkStructureType sType; const void* pNext; VkDisplayModeCreateFlagsKHR flags; VkDisplayModeParametersKHR parameters; } VkDisplayModeCreateInfoKHR; typedef struct VkDisplayModePropertiesKHR { VkDisplayModeKHR displayMode; VkDisplayModeParametersKHR parameters; } VkDisplayModePropertiesKHR; typedef struct VkDisplayPlaneCapabilitiesKHR { VkDisplayPlaneAlphaFlagsKHR supportedAlpha; VkOffset2D minSrcPosition; VkOffset2D maxSrcPosition; VkExtent2D minSrcExtent; VkExtent2D maxSrcExtent; VkOffset2D minDstPosition; VkOffset2D maxDstPosition; VkExtent2D minDstExtent; VkExtent2D maxDstExtent; } VkDisplayPlaneCapabilitiesKHR; typedef struct VkDisplayPlanePropertiesKHR { VkDisplayKHR currentDisplay; uint32_t currentStackIndex; } VkDisplayPlanePropertiesKHR; typedef struct VkDisplayPropertiesKHR { VkDisplayKHR display; const char* displayName; VkExtent2D physicalDimensions; VkExtent2D physicalResolution; VkSurfaceTransformFlagsKHR supportedTransforms; VkBool32 planeReorderPossible; VkBool32 persistentContent; } VkDisplayPropertiesKHR; typedef struct VkDisplaySurfaceCreateInfoKHR { VkStructureType sType; const void* pNext; VkDisplaySurfaceCreateFlagsKHR flags; VkDisplayModeKHR displayMode; uint32_t planeIndex; uint32_t planeStackIndex; VkSurfaceTransformFlagBitsKHR transform; float globalAlpha; VkDisplayPlaneAlphaFlagBitsKHR alphaMode; VkExtent2D imageExtent; } VkDisplaySurfaceCreateInfoKHR; typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceDisplayPropertiesKHR)(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkDisplayPropertiesKHR* pProperties); typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceDisplayPlanePropertiesKHR)(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkDisplayPlanePropertiesKHR* pProperties); typedef VkResult (VKAPI_PTR *PFN_vkGetDisplayPlaneSupportedDisplaysKHR)(VkPhysicalDevice physicalDevice, uint32_t planeIndex, uint32_t* pDisplayCount, VkDisplayKHR* pDisplays); typedef VkResult (VKAPI_PTR *PFN_vkGetDisplayModePropertiesKHR)(VkPhysicalDevice physicalDevice, VkDisplayKHR display, uint32_t* pPropertyCount, VkDisplayModePropertiesKHR* pProperties); typedef VkResult (VKAPI_PTR *PFN_vkCreateDisplayModeKHR)(VkPhysicalDevice physicalDevice, VkDisplayKHR display, const VkDisplayModeCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDisplayModeKHR* pMode); typedef VkResult (VKAPI_PTR *PFN_vkGetDisplayPlaneCapabilitiesKHR)(VkPhysicalDevice physicalDevice, VkDisplayModeKHR mode, uint32_t planeIndex, VkDisplayPlaneCapabilitiesKHR* pCapabilities); typedef VkResult (VKAPI_PTR *PFN_vkCreateDisplayPlaneSurfaceKHR)(VkInstance instance, const VkDisplaySurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceDisplayPropertiesKHR( VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkDisplayPropertiesKHR* pProperties); VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceDisplayPlanePropertiesKHR( VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkDisplayPlanePropertiesKHR* pProperties); VKAPI_ATTR VkResult VKAPI_CALL vkGetDisplayPlaneSupportedDisplaysKHR( VkPhysicalDevice physicalDevice, uint32_t planeIndex, uint32_t* pDisplayCount, VkDisplayKHR* pDisplays); VKAPI_ATTR VkResult VKAPI_CALL vkGetDisplayModePropertiesKHR( VkPhysicalDevice physicalDevice, VkDisplayKHR display, uint32_t* pPropertyCount, VkDisplayModePropertiesKHR* pProperties); VKAPI_ATTR VkResult VKAPI_CALL vkCreateDisplayModeKHR( VkPhysicalDevice physicalDevice, VkDisplayKHR display, const VkDisplayModeCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDisplayModeKHR* pMode); VKAPI_ATTR VkResult VKAPI_CALL vkGetDisplayPlaneCapabilitiesKHR( VkPhysicalDevice physicalDevice, VkDisplayModeKHR mode, uint32_t planeIndex, VkDisplayPlaneCapabilitiesKHR* pCapabilities); VKAPI_ATTR VkResult VKAPI_CALL vkCreateDisplayPlaneSurfaceKHR( VkInstance instance, const VkDisplaySurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); #endif // VK_KHR_display_swapchain is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_display_swapchain 1 #define VK_KHR_DISPLAY_SWAPCHAIN_SPEC_VERSION 10 #define VK_KHR_DISPLAY_SWAPCHAIN_EXTENSION_NAME "VK_KHR_display_swapchain" typedef struct VkDisplayPresentInfoKHR { VkStructureType sType; const void* pNext; VkRect2D srcRect; VkRect2D dstRect; VkBool32 persistent; } VkDisplayPresentInfoKHR; typedef VkResult (VKAPI_PTR *PFN_vkCreateSharedSwapchainsKHR)(VkDevice device, uint32_t swapchainCount, const VkSwapchainCreateInfoKHR* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkSwapchainKHR* pSwapchains); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkCreateSharedSwapchainsKHR( VkDevice device, uint32_t swapchainCount, const VkSwapchainCreateInfoKHR* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkSwapchainKHR* pSwapchains); #endif // VK_KHR_sampler_mirror_clamp_to_edge is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_sampler_mirror_clamp_to_edge 1 #define VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_SPEC_VERSION 3 #define VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_EXTENSION_NAME "VK_KHR_sampler_mirror_clamp_to_edge" // VK_KHR_video_queue is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_video_queue 1 VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkVideoSessionKHR) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkVideoSessionParametersKHR) #define VK_KHR_VIDEO_QUEUE_SPEC_VERSION 8 #define VK_KHR_VIDEO_QUEUE_EXTENSION_NAME "VK_KHR_video_queue" typedef enum VkQueryResultStatusKHR { VK_QUERY_RESULT_STATUS_ERROR_KHR = -1, VK_QUERY_RESULT_STATUS_NOT_READY_KHR = 0, VK_QUERY_RESULT_STATUS_COMPLETE_KHR = 1, VK_QUERY_RESULT_STATUS_INSUFFICIENT_BITSTREAM_BUFFER_RANGE_KHR = -1000299000, VK_QUERY_RESULT_STATUS_MAX_ENUM_KHR = 0x7FFFFFFF } VkQueryResultStatusKHR; typedef enum VkVideoCodecOperationFlagBitsKHR { VK_VIDEO_CODEC_OPERATION_NONE_KHR = 0, VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR = 0x00010000, VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR = 0x00020000, VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR = 0x00000001, VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR = 0x00000002, VK_VIDEO_CODEC_OPERATION_DECODE_AV1_BIT_KHR = 0x00000004, VK_VIDEO_CODEC_OPERATION_ENCODE_AV1_BIT_KHR = 0x00040000, VK_VIDEO_CODEC_OPERATION_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF } VkVideoCodecOperationFlagBitsKHR; typedef VkFlags VkVideoCodecOperationFlagsKHR; typedef enum VkVideoChromaSubsamplingFlagBitsKHR { VK_VIDEO_CHROMA_SUBSAMPLING_INVALID_KHR = 0, VK_VIDEO_CHROMA_SUBSAMPLING_MONOCHROME_BIT_KHR = 0x00000001, VK_VIDEO_CHROMA_SUBSAMPLING_420_BIT_KHR = 0x00000002, VK_VIDEO_CHROMA_SUBSAMPLING_422_BIT_KHR = 0x00000004, VK_VIDEO_CHROMA_SUBSAMPLING_444_BIT_KHR = 0x00000008, VK_VIDEO_CHROMA_SUBSAMPLING_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF } VkVideoChromaSubsamplingFlagBitsKHR; typedef VkFlags VkVideoChromaSubsamplingFlagsKHR; typedef enum VkVideoComponentBitDepthFlagBitsKHR { VK_VIDEO_COMPONENT_BIT_DEPTH_INVALID_KHR = 0, VK_VIDEO_COMPONENT_BIT_DEPTH_8_BIT_KHR = 0x00000001, VK_VIDEO_COMPONENT_BIT_DEPTH_10_BIT_KHR = 0x00000004, VK_VIDEO_COMPONENT_BIT_DEPTH_12_BIT_KHR = 0x00000010, VK_VIDEO_COMPONENT_BIT_DEPTH_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF } VkVideoComponentBitDepthFlagBitsKHR; typedef VkFlags VkVideoComponentBitDepthFlagsKHR; typedef enum VkVideoCapabilityFlagBitsKHR { VK_VIDEO_CAPABILITY_PROTECTED_CONTENT_BIT_KHR = 0x00000001, VK_VIDEO_CAPABILITY_SEPARATE_REFERENCE_IMAGES_BIT_KHR = 0x00000002, VK_VIDEO_CAPABILITY_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF } VkVideoCapabilityFlagBitsKHR; typedef VkFlags VkVideoCapabilityFlagsKHR; typedef enum VkVideoSessionCreateFlagBitsKHR { VK_VIDEO_SESSION_CREATE_PROTECTED_CONTENT_BIT_KHR = 0x00000001, VK_VIDEO_SESSION_CREATE_ALLOW_ENCODE_PARAMETER_OPTIMIZATIONS_BIT_KHR = 0x00000002, VK_VIDEO_SESSION_CREATE_INLINE_QUERIES_BIT_KHR = 0x00000004, VK_VIDEO_SESSION_CREATE_ALLOW_ENCODE_QUANTIZATION_DELTA_MAP_BIT_KHR = 0x00000008, VK_VIDEO_SESSION_CREATE_ALLOW_ENCODE_EMPHASIS_MAP_BIT_KHR = 0x00000010, VK_VIDEO_SESSION_CREATE_INLINE_SESSION_PARAMETERS_BIT_KHR = 0x00000020, VK_VIDEO_SESSION_CREATE_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF } VkVideoSessionCreateFlagBitsKHR; typedef VkFlags VkVideoSessionCreateFlagsKHR; typedef enum VkVideoSessionParametersCreateFlagBitsKHR { VK_VIDEO_SESSION_PARAMETERS_CREATE_QUANTIZATION_MAP_COMPATIBLE_BIT_KHR = 0x00000001, VK_VIDEO_SESSION_PARAMETERS_CREATE_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF } VkVideoSessionParametersCreateFlagBitsKHR; typedef VkFlags VkVideoSessionParametersCreateFlagsKHR; typedef VkFlags VkVideoBeginCodingFlagsKHR; typedef VkFlags VkVideoEndCodingFlagsKHR; typedef enum VkVideoCodingControlFlagBitsKHR { VK_VIDEO_CODING_CONTROL_RESET_BIT_KHR = 0x00000001, VK_VIDEO_CODING_CONTROL_ENCODE_RATE_CONTROL_BIT_KHR = 0x00000002, VK_VIDEO_CODING_CONTROL_ENCODE_QUALITY_LEVEL_BIT_KHR = 0x00000004, VK_VIDEO_CODING_CONTROL_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF } VkVideoCodingControlFlagBitsKHR; typedef VkFlags VkVideoCodingControlFlagsKHR; typedef struct VkQueueFamilyQueryResultStatusPropertiesKHR { VkStructureType sType; void* pNext; VkBool32 queryResultStatusSupport; } VkQueueFamilyQueryResultStatusPropertiesKHR; typedef struct VkQueueFamilyVideoPropertiesKHR { VkStructureType sType; void* pNext; VkVideoCodecOperationFlagsKHR videoCodecOperations; } VkQueueFamilyVideoPropertiesKHR; typedef struct VkVideoProfileInfoKHR { VkStructureType sType; const void* pNext; VkVideoCodecOperationFlagBitsKHR videoCodecOperation; VkVideoChromaSubsamplingFlagsKHR chromaSubsampling; VkVideoComponentBitDepthFlagsKHR lumaBitDepth; VkVideoComponentBitDepthFlagsKHR chromaBitDepth; } VkVideoProfileInfoKHR; typedef struct VkVideoProfileListInfoKHR { VkStructureType sType; const void* pNext; uint32_t profileCount; const VkVideoProfileInfoKHR* pProfiles; } VkVideoProfileListInfoKHR; typedef struct VkVideoCapabilitiesKHR { VkStructureType sType; void* pNext; VkVideoCapabilityFlagsKHR flags; VkDeviceSize minBitstreamBufferOffsetAlignment; VkDeviceSize minBitstreamBufferSizeAlignment; VkExtent2D pictureAccessGranularity; VkExtent2D minCodedExtent; VkExtent2D maxCodedExtent; uint32_t maxDpbSlots; uint32_t maxActiveReferencePictures; VkExtensionProperties stdHeaderVersion; } VkVideoCapabilitiesKHR; typedef struct VkPhysicalDeviceVideoFormatInfoKHR { VkStructureType sType; const void* pNext; VkImageUsageFlags imageUsage; } VkPhysicalDeviceVideoFormatInfoKHR; typedef struct VkVideoFormatPropertiesKHR { VkStructureType sType; void* pNext; VkFormat format; VkComponentMapping componentMapping; VkImageCreateFlags imageCreateFlags; VkImageType imageType; VkImageTiling imageTiling; VkImageUsageFlags imageUsageFlags; } VkVideoFormatPropertiesKHR; typedef struct VkVideoPictureResourceInfoKHR { VkStructureType sType; const void* pNext; VkOffset2D codedOffset; VkExtent2D codedExtent; uint32_t baseArrayLayer; VkImageView imageViewBinding; } VkVideoPictureResourceInfoKHR; typedef struct VkVideoReferenceSlotInfoKHR { VkStructureType sType; const void* pNext; int32_t slotIndex; const VkVideoPictureResourceInfoKHR* pPictureResource; } VkVideoReferenceSlotInfoKHR; typedef struct VkVideoSessionMemoryRequirementsKHR { VkStructureType sType; void* pNext; uint32_t memoryBindIndex; VkMemoryRequirements memoryRequirements; } VkVideoSessionMemoryRequirementsKHR; typedef struct VkBindVideoSessionMemoryInfoKHR { VkStructureType sType; const void* pNext; uint32_t memoryBindIndex; VkDeviceMemory memory; VkDeviceSize memoryOffset; VkDeviceSize memorySize; } VkBindVideoSessionMemoryInfoKHR; typedef struct VkVideoSessionCreateInfoKHR { VkStructureType sType; const void* pNext; uint32_t queueFamilyIndex; VkVideoSessionCreateFlagsKHR flags; const VkVideoProfileInfoKHR* pVideoProfile; VkFormat pictureFormat; VkExtent2D maxCodedExtent; VkFormat referencePictureFormat; uint32_t maxDpbSlots; uint32_t maxActiveReferencePictures; const VkExtensionProperties* pStdHeaderVersion; } VkVideoSessionCreateInfoKHR; typedef struct VkVideoSessionParametersCreateInfoKHR { VkStructureType sType; const void* pNext; VkVideoSessionParametersCreateFlagsKHR flags; VkVideoSessionParametersKHR videoSessionParametersTemplate; VkVideoSessionKHR videoSession; } VkVideoSessionParametersCreateInfoKHR; typedef struct VkVideoSessionParametersUpdateInfoKHR { VkStructureType sType; const void* pNext; uint32_t updateSequenceCount; } VkVideoSessionParametersUpdateInfoKHR; typedef struct VkVideoBeginCodingInfoKHR { VkStructureType sType; const void* pNext; VkVideoBeginCodingFlagsKHR flags; VkVideoSessionKHR videoSession; VkVideoSessionParametersKHR videoSessionParameters; uint32_t referenceSlotCount; const VkVideoReferenceSlotInfoKHR* pReferenceSlots; } VkVideoBeginCodingInfoKHR; typedef struct VkVideoEndCodingInfoKHR { VkStructureType sType; const void* pNext; VkVideoEndCodingFlagsKHR flags; } VkVideoEndCodingInfoKHR; typedef struct VkVideoCodingControlInfoKHR { VkStructureType sType; const void* pNext; VkVideoCodingControlFlagsKHR flags; } VkVideoCodingControlInfoKHR; typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceVideoCapabilitiesKHR)(VkPhysicalDevice physicalDevice, const VkVideoProfileInfoKHR* pVideoProfile, VkVideoCapabilitiesKHR* pCapabilities); typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceVideoFormatPropertiesKHR)(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceVideoFormatInfoKHR* pVideoFormatInfo, uint32_t* pVideoFormatPropertyCount, VkVideoFormatPropertiesKHR* pVideoFormatProperties); typedef VkResult (VKAPI_PTR *PFN_vkCreateVideoSessionKHR)(VkDevice device, const VkVideoSessionCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkVideoSessionKHR* pVideoSession); typedef void (VKAPI_PTR *PFN_vkDestroyVideoSessionKHR)(VkDevice device, VkVideoSessionKHR videoSession, const VkAllocationCallbacks* pAllocator); typedef VkResult (VKAPI_PTR *PFN_vkGetVideoSessionMemoryRequirementsKHR)(VkDevice device, VkVideoSessionKHR videoSession, uint32_t* pMemoryRequirementsCount, VkVideoSessionMemoryRequirementsKHR* pMemoryRequirements); typedef VkResult (VKAPI_PTR *PFN_vkBindVideoSessionMemoryKHR)(VkDevice device, VkVideoSessionKHR videoSession, uint32_t bindSessionMemoryInfoCount, const VkBindVideoSessionMemoryInfoKHR* pBindSessionMemoryInfos); typedef VkResult (VKAPI_PTR *PFN_vkCreateVideoSessionParametersKHR)(VkDevice device, const VkVideoSessionParametersCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkVideoSessionParametersKHR* pVideoSessionParameters); typedef VkResult (VKAPI_PTR *PFN_vkUpdateVideoSessionParametersKHR)(VkDevice device, VkVideoSessionParametersKHR videoSessionParameters, const VkVideoSessionParametersUpdateInfoKHR* pUpdateInfo); typedef void (VKAPI_PTR *PFN_vkDestroyVideoSessionParametersKHR)(VkDevice device, VkVideoSessionParametersKHR videoSessionParameters, const VkAllocationCallbacks* pAllocator); typedef void (VKAPI_PTR *PFN_vkCmdBeginVideoCodingKHR)(VkCommandBuffer commandBuffer, const VkVideoBeginCodingInfoKHR* pBeginInfo); typedef void (VKAPI_PTR *PFN_vkCmdEndVideoCodingKHR)(VkCommandBuffer commandBuffer, const VkVideoEndCodingInfoKHR* pEndCodingInfo); typedef void (VKAPI_PTR *PFN_vkCmdControlVideoCodingKHR)(VkCommandBuffer commandBuffer, const VkVideoCodingControlInfoKHR* pCodingControlInfo); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceVideoCapabilitiesKHR( VkPhysicalDevice physicalDevice, const VkVideoProfileInfoKHR* pVideoProfile, VkVideoCapabilitiesKHR* pCapabilities); VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceVideoFormatPropertiesKHR( VkPhysicalDevice physicalDevice, const VkPhysicalDeviceVideoFormatInfoKHR* pVideoFormatInfo, uint32_t* pVideoFormatPropertyCount, VkVideoFormatPropertiesKHR* pVideoFormatProperties); VKAPI_ATTR VkResult VKAPI_CALL vkCreateVideoSessionKHR( VkDevice device, const VkVideoSessionCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkVideoSessionKHR* pVideoSession); VKAPI_ATTR void VKAPI_CALL vkDestroyVideoSessionKHR( VkDevice device, VkVideoSessionKHR videoSession, const VkAllocationCallbacks* pAllocator); VKAPI_ATTR VkResult VKAPI_CALL vkGetVideoSessionMemoryRequirementsKHR( VkDevice device, VkVideoSessionKHR videoSession, uint32_t* pMemoryRequirementsCount, VkVideoSessionMemoryRequirementsKHR* pMemoryRequirements); VKAPI_ATTR VkResult VKAPI_CALL vkBindVideoSessionMemoryKHR( VkDevice device, VkVideoSessionKHR videoSession, uint32_t bindSessionMemoryInfoCount, const VkBindVideoSessionMemoryInfoKHR* pBindSessionMemoryInfos); VKAPI_ATTR VkResult VKAPI_CALL vkCreateVideoSessionParametersKHR( VkDevice device, const VkVideoSessionParametersCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkVideoSessionParametersKHR* pVideoSessionParameters); VKAPI_ATTR VkResult VKAPI_CALL vkUpdateVideoSessionParametersKHR( VkDevice device, VkVideoSessionParametersKHR videoSessionParameters, const VkVideoSessionParametersUpdateInfoKHR* pUpdateInfo); VKAPI_ATTR void VKAPI_CALL vkDestroyVideoSessionParametersKHR( VkDevice device, VkVideoSessionParametersKHR videoSessionParameters, const VkAllocationCallbacks* pAllocator); VKAPI_ATTR void VKAPI_CALL vkCmdBeginVideoCodingKHR( VkCommandBuffer commandBuffer, const VkVideoBeginCodingInfoKHR* pBeginInfo); VKAPI_ATTR void VKAPI_CALL vkCmdEndVideoCodingKHR( VkCommandBuffer commandBuffer, const VkVideoEndCodingInfoKHR* pEndCodingInfo); VKAPI_ATTR void VKAPI_CALL vkCmdControlVideoCodingKHR( VkCommandBuffer commandBuffer, const VkVideoCodingControlInfoKHR* pCodingControlInfo); #endif // VK_KHR_video_decode_queue is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_video_decode_queue 1 #define VK_KHR_VIDEO_DECODE_QUEUE_SPEC_VERSION 8 #define VK_KHR_VIDEO_DECODE_QUEUE_EXTENSION_NAME "VK_KHR_video_decode_queue" typedef enum VkVideoDecodeCapabilityFlagBitsKHR { VK_VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_COINCIDE_BIT_KHR = 0x00000001, VK_VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_DISTINCT_BIT_KHR = 0x00000002, VK_VIDEO_DECODE_CAPABILITY_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF } VkVideoDecodeCapabilityFlagBitsKHR; typedef VkFlags VkVideoDecodeCapabilityFlagsKHR; typedef enum VkVideoDecodeUsageFlagBitsKHR { VK_VIDEO_DECODE_USAGE_DEFAULT_KHR = 0, VK_VIDEO_DECODE_USAGE_TRANSCODING_BIT_KHR = 0x00000001, VK_VIDEO_DECODE_USAGE_OFFLINE_BIT_KHR = 0x00000002, VK_VIDEO_DECODE_USAGE_STREAMING_BIT_KHR = 0x00000004, VK_VIDEO_DECODE_USAGE_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF } VkVideoDecodeUsageFlagBitsKHR; typedef VkFlags VkVideoDecodeUsageFlagsKHR; typedef VkFlags VkVideoDecodeFlagsKHR; typedef struct VkVideoDecodeCapabilitiesKHR { VkStructureType sType; void* pNext; VkVideoDecodeCapabilityFlagsKHR flags; } VkVideoDecodeCapabilitiesKHR; typedef struct VkVideoDecodeUsageInfoKHR { VkStructureType sType; const void* pNext; VkVideoDecodeUsageFlagsKHR videoUsageHints; } VkVideoDecodeUsageInfoKHR; typedef struct VkVideoDecodeInfoKHR { VkStructureType sType; const void* pNext; VkVideoDecodeFlagsKHR flags; VkBuffer srcBuffer; VkDeviceSize srcBufferOffset; VkDeviceSize srcBufferRange; VkVideoPictureResourceInfoKHR dstPictureResource; const VkVideoReferenceSlotInfoKHR* pSetupReferenceSlot; uint32_t referenceSlotCount; const VkVideoReferenceSlotInfoKHR* pReferenceSlots; } VkVideoDecodeInfoKHR; typedef void (VKAPI_PTR *PFN_vkCmdDecodeVideoKHR)(VkCommandBuffer commandBuffer, const VkVideoDecodeInfoKHR* pDecodeInfo); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR void VKAPI_CALL vkCmdDecodeVideoKHR( VkCommandBuffer commandBuffer, const VkVideoDecodeInfoKHR* pDecodeInfo); #endif // VK_KHR_video_encode_h264 is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_video_encode_h264 1 #include "vk_video/vulkan_video_codec_h264std.h" #include "vk_video/vulkan_video_codec_h264std_encode.h" #define VK_KHR_VIDEO_ENCODE_H264_SPEC_VERSION 14 #define VK_KHR_VIDEO_ENCODE_H264_EXTENSION_NAME "VK_KHR_video_encode_h264" typedef enum VkVideoEncodeH264CapabilityFlagBitsKHR { VK_VIDEO_ENCODE_H264_CAPABILITY_HRD_COMPLIANCE_BIT_KHR = 0x00000001, VK_VIDEO_ENCODE_H264_CAPABILITY_PREDICTION_WEIGHT_TABLE_GENERATED_BIT_KHR = 0x00000002, VK_VIDEO_ENCODE_H264_CAPABILITY_ROW_UNALIGNED_SLICE_BIT_KHR = 0x00000004, VK_VIDEO_ENCODE_H264_CAPABILITY_DIFFERENT_SLICE_TYPE_BIT_KHR = 0x00000008, VK_VIDEO_ENCODE_H264_CAPABILITY_B_FRAME_IN_L0_LIST_BIT_KHR = 0x00000010, VK_VIDEO_ENCODE_H264_CAPABILITY_B_FRAME_IN_L1_LIST_BIT_KHR = 0x00000020, VK_VIDEO_ENCODE_H264_CAPABILITY_PER_PICTURE_TYPE_MIN_MAX_QP_BIT_KHR = 0x00000040, VK_VIDEO_ENCODE_H264_CAPABILITY_PER_SLICE_CONSTANT_QP_BIT_KHR = 0x00000080, VK_VIDEO_ENCODE_H264_CAPABILITY_GENERATE_PREFIX_NALU_BIT_KHR = 0x00000100, VK_VIDEO_ENCODE_H264_CAPABILITY_MB_QP_DIFF_WRAPAROUND_BIT_KHR = 0x00000200, VK_VIDEO_ENCODE_H264_CAPABILITY_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF } VkVideoEncodeH264CapabilityFlagBitsKHR; typedef VkFlags VkVideoEncodeH264CapabilityFlagsKHR; typedef enum VkVideoEncodeH264StdFlagBitsKHR { VK_VIDEO_ENCODE_H264_STD_SEPARATE_COLOR_PLANE_FLAG_SET_BIT_KHR = 0x00000001, VK_VIDEO_ENCODE_H264_STD_QPPRIME_Y_ZERO_TRANSFORM_BYPASS_FLAG_SET_BIT_KHR = 0x00000002, VK_VIDEO_ENCODE_H264_STD_SCALING_MATRIX_PRESENT_FLAG_SET_BIT_KHR = 0x00000004, VK_VIDEO_ENCODE_H264_STD_CHROMA_QP_INDEX_OFFSET_BIT_KHR = 0x00000008, VK_VIDEO_ENCODE_H264_STD_SECOND_CHROMA_QP_INDEX_OFFSET_BIT_KHR = 0x00000010, VK_VIDEO_ENCODE_H264_STD_PIC_INIT_QP_MINUS26_BIT_KHR = 0x00000020, VK_VIDEO_ENCODE_H264_STD_WEIGHTED_PRED_FLAG_SET_BIT_KHR = 0x00000040, VK_VIDEO_ENCODE_H264_STD_WEIGHTED_BIPRED_IDC_EXPLICIT_BIT_KHR = 0x00000080, VK_VIDEO_ENCODE_H264_STD_WEIGHTED_BIPRED_IDC_IMPLICIT_BIT_KHR = 0x00000100, VK_VIDEO_ENCODE_H264_STD_TRANSFORM_8X8_MODE_FLAG_SET_BIT_KHR = 0x00000200, VK_VIDEO_ENCODE_H264_STD_DIRECT_SPATIAL_MV_PRED_FLAG_UNSET_BIT_KHR = 0x00000400, VK_VIDEO_ENCODE_H264_STD_ENTROPY_CODING_MODE_FLAG_UNSET_BIT_KHR = 0x00000800, VK_VIDEO_ENCODE_H264_STD_ENTROPY_CODING_MODE_FLAG_SET_BIT_KHR = 0x00001000, VK_VIDEO_ENCODE_H264_STD_DIRECT_8X8_INFERENCE_FLAG_UNSET_BIT_KHR = 0x00002000, VK_VIDEO_ENCODE_H264_STD_CONSTRAINED_INTRA_PRED_FLAG_SET_BIT_KHR = 0x00004000, VK_VIDEO_ENCODE_H264_STD_DEBLOCKING_FILTER_DISABLED_BIT_KHR = 0x00008000, VK_VIDEO_ENCODE_H264_STD_DEBLOCKING_FILTER_ENABLED_BIT_KHR = 0x00010000, VK_VIDEO_ENCODE_H264_STD_DEBLOCKING_FILTER_PARTIAL_BIT_KHR = 0x00020000, VK_VIDEO_ENCODE_H264_STD_SLICE_QP_DELTA_BIT_KHR = 0x00080000, VK_VIDEO_ENCODE_H264_STD_DIFFERENT_SLICE_QP_DELTA_BIT_KHR = 0x00100000, VK_VIDEO_ENCODE_H264_STD_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF } VkVideoEncodeH264StdFlagBitsKHR; typedef VkFlags VkVideoEncodeH264StdFlagsKHR; typedef enum VkVideoEncodeH264RateControlFlagBitsKHR { VK_VIDEO_ENCODE_H264_RATE_CONTROL_ATTEMPT_HRD_COMPLIANCE_BIT_KHR = 0x00000001, VK_VIDEO_ENCODE_H264_RATE_CONTROL_REGULAR_GOP_BIT_KHR = 0x00000002, VK_VIDEO_ENCODE_H264_RATE_CONTROL_REFERENCE_PATTERN_FLAT_BIT_KHR = 0x00000004, VK_VIDEO_ENCODE_H264_RATE_CONTROL_REFERENCE_PATTERN_DYADIC_BIT_KHR = 0x00000008, VK_VIDEO_ENCODE_H264_RATE_CONTROL_TEMPORAL_LAYER_PATTERN_DYADIC_BIT_KHR = 0x00000010, VK_VIDEO_ENCODE_H264_RATE_CONTROL_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF } VkVideoEncodeH264RateControlFlagBitsKHR; typedef VkFlags VkVideoEncodeH264RateControlFlagsKHR; typedef struct VkVideoEncodeH264CapabilitiesKHR { VkStructureType sType; void* pNext; VkVideoEncodeH264CapabilityFlagsKHR flags; StdVideoH264LevelIdc maxLevelIdc; uint32_t maxSliceCount; uint32_t maxPPictureL0ReferenceCount; uint32_t maxBPictureL0ReferenceCount; uint32_t maxL1ReferenceCount; uint32_t maxTemporalLayerCount; VkBool32 expectDyadicTemporalLayerPattern; int32_t minQp; int32_t maxQp; VkBool32 prefersGopRemainingFrames; VkBool32 requiresGopRemainingFrames; VkVideoEncodeH264StdFlagsKHR stdSyntaxFlags; } VkVideoEncodeH264CapabilitiesKHR; typedef struct VkVideoEncodeH264QpKHR { int32_t qpI; int32_t qpP; int32_t qpB; } VkVideoEncodeH264QpKHR; typedef struct VkVideoEncodeH264QualityLevelPropertiesKHR { VkStructureType sType; void* pNext; VkVideoEncodeH264RateControlFlagsKHR preferredRateControlFlags; uint32_t preferredGopFrameCount; uint32_t preferredIdrPeriod; uint32_t preferredConsecutiveBFrameCount; uint32_t preferredTemporalLayerCount; VkVideoEncodeH264QpKHR preferredConstantQp; uint32_t preferredMaxL0ReferenceCount; uint32_t preferredMaxL1ReferenceCount; VkBool32 preferredStdEntropyCodingModeFlag; } VkVideoEncodeH264QualityLevelPropertiesKHR; typedef struct VkVideoEncodeH264SessionCreateInfoKHR { VkStructureType sType; const void* pNext; VkBool32 useMaxLevelIdc; StdVideoH264LevelIdc maxLevelIdc; } VkVideoEncodeH264SessionCreateInfoKHR; typedef struct VkVideoEncodeH264SessionParametersAddInfoKHR { VkStructureType sType; const void* pNext; uint32_t stdSPSCount; const StdVideoH264SequenceParameterSet* pStdSPSs; uint32_t stdPPSCount; const StdVideoH264PictureParameterSet* pStdPPSs; } VkVideoEncodeH264SessionParametersAddInfoKHR; typedef struct VkVideoEncodeH264SessionParametersCreateInfoKHR { VkStructureType sType; const void* pNext; uint32_t maxStdSPSCount; uint32_t maxStdPPSCount; const VkVideoEncodeH264SessionParametersAddInfoKHR* pParametersAddInfo; } VkVideoEncodeH264SessionParametersCreateInfoKHR; typedef struct VkVideoEncodeH264SessionParametersGetInfoKHR { VkStructureType sType; const void* pNext; VkBool32 writeStdSPS; VkBool32 writeStdPPS; uint32_t stdSPSId; uint32_t stdPPSId; } VkVideoEncodeH264SessionParametersGetInfoKHR; typedef struct VkVideoEncodeH264SessionParametersFeedbackInfoKHR { VkStructureType sType; void* pNext; VkBool32 hasStdSPSOverrides; VkBool32 hasStdPPSOverrides; } VkVideoEncodeH264SessionParametersFeedbackInfoKHR; typedef struct VkVideoEncodeH264NaluSliceInfoKHR { VkStructureType sType; const void* pNext; int32_t constantQp; const StdVideoEncodeH264SliceHeader* pStdSliceHeader; } VkVideoEncodeH264NaluSliceInfoKHR; typedef struct VkVideoEncodeH264PictureInfoKHR { VkStructureType sType; const void* pNext; uint32_t naluSliceEntryCount; const VkVideoEncodeH264NaluSliceInfoKHR* pNaluSliceEntries; const StdVideoEncodeH264PictureInfo* pStdPictureInfo; VkBool32 generatePrefixNalu; } VkVideoEncodeH264PictureInfoKHR; typedef struct VkVideoEncodeH264DpbSlotInfoKHR { VkStructureType sType; const void* pNext; const StdVideoEncodeH264ReferenceInfo* pStdReferenceInfo; } VkVideoEncodeH264DpbSlotInfoKHR; typedef struct VkVideoEncodeH264ProfileInfoKHR { VkStructureType sType; const void* pNext; StdVideoH264ProfileIdc stdProfileIdc; } VkVideoEncodeH264ProfileInfoKHR; typedef struct VkVideoEncodeH264RateControlInfoKHR { VkStructureType sType; const void* pNext; VkVideoEncodeH264RateControlFlagsKHR flags; uint32_t gopFrameCount; uint32_t idrPeriod; uint32_t consecutiveBFrameCount; uint32_t temporalLayerCount; } VkVideoEncodeH264RateControlInfoKHR; typedef struct VkVideoEncodeH264FrameSizeKHR { uint32_t frameISize; uint32_t framePSize; uint32_t frameBSize; } VkVideoEncodeH264FrameSizeKHR; typedef struct VkVideoEncodeH264RateControlLayerInfoKHR { VkStructureType sType; const void* pNext; VkBool32 useMinQp; VkVideoEncodeH264QpKHR minQp; VkBool32 useMaxQp; VkVideoEncodeH264QpKHR maxQp; VkBool32 useMaxFrameSize; VkVideoEncodeH264FrameSizeKHR maxFrameSize; } VkVideoEncodeH264RateControlLayerInfoKHR; typedef struct VkVideoEncodeH264GopRemainingFrameInfoKHR { VkStructureType sType; const void* pNext; VkBool32 useGopRemainingFrames; uint32_t gopRemainingI; uint32_t gopRemainingP; uint32_t gopRemainingB; } VkVideoEncodeH264GopRemainingFrameInfoKHR; // VK_KHR_video_encode_h265 is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_video_encode_h265 1 #include "vk_video/vulkan_video_codec_h265std.h" #include "vk_video/vulkan_video_codec_h265std_encode.h" #define VK_KHR_VIDEO_ENCODE_H265_SPEC_VERSION 14 #define VK_KHR_VIDEO_ENCODE_H265_EXTENSION_NAME "VK_KHR_video_encode_h265" typedef enum VkVideoEncodeH265CapabilityFlagBitsKHR { VK_VIDEO_ENCODE_H265_CAPABILITY_HRD_COMPLIANCE_BIT_KHR = 0x00000001, VK_VIDEO_ENCODE_H265_CAPABILITY_PREDICTION_WEIGHT_TABLE_GENERATED_BIT_KHR = 0x00000002, VK_VIDEO_ENCODE_H265_CAPABILITY_ROW_UNALIGNED_SLICE_SEGMENT_BIT_KHR = 0x00000004, VK_VIDEO_ENCODE_H265_CAPABILITY_DIFFERENT_SLICE_SEGMENT_TYPE_BIT_KHR = 0x00000008, VK_VIDEO_ENCODE_H265_CAPABILITY_B_FRAME_IN_L0_LIST_BIT_KHR = 0x00000010, VK_VIDEO_ENCODE_H265_CAPABILITY_B_FRAME_IN_L1_LIST_BIT_KHR = 0x00000020, VK_VIDEO_ENCODE_H265_CAPABILITY_PER_PICTURE_TYPE_MIN_MAX_QP_BIT_KHR = 0x00000040, VK_VIDEO_ENCODE_H265_CAPABILITY_PER_SLICE_SEGMENT_CONSTANT_QP_BIT_KHR = 0x00000080, VK_VIDEO_ENCODE_H265_CAPABILITY_MULTIPLE_TILES_PER_SLICE_SEGMENT_BIT_KHR = 0x00000100, VK_VIDEO_ENCODE_H265_CAPABILITY_MULTIPLE_SLICE_SEGMENTS_PER_TILE_BIT_KHR = 0x00000200, VK_VIDEO_ENCODE_H265_CAPABILITY_CU_QP_DIFF_WRAPAROUND_BIT_KHR = 0x00000400, VK_VIDEO_ENCODE_H265_CAPABILITY_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF } VkVideoEncodeH265CapabilityFlagBitsKHR; typedef VkFlags VkVideoEncodeH265CapabilityFlagsKHR; typedef enum VkVideoEncodeH265StdFlagBitsKHR { VK_VIDEO_ENCODE_H265_STD_SEPARATE_COLOR_PLANE_FLAG_SET_BIT_KHR = 0x00000001, VK_VIDEO_ENCODE_H265_STD_SAMPLE_ADAPTIVE_OFFSET_ENABLED_FLAG_SET_BIT_KHR = 0x00000002, VK_VIDEO_ENCODE_H265_STD_SCALING_LIST_DATA_PRESENT_FLAG_SET_BIT_KHR = 0x00000004, VK_VIDEO_ENCODE_H265_STD_PCM_ENABLED_FLAG_SET_BIT_KHR = 0x00000008, VK_VIDEO_ENCODE_H265_STD_SPS_TEMPORAL_MVP_ENABLED_FLAG_SET_BIT_KHR = 0x00000010, VK_VIDEO_ENCODE_H265_STD_INIT_QP_MINUS26_BIT_KHR = 0x00000020, VK_VIDEO_ENCODE_H265_STD_WEIGHTED_PRED_FLAG_SET_BIT_KHR = 0x00000040, VK_VIDEO_ENCODE_H265_STD_WEIGHTED_BIPRED_FLAG_SET_BIT_KHR = 0x00000080, VK_VIDEO_ENCODE_H265_STD_LOG2_PARALLEL_MERGE_LEVEL_MINUS2_BIT_KHR = 0x00000100, VK_VIDEO_ENCODE_H265_STD_SIGN_DATA_HIDING_ENABLED_FLAG_SET_BIT_KHR = 0x00000200, VK_VIDEO_ENCODE_H265_STD_TRANSFORM_SKIP_ENABLED_FLAG_SET_BIT_KHR = 0x00000400, VK_VIDEO_ENCODE_H265_STD_TRANSFORM_SKIP_ENABLED_FLAG_UNSET_BIT_KHR = 0x00000800, VK_VIDEO_ENCODE_H265_STD_PPS_SLICE_CHROMA_QP_OFFSETS_PRESENT_FLAG_SET_BIT_KHR = 0x00001000, VK_VIDEO_ENCODE_H265_STD_TRANSQUANT_BYPASS_ENABLED_FLAG_SET_BIT_KHR = 0x00002000, VK_VIDEO_ENCODE_H265_STD_CONSTRAINED_INTRA_PRED_FLAG_SET_BIT_KHR = 0x00004000, VK_VIDEO_ENCODE_H265_STD_ENTROPY_CODING_SYNC_ENABLED_FLAG_SET_BIT_KHR = 0x00008000, VK_VIDEO_ENCODE_H265_STD_DEBLOCKING_FILTER_OVERRIDE_ENABLED_FLAG_SET_BIT_KHR = 0x00010000, VK_VIDEO_ENCODE_H265_STD_DEPENDENT_SLICE_SEGMENTS_ENABLED_FLAG_SET_BIT_KHR = 0x00020000, VK_VIDEO_ENCODE_H265_STD_DEPENDENT_SLICE_SEGMENT_FLAG_SET_BIT_KHR = 0x00040000, VK_VIDEO_ENCODE_H265_STD_SLICE_QP_DELTA_BIT_KHR = 0x00080000, VK_VIDEO_ENCODE_H265_STD_DIFFERENT_SLICE_QP_DELTA_BIT_KHR = 0x00100000, VK_VIDEO_ENCODE_H265_STD_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF } VkVideoEncodeH265StdFlagBitsKHR; typedef VkFlags VkVideoEncodeH265StdFlagsKHR; typedef enum VkVideoEncodeH265CtbSizeFlagBitsKHR { VK_VIDEO_ENCODE_H265_CTB_SIZE_16_BIT_KHR = 0x00000001, VK_VIDEO_ENCODE_H265_CTB_SIZE_32_BIT_KHR = 0x00000002, VK_VIDEO_ENCODE_H265_CTB_SIZE_64_BIT_KHR = 0x00000004, VK_VIDEO_ENCODE_H265_CTB_SIZE_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF } VkVideoEncodeH265CtbSizeFlagBitsKHR; typedef VkFlags VkVideoEncodeH265CtbSizeFlagsKHR; typedef enum VkVideoEncodeH265TransformBlockSizeFlagBitsKHR { VK_VIDEO_ENCODE_H265_TRANSFORM_BLOCK_SIZE_4_BIT_KHR = 0x00000001, VK_VIDEO_ENCODE_H265_TRANSFORM_BLOCK_SIZE_8_BIT_KHR = 0x00000002, VK_VIDEO_ENCODE_H265_TRANSFORM_BLOCK_SIZE_16_BIT_KHR = 0x00000004, VK_VIDEO_ENCODE_H265_TRANSFORM_BLOCK_SIZE_32_BIT_KHR = 0x00000008, VK_VIDEO_ENCODE_H265_TRANSFORM_BLOCK_SIZE_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF } VkVideoEncodeH265TransformBlockSizeFlagBitsKHR; typedef VkFlags VkVideoEncodeH265TransformBlockSizeFlagsKHR; typedef enum VkVideoEncodeH265RateControlFlagBitsKHR { VK_VIDEO_ENCODE_H265_RATE_CONTROL_ATTEMPT_HRD_COMPLIANCE_BIT_KHR = 0x00000001, VK_VIDEO_ENCODE_H265_RATE_CONTROL_REGULAR_GOP_BIT_KHR = 0x00000002, VK_VIDEO_ENCODE_H265_RATE_CONTROL_REFERENCE_PATTERN_FLAT_BIT_KHR = 0x00000004, VK_VIDEO_ENCODE_H265_RATE_CONTROL_REFERENCE_PATTERN_DYADIC_BIT_KHR = 0x00000008, VK_VIDEO_ENCODE_H265_RATE_CONTROL_TEMPORAL_SUB_LAYER_PATTERN_DYADIC_BIT_KHR = 0x00000010, VK_VIDEO_ENCODE_H265_RATE_CONTROL_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF } VkVideoEncodeH265RateControlFlagBitsKHR; typedef VkFlags VkVideoEncodeH265RateControlFlagsKHR; typedef struct VkVideoEncodeH265CapabilitiesKHR { VkStructureType sType; void* pNext; VkVideoEncodeH265CapabilityFlagsKHR flags; StdVideoH265LevelIdc maxLevelIdc; uint32_t maxSliceSegmentCount; VkExtent2D maxTiles; VkVideoEncodeH265CtbSizeFlagsKHR ctbSizes; VkVideoEncodeH265TransformBlockSizeFlagsKHR transformBlockSizes; uint32_t maxPPictureL0ReferenceCount; uint32_t maxBPictureL0ReferenceCount; uint32_t maxL1ReferenceCount; uint32_t maxSubLayerCount; VkBool32 expectDyadicTemporalSubLayerPattern; int32_t minQp; int32_t maxQp; VkBool32 prefersGopRemainingFrames; VkBool32 requiresGopRemainingFrames; VkVideoEncodeH265StdFlagsKHR stdSyntaxFlags; } VkVideoEncodeH265CapabilitiesKHR; typedef struct VkVideoEncodeH265SessionCreateInfoKHR { VkStructureType sType; const void* pNext; VkBool32 useMaxLevelIdc; StdVideoH265LevelIdc maxLevelIdc; } VkVideoEncodeH265SessionCreateInfoKHR; typedef struct VkVideoEncodeH265QpKHR { int32_t qpI; int32_t qpP; int32_t qpB; } VkVideoEncodeH265QpKHR; typedef struct VkVideoEncodeH265QualityLevelPropertiesKHR { VkStructureType sType; void* pNext; VkVideoEncodeH265RateControlFlagsKHR preferredRateControlFlags; uint32_t preferredGopFrameCount; uint32_t preferredIdrPeriod; uint32_t preferredConsecutiveBFrameCount; uint32_t preferredSubLayerCount; VkVideoEncodeH265QpKHR preferredConstantQp; uint32_t preferredMaxL0ReferenceCount; uint32_t preferredMaxL1ReferenceCount; } VkVideoEncodeH265QualityLevelPropertiesKHR; typedef struct VkVideoEncodeH265SessionParametersAddInfoKHR { VkStructureType sType; const void* pNext; uint32_t stdVPSCount; const StdVideoH265VideoParameterSet* pStdVPSs; uint32_t stdSPSCount; const StdVideoH265SequenceParameterSet* pStdSPSs; uint32_t stdPPSCount; const StdVideoH265PictureParameterSet* pStdPPSs; } VkVideoEncodeH265SessionParametersAddInfoKHR; typedef struct VkVideoEncodeH265SessionParametersCreateInfoKHR { VkStructureType sType; const void* pNext; uint32_t maxStdVPSCount; uint32_t maxStdSPSCount; uint32_t maxStdPPSCount; const VkVideoEncodeH265SessionParametersAddInfoKHR* pParametersAddInfo; } VkVideoEncodeH265SessionParametersCreateInfoKHR; typedef struct VkVideoEncodeH265SessionParametersGetInfoKHR { VkStructureType sType; const void* pNext; VkBool32 writeStdVPS; VkBool32 writeStdSPS; VkBool32 writeStdPPS; uint32_t stdVPSId; uint32_t stdSPSId; uint32_t stdPPSId; } VkVideoEncodeH265SessionParametersGetInfoKHR; typedef struct VkVideoEncodeH265SessionParametersFeedbackInfoKHR { VkStructureType sType; void* pNext; VkBool32 hasStdVPSOverrides; VkBool32 hasStdSPSOverrides; VkBool32 hasStdPPSOverrides; } VkVideoEncodeH265SessionParametersFeedbackInfoKHR; typedef struct VkVideoEncodeH265NaluSliceSegmentInfoKHR { VkStructureType sType; const void* pNext; int32_t constantQp; const StdVideoEncodeH265SliceSegmentHeader* pStdSliceSegmentHeader; } VkVideoEncodeH265NaluSliceSegmentInfoKHR; typedef struct VkVideoEncodeH265PictureInfoKHR { VkStructureType sType; const void* pNext; uint32_t naluSliceSegmentEntryCount; const VkVideoEncodeH265NaluSliceSegmentInfoKHR* pNaluSliceSegmentEntries; const StdVideoEncodeH265PictureInfo* pStdPictureInfo; } VkVideoEncodeH265PictureInfoKHR; typedef struct VkVideoEncodeH265DpbSlotInfoKHR { VkStructureType sType; const void* pNext; const StdVideoEncodeH265ReferenceInfo* pStdReferenceInfo; } VkVideoEncodeH265DpbSlotInfoKHR; typedef struct VkVideoEncodeH265ProfileInfoKHR { VkStructureType sType; const void* pNext; StdVideoH265ProfileIdc stdProfileIdc; } VkVideoEncodeH265ProfileInfoKHR; typedef struct VkVideoEncodeH265RateControlInfoKHR { VkStructureType sType; const void* pNext; VkVideoEncodeH265RateControlFlagsKHR flags; uint32_t gopFrameCount; uint32_t idrPeriod; uint32_t consecutiveBFrameCount; uint32_t subLayerCount; } VkVideoEncodeH265RateControlInfoKHR; typedef struct VkVideoEncodeH265FrameSizeKHR { uint32_t frameISize; uint32_t framePSize; uint32_t frameBSize; } VkVideoEncodeH265FrameSizeKHR; typedef struct VkVideoEncodeH265RateControlLayerInfoKHR { VkStructureType sType; const void* pNext; VkBool32 useMinQp; VkVideoEncodeH265QpKHR minQp; VkBool32 useMaxQp; VkVideoEncodeH265QpKHR maxQp; VkBool32 useMaxFrameSize; VkVideoEncodeH265FrameSizeKHR maxFrameSize; } VkVideoEncodeH265RateControlLayerInfoKHR; typedef struct VkVideoEncodeH265GopRemainingFrameInfoKHR { VkStructureType sType; const void* pNext; VkBool32 useGopRemainingFrames; uint32_t gopRemainingI; uint32_t gopRemainingP; uint32_t gopRemainingB; } VkVideoEncodeH265GopRemainingFrameInfoKHR; // VK_KHR_video_decode_h264 is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_video_decode_h264 1 #include "vk_video/vulkan_video_codec_h264std_decode.h" #define VK_KHR_VIDEO_DECODE_H264_SPEC_VERSION 9 #define VK_KHR_VIDEO_DECODE_H264_EXTENSION_NAME "VK_KHR_video_decode_h264" typedef enum VkVideoDecodeH264PictureLayoutFlagBitsKHR { VK_VIDEO_DECODE_H264_PICTURE_LAYOUT_PROGRESSIVE_KHR = 0, VK_VIDEO_DECODE_H264_PICTURE_LAYOUT_INTERLACED_INTERLEAVED_LINES_BIT_KHR = 0x00000001, VK_VIDEO_DECODE_H264_PICTURE_LAYOUT_INTERLACED_SEPARATE_PLANES_BIT_KHR = 0x00000002, VK_VIDEO_DECODE_H264_PICTURE_LAYOUT_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF } VkVideoDecodeH264PictureLayoutFlagBitsKHR; typedef VkFlags VkVideoDecodeH264PictureLayoutFlagsKHR; typedef struct VkVideoDecodeH264ProfileInfoKHR { VkStructureType sType; const void* pNext; StdVideoH264ProfileIdc stdProfileIdc; VkVideoDecodeH264PictureLayoutFlagBitsKHR pictureLayout; } VkVideoDecodeH264ProfileInfoKHR; typedef struct VkVideoDecodeH264CapabilitiesKHR { VkStructureType sType; void* pNext; StdVideoH264LevelIdc maxLevelIdc; VkOffset2D fieldOffsetGranularity; } VkVideoDecodeH264CapabilitiesKHR; typedef struct VkVideoDecodeH264SessionParametersAddInfoKHR { VkStructureType sType; const void* pNext; uint32_t stdSPSCount; const StdVideoH264SequenceParameterSet* pStdSPSs; uint32_t stdPPSCount; const StdVideoH264PictureParameterSet* pStdPPSs; } VkVideoDecodeH264SessionParametersAddInfoKHR; typedef struct VkVideoDecodeH264SessionParametersCreateInfoKHR { VkStructureType sType; const void* pNext; uint32_t maxStdSPSCount; uint32_t maxStdPPSCount; const VkVideoDecodeH264SessionParametersAddInfoKHR* pParametersAddInfo; } VkVideoDecodeH264SessionParametersCreateInfoKHR; typedef struct VkVideoDecodeH264PictureInfoKHR { VkStructureType sType; const void* pNext; const StdVideoDecodeH264PictureInfo* pStdPictureInfo; uint32_t sliceCount; const uint32_t* pSliceOffsets; } VkVideoDecodeH264PictureInfoKHR; typedef struct VkVideoDecodeH264DpbSlotInfoKHR { VkStructureType sType; const void* pNext; const StdVideoDecodeH264ReferenceInfo* pStdReferenceInfo; } VkVideoDecodeH264DpbSlotInfoKHR; // VK_KHR_dynamic_rendering is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_dynamic_rendering 1 #define VK_KHR_DYNAMIC_RENDERING_SPEC_VERSION 1 #define VK_KHR_DYNAMIC_RENDERING_EXTENSION_NAME "VK_KHR_dynamic_rendering" typedef VkRenderingFlags VkRenderingFlagsKHR; typedef VkRenderingFlagBits VkRenderingFlagBitsKHR; typedef VkRenderingInfo VkRenderingInfoKHR; typedef VkRenderingAttachmentInfo VkRenderingAttachmentInfoKHR; typedef VkPipelineRenderingCreateInfo VkPipelineRenderingCreateInfoKHR; typedef VkPhysicalDeviceDynamicRenderingFeatures VkPhysicalDeviceDynamicRenderingFeaturesKHR; typedef VkCommandBufferInheritanceRenderingInfo VkCommandBufferInheritanceRenderingInfoKHR; typedef void (VKAPI_PTR *PFN_vkCmdBeginRenderingKHR)(VkCommandBuffer commandBuffer, const VkRenderingInfo* pRenderingInfo); typedef void (VKAPI_PTR *PFN_vkCmdEndRenderingKHR)(VkCommandBuffer commandBuffer); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR void VKAPI_CALL vkCmdBeginRenderingKHR( VkCommandBuffer commandBuffer, const VkRenderingInfo* pRenderingInfo); VKAPI_ATTR void VKAPI_CALL vkCmdEndRenderingKHR( VkCommandBuffer commandBuffer); #endif // VK_KHR_multiview is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_multiview 1 #define VK_KHR_MULTIVIEW_SPEC_VERSION 1 #define VK_KHR_MULTIVIEW_EXTENSION_NAME "VK_KHR_multiview" typedef VkRenderPassMultiviewCreateInfo VkRenderPassMultiviewCreateInfoKHR; typedef VkPhysicalDeviceMultiviewFeatures VkPhysicalDeviceMultiviewFeaturesKHR; typedef VkPhysicalDeviceMultiviewProperties VkPhysicalDeviceMultiviewPropertiesKHR; // VK_KHR_get_physical_device_properties2 is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_get_physical_device_properties2 1 #define VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_SPEC_VERSION 2 #define VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME "VK_KHR_get_physical_device_properties2" typedef VkPhysicalDeviceFeatures2 VkPhysicalDeviceFeatures2KHR; typedef VkPhysicalDeviceProperties2 VkPhysicalDeviceProperties2KHR; typedef VkFormatProperties2 VkFormatProperties2KHR; typedef VkImageFormatProperties2 VkImageFormatProperties2KHR; typedef VkPhysicalDeviceImageFormatInfo2 VkPhysicalDeviceImageFormatInfo2KHR; typedef VkQueueFamilyProperties2 VkQueueFamilyProperties2KHR; typedef VkPhysicalDeviceMemoryProperties2 VkPhysicalDeviceMemoryProperties2KHR; typedef VkSparseImageFormatProperties2 VkSparseImageFormatProperties2KHR; typedef VkPhysicalDeviceSparseImageFormatInfo2 VkPhysicalDeviceSparseImageFormatInfo2KHR; typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceFeatures2KHR)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures2* pFeatures); typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceProperties2KHR)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties2* pProperties); typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceFormatProperties2KHR)(VkPhysicalDevice physicalDevice, VkFormat format, VkFormatProperties2* pFormatProperties); typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceImageFormatProperties2KHR)(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceImageFormatInfo2* pImageFormatInfo, VkImageFormatProperties2* pImageFormatProperties); typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceQueueFamilyProperties2KHR)(VkPhysicalDevice physicalDevice, uint32_t* pQueueFamilyPropertyCount, VkQueueFamilyProperties2* pQueueFamilyProperties); typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceMemoryProperties2KHR)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties2* pMemoryProperties); typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceSparseImageFormatProperties2KHR)(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSparseImageFormatInfo2* pFormatInfo, uint32_t* pPropertyCount, VkSparseImageFormatProperties2* pProperties); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceFeatures2KHR( VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures2* pFeatures); VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceProperties2KHR( VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties2* pProperties); VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceFormatProperties2KHR( VkPhysicalDevice physicalDevice, VkFormat format, VkFormatProperties2* pFormatProperties); VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceImageFormatProperties2KHR( VkPhysicalDevice physicalDevice, const VkPhysicalDeviceImageFormatInfo2* pImageFormatInfo, VkImageFormatProperties2* pImageFormatProperties); VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceQueueFamilyProperties2KHR( VkPhysicalDevice physicalDevice, uint32_t* pQueueFamilyPropertyCount, VkQueueFamilyProperties2* pQueueFamilyProperties); VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceMemoryProperties2KHR( VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties2* pMemoryProperties); VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceSparseImageFormatProperties2KHR( VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSparseImageFormatInfo2* pFormatInfo, uint32_t* pPropertyCount, VkSparseImageFormatProperties2* pProperties); #endif // VK_KHR_device_group is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_device_group 1 #define VK_KHR_DEVICE_GROUP_SPEC_VERSION 4 #define VK_KHR_DEVICE_GROUP_EXTENSION_NAME "VK_KHR_device_group" typedef VkPeerMemoryFeatureFlags VkPeerMemoryFeatureFlagsKHR; typedef VkPeerMemoryFeatureFlagBits VkPeerMemoryFeatureFlagBitsKHR; typedef VkMemoryAllocateFlags VkMemoryAllocateFlagsKHR; typedef VkMemoryAllocateFlagBits VkMemoryAllocateFlagBitsKHR; typedef VkMemoryAllocateFlagsInfo VkMemoryAllocateFlagsInfoKHR; typedef VkDeviceGroupRenderPassBeginInfo VkDeviceGroupRenderPassBeginInfoKHR; typedef VkDeviceGroupCommandBufferBeginInfo VkDeviceGroupCommandBufferBeginInfoKHR; typedef VkDeviceGroupSubmitInfo VkDeviceGroupSubmitInfoKHR; typedef VkDeviceGroupBindSparseInfo VkDeviceGroupBindSparseInfoKHR; typedef VkBindBufferMemoryDeviceGroupInfo VkBindBufferMemoryDeviceGroupInfoKHR; typedef VkBindImageMemoryDeviceGroupInfo VkBindImageMemoryDeviceGroupInfoKHR; typedef void (VKAPI_PTR *PFN_vkGetDeviceGroupPeerMemoryFeaturesKHR)(VkDevice device, uint32_t heapIndex, uint32_t localDeviceIndex, uint32_t remoteDeviceIndex, VkPeerMemoryFeatureFlags* pPeerMemoryFeatures); typedef void (VKAPI_PTR *PFN_vkCmdSetDeviceMaskKHR)(VkCommandBuffer commandBuffer, uint32_t deviceMask); typedef void (VKAPI_PTR *PFN_vkCmdDispatchBaseKHR)(VkCommandBuffer commandBuffer, uint32_t baseGroupX, uint32_t baseGroupY, uint32_t baseGroupZ, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR void VKAPI_CALL vkGetDeviceGroupPeerMemoryFeaturesKHR( VkDevice device, uint32_t heapIndex, uint32_t localDeviceIndex, uint32_t remoteDeviceIndex, VkPeerMemoryFeatureFlags* pPeerMemoryFeatures); VKAPI_ATTR void VKAPI_CALL vkCmdSetDeviceMaskKHR( VkCommandBuffer commandBuffer, uint32_t deviceMask); VKAPI_ATTR void VKAPI_CALL vkCmdDispatchBaseKHR( VkCommandBuffer commandBuffer, uint32_t baseGroupX, uint32_t baseGroupY, uint32_t baseGroupZ, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ); #endif // VK_KHR_shader_draw_parameters is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_shader_draw_parameters 1 #define VK_KHR_SHADER_DRAW_PARAMETERS_SPEC_VERSION 1 #define VK_KHR_SHADER_DRAW_PARAMETERS_EXTENSION_NAME "VK_KHR_shader_draw_parameters" // VK_KHR_maintenance1 is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_maintenance1 1 #define VK_KHR_MAINTENANCE_1_SPEC_VERSION 2 #define VK_KHR_MAINTENANCE_1_EXTENSION_NAME "VK_KHR_maintenance1" // VK_KHR_MAINTENANCE1_SPEC_VERSION is a deprecated alias #define VK_KHR_MAINTENANCE1_SPEC_VERSION VK_KHR_MAINTENANCE_1_SPEC_VERSION // VK_KHR_MAINTENANCE1_EXTENSION_NAME is a deprecated alias #define VK_KHR_MAINTENANCE1_EXTENSION_NAME VK_KHR_MAINTENANCE_1_EXTENSION_NAME typedef VkCommandPoolTrimFlags VkCommandPoolTrimFlagsKHR; typedef void (VKAPI_PTR *PFN_vkTrimCommandPoolKHR)(VkDevice device, VkCommandPool commandPool, VkCommandPoolTrimFlags flags); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR void VKAPI_CALL vkTrimCommandPoolKHR( VkDevice device, VkCommandPool commandPool, VkCommandPoolTrimFlags flags); #endif // VK_KHR_device_group_creation is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_device_group_creation 1 #define VK_KHR_DEVICE_GROUP_CREATION_SPEC_VERSION 1 #define VK_KHR_DEVICE_GROUP_CREATION_EXTENSION_NAME "VK_KHR_device_group_creation" #define VK_MAX_DEVICE_GROUP_SIZE_KHR VK_MAX_DEVICE_GROUP_SIZE typedef VkPhysicalDeviceGroupProperties VkPhysicalDeviceGroupPropertiesKHR; typedef VkDeviceGroupDeviceCreateInfo VkDeviceGroupDeviceCreateInfoKHR; typedef VkResult (VKAPI_PTR *PFN_vkEnumeratePhysicalDeviceGroupsKHR)(VkInstance instance, uint32_t* pPhysicalDeviceGroupCount, VkPhysicalDeviceGroupProperties* pPhysicalDeviceGroupProperties); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkEnumeratePhysicalDeviceGroupsKHR( VkInstance instance, uint32_t* pPhysicalDeviceGroupCount, VkPhysicalDeviceGroupProperties* pPhysicalDeviceGroupProperties); #endif // VK_KHR_external_memory_capabilities is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_external_memory_capabilities 1 #define VK_KHR_EXTERNAL_MEMORY_CAPABILITIES_SPEC_VERSION 1 #define VK_KHR_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME "VK_KHR_external_memory_capabilities" #define VK_LUID_SIZE_KHR VK_LUID_SIZE typedef VkExternalMemoryHandleTypeFlags VkExternalMemoryHandleTypeFlagsKHR; typedef VkExternalMemoryHandleTypeFlagBits VkExternalMemoryHandleTypeFlagBitsKHR; typedef VkExternalMemoryFeatureFlags VkExternalMemoryFeatureFlagsKHR; typedef VkExternalMemoryFeatureFlagBits VkExternalMemoryFeatureFlagBitsKHR; typedef VkExternalMemoryProperties VkExternalMemoryPropertiesKHR; typedef VkPhysicalDeviceExternalImageFormatInfo VkPhysicalDeviceExternalImageFormatInfoKHR; typedef VkExternalImageFormatProperties VkExternalImageFormatPropertiesKHR; typedef VkPhysicalDeviceExternalBufferInfo VkPhysicalDeviceExternalBufferInfoKHR; typedef VkExternalBufferProperties VkExternalBufferPropertiesKHR; typedef VkPhysicalDeviceIDProperties VkPhysicalDeviceIDPropertiesKHR; typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceExternalBufferPropertiesKHR)(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalBufferInfo* pExternalBufferInfo, VkExternalBufferProperties* pExternalBufferProperties); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceExternalBufferPropertiesKHR( VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalBufferInfo* pExternalBufferInfo, VkExternalBufferProperties* pExternalBufferProperties); #endif // VK_KHR_external_memory is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_external_memory 1 #define VK_KHR_EXTERNAL_MEMORY_SPEC_VERSION 1 #define VK_KHR_EXTERNAL_MEMORY_EXTENSION_NAME "VK_KHR_external_memory" #define VK_QUEUE_FAMILY_EXTERNAL_KHR VK_QUEUE_FAMILY_EXTERNAL typedef VkExternalMemoryImageCreateInfo VkExternalMemoryImageCreateInfoKHR; typedef VkExternalMemoryBufferCreateInfo VkExternalMemoryBufferCreateInfoKHR; typedef VkExportMemoryAllocateInfo VkExportMemoryAllocateInfoKHR; // VK_KHR_external_memory_fd is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_external_memory_fd 1 #define VK_KHR_EXTERNAL_MEMORY_FD_SPEC_VERSION 1 #define VK_KHR_EXTERNAL_MEMORY_FD_EXTENSION_NAME "VK_KHR_external_memory_fd" typedef struct VkImportMemoryFdInfoKHR { VkStructureType sType; const void* pNext; VkExternalMemoryHandleTypeFlagBits handleType; int fd; } VkImportMemoryFdInfoKHR; typedef struct VkMemoryFdPropertiesKHR { VkStructureType sType; void* pNext; uint32_t memoryTypeBits; } VkMemoryFdPropertiesKHR; typedef struct VkMemoryGetFdInfoKHR { VkStructureType sType; const void* pNext; VkDeviceMemory memory; VkExternalMemoryHandleTypeFlagBits handleType; } VkMemoryGetFdInfoKHR; typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryFdKHR)(VkDevice device, const VkMemoryGetFdInfoKHR* pGetFdInfo, int* pFd); typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryFdPropertiesKHR)(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, int fd, VkMemoryFdPropertiesKHR* pMemoryFdProperties); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryFdKHR( VkDevice device, const VkMemoryGetFdInfoKHR* pGetFdInfo, int* pFd); VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryFdPropertiesKHR( VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, int fd, VkMemoryFdPropertiesKHR* pMemoryFdProperties); #endif // VK_KHR_external_semaphore_capabilities is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_external_semaphore_capabilities 1 #define VK_KHR_EXTERNAL_SEMAPHORE_CAPABILITIES_SPEC_VERSION 1 #define VK_KHR_EXTERNAL_SEMAPHORE_CAPABILITIES_EXTENSION_NAME "VK_KHR_external_semaphore_capabilities" typedef VkExternalSemaphoreHandleTypeFlags VkExternalSemaphoreHandleTypeFlagsKHR; typedef VkExternalSemaphoreHandleTypeFlagBits VkExternalSemaphoreHandleTypeFlagBitsKHR; typedef VkExternalSemaphoreFeatureFlags VkExternalSemaphoreFeatureFlagsKHR; typedef VkExternalSemaphoreFeatureFlagBits VkExternalSemaphoreFeatureFlagBitsKHR; typedef VkPhysicalDeviceExternalSemaphoreInfo VkPhysicalDeviceExternalSemaphoreInfoKHR; typedef VkExternalSemaphoreProperties VkExternalSemaphorePropertiesKHR; typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR)(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo, VkExternalSemaphoreProperties* pExternalSemaphoreProperties); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceExternalSemaphorePropertiesKHR( VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo, VkExternalSemaphoreProperties* pExternalSemaphoreProperties); #endif // VK_KHR_external_semaphore is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_external_semaphore 1 #define VK_KHR_EXTERNAL_SEMAPHORE_SPEC_VERSION 1 #define VK_KHR_EXTERNAL_SEMAPHORE_EXTENSION_NAME "VK_KHR_external_semaphore" typedef VkSemaphoreImportFlags VkSemaphoreImportFlagsKHR; typedef VkSemaphoreImportFlagBits VkSemaphoreImportFlagBitsKHR; typedef VkExportSemaphoreCreateInfo VkExportSemaphoreCreateInfoKHR; // VK_KHR_external_semaphore_fd is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_external_semaphore_fd 1 #define VK_KHR_EXTERNAL_SEMAPHORE_FD_SPEC_VERSION 1 #define VK_KHR_EXTERNAL_SEMAPHORE_FD_EXTENSION_NAME "VK_KHR_external_semaphore_fd" typedef struct VkImportSemaphoreFdInfoKHR { VkStructureType sType; const void* pNext; VkSemaphore semaphore; VkSemaphoreImportFlags flags; VkExternalSemaphoreHandleTypeFlagBits handleType; int fd; } VkImportSemaphoreFdInfoKHR; typedef struct VkSemaphoreGetFdInfoKHR { VkStructureType sType; const void* pNext; VkSemaphore semaphore; VkExternalSemaphoreHandleTypeFlagBits handleType; } VkSemaphoreGetFdInfoKHR; typedef VkResult (VKAPI_PTR *PFN_vkImportSemaphoreFdKHR)(VkDevice device, const VkImportSemaphoreFdInfoKHR* pImportSemaphoreFdInfo); typedef VkResult (VKAPI_PTR *PFN_vkGetSemaphoreFdKHR)(VkDevice device, const VkSemaphoreGetFdInfoKHR* pGetFdInfo, int* pFd); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkImportSemaphoreFdKHR( VkDevice device, const VkImportSemaphoreFdInfoKHR* pImportSemaphoreFdInfo); VKAPI_ATTR VkResult VKAPI_CALL vkGetSemaphoreFdKHR( VkDevice device, const VkSemaphoreGetFdInfoKHR* pGetFdInfo, int* pFd); #endif // VK_KHR_push_descriptor is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_push_descriptor 1 #define VK_KHR_PUSH_DESCRIPTOR_SPEC_VERSION 2 #define VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME "VK_KHR_push_descriptor" typedef VkPhysicalDevicePushDescriptorProperties VkPhysicalDevicePushDescriptorPropertiesKHR; typedef void (VKAPI_PTR *PFN_vkCmdPushDescriptorSetKHR)(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, uint32_t set, uint32_t descriptorWriteCount, const VkWriteDescriptorSet* pDescriptorWrites); typedef void (VKAPI_PTR *PFN_vkCmdPushDescriptorSetWithTemplateKHR)(VkCommandBuffer commandBuffer, VkDescriptorUpdateTemplate descriptorUpdateTemplate, VkPipelineLayout layout, uint32_t set, const void* pData); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR void VKAPI_CALL vkCmdPushDescriptorSetKHR( VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, uint32_t set, uint32_t descriptorWriteCount, const VkWriteDescriptorSet* pDescriptorWrites); VKAPI_ATTR void VKAPI_CALL vkCmdPushDescriptorSetWithTemplateKHR( VkCommandBuffer commandBuffer, VkDescriptorUpdateTemplate descriptorUpdateTemplate, VkPipelineLayout layout, uint32_t set, const void* pData); #endif // VK_KHR_shader_float16_int8 is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_shader_float16_int8 1 #define VK_KHR_SHADER_FLOAT16_INT8_SPEC_VERSION 1 #define VK_KHR_SHADER_FLOAT16_INT8_EXTENSION_NAME "VK_KHR_shader_float16_int8" typedef VkPhysicalDeviceShaderFloat16Int8Features VkPhysicalDeviceShaderFloat16Int8FeaturesKHR; typedef VkPhysicalDeviceShaderFloat16Int8Features VkPhysicalDeviceFloat16Int8FeaturesKHR; // VK_KHR_16bit_storage is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_16bit_storage 1 #define VK_KHR_16BIT_STORAGE_SPEC_VERSION 1 #define VK_KHR_16BIT_STORAGE_EXTENSION_NAME "VK_KHR_16bit_storage" typedef VkPhysicalDevice16BitStorageFeatures VkPhysicalDevice16BitStorageFeaturesKHR; // VK_KHR_incremental_present is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_incremental_present 1 #define VK_KHR_INCREMENTAL_PRESENT_SPEC_VERSION 2 #define VK_KHR_INCREMENTAL_PRESENT_EXTENSION_NAME "VK_KHR_incremental_present" typedef struct VkRectLayerKHR { VkOffset2D offset; VkExtent2D extent; uint32_t layer; } VkRectLayerKHR; typedef struct VkPresentRegionKHR { uint32_t rectangleCount; const VkRectLayerKHR* pRectangles; } VkPresentRegionKHR; typedef struct VkPresentRegionsKHR { VkStructureType sType; const void* pNext; uint32_t swapchainCount; const VkPresentRegionKHR* pRegions; } VkPresentRegionsKHR; // VK_KHR_descriptor_update_template is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_descriptor_update_template 1 typedef VkDescriptorUpdateTemplate VkDescriptorUpdateTemplateKHR; #define VK_KHR_DESCRIPTOR_UPDATE_TEMPLATE_SPEC_VERSION 1 #define VK_KHR_DESCRIPTOR_UPDATE_TEMPLATE_EXTENSION_NAME "VK_KHR_descriptor_update_template" typedef VkDescriptorUpdateTemplateType VkDescriptorUpdateTemplateTypeKHR; typedef VkDescriptorUpdateTemplateCreateFlags VkDescriptorUpdateTemplateCreateFlagsKHR; typedef VkDescriptorUpdateTemplateEntry VkDescriptorUpdateTemplateEntryKHR; typedef VkDescriptorUpdateTemplateCreateInfo VkDescriptorUpdateTemplateCreateInfoKHR; typedef VkResult (VKAPI_PTR *PFN_vkCreateDescriptorUpdateTemplateKHR)(VkDevice device, const VkDescriptorUpdateTemplateCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDescriptorUpdateTemplate* pDescriptorUpdateTemplate); typedef void (VKAPI_PTR *PFN_vkDestroyDescriptorUpdateTemplateKHR)(VkDevice device, VkDescriptorUpdateTemplate descriptorUpdateTemplate, const VkAllocationCallbacks* pAllocator); typedef void (VKAPI_PTR *PFN_vkUpdateDescriptorSetWithTemplateKHR)(VkDevice device, VkDescriptorSet descriptorSet, VkDescriptorUpdateTemplate descriptorUpdateTemplate, const void* pData); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkCreateDescriptorUpdateTemplateKHR( VkDevice device, const VkDescriptorUpdateTemplateCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDescriptorUpdateTemplate* pDescriptorUpdateTemplate); VKAPI_ATTR void VKAPI_CALL vkDestroyDescriptorUpdateTemplateKHR( VkDevice device, VkDescriptorUpdateTemplate descriptorUpdateTemplate, const VkAllocationCallbacks* pAllocator); VKAPI_ATTR void VKAPI_CALL vkUpdateDescriptorSetWithTemplateKHR( VkDevice device, VkDescriptorSet descriptorSet, VkDescriptorUpdateTemplate descriptorUpdateTemplate, const void* pData); #endif // VK_KHR_imageless_framebuffer is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_imageless_framebuffer 1 #define VK_KHR_IMAGELESS_FRAMEBUFFER_SPEC_VERSION 1 #define VK_KHR_IMAGELESS_FRAMEBUFFER_EXTENSION_NAME "VK_KHR_imageless_framebuffer" typedef VkPhysicalDeviceImagelessFramebufferFeatures VkPhysicalDeviceImagelessFramebufferFeaturesKHR; typedef VkFramebufferAttachmentsCreateInfo VkFramebufferAttachmentsCreateInfoKHR; typedef VkFramebufferAttachmentImageInfo VkFramebufferAttachmentImageInfoKHR; typedef VkRenderPassAttachmentBeginInfo VkRenderPassAttachmentBeginInfoKHR; // VK_KHR_create_renderpass2 is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_create_renderpass2 1 #define VK_KHR_CREATE_RENDERPASS_2_SPEC_VERSION 1 #define VK_KHR_CREATE_RENDERPASS_2_EXTENSION_NAME "VK_KHR_create_renderpass2" typedef VkRenderPassCreateInfo2 VkRenderPassCreateInfo2KHR; typedef VkAttachmentDescription2 VkAttachmentDescription2KHR; typedef VkAttachmentReference2 VkAttachmentReference2KHR; typedef VkSubpassDescription2 VkSubpassDescription2KHR; typedef VkSubpassDependency2 VkSubpassDependency2KHR; typedef VkSubpassBeginInfo VkSubpassBeginInfoKHR; typedef VkSubpassEndInfo VkSubpassEndInfoKHR; typedef VkResult (VKAPI_PTR *PFN_vkCreateRenderPass2KHR)(VkDevice device, const VkRenderPassCreateInfo2* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkRenderPass* pRenderPass); typedef void (VKAPI_PTR *PFN_vkCmdBeginRenderPass2KHR)(VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo* pRenderPassBegin, const VkSubpassBeginInfo* pSubpassBeginInfo); typedef void (VKAPI_PTR *PFN_vkCmdNextSubpass2KHR)(VkCommandBuffer commandBuffer, const VkSubpassBeginInfo* pSubpassBeginInfo, const VkSubpassEndInfo* pSubpassEndInfo); typedef void (VKAPI_PTR *PFN_vkCmdEndRenderPass2KHR)(VkCommandBuffer commandBuffer, const VkSubpassEndInfo* pSubpassEndInfo); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkCreateRenderPass2KHR( VkDevice device, const VkRenderPassCreateInfo2* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkRenderPass* pRenderPass); VKAPI_ATTR void VKAPI_CALL vkCmdBeginRenderPass2KHR( VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo* pRenderPassBegin, const VkSubpassBeginInfo* pSubpassBeginInfo); VKAPI_ATTR void VKAPI_CALL vkCmdNextSubpass2KHR( VkCommandBuffer commandBuffer, const VkSubpassBeginInfo* pSubpassBeginInfo, const VkSubpassEndInfo* pSubpassEndInfo); VKAPI_ATTR void VKAPI_CALL vkCmdEndRenderPass2KHR( VkCommandBuffer commandBuffer, const VkSubpassEndInfo* pSubpassEndInfo); #endif // VK_KHR_shared_presentable_image is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_shared_presentable_image 1 #define VK_KHR_SHARED_PRESENTABLE_IMAGE_SPEC_VERSION 1 #define VK_KHR_SHARED_PRESENTABLE_IMAGE_EXTENSION_NAME "VK_KHR_shared_presentable_image" typedef struct VkSharedPresentSurfaceCapabilitiesKHR { VkStructureType sType; void* pNext; VkImageUsageFlags sharedPresentSupportedUsageFlags; } VkSharedPresentSurfaceCapabilitiesKHR; typedef VkResult (VKAPI_PTR *PFN_vkGetSwapchainStatusKHR)(VkDevice device, VkSwapchainKHR swapchain); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkGetSwapchainStatusKHR( VkDevice device, VkSwapchainKHR swapchain); #endif // VK_KHR_external_fence_capabilities is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_external_fence_capabilities 1 #define VK_KHR_EXTERNAL_FENCE_CAPABILITIES_SPEC_VERSION 1 #define VK_KHR_EXTERNAL_FENCE_CAPABILITIES_EXTENSION_NAME "VK_KHR_external_fence_capabilities" typedef VkExternalFenceHandleTypeFlags VkExternalFenceHandleTypeFlagsKHR; typedef VkExternalFenceHandleTypeFlagBits VkExternalFenceHandleTypeFlagBitsKHR; typedef VkExternalFenceFeatureFlags VkExternalFenceFeatureFlagsKHR; typedef VkExternalFenceFeatureFlagBits VkExternalFenceFeatureFlagBitsKHR; typedef VkPhysicalDeviceExternalFenceInfo VkPhysicalDeviceExternalFenceInfoKHR; typedef VkExternalFenceProperties VkExternalFencePropertiesKHR; typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceExternalFencePropertiesKHR)(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalFenceInfo* pExternalFenceInfo, VkExternalFenceProperties* pExternalFenceProperties); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceExternalFencePropertiesKHR( VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalFenceInfo* pExternalFenceInfo, VkExternalFenceProperties* pExternalFenceProperties); #endif // VK_KHR_external_fence is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_external_fence 1 #define VK_KHR_EXTERNAL_FENCE_SPEC_VERSION 1 #define VK_KHR_EXTERNAL_FENCE_EXTENSION_NAME "VK_KHR_external_fence" typedef VkFenceImportFlags VkFenceImportFlagsKHR; typedef VkFenceImportFlagBits VkFenceImportFlagBitsKHR; typedef VkExportFenceCreateInfo VkExportFenceCreateInfoKHR; // VK_KHR_external_fence_fd is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_external_fence_fd 1 #define VK_KHR_EXTERNAL_FENCE_FD_SPEC_VERSION 1 #define VK_KHR_EXTERNAL_FENCE_FD_EXTENSION_NAME "VK_KHR_external_fence_fd" typedef struct VkImportFenceFdInfoKHR { VkStructureType sType; const void* pNext; VkFence fence; VkFenceImportFlags flags; VkExternalFenceHandleTypeFlagBits handleType; int fd; } VkImportFenceFdInfoKHR; typedef struct VkFenceGetFdInfoKHR { VkStructureType sType; const void* pNext; VkFence fence; VkExternalFenceHandleTypeFlagBits handleType; } VkFenceGetFdInfoKHR; typedef VkResult (VKAPI_PTR *PFN_vkImportFenceFdKHR)(VkDevice device, const VkImportFenceFdInfoKHR* pImportFenceFdInfo); typedef VkResult (VKAPI_PTR *PFN_vkGetFenceFdKHR)(VkDevice device, const VkFenceGetFdInfoKHR* pGetFdInfo, int* pFd); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkImportFenceFdKHR( VkDevice device, const VkImportFenceFdInfoKHR* pImportFenceFdInfo); VKAPI_ATTR VkResult VKAPI_CALL vkGetFenceFdKHR( VkDevice device, const VkFenceGetFdInfoKHR* pGetFdInfo, int* pFd); #endif // VK_KHR_performance_query is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_performance_query 1 #define VK_KHR_PERFORMANCE_QUERY_SPEC_VERSION 1 #define VK_KHR_PERFORMANCE_QUERY_EXTENSION_NAME "VK_KHR_performance_query" typedef enum VkPerformanceCounterUnitKHR { VK_PERFORMANCE_COUNTER_UNIT_GENERIC_KHR = 0, VK_PERFORMANCE_COUNTER_UNIT_PERCENTAGE_KHR = 1, VK_PERFORMANCE_COUNTER_UNIT_NANOSECONDS_KHR = 2, VK_PERFORMANCE_COUNTER_UNIT_BYTES_KHR = 3, VK_PERFORMANCE_COUNTER_UNIT_BYTES_PER_SECOND_KHR = 4, VK_PERFORMANCE_COUNTER_UNIT_KELVIN_KHR = 5, VK_PERFORMANCE_COUNTER_UNIT_WATTS_KHR = 6, VK_PERFORMANCE_COUNTER_UNIT_VOLTS_KHR = 7, VK_PERFORMANCE_COUNTER_UNIT_AMPS_KHR = 8, VK_PERFORMANCE_COUNTER_UNIT_HERTZ_KHR = 9, VK_PERFORMANCE_COUNTER_UNIT_CYCLES_KHR = 10, VK_PERFORMANCE_COUNTER_UNIT_MAX_ENUM_KHR = 0x7FFFFFFF } VkPerformanceCounterUnitKHR; typedef enum VkPerformanceCounterScopeKHR { VK_PERFORMANCE_COUNTER_SCOPE_COMMAND_BUFFER_KHR = 0, VK_PERFORMANCE_COUNTER_SCOPE_RENDER_PASS_KHR = 1, VK_PERFORMANCE_COUNTER_SCOPE_COMMAND_KHR = 2, // VK_QUERY_SCOPE_COMMAND_BUFFER_KHR is a deprecated alias VK_QUERY_SCOPE_COMMAND_BUFFER_KHR = VK_PERFORMANCE_COUNTER_SCOPE_COMMAND_BUFFER_KHR, // VK_QUERY_SCOPE_RENDER_PASS_KHR is a deprecated alias VK_QUERY_SCOPE_RENDER_PASS_KHR = VK_PERFORMANCE_COUNTER_SCOPE_RENDER_PASS_KHR, // VK_QUERY_SCOPE_COMMAND_KHR is a deprecated alias VK_QUERY_SCOPE_COMMAND_KHR = VK_PERFORMANCE_COUNTER_SCOPE_COMMAND_KHR, VK_PERFORMANCE_COUNTER_SCOPE_MAX_ENUM_KHR = 0x7FFFFFFF } VkPerformanceCounterScopeKHR; typedef enum VkPerformanceCounterStorageKHR { VK_PERFORMANCE_COUNTER_STORAGE_INT32_KHR = 0, VK_PERFORMANCE_COUNTER_STORAGE_INT64_KHR = 1, VK_PERFORMANCE_COUNTER_STORAGE_UINT32_KHR = 2, VK_PERFORMANCE_COUNTER_STORAGE_UINT64_KHR = 3, VK_PERFORMANCE_COUNTER_STORAGE_FLOAT32_KHR = 4, VK_PERFORMANCE_COUNTER_STORAGE_FLOAT64_KHR = 5, VK_PERFORMANCE_COUNTER_STORAGE_MAX_ENUM_KHR = 0x7FFFFFFF } VkPerformanceCounterStorageKHR; typedef enum VkPerformanceCounterDescriptionFlagBitsKHR { VK_PERFORMANCE_COUNTER_DESCRIPTION_PERFORMANCE_IMPACTING_BIT_KHR = 0x00000001, VK_PERFORMANCE_COUNTER_DESCRIPTION_CONCURRENTLY_IMPACTED_BIT_KHR = 0x00000002, // VK_PERFORMANCE_COUNTER_DESCRIPTION_PERFORMANCE_IMPACTING_KHR is a deprecated alias VK_PERFORMANCE_COUNTER_DESCRIPTION_PERFORMANCE_IMPACTING_KHR = VK_PERFORMANCE_COUNTER_DESCRIPTION_PERFORMANCE_IMPACTING_BIT_KHR, // VK_PERFORMANCE_COUNTER_DESCRIPTION_CONCURRENTLY_IMPACTED_KHR is a deprecated alias VK_PERFORMANCE_COUNTER_DESCRIPTION_CONCURRENTLY_IMPACTED_KHR = VK_PERFORMANCE_COUNTER_DESCRIPTION_CONCURRENTLY_IMPACTED_BIT_KHR, VK_PERFORMANCE_COUNTER_DESCRIPTION_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF } VkPerformanceCounterDescriptionFlagBitsKHR; typedef VkFlags VkPerformanceCounterDescriptionFlagsKHR; typedef enum VkAcquireProfilingLockFlagBitsKHR { VK_ACQUIRE_PROFILING_LOCK_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF } VkAcquireProfilingLockFlagBitsKHR; typedef VkFlags VkAcquireProfilingLockFlagsKHR; typedef struct VkPhysicalDevicePerformanceQueryFeaturesKHR { VkStructureType sType; void* pNext; VkBool32 performanceCounterQueryPools; VkBool32 performanceCounterMultipleQueryPools; } VkPhysicalDevicePerformanceQueryFeaturesKHR; typedef struct VkPhysicalDevicePerformanceQueryPropertiesKHR { VkStructureType sType; void* pNext; VkBool32 allowCommandBufferQueryCopies; } VkPhysicalDevicePerformanceQueryPropertiesKHR; typedef struct VkPerformanceCounterKHR { VkStructureType sType; void* pNext; VkPerformanceCounterUnitKHR unit; VkPerformanceCounterScopeKHR scope; VkPerformanceCounterStorageKHR storage; uint8_t uuid[VK_UUID_SIZE]; } VkPerformanceCounterKHR; typedef struct VkPerformanceCounterDescriptionKHR { VkStructureType sType; void* pNext; VkPerformanceCounterDescriptionFlagsKHR flags; char name[VK_MAX_DESCRIPTION_SIZE]; char category[VK_MAX_DESCRIPTION_SIZE]; char description[VK_MAX_DESCRIPTION_SIZE]; } VkPerformanceCounterDescriptionKHR; typedef struct VkQueryPoolPerformanceCreateInfoKHR { VkStructureType sType; const void* pNext; uint32_t queueFamilyIndex; uint32_t counterIndexCount; const uint32_t* pCounterIndices; } VkQueryPoolPerformanceCreateInfoKHR; typedef union VkPerformanceCounterResultKHR { int32_t int32; int64_t int64; uint32_t uint32; uint64_t uint64; float float32; double float64; } VkPerformanceCounterResultKHR; typedef struct VkAcquireProfilingLockInfoKHR { VkStructureType sType; const void* pNext; VkAcquireProfilingLockFlagsKHR flags; uint64_t timeout; } VkAcquireProfilingLockInfoKHR; typedef struct VkPerformanceQuerySubmitInfoKHR { VkStructureType sType; const void* pNext; uint32_t counterPassIndex; } VkPerformanceQuerySubmitInfoKHR; typedef VkResult (VKAPI_PTR *PFN_vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, uint32_t* pCounterCount, VkPerformanceCounterKHR* pCounters, VkPerformanceCounterDescriptionKHR* pCounterDescriptions); typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR)(VkPhysicalDevice physicalDevice, const VkQueryPoolPerformanceCreateInfoKHR* pPerformanceQueryCreateInfo, uint32_t* pNumPasses); typedef VkResult (VKAPI_PTR *PFN_vkAcquireProfilingLockKHR)(VkDevice device, const VkAcquireProfilingLockInfoKHR* pInfo); typedef void (VKAPI_PTR *PFN_vkReleaseProfilingLockKHR)(VkDevice device); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR( VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, uint32_t* pCounterCount, VkPerformanceCounterKHR* pCounters, VkPerformanceCounterDescriptionKHR* pCounterDescriptions); VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR( VkPhysicalDevice physicalDevice, const VkQueryPoolPerformanceCreateInfoKHR* pPerformanceQueryCreateInfo, uint32_t* pNumPasses); VKAPI_ATTR VkResult VKAPI_CALL vkAcquireProfilingLockKHR( VkDevice device, const VkAcquireProfilingLockInfoKHR* pInfo); VKAPI_ATTR void VKAPI_CALL vkReleaseProfilingLockKHR( VkDevice device); #endif // VK_KHR_maintenance2 is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_maintenance2 1 #define VK_KHR_MAINTENANCE_2_SPEC_VERSION 1 #define VK_KHR_MAINTENANCE_2_EXTENSION_NAME "VK_KHR_maintenance2" // VK_KHR_MAINTENANCE2_SPEC_VERSION is a deprecated alias #define VK_KHR_MAINTENANCE2_SPEC_VERSION VK_KHR_MAINTENANCE_2_SPEC_VERSION // VK_KHR_MAINTENANCE2_EXTENSION_NAME is a deprecated alias #define VK_KHR_MAINTENANCE2_EXTENSION_NAME VK_KHR_MAINTENANCE_2_EXTENSION_NAME typedef VkPointClippingBehavior VkPointClippingBehaviorKHR; typedef VkTessellationDomainOrigin VkTessellationDomainOriginKHR; typedef VkPhysicalDevicePointClippingProperties VkPhysicalDevicePointClippingPropertiesKHR; typedef VkRenderPassInputAttachmentAspectCreateInfo VkRenderPassInputAttachmentAspectCreateInfoKHR; typedef VkInputAttachmentAspectReference VkInputAttachmentAspectReferenceKHR; typedef VkImageViewUsageCreateInfo VkImageViewUsageCreateInfoKHR; typedef VkPipelineTessellationDomainOriginStateCreateInfo VkPipelineTessellationDomainOriginStateCreateInfoKHR; // VK_KHR_get_surface_capabilities2 is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_get_surface_capabilities2 1 #define VK_KHR_GET_SURFACE_CAPABILITIES_2_SPEC_VERSION 1 #define VK_KHR_GET_SURFACE_CAPABILITIES_2_EXTENSION_NAME "VK_KHR_get_surface_capabilities2" typedef struct VkPhysicalDeviceSurfaceInfo2KHR { VkStructureType sType; const void* pNext; VkSurfaceKHR surface; } VkPhysicalDeviceSurfaceInfo2KHR; typedef struct VkSurfaceCapabilities2KHR { VkStructureType sType; void* pNext; VkSurfaceCapabilitiesKHR surfaceCapabilities; } VkSurfaceCapabilities2KHR; typedef struct VkSurfaceFormat2KHR { VkStructureType sType; void* pNext; VkSurfaceFormatKHR surfaceFormat; } VkSurfaceFormat2KHR; typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceSurfaceCapabilities2KHR)(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, VkSurfaceCapabilities2KHR* pSurfaceCapabilities); typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceSurfaceFormats2KHR)(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, uint32_t* pSurfaceFormatCount, VkSurfaceFormat2KHR* pSurfaceFormats); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfaceCapabilities2KHR( VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, VkSurfaceCapabilities2KHR* pSurfaceCapabilities); VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfaceFormats2KHR( VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, uint32_t* pSurfaceFormatCount, VkSurfaceFormat2KHR* pSurfaceFormats); #endif // VK_KHR_variable_pointers is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_variable_pointers 1 #define VK_KHR_VARIABLE_POINTERS_SPEC_VERSION 1 #define VK_KHR_VARIABLE_POINTERS_EXTENSION_NAME "VK_KHR_variable_pointers" typedef VkPhysicalDeviceVariablePointersFeatures VkPhysicalDeviceVariablePointerFeaturesKHR; typedef VkPhysicalDeviceVariablePointersFeatures VkPhysicalDeviceVariablePointersFeaturesKHR; // VK_KHR_get_display_properties2 is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_get_display_properties2 1 #define VK_KHR_GET_DISPLAY_PROPERTIES_2_SPEC_VERSION 1 #define VK_KHR_GET_DISPLAY_PROPERTIES_2_EXTENSION_NAME "VK_KHR_get_display_properties2" typedef struct VkDisplayProperties2KHR { VkStructureType sType; void* pNext; VkDisplayPropertiesKHR displayProperties; } VkDisplayProperties2KHR; typedef struct VkDisplayPlaneProperties2KHR { VkStructureType sType; void* pNext; VkDisplayPlanePropertiesKHR displayPlaneProperties; } VkDisplayPlaneProperties2KHR; typedef struct VkDisplayModeProperties2KHR { VkStructureType sType; void* pNext; VkDisplayModePropertiesKHR displayModeProperties; } VkDisplayModeProperties2KHR; typedef struct VkDisplayPlaneInfo2KHR { VkStructureType sType; const void* pNext; VkDisplayModeKHR mode; uint32_t planeIndex; } VkDisplayPlaneInfo2KHR; typedef struct VkDisplayPlaneCapabilities2KHR { VkStructureType sType; void* pNext; VkDisplayPlaneCapabilitiesKHR capabilities; } VkDisplayPlaneCapabilities2KHR; typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceDisplayProperties2KHR)(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkDisplayProperties2KHR* pProperties); typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceDisplayPlaneProperties2KHR)(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkDisplayPlaneProperties2KHR* pProperties); typedef VkResult (VKAPI_PTR *PFN_vkGetDisplayModeProperties2KHR)(VkPhysicalDevice physicalDevice, VkDisplayKHR display, uint32_t* pPropertyCount, VkDisplayModeProperties2KHR* pProperties); typedef VkResult (VKAPI_PTR *PFN_vkGetDisplayPlaneCapabilities2KHR)(VkPhysicalDevice physicalDevice, const VkDisplayPlaneInfo2KHR* pDisplayPlaneInfo, VkDisplayPlaneCapabilities2KHR* pCapabilities); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceDisplayProperties2KHR( VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkDisplayProperties2KHR* pProperties); VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceDisplayPlaneProperties2KHR( VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkDisplayPlaneProperties2KHR* pProperties); VKAPI_ATTR VkResult VKAPI_CALL vkGetDisplayModeProperties2KHR( VkPhysicalDevice physicalDevice, VkDisplayKHR display, uint32_t* pPropertyCount, VkDisplayModeProperties2KHR* pProperties); VKAPI_ATTR VkResult VKAPI_CALL vkGetDisplayPlaneCapabilities2KHR( VkPhysicalDevice physicalDevice, const VkDisplayPlaneInfo2KHR* pDisplayPlaneInfo, VkDisplayPlaneCapabilities2KHR* pCapabilities); #endif // VK_KHR_dedicated_allocation is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_dedicated_allocation 1 #define VK_KHR_DEDICATED_ALLOCATION_SPEC_VERSION 3 #define VK_KHR_DEDICATED_ALLOCATION_EXTENSION_NAME "VK_KHR_dedicated_allocation" typedef VkMemoryDedicatedRequirements VkMemoryDedicatedRequirementsKHR; typedef VkMemoryDedicatedAllocateInfo VkMemoryDedicatedAllocateInfoKHR; // VK_KHR_storage_buffer_storage_class is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_storage_buffer_storage_class 1 #define VK_KHR_STORAGE_BUFFER_STORAGE_CLASS_SPEC_VERSION 1 #define VK_KHR_STORAGE_BUFFER_STORAGE_CLASS_EXTENSION_NAME "VK_KHR_storage_buffer_storage_class" // VK_KHR_relaxed_block_layout is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_relaxed_block_layout 1 #define VK_KHR_RELAXED_BLOCK_LAYOUT_SPEC_VERSION 1 #define VK_KHR_RELAXED_BLOCK_LAYOUT_EXTENSION_NAME "VK_KHR_relaxed_block_layout" // VK_KHR_get_memory_requirements2 is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_get_memory_requirements2 1 #define VK_KHR_GET_MEMORY_REQUIREMENTS_2_SPEC_VERSION 1 #define VK_KHR_GET_MEMORY_REQUIREMENTS_2_EXTENSION_NAME "VK_KHR_get_memory_requirements2" typedef VkBufferMemoryRequirementsInfo2 VkBufferMemoryRequirementsInfo2KHR; typedef VkImageMemoryRequirementsInfo2 VkImageMemoryRequirementsInfo2KHR; typedef VkImageSparseMemoryRequirementsInfo2 VkImageSparseMemoryRequirementsInfo2KHR; typedef VkMemoryRequirements2 VkMemoryRequirements2KHR; typedef VkSparseImageMemoryRequirements2 VkSparseImageMemoryRequirements2KHR; typedef void (VKAPI_PTR *PFN_vkGetImageMemoryRequirements2KHR)(VkDevice device, const VkImageMemoryRequirementsInfo2* pInfo, VkMemoryRequirements2* pMemoryRequirements); typedef void (VKAPI_PTR *PFN_vkGetBufferMemoryRequirements2KHR)(VkDevice device, const VkBufferMemoryRequirementsInfo2* pInfo, VkMemoryRequirements2* pMemoryRequirements); typedef void (VKAPI_PTR *PFN_vkGetImageSparseMemoryRequirements2KHR)(VkDevice device, const VkImageSparseMemoryRequirementsInfo2* pInfo, uint32_t* pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements2* pSparseMemoryRequirements); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR void VKAPI_CALL vkGetImageMemoryRequirements2KHR( VkDevice device, const VkImageMemoryRequirementsInfo2* pInfo, VkMemoryRequirements2* pMemoryRequirements); VKAPI_ATTR void VKAPI_CALL vkGetBufferMemoryRequirements2KHR( VkDevice device, const VkBufferMemoryRequirementsInfo2* pInfo, VkMemoryRequirements2* pMemoryRequirements); VKAPI_ATTR void VKAPI_CALL vkGetImageSparseMemoryRequirements2KHR( VkDevice device, const VkImageSparseMemoryRequirementsInfo2* pInfo, uint32_t* pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements2* pSparseMemoryRequirements); #endif // VK_KHR_image_format_list is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_image_format_list 1 #define VK_KHR_IMAGE_FORMAT_LIST_SPEC_VERSION 1 #define VK_KHR_IMAGE_FORMAT_LIST_EXTENSION_NAME "VK_KHR_image_format_list" typedef VkImageFormatListCreateInfo VkImageFormatListCreateInfoKHR; // VK_KHR_sampler_ycbcr_conversion is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_sampler_ycbcr_conversion 1 typedef VkSamplerYcbcrConversion VkSamplerYcbcrConversionKHR; #define VK_KHR_SAMPLER_YCBCR_CONVERSION_SPEC_VERSION 14 #define VK_KHR_SAMPLER_YCBCR_CONVERSION_EXTENSION_NAME "VK_KHR_sampler_ycbcr_conversion" typedef VkSamplerYcbcrModelConversion VkSamplerYcbcrModelConversionKHR; typedef VkSamplerYcbcrRange VkSamplerYcbcrRangeKHR; typedef VkChromaLocation VkChromaLocationKHR; typedef VkSamplerYcbcrConversionCreateInfo VkSamplerYcbcrConversionCreateInfoKHR; typedef VkSamplerYcbcrConversionInfo VkSamplerYcbcrConversionInfoKHR; typedef VkBindImagePlaneMemoryInfo VkBindImagePlaneMemoryInfoKHR; typedef VkImagePlaneMemoryRequirementsInfo VkImagePlaneMemoryRequirementsInfoKHR; typedef VkPhysicalDeviceSamplerYcbcrConversionFeatures VkPhysicalDeviceSamplerYcbcrConversionFeaturesKHR; typedef VkSamplerYcbcrConversionImageFormatProperties VkSamplerYcbcrConversionImageFormatPropertiesKHR; typedef VkResult (VKAPI_PTR *PFN_vkCreateSamplerYcbcrConversionKHR)(VkDevice device, const VkSamplerYcbcrConversionCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSamplerYcbcrConversion* pYcbcrConversion); typedef void (VKAPI_PTR *PFN_vkDestroySamplerYcbcrConversionKHR)(VkDevice device, VkSamplerYcbcrConversion ycbcrConversion, const VkAllocationCallbacks* pAllocator); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkCreateSamplerYcbcrConversionKHR( VkDevice device, const VkSamplerYcbcrConversionCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSamplerYcbcrConversion* pYcbcrConversion); VKAPI_ATTR void VKAPI_CALL vkDestroySamplerYcbcrConversionKHR( VkDevice device, VkSamplerYcbcrConversion ycbcrConversion, const VkAllocationCallbacks* pAllocator); #endif // VK_KHR_bind_memory2 is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_bind_memory2 1 #define VK_KHR_BIND_MEMORY_2_SPEC_VERSION 1 #define VK_KHR_BIND_MEMORY_2_EXTENSION_NAME "VK_KHR_bind_memory2" typedef VkBindBufferMemoryInfo VkBindBufferMemoryInfoKHR; typedef VkBindImageMemoryInfo VkBindImageMemoryInfoKHR; typedef VkResult (VKAPI_PTR *PFN_vkBindBufferMemory2KHR)(VkDevice device, uint32_t bindInfoCount, const VkBindBufferMemoryInfo* pBindInfos); typedef VkResult (VKAPI_PTR *PFN_vkBindImageMemory2KHR)(VkDevice device, uint32_t bindInfoCount, const VkBindImageMemoryInfo* pBindInfos); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkBindBufferMemory2KHR( VkDevice device, uint32_t bindInfoCount, const VkBindBufferMemoryInfo* pBindInfos); VKAPI_ATTR VkResult VKAPI_CALL vkBindImageMemory2KHR( VkDevice device, uint32_t bindInfoCount, const VkBindImageMemoryInfo* pBindInfos); #endif // VK_KHR_maintenance3 is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_maintenance3 1 #define VK_KHR_MAINTENANCE_3_SPEC_VERSION 1 #define VK_KHR_MAINTENANCE_3_EXTENSION_NAME "VK_KHR_maintenance3" // VK_KHR_MAINTENANCE3_SPEC_VERSION is a deprecated alias #define VK_KHR_MAINTENANCE3_SPEC_VERSION VK_KHR_MAINTENANCE_3_SPEC_VERSION // VK_KHR_MAINTENANCE3_EXTENSION_NAME is a deprecated alias #define VK_KHR_MAINTENANCE3_EXTENSION_NAME VK_KHR_MAINTENANCE_3_EXTENSION_NAME typedef VkPhysicalDeviceMaintenance3Properties VkPhysicalDeviceMaintenance3PropertiesKHR; typedef VkDescriptorSetLayoutSupport VkDescriptorSetLayoutSupportKHR; typedef void (VKAPI_PTR *PFN_vkGetDescriptorSetLayoutSupportKHR)(VkDevice device, const VkDescriptorSetLayoutCreateInfo* pCreateInfo, VkDescriptorSetLayoutSupport* pSupport); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR void VKAPI_CALL vkGetDescriptorSetLayoutSupportKHR( VkDevice device, const VkDescriptorSetLayoutCreateInfo* pCreateInfo, VkDescriptorSetLayoutSupport* pSupport); #endif // VK_KHR_draw_indirect_count is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_draw_indirect_count 1 #define VK_KHR_DRAW_INDIRECT_COUNT_SPEC_VERSION 1 #define VK_KHR_DRAW_INDIRECT_COUNT_EXTENSION_NAME "VK_KHR_draw_indirect_count" typedef void (VKAPI_PTR *PFN_vkCmdDrawIndirectCountKHR)(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride); typedef void (VKAPI_PTR *PFN_vkCmdDrawIndexedIndirectCountKHR)(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR void VKAPI_CALL vkCmdDrawIndirectCountKHR( VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride); VKAPI_ATTR void VKAPI_CALL vkCmdDrawIndexedIndirectCountKHR( VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride); #endif // VK_KHR_shader_subgroup_extended_types is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_shader_subgroup_extended_types 1 #define VK_KHR_SHADER_SUBGROUP_EXTENDED_TYPES_SPEC_VERSION 1 #define VK_KHR_SHADER_SUBGROUP_EXTENDED_TYPES_EXTENSION_NAME "VK_KHR_shader_subgroup_extended_types" typedef VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures VkPhysicalDeviceShaderSubgroupExtendedTypesFeaturesKHR; // VK_KHR_8bit_storage is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_8bit_storage 1 #define VK_KHR_8BIT_STORAGE_SPEC_VERSION 1 #define VK_KHR_8BIT_STORAGE_EXTENSION_NAME "VK_KHR_8bit_storage" typedef VkPhysicalDevice8BitStorageFeatures VkPhysicalDevice8BitStorageFeaturesKHR; // VK_KHR_shader_atomic_int64 is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_shader_atomic_int64 1 #define VK_KHR_SHADER_ATOMIC_INT64_SPEC_VERSION 1 #define VK_KHR_SHADER_ATOMIC_INT64_EXTENSION_NAME "VK_KHR_shader_atomic_int64" typedef VkPhysicalDeviceShaderAtomicInt64Features VkPhysicalDeviceShaderAtomicInt64FeaturesKHR; // VK_KHR_shader_clock is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_shader_clock 1 #define VK_KHR_SHADER_CLOCK_SPEC_VERSION 1 #define VK_KHR_SHADER_CLOCK_EXTENSION_NAME "VK_KHR_shader_clock" typedef struct VkPhysicalDeviceShaderClockFeaturesKHR { VkStructureType sType; void* pNext; VkBool32 shaderSubgroupClock; VkBool32 shaderDeviceClock; } VkPhysicalDeviceShaderClockFeaturesKHR; // VK_KHR_video_decode_h265 is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_video_decode_h265 1 #include "vk_video/vulkan_video_codec_h265std_decode.h" #define VK_KHR_VIDEO_DECODE_H265_SPEC_VERSION 8 #define VK_KHR_VIDEO_DECODE_H265_EXTENSION_NAME "VK_KHR_video_decode_h265" typedef struct VkVideoDecodeH265ProfileInfoKHR { VkStructureType sType; const void* pNext; StdVideoH265ProfileIdc stdProfileIdc; } VkVideoDecodeH265ProfileInfoKHR; typedef struct VkVideoDecodeH265CapabilitiesKHR { VkStructureType sType; void* pNext; StdVideoH265LevelIdc maxLevelIdc; } VkVideoDecodeH265CapabilitiesKHR; typedef struct VkVideoDecodeH265SessionParametersAddInfoKHR { VkStructureType sType; const void* pNext; uint32_t stdVPSCount; const StdVideoH265VideoParameterSet* pStdVPSs; uint32_t stdSPSCount; const StdVideoH265SequenceParameterSet* pStdSPSs; uint32_t stdPPSCount; const StdVideoH265PictureParameterSet* pStdPPSs; } VkVideoDecodeH265SessionParametersAddInfoKHR; typedef struct VkVideoDecodeH265SessionParametersCreateInfoKHR { VkStructureType sType; const void* pNext; uint32_t maxStdVPSCount; uint32_t maxStdSPSCount; uint32_t maxStdPPSCount; const VkVideoDecodeH265SessionParametersAddInfoKHR* pParametersAddInfo; } VkVideoDecodeH265SessionParametersCreateInfoKHR; typedef struct VkVideoDecodeH265PictureInfoKHR { VkStructureType sType; const void* pNext; const StdVideoDecodeH265PictureInfo* pStdPictureInfo; uint32_t sliceSegmentCount; const uint32_t* pSliceSegmentOffsets; } VkVideoDecodeH265PictureInfoKHR; typedef struct VkVideoDecodeH265DpbSlotInfoKHR { VkStructureType sType; const void* pNext; const StdVideoDecodeH265ReferenceInfo* pStdReferenceInfo; } VkVideoDecodeH265DpbSlotInfoKHR; // VK_KHR_global_priority is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_global_priority 1 #define VK_KHR_GLOBAL_PRIORITY_SPEC_VERSION 1 #define VK_KHR_GLOBAL_PRIORITY_EXTENSION_NAME "VK_KHR_global_priority" #define VK_MAX_GLOBAL_PRIORITY_SIZE_KHR VK_MAX_GLOBAL_PRIORITY_SIZE typedef VkQueueGlobalPriority VkQueueGlobalPriorityKHR; typedef VkDeviceQueueGlobalPriorityCreateInfo VkDeviceQueueGlobalPriorityCreateInfoKHR; typedef VkPhysicalDeviceGlobalPriorityQueryFeatures VkPhysicalDeviceGlobalPriorityQueryFeaturesKHR; typedef VkQueueFamilyGlobalPriorityProperties VkQueueFamilyGlobalPriorityPropertiesKHR; // VK_KHR_driver_properties is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_driver_properties 1 #define VK_KHR_DRIVER_PROPERTIES_SPEC_VERSION 1 #define VK_KHR_DRIVER_PROPERTIES_EXTENSION_NAME "VK_KHR_driver_properties" #define VK_MAX_DRIVER_NAME_SIZE_KHR VK_MAX_DRIVER_NAME_SIZE #define VK_MAX_DRIVER_INFO_SIZE_KHR VK_MAX_DRIVER_INFO_SIZE typedef VkDriverId VkDriverIdKHR; typedef VkConformanceVersion VkConformanceVersionKHR; typedef VkPhysicalDeviceDriverProperties VkPhysicalDeviceDriverPropertiesKHR; // VK_KHR_shader_float_controls is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_shader_float_controls 1 #define VK_KHR_SHADER_FLOAT_CONTROLS_SPEC_VERSION 4 #define VK_KHR_SHADER_FLOAT_CONTROLS_EXTENSION_NAME "VK_KHR_shader_float_controls" typedef VkShaderFloatControlsIndependence VkShaderFloatControlsIndependenceKHR; typedef VkPhysicalDeviceFloatControlsProperties VkPhysicalDeviceFloatControlsPropertiesKHR; // VK_KHR_depth_stencil_resolve is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_depth_stencil_resolve 1 #define VK_KHR_DEPTH_STENCIL_RESOLVE_SPEC_VERSION 1 #define VK_KHR_DEPTH_STENCIL_RESOLVE_EXTENSION_NAME "VK_KHR_depth_stencil_resolve" typedef VkResolveModeFlagBits VkResolveModeFlagBitsKHR; typedef VkResolveModeFlags VkResolveModeFlagsKHR; typedef VkSubpassDescriptionDepthStencilResolve VkSubpassDescriptionDepthStencilResolveKHR; typedef VkPhysicalDeviceDepthStencilResolveProperties VkPhysicalDeviceDepthStencilResolvePropertiesKHR; // VK_KHR_swapchain_mutable_format is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_swapchain_mutable_format 1 #define VK_KHR_SWAPCHAIN_MUTABLE_FORMAT_SPEC_VERSION 1 #define VK_KHR_SWAPCHAIN_MUTABLE_FORMAT_EXTENSION_NAME "VK_KHR_swapchain_mutable_format" // VK_KHR_timeline_semaphore is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_timeline_semaphore 1 #define VK_KHR_TIMELINE_SEMAPHORE_SPEC_VERSION 2 #define VK_KHR_TIMELINE_SEMAPHORE_EXTENSION_NAME "VK_KHR_timeline_semaphore" typedef VkSemaphoreType VkSemaphoreTypeKHR; typedef VkSemaphoreWaitFlagBits VkSemaphoreWaitFlagBitsKHR; typedef VkSemaphoreWaitFlags VkSemaphoreWaitFlagsKHR; typedef VkPhysicalDeviceTimelineSemaphoreFeatures VkPhysicalDeviceTimelineSemaphoreFeaturesKHR; typedef VkPhysicalDeviceTimelineSemaphoreProperties VkPhysicalDeviceTimelineSemaphorePropertiesKHR; typedef VkSemaphoreTypeCreateInfo VkSemaphoreTypeCreateInfoKHR; typedef VkTimelineSemaphoreSubmitInfo VkTimelineSemaphoreSubmitInfoKHR; typedef VkSemaphoreWaitInfo VkSemaphoreWaitInfoKHR; typedef VkSemaphoreSignalInfo VkSemaphoreSignalInfoKHR; typedef VkResult (VKAPI_PTR *PFN_vkGetSemaphoreCounterValueKHR)(VkDevice device, VkSemaphore semaphore, uint64_t* pValue); typedef VkResult (VKAPI_PTR *PFN_vkWaitSemaphoresKHR)(VkDevice device, const VkSemaphoreWaitInfo* pWaitInfo, uint64_t timeout); typedef VkResult (VKAPI_PTR *PFN_vkSignalSemaphoreKHR)(VkDevice device, const VkSemaphoreSignalInfo* pSignalInfo); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkGetSemaphoreCounterValueKHR( VkDevice device, VkSemaphore semaphore, uint64_t* pValue); VKAPI_ATTR VkResult VKAPI_CALL vkWaitSemaphoresKHR( VkDevice device, const VkSemaphoreWaitInfo* pWaitInfo, uint64_t timeout); VKAPI_ATTR VkResult VKAPI_CALL vkSignalSemaphoreKHR( VkDevice device, const VkSemaphoreSignalInfo* pSignalInfo); #endif // VK_KHR_vulkan_memory_model is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_vulkan_memory_model 1 #define VK_KHR_VULKAN_MEMORY_MODEL_SPEC_VERSION 3 #define VK_KHR_VULKAN_MEMORY_MODEL_EXTENSION_NAME "VK_KHR_vulkan_memory_model" typedef VkPhysicalDeviceVulkanMemoryModelFeatures VkPhysicalDeviceVulkanMemoryModelFeaturesKHR; // VK_KHR_shader_terminate_invocation is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_shader_terminate_invocation 1 #define VK_KHR_SHADER_TERMINATE_INVOCATION_SPEC_VERSION 1 #define VK_KHR_SHADER_TERMINATE_INVOCATION_EXTENSION_NAME "VK_KHR_shader_terminate_invocation" typedef VkPhysicalDeviceShaderTerminateInvocationFeatures VkPhysicalDeviceShaderTerminateInvocationFeaturesKHR; // VK_KHR_fragment_shading_rate is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_fragment_shading_rate 1 #define VK_KHR_FRAGMENT_SHADING_RATE_SPEC_VERSION 2 #define VK_KHR_FRAGMENT_SHADING_RATE_EXTENSION_NAME "VK_KHR_fragment_shading_rate" typedef enum VkFragmentShadingRateCombinerOpKHR { VK_FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR = 0, VK_FRAGMENT_SHADING_RATE_COMBINER_OP_REPLACE_KHR = 1, VK_FRAGMENT_SHADING_RATE_COMBINER_OP_MIN_KHR = 2, VK_FRAGMENT_SHADING_RATE_COMBINER_OP_MAX_KHR = 3, VK_FRAGMENT_SHADING_RATE_COMBINER_OP_MUL_KHR = 4, VK_FRAGMENT_SHADING_RATE_COMBINER_OP_MAX_ENUM_KHR = 0x7FFFFFFF } VkFragmentShadingRateCombinerOpKHR; typedef struct VkFragmentShadingRateAttachmentInfoKHR { VkStructureType sType; const void* pNext; const VkAttachmentReference2* pFragmentShadingRateAttachment; VkExtent2D shadingRateAttachmentTexelSize; } VkFragmentShadingRateAttachmentInfoKHR; typedef struct VkPipelineFragmentShadingRateStateCreateInfoKHR { VkStructureType sType; const void* pNext; VkExtent2D fragmentSize; VkFragmentShadingRateCombinerOpKHR combinerOps[2]; } VkPipelineFragmentShadingRateStateCreateInfoKHR; typedef struct VkPhysicalDeviceFragmentShadingRateFeaturesKHR { VkStructureType sType; void* pNext; VkBool32 pipelineFragmentShadingRate; VkBool32 primitiveFragmentShadingRate; VkBool32 attachmentFragmentShadingRate; } VkPhysicalDeviceFragmentShadingRateFeaturesKHR; typedef struct VkPhysicalDeviceFragmentShadingRatePropertiesKHR { VkStructureType sType; void* pNext; VkExtent2D minFragmentShadingRateAttachmentTexelSize; VkExtent2D maxFragmentShadingRateAttachmentTexelSize; uint32_t maxFragmentShadingRateAttachmentTexelSizeAspectRatio; VkBool32 primitiveFragmentShadingRateWithMultipleViewports; VkBool32 layeredShadingRateAttachments; VkBool32 fragmentShadingRateNonTrivialCombinerOps; VkExtent2D maxFragmentSize; uint32_t maxFragmentSizeAspectRatio; uint32_t maxFragmentShadingRateCoverageSamples; VkSampleCountFlagBits maxFragmentShadingRateRasterizationSamples; VkBool32 fragmentShadingRateWithShaderDepthStencilWrites; VkBool32 fragmentShadingRateWithSampleMask; VkBool32 fragmentShadingRateWithShaderSampleMask; VkBool32 fragmentShadingRateWithConservativeRasterization; VkBool32 fragmentShadingRateWithFragmentShaderInterlock; VkBool32 fragmentShadingRateWithCustomSampleLocations; VkBool32 fragmentShadingRateStrictMultiplyCombiner; } VkPhysicalDeviceFragmentShadingRatePropertiesKHR; typedef struct VkPhysicalDeviceFragmentShadingRateKHR { VkStructureType sType; void* pNext; VkSampleCountFlags sampleCounts; VkExtent2D fragmentSize; } VkPhysicalDeviceFragmentShadingRateKHR; typedef struct VkRenderingFragmentShadingRateAttachmentInfoKHR { VkStructureType sType; const void* pNext; VkImageView imageView; VkImageLayout imageLayout; VkExtent2D shadingRateAttachmentTexelSize; } VkRenderingFragmentShadingRateAttachmentInfoKHR; typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceFragmentShadingRatesKHR)(VkPhysicalDevice physicalDevice, uint32_t* pFragmentShadingRateCount, VkPhysicalDeviceFragmentShadingRateKHR* pFragmentShadingRates); typedef void (VKAPI_PTR *PFN_vkCmdSetFragmentShadingRateKHR)(VkCommandBuffer commandBuffer, const VkExtent2D* pFragmentSize, const VkFragmentShadingRateCombinerOpKHR combinerOps[2]); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceFragmentShadingRatesKHR( VkPhysicalDevice physicalDevice, uint32_t* pFragmentShadingRateCount, VkPhysicalDeviceFragmentShadingRateKHR* pFragmentShadingRates); VKAPI_ATTR void VKAPI_CALL vkCmdSetFragmentShadingRateKHR( VkCommandBuffer commandBuffer, const VkExtent2D* pFragmentSize, const VkFragmentShadingRateCombinerOpKHR combinerOps[2]); #endif // VK_KHR_dynamic_rendering_local_read is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_dynamic_rendering_local_read 1 #define VK_KHR_DYNAMIC_RENDERING_LOCAL_READ_SPEC_VERSION 1 #define VK_KHR_DYNAMIC_RENDERING_LOCAL_READ_EXTENSION_NAME "VK_KHR_dynamic_rendering_local_read" typedef VkPhysicalDeviceDynamicRenderingLocalReadFeatures VkPhysicalDeviceDynamicRenderingLocalReadFeaturesKHR; typedef VkRenderingAttachmentLocationInfo VkRenderingAttachmentLocationInfoKHR; typedef VkRenderingInputAttachmentIndexInfo VkRenderingInputAttachmentIndexInfoKHR; typedef void (VKAPI_PTR *PFN_vkCmdSetRenderingAttachmentLocationsKHR)(VkCommandBuffer commandBuffer, const VkRenderingAttachmentLocationInfo* pLocationInfo); typedef void (VKAPI_PTR *PFN_vkCmdSetRenderingInputAttachmentIndicesKHR)(VkCommandBuffer commandBuffer, const VkRenderingInputAttachmentIndexInfo* pInputAttachmentIndexInfo); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR void VKAPI_CALL vkCmdSetRenderingAttachmentLocationsKHR( VkCommandBuffer commandBuffer, const VkRenderingAttachmentLocationInfo* pLocationInfo); VKAPI_ATTR void VKAPI_CALL vkCmdSetRenderingInputAttachmentIndicesKHR( VkCommandBuffer commandBuffer, const VkRenderingInputAttachmentIndexInfo* pInputAttachmentIndexInfo); #endif // VK_KHR_shader_quad_control is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_shader_quad_control 1 #define VK_KHR_SHADER_QUAD_CONTROL_SPEC_VERSION 1 #define VK_KHR_SHADER_QUAD_CONTROL_EXTENSION_NAME "VK_KHR_shader_quad_control" typedef struct VkPhysicalDeviceShaderQuadControlFeaturesKHR { VkStructureType sType; void* pNext; VkBool32 shaderQuadControl; } VkPhysicalDeviceShaderQuadControlFeaturesKHR; // VK_KHR_spirv_1_4 is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_spirv_1_4 1 #define VK_KHR_SPIRV_1_4_SPEC_VERSION 1 #define VK_KHR_SPIRV_1_4_EXTENSION_NAME "VK_KHR_spirv_1_4" // VK_KHR_surface_protected_capabilities is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_surface_protected_capabilities 1 #define VK_KHR_SURFACE_PROTECTED_CAPABILITIES_SPEC_VERSION 1 #define VK_KHR_SURFACE_PROTECTED_CAPABILITIES_EXTENSION_NAME "VK_KHR_surface_protected_capabilities" typedef struct VkSurfaceProtectedCapabilitiesKHR { VkStructureType sType; const void* pNext; VkBool32 supportsProtected; } VkSurfaceProtectedCapabilitiesKHR; // VK_KHR_separate_depth_stencil_layouts is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_separate_depth_stencil_layouts 1 #define VK_KHR_SEPARATE_DEPTH_STENCIL_LAYOUTS_SPEC_VERSION 1 #define VK_KHR_SEPARATE_DEPTH_STENCIL_LAYOUTS_EXTENSION_NAME "VK_KHR_separate_depth_stencil_layouts" typedef VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures VkPhysicalDeviceSeparateDepthStencilLayoutsFeaturesKHR; typedef VkAttachmentReferenceStencilLayout VkAttachmentReferenceStencilLayoutKHR; typedef VkAttachmentDescriptionStencilLayout VkAttachmentDescriptionStencilLayoutKHR; // VK_KHR_present_wait is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_present_wait 1 #define VK_KHR_PRESENT_WAIT_SPEC_VERSION 1 #define VK_KHR_PRESENT_WAIT_EXTENSION_NAME "VK_KHR_present_wait" typedef struct VkPhysicalDevicePresentWaitFeaturesKHR { VkStructureType sType; void* pNext; VkBool32 presentWait; } VkPhysicalDevicePresentWaitFeaturesKHR; typedef VkResult (VKAPI_PTR *PFN_vkWaitForPresentKHR)(VkDevice device, VkSwapchainKHR swapchain, uint64_t presentId, uint64_t timeout); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkWaitForPresentKHR( VkDevice device, VkSwapchainKHR swapchain, uint64_t presentId, uint64_t timeout); #endif // VK_KHR_uniform_buffer_standard_layout is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_uniform_buffer_standard_layout 1 #define VK_KHR_UNIFORM_BUFFER_STANDARD_LAYOUT_SPEC_VERSION 1 #define VK_KHR_UNIFORM_BUFFER_STANDARD_LAYOUT_EXTENSION_NAME "VK_KHR_uniform_buffer_standard_layout" typedef VkPhysicalDeviceUniformBufferStandardLayoutFeatures VkPhysicalDeviceUniformBufferStandardLayoutFeaturesKHR; // VK_KHR_buffer_device_address is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_buffer_device_address 1 #define VK_KHR_BUFFER_DEVICE_ADDRESS_SPEC_VERSION 1 #define VK_KHR_BUFFER_DEVICE_ADDRESS_EXTENSION_NAME "VK_KHR_buffer_device_address" typedef VkPhysicalDeviceBufferDeviceAddressFeatures VkPhysicalDeviceBufferDeviceAddressFeaturesKHR; typedef VkBufferDeviceAddressInfo VkBufferDeviceAddressInfoKHR; typedef VkBufferOpaqueCaptureAddressCreateInfo VkBufferOpaqueCaptureAddressCreateInfoKHR; typedef VkMemoryOpaqueCaptureAddressAllocateInfo VkMemoryOpaqueCaptureAddressAllocateInfoKHR; typedef VkDeviceMemoryOpaqueCaptureAddressInfo VkDeviceMemoryOpaqueCaptureAddressInfoKHR; typedef VkDeviceAddress (VKAPI_PTR *PFN_vkGetBufferDeviceAddressKHR)(VkDevice device, const VkBufferDeviceAddressInfo* pInfo); typedef uint64_t (VKAPI_PTR *PFN_vkGetBufferOpaqueCaptureAddressKHR)(VkDevice device, const VkBufferDeviceAddressInfo* pInfo); typedef uint64_t (VKAPI_PTR *PFN_vkGetDeviceMemoryOpaqueCaptureAddressKHR)(VkDevice device, const VkDeviceMemoryOpaqueCaptureAddressInfo* pInfo); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkDeviceAddress VKAPI_CALL vkGetBufferDeviceAddressKHR( VkDevice device, const VkBufferDeviceAddressInfo* pInfo); VKAPI_ATTR uint64_t VKAPI_CALL vkGetBufferOpaqueCaptureAddressKHR( VkDevice device, const VkBufferDeviceAddressInfo* pInfo); VKAPI_ATTR uint64_t VKAPI_CALL vkGetDeviceMemoryOpaqueCaptureAddressKHR( VkDevice device, const VkDeviceMemoryOpaqueCaptureAddressInfo* pInfo); #endif // VK_KHR_deferred_host_operations is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_deferred_host_operations 1 VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDeferredOperationKHR) #define VK_KHR_DEFERRED_HOST_OPERATIONS_SPEC_VERSION 4 #define VK_KHR_DEFERRED_HOST_OPERATIONS_EXTENSION_NAME "VK_KHR_deferred_host_operations" typedef VkResult (VKAPI_PTR *PFN_vkCreateDeferredOperationKHR)(VkDevice device, const VkAllocationCallbacks* pAllocator, VkDeferredOperationKHR* pDeferredOperation); typedef void (VKAPI_PTR *PFN_vkDestroyDeferredOperationKHR)(VkDevice device, VkDeferredOperationKHR operation, const VkAllocationCallbacks* pAllocator); typedef uint32_t (VKAPI_PTR *PFN_vkGetDeferredOperationMaxConcurrencyKHR)(VkDevice device, VkDeferredOperationKHR operation); typedef VkResult (VKAPI_PTR *PFN_vkGetDeferredOperationResultKHR)(VkDevice device, VkDeferredOperationKHR operation); typedef VkResult (VKAPI_PTR *PFN_vkDeferredOperationJoinKHR)(VkDevice device, VkDeferredOperationKHR operation); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkCreateDeferredOperationKHR( VkDevice device, const VkAllocationCallbacks* pAllocator, VkDeferredOperationKHR* pDeferredOperation); VKAPI_ATTR void VKAPI_CALL vkDestroyDeferredOperationKHR( VkDevice device, VkDeferredOperationKHR operation, const VkAllocationCallbacks* pAllocator); VKAPI_ATTR uint32_t VKAPI_CALL vkGetDeferredOperationMaxConcurrencyKHR( VkDevice device, VkDeferredOperationKHR operation); VKAPI_ATTR VkResult VKAPI_CALL vkGetDeferredOperationResultKHR( VkDevice device, VkDeferredOperationKHR operation); VKAPI_ATTR VkResult VKAPI_CALL vkDeferredOperationJoinKHR( VkDevice device, VkDeferredOperationKHR operation); #endif // VK_KHR_pipeline_executable_properties is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_pipeline_executable_properties 1 #define VK_KHR_PIPELINE_EXECUTABLE_PROPERTIES_SPEC_VERSION 1 #define VK_KHR_PIPELINE_EXECUTABLE_PROPERTIES_EXTENSION_NAME "VK_KHR_pipeline_executable_properties" typedef enum VkPipelineExecutableStatisticFormatKHR { VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_BOOL32_KHR = 0, VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_INT64_KHR = 1, VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_UINT64_KHR = 2, VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_FLOAT64_KHR = 3, VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_MAX_ENUM_KHR = 0x7FFFFFFF } VkPipelineExecutableStatisticFormatKHR; typedef struct VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR { VkStructureType sType; void* pNext; VkBool32 pipelineExecutableInfo; } VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR; typedef struct VkPipelineInfoKHR { VkStructureType sType; const void* pNext; VkPipeline pipeline; } VkPipelineInfoKHR; typedef struct VkPipelineExecutablePropertiesKHR { VkStructureType sType; void* pNext; VkShaderStageFlags stages; char name[VK_MAX_DESCRIPTION_SIZE]; char description[VK_MAX_DESCRIPTION_SIZE]; uint32_t subgroupSize; } VkPipelineExecutablePropertiesKHR; typedef struct VkPipelineExecutableInfoKHR { VkStructureType sType; const void* pNext; VkPipeline pipeline; uint32_t executableIndex; } VkPipelineExecutableInfoKHR; typedef union VkPipelineExecutableStatisticValueKHR { VkBool32 b32; int64_t i64; uint64_t u64; double f64; } VkPipelineExecutableStatisticValueKHR; typedef struct VkPipelineExecutableStatisticKHR { VkStructureType sType; void* pNext; char name[VK_MAX_DESCRIPTION_SIZE]; char description[VK_MAX_DESCRIPTION_SIZE]; VkPipelineExecutableStatisticFormatKHR format; VkPipelineExecutableStatisticValueKHR value; } VkPipelineExecutableStatisticKHR; typedef struct VkPipelineExecutableInternalRepresentationKHR { VkStructureType sType; void* pNext; char name[VK_MAX_DESCRIPTION_SIZE]; char description[VK_MAX_DESCRIPTION_SIZE]; VkBool32 isText; size_t dataSize; void* pData; } VkPipelineExecutableInternalRepresentationKHR; typedef VkResult (VKAPI_PTR *PFN_vkGetPipelineExecutablePropertiesKHR)(VkDevice device, const VkPipelineInfoKHR* pPipelineInfo, uint32_t* pExecutableCount, VkPipelineExecutablePropertiesKHR* pProperties); typedef VkResult (VKAPI_PTR *PFN_vkGetPipelineExecutableStatisticsKHR)(VkDevice device, const VkPipelineExecutableInfoKHR* pExecutableInfo, uint32_t* pStatisticCount, VkPipelineExecutableStatisticKHR* pStatistics); typedef VkResult (VKAPI_PTR *PFN_vkGetPipelineExecutableInternalRepresentationsKHR)(VkDevice device, const VkPipelineExecutableInfoKHR* pExecutableInfo, uint32_t* pInternalRepresentationCount, VkPipelineExecutableInternalRepresentationKHR* pInternalRepresentations); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkGetPipelineExecutablePropertiesKHR( VkDevice device, const VkPipelineInfoKHR* pPipelineInfo, uint32_t* pExecutableCount, VkPipelineExecutablePropertiesKHR* pProperties); VKAPI_ATTR VkResult VKAPI_CALL vkGetPipelineExecutableStatisticsKHR( VkDevice device, const VkPipelineExecutableInfoKHR* pExecutableInfo, uint32_t* pStatisticCount, VkPipelineExecutableStatisticKHR* pStatistics); VKAPI_ATTR VkResult VKAPI_CALL vkGetPipelineExecutableInternalRepresentationsKHR( VkDevice device, const VkPipelineExecutableInfoKHR* pExecutableInfo, uint32_t* pInternalRepresentationCount, VkPipelineExecutableInternalRepresentationKHR* pInternalRepresentations); #endif // VK_KHR_map_memory2 is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_map_memory2 1 #define VK_KHR_MAP_MEMORY_2_SPEC_VERSION 1 #define VK_KHR_MAP_MEMORY_2_EXTENSION_NAME "VK_KHR_map_memory2" typedef VkMemoryUnmapFlagBits VkMemoryUnmapFlagBitsKHR; typedef VkMemoryUnmapFlags VkMemoryUnmapFlagsKHR; typedef VkMemoryMapInfo VkMemoryMapInfoKHR; typedef VkMemoryUnmapInfo VkMemoryUnmapInfoKHR; typedef VkResult (VKAPI_PTR *PFN_vkMapMemory2KHR)(VkDevice device, const VkMemoryMapInfo* pMemoryMapInfo, void** ppData); typedef VkResult (VKAPI_PTR *PFN_vkUnmapMemory2KHR)(VkDevice device, const VkMemoryUnmapInfo* pMemoryUnmapInfo); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkMapMemory2KHR( VkDevice device, const VkMemoryMapInfo* pMemoryMapInfo, void** ppData); VKAPI_ATTR VkResult VKAPI_CALL vkUnmapMemory2KHR( VkDevice device, const VkMemoryUnmapInfo* pMemoryUnmapInfo); #endif // VK_KHR_shader_integer_dot_product is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_shader_integer_dot_product 1 #define VK_KHR_SHADER_INTEGER_DOT_PRODUCT_SPEC_VERSION 1 #define VK_KHR_SHADER_INTEGER_DOT_PRODUCT_EXTENSION_NAME "VK_KHR_shader_integer_dot_product" typedef VkPhysicalDeviceShaderIntegerDotProductFeatures VkPhysicalDeviceShaderIntegerDotProductFeaturesKHR; typedef VkPhysicalDeviceShaderIntegerDotProductProperties VkPhysicalDeviceShaderIntegerDotProductPropertiesKHR; // VK_KHR_pipeline_library is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_pipeline_library 1 #define VK_KHR_PIPELINE_LIBRARY_SPEC_VERSION 1 #define VK_KHR_PIPELINE_LIBRARY_EXTENSION_NAME "VK_KHR_pipeline_library" typedef struct VkPipelineLibraryCreateInfoKHR { VkStructureType sType; const void* pNext; uint32_t libraryCount; const VkPipeline* pLibraries; } VkPipelineLibraryCreateInfoKHR; // VK_KHR_shader_non_semantic_info is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_shader_non_semantic_info 1 #define VK_KHR_SHADER_NON_SEMANTIC_INFO_SPEC_VERSION 1 #define VK_KHR_SHADER_NON_SEMANTIC_INFO_EXTENSION_NAME "VK_KHR_shader_non_semantic_info" // VK_KHR_present_id is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_present_id 1 #define VK_KHR_PRESENT_ID_SPEC_VERSION 1 #define VK_KHR_PRESENT_ID_EXTENSION_NAME "VK_KHR_present_id" typedef struct VkPresentIdKHR { VkStructureType sType; const void* pNext; uint32_t swapchainCount; const uint64_t* pPresentIds; } VkPresentIdKHR; typedef struct VkPhysicalDevicePresentIdFeaturesKHR { VkStructureType sType; void* pNext; VkBool32 presentId; } VkPhysicalDevicePresentIdFeaturesKHR; // VK_KHR_video_encode_queue is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_video_encode_queue 1 #define VK_KHR_VIDEO_ENCODE_QUEUE_SPEC_VERSION 12 #define VK_KHR_VIDEO_ENCODE_QUEUE_EXTENSION_NAME "VK_KHR_video_encode_queue" typedef enum VkVideoEncodeTuningModeKHR { VK_VIDEO_ENCODE_TUNING_MODE_DEFAULT_KHR = 0, VK_VIDEO_ENCODE_TUNING_MODE_HIGH_QUALITY_KHR = 1, VK_VIDEO_ENCODE_TUNING_MODE_LOW_LATENCY_KHR = 2, VK_VIDEO_ENCODE_TUNING_MODE_ULTRA_LOW_LATENCY_KHR = 3, VK_VIDEO_ENCODE_TUNING_MODE_LOSSLESS_KHR = 4, VK_VIDEO_ENCODE_TUNING_MODE_MAX_ENUM_KHR = 0x7FFFFFFF } VkVideoEncodeTuningModeKHR; typedef enum VkVideoEncodeFlagBitsKHR { VK_VIDEO_ENCODE_WITH_QUANTIZATION_DELTA_MAP_BIT_KHR = 0x00000001, VK_VIDEO_ENCODE_WITH_EMPHASIS_MAP_BIT_KHR = 0x00000002, VK_VIDEO_ENCODE_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF } VkVideoEncodeFlagBitsKHR; typedef VkFlags VkVideoEncodeFlagsKHR; typedef enum VkVideoEncodeCapabilityFlagBitsKHR { VK_VIDEO_ENCODE_CAPABILITY_PRECEDING_EXTERNALLY_ENCODED_BYTES_BIT_KHR = 0x00000001, VK_VIDEO_ENCODE_CAPABILITY_INSUFFICIENT_BITSTREAM_BUFFER_RANGE_DETECTION_BIT_KHR = 0x00000002, VK_VIDEO_ENCODE_CAPABILITY_QUANTIZATION_DELTA_MAP_BIT_KHR = 0x00000004, VK_VIDEO_ENCODE_CAPABILITY_EMPHASIS_MAP_BIT_KHR = 0x00000008, VK_VIDEO_ENCODE_CAPABILITY_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF } VkVideoEncodeCapabilityFlagBitsKHR; typedef VkFlags VkVideoEncodeCapabilityFlagsKHR; typedef enum VkVideoEncodeRateControlModeFlagBitsKHR { VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DEFAULT_KHR = 0, VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DISABLED_BIT_KHR = 0x00000001, VK_VIDEO_ENCODE_RATE_CONTROL_MODE_CBR_BIT_KHR = 0x00000002, VK_VIDEO_ENCODE_RATE_CONTROL_MODE_VBR_BIT_KHR = 0x00000004, VK_VIDEO_ENCODE_RATE_CONTROL_MODE_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF } VkVideoEncodeRateControlModeFlagBitsKHR; typedef VkFlags VkVideoEncodeRateControlModeFlagsKHR; typedef enum VkVideoEncodeFeedbackFlagBitsKHR { VK_VIDEO_ENCODE_FEEDBACK_BITSTREAM_BUFFER_OFFSET_BIT_KHR = 0x00000001, VK_VIDEO_ENCODE_FEEDBACK_BITSTREAM_BYTES_WRITTEN_BIT_KHR = 0x00000002, VK_VIDEO_ENCODE_FEEDBACK_BITSTREAM_HAS_OVERRIDES_BIT_KHR = 0x00000004, VK_VIDEO_ENCODE_FEEDBACK_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF } VkVideoEncodeFeedbackFlagBitsKHR; typedef VkFlags VkVideoEncodeFeedbackFlagsKHR; typedef enum VkVideoEncodeUsageFlagBitsKHR { VK_VIDEO_ENCODE_USAGE_DEFAULT_KHR = 0, VK_VIDEO_ENCODE_USAGE_TRANSCODING_BIT_KHR = 0x00000001, VK_VIDEO_ENCODE_USAGE_STREAMING_BIT_KHR = 0x00000002, VK_VIDEO_ENCODE_USAGE_RECORDING_BIT_KHR = 0x00000004, VK_VIDEO_ENCODE_USAGE_CONFERENCING_BIT_KHR = 0x00000008, VK_VIDEO_ENCODE_USAGE_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF } VkVideoEncodeUsageFlagBitsKHR; typedef VkFlags VkVideoEncodeUsageFlagsKHR; typedef enum VkVideoEncodeContentFlagBitsKHR { VK_VIDEO_ENCODE_CONTENT_DEFAULT_KHR = 0, VK_VIDEO_ENCODE_CONTENT_CAMERA_BIT_KHR = 0x00000001, VK_VIDEO_ENCODE_CONTENT_DESKTOP_BIT_KHR = 0x00000002, VK_VIDEO_ENCODE_CONTENT_RENDERED_BIT_KHR = 0x00000004, VK_VIDEO_ENCODE_CONTENT_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF } VkVideoEncodeContentFlagBitsKHR; typedef VkFlags VkVideoEncodeContentFlagsKHR; typedef VkFlags VkVideoEncodeRateControlFlagsKHR; typedef struct VkVideoEncodeInfoKHR { VkStructureType sType; const void* pNext; VkVideoEncodeFlagsKHR flags; VkBuffer dstBuffer; VkDeviceSize dstBufferOffset; VkDeviceSize dstBufferRange; VkVideoPictureResourceInfoKHR srcPictureResource; const VkVideoReferenceSlotInfoKHR* pSetupReferenceSlot; uint32_t referenceSlotCount; const VkVideoReferenceSlotInfoKHR* pReferenceSlots; uint32_t precedingExternallyEncodedBytes; } VkVideoEncodeInfoKHR; typedef struct VkVideoEncodeCapabilitiesKHR { VkStructureType sType; void* pNext; VkVideoEncodeCapabilityFlagsKHR flags; VkVideoEncodeRateControlModeFlagsKHR rateControlModes; uint32_t maxRateControlLayers; uint64_t maxBitrate; uint32_t maxQualityLevels; VkExtent2D encodeInputPictureGranularity; VkVideoEncodeFeedbackFlagsKHR supportedEncodeFeedbackFlags; } VkVideoEncodeCapabilitiesKHR; typedef struct VkQueryPoolVideoEncodeFeedbackCreateInfoKHR { VkStructureType sType; const void* pNext; VkVideoEncodeFeedbackFlagsKHR encodeFeedbackFlags; } VkQueryPoolVideoEncodeFeedbackCreateInfoKHR; typedef struct VkVideoEncodeUsageInfoKHR { VkStructureType sType; const void* pNext; VkVideoEncodeUsageFlagsKHR videoUsageHints; VkVideoEncodeContentFlagsKHR videoContentHints; VkVideoEncodeTuningModeKHR tuningMode; } VkVideoEncodeUsageInfoKHR; typedef struct VkVideoEncodeRateControlLayerInfoKHR { VkStructureType sType; const void* pNext; uint64_t averageBitrate; uint64_t maxBitrate; uint32_t frameRateNumerator; uint32_t frameRateDenominator; } VkVideoEncodeRateControlLayerInfoKHR; typedef struct VkVideoEncodeRateControlInfoKHR { VkStructureType sType; const void* pNext; VkVideoEncodeRateControlFlagsKHR flags; VkVideoEncodeRateControlModeFlagBitsKHR rateControlMode; uint32_t layerCount; const VkVideoEncodeRateControlLayerInfoKHR* pLayers; uint32_t virtualBufferSizeInMs; uint32_t initialVirtualBufferSizeInMs; } VkVideoEncodeRateControlInfoKHR; typedef struct VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR { VkStructureType sType; const void* pNext; const VkVideoProfileInfoKHR* pVideoProfile; uint32_t qualityLevel; } VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR; typedef struct VkVideoEncodeQualityLevelPropertiesKHR { VkStructureType sType; void* pNext; VkVideoEncodeRateControlModeFlagBitsKHR preferredRateControlMode; uint32_t preferredRateControlLayerCount; } VkVideoEncodeQualityLevelPropertiesKHR; typedef struct VkVideoEncodeQualityLevelInfoKHR { VkStructureType sType; const void* pNext; uint32_t qualityLevel; } VkVideoEncodeQualityLevelInfoKHR; typedef struct VkVideoEncodeSessionParametersGetInfoKHR { VkStructureType sType; const void* pNext; VkVideoSessionParametersKHR videoSessionParameters; } VkVideoEncodeSessionParametersGetInfoKHR; typedef struct VkVideoEncodeSessionParametersFeedbackInfoKHR { VkStructureType sType; void* pNext; VkBool32 hasOverrides; } VkVideoEncodeSessionParametersFeedbackInfoKHR; typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR)(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR* pQualityLevelInfo, VkVideoEncodeQualityLevelPropertiesKHR* pQualityLevelProperties); typedef VkResult (VKAPI_PTR *PFN_vkGetEncodedVideoSessionParametersKHR)(VkDevice device, const VkVideoEncodeSessionParametersGetInfoKHR* pVideoSessionParametersInfo, VkVideoEncodeSessionParametersFeedbackInfoKHR* pFeedbackInfo, size_t* pDataSize, void* pData); typedef void (VKAPI_PTR *PFN_vkCmdEncodeVideoKHR)(VkCommandBuffer commandBuffer, const VkVideoEncodeInfoKHR* pEncodeInfo); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR( VkPhysicalDevice physicalDevice, const VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR* pQualityLevelInfo, VkVideoEncodeQualityLevelPropertiesKHR* pQualityLevelProperties); VKAPI_ATTR VkResult VKAPI_CALL vkGetEncodedVideoSessionParametersKHR( VkDevice device, const VkVideoEncodeSessionParametersGetInfoKHR* pVideoSessionParametersInfo, VkVideoEncodeSessionParametersFeedbackInfoKHR* pFeedbackInfo, size_t* pDataSize, void* pData); VKAPI_ATTR void VKAPI_CALL vkCmdEncodeVideoKHR( VkCommandBuffer commandBuffer, const VkVideoEncodeInfoKHR* pEncodeInfo); #endif // VK_KHR_synchronization2 is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_synchronization2 1 #define VK_KHR_SYNCHRONIZATION_2_SPEC_VERSION 1 #define VK_KHR_SYNCHRONIZATION_2_EXTENSION_NAME "VK_KHR_synchronization2" typedef VkPipelineStageFlags2 VkPipelineStageFlags2KHR; typedef VkPipelineStageFlagBits2 VkPipelineStageFlagBits2KHR; typedef VkAccessFlags2 VkAccessFlags2KHR; typedef VkAccessFlagBits2 VkAccessFlagBits2KHR; typedef VkSubmitFlagBits VkSubmitFlagBitsKHR; typedef VkSubmitFlags VkSubmitFlagsKHR; typedef VkMemoryBarrier2 VkMemoryBarrier2KHR; typedef VkBufferMemoryBarrier2 VkBufferMemoryBarrier2KHR; typedef VkImageMemoryBarrier2 VkImageMemoryBarrier2KHR; typedef VkDependencyInfo VkDependencyInfoKHR; typedef VkSubmitInfo2 VkSubmitInfo2KHR; typedef VkSemaphoreSubmitInfo VkSemaphoreSubmitInfoKHR; typedef VkCommandBufferSubmitInfo VkCommandBufferSubmitInfoKHR; typedef VkPhysicalDeviceSynchronization2Features VkPhysicalDeviceSynchronization2FeaturesKHR; typedef void (VKAPI_PTR *PFN_vkCmdSetEvent2KHR)(VkCommandBuffer commandBuffer, VkEvent event, const VkDependencyInfo* pDependencyInfo); typedef void (VKAPI_PTR *PFN_vkCmdResetEvent2KHR)(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags2 stageMask); typedef void (VKAPI_PTR *PFN_vkCmdWaitEvents2KHR)(VkCommandBuffer commandBuffer, uint32_t eventCount, const VkEvent* pEvents, const VkDependencyInfo* pDependencyInfos); typedef void (VKAPI_PTR *PFN_vkCmdPipelineBarrier2KHR)(VkCommandBuffer commandBuffer, const VkDependencyInfo* pDependencyInfo); typedef void (VKAPI_PTR *PFN_vkCmdWriteTimestamp2KHR)(VkCommandBuffer commandBuffer, VkPipelineStageFlags2 stage, VkQueryPool queryPool, uint32_t query); typedef VkResult (VKAPI_PTR *PFN_vkQueueSubmit2KHR)(VkQueue queue, uint32_t submitCount, const VkSubmitInfo2* pSubmits, VkFence fence); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR void VKAPI_CALL vkCmdSetEvent2KHR( VkCommandBuffer commandBuffer, VkEvent event, const VkDependencyInfo* pDependencyInfo); VKAPI_ATTR void VKAPI_CALL vkCmdResetEvent2KHR( VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags2 stageMask); VKAPI_ATTR void VKAPI_CALL vkCmdWaitEvents2KHR( VkCommandBuffer commandBuffer, uint32_t eventCount, const VkEvent* pEvents, const VkDependencyInfo* pDependencyInfos); VKAPI_ATTR void VKAPI_CALL vkCmdPipelineBarrier2KHR( VkCommandBuffer commandBuffer, const VkDependencyInfo* pDependencyInfo); VKAPI_ATTR void VKAPI_CALL vkCmdWriteTimestamp2KHR( VkCommandBuffer commandBuffer, VkPipelineStageFlags2 stage, VkQueryPool queryPool, uint32_t query); VKAPI_ATTR VkResult VKAPI_CALL vkQueueSubmit2KHR( VkQueue queue, uint32_t submitCount, const VkSubmitInfo2* pSubmits, VkFence fence); #endif // VK_KHR_fragment_shader_barycentric is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_fragment_shader_barycentric 1 #define VK_KHR_FRAGMENT_SHADER_BARYCENTRIC_SPEC_VERSION 1 #define VK_KHR_FRAGMENT_SHADER_BARYCENTRIC_EXTENSION_NAME "VK_KHR_fragment_shader_barycentric" typedef struct VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR { VkStructureType sType; void* pNext; VkBool32 fragmentShaderBarycentric; } VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR; typedef struct VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR { VkStructureType sType; void* pNext; VkBool32 triStripVertexOrderIndependentOfProvokingVertex; } VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR; // VK_KHR_shader_subgroup_uniform_control_flow is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_shader_subgroup_uniform_control_flow 1 #define VK_KHR_SHADER_SUBGROUP_UNIFORM_CONTROL_FLOW_SPEC_VERSION 1 #define VK_KHR_SHADER_SUBGROUP_UNIFORM_CONTROL_FLOW_EXTENSION_NAME "VK_KHR_shader_subgroup_uniform_control_flow" typedef struct VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR { VkStructureType sType; void* pNext; VkBool32 shaderSubgroupUniformControlFlow; } VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR; // VK_KHR_zero_initialize_workgroup_memory is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_zero_initialize_workgroup_memory 1 #define VK_KHR_ZERO_INITIALIZE_WORKGROUP_MEMORY_SPEC_VERSION 1 #define VK_KHR_ZERO_INITIALIZE_WORKGROUP_MEMORY_EXTENSION_NAME "VK_KHR_zero_initialize_workgroup_memory" typedef VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeaturesKHR; // VK_KHR_workgroup_memory_explicit_layout is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_workgroup_memory_explicit_layout 1 #define VK_KHR_WORKGROUP_MEMORY_EXPLICIT_LAYOUT_SPEC_VERSION 1 #define VK_KHR_WORKGROUP_MEMORY_EXPLICIT_LAYOUT_EXTENSION_NAME "VK_KHR_workgroup_memory_explicit_layout" typedef struct VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR { VkStructureType sType; void* pNext; VkBool32 workgroupMemoryExplicitLayout; VkBool32 workgroupMemoryExplicitLayoutScalarBlockLayout; VkBool32 workgroupMemoryExplicitLayout8BitAccess; VkBool32 workgroupMemoryExplicitLayout16BitAccess; } VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR; // VK_KHR_copy_commands2 is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_copy_commands2 1 #define VK_KHR_COPY_COMMANDS_2_SPEC_VERSION 1 #define VK_KHR_COPY_COMMANDS_2_EXTENSION_NAME "VK_KHR_copy_commands2" typedef VkCopyBufferInfo2 VkCopyBufferInfo2KHR; typedef VkCopyImageInfo2 VkCopyImageInfo2KHR; typedef VkCopyBufferToImageInfo2 VkCopyBufferToImageInfo2KHR; typedef VkCopyImageToBufferInfo2 VkCopyImageToBufferInfo2KHR; typedef VkBlitImageInfo2 VkBlitImageInfo2KHR; typedef VkResolveImageInfo2 VkResolveImageInfo2KHR; typedef VkBufferCopy2 VkBufferCopy2KHR; typedef VkImageCopy2 VkImageCopy2KHR; typedef VkImageBlit2 VkImageBlit2KHR; typedef VkBufferImageCopy2 VkBufferImageCopy2KHR; typedef VkImageResolve2 VkImageResolve2KHR; typedef void (VKAPI_PTR *PFN_vkCmdCopyBuffer2KHR)(VkCommandBuffer commandBuffer, const VkCopyBufferInfo2* pCopyBufferInfo); typedef void (VKAPI_PTR *PFN_vkCmdCopyImage2KHR)(VkCommandBuffer commandBuffer, const VkCopyImageInfo2* pCopyImageInfo); typedef void (VKAPI_PTR *PFN_vkCmdCopyBufferToImage2KHR)(VkCommandBuffer commandBuffer, const VkCopyBufferToImageInfo2* pCopyBufferToImageInfo); typedef void (VKAPI_PTR *PFN_vkCmdCopyImageToBuffer2KHR)(VkCommandBuffer commandBuffer, const VkCopyImageToBufferInfo2* pCopyImageToBufferInfo); typedef void (VKAPI_PTR *PFN_vkCmdBlitImage2KHR)(VkCommandBuffer commandBuffer, const VkBlitImageInfo2* pBlitImageInfo); typedef void (VKAPI_PTR *PFN_vkCmdResolveImage2KHR)(VkCommandBuffer commandBuffer, const VkResolveImageInfo2* pResolveImageInfo); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR void VKAPI_CALL vkCmdCopyBuffer2KHR( VkCommandBuffer commandBuffer, const VkCopyBufferInfo2* pCopyBufferInfo); VKAPI_ATTR void VKAPI_CALL vkCmdCopyImage2KHR( VkCommandBuffer commandBuffer, const VkCopyImageInfo2* pCopyImageInfo); VKAPI_ATTR void VKAPI_CALL vkCmdCopyBufferToImage2KHR( VkCommandBuffer commandBuffer, const VkCopyBufferToImageInfo2* pCopyBufferToImageInfo); VKAPI_ATTR void VKAPI_CALL vkCmdCopyImageToBuffer2KHR( VkCommandBuffer commandBuffer, const VkCopyImageToBufferInfo2* pCopyImageToBufferInfo); VKAPI_ATTR void VKAPI_CALL vkCmdBlitImage2KHR( VkCommandBuffer commandBuffer, const VkBlitImageInfo2* pBlitImageInfo); VKAPI_ATTR void VKAPI_CALL vkCmdResolveImage2KHR( VkCommandBuffer commandBuffer, const VkResolveImageInfo2* pResolveImageInfo); #endif // VK_KHR_format_feature_flags2 is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_format_feature_flags2 1 #define VK_KHR_FORMAT_FEATURE_FLAGS_2_SPEC_VERSION 2 #define VK_KHR_FORMAT_FEATURE_FLAGS_2_EXTENSION_NAME "VK_KHR_format_feature_flags2" typedef VkFormatFeatureFlags2 VkFormatFeatureFlags2KHR; typedef VkFormatFeatureFlagBits2 VkFormatFeatureFlagBits2KHR; typedef VkFormatProperties3 VkFormatProperties3KHR; // VK_KHR_ray_tracing_maintenance1 is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_ray_tracing_maintenance1 1 #define VK_KHR_RAY_TRACING_MAINTENANCE_1_SPEC_VERSION 1 #define VK_KHR_RAY_TRACING_MAINTENANCE_1_EXTENSION_NAME "VK_KHR_ray_tracing_maintenance1" typedef struct VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR { VkStructureType sType; void* pNext; VkBool32 rayTracingMaintenance1; VkBool32 rayTracingPipelineTraceRaysIndirect2; } VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR; typedef struct VkTraceRaysIndirectCommand2KHR { VkDeviceAddress raygenShaderRecordAddress; VkDeviceSize raygenShaderRecordSize; VkDeviceAddress missShaderBindingTableAddress; VkDeviceSize missShaderBindingTableSize; VkDeviceSize missShaderBindingTableStride; VkDeviceAddress hitShaderBindingTableAddress; VkDeviceSize hitShaderBindingTableSize; VkDeviceSize hitShaderBindingTableStride; VkDeviceAddress callableShaderBindingTableAddress; VkDeviceSize callableShaderBindingTableSize; VkDeviceSize callableShaderBindingTableStride; uint32_t width; uint32_t height; uint32_t depth; } VkTraceRaysIndirectCommand2KHR; typedef void (VKAPI_PTR *PFN_vkCmdTraceRaysIndirect2KHR)(VkCommandBuffer commandBuffer, VkDeviceAddress indirectDeviceAddress); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR void VKAPI_CALL vkCmdTraceRaysIndirect2KHR( VkCommandBuffer commandBuffer, VkDeviceAddress indirectDeviceAddress); #endif // VK_KHR_portability_enumeration is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_portability_enumeration 1 #define VK_KHR_PORTABILITY_ENUMERATION_SPEC_VERSION 1 #define VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME "VK_KHR_portability_enumeration" // VK_KHR_maintenance4 is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_maintenance4 1 #define VK_KHR_MAINTENANCE_4_SPEC_VERSION 2 #define VK_KHR_MAINTENANCE_4_EXTENSION_NAME "VK_KHR_maintenance4" typedef VkPhysicalDeviceMaintenance4Features VkPhysicalDeviceMaintenance4FeaturesKHR; typedef VkPhysicalDeviceMaintenance4Properties VkPhysicalDeviceMaintenance4PropertiesKHR; typedef VkDeviceBufferMemoryRequirements VkDeviceBufferMemoryRequirementsKHR; typedef VkDeviceImageMemoryRequirements VkDeviceImageMemoryRequirementsKHR; typedef void (VKAPI_PTR *PFN_vkGetDeviceBufferMemoryRequirementsKHR)(VkDevice device, const VkDeviceBufferMemoryRequirements* pInfo, VkMemoryRequirements2* pMemoryRequirements); typedef void (VKAPI_PTR *PFN_vkGetDeviceImageMemoryRequirementsKHR)(VkDevice device, const VkDeviceImageMemoryRequirements* pInfo, VkMemoryRequirements2* pMemoryRequirements); typedef void (VKAPI_PTR *PFN_vkGetDeviceImageSparseMemoryRequirementsKHR)(VkDevice device, const VkDeviceImageMemoryRequirements* pInfo, uint32_t* pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements2* pSparseMemoryRequirements); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR void VKAPI_CALL vkGetDeviceBufferMemoryRequirementsKHR( VkDevice device, const VkDeviceBufferMemoryRequirements* pInfo, VkMemoryRequirements2* pMemoryRequirements); VKAPI_ATTR void VKAPI_CALL vkGetDeviceImageMemoryRequirementsKHR( VkDevice device, const VkDeviceImageMemoryRequirements* pInfo, VkMemoryRequirements2* pMemoryRequirements); VKAPI_ATTR void VKAPI_CALL vkGetDeviceImageSparseMemoryRequirementsKHR( VkDevice device, const VkDeviceImageMemoryRequirements* pInfo, uint32_t* pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements2* pSparseMemoryRequirements); #endif // VK_KHR_shader_subgroup_rotate is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_shader_subgroup_rotate 1 #define VK_KHR_SHADER_SUBGROUP_ROTATE_SPEC_VERSION 2 #define VK_KHR_SHADER_SUBGROUP_ROTATE_EXTENSION_NAME "VK_KHR_shader_subgroup_rotate" typedef VkPhysicalDeviceShaderSubgroupRotateFeatures VkPhysicalDeviceShaderSubgroupRotateFeaturesKHR; // VK_KHR_shader_maximal_reconvergence is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_shader_maximal_reconvergence 1 #define VK_KHR_SHADER_MAXIMAL_RECONVERGENCE_SPEC_VERSION 1 #define VK_KHR_SHADER_MAXIMAL_RECONVERGENCE_EXTENSION_NAME "VK_KHR_shader_maximal_reconvergence" typedef struct VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR { VkStructureType sType; void* pNext; VkBool32 shaderMaximalReconvergence; } VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR; // VK_KHR_maintenance5 is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_maintenance5 1 #define VK_KHR_MAINTENANCE_5_SPEC_VERSION 1 #define VK_KHR_MAINTENANCE_5_EXTENSION_NAME "VK_KHR_maintenance5" typedef VkPipelineCreateFlags2 VkPipelineCreateFlags2KHR; typedef VkPipelineCreateFlagBits2 VkPipelineCreateFlagBits2KHR; typedef VkBufferUsageFlags2 VkBufferUsageFlags2KHR; typedef VkBufferUsageFlagBits2 VkBufferUsageFlagBits2KHR; typedef VkPhysicalDeviceMaintenance5Features VkPhysicalDeviceMaintenance5FeaturesKHR; typedef VkPhysicalDeviceMaintenance5Properties VkPhysicalDeviceMaintenance5PropertiesKHR; typedef VkRenderingAreaInfo VkRenderingAreaInfoKHR; typedef VkDeviceImageSubresourceInfo VkDeviceImageSubresourceInfoKHR; typedef VkImageSubresource2 VkImageSubresource2KHR; typedef VkSubresourceLayout2 VkSubresourceLayout2KHR; typedef VkPipelineCreateFlags2CreateInfo VkPipelineCreateFlags2CreateInfoKHR; typedef VkBufferUsageFlags2CreateInfo VkBufferUsageFlags2CreateInfoKHR; typedef void (VKAPI_PTR *PFN_vkCmdBindIndexBuffer2KHR)(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkDeviceSize size, VkIndexType indexType); typedef void (VKAPI_PTR *PFN_vkGetRenderingAreaGranularityKHR)(VkDevice device, const VkRenderingAreaInfo* pRenderingAreaInfo, VkExtent2D* pGranularity); typedef void (VKAPI_PTR *PFN_vkGetDeviceImageSubresourceLayoutKHR)(VkDevice device, const VkDeviceImageSubresourceInfo* pInfo, VkSubresourceLayout2* pLayout); typedef void (VKAPI_PTR *PFN_vkGetImageSubresourceLayout2KHR)(VkDevice device, VkImage image, const VkImageSubresource2* pSubresource, VkSubresourceLayout2* pLayout); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR void VKAPI_CALL vkCmdBindIndexBuffer2KHR( VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkDeviceSize size, VkIndexType indexType); VKAPI_ATTR void VKAPI_CALL vkGetRenderingAreaGranularityKHR( VkDevice device, const VkRenderingAreaInfo* pRenderingAreaInfo, VkExtent2D* pGranularity); VKAPI_ATTR void VKAPI_CALL vkGetDeviceImageSubresourceLayoutKHR( VkDevice device, const VkDeviceImageSubresourceInfo* pInfo, VkSubresourceLayout2* pLayout); VKAPI_ATTR void VKAPI_CALL vkGetImageSubresourceLayout2KHR( VkDevice device, VkImage image, const VkImageSubresource2* pSubresource, VkSubresourceLayout2* pLayout); #endif // VK_KHR_ray_tracing_position_fetch is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_ray_tracing_position_fetch 1 #define VK_KHR_RAY_TRACING_POSITION_FETCH_SPEC_VERSION 1 #define VK_KHR_RAY_TRACING_POSITION_FETCH_EXTENSION_NAME "VK_KHR_ray_tracing_position_fetch" typedef struct VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR { VkStructureType sType; void* pNext; VkBool32 rayTracingPositionFetch; } VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR; // VK_KHR_pipeline_binary is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_pipeline_binary 1 VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkPipelineBinaryKHR) #define VK_MAX_PIPELINE_BINARY_KEY_SIZE_KHR 32U #define VK_KHR_PIPELINE_BINARY_SPEC_VERSION 1 #define VK_KHR_PIPELINE_BINARY_EXTENSION_NAME "VK_KHR_pipeline_binary" typedef struct VkPhysicalDevicePipelineBinaryFeaturesKHR { VkStructureType sType; void* pNext; VkBool32 pipelineBinaries; } VkPhysicalDevicePipelineBinaryFeaturesKHR; typedef struct VkPhysicalDevicePipelineBinaryPropertiesKHR { VkStructureType sType; void* pNext; VkBool32 pipelineBinaryInternalCache; VkBool32 pipelineBinaryInternalCacheControl; VkBool32 pipelineBinaryPrefersInternalCache; VkBool32 pipelineBinaryPrecompiledInternalCache; VkBool32 pipelineBinaryCompressedData; } VkPhysicalDevicePipelineBinaryPropertiesKHR; typedef struct VkDevicePipelineBinaryInternalCacheControlKHR { VkStructureType sType; const void* pNext; VkBool32 disableInternalCache; } VkDevicePipelineBinaryInternalCacheControlKHR; typedef struct VkPipelineBinaryKeyKHR { VkStructureType sType; void* pNext; uint32_t keySize; uint8_t key[VK_MAX_PIPELINE_BINARY_KEY_SIZE_KHR]; } VkPipelineBinaryKeyKHR; typedef struct VkPipelineBinaryDataKHR { size_t dataSize; void* pData; } VkPipelineBinaryDataKHR; typedef struct VkPipelineBinaryKeysAndDataKHR { uint32_t binaryCount; const VkPipelineBinaryKeyKHR* pPipelineBinaryKeys; const VkPipelineBinaryDataKHR* pPipelineBinaryData; } VkPipelineBinaryKeysAndDataKHR; typedef struct VkPipelineCreateInfoKHR { VkStructureType sType; void* pNext; } VkPipelineCreateInfoKHR; typedef struct VkPipelineBinaryCreateInfoKHR { VkStructureType sType; const void* pNext; const VkPipelineBinaryKeysAndDataKHR* pKeysAndDataInfo; VkPipeline pipeline; const VkPipelineCreateInfoKHR* pPipelineCreateInfo; } VkPipelineBinaryCreateInfoKHR; typedef struct VkPipelineBinaryInfoKHR { VkStructureType sType; const void* pNext; uint32_t binaryCount; const VkPipelineBinaryKHR* pPipelineBinaries; } VkPipelineBinaryInfoKHR; typedef struct VkReleaseCapturedPipelineDataInfoKHR { VkStructureType sType; void* pNext; VkPipeline pipeline; } VkReleaseCapturedPipelineDataInfoKHR; typedef struct VkPipelineBinaryDataInfoKHR { VkStructureType sType; void* pNext; VkPipelineBinaryKHR pipelineBinary; } VkPipelineBinaryDataInfoKHR; typedef struct VkPipelineBinaryHandlesInfoKHR { VkStructureType sType; const void* pNext; uint32_t pipelineBinaryCount; VkPipelineBinaryKHR* pPipelineBinaries; } VkPipelineBinaryHandlesInfoKHR; typedef VkResult (VKAPI_PTR *PFN_vkCreatePipelineBinariesKHR)(VkDevice device, const VkPipelineBinaryCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkPipelineBinaryHandlesInfoKHR* pBinaries); typedef void (VKAPI_PTR *PFN_vkDestroyPipelineBinaryKHR)(VkDevice device, VkPipelineBinaryKHR pipelineBinary, const VkAllocationCallbacks* pAllocator); typedef VkResult (VKAPI_PTR *PFN_vkGetPipelineKeyKHR)(VkDevice device, const VkPipelineCreateInfoKHR* pPipelineCreateInfo, VkPipelineBinaryKeyKHR* pPipelineKey); typedef VkResult (VKAPI_PTR *PFN_vkGetPipelineBinaryDataKHR)(VkDevice device, const VkPipelineBinaryDataInfoKHR* pInfo, VkPipelineBinaryKeyKHR* pPipelineBinaryKey, size_t* pPipelineBinaryDataSize, void* pPipelineBinaryData); typedef VkResult (VKAPI_PTR *PFN_vkReleaseCapturedPipelineDataKHR)(VkDevice device, const VkReleaseCapturedPipelineDataInfoKHR* pInfo, const VkAllocationCallbacks* pAllocator); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkCreatePipelineBinariesKHR( VkDevice device, const VkPipelineBinaryCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkPipelineBinaryHandlesInfoKHR* pBinaries); VKAPI_ATTR void VKAPI_CALL vkDestroyPipelineBinaryKHR( VkDevice device, VkPipelineBinaryKHR pipelineBinary, const VkAllocationCallbacks* pAllocator); VKAPI_ATTR VkResult VKAPI_CALL vkGetPipelineKeyKHR( VkDevice device, const VkPipelineCreateInfoKHR* pPipelineCreateInfo, VkPipelineBinaryKeyKHR* pPipelineKey); VKAPI_ATTR VkResult VKAPI_CALL vkGetPipelineBinaryDataKHR( VkDevice device, const VkPipelineBinaryDataInfoKHR* pInfo, VkPipelineBinaryKeyKHR* pPipelineBinaryKey, size_t* pPipelineBinaryDataSize, void* pPipelineBinaryData); VKAPI_ATTR VkResult VKAPI_CALL vkReleaseCapturedPipelineDataKHR( VkDevice device, const VkReleaseCapturedPipelineDataInfoKHR* pInfo, const VkAllocationCallbacks* pAllocator); #endif // VK_KHR_cooperative_matrix is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_cooperative_matrix 1 #define VK_KHR_COOPERATIVE_MATRIX_SPEC_VERSION 2 #define VK_KHR_COOPERATIVE_MATRIX_EXTENSION_NAME "VK_KHR_cooperative_matrix" typedef enum VkComponentTypeKHR { VK_COMPONENT_TYPE_FLOAT16_KHR = 0, VK_COMPONENT_TYPE_FLOAT32_KHR = 1, VK_COMPONENT_TYPE_FLOAT64_KHR = 2, VK_COMPONENT_TYPE_SINT8_KHR = 3, VK_COMPONENT_TYPE_SINT16_KHR = 4, VK_COMPONENT_TYPE_SINT32_KHR = 5, VK_COMPONENT_TYPE_SINT64_KHR = 6, VK_COMPONENT_TYPE_UINT8_KHR = 7, VK_COMPONENT_TYPE_UINT16_KHR = 8, VK_COMPONENT_TYPE_UINT32_KHR = 9, VK_COMPONENT_TYPE_UINT64_KHR = 10, VK_COMPONENT_TYPE_SINT8_PACKED_NV = 1000491000, VK_COMPONENT_TYPE_UINT8_PACKED_NV = 1000491001, VK_COMPONENT_TYPE_FLOAT_E4M3_NV = 1000491002, VK_COMPONENT_TYPE_FLOAT_E5M2_NV = 1000491003, VK_COMPONENT_TYPE_FLOAT16_NV = VK_COMPONENT_TYPE_FLOAT16_KHR, VK_COMPONENT_TYPE_FLOAT32_NV = VK_COMPONENT_TYPE_FLOAT32_KHR, VK_COMPONENT_TYPE_FLOAT64_NV = VK_COMPONENT_TYPE_FLOAT64_KHR, VK_COMPONENT_TYPE_SINT8_NV = VK_COMPONENT_TYPE_SINT8_KHR, VK_COMPONENT_TYPE_SINT16_NV = VK_COMPONENT_TYPE_SINT16_KHR, VK_COMPONENT_TYPE_SINT32_NV = VK_COMPONENT_TYPE_SINT32_KHR, VK_COMPONENT_TYPE_SINT64_NV = VK_COMPONENT_TYPE_SINT64_KHR, VK_COMPONENT_TYPE_UINT8_NV = VK_COMPONENT_TYPE_UINT8_KHR, VK_COMPONENT_TYPE_UINT16_NV = VK_COMPONENT_TYPE_UINT16_KHR, VK_COMPONENT_TYPE_UINT32_NV = VK_COMPONENT_TYPE_UINT32_KHR, VK_COMPONENT_TYPE_UINT64_NV = VK_COMPONENT_TYPE_UINT64_KHR, VK_COMPONENT_TYPE_MAX_ENUM_KHR = 0x7FFFFFFF } VkComponentTypeKHR; typedef enum VkScopeKHR { VK_SCOPE_DEVICE_KHR = 1, VK_SCOPE_WORKGROUP_KHR = 2, VK_SCOPE_SUBGROUP_KHR = 3, VK_SCOPE_QUEUE_FAMILY_KHR = 5, VK_SCOPE_DEVICE_NV = VK_SCOPE_DEVICE_KHR, VK_SCOPE_WORKGROUP_NV = VK_SCOPE_WORKGROUP_KHR, VK_SCOPE_SUBGROUP_NV = VK_SCOPE_SUBGROUP_KHR, VK_SCOPE_QUEUE_FAMILY_NV = VK_SCOPE_QUEUE_FAMILY_KHR, VK_SCOPE_MAX_ENUM_KHR = 0x7FFFFFFF } VkScopeKHR; typedef struct VkCooperativeMatrixPropertiesKHR { VkStructureType sType; void* pNext; uint32_t MSize; uint32_t NSize; uint32_t KSize; VkComponentTypeKHR AType; VkComponentTypeKHR BType; VkComponentTypeKHR CType; VkComponentTypeKHR ResultType; VkBool32 saturatingAccumulation; VkScopeKHR scope; } VkCooperativeMatrixPropertiesKHR; typedef struct VkPhysicalDeviceCooperativeMatrixFeaturesKHR { VkStructureType sType; void* pNext; VkBool32 cooperativeMatrix; VkBool32 cooperativeMatrixRobustBufferAccess; } VkPhysicalDeviceCooperativeMatrixFeaturesKHR; typedef struct VkPhysicalDeviceCooperativeMatrixPropertiesKHR { VkStructureType sType; void* pNext; VkShaderStageFlags cooperativeMatrixSupportedStages; } VkPhysicalDeviceCooperativeMatrixPropertiesKHR; typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR)(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkCooperativeMatrixPropertiesKHR* pProperties); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR( VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkCooperativeMatrixPropertiesKHR* pProperties); #endif // VK_KHR_compute_shader_derivatives is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_compute_shader_derivatives 1 #define VK_KHR_COMPUTE_SHADER_DERIVATIVES_SPEC_VERSION 1 #define VK_KHR_COMPUTE_SHADER_DERIVATIVES_EXTENSION_NAME "VK_KHR_compute_shader_derivatives" typedef struct VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR { VkStructureType sType; void* pNext; VkBool32 computeDerivativeGroupQuads; VkBool32 computeDerivativeGroupLinear; } VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR; typedef struct VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR { VkStructureType sType; void* pNext; VkBool32 meshAndTaskShaderDerivatives; } VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR; // VK_KHR_video_decode_av1 is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_video_decode_av1 1 #include "vk_video/vulkan_video_codec_av1std.h" #include "vk_video/vulkan_video_codec_av1std_decode.h" #define VK_MAX_VIDEO_AV1_REFERENCES_PER_FRAME_KHR 7U #define VK_KHR_VIDEO_DECODE_AV1_SPEC_VERSION 1 #define VK_KHR_VIDEO_DECODE_AV1_EXTENSION_NAME "VK_KHR_video_decode_av1" typedef struct VkVideoDecodeAV1ProfileInfoKHR { VkStructureType sType; const void* pNext; StdVideoAV1Profile stdProfile; VkBool32 filmGrainSupport; } VkVideoDecodeAV1ProfileInfoKHR; typedef struct VkVideoDecodeAV1CapabilitiesKHR { VkStructureType sType; void* pNext; StdVideoAV1Level maxLevel; } VkVideoDecodeAV1CapabilitiesKHR; typedef struct VkVideoDecodeAV1SessionParametersCreateInfoKHR { VkStructureType sType; const void* pNext; const StdVideoAV1SequenceHeader* pStdSequenceHeader; } VkVideoDecodeAV1SessionParametersCreateInfoKHR; typedef struct VkVideoDecodeAV1PictureInfoKHR { VkStructureType sType; const void* pNext; const StdVideoDecodeAV1PictureInfo* pStdPictureInfo; int32_t referenceNameSlotIndices[VK_MAX_VIDEO_AV1_REFERENCES_PER_FRAME_KHR]; uint32_t frameHeaderOffset; uint32_t tileCount; const uint32_t* pTileOffsets; const uint32_t* pTileSizes; } VkVideoDecodeAV1PictureInfoKHR; typedef struct VkVideoDecodeAV1DpbSlotInfoKHR { VkStructureType sType; const void* pNext; const StdVideoDecodeAV1ReferenceInfo* pStdReferenceInfo; } VkVideoDecodeAV1DpbSlotInfoKHR; // VK_KHR_video_encode_av1 is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_video_encode_av1 1 #include "vk_video/vulkan_video_codec_av1std_encode.h" #define VK_KHR_VIDEO_ENCODE_AV1_SPEC_VERSION 1 #define VK_KHR_VIDEO_ENCODE_AV1_EXTENSION_NAME "VK_KHR_video_encode_av1" typedef enum VkVideoEncodeAV1PredictionModeKHR { VK_VIDEO_ENCODE_AV1_PREDICTION_MODE_INTRA_ONLY_KHR = 0, VK_VIDEO_ENCODE_AV1_PREDICTION_MODE_SINGLE_REFERENCE_KHR = 1, VK_VIDEO_ENCODE_AV1_PREDICTION_MODE_UNIDIRECTIONAL_COMPOUND_KHR = 2, VK_VIDEO_ENCODE_AV1_PREDICTION_MODE_BIDIRECTIONAL_COMPOUND_KHR = 3, VK_VIDEO_ENCODE_AV1_PREDICTION_MODE_MAX_ENUM_KHR = 0x7FFFFFFF } VkVideoEncodeAV1PredictionModeKHR; typedef enum VkVideoEncodeAV1RateControlGroupKHR { VK_VIDEO_ENCODE_AV1_RATE_CONTROL_GROUP_INTRA_KHR = 0, VK_VIDEO_ENCODE_AV1_RATE_CONTROL_GROUP_PREDICTIVE_KHR = 1, VK_VIDEO_ENCODE_AV1_RATE_CONTROL_GROUP_BIPREDICTIVE_KHR = 2, VK_VIDEO_ENCODE_AV1_RATE_CONTROL_GROUP_MAX_ENUM_KHR = 0x7FFFFFFF } VkVideoEncodeAV1RateControlGroupKHR; typedef enum VkVideoEncodeAV1CapabilityFlagBitsKHR { VK_VIDEO_ENCODE_AV1_CAPABILITY_PER_RATE_CONTROL_GROUP_MIN_MAX_Q_INDEX_BIT_KHR = 0x00000001, VK_VIDEO_ENCODE_AV1_CAPABILITY_GENERATE_OBU_EXTENSION_HEADER_BIT_KHR = 0x00000002, VK_VIDEO_ENCODE_AV1_CAPABILITY_PRIMARY_REFERENCE_CDF_ONLY_BIT_KHR = 0x00000004, VK_VIDEO_ENCODE_AV1_CAPABILITY_FRAME_SIZE_OVERRIDE_BIT_KHR = 0x00000008, VK_VIDEO_ENCODE_AV1_CAPABILITY_MOTION_VECTOR_SCALING_BIT_KHR = 0x00000010, VK_VIDEO_ENCODE_AV1_CAPABILITY_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF } VkVideoEncodeAV1CapabilityFlagBitsKHR; typedef VkFlags VkVideoEncodeAV1CapabilityFlagsKHR; typedef enum VkVideoEncodeAV1StdFlagBitsKHR { VK_VIDEO_ENCODE_AV1_STD_UNIFORM_TILE_SPACING_FLAG_SET_BIT_KHR = 0x00000001, VK_VIDEO_ENCODE_AV1_STD_SKIP_MODE_PRESENT_UNSET_BIT_KHR = 0x00000002, VK_VIDEO_ENCODE_AV1_STD_PRIMARY_REF_FRAME_BIT_KHR = 0x00000004, VK_VIDEO_ENCODE_AV1_STD_DELTA_Q_BIT_KHR = 0x00000008, VK_VIDEO_ENCODE_AV1_STD_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF } VkVideoEncodeAV1StdFlagBitsKHR; typedef VkFlags VkVideoEncodeAV1StdFlagsKHR; typedef enum VkVideoEncodeAV1SuperblockSizeFlagBitsKHR { VK_VIDEO_ENCODE_AV1_SUPERBLOCK_SIZE_64_BIT_KHR = 0x00000001, VK_VIDEO_ENCODE_AV1_SUPERBLOCK_SIZE_128_BIT_KHR = 0x00000002, VK_VIDEO_ENCODE_AV1_SUPERBLOCK_SIZE_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF } VkVideoEncodeAV1SuperblockSizeFlagBitsKHR; typedef VkFlags VkVideoEncodeAV1SuperblockSizeFlagsKHR; typedef enum VkVideoEncodeAV1RateControlFlagBitsKHR { VK_VIDEO_ENCODE_AV1_RATE_CONTROL_REGULAR_GOP_BIT_KHR = 0x00000001, VK_VIDEO_ENCODE_AV1_RATE_CONTROL_TEMPORAL_LAYER_PATTERN_DYADIC_BIT_KHR = 0x00000002, VK_VIDEO_ENCODE_AV1_RATE_CONTROL_REFERENCE_PATTERN_FLAT_BIT_KHR = 0x00000004, VK_VIDEO_ENCODE_AV1_RATE_CONTROL_REFERENCE_PATTERN_DYADIC_BIT_KHR = 0x00000008, VK_VIDEO_ENCODE_AV1_RATE_CONTROL_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF } VkVideoEncodeAV1RateControlFlagBitsKHR; typedef VkFlags VkVideoEncodeAV1RateControlFlagsKHR; typedef struct VkPhysicalDeviceVideoEncodeAV1FeaturesKHR { VkStructureType sType; void* pNext; VkBool32 videoEncodeAV1; } VkPhysicalDeviceVideoEncodeAV1FeaturesKHR; typedef struct VkVideoEncodeAV1CapabilitiesKHR { VkStructureType sType; void* pNext; VkVideoEncodeAV1CapabilityFlagsKHR flags; StdVideoAV1Level maxLevel; VkExtent2D codedPictureAlignment; VkExtent2D maxTiles; VkExtent2D minTileSize; VkExtent2D maxTileSize; VkVideoEncodeAV1SuperblockSizeFlagsKHR superblockSizes; uint32_t maxSingleReferenceCount; uint32_t singleReferenceNameMask; uint32_t maxUnidirectionalCompoundReferenceCount; uint32_t maxUnidirectionalCompoundGroup1ReferenceCount; uint32_t unidirectionalCompoundReferenceNameMask; uint32_t maxBidirectionalCompoundReferenceCount; uint32_t maxBidirectionalCompoundGroup1ReferenceCount; uint32_t maxBidirectionalCompoundGroup2ReferenceCount; uint32_t bidirectionalCompoundReferenceNameMask; uint32_t maxTemporalLayerCount; uint32_t maxSpatialLayerCount; uint32_t maxOperatingPoints; uint32_t minQIndex; uint32_t maxQIndex; VkBool32 prefersGopRemainingFrames; VkBool32 requiresGopRemainingFrames; VkVideoEncodeAV1StdFlagsKHR stdSyntaxFlags; } VkVideoEncodeAV1CapabilitiesKHR; typedef struct VkVideoEncodeAV1QIndexKHR { uint32_t intraQIndex; uint32_t predictiveQIndex; uint32_t bipredictiveQIndex; } VkVideoEncodeAV1QIndexKHR; typedef struct VkVideoEncodeAV1QualityLevelPropertiesKHR { VkStructureType sType; void* pNext; VkVideoEncodeAV1RateControlFlagsKHR preferredRateControlFlags; uint32_t preferredGopFrameCount; uint32_t preferredKeyFramePeriod; uint32_t preferredConsecutiveBipredictiveFrameCount; uint32_t preferredTemporalLayerCount; VkVideoEncodeAV1QIndexKHR preferredConstantQIndex; uint32_t preferredMaxSingleReferenceCount; uint32_t preferredSingleReferenceNameMask; uint32_t preferredMaxUnidirectionalCompoundReferenceCount; uint32_t preferredMaxUnidirectionalCompoundGroup1ReferenceCount; uint32_t preferredUnidirectionalCompoundReferenceNameMask; uint32_t preferredMaxBidirectionalCompoundReferenceCount; uint32_t preferredMaxBidirectionalCompoundGroup1ReferenceCount; uint32_t preferredMaxBidirectionalCompoundGroup2ReferenceCount; uint32_t preferredBidirectionalCompoundReferenceNameMask; } VkVideoEncodeAV1QualityLevelPropertiesKHR; typedef struct VkVideoEncodeAV1SessionCreateInfoKHR { VkStructureType sType; const void* pNext; VkBool32 useMaxLevel; StdVideoAV1Level maxLevel; } VkVideoEncodeAV1SessionCreateInfoKHR; typedef struct VkVideoEncodeAV1SessionParametersCreateInfoKHR { VkStructureType sType; const void* pNext; const StdVideoAV1SequenceHeader* pStdSequenceHeader; const StdVideoEncodeAV1DecoderModelInfo* pStdDecoderModelInfo; uint32_t stdOperatingPointCount; const StdVideoEncodeAV1OperatingPointInfo* pStdOperatingPoints; } VkVideoEncodeAV1SessionParametersCreateInfoKHR; typedef struct VkVideoEncodeAV1PictureInfoKHR { VkStructureType sType; const void* pNext; VkVideoEncodeAV1PredictionModeKHR predictionMode; VkVideoEncodeAV1RateControlGroupKHR rateControlGroup; uint32_t constantQIndex; const StdVideoEncodeAV1PictureInfo* pStdPictureInfo; int32_t referenceNameSlotIndices[VK_MAX_VIDEO_AV1_REFERENCES_PER_FRAME_KHR]; VkBool32 primaryReferenceCdfOnly; VkBool32 generateObuExtensionHeader; } VkVideoEncodeAV1PictureInfoKHR; typedef struct VkVideoEncodeAV1DpbSlotInfoKHR { VkStructureType sType; const void* pNext; const StdVideoEncodeAV1ReferenceInfo* pStdReferenceInfo; } VkVideoEncodeAV1DpbSlotInfoKHR; typedef struct VkVideoEncodeAV1ProfileInfoKHR { VkStructureType sType; const void* pNext; StdVideoAV1Profile stdProfile; } VkVideoEncodeAV1ProfileInfoKHR; typedef struct VkVideoEncodeAV1FrameSizeKHR { uint32_t intraFrameSize; uint32_t predictiveFrameSize; uint32_t bipredictiveFrameSize; } VkVideoEncodeAV1FrameSizeKHR; typedef struct VkVideoEncodeAV1GopRemainingFrameInfoKHR { VkStructureType sType; const void* pNext; VkBool32 useGopRemainingFrames; uint32_t gopRemainingIntra; uint32_t gopRemainingPredictive; uint32_t gopRemainingBipredictive; } VkVideoEncodeAV1GopRemainingFrameInfoKHR; typedef struct VkVideoEncodeAV1RateControlInfoKHR { VkStructureType sType; const void* pNext; VkVideoEncodeAV1RateControlFlagsKHR flags; uint32_t gopFrameCount; uint32_t keyFramePeriod; uint32_t consecutiveBipredictiveFrameCount; uint32_t temporalLayerCount; } VkVideoEncodeAV1RateControlInfoKHR; typedef struct VkVideoEncodeAV1RateControlLayerInfoKHR { VkStructureType sType; const void* pNext; VkBool32 useMinQIndex; VkVideoEncodeAV1QIndexKHR minQIndex; VkBool32 useMaxQIndex; VkVideoEncodeAV1QIndexKHR maxQIndex; VkBool32 useMaxFrameSize; VkVideoEncodeAV1FrameSizeKHR maxFrameSize; } VkVideoEncodeAV1RateControlLayerInfoKHR; // VK_KHR_video_maintenance1 is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_video_maintenance1 1 #define VK_KHR_VIDEO_MAINTENANCE_1_SPEC_VERSION 1 #define VK_KHR_VIDEO_MAINTENANCE_1_EXTENSION_NAME "VK_KHR_video_maintenance1" typedef struct VkPhysicalDeviceVideoMaintenance1FeaturesKHR { VkStructureType sType; void* pNext; VkBool32 videoMaintenance1; } VkPhysicalDeviceVideoMaintenance1FeaturesKHR; typedef struct VkVideoInlineQueryInfoKHR { VkStructureType sType; const void* pNext; VkQueryPool queryPool; uint32_t firstQuery; uint32_t queryCount; } VkVideoInlineQueryInfoKHR; // VK_KHR_vertex_attribute_divisor is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_vertex_attribute_divisor 1 #define VK_KHR_VERTEX_ATTRIBUTE_DIVISOR_SPEC_VERSION 1 #define VK_KHR_VERTEX_ATTRIBUTE_DIVISOR_EXTENSION_NAME "VK_KHR_vertex_attribute_divisor" typedef VkPhysicalDeviceVertexAttributeDivisorProperties VkPhysicalDeviceVertexAttributeDivisorPropertiesKHR; typedef VkVertexInputBindingDivisorDescription VkVertexInputBindingDivisorDescriptionKHR; typedef VkPipelineVertexInputDivisorStateCreateInfo VkPipelineVertexInputDivisorStateCreateInfoKHR; typedef VkPhysicalDeviceVertexAttributeDivisorFeatures VkPhysicalDeviceVertexAttributeDivisorFeaturesKHR; // VK_KHR_load_store_op_none is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_load_store_op_none 1 #define VK_KHR_LOAD_STORE_OP_NONE_SPEC_VERSION 1 #define VK_KHR_LOAD_STORE_OP_NONE_EXTENSION_NAME "VK_KHR_load_store_op_none" // VK_KHR_shader_float_controls2 is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_shader_float_controls2 1 #define VK_KHR_SHADER_FLOAT_CONTROLS_2_SPEC_VERSION 1 #define VK_KHR_SHADER_FLOAT_CONTROLS_2_EXTENSION_NAME "VK_KHR_shader_float_controls2" typedef VkPhysicalDeviceShaderFloatControls2Features VkPhysicalDeviceShaderFloatControls2FeaturesKHR; // VK_KHR_index_type_uint8 is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_index_type_uint8 1 #define VK_KHR_INDEX_TYPE_UINT8_SPEC_VERSION 1 #define VK_KHR_INDEX_TYPE_UINT8_EXTENSION_NAME "VK_KHR_index_type_uint8" typedef VkPhysicalDeviceIndexTypeUint8Features VkPhysicalDeviceIndexTypeUint8FeaturesKHR; // VK_KHR_line_rasterization is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_line_rasterization 1 #define VK_KHR_LINE_RASTERIZATION_SPEC_VERSION 1 #define VK_KHR_LINE_RASTERIZATION_EXTENSION_NAME "VK_KHR_line_rasterization" typedef VkLineRasterizationMode VkLineRasterizationModeKHR; typedef VkPhysicalDeviceLineRasterizationFeatures VkPhysicalDeviceLineRasterizationFeaturesKHR; typedef VkPhysicalDeviceLineRasterizationProperties VkPhysicalDeviceLineRasterizationPropertiesKHR; typedef VkPipelineRasterizationLineStateCreateInfo VkPipelineRasterizationLineStateCreateInfoKHR; typedef void (VKAPI_PTR *PFN_vkCmdSetLineStippleKHR)(VkCommandBuffer commandBuffer, uint32_t lineStippleFactor, uint16_t lineStipplePattern); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR void VKAPI_CALL vkCmdSetLineStippleKHR( VkCommandBuffer commandBuffer, uint32_t lineStippleFactor, uint16_t lineStipplePattern); #endif // VK_KHR_calibrated_timestamps is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_calibrated_timestamps 1 #define VK_KHR_CALIBRATED_TIMESTAMPS_SPEC_VERSION 1 #define VK_KHR_CALIBRATED_TIMESTAMPS_EXTENSION_NAME "VK_KHR_calibrated_timestamps" typedef enum VkTimeDomainKHR { VK_TIME_DOMAIN_DEVICE_KHR = 0, VK_TIME_DOMAIN_CLOCK_MONOTONIC_KHR = 1, VK_TIME_DOMAIN_CLOCK_MONOTONIC_RAW_KHR = 2, VK_TIME_DOMAIN_QUERY_PERFORMANCE_COUNTER_KHR = 3, VK_TIME_DOMAIN_DEVICE_EXT = VK_TIME_DOMAIN_DEVICE_KHR, VK_TIME_DOMAIN_CLOCK_MONOTONIC_EXT = VK_TIME_DOMAIN_CLOCK_MONOTONIC_KHR, VK_TIME_DOMAIN_CLOCK_MONOTONIC_RAW_EXT = VK_TIME_DOMAIN_CLOCK_MONOTONIC_RAW_KHR, VK_TIME_DOMAIN_QUERY_PERFORMANCE_COUNTER_EXT = VK_TIME_DOMAIN_QUERY_PERFORMANCE_COUNTER_KHR, VK_TIME_DOMAIN_MAX_ENUM_KHR = 0x7FFFFFFF } VkTimeDomainKHR; typedef struct VkCalibratedTimestampInfoKHR { VkStructureType sType; const void* pNext; VkTimeDomainKHR timeDomain; } VkCalibratedTimestampInfoKHR; typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceCalibrateableTimeDomainsKHR)(VkPhysicalDevice physicalDevice, uint32_t* pTimeDomainCount, VkTimeDomainKHR* pTimeDomains); typedef VkResult (VKAPI_PTR *PFN_vkGetCalibratedTimestampsKHR)(VkDevice device, uint32_t timestampCount, const VkCalibratedTimestampInfoKHR* pTimestampInfos, uint64_t* pTimestamps, uint64_t* pMaxDeviation); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceCalibrateableTimeDomainsKHR( VkPhysicalDevice physicalDevice, uint32_t* pTimeDomainCount, VkTimeDomainKHR* pTimeDomains); VKAPI_ATTR VkResult VKAPI_CALL vkGetCalibratedTimestampsKHR( VkDevice device, uint32_t timestampCount, const VkCalibratedTimestampInfoKHR* pTimestampInfos, uint64_t* pTimestamps, uint64_t* pMaxDeviation); #endif // VK_KHR_shader_expect_assume is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_shader_expect_assume 1 #define VK_KHR_SHADER_EXPECT_ASSUME_SPEC_VERSION 1 #define VK_KHR_SHADER_EXPECT_ASSUME_EXTENSION_NAME "VK_KHR_shader_expect_assume" typedef VkPhysicalDeviceShaderExpectAssumeFeatures VkPhysicalDeviceShaderExpectAssumeFeaturesKHR; // VK_KHR_maintenance6 is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_maintenance6 1 #define VK_KHR_MAINTENANCE_6_SPEC_VERSION 1 #define VK_KHR_MAINTENANCE_6_EXTENSION_NAME "VK_KHR_maintenance6" typedef VkPhysicalDeviceMaintenance6Features VkPhysicalDeviceMaintenance6FeaturesKHR; typedef VkPhysicalDeviceMaintenance6Properties VkPhysicalDeviceMaintenance6PropertiesKHR; typedef VkBindMemoryStatus VkBindMemoryStatusKHR; typedef VkBindDescriptorSetsInfo VkBindDescriptorSetsInfoKHR; typedef VkPushConstantsInfo VkPushConstantsInfoKHR; typedef VkPushDescriptorSetInfo VkPushDescriptorSetInfoKHR; typedef VkPushDescriptorSetWithTemplateInfo VkPushDescriptorSetWithTemplateInfoKHR; typedef struct VkSetDescriptorBufferOffsetsInfoEXT { VkStructureType sType; const void* pNext; VkShaderStageFlags stageFlags; VkPipelineLayout layout; uint32_t firstSet; uint32_t setCount; const uint32_t* pBufferIndices; const VkDeviceSize* pOffsets; } VkSetDescriptorBufferOffsetsInfoEXT; typedef struct VkBindDescriptorBufferEmbeddedSamplersInfoEXT { VkStructureType sType; const void* pNext; VkShaderStageFlags stageFlags; VkPipelineLayout layout; uint32_t set; } VkBindDescriptorBufferEmbeddedSamplersInfoEXT; typedef void (VKAPI_PTR *PFN_vkCmdBindDescriptorSets2KHR)(VkCommandBuffer commandBuffer, const VkBindDescriptorSetsInfo* pBindDescriptorSetsInfo); typedef void (VKAPI_PTR *PFN_vkCmdPushConstants2KHR)(VkCommandBuffer commandBuffer, const VkPushConstantsInfo* pPushConstantsInfo); typedef void (VKAPI_PTR *PFN_vkCmdPushDescriptorSet2KHR)(VkCommandBuffer commandBuffer, const VkPushDescriptorSetInfo* pPushDescriptorSetInfo); typedef void (VKAPI_PTR *PFN_vkCmdPushDescriptorSetWithTemplate2KHR)(VkCommandBuffer commandBuffer, const VkPushDescriptorSetWithTemplateInfo* pPushDescriptorSetWithTemplateInfo); typedef void (VKAPI_PTR *PFN_vkCmdSetDescriptorBufferOffsets2EXT)(VkCommandBuffer commandBuffer, const VkSetDescriptorBufferOffsetsInfoEXT* pSetDescriptorBufferOffsetsInfo); typedef void (VKAPI_PTR *PFN_vkCmdBindDescriptorBufferEmbeddedSamplers2EXT)(VkCommandBuffer commandBuffer, const VkBindDescriptorBufferEmbeddedSamplersInfoEXT* pBindDescriptorBufferEmbeddedSamplersInfo); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR void VKAPI_CALL vkCmdBindDescriptorSets2KHR( VkCommandBuffer commandBuffer, const VkBindDescriptorSetsInfo* pBindDescriptorSetsInfo); VKAPI_ATTR void VKAPI_CALL vkCmdPushConstants2KHR( VkCommandBuffer commandBuffer, const VkPushConstantsInfo* pPushConstantsInfo); VKAPI_ATTR void VKAPI_CALL vkCmdPushDescriptorSet2KHR( VkCommandBuffer commandBuffer, const VkPushDescriptorSetInfo* pPushDescriptorSetInfo); VKAPI_ATTR void VKAPI_CALL vkCmdPushDescriptorSetWithTemplate2KHR( VkCommandBuffer commandBuffer, const VkPushDescriptorSetWithTemplateInfo* pPushDescriptorSetWithTemplateInfo); VKAPI_ATTR void VKAPI_CALL vkCmdSetDescriptorBufferOffsets2EXT( VkCommandBuffer commandBuffer, const VkSetDescriptorBufferOffsetsInfoEXT* pSetDescriptorBufferOffsetsInfo); VKAPI_ATTR void VKAPI_CALL vkCmdBindDescriptorBufferEmbeddedSamplers2EXT( VkCommandBuffer commandBuffer, const VkBindDescriptorBufferEmbeddedSamplersInfoEXT* pBindDescriptorBufferEmbeddedSamplersInfo); #endif // VK_KHR_video_encode_quantization_map is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_video_encode_quantization_map 1 #define VK_KHR_VIDEO_ENCODE_QUANTIZATION_MAP_SPEC_VERSION 2 #define VK_KHR_VIDEO_ENCODE_QUANTIZATION_MAP_EXTENSION_NAME "VK_KHR_video_encode_quantization_map" typedef struct VkVideoEncodeQuantizationMapCapabilitiesKHR { VkStructureType sType; void* pNext; VkExtent2D maxQuantizationMapExtent; } VkVideoEncodeQuantizationMapCapabilitiesKHR; typedef struct VkVideoFormatQuantizationMapPropertiesKHR { VkStructureType sType; void* pNext; VkExtent2D quantizationMapTexelSize; } VkVideoFormatQuantizationMapPropertiesKHR; typedef struct VkVideoEncodeQuantizationMapInfoKHR { VkStructureType sType; const void* pNext; VkImageView quantizationMap; VkExtent2D quantizationMapExtent; } VkVideoEncodeQuantizationMapInfoKHR; typedef struct VkVideoEncodeQuantizationMapSessionParametersCreateInfoKHR { VkStructureType sType; const void* pNext; VkExtent2D quantizationMapTexelSize; } VkVideoEncodeQuantizationMapSessionParametersCreateInfoKHR; typedef struct VkPhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR { VkStructureType sType; void* pNext; VkBool32 videoEncodeQuantizationMap; } VkPhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR; typedef struct VkVideoEncodeH264QuantizationMapCapabilitiesKHR { VkStructureType sType; void* pNext; int32_t minQpDelta; int32_t maxQpDelta; } VkVideoEncodeH264QuantizationMapCapabilitiesKHR; typedef struct VkVideoEncodeH265QuantizationMapCapabilitiesKHR { VkStructureType sType; void* pNext; int32_t minQpDelta; int32_t maxQpDelta; } VkVideoEncodeH265QuantizationMapCapabilitiesKHR; typedef struct VkVideoFormatH265QuantizationMapPropertiesKHR { VkStructureType sType; void* pNext; VkVideoEncodeH265CtbSizeFlagsKHR compatibleCtbSizes; } VkVideoFormatH265QuantizationMapPropertiesKHR; typedef struct VkVideoEncodeAV1QuantizationMapCapabilitiesKHR { VkStructureType sType; void* pNext; int32_t minQIndexDelta; int32_t maxQIndexDelta; } VkVideoEncodeAV1QuantizationMapCapabilitiesKHR; typedef struct VkVideoFormatAV1QuantizationMapPropertiesKHR { VkStructureType sType; void* pNext; VkVideoEncodeAV1SuperblockSizeFlagsKHR compatibleSuperblockSizes; } VkVideoFormatAV1QuantizationMapPropertiesKHR; // VK_KHR_shader_relaxed_extended_instruction is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_shader_relaxed_extended_instruction 1 #define VK_KHR_SHADER_RELAXED_EXTENDED_INSTRUCTION_SPEC_VERSION 1 #define VK_KHR_SHADER_RELAXED_EXTENDED_INSTRUCTION_EXTENSION_NAME "VK_KHR_shader_relaxed_extended_instruction" typedef struct VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR { VkStructureType sType; void* pNext; VkBool32 shaderRelaxedExtendedInstruction; } VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR; // VK_KHR_maintenance7 is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_maintenance7 1 #define VK_KHR_MAINTENANCE_7_SPEC_VERSION 1 #define VK_KHR_MAINTENANCE_7_EXTENSION_NAME "VK_KHR_maintenance7" typedef enum VkPhysicalDeviceLayeredApiKHR { VK_PHYSICAL_DEVICE_LAYERED_API_VULKAN_KHR = 0, VK_PHYSICAL_DEVICE_LAYERED_API_D3D12_KHR = 1, VK_PHYSICAL_DEVICE_LAYERED_API_METAL_KHR = 2, VK_PHYSICAL_DEVICE_LAYERED_API_OPENGL_KHR = 3, VK_PHYSICAL_DEVICE_LAYERED_API_OPENGLES_KHR = 4, VK_PHYSICAL_DEVICE_LAYERED_API_MAX_ENUM_KHR = 0x7FFFFFFF } VkPhysicalDeviceLayeredApiKHR; typedef struct VkPhysicalDeviceMaintenance7FeaturesKHR { VkStructureType sType; void* pNext; VkBool32 maintenance7; } VkPhysicalDeviceMaintenance7FeaturesKHR; typedef struct VkPhysicalDeviceMaintenance7PropertiesKHR { VkStructureType sType; void* pNext; VkBool32 robustFragmentShadingRateAttachmentAccess; VkBool32 separateDepthStencilAttachmentAccess; uint32_t maxDescriptorSetTotalUniformBuffersDynamic; uint32_t maxDescriptorSetTotalStorageBuffersDynamic; uint32_t maxDescriptorSetTotalBuffersDynamic; uint32_t maxDescriptorSetUpdateAfterBindTotalUniformBuffersDynamic; uint32_t maxDescriptorSetUpdateAfterBindTotalStorageBuffersDynamic; uint32_t maxDescriptorSetUpdateAfterBindTotalBuffersDynamic; } VkPhysicalDeviceMaintenance7PropertiesKHR; typedef struct VkPhysicalDeviceLayeredApiPropertiesKHR { VkStructureType sType; void* pNext; uint32_t vendorID; uint32_t deviceID; VkPhysicalDeviceLayeredApiKHR layeredAPI; char deviceName[VK_MAX_PHYSICAL_DEVICE_NAME_SIZE]; } VkPhysicalDeviceLayeredApiPropertiesKHR; typedef struct VkPhysicalDeviceLayeredApiPropertiesListKHR { VkStructureType sType; void* pNext; uint32_t layeredApiCount; VkPhysicalDeviceLayeredApiPropertiesKHR* pLayeredApis; } VkPhysicalDeviceLayeredApiPropertiesListKHR; typedef struct VkPhysicalDeviceLayeredApiVulkanPropertiesKHR { VkStructureType sType; void* pNext; VkPhysicalDeviceProperties2 properties; } VkPhysicalDeviceLayeredApiVulkanPropertiesKHR; // VK_KHR_maintenance8 is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_maintenance8 1 #define VK_KHR_MAINTENANCE_8_SPEC_VERSION 1 #define VK_KHR_MAINTENANCE_8_EXTENSION_NAME "VK_KHR_maintenance8" typedef VkFlags64 VkAccessFlags3KHR; // Flag bits for VkAccessFlagBits3KHR typedef VkFlags64 VkAccessFlagBits3KHR; static const VkAccessFlagBits3KHR VK_ACCESS_3_NONE_KHR = 0ULL; typedef struct VkPhysicalDeviceMaintenance8FeaturesKHR { VkStructureType sType; void* pNext; VkBool32 maintenance8; } VkPhysicalDeviceMaintenance8FeaturesKHR; typedef struct VkMemoryBarrierAccessFlags3KHR { VkStructureType sType; const void* pNext; VkAccessFlags3KHR srcAccessMask3; VkAccessFlags3KHR dstAccessMask3; } VkMemoryBarrierAccessFlags3KHR; // VK_KHR_video_maintenance2 is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_video_maintenance2 1 #define VK_KHR_VIDEO_MAINTENANCE_2_SPEC_VERSION 1 #define VK_KHR_VIDEO_MAINTENANCE_2_EXTENSION_NAME "VK_KHR_video_maintenance2" typedef struct VkPhysicalDeviceVideoMaintenance2FeaturesKHR { VkStructureType sType; void* pNext; VkBool32 videoMaintenance2; } VkPhysicalDeviceVideoMaintenance2FeaturesKHR; typedef struct VkVideoDecodeH264InlineSessionParametersInfoKHR { VkStructureType sType; const void* pNext; const StdVideoH264SequenceParameterSet* pStdSPS; const StdVideoH264PictureParameterSet* pStdPPS; } VkVideoDecodeH264InlineSessionParametersInfoKHR; typedef struct VkVideoDecodeH265InlineSessionParametersInfoKHR { VkStructureType sType; const void* pNext; const StdVideoH265VideoParameterSet* pStdVPS; const StdVideoH265SequenceParameterSet* pStdSPS; const StdVideoH265PictureParameterSet* pStdPPS; } VkVideoDecodeH265InlineSessionParametersInfoKHR; typedef struct VkVideoDecodeAV1InlineSessionParametersInfoKHR { VkStructureType sType; const void* pNext; const StdVideoAV1SequenceHeader* pStdSequenceHeader; } VkVideoDecodeAV1InlineSessionParametersInfoKHR; // VK_KHR_depth_clamp_zero_one is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_depth_clamp_zero_one 1 #define VK_KHR_DEPTH_CLAMP_ZERO_ONE_SPEC_VERSION 1 #define VK_KHR_DEPTH_CLAMP_ZERO_ONE_EXTENSION_NAME "VK_KHR_depth_clamp_zero_one" typedef struct VkPhysicalDeviceDepthClampZeroOneFeaturesKHR { VkStructureType sType; void* pNext; VkBool32 depthClampZeroOne; } VkPhysicalDeviceDepthClampZeroOneFeaturesKHR; // VK_EXT_debug_report is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_debug_report 1 VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDebugReportCallbackEXT) #define VK_EXT_DEBUG_REPORT_SPEC_VERSION 10 #define VK_EXT_DEBUG_REPORT_EXTENSION_NAME "VK_EXT_debug_report" typedef enum VkDebugReportObjectTypeEXT { VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT = 0, VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT = 1, VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT = 2, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT = 3, VK_DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT = 4, VK_DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT = 5, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT = 6, VK_DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT = 7, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT = 8, VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT = 9, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT = 10, VK_DEBUG_REPORT_OBJECT_TYPE_EVENT_EXT = 11, VK_DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT = 12, VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_VIEW_EXT = 13, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_VIEW_EXT = 14, VK_DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT = 15, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_CACHE_EXT = 16, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_LAYOUT_EXT = 17, VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT = 18, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT = 19, VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT_EXT = 20, VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_EXT = 21, VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT = 22, VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT = 23, VK_DEBUG_REPORT_OBJECT_TYPE_FRAMEBUFFER_EXT = 24, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_POOL_EXT = 25, VK_DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT = 26, VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT = 27, VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT_EXT = 28, VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_KHR_EXT = 29, VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_MODE_KHR_EXT = 30, VK_DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT_EXT = 33, VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION_EXT = 1000156000, VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_EXT = 1000085000, VK_DEBUG_REPORT_OBJECT_TYPE_CU_MODULE_NVX_EXT = 1000029000, VK_DEBUG_REPORT_OBJECT_TYPE_CU_FUNCTION_NVX_EXT = 1000029001, VK_DEBUG_REPORT_OBJECT_TYPE_ACCELERATION_STRUCTURE_KHR_EXT = 1000150000, VK_DEBUG_REPORT_OBJECT_TYPE_ACCELERATION_STRUCTURE_NV_EXT = 1000165000, VK_DEBUG_REPORT_OBJECT_TYPE_CUDA_MODULE_NV_EXT = 1000307000, VK_DEBUG_REPORT_OBJECT_TYPE_CUDA_FUNCTION_NV_EXT = 1000307001, VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_COLLECTION_FUCHSIA_EXT = 1000366000, // VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_EXT is a deprecated alias VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_EXT = VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT_EXT, // VK_DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT is a deprecated alias VK_DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT = VK_DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_KHR_EXT = VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION_KHR_EXT = VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_MAX_ENUM_EXT = 0x7FFFFFFF } VkDebugReportObjectTypeEXT; typedef enum VkDebugReportFlagBitsEXT { VK_DEBUG_REPORT_INFORMATION_BIT_EXT = 0x00000001, VK_DEBUG_REPORT_WARNING_BIT_EXT = 0x00000002, VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT = 0x00000004, VK_DEBUG_REPORT_ERROR_BIT_EXT = 0x00000008, VK_DEBUG_REPORT_DEBUG_BIT_EXT = 0x00000010, VK_DEBUG_REPORT_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF } VkDebugReportFlagBitsEXT; typedef VkFlags VkDebugReportFlagsEXT; typedef VkBool32 (VKAPI_PTR *PFN_vkDebugReportCallbackEXT)( VkDebugReportFlagsEXT flags, VkDebugReportObjectTypeEXT objectType, uint64_t object, size_t location, int32_t messageCode, const char* pLayerPrefix, const char* pMessage, void* pUserData); typedef struct VkDebugReportCallbackCreateInfoEXT { VkStructureType sType; const void* pNext; VkDebugReportFlagsEXT flags; PFN_vkDebugReportCallbackEXT pfnCallback; void* pUserData; } VkDebugReportCallbackCreateInfoEXT; typedef VkResult (VKAPI_PTR *PFN_vkCreateDebugReportCallbackEXT)(VkInstance instance, const VkDebugReportCallbackCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDebugReportCallbackEXT* pCallback); typedef void (VKAPI_PTR *PFN_vkDestroyDebugReportCallbackEXT)(VkInstance instance, VkDebugReportCallbackEXT callback, const VkAllocationCallbacks* pAllocator); typedef void (VKAPI_PTR *PFN_vkDebugReportMessageEXT)(VkInstance instance, VkDebugReportFlagsEXT flags, VkDebugReportObjectTypeEXT objectType, uint64_t object, size_t location, int32_t messageCode, const char* pLayerPrefix, const char* pMessage); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkCreateDebugReportCallbackEXT( VkInstance instance, const VkDebugReportCallbackCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDebugReportCallbackEXT* pCallback); VKAPI_ATTR void VKAPI_CALL vkDestroyDebugReportCallbackEXT( VkInstance instance, VkDebugReportCallbackEXT callback, const VkAllocationCallbacks* pAllocator); VKAPI_ATTR void VKAPI_CALL vkDebugReportMessageEXT( VkInstance instance, VkDebugReportFlagsEXT flags, VkDebugReportObjectTypeEXT objectType, uint64_t object, size_t location, int32_t messageCode, const char* pLayerPrefix, const char* pMessage); #endif // VK_NV_glsl_shader is a preprocessor guard. Do not pass it to API calls. #define VK_NV_glsl_shader 1 #define VK_NV_GLSL_SHADER_SPEC_VERSION 1 #define VK_NV_GLSL_SHADER_EXTENSION_NAME "VK_NV_glsl_shader" // VK_EXT_depth_range_unrestricted is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_depth_range_unrestricted 1 #define VK_EXT_DEPTH_RANGE_UNRESTRICTED_SPEC_VERSION 1 #define VK_EXT_DEPTH_RANGE_UNRESTRICTED_EXTENSION_NAME "VK_EXT_depth_range_unrestricted" // VK_IMG_filter_cubic is a preprocessor guard. Do not pass it to API calls. #define VK_IMG_filter_cubic 1 #define VK_IMG_FILTER_CUBIC_SPEC_VERSION 1 #define VK_IMG_FILTER_CUBIC_EXTENSION_NAME "VK_IMG_filter_cubic" // VK_AMD_rasterization_order is a preprocessor guard. Do not pass it to API calls. #define VK_AMD_rasterization_order 1 #define VK_AMD_RASTERIZATION_ORDER_SPEC_VERSION 1 #define VK_AMD_RASTERIZATION_ORDER_EXTENSION_NAME "VK_AMD_rasterization_order" typedef enum VkRasterizationOrderAMD { VK_RASTERIZATION_ORDER_STRICT_AMD = 0, VK_RASTERIZATION_ORDER_RELAXED_AMD = 1, VK_RASTERIZATION_ORDER_MAX_ENUM_AMD = 0x7FFFFFFF } VkRasterizationOrderAMD; typedef struct VkPipelineRasterizationStateRasterizationOrderAMD { VkStructureType sType; const void* pNext; VkRasterizationOrderAMD rasterizationOrder; } VkPipelineRasterizationStateRasterizationOrderAMD; // VK_AMD_shader_trinary_minmax is a preprocessor guard. Do not pass it to API calls. #define VK_AMD_shader_trinary_minmax 1 #define VK_AMD_SHADER_TRINARY_MINMAX_SPEC_VERSION 1 #define VK_AMD_SHADER_TRINARY_MINMAX_EXTENSION_NAME "VK_AMD_shader_trinary_minmax" // VK_AMD_shader_explicit_vertex_parameter is a preprocessor guard. Do not pass it to API calls. #define VK_AMD_shader_explicit_vertex_parameter 1 #define VK_AMD_SHADER_EXPLICIT_VERTEX_PARAMETER_SPEC_VERSION 1 #define VK_AMD_SHADER_EXPLICIT_VERTEX_PARAMETER_EXTENSION_NAME "VK_AMD_shader_explicit_vertex_parameter" // VK_EXT_debug_marker is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_debug_marker 1 #define VK_EXT_DEBUG_MARKER_SPEC_VERSION 4 #define VK_EXT_DEBUG_MARKER_EXTENSION_NAME "VK_EXT_debug_marker" typedef struct VkDebugMarkerObjectNameInfoEXT { VkStructureType sType; const void* pNext; VkDebugReportObjectTypeEXT objectType; uint64_t object; const char* pObjectName; } VkDebugMarkerObjectNameInfoEXT; typedef struct VkDebugMarkerObjectTagInfoEXT { VkStructureType sType; const void* pNext; VkDebugReportObjectTypeEXT objectType; uint64_t object; uint64_t tagName; size_t tagSize; const void* pTag; } VkDebugMarkerObjectTagInfoEXT; typedef struct VkDebugMarkerMarkerInfoEXT { VkStructureType sType; const void* pNext; const char* pMarkerName; float color[4]; } VkDebugMarkerMarkerInfoEXT; typedef VkResult (VKAPI_PTR *PFN_vkDebugMarkerSetObjectTagEXT)(VkDevice device, const VkDebugMarkerObjectTagInfoEXT* pTagInfo); typedef VkResult (VKAPI_PTR *PFN_vkDebugMarkerSetObjectNameEXT)(VkDevice device, const VkDebugMarkerObjectNameInfoEXT* pNameInfo); typedef void (VKAPI_PTR *PFN_vkCmdDebugMarkerBeginEXT)(VkCommandBuffer commandBuffer, const VkDebugMarkerMarkerInfoEXT* pMarkerInfo); typedef void (VKAPI_PTR *PFN_vkCmdDebugMarkerEndEXT)(VkCommandBuffer commandBuffer); typedef void (VKAPI_PTR *PFN_vkCmdDebugMarkerInsertEXT)(VkCommandBuffer commandBuffer, const VkDebugMarkerMarkerInfoEXT* pMarkerInfo); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkDebugMarkerSetObjectTagEXT( VkDevice device, const VkDebugMarkerObjectTagInfoEXT* pTagInfo); VKAPI_ATTR VkResult VKAPI_CALL vkDebugMarkerSetObjectNameEXT( VkDevice device, const VkDebugMarkerObjectNameInfoEXT* pNameInfo); VKAPI_ATTR void VKAPI_CALL vkCmdDebugMarkerBeginEXT( VkCommandBuffer commandBuffer, const VkDebugMarkerMarkerInfoEXT* pMarkerInfo); VKAPI_ATTR void VKAPI_CALL vkCmdDebugMarkerEndEXT( VkCommandBuffer commandBuffer); VKAPI_ATTR void VKAPI_CALL vkCmdDebugMarkerInsertEXT( VkCommandBuffer commandBuffer, const VkDebugMarkerMarkerInfoEXT* pMarkerInfo); #endif // VK_AMD_gcn_shader is a preprocessor guard. Do not pass it to API calls. #define VK_AMD_gcn_shader 1 #define VK_AMD_GCN_SHADER_SPEC_VERSION 1 #define VK_AMD_GCN_SHADER_EXTENSION_NAME "VK_AMD_gcn_shader" // VK_NV_dedicated_allocation is a preprocessor guard. Do not pass it to API calls. #define VK_NV_dedicated_allocation 1 #define VK_NV_DEDICATED_ALLOCATION_SPEC_VERSION 1 #define VK_NV_DEDICATED_ALLOCATION_EXTENSION_NAME "VK_NV_dedicated_allocation" typedef struct VkDedicatedAllocationImageCreateInfoNV { VkStructureType sType; const void* pNext; VkBool32 dedicatedAllocation; } VkDedicatedAllocationImageCreateInfoNV; typedef struct VkDedicatedAllocationBufferCreateInfoNV { VkStructureType sType; const void* pNext; VkBool32 dedicatedAllocation; } VkDedicatedAllocationBufferCreateInfoNV; typedef struct VkDedicatedAllocationMemoryAllocateInfoNV { VkStructureType sType; const void* pNext; VkImage image; VkBuffer buffer; } VkDedicatedAllocationMemoryAllocateInfoNV; // VK_EXT_transform_feedback is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_transform_feedback 1 #define VK_EXT_TRANSFORM_FEEDBACK_SPEC_VERSION 1 #define VK_EXT_TRANSFORM_FEEDBACK_EXTENSION_NAME "VK_EXT_transform_feedback" typedef VkFlags VkPipelineRasterizationStateStreamCreateFlagsEXT; typedef struct VkPhysicalDeviceTransformFeedbackFeaturesEXT { VkStructureType sType; void* pNext; VkBool32 transformFeedback; VkBool32 geometryStreams; } VkPhysicalDeviceTransformFeedbackFeaturesEXT; typedef struct VkPhysicalDeviceTransformFeedbackPropertiesEXT { VkStructureType sType; void* pNext; uint32_t maxTransformFeedbackStreams; uint32_t maxTransformFeedbackBuffers; VkDeviceSize maxTransformFeedbackBufferSize; uint32_t maxTransformFeedbackStreamDataSize; uint32_t maxTransformFeedbackBufferDataSize; uint32_t maxTransformFeedbackBufferDataStride; VkBool32 transformFeedbackQueries; VkBool32 transformFeedbackStreamsLinesTriangles; VkBool32 transformFeedbackRasterizationStreamSelect; VkBool32 transformFeedbackDraw; } VkPhysicalDeviceTransformFeedbackPropertiesEXT; typedef struct VkPipelineRasterizationStateStreamCreateInfoEXT { VkStructureType sType; const void* pNext; VkPipelineRasterizationStateStreamCreateFlagsEXT flags; uint32_t rasterizationStream; } VkPipelineRasterizationStateStreamCreateInfoEXT; typedef void (VKAPI_PTR *PFN_vkCmdBindTransformFeedbackBuffersEXT)(VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, const VkBuffer* pBuffers, const VkDeviceSize* pOffsets, const VkDeviceSize* pSizes); typedef void (VKAPI_PTR *PFN_vkCmdBeginTransformFeedbackEXT)(VkCommandBuffer commandBuffer, uint32_t firstCounterBuffer, uint32_t counterBufferCount, const VkBuffer* pCounterBuffers, const VkDeviceSize* pCounterBufferOffsets); typedef void (VKAPI_PTR *PFN_vkCmdEndTransformFeedbackEXT)(VkCommandBuffer commandBuffer, uint32_t firstCounterBuffer, uint32_t counterBufferCount, const VkBuffer* pCounterBuffers, const VkDeviceSize* pCounterBufferOffsets); typedef void (VKAPI_PTR *PFN_vkCmdBeginQueryIndexedEXT)(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, VkQueryControlFlags flags, uint32_t index); typedef void (VKAPI_PTR *PFN_vkCmdEndQueryIndexedEXT)(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, uint32_t index); typedef void (VKAPI_PTR *PFN_vkCmdDrawIndirectByteCountEXT)(VkCommandBuffer commandBuffer, uint32_t instanceCount, uint32_t firstInstance, VkBuffer counterBuffer, VkDeviceSize counterBufferOffset, uint32_t counterOffset, uint32_t vertexStride); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR void VKAPI_CALL vkCmdBindTransformFeedbackBuffersEXT( VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, const VkBuffer* pBuffers, const VkDeviceSize* pOffsets, const VkDeviceSize* pSizes); VKAPI_ATTR void VKAPI_CALL vkCmdBeginTransformFeedbackEXT( VkCommandBuffer commandBuffer, uint32_t firstCounterBuffer, uint32_t counterBufferCount, const VkBuffer* pCounterBuffers, const VkDeviceSize* pCounterBufferOffsets); VKAPI_ATTR void VKAPI_CALL vkCmdEndTransformFeedbackEXT( VkCommandBuffer commandBuffer, uint32_t firstCounterBuffer, uint32_t counterBufferCount, const VkBuffer* pCounterBuffers, const VkDeviceSize* pCounterBufferOffsets); VKAPI_ATTR void VKAPI_CALL vkCmdBeginQueryIndexedEXT( VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, VkQueryControlFlags flags, uint32_t index); VKAPI_ATTR void VKAPI_CALL vkCmdEndQueryIndexedEXT( VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, uint32_t index); VKAPI_ATTR void VKAPI_CALL vkCmdDrawIndirectByteCountEXT( VkCommandBuffer commandBuffer, uint32_t instanceCount, uint32_t firstInstance, VkBuffer counterBuffer, VkDeviceSize counterBufferOffset, uint32_t counterOffset, uint32_t vertexStride); #endif // VK_NVX_binary_import is a preprocessor guard. Do not pass it to API calls. #define VK_NVX_binary_import 1 VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkCuModuleNVX) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkCuFunctionNVX) #define VK_NVX_BINARY_IMPORT_SPEC_VERSION 2 #define VK_NVX_BINARY_IMPORT_EXTENSION_NAME "VK_NVX_binary_import" typedef struct VkCuModuleCreateInfoNVX { VkStructureType sType; const void* pNext; size_t dataSize; const void* pData; } VkCuModuleCreateInfoNVX; typedef struct VkCuModuleTexturingModeCreateInfoNVX { VkStructureType sType; const void* pNext; VkBool32 use64bitTexturing; } VkCuModuleTexturingModeCreateInfoNVX; typedef struct VkCuFunctionCreateInfoNVX { VkStructureType sType; const void* pNext; VkCuModuleNVX module; const char* pName; } VkCuFunctionCreateInfoNVX; typedef struct VkCuLaunchInfoNVX { VkStructureType sType; const void* pNext; VkCuFunctionNVX function; uint32_t gridDimX; uint32_t gridDimY; uint32_t gridDimZ; uint32_t blockDimX; uint32_t blockDimY; uint32_t blockDimZ; uint32_t sharedMemBytes; size_t paramCount; const void* const * pParams; size_t extraCount; const void* const * pExtras; } VkCuLaunchInfoNVX; typedef VkResult (VKAPI_PTR *PFN_vkCreateCuModuleNVX)(VkDevice device, const VkCuModuleCreateInfoNVX* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkCuModuleNVX* pModule); typedef VkResult (VKAPI_PTR *PFN_vkCreateCuFunctionNVX)(VkDevice device, const VkCuFunctionCreateInfoNVX* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkCuFunctionNVX* pFunction); typedef void (VKAPI_PTR *PFN_vkDestroyCuModuleNVX)(VkDevice device, VkCuModuleNVX module, const VkAllocationCallbacks* pAllocator); typedef void (VKAPI_PTR *PFN_vkDestroyCuFunctionNVX)(VkDevice device, VkCuFunctionNVX function, const VkAllocationCallbacks* pAllocator); typedef void (VKAPI_PTR *PFN_vkCmdCuLaunchKernelNVX)(VkCommandBuffer commandBuffer, const VkCuLaunchInfoNVX* pLaunchInfo); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkCreateCuModuleNVX( VkDevice device, const VkCuModuleCreateInfoNVX* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkCuModuleNVX* pModule); VKAPI_ATTR VkResult VKAPI_CALL vkCreateCuFunctionNVX( VkDevice device, const VkCuFunctionCreateInfoNVX* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkCuFunctionNVX* pFunction); VKAPI_ATTR void VKAPI_CALL vkDestroyCuModuleNVX( VkDevice device, VkCuModuleNVX module, const VkAllocationCallbacks* pAllocator); VKAPI_ATTR void VKAPI_CALL vkDestroyCuFunctionNVX( VkDevice device, VkCuFunctionNVX function, const VkAllocationCallbacks* pAllocator); VKAPI_ATTR void VKAPI_CALL vkCmdCuLaunchKernelNVX( VkCommandBuffer commandBuffer, const VkCuLaunchInfoNVX* pLaunchInfo); #endif // VK_NVX_image_view_handle is a preprocessor guard. Do not pass it to API calls. #define VK_NVX_image_view_handle 1 #define VK_NVX_IMAGE_VIEW_HANDLE_SPEC_VERSION 3 #define VK_NVX_IMAGE_VIEW_HANDLE_EXTENSION_NAME "VK_NVX_image_view_handle" typedef struct VkImageViewHandleInfoNVX { VkStructureType sType; const void* pNext; VkImageView imageView; VkDescriptorType descriptorType; VkSampler sampler; } VkImageViewHandleInfoNVX; typedef struct VkImageViewAddressPropertiesNVX { VkStructureType sType; void* pNext; VkDeviceAddress deviceAddress; VkDeviceSize size; } VkImageViewAddressPropertiesNVX; typedef uint32_t (VKAPI_PTR *PFN_vkGetImageViewHandleNVX)(VkDevice device, const VkImageViewHandleInfoNVX* pInfo); typedef uint64_t (VKAPI_PTR *PFN_vkGetImageViewHandle64NVX)(VkDevice device, const VkImageViewHandleInfoNVX* pInfo); typedef VkResult (VKAPI_PTR *PFN_vkGetImageViewAddressNVX)(VkDevice device, VkImageView imageView, VkImageViewAddressPropertiesNVX* pProperties); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR uint32_t VKAPI_CALL vkGetImageViewHandleNVX( VkDevice device, const VkImageViewHandleInfoNVX* pInfo); VKAPI_ATTR uint64_t VKAPI_CALL vkGetImageViewHandle64NVX( VkDevice device, const VkImageViewHandleInfoNVX* pInfo); VKAPI_ATTR VkResult VKAPI_CALL vkGetImageViewAddressNVX( VkDevice device, VkImageView imageView, VkImageViewAddressPropertiesNVX* pProperties); #endif // VK_AMD_draw_indirect_count is a preprocessor guard. Do not pass it to API calls. #define VK_AMD_draw_indirect_count 1 #define VK_AMD_DRAW_INDIRECT_COUNT_SPEC_VERSION 2 #define VK_AMD_DRAW_INDIRECT_COUNT_EXTENSION_NAME "VK_AMD_draw_indirect_count" typedef void (VKAPI_PTR *PFN_vkCmdDrawIndirectCountAMD)(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride); typedef void (VKAPI_PTR *PFN_vkCmdDrawIndexedIndirectCountAMD)(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR void VKAPI_CALL vkCmdDrawIndirectCountAMD( VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride); VKAPI_ATTR void VKAPI_CALL vkCmdDrawIndexedIndirectCountAMD( VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride); #endif // VK_AMD_negative_viewport_height is a preprocessor guard. Do not pass it to API calls. #define VK_AMD_negative_viewport_height 1 #define VK_AMD_NEGATIVE_VIEWPORT_HEIGHT_SPEC_VERSION 1 #define VK_AMD_NEGATIVE_VIEWPORT_HEIGHT_EXTENSION_NAME "VK_AMD_negative_viewport_height" // VK_AMD_gpu_shader_half_float is a preprocessor guard. Do not pass it to API calls. #define VK_AMD_gpu_shader_half_float 1 #define VK_AMD_GPU_SHADER_HALF_FLOAT_SPEC_VERSION 2 #define VK_AMD_GPU_SHADER_HALF_FLOAT_EXTENSION_NAME "VK_AMD_gpu_shader_half_float" // VK_AMD_shader_ballot is a preprocessor guard. Do not pass it to API calls. #define VK_AMD_shader_ballot 1 #define VK_AMD_SHADER_BALLOT_SPEC_VERSION 1 #define VK_AMD_SHADER_BALLOT_EXTENSION_NAME "VK_AMD_shader_ballot" // VK_AMD_texture_gather_bias_lod is a preprocessor guard. Do not pass it to API calls. #define VK_AMD_texture_gather_bias_lod 1 #define VK_AMD_TEXTURE_GATHER_BIAS_LOD_SPEC_VERSION 1 #define VK_AMD_TEXTURE_GATHER_BIAS_LOD_EXTENSION_NAME "VK_AMD_texture_gather_bias_lod" typedef struct VkTextureLODGatherFormatPropertiesAMD { VkStructureType sType; void* pNext; VkBool32 supportsTextureGatherLODBiasAMD; } VkTextureLODGatherFormatPropertiesAMD; // VK_AMD_shader_info is a preprocessor guard. Do not pass it to API calls. #define VK_AMD_shader_info 1 #define VK_AMD_SHADER_INFO_SPEC_VERSION 1 #define VK_AMD_SHADER_INFO_EXTENSION_NAME "VK_AMD_shader_info" typedef enum VkShaderInfoTypeAMD { VK_SHADER_INFO_TYPE_STATISTICS_AMD = 0, VK_SHADER_INFO_TYPE_BINARY_AMD = 1, VK_SHADER_INFO_TYPE_DISASSEMBLY_AMD = 2, VK_SHADER_INFO_TYPE_MAX_ENUM_AMD = 0x7FFFFFFF } VkShaderInfoTypeAMD; typedef struct VkShaderResourceUsageAMD { uint32_t numUsedVgprs; uint32_t numUsedSgprs; uint32_t ldsSizePerLocalWorkGroup; size_t ldsUsageSizeInBytes; size_t scratchMemUsageInBytes; } VkShaderResourceUsageAMD; typedef struct VkShaderStatisticsInfoAMD { VkShaderStageFlags shaderStageMask; VkShaderResourceUsageAMD resourceUsage; uint32_t numPhysicalVgprs; uint32_t numPhysicalSgprs; uint32_t numAvailableVgprs; uint32_t numAvailableSgprs; uint32_t computeWorkGroupSize[3]; } VkShaderStatisticsInfoAMD; typedef VkResult (VKAPI_PTR *PFN_vkGetShaderInfoAMD)(VkDevice device, VkPipeline pipeline, VkShaderStageFlagBits shaderStage, VkShaderInfoTypeAMD infoType, size_t* pInfoSize, void* pInfo); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkGetShaderInfoAMD( VkDevice device, VkPipeline pipeline, VkShaderStageFlagBits shaderStage, VkShaderInfoTypeAMD infoType, size_t* pInfoSize, void* pInfo); #endif // VK_AMD_shader_image_load_store_lod is a preprocessor guard. Do not pass it to API calls. #define VK_AMD_shader_image_load_store_lod 1 #define VK_AMD_SHADER_IMAGE_LOAD_STORE_LOD_SPEC_VERSION 1 #define VK_AMD_SHADER_IMAGE_LOAD_STORE_LOD_EXTENSION_NAME "VK_AMD_shader_image_load_store_lod" // VK_NV_corner_sampled_image is a preprocessor guard. Do not pass it to API calls. #define VK_NV_corner_sampled_image 1 #define VK_NV_CORNER_SAMPLED_IMAGE_SPEC_VERSION 2 #define VK_NV_CORNER_SAMPLED_IMAGE_EXTENSION_NAME "VK_NV_corner_sampled_image" typedef struct VkPhysicalDeviceCornerSampledImageFeaturesNV { VkStructureType sType; void* pNext; VkBool32 cornerSampledImage; } VkPhysicalDeviceCornerSampledImageFeaturesNV; // VK_IMG_format_pvrtc is a preprocessor guard. Do not pass it to API calls. #define VK_IMG_format_pvrtc 1 #define VK_IMG_FORMAT_PVRTC_SPEC_VERSION 1 #define VK_IMG_FORMAT_PVRTC_EXTENSION_NAME "VK_IMG_format_pvrtc" // VK_NV_external_memory_capabilities is a preprocessor guard. Do not pass it to API calls. #define VK_NV_external_memory_capabilities 1 #define VK_NV_EXTERNAL_MEMORY_CAPABILITIES_SPEC_VERSION 1 #define VK_NV_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME "VK_NV_external_memory_capabilities" typedef enum VkExternalMemoryHandleTypeFlagBitsNV { VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_NV = 0x00000001, VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_NV = 0x00000002, VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_BIT_NV = 0x00000004, VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_KMT_BIT_NV = 0x00000008, VK_EXTERNAL_MEMORY_HANDLE_TYPE_FLAG_BITS_MAX_ENUM_NV = 0x7FFFFFFF } VkExternalMemoryHandleTypeFlagBitsNV; typedef VkFlags VkExternalMemoryHandleTypeFlagsNV; typedef enum VkExternalMemoryFeatureFlagBitsNV { VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT_NV = 0x00000001, VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_NV = 0x00000002, VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_NV = 0x00000004, VK_EXTERNAL_MEMORY_FEATURE_FLAG_BITS_MAX_ENUM_NV = 0x7FFFFFFF } VkExternalMemoryFeatureFlagBitsNV; typedef VkFlags VkExternalMemoryFeatureFlagsNV; typedef struct VkExternalImageFormatPropertiesNV { VkImageFormatProperties imageFormatProperties; VkExternalMemoryFeatureFlagsNV externalMemoryFeatures; VkExternalMemoryHandleTypeFlagsNV exportFromImportedHandleTypes; VkExternalMemoryHandleTypeFlagsNV compatibleHandleTypes; } VkExternalImageFormatPropertiesNV; typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceExternalImageFormatPropertiesNV)(VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkImageTiling tiling, VkImageUsageFlags usage, VkImageCreateFlags flags, VkExternalMemoryHandleTypeFlagsNV externalHandleType, VkExternalImageFormatPropertiesNV* pExternalImageFormatProperties); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceExternalImageFormatPropertiesNV( VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkImageTiling tiling, VkImageUsageFlags usage, VkImageCreateFlags flags, VkExternalMemoryHandleTypeFlagsNV externalHandleType, VkExternalImageFormatPropertiesNV* pExternalImageFormatProperties); #endif // VK_NV_external_memory is a preprocessor guard. Do not pass it to API calls. #define VK_NV_external_memory 1 #define VK_NV_EXTERNAL_MEMORY_SPEC_VERSION 1 #define VK_NV_EXTERNAL_MEMORY_EXTENSION_NAME "VK_NV_external_memory" typedef struct VkExternalMemoryImageCreateInfoNV { VkStructureType sType; const void* pNext; VkExternalMemoryHandleTypeFlagsNV handleTypes; } VkExternalMemoryImageCreateInfoNV; typedef struct VkExportMemoryAllocateInfoNV { VkStructureType sType; const void* pNext; VkExternalMemoryHandleTypeFlagsNV handleTypes; } VkExportMemoryAllocateInfoNV; // VK_EXT_validation_flags is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_validation_flags 1 #define VK_EXT_VALIDATION_FLAGS_SPEC_VERSION 3 #define VK_EXT_VALIDATION_FLAGS_EXTENSION_NAME "VK_EXT_validation_flags" typedef enum VkValidationCheckEXT { VK_VALIDATION_CHECK_ALL_EXT = 0, VK_VALIDATION_CHECK_SHADERS_EXT = 1, VK_VALIDATION_CHECK_MAX_ENUM_EXT = 0x7FFFFFFF } VkValidationCheckEXT; typedef struct VkValidationFlagsEXT { VkStructureType sType; const void* pNext; uint32_t disabledValidationCheckCount; const VkValidationCheckEXT* pDisabledValidationChecks; } VkValidationFlagsEXT; // VK_EXT_shader_subgroup_ballot is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_shader_subgroup_ballot 1 #define VK_EXT_SHADER_SUBGROUP_BALLOT_SPEC_VERSION 1 #define VK_EXT_SHADER_SUBGROUP_BALLOT_EXTENSION_NAME "VK_EXT_shader_subgroup_ballot" // VK_EXT_shader_subgroup_vote is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_shader_subgroup_vote 1 #define VK_EXT_SHADER_SUBGROUP_VOTE_SPEC_VERSION 1 #define VK_EXT_SHADER_SUBGROUP_VOTE_EXTENSION_NAME "VK_EXT_shader_subgroup_vote" // VK_EXT_texture_compression_astc_hdr is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_texture_compression_astc_hdr 1 #define VK_EXT_TEXTURE_COMPRESSION_ASTC_HDR_SPEC_VERSION 1 #define VK_EXT_TEXTURE_COMPRESSION_ASTC_HDR_EXTENSION_NAME "VK_EXT_texture_compression_astc_hdr" typedef VkPhysicalDeviceTextureCompressionASTCHDRFeatures VkPhysicalDeviceTextureCompressionASTCHDRFeaturesEXT; // VK_EXT_astc_decode_mode is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_astc_decode_mode 1 #define VK_EXT_ASTC_DECODE_MODE_SPEC_VERSION 1 #define VK_EXT_ASTC_DECODE_MODE_EXTENSION_NAME "VK_EXT_astc_decode_mode" typedef struct VkImageViewASTCDecodeModeEXT { VkStructureType sType; const void* pNext; VkFormat decodeMode; } VkImageViewASTCDecodeModeEXT; typedef struct VkPhysicalDeviceASTCDecodeFeaturesEXT { VkStructureType sType; void* pNext; VkBool32 decodeModeSharedExponent; } VkPhysicalDeviceASTCDecodeFeaturesEXT; // VK_EXT_pipeline_robustness is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_pipeline_robustness 1 #define VK_EXT_PIPELINE_ROBUSTNESS_SPEC_VERSION 1 #define VK_EXT_PIPELINE_ROBUSTNESS_EXTENSION_NAME "VK_EXT_pipeline_robustness" typedef VkPipelineRobustnessBufferBehavior VkPipelineRobustnessBufferBehaviorEXT; typedef VkPipelineRobustnessImageBehavior VkPipelineRobustnessImageBehaviorEXT; typedef VkPhysicalDevicePipelineRobustnessFeatures VkPhysicalDevicePipelineRobustnessFeaturesEXT; typedef VkPhysicalDevicePipelineRobustnessProperties VkPhysicalDevicePipelineRobustnessPropertiesEXT; typedef VkPipelineRobustnessCreateInfo VkPipelineRobustnessCreateInfoEXT; // VK_EXT_conditional_rendering is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_conditional_rendering 1 #define VK_EXT_CONDITIONAL_RENDERING_SPEC_VERSION 2 #define VK_EXT_CONDITIONAL_RENDERING_EXTENSION_NAME "VK_EXT_conditional_rendering" typedef enum VkConditionalRenderingFlagBitsEXT { VK_CONDITIONAL_RENDERING_INVERTED_BIT_EXT = 0x00000001, VK_CONDITIONAL_RENDERING_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF } VkConditionalRenderingFlagBitsEXT; typedef VkFlags VkConditionalRenderingFlagsEXT; typedef struct VkConditionalRenderingBeginInfoEXT { VkStructureType sType; const void* pNext; VkBuffer buffer; VkDeviceSize offset; VkConditionalRenderingFlagsEXT flags; } VkConditionalRenderingBeginInfoEXT; typedef struct VkPhysicalDeviceConditionalRenderingFeaturesEXT { VkStructureType sType; void* pNext; VkBool32 conditionalRendering; VkBool32 inheritedConditionalRendering; } VkPhysicalDeviceConditionalRenderingFeaturesEXT; typedef struct VkCommandBufferInheritanceConditionalRenderingInfoEXT { VkStructureType sType; const void* pNext; VkBool32 conditionalRenderingEnable; } VkCommandBufferInheritanceConditionalRenderingInfoEXT; typedef void (VKAPI_PTR *PFN_vkCmdBeginConditionalRenderingEXT)(VkCommandBuffer commandBuffer, const VkConditionalRenderingBeginInfoEXT* pConditionalRenderingBegin); typedef void (VKAPI_PTR *PFN_vkCmdEndConditionalRenderingEXT)(VkCommandBuffer commandBuffer); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR void VKAPI_CALL vkCmdBeginConditionalRenderingEXT( VkCommandBuffer commandBuffer, const VkConditionalRenderingBeginInfoEXT* pConditionalRenderingBegin); VKAPI_ATTR void VKAPI_CALL vkCmdEndConditionalRenderingEXT( VkCommandBuffer commandBuffer); #endif // VK_NV_clip_space_w_scaling is a preprocessor guard. Do not pass it to API calls. #define VK_NV_clip_space_w_scaling 1 #define VK_NV_CLIP_SPACE_W_SCALING_SPEC_VERSION 1 #define VK_NV_CLIP_SPACE_W_SCALING_EXTENSION_NAME "VK_NV_clip_space_w_scaling" typedef struct VkViewportWScalingNV { float xcoeff; float ycoeff; } VkViewportWScalingNV; typedef struct VkPipelineViewportWScalingStateCreateInfoNV { VkStructureType sType; const void* pNext; VkBool32 viewportWScalingEnable; uint32_t viewportCount; const VkViewportWScalingNV* pViewportWScalings; } VkPipelineViewportWScalingStateCreateInfoNV; typedef void (VKAPI_PTR *PFN_vkCmdSetViewportWScalingNV)(VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, const VkViewportWScalingNV* pViewportWScalings); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR void VKAPI_CALL vkCmdSetViewportWScalingNV( VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, const VkViewportWScalingNV* pViewportWScalings); #endif // VK_EXT_direct_mode_display is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_direct_mode_display 1 #define VK_EXT_DIRECT_MODE_DISPLAY_SPEC_VERSION 1 #define VK_EXT_DIRECT_MODE_DISPLAY_EXTENSION_NAME "VK_EXT_direct_mode_display" typedef VkResult (VKAPI_PTR *PFN_vkReleaseDisplayEXT)(VkPhysicalDevice physicalDevice, VkDisplayKHR display); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkReleaseDisplayEXT( VkPhysicalDevice physicalDevice, VkDisplayKHR display); #endif // VK_EXT_display_surface_counter is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_display_surface_counter 1 #define VK_EXT_DISPLAY_SURFACE_COUNTER_SPEC_VERSION 1 #define VK_EXT_DISPLAY_SURFACE_COUNTER_EXTENSION_NAME "VK_EXT_display_surface_counter" typedef enum VkSurfaceCounterFlagBitsEXT { VK_SURFACE_COUNTER_VBLANK_BIT_EXT = 0x00000001, // VK_SURFACE_COUNTER_VBLANK_EXT is a deprecated alias VK_SURFACE_COUNTER_VBLANK_EXT = VK_SURFACE_COUNTER_VBLANK_BIT_EXT, VK_SURFACE_COUNTER_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF } VkSurfaceCounterFlagBitsEXT; typedef VkFlags VkSurfaceCounterFlagsEXT; typedef struct VkSurfaceCapabilities2EXT { VkStructureType sType; void* pNext; uint32_t minImageCount; uint32_t maxImageCount; VkExtent2D currentExtent; VkExtent2D minImageExtent; VkExtent2D maxImageExtent; uint32_t maxImageArrayLayers; VkSurfaceTransformFlagsKHR supportedTransforms; VkSurfaceTransformFlagBitsKHR currentTransform; VkCompositeAlphaFlagsKHR supportedCompositeAlpha; VkImageUsageFlags supportedUsageFlags; VkSurfaceCounterFlagsEXT supportedSurfaceCounters; } VkSurfaceCapabilities2EXT; typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceSurfaceCapabilities2EXT)(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, VkSurfaceCapabilities2EXT* pSurfaceCapabilities); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfaceCapabilities2EXT( VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, VkSurfaceCapabilities2EXT* pSurfaceCapabilities); #endif // VK_EXT_display_control is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_display_control 1 #define VK_EXT_DISPLAY_CONTROL_SPEC_VERSION 1 #define VK_EXT_DISPLAY_CONTROL_EXTENSION_NAME "VK_EXT_display_control" typedef enum VkDisplayPowerStateEXT { VK_DISPLAY_POWER_STATE_OFF_EXT = 0, VK_DISPLAY_POWER_STATE_SUSPEND_EXT = 1, VK_DISPLAY_POWER_STATE_ON_EXT = 2, VK_DISPLAY_POWER_STATE_MAX_ENUM_EXT = 0x7FFFFFFF } VkDisplayPowerStateEXT; typedef enum VkDeviceEventTypeEXT { VK_DEVICE_EVENT_TYPE_DISPLAY_HOTPLUG_EXT = 0, VK_DEVICE_EVENT_TYPE_MAX_ENUM_EXT = 0x7FFFFFFF } VkDeviceEventTypeEXT; typedef enum VkDisplayEventTypeEXT { VK_DISPLAY_EVENT_TYPE_FIRST_PIXEL_OUT_EXT = 0, VK_DISPLAY_EVENT_TYPE_MAX_ENUM_EXT = 0x7FFFFFFF } VkDisplayEventTypeEXT; typedef struct VkDisplayPowerInfoEXT { VkStructureType sType; const void* pNext; VkDisplayPowerStateEXT powerState; } VkDisplayPowerInfoEXT; typedef struct VkDeviceEventInfoEXT { VkStructureType sType; const void* pNext; VkDeviceEventTypeEXT deviceEvent; } VkDeviceEventInfoEXT; typedef struct VkDisplayEventInfoEXT { VkStructureType sType; const void* pNext; VkDisplayEventTypeEXT displayEvent; } VkDisplayEventInfoEXT; typedef struct VkSwapchainCounterCreateInfoEXT { VkStructureType sType; const void* pNext; VkSurfaceCounterFlagsEXT surfaceCounters; } VkSwapchainCounterCreateInfoEXT; typedef VkResult (VKAPI_PTR *PFN_vkDisplayPowerControlEXT)(VkDevice device, VkDisplayKHR display, const VkDisplayPowerInfoEXT* pDisplayPowerInfo); typedef VkResult (VKAPI_PTR *PFN_vkRegisterDeviceEventEXT)(VkDevice device, const VkDeviceEventInfoEXT* pDeviceEventInfo, const VkAllocationCallbacks* pAllocator, VkFence* pFence); typedef VkResult (VKAPI_PTR *PFN_vkRegisterDisplayEventEXT)(VkDevice device, VkDisplayKHR display, const VkDisplayEventInfoEXT* pDisplayEventInfo, const VkAllocationCallbacks* pAllocator, VkFence* pFence); typedef VkResult (VKAPI_PTR *PFN_vkGetSwapchainCounterEXT)(VkDevice device, VkSwapchainKHR swapchain, VkSurfaceCounterFlagBitsEXT counter, uint64_t* pCounterValue); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkDisplayPowerControlEXT( VkDevice device, VkDisplayKHR display, const VkDisplayPowerInfoEXT* pDisplayPowerInfo); VKAPI_ATTR VkResult VKAPI_CALL vkRegisterDeviceEventEXT( VkDevice device, const VkDeviceEventInfoEXT* pDeviceEventInfo, const VkAllocationCallbacks* pAllocator, VkFence* pFence); VKAPI_ATTR VkResult VKAPI_CALL vkRegisterDisplayEventEXT( VkDevice device, VkDisplayKHR display, const VkDisplayEventInfoEXT* pDisplayEventInfo, const VkAllocationCallbacks* pAllocator, VkFence* pFence); VKAPI_ATTR VkResult VKAPI_CALL vkGetSwapchainCounterEXT( VkDevice device, VkSwapchainKHR swapchain, VkSurfaceCounterFlagBitsEXT counter, uint64_t* pCounterValue); #endif // VK_GOOGLE_display_timing is a preprocessor guard. Do not pass it to API calls. #define VK_GOOGLE_display_timing 1 #define VK_GOOGLE_DISPLAY_TIMING_SPEC_VERSION 1 #define VK_GOOGLE_DISPLAY_TIMING_EXTENSION_NAME "VK_GOOGLE_display_timing" typedef struct VkRefreshCycleDurationGOOGLE { uint64_t refreshDuration; } VkRefreshCycleDurationGOOGLE; typedef struct VkPastPresentationTimingGOOGLE { uint32_t presentID; uint64_t desiredPresentTime; uint64_t actualPresentTime; uint64_t earliestPresentTime; uint64_t presentMargin; } VkPastPresentationTimingGOOGLE; typedef struct VkPresentTimeGOOGLE { uint32_t presentID; uint64_t desiredPresentTime; } VkPresentTimeGOOGLE; typedef struct VkPresentTimesInfoGOOGLE { VkStructureType sType; const void* pNext; uint32_t swapchainCount; const VkPresentTimeGOOGLE* pTimes; } VkPresentTimesInfoGOOGLE; typedef VkResult (VKAPI_PTR *PFN_vkGetRefreshCycleDurationGOOGLE)(VkDevice device, VkSwapchainKHR swapchain, VkRefreshCycleDurationGOOGLE* pDisplayTimingProperties); typedef VkResult (VKAPI_PTR *PFN_vkGetPastPresentationTimingGOOGLE)(VkDevice device, VkSwapchainKHR swapchain, uint32_t* pPresentationTimingCount, VkPastPresentationTimingGOOGLE* pPresentationTimings); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkGetRefreshCycleDurationGOOGLE( VkDevice device, VkSwapchainKHR swapchain, VkRefreshCycleDurationGOOGLE* pDisplayTimingProperties); VKAPI_ATTR VkResult VKAPI_CALL vkGetPastPresentationTimingGOOGLE( VkDevice device, VkSwapchainKHR swapchain, uint32_t* pPresentationTimingCount, VkPastPresentationTimingGOOGLE* pPresentationTimings); #endif // VK_NV_sample_mask_override_coverage is a preprocessor guard. Do not pass it to API calls. #define VK_NV_sample_mask_override_coverage 1 #define VK_NV_SAMPLE_MASK_OVERRIDE_COVERAGE_SPEC_VERSION 1 #define VK_NV_SAMPLE_MASK_OVERRIDE_COVERAGE_EXTENSION_NAME "VK_NV_sample_mask_override_coverage" // VK_NV_geometry_shader_passthrough is a preprocessor guard. Do not pass it to API calls. #define VK_NV_geometry_shader_passthrough 1 #define VK_NV_GEOMETRY_SHADER_PASSTHROUGH_SPEC_VERSION 1 #define VK_NV_GEOMETRY_SHADER_PASSTHROUGH_EXTENSION_NAME "VK_NV_geometry_shader_passthrough" // VK_NV_viewport_array2 is a preprocessor guard. Do not pass it to API calls. #define VK_NV_viewport_array2 1 #define VK_NV_VIEWPORT_ARRAY_2_SPEC_VERSION 1 #define VK_NV_VIEWPORT_ARRAY_2_EXTENSION_NAME "VK_NV_viewport_array2" // VK_NV_VIEWPORT_ARRAY2_SPEC_VERSION is a deprecated alias #define VK_NV_VIEWPORT_ARRAY2_SPEC_VERSION VK_NV_VIEWPORT_ARRAY_2_SPEC_VERSION // VK_NV_VIEWPORT_ARRAY2_EXTENSION_NAME is a deprecated alias #define VK_NV_VIEWPORT_ARRAY2_EXTENSION_NAME VK_NV_VIEWPORT_ARRAY_2_EXTENSION_NAME // VK_NVX_multiview_per_view_attributes is a preprocessor guard. Do not pass it to API calls. #define VK_NVX_multiview_per_view_attributes 1 #define VK_NVX_MULTIVIEW_PER_VIEW_ATTRIBUTES_SPEC_VERSION 1 #define VK_NVX_MULTIVIEW_PER_VIEW_ATTRIBUTES_EXTENSION_NAME "VK_NVX_multiview_per_view_attributes" typedef struct VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX { VkStructureType sType; void* pNext; VkBool32 perViewPositionAllComponents; } VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX; typedef struct VkMultiviewPerViewAttributesInfoNVX { VkStructureType sType; const void* pNext; VkBool32 perViewAttributes; VkBool32 perViewAttributesPositionXOnly; } VkMultiviewPerViewAttributesInfoNVX; // VK_NV_viewport_swizzle is a preprocessor guard. Do not pass it to API calls. #define VK_NV_viewport_swizzle 1 #define VK_NV_VIEWPORT_SWIZZLE_SPEC_VERSION 1 #define VK_NV_VIEWPORT_SWIZZLE_EXTENSION_NAME "VK_NV_viewport_swizzle" typedef enum VkViewportCoordinateSwizzleNV { VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_X_NV = 0, VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_X_NV = 1, VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Y_NV = 2, VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_Y_NV = 3, VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Z_NV = 4, VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_Z_NV = 5, VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_W_NV = 6, VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_W_NV = 7, VK_VIEWPORT_COORDINATE_SWIZZLE_MAX_ENUM_NV = 0x7FFFFFFF } VkViewportCoordinateSwizzleNV; typedef VkFlags VkPipelineViewportSwizzleStateCreateFlagsNV; typedef struct VkViewportSwizzleNV { VkViewportCoordinateSwizzleNV x; VkViewportCoordinateSwizzleNV y; VkViewportCoordinateSwizzleNV z; VkViewportCoordinateSwizzleNV w; } VkViewportSwizzleNV; typedef struct VkPipelineViewportSwizzleStateCreateInfoNV { VkStructureType sType; const void* pNext; VkPipelineViewportSwizzleStateCreateFlagsNV flags; uint32_t viewportCount; const VkViewportSwizzleNV* pViewportSwizzles; } VkPipelineViewportSwizzleStateCreateInfoNV; // VK_EXT_discard_rectangles is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_discard_rectangles 1 #define VK_EXT_DISCARD_RECTANGLES_SPEC_VERSION 2 #define VK_EXT_DISCARD_RECTANGLES_EXTENSION_NAME "VK_EXT_discard_rectangles" typedef enum VkDiscardRectangleModeEXT { VK_DISCARD_RECTANGLE_MODE_INCLUSIVE_EXT = 0, VK_DISCARD_RECTANGLE_MODE_EXCLUSIVE_EXT = 1, VK_DISCARD_RECTANGLE_MODE_MAX_ENUM_EXT = 0x7FFFFFFF } VkDiscardRectangleModeEXT; typedef VkFlags VkPipelineDiscardRectangleStateCreateFlagsEXT; typedef struct VkPhysicalDeviceDiscardRectanglePropertiesEXT { VkStructureType sType; void* pNext; uint32_t maxDiscardRectangles; } VkPhysicalDeviceDiscardRectanglePropertiesEXT; typedef struct VkPipelineDiscardRectangleStateCreateInfoEXT { VkStructureType sType; const void* pNext; VkPipelineDiscardRectangleStateCreateFlagsEXT flags; VkDiscardRectangleModeEXT discardRectangleMode; uint32_t discardRectangleCount; const VkRect2D* pDiscardRectangles; } VkPipelineDiscardRectangleStateCreateInfoEXT; typedef void (VKAPI_PTR *PFN_vkCmdSetDiscardRectangleEXT)(VkCommandBuffer commandBuffer, uint32_t firstDiscardRectangle, uint32_t discardRectangleCount, const VkRect2D* pDiscardRectangles); typedef void (VKAPI_PTR *PFN_vkCmdSetDiscardRectangleEnableEXT)(VkCommandBuffer commandBuffer, VkBool32 discardRectangleEnable); typedef void (VKAPI_PTR *PFN_vkCmdSetDiscardRectangleModeEXT)(VkCommandBuffer commandBuffer, VkDiscardRectangleModeEXT discardRectangleMode); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR void VKAPI_CALL vkCmdSetDiscardRectangleEXT( VkCommandBuffer commandBuffer, uint32_t firstDiscardRectangle, uint32_t discardRectangleCount, const VkRect2D* pDiscardRectangles); VKAPI_ATTR void VKAPI_CALL vkCmdSetDiscardRectangleEnableEXT( VkCommandBuffer commandBuffer, VkBool32 discardRectangleEnable); VKAPI_ATTR void VKAPI_CALL vkCmdSetDiscardRectangleModeEXT( VkCommandBuffer commandBuffer, VkDiscardRectangleModeEXT discardRectangleMode); #endif // VK_EXT_conservative_rasterization is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_conservative_rasterization 1 #define VK_EXT_CONSERVATIVE_RASTERIZATION_SPEC_VERSION 1 #define VK_EXT_CONSERVATIVE_RASTERIZATION_EXTENSION_NAME "VK_EXT_conservative_rasterization" typedef enum VkConservativeRasterizationModeEXT { VK_CONSERVATIVE_RASTERIZATION_MODE_DISABLED_EXT = 0, VK_CONSERVATIVE_RASTERIZATION_MODE_OVERESTIMATE_EXT = 1, VK_CONSERVATIVE_RASTERIZATION_MODE_UNDERESTIMATE_EXT = 2, VK_CONSERVATIVE_RASTERIZATION_MODE_MAX_ENUM_EXT = 0x7FFFFFFF } VkConservativeRasterizationModeEXT; typedef VkFlags VkPipelineRasterizationConservativeStateCreateFlagsEXT; typedef struct VkPhysicalDeviceConservativeRasterizationPropertiesEXT { VkStructureType sType; void* pNext; float primitiveOverestimationSize; float maxExtraPrimitiveOverestimationSize; float extraPrimitiveOverestimationSizeGranularity; VkBool32 primitiveUnderestimation; VkBool32 conservativePointAndLineRasterization; VkBool32 degenerateTrianglesRasterized; VkBool32 degenerateLinesRasterized; VkBool32 fullyCoveredFragmentShaderInputVariable; VkBool32 conservativeRasterizationPostDepthCoverage; } VkPhysicalDeviceConservativeRasterizationPropertiesEXT; typedef struct VkPipelineRasterizationConservativeStateCreateInfoEXT { VkStructureType sType; const void* pNext; VkPipelineRasterizationConservativeStateCreateFlagsEXT flags; VkConservativeRasterizationModeEXT conservativeRasterizationMode; float extraPrimitiveOverestimationSize; } VkPipelineRasterizationConservativeStateCreateInfoEXT; // VK_EXT_depth_clip_enable is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_depth_clip_enable 1 #define VK_EXT_DEPTH_CLIP_ENABLE_SPEC_VERSION 1 #define VK_EXT_DEPTH_CLIP_ENABLE_EXTENSION_NAME "VK_EXT_depth_clip_enable" typedef VkFlags VkPipelineRasterizationDepthClipStateCreateFlagsEXT; typedef struct VkPhysicalDeviceDepthClipEnableFeaturesEXT { VkStructureType sType; void* pNext; VkBool32 depthClipEnable; } VkPhysicalDeviceDepthClipEnableFeaturesEXT; typedef struct VkPipelineRasterizationDepthClipStateCreateInfoEXT { VkStructureType sType; const void* pNext; VkPipelineRasterizationDepthClipStateCreateFlagsEXT flags; VkBool32 depthClipEnable; } VkPipelineRasterizationDepthClipStateCreateInfoEXT; // VK_EXT_swapchain_colorspace is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_swapchain_colorspace 1 #define VK_EXT_SWAPCHAIN_COLOR_SPACE_SPEC_VERSION 5 #define VK_EXT_SWAPCHAIN_COLOR_SPACE_EXTENSION_NAME "VK_EXT_swapchain_colorspace" // VK_EXT_hdr_metadata is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_hdr_metadata 1 #define VK_EXT_HDR_METADATA_SPEC_VERSION 3 #define VK_EXT_HDR_METADATA_EXTENSION_NAME "VK_EXT_hdr_metadata" typedef struct VkXYColorEXT { float x; float y; } VkXYColorEXT; typedef struct VkHdrMetadataEXT { VkStructureType sType; const void* pNext; VkXYColorEXT displayPrimaryRed; VkXYColorEXT displayPrimaryGreen; VkXYColorEXT displayPrimaryBlue; VkXYColorEXT whitePoint; float maxLuminance; float minLuminance; float maxContentLightLevel; float maxFrameAverageLightLevel; } VkHdrMetadataEXT; typedef void (VKAPI_PTR *PFN_vkSetHdrMetadataEXT)(VkDevice device, uint32_t swapchainCount, const VkSwapchainKHR* pSwapchains, const VkHdrMetadataEXT* pMetadata); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR void VKAPI_CALL vkSetHdrMetadataEXT( VkDevice device, uint32_t swapchainCount, const VkSwapchainKHR* pSwapchains, const VkHdrMetadataEXT* pMetadata); #endif // VK_IMG_relaxed_line_rasterization is a preprocessor guard. Do not pass it to API calls. #define VK_IMG_relaxed_line_rasterization 1 #define VK_IMG_RELAXED_LINE_RASTERIZATION_SPEC_VERSION 1 #define VK_IMG_RELAXED_LINE_RASTERIZATION_EXTENSION_NAME "VK_IMG_relaxed_line_rasterization" typedef struct VkPhysicalDeviceRelaxedLineRasterizationFeaturesIMG { VkStructureType sType; void* pNext; VkBool32 relaxedLineRasterization; } VkPhysicalDeviceRelaxedLineRasterizationFeaturesIMG; // VK_EXT_external_memory_dma_buf is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_external_memory_dma_buf 1 #define VK_EXT_EXTERNAL_MEMORY_DMA_BUF_SPEC_VERSION 1 #define VK_EXT_EXTERNAL_MEMORY_DMA_BUF_EXTENSION_NAME "VK_EXT_external_memory_dma_buf" // VK_EXT_queue_family_foreign is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_queue_family_foreign 1 #define VK_EXT_QUEUE_FAMILY_FOREIGN_SPEC_VERSION 1 #define VK_EXT_QUEUE_FAMILY_FOREIGN_EXTENSION_NAME "VK_EXT_queue_family_foreign" #define VK_QUEUE_FAMILY_FOREIGN_EXT (~2U) // VK_EXT_debug_utils is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_debug_utils 1 VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDebugUtilsMessengerEXT) #define VK_EXT_DEBUG_UTILS_SPEC_VERSION 2 #define VK_EXT_DEBUG_UTILS_EXTENSION_NAME "VK_EXT_debug_utils" typedef VkFlags VkDebugUtilsMessengerCallbackDataFlagsEXT; typedef enum VkDebugUtilsMessageSeverityFlagBitsEXT { VK_DEBUG_UTILS_MESSAGE_SEVERITY_VERBOSE_BIT_EXT = 0x00000001, VK_DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT = 0x00000010, VK_DEBUG_UTILS_MESSAGE_SEVERITY_WARNING_BIT_EXT = 0x00000100, VK_DEBUG_UTILS_MESSAGE_SEVERITY_ERROR_BIT_EXT = 0x00001000, VK_DEBUG_UTILS_MESSAGE_SEVERITY_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF } VkDebugUtilsMessageSeverityFlagBitsEXT; typedef enum VkDebugUtilsMessageTypeFlagBitsEXT { VK_DEBUG_UTILS_MESSAGE_TYPE_GENERAL_BIT_EXT = 0x00000001, VK_DEBUG_UTILS_MESSAGE_TYPE_VALIDATION_BIT_EXT = 0x00000002, VK_DEBUG_UTILS_MESSAGE_TYPE_PERFORMANCE_BIT_EXT = 0x00000004, VK_DEBUG_UTILS_MESSAGE_TYPE_DEVICE_ADDRESS_BINDING_BIT_EXT = 0x00000008, VK_DEBUG_UTILS_MESSAGE_TYPE_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF } VkDebugUtilsMessageTypeFlagBitsEXT; typedef VkFlags VkDebugUtilsMessageTypeFlagsEXT; typedef VkFlags VkDebugUtilsMessageSeverityFlagsEXT; typedef VkFlags VkDebugUtilsMessengerCreateFlagsEXT; typedef struct VkDebugUtilsLabelEXT { VkStructureType sType; const void* pNext; const char* pLabelName; float color[4]; } VkDebugUtilsLabelEXT; typedef struct VkDebugUtilsObjectNameInfoEXT { VkStructureType sType; const void* pNext; VkObjectType objectType; uint64_t objectHandle; const char* pObjectName; } VkDebugUtilsObjectNameInfoEXT; typedef struct VkDebugUtilsMessengerCallbackDataEXT { VkStructureType sType; const void* pNext; VkDebugUtilsMessengerCallbackDataFlagsEXT flags; const char* pMessageIdName; int32_t messageIdNumber; const char* pMessage; uint32_t queueLabelCount; const VkDebugUtilsLabelEXT* pQueueLabels; uint32_t cmdBufLabelCount; const VkDebugUtilsLabelEXT* pCmdBufLabels; uint32_t objectCount; const VkDebugUtilsObjectNameInfoEXT* pObjects; } VkDebugUtilsMessengerCallbackDataEXT; typedef VkBool32 (VKAPI_PTR *PFN_vkDebugUtilsMessengerCallbackEXT)( VkDebugUtilsMessageSeverityFlagBitsEXT messageSeverity, VkDebugUtilsMessageTypeFlagsEXT messageTypes, const VkDebugUtilsMessengerCallbackDataEXT* pCallbackData, void* pUserData); typedef struct VkDebugUtilsMessengerCreateInfoEXT { VkStructureType sType; const void* pNext; VkDebugUtilsMessengerCreateFlagsEXT flags; VkDebugUtilsMessageSeverityFlagsEXT messageSeverity; VkDebugUtilsMessageTypeFlagsEXT messageType; PFN_vkDebugUtilsMessengerCallbackEXT pfnUserCallback; void* pUserData; } VkDebugUtilsMessengerCreateInfoEXT; typedef struct VkDebugUtilsObjectTagInfoEXT { VkStructureType sType; const void* pNext; VkObjectType objectType; uint64_t objectHandle; uint64_t tagName; size_t tagSize; const void* pTag; } VkDebugUtilsObjectTagInfoEXT; typedef VkResult (VKAPI_PTR *PFN_vkSetDebugUtilsObjectNameEXT)(VkDevice device, const VkDebugUtilsObjectNameInfoEXT* pNameInfo); typedef VkResult (VKAPI_PTR *PFN_vkSetDebugUtilsObjectTagEXT)(VkDevice device, const VkDebugUtilsObjectTagInfoEXT* pTagInfo); typedef void (VKAPI_PTR *PFN_vkQueueBeginDebugUtilsLabelEXT)(VkQueue queue, const VkDebugUtilsLabelEXT* pLabelInfo); typedef void (VKAPI_PTR *PFN_vkQueueEndDebugUtilsLabelEXT)(VkQueue queue); typedef void (VKAPI_PTR *PFN_vkQueueInsertDebugUtilsLabelEXT)(VkQueue queue, const VkDebugUtilsLabelEXT* pLabelInfo); typedef void (VKAPI_PTR *PFN_vkCmdBeginDebugUtilsLabelEXT)(VkCommandBuffer commandBuffer, const VkDebugUtilsLabelEXT* pLabelInfo); typedef void (VKAPI_PTR *PFN_vkCmdEndDebugUtilsLabelEXT)(VkCommandBuffer commandBuffer); typedef void (VKAPI_PTR *PFN_vkCmdInsertDebugUtilsLabelEXT)(VkCommandBuffer commandBuffer, const VkDebugUtilsLabelEXT* pLabelInfo); typedef VkResult (VKAPI_PTR *PFN_vkCreateDebugUtilsMessengerEXT)(VkInstance instance, const VkDebugUtilsMessengerCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDebugUtilsMessengerEXT* pMessenger); typedef void (VKAPI_PTR *PFN_vkDestroyDebugUtilsMessengerEXT)(VkInstance instance, VkDebugUtilsMessengerEXT messenger, const VkAllocationCallbacks* pAllocator); typedef void (VKAPI_PTR *PFN_vkSubmitDebugUtilsMessageEXT)(VkInstance instance, VkDebugUtilsMessageSeverityFlagBitsEXT messageSeverity, VkDebugUtilsMessageTypeFlagsEXT messageTypes, const VkDebugUtilsMessengerCallbackDataEXT* pCallbackData); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkSetDebugUtilsObjectNameEXT( VkDevice device, const VkDebugUtilsObjectNameInfoEXT* pNameInfo); VKAPI_ATTR VkResult VKAPI_CALL vkSetDebugUtilsObjectTagEXT( VkDevice device, const VkDebugUtilsObjectTagInfoEXT* pTagInfo); VKAPI_ATTR void VKAPI_CALL vkQueueBeginDebugUtilsLabelEXT( VkQueue queue, const VkDebugUtilsLabelEXT* pLabelInfo); VKAPI_ATTR void VKAPI_CALL vkQueueEndDebugUtilsLabelEXT( VkQueue queue); VKAPI_ATTR void VKAPI_CALL vkQueueInsertDebugUtilsLabelEXT( VkQueue queue, const VkDebugUtilsLabelEXT* pLabelInfo); VKAPI_ATTR void VKAPI_CALL vkCmdBeginDebugUtilsLabelEXT( VkCommandBuffer commandBuffer, const VkDebugUtilsLabelEXT* pLabelInfo); VKAPI_ATTR void VKAPI_CALL vkCmdEndDebugUtilsLabelEXT( VkCommandBuffer commandBuffer); VKAPI_ATTR void VKAPI_CALL vkCmdInsertDebugUtilsLabelEXT( VkCommandBuffer commandBuffer, const VkDebugUtilsLabelEXT* pLabelInfo); VKAPI_ATTR VkResult VKAPI_CALL vkCreateDebugUtilsMessengerEXT( VkInstance instance, const VkDebugUtilsMessengerCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDebugUtilsMessengerEXT* pMessenger); VKAPI_ATTR void VKAPI_CALL vkDestroyDebugUtilsMessengerEXT( VkInstance instance, VkDebugUtilsMessengerEXT messenger, const VkAllocationCallbacks* pAllocator); VKAPI_ATTR void VKAPI_CALL vkSubmitDebugUtilsMessageEXT( VkInstance instance, VkDebugUtilsMessageSeverityFlagBitsEXT messageSeverity, VkDebugUtilsMessageTypeFlagsEXT messageTypes, const VkDebugUtilsMessengerCallbackDataEXT* pCallbackData); #endif // VK_EXT_sampler_filter_minmax is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_sampler_filter_minmax 1 #define VK_EXT_SAMPLER_FILTER_MINMAX_SPEC_VERSION 2 #define VK_EXT_SAMPLER_FILTER_MINMAX_EXTENSION_NAME "VK_EXT_sampler_filter_minmax" typedef VkSamplerReductionMode VkSamplerReductionModeEXT; typedef VkSamplerReductionModeCreateInfo VkSamplerReductionModeCreateInfoEXT; typedef VkPhysicalDeviceSamplerFilterMinmaxProperties VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT; // VK_AMD_gpu_shader_int16 is a preprocessor guard. Do not pass it to API calls. #define VK_AMD_gpu_shader_int16 1 #define VK_AMD_GPU_SHADER_INT16_SPEC_VERSION 2 #define VK_AMD_GPU_SHADER_INT16_EXTENSION_NAME "VK_AMD_gpu_shader_int16" // VK_AMD_mixed_attachment_samples is a preprocessor guard. Do not pass it to API calls. #define VK_AMD_mixed_attachment_samples 1 #define VK_AMD_MIXED_ATTACHMENT_SAMPLES_SPEC_VERSION 1 #define VK_AMD_MIXED_ATTACHMENT_SAMPLES_EXTENSION_NAME "VK_AMD_mixed_attachment_samples" typedef struct VkAttachmentSampleCountInfoAMD { VkStructureType sType; const void* pNext; uint32_t colorAttachmentCount; const VkSampleCountFlagBits* pColorAttachmentSamples; VkSampleCountFlagBits depthStencilAttachmentSamples; } VkAttachmentSampleCountInfoAMD; // VK_AMD_shader_fragment_mask is a preprocessor guard. Do not pass it to API calls. #define VK_AMD_shader_fragment_mask 1 #define VK_AMD_SHADER_FRAGMENT_MASK_SPEC_VERSION 1 #define VK_AMD_SHADER_FRAGMENT_MASK_EXTENSION_NAME "VK_AMD_shader_fragment_mask" // VK_EXT_inline_uniform_block is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_inline_uniform_block 1 #define VK_EXT_INLINE_UNIFORM_BLOCK_SPEC_VERSION 1 #define VK_EXT_INLINE_UNIFORM_BLOCK_EXTENSION_NAME "VK_EXT_inline_uniform_block" typedef VkPhysicalDeviceInlineUniformBlockFeatures VkPhysicalDeviceInlineUniformBlockFeaturesEXT; typedef VkPhysicalDeviceInlineUniformBlockProperties VkPhysicalDeviceInlineUniformBlockPropertiesEXT; typedef VkWriteDescriptorSetInlineUniformBlock VkWriteDescriptorSetInlineUniformBlockEXT; typedef VkDescriptorPoolInlineUniformBlockCreateInfo VkDescriptorPoolInlineUniformBlockCreateInfoEXT; // VK_EXT_shader_stencil_export is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_shader_stencil_export 1 #define VK_EXT_SHADER_STENCIL_EXPORT_SPEC_VERSION 1 #define VK_EXT_SHADER_STENCIL_EXPORT_EXTENSION_NAME "VK_EXT_shader_stencil_export" // VK_EXT_sample_locations is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_sample_locations 1 #define VK_EXT_SAMPLE_LOCATIONS_SPEC_VERSION 1 #define VK_EXT_SAMPLE_LOCATIONS_EXTENSION_NAME "VK_EXT_sample_locations" typedef struct VkSampleLocationEXT { float x; float y; } VkSampleLocationEXT; typedef struct VkSampleLocationsInfoEXT { VkStructureType sType; const void* pNext; VkSampleCountFlagBits sampleLocationsPerPixel; VkExtent2D sampleLocationGridSize; uint32_t sampleLocationsCount; const VkSampleLocationEXT* pSampleLocations; } VkSampleLocationsInfoEXT; typedef struct VkAttachmentSampleLocationsEXT { uint32_t attachmentIndex; VkSampleLocationsInfoEXT sampleLocationsInfo; } VkAttachmentSampleLocationsEXT; typedef struct VkSubpassSampleLocationsEXT { uint32_t subpassIndex; VkSampleLocationsInfoEXT sampleLocationsInfo; } VkSubpassSampleLocationsEXT; typedef struct VkRenderPassSampleLocationsBeginInfoEXT { VkStructureType sType; const void* pNext; uint32_t attachmentInitialSampleLocationsCount; const VkAttachmentSampleLocationsEXT* pAttachmentInitialSampleLocations; uint32_t postSubpassSampleLocationsCount; const VkSubpassSampleLocationsEXT* pPostSubpassSampleLocations; } VkRenderPassSampleLocationsBeginInfoEXT; typedef struct VkPipelineSampleLocationsStateCreateInfoEXT { VkStructureType sType; const void* pNext; VkBool32 sampleLocationsEnable; VkSampleLocationsInfoEXT sampleLocationsInfo; } VkPipelineSampleLocationsStateCreateInfoEXT; typedef struct VkPhysicalDeviceSampleLocationsPropertiesEXT { VkStructureType sType; void* pNext; VkSampleCountFlags sampleLocationSampleCounts; VkExtent2D maxSampleLocationGridSize; float sampleLocationCoordinateRange[2]; uint32_t sampleLocationSubPixelBits; VkBool32 variableSampleLocations; } VkPhysicalDeviceSampleLocationsPropertiesEXT; typedef struct VkMultisamplePropertiesEXT { VkStructureType sType; void* pNext; VkExtent2D maxSampleLocationGridSize; } VkMultisamplePropertiesEXT; typedef void (VKAPI_PTR *PFN_vkCmdSetSampleLocationsEXT)(VkCommandBuffer commandBuffer, const VkSampleLocationsInfoEXT* pSampleLocationsInfo); typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceMultisamplePropertiesEXT)(VkPhysicalDevice physicalDevice, VkSampleCountFlagBits samples, VkMultisamplePropertiesEXT* pMultisampleProperties); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR void VKAPI_CALL vkCmdSetSampleLocationsEXT( VkCommandBuffer commandBuffer, const VkSampleLocationsInfoEXT* pSampleLocationsInfo); VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceMultisamplePropertiesEXT( VkPhysicalDevice physicalDevice, VkSampleCountFlagBits samples, VkMultisamplePropertiesEXT* pMultisampleProperties); #endif // VK_EXT_blend_operation_advanced is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_blend_operation_advanced 1 #define VK_EXT_BLEND_OPERATION_ADVANCED_SPEC_VERSION 2 #define VK_EXT_BLEND_OPERATION_ADVANCED_EXTENSION_NAME "VK_EXT_blend_operation_advanced" typedef enum VkBlendOverlapEXT { VK_BLEND_OVERLAP_UNCORRELATED_EXT = 0, VK_BLEND_OVERLAP_DISJOINT_EXT = 1, VK_BLEND_OVERLAP_CONJOINT_EXT = 2, VK_BLEND_OVERLAP_MAX_ENUM_EXT = 0x7FFFFFFF } VkBlendOverlapEXT; typedef struct VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT { VkStructureType sType; void* pNext; VkBool32 advancedBlendCoherentOperations; } VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT; typedef struct VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT { VkStructureType sType; void* pNext; uint32_t advancedBlendMaxColorAttachments; VkBool32 advancedBlendIndependentBlend; VkBool32 advancedBlendNonPremultipliedSrcColor; VkBool32 advancedBlendNonPremultipliedDstColor; VkBool32 advancedBlendCorrelatedOverlap; VkBool32 advancedBlendAllOperations; } VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT; typedef struct VkPipelineColorBlendAdvancedStateCreateInfoEXT { VkStructureType sType; const void* pNext; VkBool32 srcPremultiplied; VkBool32 dstPremultiplied; VkBlendOverlapEXT blendOverlap; } VkPipelineColorBlendAdvancedStateCreateInfoEXT; // VK_NV_fragment_coverage_to_color is a preprocessor guard. Do not pass it to API calls. #define VK_NV_fragment_coverage_to_color 1 #define VK_NV_FRAGMENT_COVERAGE_TO_COLOR_SPEC_VERSION 1 #define VK_NV_FRAGMENT_COVERAGE_TO_COLOR_EXTENSION_NAME "VK_NV_fragment_coverage_to_color" typedef VkFlags VkPipelineCoverageToColorStateCreateFlagsNV; typedef struct VkPipelineCoverageToColorStateCreateInfoNV { VkStructureType sType; const void* pNext; VkPipelineCoverageToColorStateCreateFlagsNV flags; VkBool32 coverageToColorEnable; uint32_t coverageToColorLocation; } VkPipelineCoverageToColorStateCreateInfoNV; // VK_NV_framebuffer_mixed_samples is a preprocessor guard. Do not pass it to API calls. #define VK_NV_framebuffer_mixed_samples 1 #define VK_NV_FRAMEBUFFER_MIXED_SAMPLES_SPEC_VERSION 1 #define VK_NV_FRAMEBUFFER_MIXED_SAMPLES_EXTENSION_NAME "VK_NV_framebuffer_mixed_samples" typedef enum VkCoverageModulationModeNV { VK_COVERAGE_MODULATION_MODE_NONE_NV = 0, VK_COVERAGE_MODULATION_MODE_RGB_NV = 1, VK_COVERAGE_MODULATION_MODE_ALPHA_NV = 2, VK_COVERAGE_MODULATION_MODE_RGBA_NV = 3, VK_COVERAGE_MODULATION_MODE_MAX_ENUM_NV = 0x7FFFFFFF } VkCoverageModulationModeNV; typedef VkFlags VkPipelineCoverageModulationStateCreateFlagsNV; typedef struct VkPipelineCoverageModulationStateCreateInfoNV { VkStructureType sType; const void* pNext; VkPipelineCoverageModulationStateCreateFlagsNV flags; VkCoverageModulationModeNV coverageModulationMode; VkBool32 coverageModulationTableEnable; uint32_t coverageModulationTableCount; const float* pCoverageModulationTable; } VkPipelineCoverageModulationStateCreateInfoNV; typedef VkAttachmentSampleCountInfoAMD VkAttachmentSampleCountInfoNV; // VK_NV_fill_rectangle is a preprocessor guard. Do not pass it to API calls. #define VK_NV_fill_rectangle 1 #define VK_NV_FILL_RECTANGLE_SPEC_VERSION 1 #define VK_NV_FILL_RECTANGLE_EXTENSION_NAME "VK_NV_fill_rectangle" // VK_NV_shader_sm_builtins is a preprocessor guard. Do not pass it to API calls. #define VK_NV_shader_sm_builtins 1 #define VK_NV_SHADER_SM_BUILTINS_SPEC_VERSION 1 #define VK_NV_SHADER_SM_BUILTINS_EXTENSION_NAME "VK_NV_shader_sm_builtins" typedef struct VkPhysicalDeviceShaderSMBuiltinsPropertiesNV { VkStructureType sType; void* pNext; uint32_t shaderSMCount; uint32_t shaderWarpsPerSM; } VkPhysicalDeviceShaderSMBuiltinsPropertiesNV; typedef struct VkPhysicalDeviceShaderSMBuiltinsFeaturesNV { VkStructureType sType; void* pNext; VkBool32 shaderSMBuiltins; } VkPhysicalDeviceShaderSMBuiltinsFeaturesNV; // VK_EXT_post_depth_coverage is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_post_depth_coverage 1 #define VK_EXT_POST_DEPTH_COVERAGE_SPEC_VERSION 1 #define VK_EXT_POST_DEPTH_COVERAGE_EXTENSION_NAME "VK_EXT_post_depth_coverage" // VK_EXT_image_drm_format_modifier is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_image_drm_format_modifier 1 #define VK_EXT_IMAGE_DRM_FORMAT_MODIFIER_SPEC_VERSION 2 #define VK_EXT_IMAGE_DRM_FORMAT_MODIFIER_EXTENSION_NAME "VK_EXT_image_drm_format_modifier" typedef struct VkDrmFormatModifierPropertiesEXT { uint64_t drmFormatModifier; uint32_t drmFormatModifierPlaneCount; VkFormatFeatureFlags drmFormatModifierTilingFeatures; } VkDrmFormatModifierPropertiesEXT; typedef struct VkDrmFormatModifierPropertiesListEXT { VkStructureType sType; void* pNext; uint32_t drmFormatModifierCount; VkDrmFormatModifierPropertiesEXT* pDrmFormatModifierProperties; } VkDrmFormatModifierPropertiesListEXT; typedef struct VkPhysicalDeviceImageDrmFormatModifierInfoEXT { VkStructureType sType; const void* pNext; uint64_t drmFormatModifier; VkSharingMode sharingMode; uint32_t queueFamilyIndexCount; const uint32_t* pQueueFamilyIndices; } VkPhysicalDeviceImageDrmFormatModifierInfoEXT; typedef struct VkImageDrmFormatModifierListCreateInfoEXT { VkStructureType sType; const void* pNext; uint32_t drmFormatModifierCount; const uint64_t* pDrmFormatModifiers; } VkImageDrmFormatModifierListCreateInfoEXT; typedef struct VkImageDrmFormatModifierExplicitCreateInfoEXT { VkStructureType sType; const void* pNext; uint64_t drmFormatModifier; uint32_t drmFormatModifierPlaneCount; const VkSubresourceLayout* pPlaneLayouts; } VkImageDrmFormatModifierExplicitCreateInfoEXT; typedef struct VkImageDrmFormatModifierPropertiesEXT { VkStructureType sType; void* pNext; uint64_t drmFormatModifier; } VkImageDrmFormatModifierPropertiesEXT; typedef struct VkDrmFormatModifierProperties2EXT { uint64_t drmFormatModifier; uint32_t drmFormatModifierPlaneCount; VkFormatFeatureFlags2 drmFormatModifierTilingFeatures; } VkDrmFormatModifierProperties2EXT; typedef struct VkDrmFormatModifierPropertiesList2EXT { VkStructureType sType; void* pNext; uint32_t drmFormatModifierCount; VkDrmFormatModifierProperties2EXT* pDrmFormatModifierProperties; } VkDrmFormatModifierPropertiesList2EXT; typedef VkResult (VKAPI_PTR *PFN_vkGetImageDrmFormatModifierPropertiesEXT)(VkDevice device, VkImage image, VkImageDrmFormatModifierPropertiesEXT* pProperties); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkGetImageDrmFormatModifierPropertiesEXT( VkDevice device, VkImage image, VkImageDrmFormatModifierPropertiesEXT* pProperties); #endif // VK_EXT_validation_cache is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_validation_cache 1 VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkValidationCacheEXT) #define VK_EXT_VALIDATION_CACHE_SPEC_VERSION 1 #define VK_EXT_VALIDATION_CACHE_EXTENSION_NAME "VK_EXT_validation_cache" typedef enum VkValidationCacheHeaderVersionEXT { VK_VALIDATION_CACHE_HEADER_VERSION_ONE_EXT = 1, VK_VALIDATION_CACHE_HEADER_VERSION_MAX_ENUM_EXT = 0x7FFFFFFF } VkValidationCacheHeaderVersionEXT; typedef VkFlags VkValidationCacheCreateFlagsEXT; typedef struct VkValidationCacheCreateInfoEXT { VkStructureType sType; const void* pNext; VkValidationCacheCreateFlagsEXT flags; size_t initialDataSize; const void* pInitialData; } VkValidationCacheCreateInfoEXT; typedef struct VkShaderModuleValidationCacheCreateInfoEXT { VkStructureType sType; const void* pNext; VkValidationCacheEXT validationCache; } VkShaderModuleValidationCacheCreateInfoEXT; typedef VkResult (VKAPI_PTR *PFN_vkCreateValidationCacheEXT)(VkDevice device, const VkValidationCacheCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkValidationCacheEXT* pValidationCache); typedef void (VKAPI_PTR *PFN_vkDestroyValidationCacheEXT)(VkDevice device, VkValidationCacheEXT validationCache, const VkAllocationCallbacks* pAllocator); typedef VkResult (VKAPI_PTR *PFN_vkMergeValidationCachesEXT)(VkDevice device, VkValidationCacheEXT dstCache, uint32_t srcCacheCount, const VkValidationCacheEXT* pSrcCaches); typedef VkResult (VKAPI_PTR *PFN_vkGetValidationCacheDataEXT)(VkDevice device, VkValidationCacheEXT validationCache, size_t* pDataSize, void* pData); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkCreateValidationCacheEXT( VkDevice device, const VkValidationCacheCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkValidationCacheEXT* pValidationCache); VKAPI_ATTR void VKAPI_CALL vkDestroyValidationCacheEXT( VkDevice device, VkValidationCacheEXT validationCache, const VkAllocationCallbacks* pAllocator); VKAPI_ATTR VkResult VKAPI_CALL vkMergeValidationCachesEXT( VkDevice device, VkValidationCacheEXT dstCache, uint32_t srcCacheCount, const VkValidationCacheEXT* pSrcCaches); VKAPI_ATTR VkResult VKAPI_CALL vkGetValidationCacheDataEXT( VkDevice device, VkValidationCacheEXT validationCache, size_t* pDataSize, void* pData); #endif // VK_EXT_descriptor_indexing is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_descriptor_indexing 1 #define VK_EXT_DESCRIPTOR_INDEXING_SPEC_VERSION 2 #define VK_EXT_DESCRIPTOR_INDEXING_EXTENSION_NAME "VK_EXT_descriptor_indexing" typedef VkDescriptorBindingFlagBits VkDescriptorBindingFlagBitsEXT; typedef VkDescriptorBindingFlags VkDescriptorBindingFlagsEXT; typedef VkDescriptorSetLayoutBindingFlagsCreateInfo VkDescriptorSetLayoutBindingFlagsCreateInfoEXT; typedef VkPhysicalDeviceDescriptorIndexingFeatures VkPhysicalDeviceDescriptorIndexingFeaturesEXT; typedef VkPhysicalDeviceDescriptorIndexingProperties VkPhysicalDeviceDescriptorIndexingPropertiesEXT; typedef VkDescriptorSetVariableDescriptorCountAllocateInfo VkDescriptorSetVariableDescriptorCountAllocateInfoEXT; typedef VkDescriptorSetVariableDescriptorCountLayoutSupport VkDescriptorSetVariableDescriptorCountLayoutSupportEXT; // VK_EXT_shader_viewport_index_layer is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_shader_viewport_index_layer 1 #define VK_EXT_SHADER_VIEWPORT_INDEX_LAYER_SPEC_VERSION 1 #define VK_EXT_SHADER_VIEWPORT_INDEX_LAYER_EXTENSION_NAME "VK_EXT_shader_viewport_index_layer" // VK_NV_shading_rate_image is a preprocessor guard. Do not pass it to API calls. #define VK_NV_shading_rate_image 1 #define VK_NV_SHADING_RATE_IMAGE_SPEC_VERSION 3 #define VK_NV_SHADING_RATE_IMAGE_EXTENSION_NAME "VK_NV_shading_rate_image" typedef enum VkShadingRatePaletteEntryNV { VK_SHADING_RATE_PALETTE_ENTRY_NO_INVOCATIONS_NV = 0, VK_SHADING_RATE_PALETTE_ENTRY_16_INVOCATIONS_PER_PIXEL_NV = 1, VK_SHADING_RATE_PALETTE_ENTRY_8_INVOCATIONS_PER_PIXEL_NV = 2, VK_SHADING_RATE_PALETTE_ENTRY_4_INVOCATIONS_PER_PIXEL_NV = 3, VK_SHADING_RATE_PALETTE_ENTRY_2_INVOCATIONS_PER_PIXEL_NV = 4, VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_PIXEL_NV = 5, VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X1_PIXELS_NV = 6, VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_1X2_PIXELS_NV = 7, VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X2_PIXELS_NV = 8, VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_4X2_PIXELS_NV = 9, VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X4_PIXELS_NV = 10, VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_4X4_PIXELS_NV = 11, VK_SHADING_RATE_PALETTE_ENTRY_MAX_ENUM_NV = 0x7FFFFFFF } VkShadingRatePaletteEntryNV; typedef enum VkCoarseSampleOrderTypeNV { VK_COARSE_SAMPLE_ORDER_TYPE_DEFAULT_NV = 0, VK_COARSE_SAMPLE_ORDER_TYPE_CUSTOM_NV = 1, VK_COARSE_SAMPLE_ORDER_TYPE_PIXEL_MAJOR_NV = 2, VK_COARSE_SAMPLE_ORDER_TYPE_SAMPLE_MAJOR_NV = 3, VK_COARSE_SAMPLE_ORDER_TYPE_MAX_ENUM_NV = 0x7FFFFFFF } VkCoarseSampleOrderTypeNV; typedef struct VkShadingRatePaletteNV { uint32_t shadingRatePaletteEntryCount; const VkShadingRatePaletteEntryNV* pShadingRatePaletteEntries; } VkShadingRatePaletteNV; typedef struct VkPipelineViewportShadingRateImageStateCreateInfoNV { VkStructureType sType; const void* pNext; VkBool32 shadingRateImageEnable; uint32_t viewportCount; const VkShadingRatePaletteNV* pShadingRatePalettes; } VkPipelineViewportShadingRateImageStateCreateInfoNV; typedef struct VkPhysicalDeviceShadingRateImageFeaturesNV { VkStructureType sType; void* pNext; VkBool32 shadingRateImage; VkBool32 shadingRateCoarseSampleOrder; } VkPhysicalDeviceShadingRateImageFeaturesNV; typedef struct VkPhysicalDeviceShadingRateImagePropertiesNV { VkStructureType sType; void* pNext; VkExtent2D shadingRateTexelSize; uint32_t shadingRatePaletteSize; uint32_t shadingRateMaxCoarseSamples; } VkPhysicalDeviceShadingRateImagePropertiesNV; typedef struct VkCoarseSampleLocationNV { uint32_t pixelX; uint32_t pixelY; uint32_t sample; } VkCoarseSampleLocationNV; typedef struct VkCoarseSampleOrderCustomNV { VkShadingRatePaletteEntryNV shadingRate; uint32_t sampleCount; uint32_t sampleLocationCount; const VkCoarseSampleLocationNV* pSampleLocations; } VkCoarseSampleOrderCustomNV; typedef struct VkPipelineViewportCoarseSampleOrderStateCreateInfoNV { VkStructureType sType; const void* pNext; VkCoarseSampleOrderTypeNV sampleOrderType; uint32_t customSampleOrderCount; const VkCoarseSampleOrderCustomNV* pCustomSampleOrders; } VkPipelineViewportCoarseSampleOrderStateCreateInfoNV; typedef void (VKAPI_PTR *PFN_vkCmdBindShadingRateImageNV)(VkCommandBuffer commandBuffer, VkImageView imageView, VkImageLayout imageLayout); typedef void (VKAPI_PTR *PFN_vkCmdSetViewportShadingRatePaletteNV)(VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, const VkShadingRatePaletteNV* pShadingRatePalettes); typedef void (VKAPI_PTR *PFN_vkCmdSetCoarseSampleOrderNV)(VkCommandBuffer commandBuffer, VkCoarseSampleOrderTypeNV sampleOrderType, uint32_t customSampleOrderCount, const VkCoarseSampleOrderCustomNV* pCustomSampleOrders); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR void VKAPI_CALL vkCmdBindShadingRateImageNV( VkCommandBuffer commandBuffer, VkImageView imageView, VkImageLayout imageLayout); VKAPI_ATTR void VKAPI_CALL vkCmdSetViewportShadingRatePaletteNV( VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, const VkShadingRatePaletteNV* pShadingRatePalettes); VKAPI_ATTR void VKAPI_CALL vkCmdSetCoarseSampleOrderNV( VkCommandBuffer commandBuffer, VkCoarseSampleOrderTypeNV sampleOrderType, uint32_t customSampleOrderCount, const VkCoarseSampleOrderCustomNV* pCustomSampleOrders); #endif // VK_NV_ray_tracing is a preprocessor guard. Do not pass it to API calls. #define VK_NV_ray_tracing 1 VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkAccelerationStructureNV) #define VK_NV_RAY_TRACING_SPEC_VERSION 3 #define VK_NV_RAY_TRACING_EXTENSION_NAME "VK_NV_ray_tracing" #define VK_SHADER_UNUSED_KHR (~0U) #define VK_SHADER_UNUSED_NV VK_SHADER_UNUSED_KHR typedef enum VkRayTracingShaderGroupTypeKHR { VK_RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_KHR = 0, VK_RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHR = 1, VK_RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR = 2, VK_RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_NV = VK_RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_KHR, VK_RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_NV = VK_RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHR, VK_RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_NV = VK_RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR, VK_RAY_TRACING_SHADER_GROUP_TYPE_MAX_ENUM_KHR = 0x7FFFFFFF } VkRayTracingShaderGroupTypeKHR; typedef VkRayTracingShaderGroupTypeKHR VkRayTracingShaderGroupTypeNV; typedef enum VkGeometryTypeKHR { VK_GEOMETRY_TYPE_TRIANGLES_KHR = 0, VK_GEOMETRY_TYPE_AABBS_KHR = 1, VK_GEOMETRY_TYPE_INSTANCES_KHR = 2, VK_GEOMETRY_TYPE_SPHERES_NV = 1000429004, VK_GEOMETRY_TYPE_LINEAR_SWEPT_SPHERES_NV = 1000429005, VK_GEOMETRY_TYPE_TRIANGLES_NV = VK_GEOMETRY_TYPE_TRIANGLES_KHR, VK_GEOMETRY_TYPE_AABBS_NV = VK_GEOMETRY_TYPE_AABBS_KHR, VK_GEOMETRY_TYPE_MAX_ENUM_KHR = 0x7FFFFFFF } VkGeometryTypeKHR; typedef VkGeometryTypeKHR VkGeometryTypeNV; typedef enum VkAccelerationStructureTypeKHR { VK_ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_KHR = 0, VK_ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_KHR = 1, VK_ACCELERATION_STRUCTURE_TYPE_GENERIC_KHR = 2, VK_ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_NV = VK_ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_KHR, VK_ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_NV = VK_ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_KHR, VK_ACCELERATION_STRUCTURE_TYPE_MAX_ENUM_KHR = 0x7FFFFFFF } VkAccelerationStructureTypeKHR; typedef VkAccelerationStructureTypeKHR VkAccelerationStructureTypeNV; typedef enum VkCopyAccelerationStructureModeKHR { VK_COPY_ACCELERATION_STRUCTURE_MODE_CLONE_KHR = 0, VK_COPY_ACCELERATION_STRUCTURE_MODE_COMPACT_KHR = 1, VK_COPY_ACCELERATION_STRUCTURE_MODE_SERIALIZE_KHR = 2, VK_COPY_ACCELERATION_STRUCTURE_MODE_DESERIALIZE_KHR = 3, VK_COPY_ACCELERATION_STRUCTURE_MODE_CLONE_NV = VK_COPY_ACCELERATION_STRUCTURE_MODE_CLONE_KHR, VK_COPY_ACCELERATION_STRUCTURE_MODE_COMPACT_NV = VK_COPY_ACCELERATION_STRUCTURE_MODE_COMPACT_KHR, VK_COPY_ACCELERATION_STRUCTURE_MODE_MAX_ENUM_KHR = 0x7FFFFFFF } VkCopyAccelerationStructureModeKHR; typedef VkCopyAccelerationStructureModeKHR VkCopyAccelerationStructureModeNV; typedef enum VkAccelerationStructureMemoryRequirementsTypeNV { VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_OBJECT_NV = 0, VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_BUILD_SCRATCH_NV = 1, VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_UPDATE_SCRATCH_NV = 2, VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_MAX_ENUM_NV = 0x7FFFFFFF } VkAccelerationStructureMemoryRequirementsTypeNV; typedef enum VkGeometryFlagBitsKHR { VK_GEOMETRY_OPAQUE_BIT_KHR = 0x00000001, VK_GEOMETRY_NO_DUPLICATE_ANY_HIT_INVOCATION_BIT_KHR = 0x00000002, VK_GEOMETRY_OPAQUE_BIT_NV = VK_GEOMETRY_OPAQUE_BIT_KHR, VK_GEOMETRY_NO_DUPLICATE_ANY_HIT_INVOCATION_BIT_NV = VK_GEOMETRY_NO_DUPLICATE_ANY_HIT_INVOCATION_BIT_KHR, VK_GEOMETRY_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF } VkGeometryFlagBitsKHR; typedef VkFlags VkGeometryFlagsKHR; typedef VkGeometryFlagsKHR VkGeometryFlagsNV; typedef VkGeometryFlagBitsKHR VkGeometryFlagBitsNV; typedef enum VkGeometryInstanceFlagBitsKHR { VK_GEOMETRY_INSTANCE_TRIANGLE_FACING_CULL_DISABLE_BIT_KHR = 0x00000001, VK_GEOMETRY_INSTANCE_TRIANGLE_FLIP_FACING_BIT_KHR = 0x00000002, VK_GEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_KHR = 0x00000004, VK_GEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_KHR = 0x00000008, VK_GEOMETRY_INSTANCE_FORCE_OPACITY_MICROMAP_2_STATE_EXT = 0x00000010, VK_GEOMETRY_INSTANCE_DISABLE_OPACITY_MICROMAPS_EXT = 0x00000020, VK_GEOMETRY_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE_BIT_KHR = VK_GEOMETRY_INSTANCE_TRIANGLE_FLIP_FACING_BIT_KHR, VK_GEOMETRY_INSTANCE_TRIANGLE_CULL_DISABLE_BIT_NV = VK_GEOMETRY_INSTANCE_TRIANGLE_FACING_CULL_DISABLE_BIT_KHR, VK_GEOMETRY_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE_BIT_NV = VK_GEOMETRY_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE_BIT_KHR, VK_GEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_NV = VK_GEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_KHR, VK_GEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_NV = VK_GEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_KHR, VK_GEOMETRY_INSTANCE_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF } VkGeometryInstanceFlagBitsKHR; typedef VkFlags VkGeometryInstanceFlagsKHR; typedef VkGeometryInstanceFlagsKHR VkGeometryInstanceFlagsNV; typedef VkGeometryInstanceFlagBitsKHR VkGeometryInstanceFlagBitsNV; typedef enum VkBuildAccelerationStructureFlagBitsKHR { VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_KHR = 0x00000001, VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_KHR = 0x00000002, VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_KHR = 0x00000004, VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_KHR = 0x00000008, VK_BUILD_ACCELERATION_STRUCTURE_LOW_MEMORY_BIT_KHR = 0x00000010, VK_BUILD_ACCELERATION_STRUCTURE_MOTION_BIT_NV = 0x00000020, VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_UPDATE_EXT = 0x00000040, VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_DISABLE_OPACITY_MICROMAPS_EXT = 0x00000080, VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_DATA_UPDATE_EXT = 0x00000100, #ifdef VK_ENABLE_BETA_EXTENSIONS VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_DISPLACEMENT_MICROMAP_UPDATE_NV = 0x00000200, #endif VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_DATA_ACCESS_KHR = 0x00000800, VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_NV = VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_KHR, VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_NV = VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_KHR, VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_NV = VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_KHR, VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_NV = VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_KHR, VK_BUILD_ACCELERATION_STRUCTURE_LOW_MEMORY_BIT_NV = VK_BUILD_ACCELERATION_STRUCTURE_LOW_MEMORY_BIT_KHR, VK_BUILD_ACCELERATION_STRUCTURE_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF } VkBuildAccelerationStructureFlagBitsKHR; typedef VkFlags VkBuildAccelerationStructureFlagsKHR; typedef VkBuildAccelerationStructureFlagsKHR VkBuildAccelerationStructureFlagsNV; typedef VkBuildAccelerationStructureFlagBitsKHR VkBuildAccelerationStructureFlagBitsNV; typedef struct VkRayTracingShaderGroupCreateInfoNV { VkStructureType sType; const void* pNext; VkRayTracingShaderGroupTypeKHR type; uint32_t generalShader; uint32_t closestHitShader; uint32_t anyHitShader; uint32_t intersectionShader; } VkRayTracingShaderGroupCreateInfoNV; typedef struct VkRayTracingPipelineCreateInfoNV { VkStructureType sType; const void* pNext; VkPipelineCreateFlags flags; uint32_t stageCount; const VkPipelineShaderStageCreateInfo* pStages; uint32_t groupCount; const VkRayTracingShaderGroupCreateInfoNV* pGroups; uint32_t maxRecursionDepth; VkPipelineLayout layout; VkPipeline basePipelineHandle; int32_t basePipelineIndex; } VkRayTracingPipelineCreateInfoNV; typedef struct VkGeometryTrianglesNV { VkStructureType sType; const void* pNext; VkBuffer vertexData; VkDeviceSize vertexOffset; uint32_t vertexCount; VkDeviceSize vertexStride; VkFormat vertexFormat; VkBuffer indexData; VkDeviceSize indexOffset; uint32_t indexCount; VkIndexType indexType; VkBuffer transformData; VkDeviceSize transformOffset; } VkGeometryTrianglesNV; typedef struct VkGeometryAABBNV { VkStructureType sType; const void* pNext; VkBuffer aabbData; uint32_t numAABBs; uint32_t stride; VkDeviceSize offset; } VkGeometryAABBNV; typedef struct VkGeometryDataNV { VkGeometryTrianglesNV triangles; VkGeometryAABBNV aabbs; } VkGeometryDataNV; typedef struct VkGeometryNV { VkStructureType sType; const void* pNext; VkGeometryTypeKHR geometryType; VkGeometryDataNV geometry; VkGeometryFlagsKHR flags; } VkGeometryNV; typedef struct VkAccelerationStructureInfoNV { VkStructureType sType; const void* pNext; VkAccelerationStructureTypeNV type; VkBuildAccelerationStructureFlagsNV flags; uint32_t instanceCount; uint32_t geometryCount; const VkGeometryNV* pGeometries; } VkAccelerationStructureInfoNV; typedef struct VkAccelerationStructureCreateInfoNV { VkStructureType sType; const void* pNext; VkDeviceSize compactedSize; VkAccelerationStructureInfoNV info; } VkAccelerationStructureCreateInfoNV; typedef struct VkBindAccelerationStructureMemoryInfoNV { VkStructureType sType; const void* pNext; VkAccelerationStructureNV accelerationStructure; VkDeviceMemory memory; VkDeviceSize memoryOffset; uint32_t deviceIndexCount; const uint32_t* pDeviceIndices; } VkBindAccelerationStructureMemoryInfoNV; typedef struct VkWriteDescriptorSetAccelerationStructureNV { VkStructureType sType; const void* pNext; uint32_t accelerationStructureCount; const VkAccelerationStructureNV* pAccelerationStructures; } VkWriteDescriptorSetAccelerationStructureNV; typedef struct VkAccelerationStructureMemoryRequirementsInfoNV { VkStructureType sType; const void* pNext; VkAccelerationStructureMemoryRequirementsTypeNV type; VkAccelerationStructureNV accelerationStructure; } VkAccelerationStructureMemoryRequirementsInfoNV; typedef struct VkPhysicalDeviceRayTracingPropertiesNV { VkStructureType sType; void* pNext; uint32_t shaderGroupHandleSize; uint32_t maxRecursionDepth; uint32_t maxShaderGroupStride; uint32_t shaderGroupBaseAlignment; uint64_t maxGeometryCount; uint64_t maxInstanceCount; uint64_t maxTriangleCount; uint32_t maxDescriptorSetAccelerationStructures; } VkPhysicalDeviceRayTracingPropertiesNV; typedef struct VkTransformMatrixKHR { float matrix[3][4]; } VkTransformMatrixKHR; typedef VkTransformMatrixKHR VkTransformMatrixNV; typedef struct VkAabbPositionsKHR { float minX; float minY; float minZ; float maxX; float maxY; float maxZ; } VkAabbPositionsKHR; typedef VkAabbPositionsKHR VkAabbPositionsNV; typedef struct VkAccelerationStructureInstanceKHR { VkTransformMatrixKHR transform; uint32_t instanceCustomIndex:24; uint32_t mask:8; uint32_t instanceShaderBindingTableRecordOffset:24; VkGeometryInstanceFlagsKHR flags:8; uint64_t accelerationStructureReference; } VkAccelerationStructureInstanceKHR; typedef VkAccelerationStructureInstanceKHR VkAccelerationStructureInstanceNV; typedef VkResult (VKAPI_PTR *PFN_vkCreateAccelerationStructureNV)(VkDevice device, const VkAccelerationStructureCreateInfoNV* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkAccelerationStructureNV* pAccelerationStructure); typedef void (VKAPI_PTR *PFN_vkDestroyAccelerationStructureNV)(VkDevice device, VkAccelerationStructureNV accelerationStructure, const VkAllocationCallbacks* pAllocator); typedef void (VKAPI_PTR *PFN_vkGetAccelerationStructureMemoryRequirementsNV)(VkDevice device, const VkAccelerationStructureMemoryRequirementsInfoNV* pInfo, VkMemoryRequirements2KHR* pMemoryRequirements); typedef VkResult (VKAPI_PTR *PFN_vkBindAccelerationStructureMemoryNV)(VkDevice device, uint32_t bindInfoCount, const VkBindAccelerationStructureMemoryInfoNV* pBindInfos); typedef void (VKAPI_PTR *PFN_vkCmdBuildAccelerationStructureNV)(VkCommandBuffer commandBuffer, const VkAccelerationStructureInfoNV* pInfo, VkBuffer instanceData, VkDeviceSize instanceOffset, VkBool32 update, VkAccelerationStructureNV dst, VkAccelerationStructureNV src, VkBuffer scratch, VkDeviceSize scratchOffset); typedef void (VKAPI_PTR *PFN_vkCmdCopyAccelerationStructureNV)(VkCommandBuffer commandBuffer, VkAccelerationStructureNV dst, VkAccelerationStructureNV src, VkCopyAccelerationStructureModeKHR mode); typedef void (VKAPI_PTR *PFN_vkCmdTraceRaysNV)(VkCommandBuffer commandBuffer, VkBuffer raygenShaderBindingTableBuffer, VkDeviceSize raygenShaderBindingOffset, VkBuffer missShaderBindingTableBuffer, VkDeviceSize missShaderBindingOffset, VkDeviceSize missShaderBindingStride, VkBuffer hitShaderBindingTableBuffer, VkDeviceSize hitShaderBindingOffset, VkDeviceSize hitShaderBindingStride, VkBuffer callableShaderBindingTableBuffer, VkDeviceSize callableShaderBindingOffset, VkDeviceSize callableShaderBindingStride, uint32_t width, uint32_t height, uint32_t depth); typedef VkResult (VKAPI_PTR *PFN_vkCreateRayTracingPipelinesNV)(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkRayTracingPipelineCreateInfoNV* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines); typedef VkResult (VKAPI_PTR *PFN_vkGetRayTracingShaderGroupHandlesKHR)(VkDevice device, VkPipeline pipeline, uint32_t firstGroup, uint32_t groupCount, size_t dataSize, void* pData); typedef VkResult (VKAPI_PTR *PFN_vkGetRayTracingShaderGroupHandlesNV)(VkDevice device, VkPipeline pipeline, uint32_t firstGroup, uint32_t groupCount, size_t dataSize, void* pData); typedef VkResult (VKAPI_PTR *PFN_vkGetAccelerationStructureHandleNV)(VkDevice device, VkAccelerationStructureNV accelerationStructure, size_t dataSize, void* pData); typedef void (VKAPI_PTR *PFN_vkCmdWriteAccelerationStructuresPropertiesNV)(VkCommandBuffer commandBuffer, uint32_t accelerationStructureCount, const VkAccelerationStructureNV* pAccelerationStructures, VkQueryType queryType, VkQueryPool queryPool, uint32_t firstQuery); typedef VkResult (VKAPI_PTR *PFN_vkCompileDeferredNV)(VkDevice device, VkPipeline pipeline, uint32_t shader); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkCreateAccelerationStructureNV( VkDevice device, const VkAccelerationStructureCreateInfoNV* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkAccelerationStructureNV* pAccelerationStructure); VKAPI_ATTR void VKAPI_CALL vkDestroyAccelerationStructureNV( VkDevice device, VkAccelerationStructureNV accelerationStructure, const VkAllocationCallbacks* pAllocator); VKAPI_ATTR void VKAPI_CALL vkGetAccelerationStructureMemoryRequirementsNV( VkDevice device, const VkAccelerationStructureMemoryRequirementsInfoNV* pInfo, VkMemoryRequirements2KHR* pMemoryRequirements); VKAPI_ATTR VkResult VKAPI_CALL vkBindAccelerationStructureMemoryNV( VkDevice device, uint32_t bindInfoCount, const VkBindAccelerationStructureMemoryInfoNV* pBindInfos); VKAPI_ATTR void VKAPI_CALL vkCmdBuildAccelerationStructureNV( VkCommandBuffer commandBuffer, const VkAccelerationStructureInfoNV* pInfo, VkBuffer instanceData, VkDeviceSize instanceOffset, VkBool32 update, VkAccelerationStructureNV dst, VkAccelerationStructureNV src, VkBuffer scratch, VkDeviceSize scratchOffset); VKAPI_ATTR void VKAPI_CALL vkCmdCopyAccelerationStructureNV( VkCommandBuffer commandBuffer, VkAccelerationStructureNV dst, VkAccelerationStructureNV src, VkCopyAccelerationStructureModeKHR mode); VKAPI_ATTR void VKAPI_CALL vkCmdTraceRaysNV( VkCommandBuffer commandBuffer, VkBuffer raygenShaderBindingTableBuffer, VkDeviceSize raygenShaderBindingOffset, VkBuffer missShaderBindingTableBuffer, VkDeviceSize missShaderBindingOffset, VkDeviceSize missShaderBindingStride, VkBuffer hitShaderBindingTableBuffer, VkDeviceSize hitShaderBindingOffset, VkDeviceSize hitShaderBindingStride, VkBuffer callableShaderBindingTableBuffer, VkDeviceSize callableShaderBindingOffset, VkDeviceSize callableShaderBindingStride, uint32_t width, uint32_t height, uint32_t depth); VKAPI_ATTR VkResult VKAPI_CALL vkCreateRayTracingPipelinesNV( VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkRayTracingPipelineCreateInfoNV* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines); VKAPI_ATTR VkResult VKAPI_CALL vkGetRayTracingShaderGroupHandlesKHR( VkDevice device, VkPipeline pipeline, uint32_t firstGroup, uint32_t groupCount, size_t dataSize, void* pData); VKAPI_ATTR VkResult VKAPI_CALL vkGetRayTracingShaderGroupHandlesNV( VkDevice device, VkPipeline pipeline, uint32_t firstGroup, uint32_t groupCount, size_t dataSize, void* pData); VKAPI_ATTR VkResult VKAPI_CALL vkGetAccelerationStructureHandleNV( VkDevice device, VkAccelerationStructureNV accelerationStructure, size_t dataSize, void* pData); VKAPI_ATTR void VKAPI_CALL vkCmdWriteAccelerationStructuresPropertiesNV( VkCommandBuffer commandBuffer, uint32_t accelerationStructureCount, const VkAccelerationStructureNV* pAccelerationStructures, VkQueryType queryType, VkQueryPool queryPool, uint32_t firstQuery); VKAPI_ATTR VkResult VKAPI_CALL vkCompileDeferredNV( VkDevice device, VkPipeline pipeline, uint32_t shader); #endif // VK_NV_representative_fragment_test is a preprocessor guard. Do not pass it to API calls. #define VK_NV_representative_fragment_test 1 #define VK_NV_REPRESENTATIVE_FRAGMENT_TEST_SPEC_VERSION 2 #define VK_NV_REPRESENTATIVE_FRAGMENT_TEST_EXTENSION_NAME "VK_NV_representative_fragment_test" typedef struct VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV { VkStructureType sType; void* pNext; VkBool32 representativeFragmentTest; } VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV; typedef struct VkPipelineRepresentativeFragmentTestStateCreateInfoNV { VkStructureType sType; const void* pNext; VkBool32 representativeFragmentTestEnable; } VkPipelineRepresentativeFragmentTestStateCreateInfoNV; // VK_EXT_filter_cubic is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_filter_cubic 1 #define VK_EXT_FILTER_CUBIC_SPEC_VERSION 3 #define VK_EXT_FILTER_CUBIC_EXTENSION_NAME "VK_EXT_filter_cubic" typedef struct VkPhysicalDeviceImageViewImageFormatInfoEXT { VkStructureType sType; void* pNext; VkImageViewType imageViewType; } VkPhysicalDeviceImageViewImageFormatInfoEXT; typedef struct VkFilterCubicImageViewImageFormatPropertiesEXT { VkStructureType sType; void* pNext; VkBool32 filterCubic; VkBool32 filterCubicMinmax; } VkFilterCubicImageViewImageFormatPropertiesEXT; // VK_QCOM_render_pass_shader_resolve is a preprocessor guard. Do not pass it to API calls. #define VK_QCOM_render_pass_shader_resolve 1 #define VK_QCOM_RENDER_PASS_SHADER_RESOLVE_SPEC_VERSION 4 #define VK_QCOM_RENDER_PASS_SHADER_RESOLVE_EXTENSION_NAME "VK_QCOM_render_pass_shader_resolve" // VK_EXT_global_priority is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_global_priority 1 #define VK_EXT_GLOBAL_PRIORITY_SPEC_VERSION 2 #define VK_EXT_GLOBAL_PRIORITY_EXTENSION_NAME "VK_EXT_global_priority" typedef VkQueueGlobalPriority VkQueueGlobalPriorityEXT; typedef VkDeviceQueueGlobalPriorityCreateInfo VkDeviceQueueGlobalPriorityCreateInfoEXT; // VK_EXT_external_memory_host is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_external_memory_host 1 #define VK_EXT_EXTERNAL_MEMORY_HOST_SPEC_VERSION 1 #define VK_EXT_EXTERNAL_MEMORY_HOST_EXTENSION_NAME "VK_EXT_external_memory_host" typedef struct VkImportMemoryHostPointerInfoEXT { VkStructureType sType; const void* pNext; VkExternalMemoryHandleTypeFlagBits handleType; void* pHostPointer; } VkImportMemoryHostPointerInfoEXT; typedef struct VkMemoryHostPointerPropertiesEXT { VkStructureType sType; void* pNext; uint32_t memoryTypeBits; } VkMemoryHostPointerPropertiesEXT; typedef struct VkPhysicalDeviceExternalMemoryHostPropertiesEXT { VkStructureType sType; void* pNext; VkDeviceSize minImportedHostPointerAlignment; } VkPhysicalDeviceExternalMemoryHostPropertiesEXT; typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryHostPointerPropertiesEXT)(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, const void* pHostPointer, VkMemoryHostPointerPropertiesEXT* pMemoryHostPointerProperties); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryHostPointerPropertiesEXT( VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, const void* pHostPointer, VkMemoryHostPointerPropertiesEXT* pMemoryHostPointerProperties); #endif // VK_AMD_buffer_marker is a preprocessor guard. Do not pass it to API calls. #define VK_AMD_buffer_marker 1 #define VK_AMD_BUFFER_MARKER_SPEC_VERSION 1 #define VK_AMD_BUFFER_MARKER_EXTENSION_NAME "VK_AMD_buffer_marker" typedef void (VKAPI_PTR *PFN_vkCmdWriteBufferMarkerAMD)(VkCommandBuffer commandBuffer, VkPipelineStageFlagBits pipelineStage, VkBuffer dstBuffer, VkDeviceSize dstOffset, uint32_t marker); typedef void (VKAPI_PTR *PFN_vkCmdWriteBufferMarker2AMD)(VkCommandBuffer commandBuffer, VkPipelineStageFlags2 stage, VkBuffer dstBuffer, VkDeviceSize dstOffset, uint32_t marker); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR void VKAPI_CALL vkCmdWriteBufferMarkerAMD( VkCommandBuffer commandBuffer, VkPipelineStageFlagBits pipelineStage, VkBuffer dstBuffer, VkDeviceSize dstOffset, uint32_t marker); VKAPI_ATTR void VKAPI_CALL vkCmdWriteBufferMarker2AMD( VkCommandBuffer commandBuffer, VkPipelineStageFlags2 stage, VkBuffer dstBuffer, VkDeviceSize dstOffset, uint32_t marker); #endif // VK_AMD_pipeline_compiler_control is a preprocessor guard. Do not pass it to API calls. #define VK_AMD_pipeline_compiler_control 1 #define VK_AMD_PIPELINE_COMPILER_CONTROL_SPEC_VERSION 1 #define VK_AMD_PIPELINE_COMPILER_CONTROL_EXTENSION_NAME "VK_AMD_pipeline_compiler_control" typedef enum VkPipelineCompilerControlFlagBitsAMD { VK_PIPELINE_COMPILER_CONTROL_FLAG_BITS_MAX_ENUM_AMD = 0x7FFFFFFF } VkPipelineCompilerControlFlagBitsAMD; typedef VkFlags VkPipelineCompilerControlFlagsAMD; typedef struct VkPipelineCompilerControlCreateInfoAMD { VkStructureType sType; const void* pNext; VkPipelineCompilerControlFlagsAMD compilerControlFlags; } VkPipelineCompilerControlCreateInfoAMD; // VK_EXT_calibrated_timestamps is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_calibrated_timestamps 1 #define VK_EXT_CALIBRATED_TIMESTAMPS_SPEC_VERSION 2 #define VK_EXT_CALIBRATED_TIMESTAMPS_EXTENSION_NAME "VK_EXT_calibrated_timestamps" typedef VkTimeDomainKHR VkTimeDomainEXT; typedef VkCalibratedTimestampInfoKHR VkCalibratedTimestampInfoEXT; typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceCalibrateableTimeDomainsEXT)(VkPhysicalDevice physicalDevice, uint32_t* pTimeDomainCount, VkTimeDomainKHR* pTimeDomains); typedef VkResult (VKAPI_PTR *PFN_vkGetCalibratedTimestampsEXT)(VkDevice device, uint32_t timestampCount, const VkCalibratedTimestampInfoKHR* pTimestampInfos, uint64_t* pTimestamps, uint64_t* pMaxDeviation); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceCalibrateableTimeDomainsEXT( VkPhysicalDevice physicalDevice, uint32_t* pTimeDomainCount, VkTimeDomainKHR* pTimeDomains); VKAPI_ATTR VkResult VKAPI_CALL vkGetCalibratedTimestampsEXT( VkDevice device, uint32_t timestampCount, const VkCalibratedTimestampInfoKHR* pTimestampInfos, uint64_t* pTimestamps, uint64_t* pMaxDeviation); #endif // VK_AMD_shader_core_properties is a preprocessor guard. Do not pass it to API calls. #define VK_AMD_shader_core_properties 1 #define VK_AMD_SHADER_CORE_PROPERTIES_SPEC_VERSION 2 #define VK_AMD_SHADER_CORE_PROPERTIES_EXTENSION_NAME "VK_AMD_shader_core_properties" typedef struct VkPhysicalDeviceShaderCorePropertiesAMD { VkStructureType sType; void* pNext; uint32_t shaderEngineCount; uint32_t shaderArraysPerEngineCount; uint32_t computeUnitsPerShaderArray; uint32_t simdPerComputeUnit; uint32_t wavefrontsPerSimd; uint32_t wavefrontSize; uint32_t sgprsPerSimd; uint32_t minSgprAllocation; uint32_t maxSgprAllocation; uint32_t sgprAllocationGranularity; uint32_t vgprsPerSimd; uint32_t minVgprAllocation; uint32_t maxVgprAllocation; uint32_t vgprAllocationGranularity; } VkPhysicalDeviceShaderCorePropertiesAMD; // VK_AMD_memory_overallocation_behavior is a preprocessor guard. Do not pass it to API calls. #define VK_AMD_memory_overallocation_behavior 1 #define VK_AMD_MEMORY_OVERALLOCATION_BEHAVIOR_SPEC_VERSION 1 #define VK_AMD_MEMORY_OVERALLOCATION_BEHAVIOR_EXTENSION_NAME "VK_AMD_memory_overallocation_behavior" typedef enum VkMemoryOverallocationBehaviorAMD { VK_MEMORY_OVERALLOCATION_BEHAVIOR_DEFAULT_AMD = 0, VK_MEMORY_OVERALLOCATION_BEHAVIOR_ALLOWED_AMD = 1, VK_MEMORY_OVERALLOCATION_BEHAVIOR_DISALLOWED_AMD = 2, VK_MEMORY_OVERALLOCATION_BEHAVIOR_MAX_ENUM_AMD = 0x7FFFFFFF } VkMemoryOverallocationBehaviorAMD; typedef struct VkDeviceMemoryOverallocationCreateInfoAMD { VkStructureType sType; const void* pNext; VkMemoryOverallocationBehaviorAMD overallocationBehavior; } VkDeviceMemoryOverallocationCreateInfoAMD; // VK_EXT_vertex_attribute_divisor is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_vertex_attribute_divisor 1 #define VK_EXT_VERTEX_ATTRIBUTE_DIVISOR_SPEC_VERSION 3 #define VK_EXT_VERTEX_ATTRIBUTE_DIVISOR_EXTENSION_NAME "VK_EXT_vertex_attribute_divisor" typedef struct VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT { VkStructureType sType; void* pNext; uint32_t maxVertexAttribDivisor; } VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT; typedef VkVertexInputBindingDivisorDescription VkVertexInputBindingDivisorDescriptionEXT; typedef VkPipelineVertexInputDivisorStateCreateInfo VkPipelineVertexInputDivisorStateCreateInfoEXT; typedef VkPhysicalDeviceVertexAttributeDivisorFeatures VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT; // VK_EXT_pipeline_creation_feedback is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_pipeline_creation_feedback 1 #define VK_EXT_PIPELINE_CREATION_FEEDBACK_SPEC_VERSION 1 #define VK_EXT_PIPELINE_CREATION_FEEDBACK_EXTENSION_NAME "VK_EXT_pipeline_creation_feedback" typedef VkPipelineCreationFeedbackFlagBits VkPipelineCreationFeedbackFlagBitsEXT; typedef VkPipelineCreationFeedbackFlags VkPipelineCreationFeedbackFlagsEXT; typedef VkPipelineCreationFeedbackCreateInfo VkPipelineCreationFeedbackCreateInfoEXT; typedef VkPipelineCreationFeedback VkPipelineCreationFeedbackEXT; // VK_NV_shader_subgroup_partitioned is a preprocessor guard. Do not pass it to API calls. #define VK_NV_shader_subgroup_partitioned 1 #define VK_NV_SHADER_SUBGROUP_PARTITIONED_SPEC_VERSION 1 #define VK_NV_SHADER_SUBGROUP_PARTITIONED_EXTENSION_NAME "VK_NV_shader_subgroup_partitioned" // VK_NV_compute_shader_derivatives is a preprocessor guard. Do not pass it to API calls. #define VK_NV_compute_shader_derivatives 1 #define VK_NV_COMPUTE_SHADER_DERIVATIVES_SPEC_VERSION 1 #define VK_NV_COMPUTE_SHADER_DERIVATIVES_EXTENSION_NAME "VK_NV_compute_shader_derivatives" typedef VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR VkPhysicalDeviceComputeShaderDerivativesFeaturesNV; // VK_NV_mesh_shader is a preprocessor guard. Do not pass it to API calls. #define VK_NV_mesh_shader 1 #define VK_NV_MESH_SHADER_SPEC_VERSION 1 #define VK_NV_MESH_SHADER_EXTENSION_NAME "VK_NV_mesh_shader" typedef struct VkPhysicalDeviceMeshShaderFeaturesNV { VkStructureType sType; void* pNext; VkBool32 taskShader; VkBool32 meshShader; } VkPhysicalDeviceMeshShaderFeaturesNV; typedef struct VkPhysicalDeviceMeshShaderPropertiesNV { VkStructureType sType; void* pNext; uint32_t maxDrawMeshTasksCount; uint32_t maxTaskWorkGroupInvocations; uint32_t maxTaskWorkGroupSize[3]; uint32_t maxTaskTotalMemorySize; uint32_t maxTaskOutputCount; uint32_t maxMeshWorkGroupInvocations; uint32_t maxMeshWorkGroupSize[3]; uint32_t maxMeshTotalMemorySize; uint32_t maxMeshOutputVertices; uint32_t maxMeshOutputPrimitives; uint32_t maxMeshMultiviewViewCount; uint32_t meshOutputPerVertexGranularity; uint32_t meshOutputPerPrimitiveGranularity; } VkPhysicalDeviceMeshShaderPropertiesNV; typedef struct VkDrawMeshTasksIndirectCommandNV { uint32_t taskCount; uint32_t firstTask; } VkDrawMeshTasksIndirectCommandNV; typedef void (VKAPI_PTR *PFN_vkCmdDrawMeshTasksNV)(VkCommandBuffer commandBuffer, uint32_t taskCount, uint32_t firstTask); typedef void (VKAPI_PTR *PFN_vkCmdDrawMeshTasksIndirectNV)(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride); typedef void (VKAPI_PTR *PFN_vkCmdDrawMeshTasksIndirectCountNV)(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR void VKAPI_CALL vkCmdDrawMeshTasksNV( VkCommandBuffer commandBuffer, uint32_t taskCount, uint32_t firstTask); VKAPI_ATTR void VKAPI_CALL vkCmdDrawMeshTasksIndirectNV( VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride); VKAPI_ATTR void VKAPI_CALL vkCmdDrawMeshTasksIndirectCountNV( VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride); #endif // VK_NV_fragment_shader_barycentric is a preprocessor guard. Do not pass it to API calls. #define VK_NV_fragment_shader_barycentric 1 #define VK_NV_FRAGMENT_SHADER_BARYCENTRIC_SPEC_VERSION 1 #define VK_NV_FRAGMENT_SHADER_BARYCENTRIC_EXTENSION_NAME "VK_NV_fragment_shader_barycentric" typedef VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR VkPhysicalDeviceFragmentShaderBarycentricFeaturesNV; // VK_NV_shader_image_footprint is a preprocessor guard. Do not pass it to API calls. #define VK_NV_shader_image_footprint 1 #define VK_NV_SHADER_IMAGE_FOOTPRINT_SPEC_VERSION 2 #define VK_NV_SHADER_IMAGE_FOOTPRINT_EXTENSION_NAME "VK_NV_shader_image_footprint" typedef struct VkPhysicalDeviceShaderImageFootprintFeaturesNV { VkStructureType sType; void* pNext; VkBool32 imageFootprint; } VkPhysicalDeviceShaderImageFootprintFeaturesNV; // VK_NV_scissor_exclusive is a preprocessor guard. Do not pass it to API calls. #define VK_NV_scissor_exclusive 1 #define VK_NV_SCISSOR_EXCLUSIVE_SPEC_VERSION 2 #define VK_NV_SCISSOR_EXCLUSIVE_EXTENSION_NAME "VK_NV_scissor_exclusive" typedef struct VkPipelineViewportExclusiveScissorStateCreateInfoNV { VkStructureType sType; const void* pNext; uint32_t exclusiveScissorCount; const VkRect2D* pExclusiveScissors; } VkPipelineViewportExclusiveScissorStateCreateInfoNV; typedef struct VkPhysicalDeviceExclusiveScissorFeaturesNV { VkStructureType sType; void* pNext; VkBool32 exclusiveScissor; } VkPhysicalDeviceExclusiveScissorFeaturesNV; typedef void (VKAPI_PTR *PFN_vkCmdSetExclusiveScissorEnableNV)(VkCommandBuffer commandBuffer, uint32_t firstExclusiveScissor, uint32_t exclusiveScissorCount, const VkBool32* pExclusiveScissorEnables); typedef void (VKAPI_PTR *PFN_vkCmdSetExclusiveScissorNV)(VkCommandBuffer commandBuffer, uint32_t firstExclusiveScissor, uint32_t exclusiveScissorCount, const VkRect2D* pExclusiveScissors); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR void VKAPI_CALL vkCmdSetExclusiveScissorEnableNV( VkCommandBuffer commandBuffer, uint32_t firstExclusiveScissor, uint32_t exclusiveScissorCount, const VkBool32* pExclusiveScissorEnables); VKAPI_ATTR void VKAPI_CALL vkCmdSetExclusiveScissorNV( VkCommandBuffer commandBuffer, uint32_t firstExclusiveScissor, uint32_t exclusiveScissorCount, const VkRect2D* pExclusiveScissors); #endif // VK_NV_device_diagnostic_checkpoints is a preprocessor guard. Do not pass it to API calls. #define VK_NV_device_diagnostic_checkpoints 1 #define VK_NV_DEVICE_DIAGNOSTIC_CHECKPOINTS_SPEC_VERSION 2 #define VK_NV_DEVICE_DIAGNOSTIC_CHECKPOINTS_EXTENSION_NAME "VK_NV_device_diagnostic_checkpoints" typedef struct VkQueueFamilyCheckpointPropertiesNV { VkStructureType sType; void* pNext; VkPipelineStageFlags checkpointExecutionStageMask; } VkQueueFamilyCheckpointPropertiesNV; typedef struct VkCheckpointDataNV { VkStructureType sType; void* pNext; VkPipelineStageFlagBits stage; void* pCheckpointMarker; } VkCheckpointDataNV; typedef struct VkQueueFamilyCheckpointProperties2NV { VkStructureType sType; void* pNext; VkPipelineStageFlags2 checkpointExecutionStageMask; } VkQueueFamilyCheckpointProperties2NV; typedef struct VkCheckpointData2NV { VkStructureType sType; void* pNext; VkPipelineStageFlags2 stage; void* pCheckpointMarker; } VkCheckpointData2NV; typedef void (VKAPI_PTR *PFN_vkCmdSetCheckpointNV)(VkCommandBuffer commandBuffer, const void* pCheckpointMarker); typedef void (VKAPI_PTR *PFN_vkGetQueueCheckpointDataNV)(VkQueue queue, uint32_t* pCheckpointDataCount, VkCheckpointDataNV* pCheckpointData); typedef void (VKAPI_PTR *PFN_vkGetQueueCheckpointData2NV)(VkQueue queue, uint32_t* pCheckpointDataCount, VkCheckpointData2NV* pCheckpointData); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR void VKAPI_CALL vkCmdSetCheckpointNV( VkCommandBuffer commandBuffer, const void* pCheckpointMarker); VKAPI_ATTR void VKAPI_CALL vkGetQueueCheckpointDataNV( VkQueue queue, uint32_t* pCheckpointDataCount, VkCheckpointDataNV* pCheckpointData); VKAPI_ATTR void VKAPI_CALL vkGetQueueCheckpointData2NV( VkQueue queue, uint32_t* pCheckpointDataCount, VkCheckpointData2NV* pCheckpointData); #endif // VK_INTEL_shader_integer_functions2 is a preprocessor guard. Do not pass it to API calls. #define VK_INTEL_shader_integer_functions2 1 #define VK_INTEL_SHADER_INTEGER_FUNCTIONS_2_SPEC_VERSION 1 #define VK_INTEL_SHADER_INTEGER_FUNCTIONS_2_EXTENSION_NAME "VK_INTEL_shader_integer_functions2" typedef struct VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL { VkStructureType sType; void* pNext; VkBool32 shaderIntegerFunctions2; } VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL; // VK_INTEL_performance_query is a preprocessor guard. Do not pass it to API calls. #define VK_INTEL_performance_query 1 VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkPerformanceConfigurationINTEL) #define VK_INTEL_PERFORMANCE_QUERY_SPEC_VERSION 2 #define VK_INTEL_PERFORMANCE_QUERY_EXTENSION_NAME "VK_INTEL_performance_query" typedef enum VkPerformanceConfigurationTypeINTEL { VK_PERFORMANCE_CONFIGURATION_TYPE_COMMAND_QUEUE_METRICS_DISCOVERY_ACTIVATED_INTEL = 0, VK_PERFORMANCE_CONFIGURATION_TYPE_MAX_ENUM_INTEL = 0x7FFFFFFF } VkPerformanceConfigurationTypeINTEL; typedef enum VkQueryPoolSamplingModeINTEL { VK_QUERY_POOL_SAMPLING_MODE_MANUAL_INTEL = 0, VK_QUERY_POOL_SAMPLING_MODE_MAX_ENUM_INTEL = 0x7FFFFFFF } VkQueryPoolSamplingModeINTEL; typedef enum VkPerformanceOverrideTypeINTEL { VK_PERFORMANCE_OVERRIDE_TYPE_NULL_HARDWARE_INTEL = 0, VK_PERFORMANCE_OVERRIDE_TYPE_FLUSH_GPU_CACHES_INTEL = 1, VK_PERFORMANCE_OVERRIDE_TYPE_MAX_ENUM_INTEL = 0x7FFFFFFF } VkPerformanceOverrideTypeINTEL; typedef enum VkPerformanceParameterTypeINTEL { VK_PERFORMANCE_PARAMETER_TYPE_HW_COUNTERS_SUPPORTED_INTEL = 0, VK_PERFORMANCE_PARAMETER_TYPE_STREAM_MARKER_VALID_BITS_INTEL = 1, VK_PERFORMANCE_PARAMETER_TYPE_MAX_ENUM_INTEL = 0x7FFFFFFF } VkPerformanceParameterTypeINTEL; typedef enum VkPerformanceValueTypeINTEL { VK_PERFORMANCE_VALUE_TYPE_UINT32_INTEL = 0, VK_PERFORMANCE_VALUE_TYPE_UINT64_INTEL = 1, VK_PERFORMANCE_VALUE_TYPE_FLOAT_INTEL = 2, VK_PERFORMANCE_VALUE_TYPE_BOOL_INTEL = 3, VK_PERFORMANCE_VALUE_TYPE_STRING_INTEL = 4, VK_PERFORMANCE_VALUE_TYPE_MAX_ENUM_INTEL = 0x7FFFFFFF } VkPerformanceValueTypeINTEL; typedef union VkPerformanceValueDataINTEL { uint32_t value32; uint64_t value64; float valueFloat; VkBool32 valueBool; const char* valueString; } VkPerformanceValueDataINTEL; typedef struct VkPerformanceValueINTEL { VkPerformanceValueTypeINTEL type; VkPerformanceValueDataINTEL data; } VkPerformanceValueINTEL; typedef struct VkInitializePerformanceApiInfoINTEL { VkStructureType sType; const void* pNext; void* pUserData; } VkInitializePerformanceApiInfoINTEL; typedef struct VkQueryPoolPerformanceQueryCreateInfoINTEL { VkStructureType sType; const void* pNext; VkQueryPoolSamplingModeINTEL performanceCountersSampling; } VkQueryPoolPerformanceQueryCreateInfoINTEL; typedef VkQueryPoolPerformanceQueryCreateInfoINTEL VkQueryPoolCreateInfoINTEL; typedef struct VkPerformanceMarkerInfoINTEL { VkStructureType sType; const void* pNext; uint64_t marker; } VkPerformanceMarkerInfoINTEL; typedef struct VkPerformanceStreamMarkerInfoINTEL { VkStructureType sType; const void* pNext; uint32_t marker; } VkPerformanceStreamMarkerInfoINTEL; typedef struct VkPerformanceOverrideInfoINTEL { VkStructureType sType; const void* pNext; VkPerformanceOverrideTypeINTEL type; VkBool32 enable; uint64_t parameter; } VkPerformanceOverrideInfoINTEL; typedef struct VkPerformanceConfigurationAcquireInfoINTEL { VkStructureType sType; const void* pNext; VkPerformanceConfigurationTypeINTEL type; } VkPerformanceConfigurationAcquireInfoINTEL; typedef VkResult (VKAPI_PTR *PFN_vkInitializePerformanceApiINTEL)(VkDevice device, const VkInitializePerformanceApiInfoINTEL* pInitializeInfo); typedef void (VKAPI_PTR *PFN_vkUninitializePerformanceApiINTEL)(VkDevice device); typedef VkResult (VKAPI_PTR *PFN_vkCmdSetPerformanceMarkerINTEL)(VkCommandBuffer commandBuffer, const VkPerformanceMarkerInfoINTEL* pMarkerInfo); typedef VkResult (VKAPI_PTR *PFN_vkCmdSetPerformanceStreamMarkerINTEL)(VkCommandBuffer commandBuffer, const VkPerformanceStreamMarkerInfoINTEL* pMarkerInfo); typedef VkResult (VKAPI_PTR *PFN_vkCmdSetPerformanceOverrideINTEL)(VkCommandBuffer commandBuffer, const VkPerformanceOverrideInfoINTEL* pOverrideInfo); typedef VkResult (VKAPI_PTR *PFN_vkAcquirePerformanceConfigurationINTEL)(VkDevice device, const VkPerformanceConfigurationAcquireInfoINTEL* pAcquireInfo, VkPerformanceConfigurationINTEL* pConfiguration); typedef VkResult (VKAPI_PTR *PFN_vkReleasePerformanceConfigurationINTEL)(VkDevice device, VkPerformanceConfigurationINTEL configuration); typedef VkResult (VKAPI_PTR *PFN_vkQueueSetPerformanceConfigurationINTEL)(VkQueue queue, VkPerformanceConfigurationINTEL configuration); typedef VkResult (VKAPI_PTR *PFN_vkGetPerformanceParameterINTEL)(VkDevice device, VkPerformanceParameterTypeINTEL parameter, VkPerformanceValueINTEL* pValue); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkInitializePerformanceApiINTEL( VkDevice device, const VkInitializePerformanceApiInfoINTEL* pInitializeInfo); VKAPI_ATTR void VKAPI_CALL vkUninitializePerformanceApiINTEL( VkDevice device); VKAPI_ATTR VkResult VKAPI_CALL vkCmdSetPerformanceMarkerINTEL( VkCommandBuffer commandBuffer, const VkPerformanceMarkerInfoINTEL* pMarkerInfo); VKAPI_ATTR VkResult VKAPI_CALL vkCmdSetPerformanceStreamMarkerINTEL( VkCommandBuffer commandBuffer, const VkPerformanceStreamMarkerInfoINTEL* pMarkerInfo); VKAPI_ATTR VkResult VKAPI_CALL vkCmdSetPerformanceOverrideINTEL( VkCommandBuffer commandBuffer, const VkPerformanceOverrideInfoINTEL* pOverrideInfo); VKAPI_ATTR VkResult VKAPI_CALL vkAcquirePerformanceConfigurationINTEL( VkDevice device, const VkPerformanceConfigurationAcquireInfoINTEL* pAcquireInfo, VkPerformanceConfigurationINTEL* pConfiguration); VKAPI_ATTR VkResult VKAPI_CALL vkReleasePerformanceConfigurationINTEL( VkDevice device, VkPerformanceConfigurationINTEL configuration); VKAPI_ATTR VkResult VKAPI_CALL vkQueueSetPerformanceConfigurationINTEL( VkQueue queue, VkPerformanceConfigurationINTEL configuration); VKAPI_ATTR VkResult VKAPI_CALL vkGetPerformanceParameterINTEL( VkDevice device, VkPerformanceParameterTypeINTEL parameter, VkPerformanceValueINTEL* pValue); #endif // VK_EXT_pci_bus_info is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_pci_bus_info 1 #define VK_EXT_PCI_BUS_INFO_SPEC_VERSION 2 #define VK_EXT_PCI_BUS_INFO_EXTENSION_NAME "VK_EXT_pci_bus_info" typedef struct VkPhysicalDevicePCIBusInfoPropertiesEXT { VkStructureType sType; void* pNext; uint32_t pciDomain; uint32_t pciBus; uint32_t pciDevice; uint32_t pciFunction; } VkPhysicalDevicePCIBusInfoPropertiesEXT; // VK_AMD_display_native_hdr is a preprocessor guard. Do not pass it to API calls. #define VK_AMD_display_native_hdr 1 #define VK_AMD_DISPLAY_NATIVE_HDR_SPEC_VERSION 1 #define VK_AMD_DISPLAY_NATIVE_HDR_EXTENSION_NAME "VK_AMD_display_native_hdr" typedef struct VkDisplayNativeHdrSurfaceCapabilitiesAMD { VkStructureType sType; void* pNext; VkBool32 localDimmingSupport; } VkDisplayNativeHdrSurfaceCapabilitiesAMD; typedef struct VkSwapchainDisplayNativeHdrCreateInfoAMD { VkStructureType sType; const void* pNext; VkBool32 localDimmingEnable; } VkSwapchainDisplayNativeHdrCreateInfoAMD; typedef void (VKAPI_PTR *PFN_vkSetLocalDimmingAMD)(VkDevice device, VkSwapchainKHR swapChain, VkBool32 localDimmingEnable); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR void VKAPI_CALL vkSetLocalDimmingAMD( VkDevice device, VkSwapchainKHR swapChain, VkBool32 localDimmingEnable); #endif // VK_EXT_fragment_density_map is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_fragment_density_map 1 #define VK_EXT_FRAGMENT_DENSITY_MAP_SPEC_VERSION 2 #define VK_EXT_FRAGMENT_DENSITY_MAP_EXTENSION_NAME "VK_EXT_fragment_density_map" typedef struct VkPhysicalDeviceFragmentDensityMapFeaturesEXT { VkStructureType sType; void* pNext; VkBool32 fragmentDensityMap; VkBool32 fragmentDensityMapDynamic; VkBool32 fragmentDensityMapNonSubsampledImages; } VkPhysicalDeviceFragmentDensityMapFeaturesEXT; typedef struct VkPhysicalDeviceFragmentDensityMapPropertiesEXT { VkStructureType sType; void* pNext; VkExtent2D minFragmentDensityTexelSize; VkExtent2D maxFragmentDensityTexelSize; VkBool32 fragmentDensityInvocations; } VkPhysicalDeviceFragmentDensityMapPropertiesEXT; typedef struct VkRenderPassFragmentDensityMapCreateInfoEXT { VkStructureType sType; const void* pNext; VkAttachmentReference fragmentDensityMapAttachment; } VkRenderPassFragmentDensityMapCreateInfoEXT; typedef struct VkRenderingFragmentDensityMapAttachmentInfoEXT { VkStructureType sType; const void* pNext; VkImageView imageView; VkImageLayout imageLayout; } VkRenderingFragmentDensityMapAttachmentInfoEXT; // VK_EXT_scalar_block_layout is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_scalar_block_layout 1 #define VK_EXT_SCALAR_BLOCK_LAYOUT_SPEC_VERSION 1 #define VK_EXT_SCALAR_BLOCK_LAYOUT_EXTENSION_NAME "VK_EXT_scalar_block_layout" typedef VkPhysicalDeviceScalarBlockLayoutFeatures VkPhysicalDeviceScalarBlockLayoutFeaturesEXT; // VK_GOOGLE_hlsl_functionality1 is a preprocessor guard. Do not pass it to API calls. #define VK_GOOGLE_hlsl_functionality1 1 #define VK_GOOGLE_HLSL_FUNCTIONALITY_1_SPEC_VERSION 1 #define VK_GOOGLE_HLSL_FUNCTIONALITY_1_EXTENSION_NAME "VK_GOOGLE_hlsl_functionality1" // VK_GOOGLE_HLSL_FUNCTIONALITY1_SPEC_VERSION is a deprecated alias #define VK_GOOGLE_HLSL_FUNCTIONALITY1_SPEC_VERSION VK_GOOGLE_HLSL_FUNCTIONALITY_1_SPEC_VERSION // VK_GOOGLE_HLSL_FUNCTIONALITY1_EXTENSION_NAME is a deprecated alias #define VK_GOOGLE_HLSL_FUNCTIONALITY1_EXTENSION_NAME VK_GOOGLE_HLSL_FUNCTIONALITY_1_EXTENSION_NAME // VK_GOOGLE_decorate_string is a preprocessor guard. Do not pass it to API calls. #define VK_GOOGLE_decorate_string 1 #define VK_GOOGLE_DECORATE_STRING_SPEC_VERSION 1 #define VK_GOOGLE_DECORATE_STRING_EXTENSION_NAME "VK_GOOGLE_decorate_string" // VK_EXT_subgroup_size_control is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_subgroup_size_control 1 #define VK_EXT_SUBGROUP_SIZE_CONTROL_SPEC_VERSION 2 #define VK_EXT_SUBGROUP_SIZE_CONTROL_EXTENSION_NAME "VK_EXT_subgroup_size_control" typedef VkPhysicalDeviceSubgroupSizeControlFeatures VkPhysicalDeviceSubgroupSizeControlFeaturesEXT; typedef VkPhysicalDeviceSubgroupSizeControlProperties VkPhysicalDeviceSubgroupSizeControlPropertiesEXT; typedef VkPipelineShaderStageRequiredSubgroupSizeCreateInfo VkPipelineShaderStageRequiredSubgroupSizeCreateInfoEXT; // VK_AMD_shader_core_properties2 is a preprocessor guard. Do not pass it to API calls. #define VK_AMD_shader_core_properties2 1 #define VK_AMD_SHADER_CORE_PROPERTIES_2_SPEC_VERSION 1 #define VK_AMD_SHADER_CORE_PROPERTIES_2_EXTENSION_NAME "VK_AMD_shader_core_properties2" typedef enum VkShaderCorePropertiesFlagBitsAMD { VK_SHADER_CORE_PROPERTIES_FLAG_BITS_MAX_ENUM_AMD = 0x7FFFFFFF } VkShaderCorePropertiesFlagBitsAMD; typedef VkFlags VkShaderCorePropertiesFlagsAMD; typedef struct VkPhysicalDeviceShaderCoreProperties2AMD { VkStructureType sType; void* pNext; VkShaderCorePropertiesFlagsAMD shaderCoreFeatures; uint32_t activeComputeUnitCount; } VkPhysicalDeviceShaderCoreProperties2AMD; // VK_AMD_device_coherent_memory is a preprocessor guard. Do not pass it to API calls. #define VK_AMD_device_coherent_memory 1 #define VK_AMD_DEVICE_COHERENT_MEMORY_SPEC_VERSION 1 #define VK_AMD_DEVICE_COHERENT_MEMORY_EXTENSION_NAME "VK_AMD_device_coherent_memory" typedef struct VkPhysicalDeviceCoherentMemoryFeaturesAMD { VkStructureType sType; void* pNext; VkBool32 deviceCoherentMemory; } VkPhysicalDeviceCoherentMemoryFeaturesAMD; // VK_EXT_shader_image_atomic_int64 is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_shader_image_atomic_int64 1 #define VK_EXT_SHADER_IMAGE_ATOMIC_INT64_SPEC_VERSION 1 #define VK_EXT_SHADER_IMAGE_ATOMIC_INT64_EXTENSION_NAME "VK_EXT_shader_image_atomic_int64" typedef struct VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT { VkStructureType sType; void* pNext; VkBool32 shaderImageInt64Atomics; VkBool32 sparseImageInt64Atomics; } VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT; // VK_EXT_memory_budget is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_memory_budget 1 #define VK_EXT_MEMORY_BUDGET_SPEC_VERSION 1 #define VK_EXT_MEMORY_BUDGET_EXTENSION_NAME "VK_EXT_memory_budget" typedef struct VkPhysicalDeviceMemoryBudgetPropertiesEXT { VkStructureType sType; void* pNext; VkDeviceSize heapBudget[VK_MAX_MEMORY_HEAPS]; VkDeviceSize heapUsage[VK_MAX_MEMORY_HEAPS]; } VkPhysicalDeviceMemoryBudgetPropertiesEXT; // VK_EXT_memory_priority is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_memory_priority 1 #define VK_EXT_MEMORY_PRIORITY_SPEC_VERSION 1 #define VK_EXT_MEMORY_PRIORITY_EXTENSION_NAME "VK_EXT_memory_priority" typedef struct VkPhysicalDeviceMemoryPriorityFeaturesEXT { VkStructureType sType; void* pNext; VkBool32 memoryPriority; } VkPhysicalDeviceMemoryPriorityFeaturesEXT; typedef struct VkMemoryPriorityAllocateInfoEXT { VkStructureType sType; const void* pNext; float priority; } VkMemoryPriorityAllocateInfoEXT; // VK_NV_dedicated_allocation_image_aliasing is a preprocessor guard. Do not pass it to API calls. #define VK_NV_dedicated_allocation_image_aliasing 1 #define VK_NV_DEDICATED_ALLOCATION_IMAGE_ALIASING_SPEC_VERSION 1 #define VK_NV_DEDICATED_ALLOCATION_IMAGE_ALIASING_EXTENSION_NAME "VK_NV_dedicated_allocation_image_aliasing" typedef struct VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV { VkStructureType sType; void* pNext; VkBool32 dedicatedAllocationImageAliasing; } VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV; // VK_EXT_buffer_device_address is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_buffer_device_address 1 #define VK_EXT_BUFFER_DEVICE_ADDRESS_SPEC_VERSION 2 #define VK_EXT_BUFFER_DEVICE_ADDRESS_EXTENSION_NAME "VK_EXT_buffer_device_address" typedef struct VkPhysicalDeviceBufferDeviceAddressFeaturesEXT { VkStructureType sType; void* pNext; VkBool32 bufferDeviceAddress; VkBool32 bufferDeviceAddressCaptureReplay; VkBool32 bufferDeviceAddressMultiDevice; } VkPhysicalDeviceBufferDeviceAddressFeaturesEXT; typedef VkPhysicalDeviceBufferDeviceAddressFeaturesEXT VkPhysicalDeviceBufferAddressFeaturesEXT; typedef VkBufferDeviceAddressInfo VkBufferDeviceAddressInfoEXT; typedef struct VkBufferDeviceAddressCreateInfoEXT { VkStructureType sType; const void* pNext; VkDeviceAddress deviceAddress; } VkBufferDeviceAddressCreateInfoEXT; typedef VkDeviceAddress (VKAPI_PTR *PFN_vkGetBufferDeviceAddressEXT)(VkDevice device, const VkBufferDeviceAddressInfo* pInfo); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkDeviceAddress VKAPI_CALL vkGetBufferDeviceAddressEXT( VkDevice device, const VkBufferDeviceAddressInfo* pInfo); #endif // VK_EXT_tooling_info is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_tooling_info 1 #define VK_EXT_TOOLING_INFO_SPEC_VERSION 1 #define VK_EXT_TOOLING_INFO_EXTENSION_NAME "VK_EXT_tooling_info" typedef VkToolPurposeFlagBits VkToolPurposeFlagBitsEXT; typedef VkToolPurposeFlags VkToolPurposeFlagsEXT; typedef VkPhysicalDeviceToolProperties VkPhysicalDeviceToolPropertiesEXT; typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceToolPropertiesEXT)(VkPhysicalDevice physicalDevice, uint32_t* pToolCount, VkPhysicalDeviceToolProperties* pToolProperties); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceToolPropertiesEXT( VkPhysicalDevice physicalDevice, uint32_t* pToolCount, VkPhysicalDeviceToolProperties* pToolProperties); #endif // VK_EXT_separate_stencil_usage is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_separate_stencil_usage 1 #define VK_EXT_SEPARATE_STENCIL_USAGE_SPEC_VERSION 1 #define VK_EXT_SEPARATE_STENCIL_USAGE_EXTENSION_NAME "VK_EXT_separate_stencil_usage" typedef VkImageStencilUsageCreateInfo VkImageStencilUsageCreateInfoEXT; // VK_EXT_validation_features is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_validation_features 1 #define VK_EXT_VALIDATION_FEATURES_SPEC_VERSION 6 #define VK_EXT_VALIDATION_FEATURES_EXTENSION_NAME "VK_EXT_validation_features" typedef enum VkValidationFeatureEnableEXT { VK_VALIDATION_FEATURE_ENABLE_GPU_ASSISTED_EXT = 0, VK_VALIDATION_FEATURE_ENABLE_GPU_ASSISTED_RESERVE_BINDING_SLOT_EXT = 1, VK_VALIDATION_FEATURE_ENABLE_BEST_PRACTICES_EXT = 2, VK_VALIDATION_FEATURE_ENABLE_DEBUG_PRINTF_EXT = 3, VK_VALIDATION_FEATURE_ENABLE_SYNCHRONIZATION_VALIDATION_EXT = 4, VK_VALIDATION_FEATURE_ENABLE_MAX_ENUM_EXT = 0x7FFFFFFF } VkValidationFeatureEnableEXT; typedef enum VkValidationFeatureDisableEXT { VK_VALIDATION_FEATURE_DISABLE_ALL_EXT = 0, VK_VALIDATION_FEATURE_DISABLE_SHADERS_EXT = 1, VK_VALIDATION_FEATURE_DISABLE_THREAD_SAFETY_EXT = 2, VK_VALIDATION_FEATURE_DISABLE_API_PARAMETERS_EXT = 3, VK_VALIDATION_FEATURE_DISABLE_OBJECT_LIFETIMES_EXT = 4, VK_VALIDATION_FEATURE_DISABLE_CORE_CHECKS_EXT = 5, VK_VALIDATION_FEATURE_DISABLE_UNIQUE_HANDLES_EXT = 6, VK_VALIDATION_FEATURE_DISABLE_SHADER_VALIDATION_CACHE_EXT = 7, VK_VALIDATION_FEATURE_DISABLE_MAX_ENUM_EXT = 0x7FFFFFFF } VkValidationFeatureDisableEXT; typedef struct VkValidationFeaturesEXT { VkStructureType sType; const void* pNext; uint32_t enabledValidationFeatureCount; const VkValidationFeatureEnableEXT* pEnabledValidationFeatures; uint32_t disabledValidationFeatureCount; const VkValidationFeatureDisableEXT* pDisabledValidationFeatures; } VkValidationFeaturesEXT; // VK_NV_cooperative_matrix is a preprocessor guard. Do not pass it to API calls. #define VK_NV_cooperative_matrix 1 #define VK_NV_COOPERATIVE_MATRIX_SPEC_VERSION 1 #define VK_NV_COOPERATIVE_MATRIX_EXTENSION_NAME "VK_NV_cooperative_matrix" typedef VkComponentTypeKHR VkComponentTypeNV; typedef VkScopeKHR VkScopeNV; typedef struct VkCooperativeMatrixPropertiesNV { VkStructureType sType; void* pNext; uint32_t MSize; uint32_t NSize; uint32_t KSize; VkComponentTypeNV AType; VkComponentTypeNV BType; VkComponentTypeNV CType; VkComponentTypeNV DType; VkScopeNV scope; } VkCooperativeMatrixPropertiesNV; typedef struct VkPhysicalDeviceCooperativeMatrixFeaturesNV { VkStructureType sType; void* pNext; VkBool32 cooperativeMatrix; VkBool32 cooperativeMatrixRobustBufferAccess; } VkPhysicalDeviceCooperativeMatrixFeaturesNV; typedef struct VkPhysicalDeviceCooperativeMatrixPropertiesNV { VkStructureType sType; void* pNext; VkShaderStageFlags cooperativeMatrixSupportedStages; } VkPhysicalDeviceCooperativeMatrixPropertiesNV; typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceCooperativeMatrixPropertiesNV)(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkCooperativeMatrixPropertiesNV* pProperties); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceCooperativeMatrixPropertiesNV( VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkCooperativeMatrixPropertiesNV* pProperties); #endif // VK_NV_coverage_reduction_mode is a preprocessor guard. Do not pass it to API calls. #define VK_NV_coverage_reduction_mode 1 #define VK_NV_COVERAGE_REDUCTION_MODE_SPEC_VERSION 1 #define VK_NV_COVERAGE_REDUCTION_MODE_EXTENSION_NAME "VK_NV_coverage_reduction_mode" typedef enum VkCoverageReductionModeNV { VK_COVERAGE_REDUCTION_MODE_MERGE_NV = 0, VK_COVERAGE_REDUCTION_MODE_TRUNCATE_NV = 1, VK_COVERAGE_REDUCTION_MODE_MAX_ENUM_NV = 0x7FFFFFFF } VkCoverageReductionModeNV; typedef VkFlags VkPipelineCoverageReductionStateCreateFlagsNV; typedef struct VkPhysicalDeviceCoverageReductionModeFeaturesNV { VkStructureType sType; void* pNext; VkBool32 coverageReductionMode; } VkPhysicalDeviceCoverageReductionModeFeaturesNV; typedef struct VkPipelineCoverageReductionStateCreateInfoNV { VkStructureType sType; const void* pNext; VkPipelineCoverageReductionStateCreateFlagsNV flags; VkCoverageReductionModeNV coverageReductionMode; } VkPipelineCoverageReductionStateCreateInfoNV; typedef struct VkFramebufferMixedSamplesCombinationNV { VkStructureType sType; void* pNext; VkCoverageReductionModeNV coverageReductionMode; VkSampleCountFlagBits rasterizationSamples; VkSampleCountFlags depthStencilSamples; VkSampleCountFlags colorSamples; } VkFramebufferMixedSamplesCombinationNV; typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV)(VkPhysicalDevice physicalDevice, uint32_t* pCombinationCount, VkFramebufferMixedSamplesCombinationNV* pCombinations); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV( VkPhysicalDevice physicalDevice, uint32_t* pCombinationCount, VkFramebufferMixedSamplesCombinationNV* pCombinations); #endif // VK_EXT_fragment_shader_interlock is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_fragment_shader_interlock 1 #define VK_EXT_FRAGMENT_SHADER_INTERLOCK_SPEC_VERSION 1 #define VK_EXT_FRAGMENT_SHADER_INTERLOCK_EXTENSION_NAME "VK_EXT_fragment_shader_interlock" typedef struct VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT { VkStructureType sType; void* pNext; VkBool32 fragmentShaderSampleInterlock; VkBool32 fragmentShaderPixelInterlock; VkBool32 fragmentShaderShadingRateInterlock; } VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT; // VK_EXT_ycbcr_image_arrays is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_ycbcr_image_arrays 1 #define VK_EXT_YCBCR_IMAGE_ARRAYS_SPEC_VERSION 1 #define VK_EXT_YCBCR_IMAGE_ARRAYS_EXTENSION_NAME "VK_EXT_ycbcr_image_arrays" typedef struct VkPhysicalDeviceYcbcrImageArraysFeaturesEXT { VkStructureType sType; void* pNext; VkBool32 ycbcrImageArrays; } VkPhysicalDeviceYcbcrImageArraysFeaturesEXT; // VK_EXT_provoking_vertex is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_provoking_vertex 1 #define VK_EXT_PROVOKING_VERTEX_SPEC_VERSION 1 #define VK_EXT_PROVOKING_VERTEX_EXTENSION_NAME "VK_EXT_provoking_vertex" typedef enum VkProvokingVertexModeEXT { VK_PROVOKING_VERTEX_MODE_FIRST_VERTEX_EXT = 0, VK_PROVOKING_VERTEX_MODE_LAST_VERTEX_EXT = 1, VK_PROVOKING_VERTEX_MODE_MAX_ENUM_EXT = 0x7FFFFFFF } VkProvokingVertexModeEXT; typedef struct VkPhysicalDeviceProvokingVertexFeaturesEXT { VkStructureType sType; void* pNext; VkBool32 provokingVertexLast; VkBool32 transformFeedbackPreservesProvokingVertex; } VkPhysicalDeviceProvokingVertexFeaturesEXT; typedef struct VkPhysicalDeviceProvokingVertexPropertiesEXT { VkStructureType sType; void* pNext; VkBool32 provokingVertexModePerPipeline; VkBool32 transformFeedbackPreservesTriangleFanProvokingVertex; } VkPhysicalDeviceProvokingVertexPropertiesEXT; typedef struct VkPipelineRasterizationProvokingVertexStateCreateInfoEXT { VkStructureType sType; const void* pNext; VkProvokingVertexModeEXT provokingVertexMode; } VkPipelineRasterizationProvokingVertexStateCreateInfoEXT; // VK_EXT_headless_surface is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_headless_surface 1 #define VK_EXT_HEADLESS_SURFACE_SPEC_VERSION 1 #define VK_EXT_HEADLESS_SURFACE_EXTENSION_NAME "VK_EXT_headless_surface" typedef VkFlags VkHeadlessSurfaceCreateFlagsEXT; typedef struct VkHeadlessSurfaceCreateInfoEXT { VkStructureType sType; const void* pNext; VkHeadlessSurfaceCreateFlagsEXT flags; } VkHeadlessSurfaceCreateInfoEXT; typedef VkResult (VKAPI_PTR *PFN_vkCreateHeadlessSurfaceEXT)(VkInstance instance, const VkHeadlessSurfaceCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkCreateHeadlessSurfaceEXT( VkInstance instance, const VkHeadlessSurfaceCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); #endif // VK_EXT_line_rasterization is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_line_rasterization 1 #define VK_EXT_LINE_RASTERIZATION_SPEC_VERSION 1 #define VK_EXT_LINE_RASTERIZATION_EXTENSION_NAME "VK_EXT_line_rasterization" typedef VkLineRasterizationMode VkLineRasterizationModeEXT; typedef VkPhysicalDeviceLineRasterizationFeatures VkPhysicalDeviceLineRasterizationFeaturesEXT; typedef VkPhysicalDeviceLineRasterizationProperties VkPhysicalDeviceLineRasterizationPropertiesEXT; typedef VkPipelineRasterizationLineStateCreateInfo VkPipelineRasterizationLineStateCreateInfoEXT; typedef void (VKAPI_PTR *PFN_vkCmdSetLineStippleEXT)(VkCommandBuffer commandBuffer, uint32_t lineStippleFactor, uint16_t lineStipplePattern); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR void VKAPI_CALL vkCmdSetLineStippleEXT( VkCommandBuffer commandBuffer, uint32_t lineStippleFactor, uint16_t lineStipplePattern); #endif // VK_EXT_shader_atomic_float is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_shader_atomic_float 1 #define VK_EXT_SHADER_ATOMIC_FLOAT_SPEC_VERSION 1 #define VK_EXT_SHADER_ATOMIC_FLOAT_EXTENSION_NAME "VK_EXT_shader_atomic_float" typedef struct VkPhysicalDeviceShaderAtomicFloatFeaturesEXT { VkStructureType sType; void* pNext; VkBool32 shaderBufferFloat32Atomics; VkBool32 shaderBufferFloat32AtomicAdd; VkBool32 shaderBufferFloat64Atomics; VkBool32 shaderBufferFloat64AtomicAdd; VkBool32 shaderSharedFloat32Atomics; VkBool32 shaderSharedFloat32AtomicAdd; VkBool32 shaderSharedFloat64Atomics; VkBool32 shaderSharedFloat64AtomicAdd; VkBool32 shaderImageFloat32Atomics; VkBool32 shaderImageFloat32AtomicAdd; VkBool32 sparseImageFloat32Atomics; VkBool32 sparseImageFloat32AtomicAdd; } VkPhysicalDeviceShaderAtomicFloatFeaturesEXT; // VK_EXT_host_query_reset is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_host_query_reset 1 #define VK_EXT_HOST_QUERY_RESET_SPEC_VERSION 1 #define VK_EXT_HOST_QUERY_RESET_EXTENSION_NAME "VK_EXT_host_query_reset" typedef VkPhysicalDeviceHostQueryResetFeatures VkPhysicalDeviceHostQueryResetFeaturesEXT; typedef void (VKAPI_PTR *PFN_vkResetQueryPoolEXT)(VkDevice device, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR void VKAPI_CALL vkResetQueryPoolEXT( VkDevice device, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount); #endif // VK_EXT_index_type_uint8 is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_index_type_uint8 1 #define VK_EXT_INDEX_TYPE_UINT8_SPEC_VERSION 1 #define VK_EXT_INDEX_TYPE_UINT8_EXTENSION_NAME "VK_EXT_index_type_uint8" typedef VkPhysicalDeviceIndexTypeUint8Features VkPhysicalDeviceIndexTypeUint8FeaturesEXT; // VK_EXT_extended_dynamic_state is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_extended_dynamic_state 1 #define VK_EXT_EXTENDED_DYNAMIC_STATE_SPEC_VERSION 1 #define VK_EXT_EXTENDED_DYNAMIC_STATE_EXTENSION_NAME "VK_EXT_extended_dynamic_state" typedef struct VkPhysicalDeviceExtendedDynamicStateFeaturesEXT { VkStructureType sType; void* pNext; VkBool32 extendedDynamicState; } VkPhysicalDeviceExtendedDynamicStateFeaturesEXT; typedef void (VKAPI_PTR *PFN_vkCmdSetCullModeEXT)(VkCommandBuffer commandBuffer, VkCullModeFlags cullMode); typedef void (VKAPI_PTR *PFN_vkCmdSetFrontFaceEXT)(VkCommandBuffer commandBuffer, VkFrontFace frontFace); typedef void (VKAPI_PTR *PFN_vkCmdSetPrimitiveTopologyEXT)(VkCommandBuffer commandBuffer, VkPrimitiveTopology primitiveTopology); typedef void (VKAPI_PTR *PFN_vkCmdSetViewportWithCountEXT)(VkCommandBuffer commandBuffer, uint32_t viewportCount, const VkViewport* pViewports); typedef void (VKAPI_PTR *PFN_vkCmdSetScissorWithCountEXT)(VkCommandBuffer commandBuffer, uint32_t scissorCount, const VkRect2D* pScissors); typedef void (VKAPI_PTR *PFN_vkCmdBindVertexBuffers2EXT)(VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, const VkBuffer* pBuffers, const VkDeviceSize* pOffsets, const VkDeviceSize* pSizes, const VkDeviceSize* pStrides); typedef void (VKAPI_PTR *PFN_vkCmdSetDepthTestEnableEXT)(VkCommandBuffer commandBuffer, VkBool32 depthTestEnable); typedef void (VKAPI_PTR *PFN_vkCmdSetDepthWriteEnableEXT)(VkCommandBuffer commandBuffer, VkBool32 depthWriteEnable); typedef void (VKAPI_PTR *PFN_vkCmdSetDepthCompareOpEXT)(VkCommandBuffer commandBuffer, VkCompareOp depthCompareOp); typedef void (VKAPI_PTR *PFN_vkCmdSetDepthBoundsTestEnableEXT)(VkCommandBuffer commandBuffer, VkBool32 depthBoundsTestEnable); typedef void (VKAPI_PTR *PFN_vkCmdSetStencilTestEnableEXT)(VkCommandBuffer commandBuffer, VkBool32 stencilTestEnable); typedef void (VKAPI_PTR *PFN_vkCmdSetStencilOpEXT)(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, VkStencilOp failOp, VkStencilOp passOp, VkStencilOp depthFailOp, VkCompareOp compareOp); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR void VKAPI_CALL vkCmdSetCullModeEXT( VkCommandBuffer commandBuffer, VkCullModeFlags cullMode); VKAPI_ATTR void VKAPI_CALL vkCmdSetFrontFaceEXT( VkCommandBuffer commandBuffer, VkFrontFace frontFace); VKAPI_ATTR void VKAPI_CALL vkCmdSetPrimitiveTopologyEXT( VkCommandBuffer commandBuffer, VkPrimitiveTopology primitiveTopology); VKAPI_ATTR void VKAPI_CALL vkCmdSetViewportWithCountEXT( VkCommandBuffer commandBuffer, uint32_t viewportCount, const VkViewport* pViewports); VKAPI_ATTR void VKAPI_CALL vkCmdSetScissorWithCountEXT( VkCommandBuffer commandBuffer, uint32_t scissorCount, const VkRect2D* pScissors); VKAPI_ATTR void VKAPI_CALL vkCmdBindVertexBuffers2EXT( VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, const VkBuffer* pBuffers, const VkDeviceSize* pOffsets, const VkDeviceSize* pSizes, const VkDeviceSize* pStrides); VKAPI_ATTR void VKAPI_CALL vkCmdSetDepthTestEnableEXT( VkCommandBuffer commandBuffer, VkBool32 depthTestEnable); VKAPI_ATTR void VKAPI_CALL vkCmdSetDepthWriteEnableEXT( VkCommandBuffer commandBuffer, VkBool32 depthWriteEnable); VKAPI_ATTR void VKAPI_CALL vkCmdSetDepthCompareOpEXT( VkCommandBuffer commandBuffer, VkCompareOp depthCompareOp); VKAPI_ATTR void VKAPI_CALL vkCmdSetDepthBoundsTestEnableEXT( VkCommandBuffer commandBuffer, VkBool32 depthBoundsTestEnable); VKAPI_ATTR void VKAPI_CALL vkCmdSetStencilTestEnableEXT( VkCommandBuffer commandBuffer, VkBool32 stencilTestEnable); VKAPI_ATTR void VKAPI_CALL vkCmdSetStencilOpEXT( VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, VkStencilOp failOp, VkStencilOp passOp, VkStencilOp depthFailOp, VkCompareOp compareOp); #endif // VK_EXT_host_image_copy is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_host_image_copy 1 #define VK_EXT_HOST_IMAGE_COPY_SPEC_VERSION 1 #define VK_EXT_HOST_IMAGE_COPY_EXTENSION_NAME "VK_EXT_host_image_copy" typedef VkHostImageCopyFlagBits VkHostImageCopyFlagBitsEXT; typedef VkHostImageCopyFlags VkHostImageCopyFlagsEXT; typedef VkPhysicalDeviceHostImageCopyFeatures VkPhysicalDeviceHostImageCopyFeaturesEXT; typedef VkPhysicalDeviceHostImageCopyProperties VkPhysicalDeviceHostImageCopyPropertiesEXT; typedef VkMemoryToImageCopy VkMemoryToImageCopyEXT; typedef VkImageToMemoryCopy VkImageToMemoryCopyEXT; typedef VkCopyMemoryToImageInfo VkCopyMemoryToImageInfoEXT; typedef VkCopyImageToMemoryInfo VkCopyImageToMemoryInfoEXT; typedef VkCopyImageToImageInfo VkCopyImageToImageInfoEXT; typedef VkHostImageLayoutTransitionInfo VkHostImageLayoutTransitionInfoEXT; typedef VkSubresourceHostMemcpySize VkSubresourceHostMemcpySizeEXT; typedef VkHostImageCopyDevicePerformanceQuery VkHostImageCopyDevicePerformanceQueryEXT; typedef VkSubresourceLayout2 VkSubresourceLayout2EXT; typedef VkImageSubresource2 VkImageSubresource2EXT; typedef VkResult (VKAPI_PTR *PFN_vkCopyMemoryToImageEXT)(VkDevice device, const VkCopyMemoryToImageInfo* pCopyMemoryToImageInfo); typedef VkResult (VKAPI_PTR *PFN_vkCopyImageToMemoryEXT)(VkDevice device, const VkCopyImageToMemoryInfo* pCopyImageToMemoryInfo); typedef VkResult (VKAPI_PTR *PFN_vkCopyImageToImageEXT)(VkDevice device, const VkCopyImageToImageInfo* pCopyImageToImageInfo); typedef VkResult (VKAPI_PTR *PFN_vkTransitionImageLayoutEXT)(VkDevice device, uint32_t transitionCount, const VkHostImageLayoutTransitionInfo* pTransitions); typedef void (VKAPI_PTR *PFN_vkGetImageSubresourceLayout2EXT)(VkDevice device, VkImage image, const VkImageSubresource2* pSubresource, VkSubresourceLayout2* pLayout); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkCopyMemoryToImageEXT( VkDevice device, const VkCopyMemoryToImageInfo* pCopyMemoryToImageInfo); VKAPI_ATTR VkResult VKAPI_CALL vkCopyImageToMemoryEXT( VkDevice device, const VkCopyImageToMemoryInfo* pCopyImageToMemoryInfo); VKAPI_ATTR VkResult VKAPI_CALL vkCopyImageToImageEXT( VkDevice device, const VkCopyImageToImageInfo* pCopyImageToImageInfo); VKAPI_ATTR VkResult VKAPI_CALL vkTransitionImageLayoutEXT( VkDevice device, uint32_t transitionCount, const VkHostImageLayoutTransitionInfo* pTransitions); VKAPI_ATTR void VKAPI_CALL vkGetImageSubresourceLayout2EXT( VkDevice device, VkImage image, const VkImageSubresource2* pSubresource, VkSubresourceLayout2* pLayout); #endif // VK_EXT_map_memory_placed is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_map_memory_placed 1 #define VK_EXT_MAP_MEMORY_PLACED_SPEC_VERSION 1 #define VK_EXT_MAP_MEMORY_PLACED_EXTENSION_NAME "VK_EXT_map_memory_placed" typedef struct VkPhysicalDeviceMapMemoryPlacedFeaturesEXT { VkStructureType sType; void* pNext; VkBool32 memoryMapPlaced; VkBool32 memoryMapRangePlaced; VkBool32 memoryUnmapReserve; } VkPhysicalDeviceMapMemoryPlacedFeaturesEXT; typedef struct VkPhysicalDeviceMapMemoryPlacedPropertiesEXT { VkStructureType sType; void* pNext; VkDeviceSize minPlacedMemoryMapAlignment; } VkPhysicalDeviceMapMemoryPlacedPropertiesEXT; typedef struct VkMemoryMapPlacedInfoEXT { VkStructureType sType; const void* pNext; void* pPlacedAddress; } VkMemoryMapPlacedInfoEXT; // VK_EXT_shader_atomic_float2 is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_shader_atomic_float2 1 #define VK_EXT_SHADER_ATOMIC_FLOAT_2_SPEC_VERSION 1 #define VK_EXT_SHADER_ATOMIC_FLOAT_2_EXTENSION_NAME "VK_EXT_shader_atomic_float2" typedef struct VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT { VkStructureType sType; void* pNext; VkBool32 shaderBufferFloat16Atomics; VkBool32 shaderBufferFloat16AtomicAdd; VkBool32 shaderBufferFloat16AtomicMinMax; VkBool32 shaderBufferFloat32AtomicMinMax; VkBool32 shaderBufferFloat64AtomicMinMax; VkBool32 shaderSharedFloat16Atomics; VkBool32 shaderSharedFloat16AtomicAdd; VkBool32 shaderSharedFloat16AtomicMinMax; VkBool32 shaderSharedFloat32AtomicMinMax; VkBool32 shaderSharedFloat64AtomicMinMax; VkBool32 shaderImageFloat32AtomicMinMax; VkBool32 sparseImageFloat32AtomicMinMax; } VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT; // VK_EXT_surface_maintenance1 is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_surface_maintenance1 1 #define VK_EXT_SURFACE_MAINTENANCE_1_SPEC_VERSION 1 #define VK_EXT_SURFACE_MAINTENANCE_1_EXTENSION_NAME "VK_EXT_surface_maintenance1" typedef enum VkPresentScalingFlagBitsEXT { VK_PRESENT_SCALING_ONE_TO_ONE_BIT_EXT = 0x00000001, VK_PRESENT_SCALING_ASPECT_RATIO_STRETCH_BIT_EXT = 0x00000002, VK_PRESENT_SCALING_STRETCH_BIT_EXT = 0x00000004, VK_PRESENT_SCALING_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF } VkPresentScalingFlagBitsEXT; typedef VkFlags VkPresentScalingFlagsEXT; typedef enum VkPresentGravityFlagBitsEXT { VK_PRESENT_GRAVITY_MIN_BIT_EXT = 0x00000001, VK_PRESENT_GRAVITY_MAX_BIT_EXT = 0x00000002, VK_PRESENT_GRAVITY_CENTERED_BIT_EXT = 0x00000004, VK_PRESENT_GRAVITY_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF } VkPresentGravityFlagBitsEXT; typedef VkFlags VkPresentGravityFlagsEXT; typedef struct VkSurfacePresentModeEXT { VkStructureType sType; void* pNext; VkPresentModeKHR presentMode; } VkSurfacePresentModeEXT; typedef struct VkSurfacePresentScalingCapabilitiesEXT { VkStructureType sType; void* pNext; VkPresentScalingFlagsEXT supportedPresentScaling; VkPresentGravityFlagsEXT supportedPresentGravityX; VkPresentGravityFlagsEXT supportedPresentGravityY; VkExtent2D minScaledImageExtent; VkExtent2D maxScaledImageExtent; } VkSurfacePresentScalingCapabilitiesEXT; typedef struct VkSurfacePresentModeCompatibilityEXT { VkStructureType sType; void* pNext; uint32_t presentModeCount; VkPresentModeKHR* pPresentModes; } VkSurfacePresentModeCompatibilityEXT; // VK_EXT_swapchain_maintenance1 is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_swapchain_maintenance1 1 #define VK_EXT_SWAPCHAIN_MAINTENANCE_1_SPEC_VERSION 1 #define VK_EXT_SWAPCHAIN_MAINTENANCE_1_EXTENSION_NAME "VK_EXT_swapchain_maintenance1" typedef struct VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT { VkStructureType sType; void* pNext; VkBool32 swapchainMaintenance1; } VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT; typedef struct VkSwapchainPresentFenceInfoEXT { VkStructureType sType; const void* pNext; uint32_t swapchainCount; const VkFence* pFences; } VkSwapchainPresentFenceInfoEXT; typedef struct VkSwapchainPresentModesCreateInfoEXT { VkStructureType sType; const void* pNext; uint32_t presentModeCount; const VkPresentModeKHR* pPresentModes; } VkSwapchainPresentModesCreateInfoEXT; typedef struct VkSwapchainPresentModeInfoEXT { VkStructureType sType; const void* pNext; uint32_t swapchainCount; const VkPresentModeKHR* pPresentModes; } VkSwapchainPresentModeInfoEXT; typedef struct VkSwapchainPresentScalingCreateInfoEXT { VkStructureType sType; const void* pNext; VkPresentScalingFlagsEXT scalingBehavior; VkPresentGravityFlagsEXT presentGravityX; VkPresentGravityFlagsEXT presentGravityY; } VkSwapchainPresentScalingCreateInfoEXT; typedef struct VkReleaseSwapchainImagesInfoEXT { VkStructureType sType; const void* pNext; VkSwapchainKHR swapchain; uint32_t imageIndexCount; const uint32_t* pImageIndices; } VkReleaseSwapchainImagesInfoEXT; typedef VkResult (VKAPI_PTR *PFN_vkReleaseSwapchainImagesEXT)(VkDevice device, const VkReleaseSwapchainImagesInfoEXT* pReleaseInfo); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkReleaseSwapchainImagesEXT( VkDevice device, const VkReleaseSwapchainImagesInfoEXT* pReleaseInfo); #endif // VK_EXT_shader_demote_to_helper_invocation is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_shader_demote_to_helper_invocation 1 #define VK_EXT_SHADER_DEMOTE_TO_HELPER_INVOCATION_SPEC_VERSION 1 #define VK_EXT_SHADER_DEMOTE_TO_HELPER_INVOCATION_EXTENSION_NAME "VK_EXT_shader_demote_to_helper_invocation" typedef VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures VkPhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT; // VK_NV_device_generated_commands is a preprocessor guard. Do not pass it to API calls. #define VK_NV_device_generated_commands 1 VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkIndirectCommandsLayoutNV) #define VK_NV_DEVICE_GENERATED_COMMANDS_SPEC_VERSION 3 #define VK_NV_DEVICE_GENERATED_COMMANDS_EXTENSION_NAME "VK_NV_device_generated_commands" typedef enum VkIndirectCommandsTokenTypeNV { VK_INDIRECT_COMMANDS_TOKEN_TYPE_SHADER_GROUP_NV = 0, VK_INDIRECT_COMMANDS_TOKEN_TYPE_STATE_FLAGS_NV = 1, VK_INDIRECT_COMMANDS_TOKEN_TYPE_INDEX_BUFFER_NV = 2, VK_INDIRECT_COMMANDS_TOKEN_TYPE_VERTEX_BUFFER_NV = 3, VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_NV = 4, VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_INDEXED_NV = 5, VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_NV = 6, VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_TASKS_NV = 7, VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_MESH_TASKS_NV = 1000328000, VK_INDIRECT_COMMANDS_TOKEN_TYPE_PIPELINE_NV = 1000428003, VK_INDIRECT_COMMANDS_TOKEN_TYPE_DISPATCH_NV = 1000428004, VK_INDIRECT_COMMANDS_TOKEN_TYPE_MAX_ENUM_NV = 0x7FFFFFFF } VkIndirectCommandsTokenTypeNV; typedef enum VkIndirectStateFlagBitsNV { VK_INDIRECT_STATE_FLAG_FRONTFACE_BIT_NV = 0x00000001, VK_INDIRECT_STATE_FLAG_BITS_MAX_ENUM_NV = 0x7FFFFFFF } VkIndirectStateFlagBitsNV; typedef VkFlags VkIndirectStateFlagsNV; typedef enum VkIndirectCommandsLayoutUsageFlagBitsNV { VK_INDIRECT_COMMANDS_LAYOUT_USAGE_EXPLICIT_PREPROCESS_BIT_NV = 0x00000001, VK_INDIRECT_COMMANDS_LAYOUT_USAGE_INDEXED_SEQUENCES_BIT_NV = 0x00000002, VK_INDIRECT_COMMANDS_LAYOUT_USAGE_UNORDERED_SEQUENCES_BIT_NV = 0x00000004, VK_INDIRECT_COMMANDS_LAYOUT_USAGE_FLAG_BITS_MAX_ENUM_NV = 0x7FFFFFFF } VkIndirectCommandsLayoutUsageFlagBitsNV; typedef VkFlags VkIndirectCommandsLayoutUsageFlagsNV; typedef struct VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV { VkStructureType sType; void* pNext; uint32_t maxGraphicsShaderGroupCount; uint32_t maxIndirectSequenceCount; uint32_t maxIndirectCommandsTokenCount; uint32_t maxIndirectCommandsStreamCount; uint32_t maxIndirectCommandsTokenOffset; uint32_t maxIndirectCommandsStreamStride; uint32_t minSequencesCountBufferOffsetAlignment; uint32_t minSequencesIndexBufferOffsetAlignment; uint32_t minIndirectCommandsBufferOffsetAlignment; } VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV; typedef struct VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV { VkStructureType sType; void* pNext; VkBool32 deviceGeneratedCommands; } VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV; typedef struct VkGraphicsShaderGroupCreateInfoNV { VkStructureType sType; const void* pNext; uint32_t stageCount; const VkPipelineShaderStageCreateInfo* pStages; const VkPipelineVertexInputStateCreateInfo* pVertexInputState; const VkPipelineTessellationStateCreateInfo* pTessellationState; } VkGraphicsShaderGroupCreateInfoNV; typedef struct VkGraphicsPipelineShaderGroupsCreateInfoNV { VkStructureType sType; const void* pNext; uint32_t groupCount; const VkGraphicsShaderGroupCreateInfoNV* pGroups; uint32_t pipelineCount; const VkPipeline* pPipelines; } VkGraphicsPipelineShaderGroupsCreateInfoNV; typedef struct VkBindShaderGroupIndirectCommandNV { uint32_t groupIndex; } VkBindShaderGroupIndirectCommandNV; typedef struct VkBindIndexBufferIndirectCommandNV { VkDeviceAddress bufferAddress; uint32_t size; VkIndexType indexType; } VkBindIndexBufferIndirectCommandNV; typedef struct VkBindVertexBufferIndirectCommandNV { VkDeviceAddress bufferAddress; uint32_t size; uint32_t stride; } VkBindVertexBufferIndirectCommandNV; typedef struct VkSetStateFlagsIndirectCommandNV { uint32_t data; } VkSetStateFlagsIndirectCommandNV; typedef struct VkIndirectCommandsStreamNV { VkBuffer buffer; VkDeviceSize offset; } VkIndirectCommandsStreamNV; typedef struct VkIndirectCommandsLayoutTokenNV { VkStructureType sType; const void* pNext; VkIndirectCommandsTokenTypeNV tokenType; uint32_t stream; uint32_t offset; uint32_t vertexBindingUnit; VkBool32 vertexDynamicStride; VkPipelineLayout pushconstantPipelineLayout; VkShaderStageFlags pushconstantShaderStageFlags; uint32_t pushconstantOffset; uint32_t pushconstantSize; VkIndirectStateFlagsNV indirectStateFlags; uint32_t indexTypeCount; const VkIndexType* pIndexTypes; const uint32_t* pIndexTypeValues; } VkIndirectCommandsLayoutTokenNV; typedef struct VkIndirectCommandsLayoutCreateInfoNV { VkStructureType sType; const void* pNext; VkIndirectCommandsLayoutUsageFlagsNV flags; VkPipelineBindPoint pipelineBindPoint; uint32_t tokenCount; const VkIndirectCommandsLayoutTokenNV* pTokens; uint32_t streamCount; const uint32_t* pStreamStrides; } VkIndirectCommandsLayoutCreateInfoNV; typedef struct VkGeneratedCommandsInfoNV { VkStructureType sType; const void* pNext; VkPipelineBindPoint pipelineBindPoint; VkPipeline pipeline; VkIndirectCommandsLayoutNV indirectCommandsLayout; uint32_t streamCount; const VkIndirectCommandsStreamNV* pStreams; uint32_t sequencesCount; VkBuffer preprocessBuffer; VkDeviceSize preprocessOffset; VkDeviceSize preprocessSize; VkBuffer sequencesCountBuffer; VkDeviceSize sequencesCountOffset; VkBuffer sequencesIndexBuffer; VkDeviceSize sequencesIndexOffset; } VkGeneratedCommandsInfoNV; typedef struct VkGeneratedCommandsMemoryRequirementsInfoNV { VkStructureType sType; const void* pNext; VkPipelineBindPoint pipelineBindPoint; VkPipeline pipeline; VkIndirectCommandsLayoutNV indirectCommandsLayout; uint32_t maxSequencesCount; } VkGeneratedCommandsMemoryRequirementsInfoNV; typedef void (VKAPI_PTR *PFN_vkGetGeneratedCommandsMemoryRequirementsNV)(VkDevice device, const VkGeneratedCommandsMemoryRequirementsInfoNV* pInfo, VkMemoryRequirements2* pMemoryRequirements); typedef void (VKAPI_PTR *PFN_vkCmdPreprocessGeneratedCommandsNV)(VkCommandBuffer commandBuffer, const VkGeneratedCommandsInfoNV* pGeneratedCommandsInfo); typedef void (VKAPI_PTR *PFN_vkCmdExecuteGeneratedCommandsNV)(VkCommandBuffer commandBuffer, VkBool32 isPreprocessed, const VkGeneratedCommandsInfoNV* pGeneratedCommandsInfo); typedef void (VKAPI_PTR *PFN_vkCmdBindPipelineShaderGroupNV)(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline, uint32_t groupIndex); typedef VkResult (VKAPI_PTR *PFN_vkCreateIndirectCommandsLayoutNV)(VkDevice device, const VkIndirectCommandsLayoutCreateInfoNV* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkIndirectCommandsLayoutNV* pIndirectCommandsLayout); typedef void (VKAPI_PTR *PFN_vkDestroyIndirectCommandsLayoutNV)(VkDevice device, VkIndirectCommandsLayoutNV indirectCommandsLayout, const VkAllocationCallbacks* pAllocator); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR void VKAPI_CALL vkGetGeneratedCommandsMemoryRequirementsNV( VkDevice device, const VkGeneratedCommandsMemoryRequirementsInfoNV* pInfo, VkMemoryRequirements2* pMemoryRequirements); VKAPI_ATTR void VKAPI_CALL vkCmdPreprocessGeneratedCommandsNV( VkCommandBuffer commandBuffer, const VkGeneratedCommandsInfoNV* pGeneratedCommandsInfo); VKAPI_ATTR void VKAPI_CALL vkCmdExecuteGeneratedCommandsNV( VkCommandBuffer commandBuffer, VkBool32 isPreprocessed, const VkGeneratedCommandsInfoNV* pGeneratedCommandsInfo); VKAPI_ATTR void VKAPI_CALL vkCmdBindPipelineShaderGroupNV( VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline, uint32_t groupIndex); VKAPI_ATTR VkResult VKAPI_CALL vkCreateIndirectCommandsLayoutNV( VkDevice device, const VkIndirectCommandsLayoutCreateInfoNV* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkIndirectCommandsLayoutNV* pIndirectCommandsLayout); VKAPI_ATTR void VKAPI_CALL vkDestroyIndirectCommandsLayoutNV( VkDevice device, VkIndirectCommandsLayoutNV indirectCommandsLayout, const VkAllocationCallbacks* pAllocator); #endif // VK_NV_inherited_viewport_scissor is a preprocessor guard. Do not pass it to API calls. #define VK_NV_inherited_viewport_scissor 1 #define VK_NV_INHERITED_VIEWPORT_SCISSOR_SPEC_VERSION 1 #define VK_NV_INHERITED_VIEWPORT_SCISSOR_EXTENSION_NAME "VK_NV_inherited_viewport_scissor" typedef struct VkPhysicalDeviceInheritedViewportScissorFeaturesNV { VkStructureType sType; void* pNext; VkBool32 inheritedViewportScissor2D; } VkPhysicalDeviceInheritedViewportScissorFeaturesNV; typedef struct VkCommandBufferInheritanceViewportScissorInfoNV { VkStructureType sType; const void* pNext; VkBool32 viewportScissor2D; uint32_t viewportDepthCount; const VkViewport* pViewportDepths; } VkCommandBufferInheritanceViewportScissorInfoNV; // VK_EXT_texel_buffer_alignment is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_texel_buffer_alignment 1 #define VK_EXT_TEXEL_BUFFER_ALIGNMENT_SPEC_VERSION 1 #define VK_EXT_TEXEL_BUFFER_ALIGNMENT_EXTENSION_NAME "VK_EXT_texel_buffer_alignment" typedef struct VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT { VkStructureType sType; void* pNext; VkBool32 texelBufferAlignment; } VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT; typedef VkPhysicalDeviceTexelBufferAlignmentProperties VkPhysicalDeviceTexelBufferAlignmentPropertiesEXT; // VK_QCOM_render_pass_transform is a preprocessor guard. Do not pass it to API calls. #define VK_QCOM_render_pass_transform 1 #define VK_QCOM_RENDER_PASS_TRANSFORM_SPEC_VERSION 4 #define VK_QCOM_RENDER_PASS_TRANSFORM_EXTENSION_NAME "VK_QCOM_render_pass_transform" typedef struct VkRenderPassTransformBeginInfoQCOM { VkStructureType sType; void* pNext; VkSurfaceTransformFlagBitsKHR transform; } VkRenderPassTransformBeginInfoQCOM; typedef struct VkCommandBufferInheritanceRenderPassTransformInfoQCOM { VkStructureType sType; void* pNext; VkSurfaceTransformFlagBitsKHR transform; VkRect2D renderArea; } VkCommandBufferInheritanceRenderPassTransformInfoQCOM; // VK_EXT_depth_bias_control is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_depth_bias_control 1 #define VK_EXT_DEPTH_BIAS_CONTROL_SPEC_VERSION 1 #define VK_EXT_DEPTH_BIAS_CONTROL_EXTENSION_NAME "VK_EXT_depth_bias_control" typedef enum VkDepthBiasRepresentationEXT { VK_DEPTH_BIAS_REPRESENTATION_LEAST_REPRESENTABLE_VALUE_FORMAT_EXT = 0, VK_DEPTH_BIAS_REPRESENTATION_LEAST_REPRESENTABLE_VALUE_FORCE_UNORM_EXT = 1, VK_DEPTH_BIAS_REPRESENTATION_FLOAT_EXT = 2, VK_DEPTH_BIAS_REPRESENTATION_MAX_ENUM_EXT = 0x7FFFFFFF } VkDepthBiasRepresentationEXT; typedef struct VkPhysicalDeviceDepthBiasControlFeaturesEXT { VkStructureType sType; void* pNext; VkBool32 depthBiasControl; VkBool32 leastRepresentableValueForceUnormRepresentation; VkBool32 floatRepresentation; VkBool32 depthBiasExact; } VkPhysicalDeviceDepthBiasControlFeaturesEXT; typedef struct VkDepthBiasInfoEXT { VkStructureType sType; const void* pNext; float depthBiasConstantFactor; float depthBiasClamp; float depthBiasSlopeFactor; } VkDepthBiasInfoEXT; typedef struct VkDepthBiasRepresentationInfoEXT { VkStructureType sType; const void* pNext; VkDepthBiasRepresentationEXT depthBiasRepresentation; VkBool32 depthBiasExact; } VkDepthBiasRepresentationInfoEXT; typedef void (VKAPI_PTR *PFN_vkCmdSetDepthBias2EXT)(VkCommandBuffer commandBuffer, const VkDepthBiasInfoEXT* pDepthBiasInfo); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR void VKAPI_CALL vkCmdSetDepthBias2EXT( VkCommandBuffer commandBuffer, const VkDepthBiasInfoEXT* pDepthBiasInfo); #endif // VK_EXT_device_memory_report is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_device_memory_report 1 #define VK_EXT_DEVICE_MEMORY_REPORT_SPEC_VERSION 2 #define VK_EXT_DEVICE_MEMORY_REPORT_EXTENSION_NAME "VK_EXT_device_memory_report" typedef enum VkDeviceMemoryReportEventTypeEXT { VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_ALLOCATE_EXT = 0, VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_FREE_EXT = 1, VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_IMPORT_EXT = 2, VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_UNIMPORT_EXT = 3, VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_ALLOCATION_FAILED_EXT = 4, VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_MAX_ENUM_EXT = 0x7FFFFFFF } VkDeviceMemoryReportEventTypeEXT; typedef VkFlags VkDeviceMemoryReportFlagsEXT; typedef struct VkPhysicalDeviceDeviceMemoryReportFeaturesEXT { VkStructureType sType; void* pNext; VkBool32 deviceMemoryReport; } VkPhysicalDeviceDeviceMemoryReportFeaturesEXT; typedef struct VkDeviceMemoryReportCallbackDataEXT { VkStructureType sType; void* pNext; VkDeviceMemoryReportFlagsEXT flags; VkDeviceMemoryReportEventTypeEXT type; uint64_t memoryObjectId; VkDeviceSize size; VkObjectType objectType; uint64_t objectHandle; uint32_t heapIndex; } VkDeviceMemoryReportCallbackDataEXT; typedef void (VKAPI_PTR *PFN_vkDeviceMemoryReportCallbackEXT)( const VkDeviceMemoryReportCallbackDataEXT* pCallbackData, void* pUserData); typedef struct VkDeviceDeviceMemoryReportCreateInfoEXT { VkStructureType sType; const void* pNext; VkDeviceMemoryReportFlagsEXT flags; PFN_vkDeviceMemoryReportCallbackEXT pfnUserCallback; void* pUserData; } VkDeviceDeviceMemoryReportCreateInfoEXT; // VK_EXT_acquire_drm_display is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_acquire_drm_display 1 #define VK_EXT_ACQUIRE_DRM_DISPLAY_SPEC_VERSION 1 #define VK_EXT_ACQUIRE_DRM_DISPLAY_EXTENSION_NAME "VK_EXT_acquire_drm_display" typedef VkResult (VKAPI_PTR *PFN_vkAcquireDrmDisplayEXT)(VkPhysicalDevice physicalDevice, int32_t drmFd, VkDisplayKHR display); typedef VkResult (VKAPI_PTR *PFN_vkGetDrmDisplayEXT)(VkPhysicalDevice physicalDevice, int32_t drmFd, uint32_t connectorId, VkDisplayKHR* display); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkAcquireDrmDisplayEXT( VkPhysicalDevice physicalDevice, int32_t drmFd, VkDisplayKHR display); VKAPI_ATTR VkResult VKAPI_CALL vkGetDrmDisplayEXT( VkPhysicalDevice physicalDevice, int32_t drmFd, uint32_t connectorId, VkDisplayKHR* display); #endif // VK_EXT_robustness2 is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_robustness2 1 #define VK_EXT_ROBUSTNESS_2_SPEC_VERSION 1 #define VK_EXT_ROBUSTNESS_2_EXTENSION_NAME "VK_EXT_robustness2" typedef struct VkPhysicalDeviceRobustness2FeaturesEXT { VkStructureType sType; void* pNext; VkBool32 robustBufferAccess2; VkBool32 robustImageAccess2; VkBool32 nullDescriptor; } VkPhysicalDeviceRobustness2FeaturesEXT; typedef struct VkPhysicalDeviceRobustness2PropertiesEXT { VkStructureType sType; void* pNext; VkDeviceSize robustStorageBufferAccessSizeAlignment; VkDeviceSize robustUniformBufferAccessSizeAlignment; } VkPhysicalDeviceRobustness2PropertiesEXT; // VK_EXT_custom_border_color is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_custom_border_color 1 #define VK_EXT_CUSTOM_BORDER_COLOR_SPEC_VERSION 12 #define VK_EXT_CUSTOM_BORDER_COLOR_EXTENSION_NAME "VK_EXT_custom_border_color" typedef struct VkSamplerCustomBorderColorCreateInfoEXT { VkStructureType sType; const void* pNext; VkClearColorValue customBorderColor; VkFormat format; } VkSamplerCustomBorderColorCreateInfoEXT; typedef struct VkPhysicalDeviceCustomBorderColorPropertiesEXT { VkStructureType sType; void* pNext; uint32_t maxCustomBorderColorSamplers; } VkPhysicalDeviceCustomBorderColorPropertiesEXT; typedef struct VkPhysicalDeviceCustomBorderColorFeaturesEXT { VkStructureType sType; void* pNext; VkBool32 customBorderColors; VkBool32 customBorderColorWithoutFormat; } VkPhysicalDeviceCustomBorderColorFeaturesEXT; // VK_GOOGLE_user_type is a preprocessor guard. Do not pass it to API calls. #define VK_GOOGLE_user_type 1 #define VK_GOOGLE_USER_TYPE_SPEC_VERSION 1 #define VK_GOOGLE_USER_TYPE_EXTENSION_NAME "VK_GOOGLE_user_type" // VK_NV_present_barrier is a preprocessor guard. Do not pass it to API calls. #define VK_NV_present_barrier 1 #define VK_NV_PRESENT_BARRIER_SPEC_VERSION 1 #define VK_NV_PRESENT_BARRIER_EXTENSION_NAME "VK_NV_present_barrier" typedef struct VkPhysicalDevicePresentBarrierFeaturesNV { VkStructureType sType; void* pNext; VkBool32 presentBarrier; } VkPhysicalDevicePresentBarrierFeaturesNV; typedef struct VkSurfaceCapabilitiesPresentBarrierNV { VkStructureType sType; void* pNext; VkBool32 presentBarrierSupported; } VkSurfaceCapabilitiesPresentBarrierNV; typedef struct VkSwapchainPresentBarrierCreateInfoNV { VkStructureType sType; void* pNext; VkBool32 presentBarrierEnable; } VkSwapchainPresentBarrierCreateInfoNV; // VK_EXT_private_data is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_private_data 1 typedef VkPrivateDataSlot VkPrivateDataSlotEXT; #define VK_EXT_PRIVATE_DATA_SPEC_VERSION 1 #define VK_EXT_PRIVATE_DATA_EXTENSION_NAME "VK_EXT_private_data" typedef VkPrivateDataSlotCreateFlags VkPrivateDataSlotCreateFlagsEXT; typedef VkPhysicalDevicePrivateDataFeatures VkPhysicalDevicePrivateDataFeaturesEXT; typedef VkDevicePrivateDataCreateInfo VkDevicePrivateDataCreateInfoEXT; typedef VkPrivateDataSlotCreateInfo VkPrivateDataSlotCreateInfoEXT; typedef VkResult (VKAPI_PTR *PFN_vkCreatePrivateDataSlotEXT)(VkDevice device, const VkPrivateDataSlotCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkPrivateDataSlot* pPrivateDataSlot); typedef void (VKAPI_PTR *PFN_vkDestroyPrivateDataSlotEXT)(VkDevice device, VkPrivateDataSlot privateDataSlot, const VkAllocationCallbacks* pAllocator); typedef VkResult (VKAPI_PTR *PFN_vkSetPrivateDataEXT)(VkDevice device, VkObjectType objectType, uint64_t objectHandle, VkPrivateDataSlot privateDataSlot, uint64_t data); typedef void (VKAPI_PTR *PFN_vkGetPrivateDataEXT)(VkDevice device, VkObjectType objectType, uint64_t objectHandle, VkPrivateDataSlot privateDataSlot, uint64_t* pData); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkCreatePrivateDataSlotEXT( VkDevice device, const VkPrivateDataSlotCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkPrivateDataSlot* pPrivateDataSlot); VKAPI_ATTR void VKAPI_CALL vkDestroyPrivateDataSlotEXT( VkDevice device, VkPrivateDataSlot privateDataSlot, const VkAllocationCallbacks* pAllocator); VKAPI_ATTR VkResult VKAPI_CALL vkSetPrivateDataEXT( VkDevice device, VkObjectType objectType, uint64_t objectHandle, VkPrivateDataSlot privateDataSlot, uint64_t data); VKAPI_ATTR void VKAPI_CALL vkGetPrivateDataEXT( VkDevice device, VkObjectType objectType, uint64_t objectHandle, VkPrivateDataSlot privateDataSlot, uint64_t* pData); #endif // VK_EXT_pipeline_creation_cache_control is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_pipeline_creation_cache_control 1 #define VK_EXT_PIPELINE_CREATION_CACHE_CONTROL_SPEC_VERSION 3 #define VK_EXT_PIPELINE_CREATION_CACHE_CONTROL_EXTENSION_NAME "VK_EXT_pipeline_creation_cache_control" typedef VkPhysicalDevicePipelineCreationCacheControlFeatures VkPhysicalDevicePipelineCreationCacheControlFeaturesEXT; // VK_NV_device_diagnostics_config is a preprocessor guard. Do not pass it to API calls. #define VK_NV_device_diagnostics_config 1 #define VK_NV_DEVICE_DIAGNOSTICS_CONFIG_SPEC_VERSION 2 #define VK_NV_DEVICE_DIAGNOSTICS_CONFIG_EXTENSION_NAME "VK_NV_device_diagnostics_config" typedef enum VkDeviceDiagnosticsConfigFlagBitsNV { VK_DEVICE_DIAGNOSTICS_CONFIG_ENABLE_SHADER_DEBUG_INFO_BIT_NV = 0x00000001, VK_DEVICE_DIAGNOSTICS_CONFIG_ENABLE_RESOURCE_TRACKING_BIT_NV = 0x00000002, VK_DEVICE_DIAGNOSTICS_CONFIG_ENABLE_AUTOMATIC_CHECKPOINTS_BIT_NV = 0x00000004, VK_DEVICE_DIAGNOSTICS_CONFIG_ENABLE_SHADER_ERROR_REPORTING_BIT_NV = 0x00000008, VK_DEVICE_DIAGNOSTICS_CONFIG_FLAG_BITS_MAX_ENUM_NV = 0x7FFFFFFF } VkDeviceDiagnosticsConfigFlagBitsNV; typedef VkFlags VkDeviceDiagnosticsConfigFlagsNV; typedef struct VkPhysicalDeviceDiagnosticsConfigFeaturesNV { VkStructureType sType; void* pNext; VkBool32 diagnosticsConfig; } VkPhysicalDeviceDiagnosticsConfigFeaturesNV; typedef struct VkDeviceDiagnosticsConfigCreateInfoNV { VkStructureType sType; const void* pNext; VkDeviceDiagnosticsConfigFlagsNV flags; } VkDeviceDiagnosticsConfigCreateInfoNV; // VK_QCOM_render_pass_store_ops is a preprocessor guard. Do not pass it to API calls. #define VK_QCOM_render_pass_store_ops 1 #define VK_QCOM_RENDER_PASS_STORE_OPS_SPEC_VERSION 2 #define VK_QCOM_RENDER_PASS_STORE_OPS_EXTENSION_NAME "VK_QCOM_render_pass_store_ops" // VK_NV_cuda_kernel_launch is a preprocessor guard. Do not pass it to API calls. #define VK_NV_cuda_kernel_launch 1 VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkCudaModuleNV) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkCudaFunctionNV) #define VK_NV_CUDA_KERNEL_LAUNCH_SPEC_VERSION 2 #define VK_NV_CUDA_KERNEL_LAUNCH_EXTENSION_NAME "VK_NV_cuda_kernel_launch" typedef struct VkCudaModuleCreateInfoNV { VkStructureType sType; const void* pNext; size_t dataSize; const void* pData; } VkCudaModuleCreateInfoNV; typedef struct VkCudaFunctionCreateInfoNV { VkStructureType sType; const void* pNext; VkCudaModuleNV module; const char* pName; } VkCudaFunctionCreateInfoNV; typedef struct VkCudaLaunchInfoNV { VkStructureType sType; const void* pNext; VkCudaFunctionNV function; uint32_t gridDimX; uint32_t gridDimY; uint32_t gridDimZ; uint32_t blockDimX; uint32_t blockDimY; uint32_t blockDimZ; uint32_t sharedMemBytes; size_t paramCount; const void* const * pParams; size_t extraCount; const void* const * pExtras; } VkCudaLaunchInfoNV; typedef struct VkPhysicalDeviceCudaKernelLaunchFeaturesNV { VkStructureType sType; void* pNext; VkBool32 cudaKernelLaunchFeatures; } VkPhysicalDeviceCudaKernelLaunchFeaturesNV; typedef struct VkPhysicalDeviceCudaKernelLaunchPropertiesNV { VkStructureType sType; void* pNext; uint32_t computeCapabilityMinor; uint32_t computeCapabilityMajor; } VkPhysicalDeviceCudaKernelLaunchPropertiesNV; typedef VkResult (VKAPI_PTR *PFN_vkCreateCudaModuleNV)(VkDevice device, const VkCudaModuleCreateInfoNV* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkCudaModuleNV* pModule); typedef VkResult (VKAPI_PTR *PFN_vkGetCudaModuleCacheNV)(VkDevice device, VkCudaModuleNV module, size_t* pCacheSize, void* pCacheData); typedef VkResult (VKAPI_PTR *PFN_vkCreateCudaFunctionNV)(VkDevice device, const VkCudaFunctionCreateInfoNV* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkCudaFunctionNV* pFunction); typedef void (VKAPI_PTR *PFN_vkDestroyCudaModuleNV)(VkDevice device, VkCudaModuleNV module, const VkAllocationCallbacks* pAllocator); typedef void (VKAPI_PTR *PFN_vkDestroyCudaFunctionNV)(VkDevice device, VkCudaFunctionNV function, const VkAllocationCallbacks* pAllocator); typedef void (VKAPI_PTR *PFN_vkCmdCudaLaunchKernelNV)(VkCommandBuffer commandBuffer, const VkCudaLaunchInfoNV* pLaunchInfo); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkCreateCudaModuleNV( VkDevice device, const VkCudaModuleCreateInfoNV* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkCudaModuleNV* pModule); VKAPI_ATTR VkResult VKAPI_CALL vkGetCudaModuleCacheNV( VkDevice device, VkCudaModuleNV module, size_t* pCacheSize, void* pCacheData); VKAPI_ATTR VkResult VKAPI_CALL vkCreateCudaFunctionNV( VkDevice device, const VkCudaFunctionCreateInfoNV* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkCudaFunctionNV* pFunction); VKAPI_ATTR void VKAPI_CALL vkDestroyCudaModuleNV( VkDevice device, VkCudaModuleNV module, const VkAllocationCallbacks* pAllocator); VKAPI_ATTR void VKAPI_CALL vkDestroyCudaFunctionNV( VkDevice device, VkCudaFunctionNV function, const VkAllocationCallbacks* pAllocator); VKAPI_ATTR void VKAPI_CALL vkCmdCudaLaunchKernelNV( VkCommandBuffer commandBuffer, const VkCudaLaunchInfoNV* pLaunchInfo); #endif // VK_NV_low_latency is a preprocessor guard. Do not pass it to API calls. #define VK_NV_low_latency 1 #define VK_NV_LOW_LATENCY_SPEC_VERSION 1 #define VK_NV_LOW_LATENCY_EXTENSION_NAME "VK_NV_low_latency" typedef struct VkQueryLowLatencySupportNV { VkStructureType sType; const void* pNext; void* pQueriedLowLatencyData; } VkQueryLowLatencySupportNV; // VK_EXT_descriptor_buffer is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_descriptor_buffer 1 VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkAccelerationStructureKHR) #define VK_EXT_DESCRIPTOR_BUFFER_SPEC_VERSION 1 #define VK_EXT_DESCRIPTOR_BUFFER_EXTENSION_NAME "VK_EXT_descriptor_buffer" typedef struct VkPhysicalDeviceDescriptorBufferPropertiesEXT { VkStructureType sType; void* pNext; VkBool32 combinedImageSamplerDescriptorSingleArray; VkBool32 bufferlessPushDescriptors; VkBool32 allowSamplerImageViewPostSubmitCreation; VkDeviceSize descriptorBufferOffsetAlignment; uint32_t maxDescriptorBufferBindings; uint32_t maxResourceDescriptorBufferBindings; uint32_t maxSamplerDescriptorBufferBindings; uint32_t maxEmbeddedImmutableSamplerBindings; uint32_t maxEmbeddedImmutableSamplers; size_t bufferCaptureReplayDescriptorDataSize; size_t imageCaptureReplayDescriptorDataSize; size_t imageViewCaptureReplayDescriptorDataSize; size_t samplerCaptureReplayDescriptorDataSize; size_t accelerationStructureCaptureReplayDescriptorDataSize; size_t samplerDescriptorSize; size_t combinedImageSamplerDescriptorSize; size_t sampledImageDescriptorSize; size_t storageImageDescriptorSize; size_t uniformTexelBufferDescriptorSize; size_t robustUniformTexelBufferDescriptorSize; size_t storageTexelBufferDescriptorSize; size_t robustStorageTexelBufferDescriptorSize; size_t uniformBufferDescriptorSize; size_t robustUniformBufferDescriptorSize; size_t storageBufferDescriptorSize; size_t robustStorageBufferDescriptorSize; size_t inputAttachmentDescriptorSize; size_t accelerationStructureDescriptorSize; VkDeviceSize maxSamplerDescriptorBufferRange; VkDeviceSize maxResourceDescriptorBufferRange; VkDeviceSize samplerDescriptorBufferAddressSpaceSize; VkDeviceSize resourceDescriptorBufferAddressSpaceSize; VkDeviceSize descriptorBufferAddressSpaceSize; } VkPhysicalDeviceDescriptorBufferPropertiesEXT; typedef struct VkPhysicalDeviceDescriptorBufferDensityMapPropertiesEXT { VkStructureType sType; void* pNext; size_t combinedImageSamplerDensityMapDescriptorSize; } VkPhysicalDeviceDescriptorBufferDensityMapPropertiesEXT; typedef struct VkPhysicalDeviceDescriptorBufferFeaturesEXT { VkStructureType sType; void* pNext; VkBool32 descriptorBuffer; VkBool32 descriptorBufferCaptureReplay; VkBool32 descriptorBufferImageLayoutIgnored; VkBool32 descriptorBufferPushDescriptors; } VkPhysicalDeviceDescriptorBufferFeaturesEXT; typedef struct VkDescriptorAddressInfoEXT { VkStructureType sType; void* pNext; VkDeviceAddress address; VkDeviceSize range; VkFormat format; } VkDescriptorAddressInfoEXT; typedef struct VkDescriptorBufferBindingInfoEXT { VkStructureType sType; const void* pNext; VkDeviceAddress address; VkBufferUsageFlags usage; } VkDescriptorBufferBindingInfoEXT; typedef struct VkDescriptorBufferBindingPushDescriptorBufferHandleEXT { VkStructureType sType; const void* pNext; VkBuffer buffer; } VkDescriptorBufferBindingPushDescriptorBufferHandleEXT; typedef union VkDescriptorDataEXT { const VkSampler* pSampler; const VkDescriptorImageInfo* pCombinedImageSampler; const VkDescriptorImageInfo* pInputAttachmentImage; const VkDescriptorImageInfo* pSampledImage; const VkDescriptorImageInfo* pStorageImage; const VkDescriptorAddressInfoEXT* pUniformTexelBuffer; const VkDescriptorAddressInfoEXT* pStorageTexelBuffer; const VkDescriptorAddressInfoEXT* pUniformBuffer; const VkDescriptorAddressInfoEXT* pStorageBuffer; VkDeviceAddress accelerationStructure; } VkDescriptorDataEXT; typedef struct VkDescriptorGetInfoEXT { VkStructureType sType; const void* pNext; VkDescriptorType type; VkDescriptorDataEXT data; } VkDescriptorGetInfoEXT; typedef struct VkBufferCaptureDescriptorDataInfoEXT { VkStructureType sType; const void* pNext; VkBuffer buffer; } VkBufferCaptureDescriptorDataInfoEXT; typedef struct VkImageCaptureDescriptorDataInfoEXT { VkStructureType sType; const void* pNext; VkImage image; } VkImageCaptureDescriptorDataInfoEXT; typedef struct VkImageViewCaptureDescriptorDataInfoEXT { VkStructureType sType; const void* pNext; VkImageView imageView; } VkImageViewCaptureDescriptorDataInfoEXT; typedef struct VkSamplerCaptureDescriptorDataInfoEXT { VkStructureType sType; const void* pNext; VkSampler sampler; } VkSamplerCaptureDescriptorDataInfoEXT; typedef struct VkOpaqueCaptureDescriptorDataCreateInfoEXT { VkStructureType sType; const void* pNext; const void* opaqueCaptureDescriptorData; } VkOpaqueCaptureDescriptorDataCreateInfoEXT; typedef struct VkAccelerationStructureCaptureDescriptorDataInfoEXT { VkStructureType sType; const void* pNext; VkAccelerationStructureKHR accelerationStructure; VkAccelerationStructureNV accelerationStructureNV; } VkAccelerationStructureCaptureDescriptorDataInfoEXT; typedef void (VKAPI_PTR *PFN_vkGetDescriptorSetLayoutSizeEXT)(VkDevice device, VkDescriptorSetLayout layout, VkDeviceSize* pLayoutSizeInBytes); typedef void (VKAPI_PTR *PFN_vkGetDescriptorSetLayoutBindingOffsetEXT)(VkDevice device, VkDescriptorSetLayout layout, uint32_t binding, VkDeviceSize* pOffset); typedef void (VKAPI_PTR *PFN_vkGetDescriptorEXT)(VkDevice device, const VkDescriptorGetInfoEXT* pDescriptorInfo, size_t dataSize, void* pDescriptor); typedef void (VKAPI_PTR *PFN_vkCmdBindDescriptorBuffersEXT)(VkCommandBuffer commandBuffer, uint32_t bufferCount, const VkDescriptorBufferBindingInfoEXT* pBindingInfos); typedef void (VKAPI_PTR *PFN_vkCmdSetDescriptorBufferOffsetsEXT)(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, uint32_t firstSet, uint32_t setCount, const uint32_t* pBufferIndices, const VkDeviceSize* pOffsets); typedef void (VKAPI_PTR *PFN_vkCmdBindDescriptorBufferEmbeddedSamplersEXT)(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, uint32_t set); typedef VkResult (VKAPI_PTR *PFN_vkGetBufferOpaqueCaptureDescriptorDataEXT)(VkDevice device, const VkBufferCaptureDescriptorDataInfoEXT* pInfo, void* pData); typedef VkResult (VKAPI_PTR *PFN_vkGetImageOpaqueCaptureDescriptorDataEXT)(VkDevice device, const VkImageCaptureDescriptorDataInfoEXT* pInfo, void* pData); typedef VkResult (VKAPI_PTR *PFN_vkGetImageViewOpaqueCaptureDescriptorDataEXT)(VkDevice device, const VkImageViewCaptureDescriptorDataInfoEXT* pInfo, void* pData); typedef VkResult (VKAPI_PTR *PFN_vkGetSamplerOpaqueCaptureDescriptorDataEXT)(VkDevice device, const VkSamplerCaptureDescriptorDataInfoEXT* pInfo, void* pData); typedef VkResult (VKAPI_PTR *PFN_vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT)(VkDevice device, const VkAccelerationStructureCaptureDescriptorDataInfoEXT* pInfo, void* pData); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR void VKAPI_CALL vkGetDescriptorSetLayoutSizeEXT( VkDevice device, VkDescriptorSetLayout layout, VkDeviceSize* pLayoutSizeInBytes); VKAPI_ATTR void VKAPI_CALL vkGetDescriptorSetLayoutBindingOffsetEXT( VkDevice device, VkDescriptorSetLayout layout, uint32_t binding, VkDeviceSize* pOffset); VKAPI_ATTR void VKAPI_CALL vkGetDescriptorEXT( VkDevice device, const VkDescriptorGetInfoEXT* pDescriptorInfo, size_t dataSize, void* pDescriptor); VKAPI_ATTR void VKAPI_CALL vkCmdBindDescriptorBuffersEXT( VkCommandBuffer commandBuffer, uint32_t bufferCount, const VkDescriptorBufferBindingInfoEXT* pBindingInfos); VKAPI_ATTR void VKAPI_CALL vkCmdSetDescriptorBufferOffsetsEXT( VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, uint32_t firstSet, uint32_t setCount, const uint32_t* pBufferIndices, const VkDeviceSize* pOffsets); VKAPI_ATTR void VKAPI_CALL vkCmdBindDescriptorBufferEmbeddedSamplersEXT( VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, uint32_t set); VKAPI_ATTR VkResult VKAPI_CALL vkGetBufferOpaqueCaptureDescriptorDataEXT( VkDevice device, const VkBufferCaptureDescriptorDataInfoEXT* pInfo, void* pData); VKAPI_ATTR VkResult VKAPI_CALL vkGetImageOpaqueCaptureDescriptorDataEXT( VkDevice device, const VkImageCaptureDescriptorDataInfoEXT* pInfo, void* pData); VKAPI_ATTR VkResult VKAPI_CALL vkGetImageViewOpaqueCaptureDescriptorDataEXT( VkDevice device, const VkImageViewCaptureDescriptorDataInfoEXT* pInfo, void* pData); VKAPI_ATTR VkResult VKAPI_CALL vkGetSamplerOpaqueCaptureDescriptorDataEXT( VkDevice device, const VkSamplerCaptureDescriptorDataInfoEXT* pInfo, void* pData); VKAPI_ATTR VkResult VKAPI_CALL vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT( VkDevice device, const VkAccelerationStructureCaptureDescriptorDataInfoEXT* pInfo, void* pData); #endif // VK_EXT_graphics_pipeline_library is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_graphics_pipeline_library 1 #define VK_EXT_GRAPHICS_PIPELINE_LIBRARY_SPEC_VERSION 1 #define VK_EXT_GRAPHICS_PIPELINE_LIBRARY_EXTENSION_NAME "VK_EXT_graphics_pipeline_library" typedef enum VkGraphicsPipelineLibraryFlagBitsEXT { VK_GRAPHICS_PIPELINE_LIBRARY_VERTEX_INPUT_INTERFACE_BIT_EXT = 0x00000001, VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT = 0x00000002, VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT = 0x00000004, VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT = 0x00000008, VK_GRAPHICS_PIPELINE_LIBRARY_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF } VkGraphicsPipelineLibraryFlagBitsEXT; typedef VkFlags VkGraphicsPipelineLibraryFlagsEXT; typedef struct VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT { VkStructureType sType; void* pNext; VkBool32 graphicsPipelineLibrary; } VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT; typedef struct VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT { VkStructureType sType; void* pNext; VkBool32 graphicsPipelineLibraryFastLinking; VkBool32 graphicsPipelineLibraryIndependentInterpolationDecoration; } VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT; typedef struct VkGraphicsPipelineLibraryCreateInfoEXT { VkStructureType sType; const void* pNext; VkGraphicsPipelineLibraryFlagsEXT flags; } VkGraphicsPipelineLibraryCreateInfoEXT; // VK_AMD_shader_early_and_late_fragment_tests is a preprocessor guard. Do not pass it to API calls. #define VK_AMD_shader_early_and_late_fragment_tests 1 #define VK_AMD_SHADER_EARLY_AND_LATE_FRAGMENT_TESTS_SPEC_VERSION 1 #define VK_AMD_SHADER_EARLY_AND_LATE_FRAGMENT_TESTS_EXTENSION_NAME "VK_AMD_shader_early_and_late_fragment_tests" typedef struct VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD { VkStructureType sType; void* pNext; VkBool32 shaderEarlyAndLateFragmentTests; } VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD; // VK_NV_fragment_shading_rate_enums is a preprocessor guard. Do not pass it to API calls. #define VK_NV_fragment_shading_rate_enums 1 #define VK_NV_FRAGMENT_SHADING_RATE_ENUMS_SPEC_VERSION 1 #define VK_NV_FRAGMENT_SHADING_RATE_ENUMS_EXTENSION_NAME "VK_NV_fragment_shading_rate_enums" typedef enum VkFragmentShadingRateTypeNV { VK_FRAGMENT_SHADING_RATE_TYPE_FRAGMENT_SIZE_NV = 0, VK_FRAGMENT_SHADING_RATE_TYPE_ENUMS_NV = 1, VK_FRAGMENT_SHADING_RATE_TYPE_MAX_ENUM_NV = 0x7FFFFFFF } VkFragmentShadingRateTypeNV; typedef enum VkFragmentShadingRateNV { VK_FRAGMENT_SHADING_RATE_1_INVOCATION_PER_PIXEL_NV = 0, VK_FRAGMENT_SHADING_RATE_1_INVOCATION_PER_1X2_PIXELS_NV = 1, VK_FRAGMENT_SHADING_RATE_1_INVOCATION_PER_2X1_PIXELS_NV = 4, VK_FRAGMENT_SHADING_RATE_1_INVOCATION_PER_2X2_PIXELS_NV = 5, VK_FRAGMENT_SHADING_RATE_1_INVOCATION_PER_2X4_PIXELS_NV = 6, VK_FRAGMENT_SHADING_RATE_1_INVOCATION_PER_4X2_PIXELS_NV = 9, VK_FRAGMENT_SHADING_RATE_1_INVOCATION_PER_4X4_PIXELS_NV = 10, VK_FRAGMENT_SHADING_RATE_2_INVOCATIONS_PER_PIXEL_NV = 11, VK_FRAGMENT_SHADING_RATE_4_INVOCATIONS_PER_PIXEL_NV = 12, VK_FRAGMENT_SHADING_RATE_8_INVOCATIONS_PER_PIXEL_NV = 13, VK_FRAGMENT_SHADING_RATE_16_INVOCATIONS_PER_PIXEL_NV = 14, VK_FRAGMENT_SHADING_RATE_NO_INVOCATIONS_NV = 15, VK_FRAGMENT_SHADING_RATE_MAX_ENUM_NV = 0x7FFFFFFF } VkFragmentShadingRateNV; typedef struct VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV { VkStructureType sType; void* pNext; VkBool32 fragmentShadingRateEnums; VkBool32 supersampleFragmentShadingRates; VkBool32 noInvocationFragmentShadingRates; } VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV; typedef struct VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV { VkStructureType sType; void* pNext; VkSampleCountFlagBits maxFragmentShadingRateInvocationCount; } VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV; typedef struct VkPipelineFragmentShadingRateEnumStateCreateInfoNV { VkStructureType sType; const void* pNext; VkFragmentShadingRateTypeNV shadingRateType; VkFragmentShadingRateNV shadingRate; VkFragmentShadingRateCombinerOpKHR combinerOps[2]; } VkPipelineFragmentShadingRateEnumStateCreateInfoNV; typedef void (VKAPI_PTR *PFN_vkCmdSetFragmentShadingRateEnumNV)(VkCommandBuffer commandBuffer, VkFragmentShadingRateNV shadingRate, const VkFragmentShadingRateCombinerOpKHR combinerOps[2]); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR void VKAPI_CALL vkCmdSetFragmentShadingRateEnumNV( VkCommandBuffer commandBuffer, VkFragmentShadingRateNV shadingRate, const VkFragmentShadingRateCombinerOpKHR combinerOps[2]); #endif // VK_NV_ray_tracing_motion_blur is a preprocessor guard. Do not pass it to API calls. #define VK_NV_ray_tracing_motion_blur 1 #define VK_NV_RAY_TRACING_MOTION_BLUR_SPEC_VERSION 1 #define VK_NV_RAY_TRACING_MOTION_BLUR_EXTENSION_NAME "VK_NV_ray_tracing_motion_blur" typedef enum VkAccelerationStructureMotionInstanceTypeNV { VK_ACCELERATION_STRUCTURE_MOTION_INSTANCE_TYPE_STATIC_NV = 0, VK_ACCELERATION_STRUCTURE_MOTION_INSTANCE_TYPE_MATRIX_MOTION_NV = 1, VK_ACCELERATION_STRUCTURE_MOTION_INSTANCE_TYPE_SRT_MOTION_NV = 2, VK_ACCELERATION_STRUCTURE_MOTION_INSTANCE_TYPE_MAX_ENUM_NV = 0x7FFFFFFF } VkAccelerationStructureMotionInstanceTypeNV; typedef VkFlags VkAccelerationStructureMotionInfoFlagsNV; typedef VkFlags VkAccelerationStructureMotionInstanceFlagsNV; typedef union VkDeviceOrHostAddressConstKHR { VkDeviceAddress deviceAddress; const void* hostAddress; } VkDeviceOrHostAddressConstKHR; typedef struct VkAccelerationStructureGeometryMotionTrianglesDataNV { VkStructureType sType; const void* pNext; VkDeviceOrHostAddressConstKHR vertexData; } VkAccelerationStructureGeometryMotionTrianglesDataNV; typedef struct VkAccelerationStructureMotionInfoNV { VkStructureType sType; const void* pNext; uint32_t maxInstances; VkAccelerationStructureMotionInfoFlagsNV flags; } VkAccelerationStructureMotionInfoNV; typedef struct VkAccelerationStructureMatrixMotionInstanceNV { VkTransformMatrixKHR transformT0; VkTransformMatrixKHR transformT1; uint32_t instanceCustomIndex:24; uint32_t mask:8; uint32_t instanceShaderBindingTableRecordOffset:24; VkGeometryInstanceFlagsKHR flags:8; uint64_t accelerationStructureReference; } VkAccelerationStructureMatrixMotionInstanceNV; typedef struct VkSRTDataNV { float sx; float a; float b; float pvx; float sy; float c; float pvy; float sz; float pvz; float qx; float qy; float qz; float qw; float tx; float ty; float tz; } VkSRTDataNV; typedef struct VkAccelerationStructureSRTMotionInstanceNV { VkSRTDataNV transformT0; VkSRTDataNV transformT1; uint32_t instanceCustomIndex:24; uint32_t mask:8; uint32_t instanceShaderBindingTableRecordOffset:24; VkGeometryInstanceFlagsKHR flags:8; uint64_t accelerationStructureReference; } VkAccelerationStructureSRTMotionInstanceNV; typedef union VkAccelerationStructureMotionInstanceDataNV { VkAccelerationStructureInstanceKHR staticInstance; VkAccelerationStructureMatrixMotionInstanceNV matrixMotionInstance; VkAccelerationStructureSRTMotionInstanceNV srtMotionInstance; } VkAccelerationStructureMotionInstanceDataNV; typedef struct VkAccelerationStructureMotionInstanceNV { VkAccelerationStructureMotionInstanceTypeNV type; VkAccelerationStructureMotionInstanceFlagsNV flags; VkAccelerationStructureMotionInstanceDataNV data; } VkAccelerationStructureMotionInstanceNV; typedef struct VkPhysicalDeviceRayTracingMotionBlurFeaturesNV { VkStructureType sType; void* pNext; VkBool32 rayTracingMotionBlur; VkBool32 rayTracingMotionBlurPipelineTraceRaysIndirect; } VkPhysicalDeviceRayTracingMotionBlurFeaturesNV; // VK_EXT_ycbcr_2plane_444_formats is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_ycbcr_2plane_444_formats 1 #define VK_EXT_YCBCR_2PLANE_444_FORMATS_SPEC_VERSION 1 #define VK_EXT_YCBCR_2PLANE_444_FORMATS_EXTENSION_NAME "VK_EXT_ycbcr_2plane_444_formats" typedef struct VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT { VkStructureType sType; void* pNext; VkBool32 ycbcr2plane444Formats; } VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT; // VK_EXT_fragment_density_map2 is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_fragment_density_map2 1 #define VK_EXT_FRAGMENT_DENSITY_MAP_2_SPEC_VERSION 1 #define VK_EXT_FRAGMENT_DENSITY_MAP_2_EXTENSION_NAME "VK_EXT_fragment_density_map2" typedef struct VkPhysicalDeviceFragmentDensityMap2FeaturesEXT { VkStructureType sType; void* pNext; VkBool32 fragmentDensityMapDeferred; } VkPhysicalDeviceFragmentDensityMap2FeaturesEXT; typedef struct VkPhysicalDeviceFragmentDensityMap2PropertiesEXT { VkStructureType sType; void* pNext; VkBool32 subsampledLoads; VkBool32 subsampledCoarseReconstructionEarlyAccess; uint32_t maxSubsampledArrayLayers; uint32_t maxDescriptorSetSubsampledSamplers; } VkPhysicalDeviceFragmentDensityMap2PropertiesEXT; // VK_QCOM_rotated_copy_commands is a preprocessor guard. Do not pass it to API calls. #define VK_QCOM_rotated_copy_commands 1 #define VK_QCOM_ROTATED_COPY_COMMANDS_SPEC_VERSION 2 #define VK_QCOM_ROTATED_COPY_COMMANDS_EXTENSION_NAME "VK_QCOM_rotated_copy_commands" typedef struct VkCopyCommandTransformInfoQCOM { VkStructureType sType; const void* pNext; VkSurfaceTransformFlagBitsKHR transform; } VkCopyCommandTransformInfoQCOM; // VK_EXT_image_robustness is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_image_robustness 1 #define VK_EXT_IMAGE_ROBUSTNESS_SPEC_VERSION 1 #define VK_EXT_IMAGE_ROBUSTNESS_EXTENSION_NAME "VK_EXT_image_robustness" typedef VkPhysicalDeviceImageRobustnessFeatures VkPhysicalDeviceImageRobustnessFeaturesEXT; // VK_EXT_image_compression_control is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_image_compression_control 1 #define VK_EXT_IMAGE_COMPRESSION_CONTROL_SPEC_VERSION 1 #define VK_EXT_IMAGE_COMPRESSION_CONTROL_EXTENSION_NAME "VK_EXT_image_compression_control" typedef enum VkImageCompressionFlagBitsEXT { VK_IMAGE_COMPRESSION_DEFAULT_EXT = 0, VK_IMAGE_COMPRESSION_FIXED_RATE_DEFAULT_EXT = 0x00000001, VK_IMAGE_COMPRESSION_FIXED_RATE_EXPLICIT_EXT = 0x00000002, VK_IMAGE_COMPRESSION_DISABLED_EXT = 0x00000004, VK_IMAGE_COMPRESSION_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF } VkImageCompressionFlagBitsEXT; typedef VkFlags VkImageCompressionFlagsEXT; typedef enum VkImageCompressionFixedRateFlagBitsEXT { VK_IMAGE_COMPRESSION_FIXED_RATE_NONE_EXT = 0, VK_IMAGE_COMPRESSION_FIXED_RATE_1BPC_BIT_EXT = 0x00000001, VK_IMAGE_COMPRESSION_FIXED_RATE_2BPC_BIT_EXT = 0x00000002, VK_IMAGE_COMPRESSION_FIXED_RATE_3BPC_BIT_EXT = 0x00000004, VK_IMAGE_COMPRESSION_FIXED_RATE_4BPC_BIT_EXT = 0x00000008, VK_IMAGE_COMPRESSION_FIXED_RATE_5BPC_BIT_EXT = 0x00000010, VK_IMAGE_COMPRESSION_FIXED_RATE_6BPC_BIT_EXT = 0x00000020, VK_IMAGE_COMPRESSION_FIXED_RATE_7BPC_BIT_EXT = 0x00000040, VK_IMAGE_COMPRESSION_FIXED_RATE_8BPC_BIT_EXT = 0x00000080, VK_IMAGE_COMPRESSION_FIXED_RATE_9BPC_BIT_EXT = 0x00000100, VK_IMAGE_COMPRESSION_FIXED_RATE_10BPC_BIT_EXT = 0x00000200, VK_IMAGE_COMPRESSION_FIXED_RATE_11BPC_BIT_EXT = 0x00000400, VK_IMAGE_COMPRESSION_FIXED_RATE_12BPC_BIT_EXT = 0x00000800, VK_IMAGE_COMPRESSION_FIXED_RATE_13BPC_BIT_EXT = 0x00001000, VK_IMAGE_COMPRESSION_FIXED_RATE_14BPC_BIT_EXT = 0x00002000, VK_IMAGE_COMPRESSION_FIXED_RATE_15BPC_BIT_EXT = 0x00004000, VK_IMAGE_COMPRESSION_FIXED_RATE_16BPC_BIT_EXT = 0x00008000, VK_IMAGE_COMPRESSION_FIXED_RATE_17BPC_BIT_EXT = 0x00010000, VK_IMAGE_COMPRESSION_FIXED_RATE_18BPC_BIT_EXT = 0x00020000, VK_IMAGE_COMPRESSION_FIXED_RATE_19BPC_BIT_EXT = 0x00040000, VK_IMAGE_COMPRESSION_FIXED_RATE_20BPC_BIT_EXT = 0x00080000, VK_IMAGE_COMPRESSION_FIXED_RATE_21BPC_BIT_EXT = 0x00100000, VK_IMAGE_COMPRESSION_FIXED_RATE_22BPC_BIT_EXT = 0x00200000, VK_IMAGE_COMPRESSION_FIXED_RATE_23BPC_BIT_EXT = 0x00400000, VK_IMAGE_COMPRESSION_FIXED_RATE_24BPC_BIT_EXT = 0x00800000, VK_IMAGE_COMPRESSION_FIXED_RATE_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF } VkImageCompressionFixedRateFlagBitsEXT; typedef VkFlags VkImageCompressionFixedRateFlagsEXT; typedef struct VkPhysicalDeviceImageCompressionControlFeaturesEXT { VkStructureType sType; void* pNext; VkBool32 imageCompressionControl; } VkPhysicalDeviceImageCompressionControlFeaturesEXT; typedef struct VkImageCompressionControlEXT { VkStructureType sType; const void* pNext; VkImageCompressionFlagsEXT flags; uint32_t compressionControlPlaneCount; VkImageCompressionFixedRateFlagsEXT* pFixedRateFlags; } VkImageCompressionControlEXT; typedef struct VkImageCompressionPropertiesEXT { VkStructureType sType; void* pNext; VkImageCompressionFlagsEXT imageCompressionFlags; VkImageCompressionFixedRateFlagsEXT imageCompressionFixedRateFlags; } VkImageCompressionPropertiesEXT; // VK_EXT_attachment_feedback_loop_layout is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_attachment_feedback_loop_layout 1 #define VK_EXT_ATTACHMENT_FEEDBACK_LOOP_LAYOUT_SPEC_VERSION 2 #define VK_EXT_ATTACHMENT_FEEDBACK_LOOP_LAYOUT_EXTENSION_NAME "VK_EXT_attachment_feedback_loop_layout" typedef struct VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT { VkStructureType sType; void* pNext; VkBool32 attachmentFeedbackLoopLayout; } VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT; // VK_EXT_4444_formats is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_4444_formats 1 #define VK_EXT_4444_FORMATS_SPEC_VERSION 1 #define VK_EXT_4444_FORMATS_EXTENSION_NAME "VK_EXT_4444_formats" typedef struct VkPhysicalDevice4444FormatsFeaturesEXT { VkStructureType sType; void* pNext; VkBool32 formatA4R4G4B4; VkBool32 formatA4B4G4R4; } VkPhysicalDevice4444FormatsFeaturesEXT; // VK_EXT_device_fault is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_device_fault 1 #define VK_EXT_DEVICE_FAULT_SPEC_VERSION 2 #define VK_EXT_DEVICE_FAULT_EXTENSION_NAME "VK_EXT_device_fault" typedef enum VkDeviceFaultAddressTypeEXT { VK_DEVICE_FAULT_ADDRESS_TYPE_NONE_EXT = 0, VK_DEVICE_FAULT_ADDRESS_TYPE_READ_INVALID_EXT = 1, VK_DEVICE_FAULT_ADDRESS_TYPE_WRITE_INVALID_EXT = 2, VK_DEVICE_FAULT_ADDRESS_TYPE_EXECUTE_INVALID_EXT = 3, VK_DEVICE_FAULT_ADDRESS_TYPE_INSTRUCTION_POINTER_UNKNOWN_EXT = 4, VK_DEVICE_FAULT_ADDRESS_TYPE_INSTRUCTION_POINTER_INVALID_EXT = 5, VK_DEVICE_FAULT_ADDRESS_TYPE_INSTRUCTION_POINTER_FAULT_EXT = 6, VK_DEVICE_FAULT_ADDRESS_TYPE_MAX_ENUM_EXT = 0x7FFFFFFF } VkDeviceFaultAddressTypeEXT; typedef enum VkDeviceFaultVendorBinaryHeaderVersionEXT { VK_DEVICE_FAULT_VENDOR_BINARY_HEADER_VERSION_ONE_EXT = 1, VK_DEVICE_FAULT_VENDOR_BINARY_HEADER_VERSION_MAX_ENUM_EXT = 0x7FFFFFFF } VkDeviceFaultVendorBinaryHeaderVersionEXT; typedef struct VkPhysicalDeviceFaultFeaturesEXT { VkStructureType sType; void* pNext; VkBool32 deviceFault; VkBool32 deviceFaultVendorBinary; } VkPhysicalDeviceFaultFeaturesEXT; typedef struct VkDeviceFaultCountsEXT { VkStructureType sType; void* pNext; uint32_t addressInfoCount; uint32_t vendorInfoCount; VkDeviceSize vendorBinarySize; } VkDeviceFaultCountsEXT; typedef struct VkDeviceFaultAddressInfoEXT { VkDeviceFaultAddressTypeEXT addressType; VkDeviceAddress reportedAddress; VkDeviceSize addressPrecision; } VkDeviceFaultAddressInfoEXT; typedef struct VkDeviceFaultVendorInfoEXT { char description[VK_MAX_DESCRIPTION_SIZE]; uint64_t vendorFaultCode; uint64_t vendorFaultData; } VkDeviceFaultVendorInfoEXT; typedef struct VkDeviceFaultInfoEXT { VkStructureType sType; void* pNext; char description[VK_MAX_DESCRIPTION_SIZE]; VkDeviceFaultAddressInfoEXT* pAddressInfos; VkDeviceFaultVendorInfoEXT* pVendorInfos; void* pVendorBinaryData; } VkDeviceFaultInfoEXT; typedef struct VkDeviceFaultVendorBinaryHeaderVersionOneEXT { uint32_t headerSize; VkDeviceFaultVendorBinaryHeaderVersionEXT headerVersion; uint32_t vendorID; uint32_t deviceID; uint32_t driverVersion; uint8_t pipelineCacheUUID[VK_UUID_SIZE]; uint32_t applicationNameOffset; uint32_t applicationVersion; uint32_t engineNameOffset; uint32_t engineVersion; uint32_t apiVersion; } VkDeviceFaultVendorBinaryHeaderVersionOneEXT; typedef VkResult (VKAPI_PTR *PFN_vkGetDeviceFaultInfoEXT)(VkDevice device, VkDeviceFaultCountsEXT* pFaultCounts, VkDeviceFaultInfoEXT* pFaultInfo); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkGetDeviceFaultInfoEXT( VkDevice device, VkDeviceFaultCountsEXT* pFaultCounts, VkDeviceFaultInfoEXT* pFaultInfo); #endif // VK_ARM_rasterization_order_attachment_access is a preprocessor guard. Do not pass it to API calls. #define VK_ARM_rasterization_order_attachment_access 1 #define VK_ARM_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_SPEC_VERSION 1 #define VK_ARM_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_EXTENSION_NAME "VK_ARM_rasterization_order_attachment_access" typedef struct VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT { VkStructureType sType; void* pNext; VkBool32 rasterizationOrderColorAttachmentAccess; VkBool32 rasterizationOrderDepthAttachmentAccess; VkBool32 rasterizationOrderStencilAttachmentAccess; } VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT; typedef VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesARM; // VK_EXT_rgba10x6_formats is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_rgba10x6_formats 1 #define VK_EXT_RGBA10X6_FORMATS_SPEC_VERSION 1 #define VK_EXT_RGBA10X6_FORMATS_EXTENSION_NAME "VK_EXT_rgba10x6_formats" typedef struct VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT { VkStructureType sType; void* pNext; VkBool32 formatRgba10x6WithoutYCbCrSampler; } VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT; // VK_VALVE_mutable_descriptor_type is a preprocessor guard. Do not pass it to API calls. #define VK_VALVE_mutable_descriptor_type 1 #define VK_VALVE_MUTABLE_DESCRIPTOR_TYPE_SPEC_VERSION 1 #define VK_VALVE_MUTABLE_DESCRIPTOR_TYPE_EXTENSION_NAME "VK_VALVE_mutable_descriptor_type" typedef struct VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT { VkStructureType sType; void* pNext; VkBool32 mutableDescriptorType; } VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT; typedef VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT VkPhysicalDeviceMutableDescriptorTypeFeaturesVALVE; typedef struct VkMutableDescriptorTypeListEXT { uint32_t descriptorTypeCount; const VkDescriptorType* pDescriptorTypes; } VkMutableDescriptorTypeListEXT; typedef VkMutableDescriptorTypeListEXT VkMutableDescriptorTypeListVALVE; typedef struct VkMutableDescriptorTypeCreateInfoEXT { VkStructureType sType; const void* pNext; uint32_t mutableDescriptorTypeListCount; const VkMutableDescriptorTypeListEXT* pMutableDescriptorTypeLists; } VkMutableDescriptorTypeCreateInfoEXT; typedef VkMutableDescriptorTypeCreateInfoEXT VkMutableDescriptorTypeCreateInfoVALVE; // VK_EXT_vertex_input_dynamic_state is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_vertex_input_dynamic_state 1 #define VK_EXT_VERTEX_INPUT_DYNAMIC_STATE_SPEC_VERSION 2 #define VK_EXT_VERTEX_INPUT_DYNAMIC_STATE_EXTENSION_NAME "VK_EXT_vertex_input_dynamic_state" typedef struct VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT { VkStructureType sType; void* pNext; VkBool32 vertexInputDynamicState; } VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT; typedef struct VkVertexInputBindingDescription2EXT { VkStructureType sType; void* pNext; uint32_t binding; uint32_t stride; VkVertexInputRate inputRate; uint32_t divisor; } VkVertexInputBindingDescription2EXT; typedef struct VkVertexInputAttributeDescription2EXT { VkStructureType sType; void* pNext; uint32_t location; uint32_t binding; VkFormat format; uint32_t offset; } VkVertexInputAttributeDescription2EXT; typedef void (VKAPI_PTR *PFN_vkCmdSetVertexInputEXT)(VkCommandBuffer commandBuffer, uint32_t vertexBindingDescriptionCount, const VkVertexInputBindingDescription2EXT* pVertexBindingDescriptions, uint32_t vertexAttributeDescriptionCount, const VkVertexInputAttributeDescription2EXT* pVertexAttributeDescriptions); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR void VKAPI_CALL vkCmdSetVertexInputEXT( VkCommandBuffer commandBuffer, uint32_t vertexBindingDescriptionCount, const VkVertexInputBindingDescription2EXT* pVertexBindingDescriptions, uint32_t vertexAttributeDescriptionCount, const VkVertexInputAttributeDescription2EXT* pVertexAttributeDescriptions); #endif // VK_EXT_physical_device_drm is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_physical_device_drm 1 #define VK_EXT_PHYSICAL_DEVICE_DRM_SPEC_VERSION 1 #define VK_EXT_PHYSICAL_DEVICE_DRM_EXTENSION_NAME "VK_EXT_physical_device_drm" typedef struct VkPhysicalDeviceDrmPropertiesEXT { VkStructureType sType; void* pNext; VkBool32 hasPrimary; VkBool32 hasRender; int64_t primaryMajor; int64_t primaryMinor; int64_t renderMajor; int64_t renderMinor; } VkPhysicalDeviceDrmPropertiesEXT; // VK_EXT_device_address_binding_report is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_device_address_binding_report 1 #define VK_EXT_DEVICE_ADDRESS_BINDING_REPORT_SPEC_VERSION 1 #define VK_EXT_DEVICE_ADDRESS_BINDING_REPORT_EXTENSION_NAME "VK_EXT_device_address_binding_report" typedef enum VkDeviceAddressBindingTypeEXT { VK_DEVICE_ADDRESS_BINDING_TYPE_BIND_EXT = 0, VK_DEVICE_ADDRESS_BINDING_TYPE_UNBIND_EXT = 1, VK_DEVICE_ADDRESS_BINDING_TYPE_MAX_ENUM_EXT = 0x7FFFFFFF } VkDeviceAddressBindingTypeEXT; typedef enum VkDeviceAddressBindingFlagBitsEXT { VK_DEVICE_ADDRESS_BINDING_INTERNAL_OBJECT_BIT_EXT = 0x00000001, VK_DEVICE_ADDRESS_BINDING_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF } VkDeviceAddressBindingFlagBitsEXT; typedef VkFlags VkDeviceAddressBindingFlagsEXT; typedef struct VkPhysicalDeviceAddressBindingReportFeaturesEXT { VkStructureType sType; void* pNext; VkBool32 reportAddressBinding; } VkPhysicalDeviceAddressBindingReportFeaturesEXT; typedef struct VkDeviceAddressBindingCallbackDataEXT { VkStructureType sType; void* pNext; VkDeviceAddressBindingFlagsEXT flags; VkDeviceAddress baseAddress; VkDeviceSize size; VkDeviceAddressBindingTypeEXT bindingType; } VkDeviceAddressBindingCallbackDataEXT; // VK_EXT_depth_clip_control is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_depth_clip_control 1 #define VK_EXT_DEPTH_CLIP_CONTROL_SPEC_VERSION 1 #define VK_EXT_DEPTH_CLIP_CONTROL_EXTENSION_NAME "VK_EXT_depth_clip_control" typedef struct VkPhysicalDeviceDepthClipControlFeaturesEXT { VkStructureType sType; void* pNext; VkBool32 depthClipControl; } VkPhysicalDeviceDepthClipControlFeaturesEXT; typedef struct VkPipelineViewportDepthClipControlCreateInfoEXT { VkStructureType sType; const void* pNext; VkBool32 negativeOneToOne; } VkPipelineViewportDepthClipControlCreateInfoEXT; // VK_EXT_primitive_topology_list_restart is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_primitive_topology_list_restart 1 #define VK_EXT_PRIMITIVE_TOPOLOGY_LIST_RESTART_SPEC_VERSION 1 #define VK_EXT_PRIMITIVE_TOPOLOGY_LIST_RESTART_EXTENSION_NAME "VK_EXT_primitive_topology_list_restart" typedef struct VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT { VkStructureType sType; void* pNext; VkBool32 primitiveTopologyListRestart; VkBool32 primitiveTopologyPatchListRestart; } VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT; // VK_EXT_present_mode_fifo_latest_ready is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_present_mode_fifo_latest_ready 1 #define VK_EXT_PRESENT_MODE_FIFO_LATEST_READY_SPEC_VERSION 1 #define VK_EXT_PRESENT_MODE_FIFO_LATEST_READY_EXTENSION_NAME "VK_EXT_present_mode_fifo_latest_ready" typedef struct VkPhysicalDevicePresentModeFifoLatestReadyFeaturesEXT { VkStructureType sType; void* pNext; VkBool32 presentModeFifoLatestReady; } VkPhysicalDevicePresentModeFifoLatestReadyFeaturesEXT; // VK_HUAWEI_subpass_shading is a preprocessor guard. Do not pass it to API calls. #define VK_HUAWEI_subpass_shading 1 #define VK_HUAWEI_SUBPASS_SHADING_SPEC_VERSION 3 #define VK_HUAWEI_SUBPASS_SHADING_EXTENSION_NAME "VK_HUAWEI_subpass_shading" typedef struct VkSubpassShadingPipelineCreateInfoHUAWEI { VkStructureType sType; void* pNext; VkRenderPass renderPass; uint32_t subpass; } VkSubpassShadingPipelineCreateInfoHUAWEI; typedef struct VkPhysicalDeviceSubpassShadingFeaturesHUAWEI { VkStructureType sType; void* pNext; VkBool32 subpassShading; } VkPhysicalDeviceSubpassShadingFeaturesHUAWEI; typedef struct VkPhysicalDeviceSubpassShadingPropertiesHUAWEI { VkStructureType sType; void* pNext; uint32_t maxSubpassShadingWorkgroupSizeAspectRatio; } VkPhysicalDeviceSubpassShadingPropertiesHUAWEI; typedef VkResult (VKAPI_PTR *PFN_vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI)(VkDevice device, VkRenderPass renderpass, VkExtent2D* pMaxWorkgroupSize); typedef void (VKAPI_PTR *PFN_vkCmdSubpassShadingHUAWEI)(VkCommandBuffer commandBuffer); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI( VkDevice device, VkRenderPass renderpass, VkExtent2D* pMaxWorkgroupSize); VKAPI_ATTR void VKAPI_CALL vkCmdSubpassShadingHUAWEI( VkCommandBuffer commandBuffer); #endif // VK_HUAWEI_invocation_mask is a preprocessor guard. Do not pass it to API calls. #define VK_HUAWEI_invocation_mask 1 #define VK_HUAWEI_INVOCATION_MASK_SPEC_VERSION 1 #define VK_HUAWEI_INVOCATION_MASK_EXTENSION_NAME "VK_HUAWEI_invocation_mask" typedef struct VkPhysicalDeviceInvocationMaskFeaturesHUAWEI { VkStructureType sType; void* pNext; VkBool32 invocationMask; } VkPhysicalDeviceInvocationMaskFeaturesHUAWEI; typedef void (VKAPI_PTR *PFN_vkCmdBindInvocationMaskHUAWEI)(VkCommandBuffer commandBuffer, VkImageView imageView, VkImageLayout imageLayout); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR void VKAPI_CALL vkCmdBindInvocationMaskHUAWEI( VkCommandBuffer commandBuffer, VkImageView imageView, VkImageLayout imageLayout); #endif // VK_NV_external_memory_rdma is a preprocessor guard. Do not pass it to API calls. #define VK_NV_external_memory_rdma 1 typedef void* VkRemoteAddressNV; #define VK_NV_EXTERNAL_MEMORY_RDMA_SPEC_VERSION 1 #define VK_NV_EXTERNAL_MEMORY_RDMA_EXTENSION_NAME "VK_NV_external_memory_rdma" typedef struct VkMemoryGetRemoteAddressInfoNV { VkStructureType sType; const void* pNext; VkDeviceMemory memory; VkExternalMemoryHandleTypeFlagBits handleType; } VkMemoryGetRemoteAddressInfoNV; typedef struct VkPhysicalDeviceExternalMemoryRDMAFeaturesNV { VkStructureType sType; void* pNext; VkBool32 externalMemoryRDMA; } VkPhysicalDeviceExternalMemoryRDMAFeaturesNV; typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryRemoteAddressNV)(VkDevice device, const VkMemoryGetRemoteAddressInfoNV* pMemoryGetRemoteAddressInfo, VkRemoteAddressNV* pAddress); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryRemoteAddressNV( VkDevice device, const VkMemoryGetRemoteAddressInfoNV* pMemoryGetRemoteAddressInfo, VkRemoteAddressNV* pAddress); #endif // VK_EXT_pipeline_properties is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_pipeline_properties 1 #define VK_EXT_PIPELINE_PROPERTIES_SPEC_VERSION 1 #define VK_EXT_PIPELINE_PROPERTIES_EXTENSION_NAME "VK_EXT_pipeline_properties" typedef VkPipelineInfoKHR VkPipelineInfoEXT; typedef struct VkPipelinePropertiesIdentifierEXT { VkStructureType sType; void* pNext; uint8_t pipelineIdentifier[VK_UUID_SIZE]; } VkPipelinePropertiesIdentifierEXT; typedef struct VkPhysicalDevicePipelinePropertiesFeaturesEXT { VkStructureType sType; void* pNext; VkBool32 pipelinePropertiesIdentifier; } VkPhysicalDevicePipelinePropertiesFeaturesEXT; typedef VkResult (VKAPI_PTR *PFN_vkGetPipelinePropertiesEXT)(VkDevice device, const VkPipelineInfoEXT* pPipelineInfo, VkBaseOutStructure* pPipelineProperties); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkGetPipelinePropertiesEXT( VkDevice device, const VkPipelineInfoEXT* pPipelineInfo, VkBaseOutStructure* pPipelineProperties); #endif // VK_EXT_frame_boundary is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_frame_boundary 1 #define VK_EXT_FRAME_BOUNDARY_SPEC_VERSION 1 #define VK_EXT_FRAME_BOUNDARY_EXTENSION_NAME "VK_EXT_frame_boundary" typedef enum VkFrameBoundaryFlagBitsEXT { VK_FRAME_BOUNDARY_FRAME_END_BIT_EXT = 0x00000001, VK_FRAME_BOUNDARY_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF } VkFrameBoundaryFlagBitsEXT; typedef VkFlags VkFrameBoundaryFlagsEXT; typedef struct VkPhysicalDeviceFrameBoundaryFeaturesEXT { VkStructureType sType; void* pNext; VkBool32 frameBoundary; } VkPhysicalDeviceFrameBoundaryFeaturesEXT; typedef struct VkFrameBoundaryEXT { VkStructureType sType; const void* pNext; VkFrameBoundaryFlagsEXT flags; uint64_t frameID; uint32_t imageCount; const VkImage* pImages; uint32_t bufferCount; const VkBuffer* pBuffers; uint64_t tagName; size_t tagSize; const void* pTag; } VkFrameBoundaryEXT; // VK_EXT_multisampled_render_to_single_sampled is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_multisampled_render_to_single_sampled 1 #define VK_EXT_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_SPEC_VERSION 1 #define VK_EXT_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_EXTENSION_NAME "VK_EXT_multisampled_render_to_single_sampled" typedef struct VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT { VkStructureType sType; void* pNext; VkBool32 multisampledRenderToSingleSampled; } VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT; typedef struct VkSubpassResolvePerformanceQueryEXT { VkStructureType sType; void* pNext; VkBool32 optimal; } VkSubpassResolvePerformanceQueryEXT; typedef struct VkMultisampledRenderToSingleSampledInfoEXT { VkStructureType sType; const void* pNext; VkBool32 multisampledRenderToSingleSampledEnable; VkSampleCountFlagBits rasterizationSamples; } VkMultisampledRenderToSingleSampledInfoEXT; // VK_EXT_extended_dynamic_state2 is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_extended_dynamic_state2 1 #define VK_EXT_EXTENDED_DYNAMIC_STATE_2_SPEC_VERSION 1 #define VK_EXT_EXTENDED_DYNAMIC_STATE_2_EXTENSION_NAME "VK_EXT_extended_dynamic_state2" typedef struct VkPhysicalDeviceExtendedDynamicState2FeaturesEXT { VkStructureType sType; void* pNext; VkBool32 extendedDynamicState2; VkBool32 extendedDynamicState2LogicOp; VkBool32 extendedDynamicState2PatchControlPoints; } VkPhysicalDeviceExtendedDynamicState2FeaturesEXT; typedef void (VKAPI_PTR *PFN_vkCmdSetPatchControlPointsEXT)(VkCommandBuffer commandBuffer, uint32_t patchControlPoints); typedef void (VKAPI_PTR *PFN_vkCmdSetRasterizerDiscardEnableEXT)(VkCommandBuffer commandBuffer, VkBool32 rasterizerDiscardEnable); typedef void (VKAPI_PTR *PFN_vkCmdSetDepthBiasEnableEXT)(VkCommandBuffer commandBuffer, VkBool32 depthBiasEnable); typedef void (VKAPI_PTR *PFN_vkCmdSetLogicOpEXT)(VkCommandBuffer commandBuffer, VkLogicOp logicOp); typedef void (VKAPI_PTR *PFN_vkCmdSetPrimitiveRestartEnableEXT)(VkCommandBuffer commandBuffer, VkBool32 primitiveRestartEnable); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR void VKAPI_CALL vkCmdSetPatchControlPointsEXT( VkCommandBuffer commandBuffer, uint32_t patchControlPoints); VKAPI_ATTR void VKAPI_CALL vkCmdSetRasterizerDiscardEnableEXT( VkCommandBuffer commandBuffer, VkBool32 rasterizerDiscardEnable); VKAPI_ATTR void VKAPI_CALL vkCmdSetDepthBiasEnableEXT( VkCommandBuffer commandBuffer, VkBool32 depthBiasEnable); VKAPI_ATTR void VKAPI_CALL vkCmdSetLogicOpEXT( VkCommandBuffer commandBuffer, VkLogicOp logicOp); VKAPI_ATTR void VKAPI_CALL vkCmdSetPrimitiveRestartEnableEXT( VkCommandBuffer commandBuffer, VkBool32 primitiveRestartEnable); #endif // VK_EXT_color_write_enable is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_color_write_enable 1 #define VK_EXT_COLOR_WRITE_ENABLE_SPEC_VERSION 1 #define VK_EXT_COLOR_WRITE_ENABLE_EXTENSION_NAME "VK_EXT_color_write_enable" typedef struct VkPhysicalDeviceColorWriteEnableFeaturesEXT { VkStructureType sType; void* pNext; VkBool32 colorWriteEnable; } VkPhysicalDeviceColorWriteEnableFeaturesEXT; typedef struct VkPipelineColorWriteCreateInfoEXT { VkStructureType sType; const void* pNext; uint32_t attachmentCount; const VkBool32* pColorWriteEnables; } VkPipelineColorWriteCreateInfoEXT; typedef void (VKAPI_PTR *PFN_vkCmdSetColorWriteEnableEXT)(VkCommandBuffer commandBuffer, uint32_t attachmentCount, const VkBool32* pColorWriteEnables); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR void VKAPI_CALL vkCmdSetColorWriteEnableEXT( VkCommandBuffer commandBuffer, uint32_t attachmentCount, const VkBool32* pColorWriteEnables); #endif // VK_EXT_primitives_generated_query is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_primitives_generated_query 1 #define VK_EXT_PRIMITIVES_GENERATED_QUERY_SPEC_VERSION 1 #define VK_EXT_PRIMITIVES_GENERATED_QUERY_EXTENSION_NAME "VK_EXT_primitives_generated_query" typedef struct VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT { VkStructureType sType; void* pNext; VkBool32 primitivesGeneratedQuery; VkBool32 primitivesGeneratedQueryWithRasterizerDiscard; VkBool32 primitivesGeneratedQueryWithNonZeroStreams; } VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT; // VK_EXT_global_priority_query is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_global_priority_query 1 #define VK_EXT_GLOBAL_PRIORITY_QUERY_SPEC_VERSION 1 #define VK_EXT_GLOBAL_PRIORITY_QUERY_EXTENSION_NAME "VK_EXT_global_priority_query" #define VK_MAX_GLOBAL_PRIORITY_SIZE_EXT VK_MAX_GLOBAL_PRIORITY_SIZE typedef VkPhysicalDeviceGlobalPriorityQueryFeatures VkPhysicalDeviceGlobalPriorityQueryFeaturesEXT; typedef VkQueueFamilyGlobalPriorityProperties VkQueueFamilyGlobalPriorityPropertiesEXT; // VK_EXT_image_view_min_lod is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_image_view_min_lod 1 #define VK_EXT_IMAGE_VIEW_MIN_LOD_SPEC_VERSION 1 #define VK_EXT_IMAGE_VIEW_MIN_LOD_EXTENSION_NAME "VK_EXT_image_view_min_lod" typedef struct VkPhysicalDeviceImageViewMinLodFeaturesEXT { VkStructureType sType; void* pNext; VkBool32 minLod; } VkPhysicalDeviceImageViewMinLodFeaturesEXT; typedef struct VkImageViewMinLodCreateInfoEXT { VkStructureType sType; const void* pNext; float minLod; } VkImageViewMinLodCreateInfoEXT; // VK_EXT_multi_draw is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_multi_draw 1 #define VK_EXT_MULTI_DRAW_SPEC_VERSION 1 #define VK_EXT_MULTI_DRAW_EXTENSION_NAME "VK_EXT_multi_draw" typedef struct VkPhysicalDeviceMultiDrawFeaturesEXT { VkStructureType sType; void* pNext; VkBool32 multiDraw; } VkPhysicalDeviceMultiDrawFeaturesEXT; typedef struct VkPhysicalDeviceMultiDrawPropertiesEXT { VkStructureType sType; void* pNext; uint32_t maxMultiDrawCount; } VkPhysicalDeviceMultiDrawPropertiesEXT; typedef struct VkMultiDrawInfoEXT { uint32_t firstVertex; uint32_t vertexCount; } VkMultiDrawInfoEXT; typedef struct VkMultiDrawIndexedInfoEXT { uint32_t firstIndex; uint32_t indexCount; int32_t vertexOffset; } VkMultiDrawIndexedInfoEXT; typedef void (VKAPI_PTR *PFN_vkCmdDrawMultiEXT)(VkCommandBuffer commandBuffer, uint32_t drawCount, const VkMultiDrawInfoEXT* pVertexInfo, uint32_t instanceCount, uint32_t firstInstance, uint32_t stride); typedef void (VKAPI_PTR *PFN_vkCmdDrawMultiIndexedEXT)(VkCommandBuffer commandBuffer, uint32_t drawCount, const VkMultiDrawIndexedInfoEXT* pIndexInfo, uint32_t instanceCount, uint32_t firstInstance, uint32_t stride, const int32_t* pVertexOffset); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR void VKAPI_CALL vkCmdDrawMultiEXT( VkCommandBuffer commandBuffer, uint32_t drawCount, const VkMultiDrawInfoEXT* pVertexInfo, uint32_t instanceCount, uint32_t firstInstance, uint32_t stride); VKAPI_ATTR void VKAPI_CALL vkCmdDrawMultiIndexedEXT( VkCommandBuffer commandBuffer, uint32_t drawCount, const VkMultiDrawIndexedInfoEXT* pIndexInfo, uint32_t instanceCount, uint32_t firstInstance, uint32_t stride, const int32_t* pVertexOffset); #endif // VK_EXT_image_2d_view_of_3d is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_image_2d_view_of_3d 1 #define VK_EXT_IMAGE_2D_VIEW_OF_3D_SPEC_VERSION 1 #define VK_EXT_IMAGE_2D_VIEW_OF_3D_EXTENSION_NAME "VK_EXT_image_2d_view_of_3d" typedef struct VkPhysicalDeviceImage2DViewOf3DFeaturesEXT { VkStructureType sType; void* pNext; VkBool32 image2DViewOf3D; VkBool32 sampler2DViewOf3D; } VkPhysicalDeviceImage2DViewOf3DFeaturesEXT; // VK_EXT_shader_tile_image is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_shader_tile_image 1 #define VK_EXT_SHADER_TILE_IMAGE_SPEC_VERSION 1 #define VK_EXT_SHADER_TILE_IMAGE_EXTENSION_NAME "VK_EXT_shader_tile_image" typedef struct VkPhysicalDeviceShaderTileImageFeaturesEXT { VkStructureType sType; void* pNext; VkBool32 shaderTileImageColorReadAccess; VkBool32 shaderTileImageDepthReadAccess; VkBool32 shaderTileImageStencilReadAccess; } VkPhysicalDeviceShaderTileImageFeaturesEXT; typedef struct VkPhysicalDeviceShaderTileImagePropertiesEXT { VkStructureType sType; void* pNext; VkBool32 shaderTileImageCoherentReadAccelerated; VkBool32 shaderTileImageReadSampleFromPixelRateInvocation; VkBool32 shaderTileImageReadFromHelperInvocation; } VkPhysicalDeviceShaderTileImagePropertiesEXT; // VK_EXT_opacity_micromap is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_opacity_micromap 1 VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkMicromapEXT) #define VK_EXT_OPACITY_MICROMAP_SPEC_VERSION 2 #define VK_EXT_OPACITY_MICROMAP_EXTENSION_NAME "VK_EXT_opacity_micromap" typedef enum VkMicromapTypeEXT { VK_MICROMAP_TYPE_OPACITY_MICROMAP_EXT = 0, #ifdef VK_ENABLE_BETA_EXTENSIONS VK_MICROMAP_TYPE_DISPLACEMENT_MICROMAP_NV = 1000397000, #endif VK_MICROMAP_TYPE_MAX_ENUM_EXT = 0x7FFFFFFF } VkMicromapTypeEXT; typedef enum VkBuildMicromapModeEXT { VK_BUILD_MICROMAP_MODE_BUILD_EXT = 0, VK_BUILD_MICROMAP_MODE_MAX_ENUM_EXT = 0x7FFFFFFF } VkBuildMicromapModeEXT; typedef enum VkCopyMicromapModeEXT { VK_COPY_MICROMAP_MODE_CLONE_EXT = 0, VK_COPY_MICROMAP_MODE_SERIALIZE_EXT = 1, VK_COPY_MICROMAP_MODE_DESERIALIZE_EXT = 2, VK_COPY_MICROMAP_MODE_COMPACT_EXT = 3, VK_COPY_MICROMAP_MODE_MAX_ENUM_EXT = 0x7FFFFFFF } VkCopyMicromapModeEXT; typedef enum VkOpacityMicromapFormatEXT { VK_OPACITY_MICROMAP_FORMAT_2_STATE_EXT = 1, VK_OPACITY_MICROMAP_FORMAT_4_STATE_EXT = 2, VK_OPACITY_MICROMAP_FORMAT_MAX_ENUM_EXT = 0x7FFFFFFF } VkOpacityMicromapFormatEXT; typedef enum VkOpacityMicromapSpecialIndexEXT { VK_OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_TRANSPARENT_EXT = -1, VK_OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_OPAQUE_EXT = -2, VK_OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_UNKNOWN_TRANSPARENT_EXT = -3, VK_OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_UNKNOWN_OPAQUE_EXT = -4, VK_OPACITY_MICROMAP_SPECIAL_INDEX_CLUSTER_GEOMETRY_DISABLE_OPACITY_MICROMAP_NV = -5, VK_OPACITY_MICROMAP_SPECIAL_INDEX_MAX_ENUM_EXT = 0x7FFFFFFF } VkOpacityMicromapSpecialIndexEXT; typedef enum VkAccelerationStructureCompatibilityKHR { VK_ACCELERATION_STRUCTURE_COMPATIBILITY_COMPATIBLE_KHR = 0, VK_ACCELERATION_STRUCTURE_COMPATIBILITY_INCOMPATIBLE_KHR = 1, VK_ACCELERATION_STRUCTURE_COMPATIBILITY_MAX_ENUM_KHR = 0x7FFFFFFF } VkAccelerationStructureCompatibilityKHR; typedef enum VkAccelerationStructureBuildTypeKHR { VK_ACCELERATION_STRUCTURE_BUILD_TYPE_HOST_KHR = 0, VK_ACCELERATION_STRUCTURE_BUILD_TYPE_DEVICE_KHR = 1, VK_ACCELERATION_STRUCTURE_BUILD_TYPE_HOST_OR_DEVICE_KHR = 2, VK_ACCELERATION_STRUCTURE_BUILD_TYPE_MAX_ENUM_KHR = 0x7FFFFFFF } VkAccelerationStructureBuildTypeKHR; typedef enum VkBuildMicromapFlagBitsEXT { VK_BUILD_MICROMAP_PREFER_FAST_TRACE_BIT_EXT = 0x00000001, VK_BUILD_MICROMAP_PREFER_FAST_BUILD_BIT_EXT = 0x00000002, VK_BUILD_MICROMAP_ALLOW_COMPACTION_BIT_EXT = 0x00000004, VK_BUILD_MICROMAP_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF } VkBuildMicromapFlagBitsEXT; typedef VkFlags VkBuildMicromapFlagsEXT; typedef enum VkMicromapCreateFlagBitsEXT { VK_MICROMAP_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_EXT = 0x00000001, VK_MICROMAP_CREATE_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF } VkMicromapCreateFlagBitsEXT; typedef VkFlags VkMicromapCreateFlagsEXT; typedef struct VkMicromapUsageEXT { uint32_t count; uint32_t subdivisionLevel; uint32_t format; } VkMicromapUsageEXT; typedef union VkDeviceOrHostAddressKHR { VkDeviceAddress deviceAddress; void* hostAddress; } VkDeviceOrHostAddressKHR; typedef struct VkMicromapBuildInfoEXT { VkStructureType sType; const void* pNext; VkMicromapTypeEXT type; VkBuildMicromapFlagsEXT flags; VkBuildMicromapModeEXT mode; VkMicromapEXT dstMicromap; uint32_t usageCountsCount; const VkMicromapUsageEXT* pUsageCounts; const VkMicromapUsageEXT* const* ppUsageCounts; VkDeviceOrHostAddressConstKHR data; VkDeviceOrHostAddressKHR scratchData; VkDeviceOrHostAddressConstKHR triangleArray; VkDeviceSize triangleArrayStride; } VkMicromapBuildInfoEXT; typedef struct VkMicromapCreateInfoEXT { VkStructureType sType; const void* pNext; VkMicromapCreateFlagsEXT createFlags; VkBuffer buffer; VkDeviceSize offset; VkDeviceSize size; VkMicromapTypeEXT type; VkDeviceAddress deviceAddress; } VkMicromapCreateInfoEXT; typedef struct VkPhysicalDeviceOpacityMicromapFeaturesEXT { VkStructureType sType; void* pNext; VkBool32 micromap; VkBool32 micromapCaptureReplay; VkBool32 micromapHostCommands; } VkPhysicalDeviceOpacityMicromapFeaturesEXT; typedef struct VkPhysicalDeviceOpacityMicromapPropertiesEXT { VkStructureType sType; void* pNext; uint32_t maxOpacity2StateSubdivisionLevel; uint32_t maxOpacity4StateSubdivisionLevel; } VkPhysicalDeviceOpacityMicromapPropertiesEXT; typedef struct VkMicromapVersionInfoEXT { VkStructureType sType; const void* pNext; const uint8_t* pVersionData; } VkMicromapVersionInfoEXT; typedef struct VkCopyMicromapToMemoryInfoEXT { VkStructureType sType; const void* pNext; VkMicromapEXT src; VkDeviceOrHostAddressKHR dst; VkCopyMicromapModeEXT mode; } VkCopyMicromapToMemoryInfoEXT; typedef struct VkCopyMemoryToMicromapInfoEXT { VkStructureType sType; const void* pNext; VkDeviceOrHostAddressConstKHR src; VkMicromapEXT dst; VkCopyMicromapModeEXT mode; } VkCopyMemoryToMicromapInfoEXT; typedef struct VkCopyMicromapInfoEXT { VkStructureType sType; const void* pNext; VkMicromapEXT src; VkMicromapEXT dst; VkCopyMicromapModeEXT mode; } VkCopyMicromapInfoEXT; typedef struct VkMicromapBuildSizesInfoEXT { VkStructureType sType; const void* pNext; VkDeviceSize micromapSize; VkDeviceSize buildScratchSize; VkBool32 discardable; } VkMicromapBuildSizesInfoEXT; typedef struct VkAccelerationStructureTrianglesOpacityMicromapEXT { VkStructureType sType; void* pNext; VkIndexType indexType; VkDeviceOrHostAddressConstKHR indexBuffer; VkDeviceSize indexStride; uint32_t baseTriangle; uint32_t usageCountsCount; const VkMicromapUsageEXT* pUsageCounts; const VkMicromapUsageEXT* const* ppUsageCounts; VkMicromapEXT micromap; } VkAccelerationStructureTrianglesOpacityMicromapEXT; typedef struct VkMicromapTriangleEXT { uint32_t dataOffset; uint16_t subdivisionLevel; uint16_t format; } VkMicromapTriangleEXT; typedef VkResult (VKAPI_PTR *PFN_vkCreateMicromapEXT)(VkDevice device, const VkMicromapCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkMicromapEXT* pMicromap); typedef void (VKAPI_PTR *PFN_vkDestroyMicromapEXT)(VkDevice device, VkMicromapEXT micromap, const VkAllocationCallbacks* pAllocator); typedef void (VKAPI_PTR *PFN_vkCmdBuildMicromapsEXT)(VkCommandBuffer commandBuffer, uint32_t infoCount, const VkMicromapBuildInfoEXT* pInfos); typedef VkResult (VKAPI_PTR *PFN_vkBuildMicromapsEXT)(VkDevice device, VkDeferredOperationKHR deferredOperation, uint32_t infoCount, const VkMicromapBuildInfoEXT* pInfos); typedef VkResult (VKAPI_PTR *PFN_vkCopyMicromapEXT)(VkDevice device, VkDeferredOperationKHR deferredOperation, const VkCopyMicromapInfoEXT* pInfo); typedef VkResult (VKAPI_PTR *PFN_vkCopyMicromapToMemoryEXT)(VkDevice device, VkDeferredOperationKHR deferredOperation, const VkCopyMicromapToMemoryInfoEXT* pInfo); typedef VkResult (VKAPI_PTR *PFN_vkCopyMemoryToMicromapEXT)(VkDevice device, VkDeferredOperationKHR deferredOperation, const VkCopyMemoryToMicromapInfoEXT* pInfo); typedef VkResult (VKAPI_PTR *PFN_vkWriteMicromapsPropertiesEXT)(VkDevice device, uint32_t micromapCount, const VkMicromapEXT* pMicromaps, VkQueryType queryType, size_t dataSize, void* pData, size_t stride); typedef void (VKAPI_PTR *PFN_vkCmdCopyMicromapEXT)(VkCommandBuffer commandBuffer, const VkCopyMicromapInfoEXT* pInfo); typedef void (VKAPI_PTR *PFN_vkCmdCopyMicromapToMemoryEXT)(VkCommandBuffer commandBuffer, const VkCopyMicromapToMemoryInfoEXT* pInfo); typedef void (VKAPI_PTR *PFN_vkCmdCopyMemoryToMicromapEXT)(VkCommandBuffer commandBuffer, const VkCopyMemoryToMicromapInfoEXT* pInfo); typedef void (VKAPI_PTR *PFN_vkCmdWriteMicromapsPropertiesEXT)(VkCommandBuffer commandBuffer, uint32_t micromapCount, const VkMicromapEXT* pMicromaps, VkQueryType queryType, VkQueryPool queryPool, uint32_t firstQuery); typedef void (VKAPI_PTR *PFN_vkGetDeviceMicromapCompatibilityEXT)(VkDevice device, const VkMicromapVersionInfoEXT* pVersionInfo, VkAccelerationStructureCompatibilityKHR* pCompatibility); typedef void (VKAPI_PTR *PFN_vkGetMicromapBuildSizesEXT)(VkDevice device, VkAccelerationStructureBuildTypeKHR buildType, const VkMicromapBuildInfoEXT* pBuildInfo, VkMicromapBuildSizesInfoEXT* pSizeInfo); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkCreateMicromapEXT( VkDevice device, const VkMicromapCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkMicromapEXT* pMicromap); VKAPI_ATTR void VKAPI_CALL vkDestroyMicromapEXT( VkDevice device, VkMicromapEXT micromap, const VkAllocationCallbacks* pAllocator); VKAPI_ATTR void VKAPI_CALL vkCmdBuildMicromapsEXT( VkCommandBuffer commandBuffer, uint32_t infoCount, const VkMicromapBuildInfoEXT* pInfos); VKAPI_ATTR VkResult VKAPI_CALL vkBuildMicromapsEXT( VkDevice device, VkDeferredOperationKHR deferredOperation, uint32_t infoCount, const VkMicromapBuildInfoEXT* pInfos); VKAPI_ATTR VkResult VKAPI_CALL vkCopyMicromapEXT( VkDevice device, VkDeferredOperationKHR deferredOperation, const VkCopyMicromapInfoEXT* pInfo); VKAPI_ATTR VkResult VKAPI_CALL vkCopyMicromapToMemoryEXT( VkDevice device, VkDeferredOperationKHR deferredOperation, const VkCopyMicromapToMemoryInfoEXT* pInfo); VKAPI_ATTR VkResult VKAPI_CALL vkCopyMemoryToMicromapEXT( VkDevice device, VkDeferredOperationKHR deferredOperation, const VkCopyMemoryToMicromapInfoEXT* pInfo); VKAPI_ATTR VkResult VKAPI_CALL vkWriteMicromapsPropertiesEXT( VkDevice device, uint32_t micromapCount, const VkMicromapEXT* pMicromaps, VkQueryType queryType, size_t dataSize, void* pData, size_t stride); VKAPI_ATTR void VKAPI_CALL vkCmdCopyMicromapEXT( VkCommandBuffer commandBuffer, const VkCopyMicromapInfoEXT* pInfo); VKAPI_ATTR void VKAPI_CALL vkCmdCopyMicromapToMemoryEXT( VkCommandBuffer commandBuffer, const VkCopyMicromapToMemoryInfoEXT* pInfo); VKAPI_ATTR void VKAPI_CALL vkCmdCopyMemoryToMicromapEXT( VkCommandBuffer commandBuffer, const VkCopyMemoryToMicromapInfoEXT* pInfo); VKAPI_ATTR void VKAPI_CALL vkCmdWriteMicromapsPropertiesEXT( VkCommandBuffer commandBuffer, uint32_t micromapCount, const VkMicromapEXT* pMicromaps, VkQueryType queryType, VkQueryPool queryPool, uint32_t firstQuery); VKAPI_ATTR void VKAPI_CALL vkGetDeviceMicromapCompatibilityEXT( VkDevice device, const VkMicromapVersionInfoEXT* pVersionInfo, VkAccelerationStructureCompatibilityKHR* pCompatibility); VKAPI_ATTR void VKAPI_CALL vkGetMicromapBuildSizesEXT( VkDevice device, VkAccelerationStructureBuildTypeKHR buildType, const VkMicromapBuildInfoEXT* pBuildInfo, VkMicromapBuildSizesInfoEXT* pSizeInfo); #endif // VK_EXT_load_store_op_none is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_load_store_op_none 1 #define VK_EXT_LOAD_STORE_OP_NONE_SPEC_VERSION 1 #define VK_EXT_LOAD_STORE_OP_NONE_EXTENSION_NAME "VK_EXT_load_store_op_none" // VK_HUAWEI_cluster_culling_shader is a preprocessor guard. Do not pass it to API calls. #define VK_HUAWEI_cluster_culling_shader 1 #define VK_HUAWEI_CLUSTER_CULLING_SHADER_SPEC_VERSION 3 #define VK_HUAWEI_CLUSTER_CULLING_SHADER_EXTENSION_NAME "VK_HUAWEI_cluster_culling_shader" typedef struct VkPhysicalDeviceClusterCullingShaderFeaturesHUAWEI { VkStructureType sType; void* pNext; VkBool32 clustercullingShader; VkBool32 multiviewClusterCullingShader; } VkPhysicalDeviceClusterCullingShaderFeaturesHUAWEI; typedef struct VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI { VkStructureType sType; void* pNext; uint32_t maxWorkGroupCount[3]; uint32_t maxWorkGroupSize[3]; uint32_t maxOutputClusterCount; VkDeviceSize indirectBufferOffsetAlignment; } VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI; typedef struct VkPhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI { VkStructureType sType; void* pNext; VkBool32 clusterShadingRate; } VkPhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI; typedef void (VKAPI_PTR *PFN_vkCmdDrawClusterHUAWEI)(VkCommandBuffer commandBuffer, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ); typedef void (VKAPI_PTR *PFN_vkCmdDrawClusterIndirectHUAWEI)(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR void VKAPI_CALL vkCmdDrawClusterHUAWEI( VkCommandBuffer commandBuffer, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ); VKAPI_ATTR void VKAPI_CALL vkCmdDrawClusterIndirectHUAWEI( VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset); #endif // VK_EXT_border_color_swizzle is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_border_color_swizzle 1 #define VK_EXT_BORDER_COLOR_SWIZZLE_SPEC_VERSION 1 #define VK_EXT_BORDER_COLOR_SWIZZLE_EXTENSION_NAME "VK_EXT_border_color_swizzle" typedef struct VkPhysicalDeviceBorderColorSwizzleFeaturesEXT { VkStructureType sType; void* pNext; VkBool32 borderColorSwizzle; VkBool32 borderColorSwizzleFromImage; } VkPhysicalDeviceBorderColorSwizzleFeaturesEXT; typedef struct VkSamplerBorderColorComponentMappingCreateInfoEXT { VkStructureType sType; const void* pNext; VkComponentMapping components; VkBool32 srgb; } VkSamplerBorderColorComponentMappingCreateInfoEXT; // VK_EXT_pageable_device_local_memory is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_pageable_device_local_memory 1 #define VK_EXT_PAGEABLE_DEVICE_LOCAL_MEMORY_SPEC_VERSION 1 #define VK_EXT_PAGEABLE_DEVICE_LOCAL_MEMORY_EXTENSION_NAME "VK_EXT_pageable_device_local_memory" typedef struct VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT { VkStructureType sType; void* pNext; VkBool32 pageableDeviceLocalMemory; } VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT; typedef void (VKAPI_PTR *PFN_vkSetDeviceMemoryPriorityEXT)(VkDevice device, VkDeviceMemory memory, float priority); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR void VKAPI_CALL vkSetDeviceMemoryPriorityEXT( VkDevice device, VkDeviceMemory memory, float priority); #endif // VK_ARM_shader_core_properties is a preprocessor guard. Do not pass it to API calls. #define VK_ARM_shader_core_properties 1 #define VK_ARM_SHADER_CORE_PROPERTIES_SPEC_VERSION 1 #define VK_ARM_SHADER_CORE_PROPERTIES_EXTENSION_NAME "VK_ARM_shader_core_properties" typedef struct VkPhysicalDeviceShaderCorePropertiesARM { VkStructureType sType; void* pNext; uint32_t pixelRate; uint32_t texelRate; uint32_t fmaRate; } VkPhysicalDeviceShaderCorePropertiesARM; // VK_ARM_scheduling_controls is a preprocessor guard. Do not pass it to API calls. #define VK_ARM_scheduling_controls 1 #define VK_ARM_SCHEDULING_CONTROLS_SPEC_VERSION 1 #define VK_ARM_SCHEDULING_CONTROLS_EXTENSION_NAME "VK_ARM_scheduling_controls" typedef VkFlags64 VkPhysicalDeviceSchedulingControlsFlagsARM; // Flag bits for VkPhysicalDeviceSchedulingControlsFlagBitsARM typedef VkFlags64 VkPhysicalDeviceSchedulingControlsFlagBitsARM; static const VkPhysicalDeviceSchedulingControlsFlagBitsARM VK_PHYSICAL_DEVICE_SCHEDULING_CONTROLS_SHADER_CORE_COUNT_ARM = 0x00000001ULL; typedef struct VkDeviceQueueShaderCoreControlCreateInfoARM { VkStructureType sType; void* pNext; uint32_t shaderCoreCount; } VkDeviceQueueShaderCoreControlCreateInfoARM; typedef struct VkPhysicalDeviceSchedulingControlsFeaturesARM { VkStructureType sType; void* pNext; VkBool32 schedulingControls; } VkPhysicalDeviceSchedulingControlsFeaturesARM; typedef struct VkPhysicalDeviceSchedulingControlsPropertiesARM { VkStructureType sType; void* pNext; VkPhysicalDeviceSchedulingControlsFlagsARM schedulingControlsFlags; } VkPhysicalDeviceSchedulingControlsPropertiesARM; // VK_EXT_image_sliced_view_of_3d is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_image_sliced_view_of_3d 1 #define VK_EXT_IMAGE_SLICED_VIEW_OF_3D_SPEC_VERSION 1 #define VK_EXT_IMAGE_SLICED_VIEW_OF_3D_EXTENSION_NAME "VK_EXT_image_sliced_view_of_3d" #define VK_REMAINING_3D_SLICES_EXT (~0U) typedef struct VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT { VkStructureType sType; void* pNext; VkBool32 imageSlicedViewOf3D; } VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT; typedef struct VkImageViewSlicedCreateInfoEXT { VkStructureType sType; const void* pNext; uint32_t sliceOffset; uint32_t sliceCount; } VkImageViewSlicedCreateInfoEXT; // VK_VALVE_descriptor_set_host_mapping is a preprocessor guard. Do not pass it to API calls. #define VK_VALVE_descriptor_set_host_mapping 1 #define VK_VALVE_DESCRIPTOR_SET_HOST_MAPPING_SPEC_VERSION 1 #define VK_VALVE_DESCRIPTOR_SET_HOST_MAPPING_EXTENSION_NAME "VK_VALVE_descriptor_set_host_mapping" typedef struct VkPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE { VkStructureType sType; void* pNext; VkBool32 descriptorSetHostMapping; } VkPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE; typedef struct VkDescriptorSetBindingReferenceVALVE { VkStructureType sType; const void* pNext; VkDescriptorSetLayout descriptorSetLayout; uint32_t binding; } VkDescriptorSetBindingReferenceVALVE; typedef struct VkDescriptorSetLayoutHostMappingInfoVALVE { VkStructureType sType; void* pNext; size_t descriptorOffset; uint32_t descriptorSize; } VkDescriptorSetLayoutHostMappingInfoVALVE; typedef void (VKAPI_PTR *PFN_vkGetDescriptorSetLayoutHostMappingInfoVALVE)(VkDevice device, const VkDescriptorSetBindingReferenceVALVE* pBindingReference, VkDescriptorSetLayoutHostMappingInfoVALVE* pHostMapping); typedef void (VKAPI_PTR *PFN_vkGetDescriptorSetHostMappingVALVE)(VkDevice device, VkDescriptorSet descriptorSet, void** ppData); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR void VKAPI_CALL vkGetDescriptorSetLayoutHostMappingInfoVALVE( VkDevice device, const VkDescriptorSetBindingReferenceVALVE* pBindingReference, VkDescriptorSetLayoutHostMappingInfoVALVE* pHostMapping); VKAPI_ATTR void VKAPI_CALL vkGetDescriptorSetHostMappingVALVE( VkDevice device, VkDescriptorSet descriptorSet, void** ppData); #endif // VK_EXT_depth_clamp_zero_one is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_depth_clamp_zero_one 1 #define VK_EXT_DEPTH_CLAMP_ZERO_ONE_SPEC_VERSION 1 #define VK_EXT_DEPTH_CLAMP_ZERO_ONE_EXTENSION_NAME "VK_EXT_depth_clamp_zero_one" typedef VkPhysicalDeviceDepthClampZeroOneFeaturesKHR VkPhysicalDeviceDepthClampZeroOneFeaturesEXT; // VK_EXT_non_seamless_cube_map is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_non_seamless_cube_map 1 #define VK_EXT_NON_SEAMLESS_CUBE_MAP_SPEC_VERSION 1 #define VK_EXT_NON_SEAMLESS_CUBE_MAP_EXTENSION_NAME "VK_EXT_non_seamless_cube_map" typedef struct VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT { VkStructureType sType; void* pNext; VkBool32 nonSeamlessCubeMap; } VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT; // VK_ARM_render_pass_striped is a preprocessor guard. Do not pass it to API calls. #define VK_ARM_render_pass_striped 1 #define VK_ARM_RENDER_PASS_STRIPED_SPEC_VERSION 1 #define VK_ARM_RENDER_PASS_STRIPED_EXTENSION_NAME "VK_ARM_render_pass_striped" typedef struct VkPhysicalDeviceRenderPassStripedFeaturesARM { VkStructureType sType; void* pNext; VkBool32 renderPassStriped; } VkPhysicalDeviceRenderPassStripedFeaturesARM; typedef struct VkPhysicalDeviceRenderPassStripedPropertiesARM { VkStructureType sType; void* pNext; VkExtent2D renderPassStripeGranularity; uint32_t maxRenderPassStripes; } VkPhysicalDeviceRenderPassStripedPropertiesARM; typedef struct VkRenderPassStripeInfoARM { VkStructureType sType; const void* pNext; VkRect2D stripeArea; } VkRenderPassStripeInfoARM; typedef struct VkRenderPassStripeBeginInfoARM { VkStructureType sType; const void* pNext; uint32_t stripeInfoCount; const VkRenderPassStripeInfoARM* pStripeInfos; } VkRenderPassStripeBeginInfoARM; typedef struct VkRenderPassStripeSubmitInfoARM { VkStructureType sType; const void* pNext; uint32_t stripeSemaphoreInfoCount; const VkSemaphoreSubmitInfo* pStripeSemaphoreInfos; } VkRenderPassStripeSubmitInfoARM; // VK_QCOM_fragment_density_map_offset is a preprocessor guard. Do not pass it to API calls. #define VK_QCOM_fragment_density_map_offset 1 #define VK_QCOM_FRAGMENT_DENSITY_MAP_OFFSET_SPEC_VERSION 2 #define VK_QCOM_FRAGMENT_DENSITY_MAP_OFFSET_EXTENSION_NAME "VK_QCOM_fragment_density_map_offset" typedef struct VkPhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM { VkStructureType sType; void* pNext; VkBool32 fragmentDensityMapOffset; } VkPhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM; typedef struct VkPhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM { VkStructureType sType; void* pNext; VkExtent2D fragmentDensityOffsetGranularity; } VkPhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM; typedef struct VkSubpassFragmentDensityMapOffsetEndInfoQCOM { VkStructureType sType; const void* pNext; uint32_t fragmentDensityOffsetCount; const VkOffset2D* pFragmentDensityOffsets; } VkSubpassFragmentDensityMapOffsetEndInfoQCOM; // VK_NV_copy_memory_indirect is a preprocessor guard. Do not pass it to API calls. #define VK_NV_copy_memory_indirect 1 #define VK_NV_COPY_MEMORY_INDIRECT_SPEC_VERSION 1 #define VK_NV_COPY_MEMORY_INDIRECT_EXTENSION_NAME "VK_NV_copy_memory_indirect" typedef struct VkCopyMemoryIndirectCommandNV { VkDeviceAddress srcAddress; VkDeviceAddress dstAddress; VkDeviceSize size; } VkCopyMemoryIndirectCommandNV; typedef struct VkCopyMemoryToImageIndirectCommandNV { VkDeviceAddress srcAddress; uint32_t bufferRowLength; uint32_t bufferImageHeight; VkImageSubresourceLayers imageSubresource; VkOffset3D imageOffset; VkExtent3D imageExtent; } VkCopyMemoryToImageIndirectCommandNV; typedef struct VkPhysicalDeviceCopyMemoryIndirectFeaturesNV { VkStructureType sType; void* pNext; VkBool32 indirectCopy; } VkPhysicalDeviceCopyMemoryIndirectFeaturesNV; typedef struct VkPhysicalDeviceCopyMemoryIndirectPropertiesNV { VkStructureType sType; void* pNext; VkQueueFlags supportedQueues; } VkPhysicalDeviceCopyMemoryIndirectPropertiesNV; typedef void (VKAPI_PTR *PFN_vkCmdCopyMemoryIndirectNV)(VkCommandBuffer commandBuffer, VkDeviceAddress copyBufferAddress, uint32_t copyCount, uint32_t stride); typedef void (VKAPI_PTR *PFN_vkCmdCopyMemoryToImageIndirectNV)(VkCommandBuffer commandBuffer, VkDeviceAddress copyBufferAddress, uint32_t copyCount, uint32_t stride, VkImage dstImage, VkImageLayout dstImageLayout, const VkImageSubresourceLayers* pImageSubresources); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR void VKAPI_CALL vkCmdCopyMemoryIndirectNV( VkCommandBuffer commandBuffer, VkDeviceAddress copyBufferAddress, uint32_t copyCount, uint32_t stride); VKAPI_ATTR void VKAPI_CALL vkCmdCopyMemoryToImageIndirectNV( VkCommandBuffer commandBuffer, VkDeviceAddress copyBufferAddress, uint32_t copyCount, uint32_t stride, VkImage dstImage, VkImageLayout dstImageLayout, const VkImageSubresourceLayers* pImageSubresources); #endif // VK_NV_memory_decompression is a preprocessor guard. Do not pass it to API calls. #define VK_NV_memory_decompression 1 #define VK_NV_MEMORY_DECOMPRESSION_SPEC_VERSION 1 #define VK_NV_MEMORY_DECOMPRESSION_EXTENSION_NAME "VK_NV_memory_decompression" // Flag bits for VkMemoryDecompressionMethodFlagBitsNV typedef VkFlags64 VkMemoryDecompressionMethodFlagBitsNV; static const VkMemoryDecompressionMethodFlagBitsNV VK_MEMORY_DECOMPRESSION_METHOD_GDEFLATE_1_0_BIT_NV = 0x00000001ULL; typedef VkFlags64 VkMemoryDecompressionMethodFlagsNV; typedef struct VkDecompressMemoryRegionNV { VkDeviceAddress srcAddress; VkDeviceAddress dstAddress; VkDeviceSize compressedSize; VkDeviceSize decompressedSize; VkMemoryDecompressionMethodFlagsNV decompressionMethod; } VkDecompressMemoryRegionNV; typedef struct VkPhysicalDeviceMemoryDecompressionFeaturesNV { VkStructureType sType; void* pNext; VkBool32 memoryDecompression; } VkPhysicalDeviceMemoryDecompressionFeaturesNV; typedef struct VkPhysicalDeviceMemoryDecompressionPropertiesNV { VkStructureType sType; void* pNext; VkMemoryDecompressionMethodFlagsNV decompressionMethods; uint64_t maxDecompressionIndirectCount; } VkPhysicalDeviceMemoryDecompressionPropertiesNV; typedef void (VKAPI_PTR *PFN_vkCmdDecompressMemoryNV)(VkCommandBuffer commandBuffer, uint32_t decompressRegionCount, const VkDecompressMemoryRegionNV* pDecompressMemoryRegions); typedef void (VKAPI_PTR *PFN_vkCmdDecompressMemoryIndirectCountNV)(VkCommandBuffer commandBuffer, VkDeviceAddress indirectCommandsAddress, VkDeviceAddress indirectCommandsCountAddress, uint32_t stride); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR void VKAPI_CALL vkCmdDecompressMemoryNV( VkCommandBuffer commandBuffer, uint32_t decompressRegionCount, const VkDecompressMemoryRegionNV* pDecompressMemoryRegions); VKAPI_ATTR void VKAPI_CALL vkCmdDecompressMemoryIndirectCountNV( VkCommandBuffer commandBuffer, VkDeviceAddress indirectCommandsAddress, VkDeviceAddress indirectCommandsCountAddress, uint32_t stride); #endif // VK_NV_device_generated_commands_compute is a preprocessor guard. Do not pass it to API calls. #define VK_NV_device_generated_commands_compute 1 #define VK_NV_DEVICE_GENERATED_COMMANDS_COMPUTE_SPEC_VERSION 2 #define VK_NV_DEVICE_GENERATED_COMMANDS_COMPUTE_EXTENSION_NAME "VK_NV_device_generated_commands_compute" typedef struct VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV { VkStructureType sType; void* pNext; VkBool32 deviceGeneratedCompute; VkBool32 deviceGeneratedComputePipelines; VkBool32 deviceGeneratedComputeCaptureReplay; } VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV; typedef struct VkComputePipelineIndirectBufferInfoNV { VkStructureType sType; const void* pNext; VkDeviceAddress deviceAddress; VkDeviceSize size; VkDeviceAddress pipelineDeviceAddressCaptureReplay; } VkComputePipelineIndirectBufferInfoNV; typedef struct VkPipelineIndirectDeviceAddressInfoNV { VkStructureType sType; const void* pNext; VkPipelineBindPoint pipelineBindPoint; VkPipeline pipeline; } VkPipelineIndirectDeviceAddressInfoNV; typedef struct VkBindPipelineIndirectCommandNV { VkDeviceAddress pipelineAddress; } VkBindPipelineIndirectCommandNV; typedef void (VKAPI_PTR *PFN_vkGetPipelineIndirectMemoryRequirementsNV)(VkDevice device, const VkComputePipelineCreateInfo* pCreateInfo, VkMemoryRequirements2* pMemoryRequirements); typedef void (VKAPI_PTR *PFN_vkCmdUpdatePipelineIndirectBufferNV)(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline); typedef VkDeviceAddress (VKAPI_PTR *PFN_vkGetPipelineIndirectDeviceAddressNV)(VkDevice device, const VkPipelineIndirectDeviceAddressInfoNV* pInfo); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR void VKAPI_CALL vkGetPipelineIndirectMemoryRequirementsNV( VkDevice device, const VkComputePipelineCreateInfo* pCreateInfo, VkMemoryRequirements2* pMemoryRequirements); VKAPI_ATTR void VKAPI_CALL vkCmdUpdatePipelineIndirectBufferNV( VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline); VKAPI_ATTR VkDeviceAddress VKAPI_CALL vkGetPipelineIndirectDeviceAddressNV( VkDevice device, const VkPipelineIndirectDeviceAddressInfoNV* pInfo); #endif // VK_NV_ray_tracing_linear_swept_spheres is a preprocessor guard. Do not pass it to API calls. #define VK_NV_ray_tracing_linear_swept_spheres 1 #define VK_NV_RAY_TRACING_LINEAR_SWEPT_SPHERES_SPEC_VERSION 1 #define VK_NV_RAY_TRACING_LINEAR_SWEPT_SPHERES_EXTENSION_NAME "VK_NV_ray_tracing_linear_swept_spheres" typedef enum VkRayTracingLssIndexingModeNV { VK_RAY_TRACING_LSS_INDEXING_MODE_LIST_NV = 0, VK_RAY_TRACING_LSS_INDEXING_MODE_SUCCESSIVE_NV = 1, VK_RAY_TRACING_LSS_INDEXING_MODE_MAX_ENUM_NV = 0x7FFFFFFF } VkRayTracingLssIndexingModeNV; typedef enum VkRayTracingLssPrimitiveEndCapsModeNV { VK_RAY_TRACING_LSS_PRIMITIVE_END_CAPS_MODE_NONE_NV = 0, VK_RAY_TRACING_LSS_PRIMITIVE_END_CAPS_MODE_CHAINED_NV = 1, VK_RAY_TRACING_LSS_PRIMITIVE_END_CAPS_MODE_MAX_ENUM_NV = 0x7FFFFFFF } VkRayTracingLssPrimitiveEndCapsModeNV; typedef struct VkPhysicalDeviceRayTracingLinearSweptSpheresFeaturesNV { VkStructureType sType; void* pNext; VkBool32 spheres; VkBool32 linearSweptSpheres; } VkPhysicalDeviceRayTracingLinearSweptSpheresFeaturesNV; typedef struct VkAccelerationStructureGeometryLinearSweptSpheresDataNV { VkStructureType sType; const void* pNext; VkFormat vertexFormat; VkDeviceOrHostAddressConstKHR vertexData; VkDeviceSize vertexStride; VkFormat radiusFormat; VkDeviceOrHostAddressConstKHR radiusData; VkDeviceSize radiusStride; VkIndexType indexType; VkDeviceOrHostAddressConstKHR indexData; VkDeviceSize indexStride; VkRayTracingLssIndexingModeNV indexingMode; VkRayTracingLssPrimitiveEndCapsModeNV endCapsMode; } VkAccelerationStructureGeometryLinearSweptSpheresDataNV; typedef struct VkAccelerationStructureGeometrySpheresDataNV { VkStructureType sType; const void* pNext; VkFormat vertexFormat; VkDeviceOrHostAddressConstKHR vertexData; VkDeviceSize vertexStride; VkFormat radiusFormat; VkDeviceOrHostAddressConstKHR radiusData; VkDeviceSize radiusStride; VkIndexType indexType; VkDeviceOrHostAddressConstKHR indexData; VkDeviceSize indexStride; } VkAccelerationStructureGeometrySpheresDataNV; // VK_NV_linear_color_attachment is a preprocessor guard. Do not pass it to API calls. #define VK_NV_linear_color_attachment 1 #define VK_NV_LINEAR_COLOR_ATTACHMENT_SPEC_VERSION 1 #define VK_NV_LINEAR_COLOR_ATTACHMENT_EXTENSION_NAME "VK_NV_linear_color_attachment" typedef struct VkPhysicalDeviceLinearColorAttachmentFeaturesNV { VkStructureType sType; void* pNext; VkBool32 linearColorAttachment; } VkPhysicalDeviceLinearColorAttachmentFeaturesNV; // VK_GOOGLE_surfaceless_query is a preprocessor guard. Do not pass it to API calls. #define VK_GOOGLE_surfaceless_query 1 #define VK_GOOGLE_SURFACELESS_QUERY_SPEC_VERSION 2 #define VK_GOOGLE_SURFACELESS_QUERY_EXTENSION_NAME "VK_GOOGLE_surfaceless_query" // VK_EXT_image_compression_control_swapchain is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_image_compression_control_swapchain 1 #define VK_EXT_IMAGE_COMPRESSION_CONTROL_SWAPCHAIN_SPEC_VERSION 1 #define VK_EXT_IMAGE_COMPRESSION_CONTROL_SWAPCHAIN_EXTENSION_NAME "VK_EXT_image_compression_control_swapchain" typedef struct VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT { VkStructureType sType; void* pNext; VkBool32 imageCompressionControlSwapchain; } VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT; // VK_QCOM_image_processing is a preprocessor guard. Do not pass it to API calls. #define VK_QCOM_image_processing 1 #define VK_QCOM_IMAGE_PROCESSING_SPEC_VERSION 1 #define VK_QCOM_IMAGE_PROCESSING_EXTENSION_NAME "VK_QCOM_image_processing" typedef struct VkImageViewSampleWeightCreateInfoQCOM { VkStructureType sType; const void* pNext; VkOffset2D filterCenter; VkExtent2D filterSize; uint32_t numPhases; } VkImageViewSampleWeightCreateInfoQCOM; typedef struct VkPhysicalDeviceImageProcessingFeaturesQCOM { VkStructureType sType; void* pNext; VkBool32 textureSampleWeighted; VkBool32 textureBoxFilter; VkBool32 textureBlockMatch; } VkPhysicalDeviceImageProcessingFeaturesQCOM; typedef struct VkPhysicalDeviceImageProcessingPropertiesQCOM { VkStructureType sType; void* pNext; uint32_t maxWeightFilterPhases; VkExtent2D maxWeightFilterDimension; VkExtent2D maxBlockMatchRegion; VkExtent2D maxBoxFilterBlockSize; } VkPhysicalDeviceImageProcessingPropertiesQCOM; // VK_EXT_nested_command_buffer is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_nested_command_buffer 1 #define VK_EXT_NESTED_COMMAND_BUFFER_SPEC_VERSION 1 #define VK_EXT_NESTED_COMMAND_BUFFER_EXTENSION_NAME "VK_EXT_nested_command_buffer" typedef struct VkPhysicalDeviceNestedCommandBufferFeaturesEXT { VkStructureType sType; void* pNext; VkBool32 nestedCommandBuffer; VkBool32 nestedCommandBufferRendering; VkBool32 nestedCommandBufferSimultaneousUse; } VkPhysicalDeviceNestedCommandBufferFeaturesEXT; typedef struct VkPhysicalDeviceNestedCommandBufferPropertiesEXT { VkStructureType sType; void* pNext; uint32_t maxCommandBufferNestingLevel; } VkPhysicalDeviceNestedCommandBufferPropertiesEXT; // VK_EXT_external_memory_acquire_unmodified is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_external_memory_acquire_unmodified 1 #define VK_EXT_EXTERNAL_MEMORY_ACQUIRE_UNMODIFIED_SPEC_VERSION 1 #define VK_EXT_EXTERNAL_MEMORY_ACQUIRE_UNMODIFIED_EXTENSION_NAME "VK_EXT_external_memory_acquire_unmodified" typedef struct VkExternalMemoryAcquireUnmodifiedEXT { VkStructureType sType; const void* pNext; VkBool32 acquireUnmodifiedMemory; } VkExternalMemoryAcquireUnmodifiedEXT; // VK_EXT_extended_dynamic_state3 is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_extended_dynamic_state3 1 #define VK_EXT_EXTENDED_DYNAMIC_STATE_3_SPEC_VERSION 2 #define VK_EXT_EXTENDED_DYNAMIC_STATE_3_EXTENSION_NAME "VK_EXT_extended_dynamic_state3" typedef struct VkPhysicalDeviceExtendedDynamicState3FeaturesEXT { VkStructureType sType; void* pNext; VkBool32 extendedDynamicState3TessellationDomainOrigin; VkBool32 extendedDynamicState3DepthClampEnable; VkBool32 extendedDynamicState3PolygonMode; VkBool32 extendedDynamicState3RasterizationSamples; VkBool32 extendedDynamicState3SampleMask; VkBool32 extendedDynamicState3AlphaToCoverageEnable; VkBool32 extendedDynamicState3AlphaToOneEnable; VkBool32 extendedDynamicState3LogicOpEnable; VkBool32 extendedDynamicState3ColorBlendEnable; VkBool32 extendedDynamicState3ColorBlendEquation; VkBool32 extendedDynamicState3ColorWriteMask; VkBool32 extendedDynamicState3RasterizationStream; VkBool32 extendedDynamicState3ConservativeRasterizationMode; VkBool32 extendedDynamicState3ExtraPrimitiveOverestimationSize; VkBool32 extendedDynamicState3DepthClipEnable; VkBool32 extendedDynamicState3SampleLocationsEnable; VkBool32 extendedDynamicState3ColorBlendAdvanced; VkBool32 extendedDynamicState3ProvokingVertexMode; VkBool32 extendedDynamicState3LineRasterizationMode; VkBool32 extendedDynamicState3LineStippleEnable; VkBool32 extendedDynamicState3DepthClipNegativeOneToOne; VkBool32 extendedDynamicState3ViewportWScalingEnable; VkBool32 extendedDynamicState3ViewportSwizzle; VkBool32 extendedDynamicState3CoverageToColorEnable; VkBool32 extendedDynamicState3CoverageToColorLocation; VkBool32 extendedDynamicState3CoverageModulationMode; VkBool32 extendedDynamicState3CoverageModulationTableEnable; VkBool32 extendedDynamicState3CoverageModulationTable; VkBool32 extendedDynamicState3CoverageReductionMode; VkBool32 extendedDynamicState3RepresentativeFragmentTestEnable; VkBool32 extendedDynamicState3ShadingRateImageEnable; } VkPhysicalDeviceExtendedDynamicState3FeaturesEXT; typedef struct VkPhysicalDeviceExtendedDynamicState3PropertiesEXT { VkStructureType sType; void* pNext; VkBool32 dynamicPrimitiveTopologyUnrestricted; } VkPhysicalDeviceExtendedDynamicState3PropertiesEXT; typedef struct VkColorBlendEquationEXT { VkBlendFactor srcColorBlendFactor; VkBlendFactor dstColorBlendFactor; VkBlendOp colorBlendOp; VkBlendFactor srcAlphaBlendFactor; VkBlendFactor dstAlphaBlendFactor; VkBlendOp alphaBlendOp; } VkColorBlendEquationEXT; typedef struct VkColorBlendAdvancedEXT { VkBlendOp advancedBlendOp; VkBool32 srcPremultiplied; VkBool32 dstPremultiplied; VkBlendOverlapEXT blendOverlap; VkBool32 clampResults; } VkColorBlendAdvancedEXT; typedef void (VKAPI_PTR *PFN_vkCmdSetDepthClampEnableEXT)(VkCommandBuffer commandBuffer, VkBool32 depthClampEnable); typedef void (VKAPI_PTR *PFN_vkCmdSetPolygonModeEXT)(VkCommandBuffer commandBuffer, VkPolygonMode polygonMode); typedef void (VKAPI_PTR *PFN_vkCmdSetRasterizationSamplesEXT)(VkCommandBuffer commandBuffer, VkSampleCountFlagBits rasterizationSamples); typedef void (VKAPI_PTR *PFN_vkCmdSetSampleMaskEXT)(VkCommandBuffer commandBuffer, VkSampleCountFlagBits samples, const VkSampleMask* pSampleMask); typedef void (VKAPI_PTR *PFN_vkCmdSetAlphaToCoverageEnableEXT)(VkCommandBuffer commandBuffer, VkBool32 alphaToCoverageEnable); typedef void (VKAPI_PTR *PFN_vkCmdSetAlphaToOneEnableEXT)(VkCommandBuffer commandBuffer, VkBool32 alphaToOneEnable); typedef void (VKAPI_PTR *PFN_vkCmdSetLogicOpEnableEXT)(VkCommandBuffer commandBuffer, VkBool32 logicOpEnable); typedef void (VKAPI_PTR *PFN_vkCmdSetColorBlendEnableEXT)(VkCommandBuffer commandBuffer, uint32_t firstAttachment, uint32_t attachmentCount, const VkBool32* pColorBlendEnables); typedef void (VKAPI_PTR *PFN_vkCmdSetColorBlendEquationEXT)(VkCommandBuffer commandBuffer, uint32_t firstAttachment, uint32_t attachmentCount, const VkColorBlendEquationEXT* pColorBlendEquations); typedef void (VKAPI_PTR *PFN_vkCmdSetColorWriteMaskEXT)(VkCommandBuffer commandBuffer, uint32_t firstAttachment, uint32_t attachmentCount, const VkColorComponentFlags* pColorWriteMasks); typedef void (VKAPI_PTR *PFN_vkCmdSetTessellationDomainOriginEXT)(VkCommandBuffer commandBuffer, VkTessellationDomainOrigin domainOrigin); typedef void (VKAPI_PTR *PFN_vkCmdSetRasterizationStreamEXT)(VkCommandBuffer commandBuffer, uint32_t rasterizationStream); typedef void (VKAPI_PTR *PFN_vkCmdSetConservativeRasterizationModeEXT)(VkCommandBuffer commandBuffer, VkConservativeRasterizationModeEXT conservativeRasterizationMode); typedef void (VKAPI_PTR *PFN_vkCmdSetExtraPrimitiveOverestimationSizeEXT)(VkCommandBuffer commandBuffer, float extraPrimitiveOverestimationSize); typedef void (VKAPI_PTR *PFN_vkCmdSetDepthClipEnableEXT)(VkCommandBuffer commandBuffer, VkBool32 depthClipEnable); typedef void (VKAPI_PTR *PFN_vkCmdSetSampleLocationsEnableEXT)(VkCommandBuffer commandBuffer, VkBool32 sampleLocationsEnable); typedef void (VKAPI_PTR *PFN_vkCmdSetColorBlendAdvancedEXT)(VkCommandBuffer commandBuffer, uint32_t firstAttachment, uint32_t attachmentCount, const VkColorBlendAdvancedEXT* pColorBlendAdvanced); typedef void (VKAPI_PTR *PFN_vkCmdSetProvokingVertexModeEXT)(VkCommandBuffer commandBuffer, VkProvokingVertexModeEXT provokingVertexMode); typedef void (VKAPI_PTR *PFN_vkCmdSetLineRasterizationModeEXT)(VkCommandBuffer commandBuffer, VkLineRasterizationModeEXT lineRasterizationMode); typedef void (VKAPI_PTR *PFN_vkCmdSetLineStippleEnableEXT)(VkCommandBuffer commandBuffer, VkBool32 stippledLineEnable); typedef void (VKAPI_PTR *PFN_vkCmdSetDepthClipNegativeOneToOneEXT)(VkCommandBuffer commandBuffer, VkBool32 negativeOneToOne); typedef void (VKAPI_PTR *PFN_vkCmdSetViewportWScalingEnableNV)(VkCommandBuffer commandBuffer, VkBool32 viewportWScalingEnable); typedef void (VKAPI_PTR *PFN_vkCmdSetViewportSwizzleNV)(VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, const VkViewportSwizzleNV* pViewportSwizzles); typedef void (VKAPI_PTR *PFN_vkCmdSetCoverageToColorEnableNV)(VkCommandBuffer commandBuffer, VkBool32 coverageToColorEnable); typedef void (VKAPI_PTR *PFN_vkCmdSetCoverageToColorLocationNV)(VkCommandBuffer commandBuffer, uint32_t coverageToColorLocation); typedef void (VKAPI_PTR *PFN_vkCmdSetCoverageModulationModeNV)(VkCommandBuffer commandBuffer, VkCoverageModulationModeNV coverageModulationMode); typedef void (VKAPI_PTR *PFN_vkCmdSetCoverageModulationTableEnableNV)(VkCommandBuffer commandBuffer, VkBool32 coverageModulationTableEnable); typedef void (VKAPI_PTR *PFN_vkCmdSetCoverageModulationTableNV)(VkCommandBuffer commandBuffer, uint32_t coverageModulationTableCount, const float* pCoverageModulationTable); typedef void (VKAPI_PTR *PFN_vkCmdSetShadingRateImageEnableNV)(VkCommandBuffer commandBuffer, VkBool32 shadingRateImageEnable); typedef void (VKAPI_PTR *PFN_vkCmdSetRepresentativeFragmentTestEnableNV)(VkCommandBuffer commandBuffer, VkBool32 representativeFragmentTestEnable); typedef void (VKAPI_PTR *PFN_vkCmdSetCoverageReductionModeNV)(VkCommandBuffer commandBuffer, VkCoverageReductionModeNV coverageReductionMode); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR void VKAPI_CALL vkCmdSetDepthClampEnableEXT( VkCommandBuffer commandBuffer, VkBool32 depthClampEnable); VKAPI_ATTR void VKAPI_CALL vkCmdSetPolygonModeEXT( VkCommandBuffer commandBuffer, VkPolygonMode polygonMode); VKAPI_ATTR void VKAPI_CALL vkCmdSetRasterizationSamplesEXT( VkCommandBuffer commandBuffer, VkSampleCountFlagBits rasterizationSamples); VKAPI_ATTR void VKAPI_CALL vkCmdSetSampleMaskEXT( VkCommandBuffer commandBuffer, VkSampleCountFlagBits samples, const VkSampleMask* pSampleMask); VKAPI_ATTR void VKAPI_CALL vkCmdSetAlphaToCoverageEnableEXT( VkCommandBuffer commandBuffer, VkBool32 alphaToCoverageEnable); VKAPI_ATTR void VKAPI_CALL vkCmdSetAlphaToOneEnableEXT( VkCommandBuffer commandBuffer, VkBool32 alphaToOneEnable); VKAPI_ATTR void VKAPI_CALL vkCmdSetLogicOpEnableEXT( VkCommandBuffer commandBuffer, VkBool32 logicOpEnable); VKAPI_ATTR void VKAPI_CALL vkCmdSetColorBlendEnableEXT( VkCommandBuffer commandBuffer, uint32_t firstAttachment, uint32_t attachmentCount, const VkBool32* pColorBlendEnables); VKAPI_ATTR void VKAPI_CALL vkCmdSetColorBlendEquationEXT( VkCommandBuffer commandBuffer, uint32_t firstAttachment, uint32_t attachmentCount, const VkColorBlendEquationEXT* pColorBlendEquations); VKAPI_ATTR void VKAPI_CALL vkCmdSetColorWriteMaskEXT( VkCommandBuffer commandBuffer, uint32_t firstAttachment, uint32_t attachmentCount, const VkColorComponentFlags* pColorWriteMasks); VKAPI_ATTR void VKAPI_CALL vkCmdSetTessellationDomainOriginEXT( VkCommandBuffer commandBuffer, VkTessellationDomainOrigin domainOrigin); VKAPI_ATTR void VKAPI_CALL vkCmdSetRasterizationStreamEXT( VkCommandBuffer commandBuffer, uint32_t rasterizationStream); VKAPI_ATTR void VKAPI_CALL vkCmdSetConservativeRasterizationModeEXT( VkCommandBuffer commandBuffer, VkConservativeRasterizationModeEXT conservativeRasterizationMode); VKAPI_ATTR void VKAPI_CALL vkCmdSetExtraPrimitiveOverestimationSizeEXT( VkCommandBuffer commandBuffer, float extraPrimitiveOverestimationSize); VKAPI_ATTR void VKAPI_CALL vkCmdSetDepthClipEnableEXT( VkCommandBuffer commandBuffer, VkBool32 depthClipEnable); VKAPI_ATTR void VKAPI_CALL vkCmdSetSampleLocationsEnableEXT( VkCommandBuffer commandBuffer, VkBool32 sampleLocationsEnable); VKAPI_ATTR void VKAPI_CALL vkCmdSetColorBlendAdvancedEXT( VkCommandBuffer commandBuffer, uint32_t firstAttachment, uint32_t attachmentCount, const VkColorBlendAdvancedEXT* pColorBlendAdvanced); VKAPI_ATTR void VKAPI_CALL vkCmdSetProvokingVertexModeEXT( VkCommandBuffer commandBuffer, VkProvokingVertexModeEXT provokingVertexMode); VKAPI_ATTR void VKAPI_CALL vkCmdSetLineRasterizationModeEXT( VkCommandBuffer commandBuffer, VkLineRasterizationModeEXT lineRasterizationMode); VKAPI_ATTR void VKAPI_CALL vkCmdSetLineStippleEnableEXT( VkCommandBuffer commandBuffer, VkBool32 stippledLineEnable); VKAPI_ATTR void VKAPI_CALL vkCmdSetDepthClipNegativeOneToOneEXT( VkCommandBuffer commandBuffer, VkBool32 negativeOneToOne); VKAPI_ATTR void VKAPI_CALL vkCmdSetViewportWScalingEnableNV( VkCommandBuffer commandBuffer, VkBool32 viewportWScalingEnable); VKAPI_ATTR void VKAPI_CALL vkCmdSetViewportSwizzleNV( VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, const VkViewportSwizzleNV* pViewportSwizzles); VKAPI_ATTR void VKAPI_CALL vkCmdSetCoverageToColorEnableNV( VkCommandBuffer commandBuffer, VkBool32 coverageToColorEnable); VKAPI_ATTR void VKAPI_CALL vkCmdSetCoverageToColorLocationNV( VkCommandBuffer commandBuffer, uint32_t coverageToColorLocation); VKAPI_ATTR void VKAPI_CALL vkCmdSetCoverageModulationModeNV( VkCommandBuffer commandBuffer, VkCoverageModulationModeNV coverageModulationMode); VKAPI_ATTR void VKAPI_CALL vkCmdSetCoverageModulationTableEnableNV( VkCommandBuffer commandBuffer, VkBool32 coverageModulationTableEnable); VKAPI_ATTR void VKAPI_CALL vkCmdSetCoverageModulationTableNV( VkCommandBuffer commandBuffer, uint32_t coverageModulationTableCount, const float* pCoverageModulationTable); VKAPI_ATTR void VKAPI_CALL vkCmdSetShadingRateImageEnableNV( VkCommandBuffer commandBuffer, VkBool32 shadingRateImageEnable); VKAPI_ATTR void VKAPI_CALL vkCmdSetRepresentativeFragmentTestEnableNV( VkCommandBuffer commandBuffer, VkBool32 representativeFragmentTestEnable); VKAPI_ATTR void VKAPI_CALL vkCmdSetCoverageReductionModeNV( VkCommandBuffer commandBuffer, VkCoverageReductionModeNV coverageReductionMode); #endif // VK_EXT_subpass_merge_feedback is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_subpass_merge_feedback 1 #define VK_EXT_SUBPASS_MERGE_FEEDBACK_SPEC_VERSION 2 #define VK_EXT_SUBPASS_MERGE_FEEDBACK_EXTENSION_NAME "VK_EXT_subpass_merge_feedback" typedef enum VkSubpassMergeStatusEXT { VK_SUBPASS_MERGE_STATUS_MERGED_EXT = 0, VK_SUBPASS_MERGE_STATUS_DISALLOWED_EXT = 1, VK_SUBPASS_MERGE_STATUS_NOT_MERGED_SIDE_EFFECTS_EXT = 2, VK_SUBPASS_MERGE_STATUS_NOT_MERGED_SAMPLES_MISMATCH_EXT = 3, VK_SUBPASS_MERGE_STATUS_NOT_MERGED_VIEWS_MISMATCH_EXT = 4, VK_SUBPASS_MERGE_STATUS_NOT_MERGED_ALIASING_EXT = 5, VK_SUBPASS_MERGE_STATUS_NOT_MERGED_DEPENDENCIES_EXT = 6, VK_SUBPASS_MERGE_STATUS_NOT_MERGED_INCOMPATIBLE_INPUT_ATTACHMENT_EXT = 7, VK_SUBPASS_MERGE_STATUS_NOT_MERGED_TOO_MANY_ATTACHMENTS_EXT = 8, VK_SUBPASS_MERGE_STATUS_NOT_MERGED_INSUFFICIENT_STORAGE_EXT = 9, VK_SUBPASS_MERGE_STATUS_NOT_MERGED_DEPTH_STENCIL_COUNT_EXT = 10, VK_SUBPASS_MERGE_STATUS_NOT_MERGED_RESOLVE_ATTACHMENT_REUSE_EXT = 11, VK_SUBPASS_MERGE_STATUS_NOT_MERGED_SINGLE_SUBPASS_EXT = 12, VK_SUBPASS_MERGE_STATUS_NOT_MERGED_UNSPECIFIED_EXT = 13, VK_SUBPASS_MERGE_STATUS_MAX_ENUM_EXT = 0x7FFFFFFF } VkSubpassMergeStatusEXT; typedef struct VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT { VkStructureType sType; void* pNext; VkBool32 subpassMergeFeedback; } VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT; typedef struct VkRenderPassCreationControlEXT { VkStructureType sType; const void* pNext; VkBool32 disallowMerging; } VkRenderPassCreationControlEXT; typedef struct VkRenderPassCreationFeedbackInfoEXT { uint32_t postMergeSubpassCount; } VkRenderPassCreationFeedbackInfoEXT; typedef struct VkRenderPassCreationFeedbackCreateInfoEXT { VkStructureType sType; const void* pNext; VkRenderPassCreationFeedbackInfoEXT* pRenderPassFeedback; } VkRenderPassCreationFeedbackCreateInfoEXT; typedef struct VkRenderPassSubpassFeedbackInfoEXT { VkSubpassMergeStatusEXT subpassMergeStatus; char description[VK_MAX_DESCRIPTION_SIZE]; uint32_t postMergeIndex; } VkRenderPassSubpassFeedbackInfoEXT; typedef struct VkRenderPassSubpassFeedbackCreateInfoEXT { VkStructureType sType; const void* pNext; VkRenderPassSubpassFeedbackInfoEXT* pSubpassFeedback; } VkRenderPassSubpassFeedbackCreateInfoEXT; // VK_LUNARG_direct_driver_loading is a preprocessor guard. Do not pass it to API calls. #define VK_LUNARG_direct_driver_loading 1 #define VK_LUNARG_DIRECT_DRIVER_LOADING_SPEC_VERSION 1 #define VK_LUNARG_DIRECT_DRIVER_LOADING_EXTENSION_NAME "VK_LUNARG_direct_driver_loading" typedef enum VkDirectDriverLoadingModeLUNARG { VK_DIRECT_DRIVER_LOADING_MODE_EXCLUSIVE_LUNARG = 0, VK_DIRECT_DRIVER_LOADING_MODE_INCLUSIVE_LUNARG = 1, VK_DIRECT_DRIVER_LOADING_MODE_MAX_ENUM_LUNARG = 0x7FFFFFFF } VkDirectDriverLoadingModeLUNARG; typedef VkFlags VkDirectDriverLoadingFlagsLUNARG; typedef PFN_vkVoidFunction (VKAPI_PTR *PFN_vkGetInstanceProcAddrLUNARG)( VkInstance instance, const char* pName); typedef struct VkDirectDriverLoadingInfoLUNARG { VkStructureType sType; void* pNext; VkDirectDriverLoadingFlagsLUNARG flags; PFN_vkGetInstanceProcAddrLUNARG pfnGetInstanceProcAddr; } VkDirectDriverLoadingInfoLUNARG; typedef struct VkDirectDriverLoadingListLUNARG { VkStructureType sType; const void* pNext; VkDirectDriverLoadingModeLUNARG mode; uint32_t driverCount; const VkDirectDriverLoadingInfoLUNARG* pDrivers; } VkDirectDriverLoadingListLUNARG; // VK_EXT_shader_module_identifier is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_shader_module_identifier 1 #define VK_MAX_SHADER_MODULE_IDENTIFIER_SIZE_EXT 32U #define VK_EXT_SHADER_MODULE_IDENTIFIER_SPEC_VERSION 1 #define VK_EXT_SHADER_MODULE_IDENTIFIER_EXTENSION_NAME "VK_EXT_shader_module_identifier" typedef struct VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT { VkStructureType sType; void* pNext; VkBool32 shaderModuleIdentifier; } VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT; typedef struct VkPhysicalDeviceShaderModuleIdentifierPropertiesEXT { VkStructureType sType; void* pNext; uint8_t shaderModuleIdentifierAlgorithmUUID[VK_UUID_SIZE]; } VkPhysicalDeviceShaderModuleIdentifierPropertiesEXT; typedef struct VkPipelineShaderStageModuleIdentifierCreateInfoEXT { VkStructureType sType; const void* pNext; uint32_t identifierSize; const uint8_t* pIdentifier; } VkPipelineShaderStageModuleIdentifierCreateInfoEXT; typedef struct VkShaderModuleIdentifierEXT { VkStructureType sType; void* pNext; uint32_t identifierSize; uint8_t identifier[VK_MAX_SHADER_MODULE_IDENTIFIER_SIZE_EXT]; } VkShaderModuleIdentifierEXT; typedef void (VKAPI_PTR *PFN_vkGetShaderModuleIdentifierEXT)(VkDevice device, VkShaderModule shaderModule, VkShaderModuleIdentifierEXT* pIdentifier); typedef void (VKAPI_PTR *PFN_vkGetShaderModuleCreateInfoIdentifierEXT)(VkDevice device, const VkShaderModuleCreateInfo* pCreateInfo, VkShaderModuleIdentifierEXT* pIdentifier); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR void VKAPI_CALL vkGetShaderModuleIdentifierEXT( VkDevice device, VkShaderModule shaderModule, VkShaderModuleIdentifierEXT* pIdentifier); VKAPI_ATTR void VKAPI_CALL vkGetShaderModuleCreateInfoIdentifierEXT( VkDevice device, const VkShaderModuleCreateInfo* pCreateInfo, VkShaderModuleIdentifierEXT* pIdentifier); #endif // VK_EXT_rasterization_order_attachment_access is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_rasterization_order_attachment_access 1 #define VK_EXT_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_SPEC_VERSION 1 #define VK_EXT_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_EXTENSION_NAME "VK_EXT_rasterization_order_attachment_access" // VK_NV_optical_flow is a preprocessor guard. Do not pass it to API calls. #define VK_NV_optical_flow 1 VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkOpticalFlowSessionNV) #define VK_NV_OPTICAL_FLOW_SPEC_VERSION 1 #define VK_NV_OPTICAL_FLOW_EXTENSION_NAME "VK_NV_optical_flow" typedef enum VkOpticalFlowPerformanceLevelNV { VK_OPTICAL_FLOW_PERFORMANCE_LEVEL_UNKNOWN_NV = 0, VK_OPTICAL_FLOW_PERFORMANCE_LEVEL_SLOW_NV = 1, VK_OPTICAL_FLOW_PERFORMANCE_LEVEL_MEDIUM_NV = 2, VK_OPTICAL_FLOW_PERFORMANCE_LEVEL_FAST_NV = 3, VK_OPTICAL_FLOW_PERFORMANCE_LEVEL_MAX_ENUM_NV = 0x7FFFFFFF } VkOpticalFlowPerformanceLevelNV; typedef enum VkOpticalFlowSessionBindingPointNV { VK_OPTICAL_FLOW_SESSION_BINDING_POINT_UNKNOWN_NV = 0, VK_OPTICAL_FLOW_SESSION_BINDING_POINT_INPUT_NV = 1, VK_OPTICAL_FLOW_SESSION_BINDING_POINT_REFERENCE_NV = 2, VK_OPTICAL_FLOW_SESSION_BINDING_POINT_HINT_NV = 3, VK_OPTICAL_FLOW_SESSION_BINDING_POINT_FLOW_VECTOR_NV = 4, VK_OPTICAL_FLOW_SESSION_BINDING_POINT_BACKWARD_FLOW_VECTOR_NV = 5, VK_OPTICAL_FLOW_SESSION_BINDING_POINT_COST_NV = 6, VK_OPTICAL_FLOW_SESSION_BINDING_POINT_BACKWARD_COST_NV = 7, VK_OPTICAL_FLOW_SESSION_BINDING_POINT_GLOBAL_FLOW_NV = 8, VK_OPTICAL_FLOW_SESSION_BINDING_POINT_MAX_ENUM_NV = 0x7FFFFFFF } VkOpticalFlowSessionBindingPointNV; typedef enum VkOpticalFlowGridSizeFlagBitsNV { VK_OPTICAL_FLOW_GRID_SIZE_UNKNOWN_NV = 0, VK_OPTICAL_FLOW_GRID_SIZE_1X1_BIT_NV = 0x00000001, VK_OPTICAL_FLOW_GRID_SIZE_2X2_BIT_NV = 0x00000002, VK_OPTICAL_FLOW_GRID_SIZE_4X4_BIT_NV = 0x00000004, VK_OPTICAL_FLOW_GRID_SIZE_8X8_BIT_NV = 0x00000008, VK_OPTICAL_FLOW_GRID_SIZE_FLAG_BITS_MAX_ENUM_NV = 0x7FFFFFFF } VkOpticalFlowGridSizeFlagBitsNV; typedef VkFlags VkOpticalFlowGridSizeFlagsNV; typedef enum VkOpticalFlowUsageFlagBitsNV { VK_OPTICAL_FLOW_USAGE_UNKNOWN_NV = 0, VK_OPTICAL_FLOW_USAGE_INPUT_BIT_NV = 0x00000001, VK_OPTICAL_FLOW_USAGE_OUTPUT_BIT_NV = 0x00000002, VK_OPTICAL_FLOW_USAGE_HINT_BIT_NV = 0x00000004, VK_OPTICAL_FLOW_USAGE_COST_BIT_NV = 0x00000008, VK_OPTICAL_FLOW_USAGE_GLOBAL_FLOW_BIT_NV = 0x00000010, VK_OPTICAL_FLOW_USAGE_FLAG_BITS_MAX_ENUM_NV = 0x7FFFFFFF } VkOpticalFlowUsageFlagBitsNV; typedef VkFlags VkOpticalFlowUsageFlagsNV; typedef enum VkOpticalFlowSessionCreateFlagBitsNV { VK_OPTICAL_FLOW_SESSION_CREATE_ENABLE_HINT_BIT_NV = 0x00000001, VK_OPTICAL_FLOW_SESSION_CREATE_ENABLE_COST_BIT_NV = 0x00000002, VK_OPTICAL_FLOW_SESSION_CREATE_ENABLE_GLOBAL_FLOW_BIT_NV = 0x00000004, VK_OPTICAL_FLOW_SESSION_CREATE_ALLOW_REGIONS_BIT_NV = 0x00000008, VK_OPTICAL_FLOW_SESSION_CREATE_BOTH_DIRECTIONS_BIT_NV = 0x00000010, VK_OPTICAL_FLOW_SESSION_CREATE_FLAG_BITS_MAX_ENUM_NV = 0x7FFFFFFF } VkOpticalFlowSessionCreateFlagBitsNV; typedef VkFlags VkOpticalFlowSessionCreateFlagsNV; typedef enum VkOpticalFlowExecuteFlagBitsNV { VK_OPTICAL_FLOW_EXECUTE_DISABLE_TEMPORAL_HINTS_BIT_NV = 0x00000001, VK_OPTICAL_FLOW_EXECUTE_FLAG_BITS_MAX_ENUM_NV = 0x7FFFFFFF } VkOpticalFlowExecuteFlagBitsNV; typedef VkFlags VkOpticalFlowExecuteFlagsNV; typedef struct VkPhysicalDeviceOpticalFlowFeaturesNV { VkStructureType sType; void* pNext; VkBool32 opticalFlow; } VkPhysicalDeviceOpticalFlowFeaturesNV; typedef struct VkPhysicalDeviceOpticalFlowPropertiesNV { VkStructureType sType; void* pNext; VkOpticalFlowGridSizeFlagsNV supportedOutputGridSizes; VkOpticalFlowGridSizeFlagsNV supportedHintGridSizes; VkBool32 hintSupported; VkBool32 costSupported; VkBool32 bidirectionalFlowSupported; VkBool32 globalFlowSupported; uint32_t minWidth; uint32_t minHeight; uint32_t maxWidth; uint32_t maxHeight; uint32_t maxNumRegionsOfInterest; } VkPhysicalDeviceOpticalFlowPropertiesNV; typedef struct VkOpticalFlowImageFormatInfoNV { VkStructureType sType; const void* pNext; VkOpticalFlowUsageFlagsNV usage; } VkOpticalFlowImageFormatInfoNV; typedef struct VkOpticalFlowImageFormatPropertiesNV { VkStructureType sType; const void* pNext; VkFormat format; } VkOpticalFlowImageFormatPropertiesNV; typedef struct VkOpticalFlowSessionCreateInfoNV { VkStructureType sType; void* pNext; uint32_t width; uint32_t height; VkFormat imageFormat; VkFormat flowVectorFormat; VkFormat costFormat; VkOpticalFlowGridSizeFlagsNV outputGridSize; VkOpticalFlowGridSizeFlagsNV hintGridSize; VkOpticalFlowPerformanceLevelNV performanceLevel; VkOpticalFlowSessionCreateFlagsNV flags; } VkOpticalFlowSessionCreateInfoNV; typedef struct VkOpticalFlowSessionCreatePrivateDataInfoNV { VkStructureType sType; void* pNext; uint32_t id; uint32_t size; const void* pPrivateData; } VkOpticalFlowSessionCreatePrivateDataInfoNV; typedef struct VkOpticalFlowExecuteInfoNV { VkStructureType sType; void* pNext; VkOpticalFlowExecuteFlagsNV flags; uint32_t regionCount; const VkRect2D* pRegions; } VkOpticalFlowExecuteInfoNV; typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceOpticalFlowImageFormatsNV)(VkPhysicalDevice physicalDevice, const VkOpticalFlowImageFormatInfoNV* pOpticalFlowImageFormatInfo, uint32_t* pFormatCount, VkOpticalFlowImageFormatPropertiesNV* pImageFormatProperties); typedef VkResult (VKAPI_PTR *PFN_vkCreateOpticalFlowSessionNV)(VkDevice device, const VkOpticalFlowSessionCreateInfoNV* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkOpticalFlowSessionNV* pSession); typedef void (VKAPI_PTR *PFN_vkDestroyOpticalFlowSessionNV)(VkDevice device, VkOpticalFlowSessionNV session, const VkAllocationCallbacks* pAllocator); typedef VkResult (VKAPI_PTR *PFN_vkBindOpticalFlowSessionImageNV)(VkDevice device, VkOpticalFlowSessionNV session, VkOpticalFlowSessionBindingPointNV bindingPoint, VkImageView view, VkImageLayout layout); typedef void (VKAPI_PTR *PFN_vkCmdOpticalFlowExecuteNV)(VkCommandBuffer commandBuffer, VkOpticalFlowSessionNV session, const VkOpticalFlowExecuteInfoNV* pExecuteInfo); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceOpticalFlowImageFormatsNV( VkPhysicalDevice physicalDevice, const VkOpticalFlowImageFormatInfoNV* pOpticalFlowImageFormatInfo, uint32_t* pFormatCount, VkOpticalFlowImageFormatPropertiesNV* pImageFormatProperties); VKAPI_ATTR VkResult VKAPI_CALL vkCreateOpticalFlowSessionNV( VkDevice device, const VkOpticalFlowSessionCreateInfoNV* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkOpticalFlowSessionNV* pSession); VKAPI_ATTR void VKAPI_CALL vkDestroyOpticalFlowSessionNV( VkDevice device, VkOpticalFlowSessionNV session, const VkAllocationCallbacks* pAllocator); VKAPI_ATTR VkResult VKAPI_CALL vkBindOpticalFlowSessionImageNV( VkDevice device, VkOpticalFlowSessionNV session, VkOpticalFlowSessionBindingPointNV bindingPoint, VkImageView view, VkImageLayout layout); VKAPI_ATTR void VKAPI_CALL vkCmdOpticalFlowExecuteNV( VkCommandBuffer commandBuffer, VkOpticalFlowSessionNV session, const VkOpticalFlowExecuteInfoNV* pExecuteInfo); #endif // VK_EXT_legacy_dithering is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_legacy_dithering 1 #define VK_EXT_LEGACY_DITHERING_SPEC_VERSION 2 #define VK_EXT_LEGACY_DITHERING_EXTENSION_NAME "VK_EXT_legacy_dithering" typedef struct VkPhysicalDeviceLegacyDitheringFeaturesEXT { VkStructureType sType; void* pNext; VkBool32 legacyDithering; } VkPhysicalDeviceLegacyDitheringFeaturesEXT; // VK_EXT_pipeline_protected_access is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_pipeline_protected_access 1 #define VK_EXT_PIPELINE_PROTECTED_ACCESS_SPEC_VERSION 1 #define VK_EXT_PIPELINE_PROTECTED_ACCESS_EXTENSION_NAME "VK_EXT_pipeline_protected_access" typedef VkPhysicalDevicePipelineProtectedAccessFeatures VkPhysicalDevicePipelineProtectedAccessFeaturesEXT; // VK_AMD_anti_lag is a preprocessor guard. Do not pass it to API calls. #define VK_AMD_anti_lag 1 #define VK_AMD_ANTI_LAG_SPEC_VERSION 1 #define VK_AMD_ANTI_LAG_EXTENSION_NAME "VK_AMD_anti_lag" typedef enum VkAntiLagModeAMD { VK_ANTI_LAG_MODE_DRIVER_CONTROL_AMD = 0, VK_ANTI_LAG_MODE_ON_AMD = 1, VK_ANTI_LAG_MODE_OFF_AMD = 2, VK_ANTI_LAG_MODE_MAX_ENUM_AMD = 0x7FFFFFFF } VkAntiLagModeAMD; typedef enum VkAntiLagStageAMD { VK_ANTI_LAG_STAGE_INPUT_AMD = 0, VK_ANTI_LAG_STAGE_PRESENT_AMD = 1, VK_ANTI_LAG_STAGE_MAX_ENUM_AMD = 0x7FFFFFFF } VkAntiLagStageAMD; typedef struct VkPhysicalDeviceAntiLagFeaturesAMD { VkStructureType sType; void* pNext; VkBool32 antiLag; } VkPhysicalDeviceAntiLagFeaturesAMD; typedef struct VkAntiLagPresentationInfoAMD { VkStructureType sType; void* pNext; VkAntiLagStageAMD stage; uint64_t frameIndex; } VkAntiLagPresentationInfoAMD; typedef struct VkAntiLagDataAMD { VkStructureType sType; const void* pNext; VkAntiLagModeAMD mode; uint32_t maxFPS; const VkAntiLagPresentationInfoAMD* pPresentationInfo; } VkAntiLagDataAMD; typedef void (VKAPI_PTR *PFN_vkAntiLagUpdateAMD)(VkDevice device, const VkAntiLagDataAMD* pData); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR void VKAPI_CALL vkAntiLagUpdateAMD( VkDevice device, const VkAntiLagDataAMD* pData); #endif // VK_EXT_shader_object is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_shader_object 1 VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkShaderEXT) #define VK_EXT_SHADER_OBJECT_SPEC_VERSION 1 #define VK_EXT_SHADER_OBJECT_EXTENSION_NAME "VK_EXT_shader_object" typedef enum VkShaderCodeTypeEXT { VK_SHADER_CODE_TYPE_BINARY_EXT = 0, VK_SHADER_CODE_TYPE_SPIRV_EXT = 1, VK_SHADER_CODE_TYPE_MAX_ENUM_EXT = 0x7FFFFFFF } VkShaderCodeTypeEXT; typedef enum VkDepthClampModeEXT { VK_DEPTH_CLAMP_MODE_VIEWPORT_RANGE_EXT = 0, VK_DEPTH_CLAMP_MODE_USER_DEFINED_RANGE_EXT = 1, VK_DEPTH_CLAMP_MODE_MAX_ENUM_EXT = 0x7FFFFFFF } VkDepthClampModeEXT; typedef enum VkShaderCreateFlagBitsEXT { VK_SHADER_CREATE_LINK_STAGE_BIT_EXT = 0x00000001, VK_SHADER_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT_EXT = 0x00000002, VK_SHADER_CREATE_REQUIRE_FULL_SUBGROUPS_BIT_EXT = 0x00000004, VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT = 0x00000008, VK_SHADER_CREATE_DISPATCH_BASE_BIT_EXT = 0x00000010, VK_SHADER_CREATE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_EXT = 0x00000020, VK_SHADER_CREATE_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT = 0x00000040, VK_SHADER_CREATE_INDIRECT_BINDABLE_BIT_EXT = 0x00000080, VK_SHADER_CREATE_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF } VkShaderCreateFlagBitsEXT; typedef VkFlags VkShaderCreateFlagsEXT; typedef struct VkPhysicalDeviceShaderObjectFeaturesEXT { VkStructureType sType; void* pNext; VkBool32 shaderObject; } VkPhysicalDeviceShaderObjectFeaturesEXT; typedef struct VkPhysicalDeviceShaderObjectPropertiesEXT { VkStructureType sType; void* pNext; uint8_t shaderBinaryUUID[VK_UUID_SIZE]; uint32_t shaderBinaryVersion; } VkPhysicalDeviceShaderObjectPropertiesEXT; typedef struct VkShaderCreateInfoEXT { VkStructureType sType; const void* pNext; VkShaderCreateFlagsEXT flags; VkShaderStageFlagBits stage; VkShaderStageFlags nextStage; VkShaderCodeTypeEXT codeType; size_t codeSize; const void* pCode; const char* pName; uint32_t setLayoutCount; const VkDescriptorSetLayout* pSetLayouts; uint32_t pushConstantRangeCount; const VkPushConstantRange* pPushConstantRanges; const VkSpecializationInfo* pSpecializationInfo; } VkShaderCreateInfoEXT; typedef VkPipelineShaderStageRequiredSubgroupSizeCreateInfo VkShaderRequiredSubgroupSizeCreateInfoEXT; typedef struct VkDepthClampRangeEXT { float minDepthClamp; float maxDepthClamp; } VkDepthClampRangeEXT; typedef VkResult (VKAPI_PTR *PFN_vkCreateShadersEXT)(VkDevice device, uint32_t createInfoCount, const VkShaderCreateInfoEXT* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkShaderEXT* pShaders); typedef void (VKAPI_PTR *PFN_vkDestroyShaderEXT)(VkDevice device, VkShaderEXT shader, const VkAllocationCallbacks* pAllocator); typedef VkResult (VKAPI_PTR *PFN_vkGetShaderBinaryDataEXT)(VkDevice device, VkShaderEXT shader, size_t* pDataSize, void* pData); typedef void (VKAPI_PTR *PFN_vkCmdBindShadersEXT)(VkCommandBuffer commandBuffer, uint32_t stageCount, const VkShaderStageFlagBits* pStages, const VkShaderEXT* pShaders); typedef void (VKAPI_PTR *PFN_vkCmdSetDepthClampRangeEXT)(VkCommandBuffer commandBuffer, VkDepthClampModeEXT depthClampMode, const VkDepthClampRangeEXT* pDepthClampRange); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkCreateShadersEXT( VkDevice device, uint32_t createInfoCount, const VkShaderCreateInfoEXT* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkShaderEXT* pShaders); VKAPI_ATTR void VKAPI_CALL vkDestroyShaderEXT( VkDevice device, VkShaderEXT shader, const VkAllocationCallbacks* pAllocator); VKAPI_ATTR VkResult VKAPI_CALL vkGetShaderBinaryDataEXT( VkDevice device, VkShaderEXT shader, size_t* pDataSize, void* pData); VKAPI_ATTR void VKAPI_CALL vkCmdBindShadersEXT( VkCommandBuffer commandBuffer, uint32_t stageCount, const VkShaderStageFlagBits* pStages, const VkShaderEXT* pShaders); VKAPI_ATTR void VKAPI_CALL vkCmdSetDepthClampRangeEXT( VkCommandBuffer commandBuffer, VkDepthClampModeEXT depthClampMode, const VkDepthClampRangeEXT* pDepthClampRange); #endif // VK_QCOM_tile_properties is a preprocessor guard. Do not pass it to API calls. #define VK_QCOM_tile_properties 1 #define VK_QCOM_TILE_PROPERTIES_SPEC_VERSION 1 #define VK_QCOM_TILE_PROPERTIES_EXTENSION_NAME "VK_QCOM_tile_properties" typedef struct VkPhysicalDeviceTilePropertiesFeaturesQCOM { VkStructureType sType; void* pNext; VkBool32 tileProperties; } VkPhysicalDeviceTilePropertiesFeaturesQCOM; typedef struct VkTilePropertiesQCOM { VkStructureType sType; void* pNext; VkExtent3D tileSize; VkExtent2D apronSize; VkOffset2D origin; } VkTilePropertiesQCOM; typedef VkResult (VKAPI_PTR *PFN_vkGetFramebufferTilePropertiesQCOM)(VkDevice device, VkFramebuffer framebuffer, uint32_t* pPropertiesCount, VkTilePropertiesQCOM* pProperties); typedef VkResult (VKAPI_PTR *PFN_vkGetDynamicRenderingTilePropertiesQCOM)(VkDevice device, const VkRenderingInfo* pRenderingInfo, VkTilePropertiesQCOM* pProperties); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkGetFramebufferTilePropertiesQCOM( VkDevice device, VkFramebuffer framebuffer, uint32_t* pPropertiesCount, VkTilePropertiesQCOM* pProperties); VKAPI_ATTR VkResult VKAPI_CALL vkGetDynamicRenderingTilePropertiesQCOM( VkDevice device, const VkRenderingInfo* pRenderingInfo, VkTilePropertiesQCOM* pProperties); #endif // VK_SEC_amigo_profiling is a preprocessor guard. Do not pass it to API calls. #define VK_SEC_amigo_profiling 1 #define VK_SEC_AMIGO_PROFILING_SPEC_VERSION 1 #define VK_SEC_AMIGO_PROFILING_EXTENSION_NAME "VK_SEC_amigo_profiling" typedef struct VkPhysicalDeviceAmigoProfilingFeaturesSEC { VkStructureType sType; void* pNext; VkBool32 amigoProfiling; } VkPhysicalDeviceAmigoProfilingFeaturesSEC; typedef struct VkAmigoProfilingSubmitInfoSEC { VkStructureType sType; const void* pNext; uint64_t firstDrawTimestamp; uint64_t swapBufferTimestamp; } VkAmigoProfilingSubmitInfoSEC; // VK_QCOM_multiview_per_view_viewports is a preprocessor guard. Do not pass it to API calls. #define VK_QCOM_multiview_per_view_viewports 1 #define VK_QCOM_MULTIVIEW_PER_VIEW_VIEWPORTS_SPEC_VERSION 1 #define VK_QCOM_MULTIVIEW_PER_VIEW_VIEWPORTS_EXTENSION_NAME "VK_QCOM_multiview_per_view_viewports" typedef struct VkPhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM { VkStructureType sType; void* pNext; VkBool32 multiviewPerViewViewports; } VkPhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM; // VK_NV_ray_tracing_invocation_reorder is a preprocessor guard. Do not pass it to API calls. #define VK_NV_ray_tracing_invocation_reorder 1 #define VK_NV_RAY_TRACING_INVOCATION_REORDER_SPEC_VERSION 1 #define VK_NV_RAY_TRACING_INVOCATION_REORDER_EXTENSION_NAME "VK_NV_ray_tracing_invocation_reorder" typedef enum VkRayTracingInvocationReorderModeNV { VK_RAY_TRACING_INVOCATION_REORDER_MODE_NONE_NV = 0, VK_RAY_TRACING_INVOCATION_REORDER_MODE_REORDER_NV = 1, VK_RAY_TRACING_INVOCATION_REORDER_MODE_MAX_ENUM_NV = 0x7FFFFFFF } VkRayTracingInvocationReorderModeNV; typedef struct VkPhysicalDeviceRayTracingInvocationReorderPropertiesNV { VkStructureType sType; void* pNext; VkRayTracingInvocationReorderModeNV rayTracingInvocationReorderReorderingHint; } VkPhysicalDeviceRayTracingInvocationReorderPropertiesNV; typedef struct VkPhysicalDeviceRayTracingInvocationReorderFeaturesNV { VkStructureType sType; void* pNext; VkBool32 rayTracingInvocationReorder; } VkPhysicalDeviceRayTracingInvocationReorderFeaturesNV; // VK_NV_cooperative_vector is a preprocessor guard. Do not pass it to API calls. #define VK_NV_cooperative_vector 1 #define VK_NV_COOPERATIVE_VECTOR_SPEC_VERSION 4 #define VK_NV_COOPERATIVE_VECTOR_EXTENSION_NAME "VK_NV_cooperative_vector" typedef enum VkCooperativeVectorMatrixLayoutNV { VK_COOPERATIVE_VECTOR_MATRIX_LAYOUT_ROW_MAJOR_NV = 0, VK_COOPERATIVE_VECTOR_MATRIX_LAYOUT_COLUMN_MAJOR_NV = 1, VK_COOPERATIVE_VECTOR_MATRIX_LAYOUT_INFERENCING_OPTIMAL_NV = 2, VK_COOPERATIVE_VECTOR_MATRIX_LAYOUT_TRAINING_OPTIMAL_NV = 3, VK_COOPERATIVE_VECTOR_MATRIX_LAYOUT_MAX_ENUM_NV = 0x7FFFFFFF } VkCooperativeVectorMatrixLayoutNV; typedef struct VkPhysicalDeviceCooperativeVectorPropertiesNV { VkStructureType sType; void* pNext; VkShaderStageFlags cooperativeVectorSupportedStages; VkBool32 cooperativeVectorTrainingFloat16Accumulation; VkBool32 cooperativeVectorTrainingFloat32Accumulation; uint32_t maxCooperativeVectorComponents; } VkPhysicalDeviceCooperativeVectorPropertiesNV; typedef struct VkPhysicalDeviceCooperativeVectorFeaturesNV { VkStructureType sType; void* pNext; VkBool32 cooperativeVector; VkBool32 cooperativeVectorTraining; } VkPhysicalDeviceCooperativeVectorFeaturesNV; typedef struct VkCooperativeVectorPropertiesNV { VkStructureType sType; void* pNext; VkComponentTypeKHR inputType; VkComponentTypeKHR inputInterpretation; VkComponentTypeKHR matrixInterpretation; VkComponentTypeKHR biasInterpretation; VkComponentTypeKHR resultType; VkBool32 transpose; } VkCooperativeVectorPropertiesNV; typedef struct VkConvertCooperativeVectorMatrixInfoNV { VkStructureType sType; const void* pNext; size_t srcSize; VkDeviceOrHostAddressConstKHR srcData; size_t* pDstSize; VkDeviceOrHostAddressKHR dstData; VkComponentTypeKHR srcComponentType; VkComponentTypeKHR dstComponentType; uint32_t numRows; uint32_t numColumns; VkCooperativeVectorMatrixLayoutNV srcLayout; size_t srcStride; VkCooperativeVectorMatrixLayoutNV dstLayout; size_t dstStride; } VkConvertCooperativeVectorMatrixInfoNV; typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceCooperativeVectorPropertiesNV)(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkCooperativeVectorPropertiesNV* pProperties); typedef VkResult (VKAPI_PTR *PFN_vkConvertCooperativeVectorMatrixNV)(VkDevice device, const VkConvertCooperativeVectorMatrixInfoNV* pInfo); typedef void (VKAPI_PTR *PFN_vkCmdConvertCooperativeVectorMatrixNV)(VkCommandBuffer commandBuffer, uint32_t infoCount, const VkConvertCooperativeVectorMatrixInfoNV* pInfos); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceCooperativeVectorPropertiesNV( VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkCooperativeVectorPropertiesNV* pProperties); VKAPI_ATTR VkResult VKAPI_CALL vkConvertCooperativeVectorMatrixNV( VkDevice device, const VkConvertCooperativeVectorMatrixInfoNV* pInfo); VKAPI_ATTR void VKAPI_CALL vkCmdConvertCooperativeVectorMatrixNV( VkCommandBuffer commandBuffer, uint32_t infoCount, const VkConvertCooperativeVectorMatrixInfoNV* pInfos); #endif // VK_NV_extended_sparse_address_space is a preprocessor guard. Do not pass it to API calls. #define VK_NV_extended_sparse_address_space 1 #define VK_NV_EXTENDED_SPARSE_ADDRESS_SPACE_SPEC_VERSION 1 #define VK_NV_EXTENDED_SPARSE_ADDRESS_SPACE_EXTENSION_NAME "VK_NV_extended_sparse_address_space" typedef struct VkPhysicalDeviceExtendedSparseAddressSpaceFeaturesNV { VkStructureType sType; void* pNext; VkBool32 extendedSparseAddressSpace; } VkPhysicalDeviceExtendedSparseAddressSpaceFeaturesNV; typedef struct VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV { VkStructureType sType; void* pNext; VkDeviceSize extendedSparseAddressSpaceSize; VkImageUsageFlags extendedSparseImageUsageFlags; VkBufferUsageFlags extendedSparseBufferUsageFlags; } VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV; // VK_EXT_mutable_descriptor_type is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_mutable_descriptor_type 1 #define VK_EXT_MUTABLE_DESCRIPTOR_TYPE_SPEC_VERSION 1 #define VK_EXT_MUTABLE_DESCRIPTOR_TYPE_EXTENSION_NAME "VK_EXT_mutable_descriptor_type" // VK_EXT_legacy_vertex_attributes is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_legacy_vertex_attributes 1 #define VK_EXT_LEGACY_VERTEX_ATTRIBUTES_SPEC_VERSION 1 #define VK_EXT_LEGACY_VERTEX_ATTRIBUTES_EXTENSION_NAME "VK_EXT_legacy_vertex_attributes" typedef struct VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT { VkStructureType sType; void* pNext; VkBool32 legacyVertexAttributes; } VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT; typedef struct VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT { VkStructureType sType; void* pNext; VkBool32 nativeUnalignedPerformance; } VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT; // VK_EXT_layer_settings is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_layer_settings 1 #define VK_EXT_LAYER_SETTINGS_SPEC_VERSION 2 #define VK_EXT_LAYER_SETTINGS_EXTENSION_NAME "VK_EXT_layer_settings" typedef enum VkLayerSettingTypeEXT { VK_LAYER_SETTING_TYPE_BOOL32_EXT = 0, VK_LAYER_SETTING_TYPE_INT32_EXT = 1, VK_LAYER_SETTING_TYPE_INT64_EXT = 2, VK_LAYER_SETTING_TYPE_UINT32_EXT = 3, VK_LAYER_SETTING_TYPE_UINT64_EXT = 4, VK_LAYER_SETTING_TYPE_FLOAT32_EXT = 5, VK_LAYER_SETTING_TYPE_FLOAT64_EXT = 6, VK_LAYER_SETTING_TYPE_STRING_EXT = 7, VK_LAYER_SETTING_TYPE_MAX_ENUM_EXT = 0x7FFFFFFF } VkLayerSettingTypeEXT; typedef struct VkLayerSettingEXT { const char* pLayerName; const char* pSettingName; VkLayerSettingTypeEXT type; uint32_t valueCount; const void* pValues; } VkLayerSettingEXT; typedef struct VkLayerSettingsCreateInfoEXT { VkStructureType sType; const void* pNext; uint32_t settingCount; const VkLayerSettingEXT* pSettings; } VkLayerSettingsCreateInfoEXT; // VK_ARM_shader_core_builtins is a preprocessor guard. Do not pass it to API calls. #define VK_ARM_shader_core_builtins 1 #define VK_ARM_SHADER_CORE_BUILTINS_SPEC_VERSION 2 #define VK_ARM_SHADER_CORE_BUILTINS_EXTENSION_NAME "VK_ARM_shader_core_builtins" typedef struct VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM { VkStructureType sType; void* pNext; VkBool32 shaderCoreBuiltins; } VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM; typedef struct VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM { VkStructureType sType; void* pNext; uint64_t shaderCoreMask; uint32_t shaderCoreCount; uint32_t shaderWarpsPerCore; } VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM; // VK_EXT_pipeline_library_group_handles is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_pipeline_library_group_handles 1 #define VK_EXT_PIPELINE_LIBRARY_GROUP_HANDLES_SPEC_VERSION 1 #define VK_EXT_PIPELINE_LIBRARY_GROUP_HANDLES_EXTENSION_NAME "VK_EXT_pipeline_library_group_handles" typedef struct VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT { VkStructureType sType; void* pNext; VkBool32 pipelineLibraryGroupHandles; } VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT; // VK_EXT_dynamic_rendering_unused_attachments is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_dynamic_rendering_unused_attachments 1 #define VK_EXT_DYNAMIC_RENDERING_UNUSED_ATTACHMENTS_SPEC_VERSION 1 #define VK_EXT_DYNAMIC_RENDERING_UNUSED_ATTACHMENTS_EXTENSION_NAME "VK_EXT_dynamic_rendering_unused_attachments" typedef struct VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT { VkStructureType sType; void* pNext; VkBool32 dynamicRenderingUnusedAttachments; } VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT; // VK_NV_low_latency2 is a preprocessor guard. Do not pass it to API calls. #define VK_NV_low_latency2 1 #define VK_NV_LOW_LATENCY_2_SPEC_VERSION 2 #define VK_NV_LOW_LATENCY_2_EXTENSION_NAME "VK_NV_low_latency2" typedef enum VkLatencyMarkerNV { VK_LATENCY_MARKER_SIMULATION_START_NV = 0, VK_LATENCY_MARKER_SIMULATION_END_NV = 1, VK_LATENCY_MARKER_RENDERSUBMIT_START_NV = 2, VK_LATENCY_MARKER_RENDERSUBMIT_END_NV = 3, VK_LATENCY_MARKER_PRESENT_START_NV = 4, VK_LATENCY_MARKER_PRESENT_END_NV = 5, VK_LATENCY_MARKER_INPUT_SAMPLE_NV = 6, VK_LATENCY_MARKER_TRIGGER_FLASH_NV = 7, VK_LATENCY_MARKER_OUT_OF_BAND_RENDERSUBMIT_START_NV = 8, VK_LATENCY_MARKER_OUT_OF_BAND_RENDERSUBMIT_END_NV = 9, VK_LATENCY_MARKER_OUT_OF_BAND_PRESENT_START_NV = 10, VK_LATENCY_MARKER_OUT_OF_BAND_PRESENT_END_NV = 11, VK_LATENCY_MARKER_MAX_ENUM_NV = 0x7FFFFFFF } VkLatencyMarkerNV; typedef enum VkOutOfBandQueueTypeNV { VK_OUT_OF_BAND_QUEUE_TYPE_RENDER_NV = 0, VK_OUT_OF_BAND_QUEUE_TYPE_PRESENT_NV = 1, VK_OUT_OF_BAND_QUEUE_TYPE_MAX_ENUM_NV = 0x7FFFFFFF } VkOutOfBandQueueTypeNV; typedef struct VkLatencySleepModeInfoNV { VkStructureType sType; const void* pNext; VkBool32 lowLatencyMode; VkBool32 lowLatencyBoost; uint32_t minimumIntervalUs; } VkLatencySleepModeInfoNV; typedef struct VkLatencySleepInfoNV { VkStructureType sType; const void* pNext; VkSemaphore signalSemaphore; uint64_t value; } VkLatencySleepInfoNV; typedef struct VkSetLatencyMarkerInfoNV { VkStructureType sType; const void* pNext; uint64_t presentID; VkLatencyMarkerNV marker; } VkSetLatencyMarkerInfoNV; typedef struct VkLatencyTimingsFrameReportNV { VkStructureType sType; const void* pNext; uint64_t presentID; uint64_t inputSampleTimeUs; uint64_t simStartTimeUs; uint64_t simEndTimeUs; uint64_t renderSubmitStartTimeUs; uint64_t renderSubmitEndTimeUs; uint64_t presentStartTimeUs; uint64_t presentEndTimeUs; uint64_t driverStartTimeUs; uint64_t driverEndTimeUs; uint64_t osRenderQueueStartTimeUs; uint64_t osRenderQueueEndTimeUs; uint64_t gpuRenderStartTimeUs; uint64_t gpuRenderEndTimeUs; } VkLatencyTimingsFrameReportNV; typedef struct VkGetLatencyMarkerInfoNV { VkStructureType sType; const void* pNext; uint32_t timingCount; VkLatencyTimingsFrameReportNV* pTimings; } VkGetLatencyMarkerInfoNV; typedef struct VkLatencySubmissionPresentIdNV { VkStructureType sType; const void* pNext; uint64_t presentID; } VkLatencySubmissionPresentIdNV; typedef struct VkSwapchainLatencyCreateInfoNV { VkStructureType sType; const void* pNext; VkBool32 latencyModeEnable; } VkSwapchainLatencyCreateInfoNV; typedef struct VkOutOfBandQueueTypeInfoNV { VkStructureType sType; const void* pNext; VkOutOfBandQueueTypeNV queueType; } VkOutOfBandQueueTypeInfoNV; typedef struct VkLatencySurfaceCapabilitiesNV { VkStructureType sType; const void* pNext; uint32_t presentModeCount; VkPresentModeKHR* pPresentModes; } VkLatencySurfaceCapabilitiesNV; typedef VkResult (VKAPI_PTR *PFN_vkSetLatencySleepModeNV)(VkDevice device, VkSwapchainKHR swapchain, const VkLatencySleepModeInfoNV* pSleepModeInfo); typedef VkResult (VKAPI_PTR *PFN_vkLatencySleepNV)(VkDevice device, VkSwapchainKHR swapchain, const VkLatencySleepInfoNV* pSleepInfo); typedef void (VKAPI_PTR *PFN_vkSetLatencyMarkerNV)(VkDevice device, VkSwapchainKHR swapchain, const VkSetLatencyMarkerInfoNV* pLatencyMarkerInfo); typedef void (VKAPI_PTR *PFN_vkGetLatencyTimingsNV)(VkDevice device, VkSwapchainKHR swapchain, VkGetLatencyMarkerInfoNV* pLatencyMarkerInfo); typedef void (VKAPI_PTR *PFN_vkQueueNotifyOutOfBandNV)(VkQueue queue, const VkOutOfBandQueueTypeInfoNV* pQueueTypeInfo); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkSetLatencySleepModeNV( VkDevice device, VkSwapchainKHR swapchain, const VkLatencySleepModeInfoNV* pSleepModeInfo); VKAPI_ATTR VkResult VKAPI_CALL vkLatencySleepNV( VkDevice device, VkSwapchainKHR swapchain, const VkLatencySleepInfoNV* pSleepInfo); VKAPI_ATTR void VKAPI_CALL vkSetLatencyMarkerNV( VkDevice device, VkSwapchainKHR swapchain, const VkSetLatencyMarkerInfoNV* pLatencyMarkerInfo); VKAPI_ATTR void VKAPI_CALL vkGetLatencyTimingsNV( VkDevice device, VkSwapchainKHR swapchain, VkGetLatencyMarkerInfoNV* pLatencyMarkerInfo); VKAPI_ATTR void VKAPI_CALL vkQueueNotifyOutOfBandNV( VkQueue queue, const VkOutOfBandQueueTypeInfoNV* pQueueTypeInfo); #endif // VK_QCOM_multiview_per_view_render_areas is a preprocessor guard. Do not pass it to API calls. #define VK_QCOM_multiview_per_view_render_areas 1 #define VK_QCOM_MULTIVIEW_PER_VIEW_RENDER_AREAS_SPEC_VERSION 1 #define VK_QCOM_MULTIVIEW_PER_VIEW_RENDER_AREAS_EXTENSION_NAME "VK_QCOM_multiview_per_view_render_areas" typedef struct VkPhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM { VkStructureType sType; void* pNext; VkBool32 multiviewPerViewRenderAreas; } VkPhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM; typedef struct VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM { VkStructureType sType; const void* pNext; uint32_t perViewRenderAreaCount; const VkRect2D* pPerViewRenderAreas; } VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM; // VK_NV_per_stage_descriptor_set is a preprocessor guard. Do not pass it to API calls. #define VK_NV_per_stage_descriptor_set 1 #define VK_NV_PER_STAGE_DESCRIPTOR_SET_SPEC_VERSION 1 #define VK_NV_PER_STAGE_DESCRIPTOR_SET_EXTENSION_NAME "VK_NV_per_stage_descriptor_set" typedef struct VkPhysicalDevicePerStageDescriptorSetFeaturesNV { VkStructureType sType; void* pNext; VkBool32 perStageDescriptorSet; VkBool32 dynamicPipelineLayout; } VkPhysicalDevicePerStageDescriptorSetFeaturesNV; // VK_QCOM_image_processing2 is a preprocessor guard. Do not pass it to API calls. #define VK_QCOM_image_processing2 1 #define VK_QCOM_IMAGE_PROCESSING_2_SPEC_VERSION 1 #define VK_QCOM_IMAGE_PROCESSING_2_EXTENSION_NAME "VK_QCOM_image_processing2" typedef enum VkBlockMatchWindowCompareModeQCOM { VK_BLOCK_MATCH_WINDOW_COMPARE_MODE_MIN_QCOM = 0, VK_BLOCK_MATCH_WINDOW_COMPARE_MODE_MAX_QCOM = 1, VK_BLOCK_MATCH_WINDOW_COMPARE_MODE_MAX_ENUM_QCOM = 0x7FFFFFFF } VkBlockMatchWindowCompareModeQCOM; typedef struct VkPhysicalDeviceImageProcessing2FeaturesQCOM { VkStructureType sType; void* pNext; VkBool32 textureBlockMatch2; } VkPhysicalDeviceImageProcessing2FeaturesQCOM; typedef struct VkPhysicalDeviceImageProcessing2PropertiesQCOM { VkStructureType sType; void* pNext; VkExtent2D maxBlockMatchWindow; } VkPhysicalDeviceImageProcessing2PropertiesQCOM; typedef struct VkSamplerBlockMatchWindowCreateInfoQCOM { VkStructureType sType; const void* pNext; VkExtent2D windowExtent; VkBlockMatchWindowCompareModeQCOM windowCompareMode; } VkSamplerBlockMatchWindowCreateInfoQCOM; // VK_QCOM_filter_cubic_weights is a preprocessor guard. Do not pass it to API calls. #define VK_QCOM_filter_cubic_weights 1 #define VK_QCOM_FILTER_CUBIC_WEIGHTS_SPEC_VERSION 1 #define VK_QCOM_FILTER_CUBIC_WEIGHTS_EXTENSION_NAME "VK_QCOM_filter_cubic_weights" typedef enum VkCubicFilterWeightsQCOM { VK_CUBIC_FILTER_WEIGHTS_CATMULL_ROM_QCOM = 0, VK_CUBIC_FILTER_WEIGHTS_ZERO_TANGENT_CARDINAL_QCOM = 1, VK_CUBIC_FILTER_WEIGHTS_B_SPLINE_QCOM = 2, VK_CUBIC_FILTER_WEIGHTS_MITCHELL_NETRAVALI_QCOM = 3, VK_CUBIC_FILTER_WEIGHTS_MAX_ENUM_QCOM = 0x7FFFFFFF } VkCubicFilterWeightsQCOM; typedef struct VkPhysicalDeviceCubicWeightsFeaturesQCOM { VkStructureType sType; void* pNext; VkBool32 selectableCubicWeights; } VkPhysicalDeviceCubicWeightsFeaturesQCOM; typedef struct VkSamplerCubicWeightsCreateInfoQCOM { VkStructureType sType; const void* pNext; VkCubicFilterWeightsQCOM cubicWeights; } VkSamplerCubicWeightsCreateInfoQCOM; typedef struct VkBlitImageCubicWeightsInfoQCOM { VkStructureType sType; const void* pNext; VkCubicFilterWeightsQCOM cubicWeights; } VkBlitImageCubicWeightsInfoQCOM; // VK_QCOM_ycbcr_degamma is a preprocessor guard. Do not pass it to API calls. #define VK_QCOM_ycbcr_degamma 1 #define VK_QCOM_YCBCR_DEGAMMA_SPEC_VERSION 1 #define VK_QCOM_YCBCR_DEGAMMA_EXTENSION_NAME "VK_QCOM_ycbcr_degamma" typedef struct VkPhysicalDeviceYcbcrDegammaFeaturesQCOM { VkStructureType sType; void* pNext; VkBool32 ycbcrDegamma; } VkPhysicalDeviceYcbcrDegammaFeaturesQCOM; typedef struct VkSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM { VkStructureType sType; void* pNext; VkBool32 enableYDegamma; VkBool32 enableCbCrDegamma; } VkSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM; // VK_QCOM_filter_cubic_clamp is a preprocessor guard. Do not pass it to API calls. #define VK_QCOM_filter_cubic_clamp 1 #define VK_QCOM_FILTER_CUBIC_CLAMP_SPEC_VERSION 1 #define VK_QCOM_FILTER_CUBIC_CLAMP_EXTENSION_NAME "VK_QCOM_filter_cubic_clamp" typedef struct VkPhysicalDeviceCubicClampFeaturesQCOM { VkStructureType sType; void* pNext; VkBool32 cubicRangeClamp; } VkPhysicalDeviceCubicClampFeaturesQCOM; // VK_EXT_attachment_feedback_loop_dynamic_state is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_attachment_feedback_loop_dynamic_state 1 #define VK_EXT_ATTACHMENT_FEEDBACK_LOOP_DYNAMIC_STATE_SPEC_VERSION 1 #define VK_EXT_ATTACHMENT_FEEDBACK_LOOP_DYNAMIC_STATE_EXTENSION_NAME "VK_EXT_attachment_feedback_loop_dynamic_state" typedef struct VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT { VkStructureType sType; void* pNext; VkBool32 attachmentFeedbackLoopDynamicState; } VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT; typedef void (VKAPI_PTR *PFN_vkCmdSetAttachmentFeedbackLoopEnableEXT)(VkCommandBuffer commandBuffer, VkImageAspectFlags aspectMask); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR void VKAPI_CALL vkCmdSetAttachmentFeedbackLoopEnableEXT( VkCommandBuffer commandBuffer, VkImageAspectFlags aspectMask); #endif // VK_MSFT_layered_driver is a preprocessor guard. Do not pass it to API calls. #define VK_MSFT_layered_driver 1 #define VK_MSFT_LAYERED_DRIVER_SPEC_VERSION 1 #define VK_MSFT_LAYERED_DRIVER_EXTENSION_NAME "VK_MSFT_layered_driver" typedef enum VkLayeredDriverUnderlyingApiMSFT { VK_LAYERED_DRIVER_UNDERLYING_API_NONE_MSFT = 0, VK_LAYERED_DRIVER_UNDERLYING_API_D3D12_MSFT = 1, VK_LAYERED_DRIVER_UNDERLYING_API_MAX_ENUM_MSFT = 0x7FFFFFFF } VkLayeredDriverUnderlyingApiMSFT; typedef struct VkPhysicalDeviceLayeredDriverPropertiesMSFT { VkStructureType sType; void* pNext; VkLayeredDriverUnderlyingApiMSFT underlyingAPI; } VkPhysicalDeviceLayeredDriverPropertiesMSFT; // VK_NV_descriptor_pool_overallocation is a preprocessor guard. Do not pass it to API calls. #define VK_NV_descriptor_pool_overallocation 1 #define VK_NV_DESCRIPTOR_POOL_OVERALLOCATION_SPEC_VERSION 1 #define VK_NV_DESCRIPTOR_POOL_OVERALLOCATION_EXTENSION_NAME "VK_NV_descriptor_pool_overallocation" typedef struct VkPhysicalDeviceDescriptorPoolOverallocationFeaturesNV { VkStructureType sType; void* pNext; VkBool32 descriptorPoolOverallocation; } VkPhysicalDeviceDescriptorPoolOverallocationFeaturesNV; // VK_NV_display_stereo is a preprocessor guard. Do not pass it to API calls. #define VK_NV_display_stereo 1 #define VK_NV_DISPLAY_STEREO_SPEC_VERSION 1 #define VK_NV_DISPLAY_STEREO_EXTENSION_NAME "VK_NV_display_stereo" typedef enum VkDisplaySurfaceStereoTypeNV { VK_DISPLAY_SURFACE_STEREO_TYPE_NONE_NV = 0, VK_DISPLAY_SURFACE_STEREO_TYPE_ONBOARD_DIN_NV = 1, VK_DISPLAY_SURFACE_STEREO_TYPE_HDMI_3D_NV = 2, VK_DISPLAY_SURFACE_STEREO_TYPE_INBAND_DISPLAYPORT_NV = 3, VK_DISPLAY_SURFACE_STEREO_TYPE_MAX_ENUM_NV = 0x7FFFFFFF } VkDisplaySurfaceStereoTypeNV; typedef struct VkDisplaySurfaceStereoCreateInfoNV { VkStructureType sType; const void* pNext; VkDisplaySurfaceStereoTypeNV stereoType; } VkDisplaySurfaceStereoCreateInfoNV; typedef struct VkDisplayModeStereoPropertiesNV { VkStructureType sType; const void* pNext; VkBool32 hdmi3DSupported; } VkDisplayModeStereoPropertiesNV; // VK_NV_raw_access_chains is a preprocessor guard. Do not pass it to API calls. #define VK_NV_raw_access_chains 1 #define VK_NV_RAW_ACCESS_CHAINS_SPEC_VERSION 1 #define VK_NV_RAW_ACCESS_CHAINS_EXTENSION_NAME "VK_NV_raw_access_chains" typedef struct VkPhysicalDeviceRawAccessChainsFeaturesNV { VkStructureType sType; void* pNext; VkBool32 shaderRawAccessChains; } VkPhysicalDeviceRawAccessChainsFeaturesNV; // VK_NV_command_buffer_inheritance is a preprocessor guard. Do not pass it to API calls. #define VK_NV_command_buffer_inheritance 1 #define VK_NV_COMMAND_BUFFER_INHERITANCE_SPEC_VERSION 1 #define VK_NV_COMMAND_BUFFER_INHERITANCE_EXTENSION_NAME "VK_NV_command_buffer_inheritance" typedef struct VkPhysicalDeviceCommandBufferInheritanceFeaturesNV { VkStructureType sType; void* pNext; VkBool32 commandBufferInheritance; } VkPhysicalDeviceCommandBufferInheritanceFeaturesNV; // VK_NV_shader_atomic_float16_vector is a preprocessor guard. Do not pass it to API calls. #define VK_NV_shader_atomic_float16_vector 1 #define VK_NV_SHADER_ATOMIC_FLOAT16_VECTOR_SPEC_VERSION 1 #define VK_NV_SHADER_ATOMIC_FLOAT16_VECTOR_EXTENSION_NAME "VK_NV_shader_atomic_float16_vector" typedef struct VkPhysicalDeviceShaderAtomicFloat16VectorFeaturesNV { VkStructureType sType; void* pNext; VkBool32 shaderFloat16VectorAtomics; } VkPhysicalDeviceShaderAtomicFloat16VectorFeaturesNV; // VK_EXT_shader_replicated_composites is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_shader_replicated_composites 1 #define VK_EXT_SHADER_REPLICATED_COMPOSITES_SPEC_VERSION 1 #define VK_EXT_SHADER_REPLICATED_COMPOSITES_EXTENSION_NAME "VK_EXT_shader_replicated_composites" typedef struct VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT { VkStructureType sType; void* pNext; VkBool32 shaderReplicatedComposites; } VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT; // VK_NV_ray_tracing_validation is a preprocessor guard. Do not pass it to API calls. #define VK_NV_ray_tracing_validation 1 #define VK_NV_RAY_TRACING_VALIDATION_SPEC_VERSION 1 #define VK_NV_RAY_TRACING_VALIDATION_EXTENSION_NAME "VK_NV_ray_tracing_validation" typedef struct VkPhysicalDeviceRayTracingValidationFeaturesNV { VkStructureType sType; void* pNext; VkBool32 rayTracingValidation; } VkPhysicalDeviceRayTracingValidationFeaturesNV; // VK_NV_cluster_acceleration_structure is a preprocessor guard. Do not pass it to API calls. #define VK_NV_cluster_acceleration_structure 1 #define VK_NV_CLUSTER_ACCELERATION_STRUCTURE_SPEC_VERSION 2 #define VK_NV_CLUSTER_ACCELERATION_STRUCTURE_EXTENSION_NAME "VK_NV_cluster_acceleration_structure" typedef enum VkClusterAccelerationStructureTypeNV { VK_CLUSTER_ACCELERATION_STRUCTURE_TYPE_CLUSTERS_BOTTOM_LEVEL_NV = 0, VK_CLUSTER_ACCELERATION_STRUCTURE_TYPE_TRIANGLE_CLUSTER_NV = 1, VK_CLUSTER_ACCELERATION_STRUCTURE_TYPE_TRIANGLE_CLUSTER_TEMPLATE_NV = 2, VK_CLUSTER_ACCELERATION_STRUCTURE_TYPE_MAX_ENUM_NV = 0x7FFFFFFF } VkClusterAccelerationStructureTypeNV; typedef enum VkClusterAccelerationStructureOpTypeNV { VK_CLUSTER_ACCELERATION_STRUCTURE_OP_TYPE_MOVE_OBJECTS_NV = 0, VK_CLUSTER_ACCELERATION_STRUCTURE_OP_TYPE_BUILD_CLUSTERS_BOTTOM_LEVEL_NV = 1, VK_CLUSTER_ACCELERATION_STRUCTURE_OP_TYPE_BUILD_TRIANGLE_CLUSTER_NV = 2, VK_CLUSTER_ACCELERATION_STRUCTURE_OP_TYPE_BUILD_TRIANGLE_CLUSTER_TEMPLATE_NV = 3, VK_CLUSTER_ACCELERATION_STRUCTURE_OP_TYPE_INSTANTIATE_TRIANGLE_CLUSTER_NV = 4, VK_CLUSTER_ACCELERATION_STRUCTURE_OP_TYPE_MAX_ENUM_NV = 0x7FFFFFFF } VkClusterAccelerationStructureOpTypeNV; typedef enum VkClusterAccelerationStructureOpModeNV { VK_CLUSTER_ACCELERATION_STRUCTURE_OP_MODE_IMPLICIT_DESTINATIONS_NV = 0, VK_CLUSTER_ACCELERATION_STRUCTURE_OP_MODE_EXPLICIT_DESTINATIONS_NV = 1, VK_CLUSTER_ACCELERATION_STRUCTURE_OP_MODE_COMPUTE_SIZES_NV = 2, VK_CLUSTER_ACCELERATION_STRUCTURE_OP_MODE_MAX_ENUM_NV = 0x7FFFFFFF } VkClusterAccelerationStructureOpModeNV; typedef enum VkClusterAccelerationStructureAddressResolutionFlagBitsNV { VK_CLUSTER_ACCELERATION_STRUCTURE_ADDRESS_RESOLUTION_INDIRECTED_DST_IMPLICIT_DATA_BIT_NV = 0x00000001, VK_CLUSTER_ACCELERATION_STRUCTURE_ADDRESS_RESOLUTION_INDIRECTED_SCRATCH_DATA_BIT_NV = 0x00000002, VK_CLUSTER_ACCELERATION_STRUCTURE_ADDRESS_RESOLUTION_INDIRECTED_DST_ADDRESS_ARRAY_BIT_NV = 0x00000004, VK_CLUSTER_ACCELERATION_STRUCTURE_ADDRESS_RESOLUTION_INDIRECTED_DST_SIZES_ARRAY_BIT_NV = 0x00000008, VK_CLUSTER_ACCELERATION_STRUCTURE_ADDRESS_RESOLUTION_INDIRECTED_SRC_INFOS_ARRAY_BIT_NV = 0x00000010, VK_CLUSTER_ACCELERATION_STRUCTURE_ADDRESS_RESOLUTION_INDIRECTED_SRC_INFOS_COUNT_BIT_NV = 0x00000020, VK_CLUSTER_ACCELERATION_STRUCTURE_ADDRESS_RESOLUTION_FLAG_BITS_MAX_ENUM_NV = 0x7FFFFFFF } VkClusterAccelerationStructureAddressResolutionFlagBitsNV; typedef VkFlags VkClusterAccelerationStructureAddressResolutionFlagsNV; typedef enum VkClusterAccelerationStructureClusterFlagBitsNV { VK_CLUSTER_ACCELERATION_STRUCTURE_CLUSTER_ALLOW_DISABLE_OPACITY_MICROMAPS_NV = 0x00000001, VK_CLUSTER_ACCELERATION_STRUCTURE_CLUSTER_FLAG_BITS_MAX_ENUM_NV = 0x7FFFFFFF } VkClusterAccelerationStructureClusterFlagBitsNV; typedef VkFlags VkClusterAccelerationStructureClusterFlagsNV; typedef enum VkClusterAccelerationStructureGeometryFlagBitsNV { VK_CLUSTER_ACCELERATION_STRUCTURE_GEOMETRY_CULL_DISABLE_BIT_NV = 0x00000001, VK_CLUSTER_ACCELERATION_STRUCTURE_GEOMETRY_NO_DUPLICATE_ANYHIT_INVOCATION_BIT_NV = 0x00000002, VK_CLUSTER_ACCELERATION_STRUCTURE_GEOMETRY_OPAQUE_BIT_NV = 0x00000004, VK_CLUSTER_ACCELERATION_STRUCTURE_GEOMETRY_FLAG_BITS_MAX_ENUM_NV = 0x7FFFFFFF } VkClusterAccelerationStructureGeometryFlagBitsNV; typedef VkFlags VkClusterAccelerationStructureGeometryFlagsNV; typedef enum VkClusterAccelerationStructureIndexFormatFlagBitsNV { VK_CLUSTER_ACCELERATION_STRUCTURE_INDEX_FORMAT_8BIT_NV = 0x00000001, VK_CLUSTER_ACCELERATION_STRUCTURE_INDEX_FORMAT_16BIT_NV = 0x00000002, VK_CLUSTER_ACCELERATION_STRUCTURE_INDEX_FORMAT_32BIT_NV = 0x00000004, VK_CLUSTER_ACCELERATION_STRUCTURE_INDEX_FORMAT_FLAG_BITS_MAX_ENUM_NV = 0x7FFFFFFF } VkClusterAccelerationStructureIndexFormatFlagBitsNV; typedef VkFlags VkClusterAccelerationStructureIndexFormatFlagsNV; typedef struct VkPhysicalDeviceClusterAccelerationStructureFeaturesNV { VkStructureType sType; void* pNext; VkBool32 clusterAccelerationStructure; } VkPhysicalDeviceClusterAccelerationStructureFeaturesNV; typedef struct VkPhysicalDeviceClusterAccelerationStructurePropertiesNV { VkStructureType sType; void* pNext; uint32_t maxVerticesPerCluster; uint32_t maxTrianglesPerCluster; uint32_t clusterScratchByteAlignment; uint32_t clusterByteAlignment; uint32_t clusterTemplateByteAlignment; uint32_t clusterBottomLevelByteAlignment; uint32_t clusterTemplateBoundsByteAlignment; uint32_t maxClusterGeometryIndex; } VkPhysicalDeviceClusterAccelerationStructurePropertiesNV; typedef struct VkClusterAccelerationStructureClustersBottomLevelInputNV { VkStructureType sType; void* pNext; uint32_t maxTotalClusterCount; uint32_t maxClusterCountPerAccelerationStructure; } VkClusterAccelerationStructureClustersBottomLevelInputNV; typedef struct VkClusterAccelerationStructureTriangleClusterInputNV { VkStructureType sType; void* pNext; VkFormat vertexFormat; uint32_t maxGeometryIndexValue; uint32_t maxClusterUniqueGeometryCount; uint32_t maxClusterTriangleCount; uint32_t maxClusterVertexCount; uint32_t maxTotalTriangleCount; uint32_t maxTotalVertexCount; uint32_t minPositionTruncateBitCount; } VkClusterAccelerationStructureTriangleClusterInputNV; typedef struct VkClusterAccelerationStructureMoveObjectsInputNV { VkStructureType sType; void* pNext; VkClusterAccelerationStructureTypeNV type; VkBool32 noMoveOverlap; VkDeviceSize maxMovedBytes; } VkClusterAccelerationStructureMoveObjectsInputNV; typedef union VkClusterAccelerationStructureOpInputNV { VkClusterAccelerationStructureClustersBottomLevelInputNV* pClustersBottomLevel; VkClusterAccelerationStructureTriangleClusterInputNV* pTriangleClusters; VkClusterAccelerationStructureMoveObjectsInputNV* pMoveObjects; } VkClusterAccelerationStructureOpInputNV; typedef struct VkClusterAccelerationStructureInputInfoNV { VkStructureType sType; void* pNext; uint32_t maxAccelerationStructureCount; VkBuildAccelerationStructureFlagsKHR flags; VkClusterAccelerationStructureOpTypeNV opType; VkClusterAccelerationStructureOpModeNV opMode; VkClusterAccelerationStructureOpInputNV opInput; } VkClusterAccelerationStructureInputInfoNV; typedef struct VkStridedDeviceAddressRegionKHR { VkDeviceAddress deviceAddress; VkDeviceSize stride; VkDeviceSize size; } VkStridedDeviceAddressRegionKHR; typedef struct VkClusterAccelerationStructureCommandsInfoNV { VkStructureType sType; void* pNext; VkClusterAccelerationStructureInputInfoNV input; VkDeviceAddress dstImplicitData; VkDeviceAddress scratchData; VkStridedDeviceAddressRegionKHR dstAddressesArray; VkStridedDeviceAddressRegionKHR dstSizesArray; VkStridedDeviceAddressRegionKHR srcInfosArray; VkDeviceAddress srcInfosCount; VkClusterAccelerationStructureAddressResolutionFlagsNV addressResolutionFlags; } VkClusterAccelerationStructureCommandsInfoNV; typedef struct VkStridedDeviceAddressNV { VkDeviceAddress startAddress; VkDeviceSize strideInBytes; } VkStridedDeviceAddressNV; typedef struct VkClusterAccelerationStructureGeometryIndexAndGeometryFlagsNV { uint32_t geometryIndex:24; uint32_t reserved:5; uint32_t geometryFlags:3; } VkClusterAccelerationStructureGeometryIndexAndGeometryFlagsNV; typedef struct VkClusterAccelerationStructureMoveObjectsInfoNV { VkDeviceAddress srcAccelerationStructure; } VkClusterAccelerationStructureMoveObjectsInfoNV; typedef struct VkClusterAccelerationStructureBuildClustersBottomLevelInfoNV { uint32_t clusterReferencesCount; uint32_t clusterReferencesStride; VkDeviceAddress clusterReferences; } VkClusterAccelerationStructureBuildClustersBottomLevelInfoNV; typedef struct VkClusterAccelerationStructureBuildTriangleClusterInfoNV { uint32_t clusterID; VkClusterAccelerationStructureClusterFlagsNV clusterFlags; uint32_t triangleCount:9; uint32_t vertexCount:9; uint32_t positionTruncateBitCount:6; uint32_t indexType:4; uint32_t opacityMicromapIndexType:4; VkClusterAccelerationStructureGeometryIndexAndGeometryFlagsNV baseGeometryIndexAndGeometryFlags; uint16_t indexBufferStride; uint16_t vertexBufferStride; uint16_t geometryIndexAndFlagsBufferStride; uint16_t opacityMicromapIndexBufferStride; VkDeviceAddress indexBuffer; VkDeviceAddress vertexBuffer; VkDeviceAddress geometryIndexAndFlagsBuffer; VkDeviceAddress opacityMicromapArray; VkDeviceAddress opacityMicromapIndexBuffer; } VkClusterAccelerationStructureBuildTriangleClusterInfoNV; typedef struct VkClusterAccelerationStructureBuildTriangleClusterTemplateInfoNV { uint32_t clusterID; VkClusterAccelerationStructureClusterFlagsNV clusterFlags; uint32_t triangleCount:9; uint32_t vertexCount:9; uint32_t positionTruncateBitCount:6; uint32_t indexType:4; uint32_t opacityMicromapIndexType:4; VkClusterAccelerationStructureGeometryIndexAndGeometryFlagsNV baseGeometryIndexAndGeometryFlags; uint16_t indexBufferStride; uint16_t vertexBufferStride; uint16_t geometryIndexAndFlagsBufferStride; uint16_t opacityMicromapIndexBufferStride; VkDeviceAddress indexBuffer; VkDeviceAddress vertexBuffer; VkDeviceAddress geometryIndexAndFlagsBuffer; VkDeviceAddress opacityMicromapArray; VkDeviceAddress opacityMicromapIndexBuffer; VkDeviceAddress instantiationBoundingBoxLimit; } VkClusterAccelerationStructureBuildTriangleClusterTemplateInfoNV; typedef struct VkClusterAccelerationStructureInstantiateClusterInfoNV { uint32_t clusterIdOffset; uint32_t geometryIndexOffset:24; uint32_t reserved:8; VkDeviceAddress clusterTemplateAddress; VkStridedDeviceAddressNV vertexBuffer; } VkClusterAccelerationStructureInstantiateClusterInfoNV; typedef struct VkAccelerationStructureBuildSizesInfoKHR { VkStructureType sType; const void* pNext; VkDeviceSize accelerationStructureSize; VkDeviceSize updateScratchSize; VkDeviceSize buildScratchSize; } VkAccelerationStructureBuildSizesInfoKHR; typedef struct VkRayTracingPipelineClusterAccelerationStructureCreateInfoNV { VkStructureType sType; void* pNext; VkBool32 allowClusterAccelerationStructure; } VkRayTracingPipelineClusterAccelerationStructureCreateInfoNV; typedef void (VKAPI_PTR *PFN_vkGetClusterAccelerationStructureBuildSizesNV)(VkDevice device, const VkClusterAccelerationStructureInputInfoNV* pInfo, VkAccelerationStructureBuildSizesInfoKHR* pSizeInfo); typedef void (VKAPI_PTR *PFN_vkCmdBuildClusterAccelerationStructureIndirectNV)(VkCommandBuffer commandBuffer, const VkClusterAccelerationStructureCommandsInfoNV* pCommandInfos); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR void VKAPI_CALL vkGetClusterAccelerationStructureBuildSizesNV( VkDevice device, const VkClusterAccelerationStructureInputInfoNV* pInfo, VkAccelerationStructureBuildSizesInfoKHR* pSizeInfo); VKAPI_ATTR void VKAPI_CALL vkCmdBuildClusterAccelerationStructureIndirectNV( VkCommandBuffer commandBuffer, const VkClusterAccelerationStructureCommandsInfoNV* pCommandInfos); #endif // VK_NV_partitioned_acceleration_structure is a preprocessor guard. Do not pass it to API calls. #define VK_NV_partitioned_acceleration_structure 1 #define VK_NV_PARTITIONED_ACCELERATION_STRUCTURE_SPEC_VERSION 1 #define VK_NV_PARTITIONED_ACCELERATION_STRUCTURE_EXTENSION_NAME "VK_NV_partitioned_acceleration_structure" #define VK_PARTITIONED_ACCELERATION_STRUCTURE_PARTITION_INDEX_GLOBAL_NV (~0U) typedef enum VkPartitionedAccelerationStructureOpTypeNV { VK_PARTITIONED_ACCELERATION_STRUCTURE_OP_TYPE_WRITE_INSTANCE_NV = 0, VK_PARTITIONED_ACCELERATION_STRUCTURE_OP_TYPE_UPDATE_INSTANCE_NV = 1, VK_PARTITIONED_ACCELERATION_STRUCTURE_OP_TYPE_WRITE_PARTITION_TRANSLATION_NV = 2, VK_PARTITIONED_ACCELERATION_STRUCTURE_OP_TYPE_MAX_ENUM_NV = 0x7FFFFFFF } VkPartitionedAccelerationStructureOpTypeNV; typedef enum VkPartitionedAccelerationStructureInstanceFlagBitsNV { VK_PARTITIONED_ACCELERATION_STRUCTURE_INSTANCE_FLAG_TRIANGLE_FACING_CULL_DISABLE_BIT_NV = 0x00000001, VK_PARTITIONED_ACCELERATION_STRUCTURE_INSTANCE_FLAG_TRIANGLE_FLIP_FACING_BIT_NV = 0x00000002, VK_PARTITIONED_ACCELERATION_STRUCTURE_INSTANCE_FLAG_FORCE_OPAQUE_BIT_NV = 0x00000004, VK_PARTITIONED_ACCELERATION_STRUCTURE_INSTANCE_FLAG_FORCE_NO_OPAQUE_BIT_NV = 0x00000008, VK_PARTITIONED_ACCELERATION_STRUCTURE_INSTANCE_FLAG_ENABLE_EXPLICIT_BOUNDING_BOX_NV = 0x00000010, VK_PARTITIONED_ACCELERATION_STRUCTURE_INSTANCE_FLAG_BITS_MAX_ENUM_NV = 0x7FFFFFFF } VkPartitionedAccelerationStructureInstanceFlagBitsNV; typedef VkFlags VkPartitionedAccelerationStructureInstanceFlagsNV; typedef struct VkPhysicalDevicePartitionedAccelerationStructureFeaturesNV { VkStructureType sType; void* pNext; VkBool32 partitionedAccelerationStructure; } VkPhysicalDevicePartitionedAccelerationStructureFeaturesNV; typedef struct VkPhysicalDevicePartitionedAccelerationStructurePropertiesNV { VkStructureType sType; void* pNext; uint32_t maxPartitionCount; } VkPhysicalDevicePartitionedAccelerationStructurePropertiesNV; typedef struct VkPartitionedAccelerationStructureFlagsNV { VkStructureType sType; void* pNext; VkBool32 enablePartitionTranslation; } VkPartitionedAccelerationStructureFlagsNV; typedef struct VkBuildPartitionedAccelerationStructureIndirectCommandNV { VkPartitionedAccelerationStructureOpTypeNV opType; uint32_t argCount; VkStridedDeviceAddressNV argData; } VkBuildPartitionedAccelerationStructureIndirectCommandNV; typedef struct VkPartitionedAccelerationStructureWriteInstanceDataNV { VkTransformMatrixKHR transform; float explicitAABB[6]; uint32_t instanceID; uint32_t instanceMask; uint32_t instanceContributionToHitGroupIndex; VkPartitionedAccelerationStructureInstanceFlagsNV instanceFlags; uint32_t instanceIndex; uint32_t partitionIndex; VkDeviceAddress accelerationStructure; } VkPartitionedAccelerationStructureWriteInstanceDataNV; typedef struct VkPartitionedAccelerationStructureUpdateInstanceDataNV { uint32_t instanceIndex; uint32_t instanceContributionToHitGroupIndex; VkDeviceAddress accelerationStructure; } VkPartitionedAccelerationStructureUpdateInstanceDataNV; typedef struct VkPartitionedAccelerationStructureWritePartitionTranslationDataNV { uint32_t partitionIndex; float partitionTranslation[3]; } VkPartitionedAccelerationStructureWritePartitionTranslationDataNV; typedef struct VkWriteDescriptorSetPartitionedAccelerationStructureNV { VkStructureType sType; void* pNext; uint32_t accelerationStructureCount; const VkDeviceAddress* pAccelerationStructures; } VkWriteDescriptorSetPartitionedAccelerationStructureNV; typedef struct VkPartitionedAccelerationStructureInstancesInputNV { VkStructureType sType; void* pNext; VkBuildAccelerationStructureFlagsKHR flags; uint32_t instanceCount; uint32_t maxInstancePerPartitionCount; uint32_t partitionCount; uint32_t maxInstanceInGlobalPartitionCount; } VkPartitionedAccelerationStructureInstancesInputNV; typedef struct VkBuildPartitionedAccelerationStructureInfoNV { VkStructureType sType; void* pNext; VkPartitionedAccelerationStructureInstancesInputNV input; VkDeviceAddress srcAccelerationStructureData; VkDeviceAddress dstAccelerationStructureData; VkDeviceAddress scratchData; VkDeviceAddress srcInfos; VkDeviceAddress srcInfosCount; } VkBuildPartitionedAccelerationStructureInfoNV; typedef void (VKAPI_PTR *PFN_vkGetPartitionedAccelerationStructuresBuildSizesNV)(VkDevice device, const VkPartitionedAccelerationStructureInstancesInputNV* pInfo, VkAccelerationStructureBuildSizesInfoKHR* pSizeInfo); typedef void (VKAPI_PTR *PFN_vkCmdBuildPartitionedAccelerationStructuresNV)(VkCommandBuffer commandBuffer, const VkBuildPartitionedAccelerationStructureInfoNV* pBuildInfo); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR void VKAPI_CALL vkGetPartitionedAccelerationStructuresBuildSizesNV( VkDevice device, const VkPartitionedAccelerationStructureInstancesInputNV* pInfo, VkAccelerationStructureBuildSizesInfoKHR* pSizeInfo); VKAPI_ATTR void VKAPI_CALL vkCmdBuildPartitionedAccelerationStructuresNV( VkCommandBuffer commandBuffer, const VkBuildPartitionedAccelerationStructureInfoNV* pBuildInfo); #endif // VK_EXT_device_generated_commands is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_device_generated_commands 1 VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkIndirectExecutionSetEXT) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkIndirectCommandsLayoutEXT) #define VK_EXT_DEVICE_GENERATED_COMMANDS_SPEC_VERSION 1 #define VK_EXT_DEVICE_GENERATED_COMMANDS_EXTENSION_NAME "VK_EXT_device_generated_commands" typedef enum VkIndirectExecutionSetInfoTypeEXT { VK_INDIRECT_EXECUTION_SET_INFO_TYPE_PIPELINES_EXT = 0, VK_INDIRECT_EXECUTION_SET_INFO_TYPE_SHADER_OBJECTS_EXT = 1, VK_INDIRECT_EXECUTION_SET_INFO_TYPE_MAX_ENUM_EXT = 0x7FFFFFFF } VkIndirectExecutionSetInfoTypeEXT; typedef enum VkIndirectCommandsTokenTypeEXT { VK_INDIRECT_COMMANDS_TOKEN_TYPE_EXECUTION_SET_EXT = 0, VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_EXT = 1, VK_INDIRECT_COMMANDS_TOKEN_TYPE_SEQUENCE_INDEX_EXT = 2, VK_INDIRECT_COMMANDS_TOKEN_TYPE_INDEX_BUFFER_EXT = 3, VK_INDIRECT_COMMANDS_TOKEN_TYPE_VERTEX_BUFFER_EXT = 4, VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_INDEXED_EXT = 5, VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_EXT = 6, VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_INDEXED_COUNT_EXT = 7, VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_COUNT_EXT = 8, VK_INDIRECT_COMMANDS_TOKEN_TYPE_DISPATCH_EXT = 9, VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_MESH_TASKS_NV_EXT = 1000202002, VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_MESH_TASKS_COUNT_NV_EXT = 1000202003, VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_MESH_TASKS_EXT = 1000328000, VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_MESH_TASKS_COUNT_EXT = 1000328001, VK_INDIRECT_COMMANDS_TOKEN_TYPE_TRACE_RAYS2_EXT = 1000386004, VK_INDIRECT_COMMANDS_TOKEN_TYPE_MAX_ENUM_EXT = 0x7FFFFFFF } VkIndirectCommandsTokenTypeEXT; typedef enum VkIndirectCommandsInputModeFlagBitsEXT { VK_INDIRECT_COMMANDS_INPUT_MODE_VULKAN_INDEX_BUFFER_EXT = 0x00000001, VK_INDIRECT_COMMANDS_INPUT_MODE_DXGI_INDEX_BUFFER_EXT = 0x00000002, VK_INDIRECT_COMMANDS_INPUT_MODE_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF } VkIndirectCommandsInputModeFlagBitsEXT; typedef VkFlags VkIndirectCommandsInputModeFlagsEXT; typedef enum VkIndirectCommandsLayoutUsageFlagBitsEXT { VK_INDIRECT_COMMANDS_LAYOUT_USAGE_EXPLICIT_PREPROCESS_BIT_EXT = 0x00000001, VK_INDIRECT_COMMANDS_LAYOUT_USAGE_UNORDERED_SEQUENCES_BIT_EXT = 0x00000002, VK_INDIRECT_COMMANDS_LAYOUT_USAGE_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF } VkIndirectCommandsLayoutUsageFlagBitsEXT; typedef VkFlags VkIndirectCommandsLayoutUsageFlagsEXT; typedef struct VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT { VkStructureType sType; void* pNext; VkBool32 deviceGeneratedCommands; VkBool32 dynamicGeneratedPipelineLayout; } VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT; typedef struct VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT { VkStructureType sType; void* pNext; uint32_t maxIndirectPipelineCount; uint32_t maxIndirectShaderObjectCount; uint32_t maxIndirectSequenceCount; uint32_t maxIndirectCommandsTokenCount; uint32_t maxIndirectCommandsTokenOffset; uint32_t maxIndirectCommandsIndirectStride; VkIndirectCommandsInputModeFlagsEXT supportedIndirectCommandsInputModes; VkShaderStageFlags supportedIndirectCommandsShaderStages; VkShaderStageFlags supportedIndirectCommandsShaderStagesPipelineBinding; VkShaderStageFlags supportedIndirectCommandsShaderStagesShaderBinding; VkBool32 deviceGeneratedCommandsTransformFeedback; VkBool32 deviceGeneratedCommandsMultiDrawIndirectCount; } VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT; typedef struct VkGeneratedCommandsMemoryRequirementsInfoEXT { VkStructureType sType; const void* pNext; VkIndirectExecutionSetEXT indirectExecutionSet; VkIndirectCommandsLayoutEXT indirectCommandsLayout; uint32_t maxSequenceCount; uint32_t maxDrawCount; } VkGeneratedCommandsMemoryRequirementsInfoEXT; typedef struct VkIndirectExecutionSetPipelineInfoEXT { VkStructureType sType; const void* pNext; VkPipeline initialPipeline; uint32_t maxPipelineCount; } VkIndirectExecutionSetPipelineInfoEXT; typedef struct VkIndirectExecutionSetShaderLayoutInfoEXT { VkStructureType sType; const void* pNext; uint32_t setLayoutCount; const VkDescriptorSetLayout* pSetLayouts; } VkIndirectExecutionSetShaderLayoutInfoEXT; typedef struct VkIndirectExecutionSetShaderInfoEXT { VkStructureType sType; const void* pNext; uint32_t shaderCount; const VkShaderEXT* pInitialShaders; const VkIndirectExecutionSetShaderLayoutInfoEXT* pSetLayoutInfos; uint32_t maxShaderCount; uint32_t pushConstantRangeCount; const VkPushConstantRange* pPushConstantRanges; } VkIndirectExecutionSetShaderInfoEXT; typedef union VkIndirectExecutionSetInfoEXT { const VkIndirectExecutionSetPipelineInfoEXT* pPipelineInfo; const VkIndirectExecutionSetShaderInfoEXT* pShaderInfo; } VkIndirectExecutionSetInfoEXT; typedef struct VkIndirectExecutionSetCreateInfoEXT { VkStructureType sType; const void* pNext; VkIndirectExecutionSetInfoTypeEXT type; VkIndirectExecutionSetInfoEXT info; } VkIndirectExecutionSetCreateInfoEXT; typedef struct VkGeneratedCommandsInfoEXT { VkStructureType sType; const void* pNext; VkShaderStageFlags shaderStages; VkIndirectExecutionSetEXT indirectExecutionSet; VkIndirectCommandsLayoutEXT indirectCommandsLayout; VkDeviceAddress indirectAddress; VkDeviceSize indirectAddressSize; VkDeviceAddress preprocessAddress; VkDeviceSize preprocessSize; uint32_t maxSequenceCount; VkDeviceAddress sequenceCountAddress; uint32_t maxDrawCount; } VkGeneratedCommandsInfoEXT; typedef struct VkWriteIndirectExecutionSetPipelineEXT { VkStructureType sType; const void* pNext; uint32_t index; VkPipeline pipeline; } VkWriteIndirectExecutionSetPipelineEXT; typedef struct VkIndirectCommandsPushConstantTokenEXT { VkPushConstantRange updateRange; } VkIndirectCommandsPushConstantTokenEXT; typedef struct VkIndirectCommandsVertexBufferTokenEXT { uint32_t vertexBindingUnit; } VkIndirectCommandsVertexBufferTokenEXT; typedef struct VkIndirectCommandsIndexBufferTokenEXT { VkIndirectCommandsInputModeFlagBitsEXT mode; } VkIndirectCommandsIndexBufferTokenEXT; typedef struct VkIndirectCommandsExecutionSetTokenEXT { VkIndirectExecutionSetInfoTypeEXT type; VkShaderStageFlags shaderStages; } VkIndirectCommandsExecutionSetTokenEXT; typedef union VkIndirectCommandsTokenDataEXT { const VkIndirectCommandsPushConstantTokenEXT* pPushConstant; const VkIndirectCommandsVertexBufferTokenEXT* pVertexBuffer; const VkIndirectCommandsIndexBufferTokenEXT* pIndexBuffer; const VkIndirectCommandsExecutionSetTokenEXT* pExecutionSet; } VkIndirectCommandsTokenDataEXT; typedef struct VkIndirectCommandsLayoutTokenEXT { VkStructureType sType; const void* pNext; VkIndirectCommandsTokenTypeEXT type; VkIndirectCommandsTokenDataEXT data; uint32_t offset; } VkIndirectCommandsLayoutTokenEXT; typedef struct VkIndirectCommandsLayoutCreateInfoEXT { VkStructureType sType; const void* pNext; VkIndirectCommandsLayoutUsageFlagsEXT flags; VkShaderStageFlags shaderStages; uint32_t indirectStride; VkPipelineLayout pipelineLayout; uint32_t tokenCount; const VkIndirectCommandsLayoutTokenEXT* pTokens; } VkIndirectCommandsLayoutCreateInfoEXT; typedef struct VkDrawIndirectCountIndirectCommandEXT { VkDeviceAddress bufferAddress; uint32_t stride; uint32_t commandCount; } VkDrawIndirectCountIndirectCommandEXT; typedef struct VkBindVertexBufferIndirectCommandEXT { VkDeviceAddress bufferAddress; uint32_t size; uint32_t stride; } VkBindVertexBufferIndirectCommandEXT; typedef struct VkBindIndexBufferIndirectCommandEXT { VkDeviceAddress bufferAddress; uint32_t size; VkIndexType indexType; } VkBindIndexBufferIndirectCommandEXT; typedef struct VkGeneratedCommandsPipelineInfoEXT { VkStructureType sType; void* pNext; VkPipeline pipeline; } VkGeneratedCommandsPipelineInfoEXT; typedef struct VkGeneratedCommandsShaderInfoEXT { VkStructureType sType; void* pNext; uint32_t shaderCount; const VkShaderEXT* pShaders; } VkGeneratedCommandsShaderInfoEXT; typedef struct VkWriteIndirectExecutionSetShaderEXT { VkStructureType sType; const void* pNext; uint32_t index; VkShaderEXT shader; } VkWriteIndirectExecutionSetShaderEXT; typedef void (VKAPI_PTR *PFN_vkGetGeneratedCommandsMemoryRequirementsEXT)(VkDevice device, const VkGeneratedCommandsMemoryRequirementsInfoEXT* pInfo, VkMemoryRequirements2* pMemoryRequirements); typedef void (VKAPI_PTR *PFN_vkCmdPreprocessGeneratedCommandsEXT)(VkCommandBuffer commandBuffer, const VkGeneratedCommandsInfoEXT* pGeneratedCommandsInfo, VkCommandBuffer stateCommandBuffer); typedef void (VKAPI_PTR *PFN_vkCmdExecuteGeneratedCommandsEXT)(VkCommandBuffer commandBuffer, VkBool32 isPreprocessed, const VkGeneratedCommandsInfoEXT* pGeneratedCommandsInfo); typedef VkResult (VKAPI_PTR *PFN_vkCreateIndirectCommandsLayoutEXT)(VkDevice device, const VkIndirectCommandsLayoutCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkIndirectCommandsLayoutEXT* pIndirectCommandsLayout); typedef void (VKAPI_PTR *PFN_vkDestroyIndirectCommandsLayoutEXT)(VkDevice device, VkIndirectCommandsLayoutEXT indirectCommandsLayout, const VkAllocationCallbacks* pAllocator); typedef VkResult (VKAPI_PTR *PFN_vkCreateIndirectExecutionSetEXT)(VkDevice device, const VkIndirectExecutionSetCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkIndirectExecutionSetEXT* pIndirectExecutionSet); typedef void (VKAPI_PTR *PFN_vkDestroyIndirectExecutionSetEXT)(VkDevice device, VkIndirectExecutionSetEXT indirectExecutionSet, const VkAllocationCallbacks* pAllocator); typedef void (VKAPI_PTR *PFN_vkUpdateIndirectExecutionSetPipelineEXT)(VkDevice device, VkIndirectExecutionSetEXT indirectExecutionSet, uint32_t executionSetWriteCount, const VkWriteIndirectExecutionSetPipelineEXT* pExecutionSetWrites); typedef void (VKAPI_PTR *PFN_vkUpdateIndirectExecutionSetShaderEXT)(VkDevice device, VkIndirectExecutionSetEXT indirectExecutionSet, uint32_t executionSetWriteCount, const VkWriteIndirectExecutionSetShaderEXT* pExecutionSetWrites); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR void VKAPI_CALL vkGetGeneratedCommandsMemoryRequirementsEXT( VkDevice device, const VkGeneratedCommandsMemoryRequirementsInfoEXT* pInfo, VkMemoryRequirements2* pMemoryRequirements); VKAPI_ATTR void VKAPI_CALL vkCmdPreprocessGeneratedCommandsEXT( VkCommandBuffer commandBuffer, const VkGeneratedCommandsInfoEXT* pGeneratedCommandsInfo, VkCommandBuffer stateCommandBuffer); VKAPI_ATTR void VKAPI_CALL vkCmdExecuteGeneratedCommandsEXT( VkCommandBuffer commandBuffer, VkBool32 isPreprocessed, const VkGeneratedCommandsInfoEXT* pGeneratedCommandsInfo); VKAPI_ATTR VkResult VKAPI_CALL vkCreateIndirectCommandsLayoutEXT( VkDevice device, const VkIndirectCommandsLayoutCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkIndirectCommandsLayoutEXT* pIndirectCommandsLayout); VKAPI_ATTR void VKAPI_CALL vkDestroyIndirectCommandsLayoutEXT( VkDevice device, VkIndirectCommandsLayoutEXT indirectCommandsLayout, const VkAllocationCallbacks* pAllocator); VKAPI_ATTR VkResult VKAPI_CALL vkCreateIndirectExecutionSetEXT( VkDevice device, const VkIndirectExecutionSetCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkIndirectExecutionSetEXT* pIndirectExecutionSet); VKAPI_ATTR void VKAPI_CALL vkDestroyIndirectExecutionSetEXT( VkDevice device, VkIndirectExecutionSetEXT indirectExecutionSet, const VkAllocationCallbacks* pAllocator); VKAPI_ATTR void VKAPI_CALL vkUpdateIndirectExecutionSetPipelineEXT( VkDevice device, VkIndirectExecutionSetEXT indirectExecutionSet, uint32_t executionSetWriteCount, const VkWriteIndirectExecutionSetPipelineEXT* pExecutionSetWrites); VKAPI_ATTR void VKAPI_CALL vkUpdateIndirectExecutionSetShaderEXT( VkDevice device, VkIndirectExecutionSetEXT indirectExecutionSet, uint32_t executionSetWriteCount, const VkWriteIndirectExecutionSetShaderEXT* pExecutionSetWrites); #endif // VK_MESA_image_alignment_control is a preprocessor guard. Do not pass it to API calls. #define VK_MESA_image_alignment_control 1 #define VK_MESA_IMAGE_ALIGNMENT_CONTROL_SPEC_VERSION 1 #define VK_MESA_IMAGE_ALIGNMENT_CONTROL_EXTENSION_NAME "VK_MESA_image_alignment_control" typedef struct VkPhysicalDeviceImageAlignmentControlFeaturesMESA { VkStructureType sType; void* pNext; VkBool32 imageAlignmentControl; } VkPhysicalDeviceImageAlignmentControlFeaturesMESA; typedef struct VkPhysicalDeviceImageAlignmentControlPropertiesMESA { VkStructureType sType; void* pNext; uint32_t supportedImageAlignmentMask; } VkPhysicalDeviceImageAlignmentControlPropertiesMESA; typedef struct VkImageAlignmentControlCreateInfoMESA { VkStructureType sType; const void* pNext; uint32_t maximumRequestedAlignment; } VkImageAlignmentControlCreateInfoMESA; // VK_EXT_depth_clamp_control is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_depth_clamp_control 1 #define VK_EXT_DEPTH_CLAMP_CONTROL_SPEC_VERSION 1 #define VK_EXT_DEPTH_CLAMP_CONTROL_EXTENSION_NAME "VK_EXT_depth_clamp_control" typedef struct VkPhysicalDeviceDepthClampControlFeaturesEXT { VkStructureType sType; void* pNext; VkBool32 depthClampControl; } VkPhysicalDeviceDepthClampControlFeaturesEXT; typedef struct VkPipelineViewportDepthClampControlCreateInfoEXT { VkStructureType sType; const void* pNext; VkDepthClampModeEXT depthClampMode; const VkDepthClampRangeEXT* pDepthClampRange; } VkPipelineViewportDepthClampControlCreateInfoEXT; // VK_HUAWEI_hdr_vivid is a preprocessor guard. Do not pass it to API calls. #define VK_HUAWEI_hdr_vivid 1 #define VK_HUAWEI_HDR_VIVID_SPEC_VERSION 1 #define VK_HUAWEI_HDR_VIVID_EXTENSION_NAME "VK_HUAWEI_hdr_vivid" typedef struct VkPhysicalDeviceHdrVividFeaturesHUAWEI { VkStructureType sType; void* pNext; VkBool32 hdrVivid; } VkPhysicalDeviceHdrVividFeaturesHUAWEI; typedef struct VkHdrVividDynamicMetadataHUAWEI { VkStructureType sType; const void* pNext; size_t dynamicMetadataSize; const void* pDynamicMetadata; } VkHdrVividDynamicMetadataHUAWEI; // VK_NV_cooperative_matrix2 is a preprocessor guard. Do not pass it to API calls. #define VK_NV_cooperative_matrix2 1 #define VK_NV_COOPERATIVE_MATRIX_2_SPEC_VERSION 1 #define VK_NV_COOPERATIVE_MATRIX_2_EXTENSION_NAME "VK_NV_cooperative_matrix2" typedef struct VkCooperativeMatrixFlexibleDimensionsPropertiesNV { VkStructureType sType; void* pNext; uint32_t MGranularity; uint32_t NGranularity; uint32_t KGranularity; VkComponentTypeKHR AType; VkComponentTypeKHR BType; VkComponentTypeKHR CType; VkComponentTypeKHR ResultType; VkBool32 saturatingAccumulation; VkScopeKHR scope; uint32_t workgroupInvocations; } VkCooperativeMatrixFlexibleDimensionsPropertiesNV; typedef struct VkPhysicalDeviceCooperativeMatrix2FeaturesNV { VkStructureType sType; void* pNext; VkBool32 cooperativeMatrixWorkgroupScope; VkBool32 cooperativeMatrixFlexibleDimensions; VkBool32 cooperativeMatrixReductions; VkBool32 cooperativeMatrixConversions; VkBool32 cooperativeMatrixPerElementOperations; VkBool32 cooperativeMatrixTensorAddressing; VkBool32 cooperativeMatrixBlockLoads; } VkPhysicalDeviceCooperativeMatrix2FeaturesNV; typedef struct VkPhysicalDeviceCooperativeMatrix2PropertiesNV { VkStructureType sType; void* pNext; uint32_t cooperativeMatrixWorkgroupScopeMaxWorkgroupSize; uint32_t cooperativeMatrixFlexibleDimensionsMaxDimension; uint32_t cooperativeMatrixWorkgroupScopeReservedSharedMemory; } VkPhysicalDeviceCooperativeMatrix2PropertiesNV; typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV)(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkCooperativeMatrixFlexibleDimensionsPropertiesNV* pProperties); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV( VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkCooperativeMatrixFlexibleDimensionsPropertiesNV* pProperties); #endif // VK_ARM_pipeline_opacity_micromap is a preprocessor guard. Do not pass it to API calls. #define VK_ARM_pipeline_opacity_micromap 1 #define VK_ARM_PIPELINE_OPACITY_MICROMAP_SPEC_VERSION 1 #define VK_ARM_PIPELINE_OPACITY_MICROMAP_EXTENSION_NAME "VK_ARM_pipeline_opacity_micromap" typedef struct VkPhysicalDevicePipelineOpacityMicromapFeaturesARM { VkStructureType sType; void* pNext; VkBool32 pipelineOpacityMicromap; } VkPhysicalDevicePipelineOpacityMicromapFeaturesARM; // VK_EXT_vertex_attribute_robustness is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_vertex_attribute_robustness 1 #define VK_EXT_VERTEX_ATTRIBUTE_ROBUSTNESS_SPEC_VERSION 1 #define VK_EXT_VERTEX_ATTRIBUTE_ROBUSTNESS_EXTENSION_NAME "VK_EXT_vertex_attribute_robustness" typedef struct VkPhysicalDeviceVertexAttributeRobustnessFeaturesEXT { VkStructureType sType; void* pNext; VkBool32 vertexAttributeRobustness; } VkPhysicalDeviceVertexAttributeRobustnessFeaturesEXT; // VK_KHR_acceleration_structure is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_acceleration_structure 1 #define VK_KHR_ACCELERATION_STRUCTURE_SPEC_VERSION 13 #define VK_KHR_ACCELERATION_STRUCTURE_EXTENSION_NAME "VK_KHR_acceleration_structure" typedef enum VkBuildAccelerationStructureModeKHR { VK_BUILD_ACCELERATION_STRUCTURE_MODE_BUILD_KHR = 0, VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR = 1, VK_BUILD_ACCELERATION_STRUCTURE_MODE_MAX_ENUM_KHR = 0x7FFFFFFF } VkBuildAccelerationStructureModeKHR; typedef enum VkAccelerationStructureCreateFlagBitsKHR { VK_ACCELERATION_STRUCTURE_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_KHR = 0x00000001, VK_ACCELERATION_STRUCTURE_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT = 0x00000008, VK_ACCELERATION_STRUCTURE_CREATE_MOTION_BIT_NV = 0x00000004, VK_ACCELERATION_STRUCTURE_CREATE_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF } VkAccelerationStructureCreateFlagBitsKHR; typedef VkFlags VkAccelerationStructureCreateFlagsKHR; typedef struct VkAccelerationStructureBuildRangeInfoKHR { uint32_t primitiveCount; uint32_t primitiveOffset; uint32_t firstVertex; uint32_t transformOffset; } VkAccelerationStructureBuildRangeInfoKHR; typedef struct VkAccelerationStructureGeometryTrianglesDataKHR { VkStructureType sType; const void* pNext; VkFormat vertexFormat; VkDeviceOrHostAddressConstKHR vertexData; VkDeviceSize vertexStride; uint32_t maxVertex; VkIndexType indexType; VkDeviceOrHostAddressConstKHR indexData; VkDeviceOrHostAddressConstKHR transformData; } VkAccelerationStructureGeometryTrianglesDataKHR; typedef struct VkAccelerationStructureGeometryAabbsDataKHR { VkStructureType sType; const void* pNext; VkDeviceOrHostAddressConstKHR data; VkDeviceSize stride; } VkAccelerationStructureGeometryAabbsDataKHR; typedef struct VkAccelerationStructureGeometryInstancesDataKHR { VkStructureType sType; const void* pNext; VkBool32 arrayOfPointers; VkDeviceOrHostAddressConstKHR data; } VkAccelerationStructureGeometryInstancesDataKHR; typedef union VkAccelerationStructureGeometryDataKHR { VkAccelerationStructureGeometryTrianglesDataKHR triangles; VkAccelerationStructureGeometryAabbsDataKHR aabbs; VkAccelerationStructureGeometryInstancesDataKHR instances; } VkAccelerationStructureGeometryDataKHR; typedef struct VkAccelerationStructureGeometryKHR { VkStructureType sType; const void* pNext; VkGeometryTypeKHR geometryType; VkAccelerationStructureGeometryDataKHR geometry; VkGeometryFlagsKHR flags; } VkAccelerationStructureGeometryKHR; typedef struct VkAccelerationStructureBuildGeometryInfoKHR { VkStructureType sType; const void* pNext; VkAccelerationStructureTypeKHR type; VkBuildAccelerationStructureFlagsKHR flags; VkBuildAccelerationStructureModeKHR mode; VkAccelerationStructureKHR srcAccelerationStructure; VkAccelerationStructureKHR dstAccelerationStructure; uint32_t geometryCount; const VkAccelerationStructureGeometryKHR* pGeometries; const VkAccelerationStructureGeometryKHR* const* ppGeometries; VkDeviceOrHostAddressKHR scratchData; } VkAccelerationStructureBuildGeometryInfoKHR; typedef struct VkAccelerationStructureCreateInfoKHR { VkStructureType sType; const void* pNext; VkAccelerationStructureCreateFlagsKHR createFlags; VkBuffer buffer; VkDeviceSize offset; VkDeviceSize size; VkAccelerationStructureTypeKHR type; VkDeviceAddress deviceAddress; } VkAccelerationStructureCreateInfoKHR; typedef struct VkWriteDescriptorSetAccelerationStructureKHR { VkStructureType sType; const void* pNext; uint32_t accelerationStructureCount; const VkAccelerationStructureKHR* pAccelerationStructures; } VkWriteDescriptorSetAccelerationStructureKHR; typedef struct VkPhysicalDeviceAccelerationStructureFeaturesKHR { VkStructureType sType; void* pNext; VkBool32 accelerationStructure; VkBool32 accelerationStructureCaptureReplay; VkBool32 accelerationStructureIndirectBuild; VkBool32 accelerationStructureHostCommands; VkBool32 descriptorBindingAccelerationStructureUpdateAfterBind; } VkPhysicalDeviceAccelerationStructureFeaturesKHR; typedef struct VkPhysicalDeviceAccelerationStructurePropertiesKHR { VkStructureType sType; void* pNext; uint64_t maxGeometryCount; uint64_t maxInstanceCount; uint64_t maxPrimitiveCount; uint32_t maxPerStageDescriptorAccelerationStructures; uint32_t maxPerStageDescriptorUpdateAfterBindAccelerationStructures; uint32_t maxDescriptorSetAccelerationStructures; uint32_t maxDescriptorSetUpdateAfterBindAccelerationStructures; uint32_t minAccelerationStructureScratchOffsetAlignment; } VkPhysicalDeviceAccelerationStructurePropertiesKHR; typedef struct VkAccelerationStructureDeviceAddressInfoKHR { VkStructureType sType; const void* pNext; VkAccelerationStructureKHR accelerationStructure; } VkAccelerationStructureDeviceAddressInfoKHR; typedef struct VkAccelerationStructureVersionInfoKHR { VkStructureType sType; const void* pNext; const uint8_t* pVersionData; } VkAccelerationStructureVersionInfoKHR; typedef struct VkCopyAccelerationStructureToMemoryInfoKHR { VkStructureType sType; const void* pNext; VkAccelerationStructureKHR src; VkDeviceOrHostAddressKHR dst; VkCopyAccelerationStructureModeKHR mode; } VkCopyAccelerationStructureToMemoryInfoKHR; typedef struct VkCopyMemoryToAccelerationStructureInfoKHR { VkStructureType sType; const void* pNext; VkDeviceOrHostAddressConstKHR src; VkAccelerationStructureKHR dst; VkCopyAccelerationStructureModeKHR mode; } VkCopyMemoryToAccelerationStructureInfoKHR; typedef struct VkCopyAccelerationStructureInfoKHR { VkStructureType sType; const void* pNext; VkAccelerationStructureKHR src; VkAccelerationStructureKHR dst; VkCopyAccelerationStructureModeKHR mode; } VkCopyAccelerationStructureInfoKHR; typedef VkResult (VKAPI_PTR *PFN_vkCreateAccelerationStructureKHR)(VkDevice device, const VkAccelerationStructureCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkAccelerationStructureKHR* pAccelerationStructure); typedef void (VKAPI_PTR *PFN_vkDestroyAccelerationStructureKHR)(VkDevice device, VkAccelerationStructureKHR accelerationStructure, const VkAllocationCallbacks* pAllocator); typedef void (VKAPI_PTR *PFN_vkCmdBuildAccelerationStructuresKHR)(VkCommandBuffer commandBuffer, uint32_t infoCount, const VkAccelerationStructureBuildGeometryInfoKHR* pInfos, const VkAccelerationStructureBuildRangeInfoKHR* const* ppBuildRangeInfos); typedef void (VKAPI_PTR *PFN_vkCmdBuildAccelerationStructuresIndirectKHR)(VkCommandBuffer commandBuffer, uint32_t infoCount, const VkAccelerationStructureBuildGeometryInfoKHR* pInfos, const VkDeviceAddress* pIndirectDeviceAddresses, const uint32_t* pIndirectStrides, const uint32_t* const* ppMaxPrimitiveCounts); typedef VkResult (VKAPI_PTR *PFN_vkBuildAccelerationStructuresKHR)(VkDevice device, VkDeferredOperationKHR deferredOperation, uint32_t infoCount, const VkAccelerationStructureBuildGeometryInfoKHR* pInfos, const VkAccelerationStructureBuildRangeInfoKHR* const* ppBuildRangeInfos); typedef VkResult (VKAPI_PTR *PFN_vkCopyAccelerationStructureKHR)(VkDevice device, VkDeferredOperationKHR deferredOperation, const VkCopyAccelerationStructureInfoKHR* pInfo); typedef VkResult (VKAPI_PTR *PFN_vkCopyAccelerationStructureToMemoryKHR)(VkDevice device, VkDeferredOperationKHR deferredOperation, const VkCopyAccelerationStructureToMemoryInfoKHR* pInfo); typedef VkResult (VKAPI_PTR *PFN_vkCopyMemoryToAccelerationStructureKHR)(VkDevice device, VkDeferredOperationKHR deferredOperation, const VkCopyMemoryToAccelerationStructureInfoKHR* pInfo); typedef VkResult (VKAPI_PTR *PFN_vkWriteAccelerationStructuresPropertiesKHR)(VkDevice device, uint32_t accelerationStructureCount, const VkAccelerationStructureKHR* pAccelerationStructures, VkQueryType queryType, size_t dataSize, void* pData, size_t stride); typedef void (VKAPI_PTR *PFN_vkCmdCopyAccelerationStructureKHR)(VkCommandBuffer commandBuffer, const VkCopyAccelerationStructureInfoKHR* pInfo); typedef void (VKAPI_PTR *PFN_vkCmdCopyAccelerationStructureToMemoryKHR)(VkCommandBuffer commandBuffer, const VkCopyAccelerationStructureToMemoryInfoKHR* pInfo); typedef void (VKAPI_PTR *PFN_vkCmdCopyMemoryToAccelerationStructureKHR)(VkCommandBuffer commandBuffer, const VkCopyMemoryToAccelerationStructureInfoKHR* pInfo); typedef VkDeviceAddress (VKAPI_PTR *PFN_vkGetAccelerationStructureDeviceAddressKHR)(VkDevice device, const VkAccelerationStructureDeviceAddressInfoKHR* pInfo); typedef void (VKAPI_PTR *PFN_vkCmdWriteAccelerationStructuresPropertiesKHR)(VkCommandBuffer commandBuffer, uint32_t accelerationStructureCount, const VkAccelerationStructureKHR* pAccelerationStructures, VkQueryType queryType, VkQueryPool queryPool, uint32_t firstQuery); typedef void (VKAPI_PTR *PFN_vkGetDeviceAccelerationStructureCompatibilityKHR)(VkDevice device, const VkAccelerationStructureVersionInfoKHR* pVersionInfo, VkAccelerationStructureCompatibilityKHR* pCompatibility); typedef void (VKAPI_PTR *PFN_vkGetAccelerationStructureBuildSizesKHR)(VkDevice device, VkAccelerationStructureBuildTypeKHR buildType, const VkAccelerationStructureBuildGeometryInfoKHR* pBuildInfo, const uint32_t* pMaxPrimitiveCounts, VkAccelerationStructureBuildSizesInfoKHR* pSizeInfo); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkCreateAccelerationStructureKHR( VkDevice device, const VkAccelerationStructureCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkAccelerationStructureKHR* pAccelerationStructure); VKAPI_ATTR void VKAPI_CALL vkDestroyAccelerationStructureKHR( VkDevice device, VkAccelerationStructureKHR accelerationStructure, const VkAllocationCallbacks* pAllocator); VKAPI_ATTR void VKAPI_CALL vkCmdBuildAccelerationStructuresKHR( VkCommandBuffer commandBuffer, uint32_t infoCount, const VkAccelerationStructureBuildGeometryInfoKHR* pInfos, const VkAccelerationStructureBuildRangeInfoKHR* const* ppBuildRangeInfos); VKAPI_ATTR void VKAPI_CALL vkCmdBuildAccelerationStructuresIndirectKHR( VkCommandBuffer commandBuffer, uint32_t infoCount, const VkAccelerationStructureBuildGeometryInfoKHR* pInfos, const VkDeviceAddress* pIndirectDeviceAddresses, const uint32_t* pIndirectStrides, const uint32_t* const* ppMaxPrimitiveCounts); VKAPI_ATTR VkResult VKAPI_CALL vkBuildAccelerationStructuresKHR( VkDevice device, VkDeferredOperationKHR deferredOperation, uint32_t infoCount, const VkAccelerationStructureBuildGeometryInfoKHR* pInfos, const VkAccelerationStructureBuildRangeInfoKHR* const* ppBuildRangeInfos); VKAPI_ATTR VkResult VKAPI_CALL vkCopyAccelerationStructureKHR( VkDevice device, VkDeferredOperationKHR deferredOperation, const VkCopyAccelerationStructureInfoKHR* pInfo); VKAPI_ATTR VkResult VKAPI_CALL vkCopyAccelerationStructureToMemoryKHR( VkDevice device, VkDeferredOperationKHR deferredOperation, const VkCopyAccelerationStructureToMemoryInfoKHR* pInfo); VKAPI_ATTR VkResult VKAPI_CALL vkCopyMemoryToAccelerationStructureKHR( VkDevice device, VkDeferredOperationKHR deferredOperation, const VkCopyMemoryToAccelerationStructureInfoKHR* pInfo); VKAPI_ATTR VkResult VKAPI_CALL vkWriteAccelerationStructuresPropertiesKHR( VkDevice device, uint32_t accelerationStructureCount, const VkAccelerationStructureKHR* pAccelerationStructures, VkQueryType queryType, size_t dataSize, void* pData, size_t stride); VKAPI_ATTR void VKAPI_CALL vkCmdCopyAccelerationStructureKHR( VkCommandBuffer commandBuffer, const VkCopyAccelerationStructureInfoKHR* pInfo); VKAPI_ATTR void VKAPI_CALL vkCmdCopyAccelerationStructureToMemoryKHR( VkCommandBuffer commandBuffer, const VkCopyAccelerationStructureToMemoryInfoKHR* pInfo); VKAPI_ATTR void VKAPI_CALL vkCmdCopyMemoryToAccelerationStructureKHR( VkCommandBuffer commandBuffer, const VkCopyMemoryToAccelerationStructureInfoKHR* pInfo); VKAPI_ATTR VkDeviceAddress VKAPI_CALL vkGetAccelerationStructureDeviceAddressKHR( VkDevice device, const VkAccelerationStructureDeviceAddressInfoKHR* pInfo); VKAPI_ATTR void VKAPI_CALL vkCmdWriteAccelerationStructuresPropertiesKHR( VkCommandBuffer commandBuffer, uint32_t accelerationStructureCount, const VkAccelerationStructureKHR* pAccelerationStructures, VkQueryType queryType, VkQueryPool queryPool, uint32_t firstQuery); VKAPI_ATTR void VKAPI_CALL vkGetDeviceAccelerationStructureCompatibilityKHR( VkDevice device, const VkAccelerationStructureVersionInfoKHR* pVersionInfo, VkAccelerationStructureCompatibilityKHR* pCompatibility); VKAPI_ATTR void VKAPI_CALL vkGetAccelerationStructureBuildSizesKHR( VkDevice device, VkAccelerationStructureBuildTypeKHR buildType, const VkAccelerationStructureBuildGeometryInfoKHR* pBuildInfo, const uint32_t* pMaxPrimitiveCounts, VkAccelerationStructureBuildSizesInfoKHR* pSizeInfo); #endif // VK_KHR_ray_tracing_pipeline is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_ray_tracing_pipeline 1 #define VK_KHR_RAY_TRACING_PIPELINE_SPEC_VERSION 1 #define VK_KHR_RAY_TRACING_PIPELINE_EXTENSION_NAME "VK_KHR_ray_tracing_pipeline" typedef enum VkShaderGroupShaderKHR { VK_SHADER_GROUP_SHADER_GENERAL_KHR = 0, VK_SHADER_GROUP_SHADER_CLOSEST_HIT_KHR = 1, VK_SHADER_GROUP_SHADER_ANY_HIT_KHR = 2, VK_SHADER_GROUP_SHADER_INTERSECTION_KHR = 3, VK_SHADER_GROUP_SHADER_MAX_ENUM_KHR = 0x7FFFFFFF } VkShaderGroupShaderKHR; typedef struct VkRayTracingShaderGroupCreateInfoKHR { VkStructureType sType; const void* pNext; VkRayTracingShaderGroupTypeKHR type; uint32_t generalShader; uint32_t closestHitShader; uint32_t anyHitShader; uint32_t intersectionShader; const void* pShaderGroupCaptureReplayHandle; } VkRayTracingShaderGroupCreateInfoKHR; typedef struct VkRayTracingPipelineInterfaceCreateInfoKHR { VkStructureType sType; const void* pNext; uint32_t maxPipelineRayPayloadSize; uint32_t maxPipelineRayHitAttributeSize; } VkRayTracingPipelineInterfaceCreateInfoKHR; typedef struct VkRayTracingPipelineCreateInfoKHR { VkStructureType sType; const void* pNext; VkPipelineCreateFlags flags; uint32_t stageCount; const VkPipelineShaderStageCreateInfo* pStages; uint32_t groupCount; const VkRayTracingShaderGroupCreateInfoKHR* pGroups; uint32_t maxPipelineRayRecursionDepth; const VkPipelineLibraryCreateInfoKHR* pLibraryInfo; const VkRayTracingPipelineInterfaceCreateInfoKHR* pLibraryInterface; const VkPipelineDynamicStateCreateInfo* pDynamicState; VkPipelineLayout layout; VkPipeline basePipelineHandle; int32_t basePipelineIndex; } VkRayTracingPipelineCreateInfoKHR; typedef struct VkPhysicalDeviceRayTracingPipelineFeaturesKHR { VkStructureType sType; void* pNext; VkBool32 rayTracingPipeline; VkBool32 rayTracingPipelineShaderGroupHandleCaptureReplay; VkBool32 rayTracingPipelineShaderGroupHandleCaptureReplayMixed; VkBool32 rayTracingPipelineTraceRaysIndirect; VkBool32 rayTraversalPrimitiveCulling; } VkPhysicalDeviceRayTracingPipelineFeaturesKHR; typedef struct VkPhysicalDeviceRayTracingPipelinePropertiesKHR { VkStructureType sType; void* pNext; uint32_t shaderGroupHandleSize; uint32_t maxRayRecursionDepth; uint32_t maxShaderGroupStride; uint32_t shaderGroupBaseAlignment; uint32_t shaderGroupHandleCaptureReplaySize; uint32_t maxRayDispatchInvocationCount; uint32_t shaderGroupHandleAlignment; uint32_t maxRayHitAttributeSize; } VkPhysicalDeviceRayTracingPipelinePropertiesKHR; typedef struct VkTraceRaysIndirectCommandKHR { uint32_t width; uint32_t height; uint32_t depth; } VkTraceRaysIndirectCommandKHR; typedef void (VKAPI_PTR *PFN_vkCmdTraceRaysKHR)(VkCommandBuffer commandBuffer, const VkStridedDeviceAddressRegionKHR* pRaygenShaderBindingTable, const VkStridedDeviceAddressRegionKHR* pMissShaderBindingTable, const VkStridedDeviceAddressRegionKHR* pHitShaderBindingTable, const VkStridedDeviceAddressRegionKHR* pCallableShaderBindingTable, uint32_t width, uint32_t height, uint32_t depth); typedef VkResult (VKAPI_PTR *PFN_vkCreateRayTracingPipelinesKHR)(VkDevice device, VkDeferredOperationKHR deferredOperation, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkRayTracingPipelineCreateInfoKHR* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines); typedef VkResult (VKAPI_PTR *PFN_vkGetRayTracingCaptureReplayShaderGroupHandlesKHR)(VkDevice device, VkPipeline pipeline, uint32_t firstGroup, uint32_t groupCount, size_t dataSize, void* pData); typedef void (VKAPI_PTR *PFN_vkCmdTraceRaysIndirectKHR)(VkCommandBuffer commandBuffer, const VkStridedDeviceAddressRegionKHR* pRaygenShaderBindingTable, const VkStridedDeviceAddressRegionKHR* pMissShaderBindingTable, const VkStridedDeviceAddressRegionKHR* pHitShaderBindingTable, const VkStridedDeviceAddressRegionKHR* pCallableShaderBindingTable, VkDeviceAddress indirectDeviceAddress); typedef VkDeviceSize (VKAPI_PTR *PFN_vkGetRayTracingShaderGroupStackSizeKHR)(VkDevice device, VkPipeline pipeline, uint32_t group, VkShaderGroupShaderKHR groupShader); typedef void (VKAPI_PTR *PFN_vkCmdSetRayTracingPipelineStackSizeKHR)(VkCommandBuffer commandBuffer, uint32_t pipelineStackSize); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR void VKAPI_CALL vkCmdTraceRaysKHR( VkCommandBuffer commandBuffer, const VkStridedDeviceAddressRegionKHR* pRaygenShaderBindingTable, const VkStridedDeviceAddressRegionKHR* pMissShaderBindingTable, const VkStridedDeviceAddressRegionKHR* pHitShaderBindingTable, const VkStridedDeviceAddressRegionKHR* pCallableShaderBindingTable, uint32_t width, uint32_t height, uint32_t depth); VKAPI_ATTR VkResult VKAPI_CALL vkCreateRayTracingPipelinesKHR( VkDevice device, VkDeferredOperationKHR deferredOperation, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkRayTracingPipelineCreateInfoKHR* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines); VKAPI_ATTR VkResult VKAPI_CALL vkGetRayTracingCaptureReplayShaderGroupHandlesKHR( VkDevice device, VkPipeline pipeline, uint32_t firstGroup, uint32_t groupCount, size_t dataSize, void* pData); VKAPI_ATTR void VKAPI_CALL vkCmdTraceRaysIndirectKHR( VkCommandBuffer commandBuffer, const VkStridedDeviceAddressRegionKHR* pRaygenShaderBindingTable, const VkStridedDeviceAddressRegionKHR* pMissShaderBindingTable, const VkStridedDeviceAddressRegionKHR* pHitShaderBindingTable, const VkStridedDeviceAddressRegionKHR* pCallableShaderBindingTable, VkDeviceAddress indirectDeviceAddress); VKAPI_ATTR VkDeviceSize VKAPI_CALL vkGetRayTracingShaderGroupStackSizeKHR( VkDevice device, VkPipeline pipeline, uint32_t group, VkShaderGroupShaderKHR groupShader); VKAPI_ATTR void VKAPI_CALL vkCmdSetRayTracingPipelineStackSizeKHR( VkCommandBuffer commandBuffer, uint32_t pipelineStackSize); #endif // VK_KHR_ray_query is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_ray_query 1 #define VK_KHR_RAY_QUERY_SPEC_VERSION 1 #define VK_KHR_RAY_QUERY_EXTENSION_NAME "VK_KHR_ray_query" typedef struct VkPhysicalDeviceRayQueryFeaturesKHR { VkStructureType sType; void* pNext; VkBool32 rayQuery; } VkPhysicalDeviceRayQueryFeaturesKHR; // VK_EXT_mesh_shader is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_mesh_shader 1 #define VK_EXT_MESH_SHADER_SPEC_VERSION 1 #define VK_EXT_MESH_SHADER_EXTENSION_NAME "VK_EXT_mesh_shader" typedef struct VkPhysicalDeviceMeshShaderFeaturesEXT { VkStructureType sType; void* pNext; VkBool32 taskShader; VkBool32 meshShader; VkBool32 multiviewMeshShader; VkBool32 primitiveFragmentShadingRateMeshShader; VkBool32 meshShaderQueries; } VkPhysicalDeviceMeshShaderFeaturesEXT; typedef struct VkPhysicalDeviceMeshShaderPropertiesEXT { VkStructureType sType; void* pNext; uint32_t maxTaskWorkGroupTotalCount; uint32_t maxTaskWorkGroupCount[3]; uint32_t maxTaskWorkGroupInvocations; uint32_t maxTaskWorkGroupSize[3]; uint32_t maxTaskPayloadSize; uint32_t maxTaskSharedMemorySize; uint32_t maxTaskPayloadAndSharedMemorySize; uint32_t maxMeshWorkGroupTotalCount; uint32_t maxMeshWorkGroupCount[3]; uint32_t maxMeshWorkGroupInvocations; uint32_t maxMeshWorkGroupSize[3]; uint32_t maxMeshSharedMemorySize; uint32_t maxMeshPayloadAndSharedMemorySize; uint32_t maxMeshOutputMemorySize; uint32_t maxMeshPayloadAndOutputMemorySize; uint32_t maxMeshOutputComponents; uint32_t maxMeshOutputVertices; uint32_t maxMeshOutputPrimitives; uint32_t maxMeshOutputLayers; uint32_t maxMeshMultiviewViewCount; uint32_t meshOutputPerVertexGranularity; uint32_t meshOutputPerPrimitiveGranularity; uint32_t maxPreferredTaskWorkGroupInvocations; uint32_t maxPreferredMeshWorkGroupInvocations; VkBool32 prefersLocalInvocationVertexOutput; VkBool32 prefersLocalInvocationPrimitiveOutput; VkBool32 prefersCompactVertexOutput; VkBool32 prefersCompactPrimitiveOutput; } VkPhysicalDeviceMeshShaderPropertiesEXT; typedef struct VkDrawMeshTasksIndirectCommandEXT { uint32_t groupCountX; uint32_t groupCountY; uint32_t groupCountZ; } VkDrawMeshTasksIndirectCommandEXT; typedef void (VKAPI_PTR *PFN_vkCmdDrawMeshTasksEXT)(VkCommandBuffer commandBuffer, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ); typedef void (VKAPI_PTR *PFN_vkCmdDrawMeshTasksIndirectEXT)(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride); typedef void (VKAPI_PTR *PFN_vkCmdDrawMeshTasksIndirectCountEXT)(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR void VKAPI_CALL vkCmdDrawMeshTasksEXT( VkCommandBuffer commandBuffer, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ); VKAPI_ATTR void VKAPI_CALL vkCmdDrawMeshTasksIndirectEXT( VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride); VKAPI_ATTR void VKAPI_CALL vkCmdDrawMeshTasksIndirectCountEXT( VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride); #endif #ifdef __cplusplus } #endif #endif ================================================ FILE: src/libraries/vulkanheaders/vulkan_directfb.h ================================================ #ifndef VULKAN_DIRECTFB_H_ #define VULKAN_DIRECTFB_H_ 1 /* ** Copyright 2015-2025 The Khronos Group Inc. ** ** SPDX-License-Identifier: Apache-2.0 */ /* ** This header is generated from the Khronos Vulkan XML API Registry. ** */ #ifdef __cplusplus extern "C" { #endif // VK_EXT_directfb_surface is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_directfb_surface 1 #define VK_EXT_DIRECTFB_SURFACE_SPEC_VERSION 1 #define VK_EXT_DIRECTFB_SURFACE_EXTENSION_NAME "VK_EXT_directfb_surface" typedef VkFlags VkDirectFBSurfaceCreateFlagsEXT; typedef struct VkDirectFBSurfaceCreateInfoEXT { VkStructureType sType; const void* pNext; VkDirectFBSurfaceCreateFlagsEXT flags; IDirectFB* dfb; IDirectFBSurface* surface; } VkDirectFBSurfaceCreateInfoEXT; typedef VkResult (VKAPI_PTR *PFN_vkCreateDirectFBSurfaceEXT)(VkInstance instance, const VkDirectFBSurfaceCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceDirectFBPresentationSupportEXT)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, IDirectFB* dfb); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkCreateDirectFBSurfaceEXT( VkInstance instance, const VkDirectFBSurfaceCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceDirectFBPresentationSupportEXT( VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, IDirectFB* dfb); #endif #ifdef __cplusplus } #endif #endif ================================================ FILE: src/libraries/vulkanheaders/vulkan_enums.hpp ================================================ // Copyright 2015-2025 The Khronos Group Inc. // // SPDX-License-Identifier: Apache-2.0 OR MIT // // This header is generated from the Khronos Vulkan XML API Registry. #ifndef VULKAN_ENUMS_HPP #define VULKAN_ENUMS_HPP // include-what-you-use: make sure, vulkan.hpp is used by code-completers // IWYU pragma: private; include "vulkan.hpp" namespace VULKAN_HPP_NAMESPACE { template struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = false; }; template class Flags { public: using MaskType = typename std::underlying_type::type; // constructors VULKAN_HPP_CONSTEXPR Flags() VULKAN_HPP_NOEXCEPT : m_mask( 0 ) {} VULKAN_HPP_CONSTEXPR Flags( BitType bit ) VULKAN_HPP_NOEXCEPT : m_mask( static_cast( bit ) ) {} VULKAN_HPP_CONSTEXPR Flags( Flags const & rhs ) VULKAN_HPP_NOEXCEPT = default; VULKAN_HPP_CONSTEXPR explicit Flags( MaskType flags ) VULKAN_HPP_NOEXCEPT : m_mask( flags ) {} // relational operators #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( Flags const & ) const = default; #else VULKAN_HPP_CONSTEXPR bool operator<( Flags const & rhs ) const VULKAN_HPP_NOEXCEPT { return m_mask < rhs.m_mask; } VULKAN_HPP_CONSTEXPR bool operator<=( Flags const & rhs ) const VULKAN_HPP_NOEXCEPT { return m_mask <= rhs.m_mask; } VULKAN_HPP_CONSTEXPR bool operator>( Flags const & rhs ) const VULKAN_HPP_NOEXCEPT { return m_mask > rhs.m_mask; } VULKAN_HPP_CONSTEXPR bool operator>=( Flags const & rhs ) const VULKAN_HPP_NOEXCEPT { return m_mask >= rhs.m_mask; } VULKAN_HPP_CONSTEXPR bool operator==( Flags const & rhs ) const VULKAN_HPP_NOEXCEPT { return m_mask == rhs.m_mask; } VULKAN_HPP_CONSTEXPR bool operator!=( Flags const & rhs ) const VULKAN_HPP_NOEXCEPT { return m_mask != rhs.m_mask; } #endif // logical operator VULKAN_HPP_CONSTEXPR bool operator!() const VULKAN_HPP_NOEXCEPT { return !m_mask; } // bitwise operators VULKAN_HPP_CONSTEXPR Flags operator&( Flags const & rhs ) const VULKAN_HPP_NOEXCEPT { return Flags( m_mask & rhs.m_mask ); } VULKAN_HPP_CONSTEXPR Flags operator|( Flags const & rhs ) const VULKAN_HPP_NOEXCEPT { return Flags( m_mask | rhs.m_mask ); } VULKAN_HPP_CONSTEXPR Flags operator^( Flags const & rhs ) const VULKAN_HPP_NOEXCEPT { return Flags( m_mask ^ rhs.m_mask ); } VULKAN_HPP_CONSTEXPR Flags operator~() const VULKAN_HPP_NOEXCEPT { return Flags( m_mask ^ FlagTraits::allFlags.m_mask ); } // assignment operators VULKAN_HPP_CONSTEXPR_14 Flags & operator=( Flags const & rhs ) VULKAN_HPP_NOEXCEPT = default; VULKAN_HPP_CONSTEXPR_14 Flags & operator|=( Flags const & rhs ) VULKAN_HPP_NOEXCEPT { m_mask |= rhs.m_mask; return *this; } VULKAN_HPP_CONSTEXPR_14 Flags & operator&=( Flags const & rhs ) VULKAN_HPP_NOEXCEPT { m_mask &= rhs.m_mask; return *this; } VULKAN_HPP_CONSTEXPR_14 Flags & operator^=( Flags const & rhs ) VULKAN_HPP_NOEXCEPT { m_mask ^= rhs.m_mask; return *this; } // cast operators explicit VULKAN_HPP_CONSTEXPR operator bool() const VULKAN_HPP_NOEXCEPT { return !!m_mask; } explicit VULKAN_HPP_CONSTEXPR operator MaskType() const VULKAN_HPP_NOEXCEPT { return m_mask; } #if defined( VULKAN_HPP_FLAGS_MASK_TYPE_AS_PUBLIC ) public: #else private: #endif MaskType m_mask; }; #if !defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) // relational operators only needed for pre C++20 template VULKAN_HPP_CONSTEXPR bool operator<( BitType bit, Flags const & flags ) VULKAN_HPP_NOEXCEPT { return flags.operator>( bit ); } template VULKAN_HPP_CONSTEXPR bool operator<=( BitType bit, Flags const & flags ) VULKAN_HPP_NOEXCEPT { return flags.operator>=( bit ); } template VULKAN_HPP_CONSTEXPR bool operator>( BitType bit, Flags const & flags ) VULKAN_HPP_NOEXCEPT { return flags.operator<( bit ); } template VULKAN_HPP_CONSTEXPR bool operator>=( BitType bit, Flags const & flags ) VULKAN_HPP_NOEXCEPT { return flags.operator<=( bit ); } template VULKAN_HPP_CONSTEXPR bool operator==( BitType bit, Flags const & flags ) VULKAN_HPP_NOEXCEPT { return flags.operator==( bit ); } template VULKAN_HPP_CONSTEXPR bool operator!=( BitType bit, Flags const & flags ) VULKAN_HPP_NOEXCEPT { return flags.operator!=( bit ); } #endif // bitwise operators template VULKAN_HPP_CONSTEXPR Flags operator&( BitType bit, Flags const & flags ) VULKAN_HPP_NOEXCEPT { return flags.operator&( bit ); } template VULKAN_HPP_CONSTEXPR Flags operator|( BitType bit, Flags const & flags ) VULKAN_HPP_NOEXCEPT { return flags.operator|( bit ); } template VULKAN_HPP_CONSTEXPR Flags operator^( BitType bit, Flags const & flags ) VULKAN_HPP_NOEXCEPT { return flags.operator^( bit ); } // bitwise operators on BitType template ::isBitmask, bool>::type = true> VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR Flags operator&( BitType lhs, BitType rhs ) VULKAN_HPP_NOEXCEPT { return Flags( lhs ) & rhs; } template ::isBitmask, bool>::type = true> VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR Flags operator|( BitType lhs, BitType rhs ) VULKAN_HPP_NOEXCEPT { return Flags( lhs ) | rhs; } template ::isBitmask, bool>::type = true> VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR Flags operator^( BitType lhs, BitType rhs ) VULKAN_HPP_NOEXCEPT { return Flags( lhs ) ^ rhs; } template ::isBitmask, bool>::type = true> VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR Flags operator~( BitType bit ) VULKAN_HPP_NOEXCEPT { return ~( Flags( bit ) ); } //============= //=== ENUMs === //============= //=== VK_VERSION_1_0 === enum class Result { eSuccess = VK_SUCCESS, eNotReady = VK_NOT_READY, eTimeout = VK_TIMEOUT, eEventSet = VK_EVENT_SET, eEventReset = VK_EVENT_RESET, eIncomplete = VK_INCOMPLETE, eErrorOutOfHostMemory = VK_ERROR_OUT_OF_HOST_MEMORY, eErrorOutOfDeviceMemory = VK_ERROR_OUT_OF_DEVICE_MEMORY, eErrorInitializationFailed = VK_ERROR_INITIALIZATION_FAILED, eErrorDeviceLost = VK_ERROR_DEVICE_LOST, eErrorMemoryMapFailed = VK_ERROR_MEMORY_MAP_FAILED, eErrorLayerNotPresent = VK_ERROR_LAYER_NOT_PRESENT, eErrorExtensionNotPresent = VK_ERROR_EXTENSION_NOT_PRESENT, eErrorFeatureNotPresent = VK_ERROR_FEATURE_NOT_PRESENT, eErrorIncompatibleDriver = VK_ERROR_INCOMPATIBLE_DRIVER, eErrorTooManyObjects = VK_ERROR_TOO_MANY_OBJECTS, eErrorFormatNotSupported = VK_ERROR_FORMAT_NOT_SUPPORTED, eErrorFragmentedPool = VK_ERROR_FRAGMENTED_POOL, eErrorUnknown = VK_ERROR_UNKNOWN, eErrorOutOfPoolMemory = VK_ERROR_OUT_OF_POOL_MEMORY, eErrorOutOfPoolMemoryKHR = VK_ERROR_OUT_OF_POOL_MEMORY_KHR, eErrorInvalidExternalHandle = VK_ERROR_INVALID_EXTERNAL_HANDLE, eErrorInvalidExternalHandleKHR = VK_ERROR_INVALID_EXTERNAL_HANDLE_KHR, eErrorFragmentation = VK_ERROR_FRAGMENTATION, eErrorFragmentationEXT = VK_ERROR_FRAGMENTATION_EXT, eErrorInvalidOpaqueCaptureAddress = VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS, eErrorInvalidDeviceAddressEXT = VK_ERROR_INVALID_DEVICE_ADDRESS_EXT, eErrorInvalidOpaqueCaptureAddressKHR = VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS_KHR, ePipelineCompileRequired = VK_PIPELINE_COMPILE_REQUIRED, ePipelineCompileRequiredEXT = VK_PIPELINE_COMPILE_REQUIRED_EXT, eErrorPipelineCompileRequiredEXT = VK_ERROR_PIPELINE_COMPILE_REQUIRED_EXT, eErrorNotPermitted = VK_ERROR_NOT_PERMITTED, eErrorNotPermittedEXT = VK_ERROR_NOT_PERMITTED_EXT, eErrorNotPermittedKHR = VK_ERROR_NOT_PERMITTED_KHR, eErrorSurfaceLostKHR = VK_ERROR_SURFACE_LOST_KHR, eErrorNativeWindowInUseKHR = VK_ERROR_NATIVE_WINDOW_IN_USE_KHR, eSuboptimalKHR = VK_SUBOPTIMAL_KHR, eErrorOutOfDateKHR = VK_ERROR_OUT_OF_DATE_KHR, eErrorIncompatibleDisplayKHR = VK_ERROR_INCOMPATIBLE_DISPLAY_KHR, eErrorValidationFailedEXT = VK_ERROR_VALIDATION_FAILED_EXT, eErrorInvalidShaderNV = VK_ERROR_INVALID_SHADER_NV, eErrorImageUsageNotSupportedKHR = VK_ERROR_IMAGE_USAGE_NOT_SUPPORTED_KHR, eErrorVideoPictureLayoutNotSupportedKHR = VK_ERROR_VIDEO_PICTURE_LAYOUT_NOT_SUPPORTED_KHR, eErrorVideoProfileOperationNotSupportedKHR = VK_ERROR_VIDEO_PROFILE_OPERATION_NOT_SUPPORTED_KHR, eErrorVideoProfileFormatNotSupportedKHR = VK_ERROR_VIDEO_PROFILE_FORMAT_NOT_SUPPORTED_KHR, eErrorVideoProfileCodecNotSupportedKHR = VK_ERROR_VIDEO_PROFILE_CODEC_NOT_SUPPORTED_KHR, eErrorVideoStdVersionNotSupportedKHR = VK_ERROR_VIDEO_STD_VERSION_NOT_SUPPORTED_KHR, eErrorInvalidDrmFormatModifierPlaneLayoutEXT = VK_ERROR_INVALID_DRM_FORMAT_MODIFIER_PLANE_LAYOUT_EXT, #if defined( VK_USE_PLATFORM_WIN32_KHR ) eErrorFullScreenExclusiveModeLostEXT = VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT, #endif /*VK_USE_PLATFORM_WIN32_KHR*/ eThreadIdleKHR = VK_THREAD_IDLE_KHR, eThreadDoneKHR = VK_THREAD_DONE_KHR, eOperationDeferredKHR = VK_OPERATION_DEFERRED_KHR, eOperationNotDeferredKHR = VK_OPERATION_NOT_DEFERRED_KHR, eErrorInvalidVideoStdParametersKHR = VK_ERROR_INVALID_VIDEO_STD_PARAMETERS_KHR, eErrorCompressionExhaustedEXT = VK_ERROR_COMPRESSION_EXHAUSTED_EXT, eIncompatibleShaderBinaryEXT = VK_INCOMPATIBLE_SHADER_BINARY_EXT, eErrorIncompatibleShaderBinaryEXT = VK_ERROR_INCOMPATIBLE_SHADER_BINARY_EXT, ePipelineBinaryMissingKHR = VK_PIPELINE_BINARY_MISSING_KHR, eErrorNotEnoughSpaceKHR = VK_ERROR_NOT_ENOUGH_SPACE_KHR }; enum class StructureType { eApplicationInfo = VK_STRUCTURE_TYPE_APPLICATION_INFO, eInstanceCreateInfo = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO, eDeviceQueueCreateInfo = VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO, eDeviceCreateInfo = VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO, eSubmitInfo = VK_STRUCTURE_TYPE_SUBMIT_INFO, eMemoryAllocateInfo = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO, eMappedMemoryRange = VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE, eBindSparseInfo = VK_STRUCTURE_TYPE_BIND_SPARSE_INFO, eFenceCreateInfo = VK_STRUCTURE_TYPE_FENCE_CREATE_INFO, eSemaphoreCreateInfo = VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO, eEventCreateInfo = VK_STRUCTURE_TYPE_EVENT_CREATE_INFO, eQueryPoolCreateInfo = VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO, eBufferCreateInfo = VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO, eBufferViewCreateInfo = VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO, eImageCreateInfo = VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO, eImageViewCreateInfo = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO, eShaderModuleCreateInfo = VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO, ePipelineCacheCreateInfo = VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO, ePipelineShaderStageCreateInfo = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO, ePipelineVertexInputStateCreateInfo = VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO, ePipelineInputAssemblyStateCreateInfo = VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO, ePipelineTessellationStateCreateInfo = VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO, ePipelineViewportStateCreateInfo = VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO, ePipelineRasterizationStateCreateInfo = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO, ePipelineMultisampleStateCreateInfo = VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO, ePipelineDepthStencilStateCreateInfo = VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO, ePipelineColorBlendStateCreateInfo = VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO, ePipelineDynamicStateCreateInfo = VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO, eGraphicsPipelineCreateInfo = VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO, eComputePipelineCreateInfo = VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO, ePipelineLayoutCreateInfo = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO, eSamplerCreateInfo = VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO, eDescriptorSetLayoutCreateInfo = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO, eDescriptorPoolCreateInfo = VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO, eDescriptorSetAllocateInfo = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO, eWriteDescriptorSet = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET, eCopyDescriptorSet = VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET, eFramebufferCreateInfo = VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO, eRenderPassCreateInfo = VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO, eCommandPoolCreateInfo = VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO, eCommandBufferAllocateInfo = VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO, eCommandBufferInheritanceInfo = VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO, eCommandBufferBeginInfo = VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO, eRenderPassBeginInfo = VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO, eBufferMemoryBarrier = VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER, eImageMemoryBarrier = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER, eMemoryBarrier = VK_STRUCTURE_TYPE_MEMORY_BARRIER, eLoaderInstanceCreateInfo = VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO, eLoaderDeviceCreateInfo = VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO, ePhysicalDeviceSubgroupProperties = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_PROPERTIES, eBindBufferMemoryInfo = VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO, eBindBufferMemoryInfoKHR = VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO_KHR, eBindImageMemoryInfo = VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO, eBindImageMemoryInfoKHR = VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO_KHR, ePhysicalDevice16BitStorageFeatures = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES, ePhysicalDevice16BitStorageFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES_KHR, eMemoryDedicatedRequirements = VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS, eMemoryDedicatedRequirementsKHR = VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS_KHR, eMemoryDedicatedAllocateInfo = VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO, eMemoryDedicatedAllocateInfoKHR = VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO_KHR, eMemoryAllocateFlagsInfo = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO, eMemoryAllocateFlagsInfoKHR = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO_KHR, eDeviceGroupRenderPassBeginInfo = VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO, eDeviceGroupRenderPassBeginInfoKHR = VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO_KHR, eDeviceGroupCommandBufferBeginInfo = VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO, eDeviceGroupCommandBufferBeginInfoKHR = VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO_KHR, eDeviceGroupSubmitInfo = VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO, eDeviceGroupSubmitInfoKHR = VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO_KHR, eDeviceGroupBindSparseInfo = VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO, eDeviceGroupBindSparseInfoKHR = VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO_KHR, eBindBufferMemoryDeviceGroupInfo = VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO, eBindBufferMemoryDeviceGroupInfoKHR = VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO_KHR, eBindImageMemoryDeviceGroupInfo = VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO, eBindImageMemoryDeviceGroupInfoKHR = VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO_KHR, ePhysicalDeviceGroupProperties = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES, ePhysicalDeviceGroupPropertiesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES_KHR, eDeviceGroupDeviceCreateInfo = VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO, eDeviceGroupDeviceCreateInfoKHR = VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO_KHR, eBufferMemoryRequirementsInfo2 = VK_STRUCTURE_TYPE_BUFFER_MEMORY_REQUIREMENTS_INFO_2, eBufferMemoryRequirementsInfo2KHR = VK_STRUCTURE_TYPE_BUFFER_MEMORY_REQUIREMENTS_INFO_2_KHR, eImageMemoryRequirementsInfo2 = VK_STRUCTURE_TYPE_IMAGE_MEMORY_REQUIREMENTS_INFO_2, eImageMemoryRequirementsInfo2KHR = VK_STRUCTURE_TYPE_IMAGE_MEMORY_REQUIREMENTS_INFO_2_KHR, eImageSparseMemoryRequirementsInfo2 = VK_STRUCTURE_TYPE_IMAGE_SPARSE_MEMORY_REQUIREMENTS_INFO_2, eImageSparseMemoryRequirementsInfo2KHR = VK_STRUCTURE_TYPE_IMAGE_SPARSE_MEMORY_REQUIREMENTS_INFO_2_KHR, eMemoryRequirements2 = VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2, eMemoryRequirements2KHR = VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2_KHR, eSparseImageMemoryRequirements2 = VK_STRUCTURE_TYPE_SPARSE_IMAGE_MEMORY_REQUIREMENTS_2, eSparseImageMemoryRequirements2KHR = VK_STRUCTURE_TYPE_SPARSE_IMAGE_MEMORY_REQUIREMENTS_2_KHR, ePhysicalDeviceFeatures2 = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2, ePhysicalDeviceFeatures2KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2_KHR, ePhysicalDeviceProperties2 = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2, ePhysicalDeviceProperties2KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2_KHR, eFormatProperties2 = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2, eFormatProperties2KHR = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2_KHR, eImageFormatProperties2 = VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2, eImageFormatProperties2KHR = VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2_KHR, ePhysicalDeviceImageFormatInfo2 = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2, ePhysicalDeviceImageFormatInfo2KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2_KHR, eQueueFamilyProperties2 = VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2, eQueueFamilyProperties2KHR = VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2_KHR, ePhysicalDeviceMemoryProperties2 = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2, ePhysicalDeviceMemoryProperties2KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2_KHR, eSparseImageFormatProperties2 = VK_STRUCTURE_TYPE_SPARSE_IMAGE_FORMAT_PROPERTIES_2, eSparseImageFormatProperties2KHR = VK_STRUCTURE_TYPE_SPARSE_IMAGE_FORMAT_PROPERTIES_2_KHR, ePhysicalDeviceSparseImageFormatInfo2 = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2, ePhysicalDeviceSparseImageFormatInfo2KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2_KHR, ePhysicalDevicePointClippingProperties = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES, ePhysicalDevicePointClippingPropertiesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES_KHR, eRenderPassInputAttachmentAspectCreateInfo = VK_STRUCTURE_TYPE_RENDER_PASS_INPUT_ATTACHMENT_ASPECT_CREATE_INFO, eRenderPassInputAttachmentAspectCreateInfoKHR = VK_STRUCTURE_TYPE_RENDER_PASS_INPUT_ATTACHMENT_ASPECT_CREATE_INFO_KHR, eImageViewUsageCreateInfo = VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO, eImageViewUsageCreateInfoKHR = VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO_KHR, ePipelineTessellationDomainOriginStateCreateInfo = VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO, ePipelineTessellationDomainOriginStateCreateInfoKHR = VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO_KHR, eRenderPassMultiviewCreateInfo = VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO, eRenderPassMultiviewCreateInfoKHR = VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO_KHR, ePhysicalDeviceMultiviewFeatures = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES, ePhysicalDeviceMultiviewFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES_KHR, ePhysicalDeviceMultiviewProperties = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES, ePhysicalDeviceMultiviewPropertiesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES_KHR, ePhysicalDeviceVariablePointersFeatures = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES, ePhysicalDeviceVariablePointerFeatures = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTER_FEATURES, ePhysicalDeviceVariablePointersFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES_KHR, ePhysicalDeviceVariablePointerFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTER_FEATURES_KHR, eProtectedSubmitInfo = VK_STRUCTURE_TYPE_PROTECTED_SUBMIT_INFO, ePhysicalDeviceProtectedMemoryFeatures = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_FEATURES, ePhysicalDeviceProtectedMemoryProperties = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_PROPERTIES, eDeviceQueueInfo2 = VK_STRUCTURE_TYPE_DEVICE_QUEUE_INFO_2, eSamplerYcbcrConversionCreateInfo = VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_CREATE_INFO, eSamplerYcbcrConversionCreateInfoKHR = VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_CREATE_INFO_KHR, eSamplerYcbcrConversionInfo = VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO, eSamplerYcbcrConversionInfoKHR = VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO_KHR, eBindImagePlaneMemoryInfo = VK_STRUCTURE_TYPE_BIND_IMAGE_PLANE_MEMORY_INFO, eBindImagePlaneMemoryInfoKHR = VK_STRUCTURE_TYPE_BIND_IMAGE_PLANE_MEMORY_INFO_KHR, eImagePlaneMemoryRequirementsInfo = VK_STRUCTURE_TYPE_IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO, eImagePlaneMemoryRequirementsInfoKHR = VK_STRUCTURE_TYPE_IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO_KHR, ePhysicalDeviceSamplerYcbcrConversionFeatures = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES, ePhysicalDeviceSamplerYcbcrConversionFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES_KHR, eSamplerYcbcrConversionImageFormatProperties = VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES, eSamplerYcbcrConversionImageFormatPropertiesKHR = VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES_KHR, eDescriptorUpdateTemplateCreateInfo = VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO, eDescriptorUpdateTemplateCreateInfoKHR = VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO_KHR, ePhysicalDeviceExternalImageFormatInfo = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO, ePhysicalDeviceExternalImageFormatInfoKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO_KHR, eExternalImageFormatProperties = VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES, eExternalImageFormatPropertiesKHR = VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES_KHR, ePhysicalDeviceExternalBufferInfo = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO, ePhysicalDeviceExternalBufferInfoKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO_KHR, eExternalBufferProperties = VK_STRUCTURE_TYPE_EXTERNAL_BUFFER_PROPERTIES, eExternalBufferPropertiesKHR = VK_STRUCTURE_TYPE_EXTERNAL_BUFFER_PROPERTIES_KHR, ePhysicalDeviceIdProperties = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES, ePhysicalDeviceIdPropertiesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES_KHR, eExternalMemoryBufferCreateInfo = VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO, eExternalMemoryBufferCreateInfoKHR = VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO_KHR, eExternalMemoryImageCreateInfo = VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO, eExternalMemoryImageCreateInfoKHR = VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_KHR, eExportMemoryAllocateInfo = VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO, eExportMemoryAllocateInfoKHR = VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_KHR, ePhysicalDeviceExternalFenceInfo = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FENCE_INFO, ePhysicalDeviceExternalFenceInfoKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FENCE_INFO_KHR, eExternalFenceProperties = VK_STRUCTURE_TYPE_EXTERNAL_FENCE_PROPERTIES, eExternalFencePropertiesKHR = VK_STRUCTURE_TYPE_EXTERNAL_FENCE_PROPERTIES_KHR, eExportFenceCreateInfo = VK_STRUCTURE_TYPE_EXPORT_FENCE_CREATE_INFO, eExportFenceCreateInfoKHR = VK_STRUCTURE_TYPE_EXPORT_FENCE_CREATE_INFO_KHR, eExportSemaphoreCreateInfo = VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO, eExportSemaphoreCreateInfoKHR = VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO_KHR, ePhysicalDeviceExternalSemaphoreInfo = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO, ePhysicalDeviceExternalSemaphoreInfoKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO_KHR, eExternalSemaphoreProperties = VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES, eExternalSemaphorePropertiesKHR = VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES_KHR, ePhysicalDeviceMaintenance3Properties = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES, ePhysicalDeviceMaintenance3PropertiesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES_KHR, eDescriptorSetLayoutSupport = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_SUPPORT, eDescriptorSetLayoutSupportKHR = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_SUPPORT_KHR, ePhysicalDeviceShaderDrawParametersFeatures = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETERS_FEATURES, ePhysicalDeviceShaderDrawParameterFeatures = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETER_FEATURES, ePhysicalDeviceVulkan11Features = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_FEATURES, ePhysicalDeviceVulkan11Properties = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_PROPERTIES, ePhysicalDeviceVulkan12Features = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_FEATURES, ePhysicalDeviceVulkan12Properties = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_PROPERTIES, eImageFormatListCreateInfo = VK_STRUCTURE_TYPE_IMAGE_FORMAT_LIST_CREATE_INFO, eImageFormatListCreateInfoKHR = VK_STRUCTURE_TYPE_IMAGE_FORMAT_LIST_CREATE_INFO_KHR, eAttachmentDescription2 = VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_2, eAttachmentDescription2KHR = VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_2_KHR, eAttachmentReference2 = VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_2, eAttachmentReference2KHR = VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_2_KHR, eSubpassDescription2 = VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_2, eSubpassDescription2KHR = VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_2_KHR, eSubpassDependency2 = VK_STRUCTURE_TYPE_SUBPASS_DEPENDENCY_2, eSubpassDependency2KHR = VK_STRUCTURE_TYPE_SUBPASS_DEPENDENCY_2_KHR, eRenderPassCreateInfo2 = VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO_2, eRenderPassCreateInfo2KHR = VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO_2_KHR, eSubpassBeginInfo = VK_STRUCTURE_TYPE_SUBPASS_BEGIN_INFO, eSubpassBeginInfoKHR = VK_STRUCTURE_TYPE_SUBPASS_BEGIN_INFO_KHR, eSubpassEndInfo = VK_STRUCTURE_TYPE_SUBPASS_END_INFO, eSubpassEndInfoKHR = VK_STRUCTURE_TYPE_SUBPASS_END_INFO_KHR, ePhysicalDevice8BitStorageFeatures = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES, ePhysicalDevice8BitStorageFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES_KHR, ePhysicalDeviceDriverProperties = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES, ePhysicalDeviceDriverPropertiesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES_KHR, ePhysicalDeviceShaderAtomicInt64Features = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES, ePhysicalDeviceShaderAtomicInt64FeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES_KHR, ePhysicalDeviceShaderFloat16Int8Features = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT16_INT8_FEATURES, ePhysicalDeviceShaderFloat16Int8FeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT16_INT8_FEATURES_KHR, ePhysicalDeviceFloat16Int8FeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT16_INT8_FEATURES_KHR, ePhysicalDeviceFloatControlsProperties = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT_CONTROLS_PROPERTIES, ePhysicalDeviceFloatControlsPropertiesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT_CONTROLS_PROPERTIES_KHR, eDescriptorSetLayoutBindingFlagsCreateInfo = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_BINDING_FLAGS_CREATE_INFO, eDescriptorSetLayoutBindingFlagsCreateInfoEXT = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_BINDING_FLAGS_CREATE_INFO_EXT, ePhysicalDeviceDescriptorIndexingFeatures = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES, ePhysicalDeviceDescriptorIndexingFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES_EXT, ePhysicalDeviceDescriptorIndexingProperties = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_PROPERTIES, ePhysicalDeviceDescriptorIndexingPropertiesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_PROPERTIES_EXT, eDescriptorSetVariableDescriptorCountAllocateInfo = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_ALLOCATE_INFO, eDescriptorSetVariableDescriptorCountAllocateInfoEXT = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_ALLOCATE_INFO_EXT, eDescriptorSetVariableDescriptorCountLayoutSupport = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_LAYOUT_SUPPORT, eDescriptorSetVariableDescriptorCountLayoutSupportEXT = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_LAYOUT_SUPPORT_EXT, ePhysicalDeviceDepthStencilResolveProperties = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_STENCIL_RESOLVE_PROPERTIES, ePhysicalDeviceDepthStencilResolvePropertiesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_STENCIL_RESOLVE_PROPERTIES_KHR, eSubpassDescriptionDepthStencilResolve = VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_DEPTH_STENCIL_RESOLVE, eSubpassDescriptionDepthStencilResolveKHR = VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_DEPTH_STENCIL_RESOLVE_KHR, ePhysicalDeviceScalarBlockLayoutFeatures = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCALAR_BLOCK_LAYOUT_FEATURES, ePhysicalDeviceScalarBlockLayoutFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCALAR_BLOCK_LAYOUT_FEATURES_EXT, eImageStencilUsageCreateInfo = VK_STRUCTURE_TYPE_IMAGE_STENCIL_USAGE_CREATE_INFO, eImageStencilUsageCreateInfoEXT = VK_STRUCTURE_TYPE_IMAGE_STENCIL_USAGE_CREATE_INFO_EXT, ePhysicalDeviceSamplerFilterMinmaxProperties = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_FILTER_MINMAX_PROPERTIES, ePhysicalDeviceSamplerFilterMinmaxPropertiesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_FILTER_MINMAX_PROPERTIES_EXT, eSamplerReductionModeCreateInfo = VK_STRUCTURE_TYPE_SAMPLER_REDUCTION_MODE_CREATE_INFO, eSamplerReductionModeCreateInfoEXT = VK_STRUCTURE_TYPE_SAMPLER_REDUCTION_MODE_CREATE_INFO_EXT, ePhysicalDeviceVulkanMemoryModelFeatures = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_MEMORY_MODEL_FEATURES, ePhysicalDeviceVulkanMemoryModelFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_MEMORY_MODEL_FEATURES_KHR, ePhysicalDeviceImagelessFramebufferFeatures = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGELESS_FRAMEBUFFER_FEATURES, ePhysicalDeviceImagelessFramebufferFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGELESS_FRAMEBUFFER_FEATURES_KHR, eFramebufferAttachmentsCreateInfo = VK_STRUCTURE_TYPE_FRAMEBUFFER_ATTACHMENTS_CREATE_INFO, eFramebufferAttachmentsCreateInfoKHR = VK_STRUCTURE_TYPE_FRAMEBUFFER_ATTACHMENTS_CREATE_INFO_KHR, eFramebufferAttachmentImageInfo = VK_STRUCTURE_TYPE_FRAMEBUFFER_ATTACHMENT_IMAGE_INFO, eFramebufferAttachmentImageInfoKHR = VK_STRUCTURE_TYPE_FRAMEBUFFER_ATTACHMENT_IMAGE_INFO_KHR, eRenderPassAttachmentBeginInfo = VK_STRUCTURE_TYPE_RENDER_PASS_ATTACHMENT_BEGIN_INFO, eRenderPassAttachmentBeginInfoKHR = VK_STRUCTURE_TYPE_RENDER_PASS_ATTACHMENT_BEGIN_INFO_KHR, ePhysicalDeviceUniformBufferStandardLayoutFeatures = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_UNIFORM_BUFFER_STANDARD_LAYOUT_FEATURES, ePhysicalDeviceUniformBufferStandardLayoutFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_UNIFORM_BUFFER_STANDARD_LAYOUT_FEATURES_KHR, ePhysicalDeviceShaderSubgroupExtendedTypesFeatures = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_EXTENDED_TYPES_FEATURES, ePhysicalDeviceShaderSubgroupExtendedTypesFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_EXTENDED_TYPES_FEATURES_KHR, ePhysicalDeviceSeparateDepthStencilLayoutsFeatures = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SEPARATE_DEPTH_STENCIL_LAYOUTS_FEATURES, ePhysicalDeviceSeparateDepthStencilLayoutsFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SEPARATE_DEPTH_STENCIL_LAYOUTS_FEATURES_KHR, eAttachmentReferenceStencilLayout = VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_STENCIL_LAYOUT, eAttachmentReferenceStencilLayoutKHR = VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_STENCIL_LAYOUT_KHR, eAttachmentDescriptionStencilLayout = VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_STENCIL_LAYOUT, eAttachmentDescriptionStencilLayoutKHR = VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_STENCIL_LAYOUT_KHR, ePhysicalDeviceHostQueryResetFeatures = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES, ePhysicalDeviceHostQueryResetFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES_EXT, ePhysicalDeviceTimelineSemaphoreFeatures = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_FEATURES, ePhysicalDeviceTimelineSemaphoreFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_FEATURES_KHR, ePhysicalDeviceTimelineSemaphoreProperties = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_PROPERTIES, ePhysicalDeviceTimelineSemaphorePropertiesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_PROPERTIES_KHR, eSemaphoreTypeCreateInfo = VK_STRUCTURE_TYPE_SEMAPHORE_TYPE_CREATE_INFO, eSemaphoreTypeCreateInfoKHR = VK_STRUCTURE_TYPE_SEMAPHORE_TYPE_CREATE_INFO_KHR, eTimelineSemaphoreSubmitInfo = VK_STRUCTURE_TYPE_TIMELINE_SEMAPHORE_SUBMIT_INFO, eTimelineSemaphoreSubmitInfoKHR = VK_STRUCTURE_TYPE_TIMELINE_SEMAPHORE_SUBMIT_INFO_KHR, eSemaphoreWaitInfo = VK_STRUCTURE_TYPE_SEMAPHORE_WAIT_INFO, eSemaphoreWaitInfoKHR = VK_STRUCTURE_TYPE_SEMAPHORE_WAIT_INFO_KHR, eSemaphoreSignalInfo = VK_STRUCTURE_TYPE_SEMAPHORE_SIGNAL_INFO, eSemaphoreSignalInfoKHR = VK_STRUCTURE_TYPE_SEMAPHORE_SIGNAL_INFO_KHR, ePhysicalDeviceBufferDeviceAddressFeatures = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES, ePhysicalDeviceBufferDeviceAddressFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_KHR, eBufferDeviceAddressInfo = VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO, eBufferDeviceAddressInfoEXT = VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO_EXT, eBufferDeviceAddressInfoKHR = VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO_KHR, eBufferOpaqueCaptureAddressCreateInfo = VK_STRUCTURE_TYPE_BUFFER_OPAQUE_CAPTURE_ADDRESS_CREATE_INFO, eBufferOpaqueCaptureAddressCreateInfoKHR = VK_STRUCTURE_TYPE_BUFFER_OPAQUE_CAPTURE_ADDRESS_CREATE_INFO_KHR, eMemoryOpaqueCaptureAddressAllocateInfo = VK_STRUCTURE_TYPE_MEMORY_OPAQUE_CAPTURE_ADDRESS_ALLOCATE_INFO, eMemoryOpaqueCaptureAddressAllocateInfoKHR = VK_STRUCTURE_TYPE_MEMORY_OPAQUE_CAPTURE_ADDRESS_ALLOCATE_INFO_KHR, eDeviceMemoryOpaqueCaptureAddressInfo = VK_STRUCTURE_TYPE_DEVICE_MEMORY_OPAQUE_CAPTURE_ADDRESS_INFO, eDeviceMemoryOpaqueCaptureAddressInfoKHR = VK_STRUCTURE_TYPE_DEVICE_MEMORY_OPAQUE_CAPTURE_ADDRESS_INFO_KHR, ePhysicalDeviceVulkan13Features = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_3_FEATURES, ePhysicalDeviceVulkan13Properties = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_3_PROPERTIES, ePipelineCreationFeedbackCreateInfo = VK_STRUCTURE_TYPE_PIPELINE_CREATION_FEEDBACK_CREATE_INFO, ePipelineCreationFeedbackCreateInfoEXT = VK_STRUCTURE_TYPE_PIPELINE_CREATION_FEEDBACK_CREATE_INFO_EXT, ePhysicalDeviceShaderTerminateInvocationFeatures = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_TERMINATE_INVOCATION_FEATURES, ePhysicalDeviceShaderTerminateInvocationFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_TERMINATE_INVOCATION_FEATURES_KHR, ePhysicalDeviceToolProperties = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TOOL_PROPERTIES, ePhysicalDeviceToolPropertiesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TOOL_PROPERTIES_EXT, ePhysicalDeviceShaderDemoteToHelperInvocationFeatures = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DEMOTE_TO_HELPER_INVOCATION_FEATURES, ePhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DEMOTE_TO_HELPER_INVOCATION_FEATURES_EXT, ePhysicalDevicePrivateDataFeatures = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIVATE_DATA_FEATURES, ePhysicalDevicePrivateDataFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIVATE_DATA_FEATURES_EXT, eDevicePrivateDataCreateInfo = VK_STRUCTURE_TYPE_DEVICE_PRIVATE_DATA_CREATE_INFO, eDevicePrivateDataCreateInfoEXT = VK_STRUCTURE_TYPE_DEVICE_PRIVATE_DATA_CREATE_INFO_EXT, ePrivateDataSlotCreateInfo = VK_STRUCTURE_TYPE_PRIVATE_DATA_SLOT_CREATE_INFO, ePrivateDataSlotCreateInfoEXT = VK_STRUCTURE_TYPE_PRIVATE_DATA_SLOT_CREATE_INFO_EXT, ePhysicalDevicePipelineCreationCacheControlFeatures = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_CREATION_CACHE_CONTROL_FEATURES, ePhysicalDevicePipelineCreationCacheControlFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_CREATION_CACHE_CONTROL_FEATURES_EXT, eMemoryBarrier2 = VK_STRUCTURE_TYPE_MEMORY_BARRIER_2, eMemoryBarrier2KHR = VK_STRUCTURE_TYPE_MEMORY_BARRIER_2_KHR, eBufferMemoryBarrier2 = VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER_2, eBufferMemoryBarrier2KHR = VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER_2_KHR, eImageMemoryBarrier2 = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER_2, eImageMemoryBarrier2KHR = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER_2_KHR, eDependencyInfo = VK_STRUCTURE_TYPE_DEPENDENCY_INFO, eDependencyInfoKHR = VK_STRUCTURE_TYPE_DEPENDENCY_INFO_KHR, eSubmitInfo2 = VK_STRUCTURE_TYPE_SUBMIT_INFO_2, eSubmitInfo2KHR = VK_STRUCTURE_TYPE_SUBMIT_INFO_2_KHR, eSemaphoreSubmitInfo = VK_STRUCTURE_TYPE_SEMAPHORE_SUBMIT_INFO, eSemaphoreSubmitInfoKHR = VK_STRUCTURE_TYPE_SEMAPHORE_SUBMIT_INFO_KHR, eCommandBufferSubmitInfo = VK_STRUCTURE_TYPE_COMMAND_BUFFER_SUBMIT_INFO, eCommandBufferSubmitInfoKHR = VK_STRUCTURE_TYPE_COMMAND_BUFFER_SUBMIT_INFO_KHR, ePhysicalDeviceSynchronization2Features = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SYNCHRONIZATION_2_FEATURES, ePhysicalDeviceSynchronization2FeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SYNCHRONIZATION_2_FEATURES_KHR, ePhysicalDeviceZeroInitializeWorkgroupMemoryFeatures = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ZERO_INITIALIZE_WORKGROUP_MEMORY_FEATURES, ePhysicalDeviceZeroInitializeWorkgroupMemoryFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ZERO_INITIALIZE_WORKGROUP_MEMORY_FEATURES_KHR, ePhysicalDeviceImageRobustnessFeatures = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_ROBUSTNESS_FEATURES, ePhysicalDeviceImageRobustnessFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_ROBUSTNESS_FEATURES_EXT, eCopyBufferInfo2 = VK_STRUCTURE_TYPE_COPY_BUFFER_INFO_2, eCopyBufferInfo2KHR = VK_STRUCTURE_TYPE_COPY_BUFFER_INFO_2_KHR, eCopyImageInfo2 = VK_STRUCTURE_TYPE_COPY_IMAGE_INFO_2, eCopyImageInfo2KHR = VK_STRUCTURE_TYPE_COPY_IMAGE_INFO_2_KHR, eCopyBufferToImageInfo2 = VK_STRUCTURE_TYPE_COPY_BUFFER_TO_IMAGE_INFO_2, eCopyBufferToImageInfo2KHR = VK_STRUCTURE_TYPE_COPY_BUFFER_TO_IMAGE_INFO_2_KHR, eCopyImageToBufferInfo2 = VK_STRUCTURE_TYPE_COPY_IMAGE_TO_BUFFER_INFO_2, eCopyImageToBufferInfo2KHR = VK_STRUCTURE_TYPE_COPY_IMAGE_TO_BUFFER_INFO_2_KHR, eBlitImageInfo2 = VK_STRUCTURE_TYPE_BLIT_IMAGE_INFO_2, eBlitImageInfo2KHR = VK_STRUCTURE_TYPE_BLIT_IMAGE_INFO_2_KHR, eResolveImageInfo2 = VK_STRUCTURE_TYPE_RESOLVE_IMAGE_INFO_2, eResolveImageInfo2KHR = VK_STRUCTURE_TYPE_RESOLVE_IMAGE_INFO_2_KHR, eBufferCopy2 = VK_STRUCTURE_TYPE_BUFFER_COPY_2, eBufferCopy2KHR = VK_STRUCTURE_TYPE_BUFFER_COPY_2_KHR, eImageCopy2 = VK_STRUCTURE_TYPE_IMAGE_COPY_2, eImageCopy2KHR = VK_STRUCTURE_TYPE_IMAGE_COPY_2_KHR, eImageBlit2 = VK_STRUCTURE_TYPE_IMAGE_BLIT_2, eImageBlit2KHR = VK_STRUCTURE_TYPE_IMAGE_BLIT_2_KHR, eBufferImageCopy2 = VK_STRUCTURE_TYPE_BUFFER_IMAGE_COPY_2, eBufferImageCopy2KHR = VK_STRUCTURE_TYPE_BUFFER_IMAGE_COPY_2_KHR, eImageResolve2 = VK_STRUCTURE_TYPE_IMAGE_RESOLVE_2, eImageResolve2KHR = VK_STRUCTURE_TYPE_IMAGE_RESOLVE_2_KHR, ePhysicalDeviceSubgroupSizeControlProperties = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_PROPERTIES, ePhysicalDeviceSubgroupSizeControlPropertiesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_PROPERTIES_EXT, ePipelineShaderStageRequiredSubgroupSizeCreateInfo = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_REQUIRED_SUBGROUP_SIZE_CREATE_INFO, ePipelineShaderStageRequiredSubgroupSizeCreateInfoEXT = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_REQUIRED_SUBGROUP_SIZE_CREATE_INFO_EXT, eShaderRequiredSubgroupSizeCreateInfoEXT = VK_STRUCTURE_TYPE_SHADER_REQUIRED_SUBGROUP_SIZE_CREATE_INFO_EXT, ePhysicalDeviceSubgroupSizeControlFeatures = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_FEATURES, ePhysicalDeviceSubgroupSizeControlFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_FEATURES_EXT, ePhysicalDeviceInlineUniformBlockFeatures = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_FEATURES, ePhysicalDeviceInlineUniformBlockFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_FEATURES_EXT, ePhysicalDeviceInlineUniformBlockProperties = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_PROPERTIES, ePhysicalDeviceInlineUniformBlockPropertiesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_PROPERTIES_EXT, eWriteDescriptorSetInlineUniformBlock = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_INLINE_UNIFORM_BLOCK, eWriteDescriptorSetInlineUniformBlockEXT = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_INLINE_UNIFORM_BLOCK_EXT, eDescriptorPoolInlineUniformBlockCreateInfo = VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_INLINE_UNIFORM_BLOCK_CREATE_INFO, eDescriptorPoolInlineUniformBlockCreateInfoEXT = VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_INLINE_UNIFORM_BLOCK_CREATE_INFO_EXT, ePhysicalDeviceTextureCompressionAstcHdrFeatures = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXTURE_COMPRESSION_ASTC_HDR_FEATURES, ePhysicalDeviceTextureCompressionAstcHdrFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXTURE_COMPRESSION_ASTC_HDR_FEATURES_EXT, eRenderingInfo = VK_STRUCTURE_TYPE_RENDERING_INFO, eRenderingInfoKHR = VK_STRUCTURE_TYPE_RENDERING_INFO_KHR, eRenderingAttachmentInfo = VK_STRUCTURE_TYPE_RENDERING_ATTACHMENT_INFO, eRenderingAttachmentInfoKHR = VK_STRUCTURE_TYPE_RENDERING_ATTACHMENT_INFO_KHR, ePipelineRenderingCreateInfo = VK_STRUCTURE_TYPE_PIPELINE_RENDERING_CREATE_INFO, ePipelineRenderingCreateInfoKHR = VK_STRUCTURE_TYPE_PIPELINE_RENDERING_CREATE_INFO_KHR, ePhysicalDeviceDynamicRenderingFeatures = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_FEATURES, ePhysicalDeviceDynamicRenderingFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_FEATURES_KHR, eCommandBufferInheritanceRenderingInfo = VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_RENDERING_INFO, eCommandBufferInheritanceRenderingInfoKHR = VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_RENDERING_INFO_KHR, ePhysicalDeviceShaderIntegerDotProductFeatures = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_FEATURES, ePhysicalDeviceShaderIntegerDotProductFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_FEATURES_KHR, ePhysicalDeviceShaderIntegerDotProductProperties = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_PROPERTIES, ePhysicalDeviceShaderIntegerDotProductPropertiesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_PROPERTIES_KHR, ePhysicalDeviceTexelBufferAlignmentProperties = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_PROPERTIES, ePhysicalDeviceTexelBufferAlignmentPropertiesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_PROPERTIES_EXT, eFormatProperties3 = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_3, eFormatProperties3KHR = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_3_KHR, ePhysicalDeviceMaintenance4Features = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_4_FEATURES, ePhysicalDeviceMaintenance4FeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_4_FEATURES_KHR, ePhysicalDeviceMaintenance4Properties = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_4_PROPERTIES, ePhysicalDeviceMaintenance4PropertiesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_4_PROPERTIES_KHR, eDeviceBufferMemoryRequirements = VK_STRUCTURE_TYPE_DEVICE_BUFFER_MEMORY_REQUIREMENTS, eDeviceBufferMemoryRequirementsKHR = VK_STRUCTURE_TYPE_DEVICE_BUFFER_MEMORY_REQUIREMENTS_KHR, eDeviceImageMemoryRequirements = VK_STRUCTURE_TYPE_DEVICE_IMAGE_MEMORY_REQUIREMENTS, eDeviceImageMemoryRequirementsKHR = VK_STRUCTURE_TYPE_DEVICE_IMAGE_MEMORY_REQUIREMENTS_KHR, ePhysicalDeviceVulkan14Features = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_4_FEATURES, ePhysicalDeviceVulkan14Properties = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_4_PROPERTIES, eDeviceQueueGlobalPriorityCreateInfo = VK_STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO, eDeviceQueueGlobalPriorityCreateInfoEXT = VK_STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_EXT, eDeviceQueueGlobalPriorityCreateInfoKHR = VK_STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_KHR, ePhysicalDeviceGlobalPriorityQueryFeatures = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GLOBAL_PRIORITY_QUERY_FEATURES, ePhysicalDeviceGlobalPriorityQueryFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GLOBAL_PRIORITY_QUERY_FEATURES_KHR, ePhysicalDeviceGlobalPriorityQueryFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GLOBAL_PRIORITY_QUERY_FEATURES_EXT, eQueueFamilyGlobalPriorityProperties = VK_STRUCTURE_TYPE_QUEUE_FAMILY_GLOBAL_PRIORITY_PROPERTIES, eQueueFamilyGlobalPriorityPropertiesKHR = VK_STRUCTURE_TYPE_QUEUE_FAMILY_GLOBAL_PRIORITY_PROPERTIES_KHR, eQueueFamilyGlobalPriorityPropertiesEXT = VK_STRUCTURE_TYPE_QUEUE_FAMILY_GLOBAL_PRIORITY_PROPERTIES_EXT, ePhysicalDeviceShaderSubgroupRotateFeatures = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_ROTATE_FEATURES, ePhysicalDeviceShaderSubgroupRotateFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_ROTATE_FEATURES_KHR, ePhysicalDeviceShaderFloatControls2Features = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT_CONTROLS_2_FEATURES, ePhysicalDeviceShaderFloatControls2FeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT_CONTROLS_2_FEATURES_KHR, ePhysicalDeviceShaderExpectAssumeFeatures = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_EXPECT_ASSUME_FEATURES, ePhysicalDeviceShaderExpectAssumeFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_EXPECT_ASSUME_FEATURES_KHR, ePhysicalDeviceLineRasterizationFeatures = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES, ePhysicalDeviceLineRasterizationFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES_EXT, ePhysicalDeviceLineRasterizationFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES_KHR, ePipelineRasterizationLineStateCreateInfo = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_LINE_STATE_CREATE_INFO, ePipelineRasterizationLineStateCreateInfoEXT = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_LINE_STATE_CREATE_INFO_EXT, ePipelineRasterizationLineStateCreateInfoKHR = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_LINE_STATE_CREATE_INFO_KHR, ePhysicalDeviceLineRasterizationProperties = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_PROPERTIES, ePhysicalDeviceLineRasterizationPropertiesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_PROPERTIES_EXT, ePhysicalDeviceLineRasterizationPropertiesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_PROPERTIES_KHR, ePhysicalDeviceVertexAttributeDivisorProperties = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES, ePhysicalDeviceVertexAttributeDivisorPropertiesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES_KHR, ePipelineVertexInputDivisorStateCreateInfo = VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO, ePipelineVertexInputDivisorStateCreateInfoEXT = VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO_EXT, ePipelineVertexInputDivisorStateCreateInfoKHR = VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO_KHR, ePhysicalDeviceVertexAttributeDivisorFeatures = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES, ePhysicalDeviceVertexAttributeDivisorFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES_EXT, ePhysicalDeviceVertexAttributeDivisorFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES_KHR, ePhysicalDeviceIndexTypeUint8Features = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INDEX_TYPE_UINT8_FEATURES, ePhysicalDeviceIndexTypeUint8FeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INDEX_TYPE_UINT8_FEATURES_EXT, ePhysicalDeviceIndexTypeUint8FeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INDEX_TYPE_UINT8_FEATURES_KHR, eMemoryMapInfo = VK_STRUCTURE_TYPE_MEMORY_MAP_INFO, eMemoryMapInfoKHR = VK_STRUCTURE_TYPE_MEMORY_MAP_INFO_KHR, eMemoryUnmapInfo = VK_STRUCTURE_TYPE_MEMORY_UNMAP_INFO, eMemoryUnmapInfoKHR = VK_STRUCTURE_TYPE_MEMORY_UNMAP_INFO_KHR, ePhysicalDeviceMaintenance5Features = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_5_FEATURES, ePhysicalDeviceMaintenance5FeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_5_FEATURES_KHR, ePhysicalDeviceMaintenance5Properties = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_5_PROPERTIES, ePhysicalDeviceMaintenance5PropertiesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_5_PROPERTIES_KHR, eRenderingAreaInfo = VK_STRUCTURE_TYPE_RENDERING_AREA_INFO, eRenderingAreaInfoKHR = VK_STRUCTURE_TYPE_RENDERING_AREA_INFO_KHR, eDeviceImageSubresourceInfo = VK_STRUCTURE_TYPE_DEVICE_IMAGE_SUBRESOURCE_INFO, eDeviceImageSubresourceInfoKHR = VK_STRUCTURE_TYPE_DEVICE_IMAGE_SUBRESOURCE_INFO_KHR, eSubresourceLayout2 = VK_STRUCTURE_TYPE_SUBRESOURCE_LAYOUT_2, eSubresourceLayout2EXT = VK_STRUCTURE_TYPE_SUBRESOURCE_LAYOUT_2_EXT, eSubresourceLayout2KHR = VK_STRUCTURE_TYPE_SUBRESOURCE_LAYOUT_2_KHR, eImageSubresource2 = VK_STRUCTURE_TYPE_IMAGE_SUBRESOURCE_2, eImageSubresource2EXT = VK_STRUCTURE_TYPE_IMAGE_SUBRESOURCE_2_EXT, eImageSubresource2KHR = VK_STRUCTURE_TYPE_IMAGE_SUBRESOURCE_2_KHR, ePipelineCreateFlags2CreateInfo = VK_STRUCTURE_TYPE_PIPELINE_CREATE_FLAGS_2_CREATE_INFO, ePipelineCreateFlags2CreateInfoKHR = VK_STRUCTURE_TYPE_PIPELINE_CREATE_FLAGS_2_CREATE_INFO_KHR, eBufferUsageFlags2CreateInfo = VK_STRUCTURE_TYPE_BUFFER_USAGE_FLAGS_2_CREATE_INFO, eBufferUsageFlags2CreateInfoKHR = VK_STRUCTURE_TYPE_BUFFER_USAGE_FLAGS_2_CREATE_INFO_KHR, ePhysicalDevicePushDescriptorProperties = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES, ePhysicalDevicePushDescriptorPropertiesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES_KHR, ePhysicalDeviceDynamicRenderingLocalReadFeatures = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_LOCAL_READ_FEATURES, ePhysicalDeviceDynamicRenderingLocalReadFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_LOCAL_READ_FEATURES_KHR, eRenderingAttachmentLocationInfo = VK_STRUCTURE_TYPE_RENDERING_ATTACHMENT_LOCATION_INFO, eRenderingAttachmentLocationInfoKHR = VK_STRUCTURE_TYPE_RENDERING_ATTACHMENT_LOCATION_INFO_KHR, eRenderingInputAttachmentIndexInfo = VK_STRUCTURE_TYPE_RENDERING_INPUT_ATTACHMENT_INDEX_INFO, eRenderingInputAttachmentIndexInfoKHR = VK_STRUCTURE_TYPE_RENDERING_INPUT_ATTACHMENT_INDEX_INFO_KHR, ePhysicalDeviceMaintenance6Features = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_6_FEATURES, ePhysicalDeviceMaintenance6FeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_6_FEATURES_KHR, ePhysicalDeviceMaintenance6Properties = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_6_PROPERTIES, ePhysicalDeviceMaintenance6PropertiesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_6_PROPERTIES_KHR, eBindMemoryStatus = VK_STRUCTURE_TYPE_BIND_MEMORY_STATUS, eBindMemoryStatusKHR = VK_STRUCTURE_TYPE_BIND_MEMORY_STATUS_KHR, eBindDescriptorSetsInfo = VK_STRUCTURE_TYPE_BIND_DESCRIPTOR_SETS_INFO, eBindDescriptorSetsInfoKHR = VK_STRUCTURE_TYPE_BIND_DESCRIPTOR_SETS_INFO_KHR, ePushConstantsInfo = VK_STRUCTURE_TYPE_PUSH_CONSTANTS_INFO, ePushConstantsInfoKHR = VK_STRUCTURE_TYPE_PUSH_CONSTANTS_INFO_KHR, ePushDescriptorSetInfo = VK_STRUCTURE_TYPE_PUSH_DESCRIPTOR_SET_INFO, ePushDescriptorSetInfoKHR = VK_STRUCTURE_TYPE_PUSH_DESCRIPTOR_SET_INFO_KHR, ePushDescriptorSetWithTemplateInfo = VK_STRUCTURE_TYPE_PUSH_DESCRIPTOR_SET_WITH_TEMPLATE_INFO, ePushDescriptorSetWithTemplateInfoKHR = VK_STRUCTURE_TYPE_PUSH_DESCRIPTOR_SET_WITH_TEMPLATE_INFO_KHR, ePhysicalDevicePipelineProtectedAccessFeatures = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_PROTECTED_ACCESS_FEATURES, ePhysicalDevicePipelineProtectedAccessFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_PROTECTED_ACCESS_FEATURES_EXT, ePipelineRobustnessCreateInfo = VK_STRUCTURE_TYPE_PIPELINE_ROBUSTNESS_CREATE_INFO, ePipelineRobustnessCreateInfoEXT = VK_STRUCTURE_TYPE_PIPELINE_ROBUSTNESS_CREATE_INFO_EXT, ePhysicalDevicePipelineRobustnessFeatures = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_ROBUSTNESS_FEATURES, ePhysicalDevicePipelineRobustnessFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_ROBUSTNESS_FEATURES_EXT, ePhysicalDevicePipelineRobustnessProperties = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_ROBUSTNESS_PROPERTIES, ePhysicalDevicePipelineRobustnessPropertiesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_ROBUSTNESS_PROPERTIES_EXT, ePhysicalDeviceHostImageCopyFeatures = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_IMAGE_COPY_FEATURES, ePhysicalDeviceHostImageCopyFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_IMAGE_COPY_FEATURES_EXT, ePhysicalDeviceHostImageCopyProperties = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_IMAGE_COPY_PROPERTIES, ePhysicalDeviceHostImageCopyPropertiesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_IMAGE_COPY_PROPERTIES_EXT, eMemoryToImageCopy = VK_STRUCTURE_TYPE_MEMORY_TO_IMAGE_COPY, eMemoryToImageCopyEXT = VK_STRUCTURE_TYPE_MEMORY_TO_IMAGE_COPY_EXT, eImageToMemoryCopy = VK_STRUCTURE_TYPE_IMAGE_TO_MEMORY_COPY, eImageToMemoryCopyEXT = VK_STRUCTURE_TYPE_IMAGE_TO_MEMORY_COPY_EXT, eCopyImageToMemoryInfo = VK_STRUCTURE_TYPE_COPY_IMAGE_TO_MEMORY_INFO, eCopyImageToMemoryInfoEXT = VK_STRUCTURE_TYPE_COPY_IMAGE_TO_MEMORY_INFO_EXT, eCopyMemoryToImageInfo = VK_STRUCTURE_TYPE_COPY_MEMORY_TO_IMAGE_INFO, eCopyMemoryToImageInfoEXT = VK_STRUCTURE_TYPE_COPY_MEMORY_TO_IMAGE_INFO_EXT, eHostImageLayoutTransitionInfo = VK_STRUCTURE_TYPE_HOST_IMAGE_LAYOUT_TRANSITION_INFO, eHostImageLayoutTransitionInfoEXT = VK_STRUCTURE_TYPE_HOST_IMAGE_LAYOUT_TRANSITION_INFO_EXT, eCopyImageToImageInfo = VK_STRUCTURE_TYPE_COPY_IMAGE_TO_IMAGE_INFO, eCopyImageToImageInfoEXT = VK_STRUCTURE_TYPE_COPY_IMAGE_TO_IMAGE_INFO_EXT, eSubresourceHostMemcpySize = VK_STRUCTURE_TYPE_SUBRESOURCE_HOST_MEMCPY_SIZE, eSubresourceHostMemcpySizeEXT = VK_STRUCTURE_TYPE_SUBRESOURCE_HOST_MEMCPY_SIZE_EXT, eHostImageCopyDevicePerformanceQuery = VK_STRUCTURE_TYPE_HOST_IMAGE_COPY_DEVICE_PERFORMANCE_QUERY, eHostImageCopyDevicePerformanceQueryEXT = VK_STRUCTURE_TYPE_HOST_IMAGE_COPY_DEVICE_PERFORMANCE_QUERY_EXT, eSwapchainCreateInfoKHR = VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR, ePresentInfoKHR = VK_STRUCTURE_TYPE_PRESENT_INFO_KHR, eDeviceGroupPresentCapabilitiesKHR = VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_CAPABILITIES_KHR, eImageSwapchainCreateInfoKHR = VK_STRUCTURE_TYPE_IMAGE_SWAPCHAIN_CREATE_INFO_KHR, eBindImageMemorySwapchainInfoKHR = VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHR, eAcquireNextImageInfoKHR = VK_STRUCTURE_TYPE_ACQUIRE_NEXT_IMAGE_INFO_KHR, eDeviceGroupPresentInfoKHR = VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_INFO_KHR, eDeviceGroupSwapchainCreateInfoKHR = VK_STRUCTURE_TYPE_DEVICE_GROUP_SWAPCHAIN_CREATE_INFO_KHR, eDisplayModeCreateInfoKHR = VK_STRUCTURE_TYPE_DISPLAY_MODE_CREATE_INFO_KHR, eDisplaySurfaceCreateInfoKHR = VK_STRUCTURE_TYPE_DISPLAY_SURFACE_CREATE_INFO_KHR, eDisplayPresentInfoKHR = VK_STRUCTURE_TYPE_DISPLAY_PRESENT_INFO_KHR, #if defined( VK_USE_PLATFORM_XLIB_KHR ) eXlibSurfaceCreateInfoKHR = VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR, #endif /*VK_USE_PLATFORM_XLIB_KHR*/ #if defined( VK_USE_PLATFORM_XCB_KHR ) eXcbSurfaceCreateInfoKHR = VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR, #endif /*VK_USE_PLATFORM_XCB_KHR*/ #if defined( VK_USE_PLATFORM_WAYLAND_KHR ) eWaylandSurfaceCreateInfoKHR = VK_STRUCTURE_TYPE_WAYLAND_SURFACE_CREATE_INFO_KHR, #endif /*VK_USE_PLATFORM_WAYLAND_KHR*/ #if defined( VK_USE_PLATFORM_ANDROID_KHR ) eAndroidSurfaceCreateInfoKHR = VK_STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR, #endif /*VK_USE_PLATFORM_ANDROID_KHR*/ #if defined( VK_USE_PLATFORM_WIN32_KHR ) eWin32SurfaceCreateInfoKHR = VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR, #endif /*VK_USE_PLATFORM_WIN32_KHR*/ eDebugReportCallbackCreateInfoEXT = VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT, eDebugReportCreateInfoEXT = VK_STRUCTURE_TYPE_DEBUG_REPORT_CREATE_INFO_EXT, ePipelineRasterizationStateRasterizationOrderAMD = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_RASTERIZATION_ORDER_AMD, eDebugMarkerObjectNameInfoEXT = VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_NAME_INFO_EXT, eDebugMarkerObjectTagInfoEXT = VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_TAG_INFO_EXT, eDebugMarkerMarkerInfoEXT = VK_STRUCTURE_TYPE_DEBUG_MARKER_MARKER_INFO_EXT, eVideoProfileInfoKHR = VK_STRUCTURE_TYPE_VIDEO_PROFILE_INFO_KHR, eVideoCapabilitiesKHR = VK_STRUCTURE_TYPE_VIDEO_CAPABILITIES_KHR, eVideoPictureResourceInfoKHR = VK_STRUCTURE_TYPE_VIDEO_PICTURE_RESOURCE_INFO_KHR, eVideoSessionMemoryRequirementsKHR = VK_STRUCTURE_TYPE_VIDEO_SESSION_MEMORY_REQUIREMENTS_KHR, eBindVideoSessionMemoryInfoKHR = VK_STRUCTURE_TYPE_BIND_VIDEO_SESSION_MEMORY_INFO_KHR, eVideoSessionCreateInfoKHR = VK_STRUCTURE_TYPE_VIDEO_SESSION_CREATE_INFO_KHR, eVideoSessionParametersCreateInfoKHR = VK_STRUCTURE_TYPE_VIDEO_SESSION_PARAMETERS_CREATE_INFO_KHR, eVideoSessionParametersUpdateInfoKHR = VK_STRUCTURE_TYPE_VIDEO_SESSION_PARAMETERS_UPDATE_INFO_KHR, eVideoBeginCodingInfoKHR = VK_STRUCTURE_TYPE_VIDEO_BEGIN_CODING_INFO_KHR, eVideoEndCodingInfoKHR = VK_STRUCTURE_TYPE_VIDEO_END_CODING_INFO_KHR, eVideoCodingControlInfoKHR = VK_STRUCTURE_TYPE_VIDEO_CODING_CONTROL_INFO_KHR, eVideoReferenceSlotInfoKHR = VK_STRUCTURE_TYPE_VIDEO_REFERENCE_SLOT_INFO_KHR, eQueueFamilyVideoPropertiesKHR = VK_STRUCTURE_TYPE_QUEUE_FAMILY_VIDEO_PROPERTIES_KHR, eVideoProfileListInfoKHR = VK_STRUCTURE_TYPE_VIDEO_PROFILE_LIST_INFO_KHR, ePhysicalDeviceVideoFormatInfoKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VIDEO_FORMAT_INFO_KHR, eVideoFormatPropertiesKHR = VK_STRUCTURE_TYPE_VIDEO_FORMAT_PROPERTIES_KHR, eQueueFamilyQueryResultStatusPropertiesKHR = VK_STRUCTURE_TYPE_QUEUE_FAMILY_QUERY_RESULT_STATUS_PROPERTIES_KHR, eVideoDecodeInfoKHR = VK_STRUCTURE_TYPE_VIDEO_DECODE_INFO_KHR, eVideoDecodeCapabilitiesKHR = VK_STRUCTURE_TYPE_VIDEO_DECODE_CAPABILITIES_KHR, eVideoDecodeUsageInfoKHR = VK_STRUCTURE_TYPE_VIDEO_DECODE_USAGE_INFO_KHR, eDedicatedAllocationImageCreateInfoNV = VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_IMAGE_CREATE_INFO_NV, eDedicatedAllocationBufferCreateInfoNV = VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_BUFFER_CREATE_INFO_NV, eDedicatedAllocationMemoryAllocateInfoNV = VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV, ePhysicalDeviceTransformFeedbackFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_FEATURES_EXT, ePhysicalDeviceTransformFeedbackPropertiesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_PROPERTIES_EXT, ePipelineRasterizationStateStreamCreateInfoEXT = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_STREAM_CREATE_INFO_EXT, eCuModuleCreateInfoNVX = VK_STRUCTURE_TYPE_CU_MODULE_CREATE_INFO_NVX, eCuFunctionCreateInfoNVX = VK_STRUCTURE_TYPE_CU_FUNCTION_CREATE_INFO_NVX, eCuLaunchInfoNVX = VK_STRUCTURE_TYPE_CU_LAUNCH_INFO_NVX, eCuModuleTexturingModeCreateInfoNVX = VK_STRUCTURE_TYPE_CU_MODULE_TEXTURING_MODE_CREATE_INFO_NVX, eImageViewHandleInfoNVX = VK_STRUCTURE_TYPE_IMAGE_VIEW_HANDLE_INFO_NVX, eImageViewAddressPropertiesNVX = VK_STRUCTURE_TYPE_IMAGE_VIEW_ADDRESS_PROPERTIES_NVX, eVideoEncodeH264CapabilitiesKHR = VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_CAPABILITIES_KHR, eVideoEncodeH264SessionParametersCreateInfoKHR = VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_SESSION_PARAMETERS_CREATE_INFO_KHR, eVideoEncodeH264SessionParametersAddInfoKHR = VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_SESSION_PARAMETERS_ADD_INFO_KHR, eVideoEncodeH264PictureInfoKHR = VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_PICTURE_INFO_KHR, eVideoEncodeH264DpbSlotInfoKHR = VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_DPB_SLOT_INFO_KHR, eVideoEncodeH264NaluSliceInfoKHR = VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_NALU_SLICE_INFO_KHR, eVideoEncodeH264GopRemainingFrameInfoKHR = VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_GOP_REMAINING_FRAME_INFO_KHR, eVideoEncodeH264ProfileInfoKHR = VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_PROFILE_INFO_KHR, eVideoEncodeH264RateControlInfoKHR = VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_RATE_CONTROL_INFO_KHR, eVideoEncodeH264RateControlLayerInfoKHR = VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_RATE_CONTROL_LAYER_INFO_KHR, eVideoEncodeH264SessionCreateInfoKHR = VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_SESSION_CREATE_INFO_KHR, eVideoEncodeH264QualityLevelPropertiesKHR = VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_QUALITY_LEVEL_PROPERTIES_KHR, eVideoEncodeH264SessionParametersGetInfoKHR = VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_SESSION_PARAMETERS_GET_INFO_KHR, eVideoEncodeH264SessionParametersFeedbackInfoKHR = VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_SESSION_PARAMETERS_FEEDBACK_INFO_KHR, eVideoEncodeH265CapabilitiesKHR = VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_CAPABILITIES_KHR, eVideoEncodeH265SessionParametersCreateInfoKHR = VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_SESSION_PARAMETERS_CREATE_INFO_KHR, eVideoEncodeH265SessionParametersAddInfoKHR = VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_SESSION_PARAMETERS_ADD_INFO_KHR, eVideoEncodeH265PictureInfoKHR = VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_PICTURE_INFO_KHR, eVideoEncodeH265DpbSlotInfoKHR = VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_DPB_SLOT_INFO_KHR, eVideoEncodeH265NaluSliceSegmentInfoKHR = VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_NALU_SLICE_SEGMENT_INFO_KHR, eVideoEncodeH265GopRemainingFrameInfoKHR = VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_GOP_REMAINING_FRAME_INFO_KHR, eVideoEncodeH265ProfileInfoKHR = VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_PROFILE_INFO_KHR, eVideoEncodeH265RateControlInfoKHR = VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_RATE_CONTROL_INFO_KHR, eVideoEncodeH265RateControlLayerInfoKHR = VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_RATE_CONTROL_LAYER_INFO_KHR, eVideoEncodeH265SessionCreateInfoKHR = VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_SESSION_CREATE_INFO_KHR, eVideoEncodeH265QualityLevelPropertiesKHR = VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_QUALITY_LEVEL_PROPERTIES_KHR, eVideoEncodeH265SessionParametersGetInfoKHR = VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_SESSION_PARAMETERS_GET_INFO_KHR, eVideoEncodeH265SessionParametersFeedbackInfoKHR = VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_SESSION_PARAMETERS_FEEDBACK_INFO_KHR, eVideoDecodeH264CapabilitiesKHR = VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_CAPABILITIES_KHR, eVideoDecodeH264PictureInfoKHR = VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_PICTURE_INFO_KHR, eVideoDecodeH264ProfileInfoKHR = VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_PROFILE_INFO_KHR, eVideoDecodeH264SessionParametersCreateInfoKHR = VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_SESSION_PARAMETERS_CREATE_INFO_KHR, eVideoDecodeH264SessionParametersAddInfoKHR = VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_SESSION_PARAMETERS_ADD_INFO_KHR, eVideoDecodeH264DpbSlotInfoKHR = VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_DPB_SLOT_INFO_KHR, eTextureLodGatherFormatPropertiesAMD = VK_STRUCTURE_TYPE_TEXTURE_LOD_GATHER_FORMAT_PROPERTIES_AMD, #if defined( VK_USE_PLATFORM_GGP ) eStreamDescriptorSurfaceCreateInfoGGP = VK_STRUCTURE_TYPE_STREAM_DESCRIPTOR_SURFACE_CREATE_INFO_GGP, #endif /*VK_USE_PLATFORM_GGP*/ ePhysicalDeviceCornerSampledImageFeaturesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CORNER_SAMPLED_IMAGE_FEATURES_NV, eExternalMemoryImageCreateInfoNV = VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_NV, eExportMemoryAllocateInfoNV = VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_NV, #if defined( VK_USE_PLATFORM_WIN32_KHR ) eImportMemoryWin32HandleInfoNV = VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_NV, eExportMemoryWin32HandleInfoNV = VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_NV, eWin32KeyedMutexAcquireReleaseInfoNV = VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_NV, #endif /*VK_USE_PLATFORM_WIN32_KHR*/ eValidationFlagsEXT = VK_STRUCTURE_TYPE_VALIDATION_FLAGS_EXT, #if defined( VK_USE_PLATFORM_VI_NN ) eViSurfaceCreateInfoNN = VK_STRUCTURE_TYPE_VI_SURFACE_CREATE_INFO_NN, #endif /*VK_USE_PLATFORM_VI_NN*/ eImageViewAstcDecodeModeEXT = VK_STRUCTURE_TYPE_IMAGE_VIEW_ASTC_DECODE_MODE_EXT, ePhysicalDeviceAstcDecodeFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ASTC_DECODE_FEATURES_EXT, #if defined( VK_USE_PLATFORM_WIN32_KHR ) eImportMemoryWin32HandleInfoKHR = VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_KHR, eExportMemoryWin32HandleInfoKHR = VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_KHR, eMemoryWin32HandlePropertiesKHR = VK_STRUCTURE_TYPE_MEMORY_WIN32_HANDLE_PROPERTIES_KHR, eMemoryGetWin32HandleInfoKHR = VK_STRUCTURE_TYPE_MEMORY_GET_WIN32_HANDLE_INFO_KHR, #endif /*VK_USE_PLATFORM_WIN32_KHR*/ eImportMemoryFdInfoKHR = VK_STRUCTURE_TYPE_IMPORT_MEMORY_FD_INFO_KHR, eMemoryFdPropertiesKHR = VK_STRUCTURE_TYPE_MEMORY_FD_PROPERTIES_KHR, eMemoryGetFdInfoKHR = VK_STRUCTURE_TYPE_MEMORY_GET_FD_INFO_KHR, #if defined( VK_USE_PLATFORM_WIN32_KHR ) eWin32KeyedMutexAcquireReleaseInfoKHR = VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_KHR, eImportSemaphoreWin32HandleInfoKHR = VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR, eExportSemaphoreWin32HandleInfoKHR = VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR, eD3D12FenceSubmitInfoKHR = VK_STRUCTURE_TYPE_D3D12_FENCE_SUBMIT_INFO_KHR, eSemaphoreGetWin32HandleInfoKHR = VK_STRUCTURE_TYPE_SEMAPHORE_GET_WIN32_HANDLE_INFO_KHR, #endif /*VK_USE_PLATFORM_WIN32_KHR*/ eImportSemaphoreFdInfoKHR = VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_FD_INFO_KHR, eSemaphoreGetFdInfoKHR = VK_STRUCTURE_TYPE_SEMAPHORE_GET_FD_INFO_KHR, eCommandBufferInheritanceConditionalRenderingInfoEXT = VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_CONDITIONAL_RENDERING_INFO_EXT, ePhysicalDeviceConditionalRenderingFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONDITIONAL_RENDERING_FEATURES_EXT, eConditionalRenderingBeginInfoEXT = VK_STRUCTURE_TYPE_CONDITIONAL_RENDERING_BEGIN_INFO_EXT, ePresentRegionsKHR = VK_STRUCTURE_TYPE_PRESENT_REGIONS_KHR, ePipelineViewportWScalingStateCreateInfoNV = VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_W_SCALING_STATE_CREATE_INFO_NV, eSurfaceCapabilities2EXT = VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_EXT, eDisplayPowerInfoEXT = VK_STRUCTURE_TYPE_DISPLAY_POWER_INFO_EXT, eDeviceEventInfoEXT = VK_STRUCTURE_TYPE_DEVICE_EVENT_INFO_EXT, eDisplayEventInfoEXT = VK_STRUCTURE_TYPE_DISPLAY_EVENT_INFO_EXT, eSwapchainCounterCreateInfoEXT = VK_STRUCTURE_TYPE_SWAPCHAIN_COUNTER_CREATE_INFO_EXT, ePresentTimesInfoGOOGLE = VK_STRUCTURE_TYPE_PRESENT_TIMES_INFO_GOOGLE, ePhysicalDeviceMultiviewPerViewAttributesPropertiesNVX = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_ATTRIBUTES_PROPERTIES_NVX, eMultiviewPerViewAttributesInfoNVX = VK_STRUCTURE_TYPE_MULTIVIEW_PER_VIEW_ATTRIBUTES_INFO_NVX, ePipelineViewportSwizzleStateCreateInfoNV = VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_SWIZZLE_STATE_CREATE_INFO_NV, ePhysicalDeviceDiscardRectanglePropertiesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DISCARD_RECTANGLE_PROPERTIES_EXT, ePipelineDiscardRectangleStateCreateInfoEXT = VK_STRUCTURE_TYPE_PIPELINE_DISCARD_RECTANGLE_STATE_CREATE_INFO_EXT, ePhysicalDeviceConservativeRasterizationPropertiesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONSERVATIVE_RASTERIZATION_PROPERTIES_EXT, ePipelineRasterizationConservativeStateCreateInfoEXT = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_CONSERVATIVE_STATE_CREATE_INFO_EXT, ePhysicalDeviceDepthClipEnableFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLIP_ENABLE_FEATURES_EXT, ePipelineRasterizationDepthClipStateCreateInfoEXT = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_DEPTH_CLIP_STATE_CREATE_INFO_EXT, eHdrMetadataEXT = VK_STRUCTURE_TYPE_HDR_METADATA_EXT, ePhysicalDeviceRelaxedLineRasterizationFeaturesIMG = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RELAXED_LINE_RASTERIZATION_FEATURES_IMG, eSharedPresentSurfaceCapabilitiesKHR = VK_STRUCTURE_TYPE_SHARED_PRESENT_SURFACE_CAPABILITIES_KHR, #if defined( VK_USE_PLATFORM_WIN32_KHR ) eImportFenceWin32HandleInfoKHR = VK_STRUCTURE_TYPE_IMPORT_FENCE_WIN32_HANDLE_INFO_KHR, eExportFenceWin32HandleInfoKHR = VK_STRUCTURE_TYPE_EXPORT_FENCE_WIN32_HANDLE_INFO_KHR, eFenceGetWin32HandleInfoKHR = VK_STRUCTURE_TYPE_FENCE_GET_WIN32_HANDLE_INFO_KHR, #endif /*VK_USE_PLATFORM_WIN32_KHR*/ eImportFenceFdInfoKHR = VK_STRUCTURE_TYPE_IMPORT_FENCE_FD_INFO_KHR, eFenceGetFdInfoKHR = VK_STRUCTURE_TYPE_FENCE_GET_FD_INFO_KHR, ePhysicalDevicePerformanceQueryFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PERFORMANCE_QUERY_FEATURES_KHR, ePhysicalDevicePerformanceQueryPropertiesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PERFORMANCE_QUERY_PROPERTIES_KHR, eQueryPoolPerformanceCreateInfoKHR = VK_STRUCTURE_TYPE_QUERY_POOL_PERFORMANCE_CREATE_INFO_KHR, ePerformanceQuerySubmitInfoKHR = VK_STRUCTURE_TYPE_PERFORMANCE_QUERY_SUBMIT_INFO_KHR, eAcquireProfilingLockInfoKHR = VK_STRUCTURE_TYPE_ACQUIRE_PROFILING_LOCK_INFO_KHR, ePerformanceCounterKHR = VK_STRUCTURE_TYPE_PERFORMANCE_COUNTER_KHR, ePerformanceCounterDescriptionKHR = VK_STRUCTURE_TYPE_PERFORMANCE_COUNTER_DESCRIPTION_KHR, ePhysicalDeviceSurfaceInfo2KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SURFACE_INFO_2_KHR, eSurfaceCapabilities2KHR = VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_KHR, eSurfaceFormat2KHR = VK_STRUCTURE_TYPE_SURFACE_FORMAT_2_KHR, eDisplayProperties2KHR = VK_STRUCTURE_TYPE_DISPLAY_PROPERTIES_2_KHR, eDisplayPlaneProperties2KHR = VK_STRUCTURE_TYPE_DISPLAY_PLANE_PROPERTIES_2_KHR, eDisplayModeProperties2KHR = VK_STRUCTURE_TYPE_DISPLAY_MODE_PROPERTIES_2_KHR, eDisplayPlaneInfo2KHR = VK_STRUCTURE_TYPE_DISPLAY_PLANE_INFO_2_KHR, eDisplayPlaneCapabilities2KHR = VK_STRUCTURE_TYPE_DISPLAY_PLANE_CAPABILITIES_2_KHR, #if defined( VK_USE_PLATFORM_IOS_MVK ) eIosSurfaceCreateInfoMVK = VK_STRUCTURE_TYPE_IOS_SURFACE_CREATE_INFO_MVK, #endif /*VK_USE_PLATFORM_IOS_MVK*/ #if defined( VK_USE_PLATFORM_MACOS_MVK ) eMacosSurfaceCreateInfoMVK = VK_STRUCTURE_TYPE_MACOS_SURFACE_CREATE_INFO_MVK, #endif /*VK_USE_PLATFORM_MACOS_MVK*/ eDebugUtilsObjectNameInfoEXT = VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT, eDebugUtilsObjectTagInfoEXT = VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_TAG_INFO_EXT, eDebugUtilsLabelEXT = VK_STRUCTURE_TYPE_DEBUG_UTILS_LABEL_EXT, eDebugUtilsMessengerCallbackDataEXT = VK_STRUCTURE_TYPE_DEBUG_UTILS_MESSENGER_CALLBACK_DATA_EXT, eDebugUtilsMessengerCreateInfoEXT = VK_STRUCTURE_TYPE_DEBUG_UTILS_MESSENGER_CREATE_INFO_EXT, #if defined( VK_USE_PLATFORM_ANDROID_KHR ) eAndroidHardwareBufferUsageANDROID = VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_USAGE_ANDROID, eAndroidHardwareBufferPropertiesANDROID = VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_PROPERTIES_ANDROID, eAndroidHardwareBufferFormatPropertiesANDROID = VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_FORMAT_PROPERTIES_ANDROID, eImportAndroidHardwareBufferInfoANDROID = VK_STRUCTURE_TYPE_IMPORT_ANDROID_HARDWARE_BUFFER_INFO_ANDROID, eMemoryGetAndroidHardwareBufferInfoANDROID = VK_STRUCTURE_TYPE_MEMORY_GET_ANDROID_HARDWARE_BUFFER_INFO_ANDROID, eExternalFormatANDROID = VK_STRUCTURE_TYPE_EXTERNAL_FORMAT_ANDROID, eAndroidHardwareBufferFormatProperties2ANDROID = VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_FORMAT_PROPERTIES_2_ANDROID, #endif /*VK_USE_PLATFORM_ANDROID_KHR*/ #if defined( VK_ENABLE_BETA_EXTENSIONS ) ePhysicalDeviceShaderEnqueueFeaturesAMDX = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ENQUEUE_FEATURES_AMDX, ePhysicalDeviceShaderEnqueuePropertiesAMDX = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ENQUEUE_PROPERTIES_AMDX, eExecutionGraphPipelineScratchSizeAMDX = VK_STRUCTURE_TYPE_EXECUTION_GRAPH_PIPELINE_SCRATCH_SIZE_AMDX, eExecutionGraphPipelineCreateInfoAMDX = VK_STRUCTURE_TYPE_EXECUTION_GRAPH_PIPELINE_CREATE_INFO_AMDX, ePipelineShaderStageNodeCreateInfoAMDX = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_NODE_CREATE_INFO_AMDX, #endif /*VK_ENABLE_BETA_EXTENSIONS*/ eAttachmentSampleCountInfoAMD = VK_STRUCTURE_TYPE_ATTACHMENT_SAMPLE_COUNT_INFO_AMD, eAttachmentSampleCountInfoNV = VK_STRUCTURE_TYPE_ATTACHMENT_SAMPLE_COUNT_INFO_NV, eSampleLocationsInfoEXT = VK_STRUCTURE_TYPE_SAMPLE_LOCATIONS_INFO_EXT, eRenderPassSampleLocationsBeginInfoEXT = VK_STRUCTURE_TYPE_RENDER_PASS_SAMPLE_LOCATIONS_BEGIN_INFO_EXT, ePipelineSampleLocationsStateCreateInfoEXT = VK_STRUCTURE_TYPE_PIPELINE_SAMPLE_LOCATIONS_STATE_CREATE_INFO_EXT, ePhysicalDeviceSampleLocationsPropertiesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLE_LOCATIONS_PROPERTIES_EXT, eMultisamplePropertiesEXT = VK_STRUCTURE_TYPE_MULTISAMPLE_PROPERTIES_EXT, ePhysicalDeviceBlendOperationAdvancedFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_FEATURES_EXT, ePhysicalDeviceBlendOperationAdvancedPropertiesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_PROPERTIES_EXT, ePipelineColorBlendAdvancedStateCreateInfoEXT = VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_ADVANCED_STATE_CREATE_INFO_EXT, ePipelineCoverageToColorStateCreateInfoNV = VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_TO_COLOR_STATE_CREATE_INFO_NV, eWriteDescriptorSetAccelerationStructureKHR = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_KHR, eAccelerationStructureBuildGeometryInfoKHR = VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_BUILD_GEOMETRY_INFO_KHR, eAccelerationStructureDeviceAddressInfoKHR = VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_DEVICE_ADDRESS_INFO_KHR, eAccelerationStructureGeometryAabbsDataKHR = VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_AABBS_DATA_KHR, eAccelerationStructureGeometryInstancesDataKHR = VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_INSTANCES_DATA_KHR, eAccelerationStructureGeometryTrianglesDataKHR = VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_TRIANGLES_DATA_KHR, eAccelerationStructureGeometryKHR = VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_KHR, eAccelerationStructureVersionInfoKHR = VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_VERSION_INFO_KHR, eCopyAccelerationStructureInfoKHR = VK_STRUCTURE_TYPE_COPY_ACCELERATION_STRUCTURE_INFO_KHR, eCopyAccelerationStructureToMemoryInfoKHR = VK_STRUCTURE_TYPE_COPY_ACCELERATION_STRUCTURE_TO_MEMORY_INFO_KHR, eCopyMemoryToAccelerationStructureInfoKHR = VK_STRUCTURE_TYPE_COPY_MEMORY_TO_ACCELERATION_STRUCTURE_INFO_KHR, ePhysicalDeviceAccelerationStructureFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ACCELERATION_STRUCTURE_FEATURES_KHR, ePhysicalDeviceAccelerationStructurePropertiesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ACCELERATION_STRUCTURE_PROPERTIES_KHR, eAccelerationStructureCreateInfoKHR = VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_CREATE_INFO_KHR, eAccelerationStructureBuildSizesInfoKHR = VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_BUILD_SIZES_INFO_KHR, ePhysicalDeviceRayTracingPipelineFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_FEATURES_KHR, ePhysicalDeviceRayTracingPipelinePropertiesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_PROPERTIES_KHR, eRayTracingPipelineCreateInfoKHR = VK_STRUCTURE_TYPE_RAY_TRACING_PIPELINE_CREATE_INFO_KHR, eRayTracingShaderGroupCreateInfoKHR = VK_STRUCTURE_TYPE_RAY_TRACING_SHADER_GROUP_CREATE_INFO_KHR, eRayTracingPipelineInterfaceCreateInfoKHR = VK_STRUCTURE_TYPE_RAY_TRACING_PIPELINE_INTERFACE_CREATE_INFO_KHR, ePhysicalDeviceRayQueryFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_QUERY_FEATURES_KHR, ePipelineCoverageModulationStateCreateInfoNV = VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_MODULATION_STATE_CREATE_INFO_NV, ePhysicalDeviceShaderSmBuiltinsFeaturesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SM_BUILTINS_FEATURES_NV, ePhysicalDeviceShaderSmBuiltinsPropertiesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SM_BUILTINS_PROPERTIES_NV, eDrmFormatModifierPropertiesListEXT = VK_STRUCTURE_TYPE_DRM_FORMAT_MODIFIER_PROPERTIES_LIST_EXT, ePhysicalDeviceImageDrmFormatModifierInfoEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_DRM_FORMAT_MODIFIER_INFO_EXT, eImageDrmFormatModifierListCreateInfoEXT = VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_LIST_CREATE_INFO_EXT, eImageDrmFormatModifierExplicitCreateInfoEXT = VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_EXPLICIT_CREATE_INFO_EXT, eImageDrmFormatModifierPropertiesEXT = VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_PROPERTIES_EXT, eDrmFormatModifierPropertiesList2EXT = VK_STRUCTURE_TYPE_DRM_FORMAT_MODIFIER_PROPERTIES_LIST_2_EXT, eValidationCacheCreateInfoEXT = VK_STRUCTURE_TYPE_VALIDATION_CACHE_CREATE_INFO_EXT, eShaderModuleValidationCacheCreateInfoEXT = VK_STRUCTURE_TYPE_SHADER_MODULE_VALIDATION_CACHE_CREATE_INFO_EXT, #if defined( VK_ENABLE_BETA_EXTENSIONS ) ePhysicalDevicePortabilitySubsetFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PORTABILITY_SUBSET_FEATURES_KHR, ePhysicalDevicePortabilitySubsetPropertiesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PORTABILITY_SUBSET_PROPERTIES_KHR, #endif /*VK_ENABLE_BETA_EXTENSIONS*/ ePipelineViewportShadingRateImageStateCreateInfoNV = VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_SHADING_RATE_IMAGE_STATE_CREATE_INFO_NV, ePhysicalDeviceShadingRateImageFeaturesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADING_RATE_IMAGE_FEATURES_NV, ePhysicalDeviceShadingRateImagePropertiesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADING_RATE_IMAGE_PROPERTIES_NV, ePipelineViewportCoarseSampleOrderStateCreateInfoNV = VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_COARSE_SAMPLE_ORDER_STATE_CREATE_INFO_NV, eRayTracingPipelineCreateInfoNV = VK_STRUCTURE_TYPE_RAY_TRACING_PIPELINE_CREATE_INFO_NV, eAccelerationStructureCreateInfoNV = VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_CREATE_INFO_NV, eGeometryNV = VK_STRUCTURE_TYPE_GEOMETRY_NV, eGeometryTrianglesNV = VK_STRUCTURE_TYPE_GEOMETRY_TRIANGLES_NV, eGeometryAabbNV = VK_STRUCTURE_TYPE_GEOMETRY_AABB_NV, eBindAccelerationStructureMemoryInfoNV = VK_STRUCTURE_TYPE_BIND_ACCELERATION_STRUCTURE_MEMORY_INFO_NV, eWriteDescriptorSetAccelerationStructureNV = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_NV, eAccelerationStructureMemoryRequirementsInfoNV = VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_INFO_NV, ePhysicalDeviceRayTracingPropertiesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PROPERTIES_NV, eRayTracingShaderGroupCreateInfoNV = VK_STRUCTURE_TYPE_RAY_TRACING_SHADER_GROUP_CREATE_INFO_NV, eAccelerationStructureInfoNV = VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_INFO_NV, ePhysicalDeviceRepresentativeFragmentTestFeaturesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_REPRESENTATIVE_FRAGMENT_TEST_FEATURES_NV, ePipelineRepresentativeFragmentTestStateCreateInfoNV = VK_STRUCTURE_TYPE_PIPELINE_REPRESENTATIVE_FRAGMENT_TEST_STATE_CREATE_INFO_NV, ePhysicalDeviceImageViewImageFormatInfoEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_VIEW_IMAGE_FORMAT_INFO_EXT, eFilterCubicImageViewImageFormatPropertiesEXT = VK_STRUCTURE_TYPE_FILTER_CUBIC_IMAGE_VIEW_IMAGE_FORMAT_PROPERTIES_EXT, eImportMemoryHostPointerInfoEXT = VK_STRUCTURE_TYPE_IMPORT_MEMORY_HOST_POINTER_INFO_EXT, eMemoryHostPointerPropertiesEXT = VK_STRUCTURE_TYPE_MEMORY_HOST_POINTER_PROPERTIES_EXT, ePhysicalDeviceExternalMemoryHostPropertiesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_MEMORY_HOST_PROPERTIES_EXT, ePhysicalDeviceShaderClockFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CLOCK_FEATURES_KHR, ePipelineCompilerControlCreateInfoAMD = VK_STRUCTURE_TYPE_PIPELINE_COMPILER_CONTROL_CREATE_INFO_AMD, ePhysicalDeviceShaderCorePropertiesAMD = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_AMD, eVideoDecodeH265CapabilitiesKHR = VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_CAPABILITIES_KHR, eVideoDecodeH265SessionParametersCreateInfoKHR = VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_SESSION_PARAMETERS_CREATE_INFO_KHR, eVideoDecodeH265SessionParametersAddInfoKHR = VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_SESSION_PARAMETERS_ADD_INFO_KHR, eVideoDecodeH265ProfileInfoKHR = VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_PROFILE_INFO_KHR, eVideoDecodeH265PictureInfoKHR = VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_PICTURE_INFO_KHR, eVideoDecodeH265DpbSlotInfoKHR = VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_DPB_SLOT_INFO_KHR, eDeviceMemoryOverallocationCreateInfoAMD = VK_STRUCTURE_TYPE_DEVICE_MEMORY_OVERALLOCATION_CREATE_INFO_AMD, ePhysicalDeviceVertexAttributeDivisorPropertiesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES_EXT, #if defined( VK_USE_PLATFORM_GGP ) ePresentFrameTokenGGP = VK_STRUCTURE_TYPE_PRESENT_FRAME_TOKEN_GGP, #endif /*VK_USE_PLATFORM_GGP*/ ePhysicalDeviceMeshShaderFeaturesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_FEATURES_NV, ePhysicalDeviceMeshShaderPropertiesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_PROPERTIES_NV, ePhysicalDeviceShaderImageFootprintFeaturesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_IMAGE_FOOTPRINT_FEATURES_NV, ePipelineViewportExclusiveScissorStateCreateInfoNV = VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_EXCLUSIVE_SCISSOR_STATE_CREATE_INFO_NV, ePhysicalDeviceExclusiveScissorFeaturesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXCLUSIVE_SCISSOR_FEATURES_NV, eCheckpointDataNV = VK_STRUCTURE_TYPE_CHECKPOINT_DATA_NV, eQueueFamilyCheckpointPropertiesNV = VK_STRUCTURE_TYPE_QUEUE_FAMILY_CHECKPOINT_PROPERTIES_NV, eQueueFamilyCheckpointProperties2NV = VK_STRUCTURE_TYPE_QUEUE_FAMILY_CHECKPOINT_PROPERTIES_2_NV, eCheckpointData2NV = VK_STRUCTURE_TYPE_CHECKPOINT_DATA_2_NV, ePhysicalDeviceShaderIntegerFunctions2FeaturesINTEL = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_FUNCTIONS_2_FEATURES_INTEL, eQueryPoolPerformanceQueryCreateInfoINTEL = VK_STRUCTURE_TYPE_QUERY_POOL_PERFORMANCE_QUERY_CREATE_INFO_INTEL, eQueryPoolCreateInfoINTEL = VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO_INTEL, eInitializePerformanceApiInfoINTEL = VK_STRUCTURE_TYPE_INITIALIZE_PERFORMANCE_API_INFO_INTEL, ePerformanceMarkerInfoINTEL = VK_STRUCTURE_TYPE_PERFORMANCE_MARKER_INFO_INTEL, ePerformanceStreamMarkerInfoINTEL = VK_STRUCTURE_TYPE_PERFORMANCE_STREAM_MARKER_INFO_INTEL, ePerformanceOverrideInfoINTEL = VK_STRUCTURE_TYPE_PERFORMANCE_OVERRIDE_INFO_INTEL, ePerformanceConfigurationAcquireInfoINTEL = VK_STRUCTURE_TYPE_PERFORMANCE_CONFIGURATION_ACQUIRE_INFO_INTEL, ePhysicalDevicePciBusInfoPropertiesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PCI_BUS_INFO_PROPERTIES_EXT, eDisplayNativeHdrSurfaceCapabilitiesAMD = VK_STRUCTURE_TYPE_DISPLAY_NATIVE_HDR_SURFACE_CAPABILITIES_AMD, eSwapchainDisplayNativeHdrCreateInfoAMD = VK_STRUCTURE_TYPE_SWAPCHAIN_DISPLAY_NATIVE_HDR_CREATE_INFO_AMD, #if defined( VK_USE_PLATFORM_FUCHSIA ) eImagepipeSurfaceCreateInfoFUCHSIA = VK_STRUCTURE_TYPE_IMAGEPIPE_SURFACE_CREATE_INFO_FUCHSIA, #endif /*VK_USE_PLATFORM_FUCHSIA*/ #if defined( VK_USE_PLATFORM_METAL_EXT ) eMetalSurfaceCreateInfoEXT = VK_STRUCTURE_TYPE_METAL_SURFACE_CREATE_INFO_EXT, #endif /*VK_USE_PLATFORM_METAL_EXT*/ ePhysicalDeviceFragmentDensityMapFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_FEATURES_EXT, ePhysicalDeviceFragmentDensityMapPropertiesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_PROPERTIES_EXT, eRenderPassFragmentDensityMapCreateInfoEXT = VK_STRUCTURE_TYPE_RENDER_PASS_FRAGMENT_DENSITY_MAP_CREATE_INFO_EXT, eRenderingFragmentDensityMapAttachmentInfoEXT = VK_STRUCTURE_TYPE_RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_INFO_EXT, eFragmentShadingRateAttachmentInfoKHR = VK_STRUCTURE_TYPE_FRAGMENT_SHADING_RATE_ATTACHMENT_INFO_KHR, ePipelineFragmentShadingRateStateCreateInfoKHR = VK_STRUCTURE_TYPE_PIPELINE_FRAGMENT_SHADING_RATE_STATE_CREATE_INFO_KHR, ePhysicalDeviceFragmentShadingRatePropertiesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_PROPERTIES_KHR, ePhysicalDeviceFragmentShadingRateFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_FEATURES_KHR, ePhysicalDeviceFragmentShadingRateKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_KHR, eRenderingFragmentShadingRateAttachmentInfoKHR = VK_STRUCTURE_TYPE_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_INFO_KHR, ePhysicalDeviceShaderCoreProperties2AMD = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_2_AMD, ePhysicalDeviceCoherentMemoryFeaturesAMD = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COHERENT_MEMORY_FEATURES_AMD, ePhysicalDeviceShaderImageAtomicInt64FeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_IMAGE_ATOMIC_INT64_FEATURES_EXT, ePhysicalDeviceShaderQuadControlFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_QUAD_CONTROL_FEATURES_KHR, ePhysicalDeviceMemoryBudgetPropertiesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_BUDGET_PROPERTIES_EXT, ePhysicalDeviceMemoryPriorityFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PRIORITY_FEATURES_EXT, eMemoryPriorityAllocateInfoEXT = VK_STRUCTURE_TYPE_MEMORY_PRIORITY_ALLOCATE_INFO_EXT, eSurfaceProtectedCapabilitiesKHR = VK_STRUCTURE_TYPE_SURFACE_PROTECTED_CAPABILITIES_KHR, ePhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEDICATED_ALLOCATION_IMAGE_ALIASING_FEATURES_NV, ePhysicalDeviceBufferDeviceAddressFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_EXT, ePhysicalDeviceBufferAddressFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_ADDRESS_FEATURES_EXT, eBufferDeviceAddressCreateInfoEXT = VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_CREATE_INFO_EXT, eValidationFeaturesEXT = VK_STRUCTURE_TYPE_VALIDATION_FEATURES_EXT, ePhysicalDevicePresentWaitFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_WAIT_FEATURES_KHR, ePhysicalDeviceCooperativeMatrixFeaturesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_FEATURES_NV, eCooperativeMatrixPropertiesNV = VK_STRUCTURE_TYPE_COOPERATIVE_MATRIX_PROPERTIES_NV, ePhysicalDeviceCooperativeMatrixPropertiesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_PROPERTIES_NV, ePhysicalDeviceCoverageReductionModeFeaturesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COVERAGE_REDUCTION_MODE_FEATURES_NV, ePipelineCoverageReductionStateCreateInfoNV = VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_REDUCTION_STATE_CREATE_INFO_NV, eFramebufferMixedSamplesCombinationNV = VK_STRUCTURE_TYPE_FRAMEBUFFER_MIXED_SAMPLES_COMBINATION_NV, ePhysicalDeviceFragmentShaderInterlockFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_INTERLOCK_FEATURES_EXT, ePhysicalDeviceYcbcrImageArraysFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_YCBCR_IMAGE_ARRAYS_FEATURES_EXT, ePhysicalDeviceProvokingVertexFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROVOKING_VERTEX_FEATURES_EXT, ePipelineRasterizationProvokingVertexStateCreateInfoEXT = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_PROVOKING_VERTEX_STATE_CREATE_INFO_EXT, ePhysicalDeviceProvokingVertexPropertiesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROVOKING_VERTEX_PROPERTIES_EXT, #if defined( VK_USE_PLATFORM_WIN32_KHR ) eSurfaceFullScreenExclusiveInfoEXT = VK_STRUCTURE_TYPE_SURFACE_FULL_SCREEN_EXCLUSIVE_INFO_EXT, eSurfaceCapabilitiesFullScreenExclusiveEXT = VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_FULL_SCREEN_EXCLUSIVE_EXT, eSurfaceFullScreenExclusiveWin32InfoEXT = VK_STRUCTURE_TYPE_SURFACE_FULL_SCREEN_EXCLUSIVE_WIN32_INFO_EXT, #endif /*VK_USE_PLATFORM_WIN32_KHR*/ eHeadlessSurfaceCreateInfoEXT = VK_STRUCTURE_TYPE_HEADLESS_SURFACE_CREATE_INFO_EXT, ePhysicalDeviceShaderAtomicFloatFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_FEATURES_EXT, ePhysicalDeviceExtendedDynamicStateFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_FEATURES_EXT, ePhysicalDevicePipelineExecutablePropertiesFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_EXECUTABLE_PROPERTIES_FEATURES_KHR, ePipelineInfoKHR = VK_STRUCTURE_TYPE_PIPELINE_INFO_KHR, ePipelineInfoEXT = VK_STRUCTURE_TYPE_PIPELINE_INFO_EXT, ePipelineExecutablePropertiesKHR = VK_STRUCTURE_TYPE_PIPELINE_EXECUTABLE_PROPERTIES_KHR, ePipelineExecutableInfoKHR = VK_STRUCTURE_TYPE_PIPELINE_EXECUTABLE_INFO_KHR, ePipelineExecutableStatisticKHR = VK_STRUCTURE_TYPE_PIPELINE_EXECUTABLE_STATISTIC_KHR, ePipelineExecutableInternalRepresentationKHR = VK_STRUCTURE_TYPE_PIPELINE_EXECUTABLE_INTERNAL_REPRESENTATION_KHR, ePhysicalDeviceMapMemoryPlacedFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAP_MEMORY_PLACED_FEATURES_EXT, ePhysicalDeviceMapMemoryPlacedPropertiesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAP_MEMORY_PLACED_PROPERTIES_EXT, eMemoryMapPlacedInfoEXT = VK_STRUCTURE_TYPE_MEMORY_MAP_PLACED_INFO_EXT, ePhysicalDeviceShaderAtomicFloat2FeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_2_FEATURES_EXT, eSurfacePresentModeEXT = VK_STRUCTURE_TYPE_SURFACE_PRESENT_MODE_EXT, eSurfacePresentScalingCapabilitiesEXT = VK_STRUCTURE_TYPE_SURFACE_PRESENT_SCALING_CAPABILITIES_EXT, eSurfacePresentModeCompatibilityEXT = VK_STRUCTURE_TYPE_SURFACE_PRESENT_MODE_COMPATIBILITY_EXT, ePhysicalDeviceSwapchainMaintenance1FeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SWAPCHAIN_MAINTENANCE_1_FEATURES_EXT, eSwapchainPresentFenceInfoEXT = VK_STRUCTURE_TYPE_SWAPCHAIN_PRESENT_FENCE_INFO_EXT, eSwapchainPresentModesCreateInfoEXT = VK_STRUCTURE_TYPE_SWAPCHAIN_PRESENT_MODES_CREATE_INFO_EXT, eSwapchainPresentModeInfoEXT = VK_STRUCTURE_TYPE_SWAPCHAIN_PRESENT_MODE_INFO_EXT, eSwapchainPresentScalingCreateInfoEXT = VK_STRUCTURE_TYPE_SWAPCHAIN_PRESENT_SCALING_CREATE_INFO_EXT, eReleaseSwapchainImagesInfoEXT = VK_STRUCTURE_TYPE_RELEASE_SWAPCHAIN_IMAGES_INFO_EXT, ePhysicalDeviceDeviceGeneratedCommandsPropertiesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_GENERATED_COMMANDS_PROPERTIES_NV, eGraphicsShaderGroupCreateInfoNV = VK_STRUCTURE_TYPE_GRAPHICS_SHADER_GROUP_CREATE_INFO_NV, eGraphicsPipelineShaderGroupsCreateInfoNV = VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_SHADER_GROUPS_CREATE_INFO_NV, eIndirectCommandsLayoutTokenNV = VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_TOKEN_NV, eIndirectCommandsLayoutCreateInfoNV = VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_NV, eGeneratedCommandsInfoNV = VK_STRUCTURE_TYPE_GENERATED_COMMANDS_INFO_NV, eGeneratedCommandsMemoryRequirementsInfoNV = VK_STRUCTURE_TYPE_GENERATED_COMMANDS_MEMORY_REQUIREMENTS_INFO_NV, ePhysicalDeviceDeviceGeneratedCommandsFeaturesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_GENERATED_COMMANDS_FEATURES_NV, ePhysicalDeviceInheritedViewportScissorFeaturesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INHERITED_VIEWPORT_SCISSOR_FEATURES_NV, eCommandBufferInheritanceViewportScissorInfoNV = VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_VIEWPORT_SCISSOR_INFO_NV, ePhysicalDeviceTexelBufferAlignmentFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_FEATURES_EXT, eCommandBufferInheritanceRenderPassTransformInfoQCOM = VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_RENDER_PASS_TRANSFORM_INFO_QCOM, eRenderPassTransformBeginInfoQCOM = VK_STRUCTURE_TYPE_RENDER_PASS_TRANSFORM_BEGIN_INFO_QCOM, ePhysicalDeviceDepthBiasControlFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_BIAS_CONTROL_FEATURES_EXT, eDepthBiasInfoEXT = VK_STRUCTURE_TYPE_DEPTH_BIAS_INFO_EXT, eDepthBiasRepresentationInfoEXT = VK_STRUCTURE_TYPE_DEPTH_BIAS_REPRESENTATION_INFO_EXT, ePhysicalDeviceDeviceMemoryReportFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_MEMORY_REPORT_FEATURES_EXT, eDeviceDeviceMemoryReportCreateInfoEXT = VK_STRUCTURE_TYPE_DEVICE_DEVICE_MEMORY_REPORT_CREATE_INFO_EXT, eDeviceMemoryReportCallbackDataEXT = VK_STRUCTURE_TYPE_DEVICE_MEMORY_REPORT_CALLBACK_DATA_EXT, ePhysicalDeviceRobustness2FeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ROBUSTNESS_2_FEATURES_EXT, ePhysicalDeviceRobustness2PropertiesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ROBUSTNESS_2_PROPERTIES_EXT, eSamplerCustomBorderColorCreateInfoEXT = VK_STRUCTURE_TYPE_SAMPLER_CUSTOM_BORDER_COLOR_CREATE_INFO_EXT, ePhysicalDeviceCustomBorderColorPropertiesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_PROPERTIES_EXT, ePhysicalDeviceCustomBorderColorFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_FEATURES_EXT, ePipelineLibraryCreateInfoKHR = VK_STRUCTURE_TYPE_PIPELINE_LIBRARY_CREATE_INFO_KHR, ePhysicalDevicePresentBarrierFeaturesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_BARRIER_FEATURES_NV, eSurfaceCapabilitiesPresentBarrierNV = VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_PRESENT_BARRIER_NV, eSwapchainPresentBarrierCreateInfoNV = VK_STRUCTURE_TYPE_SWAPCHAIN_PRESENT_BARRIER_CREATE_INFO_NV, ePresentIdKHR = VK_STRUCTURE_TYPE_PRESENT_ID_KHR, ePhysicalDevicePresentIdFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_ID_FEATURES_KHR, eVideoEncodeInfoKHR = VK_STRUCTURE_TYPE_VIDEO_ENCODE_INFO_KHR, eVideoEncodeRateControlInfoKHR = VK_STRUCTURE_TYPE_VIDEO_ENCODE_RATE_CONTROL_INFO_KHR, eVideoEncodeRateControlLayerInfoKHR = VK_STRUCTURE_TYPE_VIDEO_ENCODE_RATE_CONTROL_LAYER_INFO_KHR, eVideoEncodeCapabilitiesKHR = VK_STRUCTURE_TYPE_VIDEO_ENCODE_CAPABILITIES_KHR, eVideoEncodeUsageInfoKHR = VK_STRUCTURE_TYPE_VIDEO_ENCODE_USAGE_INFO_KHR, eQueryPoolVideoEncodeFeedbackCreateInfoKHR = VK_STRUCTURE_TYPE_QUERY_POOL_VIDEO_ENCODE_FEEDBACK_CREATE_INFO_KHR, ePhysicalDeviceVideoEncodeQualityLevelInfoKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VIDEO_ENCODE_QUALITY_LEVEL_INFO_KHR, eVideoEncodeQualityLevelPropertiesKHR = VK_STRUCTURE_TYPE_VIDEO_ENCODE_QUALITY_LEVEL_PROPERTIES_KHR, eVideoEncodeQualityLevelInfoKHR = VK_STRUCTURE_TYPE_VIDEO_ENCODE_QUALITY_LEVEL_INFO_KHR, eVideoEncodeSessionParametersGetInfoKHR = VK_STRUCTURE_TYPE_VIDEO_ENCODE_SESSION_PARAMETERS_GET_INFO_KHR, eVideoEncodeSessionParametersFeedbackInfoKHR = VK_STRUCTURE_TYPE_VIDEO_ENCODE_SESSION_PARAMETERS_FEEDBACK_INFO_KHR, ePhysicalDeviceDiagnosticsConfigFeaturesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DIAGNOSTICS_CONFIG_FEATURES_NV, eDeviceDiagnosticsConfigCreateInfoNV = VK_STRUCTURE_TYPE_DEVICE_DIAGNOSTICS_CONFIG_CREATE_INFO_NV, #if defined( VK_ENABLE_BETA_EXTENSIONS ) eCudaModuleCreateInfoNV = VK_STRUCTURE_TYPE_CUDA_MODULE_CREATE_INFO_NV, eCudaFunctionCreateInfoNV = VK_STRUCTURE_TYPE_CUDA_FUNCTION_CREATE_INFO_NV, eCudaLaunchInfoNV = VK_STRUCTURE_TYPE_CUDA_LAUNCH_INFO_NV, ePhysicalDeviceCudaKernelLaunchFeaturesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUDA_KERNEL_LAUNCH_FEATURES_NV, ePhysicalDeviceCudaKernelLaunchPropertiesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUDA_KERNEL_LAUNCH_PROPERTIES_NV, #endif /*VK_ENABLE_BETA_EXTENSIONS*/ eQueryLowLatencySupportNV = VK_STRUCTURE_TYPE_QUERY_LOW_LATENCY_SUPPORT_NV, #if defined( VK_USE_PLATFORM_METAL_EXT ) eExportMetalObjectCreateInfoEXT = VK_STRUCTURE_TYPE_EXPORT_METAL_OBJECT_CREATE_INFO_EXT, eExportMetalObjectsInfoEXT = VK_STRUCTURE_TYPE_EXPORT_METAL_OBJECTS_INFO_EXT, eExportMetalDeviceInfoEXT = VK_STRUCTURE_TYPE_EXPORT_METAL_DEVICE_INFO_EXT, eExportMetalCommandQueueInfoEXT = VK_STRUCTURE_TYPE_EXPORT_METAL_COMMAND_QUEUE_INFO_EXT, eExportMetalBufferInfoEXT = VK_STRUCTURE_TYPE_EXPORT_METAL_BUFFER_INFO_EXT, eImportMetalBufferInfoEXT = VK_STRUCTURE_TYPE_IMPORT_METAL_BUFFER_INFO_EXT, eExportMetalTextureInfoEXT = VK_STRUCTURE_TYPE_EXPORT_METAL_TEXTURE_INFO_EXT, eImportMetalTextureInfoEXT = VK_STRUCTURE_TYPE_IMPORT_METAL_TEXTURE_INFO_EXT, eExportMetalIoSurfaceInfoEXT = VK_STRUCTURE_TYPE_EXPORT_METAL_IO_SURFACE_INFO_EXT, eImportMetalIoSurfaceInfoEXT = VK_STRUCTURE_TYPE_IMPORT_METAL_IO_SURFACE_INFO_EXT, eExportMetalSharedEventInfoEXT = VK_STRUCTURE_TYPE_EXPORT_METAL_SHARED_EVENT_INFO_EXT, eImportMetalSharedEventInfoEXT = VK_STRUCTURE_TYPE_IMPORT_METAL_SHARED_EVENT_INFO_EXT, #endif /*VK_USE_PLATFORM_METAL_EXT*/ ePhysicalDeviceDescriptorBufferPropertiesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_BUFFER_PROPERTIES_EXT, ePhysicalDeviceDescriptorBufferDensityMapPropertiesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_BUFFER_DENSITY_MAP_PROPERTIES_EXT, ePhysicalDeviceDescriptorBufferFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_BUFFER_FEATURES_EXT, eDescriptorAddressInfoEXT = VK_STRUCTURE_TYPE_DESCRIPTOR_ADDRESS_INFO_EXT, eDescriptorGetInfoEXT = VK_STRUCTURE_TYPE_DESCRIPTOR_GET_INFO_EXT, eBufferCaptureDescriptorDataInfoEXT = VK_STRUCTURE_TYPE_BUFFER_CAPTURE_DESCRIPTOR_DATA_INFO_EXT, eImageCaptureDescriptorDataInfoEXT = VK_STRUCTURE_TYPE_IMAGE_CAPTURE_DESCRIPTOR_DATA_INFO_EXT, eImageViewCaptureDescriptorDataInfoEXT = VK_STRUCTURE_TYPE_IMAGE_VIEW_CAPTURE_DESCRIPTOR_DATA_INFO_EXT, eSamplerCaptureDescriptorDataInfoEXT = VK_STRUCTURE_TYPE_SAMPLER_CAPTURE_DESCRIPTOR_DATA_INFO_EXT, eOpaqueCaptureDescriptorDataCreateInfoEXT = VK_STRUCTURE_TYPE_OPAQUE_CAPTURE_DESCRIPTOR_DATA_CREATE_INFO_EXT, eDescriptorBufferBindingInfoEXT = VK_STRUCTURE_TYPE_DESCRIPTOR_BUFFER_BINDING_INFO_EXT, eDescriptorBufferBindingPushDescriptorBufferHandleEXT = VK_STRUCTURE_TYPE_DESCRIPTOR_BUFFER_BINDING_PUSH_DESCRIPTOR_BUFFER_HANDLE_EXT, eAccelerationStructureCaptureDescriptorDataInfoEXT = VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_CAPTURE_DESCRIPTOR_DATA_INFO_EXT, ePhysicalDeviceGraphicsPipelineLibraryFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GRAPHICS_PIPELINE_LIBRARY_FEATURES_EXT, ePhysicalDeviceGraphicsPipelineLibraryPropertiesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GRAPHICS_PIPELINE_LIBRARY_PROPERTIES_EXT, eGraphicsPipelineLibraryCreateInfoEXT = VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_LIBRARY_CREATE_INFO_EXT, ePhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_EARLY_AND_LATE_FRAGMENT_TESTS_FEATURES_AMD, ePhysicalDeviceFragmentShaderBarycentricFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_FEATURES_KHR, ePhysicalDeviceFragmentShaderBarycentricFeaturesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_FEATURES_NV, ePhysicalDeviceFragmentShaderBarycentricPropertiesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_PROPERTIES_KHR, ePhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_UNIFORM_CONTROL_FLOW_FEATURES_KHR, ePhysicalDeviceFragmentShadingRateEnumsPropertiesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_ENUMS_PROPERTIES_NV, ePhysicalDeviceFragmentShadingRateEnumsFeaturesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_ENUMS_FEATURES_NV, ePipelineFragmentShadingRateEnumStateCreateInfoNV = VK_STRUCTURE_TYPE_PIPELINE_FRAGMENT_SHADING_RATE_ENUM_STATE_CREATE_INFO_NV, eAccelerationStructureGeometryMotionTrianglesDataNV = VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_MOTION_TRIANGLES_DATA_NV, ePhysicalDeviceRayTracingMotionBlurFeaturesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_MOTION_BLUR_FEATURES_NV, eAccelerationStructureMotionInfoNV = VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_MOTION_INFO_NV, ePhysicalDeviceMeshShaderFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_FEATURES_EXT, ePhysicalDeviceMeshShaderPropertiesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_PROPERTIES_EXT, ePhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_YCBCR_2_PLANE_444_FORMATS_FEATURES_EXT, ePhysicalDeviceFragmentDensityMap2FeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_2_FEATURES_EXT, ePhysicalDeviceFragmentDensityMap2PropertiesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_2_PROPERTIES_EXT, eCopyCommandTransformInfoQCOM = VK_STRUCTURE_TYPE_COPY_COMMAND_TRANSFORM_INFO_QCOM, ePhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_WORKGROUP_MEMORY_EXPLICIT_LAYOUT_FEATURES_KHR, ePhysicalDeviceImageCompressionControlFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_COMPRESSION_CONTROL_FEATURES_EXT, eImageCompressionControlEXT = VK_STRUCTURE_TYPE_IMAGE_COMPRESSION_CONTROL_EXT, eImageCompressionPropertiesEXT = VK_STRUCTURE_TYPE_IMAGE_COMPRESSION_PROPERTIES_EXT, ePhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ATTACHMENT_FEEDBACK_LOOP_LAYOUT_FEATURES_EXT, ePhysicalDevice4444FormatsFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_4444_FORMATS_FEATURES_EXT, ePhysicalDeviceFaultFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FAULT_FEATURES_EXT, eDeviceFaultCountsEXT = VK_STRUCTURE_TYPE_DEVICE_FAULT_COUNTS_EXT, eDeviceFaultInfoEXT = VK_STRUCTURE_TYPE_DEVICE_FAULT_INFO_EXT, ePhysicalDeviceRgba10X6FormatsFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RGBA10X6_FORMATS_FEATURES_EXT, #if defined( VK_USE_PLATFORM_DIRECTFB_EXT ) eDirectfbSurfaceCreateInfoEXT = VK_STRUCTURE_TYPE_DIRECTFB_SURFACE_CREATE_INFO_EXT, #endif /*VK_USE_PLATFORM_DIRECTFB_EXT*/ ePhysicalDeviceVertexInputDynamicStateFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_INPUT_DYNAMIC_STATE_FEATURES_EXT, eVertexInputBindingDescription2EXT = VK_STRUCTURE_TYPE_VERTEX_INPUT_BINDING_DESCRIPTION_2_EXT, eVertexInputAttributeDescription2EXT = VK_STRUCTURE_TYPE_VERTEX_INPUT_ATTRIBUTE_DESCRIPTION_2_EXT, ePhysicalDeviceDrmPropertiesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRM_PROPERTIES_EXT, ePhysicalDeviceAddressBindingReportFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ADDRESS_BINDING_REPORT_FEATURES_EXT, eDeviceAddressBindingCallbackDataEXT = VK_STRUCTURE_TYPE_DEVICE_ADDRESS_BINDING_CALLBACK_DATA_EXT, ePhysicalDeviceDepthClipControlFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLIP_CONTROL_FEATURES_EXT, ePipelineViewportDepthClipControlCreateInfoEXT = VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_DEPTH_CLIP_CONTROL_CREATE_INFO_EXT, ePhysicalDevicePrimitiveTopologyListRestartFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIMITIVE_TOPOLOGY_LIST_RESTART_FEATURES_EXT, ePhysicalDevicePresentModeFifoLatestReadyFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_MODE_FIFO_LATEST_READY_FEATURES_EXT, #if defined( VK_USE_PLATFORM_FUCHSIA ) eImportMemoryZirconHandleInfoFUCHSIA = VK_STRUCTURE_TYPE_IMPORT_MEMORY_ZIRCON_HANDLE_INFO_FUCHSIA, eMemoryZirconHandlePropertiesFUCHSIA = VK_STRUCTURE_TYPE_MEMORY_ZIRCON_HANDLE_PROPERTIES_FUCHSIA, eMemoryGetZirconHandleInfoFUCHSIA = VK_STRUCTURE_TYPE_MEMORY_GET_ZIRCON_HANDLE_INFO_FUCHSIA, eImportSemaphoreZirconHandleInfoFUCHSIA = VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_ZIRCON_HANDLE_INFO_FUCHSIA, eSemaphoreGetZirconHandleInfoFUCHSIA = VK_STRUCTURE_TYPE_SEMAPHORE_GET_ZIRCON_HANDLE_INFO_FUCHSIA, eBufferCollectionCreateInfoFUCHSIA = VK_STRUCTURE_TYPE_BUFFER_COLLECTION_CREATE_INFO_FUCHSIA, eImportMemoryBufferCollectionFUCHSIA = VK_STRUCTURE_TYPE_IMPORT_MEMORY_BUFFER_COLLECTION_FUCHSIA, eBufferCollectionImageCreateInfoFUCHSIA = VK_STRUCTURE_TYPE_BUFFER_COLLECTION_IMAGE_CREATE_INFO_FUCHSIA, eBufferCollectionPropertiesFUCHSIA = VK_STRUCTURE_TYPE_BUFFER_COLLECTION_PROPERTIES_FUCHSIA, eBufferConstraintsInfoFUCHSIA = VK_STRUCTURE_TYPE_BUFFER_CONSTRAINTS_INFO_FUCHSIA, eBufferCollectionBufferCreateInfoFUCHSIA = VK_STRUCTURE_TYPE_BUFFER_COLLECTION_BUFFER_CREATE_INFO_FUCHSIA, eImageConstraintsInfoFUCHSIA = VK_STRUCTURE_TYPE_IMAGE_CONSTRAINTS_INFO_FUCHSIA, eImageFormatConstraintsInfoFUCHSIA = VK_STRUCTURE_TYPE_IMAGE_FORMAT_CONSTRAINTS_INFO_FUCHSIA, eSysmemColorSpaceFUCHSIA = VK_STRUCTURE_TYPE_SYSMEM_COLOR_SPACE_FUCHSIA, eBufferCollectionConstraintsInfoFUCHSIA = VK_STRUCTURE_TYPE_BUFFER_COLLECTION_CONSTRAINTS_INFO_FUCHSIA, #endif /*VK_USE_PLATFORM_FUCHSIA*/ eSubpassShadingPipelineCreateInfoHUAWEI = VK_STRUCTURE_TYPE_SUBPASS_SHADING_PIPELINE_CREATE_INFO_HUAWEI, ePhysicalDeviceSubpassShadingFeaturesHUAWEI = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBPASS_SHADING_FEATURES_HUAWEI, ePhysicalDeviceSubpassShadingPropertiesHUAWEI = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBPASS_SHADING_PROPERTIES_HUAWEI, ePhysicalDeviceInvocationMaskFeaturesHUAWEI = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INVOCATION_MASK_FEATURES_HUAWEI, eMemoryGetRemoteAddressInfoNV = VK_STRUCTURE_TYPE_MEMORY_GET_REMOTE_ADDRESS_INFO_NV, ePhysicalDeviceExternalMemoryRdmaFeaturesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_MEMORY_RDMA_FEATURES_NV, ePipelinePropertiesIdentifierEXT = VK_STRUCTURE_TYPE_PIPELINE_PROPERTIES_IDENTIFIER_EXT, ePhysicalDevicePipelinePropertiesFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_PROPERTIES_FEATURES_EXT, ePhysicalDeviceFrameBoundaryFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAME_BOUNDARY_FEATURES_EXT, eFrameBoundaryEXT = VK_STRUCTURE_TYPE_FRAME_BOUNDARY_EXT, ePhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_FEATURES_EXT, eSubpassResolvePerformanceQueryEXT = VK_STRUCTURE_TYPE_SUBPASS_RESOLVE_PERFORMANCE_QUERY_EXT, eMultisampledRenderToSingleSampledInfoEXT = VK_STRUCTURE_TYPE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_INFO_EXT, ePhysicalDeviceExtendedDynamicState2FeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_2_FEATURES_EXT, #if defined( VK_USE_PLATFORM_SCREEN_QNX ) eScreenSurfaceCreateInfoQNX = VK_STRUCTURE_TYPE_SCREEN_SURFACE_CREATE_INFO_QNX, #endif /*VK_USE_PLATFORM_SCREEN_QNX*/ ePhysicalDeviceColorWriteEnableFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COLOR_WRITE_ENABLE_FEATURES_EXT, ePipelineColorWriteCreateInfoEXT = VK_STRUCTURE_TYPE_PIPELINE_COLOR_WRITE_CREATE_INFO_EXT, ePhysicalDevicePrimitivesGeneratedQueryFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIMITIVES_GENERATED_QUERY_FEATURES_EXT, ePhysicalDeviceRayTracingMaintenance1FeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_MAINTENANCE_1_FEATURES_KHR, ePhysicalDeviceImageViewMinLodFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_VIEW_MIN_LOD_FEATURES_EXT, eImageViewMinLodCreateInfoEXT = VK_STRUCTURE_TYPE_IMAGE_VIEW_MIN_LOD_CREATE_INFO_EXT, ePhysicalDeviceMultiDrawFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTI_DRAW_FEATURES_EXT, ePhysicalDeviceMultiDrawPropertiesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTI_DRAW_PROPERTIES_EXT, ePhysicalDeviceImage2DViewOf3DFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_2D_VIEW_OF_3D_FEATURES_EXT, ePhysicalDeviceShaderTileImageFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_TILE_IMAGE_FEATURES_EXT, ePhysicalDeviceShaderTileImagePropertiesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_TILE_IMAGE_PROPERTIES_EXT, eMicromapBuildInfoEXT = VK_STRUCTURE_TYPE_MICROMAP_BUILD_INFO_EXT, eMicromapVersionInfoEXT = VK_STRUCTURE_TYPE_MICROMAP_VERSION_INFO_EXT, eCopyMicromapInfoEXT = VK_STRUCTURE_TYPE_COPY_MICROMAP_INFO_EXT, eCopyMicromapToMemoryInfoEXT = VK_STRUCTURE_TYPE_COPY_MICROMAP_TO_MEMORY_INFO_EXT, eCopyMemoryToMicromapInfoEXT = VK_STRUCTURE_TYPE_COPY_MEMORY_TO_MICROMAP_INFO_EXT, ePhysicalDeviceOpacityMicromapFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_OPACITY_MICROMAP_FEATURES_EXT, ePhysicalDeviceOpacityMicromapPropertiesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_OPACITY_MICROMAP_PROPERTIES_EXT, eMicromapCreateInfoEXT = VK_STRUCTURE_TYPE_MICROMAP_CREATE_INFO_EXT, eMicromapBuildSizesInfoEXT = VK_STRUCTURE_TYPE_MICROMAP_BUILD_SIZES_INFO_EXT, eAccelerationStructureTrianglesOpacityMicromapEXT = VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_TRIANGLES_OPACITY_MICROMAP_EXT, #if defined( VK_ENABLE_BETA_EXTENSIONS ) ePhysicalDeviceDisplacementMicromapFeaturesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DISPLACEMENT_MICROMAP_FEATURES_NV, ePhysicalDeviceDisplacementMicromapPropertiesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DISPLACEMENT_MICROMAP_PROPERTIES_NV, eAccelerationStructureTrianglesDisplacementMicromapNV = VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_TRIANGLES_DISPLACEMENT_MICROMAP_NV, #endif /*VK_ENABLE_BETA_EXTENSIONS*/ ePhysicalDeviceClusterCullingShaderFeaturesHUAWEI = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CLUSTER_CULLING_SHADER_FEATURES_HUAWEI, ePhysicalDeviceClusterCullingShaderPropertiesHUAWEI = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CLUSTER_CULLING_SHADER_PROPERTIES_HUAWEI, ePhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CLUSTER_CULLING_SHADER_VRS_FEATURES_HUAWEI, ePhysicalDeviceBorderColorSwizzleFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BORDER_COLOR_SWIZZLE_FEATURES_EXT, eSamplerBorderColorComponentMappingCreateInfoEXT = VK_STRUCTURE_TYPE_SAMPLER_BORDER_COLOR_COMPONENT_MAPPING_CREATE_INFO_EXT, ePhysicalDevicePageableDeviceLocalMemoryFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PAGEABLE_DEVICE_LOCAL_MEMORY_FEATURES_EXT, ePhysicalDeviceShaderCorePropertiesARM = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_ARM, eDeviceQueueShaderCoreControlCreateInfoARM = VK_STRUCTURE_TYPE_DEVICE_QUEUE_SHADER_CORE_CONTROL_CREATE_INFO_ARM, ePhysicalDeviceSchedulingControlsFeaturesARM = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCHEDULING_CONTROLS_FEATURES_ARM, ePhysicalDeviceSchedulingControlsPropertiesARM = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCHEDULING_CONTROLS_PROPERTIES_ARM, ePhysicalDeviceImageSlicedViewOf3DFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_SLICED_VIEW_OF_3D_FEATURES_EXT, eImageViewSlicedCreateInfoEXT = VK_STRUCTURE_TYPE_IMAGE_VIEW_SLICED_CREATE_INFO_EXT, ePhysicalDeviceDescriptorSetHostMappingFeaturesVALVE = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_SET_HOST_MAPPING_FEATURES_VALVE, eDescriptorSetBindingReferenceVALVE = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_BINDING_REFERENCE_VALVE, eDescriptorSetLayoutHostMappingInfoVALVE = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_HOST_MAPPING_INFO_VALVE, ePhysicalDeviceNonSeamlessCubeMapFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_NON_SEAMLESS_CUBE_MAP_FEATURES_EXT, ePhysicalDeviceRenderPassStripedFeaturesARM = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RENDER_PASS_STRIPED_FEATURES_ARM, ePhysicalDeviceRenderPassStripedPropertiesARM = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RENDER_PASS_STRIPED_PROPERTIES_ARM, eRenderPassStripeBeginInfoARM = VK_STRUCTURE_TYPE_RENDER_PASS_STRIPE_BEGIN_INFO_ARM, eRenderPassStripeInfoARM = VK_STRUCTURE_TYPE_RENDER_PASS_STRIPE_INFO_ARM, eRenderPassStripeSubmitInfoARM = VK_STRUCTURE_TYPE_RENDER_PASS_STRIPE_SUBMIT_INFO_ARM, ePhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_OFFSET_FEATURES_QCOM, ePhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_OFFSET_PROPERTIES_QCOM, eSubpassFragmentDensityMapOffsetEndInfoQCOM = VK_STRUCTURE_TYPE_SUBPASS_FRAGMENT_DENSITY_MAP_OFFSET_END_INFO_QCOM, ePhysicalDeviceCopyMemoryIndirectFeaturesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COPY_MEMORY_INDIRECT_FEATURES_NV, ePhysicalDeviceCopyMemoryIndirectPropertiesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COPY_MEMORY_INDIRECT_PROPERTIES_NV, ePhysicalDeviceMemoryDecompressionFeaturesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_DECOMPRESSION_FEATURES_NV, ePhysicalDeviceMemoryDecompressionPropertiesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_DECOMPRESSION_PROPERTIES_NV, ePhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_GENERATED_COMMANDS_COMPUTE_FEATURES_NV, eComputePipelineIndirectBufferInfoNV = VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_INDIRECT_BUFFER_INFO_NV, ePipelineIndirectDeviceAddressInfoNV = VK_STRUCTURE_TYPE_PIPELINE_INDIRECT_DEVICE_ADDRESS_INFO_NV, ePhysicalDeviceRayTracingLinearSweptSpheresFeaturesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_LINEAR_SWEPT_SPHERES_FEATURES_NV, eAccelerationStructureGeometryLinearSweptSpheresDataNV = VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_LINEAR_SWEPT_SPHERES_DATA_NV, eAccelerationStructureGeometrySpheresDataNV = VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_SPHERES_DATA_NV, ePhysicalDeviceLinearColorAttachmentFeaturesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINEAR_COLOR_ATTACHMENT_FEATURES_NV, ePhysicalDeviceShaderMaximalReconvergenceFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_MAXIMAL_RECONVERGENCE_FEATURES_KHR, ePhysicalDeviceImageCompressionControlSwapchainFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_COMPRESSION_CONTROL_SWAPCHAIN_FEATURES_EXT, ePhysicalDeviceImageProcessingFeaturesQCOM = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_PROCESSING_FEATURES_QCOM, ePhysicalDeviceImageProcessingPropertiesQCOM = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_PROCESSING_PROPERTIES_QCOM, eImageViewSampleWeightCreateInfoQCOM = VK_STRUCTURE_TYPE_IMAGE_VIEW_SAMPLE_WEIGHT_CREATE_INFO_QCOM, ePhysicalDeviceNestedCommandBufferFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_NESTED_COMMAND_BUFFER_FEATURES_EXT, ePhysicalDeviceNestedCommandBufferPropertiesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_NESTED_COMMAND_BUFFER_PROPERTIES_EXT, eExternalMemoryAcquireUnmodifiedEXT = VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_ACQUIRE_UNMODIFIED_EXT, ePhysicalDeviceExtendedDynamicState3FeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_3_FEATURES_EXT, ePhysicalDeviceExtendedDynamicState3PropertiesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_3_PROPERTIES_EXT, ePhysicalDeviceSubpassMergeFeedbackFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBPASS_MERGE_FEEDBACK_FEATURES_EXT, eRenderPassCreationControlEXT = VK_STRUCTURE_TYPE_RENDER_PASS_CREATION_CONTROL_EXT, eRenderPassCreationFeedbackCreateInfoEXT = VK_STRUCTURE_TYPE_RENDER_PASS_CREATION_FEEDBACK_CREATE_INFO_EXT, eRenderPassSubpassFeedbackCreateInfoEXT = VK_STRUCTURE_TYPE_RENDER_PASS_SUBPASS_FEEDBACK_CREATE_INFO_EXT, eDirectDriverLoadingInfoLUNARG = VK_STRUCTURE_TYPE_DIRECT_DRIVER_LOADING_INFO_LUNARG, eDirectDriverLoadingListLUNARG = VK_STRUCTURE_TYPE_DIRECT_DRIVER_LOADING_LIST_LUNARG, ePhysicalDeviceShaderModuleIdentifierFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_MODULE_IDENTIFIER_FEATURES_EXT, ePhysicalDeviceShaderModuleIdentifierPropertiesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_MODULE_IDENTIFIER_PROPERTIES_EXT, ePipelineShaderStageModuleIdentifierCreateInfoEXT = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_MODULE_IDENTIFIER_CREATE_INFO_EXT, eShaderModuleIdentifierEXT = VK_STRUCTURE_TYPE_SHADER_MODULE_IDENTIFIER_EXT, ePhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_FEATURES_EXT, ePhysicalDeviceRasterizationOrderAttachmentAccessFeaturesARM = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_FEATURES_ARM, ePhysicalDeviceOpticalFlowFeaturesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_OPTICAL_FLOW_FEATURES_NV, ePhysicalDeviceOpticalFlowPropertiesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_OPTICAL_FLOW_PROPERTIES_NV, eOpticalFlowImageFormatInfoNV = VK_STRUCTURE_TYPE_OPTICAL_FLOW_IMAGE_FORMAT_INFO_NV, eOpticalFlowImageFormatPropertiesNV = VK_STRUCTURE_TYPE_OPTICAL_FLOW_IMAGE_FORMAT_PROPERTIES_NV, eOpticalFlowSessionCreateInfoNV = VK_STRUCTURE_TYPE_OPTICAL_FLOW_SESSION_CREATE_INFO_NV, eOpticalFlowExecuteInfoNV = VK_STRUCTURE_TYPE_OPTICAL_FLOW_EXECUTE_INFO_NV, eOpticalFlowSessionCreatePrivateDataInfoNV = VK_STRUCTURE_TYPE_OPTICAL_FLOW_SESSION_CREATE_PRIVATE_DATA_INFO_NV, ePhysicalDeviceLegacyDitheringFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LEGACY_DITHERING_FEATURES_EXT, #if defined( VK_USE_PLATFORM_ANDROID_KHR ) ePhysicalDeviceExternalFormatResolveFeaturesANDROID = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FORMAT_RESOLVE_FEATURES_ANDROID, ePhysicalDeviceExternalFormatResolvePropertiesANDROID = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FORMAT_RESOLVE_PROPERTIES_ANDROID, eAndroidHardwareBufferFormatResolvePropertiesANDROID = VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_FORMAT_RESOLVE_PROPERTIES_ANDROID, #endif /*VK_USE_PLATFORM_ANDROID_KHR*/ ePhysicalDeviceAntiLagFeaturesAMD = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ANTI_LAG_FEATURES_AMD, eAntiLagDataAMD = VK_STRUCTURE_TYPE_ANTI_LAG_DATA_AMD, eAntiLagPresentationInfoAMD = VK_STRUCTURE_TYPE_ANTI_LAG_PRESENTATION_INFO_AMD, ePhysicalDeviceRayTracingPositionFetchFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_POSITION_FETCH_FEATURES_KHR, ePhysicalDeviceShaderObjectFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_OBJECT_FEATURES_EXT, ePhysicalDeviceShaderObjectPropertiesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_OBJECT_PROPERTIES_EXT, eShaderCreateInfoEXT = VK_STRUCTURE_TYPE_SHADER_CREATE_INFO_EXT, ePhysicalDevicePipelineBinaryFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_BINARY_FEATURES_KHR, ePipelineBinaryCreateInfoKHR = VK_STRUCTURE_TYPE_PIPELINE_BINARY_CREATE_INFO_KHR, ePipelineBinaryInfoKHR = VK_STRUCTURE_TYPE_PIPELINE_BINARY_INFO_KHR, ePipelineBinaryKeyKHR = VK_STRUCTURE_TYPE_PIPELINE_BINARY_KEY_KHR, ePhysicalDevicePipelineBinaryPropertiesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_BINARY_PROPERTIES_KHR, eReleaseCapturedPipelineDataInfoKHR = VK_STRUCTURE_TYPE_RELEASE_CAPTURED_PIPELINE_DATA_INFO_KHR, ePipelineBinaryDataInfoKHR = VK_STRUCTURE_TYPE_PIPELINE_BINARY_DATA_INFO_KHR, ePipelineCreateInfoKHR = VK_STRUCTURE_TYPE_PIPELINE_CREATE_INFO_KHR, eDevicePipelineBinaryInternalCacheControlKHR = VK_STRUCTURE_TYPE_DEVICE_PIPELINE_BINARY_INTERNAL_CACHE_CONTROL_KHR, ePipelineBinaryHandlesInfoKHR = VK_STRUCTURE_TYPE_PIPELINE_BINARY_HANDLES_INFO_KHR, ePhysicalDeviceTilePropertiesFeaturesQCOM = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TILE_PROPERTIES_FEATURES_QCOM, eTilePropertiesQCOM = VK_STRUCTURE_TYPE_TILE_PROPERTIES_QCOM, ePhysicalDeviceAmigoProfilingFeaturesSEC = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_AMIGO_PROFILING_FEATURES_SEC, eAmigoProfilingSubmitInfoSEC = VK_STRUCTURE_TYPE_AMIGO_PROFILING_SUBMIT_INFO_SEC, ePhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_VIEWPORTS_FEATURES_QCOM, ePhysicalDeviceRayTracingInvocationReorderFeaturesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_INVOCATION_REORDER_FEATURES_NV, ePhysicalDeviceRayTracingInvocationReorderPropertiesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_INVOCATION_REORDER_PROPERTIES_NV, ePhysicalDeviceCooperativeVectorFeaturesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_VECTOR_FEATURES_NV, ePhysicalDeviceCooperativeVectorPropertiesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_VECTOR_PROPERTIES_NV, eCooperativeVectorPropertiesNV = VK_STRUCTURE_TYPE_COOPERATIVE_VECTOR_PROPERTIES_NV, eConvertCooperativeVectorMatrixInfoNV = VK_STRUCTURE_TYPE_CONVERT_COOPERATIVE_VECTOR_MATRIX_INFO_NV, ePhysicalDeviceExtendedSparseAddressSpaceFeaturesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_SPARSE_ADDRESS_SPACE_FEATURES_NV, ePhysicalDeviceExtendedSparseAddressSpacePropertiesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_SPARSE_ADDRESS_SPACE_PROPERTIES_NV, ePhysicalDeviceMutableDescriptorTypeFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MUTABLE_DESCRIPTOR_TYPE_FEATURES_EXT, ePhysicalDeviceMutableDescriptorTypeFeaturesVALVE = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MUTABLE_DESCRIPTOR_TYPE_FEATURES_VALVE, eMutableDescriptorTypeCreateInfoEXT = VK_STRUCTURE_TYPE_MUTABLE_DESCRIPTOR_TYPE_CREATE_INFO_EXT, eMutableDescriptorTypeCreateInfoVALVE = VK_STRUCTURE_TYPE_MUTABLE_DESCRIPTOR_TYPE_CREATE_INFO_VALVE, ePhysicalDeviceLegacyVertexAttributesFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LEGACY_VERTEX_ATTRIBUTES_FEATURES_EXT, ePhysicalDeviceLegacyVertexAttributesPropertiesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LEGACY_VERTEX_ATTRIBUTES_PROPERTIES_EXT, eLayerSettingsCreateInfoEXT = VK_STRUCTURE_TYPE_LAYER_SETTINGS_CREATE_INFO_EXT, ePhysicalDeviceShaderCoreBuiltinsFeaturesARM = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CORE_BUILTINS_FEATURES_ARM, ePhysicalDeviceShaderCoreBuiltinsPropertiesARM = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CORE_BUILTINS_PROPERTIES_ARM, ePhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_LIBRARY_GROUP_HANDLES_FEATURES_EXT, ePhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_UNUSED_ATTACHMENTS_FEATURES_EXT, eLatencySleepModeInfoNV = VK_STRUCTURE_TYPE_LATENCY_SLEEP_MODE_INFO_NV, eLatencySleepInfoNV = VK_STRUCTURE_TYPE_LATENCY_SLEEP_INFO_NV, eSetLatencyMarkerInfoNV = VK_STRUCTURE_TYPE_SET_LATENCY_MARKER_INFO_NV, eGetLatencyMarkerInfoNV = VK_STRUCTURE_TYPE_GET_LATENCY_MARKER_INFO_NV, eLatencyTimingsFrameReportNV = VK_STRUCTURE_TYPE_LATENCY_TIMINGS_FRAME_REPORT_NV, eLatencySubmissionPresentIdNV = VK_STRUCTURE_TYPE_LATENCY_SUBMISSION_PRESENT_ID_NV, eOutOfBandQueueTypeInfoNV = VK_STRUCTURE_TYPE_OUT_OF_BAND_QUEUE_TYPE_INFO_NV, eSwapchainLatencyCreateInfoNV = VK_STRUCTURE_TYPE_SWAPCHAIN_LATENCY_CREATE_INFO_NV, eLatencySurfaceCapabilitiesNV = VK_STRUCTURE_TYPE_LATENCY_SURFACE_CAPABILITIES_NV, ePhysicalDeviceCooperativeMatrixFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_FEATURES_KHR, eCooperativeMatrixPropertiesKHR = VK_STRUCTURE_TYPE_COOPERATIVE_MATRIX_PROPERTIES_KHR, ePhysicalDeviceCooperativeMatrixPropertiesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_PROPERTIES_KHR, ePhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_RENDER_AREAS_FEATURES_QCOM, eMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM = VK_STRUCTURE_TYPE_MULTIVIEW_PER_VIEW_RENDER_AREAS_RENDER_PASS_BEGIN_INFO_QCOM, ePhysicalDeviceComputeShaderDerivativesFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_FEATURES_KHR, ePhysicalDeviceComputeShaderDerivativesFeaturesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_FEATURES_NV, ePhysicalDeviceComputeShaderDerivativesPropertiesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_PROPERTIES_KHR, eVideoDecodeAv1CapabilitiesKHR = VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_CAPABILITIES_KHR, eVideoDecodeAv1PictureInfoKHR = VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_PICTURE_INFO_KHR, eVideoDecodeAv1ProfileInfoKHR = VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_PROFILE_INFO_KHR, eVideoDecodeAv1SessionParametersCreateInfoKHR = VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_SESSION_PARAMETERS_CREATE_INFO_KHR, eVideoDecodeAv1DpbSlotInfoKHR = VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_DPB_SLOT_INFO_KHR, eVideoEncodeAv1CapabilitiesKHR = VK_STRUCTURE_TYPE_VIDEO_ENCODE_AV1_CAPABILITIES_KHR, eVideoEncodeAv1SessionParametersCreateInfoKHR = VK_STRUCTURE_TYPE_VIDEO_ENCODE_AV1_SESSION_PARAMETERS_CREATE_INFO_KHR, eVideoEncodeAv1PictureInfoKHR = VK_STRUCTURE_TYPE_VIDEO_ENCODE_AV1_PICTURE_INFO_KHR, eVideoEncodeAv1DpbSlotInfoKHR = VK_STRUCTURE_TYPE_VIDEO_ENCODE_AV1_DPB_SLOT_INFO_KHR, ePhysicalDeviceVideoEncodeAv1FeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VIDEO_ENCODE_AV1_FEATURES_KHR, eVideoEncodeAv1ProfileInfoKHR = VK_STRUCTURE_TYPE_VIDEO_ENCODE_AV1_PROFILE_INFO_KHR, eVideoEncodeAv1RateControlInfoKHR = VK_STRUCTURE_TYPE_VIDEO_ENCODE_AV1_RATE_CONTROL_INFO_KHR, eVideoEncodeAv1RateControlLayerInfoKHR = VK_STRUCTURE_TYPE_VIDEO_ENCODE_AV1_RATE_CONTROL_LAYER_INFO_KHR, eVideoEncodeAv1QualityLevelPropertiesKHR = VK_STRUCTURE_TYPE_VIDEO_ENCODE_AV1_QUALITY_LEVEL_PROPERTIES_KHR, eVideoEncodeAv1SessionCreateInfoKHR = VK_STRUCTURE_TYPE_VIDEO_ENCODE_AV1_SESSION_CREATE_INFO_KHR, eVideoEncodeAv1GopRemainingFrameInfoKHR = VK_STRUCTURE_TYPE_VIDEO_ENCODE_AV1_GOP_REMAINING_FRAME_INFO_KHR, ePhysicalDeviceVideoMaintenance1FeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VIDEO_MAINTENANCE_1_FEATURES_KHR, eVideoInlineQueryInfoKHR = VK_STRUCTURE_TYPE_VIDEO_INLINE_QUERY_INFO_KHR, ePhysicalDevicePerStageDescriptorSetFeaturesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PER_STAGE_DESCRIPTOR_SET_FEATURES_NV, ePhysicalDeviceImageProcessing2FeaturesQCOM = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_PROCESSING_2_FEATURES_QCOM, ePhysicalDeviceImageProcessing2PropertiesQCOM = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_PROCESSING_2_PROPERTIES_QCOM, eSamplerBlockMatchWindowCreateInfoQCOM = VK_STRUCTURE_TYPE_SAMPLER_BLOCK_MATCH_WINDOW_CREATE_INFO_QCOM, eSamplerCubicWeightsCreateInfoQCOM = VK_STRUCTURE_TYPE_SAMPLER_CUBIC_WEIGHTS_CREATE_INFO_QCOM, ePhysicalDeviceCubicWeightsFeaturesQCOM = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUBIC_WEIGHTS_FEATURES_QCOM, eBlitImageCubicWeightsInfoQCOM = VK_STRUCTURE_TYPE_BLIT_IMAGE_CUBIC_WEIGHTS_INFO_QCOM, ePhysicalDeviceYcbcrDegammaFeaturesQCOM = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_YCBCR_DEGAMMA_FEATURES_QCOM, eSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM = VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_YCBCR_DEGAMMA_CREATE_INFO_QCOM, ePhysicalDeviceCubicClampFeaturesQCOM = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUBIC_CLAMP_FEATURES_QCOM, ePhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ATTACHMENT_FEEDBACK_LOOP_DYNAMIC_STATE_FEATURES_EXT, #if defined( VK_USE_PLATFORM_SCREEN_QNX ) eScreenBufferPropertiesQNX = VK_STRUCTURE_TYPE_SCREEN_BUFFER_PROPERTIES_QNX, eScreenBufferFormatPropertiesQNX = VK_STRUCTURE_TYPE_SCREEN_BUFFER_FORMAT_PROPERTIES_QNX, eImportScreenBufferInfoQNX = VK_STRUCTURE_TYPE_IMPORT_SCREEN_BUFFER_INFO_QNX, eExternalFormatQNX = VK_STRUCTURE_TYPE_EXTERNAL_FORMAT_QNX, ePhysicalDeviceExternalMemoryScreenBufferFeaturesQNX = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_MEMORY_SCREEN_BUFFER_FEATURES_QNX, #endif /*VK_USE_PLATFORM_SCREEN_QNX*/ ePhysicalDeviceLayeredDriverPropertiesMSFT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LAYERED_DRIVER_PROPERTIES_MSFT, eCalibratedTimestampInfoKHR = VK_STRUCTURE_TYPE_CALIBRATED_TIMESTAMP_INFO_KHR, eCalibratedTimestampInfoEXT = VK_STRUCTURE_TYPE_CALIBRATED_TIMESTAMP_INFO_EXT, eSetDescriptorBufferOffsetsInfoEXT = VK_STRUCTURE_TYPE_SET_DESCRIPTOR_BUFFER_OFFSETS_INFO_EXT, eBindDescriptorBufferEmbeddedSamplersInfoEXT = VK_STRUCTURE_TYPE_BIND_DESCRIPTOR_BUFFER_EMBEDDED_SAMPLERS_INFO_EXT, ePhysicalDeviceDescriptorPoolOverallocationFeaturesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_POOL_OVERALLOCATION_FEATURES_NV, eDisplaySurfaceStereoCreateInfoNV = VK_STRUCTURE_TYPE_DISPLAY_SURFACE_STEREO_CREATE_INFO_NV, eDisplayModeStereoPropertiesNV = VK_STRUCTURE_TYPE_DISPLAY_MODE_STEREO_PROPERTIES_NV, eVideoEncodeQuantizationMapCapabilitiesKHR = VK_STRUCTURE_TYPE_VIDEO_ENCODE_QUANTIZATION_MAP_CAPABILITIES_KHR, eVideoFormatQuantizationMapPropertiesKHR = VK_STRUCTURE_TYPE_VIDEO_FORMAT_QUANTIZATION_MAP_PROPERTIES_KHR, eVideoEncodeQuantizationMapInfoKHR = VK_STRUCTURE_TYPE_VIDEO_ENCODE_QUANTIZATION_MAP_INFO_KHR, eVideoEncodeQuantizationMapSessionParametersCreateInfoKHR = VK_STRUCTURE_TYPE_VIDEO_ENCODE_QUANTIZATION_MAP_SESSION_PARAMETERS_CREATE_INFO_KHR, ePhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VIDEO_ENCODE_QUANTIZATION_MAP_FEATURES_KHR, eVideoEncodeH264QuantizationMapCapabilitiesKHR = VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_QUANTIZATION_MAP_CAPABILITIES_KHR, eVideoEncodeH265QuantizationMapCapabilitiesKHR = VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_QUANTIZATION_MAP_CAPABILITIES_KHR, eVideoFormatH265QuantizationMapPropertiesKHR = VK_STRUCTURE_TYPE_VIDEO_FORMAT_H265_QUANTIZATION_MAP_PROPERTIES_KHR, eVideoEncodeAv1QuantizationMapCapabilitiesKHR = VK_STRUCTURE_TYPE_VIDEO_ENCODE_AV1_QUANTIZATION_MAP_CAPABILITIES_KHR, eVideoFormatAv1QuantizationMapPropertiesKHR = VK_STRUCTURE_TYPE_VIDEO_FORMAT_AV1_QUANTIZATION_MAP_PROPERTIES_KHR, ePhysicalDeviceRawAccessChainsFeaturesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAW_ACCESS_CHAINS_FEATURES_NV, ePhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_RELAXED_EXTENDED_INSTRUCTION_FEATURES_KHR, ePhysicalDeviceCommandBufferInheritanceFeaturesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COMMAND_BUFFER_INHERITANCE_FEATURES_NV, ePhysicalDeviceMaintenance7FeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_7_FEATURES_KHR, ePhysicalDeviceMaintenance7PropertiesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_7_PROPERTIES_KHR, ePhysicalDeviceLayeredApiPropertiesListKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LAYERED_API_PROPERTIES_LIST_KHR, ePhysicalDeviceLayeredApiPropertiesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LAYERED_API_PROPERTIES_KHR, ePhysicalDeviceLayeredApiVulkanPropertiesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LAYERED_API_VULKAN_PROPERTIES_KHR, ePhysicalDeviceShaderAtomicFloat16VectorFeaturesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT16_VECTOR_FEATURES_NV, ePhysicalDeviceShaderReplicatedCompositesFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_REPLICATED_COMPOSITES_FEATURES_EXT, ePhysicalDeviceRayTracingValidationFeaturesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_VALIDATION_FEATURES_NV, ePhysicalDeviceClusterAccelerationStructureFeaturesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CLUSTER_ACCELERATION_STRUCTURE_FEATURES_NV, ePhysicalDeviceClusterAccelerationStructurePropertiesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CLUSTER_ACCELERATION_STRUCTURE_PROPERTIES_NV, eClusterAccelerationStructureClustersBottomLevelInputNV = VK_STRUCTURE_TYPE_CLUSTER_ACCELERATION_STRUCTURE_CLUSTERS_BOTTOM_LEVEL_INPUT_NV, eClusterAccelerationStructureTriangleClusterInputNV = VK_STRUCTURE_TYPE_CLUSTER_ACCELERATION_STRUCTURE_TRIANGLE_CLUSTER_INPUT_NV, eClusterAccelerationStructureMoveObjectsInputNV = VK_STRUCTURE_TYPE_CLUSTER_ACCELERATION_STRUCTURE_MOVE_OBJECTS_INPUT_NV, eClusterAccelerationStructureInputInfoNV = VK_STRUCTURE_TYPE_CLUSTER_ACCELERATION_STRUCTURE_INPUT_INFO_NV, eClusterAccelerationStructureCommandsInfoNV = VK_STRUCTURE_TYPE_CLUSTER_ACCELERATION_STRUCTURE_COMMANDS_INFO_NV, eRayTracingPipelineClusterAccelerationStructureCreateInfoNV = VK_STRUCTURE_TYPE_RAY_TRACING_PIPELINE_CLUSTER_ACCELERATION_STRUCTURE_CREATE_INFO_NV, ePhysicalDevicePartitionedAccelerationStructureFeaturesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PARTITIONED_ACCELERATION_STRUCTURE_FEATURES_NV, ePhysicalDevicePartitionedAccelerationStructurePropertiesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PARTITIONED_ACCELERATION_STRUCTURE_PROPERTIES_NV, eWriteDescriptorSetPartitionedAccelerationStructureNV = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_PARTITIONED_ACCELERATION_STRUCTURE_NV, ePartitionedAccelerationStructureInstancesInputNV = VK_STRUCTURE_TYPE_PARTITIONED_ACCELERATION_STRUCTURE_INSTANCES_INPUT_NV, eBuildPartitionedAccelerationStructureInfoNV = VK_STRUCTURE_TYPE_BUILD_PARTITIONED_ACCELERATION_STRUCTURE_INFO_NV, ePartitionedAccelerationStructureFlagsNV = VK_STRUCTURE_TYPE_PARTITIONED_ACCELERATION_STRUCTURE_FLAGS_NV, ePhysicalDeviceDeviceGeneratedCommandsFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_GENERATED_COMMANDS_FEATURES_EXT, ePhysicalDeviceDeviceGeneratedCommandsPropertiesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_GENERATED_COMMANDS_PROPERTIES_EXT, eGeneratedCommandsMemoryRequirementsInfoEXT = VK_STRUCTURE_TYPE_GENERATED_COMMANDS_MEMORY_REQUIREMENTS_INFO_EXT, eIndirectExecutionSetCreateInfoEXT = VK_STRUCTURE_TYPE_INDIRECT_EXECUTION_SET_CREATE_INFO_EXT, eGeneratedCommandsInfoEXT = VK_STRUCTURE_TYPE_GENERATED_COMMANDS_INFO_EXT, eIndirectCommandsLayoutCreateInfoEXT = VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_EXT, eIndirectCommandsLayoutTokenEXT = VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_TOKEN_EXT, eWriteIndirectExecutionSetPipelineEXT = VK_STRUCTURE_TYPE_WRITE_INDIRECT_EXECUTION_SET_PIPELINE_EXT, eWriteIndirectExecutionSetShaderEXT = VK_STRUCTURE_TYPE_WRITE_INDIRECT_EXECUTION_SET_SHADER_EXT, eIndirectExecutionSetPipelineInfoEXT = VK_STRUCTURE_TYPE_INDIRECT_EXECUTION_SET_PIPELINE_INFO_EXT, eIndirectExecutionSetShaderInfoEXT = VK_STRUCTURE_TYPE_INDIRECT_EXECUTION_SET_SHADER_INFO_EXT, eIndirectExecutionSetShaderLayoutInfoEXT = VK_STRUCTURE_TYPE_INDIRECT_EXECUTION_SET_SHADER_LAYOUT_INFO_EXT, eGeneratedCommandsPipelineInfoEXT = VK_STRUCTURE_TYPE_GENERATED_COMMANDS_PIPELINE_INFO_EXT, eGeneratedCommandsShaderInfoEXT = VK_STRUCTURE_TYPE_GENERATED_COMMANDS_SHADER_INFO_EXT, ePhysicalDeviceMaintenance8FeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_8_FEATURES_KHR, eMemoryBarrierAccessFlags3KHR = VK_STRUCTURE_TYPE_MEMORY_BARRIER_ACCESS_FLAGS_3_KHR, ePhysicalDeviceImageAlignmentControlFeaturesMESA = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_ALIGNMENT_CONTROL_FEATURES_MESA, ePhysicalDeviceImageAlignmentControlPropertiesMESA = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_ALIGNMENT_CONTROL_PROPERTIES_MESA, eImageAlignmentControlCreateInfoMESA = VK_STRUCTURE_TYPE_IMAGE_ALIGNMENT_CONTROL_CREATE_INFO_MESA, ePhysicalDeviceDepthClampControlFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLAMP_CONTROL_FEATURES_EXT, ePipelineViewportDepthClampControlCreateInfoEXT = VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_DEPTH_CLAMP_CONTROL_CREATE_INFO_EXT, ePhysicalDeviceVideoMaintenance2FeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VIDEO_MAINTENANCE_2_FEATURES_KHR, eVideoDecodeH264InlineSessionParametersInfoKHR = VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_INLINE_SESSION_PARAMETERS_INFO_KHR, eVideoDecodeH265InlineSessionParametersInfoKHR = VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_INLINE_SESSION_PARAMETERS_INFO_KHR, eVideoDecodeAv1InlineSessionParametersInfoKHR = VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_INLINE_SESSION_PARAMETERS_INFO_KHR, ePhysicalDeviceHdrVividFeaturesHUAWEI = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HDR_VIVID_FEATURES_HUAWEI, eHdrVividDynamicMetadataHUAWEI = VK_STRUCTURE_TYPE_HDR_VIVID_DYNAMIC_METADATA_HUAWEI, ePhysicalDeviceCooperativeMatrix2FeaturesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_2_FEATURES_NV, eCooperativeMatrixFlexibleDimensionsPropertiesNV = VK_STRUCTURE_TYPE_COOPERATIVE_MATRIX_FLEXIBLE_DIMENSIONS_PROPERTIES_NV, ePhysicalDeviceCooperativeMatrix2PropertiesNV = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_2_PROPERTIES_NV, ePhysicalDevicePipelineOpacityMicromapFeaturesARM = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_OPACITY_MICROMAP_FEATURES_ARM, #if defined( VK_USE_PLATFORM_METAL_EXT ) eImportMemoryMetalHandleInfoEXT = VK_STRUCTURE_TYPE_IMPORT_MEMORY_METAL_HANDLE_INFO_EXT, eMemoryMetalHandlePropertiesEXT = VK_STRUCTURE_TYPE_MEMORY_METAL_HANDLE_PROPERTIES_EXT, eMemoryGetMetalHandleInfoEXT = VK_STRUCTURE_TYPE_MEMORY_GET_METAL_HANDLE_INFO_EXT, #endif /*VK_USE_PLATFORM_METAL_EXT*/ ePhysicalDeviceDepthClampZeroOneFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLAMP_ZERO_ONE_FEATURES_KHR, ePhysicalDeviceDepthClampZeroOneFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLAMP_ZERO_ONE_FEATURES_EXT, ePhysicalDeviceVertexAttributeRobustnessFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_ROBUSTNESS_FEATURES_EXT }; enum class PipelineCacheHeaderVersion { eOne = VK_PIPELINE_CACHE_HEADER_VERSION_ONE }; enum class ObjectType { eUnknown = VK_OBJECT_TYPE_UNKNOWN, eInstance = VK_OBJECT_TYPE_INSTANCE, ePhysicalDevice = VK_OBJECT_TYPE_PHYSICAL_DEVICE, eDevice = VK_OBJECT_TYPE_DEVICE, eQueue = VK_OBJECT_TYPE_QUEUE, eSemaphore = VK_OBJECT_TYPE_SEMAPHORE, eCommandBuffer = VK_OBJECT_TYPE_COMMAND_BUFFER, eFence = VK_OBJECT_TYPE_FENCE, eDeviceMemory = VK_OBJECT_TYPE_DEVICE_MEMORY, eBuffer = VK_OBJECT_TYPE_BUFFER, eImage = VK_OBJECT_TYPE_IMAGE, eEvent = VK_OBJECT_TYPE_EVENT, eQueryPool = VK_OBJECT_TYPE_QUERY_POOL, eBufferView = VK_OBJECT_TYPE_BUFFER_VIEW, eImageView = VK_OBJECT_TYPE_IMAGE_VIEW, eShaderModule = VK_OBJECT_TYPE_SHADER_MODULE, ePipelineCache = VK_OBJECT_TYPE_PIPELINE_CACHE, ePipelineLayout = VK_OBJECT_TYPE_PIPELINE_LAYOUT, eRenderPass = VK_OBJECT_TYPE_RENDER_PASS, ePipeline = VK_OBJECT_TYPE_PIPELINE, eDescriptorSetLayout = VK_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT, eSampler = VK_OBJECT_TYPE_SAMPLER, eDescriptorPool = VK_OBJECT_TYPE_DESCRIPTOR_POOL, eDescriptorSet = VK_OBJECT_TYPE_DESCRIPTOR_SET, eFramebuffer = VK_OBJECT_TYPE_FRAMEBUFFER, eCommandPool = VK_OBJECT_TYPE_COMMAND_POOL, eSamplerYcbcrConversion = VK_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION, eSamplerYcbcrConversionKHR = VK_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION_KHR, eDescriptorUpdateTemplate = VK_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE, eDescriptorUpdateTemplateKHR = VK_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_KHR, ePrivateDataSlot = VK_OBJECT_TYPE_PRIVATE_DATA_SLOT, ePrivateDataSlotEXT = VK_OBJECT_TYPE_PRIVATE_DATA_SLOT_EXT, eSurfaceKHR = VK_OBJECT_TYPE_SURFACE_KHR, eSwapchainKHR = VK_OBJECT_TYPE_SWAPCHAIN_KHR, eDisplayKHR = VK_OBJECT_TYPE_DISPLAY_KHR, eDisplayModeKHR = VK_OBJECT_TYPE_DISPLAY_MODE_KHR, eDebugReportCallbackEXT = VK_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT, eVideoSessionKHR = VK_OBJECT_TYPE_VIDEO_SESSION_KHR, eVideoSessionParametersKHR = VK_OBJECT_TYPE_VIDEO_SESSION_PARAMETERS_KHR, eCuModuleNVX = VK_OBJECT_TYPE_CU_MODULE_NVX, eCuFunctionNVX = VK_OBJECT_TYPE_CU_FUNCTION_NVX, eDebugUtilsMessengerEXT = VK_OBJECT_TYPE_DEBUG_UTILS_MESSENGER_EXT, eAccelerationStructureKHR = VK_OBJECT_TYPE_ACCELERATION_STRUCTURE_KHR, eValidationCacheEXT = VK_OBJECT_TYPE_VALIDATION_CACHE_EXT, eAccelerationStructureNV = VK_OBJECT_TYPE_ACCELERATION_STRUCTURE_NV, ePerformanceConfigurationINTEL = VK_OBJECT_TYPE_PERFORMANCE_CONFIGURATION_INTEL, eDeferredOperationKHR = VK_OBJECT_TYPE_DEFERRED_OPERATION_KHR, eIndirectCommandsLayoutNV = VK_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NV, #if defined( VK_ENABLE_BETA_EXTENSIONS ) eCudaModuleNV = VK_OBJECT_TYPE_CUDA_MODULE_NV, eCudaFunctionNV = VK_OBJECT_TYPE_CUDA_FUNCTION_NV, #endif /*VK_ENABLE_BETA_EXTENSIONS*/ #if defined( VK_USE_PLATFORM_FUCHSIA ) eBufferCollectionFUCHSIA = VK_OBJECT_TYPE_BUFFER_COLLECTION_FUCHSIA, #endif /*VK_USE_PLATFORM_FUCHSIA*/ eMicromapEXT = VK_OBJECT_TYPE_MICROMAP_EXT, eOpticalFlowSessionNV = VK_OBJECT_TYPE_OPTICAL_FLOW_SESSION_NV, eShaderEXT = VK_OBJECT_TYPE_SHADER_EXT, ePipelineBinaryKHR = VK_OBJECT_TYPE_PIPELINE_BINARY_KHR, eIndirectCommandsLayoutEXT = VK_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_EXT, eIndirectExecutionSetEXT = VK_OBJECT_TYPE_INDIRECT_EXECUTION_SET_EXT }; enum class VendorId { eKhronos = VK_VENDOR_ID_KHRONOS, eVIV = VK_VENDOR_ID_VIV, eVSI = VK_VENDOR_ID_VSI, eKazan = VK_VENDOR_ID_KAZAN, eCodeplay = VK_VENDOR_ID_CODEPLAY, eMESA = VK_VENDOR_ID_MESA, ePocl = VK_VENDOR_ID_POCL, eMobileye = VK_VENDOR_ID_MOBILEYE }; enum class Format { eUndefined = VK_FORMAT_UNDEFINED, eR4G4UnormPack8 = VK_FORMAT_R4G4_UNORM_PACK8, eR4G4B4A4UnormPack16 = VK_FORMAT_R4G4B4A4_UNORM_PACK16, eB4G4R4A4UnormPack16 = VK_FORMAT_B4G4R4A4_UNORM_PACK16, eR5G6B5UnormPack16 = VK_FORMAT_R5G6B5_UNORM_PACK16, eB5G6R5UnormPack16 = VK_FORMAT_B5G6R5_UNORM_PACK16, eR5G5B5A1UnormPack16 = VK_FORMAT_R5G5B5A1_UNORM_PACK16, eB5G5R5A1UnormPack16 = VK_FORMAT_B5G5R5A1_UNORM_PACK16, eA1R5G5B5UnormPack16 = VK_FORMAT_A1R5G5B5_UNORM_PACK16, eR8Unorm = VK_FORMAT_R8_UNORM, eR8Snorm = VK_FORMAT_R8_SNORM, eR8Uscaled = VK_FORMAT_R8_USCALED, eR8Sscaled = VK_FORMAT_R8_SSCALED, eR8Uint = VK_FORMAT_R8_UINT, eR8Sint = VK_FORMAT_R8_SINT, eR8Srgb = VK_FORMAT_R8_SRGB, eR8G8Unorm = VK_FORMAT_R8G8_UNORM, eR8G8Snorm = VK_FORMAT_R8G8_SNORM, eR8G8Uscaled = VK_FORMAT_R8G8_USCALED, eR8G8Sscaled = VK_FORMAT_R8G8_SSCALED, eR8G8Uint = VK_FORMAT_R8G8_UINT, eR8G8Sint = VK_FORMAT_R8G8_SINT, eR8G8Srgb = VK_FORMAT_R8G8_SRGB, eR8G8B8Unorm = VK_FORMAT_R8G8B8_UNORM, eR8G8B8Snorm = VK_FORMAT_R8G8B8_SNORM, eR8G8B8Uscaled = VK_FORMAT_R8G8B8_USCALED, eR8G8B8Sscaled = VK_FORMAT_R8G8B8_SSCALED, eR8G8B8Uint = VK_FORMAT_R8G8B8_UINT, eR8G8B8Sint = VK_FORMAT_R8G8B8_SINT, eR8G8B8Srgb = VK_FORMAT_R8G8B8_SRGB, eB8G8R8Unorm = VK_FORMAT_B8G8R8_UNORM, eB8G8R8Snorm = VK_FORMAT_B8G8R8_SNORM, eB8G8R8Uscaled = VK_FORMAT_B8G8R8_USCALED, eB8G8R8Sscaled = VK_FORMAT_B8G8R8_SSCALED, eB8G8R8Uint = VK_FORMAT_B8G8R8_UINT, eB8G8R8Sint = VK_FORMAT_B8G8R8_SINT, eB8G8R8Srgb = VK_FORMAT_B8G8R8_SRGB, eR8G8B8A8Unorm = VK_FORMAT_R8G8B8A8_UNORM, eR8G8B8A8Snorm = VK_FORMAT_R8G8B8A8_SNORM, eR8G8B8A8Uscaled = VK_FORMAT_R8G8B8A8_USCALED, eR8G8B8A8Sscaled = VK_FORMAT_R8G8B8A8_SSCALED, eR8G8B8A8Uint = VK_FORMAT_R8G8B8A8_UINT, eR8G8B8A8Sint = VK_FORMAT_R8G8B8A8_SINT, eR8G8B8A8Srgb = VK_FORMAT_R8G8B8A8_SRGB, eB8G8R8A8Unorm = VK_FORMAT_B8G8R8A8_UNORM, eB8G8R8A8Snorm = VK_FORMAT_B8G8R8A8_SNORM, eB8G8R8A8Uscaled = VK_FORMAT_B8G8R8A8_USCALED, eB8G8R8A8Sscaled = VK_FORMAT_B8G8R8A8_SSCALED, eB8G8R8A8Uint = VK_FORMAT_B8G8R8A8_UINT, eB8G8R8A8Sint = VK_FORMAT_B8G8R8A8_SINT, eB8G8R8A8Srgb = VK_FORMAT_B8G8R8A8_SRGB, eA8B8G8R8UnormPack32 = VK_FORMAT_A8B8G8R8_UNORM_PACK32, eA8B8G8R8SnormPack32 = VK_FORMAT_A8B8G8R8_SNORM_PACK32, eA8B8G8R8UscaledPack32 = VK_FORMAT_A8B8G8R8_USCALED_PACK32, eA8B8G8R8SscaledPack32 = VK_FORMAT_A8B8G8R8_SSCALED_PACK32, eA8B8G8R8UintPack32 = VK_FORMAT_A8B8G8R8_UINT_PACK32, eA8B8G8R8SintPack32 = VK_FORMAT_A8B8G8R8_SINT_PACK32, eA8B8G8R8SrgbPack32 = VK_FORMAT_A8B8G8R8_SRGB_PACK32, eA2R10G10B10UnormPack32 = VK_FORMAT_A2R10G10B10_UNORM_PACK32, eA2R10G10B10SnormPack32 = VK_FORMAT_A2R10G10B10_SNORM_PACK32, eA2R10G10B10UscaledPack32 = VK_FORMAT_A2R10G10B10_USCALED_PACK32, eA2R10G10B10SscaledPack32 = VK_FORMAT_A2R10G10B10_SSCALED_PACK32, eA2R10G10B10UintPack32 = VK_FORMAT_A2R10G10B10_UINT_PACK32, eA2R10G10B10SintPack32 = VK_FORMAT_A2R10G10B10_SINT_PACK32, eA2B10G10R10UnormPack32 = VK_FORMAT_A2B10G10R10_UNORM_PACK32, eA2B10G10R10SnormPack32 = VK_FORMAT_A2B10G10R10_SNORM_PACK32, eA2B10G10R10UscaledPack32 = VK_FORMAT_A2B10G10R10_USCALED_PACK32, eA2B10G10R10SscaledPack32 = VK_FORMAT_A2B10G10R10_SSCALED_PACK32, eA2B10G10R10UintPack32 = VK_FORMAT_A2B10G10R10_UINT_PACK32, eA2B10G10R10SintPack32 = VK_FORMAT_A2B10G10R10_SINT_PACK32, eR16Unorm = VK_FORMAT_R16_UNORM, eR16Snorm = VK_FORMAT_R16_SNORM, eR16Uscaled = VK_FORMAT_R16_USCALED, eR16Sscaled = VK_FORMAT_R16_SSCALED, eR16Uint = VK_FORMAT_R16_UINT, eR16Sint = VK_FORMAT_R16_SINT, eR16Sfloat = VK_FORMAT_R16_SFLOAT, eR16G16Unorm = VK_FORMAT_R16G16_UNORM, eR16G16Snorm = VK_FORMAT_R16G16_SNORM, eR16G16Uscaled = VK_FORMAT_R16G16_USCALED, eR16G16Sscaled = VK_FORMAT_R16G16_SSCALED, eR16G16Uint = VK_FORMAT_R16G16_UINT, eR16G16Sint = VK_FORMAT_R16G16_SINT, eR16G16Sfloat = VK_FORMAT_R16G16_SFLOAT, eR16G16B16Unorm = VK_FORMAT_R16G16B16_UNORM, eR16G16B16Snorm = VK_FORMAT_R16G16B16_SNORM, eR16G16B16Uscaled = VK_FORMAT_R16G16B16_USCALED, eR16G16B16Sscaled = VK_FORMAT_R16G16B16_SSCALED, eR16G16B16Uint = VK_FORMAT_R16G16B16_UINT, eR16G16B16Sint = VK_FORMAT_R16G16B16_SINT, eR16G16B16Sfloat = VK_FORMAT_R16G16B16_SFLOAT, eR16G16B16A16Unorm = VK_FORMAT_R16G16B16A16_UNORM, eR16G16B16A16Snorm = VK_FORMAT_R16G16B16A16_SNORM, eR16G16B16A16Uscaled = VK_FORMAT_R16G16B16A16_USCALED, eR16G16B16A16Sscaled = VK_FORMAT_R16G16B16A16_SSCALED, eR16G16B16A16Uint = VK_FORMAT_R16G16B16A16_UINT, eR16G16B16A16Sint = VK_FORMAT_R16G16B16A16_SINT, eR16G16B16A16Sfloat = VK_FORMAT_R16G16B16A16_SFLOAT, eR32Uint = VK_FORMAT_R32_UINT, eR32Sint = VK_FORMAT_R32_SINT, eR32Sfloat = VK_FORMAT_R32_SFLOAT, eR32G32Uint = VK_FORMAT_R32G32_UINT, eR32G32Sint = VK_FORMAT_R32G32_SINT, eR32G32Sfloat = VK_FORMAT_R32G32_SFLOAT, eR32G32B32Uint = VK_FORMAT_R32G32B32_UINT, eR32G32B32Sint = VK_FORMAT_R32G32B32_SINT, eR32G32B32Sfloat = VK_FORMAT_R32G32B32_SFLOAT, eR32G32B32A32Uint = VK_FORMAT_R32G32B32A32_UINT, eR32G32B32A32Sint = VK_FORMAT_R32G32B32A32_SINT, eR32G32B32A32Sfloat = VK_FORMAT_R32G32B32A32_SFLOAT, eR64Uint = VK_FORMAT_R64_UINT, eR64Sint = VK_FORMAT_R64_SINT, eR64Sfloat = VK_FORMAT_R64_SFLOAT, eR64G64Uint = VK_FORMAT_R64G64_UINT, eR64G64Sint = VK_FORMAT_R64G64_SINT, eR64G64Sfloat = VK_FORMAT_R64G64_SFLOAT, eR64G64B64Uint = VK_FORMAT_R64G64B64_UINT, eR64G64B64Sint = VK_FORMAT_R64G64B64_SINT, eR64G64B64Sfloat = VK_FORMAT_R64G64B64_SFLOAT, eR64G64B64A64Uint = VK_FORMAT_R64G64B64A64_UINT, eR64G64B64A64Sint = VK_FORMAT_R64G64B64A64_SINT, eR64G64B64A64Sfloat = VK_FORMAT_R64G64B64A64_SFLOAT, eB10G11R11UfloatPack32 = VK_FORMAT_B10G11R11_UFLOAT_PACK32, eE5B9G9R9UfloatPack32 = VK_FORMAT_E5B9G9R9_UFLOAT_PACK32, eD16Unorm = VK_FORMAT_D16_UNORM, eX8D24UnormPack32 = VK_FORMAT_X8_D24_UNORM_PACK32, eD32Sfloat = VK_FORMAT_D32_SFLOAT, eS8Uint = VK_FORMAT_S8_UINT, eD16UnormS8Uint = VK_FORMAT_D16_UNORM_S8_UINT, eD24UnormS8Uint = VK_FORMAT_D24_UNORM_S8_UINT, eD32SfloatS8Uint = VK_FORMAT_D32_SFLOAT_S8_UINT, eBc1RgbUnormBlock = VK_FORMAT_BC1_RGB_UNORM_BLOCK, eBc1RgbSrgbBlock = VK_FORMAT_BC1_RGB_SRGB_BLOCK, eBc1RgbaUnormBlock = VK_FORMAT_BC1_RGBA_UNORM_BLOCK, eBc1RgbaSrgbBlock = VK_FORMAT_BC1_RGBA_SRGB_BLOCK, eBc2UnormBlock = VK_FORMAT_BC2_UNORM_BLOCK, eBc2SrgbBlock = VK_FORMAT_BC2_SRGB_BLOCK, eBc3UnormBlock = VK_FORMAT_BC3_UNORM_BLOCK, eBc3SrgbBlock = VK_FORMAT_BC3_SRGB_BLOCK, eBc4UnormBlock = VK_FORMAT_BC4_UNORM_BLOCK, eBc4SnormBlock = VK_FORMAT_BC4_SNORM_BLOCK, eBc5UnormBlock = VK_FORMAT_BC5_UNORM_BLOCK, eBc5SnormBlock = VK_FORMAT_BC5_SNORM_BLOCK, eBc6HUfloatBlock = VK_FORMAT_BC6H_UFLOAT_BLOCK, eBc6HSfloatBlock = VK_FORMAT_BC6H_SFLOAT_BLOCK, eBc7UnormBlock = VK_FORMAT_BC7_UNORM_BLOCK, eBc7SrgbBlock = VK_FORMAT_BC7_SRGB_BLOCK, eEtc2R8G8B8UnormBlock = VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK, eEtc2R8G8B8SrgbBlock = VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK, eEtc2R8G8B8A1UnormBlock = VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK, eEtc2R8G8B8A1SrgbBlock = VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK, eEtc2R8G8B8A8UnormBlock = VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK, eEtc2R8G8B8A8SrgbBlock = VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK, eEacR11UnormBlock = VK_FORMAT_EAC_R11_UNORM_BLOCK, eEacR11SnormBlock = VK_FORMAT_EAC_R11_SNORM_BLOCK, eEacR11G11UnormBlock = VK_FORMAT_EAC_R11G11_UNORM_BLOCK, eEacR11G11SnormBlock = VK_FORMAT_EAC_R11G11_SNORM_BLOCK, eAstc4x4UnormBlock = VK_FORMAT_ASTC_4x4_UNORM_BLOCK, eAstc4x4SrgbBlock = VK_FORMAT_ASTC_4x4_SRGB_BLOCK, eAstc5x4UnormBlock = VK_FORMAT_ASTC_5x4_UNORM_BLOCK, eAstc5x4SrgbBlock = VK_FORMAT_ASTC_5x4_SRGB_BLOCK, eAstc5x5UnormBlock = VK_FORMAT_ASTC_5x5_UNORM_BLOCK, eAstc5x5SrgbBlock = VK_FORMAT_ASTC_5x5_SRGB_BLOCK, eAstc6x5UnormBlock = VK_FORMAT_ASTC_6x5_UNORM_BLOCK, eAstc6x5SrgbBlock = VK_FORMAT_ASTC_6x5_SRGB_BLOCK, eAstc6x6UnormBlock = VK_FORMAT_ASTC_6x6_UNORM_BLOCK, eAstc6x6SrgbBlock = VK_FORMAT_ASTC_6x6_SRGB_BLOCK, eAstc8x5UnormBlock = VK_FORMAT_ASTC_8x5_UNORM_BLOCK, eAstc8x5SrgbBlock = VK_FORMAT_ASTC_8x5_SRGB_BLOCK, eAstc8x6UnormBlock = VK_FORMAT_ASTC_8x6_UNORM_BLOCK, eAstc8x6SrgbBlock = VK_FORMAT_ASTC_8x6_SRGB_BLOCK, eAstc8x8UnormBlock = VK_FORMAT_ASTC_8x8_UNORM_BLOCK, eAstc8x8SrgbBlock = VK_FORMAT_ASTC_8x8_SRGB_BLOCK, eAstc10x5UnormBlock = VK_FORMAT_ASTC_10x5_UNORM_BLOCK, eAstc10x5SrgbBlock = VK_FORMAT_ASTC_10x5_SRGB_BLOCK, eAstc10x6UnormBlock = VK_FORMAT_ASTC_10x6_UNORM_BLOCK, eAstc10x6SrgbBlock = VK_FORMAT_ASTC_10x6_SRGB_BLOCK, eAstc10x8UnormBlock = VK_FORMAT_ASTC_10x8_UNORM_BLOCK, eAstc10x8SrgbBlock = VK_FORMAT_ASTC_10x8_SRGB_BLOCK, eAstc10x10UnormBlock = VK_FORMAT_ASTC_10x10_UNORM_BLOCK, eAstc10x10SrgbBlock = VK_FORMAT_ASTC_10x10_SRGB_BLOCK, eAstc12x10UnormBlock = VK_FORMAT_ASTC_12x10_UNORM_BLOCK, eAstc12x10SrgbBlock = VK_FORMAT_ASTC_12x10_SRGB_BLOCK, eAstc12x12UnormBlock = VK_FORMAT_ASTC_12x12_UNORM_BLOCK, eAstc12x12SrgbBlock = VK_FORMAT_ASTC_12x12_SRGB_BLOCK, eG8B8G8R8422Unorm = VK_FORMAT_G8B8G8R8_422_UNORM, eG8B8G8R8422UnormKHR = VK_FORMAT_G8B8G8R8_422_UNORM_KHR, eB8G8R8G8422Unorm = VK_FORMAT_B8G8R8G8_422_UNORM, eB8G8R8G8422UnormKHR = VK_FORMAT_B8G8R8G8_422_UNORM_KHR, eG8B8R83Plane420Unorm = VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM, eG8B8R83Plane420UnormKHR = VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM_KHR, eG8B8R82Plane420Unorm = VK_FORMAT_G8_B8R8_2PLANE_420_UNORM, eG8B8R82Plane420UnormKHR = VK_FORMAT_G8_B8R8_2PLANE_420_UNORM_KHR, eG8B8R83Plane422Unorm = VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM, eG8B8R83Plane422UnormKHR = VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM_KHR, eG8B8R82Plane422Unorm = VK_FORMAT_G8_B8R8_2PLANE_422_UNORM, eG8B8R82Plane422UnormKHR = VK_FORMAT_G8_B8R8_2PLANE_422_UNORM_KHR, eG8B8R83Plane444Unorm = VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM, eG8B8R83Plane444UnormKHR = VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM_KHR, eR10X6UnormPack16 = VK_FORMAT_R10X6_UNORM_PACK16, eR10X6UnormPack16KHR = VK_FORMAT_R10X6_UNORM_PACK16_KHR, eR10X6G10X6Unorm2Pack16 = VK_FORMAT_R10X6G10X6_UNORM_2PACK16, eR10X6G10X6Unorm2Pack16KHR = VK_FORMAT_R10X6G10X6_UNORM_2PACK16_KHR, eR10X6G10X6B10X6A10X6Unorm4Pack16 = VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16, eR10X6G10X6B10X6A10X6Unorm4Pack16KHR = VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16_KHR, eG10X6B10X6G10X6R10X6422Unorm4Pack16 = VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16, eG10X6B10X6G10X6R10X6422Unorm4Pack16KHR = VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16_KHR, eB10X6G10X6R10X6G10X6422Unorm4Pack16 = VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16, eB10X6G10X6R10X6G10X6422Unorm4Pack16KHR = VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16_KHR, eG10X6B10X6R10X63Plane420Unorm3Pack16 = VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16, eG10X6B10X6R10X63Plane420Unorm3Pack16KHR = VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16_KHR, eG10X6B10X6R10X62Plane420Unorm3Pack16 = VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16, eG10X6B10X6R10X62Plane420Unorm3Pack16KHR = VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16_KHR, eG10X6B10X6R10X63Plane422Unorm3Pack16 = VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16, eG10X6B10X6R10X63Plane422Unorm3Pack16KHR = VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16_KHR, eG10X6B10X6R10X62Plane422Unorm3Pack16 = VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16, eG10X6B10X6R10X62Plane422Unorm3Pack16KHR = VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16_KHR, eG10X6B10X6R10X63Plane444Unorm3Pack16 = VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16, eG10X6B10X6R10X63Plane444Unorm3Pack16KHR = VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16_KHR, eR12X4UnormPack16 = VK_FORMAT_R12X4_UNORM_PACK16, eR12X4UnormPack16KHR = VK_FORMAT_R12X4_UNORM_PACK16_KHR, eR12X4G12X4Unorm2Pack16 = VK_FORMAT_R12X4G12X4_UNORM_2PACK16, eR12X4G12X4Unorm2Pack16KHR = VK_FORMAT_R12X4G12X4_UNORM_2PACK16_KHR, eR12X4G12X4B12X4A12X4Unorm4Pack16 = VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16, eR12X4G12X4B12X4A12X4Unorm4Pack16KHR = VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16_KHR, eG12X4B12X4G12X4R12X4422Unorm4Pack16 = VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16, eG12X4B12X4G12X4R12X4422Unorm4Pack16KHR = VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16_KHR, eB12X4G12X4R12X4G12X4422Unorm4Pack16 = VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16, eB12X4G12X4R12X4G12X4422Unorm4Pack16KHR = VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16_KHR, eG12X4B12X4R12X43Plane420Unorm3Pack16 = VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16, eG12X4B12X4R12X43Plane420Unorm3Pack16KHR = VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16_KHR, eG12X4B12X4R12X42Plane420Unorm3Pack16 = VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16, eG12X4B12X4R12X42Plane420Unorm3Pack16KHR = VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16_KHR, eG12X4B12X4R12X43Plane422Unorm3Pack16 = VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16, eG12X4B12X4R12X43Plane422Unorm3Pack16KHR = VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16_KHR, eG12X4B12X4R12X42Plane422Unorm3Pack16 = VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16, eG12X4B12X4R12X42Plane422Unorm3Pack16KHR = VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16_KHR, eG12X4B12X4R12X43Plane444Unorm3Pack16 = VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16, eG12X4B12X4R12X43Plane444Unorm3Pack16KHR = VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16_KHR, eG16B16G16R16422Unorm = VK_FORMAT_G16B16G16R16_422_UNORM, eG16B16G16R16422UnormKHR = VK_FORMAT_G16B16G16R16_422_UNORM_KHR, eB16G16R16G16422Unorm = VK_FORMAT_B16G16R16G16_422_UNORM, eB16G16R16G16422UnormKHR = VK_FORMAT_B16G16R16G16_422_UNORM_KHR, eG16B16R163Plane420Unorm = VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM, eG16B16R163Plane420UnormKHR = VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM_KHR, eG16B16R162Plane420Unorm = VK_FORMAT_G16_B16R16_2PLANE_420_UNORM, eG16B16R162Plane420UnormKHR = VK_FORMAT_G16_B16R16_2PLANE_420_UNORM_KHR, eG16B16R163Plane422Unorm = VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM, eG16B16R163Plane422UnormKHR = VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM_KHR, eG16B16R162Plane422Unorm = VK_FORMAT_G16_B16R16_2PLANE_422_UNORM, eG16B16R162Plane422UnormKHR = VK_FORMAT_G16_B16R16_2PLANE_422_UNORM_KHR, eG16B16R163Plane444Unorm = VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM, eG16B16R163Plane444UnormKHR = VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM_KHR, eG8B8R82Plane444Unorm = VK_FORMAT_G8_B8R8_2PLANE_444_UNORM, eG8B8R82Plane444UnormEXT = VK_FORMAT_G8_B8R8_2PLANE_444_UNORM_EXT, eG10X6B10X6R10X62Plane444Unorm3Pack16 = VK_FORMAT_G10X6_B10X6R10X6_2PLANE_444_UNORM_3PACK16, eG10X6B10X6R10X62Plane444Unorm3Pack16EXT = VK_FORMAT_G10X6_B10X6R10X6_2PLANE_444_UNORM_3PACK16_EXT, eG12X4B12X4R12X42Plane444Unorm3Pack16 = VK_FORMAT_G12X4_B12X4R12X4_2PLANE_444_UNORM_3PACK16, eG12X4B12X4R12X42Plane444Unorm3Pack16EXT = VK_FORMAT_G12X4_B12X4R12X4_2PLANE_444_UNORM_3PACK16_EXT, eG16B16R162Plane444Unorm = VK_FORMAT_G16_B16R16_2PLANE_444_UNORM, eG16B16R162Plane444UnormEXT = VK_FORMAT_G16_B16R16_2PLANE_444_UNORM_EXT, eA4R4G4B4UnormPack16 = VK_FORMAT_A4R4G4B4_UNORM_PACK16, eA4R4G4B4UnormPack16EXT = VK_FORMAT_A4R4G4B4_UNORM_PACK16_EXT, eA4B4G4R4UnormPack16 = VK_FORMAT_A4B4G4R4_UNORM_PACK16, eA4B4G4R4UnormPack16EXT = VK_FORMAT_A4B4G4R4_UNORM_PACK16_EXT, eAstc4x4SfloatBlock = VK_FORMAT_ASTC_4x4_SFLOAT_BLOCK, eAstc4x4SfloatBlockEXT = VK_FORMAT_ASTC_4x4_SFLOAT_BLOCK_EXT, eAstc5x4SfloatBlock = VK_FORMAT_ASTC_5x4_SFLOAT_BLOCK, eAstc5x4SfloatBlockEXT = VK_FORMAT_ASTC_5x4_SFLOAT_BLOCK_EXT, eAstc5x5SfloatBlock = VK_FORMAT_ASTC_5x5_SFLOAT_BLOCK, eAstc5x5SfloatBlockEXT = VK_FORMAT_ASTC_5x5_SFLOAT_BLOCK_EXT, eAstc6x5SfloatBlock = VK_FORMAT_ASTC_6x5_SFLOAT_BLOCK, eAstc6x5SfloatBlockEXT = VK_FORMAT_ASTC_6x5_SFLOAT_BLOCK_EXT, eAstc6x6SfloatBlock = VK_FORMAT_ASTC_6x6_SFLOAT_BLOCK, eAstc6x6SfloatBlockEXT = VK_FORMAT_ASTC_6x6_SFLOAT_BLOCK_EXT, eAstc8x5SfloatBlock = VK_FORMAT_ASTC_8x5_SFLOAT_BLOCK, eAstc8x5SfloatBlockEXT = VK_FORMAT_ASTC_8x5_SFLOAT_BLOCK_EXT, eAstc8x6SfloatBlock = VK_FORMAT_ASTC_8x6_SFLOAT_BLOCK, eAstc8x6SfloatBlockEXT = VK_FORMAT_ASTC_8x6_SFLOAT_BLOCK_EXT, eAstc8x8SfloatBlock = VK_FORMAT_ASTC_8x8_SFLOAT_BLOCK, eAstc8x8SfloatBlockEXT = VK_FORMAT_ASTC_8x8_SFLOAT_BLOCK_EXT, eAstc10x5SfloatBlock = VK_FORMAT_ASTC_10x5_SFLOAT_BLOCK, eAstc10x5SfloatBlockEXT = VK_FORMAT_ASTC_10x5_SFLOAT_BLOCK_EXT, eAstc10x6SfloatBlock = VK_FORMAT_ASTC_10x6_SFLOAT_BLOCK, eAstc10x6SfloatBlockEXT = VK_FORMAT_ASTC_10x6_SFLOAT_BLOCK_EXT, eAstc10x8SfloatBlock = VK_FORMAT_ASTC_10x8_SFLOAT_BLOCK, eAstc10x8SfloatBlockEXT = VK_FORMAT_ASTC_10x8_SFLOAT_BLOCK_EXT, eAstc10x10SfloatBlock = VK_FORMAT_ASTC_10x10_SFLOAT_BLOCK, eAstc10x10SfloatBlockEXT = VK_FORMAT_ASTC_10x10_SFLOAT_BLOCK_EXT, eAstc12x10SfloatBlock = VK_FORMAT_ASTC_12x10_SFLOAT_BLOCK, eAstc12x10SfloatBlockEXT = VK_FORMAT_ASTC_12x10_SFLOAT_BLOCK_EXT, eAstc12x12SfloatBlock = VK_FORMAT_ASTC_12x12_SFLOAT_BLOCK, eAstc12x12SfloatBlockEXT = VK_FORMAT_ASTC_12x12_SFLOAT_BLOCK_EXT, eA1B5G5R5UnormPack16 = VK_FORMAT_A1B5G5R5_UNORM_PACK16, eA1B5G5R5UnormPack16KHR = VK_FORMAT_A1B5G5R5_UNORM_PACK16_KHR, eA8Unorm = VK_FORMAT_A8_UNORM, eA8UnormKHR = VK_FORMAT_A8_UNORM_KHR, ePvrtc12BppUnormBlockIMG = VK_FORMAT_PVRTC1_2BPP_UNORM_BLOCK_IMG, ePvrtc14BppUnormBlockIMG = VK_FORMAT_PVRTC1_4BPP_UNORM_BLOCK_IMG, ePvrtc22BppUnormBlockIMG = VK_FORMAT_PVRTC2_2BPP_UNORM_BLOCK_IMG, ePvrtc24BppUnormBlockIMG = VK_FORMAT_PVRTC2_4BPP_UNORM_BLOCK_IMG, ePvrtc12BppSrgbBlockIMG = VK_FORMAT_PVRTC1_2BPP_SRGB_BLOCK_IMG, ePvrtc14BppSrgbBlockIMG = VK_FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG, ePvrtc22BppSrgbBlockIMG = VK_FORMAT_PVRTC2_2BPP_SRGB_BLOCK_IMG, ePvrtc24BppSrgbBlockIMG = VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG, eR16G16Sfixed5NV = VK_FORMAT_R16G16_SFIXED5_NV, eR16G16S105NV = VK_FORMAT_R16G16_S10_5_NV }; enum class FormatFeatureFlagBits : VkFormatFeatureFlags { eSampledImage = VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT, eStorageImage = VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT, eStorageImageAtomic = VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT, eUniformTexelBuffer = VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT, eStorageTexelBuffer = VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT, eStorageTexelBufferAtomic = VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT, eVertexBuffer = VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT, eColorAttachment = VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT, eColorAttachmentBlend = VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT, eDepthStencilAttachment = VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT, eBlitSrc = VK_FORMAT_FEATURE_BLIT_SRC_BIT, eBlitDst = VK_FORMAT_FEATURE_BLIT_DST_BIT, eSampledImageFilterLinear = VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT, eTransferSrc = VK_FORMAT_FEATURE_TRANSFER_SRC_BIT, eTransferSrcKHR = VK_FORMAT_FEATURE_TRANSFER_SRC_BIT_KHR, eTransferDst = VK_FORMAT_FEATURE_TRANSFER_DST_BIT, eTransferDstKHR = VK_FORMAT_FEATURE_TRANSFER_DST_BIT_KHR, eMidpointChromaSamples = VK_FORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT, eMidpointChromaSamplesKHR = VK_FORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT_KHR, eSampledImageYcbcrConversionLinearFilter = VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT, eSampledImageYcbcrConversionLinearFilterKHR = VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT_KHR, eSampledImageYcbcrConversionSeparateReconstructionFilter = VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT, eSampledImageYcbcrConversionSeparateReconstructionFilterKHR = VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT_KHR, eSampledImageYcbcrConversionChromaReconstructionExplicit = VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_BIT, eSampledImageYcbcrConversionChromaReconstructionExplicitKHR = VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_BIT_KHR, eSampledImageYcbcrConversionChromaReconstructionExplicitForceable = VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT, eSampledImageYcbcrConversionChromaReconstructionExplicitForceableKHR = VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT_KHR, eDisjoint = VK_FORMAT_FEATURE_DISJOINT_BIT, eDisjointKHR = VK_FORMAT_FEATURE_DISJOINT_BIT_KHR, eCositedChromaSamples = VK_FORMAT_FEATURE_COSITED_CHROMA_SAMPLES_BIT, eCositedChromaSamplesKHR = VK_FORMAT_FEATURE_COSITED_CHROMA_SAMPLES_BIT_KHR, eSampledImageFilterMinmax = VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT, eSampledImageFilterMinmaxEXT = VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT_EXT, eVideoDecodeOutputKHR = VK_FORMAT_FEATURE_VIDEO_DECODE_OUTPUT_BIT_KHR, eVideoDecodeDpbKHR = VK_FORMAT_FEATURE_VIDEO_DECODE_DPB_BIT_KHR, eAccelerationStructureVertexBufferKHR = VK_FORMAT_FEATURE_ACCELERATION_STRUCTURE_VERTEX_BUFFER_BIT_KHR, eSampledImageFilterCubicEXT = VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT, eSampledImageFilterCubicIMG = VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_IMG, eFragmentDensityMapEXT = VK_FORMAT_FEATURE_FRAGMENT_DENSITY_MAP_BIT_EXT, eFragmentShadingRateAttachmentKHR = VK_FORMAT_FEATURE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR, eVideoEncodeInputKHR = VK_FORMAT_FEATURE_VIDEO_ENCODE_INPUT_BIT_KHR, eVideoEncodeDpbKHR = VK_FORMAT_FEATURE_VIDEO_ENCODE_DPB_BIT_KHR }; using FormatFeatureFlags = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR FormatFeatureFlags allFlags = FormatFeatureFlagBits::eSampledImage | FormatFeatureFlagBits::eStorageImage | FormatFeatureFlagBits::eStorageImageAtomic | FormatFeatureFlagBits::eUniformTexelBuffer | FormatFeatureFlagBits::eStorageTexelBuffer | FormatFeatureFlagBits::eStorageTexelBufferAtomic | FormatFeatureFlagBits::eVertexBuffer | FormatFeatureFlagBits::eColorAttachment | FormatFeatureFlagBits::eColorAttachmentBlend | FormatFeatureFlagBits::eDepthStencilAttachment | FormatFeatureFlagBits::eBlitSrc | FormatFeatureFlagBits::eBlitDst | FormatFeatureFlagBits::eSampledImageFilterLinear | FormatFeatureFlagBits::eTransferSrc | FormatFeatureFlagBits::eTransferDst | FormatFeatureFlagBits::eMidpointChromaSamples | FormatFeatureFlagBits::eSampledImageYcbcrConversionLinearFilter | FormatFeatureFlagBits::eSampledImageYcbcrConversionSeparateReconstructionFilter | FormatFeatureFlagBits::eSampledImageYcbcrConversionChromaReconstructionExplicit | FormatFeatureFlagBits::eSampledImageYcbcrConversionChromaReconstructionExplicitForceable | FormatFeatureFlagBits::eDisjoint | FormatFeatureFlagBits::eCositedChromaSamples | FormatFeatureFlagBits::eSampledImageFilterMinmax | FormatFeatureFlagBits::eVideoDecodeOutputKHR | FormatFeatureFlagBits::eVideoDecodeDpbKHR | FormatFeatureFlagBits::eAccelerationStructureVertexBufferKHR | FormatFeatureFlagBits::eSampledImageFilterCubicEXT | FormatFeatureFlagBits::eFragmentDensityMapEXT | FormatFeatureFlagBits::eFragmentShadingRateAttachmentKHR | FormatFeatureFlagBits::eVideoEncodeInputKHR | FormatFeatureFlagBits::eVideoEncodeDpbKHR; }; enum class ImageCreateFlagBits : VkImageCreateFlags { eSparseBinding = VK_IMAGE_CREATE_SPARSE_BINDING_BIT, eSparseResidency = VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT, eSparseAliased = VK_IMAGE_CREATE_SPARSE_ALIASED_BIT, eMutableFormat = VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT, eCubeCompatible = VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT, eAlias = VK_IMAGE_CREATE_ALIAS_BIT, eAliasKHR = VK_IMAGE_CREATE_ALIAS_BIT_KHR, eSplitInstanceBindRegions = VK_IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT, eSplitInstanceBindRegionsKHR = VK_IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT_KHR, e2DArrayCompatible = VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT, e2DArrayCompatibleKHR = VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT_KHR, eBlockTexelViewCompatible = VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT, eBlockTexelViewCompatibleKHR = VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT_KHR, eExtendedUsage = VK_IMAGE_CREATE_EXTENDED_USAGE_BIT, eExtendedUsageKHR = VK_IMAGE_CREATE_EXTENDED_USAGE_BIT_KHR, eProtected = VK_IMAGE_CREATE_PROTECTED_BIT, eDisjoint = VK_IMAGE_CREATE_DISJOINT_BIT, eDisjointKHR = VK_IMAGE_CREATE_DISJOINT_BIT_KHR, eCornerSampledNV = VK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NV, eSampleLocationsCompatibleDepthEXT = VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT, eSubsampledEXT = VK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT, eDescriptorBufferCaptureReplayEXT = VK_IMAGE_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT, eMultisampledRenderToSingleSampledEXT = VK_IMAGE_CREATE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_BIT_EXT, e2DViewCompatibleEXT = VK_IMAGE_CREATE_2D_VIEW_COMPATIBLE_BIT_EXT, eFragmentDensityMapOffsetQCOM = VK_IMAGE_CREATE_FRAGMENT_DENSITY_MAP_OFFSET_BIT_QCOM, eVideoProfileIndependentKHR = VK_IMAGE_CREATE_VIDEO_PROFILE_INDEPENDENT_BIT_KHR }; using ImageCreateFlags = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR ImageCreateFlags allFlags = ImageCreateFlagBits::eSparseBinding | ImageCreateFlagBits::eSparseResidency | ImageCreateFlagBits::eSparseAliased | ImageCreateFlagBits::eMutableFormat | ImageCreateFlagBits::eCubeCompatible | ImageCreateFlagBits::eAlias | ImageCreateFlagBits::eSplitInstanceBindRegions | ImageCreateFlagBits::e2DArrayCompatible | ImageCreateFlagBits::eBlockTexelViewCompatible | ImageCreateFlagBits::eExtendedUsage | ImageCreateFlagBits::eProtected | ImageCreateFlagBits::eDisjoint | ImageCreateFlagBits::eCornerSampledNV | ImageCreateFlagBits::eSampleLocationsCompatibleDepthEXT | ImageCreateFlagBits::eSubsampledEXT | ImageCreateFlagBits::eDescriptorBufferCaptureReplayEXT | ImageCreateFlagBits::eMultisampledRenderToSingleSampledEXT | ImageCreateFlagBits::e2DViewCompatibleEXT | ImageCreateFlagBits::eFragmentDensityMapOffsetQCOM | ImageCreateFlagBits::eVideoProfileIndependentKHR; }; enum class ImageTiling { eOptimal = VK_IMAGE_TILING_OPTIMAL, eLinear = VK_IMAGE_TILING_LINEAR, eDrmFormatModifierEXT = VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT }; enum class ImageType { e1D = VK_IMAGE_TYPE_1D, e2D = VK_IMAGE_TYPE_2D, e3D = VK_IMAGE_TYPE_3D }; enum class ImageUsageFlagBits : VkImageUsageFlags { eTransferSrc = VK_IMAGE_USAGE_TRANSFER_SRC_BIT, eTransferDst = VK_IMAGE_USAGE_TRANSFER_DST_BIT, eSampled = VK_IMAGE_USAGE_SAMPLED_BIT, eStorage = VK_IMAGE_USAGE_STORAGE_BIT, eColorAttachment = VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, eDepthStencilAttachment = VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, eTransientAttachment = VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT, eInputAttachment = VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT, eHostTransfer = VK_IMAGE_USAGE_HOST_TRANSFER_BIT, eHostTransferEXT = VK_IMAGE_USAGE_HOST_TRANSFER_BIT_EXT, eVideoDecodeDstKHR = VK_IMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHR, eVideoDecodeSrcKHR = VK_IMAGE_USAGE_VIDEO_DECODE_SRC_BIT_KHR, eVideoDecodeDpbKHR = VK_IMAGE_USAGE_VIDEO_DECODE_DPB_BIT_KHR, eFragmentDensityMapEXT = VK_IMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT, eFragmentShadingRateAttachmentKHR = VK_IMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR, eShadingRateImageNV = VK_IMAGE_USAGE_SHADING_RATE_IMAGE_BIT_NV, eVideoEncodeDstKHR = VK_IMAGE_USAGE_VIDEO_ENCODE_DST_BIT_KHR, eVideoEncodeSrcKHR = VK_IMAGE_USAGE_VIDEO_ENCODE_SRC_BIT_KHR, eVideoEncodeDpbKHR = VK_IMAGE_USAGE_VIDEO_ENCODE_DPB_BIT_KHR, eAttachmentFeedbackLoopEXT = VK_IMAGE_USAGE_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT, eInvocationMaskHUAWEI = VK_IMAGE_USAGE_INVOCATION_MASK_BIT_HUAWEI, eSampleWeightQCOM = VK_IMAGE_USAGE_SAMPLE_WEIGHT_BIT_QCOM, eSampleBlockMatchQCOM = VK_IMAGE_USAGE_SAMPLE_BLOCK_MATCH_BIT_QCOM, eVideoEncodeQuantizationDeltaMapKHR = VK_IMAGE_USAGE_VIDEO_ENCODE_QUANTIZATION_DELTA_MAP_BIT_KHR, eVideoEncodeEmphasisMapKHR = VK_IMAGE_USAGE_VIDEO_ENCODE_EMPHASIS_MAP_BIT_KHR }; using ImageUsageFlags = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR ImageUsageFlags allFlags = ImageUsageFlagBits::eTransferSrc | ImageUsageFlagBits::eTransferDst | ImageUsageFlagBits::eSampled | ImageUsageFlagBits::eStorage | ImageUsageFlagBits::eColorAttachment | ImageUsageFlagBits::eDepthStencilAttachment | ImageUsageFlagBits::eTransientAttachment | ImageUsageFlagBits::eInputAttachment | ImageUsageFlagBits::eHostTransfer | ImageUsageFlagBits::eVideoDecodeDstKHR | ImageUsageFlagBits::eVideoDecodeSrcKHR | ImageUsageFlagBits::eVideoDecodeDpbKHR | ImageUsageFlagBits::eFragmentDensityMapEXT | ImageUsageFlagBits::eFragmentShadingRateAttachmentKHR | ImageUsageFlagBits::eVideoEncodeDstKHR | ImageUsageFlagBits::eVideoEncodeSrcKHR | ImageUsageFlagBits::eVideoEncodeDpbKHR | ImageUsageFlagBits::eAttachmentFeedbackLoopEXT | ImageUsageFlagBits::eInvocationMaskHUAWEI | ImageUsageFlagBits::eSampleWeightQCOM | ImageUsageFlagBits::eSampleBlockMatchQCOM | ImageUsageFlagBits::eVideoEncodeQuantizationDeltaMapKHR | ImageUsageFlagBits::eVideoEncodeEmphasisMapKHR; }; enum class InstanceCreateFlagBits : VkInstanceCreateFlags { eEnumeratePortabilityKHR = VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR }; using InstanceCreateFlags = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR InstanceCreateFlags allFlags = InstanceCreateFlagBits::eEnumeratePortabilityKHR; }; enum class InternalAllocationType { eExecutable = VK_INTERNAL_ALLOCATION_TYPE_EXECUTABLE }; enum class MemoryHeapFlagBits : VkMemoryHeapFlags { eDeviceLocal = VK_MEMORY_HEAP_DEVICE_LOCAL_BIT, eMultiInstance = VK_MEMORY_HEAP_MULTI_INSTANCE_BIT, eMultiInstanceKHR = VK_MEMORY_HEAP_MULTI_INSTANCE_BIT_KHR }; using MemoryHeapFlags = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR MemoryHeapFlags allFlags = MemoryHeapFlagBits::eDeviceLocal | MemoryHeapFlagBits::eMultiInstance; }; enum class MemoryPropertyFlagBits : VkMemoryPropertyFlags { eDeviceLocal = VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT, eHostVisible = VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT, eHostCoherent = VK_MEMORY_PROPERTY_HOST_COHERENT_BIT, eHostCached = VK_MEMORY_PROPERTY_HOST_CACHED_BIT, eLazilyAllocated = VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT, eProtected = VK_MEMORY_PROPERTY_PROTECTED_BIT, eDeviceCoherentAMD = VK_MEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMD, eDeviceUncachedAMD = VK_MEMORY_PROPERTY_DEVICE_UNCACHED_BIT_AMD, eRdmaCapableNV = VK_MEMORY_PROPERTY_RDMA_CAPABLE_BIT_NV }; using MemoryPropertyFlags = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR MemoryPropertyFlags allFlags = MemoryPropertyFlagBits::eDeviceLocal | MemoryPropertyFlagBits::eHostVisible | MemoryPropertyFlagBits::eHostCoherent | MemoryPropertyFlagBits::eHostCached | MemoryPropertyFlagBits::eLazilyAllocated | MemoryPropertyFlagBits::eProtected | MemoryPropertyFlagBits::eDeviceCoherentAMD | MemoryPropertyFlagBits::eDeviceUncachedAMD | MemoryPropertyFlagBits::eRdmaCapableNV; }; enum class PhysicalDeviceType { eOther = VK_PHYSICAL_DEVICE_TYPE_OTHER, eIntegratedGpu = VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU, eDiscreteGpu = VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU, eVirtualGpu = VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU, eCpu = VK_PHYSICAL_DEVICE_TYPE_CPU }; enum class QueueFlagBits : VkQueueFlags { eGraphics = VK_QUEUE_GRAPHICS_BIT, eCompute = VK_QUEUE_COMPUTE_BIT, eTransfer = VK_QUEUE_TRANSFER_BIT, eSparseBinding = VK_QUEUE_SPARSE_BINDING_BIT, eProtected = VK_QUEUE_PROTECTED_BIT, eVideoDecodeKHR = VK_QUEUE_VIDEO_DECODE_BIT_KHR, eVideoEncodeKHR = VK_QUEUE_VIDEO_ENCODE_BIT_KHR, eOpticalFlowNV = VK_QUEUE_OPTICAL_FLOW_BIT_NV }; using QueueFlags = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR QueueFlags allFlags = QueueFlagBits::eGraphics | QueueFlagBits::eCompute | QueueFlagBits::eTransfer | QueueFlagBits::eSparseBinding | QueueFlagBits::eProtected | QueueFlagBits::eVideoDecodeKHR | QueueFlagBits::eVideoEncodeKHR | QueueFlagBits::eOpticalFlowNV; }; enum class SampleCountFlagBits : VkSampleCountFlags { e1 = VK_SAMPLE_COUNT_1_BIT, e2 = VK_SAMPLE_COUNT_2_BIT, e4 = VK_SAMPLE_COUNT_4_BIT, e8 = VK_SAMPLE_COUNT_8_BIT, e16 = VK_SAMPLE_COUNT_16_BIT, e32 = VK_SAMPLE_COUNT_32_BIT, e64 = VK_SAMPLE_COUNT_64_BIT }; using SampleCountFlags = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR SampleCountFlags allFlags = SampleCountFlagBits::e1 | SampleCountFlagBits::e2 | SampleCountFlagBits::e4 | SampleCountFlagBits::e8 | SampleCountFlagBits::e16 | SampleCountFlagBits::e32 | SampleCountFlagBits::e64; }; enum class SystemAllocationScope { eCommand = VK_SYSTEM_ALLOCATION_SCOPE_COMMAND, eObject = VK_SYSTEM_ALLOCATION_SCOPE_OBJECT, eCache = VK_SYSTEM_ALLOCATION_SCOPE_CACHE, eDevice = VK_SYSTEM_ALLOCATION_SCOPE_DEVICE, eInstance = VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE }; enum class DeviceCreateFlagBits : VkDeviceCreateFlags { }; using DeviceCreateFlags = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR DeviceCreateFlags allFlags = {}; }; enum class DeviceQueueCreateFlagBits : VkDeviceQueueCreateFlags { eProtected = VK_DEVICE_QUEUE_CREATE_PROTECTED_BIT }; using DeviceQueueCreateFlags = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR DeviceQueueCreateFlags allFlags = DeviceQueueCreateFlagBits::eProtected; }; enum class PipelineStageFlagBits : VkPipelineStageFlags { eTopOfPipe = VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, eDrawIndirect = VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT, eVertexInput = VK_PIPELINE_STAGE_VERTEX_INPUT_BIT, eVertexShader = VK_PIPELINE_STAGE_VERTEX_SHADER_BIT, eTessellationControlShader = VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT, eTessellationEvaluationShader = VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT, eGeometryShader = VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT, eFragmentShader = VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT, eEarlyFragmentTests = VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT, eLateFragmentTests = VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT, eColorAttachmentOutput = VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT, eComputeShader = VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT, eTransfer = VK_PIPELINE_STAGE_TRANSFER_BIT, eBottomOfPipe = VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT, eHost = VK_PIPELINE_STAGE_HOST_BIT, eAllGraphics = VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT, eAllCommands = VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, eNone = VK_PIPELINE_STAGE_NONE, eNoneKHR = VK_PIPELINE_STAGE_NONE_KHR, eTransformFeedbackEXT = VK_PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT, eConditionalRenderingEXT = VK_PIPELINE_STAGE_CONDITIONAL_RENDERING_BIT_EXT, eAccelerationStructureBuildKHR = VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR, eAccelerationStructureBuildNV = VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_NV, eRayTracingShaderKHR = VK_PIPELINE_STAGE_RAY_TRACING_SHADER_BIT_KHR, eRayTracingShaderNV = VK_PIPELINE_STAGE_RAY_TRACING_SHADER_BIT_NV, eFragmentDensityProcessEXT = VK_PIPELINE_STAGE_FRAGMENT_DENSITY_PROCESS_BIT_EXT, eFragmentShadingRateAttachmentKHR = VK_PIPELINE_STAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR, eShadingRateImageNV = VK_PIPELINE_STAGE_SHADING_RATE_IMAGE_BIT_NV, eCommandPreprocessNV = VK_PIPELINE_STAGE_COMMAND_PREPROCESS_BIT_NV, eCommandPreprocessEXT = VK_PIPELINE_STAGE_COMMAND_PREPROCESS_BIT_EXT, eTaskShaderEXT = VK_PIPELINE_STAGE_TASK_SHADER_BIT_EXT, eTaskShaderNV = VK_PIPELINE_STAGE_TASK_SHADER_BIT_NV, eMeshShaderEXT = VK_PIPELINE_STAGE_MESH_SHADER_BIT_EXT, eMeshShaderNV = VK_PIPELINE_STAGE_MESH_SHADER_BIT_NV }; using PipelineStageFlags = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR PipelineStageFlags allFlags = PipelineStageFlagBits::eTopOfPipe | PipelineStageFlagBits::eDrawIndirect | PipelineStageFlagBits::eVertexInput | PipelineStageFlagBits::eVertexShader | PipelineStageFlagBits::eTessellationControlShader | PipelineStageFlagBits::eTessellationEvaluationShader | PipelineStageFlagBits::eGeometryShader | PipelineStageFlagBits::eFragmentShader | PipelineStageFlagBits::eEarlyFragmentTests | PipelineStageFlagBits::eLateFragmentTests | PipelineStageFlagBits::eColorAttachmentOutput | PipelineStageFlagBits::eComputeShader | PipelineStageFlagBits::eTransfer | PipelineStageFlagBits::eBottomOfPipe | PipelineStageFlagBits::eHost | PipelineStageFlagBits::eAllGraphics | PipelineStageFlagBits::eAllCommands | PipelineStageFlagBits::eNone | PipelineStageFlagBits::eTransformFeedbackEXT | PipelineStageFlagBits::eConditionalRenderingEXT | PipelineStageFlagBits::eAccelerationStructureBuildKHR | PipelineStageFlagBits::eRayTracingShaderKHR | PipelineStageFlagBits::eFragmentDensityProcessEXT | PipelineStageFlagBits::eFragmentShadingRateAttachmentKHR | PipelineStageFlagBits::eCommandPreprocessNV | PipelineStageFlagBits::eTaskShaderEXT | PipelineStageFlagBits::eMeshShaderEXT; }; enum class MemoryMapFlagBits : VkMemoryMapFlags { ePlacedEXT = VK_MEMORY_MAP_PLACED_BIT_EXT }; using MemoryMapFlags = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR MemoryMapFlags allFlags = MemoryMapFlagBits::ePlacedEXT; }; enum class ImageAspectFlagBits : VkImageAspectFlags { eColor = VK_IMAGE_ASPECT_COLOR_BIT, eDepth = VK_IMAGE_ASPECT_DEPTH_BIT, eStencil = VK_IMAGE_ASPECT_STENCIL_BIT, eMetadata = VK_IMAGE_ASPECT_METADATA_BIT, ePlane0 = VK_IMAGE_ASPECT_PLANE_0_BIT, ePlane0KHR = VK_IMAGE_ASPECT_PLANE_0_BIT_KHR, ePlane1 = VK_IMAGE_ASPECT_PLANE_1_BIT, ePlane1KHR = VK_IMAGE_ASPECT_PLANE_1_BIT_KHR, ePlane2 = VK_IMAGE_ASPECT_PLANE_2_BIT, ePlane2KHR = VK_IMAGE_ASPECT_PLANE_2_BIT_KHR, eNone = VK_IMAGE_ASPECT_NONE, eNoneKHR = VK_IMAGE_ASPECT_NONE_KHR, eMemoryPlane0EXT = VK_IMAGE_ASPECT_MEMORY_PLANE_0_BIT_EXT, eMemoryPlane1EXT = VK_IMAGE_ASPECT_MEMORY_PLANE_1_BIT_EXT, eMemoryPlane2EXT = VK_IMAGE_ASPECT_MEMORY_PLANE_2_BIT_EXT, eMemoryPlane3EXT = VK_IMAGE_ASPECT_MEMORY_PLANE_3_BIT_EXT }; using ImageAspectFlags = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR ImageAspectFlags allFlags = ImageAspectFlagBits::eColor | ImageAspectFlagBits::eDepth | ImageAspectFlagBits::eStencil | ImageAspectFlagBits::eMetadata | ImageAspectFlagBits::ePlane0 | ImageAspectFlagBits::ePlane1 | ImageAspectFlagBits::ePlane2 | ImageAspectFlagBits::eNone | ImageAspectFlagBits::eMemoryPlane0EXT | ImageAspectFlagBits::eMemoryPlane1EXT | ImageAspectFlagBits::eMemoryPlane2EXT | ImageAspectFlagBits::eMemoryPlane3EXT; }; enum class SparseImageFormatFlagBits : VkSparseImageFormatFlags { eSingleMiptail = VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT, eAlignedMipSize = VK_SPARSE_IMAGE_FORMAT_ALIGNED_MIP_SIZE_BIT, eNonstandardBlockSize = VK_SPARSE_IMAGE_FORMAT_NONSTANDARD_BLOCK_SIZE_BIT }; using SparseImageFormatFlags = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR SparseImageFormatFlags allFlags = SparseImageFormatFlagBits::eSingleMiptail | SparseImageFormatFlagBits::eAlignedMipSize | SparseImageFormatFlagBits::eNonstandardBlockSize; }; enum class SparseMemoryBindFlagBits : VkSparseMemoryBindFlags { eMetadata = VK_SPARSE_MEMORY_BIND_METADATA_BIT }; using SparseMemoryBindFlags = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR SparseMemoryBindFlags allFlags = SparseMemoryBindFlagBits::eMetadata; }; enum class FenceCreateFlagBits : VkFenceCreateFlags { eSignaled = VK_FENCE_CREATE_SIGNALED_BIT }; using FenceCreateFlags = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR FenceCreateFlags allFlags = FenceCreateFlagBits::eSignaled; }; enum class SemaphoreCreateFlagBits : VkSemaphoreCreateFlags { }; using SemaphoreCreateFlags = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR SemaphoreCreateFlags allFlags = {}; }; enum class EventCreateFlagBits : VkEventCreateFlags { eDeviceOnly = VK_EVENT_CREATE_DEVICE_ONLY_BIT, eDeviceOnlyKHR = VK_EVENT_CREATE_DEVICE_ONLY_BIT_KHR }; using EventCreateFlags = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR EventCreateFlags allFlags = EventCreateFlagBits::eDeviceOnly; }; enum class QueryPipelineStatisticFlagBits : VkQueryPipelineStatisticFlags { eInputAssemblyVertices = VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_VERTICES_BIT, eInputAssemblyPrimitives = VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_PRIMITIVES_BIT, eVertexShaderInvocations = VK_QUERY_PIPELINE_STATISTIC_VERTEX_SHADER_INVOCATIONS_BIT, eGeometryShaderInvocations = VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_INVOCATIONS_BIT, eGeometryShaderPrimitives = VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_PRIMITIVES_BIT, eClippingInvocations = VK_QUERY_PIPELINE_STATISTIC_CLIPPING_INVOCATIONS_BIT, eClippingPrimitives = VK_QUERY_PIPELINE_STATISTIC_CLIPPING_PRIMITIVES_BIT, eFragmentShaderInvocations = VK_QUERY_PIPELINE_STATISTIC_FRAGMENT_SHADER_INVOCATIONS_BIT, eTessellationControlShaderPatches = VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_CONTROL_SHADER_PATCHES_BIT, eTessellationEvaluationShaderInvocations = VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_EVALUATION_SHADER_INVOCATIONS_BIT, eComputeShaderInvocations = VK_QUERY_PIPELINE_STATISTIC_COMPUTE_SHADER_INVOCATIONS_BIT, eTaskShaderInvocationsEXT = VK_QUERY_PIPELINE_STATISTIC_TASK_SHADER_INVOCATIONS_BIT_EXT, eMeshShaderInvocationsEXT = VK_QUERY_PIPELINE_STATISTIC_MESH_SHADER_INVOCATIONS_BIT_EXT, eClusterCullingShaderInvocationsHUAWEI = VK_QUERY_PIPELINE_STATISTIC_CLUSTER_CULLING_SHADER_INVOCATIONS_BIT_HUAWEI }; using QueryPipelineStatisticFlags = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR QueryPipelineStatisticFlags allFlags = QueryPipelineStatisticFlagBits::eInputAssemblyVertices | QueryPipelineStatisticFlagBits::eInputAssemblyPrimitives | QueryPipelineStatisticFlagBits::eVertexShaderInvocations | QueryPipelineStatisticFlagBits::eGeometryShaderInvocations | QueryPipelineStatisticFlagBits::eGeometryShaderPrimitives | QueryPipelineStatisticFlagBits::eClippingInvocations | QueryPipelineStatisticFlagBits::eClippingPrimitives | QueryPipelineStatisticFlagBits::eFragmentShaderInvocations | QueryPipelineStatisticFlagBits::eTessellationControlShaderPatches | QueryPipelineStatisticFlagBits::eTessellationEvaluationShaderInvocations | QueryPipelineStatisticFlagBits::eComputeShaderInvocations | QueryPipelineStatisticFlagBits::eTaskShaderInvocationsEXT | QueryPipelineStatisticFlagBits::eMeshShaderInvocationsEXT | QueryPipelineStatisticFlagBits::eClusterCullingShaderInvocationsHUAWEI; }; enum class QueryResultFlagBits : VkQueryResultFlags { e64 = VK_QUERY_RESULT_64_BIT, eWait = VK_QUERY_RESULT_WAIT_BIT, eWithAvailability = VK_QUERY_RESULT_WITH_AVAILABILITY_BIT, ePartial = VK_QUERY_RESULT_PARTIAL_BIT, eWithStatusKHR = VK_QUERY_RESULT_WITH_STATUS_BIT_KHR }; using QueryResultFlags = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR QueryResultFlags allFlags = QueryResultFlagBits::e64 | QueryResultFlagBits::eWait | QueryResultFlagBits::eWithAvailability | QueryResultFlagBits::ePartial | QueryResultFlagBits::eWithStatusKHR; }; enum class QueryType { eOcclusion = VK_QUERY_TYPE_OCCLUSION, ePipelineStatistics = VK_QUERY_TYPE_PIPELINE_STATISTICS, eTimestamp = VK_QUERY_TYPE_TIMESTAMP, eResultStatusOnlyKHR = VK_QUERY_TYPE_RESULT_STATUS_ONLY_KHR, eTransformFeedbackStreamEXT = VK_QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT, ePerformanceQueryKHR = VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR, eAccelerationStructureCompactedSizeKHR = VK_QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_KHR, eAccelerationStructureSerializationSizeKHR = VK_QUERY_TYPE_ACCELERATION_STRUCTURE_SERIALIZATION_SIZE_KHR, eAccelerationStructureCompactedSizeNV = VK_QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_NV, ePerformanceQueryINTEL = VK_QUERY_TYPE_PERFORMANCE_QUERY_INTEL, eVideoEncodeFeedbackKHR = VK_QUERY_TYPE_VIDEO_ENCODE_FEEDBACK_KHR, eMeshPrimitivesGeneratedEXT = VK_QUERY_TYPE_MESH_PRIMITIVES_GENERATED_EXT, ePrimitivesGeneratedEXT = VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT, eAccelerationStructureSerializationBottomLevelPointersKHR = VK_QUERY_TYPE_ACCELERATION_STRUCTURE_SERIALIZATION_BOTTOM_LEVEL_POINTERS_KHR, eAccelerationStructureSizeKHR = VK_QUERY_TYPE_ACCELERATION_STRUCTURE_SIZE_KHR, eMicromapSerializationSizeEXT = VK_QUERY_TYPE_MICROMAP_SERIALIZATION_SIZE_EXT, eMicromapCompactedSizeEXT = VK_QUERY_TYPE_MICROMAP_COMPACTED_SIZE_EXT }; enum class QueryPoolCreateFlagBits : VkQueryPoolCreateFlags { }; using QueryPoolCreateFlags = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR QueryPoolCreateFlags allFlags = {}; }; enum class BufferCreateFlagBits : VkBufferCreateFlags { eSparseBinding = VK_BUFFER_CREATE_SPARSE_BINDING_BIT, eSparseResidency = VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT, eSparseAliased = VK_BUFFER_CREATE_SPARSE_ALIASED_BIT, eProtected = VK_BUFFER_CREATE_PROTECTED_BIT, eDeviceAddressCaptureReplay = VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT, eDeviceAddressCaptureReplayEXT = VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_EXT, eDeviceAddressCaptureReplayKHR = VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_KHR, eDescriptorBufferCaptureReplayEXT = VK_BUFFER_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT, eVideoProfileIndependentKHR = VK_BUFFER_CREATE_VIDEO_PROFILE_INDEPENDENT_BIT_KHR }; using BufferCreateFlags = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR BufferCreateFlags allFlags = BufferCreateFlagBits::eSparseBinding | BufferCreateFlagBits::eSparseResidency | BufferCreateFlagBits::eSparseAliased | BufferCreateFlagBits::eProtected | BufferCreateFlagBits::eDeviceAddressCaptureReplay | BufferCreateFlagBits::eDescriptorBufferCaptureReplayEXT | BufferCreateFlagBits::eVideoProfileIndependentKHR; }; enum class BufferUsageFlagBits : VkBufferUsageFlags { eTransferSrc = VK_BUFFER_USAGE_TRANSFER_SRC_BIT, eTransferDst = VK_BUFFER_USAGE_TRANSFER_DST_BIT, eUniformTexelBuffer = VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT, eStorageTexelBuffer = VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT, eUniformBuffer = VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT, eStorageBuffer = VK_BUFFER_USAGE_STORAGE_BUFFER_BIT, eIndexBuffer = VK_BUFFER_USAGE_INDEX_BUFFER_BIT, eVertexBuffer = VK_BUFFER_USAGE_VERTEX_BUFFER_BIT, eIndirectBuffer = VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT, eShaderDeviceAddress = VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT, eShaderDeviceAddressEXT = VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT_EXT, eShaderDeviceAddressKHR = VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT_KHR, eVideoDecodeSrcKHR = VK_BUFFER_USAGE_VIDEO_DECODE_SRC_BIT_KHR, eVideoDecodeDstKHR = VK_BUFFER_USAGE_VIDEO_DECODE_DST_BIT_KHR, eTransformFeedbackBufferEXT = VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT, eTransformFeedbackCounterBufferEXT = VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_COUNTER_BUFFER_BIT_EXT, eConditionalRenderingEXT = VK_BUFFER_USAGE_CONDITIONAL_RENDERING_BIT_EXT, #if defined( VK_ENABLE_BETA_EXTENSIONS ) eExecutionGraphScratchAMDX = VK_BUFFER_USAGE_EXECUTION_GRAPH_SCRATCH_BIT_AMDX, #endif /*VK_ENABLE_BETA_EXTENSIONS*/ eAccelerationStructureBuildInputReadOnlyKHR = VK_BUFFER_USAGE_ACCELERATION_STRUCTURE_BUILD_INPUT_READ_ONLY_BIT_KHR, eAccelerationStructureStorageKHR = VK_BUFFER_USAGE_ACCELERATION_STRUCTURE_STORAGE_BIT_KHR, eShaderBindingTableKHR = VK_BUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHR, eRayTracingNV = VK_BUFFER_USAGE_RAY_TRACING_BIT_NV, eVideoEncodeDstKHR = VK_BUFFER_USAGE_VIDEO_ENCODE_DST_BIT_KHR, eVideoEncodeSrcKHR = VK_BUFFER_USAGE_VIDEO_ENCODE_SRC_BIT_KHR, eSamplerDescriptorBufferEXT = VK_BUFFER_USAGE_SAMPLER_DESCRIPTOR_BUFFER_BIT_EXT, eResourceDescriptorBufferEXT = VK_BUFFER_USAGE_RESOURCE_DESCRIPTOR_BUFFER_BIT_EXT, ePushDescriptorsDescriptorBufferEXT = VK_BUFFER_USAGE_PUSH_DESCRIPTORS_DESCRIPTOR_BUFFER_BIT_EXT, eMicromapBuildInputReadOnlyEXT = VK_BUFFER_USAGE_MICROMAP_BUILD_INPUT_READ_ONLY_BIT_EXT, eMicromapStorageEXT = VK_BUFFER_USAGE_MICROMAP_STORAGE_BIT_EXT }; using BufferUsageFlags = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR BufferUsageFlags allFlags = BufferUsageFlagBits::eTransferSrc | BufferUsageFlagBits::eTransferDst | BufferUsageFlagBits::eUniformTexelBuffer | BufferUsageFlagBits::eStorageTexelBuffer | BufferUsageFlagBits::eUniformBuffer | BufferUsageFlagBits::eStorageBuffer | BufferUsageFlagBits::eIndexBuffer | BufferUsageFlagBits::eVertexBuffer | BufferUsageFlagBits::eIndirectBuffer | BufferUsageFlagBits::eShaderDeviceAddress | BufferUsageFlagBits::eVideoDecodeSrcKHR | BufferUsageFlagBits::eVideoDecodeDstKHR | BufferUsageFlagBits::eTransformFeedbackBufferEXT | BufferUsageFlagBits::eTransformFeedbackCounterBufferEXT | BufferUsageFlagBits::eConditionalRenderingEXT #if defined( VK_ENABLE_BETA_EXTENSIONS ) | BufferUsageFlagBits::eExecutionGraphScratchAMDX #endif /*VK_ENABLE_BETA_EXTENSIONS*/ | BufferUsageFlagBits::eAccelerationStructureBuildInputReadOnlyKHR | BufferUsageFlagBits::eAccelerationStructureStorageKHR | BufferUsageFlagBits::eShaderBindingTableKHR | BufferUsageFlagBits::eVideoEncodeDstKHR | BufferUsageFlagBits::eVideoEncodeSrcKHR | BufferUsageFlagBits::eSamplerDescriptorBufferEXT | BufferUsageFlagBits::eResourceDescriptorBufferEXT | BufferUsageFlagBits::ePushDescriptorsDescriptorBufferEXT | BufferUsageFlagBits::eMicromapBuildInputReadOnlyEXT | BufferUsageFlagBits::eMicromapStorageEXT; }; enum class SharingMode { eExclusive = VK_SHARING_MODE_EXCLUSIVE, eConcurrent = VK_SHARING_MODE_CONCURRENT }; enum class BufferViewCreateFlagBits : VkBufferViewCreateFlags { }; using BufferViewCreateFlags = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR BufferViewCreateFlags allFlags = {}; }; enum class ImageLayout { eUndefined = VK_IMAGE_LAYOUT_UNDEFINED, eGeneral = VK_IMAGE_LAYOUT_GENERAL, eColorAttachmentOptimal = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL, eDepthStencilAttachmentOptimal = VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL, eDepthStencilReadOnlyOptimal = VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL, eShaderReadOnlyOptimal = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL, eTransferSrcOptimal = VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, eTransferDstOptimal = VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, ePreinitialized = VK_IMAGE_LAYOUT_PREINITIALIZED, eDepthReadOnlyStencilAttachmentOptimal = VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL, eDepthReadOnlyStencilAttachmentOptimalKHR = VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL_KHR, eDepthAttachmentStencilReadOnlyOptimal = VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL, eDepthAttachmentStencilReadOnlyOptimalKHR = VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL_KHR, eDepthAttachmentOptimal = VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL, eDepthAttachmentOptimalKHR = VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL_KHR, eDepthReadOnlyOptimal = VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL, eDepthReadOnlyOptimalKHR = VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL_KHR, eStencilAttachmentOptimal = VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL, eStencilAttachmentOptimalKHR = VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL_KHR, eStencilReadOnlyOptimal = VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL, eStencilReadOnlyOptimalKHR = VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL_KHR, eReadOnlyOptimal = VK_IMAGE_LAYOUT_READ_ONLY_OPTIMAL, eReadOnlyOptimalKHR = VK_IMAGE_LAYOUT_READ_ONLY_OPTIMAL_KHR, eAttachmentOptimal = VK_IMAGE_LAYOUT_ATTACHMENT_OPTIMAL, eAttachmentOptimalKHR = VK_IMAGE_LAYOUT_ATTACHMENT_OPTIMAL_KHR, eRenderingLocalRead = VK_IMAGE_LAYOUT_RENDERING_LOCAL_READ, eRenderingLocalReadKHR = VK_IMAGE_LAYOUT_RENDERING_LOCAL_READ_KHR, ePresentSrcKHR = VK_IMAGE_LAYOUT_PRESENT_SRC_KHR, eVideoDecodeDstKHR = VK_IMAGE_LAYOUT_VIDEO_DECODE_DST_KHR, eVideoDecodeSrcKHR = VK_IMAGE_LAYOUT_VIDEO_DECODE_SRC_KHR, eVideoDecodeDpbKHR = VK_IMAGE_LAYOUT_VIDEO_DECODE_DPB_KHR, eSharedPresentKHR = VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR, eFragmentDensityMapOptimalEXT = VK_IMAGE_LAYOUT_FRAGMENT_DENSITY_MAP_OPTIMAL_EXT, eFragmentShadingRateAttachmentOptimalKHR = VK_IMAGE_LAYOUT_FRAGMENT_SHADING_RATE_ATTACHMENT_OPTIMAL_KHR, eShadingRateOptimalNV = VK_IMAGE_LAYOUT_SHADING_RATE_OPTIMAL_NV, eVideoEncodeDstKHR = VK_IMAGE_LAYOUT_VIDEO_ENCODE_DST_KHR, eVideoEncodeSrcKHR = VK_IMAGE_LAYOUT_VIDEO_ENCODE_SRC_KHR, eVideoEncodeDpbKHR = VK_IMAGE_LAYOUT_VIDEO_ENCODE_DPB_KHR, eAttachmentFeedbackLoopOptimalEXT = VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT, eVideoEncodeQuantizationMapKHR = VK_IMAGE_LAYOUT_VIDEO_ENCODE_QUANTIZATION_MAP_KHR }; enum class ComponentSwizzle { eIdentity = VK_COMPONENT_SWIZZLE_IDENTITY, eZero = VK_COMPONENT_SWIZZLE_ZERO, eOne = VK_COMPONENT_SWIZZLE_ONE, eR = VK_COMPONENT_SWIZZLE_R, eG = VK_COMPONENT_SWIZZLE_G, eB = VK_COMPONENT_SWIZZLE_B, eA = VK_COMPONENT_SWIZZLE_A }; enum class ImageViewCreateFlagBits : VkImageViewCreateFlags { eFragmentDensityMapDynamicEXT = VK_IMAGE_VIEW_CREATE_FRAGMENT_DENSITY_MAP_DYNAMIC_BIT_EXT, eDescriptorBufferCaptureReplayEXT = VK_IMAGE_VIEW_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT, eFragmentDensityMapDeferredEXT = VK_IMAGE_VIEW_CREATE_FRAGMENT_DENSITY_MAP_DEFERRED_BIT_EXT }; using ImageViewCreateFlags = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR ImageViewCreateFlags allFlags = ImageViewCreateFlagBits::eFragmentDensityMapDynamicEXT | ImageViewCreateFlagBits::eDescriptorBufferCaptureReplayEXT | ImageViewCreateFlagBits::eFragmentDensityMapDeferredEXT; }; enum class ImageViewType { e1D = VK_IMAGE_VIEW_TYPE_1D, e2D = VK_IMAGE_VIEW_TYPE_2D, e3D = VK_IMAGE_VIEW_TYPE_3D, eCube = VK_IMAGE_VIEW_TYPE_CUBE, e1DArray = VK_IMAGE_VIEW_TYPE_1D_ARRAY, e2DArray = VK_IMAGE_VIEW_TYPE_2D_ARRAY, eCubeArray = VK_IMAGE_VIEW_TYPE_CUBE_ARRAY }; enum class ShaderModuleCreateFlagBits : VkShaderModuleCreateFlags { }; using ShaderModuleCreateFlags = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR ShaderModuleCreateFlags allFlags = {}; }; enum class PipelineCacheCreateFlagBits : VkPipelineCacheCreateFlags { eExternallySynchronized = VK_PIPELINE_CACHE_CREATE_EXTERNALLY_SYNCHRONIZED_BIT, eExternallySynchronizedEXT = VK_PIPELINE_CACHE_CREATE_EXTERNALLY_SYNCHRONIZED_BIT_EXT, eInternallySynchronizedMergeKHR = VK_PIPELINE_CACHE_CREATE_INTERNALLY_SYNCHRONIZED_MERGE_BIT_KHR }; using PipelineCacheCreateFlags = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR PipelineCacheCreateFlags allFlags = PipelineCacheCreateFlagBits::eExternallySynchronized | PipelineCacheCreateFlagBits::eInternallySynchronizedMergeKHR; }; enum class BlendFactor { eZero = VK_BLEND_FACTOR_ZERO, eOne = VK_BLEND_FACTOR_ONE, eSrcColor = VK_BLEND_FACTOR_SRC_COLOR, eOneMinusSrcColor = VK_BLEND_FACTOR_ONE_MINUS_SRC_COLOR, eDstColor = VK_BLEND_FACTOR_DST_COLOR, eOneMinusDstColor = VK_BLEND_FACTOR_ONE_MINUS_DST_COLOR, eSrcAlpha = VK_BLEND_FACTOR_SRC_ALPHA, eOneMinusSrcAlpha = VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA, eDstAlpha = VK_BLEND_FACTOR_DST_ALPHA, eOneMinusDstAlpha = VK_BLEND_FACTOR_ONE_MINUS_DST_ALPHA, eConstantColor = VK_BLEND_FACTOR_CONSTANT_COLOR, eOneMinusConstantColor = VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR, eConstantAlpha = VK_BLEND_FACTOR_CONSTANT_ALPHA, eOneMinusConstantAlpha = VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA, eSrcAlphaSaturate = VK_BLEND_FACTOR_SRC_ALPHA_SATURATE, eSrc1Color = VK_BLEND_FACTOR_SRC1_COLOR, eOneMinusSrc1Color = VK_BLEND_FACTOR_ONE_MINUS_SRC1_COLOR, eSrc1Alpha = VK_BLEND_FACTOR_SRC1_ALPHA, eOneMinusSrc1Alpha = VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA }; enum class BlendOp { eAdd = VK_BLEND_OP_ADD, eSubtract = VK_BLEND_OP_SUBTRACT, eReverseSubtract = VK_BLEND_OP_REVERSE_SUBTRACT, eMin = VK_BLEND_OP_MIN, eMax = VK_BLEND_OP_MAX, eZeroEXT = VK_BLEND_OP_ZERO_EXT, eSrcEXT = VK_BLEND_OP_SRC_EXT, eDstEXT = VK_BLEND_OP_DST_EXT, eSrcOverEXT = VK_BLEND_OP_SRC_OVER_EXT, eDstOverEXT = VK_BLEND_OP_DST_OVER_EXT, eSrcInEXT = VK_BLEND_OP_SRC_IN_EXT, eDstInEXT = VK_BLEND_OP_DST_IN_EXT, eSrcOutEXT = VK_BLEND_OP_SRC_OUT_EXT, eDstOutEXT = VK_BLEND_OP_DST_OUT_EXT, eSrcAtopEXT = VK_BLEND_OP_SRC_ATOP_EXT, eDstAtopEXT = VK_BLEND_OP_DST_ATOP_EXT, eXorEXT = VK_BLEND_OP_XOR_EXT, eMultiplyEXT = VK_BLEND_OP_MULTIPLY_EXT, eScreenEXT = VK_BLEND_OP_SCREEN_EXT, eOverlayEXT = VK_BLEND_OP_OVERLAY_EXT, eDarkenEXT = VK_BLEND_OP_DARKEN_EXT, eLightenEXT = VK_BLEND_OP_LIGHTEN_EXT, eColordodgeEXT = VK_BLEND_OP_COLORDODGE_EXT, eColorburnEXT = VK_BLEND_OP_COLORBURN_EXT, eHardlightEXT = VK_BLEND_OP_HARDLIGHT_EXT, eSoftlightEXT = VK_BLEND_OP_SOFTLIGHT_EXT, eDifferenceEXT = VK_BLEND_OP_DIFFERENCE_EXT, eExclusionEXT = VK_BLEND_OP_EXCLUSION_EXT, eInvertEXT = VK_BLEND_OP_INVERT_EXT, eInvertRgbEXT = VK_BLEND_OP_INVERT_RGB_EXT, eLineardodgeEXT = VK_BLEND_OP_LINEARDODGE_EXT, eLinearburnEXT = VK_BLEND_OP_LINEARBURN_EXT, eVividlightEXT = VK_BLEND_OP_VIVIDLIGHT_EXT, eLinearlightEXT = VK_BLEND_OP_LINEARLIGHT_EXT, ePinlightEXT = VK_BLEND_OP_PINLIGHT_EXT, eHardmixEXT = VK_BLEND_OP_HARDMIX_EXT, eHslHueEXT = VK_BLEND_OP_HSL_HUE_EXT, eHslSaturationEXT = VK_BLEND_OP_HSL_SATURATION_EXT, eHslColorEXT = VK_BLEND_OP_HSL_COLOR_EXT, eHslLuminosityEXT = VK_BLEND_OP_HSL_LUMINOSITY_EXT, ePlusEXT = VK_BLEND_OP_PLUS_EXT, ePlusClampedEXT = VK_BLEND_OP_PLUS_CLAMPED_EXT, ePlusClampedAlphaEXT = VK_BLEND_OP_PLUS_CLAMPED_ALPHA_EXT, ePlusDarkerEXT = VK_BLEND_OP_PLUS_DARKER_EXT, eMinusEXT = VK_BLEND_OP_MINUS_EXT, eMinusClampedEXT = VK_BLEND_OP_MINUS_CLAMPED_EXT, eContrastEXT = VK_BLEND_OP_CONTRAST_EXT, eInvertOvgEXT = VK_BLEND_OP_INVERT_OVG_EXT, eRedEXT = VK_BLEND_OP_RED_EXT, eGreenEXT = VK_BLEND_OP_GREEN_EXT, eBlueEXT = VK_BLEND_OP_BLUE_EXT }; enum class ColorComponentFlagBits : VkColorComponentFlags { eR = VK_COLOR_COMPONENT_R_BIT, eG = VK_COLOR_COMPONENT_G_BIT, eB = VK_COLOR_COMPONENT_B_BIT, eA = VK_COLOR_COMPONENT_A_BIT }; using ColorComponentFlags = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR ColorComponentFlags allFlags = ColorComponentFlagBits::eR | ColorComponentFlagBits::eG | ColorComponentFlagBits::eB | ColorComponentFlagBits::eA; }; enum class CompareOp { eNever = VK_COMPARE_OP_NEVER, eLess = VK_COMPARE_OP_LESS, eEqual = VK_COMPARE_OP_EQUAL, eLessOrEqual = VK_COMPARE_OP_LESS_OR_EQUAL, eGreater = VK_COMPARE_OP_GREATER, eNotEqual = VK_COMPARE_OP_NOT_EQUAL, eGreaterOrEqual = VK_COMPARE_OP_GREATER_OR_EQUAL, eAlways = VK_COMPARE_OP_ALWAYS }; enum class CullModeFlagBits : VkCullModeFlags { eNone = VK_CULL_MODE_NONE, eFront = VK_CULL_MODE_FRONT_BIT, eBack = VK_CULL_MODE_BACK_BIT, eFrontAndBack = VK_CULL_MODE_FRONT_AND_BACK }; using CullModeFlags = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR CullModeFlags allFlags = CullModeFlagBits::eNone | CullModeFlagBits::eFront | CullModeFlagBits::eBack | CullModeFlagBits::eFrontAndBack; }; enum class DynamicState { eViewport = VK_DYNAMIC_STATE_VIEWPORT, eScissor = VK_DYNAMIC_STATE_SCISSOR, eLineWidth = VK_DYNAMIC_STATE_LINE_WIDTH, eDepthBias = VK_DYNAMIC_STATE_DEPTH_BIAS, eBlendConstants = VK_DYNAMIC_STATE_BLEND_CONSTANTS, eDepthBounds = VK_DYNAMIC_STATE_DEPTH_BOUNDS, eStencilCompareMask = VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK, eStencilWriteMask = VK_DYNAMIC_STATE_STENCIL_WRITE_MASK, eStencilReference = VK_DYNAMIC_STATE_STENCIL_REFERENCE, eCullMode = VK_DYNAMIC_STATE_CULL_MODE, eCullModeEXT = VK_DYNAMIC_STATE_CULL_MODE_EXT, eFrontFace = VK_DYNAMIC_STATE_FRONT_FACE, eFrontFaceEXT = VK_DYNAMIC_STATE_FRONT_FACE_EXT, ePrimitiveTopology = VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY, ePrimitiveTopologyEXT = VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY_EXT, eViewportWithCount = VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT, eViewportWithCountEXT = VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT, eScissorWithCount = VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT, eScissorWithCountEXT = VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT_EXT, eVertexInputBindingStride = VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE, eVertexInputBindingStrideEXT = VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE_EXT, eDepthTestEnable = VK_DYNAMIC_STATE_DEPTH_TEST_ENABLE, eDepthTestEnableEXT = VK_DYNAMIC_STATE_DEPTH_TEST_ENABLE_EXT, eDepthWriteEnable = VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE, eDepthWriteEnableEXT = VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE_EXT, eDepthCompareOp = VK_DYNAMIC_STATE_DEPTH_COMPARE_OP, eDepthCompareOpEXT = VK_DYNAMIC_STATE_DEPTH_COMPARE_OP_EXT, eDepthBoundsTestEnable = VK_DYNAMIC_STATE_DEPTH_BOUNDS_TEST_ENABLE, eDepthBoundsTestEnableEXT = VK_DYNAMIC_STATE_DEPTH_BOUNDS_TEST_ENABLE_EXT, eStencilTestEnable = VK_DYNAMIC_STATE_STENCIL_TEST_ENABLE, eStencilTestEnableEXT = VK_DYNAMIC_STATE_STENCIL_TEST_ENABLE_EXT, eStencilOp = VK_DYNAMIC_STATE_STENCIL_OP, eStencilOpEXT = VK_DYNAMIC_STATE_STENCIL_OP_EXT, eRasterizerDiscardEnable = VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE, eRasterizerDiscardEnableEXT = VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE_EXT, eDepthBiasEnable = VK_DYNAMIC_STATE_DEPTH_BIAS_ENABLE, eDepthBiasEnableEXT = VK_DYNAMIC_STATE_DEPTH_BIAS_ENABLE_EXT, ePrimitiveRestartEnable = VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE, ePrimitiveRestartEnableEXT = VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE_EXT, eLineStipple = VK_DYNAMIC_STATE_LINE_STIPPLE, eLineStippleEXT = VK_DYNAMIC_STATE_LINE_STIPPLE_EXT, eLineStippleKHR = VK_DYNAMIC_STATE_LINE_STIPPLE_KHR, eViewportWScalingNV = VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV, eDiscardRectangleEXT = VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT, eDiscardRectangleEnableEXT = VK_DYNAMIC_STATE_DISCARD_RECTANGLE_ENABLE_EXT, eDiscardRectangleModeEXT = VK_DYNAMIC_STATE_DISCARD_RECTANGLE_MODE_EXT, eSampleLocationsEXT = VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT, eRayTracingPipelineStackSizeKHR = VK_DYNAMIC_STATE_RAY_TRACING_PIPELINE_STACK_SIZE_KHR, eViewportShadingRatePaletteNV = VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV, eViewportCoarseSampleOrderNV = VK_DYNAMIC_STATE_VIEWPORT_COARSE_SAMPLE_ORDER_NV, eExclusiveScissorEnableNV = VK_DYNAMIC_STATE_EXCLUSIVE_SCISSOR_ENABLE_NV, eExclusiveScissorNV = VK_DYNAMIC_STATE_EXCLUSIVE_SCISSOR_NV, eFragmentShadingRateKHR = VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR, eVertexInputEXT = VK_DYNAMIC_STATE_VERTEX_INPUT_EXT, ePatchControlPointsEXT = VK_DYNAMIC_STATE_PATCH_CONTROL_POINTS_EXT, eLogicOpEXT = VK_DYNAMIC_STATE_LOGIC_OP_EXT, eColorWriteEnableEXT = VK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXT, eDepthClampEnableEXT = VK_DYNAMIC_STATE_DEPTH_CLAMP_ENABLE_EXT, ePolygonModeEXT = VK_DYNAMIC_STATE_POLYGON_MODE_EXT, eRasterizationSamplesEXT = VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT, eSampleMaskEXT = VK_DYNAMIC_STATE_SAMPLE_MASK_EXT, eAlphaToCoverageEnableEXT = VK_DYNAMIC_STATE_ALPHA_TO_COVERAGE_ENABLE_EXT, eAlphaToOneEnableEXT = VK_DYNAMIC_STATE_ALPHA_TO_ONE_ENABLE_EXT, eLogicOpEnableEXT = VK_DYNAMIC_STATE_LOGIC_OP_ENABLE_EXT, eColorBlendEnableEXT = VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT, eColorBlendEquationEXT = VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT, eColorWriteMaskEXT = VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT, eTessellationDomainOriginEXT = VK_DYNAMIC_STATE_TESSELLATION_DOMAIN_ORIGIN_EXT, eRasterizationStreamEXT = VK_DYNAMIC_STATE_RASTERIZATION_STREAM_EXT, eConservativeRasterizationModeEXT = VK_DYNAMIC_STATE_CONSERVATIVE_RASTERIZATION_MODE_EXT, eExtraPrimitiveOverestimationSizeEXT = VK_DYNAMIC_STATE_EXTRA_PRIMITIVE_OVERESTIMATION_SIZE_EXT, eDepthClipEnableEXT = VK_DYNAMIC_STATE_DEPTH_CLIP_ENABLE_EXT, eSampleLocationsEnableEXT = VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT, eColorBlendAdvancedEXT = VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT, eProvokingVertexModeEXT = VK_DYNAMIC_STATE_PROVOKING_VERTEX_MODE_EXT, eLineRasterizationModeEXT = VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT, eLineStippleEnableEXT = VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT, eDepthClipNegativeOneToOneEXT = VK_DYNAMIC_STATE_DEPTH_CLIP_NEGATIVE_ONE_TO_ONE_EXT, eViewportWScalingEnableNV = VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_ENABLE_NV, eViewportSwizzleNV = VK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV, eCoverageToColorEnableNV = VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_ENABLE_NV, eCoverageToColorLocationNV = VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_LOCATION_NV, eCoverageModulationModeNV = VK_DYNAMIC_STATE_COVERAGE_MODULATION_MODE_NV, eCoverageModulationTableEnableNV = VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_ENABLE_NV, eCoverageModulationTableNV = VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_NV, eShadingRateImageEnableNV = VK_DYNAMIC_STATE_SHADING_RATE_IMAGE_ENABLE_NV, eRepresentativeFragmentTestEnableNV = VK_DYNAMIC_STATE_REPRESENTATIVE_FRAGMENT_TEST_ENABLE_NV, eCoverageReductionModeNV = VK_DYNAMIC_STATE_COVERAGE_REDUCTION_MODE_NV, eAttachmentFeedbackLoopEnableEXT = VK_DYNAMIC_STATE_ATTACHMENT_FEEDBACK_LOOP_ENABLE_EXT, eDepthClampRangeEXT = VK_DYNAMIC_STATE_DEPTH_CLAMP_RANGE_EXT }; enum class FrontFace { eCounterClockwise = VK_FRONT_FACE_COUNTER_CLOCKWISE, eClockwise = VK_FRONT_FACE_CLOCKWISE }; enum class LogicOp { eClear = VK_LOGIC_OP_CLEAR, eAnd = VK_LOGIC_OP_AND, eAndReverse = VK_LOGIC_OP_AND_REVERSE, eCopy = VK_LOGIC_OP_COPY, eAndInverted = VK_LOGIC_OP_AND_INVERTED, eNoOp = VK_LOGIC_OP_NO_OP, eXor = VK_LOGIC_OP_XOR, eOr = VK_LOGIC_OP_OR, eNor = VK_LOGIC_OP_NOR, eEquivalent = VK_LOGIC_OP_EQUIVALENT, eInvert = VK_LOGIC_OP_INVERT, eOrReverse = VK_LOGIC_OP_OR_REVERSE, eCopyInverted = VK_LOGIC_OP_COPY_INVERTED, eOrInverted = VK_LOGIC_OP_OR_INVERTED, eNand = VK_LOGIC_OP_NAND, eSet = VK_LOGIC_OP_SET }; enum class PipelineCreateFlagBits : VkPipelineCreateFlags { eDisableOptimization = VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT, eAllowDerivatives = VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT, eDerivative = VK_PIPELINE_CREATE_DERIVATIVE_BIT, eViewIndexFromDeviceIndex = VK_PIPELINE_CREATE_VIEW_INDEX_FROM_DEVICE_INDEX_BIT, eViewIndexFromDeviceIndexKHR = VK_PIPELINE_CREATE_VIEW_INDEX_FROM_DEVICE_INDEX_BIT_KHR, eDispatchBase = VK_PIPELINE_CREATE_DISPATCH_BASE_BIT, eDispatchBaseKHR = VK_PIPELINE_CREATE_DISPATCH_BASE_KHR, eFailOnPipelineCompileRequired = VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT, eFailOnPipelineCompileRequiredEXT = VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT_EXT, eEarlyReturnOnFailure = VK_PIPELINE_CREATE_EARLY_RETURN_ON_FAILURE_BIT, eEarlyReturnOnFailureEXT = VK_PIPELINE_CREATE_EARLY_RETURN_ON_FAILURE_BIT_EXT, eNoProtectedAccess = VK_PIPELINE_CREATE_NO_PROTECTED_ACCESS_BIT, eNoProtectedAccessEXT = VK_PIPELINE_CREATE_NO_PROTECTED_ACCESS_BIT_EXT, eProtectedAccessOnly = VK_PIPELINE_CREATE_PROTECTED_ACCESS_ONLY_BIT, eProtectedAccessOnlyEXT = VK_PIPELINE_CREATE_PROTECTED_ACCESS_ONLY_BIT_EXT, eRayTracingNoNullAnyHitShadersKHR = VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHR, eRayTracingNoNullClosestHitShadersKHR = VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR, eRayTracingNoNullMissShadersKHR = VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_MISS_SHADERS_BIT_KHR, eRayTracingNoNullIntersectionShadersKHR = VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR, eRayTracingSkipTrianglesKHR = VK_PIPELINE_CREATE_RAY_TRACING_SKIP_TRIANGLES_BIT_KHR, eRayTracingSkipAabbsKHR = VK_PIPELINE_CREATE_RAY_TRACING_SKIP_AABBS_BIT_KHR, eRayTracingShaderGroupHandleCaptureReplayKHR = VK_PIPELINE_CREATE_RAY_TRACING_SHADER_GROUP_HANDLE_CAPTURE_REPLAY_BIT_KHR, eDeferCompileNV = VK_PIPELINE_CREATE_DEFER_COMPILE_BIT_NV, eRenderingFragmentDensityMapAttachmentEXT = VK_PIPELINE_CREATE_RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT, eVkPipelineRasterizationStateCreateFragmentDensityMapAttachmentEXT = VK_PIPELINE_RASTERIZATION_STATE_CREATE_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT, eRenderingFragmentShadingRateAttachmentKHR = VK_PIPELINE_CREATE_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR, eVkPipelineRasterizationStateCreateFragmentShadingRateAttachmentKHR = VK_PIPELINE_RASTERIZATION_STATE_CREATE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR, eCaptureStatisticsKHR = VK_PIPELINE_CREATE_CAPTURE_STATISTICS_BIT_KHR, eCaptureInternalRepresentationsKHR = VK_PIPELINE_CREATE_CAPTURE_INTERNAL_REPRESENTATIONS_BIT_KHR, eIndirectBindableNV = VK_PIPELINE_CREATE_INDIRECT_BINDABLE_BIT_NV, eLibraryKHR = VK_PIPELINE_CREATE_LIBRARY_BIT_KHR, eDescriptorBufferEXT = VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, eRetainLinkTimeOptimizationInfoEXT = VK_PIPELINE_CREATE_RETAIN_LINK_TIME_OPTIMIZATION_INFO_BIT_EXT, eLinkTimeOptimizationEXT = VK_PIPELINE_CREATE_LINK_TIME_OPTIMIZATION_BIT_EXT, eRayTracingAllowMotionNV = VK_PIPELINE_CREATE_RAY_TRACING_ALLOW_MOTION_BIT_NV, eColorAttachmentFeedbackLoopEXT = VK_PIPELINE_CREATE_COLOR_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT, eDepthStencilAttachmentFeedbackLoopEXT = VK_PIPELINE_CREATE_DEPTH_STENCIL_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT, eRayTracingOpacityMicromapEXT = VK_PIPELINE_CREATE_RAY_TRACING_OPACITY_MICROMAP_BIT_EXT, #if defined( VK_ENABLE_BETA_EXTENSIONS ) eRayTracingDisplacementMicromapNV = VK_PIPELINE_CREATE_RAY_TRACING_DISPLACEMENT_MICROMAP_BIT_NV #endif /*VK_ENABLE_BETA_EXTENSIONS*/ }; using PipelineCreateFlags = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR PipelineCreateFlags allFlags = PipelineCreateFlagBits::eDisableOptimization | PipelineCreateFlagBits::eAllowDerivatives | PipelineCreateFlagBits::eDerivative | PipelineCreateFlagBits::eViewIndexFromDeviceIndex | PipelineCreateFlagBits::eDispatchBase | PipelineCreateFlagBits::eFailOnPipelineCompileRequired | PipelineCreateFlagBits::eEarlyReturnOnFailure | PipelineCreateFlagBits::eNoProtectedAccess | PipelineCreateFlagBits::eProtectedAccessOnly | PipelineCreateFlagBits::eRayTracingNoNullAnyHitShadersKHR | PipelineCreateFlagBits::eRayTracingNoNullClosestHitShadersKHR | PipelineCreateFlagBits::eRayTracingNoNullMissShadersKHR | PipelineCreateFlagBits::eRayTracingNoNullIntersectionShadersKHR | PipelineCreateFlagBits::eRayTracingSkipTrianglesKHR | PipelineCreateFlagBits::eRayTracingSkipAabbsKHR | PipelineCreateFlagBits::eRayTracingShaderGroupHandleCaptureReplayKHR | PipelineCreateFlagBits::eDeferCompileNV | PipelineCreateFlagBits::eRenderingFragmentDensityMapAttachmentEXT | PipelineCreateFlagBits::eRenderingFragmentShadingRateAttachmentKHR | PipelineCreateFlagBits::eCaptureStatisticsKHR | PipelineCreateFlagBits::eCaptureInternalRepresentationsKHR | PipelineCreateFlagBits::eIndirectBindableNV | PipelineCreateFlagBits::eLibraryKHR | PipelineCreateFlagBits::eDescriptorBufferEXT | PipelineCreateFlagBits::eRetainLinkTimeOptimizationInfoEXT | PipelineCreateFlagBits::eLinkTimeOptimizationEXT | PipelineCreateFlagBits::eRayTracingAllowMotionNV | PipelineCreateFlagBits::eColorAttachmentFeedbackLoopEXT | PipelineCreateFlagBits::eDepthStencilAttachmentFeedbackLoopEXT | PipelineCreateFlagBits::eRayTracingOpacityMicromapEXT #if defined( VK_ENABLE_BETA_EXTENSIONS ) | PipelineCreateFlagBits::eRayTracingDisplacementMicromapNV #endif /*VK_ENABLE_BETA_EXTENSIONS*/ ; }; enum class PipelineShaderStageCreateFlagBits : VkPipelineShaderStageCreateFlags { eAllowVaryingSubgroupSize = VK_PIPELINE_SHADER_STAGE_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT, eAllowVaryingSubgroupSizeEXT = VK_PIPELINE_SHADER_STAGE_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT_EXT, eRequireFullSubgroups = VK_PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT, eRequireFullSubgroupsEXT = VK_PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT_EXT }; using PipelineShaderStageCreateFlags = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR PipelineShaderStageCreateFlags allFlags = PipelineShaderStageCreateFlagBits::eAllowVaryingSubgroupSize | PipelineShaderStageCreateFlagBits::eRequireFullSubgroups; }; enum class PolygonMode { eFill = VK_POLYGON_MODE_FILL, eLine = VK_POLYGON_MODE_LINE, ePoint = VK_POLYGON_MODE_POINT, eFillRectangleNV = VK_POLYGON_MODE_FILL_RECTANGLE_NV }; enum class PrimitiveTopology { ePointList = VK_PRIMITIVE_TOPOLOGY_POINT_LIST, eLineList = VK_PRIMITIVE_TOPOLOGY_LINE_LIST, eLineStrip = VK_PRIMITIVE_TOPOLOGY_LINE_STRIP, eTriangleList = VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST, eTriangleStrip = VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP, eTriangleFan = VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN, eLineListWithAdjacency = VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY, eLineStripWithAdjacency = VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY, eTriangleListWithAdjacency = VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY, eTriangleStripWithAdjacency = VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY, ePatchList = VK_PRIMITIVE_TOPOLOGY_PATCH_LIST }; enum class ShaderStageFlagBits : VkShaderStageFlags { eVertex = VK_SHADER_STAGE_VERTEX_BIT, eTessellationControl = VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, eTessellationEvaluation = VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT, eGeometry = VK_SHADER_STAGE_GEOMETRY_BIT, eFragment = VK_SHADER_STAGE_FRAGMENT_BIT, eCompute = VK_SHADER_STAGE_COMPUTE_BIT, eAllGraphics = VK_SHADER_STAGE_ALL_GRAPHICS, eAll = VK_SHADER_STAGE_ALL, eRaygenKHR = VK_SHADER_STAGE_RAYGEN_BIT_KHR, eRaygenNV = VK_SHADER_STAGE_RAYGEN_BIT_NV, eAnyHitKHR = VK_SHADER_STAGE_ANY_HIT_BIT_KHR, eAnyHitNV = VK_SHADER_STAGE_ANY_HIT_BIT_NV, eClosestHitKHR = VK_SHADER_STAGE_CLOSEST_HIT_BIT_KHR, eClosestHitNV = VK_SHADER_STAGE_CLOSEST_HIT_BIT_NV, eMissKHR = VK_SHADER_STAGE_MISS_BIT_KHR, eMissNV = VK_SHADER_STAGE_MISS_BIT_NV, eIntersectionKHR = VK_SHADER_STAGE_INTERSECTION_BIT_KHR, eIntersectionNV = VK_SHADER_STAGE_INTERSECTION_BIT_NV, eCallableKHR = VK_SHADER_STAGE_CALLABLE_BIT_KHR, eCallableNV = VK_SHADER_STAGE_CALLABLE_BIT_NV, eTaskEXT = VK_SHADER_STAGE_TASK_BIT_EXT, eTaskNV = VK_SHADER_STAGE_TASK_BIT_NV, eMeshEXT = VK_SHADER_STAGE_MESH_BIT_EXT, eMeshNV = VK_SHADER_STAGE_MESH_BIT_NV, eSubpassShadingHUAWEI = VK_SHADER_STAGE_SUBPASS_SHADING_BIT_HUAWEI, eClusterCullingHUAWEI = VK_SHADER_STAGE_CLUSTER_CULLING_BIT_HUAWEI }; using ShaderStageFlags = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR ShaderStageFlags allFlags = ShaderStageFlagBits::eVertex | ShaderStageFlagBits::eTessellationControl | ShaderStageFlagBits::eTessellationEvaluation | ShaderStageFlagBits::eGeometry | ShaderStageFlagBits::eFragment | ShaderStageFlagBits::eCompute | ShaderStageFlagBits::eAllGraphics | ShaderStageFlagBits::eAll | ShaderStageFlagBits::eRaygenKHR | ShaderStageFlagBits::eAnyHitKHR | ShaderStageFlagBits::eClosestHitKHR | ShaderStageFlagBits::eMissKHR | ShaderStageFlagBits::eIntersectionKHR | ShaderStageFlagBits::eCallableKHR | ShaderStageFlagBits::eTaskEXT | ShaderStageFlagBits::eMeshEXT | ShaderStageFlagBits::eSubpassShadingHUAWEI | ShaderStageFlagBits::eClusterCullingHUAWEI; }; enum class StencilOp { eKeep = VK_STENCIL_OP_KEEP, eZero = VK_STENCIL_OP_ZERO, eReplace = VK_STENCIL_OP_REPLACE, eIncrementAndClamp = VK_STENCIL_OP_INCREMENT_AND_CLAMP, eDecrementAndClamp = VK_STENCIL_OP_DECREMENT_AND_CLAMP, eInvert = VK_STENCIL_OP_INVERT, eIncrementAndWrap = VK_STENCIL_OP_INCREMENT_AND_WRAP, eDecrementAndWrap = VK_STENCIL_OP_DECREMENT_AND_WRAP }; enum class VertexInputRate { eVertex = VK_VERTEX_INPUT_RATE_VERTEX, eInstance = VK_VERTEX_INPUT_RATE_INSTANCE }; enum class PipelineColorBlendStateCreateFlagBits : VkPipelineColorBlendStateCreateFlags { eRasterizationOrderAttachmentAccessEXT = VK_PIPELINE_COLOR_BLEND_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_BIT_EXT, eRasterizationOrderAttachmentAccessARM = VK_PIPELINE_COLOR_BLEND_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_BIT_ARM }; using PipelineColorBlendStateCreateFlags = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR PipelineColorBlendStateCreateFlags allFlags = PipelineColorBlendStateCreateFlagBits::eRasterizationOrderAttachmentAccessEXT; }; enum class PipelineDepthStencilStateCreateFlagBits : VkPipelineDepthStencilStateCreateFlags { eRasterizationOrderAttachmentDepthAccessEXT = VK_PIPELINE_DEPTH_STENCIL_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_DEPTH_ACCESS_BIT_EXT, eRasterizationOrderAttachmentDepthAccessARM = VK_PIPELINE_DEPTH_STENCIL_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_DEPTH_ACCESS_BIT_ARM, eRasterizationOrderAttachmentStencilAccessEXT = VK_PIPELINE_DEPTH_STENCIL_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_STENCIL_ACCESS_BIT_EXT, eRasterizationOrderAttachmentStencilAccessARM = VK_PIPELINE_DEPTH_STENCIL_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_STENCIL_ACCESS_BIT_ARM }; using PipelineDepthStencilStateCreateFlags = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR PipelineDepthStencilStateCreateFlags allFlags = PipelineDepthStencilStateCreateFlagBits::eRasterizationOrderAttachmentDepthAccessEXT | PipelineDepthStencilStateCreateFlagBits::eRasterizationOrderAttachmentStencilAccessEXT; }; enum class PipelineDynamicStateCreateFlagBits : VkPipelineDynamicStateCreateFlags { }; using PipelineDynamicStateCreateFlags = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR PipelineDynamicStateCreateFlags allFlags = {}; }; enum class PipelineInputAssemblyStateCreateFlagBits : VkPipelineInputAssemblyStateCreateFlags { }; using PipelineInputAssemblyStateCreateFlags = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR PipelineInputAssemblyStateCreateFlags allFlags = {}; }; enum class PipelineLayoutCreateFlagBits : VkPipelineLayoutCreateFlags { eIndependentSetsEXT = VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT }; using PipelineLayoutCreateFlags = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR PipelineLayoutCreateFlags allFlags = PipelineLayoutCreateFlagBits::eIndependentSetsEXT; }; enum class PipelineMultisampleStateCreateFlagBits : VkPipelineMultisampleStateCreateFlags { }; using PipelineMultisampleStateCreateFlags = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR PipelineMultisampleStateCreateFlags allFlags = {}; }; enum class PipelineRasterizationStateCreateFlagBits : VkPipelineRasterizationStateCreateFlags { }; using PipelineRasterizationStateCreateFlags = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR PipelineRasterizationStateCreateFlags allFlags = {}; }; enum class PipelineTessellationStateCreateFlagBits : VkPipelineTessellationStateCreateFlags { }; using PipelineTessellationStateCreateFlags = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR PipelineTessellationStateCreateFlags allFlags = {}; }; enum class PipelineVertexInputStateCreateFlagBits : VkPipelineVertexInputStateCreateFlags { }; using PipelineVertexInputStateCreateFlags = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR PipelineVertexInputStateCreateFlags allFlags = {}; }; enum class PipelineViewportStateCreateFlagBits : VkPipelineViewportStateCreateFlags { }; using PipelineViewportStateCreateFlags = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR PipelineViewportStateCreateFlags allFlags = {}; }; enum class BorderColor { eFloatTransparentBlack = VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK, eIntTransparentBlack = VK_BORDER_COLOR_INT_TRANSPARENT_BLACK, eFloatOpaqueBlack = VK_BORDER_COLOR_FLOAT_OPAQUE_BLACK, eIntOpaqueBlack = VK_BORDER_COLOR_INT_OPAQUE_BLACK, eFloatOpaqueWhite = VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE, eIntOpaqueWhite = VK_BORDER_COLOR_INT_OPAQUE_WHITE, eFloatCustomEXT = VK_BORDER_COLOR_FLOAT_CUSTOM_EXT, eIntCustomEXT = VK_BORDER_COLOR_INT_CUSTOM_EXT }; enum class Filter { eNearest = VK_FILTER_NEAREST, eLinear = VK_FILTER_LINEAR, eCubicEXT = VK_FILTER_CUBIC_EXT, eCubicIMG = VK_FILTER_CUBIC_IMG }; enum class SamplerAddressMode { eRepeat = VK_SAMPLER_ADDRESS_MODE_REPEAT, eMirroredRepeat = VK_SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT, eClampToEdge = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE, eClampToBorder = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER, eMirrorClampToEdge = VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE, eMirrorClampToEdgeKHR = VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE_KHR }; enum class SamplerCreateFlagBits : VkSamplerCreateFlags { eSubsampledEXT = VK_SAMPLER_CREATE_SUBSAMPLED_BIT_EXT, eSubsampledCoarseReconstructionEXT = VK_SAMPLER_CREATE_SUBSAMPLED_COARSE_RECONSTRUCTION_BIT_EXT, eDescriptorBufferCaptureReplayEXT = VK_SAMPLER_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT, eNonSeamlessCubeMapEXT = VK_SAMPLER_CREATE_NON_SEAMLESS_CUBE_MAP_BIT_EXT, eImageProcessingQCOM = VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM }; using SamplerCreateFlags = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR SamplerCreateFlags allFlags = SamplerCreateFlagBits::eSubsampledEXT | SamplerCreateFlagBits::eSubsampledCoarseReconstructionEXT | SamplerCreateFlagBits::eDescriptorBufferCaptureReplayEXT | SamplerCreateFlagBits::eNonSeamlessCubeMapEXT | SamplerCreateFlagBits::eImageProcessingQCOM; }; enum class SamplerMipmapMode { eNearest = VK_SAMPLER_MIPMAP_MODE_NEAREST, eLinear = VK_SAMPLER_MIPMAP_MODE_LINEAR }; enum class DescriptorPoolCreateFlagBits : VkDescriptorPoolCreateFlags { eFreeDescriptorSet = VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT, eUpdateAfterBind = VK_DESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT, eUpdateAfterBindEXT = VK_DESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT_EXT, eHostOnlyEXT = VK_DESCRIPTOR_POOL_CREATE_HOST_ONLY_BIT_EXT, eHostOnlyVALVE = VK_DESCRIPTOR_POOL_CREATE_HOST_ONLY_BIT_VALVE, eAllowOverallocationSetsNV = VK_DESCRIPTOR_POOL_CREATE_ALLOW_OVERALLOCATION_SETS_BIT_NV, eAllowOverallocationPoolsNV = VK_DESCRIPTOR_POOL_CREATE_ALLOW_OVERALLOCATION_POOLS_BIT_NV }; using DescriptorPoolCreateFlags = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR DescriptorPoolCreateFlags allFlags = DescriptorPoolCreateFlagBits::eFreeDescriptorSet | DescriptorPoolCreateFlagBits::eUpdateAfterBind | DescriptorPoolCreateFlagBits::eHostOnlyEXT | DescriptorPoolCreateFlagBits::eAllowOverallocationSetsNV | DescriptorPoolCreateFlagBits::eAllowOverallocationPoolsNV; }; enum class DescriptorSetLayoutCreateFlagBits : VkDescriptorSetLayoutCreateFlags { eUpdateAfterBindPool = VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT, eUpdateAfterBindPoolEXT = VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT_EXT, ePushDescriptor = VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT, ePushDescriptorKHR = VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR, eDescriptorBufferEXT = VK_DESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, eEmbeddedImmutableSamplersEXT = VK_DESCRIPTOR_SET_LAYOUT_CREATE_EMBEDDED_IMMUTABLE_SAMPLERS_BIT_EXT, eIndirectBindableNV = VK_DESCRIPTOR_SET_LAYOUT_CREATE_INDIRECT_BINDABLE_BIT_NV, eHostOnlyPoolEXT = VK_DESCRIPTOR_SET_LAYOUT_CREATE_HOST_ONLY_POOL_BIT_EXT, eHostOnlyPoolVALVE = VK_DESCRIPTOR_SET_LAYOUT_CREATE_HOST_ONLY_POOL_BIT_VALVE, ePerStageNV = VK_DESCRIPTOR_SET_LAYOUT_CREATE_PER_STAGE_BIT_NV }; using DescriptorSetLayoutCreateFlags = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR DescriptorSetLayoutCreateFlags allFlags = DescriptorSetLayoutCreateFlagBits::eUpdateAfterBindPool | DescriptorSetLayoutCreateFlagBits::ePushDescriptor | DescriptorSetLayoutCreateFlagBits::eDescriptorBufferEXT | DescriptorSetLayoutCreateFlagBits::eEmbeddedImmutableSamplersEXT | DescriptorSetLayoutCreateFlagBits::eIndirectBindableNV | DescriptorSetLayoutCreateFlagBits::eHostOnlyPoolEXT | DescriptorSetLayoutCreateFlagBits::ePerStageNV; }; enum class DescriptorType { eSampler = VK_DESCRIPTOR_TYPE_SAMPLER, eCombinedImageSampler = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, eSampledImage = VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, eStorageImage = VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, eUniformTexelBuffer = VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER, eStorageTexelBuffer = VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER, eUniformBuffer = VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, eStorageBuffer = VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, eUniformBufferDynamic = VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC, eStorageBufferDynamic = VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC, eInputAttachment = VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT, eInlineUniformBlock = VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK, eInlineUniformBlockEXT = VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK_EXT, eAccelerationStructureKHR = VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR, eAccelerationStructureNV = VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_NV, eSampleWeightImageQCOM = VK_DESCRIPTOR_TYPE_SAMPLE_WEIGHT_IMAGE_QCOM, eBlockMatchImageQCOM = VK_DESCRIPTOR_TYPE_BLOCK_MATCH_IMAGE_QCOM, eMutableEXT = VK_DESCRIPTOR_TYPE_MUTABLE_EXT, eMutableVALVE = VK_DESCRIPTOR_TYPE_MUTABLE_VALVE, ePartitionedAccelerationStructureNV = VK_DESCRIPTOR_TYPE_PARTITIONED_ACCELERATION_STRUCTURE_NV }; enum class DescriptorPoolResetFlagBits : VkDescriptorPoolResetFlags { }; using DescriptorPoolResetFlags = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR DescriptorPoolResetFlags allFlags = {}; }; enum class AccessFlagBits : VkAccessFlags { eIndirectCommandRead = VK_ACCESS_INDIRECT_COMMAND_READ_BIT, eIndexRead = VK_ACCESS_INDEX_READ_BIT, eVertexAttributeRead = VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT, eUniformRead = VK_ACCESS_UNIFORM_READ_BIT, eInputAttachmentRead = VK_ACCESS_INPUT_ATTACHMENT_READ_BIT, eShaderRead = VK_ACCESS_SHADER_READ_BIT, eShaderWrite = VK_ACCESS_SHADER_WRITE_BIT, eColorAttachmentRead = VK_ACCESS_COLOR_ATTACHMENT_READ_BIT, eColorAttachmentWrite = VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT, eDepthStencilAttachmentRead = VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT, eDepthStencilAttachmentWrite = VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT, eTransferRead = VK_ACCESS_TRANSFER_READ_BIT, eTransferWrite = VK_ACCESS_TRANSFER_WRITE_BIT, eHostRead = VK_ACCESS_HOST_READ_BIT, eHostWrite = VK_ACCESS_HOST_WRITE_BIT, eMemoryRead = VK_ACCESS_MEMORY_READ_BIT, eMemoryWrite = VK_ACCESS_MEMORY_WRITE_BIT, eNone = VK_ACCESS_NONE, eNoneKHR = VK_ACCESS_NONE_KHR, eTransformFeedbackWriteEXT = VK_ACCESS_TRANSFORM_FEEDBACK_WRITE_BIT_EXT, eTransformFeedbackCounterReadEXT = VK_ACCESS_TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT, eTransformFeedbackCounterWriteEXT = VK_ACCESS_TRANSFORM_FEEDBACK_COUNTER_WRITE_BIT_EXT, eConditionalRenderingReadEXT = VK_ACCESS_CONDITIONAL_RENDERING_READ_BIT_EXT, eColorAttachmentReadNoncoherentEXT = VK_ACCESS_COLOR_ATTACHMENT_READ_NONCOHERENT_BIT_EXT, eAccelerationStructureReadKHR = VK_ACCESS_ACCELERATION_STRUCTURE_READ_BIT_KHR, eAccelerationStructureReadNV = VK_ACCESS_ACCELERATION_STRUCTURE_READ_BIT_NV, eAccelerationStructureWriteKHR = VK_ACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_KHR, eAccelerationStructureWriteNV = VK_ACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_NV, eFragmentDensityMapReadEXT = VK_ACCESS_FRAGMENT_DENSITY_MAP_READ_BIT_EXT, eFragmentShadingRateAttachmentReadKHR = VK_ACCESS_FRAGMENT_SHADING_RATE_ATTACHMENT_READ_BIT_KHR, eShadingRateImageReadNV = VK_ACCESS_SHADING_RATE_IMAGE_READ_BIT_NV, eCommandPreprocessReadNV = VK_ACCESS_COMMAND_PREPROCESS_READ_BIT_NV, eCommandPreprocessReadEXT = VK_ACCESS_COMMAND_PREPROCESS_READ_BIT_EXT, eCommandPreprocessWriteNV = VK_ACCESS_COMMAND_PREPROCESS_WRITE_BIT_NV, eCommandPreprocessWriteEXT = VK_ACCESS_COMMAND_PREPROCESS_WRITE_BIT_EXT }; using AccessFlags = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR AccessFlags allFlags = AccessFlagBits::eIndirectCommandRead | AccessFlagBits::eIndexRead | AccessFlagBits::eVertexAttributeRead | AccessFlagBits::eUniformRead | AccessFlagBits::eInputAttachmentRead | AccessFlagBits::eShaderRead | AccessFlagBits::eShaderWrite | AccessFlagBits::eColorAttachmentRead | AccessFlagBits::eColorAttachmentWrite | AccessFlagBits::eDepthStencilAttachmentRead | AccessFlagBits::eDepthStencilAttachmentWrite | AccessFlagBits::eTransferRead | AccessFlagBits::eTransferWrite | AccessFlagBits::eHostRead | AccessFlagBits::eHostWrite | AccessFlagBits::eMemoryRead | AccessFlagBits::eMemoryWrite | AccessFlagBits::eNone | AccessFlagBits::eTransformFeedbackWriteEXT | AccessFlagBits::eTransformFeedbackCounterReadEXT | AccessFlagBits::eTransformFeedbackCounterWriteEXT | AccessFlagBits::eConditionalRenderingReadEXT | AccessFlagBits::eColorAttachmentReadNoncoherentEXT | AccessFlagBits::eAccelerationStructureReadKHR | AccessFlagBits::eAccelerationStructureWriteKHR | AccessFlagBits::eFragmentDensityMapReadEXT | AccessFlagBits::eFragmentShadingRateAttachmentReadKHR | AccessFlagBits::eCommandPreprocessReadNV | AccessFlagBits::eCommandPreprocessWriteNV; }; enum class AttachmentDescriptionFlagBits : VkAttachmentDescriptionFlags { eMayAlias = VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT }; using AttachmentDescriptionFlags = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR AttachmentDescriptionFlags allFlags = AttachmentDescriptionFlagBits::eMayAlias; }; enum class AttachmentLoadOp { eLoad = VK_ATTACHMENT_LOAD_OP_LOAD, eClear = VK_ATTACHMENT_LOAD_OP_CLEAR, eDontCare = VK_ATTACHMENT_LOAD_OP_DONT_CARE, eNone = VK_ATTACHMENT_LOAD_OP_NONE, eNoneEXT = VK_ATTACHMENT_LOAD_OP_NONE_EXT, eNoneKHR = VK_ATTACHMENT_LOAD_OP_NONE_KHR }; enum class AttachmentStoreOp { eStore = VK_ATTACHMENT_STORE_OP_STORE, eDontCare = VK_ATTACHMENT_STORE_OP_DONT_CARE, eNone = VK_ATTACHMENT_STORE_OP_NONE, eNoneKHR = VK_ATTACHMENT_STORE_OP_NONE_KHR, eNoneQCOM = VK_ATTACHMENT_STORE_OP_NONE_QCOM, eNoneEXT = VK_ATTACHMENT_STORE_OP_NONE_EXT }; enum class DependencyFlagBits : VkDependencyFlags { eByRegion = VK_DEPENDENCY_BY_REGION_BIT, eDeviceGroup = VK_DEPENDENCY_DEVICE_GROUP_BIT, eDeviceGroupKHR = VK_DEPENDENCY_DEVICE_GROUP_BIT_KHR, eViewLocal = VK_DEPENDENCY_VIEW_LOCAL_BIT, eViewLocalKHR = VK_DEPENDENCY_VIEW_LOCAL_BIT_KHR, eFeedbackLoopEXT = VK_DEPENDENCY_FEEDBACK_LOOP_BIT_EXT, eQueueFamilyOwnershipTransferUseAllStagesKHR = VK_DEPENDENCY_QUEUE_FAMILY_OWNERSHIP_TRANSFER_USE_ALL_STAGES_BIT_KHR }; using DependencyFlags = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR DependencyFlags allFlags = DependencyFlagBits::eByRegion | DependencyFlagBits::eDeviceGroup | DependencyFlagBits::eViewLocal | DependencyFlagBits::eFeedbackLoopEXT | DependencyFlagBits::eQueueFamilyOwnershipTransferUseAllStagesKHR; }; enum class FramebufferCreateFlagBits : VkFramebufferCreateFlags { eImageless = VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, eImagelessKHR = VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT_KHR }; using FramebufferCreateFlags = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR FramebufferCreateFlags allFlags = FramebufferCreateFlagBits::eImageless; }; enum class PipelineBindPoint { eGraphics = VK_PIPELINE_BIND_POINT_GRAPHICS, eCompute = VK_PIPELINE_BIND_POINT_COMPUTE, #if defined( VK_ENABLE_BETA_EXTENSIONS ) eExecutionGraphAMDX = VK_PIPELINE_BIND_POINT_EXECUTION_GRAPH_AMDX, #endif /*VK_ENABLE_BETA_EXTENSIONS*/ eRayTracingKHR = VK_PIPELINE_BIND_POINT_RAY_TRACING_KHR, eRayTracingNV = VK_PIPELINE_BIND_POINT_RAY_TRACING_NV, eSubpassShadingHUAWEI = VK_PIPELINE_BIND_POINT_SUBPASS_SHADING_HUAWEI }; enum class RenderPassCreateFlagBits : VkRenderPassCreateFlags { eTransformQCOM = VK_RENDER_PASS_CREATE_TRANSFORM_BIT_QCOM }; using RenderPassCreateFlags = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR RenderPassCreateFlags allFlags = RenderPassCreateFlagBits::eTransformQCOM; }; enum class SubpassDescriptionFlagBits : VkSubpassDescriptionFlags { ePerViewAttributesNVX = VK_SUBPASS_DESCRIPTION_PER_VIEW_ATTRIBUTES_BIT_NVX, ePerViewPositionXOnlyNVX = VK_SUBPASS_DESCRIPTION_PER_VIEW_POSITION_X_ONLY_BIT_NVX, eFragmentRegionQCOM = VK_SUBPASS_DESCRIPTION_FRAGMENT_REGION_BIT_QCOM, eShaderResolveQCOM = VK_SUBPASS_DESCRIPTION_SHADER_RESOLVE_BIT_QCOM, eRasterizationOrderAttachmentColorAccessEXT = VK_SUBPASS_DESCRIPTION_RASTERIZATION_ORDER_ATTACHMENT_COLOR_ACCESS_BIT_EXT, eRasterizationOrderAttachmentColorAccessARM = VK_SUBPASS_DESCRIPTION_RASTERIZATION_ORDER_ATTACHMENT_COLOR_ACCESS_BIT_ARM, eRasterizationOrderAttachmentDepthAccessEXT = VK_SUBPASS_DESCRIPTION_RASTERIZATION_ORDER_ATTACHMENT_DEPTH_ACCESS_BIT_EXT, eRasterizationOrderAttachmentDepthAccessARM = VK_SUBPASS_DESCRIPTION_RASTERIZATION_ORDER_ATTACHMENT_DEPTH_ACCESS_BIT_ARM, eRasterizationOrderAttachmentStencilAccessEXT = VK_SUBPASS_DESCRIPTION_RASTERIZATION_ORDER_ATTACHMENT_STENCIL_ACCESS_BIT_EXT, eRasterizationOrderAttachmentStencilAccessARM = VK_SUBPASS_DESCRIPTION_RASTERIZATION_ORDER_ATTACHMENT_STENCIL_ACCESS_BIT_ARM, eEnableLegacyDitheringEXT = VK_SUBPASS_DESCRIPTION_ENABLE_LEGACY_DITHERING_BIT_EXT }; using SubpassDescriptionFlags = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR SubpassDescriptionFlags allFlags = SubpassDescriptionFlagBits::ePerViewAttributesNVX | SubpassDescriptionFlagBits::ePerViewPositionXOnlyNVX | SubpassDescriptionFlagBits::eFragmentRegionQCOM | SubpassDescriptionFlagBits::eShaderResolveQCOM | SubpassDescriptionFlagBits::eRasterizationOrderAttachmentColorAccessEXT | SubpassDescriptionFlagBits::eRasterizationOrderAttachmentDepthAccessEXT | SubpassDescriptionFlagBits::eRasterizationOrderAttachmentStencilAccessEXT | SubpassDescriptionFlagBits::eEnableLegacyDitheringEXT; }; enum class CommandPoolCreateFlagBits : VkCommandPoolCreateFlags { eTransient = VK_COMMAND_POOL_CREATE_TRANSIENT_BIT, eResetCommandBuffer = VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT, eProtected = VK_COMMAND_POOL_CREATE_PROTECTED_BIT }; using CommandPoolCreateFlags = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR CommandPoolCreateFlags allFlags = CommandPoolCreateFlagBits::eTransient | CommandPoolCreateFlagBits::eResetCommandBuffer | CommandPoolCreateFlagBits::eProtected; }; enum class CommandPoolResetFlagBits : VkCommandPoolResetFlags { eReleaseResources = VK_COMMAND_POOL_RESET_RELEASE_RESOURCES_BIT }; using CommandPoolResetFlags = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR CommandPoolResetFlags allFlags = CommandPoolResetFlagBits::eReleaseResources; }; enum class CommandBufferLevel { ePrimary = VK_COMMAND_BUFFER_LEVEL_PRIMARY, eSecondary = VK_COMMAND_BUFFER_LEVEL_SECONDARY }; enum class CommandBufferResetFlagBits : VkCommandBufferResetFlags { eReleaseResources = VK_COMMAND_BUFFER_RESET_RELEASE_RESOURCES_BIT }; using CommandBufferResetFlags = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR CommandBufferResetFlags allFlags = CommandBufferResetFlagBits::eReleaseResources; }; enum class CommandBufferUsageFlagBits : VkCommandBufferUsageFlags { eOneTimeSubmit = VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT, eRenderPassContinue = VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT, eSimultaneousUse = VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT }; using CommandBufferUsageFlags = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR CommandBufferUsageFlags allFlags = CommandBufferUsageFlagBits::eOneTimeSubmit | CommandBufferUsageFlagBits::eRenderPassContinue | CommandBufferUsageFlagBits::eSimultaneousUse; }; enum class QueryControlFlagBits : VkQueryControlFlags { ePrecise = VK_QUERY_CONTROL_PRECISE_BIT }; using QueryControlFlags = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR QueryControlFlags allFlags = QueryControlFlagBits::ePrecise; }; enum class IndexType { eUint16 = VK_INDEX_TYPE_UINT16, eUint32 = VK_INDEX_TYPE_UINT32, eUint8 = VK_INDEX_TYPE_UINT8, eUint8EXT = VK_INDEX_TYPE_UINT8_EXT, eUint8KHR = VK_INDEX_TYPE_UINT8_KHR, eNoneKHR = VK_INDEX_TYPE_NONE_KHR, eNoneNV = VK_INDEX_TYPE_NONE_NV }; //========================= //=== Index Type Traits === //========================= template struct IndexTypeValue { }; template <> struct IndexTypeValue { static VULKAN_HPP_CONST_OR_CONSTEXPR IndexType value = IndexType::eUint16; }; template <> struct CppType { using Type = uint16_t; }; template <> struct IndexTypeValue { static VULKAN_HPP_CONST_OR_CONSTEXPR IndexType value = IndexType::eUint32; }; template <> struct CppType { using Type = uint32_t; }; template <> struct IndexTypeValue { static VULKAN_HPP_CONST_OR_CONSTEXPR IndexType value = IndexType::eUint8; }; template <> struct CppType { using Type = uint8_t; }; enum class StencilFaceFlagBits : VkStencilFaceFlags { eFront = VK_STENCIL_FACE_FRONT_BIT, eBack = VK_STENCIL_FACE_BACK_BIT, eFrontAndBack = VK_STENCIL_FACE_FRONT_AND_BACK, eVkStencilFrontAndBack = VK_STENCIL_FRONT_AND_BACK }; using StencilFaceFlags = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR StencilFaceFlags allFlags = StencilFaceFlagBits::eFront | StencilFaceFlagBits::eBack | StencilFaceFlagBits::eFrontAndBack; }; enum class SubpassContents { eInline = VK_SUBPASS_CONTENTS_INLINE, eSecondaryCommandBuffers = VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS, eInlineAndSecondaryCommandBuffersKHR = VK_SUBPASS_CONTENTS_INLINE_AND_SECONDARY_COMMAND_BUFFERS_KHR, eInlineAndSecondaryCommandBuffersEXT = VK_SUBPASS_CONTENTS_INLINE_AND_SECONDARY_COMMAND_BUFFERS_EXT }; //=== VK_VERSION_1_1 === enum class SubgroupFeatureFlagBits : VkSubgroupFeatureFlags { eBasic = VK_SUBGROUP_FEATURE_BASIC_BIT, eVote = VK_SUBGROUP_FEATURE_VOTE_BIT, eArithmetic = VK_SUBGROUP_FEATURE_ARITHMETIC_BIT, eBallot = VK_SUBGROUP_FEATURE_BALLOT_BIT, eShuffle = VK_SUBGROUP_FEATURE_SHUFFLE_BIT, eShuffleRelative = VK_SUBGROUP_FEATURE_SHUFFLE_RELATIVE_BIT, eClustered = VK_SUBGROUP_FEATURE_CLUSTERED_BIT, eQuad = VK_SUBGROUP_FEATURE_QUAD_BIT, eRotate = VK_SUBGROUP_FEATURE_ROTATE_BIT, eRotateKHR = VK_SUBGROUP_FEATURE_ROTATE_BIT_KHR, eRotateClustered = VK_SUBGROUP_FEATURE_ROTATE_CLUSTERED_BIT, eRotateClusteredKHR = VK_SUBGROUP_FEATURE_ROTATE_CLUSTERED_BIT_KHR, ePartitionedNV = VK_SUBGROUP_FEATURE_PARTITIONED_BIT_NV }; using SubgroupFeatureFlags = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR SubgroupFeatureFlags allFlags = SubgroupFeatureFlagBits::eBasic | SubgroupFeatureFlagBits::eVote | SubgroupFeatureFlagBits::eArithmetic | SubgroupFeatureFlagBits::eBallot | SubgroupFeatureFlagBits::eShuffle | SubgroupFeatureFlagBits::eShuffleRelative | SubgroupFeatureFlagBits::eClustered | SubgroupFeatureFlagBits::eQuad | SubgroupFeatureFlagBits::eRotate | SubgroupFeatureFlagBits::eRotateClustered | SubgroupFeatureFlagBits::ePartitionedNV; }; enum class PeerMemoryFeatureFlagBits : VkPeerMemoryFeatureFlags { eCopySrc = VK_PEER_MEMORY_FEATURE_COPY_SRC_BIT, eCopyDst = VK_PEER_MEMORY_FEATURE_COPY_DST_BIT, eGenericSrc = VK_PEER_MEMORY_FEATURE_GENERIC_SRC_BIT, eGenericDst = VK_PEER_MEMORY_FEATURE_GENERIC_DST_BIT }; using PeerMemoryFeatureFlagBitsKHR = PeerMemoryFeatureFlagBits; using PeerMemoryFeatureFlags = Flags; using PeerMemoryFeatureFlagsKHR = PeerMemoryFeatureFlags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR PeerMemoryFeatureFlags allFlags = PeerMemoryFeatureFlagBits::eCopySrc | PeerMemoryFeatureFlagBits::eCopyDst | PeerMemoryFeatureFlagBits::eGenericSrc | PeerMemoryFeatureFlagBits::eGenericDst; }; enum class MemoryAllocateFlagBits : VkMemoryAllocateFlags { eDeviceMask = VK_MEMORY_ALLOCATE_DEVICE_MASK_BIT, eDeviceAddress = VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT, eDeviceAddressCaptureReplay = VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT }; using MemoryAllocateFlagBitsKHR = MemoryAllocateFlagBits; using MemoryAllocateFlags = Flags; using MemoryAllocateFlagsKHR = MemoryAllocateFlags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR MemoryAllocateFlags allFlags = MemoryAllocateFlagBits::eDeviceMask | MemoryAllocateFlagBits::eDeviceAddress | MemoryAllocateFlagBits::eDeviceAddressCaptureReplay; }; enum class CommandPoolTrimFlagBits : VkCommandPoolTrimFlags { }; using CommandPoolTrimFlags = Flags; using CommandPoolTrimFlagsKHR = CommandPoolTrimFlags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR CommandPoolTrimFlags allFlags = {}; }; enum class PointClippingBehavior { eAllClipPlanes = VK_POINT_CLIPPING_BEHAVIOR_ALL_CLIP_PLANES, eUserClipPlanesOnly = VK_POINT_CLIPPING_BEHAVIOR_USER_CLIP_PLANES_ONLY }; using PointClippingBehaviorKHR = PointClippingBehavior; enum class TessellationDomainOrigin { eUpperLeft = VK_TESSELLATION_DOMAIN_ORIGIN_UPPER_LEFT, eLowerLeft = VK_TESSELLATION_DOMAIN_ORIGIN_LOWER_LEFT }; using TessellationDomainOriginKHR = TessellationDomainOrigin; enum class SamplerYcbcrModelConversion { eRgbIdentity = VK_SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY, eYcbcrIdentity = VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_IDENTITY, eYcbcr709 = VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_709, eYcbcr601 = VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_601, eYcbcr2020 = VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_2020 }; using SamplerYcbcrModelConversionKHR = SamplerYcbcrModelConversion; enum class SamplerYcbcrRange { eItuFull = VK_SAMPLER_YCBCR_RANGE_ITU_FULL, eItuNarrow = VK_SAMPLER_YCBCR_RANGE_ITU_NARROW }; using SamplerYcbcrRangeKHR = SamplerYcbcrRange; enum class ChromaLocation { eCositedEven = VK_CHROMA_LOCATION_COSITED_EVEN, eMidpoint = VK_CHROMA_LOCATION_MIDPOINT }; using ChromaLocationKHR = ChromaLocation; enum class DescriptorUpdateTemplateType { eDescriptorSet = VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET, ePushDescriptors = VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS }; using DescriptorUpdateTemplateTypeKHR = DescriptorUpdateTemplateType; enum class DescriptorUpdateTemplateCreateFlagBits : VkDescriptorUpdateTemplateCreateFlags { }; using DescriptorUpdateTemplateCreateFlags = Flags; using DescriptorUpdateTemplateCreateFlagsKHR = DescriptorUpdateTemplateCreateFlags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR DescriptorUpdateTemplateCreateFlags allFlags = {}; }; enum class ExternalMemoryHandleTypeFlagBits : VkExternalMemoryHandleTypeFlags { eOpaqueFd = VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT, eOpaqueWin32 = VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT, eOpaqueWin32Kmt = VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT, eD3D11Texture = VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT, eD3D11TextureKmt = VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT, eD3D12Heap = VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT, eD3D12Resource = VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT, eDmaBufEXT = VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT, #if defined( VK_USE_PLATFORM_ANDROID_KHR ) eAndroidHardwareBufferANDROID = VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID, #endif /*VK_USE_PLATFORM_ANDROID_KHR*/ eHostAllocationEXT = VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_ALLOCATION_BIT_EXT, eHostMappedForeignMemoryEXT = VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_MAPPED_FOREIGN_MEMORY_BIT_EXT, #if defined( VK_USE_PLATFORM_FUCHSIA ) eZirconVmoFUCHSIA = VK_EXTERNAL_MEMORY_HANDLE_TYPE_ZIRCON_VMO_BIT_FUCHSIA, #endif /*VK_USE_PLATFORM_FUCHSIA*/ eRdmaAddressNV = VK_EXTERNAL_MEMORY_HANDLE_TYPE_RDMA_ADDRESS_BIT_NV, #if defined( VK_USE_PLATFORM_SCREEN_QNX ) eScreenBufferQNX = VK_EXTERNAL_MEMORY_HANDLE_TYPE_SCREEN_BUFFER_BIT_QNX, #endif /*VK_USE_PLATFORM_SCREEN_QNX*/ #if defined( VK_USE_PLATFORM_METAL_EXT ) eMtlbufferEXT = VK_EXTERNAL_MEMORY_HANDLE_TYPE_MTLBUFFER_BIT_EXT, eMtltextureEXT = VK_EXTERNAL_MEMORY_HANDLE_TYPE_MTLTEXTURE_BIT_EXT, eMtlheapEXT = VK_EXTERNAL_MEMORY_HANDLE_TYPE_MTLHEAP_BIT_EXT #endif /*VK_USE_PLATFORM_METAL_EXT*/ }; using ExternalMemoryHandleTypeFlagBitsKHR = ExternalMemoryHandleTypeFlagBits; using ExternalMemoryHandleTypeFlags = Flags; using ExternalMemoryHandleTypeFlagsKHR = ExternalMemoryHandleTypeFlags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR ExternalMemoryHandleTypeFlags allFlags = ExternalMemoryHandleTypeFlagBits::eOpaqueFd | ExternalMemoryHandleTypeFlagBits::eOpaqueWin32 | ExternalMemoryHandleTypeFlagBits::eOpaqueWin32Kmt | ExternalMemoryHandleTypeFlagBits::eD3D11Texture | ExternalMemoryHandleTypeFlagBits::eD3D11TextureKmt | ExternalMemoryHandleTypeFlagBits::eD3D12Heap | ExternalMemoryHandleTypeFlagBits::eD3D12Resource | ExternalMemoryHandleTypeFlagBits::eDmaBufEXT #if defined( VK_USE_PLATFORM_ANDROID_KHR ) | ExternalMemoryHandleTypeFlagBits::eAndroidHardwareBufferANDROID #endif /*VK_USE_PLATFORM_ANDROID_KHR*/ | ExternalMemoryHandleTypeFlagBits::eHostAllocationEXT | ExternalMemoryHandleTypeFlagBits::eHostMappedForeignMemoryEXT #if defined( VK_USE_PLATFORM_FUCHSIA ) | ExternalMemoryHandleTypeFlagBits::eZirconVmoFUCHSIA #endif /*VK_USE_PLATFORM_FUCHSIA*/ | ExternalMemoryHandleTypeFlagBits::eRdmaAddressNV #if defined( VK_USE_PLATFORM_SCREEN_QNX ) | ExternalMemoryHandleTypeFlagBits::eScreenBufferQNX #endif /*VK_USE_PLATFORM_SCREEN_QNX*/ #if defined( VK_USE_PLATFORM_METAL_EXT ) | ExternalMemoryHandleTypeFlagBits::eMtlbufferEXT | ExternalMemoryHandleTypeFlagBits::eMtltextureEXT | ExternalMemoryHandleTypeFlagBits::eMtlheapEXT #endif /*VK_USE_PLATFORM_METAL_EXT*/ ; }; enum class ExternalMemoryFeatureFlagBits : VkExternalMemoryFeatureFlags { eDedicatedOnly = VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT, eExportable = VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT, eImportable = VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT }; using ExternalMemoryFeatureFlagBitsKHR = ExternalMemoryFeatureFlagBits; using ExternalMemoryFeatureFlags = Flags; using ExternalMemoryFeatureFlagsKHR = ExternalMemoryFeatureFlags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR ExternalMemoryFeatureFlags allFlags = ExternalMemoryFeatureFlagBits::eDedicatedOnly | ExternalMemoryFeatureFlagBits::eExportable | ExternalMemoryFeatureFlagBits::eImportable; }; enum class ExternalFenceHandleTypeFlagBits : VkExternalFenceHandleTypeFlags { eOpaqueFd = VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_FD_BIT, eOpaqueWin32 = VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_BIT, eOpaqueWin32Kmt = VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT, eSyncFd = VK_EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BIT }; using ExternalFenceHandleTypeFlagBitsKHR = ExternalFenceHandleTypeFlagBits; using ExternalFenceHandleTypeFlags = Flags; using ExternalFenceHandleTypeFlagsKHR = ExternalFenceHandleTypeFlags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR ExternalFenceHandleTypeFlags allFlags = ExternalFenceHandleTypeFlagBits::eOpaqueFd | ExternalFenceHandleTypeFlagBits::eOpaqueWin32 | ExternalFenceHandleTypeFlagBits::eOpaqueWin32Kmt | ExternalFenceHandleTypeFlagBits::eSyncFd; }; enum class ExternalFenceFeatureFlagBits : VkExternalFenceFeatureFlags { eExportable = VK_EXTERNAL_FENCE_FEATURE_EXPORTABLE_BIT, eImportable = VK_EXTERNAL_FENCE_FEATURE_IMPORTABLE_BIT }; using ExternalFenceFeatureFlagBitsKHR = ExternalFenceFeatureFlagBits; using ExternalFenceFeatureFlags = Flags; using ExternalFenceFeatureFlagsKHR = ExternalFenceFeatureFlags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR ExternalFenceFeatureFlags allFlags = ExternalFenceFeatureFlagBits::eExportable | ExternalFenceFeatureFlagBits::eImportable; }; enum class FenceImportFlagBits : VkFenceImportFlags { eTemporary = VK_FENCE_IMPORT_TEMPORARY_BIT }; using FenceImportFlagBitsKHR = FenceImportFlagBits; using FenceImportFlags = Flags; using FenceImportFlagsKHR = FenceImportFlags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR FenceImportFlags allFlags = FenceImportFlagBits::eTemporary; }; enum class SemaphoreImportFlagBits : VkSemaphoreImportFlags { eTemporary = VK_SEMAPHORE_IMPORT_TEMPORARY_BIT }; using SemaphoreImportFlagBitsKHR = SemaphoreImportFlagBits; using SemaphoreImportFlags = Flags; using SemaphoreImportFlagsKHR = SemaphoreImportFlags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR SemaphoreImportFlags allFlags = SemaphoreImportFlagBits::eTemporary; }; enum class ExternalSemaphoreHandleTypeFlagBits : VkExternalSemaphoreHandleTypeFlags { eOpaqueFd = VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT, eOpaqueWin32 = VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT, eOpaqueWin32Kmt = VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT, eD3D12Fence = VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT, eD3D11Fence = VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_FENCE_BIT, eSyncFd = VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT, #if defined( VK_USE_PLATFORM_FUCHSIA ) eZirconEventFUCHSIA = VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_ZIRCON_EVENT_BIT_FUCHSIA #endif /*VK_USE_PLATFORM_FUCHSIA*/ }; using ExternalSemaphoreHandleTypeFlagBitsKHR = ExternalSemaphoreHandleTypeFlagBits; using ExternalSemaphoreHandleTypeFlags = Flags; using ExternalSemaphoreHandleTypeFlagsKHR = ExternalSemaphoreHandleTypeFlags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR ExternalSemaphoreHandleTypeFlags allFlags = ExternalSemaphoreHandleTypeFlagBits::eOpaqueFd | ExternalSemaphoreHandleTypeFlagBits::eOpaqueWin32 | ExternalSemaphoreHandleTypeFlagBits::eOpaqueWin32Kmt | ExternalSemaphoreHandleTypeFlagBits::eD3D12Fence | ExternalSemaphoreHandleTypeFlagBits::eSyncFd #if defined( VK_USE_PLATFORM_FUCHSIA ) | ExternalSemaphoreHandleTypeFlagBits::eZirconEventFUCHSIA #endif /*VK_USE_PLATFORM_FUCHSIA*/ ; }; enum class ExternalSemaphoreFeatureFlagBits : VkExternalSemaphoreFeatureFlags { eExportable = VK_EXTERNAL_SEMAPHORE_FEATURE_EXPORTABLE_BIT, eImportable = VK_EXTERNAL_SEMAPHORE_FEATURE_IMPORTABLE_BIT }; using ExternalSemaphoreFeatureFlagBitsKHR = ExternalSemaphoreFeatureFlagBits; using ExternalSemaphoreFeatureFlags = Flags; using ExternalSemaphoreFeatureFlagsKHR = ExternalSemaphoreFeatureFlags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR ExternalSemaphoreFeatureFlags allFlags = ExternalSemaphoreFeatureFlagBits::eExportable | ExternalSemaphoreFeatureFlagBits::eImportable; }; //=== VK_VERSION_1_2 === enum class DriverId { eAmdProprietary = VK_DRIVER_ID_AMD_PROPRIETARY, eAmdOpenSource = VK_DRIVER_ID_AMD_OPEN_SOURCE, eMesaRadv = VK_DRIVER_ID_MESA_RADV, eNvidiaProprietary = VK_DRIVER_ID_NVIDIA_PROPRIETARY, eIntelProprietaryWindows = VK_DRIVER_ID_INTEL_PROPRIETARY_WINDOWS, eIntelOpenSourceMESA = VK_DRIVER_ID_INTEL_OPEN_SOURCE_MESA, eImaginationProprietary = VK_DRIVER_ID_IMAGINATION_PROPRIETARY, eQualcommProprietary = VK_DRIVER_ID_QUALCOMM_PROPRIETARY, eArmProprietary = VK_DRIVER_ID_ARM_PROPRIETARY, eGoogleSwiftshader = VK_DRIVER_ID_GOOGLE_SWIFTSHADER, eGgpProprietary = VK_DRIVER_ID_GGP_PROPRIETARY, eBroadcomProprietary = VK_DRIVER_ID_BROADCOM_PROPRIETARY, eMesaLlvmpipe = VK_DRIVER_ID_MESA_LLVMPIPE, eMoltenvk = VK_DRIVER_ID_MOLTENVK, eCoreaviProprietary = VK_DRIVER_ID_COREAVI_PROPRIETARY, eJuiceProprietary = VK_DRIVER_ID_JUICE_PROPRIETARY, eVerisiliconProprietary = VK_DRIVER_ID_VERISILICON_PROPRIETARY, eMesaTurnip = VK_DRIVER_ID_MESA_TURNIP, eMesaV3Dv = VK_DRIVER_ID_MESA_V3DV, eMesaPanvk = VK_DRIVER_ID_MESA_PANVK, eSamsungProprietary = VK_DRIVER_ID_SAMSUNG_PROPRIETARY, eMesaVenus = VK_DRIVER_ID_MESA_VENUS, eMesaDozen = VK_DRIVER_ID_MESA_DOZEN, eMesaNvk = VK_DRIVER_ID_MESA_NVK, eImaginationOpenSourceMESA = VK_DRIVER_ID_IMAGINATION_OPEN_SOURCE_MESA, eMesaHoneykrisp = VK_DRIVER_ID_MESA_HONEYKRISP, eVulkanScEmulationOnVulkan = VK_DRIVER_ID_VULKAN_SC_EMULATION_ON_VULKAN }; using DriverIdKHR = DriverId; enum class ShaderFloatControlsIndependence { e32BitOnly = VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_32_BIT_ONLY, eAll = VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_ALL, eNone = VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_NONE }; using ShaderFloatControlsIndependenceKHR = ShaderFloatControlsIndependence; enum class DescriptorBindingFlagBits : VkDescriptorBindingFlags { eUpdateAfterBind = VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT, eUpdateUnusedWhilePending = VK_DESCRIPTOR_BINDING_UPDATE_UNUSED_WHILE_PENDING_BIT, ePartiallyBound = VK_DESCRIPTOR_BINDING_PARTIALLY_BOUND_BIT, eVariableDescriptorCount = VK_DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT }; using DescriptorBindingFlagBitsEXT = DescriptorBindingFlagBits; using DescriptorBindingFlags = Flags; using DescriptorBindingFlagsEXT = DescriptorBindingFlags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR DescriptorBindingFlags allFlags = DescriptorBindingFlagBits::eUpdateAfterBind | DescriptorBindingFlagBits::eUpdateUnusedWhilePending | DescriptorBindingFlagBits::ePartiallyBound | DescriptorBindingFlagBits::eVariableDescriptorCount; }; enum class ResolveModeFlagBits : VkResolveModeFlags { eNone = VK_RESOLVE_MODE_NONE, eSampleZero = VK_RESOLVE_MODE_SAMPLE_ZERO_BIT, eAverage = VK_RESOLVE_MODE_AVERAGE_BIT, eMin = VK_RESOLVE_MODE_MIN_BIT, eMax = VK_RESOLVE_MODE_MAX_BIT, #if defined( VK_USE_PLATFORM_ANDROID_KHR ) eExternalFormatDownsampleANDROID = VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_ANDROID #endif /*VK_USE_PLATFORM_ANDROID_KHR*/ }; using ResolveModeFlagBitsKHR = ResolveModeFlagBits; using ResolveModeFlags = Flags; using ResolveModeFlagsKHR = ResolveModeFlags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR ResolveModeFlags allFlags = ResolveModeFlagBits::eNone | ResolveModeFlagBits::eSampleZero | ResolveModeFlagBits::eAverage | ResolveModeFlagBits::eMin | ResolveModeFlagBits::eMax #if defined( VK_USE_PLATFORM_ANDROID_KHR ) | ResolveModeFlagBits::eExternalFormatDownsampleANDROID #endif /*VK_USE_PLATFORM_ANDROID_KHR*/ ; }; enum class SamplerReductionMode { eWeightedAverage = VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, eMin = VK_SAMPLER_REDUCTION_MODE_MIN, eMax = VK_SAMPLER_REDUCTION_MODE_MAX, eWeightedAverageRangeclampQCOM = VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM }; using SamplerReductionModeEXT = SamplerReductionMode; enum class SemaphoreType { eBinary = VK_SEMAPHORE_TYPE_BINARY, eTimeline = VK_SEMAPHORE_TYPE_TIMELINE }; using SemaphoreTypeKHR = SemaphoreType; enum class SemaphoreWaitFlagBits : VkSemaphoreWaitFlags { eAny = VK_SEMAPHORE_WAIT_ANY_BIT }; using SemaphoreWaitFlagBitsKHR = SemaphoreWaitFlagBits; using SemaphoreWaitFlags = Flags; using SemaphoreWaitFlagsKHR = SemaphoreWaitFlags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR SemaphoreWaitFlags allFlags = SemaphoreWaitFlagBits::eAny; }; //=== VK_VERSION_1_3 === enum class PipelineCreationFeedbackFlagBits : VkPipelineCreationFeedbackFlags { eValid = VK_PIPELINE_CREATION_FEEDBACK_VALID_BIT, eApplicationPipelineCacheHit = VK_PIPELINE_CREATION_FEEDBACK_APPLICATION_PIPELINE_CACHE_HIT_BIT, eBasePipelineAcceleration = VK_PIPELINE_CREATION_FEEDBACK_BASE_PIPELINE_ACCELERATION_BIT }; using PipelineCreationFeedbackFlagBitsEXT = PipelineCreationFeedbackFlagBits; using PipelineCreationFeedbackFlags = Flags; using PipelineCreationFeedbackFlagsEXT = PipelineCreationFeedbackFlags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR PipelineCreationFeedbackFlags allFlags = PipelineCreationFeedbackFlagBits::eValid | PipelineCreationFeedbackFlagBits::eApplicationPipelineCacheHit | PipelineCreationFeedbackFlagBits::eBasePipelineAcceleration; }; enum class ToolPurposeFlagBits : VkToolPurposeFlags { eValidation = VK_TOOL_PURPOSE_VALIDATION_BIT, eProfiling = VK_TOOL_PURPOSE_PROFILING_BIT, eTracing = VK_TOOL_PURPOSE_TRACING_BIT, eAdditionalFeatures = VK_TOOL_PURPOSE_ADDITIONAL_FEATURES_BIT, eModifyingFeatures = VK_TOOL_PURPOSE_MODIFYING_FEATURES_BIT, eDebugReportingEXT = VK_TOOL_PURPOSE_DEBUG_REPORTING_BIT_EXT, eDebugMarkersEXT = VK_TOOL_PURPOSE_DEBUG_MARKERS_BIT_EXT }; using ToolPurposeFlagBitsEXT = ToolPurposeFlagBits; using ToolPurposeFlags = Flags; using ToolPurposeFlagsEXT = ToolPurposeFlags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR ToolPurposeFlags allFlags = ToolPurposeFlagBits::eValidation | ToolPurposeFlagBits::eProfiling | ToolPurposeFlagBits::eTracing | ToolPurposeFlagBits::eAdditionalFeatures | ToolPurposeFlagBits::eModifyingFeatures | ToolPurposeFlagBits::eDebugReportingEXT | ToolPurposeFlagBits::eDebugMarkersEXT; }; enum class PrivateDataSlotCreateFlagBits : VkPrivateDataSlotCreateFlags { }; using PrivateDataSlotCreateFlagBitsEXT = PrivateDataSlotCreateFlagBits; using PrivateDataSlotCreateFlags = Flags; using PrivateDataSlotCreateFlagsEXT = PrivateDataSlotCreateFlags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR PrivateDataSlotCreateFlags allFlags = {}; }; enum class PipelineStageFlagBits2 : VkPipelineStageFlags2 { eNone = VK_PIPELINE_STAGE_2_NONE, eTopOfPipe = VK_PIPELINE_STAGE_2_TOP_OF_PIPE_BIT, eDrawIndirect = VK_PIPELINE_STAGE_2_DRAW_INDIRECT_BIT, eVertexInput = VK_PIPELINE_STAGE_2_VERTEX_INPUT_BIT, eVertexShader = VK_PIPELINE_STAGE_2_VERTEX_SHADER_BIT, eTessellationControlShader = VK_PIPELINE_STAGE_2_TESSELLATION_CONTROL_SHADER_BIT, eTessellationEvaluationShader = VK_PIPELINE_STAGE_2_TESSELLATION_EVALUATION_SHADER_BIT, eGeometryShader = VK_PIPELINE_STAGE_2_GEOMETRY_SHADER_BIT, eFragmentShader = VK_PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT, eEarlyFragmentTests = VK_PIPELINE_STAGE_2_EARLY_FRAGMENT_TESTS_BIT, eLateFragmentTests = VK_PIPELINE_STAGE_2_LATE_FRAGMENT_TESTS_BIT, eColorAttachmentOutput = VK_PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT, eComputeShader = VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT, eAllTransfer = VK_PIPELINE_STAGE_2_ALL_TRANSFER_BIT, eTransfer = VK_PIPELINE_STAGE_2_TRANSFER_BIT, eBottomOfPipe = VK_PIPELINE_STAGE_2_BOTTOM_OF_PIPE_BIT, eHost = VK_PIPELINE_STAGE_2_HOST_BIT, eAllGraphics = VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT, eAllCommands = VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT, eCopy = VK_PIPELINE_STAGE_2_COPY_BIT, eResolve = VK_PIPELINE_STAGE_2_RESOLVE_BIT, eBlit = VK_PIPELINE_STAGE_2_BLIT_BIT, eClear = VK_PIPELINE_STAGE_2_CLEAR_BIT, eIndexInput = VK_PIPELINE_STAGE_2_INDEX_INPUT_BIT, eVertexAttributeInput = VK_PIPELINE_STAGE_2_VERTEX_ATTRIBUTE_INPUT_BIT, ePreRasterizationShaders = VK_PIPELINE_STAGE_2_PRE_RASTERIZATION_SHADERS_BIT, eVideoDecodeKHR = VK_PIPELINE_STAGE_2_VIDEO_DECODE_BIT_KHR, eVideoEncodeKHR = VK_PIPELINE_STAGE_2_VIDEO_ENCODE_BIT_KHR, eTransformFeedbackEXT = VK_PIPELINE_STAGE_2_TRANSFORM_FEEDBACK_BIT_EXT, eConditionalRenderingEXT = VK_PIPELINE_STAGE_2_CONDITIONAL_RENDERING_BIT_EXT, eCommandPreprocessNV = VK_PIPELINE_STAGE_2_COMMAND_PREPROCESS_BIT_NV, eCommandPreprocessEXT = VK_PIPELINE_STAGE_2_COMMAND_PREPROCESS_BIT_EXT, eFragmentShadingRateAttachmentKHR = VK_PIPELINE_STAGE_2_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR, eShadingRateImageNV = VK_PIPELINE_STAGE_2_SHADING_RATE_IMAGE_BIT_NV, eAccelerationStructureBuildKHR = VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR, eAccelerationStructureBuildNV = VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_NV, eRayTracingShaderKHR = VK_PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_KHR, eRayTracingShaderNV = VK_PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_NV, eFragmentDensityProcessEXT = VK_PIPELINE_STAGE_2_FRAGMENT_DENSITY_PROCESS_BIT_EXT, eTaskShaderEXT = VK_PIPELINE_STAGE_2_TASK_SHADER_BIT_EXT, eTaskShaderNV = VK_PIPELINE_STAGE_2_TASK_SHADER_BIT_NV, eMeshShaderEXT = VK_PIPELINE_STAGE_2_MESH_SHADER_BIT_EXT, eMeshShaderNV = VK_PIPELINE_STAGE_2_MESH_SHADER_BIT_NV, eSubpassShaderHUAWEI = VK_PIPELINE_STAGE_2_SUBPASS_SHADER_BIT_HUAWEI, eSubpassShadingHUAWEI = VK_PIPELINE_STAGE_2_SUBPASS_SHADING_BIT_HUAWEI, eInvocationMaskHUAWEI = VK_PIPELINE_STAGE_2_INVOCATION_MASK_BIT_HUAWEI, eAccelerationStructureCopyKHR = VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_COPY_BIT_KHR, eMicromapBuildEXT = VK_PIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXT, eClusterCullingShaderHUAWEI = VK_PIPELINE_STAGE_2_CLUSTER_CULLING_SHADER_BIT_HUAWEI, eOpticalFlowNV = VK_PIPELINE_STAGE_2_OPTICAL_FLOW_BIT_NV, eConvertCooperativeVectorMatrixNV = VK_PIPELINE_STAGE_2_CONVERT_COOPERATIVE_VECTOR_MATRIX_BIT_NV }; using PipelineStageFlagBits2KHR = PipelineStageFlagBits2; using PipelineStageFlags2 = Flags; using PipelineStageFlags2KHR = PipelineStageFlags2; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR PipelineStageFlags2 allFlags = PipelineStageFlagBits2::eNone | PipelineStageFlagBits2::eTopOfPipe | PipelineStageFlagBits2::eDrawIndirect | PipelineStageFlagBits2::eVertexInput | PipelineStageFlagBits2::eVertexShader | PipelineStageFlagBits2::eTessellationControlShader | PipelineStageFlagBits2::eTessellationEvaluationShader | PipelineStageFlagBits2::eGeometryShader | PipelineStageFlagBits2::eFragmentShader | PipelineStageFlagBits2::eEarlyFragmentTests | PipelineStageFlagBits2::eLateFragmentTests | PipelineStageFlagBits2::eColorAttachmentOutput | PipelineStageFlagBits2::eComputeShader | PipelineStageFlagBits2::eAllTransfer | PipelineStageFlagBits2::eBottomOfPipe | PipelineStageFlagBits2::eHost | PipelineStageFlagBits2::eAllGraphics | PipelineStageFlagBits2::eAllCommands | PipelineStageFlagBits2::eCopy | PipelineStageFlagBits2::eResolve | PipelineStageFlagBits2::eBlit | PipelineStageFlagBits2::eClear | PipelineStageFlagBits2::eIndexInput | PipelineStageFlagBits2::eVertexAttributeInput | PipelineStageFlagBits2::ePreRasterizationShaders | PipelineStageFlagBits2::eVideoDecodeKHR | PipelineStageFlagBits2::eVideoEncodeKHR | PipelineStageFlagBits2::eTransformFeedbackEXT | PipelineStageFlagBits2::eConditionalRenderingEXT | PipelineStageFlagBits2::eCommandPreprocessNV | PipelineStageFlagBits2::eFragmentShadingRateAttachmentKHR | PipelineStageFlagBits2::eAccelerationStructureBuildKHR | PipelineStageFlagBits2::eRayTracingShaderKHR | PipelineStageFlagBits2::eFragmentDensityProcessEXT | PipelineStageFlagBits2::eTaskShaderEXT | PipelineStageFlagBits2::eMeshShaderEXT | PipelineStageFlagBits2::eSubpassShaderHUAWEI | PipelineStageFlagBits2::eInvocationMaskHUAWEI | PipelineStageFlagBits2::eAccelerationStructureCopyKHR | PipelineStageFlagBits2::eMicromapBuildEXT | PipelineStageFlagBits2::eClusterCullingShaderHUAWEI | PipelineStageFlagBits2::eOpticalFlowNV | PipelineStageFlagBits2::eConvertCooperativeVectorMatrixNV; }; enum class AccessFlagBits2 : VkAccessFlags2 { eNone = VK_ACCESS_2_NONE, eIndirectCommandRead = VK_ACCESS_2_INDIRECT_COMMAND_READ_BIT, eIndexRead = VK_ACCESS_2_INDEX_READ_BIT, eVertexAttributeRead = VK_ACCESS_2_VERTEX_ATTRIBUTE_READ_BIT, eUniformRead = VK_ACCESS_2_UNIFORM_READ_BIT, eInputAttachmentRead = VK_ACCESS_2_INPUT_ATTACHMENT_READ_BIT, eShaderRead = VK_ACCESS_2_SHADER_READ_BIT, eShaderWrite = VK_ACCESS_2_SHADER_WRITE_BIT, eColorAttachmentRead = VK_ACCESS_2_COLOR_ATTACHMENT_READ_BIT, eColorAttachmentWrite = VK_ACCESS_2_COLOR_ATTACHMENT_WRITE_BIT, eDepthStencilAttachmentRead = VK_ACCESS_2_DEPTH_STENCIL_ATTACHMENT_READ_BIT, eDepthStencilAttachmentWrite = VK_ACCESS_2_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT, eTransferRead = VK_ACCESS_2_TRANSFER_READ_BIT, eTransferWrite = VK_ACCESS_2_TRANSFER_WRITE_BIT, eHostRead = VK_ACCESS_2_HOST_READ_BIT, eHostWrite = VK_ACCESS_2_HOST_WRITE_BIT, eMemoryRead = VK_ACCESS_2_MEMORY_READ_BIT, eMemoryWrite = VK_ACCESS_2_MEMORY_WRITE_BIT, eShaderSampledRead = VK_ACCESS_2_SHADER_SAMPLED_READ_BIT, eShaderStorageRead = VK_ACCESS_2_SHADER_STORAGE_READ_BIT, eShaderStorageWrite = VK_ACCESS_2_SHADER_STORAGE_WRITE_BIT, eVideoDecodeReadKHR = VK_ACCESS_2_VIDEO_DECODE_READ_BIT_KHR, eVideoDecodeWriteKHR = VK_ACCESS_2_VIDEO_DECODE_WRITE_BIT_KHR, eVideoEncodeReadKHR = VK_ACCESS_2_VIDEO_ENCODE_READ_BIT_KHR, eVideoEncodeWriteKHR = VK_ACCESS_2_VIDEO_ENCODE_WRITE_BIT_KHR, eTransformFeedbackWriteEXT = VK_ACCESS_2_TRANSFORM_FEEDBACK_WRITE_BIT_EXT, eTransformFeedbackCounterReadEXT = VK_ACCESS_2_TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT, eTransformFeedbackCounterWriteEXT = VK_ACCESS_2_TRANSFORM_FEEDBACK_COUNTER_WRITE_BIT_EXT, eConditionalRenderingReadEXT = VK_ACCESS_2_CONDITIONAL_RENDERING_READ_BIT_EXT, eCommandPreprocessReadNV = VK_ACCESS_2_COMMAND_PREPROCESS_READ_BIT_NV, eCommandPreprocessReadEXT = VK_ACCESS_2_COMMAND_PREPROCESS_READ_BIT_EXT, eCommandPreprocessWriteNV = VK_ACCESS_2_COMMAND_PREPROCESS_WRITE_BIT_NV, eCommandPreprocessWriteEXT = VK_ACCESS_2_COMMAND_PREPROCESS_WRITE_BIT_EXT, eFragmentShadingRateAttachmentReadKHR = VK_ACCESS_2_FRAGMENT_SHADING_RATE_ATTACHMENT_READ_BIT_KHR, eShadingRateImageReadNV = VK_ACCESS_2_SHADING_RATE_IMAGE_READ_BIT_NV, eAccelerationStructureReadKHR = VK_ACCESS_2_ACCELERATION_STRUCTURE_READ_BIT_KHR, eAccelerationStructureReadNV = VK_ACCESS_2_ACCELERATION_STRUCTURE_READ_BIT_NV, eAccelerationStructureWriteKHR = VK_ACCESS_2_ACCELERATION_STRUCTURE_WRITE_BIT_KHR, eAccelerationStructureWriteNV = VK_ACCESS_2_ACCELERATION_STRUCTURE_WRITE_BIT_NV, eFragmentDensityMapReadEXT = VK_ACCESS_2_FRAGMENT_DENSITY_MAP_READ_BIT_EXT, eColorAttachmentReadNoncoherentEXT = VK_ACCESS_2_COLOR_ATTACHMENT_READ_NONCOHERENT_BIT_EXT, eDescriptorBufferReadEXT = VK_ACCESS_2_DESCRIPTOR_BUFFER_READ_BIT_EXT, eInvocationMaskReadHUAWEI = VK_ACCESS_2_INVOCATION_MASK_READ_BIT_HUAWEI, eShaderBindingTableReadKHR = VK_ACCESS_2_SHADER_BINDING_TABLE_READ_BIT_KHR, eMicromapReadEXT = VK_ACCESS_2_MICROMAP_READ_BIT_EXT, eMicromapWriteEXT = VK_ACCESS_2_MICROMAP_WRITE_BIT_EXT, eOpticalFlowReadNV = VK_ACCESS_2_OPTICAL_FLOW_READ_BIT_NV, eOpticalFlowWriteNV = VK_ACCESS_2_OPTICAL_FLOW_WRITE_BIT_NV }; using AccessFlagBits2KHR = AccessFlagBits2; using AccessFlags2 = Flags; using AccessFlags2KHR = AccessFlags2; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR AccessFlags2 allFlags = AccessFlagBits2::eNone | AccessFlagBits2::eIndirectCommandRead | AccessFlagBits2::eIndexRead | AccessFlagBits2::eVertexAttributeRead | AccessFlagBits2::eUniformRead | AccessFlagBits2::eInputAttachmentRead | AccessFlagBits2::eShaderRead | AccessFlagBits2::eShaderWrite | AccessFlagBits2::eColorAttachmentRead | AccessFlagBits2::eColorAttachmentWrite | AccessFlagBits2::eDepthStencilAttachmentRead | AccessFlagBits2::eDepthStencilAttachmentWrite | AccessFlagBits2::eTransferRead | AccessFlagBits2::eTransferWrite | AccessFlagBits2::eHostRead | AccessFlagBits2::eHostWrite | AccessFlagBits2::eMemoryRead | AccessFlagBits2::eMemoryWrite | AccessFlagBits2::eShaderSampledRead | AccessFlagBits2::eShaderStorageRead | AccessFlagBits2::eShaderStorageWrite | AccessFlagBits2::eVideoDecodeReadKHR | AccessFlagBits2::eVideoDecodeWriteKHR | AccessFlagBits2::eVideoEncodeReadKHR | AccessFlagBits2::eVideoEncodeWriteKHR | AccessFlagBits2::eTransformFeedbackWriteEXT | AccessFlagBits2::eTransformFeedbackCounterReadEXT | AccessFlagBits2::eTransformFeedbackCounterWriteEXT | AccessFlagBits2::eConditionalRenderingReadEXT | AccessFlagBits2::eCommandPreprocessReadNV | AccessFlagBits2::eCommandPreprocessWriteNV | AccessFlagBits2::eFragmentShadingRateAttachmentReadKHR | AccessFlagBits2::eAccelerationStructureReadKHR | AccessFlagBits2::eAccelerationStructureWriteKHR | AccessFlagBits2::eFragmentDensityMapReadEXT | AccessFlagBits2::eColorAttachmentReadNoncoherentEXT | AccessFlagBits2::eDescriptorBufferReadEXT | AccessFlagBits2::eInvocationMaskReadHUAWEI | AccessFlagBits2::eShaderBindingTableReadKHR | AccessFlagBits2::eMicromapReadEXT | AccessFlagBits2::eMicromapWriteEXT | AccessFlagBits2::eOpticalFlowReadNV | AccessFlagBits2::eOpticalFlowWriteNV; }; enum class SubmitFlagBits : VkSubmitFlags { eProtected = VK_SUBMIT_PROTECTED_BIT }; using SubmitFlagBitsKHR = SubmitFlagBits; using SubmitFlags = Flags; using SubmitFlagsKHR = SubmitFlags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR SubmitFlags allFlags = SubmitFlagBits::eProtected; }; enum class RenderingFlagBits : VkRenderingFlags { eContentsSecondaryCommandBuffers = VK_RENDERING_CONTENTS_SECONDARY_COMMAND_BUFFERS_BIT, eSuspending = VK_RENDERING_SUSPENDING_BIT, eResuming = VK_RENDERING_RESUMING_BIT, eEnableLegacyDitheringEXT = VK_RENDERING_ENABLE_LEGACY_DITHERING_BIT_EXT, eContentsInlineKHR = VK_RENDERING_CONTENTS_INLINE_BIT_KHR, eContentsInlineEXT = VK_RENDERING_CONTENTS_INLINE_BIT_EXT }; using RenderingFlagBitsKHR = RenderingFlagBits; using RenderingFlags = Flags; using RenderingFlagsKHR = RenderingFlags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR RenderingFlags allFlags = RenderingFlagBits::eContentsSecondaryCommandBuffers | RenderingFlagBits::eSuspending | RenderingFlagBits::eResuming | RenderingFlagBits::eEnableLegacyDitheringEXT | RenderingFlagBits::eContentsInlineKHR; }; enum class FormatFeatureFlagBits2 : VkFormatFeatureFlags2 { eSampledImage = VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_BIT, eStorageImage = VK_FORMAT_FEATURE_2_STORAGE_IMAGE_BIT, eStorageImageAtomic = VK_FORMAT_FEATURE_2_STORAGE_IMAGE_ATOMIC_BIT, eUniformTexelBuffer = VK_FORMAT_FEATURE_2_UNIFORM_TEXEL_BUFFER_BIT, eStorageTexelBuffer = VK_FORMAT_FEATURE_2_STORAGE_TEXEL_BUFFER_BIT, eStorageTexelBufferAtomic = VK_FORMAT_FEATURE_2_STORAGE_TEXEL_BUFFER_ATOMIC_BIT, eVertexBuffer = VK_FORMAT_FEATURE_2_VERTEX_BUFFER_BIT, eColorAttachment = VK_FORMAT_FEATURE_2_COLOR_ATTACHMENT_BIT, eColorAttachmentBlend = VK_FORMAT_FEATURE_2_COLOR_ATTACHMENT_BLEND_BIT, eDepthStencilAttachment = VK_FORMAT_FEATURE_2_DEPTH_STENCIL_ATTACHMENT_BIT, eBlitSrc = VK_FORMAT_FEATURE_2_BLIT_SRC_BIT, eBlitDst = VK_FORMAT_FEATURE_2_BLIT_DST_BIT, eSampledImageFilterLinear = VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_FILTER_LINEAR_BIT, eTransferSrc = VK_FORMAT_FEATURE_2_TRANSFER_SRC_BIT, eTransferDst = VK_FORMAT_FEATURE_2_TRANSFER_DST_BIT, eSampledImageFilterMinmax = VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_FILTER_MINMAX_BIT, eMidpointChromaSamples = VK_FORMAT_FEATURE_2_MIDPOINT_CHROMA_SAMPLES_BIT, eSampledImageYcbcrConversionLinearFilter = VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT, eSampledImageYcbcrConversionSeparateReconstructionFilter = VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT, eSampledImageYcbcrConversionChromaReconstructionExplicit = VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_BIT, eSampledImageYcbcrConversionChromaReconstructionExplicitForceable = VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT, eDisjoint = VK_FORMAT_FEATURE_2_DISJOINT_BIT, eCositedChromaSamples = VK_FORMAT_FEATURE_2_COSITED_CHROMA_SAMPLES_BIT, eStorageReadWithoutFormat = VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT, eStorageWriteWithoutFormat = VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT, eSampledImageDepthComparison = VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT, eSampledImageFilterCubic = VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_FILTER_CUBIC_BIT, eSampledImageFilterCubicEXT = VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT, eHostImageTransfer = VK_FORMAT_FEATURE_2_HOST_IMAGE_TRANSFER_BIT, eHostImageTransferEXT = VK_FORMAT_FEATURE_2_HOST_IMAGE_TRANSFER_BIT_EXT, eVideoDecodeOutputKHR = VK_FORMAT_FEATURE_2_VIDEO_DECODE_OUTPUT_BIT_KHR, eVideoDecodeDpbKHR = VK_FORMAT_FEATURE_2_VIDEO_DECODE_DPB_BIT_KHR, eAccelerationStructureVertexBufferKHR = VK_FORMAT_FEATURE_2_ACCELERATION_STRUCTURE_VERTEX_BUFFER_BIT_KHR, eFragmentDensityMapEXT = VK_FORMAT_FEATURE_2_FRAGMENT_DENSITY_MAP_BIT_EXT, eFragmentShadingRateAttachmentKHR = VK_FORMAT_FEATURE_2_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR, eVideoEncodeInputKHR = VK_FORMAT_FEATURE_2_VIDEO_ENCODE_INPUT_BIT_KHR, eVideoEncodeDpbKHR = VK_FORMAT_FEATURE_2_VIDEO_ENCODE_DPB_BIT_KHR, eAccelerationStructureRadiusBufferNV = VK_FORMAT_FEATURE_2_ACCELERATION_STRUCTURE_RADIUS_BUFFER_BIT_NV, eLinearColorAttachmentNV = VK_FORMAT_FEATURE_2_LINEAR_COLOR_ATTACHMENT_BIT_NV, eWeightImageQCOM = VK_FORMAT_FEATURE_2_WEIGHT_IMAGE_BIT_QCOM, eWeightSampledImageQCOM = VK_FORMAT_FEATURE_2_WEIGHT_SAMPLED_IMAGE_BIT_QCOM, eBlockMatchingQCOM = VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM, eBoxFilterSampledQCOM = VK_FORMAT_FEATURE_2_BOX_FILTER_SAMPLED_BIT_QCOM, eOpticalFlowImageNV = VK_FORMAT_FEATURE_2_OPTICAL_FLOW_IMAGE_BIT_NV, eOpticalFlowVectorNV = VK_FORMAT_FEATURE_2_OPTICAL_FLOW_VECTOR_BIT_NV, eOpticalFlowCostNV = VK_FORMAT_FEATURE_2_OPTICAL_FLOW_COST_BIT_NV, eVideoEncodeQuantizationDeltaMapKHR = VK_FORMAT_FEATURE_2_VIDEO_ENCODE_QUANTIZATION_DELTA_MAP_BIT_KHR, eVideoEncodeEmphasisMapKHR = VK_FORMAT_FEATURE_2_VIDEO_ENCODE_EMPHASIS_MAP_BIT_KHR }; using FormatFeatureFlagBits2KHR = FormatFeatureFlagBits2; using FormatFeatureFlags2 = Flags; using FormatFeatureFlags2KHR = FormatFeatureFlags2; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR FormatFeatureFlags2 allFlags = FormatFeatureFlagBits2::eSampledImage | FormatFeatureFlagBits2::eStorageImage | FormatFeatureFlagBits2::eStorageImageAtomic | FormatFeatureFlagBits2::eUniformTexelBuffer | FormatFeatureFlagBits2::eStorageTexelBuffer | FormatFeatureFlagBits2::eStorageTexelBufferAtomic | FormatFeatureFlagBits2::eVertexBuffer | FormatFeatureFlagBits2::eColorAttachment | FormatFeatureFlagBits2::eColorAttachmentBlend | FormatFeatureFlagBits2::eDepthStencilAttachment | FormatFeatureFlagBits2::eBlitSrc | FormatFeatureFlagBits2::eBlitDst | FormatFeatureFlagBits2::eSampledImageFilterLinear | FormatFeatureFlagBits2::eTransferSrc | FormatFeatureFlagBits2::eTransferDst | FormatFeatureFlagBits2::eSampledImageFilterMinmax | FormatFeatureFlagBits2::eMidpointChromaSamples | FormatFeatureFlagBits2::eSampledImageYcbcrConversionLinearFilter | FormatFeatureFlagBits2::eSampledImageYcbcrConversionSeparateReconstructionFilter | FormatFeatureFlagBits2::eSampledImageYcbcrConversionChromaReconstructionExplicit | FormatFeatureFlagBits2::eSampledImageYcbcrConversionChromaReconstructionExplicitForceable | FormatFeatureFlagBits2::eDisjoint | FormatFeatureFlagBits2::eCositedChromaSamples | FormatFeatureFlagBits2::eStorageReadWithoutFormat | FormatFeatureFlagBits2::eStorageWriteWithoutFormat | FormatFeatureFlagBits2::eSampledImageDepthComparison | FormatFeatureFlagBits2::eSampledImageFilterCubic | FormatFeatureFlagBits2::eHostImageTransfer | FormatFeatureFlagBits2::eVideoDecodeOutputKHR | FormatFeatureFlagBits2::eVideoDecodeDpbKHR | FormatFeatureFlagBits2::eAccelerationStructureVertexBufferKHR | FormatFeatureFlagBits2::eFragmentDensityMapEXT | FormatFeatureFlagBits2::eFragmentShadingRateAttachmentKHR | FormatFeatureFlagBits2::eVideoEncodeInputKHR | FormatFeatureFlagBits2::eVideoEncodeDpbKHR | FormatFeatureFlagBits2::eAccelerationStructureRadiusBufferNV | FormatFeatureFlagBits2::eLinearColorAttachmentNV | FormatFeatureFlagBits2::eWeightImageQCOM | FormatFeatureFlagBits2::eWeightSampledImageQCOM | FormatFeatureFlagBits2::eBlockMatchingQCOM | FormatFeatureFlagBits2::eBoxFilterSampledQCOM | FormatFeatureFlagBits2::eOpticalFlowImageNV | FormatFeatureFlagBits2::eOpticalFlowVectorNV | FormatFeatureFlagBits2::eOpticalFlowCostNV | FormatFeatureFlagBits2::eVideoEncodeQuantizationDeltaMapKHR | FormatFeatureFlagBits2::eVideoEncodeEmphasisMapKHR; }; //=== VK_VERSION_1_4 === enum class QueueGlobalPriority { eLow = VK_QUEUE_GLOBAL_PRIORITY_LOW, eLowKHR = VK_QUEUE_GLOBAL_PRIORITY_LOW_KHR, eMedium = VK_QUEUE_GLOBAL_PRIORITY_MEDIUM, eMediumKHR = VK_QUEUE_GLOBAL_PRIORITY_MEDIUM_KHR, eHigh = VK_QUEUE_GLOBAL_PRIORITY_HIGH, eHighKHR = VK_QUEUE_GLOBAL_PRIORITY_HIGH_KHR, eRealtime = VK_QUEUE_GLOBAL_PRIORITY_REALTIME, eRealtimeKHR = VK_QUEUE_GLOBAL_PRIORITY_REALTIME_KHR }; using QueueGlobalPriorityEXT = QueueGlobalPriority; using QueueGlobalPriorityKHR = QueueGlobalPriority; enum class LineRasterizationMode { eDefault = VK_LINE_RASTERIZATION_MODE_DEFAULT, eDefaultKHR = VK_LINE_RASTERIZATION_MODE_DEFAULT_KHR, eRectangular = VK_LINE_RASTERIZATION_MODE_RECTANGULAR, eRectangularKHR = VK_LINE_RASTERIZATION_MODE_RECTANGULAR_KHR, eBresenham = VK_LINE_RASTERIZATION_MODE_BRESENHAM, eBresenhamKHR = VK_LINE_RASTERIZATION_MODE_BRESENHAM_KHR, eRectangularSmooth = VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH, eRectangularSmoothKHR = VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH_KHR }; using LineRasterizationModeEXT = LineRasterizationMode; using LineRasterizationModeKHR = LineRasterizationMode; enum class MemoryUnmapFlagBits : VkMemoryUnmapFlags { eReserveEXT = VK_MEMORY_UNMAP_RESERVE_BIT_EXT }; using MemoryUnmapFlagBitsKHR = MemoryUnmapFlagBits; using MemoryUnmapFlags = Flags; using MemoryUnmapFlagsKHR = MemoryUnmapFlags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR MemoryUnmapFlags allFlags = MemoryUnmapFlagBits::eReserveEXT; }; enum class PipelineCreateFlagBits2 : VkPipelineCreateFlags2 { eDisableOptimization = VK_PIPELINE_CREATE_2_DISABLE_OPTIMIZATION_BIT, eAllowDerivatives = VK_PIPELINE_CREATE_2_ALLOW_DERIVATIVES_BIT, eDerivative = VK_PIPELINE_CREATE_2_DERIVATIVE_BIT, eViewIndexFromDeviceIndex = VK_PIPELINE_CREATE_2_VIEW_INDEX_FROM_DEVICE_INDEX_BIT, eDispatchBase = VK_PIPELINE_CREATE_2_DISPATCH_BASE_BIT, eFailOnPipelineCompileRequired = VK_PIPELINE_CREATE_2_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT, eEarlyReturnOnFailure = VK_PIPELINE_CREATE_2_EARLY_RETURN_ON_FAILURE_BIT, eNoProtectedAccess = VK_PIPELINE_CREATE_2_NO_PROTECTED_ACCESS_BIT, eNoProtectedAccessEXT = VK_PIPELINE_CREATE_2_NO_PROTECTED_ACCESS_BIT_EXT, eProtectedAccessOnly = VK_PIPELINE_CREATE_2_PROTECTED_ACCESS_ONLY_BIT, eProtectedAccessOnlyEXT = VK_PIPELINE_CREATE_2_PROTECTED_ACCESS_ONLY_BIT_EXT, #if defined( VK_ENABLE_BETA_EXTENSIONS ) eExecutionGraphAMDX = VK_PIPELINE_CREATE_2_EXECUTION_GRAPH_BIT_AMDX, #endif /*VK_ENABLE_BETA_EXTENSIONS*/ eRayTracingAllowSpheresAndLinearSweptSpheresNV = VK_PIPELINE_CREATE_2_RAY_TRACING_ALLOW_SPHERES_AND_LINEAR_SWEPT_SPHERES_BIT_NV, eEnableLegacyDitheringEXT = VK_PIPELINE_CREATE_2_ENABLE_LEGACY_DITHERING_BIT_EXT, eDeferCompileNV = VK_PIPELINE_CREATE_2_DEFER_COMPILE_BIT_NV, eCaptureStatisticsKHR = VK_PIPELINE_CREATE_2_CAPTURE_STATISTICS_BIT_KHR, eCaptureInternalRepresentationsKHR = VK_PIPELINE_CREATE_2_CAPTURE_INTERNAL_REPRESENTATIONS_BIT_KHR, eLinkTimeOptimizationEXT = VK_PIPELINE_CREATE_2_LINK_TIME_OPTIMIZATION_BIT_EXT, eRetainLinkTimeOptimizationInfoEXT = VK_PIPELINE_CREATE_2_RETAIN_LINK_TIME_OPTIMIZATION_INFO_BIT_EXT, eLibraryKHR = VK_PIPELINE_CREATE_2_LIBRARY_BIT_KHR, eRayTracingSkipTrianglesKHR = VK_PIPELINE_CREATE_2_RAY_TRACING_SKIP_TRIANGLES_BIT_KHR, eRayTracingSkipBuiltInPrimitives = VK_PIPELINE_CREATE_2_RAY_TRACING_SKIP_BUILT_IN_PRIMITIVES_BIT_KHR, eRayTracingSkipAabbsKHR = VK_PIPELINE_CREATE_2_RAY_TRACING_SKIP_AABBS_BIT_KHR, eRayTracingNoNullAnyHitShadersKHR = VK_PIPELINE_CREATE_2_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHR, eRayTracingNoNullClosestHitShadersKHR = VK_PIPELINE_CREATE_2_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR, eRayTracingNoNullMissShadersKHR = VK_PIPELINE_CREATE_2_RAY_TRACING_NO_NULL_MISS_SHADERS_BIT_KHR, eRayTracingNoNullIntersectionShadersKHR = VK_PIPELINE_CREATE_2_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR, eRayTracingShaderGroupHandleCaptureReplayKHR = VK_PIPELINE_CREATE_2_RAY_TRACING_SHADER_GROUP_HANDLE_CAPTURE_REPLAY_BIT_KHR, eIndirectBindableNV = VK_PIPELINE_CREATE_2_INDIRECT_BINDABLE_BIT_NV, eRayTracingAllowMotionNV = VK_PIPELINE_CREATE_2_RAY_TRACING_ALLOW_MOTION_BIT_NV, eRenderingFragmentShadingRateAttachmentKHR = VK_PIPELINE_CREATE_2_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR, eRenderingFragmentDensityMapAttachmentEXT = VK_PIPELINE_CREATE_2_RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT, eRayTracingOpacityMicromapEXT = VK_PIPELINE_CREATE_2_RAY_TRACING_OPACITY_MICROMAP_BIT_EXT, eColorAttachmentFeedbackLoopEXT = VK_PIPELINE_CREATE_2_COLOR_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT, eDepthStencilAttachmentFeedbackLoopEXT = VK_PIPELINE_CREATE_2_DEPTH_STENCIL_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT, eRayTracingDisplacementMicromapNV = VK_PIPELINE_CREATE_2_RAY_TRACING_DISPLACEMENT_MICROMAP_BIT_NV, eDescriptorBufferEXT = VK_PIPELINE_CREATE_2_DESCRIPTOR_BUFFER_BIT_EXT, eDisallowOpacityMicromapARM = VK_PIPELINE_CREATE_2_DISALLOW_OPACITY_MICROMAP_BIT_ARM, eCaptureDataKHR = VK_PIPELINE_CREATE_2_CAPTURE_DATA_BIT_KHR, eIndirectBindableEXT = VK_PIPELINE_CREATE_2_INDIRECT_BINDABLE_BIT_EXT }; using PipelineCreateFlagBits2KHR = PipelineCreateFlagBits2; using PipelineCreateFlags2 = Flags; using PipelineCreateFlags2KHR = PipelineCreateFlags2; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR PipelineCreateFlags2 allFlags = PipelineCreateFlagBits2::eDisableOptimization | PipelineCreateFlagBits2::eAllowDerivatives | PipelineCreateFlagBits2::eDerivative | PipelineCreateFlagBits2::eViewIndexFromDeviceIndex | PipelineCreateFlagBits2::eDispatchBase | PipelineCreateFlagBits2::eFailOnPipelineCompileRequired | PipelineCreateFlagBits2::eEarlyReturnOnFailure | PipelineCreateFlagBits2::eNoProtectedAccess | PipelineCreateFlagBits2::eProtectedAccessOnly #if defined( VK_ENABLE_BETA_EXTENSIONS ) | PipelineCreateFlagBits2::eExecutionGraphAMDX #endif /*VK_ENABLE_BETA_EXTENSIONS*/ | PipelineCreateFlagBits2::eRayTracingAllowSpheresAndLinearSweptSpheresNV | PipelineCreateFlagBits2::eEnableLegacyDitheringEXT | PipelineCreateFlagBits2::eDeferCompileNV | PipelineCreateFlagBits2::eCaptureStatisticsKHR | PipelineCreateFlagBits2::eCaptureInternalRepresentationsKHR | PipelineCreateFlagBits2::eLinkTimeOptimizationEXT | PipelineCreateFlagBits2::eRetainLinkTimeOptimizationInfoEXT | PipelineCreateFlagBits2::eLibraryKHR | PipelineCreateFlagBits2::eRayTracingSkipTrianglesKHR | PipelineCreateFlagBits2::eRayTracingSkipAabbsKHR | PipelineCreateFlagBits2::eRayTracingNoNullAnyHitShadersKHR | PipelineCreateFlagBits2::eRayTracingNoNullClosestHitShadersKHR | PipelineCreateFlagBits2::eRayTracingNoNullMissShadersKHR | PipelineCreateFlagBits2::eRayTracingNoNullIntersectionShadersKHR | PipelineCreateFlagBits2::eRayTracingShaderGroupHandleCaptureReplayKHR | PipelineCreateFlagBits2::eIndirectBindableNV | PipelineCreateFlagBits2::eRayTracingAllowMotionNV | PipelineCreateFlagBits2::eRenderingFragmentShadingRateAttachmentKHR | PipelineCreateFlagBits2::eRenderingFragmentDensityMapAttachmentEXT | PipelineCreateFlagBits2::eRayTracingOpacityMicromapEXT | PipelineCreateFlagBits2::eColorAttachmentFeedbackLoopEXT | PipelineCreateFlagBits2::eDepthStencilAttachmentFeedbackLoopEXT | PipelineCreateFlagBits2::eRayTracingDisplacementMicromapNV | PipelineCreateFlagBits2::eDescriptorBufferEXT | PipelineCreateFlagBits2::eDisallowOpacityMicromapARM | PipelineCreateFlagBits2::eCaptureDataKHR | PipelineCreateFlagBits2::eIndirectBindableEXT; }; enum class BufferUsageFlagBits2 : VkBufferUsageFlags2 { eTransferSrc = VK_BUFFER_USAGE_2_TRANSFER_SRC_BIT, eTransferDst = VK_BUFFER_USAGE_2_TRANSFER_DST_BIT, eUniformTexelBuffer = VK_BUFFER_USAGE_2_UNIFORM_TEXEL_BUFFER_BIT, eStorageTexelBuffer = VK_BUFFER_USAGE_2_STORAGE_TEXEL_BUFFER_BIT, eUniformBuffer = VK_BUFFER_USAGE_2_UNIFORM_BUFFER_BIT, eStorageBuffer = VK_BUFFER_USAGE_2_STORAGE_BUFFER_BIT, eIndexBuffer = VK_BUFFER_USAGE_2_INDEX_BUFFER_BIT, eVertexBuffer = VK_BUFFER_USAGE_2_VERTEX_BUFFER_BIT, eIndirectBuffer = VK_BUFFER_USAGE_2_INDIRECT_BUFFER_BIT, eShaderDeviceAddress = VK_BUFFER_USAGE_2_SHADER_DEVICE_ADDRESS_BIT, #if defined( VK_ENABLE_BETA_EXTENSIONS ) eExecutionGraphScratchAMDX = VK_BUFFER_USAGE_2_EXECUTION_GRAPH_SCRATCH_BIT_AMDX, #endif /*VK_ENABLE_BETA_EXTENSIONS*/ eConditionalRenderingEXT = VK_BUFFER_USAGE_2_CONDITIONAL_RENDERING_BIT_EXT, eShaderBindingTableKHR = VK_BUFFER_USAGE_2_SHADER_BINDING_TABLE_BIT_KHR, eRayTracingNV = VK_BUFFER_USAGE_2_RAY_TRACING_BIT_NV, eTransformFeedbackBufferEXT = VK_BUFFER_USAGE_2_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT, eTransformFeedbackCounterBufferEXT = VK_BUFFER_USAGE_2_TRANSFORM_FEEDBACK_COUNTER_BUFFER_BIT_EXT, eVideoDecodeSrcKHR = VK_BUFFER_USAGE_2_VIDEO_DECODE_SRC_BIT_KHR, eVideoDecodeDstKHR = VK_BUFFER_USAGE_2_VIDEO_DECODE_DST_BIT_KHR, eVideoEncodeDstKHR = VK_BUFFER_USAGE_2_VIDEO_ENCODE_DST_BIT_KHR, eVideoEncodeSrcKHR = VK_BUFFER_USAGE_2_VIDEO_ENCODE_SRC_BIT_KHR, eAccelerationStructureBuildInputReadOnlyKHR = VK_BUFFER_USAGE_2_ACCELERATION_STRUCTURE_BUILD_INPUT_READ_ONLY_BIT_KHR, eAccelerationStructureStorageKHR = VK_BUFFER_USAGE_2_ACCELERATION_STRUCTURE_STORAGE_BIT_KHR, eSamplerDescriptorBufferEXT = VK_BUFFER_USAGE_2_SAMPLER_DESCRIPTOR_BUFFER_BIT_EXT, eResourceDescriptorBufferEXT = VK_BUFFER_USAGE_2_RESOURCE_DESCRIPTOR_BUFFER_BIT_EXT, ePushDescriptorsDescriptorBufferEXT = VK_BUFFER_USAGE_2_PUSH_DESCRIPTORS_DESCRIPTOR_BUFFER_BIT_EXT, eMicromapBuildInputReadOnlyEXT = VK_BUFFER_USAGE_2_MICROMAP_BUILD_INPUT_READ_ONLY_BIT_EXT, eMicromapStorageEXT = VK_BUFFER_USAGE_2_MICROMAP_STORAGE_BIT_EXT, ePreprocessBufferEXT = VK_BUFFER_USAGE_2_PREPROCESS_BUFFER_BIT_EXT }; using BufferUsageFlagBits2KHR = BufferUsageFlagBits2; using BufferUsageFlags2 = Flags; using BufferUsageFlags2KHR = BufferUsageFlags2; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR BufferUsageFlags2 allFlags = BufferUsageFlagBits2::eTransferSrc | BufferUsageFlagBits2::eTransferDst | BufferUsageFlagBits2::eUniformTexelBuffer | BufferUsageFlagBits2::eStorageTexelBuffer | BufferUsageFlagBits2::eUniformBuffer | BufferUsageFlagBits2::eStorageBuffer | BufferUsageFlagBits2::eIndexBuffer | BufferUsageFlagBits2::eVertexBuffer | BufferUsageFlagBits2::eIndirectBuffer | BufferUsageFlagBits2::eShaderDeviceAddress #if defined( VK_ENABLE_BETA_EXTENSIONS ) | BufferUsageFlagBits2::eExecutionGraphScratchAMDX #endif /*VK_ENABLE_BETA_EXTENSIONS*/ | BufferUsageFlagBits2::eConditionalRenderingEXT | BufferUsageFlagBits2::eShaderBindingTableKHR | BufferUsageFlagBits2::eTransformFeedbackBufferEXT | BufferUsageFlagBits2::eTransformFeedbackCounterBufferEXT | BufferUsageFlagBits2::eVideoDecodeSrcKHR | BufferUsageFlagBits2::eVideoDecodeDstKHR | BufferUsageFlagBits2::eVideoEncodeDstKHR | BufferUsageFlagBits2::eVideoEncodeSrcKHR | BufferUsageFlagBits2::eAccelerationStructureBuildInputReadOnlyKHR | BufferUsageFlagBits2::eAccelerationStructureStorageKHR | BufferUsageFlagBits2::eSamplerDescriptorBufferEXT | BufferUsageFlagBits2::eResourceDescriptorBufferEXT | BufferUsageFlagBits2::ePushDescriptorsDescriptorBufferEXT | BufferUsageFlagBits2::eMicromapBuildInputReadOnlyEXT | BufferUsageFlagBits2::eMicromapStorageEXT | BufferUsageFlagBits2::ePreprocessBufferEXT; }; enum class PipelineRobustnessBufferBehavior { eDeviceDefault = VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_DEVICE_DEFAULT, eDisabled = VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_DISABLED, eRobustBufferAccess = VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS, eRobustBufferAccess2 = VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 }; using PipelineRobustnessBufferBehaviorEXT = PipelineRobustnessBufferBehavior; enum class PipelineRobustnessImageBehavior { eDeviceDefault = VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_DEVICE_DEFAULT, eDisabled = VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_DISABLED, eRobustImageAccess = VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_ROBUST_IMAGE_ACCESS, eRobustImageAccess2 = VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_ROBUST_IMAGE_ACCESS_2 }; using PipelineRobustnessImageBehaviorEXT = PipelineRobustnessImageBehavior; enum class HostImageCopyFlagBits : VkHostImageCopyFlags { eMemcpy = VK_HOST_IMAGE_COPY_MEMCPY }; using HostImageCopyFlagBitsEXT = HostImageCopyFlagBits; using HostImageCopyFlags = Flags; using HostImageCopyFlagsEXT = HostImageCopyFlags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR HostImageCopyFlags allFlags = HostImageCopyFlagBits::eMemcpy; }; //=== VK_KHR_surface === enum class SurfaceTransformFlagBitsKHR : VkSurfaceTransformFlagsKHR { eIdentity = VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR, eRotate90 = VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR, eRotate180 = VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR, eRotate270 = VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR, eHorizontalMirror = VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_BIT_KHR, eHorizontalMirrorRotate90 = VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_90_BIT_KHR, eHorizontalMirrorRotate180 = VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_180_BIT_KHR, eHorizontalMirrorRotate270 = VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR, eInherit = VK_SURFACE_TRANSFORM_INHERIT_BIT_KHR }; using SurfaceTransformFlagsKHR = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR SurfaceTransformFlagsKHR allFlags = SurfaceTransformFlagBitsKHR::eIdentity | SurfaceTransformFlagBitsKHR::eRotate90 | SurfaceTransformFlagBitsKHR::eRotate180 | SurfaceTransformFlagBitsKHR::eRotate270 | SurfaceTransformFlagBitsKHR::eHorizontalMirror | SurfaceTransformFlagBitsKHR::eHorizontalMirrorRotate90 | SurfaceTransformFlagBitsKHR::eHorizontalMirrorRotate180 | SurfaceTransformFlagBitsKHR::eHorizontalMirrorRotate270 | SurfaceTransformFlagBitsKHR::eInherit; }; enum class PresentModeKHR { eImmediate = VK_PRESENT_MODE_IMMEDIATE_KHR, eMailbox = VK_PRESENT_MODE_MAILBOX_KHR, eFifo = VK_PRESENT_MODE_FIFO_KHR, eFifoRelaxed = VK_PRESENT_MODE_FIFO_RELAXED_KHR, eSharedDemandRefresh = VK_PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR, eSharedContinuousRefresh = VK_PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR, eFifoLatestReadyEXT = VK_PRESENT_MODE_FIFO_LATEST_READY_EXT }; enum class ColorSpaceKHR { eSrgbNonlinear = VK_COLOR_SPACE_SRGB_NONLINEAR_KHR, eVkColorspaceSrgbNonlinear = VK_COLORSPACE_SRGB_NONLINEAR_KHR, eDisplayP3NonlinearEXT = VK_COLOR_SPACE_DISPLAY_P3_NONLINEAR_EXT, eExtendedSrgbLinearEXT = VK_COLOR_SPACE_EXTENDED_SRGB_LINEAR_EXT, eDisplayP3LinearEXT = VK_COLOR_SPACE_DISPLAY_P3_LINEAR_EXT, eDciP3LinearEXT = VK_COLOR_SPACE_DCI_P3_LINEAR_EXT, eDciP3NonlinearEXT = VK_COLOR_SPACE_DCI_P3_NONLINEAR_EXT, eBt709LinearEXT = VK_COLOR_SPACE_BT709_LINEAR_EXT, eBt709NonlinearEXT = VK_COLOR_SPACE_BT709_NONLINEAR_EXT, eBt2020LinearEXT = VK_COLOR_SPACE_BT2020_LINEAR_EXT, eHdr10St2084EXT = VK_COLOR_SPACE_HDR10_ST2084_EXT, eDolbyvisionEXT VULKAN_HPP_DEPRECATED_17( "eDolbyvisionEXT is deprecated, but no reason was given in the API XML" ) = VK_COLOR_SPACE_DOLBYVISION_EXT, eHdr10HlgEXT = VK_COLOR_SPACE_HDR10_HLG_EXT, eAdobergbLinearEXT = VK_COLOR_SPACE_ADOBERGB_LINEAR_EXT, eAdobergbNonlinearEXT = VK_COLOR_SPACE_ADOBERGB_NONLINEAR_EXT, ePassThroughEXT = VK_COLOR_SPACE_PASS_THROUGH_EXT, eExtendedSrgbNonlinearEXT = VK_COLOR_SPACE_EXTENDED_SRGB_NONLINEAR_EXT, eDisplayNativeAMD = VK_COLOR_SPACE_DISPLAY_NATIVE_AMD }; enum class CompositeAlphaFlagBitsKHR : VkCompositeAlphaFlagsKHR { eOpaque = VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR, ePreMultiplied = VK_COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR, ePostMultiplied = VK_COMPOSITE_ALPHA_POST_MULTIPLIED_BIT_KHR, eInherit = VK_COMPOSITE_ALPHA_INHERIT_BIT_KHR }; using CompositeAlphaFlagsKHR = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR CompositeAlphaFlagsKHR allFlags = CompositeAlphaFlagBitsKHR::eOpaque | CompositeAlphaFlagBitsKHR::ePreMultiplied | CompositeAlphaFlagBitsKHR::ePostMultiplied | CompositeAlphaFlagBitsKHR::eInherit; }; //=== VK_KHR_swapchain === enum class SwapchainCreateFlagBitsKHR : VkSwapchainCreateFlagsKHR { eSplitInstanceBindRegions = VK_SWAPCHAIN_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT_KHR, eProtected = VK_SWAPCHAIN_CREATE_PROTECTED_BIT_KHR, eMutableFormat = VK_SWAPCHAIN_CREATE_MUTABLE_FORMAT_BIT_KHR, eDeferredMemoryAllocationEXT = VK_SWAPCHAIN_CREATE_DEFERRED_MEMORY_ALLOCATION_BIT_EXT }; using SwapchainCreateFlagsKHR = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR SwapchainCreateFlagsKHR allFlags = SwapchainCreateFlagBitsKHR::eSplitInstanceBindRegions | SwapchainCreateFlagBitsKHR::eProtected | SwapchainCreateFlagBitsKHR::eMutableFormat | SwapchainCreateFlagBitsKHR::eDeferredMemoryAllocationEXT; }; enum class DeviceGroupPresentModeFlagBitsKHR : VkDeviceGroupPresentModeFlagsKHR { eLocal = VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_BIT_KHR, eRemote = VK_DEVICE_GROUP_PRESENT_MODE_REMOTE_BIT_KHR, eSum = VK_DEVICE_GROUP_PRESENT_MODE_SUM_BIT_KHR, eLocalMultiDevice = VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_MULTI_DEVICE_BIT_KHR }; using DeviceGroupPresentModeFlagsKHR = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR DeviceGroupPresentModeFlagsKHR allFlags = DeviceGroupPresentModeFlagBitsKHR::eLocal | DeviceGroupPresentModeFlagBitsKHR::eRemote | DeviceGroupPresentModeFlagBitsKHR::eSum | DeviceGroupPresentModeFlagBitsKHR::eLocalMultiDevice; }; //=== VK_KHR_display === enum class DisplayPlaneAlphaFlagBitsKHR : VkDisplayPlaneAlphaFlagsKHR { eOpaque = VK_DISPLAY_PLANE_ALPHA_OPAQUE_BIT_KHR, eGlobal = VK_DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR, ePerPixel = VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_BIT_KHR, ePerPixelPremultiplied = VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_PREMULTIPLIED_BIT_KHR }; using DisplayPlaneAlphaFlagsKHR = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR DisplayPlaneAlphaFlagsKHR allFlags = DisplayPlaneAlphaFlagBitsKHR::eOpaque | DisplayPlaneAlphaFlagBitsKHR::eGlobal | DisplayPlaneAlphaFlagBitsKHR::ePerPixel | DisplayPlaneAlphaFlagBitsKHR::ePerPixelPremultiplied; }; enum class DisplayModeCreateFlagBitsKHR : VkDisplayModeCreateFlagsKHR { }; using DisplayModeCreateFlagsKHR = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR DisplayModeCreateFlagsKHR allFlags = {}; }; enum class DisplaySurfaceCreateFlagBitsKHR : VkDisplaySurfaceCreateFlagsKHR { }; using DisplaySurfaceCreateFlagsKHR = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR DisplaySurfaceCreateFlagsKHR allFlags = {}; }; #if defined( VK_USE_PLATFORM_XLIB_KHR ) //=== VK_KHR_xlib_surface === enum class XlibSurfaceCreateFlagBitsKHR : VkXlibSurfaceCreateFlagsKHR { }; using XlibSurfaceCreateFlagsKHR = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR XlibSurfaceCreateFlagsKHR allFlags = {}; }; #endif /*VK_USE_PLATFORM_XLIB_KHR*/ #if defined( VK_USE_PLATFORM_XCB_KHR ) //=== VK_KHR_xcb_surface === enum class XcbSurfaceCreateFlagBitsKHR : VkXcbSurfaceCreateFlagsKHR { }; using XcbSurfaceCreateFlagsKHR = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR XcbSurfaceCreateFlagsKHR allFlags = {}; }; #endif /*VK_USE_PLATFORM_XCB_KHR*/ #if defined( VK_USE_PLATFORM_WAYLAND_KHR ) //=== VK_KHR_wayland_surface === enum class WaylandSurfaceCreateFlagBitsKHR : VkWaylandSurfaceCreateFlagsKHR { }; using WaylandSurfaceCreateFlagsKHR = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR WaylandSurfaceCreateFlagsKHR allFlags = {}; }; #endif /*VK_USE_PLATFORM_WAYLAND_KHR*/ #if defined( VK_USE_PLATFORM_ANDROID_KHR ) //=== VK_KHR_android_surface === enum class AndroidSurfaceCreateFlagBitsKHR : VkAndroidSurfaceCreateFlagsKHR { }; using AndroidSurfaceCreateFlagsKHR = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR AndroidSurfaceCreateFlagsKHR allFlags = {}; }; #endif /*VK_USE_PLATFORM_ANDROID_KHR*/ #if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_KHR_win32_surface === enum class Win32SurfaceCreateFlagBitsKHR : VkWin32SurfaceCreateFlagsKHR { }; using Win32SurfaceCreateFlagsKHR = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR Win32SurfaceCreateFlagsKHR allFlags = {}; }; #endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_EXT_debug_report === enum class DebugReportFlagBitsEXT : VkDebugReportFlagsEXT { eInformation = VK_DEBUG_REPORT_INFORMATION_BIT_EXT, eWarning = VK_DEBUG_REPORT_WARNING_BIT_EXT, ePerformanceWarning = VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT, eError = VK_DEBUG_REPORT_ERROR_BIT_EXT, eDebug = VK_DEBUG_REPORT_DEBUG_BIT_EXT }; using DebugReportFlagsEXT = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR DebugReportFlagsEXT allFlags = DebugReportFlagBitsEXT::eInformation | DebugReportFlagBitsEXT::eWarning | DebugReportFlagBitsEXT::ePerformanceWarning | DebugReportFlagBitsEXT::eError | DebugReportFlagBitsEXT::eDebug; }; enum class DebugReportObjectTypeEXT { eUnknown = VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, eInstance = VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT, ePhysicalDevice = VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT, eDevice = VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT, eQueue = VK_DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT, eSemaphore = VK_DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT, eCommandBuffer = VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, eFence = VK_DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT, eDeviceMemory = VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT, eBuffer = VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT, eImage = VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, eEvent = VK_DEBUG_REPORT_OBJECT_TYPE_EVENT_EXT, eQueryPool = VK_DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT, eBufferView = VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_VIEW_EXT, eImageView = VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_VIEW_EXT, eShaderModule = VK_DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT, ePipelineCache = VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_CACHE_EXT, ePipelineLayout = VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_LAYOUT_EXT, eRenderPass = VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT, ePipeline = VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT, eDescriptorSetLayout = VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT_EXT, eSampler = VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_EXT, eDescriptorPool = VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT, eDescriptorSet = VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT, eFramebuffer = VK_DEBUG_REPORT_OBJECT_TYPE_FRAMEBUFFER_EXT, eCommandPool = VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_POOL_EXT, eSurfaceKHR = VK_DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT, eSwapchainKHR = VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT, eDebugReportCallbackEXT = VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT_EXT, eDebugReport = VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_EXT, eDisplayKHR = VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_KHR_EXT, eDisplayModeKHR = VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_MODE_KHR_EXT, eValidationCacheEXT = VK_DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT_EXT, eValidationCache = VK_DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT, eSamplerYcbcrConversion = VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION_EXT, eSamplerYcbcrConversionKHR = VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION_KHR_EXT, eDescriptorUpdateTemplate = VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_EXT, eDescriptorUpdateTemplateKHR = VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_KHR_EXT, eCuModuleNVX = VK_DEBUG_REPORT_OBJECT_TYPE_CU_MODULE_NVX_EXT, eCuFunctionNVX = VK_DEBUG_REPORT_OBJECT_TYPE_CU_FUNCTION_NVX_EXT, eAccelerationStructureKHR = VK_DEBUG_REPORT_OBJECT_TYPE_ACCELERATION_STRUCTURE_KHR_EXT, eAccelerationStructureNV = VK_DEBUG_REPORT_OBJECT_TYPE_ACCELERATION_STRUCTURE_NV_EXT, #if defined( VK_ENABLE_BETA_EXTENSIONS ) eCudaModuleNV = VK_DEBUG_REPORT_OBJECT_TYPE_CUDA_MODULE_NV_EXT, eCudaFunctionNV = VK_DEBUG_REPORT_OBJECT_TYPE_CUDA_FUNCTION_NV_EXT, #endif /*VK_ENABLE_BETA_EXTENSIONS*/ #if defined( VK_USE_PLATFORM_FUCHSIA ) eBufferCollectionFUCHSIA = VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_COLLECTION_FUCHSIA_EXT #endif /*VK_USE_PLATFORM_FUCHSIA*/ }; //=== VK_AMD_rasterization_order === enum class RasterizationOrderAMD { eStrict = VK_RASTERIZATION_ORDER_STRICT_AMD, eRelaxed = VK_RASTERIZATION_ORDER_RELAXED_AMD }; //=== VK_KHR_video_queue === enum class VideoCodecOperationFlagBitsKHR : VkVideoCodecOperationFlagsKHR { eNone = VK_VIDEO_CODEC_OPERATION_NONE_KHR, eEncodeH264 = VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR, eEncodeH265 = VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR, eDecodeH264 = VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR, eDecodeH265 = VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR, eDecodeAv1 = VK_VIDEO_CODEC_OPERATION_DECODE_AV1_BIT_KHR, eEncodeAv1 = VK_VIDEO_CODEC_OPERATION_ENCODE_AV1_BIT_KHR }; using VideoCodecOperationFlagsKHR = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR VideoCodecOperationFlagsKHR allFlags = VideoCodecOperationFlagBitsKHR::eNone | VideoCodecOperationFlagBitsKHR::eEncodeH264 | VideoCodecOperationFlagBitsKHR::eEncodeH265 | VideoCodecOperationFlagBitsKHR::eDecodeH264 | VideoCodecOperationFlagBitsKHR::eDecodeH265 | VideoCodecOperationFlagBitsKHR::eDecodeAv1 | VideoCodecOperationFlagBitsKHR::eEncodeAv1; }; enum class VideoChromaSubsamplingFlagBitsKHR : VkVideoChromaSubsamplingFlagsKHR { eInvalid = VK_VIDEO_CHROMA_SUBSAMPLING_INVALID_KHR, eMonochrome = VK_VIDEO_CHROMA_SUBSAMPLING_MONOCHROME_BIT_KHR, e420 = VK_VIDEO_CHROMA_SUBSAMPLING_420_BIT_KHR, e422 = VK_VIDEO_CHROMA_SUBSAMPLING_422_BIT_KHR, e444 = VK_VIDEO_CHROMA_SUBSAMPLING_444_BIT_KHR }; using VideoChromaSubsamplingFlagsKHR = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR VideoChromaSubsamplingFlagsKHR allFlags = VideoChromaSubsamplingFlagBitsKHR::eInvalid | VideoChromaSubsamplingFlagBitsKHR::eMonochrome | VideoChromaSubsamplingFlagBitsKHR::e420 | VideoChromaSubsamplingFlagBitsKHR::e422 | VideoChromaSubsamplingFlagBitsKHR::e444; }; enum class VideoComponentBitDepthFlagBitsKHR : VkVideoComponentBitDepthFlagsKHR { eInvalid = VK_VIDEO_COMPONENT_BIT_DEPTH_INVALID_KHR, e8 = VK_VIDEO_COMPONENT_BIT_DEPTH_8_BIT_KHR, e10 = VK_VIDEO_COMPONENT_BIT_DEPTH_10_BIT_KHR, e12 = VK_VIDEO_COMPONENT_BIT_DEPTH_12_BIT_KHR }; using VideoComponentBitDepthFlagsKHR = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR VideoComponentBitDepthFlagsKHR allFlags = VideoComponentBitDepthFlagBitsKHR::eInvalid | VideoComponentBitDepthFlagBitsKHR::e8 | VideoComponentBitDepthFlagBitsKHR::e10 | VideoComponentBitDepthFlagBitsKHR::e12; }; enum class VideoCapabilityFlagBitsKHR : VkVideoCapabilityFlagsKHR { eProtectedContent = VK_VIDEO_CAPABILITY_PROTECTED_CONTENT_BIT_KHR, eSeparateReferenceImages = VK_VIDEO_CAPABILITY_SEPARATE_REFERENCE_IMAGES_BIT_KHR }; using VideoCapabilityFlagsKHR = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR VideoCapabilityFlagsKHR allFlags = VideoCapabilityFlagBitsKHR::eProtectedContent | VideoCapabilityFlagBitsKHR::eSeparateReferenceImages; }; enum class VideoSessionCreateFlagBitsKHR : VkVideoSessionCreateFlagsKHR { eProtectedContent = VK_VIDEO_SESSION_CREATE_PROTECTED_CONTENT_BIT_KHR, eAllowEncodeParameterOptimizations = VK_VIDEO_SESSION_CREATE_ALLOW_ENCODE_PARAMETER_OPTIMIZATIONS_BIT_KHR, eInlineQueries = VK_VIDEO_SESSION_CREATE_INLINE_QUERIES_BIT_KHR, eAllowEncodeQuantizationDeltaMap = VK_VIDEO_SESSION_CREATE_ALLOW_ENCODE_QUANTIZATION_DELTA_MAP_BIT_KHR, eAllowEncodeEmphasisMap = VK_VIDEO_SESSION_CREATE_ALLOW_ENCODE_EMPHASIS_MAP_BIT_KHR, eInlineSessionParameters = VK_VIDEO_SESSION_CREATE_INLINE_SESSION_PARAMETERS_BIT_KHR }; using VideoSessionCreateFlagsKHR = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR VideoSessionCreateFlagsKHR allFlags = VideoSessionCreateFlagBitsKHR::eProtectedContent | VideoSessionCreateFlagBitsKHR::eAllowEncodeParameterOptimizations | VideoSessionCreateFlagBitsKHR::eInlineQueries | VideoSessionCreateFlagBitsKHR::eAllowEncodeQuantizationDeltaMap | VideoSessionCreateFlagBitsKHR::eAllowEncodeEmphasisMap | VideoSessionCreateFlagBitsKHR::eInlineSessionParameters; }; enum class VideoCodingControlFlagBitsKHR : VkVideoCodingControlFlagsKHR { eReset = VK_VIDEO_CODING_CONTROL_RESET_BIT_KHR, eEncodeRateControl = VK_VIDEO_CODING_CONTROL_ENCODE_RATE_CONTROL_BIT_KHR, eEncodeQualityLevel = VK_VIDEO_CODING_CONTROL_ENCODE_QUALITY_LEVEL_BIT_KHR }; using VideoCodingControlFlagsKHR = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR VideoCodingControlFlagsKHR allFlags = VideoCodingControlFlagBitsKHR::eReset | VideoCodingControlFlagBitsKHR::eEncodeRateControl | VideoCodingControlFlagBitsKHR::eEncodeQualityLevel; }; enum class QueryResultStatusKHR { eError = VK_QUERY_RESULT_STATUS_ERROR_KHR, eNotReady = VK_QUERY_RESULT_STATUS_NOT_READY_KHR, eComplete = VK_QUERY_RESULT_STATUS_COMPLETE_KHR, eInsufficientBitstreamBufferRange = VK_QUERY_RESULT_STATUS_INSUFFICIENT_BITSTREAM_BUFFER_RANGE_KHR }; enum class VideoSessionParametersCreateFlagBitsKHR : VkVideoSessionParametersCreateFlagsKHR { eQuantizationMapCompatible = VK_VIDEO_SESSION_PARAMETERS_CREATE_QUANTIZATION_MAP_COMPATIBLE_BIT_KHR }; using VideoSessionParametersCreateFlagsKHR = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR VideoSessionParametersCreateFlagsKHR allFlags = VideoSessionParametersCreateFlagBitsKHR::eQuantizationMapCompatible; }; enum class VideoBeginCodingFlagBitsKHR : VkVideoBeginCodingFlagsKHR { }; using VideoBeginCodingFlagsKHR = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR VideoBeginCodingFlagsKHR allFlags = {}; }; enum class VideoEndCodingFlagBitsKHR : VkVideoEndCodingFlagsKHR { }; using VideoEndCodingFlagsKHR = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR VideoEndCodingFlagsKHR allFlags = {}; }; //=== VK_KHR_video_decode_queue === enum class VideoDecodeCapabilityFlagBitsKHR : VkVideoDecodeCapabilityFlagsKHR { eDpbAndOutputCoincide = VK_VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_COINCIDE_BIT_KHR, eDpbAndOutputDistinct = VK_VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_DISTINCT_BIT_KHR }; using VideoDecodeCapabilityFlagsKHR = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR VideoDecodeCapabilityFlagsKHR allFlags = VideoDecodeCapabilityFlagBitsKHR::eDpbAndOutputCoincide | VideoDecodeCapabilityFlagBitsKHR::eDpbAndOutputDistinct; }; enum class VideoDecodeUsageFlagBitsKHR : VkVideoDecodeUsageFlagsKHR { eDefault = VK_VIDEO_DECODE_USAGE_DEFAULT_KHR, eTranscoding = VK_VIDEO_DECODE_USAGE_TRANSCODING_BIT_KHR, eOffline = VK_VIDEO_DECODE_USAGE_OFFLINE_BIT_KHR, eStreaming = VK_VIDEO_DECODE_USAGE_STREAMING_BIT_KHR }; using VideoDecodeUsageFlagsKHR = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR VideoDecodeUsageFlagsKHR allFlags = VideoDecodeUsageFlagBitsKHR::eDefault | VideoDecodeUsageFlagBitsKHR::eTranscoding | VideoDecodeUsageFlagBitsKHR::eOffline | VideoDecodeUsageFlagBitsKHR::eStreaming; }; enum class VideoDecodeFlagBitsKHR : VkVideoDecodeFlagsKHR { }; using VideoDecodeFlagsKHR = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR VideoDecodeFlagsKHR allFlags = {}; }; //=== VK_EXT_transform_feedback === enum class PipelineRasterizationStateStreamCreateFlagBitsEXT : VkPipelineRasterizationStateStreamCreateFlagsEXT { }; using PipelineRasterizationStateStreamCreateFlagsEXT = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR PipelineRasterizationStateStreamCreateFlagsEXT allFlags = {}; }; //=== VK_KHR_video_encode_h264 === enum class VideoEncodeH264CapabilityFlagBitsKHR : VkVideoEncodeH264CapabilityFlagsKHR { eHrdCompliance = VK_VIDEO_ENCODE_H264_CAPABILITY_HRD_COMPLIANCE_BIT_KHR, ePredictionWeightTableGenerated = VK_VIDEO_ENCODE_H264_CAPABILITY_PREDICTION_WEIGHT_TABLE_GENERATED_BIT_KHR, eRowUnalignedSlice = VK_VIDEO_ENCODE_H264_CAPABILITY_ROW_UNALIGNED_SLICE_BIT_KHR, eDifferentSliceType = VK_VIDEO_ENCODE_H264_CAPABILITY_DIFFERENT_SLICE_TYPE_BIT_KHR, eBFrameInL0List = VK_VIDEO_ENCODE_H264_CAPABILITY_B_FRAME_IN_L0_LIST_BIT_KHR, eBFrameInL1List = VK_VIDEO_ENCODE_H264_CAPABILITY_B_FRAME_IN_L1_LIST_BIT_KHR, ePerPictureTypeMinMaxQp = VK_VIDEO_ENCODE_H264_CAPABILITY_PER_PICTURE_TYPE_MIN_MAX_QP_BIT_KHR, ePerSliceConstantQp = VK_VIDEO_ENCODE_H264_CAPABILITY_PER_SLICE_CONSTANT_QP_BIT_KHR, eGeneratePrefixNalu = VK_VIDEO_ENCODE_H264_CAPABILITY_GENERATE_PREFIX_NALU_BIT_KHR, eMbQpDiffWraparound = VK_VIDEO_ENCODE_H264_CAPABILITY_MB_QP_DIFF_WRAPAROUND_BIT_KHR }; using VideoEncodeH264CapabilityFlagsKHR = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR VideoEncodeH264CapabilityFlagsKHR allFlags = VideoEncodeH264CapabilityFlagBitsKHR::eHrdCompliance | VideoEncodeH264CapabilityFlagBitsKHR::ePredictionWeightTableGenerated | VideoEncodeH264CapabilityFlagBitsKHR::eRowUnalignedSlice | VideoEncodeH264CapabilityFlagBitsKHR::eDifferentSliceType | VideoEncodeH264CapabilityFlagBitsKHR::eBFrameInL0List | VideoEncodeH264CapabilityFlagBitsKHR::eBFrameInL1List | VideoEncodeH264CapabilityFlagBitsKHR::ePerPictureTypeMinMaxQp | VideoEncodeH264CapabilityFlagBitsKHR::ePerSliceConstantQp | VideoEncodeH264CapabilityFlagBitsKHR::eGeneratePrefixNalu | VideoEncodeH264CapabilityFlagBitsKHR::eMbQpDiffWraparound; }; enum class VideoEncodeH264StdFlagBitsKHR : VkVideoEncodeH264StdFlagsKHR { eSeparateColorPlaneFlagSet = VK_VIDEO_ENCODE_H264_STD_SEPARATE_COLOR_PLANE_FLAG_SET_BIT_KHR, eQpprimeYZeroTransformBypassFlagSet = VK_VIDEO_ENCODE_H264_STD_QPPRIME_Y_ZERO_TRANSFORM_BYPASS_FLAG_SET_BIT_KHR, eScalingMatrixPresentFlagSet = VK_VIDEO_ENCODE_H264_STD_SCALING_MATRIX_PRESENT_FLAG_SET_BIT_KHR, eChromaQpIndexOffset = VK_VIDEO_ENCODE_H264_STD_CHROMA_QP_INDEX_OFFSET_BIT_KHR, eSecondChromaQpIndexOffset = VK_VIDEO_ENCODE_H264_STD_SECOND_CHROMA_QP_INDEX_OFFSET_BIT_KHR, ePicInitQpMinus26 = VK_VIDEO_ENCODE_H264_STD_PIC_INIT_QP_MINUS26_BIT_KHR, eWeightedPredFlagSet = VK_VIDEO_ENCODE_H264_STD_WEIGHTED_PRED_FLAG_SET_BIT_KHR, eWeightedBipredIdcExplicit = VK_VIDEO_ENCODE_H264_STD_WEIGHTED_BIPRED_IDC_EXPLICIT_BIT_KHR, eWeightedBipredIdcImplicit = VK_VIDEO_ENCODE_H264_STD_WEIGHTED_BIPRED_IDC_IMPLICIT_BIT_KHR, eTransform8X8ModeFlagSet = VK_VIDEO_ENCODE_H264_STD_TRANSFORM_8X8_MODE_FLAG_SET_BIT_KHR, eDirectSpatialMvPredFlagUnset = VK_VIDEO_ENCODE_H264_STD_DIRECT_SPATIAL_MV_PRED_FLAG_UNSET_BIT_KHR, eEntropyCodingModeFlagUnset = VK_VIDEO_ENCODE_H264_STD_ENTROPY_CODING_MODE_FLAG_UNSET_BIT_KHR, eEntropyCodingModeFlagSet = VK_VIDEO_ENCODE_H264_STD_ENTROPY_CODING_MODE_FLAG_SET_BIT_KHR, eDirect8X8InferenceFlagUnset = VK_VIDEO_ENCODE_H264_STD_DIRECT_8X8_INFERENCE_FLAG_UNSET_BIT_KHR, eConstrainedIntraPredFlagSet = VK_VIDEO_ENCODE_H264_STD_CONSTRAINED_INTRA_PRED_FLAG_SET_BIT_KHR, eDeblockingFilterDisabled = VK_VIDEO_ENCODE_H264_STD_DEBLOCKING_FILTER_DISABLED_BIT_KHR, eDeblockingFilterEnabled = VK_VIDEO_ENCODE_H264_STD_DEBLOCKING_FILTER_ENABLED_BIT_KHR, eDeblockingFilterPartial = VK_VIDEO_ENCODE_H264_STD_DEBLOCKING_FILTER_PARTIAL_BIT_KHR, eSliceQpDelta = VK_VIDEO_ENCODE_H264_STD_SLICE_QP_DELTA_BIT_KHR, eDifferentSliceQpDelta = VK_VIDEO_ENCODE_H264_STD_DIFFERENT_SLICE_QP_DELTA_BIT_KHR }; using VideoEncodeH264StdFlagsKHR = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR VideoEncodeH264StdFlagsKHR allFlags = VideoEncodeH264StdFlagBitsKHR::eSeparateColorPlaneFlagSet | VideoEncodeH264StdFlagBitsKHR::eQpprimeYZeroTransformBypassFlagSet | VideoEncodeH264StdFlagBitsKHR::eScalingMatrixPresentFlagSet | VideoEncodeH264StdFlagBitsKHR::eChromaQpIndexOffset | VideoEncodeH264StdFlagBitsKHR::eSecondChromaQpIndexOffset | VideoEncodeH264StdFlagBitsKHR::ePicInitQpMinus26 | VideoEncodeH264StdFlagBitsKHR::eWeightedPredFlagSet | VideoEncodeH264StdFlagBitsKHR::eWeightedBipredIdcExplicit | VideoEncodeH264StdFlagBitsKHR::eWeightedBipredIdcImplicit | VideoEncodeH264StdFlagBitsKHR::eTransform8X8ModeFlagSet | VideoEncodeH264StdFlagBitsKHR::eDirectSpatialMvPredFlagUnset | VideoEncodeH264StdFlagBitsKHR::eEntropyCodingModeFlagUnset | VideoEncodeH264StdFlagBitsKHR::eEntropyCodingModeFlagSet | VideoEncodeH264StdFlagBitsKHR::eDirect8X8InferenceFlagUnset | VideoEncodeH264StdFlagBitsKHR::eConstrainedIntraPredFlagSet | VideoEncodeH264StdFlagBitsKHR::eDeblockingFilterDisabled | VideoEncodeH264StdFlagBitsKHR::eDeblockingFilterEnabled | VideoEncodeH264StdFlagBitsKHR::eDeblockingFilterPartial | VideoEncodeH264StdFlagBitsKHR::eSliceQpDelta | VideoEncodeH264StdFlagBitsKHR::eDifferentSliceQpDelta; }; enum class VideoEncodeH264RateControlFlagBitsKHR : VkVideoEncodeH264RateControlFlagsKHR { eAttemptHrdCompliance = VK_VIDEO_ENCODE_H264_RATE_CONTROL_ATTEMPT_HRD_COMPLIANCE_BIT_KHR, eRegularGop = VK_VIDEO_ENCODE_H264_RATE_CONTROL_REGULAR_GOP_BIT_KHR, eReferencePatternFlat = VK_VIDEO_ENCODE_H264_RATE_CONTROL_REFERENCE_PATTERN_FLAT_BIT_KHR, eReferencePatternDyadic = VK_VIDEO_ENCODE_H264_RATE_CONTROL_REFERENCE_PATTERN_DYADIC_BIT_KHR, eTemporalLayerPatternDyadic = VK_VIDEO_ENCODE_H264_RATE_CONTROL_TEMPORAL_LAYER_PATTERN_DYADIC_BIT_KHR }; using VideoEncodeH264RateControlFlagsKHR = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR VideoEncodeH264RateControlFlagsKHR allFlags = VideoEncodeH264RateControlFlagBitsKHR::eAttemptHrdCompliance | VideoEncodeH264RateControlFlagBitsKHR::eRegularGop | VideoEncodeH264RateControlFlagBitsKHR::eReferencePatternFlat | VideoEncodeH264RateControlFlagBitsKHR::eReferencePatternDyadic | VideoEncodeH264RateControlFlagBitsKHR::eTemporalLayerPatternDyadic; }; //=== VK_KHR_video_encode_h265 === enum class VideoEncodeH265CapabilityFlagBitsKHR : VkVideoEncodeH265CapabilityFlagsKHR { eHrdCompliance = VK_VIDEO_ENCODE_H265_CAPABILITY_HRD_COMPLIANCE_BIT_KHR, ePredictionWeightTableGenerated = VK_VIDEO_ENCODE_H265_CAPABILITY_PREDICTION_WEIGHT_TABLE_GENERATED_BIT_KHR, eRowUnalignedSliceSegment = VK_VIDEO_ENCODE_H265_CAPABILITY_ROW_UNALIGNED_SLICE_SEGMENT_BIT_KHR, eDifferentSliceSegmentType = VK_VIDEO_ENCODE_H265_CAPABILITY_DIFFERENT_SLICE_SEGMENT_TYPE_BIT_KHR, eBFrameInL0List = VK_VIDEO_ENCODE_H265_CAPABILITY_B_FRAME_IN_L0_LIST_BIT_KHR, eBFrameInL1List = VK_VIDEO_ENCODE_H265_CAPABILITY_B_FRAME_IN_L1_LIST_BIT_KHR, ePerPictureTypeMinMaxQp = VK_VIDEO_ENCODE_H265_CAPABILITY_PER_PICTURE_TYPE_MIN_MAX_QP_BIT_KHR, ePerSliceSegmentConstantQp = VK_VIDEO_ENCODE_H265_CAPABILITY_PER_SLICE_SEGMENT_CONSTANT_QP_BIT_KHR, eMultipleTilesPerSliceSegment = VK_VIDEO_ENCODE_H265_CAPABILITY_MULTIPLE_TILES_PER_SLICE_SEGMENT_BIT_KHR, eMultipleSliceSegmentsPerTile = VK_VIDEO_ENCODE_H265_CAPABILITY_MULTIPLE_SLICE_SEGMENTS_PER_TILE_BIT_KHR, eCuQpDiffWraparound = VK_VIDEO_ENCODE_H265_CAPABILITY_CU_QP_DIFF_WRAPAROUND_BIT_KHR }; using VideoEncodeH265CapabilityFlagsKHR = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR VideoEncodeH265CapabilityFlagsKHR allFlags = VideoEncodeH265CapabilityFlagBitsKHR::eHrdCompliance | VideoEncodeH265CapabilityFlagBitsKHR::ePredictionWeightTableGenerated | VideoEncodeH265CapabilityFlagBitsKHR::eRowUnalignedSliceSegment | VideoEncodeH265CapabilityFlagBitsKHR::eDifferentSliceSegmentType | VideoEncodeH265CapabilityFlagBitsKHR::eBFrameInL0List | VideoEncodeH265CapabilityFlagBitsKHR::eBFrameInL1List | VideoEncodeH265CapabilityFlagBitsKHR::ePerPictureTypeMinMaxQp | VideoEncodeH265CapabilityFlagBitsKHR::ePerSliceSegmentConstantQp | VideoEncodeH265CapabilityFlagBitsKHR::eMultipleTilesPerSliceSegment | VideoEncodeH265CapabilityFlagBitsKHR::eMultipleSliceSegmentsPerTile | VideoEncodeH265CapabilityFlagBitsKHR::eCuQpDiffWraparound; }; enum class VideoEncodeH265StdFlagBitsKHR : VkVideoEncodeH265StdFlagsKHR { eSeparateColorPlaneFlagSet = VK_VIDEO_ENCODE_H265_STD_SEPARATE_COLOR_PLANE_FLAG_SET_BIT_KHR, eSampleAdaptiveOffsetEnabledFlagSet = VK_VIDEO_ENCODE_H265_STD_SAMPLE_ADAPTIVE_OFFSET_ENABLED_FLAG_SET_BIT_KHR, eScalingListDataPresentFlagSet = VK_VIDEO_ENCODE_H265_STD_SCALING_LIST_DATA_PRESENT_FLAG_SET_BIT_KHR, ePcmEnabledFlagSet = VK_VIDEO_ENCODE_H265_STD_PCM_ENABLED_FLAG_SET_BIT_KHR, eSpsTemporalMvpEnabledFlagSet = VK_VIDEO_ENCODE_H265_STD_SPS_TEMPORAL_MVP_ENABLED_FLAG_SET_BIT_KHR, eInitQpMinus26 = VK_VIDEO_ENCODE_H265_STD_INIT_QP_MINUS26_BIT_KHR, eWeightedPredFlagSet = VK_VIDEO_ENCODE_H265_STD_WEIGHTED_PRED_FLAG_SET_BIT_KHR, eWeightedBipredFlagSet = VK_VIDEO_ENCODE_H265_STD_WEIGHTED_BIPRED_FLAG_SET_BIT_KHR, eLog2ParallelMergeLevelMinus2 = VK_VIDEO_ENCODE_H265_STD_LOG2_PARALLEL_MERGE_LEVEL_MINUS2_BIT_KHR, eSignDataHidingEnabledFlagSet = VK_VIDEO_ENCODE_H265_STD_SIGN_DATA_HIDING_ENABLED_FLAG_SET_BIT_KHR, eTransformSkipEnabledFlagSet = VK_VIDEO_ENCODE_H265_STD_TRANSFORM_SKIP_ENABLED_FLAG_SET_BIT_KHR, eTransformSkipEnabledFlagUnset = VK_VIDEO_ENCODE_H265_STD_TRANSFORM_SKIP_ENABLED_FLAG_UNSET_BIT_KHR, ePpsSliceChromaQpOffsetsPresentFlagSet = VK_VIDEO_ENCODE_H265_STD_PPS_SLICE_CHROMA_QP_OFFSETS_PRESENT_FLAG_SET_BIT_KHR, eTransquantBypassEnabledFlagSet = VK_VIDEO_ENCODE_H265_STD_TRANSQUANT_BYPASS_ENABLED_FLAG_SET_BIT_KHR, eConstrainedIntraPredFlagSet = VK_VIDEO_ENCODE_H265_STD_CONSTRAINED_INTRA_PRED_FLAG_SET_BIT_KHR, eEntropyCodingSyncEnabledFlagSet = VK_VIDEO_ENCODE_H265_STD_ENTROPY_CODING_SYNC_ENABLED_FLAG_SET_BIT_KHR, eDeblockingFilterOverrideEnabledFlagSet = VK_VIDEO_ENCODE_H265_STD_DEBLOCKING_FILTER_OVERRIDE_ENABLED_FLAG_SET_BIT_KHR, eDependentSliceSegmentsEnabledFlagSet = VK_VIDEO_ENCODE_H265_STD_DEPENDENT_SLICE_SEGMENTS_ENABLED_FLAG_SET_BIT_KHR, eDependentSliceSegmentFlagSet = VK_VIDEO_ENCODE_H265_STD_DEPENDENT_SLICE_SEGMENT_FLAG_SET_BIT_KHR, eSliceQpDelta = VK_VIDEO_ENCODE_H265_STD_SLICE_QP_DELTA_BIT_KHR, eDifferentSliceQpDelta = VK_VIDEO_ENCODE_H265_STD_DIFFERENT_SLICE_QP_DELTA_BIT_KHR }; using VideoEncodeH265StdFlagsKHR = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR VideoEncodeH265StdFlagsKHR allFlags = VideoEncodeH265StdFlagBitsKHR::eSeparateColorPlaneFlagSet | VideoEncodeH265StdFlagBitsKHR::eSampleAdaptiveOffsetEnabledFlagSet | VideoEncodeH265StdFlagBitsKHR::eScalingListDataPresentFlagSet | VideoEncodeH265StdFlagBitsKHR::ePcmEnabledFlagSet | VideoEncodeH265StdFlagBitsKHR::eSpsTemporalMvpEnabledFlagSet | VideoEncodeH265StdFlagBitsKHR::eInitQpMinus26 | VideoEncodeH265StdFlagBitsKHR::eWeightedPredFlagSet | VideoEncodeH265StdFlagBitsKHR::eWeightedBipredFlagSet | VideoEncodeH265StdFlagBitsKHR::eLog2ParallelMergeLevelMinus2 | VideoEncodeH265StdFlagBitsKHR::eSignDataHidingEnabledFlagSet | VideoEncodeH265StdFlagBitsKHR::eTransformSkipEnabledFlagSet | VideoEncodeH265StdFlagBitsKHR::eTransformSkipEnabledFlagUnset | VideoEncodeH265StdFlagBitsKHR::ePpsSliceChromaQpOffsetsPresentFlagSet | VideoEncodeH265StdFlagBitsKHR::eTransquantBypassEnabledFlagSet | VideoEncodeH265StdFlagBitsKHR::eConstrainedIntraPredFlagSet | VideoEncodeH265StdFlagBitsKHR::eEntropyCodingSyncEnabledFlagSet | VideoEncodeH265StdFlagBitsKHR::eDeblockingFilterOverrideEnabledFlagSet | VideoEncodeH265StdFlagBitsKHR::eDependentSliceSegmentsEnabledFlagSet | VideoEncodeH265StdFlagBitsKHR::eDependentSliceSegmentFlagSet | VideoEncodeH265StdFlagBitsKHR::eSliceQpDelta | VideoEncodeH265StdFlagBitsKHR::eDifferentSliceQpDelta; }; enum class VideoEncodeH265CtbSizeFlagBitsKHR : VkVideoEncodeH265CtbSizeFlagsKHR { e16 = VK_VIDEO_ENCODE_H265_CTB_SIZE_16_BIT_KHR, e32 = VK_VIDEO_ENCODE_H265_CTB_SIZE_32_BIT_KHR, e64 = VK_VIDEO_ENCODE_H265_CTB_SIZE_64_BIT_KHR }; using VideoEncodeH265CtbSizeFlagsKHR = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR VideoEncodeH265CtbSizeFlagsKHR allFlags = VideoEncodeH265CtbSizeFlagBitsKHR::e16 | VideoEncodeH265CtbSizeFlagBitsKHR::e32 | VideoEncodeH265CtbSizeFlagBitsKHR::e64; }; enum class VideoEncodeH265TransformBlockSizeFlagBitsKHR : VkVideoEncodeH265TransformBlockSizeFlagsKHR { e4 = VK_VIDEO_ENCODE_H265_TRANSFORM_BLOCK_SIZE_4_BIT_KHR, e8 = VK_VIDEO_ENCODE_H265_TRANSFORM_BLOCK_SIZE_8_BIT_KHR, e16 = VK_VIDEO_ENCODE_H265_TRANSFORM_BLOCK_SIZE_16_BIT_KHR, e32 = VK_VIDEO_ENCODE_H265_TRANSFORM_BLOCK_SIZE_32_BIT_KHR }; using VideoEncodeH265TransformBlockSizeFlagsKHR = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR VideoEncodeH265TransformBlockSizeFlagsKHR allFlags = VideoEncodeH265TransformBlockSizeFlagBitsKHR::e4 | VideoEncodeH265TransformBlockSizeFlagBitsKHR::e8 | VideoEncodeH265TransformBlockSizeFlagBitsKHR::e16 | VideoEncodeH265TransformBlockSizeFlagBitsKHR::e32; }; enum class VideoEncodeH265RateControlFlagBitsKHR : VkVideoEncodeH265RateControlFlagsKHR { eAttemptHrdCompliance = VK_VIDEO_ENCODE_H265_RATE_CONTROL_ATTEMPT_HRD_COMPLIANCE_BIT_KHR, eRegularGop = VK_VIDEO_ENCODE_H265_RATE_CONTROL_REGULAR_GOP_BIT_KHR, eReferencePatternFlat = VK_VIDEO_ENCODE_H265_RATE_CONTROL_REFERENCE_PATTERN_FLAT_BIT_KHR, eReferencePatternDyadic = VK_VIDEO_ENCODE_H265_RATE_CONTROL_REFERENCE_PATTERN_DYADIC_BIT_KHR, eTemporalSubLayerPatternDyadic = VK_VIDEO_ENCODE_H265_RATE_CONTROL_TEMPORAL_SUB_LAYER_PATTERN_DYADIC_BIT_KHR }; using VideoEncodeH265RateControlFlagsKHR = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR VideoEncodeH265RateControlFlagsKHR allFlags = VideoEncodeH265RateControlFlagBitsKHR::eAttemptHrdCompliance | VideoEncodeH265RateControlFlagBitsKHR::eRegularGop | VideoEncodeH265RateControlFlagBitsKHR::eReferencePatternFlat | VideoEncodeH265RateControlFlagBitsKHR::eReferencePatternDyadic | VideoEncodeH265RateControlFlagBitsKHR::eTemporalSubLayerPatternDyadic; }; //=== VK_KHR_video_decode_h264 === enum class VideoDecodeH264PictureLayoutFlagBitsKHR : VkVideoDecodeH264PictureLayoutFlagsKHR { eProgressive = VK_VIDEO_DECODE_H264_PICTURE_LAYOUT_PROGRESSIVE_KHR, eInterlacedInterleavedLines = VK_VIDEO_DECODE_H264_PICTURE_LAYOUT_INTERLACED_INTERLEAVED_LINES_BIT_KHR, eInterlacedSeparatePlanes = VK_VIDEO_DECODE_H264_PICTURE_LAYOUT_INTERLACED_SEPARATE_PLANES_BIT_KHR }; using VideoDecodeH264PictureLayoutFlagsKHR = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR VideoDecodeH264PictureLayoutFlagsKHR allFlags = VideoDecodeH264PictureLayoutFlagBitsKHR::eProgressive | VideoDecodeH264PictureLayoutFlagBitsKHR::eInterlacedInterleavedLines | VideoDecodeH264PictureLayoutFlagBitsKHR::eInterlacedSeparatePlanes; }; //=== VK_AMD_shader_info === enum class ShaderInfoTypeAMD { eStatistics = VK_SHADER_INFO_TYPE_STATISTICS_AMD, eBinary = VK_SHADER_INFO_TYPE_BINARY_AMD, eDisassembly = VK_SHADER_INFO_TYPE_DISASSEMBLY_AMD }; #if defined( VK_USE_PLATFORM_GGP ) //=== VK_GGP_stream_descriptor_surface === enum class StreamDescriptorSurfaceCreateFlagBitsGGP : VkStreamDescriptorSurfaceCreateFlagsGGP { }; using StreamDescriptorSurfaceCreateFlagsGGP = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR StreamDescriptorSurfaceCreateFlagsGGP allFlags = {}; }; #endif /*VK_USE_PLATFORM_GGP*/ //=== VK_NV_external_memory_capabilities === enum class ExternalMemoryHandleTypeFlagBitsNV : VkExternalMemoryHandleTypeFlagsNV { eOpaqueWin32 = VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_NV, eOpaqueWin32Kmt = VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_NV, eD3D11Image = VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_BIT_NV, eD3D11ImageKmt = VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_KMT_BIT_NV }; using ExternalMemoryHandleTypeFlagsNV = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR ExternalMemoryHandleTypeFlagsNV allFlags = ExternalMemoryHandleTypeFlagBitsNV::eOpaqueWin32 | ExternalMemoryHandleTypeFlagBitsNV::eOpaqueWin32Kmt | ExternalMemoryHandleTypeFlagBitsNV::eD3D11Image | ExternalMemoryHandleTypeFlagBitsNV::eD3D11ImageKmt; }; enum class ExternalMemoryFeatureFlagBitsNV : VkExternalMemoryFeatureFlagsNV { eDedicatedOnly = VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT_NV, eExportable = VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_NV, eImportable = VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_NV }; using ExternalMemoryFeatureFlagsNV = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR ExternalMemoryFeatureFlagsNV allFlags = ExternalMemoryFeatureFlagBitsNV::eDedicatedOnly | ExternalMemoryFeatureFlagBitsNV::eExportable | ExternalMemoryFeatureFlagBitsNV::eImportable; }; //=== VK_EXT_validation_flags === enum class ValidationCheckEXT { eAll = VK_VALIDATION_CHECK_ALL_EXT, eShaders = VK_VALIDATION_CHECK_SHADERS_EXT }; #if defined( VK_USE_PLATFORM_VI_NN ) //=== VK_NN_vi_surface === enum class ViSurfaceCreateFlagBitsNN : VkViSurfaceCreateFlagsNN { }; using ViSurfaceCreateFlagsNN = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR ViSurfaceCreateFlagsNN allFlags = {}; }; #endif /*VK_USE_PLATFORM_VI_NN*/ //=== VK_EXT_conditional_rendering === enum class ConditionalRenderingFlagBitsEXT : VkConditionalRenderingFlagsEXT { eInverted = VK_CONDITIONAL_RENDERING_INVERTED_BIT_EXT }; using ConditionalRenderingFlagsEXT = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR ConditionalRenderingFlagsEXT allFlags = ConditionalRenderingFlagBitsEXT::eInverted; }; //=== VK_EXT_display_surface_counter === enum class SurfaceCounterFlagBitsEXT : VkSurfaceCounterFlagsEXT { eVblank = VK_SURFACE_COUNTER_VBLANK_BIT_EXT }; using SurfaceCounterFlagsEXT = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR SurfaceCounterFlagsEXT allFlags = SurfaceCounterFlagBitsEXT::eVblank; }; //=== VK_EXT_display_control === enum class DisplayPowerStateEXT { eOff = VK_DISPLAY_POWER_STATE_OFF_EXT, eSuspend = VK_DISPLAY_POWER_STATE_SUSPEND_EXT, eOn = VK_DISPLAY_POWER_STATE_ON_EXT }; enum class DeviceEventTypeEXT { eDisplayHotplug = VK_DEVICE_EVENT_TYPE_DISPLAY_HOTPLUG_EXT }; enum class DisplayEventTypeEXT { eFirstPixelOut = VK_DISPLAY_EVENT_TYPE_FIRST_PIXEL_OUT_EXT }; //=== VK_NV_viewport_swizzle === enum class ViewportCoordinateSwizzleNV { ePositiveX = VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_X_NV, eNegativeX = VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_X_NV, ePositiveY = VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Y_NV, eNegativeY = VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_Y_NV, ePositiveZ = VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Z_NV, eNegativeZ = VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_Z_NV, ePositiveW = VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_W_NV, eNegativeW = VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_W_NV }; enum class PipelineViewportSwizzleStateCreateFlagBitsNV : VkPipelineViewportSwizzleStateCreateFlagsNV { }; using PipelineViewportSwizzleStateCreateFlagsNV = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR PipelineViewportSwizzleStateCreateFlagsNV allFlags = {}; }; //=== VK_EXT_discard_rectangles === enum class DiscardRectangleModeEXT { eInclusive = VK_DISCARD_RECTANGLE_MODE_INCLUSIVE_EXT, eExclusive = VK_DISCARD_RECTANGLE_MODE_EXCLUSIVE_EXT }; enum class PipelineDiscardRectangleStateCreateFlagBitsEXT : VkPipelineDiscardRectangleStateCreateFlagsEXT { }; using PipelineDiscardRectangleStateCreateFlagsEXT = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR PipelineDiscardRectangleStateCreateFlagsEXT allFlags = {}; }; //=== VK_EXT_conservative_rasterization === enum class ConservativeRasterizationModeEXT { eDisabled = VK_CONSERVATIVE_RASTERIZATION_MODE_DISABLED_EXT, eOverestimate = VK_CONSERVATIVE_RASTERIZATION_MODE_OVERESTIMATE_EXT, eUnderestimate = VK_CONSERVATIVE_RASTERIZATION_MODE_UNDERESTIMATE_EXT }; enum class PipelineRasterizationConservativeStateCreateFlagBitsEXT : VkPipelineRasterizationConservativeStateCreateFlagsEXT { }; using PipelineRasterizationConservativeStateCreateFlagsEXT = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR PipelineRasterizationConservativeStateCreateFlagsEXT allFlags = {}; }; //=== VK_EXT_depth_clip_enable === enum class PipelineRasterizationDepthClipStateCreateFlagBitsEXT : VkPipelineRasterizationDepthClipStateCreateFlagsEXT { }; using PipelineRasterizationDepthClipStateCreateFlagsEXT = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR PipelineRasterizationDepthClipStateCreateFlagsEXT allFlags = {}; }; //=== VK_KHR_performance_query === enum class PerformanceCounterDescriptionFlagBitsKHR : VkPerformanceCounterDescriptionFlagsKHR { ePerformanceImpacting = VK_PERFORMANCE_COUNTER_DESCRIPTION_PERFORMANCE_IMPACTING_BIT_KHR, eConcurrentlyImpacted = VK_PERFORMANCE_COUNTER_DESCRIPTION_CONCURRENTLY_IMPACTED_BIT_KHR }; using PerformanceCounterDescriptionFlagsKHR = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR PerformanceCounterDescriptionFlagsKHR allFlags = PerformanceCounterDescriptionFlagBitsKHR::ePerformanceImpacting | PerformanceCounterDescriptionFlagBitsKHR::eConcurrentlyImpacted; }; enum class PerformanceCounterScopeKHR { eCommandBuffer = VK_PERFORMANCE_COUNTER_SCOPE_COMMAND_BUFFER_KHR, eVkQueryScopeCommandBuffer = VK_QUERY_SCOPE_COMMAND_BUFFER_KHR, eRenderPass = VK_PERFORMANCE_COUNTER_SCOPE_RENDER_PASS_KHR, eVkQueryScopeRenderPass = VK_QUERY_SCOPE_RENDER_PASS_KHR, eCommand = VK_PERFORMANCE_COUNTER_SCOPE_COMMAND_KHR, eVkQueryScopeCommand = VK_QUERY_SCOPE_COMMAND_KHR }; enum class PerformanceCounterStorageKHR { eInt32 = VK_PERFORMANCE_COUNTER_STORAGE_INT32_KHR, eInt64 = VK_PERFORMANCE_COUNTER_STORAGE_INT64_KHR, eUint32 = VK_PERFORMANCE_COUNTER_STORAGE_UINT32_KHR, eUint64 = VK_PERFORMANCE_COUNTER_STORAGE_UINT64_KHR, eFloat32 = VK_PERFORMANCE_COUNTER_STORAGE_FLOAT32_KHR, eFloat64 = VK_PERFORMANCE_COUNTER_STORAGE_FLOAT64_KHR }; enum class PerformanceCounterUnitKHR { eGeneric = VK_PERFORMANCE_COUNTER_UNIT_GENERIC_KHR, ePercentage = VK_PERFORMANCE_COUNTER_UNIT_PERCENTAGE_KHR, eNanoseconds = VK_PERFORMANCE_COUNTER_UNIT_NANOSECONDS_KHR, eBytes = VK_PERFORMANCE_COUNTER_UNIT_BYTES_KHR, eBytesPerSecond = VK_PERFORMANCE_COUNTER_UNIT_BYTES_PER_SECOND_KHR, eKelvin = VK_PERFORMANCE_COUNTER_UNIT_KELVIN_KHR, eWatts = VK_PERFORMANCE_COUNTER_UNIT_WATTS_KHR, eVolts = VK_PERFORMANCE_COUNTER_UNIT_VOLTS_KHR, eAmps = VK_PERFORMANCE_COUNTER_UNIT_AMPS_KHR, eHertz = VK_PERFORMANCE_COUNTER_UNIT_HERTZ_KHR, eCycles = VK_PERFORMANCE_COUNTER_UNIT_CYCLES_KHR }; enum class AcquireProfilingLockFlagBitsKHR : VkAcquireProfilingLockFlagsKHR { }; using AcquireProfilingLockFlagsKHR = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR AcquireProfilingLockFlagsKHR allFlags = {}; }; #if defined( VK_USE_PLATFORM_IOS_MVK ) //=== VK_MVK_ios_surface === enum class IOSSurfaceCreateFlagBitsMVK : VkIOSSurfaceCreateFlagsMVK { }; using IOSSurfaceCreateFlagsMVK = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR IOSSurfaceCreateFlagsMVK allFlags = {}; }; #endif /*VK_USE_PLATFORM_IOS_MVK*/ #if defined( VK_USE_PLATFORM_MACOS_MVK ) //=== VK_MVK_macos_surface === enum class MacOSSurfaceCreateFlagBitsMVK : VkMacOSSurfaceCreateFlagsMVK { }; using MacOSSurfaceCreateFlagsMVK = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR MacOSSurfaceCreateFlagsMVK allFlags = {}; }; #endif /*VK_USE_PLATFORM_MACOS_MVK*/ //=== VK_EXT_debug_utils === enum class DebugUtilsMessageSeverityFlagBitsEXT : VkDebugUtilsMessageSeverityFlagsEXT { eVerbose = VK_DEBUG_UTILS_MESSAGE_SEVERITY_VERBOSE_BIT_EXT, eInfo = VK_DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT, eWarning = VK_DEBUG_UTILS_MESSAGE_SEVERITY_WARNING_BIT_EXT, eError = VK_DEBUG_UTILS_MESSAGE_SEVERITY_ERROR_BIT_EXT }; using DebugUtilsMessageSeverityFlagsEXT = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR DebugUtilsMessageSeverityFlagsEXT allFlags = DebugUtilsMessageSeverityFlagBitsEXT::eVerbose | DebugUtilsMessageSeverityFlagBitsEXT::eInfo | DebugUtilsMessageSeverityFlagBitsEXT::eWarning | DebugUtilsMessageSeverityFlagBitsEXT::eError; }; enum class DebugUtilsMessageTypeFlagBitsEXT : VkDebugUtilsMessageTypeFlagsEXT { eGeneral = VK_DEBUG_UTILS_MESSAGE_TYPE_GENERAL_BIT_EXT, eValidation = VK_DEBUG_UTILS_MESSAGE_TYPE_VALIDATION_BIT_EXT, ePerformance = VK_DEBUG_UTILS_MESSAGE_TYPE_PERFORMANCE_BIT_EXT, eDeviceAddressBinding = VK_DEBUG_UTILS_MESSAGE_TYPE_DEVICE_ADDRESS_BINDING_BIT_EXT }; using DebugUtilsMessageTypeFlagsEXT = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR DebugUtilsMessageTypeFlagsEXT allFlags = DebugUtilsMessageTypeFlagBitsEXT::eGeneral | DebugUtilsMessageTypeFlagBitsEXT::eValidation | DebugUtilsMessageTypeFlagBitsEXT::ePerformance | DebugUtilsMessageTypeFlagBitsEXT::eDeviceAddressBinding; }; enum class DebugUtilsMessengerCallbackDataFlagBitsEXT : VkDebugUtilsMessengerCallbackDataFlagsEXT { }; using DebugUtilsMessengerCallbackDataFlagsEXT = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR DebugUtilsMessengerCallbackDataFlagsEXT allFlags = {}; }; enum class DebugUtilsMessengerCreateFlagBitsEXT : VkDebugUtilsMessengerCreateFlagsEXT { }; using DebugUtilsMessengerCreateFlagsEXT = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR DebugUtilsMessengerCreateFlagsEXT allFlags = {}; }; //=== VK_EXT_blend_operation_advanced === enum class BlendOverlapEXT { eUncorrelated = VK_BLEND_OVERLAP_UNCORRELATED_EXT, eDisjoint = VK_BLEND_OVERLAP_DISJOINT_EXT, eConjoint = VK_BLEND_OVERLAP_CONJOINT_EXT }; //=== VK_NV_fragment_coverage_to_color === enum class PipelineCoverageToColorStateCreateFlagBitsNV : VkPipelineCoverageToColorStateCreateFlagsNV { }; using PipelineCoverageToColorStateCreateFlagsNV = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR PipelineCoverageToColorStateCreateFlagsNV allFlags = {}; }; //=== VK_KHR_acceleration_structure === enum class AccelerationStructureTypeKHR { eTopLevel = VK_ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_KHR, eBottomLevel = VK_ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_KHR, eGeneric = VK_ACCELERATION_STRUCTURE_TYPE_GENERIC_KHR }; using AccelerationStructureTypeNV = AccelerationStructureTypeKHR; enum class AccelerationStructureBuildTypeKHR { eHost = VK_ACCELERATION_STRUCTURE_BUILD_TYPE_HOST_KHR, eDevice = VK_ACCELERATION_STRUCTURE_BUILD_TYPE_DEVICE_KHR, eHostOrDevice = VK_ACCELERATION_STRUCTURE_BUILD_TYPE_HOST_OR_DEVICE_KHR }; enum class GeometryFlagBitsKHR : VkGeometryFlagsKHR { eOpaque = VK_GEOMETRY_OPAQUE_BIT_KHR, eNoDuplicateAnyHitInvocation = VK_GEOMETRY_NO_DUPLICATE_ANY_HIT_INVOCATION_BIT_KHR }; using GeometryFlagBitsNV = GeometryFlagBitsKHR; using GeometryFlagsKHR = Flags; using GeometryFlagsNV = GeometryFlagsKHR; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR GeometryFlagsKHR allFlags = GeometryFlagBitsKHR::eOpaque | GeometryFlagBitsKHR::eNoDuplicateAnyHitInvocation; }; enum class GeometryInstanceFlagBitsKHR : VkGeometryInstanceFlagsKHR { eTriangleFacingCullDisable = VK_GEOMETRY_INSTANCE_TRIANGLE_FACING_CULL_DISABLE_BIT_KHR, eTriangleCullDisable = VK_GEOMETRY_INSTANCE_TRIANGLE_CULL_DISABLE_BIT_NV, eTriangleFlipFacing = VK_GEOMETRY_INSTANCE_TRIANGLE_FLIP_FACING_BIT_KHR, eTriangleFrontCounterclockwise = VK_GEOMETRY_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE_BIT_KHR, eForceOpaque = VK_GEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_KHR, eForceNoOpaque = VK_GEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_KHR, eForceOpacityMicromap2StateEXT = VK_GEOMETRY_INSTANCE_FORCE_OPACITY_MICROMAP_2_STATE_EXT, eDisableOpacityMicromapsEXT = VK_GEOMETRY_INSTANCE_DISABLE_OPACITY_MICROMAPS_EXT }; using GeometryInstanceFlagBitsNV = GeometryInstanceFlagBitsKHR; using GeometryInstanceFlagsKHR = Flags; using GeometryInstanceFlagsNV = GeometryInstanceFlagsKHR; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR GeometryInstanceFlagsKHR allFlags = GeometryInstanceFlagBitsKHR::eTriangleFacingCullDisable | GeometryInstanceFlagBitsKHR::eTriangleFlipFacing | GeometryInstanceFlagBitsKHR::eForceOpaque | GeometryInstanceFlagBitsKHR::eForceNoOpaque | GeometryInstanceFlagBitsKHR::eForceOpacityMicromap2StateEXT | GeometryInstanceFlagBitsKHR::eDisableOpacityMicromapsEXT; }; enum class BuildAccelerationStructureFlagBitsKHR : VkBuildAccelerationStructureFlagsKHR { eAllowUpdate = VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_KHR, eAllowCompaction = VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_KHR, ePreferFastTrace = VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_KHR, ePreferFastBuild = VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_KHR, eLowMemory = VK_BUILD_ACCELERATION_STRUCTURE_LOW_MEMORY_BIT_KHR, eMotionNV = VK_BUILD_ACCELERATION_STRUCTURE_MOTION_BIT_NV, eAllowOpacityMicromapUpdateEXT = VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_UPDATE_EXT, eAllowDisableOpacityMicromapsEXT = VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_DISABLE_OPACITY_MICROMAPS_EXT, eAllowOpacityMicromapDataUpdateEXT = VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_DATA_UPDATE_EXT, #if defined( VK_ENABLE_BETA_EXTENSIONS ) eAllowDisplacementMicromapUpdateNV = VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_DISPLACEMENT_MICROMAP_UPDATE_NV, #endif /*VK_ENABLE_BETA_EXTENSIONS*/ eAllowDataAccess = VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_DATA_ACCESS_KHR }; using BuildAccelerationStructureFlagBitsNV = BuildAccelerationStructureFlagBitsKHR; using BuildAccelerationStructureFlagsKHR = Flags; using BuildAccelerationStructureFlagsNV = BuildAccelerationStructureFlagsKHR; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR BuildAccelerationStructureFlagsKHR allFlags = BuildAccelerationStructureFlagBitsKHR::eAllowUpdate | BuildAccelerationStructureFlagBitsKHR::eAllowCompaction | BuildAccelerationStructureFlagBitsKHR::ePreferFastTrace | BuildAccelerationStructureFlagBitsKHR::ePreferFastBuild | BuildAccelerationStructureFlagBitsKHR::eLowMemory | BuildAccelerationStructureFlagBitsKHR::eMotionNV | BuildAccelerationStructureFlagBitsKHR::eAllowOpacityMicromapUpdateEXT | BuildAccelerationStructureFlagBitsKHR::eAllowDisableOpacityMicromapsEXT | BuildAccelerationStructureFlagBitsKHR::eAllowOpacityMicromapDataUpdateEXT #if defined( VK_ENABLE_BETA_EXTENSIONS ) | BuildAccelerationStructureFlagBitsKHR::eAllowDisplacementMicromapUpdateNV #endif /*VK_ENABLE_BETA_EXTENSIONS*/ | BuildAccelerationStructureFlagBitsKHR::eAllowDataAccess; }; enum class CopyAccelerationStructureModeKHR { eClone = VK_COPY_ACCELERATION_STRUCTURE_MODE_CLONE_KHR, eCompact = VK_COPY_ACCELERATION_STRUCTURE_MODE_COMPACT_KHR, eSerialize = VK_COPY_ACCELERATION_STRUCTURE_MODE_SERIALIZE_KHR, eDeserialize = VK_COPY_ACCELERATION_STRUCTURE_MODE_DESERIALIZE_KHR }; using CopyAccelerationStructureModeNV = CopyAccelerationStructureModeKHR; enum class GeometryTypeKHR { eTriangles = VK_GEOMETRY_TYPE_TRIANGLES_KHR, eAabbs = VK_GEOMETRY_TYPE_AABBS_KHR, eInstances = VK_GEOMETRY_TYPE_INSTANCES_KHR, eSpheresNV = VK_GEOMETRY_TYPE_SPHERES_NV, eLinearSweptSpheresNV = VK_GEOMETRY_TYPE_LINEAR_SWEPT_SPHERES_NV }; using GeometryTypeNV = GeometryTypeKHR; enum class AccelerationStructureCompatibilityKHR { eCompatible = VK_ACCELERATION_STRUCTURE_COMPATIBILITY_COMPATIBLE_KHR, eIncompatible = VK_ACCELERATION_STRUCTURE_COMPATIBILITY_INCOMPATIBLE_KHR }; enum class AccelerationStructureCreateFlagBitsKHR : VkAccelerationStructureCreateFlagsKHR { eDeviceAddressCaptureReplay = VK_ACCELERATION_STRUCTURE_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_KHR, eDescriptorBufferCaptureReplayEXT = VK_ACCELERATION_STRUCTURE_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT, eMotionNV = VK_ACCELERATION_STRUCTURE_CREATE_MOTION_BIT_NV }; using AccelerationStructureCreateFlagsKHR = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR AccelerationStructureCreateFlagsKHR allFlags = AccelerationStructureCreateFlagBitsKHR::eDeviceAddressCaptureReplay | AccelerationStructureCreateFlagBitsKHR::eDescriptorBufferCaptureReplayEXT | AccelerationStructureCreateFlagBitsKHR::eMotionNV; }; enum class BuildAccelerationStructureModeKHR { eBuild = VK_BUILD_ACCELERATION_STRUCTURE_MODE_BUILD_KHR, eUpdate = VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR }; //=== VK_KHR_ray_tracing_pipeline === enum class RayTracingShaderGroupTypeKHR { eGeneral = VK_RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_KHR, eTrianglesHitGroup = VK_RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHR, eProceduralHitGroup = VK_RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR }; using RayTracingShaderGroupTypeNV = RayTracingShaderGroupTypeKHR; enum class ShaderGroupShaderKHR { eGeneral = VK_SHADER_GROUP_SHADER_GENERAL_KHR, eClosestHit = VK_SHADER_GROUP_SHADER_CLOSEST_HIT_KHR, eAnyHit = VK_SHADER_GROUP_SHADER_ANY_HIT_KHR, eIntersection = VK_SHADER_GROUP_SHADER_INTERSECTION_KHR }; //=== VK_NV_framebuffer_mixed_samples === enum class CoverageModulationModeNV { eNone = VK_COVERAGE_MODULATION_MODE_NONE_NV, eRgb = VK_COVERAGE_MODULATION_MODE_RGB_NV, eAlpha = VK_COVERAGE_MODULATION_MODE_ALPHA_NV, eRgba = VK_COVERAGE_MODULATION_MODE_RGBA_NV }; enum class PipelineCoverageModulationStateCreateFlagBitsNV : VkPipelineCoverageModulationStateCreateFlagsNV { }; using PipelineCoverageModulationStateCreateFlagsNV = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR PipelineCoverageModulationStateCreateFlagsNV allFlags = {}; }; //=== VK_EXT_validation_cache === enum class ValidationCacheHeaderVersionEXT { eOne = VK_VALIDATION_CACHE_HEADER_VERSION_ONE_EXT }; enum class ValidationCacheCreateFlagBitsEXT : VkValidationCacheCreateFlagsEXT { }; using ValidationCacheCreateFlagsEXT = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR ValidationCacheCreateFlagsEXT allFlags = {}; }; //=== VK_NV_shading_rate_image === enum class ShadingRatePaletteEntryNV { eNoInvocations = VK_SHADING_RATE_PALETTE_ENTRY_NO_INVOCATIONS_NV, e16InvocationsPerPixel = VK_SHADING_RATE_PALETTE_ENTRY_16_INVOCATIONS_PER_PIXEL_NV, e8InvocationsPerPixel = VK_SHADING_RATE_PALETTE_ENTRY_8_INVOCATIONS_PER_PIXEL_NV, e4InvocationsPerPixel = VK_SHADING_RATE_PALETTE_ENTRY_4_INVOCATIONS_PER_PIXEL_NV, e2InvocationsPerPixel = VK_SHADING_RATE_PALETTE_ENTRY_2_INVOCATIONS_PER_PIXEL_NV, e1InvocationPerPixel = VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_PIXEL_NV, e1InvocationPer2X1Pixels = VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X1_PIXELS_NV, e1InvocationPer1X2Pixels = VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_1X2_PIXELS_NV, e1InvocationPer2X2Pixels = VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X2_PIXELS_NV, e1InvocationPer4X2Pixels = VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_4X2_PIXELS_NV, e1InvocationPer2X4Pixels = VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X4_PIXELS_NV, e1InvocationPer4X4Pixels = VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_4X4_PIXELS_NV }; enum class CoarseSampleOrderTypeNV { eDefault = VK_COARSE_SAMPLE_ORDER_TYPE_DEFAULT_NV, eCustom = VK_COARSE_SAMPLE_ORDER_TYPE_CUSTOM_NV, ePixelMajor = VK_COARSE_SAMPLE_ORDER_TYPE_PIXEL_MAJOR_NV, eSampleMajor = VK_COARSE_SAMPLE_ORDER_TYPE_SAMPLE_MAJOR_NV }; //=== VK_NV_ray_tracing === enum class AccelerationStructureMemoryRequirementsTypeNV { eObject = VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_OBJECT_NV, eBuildScratch = VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_BUILD_SCRATCH_NV, eUpdateScratch = VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_UPDATE_SCRATCH_NV }; //=== VK_AMD_pipeline_compiler_control === enum class PipelineCompilerControlFlagBitsAMD : VkPipelineCompilerControlFlagsAMD { }; using PipelineCompilerControlFlagsAMD = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR PipelineCompilerControlFlagsAMD allFlags = {}; }; //=== VK_AMD_memory_overallocation_behavior === enum class MemoryOverallocationBehaviorAMD { eDefault = VK_MEMORY_OVERALLOCATION_BEHAVIOR_DEFAULT_AMD, eAllowed = VK_MEMORY_OVERALLOCATION_BEHAVIOR_ALLOWED_AMD, eDisallowed = VK_MEMORY_OVERALLOCATION_BEHAVIOR_DISALLOWED_AMD }; //=== VK_INTEL_performance_query === enum class PerformanceConfigurationTypeINTEL { eCommandQueueMetricsDiscoveryActivated = VK_PERFORMANCE_CONFIGURATION_TYPE_COMMAND_QUEUE_METRICS_DISCOVERY_ACTIVATED_INTEL }; enum class QueryPoolSamplingModeINTEL { eManual = VK_QUERY_POOL_SAMPLING_MODE_MANUAL_INTEL }; enum class PerformanceOverrideTypeINTEL { eNullHardware = VK_PERFORMANCE_OVERRIDE_TYPE_NULL_HARDWARE_INTEL, eFlushGpuCaches = VK_PERFORMANCE_OVERRIDE_TYPE_FLUSH_GPU_CACHES_INTEL }; enum class PerformanceParameterTypeINTEL { eHwCountersSupported = VK_PERFORMANCE_PARAMETER_TYPE_HW_COUNTERS_SUPPORTED_INTEL, eStreamMarkerValidBits = VK_PERFORMANCE_PARAMETER_TYPE_STREAM_MARKER_VALID_BITS_INTEL }; enum class PerformanceValueTypeINTEL { eUint32 = VK_PERFORMANCE_VALUE_TYPE_UINT32_INTEL, eUint64 = VK_PERFORMANCE_VALUE_TYPE_UINT64_INTEL, eFloat = VK_PERFORMANCE_VALUE_TYPE_FLOAT_INTEL, eBool = VK_PERFORMANCE_VALUE_TYPE_BOOL_INTEL, eString = VK_PERFORMANCE_VALUE_TYPE_STRING_INTEL }; #if defined( VK_USE_PLATFORM_FUCHSIA ) //=== VK_FUCHSIA_imagepipe_surface === enum class ImagePipeSurfaceCreateFlagBitsFUCHSIA : VkImagePipeSurfaceCreateFlagsFUCHSIA { }; using ImagePipeSurfaceCreateFlagsFUCHSIA = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR ImagePipeSurfaceCreateFlagsFUCHSIA allFlags = {}; }; #endif /*VK_USE_PLATFORM_FUCHSIA*/ #if defined( VK_USE_PLATFORM_METAL_EXT ) //=== VK_EXT_metal_surface === enum class MetalSurfaceCreateFlagBitsEXT : VkMetalSurfaceCreateFlagsEXT { }; using MetalSurfaceCreateFlagsEXT = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR MetalSurfaceCreateFlagsEXT allFlags = {}; }; #endif /*VK_USE_PLATFORM_METAL_EXT*/ //=== VK_KHR_fragment_shading_rate === enum class FragmentShadingRateCombinerOpKHR { eKeep = VK_FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR, eReplace = VK_FRAGMENT_SHADING_RATE_COMBINER_OP_REPLACE_KHR, eMin = VK_FRAGMENT_SHADING_RATE_COMBINER_OP_MIN_KHR, eMax = VK_FRAGMENT_SHADING_RATE_COMBINER_OP_MAX_KHR, eMul = VK_FRAGMENT_SHADING_RATE_COMBINER_OP_MUL_KHR }; //=== VK_AMD_shader_core_properties2 === enum class ShaderCorePropertiesFlagBitsAMD : VkShaderCorePropertiesFlagsAMD { }; using ShaderCorePropertiesFlagsAMD = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR ShaderCorePropertiesFlagsAMD allFlags = {}; }; //=== VK_EXT_validation_features === enum class ValidationFeatureEnableEXT { eGpuAssisted = VK_VALIDATION_FEATURE_ENABLE_GPU_ASSISTED_EXT, eGpuAssistedReserveBindingSlot = VK_VALIDATION_FEATURE_ENABLE_GPU_ASSISTED_RESERVE_BINDING_SLOT_EXT, eBestPractices = VK_VALIDATION_FEATURE_ENABLE_BEST_PRACTICES_EXT, eDebugPrintf = VK_VALIDATION_FEATURE_ENABLE_DEBUG_PRINTF_EXT, eSynchronizationValidation = VK_VALIDATION_FEATURE_ENABLE_SYNCHRONIZATION_VALIDATION_EXT }; enum class ValidationFeatureDisableEXT { eAll = VK_VALIDATION_FEATURE_DISABLE_ALL_EXT, eShaders = VK_VALIDATION_FEATURE_DISABLE_SHADERS_EXT, eThreadSafety = VK_VALIDATION_FEATURE_DISABLE_THREAD_SAFETY_EXT, eApiParameters = VK_VALIDATION_FEATURE_DISABLE_API_PARAMETERS_EXT, eObjectLifetimes = VK_VALIDATION_FEATURE_DISABLE_OBJECT_LIFETIMES_EXT, eCoreChecks = VK_VALIDATION_FEATURE_DISABLE_CORE_CHECKS_EXT, eUniqueHandles = VK_VALIDATION_FEATURE_DISABLE_UNIQUE_HANDLES_EXT, eShaderValidationCache = VK_VALIDATION_FEATURE_DISABLE_SHADER_VALIDATION_CACHE_EXT }; //=== VK_NV_coverage_reduction_mode === enum class CoverageReductionModeNV { eMerge = VK_COVERAGE_REDUCTION_MODE_MERGE_NV, eTruncate = VK_COVERAGE_REDUCTION_MODE_TRUNCATE_NV }; enum class PipelineCoverageReductionStateCreateFlagBitsNV : VkPipelineCoverageReductionStateCreateFlagsNV { }; using PipelineCoverageReductionStateCreateFlagsNV = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR PipelineCoverageReductionStateCreateFlagsNV allFlags = {}; }; //=== VK_EXT_provoking_vertex === enum class ProvokingVertexModeEXT { eFirstVertex = VK_PROVOKING_VERTEX_MODE_FIRST_VERTEX_EXT, eLastVertex = VK_PROVOKING_VERTEX_MODE_LAST_VERTEX_EXT }; #if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_EXT_full_screen_exclusive === enum class FullScreenExclusiveEXT { eDefault = VK_FULL_SCREEN_EXCLUSIVE_DEFAULT_EXT, eAllowed = VK_FULL_SCREEN_EXCLUSIVE_ALLOWED_EXT, eDisallowed = VK_FULL_SCREEN_EXCLUSIVE_DISALLOWED_EXT, eApplicationControlled = VK_FULL_SCREEN_EXCLUSIVE_APPLICATION_CONTROLLED_EXT }; #endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_EXT_headless_surface === enum class HeadlessSurfaceCreateFlagBitsEXT : VkHeadlessSurfaceCreateFlagsEXT { }; using HeadlessSurfaceCreateFlagsEXT = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR HeadlessSurfaceCreateFlagsEXT allFlags = {}; }; //=== VK_KHR_pipeline_executable_properties === enum class PipelineExecutableStatisticFormatKHR { eBool32 = VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_BOOL32_KHR, eInt64 = VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_INT64_KHR, eUint64 = VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_UINT64_KHR, eFloat64 = VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_FLOAT64_KHR }; //=== VK_EXT_surface_maintenance1 === enum class PresentScalingFlagBitsEXT : VkPresentScalingFlagsEXT { eOneToOne = VK_PRESENT_SCALING_ONE_TO_ONE_BIT_EXT, eAspectRatioStretch = VK_PRESENT_SCALING_ASPECT_RATIO_STRETCH_BIT_EXT, eStretch = VK_PRESENT_SCALING_STRETCH_BIT_EXT }; using PresentScalingFlagsEXT = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR PresentScalingFlagsEXT allFlags = PresentScalingFlagBitsEXT::eOneToOne | PresentScalingFlagBitsEXT::eAspectRatioStretch | PresentScalingFlagBitsEXT::eStretch; }; enum class PresentGravityFlagBitsEXT : VkPresentGravityFlagsEXT { eMin = VK_PRESENT_GRAVITY_MIN_BIT_EXT, eMax = VK_PRESENT_GRAVITY_MAX_BIT_EXT, eCentered = VK_PRESENT_GRAVITY_CENTERED_BIT_EXT }; using PresentGravityFlagsEXT = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR PresentGravityFlagsEXT allFlags = PresentGravityFlagBitsEXT::eMin | PresentGravityFlagBitsEXT::eMax | PresentGravityFlagBitsEXT::eCentered; }; //=== VK_NV_device_generated_commands === enum class IndirectStateFlagBitsNV : VkIndirectStateFlagsNV { eFlagFrontface = VK_INDIRECT_STATE_FLAG_FRONTFACE_BIT_NV }; using IndirectStateFlagsNV = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR IndirectStateFlagsNV allFlags = IndirectStateFlagBitsNV::eFlagFrontface; }; enum class IndirectCommandsTokenTypeNV { eShaderGroup = VK_INDIRECT_COMMANDS_TOKEN_TYPE_SHADER_GROUP_NV, eStateFlags = VK_INDIRECT_COMMANDS_TOKEN_TYPE_STATE_FLAGS_NV, eIndexBuffer = VK_INDIRECT_COMMANDS_TOKEN_TYPE_INDEX_BUFFER_NV, eVertexBuffer = VK_INDIRECT_COMMANDS_TOKEN_TYPE_VERTEX_BUFFER_NV, ePushConstant = VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_NV, eDrawIndexed = VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_INDEXED_NV, eDraw = VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_NV, eDrawTasks = VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_TASKS_NV, eDrawMeshTasks = VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_MESH_TASKS_NV, ePipeline = VK_INDIRECT_COMMANDS_TOKEN_TYPE_PIPELINE_NV, eDispatch = VK_INDIRECT_COMMANDS_TOKEN_TYPE_DISPATCH_NV }; enum class IndirectCommandsLayoutUsageFlagBitsNV : VkIndirectCommandsLayoutUsageFlagsNV { eExplicitPreprocess = VK_INDIRECT_COMMANDS_LAYOUT_USAGE_EXPLICIT_PREPROCESS_BIT_NV, eIndexedSequences = VK_INDIRECT_COMMANDS_LAYOUT_USAGE_INDEXED_SEQUENCES_BIT_NV, eUnorderedSequences = VK_INDIRECT_COMMANDS_LAYOUT_USAGE_UNORDERED_SEQUENCES_BIT_NV }; using IndirectCommandsLayoutUsageFlagsNV = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR IndirectCommandsLayoutUsageFlagsNV allFlags = IndirectCommandsLayoutUsageFlagBitsNV::eExplicitPreprocess | IndirectCommandsLayoutUsageFlagBitsNV::eIndexedSequences | IndirectCommandsLayoutUsageFlagBitsNV::eUnorderedSequences; }; //=== VK_EXT_depth_bias_control === enum class DepthBiasRepresentationEXT { eLeastRepresentableValueFormat = VK_DEPTH_BIAS_REPRESENTATION_LEAST_REPRESENTABLE_VALUE_FORMAT_EXT, eLeastRepresentableValueForceUnorm = VK_DEPTH_BIAS_REPRESENTATION_LEAST_REPRESENTABLE_VALUE_FORCE_UNORM_EXT, eFloat = VK_DEPTH_BIAS_REPRESENTATION_FLOAT_EXT }; //=== VK_EXT_device_memory_report === enum class DeviceMemoryReportEventTypeEXT { eAllocate = VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_ALLOCATE_EXT, eFree = VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_FREE_EXT, eImport = VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_IMPORT_EXT, eUnimport = VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_UNIMPORT_EXT, eAllocationFailed = VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_ALLOCATION_FAILED_EXT }; enum class DeviceMemoryReportFlagBitsEXT : VkDeviceMemoryReportFlagsEXT { }; using DeviceMemoryReportFlagsEXT = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR DeviceMemoryReportFlagsEXT allFlags = {}; }; //=== VK_KHR_video_encode_queue === enum class VideoEncodeCapabilityFlagBitsKHR : VkVideoEncodeCapabilityFlagsKHR { ePrecedingExternallyEncodedBytes = VK_VIDEO_ENCODE_CAPABILITY_PRECEDING_EXTERNALLY_ENCODED_BYTES_BIT_KHR, eInsufficientBitstreamBufferRangeDetection = VK_VIDEO_ENCODE_CAPABILITY_INSUFFICIENT_BITSTREAM_BUFFER_RANGE_DETECTION_BIT_KHR, eQuantizationDeltaMap = VK_VIDEO_ENCODE_CAPABILITY_QUANTIZATION_DELTA_MAP_BIT_KHR, eEmphasisMap = VK_VIDEO_ENCODE_CAPABILITY_EMPHASIS_MAP_BIT_KHR }; using VideoEncodeCapabilityFlagsKHR = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR VideoEncodeCapabilityFlagsKHR allFlags = VideoEncodeCapabilityFlagBitsKHR::ePrecedingExternallyEncodedBytes | VideoEncodeCapabilityFlagBitsKHR::eInsufficientBitstreamBufferRangeDetection | VideoEncodeCapabilityFlagBitsKHR::eQuantizationDeltaMap | VideoEncodeCapabilityFlagBitsKHR::eEmphasisMap; }; enum class VideoEncodeFeedbackFlagBitsKHR : VkVideoEncodeFeedbackFlagsKHR { eBitstreamBufferOffset = VK_VIDEO_ENCODE_FEEDBACK_BITSTREAM_BUFFER_OFFSET_BIT_KHR, eBitstreamBytesWritten = VK_VIDEO_ENCODE_FEEDBACK_BITSTREAM_BYTES_WRITTEN_BIT_KHR, eBitstreamHasOverrides = VK_VIDEO_ENCODE_FEEDBACK_BITSTREAM_HAS_OVERRIDES_BIT_KHR }; using VideoEncodeFeedbackFlagsKHR = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR VideoEncodeFeedbackFlagsKHR allFlags = VideoEncodeFeedbackFlagBitsKHR::eBitstreamBufferOffset | VideoEncodeFeedbackFlagBitsKHR::eBitstreamBytesWritten | VideoEncodeFeedbackFlagBitsKHR::eBitstreamHasOverrides; }; enum class VideoEncodeUsageFlagBitsKHR : VkVideoEncodeUsageFlagsKHR { eDefault = VK_VIDEO_ENCODE_USAGE_DEFAULT_KHR, eTranscoding = VK_VIDEO_ENCODE_USAGE_TRANSCODING_BIT_KHR, eStreaming = VK_VIDEO_ENCODE_USAGE_STREAMING_BIT_KHR, eRecording = VK_VIDEO_ENCODE_USAGE_RECORDING_BIT_KHR, eConferencing = VK_VIDEO_ENCODE_USAGE_CONFERENCING_BIT_KHR }; using VideoEncodeUsageFlagsKHR = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR VideoEncodeUsageFlagsKHR allFlags = VideoEncodeUsageFlagBitsKHR::eDefault | VideoEncodeUsageFlagBitsKHR::eTranscoding | VideoEncodeUsageFlagBitsKHR::eStreaming | VideoEncodeUsageFlagBitsKHR::eRecording | VideoEncodeUsageFlagBitsKHR::eConferencing; }; enum class VideoEncodeContentFlagBitsKHR : VkVideoEncodeContentFlagsKHR { eDefault = VK_VIDEO_ENCODE_CONTENT_DEFAULT_KHR, eCamera = VK_VIDEO_ENCODE_CONTENT_CAMERA_BIT_KHR, eDesktop = VK_VIDEO_ENCODE_CONTENT_DESKTOP_BIT_KHR, eRendered = VK_VIDEO_ENCODE_CONTENT_RENDERED_BIT_KHR }; using VideoEncodeContentFlagsKHR = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR VideoEncodeContentFlagsKHR allFlags = VideoEncodeContentFlagBitsKHR::eDefault | VideoEncodeContentFlagBitsKHR::eCamera | VideoEncodeContentFlagBitsKHR::eDesktop | VideoEncodeContentFlagBitsKHR::eRendered; }; enum class VideoEncodeTuningModeKHR { eDefault = VK_VIDEO_ENCODE_TUNING_MODE_DEFAULT_KHR, eHighQuality = VK_VIDEO_ENCODE_TUNING_MODE_HIGH_QUALITY_KHR, eLowLatency = VK_VIDEO_ENCODE_TUNING_MODE_LOW_LATENCY_KHR, eUltraLowLatency = VK_VIDEO_ENCODE_TUNING_MODE_ULTRA_LOW_LATENCY_KHR, eLossless = VK_VIDEO_ENCODE_TUNING_MODE_LOSSLESS_KHR }; enum class VideoEncodeRateControlModeFlagBitsKHR : VkVideoEncodeRateControlModeFlagsKHR { eDefault = VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DEFAULT_KHR, eDisabled = VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DISABLED_BIT_KHR, eCbr = VK_VIDEO_ENCODE_RATE_CONTROL_MODE_CBR_BIT_KHR, eVbr = VK_VIDEO_ENCODE_RATE_CONTROL_MODE_VBR_BIT_KHR }; using VideoEncodeRateControlModeFlagsKHR = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR VideoEncodeRateControlModeFlagsKHR allFlags = VideoEncodeRateControlModeFlagBitsKHR::eDefault | VideoEncodeRateControlModeFlagBitsKHR::eDisabled | VideoEncodeRateControlModeFlagBitsKHR::eCbr | VideoEncodeRateControlModeFlagBitsKHR::eVbr; }; enum class VideoEncodeFlagBitsKHR : VkVideoEncodeFlagsKHR { eWithQuantizationDeltaMap = VK_VIDEO_ENCODE_WITH_QUANTIZATION_DELTA_MAP_BIT_KHR, eWithEmphasisMap = VK_VIDEO_ENCODE_WITH_EMPHASIS_MAP_BIT_KHR }; using VideoEncodeFlagsKHR = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR VideoEncodeFlagsKHR allFlags = VideoEncodeFlagBitsKHR::eWithQuantizationDeltaMap | VideoEncodeFlagBitsKHR::eWithEmphasisMap; }; enum class VideoEncodeRateControlFlagBitsKHR : VkVideoEncodeRateControlFlagsKHR { }; using VideoEncodeRateControlFlagsKHR = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR VideoEncodeRateControlFlagsKHR allFlags = {}; }; //=== VK_NV_device_diagnostics_config === enum class DeviceDiagnosticsConfigFlagBitsNV : VkDeviceDiagnosticsConfigFlagsNV { eEnableShaderDebugInfo = VK_DEVICE_DIAGNOSTICS_CONFIG_ENABLE_SHADER_DEBUG_INFO_BIT_NV, eEnableResourceTracking = VK_DEVICE_DIAGNOSTICS_CONFIG_ENABLE_RESOURCE_TRACKING_BIT_NV, eEnableAutomaticCheckpoints = VK_DEVICE_DIAGNOSTICS_CONFIG_ENABLE_AUTOMATIC_CHECKPOINTS_BIT_NV, eEnableShaderErrorReporting = VK_DEVICE_DIAGNOSTICS_CONFIG_ENABLE_SHADER_ERROR_REPORTING_BIT_NV }; using DeviceDiagnosticsConfigFlagsNV = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR DeviceDiagnosticsConfigFlagsNV allFlags = DeviceDiagnosticsConfigFlagBitsNV::eEnableShaderDebugInfo | DeviceDiagnosticsConfigFlagBitsNV::eEnableResourceTracking | DeviceDiagnosticsConfigFlagBitsNV::eEnableAutomaticCheckpoints | DeviceDiagnosticsConfigFlagBitsNV::eEnableShaderErrorReporting; }; #if defined( VK_USE_PLATFORM_METAL_EXT ) //=== VK_EXT_metal_objects === enum class ExportMetalObjectTypeFlagBitsEXT : VkExportMetalObjectTypeFlagsEXT { eMetalDevice = VK_EXPORT_METAL_OBJECT_TYPE_METAL_DEVICE_BIT_EXT, eMetalCommandQueue = VK_EXPORT_METAL_OBJECT_TYPE_METAL_COMMAND_QUEUE_BIT_EXT, eMetalBuffer = VK_EXPORT_METAL_OBJECT_TYPE_METAL_BUFFER_BIT_EXT, eMetalTexture = VK_EXPORT_METAL_OBJECT_TYPE_METAL_TEXTURE_BIT_EXT, eMetalIosurface = VK_EXPORT_METAL_OBJECT_TYPE_METAL_IOSURFACE_BIT_EXT, eMetalSharedEvent = VK_EXPORT_METAL_OBJECT_TYPE_METAL_SHARED_EVENT_BIT_EXT }; using ExportMetalObjectTypeFlagsEXT = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR ExportMetalObjectTypeFlagsEXT allFlags = ExportMetalObjectTypeFlagBitsEXT::eMetalDevice | ExportMetalObjectTypeFlagBitsEXT::eMetalCommandQueue | ExportMetalObjectTypeFlagBitsEXT::eMetalBuffer | ExportMetalObjectTypeFlagBitsEXT::eMetalTexture | ExportMetalObjectTypeFlagBitsEXT::eMetalIosurface | ExportMetalObjectTypeFlagBitsEXT::eMetalSharedEvent; }; #endif /*VK_USE_PLATFORM_METAL_EXT*/ //=== VK_EXT_graphics_pipeline_library === enum class GraphicsPipelineLibraryFlagBitsEXT : VkGraphicsPipelineLibraryFlagsEXT { eVertexInputInterface = VK_GRAPHICS_PIPELINE_LIBRARY_VERTEX_INPUT_INTERFACE_BIT_EXT, ePreRasterizationShaders = VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT, eFragmentShader = VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, eFragmentOutputInterface = VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT }; using GraphicsPipelineLibraryFlagsEXT = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR GraphicsPipelineLibraryFlagsEXT allFlags = GraphicsPipelineLibraryFlagBitsEXT::eVertexInputInterface | GraphicsPipelineLibraryFlagBitsEXT::ePreRasterizationShaders | GraphicsPipelineLibraryFlagBitsEXT::eFragmentShader | GraphicsPipelineLibraryFlagBitsEXT::eFragmentOutputInterface; }; //=== VK_NV_fragment_shading_rate_enums === enum class FragmentShadingRateNV { e1InvocationPerPixel = VK_FRAGMENT_SHADING_RATE_1_INVOCATION_PER_PIXEL_NV, e1InvocationPer1X2Pixels = VK_FRAGMENT_SHADING_RATE_1_INVOCATION_PER_1X2_PIXELS_NV, e1InvocationPer2X1Pixels = VK_FRAGMENT_SHADING_RATE_1_INVOCATION_PER_2X1_PIXELS_NV, e1InvocationPer2X2Pixels = VK_FRAGMENT_SHADING_RATE_1_INVOCATION_PER_2X2_PIXELS_NV, e1InvocationPer2X4Pixels = VK_FRAGMENT_SHADING_RATE_1_INVOCATION_PER_2X4_PIXELS_NV, e1InvocationPer4X2Pixels = VK_FRAGMENT_SHADING_RATE_1_INVOCATION_PER_4X2_PIXELS_NV, e1InvocationPer4X4Pixels = VK_FRAGMENT_SHADING_RATE_1_INVOCATION_PER_4X4_PIXELS_NV, e2InvocationsPerPixel = VK_FRAGMENT_SHADING_RATE_2_INVOCATIONS_PER_PIXEL_NV, e4InvocationsPerPixel = VK_FRAGMENT_SHADING_RATE_4_INVOCATIONS_PER_PIXEL_NV, e8InvocationsPerPixel = VK_FRAGMENT_SHADING_RATE_8_INVOCATIONS_PER_PIXEL_NV, e16InvocationsPerPixel = VK_FRAGMENT_SHADING_RATE_16_INVOCATIONS_PER_PIXEL_NV, eNoInvocations = VK_FRAGMENT_SHADING_RATE_NO_INVOCATIONS_NV }; enum class FragmentShadingRateTypeNV { eFragmentSize = VK_FRAGMENT_SHADING_RATE_TYPE_FRAGMENT_SIZE_NV, eEnums = VK_FRAGMENT_SHADING_RATE_TYPE_ENUMS_NV }; //=== VK_NV_ray_tracing_motion_blur === enum class AccelerationStructureMotionInstanceTypeNV { eStatic = VK_ACCELERATION_STRUCTURE_MOTION_INSTANCE_TYPE_STATIC_NV, eMatrixMotion = VK_ACCELERATION_STRUCTURE_MOTION_INSTANCE_TYPE_MATRIX_MOTION_NV, eSrtMotion = VK_ACCELERATION_STRUCTURE_MOTION_INSTANCE_TYPE_SRT_MOTION_NV }; enum class AccelerationStructureMotionInfoFlagBitsNV : VkAccelerationStructureMotionInfoFlagsNV { }; using AccelerationStructureMotionInfoFlagsNV = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR AccelerationStructureMotionInfoFlagsNV allFlags = {}; }; enum class AccelerationStructureMotionInstanceFlagBitsNV : VkAccelerationStructureMotionInstanceFlagsNV { }; using AccelerationStructureMotionInstanceFlagsNV = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR AccelerationStructureMotionInstanceFlagsNV allFlags = {}; }; //=== VK_EXT_image_compression_control === enum class ImageCompressionFlagBitsEXT : VkImageCompressionFlagsEXT { eDefault = VK_IMAGE_COMPRESSION_DEFAULT_EXT, eFixedRateDefault = VK_IMAGE_COMPRESSION_FIXED_RATE_DEFAULT_EXT, eFixedRateExplicit = VK_IMAGE_COMPRESSION_FIXED_RATE_EXPLICIT_EXT, eDisabled = VK_IMAGE_COMPRESSION_DISABLED_EXT }; using ImageCompressionFlagsEXT = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR ImageCompressionFlagsEXT allFlags = ImageCompressionFlagBitsEXT::eDefault | ImageCompressionFlagBitsEXT::eFixedRateDefault | ImageCompressionFlagBitsEXT::eFixedRateExplicit | ImageCompressionFlagBitsEXT::eDisabled; }; enum class ImageCompressionFixedRateFlagBitsEXT : VkImageCompressionFixedRateFlagsEXT { eNone = VK_IMAGE_COMPRESSION_FIXED_RATE_NONE_EXT, e1Bpc = VK_IMAGE_COMPRESSION_FIXED_RATE_1BPC_BIT_EXT, e2Bpc = VK_IMAGE_COMPRESSION_FIXED_RATE_2BPC_BIT_EXT, e3Bpc = VK_IMAGE_COMPRESSION_FIXED_RATE_3BPC_BIT_EXT, e4Bpc = VK_IMAGE_COMPRESSION_FIXED_RATE_4BPC_BIT_EXT, e5Bpc = VK_IMAGE_COMPRESSION_FIXED_RATE_5BPC_BIT_EXT, e6Bpc = VK_IMAGE_COMPRESSION_FIXED_RATE_6BPC_BIT_EXT, e7Bpc = VK_IMAGE_COMPRESSION_FIXED_RATE_7BPC_BIT_EXT, e8Bpc = VK_IMAGE_COMPRESSION_FIXED_RATE_8BPC_BIT_EXT, e9Bpc = VK_IMAGE_COMPRESSION_FIXED_RATE_9BPC_BIT_EXT, e10Bpc = VK_IMAGE_COMPRESSION_FIXED_RATE_10BPC_BIT_EXT, e11Bpc = VK_IMAGE_COMPRESSION_FIXED_RATE_11BPC_BIT_EXT, e12Bpc = VK_IMAGE_COMPRESSION_FIXED_RATE_12BPC_BIT_EXT, e13Bpc = VK_IMAGE_COMPRESSION_FIXED_RATE_13BPC_BIT_EXT, e14Bpc = VK_IMAGE_COMPRESSION_FIXED_RATE_14BPC_BIT_EXT, e15Bpc = VK_IMAGE_COMPRESSION_FIXED_RATE_15BPC_BIT_EXT, e16Bpc = VK_IMAGE_COMPRESSION_FIXED_RATE_16BPC_BIT_EXT, e17Bpc = VK_IMAGE_COMPRESSION_FIXED_RATE_17BPC_BIT_EXT, e18Bpc = VK_IMAGE_COMPRESSION_FIXED_RATE_18BPC_BIT_EXT, e19Bpc = VK_IMAGE_COMPRESSION_FIXED_RATE_19BPC_BIT_EXT, e20Bpc = VK_IMAGE_COMPRESSION_FIXED_RATE_20BPC_BIT_EXT, e21Bpc = VK_IMAGE_COMPRESSION_FIXED_RATE_21BPC_BIT_EXT, e22Bpc = VK_IMAGE_COMPRESSION_FIXED_RATE_22BPC_BIT_EXT, e23Bpc = VK_IMAGE_COMPRESSION_FIXED_RATE_23BPC_BIT_EXT, e24Bpc = VK_IMAGE_COMPRESSION_FIXED_RATE_24BPC_BIT_EXT }; using ImageCompressionFixedRateFlagsEXT = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR ImageCompressionFixedRateFlagsEXT allFlags = ImageCompressionFixedRateFlagBitsEXT::eNone | ImageCompressionFixedRateFlagBitsEXT::e1Bpc | ImageCompressionFixedRateFlagBitsEXT::e2Bpc | ImageCompressionFixedRateFlagBitsEXT::e3Bpc | ImageCompressionFixedRateFlagBitsEXT::e4Bpc | ImageCompressionFixedRateFlagBitsEXT::e5Bpc | ImageCompressionFixedRateFlagBitsEXT::e6Bpc | ImageCompressionFixedRateFlagBitsEXT::e7Bpc | ImageCompressionFixedRateFlagBitsEXT::e8Bpc | ImageCompressionFixedRateFlagBitsEXT::e9Bpc | ImageCompressionFixedRateFlagBitsEXT::e10Bpc | ImageCompressionFixedRateFlagBitsEXT::e11Bpc | ImageCompressionFixedRateFlagBitsEXT::e12Bpc | ImageCompressionFixedRateFlagBitsEXT::e13Bpc | ImageCompressionFixedRateFlagBitsEXT::e14Bpc | ImageCompressionFixedRateFlagBitsEXT::e15Bpc | ImageCompressionFixedRateFlagBitsEXT::e16Bpc | ImageCompressionFixedRateFlagBitsEXT::e17Bpc | ImageCompressionFixedRateFlagBitsEXT::e18Bpc | ImageCompressionFixedRateFlagBitsEXT::e19Bpc | ImageCompressionFixedRateFlagBitsEXT::e20Bpc | ImageCompressionFixedRateFlagBitsEXT::e21Bpc | ImageCompressionFixedRateFlagBitsEXT::e22Bpc | ImageCompressionFixedRateFlagBitsEXT::e23Bpc | ImageCompressionFixedRateFlagBitsEXT::e24Bpc; }; //=== VK_EXT_device_fault === enum class DeviceFaultAddressTypeEXT { eNone = VK_DEVICE_FAULT_ADDRESS_TYPE_NONE_EXT, eReadInvalid = VK_DEVICE_FAULT_ADDRESS_TYPE_READ_INVALID_EXT, eWriteInvalid = VK_DEVICE_FAULT_ADDRESS_TYPE_WRITE_INVALID_EXT, eExecuteInvalid = VK_DEVICE_FAULT_ADDRESS_TYPE_EXECUTE_INVALID_EXT, eInstructionPointerUnknown = VK_DEVICE_FAULT_ADDRESS_TYPE_INSTRUCTION_POINTER_UNKNOWN_EXT, eInstructionPointerInvalid = VK_DEVICE_FAULT_ADDRESS_TYPE_INSTRUCTION_POINTER_INVALID_EXT, eInstructionPointerFault = VK_DEVICE_FAULT_ADDRESS_TYPE_INSTRUCTION_POINTER_FAULT_EXT }; enum class DeviceFaultVendorBinaryHeaderVersionEXT { eOne = VK_DEVICE_FAULT_VENDOR_BINARY_HEADER_VERSION_ONE_EXT }; #if defined( VK_USE_PLATFORM_DIRECTFB_EXT ) //=== VK_EXT_directfb_surface === enum class DirectFBSurfaceCreateFlagBitsEXT : VkDirectFBSurfaceCreateFlagsEXT { }; using DirectFBSurfaceCreateFlagsEXT = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR DirectFBSurfaceCreateFlagsEXT allFlags = {}; }; #endif /*VK_USE_PLATFORM_DIRECTFB_EXT*/ //=== VK_EXT_device_address_binding_report === enum class DeviceAddressBindingFlagBitsEXT : VkDeviceAddressBindingFlagsEXT { eInternalObject = VK_DEVICE_ADDRESS_BINDING_INTERNAL_OBJECT_BIT_EXT }; using DeviceAddressBindingFlagsEXT = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR DeviceAddressBindingFlagsEXT allFlags = DeviceAddressBindingFlagBitsEXT::eInternalObject; }; enum class DeviceAddressBindingTypeEXT { eBind = VK_DEVICE_ADDRESS_BINDING_TYPE_BIND_EXT, eUnbind = VK_DEVICE_ADDRESS_BINDING_TYPE_UNBIND_EXT }; #if defined( VK_USE_PLATFORM_FUCHSIA ) //=== VK_FUCHSIA_buffer_collection === enum class ImageConstraintsInfoFlagBitsFUCHSIA : VkImageConstraintsInfoFlagsFUCHSIA { eCpuReadRarely = VK_IMAGE_CONSTRAINTS_INFO_CPU_READ_RARELY_FUCHSIA, eCpuReadOften = VK_IMAGE_CONSTRAINTS_INFO_CPU_READ_OFTEN_FUCHSIA, eCpuWriteRarely = VK_IMAGE_CONSTRAINTS_INFO_CPU_WRITE_RARELY_FUCHSIA, eCpuWriteOften = VK_IMAGE_CONSTRAINTS_INFO_CPU_WRITE_OFTEN_FUCHSIA, eProtectedOptional = VK_IMAGE_CONSTRAINTS_INFO_PROTECTED_OPTIONAL_FUCHSIA }; using ImageConstraintsInfoFlagsFUCHSIA = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR ImageConstraintsInfoFlagsFUCHSIA allFlags = ImageConstraintsInfoFlagBitsFUCHSIA::eCpuReadRarely | ImageConstraintsInfoFlagBitsFUCHSIA::eCpuReadOften | ImageConstraintsInfoFlagBitsFUCHSIA::eCpuWriteRarely | ImageConstraintsInfoFlagBitsFUCHSIA::eCpuWriteOften | ImageConstraintsInfoFlagBitsFUCHSIA::eProtectedOptional; }; enum class ImageFormatConstraintsFlagBitsFUCHSIA : VkImageFormatConstraintsFlagsFUCHSIA { }; using ImageFormatConstraintsFlagsFUCHSIA = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR ImageFormatConstraintsFlagsFUCHSIA allFlags = {}; }; #endif /*VK_USE_PLATFORM_FUCHSIA*/ //=== VK_EXT_frame_boundary === enum class FrameBoundaryFlagBitsEXT : VkFrameBoundaryFlagsEXT { eFrameEnd = VK_FRAME_BOUNDARY_FRAME_END_BIT_EXT }; using FrameBoundaryFlagsEXT = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR FrameBoundaryFlagsEXT allFlags = FrameBoundaryFlagBitsEXT::eFrameEnd; }; #if defined( VK_USE_PLATFORM_SCREEN_QNX ) //=== VK_QNX_screen_surface === enum class ScreenSurfaceCreateFlagBitsQNX : VkScreenSurfaceCreateFlagsQNX { }; using ScreenSurfaceCreateFlagsQNX = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR ScreenSurfaceCreateFlagsQNX allFlags = {}; }; #endif /*VK_USE_PLATFORM_SCREEN_QNX*/ //=== VK_EXT_opacity_micromap === enum class MicromapTypeEXT { eOpacityMicromap = VK_MICROMAP_TYPE_OPACITY_MICROMAP_EXT, #if defined( VK_ENABLE_BETA_EXTENSIONS ) eDisplacementMicromapNV = VK_MICROMAP_TYPE_DISPLACEMENT_MICROMAP_NV #endif /*VK_ENABLE_BETA_EXTENSIONS*/ }; enum class BuildMicromapFlagBitsEXT : VkBuildMicromapFlagsEXT { ePreferFastTrace = VK_BUILD_MICROMAP_PREFER_FAST_TRACE_BIT_EXT, ePreferFastBuild = VK_BUILD_MICROMAP_PREFER_FAST_BUILD_BIT_EXT, eAllowCompaction = VK_BUILD_MICROMAP_ALLOW_COMPACTION_BIT_EXT }; using BuildMicromapFlagsEXT = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR BuildMicromapFlagsEXT allFlags = BuildMicromapFlagBitsEXT::ePreferFastTrace | BuildMicromapFlagBitsEXT::ePreferFastBuild | BuildMicromapFlagBitsEXT::eAllowCompaction; }; enum class CopyMicromapModeEXT { eClone = VK_COPY_MICROMAP_MODE_CLONE_EXT, eSerialize = VK_COPY_MICROMAP_MODE_SERIALIZE_EXT, eDeserialize = VK_COPY_MICROMAP_MODE_DESERIALIZE_EXT, eCompact = VK_COPY_MICROMAP_MODE_COMPACT_EXT }; enum class MicromapCreateFlagBitsEXT : VkMicromapCreateFlagsEXT { eDeviceAddressCaptureReplay = VK_MICROMAP_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_EXT }; using MicromapCreateFlagsEXT = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR MicromapCreateFlagsEXT allFlags = MicromapCreateFlagBitsEXT::eDeviceAddressCaptureReplay; }; enum class BuildMicromapModeEXT { eBuild = VK_BUILD_MICROMAP_MODE_BUILD_EXT }; enum class OpacityMicromapFormatEXT { e2State = VK_OPACITY_MICROMAP_FORMAT_2_STATE_EXT, e4State = VK_OPACITY_MICROMAP_FORMAT_4_STATE_EXT }; enum class OpacityMicromapSpecialIndexEXT { eFullyTransparent = VK_OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_TRANSPARENT_EXT, eFullyOpaque = VK_OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_OPAQUE_EXT, eFullyUnknownTransparent = VK_OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_UNKNOWN_TRANSPARENT_EXT, eFullyUnknownOpaque = VK_OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_UNKNOWN_OPAQUE_EXT, eClusterGeometryDisableOpacityMicromapNV = VK_OPACITY_MICROMAP_SPECIAL_INDEX_CLUSTER_GEOMETRY_DISABLE_OPACITY_MICROMAP_NV }; #if defined( VK_ENABLE_BETA_EXTENSIONS ) //=== VK_NV_displacement_micromap === enum class DisplacementMicromapFormatNV { e64Triangles64Bytes = VK_DISPLACEMENT_MICROMAP_FORMAT_64_TRIANGLES_64_BYTES_NV, e256Triangles128Bytes = VK_DISPLACEMENT_MICROMAP_FORMAT_256_TRIANGLES_128_BYTES_NV, e1024Triangles128Bytes = VK_DISPLACEMENT_MICROMAP_FORMAT_1024_TRIANGLES_128_BYTES_NV }; #endif /*VK_ENABLE_BETA_EXTENSIONS*/ //=== VK_ARM_scheduling_controls === enum class PhysicalDeviceSchedulingControlsFlagBitsARM : VkPhysicalDeviceSchedulingControlsFlagsARM { eShaderCoreCount = VK_PHYSICAL_DEVICE_SCHEDULING_CONTROLS_SHADER_CORE_COUNT_ARM }; using PhysicalDeviceSchedulingControlsFlagsARM = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR PhysicalDeviceSchedulingControlsFlagsARM allFlags = PhysicalDeviceSchedulingControlsFlagBitsARM::eShaderCoreCount; }; //=== VK_NV_memory_decompression === enum class MemoryDecompressionMethodFlagBitsNV : VkMemoryDecompressionMethodFlagsNV { eGdeflate10 = VK_MEMORY_DECOMPRESSION_METHOD_GDEFLATE_1_0_BIT_NV }; using MemoryDecompressionMethodFlagsNV = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR MemoryDecompressionMethodFlagsNV allFlags = MemoryDecompressionMethodFlagBitsNV::eGdeflate10; }; //=== VK_NV_ray_tracing_linear_swept_spheres === enum class RayTracingLssIndexingModeNV { eList = VK_RAY_TRACING_LSS_INDEXING_MODE_LIST_NV, eSuccessive = VK_RAY_TRACING_LSS_INDEXING_MODE_SUCCESSIVE_NV }; enum class RayTracingLssPrimitiveEndCapsModeNV { eNone = VK_RAY_TRACING_LSS_PRIMITIVE_END_CAPS_MODE_NONE_NV, eChained = VK_RAY_TRACING_LSS_PRIMITIVE_END_CAPS_MODE_CHAINED_NV }; //=== VK_EXT_subpass_merge_feedback === enum class SubpassMergeStatusEXT { eMerged = VK_SUBPASS_MERGE_STATUS_MERGED_EXT, eDisallowed = VK_SUBPASS_MERGE_STATUS_DISALLOWED_EXT, eNotMergedSideEffects = VK_SUBPASS_MERGE_STATUS_NOT_MERGED_SIDE_EFFECTS_EXT, eNotMergedSamplesMismatch = VK_SUBPASS_MERGE_STATUS_NOT_MERGED_SAMPLES_MISMATCH_EXT, eNotMergedViewsMismatch = VK_SUBPASS_MERGE_STATUS_NOT_MERGED_VIEWS_MISMATCH_EXT, eNotMergedAliasing = VK_SUBPASS_MERGE_STATUS_NOT_MERGED_ALIASING_EXT, eNotMergedDependencies = VK_SUBPASS_MERGE_STATUS_NOT_MERGED_DEPENDENCIES_EXT, eNotMergedIncompatibleInputAttachment = VK_SUBPASS_MERGE_STATUS_NOT_MERGED_INCOMPATIBLE_INPUT_ATTACHMENT_EXT, eNotMergedTooManyAttachments = VK_SUBPASS_MERGE_STATUS_NOT_MERGED_TOO_MANY_ATTACHMENTS_EXT, eNotMergedInsufficientStorage = VK_SUBPASS_MERGE_STATUS_NOT_MERGED_INSUFFICIENT_STORAGE_EXT, eNotMergedDepthStencilCount = VK_SUBPASS_MERGE_STATUS_NOT_MERGED_DEPTH_STENCIL_COUNT_EXT, eNotMergedResolveAttachmentReuse = VK_SUBPASS_MERGE_STATUS_NOT_MERGED_RESOLVE_ATTACHMENT_REUSE_EXT, eNotMergedSingleSubpass = VK_SUBPASS_MERGE_STATUS_NOT_MERGED_SINGLE_SUBPASS_EXT, eNotMergedUnspecified = VK_SUBPASS_MERGE_STATUS_NOT_MERGED_UNSPECIFIED_EXT }; //=== VK_LUNARG_direct_driver_loading === enum class DirectDriverLoadingModeLUNARG { eExclusive = VK_DIRECT_DRIVER_LOADING_MODE_EXCLUSIVE_LUNARG, eInclusive = VK_DIRECT_DRIVER_LOADING_MODE_INCLUSIVE_LUNARG }; enum class DirectDriverLoadingFlagBitsLUNARG : VkDirectDriverLoadingFlagsLUNARG { }; using DirectDriverLoadingFlagsLUNARG = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR DirectDriverLoadingFlagsLUNARG allFlags = {}; }; //=== VK_NV_optical_flow === enum class OpticalFlowUsageFlagBitsNV : VkOpticalFlowUsageFlagsNV { eUnknown = VK_OPTICAL_FLOW_USAGE_UNKNOWN_NV, eInput = VK_OPTICAL_FLOW_USAGE_INPUT_BIT_NV, eOutput = VK_OPTICAL_FLOW_USAGE_OUTPUT_BIT_NV, eHint = VK_OPTICAL_FLOW_USAGE_HINT_BIT_NV, eCost = VK_OPTICAL_FLOW_USAGE_COST_BIT_NV, eGlobalFlow = VK_OPTICAL_FLOW_USAGE_GLOBAL_FLOW_BIT_NV }; using OpticalFlowUsageFlagsNV = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR OpticalFlowUsageFlagsNV allFlags = OpticalFlowUsageFlagBitsNV::eUnknown | OpticalFlowUsageFlagBitsNV::eInput | OpticalFlowUsageFlagBitsNV::eOutput | OpticalFlowUsageFlagBitsNV::eHint | OpticalFlowUsageFlagBitsNV::eCost | OpticalFlowUsageFlagBitsNV::eGlobalFlow; }; enum class OpticalFlowGridSizeFlagBitsNV : VkOpticalFlowGridSizeFlagsNV { eUnknown = VK_OPTICAL_FLOW_GRID_SIZE_UNKNOWN_NV, e1X1 = VK_OPTICAL_FLOW_GRID_SIZE_1X1_BIT_NV, e2X2 = VK_OPTICAL_FLOW_GRID_SIZE_2X2_BIT_NV, e4X4 = VK_OPTICAL_FLOW_GRID_SIZE_4X4_BIT_NV, e8X8 = VK_OPTICAL_FLOW_GRID_SIZE_8X8_BIT_NV }; using OpticalFlowGridSizeFlagsNV = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR OpticalFlowGridSizeFlagsNV allFlags = OpticalFlowGridSizeFlagBitsNV::eUnknown | OpticalFlowGridSizeFlagBitsNV::e1X1 | OpticalFlowGridSizeFlagBitsNV::e2X2 | OpticalFlowGridSizeFlagBitsNV::e4X4 | OpticalFlowGridSizeFlagBitsNV::e8X8; }; enum class OpticalFlowPerformanceLevelNV { eUnknown = VK_OPTICAL_FLOW_PERFORMANCE_LEVEL_UNKNOWN_NV, eSlow = VK_OPTICAL_FLOW_PERFORMANCE_LEVEL_SLOW_NV, eMedium = VK_OPTICAL_FLOW_PERFORMANCE_LEVEL_MEDIUM_NV, eFast = VK_OPTICAL_FLOW_PERFORMANCE_LEVEL_FAST_NV }; enum class OpticalFlowSessionBindingPointNV { eUnknown = VK_OPTICAL_FLOW_SESSION_BINDING_POINT_UNKNOWN_NV, eInput = VK_OPTICAL_FLOW_SESSION_BINDING_POINT_INPUT_NV, eReference = VK_OPTICAL_FLOW_SESSION_BINDING_POINT_REFERENCE_NV, eHint = VK_OPTICAL_FLOW_SESSION_BINDING_POINT_HINT_NV, eFlowVector = VK_OPTICAL_FLOW_SESSION_BINDING_POINT_FLOW_VECTOR_NV, eBackwardFlowVector = VK_OPTICAL_FLOW_SESSION_BINDING_POINT_BACKWARD_FLOW_VECTOR_NV, eCost = VK_OPTICAL_FLOW_SESSION_BINDING_POINT_COST_NV, eBackwardCost = VK_OPTICAL_FLOW_SESSION_BINDING_POINT_BACKWARD_COST_NV, eGlobalFlow = VK_OPTICAL_FLOW_SESSION_BINDING_POINT_GLOBAL_FLOW_NV }; enum class OpticalFlowSessionCreateFlagBitsNV : VkOpticalFlowSessionCreateFlagsNV { eEnableHint = VK_OPTICAL_FLOW_SESSION_CREATE_ENABLE_HINT_BIT_NV, eEnableCost = VK_OPTICAL_FLOW_SESSION_CREATE_ENABLE_COST_BIT_NV, eEnableGlobalFlow = VK_OPTICAL_FLOW_SESSION_CREATE_ENABLE_GLOBAL_FLOW_BIT_NV, eAllowRegions = VK_OPTICAL_FLOW_SESSION_CREATE_ALLOW_REGIONS_BIT_NV, eBothDirections = VK_OPTICAL_FLOW_SESSION_CREATE_BOTH_DIRECTIONS_BIT_NV }; using OpticalFlowSessionCreateFlagsNV = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR OpticalFlowSessionCreateFlagsNV allFlags = OpticalFlowSessionCreateFlagBitsNV::eEnableHint | OpticalFlowSessionCreateFlagBitsNV::eEnableCost | OpticalFlowSessionCreateFlagBitsNV::eEnableGlobalFlow | OpticalFlowSessionCreateFlagBitsNV::eAllowRegions | OpticalFlowSessionCreateFlagBitsNV::eBothDirections; }; enum class OpticalFlowExecuteFlagBitsNV : VkOpticalFlowExecuteFlagsNV { eDisableTemporalHints = VK_OPTICAL_FLOW_EXECUTE_DISABLE_TEMPORAL_HINTS_BIT_NV }; using OpticalFlowExecuteFlagsNV = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR OpticalFlowExecuteFlagsNV allFlags = OpticalFlowExecuteFlagBitsNV::eDisableTemporalHints; }; //=== VK_AMD_anti_lag === enum class AntiLagModeAMD { eDriverControl = VK_ANTI_LAG_MODE_DRIVER_CONTROL_AMD, eOn = VK_ANTI_LAG_MODE_ON_AMD, eOff = VK_ANTI_LAG_MODE_OFF_AMD }; enum class AntiLagStageAMD { eInput = VK_ANTI_LAG_STAGE_INPUT_AMD, ePresent = VK_ANTI_LAG_STAGE_PRESENT_AMD }; //=== VK_EXT_shader_object === enum class ShaderCreateFlagBitsEXT : VkShaderCreateFlagsEXT { eLinkStage = VK_SHADER_CREATE_LINK_STAGE_BIT_EXT, eAllowVaryingSubgroupSize = VK_SHADER_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT_EXT, eRequireFullSubgroups = VK_SHADER_CREATE_REQUIRE_FULL_SUBGROUPS_BIT_EXT, eNoTaskShader = VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT, eDispatchBase = VK_SHADER_CREATE_DISPATCH_BASE_BIT_EXT, eFragmentShadingRateAttachment = VK_SHADER_CREATE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_EXT, eFragmentDensityMapAttachment = VK_SHADER_CREATE_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT, eIndirectBindable = VK_SHADER_CREATE_INDIRECT_BINDABLE_BIT_EXT }; using ShaderCreateFlagsEXT = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR ShaderCreateFlagsEXT allFlags = ShaderCreateFlagBitsEXT::eLinkStage | ShaderCreateFlagBitsEXT::eAllowVaryingSubgroupSize | ShaderCreateFlagBitsEXT::eRequireFullSubgroups | ShaderCreateFlagBitsEXT::eNoTaskShader | ShaderCreateFlagBitsEXT::eDispatchBase | ShaderCreateFlagBitsEXT::eFragmentShadingRateAttachment | ShaderCreateFlagBitsEXT::eFragmentDensityMapAttachment | ShaderCreateFlagBitsEXT::eIndirectBindable; }; enum class ShaderCodeTypeEXT { eBinary = VK_SHADER_CODE_TYPE_BINARY_EXT, eSpirv = VK_SHADER_CODE_TYPE_SPIRV_EXT }; //=== VK_NV_ray_tracing_invocation_reorder === enum class RayTracingInvocationReorderModeNV { eNone = VK_RAY_TRACING_INVOCATION_REORDER_MODE_NONE_NV, eReorder = VK_RAY_TRACING_INVOCATION_REORDER_MODE_REORDER_NV }; //=== VK_NV_cooperative_vector === enum class CooperativeVectorMatrixLayoutNV { eRowMajor = VK_COOPERATIVE_VECTOR_MATRIX_LAYOUT_ROW_MAJOR_NV, eColumnMajor = VK_COOPERATIVE_VECTOR_MATRIX_LAYOUT_COLUMN_MAJOR_NV, eInferencingOptimal = VK_COOPERATIVE_VECTOR_MATRIX_LAYOUT_INFERENCING_OPTIMAL_NV, eTrainingOptimal = VK_COOPERATIVE_VECTOR_MATRIX_LAYOUT_TRAINING_OPTIMAL_NV }; enum class ComponentTypeKHR { eFloat16 = VK_COMPONENT_TYPE_FLOAT16_KHR, eFloat32 = VK_COMPONENT_TYPE_FLOAT32_KHR, eFloat64 = VK_COMPONENT_TYPE_FLOAT64_KHR, eSint8 = VK_COMPONENT_TYPE_SINT8_KHR, eSint16 = VK_COMPONENT_TYPE_SINT16_KHR, eSint32 = VK_COMPONENT_TYPE_SINT32_KHR, eSint64 = VK_COMPONENT_TYPE_SINT64_KHR, eUint8 = VK_COMPONENT_TYPE_UINT8_KHR, eUint16 = VK_COMPONENT_TYPE_UINT16_KHR, eUint32 = VK_COMPONENT_TYPE_UINT32_KHR, eUint64 = VK_COMPONENT_TYPE_UINT64_KHR, eSint8PackedNV = VK_COMPONENT_TYPE_SINT8_PACKED_NV, eUint8PackedNV = VK_COMPONENT_TYPE_UINT8_PACKED_NV, eFloatE4M3NV = VK_COMPONENT_TYPE_FLOAT_E4M3_NV, eFloatE5M2NV = VK_COMPONENT_TYPE_FLOAT_E5M2_NV }; using ComponentTypeNV = ComponentTypeKHR; //=== VK_EXT_layer_settings === enum class LayerSettingTypeEXT { eBool32 = VK_LAYER_SETTING_TYPE_BOOL32_EXT, eInt32 = VK_LAYER_SETTING_TYPE_INT32_EXT, eInt64 = VK_LAYER_SETTING_TYPE_INT64_EXT, eUint32 = VK_LAYER_SETTING_TYPE_UINT32_EXT, eUint64 = VK_LAYER_SETTING_TYPE_UINT64_EXT, eFloat32 = VK_LAYER_SETTING_TYPE_FLOAT32_EXT, eFloat64 = VK_LAYER_SETTING_TYPE_FLOAT64_EXT, eString = VK_LAYER_SETTING_TYPE_STRING_EXT }; //================================= //=== Layer Setting Type Traits === //================================= template <> struct CppType { using Type = vk::Bool32; }; template <> struct CppType { using Type = int32_t; }; template <> struct CppType { using Type = int64_t; }; template <> struct CppType { using Type = uint32_t; }; template <> struct CppType { using Type = uint64_t; }; template <> struct CppType { using Type = float; }; template <> struct CppType { using Type = double; }; template <> struct CppType { using Type = char *; }; template bool isSameType( LayerSettingTypeEXT layerSettingType ) { switch ( layerSettingType ) { case LayerSettingTypeEXT::eBool32: return std::is_same::value; case LayerSettingTypeEXT::eInt32: return std::is_same::value; case LayerSettingTypeEXT::eInt64: return std::is_same::value; case LayerSettingTypeEXT::eUint32: return std::is_same::value; case LayerSettingTypeEXT::eUint64: return std::is_same::value; case LayerSettingTypeEXT::eFloat32: return std::is_same::value; case LayerSettingTypeEXT::eFloat64: return std::is_same::value; case LayerSettingTypeEXT::eString: return std::is_same::value; default: return false; } } //=== VK_NV_low_latency2 === enum class LatencyMarkerNV { eSimulationStart = VK_LATENCY_MARKER_SIMULATION_START_NV, eSimulationEnd = VK_LATENCY_MARKER_SIMULATION_END_NV, eRendersubmitStart = VK_LATENCY_MARKER_RENDERSUBMIT_START_NV, eRendersubmitEnd = VK_LATENCY_MARKER_RENDERSUBMIT_END_NV, ePresentStart = VK_LATENCY_MARKER_PRESENT_START_NV, ePresentEnd = VK_LATENCY_MARKER_PRESENT_END_NV, eInputSample = VK_LATENCY_MARKER_INPUT_SAMPLE_NV, eTriggerFlash = VK_LATENCY_MARKER_TRIGGER_FLASH_NV, eOutOfBandRendersubmitStart = VK_LATENCY_MARKER_OUT_OF_BAND_RENDERSUBMIT_START_NV, eOutOfBandRendersubmitEnd = VK_LATENCY_MARKER_OUT_OF_BAND_RENDERSUBMIT_END_NV, eOutOfBandPresentStart = VK_LATENCY_MARKER_OUT_OF_BAND_PRESENT_START_NV, eOutOfBandPresentEnd = VK_LATENCY_MARKER_OUT_OF_BAND_PRESENT_END_NV }; enum class OutOfBandQueueTypeNV { eRender = VK_OUT_OF_BAND_QUEUE_TYPE_RENDER_NV, ePresent = VK_OUT_OF_BAND_QUEUE_TYPE_PRESENT_NV }; //=== VK_KHR_cooperative_matrix === enum class ScopeKHR { eDevice = VK_SCOPE_DEVICE_KHR, eWorkgroup = VK_SCOPE_WORKGROUP_KHR, eSubgroup = VK_SCOPE_SUBGROUP_KHR, eQueueFamily = VK_SCOPE_QUEUE_FAMILY_KHR }; using ScopeNV = ScopeKHR; //=== VK_KHR_video_encode_av1 === enum class VideoEncodeAV1PredictionModeKHR { eIntraOnly = VK_VIDEO_ENCODE_AV1_PREDICTION_MODE_INTRA_ONLY_KHR, eSingleReference = VK_VIDEO_ENCODE_AV1_PREDICTION_MODE_SINGLE_REFERENCE_KHR, eUnidirectionalCompound = VK_VIDEO_ENCODE_AV1_PREDICTION_MODE_UNIDIRECTIONAL_COMPOUND_KHR, eBidirectionalCompound = VK_VIDEO_ENCODE_AV1_PREDICTION_MODE_BIDIRECTIONAL_COMPOUND_KHR }; enum class VideoEncodeAV1RateControlGroupKHR { eIntra = VK_VIDEO_ENCODE_AV1_RATE_CONTROL_GROUP_INTRA_KHR, ePredictive = VK_VIDEO_ENCODE_AV1_RATE_CONTROL_GROUP_PREDICTIVE_KHR, eBipredictive = VK_VIDEO_ENCODE_AV1_RATE_CONTROL_GROUP_BIPREDICTIVE_KHR }; enum class VideoEncodeAV1CapabilityFlagBitsKHR : VkVideoEncodeAV1CapabilityFlagsKHR { ePerRateControlGroupMinMaxQIndex = VK_VIDEO_ENCODE_AV1_CAPABILITY_PER_RATE_CONTROL_GROUP_MIN_MAX_Q_INDEX_BIT_KHR, eGenerateObuExtensionHeader = VK_VIDEO_ENCODE_AV1_CAPABILITY_GENERATE_OBU_EXTENSION_HEADER_BIT_KHR, ePrimaryReferenceCdfOnly = VK_VIDEO_ENCODE_AV1_CAPABILITY_PRIMARY_REFERENCE_CDF_ONLY_BIT_KHR, eFrameSizeOverride = VK_VIDEO_ENCODE_AV1_CAPABILITY_FRAME_SIZE_OVERRIDE_BIT_KHR, eMotionVectorScaling = VK_VIDEO_ENCODE_AV1_CAPABILITY_MOTION_VECTOR_SCALING_BIT_KHR }; using VideoEncodeAV1CapabilityFlagsKHR = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR VideoEncodeAV1CapabilityFlagsKHR allFlags = VideoEncodeAV1CapabilityFlagBitsKHR::ePerRateControlGroupMinMaxQIndex | VideoEncodeAV1CapabilityFlagBitsKHR::eGenerateObuExtensionHeader | VideoEncodeAV1CapabilityFlagBitsKHR::ePrimaryReferenceCdfOnly | VideoEncodeAV1CapabilityFlagBitsKHR::eFrameSizeOverride | VideoEncodeAV1CapabilityFlagBitsKHR::eMotionVectorScaling; }; enum class VideoEncodeAV1StdFlagBitsKHR : VkVideoEncodeAV1StdFlagsKHR { eUniformTileSpacingFlagSet = VK_VIDEO_ENCODE_AV1_STD_UNIFORM_TILE_SPACING_FLAG_SET_BIT_KHR, eSkipModePresentUnset = VK_VIDEO_ENCODE_AV1_STD_SKIP_MODE_PRESENT_UNSET_BIT_KHR, ePrimaryRefFrame = VK_VIDEO_ENCODE_AV1_STD_PRIMARY_REF_FRAME_BIT_KHR, eDeltaQ = VK_VIDEO_ENCODE_AV1_STD_DELTA_Q_BIT_KHR }; using VideoEncodeAV1StdFlagsKHR = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR VideoEncodeAV1StdFlagsKHR allFlags = VideoEncodeAV1StdFlagBitsKHR::eUniformTileSpacingFlagSet | VideoEncodeAV1StdFlagBitsKHR::eSkipModePresentUnset | VideoEncodeAV1StdFlagBitsKHR::ePrimaryRefFrame | VideoEncodeAV1StdFlagBitsKHR::eDeltaQ; }; enum class VideoEncodeAV1SuperblockSizeFlagBitsKHR : VkVideoEncodeAV1SuperblockSizeFlagsKHR { e64 = VK_VIDEO_ENCODE_AV1_SUPERBLOCK_SIZE_64_BIT_KHR, e128 = VK_VIDEO_ENCODE_AV1_SUPERBLOCK_SIZE_128_BIT_KHR }; using VideoEncodeAV1SuperblockSizeFlagsKHR = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR VideoEncodeAV1SuperblockSizeFlagsKHR allFlags = VideoEncodeAV1SuperblockSizeFlagBitsKHR::e64 | VideoEncodeAV1SuperblockSizeFlagBitsKHR::e128; }; enum class VideoEncodeAV1RateControlFlagBitsKHR : VkVideoEncodeAV1RateControlFlagsKHR { eRegularGop = VK_VIDEO_ENCODE_AV1_RATE_CONTROL_REGULAR_GOP_BIT_KHR, eTemporalLayerPatternDyadic = VK_VIDEO_ENCODE_AV1_RATE_CONTROL_TEMPORAL_LAYER_PATTERN_DYADIC_BIT_KHR, eReferencePatternFlat = VK_VIDEO_ENCODE_AV1_RATE_CONTROL_REFERENCE_PATTERN_FLAT_BIT_KHR, eReferencePatternDyadic = VK_VIDEO_ENCODE_AV1_RATE_CONTROL_REFERENCE_PATTERN_DYADIC_BIT_KHR }; using VideoEncodeAV1RateControlFlagsKHR = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR VideoEncodeAV1RateControlFlagsKHR allFlags = VideoEncodeAV1RateControlFlagBitsKHR::eRegularGop | VideoEncodeAV1RateControlFlagBitsKHR::eTemporalLayerPatternDyadic | VideoEncodeAV1RateControlFlagBitsKHR::eReferencePatternFlat | VideoEncodeAV1RateControlFlagBitsKHR::eReferencePatternDyadic; }; //=== VK_QCOM_image_processing2 === enum class BlockMatchWindowCompareModeQCOM { eMin = VK_BLOCK_MATCH_WINDOW_COMPARE_MODE_MIN_QCOM, eMax = VK_BLOCK_MATCH_WINDOW_COMPARE_MODE_MAX_QCOM }; //=== VK_QCOM_filter_cubic_weights === enum class CubicFilterWeightsQCOM { eCatmullRom = VK_CUBIC_FILTER_WEIGHTS_CATMULL_ROM_QCOM, eZeroTangentCardinal = VK_CUBIC_FILTER_WEIGHTS_ZERO_TANGENT_CARDINAL_QCOM, eBSpline = VK_CUBIC_FILTER_WEIGHTS_B_SPLINE_QCOM, eMitchellNetravali = VK_CUBIC_FILTER_WEIGHTS_MITCHELL_NETRAVALI_QCOM }; //=== VK_MSFT_layered_driver === enum class LayeredDriverUnderlyingApiMSFT { eNone = VK_LAYERED_DRIVER_UNDERLYING_API_NONE_MSFT, eD3D12 = VK_LAYERED_DRIVER_UNDERLYING_API_D3D12_MSFT }; //=== VK_KHR_calibrated_timestamps === enum class TimeDomainKHR { eDevice = VK_TIME_DOMAIN_DEVICE_KHR, eClockMonotonic = VK_TIME_DOMAIN_CLOCK_MONOTONIC_KHR, eClockMonotonicRaw = VK_TIME_DOMAIN_CLOCK_MONOTONIC_RAW_KHR, eQueryPerformanceCounter = VK_TIME_DOMAIN_QUERY_PERFORMANCE_COUNTER_KHR }; using TimeDomainEXT = TimeDomainKHR; //=== VK_NV_display_stereo === enum class DisplaySurfaceStereoTypeNV { eNone = VK_DISPLAY_SURFACE_STEREO_TYPE_NONE_NV, eOnboardDin = VK_DISPLAY_SURFACE_STEREO_TYPE_ONBOARD_DIN_NV, eHdmi3D = VK_DISPLAY_SURFACE_STEREO_TYPE_HDMI_3D_NV, eInbandDisplayport = VK_DISPLAY_SURFACE_STEREO_TYPE_INBAND_DISPLAYPORT_NV }; //=== VK_KHR_maintenance7 === enum class PhysicalDeviceLayeredApiKHR { eVulkan = VK_PHYSICAL_DEVICE_LAYERED_API_VULKAN_KHR, eD3D12 = VK_PHYSICAL_DEVICE_LAYERED_API_D3D12_KHR, eMetal = VK_PHYSICAL_DEVICE_LAYERED_API_METAL_KHR, eOpengl = VK_PHYSICAL_DEVICE_LAYERED_API_OPENGL_KHR, eOpengles = VK_PHYSICAL_DEVICE_LAYERED_API_OPENGLES_KHR }; //=== VK_NV_cluster_acceleration_structure === enum class ClusterAccelerationStructureClusterFlagBitsNV : VkClusterAccelerationStructureClusterFlagsNV { eAllowDisableOpacityMicromaps = VK_CLUSTER_ACCELERATION_STRUCTURE_CLUSTER_ALLOW_DISABLE_OPACITY_MICROMAPS_NV }; using ClusterAccelerationStructureClusterFlagsNV = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR ClusterAccelerationStructureClusterFlagsNV allFlags = ClusterAccelerationStructureClusterFlagBitsNV::eAllowDisableOpacityMicromaps; }; enum class ClusterAccelerationStructureGeometryFlagBitsNV : VkClusterAccelerationStructureGeometryFlagsNV { eCullDisable = VK_CLUSTER_ACCELERATION_STRUCTURE_GEOMETRY_CULL_DISABLE_BIT_NV, eNoDuplicateAnyhitInvocation = VK_CLUSTER_ACCELERATION_STRUCTURE_GEOMETRY_NO_DUPLICATE_ANYHIT_INVOCATION_BIT_NV, eOpaque = VK_CLUSTER_ACCELERATION_STRUCTURE_GEOMETRY_OPAQUE_BIT_NV }; using ClusterAccelerationStructureGeometryFlagsNV = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR ClusterAccelerationStructureGeometryFlagsNV allFlags = ClusterAccelerationStructureGeometryFlagBitsNV::eCullDisable | ClusterAccelerationStructureGeometryFlagBitsNV::eNoDuplicateAnyhitInvocation | ClusterAccelerationStructureGeometryFlagBitsNV::eOpaque; }; enum class ClusterAccelerationStructureAddressResolutionFlagBitsNV : VkClusterAccelerationStructureAddressResolutionFlagsNV { eIndirectedDstImplicitData = VK_CLUSTER_ACCELERATION_STRUCTURE_ADDRESS_RESOLUTION_INDIRECTED_DST_IMPLICIT_DATA_BIT_NV, eIndirectedScratchData = VK_CLUSTER_ACCELERATION_STRUCTURE_ADDRESS_RESOLUTION_INDIRECTED_SCRATCH_DATA_BIT_NV, eIndirectedDstAddressArray = VK_CLUSTER_ACCELERATION_STRUCTURE_ADDRESS_RESOLUTION_INDIRECTED_DST_ADDRESS_ARRAY_BIT_NV, eIndirectedDstSizesArray = VK_CLUSTER_ACCELERATION_STRUCTURE_ADDRESS_RESOLUTION_INDIRECTED_DST_SIZES_ARRAY_BIT_NV, eIndirectedSrcInfosArray = VK_CLUSTER_ACCELERATION_STRUCTURE_ADDRESS_RESOLUTION_INDIRECTED_SRC_INFOS_ARRAY_BIT_NV, eIndirectedSrcInfosCount = VK_CLUSTER_ACCELERATION_STRUCTURE_ADDRESS_RESOLUTION_INDIRECTED_SRC_INFOS_COUNT_BIT_NV }; using ClusterAccelerationStructureAddressResolutionFlagsNV = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR ClusterAccelerationStructureAddressResolutionFlagsNV allFlags = ClusterAccelerationStructureAddressResolutionFlagBitsNV::eIndirectedDstImplicitData | ClusterAccelerationStructureAddressResolutionFlagBitsNV::eIndirectedScratchData | ClusterAccelerationStructureAddressResolutionFlagBitsNV::eIndirectedDstAddressArray | ClusterAccelerationStructureAddressResolutionFlagBitsNV::eIndirectedDstSizesArray | ClusterAccelerationStructureAddressResolutionFlagBitsNV::eIndirectedSrcInfosArray | ClusterAccelerationStructureAddressResolutionFlagBitsNV::eIndirectedSrcInfosCount; }; enum class ClusterAccelerationStructureIndexFormatFlagBitsNV : VkClusterAccelerationStructureIndexFormatFlagsNV { e8 = VK_CLUSTER_ACCELERATION_STRUCTURE_INDEX_FORMAT_8BIT_NV, e16 = VK_CLUSTER_ACCELERATION_STRUCTURE_INDEX_FORMAT_16BIT_NV, e32 = VK_CLUSTER_ACCELERATION_STRUCTURE_INDEX_FORMAT_32BIT_NV }; using ClusterAccelerationStructureIndexFormatFlagsNV = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR ClusterAccelerationStructureIndexFormatFlagsNV allFlags = ClusterAccelerationStructureIndexFormatFlagBitsNV::e8 | ClusterAccelerationStructureIndexFormatFlagBitsNV::e16 | ClusterAccelerationStructureIndexFormatFlagBitsNV::e32; }; enum class ClusterAccelerationStructureTypeNV { eClustersBottomLevel = VK_CLUSTER_ACCELERATION_STRUCTURE_TYPE_CLUSTERS_BOTTOM_LEVEL_NV, eTriangleCluster = VK_CLUSTER_ACCELERATION_STRUCTURE_TYPE_TRIANGLE_CLUSTER_NV, eTriangleClusterTemplate = VK_CLUSTER_ACCELERATION_STRUCTURE_TYPE_TRIANGLE_CLUSTER_TEMPLATE_NV }; enum class ClusterAccelerationStructureOpTypeNV { eMoveObjects = VK_CLUSTER_ACCELERATION_STRUCTURE_OP_TYPE_MOVE_OBJECTS_NV, eBuildClustersBottomLevel = VK_CLUSTER_ACCELERATION_STRUCTURE_OP_TYPE_BUILD_CLUSTERS_BOTTOM_LEVEL_NV, eBuildTriangleCluster = VK_CLUSTER_ACCELERATION_STRUCTURE_OP_TYPE_BUILD_TRIANGLE_CLUSTER_NV, eBuildTriangleClusterTemplate = VK_CLUSTER_ACCELERATION_STRUCTURE_OP_TYPE_BUILD_TRIANGLE_CLUSTER_TEMPLATE_NV, eInstantiateTriangleCluster = VK_CLUSTER_ACCELERATION_STRUCTURE_OP_TYPE_INSTANTIATE_TRIANGLE_CLUSTER_NV }; enum class ClusterAccelerationStructureOpModeNV { eImplicitDestinations = VK_CLUSTER_ACCELERATION_STRUCTURE_OP_MODE_IMPLICIT_DESTINATIONS_NV, eExplicitDestinations = VK_CLUSTER_ACCELERATION_STRUCTURE_OP_MODE_EXPLICIT_DESTINATIONS_NV, eComputeSizes = VK_CLUSTER_ACCELERATION_STRUCTURE_OP_MODE_COMPUTE_SIZES_NV }; //=== VK_NV_partitioned_acceleration_structure === enum class PartitionedAccelerationStructureOpTypeNV { eWriteInstance = VK_PARTITIONED_ACCELERATION_STRUCTURE_OP_TYPE_WRITE_INSTANCE_NV, eUpdateInstance = VK_PARTITIONED_ACCELERATION_STRUCTURE_OP_TYPE_UPDATE_INSTANCE_NV, eWritePartitionTranslation = VK_PARTITIONED_ACCELERATION_STRUCTURE_OP_TYPE_WRITE_PARTITION_TRANSLATION_NV }; enum class PartitionedAccelerationStructureInstanceFlagBitsNV : VkPartitionedAccelerationStructureInstanceFlagsNV { eFlagTriangleFacingCullDisable = VK_PARTITIONED_ACCELERATION_STRUCTURE_INSTANCE_FLAG_TRIANGLE_FACING_CULL_DISABLE_BIT_NV, eFlagTriangleFlipFacing = VK_PARTITIONED_ACCELERATION_STRUCTURE_INSTANCE_FLAG_TRIANGLE_FLIP_FACING_BIT_NV, eFlagForceOpaque = VK_PARTITIONED_ACCELERATION_STRUCTURE_INSTANCE_FLAG_FORCE_OPAQUE_BIT_NV, eFlagForceNoOpaque = VK_PARTITIONED_ACCELERATION_STRUCTURE_INSTANCE_FLAG_FORCE_NO_OPAQUE_BIT_NV, eFlagEnableExplicitBoundingBox = VK_PARTITIONED_ACCELERATION_STRUCTURE_INSTANCE_FLAG_ENABLE_EXPLICIT_BOUNDING_BOX_NV }; using PartitionedAccelerationStructureInstanceFlagsNV = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR PartitionedAccelerationStructureInstanceFlagsNV allFlags = PartitionedAccelerationStructureInstanceFlagBitsNV::eFlagTriangleFacingCullDisable | PartitionedAccelerationStructureInstanceFlagBitsNV::eFlagTriangleFlipFacing | PartitionedAccelerationStructureInstanceFlagBitsNV::eFlagForceOpaque | PartitionedAccelerationStructureInstanceFlagBitsNV::eFlagForceNoOpaque | PartitionedAccelerationStructureInstanceFlagBitsNV::eFlagEnableExplicitBoundingBox; }; //=== VK_EXT_device_generated_commands === enum class IndirectCommandsTokenTypeEXT { eExecutionSet = VK_INDIRECT_COMMANDS_TOKEN_TYPE_EXECUTION_SET_EXT, ePushConstant = VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_EXT, eSequenceIndex = VK_INDIRECT_COMMANDS_TOKEN_TYPE_SEQUENCE_INDEX_EXT, eIndexBuffer = VK_INDIRECT_COMMANDS_TOKEN_TYPE_INDEX_BUFFER_EXT, eVertexBuffer = VK_INDIRECT_COMMANDS_TOKEN_TYPE_VERTEX_BUFFER_EXT, eDrawIndexed = VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_INDEXED_EXT, eDraw = VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_EXT, eDrawIndexedCount = VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_INDEXED_COUNT_EXT, eDrawCount = VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_COUNT_EXT, eDispatch = VK_INDIRECT_COMMANDS_TOKEN_TYPE_DISPATCH_EXT, eDrawMeshTasksNV = VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_MESH_TASKS_NV_EXT, eDrawMeshTasksCountNV = VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_MESH_TASKS_COUNT_NV_EXT, eDrawMeshTasks = VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_MESH_TASKS_EXT, eDrawMeshTasksCount = VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_MESH_TASKS_COUNT_EXT, eTraceRays2 = VK_INDIRECT_COMMANDS_TOKEN_TYPE_TRACE_RAYS2_EXT }; enum class IndirectExecutionSetInfoTypeEXT { ePipelines = VK_INDIRECT_EXECUTION_SET_INFO_TYPE_PIPELINES_EXT, eShaderObjects = VK_INDIRECT_EXECUTION_SET_INFO_TYPE_SHADER_OBJECTS_EXT }; enum class IndirectCommandsLayoutUsageFlagBitsEXT : VkIndirectCommandsLayoutUsageFlagsEXT { eExplicitPreprocess = VK_INDIRECT_COMMANDS_LAYOUT_USAGE_EXPLICIT_PREPROCESS_BIT_EXT, eUnorderedSequences = VK_INDIRECT_COMMANDS_LAYOUT_USAGE_UNORDERED_SEQUENCES_BIT_EXT }; using IndirectCommandsLayoutUsageFlagsEXT = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR IndirectCommandsLayoutUsageFlagsEXT allFlags = IndirectCommandsLayoutUsageFlagBitsEXT::eExplicitPreprocess | IndirectCommandsLayoutUsageFlagBitsEXT::eUnorderedSequences; }; enum class IndirectCommandsInputModeFlagBitsEXT : VkIndirectCommandsInputModeFlagsEXT { eVulkanIndexBuffer = VK_INDIRECT_COMMANDS_INPUT_MODE_VULKAN_INDEX_BUFFER_EXT, eDxgiIndexBuffer = VK_INDIRECT_COMMANDS_INPUT_MODE_DXGI_INDEX_BUFFER_EXT }; using IndirectCommandsInputModeFlagsEXT = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR IndirectCommandsInputModeFlagsEXT allFlags = IndirectCommandsInputModeFlagBitsEXT::eVulkanIndexBuffer | IndirectCommandsInputModeFlagBitsEXT::eDxgiIndexBuffer; }; //=== VK_KHR_maintenance8 === enum class AccessFlagBits3KHR : VkAccessFlags3KHR { eNone = VK_ACCESS_3_NONE_KHR }; using AccessFlags3KHR = Flags; template <> struct FlagTraits { static VULKAN_HPP_CONST_OR_CONSTEXPR bool isBitmask = true; static VULKAN_HPP_CONST_OR_CONSTEXPR AccessFlags3KHR allFlags = AccessFlagBits3KHR::eNone; }; //=== VK_EXT_depth_clamp_control === enum class DepthClampModeEXT { eViewportRange = VK_DEPTH_CLAMP_MODE_VIEWPORT_RANGE_EXT, eUserDefinedRange = VK_DEPTH_CLAMP_MODE_USER_DEFINED_RANGE_EXT }; //=========================================================== //=== Mapping from ObjectType to DebugReportObjectTypeEXT === //=========================================================== VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType( VULKAN_HPP_NAMESPACE::ObjectType objectType ) { switch ( objectType ) { //=== VK_VERSION_1_0 === case VULKAN_HPP_NAMESPACE::ObjectType::eInstance: return VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eInstance; case VULKAN_HPP_NAMESPACE::ObjectType::ePhysicalDevice: return VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::ePhysicalDevice; case VULKAN_HPP_NAMESPACE::ObjectType::eDevice: return VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eDevice; case VULKAN_HPP_NAMESPACE::ObjectType::eQueue: return VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eQueue; case VULKAN_HPP_NAMESPACE::ObjectType::eDeviceMemory: return VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eDeviceMemory; case VULKAN_HPP_NAMESPACE::ObjectType::eFence: return VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eFence; case VULKAN_HPP_NAMESPACE::ObjectType::eSemaphore: return VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eSemaphore; case VULKAN_HPP_NAMESPACE::ObjectType::eEvent: return VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eEvent; case VULKAN_HPP_NAMESPACE::ObjectType::eQueryPool: return VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eQueryPool; case VULKAN_HPP_NAMESPACE::ObjectType::eBuffer: return VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eBuffer; case VULKAN_HPP_NAMESPACE::ObjectType::eBufferView: return VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eBufferView; case VULKAN_HPP_NAMESPACE::ObjectType::eImage: return VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eImage; case VULKAN_HPP_NAMESPACE::ObjectType::eImageView: return VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eImageView; case VULKAN_HPP_NAMESPACE::ObjectType::eShaderModule: return VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eShaderModule; case VULKAN_HPP_NAMESPACE::ObjectType::ePipelineCache: return VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::ePipelineCache; case VULKAN_HPP_NAMESPACE::ObjectType::ePipeline: return VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::ePipeline; case VULKAN_HPP_NAMESPACE::ObjectType::ePipelineLayout: return VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::ePipelineLayout; case VULKAN_HPP_NAMESPACE::ObjectType::eSampler: return VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eSampler; case VULKAN_HPP_NAMESPACE::ObjectType::eDescriptorPool: return VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eDescriptorPool; case VULKAN_HPP_NAMESPACE::ObjectType::eDescriptorSet: return VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eDescriptorSet; case VULKAN_HPP_NAMESPACE::ObjectType::eDescriptorSetLayout: return VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eDescriptorSetLayout; case VULKAN_HPP_NAMESPACE::ObjectType::eFramebuffer: return VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eFramebuffer; case VULKAN_HPP_NAMESPACE::ObjectType::eRenderPass: return VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eRenderPass; case VULKAN_HPP_NAMESPACE::ObjectType::eCommandPool: return VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eCommandPool; case VULKAN_HPP_NAMESPACE::ObjectType::eCommandBuffer: return VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eCommandBuffer; //=== VK_VERSION_1_1 === case VULKAN_HPP_NAMESPACE::ObjectType::eSamplerYcbcrConversion: return VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eSamplerYcbcrConversion; case VULKAN_HPP_NAMESPACE::ObjectType::eDescriptorUpdateTemplate: return VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eDescriptorUpdateTemplate; //=== VK_VERSION_1_3 === case VULKAN_HPP_NAMESPACE::ObjectType::ePrivateDataSlot: return VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eUnknown; //=== VK_KHR_surface === case VULKAN_HPP_NAMESPACE::ObjectType::eSurfaceKHR: return VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eSurfaceKHR; //=== VK_KHR_swapchain === case VULKAN_HPP_NAMESPACE::ObjectType::eSwapchainKHR: return VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eSwapchainKHR; //=== VK_KHR_display === case VULKAN_HPP_NAMESPACE::ObjectType::eDisplayKHR: return VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eDisplayKHR; case VULKAN_HPP_NAMESPACE::ObjectType::eDisplayModeKHR: return VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eDisplayModeKHR; //=== VK_EXT_debug_report === case VULKAN_HPP_NAMESPACE::ObjectType::eDebugReportCallbackEXT: return VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eDebugReportCallbackEXT; //=== VK_KHR_video_queue === case VULKAN_HPP_NAMESPACE::ObjectType::eVideoSessionKHR: return VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eUnknown; case VULKAN_HPP_NAMESPACE::ObjectType::eVideoSessionParametersKHR: return VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eUnknown; //=== VK_NVX_binary_import === case VULKAN_HPP_NAMESPACE::ObjectType::eCuModuleNVX: return VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eCuModuleNVX; case VULKAN_HPP_NAMESPACE::ObjectType::eCuFunctionNVX: return VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eCuFunctionNVX; //=== VK_EXT_debug_utils === case VULKAN_HPP_NAMESPACE::ObjectType::eDebugUtilsMessengerEXT: return VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eUnknown; //=== VK_KHR_acceleration_structure === case VULKAN_HPP_NAMESPACE::ObjectType::eAccelerationStructureKHR: return VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eAccelerationStructureKHR; //=== VK_EXT_validation_cache === case VULKAN_HPP_NAMESPACE::ObjectType::eValidationCacheEXT: return VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eValidationCacheEXT; //=== VK_NV_ray_tracing === case VULKAN_HPP_NAMESPACE::ObjectType::eAccelerationStructureNV: return VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eAccelerationStructureNV; //=== VK_INTEL_performance_query === case VULKAN_HPP_NAMESPACE::ObjectType::ePerformanceConfigurationINTEL: return VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eUnknown; //=== VK_KHR_deferred_host_operations === case VULKAN_HPP_NAMESPACE::ObjectType::eDeferredOperationKHR: return VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eUnknown; //=== VK_NV_device_generated_commands === case VULKAN_HPP_NAMESPACE::ObjectType::eIndirectCommandsLayoutNV: return VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eUnknown; #if defined( VK_ENABLE_BETA_EXTENSIONS ) //=== VK_NV_cuda_kernel_launch === case VULKAN_HPP_NAMESPACE::ObjectType::eCudaModuleNV: return VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eCudaModuleNV; case VULKAN_HPP_NAMESPACE::ObjectType::eCudaFunctionNV: return VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eCudaFunctionNV; #endif /*VK_ENABLE_BETA_EXTENSIONS*/ #if defined( VK_USE_PLATFORM_FUCHSIA ) //=== VK_FUCHSIA_buffer_collection === case VULKAN_HPP_NAMESPACE::ObjectType::eBufferCollectionFUCHSIA: return VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eBufferCollectionFUCHSIA; #endif /*VK_USE_PLATFORM_FUCHSIA*/ //=== VK_EXT_opacity_micromap === case VULKAN_HPP_NAMESPACE::ObjectType::eMicromapEXT: return VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eUnknown; //=== VK_NV_optical_flow === case VULKAN_HPP_NAMESPACE::ObjectType::eOpticalFlowSessionNV: return VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eUnknown; //=== VK_EXT_shader_object === case VULKAN_HPP_NAMESPACE::ObjectType::eShaderEXT: return VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eUnknown; //=== VK_KHR_pipeline_binary === case VULKAN_HPP_NAMESPACE::ObjectType::ePipelineBinaryKHR: return VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eUnknown; //=== VK_EXT_device_generated_commands === case VULKAN_HPP_NAMESPACE::ObjectType::eIndirectCommandsLayoutEXT: return VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eUnknown; case VULKAN_HPP_NAMESPACE::ObjectType::eIndirectExecutionSetEXT: return VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eUnknown; default: VULKAN_HPP_ASSERT( false && "unknown ObjectType" ); return VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eUnknown; } } } // namespace VULKAN_HPP_NAMESPACE #endif ================================================ FILE: src/libraries/vulkanheaders/vulkan_extension_inspection.hpp ================================================ // Copyright 2015-2025 The Khronos Group Inc. // // SPDX-License-Identifier: Apache-2.0 OR MIT // // This header is generated from the Khronos Vulkan XML API Registry. #ifndef VULKAN_EXTENSION_INSPECTION_HPP #define VULKAN_EXTENSION_INSPECTION_HPP #if defined( VULKAN_HPP_ENABLE_STD_MODULE ) && defined( VULKAN_HPP_STD_MODULE ) import VULKAN_HPP_STD_MODULE; #else # include # include # include # include # include #endif namespace VULKAN_HPP_NAMESPACE { //====================================== //=== Extension inspection functions === //====================================== std::set const & getDeviceExtensions(); std::set const & getInstanceExtensions(); std::map const & getDeprecatedExtensions(); std::map>> const & getExtensionDepends( std::string const & extension ); std::pair> const &> getExtensionDepends( std::string const & version, std::string const & extension ); std::map const & getObsoletedExtensions(); std::map const & getPromotedExtensions(); VULKAN_HPP_CONSTEXPR_20 std::string getExtensionDeprecatedBy( std::string const & extension ); VULKAN_HPP_CONSTEXPR_20 std::string getExtensionObsoletedBy( std::string const & extension ); VULKAN_HPP_CONSTEXPR_20 std::string getExtensionPromotedTo( std::string const & extension ); VULKAN_HPP_CONSTEXPR_20 bool isDeprecatedExtension( std::string const & extension ); VULKAN_HPP_CONSTEXPR_20 bool isDeviceExtension( std::string const & extension ); VULKAN_HPP_CONSTEXPR_20 bool isInstanceExtension( std::string const & extension ); VULKAN_HPP_CONSTEXPR_20 bool isObsoletedExtension( std::string const & extension ); VULKAN_HPP_CONSTEXPR_20 bool isPromotedExtension( std::string const & extension ); //===================================================== //=== Extension inspection function implementations === //===================================================== VULKAN_HPP_INLINE std::map const & getDeprecatedExtensions() { static const std::map deprecatedExtensions = { { "VK_EXT_debug_report", "VK_EXT_debug_utils" }, { "VK_NV_glsl_shader", "" }, { "VK_NV_dedicated_allocation", "VK_KHR_dedicated_allocation" }, { "VK_AMD_gpu_shader_half_float", "VK_KHR_shader_float16_int8" }, { "VK_IMG_format_pvrtc", "" }, { "VK_NV_external_memory_capabilities", "VK_KHR_external_memory_capabilities" }, { "VK_NV_external_memory", "VK_KHR_external_memory" }, #if defined( VK_USE_PLATFORM_WIN32_KHR ) { "VK_NV_external_memory_win32", "VK_KHR_external_memory_win32" }, #endif /*VK_USE_PLATFORM_WIN32_KHR*/ { "VK_EXT_validation_flags", "VK_EXT_layer_settings" }, { "VK_EXT_shader_subgroup_ballot", "VK_VERSION_1_2" }, { "VK_EXT_shader_subgroup_vote", "VK_VERSION_1_1" }, #if defined( VK_USE_PLATFORM_IOS_MVK ) { "VK_MVK_ios_surface", "VK_EXT_metal_surface" }, #endif /*VK_USE_PLATFORM_IOS_MVK*/ #if defined( VK_USE_PLATFORM_MACOS_MVK ) { "VK_MVK_macos_surface", "VK_EXT_metal_surface" }, #endif /*VK_USE_PLATFORM_MACOS_MVK*/ { "VK_AMD_gpu_shader_int16", "VK_KHR_shader_float16_int8" }, { "VK_NV_ray_tracing", "VK_KHR_ray_tracing_pipeline" }, { "VK_EXT_buffer_device_address", "VK_KHR_buffer_device_address" }, { "VK_EXT_validation_features", "VK_EXT_layer_settings" } }; return deprecatedExtensions; } VULKAN_HPP_INLINE std::set const & getDeviceExtensions() { static const std::set deviceExtensions = { "VK_KHR_swapchain", "VK_KHR_display_swapchain", "VK_NV_glsl_shader", "VK_EXT_depth_range_unrestricted", "VK_KHR_sampler_mirror_clamp_to_edge", "VK_IMG_filter_cubic", "VK_AMD_rasterization_order", "VK_AMD_shader_trinary_minmax", "VK_AMD_shader_explicit_vertex_parameter", "VK_EXT_debug_marker", "VK_KHR_video_queue", "VK_KHR_video_decode_queue", "VK_AMD_gcn_shader", "VK_NV_dedicated_allocation", "VK_EXT_transform_feedback", "VK_NVX_binary_import", "VK_NVX_image_view_handle", "VK_AMD_draw_indirect_count", "VK_AMD_negative_viewport_height", "VK_AMD_gpu_shader_half_float", "VK_AMD_shader_ballot", "VK_KHR_video_encode_h264", "VK_KHR_video_encode_h265", "VK_KHR_video_decode_h264", "VK_AMD_texture_gather_bias_lod", "VK_AMD_shader_info", "VK_KHR_dynamic_rendering", "VK_AMD_shader_image_load_store_lod", "VK_NV_corner_sampled_image", "VK_KHR_multiview", "VK_IMG_format_pvrtc", "VK_NV_external_memory", #if defined( VK_USE_PLATFORM_WIN32_KHR ) "VK_NV_external_memory_win32", "VK_NV_win32_keyed_mutex", #endif /*VK_USE_PLATFORM_WIN32_KHR*/ "VK_KHR_device_group", "VK_KHR_shader_draw_parameters", "VK_EXT_shader_subgroup_ballot", "VK_EXT_shader_subgroup_vote", "VK_EXT_texture_compression_astc_hdr", "VK_EXT_astc_decode_mode", "VK_EXT_pipeline_robustness", "VK_KHR_maintenance1", "VK_KHR_external_memory", #if defined( VK_USE_PLATFORM_WIN32_KHR ) "VK_KHR_external_memory_win32", #endif /*VK_USE_PLATFORM_WIN32_KHR*/ "VK_KHR_external_memory_fd", #if defined( VK_USE_PLATFORM_WIN32_KHR ) "VK_KHR_win32_keyed_mutex", #endif /*VK_USE_PLATFORM_WIN32_KHR*/ "VK_KHR_external_semaphore", #if defined( VK_USE_PLATFORM_WIN32_KHR ) "VK_KHR_external_semaphore_win32", #endif /*VK_USE_PLATFORM_WIN32_KHR*/ "VK_KHR_external_semaphore_fd", "VK_KHR_push_descriptor", "VK_EXT_conditional_rendering", "VK_KHR_shader_float16_int8", "VK_KHR_16bit_storage", "VK_KHR_incremental_present", "VK_KHR_descriptor_update_template", "VK_NV_clip_space_w_scaling", "VK_EXT_display_control", "VK_GOOGLE_display_timing", "VK_NV_sample_mask_override_coverage", "VK_NV_geometry_shader_passthrough", "VK_NV_viewport_array2", "VK_NVX_multiview_per_view_attributes", "VK_NV_viewport_swizzle", "VK_EXT_discard_rectangles", "VK_EXT_conservative_rasterization", "VK_EXT_depth_clip_enable", "VK_EXT_hdr_metadata", "VK_KHR_imageless_framebuffer", "VK_KHR_create_renderpass2", "VK_IMG_relaxed_line_rasterization", "VK_KHR_shared_presentable_image", "VK_KHR_external_fence", #if defined( VK_USE_PLATFORM_WIN32_KHR ) "VK_KHR_external_fence_win32", #endif /*VK_USE_PLATFORM_WIN32_KHR*/ "VK_KHR_external_fence_fd", "VK_KHR_performance_query", "VK_KHR_maintenance2", "VK_KHR_variable_pointers", "VK_EXT_external_memory_dma_buf", "VK_EXT_queue_family_foreign", "VK_KHR_dedicated_allocation", #if defined( VK_USE_PLATFORM_ANDROID_KHR ) "VK_ANDROID_external_memory_android_hardware_buffer", #endif /*VK_USE_PLATFORM_ANDROID_KHR*/ "VK_EXT_sampler_filter_minmax", "VK_KHR_storage_buffer_storage_class", "VK_AMD_gpu_shader_int16", #if defined( VK_ENABLE_BETA_EXTENSIONS ) "VK_AMDX_shader_enqueue", #endif /*VK_ENABLE_BETA_EXTENSIONS*/ "VK_AMD_mixed_attachment_samples", "VK_AMD_shader_fragment_mask", "VK_EXT_inline_uniform_block", "VK_EXT_shader_stencil_export", "VK_EXT_sample_locations", "VK_KHR_relaxed_block_layout", "VK_KHR_get_memory_requirements2", "VK_KHR_image_format_list", "VK_EXT_blend_operation_advanced", "VK_NV_fragment_coverage_to_color", "VK_KHR_acceleration_structure", "VK_KHR_ray_tracing_pipeline", "VK_KHR_ray_query", "VK_NV_framebuffer_mixed_samples", "VK_NV_fill_rectangle", "VK_NV_shader_sm_builtins", "VK_EXT_post_depth_coverage", "VK_KHR_sampler_ycbcr_conversion", "VK_KHR_bind_memory2", "VK_EXT_image_drm_format_modifier", "VK_EXT_validation_cache", "VK_EXT_descriptor_indexing", "VK_EXT_shader_viewport_index_layer", #if defined( VK_ENABLE_BETA_EXTENSIONS ) "VK_KHR_portability_subset", #endif /*VK_ENABLE_BETA_EXTENSIONS*/ "VK_NV_shading_rate_image", "VK_NV_ray_tracing", "VK_NV_representative_fragment_test", "VK_KHR_maintenance3", "VK_KHR_draw_indirect_count", "VK_EXT_filter_cubic", "VK_QCOM_render_pass_shader_resolve", "VK_EXT_global_priority", "VK_KHR_shader_subgroup_extended_types", "VK_KHR_8bit_storage", "VK_EXT_external_memory_host", "VK_AMD_buffer_marker", "VK_KHR_shader_atomic_int64", "VK_KHR_shader_clock", "VK_AMD_pipeline_compiler_control", "VK_EXT_calibrated_timestamps", "VK_AMD_shader_core_properties", "VK_KHR_video_decode_h265", "VK_KHR_global_priority", "VK_AMD_memory_overallocation_behavior", "VK_EXT_vertex_attribute_divisor", #if defined( VK_USE_PLATFORM_GGP ) "VK_GGP_frame_token", #endif /*VK_USE_PLATFORM_GGP*/ "VK_EXT_pipeline_creation_feedback", "VK_KHR_driver_properties", "VK_KHR_shader_float_controls", "VK_NV_shader_subgroup_partitioned", "VK_KHR_depth_stencil_resolve", "VK_KHR_swapchain_mutable_format", "VK_NV_compute_shader_derivatives", "VK_NV_mesh_shader", "VK_NV_fragment_shader_barycentric", "VK_NV_shader_image_footprint", "VK_NV_scissor_exclusive", "VK_NV_device_diagnostic_checkpoints", "VK_KHR_timeline_semaphore", "VK_INTEL_shader_integer_functions2", "VK_INTEL_performance_query", "VK_KHR_vulkan_memory_model", "VK_EXT_pci_bus_info", "VK_AMD_display_native_hdr", "VK_KHR_shader_terminate_invocation", "VK_EXT_fragment_density_map", "VK_EXT_scalar_block_layout", "VK_GOOGLE_hlsl_functionality1", "VK_GOOGLE_decorate_string", "VK_EXT_subgroup_size_control", "VK_KHR_fragment_shading_rate", "VK_AMD_shader_core_properties2", "VK_AMD_device_coherent_memory", "VK_KHR_dynamic_rendering_local_read", "VK_EXT_shader_image_atomic_int64", "VK_KHR_shader_quad_control", "VK_KHR_spirv_1_4", "VK_EXT_memory_budget", "VK_EXT_memory_priority", "VK_NV_dedicated_allocation_image_aliasing", "VK_KHR_separate_depth_stencil_layouts", "VK_EXT_buffer_device_address", "VK_EXT_tooling_info", "VK_EXT_separate_stencil_usage", "VK_KHR_present_wait", "VK_NV_cooperative_matrix", "VK_NV_coverage_reduction_mode", "VK_EXT_fragment_shader_interlock", "VK_EXT_ycbcr_image_arrays", "VK_KHR_uniform_buffer_standard_layout", "VK_EXT_provoking_vertex", #if defined( VK_USE_PLATFORM_WIN32_KHR ) "VK_EXT_full_screen_exclusive", #endif /*VK_USE_PLATFORM_WIN32_KHR*/ "VK_KHR_buffer_device_address", "VK_EXT_line_rasterization", "VK_EXT_shader_atomic_float", "VK_EXT_host_query_reset", "VK_EXT_index_type_uint8", "VK_EXT_extended_dynamic_state", "VK_KHR_deferred_host_operations", "VK_KHR_pipeline_executable_properties", "VK_EXT_host_image_copy", "VK_KHR_map_memory2", "VK_EXT_map_memory_placed", "VK_EXT_shader_atomic_float2", "VK_EXT_swapchain_maintenance1", "VK_EXT_shader_demote_to_helper_invocation", "VK_NV_device_generated_commands", "VK_NV_inherited_viewport_scissor", "VK_KHR_shader_integer_dot_product", "VK_EXT_texel_buffer_alignment", "VK_QCOM_render_pass_transform", "VK_EXT_depth_bias_control", "VK_EXT_device_memory_report", "VK_EXT_robustness2", "VK_EXT_custom_border_color", "VK_GOOGLE_user_type", "VK_KHR_pipeline_library", "VK_NV_present_barrier", "VK_KHR_shader_non_semantic_info", "VK_KHR_present_id", "VK_EXT_private_data", "VK_EXT_pipeline_creation_cache_control", "VK_KHR_video_encode_queue", "VK_NV_device_diagnostics_config", "VK_QCOM_render_pass_store_ops", #if defined( VK_ENABLE_BETA_EXTENSIONS ) "VK_NV_cuda_kernel_launch", #endif /*VK_ENABLE_BETA_EXTENSIONS*/ "VK_NV_low_latency", #if defined( VK_USE_PLATFORM_METAL_EXT ) "VK_EXT_metal_objects", #endif /*VK_USE_PLATFORM_METAL_EXT*/ "VK_KHR_synchronization2", "VK_EXT_descriptor_buffer", "VK_EXT_graphics_pipeline_library", "VK_AMD_shader_early_and_late_fragment_tests", "VK_KHR_fragment_shader_barycentric", "VK_KHR_shader_subgroup_uniform_control_flow", "VK_KHR_zero_initialize_workgroup_memory", "VK_NV_fragment_shading_rate_enums", "VK_NV_ray_tracing_motion_blur", "VK_EXT_mesh_shader", "VK_EXT_ycbcr_2plane_444_formats", "VK_EXT_fragment_density_map2", "VK_QCOM_rotated_copy_commands", "VK_EXT_image_robustness", "VK_KHR_workgroup_memory_explicit_layout", "VK_KHR_copy_commands2", "VK_EXT_image_compression_control", "VK_EXT_attachment_feedback_loop_layout", "VK_EXT_4444_formats", "VK_EXT_device_fault", "VK_ARM_rasterization_order_attachment_access", "VK_EXT_rgba10x6_formats", #if defined( VK_USE_PLATFORM_WIN32_KHR ) "VK_NV_acquire_winrt_display", #endif /*VK_USE_PLATFORM_WIN32_KHR*/ "VK_VALVE_mutable_descriptor_type", "VK_EXT_vertex_input_dynamic_state", "VK_EXT_physical_device_drm", "VK_EXT_device_address_binding_report", "VK_EXT_depth_clip_control", "VK_EXT_primitive_topology_list_restart", "VK_KHR_format_feature_flags2", "VK_EXT_present_mode_fifo_latest_ready", #if defined( VK_USE_PLATFORM_FUCHSIA ) "VK_FUCHSIA_external_memory", "VK_FUCHSIA_external_semaphore", "VK_FUCHSIA_buffer_collection", #endif /*VK_USE_PLATFORM_FUCHSIA*/ "VK_HUAWEI_subpass_shading", "VK_HUAWEI_invocation_mask", "VK_NV_external_memory_rdma", "VK_EXT_pipeline_properties", "VK_EXT_frame_boundary", "VK_EXT_multisampled_render_to_single_sampled", "VK_EXT_extended_dynamic_state2", "VK_EXT_color_write_enable", "VK_EXT_primitives_generated_query", "VK_KHR_ray_tracing_maintenance1", "VK_EXT_global_priority_query", "VK_EXT_image_view_min_lod", "VK_EXT_multi_draw", "VK_EXT_image_2d_view_of_3d", "VK_EXT_shader_tile_image", "VK_EXT_opacity_micromap", #if defined( VK_ENABLE_BETA_EXTENSIONS ) "VK_NV_displacement_micromap", #endif /*VK_ENABLE_BETA_EXTENSIONS*/ "VK_EXT_load_store_op_none", "VK_HUAWEI_cluster_culling_shader", "VK_EXT_border_color_swizzle", "VK_EXT_pageable_device_local_memory", "VK_KHR_maintenance4", "VK_ARM_shader_core_properties", "VK_KHR_shader_subgroup_rotate", "VK_ARM_scheduling_controls", "VK_EXT_image_sliced_view_of_3d", "VK_VALVE_descriptor_set_host_mapping", "VK_EXT_depth_clamp_zero_one", "VK_EXT_non_seamless_cube_map", "VK_ARM_render_pass_striped", "VK_QCOM_fragment_density_map_offset", "VK_NV_copy_memory_indirect", "VK_NV_memory_decompression", "VK_NV_device_generated_commands_compute", "VK_NV_ray_tracing_linear_swept_spheres", "VK_NV_linear_color_attachment", "VK_KHR_shader_maximal_reconvergence", "VK_EXT_image_compression_control_swapchain", "VK_QCOM_image_processing", "VK_EXT_nested_command_buffer", "VK_EXT_external_memory_acquire_unmodified", "VK_EXT_extended_dynamic_state3", "VK_EXT_subpass_merge_feedback", "VK_EXT_shader_module_identifier", "VK_EXT_rasterization_order_attachment_access", "VK_NV_optical_flow", "VK_EXT_legacy_dithering", "VK_EXT_pipeline_protected_access", #if defined( VK_USE_PLATFORM_ANDROID_KHR ) "VK_ANDROID_external_format_resolve", #endif /*VK_USE_PLATFORM_ANDROID_KHR*/ "VK_KHR_maintenance5", "VK_AMD_anti_lag", "VK_KHR_ray_tracing_position_fetch", "VK_EXT_shader_object", "VK_KHR_pipeline_binary", "VK_QCOM_tile_properties", "VK_SEC_amigo_profiling", "VK_QCOM_multiview_per_view_viewports", "VK_NV_ray_tracing_invocation_reorder", "VK_NV_cooperative_vector", "VK_NV_extended_sparse_address_space", "VK_EXT_mutable_descriptor_type", "VK_EXT_legacy_vertex_attributes", "VK_ARM_shader_core_builtins", "VK_EXT_pipeline_library_group_handles", "VK_EXT_dynamic_rendering_unused_attachments", "VK_NV_low_latency2", "VK_KHR_cooperative_matrix", "VK_QCOM_multiview_per_view_render_areas", "VK_KHR_compute_shader_derivatives", "VK_KHR_video_decode_av1", "VK_KHR_video_encode_av1", "VK_KHR_video_maintenance1", "VK_NV_per_stage_descriptor_set", "VK_QCOM_image_processing2", "VK_QCOM_filter_cubic_weights", "VK_QCOM_ycbcr_degamma", "VK_QCOM_filter_cubic_clamp", "VK_EXT_attachment_feedback_loop_dynamic_state", "VK_KHR_vertex_attribute_divisor", "VK_KHR_load_store_op_none", "VK_KHR_shader_float_controls2", #if defined( VK_USE_PLATFORM_SCREEN_QNX ) "VK_QNX_external_memory_screen_buffer", #endif /*VK_USE_PLATFORM_SCREEN_QNX*/ "VK_MSFT_layered_driver", "VK_KHR_index_type_uint8", "VK_KHR_line_rasterization", "VK_KHR_calibrated_timestamps", "VK_KHR_shader_expect_assume", "VK_KHR_maintenance6", "VK_NV_descriptor_pool_overallocation", "VK_KHR_video_encode_quantization_map", "VK_NV_raw_access_chains", "VK_KHR_shader_relaxed_extended_instruction", "VK_NV_command_buffer_inheritance", "VK_KHR_maintenance7", "VK_NV_shader_atomic_float16_vector", "VK_EXT_shader_replicated_composites", "VK_NV_ray_tracing_validation", "VK_NV_cluster_acceleration_structure", "VK_NV_partitioned_acceleration_structure", "VK_EXT_device_generated_commands", "VK_KHR_maintenance8", "VK_MESA_image_alignment_control", "VK_EXT_depth_clamp_control", "VK_KHR_video_maintenance2", "VK_HUAWEI_hdr_vivid", "VK_NV_cooperative_matrix2", "VK_ARM_pipeline_opacity_micromap", #if defined( VK_USE_PLATFORM_METAL_EXT ) "VK_EXT_external_memory_metal", #endif /*VK_USE_PLATFORM_METAL_EXT*/ "VK_KHR_depth_clamp_zero_one", "VK_EXT_vertex_attribute_robustness" }; return deviceExtensions; } VULKAN_HPP_INLINE std::set const & getInstanceExtensions() { static const std::set instanceExtensions = { "VK_KHR_surface", "VK_KHR_display", #if defined( VK_USE_PLATFORM_XLIB_KHR ) "VK_KHR_xlib_surface", #endif /*VK_USE_PLATFORM_XLIB_KHR*/ #if defined( VK_USE_PLATFORM_XCB_KHR ) "VK_KHR_xcb_surface", #endif /*VK_USE_PLATFORM_XCB_KHR*/ #if defined( VK_USE_PLATFORM_WAYLAND_KHR ) "VK_KHR_wayland_surface", #endif /*VK_USE_PLATFORM_WAYLAND_KHR*/ #if defined( VK_USE_PLATFORM_ANDROID_KHR ) "VK_KHR_android_surface", #endif /*VK_USE_PLATFORM_ANDROID_KHR*/ #if defined( VK_USE_PLATFORM_WIN32_KHR ) "VK_KHR_win32_surface", #endif /*VK_USE_PLATFORM_WIN32_KHR*/ "VK_EXT_debug_report", #if defined( VK_USE_PLATFORM_GGP ) "VK_GGP_stream_descriptor_surface", #endif /*VK_USE_PLATFORM_GGP*/ "VK_NV_external_memory_capabilities", "VK_KHR_get_physical_device_properties2", "VK_EXT_validation_flags", #if defined( VK_USE_PLATFORM_VI_NN ) "VK_NN_vi_surface", #endif /*VK_USE_PLATFORM_VI_NN*/ "VK_KHR_device_group_creation", "VK_KHR_external_memory_capabilities", "VK_KHR_external_semaphore_capabilities", "VK_EXT_direct_mode_display", #if defined( VK_USE_PLATFORM_XLIB_XRANDR_EXT ) "VK_EXT_acquire_xlib_display", #endif /*VK_USE_PLATFORM_XLIB_XRANDR_EXT*/ "VK_EXT_display_surface_counter", "VK_EXT_swapchain_colorspace", "VK_KHR_external_fence_capabilities", "VK_KHR_get_surface_capabilities2", "VK_KHR_get_display_properties2", #if defined( VK_USE_PLATFORM_IOS_MVK ) "VK_MVK_ios_surface", #endif /*VK_USE_PLATFORM_IOS_MVK*/ #if defined( VK_USE_PLATFORM_MACOS_MVK ) "VK_MVK_macos_surface", #endif /*VK_USE_PLATFORM_MACOS_MVK*/ "VK_EXT_debug_utils", #if defined( VK_USE_PLATFORM_FUCHSIA ) "VK_FUCHSIA_imagepipe_surface", #endif /*VK_USE_PLATFORM_FUCHSIA*/ #if defined( VK_USE_PLATFORM_METAL_EXT ) "VK_EXT_metal_surface", #endif /*VK_USE_PLATFORM_METAL_EXT*/ "VK_KHR_surface_protected_capabilities", "VK_EXT_validation_features", "VK_EXT_headless_surface", "VK_EXT_surface_maintenance1", "VK_EXT_acquire_drm_display", #if defined( VK_USE_PLATFORM_DIRECTFB_EXT ) "VK_EXT_directfb_surface", #endif /*VK_USE_PLATFORM_DIRECTFB_EXT*/ #if defined( VK_USE_PLATFORM_SCREEN_QNX ) "VK_QNX_screen_surface", #endif /*VK_USE_PLATFORM_SCREEN_QNX*/ "VK_KHR_portability_enumeration", "VK_GOOGLE_surfaceless_query", "VK_LUNARG_direct_driver_loading", "VK_EXT_layer_settings", "VK_NV_display_stereo" }; return instanceExtensions; } VULKAN_HPP_INLINE std::map>> const & getExtensionDepends( std::string const & extension ) { static const std::map>> noDependencies; static const std::map>>> dependencies = { { "VK_KHR_swapchain", { { "VK_VERSION_1_0", { { "VK_KHR_surface", } } } } }, { "VK_KHR_display", { { "VK_VERSION_1_0", { { "VK_KHR_surface", } } } } }, { "VK_KHR_display_swapchain", { { "VK_VERSION_1_0", { { "VK_KHR_swapchain", "VK_KHR_display", } } } } }, #if defined( VK_USE_PLATFORM_XLIB_KHR ) { "VK_KHR_xlib_surface", { { "VK_VERSION_1_0", { { "VK_KHR_surface", } } } } }, #endif /*VK_USE_PLATFORM_XLIB_KHR*/ #if defined( VK_USE_PLATFORM_XCB_KHR ) { "VK_KHR_xcb_surface", { { "VK_VERSION_1_0", { { "VK_KHR_surface", } } } } }, #endif /*VK_USE_PLATFORM_XCB_KHR*/ #if defined( VK_USE_PLATFORM_WAYLAND_KHR ) { "VK_KHR_wayland_surface", { { "VK_VERSION_1_0", { { "VK_KHR_surface", } } } } }, #endif /*VK_USE_PLATFORM_WAYLAND_KHR*/ #if defined( VK_USE_PLATFORM_ANDROID_KHR ) { "VK_KHR_android_surface", { { "VK_VERSION_1_0", { { "VK_KHR_surface", } } } } }, #endif /*VK_USE_PLATFORM_ANDROID_KHR*/ #if defined( VK_USE_PLATFORM_WIN32_KHR ) { "VK_KHR_win32_surface", { { "VK_VERSION_1_0", { { "VK_KHR_surface", } } } } }, #endif /*VK_USE_PLATFORM_WIN32_KHR*/ { "VK_EXT_debug_marker", { { "VK_VERSION_1_0", { { "VK_EXT_debug_report", } } } } }, { "VK_KHR_video_queue", { { "VK_VERSION_1_1", { { "VK_KHR_synchronization2", } } }, { "VK_VERSION_1_3", { {} } } } }, { "VK_KHR_video_decode_queue", { { "VK_VERSION_1_0", { { "VK_KHR_video_queue", "VK_KHR_synchronization2", } } }, { "VK_VERSION_1_3", { {} } } } }, { "VK_EXT_transform_feedback", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_KHR_video_encode_h264", { { "VK_VERSION_1_0", { { "VK_KHR_video_encode_queue", } } } } }, { "VK_KHR_video_encode_h265", { { "VK_VERSION_1_0", { { "VK_KHR_video_encode_queue", } } } } }, { "VK_KHR_video_decode_h264", { { "VK_VERSION_1_0", { { "VK_KHR_video_decode_queue", } } } } }, { "VK_AMD_texture_gather_bias_lod", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_KHR_dynamic_rendering", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { { "VK_KHR_depth_stencil_resolve", } } }, { "VK_VERSION_1_2", { {} } } } }, #if defined( VK_USE_PLATFORM_GGP ) { "VK_GGP_stream_descriptor_surface", { { "VK_VERSION_1_0", { { "VK_KHR_surface", } } } } }, #endif /*VK_USE_PLATFORM_GGP*/ { "VK_NV_corner_sampled_image", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_KHR_multiview", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_NV_external_memory", { { "VK_VERSION_1_0", { { "VK_NV_external_memory_capabilities", } } } } }, #if defined( VK_USE_PLATFORM_WIN32_KHR ) { "VK_NV_external_memory_win32", { { "VK_VERSION_1_0", { { "VK_NV_external_memory", } } } } }, { "VK_NV_win32_keyed_mutex", { { "VK_VERSION_1_0", { { "VK_NV_external_memory_win32", } } } } }, #endif /*VK_USE_PLATFORM_WIN32_KHR*/ { "VK_KHR_device_group", { { "VK_VERSION_1_0", { { "VK_KHR_device_group_creation", } } } } }, #if defined( VK_USE_PLATFORM_VI_NN ) { "VK_NN_vi_surface", { { "VK_VERSION_1_0", { { "VK_KHR_surface", } } } } }, #endif /*VK_USE_PLATFORM_VI_NN*/ { "VK_EXT_texture_compression_astc_hdr", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_EXT_astc_decode_mode", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_EXT_pipeline_robustness", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_KHR_external_memory_capabilities", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_KHR_external_memory", { { "VK_VERSION_1_0", { { "VK_KHR_external_memory_capabilities", } } }, { "VK_VERSION_1_1", { {} } } } }, #if defined( VK_USE_PLATFORM_WIN32_KHR ) { "VK_KHR_external_memory_win32", { { "VK_VERSION_1_0", { { "VK_KHR_external_memory", } } }, { "VK_VERSION_1_1", { {} } } } }, #endif /*VK_USE_PLATFORM_WIN32_KHR*/ { "VK_KHR_external_memory_fd", { { "VK_VERSION_1_0", { { "VK_KHR_external_memory", } } }, { "VK_VERSION_1_1", { {} } } } }, #if defined( VK_USE_PLATFORM_WIN32_KHR ) { "VK_KHR_win32_keyed_mutex", { { "VK_VERSION_1_0", { { "VK_KHR_external_memory_win32", } } } } }, #endif /*VK_USE_PLATFORM_WIN32_KHR*/ { "VK_KHR_external_semaphore_capabilities", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_KHR_external_semaphore", { { "VK_VERSION_1_0", { { "VK_KHR_external_semaphore_capabilities", } } } } }, #if defined( VK_USE_PLATFORM_WIN32_KHR ) { "VK_KHR_external_semaphore_win32", { { "VK_VERSION_1_0", { { "VK_KHR_external_semaphore", } } } } }, #endif /*VK_USE_PLATFORM_WIN32_KHR*/ { "VK_KHR_external_semaphore_fd", { { "VK_VERSION_1_0", { { "VK_KHR_external_semaphore", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_KHR_push_descriptor", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_EXT_conditional_rendering", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_KHR_shader_float16_int8", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_KHR_16bit_storage", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", "VK_KHR_storage_buffer_storage_class", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_KHR_incremental_present", { { "VK_VERSION_1_0", { { "VK_KHR_swapchain", } } } } }, { "VK_EXT_direct_mode_display", { { "VK_VERSION_1_0", { { "VK_KHR_display", } } } } }, #if defined( VK_USE_PLATFORM_XLIB_XRANDR_EXT ) { "VK_EXT_acquire_xlib_display", { { "VK_VERSION_1_0", { { "VK_EXT_direct_mode_display", } } } } }, #endif /*VK_USE_PLATFORM_XLIB_XRANDR_EXT*/ { "VK_EXT_display_surface_counter", { { "VK_VERSION_1_0", { { "VK_KHR_display", } } } } }, { "VK_EXT_display_control", { { "VK_VERSION_1_0", { { "VK_EXT_display_surface_counter", "VK_KHR_swapchain", } } } } }, { "VK_GOOGLE_display_timing", { { "VK_VERSION_1_0", { { "VK_KHR_swapchain", } } } } }, { "VK_NVX_multiview_per_view_attributes", { { "VK_VERSION_1_0", { { "VK_KHR_multiview", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_EXT_discard_rectangles", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_EXT_conservative_rasterization", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_EXT_depth_clip_enable", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_EXT_swapchain_colorspace", { { "VK_VERSION_1_0", { { "VK_KHR_surface", } } } } }, { "VK_EXT_hdr_metadata", { { "VK_VERSION_1_0", { { "VK_KHR_swapchain", } } } } }, { "VK_KHR_imageless_framebuffer", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", "VK_KHR_maintenance2", } } }, { "VK_VERSION_1_1", { { "VK_KHR_image_format_list", } } }, { "VK_VERSION_1_2", { {} } } } }, { "VK_KHR_create_renderpass2", { { "VK_VERSION_1_0", { { "VK_KHR_multiview", "VK_KHR_maintenance2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_IMG_relaxed_line_rasterization", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_KHR_shared_presentable_image", { { "VK_VERSION_1_0", { { "VK_KHR_swapchain", "VK_KHR_get_surface_capabilities2", "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { { "VK_KHR_swapchain", "VK_KHR_get_surface_capabilities2", } } } } }, { "VK_KHR_external_fence_capabilities", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_KHR_external_fence", { { "VK_VERSION_1_0", { { "VK_KHR_external_fence_capabilities", } } } } }, #if defined( VK_USE_PLATFORM_WIN32_KHR ) { "VK_KHR_external_fence_win32", { { "VK_VERSION_1_0", { { "VK_KHR_external_fence", } } } } }, #endif /*VK_USE_PLATFORM_WIN32_KHR*/ { "VK_KHR_external_fence_fd", { { "VK_VERSION_1_0", { { "VK_KHR_external_fence", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_KHR_performance_query", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_KHR_get_surface_capabilities2", { { "VK_VERSION_1_0", { { "VK_KHR_surface", } } } } }, { "VK_KHR_variable_pointers", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", "VK_KHR_storage_buffer_storage_class", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_KHR_get_display_properties2", { { "VK_VERSION_1_0", { { "VK_KHR_display", } } } } }, #if defined( VK_USE_PLATFORM_IOS_MVK ) { "VK_MVK_ios_surface", { { "VK_VERSION_1_0", { { "VK_KHR_surface", } } } } }, #endif /*VK_USE_PLATFORM_IOS_MVK*/ #if defined( VK_USE_PLATFORM_MACOS_MVK ) { "VK_MVK_macos_surface", { { "VK_VERSION_1_0", { { "VK_KHR_surface", } } } } }, #endif /*VK_USE_PLATFORM_MACOS_MVK*/ { "VK_EXT_external_memory_dma_buf", { { "VK_VERSION_1_0", { { "VK_KHR_external_memory_fd", } } } } }, { "VK_EXT_queue_family_foreign", { { "VK_VERSION_1_0", { { "VK_KHR_external_memory", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_KHR_dedicated_allocation", { { "VK_VERSION_1_0", { { "VK_KHR_get_memory_requirements2", } } }, { "VK_VERSION_1_1", { {} } } } }, #if defined( VK_USE_PLATFORM_ANDROID_KHR ) { "VK_ANDROID_external_memory_android_hardware_buffer", { { "VK_VERSION_1_0", { { "VK_KHR_sampler_ycbcr_conversion", "VK_KHR_external_memory", "VK_KHR_dedicated_allocation", } } }, { "VK_VERSION_1_1", { { "VK_EXT_queue_family_foreign", } } } } }, #endif /*VK_USE_PLATFORM_ANDROID_KHR*/ { "VK_EXT_sampler_filter_minmax", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, #if defined( VK_ENABLE_BETA_EXTENSIONS ) { "VK_AMDX_shader_enqueue", { { "VK_VERSION_1_0", { { "VK_KHR_synchronization2", "VK_KHR_spirv_1_4", "VK_EXT_extended_dynamic_state", } } }, { "VK_VERSION_1_3", { { "VK_KHR_maintenance5", "VK_KHR_pipeline_library", } } } } }, #endif /*VK_ENABLE_BETA_EXTENSIONS*/ { "VK_EXT_inline_uniform_block", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", "VK_KHR_maintenance1", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_EXT_sample_locations", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_EXT_blend_operation_advanced", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_KHR_acceleration_structure", { { "VK_VERSION_1_1", { { "VK_EXT_descriptor_indexing", "VK_KHR_buffer_device_address", } } }, { "VK_VERSION_1_2", { { "VK_KHR_deferred_host_operations", } } } } }, { "VK_KHR_ray_tracing_pipeline", { { "VK_VERSION_1_0", { { "VK_KHR_spirv_1_4", "VK_KHR_acceleration_structure", } } } } }, { "VK_KHR_ray_query", { { "VK_VERSION_1_0", { { "VK_KHR_spirv_1_4", "VK_KHR_acceleration_structure", } } } } }, { "VK_NV_shader_sm_builtins", { { "VK_VERSION_1_1", { {} } } } }, { "VK_KHR_sampler_ycbcr_conversion", { { "VK_VERSION_1_0", { { "VK_KHR_maintenance1", "VK_KHR_bind_memory2", "VK_KHR_get_memory_requirements2", "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_EXT_image_drm_format_modifier", { { "VK_VERSION_1_0", { { "VK_KHR_bind_memory2", "VK_KHR_get_physical_device_properties2", "VK_KHR_sampler_ycbcr_conversion", } } }, { "VK_VERSION_1_1", { { "VK_KHR_image_format_list", } } }, { "VK_VERSION_1_2", { {} } } } }, { "VK_EXT_descriptor_indexing", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", "VK_KHR_maintenance3", } } }, { "VK_VERSION_1_1", { {} } } } }, #if defined( VK_ENABLE_BETA_EXTENSIONS ) { "VK_KHR_portability_subset", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, #endif /*VK_ENABLE_BETA_EXTENSIONS*/ { "VK_NV_shading_rate_image", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_NV_ray_tracing", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", "VK_KHR_get_memory_requirements2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_NV_representative_fragment_test", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_KHR_maintenance3", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_KHR_shader_subgroup_extended_types", { { "VK_VERSION_1_1", { {} } } } }, { "VK_KHR_8bit_storage", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", "VK_KHR_storage_buffer_storage_class", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_EXT_external_memory_host", { { "VK_VERSION_1_0", { { "VK_KHR_external_memory", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_KHR_shader_atomic_int64", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_KHR_shader_clock", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_EXT_calibrated_timestamps", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_AMD_shader_core_properties", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_KHR_video_decode_h265", { { "VK_VERSION_1_0", { { "VK_KHR_video_decode_queue", } } } } }, { "VK_KHR_global_priority", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_EXT_vertex_attribute_divisor", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, #if defined( VK_USE_PLATFORM_GGP ) { "VK_GGP_frame_token", { { "VK_VERSION_1_0", { { "VK_KHR_swapchain", "VK_GGP_stream_descriptor_surface", } } } } }, #endif /*VK_USE_PLATFORM_GGP*/ { "VK_KHR_driver_properties", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_KHR_shader_float_controls", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_NV_shader_subgroup_partitioned", { { "VK_VERSION_1_1", { {} } } } }, { "VK_KHR_depth_stencil_resolve", { { "VK_VERSION_1_0", { { "VK_KHR_create_renderpass2", } } }, { "VK_VERSION_1_2", { {} } } } }, { "VK_KHR_swapchain_mutable_format", { { "VK_VERSION_1_0", { { "VK_KHR_swapchain", "VK_KHR_maintenance2", "VK_KHR_image_format_list", } } }, { "VK_VERSION_1_1", { { "VK_KHR_swapchain", "VK_KHR_image_format_list", } } }, { "VK_VERSION_1_2", { { "VK_KHR_swapchain", } } } } }, { "VK_NV_compute_shader_derivatives", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_NV_mesh_shader", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_NV_fragment_shader_barycentric", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_NV_shader_image_footprint", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_NV_scissor_exclusive", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_NV_device_diagnostic_checkpoints", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_KHR_timeline_semaphore", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_INTEL_shader_integer_functions2", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_KHR_vulkan_memory_model", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_EXT_pci_bus_info", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_AMD_display_native_hdr", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { { "VK_KHR_get_surface_capabilities2", "VK_KHR_swapchain", } } } } }, #if defined( VK_USE_PLATFORM_FUCHSIA ) { "VK_FUCHSIA_imagepipe_surface", { { "VK_VERSION_1_0", { { "VK_KHR_surface", } } } } }, #endif /*VK_USE_PLATFORM_FUCHSIA*/ { "VK_KHR_shader_terminate_invocation", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, #if defined( VK_USE_PLATFORM_METAL_EXT ) { "VK_EXT_metal_surface", { { "VK_VERSION_1_0", { { "VK_KHR_surface", } } } } }, #endif /*VK_USE_PLATFORM_METAL_EXT*/ { "VK_EXT_fragment_density_map", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_EXT_scalar_block_layout", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_EXT_subgroup_size_control", { { "VK_VERSION_1_1", { {} } } } }, { "VK_KHR_fragment_shading_rate", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { { "VK_KHR_create_renderpass2", } } }, { "VK_VERSION_1_2", { {} } } } }, { "VK_AMD_shader_core_properties2", { { "VK_VERSION_1_0", { { "VK_AMD_shader_core_properties", } } } } }, { "VK_AMD_device_coherent_memory", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_KHR_dynamic_rendering_local_read", { { "VK_VERSION_1_0", { { "VK_KHR_dynamic_rendering", } } }, { "VK_VERSION_1_3", { {} } } } }, { "VK_EXT_shader_image_atomic_int64", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_KHR_shader_quad_control", { { "VK_VERSION_1_1", { { "VK_KHR_vulkan_memory_model", "VK_KHR_shader_maximal_reconvergence", } } } } }, { "VK_KHR_spirv_1_4", { { "VK_VERSION_1_1", { { "VK_KHR_shader_float_controls", } } } } }, { "VK_EXT_memory_budget", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_EXT_memory_priority", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_KHR_surface_protected_capabilities", { { "VK_VERSION_1_1", { { "VK_KHR_get_surface_capabilities2", } } } } }, { "VK_NV_dedicated_allocation_image_aliasing", { { "VK_VERSION_1_0", { { "VK_KHR_dedicated_allocation", "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_KHR_separate_depth_stencil_layouts", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { { "VK_KHR_create_renderpass2", } } }, { "VK_VERSION_1_2", { {} } } } }, { "VK_EXT_buffer_device_address", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_KHR_present_wait", { { "VK_VERSION_1_0", { { "VK_KHR_swapchain", "VK_KHR_present_id", } } } } }, { "VK_NV_cooperative_matrix", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_NV_coverage_reduction_mode", { { "VK_VERSION_1_0", { { "VK_NV_framebuffer_mixed_samples", "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_EXT_fragment_shader_interlock", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_EXT_ycbcr_image_arrays", { { "VK_VERSION_1_0", { { "VK_KHR_sampler_ycbcr_conversion", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_KHR_uniform_buffer_standard_layout", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_EXT_provoking_vertex", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, #if defined( VK_USE_PLATFORM_WIN32_KHR ) { "VK_EXT_full_screen_exclusive", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { { "VK_KHR_surface", "VK_KHR_get_surface_capabilities2", "VK_KHR_swapchain", } } } } }, #endif /*VK_USE_PLATFORM_WIN32_KHR*/ { "VK_EXT_headless_surface", { { "VK_VERSION_1_0", { { "VK_KHR_surface", } } } } }, { "VK_KHR_buffer_device_address", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", "VK_KHR_device_group", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_EXT_line_rasterization", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_EXT_shader_atomic_float", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_EXT_host_query_reset", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_EXT_index_type_uint8", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_EXT_extended_dynamic_state", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_KHR_pipeline_executable_properties", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_EXT_host_image_copy", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { { "VK_KHR_copy_commands2", "VK_KHR_format_feature_flags2", } } }, { "VK_VERSION_1_3", { {} } } } }, { "VK_EXT_map_memory_placed", { { "VK_VERSION_1_0", { { "VK_KHR_map_memory2", } } }, { "VK_VERSION_1_4", { {} } } } }, { "VK_EXT_shader_atomic_float2", { { "VK_VERSION_1_0", { { "VK_EXT_shader_atomic_float", } } } } }, { "VK_EXT_surface_maintenance1", { { "VK_VERSION_1_0", { { "VK_KHR_surface", "VK_KHR_get_surface_capabilities2", } } } } }, { "VK_EXT_swapchain_maintenance1", { { "VK_VERSION_1_0", { { "VK_KHR_swapchain", "VK_EXT_surface_maintenance1", "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_EXT_shader_demote_to_helper_invocation", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_NV_device_generated_commands", { { "VK_VERSION_1_1", { { "VK_KHR_buffer_device_address", } } }, { "VK_VERSION_1_2", { {} } } } }, { "VK_NV_inherited_viewport_scissor", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_KHR_shader_integer_dot_product", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_EXT_texel_buffer_alignment", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_EXT_depth_bias_control", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_EXT_device_memory_report", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_EXT_acquire_drm_display", { { "VK_VERSION_1_0", { { "VK_EXT_direct_mode_display", } } } } }, { "VK_EXT_robustness2", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_EXT_custom_border_color", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_NV_present_barrier", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { { "VK_KHR_surface", "VK_KHR_get_surface_capabilities2", "VK_KHR_swapchain", } } } } }, { "VK_KHR_present_id", { { "VK_VERSION_1_0", { { "VK_KHR_swapchain", "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_EXT_private_data", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_EXT_pipeline_creation_cache_control", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_KHR_video_encode_queue", { { "VK_VERSION_1_0", { { "VK_KHR_video_queue", "VK_KHR_synchronization2", } } }, { "VK_VERSION_1_3", { {} } } } }, { "VK_NV_device_diagnostics_config", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_KHR_synchronization2", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_EXT_descriptor_buffer", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { { "VK_KHR_buffer_device_address", "VK_EXT_descriptor_indexing", } } }, { "VK_VERSION_1_2", { { "VK_KHR_synchronization2", } } }, { "VK_VERSION_1_3", { {} } } } }, { "VK_EXT_graphics_pipeline_library", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { { "VK_KHR_pipeline_library", } } } } }, { "VK_AMD_shader_early_and_late_fragment_tests", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_KHR_fragment_shader_barycentric", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_KHR_shader_subgroup_uniform_control_flow", { { "VK_VERSION_1_1", { {} } } } }, { "VK_KHR_zero_initialize_workgroup_memory", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_NV_fragment_shading_rate_enums", { { "VK_VERSION_1_0", { { "VK_KHR_fragment_shading_rate", } } } } }, { "VK_NV_ray_tracing_motion_blur", { { "VK_VERSION_1_0", { { "VK_KHR_ray_tracing_pipeline", } } } } }, { "VK_EXT_mesh_shader", { { "VK_VERSION_1_0", { { "VK_KHR_spirv_1_4", } } } } }, { "VK_EXT_ycbcr_2plane_444_formats", { { "VK_VERSION_1_0", { { "VK_KHR_sampler_ycbcr_conversion", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_EXT_fragment_density_map2", { { "VK_VERSION_1_0", { { "VK_EXT_fragment_density_map", } } } } }, { "VK_QCOM_rotated_copy_commands", { { "VK_VERSION_1_0", { { "VK_KHR_copy_commands2", } } }, { "VK_VERSION_1_3", { {} } } } }, { "VK_EXT_image_robustness", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_KHR_workgroup_memory_explicit_layout", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_KHR_copy_commands2", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_EXT_image_compression_control", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_EXT_attachment_feedback_loop_layout", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_EXT_4444_formats", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_EXT_device_fault", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_ARM_rasterization_order_attachment_access", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_EXT_rgba10x6_formats", { { "VK_VERSION_1_0", { { "VK_KHR_sampler_ycbcr_conversion", } } }, { "VK_VERSION_1_1", { {} } } } }, #if defined( VK_USE_PLATFORM_WIN32_KHR ) { "VK_NV_acquire_winrt_display", { { "VK_VERSION_1_0", { { "VK_EXT_direct_mode_display", } } } } }, #endif /*VK_USE_PLATFORM_WIN32_KHR*/ #if defined( VK_USE_PLATFORM_DIRECTFB_EXT ) { "VK_EXT_directfb_surface", { { "VK_VERSION_1_0", { { "VK_KHR_surface", } } } } }, #endif /*VK_USE_PLATFORM_DIRECTFB_EXT*/ { "VK_VALVE_mutable_descriptor_type", { { "VK_VERSION_1_0", { { "VK_KHR_maintenance3", } } } } }, { "VK_EXT_vertex_input_dynamic_state", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_EXT_physical_device_drm", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_EXT_device_address_binding_report", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { { "VK_EXT_debug_utils", } } } } }, { "VK_EXT_depth_clip_control", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_EXT_primitive_topology_list_restart", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_KHR_format_feature_flags2", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_EXT_present_mode_fifo_latest_ready", { { "VK_VERSION_1_0", { { "VK_KHR_swapchain", } } } } }, #if defined( VK_USE_PLATFORM_FUCHSIA ) { "VK_FUCHSIA_external_memory", { { "VK_VERSION_1_0", { { "VK_KHR_external_memory_capabilities", "VK_KHR_external_memory", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_FUCHSIA_external_semaphore", { { "VK_VERSION_1_0", { { "VK_KHR_external_semaphore_capabilities", "VK_KHR_external_semaphore", } } } } }, { "VK_FUCHSIA_buffer_collection", { { "VK_VERSION_1_0", { { "VK_FUCHSIA_external_memory", "VK_KHR_sampler_ycbcr_conversion", } } }, { "VK_VERSION_1_1", { {} } } } }, #endif /*VK_USE_PLATFORM_FUCHSIA*/ { "VK_HUAWEI_subpass_shading", { { "VK_VERSION_1_0", { { "VK_KHR_create_renderpass2", } } }, { "VK_VERSION_1_2", { { "VK_KHR_synchronization2", } } }, { "VK_VERSION_1_3", { {} } } } }, { "VK_HUAWEI_invocation_mask", { { "VK_VERSION_1_0", { { "VK_KHR_ray_tracing_pipeline", "VK_KHR_synchronization2", } } }, { "VK_VERSION_1_3", { {} } } } }, { "VK_NV_external_memory_rdma", { { "VK_VERSION_1_0", { { "VK_KHR_external_memory", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_EXT_pipeline_properties", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_EXT_multisampled_render_to_single_sampled", { { "VK_VERSION_1_0", { { "VK_KHR_create_renderpass2", "VK_KHR_depth_stencil_resolve", } } }, { "VK_VERSION_1_2", { {} } } } }, { "VK_EXT_extended_dynamic_state2", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, #if defined( VK_USE_PLATFORM_SCREEN_QNX ) { "VK_QNX_screen_surface", { { "VK_VERSION_1_0", { { "VK_KHR_surface", } } } } }, #endif /*VK_USE_PLATFORM_SCREEN_QNX*/ { "VK_EXT_color_write_enable", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_EXT_primitives_generated_query", { { "VK_VERSION_1_0", { { "VK_EXT_transform_feedback", } } } } }, { "VK_KHR_ray_tracing_maintenance1", { { "VK_VERSION_1_0", { { "VK_KHR_acceleration_structure", } } } } }, { "VK_EXT_global_priority_query", { { "VK_VERSION_1_0", { { "VK_EXT_global_priority", "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_EXT_image_view_min_lod", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_EXT_multi_draw", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_EXT_image_2d_view_of_3d", { { "VK_VERSION_1_0", { { "VK_KHR_maintenance1", "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_EXT_shader_tile_image", { { "VK_VERSION_1_3", { {} } } } }, { "VK_EXT_opacity_micromap", { { "VK_VERSION_1_0", { { "VK_KHR_acceleration_structure", "VK_KHR_synchronization2", } } }, { "VK_VERSION_1_3", { {} } } } }, #if defined( VK_ENABLE_BETA_EXTENSIONS ) { "VK_NV_displacement_micromap", { { "VK_VERSION_1_0", { { "VK_EXT_opacity_micromap", } } } } }, #endif /*VK_ENABLE_BETA_EXTENSIONS*/ { "VK_HUAWEI_cluster_culling_shader", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_EXT_border_color_swizzle", { { "VK_VERSION_1_0", { { "VK_EXT_custom_border_color", } } } } }, { "VK_EXT_pageable_device_local_memory", { { "VK_VERSION_1_0", { { "VK_EXT_memory_priority", } } } } }, { "VK_KHR_maintenance4", { { "VK_VERSION_1_1", { {} } } } }, { "VK_ARM_shader_core_properties", { { "VK_VERSION_1_1", { {} } } } }, { "VK_ARM_scheduling_controls", { { "VK_VERSION_1_0", { { "VK_ARM_shader_core_builtins", } } } } }, { "VK_EXT_image_sliced_view_of_3d", { { "VK_VERSION_1_0", { { "VK_KHR_maintenance1", "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_VALVE_descriptor_set_host_mapping", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_EXT_depth_clamp_zero_one", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_EXT_non_seamless_cube_map", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_ARM_render_pass_striped", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { { "VK_KHR_synchronization2", } } }, { "VK_VERSION_1_3", { {} } } } }, { "VK_QCOM_fragment_density_map_offset", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { { "VK_EXT_fragment_density_map", } } } } }, { "VK_NV_copy_memory_indirect", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { { "VK_KHR_buffer_device_address", } } }, { "VK_VERSION_1_2", { {} } } } }, { "VK_NV_memory_decompression", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { { "VK_KHR_buffer_device_address", } } }, { "VK_VERSION_1_2", { {} } } } }, { "VK_NV_device_generated_commands_compute", { { "VK_VERSION_1_0", { { "VK_NV_device_generated_commands", } } } } }, { "VK_NV_ray_tracing_linear_swept_spheres", { { "VK_VERSION_1_0", { { "VK_KHR_ray_tracing_pipeline", } } } } }, { "VK_NV_linear_color_attachment", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_GOOGLE_surfaceless_query", { { "VK_VERSION_1_0", { { "VK_KHR_surface", } } } } }, { "VK_KHR_shader_maximal_reconvergence", { { "VK_VERSION_1_1", { {} } } } }, { "VK_EXT_image_compression_control_swapchain", { { "VK_VERSION_1_0", { { "VK_EXT_image_compression_control", } } } } }, { "VK_QCOM_image_processing", { { "VK_VERSION_1_0", { { "VK_KHR_format_feature_flags2", } } }, { "VK_VERSION_1_3", { {} } } } }, { "VK_EXT_nested_command_buffer", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_EXT_external_memory_acquire_unmodified", { { "VK_VERSION_1_0", { { "VK_KHR_external_memory", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_EXT_extended_dynamic_state3", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_EXT_subpass_merge_feedback", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_EXT_shader_module_identifier", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { { "VK_EXT_pipeline_creation_cache_control", } } }, { "VK_VERSION_1_3", { {} } } } }, { "VK_EXT_rasterization_order_attachment_access", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_NV_optical_flow", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { { "VK_KHR_format_feature_flags2", "VK_KHR_synchronization2", } } }, { "VK_VERSION_1_3", { {} } } } }, { "VK_EXT_legacy_dithering", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_EXT_pipeline_protected_access", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, #if defined( VK_USE_PLATFORM_ANDROID_KHR ) { "VK_ANDROID_external_format_resolve", { { "VK_VERSION_1_0", { { "VK_ANDROID_external_memory_android_hardware_buffer", } } } } }, #endif /*VK_USE_PLATFORM_ANDROID_KHR*/ { "VK_KHR_maintenance5", { { "VK_VERSION_1_1", { { "VK_KHR_dynamic_rendering", } } }, { "VK_VERSION_1_3", { {} } } } }, { "VK_KHR_ray_tracing_position_fetch", { { "VK_VERSION_1_0", { { "VK_KHR_acceleration_structure", } } } } }, { "VK_EXT_shader_object", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { { "VK_KHR_dynamic_rendering", } } }, { "VK_VERSION_1_3", { {} } } } }, { "VK_KHR_pipeline_binary", { { "VK_VERSION_1_0", { { "VK_KHR_maintenance5", } } } } }, { "VK_QCOM_tile_properties", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_SEC_amigo_profiling", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_QCOM_multiview_per_view_viewports", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_NV_ray_tracing_invocation_reorder", { { "VK_VERSION_1_0", { { "VK_KHR_ray_tracing_pipeline", } } } } }, { "VK_EXT_mutable_descriptor_type", { { "VK_VERSION_1_0", { { "VK_KHR_maintenance3", } } } } }, { "VK_EXT_legacy_vertex_attributes", { { "VK_VERSION_1_0", { { "VK_EXT_vertex_input_dynamic_state", } } } } }, { "VK_ARM_shader_core_builtins", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_EXT_pipeline_library_group_handles", { { "VK_VERSION_1_0", { { "VK_KHR_ray_tracing_pipeline", "VK_KHR_pipeline_library", } } } } }, { "VK_EXT_dynamic_rendering_unused_attachments", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { { "VK_KHR_dynamic_rendering", } } }, { "VK_VERSION_1_3", { {} } } } }, { "VK_NV_low_latency2", { { "VK_VERSION_1_0", { { "VK_KHR_timeline_semaphore", } } }, { "VK_VERSION_1_2", { {} } } } }, { "VK_KHR_cooperative_matrix", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_KHR_compute_shader_derivatives", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } } } }, { "VK_KHR_video_decode_av1", { { "VK_VERSION_1_0", { { "VK_KHR_video_decode_queue", } } } } }, { "VK_KHR_video_encode_av1", { { "VK_VERSION_1_0", { { "VK_KHR_video_encode_queue", } } } } }, { "VK_KHR_video_maintenance1", { { "VK_VERSION_1_0", { { "VK_KHR_video_queue", } } } } }, { "VK_NV_per_stage_descriptor_set", { { "VK_VERSION_1_0", { { "VK_KHR_maintenance6", } } }, { "VK_VERSION_1_4", { {} } } } }, { "VK_QCOM_image_processing2", { { "VK_VERSION_1_0", { { "VK_QCOM_image_processing", } } } } }, { "VK_QCOM_filter_cubic_weights", { { "VK_VERSION_1_0", { { "VK_EXT_filter_cubic", } } } } }, { "VK_QCOM_filter_cubic_clamp", { { "VK_VERSION_1_0", { { "VK_EXT_filter_cubic", "VK_EXT_sampler_filter_minmax", } } }, { "VK_VERSION_1_2", { { "VK_EXT_filter_cubic", } } } } }, { "VK_EXT_attachment_feedback_loop_dynamic_state", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { { "VK_EXT_attachment_feedback_loop_layout", } } } } }, { "VK_KHR_vertex_attribute_divisor", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_KHR_shader_float_controls2", { { "VK_VERSION_1_1", { { "VK_KHR_shader_float_controls", } } } } }, #if defined( VK_USE_PLATFORM_SCREEN_QNX ) { "VK_QNX_external_memory_screen_buffer", { { "VK_VERSION_1_0", { { "VK_KHR_sampler_ycbcr_conversion", "VK_KHR_external_memory", "VK_KHR_dedicated_allocation", } } }, { "VK_VERSION_1_1", { { "VK_EXT_queue_family_foreign", } } } } }, #endif /*VK_USE_PLATFORM_SCREEN_QNX*/ { "VK_MSFT_layered_driver", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_KHR_index_type_uint8", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_KHR_line_rasterization", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_KHR_calibrated_timestamps", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_KHR_shader_expect_assume", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_KHR_maintenance6", { { "VK_VERSION_1_1", { {} } } } }, { "VK_NV_descriptor_pool_overallocation", { { "VK_VERSION_1_1", { {} } } } }, { "VK_NV_display_stereo", { { "VK_VERSION_1_0", { { "VK_KHR_display", "VK_KHR_get_display_properties2", } } } } }, { "VK_KHR_video_encode_quantization_map", { { "VK_VERSION_1_0", { { "VK_KHR_video_encode_queue", "VK_KHR_format_feature_flags2", } } } } }, { "VK_KHR_maintenance7", { { "VK_VERSION_1_1", { {} } } } }, { "VK_NV_cluster_acceleration_structure", { { "VK_VERSION_1_0", { { "VK_KHR_acceleration_structure", } } } } }, { "VK_NV_partitioned_acceleration_structure", { { "VK_VERSION_1_0", { { "VK_KHR_acceleration_structure", } } } } }, { "VK_EXT_device_generated_commands", { { "VK_VERSION_1_0", { { "VK_KHR_buffer_device_address", "VK_KHR_maintenance5", } } } } }, { "VK_KHR_maintenance8", { { "VK_VERSION_1_1", { {} } } } }, { "VK_MESA_image_alignment_control", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_EXT_depth_clamp_control", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_KHR_video_maintenance2", { { "VK_VERSION_1_0", { { "VK_KHR_video_decode_queue", "VK_KHR_video_encode_queue", } } } } }, { "VK_HUAWEI_hdr_vivid", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { { "VK_KHR_swapchain", "VK_EXT_hdr_metadata", } } } } }, { "VK_NV_cooperative_matrix2", { { "VK_VERSION_1_0", { { "VK_KHR_cooperative_matrix", } } } } }, { "VK_ARM_pipeline_opacity_micromap", { { "VK_VERSION_1_0", { { "VK_EXT_opacity_micromap", } } } } }, #if defined( VK_USE_PLATFORM_METAL_EXT ) { "VK_EXT_external_memory_metal", { { "VK_VERSION_1_0", { { "VK_KHR_external_memory", } } }, { "VK_VERSION_1_1", { {} } } } }, #endif /*VK_USE_PLATFORM_METAL_EXT*/ { "VK_KHR_depth_clamp_zero_one", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } }, { "VK_EXT_vertex_attribute_robustness", { { "VK_VERSION_1_0", { { "VK_KHR_get_physical_device_properties2", } } }, { "VK_VERSION_1_1", { {} } } } } }; auto depIt = dependencies.find( extension ); return ( depIt != dependencies.end() ) ? depIt->second : noDependencies; } VULKAN_HPP_INLINE std::pair> const &> getExtensionDepends( std::string const & version, std::string const & extension ) { #if !defined( NDEBUG ) static std::set versions = { "VK_VERSION_1_0", "VK_VERSION_1_1", "VK_VERSION_1_2", "VK_VERSION_1_3", "VK_VERSION_1_4" }; assert( versions.find( version ) != versions.end() ); #endif static std::vector> noDependencies; std::map>> const & dependencies = getExtensionDepends( extension ); if ( dependencies.empty() ) { return { true, noDependencies }; } auto depIt = dependencies.lower_bound( version ); if ( ( depIt == dependencies.end() ) || ( depIt->first != version ) ) { depIt = std::prev( depIt ); } if ( depIt == dependencies.end() ) { return { false, noDependencies }; } else { return { true, depIt->second }; } } VULKAN_HPP_INLINE std::map const & getObsoletedExtensions() { static const std::map obsoletedExtensions = { { "VK_AMD_negative_viewport_height", "VK_KHR_maintenance1" } }; return obsoletedExtensions; } VULKAN_HPP_INLINE std::map const & getPromotedExtensions() { static const std::map promotedExtensions = { { "VK_KHR_sampler_mirror_clamp_to_edge", "VK_VERSION_1_2" }, { "VK_EXT_debug_marker", "VK_EXT_debug_utils" }, { "VK_AMD_draw_indirect_count", "VK_KHR_draw_indirect_count" }, { "VK_KHR_dynamic_rendering", "VK_VERSION_1_3" }, { "VK_KHR_multiview", "VK_VERSION_1_1" }, #if defined( VK_USE_PLATFORM_WIN32_KHR ) { "VK_NV_win32_keyed_mutex", "VK_KHR_win32_keyed_mutex" }, #endif /*VK_USE_PLATFORM_WIN32_KHR*/ { "VK_KHR_get_physical_device_properties2", "VK_VERSION_1_1" }, { "VK_KHR_device_group", "VK_VERSION_1_1" }, { "VK_KHR_shader_draw_parameters", "VK_VERSION_1_1" }, { "VK_EXT_texture_compression_astc_hdr", "VK_VERSION_1_3" }, { "VK_EXT_pipeline_robustness", "VK_VERSION_1_4" }, { "VK_KHR_maintenance1", "VK_VERSION_1_1" }, { "VK_KHR_device_group_creation", "VK_VERSION_1_1" }, { "VK_KHR_external_memory_capabilities", "VK_VERSION_1_1" }, { "VK_KHR_external_memory", "VK_VERSION_1_1" }, { "VK_KHR_external_semaphore_capabilities", "VK_VERSION_1_1" }, { "VK_KHR_external_semaphore", "VK_VERSION_1_1" }, { "VK_KHR_push_descriptor", "VK_VERSION_1_4" }, { "VK_KHR_shader_float16_int8", "VK_VERSION_1_2" }, { "VK_KHR_16bit_storage", "VK_VERSION_1_1" }, { "VK_KHR_descriptor_update_template", "VK_VERSION_1_1" }, { "VK_KHR_imageless_framebuffer", "VK_VERSION_1_2" }, { "VK_KHR_create_renderpass2", "VK_VERSION_1_2" }, { "VK_KHR_external_fence_capabilities", "VK_VERSION_1_1" }, { "VK_KHR_external_fence", "VK_VERSION_1_1" }, { "VK_KHR_maintenance2", "VK_VERSION_1_1" }, { "VK_KHR_variable_pointers", "VK_VERSION_1_1" }, { "VK_KHR_dedicated_allocation", "VK_VERSION_1_1" }, { "VK_EXT_sampler_filter_minmax", "VK_VERSION_1_2" }, { "VK_KHR_storage_buffer_storage_class", "VK_VERSION_1_1" }, { "VK_EXT_inline_uniform_block", "VK_VERSION_1_3" }, { "VK_KHR_relaxed_block_layout", "VK_VERSION_1_1" }, { "VK_KHR_get_memory_requirements2", "VK_VERSION_1_1" }, { "VK_KHR_image_format_list", "VK_VERSION_1_2" }, { "VK_KHR_sampler_ycbcr_conversion", "VK_VERSION_1_1" }, { "VK_KHR_bind_memory2", "VK_VERSION_1_1" }, { "VK_EXT_descriptor_indexing", "VK_VERSION_1_2" }, { "VK_EXT_shader_viewport_index_layer", "VK_VERSION_1_2" }, { "VK_KHR_maintenance3", "VK_VERSION_1_1" }, { "VK_KHR_draw_indirect_count", "VK_VERSION_1_2" }, { "VK_EXT_global_priority", "VK_KHR_global_priority" }, { "VK_KHR_shader_subgroup_extended_types", "VK_VERSION_1_2" }, { "VK_KHR_8bit_storage", "VK_VERSION_1_2" }, { "VK_KHR_shader_atomic_int64", "VK_VERSION_1_2" }, { "VK_EXT_calibrated_timestamps", "VK_KHR_calibrated_timestamps" }, { "VK_KHR_global_priority", "VK_VERSION_1_4" }, { "VK_EXT_vertex_attribute_divisor", "VK_KHR_vertex_attribute_divisor" }, { "VK_EXT_pipeline_creation_feedback", "VK_VERSION_1_3" }, { "VK_KHR_driver_properties", "VK_VERSION_1_2" }, { "VK_KHR_shader_float_controls", "VK_VERSION_1_2" }, { "VK_KHR_depth_stencil_resolve", "VK_VERSION_1_2" }, { "VK_NV_compute_shader_derivatives", "VK_KHR_compute_shader_derivatives" }, { "VK_NV_fragment_shader_barycentric", "VK_KHR_fragment_shader_barycentric" }, { "VK_KHR_timeline_semaphore", "VK_VERSION_1_2" }, { "VK_KHR_vulkan_memory_model", "VK_VERSION_1_2" }, { "VK_KHR_shader_terminate_invocation", "VK_VERSION_1_3" }, { "VK_EXT_scalar_block_layout", "VK_VERSION_1_2" }, { "VK_EXT_subgroup_size_control", "VK_VERSION_1_3" }, { "VK_KHR_dynamic_rendering_local_read", "VK_VERSION_1_4" }, { "VK_KHR_spirv_1_4", "VK_VERSION_1_2" }, { "VK_KHR_separate_depth_stencil_layouts", "VK_VERSION_1_2" }, { "VK_EXT_tooling_info", "VK_VERSION_1_3" }, { "VK_EXT_separate_stencil_usage", "VK_VERSION_1_2" }, { "VK_KHR_uniform_buffer_standard_layout", "VK_VERSION_1_2" }, { "VK_KHR_buffer_device_address", "VK_VERSION_1_2" }, { "VK_EXT_line_rasterization", "VK_KHR_line_rasterization" }, { "VK_EXT_host_query_reset", "VK_VERSION_1_2" }, { "VK_EXT_index_type_uint8", "VK_KHR_index_type_uint8" }, { "VK_EXT_extended_dynamic_state", "VK_VERSION_1_3" }, { "VK_EXT_host_image_copy", "VK_VERSION_1_4" }, { "VK_KHR_map_memory2", "VK_VERSION_1_4" }, { "VK_EXT_shader_demote_to_helper_invocation", "VK_VERSION_1_3" }, { "VK_KHR_shader_integer_dot_product", "VK_VERSION_1_3" }, { "VK_EXT_texel_buffer_alignment", "VK_VERSION_1_3" }, { "VK_KHR_shader_non_semantic_info", "VK_VERSION_1_3" }, { "VK_EXT_private_data", "VK_VERSION_1_3" }, { "VK_EXT_pipeline_creation_cache_control", "VK_VERSION_1_3" }, { "VK_KHR_synchronization2", "VK_VERSION_1_3" }, { "VK_KHR_zero_initialize_workgroup_memory", "VK_VERSION_1_3" }, { "VK_EXT_ycbcr_2plane_444_formats", "VK_VERSION_1_3" }, { "VK_EXT_image_robustness", "VK_VERSION_1_3" }, { "VK_KHR_copy_commands2", "VK_VERSION_1_3" }, { "VK_EXT_4444_formats", "VK_VERSION_1_3" }, { "VK_ARM_rasterization_order_attachment_access", "VK_EXT_rasterization_order_attachment_access" }, { "VK_VALVE_mutable_descriptor_type", "VK_EXT_mutable_descriptor_type" }, { "VK_KHR_format_feature_flags2", "VK_VERSION_1_3" }, { "VK_EXT_extended_dynamic_state2", "VK_VERSION_1_3" }, { "VK_EXT_global_priority_query", "VK_KHR_global_priority" }, { "VK_EXT_load_store_op_none", "VK_KHR_load_store_op_none" }, { "VK_KHR_maintenance4", "VK_VERSION_1_3" }, { "VK_KHR_shader_subgroup_rotate", "VK_VERSION_1_4" }, { "VK_EXT_depth_clamp_zero_one", "VK_KHR_depth_clamp_zero_one" }, { "VK_EXT_pipeline_protected_access", "VK_VERSION_1_4" }, { "VK_KHR_maintenance5", "VK_VERSION_1_4" }, { "VK_KHR_vertex_attribute_divisor", "VK_VERSION_1_4" }, { "VK_KHR_load_store_op_none", "VK_VERSION_1_4" }, { "VK_KHR_shader_float_controls2", "VK_VERSION_1_4" }, { "VK_KHR_index_type_uint8", "VK_VERSION_1_4" }, { "VK_KHR_line_rasterization", "VK_VERSION_1_4" }, { "VK_KHR_shader_expect_assume", "VK_VERSION_1_4" }, { "VK_KHR_maintenance6", "VK_VERSION_1_4" } }; return promotedExtensions; } VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR_20 std::string getExtensionDeprecatedBy( std::string const & extension ) { if ( extension == "VK_EXT_debug_report" ) { return "VK_EXT_debug_utils"; } if ( extension == "VK_NV_glsl_shader" ) { return ""; } if ( extension == "VK_NV_dedicated_allocation" ) { return "VK_KHR_dedicated_allocation"; } if ( extension == "VK_AMD_gpu_shader_half_float" ) { return "VK_KHR_shader_float16_int8"; } if ( extension == "VK_IMG_format_pvrtc" ) { return ""; } if ( extension == "VK_NV_external_memory_capabilities" ) { return "VK_KHR_external_memory_capabilities"; } if ( extension == "VK_NV_external_memory" ) { return "VK_KHR_external_memory"; } #if defined( VK_USE_PLATFORM_WIN32_KHR ) if ( extension == "VK_NV_external_memory_win32" ) { return "VK_KHR_external_memory_win32"; } #endif /*VK_USE_PLATFORM_WIN32_KHR*/ if ( extension == "VK_EXT_validation_flags" ) { return "VK_EXT_layer_settings"; } if ( extension == "VK_EXT_shader_subgroup_ballot" ) { return "VK_VERSION_1_2"; } if ( extension == "VK_EXT_shader_subgroup_vote" ) { return "VK_VERSION_1_1"; } #if defined( VK_USE_PLATFORM_IOS_MVK ) if ( extension == "VK_MVK_ios_surface" ) { return "VK_EXT_metal_surface"; } #endif /*VK_USE_PLATFORM_IOS_MVK*/ #if defined( VK_USE_PLATFORM_MACOS_MVK ) if ( extension == "VK_MVK_macos_surface" ) { return "VK_EXT_metal_surface"; } #endif /*VK_USE_PLATFORM_MACOS_MVK*/ if ( extension == "VK_AMD_gpu_shader_int16" ) { return "VK_KHR_shader_float16_int8"; } if ( extension == "VK_NV_ray_tracing" ) { return "VK_KHR_ray_tracing_pipeline"; } if ( extension == "VK_EXT_buffer_device_address" ) { return "VK_KHR_buffer_device_address"; } if ( extension == "VK_EXT_validation_features" ) { return "VK_EXT_layer_settings"; } return ""; } VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR_20 std::string getExtensionObsoletedBy( std::string const & extension ) { if ( extension == "VK_AMD_negative_viewport_height" ) { return "VK_KHR_maintenance1"; } return ""; } VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR_20 std::string getExtensionPromotedTo( std::string const & extension ) { if ( extension == "VK_KHR_sampler_mirror_clamp_to_edge" ) { return "VK_VERSION_1_2"; } if ( extension == "VK_EXT_debug_marker" ) { return "VK_EXT_debug_utils"; } if ( extension == "VK_AMD_draw_indirect_count" ) { return "VK_KHR_draw_indirect_count"; } if ( extension == "VK_KHR_dynamic_rendering" ) { return "VK_VERSION_1_3"; } if ( extension == "VK_KHR_multiview" ) { return "VK_VERSION_1_1"; } #if defined( VK_USE_PLATFORM_WIN32_KHR ) if ( extension == "VK_NV_win32_keyed_mutex" ) { return "VK_KHR_win32_keyed_mutex"; } #endif /*VK_USE_PLATFORM_WIN32_KHR*/ if ( extension == "VK_KHR_get_physical_device_properties2" ) { return "VK_VERSION_1_1"; } if ( extension == "VK_KHR_device_group" ) { return "VK_VERSION_1_1"; } if ( extension == "VK_KHR_shader_draw_parameters" ) { return "VK_VERSION_1_1"; } if ( extension == "VK_EXT_texture_compression_astc_hdr" ) { return "VK_VERSION_1_3"; } if ( extension == "VK_EXT_pipeline_robustness" ) { return "VK_VERSION_1_4"; } if ( extension == "VK_KHR_maintenance1" ) { return "VK_VERSION_1_1"; } if ( extension == "VK_KHR_device_group_creation" ) { return "VK_VERSION_1_1"; } if ( extension == "VK_KHR_external_memory_capabilities" ) { return "VK_VERSION_1_1"; } if ( extension == "VK_KHR_external_memory" ) { return "VK_VERSION_1_1"; } if ( extension == "VK_KHR_external_semaphore_capabilities" ) { return "VK_VERSION_1_1"; } if ( extension == "VK_KHR_external_semaphore" ) { return "VK_VERSION_1_1"; } if ( extension == "VK_KHR_push_descriptor" ) { return "VK_VERSION_1_4"; } if ( extension == "VK_KHR_shader_float16_int8" ) { return "VK_VERSION_1_2"; } if ( extension == "VK_KHR_16bit_storage" ) { return "VK_VERSION_1_1"; } if ( extension == "VK_KHR_descriptor_update_template" ) { return "VK_VERSION_1_1"; } if ( extension == "VK_KHR_imageless_framebuffer" ) { return "VK_VERSION_1_2"; } if ( extension == "VK_KHR_create_renderpass2" ) { return "VK_VERSION_1_2"; } if ( extension == "VK_KHR_external_fence_capabilities" ) { return "VK_VERSION_1_1"; } if ( extension == "VK_KHR_external_fence" ) { return "VK_VERSION_1_1"; } if ( extension == "VK_KHR_maintenance2" ) { return "VK_VERSION_1_1"; } if ( extension == "VK_KHR_variable_pointers" ) { return "VK_VERSION_1_1"; } if ( extension == "VK_KHR_dedicated_allocation" ) { return "VK_VERSION_1_1"; } if ( extension == "VK_EXT_sampler_filter_minmax" ) { return "VK_VERSION_1_2"; } if ( extension == "VK_KHR_storage_buffer_storage_class" ) { return "VK_VERSION_1_1"; } if ( extension == "VK_EXT_inline_uniform_block" ) { return "VK_VERSION_1_3"; } if ( extension == "VK_KHR_relaxed_block_layout" ) { return "VK_VERSION_1_1"; } if ( extension == "VK_KHR_get_memory_requirements2" ) { return "VK_VERSION_1_1"; } if ( extension == "VK_KHR_image_format_list" ) { return "VK_VERSION_1_2"; } if ( extension == "VK_KHR_sampler_ycbcr_conversion" ) { return "VK_VERSION_1_1"; } if ( extension == "VK_KHR_bind_memory2" ) { return "VK_VERSION_1_1"; } if ( extension == "VK_EXT_descriptor_indexing" ) { return "VK_VERSION_1_2"; } if ( extension == "VK_EXT_shader_viewport_index_layer" ) { return "VK_VERSION_1_2"; } if ( extension == "VK_KHR_maintenance3" ) { return "VK_VERSION_1_1"; } if ( extension == "VK_KHR_draw_indirect_count" ) { return "VK_VERSION_1_2"; } if ( extension == "VK_EXT_global_priority" ) { return "VK_KHR_global_priority"; } if ( extension == "VK_KHR_shader_subgroup_extended_types" ) { return "VK_VERSION_1_2"; } if ( extension == "VK_KHR_8bit_storage" ) { return "VK_VERSION_1_2"; } if ( extension == "VK_KHR_shader_atomic_int64" ) { return "VK_VERSION_1_2"; } if ( extension == "VK_EXT_calibrated_timestamps" ) { return "VK_KHR_calibrated_timestamps"; } if ( extension == "VK_KHR_global_priority" ) { return "VK_VERSION_1_4"; } if ( extension == "VK_EXT_vertex_attribute_divisor" ) { return "VK_KHR_vertex_attribute_divisor"; } if ( extension == "VK_EXT_pipeline_creation_feedback" ) { return "VK_VERSION_1_3"; } if ( extension == "VK_KHR_driver_properties" ) { return "VK_VERSION_1_2"; } if ( extension == "VK_KHR_shader_float_controls" ) { return "VK_VERSION_1_2"; } if ( extension == "VK_KHR_depth_stencil_resolve" ) { return "VK_VERSION_1_2"; } if ( extension == "VK_NV_compute_shader_derivatives" ) { return "VK_KHR_compute_shader_derivatives"; } if ( extension == "VK_NV_fragment_shader_barycentric" ) { return "VK_KHR_fragment_shader_barycentric"; } if ( extension == "VK_KHR_timeline_semaphore" ) { return "VK_VERSION_1_2"; } if ( extension == "VK_KHR_vulkan_memory_model" ) { return "VK_VERSION_1_2"; } if ( extension == "VK_KHR_shader_terminate_invocation" ) { return "VK_VERSION_1_3"; } if ( extension == "VK_EXT_scalar_block_layout" ) { return "VK_VERSION_1_2"; } if ( extension == "VK_EXT_subgroup_size_control" ) { return "VK_VERSION_1_3"; } if ( extension == "VK_KHR_dynamic_rendering_local_read" ) { return "VK_VERSION_1_4"; } if ( extension == "VK_KHR_spirv_1_4" ) { return "VK_VERSION_1_2"; } if ( extension == "VK_KHR_separate_depth_stencil_layouts" ) { return "VK_VERSION_1_2"; } if ( extension == "VK_EXT_tooling_info" ) { return "VK_VERSION_1_3"; } if ( extension == "VK_EXT_separate_stencil_usage" ) { return "VK_VERSION_1_2"; } if ( extension == "VK_KHR_uniform_buffer_standard_layout" ) { return "VK_VERSION_1_2"; } if ( extension == "VK_KHR_buffer_device_address" ) { return "VK_VERSION_1_2"; } if ( extension == "VK_EXT_line_rasterization" ) { return "VK_KHR_line_rasterization"; } if ( extension == "VK_EXT_host_query_reset" ) { return "VK_VERSION_1_2"; } if ( extension == "VK_EXT_index_type_uint8" ) { return "VK_KHR_index_type_uint8"; } if ( extension == "VK_EXT_extended_dynamic_state" ) { return "VK_VERSION_1_3"; } if ( extension == "VK_EXT_host_image_copy" ) { return "VK_VERSION_1_4"; } if ( extension == "VK_KHR_map_memory2" ) { return "VK_VERSION_1_4"; } if ( extension == "VK_EXT_shader_demote_to_helper_invocation" ) { return "VK_VERSION_1_3"; } if ( extension == "VK_KHR_shader_integer_dot_product" ) { return "VK_VERSION_1_3"; } if ( extension == "VK_EXT_texel_buffer_alignment" ) { return "VK_VERSION_1_3"; } if ( extension == "VK_KHR_shader_non_semantic_info" ) { return "VK_VERSION_1_3"; } if ( extension == "VK_EXT_private_data" ) { return "VK_VERSION_1_3"; } if ( extension == "VK_EXT_pipeline_creation_cache_control" ) { return "VK_VERSION_1_3"; } if ( extension == "VK_KHR_synchronization2" ) { return "VK_VERSION_1_3"; } if ( extension == "VK_KHR_zero_initialize_workgroup_memory" ) { return "VK_VERSION_1_3"; } if ( extension == "VK_EXT_ycbcr_2plane_444_formats" ) { return "VK_VERSION_1_3"; } if ( extension == "VK_EXT_image_robustness" ) { return "VK_VERSION_1_3"; } if ( extension == "VK_KHR_copy_commands2" ) { return "VK_VERSION_1_3"; } if ( extension == "VK_EXT_4444_formats" ) { return "VK_VERSION_1_3"; } if ( extension == "VK_ARM_rasterization_order_attachment_access" ) { return "VK_EXT_rasterization_order_attachment_access"; } if ( extension == "VK_VALVE_mutable_descriptor_type" ) { return "VK_EXT_mutable_descriptor_type"; } if ( extension == "VK_KHR_format_feature_flags2" ) { return "VK_VERSION_1_3"; } if ( extension == "VK_EXT_extended_dynamic_state2" ) { return "VK_VERSION_1_3"; } if ( extension == "VK_EXT_global_priority_query" ) { return "VK_KHR_global_priority"; } if ( extension == "VK_EXT_load_store_op_none" ) { return "VK_KHR_load_store_op_none"; } if ( extension == "VK_KHR_maintenance4" ) { return "VK_VERSION_1_3"; } if ( extension == "VK_KHR_shader_subgroup_rotate" ) { return "VK_VERSION_1_4"; } if ( extension == "VK_EXT_depth_clamp_zero_one" ) { return "VK_KHR_depth_clamp_zero_one"; } if ( extension == "VK_EXT_pipeline_protected_access" ) { return "VK_VERSION_1_4"; } if ( extension == "VK_KHR_maintenance5" ) { return "VK_VERSION_1_4"; } if ( extension == "VK_KHR_vertex_attribute_divisor" ) { return "VK_VERSION_1_4"; } if ( extension == "VK_KHR_load_store_op_none" ) { return "VK_VERSION_1_4"; } if ( extension == "VK_KHR_shader_float_controls2" ) { return "VK_VERSION_1_4"; } if ( extension == "VK_KHR_index_type_uint8" ) { return "VK_VERSION_1_4"; } if ( extension == "VK_KHR_line_rasterization" ) { return "VK_VERSION_1_4"; } if ( extension == "VK_KHR_shader_expect_assume" ) { return "VK_VERSION_1_4"; } if ( extension == "VK_KHR_maintenance6" ) { return "VK_VERSION_1_4"; } return ""; } VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR_20 bool isDeprecatedExtension( std::string const & extension ) { return ( extension == "VK_EXT_debug_report" ) || ( extension == "VK_NV_glsl_shader" ) || ( extension == "VK_NV_dedicated_allocation" ) || ( extension == "VK_AMD_gpu_shader_half_float" ) || ( extension == "VK_IMG_format_pvrtc" ) || ( extension == "VK_NV_external_memory_capabilities" ) || ( extension == "VK_NV_external_memory" ) || #if defined( VK_USE_PLATFORM_WIN32_KHR ) ( extension == "VK_NV_external_memory_win32" ) || #endif /*VK_USE_PLATFORM_WIN32_KHR*/ ( extension == "VK_EXT_validation_flags" ) || ( extension == "VK_EXT_shader_subgroup_ballot" ) || ( extension == "VK_EXT_shader_subgroup_vote" ) || #if defined( VK_USE_PLATFORM_IOS_MVK ) ( extension == "VK_MVK_ios_surface" ) || #endif /*VK_USE_PLATFORM_IOS_MVK*/ #if defined( VK_USE_PLATFORM_MACOS_MVK ) ( extension == "VK_MVK_macos_surface" ) || #endif /*VK_USE_PLATFORM_MACOS_MVK*/ ( extension == "VK_AMD_gpu_shader_int16" ) || ( extension == "VK_NV_ray_tracing" ) || ( extension == "VK_EXT_buffer_device_address" ) || ( extension == "VK_EXT_validation_features" ); } VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR_20 bool isDeviceExtension( std::string const & extension ) { return ( extension == "VK_KHR_swapchain" ) || ( extension == "VK_KHR_display_swapchain" ) || ( extension == "VK_NV_glsl_shader" ) || ( extension == "VK_EXT_depth_range_unrestricted" ) || ( extension == "VK_KHR_sampler_mirror_clamp_to_edge" ) || ( extension == "VK_IMG_filter_cubic" ) || ( extension == "VK_AMD_rasterization_order" ) || ( extension == "VK_AMD_shader_trinary_minmax" ) || ( extension == "VK_AMD_shader_explicit_vertex_parameter" ) || ( extension == "VK_EXT_debug_marker" ) || ( extension == "VK_KHR_video_queue" ) || ( extension == "VK_KHR_video_decode_queue" ) || ( extension == "VK_AMD_gcn_shader" ) || ( extension == "VK_NV_dedicated_allocation" ) || ( extension == "VK_EXT_transform_feedback" ) || ( extension == "VK_NVX_binary_import" ) || ( extension == "VK_NVX_image_view_handle" ) || ( extension == "VK_AMD_draw_indirect_count" ) || ( extension == "VK_AMD_negative_viewport_height" ) || ( extension == "VK_AMD_gpu_shader_half_float" ) || ( extension == "VK_AMD_shader_ballot" ) || ( extension == "VK_KHR_video_encode_h264" ) || ( extension == "VK_KHR_video_encode_h265" ) || ( extension == "VK_KHR_video_decode_h264" ) || ( extension == "VK_AMD_texture_gather_bias_lod" ) || ( extension == "VK_AMD_shader_info" ) || ( extension == "VK_KHR_dynamic_rendering" ) || ( extension == "VK_AMD_shader_image_load_store_lod" ) || ( extension == "VK_NV_corner_sampled_image" ) || ( extension == "VK_KHR_multiview" ) || ( extension == "VK_IMG_format_pvrtc" ) || ( extension == "VK_NV_external_memory" ) #if defined( VK_USE_PLATFORM_WIN32_KHR ) || ( extension == "VK_NV_external_memory_win32" ) || ( extension == "VK_NV_win32_keyed_mutex" ) #endif /*VK_USE_PLATFORM_WIN32_KHR*/ || ( extension == "VK_KHR_device_group" ) || ( extension == "VK_KHR_shader_draw_parameters" ) || ( extension == "VK_EXT_shader_subgroup_ballot" ) || ( extension == "VK_EXT_shader_subgroup_vote" ) || ( extension == "VK_EXT_texture_compression_astc_hdr" ) || ( extension == "VK_EXT_astc_decode_mode" ) || ( extension == "VK_EXT_pipeline_robustness" ) || ( extension == "VK_KHR_maintenance1" ) || ( extension == "VK_KHR_external_memory" ) #if defined( VK_USE_PLATFORM_WIN32_KHR ) || ( extension == "VK_KHR_external_memory_win32" ) #endif /*VK_USE_PLATFORM_WIN32_KHR*/ || ( extension == "VK_KHR_external_memory_fd" ) #if defined( VK_USE_PLATFORM_WIN32_KHR ) || ( extension == "VK_KHR_win32_keyed_mutex" ) #endif /*VK_USE_PLATFORM_WIN32_KHR*/ || ( extension == "VK_KHR_external_semaphore" ) #if defined( VK_USE_PLATFORM_WIN32_KHR ) || ( extension == "VK_KHR_external_semaphore_win32" ) #endif /*VK_USE_PLATFORM_WIN32_KHR*/ || ( extension == "VK_KHR_external_semaphore_fd" ) || ( extension == "VK_KHR_push_descriptor" ) || ( extension == "VK_EXT_conditional_rendering" ) || ( extension == "VK_KHR_shader_float16_int8" ) || ( extension == "VK_KHR_16bit_storage" ) || ( extension == "VK_KHR_incremental_present" ) || ( extension == "VK_KHR_descriptor_update_template" ) || ( extension == "VK_NV_clip_space_w_scaling" ) || ( extension == "VK_EXT_display_control" ) || ( extension == "VK_GOOGLE_display_timing" ) || ( extension == "VK_NV_sample_mask_override_coverage" ) || ( extension == "VK_NV_geometry_shader_passthrough" ) || ( extension == "VK_NV_viewport_array2" ) || ( extension == "VK_NVX_multiview_per_view_attributes" ) || ( extension == "VK_NV_viewport_swizzle" ) || ( extension == "VK_EXT_discard_rectangles" ) || ( extension == "VK_EXT_conservative_rasterization" ) || ( extension == "VK_EXT_depth_clip_enable" ) || ( extension == "VK_EXT_hdr_metadata" ) || ( extension == "VK_KHR_imageless_framebuffer" ) || ( extension == "VK_KHR_create_renderpass2" ) || ( extension == "VK_IMG_relaxed_line_rasterization" ) || ( extension == "VK_KHR_shared_presentable_image" ) || ( extension == "VK_KHR_external_fence" ) #if defined( VK_USE_PLATFORM_WIN32_KHR ) || ( extension == "VK_KHR_external_fence_win32" ) #endif /*VK_USE_PLATFORM_WIN32_KHR*/ || ( extension == "VK_KHR_external_fence_fd" ) || ( extension == "VK_KHR_performance_query" ) || ( extension == "VK_KHR_maintenance2" ) || ( extension == "VK_KHR_variable_pointers" ) || ( extension == "VK_EXT_external_memory_dma_buf" ) || ( extension == "VK_EXT_queue_family_foreign" ) || ( extension == "VK_KHR_dedicated_allocation" ) #if defined( VK_USE_PLATFORM_ANDROID_KHR ) || ( extension == "VK_ANDROID_external_memory_android_hardware_buffer" ) #endif /*VK_USE_PLATFORM_ANDROID_KHR*/ || ( extension == "VK_EXT_sampler_filter_minmax" ) || ( extension == "VK_KHR_storage_buffer_storage_class" ) || ( extension == "VK_AMD_gpu_shader_int16" ) #if defined( VK_ENABLE_BETA_EXTENSIONS ) || ( extension == "VK_AMDX_shader_enqueue" ) #endif /*VK_ENABLE_BETA_EXTENSIONS*/ || ( extension == "VK_AMD_mixed_attachment_samples" ) || ( extension == "VK_AMD_shader_fragment_mask" ) || ( extension == "VK_EXT_inline_uniform_block" ) || ( extension == "VK_EXT_shader_stencil_export" ) || ( extension == "VK_EXT_sample_locations" ) || ( extension == "VK_KHR_relaxed_block_layout" ) || ( extension == "VK_KHR_get_memory_requirements2" ) || ( extension == "VK_KHR_image_format_list" ) || ( extension == "VK_EXT_blend_operation_advanced" ) || ( extension == "VK_NV_fragment_coverage_to_color" ) || ( extension == "VK_KHR_acceleration_structure" ) || ( extension == "VK_KHR_ray_tracing_pipeline" ) || ( extension == "VK_KHR_ray_query" ) || ( extension == "VK_NV_framebuffer_mixed_samples" ) || ( extension == "VK_NV_fill_rectangle" ) || ( extension == "VK_NV_shader_sm_builtins" ) || ( extension == "VK_EXT_post_depth_coverage" ) || ( extension == "VK_KHR_sampler_ycbcr_conversion" ) || ( extension == "VK_KHR_bind_memory2" ) || ( extension == "VK_EXT_image_drm_format_modifier" ) || ( extension == "VK_EXT_validation_cache" ) || ( extension == "VK_EXT_descriptor_indexing" ) || ( extension == "VK_EXT_shader_viewport_index_layer" ) #if defined( VK_ENABLE_BETA_EXTENSIONS ) || ( extension == "VK_KHR_portability_subset" ) #endif /*VK_ENABLE_BETA_EXTENSIONS*/ || ( extension == "VK_NV_shading_rate_image" ) || ( extension == "VK_NV_ray_tracing" ) || ( extension == "VK_NV_representative_fragment_test" ) || ( extension == "VK_KHR_maintenance3" ) || ( extension == "VK_KHR_draw_indirect_count" ) || ( extension == "VK_EXT_filter_cubic" ) || ( extension == "VK_QCOM_render_pass_shader_resolve" ) || ( extension == "VK_EXT_global_priority" ) || ( extension == "VK_KHR_shader_subgroup_extended_types" ) || ( extension == "VK_KHR_8bit_storage" ) || ( extension == "VK_EXT_external_memory_host" ) || ( extension == "VK_AMD_buffer_marker" ) || ( extension == "VK_KHR_shader_atomic_int64" ) || ( extension == "VK_KHR_shader_clock" ) || ( extension == "VK_AMD_pipeline_compiler_control" ) || ( extension == "VK_EXT_calibrated_timestamps" ) || ( extension == "VK_AMD_shader_core_properties" ) || ( extension == "VK_KHR_video_decode_h265" ) || ( extension == "VK_KHR_global_priority" ) || ( extension == "VK_AMD_memory_overallocation_behavior" ) || ( extension == "VK_EXT_vertex_attribute_divisor" ) #if defined( VK_USE_PLATFORM_GGP ) || ( extension == "VK_GGP_frame_token" ) #endif /*VK_USE_PLATFORM_GGP*/ || ( extension == "VK_EXT_pipeline_creation_feedback" ) || ( extension == "VK_KHR_driver_properties" ) || ( extension == "VK_KHR_shader_float_controls" ) || ( extension == "VK_NV_shader_subgroup_partitioned" ) || ( extension == "VK_KHR_depth_stencil_resolve" ) || ( extension == "VK_KHR_swapchain_mutable_format" ) || ( extension == "VK_NV_compute_shader_derivatives" ) || ( extension == "VK_NV_mesh_shader" ) || ( extension == "VK_NV_fragment_shader_barycentric" ) || ( extension == "VK_NV_shader_image_footprint" ) || ( extension == "VK_NV_scissor_exclusive" ) || ( extension == "VK_NV_device_diagnostic_checkpoints" ) || ( extension == "VK_KHR_timeline_semaphore" ) || ( extension == "VK_INTEL_shader_integer_functions2" ) || ( extension == "VK_INTEL_performance_query" ) || ( extension == "VK_KHR_vulkan_memory_model" ) || ( extension == "VK_EXT_pci_bus_info" ) || ( extension == "VK_AMD_display_native_hdr" ) || ( extension == "VK_KHR_shader_terminate_invocation" ) || ( extension == "VK_EXT_fragment_density_map" ) || ( extension == "VK_EXT_scalar_block_layout" ) || ( extension == "VK_GOOGLE_hlsl_functionality1" ) || ( extension == "VK_GOOGLE_decorate_string" ) || ( extension == "VK_EXT_subgroup_size_control" ) || ( extension == "VK_KHR_fragment_shading_rate" ) || ( extension == "VK_AMD_shader_core_properties2" ) || ( extension == "VK_AMD_device_coherent_memory" ) || ( extension == "VK_KHR_dynamic_rendering_local_read" ) || ( extension == "VK_EXT_shader_image_atomic_int64" ) || ( extension == "VK_KHR_shader_quad_control" ) || ( extension == "VK_KHR_spirv_1_4" ) || ( extension == "VK_EXT_memory_budget" ) || ( extension == "VK_EXT_memory_priority" ) || ( extension == "VK_NV_dedicated_allocation_image_aliasing" ) || ( extension == "VK_KHR_separate_depth_stencil_layouts" ) || ( extension == "VK_EXT_buffer_device_address" ) || ( extension == "VK_EXT_tooling_info" ) || ( extension == "VK_EXT_separate_stencil_usage" ) || ( extension == "VK_KHR_present_wait" ) || ( extension == "VK_NV_cooperative_matrix" ) || ( extension == "VK_NV_coverage_reduction_mode" ) || ( extension == "VK_EXT_fragment_shader_interlock" ) || ( extension == "VK_EXT_ycbcr_image_arrays" ) || ( extension == "VK_KHR_uniform_buffer_standard_layout" ) || ( extension == "VK_EXT_provoking_vertex" ) #if defined( VK_USE_PLATFORM_WIN32_KHR ) || ( extension == "VK_EXT_full_screen_exclusive" ) #endif /*VK_USE_PLATFORM_WIN32_KHR*/ || ( extension == "VK_KHR_buffer_device_address" ) || ( extension == "VK_EXT_line_rasterization" ) || ( extension == "VK_EXT_shader_atomic_float" ) || ( extension == "VK_EXT_host_query_reset" ) || ( extension == "VK_EXT_index_type_uint8" ) || ( extension == "VK_EXT_extended_dynamic_state" ) || ( extension == "VK_KHR_deferred_host_operations" ) || ( extension == "VK_KHR_pipeline_executable_properties" ) || ( extension == "VK_EXT_host_image_copy" ) || ( extension == "VK_KHR_map_memory2" ) || ( extension == "VK_EXT_map_memory_placed" ) || ( extension == "VK_EXT_shader_atomic_float2" ) || ( extension == "VK_EXT_swapchain_maintenance1" ) || ( extension == "VK_EXT_shader_demote_to_helper_invocation" ) || ( extension == "VK_NV_device_generated_commands" ) || ( extension == "VK_NV_inherited_viewport_scissor" ) || ( extension == "VK_KHR_shader_integer_dot_product" ) || ( extension == "VK_EXT_texel_buffer_alignment" ) || ( extension == "VK_QCOM_render_pass_transform" ) || ( extension == "VK_EXT_depth_bias_control" ) || ( extension == "VK_EXT_device_memory_report" ) || ( extension == "VK_EXT_robustness2" ) || ( extension == "VK_EXT_custom_border_color" ) || ( extension == "VK_GOOGLE_user_type" ) || ( extension == "VK_KHR_pipeline_library" ) || ( extension == "VK_NV_present_barrier" ) || ( extension == "VK_KHR_shader_non_semantic_info" ) || ( extension == "VK_KHR_present_id" ) || ( extension == "VK_EXT_private_data" ) || ( extension == "VK_EXT_pipeline_creation_cache_control" ) || ( extension == "VK_KHR_video_encode_queue" ) || ( extension == "VK_NV_device_diagnostics_config" ) || ( extension == "VK_QCOM_render_pass_store_ops" ) #if defined( VK_ENABLE_BETA_EXTENSIONS ) || ( extension == "VK_NV_cuda_kernel_launch" ) #endif /*VK_ENABLE_BETA_EXTENSIONS*/ || ( extension == "VK_NV_low_latency" ) #if defined( VK_USE_PLATFORM_METAL_EXT ) || ( extension == "VK_EXT_metal_objects" ) #endif /*VK_USE_PLATFORM_METAL_EXT*/ || ( extension == "VK_KHR_synchronization2" ) || ( extension == "VK_EXT_descriptor_buffer" ) || ( extension == "VK_EXT_graphics_pipeline_library" ) || ( extension == "VK_AMD_shader_early_and_late_fragment_tests" ) || ( extension == "VK_KHR_fragment_shader_barycentric" ) || ( extension == "VK_KHR_shader_subgroup_uniform_control_flow" ) || ( extension == "VK_KHR_zero_initialize_workgroup_memory" ) || ( extension == "VK_NV_fragment_shading_rate_enums" ) || ( extension == "VK_NV_ray_tracing_motion_blur" ) || ( extension == "VK_EXT_mesh_shader" ) || ( extension == "VK_EXT_ycbcr_2plane_444_formats" ) || ( extension == "VK_EXT_fragment_density_map2" ) || ( extension == "VK_QCOM_rotated_copy_commands" ) || ( extension == "VK_EXT_image_robustness" ) || ( extension == "VK_KHR_workgroup_memory_explicit_layout" ) || ( extension == "VK_KHR_copy_commands2" ) || ( extension == "VK_EXT_image_compression_control" ) || ( extension == "VK_EXT_attachment_feedback_loop_layout" ) || ( extension == "VK_EXT_4444_formats" ) || ( extension == "VK_EXT_device_fault" ) || ( extension == "VK_ARM_rasterization_order_attachment_access" ) || ( extension == "VK_EXT_rgba10x6_formats" ) #if defined( VK_USE_PLATFORM_WIN32_KHR ) || ( extension == "VK_NV_acquire_winrt_display" ) #endif /*VK_USE_PLATFORM_WIN32_KHR*/ || ( extension == "VK_VALVE_mutable_descriptor_type" ) || ( extension == "VK_EXT_vertex_input_dynamic_state" ) || ( extension == "VK_EXT_physical_device_drm" ) || ( extension == "VK_EXT_device_address_binding_report" ) || ( extension == "VK_EXT_depth_clip_control" ) || ( extension == "VK_EXT_primitive_topology_list_restart" ) || ( extension == "VK_KHR_format_feature_flags2" ) || ( extension == "VK_EXT_present_mode_fifo_latest_ready" ) #if defined( VK_USE_PLATFORM_FUCHSIA ) || ( extension == "VK_FUCHSIA_external_memory" ) || ( extension == "VK_FUCHSIA_external_semaphore" ) || ( extension == "VK_FUCHSIA_buffer_collection" ) #endif /*VK_USE_PLATFORM_FUCHSIA*/ || ( extension == "VK_HUAWEI_subpass_shading" ) || ( extension == "VK_HUAWEI_invocation_mask" ) || ( extension == "VK_NV_external_memory_rdma" ) || ( extension == "VK_EXT_pipeline_properties" ) || ( extension == "VK_EXT_frame_boundary" ) || ( extension == "VK_EXT_multisampled_render_to_single_sampled" ) || ( extension == "VK_EXT_extended_dynamic_state2" ) || ( extension == "VK_EXT_color_write_enable" ) || ( extension == "VK_EXT_primitives_generated_query" ) || ( extension == "VK_KHR_ray_tracing_maintenance1" ) || ( extension == "VK_EXT_global_priority_query" ) || ( extension == "VK_EXT_image_view_min_lod" ) || ( extension == "VK_EXT_multi_draw" ) || ( extension == "VK_EXT_image_2d_view_of_3d" ) || ( extension == "VK_EXT_shader_tile_image" ) || ( extension == "VK_EXT_opacity_micromap" ) #if defined( VK_ENABLE_BETA_EXTENSIONS ) || ( extension == "VK_NV_displacement_micromap" ) #endif /*VK_ENABLE_BETA_EXTENSIONS*/ || ( extension == "VK_EXT_load_store_op_none" ) || ( extension == "VK_HUAWEI_cluster_culling_shader" ) || ( extension == "VK_EXT_border_color_swizzle" ) || ( extension == "VK_EXT_pageable_device_local_memory" ) || ( extension == "VK_KHR_maintenance4" ) || ( extension == "VK_ARM_shader_core_properties" ) || ( extension == "VK_KHR_shader_subgroup_rotate" ) || ( extension == "VK_ARM_scheduling_controls" ) || ( extension == "VK_EXT_image_sliced_view_of_3d" ) || ( extension == "VK_VALVE_descriptor_set_host_mapping" ) || ( extension == "VK_EXT_depth_clamp_zero_one" ) || ( extension == "VK_EXT_non_seamless_cube_map" ) || ( extension == "VK_ARM_render_pass_striped" ) || ( extension == "VK_QCOM_fragment_density_map_offset" ) || ( extension == "VK_NV_copy_memory_indirect" ) || ( extension == "VK_NV_memory_decompression" ) || ( extension == "VK_NV_device_generated_commands_compute" ) || ( extension == "VK_NV_ray_tracing_linear_swept_spheres" ) || ( extension == "VK_NV_linear_color_attachment" ) || ( extension == "VK_KHR_shader_maximal_reconvergence" ) || ( extension == "VK_EXT_image_compression_control_swapchain" ) || ( extension == "VK_QCOM_image_processing" ) || ( extension == "VK_EXT_nested_command_buffer" ) || ( extension == "VK_EXT_external_memory_acquire_unmodified" ) || ( extension == "VK_EXT_extended_dynamic_state3" ) || ( extension == "VK_EXT_subpass_merge_feedback" ) || ( extension == "VK_EXT_shader_module_identifier" ) || ( extension == "VK_EXT_rasterization_order_attachment_access" ) || ( extension == "VK_NV_optical_flow" ) || ( extension == "VK_EXT_legacy_dithering" ) || ( extension == "VK_EXT_pipeline_protected_access" ) #if defined( VK_USE_PLATFORM_ANDROID_KHR ) || ( extension == "VK_ANDROID_external_format_resolve" ) #endif /*VK_USE_PLATFORM_ANDROID_KHR*/ || ( extension == "VK_KHR_maintenance5" ) || ( extension == "VK_AMD_anti_lag" ) || ( extension == "VK_KHR_ray_tracing_position_fetch" ) || ( extension == "VK_EXT_shader_object" ) || ( extension == "VK_KHR_pipeline_binary" ) || ( extension == "VK_QCOM_tile_properties" ) || ( extension == "VK_SEC_amigo_profiling" ) || ( extension == "VK_QCOM_multiview_per_view_viewports" ) || ( extension == "VK_NV_ray_tracing_invocation_reorder" ) || ( extension == "VK_NV_cooperative_vector" ) || ( extension == "VK_NV_extended_sparse_address_space" ) || ( extension == "VK_EXT_mutable_descriptor_type" ) || ( extension == "VK_EXT_legacy_vertex_attributes" ) || ( extension == "VK_ARM_shader_core_builtins" ) || ( extension == "VK_EXT_pipeline_library_group_handles" ) || ( extension == "VK_EXT_dynamic_rendering_unused_attachments" ) || ( extension == "VK_NV_low_latency2" ) || ( extension == "VK_KHR_cooperative_matrix" ) || ( extension == "VK_QCOM_multiview_per_view_render_areas" ) || ( extension == "VK_KHR_compute_shader_derivatives" ) || ( extension == "VK_KHR_video_decode_av1" ) || ( extension == "VK_KHR_video_encode_av1" ) || ( extension == "VK_KHR_video_maintenance1" ) || ( extension == "VK_NV_per_stage_descriptor_set" ) || ( extension == "VK_QCOM_image_processing2" ) || ( extension == "VK_QCOM_filter_cubic_weights" ) || ( extension == "VK_QCOM_ycbcr_degamma" ) || ( extension == "VK_QCOM_filter_cubic_clamp" ) || ( extension == "VK_EXT_attachment_feedback_loop_dynamic_state" ) || ( extension == "VK_KHR_vertex_attribute_divisor" ) || ( extension == "VK_KHR_load_store_op_none" ) || ( extension == "VK_KHR_shader_float_controls2" ) #if defined( VK_USE_PLATFORM_SCREEN_QNX ) || ( extension == "VK_QNX_external_memory_screen_buffer" ) #endif /*VK_USE_PLATFORM_SCREEN_QNX*/ || ( extension == "VK_MSFT_layered_driver" ) || ( extension == "VK_KHR_index_type_uint8" ) || ( extension == "VK_KHR_line_rasterization" ) || ( extension == "VK_KHR_calibrated_timestamps" ) || ( extension == "VK_KHR_shader_expect_assume" ) || ( extension == "VK_KHR_maintenance6" ) || ( extension == "VK_NV_descriptor_pool_overallocation" ) || ( extension == "VK_KHR_video_encode_quantization_map" ) || ( extension == "VK_NV_raw_access_chains" ) || ( extension == "VK_KHR_shader_relaxed_extended_instruction" ) || ( extension == "VK_NV_command_buffer_inheritance" ) || ( extension == "VK_KHR_maintenance7" ) || ( extension == "VK_NV_shader_atomic_float16_vector" ) || ( extension == "VK_EXT_shader_replicated_composites" ) || ( extension == "VK_NV_ray_tracing_validation" ) || ( extension == "VK_NV_cluster_acceleration_structure" ) || ( extension == "VK_NV_partitioned_acceleration_structure" ) || ( extension == "VK_EXT_device_generated_commands" ) || ( extension == "VK_KHR_maintenance8" ) || ( extension == "VK_MESA_image_alignment_control" ) || ( extension == "VK_EXT_depth_clamp_control" ) || ( extension == "VK_KHR_video_maintenance2" ) || ( extension == "VK_HUAWEI_hdr_vivid" ) || ( extension == "VK_NV_cooperative_matrix2" ) || ( extension == "VK_ARM_pipeline_opacity_micromap" ) #if defined( VK_USE_PLATFORM_METAL_EXT ) || ( extension == "VK_EXT_external_memory_metal" ) #endif /*VK_USE_PLATFORM_METAL_EXT*/ || ( extension == "VK_KHR_depth_clamp_zero_one" ) || ( extension == "VK_EXT_vertex_attribute_robustness" ); } VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR_20 bool isInstanceExtension( std::string const & extension ) { return ( extension == "VK_KHR_surface" ) || ( extension == "VK_KHR_display" ) #if defined( VK_USE_PLATFORM_XLIB_KHR ) || ( extension == "VK_KHR_xlib_surface" ) #endif /*VK_USE_PLATFORM_XLIB_KHR*/ #if defined( VK_USE_PLATFORM_XCB_KHR ) || ( extension == "VK_KHR_xcb_surface" ) #endif /*VK_USE_PLATFORM_XCB_KHR*/ #if defined( VK_USE_PLATFORM_WAYLAND_KHR ) || ( extension == "VK_KHR_wayland_surface" ) #endif /*VK_USE_PLATFORM_WAYLAND_KHR*/ #if defined( VK_USE_PLATFORM_ANDROID_KHR ) || ( extension == "VK_KHR_android_surface" ) #endif /*VK_USE_PLATFORM_ANDROID_KHR*/ #if defined( VK_USE_PLATFORM_WIN32_KHR ) || ( extension == "VK_KHR_win32_surface" ) #endif /*VK_USE_PLATFORM_WIN32_KHR*/ || ( extension == "VK_EXT_debug_report" ) #if defined( VK_USE_PLATFORM_GGP ) || ( extension == "VK_GGP_stream_descriptor_surface" ) #endif /*VK_USE_PLATFORM_GGP*/ || ( extension == "VK_NV_external_memory_capabilities" ) || ( extension == "VK_KHR_get_physical_device_properties2" ) || ( extension == "VK_EXT_validation_flags" ) #if defined( VK_USE_PLATFORM_VI_NN ) || ( extension == "VK_NN_vi_surface" ) #endif /*VK_USE_PLATFORM_VI_NN*/ || ( extension == "VK_KHR_device_group_creation" ) || ( extension == "VK_KHR_external_memory_capabilities" ) || ( extension == "VK_KHR_external_semaphore_capabilities" ) || ( extension == "VK_EXT_direct_mode_display" ) #if defined( VK_USE_PLATFORM_XLIB_XRANDR_EXT ) || ( extension == "VK_EXT_acquire_xlib_display" ) #endif /*VK_USE_PLATFORM_XLIB_XRANDR_EXT*/ || ( extension == "VK_EXT_display_surface_counter" ) || ( extension == "VK_EXT_swapchain_colorspace" ) || ( extension == "VK_KHR_external_fence_capabilities" ) || ( extension == "VK_KHR_get_surface_capabilities2" ) || ( extension == "VK_KHR_get_display_properties2" ) #if defined( VK_USE_PLATFORM_IOS_MVK ) || ( extension == "VK_MVK_ios_surface" ) #endif /*VK_USE_PLATFORM_IOS_MVK*/ #if defined( VK_USE_PLATFORM_MACOS_MVK ) || ( extension == "VK_MVK_macos_surface" ) #endif /*VK_USE_PLATFORM_MACOS_MVK*/ || ( extension == "VK_EXT_debug_utils" ) #if defined( VK_USE_PLATFORM_FUCHSIA ) || ( extension == "VK_FUCHSIA_imagepipe_surface" ) #endif /*VK_USE_PLATFORM_FUCHSIA*/ #if defined( VK_USE_PLATFORM_METAL_EXT ) || ( extension == "VK_EXT_metal_surface" ) #endif /*VK_USE_PLATFORM_METAL_EXT*/ || ( extension == "VK_KHR_surface_protected_capabilities" ) || ( extension == "VK_EXT_validation_features" ) || ( extension == "VK_EXT_headless_surface" ) || ( extension == "VK_EXT_surface_maintenance1" ) || ( extension == "VK_EXT_acquire_drm_display" ) #if defined( VK_USE_PLATFORM_DIRECTFB_EXT ) || ( extension == "VK_EXT_directfb_surface" ) #endif /*VK_USE_PLATFORM_DIRECTFB_EXT*/ #if defined( VK_USE_PLATFORM_SCREEN_QNX ) || ( extension == "VK_QNX_screen_surface" ) #endif /*VK_USE_PLATFORM_SCREEN_QNX*/ || ( extension == "VK_KHR_portability_enumeration" ) || ( extension == "VK_GOOGLE_surfaceless_query" ) || ( extension == "VK_LUNARG_direct_driver_loading" ) || ( extension == "VK_EXT_layer_settings" ) || ( extension == "VK_NV_display_stereo" ); } VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR_20 bool isObsoletedExtension( std::string const & extension ) { return ( extension == "VK_AMD_negative_viewport_height" ); } VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR_20 bool isPromotedExtension( std::string const & extension ) { return ( extension == "VK_KHR_sampler_mirror_clamp_to_edge" ) || ( extension == "VK_EXT_debug_marker" ) || ( extension == "VK_AMD_draw_indirect_count" ) || ( extension == "VK_KHR_dynamic_rendering" ) || ( extension == "VK_KHR_multiview" ) || #if defined( VK_USE_PLATFORM_WIN32_KHR ) ( extension == "VK_NV_win32_keyed_mutex" ) || #endif /*VK_USE_PLATFORM_WIN32_KHR*/ ( extension == "VK_KHR_get_physical_device_properties2" ) || ( extension == "VK_KHR_device_group" ) || ( extension == "VK_KHR_shader_draw_parameters" ) || ( extension == "VK_EXT_texture_compression_astc_hdr" ) || ( extension == "VK_EXT_pipeline_robustness" ) || ( extension == "VK_KHR_maintenance1" ) || ( extension == "VK_KHR_device_group_creation" ) || ( extension == "VK_KHR_external_memory_capabilities" ) || ( extension == "VK_KHR_external_memory" ) || ( extension == "VK_KHR_external_semaphore_capabilities" ) || ( extension == "VK_KHR_external_semaphore" ) || ( extension == "VK_KHR_push_descriptor" ) || ( extension == "VK_KHR_shader_float16_int8" ) || ( extension == "VK_KHR_16bit_storage" ) || ( extension == "VK_KHR_descriptor_update_template" ) || ( extension == "VK_KHR_imageless_framebuffer" ) || ( extension == "VK_KHR_create_renderpass2" ) || ( extension == "VK_KHR_external_fence_capabilities" ) || ( extension == "VK_KHR_external_fence" ) || ( extension == "VK_KHR_maintenance2" ) || ( extension == "VK_KHR_variable_pointers" ) || ( extension == "VK_KHR_dedicated_allocation" ) || ( extension == "VK_EXT_sampler_filter_minmax" ) || ( extension == "VK_KHR_storage_buffer_storage_class" ) || ( extension == "VK_EXT_inline_uniform_block" ) || ( extension == "VK_KHR_relaxed_block_layout" ) || ( extension == "VK_KHR_get_memory_requirements2" ) || ( extension == "VK_KHR_image_format_list" ) || ( extension == "VK_KHR_sampler_ycbcr_conversion" ) || ( extension == "VK_KHR_bind_memory2" ) || ( extension == "VK_EXT_descriptor_indexing" ) || ( extension == "VK_EXT_shader_viewport_index_layer" ) || ( extension == "VK_KHR_maintenance3" ) || ( extension == "VK_KHR_draw_indirect_count" ) || ( extension == "VK_EXT_global_priority" ) || ( extension == "VK_KHR_shader_subgroup_extended_types" ) || ( extension == "VK_KHR_8bit_storage" ) || ( extension == "VK_KHR_shader_atomic_int64" ) || ( extension == "VK_EXT_calibrated_timestamps" ) || ( extension == "VK_KHR_global_priority" ) || ( extension == "VK_EXT_vertex_attribute_divisor" ) || ( extension == "VK_EXT_pipeline_creation_feedback" ) || ( extension == "VK_KHR_driver_properties" ) || ( extension == "VK_KHR_shader_float_controls" ) || ( extension == "VK_KHR_depth_stencil_resolve" ) || ( extension == "VK_NV_compute_shader_derivatives" ) || ( extension == "VK_NV_fragment_shader_barycentric" ) || ( extension == "VK_KHR_timeline_semaphore" ) || ( extension == "VK_KHR_vulkan_memory_model" ) || ( extension == "VK_KHR_shader_terminate_invocation" ) || ( extension == "VK_EXT_scalar_block_layout" ) || ( extension == "VK_EXT_subgroup_size_control" ) || ( extension == "VK_KHR_dynamic_rendering_local_read" ) || ( extension == "VK_KHR_spirv_1_4" ) || ( extension == "VK_KHR_separate_depth_stencil_layouts" ) || ( extension == "VK_EXT_tooling_info" ) || ( extension == "VK_EXT_separate_stencil_usage" ) || ( extension == "VK_KHR_uniform_buffer_standard_layout" ) || ( extension == "VK_KHR_buffer_device_address" ) || ( extension == "VK_EXT_line_rasterization" ) || ( extension == "VK_EXT_host_query_reset" ) || ( extension == "VK_EXT_index_type_uint8" ) || ( extension == "VK_EXT_extended_dynamic_state" ) || ( extension == "VK_EXT_host_image_copy" ) || ( extension == "VK_KHR_map_memory2" ) || ( extension == "VK_EXT_shader_demote_to_helper_invocation" ) || ( extension == "VK_KHR_shader_integer_dot_product" ) || ( extension == "VK_EXT_texel_buffer_alignment" ) || ( extension == "VK_KHR_shader_non_semantic_info" ) || ( extension == "VK_EXT_private_data" ) || ( extension == "VK_EXT_pipeline_creation_cache_control" ) || ( extension == "VK_KHR_synchronization2" ) || ( extension == "VK_KHR_zero_initialize_workgroup_memory" ) || ( extension == "VK_EXT_ycbcr_2plane_444_formats" ) || ( extension == "VK_EXT_image_robustness" ) || ( extension == "VK_KHR_copy_commands2" ) || ( extension == "VK_EXT_4444_formats" ) || ( extension == "VK_ARM_rasterization_order_attachment_access" ) || ( extension == "VK_VALVE_mutable_descriptor_type" ) || ( extension == "VK_KHR_format_feature_flags2" ) || ( extension == "VK_EXT_extended_dynamic_state2" ) || ( extension == "VK_EXT_global_priority_query" ) || ( extension == "VK_EXT_load_store_op_none" ) || ( extension == "VK_KHR_maintenance4" ) || ( extension == "VK_KHR_shader_subgroup_rotate" ) || ( extension == "VK_EXT_depth_clamp_zero_one" ) || ( extension == "VK_EXT_pipeline_protected_access" ) || ( extension == "VK_KHR_maintenance5" ) || ( extension == "VK_KHR_vertex_attribute_divisor" ) || ( extension == "VK_KHR_load_store_op_none" ) || ( extension == "VK_KHR_shader_float_controls2" ) || ( extension == "VK_KHR_index_type_uint8" ) || ( extension == "VK_KHR_line_rasterization" ) || ( extension == "VK_KHR_shader_expect_assume" ) || ( extension == "VK_KHR_maintenance6" ); } } // namespace VULKAN_HPP_NAMESPACE #endif ================================================ FILE: src/libraries/vulkanheaders/vulkan_format_traits.hpp ================================================ // Copyright 2015-2025 The Khronos Group Inc. // // SPDX-License-Identifier: Apache-2.0 OR MIT // // This header is generated from the Khronos Vulkan XML API Registry. #ifndef VULKAN_FORMAT_TRAITS_HPP #define VULKAN_FORMAT_TRAITS_HPP #include namespace VULKAN_HPP_NAMESPACE { //===================== //=== Format Traits === //===================== // The three-dimensional extent of a texel block. VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR_14 std::array blockExtent( VULKAN_HPP_NAMESPACE::Format format ) { switch ( format ) { case VULKAN_HPP_NAMESPACE::Format::eBc1RgbUnormBlock: return { { 4, 4, 1 } }; case VULKAN_HPP_NAMESPACE::Format::eBc1RgbSrgbBlock: return { { 4, 4, 1 } }; case VULKAN_HPP_NAMESPACE::Format::eBc1RgbaUnormBlock: return { { 4, 4, 1 } }; case VULKAN_HPP_NAMESPACE::Format::eBc1RgbaSrgbBlock: return { { 4, 4, 1 } }; case VULKAN_HPP_NAMESPACE::Format::eBc2UnormBlock: return { { 4, 4, 1 } }; case VULKAN_HPP_NAMESPACE::Format::eBc2SrgbBlock: return { { 4, 4, 1 } }; case VULKAN_HPP_NAMESPACE::Format::eBc3UnormBlock: return { { 4, 4, 1 } }; case VULKAN_HPP_NAMESPACE::Format::eBc3SrgbBlock: return { { 4, 4, 1 } }; case VULKAN_HPP_NAMESPACE::Format::eBc4UnormBlock: return { { 4, 4, 1 } }; case VULKAN_HPP_NAMESPACE::Format::eBc4SnormBlock: return { { 4, 4, 1 } }; case VULKAN_HPP_NAMESPACE::Format::eBc5UnormBlock: return { { 4, 4, 1 } }; case VULKAN_HPP_NAMESPACE::Format::eBc5SnormBlock: return { { 4, 4, 1 } }; case VULKAN_HPP_NAMESPACE::Format::eBc6HUfloatBlock: return { { 4, 4, 1 } }; case VULKAN_HPP_NAMESPACE::Format::eBc6HSfloatBlock: return { { 4, 4, 1 } }; case VULKAN_HPP_NAMESPACE::Format::eBc7UnormBlock: return { { 4, 4, 1 } }; case VULKAN_HPP_NAMESPACE::Format::eBc7SrgbBlock: return { { 4, 4, 1 } }; case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8UnormBlock: return { { 4, 4, 1 } }; case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8SrgbBlock: return { { 4, 4, 1 } }; case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8A1UnormBlock: return { { 4, 4, 1 } }; case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8A1SrgbBlock: return { { 4, 4, 1 } }; case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8A8UnormBlock: return { { 4, 4, 1 } }; case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8A8SrgbBlock: return { { 4, 4, 1 } }; case VULKAN_HPP_NAMESPACE::Format::eEacR11UnormBlock: return { { 4, 4, 1 } }; case VULKAN_HPP_NAMESPACE::Format::eEacR11SnormBlock: return { { 4, 4, 1 } }; case VULKAN_HPP_NAMESPACE::Format::eEacR11G11UnormBlock: return { { 4, 4, 1 } }; case VULKAN_HPP_NAMESPACE::Format::eEacR11G11SnormBlock: return { { 4, 4, 1 } }; case VULKAN_HPP_NAMESPACE::Format::eAstc4x4UnormBlock: return { { 4, 4, 1 } }; case VULKAN_HPP_NAMESPACE::Format::eAstc4x4SrgbBlock: return { { 4, 4, 1 } }; case VULKAN_HPP_NAMESPACE::Format::eAstc5x4UnormBlock: return { { 5, 4, 1 } }; case VULKAN_HPP_NAMESPACE::Format::eAstc5x4SrgbBlock: return { { 5, 4, 1 } }; case VULKAN_HPP_NAMESPACE::Format::eAstc5x5UnormBlock: return { { 5, 5, 1 } }; case VULKAN_HPP_NAMESPACE::Format::eAstc5x5SrgbBlock: return { { 5, 5, 1 } }; case VULKAN_HPP_NAMESPACE::Format::eAstc6x5UnormBlock: return { { 6, 5, 1 } }; case VULKAN_HPP_NAMESPACE::Format::eAstc6x5SrgbBlock: return { { 6, 5, 1 } }; case VULKAN_HPP_NAMESPACE::Format::eAstc6x6UnormBlock: return { { 6, 6, 1 } }; case VULKAN_HPP_NAMESPACE::Format::eAstc6x6SrgbBlock: return { { 6, 6, 1 } }; case VULKAN_HPP_NAMESPACE::Format::eAstc8x5UnormBlock: return { { 8, 5, 1 } }; case VULKAN_HPP_NAMESPACE::Format::eAstc8x5SrgbBlock: return { { 8, 5, 1 } }; case VULKAN_HPP_NAMESPACE::Format::eAstc8x6UnormBlock: return { { 8, 6, 1 } }; case VULKAN_HPP_NAMESPACE::Format::eAstc8x6SrgbBlock: return { { 8, 6, 1 } }; case VULKAN_HPP_NAMESPACE::Format::eAstc8x8UnormBlock: return { { 8, 8, 1 } }; case VULKAN_HPP_NAMESPACE::Format::eAstc8x8SrgbBlock: return { { 8, 8, 1 } }; case VULKAN_HPP_NAMESPACE::Format::eAstc10x5UnormBlock: return { { 10, 5, 1 } }; case VULKAN_HPP_NAMESPACE::Format::eAstc10x5SrgbBlock: return { { 10, 5, 1 } }; case VULKAN_HPP_NAMESPACE::Format::eAstc10x6UnormBlock: return { { 10, 6, 1 } }; case VULKAN_HPP_NAMESPACE::Format::eAstc10x6SrgbBlock: return { { 10, 6, 1 } }; case VULKAN_HPP_NAMESPACE::Format::eAstc10x8UnormBlock: return { { 10, 8, 1 } }; case VULKAN_HPP_NAMESPACE::Format::eAstc10x8SrgbBlock: return { { 10, 8, 1 } }; case VULKAN_HPP_NAMESPACE::Format::eAstc10x10UnormBlock: return { { 10, 10, 1 } }; case VULKAN_HPP_NAMESPACE::Format::eAstc10x10SrgbBlock: return { { 10, 10, 1 } }; case VULKAN_HPP_NAMESPACE::Format::eAstc12x10UnormBlock: return { { 12, 10, 1 } }; case VULKAN_HPP_NAMESPACE::Format::eAstc12x10SrgbBlock: return { { 12, 10, 1 } }; case VULKAN_HPP_NAMESPACE::Format::eAstc12x12UnormBlock: return { { 12, 12, 1 } }; case VULKAN_HPP_NAMESPACE::Format::eAstc12x12SrgbBlock: return { { 12, 12, 1 } }; case VULKAN_HPP_NAMESPACE::Format::eG8B8G8R8422Unorm: return { { 2, 1, 1 } }; case VULKAN_HPP_NAMESPACE::Format::eB8G8R8G8422Unorm: return { { 2, 1, 1 } }; case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6G10X6R10X6422Unorm4Pack16: return { { 2, 1, 1 } }; case VULKAN_HPP_NAMESPACE::Format::eB10X6G10X6R10X6G10X6422Unorm4Pack16: return { { 2, 1, 1 } }; case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4G12X4R12X4422Unorm4Pack16: return { { 2, 1, 1 } }; case VULKAN_HPP_NAMESPACE::Format::eB12X4G12X4R12X4G12X4422Unorm4Pack16: return { { 2, 1, 1 } }; case VULKAN_HPP_NAMESPACE::Format::eG16B16G16R16422Unorm: return { { 2, 1, 1 } }; case VULKAN_HPP_NAMESPACE::Format::eB16G16R16G16422Unorm: return { { 2, 1, 1 } }; case VULKAN_HPP_NAMESPACE::Format::eAstc4x4SfloatBlock: return { { 4, 4, 1 } }; case VULKAN_HPP_NAMESPACE::Format::eAstc5x4SfloatBlock: return { { 5, 4, 1 } }; case VULKAN_HPP_NAMESPACE::Format::eAstc5x5SfloatBlock: return { { 5, 5, 1 } }; case VULKAN_HPP_NAMESPACE::Format::eAstc6x5SfloatBlock: return { { 6, 5, 1 } }; case VULKAN_HPP_NAMESPACE::Format::eAstc6x6SfloatBlock: return { { 6, 6, 1 } }; case VULKAN_HPP_NAMESPACE::Format::eAstc8x5SfloatBlock: return { { 8, 5, 1 } }; case VULKAN_HPP_NAMESPACE::Format::eAstc8x6SfloatBlock: return { { 8, 6, 1 } }; case VULKAN_HPP_NAMESPACE::Format::eAstc8x8SfloatBlock: return { { 8, 8, 1 } }; case VULKAN_HPP_NAMESPACE::Format::eAstc10x5SfloatBlock: return { { 10, 5, 1 } }; case VULKAN_HPP_NAMESPACE::Format::eAstc10x6SfloatBlock: return { { 10, 6, 1 } }; case VULKAN_HPP_NAMESPACE::Format::eAstc10x8SfloatBlock: return { { 10, 8, 1 } }; case VULKAN_HPP_NAMESPACE::Format::eAstc10x10SfloatBlock: return { { 10, 10, 1 } }; case VULKAN_HPP_NAMESPACE::Format::eAstc12x10SfloatBlock: return { { 12, 10, 1 } }; case VULKAN_HPP_NAMESPACE::Format::eAstc12x12SfloatBlock: return { { 12, 12, 1 } }; case VULKAN_HPP_NAMESPACE::Format::ePvrtc12BppUnormBlockIMG: return { { 8, 4, 1 } }; case VULKAN_HPP_NAMESPACE::Format::ePvrtc14BppUnormBlockIMG: return { { 4, 4, 1 } }; case VULKAN_HPP_NAMESPACE::Format::ePvrtc22BppUnormBlockIMG: return { { 8, 4, 1 } }; case VULKAN_HPP_NAMESPACE::Format::ePvrtc24BppUnormBlockIMG: return { { 4, 4, 1 } }; case VULKAN_HPP_NAMESPACE::Format::ePvrtc12BppSrgbBlockIMG: return { { 8, 4, 1 } }; case VULKAN_HPP_NAMESPACE::Format::ePvrtc14BppSrgbBlockIMG: return { { 4, 4, 1 } }; case VULKAN_HPP_NAMESPACE::Format::ePvrtc22BppSrgbBlockIMG: return { { 8, 4, 1 } }; case VULKAN_HPP_NAMESPACE::Format::ePvrtc24BppSrgbBlockIMG: return { { 4, 4, 1 } }; default: return { { 1, 1, 1 } }; } } // The texel block size in bytes. VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR_14 uint8_t blockSize( VULKAN_HPP_NAMESPACE::Format format ) { switch ( format ) { case VULKAN_HPP_NAMESPACE::Format::eR4G4UnormPack8: return 1; case VULKAN_HPP_NAMESPACE::Format::eR4G4B4A4UnormPack16: return 2; case VULKAN_HPP_NAMESPACE::Format::eB4G4R4A4UnormPack16: return 2; case VULKAN_HPP_NAMESPACE::Format::eR5G6B5UnormPack16: return 2; case VULKAN_HPP_NAMESPACE::Format::eB5G6R5UnormPack16: return 2; case VULKAN_HPP_NAMESPACE::Format::eR5G5B5A1UnormPack16: return 2; case VULKAN_HPP_NAMESPACE::Format::eB5G5R5A1UnormPack16: return 2; case VULKAN_HPP_NAMESPACE::Format::eA1R5G5B5UnormPack16: return 2; case VULKAN_HPP_NAMESPACE::Format::eR8Unorm: return 1; case VULKAN_HPP_NAMESPACE::Format::eR8Snorm: return 1; case VULKAN_HPP_NAMESPACE::Format::eR8Uscaled: return 1; case VULKAN_HPP_NAMESPACE::Format::eR8Sscaled: return 1; case VULKAN_HPP_NAMESPACE::Format::eR8Uint: return 1; case VULKAN_HPP_NAMESPACE::Format::eR8Sint: return 1; case VULKAN_HPP_NAMESPACE::Format::eR8Srgb: return 1; case VULKAN_HPP_NAMESPACE::Format::eR8G8Unorm: return 2; case VULKAN_HPP_NAMESPACE::Format::eR8G8Snorm: return 2; case VULKAN_HPP_NAMESPACE::Format::eR8G8Uscaled: return 2; case VULKAN_HPP_NAMESPACE::Format::eR8G8Sscaled: return 2; case VULKAN_HPP_NAMESPACE::Format::eR8G8Uint: return 2; case VULKAN_HPP_NAMESPACE::Format::eR8G8Sint: return 2; case VULKAN_HPP_NAMESPACE::Format::eR8G8Srgb: return 2; case VULKAN_HPP_NAMESPACE::Format::eR8G8B8Unorm: return 3; case VULKAN_HPP_NAMESPACE::Format::eR8G8B8Snorm: return 3; case VULKAN_HPP_NAMESPACE::Format::eR8G8B8Uscaled: return 3; case VULKAN_HPP_NAMESPACE::Format::eR8G8B8Sscaled: return 3; case VULKAN_HPP_NAMESPACE::Format::eR8G8B8Uint: return 3; case VULKAN_HPP_NAMESPACE::Format::eR8G8B8Sint: return 3; case VULKAN_HPP_NAMESPACE::Format::eR8G8B8Srgb: return 3; case VULKAN_HPP_NAMESPACE::Format::eB8G8R8Unorm: return 3; case VULKAN_HPP_NAMESPACE::Format::eB8G8R8Snorm: return 3; case VULKAN_HPP_NAMESPACE::Format::eB8G8R8Uscaled: return 3; case VULKAN_HPP_NAMESPACE::Format::eB8G8R8Sscaled: return 3; case VULKAN_HPP_NAMESPACE::Format::eB8G8R8Uint: return 3; case VULKAN_HPP_NAMESPACE::Format::eB8G8R8Sint: return 3; case VULKAN_HPP_NAMESPACE::Format::eB8G8R8Srgb: return 3; case VULKAN_HPP_NAMESPACE::Format::eR8G8B8A8Unorm: return 4; case VULKAN_HPP_NAMESPACE::Format::eR8G8B8A8Snorm: return 4; case VULKAN_HPP_NAMESPACE::Format::eR8G8B8A8Uscaled: return 4; case VULKAN_HPP_NAMESPACE::Format::eR8G8B8A8Sscaled: return 4; case VULKAN_HPP_NAMESPACE::Format::eR8G8B8A8Uint: return 4; case VULKAN_HPP_NAMESPACE::Format::eR8G8B8A8Sint: return 4; case VULKAN_HPP_NAMESPACE::Format::eR8G8B8A8Srgb: return 4; case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Unorm: return 4; case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Snorm: return 4; case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Uscaled: return 4; case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Sscaled: return 4; case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Uint: return 4; case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Sint: return 4; case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Srgb: return 4; case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8UnormPack32: return 4; case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8SnormPack32: return 4; case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8UscaledPack32: return 4; case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8SscaledPack32: return 4; case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8UintPack32: return 4; case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8SintPack32: return 4; case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8SrgbPack32: return 4; case VULKAN_HPP_NAMESPACE::Format::eA2R10G10B10UnormPack32: return 4; case VULKAN_HPP_NAMESPACE::Format::eA2R10G10B10SnormPack32: return 4; case VULKAN_HPP_NAMESPACE::Format::eA2R10G10B10UscaledPack32: return 4; case VULKAN_HPP_NAMESPACE::Format::eA2R10G10B10SscaledPack32: return 4; case VULKAN_HPP_NAMESPACE::Format::eA2R10G10B10UintPack32: return 4; case VULKAN_HPP_NAMESPACE::Format::eA2R10G10B10SintPack32: return 4; case VULKAN_HPP_NAMESPACE::Format::eA2B10G10R10UnormPack32: return 4; case VULKAN_HPP_NAMESPACE::Format::eA2B10G10R10SnormPack32: return 4; case VULKAN_HPP_NAMESPACE::Format::eA2B10G10R10UscaledPack32: return 4; case VULKAN_HPP_NAMESPACE::Format::eA2B10G10R10SscaledPack32: return 4; case VULKAN_HPP_NAMESPACE::Format::eA2B10G10R10UintPack32: return 4; case VULKAN_HPP_NAMESPACE::Format::eA2B10G10R10SintPack32: return 4; case VULKAN_HPP_NAMESPACE::Format::eR16Unorm: return 2; case VULKAN_HPP_NAMESPACE::Format::eR16Snorm: return 2; case VULKAN_HPP_NAMESPACE::Format::eR16Uscaled: return 2; case VULKAN_HPP_NAMESPACE::Format::eR16Sscaled: return 2; case VULKAN_HPP_NAMESPACE::Format::eR16Uint: return 2; case VULKAN_HPP_NAMESPACE::Format::eR16Sint: return 2; case VULKAN_HPP_NAMESPACE::Format::eR16Sfloat: return 2; case VULKAN_HPP_NAMESPACE::Format::eR16G16Unorm: return 4; case VULKAN_HPP_NAMESPACE::Format::eR16G16Snorm: return 4; case VULKAN_HPP_NAMESPACE::Format::eR16G16Uscaled: return 4; case VULKAN_HPP_NAMESPACE::Format::eR16G16Sscaled: return 4; case VULKAN_HPP_NAMESPACE::Format::eR16G16Uint: return 4; case VULKAN_HPP_NAMESPACE::Format::eR16G16Sint: return 4; case VULKAN_HPP_NAMESPACE::Format::eR16G16Sfloat: return 4; case VULKAN_HPP_NAMESPACE::Format::eR16G16B16Unorm: return 6; case VULKAN_HPP_NAMESPACE::Format::eR16G16B16Snorm: return 6; case VULKAN_HPP_NAMESPACE::Format::eR16G16B16Uscaled: return 6; case VULKAN_HPP_NAMESPACE::Format::eR16G16B16Sscaled: return 6; case VULKAN_HPP_NAMESPACE::Format::eR16G16B16Uint: return 6; case VULKAN_HPP_NAMESPACE::Format::eR16G16B16Sint: return 6; case VULKAN_HPP_NAMESPACE::Format::eR16G16B16Sfloat: return 6; case VULKAN_HPP_NAMESPACE::Format::eR16G16B16A16Unorm: return 8; case VULKAN_HPP_NAMESPACE::Format::eR16G16B16A16Snorm: return 8; case VULKAN_HPP_NAMESPACE::Format::eR16G16B16A16Uscaled: return 8; case VULKAN_HPP_NAMESPACE::Format::eR16G16B16A16Sscaled: return 8; case VULKAN_HPP_NAMESPACE::Format::eR16G16B16A16Uint: return 8; case VULKAN_HPP_NAMESPACE::Format::eR16G16B16A16Sint: return 8; case VULKAN_HPP_NAMESPACE::Format::eR16G16B16A16Sfloat: return 8; case VULKAN_HPP_NAMESPACE::Format::eR32Uint: return 4; case VULKAN_HPP_NAMESPACE::Format::eR32Sint: return 4; case VULKAN_HPP_NAMESPACE::Format::eR32Sfloat: return 4; case VULKAN_HPP_NAMESPACE::Format::eR32G32Uint: return 8; case VULKAN_HPP_NAMESPACE::Format::eR32G32Sint: return 8; case VULKAN_HPP_NAMESPACE::Format::eR32G32Sfloat: return 8; case VULKAN_HPP_NAMESPACE::Format::eR32G32B32Uint: return 12; case VULKAN_HPP_NAMESPACE::Format::eR32G32B32Sint: return 12; case VULKAN_HPP_NAMESPACE::Format::eR32G32B32Sfloat: return 12; case VULKAN_HPP_NAMESPACE::Format::eR32G32B32A32Uint: return 16; case VULKAN_HPP_NAMESPACE::Format::eR32G32B32A32Sint: return 16; case VULKAN_HPP_NAMESPACE::Format::eR32G32B32A32Sfloat: return 16; case VULKAN_HPP_NAMESPACE::Format::eR64Uint: return 8; case VULKAN_HPP_NAMESPACE::Format::eR64Sint: return 8; case VULKAN_HPP_NAMESPACE::Format::eR64Sfloat: return 8; case VULKAN_HPP_NAMESPACE::Format::eR64G64Uint: return 16; case VULKAN_HPP_NAMESPACE::Format::eR64G64Sint: return 16; case VULKAN_HPP_NAMESPACE::Format::eR64G64Sfloat: return 16; case VULKAN_HPP_NAMESPACE::Format::eR64G64B64Uint: return 24; case VULKAN_HPP_NAMESPACE::Format::eR64G64B64Sint: return 24; case VULKAN_HPP_NAMESPACE::Format::eR64G64B64Sfloat: return 24; case VULKAN_HPP_NAMESPACE::Format::eR64G64B64A64Uint: return 32; case VULKAN_HPP_NAMESPACE::Format::eR64G64B64A64Sint: return 32; case VULKAN_HPP_NAMESPACE::Format::eR64G64B64A64Sfloat: return 32; case VULKAN_HPP_NAMESPACE::Format::eB10G11R11UfloatPack32: return 4; case VULKAN_HPP_NAMESPACE::Format::eE5B9G9R9UfloatPack32: return 4; case VULKAN_HPP_NAMESPACE::Format::eD16Unorm: return 2; case VULKAN_HPP_NAMESPACE::Format::eX8D24UnormPack32: return 4; case VULKAN_HPP_NAMESPACE::Format::eD32Sfloat: return 4; case VULKAN_HPP_NAMESPACE::Format::eS8Uint: return 1; case VULKAN_HPP_NAMESPACE::Format::eD16UnormS8Uint: return 3; case VULKAN_HPP_NAMESPACE::Format::eD24UnormS8Uint: return 4; case VULKAN_HPP_NAMESPACE::Format::eD32SfloatS8Uint: return 5; case VULKAN_HPP_NAMESPACE::Format::eBc1RgbUnormBlock: return 8; case VULKAN_HPP_NAMESPACE::Format::eBc1RgbSrgbBlock: return 8; case VULKAN_HPP_NAMESPACE::Format::eBc1RgbaUnormBlock: return 8; case VULKAN_HPP_NAMESPACE::Format::eBc1RgbaSrgbBlock: return 8; case VULKAN_HPP_NAMESPACE::Format::eBc2UnormBlock: return 16; case VULKAN_HPP_NAMESPACE::Format::eBc2SrgbBlock: return 16; case VULKAN_HPP_NAMESPACE::Format::eBc3UnormBlock: return 16; case VULKAN_HPP_NAMESPACE::Format::eBc3SrgbBlock: return 16; case VULKAN_HPP_NAMESPACE::Format::eBc4UnormBlock: return 8; case VULKAN_HPP_NAMESPACE::Format::eBc4SnormBlock: return 8; case VULKAN_HPP_NAMESPACE::Format::eBc5UnormBlock: return 16; case VULKAN_HPP_NAMESPACE::Format::eBc5SnormBlock: return 16; case VULKAN_HPP_NAMESPACE::Format::eBc6HUfloatBlock: return 16; case VULKAN_HPP_NAMESPACE::Format::eBc6HSfloatBlock: return 16; case VULKAN_HPP_NAMESPACE::Format::eBc7UnormBlock: return 16; case VULKAN_HPP_NAMESPACE::Format::eBc7SrgbBlock: return 16; case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8UnormBlock: return 8; case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8SrgbBlock: return 8; case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8A1UnormBlock: return 8; case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8A1SrgbBlock: return 8; case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8A8UnormBlock: return 16; case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8A8SrgbBlock: return 16; case VULKAN_HPP_NAMESPACE::Format::eEacR11UnormBlock: return 8; case VULKAN_HPP_NAMESPACE::Format::eEacR11SnormBlock: return 8; case VULKAN_HPP_NAMESPACE::Format::eEacR11G11UnormBlock: return 16; case VULKAN_HPP_NAMESPACE::Format::eEacR11G11SnormBlock: return 16; case VULKAN_HPP_NAMESPACE::Format::eAstc4x4UnormBlock: return 16; case VULKAN_HPP_NAMESPACE::Format::eAstc4x4SrgbBlock: return 16; case VULKAN_HPP_NAMESPACE::Format::eAstc5x4UnormBlock: return 16; case VULKAN_HPP_NAMESPACE::Format::eAstc5x4SrgbBlock: return 16; case VULKAN_HPP_NAMESPACE::Format::eAstc5x5UnormBlock: return 16; case VULKAN_HPP_NAMESPACE::Format::eAstc5x5SrgbBlock: return 16; case VULKAN_HPP_NAMESPACE::Format::eAstc6x5UnormBlock: return 16; case VULKAN_HPP_NAMESPACE::Format::eAstc6x5SrgbBlock: return 16; case VULKAN_HPP_NAMESPACE::Format::eAstc6x6UnormBlock: return 16; case VULKAN_HPP_NAMESPACE::Format::eAstc6x6SrgbBlock: return 16; case VULKAN_HPP_NAMESPACE::Format::eAstc8x5UnormBlock: return 16; case VULKAN_HPP_NAMESPACE::Format::eAstc8x5SrgbBlock: return 16; case VULKAN_HPP_NAMESPACE::Format::eAstc8x6UnormBlock: return 16; case VULKAN_HPP_NAMESPACE::Format::eAstc8x6SrgbBlock: return 16; case VULKAN_HPP_NAMESPACE::Format::eAstc8x8UnormBlock: return 16; case VULKAN_HPP_NAMESPACE::Format::eAstc8x8SrgbBlock: return 16; case VULKAN_HPP_NAMESPACE::Format::eAstc10x5UnormBlock: return 16; case VULKAN_HPP_NAMESPACE::Format::eAstc10x5SrgbBlock: return 16; case VULKAN_HPP_NAMESPACE::Format::eAstc10x6UnormBlock: return 16; case VULKAN_HPP_NAMESPACE::Format::eAstc10x6SrgbBlock: return 16; case VULKAN_HPP_NAMESPACE::Format::eAstc10x8UnormBlock: return 16; case VULKAN_HPP_NAMESPACE::Format::eAstc10x8SrgbBlock: return 16; case VULKAN_HPP_NAMESPACE::Format::eAstc10x10UnormBlock: return 16; case VULKAN_HPP_NAMESPACE::Format::eAstc10x10SrgbBlock: return 16; case VULKAN_HPP_NAMESPACE::Format::eAstc12x10UnormBlock: return 16; case VULKAN_HPP_NAMESPACE::Format::eAstc12x10SrgbBlock: return 16; case VULKAN_HPP_NAMESPACE::Format::eAstc12x12UnormBlock: return 16; case VULKAN_HPP_NAMESPACE::Format::eAstc12x12SrgbBlock: return 16; case VULKAN_HPP_NAMESPACE::Format::eG8B8G8R8422Unorm: return 4; case VULKAN_HPP_NAMESPACE::Format::eB8G8R8G8422Unorm: return 4; case VULKAN_HPP_NAMESPACE::Format::eG8B8R83Plane420Unorm: return 3; case VULKAN_HPP_NAMESPACE::Format::eG8B8R82Plane420Unorm: return 3; case VULKAN_HPP_NAMESPACE::Format::eG8B8R83Plane422Unorm: return 3; case VULKAN_HPP_NAMESPACE::Format::eG8B8R82Plane422Unorm: return 3; case VULKAN_HPP_NAMESPACE::Format::eG8B8R83Plane444Unorm: return 3; case VULKAN_HPP_NAMESPACE::Format::eR10X6UnormPack16: return 2; case VULKAN_HPP_NAMESPACE::Format::eR10X6G10X6Unorm2Pack16: return 4; case VULKAN_HPP_NAMESPACE::Format::eR10X6G10X6B10X6A10X6Unorm4Pack16: return 8; case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6G10X6R10X6422Unorm4Pack16: return 8; case VULKAN_HPP_NAMESPACE::Format::eB10X6G10X6R10X6G10X6422Unorm4Pack16: return 8; case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X63Plane420Unorm3Pack16: return 6; case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X62Plane420Unorm3Pack16: return 6; case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X63Plane422Unorm3Pack16: return 6; case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X62Plane422Unorm3Pack16: return 6; case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X63Plane444Unorm3Pack16: return 6; case VULKAN_HPP_NAMESPACE::Format::eR12X4UnormPack16: return 2; case VULKAN_HPP_NAMESPACE::Format::eR12X4G12X4Unorm2Pack16: return 4; case VULKAN_HPP_NAMESPACE::Format::eR12X4G12X4B12X4A12X4Unorm4Pack16: return 8; case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4G12X4R12X4422Unorm4Pack16: return 8; case VULKAN_HPP_NAMESPACE::Format::eB12X4G12X4R12X4G12X4422Unorm4Pack16: return 8; case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X43Plane420Unorm3Pack16: return 6; case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X42Plane420Unorm3Pack16: return 6; case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X43Plane422Unorm3Pack16: return 6; case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X42Plane422Unorm3Pack16: return 6; case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X43Plane444Unorm3Pack16: return 6; case VULKAN_HPP_NAMESPACE::Format::eG16B16G16R16422Unorm: return 8; case VULKAN_HPP_NAMESPACE::Format::eB16G16R16G16422Unorm: return 8; case VULKAN_HPP_NAMESPACE::Format::eG16B16R163Plane420Unorm: return 6; case VULKAN_HPP_NAMESPACE::Format::eG16B16R162Plane420Unorm: return 6; case VULKAN_HPP_NAMESPACE::Format::eG16B16R163Plane422Unorm: return 6; case VULKAN_HPP_NAMESPACE::Format::eG16B16R162Plane422Unorm: return 6; case VULKAN_HPP_NAMESPACE::Format::eG16B16R163Plane444Unorm: return 6; case VULKAN_HPP_NAMESPACE::Format::eG8B8R82Plane444Unorm: return 3; case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X62Plane444Unorm3Pack16: return 6; case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X42Plane444Unorm3Pack16: return 6; case VULKAN_HPP_NAMESPACE::Format::eG16B16R162Plane444Unorm: return 6; case VULKAN_HPP_NAMESPACE::Format::eA4R4G4B4UnormPack16: return 2; case VULKAN_HPP_NAMESPACE::Format::eA4B4G4R4UnormPack16: return 2; case VULKAN_HPP_NAMESPACE::Format::eAstc4x4SfloatBlock: return 16; case VULKAN_HPP_NAMESPACE::Format::eAstc5x4SfloatBlock: return 16; case VULKAN_HPP_NAMESPACE::Format::eAstc5x5SfloatBlock: return 16; case VULKAN_HPP_NAMESPACE::Format::eAstc6x5SfloatBlock: return 16; case VULKAN_HPP_NAMESPACE::Format::eAstc6x6SfloatBlock: return 16; case VULKAN_HPP_NAMESPACE::Format::eAstc8x5SfloatBlock: return 16; case VULKAN_HPP_NAMESPACE::Format::eAstc8x6SfloatBlock: return 16; case VULKAN_HPP_NAMESPACE::Format::eAstc8x8SfloatBlock: return 16; case VULKAN_HPP_NAMESPACE::Format::eAstc10x5SfloatBlock: return 16; case VULKAN_HPP_NAMESPACE::Format::eAstc10x6SfloatBlock: return 16; case VULKAN_HPP_NAMESPACE::Format::eAstc10x8SfloatBlock: return 16; case VULKAN_HPP_NAMESPACE::Format::eAstc10x10SfloatBlock: return 16; case VULKAN_HPP_NAMESPACE::Format::eAstc12x10SfloatBlock: return 16; case VULKAN_HPP_NAMESPACE::Format::eAstc12x12SfloatBlock: return 16; case VULKAN_HPP_NAMESPACE::Format::eA1B5G5R5UnormPack16: return 2; case VULKAN_HPP_NAMESPACE::Format::eA8Unorm: return 1; case VULKAN_HPP_NAMESPACE::Format::ePvrtc12BppUnormBlockIMG: return 8; case VULKAN_HPP_NAMESPACE::Format::ePvrtc14BppUnormBlockIMG: return 8; case VULKAN_HPP_NAMESPACE::Format::ePvrtc22BppUnormBlockIMG: return 8; case VULKAN_HPP_NAMESPACE::Format::ePvrtc24BppUnormBlockIMG: return 8; case VULKAN_HPP_NAMESPACE::Format::ePvrtc12BppSrgbBlockIMG: return 8; case VULKAN_HPP_NAMESPACE::Format::ePvrtc14BppSrgbBlockIMG: return 8; case VULKAN_HPP_NAMESPACE::Format::ePvrtc22BppSrgbBlockIMG: return 8; case VULKAN_HPP_NAMESPACE::Format::ePvrtc24BppSrgbBlockIMG: return 8; case VULKAN_HPP_NAMESPACE::Format::eR16G16Sfixed5NV: return 4; default: VULKAN_HPP_ASSERT( false ); return 0; } } // The class of the format (can't be just named "class"!) VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR_14 char const * compatibilityClass( VULKAN_HPP_NAMESPACE::Format format ) { switch ( format ) { case VULKAN_HPP_NAMESPACE::Format::eR4G4UnormPack8: return "8-bit"; case VULKAN_HPP_NAMESPACE::Format::eR4G4B4A4UnormPack16: return "16-bit"; case VULKAN_HPP_NAMESPACE::Format::eB4G4R4A4UnormPack16: return "16-bit"; case VULKAN_HPP_NAMESPACE::Format::eR5G6B5UnormPack16: return "16-bit"; case VULKAN_HPP_NAMESPACE::Format::eB5G6R5UnormPack16: return "16-bit"; case VULKAN_HPP_NAMESPACE::Format::eR5G5B5A1UnormPack16: return "16-bit"; case VULKAN_HPP_NAMESPACE::Format::eB5G5R5A1UnormPack16: return "16-bit"; case VULKAN_HPP_NAMESPACE::Format::eA1R5G5B5UnormPack16: return "16-bit"; case VULKAN_HPP_NAMESPACE::Format::eR8Unorm: return "8-bit"; case VULKAN_HPP_NAMESPACE::Format::eR8Snorm: return "8-bit"; case VULKAN_HPP_NAMESPACE::Format::eR8Uscaled: return "8-bit"; case VULKAN_HPP_NAMESPACE::Format::eR8Sscaled: return "8-bit"; case VULKAN_HPP_NAMESPACE::Format::eR8Uint: return "8-bit"; case VULKAN_HPP_NAMESPACE::Format::eR8Sint: return "8-bit"; case VULKAN_HPP_NAMESPACE::Format::eR8Srgb: return "8-bit"; case VULKAN_HPP_NAMESPACE::Format::eR8G8Unorm: return "16-bit"; case VULKAN_HPP_NAMESPACE::Format::eR8G8Snorm: return "16-bit"; case VULKAN_HPP_NAMESPACE::Format::eR8G8Uscaled: return "16-bit"; case VULKAN_HPP_NAMESPACE::Format::eR8G8Sscaled: return "16-bit"; case VULKAN_HPP_NAMESPACE::Format::eR8G8Uint: return "16-bit"; case VULKAN_HPP_NAMESPACE::Format::eR8G8Sint: return "16-bit"; case VULKAN_HPP_NAMESPACE::Format::eR8G8Srgb: return "16-bit"; case VULKAN_HPP_NAMESPACE::Format::eR8G8B8Unorm: return "24-bit"; case VULKAN_HPP_NAMESPACE::Format::eR8G8B8Snorm: return "24-bit"; case VULKAN_HPP_NAMESPACE::Format::eR8G8B8Uscaled: return "24-bit"; case VULKAN_HPP_NAMESPACE::Format::eR8G8B8Sscaled: return "24-bit"; case VULKAN_HPP_NAMESPACE::Format::eR8G8B8Uint: return "24-bit"; case VULKAN_HPP_NAMESPACE::Format::eR8G8B8Sint: return "24-bit"; case VULKAN_HPP_NAMESPACE::Format::eR8G8B8Srgb: return "24-bit"; case VULKAN_HPP_NAMESPACE::Format::eB8G8R8Unorm: return "24-bit"; case VULKAN_HPP_NAMESPACE::Format::eB8G8R8Snorm: return "24-bit"; case VULKAN_HPP_NAMESPACE::Format::eB8G8R8Uscaled: return "24-bit"; case VULKAN_HPP_NAMESPACE::Format::eB8G8R8Sscaled: return "24-bit"; case VULKAN_HPP_NAMESPACE::Format::eB8G8R8Uint: return "24-bit"; case VULKAN_HPP_NAMESPACE::Format::eB8G8R8Sint: return "24-bit"; case VULKAN_HPP_NAMESPACE::Format::eB8G8R8Srgb: return "24-bit"; case VULKAN_HPP_NAMESPACE::Format::eR8G8B8A8Unorm: return "32-bit"; case VULKAN_HPP_NAMESPACE::Format::eR8G8B8A8Snorm: return "32-bit"; case VULKAN_HPP_NAMESPACE::Format::eR8G8B8A8Uscaled: return "32-bit"; case VULKAN_HPP_NAMESPACE::Format::eR8G8B8A8Sscaled: return "32-bit"; case VULKAN_HPP_NAMESPACE::Format::eR8G8B8A8Uint: return "32-bit"; case VULKAN_HPP_NAMESPACE::Format::eR8G8B8A8Sint: return "32-bit"; case VULKAN_HPP_NAMESPACE::Format::eR8G8B8A8Srgb: return "32-bit"; case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Unorm: return "32-bit"; case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Snorm: return "32-bit"; case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Uscaled: return "32-bit"; case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Sscaled: return "32-bit"; case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Uint: return "32-bit"; case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Sint: return "32-bit"; case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Srgb: return "32-bit"; case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8UnormPack32: return "32-bit"; case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8SnormPack32: return "32-bit"; case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8UscaledPack32: return "32-bit"; case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8SscaledPack32: return "32-bit"; case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8UintPack32: return "32-bit"; case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8SintPack32: return "32-bit"; case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8SrgbPack32: return "32-bit"; case VULKAN_HPP_NAMESPACE::Format::eA2R10G10B10UnormPack32: return "32-bit"; case VULKAN_HPP_NAMESPACE::Format::eA2R10G10B10SnormPack32: return "32-bit"; case VULKAN_HPP_NAMESPACE::Format::eA2R10G10B10UscaledPack32: return "32-bit"; case VULKAN_HPP_NAMESPACE::Format::eA2R10G10B10SscaledPack32: return "32-bit"; case VULKAN_HPP_NAMESPACE::Format::eA2R10G10B10UintPack32: return "32-bit"; case VULKAN_HPP_NAMESPACE::Format::eA2R10G10B10SintPack32: return "32-bit"; case VULKAN_HPP_NAMESPACE::Format::eA2B10G10R10UnormPack32: return "32-bit"; case VULKAN_HPP_NAMESPACE::Format::eA2B10G10R10SnormPack32: return "32-bit"; case VULKAN_HPP_NAMESPACE::Format::eA2B10G10R10UscaledPack32: return "32-bit"; case VULKAN_HPP_NAMESPACE::Format::eA2B10G10R10SscaledPack32: return "32-bit"; case VULKAN_HPP_NAMESPACE::Format::eA2B10G10R10UintPack32: return "32-bit"; case VULKAN_HPP_NAMESPACE::Format::eA2B10G10R10SintPack32: return "32-bit"; case VULKAN_HPP_NAMESPACE::Format::eR16Unorm: return "16-bit"; case VULKAN_HPP_NAMESPACE::Format::eR16Snorm: return "16-bit"; case VULKAN_HPP_NAMESPACE::Format::eR16Uscaled: return "16-bit"; case VULKAN_HPP_NAMESPACE::Format::eR16Sscaled: return "16-bit"; case VULKAN_HPP_NAMESPACE::Format::eR16Uint: return "16-bit"; case VULKAN_HPP_NAMESPACE::Format::eR16Sint: return "16-bit"; case VULKAN_HPP_NAMESPACE::Format::eR16Sfloat: return "16-bit"; case VULKAN_HPP_NAMESPACE::Format::eR16G16Unorm: return "32-bit"; case VULKAN_HPP_NAMESPACE::Format::eR16G16Snorm: return "32-bit"; case VULKAN_HPP_NAMESPACE::Format::eR16G16Uscaled: return "32-bit"; case VULKAN_HPP_NAMESPACE::Format::eR16G16Sscaled: return "32-bit"; case VULKAN_HPP_NAMESPACE::Format::eR16G16Uint: return "32-bit"; case VULKAN_HPP_NAMESPACE::Format::eR16G16Sint: return "32-bit"; case VULKAN_HPP_NAMESPACE::Format::eR16G16Sfloat: return "32-bit"; case VULKAN_HPP_NAMESPACE::Format::eR16G16B16Unorm: return "48-bit"; case VULKAN_HPP_NAMESPACE::Format::eR16G16B16Snorm: return "48-bit"; case VULKAN_HPP_NAMESPACE::Format::eR16G16B16Uscaled: return "48-bit"; case VULKAN_HPP_NAMESPACE::Format::eR16G16B16Sscaled: return "48-bit"; case VULKAN_HPP_NAMESPACE::Format::eR16G16B16Uint: return "48-bit"; case VULKAN_HPP_NAMESPACE::Format::eR16G16B16Sint: return "48-bit"; case VULKAN_HPP_NAMESPACE::Format::eR16G16B16Sfloat: return "48-bit"; case VULKAN_HPP_NAMESPACE::Format::eR16G16B16A16Unorm: return "64-bit"; case VULKAN_HPP_NAMESPACE::Format::eR16G16B16A16Snorm: return "64-bit"; case VULKAN_HPP_NAMESPACE::Format::eR16G16B16A16Uscaled: return "64-bit"; case VULKAN_HPP_NAMESPACE::Format::eR16G16B16A16Sscaled: return "64-bit"; case VULKAN_HPP_NAMESPACE::Format::eR16G16B16A16Uint: return "64-bit"; case VULKAN_HPP_NAMESPACE::Format::eR16G16B16A16Sint: return "64-bit"; case VULKAN_HPP_NAMESPACE::Format::eR16G16B16A16Sfloat: return "64-bit"; case VULKAN_HPP_NAMESPACE::Format::eR32Uint: return "32-bit"; case VULKAN_HPP_NAMESPACE::Format::eR32Sint: return "32-bit"; case VULKAN_HPP_NAMESPACE::Format::eR32Sfloat: return "32-bit"; case VULKAN_HPP_NAMESPACE::Format::eR32G32Uint: return "64-bit"; case VULKAN_HPP_NAMESPACE::Format::eR32G32Sint: return "64-bit"; case VULKAN_HPP_NAMESPACE::Format::eR32G32Sfloat: return "64-bit"; case VULKAN_HPP_NAMESPACE::Format::eR32G32B32Uint: return "96-bit"; case VULKAN_HPP_NAMESPACE::Format::eR32G32B32Sint: return "96-bit"; case VULKAN_HPP_NAMESPACE::Format::eR32G32B32Sfloat: return "96-bit"; case VULKAN_HPP_NAMESPACE::Format::eR32G32B32A32Uint: return "128-bit"; case VULKAN_HPP_NAMESPACE::Format::eR32G32B32A32Sint: return "128-bit"; case VULKAN_HPP_NAMESPACE::Format::eR32G32B32A32Sfloat: return "128-bit"; case VULKAN_HPP_NAMESPACE::Format::eR64Uint: return "64-bit"; case VULKAN_HPP_NAMESPACE::Format::eR64Sint: return "64-bit"; case VULKAN_HPP_NAMESPACE::Format::eR64Sfloat: return "64-bit"; case VULKAN_HPP_NAMESPACE::Format::eR64G64Uint: return "128-bit"; case VULKAN_HPP_NAMESPACE::Format::eR64G64Sint: return "128-bit"; case VULKAN_HPP_NAMESPACE::Format::eR64G64Sfloat: return "128-bit"; case VULKAN_HPP_NAMESPACE::Format::eR64G64B64Uint: return "192-bit"; case VULKAN_HPP_NAMESPACE::Format::eR64G64B64Sint: return "192-bit"; case VULKAN_HPP_NAMESPACE::Format::eR64G64B64Sfloat: return "192-bit"; case VULKAN_HPP_NAMESPACE::Format::eR64G64B64A64Uint: return "256-bit"; case VULKAN_HPP_NAMESPACE::Format::eR64G64B64A64Sint: return "256-bit"; case VULKAN_HPP_NAMESPACE::Format::eR64G64B64A64Sfloat: return "256-bit"; case VULKAN_HPP_NAMESPACE::Format::eB10G11R11UfloatPack32: return "32-bit"; case VULKAN_HPP_NAMESPACE::Format::eE5B9G9R9UfloatPack32: return "32-bit"; case VULKAN_HPP_NAMESPACE::Format::eD16Unorm: return "D16"; case VULKAN_HPP_NAMESPACE::Format::eX8D24UnormPack32: return "D24"; case VULKAN_HPP_NAMESPACE::Format::eD32Sfloat: return "D32"; case VULKAN_HPP_NAMESPACE::Format::eS8Uint: return "S8"; case VULKAN_HPP_NAMESPACE::Format::eD16UnormS8Uint: return "D16S8"; case VULKAN_HPP_NAMESPACE::Format::eD24UnormS8Uint: return "D24S8"; case VULKAN_HPP_NAMESPACE::Format::eD32SfloatS8Uint: return "D32S8"; case VULKAN_HPP_NAMESPACE::Format::eBc1RgbUnormBlock: return "BC1_RGB"; case VULKAN_HPP_NAMESPACE::Format::eBc1RgbSrgbBlock: return "BC1_RGB"; case VULKAN_HPP_NAMESPACE::Format::eBc1RgbaUnormBlock: return "BC1_RGBA"; case VULKAN_HPP_NAMESPACE::Format::eBc1RgbaSrgbBlock: return "BC1_RGBA"; case VULKAN_HPP_NAMESPACE::Format::eBc2UnormBlock: return "BC2"; case VULKAN_HPP_NAMESPACE::Format::eBc2SrgbBlock: return "BC2"; case VULKAN_HPP_NAMESPACE::Format::eBc3UnormBlock: return "BC3"; case VULKAN_HPP_NAMESPACE::Format::eBc3SrgbBlock: return "BC3"; case VULKAN_HPP_NAMESPACE::Format::eBc4UnormBlock: return "BC4"; case VULKAN_HPP_NAMESPACE::Format::eBc4SnormBlock: return "BC4"; case VULKAN_HPP_NAMESPACE::Format::eBc5UnormBlock: return "BC5"; case VULKAN_HPP_NAMESPACE::Format::eBc5SnormBlock: return "BC5"; case VULKAN_HPP_NAMESPACE::Format::eBc6HUfloatBlock: return "BC6H"; case VULKAN_HPP_NAMESPACE::Format::eBc6HSfloatBlock: return "BC6H"; case VULKAN_HPP_NAMESPACE::Format::eBc7UnormBlock: return "BC7"; case VULKAN_HPP_NAMESPACE::Format::eBc7SrgbBlock: return "BC7"; case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8UnormBlock: return "ETC2_RGB"; case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8SrgbBlock: return "ETC2_RGB"; case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8A1UnormBlock: return "ETC2_RGBA"; case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8A1SrgbBlock: return "ETC2_RGBA"; case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8A8UnormBlock: return "ETC2_EAC_RGBA"; case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8A8SrgbBlock: return "ETC2_EAC_RGBA"; case VULKAN_HPP_NAMESPACE::Format::eEacR11UnormBlock: return "EAC_R"; case VULKAN_HPP_NAMESPACE::Format::eEacR11SnormBlock: return "EAC_R"; case VULKAN_HPP_NAMESPACE::Format::eEacR11G11UnormBlock: return "EAC_RG"; case VULKAN_HPP_NAMESPACE::Format::eEacR11G11SnormBlock: return "EAC_RG"; case VULKAN_HPP_NAMESPACE::Format::eAstc4x4UnormBlock: return "ASTC_4x4"; case VULKAN_HPP_NAMESPACE::Format::eAstc4x4SrgbBlock: return "ASTC_4x4"; case VULKAN_HPP_NAMESPACE::Format::eAstc5x4UnormBlock: return "ASTC_5x4"; case VULKAN_HPP_NAMESPACE::Format::eAstc5x4SrgbBlock: return "ASTC_5x4"; case VULKAN_HPP_NAMESPACE::Format::eAstc5x5UnormBlock: return "ASTC_5x5"; case VULKAN_HPP_NAMESPACE::Format::eAstc5x5SrgbBlock: return "ASTC_5x5"; case VULKAN_HPP_NAMESPACE::Format::eAstc6x5UnormBlock: return "ASTC_6x5"; case VULKAN_HPP_NAMESPACE::Format::eAstc6x5SrgbBlock: return "ASTC_6x5"; case VULKAN_HPP_NAMESPACE::Format::eAstc6x6UnormBlock: return "ASTC_6x6"; case VULKAN_HPP_NAMESPACE::Format::eAstc6x6SrgbBlock: return "ASTC_6x6"; case VULKAN_HPP_NAMESPACE::Format::eAstc8x5UnormBlock: return "ASTC_8x5"; case VULKAN_HPP_NAMESPACE::Format::eAstc8x5SrgbBlock: return "ASTC_8x5"; case VULKAN_HPP_NAMESPACE::Format::eAstc8x6UnormBlock: return "ASTC_8x6"; case VULKAN_HPP_NAMESPACE::Format::eAstc8x6SrgbBlock: return "ASTC_8x6"; case VULKAN_HPP_NAMESPACE::Format::eAstc8x8UnormBlock: return "ASTC_8x8"; case VULKAN_HPP_NAMESPACE::Format::eAstc8x8SrgbBlock: return "ASTC_8x8"; case VULKAN_HPP_NAMESPACE::Format::eAstc10x5UnormBlock: return "ASTC_10x5"; case VULKAN_HPP_NAMESPACE::Format::eAstc10x5SrgbBlock: return "ASTC_10x5"; case VULKAN_HPP_NAMESPACE::Format::eAstc10x6UnormBlock: return "ASTC_10x6"; case VULKAN_HPP_NAMESPACE::Format::eAstc10x6SrgbBlock: return "ASTC_10x6"; case VULKAN_HPP_NAMESPACE::Format::eAstc10x8UnormBlock: return "ASTC_10x8"; case VULKAN_HPP_NAMESPACE::Format::eAstc10x8SrgbBlock: return "ASTC_10x8"; case VULKAN_HPP_NAMESPACE::Format::eAstc10x10UnormBlock: return "ASTC_10x10"; case VULKAN_HPP_NAMESPACE::Format::eAstc10x10SrgbBlock: return "ASTC_10x10"; case VULKAN_HPP_NAMESPACE::Format::eAstc12x10UnormBlock: return "ASTC_12x10"; case VULKAN_HPP_NAMESPACE::Format::eAstc12x10SrgbBlock: return "ASTC_12x10"; case VULKAN_HPP_NAMESPACE::Format::eAstc12x12UnormBlock: return "ASTC_12x12"; case VULKAN_HPP_NAMESPACE::Format::eAstc12x12SrgbBlock: return "ASTC_12x12"; case VULKAN_HPP_NAMESPACE::Format::eG8B8G8R8422Unorm: return "32-bit G8B8G8R8"; case VULKAN_HPP_NAMESPACE::Format::eB8G8R8G8422Unorm: return "32-bit B8G8R8G8"; case VULKAN_HPP_NAMESPACE::Format::eG8B8R83Plane420Unorm: return "8-bit 3-plane 420"; case VULKAN_HPP_NAMESPACE::Format::eG8B8R82Plane420Unorm: return "8-bit 2-plane 420"; case VULKAN_HPP_NAMESPACE::Format::eG8B8R83Plane422Unorm: return "8-bit 3-plane 422"; case VULKAN_HPP_NAMESPACE::Format::eG8B8R82Plane422Unorm: return "8-bit 2-plane 422"; case VULKAN_HPP_NAMESPACE::Format::eG8B8R83Plane444Unorm: return "8-bit 3-plane 444"; case VULKAN_HPP_NAMESPACE::Format::eR10X6UnormPack16: return "16-bit"; case VULKAN_HPP_NAMESPACE::Format::eR10X6G10X6Unorm2Pack16: return "32-bit"; case VULKAN_HPP_NAMESPACE::Format::eR10X6G10X6B10X6A10X6Unorm4Pack16: return "64-bit R10G10B10A10"; case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6G10X6R10X6422Unorm4Pack16: return "64-bit G10B10G10R10"; case VULKAN_HPP_NAMESPACE::Format::eB10X6G10X6R10X6G10X6422Unorm4Pack16: return "64-bit B10G10R10G10"; case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X63Plane420Unorm3Pack16: return "10-bit 3-plane 420"; case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X62Plane420Unorm3Pack16: return "10-bit 2-plane 420"; case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X63Plane422Unorm3Pack16: return "10-bit 3-plane 422"; case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X62Plane422Unorm3Pack16: return "10-bit 2-plane 422"; case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X63Plane444Unorm3Pack16: return "10-bit 3-plane 444"; case VULKAN_HPP_NAMESPACE::Format::eR12X4UnormPack16: return "16-bit"; case VULKAN_HPP_NAMESPACE::Format::eR12X4G12X4Unorm2Pack16: return "32-bit"; case VULKAN_HPP_NAMESPACE::Format::eR12X4G12X4B12X4A12X4Unorm4Pack16: return "64-bit R12G12B12A12"; case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4G12X4R12X4422Unorm4Pack16: return "64-bit G12B12G12R12"; case VULKAN_HPP_NAMESPACE::Format::eB12X4G12X4R12X4G12X4422Unorm4Pack16: return "64-bit B12G12R12G12"; case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X43Plane420Unorm3Pack16: return "12-bit 3-plane 420"; case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X42Plane420Unorm3Pack16: return "12-bit 2-plane 420"; case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X43Plane422Unorm3Pack16: return "12-bit 3-plane 422"; case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X42Plane422Unorm3Pack16: return "12-bit 2-plane 422"; case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X43Plane444Unorm3Pack16: return "12-bit 3-plane 444"; case VULKAN_HPP_NAMESPACE::Format::eG16B16G16R16422Unorm: return "64-bit G16B16G16R16"; case VULKAN_HPP_NAMESPACE::Format::eB16G16R16G16422Unorm: return "64-bit B16G16R16G16"; case VULKAN_HPP_NAMESPACE::Format::eG16B16R163Plane420Unorm: return "16-bit 3-plane 420"; case VULKAN_HPP_NAMESPACE::Format::eG16B16R162Plane420Unorm: return "16-bit 2-plane 420"; case VULKAN_HPP_NAMESPACE::Format::eG16B16R163Plane422Unorm: return "16-bit 3-plane 422"; case VULKAN_HPP_NAMESPACE::Format::eG16B16R162Plane422Unorm: return "16-bit 2-plane 422"; case VULKAN_HPP_NAMESPACE::Format::eG16B16R163Plane444Unorm: return "16-bit 3-plane 444"; case VULKAN_HPP_NAMESPACE::Format::eG8B8R82Plane444Unorm: return "8-bit 2-plane 444"; case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X62Plane444Unorm3Pack16: return "10-bit 2-plane 444"; case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X42Plane444Unorm3Pack16: return "12-bit 2-plane 444"; case VULKAN_HPP_NAMESPACE::Format::eG16B16R162Plane444Unorm: return "16-bit 2-plane 444"; case VULKAN_HPP_NAMESPACE::Format::eA4R4G4B4UnormPack16: return "16-bit"; case VULKAN_HPP_NAMESPACE::Format::eA4B4G4R4UnormPack16: return "16-bit"; case VULKAN_HPP_NAMESPACE::Format::eAstc4x4SfloatBlock: return "ASTC_4x4"; case VULKAN_HPP_NAMESPACE::Format::eAstc5x4SfloatBlock: return "ASTC_5x4"; case VULKAN_HPP_NAMESPACE::Format::eAstc5x5SfloatBlock: return "ASTC_5x5"; case VULKAN_HPP_NAMESPACE::Format::eAstc6x5SfloatBlock: return "ASTC_6x5"; case VULKAN_HPP_NAMESPACE::Format::eAstc6x6SfloatBlock: return "ASTC_6x6"; case VULKAN_HPP_NAMESPACE::Format::eAstc8x5SfloatBlock: return "ASTC_8x5"; case VULKAN_HPP_NAMESPACE::Format::eAstc8x6SfloatBlock: return "ASTC_8x6"; case VULKAN_HPP_NAMESPACE::Format::eAstc8x8SfloatBlock: return "ASTC_8x8"; case VULKAN_HPP_NAMESPACE::Format::eAstc10x5SfloatBlock: return "ASTC_10x5"; case VULKAN_HPP_NAMESPACE::Format::eAstc10x6SfloatBlock: return "ASTC_10x6"; case VULKAN_HPP_NAMESPACE::Format::eAstc10x8SfloatBlock: return "ASTC_10x8"; case VULKAN_HPP_NAMESPACE::Format::eAstc10x10SfloatBlock: return "ASTC_10x10"; case VULKAN_HPP_NAMESPACE::Format::eAstc12x10SfloatBlock: return "ASTC_12x10"; case VULKAN_HPP_NAMESPACE::Format::eAstc12x12SfloatBlock: return "ASTC_12x12"; case VULKAN_HPP_NAMESPACE::Format::eA1B5G5R5UnormPack16: return "16-bit"; case VULKAN_HPP_NAMESPACE::Format::eA8Unorm: return "8-bit alpha"; case VULKAN_HPP_NAMESPACE::Format::ePvrtc12BppUnormBlockIMG: return "PVRTC1_2BPP"; case VULKAN_HPP_NAMESPACE::Format::ePvrtc14BppUnormBlockIMG: return "PVRTC1_4BPP"; case VULKAN_HPP_NAMESPACE::Format::ePvrtc22BppUnormBlockIMG: return "PVRTC2_2BPP"; case VULKAN_HPP_NAMESPACE::Format::ePvrtc24BppUnormBlockIMG: return "PVRTC2_4BPP"; case VULKAN_HPP_NAMESPACE::Format::ePvrtc12BppSrgbBlockIMG: return "PVRTC1_2BPP"; case VULKAN_HPP_NAMESPACE::Format::ePvrtc14BppSrgbBlockIMG: return "PVRTC1_4BPP"; case VULKAN_HPP_NAMESPACE::Format::ePvrtc22BppSrgbBlockIMG: return "PVRTC2_2BPP"; case VULKAN_HPP_NAMESPACE::Format::ePvrtc24BppSrgbBlockIMG: return "PVRTC2_4BPP"; case VULKAN_HPP_NAMESPACE::Format::eR16G16Sfixed5NV: return "32-bit"; default: VULKAN_HPP_ASSERT( false ); return ""; } } // The number of bits in this component, if not compressed, otherwise 0. VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR_14 uint8_t componentBits( VULKAN_HPP_NAMESPACE::Format format, uint8_t component ) { switch ( format ) { case VULKAN_HPP_NAMESPACE::Format::eR4G4UnormPack8: switch ( component ) { case 0: return 4; case 1: return 4; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eR4G4B4A4UnormPack16: switch ( component ) { case 0: return 4; case 1: return 4; case 2: return 4; case 3: return 4; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eB4G4R4A4UnormPack16: switch ( component ) { case 0: return 4; case 1: return 4; case 2: return 4; case 3: return 4; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eR5G6B5UnormPack16: switch ( component ) { case 0: return 5; case 1: return 6; case 2: return 5; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eB5G6R5UnormPack16: switch ( component ) { case 0: return 5; case 1: return 6; case 2: return 5; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eR5G5B5A1UnormPack16: switch ( component ) { case 0: return 5; case 1: return 5; case 2: return 5; case 3: return 1; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eB5G5R5A1UnormPack16: switch ( component ) { case 0: return 5; case 1: return 5; case 2: return 5; case 3: return 1; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eA1R5G5B5UnormPack16: switch ( component ) { case 0: return 1; case 1: return 5; case 2: return 5; case 3: return 5; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eR8Unorm: switch ( component ) { case 0: return 8; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eR8Snorm: switch ( component ) { case 0: return 8; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eR8Uscaled: switch ( component ) { case 0: return 8; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eR8Sscaled: switch ( component ) { case 0: return 8; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eR8Uint: switch ( component ) { case 0: return 8; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eR8Sint: switch ( component ) { case 0: return 8; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eR8Srgb: switch ( component ) { case 0: return 8; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eR8G8Unorm: switch ( component ) { case 0: return 8; case 1: return 8; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eR8G8Snorm: switch ( component ) { case 0: return 8; case 1: return 8; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eR8G8Uscaled: switch ( component ) { case 0: return 8; case 1: return 8; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eR8G8Sscaled: switch ( component ) { case 0: return 8; case 1: return 8; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eR8G8Uint: switch ( component ) { case 0: return 8; case 1: return 8; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eR8G8Sint: switch ( component ) { case 0: return 8; case 1: return 8; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eR8G8Srgb: switch ( component ) { case 0: return 8; case 1: return 8; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eR8G8B8Unorm: switch ( component ) { case 0: return 8; case 1: return 8; case 2: return 8; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eR8G8B8Snorm: switch ( component ) { case 0: return 8; case 1: return 8; case 2: return 8; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eR8G8B8Uscaled: switch ( component ) { case 0: return 8; case 1: return 8; case 2: return 8; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eR8G8B8Sscaled: switch ( component ) { case 0: return 8; case 1: return 8; case 2: return 8; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eR8G8B8Uint: switch ( component ) { case 0: return 8; case 1: return 8; case 2: return 8; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eR8G8B8Sint: switch ( component ) { case 0: return 8; case 1: return 8; case 2: return 8; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eR8G8B8Srgb: switch ( component ) { case 0: return 8; case 1: return 8; case 2: return 8; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eB8G8R8Unorm: switch ( component ) { case 0: return 8; case 1: return 8; case 2: return 8; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eB8G8R8Snorm: switch ( component ) { case 0: return 8; case 1: return 8; case 2: return 8; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eB8G8R8Uscaled: switch ( component ) { case 0: return 8; case 1: return 8; case 2: return 8; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eB8G8R8Sscaled: switch ( component ) { case 0: return 8; case 1: return 8; case 2: return 8; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eB8G8R8Uint: switch ( component ) { case 0: return 8; case 1: return 8; case 2: return 8; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eB8G8R8Sint: switch ( component ) { case 0: return 8; case 1: return 8; case 2: return 8; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eB8G8R8Srgb: switch ( component ) { case 0: return 8; case 1: return 8; case 2: return 8; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eR8G8B8A8Unorm: switch ( component ) { case 0: return 8; case 1: return 8; case 2: return 8; case 3: return 8; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eR8G8B8A8Snorm: switch ( component ) { case 0: return 8; case 1: return 8; case 2: return 8; case 3: return 8; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eR8G8B8A8Uscaled: switch ( component ) { case 0: return 8; case 1: return 8; case 2: return 8; case 3: return 8; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eR8G8B8A8Sscaled: switch ( component ) { case 0: return 8; case 1: return 8; case 2: return 8; case 3: return 8; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eR8G8B8A8Uint: switch ( component ) { case 0: return 8; case 1: return 8; case 2: return 8; case 3: return 8; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eR8G8B8A8Sint: switch ( component ) { case 0: return 8; case 1: return 8; case 2: return 8; case 3: return 8; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eR8G8B8A8Srgb: switch ( component ) { case 0: return 8; case 1: return 8; case 2: return 8; case 3: return 8; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Unorm: switch ( component ) { case 0: return 8; case 1: return 8; case 2: return 8; case 3: return 8; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Snorm: switch ( component ) { case 0: return 8; case 1: return 8; case 2: return 8; case 3: return 8; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Uscaled: switch ( component ) { case 0: return 8; case 1: return 8; case 2: return 8; case 3: return 8; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Sscaled: switch ( component ) { case 0: return 8; case 1: return 8; case 2: return 8; case 3: return 8; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Uint: switch ( component ) { case 0: return 8; case 1: return 8; case 2: return 8; case 3: return 8; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Sint: switch ( component ) { case 0: return 8; case 1: return 8; case 2: return 8; case 3: return 8; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Srgb: switch ( component ) { case 0: return 8; case 1: return 8; case 2: return 8; case 3: return 8; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8UnormPack32: switch ( component ) { case 0: return 8; case 1: return 8; case 2: return 8; case 3: return 8; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8SnormPack32: switch ( component ) { case 0: return 8; case 1: return 8; case 2: return 8; case 3: return 8; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8UscaledPack32: switch ( component ) { case 0: return 8; case 1: return 8; case 2: return 8; case 3: return 8; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8SscaledPack32: switch ( component ) { case 0: return 8; case 1: return 8; case 2: return 8; case 3: return 8; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8UintPack32: switch ( component ) { case 0: return 8; case 1: return 8; case 2: return 8; case 3: return 8; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8SintPack32: switch ( component ) { case 0: return 8; case 1: return 8; case 2: return 8; case 3: return 8; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8SrgbPack32: switch ( component ) { case 0: return 8; case 1: return 8; case 2: return 8; case 3: return 8; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eA2R10G10B10UnormPack32: switch ( component ) { case 0: return 2; case 1: return 10; case 2: return 10; case 3: return 10; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eA2R10G10B10SnormPack32: switch ( component ) { case 0: return 2; case 1: return 10; case 2: return 10; case 3: return 10; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eA2R10G10B10UscaledPack32: switch ( component ) { case 0: return 2; case 1: return 10; case 2: return 10; case 3: return 10; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eA2R10G10B10SscaledPack32: switch ( component ) { case 0: return 2; case 1: return 10; case 2: return 10; case 3: return 10; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eA2R10G10B10UintPack32: switch ( component ) { case 0: return 2; case 1: return 10; case 2: return 10; case 3: return 10; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eA2R10G10B10SintPack32: switch ( component ) { case 0: return 2; case 1: return 10; case 2: return 10; case 3: return 10; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eA2B10G10R10UnormPack32: switch ( component ) { case 0: return 2; case 1: return 10; case 2: return 10; case 3: return 10; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eA2B10G10R10SnormPack32: switch ( component ) { case 0: return 2; case 1: return 10; case 2: return 10; case 3: return 10; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eA2B10G10R10UscaledPack32: switch ( component ) { case 0: return 2; case 1: return 10; case 2: return 10; case 3: return 10; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eA2B10G10R10SscaledPack32: switch ( component ) { case 0: return 2; case 1: return 10; case 2: return 10; case 3: return 10; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eA2B10G10R10UintPack32: switch ( component ) { case 0: return 2; case 1: return 10; case 2: return 10; case 3: return 10; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eA2B10G10R10SintPack32: switch ( component ) { case 0: return 2; case 1: return 10; case 2: return 10; case 3: return 10; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eR16Unorm: switch ( component ) { case 0: return 16; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eR16Snorm: switch ( component ) { case 0: return 16; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eR16Uscaled: switch ( component ) { case 0: return 16; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eR16Sscaled: switch ( component ) { case 0: return 16; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eR16Uint: switch ( component ) { case 0: return 16; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eR16Sint: switch ( component ) { case 0: return 16; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eR16Sfloat: switch ( component ) { case 0: return 16; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eR16G16Unorm: switch ( component ) { case 0: return 16; case 1: return 16; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eR16G16Snorm: switch ( component ) { case 0: return 16; case 1: return 16; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eR16G16Uscaled: switch ( component ) { case 0: return 16; case 1: return 16; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eR16G16Sscaled: switch ( component ) { case 0: return 16; case 1: return 16; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eR16G16Uint: switch ( component ) { case 0: return 16; case 1: return 16; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eR16G16Sint: switch ( component ) { case 0: return 16; case 1: return 16; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eR16G16Sfloat: switch ( component ) { case 0: return 16; case 1: return 16; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eR16G16B16Unorm: switch ( component ) { case 0: return 16; case 1: return 16; case 2: return 16; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eR16G16B16Snorm: switch ( component ) { case 0: return 16; case 1: return 16; case 2: return 16; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eR16G16B16Uscaled: switch ( component ) { case 0: return 16; case 1: return 16; case 2: return 16; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eR16G16B16Sscaled: switch ( component ) { case 0: return 16; case 1: return 16; case 2: return 16; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eR16G16B16Uint: switch ( component ) { case 0: return 16; case 1: return 16; case 2: return 16; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eR16G16B16Sint: switch ( component ) { case 0: return 16; case 1: return 16; case 2: return 16; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eR16G16B16Sfloat: switch ( component ) { case 0: return 16; case 1: return 16; case 2: return 16; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eR16G16B16A16Unorm: switch ( component ) { case 0: return 16; case 1: return 16; case 2: return 16; case 3: return 16; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eR16G16B16A16Snorm: switch ( component ) { case 0: return 16; case 1: return 16; case 2: return 16; case 3: return 16; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eR16G16B16A16Uscaled: switch ( component ) { case 0: return 16; case 1: return 16; case 2: return 16; case 3: return 16; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eR16G16B16A16Sscaled: switch ( component ) { case 0: return 16; case 1: return 16; case 2: return 16; case 3: return 16; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eR16G16B16A16Uint: switch ( component ) { case 0: return 16; case 1: return 16; case 2: return 16; case 3: return 16; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eR16G16B16A16Sint: switch ( component ) { case 0: return 16; case 1: return 16; case 2: return 16; case 3: return 16; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eR16G16B16A16Sfloat: switch ( component ) { case 0: return 16; case 1: return 16; case 2: return 16; case 3: return 16; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eR32Uint: switch ( component ) { case 0: return 32; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eR32Sint: switch ( component ) { case 0: return 32; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eR32Sfloat: switch ( component ) { case 0: return 32; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eR32G32Uint: switch ( component ) { case 0: return 32; case 1: return 32; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eR32G32Sint: switch ( component ) { case 0: return 32; case 1: return 32; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eR32G32Sfloat: switch ( component ) { case 0: return 32; case 1: return 32; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eR32G32B32Uint: switch ( component ) { case 0: return 32; case 1: return 32; case 2: return 32; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eR32G32B32Sint: switch ( component ) { case 0: return 32; case 1: return 32; case 2: return 32; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eR32G32B32Sfloat: switch ( component ) { case 0: return 32; case 1: return 32; case 2: return 32; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eR32G32B32A32Uint: switch ( component ) { case 0: return 32; case 1: return 32; case 2: return 32; case 3: return 32; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eR32G32B32A32Sint: switch ( component ) { case 0: return 32; case 1: return 32; case 2: return 32; case 3: return 32; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eR32G32B32A32Sfloat: switch ( component ) { case 0: return 32; case 1: return 32; case 2: return 32; case 3: return 32; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eR64Uint: switch ( component ) { case 0: return 64; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eR64Sint: switch ( component ) { case 0: return 64; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eR64Sfloat: switch ( component ) { case 0: return 64; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eR64G64Uint: switch ( component ) { case 0: return 64; case 1: return 64; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eR64G64Sint: switch ( component ) { case 0: return 64; case 1: return 64; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eR64G64Sfloat: switch ( component ) { case 0: return 64; case 1: return 64; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eR64G64B64Uint: switch ( component ) { case 0: return 64; case 1: return 64; case 2: return 64; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eR64G64B64Sint: switch ( component ) { case 0: return 64; case 1: return 64; case 2: return 64; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eR64G64B64Sfloat: switch ( component ) { case 0: return 64; case 1: return 64; case 2: return 64; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eR64G64B64A64Uint: switch ( component ) { case 0: return 64; case 1: return 64; case 2: return 64; case 3: return 64; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eR64G64B64A64Sint: switch ( component ) { case 0: return 64; case 1: return 64; case 2: return 64; case 3: return 64; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eR64G64B64A64Sfloat: switch ( component ) { case 0: return 64; case 1: return 64; case 2: return 64; case 3: return 64; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eB10G11R11UfloatPack32: switch ( component ) { case 0: return 10; case 1: return 11; case 2: return 11; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eE5B9G9R9UfloatPack32: switch ( component ) { case 0: return 9; case 1: return 9; case 2: return 9; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eD16Unorm: switch ( component ) { case 0: return 16; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eX8D24UnormPack32: switch ( component ) { case 0: return 24; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eD32Sfloat: switch ( component ) { case 0: return 32; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eS8Uint: switch ( component ) { case 0: return 8; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eD16UnormS8Uint: switch ( component ) { case 0: return 16; case 1: return 8; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eD24UnormS8Uint: switch ( component ) { case 0: return 24; case 1: return 8; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eD32SfloatS8Uint: switch ( component ) { case 0: return 32; case 1: return 8; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eEacR11UnormBlock: switch ( component ) { case 0: return 11; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eEacR11SnormBlock: switch ( component ) { case 0: return 11; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eEacR11G11UnormBlock: switch ( component ) { case 0: return 11; case 1: return 11; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eEacR11G11SnormBlock: switch ( component ) { case 0: return 11; case 1: return 11; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eG8B8G8R8422Unorm: switch ( component ) { case 0: return 8; case 1: return 8; case 2: return 8; case 3: return 8; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eB8G8R8G8422Unorm: switch ( component ) { case 0: return 8; case 1: return 8; case 2: return 8; case 3: return 8; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eG8B8R83Plane420Unorm: switch ( component ) { case 0: return 8; case 1: return 8; case 2: return 8; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eG8B8R82Plane420Unorm: switch ( component ) { case 0: return 8; case 1: return 8; case 2: return 8; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eG8B8R83Plane422Unorm: switch ( component ) { case 0: return 8; case 1: return 8; case 2: return 8; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eG8B8R82Plane422Unorm: switch ( component ) { case 0: return 8; case 1: return 8; case 2: return 8; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eG8B8R83Plane444Unorm: switch ( component ) { case 0: return 8; case 1: return 8; case 2: return 8; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eR10X6UnormPack16: switch ( component ) { case 0: return 10; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eR10X6G10X6Unorm2Pack16: switch ( component ) { case 0: return 10; case 1: return 10; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eR10X6G10X6B10X6A10X6Unorm4Pack16: switch ( component ) { case 0: return 10; case 1: return 10; case 2: return 10; case 3: return 10; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6G10X6R10X6422Unorm4Pack16: switch ( component ) { case 0: return 10; case 1: return 10; case 2: return 10; case 3: return 10; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eB10X6G10X6R10X6G10X6422Unorm4Pack16: switch ( component ) { case 0: return 10; case 1: return 10; case 2: return 10; case 3: return 10; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X63Plane420Unorm3Pack16: switch ( component ) { case 0: return 10; case 1: return 10; case 2: return 10; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X62Plane420Unorm3Pack16: switch ( component ) { case 0: return 10; case 1: return 10; case 2: return 10; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X63Plane422Unorm3Pack16: switch ( component ) { case 0: return 10; case 1: return 10; case 2: return 10; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X62Plane422Unorm3Pack16: switch ( component ) { case 0: return 10; case 1: return 10; case 2: return 10; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X63Plane444Unorm3Pack16: switch ( component ) { case 0: return 10; case 1: return 10; case 2: return 10; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eR12X4UnormPack16: switch ( component ) { case 0: return 12; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eR12X4G12X4Unorm2Pack16: switch ( component ) { case 0: return 12; case 1: return 12; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eR12X4G12X4B12X4A12X4Unorm4Pack16: switch ( component ) { case 0: return 12; case 1: return 12; case 2: return 12; case 3: return 12; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4G12X4R12X4422Unorm4Pack16: switch ( component ) { case 0: return 12; case 1: return 12; case 2: return 12; case 3: return 12; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eB12X4G12X4R12X4G12X4422Unorm4Pack16: switch ( component ) { case 0: return 12; case 1: return 12; case 2: return 12; case 3: return 12; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X43Plane420Unorm3Pack16: switch ( component ) { case 0: return 12; case 1: return 12; case 2: return 12; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X42Plane420Unorm3Pack16: switch ( component ) { case 0: return 12; case 1: return 12; case 2: return 12; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X43Plane422Unorm3Pack16: switch ( component ) { case 0: return 12; case 1: return 12; case 2: return 12; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X42Plane422Unorm3Pack16: switch ( component ) { case 0: return 12; case 1: return 12; case 2: return 12; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X43Plane444Unorm3Pack16: switch ( component ) { case 0: return 12; case 1: return 12; case 2: return 12; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eG16B16G16R16422Unorm: switch ( component ) { case 0: return 16; case 1: return 16; case 2: return 16; case 3: return 16; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eB16G16R16G16422Unorm: switch ( component ) { case 0: return 16; case 1: return 16; case 2: return 16; case 3: return 16; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eG16B16R163Plane420Unorm: switch ( component ) { case 0: return 16; case 1: return 16; case 2: return 16; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eG16B16R162Plane420Unorm: switch ( component ) { case 0: return 16; case 1: return 16; case 2: return 16; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eG16B16R163Plane422Unorm: switch ( component ) { case 0: return 16; case 1: return 16; case 2: return 16; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eG16B16R162Plane422Unorm: switch ( component ) { case 0: return 16; case 1: return 16; case 2: return 16; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eG16B16R163Plane444Unorm: switch ( component ) { case 0: return 16; case 1: return 16; case 2: return 16; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eG8B8R82Plane444Unorm: switch ( component ) { case 0: return 8; case 1: return 8; case 2: return 8; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X62Plane444Unorm3Pack16: switch ( component ) { case 0: return 10; case 1: return 10; case 2: return 10; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X42Plane444Unorm3Pack16: switch ( component ) { case 0: return 12; case 1: return 12; case 2: return 12; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eG16B16R162Plane444Unorm: switch ( component ) { case 0: return 16; case 1: return 16; case 2: return 16; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eA4R4G4B4UnormPack16: switch ( component ) { case 0: return 4; case 1: return 4; case 2: return 4; case 3: return 4; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eA4B4G4R4UnormPack16: switch ( component ) { case 0: return 4; case 1: return 4; case 2: return 4; case 3: return 4; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eA1B5G5R5UnormPack16: switch ( component ) { case 0: return 1; case 1: return 5; case 2: return 5; case 3: return 5; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eA8Unorm: switch ( component ) { case 0: return 8; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eR16G16Sfixed5NV: switch ( component ) { case 0: return 16; case 1: return 16; default: VULKAN_HPP_ASSERT( false ); return 0; } default: return 0; } } // The number of components of this format. VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR_14 uint8_t componentCount( VULKAN_HPP_NAMESPACE::Format format ) { switch ( format ) { case VULKAN_HPP_NAMESPACE::Format::eR4G4UnormPack8: return 2; case VULKAN_HPP_NAMESPACE::Format::eR4G4B4A4UnormPack16: return 4; case VULKAN_HPP_NAMESPACE::Format::eB4G4R4A4UnormPack16: return 4; case VULKAN_HPP_NAMESPACE::Format::eR5G6B5UnormPack16: return 3; case VULKAN_HPP_NAMESPACE::Format::eB5G6R5UnormPack16: return 3; case VULKAN_HPP_NAMESPACE::Format::eR5G5B5A1UnormPack16: return 4; case VULKAN_HPP_NAMESPACE::Format::eB5G5R5A1UnormPack16: return 4; case VULKAN_HPP_NAMESPACE::Format::eA1R5G5B5UnormPack16: return 4; case VULKAN_HPP_NAMESPACE::Format::eR8Unorm: return 1; case VULKAN_HPP_NAMESPACE::Format::eR8Snorm: return 1; case VULKAN_HPP_NAMESPACE::Format::eR8Uscaled: return 1; case VULKAN_HPP_NAMESPACE::Format::eR8Sscaled: return 1; case VULKAN_HPP_NAMESPACE::Format::eR8Uint: return 1; case VULKAN_HPP_NAMESPACE::Format::eR8Sint: return 1; case VULKAN_HPP_NAMESPACE::Format::eR8Srgb: return 1; case VULKAN_HPP_NAMESPACE::Format::eR8G8Unorm: return 2; case VULKAN_HPP_NAMESPACE::Format::eR8G8Snorm: return 2; case VULKAN_HPP_NAMESPACE::Format::eR8G8Uscaled: return 2; case VULKAN_HPP_NAMESPACE::Format::eR8G8Sscaled: return 2; case VULKAN_HPP_NAMESPACE::Format::eR8G8Uint: return 2; case VULKAN_HPP_NAMESPACE::Format::eR8G8Sint: return 2; case VULKAN_HPP_NAMESPACE::Format::eR8G8Srgb: return 2; case VULKAN_HPP_NAMESPACE::Format::eR8G8B8Unorm: return 3; case VULKAN_HPP_NAMESPACE::Format::eR8G8B8Snorm: return 3; case VULKAN_HPP_NAMESPACE::Format::eR8G8B8Uscaled: return 3; case VULKAN_HPP_NAMESPACE::Format::eR8G8B8Sscaled: return 3; case VULKAN_HPP_NAMESPACE::Format::eR8G8B8Uint: return 3; case VULKAN_HPP_NAMESPACE::Format::eR8G8B8Sint: return 3; case VULKAN_HPP_NAMESPACE::Format::eR8G8B8Srgb: return 3; case VULKAN_HPP_NAMESPACE::Format::eB8G8R8Unorm: return 3; case VULKAN_HPP_NAMESPACE::Format::eB8G8R8Snorm: return 3; case VULKAN_HPP_NAMESPACE::Format::eB8G8R8Uscaled: return 3; case VULKAN_HPP_NAMESPACE::Format::eB8G8R8Sscaled: return 3; case VULKAN_HPP_NAMESPACE::Format::eB8G8R8Uint: return 3; case VULKAN_HPP_NAMESPACE::Format::eB8G8R8Sint: return 3; case VULKAN_HPP_NAMESPACE::Format::eB8G8R8Srgb: return 3; case VULKAN_HPP_NAMESPACE::Format::eR8G8B8A8Unorm: return 4; case VULKAN_HPP_NAMESPACE::Format::eR8G8B8A8Snorm: return 4; case VULKAN_HPP_NAMESPACE::Format::eR8G8B8A8Uscaled: return 4; case VULKAN_HPP_NAMESPACE::Format::eR8G8B8A8Sscaled: return 4; case VULKAN_HPP_NAMESPACE::Format::eR8G8B8A8Uint: return 4; case VULKAN_HPP_NAMESPACE::Format::eR8G8B8A8Sint: return 4; case VULKAN_HPP_NAMESPACE::Format::eR8G8B8A8Srgb: return 4; case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Unorm: return 4; case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Snorm: return 4; case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Uscaled: return 4; case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Sscaled: return 4; case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Uint: return 4; case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Sint: return 4; case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Srgb: return 4; case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8UnormPack32: return 4; case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8SnormPack32: return 4; case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8UscaledPack32: return 4; case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8SscaledPack32: return 4; case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8UintPack32: return 4; case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8SintPack32: return 4; case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8SrgbPack32: return 4; case VULKAN_HPP_NAMESPACE::Format::eA2R10G10B10UnormPack32: return 4; case VULKAN_HPP_NAMESPACE::Format::eA2R10G10B10SnormPack32: return 4; case VULKAN_HPP_NAMESPACE::Format::eA2R10G10B10UscaledPack32: return 4; case VULKAN_HPP_NAMESPACE::Format::eA2R10G10B10SscaledPack32: return 4; case VULKAN_HPP_NAMESPACE::Format::eA2R10G10B10UintPack32: return 4; case VULKAN_HPP_NAMESPACE::Format::eA2R10G10B10SintPack32: return 4; case VULKAN_HPP_NAMESPACE::Format::eA2B10G10R10UnormPack32: return 4; case VULKAN_HPP_NAMESPACE::Format::eA2B10G10R10SnormPack32: return 4; case VULKAN_HPP_NAMESPACE::Format::eA2B10G10R10UscaledPack32: return 4; case VULKAN_HPP_NAMESPACE::Format::eA2B10G10R10SscaledPack32: return 4; case VULKAN_HPP_NAMESPACE::Format::eA2B10G10R10UintPack32: return 4; case VULKAN_HPP_NAMESPACE::Format::eA2B10G10R10SintPack32: return 4; case VULKAN_HPP_NAMESPACE::Format::eR16Unorm: return 1; case VULKAN_HPP_NAMESPACE::Format::eR16Snorm: return 1; case VULKAN_HPP_NAMESPACE::Format::eR16Uscaled: return 1; case VULKAN_HPP_NAMESPACE::Format::eR16Sscaled: return 1; case VULKAN_HPP_NAMESPACE::Format::eR16Uint: return 1; case VULKAN_HPP_NAMESPACE::Format::eR16Sint: return 1; case VULKAN_HPP_NAMESPACE::Format::eR16Sfloat: return 1; case VULKAN_HPP_NAMESPACE::Format::eR16G16Unorm: return 2; case VULKAN_HPP_NAMESPACE::Format::eR16G16Snorm: return 2; case VULKAN_HPP_NAMESPACE::Format::eR16G16Uscaled: return 2; case VULKAN_HPP_NAMESPACE::Format::eR16G16Sscaled: return 2; case VULKAN_HPP_NAMESPACE::Format::eR16G16Uint: return 2; case VULKAN_HPP_NAMESPACE::Format::eR16G16Sint: return 2; case VULKAN_HPP_NAMESPACE::Format::eR16G16Sfloat: return 2; case VULKAN_HPP_NAMESPACE::Format::eR16G16B16Unorm: return 3; case VULKAN_HPP_NAMESPACE::Format::eR16G16B16Snorm: return 3; case VULKAN_HPP_NAMESPACE::Format::eR16G16B16Uscaled: return 3; case VULKAN_HPP_NAMESPACE::Format::eR16G16B16Sscaled: return 3; case VULKAN_HPP_NAMESPACE::Format::eR16G16B16Uint: return 3; case VULKAN_HPP_NAMESPACE::Format::eR16G16B16Sint: return 3; case VULKAN_HPP_NAMESPACE::Format::eR16G16B16Sfloat: return 3; case VULKAN_HPP_NAMESPACE::Format::eR16G16B16A16Unorm: return 4; case VULKAN_HPP_NAMESPACE::Format::eR16G16B16A16Snorm: return 4; case VULKAN_HPP_NAMESPACE::Format::eR16G16B16A16Uscaled: return 4; case VULKAN_HPP_NAMESPACE::Format::eR16G16B16A16Sscaled: return 4; case VULKAN_HPP_NAMESPACE::Format::eR16G16B16A16Uint: return 4; case VULKAN_HPP_NAMESPACE::Format::eR16G16B16A16Sint: return 4; case VULKAN_HPP_NAMESPACE::Format::eR16G16B16A16Sfloat: return 4; case VULKAN_HPP_NAMESPACE::Format::eR32Uint: return 1; case VULKAN_HPP_NAMESPACE::Format::eR32Sint: return 1; case VULKAN_HPP_NAMESPACE::Format::eR32Sfloat: return 1; case VULKAN_HPP_NAMESPACE::Format::eR32G32Uint: return 2; case VULKAN_HPP_NAMESPACE::Format::eR32G32Sint: return 2; case VULKAN_HPP_NAMESPACE::Format::eR32G32Sfloat: return 2; case VULKAN_HPP_NAMESPACE::Format::eR32G32B32Uint: return 3; case VULKAN_HPP_NAMESPACE::Format::eR32G32B32Sint: return 3; case VULKAN_HPP_NAMESPACE::Format::eR32G32B32Sfloat: return 3; case VULKAN_HPP_NAMESPACE::Format::eR32G32B32A32Uint: return 4; case VULKAN_HPP_NAMESPACE::Format::eR32G32B32A32Sint: return 4; case VULKAN_HPP_NAMESPACE::Format::eR32G32B32A32Sfloat: return 4; case VULKAN_HPP_NAMESPACE::Format::eR64Uint: return 1; case VULKAN_HPP_NAMESPACE::Format::eR64Sint: return 1; case VULKAN_HPP_NAMESPACE::Format::eR64Sfloat: return 1; case VULKAN_HPP_NAMESPACE::Format::eR64G64Uint: return 2; case VULKAN_HPP_NAMESPACE::Format::eR64G64Sint: return 2; case VULKAN_HPP_NAMESPACE::Format::eR64G64Sfloat: return 2; case VULKAN_HPP_NAMESPACE::Format::eR64G64B64Uint: return 3; case VULKAN_HPP_NAMESPACE::Format::eR64G64B64Sint: return 3; case VULKAN_HPP_NAMESPACE::Format::eR64G64B64Sfloat: return 3; case VULKAN_HPP_NAMESPACE::Format::eR64G64B64A64Uint: return 4; case VULKAN_HPP_NAMESPACE::Format::eR64G64B64A64Sint: return 4; case VULKAN_HPP_NAMESPACE::Format::eR64G64B64A64Sfloat: return 4; case VULKAN_HPP_NAMESPACE::Format::eB10G11R11UfloatPack32: return 3; case VULKAN_HPP_NAMESPACE::Format::eE5B9G9R9UfloatPack32: return 3; case VULKAN_HPP_NAMESPACE::Format::eD16Unorm: return 1; case VULKAN_HPP_NAMESPACE::Format::eX8D24UnormPack32: return 1; case VULKAN_HPP_NAMESPACE::Format::eD32Sfloat: return 1; case VULKAN_HPP_NAMESPACE::Format::eS8Uint: return 1; case VULKAN_HPP_NAMESPACE::Format::eD16UnormS8Uint: return 2; case VULKAN_HPP_NAMESPACE::Format::eD24UnormS8Uint: return 2; case VULKAN_HPP_NAMESPACE::Format::eD32SfloatS8Uint: return 2; case VULKAN_HPP_NAMESPACE::Format::eBc1RgbUnormBlock: return 3; case VULKAN_HPP_NAMESPACE::Format::eBc1RgbSrgbBlock: return 3; case VULKAN_HPP_NAMESPACE::Format::eBc1RgbaUnormBlock: return 4; case VULKAN_HPP_NAMESPACE::Format::eBc1RgbaSrgbBlock: return 4; case VULKAN_HPP_NAMESPACE::Format::eBc2UnormBlock: return 4; case VULKAN_HPP_NAMESPACE::Format::eBc2SrgbBlock: return 4; case VULKAN_HPP_NAMESPACE::Format::eBc3UnormBlock: return 4; case VULKAN_HPP_NAMESPACE::Format::eBc3SrgbBlock: return 4; case VULKAN_HPP_NAMESPACE::Format::eBc4UnormBlock: return 1; case VULKAN_HPP_NAMESPACE::Format::eBc4SnormBlock: return 1; case VULKAN_HPP_NAMESPACE::Format::eBc5UnormBlock: return 2; case VULKAN_HPP_NAMESPACE::Format::eBc5SnormBlock: return 2; case VULKAN_HPP_NAMESPACE::Format::eBc6HUfloatBlock: return 3; case VULKAN_HPP_NAMESPACE::Format::eBc6HSfloatBlock: return 3; case VULKAN_HPP_NAMESPACE::Format::eBc7UnormBlock: return 4; case VULKAN_HPP_NAMESPACE::Format::eBc7SrgbBlock: return 4; case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8UnormBlock: return 3; case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8SrgbBlock: return 3; case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8A1UnormBlock: return 4; case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8A1SrgbBlock: return 4; case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8A8UnormBlock: return 4; case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8A8SrgbBlock: return 4; case VULKAN_HPP_NAMESPACE::Format::eEacR11UnormBlock: return 1; case VULKAN_HPP_NAMESPACE::Format::eEacR11SnormBlock: return 1; case VULKAN_HPP_NAMESPACE::Format::eEacR11G11UnormBlock: return 2; case VULKAN_HPP_NAMESPACE::Format::eEacR11G11SnormBlock: return 2; case VULKAN_HPP_NAMESPACE::Format::eAstc4x4UnormBlock: return 4; case VULKAN_HPP_NAMESPACE::Format::eAstc4x4SrgbBlock: return 4; case VULKAN_HPP_NAMESPACE::Format::eAstc5x4UnormBlock: return 4; case VULKAN_HPP_NAMESPACE::Format::eAstc5x4SrgbBlock: return 4; case VULKAN_HPP_NAMESPACE::Format::eAstc5x5UnormBlock: return 4; case VULKAN_HPP_NAMESPACE::Format::eAstc5x5SrgbBlock: return 4; case VULKAN_HPP_NAMESPACE::Format::eAstc6x5UnormBlock: return 4; case VULKAN_HPP_NAMESPACE::Format::eAstc6x5SrgbBlock: return 4; case VULKAN_HPP_NAMESPACE::Format::eAstc6x6UnormBlock: return 4; case VULKAN_HPP_NAMESPACE::Format::eAstc6x6SrgbBlock: return 4; case VULKAN_HPP_NAMESPACE::Format::eAstc8x5UnormBlock: return 4; case VULKAN_HPP_NAMESPACE::Format::eAstc8x5SrgbBlock: return 4; case VULKAN_HPP_NAMESPACE::Format::eAstc8x6UnormBlock: return 4; case VULKAN_HPP_NAMESPACE::Format::eAstc8x6SrgbBlock: return 4; case VULKAN_HPP_NAMESPACE::Format::eAstc8x8UnormBlock: return 4; case VULKAN_HPP_NAMESPACE::Format::eAstc8x8SrgbBlock: return 4; case VULKAN_HPP_NAMESPACE::Format::eAstc10x5UnormBlock: return 4; case VULKAN_HPP_NAMESPACE::Format::eAstc10x5SrgbBlock: return 4; case VULKAN_HPP_NAMESPACE::Format::eAstc10x6UnormBlock: return 4; case VULKAN_HPP_NAMESPACE::Format::eAstc10x6SrgbBlock: return 4; case VULKAN_HPP_NAMESPACE::Format::eAstc10x8UnormBlock: return 4; case VULKAN_HPP_NAMESPACE::Format::eAstc10x8SrgbBlock: return 4; case VULKAN_HPP_NAMESPACE::Format::eAstc10x10UnormBlock: return 4; case VULKAN_HPP_NAMESPACE::Format::eAstc10x10SrgbBlock: return 4; case VULKAN_HPP_NAMESPACE::Format::eAstc12x10UnormBlock: return 4; case VULKAN_HPP_NAMESPACE::Format::eAstc12x10SrgbBlock: return 4; case VULKAN_HPP_NAMESPACE::Format::eAstc12x12UnormBlock: return 4; case VULKAN_HPP_NAMESPACE::Format::eAstc12x12SrgbBlock: return 4; case VULKAN_HPP_NAMESPACE::Format::eG8B8G8R8422Unorm: return 4; case VULKAN_HPP_NAMESPACE::Format::eB8G8R8G8422Unorm: return 4; case VULKAN_HPP_NAMESPACE::Format::eG8B8R83Plane420Unorm: return 3; case VULKAN_HPP_NAMESPACE::Format::eG8B8R82Plane420Unorm: return 3; case VULKAN_HPP_NAMESPACE::Format::eG8B8R83Plane422Unorm: return 3; case VULKAN_HPP_NAMESPACE::Format::eG8B8R82Plane422Unorm: return 3; case VULKAN_HPP_NAMESPACE::Format::eG8B8R83Plane444Unorm: return 3; case VULKAN_HPP_NAMESPACE::Format::eR10X6UnormPack16: return 1; case VULKAN_HPP_NAMESPACE::Format::eR10X6G10X6Unorm2Pack16: return 2; case VULKAN_HPP_NAMESPACE::Format::eR10X6G10X6B10X6A10X6Unorm4Pack16: return 4; case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6G10X6R10X6422Unorm4Pack16: return 4; case VULKAN_HPP_NAMESPACE::Format::eB10X6G10X6R10X6G10X6422Unorm4Pack16: return 4; case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X63Plane420Unorm3Pack16: return 3; case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X62Plane420Unorm3Pack16: return 3; case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X63Plane422Unorm3Pack16: return 3; case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X62Plane422Unorm3Pack16: return 3; case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X63Plane444Unorm3Pack16: return 3; case VULKAN_HPP_NAMESPACE::Format::eR12X4UnormPack16: return 1; case VULKAN_HPP_NAMESPACE::Format::eR12X4G12X4Unorm2Pack16: return 2; case VULKAN_HPP_NAMESPACE::Format::eR12X4G12X4B12X4A12X4Unorm4Pack16: return 4; case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4G12X4R12X4422Unorm4Pack16: return 4; case VULKAN_HPP_NAMESPACE::Format::eB12X4G12X4R12X4G12X4422Unorm4Pack16: return 4; case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X43Plane420Unorm3Pack16: return 3; case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X42Plane420Unorm3Pack16: return 3; case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X43Plane422Unorm3Pack16: return 3; case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X42Plane422Unorm3Pack16: return 3; case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X43Plane444Unorm3Pack16: return 3; case VULKAN_HPP_NAMESPACE::Format::eG16B16G16R16422Unorm: return 4; case VULKAN_HPP_NAMESPACE::Format::eB16G16R16G16422Unorm: return 4; case VULKAN_HPP_NAMESPACE::Format::eG16B16R163Plane420Unorm: return 3; case VULKAN_HPP_NAMESPACE::Format::eG16B16R162Plane420Unorm: return 3; case VULKAN_HPP_NAMESPACE::Format::eG16B16R163Plane422Unorm: return 3; case VULKAN_HPP_NAMESPACE::Format::eG16B16R162Plane422Unorm: return 3; case VULKAN_HPP_NAMESPACE::Format::eG16B16R163Plane444Unorm: return 3; case VULKAN_HPP_NAMESPACE::Format::eG8B8R82Plane444Unorm: return 3; case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X62Plane444Unorm3Pack16: return 3; case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X42Plane444Unorm3Pack16: return 3; case VULKAN_HPP_NAMESPACE::Format::eG16B16R162Plane444Unorm: return 3; case VULKAN_HPP_NAMESPACE::Format::eA4R4G4B4UnormPack16: return 4; case VULKAN_HPP_NAMESPACE::Format::eA4B4G4R4UnormPack16: return 4; case VULKAN_HPP_NAMESPACE::Format::eAstc4x4SfloatBlock: return 4; case VULKAN_HPP_NAMESPACE::Format::eAstc5x4SfloatBlock: return 4; case VULKAN_HPP_NAMESPACE::Format::eAstc5x5SfloatBlock: return 4; case VULKAN_HPP_NAMESPACE::Format::eAstc6x5SfloatBlock: return 4; case VULKAN_HPP_NAMESPACE::Format::eAstc6x6SfloatBlock: return 4; case VULKAN_HPP_NAMESPACE::Format::eAstc8x5SfloatBlock: return 4; case VULKAN_HPP_NAMESPACE::Format::eAstc8x6SfloatBlock: return 4; case VULKAN_HPP_NAMESPACE::Format::eAstc8x8SfloatBlock: return 4; case VULKAN_HPP_NAMESPACE::Format::eAstc10x5SfloatBlock: return 4; case VULKAN_HPP_NAMESPACE::Format::eAstc10x6SfloatBlock: return 4; case VULKAN_HPP_NAMESPACE::Format::eAstc10x8SfloatBlock: return 4; case VULKAN_HPP_NAMESPACE::Format::eAstc10x10SfloatBlock: return 4; case VULKAN_HPP_NAMESPACE::Format::eAstc12x10SfloatBlock: return 4; case VULKAN_HPP_NAMESPACE::Format::eAstc12x12SfloatBlock: return 4; case VULKAN_HPP_NAMESPACE::Format::eA1B5G5R5UnormPack16: return 4; case VULKAN_HPP_NAMESPACE::Format::eA8Unorm: return 1; case VULKAN_HPP_NAMESPACE::Format::ePvrtc12BppUnormBlockIMG: return 4; case VULKAN_HPP_NAMESPACE::Format::ePvrtc14BppUnormBlockIMG: return 4; case VULKAN_HPP_NAMESPACE::Format::ePvrtc22BppUnormBlockIMG: return 4; case VULKAN_HPP_NAMESPACE::Format::ePvrtc24BppUnormBlockIMG: return 4; case VULKAN_HPP_NAMESPACE::Format::ePvrtc12BppSrgbBlockIMG: return 4; case VULKAN_HPP_NAMESPACE::Format::ePvrtc14BppSrgbBlockIMG: return 4; case VULKAN_HPP_NAMESPACE::Format::ePvrtc22BppSrgbBlockIMG: return 4; case VULKAN_HPP_NAMESPACE::Format::ePvrtc24BppSrgbBlockIMG: return 4; case VULKAN_HPP_NAMESPACE::Format::eR16G16Sfixed5NV: return 2; default: return 0; } } // The name of the component VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR_14 char const * componentName( VULKAN_HPP_NAMESPACE::Format format, uint8_t component ) { switch ( format ) { case VULKAN_HPP_NAMESPACE::Format::eR4G4UnormPack8: switch ( component ) { case 0: return "R"; case 1: return "G"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR4G4B4A4UnormPack16: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eB4G4R4A4UnormPack16: switch ( component ) { case 0: return "B"; case 1: return "G"; case 2: return "R"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR5G6B5UnormPack16: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eB5G6R5UnormPack16: switch ( component ) { case 0: return "B"; case 1: return "G"; case 2: return "R"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR5G5B5A1UnormPack16: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eB5G5R5A1UnormPack16: switch ( component ) { case 0: return "B"; case 1: return "G"; case 2: return "R"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eA1R5G5B5UnormPack16: switch ( component ) { case 0: return "A"; case 1: return "R"; case 2: return "G"; case 3: return "B"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR8Unorm: switch ( component ) { case 0: return "R"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR8Snorm: switch ( component ) { case 0: return "R"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR8Uscaled: switch ( component ) { case 0: return "R"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR8Sscaled: switch ( component ) { case 0: return "R"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR8Uint: switch ( component ) { case 0: return "R"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR8Sint: switch ( component ) { case 0: return "R"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR8Srgb: switch ( component ) { case 0: return "R"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR8G8Unorm: switch ( component ) { case 0: return "R"; case 1: return "G"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR8G8Snorm: switch ( component ) { case 0: return "R"; case 1: return "G"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR8G8Uscaled: switch ( component ) { case 0: return "R"; case 1: return "G"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR8G8Sscaled: switch ( component ) { case 0: return "R"; case 1: return "G"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR8G8Uint: switch ( component ) { case 0: return "R"; case 1: return "G"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR8G8Sint: switch ( component ) { case 0: return "R"; case 1: return "G"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR8G8Srgb: switch ( component ) { case 0: return "R"; case 1: return "G"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR8G8B8Unorm: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR8G8B8Snorm: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR8G8B8Uscaled: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR8G8B8Sscaled: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR8G8B8Uint: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR8G8B8Sint: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR8G8B8Srgb: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eB8G8R8Unorm: switch ( component ) { case 0: return "B"; case 1: return "G"; case 2: return "R"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eB8G8R8Snorm: switch ( component ) { case 0: return "B"; case 1: return "G"; case 2: return "R"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eB8G8R8Uscaled: switch ( component ) { case 0: return "B"; case 1: return "G"; case 2: return "R"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eB8G8R8Sscaled: switch ( component ) { case 0: return "B"; case 1: return "G"; case 2: return "R"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eB8G8R8Uint: switch ( component ) { case 0: return "B"; case 1: return "G"; case 2: return "R"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eB8G8R8Sint: switch ( component ) { case 0: return "B"; case 1: return "G"; case 2: return "R"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eB8G8R8Srgb: switch ( component ) { case 0: return "B"; case 1: return "G"; case 2: return "R"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR8G8B8A8Unorm: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR8G8B8A8Snorm: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR8G8B8A8Uscaled: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR8G8B8A8Sscaled: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR8G8B8A8Uint: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR8G8B8A8Sint: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR8G8B8A8Srgb: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Unorm: switch ( component ) { case 0: return "B"; case 1: return "G"; case 2: return "R"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Snorm: switch ( component ) { case 0: return "B"; case 1: return "G"; case 2: return "R"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Uscaled: switch ( component ) { case 0: return "B"; case 1: return "G"; case 2: return "R"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Sscaled: switch ( component ) { case 0: return "B"; case 1: return "G"; case 2: return "R"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Uint: switch ( component ) { case 0: return "B"; case 1: return "G"; case 2: return "R"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Sint: switch ( component ) { case 0: return "B"; case 1: return "G"; case 2: return "R"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Srgb: switch ( component ) { case 0: return "B"; case 1: return "G"; case 2: return "R"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8UnormPack32: switch ( component ) { case 0: return "A"; case 1: return "B"; case 2: return "G"; case 3: return "R"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8SnormPack32: switch ( component ) { case 0: return "A"; case 1: return "B"; case 2: return "G"; case 3: return "R"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8UscaledPack32: switch ( component ) { case 0: return "A"; case 1: return "B"; case 2: return "G"; case 3: return "R"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8SscaledPack32: switch ( component ) { case 0: return "A"; case 1: return "B"; case 2: return "G"; case 3: return "R"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8UintPack32: switch ( component ) { case 0: return "A"; case 1: return "B"; case 2: return "G"; case 3: return "R"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8SintPack32: switch ( component ) { case 0: return "A"; case 1: return "B"; case 2: return "G"; case 3: return "R"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8SrgbPack32: switch ( component ) { case 0: return "A"; case 1: return "B"; case 2: return "G"; case 3: return "R"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eA2R10G10B10UnormPack32: switch ( component ) { case 0: return "A"; case 1: return "R"; case 2: return "G"; case 3: return "B"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eA2R10G10B10SnormPack32: switch ( component ) { case 0: return "A"; case 1: return "R"; case 2: return "G"; case 3: return "B"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eA2R10G10B10UscaledPack32: switch ( component ) { case 0: return "A"; case 1: return "R"; case 2: return "G"; case 3: return "B"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eA2R10G10B10SscaledPack32: switch ( component ) { case 0: return "A"; case 1: return "R"; case 2: return "G"; case 3: return "B"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eA2R10G10B10UintPack32: switch ( component ) { case 0: return "A"; case 1: return "R"; case 2: return "G"; case 3: return "B"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eA2R10G10B10SintPack32: switch ( component ) { case 0: return "A"; case 1: return "R"; case 2: return "G"; case 3: return "B"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eA2B10G10R10UnormPack32: switch ( component ) { case 0: return "A"; case 1: return "B"; case 2: return "G"; case 3: return "R"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eA2B10G10R10SnormPack32: switch ( component ) { case 0: return "A"; case 1: return "B"; case 2: return "G"; case 3: return "R"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eA2B10G10R10UscaledPack32: switch ( component ) { case 0: return "A"; case 1: return "B"; case 2: return "G"; case 3: return "R"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eA2B10G10R10SscaledPack32: switch ( component ) { case 0: return "A"; case 1: return "B"; case 2: return "G"; case 3: return "R"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eA2B10G10R10UintPack32: switch ( component ) { case 0: return "A"; case 1: return "B"; case 2: return "G"; case 3: return "R"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eA2B10G10R10SintPack32: switch ( component ) { case 0: return "A"; case 1: return "B"; case 2: return "G"; case 3: return "R"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR16Unorm: switch ( component ) { case 0: return "R"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR16Snorm: switch ( component ) { case 0: return "R"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR16Uscaled: switch ( component ) { case 0: return "R"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR16Sscaled: switch ( component ) { case 0: return "R"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR16Uint: switch ( component ) { case 0: return "R"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR16Sint: switch ( component ) { case 0: return "R"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR16Sfloat: switch ( component ) { case 0: return "R"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR16G16Unorm: switch ( component ) { case 0: return "R"; case 1: return "G"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR16G16Snorm: switch ( component ) { case 0: return "R"; case 1: return "G"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR16G16Uscaled: switch ( component ) { case 0: return "R"; case 1: return "G"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR16G16Sscaled: switch ( component ) { case 0: return "R"; case 1: return "G"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR16G16Uint: switch ( component ) { case 0: return "R"; case 1: return "G"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR16G16Sint: switch ( component ) { case 0: return "R"; case 1: return "G"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR16G16Sfloat: switch ( component ) { case 0: return "R"; case 1: return "G"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR16G16B16Unorm: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR16G16B16Snorm: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR16G16B16Uscaled: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR16G16B16Sscaled: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR16G16B16Uint: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR16G16B16Sint: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR16G16B16Sfloat: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR16G16B16A16Unorm: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR16G16B16A16Snorm: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR16G16B16A16Uscaled: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR16G16B16A16Sscaled: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR16G16B16A16Uint: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR16G16B16A16Sint: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR16G16B16A16Sfloat: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR32Uint: switch ( component ) { case 0: return "R"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR32Sint: switch ( component ) { case 0: return "R"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR32Sfloat: switch ( component ) { case 0: return "R"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR32G32Uint: switch ( component ) { case 0: return "R"; case 1: return "G"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR32G32Sint: switch ( component ) { case 0: return "R"; case 1: return "G"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR32G32Sfloat: switch ( component ) { case 0: return "R"; case 1: return "G"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR32G32B32Uint: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR32G32B32Sint: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR32G32B32Sfloat: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR32G32B32A32Uint: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR32G32B32A32Sint: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR32G32B32A32Sfloat: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR64Uint: switch ( component ) { case 0: return "R"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR64Sint: switch ( component ) { case 0: return "R"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR64Sfloat: switch ( component ) { case 0: return "R"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR64G64Uint: switch ( component ) { case 0: return "R"; case 1: return "G"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR64G64Sint: switch ( component ) { case 0: return "R"; case 1: return "G"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR64G64Sfloat: switch ( component ) { case 0: return "R"; case 1: return "G"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR64G64B64Uint: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR64G64B64Sint: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR64G64B64Sfloat: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR64G64B64A64Uint: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR64G64B64A64Sint: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR64G64B64A64Sfloat: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eB10G11R11UfloatPack32: switch ( component ) { case 0: return "B"; case 1: return "G"; case 2: return "R"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eE5B9G9R9UfloatPack32: switch ( component ) { case 0: return "B"; case 1: return "G"; case 2: return "R"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eD16Unorm: switch ( component ) { case 0: return "D"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eX8D24UnormPack32: switch ( component ) { case 0: return "D"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eD32Sfloat: switch ( component ) { case 0: return "D"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eS8Uint: switch ( component ) { case 0: return "S"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eD16UnormS8Uint: switch ( component ) { case 0: return "D"; case 1: return "S"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eD24UnormS8Uint: switch ( component ) { case 0: return "D"; case 1: return "S"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eD32SfloatS8Uint: switch ( component ) { case 0: return "D"; case 1: return "S"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eBc1RgbUnormBlock: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eBc1RgbSrgbBlock: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eBc1RgbaUnormBlock: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eBc1RgbaSrgbBlock: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eBc2UnormBlock: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eBc2SrgbBlock: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eBc3UnormBlock: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eBc3SrgbBlock: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eBc4UnormBlock: switch ( component ) { case 0: return "R"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eBc4SnormBlock: switch ( component ) { case 0: return "R"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eBc5UnormBlock: switch ( component ) { case 0: return "R"; case 1: return "G"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eBc5SnormBlock: switch ( component ) { case 0: return "R"; case 1: return "G"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eBc6HUfloatBlock: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eBc6HSfloatBlock: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eBc7UnormBlock: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eBc7SrgbBlock: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8UnormBlock: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8SrgbBlock: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8A1UnormBlock: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8A1SrgbBlock: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8A8UnormBlock: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8A8SrgbBlock: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eEacR11UnormBlock: switch ( component ) { case 0: return "R"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eEacR11SnormBlock: switch ( component ) { case 0: return "R"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eEacR11G11UnormBlock: switch ( component ) { case 0: return "R"; case 1: return "G"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eEacR11G11SnormBlock: switch ( component ) { case 0: return "R"; case 1: return "G"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eAstc4x4UnormBlock: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eAstc4x4SrgbBlock: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eAstc5x4UnormBlock: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eAstc5x4SrgbBlock: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eAstc5x5UnormBlock: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eAstc5x5SrgbBlock: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eAstc6x5UnormBlock: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eAstc6x5SrgbBlock: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eAstc6x6UnormBlock: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eAstc6x6SrgbBlock: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eAstc8x5UnormBlock: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eAstc8x5SrgbBlock: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eAstc8x6UnormBlock: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eAstc8x6SrgbBlock: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eAstc8x8UnormBlock: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eAstc8x8SrgbBlock: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eAstc10x5UnormBlock: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eAstc10x5SrgbBlock: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eAstc10x6UnormBlock: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eAstc10x6SrgbBlock: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eAstc10x8UnormBlock: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eAstc10x8SrgbBlock: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eAstc10x10UnormBlock: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eAstc10x10SrgbBlock: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eAstc12x10UnormBlock: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eAstc12x10SrgbBlock: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eAstc12x12UnormBlock: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eAstc12x12SrgbBlock: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eG8B8G8R8422Unorm: switch ( component ) { case 0: return "G"; case 1: return "B"; case 2: return "G"; case 3: return "R"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eB8G8R8G8422Unorm: switch ( component ) { case 0: return "B"; case 1: return "G"; case 2: return "R"; case 3: return "G"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eG8B8R83Plane420Unorm: switch ( component ) { case 0: return "G"; case 1: return "B"; case 2: return "R"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eG8B8R82Plane420Unorm: switch ( component ) { case 0: return "G"; case 1: return "B"; case 2: return "R"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eG8B8R83Plane422Unorm: switch ( component ) { case 0: return "G"; case 1: return "B"; case 2: return "R"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eG8B8R82Plane422Unorm: switch ( component ) { case 0: return "G"; case 1: return "B"; case 2: return "R"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eG8B8R83Plane444Unorm: switch ( component ) { case 0: return "G"; case 1: return "B"; case 2: return "R"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR10X6UnormPack16: switch ( component ) { case 0: return "R"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR10X6G10X6Unorm2Pack16: switch ( component ) { case 0: return "R"; case 1: return "G"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR10X6G10X6B10X6A10X6Unorm4Pack16: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6G10X6R10X6422Unorm4Pack16: switch ( component ) { case 0: return "G"; case 1: return "B"; case 2: return "G"; case 3: return "R"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eB10X6G10X6R10X6G10X6422Unorm4Pack16: switch ( component ) { case 0: return "B"; case 1: return "G"; case 2: return "R"; case 3: return "G"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X63Plane420Unorm3Pack16: switch ( component ) { case 0: return "G"; case 1: return "B"; case 2: return "R"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X62Plane420Unorm3Pack16: switch ( component ) { case 0: return "G"; case 1: return "B"; case 2: return "R"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X63Plane422Unorm3Pack16: switch ( component ) { case 0: return "G"; case 1: return "B"; case 2: return "R"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X62Plane422Unorm3Pack16: switch ( component ) { case 0: return "G"; case 1: return "B"; case 2: return "R"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X63Plane444Unorm3Pack16: switch ( component ) { case 0: return "G"; case 1: return "B"; case 2: return "R"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR12X4UnormPack16: switch ( component ) { case 0: return "R"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR12X4G12X4Unorm2Pack16: switch ( component ) { case 0: return "R"; case 1: return "G"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR12X4G12X4B12X4A12X4Unorm4Pack16: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4G12X4R12X4422Unorm4Pack16: switch ( component ) { case 0: return "G"; case 1: return "B"; case 2: return "G"; case 3: return "R"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eB12X4G12X4R12X4G12X4422Unorm4Pack16: switch ( component ) { case 0: return "B"; case 1: return "G"; case 2: return "R"; case 3: return "G"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X43Plane420Unorm3Pack16: switch ( component ) { case 0: return "G"; case 1: return "B"; case 2: return "R"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X42Plane420Unorm3Pack16: switch ( component ) { case 0: return "G"; case 1: return "B"; case 2: return "R"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X43Plane422Unorm3Pack16: switch ( component ) { case 0: return "G"; case 1: return "B"; case 2: return "R"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X42Plane422Unorm3Pack16: switch ( component ) { case 0: return "G"; case 1: return "B"; case 2: return "R"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X43Plane444Unorm3Pack16: switch ( component ) { case 0: return "G"; case 1: return "B"; case 2: return "R"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eG16B16G16R16422Unorm: switch ( component ) { case 0: return "G"; case 1: return "B"; case 2: return "G"; case 3: return "R"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eB16G16R16G16422Unorm: switch ( component ) { case 0: return "B"; case 1: return "G"; case 2: return "R"; case 3: return "G"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eG16B16R163Plane420Unorm: switch ( component ) { case 0: return "G"; case 1: return "B"; case 2: return "R"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eG16B16R162Plane420Unorm: switch ( component ) { case 0: return "G"; case 1: return "B"; case 2: return "R"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eG16B16R163Plane422Unorm: switch ( component ) { case 0: return "G"; case 1: return "B"; case 2: return "R"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eG16B16R162Plane422Unorm: switch ( component ) { case 0: return "G"; case 1: return "B"; case 2: return "R"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eG16B16R163Plane444Unorm: switch ( component ) { case 0: return "G"; case 1: return "B"; case 2: return "R"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eG8B8R82Plane444Unorm: switch ( component ) { case 0: return "G"; case 1: return "B"; case 2: return "R"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X62Plane444Unorm3Pack16: switch ( component ) { case 0: return "G"; case 1: return "B"; case 2: return "R"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X42Plane444Unorm3Pack16: switch ( component ) { case 0: return "G"; case 1: return "B"; case 2: return "R"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eG16B16R162Plane444Unorm: switch ( component ) { case 0: return "G"; case 1: return "B"; case 2: return "R"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eA4R4G4B4UnormPack16: switch ( component ) { case 0: return "A"; case 1: return "R"; case 2: return "G"; case 3: return "B"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eA4B4G4R4UnormPack16: switch ( component ) { case 0: return "A"; case 1: return "B"; case 2: return "G"; case 3: return "R"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eAstc4x4SfloatBlock: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eAstc5x4SfloatBlock: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eAstc5x5SfloatBlock: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eAstc6x5SfloatBlock: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eAstc6x6SfloatBlock: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eAstc8x5SfloatBlock: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eAstc8x6SfloatBlock: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eAstc8x8SfloatBlock: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eAstc10x5SfloatBlock: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eAstc10x6SfloatBlock: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eAstc10x8SfloatBlock: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eAstc10x10SfloatBlock: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eAstc12x10SfloatBlock: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eAstc12x12SfloatBlock: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eA1B5G5R5UnormPack16: switch ( component ) { case 0: return "A"; case 1: return "B"; case 2: return "G"; case 3: return "R"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eA8Unorm: switch ( component ) { case 0: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::ePvrtc12BppUnormBlockIMG: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::ePvrtc14BppUnormBlockIMG: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::ePvrtc22BppUnormBlockIMG: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::ePvrtc24BppUnormBlockIMG: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::ePvrtc12BppSrgbBlockIMG: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::ePvrtc14BppSrgbBlockIMG: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::ePvrtc22BppSrgbBlockIMG: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::ePvrtc24BppSrgbBlockIMG: switch ( component ) { case 0: return "R"; case 1: return "G"; case 2: return "B"; case 3: return "A"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR16G16Sfixed5NV: switch ( component ) { case 0: return "R"; case 1: return "G"; default: VULKAN_HPP_ASSERT( false ); return ""; } default: return ""; } } // The numeric format of the component VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR_14 char const * componentNumericFormat( VULKAN_HPP_NAMESPACE::Format format, uint8_t component ) { switch ( format ) { case VULKAN_HPP_NAMESPACE::Format::eR4G4UnormPack8: switch ( component ) { case 0: return "UNORM"; case 1: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR4G4B4A4UnormPack16: switch ( component ) { case 0: return "UNORM"; case 1: return "UNORM"; case 2: return "UNORM"; case 3: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eB4G4R4A4UnormPack16: switch ( component ) { case 0: return "UNORM"; case 1: return "UNORM"; case 2: return "UNORM"; case 3: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR5G6B5UnormPack16: switch ( component ) { case 0: return "UNORM"; case 1: return "UNORM"; case 2: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eB5G6R5UnormPack16: switch ( component ) { case 0: return "UNORM"; case 1: return "UNORM"; case 2: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR5G5B5A1UnormPack16: switch ( component ) { case 0: return "UNORM"; case 1: return "UNORM"; case 2: return "UNORM"; case 3: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eB5G5R5A1UnormPack16: switch ( component ) { case 0: return "UNORM"; case 1: return "UNORM"; case 2: return "UNORM"; case 3: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eA1R5G5B5UnormPack16: switch ( component ) { case 0: return "UNORM"; case 1: return "UNORM"; case 2: return "UNORM"; case 3: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR8Unorm: switch ( component ) { case 0: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR8Snorm: switch ( component ) { case 0: return "SNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR8Uscaled: switch ( component ) { case 0: return "USCALED"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR8Sscaled: switch ( component ) { case 0: return "SSCALED"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR8Uint: switch ( component ) { case 0: return "UINT"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR8Sint: switch ( component ) { case 0: return "SINT"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR8Srgb: switch ( component ) { case 0: return "SRGB"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR8G8Unorm: switch ( component ) { case 0: return "UNORM"; case 1: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR8G8Snorm: switch ( component ) { case 0: return "SNORM"; case 1: return "SNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR8G8Uscaled: switch ( component ) { case 0: return "USCALED"; case 1: return "USCALED"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR8G8Sscaled: switch ( component ) { case 0: return "SSCALED"; case 1: return "SSCALED"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR8G8Uint: switch ( component ) { case 0: return "UINT"; case 1: return "UINT"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR8G8Sint: switch ( component ) { case 0: return "SINT"; case 1: return "SINT"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR8G8Srgb: switch ( component ) { case 0: return "SRGB"; case 1: return "SRGB"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR8G8B8Unorm: switch ( component ) { case 0: return "UNORM"; case 1: return "UNORM"; case 2: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR8G8B8Snorm: switch ( component ) { case 0: return "SNORM"; case 1: return "SNORM"; case 2: return "SNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR8G8B8Uscaled: switch ( component ) { case 0: return "USCALED"; case 1: return "USCALED"; case 2: return "USCALED"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR8G8B8Sscaled: switch ( component ) { case 0: return "SSCALED"; case 1: return "SSCALED"; case 2: return "SSCALED"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR8G8B8Uint: switch ( component ) { case 0: return "UINT"; case 1: return "UINT"; case 2: return "UINT"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR8G8B8Sint: switch ( component ) { case 0: return "SINT"; case 1: return "SINT"; case 2: return "SINT"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR8G8B8Srgb: switch ( component ) { case 0: return "SRGB"; case 1: return "SRGB"; case 2: return "SRGB"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eB8G8R8Unorm: switch ( component ) { case 0: return "UNORM"; case 1: return "UNORM"; case 2: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eB8G8R8Snorm: switch ( component ) { case 0: return "SNORM"; case 1: return "SNORM"; case 2: return "SNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eB8G8R8Uscaled: switch ( component ) { case 0: return "USCALED"; case 1: return "USCALED"; case 2: return "USCALED"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eB8G8R8Sscaled: switch ( component ) { case 0: return "SSCALED"; case 1: return "SSCALED"; case 2: return "SSCALED"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eB8G8R8Uint: switch ( component ) { case 0: return "UINT"; case 1: return "UINT"; case 2: return "UINT"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eB8G8R8Sint: switch ( component ) { case 0: return "SINT"; case 1: return "SINT"; case 2: return "SINT"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eB8G8R8Srgb: switch ( component ) { case 0: return "SRGB"; case 1: return "SRGB"; case 2: return "SRGB"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR8G8B8A8Unorm: switch ( component ) { case 0: return "UNORM"; case 1: return "UNORM"; case 2: return "UNORM"; case 3: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR8G8B8A8Snorm: switch ( component ) { case 0: return "SNORM"; case 1: return "SNORM"; case 2: return "SNORM"; case 3: return "SNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR8G8B8A8Uscaled: switch ( component ) { case 0: return "USCALED"; case 1: return "USCALED"; case 2: return "USCALED"; case 3: return "USCALED"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR8G8B8A8Sscaled: switch ( component ) { case 0: return "SSCALED"; case 1: return "SSCALED"; case 2: return "SSCALED"; case 3: return "SSCALED"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR8G8B8A8Uint: switch ( component ) { case 0: return "UINT"; case 1: return "UINT"; case 2: return "UINT"; case 3: return "UINT"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR8G8B8A8Sint: switch ( component ) { case 0: return "SINT"; case 1: return "SINT"; case 2: return "SINT"; case 3: return "SINT"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR8G8B8A8Srgb: switch ( component ) { case 0: return "SRGB"; case 1: return "SRGB"; case 2: return "SRGB"; case 3: return "SRGB"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Unorm: switch ( component ) { case 0: return "UNORM"; case 1: return "UNORM"; case 2: return "UNORM"; case 3: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Snorm: switch ( component ) { case 0: return "SNORM"; case 1: return "SNORM"; case 2: return "SNORM"; case 3: return "SNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Uscaled: switch ( component ) { case 0: return "USCALED"; case 1: return "USCALED"; case 2: return "USCALED"; case 3: return "USCALED"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Sscaled: switch ( component ) { case 0: return "SSCALED"; case 1: return "SSCALED"; case 2: return "SSCALED"; case 3: return "SSCALED"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Uint: switch ( component ) { case 0: return "UINT"; case 1: return "UINT"; case 2: return "UINT"; case 3: return "UINT"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Sint: switch ( component ) { case 0: return "SINT"; case 1: return "SINT"; case 2: return "SINT"; case 3: return "SINT"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Srgb: switch ( component ) { case 0: return "SRGB"; case 1: return "SRGB"; case 2: return "SRGB"; case 3: return "SRGB"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8UnormPack32: switch ( component ) { case 0: return "UNORM"; case 1: return "UNORM"; case 2: return "UNORM"; case 3: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8SnormPack32: switch ( component ) { case 0: return "SNORM"; case 1: return "SNORM"; case 2: return "SNORM"; case 3: return "SNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8UscaledPack32: switch ( component ) { case 0: return "USCALED"; case 1: return "USCALED"; case 2: return "USCALED"; case 3: return "USCALED"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8SscaledPack32: switch ( component ) { case 0: return "SSCALED"; case 1: return "SSCALED"; case 2: return "SSCALED"; case 3: return "SSCALED"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8UintPack32: switch ( component ) { case 0: return "UINT"; case 1: return "UINT"; case 2: return "UINT"; case 3: return "UINT"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8SintPack32: switch ( component ) { case 0: return "SINT"; case 1: return "SINT"; case 2: return "SINT"; case 3: return "SINT"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8SrgbPack32: switch ( component ) { case 0: return "SRGB"; case 1: return "SRGB"; case 2: return "SRGB"; case 3: return "SRGB"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eA2R10G10B10UnormPack32: switch ( component ) { case 0: return "UNORM"; case 1: return "UNORM"; case 2: return "UNORM"; case 3: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eA2R10G10B10SnormPack32: switch ( component ) { case 0: return "SNORM"; case 1: return "SNORM"; case 2: return "SNORM"; case 3: return "SNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eA2R10G10B10UscaledPack32: switch ( component ) { case 0: return "USCALED"; case 1: return "USCALED"; case 2: return "USCALED"; case 3: return "USCALED"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eA2R10G10B10SscaledPack32: switch ( component ) { case 0: return "SSCALED"; case 1: return "SSCALED"; case 2: return "SSCALED"; case 3: return "SSCALED"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eA2R10G10B10UintPack32: switch ( component ) { case 0: return "UINT"; case 1: return "UINT"; case 2: return "UINT"; case 3: return "UINT"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eA2R10G10B10SintPack32: switch ( component ) { case 0: return "SINT"; case 1: return "SINT"; case 2: return "SINT"; case 3: return "SINT"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eA2B10G10R10UnormPack32: switch ( component ) { case 0: return "UNORM"; case 1: return "UNORM"; case 2: return "UNORM"; case 3: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eA2B10G10R10SnormPack32: switch ( component ) { case 0: return "SNORM"; case 1: return "SNORM"; case 2: return "SNORM"; case 3: return "SNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eA2B10G10R10UscaledPack32: switch ( component ) { case 0: return "USCALED"; case 1: return "USCALED"; case 2: return "USCALED"; case 3: return "USCALED"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eA2B10G10R10SscaledPack32: switch ( component ) { case 0: return "SSCALED"; case 1: return "SSCALED"; case 2: return "SSCALED"; case 3: return "SSCALED"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eA2B10G10R10UintPack32: switch ( component ) { case 0: return "UINT"; case 1: return "UINT"; case 2: return "UINT"; case 3: return "UINT"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eA2B10G10R10SintPack32: switch ( component ) { case 0: return "SINT"; case 1: return "SINT"; case 2: return "SINT"; case 3: return "SINT"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR16Unorm: switch ( component ) { case 0: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR16Snorm: switch ( component ) { case 0: return "SNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR16Uscaled: switch ( component ) { case 0: return "USCALED"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR16Sscaled: switch ( component ) { case 0: return "SSCALED"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR16Uint: switch ( component ) { case 0: return "UINT"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR16Sint: switch ( component ) { case 0: return "SINT"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR16Sfloat: switch ( component ) { case 0: return "SFLOAT"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR16G16Unorm: switch ( component ) { case 0: return "UNORM"; case 1: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR16G16Snorm: switch ( component ) { case 0: return "SNORM"; case 1: return "SNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR16G16Uscaled: switch ( component ) { case 0: return "USCALED"; case 1: return "USCALED"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR16G16Sscaled: switch ( component ) { case 0: return "SSCALED"; case 1: return "SSCALED"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR16G16Uint: switch ( component ) { case 0: return "UINT"; case 1: return "UINT"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR16G16Sint: switch ( component ) { case 0: return "SINT"; case 1: return "SINT"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR16G16Sfloat: switch ( component ) { case 0: return "SFLOAT"; case 1: return "SFLOAT"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR16G16B16Unorm: switch ( component ) { case 0: return "UNORM"; case 1: return "UNORM"; case 2: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR16G16B16Snorm: switch ( component ) { case 0: return "SNORM"; case 1: return "SNORM"; case 2: return "SNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR16G16B16Uscaled: switch ( component ) { case 0: return "USCALED"; case 1: return "USCALED"; case 2: return "USCALED"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR16G16B16Sscaled: switch ( component ) { case 0: return "SSCALED"; case 1: return "SSCALED"; case 2: return "SSCALED"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR16G16B16Uint: switch ( component ) { case 0: return "UINT"; case 1: return "UINT"; case 2: return "UINT"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR16G16B16Sint: switch ( component ) { case 0: return "SINT"; case 1: return "SINT"; case 2: return "SINT"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR16G16B16Sfloat: switch ( component ) { case 0: return "SFLOAT"; case 1: return "SFLOAT"; case 2: return "SFLOAT"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR16G16B16A16Unorm: switch ( component ) { case 0: return "UNORM"; case 1: return "UNORM"; case 2: return "UNORM"; case 3: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR16G16B16A16Snorm: switch ( component ) { case 0: return "SNORM"; case 1: return "SNORM"; case 2: return "SNORM"; case 3: return "SNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR16G16B16A16Uscaled: switch ( component ) { case 0: return "USCALED"; case 1: return "USCALED"; case 2: return "USCALED"; case 3: return "USCALED"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR16G16B16A16Sscaled: switch ( component ) { case 0: return "SSCALED"; case 1: return "SSCALED"; case 2: return "SSCALED"; case 3: return "SSCALED"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR16G16B16A16Uint: switch ( component ) { case 0: return "UINT"; case 1: return "UINT"; case 2: return "UINT"; case 3: return "UINT"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR16G16B16A16Sint: switch ( component ) { case 0: return "SINT"; case 1: return "SINT"; case 2: return "SINT"; case 3: return "SINT"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR16G16B16A16Sfloat: switch ( component ) { case 0: return "SFLOAT"; case 1: return "SFLOAT"; case 2: return "SFLOAT"; case 3: return "SFLOAT"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR32Uint: switch ( component ) { case 0: return "UINT"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR32Sint: switch ( component ) { case 0: return "SINT"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR32Sfloat: switch ( component ) { case 0: return "SFLOAT"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR32G32Uint: switch ( component ) { case 0: return "UINT"; case 1: return "UINT"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR32G32Sint: switch ( component ) { case 0: return "SINT"; case 1: return "SINT"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR32G32Sfloat: switch ( component ) { case 0: return "SFLOAT"; case 1: return "SFLOAT"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR32G32B32Uint: switch ( component ) { case 0: return "UINT"; case 1: return "UINT"; case 2: return "UINT"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR32G32B32Sint: switch ( component ) { case 0: return "SINT"; case 1: return "SINT"; case 2: return "SINT"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR32G32B32Sfloat: switch ( component ) { case 0: return "SFLOAT"; case 1: return "SFLOAT"; case 2: return "SFLOAT"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR32G32B32A32Uint: switch ( component ) { case 0: return "UINT"; case 1: return "UINT"; case 2: return "UINT"; case 3: return "UINT"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR32G32B32A32Sint: switch ( component ) { case 0: return "SINT"; case 1: return "SINT"; case 2: return "SINT"; case 3: return "SINT"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR32G32B32A32Sfloat: switch ( component ) { case 0: return "SFLOAT"; case 1: return "SFLOAT"; case 2: return "SFLOAT"; case 3: return "SFLOAT"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR64Uint: switch ( component ) { case 0: return "UINT"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR64Sint: switch ( component ) { case 0: return "SINT"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR64Sfloat: switch ( component ) { case 0: return "SFLOAT"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR64G64Uint: switch ( component ) { case 0: return "UINT"; case 1: return "UINT"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR64G64Sint: switch ( component ) { case 0: return "SINT"; case 1: return "SINT"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR64G64Sfloat: switch ( component ) { case 0: return "SFLOAT"; case 1: return "SFLOAT"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR64G64B64Uint: switch ( component ) { case 0: return "UINT"; case 1: return "UINT"; case 2: return "UINT"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR64G64B64Sint: switch ( component ) { case 0: return "SINT"; case 1: return "SINT"; case 2: return "SINT"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR64G64B64Sfloat: switch ( component ) { case 0: return "SFLOAT"; case 1: return "SFLOAT"; case 2: return "SFLOAT"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR64G64B64A64Uint: switch ( component ) { case 0: return "UINT"; case 1: return "UINT"; case 2: return "UINT"; case 3: return "UINT"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR64G64B64A64Sint: switch ( component ) { case 0: return "SINT"; case 1: return "SINT"; case 2: return "SINT"; case 3: return "SINT"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR64G64B64A64Sfloat: switch ( component ) { case 0: return "SFLOAT"; case 1: return "SFLOAT"; case 2: return "SFLOAT"; case 3: return "SFLOAT"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eB10G11R11UfloatPack32: switch ( component ) { case 0: return "UFLOAT"; case 1: return "UFLOAT"; case 2: return "UFLOAT"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eE5B9G9R9UfloatPack32: switch ( component ) { case 0: return "UFLOAT"; case 1: return "UFLOAT"; case 2: return "UFLOAT"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eD16Unorm: switch ( component ) { case 0: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eX8D24UnormPack32: switch ( component ) { case 0: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eD32Sfloat: switch ( component ) { case 0: return "SFLOAT"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eS8Uint: switch ( component ) { case 0: return "UINT"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eD16UnormS8Uint: switch ( component ) { case 0: return "UNORM"; case 1: return "UINT"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eD24UnormS8Uint: switch ( component ) { case 0: return "UNORM"; case 1: return "UINT"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eD32SfloatS8Uint: switch ( component ) { case 0: return "SFLOAT"; case 1: return "UINT"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eBc1RgbUnormBlock: switch ( component ) { case 0: return "UNORM"; case 1: return "UNORM"; case 2: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eBc1RgbSrgbBlock: switch ( component ) { case 0: return "SRGB"; case 1: return "SRGB"; case 2: return "SRGB"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eBc1RgbaUnormBlock: switch ( component ) { case 0: return "UNORM"; case 1: return "UNORM"; case 2: return "UNORM"; case 3: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eBc1RgbaSrgbBlock: switch ( component ) { case 0: return "SRGB"; case 1: return "SRGB"; case 2: return "SRGB"; case 3: return "SRGB"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eBc2UnormBlock: switch ( component ) { case 0: return "UNORM"; case 1: return "UNORM"; case 2: return "UNORM"; case 3: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eBc2SrgbBlock: switch ( component ) { case 0: return "SRGB"; case 1: return "SRGB"; case 2: return "SRGB"; case 3: return "SRGB"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eBc3UnormBlock: switch ( component ) { case 0: return "UNORM"; case 1: return "UNORM"; case 2: return "UNORM"; case 3: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eBc3SrgbBlock: switch ( component ) { case 0: return "SRGB"; case 1: return "SRGB"; case 2: return "SRGB"; case 3: return "SRGB"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eBc4UnormBlock: switch ( component ) { case 0: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eBc4SnormBlock: switch ( component ) { case 0: return "SNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eBc5UnormBlock: switch ( component ) { case 0: return "UNORM"; case 1: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eBc5SnormBlock: switch ( component ) { case 0: return "SNORM"; case 1: return "SNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eBc6HUfloatBlock: switch ( component ) { case 0: return "UFLOAT"; case 1: return "UFLOAT"; case 2: return "UFLOAT"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eBc6HSfloatBlock: switch ( component ) { case 0: return "SFLOAT"; case 1: return "SFLOAT"; case 2: return "SFLOAT"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eBc7UnormBlock: switch ( component ) { case 0: return "UNORM"; case 1: return "UNORM"; case 2: return "UNORM"; case 3: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eBc7SrgbBlock: switch ( component ) { case 0: return "SRGB"; case 1: return "SRGB"; case 2: return "SRGB"; case 3: return "SRGB"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8UnormBlock: switch ( component ) { case 0: return "UNORM"; case 1: return "UNORM"; case 2: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8SrgbBlock: switch ( component ) { case 0: return "SRGB"; case 1: return "SRGB"; case 2: return "SRGB"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8A1UnormBlock: switch ( component ) { case 0: return "UNORM"; case 1: return "UNORM"; case 2: return "UNORM"; case 3: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8A1SrgbBlock: switch ( component ) { case 0: return "SRGB"; case 1: return "SRGB"; case 2: return "SRGB"; case 3: return "SRGB"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8A8UnormBlock: switch ( component ) { case 0: return "UNORM"; case 1: return "UNORM"; case 2: return "UNORM"; case 3: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8A8SrgbBlock: switch ( component ) { case 0: return "SRGB"; case 1: return "SRGB"; case 2: return "SRGB"; case 3: return "SRGB"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eEacR11UnormBlock: switch ( component ) { case 0: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eEacR11SnormBlock: switch ( component ) { case 0: return "SNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eEacR11G11UnormBlock: switch ( component ) { case 0: return "UNORM"; case 1: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eEacR11G11SnormBlock: switch ( component ) { case 0: return "SNORM"; case 1: return "SNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eAstc4x4UnormBlock: switch ( component ) { case 0: return "UNORM"; case 1: return "UNORM"; case 2: return "UNORM"; case 3: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eAstc4x4SrgbBlock: switch ( component ) { case 0: return "SRGB"; case 1: return "SRGB"; case 2: return "SRGB"; case 3: return "SRGB"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eAstc5x4UnormBlock: switch ( component ) { case 0: return "UNORM"; case 1: return "UNORM"; case 2: return "UNORM"; case 3: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eAstc5x4SrgbBlock: switch ( component ) { case 0: return "SRGB"; case 1: return "SRGB"; case 2: return "SRGB"; case 3: return "SRGB"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eAstc5x5UnormBlock: switch ( component ) { case 0: return "UNORM"; case 1: return "UNORM"; case 2: return "UNORM"; case 3: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eAstc5x5SrgbBlock: switch ( component ) { case 0: return "SRGB"; case 1: return "SRGB"; case 2: return "SRGB"; case 3: return "SRGB"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eAstc6x5UnormBlock: switch ( component ) { case 0: return "UNORM"; case 1: return "UNORM"; case 2: return "UNORM"; case 3: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eAstc6x5SrgbBlock: switch ( component ) { case 0: return "SRGB"; case 1: return "SRGB"; case 2: return "SRGB"; case 3: return "SRGB"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eAstc6x6UnormBlock: switch ( component ) { case 0: return "UNORM"; case 1: return "UNORM"; case 2: return "UNORM"; case 3: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eAstc6x6SrgbBlock: switch ( component ) { case 0: return "SRGB"; case 1: return "SRGB"; case 2: return "SRGB"; case 3: return "SRGB"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eAstc8x5UnormBlock: switch ( component ) { case 0: return "UNORM"; case 1: return "UNORM"; case 2: return "UNORM"; case 3: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eAstc8x5SrgbBlock: switch ( component ) { case 0: return "SRGB"; case 1: return "SRGB"; case 2: return "SRGB"; case 3: return "SRGB"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eAstc8x6UnormBlock: switch ( component ) { case 0: return "UNORM"; case 1: return "UNORM"; case 2: return "UNORM"; case 3: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eAstc8x6SrgbBlock: switch ( component ) { case 0: return "SRGB"; case 1: return "SRGB"; case 2: return "SRGB"; case 3: return "SRGB"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eAstc8x8UnormBlock: switch ( component ) { case 0: return "UNORM"; case 1: return "UNORM"; case 2: return "UNORM"; case 3: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eAstc8x8SrgbBlock: switch ( component ) { case 0: return "SRGB"; case 1: return "SRGB"; case 2: return "SRGB"; case 3: return "SRGB"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eAstc10x5UnormBlock: switch ( component ) { case 0: return "UNORM"; case 1: return "UNORM"; case 2: return "UNORM"; case 3: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eAstc10x5SrgbBlock: switch ( component ) { case 0: return "SRGB"; case 1: return "SRGB"; case 2: return "SRGB"; case 3: return "SRGB"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eAstc10x6UnormBlock: switch ( component ) { case 0: return "UNORM"; case 1: return "UNORM"; case 2: return "UNORM"; case 3: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eAstc10x6SrgbBlock: switch ( component ) { case 0: return "SRGB"; case 1: return "SRGB"; case 2: return "SRGB"; case 3: return "SRGB"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eAstc10x8UnormBlock: switch ( component ) { case 0: return "UNORM"; case 1: return "UNORM"; case 2: return "UNORM"; case 3: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eAstc10x8SrgbBlock: switch ( component ) { case 0: return "SRGB"; case 1: return "SRGB"; case 2: return "SRGB"; case 3: return "SRGB"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eAstc10x10UnormBlock: switch ( component ) { case 0: return "UNORM"; case 1: return "UNORM"; case 2: return "UNORM"; case 3: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eAstc10x10SrgbBlock: switch ( component ) { case 0: return "SRGB"; case 1: return "SRGB"; case 2: return "SRGB"; case 3: return "SRGB"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eAstc12x10UnormBlock: switch ( component ) { case 0: return "UNORM"; case 1: return "UNORM"; case 2: return "UNORM"; case 3: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eAstc12x10SrgbBlock: switch ( component ) { case 0: return "SRGB"; case 1: return "SRGB"; case 2: return "SRGB"; case 3: return "SRGB"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eAstc12x12UnormBlock: switch ( component ) { case 0: return "UNORM"; case 1: return "UNORM"; case 2: return "UNORM"; case 3: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eAstc12x12SrgbBlock: switch ( component ) { case 0: return "SRGB"; case 1: return "SRGB"; case 2: return "SRGB"; case 3: return "SRGB"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eG8B8G8R8422Unorm: switch ( component ) { case 0: return "UNORM"; case 1: return "UNORM"; case 2: return "UNORM"; case 3: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eB8G8R8G8422Unorm: switch ( component ) { case 0: return "UNORM"; case 1: return "UNORM"; case 2: return "UNORM"; case 3: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eG8B8R83Plane420Unorm: switch ( component ) { case 0: return "UNORM"; case 1: return "UNORM"; case 2: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eG8B8R82Plane420Unorm: switch ( component ) { case 0: return "UNORM"; case 1: return "UNORM"; case 2: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eG8B8R83Plane422Unorm: switch ( component ) { case 0: return "UNORM"; case 1: return "UNORM"; case 2: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eG8B8R82Plane422Unorm: switch ( component ) { case 0: return "UNORM"; case 1: return "UNORM"; case 2: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eG8B8R83Plane444Unorm: switch ( component ) { case 0: return "UNORM"; case 1: return "UNORM"; case 2: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR10X6UnormPack16: switch ( component ) { case 0: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR10X6G10X6Unorm2Pack16: switch ( component ) { case 0: return "UNORM"; case 1: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR10X6G10X6B10X6A10X6Unorm4Pack16: switch ( component ) { case 0: return "UNORM"; case 1: return "UNORM"; case 2: return "UNORM"; case 3: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6G10X6R10X6422Unorm4Pack16: switch ( component ) { case 0: return "UNORM"; case 1: return "UNORM"; case 2: return "UNORM"; case 3: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eB10X6G10X6R10X6G10X6422Unorm4Pack16: switch ( component ) { case 0: return "UNORM"; case 1: return "UNORM"; case 2: return "UNORM"; case 3: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X63Plane420Unorm3Pack16: switch ( component ) { case 0: return "UNORM"; case 1: return "UNORM"; case 2: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X62Plane420Unorm3Pack16: switch ( component ) { case 0: return "UNORM"; case 1: return "UNORM"; case 2: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X63Plane422Unorm3Pack16: switch ( component ) { case 0: return "UNORM"; case 1: return "UNORM"; case 2: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X62Plane422Unorm3Pack16: switch ( component ) { case 0: return "UNORM"; case 1: return "UNORM"; case 2: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X63Plane444Unorm3Pack16: switch ( component ) { case 0: return "UNORM"; case 1: return "UNORM"; case 2: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR12X4UnormPack16: switch ( component ) { case 0: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR12X4G12X4Unorm2Pack16: switch ( component ) { case 0: return "UNORM"; case 1: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR12X4G12X4B12X4A12X4Unorm4Pack16: switch ( component ) { case 0: return "UNORM"; case 1: return "UNORM"; case 2: return "UNORM"; case 3: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4G12X4R12X4422Unorm4Pack16: switch ( component ) { case 0: return "UNORM"; case 1: return "UNORM"; case 2: return "UNORM"; case 3: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eB12X4G12X4R12X4G12X4422Unorm4Pack16: switch ( component ) { case 0: return "UNORM"; case 1: return "UNORM"; case 2: return "UNORM"; case 3: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X43Plane420Unorm3Pack16: switch ( component ) { case 0: return "UNORM"; case 1: return "UNORM"; case 2: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X42Plane420Unorm3Pack16: switch ( component ) { case 0: return "UNORM"; case 1: return "UNORM"; case 2: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X43Plane422Unorm3Pack16: switch ( component ) { case 0: return "UNORM"; case 1: return "UNORM"; case 2: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X42Plane422Unorm3Pack16: switch ( component ) { case 0: return "UNORM"; case 1: return "UNORM"; case 2: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X43Plane444Unorm3Pack16: switch ( component ) { case 0: return "UNORM"; case 1: return "UNORM"; case 2: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eG16B16G16R16422Unorm: switch ( component ) { case 0: return "UNORM"; case 1: return "UNORM"; case 2: return "UNORM"; case 3: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eB16G16R16G16422Unorm: switch ( component ) { case 0: return "UNORM"; case 1: return "UNORM"; case 2: return "UNORM"; case 3: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eG16B16R163Plane420Unorm: switch ( component ) { case 0: return "UNORM"; case 1: return "UNORM"; case 2: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eG16B16R162Plane420Unorm: switch ( component ) { case 0: return "UNORM"; case 1: return "UNORM"; case 2: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eG16B16R163Plane422Unorm: switch ( component ) { case 0: return "UNORM"; case 1: return "UNORM"; case 2: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eG16B16R162Plane422Unorm: switch ( component ) { case 0: return "UNORM"; case 1: return "UNORM"; case 2: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eG16B16R163Plane444Unorm: switch ( component ) { case 0: return "UNORM"; case 1: return "UNORM"; case 2: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eG8B8R82Plane444Unorm: switch ( component ) { case 0: return "UNORM"; case 1: return "UNORM"; case 2: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X62Plane444Unorm3Pack16: switch ( component ) { case 0: return "UNORM"; case 1: return "UNORM"; case 2: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X42Plane444Unorm3Pack16: switch ( component ) { case 0: return "UNORM"; case 1: return "UNORM"; case 2: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eG16B16R162Plane444Unorm: switch ( component ) { case 0: return "UNORM"; case 1: return "UNORM"; case 2: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eA4R4G4B4UnormPack16: switch ( component ) { case 0: return "UNORM"; case 1: return "UNORM"; case 2: return "UNORM"; case 3: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eA4B4G4R4UnormPack16: switch ( component ) { case 0: return "UNORM"; case 1: return "UNORM"; case 2: return "UNORM"; case 3: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eAstc4x4SfloatBlock: switch ( component ) { case 0: return "SFLOAT"; case 1: return "SFLOAT"; case 2: return "SFLOAT"; case 3: return "SFLOAT"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eAstc5x4SfloatBlock: switch ( component ) { case 0: return "SFLOAT"; case 1: return "SFLOAT"; case 2: return "SFLOAT"; case 3: return "SFLOAT"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eAstc5x5SfloatBlock: switch ( component ) { case 0: return "SFLOAT"; case 1: return "SFLOAT"; case 2: return "SFLOAT"; case 3: return "SFLOAT"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eAstc6x5SfloatBlock: switch ( component ) { case 0: return "SFLOAT"; case 1: return "SFLOAT"; case 2: return "SFLOAT"; case 3: return "SFLOAT"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eAstc6x6SfloatBlock: switch ( component ) { case 0: return "SFLOAT"; case 1: return "SFLOAT"; case 2: return "SFLOAT"; case 3: return "SFLOAT"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eAstc8x5SfloatBlock: switch ( component ) { case 0: return "SFLOAT"; case 1: return "SFLOAT"; case 2: return "SFLOAT"; case 3: return "SFLOAT"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eAstc8x6SfloatBlock: switch ( component ) { case 0: return "SFLOAT"; case 1: return "SFLOAT"; case 2: return "SFLOAT"; case 3: return "SFLOAT"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eAstc8x8SfloatBlock: switch ( component ) { case 0: return "SFLOAT"; case 1: return "SFLOAT"; case 2: return "SFLOAT"; case 3: return "SFLOAT"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eAstc10x5SfloatBlock: switch ( component ) { case 0: return "SFLOAT"; case 1: return "SFLOAT"; case 2: return "SFLOAT"; case 3: return "SFLOAT"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eAstc10x6SfloatBlock: switch ( component ) { case 0: return "SFLOAT"; case 1: return "SFLOAT"; case 2: return "SFLOAT"; case 3: return "SFLOAT"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eAstc10x8SfloatBlock: switch ( component ) { case 0: return "SFLOAT"; case 1: return "SFLOAT"; case 2: return "SFLOAT"; case 3: return "SFLOAT"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eAstc10x10SfloatBlock: switch ( component ) { case 0: return "SFLOAT"; case 1: return "SFLOAT"; case 2: return "SFLOAT"; case 3: return "SFLOAT"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eAstc12x10SfloatBlock: switch ( component ) { case 0: return "SFLOAT"; case 1: return "SFLOAT"; case 2: return "SFLOAT"; case 3: return "SFLOAT"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eAstc12x12SfloatBlock: switch ( component ) { case 0: return "SFLOAT"; case 1: return "SFLOAT"; case 2: return "SFLOAT"; case 3: return "SFLOAT"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eA1B5G5R5UnormPack16: switch ( component ) { case 0: return "UNORM"; case 1: return "UNORM"; case 2: return "UNORM"; case 3: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eA8Unorm: switch ( component ) { case 0: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::ePvrtc12BppUnormBlockIMG: switch ( component ) { case 0: return "UNORM"; case 1: return "UNORM"; case 2: return "UNORM"; case 3: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::ePvrtc14BppUnormBlockIMG: switch ( component ) { case 0: return "UNORM"; case 1: return "UNORM"; case 2: return "UNORM"; case 3: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::ePvrtc22BppUnormBlockIMG: switch ( component ) { case 0: return "UNORM"; case 1: return "UNORM"; case 2: return "UNORM"; case 3: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::ePvrtc24BppUnormBlockIMG: switch ( component ) { case 0: return "UNORM"; case 1: return "UNORM"; case 2: return "UNORM"; case 3: return "UNORM"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::ePvrtc12BppSrgbBlockIMG: switch ( component ) { case 0: return "SRGB"; case 1: return "SRGB"; case 2: return "SRGB"; case 3: return "SRGB"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::ePvrtc14BppSrgbBlockIMG: switch ( component ) { case 0: return "SRGB"; case 1: return "SRGB"; case 2: return "SRGB"; case 3: return "SRGB"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::ePvrtc22BppSrgbBlockIMG: switch ( component ) { case 0: return "SRGB"; case 1: return "SRGB"; case 2: return "SRGB"; case 3: return "SRGB"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::ePvrtc24BppSrgbBlockIMG: switch ( component ) { case 0: return "SRGB"; case 1: return "SRGB"; case 2: return "SRGB"; case 3: return "SRGB"; default: VULKAN_HPP_ASSERT( false ); return ""; } case VULKAN_HPP_NAMESPACE::Format::eR16G16Sfixed5NV: switch ( component ) { case 0: return "SFIXED5"; case 1: return "SFIXED5"; default: VULKAN_HPP_ASSERT( false ); return ""; } default: return ""; } } // The plane this component lies in. VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR_14 uint8_t componentPlaneIndex( VULKAN_HPP_NAMESPACE::Format format, uint8_t component ) { switch ( format ) { case VULKAN_HPP_NAMESPACE::Format::eG8B8R83Plane420Unorm: switch ( component ) { case 0: return 0; case 1: return 1; case 2: return 2; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eG8B8R82Plane420Unorm: switch ( component ) { case 0: return 0; case 1: return 1; case 2: return 1; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eG8B8R83Plane422Unorm: switch ( component ) { case 0: return 0; case 1: return 1; case 2: return 2; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eG8B8R82Plane422Unorm: switch ( component ) { case 0: return 0; case 1: return 1; case 2: return 1; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eG8B8R83Plane444Unorm: switch ( component ) { case 0: return 0; case 1: return 1; case 2: return 2; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X63Plane420Unorm3Pack16: switch ( component ) { case 0: return 0; case 1: return 1; case 2: return 2; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X62Plane420Unorm3Pack16: switch ( component ) { case 0: return 0; case 1: return 1; case 2: return 1; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X63Plane422Unorm3Pack16: switch ( component ) { case 0: return 0; case 1: return 1; case 2: return 2; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X62Plane422Unorm3Pack16: switch ( component ) { case 0: return 0; case 1: return 1; case 2: return 1; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X63Plane444Unorm3Pack16: switch ( component ) { case 0: return 0; case 1: return 1; case 2: return 2; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X43Plane420Unorm3Pack16: switch ( component ) { case 0: return 0; case 1: return 1; case 2: return 2; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X42Plane420Unorm3Pack16: switch ( component ) { case 0: return 0; case 1: return 1; case 2: return 1; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X43Plane422Unorm3Pack16: switch ( component ) { case 0: return 0; case 1: return 1; case 2: return 2; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X42Plane422Unorm3Pack16: switch ( component ) { case 0: return 0; case 1: return 1; case 2: return 1; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X43Plane444Unorm3Pack16: switch ( component ) { case 0: return 0; case 1: return 1; case 2: return 2; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eG16B16R163Plane420Unorm: switch ( component ) { case 0: return 0; case 1: return 1; case 2: return 2; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eG16B16R162Plane420Unorm: switch ( component ) { case 0: return 0; case 1: return 1; case 2: return 1; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eG16B16R163Plane422Unorm: switch ( component ) { case 0: return 0; case 1: return 1; case 2: return 2; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eG16B16R162Plane422Unorm: switch ( component ) { case 0: return 0; case 1: return 1; case 2: return 1; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eG16B16R163Plane444Unorm: switch ( component ) { case 0: return 0; case 1: return 1; case 2: return 2; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eG8B8R82Plane444Unorm: switch ( component ) { case 0: return 0; case 1: return 1; case 2: return 1; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X62Plane444Unorm3Pack16: switch ( component ) { case 0: return 0; case 1: return 1; case 2: return 1; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X42Plane444Unorm3Pack16: switch ( component ) { case 0: return 0; case 1: return 1; case 2: return 1; default: VULKAN_HPP_ASSERT( false ); return 0; } case VULKAN_HPP_NAMESPACE::Format::eG16B16R162Plane444Unorm: switch ( component ) { case 0: return 0; case 1: return 1; case 2: return 1; default: VULKAN_HPP_ASSERT( false ); return 0; } default: return 0; } } // True, if the components of this format are compressed, otherwise false. VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR_14 bool componentsAreCompressed( VULKAN_HPP_NAMESPACE::Format format ) { switch ( format ) { case VULKAN_HPP_NAMESPACE::Format::eBc1RgbUnormBlock: case VULKAN_HPP_NAMESPACE::Format::eBc1RgbSrgbBlock: case VULKAN_HPP_NAMESPACE::Format::eBc1RgbaUnormBlock: case VULKAN_HPP_NAMESPACE::Format::eBc1RgbaSrgbBlock: case VULKAN_HPP_NAMESPACE::Format::eBc2UnormBlock: case VULKAN_HPP_NAMESPACE::Format::eBc2SrgbBlock: case VULKAN_HPP_NAMESPACE::Format::eBc3UnormBlock: case VULKAN_HPP_NAMESPACE::Format::eBc3SrgbBlock: case VULKAN_HPP_NAMESPACE::Format::eBc4UnormBlock: case VULKAN_HPP_NAMESPACE::Format::eBc4SnormBlock: case VULKAN_HPP_NAMESPACE::Format::eBc5UnormBlock: case VULKAN_HPP_NAMESPACE::Format::eBc5SnormBlock: case VULKAN_HPP_NAMESPACE::Format::eBc6HUfloatBlock: case VULKAN_HPP_NAMESPACE::Format::eBc6HSfloatBlock: case VULKAN_HPP_NAMESPACE::Format::eBc7UnormBlock: case VULKAN_HPP_NAMESPACE::Format::eBc7SrgbBlock: case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8UnormBlock: case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8SrgbBlock: case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8A1UnormBlock: case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8A1SrgbBlock: case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8A8UnormBlock: case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8A8SrgbBlock: case VULKAN_HPP_NAMESPACE::Format::eAstc4x4UnormBlock: case VULKAN_HPP_NAMESPACE::Format::eAstc4x4SrgbBlock: case VULKAN_HPP_NAMESPACE::Format::eAstc5x4UnormBlock: case VULKAN_HPP_NAMESPACE::Format::eAstc5x4SrgbBlock: case VULKAN_HPP_NAMESPACE::Format::eAstc5x5UnormBlock: case VULKAN_HPP_NAMESPACE::Format::eAstc5x5SrgbBlock: case VULKAN_HPP_NAMESPACE::Format::eAstc6x5UnormBlock: case VULKAN_HPP_NAMESPACE::Format::eAstc6x5SrgbBlock: case VULKAN_HPP_NAMESPACE::Format::eAstc6x6UnormBlock: case VULKAN_HPP_NAMESPACE::Format::eAstc6x6SrgbBlock: case VULKAN_HPP_NAMESPACE::Format::eAstc8x5UnormBlock: case VULKAN_HPP_NAMESPACE::Format::eAstc8x5SrgbBlock: case VULKAN_HPP_NAMESPACE::Format::eAstc8x6UnormBlock: case VULKAN_HPP_NAMESPACE::Format::eAstc8x6SrgbBlock: case VULKAN_HPP_NAMESPACE::Format::eAstc8x8UnormBlock: case VULKAN_HPP_NAMESPACE::Format::eAstc8x8SrgbBlock: case VULKAN_HPP_NAMESPACE::Format::eAstc10x5UnormBlock: case VULKAN_HPP_NAMESPACE::Format::eAstc10x5SrgbBlock: case VULKAN_HPP_NAMESPACE::Format::eAstc10x6UnormBlock: case VULKAN_HPP_NAMESPACE::Format::eAstc10x6SrgbBlock: case VULKAN_HPP_NAMESPACE::Format::eAstc10x8UnormBlock: case VULKAN_HPP_NAMESPACE::Format::eAstc10x8SrgbBlock: case VULKAN_HPP_NAMESPACE::Format::eAstc10x10UnormBlock: case VULKAN_HPP_NAMESPACE::Format::eAstc10x10SrgbBlock: case VULKAN_HPP_NAMESPACE::Format::eAstc12x10UnormBlock: case VULKAN_HPP_NAMESPACE::Format::eAstc12x10SrgbBlock: case VULKAN_HPP_NAMESPACE::Format::eAstc12x12UnormBlock: case VULKAN_HPP_NAMESPACE::Format::eAstc12x12SrgbBlock: case VULKAN_HPP_NAMESPACE::Format::eAstc4x4SfloatBlock: case VULKAN_HPP_NAMESPACE::Format::eAstc5x4SfloatBlock: case VULKAN_HPP_NAMESPACE::Format::eAstc5x5SfloatBlock: case VULKAN_HPP_NAMESPACE::Format::eAstc6x5SfloatBlock: case VULKAN_HPP_NAMESPACE::Format::eAstc6x6SfloatBlock: case VULKAN_HPP_NAMESPACE::Format::eAstc8x5SfloatBlock: case VULKAN_HPP_NAMESPACE::Format::eAstc8x6SfloatBlock: case VULKAN_HPP_NAMESPACE::Format::eAstc8x8SfloatBlock: case VULKAN_HPP_NAMESPACE::Format::eAstc10x5SfloatBlock: case VULKAN_HPP_NAMESPACE::Format::eAstc10x6SfloatBlock: case VULKAN_HPP_NAMESPACE::Format::eAstc10x8SfloatBlock: case VULKAN_HPP_NAMESPACE::Format::eAstc10x10SfloatBlock: case VULKAN_HPP_NAMESPACE::Format::eAstc12x10SfloatBlock: case VULKAN_HPP_NAMESPACE::Format::eAstc12x12SfloatBlock: case VULKAN_HPP_NAMESPACE::Format::ePvrtc12BppUnormBlockIMG: case VULKAN_HPP_NAMESPACE::Format::ePvrtc14BppUnormBlockIMG: case VULKAN_HPP_NAMESPACE::Format::ePvrtc22BppUnormBlockIMG: case VULKAN_HPP_NAMESPACE::Format::ePvrtc24BppUnormBlockIMG: case VULKAN_HPP_NAMESPACE::Format::ePvrtc12BppSrgbBlockIMG: case VULKAN_HPP_NAMESPACE::Format::ePvrtc14BppSrgbBlockIMG: case VULKAN_HPP_NAMESPACE::Format::ePvrtc22BppSrgbBlockIMG: case VULKAN_HPP_NAMESPACE::Format::ePvrtc24BppSrgbBlockIMG: return true; default: return false; } } // A textual description of the compression scheme, or an empty string if it is not compressed VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR_14 char const * compressionScheme( VULKAN_HPP_NAMESPACE::Format format ) { switch ( format ) { case VULKAN_HPP_NAMESPACE::Format::eBc1RgbUnormBlock: return "BC"; case VULKAN_HPP_NAMESPACE::Format::eBc1RgbSrgbBlock: return "BC"; case VULKAN_HPP_NAMESPACE::Format::eBc1RgbaUnormBlock: return "BC"; case VULKAN_HPP_NAMESPACE::Format::eBc1RgbaSrgbBlock: return "BC"; case VULKAN_HPP_NAMESPACE::Format::eBc2UnormBlock: return "BC"; case VULKAN_HPP_NAMESPACE::Format::eBc2SrgbBlock: return "BC"; case VULKAN_HPP_NAMESPACE::Format::eBc3UnormBlock: return "BC"; case VULKAN_HPP_NAMESPACE::Format::eBc3SrgbBlock: return "BC"; case VULKAN_HPP_NAMESPACE::Format::eBc4UnormBlock: return "BC"; case VULKAN_HPP_NAMESPACE::Format::eBc4SnormBlock: return "BC"; case VULKAN_HPP_NAMESPACE::Format::eBc5UnormBlock: return "BC"; case VULKAN_HPP_NAMESPACE::Format::eBc5SnormBlock: return "BC"; case VULKAN_HPP_NAMESPACE::Format::eBc6HUfloatBlock: return "BC"; case VULKAN_HPP_NAMESPACE::Format::eBc6HSfloatBlock: return "BC"; case VULKAN_HPP_NAMESPACE::Format::eBc7UnormBlock: return "BC"; case VULKAN_HPP_NAMESPACE::Format::eBc7SrgbBlock: return "BC"; case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8UnormBlock: return "ETC2"; case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8SrgbBlock: return "ETC2"; case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8A1UnormBlock: return "ETC2"; case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8A1SrgbBlock: return "ETC2"; case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8A8UnormBlock: return "ETC2"; case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8A8SrgbBlock: return "ETC2"; case VULKAN_HPP_NAMESPACE::Format::eEacR11UnormBlock: return "EAC"; case VULKAN_HPP_NAMESPACE::Format::eEacR11SnormBlock: return "EAC"; case VULKAN_HPP_NAMESPACE::Format::eEacR11G11UnormBlock: return "EAC"; case VULKAN_HPP_NAMESPACE::Format::eEacR11G11SnormBlock: return "EAC"; case VULKAN_HPP_NAMESPACE::Format::eAstc4x4UnormBlock: return "ASTC LDR"; case VULKAN_HPP_NAMESPACE::Format::eAstc4x4SrgbBlock: return "ASTC LDR"; case VULKAN_HPP_NAMESPACE::Format::eAstc5x4UnormBlock: return "ASTC LDR"; case VULKAN_HPP_NAMESPACE::Format::eAstc5x4SrgbBlock: return "ASTC LDR"; case VULKAN_HPP_NAMESPACE::Format::eAstc5x5UnormBlock: return "ASTC LDR"; case VULKAN_HPP_NAMESPACE::Format::eAstc5x5SrgbBlock: return "ASTC LDR"; case VULKAN_HPP_NAMESPACE::Format::eAstc6x5UnormBlock: return "ASTC LDR"; case VULKAN_HPP_NAMESPACE::Format::eAstc6x5SrgbBlock: return "ASTC LDR"; case VULKAN_HPP_NAMESPACE::Format::eAstc6x6UnormBlock: return "ASTC LDR"; case VULKAN_HPP_NAMESPACE::Format::eAstc6x6SrgbBlock: return "ASTC LDR"; case VULKAN_HPP_NAMESPACE::Format::eAstc8x5UnormBlock: return "ASTC LDR"; case VULKAN_HPP_NAMESPACE::Format::eAstc8x5SrgbBlock: return "ASTC LDR"; case VULKAN_HPP_NAMESPACE::Format::eAstc8x6UnormBlock: return "ASTC LDR"; case VULKAN_HPP_NAMESPACE::Format::eAstc8x6SrgbBlock: return "ASTC LDR"; case VULKAN_HPP_NAMESPACE::Format::eAstc8x8UnormBlock: return "ASTC LDR"; case VULKAN_HPP_NAMESPACE::Format::eAstc8x8SrgbBlock: return "ASTC LDR"; case VULKAN_HPP_NAMESPACE::Format::eAstc10x5UnormBlock: return "ASTC LDR"; case VULKAN_HPP_NAMESPACE::Format::eAstc10x5SrgbBlock: return "ASTC LDR"; case VULKAN_HPP_NAMESPACE::Format::eAstc10x6UnormBlock: return "ASTC LDR"; case VULKAN_HPP_NAMESPACE::Format::eAstc10x6SrgbBlock: return "ASTC LDR"; case VULKAN_HPP_NAMESPACE::Format::eAstc10x8UnormBlock: return "ASTC LDR"; case VULKAN_HPP_NAMESPACE::Format::eAstc10x8SrgbBlock: return "ASTC LDR"; case VULKAN_HPP_NAMESPACE::Format::eAstc10x10UnormBlock: return "ASTC LDR"; case VULKAN_HPP_NAMESPACE::Format::eAstc10x10SrgbBlock: return "ASTC LDR"; case VULKAN_HPP_NAMESPACE::Format::eAstc12x10UnormBlock: return "ASTC LDR"; case VULKAN_HPP_NAMESPACE::Format::eAstc12x10SrgbBlock: return "ASTC LDR"; case VULKAN_HPP_NAMESPACE::Format::eAstc12x12UnormBlock: return "ASTC LDR"; case VULKAN_HPP_NAMESPACE::Format::eAstc12x12SrgbBlock: return "ASTC LDR"; case VULKAN_HPP_NAMESPACE::Format::eAstc4x4SfloatBlock: return "ASTC HDR"; case VULKAN_HPP_NAMESPACE::Format::eAstc5x4SfloatBlock: return "ASTC HDR"; case VULKAN_HPP_NAMESPACE::Format::eAstc5x5SfloatBlock: return "ASTC HDR"; case VULKAN_HPP_NAMESPACE::Format::eAstc6x5SfloatBlock: return "ASTC HDR"; case VULKAN_HPP_NAMESPACE::Format::eAstc6x6SfloatBlock: return "ASTC HDR"; case VULKAN_HPP_NAMESPACE::Format::eAstc8x5SfloatBlock: return "ASTC HDR"; case VULKAN_HPP_NAMESPACE::Format::eAstc8x6SfloatBlock: return "ASTC HDR"; case VULKAN_HPP_NAMESPACE::Format::eAstc8x8SfloatBlock: return "ASTC HDR"; case VULKAN_HPP_NAMESPACE::Format::eAstc10x5SfloatBlock: return "ASTC HDR"; case VULKAN_HPP_NAMESPACE::Format::eAstc10x6SfloatBlock: return "ASTC HDR"; case VULKAN_HPP_NAMESPACE::Format::eAstc10x8SfloatBlock: return "ASTC HDR"; case VULKAN_HPP_NAMESPACE::Format::eAstc10x10SfloatBlock: return "ASTC HDR"; case VULKAN_HPP_NAMESPACE::Format::eAstc12x10SfloatBlock: return "ASTC HDR"; case VULKAN_HPP_NAMESPACE::Format::eAstc12x12SfloatBlock: return "ASTC HDR"; case VULKAN_HPP_NAMESPACE::Format::ePvrtc12BppUnormBlockIMG: return "PVRTC"; case VULKAN_HPP_NAMESPACE::Format::ePvrtc14BppUnormBlockIMG: return "PVRTC"; case VULKAN_HPP_NAMESPACE::Format::ePvrtc22BppUnormBlockIMG: return "PVRTC"; case VULKAN_HPP_NAMESPACE::Format::ePvrtc24BppUnormBlockIMG: return "PVRTC"; case VULKAN_HPP_NAMESPACE::Format::ePvrtc12BppSrgbBlockIMG: return "PVRTC"; case VULKAN_HPP_NAMESPACE::Format::ePvrtc14BppSrgbBlockIMG: return "PVRTC"; case VULKAN_HPP_NAMESPACE::Format::ePvrtc22BppSrgbBlockIMG: return "PVRTC"; case VULKAN_HPP_NAMESPACE::Format::ePvrtc24BppSrgbBlockIMG: return "PVRTC"; default: return ""; } } // True, if this format is a compressed one. VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR_14 bool isCompressed( VULKAN_HPP_NAMESPACE::Format format ) { return ( *VULKAN_HPP_NAMESPACE::compressionScheme( format ) != 0 ); } // The number of bits into which the format is packed. A single image element in this format // can be stored in the same space as a scalar type of this bit width. VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR_14 uint8_t packed( VULKAN_HPP_NAMESPACE::Format format ) { switch ( format ) { case VULKAN_HPP_NAMESPACE::Format::eR4G4UnormPack8: return 8; case VULKAN_HPP_NAMESPACE::Format::eR4G4B4A4UnormPack16: return 16; case VULKAN_HPP_NAMESPACE::Format::eB4G4R4A4UnormPack16: return 16; case VULKAN_HPP_NAMESPACE::Format::eR5G6B5UnormPack16: return 16; case VULKAN_HPP_NAMESPACE::Format::eB5G6R5UnormPack16: return 16; case VULKAN_HPP_NAMESPACE::Format::eR5G5B5A1UnormPack16: return 16; case VULKAN_HPP_NAMESPACE::Format::eB5G5R5A1UnormPack16: return 16; case VULKAN_HPP_NAMESPACE::Format::eA1R5G5B5UnormPack16: return 16; case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8UnormPack32: return 32; case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8SnormPack32: return 32; case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8UscaledPack32: return 32; case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8SscaledPack32: return 32; case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8UintPack32: return 32; case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8SintPack32: return 32; case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8SrgbPack32: return 32; case VULKAN_HPP_NAMESPACE::Format::eA2R10G10B10UnormPack32: return 32; case VULKAN_HPP_NAMESPACE::Format::eA2R10G10B10SnormPack32: return 32; case VULKAN_HPP_NAMESPACE::Format::eA2R10G10B10UscaledPack32: return 32; case VULKAN_HPP_NAMESPACE::Format::eA2R10G10B10SscaledPack32: return 32; case VULKAN_HPP_NAMESPACE::Format::eA2R10G10B10UintPack32: return 32; case VULKAN_HPP_NAMESPACE::Format::eA2R10G10B10SintPack32: return 32; case VULKAN_HPP_NAMESPACE::Format::eA2B10G10R10UnormPack32: return 32; case VULKAN_HPP_NAMESPACE::Format::eA2B10G10R10SnormPack32: return 32; case VULKAN_HPP_NAMESPACE::Format::eA2B10G10R10UscaledPack32: return 32; case VULKAN_HPP_NAMESPACE::Format::eA2B10G10R10SscaledPack32: return 32; case VULKAN_HPP_NAMESPACE::Format::eA2B10G10R10UintPack32: return 32; case VULKAN_HPP_NAMESPACE::Format::eA2B10G10R10SintPack32: return 32; case VULKAN_HPP_NAMESPACE::Format::eB10G11R11UfloatPack32: return 32; case VULKAN_HPP_NAMESPACE::Format::eE5B9G9R9UfloatPack32: return 32; case VULKAN_HPP_NAMESPACE::Format::eX8D24UnormPack32: return 32; case VULKAN_HPP_NAMESPACE::Format::eR10X6UnormPack16: return 16; case VULKAN_HPP_NAMESPACE::Format::eR10X6G10X6Unorm2Pack16: return 16; case VULKAN_HPP_NAMESPACE::Format::eR10X6G10X6B10X6A10X6Unorm4Pack16: return 16; case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6G10X6R10X6422Unorm4Pack16: return 16; case VULKAN_HPP_NAMESPACE::Format::eB10X6G10X6R10X6G10X6422Unorm4Pack16: return 16; case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X63Plane420Unorm3Pack16: return 16; case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X62Plane420Unorm3Pack16: return 16; case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X63Plane422Unorm3Pack16: return 16; case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X62Plane422Unorm3Pack16: return 16; case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X63Plane444Unorm3Pack16: return 16; case VULKAN_HPP_NAMESPACE::Format::eR12X4UnormPack16: return 16; case VULKAN_HPP_NAMESPACE::Format::eR12X4G12X4Unorm2Pack16: return 16; case VULKAN_HPP_NAMESPACE::Format::eR12X4G12X4B12X4A12X4Unorm4Pack16: return 16; case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4G12X4R12X4422Unorm4Pack16: return 16; case VULKAN_HPP_NAMESPACE::Format::eB12X4G12X4R12X4G12X4422Unorm4Pack16: return 16; case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X43Plane420Unorm3Pack16: return 16; case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X42Plane420Unorm3Pack16: return 16; case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X43Plane422Unorm3Pack16: return 16; case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X42Plane422Unorm3Pack16: return 16; case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X43Plane444Unorm3Pack16: return 16; case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X62Plane444Unorm3Pack16: return 16; case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X42Plane444Unorm3Pack16: return 16; case VULKAN_HPP_NAMESPACE::Format::eA4R4G4B4UnormPack16: return 16; case VULKAN_HPP_NAMESPACE::Format::eA4B4G4R4UnormPack16: return 16; case VULKAN_HPP_NAMESPACE::Format::eA1B5G5R5UnormPack16: return 16; default: return 0; } } // The single-plane format that this plane is compatible with. VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR_14 VULKAN_HPP_NAMESPACE::Format planeCompatibleFormat( VULKAN_HPP_NAMESPACE::Format format, uint8_t plane ) { switch ( format ) { case VULKAN_HPP_NAMESPACE::Format::eG8B8R83Plane420Unorm: switch ( plane ) { case 0: return VULKAN_HPP_NAMESPACE::Format::eR8Unorm; case 1: return VULKAN_HPP_NAMESPACE::Format::eR8Unorm; case 2: return VULKAN_HPP_NAMESPACE::Format::eR8Unorm; default: VULKAN_HPP_ASSERT( false ); return VULKAN_HPP_NAMESPACE::Format::eUndefined; } case VULKAN_HPP_NAMESPACE::Format::eG8B8R82Plane420Unorm: switch ( plane ) { case 0: return VULKAN_HPP_NAMESPACE::Format::eR8Unorm; case 1: return VULKAN_HPP_NAMESPACE::Format::eR8G8Unorm; default: VULKAN_HPP_ASSERT( false ); return VULKAN_HPP_NAMESPACE::Format::eUndefined; } case VULKAN_HPP_NAMESPACE::Format::eG8B8R83Plane422Unorm: switch ( plane ) { case 0: return VULKAN_HPP_NAMESPACE::Format::eR8Unorm; case 1: return VULKAN_HPP_NAMESPACE::Format::eR8Unorm; case 2: return VULKAN_HPP_NAMESPACE::Format::eR8Unorm; default: VULKAN_HPP_ASSERT( false ); return VULKAN_HPP_NAMESPACE::Format::eUndefined; } case VULKAN_HPP_NAMESPACE::Format::eG8B8R82Plane422Unorm: switch ( plane ) { case 0: return VULKAN_HPP_NAMESPACE::Format::eR8Unorm; case 1: return VULKAN_HPP_NAMESPACE::Format::eR8G8Unorm; default: VULKAN_HPP_ASSERT( false ); return VULKAN_HPP_NAMESPACE::Format::eUndefined; } case VULKAN_HPP_NAMESPACE::Format::eG8B8R83Plane444Unorm: switch ( plane ) { case 0: return VULKAN_HPP_NAMESPACE::Format::eR8Unorm; case 1: return VULKAN_HPP_NAMESPACE::Format::eR8Unorm; case 2: return VULKAN_HPP_NAMESPACE::Format::eR8Unorm; default: VULKAN_HPP_ASSERT( false ); return VULKAN_HPP_NAMESPACE::Format::eUndefined; } case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X63Plane420Unorm3Pack16: switch ( plane ) { case 0: return VULKAN_HPP_NAMESPACE::Format::eR10X6UnormPack16; case 1: return VULKAN_HPP_NAMESPACE::Format::eR10X6UnormPack16; case 2: return VULKAN_HPP_NAMESPACE::Format::eR10X6UnormPack16; default: VULKAN_HPP_ASSERT( false ); return VULKAN_HPP_NAMESPACE::Format::eUndefined; } case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X62Plane420Unorm3Pack16: switch ( plane ) { case 0: return VULKAN_HPP_NAMESPACE::Format::eR10X6UnormPack16; case 1: return VULKAN_HPP_NAMESPACE::Format::eR10X6G10X6Unorm2Pack16; default: VULKAN_HPP_ASSERT( false ); return VULKAN_HPP_NAMESPACE::Format::eUndefined; } case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X63Plane422Unorm3Pack16: switch ( plane ) { case 0: return VULKAN_HPP_NAMESPACE::Format::eR10X6UnormPack16; case 1: return VULKAN_HPP_NAMESPACE::Format::eR10X6UnormPack16; case 2: return VULKAN_HPP_NAMESPACE::Format::eR10X6UnormPack16; default: VULKAN_HPP_ASSERT( false ); return VULKAN_HPP_NAMESPACE::Format::eUndefined; } case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X62Plane422Unorm3Pack16: switch ( plane ) { case 0: return VULKAN_HPP_NAMESPACE::Format::eR10X6UnormPack16; case 1: return VULKAN_HPP_NAMESPACE::Format::eR10X6G10X6Unorm2Pack16; default: VULKAN_HPP_ASSERT( false ); return VULKAN_HPP_NAMESPACE::Format::eUndefined; } case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X63Plane444Unorm3Pack16: switch ( plane ) { case 0: return VULKAN_HPP_NAMESPACE::Format::eR10X6UnormPack16; case 1: return VULKAN_HPP_NAMESPACE::Format::eR10X6UnormPack16; case 2: return VULKAN_HPP_NAMESPACE::Format::eR10X6UnormPack16; default: VULKAN_HPP_ASSERT( false ); return VULKAN_HPP_NAMESPACE::Format::eUndefined; } case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X43Plane420Unorm3Pack16: switch ( plane ) { case 0: return VULKAN_HPP_NAMESPACE::Format::eR12X4UnormPack16; case 1: return VULKAN_HPP_NAMESPACE::Format::eR12X4UnormPack16; case 2: return VULKAN_HPP_NAMESPACE::Format::eR12X4UnormPack16; default: VULKAN_HPP_ASSERT( false ); return VULKAN_HPP_NAMESPACE::Format::eUndefined; } case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X42Plane420Unorm3Pack16: switch ( plane ) { case 0: return VULKAN_HPP_NAMESPACE::Format::eR12X4UnormPack16; case 1: return VULKAN_HPP_NAMESPACE::Format::eR12X4G12X4Unorm2Pack16; default: VULKAN_HPP_ASSERT( false ); return VULKAN_HPP_NAMESPACE::Format::eUndefined; } case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X43Plane422Unorm3Pack16: switch ( plane ) { case 0: return VULKAN_HPP_NAMESPACE::Format::eR12X4UnormPack16; case 1: return VULKAN_HPP_NAMESPACE::Format::eR12X4UnormPack16; case 2: return VULKAN_HPP_NAMESPACE::Format::eR12X4UnormPack16; default: VULKAN_HPP_ASSERT( false ); return VULKAN_HPP_NAMESPACE::Format::eUndefined; } case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X42Plane422Unorm3Pack16: switch ( plane ) { case 0: return VULKAN_HPP_NAMESPACE::Format::eR12X4UnormPack16; case 1: return VULKAN_HPP_NAMESPACE::Format::eR12X4G12X4Unorm2Pack16; default: VULKAN_HPP_ASSERT( false ); return VULKAN_HPP_NAMESPACE::Format::eUndefined; } case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X43Plane444Unorm3Pack16: switch ( plane ) { case 0: return VULKAN_HPP_NAMESPACE::Format::eR12X4UnormPack16; case 1: return VULKAN_HPP_NAMESPACE::Format::eR12X4UnormPack16; case 2: return VULKAN_HPP_NAMESPACE::Format::eR12X4UnormPack16; default: VULKAN_HPP_ASSERT( false ); return VULKAN_HPP_NAMESPACE::Format::eUndefined; } case VULKAN_HPP_NAMESPACE::Format::eG16B16R163Plane420Unorm: switch ( plane ) { case 0: return VULKAN_HPP_NAMESPACE::Format::eR16Unorm; case 1: return VULKAN_HPP_NAMESPACE::Format::eR16Unorm; case 2: return VULKAN_HPP_NAMESPACE::Format::eR16Unorm; default: VULKAN_HPP_ASSERT( false ); return VULKAN_HPP_NAMESPACE::Format::eUndefined; } case VULKAN_HPP_NAMESPACE::Format::eG16B16R162Plane420Unorm: switch ( plane ) { case 0: return VULKAN_HPP_NAMESPACE::Format::eR16Unorm; case 1: return VULKAN_HPP_NAMESPACE::Format::eR16G16Unorm; default: VULKAN_HPP_ASSERT( false ); return VULKAN_HPP_NAMESPACE::Format::eUndefined; } case VULKAN_HPP_NAMESPACE::Format::eG16B16R163Plane422Unorm: switch ( plane ) { case 0: return VULKAN_HPP_NAMESPACE::Format::eR16Unorm; case 1: return VULKAN_HPP_NAMESPACE::Format::eR16Unorm; case 2: return VULKAN_HPP_NAMESPACE::Format::eR16Unorm; default: VULKAN_HPP_ASSERT( false ); return VULKAN_HPP_NAMESPACE::Format::eUndefined; } case VULKAN_HPP_NAMESPACE::Format::eG16B16R162Plane422Unorm: switch ( plane ) { case 0: return VULKAN_HPP_NAMESPACE::Format::eR16Unorm; case 1: return VULKAN_HPP_NAMESPACE::Format::eR16G16Unorm; default: VULKAN_HPP_ASSERT( false ); return VULKAN_HPP_NAMESPACE::Format::eUndefined; } case VULKAN_HPP_NAMESPACE::Format::eG16B16R163Plane444Unorm: switch ( plane ) { case 0: return VULKAN_HPP_NAMESPACE::Format::eR16Unorm; case 1: return VULKAN_HPP_NAMESPACE::Format::eR16Unorm; case 2: return VULKAN_HPP_NAMESPACE::Format::eR16Unorm; default: VULKAN_HPP_ASSERT( false ); return VULKAN_HPP_NAMESPACE::Format::eUndefined; } case VULKAN_HPP_NAMESPACE::Format::eG8B8R82Plane444Unorm: switch ( plane ) { case 0: return VULKAN_HPP_NAMESPACE::Format::eR8Unorm; case 1: return VULKAN_HPP_NAMESPACE::Format::eR8G8Unorm; default: VULKAN_HPP_ASSERT( false ); return VULKAN_HPP_NAMESPACE::Format::eUndefined; } case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X62Plane444Unorm3Pack16: switch ( plane ) { case 0: return VULKAN_HPP_NAMESPACE::Format::eR10X6UnormPack16; case 1: return VULKAN_HPP_NAMESPACE::Format::eR10X6G10X6Unorm2Pack16; default: VULKAN_HPP_ASSERT( false ); return VULKAN_HPP_NAMESPACE::Format::eUndefined; } case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X42Plane444Unorm3Pack16: switch ( plane ) { case 0: return VULKAN_HPP_NAMESPACE::Format::eR12X4UnormPack16; case 1: return VULKAN_HPP_NAMESPACE::Format::eR12X4G12X4Unorm2Pack16; default: VULKAN_HPP_ASSERT( false ); return VULKAN_HPP_NAMESPACE::Format::eUndefined; } case VULKAN_HPP_NAMESPACE::Format::eG16B16R162Plane444Unorm: switch ( plane ) { case 0: return VULKAN_HPP_NAMESPACE::Format::eR16Unorm; case 1: return VULKAN_HPP_NAMESPACE::Format::eR16G16Unorm; default: VULKAN_HPP_ASSERT( false ); return VULKAN_HPP_NAMESPACE::Format::eUndefined; } default: VULKAN_HPP_ASSERT( plane == 0 ); return format; } } // The number of image planes of this format. VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR_14 uint8_t planeCount( VULKAN_HPP_NAMESPACE::Format format ) { switch ( format ) { case VULKAN_HPP_NAMESPACE::Format::eG8B8R83Plane420Unorm: return 3; case VULKAN_HPP_NAMESPACE::Format::eG8B8R82Plane420Unorm: return 2; case VULKAN_HPP_NAMESPACE::Format::eG8B8R83Plane422Unorm: return 3; case VULKAN_HPP_NAMESPACE::Format::eG8B8R82Plane422Unorm: return 2; case VULKAN_HPP_NAMESPACE::Format::eG8B8R83Plane444Unorm: return 3; case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X63Plane420Unorm3Pack16: return 3; case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X62Plane420Unorm3Pack16: return 2; case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X63Plane422Unorm3Pack16: return 3; case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X62Plane422Unorm3Pack16: return 2; case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X63Plane444Unorm3Pack16: return 3; case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X43Plane420Unorm3Pack16: return 3; case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X42Plane420Unorm3Pack16: return 2; case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X43Plane422Unorm3Pack16: return 3; case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X42Plane422Unorm3Pack16: return 2; case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X43Plane444Unorm3Pack16: return 3; case VULKAN_HPP_NAMESPACE::Format::eG16B16R163Plane420Unorm: return 3; case VULKAN_HPP_NAMESPACE::Format::eG16B16R162Plane420Unorm: return 2; case VULKAN_HPP_NAMESPACE::Format::eG16B16R163Plane422Unorm: return 3; case VULKAN_HPP_NAMESPACE::Format::eG16B16R162Plane422Unorm: return 2; case VULKAN_HPP_NAMESPACE::Format::eG16B16R163Plane444Unorm: return 3; case VULKAN_HPP_NAMESPACE::Format::eG8B8R82Plane444Unorm: return 2; case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X62Plane444Unorm3Pack16: return 2; case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X42Plane444Unorm3Pack16: return 2; case VULKAN_HPP_NAMESPACE::Format::eG16B16R162Plane444Unorm: return 2; default: return 1; } } // The relative height of this plane. A value of k means that this plane is 1/k the height of the overall format. VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR_14 uint8_t planeHeightDivisor( VULKAN_HPP_NAMESPACE::Format format, uint8_t plane ) { switch ( format ) { case VULKAN_HPP_NAMESPACE::Format::eG8B8R83Plane420Unorm: switch ( plane ) { case 0: return 1; case 1: return 2; case 2: return 2; default: VULKAN_HPP_ASSERT( false ); return 1; } case VULKAN_HPP_NAMESPACE::Format::eG8B8R82Plane420Unorm: switch ( plane ) { case 0: return 1; case 1: return 2; default: VULKAN_HPP_ASSERT( false ); return 1; } case VULKAN_HPP_NAMESPACE::Format::eG8B8R83Plane422Unorm: switch ( plane ) { case 0: return 1; case 1: return 1; case 2: return 1; default: VULKAN_HPP_ASSERT( false ); return 1; } case VULKAN_HPP_NAMESPACE::Format::eG8B8R82Plane422Unorm: switch ( plane ) { case 0: return 1; case 1: return 1; default: VULKAN_HPP_ASSERT( false ); return 1; } case VULKAN_HPP_NAMESPACE::Format::eG8B8R83Plane444Unorm: switch ( plane ) { case 0: return 1; case 1: return 1; case 2: return 1; default: VULKAN_HPP_ASSERT( false ); return 1; } case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X63Plane420Unorm3Pack16: switch ( plane ) { case 0: return 1; case 1: return 2; case 2: return 2; default: VULKAN_HPP_ASSERT( false ); return 1; } case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X62Plane420Unorm3Pack16: switch ( plane ) { case 0: return 1; case 1: return 2; default: VULKAN_HPP_ASSERT( false ); return 1; } case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X63Plane422Unorm3Pack16: switch ( plane ) { case 0: return 1; case 1: return 1; case 2: return 1; default: VULKAN_HPP_ASSERT( false ); return 1; } case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X62Plane422Unorm3Pack16: switch ( plane ) { case 0: return 1; case 1: return 1; default: VULKAN_HPP_ASSERT( false ); return 1; } case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X63Plane444Unorm3Pack16: switch ( plane ) { case 0: return 1; case 1: return 1; case 2: return 1; default: VULKAN_HPP_ASSERT( false ); return 1; } case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X43Plane420Unorm3Pack16: switch ( plane ) { case 0: return 1; case 1: return 2; case 2: return 2; default: VULKAN_HPP_ASSERT( false ); return 1; } case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X42Plane420Unorm3Pack16: switch ( plane ) { case 0: return 1; case 1: return 2; default: VULKAN_HPP_ASSERT( false ); return 1; } case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X43Plane422Unorm3Pack16: switch ( plane ) { case 0: return 1; case 1: return 1; case 2: return 1; default: VULKAN_HPP_ASSERT( false ); return 1; } case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X42Plane422Unorm3Pack16: switch ( plane ) { case 0: return 1; case 1: return 1; default: VULKAN_HPP_ASSERT( false ); return 1; } case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X43Plane444Unorm3Pack16: switch ( plane ) { case 0: return 1; case 1: return 1; case 2: return 1; default: VULKAN_HPP_ASSERT( false ); return 1; } case VULKAN_HPP_NAMESPACE::Format::eG16B16R163Plane420Unorm: switch ( plane ) { case 0: return 1; case 1: return 2; case 2: return 2; default: VULKAN_HPP_ASSERT( false ); return 1; } case VULKAN_HPP_NAMESPACE::Format::eG16B16R162Plane420Unorm: switch ( plane ) { case 0: return 1; case 1: return 2; default: VULKAN_HPP_ASSERT( false ); return 1; } case VULKAN_HPP_NAMESPACE::Format::eG16B16R163Plane422Unorm: switch ( plane ) { case 0: return 1; case 1: return 1; case 2: return 1; default: VULKAN_HPP_ASSERT( false ); return 1; } case VULKAN_HPP_NAMESPACE::Format::eG16B16R162Plane422Unorm: switch ( plane ) { case 0: return 1; case 1: return 1; default: VULKAN_HPP_ASSERT( false ); return 1; } case VULKAN_HPP_NAMESPACE::Format::eG16B16R163Plane444Unorm: switch ( plane ) { case 0: return 1; case 1: return 1; case 2: return 1; default: VULKAN_HPP_ASSERT( false ); return 1; } case VULKAN_HPP_NAMESPACE::Format::eG8B8R82Plane444Unorm: switch ( plane ) { case 0: return 1; case 1: return 1; default: VULKAN_HPP_ASSERT( false ); return 1; } case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X62Plane444Unorm3Pack16: switch ( plane ) { case 0: return 1; case 1: return 1; default: VULKAN_HPP_ASSERT( false ); return 1; } case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X42Plane444Unorm3Pack16: switch ( plane ) { case 0: return 1; case 1: return 1; default: VULKAN_HPP_ASSERT( false ); return 1; } case VULKAN_HPP_NAMESPACE::Format::eG16B16R162Plane444Unorm: switch ( plane ) { case 0: return 1; case 1: return 1; default: VULKAN_HPP_ASSERT( false ); return 1; } default: VULKAN_HPP_ASSERT( plane == 0 ); return 1; } } // The relative width of this plane. A value of k means that this plane is 1/k the width of the overall format. VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR_14 uint8_t planeWidthDivisor( VULKAN_HPP_NAMESPACE::Format format, uint8_t plane ) { switch ( format ) { case VULKAN_HPP_NAMESPACE::Format::eG8B8R83Plane420Unorm: switch ( plane ) { case 0: return 1; case 1: return 2; case 2: return 2; default: VULKAN_HPP_ASSERT( false ); return 1; } case VULKAN_HPP_NAMESPACE::Format::eG8B8R82Plane420Unorm: switch ( plane ) { case 0: return 1; case 1: return 2; default: VULKAN_HPP_ASSERT( false ); return 1; } case VULKAN_HPP_NAMESPACE::Format::eG8B8R83Plane422Unorm: switch ( plane ) { case 0: return 1; case 1: return 2; case 2: return 2; default: VULKAN_HPP_ASSERT( false ); return 1; } case VULKAN_HPP_NAMESPACE::Format::eG8B8R82Plane422Unorm: switch ( plane ) { case 0: return 1; case 1: return 2; default: VULKAN_HPP_ASSERT( false ); return 1; } case VULKAN_HPP_NAMESPACE::Format::eG8B8R83Plane444Unorm: switch ( plane ) { case 0: return 1; case 1: return 1; case 2: return 1; default: VULKAN_HPP_ASSERT( false ); return 1; } case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X63Plane420Unorm3Pack16: switch ( plane ) { case 0: return 1; case 1: return 2; case 2: return 2; default: VULKAN_HPP_ASSERT( false ); return 1; } case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X62Plane420Unorm3Pack16: switch ( plane ) { case 0: return 1; case 1: return 2; default: VULKAN_HPP_ASSERT( false ); return 1; } case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X63Plane422Unorm3Pack16: switch ( plane ) { case 0: return 1; case 1: return 2; case 2: return 2; default: VULKAN_HPP_ASSERT( false ); return 1; } case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X62Plane422Unorm3Pack16: switch ( plane ) { case 0: return 1; case 1: return 2; default: VULKAN_HPP_ASSERT( false ); return 1; } case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X63Plane444Unorm3Pack16: switch ( plane ) { case 0: return 1; case 1: return 1; case 2: return 1; default: VULKAN_HPP_ASSERT( false ); return 1; } case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X43Plane420Unorm3Pack16: switch ( plane ) { case 0: return 1; case 1: return 2; case 2: return 2; default: VULKAN_HPP_ASSERT( false ); return 1; } case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X42Plane420Unorm3Pack16: switch ( plane ) { case 0: return 1; case 1: return 2; default: VULKAN_HPP_ASSERT( false ); return 1; } case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X43Plane422Unorm3Pack16: switch ( plane ) { case 0: return 1; case 1: return 2; case 2: return 2; default: VULKAN_HPP_ASSERT( false ); return 1; } case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X42Plane422Unorm3Pack16: switch ( plane ) { case 0: return 1; case 1: return 2; default: VULKAN_HPP_ASSERT( false ); return 1; } case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X43Plane444Unorm3Pack16: switch ( plane ) { case 0: return 1; case 1: return 1; case 2: return 1; default: VULKAN_HPP_ASSERT( false ); return 1; } case VULKAN_HPP_NAMESPACE::Format::eG16B16R163Plane420Unorm: switch ( plane ) { case 0: return 1; case 1: return 2; case 2: return 2; default: VULKAN_HPP_ASSERT( false ); return 1; } case VULKAN_HPP_NAMESPACE::Format::eG16B16R162Plane420Unorm: switch ( plane ) { case 0: return 1; case 1: return 2; default: VULKAN_HPP_ASSERT( false ); return 1; } case VULKAN_HPP_NAMESPACE::Format::eG16B16R163Plane422Unorm: switch ( plane ) { case 0: return 1; case 1: return 2; case 2: return 2; default: VULKAN_HPP_ASSERT( false ); return 1; } case VULKAN_HPP_NAMESPACE::Format::eG16B16R162Plane422Unorm: switch ( plane ) { case 0: return 1; case 1: return 2; default: VULKAN_HPP_ASSERT( false ); return 1; } case VULKAN_HPP_NAMESPACE::Format::eG16B16R163Plane444Unorm: switch ( plane ) { case 0: return 1; case 1: return 1; case 2: return 1; default: VULKAN_HPP_ASSERT( false ); return 1; } case VULKAN_HPP_NAMESPACE::Format::eG8B8R82Plane444Unorm: switch ( plane ) { case 0: return 1; case 1: return 1; default: VULKAN_HPP_ASSERT( false ); return 1; } case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X62Plane444Unorm3Pack16: switch ( plane ) { case 0: return 1; case 1: return 1; default: VULKAN_HPP_ASSERT( false ); return 1; } case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X42Plane444Unorm3Pack16: switch ( plane ) { case 0: return 1; case 1: return 1; default: VULKAN_HPP_ASSERT( false ); return 1; } case VULKAN_HPP_NAMESPACE::Format::eG16B16R162Plane444Unorm: switch ( plane ) { case 0: return 1; case 1: return 1; default: VULKAN_HPP_ASSERT( false ); return 1; } default: VULKAN_HPP_ASSERT( plane == 0 ); return 1; } } // The number of texels in a texel block. VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR_14 uint8_t texelsPerBlock( VULKAN_HPP_NAMESPACE::Format format ) { switch ( format ) { case VULKAN_HPP_NAMESPACE::Format::eR4G4UnormPack8: return 1; case VULKAN_HPP_NAMESPACE::Format::eR4G4B4A4UnormPack16: return 1; case VULKAN_HPP_NAMESPACE::Format::eB4G4R4A4UnormPack16: return 1; case VULKAN_HPP_NAMESPACE::Format::eR5G6B5UnormPack16: return 1; case VULKAN_HPP_NAMESPACE::Format::eB5G6R5UnormPack16: return 1; case VULKAN_HPP_NAMESPACE::Format::eR5G5B5A1UnormPack16: return 1; case VULKAN_HPP_NAMESPACE::Format::eB5G5R5A1UnormPack16: return 1; case VULKAN_HPP_NAMESPACE::Format::eA1R5G5B5UnormPack16: return 1; case VULKAN_HPP_NAMESPACE::Format::eR8Unorm: return 1; case VULKAN_HPP_NAMESPACE::Format::eR8Snorm: return 1; case VULKAN_HPP_NAMESPACE::Format::eR8Uscaled: return 1; case VULKAN_HPP_NAMESPACE::Format::eR8Sscaled: return 1; case VULKAN_HPP_NAMESPACE::Format::eR8Uint: return 1; case VULKAN_HPP_NAMESPACE::Format::eR8Sint: return 1; case VULKAN_HPP_NAMESPACE::Format::eR8Srgb: return 1; case VULKAN_HPP_NAMESPACE::Format::eR8G8Unorm: return 1; case VULKAN_HPP_NAMESPACE::Format::eR8G8Snorm: return 1; case VULKAN_HPP_NAMESPACE::Format::eR8G8Uscaled: return 1; case VULKAN_HPP_NAMESPACE::Format::eR8G8Sscaled: return 1; case VULKAN_HPP_NAMESPACE::Format::eR8G8Uint: return 1; case VULKAN_HPP_NAMESPACE::Format::eR8G8Sint: return 1; case VULKAN_HPP_NAMESPACE::Format::eR8G8Srgb: return 1; case VULKAN_HPP_NAMESPACE::Format::eR8G8B8Unorm: return 1; case VULKAN_HPP_NAMESPACE::Format::eR8G8B8Snorm: return 1; case VULKAN_HPP_NAMESPACE::Format::eR8G8B8Uscaled: return 1; case VULKAN_HPP_NAMESPACE::Format::eR8G8B8Sscaled: return 1; case VULKAN_HPP_NAMESPACE::Format::eR8G8B8Uint: return 1; case VULKAN_HPP_NAMESPACE::Format::eR8G8B8Sint: return 1; case VULKAN_HPP_NAMESPACE::Format::eR8G8B8Srgb: return 1; case VULKAN_HPP_NAMESPACE::Format::eB8G8R8Unorm: return 1; case VULKAN_HPP_NAMESPACE::Format::eB8G8R8Snorm: return 1; case VULKAN_HPP_NAMESPACE::Format::eB8G8R8Uscaled: return 1; case VULKAN_HPP_NAMESPACE::Format::eB8G8R8Sscaled: return 1; case VULKAN_HPP_NAMESPACE::Format::eB8G8R8Uint: return 1; case VULKAN_HPP_NAMESPACE::Format::eB8G8R8Sint: return 1; case VULKAN_HPP_NAMESPACE::Format::eB8G8R8Srgb: return 1; case VULKAN_HPP_NAMESPACE::Format::eR8G8B8A8Unorm: return 1; case VULKAN_HPP_NAMESPACE::Format::eR8G8B8A8Snorm: return 1; case VULKAN_HPP_NAMESPACE::Format::eR8G8B8A8Uscaled: return 1; case VULKAN_HPP_NAMESPACE::Format::eR8G8B8A8Sscaled: return 1; case VULKAN_HPP_NAMESPACE::Format::eR8G8B8A8Uint: return 1; case VULKAN_HPP_NAMESPACE::Format::eR8G8B8A8Sint: return 1; case VULKAN_HPP_NAMESPACE::Format::eR8G8B8A8Srgb: return 1; case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Unorm: return 1; case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Snorm: return 1; case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Uscaled: return 1; case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Sscaled: return 1; case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Uint: return 1; case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Sint: return 1; case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Srgb: return 1; case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8UnormPack32: return 1; case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8SnormPack32: return 1; case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8UscaledPack32: return 1; case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8SscaledPack32: return 1; case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8UintPack32: return 1; case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8SintPack32: return 1; case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8SrgbPack32: return 1; case VULKAN_HPP_NAMESPACE::Format::eA2R10G10B10UnormPack32: return 1; case VULKAN_HPP_NAMESPACE::Format::eA2R10G10B10SnormPack32: return 1; case VULKAN_HPP_NAMESPACE::Format::eA2R10G10B10UscaledPack32: return 1; case VULKAN_HPP_NAMESPACE::Format::eA2R10G10B10SscaledPack32: return 1; case VULKAN_HPP_NAMESPACE::Format::eA2R10G10B10UintPack32: return 1; case VULKAN_HPP_NAMESPACE::Format::eA2R10G10B10SintPack32: return 1; case VULKAN_HPP_NAMESPACE::Format::eA2B10G10R10UnormPack32: return 1; case VULKAN_HPP_NAMESPACE::Format::eA2B10G10R10SnormPack32: return 1; case VULKAN_HPP_NAMESPACE::Format::eA2B10G10R10UscaledPack32: return 1; case VULKAN_HPP_NAMESPACE::Format::eA2B10G10R10SscaledPack32: return 1; case VULKAN_HPP_NAMESPACE::Format::eA2B10G10R10UintPack32: return 1; case VULKAN_HPP_NAMESPACE::Format::eA2B10G10R10SintPack32: return 1; case VULKAN_HPP_NAMESPACE::Format::eR16Unorm: return 1; case VULKAN_HPP_NAMESPACE::Format::eR16Snorm: return 1; case VULKAN_HPP_NAMESPACE::Format::eR16Uscaled: return 1; case VULKAN_HPP_NAMESPACE::Format::eR16Sscaled: return 1; case VULKAN_HPP_NAMESPACE::Format::eR16Uint: return 1; case VULKAN_HPP_NAMESPACE::Format::eR16Sint: return 1; case VULKAN_HPP_NAMESPACE::Format::eR16Sfloat: return 1; case VULKAN_HPP_NAMESPACE::Format::eR16G16Unorm: return 1; case VULKAN_HPP_NAMESPACE::Format::eR16G16Snorm: return 1; case VULKAN_HPP_NAMESPACE::Format::eR16G16Uscaled: return 1; case VULKAN_HPP_NAMESPACE::Format::eR16G16Sscaled: return 1; case VULKAN_HPP_NAMESPACE::Format::eR16G16Uint: return 1; case VULKAN_HPP_NAMESPACE::Format::eR16G16Sint: return 1; case VULKAN_HPP_NAMESPACE::Format::eR16G16Sfloat: return 1; case VULKAN_HPP_NAMESPACE::Format::eR16G16B16Unorm: return 1; case VULKAN_HPP_NAMESPACE::Format::eR16G16B16Snorm: return 1; case VULKAN_HPP_NAMESPACE::Format::eR16G16B16Uscaled: return 1; case VULKAN_HPP_NAMESPACE::Format::eR16G16B16Sscaled: return 1; case VULKAN_HPP_NAMESPACE::Format::eR16G16B16Uint: return 1; case VULKAN_HPP_NAMESPACE::Format::eR16G16B16Sint: return 1; case VULKAN_HPP_NAMESPACE::Format::eR16G16B16Sfloat: return 1; case VULKAN_HPP_NAMESPACE::Format::eR16G16B16A16Unorm: return 1; case VULKAN_HPP_NAMESPACE::Format::eR16G16B16A16Snorm: return 1; case VULKAN_HPP_NAMESPACE::Format::eR16G16B16A16Uscaled: return 1; case VULKAN_HPP_NAMESPACE::Format::eR16G16B16A16Sscaled: return 1; case VULKAN_HPP_NAMESPACE::Format::eR16G16B16A16Uint: return 1; case VULKAN_HPP_NAMESPACE::Format::eR16G16B16A16Sint: return 1; case VULKAN_HPP_NAMESPACE::Format::eR16G16B16A16Sfloat: return 1; case VULKAN_HPP_NAMESPACE::Format::eR32Uint: return 1; case VULKAN_HPP_NAMESPACE::Format::eR32Sint: return 1; case VULKAN_HPP_NAMESPACE::Format::eR32Sfloat: return 1; case VULKAN_HPP_NAMESPACE::Format::eR32G32Uint: return 1; case VULKAN_HPP_NAMESPACE::Format::eR32G32Sint: return 1; case VULKAN_HPP_NAMESPACE::Format::eR32G32Sfloat: return 1; case VULKAN_HPP_NAMESPACE::Format::eR32G32B32Uint: return 1; case VULKAN_HPP_NAMESPACE::Format::eR32G32B32Sint: return 1; case VULKAN_HPP_NAMESPACE::Format::eR32G32B32Sfloat: return 1; case VULKAN_HPP_NAMESPACE::Format::eR32G32B32A32Uint: return 1; case VULKAN_HPP_NAMESPACE::Format::eR32G32B32A32Sint: return 1; case VULKAN_HPP_NAMESPACE::Format::eR32G32B32A32Sfloat: return 1; case VULKAN_HPP_NAMESPACE::Format::eR64Uint: return 1; case VULKAN_HPP_NAMESPACE::Format::eR64Sint: return 1; case VULKAN_HPP_NAMESPACE::Format::eR64Sfloat: return 1; case VULKAN_HPP_NAMESPACE::Format::eR64G64Uint: return 1; case VULKAN_HPP_NAMESPACE::Format::eR64G64Sint: return 1; case VULKAN_HPP_NAMESPACE::Format::eR64G64Sfloat: return 1; case VULKAN_HPP_NAMESPACE::Format::eR64G64B64Uint: return 1; case VULKAN_HPP_NAMESPACE::Format::eR64G64B64Sint: return 1; case VULKAN_HPP_NAMESPACE::Format::eR64G64B64Sfloat: return 1; case VULKAN_HPP_NAMESPACE::Format::eR64G64B64A64Uint: return 1; case VULKAN_HPP_NAMESPACE::Format::eR64G64B64A64Sint: return 1; case VULKAN_HPP_NAMESPACE::Format::eR64G64B64A64Sfloat: return 1; case VULKAN_HPP_NAMESPACE::Format::eB10G11R11UfloatPack32: return 1; case VULKAN_HPP_NAMESPACE::Format::eE5B9G9R9UfloatPack32: return 1; case VULKAN_HPP_NAMESPACE::Format::eD16Unorm: return 1; case VULKAN_HPP_NAMESPACE::Format::eX8D24UnormPack32: return 1; case VULKAN_HPP_NAMESPACE::Format::eD32Sfloat: return 1; case VULKAN_HPP_NAMESPACE::Format::eS8Uint: return 1; case VULKAN_HPP_NAMESPACE::Format::eD16UnormS8Uint: return 1; case VULKAN_HPP_NAMESPACE::Format::eD24UnormS8Uint: return 1; case VULKAN_HPP_NAMESPACE::Format::eD32SfloatS8Uint: return 1; case VULKAN_HPP_NAMESPACE::Format::eBc1RgbUnormBlock: return 16; case VULKAN_HPP_NAMESPACE::Format::eBc1RgbSrgbBlock: return 16; case VULKAN_HPP_NAMESPACE::Format::eBc1RgbaUnormBlock: return 16; case VULKAN_HPP_NAMESPACE::Format::eBc1RgbaSrgbBlock: return 16; case VULKAN_HPP_NAMESPACE::Format::eBc2UnormBlock: return 16; case VULKAN_HPP_NAMESPACE::Format::eBc2SrgbBlock: return 16; case VULKAN_HPP_NAMESPACE::Format::eBc3UnormBlock: return 16; case VULKAN_HPP_NAMESPACE::Format::eBc3SrgbBlock: return 16; case VULKAN_HPP_NAMESPACE::Format::eBc4UnormBlock: return 16; case VULKAN_HPP_NAMESPACE::Format::eBc4SnormBlock: return 16; case VULKAN_HPP_NAMESPACE::Format::eBc5UnormBlock: return 16; case VULKAN_HPP_NAMESPACE::Format::eBc5SnormBlock: return 16; case VULKAN_HPP_NAMESPACE::Format::eBc6HUfloatBlock: return 16; case VULKAN_HPP_NAMESPACE::Format::eBc6HSfloatBlock: return 16; case VULKAN_HPP_NAMESPACE::Format::eBc7UnormBlock: return 16; case VULKAN_HPP_NAMESPACE::Format::eBc7SrgbBlock: return 16; case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8UnormBlock: return 16; case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8SrgbBlock: return 16; case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8A1UnormBlock: return 16; case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8A1SrgbBlock: return 16; case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8A8UnormBlock: return 16; case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8A8SrgbBlock: return 16; case VULKAN_HPP_NAMESPACE::Format::eEacR11UnormBlock: return 16; case VULKAN_HPP_NAMESPACE::Format::eEacR11SnormBlock: return 16; case VULKAN_HPP_NAMESPACE::Format::eEacR11G11UnormBlock: return 16; case VULKAN_HPP_NAMESPACE::Format::eEacR11G11SnormBlock: return 16; case VULKAN_HPP_NAMESPACE::Format::eAstc4x4UnormBlock: return 16; case VULKAN_HPP_NAMESPACE::Format::eAstc4x4SrgbBlock: return 16; case VULKAN_HPP_NAMESPACE::Format::eAstc5x4UnormBlock: return 20; case VULKAN_HPP_NAMESPACE::Format::eAstc5x4SrgbBlock: return 20; case VULKAN_HPP_NAMESPACE::Format::eAstc5x5UnormBlock: return 25; case VULKAN_HPP_NAMESPACE::Format::eAstc5x5SrgbBlock: return 25; case VULKAN_HPP_NAMESPACE::Format::eAstc6x5UnormBlock: return 30; case VULKAN_HPP_NAMESPACE::Format::eAstc6x5SrgbBlock: return 30; case VULKAN_HPP_NAMESPACE::Format::eAstc6x6UnormBlock: return 36; case VULKAN_HPP_NAMESPACE::Format::eAstc6x6SrgbBlock: return 36; case VULKAN_HPP_NAMESPACE::Format::eAstc8x5UnormBlock: return 40; case VULKAN_HPP_NAMESPACE::Format::eAstc8x5SrgbBlock: return 40; case VULKAN_HPP_NAMESPACE::Format::eAstc8x6UnormBlock: return 48; case VULKAN_HPP_NAMESPACE::Format::eAstc8x6SrgbBlock: return 48; case VULKAN_HPP_NAMESPACE::Format::eAstc8x8UnormBlock: return 64; case VULKAN_HPP_NAMESPACE::Format::eAstc8x8SrgbBlock: return 64; case VULKAN_HPP_NAMESPACE::Format::eAstc10x5UnormBlock: return 50; case VULKAN_HPP_NAMESPACE::Format::eAstc10x5SrgbBlock: return 50; case VULKAN_HPP_NAMESPACE::Format::eAstc10x6UnormBlock: return 60; case VULKAN_HPP_NAMESPACE::Format::eAstc10x6SrgbBlock: return 60; case VULKAN_HPP_NAMESPACE::Format::eAstc10x8UnormBlock: return 80; case VULKAN_HPP_NAMESPACE::Format::eAstc10x8SrgbBlock: return 80; case VULKAN_HPP_NAMESPACE::Format::eAstc10x10UnormBlock: return 100; case VULKAN_HPP_NAMESPACE::Format::eAstc10x10SrgbBlock: return 100; case VULKAN_HPP_NAMESPACE::Format::eAstc12x10UnormBlock: return 120; case VULKAN_HPP_NAMESPACE::Format::eAstc12x10SrgbBlock: return 120; case VULKAN_HPP_NAMESPACE::Format::eAstc12x12UnormBlock: return 144; case VULKAN_HPP_NAMESPACE::Format::eAstc12x12SrgbBlock: return 144; case VULKAN_HPP_NAMESPACE::Format::eG8B8G8R8422Unorm: return 1; case VULKAN_HPP_NAMESPACE::Format::eB8G8R8G8422Unorm: return 1; case VULKAN_HPP_NAMESPACE::Format::eG8B8R83Plane420Unorm: return 1; case VULKAN_HPP_NAMESPACE::Format::eG8B8R82Plane420Unorm: return 1; case VULKAN_HPP_NAMESPACE::Format::eG8B8R83Plane422Unorm: return 1; case VULKAN_HPP_NAMESPACE::Format::eG8B8R82Plane422Unorm: return 1; case VULKAN_HPP_NAMESPACE::Format::eG8B8R83Plane444Unorm: return 1; case VULKAN_HPP_NAMESPACE::Format::eR10X6UnormPack16: return 1; case VULKAN_HPP_NAMESPACE::Format::eR10X6G10X6Unorm2Pack16: return 1; case VULKAN_HPP_NAMESPACE::Format::eR10X6G10X6B10X6A10X6Unorm4Pack16: return 1; case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6G10X6R10X6422Unorm4Pack16: return 1; case VULKAN_HPP_NAMESPACE::Format::eB10X6G10X6R10X6G10X6422Unorm4Pack16: return 1; case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X63Plane420Unorm3Pack16: return 1; case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X62Plane420Unorm3Pack16: return 1; case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X63Plane422Unorm3Pack16: return 1; case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X62Plane422Unorm3Pack16: return 1; case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X63Plane444Unorm3Pack16: return 1; case VULKAN_HPP_NAMESPACE::Format::eR12X4UnormPack16: return 1; case VULKAN_HPP_NAMESPACE::Format::eR12X4G12X4Unorm2Pack16: return 1; case VULKAN_HPP_NAMESPACE::Format::eR12X4G12X4B12X4A12X4Unorm4Pack16: return 1; case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4G12X4R12X4422Unorm4Pack16: return 1; case VULKAN_HPP_NAMESPACE::Format::eB12X4G12X4R12X4G12X4422Unorm4Pack16: return 1; case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X43Plane420Unorm3Pack16: return 1; case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X42Plane420Unorm3Pack16: return 1; case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X43Plane422Unorm3Pack16: return 1; case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X42Plane422Unorm3Pack16: return 1; case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X43Plane444Unorm3Pack16: return 1; case VULKAN_HPP_NAMESPACE::Format::eG16B16G16R16422Unorm: return 1; case VULKAN_HPP_NAMESPACE::Format::eB16G16R16G16422Unorm: return 1; case VULKAN_HPP_NAMESPACE::Format::eG16B16R163Plane420Unorm: return 1; case VULKAN_HPP_NAMESPACE::Format::eG16B16R162Plane420Unorm: return 1; case VULKAN_HPP_NAMESPACE::Format::eG16B16R163Plane422Unorm: return 1; case VULKAN_HPP_NAMESPACE::Format::eG16B16R162Plane422Unorm: return 1; case VULKAN_HPP_NAMESPACE::Format::eG16B16R163Plane444Unorm: return 1; case VULKAN_HPP_NAMESPACE::Format::eG8B8R82Plane444Unorm: return 1; case VULKAN_HPP_NAMESPACE::Format::eG10X6B10X6R10X62Plane444Unorm3Pack16: return 1; case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X42Plane444Unorm3Pack16: return 1; case VULKAN_HPP_NAMESPACE::Format::eG16B16R162Plane444Unorm: return 1; case VULKAN_HPP_NAMESPACE::Format::eA4R4G4B4UnormPack16: return 1; case VULKAN_HPP_NAMESPACE::Format::eA4B4G4R4UnormPack16: return 1; case VULKAN_HPP_NAMESPACE::Format::eAstc4x4SfloatBlock: return 16; case VULKAN_HPP_NAMESPACE::Format::eAstc5x4SfloatBlock: return 20; case VULKAN_HPP_NAMESPACE::Format::eAstc5x5SfloatBlock: return 25; case VULKAN_HPP_NAMESPACE::Format::eAstc6x5SfloatBlock: return 30; case VULKAN_HPP_NAMESPACE::Format::eAstc6x6SfloatBlock: return 36; case VULKAN_HPP_NAMESPACE::Format::eAstc8x5SfloatBlock: return 40; case VULKAN_HPP_NAMESPACE::Format::eAstc8x6SfloatBlock: return 48; case VULKAN_HPP_NAMESPACE::Format::eAstc8x8SfloatBlock: return 64; case VULKAN_HPP_NAMESPACE::Format::eAstc10x5SfloatBlock: return 50; case VULKAN_HPP_NAMESPACE::Format::eAstc10x6SfloatBlock: return 60; case VULKAN_HPP_NAMESPACE::Format::eAstc10x8SfloatBlock: return 80; case VULKAN_HPP_NAMESPACE::Format::eAstc10x10SfloatBlock: return 100; case VULKAN_HPP_NAMESPACE::Format::eAstc12x10SfloatBlock: return 120; case VULKAN_HPP_NAMESPACE::Format::eAstc12x12SfloatBlock: return 144; case VULKAN_HPP_NAMESPACE::Format::eA1B5G5R5UnormPack16: return 1; case VULKAN_HPP_NAMESPACE::Format::eA8Unorm: return 1; case VULKAN_HPP_NAMESPACE::Format::ePvrtc12BppUnormBlockIMG: return 1; case VULKAN_HPP_NAMESPACE::Format::ePvrtc14BppUnormBlockIMG: return 1; case VULKAN_HPP_NAMESPACE::Format::ePvrtc22BppUnormBlockIMG: return 1; case VULKAN_HPP_NAMESPACE::Format::ePvrtc24BppUnormBlockIMG: return 1; case VULKAN_HPP_NAMESPACE::Format::ePvrtc12BppSrgbBlockIMG: return 1; case VULKAN_HPP_NAMESPACE::Format::ePvrtc14BppSrgbBlockIMG: return 1; case VULKAN_HPP_NAMESPACE::Format::ePvrtc22BppSrgbBlockIMG: return 1; case VULKAN_HPP_NAMESPACE::Format::ePvrtc24BppSrgbBlockIMG: return 1; case VULKAN_HPP_NAMESPACE::Format::eR16G16Sfixed5NV: return 1; default: VULKAN_HPP_ASSERT( false ); return 0; } } } // namespace VULKAN_HPP_NAMESPACE #endif ================================================ FILE: src/libraries/vulkanheaders/vulkan_fuchsia.h ================================================ #ifndef VULKAN_FUCHSIA_H_ #define VULKAN_FUCHSIA_H_ 1 /* ** Copyright 2015-2025 The Khronos Group Inc. ** ** SPDX-License-Identifier: Apache-2.0 */ /* ** This header is generated from the Khronos Vulkan XML API Registry. ** */ #ifdef __cplusplus extern "C" { #endif // VK_FUCHSIA_imagepipe_surface is a preprocessor guard. Do not pass it to API calls. #define VK_FUCHSIA_imagepipe_surface 1 #define VK_FUCHSIA_IMAGEPIPE_SURFACE_SPEC_VERSION 1 #define VK_FUCHSIA_IMAGEPIPE_SURFACE_EXTENSION_NAME "VK_FUCHSIA_imagepipe_surface" typedef VkFlags VkImagePipeSurfaceCreateFlagsFUCHSIA; typedef struct VkImagePipeSurfaceCreateInfoFUCHSIA { VkStructureType sType; const void* pNext; VkImagePipeSurfaceCreateFlagsFUCHSIA flags; zx_handle_t imagePipeHandle; } VkImagePipeSurfaceCreateInfoFUCHSIA; typedef VkResult (VKAPI_PTR *PFN_vkCreateImagePipeSurfaceFUCHSIA)(VkInstance instance, const VkImagePipeSurfaceCreateInfoFUCHSIA* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkCreateImagePipeSurfaceFUCHSIA( VkInstance instance, const VkImagePipeSurfaceCreateInfoFUCHSIA* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); #endif // VK_FUCHSIA_external_memory is a preprocessor guard. Do not pass it to API calls. #define VK_FUCHSIA_external_memory 1 #define VK_FUCHSIA_EXTERNAL_MEMORY_SPEC_VERSION 1 #define VK_FUCHSIA_EXTERNAL_MEMORY_EXTENSION_NAME "VK_FUCHSIA_external_memory" typedef struct VkImportMemoryZirconHandleInfoFUCHSIA { VkStructureType sType; const void* pNext; VkExternalMemoryHandleTypeFlagBits handleType; zx_handle_t handle; } VkImportMemoryZirconHandleInfoFUCHSIA; typedef struct VkMemoryZirconHandlePropertiesFUCHSIA { VkStructureType sType; void* pNext; uint32_t memoryTypeBits; } VkMemoryZirconHandlePropertiesFUCHSIA; typedef struct VkMemoryGetZirconHandleInfoFUCHSIA { VkStructureType sType; const void* pNext; VkDeviceMemory memory; VkExternalMemoryHandleTypeFlagBits handleType; } VkMemoryGetZirconHandleInfoFUCHSIA; typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryZirconHandleFUCHSIA)(VkDevice device, const VkMemoryGetZirconHandleInfoFUCHSIA* pGetZirconHandleInfo, zx_handle_t* pZirconHandle); typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryZirconHandlePropertiesFUCHSIA)(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, zx_handle_t zirconHandle, VkMemoryZirconHandlePropertiesFUCHSIA* pMemoryZirconHandleProperties); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryZirconHandleFUCHSIA( VkDevice device, const VkMemoryGetZirconHandleInfoFUCHSIA* pGetZirconHandleInfo, zx_handle_t* pZirconHandle); VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryZirconHandlePropertiesFUCHSIA( VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, zx_handle_t zirconHandle, VkMemoryZirconHandlePropertiesFUCHSIA* pMemoryZirconHandleProperties); #endif // VK_FUCHSIA_external_semaphore is a preprocessor guard. Do not pass it to API calls. #define VK_FUCHSIA_external_semaphore 1 #define VK_FUCHSIA_EXTERNAL_SEMAPHORE_SPEC_VERSION 1 #define VK_FUCHSIA_EXTERNAL_SEMAPHORE_EXTENSION_NAME "VK_FUCHSIA_external_semaphore" typedef struct VkImportSemaphoreZirconHandleInfoFUCHSIA { VkStructureType sType; const void* pNext; VkSemaphore semaphore; VkSemaphoreImportFlags flags; VkExternalSemaphoreHandleTypeFlagBits handleType; zx_handle_t zirconHandle; } VkImportSemaphoreZirconHandleInfoFUCHSIA; typedef struct VkSemaphoreGetZirconHandleInfoFUCHSIA { VkStructureType sType; const void* pNext; VkSemaphore semaphore; VkExternalSemaphoreHandleTypeFlagBits handleType; } VkSemaphoreGetZirconHandleInfoFUCHSIA; typedef VkResult (VKAPI_PTR *PFN_vkImportSemaphoreZirconHandleFUCHSIA)(VkDevice device, const VkImportSemaphoreZirconHandleInfoFUCHSIA* pImportSemaphoreZirconHandleInfo); typedef VkResult (VKAPI_PTR *PFN_vkGetSemaphoreZirconHandleFUCHSIA)(VkDevice device, const VkSemaphoreGetZirconHandleInfoFUCHSIA* pGetZirconHandleInfo, zx_handle_t* pZirconHandle); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkImportSemaphoreZirconHandleFUCHSIA( VkDevice device, const VkImportSemaphoreZirconHandleInfoFUCHSIA* pImportSemaphoreZirconHandleInfo); VKAPI_ATTR VkResult VKAPI_CALL vkGetSemaphoreZirconHandleFUCHSIA( VkDevice device, const VkSemaphoreGetZirconHandleInfoFUCHSIA* pGetZirconHandleInfo, zx_handle_t* pZirconHandle); #endif // VK_FUCHSIA_buffer_collection is a preprocessor guard. Do not pass it to API calls. #define VK_FUCHSIA_buffer_collection 1 VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkBufferCollectionFUCHSIA) #define VK_FUCHSIA_BUFFER_COLLECTION_SPEC_VERSION 2 #define VK_FUCHSIA_BUFFER_COLLECTION_EXTENSION_NAME "VK_FUCHSIA_buffer_collection" typedef VkFlags VkImageFormatConstraintsFlagsFUCHSIA; typedef enum VkImageConstraintsInfoFlagBitsFUCHSIA { VK_IMAGE_CONSTRAINTS_INFO_CPU_READ_RARELY_FUCHSIA = 0x00000001, VK_IMAGE_CONSTRAINTS_INFO_CPU_READ_OFTEN_FUCHSIA = 0x00000002, VK_IMAGE_CONSTRAINTS_INFO_CPU_WRITE_RARELY_FUCHSIA = 0x00000004, VK_IMAGE_CONSTRAINTS_INFO_CPU_WRITE_OFTEN_FUCHSIA = 0x00000008, VK_IMAGE_CONSTRAINTS_INFO_PROTECTED_OPTIONAL_FUCHSIA = 0x00000010, VK_IMAGE_CONSTRAINTS_INFO_FLAG_BITS_MAX_ENUM_FUCHSIA = 0x7FFFFFFF } VkImageConstraintsInfoFlagBitsFUCHSIA; typedef VkFlags VkImageConstraintsInfoFlagsFUCHSIA; typedef struct VkBufferCollectionCreateInfoFUCHSIA { VkStructureType sType; const void* pNext; zx_handle_t collectionToken; } VkBufferCollectionCreateInfoFUCHSIA; typedef struct VkImportMemoryBufferCollectionFUCHSIA { VkStructureType sType; const void* pNext; VkBufferCollectionFUCHSIA collection; uint32_t index; } VkImportMemoryBufferCollectionFUCHSIA; typedef struct VkBufferCollectionImageCreateInfoFUCHSIA { VkStructureType sType; const void* pNext; VkBufferCollectionFUCHSIA collection; uint32_t index; } VkBufferCollectionImageCreateInfoFUCHSIA; typedef struct VkBufferCollectionConstraintsInfoFUCHSIA { VkStructureType sType; const void* pNext; uint32_t minBufferCount; uint32_t maxBufferCount; uint32_t minBufferCountForCamping; uint32_t minBufferCountForDedicatedSlack; uint32_t minBufferCountForSharedSlack; } VkBufferCollectionConstraintsInfoFUCHSIA; typedef struct VkBufferConstraintsInfoFUCHSIA { VkStructureType sType; const void* pNext; VkBufferCreateInfo createInfo; VkFormatFeatureFlags requiredFormatFeatures; VkBufferCollectionConstraintsInfoFUCHSIA bufferCollectionConstraints; } VkBufferConstraintsInfoFUCHSIA; typedef struct VkBufferCollectionBufferCreateInfoFUCHSIA { VkStructureType sType; const void* pNext; VkBufferCollectionFUCHSIA collection; uint32_t index; } VkBufferCollectionBufferCreateInfoFUCHSIA; typedef struct VkSysmemColorSpaceFUCHSIA { VkStructureType sType; const void* pNext; uint32_t colorSpace; } VkSysmemColorSpaceFUCHSIA; typedef struct VkBufferCollectionPropertiesFUCHSIA { VkStructureType sType; void* pNext; uint32_t memoryTypeBits; uint32_t bufferCount; uint32_t createInfoIndex; uint64_t sysmemPixelFormat; VkFormatFeatureFlags formatFeatures; VkSysmemColorSpaceFUCHSIA sysmemColorSpaceIndex; VkComponentMapping samplerYcbcrConversionComponents; VkSamplerYcbcrModelConversion suggestedYcbcrModel; VkSamplerYcbcrRange suggestedYcbcrRange; VkChromaLocation suggestedXChromaOffset; VkChromaLocation suggestedYChromaOffset; } VkBufferCollectionPropertiesFUCHSIA; typedef struct VkImageFormatConstraintsInfoFUCHSIA { VkStructureType sType; const void* pNext; VkImageCreateInfo imageCreateInfo; VkFormatFeatureFlags requiredFormatFeatures; VkImageFormatConstraintsFlagsFUCHSIA flags; uint64_t sysmemPixelFormat; uint32_t colorSpaceCount; const VkSysmemColorSpaceFUCHSIA* pColorSpaces; } VkImageFormatConstraintsInfoFUCHSIA; typedef struct VkImageConstraintsInfoFUCHSIA { VkStructureType sType; const void* pNext; uint32_t formatConstraintsCount; const VkImageFormatConstraintsInfoFUCHSIA* pFormatConstraints; VkBufferCollectionConstraintsInfoFUCHSIA bufferCollectionConstraints; VkImageConstraintsInfoFlagsFUCHSIA flags; } VkImageConstraintsInfoFUCHSIA; typedef VkResult (VKAPI_PTR *PFN_vkCreateBufferCollectionFUCHSIA)(VkDevice device, const VkBufferCollectionCreateInfoFUCHSIA* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkBufferCollectionFUCHSIA* pCollection); typedef VkResult (VKAPI_PTR *PFN_vkSetBufferCollectionImageConstraintsFUCHSIA)(VkDevice device, VkBufferCollectionFUCHSIA collection, const VkImageConstraintsInfoFUCHSIA* pImageConstraintsInfo); typedef VkResult (VKAPI_PTR *PFN_vkSetBufferCollectionBufferConstraintsFUCHSIA)(VkDevice device, VkBufferCollectionFUCHSIA collection, const VkBufferConstraintsInfoFUCHSIA* pBufferConstraintsInfo); typedef void (VKAPI_PTR *PFN_vkDestroyBufferCollectionFUCHSIA)(VkDevice device, VkBufferCollectionFUCHSIA collection, const VkAllocationCallbacks* pAllocator); typedef VkResult (VKAPI_PTR *PFN_vkGetBufferCollectionPropertiesFUCHSIA)(VkDevice device, VkBufferCollectionFUCHSIA collection, VkBufferCollectionPropertiesFUCHSIA* pProperties); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkCreateBufferCollectionFUCHSIA( VkDevice device, const VkBufferCollectionCreateInfoFUCHSIA* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkBufferCollectionFUCHSIA* pCollection); VKAPI_ATTR VkResult VKAPI_CALL vkSetBufferCollectionImageConstraintsFUCHSIA( VkDevice device, VkBufferCollectionFUCHSIA collection, const VkImageConstraintsInfoFUCHSIA* pImageConstraintsInfo); VKAPI_ATTR VkResult VKAPI_CALL vkSetBufferCollectionBufferConstraintsFUCHSIA( VkDevice device, VkBufferCollectionFUCHSIA collection, const VkBufferConstraintsInfoFUCHSIA* pBufferConstraintsInfo); VKAPI_ATTR void VKAPI_CALL vkDestroyBufferCollectionFUCHSIA( VkDevice device, VkBufferCollectionFUCHSIA collection, const VkAllocationCallbacks* pAllocator); VKAPI_ATTR VkResult VKAPI_CALL vkGetBufferCollectionPropertiesFUCHSIA( VkDevice device, VkBufferCollectionFUCHSIA collection, VkBufferCollectionPropertiesFUCHSIA* pProperties); #endif #ifdef __cplusplus } #endif #endif ================================================ FILE: src/libraries/vulkanheaders/vulkan_funcs.hpp ================================================ // Copyright 2015-2025 The Khronos Group Inc. // // SPDX-License-Identifier: Apache-2.0 OR MIT // // This header is generated from the Khronos Vulkan XML API Registry. #ifndef VULKAN_FUNCS_HPP #define VULKAN_FUNCS_HPP // include-what-you-use: make sure, vulkan.hpp is used by code-completers // IWYU pragma: private; include "vulkan.hpp" namespace VULKAN_HPP_NAMESPACE { //=========================== //=== COMMAND Definitions === //=========================== //=== VK_VERSION_1_0 === template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result createInstance( const VULKAN_HPP_NAMESPACE::InstanceCreateInfo * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::Instance * pInstance, Dispatch const & d ) VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkCreateInstance( reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pInstance ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type createInstance( const VULKAN_HPP_NAMESPACE::InstanceCreateInfo & createInfo, Optional allocator, Dispatch const & d ) { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateInstance && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Instance instance; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateInstance( reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &instance ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::createInstance" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( instance ) ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type createInstanceUnique( const VULKAN_HPP_NAMESPACE::InstanceCreateInfo & createInfo, Optional allocator, Dispatch const & d ) { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateInstance && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Instance instance; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateInstance( reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &instance ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::createInstanceUnique" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, UniqueHandle( instance, detail::ObjectDestroy( allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Instance::destroy( const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDestroyInstance( static_cast( m_instance ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Instance::destroy( Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDestroyInstance && "Function requires " ); # endif d.vkDestroyInstance( m_instance, reinterpret_cast( static_cast( allocator ) ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Instance::enumeratePhysicalDevices( uint32_t * pPhysicalDeviceCount, VULKAN_HPP_NAMESPACE::PhysicalDevice * pPhysicalDevices, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkEnumeratePhysicalDevices( static_cast( m_instance ), pPhysicalDeviceCount, reinterpret_cast( pPhysicalDevices ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Instance::enumeratePhysicalDevices( Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkEnumeratePhysicalDevices && "Function requires " ); # endif std::vector physicalDevices; uint32_t physicalDeviceCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkEnumeratePhysicalDevices( m_instance, &physicalDeviceCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && physicalDeviceCount ) { physicalDevices.resize( physicalDeviceCount ); result = static_cast( d.vkEnumeratePhysicalDevices( m_instance, &physicalDeviceCount, reinterpret_cast( physicalDevices.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::enumeratePhysicalDevices" ); VULKAN_HPP_ASSERT( physicalDeviceCount <= physicalDevices.size() ); if ( physicalDeviceCount < physicalDevices.size() ) { physicalDevices.resize( physicalDeviceCount ); } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( physicalDevices ) ); } template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Instance::enumeratePhysicalDevices( PhysicalDeviceAllocator & physicalDeviceAllocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkEnumeratePhysicalDevices && "Function requires " ); # endif std::vector physicalDevices( physicalDeviceAllocator ); uint32_t physicalDeviceCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkEnumeratePhysicalDevices( m_instance, &physicalDeviceCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && physicalDeviceCount ) { physicalDevices.resize( physicalDeviceCount ); result = static_cast( d.vkEnumeratePhysicalDevices( m_instance, &physicalDeviceCount, reinterpret_cast( physicalDevices.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::enumeratePhysicalDevices" ); VULKAN_HPP_ASSERT( physicalDeviceCount <= physicalDevices.size() ); if ( physicalDeviceCount < physicalDevices.size() ) { physicalDevices.resize( physicalDeviceCount ); } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( physicalDevices ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void PhysicalDevice::getFeatures( VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures * pFeatures, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkGetPhysicalDeviceFeatures( static_cast( m_physicalDevice ), reinterpret_cast( pFeatures ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures PhysicalDevice::getFeatures( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceFeatures && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures features; d.vkGetPhysicalDeviceFeatures( m_physicalDevice, reinterpret_cast( &features ) ); return features; } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void PhysicalDevice::getFormatProperties( VULKAN_HPP_NAMESPACE::Format format, VULKAN_HPP_NAMESPACE::FormatProperties * pFormatProperties, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkGetPhysicalDeviceFormatProperties( static_cast( m_physicalDevice ), static_cast( format ), reinterpret_cast( pFormatProperties ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::FormatProperties PhysicalDevice::getFormatProperties( VULKAN_HPP_NAMESPACE::Format format, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceFormatProperties && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::FormatProperties formatProperties; d.vkGetPhysicalDeviceFormatProperties( m_physicalDevice, static_cast( format ), reinterpret_cast( &formatProperties ) ); return formatProperties; } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result PhysicalDevice::getImageFormatProperties( VULKAN_HPP_NAMESPACE::Format format, VULKAN_HPP_NAMESPACE::ImageType type, VULKAN_HPP_NAMESPACE::ImageTiling tiling, VULKAN_HPP_NAMESPACE::ImageUsageFlags usage, VULKAN_HPP_NAMESPACE::ImageCreateFlags flags, VULKAN_HPP_NAMESPACE::ImageFormatProperties * pImageFormatProperties, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetPhysicalDeviceImageFormatProperties( static_cast( m_physicalDevice ), static_cast( format ), static_cast( type ), static_cast( tiling ), static_cast( usage ), static_cast( flags ), reinterpret_cast( pImageFormatProperties ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type PhysicalDevice::getImageFormatProperties( VULKAN_HPP_NAMESPACE::Format format, VULKAN_HPP_NAMESPACE::ImageType type, VULKAN_HPP_NAMESPACE::ImageTiling tiling, VULKAN_HPP_NAMESPACE::ImageUsageFlags usage, VULKAN_HPP_NAMESPACE::ImageCreateFlags flags, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceImageFormatProperties && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::ImageFormatProperties imageFormatProperties; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetPhysicalDeviceImageFormatProperties( m_physicalDevice, static_cast( format ), static_cast( type ), static_cast( tiling ), static_cast( usage ), static_cast( flags ), reinterpret_cast( &imageFormatProperties ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getImageFormatProperties" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( imageFormatProperties ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void PhysicalDevice::getProperties( VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties * pProperties, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkGetPhysicalDeviceProperties( static_cast( m_physicalDevice ), reinterpret_cast( pProperties ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties PhysicalDevice::getProperties( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceProperties && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties properties; d.vkGetPhysicalDeviceProperties( m_physicalDevice, reinterpret_cast( &properties ) ); return properties; } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void PhysicalDevice::getQueueFamilyProperties( uint32_t * pQueueFamilyPropertyCount, VULKAN_HPP_NAMESPACE::QueueFamilyProperties * pQueueFamilyProperties, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkGetPhysicalDeviceQueueFamilyProperties( static_cast( m_physicalDevice ), pQueueFamilyPropertyCount, reinterpret_cast( pQueueFamilyProperties ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template < typename QueueFamilyPropertiesAllocator, typename Dispatch, typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector PhysicalDevice::getQueueFamilyProperties( Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceQueueFamilyProperties && "Function requires " ); # endif std::vector queueFamilyProperties; uint32_t queueFamilyPropertyCount; d.vkGetPhysicalDeviceQueueFamilyProperties( m_physicalDevice, &queueFamilyPropertyCount, nullptr ); queueFamilyProperties.resize( queueFamilyPropertyCount ); d.vkGetPhysicalDeviceQueueFamilyProperties( m_physicalDevice, &queueFamilyPropertyCount, reinterpret_cast( queueFamilyProperties.data() ) ); VULKAN_HPP_ASSERT( queueFamilyPropertyCount <= queueFamilyProperties.size() ); if ( queueFamilyPropertyCount < queueFamilyProperties.size() ) { queueFamilyProperties.resize( queueFamilyPropertyCount ); } return queueFamilyProperties; } template < typename QueueFamilyPropertiesAllocator, typename Dispatch, typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector PhysicalDevice::getQueueFamilyProperties( QueueFamilyPropertiesAllocator & queueFamilyPropertiesAllocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceQueueFamilyProperties && "Function requires " ); # endif std::vector queueFamilyProperties( queueFamilyPropertiesAllocator ); uint32_t queueFamilyPropertyCount; d.vkGetPhysicalDeviceQueueFamilyProperties( m_physicalDevice, &queueFamilyPropertyCount, nullptr ); queueFamilyProperties.resize( queueFamilyPropertyCount ); d.vkGetPhysicalDeviceQueueFamilyProperties( m_physicalDevice, &queueFamilyPropertyCount, reinterpret_cast( queueFamilyProperties.data() ) ); VULKAN_HPP_ASSERT( queueFamilyPropertyCount <= queueFamilyProperties.size() ); if ( queueFamilyPropertyCount < queueFamilyProperties.size() ) { queueFamilyProperties.resize( queueFamilyPropertyCount ); } return queueFamilyProperties; } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void PhysicalDevice::getMemoryProperties( VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties * pMemoryProperties, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkGetPhysicalDeviceMemoryProperties( static_cast( m_physicalDevice ), reinterpret_cast( pMemoryProperties ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties PhysicalDevice::getMemoryProperties( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceMemoryProperties && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties memoryProperties; d.vkGetPhysicalDeviceMemoryProperties( m_physicalDevice, reinterpret_cast( &memoryProperties ) ); return memoryProperties; } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE PFN_vkVoidFunction Instance::getProcAddr( const char * pName, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return d.vkGetInstanceProcAddr( static_cast( m_instance ), pName ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::PFN_VoidFunction Instance::getProcAddr( const std::string & name, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetInstanceProcAddr && "Function requires " ); # endif PFN_vkVoidFunction result = d.vkGetInstanceProcAddr( m_instance, name.c_str() ); return result; } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE PFN_vkVoidFunction Device::getProcAddr( const char * pName, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return d.vkGetDeviceProcAddr( static_cast( m_device ), pName ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::PFN_VoidFunction Device::getProcAddr( const std::string & name, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetDeviceProcAddr && "Function requires " ); # endif PFN_vkVoidFunction result = d.vkGetDeviceProcAddr( m_device, name.c_str() ); return result; } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result PhysicalDevice::createDevice( const VULKAN_HPP_NAMESPACE::DeviceCreateInfo * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::Device * pDevice, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkCreateDevice( static_cast( m_physicalDevice ), reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pDevice ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type PhysicalDevice::createDevice( const VULKAN_HPP_NAMESPACE::DeviceCreateInfo & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateDevice && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Device device; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateDevice( m_physicalDevice, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &device ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::createDevice" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( device ) ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::createDeviceUnique( const VULKAN_HPP_NAMESPACE::DeviceCreateInfo & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateDevice && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Device device; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateDevice( m_physicalDevice, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &device ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::createDeviceUnique" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, UniqueHandle( device, detail::ObjectDestroy( allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::destroy( const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDestroyDevice( static_cast( m_device ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::destroy( Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDestroyDevice && "Function requires " ); # endif d.vkDestroyDevice( m_device, reinterpret_cast( static_cast( allocator ) ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result enumerateInstanceExtensionProperties( const char * pLayerName, uint32_t * pPropertyCount, VULKAN_HPP_NAMESPACE::ExtensionProperties * pProperties, Dispatch const & d ) VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkEnumerateInstanceExtensionProperties( pLayerName, pPropertyCount, reinterpret_cast( pProperties ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template < typename ExtensionPropertiesAllocator, typename Dispatch, typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type enumerateInstanceExtensionProperties( Optional layerName, Dispatch const & d ) { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkEnumerateInstanceExtensionProperties && "Function requires " ); # endif std::vector properties; uint32_t propertyCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkEnumerateInstanceExtensionProperties( layerName ? layerName->c_str() : nullptr, &propertyCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); result = static_cast( d.vkEnumerateInstanceExtensionProperties( layerName ? layerName->c_str() : nullptr, &propertyCount, reinterpret_cast( properties.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::enumerateInstanceExtensionProperties" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( properties ) ); } template < typename ExtensionPropertiesAllocator, typename Dispatch, typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type enumerateInstanceExtensionProperties( Optional layerName, ExtensionPropertiesAllocator & extensionPropertiesAllocator, Dispatch const & d ) { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkEnumerateInstanceExtensionProperties && "Function requires " ); # endif std::vector properties( extensionPropertiesAllocator ); uint32_t propertyCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkEnumerateInstanceExtensionProperties( layerName ? layerName->c_str() : nullptr, &propertyCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); result = static_cast( d.vkEnumerateInstanceExtensionProperties( layerName ? layerName->c_str() : nullptr, &propertyCount, reinterpret_cast( properties.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::enumerateInstanceExtensionProperties" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( properties ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result PhysicalDevice::enumerateDeviceExtensionProperties( const char * pLayerName, uint32_t * pPropertyCount, VULKAN_HPP_NAMESPACE::ExtensionProperties * pProperties, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkEnumerateDeviceExtensionProperties( static_cast( m_physicalDevice ), pLayerName, pPropertyCount, reinterpret_cast( pProperties ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template < typename ExtensionPropertiesAllocator, typename Dispatch, typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::enumerateDeviceExtensionProperties( Optional layerName, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkEnumerateDeviceExtensionProperties && "Function requires " ); # endif std::vector properties; uint32_t propertyCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkEnumerateDeviceExtensionProperties( m_physicalDevice, layerName ? layerName->c_str() : nullptr, &propertyCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); result = static_cast( d.vkEnumerateDeviceExtensionProperties( m_physicalDevice, layerName ? layerName->c_str() : nullptr, &propertyCount, reinterpret_cast( properties.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::enumerateDeviceExtensionProperties" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( properties ) ); } template < typename ExtensionPropertiesAllocator, typename Dispatch, typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::enumerateDeviceExtensionProperties( Optional layerName, ExtensionPropertiesAllocator & extensionPropertiesAllocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkEnumerateDeviceExtensionProperties && "Function requires " ); # endif std::vector properties( extensionPropertiesAllocator ); uint32_t propertyCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkEnumerateDeviceExtensionProperties( m_physicalDevice, layerName ? layerName->c_str() : nullptr, &propertyCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); result = static_cast( d.vkEnumerateDeviceExtensionProperties( m_physicalDevice, layerName ? layerName->c_str() : nullptr, &propertyCount, reinterpret_cast( properties.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::enumerateDeviceExtensionProperties" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( properties ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result enumerateInstanceLayerProperties( uint32_t * pPropertyCount, VULKAN_HPP_NAMESPACE::LayerProperties * pProperties, Dispatch const & d ) VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkEnumerateInstanceLayerProperties( pPropertyCount, reinterpret_cast( pProperties ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type enumerateInstanceLayerProperties( Dispatch const & d ) { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkEnumerateInstanceLayerProperties && "Function requires " ); # endif std::vector properties; uint32_t propertyCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkEnumerateInstanceLayerProperties( &propertyCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); result = static_cast( d.vkEnumerateInstanceLayerProperties( &propertyCount, reinterpret_cast( properties.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::enumerateInstanceLayerProperties" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( properties ) ); } template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type enumerateInstanceLayerProperties( LayerPropertiesAllocator & layerPropertiesAllocator, Dispatch const & d ) { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkEnumerateInstanceLayerProperties && "Function requires " ); # endif std::vector properties( layerPropertiesAllocator ); uint32_t propertyCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkEnumerateInstanceLayerProperties( &propertyCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); result = static_cast( d.vkEnumerateInstanceLayerProperties( &propertyCount, reinterpret_cast( properties.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::enumerateInstanceLayerProperties" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( properties ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result PhysicalDevice::enumerateDeviceLayerProperties( uint32_t * pPropertyCount, VULKAN_HPP_NAMESPACE::LayerProperties * pProperties, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkEnumerateDeviceLayerProperties( static_cast( m_physicalDevice ), pPropertyCount, reinterpret_cast( pProperties ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::enumerateDeviceLayerProperties( Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkEnumerateDeviceLayerProperties && "Function requires " ); # endif std::vector properties; uint32_t propertyCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkEnumerateDeviceLayerProperties( m_physicalDevice, &propertyCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); result = static_cast( d.vkEnumerateDeviceLayerProperties( m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::enumerateDeviceLayerProperties" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( properties ) ); } template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::enumerateDeviceLayerProperties( LayerPropertiesAllocator & layerPropertiesAllocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkEnumerateDeviceLayerProperties && "Function requires " ); # endif std::vector properties( layerPropertiesAllocator ); uint32_t propertyCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkEnumerateDeviceLayerProperties( m_physicalDevice, &propertyCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); result = static_cast( d.vkEnumerateDeviceLayerProperties( m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::enumerateDeviceLayerProperties" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( properties ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::getQueue( uint32_t queueFamilyIndex, uint32_t queueIndex, VULKAN_HPP_NAMESPACE::Queue * pQueue, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkGetDeviceQueue( static_cast( m_device ), queueFamilyIndex, queueIndex, reinterpret_cast( pQueue ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Queue Device::getQueue( uint32_t queueFamilyIndex, uint32_t queueIndex, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetDeviceQueue && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Queue queue; d.vkGetDeviceQueue( m_device, queueFamilyIndex, queueIndex, reinterpret_cast( &queue ) ); return queue; } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Queue::submit( uint32_t submitCount, const VULKAN_HPP_NAMESPACE::SubmitInfo * pSubmits, VULKAN_HPP_NAMESPACE::Fence fence, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkQueueSubmit( static_cast( m_queue ), submitCount, reinterpret_cast( pSubmits ), static_cast( fence ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type Queue::submit( VULKAN_HPP_NAMESPACE::ArrayProxy const & submits, VULKAN_HPP_NAMESPACE::Fence fence, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkQueueSubmit && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkQueueSubmit( m_queue, submits.size(), reinterpret_cast( submits.data() ), static_cast( fence ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Queue::submit" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Queue::waitIdle( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkQueueWaitIdle( static_cast( m_queue ) ) ); } #else template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type Queue::waitIdle( Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkQueueWaitIdle && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkQueueWaitIdle( m_queue ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Queue::waitIdle" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::waitIdle( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkDeviceWaitIdle( static_cast( m_device ) ) ); } #else template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type Device::waitIdle( Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDeviceWaitIdle && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkDeviceWaitIdle( m_device ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::waitIdle" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::allocateMemory( const VULKAN_HPP_NAMESPACE::MemoryAllocateInfo * pAllocateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::DeviceMemory * pMemory, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkAllocateMemory( static_cast( m_device ), reinterpret_cast( pAllocateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pMemory ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::allocateMemory( const VULKAN_HPP_NAMESPACE::MemoryAllocateInfo & allocateInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkAllocateMemory && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::DeviceMemory memory; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkAllocateMemory( m_device, reinterpret_cast( &allocateInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &memory ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::allocateMemory" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( memory ) ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::allocateMemoryUnique( const VULKAN_HPP_NAMESPACE::MemoryAllocateInfo & allocateInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkAllocateMemory && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::DeviceMemory memory; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkAllocateMemory( m_device, reinterpret_cast( &allocateInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &memory ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::allocateMemoryUnique" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, UniqueHandle( memory, detail::ObjectFree( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::freeMemory( VULKAN_HPP_NAMESPACE::DeviceMemory memory, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkFreeMemory( static_cast( m_device ), static_cast( memory ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::freeMemory( VULKAN_HPP_NAMESPACE::DeviceMemory memory, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkFreeMemory && "Function requires " ); # endif d.vkFreeMemory( m_device, static_cast( memory ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void( Device::free )( VULKAN_HPP_NAMESPACE::DeviceMemory memory, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkFreeMemory( static_cast( m_device ), static_cast( memory ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void( Device::free )( VULKAN_HPP_NAMESPACE::DeviceMemory memory, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkFreeMemory && "Function requires " ); # endif d.vkFreeMemory( m_device, static_cast( memory ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::mapMemory( VULKAN_HPP_NAMESPACE::DeviceMemory memory, VULKAN_HPP_NAMESPACE::DeviceSize offset, VULKAN_HPP_NAMESPACE::DeviceSize size, VULKAN_HPP_NAMESPACE::MemoryMapFlags flags, void ** ppData, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkMapMemory( static_cast( m_device ), static_cast( memory ), static_cast( offset ), static_cast( size ), static_cast( flags ), ppData ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::mapMemory( VULKAN_HPP_NAMESPACE::DeviceMemory memory, VULKAN_HPP_NAMESPACE::DeviceSize offset, VULKAN_HPP_NAMESPACE::DeviceSize size, VULKAN_HPP_NAMESPACE::MemoryMapFlags flags, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkMapMemory && "Function requires " ); # endif void * pData; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkMapMemory( m_device, static_cast( memory ), static_cast( offset ), static_cast( size ), static_cast( flags ), &pData ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::mapMemory" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( pData ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::unmapMemory( VULKAN_HPP_NAMESPACE::DeviceMemory memory, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkUnmapMemory( static_cast( m_device ), static_cast( memory ) ); } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::flushMappedMemoryRanges( uint32_t memoryRangeCount, const VULKAN_HPP_NAMESPACE::MappedMemoryRange * pMemoryRanges, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkFlushMappedMemoryRanges( static_cast( m_device ), memoryRangeCount, reinterpret_cast( pMemoryRanges ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type Device::flushMappedMemoryRanges( VULKAN_HPP_NAMESPACE::ArrayProxy const & memoryRanges, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkFlushMappedMemoryRanges && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkFlushMappedMemoryRanges( m_device, memoryRanges.size(), reinterpret_cast( memoryRanges.data() ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::flushMappedMemoryRanges" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::invalidateMappedMemoryRanges( uint32_t memoryRangeCount, const VULKAN_HPP_NAMESPACE::MappedMemoryRange * pMemoryRanges, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkInvalidateMappedMemoryRanges( static_cast( m_device ), memoryRangeCount, reinterpret_cast( pMemoryRanges ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type Device::invalidateMappedMemoryRanges( VULKAN_HPP_NAMESPACE::ArrayProxy const & memoryRanges, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkInvalidateMappedMemoryRanges && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkInvalidateMappedMemoryRanges( m_device, memoryRanges.size(), reinterpret_cast( memoryRanges.data() ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::invalidateMappedMemoryRanges" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::getMemoryCommitment( VULKAN_HPP_NAMESPACE::DeviceMemory memory, VULKAN_HPP_NAMESPACE::DeviceSize * pCommittedMemoryInBytes, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkGetDeviceMemoryCommitment( static_cast( m_device ), static_cast( memory ), reinterpret_cast( pCommittedMemoryInBytes ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::DeviceSize Device::getMemoryCommitment( VULKAN_HPP_NAMESPACE::DeviceMemory memory, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetDeviceMemoryCommitment && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::DeviceSize committedMemoryInBytes; d.vkGetDeviceMemoryCommitment( m_device, static_cast( memory ), reinterpret_cast( &committedMemoryInBytes ) ); return committedMemoryInBytes; } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::bindBufferMemory( VULKAN_HPP_NAMESPACE::Buffer buffer, VULKAN_HPP_NAMESPACE::DeviceMemory memory, VULKAN_HPP_NAMESPACE::DeviceSize memoryOffset, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkBindBufferMemory( static_cast( m_device ), static_cast( buffer ), static_cast( memory ), static_cast( memoryOffset ) ) ); } #else template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type Device::bindBufferMemory( VULKAN_HPP_NAMESPACE::Buffer buffer, VULKAN_HPP_NAMESPACE::DeviceMemory memory, VULKAN_HPP_NAMESPACE::DeviceSize memoryOffset, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkBindBufferMemory && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkBindBufferMemory( m_device, static_cast( buffer ), static_cast( memory ), static_cast( memoryOffset ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::bindBufferMemory" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::bindImageMemory( VULKAN_HPP_NAMESPACE::Image image, VULKAN_HPP_NAMESPACE::DeviceMemory memory, VULKAN_HPP_NAMESPACE::DeviceSize memoryOffset, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkBindImageMemory( static_cast( m_device ), static_cast( image ), static_cast( memory ), static_cast( memoryOffset ) ) ); } #else template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type Device::bindImageMemory( VULKAN_HPP_NAMESPACE::Image image, VULKAN_HPP_NAMESPACE::DeviceMemory memory, VULKAN_HPP_NAMESPACE::DeviceSize memoryOffset, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkBindImageMemory && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkBindImageMemory( m_device, static_cast( image ), static_cast( memory ), static_cast( memoryOffset ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::bindImageMemory" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ template VULKAN_HPP_INLINE void Device::getBufferMemoryRequirements( VULKAN_HPP_NAMESPACE::Buffer buffer, VULKAN_HPP_NAMESPACE::MemoryRequirements * pMemoryRequirements, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkGetBufferMemoryRequirements( static_cast( m_device ), static_cast( buffer ), reinterpret_cast( pMemoryRequirements ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MemoryRequirements Device::getBufferMemoryRequirements( VULKAN_HPP_NAMESPACE::Buffer buffer, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetBufferMemoryRequirements && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::MemoryRequirements memoryRequirements; d.vkGetBufferMemoryRequirements( m_device, static_cast( buffer ), reinterpret_cast( &memoryRequirements ) ); return memoryRequirements; } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::getImageMemoryRequirements( VULKAN_HPP_NAMESPACE::Image image, VULKAN_HPP_NAMESPACE::MemoryRequirements * pMemoryRequirements, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkGetImageMemoryRequirements( static_cast( m_device ), static_cast( image ), reinterpret_cast( pMemoryRequirements ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MemoryRequirements Device::getImageMemoryRequirements( VULKAN_HPP_NAMESPACE::Image image, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetImageMemoryRequirements && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::MemoryRequirements memoryRequirements; d.vkGetImageMemoryRequirements( m_device, static_cast( image ), reinterpret_cast( &memoryRequirements ) ); return memoryRequirements; } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::getImageSparseMemoryRequirements( VULKAN_HPP_NAMESPACE::Image image, uint32_t * pSparseMemoryRequirementCount, VULKAN_HPP_NAMESPACE::SparseImageMemoryRequirements * pSparseMemoryRequirements, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkGetImageSparseMemoryRequirements( static_cast( m_device ), static_cast( image ), pSparseMemoryRequirementCount, reinterpret_cast( pSparseMemoryRequirements ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector Device::getImageSparseMemoryRequirements( VULKAN_HPP_NAMESPACE::Image image, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetImageSparseMemoryRequirements && "Function requires " ); # endif std::vector sparseMemoryRequirements; uint32_t sparseMemoryRequirementCount; d.vkGetImageSparseMemoryRequirements( m_device, static_cast( image ), &sparseMemoryRequirementCount, nullptr ); sparseMemoryRequirements.resize( sparseMemoryRequirementCount ); d.vkGetImageSparseMemoryRequirements( m_device, static_cast( image ), &sparseMemoryRequirementCount, reinterpret_cast( sparseMemoryRequirements.data() ) ); VULKAN_HPP_ASSERT( sparseMemoryRequirementCount <= sparseMemoryRequirements.size() ); if ( sparseMemoryRequirementCount < sparseMemoryRequirements.size() ) { sparseMemoryRequirements.resize( sparseMemoryRequirementCount ); } return sparseMemoryRequirements; } template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector Device::getImageSparseMemoryRequirements( VULKAN_HPP_NAMESPACE::Image image, SparseImageMemoryRequirementsAllocator & sparseImageMemoryRequirementsAllocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetImageSparseMemoryRequirements && "Function requires " ); # endif std::vector sparseMemoryRequirements( sparseImageMemoryRequirementsAllocator ); uint32_t sparseMemoryRequirementCount; d.vkGetImageSparseMemoryRequirements( m_device, static_cast( image ), &sparseMemoryRequirementCount, nullptr ); sparseMemoryRequirements.resize( sparseMemoryRequirementCount ); d.vkGetImageSparseMemoryRequirements( m_device, static_cast( image ), &sparseMemoryRequirementCount, reinterpret_cast( sparseMemoryRequirements.data() ) ); VULKAN_HPP_ASSERT( sparseMemoryRequirementCount <= sparseMemoryRequirements.size() ); if ( sparseMemoryRequirementCount < sparseMemoryRequirements.size() ) { sparseMemoryRequirements.resize( sparseMemoryRequirementCount ); } return sparseMemoryRequirements; } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void PhysicalDevice::getSparseImageFormatProperties( VULKAN_HPP_NAMESPACE::Format format, VULKAN_HPP_NAMESPACE::ImageType type, VULKAN_HPP_NAMESPACE::SampleCountFlagBits samples, VULKAN_HPP_NAMESPACE::ImageUsageFlags usage, VULKAN_HPP_NAMESPACE::ImageTiling tiling, uint32_t * pPropertyCount, VULKAN_HPP_NAMESPACE::SparseImageFormatProperties * pProperties, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkGetPhysicalDeviceSparseImageFormatProperties( static_cast( m_physicalDevice ), static_cast( format ), static_cast( type ), static_cast( samples ), static_cast( usage ), static_cast( tiling ), pPropertyCount, reinterpret_cast( pProperties ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template < typename SparseImageFormatPropertiesAllocator, typename Dispatch, typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector PhysicalDevice::getSparseImageFormatProperties( VULKAN_HPP_NAMESPACE::Format format, VULKAN_HPP_NAMESPACE::ImageType type, VULKAN_HPP_NAMESPACE::SampleCountFlagBits samples, VULKAN_HPP_NAMESPACE::ImageUsageFlags usage, VULKAN_HPP_NAMESPACE::ImageTiling tiling, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceSparseImageFormatProperties && "Function requires " ); # endif std::vector properties; uint32_t propertyCount; d.vkGetPhysicalDeviceSparseImageFormatProperties( m_physicalDevice, static_cast( format ), static_cast( type ), static_cast( samples ), static_cast( usage ), static_cast( tiling ), &propertyCount, nullptr ); properties.resize( propertyCount ); d.vkGetPhysicalDeviceSparseImageFormatProperties( m_physicalDevice, static_cast( format ), static_cast( type ), static_cast( samples ), static_cast( usage ), static_cast( tiling ), &propertyCount, reinterpret_cast( properties.data() ) ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } return properties; } template < typename SparseImageFormatPropertiesAllocator, typename Dispatch, typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector PhysicalDevice::getSparseImageFormatProperties( VULKAN_HPP_NAMESPACE::Format format, VULKAN_HPP_NAMESPACE::ImageType type, VULKAN_HPP_NAMESPACE::SampleCountFlagBits samples, VULKAN_HPP_NAMESPACE::ImageUsageFlags usage, VULKAN_HPP_NAMESPACE::ImageTiling tiling, SparseImageFormatPropertiesAllocator & sparseImageFormatPropertiesAllocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceSparseImageFormatProperties && "Function requires " ); # endif std::vector properties( sparseImageFormatPropertiesAllocator ); uint32_t propertyCount; d.vkGetPhysicalDeviceSparseImageFormatProperties( m_physicalDevice, static_cast( format ), static_cast( type ), static_cast( samples ), static_cast( usage ), static_cast( tiling ), &propertyCount, nullptr ); properties.resize( propertyCount ); d.vkGetPhysicalDeviceSparseImageFormatProperties( m_physicalDevice, static_cast( format ), static_cast( type ), static_cast( samples ), static_cast( usage ), static_cast( tiling ), &propertyCount, reinterpret_cast( properties.data() ) ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } return properties; } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Queue::bindSparse( uint32_t bindInfoCount, const VULKAN_HPP_NAMESPACE::BindSparseInfo * pBindInfo, VULKAN_HPP_NAMESPACE::Fence fence, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkQueueBindSparse( static_cast( m_queue ), bindInfoCount, reinterpret_cast( pBindInfo ), static_cast( fence ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type Queue::bindSparse( VULKAN_HPP_NAMESPACE::ArrayProxy const & bindInfo, VULKAN_HPP_NAMESPACE::Fence fence, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkQueueBindSparse && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkQueueBindSparse( m_queue, bindInfo.size(), reinterpret_cast( bindInfo.data() ), static_cast( fence ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Queue::bindSparse" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::createFence( const VULKAN_HPP_NAMESPACE::FenceCreateInfo * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::Fence * pFence, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkCreateFence( static_cast( m_device ), reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pFence ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::createFence( const VULKAN_HPP_NAMESPACE::FenceCreateInfo & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateFence && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Fence fence; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateFence( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &fence ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createFence" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( fence ) ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::createFenceUnique( const VULKAN_HPP_NAMESPACE::FenceCreateInfo & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateFence && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Fence fence; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateFence( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &fence ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createFenceUnique" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, UniqueHandle( fence, detail::ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::destroyFence( VULKAN_HPP_NAMESPACE::Fence fence, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDestroyFence( static_cast( m_device ), static_cast( fence ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::destroyFence( VULKAN_HPP_NAMESPACE::Fence fence, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDestroyFence && "Function requires " ); # endif d.vkDestroyFence( m_device, static_cast( fence ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::Fence fence, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDestroyFence( static_cast( m_device ), static_cast( fence ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::Fence fence, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDestroyFence && "Function requires " ); # endif d.vkDestroyFence( m_device, static_cast( fence ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::resetFences( uint32_t fenceCount, const VULKAN_HPP_NAMESPACE::Fence * pFences, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkResetFences( static_cast( m_device ), fenceCount, reinterpret_cast( pFences ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE typename ResultValueType::type Device::resetFences( VULKAN_HPP_NAMESPACE::ArrayProxy const & fences, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkResetFences && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkResetFences( m_device, fences.size(), reinterpret_cast( fences.data() ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::resetFences" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getFenceStatus( VULKAN_HPP_NAMESPACE::Fence fence, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetFenceStatus( static_cast( m_device ), static_cast( fence ) ) ); } #else template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Device::getFenceStatus( VULKAN_HPP_NAMESPACE::Fence fence, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetFenceStatus && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetFenceStatus( m_device, static_cast( fence ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getFenceStatus", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eNotReady } ); return static_cast( result ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::waitForFences( uint32_t fenceCount, const VULKAN_HPP_NAMESPACE::Fence * pFences, VULKAN_HPP_NAMESPACE::Bool32 waitAll, uint64_t timeout, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkWaitForFences( static_cast( m_device ), fenceCount, reinterpret_cast( pFences ), static_cast( waitAll ), timeout ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Device::waitForFences( VULKAN_HPP_NAMESPACE::ArrayProxy const & fences, VULKAN_HPP_NAMESPACE::Bool32 waitAll, uint64_t timeout, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkWaitForFences && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkWaitForFences( m_device, fences.size(), reinterpret_cast( fences.data() ), static_cast( waitAll ), timeout ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::waitForFences", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eTimeout } ); return static_cast( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::createSemaphore( const VULKAN_HPP_NAMESPACE::SemaphoreCreateInfo * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::Semaphore * pSemaphore, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkCreateSemaphore( static_cast( m_device ), reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSemaphore ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::createSemaphore( const VULKAN_HPP_NAMESPACE::SemaphoreCreateInfo & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateSemaphore && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Semaphore semaphore; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateSemaphore( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &semaphore ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createSemaphore" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( semaphore ) ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::createSemaphoreUnique( const VULKAN_HPP_NAMESPACE::SemaphoreCreateInfo & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateSemaphore && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Semaphore semaphore; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateSemaphore( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &semaphore ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createSemaphoreUnique" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, UniqueHandle( semaphore, detail::ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::destroySemaphore( VULKAN_HPP_NAMESPACE::Semaphore semaphore, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDestroySemaphore( static_cast( m_device ), static_cast( semaphore ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::destroySemaphore( VULKAN_HPP_NAMESPACE::Semaphore semaphore, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDestroySemaphore && "Function requires " ); # endif d.vkDestroySemaphore( m_device, static_cast( semaphore ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::Semaphore semaphore, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDestroySemaphore( static_cast( m_device ), static_cast( semaphore ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::Semaphore semaphore, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDestroySemaphore && "Function requires " ); # endif d.vkDestroySemaphore( m_device, static_cast( semaphore ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::createEvent( const VULKAN_HPP_NAMESPACE::EventCreateInfo * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::Event * pEvent, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkCreateEvent( static_cast( m_device ), reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pEvent ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::createEvent( const VULKAN_HPP_NAMESPACE::EventCreateInfo & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateEvent && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Event event; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateEvent( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &event ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createEvent" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( event ) ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::createEventUnique( const VULKAN_HPP_NAMESPACE::EventCreateInfo & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateEvent && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Event event; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateEvent( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &event ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createEventUnique" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, UniqueHandle( event, detail::ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::destroyEvent( VULKAN_HPP_NAMESPACE::Event event, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDestroyEvent( static_cast( m_device ), static_cast( event ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::destroyEvent( VULKAN_HPP_NAMESPACE::Event event, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDestroyEvent && "Function requires " ); # endif d.vkDestroyEvent( m_device, static_cast( event ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::Event event, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDestroyEvent( static_cast( m_device ), static_cast( event ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::Event event, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDestroyEvent && "Function requires " ); # endif d.vkDestroyEvent( m_device, static_cast( event ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getEventStatus( VULKAN_HPP_NAMESPACE::Event event, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetEventStatus( static_cast( m_device ), static_cast( event ) ) ); } #else template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Device::getEventStatus( VULKAN_HPP_NAMESPACE::Event event, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetEventStatus && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetEventStatus( m_device, static_cast( event ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getEventStatus", { VULKAN_HPP_NAMESPACE::Result::eEventSet, VULKAN_HPP_NAMESPACE::Result::eEventReset } ); return static_cast( result ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::setEvent( VULKAN_HPP_NAMESPACE::Event event, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkSetEvent( static_cast( m_device ), static_cast( event ) ) ); } #else template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type Device::setEvent( VULKAN_HPP_NAMESPACE::Event event, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkSetEvent && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkSetEvent( m_device, static_cast( event ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::setEvent" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::resetEvent( VULKAN_HPP_NAMESPACE::Event event, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkResetEvent( static_cast( m_device ), static_cast( event ) ) ); } #else template VULKAN_HPP_INLINE typename ResultValueType::type Device::resetEvent( VULKAN_HPP_NAMESPACE::Event event, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkResetEvent && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkResetEvent( m_device, static_cast( event ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::resetEvent" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::createQueryPool( const VULKAN_HPP_NAMESPACE::QueryPoolCreateInfo * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::QueryPool * pQueryPool, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkCreateQueryPool( static_cast( m_device ), reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pQueryPool ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::createQueryPool( const VULKAN_HPP_NAMESPACE::QueryPoolCreateInfo & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateQueryPool && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::QueryPool queryPool; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateQueryPool( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &queryPool ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createQueryPool" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( queryPool ) ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::createQueryPoolUnique( const VULKAN_HPP_NAMESPACE::QueryPoolCreateInfo & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateQueryPool && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::QueryPool queryPool; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateQueryPool( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &queryPool ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createQueryPoolUnique" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, UniqueHandle( queryPool, detail::ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::destroyQueryPool( VULKAN_HPP_NAMESPACE::QueryPool queryPool, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDestroyQueryPool( static_cast( m_device ), static_cast( queryPool ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::destroyQueryPool( VULKAN_HPP_NAMESPACE::QueryPool queryPool, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDestroyQueryPool && "Function requires " ); # endif d.vkDestroyQueryPool( m_device, static_cast( queryPool ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::QueryPool queryPool, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDestroyQueryPool( static_cast( m_device ), static_cast( queryPool ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::QueryPool queryPool, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDestroyQueryPool && "Function requires " ); # endif d.vkDestroyQueryPool( m_device, static_cast( queryPool ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getQueryPoolResults( VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, size_t dataSize, void * pData, VULKAN_HPP_NAMESPACE::DeviceSize stride, VULKAN_HPP_NAMESPACE::QueryResultFlags flags, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetQueryPoolResults( static_cast( m_device ), static_cast( queryPool ), firstQuery, queryCount, dataSize, pData, static_cast( stride ), static_cast( flags ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue> Device::getQueryPoolResults( VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, size_t dataSize, VULKAN_HPP_NAMESPACE::DeviceSize stride, VULKAN_HPP_NAMESPACE::QueryResultFlags flags, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetQueryPoolResults && "Function requires " ); # endif VULKAN_HPP_ASSERT( dataSize % sizeof( DataType ) == 0 ); std::vector data( dataSize / sizeof( DataType ) ); VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetQueryPoolResults( m_device, static_cast( queryPool ), firstQuery, queryCount, data.size() * sizeof( DataType ), reinterpret_cast( data.data() ), static_cast( stride ), static_cast( flags ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getQueryPoolResults", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eNotReady } ); return ResultValue>( result, std::move( data ) ); } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue Device::getQueryPoolResult( VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, VULKAN_HPP_NAMESPACE::DeviceSize stride, VULKAN_HPP_NAMESPACE::QueryResultFlags flags, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetQueryPoolResults && "Function requires " ); # endif DataType data; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetQueryPoolResults( m_device, static_cast( queryPool ), firstQuery, queryCount, sizeof( DataType ), reinterpret_cast( &data ), static_cast( stride ), static_cast( flags ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getQueryPoolResult", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eNotReady } ); return ResultValue( result, std::move( data ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::createBuffer( const VULKAN_HPP_NAMESPACE::BufferCreateInfo * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::Buffer * pBuffer, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkCreateBuffer( static_cast( m_device ), reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pBuffer ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::createBuffer( const VULKAN_HPP_NAMESPACE::BufferCreateInfo & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateBuffer && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Buffer buffer; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateBuffer( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &buffer ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createBuffer" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( buffer ) ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::createBufferUnique( const VULKAN_HPP_NAMESPACE::BufferCreateInfo & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateBuffer && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Buffer buffer; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateBuffer( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &buffer ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createBufferUnique" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, UniqueHandle( buffer, detail::ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::destroyBuffer( VULKAN_HPP_NAMESPACE::Buffer buffer, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDestroyBuffer( static_cast( m_device ), static_cast( buffer ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::destroyBuffer( VULKAN_HPP_NAMESPACE::Buffer buffer, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDestroyBuffer && "Function requires " ); # endif d.vkDestroyBuffer( m_device, static_cast( buffer ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::Buffer buffer, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDestroyBuffer( static_cast( m_device ), static_cast( buffer ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::Buffer buffer, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDestroyBuffer && "Function requires " ); # endif d.vkDestroyBuffer( m_device, static_cast( buffer ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::createBufferView( const VULKAN_HPP_NAMESPACE::BufferViewCreateInfo * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::BufferView * pView, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkCreateBufferView( static_cast( m_device ), reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pView ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::createBufferView( const VULKAN_HPP_NAMESPACE::BufferViewCreateInfo & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateBufferView && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::BufferView view; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateBufferView( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &view ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createBufferView" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( view ) ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::createBufferViewUnique( const VULKAN_HPP_NAMESPACE::BufferViewCreateInfo & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateBufferView && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::BufferView view; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateBufferView( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &view ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createBufferViewUnique" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, UniqueHandle( view, detail::ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::destroyBufferView( VULKAN_HPP_NAMESPACE::BufferView bufferView, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDestroyBufferView( static_cast( m_device ), static_cast( bufferView ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::destroyBufferView( VULKAN_HPP_NAMESPACE::BufferView bufferView, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDestroyBufferView && "Function requires " ); # endif d.vkDestroyBufferView( m_device, static_cast( bufferView ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::BufferView bufferView, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDestroyBufferView( static_cast( m_device ), static_cast( bufferView ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::BufferView bufferView, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDestroyBufferView && "Function requires " ); # endif d.vkDestroyBufferView( m_device, static_cast( bufferView ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::createImage( const VULKAN_HPP_NAMESPACE::ImageCreateInfo * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::Image * pImage, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkCreateImage( static_cast( m_device ), reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pImage ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::createImage( const VULKAN_HPP_NAMESPACE::ImageCreateInfo & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateImage && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Image image; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateImage( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &image ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createImage" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( image ) ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::createImageUnique( const VULKAN_HPP_NAMESPACE::ImageCreateInfo & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateImage && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Image image; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateImage( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &image ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createImageUnique" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, UniqueHandle( image, detail::ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::destroyImage( VULKAN_HPP_NAMESPACE::Image image, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDestroyImage( static_cast( m_device ), static_cast( image ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::destroyImage( VULKAN_HPP_NAMESPACE::Image image, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDestroyImage && "Function requires " ); # endif d.vkDestroyImage( m_device, static_cast( image ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::Image image, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDestroyImage( static_cast( m_device ), static_cast( image ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::Image image, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDestroyImage && "Function requires " ); # endif d.vkDestroyImage( m_device, static_cast( image ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::getImageSubresourceLayout( VULKAN_HPP_NAMESPACE::Image image, const VULKAN_HPP_NAMESPACE::ImageSubresource * pSubresource, VULKAN_HPP_NAMESPACE::SubresourceLayout * pLayout, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkGetImageSubresourceLayout( static_cast( m_device ), static_cast( image ), reinterpret_cast( pSubresource ), reinterpret_cast( pLayout ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::SubresourceLayout Device::getImageSubresourceLayout( VULKAN_HPP_NAMESPACE::Image image, const VULKAN_HPP_NAMESPACE::ImageSubresource & subresource, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetImageSubresourceLayout && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::SubresourceLayout layout; d.vkGetImageSubresourceLayout( m_device, static_cast( image ), reinterpret_cast( &subresource ), reinterpret_cast( &layout ) ); return layout; } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::createImageView( const VULKAN_HPP_NAMESPACE::ImageViewCreateInfo * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::ImageView * pView, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkCreateImageView( static_cast( m_device ), reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pView ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::createImageView( const VULKAN_HPP_NAMESPACE::ImageViewCreateInfo & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateImageView && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::ImageView view; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateImageView( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &view ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createImageView" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( view ) ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::createImageViewUnique( const VULKAN_HPP_NAMESPACE::ImageViewCreateInfo & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateImageView && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::ImageView view; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateImageView( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &view ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createImageViewUnique" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, UniqueHandle( view, detail::ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::destroyImageView( VULKAN_HPP_NAMESPACE::ImageView imageView, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDestroyImageView( static_cast( m_device ), static_cast( imageView ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::destroyImageView( VULKAN_HPP_NAMESPACE::ImageView imageView, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDestroyImageView && "Function requires " ); # endif d.vkDestroyImageView( m_device, static_cast( imageView ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::ImageView imageView, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDestroyImageView( static_cast( m_device ), static_cast( imageView ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::ImageView imageView, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDestroyImageView && "Function requires " ); # endif d.vkDestroyImageView( m_device, static_cast( imageView ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::createShaderModule( const VULKAN_HPP_NAMESPACE::ShaderModuleCreateInfo * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::ShaderModule * pShaderModule, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkCreateShaderModule( static_cast( m_device ), reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pShaderModule ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::createShaderModule( const VULKAN_HPP_NAMESPACE::ShaderModuleCreateInfo & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateShaderModule && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::ShaderModule shaderModule; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateShaderModule( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &shaderModule ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createShaderModule" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( shaderModule ) ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::createShaderModuleUnique( const VULKAN_HPP_NAMESPACE::ShaderModuleCreateInfo & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateShaderModule && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::ShaderModule shaderModule; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateShaderModule( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &shaderModule ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createShaderModuleUnique" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, UniqueHandle( shaderModule, detail::ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::destroyShaderModule( VULKAN_HPP_NAMESPACE::ShaderModule shaderModule, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDestroyShaderModule( static_cast( m_device ), static_cast( shaderModule ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::destroyShaderModule( VULKAN_HPP_NAMESPACE::ShaderModule shaderModule, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDestroyShaderModule && "Function requires " ); # endif d.vkDestroyShaderModule( m_device, static_cast( shaderModule ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::ShaderModule shaderModule, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDestroyShaderModule( static_cast( m_device ), static_cast( shaderModule ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::ShaderModule shaderModule, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDestroyShaderModule && "Function requires " ); # endif d.vkDestroyShaderModule( m_device, static_cast( shaderModule ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::createPipelineCache( const VULKAN_HPP_NAMESPACE::PipelineCacheCreateInfo * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::PipelineCache * pPipelineCache, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkCreatePipelineCache( static_cast( m_device ), reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pPipelineCache ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::createPipelineCache( const VULKAN_HPP_NAMESPACE::PipelineCacheCreateInfo & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreatePipelineCache && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreatePipelineCache( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &pipelineCache ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createPipelineCache" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( pipelineCache ) ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::createPipelineCacheUnique( const VULKAN_HPP_NAMESPACE::PipelineCacheCreateInfo & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreatePipelineCache && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreatePipelineCache( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &pipelineCache ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createPipelineCacheUnique" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, UniqueHandle( pipelineCache, detail::ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::destroyPipelineCache( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDestroyPipelineCache( static_cast( m_device ), static_cast( pipelineCache ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::destroyPipelineCache( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDestroyPipelineCache && "Function requires " ); # endif d.vkDestroyPipelineCache( m_device, static_cast( pipelineCache ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDestroyPipelineCache( static_cast( m_device ), static_cast( pipelineCache ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDestroyPipelineCache && "Function requires " ); # endif d.vkDestroyPipelineCache( m_device, static_cast( pipelineCache ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getPipelineCacheData( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, size_t * pDataSize, void * pData, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetPipelineCacheData( static_cast( m_device ), static_cast( pipelineCache ), pDataSize, pData ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::getPipelineCacheData( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPipelineCacheData && "Function requires " ); # endif std::vector data; size_t dataSize; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkGetPipelineCacheData( m_device, static_cast( pipelineCache ), &dataSize, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && dataSize ) { data.resize( dataSize ); result = static_cast( d.vkGetPipelineCacheData( m_device, static_cast( pipelineCache ), &dataSize, reinterpret_cast( data.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getPipelineCacheData" ); VULKAN_HPP_ASSERT( dataSize <= data.size() ); if ( dataSize < data.size() ) { data.resize( dataSize ); } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( data ) ); } template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::getPipelineCacheData( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, Uint8_tAllocator & uint8_tAllocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPipelineCacheData && "Function requires " ); # endif std::vector data( uint8_tAllocator ); size_t dataSize; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkGetPipelineCacheData( m_device, static_cast( pipelineCache ), &dataSize, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && dataSize ) { data.resize( dataSize ); result = static_cast( d.vkGetPipelineCacheData( m_device, static_cast( pipelineCache ), &dataSize, reinterpret_cast( data.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getPipelineCacheData" ); VULKAN_HPP_ASSERT( dataSize <= data.size() ); if ( dataSize < data.size() ) { data.resize( dataSize ); } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( data ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::mergePipelineCaches( VULKAN_HPP_NAMESPACE::PipelineCache dstCache, uint32_t srcCacheCount, const VULKAN_HPP_NAMESPACE::PipelineCache * pSrcCaches, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkMergePipelineCaches( static_cast( m_device ), static_cast( dstCache ), srcCacheCount, reinterpret_cast( pSrcCaches ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type Device::mergePipelineCaches( VULKAN_HPP_NAMESPACE::PipelineCache dstCache, VULKAN_HPP_NAMESPACE::ArrayProxy const & srcCaches, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkMergePipelineCaches && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkMergePipelineCaches( m_device, static_cast( dstCache ), srcCaches.size(), reinterpret_cast( srcCaches.data() ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::mergePipelineCaches" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::createGraphicsPipelines( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, uint32_t createInfoCount, const VULKAN_HPP_NAMESPACE::GraphicsPipelineCreateInfo * pCreateInfos, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::Pipeline * pPipelines, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkCreateGraphicsPipelines( static_cast( m_device ), static_cast( pipelineCache ), createInfoCount, reinterpret_cast( pCreateInfos ), reinterpret_cast( pAllocator ), reinterpret_cast( pPipelines ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue> Device::createGraphicsPipelines( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateGraphicsPipelines && "Function requires " ); # endif std::vector pipelines( createInfos.size() ); VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateGraphicsPipelines( m_device, static_cast( pipelineCache ), createInfos.size(), reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( pipelines.data() ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createGraphicsPipelines", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); return ResultValue>( result, std::move( pipelines ) ); } template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue> Device::createGraphicsPipelines( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, Optional allocator, PipelineAllocator & pipelineAllocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateGraphicsPipelines && "Function requires " ); # endif std::vector pipelines( createInfos.size(), pipelineAllocator ); VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateGraphicsPipelines( m_device, static_cast( pipelineCache ), createInfos.size(), reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( pipelines.data() ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createGraphicsPipelines", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); return ResultValue>( result, std::move( pipelines ) ); } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue Device::createGraphicsPipeline( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, const VULKAN_HPP_NAMESPACE::GraphicsPipelineCreateInfo & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateGraphicsPipelines && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Pipeline pipeline; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateGraphicsPipelines( m_device, static_cast( pipelineCache ), 1, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &pipeline ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createGraphicsPipeline", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); return ResultValue( result, std::move( pipeline ) ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE template < typename Dispatch, typename PipelineAllocator, typename std::enable_if>::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue, PipelineAllocator>> Device::createGraphicsPipelinesUnique( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateGraphicsPipelines && "Function requires " ); # endif std::vector pipelines( createInfos.size() ); VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateGraphicsPipelines( m_device, static_cast( pipelineCache ), createInfos.size(), reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( pipelines.data() ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createGraphicsPipelinesUnique", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); std::vector, PipelineAllocator> uniquePipelines; uniquePipelines.reserve( createInfos.size() ); detail::ObjectDestroy deleter( *this, allocator, d ); for ( auto const & pipeline : pipelines ) { uniquePipelines.push_back( UniqueHandle( pipeline, deleter ) ); } return ResultValue, PipelineAllocator>>( result, std::move( uniquePipelines ) ); } template < typename Dispatch, typename PipelineAllocator, typename std::enable_if>::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue, PipelineAllocator>> Device::createGraphicsPipelinesUnique( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, Optional allocator, PipelineAllocator & pipelineAllocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateGraphicsPipelines && "Function requires " ); # endif std::vector pipelines( createInfos.size() ); VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateGraphicsPipelines( m_device, static_cast( pipelineCache ), createInfos.size(), reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( pipelines.data() ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createGraphicsPipelinesUnique", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); std::vector, PipelineAllocator> uniquePipelines( pipelineAllocator ); uniquePipelines.reserve( createInfos.size() ); detail::ObjectDestroy deleter( *this, allocator, d ); for ( auto const & pipeline : pipelines ) { uniquePipelines.push_back( UniqueHandle( pipeline, deleter ) ); } return ResultValue, PipelineAllocator>>( result, std::move( uniquePipelines ) ); } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue> Device::createGraphicsPipelineUnique( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, const VULKAN_HPP_NAMESPACE::GraphicsPipelineCreateInfo & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateGraphicsPipelines && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Pipeline pipeline; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateGraphicsPipelines( m_device, static_cast( pipelineCache ), 1, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &pipeline ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createGraphicsPipelineUnique", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); return ResultValue>( result, UniqueHandle( pipeline, detail::ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::createComputePipelines( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, uint32_t createInfoCount, const VULKAN_HPP_NAMESPACE::ComputePipelineCreateInfo * pCreateInfos, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::Pipeline * pPipelines, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkCreateComputePipelines( static_cast( m_device ), static_cast( pipelineCache ), createInfoCount, reinterpret_cast( pCreateInfos ), reinterpret_cast( pAllocator ), reinterpret_cast( pPipelines ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue> Device::createComputePipelines( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateComputePipelines && "Function requires " ); # endif std::vector pipelines( createInfos.size() ); VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateComputePipelines( m_device, static_cast( pipelineCache ), createInfos.size(), reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( pipelines.data() ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createComputePipelines", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); return ResultValue>( result, std::move( pipelines ) ); } template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue> Device::createComputePipelines( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, Optional allocator, PipelineAllocator & pipelineAllocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateComputePipelines && "Function requires " ); # endif std::vector pipelines( createInfos.size(), pipelineAllocator ); VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateComputePipelines( m_device, static_cast( pipelineCache ), createInfos.size(), reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( pipelines.data() ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createComputePipelines", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); return ResultValue>( result, std::move( pipelines ) ); } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue Device::createComputePipeline( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, const VULKAN_HPP_NAMESPACE::ComputePipelineCreateInfo & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateComputePipelines && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Pipeline pipeline; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateComputePipelines( m_device, static_cast( pipelineCache ), 1, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &pipeline ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createComputePipeline", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); return ResultValue( result, std::move( pipeline ) ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE template < typename Dispatch, typename PipelineAllocator, typename std::enable_if>::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue, PipelineAllocator>> Device::createComputePipelinesUnique( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateComputePipelines && "Function requires " ); # endif std::vector pipelines( createInfos.size() ); VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateComputePipelines( m_device, static_cast( pipelineCache ), createInfos.size(), reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( pipelines.data() ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createComputePipelinesUnique", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); std::vector, PipelineAllocator> uniquePipelines; uniquePipelines.reserve( createInfos.size() ); detail::ObjectDestroy deleter( *this, allocator, d ); for ( auto const & pipeline : pipelines ) { uniquePipelines.push_back( UniqueHandle( pipeline, deleter ) ); } return ResultValue, PipelineAllocator>>( result, std::move( uniquePipelines ) ); } template < typename Dispatch, typename PipelineAllocator, typename std::enable_if>::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue, PipelineAllocator>> Device::createComputePipelinesUnique( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, Optional allocator, PipelineAllocator & pipelineAllocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateComputePipelines && "Function requires " ); # endif std::vector pipelines( createInfos.size() ); VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateComputePipelines( m_device, static_cast( pipelineCache ), createInfos.size(), reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( pipelines.data() ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createComputePipelinesUnique", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); std::vector, PipelineAllocator> uniquePipelines( pipelineAllocator ); uniquePipelines.reserve( createInfos.size() ); detail::ObjectDestroy deleter( *this, allocator, d ); for ( auto const & pipeline : pipelines ) { uniquePipelines.push_back( UniqueHandle( pipeline, deleter ) ); } return ResultValue, PipelineAllocator>>( result, std::move( uniquePipelines ) ); } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue> Device::createComputePipelineUnique( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, const VULKAN_HPP_NAMESPACE::ComputePipelineCreateInfo & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateComputePipelines && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Pipeline pipeline; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateComputePipelines( m_device, static_cast( pipelineCache ), 1, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &pipeline ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createComputePipelineUnique", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); return ResultValue>( result, UniqueHandle( pipeline, detail::ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::destroyPipeline( VULKAN_HPP_NAMESPACE::Pipeline pipeline, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDestroyPipeline( static_cast( m_device ), static_cast( pipeline ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::destroyPipeline( VULKAN_HPP_NAMESPACE::Pipeline pipeline, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDestroyPipeline && "Function requires " ); # endif d.vkDestroyPipeline( m_device, static_cast( pipeline ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::Pipeline pipeline, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDestroyPipeline( static_cast( m_device ), static_cast( pipeline ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::Pipeline pipeline, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDestroyPipeline && "Function requires " ); # endif d.vkDestroyPipeline( m_device, static_cast( pipeline ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::createPipelineLayout( const VULKAN_HPP_NAMESPACE::PipelineLayoutCreateInfo * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::PipelineLayout * pPipelineLayout, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkCreatePipelineLayout( static_cast( m_device ), reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pPipelineLayout ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::createPipelineLayout( const VULKAN_HPP_NAMESPACE::PipelineLayoutCreateInfo & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreatePipelineLayout && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::PipelineLayout pipelineLayout; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreatePipelineLayout( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &pipelineLayout ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createPipelineLayout" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( pipelineLayout ) ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::createPipelineLayoutUnique( const VULKAN_HPP_NAMESPACE::PipelineLayoutCreateInfo & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreatePipelineLayout && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::PipelineLayout pipelineLayout; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreatePipelineLayout( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &pipelineLayout ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createPipelineLayoutUnique" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, UniqueHandle( pipelineLayout, detail::ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::destroyPipelineLayout( VULKAN_HPP_NAMESPACE::PipelineLayout pipelineLayout, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDestroyPipelineLayout( static_cast( m_device ), static_cast( pipelineLayout ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::destroyPipelineLayout( VULKAN_HPP_NAMESPACE::PipelineLayout pipelineLayout, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDestroyPipelineLayout && "Function requires " ); # endif d.vkDestroyPipelineLayout( m_device, static_cast( pipelineLayout ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::PipelineLayout pipelineLayout, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDestroyPipelineLayout( static_cast( m_device ), static_cast( pipelineLayout ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::PipelineLayout pipelineLayout, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDestroyPipelineLayout && "Function requires " ); # endif d.vkDestroyPipelineLayout( m_device, static_cast( pipelineLayout ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::createSampler( const VULKAN_HPP_NAMESPACE::SamplerCreateInfo * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::Sampler * pSampler, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkCreateSampler( static_cast( m_device ), reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSampler ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::createSampler( const VULKAN_HPP_NAMESPACE::SamplerCreateInfo & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateSampler && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Sampler sampler; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateSampler( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &sampler ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createSampler" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( sampler ) ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::createSamplerUnique( const VULKAN_HPP_NAMESPACE::SamplerCreateInfo & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateSampler && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Sampler sampler; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateSampler( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &sampler ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createSamplerUnique" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, UniqueHandle( sampler, detail::ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::destroySampler( VULKAN_HPP_NAMESPACE::Sampler sampler, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDestroySampler( static_cast( m_device ), static_cast( sampler ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::destroySampler( VULKAN_HPP_NAMESPACE::Sampler sampler, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDestroySampler && "Function requires " ); # endif d.vkDestroySampler( m_device, static_cast( sampler ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::Sampler sampler, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDestroySampler( static_cast( m_device ), static_cast( sampler ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::Sampler sampler, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDestroySampler && "Function requires " ); # endif d.vkDestroySampler( m_device, static_cast( sampler ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::createDescriptorSetLayout( const VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateInfo * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::DescriptorSetLayout * pSetLayout, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkCreateDescriptorSetLayout( static_cast( m_device ), reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSetLayout ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::createDescriptorSetLayout( const VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateInfo & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateDescriptorSetLayout && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::DescriptorSetLayout setLayout; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateDescriptorSetLayout( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &setLayout ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createDescriptorSetLayout" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( setLayout ) ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::createDescriptorSetLayoutUnique( const VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateInfo & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateDescriptorSetLayout && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::DescriptorSetLayout setLayout; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateDescriptorSetLayout( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &setLayout ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createDescriptorSetLayoutUnique" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, UniqueHandle( setLayout, detail::ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::destroyDescriptorSetLayout( VULKAN_HPP_NAMESPACE::DescriptorSetLayout descriptorSetLayout, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDestroyDescriptorSetLayout( static_cast( m_device ), static_cast( descriptorSetLayout ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::destroyDescriptorSetLayout( VULKAN_HPP_NAMESPACE::DescriptorSetLayout descriptorSetLayout, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDestroyDescriptorSetLayout && "Function requires " ); # endif d.vkDestroyDescriptorSetLayout( m_device, static_cast( descriptorSetLayout ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::DescriptorSetLayout descriptorSetLayout, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDestroyDescriptorSetLayout( static_cast( m_device ), static_cast( descriptorSetLayout ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::DescriptorSetLayout descriptorSetLayout, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDestroyDescriptorSetLayout && "Function requires " ); # endif d.vkDestroyDescriptorSetLayout( m_device, static_cast( descriptorSetLayout ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::createDescriptorPool( const VULKAN_HPP_NAMESPACE::DescriptorPoolCreateInfo * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::DescriptorPool * pDescriptorPool, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkCreateDescriptorPool( static_cast( m_device ), reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pDescriptorPool ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::createDescriptorPool( const VULKAN_HPP_NAMESPACE::DescriptorPoolCreateInfo & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateDescriptorPool && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::DescriptorPool descriptorPool; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateDescriptorPool( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &descriptorPool ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createDescriptorPool" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( descriptorPool ) ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::createDescriptorPoolUnique( const VULKAN_HPP_NAMESPACE::DescriptorPoolCreateInfo & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateDescriptorPool && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::DescriptorPool descriptorPool; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateDescriptorPool( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &descriptorPool ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createDescriptorPoolUnique" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, UniqueHandle( descriptorPool, detail::ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::destroyDescriptorPool( VULKAN_HPP_NAMESPACE::DescriptorPool descriptorPool, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDestroyDescriptorPool( static_cast( m_device ), static_cast( descriptorPool ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::destroyDescriptorPool( VULKAN_HPP_NAMESPACE::DescriptorPool descriptorPool, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDestroyDescriptorPool && "Function requires " ); # endif d.vkDestroyDescriptorPool( m_device, static_cast( descriptorPool ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::DescriptorPool descriptorPool, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDestroyDescriptorPool( static_cast( m_device ), static_cast( descriptorPool ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::DescriptorPool descriptorPool, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDestroyDescriptorPool && "Function requires " ); # endif d.vkDestroyDescriptorPool( m_device, static_cast( descriptorPool ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE Result Device::resetDescriptorPool( VULKAN_HPP_NAMESPACE::DescriptorPool descriptorPool, VULKAN_HPP_NAMESPACE::DescriptorPoolResetFlags flags, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkResetDescriptorPool( static_cast( m_device ), static_cast( descriptorPool ), static_cast( flags ) ) ); } #else template VULKAN_HPP_INLINE void Device::resetDescriptorPool( VULKAN_HPP_NAMESPACE::DescriptorPool descriptorPool, VULKAN_HPP_NAMESPACE::DescriptorPoolResetFlags flags, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkResetDescriptorPool && "Function requires " ); # endif d.vkResetDescriptorPool( m_device, static_cast( descriptorPool ), static_cast( flags ) ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::allocateDescriptorSets( const VULKAN_HPP_NAMESPACE::DescriptorSetAllocateInfo * pAllocateInfo, VULKAN_HPP_NAMESPACE::DescriptorSet * pDescriptorSets, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkAllocateDescriptorSets( static_cast( m_device ), reinterpret_cast( pAllocateInfo ), reinterpret_cast( pDescriptorSets ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::allocateDescriptorSets( const VULKAN_HPP_NAMESPACE::DescriptorSetAllocateInfo & allocateInfo, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkAllocateDescriptorSets && "Function requires " ); # endif std::vector descriptorSets( allocateInfo.descriptorSetCount ); VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkAllocateDescriptorSets( m_device, reinterpret_cast( &allocateInfo ), reinterpret_cast( descriptorSets.data() ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::allocateDescriptorSets" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( descriptorSets ) ); } template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::allocateDescriptorSets( const VULKAN_HPP_NAMESPACE::DescriptorSetAllocateInfo & allocateInfo, DescriptorSetAllocator & descriptorSetAllocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkAllocateDescriptorSets && "Function requires " ); # endif std::vector descriptorSets( allocateInfo.descriptorSetCount, descriptorSetAllocator ); VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkAllocateDescriptorSets( m_device, reinterpret_cast( &allocateInfo ), reinterpret_cast( descriptorSets.data() ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::allocateDescriptorSets" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( descriptorSets ) ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE template < typename Dispatch, typename DescriptorSetAllocator, typename std::enable_if>::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType, DescriptorSetAllocator>>::type Device::allocateDescriptorSetsUnique( const VULKAN_HPP_NAMESPACE::DescriptorSetAllocateInfo & allocateInfo, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkAllocateDescriptorSets && "Function requires " ); # endif std::vector descriptorSets( allocateInfo.descriptorSetCount ); VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkAllocateDescriptorSets( m_device, reinterpret_cast( &allocateInfo ), reinterpret_cast( descriptorSets.data() ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::allocateDescriptorSetsUnique" ); std::vector, DescriptorSetAllocator> uniqueDescriptorSets; uniqueDescriptorSets.reserve( allocateInfo.descriptorSetCount ); detail::PoolFree deleter( *this, allocateInfo.descriptorPool, d ); for ( auto const & descriptorSet : descriptorSets ) { uniqueDescriptorSets.push_back( UniqueHandle( descriptorSet, deleter ) ); } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( uniqueDescriptorSets ) ); } template < typename Dispatch, typename DescriptorSetAllocator, typename std::enable_if>::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType, DescriptorSetAllocator>>::type Device::allocateDescriptorSetsUnique( const VULKAN_HPP_NAMESPACE::DescriptorSetAllocateInfo & allocateInfo, DescriptorSetAllocator & descriptorSetAllocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkAllocateDescriptorSets && "Function requires " ); # endif std::vector descriptorSets( allocateInfo.descriptorSetCount ); VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkAllocateDescriptorSets( m_device, reinterpret_cast( &allocateInfo ), reinterpret_cast( descriptorSets.data() ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::allocateDescriptorSetsUnique" ); std::vector, DescriptorSetAllocator> uniqueDescriptorSets( descriptorSetAllocator ); uniqueDescriptorSets.reserve( allocateInfo.descriptorSetCount ); detail::PoolFree deleter( *this, allocateInfo.descriptorPool, d ); for ( auto const & descriptorSet : descriptorSets ) { uniqueDescriptorSets.push_back( UniqueHandle( descriptorSet, deleter ) ); } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( uniqueDescriptorSets ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE Result Device::freeDescriptorSets( VULKAN_HPP_NAMESPACE::DescriptorPool descriptorPool, uint32_t descriptorSetCount, const VULKAN_HPP_NAMESPACE::DescriptorSet * pDescriptorSets, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkFreeDescriptorSets( static_cast( m_device ), static_cast( descriptorPool ), descriptorSetCount, reinterpret_cast( pDescriptorSets ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::freeDescriptorSets( VULKAN_HPP_NAMESPACE::DescriptorPool descriptorPool, VULKAN_HPP_NAMESPACE::ArrayProxy const & descriptorSets, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkFreeDescriptorSets && "Function requires " ); # endif d.vkFreeDescriptorSets( m_device, static_cast( descriptorPool ), descriptorSets.size(), reinterpret_cast( descriptorSets.data() ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE Result( Device::free )( VULKAN_HPP_NAMESPACE::DescriptorPool descriptorPool, uint32_t descriptorSetCount, const VULKAN_HPP_NAMESPACE::DescriptorSet * pDescriptorSets, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkFreeDescriptorSets( static_cast( m_device ), static_cast( descriptorPool ), descriptorSetCount, reinterpret_cast( pDescriptorSets ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void( Device::free )( VULKAN_HPP_NAMESPACE::DescriptorPool descriptorPool, VULKAN_HPP_NAMESPACE::ArrayProxy const & descriptorSets, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkFreeDescriptorSets && "Function requires " ); # endif d.vkFreeDescriptorSets( m_device, static_cast( descriptorPool ), descriptorSets.size(), reinterpret_cast( descriptorSets.data() ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::updateDescriptorSets( uint32_t descriptorWriteCount, const VULKAN_HPP_NAMESPACE::WriteDescriptorSet * pDescriptorWrites, uint32_t descriptorCopyCount, const VULKAN_HPP_NAMESPACE::CopyDescriptorSet * pDescriptorCopies, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkUpdateDescriptorSets( static_cast( m_device ), descriptorWriteCount, reinterpret_cast( pDescriptorWrites ), descriptorCopyCount, reinterpret_cast( pDescriptorCopies ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::updateDescriptorSets( VULKAN_HPP_NAMESPACE::ArrayProxy const & descriptorWrites, VULKAN_HPP_NAMESPACE::ArrayProxy const & descriptorCopies, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkUpdateDescriptorSets && "Function requires " ); # endif d.vkUpdateDescriptorSets( m_device, descriptorWrites.size(), reinterpret_cast( descriptorWrites.data() ), descriptorCopies.size(), reinterpret_cast( descriptorCopies.data() ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::createFramebuffer( const VULKAN_HPP_NAMESPACE::FramebufferCreateInfo * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::Framebuffer * pFramebuffer, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkCreateFramebuffer( static_cast( m_device ), reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pFramebuffer ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::createFramebuffer( const VULKAN_HPP_NAMESPACE::FramebufferCreateInfo & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateFramebuffer && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Framebuffer framebuffer; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateFramebuffer( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &framebuffer ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createFramebuffer" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( framebuffer ) ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::createFramebufferUnique( const VULKAN_HPP_NAMESPACE::FramebufferCreateInfo & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateFramebuffer && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Framebuffer framebuffer; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateFramebuffer( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &framebuffer ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createFramebufferUnique" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, UniqueHandle( framebuffer, detail::ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::destroyFramebuffer( VULKAN_HPP_NAMESPACE::Framebuffer framebuffer, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDestroyFramebuffer( static_cast( m_device ), static_cast( framebuffer ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::destroyFramebuffer( VULKAN_HPP_NAMESPACE::Framebuffer framebuffer, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDestroyFramebuffer && "Function requires " ); # endif d.vkDestroyFramebuffer( m_device, static_cast( framebuffer ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::Framebuffer framebuffer, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDestroyFramebuffer( static_cast( m_device ), static_cast( framebuffer ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::Framebuffer framebuffer, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDestroyFramebuffer && "Function requires " ); # endif d.vkDestroyFramebuffer( m_device, static_cast( framebuffer ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::createRenderPass( const VULKAN_HPP_NAMESPACE::RenderPassCreateInfo * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::RenderPass * pRenderPass, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkCreateRenderPass( static_cast( m_device ), reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pRenderPass ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::createRenderPass( const VULKAN_HPP_NAMESPACE::RenderPassCreateInfo & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateRenderPass && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::RenderPass renderPass; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateRenderPass( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &renderPass ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createRenderPass" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( renderPass ) ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::createRenderPassUnique( const VULKAN_HPP_NAMESPACE::RenderPassCreateInfo & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateRenderPass && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::RenderPass renderPass; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateRenderPass( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &renderPass ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createRenderPassUnique" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, UniqueHandle( renderPass, detail::ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::destroyRenderPass( VULKAN_HPP_NAMESPACE::RenderPass renderPass, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDestroyRenderPass( static_cast( m_device ), static_cast( renderPass ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::destroyRenderPass( VULKAN_HPP_NAMESPACE::RenderPass renderPass, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDestroyRenderPass && "Function requires " ); # endif d.vkDestroyRenderPass( m_device, static_cast( renderPass ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::RenderPass renderPass, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDestroyRenderPass( static_cast( m_device ), static_cast( renderPass ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::RenderPass renderPass, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDestroyRenderPass && "Function requires " ); # endif d.vkDestroyRenderPass( m_device, static_cast( renderPass ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::getRenderAreaGranularity( VULKAN_HPP_NAMESPACE::RenderPass renderPass, VULKAN_HPP_NAMESPACE::Extent2D * pGranularity, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkGetRenderAreaGranularity( static_cast( m_device ), static_cast( renderPass ), reinterpret_cast( pGranularity ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Extent2D Device::getRenderAreaGranularity( VULKAN_HPP_NAMESPACE::RenderPass renderPass, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetRenderAreaGranularity && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Extent2D granularity; d.vkGetRenderAreaGranularity( m_device, static_cast( renderPass ), reinterpret_cast( &granularity ) ); return granularity; } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::createCommandPool( const VULKAN_HPP_NAMESPACE::CommandPoolCreateInfo * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::CommandPool * pCommandPool, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkCreateCommandPool( static_cast( m_device ), reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pCommandPool ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::createCommandPool( const VULKAN_HPP_NAMESPACE::CommandPoolCreateInfo & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateCommandPool && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::CommandPool commandPool; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateCommandPool( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &commandPool ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createCommandPool" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( commandPool ) ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::createCommandPoolUnique( const VULKAN_HPP_NAMESPACE::CommandPoolCreateInfo & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateCommandPool && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::CommandPool commandPool; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateCommandPool( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &commandPool ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createCommandPoolUnique" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, UniqueHandle( commandPool, detail::ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::destroyCommandPool( VULKAN_HPP_NAMESPACE::CommandPool commandPool, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDestroyCommandPool( static_cast( m_device ), static_cast( commandPool ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::destroyCommandPool( VULKAN_HPP_NAMESPACE::CommandPool commandPool, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDestroyCommandPool && "Function requires " ); # endif d.vkDestroyCommandPool( m_device, static_cast( commandPool ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::CommandPool commandPool, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDestroyCommandPool( static_cast( m_device ), static_cast( commandPool ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::CommandPool commandPool, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDestroyCommandPool && "Function requires " ); # endif d.vkDestroyCommandPool( m_device, static_cast( commandPool ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::resetCommandPool( VULKAN_HPP_NAMESPACE::CommandPool commandPool, VULKAN_HPP_NAMESPACE::CommandPoolResetFlags flags, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkResetCommandPool( static_cast( m_device ), static_cast( commandPool ), static_cast( flags ) ) ); } #else template VULKAN_HPP_INLINE typename ResultValueType::type Device::resetCommandPool( VULKAN_HPP_NAMESPACE::CommandPool commandPool, VULKAN_HPP_NAMESPACE::CommandPoolResetFlags flags, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkResetCommandPool && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkResetCommandPool( m_device, static_cast( commandPool ), static_cast( flags ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::resetCommandPool" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::allocateCommandBuffers( const VULKAN_HPP_NAMESPACE::CommandBufferAllocateInfo * pAllocateInfo, VULKAN_HPP_NAMESPACE::CommandBuffer * pCommandBuffers, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkAllocateCommandBuffers( static_cast( m_device ), reinterpret_cast( pAllocateInfo ), reinterpret_cast( pCommandBuffers ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::allocateCommandBuffers( const VULKAN_HPP_NAMESPACE::CommandBufferAllocateInfo & allocateInfo, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkAllocateCommandBuffers && "Function requires " ); # endif std::vector commandBuffers( allocateInfo.commandBufferCount ); VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkAllocateCommandBuffers( m_device, reinterpret_cast( &allocateInfo ), reinterpret_cast( commandBuffers.data() ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::allocateCommandBuffers" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( commandBuffers ) ); } template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::allocateCommandBuffers( const VULKAN_HPP_NAMESPACE::CommandBufferAllocateInfo & allocateInfo, CommandBufferAllocator & commandBufferAllocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkAllocateCommandBuffers && "Function requires " ); # endif std::vector commandBuffers( allocateInfo.commandBufferCount, commandBufferAllocator ); VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkAllocateCommandBuffers( m_device, reinterpret_cast( &allocateInfo ), reinterpret_cast( commandBuffers.data() ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::allocateCommandBuffers" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( commandBuffers ) ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE template < typename Dispatch, typename CommandBufferAllocator, typename std::enable_if>::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType, CommandBufferAllocator>>::type Device::allocateCommandBuffersUnique( const VULKAN_HPP_NAMESPACE::CommandBufferAllocateInfo & allocateInfo, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkAllocateCommandBuffers && "Function requires " ); # endif std::vector commandBuffers( allocateInfo.commandBufferCount ); VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkAllocateCommandBuffers( m_device, reinterpret_cast( &allocateInfo ), reinterpret_cast( commandBuffers.data() ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::allocateCommandBuffersUnique" ); std::vector, CommandBufferAllocator> uniqueCommandBuffers; uniqueCommandBuffers.reserve( allocateInfo.commandBufferCount ); detail::PoolFree deleter( *this, allocateInfo.commandPool, d ); for ( auto const & commandBuffer : commandBuffers ) { uniqueCommandBuffers.push_back( UniqueHandle( commandBuffer, deleter ) ); } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( uniqueCommandBuffers ) ); } template < typename Dispatch, typename CommandBufferAllocator, typename std::enable_if>::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType, CommandBufferAllocator>>::type Device::allocateCommandBuffersUnique( const VULKAN_HPP_NAMESPACE::CommandBufferAllocateInfo & allocateInfo, CommandBufferAllocator & commandBufferAllocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkAllocateCommandBuffers && "Function requires " ); # endif std::vector commandBuffers( allocateInfo.commandBufferCount ); VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkAllocateCommandBuffers( m_device, reinterpret_cast( &allocateInfo ), reinterpret_cast( commandBuffers.data() ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::allocateCommandBuffersUnique" ); std::vector, CommandBufferAllocator> uniqueCommandBuffers( commandBufferAllocator ); uniqueCommandBuffers.reserve( allocateInfo.commandBufferCount ); detail::PoolFree deleter( *this, allocateInfo.commandPool, d ); for ( auto const & commandBuffer : commandBuffers ) { uniqueCommandBuffers.push_back( UniqueHandle( commandBuffer, deleter ) ); } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( uniqueCommandBuffers ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::freeCommandBuffers( VULKAN_HPP_NAMESPACE::CommandPool commandPool, uint32_t commandBufferCount, const VULKAN_HPP_NAMESPACE::CommandBuffer * pCommandBuffers, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkFreeCommandBuffers( static_cast( m_device ), static_cast( commandPool ), commandBufferCount, reinterpret_cast( pCommandBuffers ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::freeCommandBuffers( VULKAN_HPP_NAMESPACE::CommandPool commandPool, VULKAN_HPP_NAMESPACE::ArrayProxy const & commandBuffers, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkFreeCommandBuffers && "Function requires " ); # endif d.vkFreeCommandBuffers( m_device, static_cast( commandPool ), commandBuffers.size(), reinterpret_cast( commandBuffers.data() ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void( Device::free )( VULKAN_HPP_NAMESPACE::CommandPool commandPool, uint32_t commandBufferCount, const VULKAN_HPP_NAMESPACE::CommandBuffer * pCommandBuffers, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkFreeCommandBuffers( static_cast( m_device ), static_cast( commandPool ), commandBufferCount, reinterpret_cast( pCommandBuffers ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void( Device::free )( VULKAN_HPP_NAMESPACE::CommandPool commandPool, VULKAN_HPP_NAMESPACE::ArrayProxy const & commandBuffers, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkFreeCommandBuffers && "Function requires " ); # endif d.vkFreeCommandBuffers( m_device, static_cast( commandPool ), commandBuffers.size(), reinterpret_cast( commandBuffers.data() ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result CommandBuffer::begin( const VULKAN_HPP_NAMESPACE::CommandBufferBeginInfo * pBeginInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkBeginCommandBuffer( static_cast( m_commandBuffer ), reinterpret_cast( pBeginInfo ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type CommandBuffer::begin( const VULKAN_HPP_NAMESPACE::CommandBufferBeginInfo & beginInfo, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkBeginCommandBuffer && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkBeginCommandBuffer( m_commandBuffer, reinterpret_cast( &beginInfo ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::begin" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result CommandBuffer::end( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkEndCommandBuffer( static_cast( m_commandBuffer ) ) ); } #else template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type CommandBuffer::end( Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkEndCommandBuffer && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkEndCommandBuffer( m_commandBuffer ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::end" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result CommandBuffer::reset( VULKAN_HPP_NAMESPACE::CommandBufferResetFlags flags, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkResetCommandBuffer( static_cast( m_commandBuffer ), static_cast( flags ) ) ); } #else template VULKAN_HPP_INLINE typename ResultValueType::type CommandBuffer::reset( VULKAN_HPP_NAMESPACE::CommandBufferResetFlags flags, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkResetCommandBuffer && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkResetCommandBuffer( m_commandBuffer, static_cast( flags ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::reset" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ template VULKAN_HPP_INLINE void CommandBuffer::bindPipeline( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint, VULKAN_HPP_NAMESPACE::Pipeline pipeline, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdBindPipeline( static_cast( m_commandBuffer ), static_cast( pipelineBindPoint ), static_cast( pipeline ) ); } template VULKAN_HPP_INLINE void CommandBuffer::setViewport( uint32_t firstViewport, uint32_t viewportCount, const VULKAN_HPP_NAMESPACE::Viewport * pViewports, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetViewport( static_cast( m_commandBuffer ), firstViewport, viewportCount, reinterpret_cast( pViewports ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::setViewport( uint32_t firstViewport, VULKAN_HPP_NAMESPACE::ArrayProxy const & viewports, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdSetViewport && "Function requires " ); # endif d.vkCmdSetViewport( m_commandBuffer, firstViewport, viewports.size(), reinterpret_cast( viewports.data() ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::setScissor( uint32_t firstScissor, uint32_t scissorCount, const VULKAN_HPP_NAMESPACE::Rect2D * pScissors, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetScissor( static_cast( m_commandBuffer ), firstScissor, scissorCount, reinterpret_cast( pScissors ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::setScissor( uint32_t firstScissor, VULKAN_HPP_NAMESPACE::ArrayProxy const & scissors, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdSetScissor && "Function requires " ); # endif d.vkCmdSetScissor( m_commandBuffer, firstScissor, scissors.size(), reinterpret_cast( scissors.data() ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::setLineWidth( float lineWidth, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetLineWidth( static_cast( m_commandBuffer ), lineWidth ); } template VULKAN_HPP_INLINE void CommandBuffer::setDepthBias( float depthBiasConstantFactor, float depthBiasClamp, float depthBiasSlopeFactor, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetDepthBias( static_cast( m_commandBuffer ), depthBiasConstantFactor, depthBiasClamp, depthBiasSlopeFactor ); } template VULKAN_HPP_INLINE void CommandBuffer::setBlendConstants( const float blendConstants[4], Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetBlendConstants( static_cast( m_commandBuffer ), blendConstants ); } template VULKAN_HPP_INLINE void CommandBuffer::setDepthBounds( float minDepthBounds, float maxDepthBounds, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetDepthBounds( static_cast( m_commandBuffer ), minDepthBounds, maxDepthBounds ); } template VULKAN_HPP_INLINE void CommandBuffer::setStencilCompareMask( VULKAN_HPP_NAMESPACE::StencilFaceFlags faceMask, uint32_t compareMask, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetStencilCompareMask( static_cast( m_commandBuffer ), static_cast( faceMask ), compareMask ); } template VULKAN_HPP_INLINE void CommandBuffer::setStencilWriteMask( VULKAN_HPP_NAMESPACE::StencilFaceFlags faceMask, uint32_t writeMask, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetStencilWriteMask( static_cast( m_commandBuffer ), static_cast( faceMask ), writeMask ); } template VULKAN_HPP_INLINE void CommandBuffer::setStencilReference( VULKAN_HPP_NAMESPACE::StencilFaceFlags faceMask, uint32_t reference, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetStencilReference( static_cast( m_commandBuffer ), static_cast( faceMask ), reference ); } template VULKAN_HPP_INLINE void CommandBuffer::bindDescriptorSets( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint, VULKAN_HPP_NAMESPACE::PipelineLayout layout, uint32_t firstSet, uint32_t descriptorSetCount, const VULKAN_HPP_NAMESPACE::DescriptorSet * pDescriptorSets, uint32_t dynamicOffsetCount, const uint32_t * pDynamicOffsets, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdBindDescriptorSets( static_cast( m_commandBuffer ), static_cast( pipelineBindPoint ), static_cast( layout ), firstSet, descriptorSetCount, reinterpret_cast( pDescriptorSets ), dynamicOffsetCount, pDynamicOffsets ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::bindDescriptorSets( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint, VULKAN_HPP_NAMESPACE::PipelineLayout layout, uint32_t firstSet, VULKAN_HPP_NAMESPACE::ArrayProxy const & descriptorSets, VULKAN_HPP_NAMESPACE::ArrayProxy const & dynamicOffsets, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdBindDescriptorSets && "Function requires " ); # endif d.vkCmdBindDescriptorSets( m_commandBuffer, static_cast( pipelineBindPoint ), static_cast( layout ), firstSet, descriptorSets.size(), reinterpret_cast( descriptorSets.data() ), dynamicOffsets.size(), dynamicOffsets.data() ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::bindIndexBuffer( VULKAN_HPP_NAMESPACE::Buffer buffer, VULKAN_HPP_NAMESPACE::DeviceSize offset, VULKAN_HPP_NAMESPACE::IndexType indexType, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdBindIndexBuffer( static_cast( m_commandBuffer ), static_cast( buffer ), static_cast( offset ), static_cast( indexType ) ); } template VULKAN_HPP_INLINE void CommandBuffer::bindVertexBuffers( uint32_t firstBinding, uint32_t bindingCount, const VULKAN_HPP_NAMESPACE::Buffer * pBuffers, const VULKAN_HPP_NAMESPACE::DeviceSize * pOffsets, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdBindVertexBuffers( static_cast( m_commandBuffer ), firstBinding, bindingCount, reinterpret_cast( pBuffers ), reinterpret_cast( pOffsets ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::bindVertexBuffers( uint32_t firstBinding, VULKAN_HPP_NAMESPACE::ArrayProxy const & buffers, VULKAN_HPP_NAMESPACE::ArrayProxy const & offsets, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdBindVertexBuffers && "Function requires " ); # endif # ifdef VULKAN_HPP_NO_EXCEPTIONS VULKAN_HPP_ASSERT( buffers.size() == offsets.size() ); # else if ( buffers.size() != offsets.size() ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::bindVertexBuffers: buffers.size() != offsets.size()" ); } # endif /*VULKAN_HPP_NO_EXCEPTIONS*/ d.vkCmdBindVertexBuffers( m_commandBuffer, firstBinding, buffers.size(), reinterpret_cast( buffers.data() ), reinterpret_cast( offsets.data() ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::draw( uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdDraw( static_cast( m_commandBuffer ), vertexCount, instanceCount, firstVertex, firstInstance ); } template VULKAN_HPP_INLINE void CommandBuffer::drawIndexed( uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, int32_t vertexOffset, uint32_t firstInstance, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdDrawIndexed( static_cast( m_commandBuffer ), indexCount, instanceCount, firstIndex, vertexOffset, firstInstance ); } template VULKAN_HPP_INLINE void CommandBuffer::drawIndirect( VULKAN_HPP_NAMESPACE::Buffer buffer, VULKAN_HPP_NAMESPACE::DeviceSize offset, uint32_t drawCount, uint32_t stride, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdDrawIndirect( static_cast( m_commandBuffer ), static_cast( buffer ), static_cast( offset ), drawCount, stride ); } template VULKAN_HPP_INLINE void CommandBuffer::drawIndexedIndirect( VULKAN_HPP_NAMESPACE::Buffer buffer, VULKAN_HPP_NAMESPACE::DeviceSize offset, uint32_t drawCount, uint32_t stride, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdDrawIndexedIndirect( static_cast( m_commandBuffer ), static_cast( buffer ), static_cast( offset ), drawCount, stride ); } template VULKAN_HPP_INLINE void CommandBuffer::dispatch( uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdDispatch( static_cast( m_commandBuffer ), groupCountX, groupCountY, groupCountZ ); } template VULKAN_HPP_INLINE void CommandBuffer::dispatchIndirect( VULKAN_HPP_NAMESPACE::Buffer buffer, VULKAN_HPP_NAMESPACE::DeviceSize offset, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdDispatchIndirect( static_cast( m_commandBuffer ), static_cast( buffer ), static_cast( offset ) ); } template VULKAN_HPP_INLINE void CommandBuffer::copyBuffer( VULKAN_HPP_NAMESPACE::Buffer srcBuffer, VULKAN_HPP_NAMESPACE::Buffer dstBuffer, uint32_t regionCount, const VULKAN_HPP_NAMESPACE::BufferCopy * pRegions, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdCopyBuffer( static_cast( m_commandBuffer ), static_cast( srcBuffer ), static_cast( dstBuffer ), regionCount, reinterpret_cast( pRegions ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::copyBuffer( VULKAN_HPP_NAMESPACE::Buffer srcBuffer, VULKAN_HPP_NAMESPACE::Buffer dstBuffer, VULKAN_HPP_NAMESPACE::ArrayProxy const & regions, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdCopyBuffer && "Function requires " ); # endif d.vkCmdCopyBuffer( m_commandBuffer, static_cast( srcBuffer ), static_cast( dstBuffer ), regions.size(), reinterpret_cast( regions.data() ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::copyImage( VULKAN_HPP_NAMESPACE::Image srcImage, VULKAN_HPP_NAMESPACE::ImageLayout srcImageLayout, VULKAN_HPP_NAMESPACE::Image dstImage, VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout, uint32_t regionCount, const VULKAN_HPP_NAMESPACE::ImageCopy * pRegions, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdCopyImage( static_cast( m_commandBuffer ), static_cast( srcImage ), static_cast( srcImageLayout ), static_cast( dstImage ), static_cast( dstImageLayout ), regionCount, reinterpret_cast( pRegions ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::copyImage( VULKAN_HPP_NAMESPACE::Image srcImage, VULKAN_HPP_NAMESPACE::ImageLayout srcImageLayout, VULKAN_HPP_NAMESPACE::Image dstImage, VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout, VULKAN_HPP_NAMESPACE::ArrayProxy const & regions, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdCopyImage && "Function requires " ); # endif d.vkCmdCopyImage( m_commandBuffer, static_cast( srcImage ), static_cast( srcImageLayout ), static_cast( dstImage ), static_cast( dstImageLayout ), regions.size(), reinterpret_cast( regions.data() ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::blitImage( VULKAN_HPP_NAMESPACE::Image srcImage, VULKAN_HPP_NAMESPACE::ImageLayout srcImageLayout, VULKAN_HPP_NAMESPACE::Image dstImage, VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout, uint32_t regionCount, const VULKAN_HPP_NAMESPACE::ImageBlit * pRegions, VULKAN_HPP_NAMESPACE::Filter filter, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdBlitImage( static_cast( m_commandBuffer ), static_cast( srcImage ), static_cast( srcImageLayout ), static_cast( dstImage ), static_cast( dstImageLayout ), regionCount, reinterpret_cast( pRegions ), static_cast( filter ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::blitImage( VULKAN_HPP_NAMESPACE::Image srcImage, VULKAN_HPP_NAMESPACE::ImageLayout srcImageLayout, VULKAN_HPP_NAMESPACE::Image dstImage, VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout, VULKAN_HPP_NAMESPACE::ArrayProxy const & regions, VULKAN_HPP_NAMESPACE::Filter filter, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdBlitImage && "Function requires " ); # endif d.vkCmdBlitImage( m_commandBuffer, static_cast( srcImage ), static_cast( srcImageLayout ), static_cast( dstImage ), static_cast( dstImageLayout ), regions.size(), reinterpret_cast( regions.data() ), static_cast( filter ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::copyBufferToImage( VULKAN_HPP_NAMESPACE::Buffer srcBuffer, VULKAN_HPP_NAMESPACE::Image dstImage, VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout, uint32_t regionCount, const VULKAN_HPP_NAMESPACE::BufferImageCopy * pRegions, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdCopyBufferToImage( static_cast( m_commandBuffer ), static_cast( srcBuffer ), static_cast( dstImage ), static_cast( dstImageLayout ), regionCount, reinterpret_cast( pRegions ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::copyBufferToImage( VULKAN_HPP_NAMESPACE::Buffer srcBuffer, VULKAN_HPP_NAMESPACE::Image dstImage, VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout, VULKAN_HPP_NAMESPACE::ArrayProxy const & regions, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdCopyBufferToImage && "Function requires " ); # endif d.vkCmdCopyBufferToImage( m_commandBuffer, static_cast( srcBuffer ), static_cast( dstImage ), static_cast( dstImageLayout ), regions.size(), reinterpret_cast( regions.data() ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::copyImageToBuffer( VULKAN_HPP_NAMESPACE::Image srcImage, VULKAN_HPP_NAMESPACE::ImageLayout srcImageLayout, VULKAN_HPP_NAMESPACE::Buffer dstBuffer, uint32_t regionCount, const VULKAN_HPP_NAMESPACE::BufferImageCopy * pRegions, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdCopyImageToBuffer( static_cast( m_commandBuffer ), static_cast( srcImage ), static_cast( srcImageLayout ), static_cast( dstBuffer ), regionCount, reinterpret_cast( pRegions ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::copyImageToBuffer( VULKAN_HPP_NAMESPACE::Image srcImage, VULKAN_HPP_NAMESPACE::ImageLayout srcImageLayout, VULKAN_HPP_NAMESPACE::Buffer dstBuffer, VULKAN_HPP_NAMESPACE::ArrayProxy const & regions, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdCopyImageToBuffer && "Function requires " ); # endif d.vkCmdCopyImageToBuffer( m_commandBuffer, static_cast( srcImage ), static_cast( srcImageLayout ), static_cast( dstBuffer ), regions.size(), reinterpret_cast( regions.data() ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::updateBuffer( VULKAN_HPP_NAMESPACE::Buffer dstBuffer, VULKAN_HPP_NAMESPACE::DeviceSize dstOffset, VULKAN_HPP_NAMESPACE::DeviceSize dataSize, const void * pData, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdUpdateBuffer( static_cast( m_commandBuffer ), static_cast( dstBuffer ), static_cast( dstOffset ), static_cast( dataSize ), pData ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::updateBuffer( VULKAN_HPP_NAMESPACE::Buffer dstBuffer, VULKAN_HPP_NAMESPACE::DeviceSize dstOffset, VULKAN_HPP_NAMESPACE::ArrayProxy const & data, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdUpdateBuffer && "Function requires " ); # endif d.vkCmdUpdateBuffer( m_commandBuffer, static_cast( dstBuffer ), static_cast( dstOffset ), data.size() * sizeof( DataType ), reinterpret_cast( data.data() ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::fillBuffer( VULKAN_HPP_NAMESPACE::Buffer dstBuffer, VULKAN_HPP_NAMESPACE::DeviceSize dstOffset, VULKAN_HPP_NAMESPACE::DeviceSize size, uint32_t data, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdFillBuffer( static_cast( m_commandBuffer ), static_cast( dstBuffer ), static_cast( dstOffset ), static_cast( size ), data ); } template VULKAN_HPP_INLINE void CommandBuffer::clearColorImage( VULKAN_HPP_NAMESPACE::Image image, VULKAN_HPP_NAMESPACE::ImageLayout imageLayout, const VULKAN_HPP_NAMESPACE::ClearColorValue * pColor, uint32_t rangeCount, const VULKAN_HPP_NAMESPACE::ImageSubresourceRange * pRanges, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdClearColorImage( static_cast( m_commandBuffer ), static_cast( image ), static_cast( imageLayout ), reinterpret_cast( pColor ), rangeCount, reinterpret_cast( pRanges ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::clearColorImage( VULKAN_HPP_NAMESPACE::Image image, VULKAN_HPP_NAMESPACE::ImageLayout imageLayout, const VULKAN_HPP_NAMESPACE::ClearColorValue & color, VULKAN_HPP_NAMESPACE::ArrayProxy const & ranges, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdClearColorImage && "Function requires " ); # endif d.vkCmdClearColorImage( m_commandBuffer, static_cast( image ), static_cast( imageLayout ), reinterpret_cast( &color ), ranges.size(), reinterpret_cast( ranges.data() ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::clearDepthStencilImage( VULKAN_HPP_NAMESPACE::Image image, VULKAN_HPP_NAMESPACE::ImageLayout imageLayout, const VULKAN_HPP_NAMESPACE::ClearDepthStencilValue * pDepthStencil, uint32_t rangeCount, const VULKAN_HPP_NAMESPACE::ImageSubresourceRange * pRanges, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdClearDepthStencilImage( static_cast( m_commandBuffer ), static_cast( image ), static_cast( imageLayout ), reinterpret_cast( pDepthStencil ), rangeCount, reinterpret_cast( pRanges ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::clearDepthStencilImage( VULKAN_HPP_NAMESPACE::Image image, VULKAN_HPP_NAMESPACE::ImageLayout imageLayout, const VULKAN_HPP_NAMESPACE::ClearDepthStencilValue & depthStencil, VULKAN_HPP_NAMESPACE::ArrayProxy const & ranges, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdClearDepthStencilImage && "Function requires " ); # endif d.vkCmdClearDepthStencilImage( m_commandBuffer, static_cast( image ), static_cast( imageLayout ), reinterpret_cast( &depthStencil ), ranges.size(), reinterpret_cast( ranges.data() ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::clearAttachments( uint32_t attachmentCount, const VULKAN_HPP_NAMESPACE::ClearAttachment * pAttachments, uint32_t rectCount, const VULKAN_HPP_NAMESPACE::ClearRect * pRects, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdClearAttachments( static_cast( m_commandBuffer ), attachmentCount, reinterpret_cast( pAttachments ), rectCount, reinterpret_cast( pRects ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::clearAttachments( VULKAN_HPP_NAMESPACE::ArrayProxy const & attachments, VULKAN_HPP_NAMESPACE::ArrayProxy const & rects, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdClearAttachments && "Function requires " ); # endif d.vkCmdClearAttachments( m_commandBuffer, attachments.size(), reinterpret_cast( attachments.data() ), rects.size(), reinterpret_cast( rects.data() ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::resolveImage( VULKAN_HPP_NAMESPACE::Image srcImage, VULKAN_HPP_NAMESPACE::ImageLayout srcImageLayout, VULKAN_HPP_NAMESPACE::Image dstImage, VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout, uint32_t regionCount, const VULKAN_HPP_NAMESPACE::ImageResolve * pRegions, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdResolveImage( static_cast( m_commandBuffer ), static_cast( srcImage ), static_cast( srcImageLayout ), static_cast( dstImage ), static_cast( dstImageLayout ), regionCount, reinterpret_cast( pRegions ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::resolveImage( VULKAN_HPP_NAMESPACE::Image srcImage, VULKAN_HPP_NAMESPACE::ImageLayout srcImageLayout, VULKAN_HPP_NAMESPACE::Image dstImage, VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout, VULKAN_HPP_NAMESPACE::ArrayProxy const & regions, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdResolveImage && "Function requires " ); # endif d.vkCmdResolveImage( m_commandBuffer, static_cast( srcImage ), static_cast( srcImageLayout ), static_cast( dstImage ), static_cast( dstImageLayout ), regions.size(), reinterpret_cast( regions.data() ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::setEvent( VULKAN_HPP_NAMESPACE::Event event, VULKAN_HPP_NAMESPACE::PipelineStageFlags stageMask, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetEvent( static_cast( m_commandBuffer ), static_cast( event ), static_cast( stageMask ) ); } template VULKAN_HPP_INLINE void CommandBuffer::resetEvent( VULKAN_HPP_NAMESPACE::Event event, VULKAN_HPP_NAMESPACE::PipelineStageFlags stageMask, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdResetEvent( static_cast( m_commandBuffer ), static_cast( event ), static_cast( stageMask ) ); } template VULKAN_HPP_INLINE void CommandBuffer::waitEvents( uint32_t eventCount, const VULKAN_HPP_NAMESPACE::Event * pEvents, VULKAN_HPP_NAMESPACE::PipelineStageFlags srcStageMask, VULKAN_HPP_NAMESPACE::PipelineStageFlags dstStageMask, uint32_t memoryBarrierCount, const VULKAN_HPP_NAMESPACE::MemoryBarrier * pMemoryBarriers, uint32_t bufferMemoryBarrierCount, const VULKAN_HPP_NAMESPACE::BufferMemoryBarrier * pBufferMemoryBarriers, uint32_t imageMemoryBarrierCount, const VULKAN_HPP_NAMESPACE::ImageMemoryBarrier * pImageMemoryBarriers, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdWaitEvents( static_cast( m_commandBuffer ), eventCount, reinterpret_cast( pEvents ), static_cast( srcStageMask ), static_cast( dstStageMask ), memoryBarrierCount, reinterpret_cast( pMemoryBarriers ), bufferMemoryBarrierCount, reinterpret_cast( pBufferMemoryBarriers ), imageMemoryBarrierCount, reinterpret_cast( pImageMemoryBarriers ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::waitEvents( VULKAN_HPP_NAMESPACE::ArrayProxy const & events, VULKAN_HPP_NAMESPACE::PipelineStageFlags srcStageMask, VULKAN_HPP_NAMESPACE::PipelineStageFlags dstStageMask, VULKAN_HPP_NAMESPACE::ArrayProxy const & memoryBarriers, VULKAN_HPP_NAMESPACE::ArrayProxy const & bufferMemoryBarriers, VULKAN_HPP_NAMESPACE::ArrayProxy const & imageMemoryBarriers, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdWaitEvents && "Function requires " ); # endif d.vkCmdWaitEvents( m_commandBuffer, events.size(), reinterpret_cast( events.data() ), static_cast( srcStageMask ), static_cast( dstStageMask ), memoryBarriers.size(), reinterpret_cast( memoryBarriers.data() ), bufferMemoryBarriers.size(), reinterpret_cast( bufferMemoryBarriers.data() ), imageMemoryBarriers.size(), reinterpret_cast( imageMemoryBarriers.data() ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::pipelineBarrier( VULKAN_HPP_NAMESPACE::PipelineStageFlags srcStageMask, VULKAN_HPP_NAMESPACE::PipelineStageFlags dstStageMask, VULKAN_HPP_NAMESPACE::DependencyFlags dependencyFlags, uint32_t memoryBarrierCount, const VULKAN_HPP_NAMESPACE::MemoryBarrier * pMemoryBarriers, uint32_t bufferMemoryBarrierCount, const VULKAN_HPP_NAMESPACE::BufferMemoryBarrier * pBufferMemoryBarriers, uint32_t imageMemoryBarrierCount, const VULKAN_HPP_NAMESPACE::ImageMemoryBarrier * pImageMemoryBarriers, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdPipelineBarrier( static_cast( m_commandBuffer ), static_cast( srcStageMask ), static_cast( dstStageMask ), static_cast( dependencyFlags ), memoryBarrierCount, reinterpret_cast( pMemoryBarriers ), bufferMemoryBarrierCount, reinterpret_cast( pBufferMemoryBarriers ), imageMemoryBarrierCount, reinterpret_cast( pImageMemoryBarriers ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::pipelineBarrier( VULKAN_HPP_NAMESPACE::PipelineStageFlags srcStageMask, VULKAN_HPP_NAMESPACE::PipelineStageFlags dstStageMask, VULKAN_HPP_NAMESPACE::DependencyFlags dependencyFlags, VULKAN_HPP_NAMESPACE::ArrayProxy const & memoryBarriers, VULKAN_HPP_NAMESPACE::ArrayProxy const & bufferMemoryBarriers, VULKAN_HPP_NAMESPACE::ArrayProxy const & imageMemoryBarriers, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdPipelineBarrier && "Function requires " ); # endif d.vkCmdPipelineBarrier( m_commandBuffer, static_cast( srcStageMask ), static_cast( dstStageMask ), static_cast( dependencyFlags ), memoryBarriers.size(), reinterpret_cast( memoryBarriers.data() ), bufferMemoryBarriers.size(), reinterpret_cast( bufferMemoryBarriers.data() ), imageMemoryBarriers.size(), reinterpret_cast( imageMemoryBarriers.data() ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::beginQuery( VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t query, VULKAN_HPP_NAMESPACE::QueryControlFlags flags, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdBeginQuery( static_cast( m_commandBuffer ), static_cast( queryPool ), query, static_cast( flags ) ); } template VULKAN_HPP_INLINE void CommandBuffer::endQuery( VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t query, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdEndQuery( static_cast( m_commandBuffer ), static_cast( queryPool ), query ); } template VULKAN_HPP_INLINE void CommandBuffer::resetQueryPool( VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdResetQueryPool( static_cast( m_commandBuffer ), static_cast( queryPool ), firstQuery, queryCount ); } template VULKAN_HPP_INLINE void CommandBuffer::writeTimestamp( VULKAN_HPP_NAMESPACE::PipelineStageFlagBits pipelineStage, VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t query, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdWriteTimestamp( static_cast( m_commandBuffer ), static_cast( pipelineStage ), static_cast( queryPool ), query ); } template VULKAN_HPP_INLINE void CommandBuffer::copyQueryPoolResults( VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, VULKAN_HPP_NAMESPACE::Buffer dstBuffer, VULKAN_HPP_NAMESPACE::DeviceSize dstOffset, VULKAN_HPP_NAMESPACE::DeviceSize stride, VULKAN_HPP_NAMESPACE::QueryResultFlags flags, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdCopyQueryPoolResults( static_cast( m_commandBuffer ), static_cast( queryPool ), firstQuery, queryCount, static_cast( dstBuffer ), static_cast( dstOffset ), static_cast( stride ), static_cast( flags ) ); } template VULKAN_HPP_INLINE void CommandBuffer::pushConstants( VULKAN_HPP_NAMESPACE::PipelineLayout layout, VULKAN_HPP_NAMESPACE::ShaderStageFlags stageFlags, uint32_t offset, uint32_t size, const void * pValues, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdPushConstants( static_cast( m_commandBuffer ), static_cast( layout ), static_cast( stageFlags ), offset, size, pValues ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::pushConstants( VULKAN_HPP_NAMESPACE::PipelineLayout layout, VULKAN_HPP_NAMESPACE::ShaderStageFlags stageFlags, uint32_t offset, VULKAN_HPP_NAMESPACE::ArrayProxy const & values, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdPushConstants && "Function requires " ); # endif d.vkCmdPushConstants( m_commandBuffer, static_cast( layout ), static_cast( stageFlags ), offset, values.size() * sizeof( ValuesType ), reinterpret_cast( values.data() ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::beginRenderPass( const VULKAN_HPP_NAMESPACE::RenderPassBeginInfo * pRenderPassBegin, VULKAN_HPP_NAMESPACE::SubpassContents contents, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdBeginRenderPass( static_cast( m_commandBuffer ), reinterpret_cast( pRenderPassBegin ), static_cast( contents ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::beginRenderPass( const VULKAN_HPP_NAMESPACE::RenderPassBeginInfo & renderPassBegin, VULKAN_HPP_NAMESPACE::SubpassContents contents, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdBeginRenderPass && "Function requires " ); # endif d.vkCmdBeginRenderPass( m_commandBuffer, reinterpret_cast( &renderPassBegin ), static_cast( contents ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::nextSubpass( VULKAN_HPP_NAMESPACE::SubpassContents contents, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdNextSubpass( static_cast( m_commandBuffer ), static_cast( contents ) ); } template VULKAN_HPP_INLINE void CommandBuffer::endRenderPass( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdEndRenderPass( static_cast( m_commandBuffer ) ); } template VULKAN_HPP_INLINE void CommandBuffer::executeCommands( uint32_t commandBufferCount, const VULKAN_HPP_NAMESPACE::CommandBuffer * pCommandBuffers, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdExecuteCommands( static_cast( m_commandBuffer ), commandBufferCount, reinterpret_cast( pCommandBuffers ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::executeCommands( VULKAN_HPP_NAMESPACE::ArrayProxy const & commandBuffers, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdExecuteCommands && "Function requires " ); # endif d.vkCmdExecuteCommands( m_commandBuffer, commandBuffers.size(), reinterpret_cast( commandBuffers.data() ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_VERSION_1_1 === template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result enumerateInstanceVersion( uint32_t * pApiVersion, Dispatch const & d ) VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkEnumerateInstanceVersion( pApiVersion ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type enumerateInstanceVersion( Dispatch const & d ) { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkEnumerateInstanceVersion && "Function requires " ); # endif uint32_t apiVersion; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkEnumerateInstanceVersion( &apiVersion ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::enumerateInstanceVersion" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( apiVersion ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::bindBufferMemory2( uint32_t bindInfoCount, const VULKAN_HPP_NAMESPACE::BindBufferMemoryInfo * pBindInfos, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkBindBufferMemory2( static_cast( m_device ), bindInfoCount, reinterpret_cast( pBindInfos ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type Device::bindBufferMemory2( VULKAN_HPP_NAMESPACE::ArrayProxy const & bindInfos, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkBindBufferMemory2 && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkBindBufferMemory2( m_device, bindInfos.size(), reinterpret_cast( bindInfos.data() ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::bindBufferMemory2" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::bindImageMemory2( uint32_t bindInfoCount, const VULKAN_HPP_NAMESPACE::BindImageMemoryInfo * pBindInfos, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkBindImageMemory2( static_cast( m_device ), bindInfoCount, reinterpret_cast( pBindInfos ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type Device::bindImageMemory2( VULKAN_HPP_NAMESPACE::ArrayProxy const & bindInfos, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkBindImageMemory2 && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkBindImageMemory2( m_device, bindInfos.size(), reinterpret_cast( bindInfos.data() ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::bindImageMemory2" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::getGroupPeerMemoryFeatures( uint32_t heapIndex, uint32_t localDeviceIndex, uint32_t remoteDeviceIndex, VULKAN_HPP_NAMESPACE::PeerMemoryFeatureFlags * pPeerMemoryFeatures, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkGetDeviceGroupPeerMemoryFeatures( static_cast( m_device ), heapIndex, localDeviceIndex, remoteDeviceIndex, reinterpret_cast( pPeerMemoryFeatures ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::PeerMemoryFeatureFlags Device::getGroupPeerMemoryFeatures( uint32_t heapIndex, uint32_t localDeviceIndex, uint32_t remoteDeviceIndex, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetDeviceGroupPeerMemoryFeatures && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::PeerMemoryFeatureFlags peerMemoryFeatures; d.vkGetDeviceGroupPeerMemoryFeatures( m_device, heapIndex, localDeviceIndex, remoteDeviceIndex, reinterpret_cast( &peerMemoryFeatures ) ); return peerMemoryFeatures; } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::setDeviceMask( uint32_t deviceMask, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetDeviceMask( static_cast( m_commandBuffer ), deviceMask ); } template VULKAN_HPP_INLINE void CommandBuffer::dispatchBase( uint32_t baseGroupX, uint32_t baseGroupY, uint32_t baseGroupZ, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdDispatchBase( static_cast( m_commandBuffer ), baseGroupX, baseGroupY, baseGroupZ, groupCountX, groupCountY, groupCountZ ); } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Instance::enumeratePhysicalDeviceGroups( uint32_t * pPhysicalDeviceGroupCount, VULKAN_HPP_NAMESPACE::PhysicalDeviceGroupProperties * pPhysicalDeviceGroupProperties, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkEnumeratePhysicalDeviceGroups( static_cast( m_instance ), pPhysicalDeviceGroupCount, reinterpret_cast( pPhysicalDeviceGroupProperties ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Instance::enumeratePhysicalDeviceGroups( Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkEnumeratePhysicalDeviceGroups && "Function requires or " ); # endif std::vector physicalDeviceGroupProperties; uint32_t physicalDeviceGroupCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkEnumeratePhysicalDeviceGroups( m_instance, &physicalDeviceGroupCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && physicalDeviceGroupCount ) { physicalDeviceGroupProperties.resize( physicalDeviceGroupCount ); result = static_cast( d.vkEnumeratePhysicalDeviceGroups( m_instance, &physicalDeviceGroupCount, reinterpret_cast( physicalDeviceGroupProperties.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::enumeratePhysicalDeviceGroups" ); VULKAN_HPP_ASSERT( physicalDeviceGroupCount <= physicalDeviceGroupProperties.size() ); if ( physicalDeviceGroupCount < physicalDeviceGroupProperties.size() ) { physicalDeviceGroupProperties.resize( physicalDeviceGroupCount ); } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( physicalDeviceGroupProperties ) ); } template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Instance::enumeratePhysicalDeviceGroups( PhysicalDeviceGroupPropertiesAllocator & physicalDeviceGroupPropertiesAllocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkEnumeratePhysicalDeviceGroups && "Function requires or " ); # endif std::vector physicalDeviceGroupProperties( physicalDeviceGroupPropertiesAllocator ); uint32_t physicalDeviceGroupCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkEnumeratePhysicalDeviceGroups( m_instance, &physicalDeviceGroupCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && physicalDeviceGroupCount ) { physicalDeviceGroupProperties.resize( physicalDeviceGroupCount ); result = static_cast( d.vkEnumeratePhysicalDeviceGroups( m_instance, &physicalDeviceGroupCount, reinterpret_cast( physicalDeviceGroupProperties.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::enumeratePhysicalDeviceGroups" ); VULKAN_HPP_ASSERT( physicalDeviceGroupCount <= physicalDeviceGroupProperties.size() ); if ( physicalDeviceGroupCount < physicalDeviceGroupProperties.size() ) { physicalDeviceGroupProperties.resize( physicalDeviceGroupCount ); } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( physicalDeviceGroupProperties ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::getImageMemoryRequirements2( const VULKAN_HPP_NAMESPACE::ImageMemoryRequirementsInfo2 * pInfo, VULKAN_HPP_NAMESPACE::MemoryRequirements2 * pMemoryRequirements, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkGetImageMemoryRequirements2( static_cast( m_device ), reinterpret_cast( pInfo ), reinterpret_cast( pMemoryRequirements ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MemoryRequirements2 Device::getImageMemoryRequirements2( const VULKAN_HPP_NAMESPACE::ImageMemoryRequirementsInfo2 & info, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetImageMemoryRequirements2 && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::MemoryRequirements2 memoryRequirements; d.vkGetImageMemoryRequirements2( m_device, reinterpret_cast( &info ), reinterpret_cast( &memoryRequirements ) ); return memoryRequirements; } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::StructureChain Device::getImageMemoryRequirements2( const VULKAN_HPP_NAMESPACE::ImageMemoryRequirementsInfo2 & info, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetImageMemoryRequirements2 && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::StructureChain structureChain; VULKAN_HPP_NAMESPACE::MemoryRequirements2 & memoryRequirements = structureChain.template get(); d.vkGetImageMemoryRequirements2( m_device, reinterpret_cast( &info ), reinterpret_cast( &memoryRequirements ) ); return structureChain; } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::getBufferMemoryRequirements2( const VULKAN_HPP_NAMESPACE::BufferMemoryRequirementsInfo2 * pInfo, VULKAN_HPP_NAMESPACE::MemoryRequirements2 * pMemoryRequirements, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkGetBufferMemoryRequirements2( static_cast( m_device ), reinterpret_cast( pInfo ), reinterpret_cast( pMemoryRequirements ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MemoryRequirements2 Device::getBufferMemoryRequirements2( const VULKAN_HPP_NAMESPACE::BufferMemoryRequirementsInfo2 & info, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetBufferMemoryRequirements2 && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::MemoryRequirements2 memoryRequirements; d.vkGetBufferMemoryRequirements2( m_device, reinterpret_cast( &info ), reinterpret_cast( &memoryRequirements ) ); return memoryRequirements; } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::StructureChain Device::getBufferMemoryRequirements2( const VULKAN_HPP_NAMESPACE::BufferMemoryRequirementsInfo2 & info, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetBufferMemoryRequirements2 && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::StructureChain structureChain; VULKAN_HPP_NAMESPACE::MemoryRequirements2 & memoryRequirements = structureChain.template get(); d.vkGetBufferMemoryRequirements2( m_device, reinterpret_cast( &info ), reinterpret_cast( &memoryRequirements ) ); return structureChain; } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::getImageSparseMemoryRequirements2( const VULKAN_HPP_NAMESPACE::ImageSparseMemoryRequirementsInfo2 * pInfo, uint32_t * pSparseMemoryRequirementCount, VULKAN_HPP_NAMESPACE::SparseImageMemoryRequirements2 * pSparseMemoryRequirements, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkGetImageSparseMemoryRequirements2( static_cast( m_device ), reinterpret_cast( pInfo ), pSparseMemoryRequirementCount, reinterpret_cast( pSparseMemoryRequirements ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector Device::getImageSparseMemoryRequirements2( const VULKAN_HPP_NAMESPACE::ImageSparseMemoryRequirementsInfo2 & info, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetImageSparseMemoryRequirements2 && "Function requires or " ); # endif std::vector sparseMemoryRequirements; uint32_t sparseMemoryRequirementCount; d.vkGetImageSparseMemoryRequirements2( m_device, reinterpret_cast( &info ), &sparseMemoryRequirementCount, nullptr ); sparseMemoryRequirements.resize( sparseMemoryRequirementCount ); d.vkGetImageSparseMemoryRequirements2( m_device, reinterpret_cast( &info ), &sparseMemoryRequirementCount, reinterpret_cast( sparseMemoryRequirements.data() ) ); VULKAN_HPP_ASSERT( sparseMemoryRequirementCount <= sparseMemoryRequirements.size() ); if ( sparseMemoryRequirementCount < sparseMemoryRequirements.size() ) { sparseMemoryRequirements.resize( sparseMemoryRequirementCount ); } return sparseMemoryRequirements; } template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector Device::getImageSparseMemoryRequirements2( const VULKAN_HPP_NAMESPACE::ImageSparseMemoryRequirementsInfo2 & info, SparseImageMemoryRequirements2Allocator & sparseImageMemoryRequirements2Allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetImageSparseMemoryRequirements2 && "Function requires or " ); # endif std::vector sparseMemoryRequirements( sparseImageMemoryRequirements2Allocator ); uint32_t sparseMemoryRequirementCount; d.vkGetImageSparseMemoryRequirements2( m_device, reinterpret_cast( &info ), &sparseMemoryRequirementCount, nullptr ); sparseMemoryRequirements.resize( sparseMemoryRequirementCount ); d.vkGetImageSparseMemoryRequirements2( m_device, reinterpret_cast( &info ), &sparseMemoryRequirementCount, reinterpret_cast( sparseMemoryRequirements.data() ) ); VULKAN_HPP_ASSERT( sparseMemoryRequirementCount <= sparseMemoryRequirements.size() ); if ( sparseMemoryRequirementCount < sparseMemoryRequirements.size() ) { sparseMemoryRequirements.resize( sparseMemoryRequirementCount ); } return sparseMemoryRequirements; } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void PhysicalDevice::getFeatures2( VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures2 * pFeatures, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkGetPhysicalDeviceFeatures2( static_cast( m_physicalDevice ), reinterpret_cast( pFeatures ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures2 PhysicalDevice::getFeatures2( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceFeatures2 && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures2 features; d.vkGetPhysicalDeviceFeatures2( m_physicalDevice, reinterpret_cast( &features ) ); return features; } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::StructureChain PhysicalDevice::getFeatures2( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceFeatures2 && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::StructureChain structureChain; VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures2 & features = structureChain.template get(); d.vkGetPhysicalDeviceFeatures2( m_physicalDevice, reinterpret_cast( &features ) ); return structureChain; } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void PhysicalDevice::getProperties2( VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties2 * pProperties, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkGetPhysicalDeviceProperties2( static_cast( m_physicalDevice ), reinterpret_cast( pProperties ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties2 PhysicalDevice::getProperties2( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceProperties2 && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties2 properties; d.vkGetPhysicalDeviceProperties2( m_physicalDevice, reinterpret_cast( &properties ) ); return properties; } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::StructureChain PhysicalDevice::getProperties2( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceProperties2 && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::StructureChain structureChain; VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties2 & properties = structureChain.template get(); d.vkGetPhysicalDeviceProperties2( m_physicalDevice, reinterpret_cast( &properties ) ); return structureChain; } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void PhysicalDevice::getFormatProperties2( VULKAN_HPP_NAMESPACE::Format format, VULKAN_HPP_NAMESPACE::FormatProperties2 * pFormatProperties, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkGetPhysicalDeviceFormatProperties2( static_cast( m_physicalDevice ), static_cast( format ), reinterpret_cast( pFormatProperties ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::FormatProperties2 PhysicalDevice::getFormatProperties2( VULKAN_HPP_NAMESPACE::Format format, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceFormatProperties2 && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::FormatProperties2 formatProperties; d.vkGetPhysicalDeviceFormatProperties2( m_physicalDevice, static_cast( format ), reinterpret_cast( &formatProperties ) ); return formatProperties; } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::StructureChain PhysicalDevice::getFormatProperties2( VULKAN_HPP_NAMESPACE::Format format, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceFormatProperties2 && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::StructureChain structureChain; VULKAN_HPP_NAMESPACE::FormatProperties2 & formatProperties = structureChain.template get(); d.vkGetPhysicalDeviceFormatProperties2( m_physicalDevice, static_cast( format ), reinterpret_cast( &formatProperties ) ); return structureChain; } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result PhysicalDevice::getImageFormatProperties2( const VULKAN_HPP_NAMESPACE::PhysicalDeviceImageFormatInfo2 * pImageFormatInfo, VULKAN_HPP_NAMESPACE::ImageFormatProperties2 * pImageFormatProperties, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetPhysicalDeviceImageFormatProperties2( static_cast( m_physicalDevice ), reinterpret_cast( pImageFormatInfo ), reinterpret_cast( pImageFormatProperties ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type PhysicalDevice::getImageFormatProperties2( const VULKAN_HPP_NAMESPACE::PhysicalDeviceImageFormatInfo2 & imageFormatInfo, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceImageFormatProperties2 && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::ImageFormatProperties2 imageFormatProperties; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetPhysicalDeviceImageFormatProperties2( m_physicalDevice, reinterpret_cast( &imageFormatInfo ), reinterpret_cast( &imageFormatProperties ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getImageFormatProperties2" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( imageFormatProperties ) ); } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getImageFormatProperties2( const VULKAN_HPP_NAMESPACE::PhysicalDeviceImageFormatInfo2 & imageFormatInfo, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceImageFormatProperties2 && "Function requires or " ); # endif StructureChain structureChain; VULKAN_HPP_NAMESPACE::ImageFormatProperties2 & imageFormatProperties = structureChain.template get(); VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetPhysicalDeviceImageFormatProperties2( m_physicalDevice, reinterpret_cast( &imageFormatInfo ), reinterpret_cast( &imageFormatProperties ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getImageFormatProperties2" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( structureChain ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void PhysicalDevice::getQueueFamilyProperties2( uint32_t * pQueueFamilyPropertyCount, VULKAN_HPP_NAMESPACE::QueueFamilyProperties2 * pQueueFamilyProperties, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkGetPhysicalDeviceQueueFamilyProperties2( static_cast( m_physicalDevice ), pQueueFamilyPropertyCount, reinterpret_cast( pQueueFamilyProperties ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template < typename QueueFamilyProperties2Allocator, typename Dispatch, typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector PhysicalDevice::getQueueFamilyProperties2( Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceQueueFamilyProperties2 && "Function requires or " ); # endif std::vector queueFamilyProperties; uint32_t queueFamilyPropertyCount; d.vkGetPhysicalDeviceQueueFamilyProperties2( m_physicalDevice, &queueFamilyPropertyCount, nullptr ); queueFamilyProperties.resize( queueFamilyPropertyCount ); d.vkGetPhysicalDeviceQueueFamilyProperties2( m_physicalDevice, &queueFamilyPropertyCount, reinterpret_cast( queueFamilyProperties.data() ) ); VULKAN_HPP_ASSERT( queueFamilyPropertyCount <= queueFamilyProperties.size() ); if ( queueFamilyPropertyCount < queueFamilyProperties.size() ) { queueFamilyProperties.resize( queueFamilyPropertyCount ); } return queueFamilyProperties; } template < typename QueueFamilyProperties2Allocator, typename Dispatch, typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector PhysicalDevice::getQueueFamilyProperties2( QueueFamilyProperties2Allocator & queueFamilyProperties2Allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceQueueFamilyProperties2 && "Function requires or " ); # endif std::vector queueFamilyProperties( queueFamilyProperties2Allocator ); uint32_t queueFamilyPropertyCount; d.vkGetPhysicalDeviceQueueFamilyProperties2( m_physicalDevice, &queueFamilyPropertyCount, nullptr ); queueFamilyProperties.resize( queueFamilyPropertyCount ); d.vkGetPhysicalDeviceQueueFamilyProperties2( m_physicalDevice, &queueFamilyPropertyCount, reinterpret_cast( queueFamilyProperties.data() ) ); VULKAN_HPP_ASSERT( queueFamilyPropertyCount <= queueFamilyProperties.size() ); if ( queueFamilyPropertyCount < queueFamilyProperties.size() ) { queueFamilyProperties.resize( queueFamilyPropertyCount ); } return queueFamilyProperties; } template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector PhysicalDevice::getQueueFamilyProperties2( Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceQueueFamilyProperties2 && "Function requires or " ); # endif std::vector structureChains; std::vector queueFamilyProperties; uint32_t queueFamilyPropertyCount; d.vkGetPhysicalDeviceQueueFamilyProperties2( m_physicalDevice, &queueFamilyPropertyCount, nullptr ); structureChains.resize( queueFamilyPropertyCount ); queueFamilyProperties.resize( queueFamilyPropertyCount ); for ( uint32_t i = 0; i < queueFamilyPropertyCount; i++ ) { queueFamilyProperties[i].pNext = structureChains[i].template get().pNext; } d.vkGetPhysicalDeviceQueueFamilyProperties2( m_physicalDevice, &queueFamilyPropertyCount, reinterpret_cast( queueFamilyProperties.data() ) ); VULKAN_HPP_ASSERT( queueFamilyPropertyCount <= queueFamilyProperties.size() ); if ( queueFamilyPropertyCount < queueFamilyProperties.size() ) { structureChains.resize( queueFamilyPropertyCount ); } for ( uint32_t i = 0; i < queueFamilyPropertyCount; i++ ) { structureChains[i].template get() = queueFamilyProperties[i]; } return structureChains; } template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector PhysicalDevice::getQueueFamilyProperties2( StructureChainAllocator & structureChainAllocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceQueueFamilyProperties2 && "Function requires or " ); # endif std::vector structureChains( structureChainAllocator ); std::vector queueFamilyProperties; uint32_t queueFamilyPropertyCount; d.vkGetPhysicalDeviceQueueFamilyProperties2( m_physicalDevice, &queueFamilyPropertyCount, nullptr ); structureChains.resize( queueFamilyPropertyCount ); queueFamilyProperties.resize( queueFamilyPropertyCount ); for ( uint32_t i = 0; i < queueFamilyPropertyCount; i++ ) { queueFamilyProperties[i].pNext = structureChains[i].template get().pNext; } d.vkGetPhysicalDeviceQueueFamilyProperties2( m_physicalDevice, &queueFamilyPropertyCount, reinterpret_cast( queueFamilyProperties.data() ) ); VULKAN_HPP_ASSERT( queueFamilyPropertyCount <= queueFamilyProperties.size() ); if ( queueFamilyPropertyCount < queueFamilyProperties.size() ) { structureChains.resize( queueFamilyPropertyCount ); } for ( uint32_t i = 0; i < queueFamilyPropertyCount; i++ ) { structureChains[i].template get() = queueFamilyProperties[i]; } return structureChains; } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void PhysicalDevice::getMemoryProperties2( VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties2 * pMemoryProperties, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkGetPhysicalDeviceMemoryProperties2( static_cast( m_physicalDevice ), reinterpret_cast( pMemoryProperties ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties2 PhysicalDevice::getMemoryProperties2( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceMemoryProperties2 && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties2 memoryProperties; d.vkGetPhysicalDeviceMemoryProperties2( m_physicalDevice, reinterpret_cast( &memoryProperties ) ); return memoryProperties; } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::StructureChain PhysicalDevice::getMemoryProperties2( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceMemoryProperties2 && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::StructureChain structureChain; VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties2 & memoryProperties = structureChain.template get(); d.vkGetPhysicalDeviceMemoryProperties2( m_physicalDevice, reinterpret_cast( &memoryProperties ) ); return structureChain; } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void PhysicalDevice::getSparseImageFormatProperties2( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSparseImageFormatInfo2 * pFormatInfo, uint32_t * pPropertyCount, VULKAN_HPP_NAMESPACE::SparseImageFormatProperties2 * pProperties, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkGetPhysicalDeviceSparseImageFormatProperties2( static_cast( m_physicalDevice ), reinterpret_cast( pFormatInfo ), pPropertyCount, reinterpret_cast( pProperties ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template < typename SparseImageFormatProperties2Allocator, typename Dispatch, typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector PhysicalDevice::getSparseImageFormatProperties2( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSparseImageFormatInfo2 & formatInfo, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceSparseImageFormatProperties2 && "Function requires or " ); # endif std::vector properties; uint32_t propertyCount; d.vkGetPhysicalDeviceSparseImageFormatProperties2( m_physicalDevice, reinterpret_cast( &formatInfo ), &propertyCount, nullptr ); properties.resize( propertyCount ); d.vkGetPhysicalDeviceSparseImageFormatProperties2( m_physicalDevice, reinterpret_cast( &formatInfo ), &propertyCount, reinterpret_cast( properties.data() ) ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } return properties; } template < typename SparseImageFormatProperties2Allocator, typename Dispatch, typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector PhysicalDevice::getSparseImageFormatProperties2( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSparseImageFormatInfo2 & formatInfo, SparseImageFormatProperties2Allocator & sparseImageFormatProperties2Allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceSparseImageFormatProperties2 && "Function requires or " ); # endif std::vector properties( sparseImageFormatProperties2Allocator ); uint32_t propertyCount; d.vkGetPhysicalDeviceSparseImageFormatProperties2( m_physicalDevice, reinterpret_cast( &formatInfo ), &propertyCount, nullptr ); properties.resize( propertyCount ); d.vkGetPhysicalDeviceSparseImageFormatProperties2( m_physicalDevice, reinterpret_cast( &formatInfo ), &propertyCount, reinterpret_cast( properties.data() ) ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } return properties; } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::trimCommandPool( VULKAN_HPP_NAMESPACE::CommandPool commandPool, VULKAN_HPP_NAMESPACE::CommandPoolTrimFlags flags, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkTrimCommandPool( static_cast( m_device ), static_cast( commandPool ), static_cast( flags ) ); } template VULKAN_HPP_INLINE void Device::getQueue2( const VULKAN_HPP_NAMESPACE::DeviceQueueInfo2 * pQueueInfo, VULKAN_HPP_NAMESPACE::Queue * pQueue, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkGetDeviceQueue2( static_cast( m_device ), reinterpret_cast( pQueueInfo ), reinterpret_cast( pQueue ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Queue Device::getQueue2( const VULKAN_HPP_NAMESPACE::DeviceQueueInfo2 & queueInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetDeviceQueue2 && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Queue queue; d.vkGetDeviceQueue2( m_device, reinterpret_cast( &queueInfo ), reinterpret_cast( &queue ) ); return queue; } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::createSamplerYcbcrConversion( const VULKAN_HPP_NAMESPACE::SamplerYcbcrConversionCreateInfo * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion * pYcbcrConversion, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkCreateSamplerYcbcrConversion( static_cast( m_device ), reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pYcbcrConversion ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::createSamplerYcbcrConversion( const VULKAN_HPP_NAMESPACE::SamplerYcbcrConversionCreateInfo & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateSamplerYcbcrConversion && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion ycbcrConversion; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateSamplerYcbcrConversion( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &ycbcrConversion ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createSamplerYcbcrConversion" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( ycbcrConversion ) ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::createSamplerYcbcrConversionUnique( const VULKAN_HPP_NAMESPACE::SamplerYcbcrConversionCreateInfo & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateSamplerYcbcrConversion && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion ycbcrConversion; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateSamplerYcbcrConversion( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &ycbcrConversion ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createSamplerYcbcrConversionUnique" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, UniqueHandle( ycbcrConversion, detail::ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::destroySamplerYcbcrConversion( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion ycbcrConversion, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDestroySamplerYcbcrConversion( static_cast( m_device ), static_cast( ycbcrConversion ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::destroySamplerYcbcrConversion( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion ycbcrConversion, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDestroySamplerYcbcrConversion && "Function requires or " ); # endif d.vkDestroySamplerYcbcrConversion( m_device, static_cast( ycbcrConversion ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion ycbcrConversion, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDestroySamplerYcbcrConversion( static_cast( m_device ), static_cast( ycbcrConversion ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion ycbcrConversion, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDestroySamplerYcbcrConversion && "Function requires or " ); # endif d.vkDestroySamplerYcbcrConversion( m_device, static_cast( ycbcrConversion ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::createDescriptorUpdateTemplate( const VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateCreateInfo * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate * pDescriptorUpdateTemplate, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkCreateDescriptorUpdateTemplate( static_cast( m_device ), reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pDescriptorUpdateTemplate ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::createDescriptorUpdateTemplate( const VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateCreateInfo & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateDescriptorUpdateTemplate && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateDescriptorUpdateTemplate( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &descriptorUpdateTemplate ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createDescriptorUpdateTemplate" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( descriptorUpdateTemplate ) ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::createDescriptorUpdateTemplateUnique( const VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateCreateInfo & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateDescriptorUpdateTemplate && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateDescriptorUpdateTemplate( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &descriptorUpdateTemplate ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createDescriptorUpdateTemplateUnique" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, UniqueHandle( descriptorUpdateTemplate, detail::ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::destroyDescriptorUpdateTemplate( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDestroyDescriptorUpdateTemplate( static_cast( m_device ), static_cast( descriptorUpdateTemplate ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::destroyDescriptorUpdateTemplate( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDestroyDescriptorUpdateTemplate && "Function requires or " ); # endif d.vkDestroyDescriptorUpdateTemplate( m_device, static_cast( descriptorUpdateTemplate ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDestroyDescriptorUpdateTemplate( static_cast( m_device ), static_cast( descriptorUpdateTemplate ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDestroyDescriptorUpdateTemplate && "Function requires or " ); # endif d.vkDestroyDescriptorUpdateTemplate( m_device, static_cast( descriptorUpdateTemplate ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::updateDescriptorSetWithTemplate( VULKAN_HPP_NAMESPACE::DescriptorSet descriptorSet, VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate, const void * pData, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkUpdateDescriptorSetWithTemplate( static_cast( m_device ), static_cast( descriptorSet ), static_cast( descriptorUpdateTemplate ), pData ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::updateDescriptorSetWithTemplate( VULKAN_HPP_NAMESPACE::DescriptorSet descriptorSet, VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate, DataType const & data, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkUpdateDescriptorSetWithTemplate && "Function requires or " ); # endif d.vkUpdateDescriptorSetWithTemplate( m_device, static_cast( descriptorSet ), static_cast( descriptorUpdateTemplate ), reinterpret_cast( &data ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void PhysicalDevice::getExternalBufferProperties( const VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalBufferInfo * pExternalBufferInfo, VULKAN_HPP_NAMESPACE::ExternalBufferProperties * pExternalBufferProperties, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkGetPhysicalDeviceExternalBufferProperties( static_cast( m_physicalDevice ), reinterpret_cast( pExternalBufferInfo ), reinterpret_cast( pExternalBufferProperties ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::ExternalBufferProperties PhysicalDevice::getExternalBufferProperties( const VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalBufferInfo & externalBufferInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceExternalBufferProperties && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::ExternalBufferProperties externalBufferProperties; d.vkGetPhysicalDeviceExternalBufferProperties( m_physicalDevice, reinterpret_cast( &externalBufferInfo ), reinterpret_cast( &externalBufferProperties ) ); return externalBufferProperties; } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void PhysicalDevice::getExternalFenceProperties( const VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalFenceInfo * pExternalFenceInfo, VULKAN_HPP_NAMESPACE::ExternalFenceProperties * pExternalFenceProperties, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkGetPhysicalDeviceExternalFenceProperties( static_cast( m_physicalDevice ), reinterpret_cast( pExternalFenceInfo ), reinterpret_cast( pExternalFenceProperties ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::ExternalFenceProperties PhysicalDevice::getExternalFenceProperties( const VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalFenceInfo & externalFenceInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceExternalFenceProperties && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::ExternalFenceProperties externalFenceProperties; d.vkGetPhysicalDeviceExternalFenceProperties( m_physicalDevice, reinterpret_cast( &externalFenceInfo ), reinterpret_cast( &externalFenceProperties ) ); return externalFenceProperties; } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void PhysicalDevice::getExternalSemaphoreProperties( const VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalSemaphoreInfo * pExternalSemaphoreInfo, VULKAN_HPP_NAMESPACE::ExternalSemaphoreProperties * pExternalSemaphoreProperties, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkGetPhysicalDeviceExternalSemaphoreProperties( static_cast( m_physicalDevice ), reinterpret_cast( pExternalSemaphoreInfo ), reinterpret_cast( pExternalSemaphoreProperties ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::ExternalSemaphoreProperties PhysicalDevice::getExternalSemaphoreProperties( const VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalSemaphoreInfo & externalSemaphoreInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceExternalSemaphoreProperties && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::ExternalSemaphoreProperties externalSemaphoreProperties; d.vkGetPhysicalDeviceExternalSemaphoreProperties( m_physicalDevice, reinterpret_cast( &externalSemaphoreInfo ), reinterpret_cast( &externalSemaphoreProperties ) ); return externalSemaphoreProperties; } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::getDescriptorSetLayoutSupport( const VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateInfo * pCreateInfo, VULKAN_HPP_NAMESPACE::DescriptorSetLayoutSupport * pSupport, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkGetDescriptorSetLayoutSupport( static_cast( m_device ), reinterpret_cast( pCreateInfo ), reinterpret_cast( pSupport ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::DescriptorSetLayoutSupport Device::getDescriptorSetLayoutSupport( const VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateInfo & createInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetDescriptorSetLayoutSupport && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::DescriptorSetLayoutSupport support; d.vkGetDescriptorSetLayoutSupport( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( &support ) ); return support; } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::StructureChain Device::getDescriptorSetLayoutSupport( const VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateInfo & createInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetDescriptorSetLayoutSupport && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::StructureChain structureChain; VULKAN_HPP_NAMESPACE::DescriptorSetLayoutSupport & support = structureChain.template get(); d.vkGetDescriptorSetLayoutSupport( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( &support ) ); return structureChain; } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_VERSION_1_2 === template VULKAN_HPP_INLINE void CommandBuffer::drawIndirectCount( VULKAN_HPP_NAMESPACE::Buffer buffer, VULKAN_HPP_NAMESPACE::DeviceSize offset, VULKAN_HPP_NAMESPACE::Buffer countBuffer, VULKAN_HPP_NAMESPACE::DeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdDrawIndirectCount( static_cast( m_commandBuffer ), static_cast( buffer ), static_cast( offset ), static_cast( countBuffer ), static_cast( countBufferOffset ), maxDrawCount, stride ); } template VULKAN_HPP_INLINE void CommandBuffer::drawIndexedIndirectCount( VULKAN_HPP_NAMESPACE::Buffer buffer, VULKAN_HPP_NAMESPACE::DeviceSize offset, VULKAN_HPP_NAMESPACE::Buffer countBuffer, VULKAN_HPP_NAMESPACE::DeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdDrawIndexedIndirectCount( static_cast( m_commandBuffer ), static_cast( buffer ), static_cast( offset ), static_cast( countBuffer ), static_cast( countBufferOffset ), maxDrawCount, stride ); } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::createRenderPass2( const VULKAN_HPP_NAMESPACE::RenderPassCreateInfo2 * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::RenderPass * pRenderPass, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkCreateRenderPass2( static_cast( m_device ), reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pRenderPass ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::createRenderPass2( const VULKAN_HPP_NAMESPACE::RenderPassCreateInfo2 & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateRenderPass2 && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::RenderPass renderPass; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateRenderPass2( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &renderPass ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createRenderPass2" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( renderPass ) ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::createRenderPass2Unique( const VULKAN_HPP_NAMESPACE::RenderPassCreateInfo2 & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateRenderPass2 && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::RenderPass renderPass; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateRenderPass2( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &renderPass ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createRenderPass2Unique" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, UniqueHandle( renderPass, detail::ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::beginRenderPass2( const VULKAN_HPP_NAMESPACE::RenderPassBeginInfo * pRenderPassBegin, const VULKAN_HPP_NAMESPACE::SubpassBeginInfo * pSubpassBeginInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdBeginRenderPass2( static_cast( m_commandBuffer ), reinterpret_cast( pRenderPassBegin ), reinterpret_cast( pSubpassBeginInfo ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::beginRenderPass2( const VULKAN_HPP_NAMESPACE::RenderPassBeginInfo & renderPassBegin, const VULKAN_HPP_NAMESPACE::SubpassBeginInfo & subpassBeginInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdBeginRenderPass2 && "Function requires or " ); # endif d.vkCmdBeginRenderPass2( m_commandBuffer, reinterpret_cast( &renderPassBegin ), reinterpret_cast( &subpassBeginInfo ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::nextSubpass2( const VULKAN_HPP_NAMESPACE::SubpassBeginInfo * pSubpassBeginInfo, const VULKAN_HPP_NAMESPACE::SubpassEndInfo * pSubpassEndInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdNextSubpass2( static_cast( m_commandBuffer ), reinterpret_cast( pSubpassBeginInfo ), reinterpret_cast( pSubpassEndInfo ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::nextSubpass2( const VULKAN_HPP_NAMESPACE::SubpassBeginInfo & subpassBeginInfo, const VULKAN_HPP_NAMESPACE::SubpassEndInfo & subpassEndInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdNextSubpass2 && "Function requires or " ); # endif d.vkCmdNextSubpass2( m_commandBuffer, reinterpret_cast( &subpassBeginInfo ), reinterpret_cast( &subpassEndInfo ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::endRenderPass2( const VULKAN_HPP_NAMESPACE::SubpassEndInfo * pSubpassEndInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdEndRenderPass2( static_cast( m_commandBuffer ), reinterpret_cast( pSubpassEndInfo ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::endRenderPass2( const VULKAN_HPP_NAMESPACE::SubpassEndInfo & subpassEndInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdEndRenderPass2 && "Function requires or " ); # endif d.vkCmdEndRenderPass2( m_commandBuffer, reinterpret_cast( &subpassEndInfo ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::resetQueryPool( VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkResetQueryPool( static_cast( m_device ), static_cast( queryPool ), firstQuery, queryCount ); } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getSemaphoreCounterValue( VULKAN_HPP_NAMESPACE::Semaphore semaphore, uint64_t * pValue, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetSemaphoreCounterValue( static_cast( m_device ), static_cast( semaphore ), pValue ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::getSemaphoreCounterValue( VULKAN_HPP_NAMESPACE::Semaphore semaphore, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetSemaphoreCounterValue && "Function requires or " ); # endif uint64_t value; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetSemaphoreCounterValue( m_device, static_cast( semaphore ), &value ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getSemaphoreCounterValue" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( value ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::waitSemaphores( const VULKAN_HPP_NAMESPACE::SemaphoreWaitInfo * pWaitInfo, uint64_t timeout, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkWaitSemaphores( static_cast( m_device ), reinterpret_cast( pWaitInfo ), timeout ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Device::waitSemaphores( const VULKAN_HPP_NAMESPACE::SemaphoreWaitInfo & waitInfo, uint64_t timeout, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkWaitSemaphores && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkWaitSemaphores( m_device, reinterpret_cast( &waitInfo ), timeout ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::waitSemaphores", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eTimeout } ); return static_cast( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::signalSemaphore( const VULKAN_HPP_NAMESPACE::SemaphoreSignalInfo * pSignalInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkSignalSemaphore( static_cast( m_device ), reinterpret_cast( pSignalInfo ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type Device::signalSemaphore( const VULKAN_HPP_NAMESPACE::SemaphoreSignalInfo & signalInfo, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkSignalSemaphore && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkSignalSemaphore( m_device, reinterpret_cast( &signalInfo ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::signalSemaphore" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE DeviceAddress Device::getBufferAddress( const VULKAN_HPP_NAMESPACE::BufferDeviceAddressInfo * pInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetBufferDeviceAddress( static_cast( m_device ), reinterpret_cast( pInfo ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::DeviceAddress Device::getBufferAddress( const VULKAN_HPP_NAMESPACE::BufferDeviceAddressInfo & info, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetBufferDeviceAddress && "Function requires or or " ); # endif VkDeviceAddress result = d.vkGetBufferDeviceAddress( m_device, reinterpret_cast( &info ) ); return static_cast( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE uint64_t Device::getBufferOpaqueCaptureAddress( const VULKAN_HPP_NAMESPACE::BufferDeviceAddressInfo * pInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return d.vkGetBufferOpaqueCaptureAddress( static_cast( m_device ), reinterpret_cast( pInfo ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE uint64_t Device::getBufferOpaqueCaptureAddress( const VULKAN_HPP_NAMESPACE::BufferDeviceAddressInfo & info, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetBufferOpaqueCaptureAddress && "Function requires or " ); # endif uint64_t result = d.vkGetBufferOpaqueCaptureAddress( m_device, reinterpret_cast( &info ) ); return result; } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE uint64_t Device::getMemoryOpaqueCaptureAddress( const VULKAN_HPP_NAMESPACE::DeviceMemoryOpaqueCaptureAddressInfo * pInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return d.vkGetDeviceMemoryOpaqueCaptureAddress( static_cast( m_device ), reinterpret_cast( pInfo ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE uint64_t Device::getMemoryOpaqueCaptureAddress( const VULKAN_HPP_NAMESPACE::DeviceMemoryOpaqueCaptureAddressInfo & info, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetDeviceMemoryOpaqueCaptureAddress && "Function requires or " ); # endif uint64_t result = d.vkGetDeviceMemoryOpaqueCaptureAddress( m_device, reinterpret_cast( &info ) ); return result; } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_VERSION_1_3 === template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result PhysicalDevice::getToolProperties( uint32_t * pToolCount, VULKAN_HPP_NAMESPACE::PhysicalDeviceToolProperties * pToolProperties, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetPhysicalDeviceToolProperties( static_cast( m_physicalDevice ), pToolCount, reinterpret_cast( pToolProperties ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template < typename PhysicalDeviceToolPropertiesAllocator, typename Dispatch, typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getToolProperties( Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceToolProperties && "Function requires or " ); # endif std::vector toolProperties; uint32_t toolCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkGetPhysicalDeviceToolProperties( m_physicalDevice, &toolCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && toolCount ) { toolProperties.resize( toolCount ); result = static_cast( d.vkGetPhysicalDeviceToolProperties( m_physicalDevice, &toolCount, reinterpret_cast( toolProperties.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getToolProperties" ); VULKAN_HPP_ASSERT( toolCount <= toolProperties.size() ); if ( toolCount < toolProperties.size() ) { toolProperties.resize( toolCount ); } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( toolProperties ) ); } template < typename PhysicalDeviceToolPropertiesAllocator, typename Dispatch, typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getToolProperties( PhysicalDeviceToolPropertiesAllocator & physicalDeviceToolPropertiesAllocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceToolProperties && "Function requires or " ); # endif std::vector toolProperties( physicalDeviceToolPropertiesAllocator ); uint32_t toolCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkGetPhysicalDeviceToolProperties( m_physicalDevice, &toolCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && toolCount ) { toolProperties.resize( toolCount ); result = static_cast( d.vkGetPhysicalDeviceToolProperties( m_physicalDevice, &toolCount, reinterpret_cast( toolProperties.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getToolProperties" ); VULKAN_HPP_ASSERT( toolCount <= toolProperties.size() ); if ( toolCount < toolProperties.size() ) { toolProperties.resize( toolCount ); } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( toolProperties ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::createPrivateDataSlot( const VULKAN_HPP_NAMESPACE::PrivateDataSlotCreateInfo * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::PrivateDataSlot * pPrivateDataSlot, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkCreatePrivateDataSlot( static_cast( m_device ), reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pPrivateDataSlot ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::createPrivateDataSlot( const VULKAN_HPP_NAMESPACE::PrivateDataSlotCreateInfo & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreatePrivateDataSlot && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreatePrivateDataSlot( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &privateDataSlot ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createPrivateDataSlot" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( privateDataSlot ) ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::createPrivateDataSlotUnique( const VULKAN_HPP_NAMESPACE::PrivateDataSlotCreateInfo & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreatePrivateDataSlot && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreatePrivateDataSlot( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &privateDataSlot ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createPrivateDataSlotUnique" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, UniqueHandle( privateDataSlot, detail::ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::destroyPrivateDataSlot( VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDestroyPrivateDataSlot( static_cast( m_device ), static_cast( privateDataSlot ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::destroyPrivateDataSlot( VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDestroyPrivateDataSlot && "Function requires or " ); # endif d.vkDestroyPrivateDataSlot( m_device, static_cast( privateDataSlot ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDestroyPrivateDataSlot( static_cast( m_device ), static_cast( privateDataSlot ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDestroyPrivateDataSlot && "Function requires or " ); # endif d.vkDestroyPrivateDataSlot( m_device, static_cast( privateDataSlot ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::setPrivateData( VULKAN_HPP_NAMESPACE::ObjectType objectType_, uint64_t objectHandle, VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot, uint64_t data, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkSetPrivateData( static_cast( m_device ), static_cast( objectType_ ), objectHandle, static_cast( privateDataSlot ), data ) ); } #else template VULKAN_HPP_INLINE typename ResultValueType::type Device::setPrivateData( VULKAN_HPP_NAMESPACE::ObjectType objectType_, uint64_t objectHandle, VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot, uint64_t data, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkSetPrivateData && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkSetPrivateData( m_device, static_cast( objectType_ ), objectHandle, static_cast( privateDataSlot ), data ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::setPrivateData" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ template VULKAN_HPP_INLINE void Device::getPrivateData( VULKAN_HPP_NAMESPACE::ObjectType objectType_, uint64_t objectHandle, VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot, uint64_t * pData, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkGetPrivateData( static_cast( m_device ), static_cast( objectType_ ), objectHandle, static_cast( privateDataSlot ), pData ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE uint64_t Device::getPrivateData( VULKAN_HPP_NAMESPACE::ObjectType objectType_, uint64_t objectHandle, VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPrivateData && "Function requires or " ); # endif uint64_t data; d.vkGetPrivateData( m_device, static_cast( objectType_ ), objectHandle, static_cast( privateDataSlot ), &data ); return data; } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::setEvent2( VULKAN_HPP_NAMESPACE::Event event, const VULKAN_HPP_NAMESPACE::DependencyInfo * pDependencyInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetEvent2( static_cast( m_commandBuffer ), static_cast( event ), reinterpret_cast( pDependencyInfo ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::setEvent2( VULKAN_HPP_NAMESPACE::Event event, const VULKAN_HPP_NAMESPACE::DependencyInfo & dependencyInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdSetEvent2 && "Function requires or " ); # endif d.vkCmdSetEvent2( m_commandBuffer, static_cast( event ), reinterpret_cast( &dependencyInfo ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::resetEvent2( VULKAN_HPP_NAMESPACE::Event event, VULKAN_HPP_NAMESPACE::PipelineStageFlags2 stageMask, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdResetEvent2( static_cast( m_commandBuffer ), static_cast( event ), static_cast( stageMask ) ); } template VULKAN_HPP_INLINE void CommandBuffer::waitEvents2( uint32_t eventCount, const VULKAN_HPP_NAMESPACE::Event * pEvents, const VULKAN_HPP_NAMESPACE::DependencyInfo * pDependencyInfos, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdWaitEvents2( static_cast( m_commandBuffer ), eventCount, reinterpret_cast( pEvents ), reinterpret_cast( pDependencyInfos ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::waitEvents2( VULKAN_HPP_NAMESPACE::ArrayProxy const & events, VULKAN_HPP_NAMESPACE::ArrayProxy const & dependencyInfos, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdWaitEvents2 && "Function requires or " ); # endif # ifdef VULKAN_HPP_NO_EXCEPTIONS VULKAN_HPP_ASSERT( events.size() == dependencyInfos.size() ); # else if ( events.size() != dependencyInfos.size() ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::waitEvents2: events.size() != dependencyInfos.size()" ); } # endif /*VULKAN_HPP_NO_EXCEPTIONS*/ d.vkCmdWaitEvents2( m_commandBuffer, events.size(), reinterpret_cast( events.data() ), reinterpret_cast( dependencyInfos.data() ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::pipelineBarrier2( const VULKAN_HPP_NAMESPACE::DependencyInfo * pDependencyInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdPipelineBarrier2( static_cast( m_commandBuffer ), reinterpret_cast( pDependencyInfo ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::pipelineBarrier2( const VULKAN_HPP_NAMESPACE::DependencyInfo & dependencyInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdPipelineBarrier2 && "Function requires or " ); # endif d.vkCmdPipelineBarrier2( m_commandBuffer, reinterpret_cast( &dependencyInfo ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::writeTimestamp2( VULKAN_HPP_NAMESPACE::PipelineStageFlags2 stage, VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t query, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdWriteTimestamp2( static_cast( m_commandBuffer ), static_cast( stage ), static_cast( queryPool ), query ); } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Queue::submit2( uint32_t submitCount, const VULKAN_HPP_NAMESPACE::SubmitInfo2 * pSubmits, VULKAN_HPP_NAMESPACE::Fence fence, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkQueueSubmit2( static_cast( m_queue ), submitCount, reinterpret_cast( pSubmits ), static_cast( fence ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type Queue::submit2( VULKAN_HPP_NAMESPACE::ArrayProxy const & submits, VULKAN_HPP_NAMESPACE::Fence fence, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkQueueSubmit2 && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkQueueSubmit2( m_queue, submits.size(), reinterpret_cast( submits.data() ), static_cast( fence ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Queue::submit2" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::copyBuffer2( const VULKAN_HPP_NAMESPACE::CopyBufferInfo2 * pCopyBufferInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdCopyBuffer2( static_cast( m_commandBuffer ), reinterpret_cast( pCopyBufferInfo ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::copyBuffer2( const VULKAN_HPP_NAMESPACE::CopyBufferInfo2 & copyBufferInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdCopyBuffer2 && "Function requires or " ); # endif d.vkCmdCopyBuffer2( m_commandBuffer, reinterpret_cast( ©BufferInfo ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::copyImage2( const VULKAN_HPP_NAMESPACE::CopyImageInfo2 * pCopyImageInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdCopyImage2( static_cast( m_commandBuffer ), reinterpret_cast( pCopyImageInfo ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::copyImage2( const VULKAN_HPP_NAMESPACE::CopyImageInfo2 & copyImageInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdCopyImage2 && "Function requires or " ); # endif d.vkCmdCopyImage2( m_commandBuffer, reinterpret_cast( ©ImageInfo ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::copyBufferToImage2( const VULKAN_HPP_NAMESPACE::CopyBufferToImageInfo2 * pCopyBufferToImageInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdCopyBufferToImage2( static_cast( m_commandBuffer ), reinterpret_cast( pCopyBufferToImageInfo ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::copyBufferToImage2( const VULKAN_HPP_NAMESPACE::CopyBufferToImageInfo2 & copyBufferToImageInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdCopyBufferToImage2 && "Function requires or " ); # endif d.vkCmdCopyBufferToImage2( m_commandBuffer, reinterpret_cast( ©BufferToImageInfo ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::copyImageToBuffer2( const VULKAN_HPP_NAMESPACE::CopyImageToBufferInfo2 * pCopyImageToBufferInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdCopyImageToBuffer2( static_cast( m_commandBuffer ), reinterpret_cast( pCopyImageToBufferInfo ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::copyImageToBuffer2( const VULKAN_HPP_NAMESPACE::CopyImageToBufferInfo2 & copyImageToBufferInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdCopyImageToBuffer2 && "Function requires or " ); # endif d.vkCmdCopyImageToBuffer2( m_commandBuffer, reinterpret_cast( ©ImageToBufferInfo ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::blitImage2( const VULKAN_HPP_NAMESPACE::BlitImageInfo2 * pBlitImageInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdBlitImage2( static_cast( m_commandBuffer ), reinterpret_cast( pBlitImageInfo ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::blitImage2( const VULKAN_HPP_NAMESPACE::BlitImageInfo2 & blitImageInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdBlitImage2 && "Function requires or " ); # endif d.vkCmdBlitImage2( m_commandBuffer, reinterpret_cast( &blitImageInfo ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::resolveImage2( const VULKAN_HPP_NAMESPACE::ResolveImageInfo2 * pResolveImageInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdResolveImage2( static_cast( m_commandBuffer ), reinterpret_cast( pResolveImageInfo ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::resolveImage2( const VULKAN_HPP_NAMESPACE::ResolveImageInfo2 & resolveImageInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdResolveImage2 && "Function requires or " ); # endif d.vkCmdResolveImage2( m_commandBuffer, reinterpret_cast( &resolveImageInfo ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::beginRendering( const VULKAN_HPP_NAMESPACE::RenderingInfo * pRenderingInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdBeginRendering( static_cast( m_commandBuffer ), reinterpret_cast( pRenderingInfo ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::beginRendering( const VULKAN_HPP_NAMESPACE::RenderingInfo & renderingInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdBeginRendering && "Function requires or " ); # endif d.vkCmdBeginRendering( m_commandBuffer, reinterpret_cast( &renderingInfo ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::endRendering( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdEndRendering( static_cast( m_commandBuffer ) ); } template VULKAN_HPP_INLINE void CommandBuffer::setCullMode( VULKAN_HPP_NAMESPACE::CullModeFlags cullMode, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetCullMode( static_cast( m_commandBuffer ), static_cast( cullMode ) ); } template VULKAN_HPP_INLINE void CommandBuffer::setFrontFace( VULKAN_HPP_NAMESPACE::FrontFace frontFace, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetFrontFace( static_cast( m_commandBuffer ), static_cast( frontFace ) ); } template VULKAN_HPP_INLINE void CommandBuffer::setPrimitiveTopology( VULKAN_HPP_NAMESPACE::PrimitiveTopology primitiveTopology, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetPrimitiveTopology( static_cast( m_commandBuffer ), static_cast( primitiveTopology ) ); } template VULKAN_HPP_INLINE void CommandBuffer::setViewportWithCount( uint32_t viewportCount, const VULKAN_HPP_NAMESPACE::Viewport * pViewports, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetViewportWithCount( static_cast( m_commandBuffer ), viewportCount, reinterpret_cast( pViewports ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::setViewportWithCount( VULKAN_HPP_NAMESPACE::ArrayProxy const & viewports, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdSetViewportWithCount && "Function requires or or " ); # endif d.vkCmdSetViewportWithCount( m_commandBuffer, viewports.size(), reinterpret_cast( viewports.data() ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::setScissorWithCount( uint32_t scissorCount, const VULKAN_HPP_NAMESPACE::Rect2D * pScissors, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetScissorWithCount( static_cast( m_commandBuffer ), scissorCount, reinterpret_cast( pScissors ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::setScissorWithCount( VULKAN_HPP_NAMESPACE::ArrayProxy const & scissors, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdSetScissorWithCount && "Function requires or or " ); # endif d.vkCmdSetScissorWithCount( m_commandBuffer, scissors.size(), reinterpret_cast( scissors.data() ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::bindVertexBuffers2( uint32_t firstBinding, uint32_t bindingCount, const VULKAN_HPP_NAMESPACE::Buffer * pBuffers, const VULKAN_HPP_NAMESPACE::DeviceSize * pOffsets, const VULKAN_HPP_NAMESPACE::DeviceSize * pSizes, const VULKAN_HPP_NAMESPACE::DeviceSize * pStrides, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdBindVertexBuffers2( static_cast( m_commandBuffer ), firstBinding, bindingCount, reinterpret_cast( pBuffers ), reinterpret_cast( pOffsets ), reinterpret_cast( pSizes ), reinterpret_cast( pStrides ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::bindVertexBuffers2( uint32_t firstBinding, VULKAN_HPP_NAMESPACE::ArrayProxy const & buffers, VULKAN_HPP_NAMESPACE::ArrayProxy const & offsets, VULKAN_HPP_NAMESPACE::ArrayProxy const & sizes, VULKAN_HPP_NAMESPACE::ArrayProxy const & strides, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdBindVertexBuffers2 && "Function requires or or " ); # endif # ifdef VULKAN_HPP_NO_EXCEPTIONS VULKAN_HPP_ASSERT( buffers.size() == offsets.size() ); VULKAN_HPP_ASSERT( sizes.empty() || buffers.size() == sizes.size() ); VULKAN_HPP_ASSERT( strides.empty() || buffers.size() == strides.size() ); # else if ( buffers.size() != offsets.size() ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::bindVertexBuffers2: buffers.size() != offsets.size()" ); } if ( !sizes.empty() && buffers.size() != sizes.size() ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::bindVertexBuffers2: buffers.size() != sizes.size()" ); } if ( !strides.empty() && buffers.size() != strides.size() ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::bindVertexBuffers2: buffers.size() != strides.size()" ); } # endif /*VULKAN_HPP_NO_EXCEPTIONS*/ d.vkCmdBindVertexBuffers2( m_commandBuffer, firstBinding, buffers.size(), reinterpret_cast( buffers.data() ), reinterpret_cast( offsets.data() ), reinterpret_cast( sizes.data() ), reinterpret_cast( strides.data() ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::setDepthTestEnable( VULKAN_HPP_NAMESPACE::Bool32 depthTestEnable, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetDepthTestEnable( static_cast( m_commandBuffer ), static_cast( depthTestEnable ) ); } template VULKAN_HPP_INLINE void CommandBuffer::setDepthWriteEnable( VULKAN_HPP_NAMESPACE::Bool32 depthWriteEnable, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetDepthWriteEnable( static_cast( m_commandBuffer ), static_cast( depthWriteEnable ) ); } template VULKAN_HPP_INLINE void CommandBuffer::setDepthCompareOp( VULKAN_HPP_NAMESPACE::CompareOp depthCompareOp, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetDepthCompareOp( static_cast( m_commandBuffer ), static_cast( depthCompareOp ) ); } template VULKAN_HPP_INLINE void CommandBuffer::setDepthBoundsTestEnable( VULKAN_HPP_NAMESPACE::Bool32 depthBoundsTestEnable, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetDepthBoundsTestEnable( static_cast( m_commandBuffer ), static_cast( depthBoundsTestEnable ) ); } template VULKAN_HPP_INLINE void CommandBuffer::setStencilTestEnable( VULKAN_HPP_NAMESPACE::Bool32 stencilTestEnable, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetStencilTestEnable( static_cast( m_commandBuffer ), static_cast( stencilTestEnable ) ); } template VULKAN_HPP_INLINE void CommandBuffer::setStencilOp( VULKAN_HPP_NAMESPACE::StencilFaceFlags faceMask, VULKAN_HPP_NAMESPACE::StencilOp failOp, VULKAN_HPP_NAMESPACE::StencilOp passOp, VULKAN_HPP_NAMESPACE::StencilOp depthFailOp, VULKAN_HPP_NAMESPACE::CompareOp compareOp, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetStencilOp( static_cast( m_commandBuffer ), static_cast( faceMask ), static_cast( failOp ), static_cast( passOp ), static_cast( depthFailOp ), static_cast( compareOp ) ); } template VULKAN_HPP_INLINE void CommandBuffer::setRasterizerDiscardEnable( VULKAN_HPP_NAMESPACE::Bool32 rasterizerDiscardEnable, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetRasterizerDiscardEnable( static_cast( m_commandBuffer ), static_cast( rasterizerDiscardEnable ) ); } template VULKAN_HPP_INLINE void CommandBuffer::setDepthBiasEnable( VULKAN_HPP_NAMESPACE::Bool32 depthBiasEnable, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetDepthBiasEnable( static_cast( m_commandBuffer ), static_cast( depthBiasEnable ) ); } template VULKAN_HPP_INLINE void CommandBuffer::setPrimitiveRestartEnable( VULKAN_HPP_NAMESPACE::Bool32 primitiveRestartEnable, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetPrimitiveRestartEnable( static_cast( m_commandBuffer ), static_cast( primitiveRestartEnable ) ); } template VULKAN_HPP_INLINE void Device::getBufferMemoryRequirements( const VULKAN_HPP_NAMESPACE::DeviceBufferMemoryRequirements * pInfo, VULKAN_HPP_NAMESPACE::MemoryRequirements2 * pMemoryRequirements, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkGetDeviceBufferMemoryRequirements( static_cast( m_device ), reinterpret_cast( pInfo ), reinterpret_cast( pMemoryRequirements ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MemoryRequirements2 Device::getBufferMemoryRequirements( const VULKAN_HPP_NAMESPACE::DeviceBufferMemoryRequirements & info, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetDeviceBufferMemoryRequirements && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::MemoryRequirements2 memoryRequirements; d.vkGetDeviceBufferMemoryRequirements( m_device, reinterpret_cast( &info ), reinterpret_cast( &memoryRequirements ) ); return memoryRequirements; } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::StructureChain Device::getBufferMemoryRequirements( const VULKAN_HPP_NAMESPACE::DeviceBufferMemoryRequirements & info, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetDeviceBufferMemoryRequirements && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::StructureChain structureChain; VULKAN_HPP_NAMESPACE::MemoryRequirements2 & memoryRequirements = structureChain.template get(); d.vkGetDeviceBufferMemoryRequirements( m_device, reinterpret_cast( &info ), reinterpret_cast( &memoryRequirements ) ); return structureChain; } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::getImageMemoryRequirements( const VULKAN_HPP_NAMESPACE::DeviceImageMemoryRequirements * pInfo, VULKAN_HPP_NAMESPACE::MemoryRequirements2 * pMemoryRequirements, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkGetDeviceImageMemoryRequirements( static_cast( m_device ), reinterpret_cast( pInfo ), reinterpret_cast( pMemoryRequirements ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MemoryRequirements2 Device::getImageMemoryRequirements( const VULKAN_HPP_NAMESPACE::DeviceImageMemoryRequirements & info, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetDeviceImageMemoryRequirements && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::MemoryRequirements2 memoryRequirements; d.vkGetDeviceImageMemoryRequirements( m_device, reinterpret_cast( &info ), reinterpret_cast( &memoryRequirements ) ); return memoryRequirements; } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::StructureChain Device::getImageMemoryRequirements( const VULKAN_HPP_NAMESPACE::DeviceImageMemoryRequirements & info, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetDeviceImageMemoryRequirements && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::StructureChain structureChain; VULKAN_HPP_NAMESPACE::MemoryRequirements2 & memoryRequirements = structureChain.template get(); d.vkGetDeviceImageMemoryRequirements( m_device, reinterpret_cast( &info ), reinterpret_cast( &memoryRequirements ) ); return structureChain; } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::getImageSparseMemoryRequirements( const VULKAN_HPP_NAMESPACE::DeviceImageMemoryRequirements * pInfo, uint32_t * pSparseMemoryRequirementCount, VULKAN_HPP_NAMESPACE::SparseImageMemoryRequirements2 * pSparseMemoryRequirements, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkGetDeviceImageSparseMemoryRequirements( static_cast( m_device ), reinterpret_cast( pInfo ), pSparseMemoryRequirementCount, reinterpret_cast( pSparseMemoryRequirements ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector Device::getImageSparseMemoryRequirements( const VULKAN_HPP_NAMESPACE::DeviceImageMemoryRequirements & info, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetDeviceImageSparseMemoryRequirements && "Function requires or " ); # endif std::vector sparseMemoryRequirements; uint32_t sparseMemoryRequirementCount; d.vkGetDeviceImageSparseMemoryRequirements( m_device, reinterpret_cast( &info ), &sparseMemoryRequirementCount, nullptr ); sparseMemoryRequirements.resize( sparseMemoryRequirementCount ); d.vkGetDeviceImageSparseMemoryRequirements( m_device, reinterpret_cast( &info ), &sparseMemoryRequirementCount, reinterpret_cast( sparseMemoryRequirements.data() ) ); VULKAN_HPP_ASSERT( sparseMemoryRequirementCount <= sparseMemoryRequirements.size() ); if ( sparseMemoryRequirementCount < sparseMemoryRequirements.size() ) { sparseMemoryRequirements.resize( sparseMemoryRequirementCount ); } return sparseMemoryRequirements; } template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector Device::getImageSparseMemoryRequirements( const VULKAN_HPP_NAMESPACE::DeviceImageMemoryRequirements & info, SparseImageMemoryRequirements2Allocator & sparseImageMemoryRequirements2Allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetDeviceImageSparseMemoryRequirements && "Function requires or " ); # endif std::vector sparseMemoryRequirements( sparseImageMemoryRequirements2Allocator ); uint32_t sparseMemoryRequirementCount; d.vkGetDeviceImageSparseMemoryRequirements( m_device, reinterpret_cast( &info ), &sparseMemoryRequirementCount, nullptr ); sparseMemoryRequirements.resize( sparseMemoryRequirementCount ); d.vkGetDeviceImageSparseMemoryRequirements( m_device, reinterpret_cast( &info ), &sparseMemoryRequirementCount, reinterpret_cast( sparseMemoryRequirements.data() ) ); VULKAN_HPP_ASSERT( sparseMemoryRequirementCount <= sparseMemoryRequirements.size() ); if ( sparseMemoryRequirementCount < sparseMemoryRequirements.size() ) { sparseMemoryRequirements.resize( sparseMemoryRequirementCount ); } return sparseMemoryRequirements; } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_VERSION_1_4 === template VULKAN_HPP_INLINE void CommandBuffer::setLineStipple( uint32_t lineStippleFactor, uint16_t lineStipplePattern, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetLineStipple( static_cast( m_commandBuffer ), lineStippleFactor, lineStipplePattern ); } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::mapMemory2( const VULKAN_HPP_NAMESPACE::MemoryMapInfo * pMemoryMapInfo, void ** ppData, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkMapMemory2( static_cast( m_device ), reinterpret_cast( pMemoryMapInfo ), ppData ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::mapMemory2( const VULKAN_HPP_NAMESPACE::MemoryMapInfo & memoryMapInfo, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkMapMemory2 && "Function requires or " ); # endif void * pData; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkMapMemory2( m_device, reinterpret_cast( &memoryMapInfo ), &pData ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::mapMemory2" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( pData ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::unmapMemory2( const VULKAN_HPP_NAMESPACE::MemoryUnmapInfo * pMemoryUnmapInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkUnmapMemory2( static_cast( m_device ), reinterpret_cast( pMemoryUnmapInfo ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE typename ResultValueType::type Device::unmapMemory2( const VULKAN_HPP_NAMESPACE::MemoryUnmapInfo & memoryUnmapInfo, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkUnmapMemory2 && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkUnmapMemory2( m_device, reinterpret_cast( &memoryUnmapInfo ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::unmapMemory2" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::bindIndexBuffer2( VULKAN_HPP_NAMESPACE::Buffer buffer, VULKAN_HPP_NAMESPACE::DeviceSize offset, VULKAN_HPP_NAMESPACE::DeviceSize size, VULKAN_HPP_NAMESPACE::IndexType indexType, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdBindIndexBuffer2( static_cast( m_commandBuffer ), static_cast( buffer ), static_cast( offset ), static_cast( size ), static_cast( indexType ) ); } template VULKAN_HPP_INLINE void Device::getRenderingAreaGranularity( const VULKAN_HPP_NAMESPACE::RenderingAreaInfo * pRenderingAreaInfo, VULKAN_HPP_NAMESPACE::Extent2D * pGranularity, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkGetRenderingAreaGranularity( static_cast( m_device ), reinterpret_cast( pRenderingAreaInfo ), reinterpret_cast( pGranularity ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Extent2D Device::getRenderingAreaGranularity( const VULKAN_HPP_NAMESPACE::RenderingAreaInfo & renderingAreaInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetRenderingAreaGranularity && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::Extent2D granularity; d.vkGetRenderingAreaGranularity( m_device, reinterpret_cast( &renderingAreaInfo ), reinterpret_cast( &granularity ) ); return granularity; } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::getImageSubresourceLayout( const VULKAN_HPP_NAMESPACE::DeviceImageSubresourceInfo * pInfo, VULKAN_HPP_NAMESPACE::SubresourceLayout2 * pLayout, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkGetDeviceImageSubresourceLayout( static_cast( m_device ), reinterpret_cast( pInfo ), reinterpret_cast( pLayout ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::SubresourceLayout2 Device::getImageSubresourceLayout( const VULKAN_HPP_NAMESPACE::DeviceImageSubresourceInfo & info, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetDeviceImageSubresourceLayout && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::SubresourceLayout2 layout; d.vkGetDeviceImageSubresourceLayout( m_device, reinterpret_cast( &info ), reinterpret_cast( &layout ) ); return layout; } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::StructureChain Device::getImageSubresourceLayout( const VULKAN_HPP_NAMESPACE::DeviceImageSubresourceInfo & info, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetDeviceImageSubresourceLayout && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::StructureChain structureChain; VULKAN_HPP_NAMESPACE::SubresourceLayout2 & layout = structureChain.template get(); d.vkGetDeviceImageSubresourceLayout( m_device, reinterpret_cast( &info ), reinterpret_cast( &layout ) ); return structureChain; } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::getImageSubresourceLayout2( VULKAN_HPP_NAMESPACE::Image image, const VULKAN_HPP_NAMESPACE::ImageSubresource2 * pSubresource, VULKAN_HPP_NAMESPACE::SubresourceLayout2 * pLayout, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkGetImageSubresourceLayout2( static_cast( m_device ), static_cast( image ), reinterpret_cast( pSubresource ), reinterpret_cast( pLayout ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::SubresourceLayout2 Device::getImageSubresourceLayout2( VULKAN_HPP_NAMESPACE::Image image, const VULKAN_HPP_NAMESPACE::ImageSubresource2 & subresource, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetImageSubresourceLayout2 && "Function requires or or or " ); # endif VULKAN_HPP_NAMESPACE::SubresourceLayout2 layout; d.vkGetImageSubresourceLayout2( m_device, static_cast( image ), reinterpret_cast( &subresource ), reinterpret_cast( &layout ) ); return layout; } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::StructureChain Device::getImageSubresourceLayout2( VULKAN_HPP_NAMESPACE::Image image, const VULKAN_HPP_NAMESPACE::ImageSubresource2 & subresource, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetImageSubresourceLayout2 && "Function requires or or or " ); # endif VULKAN_HPP_NAMESPACE::StructureChain structureChain; VULKAN_HPP_NAMESPACE::SubresourceLayout2 & layout = structureChain.template get(); d.vkGetImageSubresourceLayout2( m_device, static_cast( image ), reinterpret_cast( &subresource ), reinterpret_cast( &layout ) ); return structureChain; } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::pushDescriptorSet( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint, VULKAN_HPP_NAMESPACE::PipelineLayout layout, uint32_t set, uint32_t descriptorWriteCount, const VULKAN_HPP_NAMESPACE::WriteDescriptorSet * pDescriptorWrites, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdPushDescriptorSet( static_cast( m_commandBuffer ), static_cast( pipelineBindPoint ), static_cast( layout ), set, descriptorWriteCount, reinterpret_cast( pDescriptorWrites ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::pushDescriptorSet( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint, VULKAN_HPP_NAMESPACE::PipelineLayout layout, uint32_t set, VULKAN_HPP_NAMESPACE::ArrayProxy const & descriptorWrites, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdPushDescriptorSet && "Function requires or " ); # endif d.vkCmdPushDescriptorSet( m_commandBuffer, static_cast( pipelineBindPoint ), static_cast( layout ), set, descriptorWrites.size(), reinterpret_cast( descriptorWrites.data() ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::pushDescriptorSetWithTemplate( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate, VULKAN_HPP_NAMESPACE::PipelineLayout layout, uint32_t set, const void * pData, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdPushDescriptorSetWithTemplate( static_cast( m_commandBuffer ), static_cast( descriptorUpdateTemplate ), static_cast( layout ), set, pData ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::pushDescriptorSetWithTemplate( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate, VULKAN_HPP_NAMESPACE::PipelineLayout layout, uint32_t set, DataType const & data, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdPushDescriptorSetWithTemplate && "Function requires or or " ); # endif d.vkCmdPushDescriptorSetWithTemplate( m_commandBuffer, static_cast( descriptorUpdateTemplate ), static_cast( layout ), set, reinterpret_cast( &data ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::setRenderingAttachmentLocations( const VULKAN_HPP_NAMESPACE::RenderingAttachmentLocationInfo * pLocationInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetRenderingAttachmentLocations( static_cast( m_commandBuffer ), reinterpret_cast( pLocationInfo ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::setRenderingAttachmentLocations( const VULKAN_HPP_NAMESPACE::RenderingAttachmentLocationInfo & locationInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdSetRenderingAttachmentLocations && "Function requires or " ); # endif d.vkCmdSetRenderingAttachmentLocations( m_commandBuffer, reinterpret_cast( &locationInfo ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::setRenderingInputAttachmentIndices( const VULKAN_HPP_NAMESPACE::RenderingInputAttachmentIndexInfo * pInputAttachmentIndexInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetRenderingInputAttachmentIndices( static_cast( m_commandBuffer ), reinterpret_cast( pInputAttachmentIndexInfo ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::setRenderingInputAttachmentIndices( const VULKAN_HPP_NAMESPACE::RenderingInputAttachmentIndexInfo & inputAttachmentIndexInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdSetRenderingInputAttachmentIndices && "Function requires or " ); # endif d.vkCmdSetRenderingInputAttachmentIndices( m_commandBuffer, reinterpret_cast( &inputAttachmentIndexInfo ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::bindDescriptorSets2( const VULKAN_HPP_NAMESPACE::BindDescriptorSetsInfo * pBindDescriptorSetsInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdBindDescriptorSets2( static_cast( m_commandBuffer ), reinterpret_cast( pBindDescriptorSetsInfo ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::bindDescriptorSets2( const VULKAN_HPP_NAMESPACE::BindDescriptorSetsInfo & bindDescriptorSetsInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdBindDescriptorSets2 && "Function requires or " ); # endif d.vkCmdBindDescriptorSets2( m_commandBuffer, reinterpret_cast( &bindDescriptorSetsInfo ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::pushConstants2( const VULKAN_HPP_NAMESPACE::PushConstantsInfo * pPushConstantsInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdPushConstants2( static_cast( m_commandBuffer ), reinterpret_cast( pPushConstantsInfo ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::pushConstants2( const VULKAN_HPP_NAMESPACE::PushConstantsInfo & pushConstantsInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdPushConstants2 && "Function requires or " ); # endif d.vkCmdPushConstants2( m_commandBuffer, reinterpret_cast( &pushConstantsInfo ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::pushDescriptorSet2( const VULKAN_HPP_NAMESPACE::PushDescriptorSetInfo * pPushDescriptorSetInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdPushDescriptorSet2( static_cast( m_commandBuffer ), reinterpret_cast( pPushDescriptorSetInfo ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::pushDescriptorSet2( const VULKAN_HPP_NAMESPACE::PushDescriptorSetInfo & pushDescriptorSetInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdPushDescriptorSet2 && "Function requires or " ); # endif d.vkCmdPushDescriptorSet2( m_commandBuffer, reinterpret_cast( &pushDescriptorSetInfo ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::pushDescriptorSetWithTemplate2( const VULKAN_HPP_NAMESPACE::PushDescriptorSetWithTemplateInfo * pPushDescriptorSetWithTemplateInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdPushDescriptorSetWithTemplate2( static_cast( m_commandBuffer ), reinterpret_cast( pPushDescriptorSetWithTemplateInfo ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::pushDescriptorSetWithTemplate2( const VULKAN_HPP_NAMESPACE::PushDescriptorSetWithTemplateInfo & pushDescriptorSetWithTemplateInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdPushDescriptorSetWithTemplate2 && "Function requires or " ); # endif d.vkCmdPushDescriptorSetWithTemplate2( m_commandBuffer, reinterpret_cast( &pushDescriptorSetWithTemplateInfo ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::copyMemoryToImage( const VULKAN_HPP_NAMESPACE::CopyMemoryToImageInfo * pCopyMemoryToImageInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkCopyMemoryToImage( static_cast( m_device ), reinterpret_cast( pCopyMemoryToImageInfo ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type Device::copyMemoryToImage( const VULKAN_HPP_NAMESPACE::CopyMemoryToImageInfo & copyMemoryToImageInfo, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCopyMemoryToImage && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCopyMemoryToImage( m_device, reinterpret_cast( ©MemoryToImageInfo ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::copyMemoryToImage" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::copyImageToMemory( const VULKAN_HPP_NAMESPACE::CopyImageToMemoryInfo * pCopyImageToMemoryInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkCopyImageToMemory( static_cast( m_device ), reinterpret_cast( pCopyImageToMemoryInfo ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type Device::copyImageToMemory( const VULKAN_HPP_NAMESPACE::CopyImageToMemoryInfo & copyImageToMemoryInfo, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCopyImageToMemory && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCopyImageToMemory( m_device, reinterpret_cast( ©ImageToMemoryInfo ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::copyImageToMemory" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::copyImageToImage( const VULKAN_HPP_NAMESPACE::CopyImageToImageInfo * pCopyImageToImageInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkCopyImageToImage( static_cast( m_device ), reinterpret_cast( pCopyImageToImageInfo ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type Device::copyImageToImage( const VULKAN_HPP_NAMESPACE::CopyImageToImageInfo & copyImageToImageInfo, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCopyImageToImage && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCopyImageToImage( m_device, reinterpret_cast( ©ImageToImageInfo ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::copyImageToImage" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::transitionImageLayout( uint32_t transitionCount, const VULKAN_HPP_NAMESPACE::HostImageLayoutTransitionInfo * pTransitions, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkTransitionImageLayout( static_cast( m_device ), transitionCount, reinterpret_cast( pTransitions ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type Device::transitionImageLayout( VULKAN_HPP_NAMESPACE::ArrayProxy const & transitions, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkTransitionImageLayout && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkTransitionImageLayout( m_device, transitions.size(), reinterpret_cast( transitions.data() ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::transitionImageLayout" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_KHR_surface === template VULKAN_HPP_INLINE void Instance::destroySurfaceKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDestroySurfaceKHR( static_cast( m_instance ), static_cast( surface ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Instance::destroySurfaceKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDestroySurfaceKHR && "Function requires " ); # endif d.vkDestroySurfaceKHR( m_instance, static_cast( surface ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Instance::destroy( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDestroySurfaceKHR( static_cast( m_instance ), static_cast( surface ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Instance::destroy( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDestroySurfaceKHR && "Function requires " ); # endif d.vkDestroySurfaceKHR( m_instance, static_cast( surface ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result PhysicalDevice::getSurfaceSupportKHR( uint32_t queueFamilyIndex, VULKAN_HPP_NAMESPACE::SurfaceKHR surface, VULKAN_HPP_NAMESPACE::Bool32 * pSupported, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetPhysicalDeviceSurfaceSupportKHR( static_cast( m_physicalDevice ), queueFamilyIndex, static_cast( surface ), reinterpret_cast( pSupported ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type PhysicalDevice::getSurfaceSupportKHR( uint32_t queueFamilyIndex, VULKAN_HPP_NAMESPACE::SurfaceKHR surface, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceSurfaceSupportKHR && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Bool32 supported; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetPhysicalDeviceSurfaceSupportKHR( m_physicalDevice, queueFamilyIndex, static_cast( surface ), reinterpret_cast( &supported ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceSupportKHR" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( supported ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result PhysicalDevice::getSurfaceCapabilitiesKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, VULKAN_HPP_NAMESPACE::SurfaceCapabilitiesKHR * pSurfaceCapabilities, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetPhysicalDeviceSurfaceCapabilitiesKHR( static_cast( m_physicalDevice ), static_cast( surface ), reinterpret_cast( pSurfaceCapabilities ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type PhysicalDevice::getSurfaceCapabilitiesKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceSurfaceCapabilitiesKHR && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::SurfaceCapabilitiesKHR surfaceCapabilities; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetPhysicalDeviceSurfaceCapabilitiesKHR( m_physicalDevice, static_cast( surface ), reinterpret_cast( &surfaceCapabilities ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceCapabilitiesKHR" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( surfaceCapabilities ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result PhysicalDevice::getSurfaceFormatsKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, uint32_t * pSurfaceFormatCount, VULKAN_HPP_NAMESPACE::SurfaceFormatKHR * pSurfaceFormats, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetPhysicalDeviceSurfaceFormatsKHR( static_cast( m_physicalDevice ), static_cast( surface ), pSurfaceFormatCount, reinterpret_cast( pSurfaceFormats ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getSurfaceFormatsKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceSurfaceFormatsKHR && "Function requires " ); # endif std::vector surfaceFormats; uint32_t surfaceFormatCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkGetPhysicalDeviceSurfaceFormatsKHR( m_physicalDevice, static_cast( surface ), &surfaceFormatCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && surfaceFormatCount ) { surfaceFormats.resize( surfaceFormatCount ); result = static_cast( d.vkGetPhysicalDeviceSurfaceFormatsKHR( m_physicalDevice, static_cast( surface ), &surfaceFormatCount, reinterpret_cast( surfaceFormats.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceFormatsKHR" ); VULKAN_HPP_ASSERT( surfaceFormatCount <= surfaceFormats.size() ); if ( surfaceFormatCount < surfaceFormats.size() ) { surfaceFormats.resize( surfaceFormatCount ); } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( surfaceFormats ) ); } template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getSurfaceFormatsKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, SurfaceFormatKHRAllocator & surfaceFormatKHRAllocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceSurfaceFormatsKHR && "Function requires " ); # endif std::vector surfaceFormats( surfaceFormatKHRAllocator ); uint32_t surfaceFormatCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkGetPhysicalDeviceSurfaceFormatsKHR( m_physicalDevice, static_cast( surface ), &surfaceFormatCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && surfaceFormatCount ) { surfaceFormats.resize( surfaceFormatCount ); result = static_cast( d.vkGetPhysicalDeviceSurfaceFormatsKHR( m_physicalDevice, static_cast( surface ), &surfaceFormatCount, reinterpret_cast( surfaceFormats.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceFormatsKHR" ); VULKAN_HPP_ASSERT( surfaceFormatCount <= surfaceFormats.size() ); if ( surfaceFormatCount < surfaceFormats.size() ) { surfaceFormats.resize( surfaceFormatCount ); } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( surfaceFormats ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result PhysicalDevice::getSurfacePresentModesKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, uint32_t * pPresentModeCount, VULKAN_HPP_NAMESPACE::PresentModeKHR * pPresentModes, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetPhysicalDeviceSurfacePresentModesKHR( static_cast( m_physicalDevice ), static_cast( surface ), pPresentModeCount, reinterpret_cast( pPresentModes ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getSurfacePresentModesKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceSurfacePresentModesKHR && "Function requires " ); # endif std::vector presentModes; uint32_t presentModeCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkGetPhysicalDeviceSurfacePresentModesKHR( m_physicalDevice, static_cast( surface ), &presentModeCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && presentModeCount ) { presentModes.resize( presentModeCount ); result = static_cast( d.vkGetPhysicalDeviceSurfacePresentModesKHR( m_physicalDevice, static_cast( surface ), &presentModeCount, reinterpret_cast( presentModes.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfacePresentModesKHR" ); VULKAN_HPP_ASSERT( presentModeCount <= presentModes.size() ); if ( presentModeCount < presentModes.size() ) { presentModes.resize( presentModeCount ); } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( presentModes ) ); } template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getSurfacePresentModesKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, PresentModeKHRAllocator & presentModeKHRAllocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceSurfacePresentModesKHR && "Function requires " ); # endif std::vector presentModes( presentModeKHRAllocator ); uint32_t presentModeCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkGetPhysicalDeviceSurfacePresentModesKHR( m_physicalDevice, static_cast( surface ), &presentModeCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && presentModeCount ) { presentModes.resize( presentModeCount ); result = static_cast( d.vkGetPhysicalDeviceSurfacePresentModesKHR( m_physicalDevice, static_cast( surface ), &presentModeCount, reinterpret_cast( presentModes.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfacePresentModesKHR" ); VULKAN_HPP_ASSERT( presentModeCount <= presentModes.size() ); if ( presentModeCount < presentModes.size() ) { presentModes.resize( presentModeCount ); } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( presentModes ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_KHR_swapchain === template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::createSwapchainKHR( const VULKAN_HPP_NAMESPACE::SwapchainCreateInfoKHR * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::SwapchainKHR * pSwapchain, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkCreateSwapchainKHR( static_cast( m_device ), reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSwapchain ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::createSwapchainKHR( const VULKAN_HPP_NAMESPACE::SwapchainCreateInfoKHR & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateSwapchainKHR && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateSwapchainKHR( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &swapchain ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createSwapchainKHR" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( swapchain ) ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::createSwapchainKHRUnique( const VULKAN_HPP_NAMESPACE::SwapchainCreateInfoKHR & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateSwapchainKHR && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateSwapchainKHR( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &swapchain ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createSwapchainKHRUnique" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, UniqueHandle( swapchain, detail::ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::destroySwapchainKHR( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDestroySwapchainKHR( static_cast( m_device ), static_cast( swapchain ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::destroySwapchainKHR( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDestroySwapchainKHR && "Function requires " ); # endif d.vkDestroySwapchainKHR( m_device, static_cast( swapchain ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDestroySwapchainKHR( static_cast( m_device ), static_cast( swapchain ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDestroySwapchainKHR && "Function requires " ); # endif d.vkDestroySwapchainKHR( m_device, static_cast( swapchain ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getSwapchainImagesKHR( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, uint32_t * pSwapchainImageCount, VULKAN_HPP_NAMESPACE::Image * pSwapchainImages, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetSwapchainImagesKHR( static_cast( m_device ), static_cast( swapchain ), pSwapchainImageCount, reinterpret_cast( pSwapchainImages ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::getSwapchainImagesKHR( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetSwapchainImagesKHR && "Function requires " ); # endif std::vector swapchainImages; uint32_t swapchainImageCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkGetSwapchainImagesKHR( m_device, static_cast( swapchain ), &swapchainImageCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && swapchainImageCount ) { swapchainImages.resize( swapchainImageCount ); result = static_cast( d.vkGetSwapchainImagesKHR( m_device, static_cast( swapchain ), &swapchainImageCount, reinterpret_cast( swapchainImages.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getSwapchainImagesKHR" ); VULKAN_HPP_ASSERT( swapchainImageCount <= swapchainImages.size() ); if ( swapchainImageCount < swapchainImages.size() ) { swapchainImages.resize( swapchainImageCount ); } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( swapchainImages ) ); } template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::getSwapchainImagesKHR( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, ImageAllocator & imageAllocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetSwapchainImagesKHR && "Function requires " ); # endif std::vector swapchainImages( imageAllocator ); uint32_t swapchainImageCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkGetSwapchainImagesKHR( m_device, static_cast( swapchain ), &swapchainImageCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && swapchainImageCount ) { swapchainImages.resize( swapchainImageCount ); result = static_cast( d.vkGetSwapchainImagesKHR( m_device, static_cast( swapchain ), &swapchainImageCount, reinterpret_cast( swapchainImages.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getSwapchainImagesKHR" ); VULKAN_HPP_ASSERT( swapchainImageCount <= swapchainImages.size() ); if ( swapchainImageCount < swapchainImages.size() ) { swapchainImages.resize( swapchainImageCount ); } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( swapchainImages ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::acquireNextImageKHR( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, uint64_t timeout, VULKAN_HPP_NAMESPACE::Semaphore semaphore, VULKAN_HPP_NAMESPACE::Fence fence, uint32_t * pImageIndex, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkAcquireNextImageKHR( static_cast( m_device ), static_cast( swapchain ), timeout, static_cast( semaphore ), static_cast( fence ), pImageIndex ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue Device::acquireNextImageKHR( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, uint64_t timeout, VULKAN_HPP_NAMESPACE::Semaphore semaphore, VULKAN_HPP_NAMESPACE::Fence fence, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkAcquireNextImageKHR && "Function requires " ); # endif uint32_t imageIndex; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkAcquireNextImageKHR( m_device, static_cast( swapchain ), timeout, static_cast( semaphore ), static_cast( fence ), &imageIndex ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::acquireNextImageKHR", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eTimeout, VULKAN_HPP_NAMESPACE::Result::eNotReady, VULKAN_HPP_NAMESPACE::Result::eSuboptimalKHR } ); return ResultValue( result, std::move( imageIndex ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Queue::presentKHR( const VULKAN_HPP_NAMESPACE::PresentInfoKHR * pPresentInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkQueuePresentKHR( static_cast( m_queue ), reinterpret_cast( pPresentInfo ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Queue::presentKHR( const VULKAN_HPP_NAMESPACE::PresentInfoKHR & presentInfo, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkQueuePresentKHR && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkQueuePresentKHR( m_queue, reinterpret_cast( &presentInfo ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Queue::presentKHR", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eSuboptimalKHR } ); return static_cast( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getGroupPresentCapabilitiesKHR( VULKAN_HPP_NAMESPACE::DeviceGroupPresentCapabilitiesKHR * pDeviceGroupPresentCapabilities, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetDeviceGroupPresentCapabilitiesKHR( static_cast( m_device ), reinterpret_cast( pDeviceGroupPresentCapabilities ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::getGroupPresentCapabilitiesKHR( Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetDeviceGroupPresentCapabilitiesKHR && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::DeviceGroupPresentCapabilitiesKHR deviceGroupPresentCapabilities; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetDeviceGroupPresentCapabilitiesKHR( m_device, reinterpret_cast( &deviceGroupPresentCapabilities ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getGroupPresentCapabilitiesKHR" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( deviceGroupPresentCapabilities ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getGroupSurfacePresentModesKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, VULKAN_HPP_NAMESPACE::DeviceGroupPresentModeFlagsKHR * pModes, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetDeviceGroupSurfacePresentModesKHR( static_cast( m_device ), static_cast( surface ), reinterpret_cast( pModes ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::getGroupSurfacePresentModesKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetDeviceGroupSurfacePresentModesKHR && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::DeviceGroupPresentModeFlagsKHR modes; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetDeviceGroupSurfacePresentModesKHR( m_device, static_cast( surface ), reinterpret_cast( &modes ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getGroupSurfacePresentModesKHR" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( modes ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result PhysicalDevice::getPresentRectanglesKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, uint32_t * pRectCount, VULKAN_HPP_NAMESPACE::Rect2D * pRects, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetPhysicalDevicePresentRectanglesKHR( static_cast( m_physicalDevice ), static_cast( surface ), pRectCount, reinterpret_cast( pRects ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getPresentRectanglesKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDevicePresentRectanglesKHR && "Function requires or " ); # endif std::vector rects; uint32_t rectCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkGetPhysicalDevicePresentRectanglesKHR( m_physicalDevice, static_cast( surface ), &rectCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && rectCount ) { rects.resize( rectCount ); result = static_cast( d.vkGetPhysicalDevicePresentRectanglesKHR( m_physicalDevice, static_cast( surface ), &rectCount, reinterpret_cast( rects.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getPresentRectanglesKHR" ); VULKAN_HPP_ASSERT( rectCount <= rects.size() ); if ( rectCount < rects.size() ) { rects.resize( rectCount ); } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( rects ) ); } template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getPresentRectanglesKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, Rect2DAllocator & rect2DAllocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDevicePresentRectanglesKHR && "Function requires or " ); # endif std::vector rects( rect2DAllocator ); uint32_t rectCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkGetPhysicalDevicePresentRectanglesKHR( m_physicalDevice, static_cast( surface ), &rectCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && rectCount ) { rects.resize( rectCount ); result = static_cast( d.vkGetPhysicalDevicePresentRectanglesKHR( m_physicalDevice, static_cast( surface ), &rectCount, reinterpret_cast( rects.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getPresentRectanglesKHR" ); VULKAN_HPP_ASSERT( rectCount <= rects.size() ); if ( rectCount < rects.size() ) { rects.resize( rectCount ); } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( rects ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::acquireNextImage2KHR( const VULKAN_HPP_NAMESPACE::AcquireNextImageInfoKHR * pAcquireInfo, uint32_t * pImageIndex, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkAcquireNextImage2KHR( static_cast( m_device ), reinterpret_cast( pAcquireInfo ), pImageIndex ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue Device::acquireNextImage2KHR( const VULKAN_HPP_NAMESPACE::AcquireNextImageInfoKHR & acquireInfo, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkAcquireNextImage2KHR && "Function requires or " ); # endif uint32_t imageIndex; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkAcquireNextImage2KHR( m_device, reinterpret_cast( &acquireInfo ), &imageIndex ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::acquireNextImage2KHR", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eTimeout, VULKAN_HPP_NAMESPACE::Result::eNotReady, VULKAN_HPP_NAMESPACE::Result::eSuboptimalKHR } ); return ResultValue( result, std::move( imageIndex ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_KHR_display === template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result PhysicalDevice::getDisplayPropertiesKHR( uint32_t * pPropertyCount, VULKAN_HPP_NAMESPACE::DisplayPropertiesKHR * pProperties, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetPhysicalDeviceDisplayPropertiesKHR( static_cast( m_physicalDevice ), pPropertyCount, reinterpret_cast( pProperties ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template < typename DisplayPropertiesKHRAllocator, typename Dispatch, typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getDisplayPropertiesKHR( Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceDisplayPropertiesKHR && "Function requires " ); # endif std::vector properties; uint32_t propertyCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkGetPhysicalDeviceDisplayPropertiesKHR( m_physicalDevice, &propertyCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); result = static_cast( d.vkGetPhysicalDeviceDisplayPropertiesKHR( m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPropertiesKHR" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( properties ) ); } template < typename DisplayPropertiesKHRAllocator, typename Dispatch, typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getDisplayPropertiesKHR( DisplayPropertiesKHRAllocator & displayPropertiesKHRAllocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceDisplayPropertiesKHR && "Function requires " ); # endif std::vector properties( displayPropertiesKHRAllocator ); uint32_t propertyCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkGetPhysicalDeviceDisplayPropertiesKHR( m_physicalDevice, &propertyCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); result = static_cast( d.vkGetPhysicalDeviceDisplayPropertiesKHR( m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPropertiesKHR" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( properties ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result PhysicalDevice::getDisplayPlanePropertiesKHR( uint32_t * pPropertyCount, VULKAN_HPP_NAMESPACE::DisplayPlanePropertiesKHR * pProperties, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetPhysicalDeviceDisplayPlanePropertiesKHR( static_cast( m_physicalDevice ), pPropertyCount, reinterpret_cast( pProperties ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template < typename DisplayPlanePropertiesKHRAllocator, typename Dispatch, typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getDisplayPlanePropertiesKHR( Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceDisplayPlanePropertiesKHR && "Function requires " ); # endif std::vector properties; uint32_t propertyCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkGetPhysicalDeviceDisplayPlanePropertiesKHR( m_physicalDevice, &propertyCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); result = static_cast( d.vkGetPhysicalDeviceDisplayPlanePropertiesKHR( m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPlanePropertiesKHR" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( properties ) ); } template < typename DisplayPlanePropertiesKHRAllocator, typename Dispatch, typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getDisplayPlanePropertiesKHR( DisplayPlanePropertiesKHRAllocator & displayPlanePropertiesKHRAllocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceDisplayPlanePropertiesKHR && "Function requires " ); # endif std::vector properties( displayPlanePropertiesKHRAllocator ); uint32_t propertyCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkGetPhysicalDeviceDisplayPlanePropertiesKHR( m_physicalDevice, &propertyCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); result = static_cast( d.vkGetPhysicalDeviceDisplayPlanePropertiesKHR( m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPlanePropertiesKHR" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( properties ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result PhysicalDevice::getDisplayPlaneSupportedDisplaysKHR( uint32_t planeIndex, uint32_t * pDisplayCount, VULKAN_HPP_NAMESPACE::DisplayKHR * pDisplays, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetDisplayPlaneSupportedDisplaysKHR( static_cast( m_physicalDevice ), planeIndex, pDisplayCount, reinterpret_cast( pDisplays ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getDisplayPlaneSupportedDisplaysKHR( uint32_t planeIndex, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetDisplayPlaneSupportedDisplaysKHR && "Function requires " ); # endif std::vector displays; uint32_t displayCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkGetDisplayPlaneSupportedDisplaysKHR( m_physicalDevice, planeIndex, &displayCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && displayCount ) { displays.resize( displayCount ); result = static_cast( d.vkGetDisplayPlaneSupportedDisplaysKHR( m_physicalDevice, planeIndex, &displayCount, reinterpret_cast( displays.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPlaneSupportedDisplaysKHR" ); VULKAN_HPP_ASSERT( displayCount <= displays.size() ); if ( displayCount < displays.size() ) { displays.resize( displayCount ); } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( displays ) ); } template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getDisplayPlaneSupportedDisplaysKHR( uint32_t planeIndex, DisplayKHRAllocator & displayKHRAllocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetDisplayPlaneSupportedDisplaysKHR && "Function requires " ); # endif std::vector displays( displayKHRAllocator ); uint32_t displayCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkGetDisplayPlaneSupportedDisplaysKHR( m_physicalDevice, planeIndex, &displayCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && displayCount ) { displays.resize( displayCount ); result = static_cast( d.vkGetDisplayPlaneSupportedDisplaysKHR( m_physicalDevice, planeIndex, &displayCount, reinterpret_cast( displays.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPlaneSupportedDisplaysKHR" ); VULKAN_HPP_ASSERT( displayCount <= displays.size() ); if ( displayCount < displays.size() ) { displays.resize( displayCount ); } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( displays ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result PhysicalDevice::getDisplayModePropertiesKHR( VULKAN_HPP_NAMESPACE::DisplayKHR display, uint32_t * pPropertyCount, VULKAN_HPP_NAMESPACE::DisplayModePropertiesKHR * pProperties, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetDisplayModePropertiesKHR( static_cast( m_physicalDevice ), static_cast( display ), pPropertyCount, reinterpret_cast( pProperties ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getDisplayModePropertiesKHR( VULKAN_HPP_NAMESPACE::DisplayKHR display, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetDisplayModePropertiesKHR && "Function requires " ); # endif std::vector properties; uint32_t propertyCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkGetDisplayModePropertiesKHR( m_physicalDevice, static_cast( display ), &propertyCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); result = static_cast( d.vkGetDisplayModePropertiesKHR( m_physicalDevice, static_cast( display ), &propertyCount, reinterpret_cast( properties.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayModePropertiesKHR" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( properties ) ); } template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getDisplayModePropertiesKHR( VULKAN_HPP_NAMESPACE::DisplayKHR display, DisplayModePropertiesKHRAllocator & displayModePropertiesKHRAllocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetDisplayModePropertiesKHR && "Function requires " ); # endif std::vector properties( displayModePropertiesKHRAllocator ); uint32_t propertyCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkGetDisplayModePropertiesKHR( m_physicalDevice, static_cast( display ), &propertyCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); result = static_cast( d.vkGetDisplayModePropertiesKHR( m_physicalDevice, static_cast( display ), &propertyCount, reinterpret_cast( properties.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayModePropertiesKHR" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( properties ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result PhysicalDevice::createDisplayModeKHR( VULKAN_HPP_NAMESPACE::DisplayKHR display, const VULKAN_HPP_NAMESPACE::DisplayModeCreateInfoKHR * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::DisplayModeKHR * pMode, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkCreateDisplayModeKHR( static_cast( m_physicalDevice ), static_cast( display ), reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pMode ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type PhysicalDevice::createDisplayModeKHR( VULKAN_HPP_NAMESPACE::DisplayKHR display, const VULKAN_HPP_NAMESPACE::DisplayModeCreateInfoKHR & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateDisplayModeKHR && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::DisplayModeKHR mode; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateDisplayModeKHR( m_physicalDevice, static_cast( display ), reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &mode ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::createDisplayModeKHR" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( mode ) ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::createDisplayModeKHRUnique( VULKAN_HPP_NAMESPACE::DisplayKHR display, const VULKAN_HPP_NAMESPACE::DisplayModeCreateInfoKHR & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateDisplayModeKHR && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::DisplayModeKHR mode; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateDisplayModeKHR( m_physicalDevice, static_cast( display ), reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &mode ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::createDisplayModeKHRUnique" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, UniqueHandle( mode, detail::ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result PhysicalDevice::getDisplayPlaneCapabilitiesKHR( VULKAN_HPP_NAMESPACE::DisplayModeKHR mode, uint32_t planeIndex, VULKAN_HPP_NAMESPACE::DisplayPlaneCapabilitiesKHR * pCapabilities, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetDisplayPlaneCapabilitiesKHR( static_cast( m_physicalDevice ), static_cast( mode ), planeIndex, reinterpret_cast( pCapabilities ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type PhysicalDevice::getDisplayPlaneCapabilitiesKHR( VULKAN_HPP_NAMESPACE::DisplayModeKHR mode, uint32_t planeIndex, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetDisplayPlaneCapabilitiesKHR && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::DisplayPlaneCapabilitiesKHR capabilities; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetDisplayPlaneCapabilitiesKHR( m_physicalDevice, static_cast( mode ), planeIndex, reinterpret_cast( &capabilities ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPlaneCapabilitiesKHR" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( capabilities ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Instance::createDisplayPlaneSurfaceKHR( const VULKAN_HPP_NAMESPACE::DisplaySurfaceCreateInfoKHR * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::SurfaceKHR * pSurface, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkCreateDisplayPlaneSurfaceKHR( static_cast( m_instance ), reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSurface ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Instance::createDisplayPlaneSurfaceKHR( const VULKAN_HPP_NAMESPACE::DisplaySurfaceCreateInfoKHR & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateDisplayPlaneSurfaceKHR && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::SurfaceKHR surface; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateDisplayPlaneSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::createDisplayPlaneSurfaceKHR" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( surface ) ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Instance::createDisplayPlaneSurfaceKHRUnique( const VULKAN_HPP_NAMESPACE::DisplaySurfaceCreateInfoKHR & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateDisplayPlaneSurfaceKHR && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::SurfaceKHR surface; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateDisplayPlaneSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::createDisplayPlaneSurfaceKHRUnique" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, UniqueHandle( surface, detail::ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_KHR_display_swapchain === template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::createSharedSwapchainsKHR( uint32_t swapchainCount, const VULKAN_HPP_NAMESPACE::SwapchainCreateInfoKHR * pCreateInfos, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::SwapchainKHR * pSwapchains, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkCreateSharedSwapchainsKHR( static_cast( m_device ), swapchainCount, reinterpret_cast( pCreateInfos ), reinterpret_cast( pAllocator ), reinterpret_cast( pSwapchains ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::createSharedSwapchainsKHR( VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateSharedSwapchainsKHR && "Function requires " ); # endif std::vector swapchains( createInfos.size() ); VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateSharedSwapchainsKHR( m_device, createInfos.size(), reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( swapchains.data() ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createSharedSwapchainsKHR" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( swapchains ) ); } template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::createSharedSwapchainsKHR( VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, Optional allocator, SwapchainKHRAllocator & swapchainKHRAllocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateSharedSwapchainsKHR && "Function requires " ); # endif std::vector swapchains( createInfos.size(), swapchainKHRAllocator ); VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateSharedSwapchainsKHR( m_device, createInfos.size(), reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( swapchains.data() ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createSharedSwapchainsKHR" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( swapchains ) ); } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::createSharedSwapchainKHR( const VULKAN_HPP_NAMESPACE::SwapchainCreateInfoKHR & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateSharedSwapchainsKHR && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateSharedSwapchainsKHR( m_device, 1, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &swapchain ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createSharedSwapchainKHR" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( swapchain ) ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE template >::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType, SwapchainKHRAllocator>>::type Device::createSharedSwapchainsKHRUnique( VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateSharedSwapchainsKHR && "Function requires " ); # endif std::vector swapchains( createInfos.size() ); VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateSharedSwapchainsKHR( m_device, createInfos.size(), reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( swapchains.data() ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createSharedSwapchainsKHRUnique" ); std::vector, SwapchainKHRAllocator> uniqueSwapchains; uniqueSwapchains.reserve( createInfos.size() ); detail::ObjectDestroy deleter( *this, allocator, d ); for ( auto const & swapchain : swapchains ) { uniqueSwapchains.push_back( UniqueHandle( swapchain, deleter ) ); } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( uniqueSwapchains ) ); } template >::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType, SwapchainKHRAllocator>>::type Device::createSharedSwapchainsKHRUnique( VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, Optional allocator, SwapchainKHRAllocator & swapchainKHRAllocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateSharedSwapchainsKHR && "Function requires " ); # endif std::vector swapchains( createInfos.size() ); VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateSharedSwapchainsKHR( m_device, createInfos.size(), reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( swapchains.data() ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createSharedSwapchainsKHRUnique" ); std::vector, SwapchainKHRAllocator> uniqueSwapchains( swapchainKHRAllocator ); uniqueSwapchains.reserve( createInfos.size() ); detail::ObjectDestroy deleter( *this, allocator, d ); for ( auto const & swapchain : swapchains ) { uniqueSwapchains.push_back( UniqueHandle( swapchain, deleter ) ); } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( uniqueSwapchains ) ); } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::createSharedSwapchainKHRUnique( const VULKAN_HPP_NAMESPACE::SwapchainCreateInfoKHR & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateSharedSwapchainsKHR && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateSharedSwapchainsKHR( m_device, 1, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &swapchain ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createSharedSwapchainKHRUnique" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, UniqueHandle( swapchain, detail::ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #if defined( VK_USE_PLATFORM_XLIB_KHR ) //=== VK_KHR_xlib_surface === template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Instance::createXlibSurfaceKHR( const VULKAN_HPP_NAMESPACE::XlibSurfaceCreateInfoKHR * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::SurfaceKHR * pSurface, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkCreateXlibSurfaceKHR( static_cast( m_instance ), reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSurface ) ) ); } # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Instance::createXlibSurfaceKHR( const VULKAN_HPP_NAMESPACE::XlibSurfaceCreateInfoKHR & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateXlibSurfaceKHR && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::SurfaceKHR surface; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateXlibSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::createXlibSurfaceKHR" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( surface ) ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Instance::createXlibSurfaceKHRUnique( const VULKAN_HPP_NAMESPACE::XlibSurfaceCreateInfoKHR & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateXlibSurfaceKHR && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::SurfaceKHR surface; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateXlibSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::createXlibSurfaceKHRUnique" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, UniqueHandle( surface, detail::ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE Bool32 PhysicalDevice::getXlibPresentationSupportKHR( uint32_t queueFamilyIndex, Display * dpy, VisualID visualID, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetPhysicalDeviceXlibPresentationSupportKHR( static_cast( m_physicalDevice ), queueFamilyIndex, dpy, visualID ) ); } # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Bool32 PhysicalDevice::getXlibPresentationSupportKHR( uint32_t queueFamilyIndex, Display & dpy, VisualID visualID, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceXlibPresentationSupportKHR && "Function requires " ); # endif VkBool32 result = d.vkGetPhysicalDeviceXlibPresentationSupportKHR( m_physicalDevice, queueFamilyIndex, &dpy, visualID ); return static_cast( result ); } # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #endif /*VK_USE_PLATFORM_XLIB_KHR*/ #if defined( VK_USE_PLATFORM_XCB_KHR ) //=== VK_KHR_xcb_surface === template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Instance::createXcbSurfaceKHR( const VULKAN_HPP_NAMESPACE::XcbSurfaceCreateInfoKHR * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::SurfaceKHR * pSurface, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkCreateXcbSurfaceKHR( static_cast( m_instance ), reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSurface ) ) ); } # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Instance::createXcbSurfaceKHR( const VULKAN_HPP_NAMESPACE::XcbSurfaceCreateInfoKHR & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateXcbSurfaceKHR && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::SurfaceKHR surface; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateXcbSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::createXcbSurfaceKHR" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( surface ) ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Instance::createXcbSurfaceKHRUnique( const VULKAN_HPP_NAMESPACE::XcbSurfaceCreateInfoKHR & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateXcbSurfaceKHR && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::SurfaceKHR surface; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateXcbSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::createXcbSurfaceKHRUnique" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, UniqueHandle( surface, detail::ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE Bool32 PhysicalDevice::getXcbPresentationSupportKHR( uint32_t queueFamilyIndex, xcb_connection_t * connection, xcb_visualid_t visual_id, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetPhysicalDeviceXcbPresentationSupportKHR( static_cast( m_physicalDevice ), queueFamilyIndex, connection, visual_id ) ); } # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Bool32 PhysicalDevice::getXcbPresentationSupportKHR( uint32_t queueFamilyIndex, xcb_connection_t & connection, xcb_visualid_t visual_id, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceXcbPresentationSupportKHR && "Function requires " ); # endif VkBool32 result = d.vkGetPhysicalDeviceXcbPresentationSupportKHR( m_physicalDevice, queueFamilyIndex, &connection, visual_id ); return static_cast( result ); } # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #endif /*VK_USE_PLATFORM_XCB_KHR*/ #if defined( VK_USE_PLATFORM_WAYLAND_KHR ) //=== VK_KHR_wayland_surface === template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Instance::createWaylandSurfaceKHR( const VULKAN_HPP_NAMESPACE::WaylandSurfaceCreateInfoKHR * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::SurfaceKHR * pSurface, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkCreateWaylandSurfaceKHR( static_cast( m_instance ), reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSurface ) ) ); } # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Instance::createWaylandSurfaceKHR( const VULKAN_HPP_NAMESPACE::WaylandSurfaceCreateInfoKHR & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateWaylandSurfaceKHR && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::SurfaceKHR surface; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateWaylandSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::createWaylandSurfaceKHR" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( surface ) ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Instance::createWaylandSurfaceKHRUnique( const VULKAN_HPP_NAMESPACE::WaylandSurfaceCreateInfoKHR & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateWaylandSurfaceKHR && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::SurfaceKHR surface; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateWaylandSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::createWaylandSurfaceKHRUnique" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, UniqueHandle( surface, detail::ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE Bool32 PhysicalDevice::getWaylandPresentationSupportKHR( uint32_t queueFamilyIndex, struct wl_display * display, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetPhysicalDeviceWaylandPresentationSupportKHR( static_cast( m_physicalDevice ), queueFamilyIndex, display ) ); } # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Bool32 PhysicalDevice::getWaylandPresentationSupportKHR( uint32_t queueFamilyIndex, struct wl_display & display, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceWaylandPresentationSupportKHR && "Function requires " ); # endif VkBool32 result = d.vkGetPhysicalDeviceWaylandPresentationSupportKHR( m_physicalDevice, queueFamilyIndex, &display ); return static_cast( result ); } # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #endif /*VK_USE_PLATFORM_WAYLAND_KHR*/ #if defined( VK_USE_PLATFORM_ANDROID_KHR ) //=== VK_KHR_android_surface === template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Instance::createAndroidSurfaceKHR( const VULKAN_HPP_NAMESPACE::AndroidSurfaceCreateInfoKHR * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::SurfaceKHR * pSurface, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkCreateAndroidSurfaceKHR( static_cast( m_instance ), reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSurface ) ) ); } # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Instance::createAndroidSurfaceKHR( const VULKAN_HPP_NAMESPACE::AndroidSurfaceCreateInfoKHR & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateAndroidSurfaceKHR && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::SurfaceKHR surface; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateAndroidSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::createAndroidSurfaceKHR" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( surface ) ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Instance::createAndroidSurfaceKHRUnique( const VULKAN_HPP_NAMESPACE::AndroidSurfaceCreateInfoKHR & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateAndroidSurfaceKHR && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::SurfaceKHR surface; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateAndroidSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::createAndroidSurfaceKHRUnique" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, UniqueHandle( surface, detail::ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #endif /*VK_USE_PLATFORM_ANDROID_KHR*/ #if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_KHR_win32_surface === template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Instance::createWin32SurfaceKHR( const VULKAN_HPP_NAMESPACE::Win32SurfaceCreateInfoKHR * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::SurfaceKHR * pSurface, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkCreateWin32SurfaceKHR( static_cast( m_instance ), reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSurface ) ) ); } # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Instance::createWin32SurfaceKHR( const VULKAN_HPP_NAMESPACE::Win32SurfaceCreateInfoKHR & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateWin32SurfaceKHR && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::SurfaceKHR surface; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateWin32SurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::createWin32SurfaceKHR" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( surface ) ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Instance::createWin32SurfaceKHRUnique( const VULKAN_HPP_NAMESPACE::Win32SurfaceCreateInfoKHR & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateWin32SurfaceKHR && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::SurfaceKHR surface; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateWin32SurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::createWin32SurfaceKHRUnique" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, UniqueHandle( surface, detail::ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE Bool32 PhysicalDevice::getWin32PresentationSupportKHR( uint32_t queueFamilyIndex, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetPhysicalDeviceWin32PresentationSupportKHR( static_cast( m_physicalDevice ), queueFamilyIndex ) ); } #endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_EXT_debug_report === template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Instance::createDebugReportCallbackEXT( const VULKAN_HPP_NAMESPACE::DebugReportCallbackCreateInfoEXT * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::DebugReportCallbackEXT * pCallback, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkCreateDebugReportCallbackEXT( static_cast( m_instance ), reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pCallback ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Instance::createDebugReportCallbackEXT( const VULKAN_HPP_NAMESPACE::DebugReportCallbackCreateInfoEXT & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateDebugReportCallbackEXT && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::DebugReportCallbackEXT callback; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateDebugReportCallbackEXT( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &callback ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::createDebugReportCallbackEXT" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( callback ) ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Instance::createDebugReportCallbackEXTUnique( const VULKAN_HPP_NAMESPACE::DebugReportCallbackCreateInfoEXT & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateDebugReportCallbackEXT && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::DebugReportCallbackEXT callback; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateDebugReportCallbackEXT( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &callback ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::createDebugReportCallbackEXTUnique" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, UniqueHandle( callback, detail::ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Instance::destroyDebugReportCallbackEXT( VULKAN_HPP_NAMESPACE::DebugReportCallbackEXT callback, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDestroyDebugReportCallbackEXT( static_cast( m_instance ), static_cast( callback ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Instance::destroyDebugReportCallbackEXT( VULKAN_HPP_NAMESPACE::DebugReportCallbackEXT callback, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDestroyDebugReportCallbackEXT && "Function requires " ); # endif d.vkDestroyDebugReportCallbackEXT( m_instance, static_cast( callback ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Instance::destroy( VULKAN_HPP_NAMESPACE::DebugReportCallbackEXT callback, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDestroyDebugReportCallbackEXT( static_cast( m_instance ), static_cast( callback ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Instance::destroy( VULKAN_HPP_NAMESPACE::DebugReportCallbackEXT callback, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDestroyDebugReportCallbackEXT && "Function requires " ); # endif d.vkDestroyDebugReportCallbackEXT( m_instance, static_cast( callback ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Instance::debugReportMessageEXT( VULKAN_HPP_NAMESPACE::DebugReportFlagsEXT flags, VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT objectType_, uint64_t object, size_t location, int32_t messageCode, const char * pLayerPrefix, const char * pMessage, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDebugReportMessageEXT( static_cast( m_instance ), static_cast( flags ), static_cast( objectType_ ), object, location, messageCode, pLayerPrefix, pMessage ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Instance::debugReportMessageEXT( VULKAN_HPP_NAMESPACE::DebugReportFlagsEXT flags, VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT objectType_, uint64_t object, size_t location, int32_t messageCode, const std::string & layerPrefix, const std::string & message, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDebugReportMessageEXT && "Function requires " ); # endif d.vkDebugReportMessageEXT( m_instance, static_cast( flags ), static_cast( objectType_ ), object, location, messageCode, layerPrefix.c_str(), message.c_str() ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_EXT_debug_marker === template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::debugMarkerSetObjectTagEXT( const VULKAN_HPP_NAMESPACE::DebugMarkerObjectTagInfoEXT * pTagInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkDebugMarkerSetObjectTagEXT( static_cast( m_device ), reinterpret_cast( pTagInfo ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type Device::debugMarkerSetObjectTagEXT( const VULKAN_HPP_NAMESPACE::DebugMarkerObjectTagInfoEXT & tagInfo, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDebugMarkerSetObjectTagEXT && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkDebugMarkerSetObjectTagEXT( m_device, reinterpret_cast( &tagInfo ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::debugMarkerSetObjectTagEXT" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::debugMarkerSetObjectNameEXT( const VULKAN_HPP_NAMESPACE::DebugMarkerObjectNameInfoEXT * pNameInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkDebugMarkerSetObjectNameEXT( static_cast( m_device ), reinterpret_cast( pNameInfo ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type Device::debugMarkerSetObjectNameEXT( const VULKAN_HPP_NAMESPACE::DebugMarkerObjectNameInfoEXT & nameInfo, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDebugMarkerSetObjectNameEXT && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkDebugMarkerSetObjectNameEXT( m_device, reinterpret_cast( &nameInfo ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::debugMarkerSetObjectNameEXT" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::debugMarkerBeginEXT( const VULKAN_HPP_NAMESPACE::DebugMarkerMarkerInfoEXT * pMarkerInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdDebugMarkerBeginEXT( static_cast( m_commandBuffer ), reinterpret_cast( pMarkerInfo ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::debugMarkerBeginEXT( const VULKAN_HPP_NAMESPACE::DebugMarkerMarkerInfoEXT & markerInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdDebugMarkerBeginEXT && "Function requires " ); # endif d.vkCmdDebugMarkerBeginEXT( m_commandBuffer, reinterpret_cast( &markerInfo ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::debugMarkerEndEXT( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdDebugMarkerEndEXT( static_cast( m_commandBuffer ) ); } template VULKAN_HPP_INLINE void CommandBuffer::debugMarkerInsertEXT( const VULKAN_HPP_NAMESPACE::DebugMarkerMarkerInfoEXT * pMarkerInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdDebugMarkerInsertEXT( static_cast( m_commandBuffer ), reinterpret_cast( pMarkerInfo ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::debugMarkerInsertEXT( const VULKAN_HPP_NAMESPACE::DebugMarkerMarkerInfoEXT & markerInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdDebugMarkerInsertEXT && "Function requires " ); # endif d.vkCmdDebugMarkerInsertEXT( m_commandBuffer, reinterpret_cast( &markerInfo ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_KHR_video_queue === template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result PhysicalDevice::getVideoCapabilitiesKHR( const VULKAN_HPP_NAMESPACE::VideoProfileInfoKHR * pVideoProfile, VULKAN_HPP_NAMESPACE::VideoCapabilitiesKHR * pCapabilities, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetPhysicalDeviceVideoCapabilitiesKHR( static_cast( m_physicalDevice ), reinterpret_cast( pVideoProfile ), reinterpret_cast( pCapabilities ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type PhysicalDevice::getVideoCapabilitiesKHR( const VULKAN_HPP_NAMESPACE::VideoProfileInfoKHR & videoProfile, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceVideoCapabilitiesKHR && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::VideoCapabilitiesKHR capabilities; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetPhysicalDeviceVideoCapabilitiesKHR( m_physicalDevice, reinterpret_cast( &videoProfile ), reinterpret_cast( &capabilities ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getVideoCapabilitiesKHR" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( capabilities ) ); } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getVideoCapabilitiesKHR( const VULKAN_HPP_NAMESPACE::VideoProfileInfoKHR & videoProfile, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceVideoCapabilitiesKHR && "Function requires " ); # endif StructureChain structureChain; VULKAN_HPP_NAMESPACE::VideoCapabilitiesKHR & capabilities = structureChain.template get(); VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetPhysicalDeviceVideoCapabilitiesKHR( m_physicalDevice, reinterpret_cast( &videoProfile ), reinterpret_cast( &capabilities ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getVideoCapabilitiesKHR" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( structureChain ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result PhysicalDevice::getVideoFormatPropertiesKHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceVideoFormatInfoKHR * pVideoFormatInfo, uint32_t * pVideoFormatPropertyCount, VULKAN_HPP_NAMESPACE::VideoFormatPropertiesKHR * pVideoFormatProperties, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetPhysicalDeviceVideoFormatPropertiesKHR( static_cast( m_physicalDevice ), reinterpret_cast( pVideoFormatInfo ), pVideoFormatPropertyCount, reinterpret_cast( pVideoFormatProperties ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getVideoFormatPropertiesKHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceVideoFormatInfoKHR & videoFormatInfo, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceVideoFormatPropertiesKHR && "Function requires " ); # endif std::vector videoFormatProperties; uint32_t videoFormatPropertyCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkGetPhysicalDeviceVideoFormatPropertiesKHR( m_physicalDevice, reinterpret_cast( &videoFormatInfo ), &videoFormatPropertyCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && videoFormatPropertyCount ) { videoFormatProperties.resize( videoFormatPropertyCount ); result = static_cast( d.vkGetPhysicalDeviceVideoFormatPropertiesKHR( m_physicalDevice, reinterpret_cast( &videoFormatInfo ), &videoFormatPropertyCount, reinterpret_cast( videoFormatProperties.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getVideoFormatPropertiesKHR" ); VULKAN_HPP_ASSERT( videoFormatPropertyCount <= videoFormatProperties.size() ); if ( videoFormatPropertyCount < videoFormatProperties.size() ) { videoFormatProperties.resize( videoFormatPropertyCount ); } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( videoFormatProperties ) ); } template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getVideoFormatPropertiesKHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceVideoFormatInfoKHR & videoFormatInfo, VideoFormatPropertiesKHRAllocator & videoFormatPropertiesKHRAllocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceVideoFormatPropertiesKHR && "Function requires " ); # endif std::vector videoFormatProperties( videoFormatPropertiesKHRAllocator ); uint32_t videoFormatPropertyCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkGetPhysicalDeviceVideoFormatPropertiesKHR( m_physicalDevice, reinterpret_cast( &videoFormatInfo ), &videoFormatPropertyCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && videoFormatPropertyCount ) { videoFormatProperties.resize( videoFormatPropertyCount ); result = static_cast( d.vkGetPhysicalDeviceVideoFormatPropertiesKHR( m_physicalDevice, reinterpret_cast( &videoFormatInfo ), &videoFormatPropertyCount, reinterpret_cast( videoFormatProperties.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getVideoFormatPropertiesKHR" ); VULKAN_HPP_ASSERT( videoFormatPropertyCount <= videoFormatProperties.size() ); if ( videoFormatPropertyCount < videoFormatProperties.size() ) { videoFormatProperties.resize( videoFormatPropertyCount ); } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( videoFormatProperties ) ); } template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getVideoFormatPropertiesKHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceVideoFormatInfoKHR & videoFormatInfo, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceVideoFormatPropertiesKHR && "Function requires " ); # endif std::vector structureChains; std::vector videoFormatProperties; uint32_t videoFormatPropertyCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkGetPhysicalDeviceVideoFormatPropertiesKHR( m_physicalDevice, reinterpret_cast( &videoFormatInfo ), &videoFormatPropertyCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && videoFormatPropertyCount ) { structureChains.resize( videoFormatPropertyCount ); videoFormatProperties.resize( videoFormatPropertyCount ); for ( uint32_t i = 0; i < videoFormatPropertyCount; i++ ) { videoFormatProperties[i].pNext = structureChains[i].template get().pNext; } result = static_cast( d.vkGetPhysicalDeviceVideoFormatPropertiesKHR( m_physicalDevice, reinterpret_cast( &videoFormatInfo ), &videoFormatPropertyCount, reinterpret_cast( videoFormatProperties.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getVideoFormatPropertiesKHR" ); VULKAN_HPP_ASSERT( videoFormatPropertyCount <= videoFormatProperties.size() ); if ( videoFormatPropertyCount < videoFormatProperties.size() ) { structureChains.resize( videoFormatPropertyCount ); } for ( uint32_t i = 0; i < videoFormatPropertyCount; i++ ) { structureChains[i].template get() = videoFormatProperties[i]; } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( structureChains ) ); } template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getVideoFormatPropertiesKHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceVideoFormatInfoKHR & videoFormatInfo, StructureChainAllocator & structureChainAllocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceVideoFormatPropertiesKHR && "Function requires " ); # endif std::vector structureChains( structureChainAllocator ); std::vector videoFormatProperties; uint32_t videoFormatPropertyCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkGetPhysicalDeviceVideoFormatPropertiesKHR( m_physicalDevice, reinterpret_cast( &videoFormatInfo ), &videoFormatPropertyCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && videoFormatPropertyCount ) { structureChains.resize( videoFormatPropertyCount ); videoFormatProperties.resize( videoFormatPropertyCount ); for ( uint32_t i = 0; i < videoFormatPropertyCount; i++ ) { videoFormatProperties[i].pNext = structureChains[i].template get().pNext; } result = static_cast( d.vkGetPhysicalDeviceVideoFormatPropertiesKHR( m_physicalDevice, reinterpret_cast( &videoFormatInfo ), &videoFormatPropertyCount, reinterpret_cast( videoFormatProperties.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getVideoFormatPropertiesKHR" ); VULKAN_HPP_ASSERT( videoFormatPropertyCount <= videoFormatProperties.size() ); if ( videoFormatPropertyCount < videoFormatProperties.size() ) { structureChains.resize( videoFormatPropertyCount ); } for ( uint32_t i = 0; i < videoFormatPropertyCount; i++ ) { structureChains[i].template get() = videoFormatProperties[i]; } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( structureChains ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::createVideoSessionKHR( const VULKAN_HPP_NAMESPACE::VideoSessionCreateInfoKHR * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::VideoSessionKHR * pVideoSession, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkCreateVideoSessionKHR( static_cast( m_device ), reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pVideoSession ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::createVideoSessionKHR( const VULKAN_HPP_NAMESPACE::VideoSessionCreateInfoKHR & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateVideoSessionKHR && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::VideoSessionKHR videoSession; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateVideoSessionKHR( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &videoSession ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createVideoSessionKHR" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( videoSession ) ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::createVideoSessionKHRUnique( const VULKAN_HPP_NAMESPACE::VideoSessionCreateInfoKHR & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateVideoSessionKHR && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::VideoSessionKHR videoSession; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateVideoSessionKHR( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &videoSession ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createVideoSessionKHRUnique" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, UniqueHandle( videoSession, detail::ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::destroyVideoSessionKHR( VULKAN_HPP_NAMESPACE::VideoSessionKHR videoSession, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDestroyVideoSessionKHR( static_cast( m_device ), static_cast( videoSession ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::destroyVideoSessionKHR( VULKAN_HPP_NAMESPACE::VideoSessionKHR videoSession, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDestroyVideoSessionKHR && "Function requires " ); # endif d.vkDestroyVideoSessionKHR( m_device, static_cast( videoSession ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::VideoSessionKHR videoSession, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDestroyVideoSessionKHR( static_cast( m_device ), static_cast( videoSession ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::VideoSessionKHR videoSession, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDestroyVideoSessionKHR && "Function requires " ); # endif d.vkDestroyVideoSessionKHR( m_device, static_cast( videoSession ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getVideoSessionMemoryRequirementsKHR( VULKAN_HPP_NAMESPACE::VideoSessionKHR videoSession, uint32_t * pMemoryRequirementsCount, VULKAN_HPP_NAMESPACE::VideoSessionMemoryRequirementsKHR * pMemoryRequirements, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetVideoSessionMemoryRequirementsKHR( static_cast( m_device ), static_cast( videoSession ), pMemoryRequirementsCount, reinterpret_cast( pMemoryRequirements ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::getVideoSessionMemoryRequirementsKHR( VULKAN_HPP_NAMESPACE::VideoSessionKHR videoSession, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetVideoSessionMemoryRequirementsKHR && "Function requires " ); # endif std::vector memoryRequirements; uint32_t memoryRequirementsCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkGetVideoSessionMemoryRequirementsKHR( m_device, static_cast( videoSession ), &memoryRequirementsCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && memoryRequirementsCount ) { memoryRequirements.resize( memoryRequirementsCount ); result = static_cast( d.vkGetVideoSessionMemoryRequirementsKHR( m_device, static_cast( videoSession ), &memoryRequirementsCount, reinterpret_cast( memoryRequirements.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_ASSERT( memoryRequirementsCount <= memoryRequirements.size() ); if ( memoryRequirementsCount < memoryRequirements.size() ) { memoryRequirements.resize( memoryRequirementsCount ); } return memoryRequirements; } template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::getVideoSessionMemoryRequirementsKHR( VULKAN_HPP_NAMESPACE::VideoSessionKHR videoSession, VideoSessionMemoryRequirementsKHRAllocator & videoSessionMemoryRequirementsKHRAllocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetVideoSessionMemoryRequirementsKHR && "Function requires " ); # endif std::vector memoryRequirements( videoSessionMemoryRequirementsKHRAllocator ); uint32_t memoryRequirementsCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkGetVideoSessionMemoryRequirementsKHR( m_device, static_cast( videoSession ), &memoryRequirementsCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && memoryRequirementsCount ) { memoryRequirements.resize( memoryRequirementsCount ); result = static_cast( d.vkGetVideoSessionMemoryRequirementsKHR( m_device, static_cast( videoSession ), &memoryRequirementsCount, reinterpret_cast( memoryRequirements.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_ASSERT( memoryRequirementsCount <= memoryRequirements.size() ); if ( memoryRequirementsCount < memoryRequirements.size() ) { memoryRequirements.resize( memoryRequirementsCount ); } return memoryRequirements; } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::bindVideoSessionMemoryKHR( VULKAN_HPP_NAMESPACE::VideoSessionKHR videoSession, uint32_t bindSessionMemoryInfoCount, const VULKAN_HPP_NAMESPACE::BindVideoSessionMemoryInfoKHR * pBindSessionMemoryInfos, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkBindVideoSessionMemoryKHR( static_cast( m_device ), static_cast( videoSession ), bindSessionMemoryInfoCount, reinterpret_cast( pBindSessionMemoryInfos ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type Device::bindVideoSessionMemoryKHR( VULKAN_HPP_NAMESPACE::VideoSessionKHR videoSession, VULKAN_HPP_NAMESPACE::ArrayProxy const & bindSessionMemoryInfos, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkBindVideoSessionMemoryKHR && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkBindVideoSessionMemoryKHR( m_device, static_cast( videoSession ), bindSessionMemoryInfos.size(), reinterpret_cast( bindSessionMemoryInfos.data() ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::bindVideoSessionMemoryKHR" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::createVideoSessionParametersKHR( const VULKAN_HPP_NAMESPACE::VideoSessionParametersCreateInfoKHR * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::VideoSessionParametersKHR * pVideoSessionParameters, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkCreateVideoSessionParametersKHR( static_cast( m_device ), reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pVideoSessionParameters ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::createVideoSessionParametersKHR( const VULKAN_HPP_NAMESPACE::VideoSessionParametersCreateInfoKHR & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateVideoSessionParametersKHR && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::VideoSessionParametersKHR videoSessionParameters; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateVideoSessionParametersKHR( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &videoSessionParameters ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createVideoSessionParametersKHR" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( videoSessionParameters ) ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::createVideoSessionParametersKHRUnique( const VULKAN_HPP_NAMESPACE::VideoSessionParametersCreateInfoKHR & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateVideoSessionParametersKHR && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::VideoSessionParametersKHR videoSessionParameters; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateVideoSessionParametersKHR( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &videoSessionParameters ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createVideoSessionParametersKHRUnique" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, UniqueHandle( videoSessionParameters, detail::ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::updateVideoSessionParametersKHR( VULKAN_HPP_NAMESPACE::VideoSessionParametersKHR videoSessionParameters, const VULKAN_HPP_NAMESPACE::VideoSessionParametersUpdateInfoKHR * pUpdateInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkUpdateVideoSessionParametersKHR( static_cast( m_device ), static_cast( videoSessionParameters ), reinterpret_cast( pUpdateInfo ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type Device::updateVideoSessionParametersKHR( VULKAN_HPP_NAMESPACE::VideoSessionParametersKHR videoSessionParameters, const VULKAN_HPP_NAMESPACE::VideoSessionParametersUpdateInfoKHR & updateInfo, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkUpdateVideoSessionParametersKHR && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkUpdateVideoSessionParametersKHR( m_device, static_cast( videoSessionParameters ), reinterpret_cast( &updateInfo ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::updateVideoSessionParametersKHR" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::destroyVideoSessionParametersKHR( VULKAN_HPP_NAMESPACE::VideoSessionParametersKHR videoSessionParameters, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDestroyVideoSessionParametersKHR( static_cast( m_device ), static_cast( videoSessionParameters ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::destroyVideoSessionParametersKHR( VULKAN_HPP_NAMESPACE::VideoSessionParametersKHR videoSessionParameters, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDestroyVideoSessionParametersKHR && "Function requires " ); # endif d.vkDestroyVideoSessionParametersKHR( m_device, static_cast( videoSessionParameters ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::VideoSessionParametersKHR videoSessionParameters, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDestroyVideoSessionParametersKHR( static_cast( m_device ), static_cast( videoSessionParameters ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::VideoSessionParametersKHR videoSessionParameters, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDestroyVideoSessionParametersKHR && "Function requires " ); # endif d.vkDestroyVideoSessionParametersKHR( m_device, static_cast( videoSessionParameters ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::beginVideoCodingKHR( const VULKAN_HPP_NAMESPACE::VideoBeginCodingInfoKHR * pBeginInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdBeginVideoCodingKHR( static_cast( m_commandBuffer ), reinterpret_cast( pBeginInfo ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::beginVideoCodingKHR( const VULKAN_HPP_NAMESPACE::VideoBeginCodingInfoKHR & beginInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdBeginVideoCodingKHR && "Function requires " ); # endif d.vkCmdBeginVideoCodingKHR( m_commandBuffer, reinterpret_cast( &beginInfo ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::endVideoCodingKHR( const VULKAN_HPP_NAMESPACE::VideoEndCodingInfoKHR * pEndCodingInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdEndVideoCodingKHR( static_cast( m_commandBuffer ), reinterpret_cast( pEndCodingInfo ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::endVideoCodingKHR( const VULKAN_HPP_NAMESPACE::VideoEndCodingInfoKHR & endCodingInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdEndVideoCodingKHR && "Function requires " ); # endif d.vkCmdEndVideoCodingKHR( m_commandBuffer, reinterpret_cast( &endCodingInfo ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::controlVideoCodingKHR( const VULKAN_HPP_NAMESPACE::VideoCodingControlInfoKHR * pCodingControlInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdControlVideoCodingKHR( static_cast( m_commandBuffer ), reinterpret_cast( pCodingControlInfo ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::controlVideoCodingKHR( const VULKAN_HPP_NAMESPACE::VideoCodingControlInfoKHR & codingControlInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdControlVideoCodingKHR && "Function requires " ); # endif d.vkCmdControlVideoCodingKHR( m_commandBuffer, reinterpret_cast( &codingControlInfo ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_KHR_video_decode_queue === template VULKAN_HPP_INLINE void CommandBuffer::decodeVideoKHR( const VULKAN_HPP_NAMESPACE::VideoDecodeInfoKHR * pDecodeInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdDecodeVideoKHR( static_cast( m_commandBuffer ), reinterpret_cast( pDecodeInfo ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::decodeVideoKHR( const VULKAN_HPP_NAMESPACE::VideoDecodeInfoKHR & decodeInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdDecodeVideoKHR && "Function requires " ); # endif d.vkCmdDecodeVideoKHR( m_commandBuffer, reinterpret_cast( &decodeInfo ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_EXT_transform_feedback === template VULKAN_HPP_INLINE void CommandBuffer::bindTransformFeedbackBuffersEXT( uint32_t firstBinding, uint32_t bindingCount, const VULKAN_HPP_NAMESPACE::Buffer * pBuffers, const VULKAN_HPP_NAMESPACE::DeviceSize * pOffsets, const VULKAN_HPP_NAMESPACE::DeviceSize * pSizes, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdBindTransformFeedbackBuffersEXT( static_cast( m_commandBuffer ), firstBinding, bindingCount, reinterpret_cast( pBuffers ), reinterpret_cast( pOffsets ), reinterpret_cast( pSizes ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::bindTransformFeedbackBuffersEXT( uint32_t firstBinding, VULKAN_HPP_NAMESPACE::ArrayProxy const & buffers, VULKAN_HPP_NAMESPACE::ArrayProxy const & offsets, VULKAN_HPP_NAMESPACE::ArrayProxy const & sizes, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdBindTransformFeedbackBuffersEXT && "Function requires " ); # endif # ifdef VULKAN_HPP_NO_EXCEPTIONS VULKAN_HPP_ASSERT( buffers.size() == offsets.size() ); VULKAN_HPP_ASSERT( sizes.empty() || buffers.size() == sizes.size() ); # else if ( buffers.size() != offsets.size() ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::bindTransformFeedbackBuffersEXT: buffers.size() != offsets.size()" ); } if ( !sizes.empty() && buffers.size() != sizes.size() ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::bindTransformFeedbackBuffersEXT: buffers.size() != sizes.size()" ); } # endif /*VULKAN_HPP_NO_EXCEPTIONS*/ d.vkCmdBindTransformFeedbackBuffersEXT( m_commandBuffer, firstBinding, buffers.size(), reinterpret_cast( buffers.data() ), reinterpret_cast( offsets.data() ), reinterpret_cast( sizes.data() ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::beginTransformFeedbackEXT( uint32_t firstCounterBuffer, uint32_t counterBufferCount, const VULKAN_HPP_NAMESPACE::Buffer * pCounterBuffers, const VULKAN_HPP_NAMESPACE::DeviceSize * pCounterBufferOffsets, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdBeginTransformFeedbackEXT( static_cast( m_commandBuffer ), firstCounterBuffer, counterBufferCount, reinterpret_cast( pCounterBuffers ), reinterpret_cast( pCounterBufferOffsets ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::beginTransformFeedbackEXT( uint32_t firstCounterBuffer, VULKAN_HPP_NAMESPACE::ArrayProxy const & counterBuffers, VULKAN_HPP_NAMESPACE::ArrayProxy const & counterBufferOffsets, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdBeginTransformFeedbackEXT && "Function requires " ); # endif # ifdef VULKAN_HPP_NO_EXCEPTIONS VULKAN_HPP_ASSERT( counterBufferOffsets.empty() || counterBuffers.size() == counterBufferOffsets.size() ); # else if ( !counterBufferOffsets.empty() && counterBuffers.size() != counterBufferOffsets.size() ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::beginTransformFeedbackEXT: counterBuffers.size() != counterBufferOffsets.size()" ); } # endif /*VULKAN_HPP_NO_EXCEPTIONS*/ d.vkCmdBeginTransformFeedbackEXT( m_commandBuffer, firstCounterBuffer, counterBuffers.size(), reinterpret_cast( counterBuffers.data() ), reinterpret_cast( counterBufferOffsets.data() ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::endTransformFeedbackEXT( uint32_t firstCounterBuffer, uint32_t counterBufferCount, const VULKAN_HPP_NAMESPACE::Buffer * pCounterBuffers, const VULKAN_HPP_NAMESPACE::DeviceSize * pCounterBufferOffsets, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdEndTransformFeedbackEXT( static_cast( m_commandBuffer ), firstCounterBuffer, counterBufferCount, reinterpret_cast( pCounterBuffers ), reinterpret_cast( pCounterBufferOffsets ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::endTransformFeedbackEXT( uint32_t firstCounterBuffer, VULKAN_HPP_NAMESPACE::ArrayProxy const & counterBuffers, VULKAN_HPP_NAMESPACE::ArrayProxy const & counterBufferOffsets, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdEndTransformFeedbackEXT && "Function requires " ); # endif # ifdef VULKAN_HPP_NO_EXCEPTIONS VULKAN_HPP_ASSERT( counterBufferOffsets.empty() || counterBuffers.size() == counterBufferOffsets.size() ); # else if ( !counterBufferOffsets.empty() && counterBuffers.size() != counterBufferOffsets.size() ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::endTransformFeedbackEXT: counterBuffers.size() != counterBufferOffsets.size()" ); } # endif /*VULKAN_HPP_NO_EXCEPTIONS*/ d.vkCmdEndTransformFeedbackEXT( m_commandBuffer, firstCounterBuffer, counterBuffers.size(), reinterpret_cast( counterBuffers.data() ), reinterpret_cast( counterBufferOffsets.data() ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::beginQueryIndexedEXT( VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t query, VULKAN_HPP_NAMESPACE::QueryControlFlags flags, uint32_t index, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdBeginQueryIndexedEXT( static_cast( m_commandBuffer ), static_cast( queryPool ), query, static_cast( flags ), index ); } template VULKAN_HPP_INLINE void CommandBuffer::endQueryIndexedEXT( VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t query, uint32_t index, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdEndQueryIndexedEXT( static_cast( m_commandBuffer ), static_cast( queryPool ), query, index ); } template VULKAN_HPP_INLINE void CommandBuffer::drawIndirectByteCountEXT( uint32_t instanceCount, uint32_t firstInstance, VULKAN_HPP_NAMESPACE::Buffer counterBuffer, VULKAN_HPP_NAMESPACE::DeviceSize counterBufferOffset, uint32_t counterOffset, uint32_t vertexStride, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdDrawIndirectByteCountEXT( static_cast( m_commandBuffer ), instanceCount, firstInstance, static_cast( counterBuffer ), static_cast( counterBufferOffset ), counterOffset, vertexStride ); } //=== VK_NVX_binary_import === template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::createCuModuleNVX( const VULKAN_HPP_NAMESPACE::CuModuleCreateInfoNVX * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::CuModuleNVX * pModule, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkCreateCuModuleNVX( static_cast( m_device ), reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pModule ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::createCuModuleNVX( const VULKAN_HPP_NAMESPACE::CuModuleCreateInfoNVX & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateCuModuleNVX && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::CuModuleNVX module; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateCuModuleNVX( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &module ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createCuModuleNVX" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( module ) ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::createCuModuleNVXUnique( const VULKAN_HPP_NAMESPACE::CuModuleCreateInfoNVX & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateCuModuleNVX && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::CuModuleNVX module; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateCuModuleNVX( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &module ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createCuModuleNVXUnique" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, UniqueHandle( module, detail::ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::createCuFunctionNVX( const VULKAN_HPP_NAMESPACE::CuFunctionCreateInfoNVX * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::CuFunctionNVX * pFunction, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkCreateCuFunctionNVX( static_cast( m_device ), reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pFunction ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::createCuFunctionNVX( const VULKAN_HPP_NAMESPACE::CuFunctionCreateInfoNVX & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateCuFunctionNVX && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::CuFunctionNVX function; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateCuFunctionNVX( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &function ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createCuFunctionNVX" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( function ) ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::createCuFunctionNVXUnique( const VULKAN_HPP_NAMESPACE::CuFunctionCreateInfoNVX & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateCuFunctionNVX && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::CuFunctionNVX function; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateCuFunctionNVX( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &function ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createCuFunctionNVXUnique" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, UniqueHandle( function, detail::ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::destroyCuModuleNVX( VULKAN_HPP_NAMESPACE::CuModuleNVX module, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDestroyCuModuleNVX( static_cast( m_device ), static_cast( module ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::destroyCuModuleNVX( VULKAN_HPP_NAMESPACE::CuModuleNVX module, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDestroyCuModuleNVX && "Function requires " ); # endif d.vkDestroyCuModuleNVX( m_device, static_cast( module ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::CuModuleNVX module, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDestroyCuModuleNVX( static_cast( m_device ), static_cast( module ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::CuModuleNVX module, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDestroyCuModuleNVX && "Function requires " ); # endif d.vkDestroyCuModuleNVX( m_device, static_cast( module ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::destroyCuFunctionNVX( VULKAN_HPP_NAMESPACE::CuFunctionNVX function, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDestroyCuFunctionNVX( static_cast( m_device ), static_cast( function ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::destroyCuFunctionNVX( VULKAN_HPP_NAMESPACE::CuFunctionNVX function, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDestroyCuFunctionNVX && "Function requires " ); # endif d.vkDestroyCuFunctionNVX( m_device, static_cast( function ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::CuFunctionNVX function, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDestroyCuFunctionNVX( static_cast( m_device ), static_cast( function ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::CuFunctionNVX function, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDestroyCuFunctionNVX && "Function requires " ); # endif d.vkDestroyCuFunctionNVX( m_device, static_cast( function ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::cuLaunchKernelNVX( const VULKAN_HPP_NAMESPACE::CuLaunchInfoNVX * pLaunchInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdCuLaunchKernelNVX( static_cast( m_commandBuffer ), reinterpret_cast( pLaunchInfo ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::cuLaunchKernelNVX( const VULKAN_HPP_NAMESPACE::CuLaunchInfoNVX & launchInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdCuLaunchKernelNVX && "Function requires " ); # endif d.vkCmdCuLaunchKernelNVX( m_commandBuffer, reinterpret_cast( &launchInfo ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_NVX_image_view_handle === template VULKAN_HPP_INLINE uint32_t Device::getImageViewHandleNVX( const VULKAN_HPP_NAMESPACE::ImageViewHandleInfoNVX * pInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return d.vkGetImageViewHandleNVX( static_cast( m_device ), reinterpret_cast( pInfo ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE uint32_t Device::getImageViewHandleNVX( const VULKAN_HPP_NAMESPACE::ImageViewHandleInfoNVX & info, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetImageViewHandleNVX && "Function requires " ); # endif uint32_t result = d.vkGetImageViewHandleNVX( m_device, reinterpret_cast( &info ) ); return result; } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE uint64_t Device::getImageViewHandle64NVX( const VULKAN_HPP_NAMESPACE::ImageViewHandleInfoNVX * pInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return d.vkGetImageViewHandle64NVX( static_cast( m_device ), reinterpret_cast( pInfo ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE uint64_t Device::getImageViewHandle64NVX( const VULKAN_HPP_NAMESPACE::ImageViewHandleInfoNVX & info, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetImageViewHandle64NVX && "Function requires " ); # endif uint64_t result = d.vkGetImageViewHandle64NVX( m_device, reinterpret_cast( &info ) ); return result; } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getImageViewAddressNVX( VULKAN_HPP_NAMESPACE::ImageView imageView, VULKAN_HPP_NAMESPACE::ImageViewAddressPropertiesNVX * pProperties, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetImageViewAddressNVX( static_cast( m_device ), static_cast( imageView ), reinterpret_cast( pProperties ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::getImageViewAddressNVX( VULKAN_HPP_NAMESPACE::ImageView imageView, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetImageViewAddressNVX && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::ImageViewAddressPropertiesNVX properties; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetImageViewAddressNVX( m_device, static_cast( imageView ), reinterpret_cast( &properties ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getImageViewAddressNVX" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( properties ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_AMD_draw_indirect_count === template VULKAN_HPP_INLINE void CommandBuffer::drawIndirectCountAMD( VULKAN_HPP_NAMESPACE::Buffer buffer, VULKAN_HPP_NAMESPACE::DeviceSize offset, VULKAN_HPP_NAMESPACE::Buffer countBuffer, VULKAN_HPP_NAMESPACE::DeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdDrawIndirectCountAMD( static_cast( m_commandBuffer ), static_cast( buffer ), static_cast( offset ), static_cast( countBuffer ), static_cast( countBufferOffset ), maxDrawCount, stride ); } template VULKAN_HPP_INLINE void CommandBuffer::drawIndexedIndirectCountAMD( VULKAN_HPP_NAMESPACE::Buffer buffer, VULKAN_HPP_NAMESPACE::DeviceSize offset, VULKAN_HPP_NAMESPACE::Buffer countBuffer, VULKAN_HPP_NAMESPACE::DeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdDrawIndexedIndirectCountAMD( static_cast( m_commandBuffer ), static_cast( buffer ), static_cast( offset ), static_cast( countBuffer ), static_cast( countBufferOffset ), maxDrawCount, stride ); } //=== VK_AMD_shader_info === template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getShaderInfoAMD( VULKAN_HPP_NAMESPACE::Pipeline pipeline, VULKAN_HPP_NAMESPACE::ShaderStageFlagBits shaderStage, VULKAN_HPP_NAMESPACE::ShaderInfoTypeAMD infoType, size_t * pInfoSize, void * pInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetShaderInfoAMD( static_cast( m_device ), static_cast( pipeline ), static_cast( shaderStage ), static_cast( infoType ), pInfoSize, pInfo ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::getShaderInfoAMD( VULKAN_HPP_NAMESPACE::Pipeline pipeline, VULKAN_HPP_NAMESPACE::ShaderStageFlagBits shaderStage, VULKAN_HPP_NAMESPACE::ShaderInfoTypeAMD infoType, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetShaderInfoAMD && "Function requires " ); # endif std::vector info; size_t infoSize; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkGetShaderInfoAMD( m_device, static_cast( pipeline ), static_cast( shaderStage ), static_cast( infoType ), &infoSize, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && infoSize ) { info.resize( infoSize ); result = static_cast( d.vkGetShaderInfoAMD( m_device, static_cast( pipeline ), static_cast( shaderStage ), static_cast( infoType ), &infoSize, reinterpret_cast( info.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getShaderInfoAMD" ); VULKAN_HPP_ASSERT( infoSize <= info.size() ); if ( infoSize < info.size() ) { info.resize( infoSize ); } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( info ) ); } template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::getShaderInfoAMD( VULKAN_HPP_NAMESPACE::Pipeline pipeline, VULKAN_HPP_NAMESPACE::ShaderStageFlagBits shaderStage, VULKAN_HPP_NAMESPACE::ShaderInfoTypeAMD infoType, Uint8_tAllocator & uint8_tAllocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetShaderInfoAMD && "Function requires " ); # endif std::vector info( uint8_tAllocator ); size_t infoSize; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkGetShaderInfoAMD( m_device, static_cast( pipeline ), static_cast( shaderStage ), static_cast( infoType ), &infoSize, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && infoSize ) { info.resize( infoSize ); result = static_cast( d.vkGetShaderInfoAMD( m_device, static_cast( pipeline ), static_cast( shaderStage ), static_cast( infoType ), &infoSize, reinterpret_cast( info.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getShaderInfoAMD" ); VULKAN_HPP_ASSERT( infoSize <= info.size() ); if ( infoSize < info.size() ) { info.resize( infoSize ); } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( info ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_KHR_dynamic_rendering === template VULKAN_HPP_INLINE void CommandBuffer::beginRenderingKHR( const VULKAN_HPP_NAMESPACE::RenderingInfo * pRenderingInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdBeginRenderingKHR( static_cast( m_commandBuffer ), reinterpret_cast( pRenderingInfo ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::beginRenderingKHR( const VULKAN_HPP_NAMESPACE::RenderingInfo & renderingInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdBeginRenderingKHR && "Function requires or " ); # endif d.vkCmdBeginRenderingKHR( m_commandBuffer, reinterpret_cast( &renderingInfo ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::endRenderingKHR( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdEndRenderingKHR( static_cast( m_commandBuffer ) ); } #if defined( VK_USE_PLATFORM_GGP ) //=== VK_GGP_stream_descriptor_surface === template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Instance::createStreamDescriptorSurfaceGGP( const VULKAN_HPP_NAMESPACE::StreamDescriptorSurfaceCreateInfoGGP * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::SurfaceKHR * pSurface, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkCreateStreamDescriptorSurfaceGGP( static_cast( m_instance ), reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSurface ) ) ); } # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Instance::createStreamDescriptorSurfaceGGP( const VULKAN_HPP_NAMESPACE::StreamDescriptorSurfaceCreateInfoGGP & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateStreamDescriptorSurfaceGGP && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::SurfaceKHR surface; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateStreamDescriptorSurfaceGGP( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::createStreamDescriptorSurfaceGGP" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( surface ) ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Instance::createStreamDescriptorSurfaceGGPUnique( const VULKAN_HPP_NAMESPACE::StreamDescriptorSurfaceCreateInfoGGP & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateStreamDescriptorSurfaceGGP && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::SurfaceKHR surface; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateStreamDescriptorSurfaceGGP( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::createStreamDescriptorSurfaceGGPUnique" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, UniqueHandle( surface, detail::ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #endif /*VK_USE_PLATFORM_GGP*/ //=== VK_NV_external_memory_capabilities === template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result PhysicalDevice::getExternalImageFormatPropertiesNV( VULKAN_HPP_NAMESPACE::Format format, VULKAN_HPP_NAMESPACE::ImageType type, VULKAN_HPP_NAMESPACE::ImageTiling tiling, VULKAN_HPP_NAMESPACE::ImageUsageFlags usage, VULKAN_HPP_NAMESPACE::ImageCreateFlags flags, VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagsNV externalHandleType, VULKAN_HPP_NAMESPACE::ExternalImageFormatPropertiesNV * pExternalImageFormatProperties, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetPhysicalDeviceExternalImageFormatPropertiesNV( static_cast( m_physicalDevice ), static_cast( format ), static_cast( type ), static_cast( tiling ), static_cast( usage ), static_cast( flags ), static_cast( externalHandleType ), reinterpret_cast( pExternalImageFormatProperties ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type PhysicalDevice::getExternalImageFormatPropertiesNV( VULKAN_HPP_NAMESPACE::Format format, VULKAN_HPP_NAMESPACE::ImageType type, VULKAN_HPP_NAMESPACE::ImageTiling tiling, VULKAN_HPP_NAMESPACE::ImageUsageFlags usage, VULKAN_HPP_NAMESPACE::ImageCreateFlags flags, VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagsNV externalHandleType, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceExternalImageFormatPropertiesNV && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::ExternalImageFormatPropertiesNV externalImageFormatProperties; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetPhysicalDeviceExternalImageFormatPropertiesNV( m_physicalDevice, static_cast( format ), static_cast( type ), static_cast( tiling ), static_cast( usage ), static_cast( flags ), static_cast( externalHandleType ), reinterpret_cast( &externalImageFormatProperties ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getExternalImageFormatPropertiesNV" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( externalImageFormatProperties ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_NV_external_memory_win32 === template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getMemoryWin32HandleNV( VULKAN_HPP_NAMESPACE::DeviceMemory memory, VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagsNV handleType, HANDLE * pHandle, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetMemoryWin32HandleNV( static_cast( m_device ), static_cast( memory ), static_cast( handleType ), pHandle ) ); } # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::getMemoryWin32HandleNV( VULKAN_HPP_NAMESPACE::DeviceMemory memory, VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagsNV handleType, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetMemoryWin32HandleNV && "Function requires " ); # endif HANDLE handle; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetMemoryWin32HandleNV( m_device, static_cast( memory ), static_cast( handleType ), &handle ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryWin32HandleNV" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( handle ) ); } # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_KHR_get_physical_device_properties2 === template VULKAN_HPP_INLINE void PhysicalDevice::getFeatures2KHR( VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures2 * pFeatures, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkGetPhysicalDeviceFeatures2KHR( static_cast( m_physicalDevice ), reinterpret_cast( pFeatures ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures2 PhysicalDevice::getFeatures2KHR( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceFeatures2KHR && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures2 features; d.vkGetPhysicalDeviceFeatures2KHR( m_physicalDevice, reinterpret_cast( &features ) ); return features; } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::StructureChain PhysicalDevice::getFeatures2KHR( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceFeatures2KHR && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::StructureChain structureChain; VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures2 & features = structureChain.template get(); d.vkGetPhysicalDeviceFeatures2KHR( m_physicalDevice, reinterpret_cast( &features ) ); return structureChain; } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void PhysicalDevice::getProperties2KHR( VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties2 * pProperties, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkGetPhysicalDeviceProperties2KHR( static_cast( m_physicalDevice ), reinterpret_cast( pProperties ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties2 PhysicalDevice::getProperties2KHR( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceProperties2KHR && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties2 properties; d.vkGetPhysicalDeviceProperties2KHR( m_physicalDevice, reinterpret_cast( &properties ) ); return properties; } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::StructureChain PhysicalDevice::getProperties2KHR( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceProperties2KHR && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::StructureChain structureChain; VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties2 & properties = structureChain.template get(); d.vkGetPhysicalDeviceProperties2KHR( m_physicalDevice, reinterpret_cast( &properties ) ); return structureChain; } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void PhysicalDevice::getFormatProperties2KHR( VULKAN_HPP_NAMESPACE::Format format, VULKAN_HPP_NAMESPACE::FormatProperties2 * pFormatProperties, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkGetPhysicalDeviceFormatProperties2KHR( static_cast( m_physicalDevice ), static_cast( format ), reinterpret_cast( pFormatProperties ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::FormatProperties2 PhysicalDevice::getFormatProperties2KHR( VULKAN_HPP_NAMESPACE::Format format, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceFormatProperties2KHR && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::FormatProperties2 formatProperties; d.vkGetPhysicalDeviceFormatProperties2KHR( m_physicalDevice, static_cast( format ), reinterpret_cast( &formatProperties ) ); return formatProperties; } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::StructureChain PhysicalDevice::getFormatProperties2KHR( VULKAN_HPP_NAMESPACE::Format format, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceFormatProperties2KHR && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::StructureChain structureChain; VULKAN_HPP_NAMESPACE::FormatProperties2 & formatProperties = structureChain.template get(); d.vkGetPhysicalDeviceFormatProperties2KHR( m_physicalDevice, static_cast( format ), reinterpret_cast( &formatProperties ) ); return structureChain; } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result PhysicalDevice::getImageFormatProperties2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceImageFormatInfo2 * pImageFormatInfo, VULKAN_HPP_NAMESPACE::ImageFormatProperties2 * pImageFormatProperties, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetPhysicalDeviceImageFormatProperties2KHR( static_cast( m_physicalDevice ), reinterpret_cast( pImageFormatInfo ), reinterpret_cast( pImageFormatProperties ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type PhysicalDevice::getImageFormatProperties2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceImageFormatInfo2 & imageFormatInfo, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceImageFormatProperties2KHR && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::ImageFormatProperties2 imageFormatProperties; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetPhysicalDeviceImageFormatProperties2KHR( m_physicalDevice, reinterpret_cast( &imageFormatInfo ), reinterpret_cast( &imageFormatProperties ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getImageFormatProperties2KHR" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( imageFormatProperties ) ); } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getImageFormatProperties2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceImageFormatInfo2 & imageFormatInfo, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceImageFormatProperties2KHR && "Function requires or " ); # endif StructureChain structureChain; VULKAN_HPP_NAMESPACE::ImageFormatProperties2 & imageFormatProperties = structureChain.template get(); VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetPhysicalDeviceImageFormatProperties2KHR( m_physicalDevice, reinterpret_cast( &imageFormatInfo ), reinterpret_cast( &imageFormatProperties ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getImageFormatProperties2KHR" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( structureChain ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void PhysicalDevice::getQueueFamilyProperties2KHR( uint32_t * pQueueFamilyPropertyCount, VULKAN_HPP_NAMESPACE::QueueFamilyProperties2 * pQueueFamilyProperties, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkGetPhysicalDeviceQueueFamilyProperties2KHR( static_cast( m_physicalDevice ), pQueueFamilyPropertyCount, reinterpret_cast( pQueueFamilyProperties ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template < typename QueueFamilyProperties2Allocator, typename Dispatch, typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector PhysicalDevice::getQueueFamilyProperties2KHR( Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceQueueFamilyProperties2KHR && "Function requires or " ); # endif std::vector queueFamilyProperties; uint32_t queueFamilyPropertyCount; d.vkGetPhysicalDeviceQueueFamilyProperties2KHR( m_physicalDevice, &queueFamilyPropertyCount, nullptr ); queueFamilyProperties.resize( queueFamilyPropertyCount ); d.vkGetPhysicalDeviceQueueFamilyProperties2KHR( m_physicalDevice, &queueFamilyPropertyCount, reinterpret_cast( queueFamilyProperties.data() ) ); VULKAN_HPP_ASSERT( queueFamilyPropertyCount <= queueFamilyProperties.size() ); if ( queueFamilyPropertyCount < queueFamilyProperties.size() ) { queueFamilyProperties.resize( queueFamilyPropertyCount ); } return queueFamilyProperties; } template < typename QueueFamilyProperties2Allocator, typename Dispatch, typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector PhysicalDevice::getQueueFamilyProperties2KHR( QueueFamilyProperties2Allocator & queueFamilyProperties2Allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceQueueFamilyProperties2KHR && "Function requires or " ); # endif std::vector queueFamilyProperties( queueFamilyProperties2Allocator ); uint32_t queueFamilyPropertyCount; d.vkGetPhysicalDeviceQueueFamilyProperties2KHR( m_physicalDevice, &queueFamilyPropertyCount, nullptr ); queueFamilyProperties.resize( queueFamilyPropertyCount ); d.vkGetPhysicalDeviceQueueFamilyProperties2KHR( m_physicalDevice, &queueFamilyPropertyCount, reinterpret_cast( queueFamilyProperties.data() ) ); VULKAN_HPP_ASSERT( queueFamilyPropertyCount <= queueFamilyProperties.size() ); if ( queueFamilyPropertyCount < queueFamilyProperties.size() ) { queueFamilyProperties.resize( queueFamilyPropertyCount ); } return queueFamilyProperties; } template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector PhysicalDevice::getQueueFamilyProperties2KHR( Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceQueueFamilyProperties2KHR && "Function requires or " ); # endif std::vector structureChains; std::vector queueFamilyProperties; uint32_t queueFamilyPropertyCount; d.vkGetPhysicalDeviceQueueFamilyProperties2KHR( m_physicalDevice, &queueFamilyPropertyCount, nullptr ); structureChains.resize( queueFamilyPropertyCount ); queueFamilyProperties.resize( queueFamilyPropertyCount ); for ( uint32_t i = 0; i < queueFamilyPropertyCount; i++ ) { queueFamilyProperties[i].pNext = structureChains[i].template get().pNext; } d.vkGetPhysicalDeviceQueueFamilyProperties2KHR( m_physicalDevice, &queueFamilyPropertyCount, reinterpret_cast( queueFamilyProperties.data() ) ); VULKAN_HPP_ASSERT( queueFamilyPropertyCount <= queueFamilyProperties.size() ); if ( queueFamilyPropertyCount < queueFamilyProperties.size() ) { structureChains.resize( queueFamilyPropertyCount ); } for ( uint32_t i = 0; i < queueFamilyPropertyCount; i++ ) { structureChains[i].template get() = queueFamilyProperties[i]; } return structureChains; } template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector PhysicalDevice::getQueueFamilyProperties2KHR( StructureChainAllocator & structureChainAllocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceQueueFamilyProperties2KHR && "Function requires or " ); # endif std::vector structureChains( structureChainAllocator ); std::vector queueFamilyProperties; uint32_t queueFamilyPropertyCount; d.vkGetPhysicalDeviceQueueFamilyProperties2KHR( m_physicalDevice, &queueFamilyPropertyCount, nullptr ); structureChains.resize( queueFamilyPropertyCount ); queueFamilyProperties.resize( queueFamilyPropertyCount ); for ( uint32_t i = 0; i < queueFamilyPropertyCount; i++ ) { queueFamilyProperties[i].pNext = structureChains[i].template get().pNext; } d.vkGetPhysicalDeviceQueueFamilyProperties2KHR( m_physicalDevice, &queueFamilyPropertyCount, reinterpret_cast( queueFamilyProperties.data() ) ); VULKAN_HPP_ASSERT( queueFamilyPropertyCount <= queueFamilyProperties.size() ); if ( queueFamilyPropertyCount < queueFamilyProperties.size() ) { structureChains.resize( queueFamilyPropertyCount ); } for ( uint32_t i = 0; i < queueFamilyPropertyCount; i++ ) { structureChains[i].template get() = queueFamilyProperties[i]; } return structureChains; } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void PhysicalDevice::getMemoryProperties2KHR( VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties2 * pMemoryProperties, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkGetPhysicalDeviceMemoryProperties2KHR( static_cast( m_physicalDevice ), reinterpret_cast( pMemoryProperties ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties2 PhysicalDevice::getMemoryProperties2KHR( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceMemoryProperties2KHR && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties2 memoryProperties; d.vkGetPhysicalDeviceMemoryProperties2KHR( m_physicalDevice, reinterpret_cast( &memoryProperties ) ); return memoryProperties; } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::StructureChain PhysicalDevice::getMemoryProperties2KHR( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceMemoryProperties2KHR && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::StructureChain structureChain; VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties2 & memoryProperties = structureChain.template get(); d.vkGetPhysicalDeviceMemoryProperties2KHR( m_physicalDevice, reinterpret_cast( &memoryProperties ) ); return structureChain; } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void PhysicalDevice::getSparseImageFormatProperties2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSparseImageFormatInfo2 * pFormatInfo, uint32_t * pPropertyCount, VULKAN_HPP_NAMESPACE::SparseImageFormatProperties2 * pProperties, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkGetPhysicalDeviceSparseImageFormatProperties2KHR( static_cast( m_physicalDevice ), reinterpret_cast( pFormatInfo ), pPropertyCount, reinterpret_cast( pProperties ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template < typename SparseImageFormatProperties2Allocator, typename Dispatch, typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector PhysicalDevice::getSparseImageFormatProperties2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSparseImageFormatInfo2 & formatInfo, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceSparseImageFormatProperties2KHR && "Function requires or " ); # endif std::vector properties; uint32_t propertyCount; d.vkGetPhysicalDeviceSparseImageFormatProperties2KHR( m_physicalDevice, reinterpret_cast( &formatInfo ), &propertyCount, nullptr ); properties.resize( propertyCount ); d.vkGetPhysicalDeviceSparseImageFormatProperties2KHR( m_physicalDevice, reinterpret_cast( &formatInfo ), &propertyCount, reinterpret_cast( properties.data() ) ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } return properties; } template < typename SparseImageFormatProperties2Allocator, typename Dispatch, typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector PhysicalDevice::getSparseImageFormatProperties2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSparseImageFormatInfo2 & formatInfo, SparseImageFormatProperties2Allocator & sparseImageFormatProperties2Allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceSparseImageFormatProperties2KHR && "Function requires or " ); # endif std::vector properties( sparseImageFormatProperties2Allocator ); uint32_t propertyCount; d.vkGetPhysicalDeviceSparseImageFormatProperties2KHR( m_physicalDevice, reinterpret_cast( &formatInfo ), &propertyCount, nullptr ); properties.resize( propertyCount ); d.vkGetPhysicalDeviceSparseImageFormatProperties2KHR( m_physicalDevice, reinterpret_cast( &formatInfo ), &propertyCount, reinterpret_cast( properties.data() ) ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } return properties; } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_KHR_device_group === template VULKAN_HPP_INLINE void Device::getGroupPeerMemoryFeaturesKHR( uint32_t heapIndex, uint32_t localDeviceIndex, uint32_t remoteDeviceIndex, VULKAN_HPP_NAMESPACE::PeerMemoryFeatureFlags * pPeerMemoryFeatures, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkGetDeviceGroupPeerMemoryFeaturesKHR( static_cast( m_device ), heapIndex, localDeviceIndex, remoteDeviceIndex, reinterpret_cast( pPeerMemoryFeatures ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::PeerMemoryFeatureFlags Device::getGroupPeerMemoryFeaturesKHR( uint32_t heapIndex, uint32_t localDeviceIndex, uint32_t remoteDeviceIndex, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetDeviceGroupPeerMemoryFeaturesKHR && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::PeerMemoryFeatureFlags peerMemoryFeatures; d.vkGetDeviceGroupPeerMemoryFeaturesKHR( m_device, heapIndex, localDeviceIndex, remoteDeviceIndex, reinterpret_cast( &peerMemoryFeatures ) ); return peerMemoryFeatures; } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::setDeviceMaskKHR( uint32_t deviceMask, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetDeviceMaskKHR( static_cast( m_commandBuffer ), deviceMask ); } template VULKAN_HPP_INLINE void CommandBuffer::dispatchBaseKHR( uint32_t baseGroupX, uint32_t baseGroupY, uint32_t baseGroupZ, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdDispatchBaseKHR( static_cast( m_commandBuffer ), baseGroupX, baseGroupY, baseGroupZ, groupCountX, groupCountY, groupCountZ ); } #if defined( VK_USE_PLATFORM_VI_NN ) //=== VK_NN_vi_surface === template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Instance::createViSurfaceNN( const VULKAN_HPP_NAMESPACE::ViSurfaceCreateInfoNN * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::SurfaceKHR * pSurface, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkCreateViSurfaceNN( static_cast( m_instance ), reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSurface ) ) ); } # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Instance::createViSurfaceNN( const VULKAN_HPP_NAMESPACE::ViSurfaceCreateInfoNN & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateViSurfaceNN && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::SurfaceKHR surface; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateViSurfaceNN( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::createViSurfaceNN" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( surface ) ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Instance::createViSurfaceNNUnique( const VULKAN_HPP_NAMESPACE::ViSurfaceCreateInfoNN & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateViSurfaceNN && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::SurfaceKHR surface; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateViSurfaceNN( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::createViSurfaceNNUnique" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, UniqueHandle( surface, detail::ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #endif /*VK_USE_PLATFORM_VI_NN*/ //=== VK_KHR_maintenance1 === template VULKAN_HPP_INLINE void Device::trimCommandPoolKHR( VULKAN_HPP_NAMESPACE::CommandPool commandPool, VULKAN_HPP_NAMESPACE::CommandPoolTrimFlags flags, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkTrimCommandPoolKHR( static_cast( m_device ), static_cast( commandPool ), static_cast( flags ) ); } //=== VK_KHR_device_group_creation === template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Instance::enumeratePhysicalDeviceGroupsKHR( uint32_t * pPhysicalDeviceGroupCount, VULKAN_HPP_NAMESPACE::PhysicalDeviceGroupProperties * pPhysicalDeviceGroupProperties, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkEnumeratePhysicalDeviceGroupsKHR( static_cast( m_instance ), pPhysicalDeviceGroupCount, reinterpret_cast( pPhysicalDeviceGroupProperties ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Instance::enumeratePhysicalDeviceGroupsKHR( Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkEnumeratePhysicalDeviceGroupsKHR && "Function requires or " ); # endif std::vector physicalDeviceGroupProperties; uint32_t physicalDeviceGroupCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkEnumeratePhysicalDeviceGroupsKHR( m_instance, &physicalDeviceGroupCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && physicalDeviceGroupCount ) { physicalDeviceGroupProperties.resize( physicalDeviceGroupCount ); result = static_cast( d.vkEnumeratePhysicalDeviceGroupsKHR( m_instance, &physicalDeviceGroupCount, reinterpret_cast( physicalDeviceGroupProperties.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::enumeratePhysicalDeviceGroupsKHR" ); VULKAN_HPP_ASSERT( physicalDeviceGroupCount <= physicalDeviceGroupProperties.size() ); if ( physicalDeviceGroupCount < physicalDeviceGroupProperties.size() ) { physicalDeviceGroupProperties.resize( physicalDeviceGroupCount ); } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( physicalDeviceGroupProperties ) ); } template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Instance::enumeratePhysicalDeviceGroupsKHR( PhysicalDeviceGroupPropertiesAllocator & physicalDeviceGroupPropertiesAllocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkEnumeratePhysicalDeviceGroupsKHR && "Function requires or " ); # endif std::vector physicalDeviceGroupProperties( physicalDeviceGroupPropertiesAllocator ); uint32_t physicalDeviceGroupCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkEnumeratePhysicalDeviceGroupsKHR( m_instance, &physicalDeviceGroupCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && physicalDeviceGroupCount ) { physicalDeviceGroupProperties.resize( physicalDeviceGroupCount ); result = static_cast( d.vkEnumeratePhysicalDeviceGroupsKHR( m_instance, &physicalDeviceGroupCount, reinterpret_cast( physicalDeviceGroupProperties.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::enumeratePhysicalDeviceGroupsKHR" ); VULKAN_HPP_ASSERT( physicalDeviceGroupCount <= physicalDeviceGroupProperties.size() ); if ( physicalDeviceGroupCount < physicalDeviceGroupProperties.size() ) { physicalDeviceGroupProperties.resize( physicalDeviceGroupCount ); } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( physicalDeviceGroupProperties ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_KHR_external_memory_capabilities === template VULKAN_HPP_INLINE void PhysicalDevice::getExternalBufferPropertiesKHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalBufferInfo * pExternalBufferInfo, VULKAN_HPP_NAMESPACE::ExternalBufferProperties * pExternalBufferProperties, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkGetPhysicalDeviceExternalBufferPropertiesKHR( static_cast( m_physicalDevice ), reinterpret_cast( pExternalBufferInfo ), reinterpret_cast( pExternalBufferProperties ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::ExternalBufferProperties PhysicalDevice::getExternalBufferPropertiesKHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalBufferInfo & externalBufferInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceExternalBufferPropertiesKHR && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::ExternalBufferProperties externalBufferProperties; d.vkGetPhysicalDeviceExternalBufferPropertiesKHR( m_physicalDevice, reinterpret_cast( &externalBufferInfo ), reinterpret_cast( &externalBufferProperties ) ); return externalBufferProperties; } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_KHR_external_memory_win32 === template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getMemoryWin32HandleKHR( const VULKAN_HPP_NAMESPACE::MemoryGetWin32HandleInfoKHR * pGetWin32HandleInfo, HANDLE * pHandle, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetMemoryWin32HandleKHR( static_cast( m_device ), reinterpret_cast( pGetWin32HandleInfo ), pHandle ) ); } # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::getMemoryWin32HandleKHR( const VULKAN_HPP_NAMESPACE::MemoryGetWin32HandleInfoKHR & getWin32HandleInfo, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetMemoryWin32HandleKHR && "Function requires " ); # endif HANDLE handle; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetMemoryWin32HandleKHR( m_device, reinterpret_cast( &getWin32HandleInfo ), &handle ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryWin32HandleKHR" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( handle ) ); } # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getMemoryWin32HandlePropertiesKHR( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType, HANDLE handle, VULKAN_HPP_NAMESPACE::MemoryWin32HandlePropertiesKHR * pMemoryWin32HandleProperties, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetMemoryWin32HandlePropertiesKHR( static_cast( m_device ), static_cast( handleType ), handle, reinterpret_cast( pMemoryWin32HandleProperties ) ) ); } # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::getMemoryWin32HandlePropertiesKHR( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType, HANDLE handle, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetMemoryWin32HandlePropertiesKHR && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::MemoryWin32HandlePropertiesKHR memoryWin32HandleProperties; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetMemoryWin32HandlePropertiesKHR( m_device, static_cast( handleType ), handle, reinterpret_cast( &memoryWin32HandleProperties ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryWin32HandlePropertiesKHR" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( memoryWin32HandleProperties ) ); } # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_KHR_external_memory_fd === template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getMemoryFdKHR( const VULKAN_HPP_NAMESPACE::MemoryGetFdInfoKHR * pGetFdInfo, int * pFd, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetMemoryFdKHR( static_cast( m_device ), reinterpret_cast( pGetFdInfo ), pFd ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::getMemoryFdKHR( const VULKAN_HPP_NAMESPACE::MemoryGetFdInfoKHR & getFdInfo, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetMemoryFdKHR && "Function requires " ); # endif int fd; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetMemoryFdKHR( m_device, reinterpret_cast( &getFdInfo ), &fd ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryFdKHR" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( fd ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getMemoryFdPropertiesKHR( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType, int fd, VULKAN_HPP_NAMESPACE::MemoryFdPropertiesKHR * pMemoryFdProperties, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetMemoryFdPropertiesKHR( static_cast( m_device ), static_cast( handleType ), fd, reinterpret_cast( pMemoryFdProperties ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::getMemoryFdPropertiesKHR( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType, int fd, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetMemoryFdPropertiesKHR && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::MemoryFdPropertiesKHR memoryFdProperties; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetMemoryFdPropertiesKHR( m_device, static_cast( handleType ), fd, reinterpret_cast( &memoryFdProperties ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryFdPropertiesKHR" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( memoryFdProperties ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_KHR_external_semaphore_capabilities === template VULKAN_HPP_INLINE void PhysicalDevice::getExternalSemaphorePropertiesKHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalSemaphoreInfo * pExternalSemaphoreInfo, VULKAN_HPP_NAMESPACE::ExternalSemaphoreProperties * pExternalSemaphoreProperties, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkGetPhysicalDeviceExternalSemaphorePropertiesKHR( static_cast( m_physicalDevice ), reinterpret_cast( pExternalSemaphoreInfo ), reinterpret_cast( pExternalSemaphoreProperties ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::ExternalSemaphoreProperties PhysicalDevice::getExternalSemaphorePropertiesKHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalSemaphoreInfo & externalSemaphoreInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceExternalSemaphorePropertiesKHR && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::ExternalSemaphoreProperties externalSemaphoreProperties; d.vkGetPhysicalDeviceExternalSemaphorePropertiesKHR( m_physicalDevice, reinterpret_cast( &externalSemaphoreInfo ), reinterpret_cast( &externalSemaphoreProperties ) ); return externalSemaphoreProperties; } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_KHR_external_semaphore_win32 === template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::importSemaphoreWin32HandleKHR( const VULKAN_HPP_NAMESPACE::ImportSemaphoreWin32HandleInfoKHR * pImportSemaphoreWin32HandleInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkImportSemaphoreWin32HandleKHR( static_cast( m_device ), reinterpret_cast( pImportSemaphoreWin32HandleInfo ) ) ); } # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type Device::importSemaphoreWin32HandleKHR( const VULKAN_HPP_NAMESPACE::ImportSemaphoreWin32HandleInfoKHR & importSemaphoreWin32HandleInfo, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkImportSemaphoreWin32HandleKHR && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkImportSemaphoreWin32HandleKHR( m_device, reinterpret_cast( &importSemaphoreWin32HandleInfo ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::importSemaphoreWin32HandleKHR" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result ); } # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getSemaphoreWin32HandleKHR( const VULKAN_HPP_NAMESPACE::SemaphoreGetWin32HandleInfoKHR * pGetWin32HandleInfo, HANDLE * pHandle, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetSemaphoreWin32HandleKHR( static_cast( m_device ), reinterpret_cast( pGetWin32HandleInfo ), pHandle ) ); } # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::getSemaphoreWin32HandleKHR( const VULKAN_HPP_NAMESPACE::SemaphoreGetWin32HandleInfoKHR & getWin32HandleInfo, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetSemaphoreWin32HandleKHR && "Function requires " ); # endif HANDLE handle; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetSemaphoreWin32HandleKHR( m_device, reinterpret_cast( &getWin32HandleInfo ), &handle ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getSemaphoreWin32HandleKHR" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( handle ) ); } # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_KHR_external_semaphore_fd === template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::importSemaphoreFdKHR( const VULKAN_HPP_NAMESPACE::ImportSemaphoreFdInfoKHR * pImportSemaphoreFdInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkImportSemaphoreFdKHR( static_cast( m_device ), reinterpret_cast( pImportSemaphoreFdInfo ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type Device::importSemaphoreFdKHR( const VULKAN_HPP_NAMESPACE::ImportSemaphoreFdInfoKHR & importSemaphoreFdInfo, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkImportSemaphoreFdKHR && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkImportSemaphoreFdKHR( m_device, reinterpret_cast( &importSemaphoreFdInfo ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::importSemaphoreFdKHR" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getSemaphoreFdKHR( const VULKAN_HPP_NAMESPACE::SemaphoreGetFdInfoKHR * pGetFdInfo, int * pFd, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetSemaphoreFdKHR( static_cast( m_device ), reinterpret_cast( pGetFdInfo ), pFd ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::getSemaphoreFdKHR( const VULKAN_HPP_NAMESPACE::SemaphoreGetFdInfoKHR & getFdInfo, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetSemaphoreFdKHR && "Function requires " ); # endif int fd; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetSemaphoreFdKHR( m_device, reinterpret_cast( &getFdInfo ), &fd ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getSemaphoreFdKHR" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( fd ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_KHR_push_descriptor === template VULKAN_HPP_INLINE void CommandBuffer::pushDescriptorSetKHR( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint, VULKAN_HPP_NAMESPACE::PipelineLayout layout, uint32_t set, uint32_t descriptorWriteCount, const VULKAN_HPP_NAMESPACE::WriteDescriptorSet * pDescriptorWrites, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdPushDescriptorSetKHR( static_cast( m_commandBuffer ), static_cast( pipelineBindPoint ), static_cast( layout ), set, descriptorWriteCount, reinterpret_cast( pDescriptorWrites ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::pushDescriptorSetKHR( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint, VULKAN_HPP_NAMESPACE::PipelineLayout layout, uint32_t set, VULKAN_HPP_NAMESPACE::ArrayProxy const & descriptorWrites, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdPushDescriptorSetKHR && "Function requires or " ); # endif d.vkCmdPushDescriptorSetKHR( m_commandBuffer, static_cast( pipelineBindPoint ), static_cast( layout ), set, descriptorWrites.size(), reinterpret_cast( descriptorWrites.data() ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::pushDescriptorSetWithTemplateKHR( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate, VULKAN_HPP_NAMESPACE::PipelineLayout layout, uint32_t set, const void * pData, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdPushDescriptorSetWithTemplateKHR( static_cast( m_commandBuffer ), static_cast( descriptorUpdateTemplate ), static_cast( layout ), set, pData ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::pushDescriptorSetWithTemplateKHR( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate, VULKAN_HPP_NAMESPACE::PipelineLayout layout, uint32_t set, DataType const & data, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdPushDescriptorSetWithTemplateKHR && "Function requires or or " ); # endif d.vkCmdPushDescriptorSetWithTemplateKHR( m_commandBuffer, static_cast( descriptorUpdateTemplate ), static_cast( layout ), set, reinterpret_cast( &data ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_EXT_conditional_rendering === template VULKAN_HPP_INLINE void CommandBuffer::beginConditionalRenderingEXT( const VULKAN_HPP_NAMESPACE::ConditionalRenderingBeginInfoEXT * pConditionalRenderingBegin, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdBeginConditionalRenderingEXT( static_cast( m_commandBuffer ), reinterpret_cast( pConditionalRenderingBegin ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::beginConditionalRenderingEXT( const VULKAN_HPP_NAMESPACE::ConditionalRenderingBeginInfoEXT & conditionalRenderingBegin, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdBeginConditionalRenderingEXT && "Function requires " ); # endif d.vkCmdBeginConditionalRenderingEXT( m_commandBuffer, reinterpret_cast( &conditionalRenderingBegin ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::endConditionalRenderingEXT( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdEndConditionalRenderingEXT( static_cast( m_commandBuffer ) ); } //=== VK_KHR_descriptor_update_template === template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::createDescriptorUpdateTemplateKHR( const VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateCreateInfo * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate * pDescriptorUpdateTemplate, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkCreateDescriptorUpdateTemplateKHR( static_cast( m_device ), reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pDescriptorUpdateTemplate ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::createDescriptorUpdateTemplateKHR( const VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateCreateInfo & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateDescriptorUpdateTemplateKHR && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateDescriptorUpdateTemplateKHR( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &descriptorUpdateTemplate ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createDescriptorUpdateTemplateKHR" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( descriptorUpdateTemplate ) ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::createDescriptorUpdateTemplateKHRUnique( const VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateCreateInfo & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateDescriptorUpdateTemplateKHR && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateDescriptorUpdateTemplateKHR( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &descriptorUpdateTemplate ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createDescriptorUpdateTemplateKHRUnique" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, UniqueHandle( descriptorUpdateTemplate, detail::ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::destroyDescriptorUpdateTemplateKHR( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDestroyDescriptorUpdateTemplateKHR( static_cast( m_device ), static_cast( descriptorUpdateTemplate ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::destroyDescriptorUpdateTemplateKHR( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDestroyDescriptorUpdateTemplateKHR && "Function requires or " ); # endif d.vkDestroyDescriptorUpdateTemplateKHR( m_device, static_cast( descriptorUpdateTemplate ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::updateDescriptorSetWithTemplateKHR( VULKAN_HPP_NAMESPACE::DescriptorSet descriptorSet, VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate, const void * pData, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkUpdateDescriptorSetWithTemplateKHR( static_cast( m_device ), static_cast( descriptorSet ), static_cast( descriptorUpdateTemplate ), pData ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::updateDescriptorSetWithTemplateKHR( VULKAN_HPP_NAMESPACE::DescriptorSet descriptorSet, VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate, DataType const & data, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkUpdateDescriptorSetWithTemplateKHR && "Function requires or " ); # endif d.vkUpdateDescriptorSetWithTemplateKHR( m_device, static_cast( descriptorSet ), static_cast( descriptorUpdateTemplate ), reinterpret_cast( &data ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_NV_clip_space_w_scaling === template VULKAN_HPP_INLINE void CommandBuffer::setViewportWScalingNV( uint32_t firstViewport, uint32_t viewportCount, const VULKAN_HPP_NAMESPACE::ViewportWScalingNV * pViewportWScalings, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetViewportWScalingNV( static_cast( m_commandBuffer ), firstViewport, viewportCount, reinterpret_cast( pViewportWScalings ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::setViewportWScalingNV( uint32_t firstViewport, VULKAN_HPP_NAMESPACE::ArrayProxy const & viewportWScalings, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdSetViewportWScalingNV && "Function requires " ); # endif d.vkCmdSetViewportWScalingNV( m_commandBuffer, firstViewport, viewportWScalings.size(), reinterpret_cast( viewportWScalings.data() ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_EXT_direct_mode_display === #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE Result PhysicalDevice::releaseDisplayEXT( VULKAN_HPP_NAMESPACE::DisplayKHR display, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkReleaseDisplayEXT( static_cast( m_physicalDevice ), static_cast( display ) ) ); } #else template VULKAN_HPP_INLINE void PhysicalDevice::releaseDisplayEXT( VULKAN_HPP_NAMESPACE::DisplayKHR display, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkReleaseDisplayEXT && "Function requires " ); # endif d.vkReleaseDisplayEXT( m_physicalDevice, static_cast( display ) ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #if defined( VK_USE_PLATFORM_XLIB_XRANDR_EXT ) //=== VK_EXT_acquire_xlib_display === template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result PhysicalDevice::acquireXlibDisplayEXT( Display * dpy, VULKAN_HPP_NAMESPACE::DisplayKHR display, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkAcquireXlibDisplayEXT( static_cast( m_physicalDevice ), dpy, static_cast( display ) ) ); } # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type PhysicalDevice::acquireXlibDisplayEXT( Display & dpy, VULKAN_HPP_NAMESPACE::DisplayKHR display, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkAcquireXlibDisplayEXT && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkAcquireXlibDisplayEXT( m_physicalDevice, &dpy, static_cast( display ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::acquireXlibDisplayEXT" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result ); } # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result PhysicalDevice::getRandROutputDisplayEXT( Display * dpy, RROutput rrOutput, VULKAN_HPP_NAMESPACE::DisplayKHR * pDisplay, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetRandROutputDisplayEXT( static_cast( m_physicalDevice ), dpy, rrOutput, reinterpret_cast( pDisplay ) ) ); } # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type PhysicalDevice::getRandROutputDisplayEXT( Display & dpy, RROutput rrOutput, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetRandROutputDisplayEXT && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::DisplayKHR display; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetRandROutputDisplayEXT( m_physicalDevice, &dpy, rrOutput, reinterpret_cast( &display ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getRandROutputDisplayEXT" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( display ) ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getRandROutputDisplayEXTUnique( Display & dpy, RROutput rrOutput, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetRandROutputDisplayEXT && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::DisplayKHR display; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetRandROutputDisplayEXT( m_physicalDevice, &dpy, rrOutput, reinterpret_cast( &display ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getRandROutputDisplayEXTUnique" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, UniqueHandle( display, detail::ObjectRelease( *this, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #endif /*VK_USE_PLATFORM_XLIB_XRANDR_EXT*/ //=== VK_EXT_display_surface_counter === template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result PhysicalDevice::getSurfaceCapabilities2EXT( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, VULKAN_HPP_NAMESPACE::SurfaceCapabilities2EXT * pSurfaceCapabilities, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetPhysicalDeviceSurfaceCapabilities2EXT( static_cast( m_physicalDevice ), static_cast( surface ), reinterpret_cast( pSurfaceCapabilities ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type PhysicalDevice::getSurfaceCapabilities2EXT( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceSurfaceCapabilities2EXT && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::SurfaceCapabilities2EXT surfaceCapabilities; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetPhysicalDeviceSurfaceCapabilities2EXT( m_physicalDevice, static_cast( surface ), reinterpret_cast( &surfaceCapabilities ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceCapabilities2EXT" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( surfaceCapabilities ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_EXT_display_control === template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::displayPowerControlEXT( VULKAN_HPP_NAMESPACE::DisplayKHR display, const VULKAN_HPP_NAMESPACE::DisplayPowerInfoEXT * pDisplayPowerInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkDisplayPowerControlEXT( static_cast( m_device ), static_cast( display ), reinterpret_cast( pDisplayPowerInfo ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE typename ResultValueType::type Device::displayPowerControlEXT( VULKAN_HPP_NAMESPACE::DisplayKHR display, const VULKAN_HPP_NAMESPACE::DisplayPowerInfoEXT & displayPowerInfo, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDisplayPowerControlEXT && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkDisplayPowerControlEXT( m_device, static_cast( display ), reinterpret_cast( &displayPowerInfo ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::displayPowerControlEXT" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::registerEventEXT( const VULKAN_HPP_NAMESPACE::DeviceEventInfoEXT * pDeviceEventInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::Fence * pFence, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkRegisterDeviceEventEXT( static_cast( m_device ), reinterpret_cast( pDeviceEventInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pFence ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::registerEventEXT( const VULKAN_HPP_NAMESPACE::DeviceEventInfoEXT & deviceEventInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkRegisterDeviceEventEXT && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Fence fence; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkRegisterDeviceEventEXT( m_device, reinterpret_cast( &deviceEventInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &fence ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::registerEventEXT" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( fence ) ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::registerEventEXTUnique( const VULKAN_HPP_NAMESPACE::DeviceEventInfoEXT & deviceEventInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkRegisterDeviceEventEXT && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Fence fence; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkRegisterDeviceEventEXT( m_device, reinterpret_cast( &deviceEventInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &fence ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::registerEventEXTUnique" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, UniqueHandle( fence, detail::ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::registerDisplayEventEXT( VULKAN_HPP_NAMESPACE::DisplayKHR display, const VULKAN_HPP_NAMESPACE::DisplayEventInfoEXT * pDisplayEventInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::Fence * pFence, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkRegisterDisplayEventEXT( static_cast( m_device ), static_cast( display ), reinterpret_cast( pDisplayEventInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pFence ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::registerDisplayEventEXT( VULKAN_HPP_NAMESPACE::DisplayKHR display, const VULKAN_HPP_NAMESPACE::DisplayEventInfoEXT & displayEventInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkRegisterDisplayEventEXT && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Fence fence; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkRegisterDisplayEventEXT( m_device, static_cast( display ), reinterpret_cast( &displayEventInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &fence ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::registerDisplayEventEXT" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( fence ) ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::registerDisplayEventEXTUnique( VULKAN_HPP_NAMESPACE::DisplayKHR display, const VULKAN_HPP_NAMESPACE::DisplayEventInfoEXT & displayEventInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkRegisterDisplayEventEXT && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Fence fence; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkRegisterDisplayEventEXT( m_device, static_cast( display ), reinterpret_cast( &displayEventInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &fence ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::registerDisplayEventEXTUnique" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, UniqueHandle( fence, detail::ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getSwapchainCounterEXT( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, VULKAN_HPP_NAMESPACE::SurfaceCounterFlagBitsEXT counter, uint64_t * pCounterValue, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetSwapchainCounterEXT( static_cast( m_device ), static_cast( swapchain ), static_cast( counter ), pCounterValue ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::getSwapchainCounterEXT( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, VULKAN_HPP_NAMESPACE::SurfaceCounterFlagBitsEXT counter, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetSwapchainCounterEXT && "Function requires " ); # endif uint64_t counterValue; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetSwapchainCounterEXT( m_device, static_cast( swapchain ), static_cast( counter ), &counterValue ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getSwapchainCounterEXT" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( counterValue ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_GOOGLE_display_timing === template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getRefreshCycleDurationGOOGLE( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, VULKAN_HPP_NAMESPACE::RefreshCycleDurationGOOGLE * pDisplayTimingProperties, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetRefreshCycleDurationGOOGLE( static_cast( m_device ), static_cast( swapchain ), reinterpret_cast( pDisplayTimingProperties ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::getRefreshCycleDurationGOOGLE( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetRefreshCycleDurationGOOGLE && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::RefreshCycleDurationGOOGLE displayTimingProperties; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetRefreshCycleDurationGOOGLE( m_device, static_cast( swapchain ), reinterpret_cast( &displayTimingProperties ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getRefreshCycleDurationGOOGLE" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( displayTimingProperties ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getPastPresentationTimingGOOGLE( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, uint32_t * pPresentationTimingCount, VULKAN_HPP_NAMESPACE::PastPresentationTimingGOOGLE * pPresentationTimings, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetPastPresentationTimingGOOGLE( static_cast( m_device ), static_cast( swapchain ), pPresentationTimingCount, reinterpret_cast( pPresentationTimings ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template < typename PastPresentationTimingGOOGLEAllocator, typename Dispatch, typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::getPastPresentationTimingGOOGLE( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPastPresentationTimingGOOGLE && "Function requires " ); # endif std::vector presentationTimings; uint32_t presentationTimingCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkGetPastPresentationTimingGOOGLE( m_device, static_cast( swapchain ), &presentationTimingCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && presentationTimingCount ) { presentationTimings.resize( presentationTimingCount ); result = static_cast( d.vkGetPastPresentationTimingGOOGLE( m_device, static_cast( swapchain ), &presentationTimingCount, reinterpret_cast( presentationTimings.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getPastPresentationTimingGOOGLE" ); VULKAN_HPP_ASSERT( presentationTimingCount <= presentationTimings.size() ); if ( presentationTimingCount < presentationTimings.size() ) { presentationTimings.resize( presentationTimingCount ); } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( presentationTimings ) ); } template < typename PastPresentationTimingGOOGLEAllocator, typename Dispatch, typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::getPastPresentationTimingGOOGLE( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, PastPresentationTimingGOOGLEAllocator & pastPresentationTimingGOOGLEAllocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPastPresentationTimingGOOGLE && "Function requires " ); # endif std::vector presentationTimings( pastPresentationTimingGOOGLEAllocator ); uint32_t presentationTimingCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkGetPastPresentationTimingGOOGLE( m_device, static_cast( swapchain ), &presentationTimingCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && presentationTimingCount ) { presentationTimings.resize( presentationTimingCount ); result = static_cast( d.vkGetPastPresentationTimingGOOGLE( m_device, static_cast( swapchain ), &presentationTimingCount, reinterpret_cast( presentationTimings.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getPastPresentationTimingGOOGLE" ); VULKAN_HPP_ASSERT( presentationTimingCount <= presentationTimings.size() ); if ( presentationTimingCount < presentationTimings.size() ) { presentationTimings.resize( presentationTimingCount ); } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( presentationTimings ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_EXT_discard_rectangles === template VULKAN_HPP_INLINE void CommandBuffer::setDiscardRectangleEXT( uint32_t firstDiscardRectangle, uint32_t discardRectangleCount, const VULKAN_HPP_NAMESPACE::Rect2D * pDiscardRectangles, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetDiscardRectangleEXT( static_cast( m_commandBuffer ), firstDiscardRectangle, discardRectangleCount, reinterpret_cast( pDiscardRectangles ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::setDiscardRectangleEXT( uint32_t firstDiscardRectangle, VULKAN_HPP_NAMESPACE::ArrayProxy const & discardRectangles, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdSetDiscardRectangleEXT && "Function requires " ); # endif d.vkCmdSetDiscardRectangleEXT( m_commandBuffer, firstDiscardRectangle, discardRectangles.size(), reinterpret_cast( discardRectangles.data() ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::setDiscardRectangleEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 discardRectangleEnable, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetDiscardRectangleEnableEXT( static_cast( m_commandBuffer ), static_cast( discardRectangleEnable ) ); } template VULKAN_HPP_INLINE void CommandBuffer::setDiscardRectangleModeEXT( VULKAN_HPP_NAMESPACE::DiscardRectangleModeEXT discardRectangleMode, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetDiscardRectangleModeEXT( static_cast( m_commandBuffer ), static_cast( discardRectangleMode ) ); } //=== VK_EXT_hdr_metadata === template VULKAN_HPP_INLINE void Device::setHdrMetadataEXT( uint32_t swapchainCount, const VULKAN_HPP_NAMESPACE::SwapchainKHR * pSwapchains, const VULKAN_HPP_NAMESPACE::HdrMetadataEXT * pMetadata, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkSetHdrMetadataEXT( static_cast( m_device ), swapchainCount, reinterpret_cast( pSwapchains ), reinterpret_cast( pMetadata ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::setHdrMetadataEXT( VULKAN_HPP_NAMESPACE::ArrayProxy const & swapchains, VULKAN_HPP_NAMESPACE::ArrayProxy const & metadata, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkSetHdrMetadataEXT && "Function requires " ); # endif # ifdef VULKAN_HPP_NO_EXCEPTIONS VULKAN_HPP_ASSERT( swapchains.size() == metadata.size() ); # else if ( swapchains.size() != metadata.size() ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::Device::setHdrMetadataEXT: swapchains.size() != metadata.size()" ); } # endif /*VULKAN_HPP_NO_EXCEPTIONS*/ d.vkSetHdrMetadataEXT( m_device, swapchains.size(), reinterpret_cast( swapchains.data() ), reinterpret_cast( metadata.data() ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_KHR_create_renderpass2 === template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::createRenderPass2KHR( const VULKAN_HPP_NAMESPACE::RenderPassCreateInfo2 * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::RenderPass * pRenderPass, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkCreateRenderPass2KHR( static_cast( m_device ), reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pRenderPass ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::createRenderPass2KHR( const VULKAN_HPP_NAMESPACE::RenderPassCreateInfo2 & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateRenderPass2KHR && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::RenderPass renderPass; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateRenderPass2KHR( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &renderPass ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createRenderPass2KHR" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( renderPass ) ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::createRenderPass2KHRUnique( const VULKAN_HPP_NAMESPACE::RenderPassCreateInfo2 & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateRenderPass2KHR && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::RenderPass renderPass; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateRenderPass2KHR( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &renderPass ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createRenderPass2KHRUnique" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, UniqueHandle( renderPass, detail::ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::beginRenderPass2KHR( const VULKAN_HPP_NAMESPACE::RenderPassBeginInfo * pRenderPassBegin, const VULKAN_HPP_NAMESPACE::SubpassBeginInfo * pSubpassBeginInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdBeginRenderPass2KHR( static_cast( m_commandBuffer ), reinterpret_cast( pRenderPassBegin ), reinterpret_cast( pSubpassBeginInfo ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::beginRenderPass2KHR( const VULKAN_HPP_NAMESPACE::RenderPassBeginInfo & renderPassBegin, const VULKAN_HPP_NAMESPACE::SubpassBeginInfo & subpassBeginInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdBeginRenderPass2KHR && "Function requires or " ); # endif d.vkCmdBeginRenderPass2KHR( m_commandBuffer, reinterpret_cast( &renderPassBegin ), reinterpret_cast( &subpassBeginInfo ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::nextSubpass2KHR( const VULKAN_HPP_NAMESPACE::SubpassBeginInfo * pSubpassBeginInfo, const VULKAN_HPP_NAMESPACE::SubpassEndInfo * pSubpassEndInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdNextSubpass2KHR( static_cast( m_commandBuffer ), reinterpret_cast( pSubpassBeginInfo ), reinterpret_cast( pSubpassEndInfo ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::nextSubpass2KHR( const VULKAN_HPP_NAMESPACE::SubpassBeginInfo & subpassBeginInfo, const VULKAN_HPP_NAMESPACE::SubpassEndInfo & subpassEndInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdNextSubpass2KHR && "Function requires or " ); # endif d.vkCmdNextSubpass2KHR( m_commandBuffer, reinterpret_cast( &subpassBeginInfo ), reinterpret_cast( &subpassEndInfo ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::endRenderPass2KHR( const VULKAN_HPP_NAMESPACE::SubpassEndInfo * pSubpassEndInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdEndRenderPass2KHR( static_cast( m_commandBuffer ), reinterpret_cast( pSubpassEndInfo ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::endRenderPass2KHR( const VULKAN_HPP_NAMESPACE::SubpassEndInfo & subpassEndInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdEndRenderPass2KHR && "Function requires or " ); # endif d.vkCmdEndRenderPass2KHR( m_commandBuffer, reinterpret_cast( &subpassEndInfo ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_KHR_shared_presentable_image === #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getSwapchainStatusKHR( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetSwapchainStatusKHR( static_cast( m_device ), static_cast( swapchain ) ) ); } #else template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Device::getSwapchainStatusKHR( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetSwapchainStatusKHR && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetSwapchainStatusKHR( m_device, static_cast( swapchain ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getSwapchainStatusKHR", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eSuboptimalKHR } ); return static_cast( result ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ //=== VK_KHR_external_fence_capabilities === template VULKAN_HPP_INLINE void PhysicalDevice::getExternalFencePropertiesKHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalFenceInfo * pExternalFenceInfo, VULKAN_HPP_NAMESPACE::ExternalFenceProperties * pExternalFenceProperties, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkGetPhysicalDeviceExternalFencePropertiesKHR( static_cast( m_physicalDevice ), reinterpret_cast( pExternalFenceInfo ), reinterpret_cast( pExternalFenceProperties ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::ExternalFenceProperties PhysicalDevice::getExternalFencePropertiesKHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalFenceInfo & externalFenceInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceExternalFencePropertiesKHR && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::ExternalFenceProperties externalFenceProperties; d.vkGetPhysicalDeviceExternalFencePropertiesKHR( m_physicalDevice, reinterpret_cast( &externalFenceInfo ), reinterpret_cast( &externalFenceProperties ) ); return externalFenceProperties; } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_KHR_external_fence_win32 === template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::importFenceWin32HandleKHR( const VULKAN_HPP_NAMESPACE::ImportFenceWin32HandleInfoKHR * pImportFenceWin32HandleInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkImportFenceWin32HandleKHR( static_cast( m_device ), reinterpret_cast( pImportFenceWin32HandleInfo ) ) ); } # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type Device::importFenceWin32HandleKHR( const VULKAN_HPP_NAMESPACE::ImportFenceWin32HandleInfoKHR & importFenceWin32HandleInfo, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkImportFenceWin32HandleKHR && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkImportFenceWin32HandleKHR( m_device, reinterpret_cast( &importFenceWin32HandleInfo ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::importFenceWin32HandleKHR" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result ); } # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getFenceWin32HandleKHR( const VULKAN_HPP_NAMESPACE::FenceGetWin32HandleInfoKHR * pGetWin32HandleInfo, HANDLE * pHandle, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetFenceWin32HandleKHR( static_cast( m_device ), reinterpret_cast( pGetWin32HandleInfo ), pHandle ) ); } # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::getFenceWin32HandleKHR( const VULKAN_HPP_NAMESPACE::FenceGetWin32HandleInfoKHR & getWin32HandleInfo, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetFenceWin32HandleKHR && "Function requires " ); # endif HANDLE handle; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetFenceWin32HandleKHR( m_device, reinterpret_cast( &getWin32HandleInfo ), &handle ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getFenceWin32HandleKHR" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( handle ) ); } # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_KHR_external_fence_fd === template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::importFenceFdKHR( const VULKAN_HPP_NAMESPACE::ImportFenceFdInfoKHR * pImportFenceFdInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkImportFenceFdKHR( static_cast( m_device ), reinterpret_cast( pImportFenceFdInfo ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type Device::importFenceFdKHR( const VULKAN_HPP_NAMESPACE::ImportFenceFdInfoKHR & importFenceFdInfo, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkImportFenceFdKHR && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkImportFenceFdKHR( m_device, reinterpret_cast( &importFenceFdInfo ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::importFenceFdKHR" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getFenceFdKHR( const VULKAN_HPP_NAMESPACE::FenceGetFdInfoKHR * pGetFdInfo, int * pFd, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetFenceFdKHR( static_cast( m_device ), reinterpret_cast( pGetFdInfo ), pFd ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::getFenceFdKHR( const VULKAN_HPP_NAMESPACE::FenceGetFdInfoKHR & getFdInfo, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetFenceFdKHR && "Function requires " ); # endif int fd; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetFenceFdKHR( m_device, reinterpret_cast( &getFdInfo ), &fd ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getFenceFdKHR" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( fd ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_KHR_performance_query === template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result PhysicalDevice::enumerateQueueFamilyPerformanceQueryCountersKHR( uint32_t queueFamilyIndex, uint32_t * pCounterCount, VULKAN_HPP_NAMESPACE::PerformanceCounterKHR * pCounters, VULKAN_HPP_NAMESPACE::PerformanceCounterDescriptionKHR * pCounterDescriptions, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR( static_cast( m_physicalDevice ), queueFamilyIndex, pCounterCount, reinterpret_cast( pCounters ), reinterpret_cast( pCounterDescriptions ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template ::value && std::is_same::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType, std::vector>>::type PhysicalDevice::enumerateQueueFamilyPerformanceQueryCountersKHR( uint32_t queueFamilyIndex, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR && "Function requires " ); # endif std::pair, std::vector> data_; std::vector & counters = data_.first; std::vector & counterDescriptions = data_.second; uint32_t counterCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR( m_physicalDevice, queueFamilyIndex, &counterCount, nullptr, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && counterCount ) { counters.resize( counterCount ); counterDescriptions.resize( counterCount ); result = static_cast( d.vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR( m_physicalDevice, queueFamilyIndex, &counterCount, reinterpret_cast( counters.data() ), reinterpret_cast( counterDescriptions.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::enumerateQueueFamilyPerformanceQueryCountersKHR" ); VULKAN_HPP_ASSERT( counterCount <= counters.size() ); if ( counterCount < counters.size() ) { counters.resize( counterCount ); counterDescriptions.resize( counterCount ); } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( data_ ) ); } template ::value && std::is_same::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType, std::vector>>::type PhysicalDevice::enumerateQueueFamilyPerformanceQueryCountersKHR( uint32_t queueFamilyIndex, PerformanceCounterKHRAllocator & performanceCounterKHRAllocator, PerformanceCounterDescriptionKHRAllocator & performanceCounterDescriptionKHRAllocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR && "Function requires " ); # endif std::pair, std::vector> data_( std::piecewise_construct, std::forward_as_tuple( performanceCounterKHRAllocator ), std::forward_as_tuple( performanceCounterDescriptionKHRAllocator ) ); std::vector & counters = data_.first; std::vector & counterDescriptions = data_.second; uint32_t counterCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR( m_physicalDevice, queueFamilyIndex, &counterCount, nullptr, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && counterCount ) { counters.resize( counterCount ); counterDescriptions.resize( counterCount ); result = static_cast( d.vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR( m_physicalDevice, queueFamilyIndex, &counterCount, reinterpret_cast( counters.data() ), reinterpret_cast( counterDescriptions.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::enumerateQueueFamilyPerformanceQueryCountersKHR" ); VULKAN_HPP_ASSERT( counterCount <= counters.size() ); if ( counterCount < counters.size() ) { counters.resize( counterCount ); counterDescriptions.resize( counterCount ); } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( data_ ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void PhysicalDevice::getQueueFamilyPerformanceQueryPassesKHR( const VULKAN_HPP_NAMESPACE::QueryPoolPerformanceCreateInfoKHR * pPerformanceQueryCreateInfo, uint32_t * pNumPasses, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR( static_cast( m_physicalDevice ), reinterpret_cast( pPerformanceQueryCreateInfo ), pNumPasses ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE uint32_t PhysicalDevice::getQueueFamilyPerformanceQueryPassesKHR( const VULKAN_HPP_NAMESPACE::QueryPoolPerformanceCreateInfoKHR & performanceQueryCreateInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR && "Function requires " ); # endif uint32_t numPasses; d.vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR( m_physicalDevice, reinterpret_cast( &performanceQueryCreateInfo ), &numPasses ); return numPasses; } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::acquireProfilingLockKHR( const VULKAN_HPP_NAMESPACE::AcquireProfilingLockInfoKHR * pInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkAcquireProfilingLockKHR( static_cast( m_device ), reinterpret_cast( pInfo ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type Device::acquireProfilingLockKHR( const VULKAN_HPP_NAMESPACE::AcquireProfilingLockInfoKHR & info, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkAcquireProfilingLockKHR && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkAcquireProfilingLockKHR( m_device, reinterpret_cast( &info ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::acquireProfilingLockKHR" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::releaseProfilingLockKHR( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkReleaseProfilingLockKHR( static_cast( m_device ) ); } //=== VK_KHR_get_surface_capabilities2 === template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result PhysicalDevice::getSurfaceCapabilities2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR * pSurfaceInfo, VULKAN_HPP_NAMESPACE::SurfaceCapabilities2KHR * pSurfaceCapabilities, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetPhysicalDeviceSurfaceCapabilities2KHR( static_cast( m_physicalDevice ), reinterpret_cast( pSurfaceInfo ), reinterpret_cast( pSurfaceCapabilities ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type PhysicalDevice::getSurfaceCapabilities2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR & surfaceInfo, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceSurfaceCapabilities2KHR && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::SurfaceCapabilities2KHR surfaceCapabilities; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetPhysicalDeviceSurfaceCapabilities2KHR( m_physicalDevice, reinterpret_cast( &surfaceInfo ), reinterpret_cast( &surfaceCapabilities ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceCapabilities2KHR" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( surfaceCapabilities ) ); } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getSurfaceCapabilities2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR & surfaceInfo, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceSurfaceCapabilities2KHR && "Function requires " ); # endif StructureChain structureChain; VULKAN_HPP_NAMESPACE::SurfaceCapabilities2KHR & surfaceCapabilities = structureChain.template get(); VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetPhysicalDeviceSurfaceCapabilities2KHR( m_physicalDevice, reinterpret_cast( &surfaceInfo ), reinterpret_cast( &surfaceCapabilities ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceCapabilities2KHR" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( structureChain ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result PhysicalDevice::getSurfaceFormats2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR * pSurfaceInfo, uint32_t * pSurfaceFormatCount, VULKAN_HPP_NAMESPACE::SurfaceFormat2KHR * pSurfaceFormats, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetPhysicalDeviceSurfaceFormats2KHR( static_cast( m_physicalDevice ), reinterpret_cast( pSurfaceInfo ), pSurfaceFormatCount, reinterpret_cast( pSurfaceFormats ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getSurfaceFormats2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR & surfaceInfo, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceSurfaceFormats2KHR && "Function requires " ); # endif std::vector surfaceFormats; uint32_t surfaceFormatCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkGetPhysicalDeviceSurfaceFormats2KHR( m_physicalDevice, reinterpret_cast( &surfaceInfo ), &surfaceFormatCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && surfaceFormatCount ) { surfaceFormats.resize( surfaceFormatCount ); result = static_cast( d.vkGetPhysicalDeviceSurfaceFormats2KHR( m_physicalDevice, reinterpret_cast( &surfaceInfo ), &surfaceFormatCount, reinterpret_cast( surfaceFormats.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceFormats2KHR" ); VULKAN_HPP_ASSERT( surfaceFormatCount <= surfaceFormats.size() ); if ( surfaceFormatCount < surfaceFormats.size() ) { surfaceFormats.resize( surfaceFormatCount ); } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( surfaceFormats ) ); } template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getSurfaceFormats2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR & surfaceInfo, SurfaceFormat2KHRAllocator & surfaceFormat2KHRAllocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceSurfaceFormats2KHR && "Function requires " ); # endif std::vector surfaceFormats( surfaceFormat2KHRAllocator ); uint32_t surfaceFormatCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkGetPhysicalDeviceSurfaceFormats2KHR( m_physicalDevice, reinterpret_cast( &surfaceInfo ), &surfaceFormatCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && surfaceFormatCount ) { surfaceFormats.resize( surfaceFormatCount ); result = static_cast( d.vkGetPhysicalDeviceSurfaceFormats2KHR( m_physicalDevice, reinterpret_cast( &surfaceInfo ), &surfaceFormatCount, reinterpret_cast( surfaceFormats.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceFormats2KHR" ); VULKAN_HPP_ASSERT( surfaceFormatCount <= surfaceFormats.size() ); if ( surfaceFormatCount < surfaceFormats.size() ) { surfaceFormats.resize( surfaceFormatCount ); } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( surfaceFormats ) ); } template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getSurfaceFormats2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR & surfaceInfo, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceSurfaceFormats2KHR && "Function requires " ); # endif std::vector structureChains; std::vector surfaceFormats; uint32_t surfaceFormatCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkGetPhysicalDeviceSurfaceFormats2KHR( m_physicalDevice, reinterpret_cast( &surfaceInfo ), &surfaceFormatCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && surfaceFormatCount ) { structureChains.resize( surfaceFormatCount ); surfaceFormats.resize( surfaceFormatCount ); for ( uint32_t i = 0; i < surfaceFormatCount; i++ ) { surfaceFormats[i].pNext = structureChains[i].template get().pNext; } result = static_cast( d.vkGetPhysicalDeviceSurfaceFormats2KHR( m_physicalDevice, reinterpret_cast( &surfaceInfo ), &surfaceFormatCount, reinterpret_cast( surfaceFormats.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceFormats2KHR" ); VULKAN_HPP_ASSERT( surfaceFormatCount <= surfaceFormats.size() ); if ( surfaceFormatCount < surfaceFormats.size() ) { structureChains.resize( surfaceFormatCount ); } for ( uint32_t i = 0; i < surfaceFormatCount; i++ ) { structureChains[i].template get() = surfaceFormats[i]; } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( structureChains ) ); } template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getSurfaceFormats2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR & surfaceInfo, StructureChainAllocator & structureChainAllocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceSurfaceFormats2KHR && "Function requires " ); # endif std::vector structureChains( structureChainAllocator ); std::vector surfaceFormats; uint32_t surfaceFormatCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkGetPhysicalDeviceSurfaceFormats2KHR( m_physicalDevice, reinterpret_cast( &surfaceInfo ), &surfaceFormatCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && surfaceFormatCount ) { structureChains.resize( surfaceFormatCount ); surfaceFormats.resize( surfaceFormatCount ); for ( uint32_t i = 0; i < surfaceFormatCount; i++ ) { surfaceFormats[i].pNext = structureChains[i].template get().pNext; } result = static_cast( d.vkGetPhysicalDeviceSurfaceFormats2KHR( m_physicalDevice, reinterpret_cast( &surfaceInfo ), &surfaceFormatCount, reinterpret_cast( surfaceFormats.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceFormats2KHR" ); VULKAN_HPP_ASSERT( surfaceFormatCount <= surfaceFormats.size() ); if ( surfaceFormatCount < surfaceFormats.size() ) { structureChains.resize( surfaceFormatCount ); } for ( uint32_t i = 0; i < surfaceFormatCount; i++ ) { structureChains[i].template get() = surfaceFormats[i]; } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( structureChains ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_KHR_get_display_properties2 === template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result PhysicalDevice::getDisplayProperties2KHR( uint32_t * pPropertyCount, VULKAN_HPP_NAMESPACE::DisplayProperties2KHR * pProperties, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetPhysicalDeviceDisplayProperties2KHR( static_cast( m_physicalDevice ), pPropertyCount, reinterpret_cast( pProperties ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template < typename DisplayProperties2KHRAllocator, typename Dispatch, typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getDisplayProperties2KHR( Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceDisplayProperties2KHR && "Function requires " ); # endif std::vector properties; uint32_t propertyCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkGetPhysicalDeviceDisplayProperties2KHR( m_physicalDevice, &propertyCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); result = static_cast( d.vkGetPhysicalDeviceDisplayProperties2KHR( m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayProperties2KHR" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( properties ) ); } template < typename DisplayProperties2KHRAllocator, typename Dispatch, typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getDisplayProperties2KHR( DisplayProperties2KHRAllocator & displayProperties2KHRAllocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceDisplayProperties2KHR && "Function requires " ); # endif std::vector properties( displayProperties2KHRAllocator ); uint32_t propertyCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkGetPhysicalDeviceDisplayProperties2KHR( m_physicalDevice, &propertyCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); result = static_cast( d.vkGetPhysicalDeviceDisplayProperties2KHR( m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayProperties2KHR" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( properties ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result PhysicalDevice::getDisplayPlaneProperties2KHR( uint32_t * pPropertyCount, VULKAN_HPP_NAMESPACE::DisplayPlaneProperties2KHR * pProperties, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetPhysicalDeviceDisplayPlaneProperties2KHR( static_cast( m_physicalDevice ), pPropertyCount, reinterpret_cast( pProperties ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template < typename DisplayPlaneProperties2KHRAllocator, typename Dispatch, typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getDisplayPlaneProperties2KHR( Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceDisplayPlaneProperties2KHR && "Function requires " ); # endif std::vector properties; uint32_t propertyCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkGetPhysicalDeviceDisplayPlaneProperties2KHR( m_physicalDevice, &propertyCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); result = static_cast( d.vkGetPhysicalDeviceDisplayPlaneProperties2KHR( m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPlaneProperties2KHR" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( properties ) ); } template < typename DisplayPlaneProperties2KHRAllocator, typename Dispatch, typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getDisplayPlaneProperties2KHR( DisplayPlaneProperties2KHRAllocator & displayPlaneProperties2KHRAllocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceDisplayPlaneProperties2KHR && "Function requires " ); # endif std::vector properties( displayPlaneProperties2KHRAllocator ); uint32_t propertyCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkGetPhysicalDeviceDisplayPlaneProperties2KHR( m_physicalDevice, &propertyCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); result = static_cast( d.vkGetPhysicalDeviceDisplayPlaneProperties2KHR( m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPlaneProperties2KHR" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( properties ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result PhysicalDevice::getDisplayModeProperties2KHR( VULKAN_HPP_NAMESPACE::DisplayKHR display, uint32_t * pPropertyCount, VULKAN_HPP_NAMESPACE::DisplayModeProperties2KHR * pProperties, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetDisplayModeProperties2KHR( static_cast( m_physicalDevice ), static_cast( display ), pPropertyCount, reinterpret_cast( pProperties ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template < typename DisplayModeProperties2KHRAllocator, typename Dispatch, typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getDisplayModeProperties2KHR( VULKAN_HPP_NAMESPACE::DisplayKHR display, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetDisplayModeProperties2KHR && "Function requires " ); # endif std::vector properties; uint32_t propertyCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkGetDisplayModeProperties2KHR( m_physicalDevice, static_cast( display ), &propertyCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); result = static_cast( d.vkGetDisplayModeProperties2KHR( m_physicalDevice, static_cast( display ), &propertyCount, reinterpret_cast( properties.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayModeProperties2KHR" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( properties ) ); } template < typename DisplayModeProperties2KHRAllocator, typename Dispatch, typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getDisplayModeProperties2KHR( VULKAN_HPP_NAMESPACE::DisplayKHR display, DisplayModeProperties2KHRAllocator & displayModeProperties2KHRAllocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetDisplayModeProperties2KHR && "Function requires " ); # endif std::vector properties( displayModeProperties2KHRAllocator ); uint32_t propertyCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkGetDisplayModeProperties2KHR( m_physicalDevice, static_cast( display ), &propertyCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); result = static_cast( d.vkGetDisplayModeProperties2KHR( m_physicalDevice, static_cast( display ), &propertyCount, reinterpret_cast( properties.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayModeProperties2KHR" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( properties ) ); } template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getDisplayModeProperties2KHR( VULKAN_HPP_NAMESPACE::DisplayKHR display, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetDisplayModeProperties2KHR && "Function requires " ); # endif std::vector structureChains; std::vector properties; uint32_t propertyCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkGetDisplayModeProperties2KHR( m_physicalDevice, static_cast( display ), &propertyCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { structureChains.resize( propertyCount ); properties.resize( propertyCount ); for ( uint32_t i = 0; i < propertyCount; i++ ) { properties[i].pNext = structureChains[i].template get().pNext; } result = static_cast( d.vkGetDisplayModeProperties2KHR( m_physicalDevice, static_cast( display ), &propertyCount, reinterpret_cast( properties.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayModeProperties2KHR" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { structureChains.resize( propertyCount ); } for ( uint32_t i = 0; i < propertyCount; i++ ) { structureChains[i].template get() = properties[i]; } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( structureChains ) ); } template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getDisplayModeProperties2KHR( VULKAN_HPP_NAMESPACE::DisplayKHR display, StructureChainAllocator & structureChainAllocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetDisplayModeProperties2KHR && "Function requires " ); # endif std::vector structureChains( structureChainAllocator ); std::vector properties; uint32_t propertyCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkGetDisplayModeProperties2KHR( m_physicalDevice, static_cast( display ), &propertyCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { structureChains.resize( propertyCount ); properties.resize( propertyCount ); for ( uint32_t i = 0; i < propertyCount; i++ ) { properties[i].pNext = structureChains[i].template get().pNext; } result = static_cast( d.vkGetDisplayModeProperties2KHR( m_physicalDevice, static_cast( display ), &propertyCount, reinterpret_cast( properties.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayModeProperties2KHR" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { structureChains.resize( propertyCount ); } for ( uint32_t i = 0; i < propertyCount; i++ ) { structureChains[i].template get() = properties[i]; } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( structureChains ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result PhysicalDevice::getDisplayPlaneCapabilities2KHR( const VULKAN_HPP_NAMESPACE::DisplayPlaneInfo2KHR * pDisplayPlaneInfo, VULKAN_HPP_NAMESPACE::DisplayPlaneCapabilities2KHR * pCapabilities, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetDisplayPlaneCapabilities2KHR( static_cast( m_physicalDevice ), reinterpret_cast( pDisplayPlaneInfo ), reinterpret_cast( pCapabilities ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type PhysicalDevice::getDisplayPlaneCapabilities2KHR( const VULKAN_HPP_NAMESPACE::DisplayPlaneInfo2KHR & displayPlaneInfo, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetDisplayPlaneCapabilities2KHR && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::DisplayPlaneCapabilities2KHR capabilities; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetDisplayPlaneCapabilities2KHR( m_physicalDevice, reinterpret_cast( &displayPlaneInfo ), reinterpret_cast( &capabilities ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPlaneCapabilities2KHR" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( capabilities ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #if defined( VK_USE_PLATFORM_IOS_MVK ) //=== VK_MVK_ios_surface === template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Instance::createIOSSurfaceMVK( const VULKAN_HPP_NAMESPACE::IOSSurfaceCreateInfoMVK * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::SurfaceKHR * pSurface, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkCreateIOSSurfaceMVK( static_cast( m_instance ), reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSurface ) ) ); } # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Instance::createIOSSurfaceMVK( const VULKAN_HPP_NAMESPACE::IOSSurfaceCreateInfoMVK & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateIOSSurfaceMVK && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::SurfaceKHR surface; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateIOSSurfaceMVK( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::createIOSSurfaceMVK" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( surface ) ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Instance::createIOSSurfaceMVKUnique( const VULKAN_HPP_NAMESPACE::IOSSurfaceCreateInfoMVK & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateIOSSurfaceMVK && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::SurfaceKHR surface; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateIOSSurfaceMVK( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::createIOSSurfaceMVKUnique" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, UniqueHandle( surface, detail::ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #endif /*VK_USE_PLATFORM_IOS_MVK*/ #if defined( VK_USE_PLATFORM_MACOS_MVK ) //=== VK_MVK_macos_surface === template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Instance::createMacOSSurfaceMVK( const VULKAN_HPP_NAMESPACE::MacOSSurfaceCreateInfoMVK * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::SurfaceKHR * pSurface, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkCreateMacOSSurfaceMVK( static_cast( m_instance ), reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSurface ) ) ); } # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Instance::createMacOSSurfaceMVK( const VULKAN_HPP_NAMESPACE::MacOSSurfaceCreateInfoMVK & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateMacOSSurfaceMVK && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::SurfaceKHR surface; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateMacOSSurfaceMVK( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::createMacOSSurfaceMVK" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( surface ) ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Instance::createMacOSSurfaceMVKUnique( const VULKAN_HPP_NAMESPACE::MacOSSurfaceCreateInfoMVK & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateMacOSSurfaceMVK && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::SurfaceKHR surface; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateMacOSSurfaceMVK( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::createMacOSSurfaceMVKUnique" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, UniqueHandle( surface, detail::ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #endif /*VK_USE_PLATFORM_MACOS_MVK*/ //=== VK_EXT_debug_utils === template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::setDebugUtilsObjectNameEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsObjectNameInfoEXT * pNameInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkSetDebugUtilsObjectNameEXT( static_cast( m_device ), reinterpret_cast( pNameInfo ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type Device::setDebugUtilsObjectNameEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsObjectNameInfoEXT & nameInfo, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkSetDebugUtilsObjectNameEXT && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkSetDebugUtilsObjectNameEXT( m_device, reinterpret_cast( &nameInfo ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::setDebugUtilsObjectNameEXT" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::setDebugUtilsObjectTagEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsObjectTagInfoEXT * pTagInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkSetDebugUtilsObjectTagEXT( static_cast( m_device ), reinterpret_cast( pTagInfo ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type Device::setDebugUtilsObjectTagEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsObjectTagInfoEXT & tagInfo, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkSetDebugUtilsObjectTagEXT && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkSetDebugUtilsObjectTagEXT( m_device, reinterpret_cast( &tagInfo ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::setDebugUtilsObjectTagEXT" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Queue::beginDebugUtilsLabelEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsLabelEXT * pLabelInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkQueueBeginDebugUtilsLabelEXT( static_cast( m_queue ), reinterpret_cast( pLabelInfo ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Queue::beginDebugUtilsLabelEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsLabelEXT & labelInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkQueueBeginDebugUtilsLabelEXT && "Function requires " ); # endif d.vkQueueBeginDebugUtilsLabelEXT( m_queue, reinterpret_cast( &labelInfo ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Queue::endDebugUtilsLabelEXT( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkQueueEndDebugUtilsLabelEXT( static_cast( m_queue ) ); } template VULKAN_HPP_INLINE void Queue::insertDebugUtilsLabelEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsLabelEXT * pLabelInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkQueueInsertDebugUtilsLabelEXT( static_cast( m_queue ), reinterpret_cast( pLabelInfo ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Queue::insertDebugUtilsLabelEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsLabelEXT & labelInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkQueueInsertDebugUtilsLabelEXT && "Function requires " ); # endif d.vkQueueInsertDebugUtilsLabelEXT( m_queue, reinterpret_cast( &labelInfo ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::beginDebugUtilsLabelEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsLabelEXT * pLabelInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdBeginDebugUtilsLabelEXT( static_cast( m_commandBuffer ), reinterpret_cast( pLabelInfo ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::beginDebugUtilsLabelEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsLabelEXT & labelInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdBeginDebugUtilsLabelEXT && "Function requires " ); # endif d.vkCmdBeginDebugUtilsLabelEXT( m_commandBuffer, reinterpret_cast( &labelInfo ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::endDebugUtilsLabelEXT( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdEndDebugUtilsLabelEXT( static_cast( m_commandBuffer ) ); } template VULKAN_HPP_INLINE void CommandBuffer::insertDebugUtilsLabelEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsLabelEXT * pLabelInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdInsertDebugUtilsLabelEXT( static_cast( m_commandBuffer ), reinterpret_cast( pLabelInfo ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::insertDebugUtilsLabelEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsLabelEXT & labelInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdInsertDebugUtilsLabelEXT && "Function requires " ); # endif d.vkCmdInsertDebugUtilsLabelEXT( m_commandBuffer, reinterpret_cast( &labelInfo ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Instance::createDebugUtilsMessengerEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsMessengerCreateInfoEXT * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::DebugUtilsMessengerEXT * pMessenger, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkCreateDebugUtilsMessengerEXT( static_cast( m_instance ), reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pMessenger ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Instance::createDebugUtilsMessengerEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsMessengerCreateInfoEXT & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateDebugUtilsMessengerEXT && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::DebugUtilsMessengerEXT messenger; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateDebugUtilsMessengerEXT( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &messenger ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::createDebugUtilsMessengerEXT" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( messenger ) ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Instance::createDebugUtilsMessengerEXTUnique( const VULKAN_HPP_NAMESPACE::DebugUtilsMessengerCreateInfoEXT & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateDebugUtilsMessengerEXT && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::DebugUtilsMessengerEXT messenger; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateDebugUtilsMessengerEXT( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &messenger ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::createDebugUtilsMessengerEXTUnique" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, UniqueHandle( messenger, detail::ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Instance::destroyDebugUtilsMessengerEXT( VULKAN_HPP_NAMESPACE::DebugUtilsMessengerEXT messenger, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDestroyDebugUtilsMessengerEXT( static_cast( m_instance ), static_cast( messenger ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Instance::destroyDebugUtilsMessengerEXT( VULKAN_HPP_NAMESPACE::DebugUtilsMessengerEXT messenger, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDestroyDebugUtilsMessengerEXT && "Function requires " ); # endif d.vkDestroyDebugUtilsMessengerEXT( m_instance, static_cast( messenger ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Instance::destroy( VULKAN_HPP_NAMESPACE::DebugUtilsMessengerEXT messenger, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDestroyDebugUtilsMessengerEXT( static_cast( m_instance ), static_cast( messenger ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Instance::destroy( VULKAN_HPP_NAMESPACE::DebugUtilsMessengerEXT messenger, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDestroyDebugUtilsMessengerEXT && "Function requires " ); # endif d.vkDestroyDebugUtilsMessengerEXT( m_instance, static_cast( messenger ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Instance::submitDebugUtilsMessageEXT( VULKAN_HPP_NAMESPACE::DebugUtilsMessageSeverityFlagBitsEXT messageSeverity, VULKAN_HPP_NAMESPACE::DebugUtilsMessageTypeFlagsEXT messageTypes, const VULKAN_HPP_NAMESPACE::DebugUtilsMessengerCallbackDataEXT * pCallbackData, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkSubmitDebugUtilsMessageEXT( static_cast( m_instance ), static_cast( messageSeverity ), static_cast( messageTypes ), reinterpret_cast( pCallbackData ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Instance::submitDebugUtilsMessageEXT( VULKAN_HPP_NAMESPACE::DebugUtilsMessageSeverityFlagBitsEXT messageSeverity, VULKAN_HPP_NAMESPACE::DebugUtilsMessageTypeFlagsEXT messageTypes, const VULKAN_HPP_NAMESPACE::DebugUtilsMessengerCallbackDataEXT & callbackData, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkSubmitDebugUtilsMessageEXT && "Function requires " ); # endif d.vkSubmitDebugUtilsMessageEXT( m_instance, static_cast( messageSeverity ), static_cast( messageTypes ), reinterpret_cast( &callbackData ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #if defined( VK_USE_PLATFORM_ANDROID_KHR ) //=== VK_ANDROID_external_memory_android_hardware_buffer === template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getAndroidHardwareBufferPropertiesANDROID( const struct AHardwareBuffer * buffer, VULKAN_HPP_NAMESPACE::AndroidHardwareBufferPropertiesANDROID * pProperties, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetAndroidHardwareBufferPropertiesANDROID( static_cast( m_device ), buffer, reinterpret_cast( pProperties ) ) ); } # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::getAndroidHardwareBufferPropertiesANDROID( const struct AHardwareBuffer & buffer, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetAndroidHardwareBufferPropertiesANDROID && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::AndroidHardwareBufferPropertiesANDROID properties; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetAndroidHardwareBufferPropertiesANDROID( m_device, &buffer, reinterpret_cast( &properties ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getAndroidHardwareBufferPropertiesANDROID" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( properties ) ); } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::getAndroidHardwareBufferPropertiesANDROID( const struct AHardwareBuffer & buffer, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetAndroidHardwareBufferPropertiesANDROID && "Function requires " ); # endif StructureChain structureChain; VULKAN_HPP_NAMESPACE::AndroidHardwareBufferPropertiesANDROID & properties = structureChain.template get(); VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetAndroidHardwareBufferPropertiesANDROID( m_device, &buffer, reinterpret_cast( &properties ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getAndroidHardwareBufferPropertiesANDROID" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( structureChain ) ); } # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getMemoryAndroidHardwareBufferANDROID( const VULKAN_HPP_NAMESPACE::MemoryGetAndroidHardwareBufferInfoANDROID * pInfo, struct AHardwareBuffer ** pBuffer, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetMemoryAndroidHardwareBufferANDROID( static_cast( m_device ), reinterpret_cast( pInfo ), pBuffer ) ); } # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::getMemoryAndroidHardwareBufferANDROID( const VULKAN_HPP_NAMESPACE::MemoryGetAndroidHardwareBufferInfoANDROID & info, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetMemoryAndroidHardwareBufferANDROID && "Function requires " ); # endif struct AHardwareBuffer * buffer; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetMemoryAndroidHardwareBufferANDROID( m_device, reinterpret_cast( &info ), &buffer ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryAndroidHardwareBufferANDROID" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( buffer ) ); } # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #endif /*VK_USE_PLATFORM_ANDROID_KHR*/ #if defined( VK_ENABLE_BETA_EXTENSIONS ) //=== VK_AMDX_shader_enqueue === template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::createExecutionGraphPipelinesAMDX( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, uint32_t createInfoCount, const VULKAN_HPP_NAMESPACE::ExecutionGraphPipelineCreateInfoAMDX * pCreateInfos, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::Pipeline * pPipelines, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkCreateExecutionGraphPipelinesAMDX( static_cast( m_device ), static_cast( pipelineCache ), createInfoCount, reinterpret_cast( pCreateInfos ), reinterpret_cast( pAllocator ), reinterpret_cast( pPipelines ) ) ); } # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue> Device::createExecutionGraphPipelinesAMDX( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateExecutionGraphPipelinesAMDX && "Function requires " ); # endif std::vector pipelines( createInfos.size() ); VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateExecutionGraphPipelinesAMDX( m_device, static_cast( pipelineCache ), createInfos.size(), reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( pipelines.data() ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createExecutionGraphPipelinesAMDX", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); return ResultValue>( result, std::move( pipelines ) ); } template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue> Device::createExecutionGraphPipelinesAMDX( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, Optional allocator, PipelineAllocator & pipelineAllocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateExecutionGraphPipelinesAMDX && "Function requires " ); # endif std::vector pipelines( createInfos.size(), pipelineAllocator ); VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateExecutionGraphPipelinesAMDX( m_device, static_cast( pipelineCache ), createInfos.size(), reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( pipelines.data() ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createExecutionGraphPipelinesAMDX", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); return ResultValue>( result, std::move( pipelines ) ); } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue Device::createExecutionGraphPipelineAMDX( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, const VULKAN_HPP_NAMESPACE::ExecutionGraphPipelineCreateInfoAMDX & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateExecutionGraphPipelinesAMDX && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Pipeline pipeline; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateExecutionGraphPipelinesAMDX( m_device, static_cast( pipelineCache ), 1, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &pipeline ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createExecutionGraphPipelineAMDX", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); return ResultValue( result, std::move( pipeline ) ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE template < typename Dispatch, typename PipelineAllocator, typename std::enable_if>::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue, PipelineAllocator>> Device::createExecutionGraphPipelinesAMDXUnique( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateExecutionGraphPipelinesAMDX && "Function requires " ); # endif std::vector pipelines( createInfos.size() ); VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateExecutionGraphPipelinesAMDX( m_device, static_cast( pipelineCache ), createInfos.size(), reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( pipelines.data() ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createExecutionGraphPipelinesAMDXUnique", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); std::vector, PipelineAllocator> uniquePipelines; uniquePipelines.reserve( createInfos.size() ); detail::ObjectDestroy deleter( *this, allocator, d ); for ( auto const & pipeline : pipelines ) { uniquePipelines.push_back( UniqueHandle( pipeline, deleter ) ); } return ResultValue, PipelineAllocator>>( result, std::move( uniquePipelines ) ); } template < typename Dispatch, typename PipelineAllocator, typename std::enable_if>::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue, PipelineAllocator>> Device::createExecutionGraphPipelinesAMDXUnique( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, Optional allocator, PipelineAllocator & pipelineAllocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateExecutionGraphPipelinesAMDX && "Function requires " ); # endif std::vector pipelines( createInfos.size() ); VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateExecutionGraphPipelinesAMDX( m_device, static_cast( pipelineCache ), createInfos.size(), reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( pipelines.data() ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createExecutionGraphPipelinesAMDXUnique", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); std::vector, PipelineAllocator> uniquePipelines( pipelineAllocator ); uniquePipelines.reserve( createInfos.size() ); detail::ObjectDestroy deleter( *this, allocator, d ); for ( auto const & pipeline : pipelines ) { uniquePipelines.push_back( UniqueHandle( pipeline, deleter ) ); } return ResultValue, PipelineAllocator>>( result, std::move( uniquePipelines ) ); } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue> Device::createExecutionGraphPipelineAMDXUnique( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, const VULKAN_HPP_NAMESPACE::ExecutionGraphPipelineCreateInfoAMDX & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateExecutionGraphPipelinesAMDX && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Pipeline pipeline; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateExecutionGraphPipelinesAMDX( m_device, static_cast( pipelineCache ), 1, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &pipeline ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createExecutionGraphPipelineAMDXUnique", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); return ResultValue>( result, UniqueHandle( pipeline, detail::ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getExecutionGraphPipelineScratchSizeAMDX( VULKAN_HPP_NAMESPACE::Pipeline executionGraph, VULKAN_HPP_NAMESPACE::ExecutionGraphPipelineScratchSizeAMDX * pSizeInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetExecutionGraphPipelineScratchSizeAMDX( static_cast( m_device ), static_cast( executionGraph ), reinterpret_cast( pSizeInfo ) ) ); } # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::getExecutionGraphPipelineScratchSizeAMDX( VULKAN_HPP_NAMESPACE::Pipeline executionGraph, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetExecutionGraphPipelineScratchSizeAMDX && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::ExecutionGraphPipelineScratchSizeAMDX sizeInfo; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetExecutionGraphPipelineScratchSizeAMDX( m_device, static_cast( executionGraph ), reinterpret_cast( &sizeInfo ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getExecutionGraphPipelineScratchSizeAMDX" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( sizeInfo ) ); } # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getExecutionGraphPipelineNodeIndexAMDX( VULKAN_HPP_NAMESPACE::Pipeline executionGraph, const VULKAN_HPP_NAMESPACE::PipelineShaderStageNodeCreateInfoAMDX * pNodeInfo, uint32_t * pNodeIndex, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetExecutionGraphPipelineNodeIndexAMDX( static_cast( m_device ), static_cast( executionGraph ), reinterpret_cast( pNodeInfo ), pNodeIndex ) ); } # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::getExecutionGraphPipelineNodeIndexAMDX( VULKAN_HPP_NAMESPACE::Pipeline executionGraph, const VULKAN_HPP_NAMESPACE::PipelineShaderStageNodeCreateInfoAMDX & nodeInfo, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetExecutionGraphPipelineNodeIndexAMDX && "Function requires " ); # endif uint32_t nodeIndex; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetExecutionGraphPipelineNodeIndexAMDX( m_device, static_cast( executionGraph ), reinterpret_cast( &nodeInfo ), &nodeIndex ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getExecutionGraphPipelineNodeIndexAMDX" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( nodeIndex ) ); } # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::initializeGraphScratchMemoryAMDX( VULKAN_HPP_NAMESPACE::Pipeline executionGraph, VULKAN_HPP_NAMESPACE::DeviceAddress scratch, VULKAN_HPP_NAMESPACE::DeviceSize scratchSize, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdInitializeGraphScratchMemoryAMDX( static_cast( m_commandBuffer ), static_cast( executionGraph ), static_cast( scratch ), static_cast( scratchSize ) ); } template VULKAN_HPP_INLINE void CommandBuffer::dispatchGraphAMDX( VULKAN_HPP_NAMESPACE::DeviceAddress scratch, VULKAN_HPP_NAMESPACE::DeviceSize scratchSize, const VULKAN_HPP_NAMESPACE::DispatchGraphCountInfoAMDX * pCountInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdDispatchGraphAMDX( static_cast( m_commandBuffer ), static_cast( scratch ), static_cast( scratchSize ), reinterpret_cast( pCountInfo ) ); } # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::dispatchGraphAMDX( VULKAN_HPP_NAMESPACE::DeviceAddress scratch, VULKAN_HPP_NAMESPACE::DeviceSize scratchSize, const VULKAN_HPP_NAMESPACE::DispatchGraphCountInfoAMDX & countInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdDispatchGraphAMDX && "Function requires " ); # endif d.vkCmdDispatchGraphAMDX( m_commandBuffer, static_cast( scratch ), static_cast( scratchSize ), reinterpret_cast( &countInfo ) ); } # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::dispatchGraphIndirectAMDX( VULKAN_HPP_NAMESPACE::DeviceAddress scratch, VULKAN_HPP_NAMESPACE::DeviceSize scratchSize, const VULKAN_HPP_NAMESPACE::DispatchGraphCountInfoAMDX * pCountInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdDispatchGraphIndirectAMDX( static_cast( m_commandBuffer ), static_cast( scratch ), static_cast( scratchSize ), reinterpret_cast( pCountInfo ) ); } # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::dispatchGraphIndirectAMDX( VULKAN_HPP_NAMESPACE::DeviceAddress scratch, VULKAN_HPP_NAMESPACE::DeviceSize scratchSize, const VULKAN_HPP_NAMESPACE::DispatchGraphCountInfoAMDX & countInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdDispatchGraphIndirectAMDX && "Function requires " ); # endif d.vkCmdDispatchGraphIndirectAMDX( m_commandBuffer, static_cast( scratch ), static_cast( scratchSize ), reinterpret_cast( &countInfo ) ); } # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::dispatchGraphIndirectCountAMDX( VULKAN_HPP_NAMESPACE::DeviceAddress scratch, VULKAN_HPP_NAMESPACE::DeviceSize scratchSize, VULKAN_HPP_NAMESPACE::DeviceAddress countInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdDispatchGraphIndirectCountAMDX( static_cast( m_commandBuffer ), static_cast( scratch ), static_cast( scratchSize ), static_cast( countInfo ) ); } #endif /*VK_ENABLE_BETA_EXTENSIONS*/ //=== VK_EXT_sample_locations === template VULKAN_HPP_INLINE void CommandBuffer::setSampleLocationsEXT( const VULKAN_HPP_NAMESPACE::SampleLocationsInfoEXT * pSampleLocationsInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetSampleLocationsEXT( static_cast( m_commandBuffer ), reinterpret_cast( pSampleLocationsInfo ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::setSampleLocationsEXT( const VULKAN_HPP_NAMESPACE::SampleLocationsInfoEXT & sampleLocationsInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdSetSampleLocationsEXT && "Function requires " ); # endif d.vkCmdSetSampleLocationsEXT( m_commandBuffer, reinterpret_cast( &sampleLocationsInfo ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void PhysicalDevice::getMultisamplePropertiesEXT( VULKAN_HPP_NAMESPACE::SampleCountFlagBits samples, VULKAN_HPP_NAMESPACE::MultisamplePropertiesEXT * pMultisampleProperties, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkGetPhysicalDeviceMultisamplePropertiesEXT( static_cast( m_physicalDevice ), static_cast( samples ), reinterpret_cast( pMultisampleProperties ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MultisamplePropertiesEXT PhysicalDevice::getMultisamplePropertiesEXT( VULKAN_HPP_NAMESPACE::SampleCountFlagBits samples, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceMultisamplePropertiesEXT && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::MultisamplePropertiesEXT multisampleProperties; d.vkGetPhysicalDeviceMultisamplePropertiesEXT( m_physicalDevice, static_cast( samples ), reinterpret_cast( &multisampleProperties ) ); return multisampleProperties; } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_KHR_get_memory_requirements2 === template VULKAN_HPP_INLINE void Device::getImageMemoryRequirements2KHR( const VULKAN_HPP_NAMESPACE::ImageMemoryRequirementsInfo2 * pInfo, VULKAN_HPP_NAMESPACE::MemoryRequirements2 * pMemoryRequirements, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkGetImageMemoryRequirements2KHR( static_cast( m_device ), reinterpret_cast( pInfo ), reinterpret_cast( pMemoryRequirements ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MemoryRequirements2 Device::getImageMemoryRequirements2KHR( const VULKAN_HPP_NAMESPACE::ImageMemoryRequirementsInfo2 & info, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetImageMemoryRequirements2KHR && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::MemoryRequirements2 memoryRequirements; d.vkGetImageMemoryRequirements2KHR( m_device, reinterpret_cast( &info ), reinterpret_cast( &memoryRequirements ) ); return memoryRequirements; } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::StructureChain Device::getImageMemoryRequirements2KHR( const VULKAN_HPP_NAMESPACE::ImageMemoryRequirementsInfo2 & info, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetImageMemoryRequirements2KHR && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::StructureChain structureChain; VULKAN_HPP_NAMESPACE::MemoryRequirements2 & memoryRequirements = structureChain.template get(); d.vkGetImageMemoryRequirements2KHR( m_device, reinterpret_cast( &info ), reinterpret_cast( &memoryRequirements ) ); return structureChain; } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::getBufferMemoryRequirements2KHR( const VULKAN_HPP_NAMESPACE::BufferMemoryRequirementsInfo2 * pInfo, VULKAN_HPP_NAMESPACE::MemoryRequirements2 * pMemoryRequirements, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkGetBufferMemoryRequirements2KHR( static_cast( m_device ), reinterpret_cast( pInfo ), reinterpret_cast( pMemoryRequirements ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MemoryRequirements2 Device::getBufferMemoryRequirements2KHR( const VULKAN_HPP_NAMESPACE::BufferMemoryRequirementsInfo2 & info, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetBufferMemoryRequirements2KHR && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::MemoryRequirements2 memoryRequirements; d.vkGetBufferMemoryRequirements2KHR( m_device, reinterpret_cast( &info ), reinterpret_cast( &memoryRequirements ) ); return memoryRequirements; } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::StructureChain Device::getBufferMemoryRequirements2KHR( const VULKAN_HPP_NAMESPACE::BufferMemoryRequirementsInfo2 & info, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetBufferMemoryRequirements2KHR && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::StructureChain structureChain; VULKAN_HPP_NAMESPACE::MemoryRequirements2 & memoryRequirements = structureChain.template get(); d.vkGetBufferMemoryRequirements2KHR( m_device, reinterpret_cast( &info ), reinterpret_cast( &memoryRequirements ) ); return structureChain; } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::getImageSparseMemoryRequirements2KHR( const VULKAN_HPP_NAMESPACE::ImageSparseMemoryRequirementsInfo2 * pInfo, uint32_t * pSparseMemoryRequirementCount, VULKAN_HPP_NAMESPACE::SparseImageMemoryRequirements2 * pSparseMemoryRequirements, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkGetImageSparseMemoryRequirements2KHR( static_cast( m_device ), reinterpret_cast( pInfo ), pSparseMemoryRequirementCount, reinterpret_cast( pSparseMemoryRequirements ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector Device::getImageSparseMemoryRequirements2KHR( const VULKAN_HPP_NAMESPACE::ImageSparseMemoryRequirementsInfo2 & info, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetImageSparseMemoryRequirements2KHR && "Function requires or " ); # endif std::vector sparseMemoryRequirements; uint32_t sparseMemoryRequirementCount; d.vkGetImageSparseMemoryRequirements2KHR( m_device, reinterpret_cast( &info ), &sparseMemoryRequirementCount, nullptr ); sparseMemoryRequirements.resize( sparseMemoryRequirementCount ); d.vkGetImageSparseMemoryRequirements2KHR( m_device, reinterpret_cast( &info ), &sparseMemoryRequirementCount, reinterpret_cast( sparseMemoryRequirements.data() ) ); VULKAN_HPP_ASSERT( sparseMemoryRequirementCount <= sparseMemoryRequirements.size() ); if ( sparseMemoryRequirementCount < sparseMemoryRequirements.size() ) { sparseMemoryRequirements.resize( sparseMemoryRequirementCount ); } return sparseMemoryRequirements; } template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector Device::getImageSparseMemoryRequirements2KHR( const VULKAN_HPP_NAMESPACE::ImageSparseMemoryRequirementsInfo2 & info, SparseImageMemoryRequirements2Allocator & sparseImageMemoryRequirements2Allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetImageSparseMemoryRequirements2KHR && "Function requires or " ); # endif std::vector sparseMemoryRequirements( sparseImageMemoryRequirements2Allocator ); uint32_t sparseMemoryRequirementCount; d.vkGetImageSparseMemoryRequirements2KHR( m_device, reinterpret_cast( &info ), &sparseMemoryRequirementCount, nullptr ); sparseMemoryRequirements.resize( sparseMemoryRequirementCount ); d.vkGetImageSparseMemoryRequirements2KHR( m_device, reinterpret_cast( &info ), &sparseMemoryRequirementCount, reinterpret_cast( sparseMemoryRequirements.data() ) ); VULKAN_HPP_ASSERT( sparseMemoryRequirementCount <= sparseMemoryRequirements.size() ); if ( sparseMemoryRequirementCount < sparseMemoryRequirements.size() ) { sparseMemoryRequirements.resize( sparseMemoryRequirementCount ); } return sparseMemoryRequirements; } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_KHR_acceleration_structure === template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::createAccelerationStructureKHR( const VULKAN_HPP_NAMESPACE::AccelerationStructureCreateInfoKHR * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::AccelerationStructureKHR * pAccelerationStructure, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkCreateAccelerationStructureKHR( static_cast( m_device ), reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pAccelerationStructure ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::createAccelerationStructureKHR( const VULKAN_HPP_NAMESPACE::AccelerationStructureCreateInfoKHR & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateAccelerationStructureKHR && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::AccelerationStructureKHR accelerationStructure; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateAccelerationStructureKHR( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &accelerationStructure ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createAccelerationStructureKHR" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( accelerationStructure ) ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::createAccelerationStructureKHRUnique( const VULKAN_HPP_NAMESPACE::AccelerationStructureCreateInfoKHR & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateAccelerationStructureKHR && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::AccelerationStructureKHR accelerationStructure; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateAccelerationStructureKHR( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &accelerationStructure ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createAccelerationStructureKHRUnique" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, UniqueHandle( accelerationStructure, detail::ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::destroyAccelerationStructureKHR( VULKAN_HPP_NAMESPACE::AccelerationStructureKHR accelerationStructure, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDestroyAccelerationStructureKHR( static_cast( m_device ), static_cast( accelerationStructure ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::destroyAccelerationStructureKHR( VULKAN_HPP_NAMESPACE::AccelerationStructureKHR accelerationStructure, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDestroyAccelerationStructureKHR && "Function requires " ); # endif d.vkDestroyAccelerationStructureKHR( m_device, static_cast( accelerationStructure ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::AccelerationStructureKHR accelerationStructure, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDestroyAccelerationStructureKHR( static_cast( m_device ), static_cast( accelerationStructure ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::AccelerationStructureKHR accelerationStructure, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDestroyAccelerationStructureKHR && "Function requires " ); # endif d.vkDestroyAccelerationStructureKHR( m_device, static_cast( accelerationStructure ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::buildAccelerationStructuresKHR( uint32_t infoCount, const VULKAN_HPP_NAMESPACE::AccelerationStructureBuildGeometryInfoKHR * pInfos, const VULKAN_HPP_NAMESPACE::AccelerationStructureBuildRangeInfoKHR * const * ppBuildRangeInfos, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdBuildAccelerationStructuresKHR( static_cast( m_commandBuffer ), infoCount, reinterpret_cast( pInfos ), reinterpret_cast( ppBuildRangeInfos ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::buildAccelerationStructuresKHR( VULKAN_HPP_NAMESPACE::ArrayProxy const & infos, VULKAN_HPP_NAMESPACE::ArrayProxy const & pBuildRangeInfos, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdBuildAccelerationStructuresKHR && "Function requires " ); # endif # ifdef VULKAN_HPP_NO_EXCEPTIONS VULKAN_HPP_ASSERT( infos.size() == pBuildRangeInfos.size() ); # else if ( infos.size() != pBuildRangeInfos.size() ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::buildAccelerationStructuresKHR: infos.size() != pBuildRangeInfos.size()" ); } # endif /*VULKAN_HPP_NO_EXCEPTIONS*/ d.vkCmdBuildAccelerationStructuresKHR( m_commandBuffer, infos.size(), reinterpret_cast( infos.data() ), reinterpret_cast( pBuildRangeInfos.data() ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::buildAccelerationStructuresIndirectKHR( uint32_t infoCount, const VULKAN_HPP_NAMESPACE::AccelerationStructureBuildGeometryInfoKHR * pInfos, const VULKAN_HPP_NAMESPACE::DeviceAddress * pIndirectDeviceAddresses, const uint32_t * pIndirectStrides, const uint32_t * const * ppMaxPrimitiveCounts, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdBuildAccelerationStructuresIndirectKHR( static_cast( m_commandBuffer ), infoCount, reinterpret_cast( pInfos ), reinterpret_cast( pIndirectDeviceAddresses ), pIndirectStrides, ppMaxPrimitiveCounts ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::buildAccelerationStructuresIndirectKHR( VULKAN_HPP_NAMESPACE::ArrayProxy const & infos, VULKAN_HPP_NAMESPACE::ArrayProxy const & indirectDeviceAddresses, VULKAN_HPP_NAMESPACE::ArrayProxy const & indirectStrides, VULKAN_HPP_NAMESPACE::ArrayProxy const & pMaxPrimitiveCounts, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdBuildAccelerationStructuresIndirectKHR && "Function requires " ); # endif # ifdef VULKAN_HPP_NO_EXCEPTIONS VULKAN_HPP_ASSERT( infos.size() == indirectDeviceAddresses.size() ); VULKAN_HPP_ASSERT( infos.size() == indirectStrides.size() ); VULKAN_HPP_ASSERT( infos.size() == pMaxPrimitiveCounts.size() ); # else if ( infos.size() != indirectDeviceAddresses.size() ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::buildAccelerationStructuresIndirectKHR: infos.size() != indirectDeviceAddresses.size()" ); } if ( infos.size() != indirectStrides.size() ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::buildAccelerationStructuresIndirectKHR: infos.size() != indirectStrides.size()" ); } if ( infos.size() != pMaxPrimitiveCounts.size() ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::buildAccelerationStructuresIndirectKHR: infos.size() != pMaxPrimitiveCounts.size()" ); } # endif /*VULKAN_HPP_NO_EXCEPTIONS*/ d.vkCmdBuildAccelerationStructuresIndirectKHR( m_commandBuffer, infos.size(), reinterpret_cast( infos.data() ), reinterpret_cast( indirectDeviceAddresses.data() ), indirectStrides.data(), pMaxPrimitiveCounts.data() ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::buildAccelerationStructuresKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, uint32_t infoCount, const VULKAN_HPP_NAMESPACE::AccelerationStructureBuildGeometryInfoKHR * pInfos, const VULKAN_HPP_NAMESPACE::AccelerationStructureBuildRangeInfoKHR * const * ppBuildRangeInfos, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkBuildAccelerationStructuresKHR( static_cast( m_device ), static_cast( deferredOperation ), infoCount, reinterpret_cast( pInfos ), reinterpret_cast( ppBuildRangeInfos ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Device::buildAccelerationStructuresKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, VULKAN_HPP_NAMESPACE::ArrayProxy const & infos, VULKAN_HPP_NAMESPACE::ArrayProxy const & pBuildRangeInfos, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkBuildAccelerationStructuresKHR && "Function requires " ); # endif # ifdef VULKAN_HPP_NO_EXCEPTIONS VULKAN_HPP_ASSERT( infos.size() == pBuildRangeInfos.size() ); # else if ( infos.size() != pBuildRangeInfos.size() ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::Device::buildAccelerationStructuresKHR: infos.size() != pBuildRangeInfos.size()" ); } # endif /*VULKAN_HPP_NO_EXCEPTIONS*/ VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkBuildAccelerationStructuresKHR( m_device, static_cast( deferredOperation ), infos.size(), reinterpret_cast( infos.data() ), reinterpret_cast( pBuildRangeInfos.data() ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::buildAccelerationStructuresKHR", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eOperationDeferredKHR, VULKAN_HPP_NAMESPACE::Result::eOperationNotDeferredKHR } ); return static_cast( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::copyAccelerationStructureKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, const VULKAN_HPP_NAMESPACE::CopyAccelerationStructureInfoKHR * pInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkCopyAccelerationStructureKHR( static_cast( m_device ), static_cast( deferredOperation ), reinterpret_cast( pInfo ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Device::copyAccelerationStructureKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, const VULKAN_HPP_NAMESPACE::CopyAccelerationStructureInfoKHR & info, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCopyAccelerationStructureKHR && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCopyAccelerationStructureKHR( m_device, static_cast( deferredOperation ), reinterpret_cast( &info ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::copyAccelerationStructureKHR", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eOperationDeferredKHR, VULKAN_HPP_NAMESPACE::Result::eOperationNotDeferredKHR } ); return static_cast( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::copyAccelerationStructureToMemoryKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, const VULKAN_HPP_NAMESPACE::CopyAccelerationStructureToMemoryInfoKHR * pInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkCopyAccelerationStructureToMemoryKHR( static_cast( m_device ), static_cast( deferredOperation ), reinterpret_cast( pInfo ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Device::copyAccelerationStructureToMemoryKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, const VULKAN_HPP_NAMESPACE::CopyAccelerationStructureToMemoryInfoKHR & info, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCopyAccelerationStructureToMemoryKHR && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCopyAccelerationStructureToMemoryKHR( m_device, static_cast( deferredOperation ), reinterpret_cast( &info ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::copyAccelerationStructureToMemoryKHR", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eOperationDeferredKHR, VULKAN_HPP_NAMESPACE::Result::eOperationNotDeferredKHR } ); return static_cast( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::copyMemoryToAccelerationStructureKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, const VULKAN_HPP_NAMESPACE::CopyMemoryToAccelerationStructureInfoKHR * pInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkCopyMemoryToAccelerationStructureKHR( static_cast( m_device ), static_cast( deferredOperation ), reinterpret_cast( pInfo ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Device::copyMemoryToAccelerationStructureKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, const VULKAN_HPP_NAMESPACE::CopyMemoryToAccelerationStructureInfoKHR & info, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCopyMemoryToAccelerationStructureKHR && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCopyMemoryToAccelerationStructureKHR( m_device, static_cast( deferredOperation ), reinterpret_cast( &info ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::copyMemoryToAccelerationStructureKHR", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eOperationDeferredKHR, VULKAN_HPP_NAMESPACE::Result::eOperationNotDeferredKHR } ); return static_cast( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::writeAccelerationStructuresPropertiesKHR( uint32_t accelerationStructureCount, const VULKAN_HPP_NAMESPACE::AccelerationStructureKHR * pAccelerationStructures, VULKAN_HPP_NAMESPACE::QueryType queryType, size_t dataSize, void * pData, size_t stride, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkWriteAccelerationStructuresPropertiesKHR( static_cast( m_device ), accelerationStructureCount, reinterpret_cast( pAccelerationStructures ), static_cast( queryType ), dataSize, pData, stride ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::writeAccelerationStructuresPropertiesKHR( VULKAN_HPP_NAMESPACE::ArrayProxy const & accelerationStructures, VULKAN_HPP_NAMESPACE::QueryType queryType, size_t dataSize, size_t stride, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkWriteAccelerationStructuresPropertiesKHR && "Function requires " ); # endif VULKAN_HPP_ASSERT( dataSize % sizeof( DataType ) == 0 ); std::vector data( dataSize / sizeof( DataType ) ); VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkWriteAccelerationStructuresPropertiesKHR( m_device, accelerationStructures.size(), reinterpret_cast( accelerationStructures.data() ), static_cast( queryType ), data.size() * sizeof( DataType ), reinterpret_cast( data.data() ), stride ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::writeAccelerationStructuresPropertiesKHR" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( data ) ); } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::writeAccelerationStructuresPropertyKHR( VULKAN_HPP_NAMESPACE::ArrayProxy const & accelerationStructures, VULKAN_HPP_NAMESPACE::QueryType queryType, size_t stride, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkWriteAccelerationStructuresPropertiesKHR && "Function requires " ); # endif DataType data; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkWriteAccelerationStructuresPropertiesKHR( m_device, accelerationStructures.size(), reinterpret_cast( accelerationStructures.data() ), static_cast( queryType ), sizeof( DataType ), reinterpret_cast( &data ), stride ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::writeAccelerationStructuresPropertyKHR" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( data ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::copyAccelerationStructureKHR( const VULKAN_HPP_NAMESPACE::CopyAccelerationStructureInfoKHR * pInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdCopyAccelerationStructureKHR( static_cast( m_commandBuffer ), reinterpret_cast( pInfo ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::copyAccelerationStructureKHR( const VULKAN_HPP_NAMESPACE::CopyAccelerationStructureInfoKHR & info, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdCopyAccelerationStructureKHR && "Function requires " ); # endif d.vkCmdCopyAccelerationStructureKHR( m_commandBuffer, reinterpret_cast( &info ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::copyAccelerationStructureToMemoryKHR( const VULKAN_HPP_NAMESPACE::CopyAccelerationStructureToMemoryInfoKHR * pInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdCopyAccelerationStructureToMemoryKHR( static_cast( m_commandBuffer ), reinterpret_cast( pInfo ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::copyAccelerationStructureToMemoryKHR( const VULKAN_HPP_NAMESPACE::CopyAccelerationStructureToMemoryInfoKHR & info, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdCopyAccelerationStructureToMemoryKHR && "Function requires " ); # endif d.vkCmdCopyAccelerationStructureToMemoryKHR( m_commandBuffer, reinterpret_cast( &info ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::copyMemoryToAccelerationStructureKHR( const VULKAN_HPP_NAMESPACE::CopyMemoryToAccelerationStructureInfoKHR * pInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdCopyMemoryToAccelerationStructureKHR( static_cast( m_commandBuffer ), reinterpret_cast( pInfo ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::copyMemoryToAccelerationStructureKHR( const VULKAN_HPP_NAMESPACE::CopyMemoryToAccelerationStructureInfoKHR & info, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdCopyMemoryToAccelerationStructureKHR && "Function requires " ); # endif d.vkCmdCopyMemoryToAccelerationStructureKHR( m_commandBuffer, reinterpret_cast( &info ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE DeviceAddress Device::getAccelerationStructureAddressKHR( const VULKAN_HPP_NAMESPACE::AccelerationStructureDeviceAddressInfoKHR * pInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetAccelerationStructureDeviceAddressKHR( static_cast( m_device ), reinterpret_cast( pInfo ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::DeviceAddress Device::getAccelerationStructureAddressKHR( const VULKAN_HPP_NAMESPACE::AccelerationStructureDeviceAddressInfoKHR & info, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetAccelerationStructureDeviceAddressKHR && "Function requires " ); # endif VkDeviceAddress result = d.vkGetAccelerationStructureDeviceAddressKHR( m_device, reinterpret_cast( &info ) ); return static_cast( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::writeAccelerationStructuresPropertiesKHR( uint32_t accelerationStructureCount, const VULKAN_HPP_NAMESPACE::AccelerationStructureKHR * pAccelerationStructures, VULKAN_HPP_NAMESPACE::QueryType queryType, VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t firstQuery, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdWriteAccelerationStructuresPropertiesKHR( static_cast( m_commandBuffer ), accelerationStructureCount, reinterpret_cast( pAccelerationStructures ), static_cast( queryType ), static_cast( queryPool ), firstQuery ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::writeAccelerationStructuresPropertiesKHR( VULKAN_HPP_NAMESPACE::ArrayProxy const & accelerationStructures, VULKAN_HPP_NAMESPACE::QueryType queryType, VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t firstQuery, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdWriteAccelerationStructuresPropertiesKHR && "Function requires " ); # endif d.vkCmdWriteAccelerationStructuresPropertiesKHR( m_commandBuffer, accelerationStructures.size(), reinterpret_cast( accelerationStructures.data() ), static_cast( queryType ), static_cast( queryPool ), firstQuery ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::getAccelerationStructureCompatibilityKHR( const VULKAN_HPP_NAMESPACE::AccelerationStructureVersionInfoKHR * pVersionInfo, VULKAN_HPP_NAMESPACE::AccelerationStructureCompatibilityKHR * pCompatibility, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkGetDeviceAccelerationStructureCompatibilityKHR( static_cast( m_device ), reinterpret_cast( pVersionInfo ), reinterpret_cast( pCompatibility ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::AccelerationStructureCompatibilityKHR Device::getAccelerationStructureCompatibilityKHR( const VULKAN_HPP_NAMESPACE::AccelerationStructureVersionInfoKHR & versionInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetDeviceAccelerationStructureCompatibilityKHR && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::AccelerationStructureCompatibilityKHR compatibility; d.vkGetDeviceAccelerationStructureCompatibilityKHR( m_device, reinterpret_cast( &versionInfo ), reinterpret_cast( &compatibility ) ); return compatibility; } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::getAccelerationStructureBuildSizesKHR( VULKAN_HPP_NAMESPACE::AccelerationStructureBuildTypeKHR buildType, const VULKAN_HPP_NAMESPACE::AccelerationStructureBuildGeometryInfoKHR * pBuildInfo, const uint32_t * pMaxPrimitiveCounts, VULKAN_HPP_NAMESPACE::AccelerationStructureBuildSizesInfoKHR * pSizeInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkGetAccelerationStructureBuildSizesKHR( static_cast( m_device ), static_cast( buildType ), reinterpret_cast( pBuildInfo ), pMaxPrimitiveCounts, reinterpret_cast( pSizeInfo ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::AccelerationStructureBuildSizesInfoKHR Device::getAccelerationStructureBuildSizesKHR( VULKAN_HPP_NAMESPACE::AccelerationStructureBuildTypeKHR buildType, const VULKAN_HPP_NAMESPACE::AccelerationStructureBuildGeometryInfoKHR & buildInfo, VULKAN_HPP_NAMESPACE::ArrayProxy const & maxPrimitiveCounts, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetAccelerationStructureBuildSizesKHR && "Function requires " ); # endif # ifdef VULKAN_HPP_NO_EXCEPTIONS VULKAN_HPP_ASSERT( maxPrimitiveCounts.size() == buildInfo.geometryCount ); # else if ( maxPrimitiveCounts.size() != buildInfo.geometryCount ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::Device::getAccelerationStructureBuildSizesKHR: maxPrimitiveCounts.size() != buildInfo.geometryCount" ); } # endif /*VULKAN_HPP_NO_EXCEPTIONS*/ VULKAN_HPP_NAMESPACE::AccelerationStructureBuildSizesInfoKHR sizeInfo; d.vkGetAccelerationStructureBuildSizesKHR( m_device, static_cast( buildType ), reinterpret_cast( &buildInfo ), maxPrimitiveCounts.data(), reinterpret_cast( &sizeInfo ) ); return sizeInfo; } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_KHR_ray_tracing_pipeline === template VULKAN_HPP_INLINE void CommandBuffer::traceRaysKHR( const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR * pRaygenShaderBindingTable, const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR * pMissShaderBindingTable, const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR * pHitShaderBindingTable, const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR * pCallableShaderBindingTable, uint32_t width, uint32_t height, uint32_t depth, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdTraceRaysKHR( static_cast( m_commandBuffer ), reinterpret_cast( pRaygenShaderBindingTable ), reinterpret_cast( pMissShaderBindingTable ), reinterpret_cast( pHitShaderBindingTable ), reinterpret_cast( pCallableShaderBindingTable ), width, height, depth ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::traceRaysKHR( const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR & raygenShaderBindingTable, const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR & missShaderBindingTable, const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR & hitShaderBindingTable, const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR & callableShaderBindingTable, uint32_t width, uint32_t height, uint32_t depth, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdTraceRaysKHR && "Function requires " ); # endif d.vkCmdTraceRaysKHR( m_commandBuffer, reinterpret_cast( &raygenShaderBindingTable ), reinterpret_cast( &missShaderBindingTable ), reinterpret_cast( &hitShaderBindingTable ), reinterpret_cast( &callableShaderBindingTable ), width, height, depth ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::createRayTracingPipelinesKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, uint32_t createInfoCount, const VULKAN_HPP_NAMESPACE::RayTracingPipelineCreateInfoKHR * pCreateInfos, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::Pipeline * pPipelines, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkCreateRayTracingPipelinesKHR( static_cast( m_device ), static_cast( deferredOperation ), static_cast( pipelineCache ), createInfoCount, reinterpret_cast( pCreateInfos ), reinterpret_cast( pAllocator ), reinterpret_cast( pPipelines ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue> Device::createRayTracingPipelinesKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateRayTracingPipelinesKHR && "Function requires " ); # endif std::vector pipelines( createInfos.size() ); VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateRayTracingPipelinesKHR( m_device, static_cast( deferredOperation ), static_cast( pipelineCache ), createInfos.size(), reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( pipelines.data() ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createRayTracingPipelinesKHR", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eOperationDeferredKHR, VULKAN_HPP_NAMESPACE::Result::eOperationNotDeferredKHR, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); return ResultValue>( result, std::move( pipelines ) ); } template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue> Device::createRayTracingPipelinesKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, Optional allocator, PipelineAllocator & pipelineAllocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateRayTracingPipelinesKHR && "Function requires " ); # endif std::vector pipelines( createInfos.size(), pipelineAllocator ); VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateRayTracingPipelinesKHR( m_device, static_cast( deferredOperation ), static_cast( pipelineCache ), createInfos.size(), reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( pipelines.data() ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createRayTracingPipelinesKHR", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eOperationDeferredKHR, VULKAN_HPP_NAMESPACE::Result::eOperationNotDeferredKHR, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); return ResultValue>( result, std::move( pipelines ) ); } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue Device::createRayTracingPipelineKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, const VULKAN_HPP_NAMESPACE::RayTracingPipelineCreateInfoKHR & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateRayTracingPipelinesKHR && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Pipeline pipeline; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateRayTracingPipelinesKHR( m_device, static_cast( deferredOperation ), static_cast( pipelineCache ), 1, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &pipeline ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createRayTracingPipelineKHR", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eOperationDeferredKHR, VULKAN_HPP_NAMESPACE::Result::eOperationNotDeferredKHR, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); return ResultValue( result, std::move( pipeline ) ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE template < typename Dispatch, typename PipelineAllocator, typename std::enable_if>::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue, PipelineAllocator>> Device::createRayTracingPipelinesKHRUnique( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateRayTracingPipelinesKHR && "Function requires " ); # endif std::vector pipelines( createInfos.size() ); VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateRayTracingPipelinesKHR( m_device, static_cast( deferredOperation ), static_cast( pipelineCache ), createInfos.size(), reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( pipelines.data() ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createRayTracingPipelinesKHRUnique", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eOperationDeferredKHR, VULKAN_HPP_NAMESPACE::Result::eOperationNotDeferredKHR, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); std::vector, PipelineAllocator> uniquePipelines; uniquePipelines.reserve( createInfos.size() ); detail::ObjectDestroy deleter( *this, allocator, d ); for ( auto const & pipeline : pipelines ) { uniquePipelines.push_back( UniqueHandle( pipeline, deleter ) ); } return ResultValue, PipelineAllocator>>( result, std::move( uniquePipelines ) ); } template < typename Dispatch, typename PipelineAllocator, typename std::enable_if>::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue, PipelineAllocator>> Device::createRayTracingPipelinesKHRUnique( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, Optional allocator, PipelineAllocator & pipelineAllocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateRayTracingPipelinesKHR && "Function requires " ); # endif std::vector pipelines( createInfos.size() ); VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateRayTracingPipelinesKHR( m_device, static_cast( deferredOperation ), static_cast( pipelineCache ), createInfos.size(), reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( pipelines.data() ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createRayTracingPipelinesKHRUnique", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eOperationDeferredKHR, VULKAN_HPP_NAMESPACE::Result::eOperationNotDeferredKHR, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); std::vector, PipelineAllocator> uniquePipelines( pipelineAllocator ); uniquePipelines.reserve( createInfos.size() ); detail::ObjectDestroy deleter( *this, allocator, d ); for ( auto const & pipeline : pipelines ) { uniquePipelines.push_back( UniqueHandle( pipeline, deleter ) ); } return ResultValue, PipelineAllocator>>( result, std::move( uniquePipelines ) ); } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue> Device::createRayTracingPipelineKHRUnique( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, const VULKAN_HPP_NAMESPACE::RayTracingPipelineCreateInfoKHR & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateRayTracingPipelinesKHR && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Pipeline pipeline; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateRayTracingPipelinesKHR( m_device, static_cast( deferredOperation ), static_cast( pipelineCache ), 1, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &pipeline ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createRayTracingPipelineKHRUnique", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eOperationDeferredKHR, VULKAN_HPP_NAMESPACE::Result::eOperationNotDeferredKHR, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); return ResultValue>( result, UniqueHandle( pipeline, detail::ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getRayTracingShaderGroupHandlesKHR( VULKAN_HPP_NAMESPACE::Pipeline pipeline, uint32_t firstGroup, uint32_t groupCount, size_t dataSize, void * pData, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetRayTracingShaderGroupHandlesKHR( static_cast( m_device ), static_cast( pipeline ), firstGroup, groupCount, dataSize, pData ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::getRayTracingShaderGroupHandlesKHR( VULKAN_HPP_NAMESPACE::Pipeline pipeline, uint32_t firstGroup, uint32_t groupCount, size_t dataSize, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetRayTracingShaderGroupHandlesKHR && "Function requires or " ); # endif VULKAN_HPP_ASSERT( dataSize % sizeof( DataType ) == 0 ); std::vector data( dataSize / sizeof( DataType ) ); VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetRayTracingShaderGroupHandlesKHR( m_device, static_cast( pipeline ), firstGroup, groupCount, data.size() * sizeof( DataType ), reinterpret_cast( data.data() ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getRayTracingShaderGroupHandlesKHR" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( data ) ); } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::getRayTracingShaderGroupHandleKHR( VULKAN_HPP_NAMESPACE::Pipeline pipeline, uint32_t firstGroup, uint32_t groupCount, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetRayTracingShaderGroupHandlesKHR && "Function requires or " ); # endif DataType data; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetRayTracingShaderGroupHandlesKHR( m_device, static_cast( pipeline ), firstGroup, groupCount, sizeof( DataType ), reinterpret_cast( &data ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getRayTracingShaderGroupHandleKHR" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( data ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getRayTracingCaptureReplayShaderGroupHandlesKHR( VULKAN_HPP_NAMESPACE::Pipeline pipeline, uint32_t firstGroup, uint32_t groupCount, size_t dataSize, void * pData, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetRayTracingCaptureReplayShaderGroupHandlesKHR( static_cast( m_device ), static_cast( pipeline ), firstGroup, groupCount, dataSize, pData ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::getRayTracingCaptureReplayShaderGroupHandlesKHR( VULKAN_HPP_NAMESPACE::Pipeline pipeline, uint32_t firstGroup, uint32_t groupCount, size_t dataSize, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetRayTracingCaptureReplayShaderGroupHandlesKHR && "Function requires " ); # endif VULKAN_HPP_ASSERT( dataSize % sizeof( DataType ) == 0 ); std::vector data( dataSize / sizeof( DataType ) ); VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetRayTracingCaptureReplayShaderGroupHandlesKHR( m_device, static_cast( pipeline ), firstGroup, groupCount, data.size() * sizeof( DataType ), reinterpret_cast( data.data() ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getRayTracingCaptureReplayShaderGroupHandlesKHR" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( data ) ); } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::getRayTracingCaptureReplayShaderGroupHandleKHR( VULKAN_HPP_NAMESPACE::Pipeline pipeline, uint32_t firstGroup, uint32_t groupCount, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetRayTracingCaptureReplayShaderGroupHandlesKHR && "Function requires " ); # endif DataType data; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetRayTracingCaptureReplayShaderGroupHandlesKHR( m_device, static_cast( pipeline ), firstGroup, groupCount, sizeof( DataType ), reinterpret_cast( &data ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getRayTracingCaptureReplayShaderGroupHandleKHR" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( data ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::traceRaysIndirectKHR( const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR * pRaygenShaderBindingTable, const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR * pMissShaderBindingTable, const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR * pHitShaderBindingTable, const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR * pCallableShaderBindingTable, VULKAN_HPP_NAMESPACE::DeviceAddress indirectDeviceAddress, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdTraceRaysIndirectKHR( static_cast( m_commandBuffer ), reinterpret_cast( pRaygenShaderBindingTable ), reinterpret_cast( pMissShaderBindingTable ), reinterpret_cast( pHitShaderBindingTable ), reinterpret_cast( pCallableShaderBindingTable ), static_cast( indirectDeviceAddress ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::traceRaysIndirectKHR( const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR & raygenShaderBindingTable, const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR & missShaderBindingTable, const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR & hitShaderBindingTable, const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR & callableShaderBindingTable, VULKAN_HPP_NAMESPACE::DeviceAddress indirectDeviceAddress, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdTraceRaysIndirectKHR && "Function requires " ); # endif d.vkCmdTraceRaysIndirectKHR( m_commandBuffer, reinterpret_cast( &raygenShaderBindingTable ), reinterpret_cast( &missShaderBindingTable ), reinterpret_cast( &hitShaderBindingTable ), reinterpret_cast( &callableShaderBindingTable ), static_cast( indirectDeviceAddress ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE DeviceSize Device::getRayTracingShaderGroupStackSizeKHR( VULKAN_HPP_NAMESPACE::Pipeline pipeline, uint32_t group, VULKAN_HPP_NAMESPACE::ShaderGroupShaderKHR groupShader, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetRayTracingShaderGroupStackSizeKHR( static_cast( m_device ), static_cast( pipeline ), group, static_cast( groupShader ) ) ); } template VULKAN_HPP_INLINE void CommandBuffer::setRayTracingPipelineStackSizeKHR( uint32_t pipelineStackSize, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetRayTracingPipelineStackSizeKHR( static_cast( m_commandBuffer ), pipelineStackSize ); } //=== VK_KHR_sampler_ycbcr_conversion === template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::createSamplerYcbcrConversionKHR( const VULKAN_HPP_NAMESPACE::SamplerYcbcrConversionCreateInfo * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion * pYcbcrConversion, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkCreateSamplerYcbcrConversionKHR( static_cast( m_device ), reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pYcbcrConversion ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::createSamplerYcbcrConversionKHR( const VULKAN_HPP_NAMESPACE::SamplerYcbcrConversionCreateInfo & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateSamplerYcbcrConversionKHR && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion ycbcrConversion; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateSamplerYcbcrConversionKHR( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &ycbcrConversion ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createSamplerYcbcrConversionKHR" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( ycbcrConversion ) ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::createSamplerYcbcrConversionKHRUnique( const VULKAN_HPP_NAMESPACE::SamplerYcbcrConversionCreateInfo & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateSamplerYcbcrConversionKHR && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion ycbcrConversion; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateSamplerYcbcrConversionKHR( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &ycbcrConversion ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createSamplerYcbcrConversionKHRUnique" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, UniqueHandle( ycbcrConversion, detail::ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::destroySamplerYcbcrConversionKHR( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion ycbcrConversion, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDestroySamplerYcbcrConversionKHR( static_cast( m_device ), static_cast( ycbcrConversion ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::destroySamplerYcbcrConversionKHR( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion ycbcrConversion, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDestroySamplerYcbcrConversionKHR && "Function requires or " ); # endif d.vkDestroySamplerYcbcrConversionKHR( m_device, static_cast( ycbcrConversion ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_KHR_bind_memory2 === template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::bindBufferMemory2KHR( uint32_t bindInfoCount, const VULKAN_HPP_NAMESPACE::BindBufferMemoryInfo * pBindInfos, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkBindBufferMemory2KHR( static_cast( m_device ), bindInfoCount, reinterpret_cast( pBindInfos ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type Device::bindBufferMemory2KHR( VULKAN_HPP_NAMESPACE::ArrayProxy const & bindInfos, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkBindBufferMemory2KHR && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkBindBufferMemory2KHR( m_device, bindInfos.size(), reinterpret_cast( bindInfos.data() ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::bindBufferMemory2KHR" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::bindImageMemory2KHR( uint32_t bindInfoCount, const VULKAN_HPP_NAMESPACE::BindImageMemoryInfo * pBindInfos, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkBindImageMemory2KHR( static_cast( m_device ), bindInfoCount, reinterpret_cast( pBindInfos ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type Device::bindImageMemory2KHR( VULKAN_HPP_NAMESPACE::ArrayProxy const & bindInfos, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkBindImageMemory2KHR && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkBindImageMemory2KHR( m_device, bindInfos.size(), reinterpret_cast( bindInfos.data() ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::bindImageMemory2KHR" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_EXT_image_drm_format_modifier === template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getImageDrmFormatModifierPropertiesEXT( VULKAN_HPP_NAMESPACE::Image image, VULKAN_HPP_NAMESPACE::ImageDrmFormatModifierPropertiesEXT * pProperties, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetImageDrmFormatModifierPropertiesEXT( static_cast( m_device ), static_cast( image ), reinterpret_cast( pProperties ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::getImageDrmFormatModifierPropertiesEXT( VULKAN_HPP_NAMESPACE::Image image, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetImageDrmFormatModifierPropertiesEXT && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::ImageDrmFormatModifierPropertiesEXT properties; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetImageDrmFormatModifierPropertiesEXT( m_device, static_cast( image ), reinterpret_cast( &properties ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getImageDrmFormatModifierPropertiesEXT" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( properties ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_EXT_validation_cache === template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::createValidationCacheEXT( const VULKAN_HPP_NAMESPACE::ValidationCacheCreateInfoEXT * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::ValidationCacheEXT * pValidationCache, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkCreateValidationCacheEXT( static_cast( m_device ), reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pValidationCache ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::createValidationCacheEXT( const VULKAN_HPP_NAMESPACE::ValidationCacheCreateInfoEXT & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateValidationCacheEXT && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::ValidationCacheEXT validationCache; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateValidationCacheEXT( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &validationCache ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createValidationCacheEXT" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( validationCache ) ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::createValidationCacheEXTUnique( const VULKAN_HPP_NAMESPACE::ValidationCacheCreateInfoEXT & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateValidationCacheEXT && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::ValidationCacheEXT validationCache; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateValidationCacheEXT( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &validationCache ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createValidationCacheEXTUnique" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, UniqueHandle( validationCache, detail::ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::destroyValidationCacheEXT( VULKAN_HPP_NAMESPACE::ValidationCacheEXT validationCache, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDestroyValidationCacheEXT( static_cast( m_device ), static_cast( validationCache ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::destroyValidationCacheEXT( VULKAN_HPP_NAMESPACE::ValidationCacheEXT validationCache, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDestroyValidationCacheEXT && "Function requires " ); # endif d.vkDestroyValidationCacheEXT( m_device, static_cast( validationCache ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::ValidationCacheEXT validationCache, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDestroyValidationCacheEXT( static_cast( m_device ), static_cast( validationCache ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::ValidationCacheEXT validationCache, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDestroyValidationCacheEXT && "Function requires " ); # endif d.vkDestroyValidationCacheEXT( m_device, static_cast( validationCache ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::mergeValidationCachesEXT( VULKAN_HPP_NAMESPACE::ValidationCacheEXT dstCache, uint32_t srcCacheCount, const VULKAN_HPP_NAMESPACE::ValidationCacheEXT * pSrcCaches, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkMergeValidationCachesEXT( static_cast( m_device ), static_cast( dstCache ), srcCacheCount, reinterpret_cast( pSrcCaches ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type Device::mergeValidationCachesEXT( VULKAN_HPP_NAMESPACE::ValidationCacheEXT dstCache, VULKAN_HPP_NAMESPACE::ArrayProxy const & srcCaches, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkMergeValidationCachesEXT && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkMergeValidationCachesEXT( m_device, static_cast( dstCache ), srcCaches.size(), reinterpret_cast( srcCaches.data() ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::mergeValidationCachesEXT" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getValidationCacheDataEXT( VULKAN_HPP_NAMESPACE::ValidationCacheEXT validationCache, size_t * pDataSize, void * pData, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetValidationCacheDataEXT( static_cast( m_device ), static_cast( validationCache ), pDataSize, pData ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::getValidationCacheDataEXT( VULKAN_HPP_NAMESPACE::ValidationCacheEXT validationCache, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetValidationCacheDataEXT && "Function requires " ); # endif std::vector data; size_t dataSize; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkGetValidationCacheDataEXT( m_device, static_cast( validationCache ), &dataSize, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && dataSize ) { data.resize( dataSize ); result = static_cast( d.vkGetValidationCacheDataEXT( m_device, static_cast( validationCache ), &dataSize, reinterpret_cast( data.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getValidationCacheDataEXT" ); VULKAN_HPP_ASSERT( dataSize <= data.size() ); if ( dataSize < data.size() ) { data.resize( dataSize ); } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( data ) ); } template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::getValidationCacheDataEXT( VULKAN_HPP_NAMESPACE::ValidationCacheEXT validationCache, Uint8_tAllocator & uint8_tAllocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetValidationCacheDataEXT && "Function requires " ); # endif std::vector data( uint8_tAllocator ); size_t dataSize; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkGetValidationCacheDataEXT( m_device, static_cast( validationCache ), &dataSize, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && dataSize ) { data.resize( dataSize ); result = static_cast( d.vkGetValidationCacheDataEXT( m_device, static_cast( validationCache ), &dataSize, reinterpret_cast( data.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getValidationCacheDataEXT" ); VULKAN_HPP_ASSERT( dataSize <= data.size() ); if ( dataSize < data.size() ) { data.resize( dataSize ); } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( data ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_NV_shading_rate_image === template VULKAN_HPP_INLINE void CommandBuffer::bindShadingRateImageNV( VULKAN_HPP_NAMESPACE::ImageView imageView, VULKAN_HPP_NAMESPACE::ImageLayout imageLayout, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdBindShadingRateImageNV( static_cast( m_commandBuffer ), static_cast( imageView ), static_cast( imageLayout ) ); } template VULKAN_HPP_INLINE void CommandBuffer::setViewportShadingRatePaletteNV( uint32_t firstViewport, uint32_t viewportCount, const VULKAN_HPP_NAMESPACE::ShadingRatePaletteNV * pShadingRatePalettes, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetViewportShadingRatePaletteNV( static_cast( m_commandBuffer ), firstViewport, viewportCount, reinterpret_cast( pShadingRatePalettes ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::setViewportShadingRatePaletteNV( uint32_t firstViewport, VULKAN_HPP_NAMESPACE::ArrayProxy const & shadingRatePalettes, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdSetViewportShadingRatePaletteNV && "Function requires " ); # endif d.vkCmdSetViewportShadingRatePaletteNV( m_commandBuffer, firstViewport, shadingRatePalettes.size(), reinterpret_cast( shadingRatePalettes.data() ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::setCoarseSampleOrderNV( VULKAN_HPP_NAMESPACE::CoarseSampleOrderTypeNV sampleOrderType, uint32_t customSampleOrderCount, const VULKAN_HPP_NAMESPACE::CoarseSampleOrderCustomNV * pCustomSampleOrders, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetCoarseSampleOrderNV( static_cast( m_commandBuffer ), static_cast( sampleOrderType ), customSampleOrderCount, reinterpret_cast( pCustomSampleOrders ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::setCoarseSampleOrderNV( VULKAN_HPP_NAMESPACE::CoarseSampleOrderTypeNV sampleOrderType, VULKAN_HPP_NAMESPACE::ArrayProxy const & customSampleOrders, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdSetCoarseSampleOrderNV && "Function requires " ); # endif d.vkCmdSetCoarseSampleOrderNV( m_commandBuffer, static_cast( sampleOrderType ), customSampleOrders.size(), reinterpret_cast( customSampleOrders.data() ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_NV_ray_tracing === template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::createAccelerationStructureNV( const VULKAN_HPP_NAMESPACE::AccelerationStructureCreateInfoNV * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::AccelerationStructureNV * pAccelerationStructure, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkCreateAccelerationStructureNV( static_cast( m_device ), reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pAccelerationStructure ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::createAccelerationStructureNV( const VULKAN_HPP_NAMESPACE::AccelerationStructureCreateInfoNV & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateAccelerationStructureNV && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::AccelerationStructureNV accelerationStructure; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateAccelerationStructureNV( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &accelerationStructure ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createAccelerationStructureNV" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( accelerationStructure ) ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::createAccelerationStructureNVUnique( const VULKAN_HPP_NAMESPACE::AccelerationStructureCreateInfoNV & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateAccelerationStructureNV && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::AccelerationStructureNV accelerationStructure; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateAccelerationStructureNV( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &accelerationStructure ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createAccelerationStructureNVUnique" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, UniqueHandle( accelerationStructure, detail::ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::destroyAccelerationStructureNV( VULKAN_HPP_NAMESPACE::AccelerationStructureNV accelerationStructure, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDestroyAccelerationStructureNV( static_cast( m_device ), static_cast( accelerationStructure ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::destroyAccelerationStructureNV( VULKAN_HPP_NAMESPACE::AccelerationStructureNV accelerationStructure, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDestroyAccelerationStructureNV && "Function requires " ); # endif d.vkDestroyAccelerationStructureNV( m_device, static_cast( accelerationStructure ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::AccelerationStructureNV accelerationStructure, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDestroyAccelerationStructureNV( static_cast( m_device ), static_cast( accelerationStructure ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::AccelerationStructureNV accelerationStructure, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDestroyAccelerationStructureNV && "Function requires " ); # endif d.vkDestroyAccelerationStructureNV( m_device, static_cast( accelerationStructure ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::getAccelerationStructureMemoryRequirementsNV( const VULKAN_HPP_NAMESPACE::AccelerationStructureMemoryRequirementsInfoNV * pInfo, VULKAN_HPP_NAMESPACE::MemoryRequirements2KHR * pMemoryRequirements, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkGetAccelerationStructureMemoryRequirementsNV( static_cast( m_device ), reinterpret_cast( pInfo ), reinterpret_cast( pMemoryRequirements ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MemoryRequirements2KHR Device::getAccelerationStructureMemoryRequirementsNV( const VULKAN_HPP_NAMESPACE::AccelerationStructureMemoryRequirementsInfoNV & info, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetAccelerationStructureMemoryRequirementsNV && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::MemoryRequirements2KHR memoryRequirements; d.vkGetAccelerationStructureMemoryRequirementsNV( m_device, reinterpret_cast( &info ), reinterpret_cast( &memoryRequirements ) ); return memoryRequirements; } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::StructureChain Device::getAccelerationStructureMemoryRequirementsNV( const VULKAN_HPP_NAMESPACE::AccelerationStructureMemoryRequirementsInfoNV & info, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetAccelerationStructureMemoryRequirementsNV && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::StructureChain structureChain; VULKAN_HPP_NAMESPACE::MemoryRequirements2KHR & memoryRequirements = structureChain.template get(); d.vkGetAccelerationStructureMemoryRequirementsNV( m_device, reinterpret_cast( &info ), reinterpret_cast( &memoryRequirements ) ); return structureChain; } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::bindAccelerationStructureMemoryNV( uint32_t bindInfoCount, const VULKAN_HPP_NAMESPACE::BindAccelerationStructureMemoryInfoNV * pBindInfos, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkBindAccelerationStructureMemoryNV( static_cast( m_device ), bindInfoCount, reinterpret_cast( pBindInfos ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type Device::bindAccelerationStructureMemoryNV( VULKAN_HPP_NAMESPACE::ArrayProxy const & bindInfos, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkBindAccelerationStructureMemoryNV && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkBindAccelerationStructureMemoryNV( m_device, bindInfos.size(), reinterpret_cast( bindInfos.data() ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::bindAccelerationStructureMemoryNV" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::buildAccelerationStructureNV( const VULKAN_HPP_NAMESPACE::AccelerationStructureInfoNV * pInfo, VULKAN_HPP_NAMESPACE::Buffer instanceData, VULKAN_HPP_NAMESPACE::DeviceSize instanceOffset, VULKAN_HPP_NAMESPACE::Bool32 update, VULKAN_HPP_NAMESPACE::AccelerationStructureNV dst, VULKAN_HPP_NAMESPACE::AccelerationStructureNV src, VULKAN_HPP_NAMESPACE::Buffer scratch, VULKAN_HPP_NAMESPACE::DeviceSize scratchOffset, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdBuildAccelerationStructureNV( static_cast( m_commandBuffer ), reinterpret_cast( pInfo ), static_cast( instanceData ), static_cast( instanceOffset ), static_cast( update ), static_cast( dst ), static_cast( src ), static_cast( scratch ), static_cast( scratchOffset ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::buildAccelerationStructureNV( const VULKAN_HPP_NAMESPACE::AccelerationStructureInfoNV & info, VULKAN_HPP_NAMESPACE::Buffer instanceData, VULKAN_HPP_NAMESPACE::DeviceSize instanceOffset, VULKAN_HPP_NAMESPACE::Bool32 update, VULKAN_HPP_NAMESPACE::AccelerationStructureNV dst, VULKAN_HPP_NAMESPACE::AccelerationStructureNV src, VULKAN_HPP_NAMESPACE::Buffer scratch, VULKAN_HPP_NAMESPACE::DeviceSize scratchOffset, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdBuildAccelerationStructureNV && "Function requires " ); # endif d.vkCmdBuildAccelerationStructureNV( m_commandBuffer, reinterpret_cast( &info ), static_cast( instanceData ), static_cast( instanceOffset ), static_cast( update ), static_cast( dst ), static_cast( src ), static_cast( scratch ), static_cast( scratchOffset ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::copyAccelerationStructureNV( VULKAN_HPP_NAMESPACE::AccelerationStructureNV dst, VULKAN_HPP_NAMESPACE::AccelerationStructureNV src, VULKAN_HPP_NAMESPACE::CopyAccelerationStructureModeKHR mode, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdCopyAccelerationStructureNV( static_cast( m_commandBuffer ), static_cast( dst ), static_cast( src ), static_cast( mode ) ); } template VULKAN_HPP_INLINE void CommandBuffer::traceRaysNV( VULKAN_HPP_NAMESPACE::Buffer raygenShaderBindingTableBuffer, VULKAN_HPP_NAMESPACE::DeviceSize raygenShaderBindingOffset, VULKAN_HPP_NAMESPACE::Buffer missShaderBindingTableBuffer, VULKAN_HPP_NAMESPACE::DeviceSize missShaderBindingOffset, VULKAN_HPP_NAMESPACE::DeviceSize missShaderBindingStride, VULKAN_HPP_NAMESPACE::Buffer hitShaderBindingTableBuffer, VULKAN_HPP_NAMESPACE::DeviceSize hitShaderBindingOffset, VULKAN_HPP_NAMESPACE::DeviceSize hitShaderBindingStride, VULKAN_HPP_NAMESPACE::Buffer callableShaderBindingTableBuffer, VULKAN_HPP_NAMESPACE::DeviceSize callableShaderBindingOffset, VULKAN_HPP_NAMESPACE::DeviceSize callableShaderBindingStride, uint32_t width, uint32_t height, uint32_t depth, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdTraceRaysNV( static_cast( m_commandBuffer ), static_cast( raygenShaderBindingTableBuffer ), static_cast( raygenShaderBindingOffset ), static_cast( missShaderBindingTableBuffer ), static_cast( missShaderBindingOffset ), static_cast( missShaderBindingStride ), static_cast( hitShaderBindingTableBuffer ), static_cast( hitShaderBindingOffset ), static_cast( hitShaderBindingStride ), static_cast( callableShaderBindingTableBuffer ), static_cast( callableShaderBindingOffset ), static_cast( callableShaderBindingStride ), width, height, depth ); } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::createRayTracingPipelinesNV( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, uint32_t createInfoCount, const VULKAN_HPP_NAMESPACE::RayTracingPipelineCreateInfoNV * pCreateInfos, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::Pipeline * pPipelines, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkCreateRayTracingPipelinesNV( static_cast( m_device ), static_cast( pipelineCache ), createInfoCount, reinterpret_cast( pCreateInfos ), reinterpret_cast( pAllocator ), reinterpret_cast( pPipelines ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue> Device::createRayTracingPipelinesNV( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateRayTracingPipelinesNV && "Function requires " ); # endif std::vector pipelines( createInfos.size() ); VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateRayTracingPipelinesNV( m_device, static_cast( pipelineCache ), createInfos.size(), reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( pipelines.data() ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createRayTracingPipelinesNV", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); return ResultValue>( result, std::move( pipelines ) ); } template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue> Device::createRayTracingPipelinesNV( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, Optional allocator, PipelineAllocator & pipelineAllocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateRayTracingPipelinesNV && "Function requires " ); # endif std::vector pipelines( createInfos.size(), pipelineAllocator ); VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateRayTracingPipelinesNV( m_device, static_cast( pipelineCache ), createInfos.size(), reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( pipelines.data() ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createRayTracingPipelinesNV", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); return ResultValue>( result, std::move( pipelines ) ); } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue Device::createRayTracingPipelineNV( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, const VULKAN_HPP_NAMESPACE::RayTracingPipelineCreateInfoNV & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateRayTracingPipelinesNV && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Pipeline pipeline; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateRayTracingPipelinesNV( m_device, static_cast( pipelineCache ), 1, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &pipeline ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createRayTracingPipelineNV", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); return ResultValue( result, std::move( pipeline ) ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE template < typename Dispatch, typename PipelineAllocator, typename std::enable_if>::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue, PipelineAllocator>> Device::createRayTracingPipelinesNVUnique( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateRayTracingPipelinesNV && "Function requires " ); # endif std::vector pipelines( createInfos.size() ); VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateRayTracingPipelinesNV( m_device, static_cast( pipelineCache ), createInfos.size(), reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( pipelines.data() ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createRayTracingPipelinesNVUnique", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); std::vector, PipelineAllocator> uniquePipelines; uniquePipelines.reserve( createInfos.size() ); detail::ObjectDestroy deleter( *this, allocator, d ); for ( auto const & pipeline : pipelines ) { uniquePipelines.push_back( UniqueHandle( pipeline, deleter ) ); } return ResultValue, PipelineAllocator>>( result, std::move( uniquePipelines ) ); } template < typename Dispatch, typename PipelineAllocator, typename std::enable_if>::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue, PipelineAllocator>> Device::createRayTracingPipelinesNVUnique( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, Optional allocator, PipelineAllocator & pipelineAllocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateRayTracingPipelinesNV && "Function requires " ); # endif std::vector pipelines( createInfos.size() ); VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateRayTracingPipelinesNV( m_device, static_cast( pipelineCache ), createInfos.size(), reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( pipelines.data() ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createRayTracingPipelinesNVUnique", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); std::vector, PipelineAllocator> uniquePipelines( pipelineAllocator ); uniquePipelines.reserve( createInfos.size() ); detail::ObjectDestroy deleter( *this, allocator, d ); for ( auto const & pipeline : pipelines ) { uniquePipelines.push_back( UniqueHandle( pipeline, deleter ) ); } return ResultValue, PipelineAllocator>>( result, std::move( uniquePipelines ) ); } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue> Device::createRayTracingPipelineNVUnique( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, const VULKAN_HPP_NAMESPACE::RayTracingPipelineCreateInfoNV & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateRayTracingPipelinesNV && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Pipeline pipeline; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateRayTracingPipelinesNV( m_device, static_cast( pipelineCache ), 1, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &pipeline ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createRayTracingPipelineNVUnique", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } ); return ResultValue>( result, UniqueHandle( pipeline, detail::ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getRayTracingShaderGroupHandlesNV( VULKAN_HPP_NAMESPACE::Pipeline pipeline, uint32_t firstGroup, uint32_t groupCount, size_t dataSize, void * pData, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetRayTracingShaderGroupHandlesNV( static_cast( m_device ), static_cast( pipeline ), firstGroup, groupCount, dataSize, pData ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::getRayTracingShaderGroupHandlesNV( VULKAN_HPP_NAMESPACE::Pipeline pipeline, uint32_t firstGroup, uint32_t groupCount, size_t dataSize, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetRayTracingShaderGroupHandlesNV && "Function requires or " ); # endif VULKAN_HPP_ASSERT( dataSize % sizeof( DataType ) == 0 ); std::vector data( dataSize / sizeof( DataType ) ); VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetRayTracingShaderGroupHandlesNV( m_device, static_cast( pipeline ), firstGroup, groupCount, data.size() * sizeof( DataType ), reinterpret_cast( data.data() ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getRayTracingShaderGroupHandlesNV" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( data ) ); } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::getRayTracingShaderGroupHandleNV( VULKAN_HPP_NAMESPACE::Pipeline pipeline, uint32_t firstGroup, uint32_t groupCount, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetRayTracingShaderGroupHandlesNV && "Function requires or " ); # endif DataType data; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetRayTracingShaderGroupHandlesNV( m_device, static_cast( pipeline ), firstGroup, groupCount, sizeof( DataType ), reinterpret_cast( &data ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getRayTracingShaderGroupHandleNV" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( data ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getAccelerationStructureHandleNV( VULKAN_HPP_NAMESPACE::AccelerationStructureNV accelerationStructure, size_t dataSize, void * pData, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetAccelerationStructureHandleNV( static_cast( m_device ), static_cast( accelerationStructure ), dataSize, pData ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::getAccelerationStructureHandleNV( VULKAN_HPP_NAMESPACE::AccelerationStructureNV accelerationStructure, size_t dataSize, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetAccelerationStructureHandleNV && "Function requires " ); # endif VULKAN_HPP_ASSERT( dataSize % sizeof( DataType ) == 0 ); std::vector data( dataSize / sizeof( DataType ) ); VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetAccelerationStructureHandleNV( m_device, static_cast( accelerationStructure ), data.size() * sizeof( DataType ), reinterpret_cast( data.data() ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getAccelerationStructureHandleNV" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( data ) ); } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::getAccelerationStructureHandleNV( VULKAN_HPP_NAMESPACE::AccelerationStructureNV accelerationStructure, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetAccelerationStructureHandleNV && "Function requires " ); # endif DataType data; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetAccelerationStructureHandleNV( m_device, static_cast( accelerationStructure ), sizeof( DataType ), reinterpret_cast( &data ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getAccelerationStructureHandleNV" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( data ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::writeAccelerationStructuresPropertiesNV( uint32_t accelerationStructureCount, const VULKAN_HPP_NAMESPACE::AccelerationStructureNV * pAccelerationStructures, VULKAN_HPP_NAMESPACE::QueryType queryType, VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t firstQuery, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdWriteAccelerationStructuresPropertiesNV( static_cast( m_commandBuffer ), accelerationStructureCount, reinterpret_cast( pAccelerationStructures ), static_cast( queryType ), static_cast( queryPool ), firstQuery ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::writeAccelerationStructuresPropertiesNV( VULKAN_HPP_NAMESPACE::ArrayProxy const & accelerationStructures, VULKAN_HPP_NAMESPACE::QueryType queryType, VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t firstQuery, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdWriteAccelerationStructuresPropertiesNV && "Function requires " ); # endif d.vkCmdWriteAccelerationStructuresPropertiesNV( m_commandBuffer, accelerationStructures.size(), reinterpret_cast( accelerationStructures.data() ), static_cast( queryType ), static_cast( queryPool ), firstQuery ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::compileDeferredNV( VULKAN_HPP_NAMESPACE::Pipeline pipeline, uint32_t shader, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkCompileDeferredNV( static_cast( m_device ), static_cast( pipeline ), shader ) ); } #else template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type Device::compileDeferredNV( VULKAN_HPP_NAMESPACE::Pipeline pipeline, uint32_t shader, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCompileDeferredNV && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCompileDeferredNV( m_device, static_cast( pipeline ), shader ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::compileDeferredNV" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ //=== VK_KHR_maintenance3 === template VULKAN_HPP_INLINE void Device::getDescriptorSetLayoutSupportKHR( const VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateInfo * pCreateInfo, VULKAN_HPP_NAMESPACE::DescriptorSetLayoutSupport * pSupport, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkGetDescriptorSetLayoutSupportKHR( static_cast( m_device ), reinterpret_cast( pCreateInfo ), reinterpret_cast( pSupport ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::DescriptorSetLayoutSupport Device::getDescriptorSetLayoutSupportKHR( const VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateInfo & createInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetDescriptorSetLayoutSupportKHR && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::DescriptorSetLayoutSupport support; d.vkGetDescriptorSetLayoutSupportKHR( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( &support ) ); return support; } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::StructureChain Device::getDescriptorSetLayoutSupportKHR( const VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateInfo & createInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetDescriptorSetLayoutSupportKHR && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::StructureChain structureChain; VULKAN_HPP_NAMESPACE::DescriptorSetLayoutSupport & support = structureChain.template get(); d.vkGetDescriptorSetLayoutSupportKHR( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( &support ) ); return structureChain; } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_KHR_draw_indirect_count === template VULKAN_HPP_INLINE void CommandBuffer::drawIndirectCountKHR( VULKAN_HPP_NAMESPACE::Buffer buffer, VULKAN_HPP_NAMESPACE::DeviceSize offset, VULKAN_HPP_NAMESPACE::Buffer countBuffer, VULKAN_HPP_NAMESPACE::DeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdDrawIndirectCountKHR( static_cast( m_commandBuffer ), static_cast( buffer ), static_cast( offset ), static_cast( countBuffer ), static_cast( countBufferOffset ), maxDrawCount, stride ); } template VULKAN_HPP_INLINE void CommandBuffer::drawIndexedIndirectCountKHR( VULKAN_HPP_NAMESPACE::Buffer buffer, VULKAN_HPP_NAMESPACE::DeviceSize offset, VULKAN_HPP_NAMESPACE::Buffer countBuffer, VULKAN_HPP_NAMESPACE::DeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdDrawIndexedIndirectCountKHR( static_cast( m_commandBuffer ), static_cast( buffer ), static_cast( offset ), static_cast( countBuffer ), static_cast( countBufferOffset ), maxDrawCount, stride ); } //=== VK_EXT_external_memory_host === template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getMemoryHostPointerPropertiesEXT( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType, const void * pHostPointer, VULKAN_HPP_NAMESPACE::MemoryHostPointerPropertiesEXT * pMemoryHostPointerProperties, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetMemoryHostPointerPropertiesEXT( static_cast( m_device ), static_cast( handleType ), pHostPointer, reinterpret_cast( pMemoryHostPointerProperties ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::getMemoryHostPointerPropertiesEXT( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType, const void * pHostPointer, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetMemoryHostPointerPropertiesEXT && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::MemoryHostPointerPropertiesEXT memoryHostPointerProperties; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetMemoryHostPointerPropertiesEXT( m_device, static_cast( handleType ), pHostPointer, reinterpret_cast( &memoryHostPointerProperties ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryHostPointerPropertiesEXT" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( memoryHostPointerProperties ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_AMD_buffer_marker === template VULKAN_HPP_INLINE void CommandBuffer::writeBufferMarkerAMD( VULKAN_HPP_NAMESPACE::PipelineStageFlagBits pipelineStage, VULKAN_HPP_NAMESPACE::Buffer dstBuffer, VULKAN_HPP_NAMESPACE::DeviceSize dstOffset, uint32_t marker, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdWriteBufferMarkerAMD( static_cast( m_commandBuffer ), static_cast( pipelineStage ), static_cast( dstBuffer ), static_cast( dstOffset ), marker ); } template VULKAN_HPP_INLINE void CommandBuffer::writeBufferMarker2AMD( VULKAN_HPP_NAMESPACE::PipelineStageFlags2 stage, VULKAN_HPP_NAMESPACE::Buffer dstBuffer, VULKAN_HPP_NAMESPACE::DeviceSize dstOffset, uint32_t marker, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdWriteBufferMarker2AMD( static_cast( m_commandBuffer ), static_cast( stage ), static_cast( dstBuffer ), static_cast( dstOffset ), marker ); } //=== VK_EXT_calibrated_timestamps === template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result PhysicalDevice::getCalibrateableTimeDomainsEXT( uint32_t * pTimeDomainCount, VULKAN_HPP_NAMESPACE::TimeDomainKHR * pTimeDomains, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetPhysicalDeviceCalibrateableTimeDomainsEXT( static_cast( m_physicalDevice ), pTimeDomainCount, reinterpret_cast( pTimeDomains ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getCalibrateableTimeDomainsEXT( Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceCalibrateableTimeDomainsEXT && "Function requires or " ); # endif std::vector timeDomains; uint32_t timeDomainCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkGetPhysicalDeviceCalibrateableTimeDomainsEXT( m_physicalDevice, &timeDomainCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && timeDomainCount ) { timeDomains.resize( timeDomainCount ); result = static_cast( d.vkGetPhysicalDeviceCalibrateableTimeDomainsEXT( m_physicalDevice, &timeDomainCount, reinterpret_cast( timeDomains.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getCalibrateableTimeDomainsEXT" ); VULKAN_HPP_ASSERT( timeDomainCount <= timeDomains.size() ); if ( timeDomainCount < timeDomains.size() ) { timeDomains.resize( timeDomainCount ); } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( timeDomains ) ); } template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getCalibrateableTimeDomainsEXT( TimeDomainKHRAllocator & timeDomainKHRAllocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceCalibrateableTimeDomainsEXT && "Function requires or " ); # endif std::vector timeDomains( timeDomainKHRAllocator ); uint32_t timeDomainCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkGetPhysicalDeviceCalibrateableTimeDomainsEXT( m_physicalDevice, &timeDomainCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && timeDomainCount ) { timeDomains.resize( timeDomainCount ); result = static_cast( d.vkGetPhysicalDeviceCalibrateableTimeDomainsEXT( m_physicalDevice, &timeDomainCount, reinterpret_cast( timeDomains.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getCalibrateableTimeDomainsEXT" ); VULKAN_HPP_ASSERT( timeDomainCount <= timeDomains.size() ); if ( timeDomainCount < timeDomains.size() ) { timeDomains.resize( timeDomainCount ); } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( timeDomains ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getCalibratedTimestampsEXT( uint32_t timestampCount, const VULKAN_HPP_NAMESPACE::CalibratedTimestampInfoKHR * pTimestampInfos, uint64_t * pTimestamps, uint64_t * pMaxDeviation, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetCalibratedTimestampsEXT( static_cast( m_device ), timestampCount, reinterpret_cast( pTimestampInfos ), pTimestamps, pMaxDeviation ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType, uint64_t>>::type Device::getCalibratedTimestampsEXT( VULKAN_HPP_NAMESPACE::ArrayProxy const & timestampInfos, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetCalibratedTimestampsEXT && "Function requires or " ); # endif std::pair, uint64_t> data_( std::piecewise_construct, std::forward_as_tuple( timestampInfos.size() ), std::forward_as_tuple( 0 ) ); std::vector & timestamps = data_.first; uint64_t & maxDeviation = data_.second; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetCalibratedTimestampsEXT( m_device, timestampInfos.size(), reinterpret_cast( timestampInfos.data() ), timestamps.data(), &maxDeviation ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getCalibratedTimestampsEXT" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( data_ ) ); } template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType, uint64_t>>::type Device::getCalibratedTimestampsEXT( VULKAN_HPP_NAMESPACE::ArrayProxy const & timestampInfos, Uint64_tAllocator & uint64_tAllocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetCalibratedTimestampsEXT && "Function requires or " ); # endif std::pair, uint64_t> data_( std::piecewise_construct, std::forward_as_tuple( timestampInfos.size(), uint64_tAllocator ), std::forward_as_tuple( 0 ) ); std::vector & timestamps = data_.first; uint64_t & maxDeviation = data_.second; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetCalibratedTimestampsEXT( m_device, timestampInfos.size(), reinterpret_cast( timestampInfos.data() ), timestamps.data(), &maxDeviation ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getCalibratedTimestampsEXT" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( data_ ) ); } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::getCalibratedTimestampEXT( const VULKAN_HPP_NAMESPACE::CalibratedTimestampInfoKHR & timestampInfo, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetCalibratedTimestampsEXT && "Function requires or " ); # endif std::pair data_; uint64_t & timestamp = data_.first; uint64_t & maxDeviation = data_.second; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetCalibratedTimestampsEXT( m_device, 1, reinterpret_cast( ×tampInfo ), ×tamp, &maxDeviation ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getCalibratedTimestampEXT" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( data_ ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_NV_mesh_shader === template VULKAN_HPP_INLINE void CommandBuffer::drawMeshTasksNV( uint32_t taskCount, uint32_t firstTask, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdDrawMeshTasksNV( static_cast( m_commandBuffer ), taskCount, firstTask ); } template VULKAN_HPP_INLINE void CommandBuffer::drawMeshTasksIndirectNV( VULKAN_HPP_NAMESPACE::Buffer buffer, VULKAN_HPP_NAMESPACE::DeviceSize offset, uint32_t drawCount, uint32_t stride, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdDrawMeshTasksIndirectNV( static_cast( m_commandBuffer ), static_cast( buffer ), static_cast( offset ), drawCount, stride ); } template VULKAN_HPP_INLINE void CommandBuffer::drawMeshTasksIndirectCountNV( VULKAN_HPP_NAMESPACE::Buffer buffer, VULKAN_HPP_NAMESPACE::DeviceSize offset, VULKAN_HPP_NAMESPACE::Buffer countBuffer, VULKAN_HPP_NAMESPACE::DeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdDrawMeshTasksIndirectCountNV( static_cast( m_commandBuffer ), static_cast( buffer ), static_cast( offset ), static_cast( countBuffer ), static_cast( countBufferOffset ), maxDrawCount, stride ); } //=== VK_NV_scissor_exclusive === template VULKAN_HPP_INLINE void CommandBuffer::setExclusiveScissorEnableNV( uint32_t firstExclusiveScissor, uint32_t exclusiveScissorCount, const VULKAN_HPP_NAMESPACE::Bool32 * pExclusiveScissorEnables, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetExclusiveScissorEnableNV( static_cast( m_commandBuffer ), firstExclusiveScissor, exclusiveScissorCount, reinterpret_cast( pExclusiveScissorEnables ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::setExclusiveScissorEnableNV( uint32_t firstExclusiveScissor, VULKAN_HPP_NAMESPACE::ArrayProxy const & exclusiveScissorEnables, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdSetExclusiveScissorEnableNV && "Function requires " ); # endif d.vkCmdSetExclusiveScissorEnableNV( m_commandBuffer, firstExclusiveScissor, exclusiveScissorEnables.size(), reinterpret_cast( exclusiveScissorEnables.data() ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::setExclusiveScissorNV( uint32_t firstExclusiveScissor, uint32_t exclusiveScissorCount, const VULKAN_HPP_NAMESPACE::Rect2D * pExclusiveScissors, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetExclusiveScissorNV( static_cast( m_commandBuffer ), firstExclusiveScissor, exclusiveScissorCount, reinterpret_cast( pExclusiveScissors ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::setExclusiveScissorNV( uint32_t firstExclusiveScissor, VULKAN_HPP_NAMESPACE::ArrayProxy const & exclusiveScissors, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdSetExclusiveScissorNV && "Function requires " ); # endif d.vkCmdSetExclusiveScissorNV( m_commandBuffer, firstExclusiveScissor, exclusiveScissors.size(), reinterpret_cast( exclusiveScissors.data() ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_NV_device_diagnostic_checkpoints === template VULKAN_HPP_INLINE void CommandBuffer::setCheckpointNV( const void * pCheckpointMarker, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetCheckpointNV( static_cast( m_commandBuffer ), pCheckpointMarker ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::setCheckpointNV( CheckpointMarkerType const & checkpointMarker, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdSetCheckpointNV && "Function requires " ); # endif d.vkCmdSetCheckpointNV( m_commandBuffer, reinterpret_cast( &checkpointMarker ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Queue::getCheckpointDataNV( uint32_t * pCheckpointDataCount, VULKAN_HPP_NAMESPACE::CheckpointDataNV * pCheckpointData, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkGetQueueCheckpointDataNV( static_cast( m_queue ), pCheckpointDataCount, reinterpret_cast( pCheckpointData ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector Queue::getCheckpointDataNV( Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetQueueCheckpointDataNV && "Function requires " ); # endif std::vector checkpointData; uint32_t checkpointDataCount; d.vkGetQueueCheckpointDataNV( m_queue, &checkpointDataCount, nullptr ); checkpointData.resize( checkpointDataCount ); d.vkGetQueueCheckpointDataNV( m_queue, &checkpointDataCount, reinterpret_cast( checkpointData.data() ) ); VULKAN_HPP_ASSERT( checkpointDataCount <= checkpointData.size() ); if ( checkpointDataCount < checkpointData.size() ) { checkpointData.resize( checkpointDataCount ); } return checkpointData; } template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector Queue::getCheckpointDataNV( CheckpointDataNVAllocator & checkpointDataNVAllocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetQueueCheckpointDataNV && "Function requires " ); # endif std::vector checkpointData( checkpointDataNVAllocator ); uint32_t checkpointDataCount; d.vkGetQueueCheckpointDataNV( m_queue, &checkpointDataCount, nullptr ); checkpointData.resize( checkpointDataCount ); d.vkGetQueueCheckpointDataNV( m_queue, &checkpointDataCount, reinterpret_cast( checkpointData.data() ) ); VULKAN_HPP_ASSERT( checkpointDataCount <= checkpointData.size() ); if ( checkpointDataCount < checkpointData.size() ) { checkpointData.resize( checkpointDataCount ); } return checkpointData; } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Queue::getCheckpointData2NV( uint32_t * pCheckpointDataCount, VULKAN_HPP_NAMESPACE::CheckpointData2NV * pCheckpointData, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkGetQueueCheckpointData2NV( static_cast( m_queue ), pCheckpointDataCount, reinterpret_cast( pCheckpointData ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector Queue::getCheckpointData2NV( Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetQueueCheckpointData2NV && "Function requires " ); # endif std::vector checkpointData; uint32_t checkpointDataCount; d.vkGetQueueCheckpointData2NV( m_queue, &checkpointDataCount, nullptr ); checkpointData.resize( checkpointDataCount ); d.vkGetQueueCheckpointData2NV( m_queue, &checkpointDataCount, reinterpret_cast( checkpointData.data() ) ); VULKAN_HPP_ASSERT( checkpointDataCount <= checkpointData.size() ); if ( checkpointDataCount < checkpointData.size() ) { checkpointData.resize( checkpointDataCount ); } return checkpointData; } template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector Queue::getCheckpointData2NV( CheckpointData2NVAllocator & checkpointData2NVAllocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetQueueCheckpointData2NV && "Function requires " ); # endif std::vector checkpointData( checkpointData2NVAllocator ); uint32_t checkpointDataCount; d.vkGetQueueCheckpointData2NV( m_queue, &checkpointDataCount, nullptr ); checkpointData.resize( checkpointDataCount ); d.vkGetQueueCheckpointData2NV( m_queue, &checkpointDataCount, reinterpret_cast( checkpointData.data() ) ); VULKAN_HPP_ASSERT( checkpointDataCount <= checkpointData.size() ); if ( checkpointDataCount < checkpointData.size() ) { checkpointData.resize( checkpointDataCount ); } return checkpointData; } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_KHR_timeline_semaphore === template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getSemaphoreCounterValueKHR( VULKAN_HPP_NAMESPACE::Semaphore semaphore, uint64_t * pValue, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetSemaphoreCounterValueKHR( static_cast( m_device ), static_cast( semaphore ), pValue ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::getSemaphoreCounterValueKHR( VULKAN_HPP_NAMESPACE::Semaphore semaphore, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetSemaphoreCounterValueKHR && "Function requires or " ); # endif uint64_t value; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetSemaphoreCounterValueKHR( m_device, static_cast( semaphore ), &value ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getSemaphoreCounterValueKHR" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( value ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::waitSemaphoresKHR( const VULKAN_HPP_NAMESPACE::SemaphoreWaitInfo * pWaitInfo, uint64_t timeout, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkWaitSemaphoresKHR( static_cast( m_device ), reinterpret_cast( pWaitInfo ), timeout ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Device::waitSemaphoresKHR( const VULKAN_HPP_NAMESPACE::SemaphoreWaitInfo & waitInfo, uint64_t timeout, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkWaitSemaphoresKHR && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkWaitSemaphoresKHR( m_device, reinterpret_cast( &waitInfo ), timeout ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::waitSemaphoresKHR", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eTimeout } ); return static_cast( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::signalSemaphoreKHR( const VULKAN_HPP_NAMESPACE::SemaphoreSignalInfo * pSignalInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkSignalSemaphoreKHR( static_cast( m_device ), reinterpret_cast( pSignalInfo ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type Device::signalSemaphoreKHR( const VULKAN_HPP_NAMESPACE::SemaphoreSignalInfo & signalInfo, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkSignalSemaphoreKHR && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkSignalSemaphoreKHR( m_device, reinterpret_cast( &signalInfo ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::signalSemaphoreKHR" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_INTEL_performance_query === template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::initializePerformanceApiINTEL( const VULKAN_HPP_NAMESPACE::InitializePerformanceApiInfoINTEL * pInitializeInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkInitializePerformanceApiINTEL( static_cast( m_device ), reinterpret_cast( pInitializeInfo ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type Device::initializePerformanceApiINTEL( const VULKAN_HPP_NAMESPACE::InitializePerformanceApiInfoINTEL & initializeInfo, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkInitializePerformanceApiINTEL && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkInitializePerformanceApiINTEL( m_device, reinterpret_cast( &initializeInfo ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::initializePerformanceApiINTEL" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::uninitializePerformanceApiINTEL( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkUninitializePerformanceApiINTEL( static_cast( m_device ) ); } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result CommandBuffer::setPerformanceMarkerINTEL( const VULKAN_HPP_NAMESPACE::PerformanceMarkerInfoINTEL * pMarkerInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkCmdSetPerformanceMarkerINTEL( static_cast( m_commandBuffer ), reinterpret_cast( pMarkerInfo ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type CommandBuffer::setPerformanceMarkerINTEL( const VULKAN_HPP_NAMESPACE::PerformanceMarkerInfoINTEL & markerInfo, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdSetPerformanceMarkerINTEL && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCmdSetPerformanceMarkerINTEL( m_commandBuffer, reinterpret_cast( &markerInfo ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::setPerformanceMarkerINTEL" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result CommandBuffer::setPerformanceStreamMarkerINTEL( const VULKAN_HPP_NAMESPACE::PerformanceStreamMarkerInfoINTEL * pMarkerInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkCmdSetPerformanceStreamMarkerINTEL( static_cast( m_commandBuffer ), reinterpret_cast( pMarkerInfo ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type CommandBuffer::setPerformanceStreamMarkerINTEL( const VULKAN_HPP_NAMESPACE::PerformanceStreamMarkerInfoINTEL & markerInfo, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdSetPerformanceStreamMarkerINTEL && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCmdSetPerformanceStreamMarkerINTEL( m_commandBuffer, reinterpret_cast( &markerInfo ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::setPerformanceStreamMarkerINTEL" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result CommandBuffer::setPerformanceOverrideINTEL( const VULKAN_HPP_NAMESPACE::PerformanceOverrideInfoINTEL * pOverrideInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkCmdSetPerformanceOverrideINTEL( static_cast( m_commandBuffer ), reinterpret_cast( pOverrideInfo ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type CommandBuffer::setPerformanceOverrideINTEL( const VULKAN_HPP_NAMESPACE::PerformanceOverrideInfoINTEL & overrideInfo, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdSetPerformanceOverrideINTEL && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCmdSetPerformanceOverrideINTEL( m_commandBuffer, reinterpret_cast( &overrideInfo ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::setPerformanceOverrideINTEL" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::acquirePerformanceConfigurationINTEL( const VULKAN_HPP_NAMESPACE::PerformanceConfigurationAcquireInfoINTEL * pAcquireInfo, VULKAN_HPP_NAMESPACE::PerformanceConfigurationINTEL * pConfiguration, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkAcquirePerformanceConfigurationINTEL( static_cast( m_device ), reinterpret_cast( pAcquireInfo ), reinterpret_cast( pConfiguration ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::acquirePerformanceConfigurationINTEL( const VULKAN_HPP_NAMESPACE::PerformanceConfigurationAcquireInfoINTEL & acquireInfo, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkAcquirePerformanceConfigurationINTEL && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::PerformanceConfigurationINTEL configuration; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkAcquirePerformanceConfigurationINTEL( m_device, reinterpret_cast( &acquireInfo ), reinterpret_cast( &configuration ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::acquirePerformanceConfigurationINTEL" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( configuration ) ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::acquirePerformanceConfigurationINTELUnique( const VULKAN_HPP_NAMESPACE::PerformanceConfigurationAcquireInfoINTEL & acquireInfo, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkAcquirePerformanceConfigurationINTEL && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::PerformanceConfigurationINTEL configuration; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkAcquirePerformanceConfigurationINTEL( m_device, reinterpret_cast( &acquireInfo ), reinterpret_cast( &configuration ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::acquirePerformanceConfigurationINTELUnique" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, UniqueHandle( configuration, detail::ObjectRelease( *this, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::releasePerformanceConfigurationINTEL( VULKAN_HPP_NAMESPACE::PerformanceConfigurationINTEL configuration, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkReleasePerformanceConfigurationINTEL( static_cast( m_device ), static_cast( configuration ) ) ); } #else template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type Device::releasePerformanceConfigurationINTEL( VULKAN_HPP_NAMESPACE::PerformanceConfigurationINTEL configuration, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkReleasePerformanceConfigurationINTEL && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkReleasePerformanceConfigurationINTEL( m_device, static_cast( configuration ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::releasePerformanceConfigurationINTEL" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::release( VULKAN_HPP_NAMESPACE::PerformanceConfigurationINTEL configuration, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkReleasePerformanceConfigurationINTEL( static_cast( m_device ), static_cast( configuration ) ) ); } #else template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type Device::release( VULKAN_HPP_NAMESPACE::PerformanceConfigurationINTEL configuration, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkReleasePerformanceConfigurationINTEL && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkReleasePerformanceConfigurationINTEL( m_device, static_cast( configuration ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::release" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Queue::setPerformanceConfigurationINTEL( VULKAN_HPP_NAMESPACE::PerformanceConfigurationINTEL configuration, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkQueueSetPerformanceConfigurationINTEL( static_cast( m_queue ), static_cast( configuration ) ) ); } #else template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type Queue::setPerformanceConfigurationINTEL( VULKAN_HPP_NAMESPACE::PerformanceConfigurationINTEL configuration, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkQueueSetPerformanceConfigurationINTEL && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkQueueSetPerformanceConfigurationINTEL( m_queue, static_cast( configuration ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Queue::setPerformanceConfigurationINTEL" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getPerformanceParameterINTEL( VULKAN_HPP_NAMESPACE::PerformanceParameterTypeINTEL parameter, VULKAN_HPP_NAMESPACE::PerformanceValueINTEL * pValue, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetPerformanceParameterINTEL( static_cast( m_device ), static_cast( parameter ), reinterpret_cast( pValue ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::getPerformanceParameterINTEL( VULKAN_HPP_NAMESPACE::PerformanceParameterTypeINTEL parameter, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPerformanceParameterINTEL && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::PerformanceValueINTEL value; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetPerformanceParameterINTEL( m_device, static_cast( parameter ), reinterpret_cast( &value ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getPerformanceParameterINTEL" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( value ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_AMD_display_native_hdr === template VULKAN_HPP_INLINE void Device::setLocalDimmingAMD( VULKAN_HPP_NAMESPACE::SwapchainKHR swapChain, VULKAN_HPP_NAMESPACE::Bool32 localDimmingEnable, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkSetLocalDimmingAMD( static_cast( m_device ), static_cast( swapChain ), static_cast( localDimmingEnable ) ); } #if defined( VK_USE_PLATFORM_FUCHSIA ) //=== VK_FUCHSIA_imagepipe_surface === template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Instance::createImagePipeSurfaceFUCHSIA( const VULKAN_HPP_NAMESPACE::ImagePipeSurfaceCreateInfoFUCHSIA * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::SurfaceKHR * pSurface, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkCreateImagePipeSurfaceFUCHSIA( static_cast( m_instance ), reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSurface ) ) ); } # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Instance::createImagePipeSurfaceFUCHSIA( const VULKAN_HPP_NAMESPACE::ImagePipeSurfaceCreateInfoFUCHSIA & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateImagePipeSurfaceFUCHSIA && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::SurfaceKHR surface; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateImagePipeSurfaceFUCHSIA( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::createImagePipeSurfaceFUCHSIA" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( surface ) ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Instance::createImagePipeSurfaceFUCHSIAUnique( const VULKAN_HPP_NAMESPACE::ImagePipeSurfaceCreateInfoFUCHSIA & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateImagePipeSurfaceFUCHSIA && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::SurfaceKHR surface; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateImagePipeSurfaceFUCHSIA( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::createImagePipeSurfaceFUCHSIAUnique" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, UniqueHandle( surface, detail::ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #endif /*VK_USE_PLATFORM_FUCHSIA*/ #if defined( VK_USE_PLATFORM_METAL_EXT ) //=== VK_EXT_metal_surface === template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Instance::createMetalSurfaceEXT( const VULKAN_HPP_NAMESPACE::MetalSurfaceCreateInfoEXT * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::SurfaceKHR * pSurface, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkCreateMetalSurfaceEXT( static_cast( m_instance ), reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSurface ) ) ); } # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Instance::createMetalSurfaceEXT( const VULKAN_HPP_NAMESPACE::MetalSurfaceCreateInfoEXT & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateMetalSurfaceEXT && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::SurfaceKHR surface; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateMetalSurfaceEXT( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::createMetalSurfaceEXT" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( surface ) ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Instance::createMetalSurfaceEXTUnique( const VULKAN_HPP_NAMESPACE::MetalSurfaceCreateInfoEXT & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateMetalSurfaceEXT && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::SurfaceKHR surface; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateMetalSurfaceEXT( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::createMetalSurfaceEXTUnique" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, UniqueHandle( surface, detail::ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #endif /*VK_USE_PLATFORM_METAL_EXT*/ //=== VK_KHR_fragment_shading_rate === template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result PhysicalDevice::getFragmentShadingRatesKHR( uint32_t * pFragmentShadingRateCount, VULKAN_HPP_NAMESPACE::PhysicalDeviceFragmentShadingRateKHR * pFragmentShadingRates, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetPhysicalDeviceFragmentShadingRatesKHR( static_cast( m_physicalDevice ), pFragmentShadingRateCount, reinterpret_cast( pFragmentShadingRates ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getFragmentShadingRatesKHR( Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceFragmentShadingRatesKHR && "Function requires " ); # endif std::vector fragmentShadingRates; uint32_t fragmentShadingRateCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkGetPhysicalDeviceFragmentShadingRatesKHR( m_physicalDevice, &fragmentShadingRateCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && fragmentShadingRateCount ) { fragmentShadingRates.resize( fragmentShadingRateCount ); result = static_cast( d.vkGetPhysicalDeviceFragmentShadingRatesKHR( m_physicalDevice, &fragmentShadingRateCount, reinterpret_cast( fragmentShadingRates.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getFragmentShadingRatesKHR" ); VULKAN_HPP_ASSERT( fragmentShadingRateCount <= fragmentShadingRates.size() ); if ( fragmentShadingRateCount < fragmentShadingRates.size() ) { fragmentShadingRates.resize( fragmentShadingRateCount ); } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( fragmentShadingRates ) ); } template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getFragmentShadingRatesKHR( PhysicalDeviceFragmentShadingRateKHRAllocator & physicalDeviceFragmentShadingRateKHRAllocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceFragmentShadingRatesKHR && "Function requires " ); # endif std::vector fragmentShadingRates( physicalDeviceFragmentShadingRateKHRAllocator ); uint32_t fragmentShadingRateCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkGetPhysicalDeviceFragmentShadingRatesKHR( m_physicalDevice, &fragmentShadingRateCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && fragmentShadingRateCount ) { fragmentShadingRates.resize( fragmentShadingRateCount ); result = static_cast( d.vkGetPhysicalDeviceFragmentShadingRatesKHR( m_physicalDevice, &fragmentShadingRateCount, reinterpret_cast( fragmentShadingRates.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getFragmentShadingRatesKHR" ); VULKAN_HPP_ASSERT( fragmentShadingRateCount <= fragmentShadingRates.size() ); if ( fragmentShadingRateCount < fragmentShadingRates.size() ) { fragmentShadingRates.resize( fragmentShadingRateCount ); } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( fragmentShadingRates ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::setFragmentShadingRateKHR( const VULKAN_HPP_NAMESPACE::Extent2D * pFragmentSize, const VULKAN_HPP_NAMESPACE::FragmentShadingRateCombinerOpKHR combinerOps[2], Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetFragmentShadingRateKHR( static_cast( m_commandBuffer ), reinterpret_cast( pFragmentSize ), reinterpret_cast( combinerOps ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::setFragmentShadingRateKHR( const VULKAN_HPP_NAMESPACE::Extent2D & fragmentSize, const VULKAN_HPP_NAMESPACE::FragmentShadingRateCombinerOpKHR combinerOps[2], Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdSetFragmentShadingRateKHR && "Function requires " ); # endif d.vkCmdSetFragmentShadingRateKHR( m_commandBuffer, reinterpret_cast( &fragmentSize ), reinterpret_cast( combinerOps ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_KHR_dynamic_rendering_local_read === template VULKAN_HPP_INLINE void CommandBuffer::setRenderingAttachmentLocationsKHR( const VULKAN_HPP_NAMESPACE::RenderingAttachmentLocationInfo * pLocationInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetRenderingAttachmentLocationsKHR( static_cast( m_commandBuffer ), reinterpret_cast( pLocationInfo ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::setRenderingAttachmentLocationsKHR( const VULKAN_HPP_NAMESPACE::RenderingAttachmentLocationInfo & locationInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdSetRenderingAttachmentLocationsKHR && "Function requires or " ); # endif d.vkCmdSetRenderingAttachmentLocationsKHR( m_commandBuffer, reinterpret_cast( &locationInfo ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::setRenderingInputAttachmentIndicesKHR( const VULKAN_HPP_NAMESPACE::RenderingInputAttachmentIndexInfo * pInputAttachmentIndexInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetRenderingInputAttachmentIndicesKHR( static_cast( m_commandBuffer ), reinterpret_cast( pInputAttachmentIndexInfo ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::setRenderingInputAttachmentIndicesKHR( const VULKAN_HPP_NAMESPACE::RenderingInputAttachmentIndexInfo & inputAttachmentIndexInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdSetRenderingInputAttachmentIndicesKHR && "Function requires or " ); # endif d.vkCmdSetRenderingInputAttachmentIndicesKHR( m_commandBuffer, reinterpret_cast( &inputAttachmentIndexInfo ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_EXT_buffer_device_address === template VULKAN_HPP_INLINE DeviceAddress Device::getBufferAddressEXT( const VULKAN_HPP_NAMESPACE::BufferDeviceAddressInfo * pInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetBufferDeviceAddressEXT( static_cast( m_device ), reinterpret_cast( pInfo ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::DeviceAddress Device::getBufferAddressEXT( const VULKAN_HPP_NAMESPACE::BufferDeviceAddressInfo & info, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetBufferDeviceAddressEXT && "Function requires or or " ); # endif VkDeviceAddress result = d.vkGetBufferDeviceAddressEXT( m_device, reinterpret_cast( &info ) ); return static_cast( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_EXT_tooling_info === template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result PhysicalDevice::getToolPropertiesEXT( uint32_t * pToolCount, VULKAN_HPP_NAMESPACE::PhysicalDeviceToolProperties * pToolProperties, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetPhysicalDeviceToolPropertiesEXT( static_cast( m_physicalDevice ), pToolCount, reinterpret_cast( pToolProperties ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template < typename PhysicalDeviceToolPropertiesAllocator, typename Dispatch, typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getToolPropertiesEXT( Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceToolPropertiesEXT && "Function requires or " ); # endif std::vector toolProperties; uint32_t toolCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkGetPhysicalDeviceToolPropertiesEXT( m_physicalDevice, &toolCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && toolCount ) { toolProperties.resize( toolCount ); result = static_cast( d.vkGetPhysicalDeviceToolPropertiesEXT( m_physicalDevice, &toolCount, reinterpret_cast( toolProperties.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getToolPropertiesEXT" ); VULKAN_HPP_ASSERT( toolCount <= toolProperties.size() ); if ( toolCount < toolProperties.size() ) { toolProperties.resize( toolCount ); } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( toolProperties ) ); } template < typename PhysicalDeviceToolPropertiesAllocator, typename Dispatch, typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getToolPropertiesEXT( PhysicalDeviceToolPropertiesAllocator & physicalDeviceToolPropertiesAllocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceToolPropertiesEXT && "Function requires or " ); # endif std::vector toolProperties( physicalDeviceToolPropertiesAllocator ); uint32_t toolCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkGetPhysicalDeviceToolPropertiesEXT( m_physicalDevice, &toolCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && toolCount ) { toolProperties.resize( toolCount ); result = static_cast( d.vkGetPhysicalDeviceToolPropertiesEXT( m_physicalDevice, &toolCount, reinterpret_cast( toolProperties.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getToolPropertiesEXT" ); VULKAN_HPP_ASSERT( toolCount <= toolProperties.size() ); if ( toolCount < toolProperties.size() ) { toolProperties.resize( toolCount ); } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( toolProperties ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_KHR_present_wait === #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::waitForPresentKHR( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, uint64_t presentId, uint64_t timeout, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkWaitForPresentKHR( static_cast( m_device ), static_cast( swapchain ), presentId, timeout ) ); } #else template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Device::waitForPresentKHR( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, uint64_t presentId, uint64_t timeout, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkWaitForPresentKHR && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkWaitForPresentKHR( m_device, static_cast( swapchain ), presentId, timeout ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::waitForPresentKHR", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eTimeout, VULKAN_HPP_NAMESPACE::Result::eSuboptimalKHR } ); return static_cast( result ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ //=== VK_NV_cooperative_matrix === template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result PhysicalDevice::getCooperativeMatrixPropertiesNV( uint32_t * pPropertyCount, VULKAN_HPP_NAMESPACE::CooperativeMatrixPropertiesNV * pProperties, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetPhysicalDeviceCooperativeMatrixPropertiesNV( static_cast( m_physicalDevice ), pPropertyCount, reinterpret_cast( pProperties ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getCooperativeMatrixPropertiesNV( Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceCooperativeMatrixPropertiesNV && "Function requires " ); # endif std::vector properties; uint32_t propertyCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkGetPhysicalDeviceCooperativeMatrixPropertiesNV( m_physicalDevice, &propertyCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); result = static_cast( d.vkGetPhysicalDeviceCooperativeMatrixPropertiesNV( m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getCooperativeMatrixPropertiesNV" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( properties ) ); } template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getCooperativeMatrixPropertiesNV( CooperativeMatrixPropertiesNVAllocator & cooperativeMatrixPropertiesNVAllocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceCooperativeMatrixPropertiesNV && "Function requires " ); # endif std::vector properties( cooperativeMatrixPropertiesNVAllocator ); uint32_t propertyCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkGetPhysicalDeviceCooperativeMatrixPropertiesNV( m_physicalDevice, &propertyCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); result = static_cast( d.vkGetPhysicalDeviceCooperativeMatrixPropertiesNV( m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getCooperativeMatrixPropertiesNV" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( properties ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_NV_coverage_reduction_mode === template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result PhysicalDevice::getSupportedFramebufferMixedSamplesCombinationsNV( uint32_t * pCombinationCount, VULKAN_HPP_NAMESPACE::FramebufferMixedSamplesCombinationNV * pCombinations, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV( static_cast( m_physicalDevice ), pCombinationCount, reinterpret_cast( pCombinations ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getSupportedFramebufferMixedSamplesCombinationsNV( Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV && "Function requires " ); # endif std::vector combinations; uint32_t combinationCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV( m_physicalDevice, &combinationCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && combinationCount ) { combinations.resize( combinationCount ); result = static_cast( d.vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV( m_physicalDevice, &combinationCount, reinterpret_cast( combinations.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSupportedFramebufferMixedSamplesCombinationsNV" ); VULKAN_HPP_ASSERT( combinationCount <= combinations.size() ); if ( combinationCount < combinations.size() ) { combinations.resize( combinationCount ); } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( combinations ) ); } template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getSupportedFramebufferMixedSamplesCombinationsNV( FramebufferMixedSamplesCombinationNVAllocator & framebufferMixedSamplesCombinationNVAllocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV && "Function requires " ); # endif std::vector combinations( framebufferMixedSamplesCombinationNVAllocator ); uint32_t combinationCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV( m_physicalDevice, &combinationCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && combinationCount ) { combinations.resize( combinationCount ); result = static_cast( d.vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV( m_physicalDevice, &combinationCount, reinterpret_cast( combinations.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSupportedFramebufferMixedSamplesCombinationsNV" ); VULKAN_HPP_ASSERT( combinationCount <= combinations.size() ); if ( combinationCount < combinations.size() ) { combinations.resize( combinationCount ); } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( combinations ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_EXT_full_screen_exclusive === template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result PhysicalDevice::getSurfacePresentModes2EXT( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR * pSurfaceInfo, uint32_t * pPresentModeCount, VULKAN_HPP_NAMESPACE::PresentModeKHR * pPresentModes, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetPhysicalDeviceSurfacePresentModes2EXT( static_cast( m_physicalDevice ), reinterpret_cast( pSurfaceInfo ), pPresentModeCount, reinterpret_cast( pPresentModes ) ) ); } # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getSurfacePresentModes2EXT( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR & surfaceInfo, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceSurfacePresentModes2EXT && "Function requires " ); # endif std::vector presentModes; uint32_t presentModeCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkGetPhysicalDeviceSurfacePresentModes2EXT( m_physicalDevice, reinterpret_cast( &surfaceInfo ), &presentModeCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && presentModeCount ) { presentModes.resize( presentModeCount ); result = static_cast( d.vkGetPhysicalDeviceSurfacePresentModes2EXT( m_physicalDevice, reinterpret_cast( &surfaceInfo ), &presentModeCount, reinterpret_cast( presentModes.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfacePresentModes2EXT" ); VULKAN_HPP_ASSERT( presentModeCount <= presentModes.size() ); if ( presentModeCount < presentModes.size() ) { presentModes.resize( presentModeCount ); } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( presentModes ) ); } template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getSurfacePresentModes2EXT( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR & surfaceInfo, PresentModeKHRAllocator & presentModeKHRAllocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceSurfacePresentModes2EXT && "Function requires " ); # endif std::vector presentModes( presentModeKHRAllocator ); uint32_t presentModeCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkGetPhysicalDeviceSurfacePresentModes2EXT( m_physicalDevice, reinterpret_cast( &surfaceInfo ), &presentModeCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && presentModeCount ) { presentModes.resize( presentModeCount ); result = static_cast( d.vkGetPhysicalDeviceSurfacePresentModes2EXT( m_physicalDevice, reinterpret_cast( &surfaceInfo ), &presentModeCount, reinterpret_cast( presentModes.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfacePresentModes2EXT" ); VULKAN_HPP_ASSERT( presentModeCount <= presentModes.size() ); if ( presentModeCount < presentModes.size() ) { presentModes.resize( presentModeCount ); } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( presentModes ) ); } # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ # ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::acquireFullScreenExclusiveModeEXT( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkAcquireFullScreenExclusiveModeEXT( static_cast( m_device ), static_cast( swapchain ) ) ); } # else template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type Device::acquireFullScreenExclusiveModeEXT( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkAcquireFullScreenExclusiveModeEXT && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkAcquireFullScreenExclusiveModeEXT( m_device, static_cast( swapchain ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::acquireFullScreenExclusiveModeEXT" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result ); } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ # ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::releaseFullScreenExclusiveModeEXT( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkReleaseFullScreenExclusiveModeEXT( static_cast( m_device ), static_cast( swapchain ) ) ); } # else template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type Device::releaseFullScreenExclusiveModeEXT( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkReleaseFullScreenExclusiveModeEXT && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkReleaseFullScreenExclusiveModeEXT( m_device, static_cast( swapchain ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::releaseFullScreenExclusiveModeEXT" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result ); } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getGroupSurfacePresentModes2EXT( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR * pSurfaceInfo, VULKAN_HPP_NAMESPACE::DeviceGroupPresentModeFlagsKHR * pModes, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetDeviceGroupSurfacePresentModes2EXT( static_cast( m_device ), reinterpret_cast( pSurfaceInfo ), reinterpret_cast( pModes ) ) ); } # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::getGroupSurfacePresentModes2EXT( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR & surfaceInfo, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetDeviceGroupSurfacePresentModes2EXT && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::DeviceGroupPresentModeFlagsKHR modes; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetDeviceGroupSurfacePresentModes2EXT( m_device, reinterpret_cast( &surfaceInfo ), reinterpret_cast( &modes ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getGroupSurfacePresentModes2EXT" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( modes ) ); } # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_EXT_headless_surface === template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Instance::createHeadlessSurfaceEXT( const VULKAN_HPP_NAMESPACE::HeadlessSurfaceCreateInfoEXT * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::SurfaceKHR * pSurface, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkCreateHeadlessSurfaceEXT( static_cast( m_instance ), reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSurface ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Instance::createHeadlessSurfaceEXT( const VULKAN_HPP_NAMESPACE::HeadlessSurfaceCreateInfoEXT & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateHeadlessSurfaceEXT && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::SurfaceKHR surface; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateHeadlessSurfaceEXT( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::createHeadlessSurfaceEXT" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( surface ) ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Instance::createHeadlessSurfaceEXTUnique( const VULKAN_HPP_NAMESPACE::HeadlessSurfaceCreateInfoEXT & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateHeadlessSurfaceEXT && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::SurfaceKHR surface; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateHeadlessSurfaceEXT( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::createHeadlessSurfaceEXTUnique" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, UniqueHandle( surface, detail::ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_KHR_buffer_device_address === template VULKAN_HPP_INLINE DeviceAddress Device::getBufferAddressKHR( const VULKAN_HPP_NAMESPACE::BufferDeviceAddressInfo * pInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetBufferDeviceAddressKHR( static_cast( m_device ), reinterpret_cast( pInfo ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::DeviceAddress Device::getBufferAddressKHR( const VULKAN_HPP_NAMESPACE::BufferDeviceAddressInfo & info, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetBufferDeviceAddressKHR && "Function requires or or " ); # endif VkDeviceAddress result = d.vkGetBufferDeviceAddressKHR( m_device, reinterpret_cast( &info ) ); return static_cast( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE uint64_t Device::getBufferOpaqueCaptureAddressKHR( const VULKAN_HPP_NAMESPACE::BufferDeviceAddressInfo * pInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return d.vkGetBufferOpaqueCaptureAddressKHR( static_cast( m_device ), reinterpret_cast( pInfo ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE uint64_t Device::getBufferOpaqueCaptureAddressKHR( const VULKAN_HPP_NAMESPACE::BufferDeviceAddressInfo & info, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetBufferOpaqueCaptureAddressKHR && "Function requires or " ); # endif uint64_t result = d.vkGetBufferOpaqueCaptureAddressKHR( m_device, reinterpret_cast( &info ) ); return result; } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE uint64_t Device::getMemoryOpaqueCaptureAddressKHR( const VULKAN_HPP_NAMESPACE::DeviceMemoryOpaqueCaptureAddressInfo * pInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return d.vkGetDeviceMemoryOpaqueCaptureAddressKHR( static_cast( m_device ), reinterpret_cast( pInfo ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE uint64_t Device::getMemoryOpaqueCaptureAddressKHR( const VULKAN_HPP_NAMESPACE::DeviceMemoryOpaqueCaptureAddressInfo & info, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetDeviceMemoryOpaqueCaptureAddressKHR && "Function requires or " ); # endif uint64_t result = d.vkGetDeviceMemoryOpaqueCaptureAddressKHR( m_device, reinterpret_cast( &info ) ); return result; } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_EXT_line_rasterization === template VULKAN_HPP_INLINE void CommandBuffer::setLineStippleEXT( uint32_t lineStippleFactor, uint16_t lineStipplePattern, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetLineStippleEXT( static_cast( m_commandBuffer ), lineStippleFactor, lineStipplePattern ); } //=== VK_EXT_host_query_reset === template VULKAN_HPP_INLINE void Device::resetQueryPoolEXT( VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkResetQueryPoolEXT( static_cast( m_device ), static_cast( queryPool ), firstQuery, queryCount ); } //=== VK_EXT_extended_dynamic_state === template VULKAN_HPP_INLINE void CommandBuffer::setCullModeEXT( VULKAN_HPP_NAMESPACE::CullModeFlags cullMode, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetCullModeEXT( static_cast( m_commandBuffer ), static_cast( cullMode ) ); } template VULKAN_HPP_INLINE void CommandBuffer::setFrontFaceEXT( VULKAN_HPP_NAMESPACE::FrontFace frontFace, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetFrontFaceEXT( static_cast( m_commandBuffer ), static_cast( frontFace ) ); } template VULKAN_HPP_INLINE void CommandBuffer::setPrimitiveTopologyEXT( VULKAN_HPP_NAMESPACE::PrimitiveTopology primitiveTopology, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetPrimitiveTopologyEXT( static_cast( m_commandBuffer ), static_cast( primitiveTopology ) ); } template VULKAN_HPP_INLINE void CommandBuffer::setViewportWithCountEXT( uint32_t viewportCount, const VULKAN_HPP_NAMESPACE::Viewport * pViewports, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetViewportWithCountEXT( static_cast( m_commandBuffer ), viewportCount, reinterpret_cast( pViewports ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::setViewportWithCountEXT( VULKAN_HPP_NAMESPACE::ArrayProxy const & viewports, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdSetViewportWithCountEXT && "Function requires or or " ); # endif d.vkCmdSetViewportWithCountEXT( m_commandBuffer, viewports.size(), reinterpret_cast( viewports.data() ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::setScissorWithCountEXT( uint32_t scissorCount, const VULKAN_HPP_NAMESPACE::Rect2D * pScissors, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetScissorWithCountEXT( static_cast( m_commandBuffer ), scissorCount, reinterpret_cast( pScissors ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::setScissorWithCountEXT( VULKAN_HPP_NAMESPACE::ArrayProxy const & scissors, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdSetScissorWithCountEXT && "Function requires or or " ); # endif d.vkCmdSetScissorWithCountEXT( m_commandBuffer, scissors.size(), reinterpret_cast( scissors.data() ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::bindVertexBuffers2EXT( uint32_t firstBinding, uint32_t bindingCount, const VULKAN_HPP_NAMESPACE::Buffer * pBuffers, const VULKAN_HPP_NAMESPACE::DeviceSize * pOffsets, const VULKAN_HPP_NAMESPACE::DeviceSize * pSizes, const VULKAN_HPP_NAMESPACE::DeviceSize * pStrides, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdBindVertexBuffers2EXT( static_cast( m_commandBuffer ), firstBinding, bindingCount, reinterpret_cast( pBuffers ), reinterpret_cast( pOffsets ), reinterpret_cast( pSizes ), reinterpret_cast( pStrides ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::bindVertexBuffers2EXT( uint32_t firstBinding, VULKAN_HPP_NAMESPACE::ArrayProxy const & buffers, VULKAN_HPP_NAMESPACE::ArrayProxy const & offsets, VULKAN_HPP_NAMESPACE::ArrayProxy const & sizes, VULKAN_HPP_NAMESPACE::ArrayProxy const & strides, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdBindVertexBuffers2EXT && "Function requires or or " ); # endif # ifdef VULKAN_HPP_NO_EXCEPTIONS VULKAN_HPP_ASSERT( buffers.size() == offsets.size() ); VULKAN_HPP_ASSERT( sizes.empty() || buffers.size() == sizes.size() ); VULKAN_HPP_ASSERT( strides.empty() || buffers.size() == strides.size() ); # else if ( buffers.size() != offsets.size() ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::bindVertexBuffers2EXT: buffers.size() != offsets.size()" ); } if ( !sizes.empty() && buffers.size() != sizes.size() ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::bindVertexBuffers2EXT: buffers.size() != sizes.size()" ); } if ( !strides.empty() && buffers.size() != strides.size() ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::bindVertexBuffers2EXT: buffers.size() != strides.size()" ); } # endif /*VULKAN_HPP_NO_EXCEPTIONS*/ d.vkCmdBindVertexBuffers2EXT( m_commandBuffer, firstBinding, buffers.size(), reinterpret_cast( buffers.data() ), reinterpret_cast( offsets.data() ), reinterpret_cast( sizes.data() ), reinterpret_cast( strides.data() ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::setDepthTestEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 depthTestEnable, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetDepthTestEnableEXT( static_cast( m_commandBuffer ), static_cast( depthTestEnable ) ); } template VULKAN_HPP_INLINE void CommandBuffer::setDepthWriteEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 depthWriteEnable, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetDepthWriteEnableEXT( static_cast( m_commandBuffer ), static_cast( depthWriteEnable ) ); } template VULKAN_HPP_INLINE void CommandBuffer::setDepthCompareOpEXT( VULKAN_HPP_NAMESPACE::CompareOp depthCompareOp, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetDepthCompareOpEXT( static_cast( m_commandBuffer ), static_cast( depthCompareOp ) ); } template VULKAN_HPP_INLINE void CommandBuffer::setDepthBoundsTestEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 depthBoundsTestEnable, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetDepthBoundsTestEnableEXT( static_cast( m_commandBuffer ), static_cast( depthBoundsTestEnable ) ); } template VULKAN_HPP_INLINE void CommandBuffer::setStencilTestEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 stencilTestEnable, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetStencilTestEnableEXT( static_cast( m_commandBuffer ), static_cast( stencilTestEnable ) ); } template VULKAN_HPP_INLINE void CommandBuffer::setStencilOpEXT( VULKAN_HPP_NAMESPACE::StencilFaceFlags faceMask, VULKAN_HPP_NAMESPACE::StencilOp failOp, VULKAN_HPP_NAMESPACE::StencilOp passOp, VULKAN_HPP_NAMESPACE::StencilOp depthFailOp, VULKAN_HPP_NAMESPACE::CompareOp compareOp, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetStencilOpEXT( static_cast( m_commandBuffer ), static_cast( faceMask ), static_cast( failOp ), static_cast( passOp ), static_cast( depthFailOp ), static_cast( compareOp ) ); } //=== VK_KHR_deferred_host_operations === template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::createDeferredOperationKHR( const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::DeferredOperationKHR * pDeferredOperation, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkCreateDeferredOperationKHR( static_cast( m_device ), reinterpret_cast( pAllocator ), reinterpret_cast( pDeferredOperation ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::createDeferredOperationKHR( Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateDeferredOperationKHR && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateDeferredOperationKHR( m_device, reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &deferredOperation ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createDeferredOperationKHR" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( deferredOperation ) ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::createDeferredOperationKHRUnique( Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateDeferredOperationKHR && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateDeferredOperationKHR( m_device, reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &deferredOperation ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createDeferredOperationKHRUnique" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, UniqueHandle( deferredOperation, detail::ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::destroyDeferredOperationKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR operation, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDestroyDeferredOperationKHR( static_cast( m_device ), static_cast( operation ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::destroyDeferredOperationKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR operation, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDestroyDeferredOperationKHR && "Function requires " ); # endif d.vkDestroyDeferredOperationKHR( m_device, static_cast( operation ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::DeferredOperationKHR operation, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDestroyDeferredOperationKHR( static_cast( m_device ), static_cast( operation ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::DeferredOperationKHR operation, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDestroyDeferredOperationKHR && "Function requires " ); # endif d.vkDestroyDeferredOperationKHR( m_device, static_cast( operation ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE uint32_t Device::getDeferredOperationMaxConcurrencyKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR operation, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return d.vkGetDeferredOperationMaxConcurrencyKHR( static_cast( m_device ), static_cast( operation ) ); } #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getDeferredOperationResultKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR operation, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetDeferredOperationResultKHR( static_cast( m_device ), static_cast( operation ) ) ); } #else template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Device::getDeferredOperationResultKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR operation, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetDeferredOperationResultKHR && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetDeferredOperationResultKHR( m_device, static_cast( operation ) ) ); return static_cast( result ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::deferredOperationJoinKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR operation, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkDeferredOperationJoinKHR( static_cast( m_device ), static_cast( operation ) ) ); } #else template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Device::deferredOperationJoinKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR operation, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDeferredOperationJoinKHR && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkDeferredOperationJoinKHR( m_device, static_cast( operation ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::deferredOperationJoinKHR", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eThreadDoneKHR, VULKAN_HPP_NAMESPACE::Result::eThreadIdleKHR } ); return static_cast( result ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ //=== VK_KHR_pipeline_executable_properties === template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getPipelineExecutablePropertiesKHR( const VULKAN_HPP_NAMESPACE::PipelineInfoKHR * pPipelineInfo, uint32_t * pExecutableCount, VULKAN_HPP_NAMESPACE::PipelineExecutablePropertiesKHR * pProperties, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetPipelineExecutablePropertiesKHR( static_cast( m_device ), reinterpret_cast( pPipelineInfo ), pExecutableCount, reinterpret_cast( pProperties ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::getPipelineExecutablePropertiesKHR( const VULKAN_HPP_NAMESPACE::PipelineInfoKHR & pipelineInfo, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPipelineExecutablePropertiesKHR && "Function requires " ); # endif std::vector properties; uint32_t executableCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkGetPipelineExecutablePropertiesKHR( m_device, reinterpret_cast( &pipelineInfo ), &executableCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && executableCount ) { properties.resize( executableCount ); result = static_cast( d.vkGetPipelineExecutablePropertiesKHR( m_device, reinterpret_cast( &pipelineInfo ), &executableCount, reinterpret_cast( properties.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getPipelineExecutablePropertiesKHR" ); VULKAN_HPP_ASSERT( executableCount <= properties.size() ); if ( executableCount < properties.size() ) { properties.resize( executableCount ); } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( properties ) ); } template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::getPipelineExecutablePropertiesKHR( const VULKAN_HPP_NAMESPACE::PipelineInfoKHR & pipelineInfo, PipelineExecutablePropertiesKHRAllocator & pipelineExecutablePropertiesKHRAllocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPipelineExecutablePropertiesKHR && "Function requires " ); # endif std::vector properties( pipelineExecutablePropertiesKHRAllocator ); uint32_t executableCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkGetPipelineExecutablePropertiesKHR( m_device, reinterpret_cast( &pipelineInfo ), &executableCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && executableCount ) { properties.resize( executableCount ); result = static_cast( d.vkGetPipelineExecutablePropertiesKHR( m_device, reinterpret_cast( &pipelineInfo ), &executableCount, reinterpret_cast( properties.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getPipelineExecutablePropertiesKHR" ); VULKAN_HPP_ASSERT( executableCount <= properties.size() ); if ( executableCount < properties.size() ) { properties.resize( executableCount ); } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( properties ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getPipelineExecutableStatisticsKHR( const VULKAN_HPP_NAMESPACE::PipelineExecutableInfoKHR * pExecutableInfo, uint32_t * pStatisticCount, VULKAN_HPP_NAMESPACE::PipelineExecutableStatisticKHR * pStatistics, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetPipelineExecutableStatisticsKHR( static_cast( m_device ), reinterpret_cast( pExecutableInfo ), pStatisticCount, reinterpret_cast( pStatistics ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::getPipelineExecutableStatisticsKHR( const VULKAN_HPP_NAMESPACE::PipelineExecutableInfoKHR & executableInfo, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPipelineExecutableStatisticsKHR && "Function requires " ); # endif std::vector statistics; uint32_t statisticCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkGetPipelineExecutableStatisticsKHR( m_device, reinterpret_cast( &executableInfo ), &statisticCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && statisticCount ) { statistics.resize( statisticCount ); result = static_cast( d.vkGetPipelineExecutableStatisticsKHR( m_device, reinterpret_cast( &executableInfo ), &statisticCount, reinterpret_cast( statistics.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getPipelineExecutableStatisticsKHR" ); VULKAN_HPP_ASSERT( statisticCount <= statistics.size() ); if ( statisticCount < statistics.size() ) { statistics.resize( statisticCount ); } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( statistics ) ); } template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::getPipelineExecutableStatisticsKHR( const VULKAN_HPP_NAMESPACE::PipelineExecutableInfoKHR & executableInfo, PipelineExecutableStatisticKHRAllocator & pipelineExecutableStatisticKHRAllocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPipelineExecutableStatisticsKHR && "Function requires " ); # endif std::vector statistics( pipelineExecutableStatisticKHRAllocator ); uint32_t statisticCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkGetPipelineExecutableStatisticsKHR( m_device, reinterpret_cast( &executableInfo ), &statisticCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && statisticCount ) { statistics.resize( statisticCount ); result = static_cast( d.vkGetPipelineExecutableStatisticsKHR( m_device, reinterpret_cast( &executableInfo ), &statisticCount, reinterpret_cast( statistics.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getPipelineExecutableStatisticsKHR" ); VULKAN_HPP_ASSERT( statisticCount <= statistics.size() ); if ( statisticCount < statistics.size() ) { statistics.resize( statisticCount ); } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( statistics ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getPipelineExecutableInternalRepresentationsKHR( const VULKAN_HPP_NAMESPACE::PipelineExecutableInfoKHR * pExecutableInfo, uint32_t * pInternalRepresentationCount, VULKAN_HPP_NAMESPACE::PipelineExecutableInternalRepresentationKHR * pInternalRepresentations, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetPipelineExecutableInternalRepresentationsKHR( static_cast( m_device ), reinterpret_cast( pExecutableInfo ), pInternalRepresentationCount, reinterpret_cast( pInternalRepresentations ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType< std::vector>::type Device::getPipelineExecutableInternalRepresentationsKHR( const VULKAN_HPP_NAMESPACE::PipelineExecutableInfoKHR & executableInfo, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPipelineExecutableInternalRepresentationsKHR && "Function requires " ); # endif std::vector internalRepresentations; uint32_t internalRepresentationCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkGetPipelineExecutableInternalRepresentationsKHR( m_device, reinterpret_cast( &executableInfo ), &internalRepresentationCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && internalRepresentationCount ) { internalRepresentations.resize( internalRepresentationCount ); result = static_cast( d.vkGetPipelineExecutableInternalRepresentationsKHR( m_device, reinterpret_cast( &executableInfo ), &internalRepresentationCount, reinterpret_cast( internalRepresentations.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getPipelineExecutableInternalRepresentationsKHR" ); VULKAN_HPP_ASSERT( internalRepresentationCount <= internalRepresentations.size() ); if ( internalRepresentationCount < internalRepresentations.size() ) { internalRepresentations.resize( internalRepresentationCount ); } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( internalRepresentations ) ); } template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType< std::vector>::type Device::getPipelineExecutableInternalRepresentationsKHR( const VULKAN_HPP_NAMESPACE::PipelineExecutableInfoKHR & executableInfo, PipelineExecutableInternalRepresentationKHRAllocator & pipelineExecutableInternalRepresentationKHRAllocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPipelineExecutableInternalRepresentationsKHR && "Function requires " ); # endif std::vector internalRepresentations( pipelineExecutableInternalRepresentationKHRAllocator ); uint32_t internalRepresentationCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkGetPipelineExecutableInternalRepresentationsKHR( m_device, reinterpret_cast( &executableInfo ), &internalRepresentationCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && internalRepresentationCount ) { internalRepresentations.resize( internalRepresentationCount ); result = static_cast( d.vkGetPipelineExecutableInternalRepresentationsKHR( m_device, reinterpret_cast( &executableInfo ), &internalRepresentationCount, reinterpret_cast( internalRepresentations.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getPipelineExecutableInternalRepresentationsKHR" ); VULKAN_HPP_ASSERT( internalRepresentationCount <= internalRepresentations.size() ); if ( internalRepresentationCount < internalRepresentations.size() ) { internalRepresentations.resize( internalRepresentationCount ); } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( internalRepresentations ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_EXT_host_image_copy === template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::copyMemoryToImageEXT( const VULKAN_HPP_NAMESPACE::CopyMemoryToImageInfo * pCopyMemoryToImageInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkCopyMemoryToImageEXT( static_cast( m_device ), reinterpret_cast( pCopyMemoryToImageInfo ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type Device::copyMemoryToImageEXT( const VULKAN_HPP_NAMESPACE::CopyMemoryToImageInfo & copyMemoryToImageInfo, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCopyMemoryToImageEXT && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCopyMemoryToImageEXT( m_device, reinterpret_cast( ©MemoryToImageInfo ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::copyMemoryToImageEXT" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::copyImageToMemoryEXT( const VULKAN_HPP_NAMESPACE::CopyImageToMemoryInfo * pCopyImageToMemoryInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkCopyImageToMemoryEXT( static_cast( m_device ), reinterpret_cast( pCopyImageToMemoryInfo ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type Device::copyImageToMemoryEXT( const VULKAN_HPP_NAMESPACE::CopyImageToMemoryInfo & copyImageToMemoryInfo, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCopyImageToMemoryEXT && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCopyImageToMemoryEXT( m_device, reinterpret_cast( ©ImageToMemoryInfo ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::copyImageToMemoryEXT" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::copyImageToImageEXT( const VULKAN_HPP_NAMESPACE::CopyImageToImageInfo * pCopyImageToImageInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkCopyImageToImageEXT( static_cast( m_device ), reinterpret_cast( pCopyImageToImageInfo ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type Device::copyImageToImageEXT( const VULKAN_HPP_NAMESPACE::CopyImageToImageInfo & copyImageToImageInfo, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCopyImageToImageEXT && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCopyImageToImageEXT( m_device, reinterpret_cast( ©ImageToImageInfo ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::copyImageToImageEXT" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::transitionImageLayoutEXT( uint32_t transitionCount, const VULKAN_HPP_NAMESPACE::HostImageLayoutTransitionInfo * pTransitions, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkTransitionImageLayoutEXT( static_cast( m_device ), transitionCount, reinterpret_cast( pTransitions ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type Device::transitionImageLayoutEXT( VULKAN_HPP_NAMESPACE::ArrayProxy const & transitions, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkTransitionImageLayoutEXT && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkTransitionImageLayoutEXT( m_device, transitions.size(), reinterpret_cast( transitions.data() ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::transitionImageLayoutEXT" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::getImageSubresourceLayout2EXT( VULKAN_HPP_NAMESPACE::Image image, const VULKAN_HPP_NAMESPACE::ImageSubresource2 * pSubresource, VULKAN_HPP_NAMESPACE::SubresourceLayout2 * pLayout, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkGetImageSubresourceLayout2EXT( static_cast( m_device ), static_cast( image ), reinterpret_cast( pSubresource ), reinterpret_cast( pLayout ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::SubresourceLayout2 Device::getImageSubresourceLayout2EXT( VULKAN_HPP_NAMESPACE::Image image, const VULKAN_HPP_NAMESPACE::ImageSubresource2 & subresource, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetImageSubresourceLayout2EXT && "Function requires or or or " ); # endif VULKAN_HPP_NAMESPACE::SubresourceLayout2 layout; d.vkGetImageSubresourceLayout2EXT( m_device, static_cast( image ), reinterpret_cast( &subresource ), reinterpret_cast( &layout ) ); return layout; } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::StructureChain Device::getImageSubresourceLayout2EXT( VULKAN_HPP_NAMESPACE::Image image, const VULKAN_HPP_NAMESPACE::ImageSubresource2 & subresource, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetImageSubresourceLayout2EXT && "Function requires or or or " ); # endif VULKAN_HPP_NAMESPACE::StructureChain structureChain; VULKAN_HPP_NAMESPACE::SubresourceLayout2 & layout = structureChain.template get(); d.vkGetImageSubresourceLayout2EXT( m_device, static_cast( image ), reinterpret_cast( &subresource ), reinterpret_cast( &layout ) ); return structureChain; } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_KHR_map_memory2 === template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::mapMemory2KHR( const VULKAN_HPP_NAMESPACE::MemoryMapInfo * pMemoryMapInfo, void ** ppData, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkMapMemory2KHR( static_cast( m_device ), reinterpret_cast( pMemoryMapInfo ), ppData ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::mapMemory2KHR( const VULKAN_HPP_NAMESPACE::MemoryMapInfo & memoryMapInfo, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkMapMemory2KHR && "Function requires or " ); # endif void * pData; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkMapMemory2KHR( m_device, reinterpret_cast( &memoryMapInfo ), &pData ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::mapMemory2KHR" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( pData ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::unmapMemory2KHR( const VULKAN_HPP_NAMESPACE::MemoryUnmapInfo * pMemoryUnmapInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkUnmapMemory2KHR( static_cast( m_device ), reinterpret_cast( pMemoryUnmapInfo ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE typename ResultValueType::type Device::unmapMemory2KHR( const VULKAN_HPP_NAMESPACE::MemoryUnmapInfo & memoryUnmapInfo, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkUnmapMemory2KHR && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkUnmapMemory2KHR( m_device, reinterpret_cast( &memoryUnmapInfo ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::unmapMemory2KHR" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_EXT_swapchain_maintenance1 === template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::releaseSwapchainImagesEXT( const VULKAN_HPP_NAMESPACE::ReleaseSwapchainImagesInfoEXT * pReleaseInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkReleaseSwapchainImagesEXT( static_cast( m_device ), reinterpret_cast( pReleaseInfo ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE typename ResultValueType::type Device::releaseSwapchainImagesEXT( const VULKAN_HPP_NAMESPACE::ReleaseSwapchainImagesInfoEXT & releaseInfo, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkReleaseSwapchainImagesEXT && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkReleaseSwapchainImagesEXT( m_device, reinterpret_cast( &releaseInfo ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::releaseSwapchainImagesEXT" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_NV_device_generated_commands === template VULKAN_HPP_INLINE void Device::getGeneratedCommandsMemoryRequirementsNV( const VULKAN_HPP_NAMESPACE::GeneratedCommandsMemoryRequirementsInfoNV * pInfo, VULKAN_HPP_NAMESPACE::MemoryRequirements2 * pMemoryRequirements, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkGetGeneratedCommandsMemoryRequirementsNV( static_cast( m_device ), reinterpret_cast( pInfo ), reinterpret_cast( pMemoryRequirements ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MemoryRequirements2 Device::getGeneratedCommandsMemoryRequirementsNV( const VULKAN_HPP_NAMESPACE::GeneratedCommandsMemoryRequirementsInfoNV & info, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetGeneratedCommandsMemoryRequirementsNV && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::MemoryRequirements2 memoryRequirements; d.vkGetGeneratedCommandsMemoryRequirementsNV( m_device, reinterpret_cast( &info ), reinterpret_cast( &memoryRequirements ) ); return memoryRequirements; } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::StructureChain Device::getGeneratedCommandsMemoryRequirementsNV( const VULKAN_HPP_NAMESPACE::GeneratedCommandsMemoryRequirementsInfoNV & info, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetGeneratedCommandsMemoryRequirementsNV && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::StructureChain structureChain; VULKAN_HPP_NAMESPACE::MemoryRequirements2 & memoryRequirements = structureChain.template get(); d.vkGetGeneratedCommandsMemoryRequirementsNV( m_device, reinterpret_cast( &info ), reinterpret_cast( &memoryRequirements ) ); return structureChain; } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::preprocessGeneratedCommandsNV( const VULKAN_HPP_NAMESPACE::GeneratedCommandsInfoNV * pGeneratedCommandsInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdPreprocessGeneratedCommandsNV( static_cast( m_commandBuffer ), reinterpret_cast( pGeneratedCommandsInfo ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::preprocessGeneratedCommandsNV( const VULKAN_HPP_NAMESPACE::GeneratedCommandsInfoNV & generatedCommandsInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdPreprocessGeneratedCommandsNV && "Function requires " ); # endif d.vkCmdPreprocessGeneratedCommandsNV( m_commandBuffer, reinterpret_cast( &generatedCommandsInfo ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::executeGeneratedCommandsNV( VULKAN_HPP_NAMESPACE::Bool32 isPreprocessed, const VULKAN_HPP_NAMESPACE::GeneratedCommandsInfoNV * pGeneratedCommandsInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdExecuteGeneratedCommandsNV( static_cast( m_commandBuffer ), static_cast( isPreprocessed ), reinterpret_cast( pGeneratedCommandsInfo ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::executeGeneratedCommandsNV( VULKAN_HPP_NAMESPACE::Bool32 isPreprocessed, const VULKAN_HPP_NAMESPACE::GeneratedCommandsInfoNV & generatedCommandsInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdExecuteGeneratedCommandsNV && "Function requires " ); # endif d.vkCmdExecuteGeneratedCommandsNV( m_commandBuffer, static_cast( isPreprocessed ), reinterpret_cast( &generatedCommandsInfo ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::bindPipelineShaderGroupNV( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint, VULKAN_HPP_NAMESPACE::Pipeline pipeline, uint32_t groupIndex, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdBindPipelineShaderGroupNV( static_cast( m_commandBuffer ), static_cast( pipelineBindPoint ), static_cast( pipeline ), groupIndex ); } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::createIndirectCommandsLayoutNV( const VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutCreateInfoNV * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNV * pIndirectCommandsLayout, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkCreateIndirectCommandsLayoutNV( static_cast( m_device ), reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pIndirectCommandsLayout ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::createIndirectCommandsLayoutNV( const VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutCreateInfoNV & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateIndirectCommandsLayoutNV && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNV indirectCommandsLayout; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateIndirectCommandsLayoutNV( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &indirectCommandsLayout ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createIndirectCommandsLayoutNV" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( indirectCommandsLayout ) ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::createIndirectCommandsLayoutNVUnique( const VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutCreateInfoNV & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateIndirectCommandsLayoutNV && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNV indirectCommandsLayout; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateIndirectCommandsLayoutNV( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &indirectCommandsLayout ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createIndirectCommandsLayoutNVUnique" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, UniqueHandle( indirectCommandsLayout, detail::ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::destroyIndirectCommandsLayoutNV( VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNV indirectCommandsLayout, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDestroyIndirectCommandsLayoutNV( static_cast( m_device ), static_cast( indirectCommandsLayout ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::destroyIndirectCommandsLayoutNV( VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNV indirectCommandsLayout, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDestroyIndirectCommandsLayoutNV && "Function requires " ); # endif d.vkDestroyIndirectCommandsLayoutNV( m_device, static_cast( indirectCommandsLayout ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNV indirectCommandsLayout, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDestroyIndirectCommandsLayoutNV( static_cast( m_device ), static_cast( indirectCommandsLayout ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNV indirectCommandsLayout, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDestroyIndirectCommandsLayoutNV && "Function requires " ); # endif d.vkDestroyIndirectCommandsLayoutNV( m_device, static_cast( indirectCommandsLayout ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_EXT_depth_bias_control === template VULKAN_HPP_INLINE void CommandBuffer::setDepthBias2EXT( const VULKAN_HPP_NAMESPACE::DepthBiasInfoEXT * pDepthBiasInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetDepthBias2EXT( static_cast( m_commandBuffer ), reinterpret_cast( pDepthBiasInfo ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::setDepthBias2EXT( const VULKAN_HPP_NAMESPACE::DepthBiasInfoEXT & depthBiasInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdSetDepthBias2EXT && "Function requires " ); # endif d.vkCmdSetDepthBias2EXT( m_commandBuffer, reinterpret_cast( &depthBiasInfo ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_EXT_acquire_drm_display === #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result PhysicalDevice::acquireDrmDisplayEXT( int32_t drmFd, VULKAN_HPP_NAMESPACE::DisplayKHR display, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkAcquireDrmDisplayEXT( static_cast( m_physicalDevice ), drmFd, static_cast( display ) ) ); } #else template VULKAN_HPP_INLINE typename ResultValueType::type PhysicalDevice::acquireDrmDisplayEXT( int32_t drmFd, VULKAN_HPP_NAMESPACE::DisplayKHR display, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkAcquireDrmDisplayEXT && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkAcquireDrmDisplayEXT( m_physicalDevice, drmFd, static_cast( display ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::acquireDrmDisplayEXT" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result PhysicalDevice::getDrmDisplayEXT( int32_t drmFd, uint32_t connectorId, VULKAN_HPP_NAMESPACE::DisplayKHR * display, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetDrmDisplayEXT( static_cast( m_physicalDevice ), drmFd, connectorId, reinterpret_cast( display ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type PhysicalDevice::getDrmDisplayEXT( int32_t drmFd, uint32_t connectorId, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetDrmDisplayEXT && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::DisplayKHR display; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetDrmDisplayEXT( m_physicalDevice, drmFd, connectorId, reinterpret_cast( &display ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDrmDisplayEXT" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( display ) ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getDrmDisplayEXTUnique( int32_t drmFd, uint32_t connectorId, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetDrmDisplayEXT && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::DisplayKHR display; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetDrmDisplayEXT( m_physicalDevice, drmFd, connectorId, reinterpret_cast( &display ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDrmDisplayEXTUnique" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, UniqueHandle( display, detail::ObjectRelease( *this, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_EXT_private_data === template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::createPrivateDataSlotEXT( const VULKAN_HPP_NAMESPACE::PrivateDataSlotCreateInfo * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::PrivateDataSlot * pPrivateDataSlot, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkCreatePrivateDataSlotEXT( static_cast( m_device ), reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pPrivateDataSlot ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::createPrivateDataSlotEXT( const VULKAN_HPP_NAMESPACE::PrivateDataSlotCreateInfo & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreatePrivateDataSlotEXT && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreatePrivateDataSlotEXT( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &privateDataSlot ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createPrivateDataSlotEXT" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( privateDataSlot ) ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::createPrivateDataSlotEXTUnique( const VULKAN_HPP_NAMESPACE::PrivateDataSlotCreateInfo & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreatePrivateDataSlotEXT && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreatePrivateDataSlotEXT( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &privateDataSlot ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createPrivateDataSlotEXTUnique" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, UniqueHandle( privateDataSlot, detail::ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::destroyPrivateDataSlotEXT( VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDestroyPrivateDataSlotEXT( static_cast( m_device ), static_cast( privateDataSlot ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::destroyPrivateDataSlotEXT( VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDestroyPrivateDataSlotEXT && "Function requires or " ); # endif d.vkDestroyPrivateDataSlotEXT( m_device, static_cast( privateDataSlot ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::setPrivateDataEXT( VULKAN_HPP_NAMESPACE::ObjectType objectType_, uint64_t objectHandle, VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot, uint64_t data, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkSetPrivateDataEXT( static_cast( m_device ), static_cast( objectType_ ), objectHandle, static_cast( privateDataSlot ), data ) ); } #else template VULKAN_HPP_INLINE typename ResultValueType::type Device::setPrivateDataEXT( VULKAN_HPP_NAMESPACE::ObjectType objectType_, uint64_t objectHandle, VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot, uint64_t data, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkSetPrivateDataEXT && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkSetPrivateDataEXT( m_device, static_cast( objectType_ ), objectHandle, static_cast( privateDataSlot ), data ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::setPrivateDataEXT" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ template VULKAN_HPP_INLINE void Device::getPrivateDataEXT( VULKAN_HPP_NAMESPACE::ObjectType objectType_, uint64_t objectHandle, VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot, uint64_t * pData, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkGetPrivateDataEXT( static_cast( m_device ), static_cast( objectType_ ), objectHandle, static_cast( privateDataSlot ), pData ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE uint64_t Device::getPrivateDataEXT( VULKAN_HPP_NAMESPACE::ObjectType objectType_, uint64_t objectHandle, VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPrivateDataEXT && "Function requires or " ); # endif uint64_t data; d.vkGetPrivateDataEXT( m_device, static_cast( objectType_ ), objectHandle, static_cast( privateDataSlot ), &data ); return data; } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_KHR_video_encode_queue === template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result PhysicalDevice::getVideoEncodeQualityLevelPropertiesKHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceVideoEncodeQualityLevelInfoKHR * pQualityLevelInfo, VULKAN_HPP_NAMESPACE::VideoEncodeQualityLevelPropertiesKHR * pQualityLevelProperties, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR( static_cast( m_physicalDevice ), reinterpret_cast( pQualityLevelInfo ), reinterpret_cast( pQualityLevelProperties ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type PhysicalDevice::getVideoEncodeQualityLevelPropertiesKHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceVideoEncodeQualityLevelInfoKHR & qualityLevelInfo, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::VideoEncodeQualityLevelPropertiesKHR qualityLevelProperties; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR( m_physicalDevice, reinterpret_cast( &qualityLevelInfo ), reinterpret_cast( &qualityLevelProperties ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getVideoEncodeQualityLevelPropertiesKHR" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( qualityLevelProperties ) ); } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getVideoEncodeQualityLevelPropertiesKHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceVideoEncodeQualityLevelInfoKHR & qualityLevelInfo, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR && "Function requires " ); # endif StructureChain structureChain; VULKAN_HPP_NAMESPACE::VideoEncodeQualityLevelPropertiesKHR & qualityLevelProperties = structureChain.template get(); VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR( m_physicalDevice, reinterpret_cast( &qualityLevelInfo ), reinterpret_cast( &qualityLevelProperties ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getVideoEncodeQualityLevelPropertiesKHR" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( structureChain ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getEncodedVideoSessionParametersKHR( const VULKAN_HPP_NAMESPACE::VideoEncodeSessionParametersGetInfoKHR * pVideoSessionParametersInfo, VULKAN_HPP_NAMESPACE::VideoEncodeSessionParametersFeedbackInfoKHR * pFeedbackInfo, size_t * pDataSize, void * pData, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetEncodedVideoSessionParametersKHR( static_cast( m_device ), reinterpret_cast( pVideoSessionParametersInfo ), reinterpret_cast( pFeedbackInfo ), pDataSize, pData ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>>::type Device::getEncodedVideoSessionParametersKHR( const VULKAN_HPP_NAMESPACE::VideoEncodeSessionParametersGetInfoKHR & videoSessionParametersInfo, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetEncodedVideoSessionParametersKHR && "Function requires " ); # endif std::pair> data_; VULKAN_HPP_NAMESPACE::VideoEncodeSessionParametersFeedbackInfoKHR & feedbackInfo = data_.first; std::vector & data = data_.second; size_t dataSize; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkGetEncodedVideoSessionParametersKHR( m_device, reinterpret_cast( &videoSessionParametersInfo ), reinterpret_cast( &feedbackInfo ), &dataSize, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && dataSize ) { data.resize( dataSize ); result = static_cast( d.vkGetEncodedVideoSessionParametersKHR( m_device, reinterpret_cast( &videoSessionParametersInfo ), reinterpret_cast( &feedbackInfo ), &dataSize, reinterpret_cast( data.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getEncodedVideoSessionParametersKHR" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( data_ ) ); } template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>>::type Device::getEncodedVideoSessionParametersKHR( const VULKAN_HPP_NAMESPACE::VideoEncodeSessionParametersGetInfoKHR & videoSessionParametersInfo, Uint8_tAllocator & uint8_tAllocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetEncodedVideoSessionParametersKHR && "Function requires " ); # endif std::pair> data_( std::piecewise_construct, std::forward_as_tuple(), std::forward_as_tuple( uint8_tAllocator ) ); VULKAN_HPP_NAMESPACE::VideoEncodeSessionParametersFeedbackInfoKHR & feedbackInfo = data_.first; std::vector & data = data_.second; size_t dataSize; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkGetEncodedVideoSessionParametersKHR( m_device, reinterpret_cast( &videoSessionParametersInfo ), reinterpret_cast( &feedbackInfo ), &dataSize, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && dataSize ) { data.resize( dataSize ); result = static_cast( d.vkGetEncodedVideoSessionParametersKHR( m_device, reinterpret_cast( &videoSessionParametersInfo ), reinterpret_cast( &feedbackInfo ), &dataSize, reinterpret_cast( data.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getEncodedVideoSessionParametersKHR" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( data_ ) ); } template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType, std::vector>>::type Device::getEncodedVideoSessionParametersKHR( const VULKAN_HPP_NAMESPACE::VideoEncodeSessionParametersGetInfoKHR & videoSessionParametersInfo, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetEncodedVideoSessionParametersKHR && "Function requires " ); # endif std::pair, std::vector> data_; VULKAN_HPP_NAMESPACE::VideoEncodeSessionParametersFeedbackInfoKHR & feedbackInfo = data_.first.template get(); std::vector & data = data_.second; size_t dataSize; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkGetEncodedVideoSessionParametersKHR( m_device, reinterpret_cast( &videoSessionParametersInfo ), reinterpret_cast( &feedbackInfo ), &dataSize, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && dataSize ) { data.resize( dataSize ); result = static_cast( d.vkGetEncodedVideoSessionParametersKHR( m_device, reinterpret_cast( &videoSessionParametersInfo ), reinterpret_cast( &feedbackInfo ), &dataSize, reinterpret_cast( data.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getEncodedVideoSessionParametersKHR" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( data_ ) ); } template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType, std::vector>>::type Device::getEncodedVideoSessionParametersKHR( const VULKAN_HPP_NAMESPACE::VideoEncodeSessionParametersGetInfoKHR & videoSessionParametersInfo, Uint8_tAllocator & uint8_tAllocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetEncodedVideoSessionParametersKHR && "Function requires " ); # endif std::pair, std::vector> data_( std::piecewise_construct, std::forward_as_tuple(), std::forward_as_tuple( uint8_tAllocator ) ); VULKAN_HPP_NAMESPACE::VideoEncodeSessionParametersFeedbackInfoKHR & feedbackInfo = data_.first.template get(); std::vector & data = data_.second; size_t dataSize; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkGetEncodedVideoSessionParametersKHR( m_device, reinterpret_cast( &videoSessionParametersInfo ), reinterpret_cast( &feedbackInfo ), &dataSize, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && dataSize ) { data.resize( dataSize ); result = static_cast( d.vkGetEncodedVideoSessionParametersKHR( m_device, reinterpret_cast( &videoSessionParametersInfo ), reinterpret_cast( &feedbackInfo ), &dataSize, reinterpret_cast( data.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getEncodedVideoSessionParametersKHR" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( data_ ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::encodeVideoKHR( const VULKAN_HPP_NAMESPACE::VideoEncodeInfoKHR * pEncodeInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdEncodeVideoKHR( static_cast( m_commandBuffer ), reinterpret_cast( pEncodeInfo ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::encodeVideoKHR( const VULKAN_HPP_NAMESPACE::VideoEncodeInfoKHR & encodeInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdEncodeVideoKHR && "Function requires " ); # endif d.vkCmdEncodeVideoKHR( m_commandBuffer, reinterpret_cast( &encodeInfo ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #if defined( VK_ENABLE_BETA_EXTENSIONS ) //=== VK_NV_cuda_kernel_launch === template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::createCudaModuleNV( const VULKAN_HPP_NAMESPACE::CudaModuleCreateInfoNV * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::CudaModuleNV * pModule, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkCreateCudaModuleNV( static_cast( m_device ), reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pModule ) ) ); } # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::createCudaModuleNV( const VULKAN_HPP_NAMESPACE::CudaModuleCreateInfoNV & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateCudaModuleNV && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::CudaModuleNV module; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateCudaModuleNV( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &module ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createCudaModuleNV" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( module ) ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::createCudaModuleNVUnique( const VULKAN_HPP_NAMESPACE::CudaModuleCreateInfoNV & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateCudaModuleNV && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::CudaModuleNV module; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateCudaModuleNV( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &module ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createCudaModuleNVUnique" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, UniqueHandle( module, detail::ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getCudaModuleCacheNV( VULKAN_HPP_NAMESPACE::CudaModuleNV module, size_t * pCacheSize, void * pCacheData, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetCudaModuleCacheNV( static_cast( m_device ), static_cast( module ), pCacheSize, pCacheData ) ); } # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::getCudaModuleCacheNV( VULKAN_HPP_NAMESPACE::CudaModuleNV module, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetCudaModuleCacheNV && "Function requires " ); # endif std::vector cacheData; size_t cacheSize; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkGetCudaModuleCacheNV( m_device, static_cast( module ), &cacheSize, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && cacheSize ) { cacheData.resize( cacheSize ); result = static_cast( d.vkGetCudaModuleCacheNV( m_device, static_cast( module ), &cacheSize, reinterpret_cast( cacheData.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getCudaModuleCacheNV" ); VULKAN_HPP_ASSERT( cacheSize <= cacheData.size() ); if ( cacheSize < cacheData.size() ) { cacheData.resize( cacheSize ); } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( cacheData ) ); } template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::getCudaModuleCacheNV( VULKAN_HPP_NAMESPACE::CudaModuleNV module, Uint8_tAllocator & uint8_tAllocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetCudaModuleCacheNV && "Function requires " ); # endif std::vector cacheData( uint8_tAllocator ); size_t cacheSize; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkGetCudaModuleCacheNV( m_device, static_cast( module ), &cacheSize, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && cacheSize ) { cacheData.resize( cacheSize ); result = static_cast( d.vkGetCudaModuleCacheNV( m_device, static_cast( module ), &cacheSize, reinterpret_cast( cacheData.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getCudaModuleCacheNV" ); VULKAN_HPP_ASSERT( cacheSize <= cacheData.size() ); if ( cacheSize < cacheData.size() ) { cacheData.resize( cacheSize ); } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( cacheData ) ); } # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::createCudaFunctionNV( const VULKAN_HPP_NAMESPACE::CudaFunctionCreateInfoNV * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::CudaFunctionNV * pFunction, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkCreateCudaFunctionNV( static_cast( m_device ), reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pFunction ) ) ); } # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::createCudaFunctionNV( const VULKAN_HPP_NAMESPACE::CudaFunctionCreateInfoNV & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateCudaFunctionNV && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::CudaFunctionNV function; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateCudaFunctionNV( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &function ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createCudaFunctionNV" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( function ) ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::createCudaFunctionNVUnique( const VULKAN_HPP_NAMESPACE::CudaFunctionCreateInfoNV & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateCudaFunctionNV && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::CudaFunctionNV function; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateCudaFunctionNV( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &function ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createCudaFunctionNVUnique" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, UniqueHandle( function, detail::ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::destroyCudaModuleNV( VULKAN_HPP_NAMESPACE::CudaModuleNV module, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDestroyCudaModuleNV( static_cast( m_device ), static_cast( module ), reinterpret_cast( pAllocator ) ); } # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::destroyCudaModuleNV( VULKAN_HPP_NAMESPACE::CudaModuleNV module, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDestroyCudaModuleNV && "Function requires " ); # endif d.vkDestroyCudaModuleNV( m_device, static_cast( module ), reinterpret_cast( static_cast( allocator ) ) ); } # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::CudaModuleNV module, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDestroyCudaModuleNV( static_cast( m_device ), static_cast( module ), reinterpret_cast( pAllocator ) ); } # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::CudaModuleNV module, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDestroyCudaModuleNV && "Function requires " ); # endif d.vkDestroyCudaModuleNV( m_device, static_cast( module ), reinterpret_cast( static_cast( allocator ) ) ); } # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::destroyCudaFunctionNV( VULKAN_HPP_NAMESPACE::CudaFunctionNV function, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDestroyCudaFunctionNV( static_cast( m_device ), static_cast( function ), reinterpret_cast( pAllocator ) ); } # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::destroyCudaFunctionNV( VULKAN_HPP_NAMESPACE::CudaFunctionNV function, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDestroyCudaFunctionNV && "Function requires " ); # endif d.vkDestroyCudaFunctionNV( m_device, static_cast( function ), reinterpret_cast( static_cast( allocator ) ) ); } # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::CudaFunctionNV function, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDestroyCudaFunctionNV( static_cast( m_device ), static_cast( function ), reinterpret_cast( pAllocator ) ); } # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::CudaFunctionNV function, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDestroyCudaFunctionNV && "Function requires " ); # endif d.vkDestroyCudaFunctionNV( m_device, static_cast( function ), reinterpret_cast( static_cast( allocator ) ) ); } # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::cudaLaunchKernelNV( const VULKAN_HPP_NAMESPACE::CudaLaunchInfoNV * pLaunchInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdCudaLaunchKernelNV( static_cast( m_commandBuffer ), reinterpret_cast( pLaunchInfo ) ); } # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::cudaLaunchKernelNV( const VULKAN_HPP_NAMESPACE::CudaLaunchInfoNV & launchInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdCudaLaunchKernelNV && "Function requires " ); # endif d.vkCmdCudaLaunchKernelNV( m_commandBuffer, reinterpret_cast( &launchInfo ) ); } # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #endif /*VK_ENABLE_BETA_EXTENSIONS*/ #if defined( VK_USE_PLATFORM_METAL_EXT ) //=== VK_EXT_metal_objects === template VULKAN_HPP_INLINE void Device::exportMetalObjectsEXT( VULKAN_HPP_NAMESPACE::ExportMetalObjectsInfoEXT * pMetalObjectsInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkExportMetalObjectsEXT( static_cast( m_device ), reinterpret_cast( pMetalObjectsInfo ) ); } # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::ExportMetalObjectsInfoEXT Device::exportMetalObjectsEXT( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkExportMetalObjectsEXT && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::ExportMetalObjectsInfoEXT metalObjectsInfo; d.vkExportMetalObjectsEXT( m_device, reinterpret_cast( &metalObjectsInfo ) ); return metalObjectsInfo; } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::StructureChain Device::exportMetalObjectsEXT( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkExportMetalObjectsEXT && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::StructureChain structureChain; VULKAN_HPP_NAMESPACE::ExportMetalObjectsInfoEXT & metalObjectsInfo = structureChain.template get(); d.vkExportMetalObjectsEXT( m_device, reinterpret_cast( &metalObjectsInfo ) ); return structureChain; } # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #endif /*VK_USE_PLATFORM_METAL_EXT*/ //=== VK_KHR_synchronization2 === template VULKAN_HPP_INLINE void CommandBuffer::setEvent2KHR( VULKAN_HPP_NAMESPACE::Event event, const VULKAN_HPP_NAMESPACE::DependencyInfo * pDependencyInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetEvent2KHR( static_cast( m_commandBuffer ), static_cast( event ), reinterpret_cast( pDependencyInfo ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::setEvent2KHR( VULKAN_HPP_NAMESPACE::Event event, const VULKAN_HPP_NAMESPACE::DependencyInfo & dependencyInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdSetEvent2KHR && "Function requires or " ); # endif d.vkCmdSetEvent2KHR( m_commandBuffer, static_cast( event ), reinterpret_cast( &dependencyInfo ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::resetEvent2KHR( VULKAN_HPP_NAMESPACE::Event event, VULKAN_HPP_NAMESPACE::PipelineStageFlags2 stageMask, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdResetEvent2KHR( static_cast( m_commandBuffer ), static_cast( event ), static_cast( stageMask ) ); } template VULKAN_HPP_INLINE void CommandBuffer::waitEvents2KHR( uint32_t eventCount, const VULKAN_HPP_NAMESPACE::Event * pEvents, const VULKAN_HPP_NAMESPACE::DependencyInfo * pDependencyInfos, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdWaitEvents2KHR( static_cast( m_commandBuffer ), eventCount, reinterpret_cast( pEvents ), reinterpret_cast( pDependencyInfos ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::waitEvents2KHR( VULKAN_HPP_NAMESPACE::ArrayProxy const & events, VULKAN_HPP_NAMESPACE::ArrayProxy const & dependencyInfos, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdWaitEvents2KHR && "Function requires or " ); # endif # ifdef VULKAN_HPP_NO_EXCEPTIONS VULKAN_HPP_ASSERT( events.size() == dependencyInfos.size() ); # else if ( events.size() != dependencyInfos.size() ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::waitEvents2KHR: events.size() != dependencyInfos.size()" ); } # endif /*VULKAN_HPP_NO_EXCEPTIONS*/ d.vkCmdWaitEvents2KHR( m_commandBuffer, events.size(), reinterpret_cast( events.data() ), reinterpret_cast( dependencyInfos.data() ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::pipelineBarrier2KHR( const VULKAN_HPP_NAMESPACE::DependencyInfo * pDependencyInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdPipelineBarrier2KHR( static_cast( m_commandBuffer ), reinterpret_cast( pDependencyInfo ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::pipelineBarrier2KHR( const VULKAN_HPP_NAMESPACE::DependencyInfo & dependencyInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdPipelineBarrier2KHR && "Function requires or " ); # endif d.vkCmdPipelineBarrier2KHR( m_commandBuffer, reinterpret_cast( &dependencyInfo ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::writeTimestamp2KHR( VULKAN_HPP_NAMESPACE::PipelineStageFlags2 stage, VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t query, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdWriteTimestamp2KHR( static_cast( m_commandBuffer ), static_cast( stage ), static_cast( queryPool ), query ); } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Queue::submit2KHR( uint32_t submitCount, const VULKAN_HPP_NAMESPACE::SubmitInfo2 * pSubmits, VULKAN_HPP_NAMESPACE::Fence fence, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkQueueSubmit2KHR( static_cast( m_queue ), submitCount, reinterpret_cast( pSubmits ), static_cast( fence ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type Queue::submit2KHR( VULKAN_HPP_NAMESPACE::ArrayProxy const & submits, VULKAN_HPP_NAMESPACE::Fence fence, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkQueueSubmit2KHR && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkQueueSubmit2KHR( m_queue, submits.size(), reinterpret_cast( submits.data() ), static_cast( fence ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Queue::submit2KHR" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_EXT_descriptor_buffer === template VULKAN_HPP_INLINE void Device::getDescriptorSetLayoutSizeEXT( VULKAN_HPP_NAMESPACE::DescriptorSetLayout layout, VULKAN_HPP_NAMESPACE::DeviceSize * pLayoutSizeInBytes, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkGetDescriptorSetLayoutSizeEXT( static_cast( m_device ), static_cast( layout ), reinterpret_cast( pLayoutSizeInBytes ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::DeviceSize Device::getDescriptorSetLayoutSizeEXT( VULKAN_HPP_NAMESPACE::DescriptorSetLayout layout, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetDescriptorSetLayoutSizeEXT && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::DeviceSize layoutSizeInBytes; d.vkGetDescriptorSetLayoutSizeEXT( m_device, static_cast( layout ), reinterpret_cast( &layoutSizeInBytes ) ); return layoutSizeInBytes; } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::getDescriptorSetLayoutBindingOffsetEXT( VULKAN_HPP_NAMESPACE::DescriptorSetLayout layout, uint32_t binding, VULKAN_HPP_NAMESPACE::DeviceSize * pOffset, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkGetDescriptorSetLayoutBindingOffsetEXT( static_cast( m_device ), static_cast( layout ), binding, reinterpret_cast( pOffset ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::DeviceSize Device::getDescriptorSetLayoutBindingOffsetEXT( VULKAN_HPP_NAMESPACE::DescriptorSetLayout layout, uint32_t binding, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetDescriptorSetLayoutBindingOffsetEXT && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::DeviceSize offset; d.vkGetDescriptorSetLayoutBindingOffsetEXT( m_device, static_cast( layout ), binding, reinterpret_cast( &offset ) ); return offset; } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::getDescriptorEXT( const VULKAN_HPP_NAMESPACE::DescriptorGetInfoEXT * pDescriptorInfo, size_t dataSize, void * pDescriptor, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkGetDescriptorEXT( static_cast( m_device ), reinterpret_cast( pDescriptorInfo ), dataSize, pDescriptor ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::getDescriptorEXT( const VULKAN_HPP_NAMESPACE::DescriptorGetInfoEXT & descriptorInfo, size_t dataSize, void * pDescriptor, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetDescriptorEXT && "Function requires " ); # endif d.vkGetDescriptorEXT( m_device, reinterpret_cast( &descriptorInfo ), dataSize, pDescriptor ); } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE DescriptorType Device::getDescriptorEXT( const VULKAN_HPP_NAMESPACE::DescriptorGetInfoEXT & descriptorInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetDescriptorEXT && "Function requires " ); # endif DescriptorType descriptor; d.vkGetDescriptorEXT( m_device, reinterpret_cast( &descriptorInfo ), sizeof( DescriptorType ), reinterpret_cast( &descriptor ) ); return descriptor; } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::bindDescriptorBuffersEXT( uint32_t bufferCount, const VULKAN_HPP_NAMESPACE::DescriptorBufferBindingInfoEXT * pBindingInfos, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdBindDescriptorBuffersEXT( static_cast( m_commandBuffer ), bufferCount, reinterpret_cast( pBindingInfos ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::bindDescriptorBuffersEXT( VULKAN_HPP_NAMESPACE::ArrayProxy const & bindingInfos, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdBindDescriptorBuffersEXT && "Function requires " ); # endif d.vkCmdBindDescriptorBuffersEXT( m_commandBuffer, bindingInfos.size(), reinterpret_cast( bindingInfos.data() ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::setDescriptorBufferOffsetsEXT( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint, VULKAN_HPP_NAMESPACE::PipelineLayout layout, uint32_t firstSet, uint32_t setCount, const uint32_t * pBufferIndices, const VULKAN_HPP_NAMESPACE::DeviceSize * pOffsets, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetDescriptorBufferOffsetsEXT( static_cast( m_commandBuffer ), static_cast( pipelineBindPoint ), static_cast( layout ), firstSet, setCount, pBufferIndices, reinterpret_cast( pOffsets ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::setDescriptorBufferOffsetsEXT( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint, VULKAN_HPP_NAMESPACE::PipelineLayout layout, uint32_t firstSet, VULKAN_HPP_NAMESPACE::ArrayProxy const & bufferIndices, VULKAN_HPP_NAMESPACE::ArrayProxy const & offsets, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdSetDescriptorBufferOffsetsEXT && "Function requires " ); # endif # ifdef VULKAN_HPP_NO_EXCEPTIONS VULKAN_HPP_ASSERT( bufferIndices.size() == offsets.size() ); # else if ( bufferIndices.size() != offsets.size() ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::setDescriptorBufferOffsetsEXT: bufferIndices.size() != offsets.size()" ); } # endif /*VULKAN_HPP_NO_EXCEPTIONS*/ d.vkCmdSetDescriptorBufferOffsetsEXT( m_commandBuffer, static_cast( pipelineBindPoint ), static_cast( layout ), firstSet, bufferIndices.size(), bufferIndices.data(), reinterpret_cast( offsets.data() ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::bindDescriptorBufferEmbeddedSamplersEXT( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint, VULKAN_HPP_NAMESPACE::PipelineLayout layout, uint32_t set, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdBindDescriptorBufferEmbeddedSamplersEXT( static_cast( m_commandBuffer ), static_cast( pipelineBindPoint ), static_cast( layout ), set ); } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getBufferOpaqueCaptureDescriptorDataEXT( const VULKAN_HPP_NAMESPACE::BufferCaptureDescriptorDataInfoEXT * pInfo, void * pData, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetBufferOpaqueCaptureDescriptorDataEXT( static_cast( m_device ), reinterpret_cast( pInfo ), pData ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::getBufferOpaqueCaptureDescriptorDataEXT( const VULKAN_HPP_NAMESPACE::BufferCaptureDescriptorDataInfoEXT & info, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetBufferOpaqueCaptureDescriptorDataEXT && "Function requires " ); # endif DataType data; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetBufferOpaqueCaptureDescriptorDataEXT( m_device, reinterpret_cast( &info ), &data ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getBufferOpaqueCaptureDescriptorDataEXT" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( data ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getImageOpaqueCaptureDescriptorDataEXT( const VULKAN_HPP_NAMESPACE::ImageCaptureDescriptorDataInfoEXT * pInfo, void * pData, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetImageOpaqueCaptureDescriptorDataEXT( static_cast( m_device ), reinterpret_cast( pInfo ), pData ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::getImageOpaqueCaptureDescriptorDataEXT( const VULKAN_HPP_NAMESPACE::ImageCaptureDescriptorDataInfoEXT & info, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetImageOpaqueCaptureDescriptorDataEXT && "Function requires " ); # endif DataType data; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetImageOpaqueCaptureDescriptorDataEXT( m_device, reinterpret_cast( &info ), &data ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getImageOpaqueCaptureDescriptorDataEXT" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( data ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getImageViewOpaqueCaptureDescriptorDataEXT( const VULKAN_HPP_NAMESPACE::ImageViewCaptureDescriptorDataInfoEXT * pInfo, void * pData, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetImageViewOpaqueCaptureDescriptorDataEXT( static_cast( m_device ), reinterpret_cast( pInfo ), pData ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::getImageViewOpaqueCaptureDescriptorDataEXT( const VULKAN_HPP_NAMESPACE::ImageViewCaptureDescriptorDataInfoEXT & info, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetImageViewOpaqueCaptureDescriptorDataEXT && "Function requires " ); # endif DataType data; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetImageViewOpaqueCaptureDescriptorDataEXT( m_device, reinterpret_cast( &info ), &data ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getImageViewOpaqueCaptureDescriptorDataEXT" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( data ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getSamplerOpaqueCaptureDescriptorDataEXT( const VULKAN_HPP_NAMESPACE::SamplerCaptureDescriptorDataInfoEXT * pInfo, void * pData, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetSamplerOpaqueCaptureDescriptorDataEXT( static_cast( m_device ), reinterpret_cast( pInfo ), pData ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::getSamplerOpaqueCaptureDescriptorDataEXT( const VULKAN_HPP_NAMESPACE::SamplerCaptureDescriptorDataInfoEXT & info, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetSamplerOpaqueCaptureDescriptorDataEXT && "Function requires " ); # endif DataType data; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetSamplerOpaqueCaptureDescriptorDataEXT( m_device, reinterpret_cast( &info ), &data ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getSamplerOpaqueCaptureDescriptorDataEXT" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( data ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getAccelerationStructureOpaqueCaptureDescriptorDataEXT( const VULKAN_HPP_NAMESPACE::AccelerationStructureCaptureDescriptorDataInfoEXT * pInfo, void * pData, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT( static_cast( m_device ), reinterpret_cast( pInfo ), pData ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::getAccelerationStructureOpaqueCaptureDescriptorDataEXT( const VULKAN_HPP_NAMESPACE::AccelerationStructureCaptureDescriptorDataInfoEXT & info, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT && "Function requires " ); # endif DataType data; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT( m_device, reinterpret_cast( &info ), &data ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getAccelerationStructureOpaqueCaptureDescriptorDataEXT" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( data ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_NV_fragment_shading_rate_enums === template VULKAN_HPP_INLINE void CommandBuffer::setFragmentShadingRateEnumNV( VULKAN_HPP_NAMESPACE::FragmentShadingRateNV shadingRate, const VULKAN_HPP_NAMESPACE::FragmentShadingRateCombinerOpKHR combinerOps[2], Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetFragmentShadingRateEnumNV( static_cast( m_commandBuffer ), static_cast( shadingRate ), reinterpret_cast( combinerOps ) ); } //=== VK_EXT_mesh_shader === template VULKAN_HPP_INLINE void CommandBuffer::drawMeshTasksEXT( uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdDrawMeshTasksEXT( static_cast( m_commandBuffer ), groupCountX, groupCountY, groupCountZ ); } template VULKAN_HPP_INLINE void CommandBuffer::drawMeshTasksIndirectEXT( VULKAN_HPP_NAMESPACE::Buffer buffer, VULKAN_HPP_NAMESPACE::DeviceSize offset, uint32_t drawCount, uint32_t stride, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdDrawMeshTasksIndirectEXT( static_cast( m_commandBuffer ), static_cast( buffer ), static_cast( offset ), drawCount, stride ); } template VULKAN_HPP_INLINE void CommandBuffer::drawMeshTasksIndirectCountEXT( VULKAN_HPP_NAMESPACE::Buffer buffer, VULKAN_HPP_NAMESPACE::DeviceSize offset, VULKAN_HPP_NAMESPACE::Buffer countBuffer, VULKAN_HPP_NAMESPACE::DeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdDrawMeshTasksIndirectCountEXT( static_cast( m_commandBuffer ), static_cast( buffer ), static_cast( offset ), static_cast( countBuffer ), static_cast( countBufferOffset ), maxDrawCount, stride ); } //=== VK_KHR_copy_commands2 === template VULKAN_HPP_INLINE void CommandBuffer::copyBuffer2KHR( const VULKAN_HPP_NAMESPACE::CopyBufferInfo2 * pCopyBufferInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdCopyBuffer2KHR( static_cast( m_commandBuffer ), reinterpret_cast( pCopyBufferInfo ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::copyBuffer2KHR( const VULKAN_HPP_NAMESPACE::CopyBufferInfo2 & copyBufferInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdCopyBuffer2KHR && "Function requires or " ); # endif d.vkCmdCopyBuffer2KHR( m_commandBuffer, reinterpret_cast( ©BufferInfo ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::copyImage2KHR( const VULKAN_HPP_NAMESPACE::CopyImageInfo2 * pCopyImageInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdCopyImage2KHR( static_cast( m_commandBuffer ), reinterpret_cast( pCopyImageInfo ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::copyImage2KHR( const VULKAN_HPP_NAMESPACE::CopyImageInfo2 & copyImageInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdCopyImage2KHR && "Function requires or " ); # endif d.vkCmdCopyImage2KHR( m_commandBuffer, reinterpret_cast( ©ImageInfo ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::copyBufferToImage2KHR( const VULKAN_HPP_NAMESPACE::CopyBufferToImageInfo2 * pCopyBufferToImageInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdCopyBufferToImage2KHR( static_cast( m_commandBuffer ), reinterpret_cast( pCopyBufferToImageInfo ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::copyBufferToImage2KHR( const VULKAN_HPP_NAMESPACE::CopyBufferToImageInfo2 & copyBufferToImageInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdCopyBufferToImage2KHR && "Function requires or " ); # endif d.vkCmdCopyBufferToImage2KHR( m_commandBuffer, reinterpret_cast( ©BufferToImageInfo ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::copyImageToBuffer2KHR( const VULKAN_HPP_NAMESPACE::CopyImageToBufferInfo2 * pCopyImageToBufferInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdCopyImageToBuffer2KHR( static_cast( m_commandBuffer ), reinterpret_cast( pCopyImageToBufferInfo ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::copyImageToBuffer2KHR( const VULKAN_HPP_NAMESPACE::CopyImageToBufferInfo2 & copyImageToBufferInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdCopyImageToBuffer2KHR && "Function requires or " ); # endif d.vkCmdCopyImageToBuffer2KHR( m_commandBuffer, reinterpret_cast( ©ImageToBufferInfo ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::blitImage2KHR( const VULKAN_HPP_NAMESPACE::BlitImageInfo2 * pBlitImageInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdBlitImage2KHR( static_cast( m_commandBuffer ), reinterpret_cast( pBlitImageInfo ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::blitImage2KHR( const VULKAN_HPP_NAMESPACE::BlitImageInfo2 & blitImageInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdBlitImage2KHR && "Function requires or " ); # endif d.vkCmdBlitImage2KHR( m_commandBuffer, reinterpret_cast( &blitImageInfo ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::resolveImage2KHR( const VULKAN_HPP_NAMESPACE::ResolveImageInfo2 * pResolveImageInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdResolveImage2KHR( static_cast( m_commandBuffer ), reinterpret_cast( pResolveImageInfo ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::resolveImage2KHR( const VULKAN_HPP_NAMESPACE::ResolveImageInfo2 & resolveImageInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdResolveImage2KHR && "Function requires or " ); # endif d.vkCmdResolveImage2KHR( m_commandBuffer, reinterpret_cast( &resolveImageInfo ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_EXT_device_fault === template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getFaultInfoEXT( VULKAN_HPP_NAMESPACE::DeviceFaultCountsEXT * pFaultCounts, VULKAN_HPP_NAMESPACE::DeviceFaultInfoEXT * pFaultInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetDeviceFaultInfoEXT( static_cast( m_device ), reinterpret_cast( pFaultCounts ), reinterpret_cast( pFaultInfo ) ) ); } #if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_NV_acquire_winrt_display === # ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result PhysicalDevice::acquireWinrtDisplayNV( VULKAN_HPP_NAMESPACE::DisplayKHR display, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkAcquireWinrtDisplayNV( static_cast( m_physicalDevice ), static_cast( display ) ) ); } # else template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type PhysicalDevice::acquireWinrtDisplayNV( VULKAN_HPP_NAMESPACE::DisplayKHR display, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkAcquireWinrtDisplayNV && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkAcquireWinrtDisplayNV( m_physicalDevice, static_cast( display ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::acquireWinrtDisplayNV" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result ); } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result PhysicalDevice::getWinrtDisplayNV( uint32_t deviceRelativeId, VULKAN_HPP_NAMESPACE::DisplayKHR * pDisplay, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetWinrtDisplayNV( static_cast( m_physicalDevice ), deviceRelativeId, reinterpret_cast( pDisplay ) ) ); } # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type PhysicalDevice::getWinrtDisplayNV( uint32_t deviceRelativeId, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetWinrtDisplayNV && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::DisplayKHR display; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetWinrtDisplayNV( m_physicalDevice, deviceRelativeId, reinterpret_cast( &display ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getWinrtDisplayNV" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( display ) ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getWinrtDisplayNVUnique( uint32_t deviceRelativeId, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetWinrtDisplayNV && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::DisplayKHR display; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetWinrtDisplayNV( m_physicalDevice, deviceRelativeId, reinterpret_cast( &display ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getWinrtDisplayNVUnique" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, UniqueHandle( display, detail::ObjectRelease( *this, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #endif /*VK_USE_PLATFORM_WIN32_KHR*/ #if defined( VK_USE_PLATFORM_DIRECTFB_EXT ) //=== VK_EXT_directfb_surface === template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Instance::createDirectFBSurfaceEXT( const VULKAN_HPP_NAMESPACE::DirectFBSurfaceCreateInfoEXT * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::SurfaceKHR * pSurface, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkCreateDirectFBSurfaceEXT( static_cast( m_instance ), reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSurface ) ) ); } # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Instance::createDirectFBSurfaceEXT( const VULKAN_HPP_NAMESPACE::DirectFBSurfaceCreateInfoEXT & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateDirectFBSurfaceEXT && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::SurfaceKHR surface; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateDirectFBSurfaceEXT( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::createDirectFBSurfaceEXT" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( surface ) ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Instance::createDirectFBSurfaceEXTUnique( const VULKAN_HPP_NAMESPACE::DirectFBSurfaceCreateInfoEXT & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateDirectFBSurfaceEXT && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::SurfaceKHR surface; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateDirectFBSurfaceEXT( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::createDirectFBSurfaceEXTUnique" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, UniqueHandle( surface, detail::ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE Bool32 PhysicalDevice::getDirectFBPresentationSupportEXT( uint32_t queueFamilyIndex, IDirectFB * dfb, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetPhysicalDeviceDirectFBPresentationSupportEXT( static_cast( m_physicalDevice ), queueFamilyIndex, dfb ) ); } # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Bool32 PhysicalDevice::getDirectFBPresentationSupportEXT( uint32_t queueFamilyIndex, IDirectFB & dfb, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceDirectFBPresentationSupportEXT && "Function requires " ); # endif VkBool32 result = d.vkGetPhysicalDeviceDirectFBPresentationSupportEXT( m_physicalDevice, queueFamilyIndex, &dfb ); return static_cast( result ); } # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #endif /*VK_USE_PLATFORM_DIRECTFB_EXT*/ //=== VK_EXT_vertex_input_dynamic_state === template VULKAN_HPP_INLINE void CommandBuffer::setVertexInputEXT( uint32_t vertexBindingDescriptionCount, const VULKAN_HPP_NAMESPACE::VertexInputBindingDescription2EXT * pVertexBindingDescriptions, uint32_t vertexAttributeDescriptionCount, const VULKAN_HPP_NAMESPACE::VertexInputAttributeDescription2EXT * pVertexAttributeDescriptions, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetVertexInputEXT( static_cast( m_commandBuffer ), vertexBindingDescriptionCount, reinterpret_cast( pVertexBindingDescriptions ), vertexAttributeDescriptionCount, reinterpret_cast( pVertexAttributeDescriptions ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::setVertexInputEXT( VULKAN_HPP_NAMESPACE::ArrayProxy const & vertexBindingDescriptions, VULKAN_HPP_NAMESPACE::ArrayProxy const & vertexAttributeDescriptions, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdSetVertexInputEXT && "Function requires or " ); # endif d.vkCmdSetVertexInputEXT( m_commandBuffer, vertexBindingDescriptions.size(), reinterpret_cast( vertexBindingDescriptions.data() ), vertexAttributeDescriptions.size(), reinterpret_cast( vertexAttributeDescriptions.data() ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #if defined( VK_USE_PLATFORM_FUCHSIA ) //=== VK_FUCHSIA_external_memory === template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getMemoryZirconHandleFUCHSIA( const VULKAN_HPP_NAMESPACE::MemoryGetZirconHandleInfoFUCHSIA * pGetZirconHandleInfo, zx_handle_t * pZirconHandle, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetMemoryZirconHandleFUCHSIA( static_cast( m_device ), reinterpret_cast( pGetZirconHandleInfo ), pZirconHandle ) ); } # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::getMemoryZirconHandleFUCHSIA( const VULKAN_HPP_NAMESPACE::MemoryGetZirconHandleInfoFUCHSIA & getZirconHandleInfo, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetMemoryZirconHandleFUCHSIA && "Function requires " ); # endif zx_handle_t zirconHandle; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetMemoryZirconHandleFUCHSIA( m_device, reinterpret_cast( &getZirconHandleInfo ), &zirconHandle ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryZirconHandleFUCHSIA" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( zirconHandle ) ); } # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getMemoryZirconHandlePropertiesFUCHSIA( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType, zx_handle_t zirconHandle, VULKAN_HPP_NAMESPACE::MemoryZirconHandlePropertiesFUCHSIA * pMemoryZirconHandleProperties, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetMemoryZirconHandlePropertiesFUCHSIA( static_cast( m_device ), static_cast( handleType ), zirconHandle, reinterpret_cast( pMemoryZirconHandleProperties ) ) ); } # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::getMemoryZirconHandlePropertiesFUCHSIA( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType, zx_handle_t zirconHandle, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetMemoryZirconHandlePropertiesFUCHSIA && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::MemoryZirconHandlePropertiesFUCHSIA memoryZirconHandleProperties; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetMemoryZirconHandlePropertiesFUCHSIA( m_device, static_cast( handleType ), zirconHandle, reinterpret_cast( &memoryZirconHandleProperties ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryZirconHandlePropertiesFUCHSIA" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( memoryZirconHandleProperties ) ); } # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #endif /*VK_USE_PLATFORM_FUCHSIA*/ #if defined( VK_USE_PLATFORM_FUCHSIA ) //=== VK_FUCHSIA_external_semaphore === template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::importSemaphoreZirconHandleFUCHSIA( const VULKAN_HPP_NAMESPACE::ImportSemaphoreZirconHandleInfoFUCHSIA * pImportSemaphoreZirconHandleInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkImportSemaphoreZirconHandleFUCHSIA( static_cast( m_device ), reinterpret_cast( pImportSemaphoreZirconHandleInfo ) ) ); } # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type Device::importSemaphoreZirconHandleFUCHSIA( const VULKAN_HPP_NAMESPACE::ImportSemaphoreZirconHandleInfoFUCHSIA & importSemaphoreZirconHandleInfo, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkImportSemaphoreZirconHandleFUCHSIA && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkImportSemaphoreZirconHandleFUCHSIA( m_device, reinterpret_cast( &importSemaphoreZirconHandleInfo ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::importSemaphoreZirconHandleFUCHSIA" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result ); } # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getSemaphoreZirconHandleFUCHSIA( const VULKAN_HPP_NAMESPACE::SemaphoreGetZirconHandleInfoFUCHSIA * pGetZirconHandleInfo, zx_handle_t * pZirconHandle, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetSemaphoreZirconHandleFUCHSIA( static_cast( m_device ), reinterpret_cast( pGetZirconHandleInfo ), pZirconHandle ) ); } # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::getSemaphoreZirconHandleFUCHSIA( const VULKAN_HPP_NAMESPACE::SemaphoreGetZirconHandleInfoFUCHSIA & getZirconHandleInfo, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetSemaphoreZirconHandleFUCHSIA && "Function requires " ); # endif zx_handle_t zirconHandle; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetSemaphoreZirconHandleFUCHSIA( m_device, reinterpret_cast( &getZirconHandleInfo ), &zirconHandle ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getSemaphoreZirconHandleFUCHSIA" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( zirconHandle ) ); } # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #endif /*VK_USE_PLATFORM_FUCHSIA*/ #if defined( VK_USE_PLATFORM_FUCHSIA ) //=== VK_FUCHSIA_buffer_collection === template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::createBufferCollectionFUCHSIA( const VULKAN_HPP_NAMESPACE::BufferCollectionCreateInfoFUCHSIA * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::BufferCollectionFUCHSIA * pCollection, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkCreateBufferCollectionFUCHSIA( static_cast( m_device ), reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pCollection ) ) ); } # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::createBufferCollectionFUCHSIA( const VULKAN_HPP_NAMESPACE::BufferCollectionCreateInfoFUCHSIA & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateBufferCollectionFUCHSIA && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::BufferCollectionFUCHSIA collection; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateBufferCollectionFUCHSIA( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &collection ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createBufferCollectionFUCHSIA" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( collection ) ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::createBufferCollectionFUCHSIAUnique( const VULKAN_HPP_NAMESPACE::BufferCollectionCreateInfoFUCHSIA & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateBufferCollectionFUCHSIA && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::BufferCollectionFUCHSIA collection; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateBufferCollectionFUCHSIA( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &collection ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createBufferCollectionFUCHSIAUnique" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, UniqueHandle( collection, detail::ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::setBufferCollectionImageConstraintsFUCHSIA( VULKAN_HPP_NAMESPACE::BufferCollectionFUCHSIA collection, const VULKAN_HPP_NAMESPACE::ImageConstraintsInfoFUCHSIA * pImageConstraintsInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkSetBufferCollectionImageConstraintsFUCHSIA( static_cast( m_device ), static_cast( collection ), reinterpret_cast( pImageConstraintsInfo ) ) ); } # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type Device::setBufferCollectionImageConstraintsFUCHSIA( VULKAN_HPP_NAMESPACE::BufferCollectionFUCHSIA collection, const VULKAN_HPP_NAMESPACE::ImageConstraintsInfoFUCHSIA & imageConstraintsInfo, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkSetBufferCollectionImageConstraintsFUCHSIA && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkSetBufferCollectionImageConstraintsFUCHSIA( m_device, static_cast( collection ), reinterpret_cast( &imageConstraintsInfo ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::setBufferCollectionImageConstraintsFUCHSIA" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result ); } # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::setBufferCollectionBufferConstraintsFUCHSIA( VULKAN_HPP_NAMESPACE::BufferCollectionFUCHSIA collection, const VULKAN_HPP_NAMESPACE::BufferConstraintsInfoFUCHSIA * pBufferConstraintsInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkSetBufferCollectionBufferConstraintsFUCHSIA( static_cast( m_device ), static_cast( collection ), reinterpret_cast( pBufferConstraintsInfo ) ) ); } # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type Device::setBufferCollectionBufferConstraintsFUCHSIA( VULKAN_HPP_NAMESPACE::BufferCollectionFUCHSIA collection, const VULKAN_HPP_NAMESPACE::BufferConstraintsInfoFUCHSIA & bufferConstraintsInfo, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkSetBufferCollectionBufferConstraintsFUCHSIA && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkSetBufferCollectionBufferConstraintsFUCHSIA( m_device, static_cast( collection ), reinterpret_cast( &bufferConstraintsInfo ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::setBufferCollectionBufferConstraintsFUCHSIA" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result ); } # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::destroyBufferCollectionFUCHSIA( VULKAN_HPP_NAMESPACE::BufferCollectionFUCHSIA collection, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDestroyBufferCollectionFUCHSIA( static_cast( m_device ), static_cast( collection ), reinterpret_cast( pAllocator ) ); } # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::destroyBufferCollectionFUCHSIA( VULKAN_HPP_NAMESPACE::BufferCollectionFUCHSIA collection, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDestroyBufferCollectionFUCHSIA && "Function requires " ); # endif d.vkDestroyBufferCollectionFUCHSIA( m_device, static_cast( collection ), reinterpret_cast( static_cast( allocator ) ) ); } # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::BufferCollectionFUCHSIA collection, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDestroyBufferCollectionFUCHSIA( static_cast( m_device ), static_cast( collection ), reinterpret_cast( pAllocator ) ); } # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::BufferCollectionFUCHSIA collection, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDestroyBufferCollectionFUCHSIA && "Function requires " ); # endif d.vkDestroyBufferCollectionFUCHSIA( m_device, static_cast( collection ), reinterpret_cast( static_cast( allocator ) ) ); } # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getBufferCollectionPropertiesFUCHSIA( VULKAN_HPP_NAMESPACE::BufferCollectionFUCHSIA collection, VULKAN_HPP_NAMESPACE::BufferCollectionPropertiesFUCHSIA * pProperties, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetBufferCollectionPropertiesFUCHSIA( static_cast( m_device ), static_cast( collection ), reinterpret_cast( pProperties ) ) ); } # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::getBufferCollectionPropertiesFUCHSIA( VULKAN_HPP_NAMESPACE::BufferCollectionFUCHSIA collection, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetBufferCollectionPropertiesFUCHSIA && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::BufferCollectionPropertiesFUCHSIA properties; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetBufferCollectionPropertiesFUCHSIA( m_device, static_cast( collection ), reinterpret_cast( &properties ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getBufferCollectionPropertiesFUCHSIA" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( properties ) ); } # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #endif /*VK_USE_PLATFORM_FUCHSIA*/ //=== VK_HUAWEI_subpass_shading === template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getSubpassShadingMaxWorkgroupSizeHUAWEI( VULKAN_HPP_NAMESPACE::RenderPass renderpass, VULKAN_HPP_NAMESPACE::Extent2D * pMaxWorkgroupSize, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI( static_cast( m_device ), static_cast( renderpass ), reinterpret_cast( pMaxWorkgroupSize ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::getSubpassShadingMaxWorkgroupSizeHUAWEI( VULKAN_HPP_NAMESPACE::RenderPass renderpass, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Extent2D maxWorkgroupSize; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI( m_device, static_cast( renderpass ), reinterpret_cast( &maxWorkgroupSize ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getSubpassShadingMaxWorkgroupSizeHUAWEI" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( maxWorkgroupSize ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::subpassShadingHUAWEI( Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSubpassShadingHUAWEI( static_cast( m_commandBuffer ) ); } //=== VK_HUAWEI_invocation_mask === template VULKAN_HPP_INLINE void CommandBuffer::bindInvocationMaskHUAWEI( VULKAN_HPP_NAMESPACE::ImageView imageView, VULKAN_HPP_NAMESPACE::ImageLayout imageLayout, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdBindInvocationMaskHUAWEI( static_cast( m_commandBuffer ), static_cast( imageView ), static_cast( imageLayout ) ); } //=== VK_NV_external_memory_rdma === template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getMemoryRemoteAddressNV( const VULKAN_HPP_NAMESPACE::MemoryGetRemoteAddressInfoNV * pMemoryGetRemoteAddressInfo, VULKAN_HPP_NAMESPACE::RemoteAddressNV * pAddress, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetMemoryRemoteAddressNV( static_cast( m_device ), reinterpret_cast( pMemoryGetRemoteAddressInfo ), reinterpret_cast( pAddress ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::getMemoryRemoteAddressNV( const VULKAN_HPP_NAMESPACE::MemoryGetRemoteAddressInfoNV & memoryGetRemoteAddressInfo, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetMemoryRemoteAddressNV && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::RemoteAddressNV address; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetMemoryRemoteAddressNV( m_device, reinterpret_cast( &memoryGetRemoteAddressInfo ), reinterpret_cast( &address ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryRemoteAddressNV" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( address ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_EXT_pipeline_properties === template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getPipelinePropertiesEXT( const VULKAN_HPP_NAMESPACE::PipelineInfoEXT * pPipelineInfo, VULKAN_HPP_NAMESPACE::BaseOutStructure * pPipelineProperties, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetPipelinePropertiesEXT( static_cast( m_device ), reinterpret_cast( pPipelineInfo ), reinterpret_cast( pPipelineProperties ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::getPipelinePropertiesEXT( const VULKAN_HPP_NAMESPACE::PipelineInfoEXT & pipelineInfo, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPipelinePropertiesEXT && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::BaseOutStructure pipelineProperties; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetPipelinePropertiesEXT( m_device, reinterpret_cast( &pipelineInfo ), reinterpret_cast( &pipelineProperties ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getPipelinePropertiesEXT" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( pipelineProperties ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_EXT_extended_dynamic_state2 === template VULKAN_HPP_INLINE void CommandBuffer::setPatchControlPointsEXT( uint32_t patchControlPoints, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetPatchControlPointsEXT( static_cast( m_commandBuffer ), patchControlPoints ); } template VULKAN_HPP_INLINE void CommandBuffer::setRasterizerDiscardEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 rasterizerDiscardEnable, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetRasterizerDiscardEnableEXT( static_cast( m_commandBuffer ), static_cast( rasterizerDiscardEnable ) ); } template VULKAN_HPP_INLINE void CommandBuffer::setDepthBiasEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 depthBiasEnable, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetDepthBiasEnableEXT( static_cast( m_commandBuffer ), static_cast( depthBiasEnable ) ); } template VULKAN_HPP_INLINE void CommandBuffer::setLogicOpEXT( VULKAN_HPP_NAMESPACE::LogicOp logicOp, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetLogicOpEXT( static_cast( m_commandBuffer ), static_cast( logicOp ) ); } template VULKAN_HPP_INLINE void CommandBuffer::setPrimitiveRestartEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 primitiveRestartEnable, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetPrimitiveRestartEnableEXT( static_cast( m_commandBuffer ), static_cast( primitiveRestartEnable ) ); } #if defined( VK_USE_PLATFORM_SCREEN_QNX ) //=== VK_QNX_screen_surface === template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Instance::createScreenSurfaceQNX( const VULKAN_HPP_NAMESPACE::ScreenSurfaceCreateInfoQNX * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::SurfaceKHR * pSurface, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkCreateScreenSurfaceQNX( static_cast( m_instance ), reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSurface ) ) ); } # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Instance::createScreenSurfaceQNX( const VULKAN_HPP_NAMESPACE::ScreenSurfaceCreateInfoQNX & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateScreenSurfaceQNX && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::SurfaceKHR surface; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateScreenSurfaceQNX( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::createScreenSurfaceQNX" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( surface ) ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Instance::createScreenSurfaceQNXUnique( const VULKAN_HPP_NAMESPACE::ScreenSurfaceCreateInfoQNX & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateScreenSurfaceQNX && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::SurfaceKHR surface; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateScreenSurfaceQNX( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::createScreenSurfaceQNXUnique" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, UniqueHandle( surface, detail::ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE Bool32 PhysicalDevice::getScreenPresentationSupportQNX( uint32_t queueFamilyIndex, struct _screen_window * window, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetPhysicalDeviceScreenPresentationSupportQNX( static_cast( m_physicalDevice ), queueFamilyIndex, window ) ); } # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Bool32 PhysicalDevice::getScreenPresentationSupportQNX( uint32_t queueFamilyIndex, struct _screen_window & window, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceScreenPresentationSupportQNX && "Function requires " ); # endif VkBool32 result = d.vkGetPhysicalDeviceScreenPresentationSupportQNX( m_physicalDevice, queueFamilyIndex, &window ); return static_cast( result ); } # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #endif /*VK_USE_PLATFORM_SCREEN_QNX*/ //=== VK_EXT_color_write_enable === template VULKAN_HPP_INLINE void CommandBuffer::setColorWriteEnableEXT( uint32_t attachmentCount, const VULKAN_HPP_NAMESPACE::Bool32 * pColorWriteEnables, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetColorWriteEnableEXT( static_cast( m_commandBuffer ), attachmentCount, reinterpret_cast( pColorWriteEnables ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::setColorWriteEnableEXT( VULKAN_HPP_NAMESPACE::ArrayProxy const & colorWriteEnables, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdSetColorWriteEnableEXT && "Function requires " ); # endif d.vkCmdSetColorWriteEnableEXT( m_commandBuffer, colorWriteEnables.size(), reinterpret_cast( colorWriteEnables.data() ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_KHR_ray_tracing_maintenance1 === template VULKAN_HPP_INLINE void CommandBuffer::traceRaysIndirect2KHR( VULKAN_HPP_NAMESPACE::DeviceAddress indirectDeviceAddress, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdTraceRaysIndirect2KHR( static_cast( m_commandBuffer ), static_cast( indirectDeviceAddress ) ); } //=== VK_EXT_multi_draw === template VULKAN_HPP_INLINE void CommandBuffer::drawMultiEXT( uint32_t drawCount, const VULKAN_HPP_NAMESPACE::MultiDrawInfoEXT * pVertexInfo, uint32_t instanceCount, uint32_t firstInstance, uint32_t stride, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdDrawMultiEXT( static_cast( m_commandBuffer ), drawCount, reinterpret_cast( pVertexInfo ), instanceCount, firstInstance, stride ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::drawMultiEXT( VULKAN_HPP_NAMESPACE::StridedArrayProxy const & vertexInfo, uint32_t instanceCount, uint32_t firstInstance, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdDrawMultiEXT && "Function requires " ); # endif d.vkCmdDrawMultiEXT( m_commandBuffer, vertexInfo.size(), reinterpret_cast( vertexInfo.data() ), instanceCount, firstInstance, vertexInfo.stride() ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::drawMultiIndexedEXT( uint32_t drawCount, const VULKAN_HPP_NAMESPACE::MultiDrawIndexedInfoEXT * pIndexInfo, uint32_t instanceCount, uint32_t firstInstance, uint32_t stride, const int32_t * pVertexOffset, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdDrawMultiIndexedEXT( static_cast( m_commandBuffer ), drawCount, reinterpret_cast( pIndexInfo ), instanceCount, firstInstance, stride, pVertexOffset ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::drawMultiIndexedEXT( VULKAN_HPP_NAMESPACE::StridedArrayProxy const & indexInfo, uint32_t instanceCount, uint32_t firstInstance, Optional vertexOffset, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdDrawMultiIndexedEXT && "Function requires " ); # endif d.vkCmdDrawMultiIndexedEXT( m_commandBuffer, indexInfo.size(), reinterpret_cast( indexInfo.data() ), instanceCount, firstInstance, indexInfo.stride(), static_cast( vertexOffset ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_EXT_opacity_micromap === template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::createMicromapEXT( const VULKAN_HPP_NAMESPACE::MicromapCreateInfoEXT * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::MicromapEXT * pMicromap, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkCreateMicromapEXT( static_cast( m_device ), reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pMicromap ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::createMicromapEXT( const VULKAN_HPP_NAMESPACE::MicromapCreateInfoEXT & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateMicromapEXT && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::MicromapEXT micromap; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateMicromapEXT( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( µmap ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createMicromapEXT" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( micromap ) ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::createMicromapEXTUnique( const VULKAN_HPP_NAMESPACE::MicromapCreateInfoEXT & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateMicromapEXT && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::MicromapEXT micromap; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateMicromapEXT( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( µmap ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createMicromapEXTUnique" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, UniqueHandle( micromap, detail::ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::destroyMicromapEXT( VULKAN_HPP_NAMESPACE::MicromapEXT micromap, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDestroyMicromapEXT( static_cast( m_device ), static_cast( micromap ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::destroyMicromapEXT( VULKAN_HPP_NAMESPACE::MicromapEXT micromap, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDestroyMicromapEXT && "Function requires " ); # endif d.vkDestroyMicromapEXT( m_device, static_cast( micromap ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::MicromapEXT micromap, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDestroyMicromapEXT( static_cast( m_device ), static_cast( micromap ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::MicromapEXT micromap, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDestroyMicromapEXT && "Function requires " ); # endif d.vkDestroyMicromapEXT( m_device, static_cast( micromap ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::buildMicromapsEXT( uint32_t infoCount, const VULKAN_HPP_NAMESPACE::MicromapBuildInfoEXT * pInfos, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdBuildMicromapsEXT( static_cast( m_commandBuffer ), infoCount, reinterpret_cast( pInfos ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::buildMicromapsEXT( VULKAN_HPP_NAMESPACE::ArrayProxy const & infos, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdBuildMicromapsEXT && "Function requires " ); # endif d.vkCmdBuildMicromapsEXT( m_commandBuffer, infos.size(), reinterpret_cast( infos.data() ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::buildMicromapsEXT( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, uint32_t infoCount, const VULKAN_HPP_NAMESPACE::MicromapBuildInfoEXT * pInfos, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkBuildMicromapsEXT( static_cast( m_device ), static_cast( deferredOperation ), infoCount, reinterpret_cast( pInfos ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Device::buildMicromapsEXT( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, VULKAN_HPP_NAMESPACE::ArrayProxy const & infos, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkBuildMicromapsEXT && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkBuildMicromapsEXT( m_device, static_cast( deferredOperation ), infos.size(), reinterpret_cast( infos.data() ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::buildMicromapsEXT", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eOperationDeferredKHR, VULKAN_HPP_NAMESPACE::Result::eOperationNotDeferredKHR } ); return static_cast( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::copyMicromapEXT( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, const VULKAN_HPP_NAMESPACE::CopyMicromapInfoEXT * pInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkCopyMicromapEXT( static_cast( m_device ), static_cast( deferredOperation ), reinterpret_cast( pInfo ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Device::copyMicromapEXT( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, const VULKAN_HPP_NAMESPACE::CopyMicromapInfoEXT & info, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCopyMicromapEXT && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCopyMicromapEXT( m_device, static_cast( deferredOperation ), reinterpret_cast( &info ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::copyMicromapEXT", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eOperationDeferredKHR, VULKAN_HPP_NAMESPACE::Result::eOperationNotDeferredKHR } ); return static_cast( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::copyMicromapToMemoryEXT( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, const VULKAN_HPP_NAMESPACE::CopyMicromapToMemoryInfoEXT * pInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkCopyMicromapToMemoryEXT( static_cast( m_device ), static_cast( deferredOperation ), reinterpret_cast( pInfo ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Device::copyMicromapToMemoryEXT( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, const VULKAN_HPP_NAMESPACE::CopyMicromapToMemoryInfoEXT & info, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCopyMicromapToMemoryEXT && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCopyMicromapToMemoryEXT( m_device, static_cast( deferredOperation ), reinterpret_cast( &info ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::copyMicromapToMemoryEXT", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eOperationDeferredKHR, VULKAN_HPP_NAMESPACE::Result::eOperationNotDeferredKHR } ); return static_cast( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::copyMemoryToMicromapEXT( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, const VULKAN_HPP_NAMESPACE::CopyMemoryToMicromapInfoEXT * pInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkCopyMemoryToMicromapEXT( static_cast( m_device ), static_cast( deferredOperation ), reinterpret_cast( pInfo ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Device::copyMemoryToMicromapEXT( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, const VULKAN_HPP_NAMESPACE::CopyMemoryToMicromapInfoEXT & info, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCopyMemoryToMicromapEXT && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCopyMemoryToMicromapEXT( m_device, static_cast( deferredOperation ), reinterpret_cast( &info ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::copyMemoryToMicromapEXT", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eOperationDeferredKHR, VULKAN_HPP_NAMESPACE::Result::eOperationNotDeferredKHR } ); return static_cast( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::writeMicromapsPropertiesEXT( uint32_t micromapCount, const VULKAN_HPP_NAMESPACE::MicromapEXT * pMicromaps, VULKAN_HPP_NAMESPACE::QueryType queryType, size_t dataSize, void * pData, size_t stride, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkWriteMicromapsPropertiesEXT( static_cast( m_device ), micromapCount, reinterpret_cast( pMicromaps ), static_cast( queryType ), dataSize, pData, stride ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::writeMicromapsPropertiesEXT( VULKAN_HPP_NAMESPACE::ArrayProxy const & micromaps, VULKAN_HPP_NAMESPACE::QueryType queryType, size_t dataSize, size_t stride, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkWriteMicromapsPropertiesEXT && "Function requires " ); # endif VULKAN_HPP_ASSERT( dataSize % sizeof( DataType ) == 0 ); std::vector data( dataSize / sizeof( DataType ) ); VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkWriteMicromapsPropertiesEXT( m_device, micromaps.size(), reinterpret_cast( micromaps.data() ), static_cast( queryType ), data.size() * sizeof( DataType ), reinterpret_cast( data.data() ), stride ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::writeMicromapsPropertiesEXT" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( data ) ); } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::writeMicromapsPropertyEXT( VULKAN_HPP_NAMESPACE::ArrayProxy const & micromaps, VULKAN_HPP_NAMESPACE::QueryType queryType, size_t stride, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkWriteMicromapsPropertiesEXT && "Function requires " ); # endif DataType data; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkWriteMicromapsPropertiesEXT( m_device, micromaps.size(), reinterpret_cast( micromaps.data() ), static_cast( queryType ), sizeof( DataType ), reinterpret_cast( &data ), stride ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::writeMicromapsPropertyEXT" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( data ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::copyMicromapEXT( const VULKAN_HPP_NAMESPACE::CopyMicromapInfoEXT * pInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdCopyMicromapEXT( static_cast( m_commandBuffer ), reinterpret_cast( pInfo ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::copyMicromapEXT( const VULKAN_HPP_NAMESPACE::CopyMicromapInfoEXT & info, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdCopyMicromapEXT && "Function requires " ); # endif d.vkCmdCopyMicromapEXT( m_commandBuffer, reinterpret_cast( &info ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::copyMicromapToMemoryEXT( const VULKAN_HPP_NAMESPACE::CopyMicromapToMemoryInfoEXT * pInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdCopyMicromapToMemoryEXT( static_cast( m_commandBuffer ), reinterpret_cast( pInfo ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::copyMicromapToMemoryEXT( const VULKAN_HPP_NAMESPACE::CopyMicromapToMemoryInfoEXT & info, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdCopyMicromapToMemoryEXT && "Function requires " ); # endif d.vkCmdCopyMicromapToMemoryEXT( m_commandBuffer, reinterpret_cast( &info ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::copyMemoryToMicromapEXT( const VULKAN_HPP_NAMESPACE::CopyMemoryToMicromapInfoEXT * pInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdCopyMemoryToMicromapEXT( static_cast( m_commandBuffer ), reinterpret_cast( pInfo ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::copyMemoryToMicromapEXT( const VULKAN_HPP_NAMESPACE::CopyMemoryToMicromapInfoEXT & info, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdCopyMemoryToMicromapEXT && "Function requires " ); # endif d.vkCmdCopyMemoryToMicromapEXT( m_commandBuffer, reinterpret_cast( &info ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::writeMicromapsPropertiesEXT( uint32_t micromapCount, const VULKAN_HPP_NAMESPACE::MicromapEXT * pMicromaps, VULKAN_HPP_NAMESPACE::QueryType queryType, VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t firstQuery, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdWriteMicromapsPropertiesEXT( static_cast( m_commandBuffer ), micromapCount, reinterpret_cast( pMicromaps ), static_cast( queryType ), static_cast( queryPool ), firstQuery ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::writeMicromapsPropertiesEXT( VULKAN_HPP_NAMESPACE::ArrayProxy const & micromaps, VULKAN_HPP_NAMESPACE::QueryType queryType, VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t firstQuery, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdWriteMicromapsPropertiesEXT && "Function requires " ); # endif d.vkCmdWriteMicromapsPropertiesEXT( m_commandBuffer, micromaps.size(), reinterpret_cast( micromaps.data() ), static_cast( queryType ), static_cast( queryPool ), firstQuery ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::getMicromapCompatibilityEXT( const VULKAN_HPP_NAMESPACE::MicromapVersionInfoEXT * pVersionInfo, VULKAN_HPP_NAMESPACE::AccelerationStructureCompatibilityKHR * pCompatibility, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkGetDeviceMicromapCompatibilityEXT( static_cast( m_device ), reinterpret_cast( pVersionInfo ), reinterpret_cast( pCompatibility ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::AccelerationStructureCompatibilityKHR Device::getMicromapCompatibilityEXT( const VULKAN_HPP_NAMESPACE::MicromapVersionInfoEXT & versionInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetDeviceMicromapCompatibilityEXT && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::AccelerationStructureCompatibilityKHR compatibility; d.vkGetDeviceMicromapCompatibilityEXT( m_device, reinterpret_cast( &versionInfo ), reinterpret_cast( &compatibility ) ); return compatibility; } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::getMicromapBuildSizesEXT( VULKAN_HPP_NAMESPACE::AccelerationStructureBuildTypeKHR buildType, const VULKAN_HPP_NAMESPACE::MicromapBuildInfoEXT * pBuildInfo, VULKAN_HPP_NAMESPACE::MicromapBuildSizesInfoEXT * pSizeInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkGetMicromapBuildSizesEXT( static_cast( m_device ), static_cast( buildType ), reinterpret_cast( pBuildInfo ), reinterpret_cast( pSizeInfo ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MicromapBuildSizesInfoEXT Device::getMicromapBuildSizesEXT( VULKAN_HPP_NAMESPACE::AccelerationStructureBuildTypeKHR buildType, const VULKAN_HPP_NAMESPACE::MicromapBuildInfoEXT & buildInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetMicromapBuildSizesEXT && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::MicromapBuildSizesInfoEXT sizeInfo; d.vkGetMicromapBuildSizesEXT( m_device, static_cast( buildType ), reinterpret_cast( &buildInfo ), reinterpret_cast( &sizeInfo ) ); return sizeInfo; } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_HUAWEI_cluster_culling_shader === template VULKAN_HPP_INLINE void CommandBuffer::drawClusterHUAWEI( uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdDrawClusterHUAWEI( static_cast( m_commandBuffer ), groupCountX, groupCountY, groupCountZ ); } template VULKAN_HPP_INLINE void CommandBuffer::drawClusterIndirectHUAWEI( VULKAN_HPP_NAMESPACE::Buffer buffer, VULKAN_HPP_NAMESPACE::DeviceSize offset, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdDrawClusterIndirectHUAWEI( static_cast( m_commandBuffer ), static_cast( buffer ), static_cast( offset ) ); } //=== VK_EXT_pageable_device_local_memory === template VULKAN_HPP_INLINE void Device::setMemoryPriorityEXT( VULKAN_HPP_NAMESPACE::DeviceMemory memory, float priority, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkSetDeviceMemoryPriorityEXT( static_cast( m_device ), static_cast( memory ), priority ); } //=== VK_KHR_maintenance4 === template VULKAN_HPP_INLINE void Device::getBufferMemoryRequirementsKHR( const VULKAN_HPP_NAMESPACE::DeviceBufferMemoryRequirements * pInfo, VULKAN_HPP_NAMESPACE::MemoryRequirements2 * pMemoryRequirements, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkGetDeviceBufferMemoryRequirementsKHR( static_cast( m_device ), reinterpret_cast( pInfo ), reinterpret_cast( pMemoryRequirements ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MemoryRequirements2 Device::getBufferMemoryRequirementsKHR( const VULKAN_HPP_NAMESPACE::DeviceBufferMemoryRequirements & info, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetDeviceBufferMemoryRequirementsKHR && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::MemoryRequirements2 memoryRequirements; d.vkGetDeviceBufferMemoryRequirementsKHR( m_device, reinterpret_cast( &info ), reinterpret_cast( &memoryRequirements ) ); return memoryRequirements; } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::StructureChain Device::getBufferMemoryRequirementsKHR( const VULKAN_HPP_NAMESPACE::DeviceBufferMemoryRequirements & info, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetDeviceBufferMemoryRequirementsKHR && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::StructureChain structureChain; VULKAN_HPP_NAMESPACE::MemoryRequirements2 & memoryRequirements = structureChain.template get(); d.vkGetDeviceBufferMemoryRequirementsKHR( m_device, reinterpret_cast( &info ), reinterpret_cast( &memoryRequirements ) ); return structureChain; } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::getImageMemoryRequirementsKHR( const VULKAN_HPP_NAMESPACE::DeviceImageMemoryRequirements * pInfo, VULKAN_HPP_NAMESPACE::MemoryRequirements2 * pMemoryRequirements, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkGetDeviceImageMemoryRequirementsKHR( static_cast( m_device ), reinterpret_cast( pInfo ), reinterpret_cast( pMemoryRequirements ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MemoryRequirements2 Device::getImageMemoryRequirementsKHR( const VULKAN_HPP_NAMESPACE::DeviceImageMemoryRequirements & info, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetDeviceImageMemoryRequirementsKHR && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::MemoryRequirements2 memoryRequirements; d.vkGetDeviceImageMemoryRequirementsKHR( m_device, reinterpret_cast( &info ), reinterpret_cast( &memoryRequirements ) ); return memoryRequirements; } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::StructureChain Device::getImageMemoryRequirementsKHR( const VULKAN_HPP_NAMESPACE::DeviceImageMemoryRequirements & info, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetDeviceImageMemoryRequirementsKHR && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::StructureChain structureChain; VULKAN_HPP_NAMESPACE::MemoryRequirements2 & memoryRequirements = structureChain.template get(); d.vkGetDeviceImageMemoryRequirementsKHR( m_device, reinterpret_cast( &info ), reinterpret_cast( &memoryRequirements ) ); return structureChain; } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::getImageSparseMemoryRequirementsKHR( const VULKAN_HPP_NAMESPACE::DeviceImageMemoryRequirements * pInfo, uint32_t * pSparseMemoryRequirementCount, VULKAN_HPP_NAMESPACE::SparseImageMemoryRequirements2 * pSparseMemoryRequirements, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkGetDeviceImageSparseMemoryRequirementsKHR( static_cast( m_device ), reinterpret_cast( pInfo ), pSparseMemoryRequirementCount, reinterpret_cast( pSparseMemoryRequirements ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector Device::getImageSparseMemoryRequirementsKHR( const VULKAN_HPP_NAMESPACE::DeviceImageMemoryRequirements & info, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetDeviceImageSparseMemoryRequirementsKHR && "Function requires or " ); # endif std::vector sparseMemoryRequirements; uint32_t sparseMemoryRequirementCount; d.vkGetDeviceImageSparseMemoryRequirementsKHR( m_device, reinterpret_cast( &info ), &sparseMemoryRequirementCount, nullptr ); sparseMemoryRequirements.resize( sparseMemoryRequirementCount ); d.vkGetDeviceImageSparseMemoryRequirementsKHR( m_device, reinterpret_cast( &info ), &sparseMemoryRequirementCount, reinterpret_cast( sparseMemoryRequirements.data() ) ); VULKAN_HPP_ASSERT( sparseMemoryRequirementCount <= sparseMemoryRequirements.size() ); if ( sparseMemoryRequirementCount < sparseMemoryRequirements.size() ) { sparseMemoryRequirements.resize( sparseMemoryRequirementCount ); } return sparseMemoryRequirements; } template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector Device::getImageSparseMemoryRequirementsKHR( const VULKAN_HPP_NAMESPACE::DeviceImageMemoryRequirements & info, SparseImageMemoryRequirements2Allocator & sparseImageMemoryRequirements2Allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetDeviceImageSparseMemoryRequirementsKHR && "Function requires or " ); # endif std::vector sparseMemoryRequirements( sparseImageMemoryRequirements2Allocator ); uint32_t sparseMemoryRequirementCount; d.vkGetDeviceImageSparseMemoryRequirementsKHR( m_device, reinterpret_cast( &info ), &sparseMemoryRequirementCount, nullptr ); sparseMemoryRequirements.resize( sparseMemoryRequirementCount ); d.vkGetDeviceImageSparseMemoryRequirementsKHR( m_device, reinterpret_cast( &info ), &sparseMemoryRequirementCount, reinterpret_cast( sparseMemoryRequirements.data() ) ); VULKAN_HPP_ASSERT( sparseMemoryRequirementCount <= sparseMemoryRequirements.size() ); if ( sparseMemoryRequirementCount < sparseMemoryRequirements.size() ) { sparseMemoryRequirements.resize( sparseMemoryRequirementCount ); } return sparseMemoryRequirements; } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_VALVE_descriptor_set_host_mapping === template VULKAN_HPP_INLINE void Device::getDescriptorSetLayoutHostMappingInfoVALVE( const VULKAN_HPP_NAMESPACE::DescriptorSetBindingReferenceVALVE * pBindingReference, VULKAN_HPP_NAMESPACE::DescriptorSetLayoutHostMappingInfoVALVE * pHostMapping, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkGetDescriptorSetLayoutHostMappingInfoVALVE( static_cast( m_device ), reinterpret_cast( pBindingReference ), reinterpret_cast( pHostMapping ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::DescriptorSetLayoutHostMappingInfoVALVE Device::getDescriptorSetLayoutHostMappingInfoVALVE( const VULKAN_HPP_NAMESPACE::DescriptorSetBindingReferenceVALVE & bindingReference, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetDescriptorSetLayoutHostMappingInfoVALVE && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::DescriptorSetLayoutHostMappingInfoVALVE hostMapping; d.vkGetDescriptorSetLayoutHostMappingInfoVALVE( m_device, reinterpret_cast( &bindingReference ), reinterpret_cast( &hostMapping ) ); return hostMapping; } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::getDescriptorSetHostMappingVALVE( VULKAN_HPP_NAMESPACE::DescriptorSet descriptorSet, void ** ppData, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkGetDescriptorSetHostMappingVALVE( static_cast( m_device ), static_cast( descriptorSet ), ppData ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE void * Device::getDescriptorSetHostMappingVALVE( VULKAN_HPP_NAMESPACE::DescriptorSet descriptorSet, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetDescriptorSetHostMappingVALVE && "Function requires " ); # endif void * pData; d.vkGetDescriptorSetHostMappingVALVE( m_device, static_cast( descriptorSet ), &pData ); return pData; } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_NV_copy_memory_indirect === template VULKAN_HPP_INLINE void CommandBuffer::copyMemoryIndirectNV( VULKAN_HPP_NAMESPACE::DeviceAddress copyBufferAddress, uint32_t copyCount, uint32_t stride, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdCopyMemoryIndirectNV( static_cast( m_commandBuffer ), static_cast( copyBufferAddress ), copyCount, stride ); } template VULKAN_HPP_INLINE void CommandBuffer::copyMemoryToImageIndirectNV( VULKAN_HPP_NAMESPACE::DeviceAddress copyBufferAddress, uint32_t copyCount, uint32_t stride, VULKAN_HPP_NAMESPACE::Image dstImage, VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout, const VULKAN_HPP_NAMESPACE::ImageSubresourceLayers * pImageSubresources, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdCopyMemoryToImageIndirectNV( static_cast( m_commandBuffer ), static_cast( copyBufferAddress ), copyCount, stride, static_cast( dstImage ), static_cast( dstImageLayout ), reinterpret_cast( pImageSubresources ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::copyMemoryToImageIndirectNV( VULKAN_HPP_NAMESPACE::DeviceAddress copyBufferAddress, uint32_t stride, VULKAN_HPP_NAMESPACE::Image dstImage, VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout, VULKAN_HPP_NAMESPACE::ArrayProxy const & imageSubresources, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdCopyMemoryToImageIndirectNV && "Function requires " ); # endif d.vkCmdCopyMemoryToImageIndirectNV( m_commandBuffer, static_cast( copyBufferAddress ), imageSubresources.size(), stride, static_cast( dstImage ), static_cast( dstImageLayout ), reinterpret_cast( imageSubresources.data() ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_NV_memory_decompression === template VULKAN_HPP_INLINE void CommandBuffer::decompressMemoryNV( uint32_t decompressRegionCount, const VULKAN_HPP_NAMESPACE::DecompressMemoryRegionNV * pDecompressMemoryRegions, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdDecompressMemoryNV( static_cast( m_commandBuffer ), decompressRegionCount, reinterpret_cast( pDecompressMemoryRegions ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::decompressMemoryNV( VULKAN_HPP_NAMESPACE::ArrayProxy const & decompressMemoryRegions, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdDecompressMemoryNV && "Function requires " ); # endif d.vkCmdDecompressMemoryNV( m_commandBuffer, decompressMemoryRegions.size(), reinterpret_cast( decompressMemoryRegions.data() ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::decompressMemoryIndirectCountNV( VULKAN_HPP_NAMESPACE::DeviceAddress indirectCommandsAddress, VULKAN_HPP_NAMESPACE::DeviceAddress indirectCommandsCountAddress, uint32_t stride, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdDecompressMemoryIndirectCountNV( static_cast( m_commandBuffer ), static_cast( indirectCommandsAddress ), static_cast( indirectCommandsCountAddress ), stride ); } //=== VK_NV_device_generated_commands_compute === template VULKAN_HPP_INLINE void Device::getPipelineIndirectMemoryRequirementsNV( const VULKAN_HPP_NAMESPACE::ComputePipelineCreateInfo * pCreateInfo, VULKAN_HPP_NAMESPACE::MemoryRequirements2 * pMemoryRequirements, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkGetPipelineIndirectMemoryRequirementsNV( static_cast( m_device ), reinterpret_cast( pCreateInfo ), reinterpret_cast( pMemoryRequirements ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MemoryRequirements2 Device::getPipelineIndirectMemoryRequirementsNV( const VULKAN_HPP_NAMESPACE::ComputePipelineCreateInfo & createInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPipelineIndirectMemoryRequirementsNV && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::MemoryRequirements2 memoryRequirements; d.vkGetPipelineIndirectMemoryRequirementsNV( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( &memoryRequirements ) ); return memoryRequirements; } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::StructureChain Device::getPipelineIndirectMemoryRequirementsNV( const VULKAN_HPP_NAMESPACE::ComputePipelineCreateInfo & createInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPipelineIndirectMemoryRequirementsNV && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::StructureChain structureChain; VULKAN_HPP_NAMESPACE::MemoryRequirements2 & memoryRequirements = structureChain.template get(); d.vkGetPipelineIndirectMemoryRequirementsNV( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( &memoryRequirements ) ); return structureChain; } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::updatePipelineIndirectBufferNV( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint, VULKAN_HPP_NAMESPACE::Pipeline pipeline, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdUpdatePipelineIndirectBufferNV( static_cast( m_commandBuffer ), static_cast( pipelineBindPoint ), static_cast( pipeline ) ); } template VULKAN_HPP_INLINE DeviceAddress Device::getPipelineIndirectAddressNV( const VULKAN_HPP_NAMESPACE::PipelineIndirectDeviceAddressInfoNV * pInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetPipelineIndirectDeviceAddressNV( static_cast( m_device ), reinterpret_cast( pInfo ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::DeviceAddress Device::getPipelineIndirectAddressNV( const VULKAN_HPP_NAMESPACE::PipelineIndirectDeviceAddressInfoNV & info, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPipelineIndirectDeviceAddressNV && "Function requires " ); # endif VkDeviceAddress result = d.vkGetPipelineIndirectDeviceAddressNV( m_device, reinterpret_cast( &info ) ); return static_cast( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_EXT_extended_dynamic_state3 === template VULKAN_HPP_INLINE void CommandBuffer::setDepthClampEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 depthClampEnable, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetDepthClampEnableEXT( static_cast( m_commandBuffer ), static_cast( depthClampEnable ) ); } template VULKAN_HPP_INLINE void CommandBuffer::setPolygonModeEXT( VULKAN_HPP_NAMESPACE::PolygonMode polygonMode, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetPolygonModeEXT( static_cast( m_commandBuffer ), static_cast( polygonMode ) ); } template VULKAN_HPP_INLINE void CommandBuffer::setRasterizationSamplesEXT( VULKAN_HPP_NAMESPACE::SampleCountFlagBits rasterizationSamples, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetRasterizationSamplesEXT( static_cast( m_commandBuffer ), static_cast( rasterizationSamples ) ); } template VULKAN_HPP_INLINE void CommandBuffer::setSampleMaskEXT( VULKAN_HPP_NAMESPACE::SampleCountFlagBits samples, const VULKAN_HPP_NAMESPACE::SampleMask * pSampleMask, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetSampleMaskEXT( static_cast( m_commandBuffer ), static_cast( samples ), reinterpret_cast( pSampleMask ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::setSampleMaskEXT( VULKAN_HPP_NAMESPACE::SampleCountFlagBits samples, VULKAN_HPP_NAMESPACE::ArrayProxy const & sampleMask, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdSetSampleMaskEXT && "Function requires or " ); # endif # ifdef VULKAN_HPP_NO_EXCEPTIONS VULKAN_HPP_ASSERT( sampleMask.size() == ( static_cast( samples ) + 31 ) / 32 ); # else if ( sampleMask.size() != ( static_cast( samples ) + 31 ) / 32 ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::setSampleMaskEXT: sampleMask.size() != ( static_cast( samples ) + 31 ) / 32" ); } # endif /*VULKAN_HPP_NO_EXCEPTIONS*/ d.vkCmdSetSampleMaskEXT( m_commandBuffer, static_cast( samples ), reinterpret_cast( sampleMask.data() ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::setAlphaToCoverageEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 alphaToCoverageEnable, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetAlphaToCoverageEnableEXT( static_cast( m_commandBuffer ), static_cast( alphaToCoverageEnable ) ); } template VULKAN_HPP_INLINE void CommandBuffer::setAlphaToOneEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 alphaToOneEnable, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetAlphaToOneEnableEXT( static_cast( m_commandBuffer ), static_cast( alphaToOneEnable ) ); } template VULKAN_HPP_INLINE void CommandBuffer::setLogicOpEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 logicOpEnable, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetLogicOpEnableEXT( static_cast( m_commandBuffer ), static_cast( logicOpEnable ) ); } template VULKAN_HPP_INLINE void CommandBuffer::setColorBlendEnableEXT( uint32_t firstAttachment, uint32_t attachmentCount, const VULKAN_HPP_NAMESPACE::Bool32 * pColorBlendEnables, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetColorBlendEnableEXT( static_cast( m_commandBuffer ), firstAttachment, attachmentCount, reinterpret_cast( pColorBlendEnables ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::setColorBlendEnableEXT( uint32_t firstAttachment, VULKAN_HPP_NAMESPACE::ArrayProxy const & colorBlendEnables, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdSetColorBlendEnableEXT && "Function requires or " ); # endif d.vkCmdSetColorBlendEnableEXT( m_commandBuffer, firstAttachment, colorBlendEnables.size(), reinterpret_cast( colorBlendEnables.data() ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::setColorBlendEquationEXT( uint32_t firstAttachment, uint32_t attachmentCount, const VULKAN_HPP_NAMESPACE::ColorBlendEquationEXT * pColorBlendEquations, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetColorBlendEquationEXT( static_cast( m_commandBuffer ), firstAttachment, attachmentCount, reinterpret_cast( pColorBlendEquations ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::setColorBlendEquationEXT( uint32_t firstAttachment, VULKAN_HPP_NAMESPACE::ArrayProxy const & colorBlendEquations, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdSetColorBlendEquationEXT && "Function requires or " ); # endif d.vkCmdSetColorBlendEquationEXT( m_commandBuffer, firstAttachment, colorBlendEquations.size(), reinterpret_cast( colorBlendEquations.data() ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::setColorWriteMaskEXT( uint32_t firstAttachment, uint32_t attachmentCount, const VULKAN_HPP_NAMESPACE::ColorComponentFlags * pColorWriteMasks, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetColorWriteMaskEXT( static_cast( m_commandBuffer ), firstAttachment, attachmentCount, reinterpret_cast( pColorWriteMasks ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::setColorWriteMaskEXT( uint32_t firstAttachment, VULKAN_HPP_NAMESPACE::ArrayProxy const & colorWriteMasks, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdSetColorWriteMaskEXT && "Function requires or " ); # endif d.vkCmdSetColorWriteMaskEXT( m_commandBuffer, firstAttachment, colorWriteMasks.size(), reinterpret_cast( colorWriteMasks.data() ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::setTessellationDomainOriginEXT( VULKAN_HPP_NAMESPACE::TessellationDomainOrigin domainOrigin, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetTessellationDomainOriginEXT( static_cast( m_commandBuffer ), static_cast( domainOrigin ) ); } template VULKAN_HPP_INLINE void CommandBuffer::setRasterizationStreamEXT( uint32_t rasterizationStream, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetRasterizationStreamEXT( static_cast( m_commandBuffer ), rasterizationStream ); } template VULKAN_HPP_INLINE void CommandBuffer::setConservativeRasterizationModeEXT( VULKAN_HPP_NAMESPACE::ConservativeRasterizationModeEXT conservativeRasterizationMode, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetConservativeRasterizationModeEXT( static_cast( m_commandBuffer ), static_cast( conservativeRasterizationMode ) ); } template VULKAN_HPP_INLINE void CommandBuffer::setExtraPrimitiveOverestimationSizeEXT( float extraPrimitiveOverestimationSize, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetExtraPrimitiveOverestimationSizeEXT( static_cast( m_commandBuffer ), extraPrimitiveOverestimationSize ); } template VULKAN_HPP_INLINE void CommandBuffer::setDepthClipEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 depthClipEnable, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetDepthClipEnableEXT( static_cast( m_commandBuffer ), static_cast( depthClipEnable ) ); } template VULKAN_HPP_INLINE void CommandBuffer::setSampleLocationsEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 sampleLocationsEnable, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetSampleLocationsEnableEXT( static_cast( m_commandBuffer ), static_cast( sampleLocationsEnable ) ); } template VULKAN_HPP_INLINE void CommandBuffer::setColorBlendAdvancedEXT( uint32_t firstAttachment, uint32_t attachmentCount, const VULKAN_HPP_NAMESPACE::ColorBlendAdvancedEXT * pColorBlendAdvanced, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetColorBlendAdvancedEXT( static_cast( m_commandBuffer ), firstAttachment, attachmentCount, reinterpret_cast( pColorBlendAdvanced ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::setColorBlendAdvancedEXT( uint32_t firstAttachment, VULKAN_HPP_NAMESPACE::ArrayProxy const & colorBlendAdvanced, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdSetColorBlendAdvancedEXT && "Function requires or " ); # endif d.vkCmdSetColorBlendAdvancedEXT( m_commandBuffer, firstAttachment, colorBlendAdvanced.size(), reinterpret_cast( colorBlendAdvanced.data() ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::setProvokingVertexModeEXT( VULKAN_HPP_NAMESPACE::ProvokingVertexModeEXT provokingVertexMode, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetProvokingVertexModeEXT( static_cast( m_commandBuffer ), static_cast( provokingVertexMode ) ); } template VULKAN_HPP_INLINE void CommandBuffer::setLineRasterizationModeEXT( VULKAN_HPP_NAMESPACE::LineRasterizationModeEXT lineRasterizationMode, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetLineRasterizationModeEXT( static_cast( m_commandBuffer ), static_cast( lineRasterizationMode ) ); } template VULKAN_HPP_INLINE void CommandBuffer::setLineStippleEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 stippledLineEnable, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetLineStippleEnableEXT( static_cast( m_commandBuffer ), static_cast( stippledLineEnable ) ); } template VULKAN_HPP_INLINE void CommandBuffer::setDepthClipNegativeOneToOneEXT( VULKAN_HPP_NAMESPACE::Bool32 negativeOneToOne, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetDepthClipNegativeOneToOneEXT( static_cast( m_commandBuffer ), static_cast( negativeOneToOne ) ); } template VULKAN_HPP_INLINE void CommandBuffer::setViewportWScalingEnableNV( VULKAN_HPP_NAMESPACE::Bool32 viewportWScalingEnable, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetViewportWScalingEnableNV( static_cast( m_commandBuffer ), static_cast( viewportWScalingEnable ) ); } template VULKAN_HPP_INLINE void CommandBuffer::setViewportSwizzleNV( uint32_t firstViewport, uint32_t viewportCount, const VULKAN_HPP_NAMESPACE::ViewportSwizzleNV * pViewportSwizzles, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetViewportSwizzleNV( static_cast( m_commandBuffer ), firstViewport, viewportCount, reinterpret_cast( pViewportSwizzles ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::setViewportSwizzleNV( uint32_t firstViewport, VULKAN_HPP_NAMESPACE::ArrayProxy const & viewportSwizzles, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdSetViewportSwizzleNV && "Function requires or " ); # endif d.vkCmdSetViewportSwizzleNV( m_commandBuffer, firstViewport, viewportSwizzles.size(), reinterpret_cast( viewportSwizzles.data() ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::setCoverageToColorEnableNV( VULKAN_HPP_NAMESPACE::Bool32 coverageToColorEnable, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetCoverageToColorEnableNV( static_cast( m_commandBuffer ), static_cast( coverageToColorEnable ) ); } template VULKAN_HPP_INLINE void CommandBuffer::setCoverageToColorLocationNV( uint32_t coverageToColorLocation, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetCoverageToColorLocationNV( static_cast( m_commandBuffer ), coverageToColorLocation ); } template VULKAN_HPP_INLINE void CommandBuffer::setCoverageModulationModeNV( VULKAN_HPP_NAMESPACE::CoverageModulationModeNV coverageModulationMode, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetCoverageModulationModeNV( static_cast( m_commandBuffer ), static_cast( coverageModulationMode ) ); } template VULKAN_HPP_INLINE void CommandBuffer::setCoverageModulationTableEnableNV( VULKAN_HPP_NAMESPACE::Bool32 coverageModulationTableEnable, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetCoverageModulationTableEnableNV( static_cast( m_commandBuffer ), static_cast( coverageModulationTableEnable ) ); } template VULKAN_HPP_INLINE void CommandBuffer::setCoverageModulationTableNV( uint32_t coverageModulationTableCount, const float * pCoverageModulationTable, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetCoverageModulationTableNV( static_cast( m_commandBuffer ), coverageModulationTableCount, pCoverageModulationTable ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::setCoverageModulationTableNV( VULKAN_HPP_NAMESPACE::ArrayProxy const & coverageModulationTable, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdSetCoverageModulationTableNV && "Function requires or " ); # endif d.vkCmdSetCoverageModulationTableNV( m_commandBuffer, coverageModulationTable.size(), coverageModulationTable.data() ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::setShadingRateImageEnableNV( VULKAN_HPP_NAMESPACE::Bool32 shadingRateImageEnable, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetShadingRateImageEnableNV( static_cast( m_commandBuffer ), static_cast( shadingRateImageEnable ) ); } template VULKAN_HPP_INLINE void CommandBuffer::setRepresentativeFragmentTestEnableNV( VULKAN_HPP_NAMESPACE::Bool32 representativeFragmentTestEnable, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetRepresentativeFragmentTestEnableNV( static_cast( m_commandBuffer ), static_cast( representativeFragmentTestEnable ) ); } template VULKAN_HPP_INLINE void CommandBuffer::setCoverageReductionModeNV( VULKAN_HPP_NAMESPACE::CoverageReductionModeNV coverageReductionMode, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetCoverageReductionModeNV( static_cast( m_commandBuffer ), static_cast( coverageReductionMode ) ); } //=== VK_EXT_shader_module_identifier === template VULKAN_HPP_INLINE void Device::getShaderModuleIdentifierEXT( VULKAN_HPP_NAMESPACE::ShaderModule shaderModule, VULKAN_HPP_NAMESPACE::ShaderModuleIdentifierEXT * pIdentifier, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkGetShaderModuleIdentifierEXT( static_cast( m_device ), static_cast( shaderModule ), reinterpret_cast( pIdentifier ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::ShaderModuleIdentifierEXT Device::getShaderModuleIdentifierEXT( VULKAN_HPP_NAMESPACE::ShaderModule shaderModule, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetShaderModuleIdentifierEXT && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::ShaderModuleIdentifierEXT identifier; d.vkGetShaderModuleIdentifierEXT( m_device, static_cast( shaderModule ), reinterpret_cast( &identifier ) ); return identifier; } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::getShaderModuleCreateInfoIdentifierEXT( const VULKAN_HPP_NAMESPACE::ShaderModuleCreateInfo * pCreateInfo, VULKAN_HPP_NAMESPACE::ShaderModuleIdentifierEXT * pIdentifier, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkGetShaderModuleCreateInfoIdentifierEXT( static_cast( m_device ), reinterpret_cast( pCreateInfo ), reinterpret_cast( pIdentifier ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::ShaderModuleIdentifierEXT Device::getShaderModuleCreateInfoIdentifierEXT( const VULKAN_HPP_NAMESPACE::ShaderModuleCreateInfo & createInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetShaderModuleCreateInfoIdentifierEXT && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::ShaderModuleIdentifierEXT identifier; d.vkGetShaderModuleCreateInfoIdentifierEXT( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( &identifier ) ); return identifier; } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_NV_optical_flow === template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result PhysicalDevice::getOpticalFlowImageFormatsNV( const VULKAN_HPP_NAMESPACE::OpticalFlowImageFormatInfoNV * pOpticalFlowImageFormatInfo, uint32_t * pFormatCount, VULKAN_HPP_NAMESPACE::OpticalFlowImageFormatPropertiesNV * pImageFormatProperties, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetPhysicalDeviceOpticalFlowImageFormatsNV( static_cast( m_physicalDevice ), reinterpret_cast( pOpticalFlowImageFormatInfo ), pFormatCount, reinterpret_cast( pImageFormatProperties ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getOpticalFlowImageFormatsNV( const VULKAN_HPP_NAMESPACE::OpticalFlowImageFormatInfoNV & opticalFlowImageFormatInfo, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceOpticalFlowImageFormatsNV && "Function requires " ); # endif std::vector imageFormatProperties; uint32_t formatCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkGetPhysicalDeviceOpticalFlowImageFormatsNV( m_physicalDevice, reinterpret_cast( &opticalFlowImageFormatInfo ), &formatCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && formatCount ) { imageFormatProperties.resize( formatCount ); result = static_cast( d.vkGetPhysicalDeviceOpticalFlowImageFormatsNV( m_physicalDevice, reinterpret_cast( &opticalFlowImageFormatInfo ), &formatCount, reinterpret_cast( imageFormatProperties.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getOpticalFlowImageFormatsNV" ); VULKAN_HPP_ASSERT( formatCount <= imageFormatProperties.size() ); if ( formatCount < imageFormatProperties.size() ) { imageFormatProperties.resize( formatCount ); } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( imageFormatProperties ) ); } template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getOpticalFlowImageFormatsNV( const VULKAN_HPP_NAMESPACE::OpticalFlowImageFormatInfoNV & opticalFlowImageFormatInfo, OpticalFlowImageFormatPropertiesNVAllocator & opticalFlowImageFormatPropertiesNVAllocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceOpticalFlowImageFormatsNV && "Function requires " ); # endif std::vector imageFormatProperties( opticalFlowImageFormatPropertiesNVAllocator ); uint32_t formatCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkGetPhysicalDeviceOpticalFlowImageFormatsNV( m_physicalDevice, reinterpret_cast( &opticalFlowImageFormatInfo ), &formatCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && formatCount ) { imageFormatProperties.resize( formatCount ); result = static_cast( d.vkGetPhysicalDeviceOpticalFlowImageFormatsNV( m_physicalDevice, reinterpret_cast( &opticalFlowImageFormatInfo ), &formatCount, reinterpret_cast( imageFormatProperties.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getOpticalFlowImageFormatsNV" ); VULKAN_HPP_ASSERT( formatCount <= imageFormatProperties.size() ); if ( formatCount < imageFormatProperties.size() ) { imageFormatProperties.resize( formatCount ); } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( imageFormatProperties ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::createOpticalFlowSessionNV( const VULKAN_HPP_NAMESPACE::OpticalFlowSessionCreateInfoNV * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::OpticalFlowSessionNV * pSession, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkCreateOpticalFlowSessionNV( static_cast( m_device ), reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSession ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::createOpticalFlowSessionNV( const VULKAN_HPP_NAMESPACE::OpticalFlowSessionCreateInfoNV & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateOpticalFlowSessionNV && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::OpticalFlowSessionNV session; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateOpticalFlowSessionNV( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &session ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createOpticalFlowSessionNV" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( session ) ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::createOpticalFlowSessionNVUnique( const VULKAN_HPP_NAMESPACE::OpticalFlowSessionCreateInfoNV & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateOpticalFlowSessionNV && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::OpticalFlowSessionNV session; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateOpticalFlowSessionNV( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &session ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createOpticalFlowSessionNVUnique" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, UniqueHandle( session, detail::ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::destroyOpticalFlowSessionNV( VULKAN_HPP_NAMESPACE::OpticalFlowSessionNV session, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDestroyOpticalFlowSessionNV( static_cast( m_device ), static_cast( session ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::destroyOpticalFlowSessionNV( VULKAN_HPP_NAMESPACE::OpticalFlowSessionNV session, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDestroyOpticalFlowSessionNV && "Function requires " ); # endif d.vkDestroyOpticalFlowSessionNV( m_device, static_cast( session ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::OpticalFlowSessionNV session, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDestroyOpticalFlowSessionNV( static_cast( m_device ), static_cast( session ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::OpticalFlowSessionNV session, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDestroyOpticalFlowSessionNV && "Function requires " ); # endif d.vkDestroyOpticalFlowSessionNV( m_device, static_cast( session ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::bindOpticalFlowSessionImageNV( VULKAN_HPP_NAMESPACE::OpticalFlowSessionNV session, VULKAN_HPP_NAMESPACE::OpticalFlowSessionBindingPointNV bindingPoint, VULKAN_HPP_NAMESPACE::ImageView view, VULKAN_HPP_NAMESPACE::ImageLayout layout, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkBindOpticalFlowSessionImageNV( static_cast( m_device ), static_cast( session ), static_cast( bindingPoint ), static_cast( view ), static_cast( layout ) ) ); } #else template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS VULKAN_HPP_INLINE typename ResultValueType::type Device::bindOpticalFlowSessionImageNV( VULKAN_HPP_NAMESPACE::OpticalFlowSessionNV session, VULKAN_HPP_NAMESPACE::OpticalFlowSessionBindingPointNV bindingPoint, VULKAN_HPP_NAMESPACE::ImageView view, VULKAN_HPP_NAMESPACE::ImageLayout layout, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkBindOpticalFlowSessionImageNV && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkBindOpticalFlowSessionImageNV( m_device, static_cast( session ), static_cast( bindingPoint ), static_cast( view ), static_cast( layout ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::bindOpticalFlowSessionImageNV" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ template VULKAN_HPP_INLINE void CommandBuffer::opticalFlowExecuteNV( VULKAN_HPP_NAMESPACE::OpticalFlowSessionNV session, const VULKAN_HPP_NAMESPACE::OpticalFlowExecuteInfoNV * pExecuteInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdOpticalFlowExecuteNV( static_cast( m_commandBuffer ), static_cast( session ), reinterpret_cast( pExecuteInfo ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::opticalFlowExecuteNV( VULKAN_HPP_NAMESPACE::OpticalFlowSessionNV session, const VULKAN_HPP_NAMESPACE::OpticalFlowExecuteInfoNV & executeInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdOpticalFlowExecuteNV && "Function requires " ); # endif d.vkCmdOpticalFlowExecuteNV( m_commandBuffer, static_cast( session ), reinterpret_cast( &executeInfo ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_KHR_maintenance5 === template VULKAN_HPP_INLINE void CommandBuffer::bindIndexBuffer2KHR( VULKAN_HPP_NAMESPACE::Buffer buffer, VULKAN_HPP_NAMESPACE::DeviceSize offset, VULKAN_HPP_NAMESPACE::DeviceSize size, VULKAN_HPP_NAMESPACE::IndexType indexType, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdBindIndexBuffer2KHR( static_cast( m_commandBuffer ), static_cast( buffer ), static_cast( offset ), static_cast( size ), static_cast( indexType ) ); } template VULKAN_HPP_INLINE void Device::getRenderingAreaGranularityKHR( const VULKAN_HPP_NAMESPACE::RenderingAreaInfo * pRenderingAreaInfo, VULKAN_HPP_NAMESPACE::Extent2D * pGranularity, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkGetRenderingAreaGranularityKHR( static_cast( m_device ), reinterpret_cast( pRenderingAreaInfo ), reinterpret_cast( pGranularity ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Extent2D Device::getRenderingAreaGranularityKHR( const VULKAN_HPP_NAMESPACE::RenderingAreaInfo & renderingAreaInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetRenderingAreaGranularityKHR && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::Extent2D granularity; d.vkGetRenderingAreaGranularityKHR( m_device, reinterpret_cast( &renderingAreaInfo ), reinterpret_cast( &granularity ) ); return granularity; } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::getImageSubresourceLayoutKHR( const VULKAN_HPP_NAMESPACE::DeviceImageSubresourceInfo * pInfo, VULKAN_HPP_NAMESPACE::SubresourceLayout2 * pLayout, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkGetDeviceImageSubresourceLayoutKHR( static_cast( m_device ), reinterpret_cast( pInfo ), reinterpret_cast( pLayout ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::SubresourceLayout2 Device::getImageSubresourceLayoutKHR( const VULKAN_HPP_NAMESPACE::DeviceImageSubresourceInfo & info, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetDeviceImageSubresourceLayoutKHR && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::SubresourceLayout2 layout; d.vkGetDeviceImageSubresourceLayoutKHR( m_device, reinterpret_cast( &info ), reinterpret_cast( &layout ) ); return layout; } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::StructureChain Device::getImageSubresourceLayoutKHR( const VULKAN_HPP_NAMESPACE::DeviceImageSubresourceInfo & info, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetDeviceImageSubresourceLayoutKHR && "Function requires or " ); # endif VULKAN_HPP_NAMESPACE::StructureChain structureChain; VULKAN_HPP_NAMESPACE::SubresourceLayout2 & layout = structureChain.template get(); d.vkGetDeviceImageSubresourceLayoutKHR( m_device, reinterpret_cast( &info ), reinterpret_cast( &layout ) ); return structureChain; } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::getImageSubresourceLayout2KHR( VULKAN_HPP_NAMESPACE::Image image, const VULKAN_HPP_NAMESPACE::ImageSubresource2 * pSubresource, VULKAN_HPP_NAMESPACE::SubresourceLayout2 * pLayout, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkGetImageSubresourceLayout2KHR( static_cast( m_device ), static_cast( image ), reinterpret_cast( pSubresource ), reinterpret_cast( pLayout ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::SubresourceLayout2 Device::getImageSubresourceLayout2KHR( VULKAN_HPP_NAMESPACE::Image image, const VULKAN_HPP_NAMESPACE::ImageSubresource2 & subresource, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetImageSubresourceLayout2KHR && "Function requires or or or " ); # endif VULKAN_HPP_NAMESPACE::SubresourceLayout2 layout; d.vkGetImageSubresourceLayout2KHR( m_device, static_cast( image ), reinterpret_cast( &subresource ), reinterpret_cast( &layout ) ); return layout; } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::StructureChain Device::getImageSubresourceLayout2KHR( VULKAN_HPP_NAMESPACE::Image image, const VULKAN_HPP_NAMESPACE::ImageSubresource2 & subresource, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetImageSubresourceLayout2KHR && "Function requires or or or " ); # endif VULKAN_HPP_NAMESPACE::StructureChain structureChain; VULKAN_HPP_NAMESPACE::SubresourceLayout2 & layout = structureChain.template get(); d.vkGetImageSubresourceLayout2KHR( m_device, static_cast( image ), reinterpret_cast( &subresource ), reinterpret_cast( &layout ) ); return structureChain; } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_AMD_anti_lag === template VULKAN_HPP_INLINE void Device::antiLagUpdateAMD( const VULKAN_HPP_NAMESPACE::AntiLagDataAMD * pData, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkAntiLagUpdateAMD( static_cast( m_device ), reinterpret_cast( pData ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::antiLagUpdateAMD( const VULKAN_HPP_NAMESPACE::AntiLagDataAMD & data, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkAntiLagUpdateAMD && "Function requires " ); # endif d.vkAntiLagUpdateAMD( m_device, reinterpret_cast( &data ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_EXT_shader_object === template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::createShadersEXT( uint32_t createInfoCount, const VULKAN_HPP_NAMESPACE::ShaderCreateInfoEXT * pCreateInfos, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::ShaderEXT * pShaders, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkCreateShadersEXT( static_cast( m_device ), createInfoCount, reinterpret_cast( pCreateInfos ), reinterpret_cast( pAllocator ), reinterpret_cast( pShaders ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue> Device::createShadersEXT( VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateShadersEXT && "Function requires " ); # endif std::vector shaders( createInfos.size() ); VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateShadersEXT( m_device, createInfos.size(), reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( shaders.data() ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createShadersEXT", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eIncompatibleShaderBinaryEXT } ); return ResultValue>( result, std::move( shaders ) ); } template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue> Device::createShadersEXT( VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, Optional allocator, ShaderEXTAllocator & shaderEXTAllocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateShadersEXT && "Function requires " ); # endif std::vector shaders( createInfos.size(), shaderEXTAllocator ); VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateShadersEXT( m_device, createInfos.size(), reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( shaders.data() ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createShadersEXT", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eIncompatibleShaderBinaryEXT } ); return ResultValue>( result, std::move( shaders ) ); } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue Device::createShaderEXT( const VULKAN_HPP_NAMESPACE::ShaderCreateInfoEXT & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateShadersEXT && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::ShaderEXT shader; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateShadersEXT( m_device, 1, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &shader ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createShaderEXT", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eIncompatibleShaderBinaryEXT } ); return ResultValue( result, std::move( shader ) ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE template < typename Dispatch, typename ShaderEXTAllocator, typename std::enable_if>::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue, ShaderEXTAllocator>> Device::createShadersEXTUnique( VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateShadersEXT && "Function requires " ); # endif std::vector shaders( createInfos.size() ); VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateShadersEXT( m_device, createInfos.size(), reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( shaders.data() ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createShadersEXTUnique", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eIncompatibleShaderBinaryEXT } ); std::vector, ShaderEXTAllocator> uniqueShaders; uniqueShaders.reserve( createInfos.size() ); detail::ObjectDestroy deleter( *this, allocator, d ); for ( auto const & shader : shaders ) { uniqueShaders.push_back( UniqueHandle( shader, deleter ) ); } return ResultValue, ShaderEXTAllocator>>( result, std::move( uniqueShaders ) ); } template < typename Dispatch, typename ShaderEXTAllocator, typename std::enable_if>::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue, ShaderEXTAllocator>> Device::createShadersEXTUnique( VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, Optional allocator, ShaderEXTAllocator & shaderEXTAllocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateShadersEXT && "Function requires " ); # endif std::vector shaders( createInfos.size() ); VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateShadersEXT( m_device, createInfos.size(), reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( shaders.data() ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createShadersEXTUnique", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eIncompatibleShaderBinaryEXT } ); std::vector, ShaderEXTAllocator> uniqueShaders( shaderEXTAllocator ); uniqueShaders.reserve( createInfos.size() ); detail::ObjectDestroy deleter( *this, allocator, d ); for ( auto const & shader : shaders ) { uniqueShaders.push_back( UniqueHandle( shader, deleter ) ); } return ResultValue, ShaderEXTAllocator>>( result, std::move( uniqueShaders ) ); } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue> Device::createShaderEXTUnique( const VULKAN_HPP_NAMESPACE::ShaderCreateInfoEXT & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateShadersEXT && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::ShaderEXT shader; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateShadersEXT( m_device, 1, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &shader ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createShaderEXTUnique", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eIncompatibleShaderBinaryEXT } ); return ResultValue>( result, UniqueHandle( shader, detail::ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::destroyShaderEXT( VULKAN_HPP_NAMESPACE::ShaderEXT shader, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDestroyShaderEXT( static_cast( m_device ), static_cast( shader ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::destroyShaderEXT( VULKAN_HPP_NAMESPACE::ShaderEXT shader, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDestroyShaderEXT && "Function requires " ); # endif d.vkDestroyShaderEXT( m_device, static_cast( shader ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::ShaderEXT shader, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDestroyShaderEXT( static_cast( m_device ), static_cast( shader ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::ShaderEXT shader, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDestroyShaderEXT && "Function requires " ); # endif d.vkDestroyShaderEXT( m_device, static_cast( shader ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getShaderBinaryDataEXT( VULKAN_HPP_NAMESPACE::ShaderEXT shader, size_t * pDataSize, void * pData, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetShaderBinaryDataEXT( static_cast( m_device ), static_cast( shader ), pDataSize, pData ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::getShaderBinaryDataEXT( VULKAN_HPP_NAMESPACE::ShaderEXT shader, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetShaderBinaryDataEXT && "Function requires " ); # endif std::vector data; size_t dataSize; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkGetShaderBinaryDataEXT( m_device, static_cast( shader ), &dataSize, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && dataSize ) { data.resize( dataSize ); result = static_cast( d.vkGetShaderBinaryDataEXT( m_device, static_cast( shader ), &dataSize, reinterpret_cast( data.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getShaderBinaryDataEXT" ); VULKAN_HPP_ASSERT( dataSize <= data.size() ); if ( dataSize < data.size() ) { data.resize( dataSize ); } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( data ) ); } template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::getShaderBinaryDataEXT( VULKAN_HPP_NAMESPACE::ShaderEXT shader, Uint8_tAllocator & uint8_tAllocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetShaderBinaryDataEXT && "Function requires " ); # endif std::vector data( uint8_tAllocator ); size_t dataSize; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkGetShaderBinaryDataEXT( m_device, static_cast( shader ), &dataSize, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && dataSize ) { data.resize( dataSize ); result = static_cast( d.vkGetShaderBinaryDataEXT( m_device, static_cast( shader ), &dataSize, reinterpret_cast( data.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getShaderBinaryDataEXT" ); VULKAN_HPP_ASSERT( dataSize <= data.size() ); if ( dataSize < data.size() ) { data.resize( dataSize ); } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( data ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::bindShadersEXT( uint32_t stageCount, const VULKAN_HPP_NAMESPACE::ShaderStageFlagBits * pStages, const VULKAN_HPP_NAMESPACE::ShaderEXT * pShaders, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdBindShadersEXT( static_cast( m_commandBuffer ), stageCount, reinterpret_cast( pStages ), reinterpret_cast( pShaders ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::bindShadersEXT( VULKAN_HPP_NAMESPACE::ArrayProxy const & stages, VULKAN_HPP_NAMESPACE::ArrayProxy const & shaders, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdBindShadersEXT && "Function requires " ); # endif # ifdef VULKAN_HPP_NO_EXCEPTIONS VULKAN_HPP_ASSERT( stages.size() == shaders.size() ); # else if ( stages.size() != shaders.size() ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::bindShadersEXT: stages.size() != shaders.size()" ); } # endif /*VULKAN_HPP_NO_EXCEPTIONS*/ d.vkCmdBindShadersEXT( m_commandBuffer, stages.size(), reinterpret_cast( stages.data() ), reinterpret_cast( shaders.data() ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::setDepthClampRangeEXT( VULKAN_HPP_NAMESPACE::DepthClampModeEXT depthClampMode, const VULKAN_HPP_NAMESPACE::DepthClampRangeEXT * pDepthClampRange, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetDepthClampRangeEXT( static_cast( m_commandBuffer ), static_cast( depthClampMode ), reinterpret_cast( pDepthClampRange ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::setDepthClampRangeEXT( VULKAN_HPP_NAMESPACE::DepthClampModeEXT depthClampMode, Optional depthClampRange, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdSetDepthClampRangeEXT && "Function requires or " ); # endif d.vkCmdSetDepthClampRangeEXT( m_commandBuffer, static_cast( depthClampMode ), reinterpret_cast( static_cast( depthClampRange ) ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_KHR_pipeline_binary === template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::createPipelineBinariesKHR( const VULKAN_HPP_NAMESPACE::PipelineBinaryCreateInfoKHR * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::PipelineBinaryHandlesInfoKHR * pBinaries, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkCreatePipelineBinariesKHR( static_cast( m_device ), reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pBinaries ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue> Device::createPipelineBinariesKHR( const VULKAN_HPP_NAMESPACE::PipelineBinaryCreateInfoKHR & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreatePipelineBinariesKHR && "Function requires " ); # endif std::vector pipelineBinaries; VULKAN_HPP_NAMESPACE::PipelineBinaryHandlesInfoKHR binaries; VULKAN_HPP_NAMESPACE::Result result; if ( createInfo.pKeysAndDataInfo ) { VULKAN_HPP_ASSERT( !createInfo.pipeline && !createInfo.pPipelineCreateInfo ); pipelineBinaries.resize( createInfo.pKeysAndDataInfo->binaryCount ); binaries.pipelineBinaryCount = createInfo.pKeysAndDataInfo->binaryCount; binaries.pPipelineBinaries = pipelineBinaries.data(); result = static_cast( d.vkCreatePipelineBinariesKHR( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &binaries ) ) ); } else { VULKAN_HPP_ASSERT( !createInfo.pipeline ^ !createInfo.pPipelineCreateInfo ); result = static_cast( d.vkCreatePipelineBinariesKHR( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &binaries ) ) ); if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) { pipelineBinaries.resize( binaries.pipelineBinaryCount ); binaries.pPipelineBinaries = pipelineBinaries.data(); result = static_cast( d.vkCreatePipelineBinariesKHR( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &binaries ) ) ); } } VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createPipelineBinariesKHR", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eIncomplete, VULKAN_HPP_NAMESPACE::Result::ePipelineBinaryMissingKHR } ); return ResultValue>( result, std::move( pipelineBinaries ) ); } template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue> Device::createPipelineBinariesKHR( const VULKAN_HPP_NAMESPACE::PipelineBinaryCreateInfoKHR & createInfo, Optional allocator, PipelineBinaryKHRAllocator & pipelineBinaryKHRAllocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreatePipelineBinariesKHR && "Function requires " ); # endif std::vector pipelineBinaries( pipelineBinaryKHRAllocator ); VULKAN_HPP_NAMESPACE::PipelineBinaryHandlesInfoKHR binaries; VULKAN_HPP_NAMESPACE::Result result; if ( createInfo.pKeysAndDataInfo ) { VULKAN_HPP_ASSERT( !createInfo.pipeline && !createInfo.pPipelineCreateInfo ); pipelineBinaries.resize( createInfo.pKeysAndDataInfo->binaryCount ); binaries.pipelineBinaryCount = createInfo.pKeysAndDataInfo->binaryCount; binaries.pPipelineBinaries = pipelineBinaries.data(); result = static_cast( d.vkCreatePipelineBinariesKHR( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &binaries ) ) ); } else { VULKAN_HPP_ASSERT( !createInfo.pipeline ^ !createInfo.pPipelineCreateInfo ); result = static_cast( d.vkCreatePipelineBinariesKHR( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &binaries ) ) ); if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) { pipelineBinaries.resize( binaries.pipelineBinaryCount ); binaries.pPipelineBinaries = pipelineBinaries.data(); result = static_cast( d.vkCreatePipelineBinariesKHR( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &binaries ) ) ); } } VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createPipelineBinariesKHR", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eIncomplete, VULKAN_HPP_NAMESPACE::Result::ePipelineBinaryMissingKHR } ); return ResultValue>( result, std::move( pipelineBinaries ) ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE template >::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue, PipelineBinaryKHRAllocator>> Device::createPipelineBinariesKHRUnique( const VULKAN_HPP_NAMESPACE::PipelineBinaryCreateInfoKHR & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreatePipelineBinariesKHR && "Function requires " ); # endif std::vector pipelineBinaries; VULKAN_HPP_NAMESPACE::PipelineBinaryHandlesInfoKHR binaries; VULKAN_HPP_NAMESPACE::Result result; if ( createInfo.pKeysAndDataInfo ) { VULKAN_HPP_ASSERT( !createInfo.pipeline && !createInfo.pPipelineCreateInfo ); pipelineBinaries.resize( createInfo.pKeysAndDataInfo->binaryCount ); binaries.pipelineBinaryCount = createInfo.pKeysAndDataInfo->binaryCount; binaries.pPipelineBinaries = pipelineBinaries.data(); result = static_cast( d.vkCreatePipelineBinariesKHR( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &binaries ) ) ); } else { VULKAN_HPP_ASSERT( !createInfo.pipeline ^ !createInfo.pPipelineCreateInfo ); result = static_cast( d.vkCreatePipelineBinariesKHR( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &binaries ) ) ); if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) { pipelineBinaries.resize( binaries.pipelineBinaryCount ); binaries.pPipelineBinaries = pipelineBinaries.data(); result = static_cast( d.vkCreatePipelineBinariesKHR( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &binaries ) ) ); } } VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createPipelineBinariesKHRUnique", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eIncomplete, VULKAN_HPP_NAMESPACE::Result::ePipelineBinaryMissingKHR } ); std::vector, PipelineBinaryKHRAllocator> uniquePipelineBinaries; uniquePipelineBinaries.reserve( pipelineBinaries.size() ); detail::ObjectDestroy deleter( *this, allocator, d ); for ( auto const & pipelineBinary : pipelineBinaries ) { uniquePipelineBinaries.push_back( UniqueHandle( pipelineBinary, deleter ) ); } return ResultValue, PipelineBinaryKHRAllocator>>( result, std::move( uniquePipelineBinaries ) ); } template >::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue, PipelineBinaryKHRAllocator>> Device::createPipelineBinariesKHRUnique( const VULKAN_HPP_NAMESPACE::PipelineBinaryCreateInfoKHR & createInfo, Optional allocator, PipelineBinaryKHRAllocator & pipelineBinaryKHRAllocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreatePipelineBinariesKHR && "Function requires " ); # endif std::vector pipelineBinaries; VULKAN_HPP_NAMESPACE::PipelineBinaryHandlesInfoKHR binaries; VULKAN_HPP_NAMESPACE::Result result; if ( createInfo.pKeysAndDataInfo ) { VULKAN_HPP_ASSERT( !createInfo.pipeline && !createInfo.pPipelineCreateInfo ); pipelineBinaries.resize( createInfo.pKeysAndDataInfo->binaryCount ); binaries.pipelineBinaryCount = createInfo.pKeysAndDataInfo->binaryCount; binaries.pPipelineBinaries = pipelineBinaries.data(); result = static_cast( d.vkCreatePipelineBinariesKHR( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &binaries ) ) ); } else { VULKAN_HPP_ASSERT( !createInfo.pipeline ^ !createInfo.pPipelineCreateInfo ); result = static_cast( d.vkCreatePipelineBinariesKHR( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &binaries ) ) ); if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) { pipelineBinaries.resize( binaries.pipelineBinaryCount ); binaries.pPipelineBinaries = pipelineBinaries.data(); result = static_cast( d.vkCreatePipelineBinariesKHR( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &binaries ) ) ); } } VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createPipelineBinariesKHRUnique", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eIncomplete, VULKAN_HPP_NAMESPACE::Result::ePipelineBinaryMissingKHR } ); std::vector, PipelineBinaryKHRAllocator> uniquePipelineBinaries( pipelineBinaryKHRAllocator ); uniquePipelineBinaries.reserve( pipelineBinaries.size() ); detail::ObjectDestroy deleter( *this, allocator, d ); for ( auto const & pipelineBinary : pipelineBinaries ) { uniquePipelineBinaries.push_back( UniqueHandle( pipelineBinary, deleter ) ); } return ResultValue, PipelineBinaryKHRAllocator>>( result, std::move( uniquePipelineBinaries ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::destroyPipelineBinaryKHR( VULKAN_HPP_NAMESPACE::PipelineBinaryKHR pipelineBinary, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDestroyPipelineBinaryKHR( static_cast( m_device ), static_cast( pipelineBinary ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::destroyPipelineBinaryKHR( VULKAN_HPP_NAMESPACE::PipelineBinaryKHR pipelineBinary, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDestroyPipelineBinaryKHR && "Function requires " ); # endif d.vkDestroyPipelineBinaryKHR( m_device, static_cast( pipelineBinary ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::PipelineBinaryKHR pipelineBinary, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDestroyPipelineBinaryKHR( static_cast( m_device ), static_cast( pipelineBinary ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::PipelineBinaryKHR pipelineBinary, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDestroyPipelineBinaryKHR && "Function requires " ); # endif d.vkDestroyPipelineBinaryKHR( m_device, static_cast( pipelineBinary ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getPipelineKeyKHR( const VULKAN_HPP_NAMESPACE::PipelineCreateInfoKHR * pPipelineCreateInfo, VULKAN_HPP_NAMESPACE::PipelineBinaryKeyKHR * pPipelineKey, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetPipelineKeyKHR( static_cast( m_device ), reinterpret_cast( pPipelineCreateInfo ), reinterpret_cast( pPipelineKey ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::getPipelineKeyKHR( Optional pipelineCreateInfo, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPipelineKeyKHR && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::PipelineBinaryKeyKHR pipelineKey; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetPipelineKeyKHR( m_device, reinterpret_cast( static_cast( pipelineCreateInfo ) ), reinterpret_cast( &pipelineKey ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getPipelineKeyKHR" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( pipelineKey ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getPipelineBinaryDataKHR( const VULKAN_HPP_NAMESPACE::PipelineBinaryDataInfoKHR * pInfo, VULKAN_HPP_NAMESPACE::PipelineBinaryKeyKHR * pPipelineBinaryKey, size_t * pPipelineBinaryDataSize, void * pPipelineBinaryData, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetPipelineBinaryDataKHR( static_cast( m_device ), reinterpret_cast( pInfo ), reinterpret_cast( pPipelineBinaryKey ), pPipelineBinaryDataSize, pPipelineBinaryData ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>>::type Device::getPipelineBinaryDataKHR( const VULKAN_HPP_NAMESPACE::PipelineBinaryDataInfoKHR & info, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPipelineBinaryDataKHR && "Function requires " ); # endif std::pair> data_; VULKAN_HPP_NAMESPACE::PipelineBinaryKeyKHR & pipelineBinaryKey = data_.first; std::vector & pipelineBinaryData = data_.second; size_t pipelineBinaryDataSize; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetPipelineBinaryDataKHR( m_device, reinterpret_cast( &info ), reinterpret_cast( &pipelineBinaryKey ), &pipelineBinaryDataSize, nullptr ) ); if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) { pipelineBinaryData.resize( pipelineBinaryDataSize ); result = static_cast( d.vkGetPipelineBinaryDataKHR( m_device, reinterpret_cast( &info ), reinterpret_cast( &pipelineBinaryKey ), &pipelineBinaryDataSize, reinterpret_cast( pipelineBinaryData.data() ) ) ); } VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getPipelineBinaryDataKHR" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( data_ ) ); } template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>>::type Device::getPipelineBinaryDataKHR( const VULKAN_HPP_NAMESPACE::PipelineBinaryDataInfoKHR & info, Uint8_tAllocator & uint8_tAllocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPipelineBinaryDataKHR && "Function requires " ); # endif std::pair> data_( std::piecewise_construct, std::forward_as_tuple(), std::forward_as_tuple( uint8_tAllocator ) ); VULKAN_HPP_NAMESPACE::PipelineBinaryKeyKHR & pipelineBinaryKey = data_.first; std::vector & pipelineBinaryData = data_.second; size_t pipelineBinaryDataSize; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetPipelineBinaryDataKHR( m_device, reinterpret_cast( &info ), reinterpret_cast( &pipelineBinaryKey ), &pipelineBinaryDataSize, nullptr ) ); if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) { pipelineBinaryData.resize( pipelineBinaryDataSize ); result = static_cast( d.vkGetPipelineBinaryDataKHR( m_device, reinterpret_cast( &info ), reinterpret_cast( &pipelineBinaryKey ), &pipelineBinaryDataSize, reinterpret_cast( pipelineBinaryData.data() ) ) ); } VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getPipelineBinaryDataKHR" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( data_ ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE Result Device::releaseCapturedPipelineDataKHR( const VULKAN_HPP_NAMESPACE::ReleaseCapturedPipelineDataInfoKHR * pInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkReleaseCapturedPipelineDataKHR( static_cast( m_device ), reinterpret_cast( pInfo ), reinterpret_cast( pAllocator ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::releaseCapturedPipelineDataKHR( const VULKAN_HPP_NAMESPACE::ReleaseCapturedPipelineDataInfoKHR & info, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkReleaseCapturedPipelineDataKHR && "Function requires " ); # endif d.vkReleaseCapturedPipelineDataKHR( m_device, reinterpret_cast( &info ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_QCOM_tile_properties === template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getFramebufferTilePropertiesQCOM( VULKAN_HPP_NAMESPACE::Framebuffer framebuffer, uint32_t * pPropertiesCount, VULKAN_HPP_NAMESPACE::TilePropertiesQCOM * pProperties, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetFramebufferTilePropertiesQCOM( static_cast( m_device ), static_cast( framebuffer ), pPropertiesCount, reinterpret_cast( pProperties ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::getFramebufferTilePropertiesQCOM( VULKAN_HPP_NAMESPACE::Framebuffer framebuffer, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetFramebufferTilePropertiesQCOM && "Function requires " ); # endif std::vector properties; uint32_t propertiesCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkGetFramebufferTilePropertiesQCOM( m_device, static_cast( framebuffer ), &propertiesCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertiesCount ) { properties.resize( propertiesCount ); result = static_cast( d.vkGetFramebufferTilePropertiesQCOM( m_device, static_cast( framebuffer ), &propertiesCount, reinterpret_cast( properties.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_ASSERT( propertiesCount <= properties.size() ); if ( propertiesCount < properties.size() ) { properties.resize( propertiesCount ); } return properties; } template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::getFramebufferTilePropertiesQCOM( VULKAN_HPP_NAMESPACE::Framebuffer framebuffer, TilePropertiesQCOMAllocator & tilePropertiesQCOMAllocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetFramebufferTilePropertiesQCOM && "Function requires " ); # endif std::vector properties( tilePropertiesQCOMAllocator ); uint32_t propertiesCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkGetFramebufferTilePropertiesQCOM( m_device, static_cast( framebuffer ), &propertiesCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertiesCount ) { properties.resize( propertiesCount ); result = static_cast( d.vkGetFramebufferTilePropertiesQCOM( m_device, static_cast( framebuffer ), &propertiesCount, reinterpret_cast( properties.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_ASSERT( propertiesCount <= properties.size() ); if ( propertiesCount < properties.size() ) { properties.resize( propertiesCount ); } return properties; } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE Result Device::getDynamicRenderingTilePropertiesQCOM( const VULKAN_HPP_NAMESPACE::RenderingInfo * pRenderingInfo, VULKAN_HPP_NAMESPACE::TilePropertiesQCOM * pProperties, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetDynamicRenderingTilePropertiesQCOM( static_cast( m_device ), reinterpret_cast( pRenderingInfo ), reinterpret_cast( pProperties ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::TilePropertiesQCOM Device::getDynamicRenderingTilePropertiesQCOM( const VULKAN_HPP_NAMESPACE::RenderingInfo & renderingInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetDynamicRenderingTilePropertiesQCOM && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::TilePropertiesQCOM properties; d.vkGetDynamicRenderingTilePropertiesQCOM( m_device, reinterpret_cast( &renderingInfo ), reinterpret_cast( &properties ) ); return properties; } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_NV_cooperative_vector === template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result PhysicalDevice::getCooperativeVectorPropertiesNV( uint32_t * pPropertyCount, VULKAN_HPP_NAMESPACE::CooperativeVectorPropertiesNV * pProperties, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetPhysicalDeviceCooperativeVectorPropertiesNV( static_cast( m_physicalDevice ), pPropertyCount, reinterpret_cast( pProperties ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getCooperativeVectorPropertiesNV( Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceCooperativeVectorPropertiesNV && "Function requires " ); # endif std::vector properties; uint32_t propertyCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkGetPhysicalDeviceCooperativeVectorPropertiesNV( m_physicalDevice, &propertyCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); result = static_cast( d.vkGetPhysicalDeviceCooperativeVectorPropertiesNV( m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getCooperativeVectorPropertiesNV" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( properties ) ); } template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getCooperativeVectorPropertiesNV( CooperativeVectorPropertiesNVAllocator & cooperativeVectorPropertiesNVAllocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceCooperativeVectorPropertiesNV && "Function requires " ); # endif std::vector properties( cooperativeVectorPropertiesNVAllocator ); uint32_t propertyCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkGetPhysicalDeviceCooperativeVectorPropertiesNV( m_physicalDevice, &propertyCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); result = static_cast( d.vkGetPhysicalDeviceCooperativeVectorPropertiesNV( m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getCooperativeVectorPropertiesNV" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( properties ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::convertCooperativeVectorMatrixNV( const VULKAN_HPP_NAMESPACE::ConvertCooperativeVectorMatrixInfoNV * pInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkConvertCooperativeVectorMatrixNV( static_cast( m_device ), reinterpret_cast( pInfo ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Device::convertCooperativeVectorMatrixNV( const VULKAN_HPP_NAMESPACE::ConvertCooperativeVectorMatrixInfoNV & info, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkConvertCooperativeVectorMatrixNV && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkConvertCooperativeVectorMatrixNV( m_device, reinterpret_cast( &info ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::convertCooperativeVectorMatrixNV", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eIncomplete } ); return static_cast( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::convertCooperativeVectorMatrixNV( uint32_t infoCount, const VULKAN_HPP_NAMESPACE::ConvertCooperativeVectorMatrixInfoNV * pInfos, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdConvertCooperativeVectorMatrixNV( static_cast( m_commandBuffer ), infoCount, reinterpret_cast( pInfos ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::convertCooperativeVectorMatrixNV( VULKAN_HPP_NAMESPACE::ArrayProxy const & infos, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdConvertCooperativeVectorMatrixNV && "Function requires " ); # endif d.vkCmdConvertCooperativeVectorMatrixNV( m_commandBuffer, infos.size(), reinterpret_cast( infos.data() ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_NV_low_latency2 === template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::setLatencySleepModeNV( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, const VULKAN_HPP_NAMESPACE::LatencySleepModeInfoNV * pSleepModeInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkSetLatencySleepModeNV( static_cast( m_device ), static_cast( swapchain ), reinterpret_cast( pSleepModeInfo ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE typename ResultValueType::type Device::setLatencySleepModeNV( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, const VULKAN_HPP_NAMESPACE::LatencySleepModeInfoNV & sleepModeInfo, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkSetLatencySleepModeNV && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkSetLatencySleepModeNV( m_device, static_cast( swapchain ), reinterpret_cast( &sleepModeInfo ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::setLatencySleepModeNV" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE Result Device::latencySleepNV( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, const VULKAN_HPP_NAMESPACE::LatencySleepInfoNV * pSleepInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkLatencySleepNV( static_cast( m_device ), static_cast( swapchain ), reinterpret_cast( pSleepInfo ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::latencySleepNV( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, const VULKAN_HPP_NAMESPACE::LatencySleepInfoNV & sleepInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkLatencySleepNV && "Function requires " ); # endif d.vkLatencySleepNV( m_device, static_cast( swapchain ), reinterpret_cast( &sleepInfo ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::setLatencyMarkerNV( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, const VULKAN_HPP_NAMESPACE::SetLatencyMarkerInfoNV * pLatencyMarkerInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkSetLatencyMarkerNV( static_cast( m_device ), static_cast( swapchain ), reinterpret_cast( pLatencyMarkerInfo ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::setLatencyMarkerNV( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, const VULKAN_HPP_NAMESPACE::SetLatencyMarkerInfoNV & latencyMarkerInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkSetLatencyMarkerNV && "Function requires " ); # endif d.vkSetLatencyMarkerNV( m_device, static_cast( swapchain ), reinterpret_cast( &latencyMarkerInfo ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::getLatencyTimingsNV( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, VULKAN_HPP_NAMESPACE::GetLatencyMarkerInfoNV * pLatencyMarkerInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkGetLatencyTimingsNV( static_cast( m_device ), static_cast( swapchain ), reinterpret_cast( pLatencyMarkerInfo ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template < typename LatencyTimingsFrameReportNVAllocator, typename Dispatch, typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector Device::getLatencyTimingsNV( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetLatencyTimingsNV && "Function requires " ); # endif std::vector timings; VULKAN_HPP_NAMESPACE::GetLatencyMarkerInfoNV latencyMarkerInfo; d.vkGetLatencyTimingsNV( m_device, static_cast( swapchain ), reinterpret_cast( &latencyMarkerInfo ) ); timings.resize( latencyMarkerInfo.timingCount ); latencyMarkerInfo.pTimings = timings.data(); d.vkGetLatencyTimingsNV( m_device, static_cast( swapchain ), reinterpret_cast( &latencyMarkerInfo ) ); return timings; } template < typename LatencyTimingsFrameReportNVAllocator, typename Dispatch, typename std::enable_if::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector Device::getLatencyTimingsNV( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, LatencyTimingsFrameReportNVAllocator & latencyTimingsFrameReportNVAllocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetLatencyTimingsNV && "Function requires " ); # endif std::vector timings( latencyTimingsFrameReportNVAllocator ); VULKAN_HPP_NAMESPACE::GetLatencyMarkerInfoNV latencyMarkerInfo; d.vkGetLatencyTimingsNV( m_device, static_cast( swapchain ), reinterpret_cast( &latencyMarkerInfo ) ); timings.resize( latencyMarkerInfo.timingCount ); latencyMarkerInfo.pTimings = timings.data(); d.vkGetLatencyTimingsNV( m_device, static_cast( swapchain ), reinterpret_cast( &latencyMarkerInfo ) ); return timings; } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Queue::notifyOutOfBandNV( const VULKAN_HPP_NAMESPACE::OutOfBandQueueTypeInfoNV * pQueueTypeInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkQueueNotifyOutOfBandNV( static_cast( m_queue ), reinterpret_cast( pQueueTypeInfo ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Queue::notifyOutOfBandNV( const VULKAN_HPP_NAMESPACE::OutOfBandQueueTypeInfoNV & queueTypeInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkQueueNotifyOutOfBandNV && "Function requires " ); # endif d.vkQueueNotifyOutOfBandNV( m_queue, reinterpret_cast( &queueTypeInfo ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_KHR_cooperative_matrix === template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result PhysicalDevice::getCooperativeMatrixPropertiesKHR( uint32_t * pPropertyCount, VULKAN_HPP_NAMESPACE::CooperativeMatrixPropertiesKHR * pProperties, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR( static_cast( m_physicalDevice ), pPropertyCount, reinterpret_cast( pProperties ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getCooperativeMatrixPropertiesKHR( Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR && "Function requires " ); # endif std::vector properties; uint32_t propertyCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR( m_physicalDevice, &propertyCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); result = static_cast( d.vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR( m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getCooperativeMatrixPropertiesKHR" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( properties ) ); } template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getCooperativeMatrixPropertiesKHR( CooperativeMatrixPropertiesKHRAllocator & cooperativeMatrixPropertiesKHRAllocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR && "Function requires " ); # endif std::vector properties( cooperativeMatrixPropertiesKHRAllocator ); uint32_t propertyCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR( m_physicalDevice, &propertyCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); result = static_cast( d.vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR( m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getCooperativeMatrixPropertiesKHR" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( properties ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_EXT_attachment_feedback_loop_dynamic_state === template VULKAN_HPP_INLINE void CommandBuffer::setAttachmentFeedbackLoopEnableEXT( VULKAN_HPP_NAMESPACE::ImageAspectFlags aspectMask, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetAttachmentFeedbackLoopEnableEXT( static_cast( m_commandBuffer ), static_cast( aspectMask ) ); } #if defined( VK_USE_PLATFORM_SCREEN_QNX ) //=== VK_QNX_external_memory_screen_buffer === template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getScreenBufferPropertiesQNX( const struct _screen_buffer * buffer, VULKAN_HPP_NAMESPACE::ScreenBufferPropertiesQNX * pProperties, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetScreenBufferPropertiesQNX( static_cast( m_device ), buffer, reinterpret_cast( pProperties ) ) ); } # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::getScreenBufferPropertiesQNX( const struct _screen_buffer & buffer, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetScreenBufferPropertiesQNX && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::ScreenBufferPropertiesQNX properties; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetScreenBufferPropertiesQNX( m_device, &buffer, reinterpret_cast( &properties ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getScreenBufferPropertiesQNX" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( properties ) ); } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::getScreenBufferPropertiesQNX( const struct _screen_buffer & buffer, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetScreenBufferPropertiesQNX && "Function requires " ); # endif StructureChain structureChain; VULKAN_HPP_NAMESPACE::ScreenBufferPropertiesQNX & properties = structureChain.template get(); VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetScreenBufferPropertiesQNX( m_device, &buffer, reinterpret_cast( &properties ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getScreenBufferPropertiesQNX" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( structureChain ) ); } # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #endif /*VK_USE_PLATFORM_SCREEN_QNX*/ //=== VK_KHR_line_rasterization === template VULKAN_HPP_INLINE void CommandBuffer::setLineStippleKHR( uint32_t lineStippleFactor, uint16_t lineStipplePattern, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetLineStippleKHR( static_cast( m_commandBuffer ), lineStippleFactor, lineStipplePattern ); } //=== VK_KHR_calibrated_timestamps === template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result PhysicalDevice::getCalibrateableTimeDomainsKHR( uint32_t * pTimeDomainCount, VULKAN_HPP_NAMESPACE::TimeDomainKHR * pTimeDomains, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetPhysicalDeviceCalibrateableTimeDomainsKHR( static_cast( m_physicalDevice ), pTimeDomainCount, reinterpret_cast( pTimeDomains ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getCalibrateableTimeDomainsKHR( Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceCalibrateableTimeDomainsKHR && "Function requires or " ); # endif std::vector timeDomains; uint32_t timeDomainCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkGetPhysicalDeviceCalibrateableTimeDomainsKHR( m_physicalDevice, &timeDomainCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && timeDomainCount ) { timeDomains.resize( timeDomainCount ); result = static_cast( d.vkGetPhysicalDeviceCalibrateableTimeDomainsKHR( m_physicalDevice, &timeDomainCount, reinterpret_cast( timeDomains.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getCalibrateableTimeDomainsKHR" ); VULKAN_HPP_ASSERT( timeDomainCount <= timeDomains.size() ); if ( timeDomainCount < timeDomains.size() ) { timeDomains.resize( timeDomainCount ); } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( timeDomains ) ); } template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getCalibrateableTimeDomainsKHR( TimeDomainKHRAllocator & timeDomainKHRAllocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceCalibrateableTimeDomainsKHR && "Function requires or " ); # endif std::vector timeDomains( timeDomainKHRAllocator ); uint32_t timeDomainCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkGetPhysicalDeviceCalibrateableTimeDomainsKHR( m_physicalDevice, &timeDomainCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && timeDomainCount ) { timeDomains.resize( timeDomainCount ); result = static_cast( d.vkGetPhysicalDeviceCalibrateableTimeDomainsKHR( m_physicalDevice, &timeDomainCount, reinterpret_cast( timeDomains.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getCalibrateableTimeDomainsKHR" ); VULKAN_HPP_ASSERT( timeDomainCount <= timeDomains.size() ); if ( timeDomainCount < timeDomains.size() ) { timeDomains.resize( timeDomainCount ); } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( timeDomains ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getCalibratedTimestampsKHR( uint32_t timestampCount, const VULKAN_HPP_NAMESPACE::CalibratedTimestampInfoKHR * pTimestampInfos, uint64_t * pTimestamps, uint64_t * pMaxDeviation, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetCalibratedTimestampsKHR( static_cast( m_device ), timestampCount, reinterpret_cast( pTimestampInfos ), pTimestamps, pMaxDeviation ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType, uint64_t>>::type Device::getCalibratedTimestampsKHR( VULKAN_HPP_NAMESPACE::ArrayProxy const & timestampInfos, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetCalibratedTimestampsKHR && "Function requires or " ); # endif std::pair, uint64_t> data_( std::piecewise_construct, std::forward_as_tuple( timestampInfos.size() ), std::forward_as_tuple( 0 ) ); std::vector & timestamps = data_.first; uint64_t & maxDeviation = data_.second; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetCalibratedTimestampsKHR( m_device, timestampInfos.size(), reinterpret_cast( timestampInfos.data() ), timestamps.data(), &maxDeviation ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getCalibratedTimestampsKHR" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( data_ ) ); } template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType, uint64_t>>::type Device::getCalibratedTimestampsKHR( VULKAN_HPP_NAMESPACE::ArrayProxy const & timestampInfos, Uint64_tAllocator & uint64_tAllocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetCalibratedTimestampsKHR && "Function requires or " ); # endif std::pair, uint64_t> data_( std::piecewise_construct, std::forward_as_tuple( timestampInfos.size(), uint64_tAllocator ), std::forward_as_tuple( 0 ) ); std::vector & timestamps = data_.first; uint64_t & maxDeviation = data_.second; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetCalibratedTimestampsKHR( m_device, timestampInfos.size(), reinterpret_cast( timestampInfos.data() ), timestamps.data(), &maxDeviation ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getCalibratedTimestampsKHR" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( data_ ) ); } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::getCalibratedTimestampKHR( const VULKAN_HPP_NAMESPACE::CalibratedTimestampInfoKHR & timestampInfo, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetCalibratedTimestampsKHR && "Function requires or " ); # endif std::pair data_; uint64_t & timestamp = data_.first; uint64_t & maxDeviation = data_.second; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetCalibratedTimestampsKHR( m_device, 1, reinterpret_cast( ×tampInfo ), ×tamp, &maxDeviation ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getCalibratedTimestampKHR" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( data_ ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_KHR_maintenance6 === template VULKAN_HPP_INLINE void CommandBuffer::bindDescriptorSets2KHR( const VULKAN_HPP_NAMESPACE::BindDescriptorSetsInfo * pBindDescriptorSetsInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdBindDescriptorSets2KHR( static_cast( m_commandBuffer ), reinterpret_cast( pBindDescriptorSetsInfo ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::bindDescriptorSets2KHR( const VULKAN_HPP_NAMESPACE::BindDescriptorSetsInfo & bindDescriptorSetsInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdBindDescriptorSets2KHR && "Function requires or " ); # endif d.vkCmdBindDescriptorSets2KHR( m_commandBuffer, reinterpret_cast( &bindDescriptorSetsInfo ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::pushConstants2KHR( const VULKAN_HPP_NAMESPACE::PushConstantsInfo * pPushConstantsInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdPushConstants2KHR( static_cast( m_commandBuffer ), reinterpret_cast( pPushConstantsInfo ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::pushConstants2KHR( const VULKAN_HPP_NAMESPACE::PushConstantsInfo & pushConstantsInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdPushConstants2KHR && "Function requires or " ); # endif d.vkCmdPushConstants2KHR( m_commandBuffer, reinterpret_cast( &pushConstantsInfo ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::pushDescriptorSet2KHR( const VULKAN_HPP_NAMESPACE::PushDescriptorSetInfo * pPushDescriptorSetInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdPushDescriptorSet2KHR( static_cast( m_commandBuffer ), reinterpret_cast( pPushDescriptorSetInfo ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::pushDescriptorSet2KHR( const VULKAN_HPP_NAMESPACE::PushDescriptorSetInfo & pushDescriptorSetInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdPushDescriptorSet2KHR && "Function requires or " ); # endif d.vkCmdPushDescriptorSet2KHR( m_commandBuffer, reinterpret_cast( &pushDescriptorSetInfo ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::pushDescriptorSetWithTemplate2KHR( const VULKAN_HPP_NAMESPACE::PushDescriptorSetWithTemplateInfo * pPushDescriptorSetWithTemplateInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdPushDescriptorSetWithTemplate2KHR( static_cast( m_commandBuffer ), reinterpret_cast( pPushDescriptorSetWithTemplateInfo ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::pushDescriptorSetWithTemplate2KHR( const VULKAN_HPP_NAMESPACE::PushDescriptorSetWithTemplateInfo & pushDescriptorSetWithTemplateInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdPushDescriptorSetWithTemplate2KHR && "Function requires or " ); # endif d.vkCmdPushDescriptorSetWithTemplate2KHR( m_commandBuffer, reinterpret_cast( &pushDescriptorSetWithTemplateInfo ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::setDescriptorBufferOffsets2EXT( const VULKAN_HPP_NAMESPACE::SetDescriptorBufferOffsetsInfoEXT * pSetDescriptorBufferOffsetsInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdSetDescriptorBufferOffsets2EXT( static_cast( m_commandBuffer ), reinterpret_cast( pSetDescriptorBufferOffsetsInfo ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::setDescriptorBufferOffsets2EXT( const VULKAN_HPP_NAMESPACE::SetDescriptorBufferOffsetsInfoEXT & setDescriptorBufferOffsetsInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdSetDescriptorBufferOffsets2EXT && "Function requires " ); # endif d.vkCmdSetDescriptorBufferOffsets2EXT( m_commandBuffer, reinterpret_cast( &setDescriptorBufferOffsetsInfo ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::bindDescriptorBufferEmbeddedSamplers2EXT( const VULKAN_HPP_NAMESPACE::BindDescriptorBufferEmbeddedSamplersInfoEXT * pBindDescriptorBufferEmbeddedSamplersInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdBindDescriptorBufferEmbeddedSamplers2EXT( static_cast( m_commandBuffer ), reinterpret_cast( pBindDescriptorBufferEmbeddedSamplersInfo ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::bindDescriptorBufferEmbeddedSamplers2EXT( const VULKAN_HPP_NAMESPACE::BindDescriptorBufferEmbeddedSamplersInfoEXT & bindDescriptorBufferEmbeddedSamplersInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdBindDescriptorBufferEmbeddedSamplers2EXT && "Function requires " ); # endif d.vkCmdBindDescriptorBufferEmbeddedSamplers2EXT( m_commandBuffer, reinterpret_cast( &bindDescriptorBufferEmbeddedSamplersInfo ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_NV_cluster_acceleration_structure === template VULKAN_HPP_INLINE void Device::getClusterAccelerationStructureBuildSizesNV( const VULKAN_HPP_NAMESPACE::ClusterAccelerationStructureInputInfoNV * pInfo, VULKAN_HPP_NAMESPACE::AccelerationStructureBuildSizesInfoKHR * pSizeInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkGetClusterAccelerationStructureBuildSizesNV( static_cast( m_device ), reinterpret_cast( pInfo ), reinterpret_cast( pSizeInfo ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::AccelerationStructureBuildSizesInfoKHR Device::getClusterAccelerationStructureBuildSizesNV( const VULKAN_HPP_NAMESPACE::ClusterAccelerationStructureInputInfoNV & info, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetClusterAccelerationStructureBuildSizesNV && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::AccelerationStructureBuildSizesInfoKHR sizeInfo; d.vkGetClusterAccelerationStructureBuildSizesNV( m_device, reinterpret_cast( &info ), reinterpret_cast( &sizeInfo ) ); return sizeInfo; } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::buildClusterAccelerationStructureIndirectNV( const VULKAN_HPP_NAMESPACE::ClusterAccelerationStructureCommandsInfoNV * pCommandInfos, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdBuildClusterAccelerationStructureIndirectNV( static_cast( m_commandBuffer ), reinterpret_cast( pCommandInfos ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::buildClusterAccelerationStructureIndirectNV( const VULKAN_HPP_NAMESPACE::ClusterAccelerationStructureCommandsInfoNV & commandInfos, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdBuildClusterAccelerationStructureIndirectNV && "Function requires " ); # endif d.vkCmdBuildClusterAccelerationStructureIndirectNV( m_commandBuffer, reinterpret_cast( &commandInfos ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_NV_partitioned_acceleration_structure === template VULKAN_HPP_INLINE void Device::getPartitionedAccelerationStructuresBuildSizesNV( const VULKAN_HPP_NAMESPACE::PartitionedAccelerationStructureInstancesInputNV * pInfo, VULKAN_HPP_NAMESPACE::AccelerationStructureBuildSizesInfoKHR * pSizeInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkGetPartitionedAccelerationStructuresBuildSizesNV( static_cast( m_device ), reinterpret_cast( pInfo ), reinterpret_cast( pSizeInfo ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::AccelerationStructureBuildSizesInfoKHR Device::getPartitionedAccelerationStructuresBuildSizesNV( const VULKAN_HPP_NAMESPACE::PartitionedAccelerationStructureInstancesInputNV & info, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPartitionedAccelerationStructuresBuildSizesNV && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::AccelerationStructureBuildSizesInfoKHR sizeInfo; d.vkGetPartitionedAccelerationStructuresBuildSizesNV( m_device, reinterpret_cast( &info ), reinterpret_cast( &sizeInfo ) ); return sizeInfo; } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::buildPartitionedAccelerationStructuresNV( const VULKAN_HPP_NAMESPACE::BuildPartitionedAccelerationStructureInfoNV * pBuildInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdBuildPartitionedAccelerationStructuresNV( static_cast( m_commandBuffer ), reinterpret_cast( pBuildInfo ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::buildPartitionedAccelerationStructuresNV( const VULKAN_HPP_NAMESPACE::BuildPartitionedAccelerationStructureInfoNV & buildInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdBuildPartitionedAccelerationStructuresNV && "Function requires " ); # endif d.vkCmdBuildPartitionedAccelerationStructuresNV( m_commandBuffer, reinterpret_cast( &buildInfo ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_EXT_device_generated_commands === template VULKAN_HPP_INLINE void Device::getGeneratedCommandsMemoryRequirementsEXT( const VULKAN_HPP_NAMESPACE::GeneratedCommandsMemoryRequirementsInfoEXT * pInfo, VULKAN_HPP_NAMESPACE::MemoryRequirements2 * pMemoryRequirements, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkGetGeneratedCommandsMemoryRequirementsEXT( static_cast( m_device ), reinterpret_cast( pInfo ), reinterpret_cast( pMemoryRequirements ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MemoryRequirements2 Device::getGeneratedCommandsMemoryRequirementsEXT( const VULKAN_HPP_NAMESPACE::GeneratedCommandsMemoryRequirementsInfoEXT & info, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetGeneratedCommandsMemoryRequirementsEXT && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::MemoryRequirements2 memoryRequirements; d.vkGetGeneratedCommandsMemoryRequirementsEXT( m_device, reinterpret_cast( &info ), reinterpret_cast( &memoryRequirements ) ); return memoryRequirements; } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::StructureChain Device::getGeneratedCommandsMemoryRequirementsEXT( const VULKAN_HPP_NAMESPACE::GeneratedCommandsMemoryRequirementsInfoEXT & info, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetGeneratedCommandsMemoryRequirementsEXT && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::StructureChain structureChain; VULKAN_HPP_NAMESPACE::MemoryRequirements2 & memoryRequirements = structureChain.template get(); d.vkGetGeneratedCommandsMemoryRequirementsEXT( m_device, reinterpret_cast( &info ), reinterpret_cast( &memoryRequirements ) ); return structureChain; } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::preprocessGeneratedCommandsEXT( const VULKAN_HPP_NAMESPACE::GeneratedCommandsInfoEXT * pGeneratedCommandsInfo, VULKAN_HPP_NAMESPACE::CommandBuffer stateCommandBuffer, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdPreprocessGeneratedCommandsEXT( static_cast( m_commandBuffer ), reinterpret_cast( pGeneratedCommandsInfo ), static_cast( stateCommandBuffer ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::preprocessGeneratedCommandsEXT( const VULKAN_HPP_NAMESPACE::GeneratedCommandsInfoEXT & generatedCommandsInfo, VULKAN_HPP_NAMESPACE::CommandBuffer stateCommandBuffer, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdPreprocessGeneratedCommandsEXT && "Function requires " ); # endif d.vkCmdPreprocessGeneratedCommandsEXT( m_commandBuffer, reinterpret_cast( &generatedCommandsInfo ), static_cast( stateCommandBuffer ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void CommandBuffer::executeGeneratedCommandsEXT( VULKAN_HPP_NAMESPACE::Bool32 isPreprocessed, const VULKAN_HPP_NAMESPACE::GeneratedCommandsInfoEXT * pGeneratedCommandsInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkCmdExecuteGeneratedCommandsEXT( static_cast( m_commandBuffer ), static_cast( isPreprocessed ), reinterpret_cast( pGeneratedCommandsInfo ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void CommandBuffer::executeGeneratedCommandsEXT( VULKAN_HPP_NAMESPACE::Bool32 isPreprocessed, const VULKAN_HPP_NAMESPACE::GeneratedCommandsInfoEXT & generatedCommandsInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCmdExecuteGeneratedCommandsEXT && "Function requires " ); # endif d.vkCmdExecuteGeneratedCommandsEXT( m_commandBuffer, static_cast( isPreprocessed ), reinterpret_cast( &generatedCommandsInfo ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::createIndirectCommandsLayoutEXT( const VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutCreateInfoEXT * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutEXT * pIndirectCommandsLayout, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkCreateIndirectCommandsLayoutEXT( static_cast( m_device ), reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pIndirectCommandsLayout ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::createIndirectCommandsLayoutEXT( const VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutCreateInfoEXT & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateIndirectCommandsLayoutEXT && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutEXT indirectCommandsLayout; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateIndirectCommandsLayoutEXT( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &indirectCommandsLayout ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createIndirectCommandsLayoutEXT" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( indirectCommandsLayout ) ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::createIndirectCommandsLayoutEXTUnique( const VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutCreateInfoEXT & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateIndirectCommandsLayoutEXT && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutEXT indirectCommandsLayout; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateIndirectCommandsLayoutEXT( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &indirectCommandsLayout ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createIndirectCommandsLayoutEXTUnique" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, UniqueHandle( indirectCommandsLayout, detail::ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::destroyIndirectCommandsLayoutEXT( VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutEXT indirectCommandsLayout, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDestroyIndirectCommandsLayoutEXT( static_cast( m_device ), static_cast( indirectCommandsLayout ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::destroyIndirectCommandsLayoutEXT( VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutEXT indirectCommandsLayout, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDestroyIndirectCommandsLayoutEXT && "Function requires " ); # endif d.vkDestroyIndirectCommandsLayoutEXT( m_device, static_cast( indirectCommandsLayout ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutEXT indirectCommandsLayout, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDestroyIndirectCommandsLayoutEXT( static_cast( m_device ), static_cast( indirectCommandsLayout ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutEXT indirectCommandsLayout, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDestroyIndirectCommandsLayoutEXT && "Function requires " ); # endif d.vkDestroyIndirectCommandsLayoutEXT( m_device, static_cast( indirectCommandsLayout ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::createIndirectExecutionSetEXT( const VULKAN_HPP_NAMESPACE::IndirectExecutionSetCreateInfoEXT * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::IndirectExecutionSetEXT * pIndirectExecutionSet, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkCreateIndirectExecutionSetEXT( static_cast( m_device ), reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pIndirectExecutionSet ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::createIndirectExecutionSetEXT( const VULKAN_HPP_NAMESPACE::IndirectExecutionSetCreateInfoEXT & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateIndirectExecutionSetEXT && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::IndirectExecutionSetEXT indirectExecutionSet; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateIndirectExecutionSetEXT( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &indirectExecutionSet ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createIndirectExecutionSetEXT" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( indirectExecutionSet ) ); } # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType>::type Device::createIndirectExecutionSetEXTUnique( const VULKAN_HPP_NAMESPACE::IndirectExecutionSetCreateInfoEXT & createInfo, Optional allocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkCreateIndirectExecutionSetEXT && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::IndirectExecutionSetEXT indirectExecutionSet; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkCreateIndirectExecutionSetEXT( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &indirectExecutionSet ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::createIndirectExecutionSetEXTUnique" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, UniqueHandle( indirectExecutionSet, detail::ObjectDestroy( *this, allocator, d ) ) ); } # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::destroyIndirectExecutionSetEXT( VULKAN_HPP_NAMESPACE::IndirectExecutionSetEXT indirectExecutionSet, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDestroyIndirectExecutionSetEXT( static_cast( m_device ), static_cast( indirectExecutionSet ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::destroyIndirectExecutionSetEXT( VULKAN_HPP_NAMESPACE::IndirectExecutionSetEXT indirectExecutionSet, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDestroyIndirectExecutionSetEXT && "Function requires " ); # endif d.vkDestroyIndirectExecutionSetEXT( m_device, static_cast( indirectExecutionSet ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::IndirectExecutionSetEXT indirectExecutionSet, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkDestroyIndirectExecutionSetEXT( static_cast( m_device ), static_cast( indirectExecutionSet ), reinterpret_cast( pAllocator ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::destroy( VULKAN_HPP_NAMESPACE::IndirectExecutionSetEXT indirectExecutionSet, Optional allocator, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkDestroyIndirectExecutionSetEXT && "Function requires " ); # endif d.vkDestroyIndirectExecutionSetEXT( m_device, static_cast( indirectExecutionSet ), reinterpret_cast( static_cast( allocator ) ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::updateIndirectExecutionSetPipelineEXT( VULKAN_HPP_NAMESPACE::IndirectExecutionSetEXT indirectExecutionSet, uint32_t executionSetWriteCount, const VULKAN_HPP_NAMESPACE::WriteIndirectExecutionSetPipelineEXT * pExecutionSetWrites, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkUpdateIndirectExecutionSetPipelineEXT( static_cast( m_device ), static_cast( indirectExecutionSet ), executionSetWriteCount, reinterpret_cast( pExecutionSetWrites ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::updateIndirectExecutionSetPipelineEXT( VULKAN_HPP_NAMESPACE::IndirectExecutionSetEXT indirectExecutionSet, VULKAN_HPP_NAMESPACE::ArrayProxy const & executionSetWrites, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkUpdateIndirectExecutionSetPipelineEXT && "Function requires " ); # endif d.vkUpdateIndirectExecutionSetPipelineEXT( m_device, static_cast( indirectExecutionSet ), executionSetWrites.size(), reinterpret_cast( executionSetWrites.data() ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_INLINE void Device::updateIndirectExecutionSetShaderEXT( VULKAN_HPP_NAMESPACE::IndirectExecutionSetEXT indirectExecutionSet, uint32_t executionSetWriteCount, const VULKAN_HPP_NAMESPACE::WriteIndirectExecutionSetShaderEXT * pExecutionSetWrites, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); d.vkUpdateIndirectExecutionSetShaderEXT( static_cast( m_device ), static_cast( indirectExecutionSet ), executionSetWriteCount, reinterpret_cast( pExecutionSetWrites ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_INLINE void Device::updateIndirectExecutionSetShaderEXT( VULKAN_HPP_NAMESPACE::IndirectExecutionSetEXT indirectExecutionSet, VULKAN_HPP_NAMESPACE::ArrayProxy const & executionSetWrites, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkUpdateIndirectExecutionSetShaderEXT && "Function requires " ); # endif d.vkUpdateIndirectExecutionSetShaderEXT( m_device, static_cast( indirectExecutionSet ), executionSetWrites.size(), reinterpret_cast( executionSetWrites.data() ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_NV_cooperative_matrix2 === template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result PhysicalDevice::getCooperativeMatrixFlexibleDimensionsPropertiesNV( uint32_t * pPropertyCount, VULKAN_HPP_NAMESPACE::CooperativeMatrixFlexibleDimensionsPropertiesNV * pProperties, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV( static_cast( m_physicalDevice ), pPropertyCount, reinterpret_cast( pProperties ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType< std::vector>::type PhysicalDevice::getCooperativeMatrixFlexibleDimensionsPropertiesNV( Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV && "Function requires " ); # endif std::vector properties; uint32_t propertyCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV( m_physicalDevice, &propertyCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); result = static_cast( d.vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV( m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getCooperativeMatrixFlexibleDimensionsPropertiesNV" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( properties ) ); } template ::value, int>::type> VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType< std::vector>::type PhysicalDevice::getCooperativeMatrixFlexibleDimensionsPropertiesNV( CooperativeMatrixFlexibleDimensionsPropertiesNVAllocator & cooperativeMatrixFlexibleDimensionsPropertiesNVAllocator, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV && "Function requires " ); # endif std::vector properties( cooperativeMatrixFlexibleDimensionsPropertiesNVAllocator ); uint32_t propertyCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( d.vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV( m_physicalDevice, &propertyCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); result = static_cast( d.vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV( m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getCooperativeMatrixFlexibleDimensionsPropertiesNV" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( properties ) ); } #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #if defined( VK_USE_PLATFORM_METAL_EXT ) //=== VK_EXT_external_memory_metal === template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getMemoryMetalHandleEXT( const VULKAN_HPP_NAMESPACE::MemoryGetMetalHandleInfoEXT * pGetMetalHandleInfo, void ** pHandle, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetMemoryMetalHandleEXT( static_cast( m_device ), reinterpret_cast( pGetMetalHandleInfo ), pHandle ) ); } # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::getMemoryMetalHandleEXT( const VULKAN_HPP_NAMESPACE::MemoryGetMetalHandleInfoEXT & getMetalHandleInfo, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetMemoryMetalHandleEXT && "Function requires " ); # endif void * handle; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetMemoryMetalHandleEXT( m_device, reinterpret_cast( &getMetalHandleInfo ), &handle ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryMetalHandleEXT" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( handle ) ); } # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getMemoryMetalHandlePropertiesEXT( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType, const void * pHandle, VULKAN_HPP_NAMESPACE::MemoryMetalHandlePropertiesEXT * pMemoryMetalHandleProperties, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetMemoryMetalHandlePropertiesEXT( static_cast( m_device ), static_cast( handleType ), pHandle, reinterpret_cast( pMemoryMetalHandleProperties ) ) ); } # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType::type Device::getMemoryMetalHandlePropertiesEXT( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType, HandleType const & handle, Dispatch const & d ) const { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); # if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 ) VULKAN_HPP_ASSERT( d.vkGetMemoryMetalHandlePropertiesEXT && "Function requires " ); # endif VULKAN_HPP_NAMESPACE::MemoryMetalHandlePropertiesEXT memoryMetalHandleProperties; VULKAN_HPP_NAMESPACE::Result result = static_cast( d.vkGetMemoryMetalHandlePropertiesEXT( m_device, static_cast( handleType ), reinterpret_cast( &handle ), reinterpret_cast( &memoryMetalHandleProperties ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryMetalHandlePropertiesEXT" ); return VULKAN_HPP_NAMESPACE::detail::createResultValueType( result, std::move( memoryMetalHandleProperties ) ); } # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #endif /*VK_USE_PLATFORM_METAL_EXT*/ } // namespace VULKAN_HPP_NAMESPACE #endif ================================================ FILE: src/libraries/vulkanheaders/vulkan_ggp.h ================================================ #ifndef VULKAN_GGP_H_ #define VULKAN_GGP_H_ 1 /* ** Copyright 2015-2025 The Khronos Group Inc. ** ** SPDX-License-Identifier: Apache-2.0 */ /* ** This header is generated from the Khronos Vulkan XML API Registry. ** */ #ifdef __cplusplus extern "C" { #endif // VK_GGP_stream_descriptor_surface is a preprocessor guard. Do not pass it to API calls. #define VK_GGP_stream_descriptor_surface 1 #define VK_GGP_STREAM_DESCRIPTOR_SURFACE_SPEC_VERSION 1 #define VK_GGP_STREAM_DESCRIPTOR_SURFACE_EXTENSION_NAME "VK_GGP_stream_descriptor_surface" typedef VkFlags VkStreamDescriptorSurfaceCreateFlagsGGP; typedef struct VkStreamDescriptorSurfaceCreateInfoGGP { VkStructureType sType; const void* pNext; VkStreamDescriptorSurfaceCreateFlagsGGP flags; GgpStreamDescriptor streamDescriptor; } VkStreamDescriptorSurfaceCreateInfoGGP; typedef VkResult (VKAPI_PTR *PFN_vkCreateStreamDescriptorSurfaceGGP)(VkInstance instance, const VkStreamDescriptorSurfaceCreateInfoGGP* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkCreateStreamDescriptorSurfaceGGP( VkInstance instance, const VkStreamDescriptorSurfaceCreateInfoGGP* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); #endif // VK_GGP_frame_token is a preprocessor guard. Do not pass it to API calls. #define VK_GGP_frame_token 1 #define VK_GGP_FRAME_TOKEN_SPEC_VERSION 1 #define VK_GGP_FRAME_TOKEN_EXTENSION_NAME "VK_GGP_frame_token" typedef struct VkPresentFrameTokenGGP { VkStructureType sType; const void* pNext; GgpFrameToken frameToken; } VkPresentFrameTokenGGP; #ifdef __cplusplus } #endif #endif ================================================ FILE: src/libraries/vulkanheaders/vulkan_handles.hpp ================================================ // Copyright 2015-2025 The Khronos Group Inc. // // SPDX-License-Identifier: Apache-2.0 OR MIT // // This header is generated from the Khronos Vulkan XML API Registry. #ifndef VULKAN_HANDLES_HPP #define VULKAN_HANDLES_HPP // include-what-you-use: make sure, vulkan.hpp is used by code-completers // IWYU pragma: private; include "vulkan.hpp" namespace VULKAN_HPP_NAMESPACE { //=================================== //=== STRUCT forward declarations === //=================================== //=== VK_VERSION_1_0 === struct Extent2D; struct Extent3D; struct Offset2D; struct Offset3D; struct Rect2D; struct BaseInStructure; struct BaseOutStructure; struct BufferMemoryBarrier; struct DispatchIndirectCommand; struct DrawIndexedIndirectCommand; struct DrawIndirectCommand; struct ImageMemoryBarrier; struct MemoryBarrier; struct PipelineCacheHeaderVersionOne; struct AllocationCallbacks; struct ApplicationInfo; struct FormatProperties; struct ImageFormatProperties; struct InstanceCreateInfo; struct MemoryHeap; struct MemoryType; struct PhysicalDeviceFeatures; struct PhysicalDeviceLimits; struct PhysicalDeviceMemoryProperties; struct PhysicalDeviceProperties; struct PhysicalDeviceSparseProperties; struct QueueFamilyProperties; struct DeviceCreateInfo; struct DeviceQueueCreateInfo; struct ExtensionProperties; struct LayerProperties; struct SubmitInfo; struct MappedMemoryRange; struct MemoryAllocateInfo; struct MemoryRequirements; struct BindSparseInfo; struct ImageSubresource; struct SparseBufferMemoryBindInfo; struct SparseImageFormatProperties; struct SparseImageMemoryBind; struct SparseImageMemoryBindInfo; struct SparseImageMemoryRequirements; struct SparseImageOpaqueMemoryBindInfo; struct SparseMemoryBind; struct FenceCreateInfo; struct SemaphoreCreateInfo; struct EventCreateInfo; struct QueryPoolCreateInfo; struct BufferCreateInfo; struct BufferViewCreateInfo; struct ImageCreateInfo; struct SubresourceLayout; struct ComponentMapping; struct ImageSubresourceRange; struct ImageViewCreateInfo; struct ShaderModuleCreateInfo; struct PipelineCacheCreateInfo; struct ComputePipelineCreateInfo; struct GraphicsPipelineCreateInfo; struct PipelineColorBlendAttachmentState; struct PipelineColorBlendStateCreateInfo; struct PipelineDepthStencilStateCreateInfo; struct PipelineDynamicStateCreateInfo; struct PipelineInputAssemblyStateCreateInfo; struct PipelineMultisampleStateCreateInfo; struct PipelineRasterizationStateCreateInfo; struct PipelineShaderStageCreateInfo; struct PipelineTessellationStateCreateInfo; struct PipelineVertexInputStateCreateInfo; struct PipelineViewportStateCreateInfo; struct SpecializationInfo; struct SpecializationMapEntry; struct StencilOpState; struct VertexInputAttributeDescription; struct VertexInputBindingDescription; struct Viewport; struct PipelineLayoutCreateInfo; struct PushConstantRange; struct SamplerCreateInfo; struct CopyDescriptorSet; struct DescriptorBufferInfo; struct DescriptorImageInfo; struct DescriptorPoolCreateInfo; struct DescriptorPoolSize; struct DescriptorSetAllocateInfo; struct DescriptorSetLayoutBinding; struct DescriptorSetLayoutCreateInfo; struct WriteDescriptorSet; struct AttachmentDescription; struct AttachmentReference; struct FramebufferCreateInfo; struct RenderPassCreateInfo; struct SubpassDependency; struct SubpassDescription; struct CommandPoolCreateInfo; struct CommandBufferAllocateInfo; struct CommandBufferBeginInfo; struct CommandBufferInheritanceInfo; struct BufferCopy; struct BufferImageCopy; struct ClearAttachment; union ClearColorValue; struct ClearDepthStencilValue; struct ClearRect; union ClearValue; struct ImageBlit; struct ImageCopy; struct ImageResolve; struct ImageSubresourceLayers; struct RenderPassBeginInfo; //=== VK_VERSION_1_1 === struct PhysicalDeviceSubgroupProperties; struct BindBufferMemoryInfo; using BindBufferMemoryInfoKHR = BindBufferMemoryInfo; struct BindImageMemoryInfo; using BindImageMemoryInfoKHR = BindImageMemoryInfo; struct PhysicalDevice16BitStorageFeatures; using PhysicalDevice16BitStorageFeaturesKHR = PhysicalDevice16BitStorageFeatures; struct MemoryDedicatedRequirements; using MemoryDedicatedRequirementsKHR = MemoryDedicatedRequirements; struct MemoryDedicatedAllocateInfo; using MemoryDedicatedAllocateInfoKHR = MemoryDedicatedAllocateInfo; struct MemoryAllocateFlagsInfo; using MemoryAllocateFlagsInfoKHR = MemoryAllocateFlagsInfo; struct DeviceGroupRenderPassBeginInfo; using DeviceGroupRenderPassBeginInfoKHR = DeviceGroupRenderPassBeginInfo; struct DeviceGroupCommandBufferBeginInfo; using DeviceGroupCommandBufferBeginInfoKHR = DeviceGroupCommandBufferBeginInfo; struct DeviceGroupSubmitInfo; using DeviceGroupSubmitInfoKHR = DeviceGroupSubmitInfo; struct DeviceGroupBindSparseInfo; using DeviceGroupBindSparseInfoKHR = DeviceGroupBindSparseInfo; struct BindBufferMemoryDeviceGroupInfo; using BindBufferMemoryDeviceGroupInfoKHR = BindBufferMemoryDeviceGroupInfo; struct BindImageMemoryDeviceGroupInfo; using BindImageMemoryDeviceGroupInfoKHR = BindImageMemoryDeviceGroupInfo; struct PhysicalDeviceGroupProperties; using PhysicalDeviceGroupPropertiesKHR = PhysicalDeviceGroupProperties; struct DeviceGroupDeviceCreateInfo; using DeviceGroupDeviceCreateInfoKHR = DeviceGroupDeviceCreateInfo; struct BufferMemoryRequirementsInfo2; using BufferMemoryRequirementsInfo2KHR = BufferMemoryRequirementsInfo2; struct ImageMemoryRequirementsInfo2; using ImageMemoryRequirementsInfo2KHR = ImageMemoryRequirementsInfo2; struct ImageSparseMemoryRequirementsInfo2; using ImageSparseMemoryRequirementsInfo2KHR = ImageSparseMemoryRequirementsInfo2; struct MemoryRequirements2; using MemoryRequirements2KHR = MemoryRequirements2; struct SparseImageMemoryRequirements2; using SparseImageMemoryRequirements2KHR = SparseImageMemoryRequirements2; struct PhysicalDeviceFeatures2; using PhysicalDeviceFeatures2KHR = PhysicalDeviceFeatures2; struct PhysicalDeviceProperties2; using PhysicalDeviceProperties2KHR = PhysicalDeviceProperties2; struct FormatProperties2; using FormatProperties2KHR = FormatProperties2; struct ImageFormatProperties2; using ImageFormatProperties2KHR = ImageFormatProperties2; struct PhysicalDeviceImageFormatInfo2; using PhysicalDeviceImageFormatInfo2KHR = PhysicalDeviceImageFormatInfo2; struct QueueFamilyProperties2; using QueueFamilyProperties2KHR = QueueFamilyProperties2; struct PhysicalDeviceMemoryProperties2; using PhysicalDeviceMemoryProperties2KHR = PhysicalDeviceMemoryProperties2; struct SparseImageFormatProperties2; using SparseImageFormatProperties2KHR = SparseImageFormatProperties2; struct PhysicalDeviceSparseImageFormatInfo2; using PhysicalDeviceSparseImageFormatInfo2KHR = PhysicalDeviceSparseImageFormatInfo2; struct PhysicalDevicePointClippingProperties; using PhysicalDevicePointClippingPropertiesKHR = PhysicalDevicePointClippingProperties; struct RenderPassInputAttachmentAspectCreateInfo; using RenderPassInputAttachmentAspectCreateInfoKHR = RenderPassInputAttachmentAspectCreateInfo; struct InputAttachmentAspectReference; using InputAttachmentAspectReferenceKHR = InputAttachmentAspectReference; struct ImageViewUsageCreateInfo; using ImageViewUsageCreateInfoKHR = ImageViewUsageCreateInfo; struct PipelineTessellationDomainOriginStateCreateInfo; using PipelineTessellationDomainOriginStateCreateInfoKHR = PipelineTessellationDomainOriginStateCreateInfo; struct RenderPassMultiviewCreateInfo; using RenderPassMultiviewCreateInfoKHR = RenderPassMultiviewCreateInfo; struct PhysicalDeviceMultiviewFeatures; using PhysicalDeviceMultiviewFeaturesKHR = PhysicalDeviceMultiviewFeatures; struct PhysicalDeviceMultiviewProperties; using PhysicalDeviceMultiviewPropertiesKHR = PhysicalDeviceMultiviewProperties; struct PhysicalDeviceVariablePointersFeatures; using PhysicalDeviceVariablePointerFeatures = PhysicalDeviceVariablePointersFeatures; using PhysicalDeviceVariablePointerFeaturesKHR = PhysicalDeviceVariablePointersFeatures; using PhysicalDeviceVariablePointersFeaturesKHR = PhysicalDeviceVariablePointersFeatures; struct PhysicalDeviceProtectedMemoryFeatures; struct PhysicalDeviceProtectedMemoryProperties; struct DeviceQueueInfo2; struct ProtectedSubmitInfo; struct SamplerYcbcrConversionCreateInfo; using SamplerYcbcrConversionCreateInfoKHR = SamplerYcbcrConversionCreateInfo; struct SamplerYcbcrConversionInfo; using SamplerYcbcrConversionInfoKHR = SamplerYcbcrConversionInfo; struct BindImagePlaneMemoryInfo; using BindImagePlaneMemoryInfoKHR = BindImagePlaneMemoryInfo; struct ImagePlaneMemoryRequirementsInfo; using ImagePlaneMemoryRequirementsInfoKHR = ImagePlaneMemoryRequirementsInfo; struct PhysicalDeviceSamplerYcbcrConversionFeatures; using PhysicalDeviceSamplerYcbcrConversionFeaturesKHR = PhysicalDeviceSamplerYcbcrConversionFeatures; struct SamplerYcbcrConversionImageFormatProperties; using SamplerYcbcrConversionImageFormatPropertiesKHR = SamplerYcbcrConversionImageFormatProperties; struct DescriptorUpdateTemplateEntry; using DescriptorUpdateTemplateEntryKHR = DescriptorUpdateTemplateEntry; struct DescriptorUpdateTemplateCreateInfo; using DescriptorUpdateTemplateCreateInfoKHR = DescriptorUpdateTemplateCreateInfo; struct ExternalMemoryProperties; using ExternalMemoryPropertiesKHR = ExternalMemoryProperties; struct PhysicalDeviceExternalImageFormatInfo; using PhysicalDeviceExternalImageFormatInfoKHR = PhysicalDeviceExternalImageFormatInfo; struct ExternalImageFormatProperties; using ExternalImageFormatPropertiesKHR = ExternalImageFormatProperties; struct PhysicalDeviceExternalBufferInfo; using PhysicalDeviceExternalBufferInfoKHR = PhysicalDeviceExternalBufferInfo; struct ExternalBufferProperties; using ExternalBufferPropertiesKHR = ExternalBufferProperties; struct PhysicalDeviceIDProperties; using PhysicalDeviceIDPropertiesKHR = PhysicalDeviceIDProperties; struct ExternalMemoryImageCreateInfo; using ExternalMemoryImageCreateInfoKHR = ExternalMemoryImageCreateInfo; struct ExternalMemoryBufferCreateInfo; using ExternalMemoryBufferCreateInfoKHR = ExternalMemoryBufferCreateInfo; struct ExportMemoryAllocateInfo; using ExportMemoryAllocateInfoKHR = ExportMemoryAllocateInfo; struct PhysicalDeviceExternalFenceInfo; using PhysicalDeviceExternalFenceInfoKHR = PhysicalDeviceExternalFenceInfo; struct ExternalFenceProperties; using ExternalFencePropertiesKHR = ExternalFenceProperties; struct ExportFenceCreateInfo; using ExportFenceCreateInfoKHR = ExportFenceCreateInfo; struct ExportSemaphoreCreateInfo; using ExportSemaphoreCreateInfoKHR = ExportSemaphoreCreateInfo; struct PhysicalDeviceExternalSemaphoreInfo; using PhysicalDeviceExternalSemaphoreInfoKHR = PhysicalDeviceExternalSemaphoreInfo; struct ExternalSemaphoreProperties; using ExternalSemaphorePropertiesKHR = ExternalSemaphoreProperties; struct PhysicalDeviceMaintenance3Properties; using PhysicalDeviceMaintenance3PropertiesKHR = PhysicalDeviceMaintenance3Properties; struct DescriptorSetLayoutSupport; using DescriptorSetLayoutSupportKHR = DescriptorSetLayoutSupport; struct PhysicalDeviceShaderDrawParametersFeatures; using PhysicalDeviceShaderDrawParameterFeatures = PhysicalDeviceShaderDrawParametersFeatures; //=== VK_VERSION_1_2 === struct PhysicalDeviceVulkan11Features; struct PhysicalDeviceVulkan11Properties; struct PhysicalDeviceVulkan12Features; struct PhysicalDeviceVulkan12Properties; struct ImageFormatListCreateInfo; using ImageFormatListCreateInfoKHR = ImageFormatListCreateInfo; struct RenderPassCreateInfo2; using RenderPassCreateInfo2KHR = RenderPassCreateInfo2; struct AttachmentDescription2; using AttachmentDescription2KHR = AttachmentDescription2; struct AttachmentReference2; using AttachmentReference2KHR = AttachmentReference2; struct SubpassDescription2; using SubpassDescription2KHR = SubpassDescription2; struct SubpassDependency2; using SubpassDependency2KHR = SubpassDependency2; struct SubpassBeginInfo; using SubpassBeginInfoKHR = SubpassBeginInfo; struct SubpassEndInfo; using SubpassEndInfoKHR = SubpassEndInfo; struct PhysicalDevice8BitStorageFeatures; using PhysicalDevice8BitStorageFeaturesKHR = PhysicalDevice8BitStorageFeatures; struct ConformanceVersion; using ConformanceVersionKHR = ConformanceVersion; struct PhysicalDeviceDriverProperties; using PhysicalDeviceDriverPropertiesKHR = PhysicalDeviceDriverProperties; struct PhysicalDeviceShaderAtomicInt64Features; using PhysicalDeviceShaderAtomicInt64FeaturesKHR = PhysicalDeviceShaderAtomicInt64Features; struct PhysicalDeviceShaderFloat16Int8Features; using PhysicalDeviceFloat16Int8FeaturesKHR = PhysicalDeviceShaderFloat16Int8Features; using PhysicalDeviceShaderFloat16Int8FeaturesKHR = PhysicalDeviceShaderFloat16Int8Features; struct PhysicalDeviceFloatControlsProperties; using PhysicalDeviceFloatControlsPropertiesKHR = PhysicalDeviceFloatControlsProperties; struct DescriptorSetLayoutBindingFlagsCreateInfo; using DescriptorSetLayoutBindingFlagsCreateInfoEXT = DescriptorSetLayoutBindingFlagsCreateInfo; struct PhysicalDeviceDescriptorIndexingFeatures; using PhysicalDeviceDescriptorIndexingFeaturesEXT = PhysicalDeviceDescriptorIndexingFeatures; struct PhysicalDeviceDescriptorIndexingProperties; using PhysicalDeviceDescriptorIndexingPropertiesEXT = PhysicalDeviceDescriptorIndexingProperties; struct DescriptorSetVariableDescriptorCountAllocateInfo; using DescriptorSetVariableDescriptorCountAllocateInfoEXT = DescriptorSetVariableDescriptorCountAllocateInfo; struct DescriptorSetVariableDescriptorCountLayoutSupport; using DescriptorSetVariableDescriptorCountLayoutSupportEXT = DescriptorSetVariableDescriptorCountLayoutSupport; struct SubpassDescriptionDepthStencilResolve; using SubpassDescriptionDepthStencilResolveKHR = SubpassDescriptionDepthStencilResolve; struct PhysicalDeviceDepthStencilResolveProperties; using PhysicalDeviceDepthStencilResolvePropertiesKHR = PhysicalDeviceDepthStencilResolveProperties; struct PhysicalDeviceScalarBlockLayoutFeatures; using PhysicalDeviceScalarBlockLayoutFeaturesEXT = PhysicalDeviceScalarBlockLayoutFeatures; struct ImageStencilUsageCreateInfo; using ImageStencilUsageCreateInfoEXT = ImageStencilUsageCreateInfo; struct SamplerReductionModeCreateInfo; using SamplerReductionModeCreateInfoEXT = SamplerReductionModeCreateInfo; struct PhysicalDeviceSamplerFilterMinmaxProperties; using PhysicalDeviceSamplerFilterMinmaxPropertiesEXT = PhysicalDeviceSamplerFilterMinmaxProperties; struct PhysicalDeviceVulkanMemoryModelFeatures; using PhysicalDeviceVulkanMemoryModelFeaturesKHR = PhysicalDeviceVulkanMemoryModelFeatures; struct PhysicalDeviceImagelessFramebufferFeatures; using PhysicalDeviceImagelessFramebufferFeaturesKHR = PhysicalDeviceImagelessFramebufferFeatures; struct FramebufferAttachmentsCreateInfo; using FramebufferAttachmentsCreateInfoKHR = FramebufferAttachmentsCreateInfo; struct FramebufferAttachmentImageInfo; using FramebufferAttachmentImageInfoKHR = FramebufferAttachmentImageInfo; struct RenderPassAttachmentBeginInfo; using RenderPassAttachmentBeginInfoKHR = RenderPassAttachmentBeginInfo; struct PhysicalDeviceUniformBufferStandardLayoutFeatures; using PhysicalDeviceUniformBufferStandardLayoutFeaturesKHR = PhysicalDeviceUniformBufferStandardLayoutFeatures; struct PhysicalDeviceShaderSubgroupExtendedTypesFeatures; using PhysicalDeviceShaderSubgroupExtendedTypesFeaturesKHR = PhysicalDeviceShaderSubgroupExtendedTypesFeatures; struct PhysicalDeviceSeparateDepthStencilLayoutsFeatures; using PhysicalDeviceSeparateDepthStencilLayoutsFeaturesKHR = PhysicalDeviceSeparateDepthStencilLayoutsFeatures; struct AttachmentReferenceStencilLayout; using AttachmentReferenceStencilLayoutKHR = AttachmentReferenceStencilLayout; struct AttachmentDescriptionStencilLayout; using AttachmentDescriptionStencilLayoutKHR = AttachmentDescriptionStencilLayout; struct PhysicalDeviceHostQueryResetFeatures; using PhysicalDeviceHostQueryResetFeaturesEXT = PhysicalDeviceHostQueryResetFeatures; struct PhysicalDeviceTimelineSemaphoreFeatures; using PhysicalDeviceTimelineSemaphoreFeaturesKHR = PhysicalDeviceTimelineSemaphoreFeatures; struct PhysicalDeviceTimelineSemaphoreProperties; using PhysicalDeviceTimelineSemaphorePropertiesKHR = PhysicalDeviceTimelineSemaphoreProperties; struct SemaphoreTypeCreateInfo; using SemaphoreTypeCreateInfoKHR = SemaphoreTypeCreateInfo; struct TimelineSemaphoreSubmitInfo; using TimelineSemaphoreSubmitInfoKHR = TimelineSemaphoreSubmitInfo; struct SemaphoreWaitInfo; using SemaphoreWaitInfoKHR = SemaphoreWaitInfo; struct SemaphoreSignalInfo; using SemaphoreSignalInfoKHR = SemaphoreSignalInfo; struct PhysicalDeviceBufferDeviceAddressFeatures; using PhysicalDeviceBufferDeviceAddressFeaturesKHR = PhysicalDeviceBufferDeviceAddressFeatures; struct BufferDeviceAddressInfo; using BufferDeviceAddressInfoEXT = BufferDeviceAddressInfo; using BufferDeviceAddressInfoKHR = BufferDeviceAddressInfo; struct BufferOpaqueCaptureAddressCreateInfo; using BufferOpaqueCaptureAddressCreateInfoKHR = BufferOpaqueCaptureAddressCreateInfo; struct MemoryOpaqueCaptureAddressAllocateInfo; using MemoryOpaqueCaptureAddressAllocateInfoKHR = MemoryOpaqueCaptureAddressAllocateInfo; struct DeviceMemoryOpaqueCaptureAddressInfo; using DeviceMemoryOpaqueCaptureAddressInfoKHR = DeviceMemoryOpaqueCaptureAddressInfo; //=== VK_VERSION_1_3 === struct PhysicalDeviceVulkan13Features; struct PhysicalDeviceVulkan13Properties; struct PipelineCreationFeedbackCreateInfo; using PipelineCreationFeedbackCreateInfoEXT = PipelineCreationFeedbackCreateInfo; struct PipelineCreationFeedback; using PipelineCreationFeedbackEXT = PipelineCreationFeedback; struct PhysicalDeviceShaderTerminateInvocationFeatures; using PhysicalDeviceShaderTerminateInvocationFeaturesKHR = PhysicalDeviceShaderTerminateInvocationFeatures; struct PhysicalDeviceToolProperties; using PhysicalDeviceToolPropertiesEXT = PhysicalDeviceToolProperties; struct PhysicalDeviceShaderDemoteToHelperInvocationFeatures; using PhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT = PhysicalDeviceShaderDemoteToHelperInvocationFeatures; struct PhysicalDevicePrivateDataFeatures; using PhysicalDevicePrivateDataFeaturesEXT = PhysicalDevicePrivateDataFeatures; struct DevicePrivateDataCreateInfo; using DevicePrivateDataCreateInfoEXT = DevicePrivateDataCreateInfo; struct PrivateDataSlotCreateInfo; using PrivateDataSlotCreateInfoEXT = PrivateDataSlotCreateInfo; struct PhysicalDevicePipelineCreationCacheControlFeatures; using PhysicalDevicePipelineCreationCacheControlFeaturesEXT = PhysicalDevicePipelineCreationCacheControlFeatures; struct MemoryBarrier2; using MemoryBarrier2KHR = MemoryBarrier2; struct BufferMemoryBarrier2; using BufferMemoryBarrier2KHR = BufferMemoryBarrier2; struct ImageMemoryBarrier2; using ImageMemoryBarrier2KHR = ImageMemoryBarrier2; struct DependencyInfo; using DependencyInfoKHR = DependencyInfo; struct SubmitInfo2; using SubmitInfo2KHR = SubmitInfo2; struct SemaphoreSubmitInfo; using SemaphoreSubmitInfoKHR = SemaphoreSubmitInfo; struct CommandBufferSubmitInfo; using CommandBufferSubmitInfoKHR = CommandBufferSubmitInfo; struct PhysicalDeviceSynchronization2Features; using PhysicalDeviceSynchronization2FeaturesKHR = PhysicalDeviceSynchronization2Features; struct PhysicalDeviceZeroInitializeWorkgroupMemoryFeatures; using PhysicalDeviceZeroInitializeWorkgroupMemoryFeaturesKHR = PhysicalDeviceZeroInitializeWorkgroupMemoryFeatures; struct PhysicalDeviceImageRobustnessFeatures; using PhysicalDeviceImageRobustnessFeaturesEXT = PhysicalDeviceImageRobustnessFeatures; struct CopyBufferInfo2; using CopyBufferInfo2KHR = CopyBufferInfo2; struct CopyImageInfo2; using CopyImageInfo2KHR = CopyImageInfo2; struct CopyBufferToImageInfo2; using CopyBufferToImageInfo2KHR = CopyBufferToImageInfo2; struct CopyImageToBufferInfo2; using CopyImageToBufferInfo2KHR = CopyImageToBufferInfo2; struct BlitImageInfo2; using BlitImageInfo2KHR = BlitImageInfo2; struct ResolveImageInfo2; using ResolveImageInfo2KHR = ResolveImageInfo2; struct BufferCopy2; using BufferCopy2KHR = BufferCopy2; struct ImageCopy2; using ImageCopy2KHR = ImageCopy2; struct ImageBlit2; using ImageBlit2KHR = ImageBlit2; struct BufferImageCopy2; using BufferImageCopy2KHR = BufferImageCopy2; struct ImageResolve2; using ImageResolve2KHR = ImageResolve2; struct PhysicalDeviceSubgroupSizeControlFeatures; using PhysicalDeviceSubgroupSizeControlFeaturesEXT = PhysicalDeviceSubgroupSizeControlFeatures; struct PhysicalDeviceSubgroupSizeControlProperties; using PhysicalDeviceSubgroupSizeControlPropertiesEXT = PhysicalDeviceSubgroupSizeControlProperties; struct PipelineShaderStageRequiredSubgroupSizeCreateInfo; using PipelineShaderStageRequiredSubgroupSizeCreateInfoEXT = PipelineShaderStageRequiredSubgroupSizeCreateInfo; using ShaderRequiredSubgroupSizeCreateInfoEXT = PipelineShaderStageRequiredSubgroupSizeCreateInfo; struct PhysicalDeviceInlineUniformBlockFeatures; using PhysicalDeviceInlineUniformBlockFeaturesEXT = PhysicalDeviceInlineUniformBlockFeatures; struct PhysicalDeviceInlineUniformBlockProperties; using PhysicalDeviceInlineUniformBlockPropertiesEXT = PhysicalDeviceInlineUniformBlockProperties; struct WriteDescriptorSetInlineUniformBlock; using WriteDescriptorSetInlineUniformBlockEXT = WriteDescriptorSetInlineUniformBlock; struct DescriptorPoolInlineUniformBlockCreateInfo; using DescriptorPoolInlineUniformBlockCreateInfoEXT = DescriptorPoolInlineUniformBlockCreateInfo; struct PhysicalDeviceTextureCompressionASTCHDRFeatures; using PhysicalDeviceTextureCompressionASTCHDRFeaturesEXT = PhysicalDeviceTextureCompressionASTCHDRFeatures; struct RenderingInfo; using RenderingInfoKHR = RenderingInfo; struct RenderingAttachmentInfo; using RenderingAttachmentInfoKHR = RenderingAttachmentInfo; struct PipelineRenderingCreateInfo; using PipelineRenderingCreateInfoKHR = PipelineRenderingCreateInfo; struct PhysicalDeviceDynamicRenderingFeatures; using PhysicalDeviceDynamicRenderingFeaturesKHR = PhysicalDeviceDynamicRenderingFeatures; struct CommandBufferInheritanceRenderingInfo; using CommandBufferInheritanceRenderingInfoKHR = CommandBufferInheritanceRenderingInfo; struct PhysicalDeviceShaderIntegerDotProductFeatures; using PhysicalDeviceShaderIntegerDotProductFeaturesKHR = PhysicalDeviceShaderIntegerDotProductFeatures; struct PhysicalDeviceShaderIntegerDotProductProperties; using PhysicalDeviceShaderIntegerDotProductPropertiesKHR = PhysicalDeviceShaderIntegerDotProductProperties; struct PhysicalDeviceTexelBufferAlignmentProperties; using PhysicalDeviceTexelBufferAlignmentPropertiesEXT = PhysicalDeviceTexelBufferAlignmentProperties; struct FormatProperties3; using FormatProperties3KHR = FormatProperties3; struct PhysicalDeviceMaintenance4Features; using PhysicalDeviceMaintenance4FeaturesKHR = PhysicalDeviceMaintenance4Features; struct PhysicalDeviceMaintenance4Properties; using PhysicalDeviceMaintenance4PropertiesKHR = PhysicalDeviceMaintenance4Properties; struct DeviceBufferMemoryRequirements; using DeviceBufferMemoryRequirementsKHR = DeviceBufferMemoryRequirements; struct DeviceImageMemoryRequirements; using DeviceImageMemoryRequirementsKHR = DeviceImageMemoryRequirements; //=== VK_VERSION_1_4 === struct PhysicalDeviceVulkan14Features; struct PhysicalDeviceVulkan14Properties; struct DeviceQueueGlobalPriorityCreateInfo; using DeviceQueueGlobalPriorityCreateInfoEXT = DeviceQueueGlobalPriorityCreateInfo; using DeviceQueueGlobalPriorityCreateInfoKHR = DeviceQueueGlobalPriorityCreateInfo; struct PhysicalDeviceGlobalPriorityQueryFeatures; using PhysicalDeviceGlobalPriorityQueryFeaturesEXT = PhysicalDeviceGlobalPriorityQueryFeatures; using PhysicalDeviceGlobalPriorityQueryFeaturesKHR = PhysicalDeviceGlobalPriorityQueryFeatures; struct QueueFamilyGlobalPriorityProperties; using QueueFamilyGlobalPriorityPropertiesEXT = QueueFamilyGlobalPriorityProperties; using QueueFamilyGlobalPriorityPropertiesKHR = QueueFamilyGlobalPriorityProperties; struct PhysicalDeviceShaderSubgroupRotateFeatures; using PhysicalDeviceShaderSubgroupRotateFeaturesKHR = PhysicalDeviceShaderSubgroupRotateFeatures; struct PhysicalDeviceShaderFloatControls2Features; using PhysicalDeviceShaderFloatControls2FeaturesKHR = PhysicalDeviceShaderFloatControls2Features; struct PhysicalDeviceShaderExpectAssumeFeatures; using PhysicalDeviceShaderExpectAssumeFeaturesKHR = PhysicalDeviceShaderExpectAssumeFeatures; struct PhysicalDeviceLineRasterizationFeatures; using PhysicalDeviceLineRasterizationFeaturesEXT = PhysicalDeviceLineRasterizationFeatures; using PhysicalDeviceLineRasterizationFeaturesKHR = PhysicalDeviceLineRasterizationFeatures; struct PhysicalDeviceLineRasterizationProperties; using PhysicalDeviceLineRasterizationPropertiesEXT = PhysicalDeviceLineRasterizationProperties; using PhysicalDeviceLineRasterizationPropertiesKHR = PhysicalDeviceLineRasterizationProperties; struct PipelineRasterizationLineStateCreateInfo; using PipelineRasterizationLineStateCreateInfoEXT = PipelineRasterizationLineStateCreateInfo; using PipelineRasterizationLineStateCreateInfoKHR = PipelineRasterizationLineStateCreateInfo; struct PhysicalDeviceVertexAttributeDivisorProperties; using PhysicalDeviceVertexAttributeDivisorPropertiesKHR = PhysicalDeviceVertexAttributeDivisorProperties; struct VertexInputBindingDivisorDescription; using VertexInputBindingDivisorDescriptionEXT = VertexInputBindingDivisorDescription; using VertexInputBindingDivisorDescriptionKHR = VertexInputBindingDivisorDescription; struct PipelineVertexInputDivisorStateCreateInfo; using PipelineVertexInputDivisorStateCreateInfoEXT = PipelineVertexInputDivisorStateCreateInfo; using PipelineVertexInputDivisorStateCreateInfoKHR = PipelineVertexInputDivisorStateCreateInfo; struct PhysicalDeviceVertexAttributeDivisorFeatures; using PhysicalDeviceVertexAttributeDivisorFeaturesEXT = PhysicalDeviceVertexAttributeDivisorFeatures; using PhysicalDeviceVertexAttributeDivisorFeaturesKHR = PhysicalDeviceVertexAttributeDivisorFeatures; struct PhysicalDeviceIndexTypeUint8Features; using PhysicalDeviceIndexTypeUint8FeaturesEXT = PhysicalDeviceIndexTypeUint8Features; using PhysicalDeviceIndexTypeUint8FeaturesKHR = PhysicalDeviceIndexTypeUint8Features; struct MemoryMapInfo; using MemoryMapInfoKHR = MemoryMapInfo; struct MemoryUnmapInfo; using MemoryUnmapInfoKHR = MemoryUnmapInfo; struct PhysicalDeviceMaintenance5Features; using PhysicalDeviceMaintenance5FeaturesKHR = PhysicalDeviceMaintenance5Features; struct PhysicalDeviceMaintenance5Properties; using PhysicalDeviceMaintenance5PropertiesKHR = PhysicalDeviceMaintenance5Properties; struct RenderingAreaInfo; using RenderingAreaInfoKHR = RenderingAreaInfo; struct DeviceImageSubresourceInfo; using DeviceImageSubresourceInfoKHR = DeviceImageSubresourceInfo; struct ImageSubresource2; using ImageSubresource2EXT = ImageSubresource2; using ImageSubresource2KHR = ImageSubresource2; struct SubresourceLayout2; using SubresourceLayout2EXT = SubresourceLayout2; using SubresourceLayout2KHR = SubresourceLayout2; struct PipelineCreateFlags2CreateInfo; using PipelineCreateFlags2CreateInfoKHR = PipelineCreateFlags2CreateInfo; struct BufferUsageFlags2CreateInfo; using BufferUsageFlags2CreateInfoKHR = BufferUsageFlags2CreateInfo; struct PhysicalDevicePushDescriptorProperties; using PhysicalDevicePushDescriptorPropertiesKHR = PhysicalDevicePushDescriptorProperties; struct PhysicalDeviceDynamicRenderingLocalReadFeatures; using PhysicalDeviceDynamicRenderingLocalReadFeaturesKHR = PhysicalDeviceDynamicRenderingLocalReadFeatures; struct RenderingAttachmentLocationInfo; using RenderingAttachmentLocationInfoKHR = RenderingAttachmentLocationInfo; struct RenderingInputAttachmentIndexInfo; using RenderingInputAttachmentIndexInfoKHR = RenderingInputAttachmentIndexInfo; struct PhysicalDeviceMaintenance6Features; using PhysicalDeviceMaintenance6FeaturesKHR = PhysicalDeviceMaintenance6Features; struct PhysicalDeviceMaintenance6Properties; using PhysicalDeviceMaintenance6PropertiesKHR = PhysicalDeviceMaintenance6Properties; struct BindMemoryStatus; using BindMemoryStatusKHR = BindMemoryStatus; struct BindDescriptorSetsInfo; using BindDescriptorSetsInfoKHR = BindDescriptorSetsInfo; struct PushConstantsInfo; using PushConstantsInfoKHR = PushConstantsInfo; struct PushDescriptorSetInfo; using PushDescriptorSetInfoKHR = PushDescriptorSetInfo; struct PushDescriptorSetWithTemplateInfo; using PushDescriptorSetWithTemplateInfoKHR = PushDescriptorSetWithTemplateInfo; struct PhysicalDevicePipelineProtectedAccessFeatures; using PhysicalDevicePipelineProtectedAccessFeaturesEXT = PhysicalDevicePipelineProtectedAccessFeatures; struct PhysicalDevicePipelineRobustnessFeatures; using PhysicalDevicePipelineRobustnessFeaturesEXT = PhysicalDevicePipelineRobustnessFeatures; struct PhysicalDevicePipelineRobustnessProperties; using PhysicalDevicePipelineRobustnessPropertiesEXT = PhysicalDevicePipelineRobustnessProperties; struct PipelineRobustnessCreateInfo; using PipelineRobustnessCreateInfoEXT = PipelineRobustnessCreateInfo; struct PhysicalDeviceHostImageCopyFeatures; using PhysicalDeviceHostImageCopyFeaturesEXT = PhysicalDeviceHostImageCopyFeatures; struct PhysicalDeviceHostImageCopyProperties; using PhysicalDeviceHostImageCopyPropertiesEXT = PhysicalDeviceHostImageCopyProperties; struct MemoryToImageCopy; using MemoryToImageCopyEXT = MemoryToImageCopy; struct ImageToMemoryCopy; using ImageToMemoryCopyEXT = ImageToMemoryCopy; struct CopyMemoryToImageInfo; using CopyMemoryToImageInfoEXT = CopyMemoryToImageInfo; struct CopyImageToMemoryInfo; using CopyImageToMemoryInfoEXT = CopyImageToMemoryInfo; struct CopyImageToImageInfo; using CopyImageToImageInfoEXT = CopyImageToImageInfo; struct HostImageLayoutTransitionInfo; using HostImageLayoutTransitionInfoEXT = HostImageLayoutTransitionInfo; struct SubresourceHostMemcpySize; using SubresourceHostMemcpySizeEXT = SubresourceHostMemcpySize; struct HostImageCopyDevicePerformanceQuery; using HostImageCopyDevicePerformanceQueryEXT = HostImageCopyDevicePerformanceQuery; //=== VK_KHR_surface === struct SurfaceCapabilitiesKHR; struct SurfaceFormatKHR; //=== VK_KHR_swapchain === struct SwapchainCreateInfoKHR; struct PresentInfoKHR; struct ImageSwapchainCreateInfoKHR; struct BindImageMemorySwapchainInfoKHR; struct AcquireNextImageInfoKHR; struct DeviceGroupPresentCapabilitiesKHR; struct DeviceGroupPresentInfoKHR; struct DeviceGroupSwapchainCreateInfoKHR; //=== VK_KHR_display === struct DisplayModeCreateInfoKHR; struct DisplayModeParametersKHR; struct DisplayModePropertiesKHR; struct DisplayPlaneCapabilitiesKHR; struct DisplayPlanePropertiesKHR; struct DisplayPropertiesKHR; struct DisplaySurfaceCreateInfoKHR; //=== VK_KHR_display_swapchain === struct DisplayPresentInfoKHR; #if defined( VK_USE_PLATFORM_XLIB_KHR ) //=== VK_KHR_xlib_surface === struct XlibSurfaceCreateInfoKHR; #endif /*VK_USE_PLATFORM_XLIB_KHR*/ #if defined( VK_USE_PLATFORM_XCB_KHR ) //=== VK_KHR_xcb_surface === struct XcbSurfaceCreateInfoKHR; #endif /*VK_USE_PLATFORM_XCB_KHR*/ #if defined( VK_USE_PLATFORM_WAYLAND_KHR ) //=== VK_KHR_wayland_surface === struct WaylandSurfaceCreateInfoKHR; #endif /*VK_USE_PLATFORM_WAYLAND_KHR*/ #if defined( VK_USE_PLATFORM_ANDROID_KHR ) //=== VK_KHR_android_surface === struct AndroidSurfaceCreateInfoKHR; #endif /*VK_USE_PLATFORM_ANDROID_KHR*/ #if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_KHR_win32_surface === struct Win32SurfaceCreateInfoKHR; #endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_EXT_debug_report === struct DebugReportCallbackCreateInfoEXT; //=== VK_AMD_rasterization_order === struct PipelineRasterizationStateRasterizationOrderAMD; //=== VK_EXT_debug_marker === struct DebugMarkerObjectNameInfoEXT; struct DebugMarkerObjectTagInfoEXT; struct DebugMarkerMarkerInfoEXT; //=== VK_KHR_video_queue === struct QueueFamilyQueryResultStatusPropertiesKHR; struct QueueFamilyVideoPropertiesKHR; struct VideoProfileInfoKHR; struct VideoProfileListInfoKHR; struct VideoCapabilitiesKHR; struct PhysicalDeviceVideoFormatInfoKHR; struct VideoFormatPropertiesKHR; struct VideoPictureResourceInfoKHR; struct VideoReferenceSlotInfoKHR; struct VideoSessionMemoryRequirementsKHR; struct BindVideoSessionMemoryInfoKHR; struct VideoSessionCreateInfoKHR; struct VideoSessionParametersCreateInfoKHR; struct VideoSessionParametersUpdateInfoKHR; struct VideoBeginCodingInfoKHR; struct VideoEndCodingInfoKHR; struct VideoCodingControlInfoKHR; //=== VK_KHR_video_decode_queue === struct VideoDecodeCapabilitiesKHR; struct VideoDecodeUsageInfoKHR; struct VideoDecodeInfoKHR; //=== VK_NV_dedicated_allocation === struct DedicatedAllocationImageCreateInfoNV; struct DedicatedAllocationBufferCreateInfoNV; struct DedicatedAllocationMemoryAllocateInfoNV; //=== VK_EXT_transform_feedback === struct PhysicalDeviceTransformFeedbackFeaturesEXT; struct PhysicalDeviceTransformFeedbackPropertiesEXT; struct PipelineRasterizationStateStreamCreateInfoEXT; //=== VK_NVX_binary_import === struct CuModuleCreateInfoNVX; struct CuModuleTexturingModeCreateInfoNVX; struct CuFunctionCreateInfoNVX; struct CuLaunchInfoNVX; //=== VK_NVX_image_view_handle === struct ImageViewHandleInfoNVX; struct ImageViewAddressPropertiesNVX; //=== VK_KHR_video_encode_h264 === struct VideoEncodeH264CapabilitiesKHR; struct VideoEncodeH264QualityLevelPropertiesKHR; struct VideoEncodeH264SessionCreateInfoKHR; struct VideoEncodeH264SessionParametersCreateInfoKHR; struct VideoEncodeH264SessionParametersAddInfoKHR; struct VideoEncodeH264SessionParametersGetInfoKHR; struct VideoEncodeH264SessionParametersFeedbackInfoKHR; struct VideoEncodeH264PictureInfoKHR; struct VideoEncodeH264DpbSlotInfoKHR; struct VideoEncodeH264NaluSliceInfoKHR; struct VideoEncodeH264ProfileInfoKHR; struct VideoEncodeH264RateControlInfoKHR; struct VideoEncodeH264RateControlLayerInfoKHR; struct VideoEncodeH264QpKHR; struct VideoEncodeH264FrameSizeKHR; struct VideoEncodeH264GopRemainingFrameInfoKHR; //=== VK_KHR_video_encode_h265 === struct VideoEncodeH265CapabilitiesKHR; struct VideoEncodeH265SessionCreateInfoKHR; struct VideoEncodeH265QualityLevelPropertiesKHR; struct VideoEncodeH265SessionParametersCreateInfoKHR; struct VideoEncodeH265SessionParametersAddInfoKHR; struct VideoEncodeH265SessionParametersGetInfoKHR; struct VideoEncodeH265SessionParametersFeedbackInfoKHR; struct VideoEncodeH265PictureInfoKHR; struct VideoEncodeH265DpbSlotInfoKHR; struct VideoEncodeH265NaluSliceSegmentInfoKHR; struct VideoEncodeH265ProfileInfoKHR; struct VideoEncodeH265RateControlInfoKHR; struct VideoEncodeH265RateControlLayerInfoKHR; struct VideoEncodeH265QpKHR; struct VideoEncodeH265FrameSizeKHR; struct VideoEncodeH265GopRemainingFrameInfoKHR; //=== VK_KHR_video_decode_h264 === struct VideoDecodeH264ProfileInfoKHR; struct VideoDecodeH264CapabilitiesKHR; struct VideoDecodeH264SessionParametersCreateInfoKHR; struct VideoDecodeH264SessionParametersAddInfoKHR; struct VideoDecodeH264PictureInfoKHR; struct VideoDecodeH264DpbSlotInfoKHR; //=== VK_AMD_texture_gather_bias_lod === struct TextureLODGatherFormatPropertiesAMD; //=== VK_AMD_shader_info === struct ShaderResourceUsageAMD; struct ShaderStatisticsInfoAMD; #if defined( VK_USE_PLATFORM_GGP ) //=== VK_GGP_stream_descriptor_surface === struct StreamDescriptorSurfaceCreateInfoGGP; #endif /*VK_USE_PLATFORM_GGP*/ //=== VK_NV_corner_sampled_image === struct PhysicalDeviceCornerSampledImageFeaturesNV; //=== VK_NV_external_memory_capabilities === struct ExternalImageFormatPropertiesNV; //=== VK_NV_external_memory === struct ExternalMemoryImageCreateInfoNV; struct ExportMemoryAllocateInfoNV; #if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_NV_external_memory_win32 === struct ImportMemoryWin32HandleInfoNV; struct ExportMemoryWin32HandleInfoNV; #endif /*VK_USE_PLATFORM_WIN32_KHR*/ #if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_NV_win32_keyed_mutex === struct Win32KeyedMutexAcquireReleaseInfoNV; #endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_EXT_validation_flags === struct ValidationFlagsEXT; #if defined( VK_USE_PLATFORM_VI_NN ) //=== VK_NN_vi_surface === struct ViSurfaceCreateInfoNN; #endif /*VK_USE_PLATFORM_VI_NN*/ //=== VK_EXT_astc_decode_mode === struct ImageViewASTCDecodeModeEXT; struct PhysicalDeviceASTCDecodeFeaturesEXT; #if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_KHR_external_memory_win32 === struct ImportMemoryWin32HandleInfoKHR; struct ExportMemoryWin32HandleInfoKHR; struct MemoryWin32HandlePropertiesKHR; struct MemoryGetWin32HandleInfoKHR; #endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_KHR_external_memory_fd === struct ImportMemoryFdInfoKHR; struct MemoryFdPropertiesKHR; struct MemoryGetFdInfoKHR; #if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_KHR_win32_keyed_mutex === struct Win32KeyedMutexAcquireReleaseInfoKHR; #endif /*VK_USE_PLATFORM_WIN32_KHR*/ #if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_KHR_external_semaphore_win32 === struct ImportSemaphoreWin32HandleInfoKHR; struct ExportSemaphoreWin32HandleInfoKHR; struct D3D12FenceSubmitInfoKHR; struct SemaphoreGetWin32HandleInfoKHR; #endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_KHR_external_semaphore_fd === struct ImportSemaphoreFdInfoKHR; struct SemaphoreGetFdInfoKHR; //=== VK_EXT_conditional_rendering === struct ConditionalRenderingBeginInfoEXT; struct PhysicalDeviceConditionalRenderingFeaturesEXT; struct CommandBufferInheritanceConditionalRenderingInfoEXT; //=== VK_KHR_incremental_present === struct PresentRegionsKHR; struct PresentRegionKHR; struct RectLayerKHR; //=== VK_NV_clip_space_w_scaling === struct ViewportWScalingNV; struct PipelineViewportWScalingStateCreateInfoNV; //=== VK_EXT_display_surface_counter === struct SurfaceCapabilities2EXT; //=== VK_EXT_display_control === struct DisplayPowerInfoEXT; struct DeviceEventInfoEXT; struct DisplayEventInfoEXT; struct SwapchainCounterCreateInfoEXT; //=== VK_GOOGLE_display_timing === struct RefreshCycleDurationGOOGLE; struct PastPresentationTimingGOOGLE; struct PresentTimesInfoGOOGLE; struct PresentTimeGOOGLE; //=== VK_NVX_multiview_per_view_attributes === struct PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX; struct MultiviewPerViewAttributesInfoNVX; //=== VK_NV_viewport_swizzle === struct ViewportSwizzleNV; struct PipelineViewportSwizzleStateCreateInfoNV; //=== VK_EXT_discard_rectangles === struct PhysicalDeviceDiscardRectanglePropertiesEXT; struct PipelineDiscardRectangleStateCreateInfoEXT; //=== VK_EXT_conservative_rasterization === struct PhysicalDeviceConservativeRasterizationPropertiesEXT; struct PipelineRasterizationConservativeStateCreateInfoEXT; //=== VK_EXT_depth_clip_enable === struct PhysicalDeviceDepthClipEnableFeaturesEXT; struct PipelineRasterizationDepthClipStateCreateInfoEXT; //=== VK_EXT_hdr_metadata === struct HdrMetadataEXT; struct XYColorEXT; //=== VK_IMG_relaxed_line_rasterization === struct PhysicalDeviceRelaxedLineRasterizationFeaturesIMG; //=== VK_KHR_shared_presentable_image === struct SharedPresentSurfaceCapabilitiesKHR; #if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_KHR_external_fence_win32 === struct ImportFenceWin32HandleInfoKHR; struct ExportFenceWin32HandleInfoKHR; struct FenceGetWin32HandleInfoKHR; #endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_KHR_external_fence_fd === struct ImportFenceFdInfoKHR; struct FenceGetFdInfoKHR; //=== VK_KHR_performance_query === struct PhysicalDevicePerformanceQueryFeaturesKHR; struct PhysicalDevicePerformanceQueryPropertiesKHR; struct PerformanceCounterKHR; struct PerformanceCounterDescriptionKHR; struct QueryPoolPerformanceCreateInfoKHR; union PerformanceCounterResultKHR; struct AcquireProfilingLockInfoKHR; struct PerformanceQuerySubmitInfoKHR; //=== VK_KHR_get_surface_capabilities2 === struct PhysicalDeviceSurfaceInfo2KHR; struct SurfaceCapabilities2KHR; struct SurfaceFormat2KHR; //=== VK_KHR_get_display_properties2 === struct DisplayProperties2KHR; struct DisplayPlaneProperties2KHR; struct DisplayModeProperties2KHR; struct DisplayPlaneInfo2KHR; struct DisplayPlaneCapabilities2KHR; #if defined( VK_USE_PLATFORM_IOS_MVK ) //=== VK_MVK_ios_surface === struct IOSSurfaceCreateInfoMVK; #endif /*VK_USE_PLATFORM_IOS_MVK*/ #if defined( VK_USE_PLATFORM_MACOS_MVK ) //=== VK_MVK_macos_surface === struct MacOSSurfaceCreateInfoMVK; #endif /*VK_USE_PLATFORM_MACOS_MVK*/ //=== VK_EXT_debug_utils === struct DebugUtilsLabelEXT; struct DebugUtilsMessengerCallbackDataEXT; struct DebugUtilsMessengerCreateInfoEXT; struct DebugUtilsObjectNameInfoEXT; struct DebugUtilsObjectTagInfoEXT; #if defined( VK_USE_PLATFORM_ANDROID_KHR ) //=== VK_ANDROID_external_memory_android_hardware_buffer === struct AndroidHardwareBufferUsageANDROID; struct AndroidHardwareBufferPropertiesANDROID; struct AndroidHardwareBufferFormatPropertiesANDROID; struct ImportAndroidHardwareBufferInfoANDROID; struct MemoryGetAndroidHardwareBufferInfoANDROID; struct ExternalFormatANDROID; struct AndroidHardwareBufferFormatProperties2ANDROID; #endif /*VK_USE_PLATFORM_ANDROID_KHR*/ #if defined( VK_ENABLE_BETA_EXTENSIONS ) //=== VK_AMDX_shader_enqueue === struct PhysicalDeviceShaderEnqueueFeaturesAMDX; struct PhysicalDeviceShaderEnqueuePropertiesAMDX; struct ExecutionGraphPipelineScratchSizeAMDX; struct ExecutionGraphPipelineCreateInfoAMDX; struct DispatchGraphInfoAMDX; struct DispatchGraphCountInfoAMDX; struct PipelineShaderStageNodeCreateInfoAMDX; union DeviceOrHostAddressConstAMDX; #endif /*VK_ENABLE_BETA_EXTENSIONS*/ //=== VK_AMD_mixed_attachment_samples === struct AttachmentSampleCountInfoAMD; using AttachmentSampleCountInfoNV = AttachmentSampleCountInfoAMD; //=== VK_EXT_sample_locations === struct SampleLocationEXT; struct SampleLocationsInfoEXT; struct AttachmentSampleLocationsEXT; struct SubpassSampleLocationsEXT; struct RenderPassSampleLocationsBeginInfoEXT; struct PipelineSampleLocationsStateCreateInfoEXT; struct PhysicalDeviceSampleLocationsPropertiesEXT; struct MultisamplePropertiesEXT; //=== VK_EXT_blend_operation_advanced === struct PhysicalDeviceBlendOperationAdvancedFeaturesEXT; struct PhysicalDeviceBlendOperationAdvancedPropertiesEXT; struct PipelineColorBlendAdvancedStateCreateInfoEXT; //=== VK_NV_fragment_coverage_to_color === struct PipelineCoverageToColorStateCreateInfoNV; //=== VK_KHR_acceleration_structure === union DeviceOrHostAddressKHR; union DeviceOrHostAddressConstKHR; struct AccelerationStructureBuildRangeInfoKHR; struct AabbPositionsKHR; using AabbPositionsNV = AabbPositionsKHR; struct AccelerationStructureGeometryTrianglesDataKHR; struct TransformMatrixKHR; using TransformMatrixNV = TransformMatrixKHR; struct AccelerationStructureBuildGeometryInfoKHR; struct AccelerationStructureGeometryAabbsDataKHR; struct AccelerationStructureInstanceKHR; using AccelerationStructureInstanceNV = AccelerationStructureInstanceKHR; struct AccelerationStructureGeometryInstancesDataKHR; union AccelerationStructureGeometryDataKHR; struct AccelerationStructureGeometryKHR; struct AccelerationStructureCreateInfoKHR; struct WriteDescriptorSetAccelerationStructureKHR; struct PhysicalDeviceAccelerationStructureFeaturesKHR; struct PhysicalDeviceAccelerationStructurePropertiesKHR; struct AccelerationStructureDeviceAddressInfoKHR; struct AccelerationStructureVersionInfoKHR; struct CopyAccelerationStructureToMemoryInfoKHR; struct CopyMemoryToAccelerationStructureInfoKHR; struct CopyAccelerationStructureInfoKHR; struct AccelerationStructureBuildSizesInfoKHR; //=== VK_KHR_ray_tracing_pipeline === struct RayTracingShaderGroupCreateInfoKHR; struct RayTracingPipelineCreateInfoKHR; struct PhysicalDeviceRayTracingPipelineFeaturesKHR; struct PhysicalDeviceRayTracingPipelinePropertiesKHR; struct StridedDeviceAddressRegionKHR; struct TraceRaysIndirectCommandKHR; struct RayTracingPipelineInterfaceCreateInfoKHR; //=== VK_KHR_ray_query === struct PhysicalDeviceRayQueryFeaturesKHR; //=== VK_NV_framebuffer_mixed_samples === struct PipelineCoverageModulationStateCreateInfoNV; //=== VK_NV_shader_sm_builtins === struct PhysicalDeviceShaderSMBuiltinsPropertiesNV; struct PhysicalDeviceShaderSMBuiltinsFeaturesNV; //=== VK_EXT_image_drm_format_modifier === struct DrmFormatModifierPropertiesListEXT; struct DrmFormatModifierPropertiesEXT; struct PhysicalDeviceImageDrmFormatModifierInfoEXT; struct ImageDrmFormatModifierListCreateInfoEXT; struct ImageDrmFormatModifierExplicitCreateInfoEXT; struct ImageDrmFormatModifierPropertiesEXT; struct DrmFormatModifierPropertiesList2EXT; struct DrmFormatModifierProperties2EXT; //=== VK_EXT_validation_cache === struct ValidationCacheCreateInfoEXT; struct ShaderModuleValidationCacheCreateInfoEXT; #if defined( VK_ENABLE_BETA_EXTENSIONS ) //=== VK_KHR_portability_subset === struct PhysicalDevicePortabilitySubsetFeaturesKHR; struct PhysicalDevicePortabilitySubsetPropertiesKHR; #endif /*VK_ENABLE_BETA_EXTENSIONS*/ //=== VK_NV_shading_rate_image === struct ShadingRatePaletteNV; struct PipelineViewportShadingRateImageStateCreateInfoNV; struct PhysicalDeviceShadingRateImageFeaturesNV; struct PhysicalDeviceShadingRateImagePropertiesNV; struct CoarseSampleLocationNV; struct CoarseSampleOrderCustomNV; struct PipelineViewportCoarseSampleOrderStateCreateInfoNV; //=== VK_NV_ray_tracing === struct RayTracingShaderGroupCreateInfoNV; struct RayTracingPipelineCreateInfoNV; struct GeometryTrianglesNV; struct GeometryAABBNV; struct GeometryDataNV; struct GeometryNV; struct AccelerationStructureInfoNV; struct AccelerationStructureCreateInfoNV; struct BindAccelerationStructureMemoryInfoNV; struct WriteDescriptorSetAccelerationStructureNV; struct AccelerationStructureMemoryRequirementsInfoNV; struct PhysicalDeviceRayTracingPropertiesNV; //=== VK_NV_representative_fragment_test === struct PhysicalDeviceRepresentativeFragmentTestFeaturesNV; struct PipelineRepresentativeFragmentTestStateCreateInfoNV; //=== VK_EXT_filter_cubic === struct PhysicalDeviceImageViewImageFormatInfoEXT; struct FilterCubicImageViewImageFormatPropertiesEXT; //=== VK_EXT_external_memory_host === struct ImportMemoryHostPointerInfoEXT; struct MemoryHostPointerPropertiesEXT; struct PhysicalDeviceExternalMemoryHostPropertiesEXT; //=== VK_KHR_shader_clock === struct PhysicalDeviceShaderClockFeaturesKHR; //=== VK_AMD_pipeline_compiler_control === struct PipelineCompilerControlCreateInfoAMD; //=== VK_AMD_shader_core_properties === struct PhysicalDeviceShaderCorePropertiesAMD; //=== VK_KHR_video_decode_h265 === struct VideoDecodeH265ProfileInfoKHR; struct VideoDecodeH265CapabilitiesKHR; struct VideoDecodeH265SessionParametersCreateInfoKHR; struct VideoDecodeH265SessionParametersAddInfoKHR; struct VideoDecodeH265PictureInfoKHR; struct VideoDecodeH265DpbSlotInfoKHR; //=== VK_AMD_memory_overallocation_behavior === struct DeviceMemoryOverallocationCreateInfoAMD; //=== VK_EXT_vertex_attribute_divisor === struct PhysicalDeviceVertexAttributeDivisorPropertiesEXT; #if defined( VK_USE_PLATFORM_GGP ) //=== VK_GGP_frame_token === struct PresentFrameTokenGGP; #endif /*VK_USE_PLATFORM_GGP*/ //=== VK_NV_mesh_shader === struct PhysicalDeviceMeshShaderFeaturesNV; struct PhysicalDeviceMeshShaderPropertiesNV; struct DrawMeshTasksIndirectCommandNV; //=== VK_NV_shader_image_footprint === struct PhysicalDeviceShaderImageFootprintFeaturesNV; //=== VK_NV_scissor_exclusive === struct PipelineViewportExclusiveScissorStateCreateInfoNV; struct PhysicalDeviceExclusiveScissorFeaturesNV; //=== VK_NV_device_diagnostic_checkpoints === struct QueueFamilyCheckpointPropertiesNV; struct CheckpointDataNV; struct QueueFamilyCheckpointProperties2NV; struct CheckpointData2NV; //=== VK_INTEL_shader_integer_functions2 === struct PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL; //=== VK_INTEL_performance_query === union PerformanceValueDataINTEL; struct PerformanceValueINTEL; struct InitializePerformanceApiInfoINTEL; struct QueryPoolPerformanceQueryCreateInfoINTEL; using QueryPoolCreateInfoINTEL = QueryPoolPerformanceQueryCreateInfoINTEL; struct PerformanceMarkerInfoINTEL; struct PerformanceStreamMarkerInfoINTEL; struct PerformanceOverrideInfoINTEL; struct PerformanceConfigurationAcquireInfoINTEL; //=== VK_EXT_pci_bus_info === struct PhysicalDevicePCIBusInfoPropertiesEXT; //=== VK_AMD_display_native_hdr === struct DisplayNativeHdrSurfaceCapabilitiesAMD; struct SwapchainDisplayNativeHdrCreateInfoAMD; #if defined( VK_USE_PLATFORM_FUCHSIA ) //=== VK_FUCHSIA_imagepipe_surface === struct ImagePipeSurfaceCreateInfoFUCHSIA; #endif /*VK_USE_PLATFORM_FUCHSIA*/ #if defined( VK_USE_PLATFORM_METAL_EXT ) //=== VK_EXT_metal_surface === struct MetalSurfaceCreateInfoEXT; #endif /*VK_USE_PLATFORM_METAL_EXT*/ //=== VK_EXT_fragment_density_map === struct PhysicalDeviceFragmentDensityMapFeaturesEXT; struct PhysicalDeviceFragmentDensityMapPropertiesEXT; struct RenderPassFragmentDensityMapCreateInfoEXT; struct RenderingFragmentDensityMapAttachmentInfoEXT; //=== VK_KHR_fragment_shading_rate === struct FragmentShadingRateAttachmentInfoKHR; struct PipelineFragmentShadingRateStateCreateInfoKHR; struct PhysicalDeviceFragmentShadingRateFeaturesKHR; struct PhysicalDeviceFragmentShadingRatePropertiesKHR; struct PhysicalDeviceFragmentShadingRateKHR; struct RenderingFragmentShadingRateAttachmentInfoKHR; //=== VK_AMD_shader_core_properties2 === struct PhysicalDeviceShaderCoreProperties2AMD; //=== VK_AMD_device_coherent_memory === struct PhysicalDeviceCoherentMemoryFeaturesAMD; //=== VK_EXT_shader_image_atomic_int64 === struct PhysicalDeviceShaderImageAtomicInt64FeaturesEXT; //=== VK_KHR_shader_quad_control === struct PhysicalDeviceShaderQuadControlFeaturesKHR; //=== VK_EXT_memory_budget === struct PhysicalDeviceMemoryBudgetPropertiesEXT; //=== VK_EXT_memory_priority === struct PhysicalDeviceMemoryPriorityFeaturesEXT; struct MemoryPriorityAllocateInfoEXT; //=== VK_KHR_surface_protected_capabilities === struct SurfaceProtectedCapabilitiesKHR; //=== VK_NV_dedicated_allocation_image_aliasing === struct PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV; //=== VK_EXT_buffer_device_address === struct PhysicalDeviceBufferDeviceAddressFeaturesEXT; using PhysicalDeviceBufferAddressFeaturesEXT = PhysicalDeviceBufferDeviceAddressFeaturesEXT; struct BufferDeviceAddressCreateInfoEXT; //=== VK_EXT_validation_features === struct ValidationFeaturesEXT; //=== VK_KHR_present_wait === struct PhysicalDevicePresentWaitFeaturesKHR; //=== VK_NV_cooperative_matrix === struct CooperativeMatrixPropertiesNV; struct PhysicalDeviceCooperativeMatrixFeaturesNV; struct PhysicalDeviceCooperativeMatrixPropertiesNV; //=== VK_NV_coverage_reduction_mode === struct PhysicalDeviceCoverageReductionModeFeaturesNV; struct PipelineCoverageReductionStateCreateInfoNV; struct FramebufferMixedSamplesCombinationNV; //=== VK_EXT_fragment_shader_interlock === struct PhysicalDeviceFragmentShaderInterlockFeaturesEXT; //=== VK_EXT_ycbcr_image_arrays === struct PhysicalDeviceYcbcrImageArraysFeaturesEXT; //=== VK_EXT_provoking_vertex === struct PhysicalDeviceProvokingVertexFeaturesEXT; struct PhysicalDeviceProvokingVertexPropertiesEXT; struct PipelineRasterizationProvokingVertexStateCreateInfoEXT; #if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_EXT_full_screen_exclusive === struct SurfaceFullScreenExclusiveInfoEXT; struct SurfaceCapabilitiesFullScreenExclusiveEXT; struct SurfaceFullScreenExclusiveWin32InfoEXT; #endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_EXT_headless_surface === struct HeadlessSurfaceCreateInfoEXT; //=== VK_EXT_shader_atomic_float === struct PhysicalDeviceShaderAtomicFloatFeaturesEXT; //=== VK_EXT_extended_dynamic_state === struct PhysicalDeviceExtendedDynamicStateFeaturesEXT; //=== VK_KHR_pipeline_executable_properties === struct PhysicalDevicePipelineExecutablePropertiesFeaturesKHR; struct PipelineInfoKHR; using PipelineInfoEXT = PipelineInfoKHR; struct PipelineExecutablePropertiesKHR; struct PipelineExecutableInfoKHR; union PipelineExecutableStatisticValueKHR; struct PipelineExecutableStatisticKHR; struct PipelineExecutableInternalRepresentationKHR; //=== VK_EXT_map_memory_placed === struct PhysicalDeviceMapMemoryPlacedFeaturesEXT; struct PhysicalDeviceMapMemoryPlacedPropertiesEXT; struct MemoryMapPlacedInfoEXT; //=== VK_EXT_shader_atomic_float2 === struct PhysicalDeviceShaderAtomicFloat2FeaturesEXT; //=== VK_EXT_surface_maintenance1 === struct SurfacePresentModeEXT; struct SurfacePresentScalingCapabilitiesEXT; struct SurfacePresentModeCompatibilityEXT; //=== VK_EXT_swapchain_maintenance1 === struct PhysicalDeviceSwapchainMaintenance1FeaturesEXT; struct SwapchainPresentFenceInfoEXT; struct SwapchainPresentModesCreateInfoEXT; struct SwapchainPresentModeInfoEXT; struct SwapchainPresentScalingCreateInfoEXT; struct ReleaseSwapchainImagesInfoEXT; //=== VK_NV_device_generated_commands === struct PhysicalDeviceDeviceGeneratedCommandsPropertiesNV; struct PhysicalDeviceDeviceGeneratedCommandsFeaturesNV; struct GraphicsShaderGroupCreateInfoNV; struct GraphicsPipelineShaderGroupsCreateInfoNV; struct BindShaderGroupIndirectCommandNV; struct BindIndexBufferIndirectCommandNV; struct BindVertexBufferIndirectCommandNV; struct SetStateFlagsIndirectCommandNV; struct IndirectCommandsStreamNV; struct IndirectCommandsLayoutTokenNV; struct IndirectCommandsLayoutCreateInfoNV; struct GeneratedCommandsInfoNV; struct GeneratedCommandsMemoryRequirementsInfoNV; //=== VK_NV_inherited_viewport_scissor === struct PhysicalDeviceInheritedViewportScissorFeaturesNV; struct CommandBufferInheritanceViewportScissorInfoNV; //=== VK_EXT_texel_buffer_alignment === struct PhysicalDeviceTexelBufferAlignmentFeaturesEXT; //=== VK_QCOM_render_pass_transform === struct RenderPassTransformBeginInfoQCOM; struct CommandBufferInheritanceRenderPassTransformInfoQCOM; //=== VK_EXT_depth_bias_control === struct PhysicalDeviceDepthBiasControlFeaturesEXT; struct DepthBiasInfoEXT; struct DepthBiasRepresentationInfoEXT; //=== VK_EXT_device_memory_report === struct PhysicalDeviceDeviceMemoryReportFeaturesEXT; struct DeviceDeviceMemoryReportCreateInfoEXT; struct DeviceMemoryReportCallbackDataEXT; //=== VK_EXT_robustness2 === struct PhysicalDeviceRobustness2FeaturesEXT; struct PhysicalDeviceRobustness2PropertiesEXT; //=== VK_EXT_custom_border_color === struct SamplerCustomBorderColorCreateInfoEXT; struct PhysicalDeviceCustomBorderColorPropertiesEXT; struct PhysicalDeviceCustomBorderColorFeaturesEXT; //=== VK_KHR_pipeline_library === struct PipelineLibraryCreateInfoKHR; //=== VK_NV_present_barrier === struct PhysicalDevicePresentBarrierFeaturesNV; struct SurfaceCapabilitiesPresentBarrierNV; struct SwapchainPresentBarrierCreateInfoNV; //=== VK_KHR_present_id === struct PresentIdKHR; struct PhysicalDevicePresentIdFeaturesKHR; //=== VK_KHR_video_encode_queue === struct VideoEncodeInfoKHR; struct VideoEncodeCapabilitiesKHR; struct QueryPoolVideoEncodeFeedbackCreateInfoKHR; struct VideoEncodeUsageInfoKHR; struct VideoEncodeRateControlInfoKHR; struct VideoEncodeRateControlLayerInfoKHR; struct PhysicalDeviceVideoEncodeQualityLevelInfoKHR; struct VideoEncodeQualityLevelPropertiesKHR; struct VideoEncodeQualityLevelInfoKHR; struct VideoEncodeSessionParametersGetInfoKHR; struct VideoEncodeSessionParametersFeedbackInfoKHR; //=== VK_NV_device_diagnostics_config === struct PhysicalDeviceDiagnosticsConfigFeaturesNV; struct DeviceDiagnosticsConfigCreateInfoNV; #if defined( VK_ENABLE_BETA_EXTENSIONS ) //=== VK_NV_cuda_kernel_launch === struct CudaModuleCreateInfoNV; struct CudaFunctionCreateInfoNV; struct CudaLaunchInfoNV; struct PhysicalDeviceCudaKernelLaunchFeaturesNV; struct PhysicalDeviceCudaKernelLaunchPropertiesNV; #endif /*VK_ENABLE_BETA_EXTENSIONS*/ //=== VK_NV_low_latency === struct QueryLowLatencySupportNV; #if defined( VK_USE_PLATFORM_METAL_EXT ) //=== VK_EXT_metal_objects === struct ExportMetalObjectCreateInfoEXT; struct ExportMetalObjectsInfoEXT; struct ExportMetalDeviceInfoEXT; struct ExportMetalCommandQueueInfoEXT; struct ExportMetalBufferInfoEXT; struct ImportMetalBufferInfoEXT; struct ExportMetalTextureInfoEXT; struct ImportMetalTextureInfoEXT; struct ExportMetalIOSurfaceInfoEXT; struct ImportMetalIOSurfaceInfoEXT; struct ExportMetalSharedEventInfoEXT; struct ImportMetalSharedEventInfoEXT; #endif /*VK_USE_PLATFORM_METAL_EXT*/ //=== VK_EXT_descriptor_buffer === struct PhysicalDeviceDescriptorBufferPropertiesEXT; struct PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT; struct PhysicalDeviceDescriptorBufferFeaturesEXT; struct DescriptorAddressInfoEXT; struct DescriptorBufferBindingInfoEXT; struct DescriptorBufferBindingPushDescriptorBufferHandleEXT; union DescriptorDataEXT; struct DescriptorGetInfoEXT; struct BufferCaptureDescriptorDataInfoEXT; struct ImageCaptureDescriptorDataInfoEXT; struct ImageViewCaptureDescriptorDataInfoEXT; struct SamplerCaptureDescriptorDataInfoEXT; struct OpaqueCaptureDescriptorDataCreateInfoEXT; struct AccelerationStructureCaptureDescriptorDataInfoEXT; //=== VK_EXT_graphics_pipeline_library === struct PhysicalDeviceGraphicsPipelineLibraryFeaturesEXT; struct PhysicalDeviceGraphicsPipelineLibraryPropertiesEXT; struct GraphicsPipelineLibraryCreateInfoEXT; //=== VK_AMD_shader_early_and_late_fragment_tests === struct PhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD; //=== VK_KHR_fragment_shader_barycentric === struct PhysicalDeviceFragmentShaderBarycentricFeaturesKHR; using PhysicalDeviceFragmentShaderBarycentricFeaturesNV = PhysicalDeviceFragmentShaderBarycentricFeaturesKHR; struct PhysicalDeviceFragmentShaderBarycentricPropertiesKHR; //=== VK_KHR_shader_subgroup_uniform_control_flow === struct PhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR; //=== VK_NV_fragment_shading_rate_enums === struct PhysicalDeviceFragmentShadingRateEnumsFeaturesNV; struct PhysicalDeviceFragmentShadingRateEnumsPropertiesNV; struct PipelineFragmentShadingRateEnumStateCreateInfoNV; //=== VK_NV_ray_tracing_motion_blur === struct AccelerationStructureGeometryMotionTrianglesDataNV; struct AccelerationStructureMotionInfoNV; struct AccelerationStructureMotionInstanceNV; union AccelerationStructureMotionInstanceDataNV; struct AccelerationStructureMatrixMotionInstanceNV; struct AccelerationStructureSRTMotionInstanceNV; struct SRTDataNV; struct PhysicalDeviceRayTracingMotionBlurFeaturesNV; //=== VK_EXT_mesh_shader === struct PhysicalDeviceMeshShaderFeaturesEXT; struct PhysicalDeviceMeshShaderPropertiesEXT; struct DrawMeshTasksIndirectCommandEXT; //=== VK_EXT_ycbcr_2plane_444_formats === struct PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT; //=== VK_EXT_fragment_density_map2 === struct PhysicalDeviceFragmentDensityMap2FeaturesEXT; struct PhysicalDeviceFragmentDensityMap2PropertiesEXT; //=== VK_QCOM_rotated_copy_commands === struct CopyCommandTransformInfoQCOM; //=== VK_KHR_workgroup_memory_explicit_layout === struct PhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR; //=== VK_EXT_image_compression_control === struct PhysicalDeviceImageCompressionControlFeaturesEXT; struct ImageCompressionControlEXT; struct ImageCompressionPropertiesEXT; //=== VK_EXT_attachment_feedback_loop_layout === struct PhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT; //=== VK_EXT_4444_formats === struct PhysicalDevice4444FormatsFeaturesEXT; //=== VK_EXT_device_fault === struct PhysicalDeviceFaultFeaturesEXT; struct DeviceFaultCountsEXT; struct DeviceFaultInfoEXT; struct DeviceFaultAddressInfoEXT; struct DeviceFaultVendorInfoEXT; struct DeviceFaultVendorBinaryHeaderVersionOneEXT; //=== VK_EXT_rgba10x6_formats === struct PhysicalDeviceRGBA10X6FormatsFeaturesEXT; #if defined( VK_USE_PLATFORM_DIRECTFB_EXT ) //=== VK_EXT_directfb_surface === struct DirectFBSurfaceCreateInfoEXT; #endif /*VK_USE_PLATFORM_DIRECTFB_EXT*/ //=== VK_EXT_vertex_input_dynamic_state === struct PhysicalDeviceVertexInputDynamicStateFeaturesEXT; struct VertexInputBindingDescription2EXT; struct VertexInputAttributeDescription2EXT; //=== VK_EXT_physical_device_drm === struct PhysicalDeviceDrmPropertiesEXT; //=== VK_EXT_device_address_binding_report === struct PhysicalDeviceAddressBindingReportFeaturesEXT; struct DeviceAddressBindingCallbackDataEXT; //=== VK_EXT_depth_clip_control === struct PhysicalDeviceDepthClipControlFeaturesEXT; struct PipelineViewportDepthClipControlCreateInfoEXT; //=== VK_EXT_primitive_topology_list_restart === struct PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT; //=== VK_EXT_present_mode_fifo_latest_ready === struct PhysicalDevicePresentModeFifoLatestReadyFeaturesEXT; #if defined( VK_USE_PLATFORM_FUCHSIA ) //=== VK_FUCHSIA_external_memory === struct ImportMemoryZirconHandleInfoFUCHSIA; struct MemoryZirconHandlePropertiesFUCHSIA; struct MemoryGetZirconHandleInfoFUCHSIA; #endif /*VK_USE_PLATFORM_FUCHSIA*/ #if defined( VK_USE_PLATFORM_FUCHSIA ) //=== VK_FUCHSIA_external_semaphore === struct ImportSemaphoreZirconHandleInfoFUCHSIA; struct SemaphoreGetZirconHandleInfoFUCHSIA; #endif /*VK_USE_PLATFORM_FUCHSIA*/ #if defined( VK_USE_PLATFORM_FUCHSIA ) //=== VK_FUCHSIA_buffer_collection === struct BufferCollectionCreateInfoFUCHSIA; struct ImportMemoryBufferCollectionFUCHSIA; struct BufferCollectionImageCreateInfoFUCHSIA; struct BufferConstraintsInfoFUCHSIA; struct BufferCollectionBufferCreateInfoFUCHSIA; struct BufferCollectionPropertiesFUCHSIA; struct SysmemColorSpaceFUCHSIA; struct ImageConstraintsInfoFUCHSIA; struct ImageFormatConstraintsInfoFUCHSIA; struct BufferCollectionConstraintsInfoFUCHSIA; #endif /*VK_USE_PLATFORM_FUCHSIA*/ //=== VK_HUAWEI_subpass_shading === struct SubpassShadingPipelineCreateInfoHUAWEI; struct PhysicalDeviceSubpassShadingFeaturesHUAWEI; struct PhysicalDeviceSubpassShadingPropertiesHUAWEI; //=== VK_HUAWEI_invocation_mask === struct PhysicalDeviceInvocationMaskFeaturesHUAWEI; //=== VK_NV_external_memory_rdma === struct MemoryGetRemoteAddressInfoNV; struct PhysicalDeviceExternalMemoryRDMAFeaturesNV; //=== VK_EXT_pipeline_properties === struct PipelinePropertiesIdentifierEXT; struct PhysicalDevicePipelinePropertiesFeaturesEXT; //=== VK_EXT_frame_boundary === struct PhysicalDeviceFrameBoundaryFeaturesEXT; struct FrameBoundaryEXT; //=== VK_EXT_multisampled_render_to_single_sampled === struct PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT; struct SubpassResolvePerformanceQueryEXT; struct MultisampledRenderToSingleSampledInfoEXT; //=== VK_EXT_extended_dynamic_state2 === struct PhysicalDeviceExtendedDynamicState2FeaturesEXT; #if defined( VK_USE_PLATFORM_SCREEN_QNX ) //=== VK_QNX_screen_surface === struct ScreenSurfaceCreateInfoQNX; #endif /*VK_USE_PLATFORM_SCREEN_QNX*/ //=== VK_EXT_color_write_enable === struct PhysicalDeviceColorWriteEnableFeaturesEXT; struct PipelineColorWriteCreateInfoEXT; //=== VK_EXT_primitives_generated_query === struct PhysicalDevicePrimitivesGeneratedQueryFeaturesEXT; //=== VK_KHR_ray_tracing_maintenance1 === struct PhysicalDeviceRayTracingMaintenance1FeaturesKHR; struct TraceRaysIndirectCommand2KHR; //=== VK_EXT_image_view_min_lod === struct PhysicalDeviceImageViewMinLodFeaturesEXT; struct ImageViewMinLodCreateInfoEXT; //=== VK_EXT_multi_draw === struct PhysicalDeviceMultiDrawFeaturesEXT; struct PhysicalDeviceMultiDrawPropertiesEXT; struct MultiDrawInfoEXT; struct MultiDrawIndexedInfoEXT; //=== VK_EXT_image_2d_view_of_3d === struct PhysicalDeviceImage2DViewOf3DFeaturesEXT; //=== VK_EXT_shader_tile_image === struct PhysicalDeviceShaderTileImageFeaturesEXT; struct PhysicalDeviceShaderTileImagePropertiesEXT; //=== VK_EXT_opacity_micromap === struct MicromapBuildInfoEXT; struct MicromapUsageEXT; struct MicromapCreateInfoEXT; struct PhysicalDeviceOpacityMicromapFeaturesEXT; struct PhysicalDeviceOpacityMicromapPropertiesEXT; struct MicromapVersionInfoEXT; struct CopyMicromapToMemoryInfoEXT; struct CopyMemoryToMicromapInfoEXT; struct CopyMicromapInfoEXT; struct MicromapBuildSizesInfoEXT; struct AccelerationStructureTrianglesOpacityMicromapEXT; struct MicromapTriangleEXT; #if defined( VK_ENABLE_BETA_EXTENSIONS ) //=== VK_NV_displacement_micromap === struct PhysicalDeviceDisplacementMicromapFeaturesNV; struct PhysicalDeviceDisplacementMicromapPropertiesNV; struct AccelerationStructureTrianglesDisplacementMicromapNV; #endif /*VK_ENABLE_BETA_EXTENSIONS*/ //=== VK_HUAWEI_cluster_culling_shader === struct PhysicalDeviceClusterCullingShaderFeaturesHUAWEI; struct PhysicalDeviceClusterCullingShaderPropertiesHUAWEI; struct PhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI; //=== VK_EXT_border_color_swizzle === struct PhysicalDeviceBorderColorSwizzleFeaturesEXT; struct SamplerBorderColorComponentMappingCreateInfoEXT; //=== VK_EXT_pageable_device_local_memory === struct PhysicalDevicePageableDeviceLocalMemoryFeaturesEXT; //=== VK_ARM_shader_core_properties === struct PhysicalDeviceShaderCorePropertiesARM; //=== VK_ARM_scheduling_controls === struct DeviceQueueShaderCoreControlCreateInfoARM; struct PhysicalDeviceSchedulingControlsFeaturesARM; struct PhysicalDeviceSchedulingControlsPropertiesARM; //=== VK_EXT_image_sliced_view_of_3d === struct PhysicalDeviceImageSlicedViewOf3DFeaturesEXT; struct ImageViewSlicedCreateInfoEXT; //=== VK_VALVE_descriptor_set_host_mapping === struct PhysicalDeviceDescriptorSetHostMappingFeaturesVALVE; struct DescriptorSetBindingReferenceVALVE; struct DescriptorSetLayoutHostMappingInfoVALVE; //=== VK_EXT_non_seamless_cube_map === struct PhysicalDeviceNonSeamlessCubeMapFeaturesEXT; //=== VK_ARM_render_pass_striped === struct PhysicalDeviceRenderPassStripedFeaturesARM; struct PhysicalDeviceRenderPassStripedPropertiesARM; struct RenderPassStripeBeginInfoARM; struct RenderPassStripeInfoARM; struct RenderPassStripeSubmitInfoARM; //=== VK_QCOM_fragment_density_map_offset === struct PhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM; struct PhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM; struct SubpassFragmentDensityMapOffsetEndInfoQCOM; //=== VK_NV_copy_memory_indirect === struct CopyMemoryIndirectCommandNV; struct CopyMemoryToImageIndirectCommandNV; struct PhysicalDeviceCopyMemoryIndirectFeaturesNV; struct PhysicalDeviceCopyMemoryIndirectPropertiesNV; //=== VK_NV_memory_decompression === struct DecompressMemoryRegionNV; struct PhysicalDeviceMemoryDecompressionFeaturesNV; struct PhysicalDeviceMemoryDecompressionPropertiesNV; //=== VK_NV_device_generated_commands_compute === struct PhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV; struct ComputePipelineIndirectBufferInfoNV; struct PipelineIndirectDeviceAddressInfoNV; struct BindPipelineIndirectCommandNV; //=== VK_NV_ray_tracing_linear_swept_spheres === struct PhysicalDeviceRayTracingLinearSweptSpheresFeaturesNV; struct AccelerationStructureGeometryLinearSweptSpheresDataNV; struct AccelerationStructureGeometrySpheresDataNV; //=== VK_NV_linear_color_attachment === struct PhysicalDeviceLinearColorAttachmentFeaturesNV; //=== VK_KHR_shader_maximal_reconvergence === struct PhysicalDeviceShaderMaximalReconvergenceFeaturesKHR; //=== VK_EXT_image_compression_control_swapchain === struct PhysicalDeviceImageCompressionControlSwapchainFeaturesEXT; //=== VK_QCOM_image_processing === struct ImageViewSampleWeightCreateInfoQCOM; struct PhysicalDeviceImageProcessingFeaturesQCOM; struct PhysicalDeviceImageProcessingPropertiesQCOM; //=== VK_EXT_nested_command_buffer === struct PhysicalDeviceNestedCommandBufferFeaturesEXT; struct PhysicalDeviceNestedCommandBufferPropertiesEXT; //=== VK_EXT_external_memory_acquire_unmodified === struct ExternalMemoryAcquireUnmodifiedEXT; //=== VK_EXT_extended_dynamic_state3 === struct PhysicalDeviceExtendedDynamicState3FeaturesEXT; struct PhysicalDeviceExtendedDynamicState3PropertiesEXT; struct ColorBlendEquationEXT; struct ColorBlendAdvancedEXT; //=== VK_EXT_subpass_merge_feedback === struct PhysicalDeviceSubpassMergeFeedbackFeaturesEXT; struct RenderPassCreationControlEXT; struct RenderPassCreationFeedbackInfoEXT; struct RenderPassCreationFeedbackCreateInfoEXT; struct RenderPassSubpassFeedbackInfoEXT; struct RenderPassSubpassFeedbackCreateInfoEXT; //=== VK_LUNARG_direct_driver_loading === struct DirectDriverLoadingInfoLUNARG; struct DirectDriverLoadingListLUNARG; //=== VK_EXT_shader_module_identifier === struct PhysicalDeviceShaderModuleIdentifierFeaturesEXT; struct PhysicalDeviceShaderModuleIdentifierPropertiesEXT; struct PipelineShaderStageModuleIdentifierCreateInfoEXT; struct ShaderModuleIdentifierEXT; //=== VK_EXT_rasterization_order_attachment_access === struct PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT; using PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesARM = PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT; //=== VK_NV_optical_flow === struct PhysicalDeviceOpticalFlowFeaturesNV; struct PhysicalDeviceOpticalFlowPropertiesNV; struct OpticalFlowImageFormatInfoNV; struct OpticalFlowImageFormatPropertiesNV; struct OpticalFlowSessionCreateInfoNV; struct OpticalFlowSessionCreatePrivateDataInfoNV; struct OpticalFlowExecuteInfoNV; //=== VK_EXT_legacy_dithering === struct PhysicalDeviceLegacyDitheringFeaturesEXT; #if defined( VK_USE_PLATFORM_ANDROID_KHR ) //=== VK_ANDROID_external_format_resolve === struct PhysicalDeviceExternalFormatResolveFeaturesANDROID; struct PhysicalDeviceExternalFormatResolvePropertiesANDROID; struct AndroidHardwareBufferFormatResolvePropertiesANDROID; #endif /*VK_USE_PLATFORM_ANDROID_KHR*/ //=== VK_AMD_anti_lag === struct PhysicalDeviceAntiLagFeaturesAMD; struct AntiLagDataAMD; struct AntiLagPresentationInfoAMD; //=== VK_KHR_ray_tracing_position_fetch === struct PhysicalDeviceRayTracingPositionFetchFeaturesKHR; //=== VK_EXT_shader_object === struct PhysicalDeviceShaderObjectFeaturesEXT; struct PhysicalDeviceShaderObjectPropertiesEXT; struct ShaderCreateInfoEXT; //=== VK_KHR_pipeline_binary === struct PhysicalDevicePipelineBinaryFeaturesKHR; struct PhysicalDevicePipelineBinaryPropertiesKHR; struct DevicePipelineBinaryInternalCacheControlKHR; struct PipelineBinaryKeyKHR; struct PipelineBinaryDataKHR; struct PipelineBinaryKeysAndDataKHR; struct PipelineBinaryCreateInfoKHR; struct PipelineBinaryInfoKHR; struct ReleaseCapturedPipelineDataInfoKHR; struct PipelineBinaryDataInfoKHR; struct PipelineCreateInfoKHR; struct PipelineBinaryHandlesInfoKHR; //=== VK_QCOM_tile_properties === struct PhysicalDeviceTilePropertiesFeaturesQCOM; struct TilePropertiesQCOM; //=== VK_SEC_amigo_profiling === struct PhysicalDeviceAmigoProfilingFeaturesSEC; struct AmigoProfilingSubmitInfoSEC; //=== VK_QCOM_multiview_per_view_viewports === struct PhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM; //=== VK_NV_ray_tracing_invocation_reorder === struct PhysicalDeviceRayTracingInvocationReorderPropertiesNV; struct PhysicalDeviceRayTracingInvocationReorderFeaturesNV; //=== VK_NV_cooperative_vector === struct PhysicalDeviceCooperativeVectorPropertiesNV; struct PhysicalDeviceCooperativeVectorFeaturesNV; struct CooperativeVectorPropertiesNV; struct ConvertCooperativeVectorMatrixInfoNV; //=== VK_NV_extended_sparse_address_space === struct PhysicalDeviceExtendedSparseAddressSpaceFeaturesNV; struct PhysicalDeviceExtendedSparseAddressSpacePropertiesNV; //=== VK_EXT_mutable_descriptor_type === struct PhysicalDeviceMutableDescriptorTypeFeaturesEXT; using PhysicalDeviceMutableDescriptorTypeFeaturesVALVE = PhysicalDeviceMutableDescriptorTypeFeaturesEXT; struct MutableDescriptorTypeListEXT; using MutableDescriptorTypeListVALVE = MutableDescriptorTypeListEXT; struct MutableDescriptorTypeCreateInfoEXT; using MutableDescriptorTypeCreateInfoVALVE = MutableDescriptorTypeCreateInfoEXT; //=== VK_EXT_legacy_vertex_attributes === struct PhysicalDeviceLegacyVertexAttributesFeaturesEXT; struct PhysicalDeviceLegacyVertexAttributesPropertiesEXT; //=== VK_EXT_layer_settings === struct LayerSettingsCreateInfoEXT; struct LayerSettingEXT; //=== VK_ARM_shader_core_builtins === struct PhysicalDeviceShaderCoreBuiltinsFeaturesARM; struct PhysicalDeviceShaderCoreBuiltinsPropertiesARM; //=== VK_EXT_pipeline_library_group_handles === struct PhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT; //=== VK_EXT_dynamic_rendering_unused_attachments === struct PhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT; //=== VK_NV_low_latency2 === struct LatencySleepModeInfoNV; struct LatencySleepInfoNV; struct SetLatencyMarkerInfoNV; struct GetLatencyMarkerInfoNV; struct LatencyTimingsFrameReportNV; struct LatencySubmissionPresentIdNV; struct SwapchainLatencyCreateInfoNV; struct OutOfBandQueueTypeInfoNV; struct LatencySurfaceCapabilitiesNV; //=== VK_KHR_cooperative_matrix === struct CooperativeMatrixPropertiesKHR; struct PhysicalDeviceCooperativeMatrixFeaturesKHR; struct PhysicalDeviceCooperativeMatrixPropertiesKHR; //=== VK_QCOM_multiview_per_view_render_areas === struct PhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM; struct MultiviewPerViewRenderAreasRenderPassBeginInfoQCOM; //=== VK_KHR_compute_shader_derivatives === struct PhysicalDeviceComputeShaderDerivativesFeaturesKHR; using PhysicalDeviceComputeShaderDerivativesFeaturesNV = PhysicalDeviceComputeShaderDerivativesFeaturesKHR; struct PhysicalDeviceComputeShaderDerivativesPropertiesKHR; //=== VK_KHR_video_decode_av1 === struct VideoDecodeAV1ProfileInfoKHR; struct VideoDecodeAV1CapabilitiesKHR; struct VideoDecodeAV1SessionParametersCreateInfoKHR; struct VideoDecodeAV1PictureInfoKHR; struct VideoDecodeAV1DpbSlotInfoKHR; //=== VK_KHR_video_encode_av1 === struct PhysicalDeviceVideoEncodeAV1FeaturesKHR; struct VideoEncodeAV1CapabilitiesKHR; struct VideoEncodeAV1QualityLevelPropertiesKHR; struct VideoEncodeAV1SessionCreateInfoKHR; struct VideoEncodeAV1SessionParametersCreateInfoKHR; struct VideoEncodeAV1PictureInfoKHR; struct VideoEncodeAV1DpbSlotInfoKHR; struct VideoEncodeAV1ProfileInfoKHR; struct VideoEncodeAV1QIndexKHR; struct VideoEncodeAV1FrameSizeKHR; struct VideoEncodeAV1GopRemainingFrameInfoKHR; struct VideoEncodeAV1RateControlInfoKHR; struct VideoEncodeAV1RateControlLayerInfoKHR; //=== VK_KHR_video_maintenance1 === struct PhysicalDeviceVideoMaintenance1FeaturesKHR; struct VideoInlineQueryInfoKHR; //=== VK_NV_per_stage_descriptor_set === struct PhysicalDevicePerStageDescriptorSetFeaturesNV; //=== VK_QCOM_image_processing2 === struct PhysicalDeviceImageProcessing2FeaturesQCOM; struct PhysicalDeviceImageProcessing2PropertiesQCOM; struct SamplerBlockMatchWindowCreateInfoQCOM; //=== VK_QCOM_filter_cubic_weights === struct PhysicalDeviceCubicWeightsFeaturesQCOM; struct SamplerCubicWeightsCreateInfoQCOM; struct BlitImageCubicWeightsInfoQCOM; //=== VK_QCOM_ycbcr_degamma === struct PhysicalDeviceYcbcrDegammaFeaturesQCOM; struct SamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM; //=== VK_QCOM_filter_cubic_clamp === struct PhysicalDeviceCubicClampFeaturesQCOM; //=== VK_EXT_attachment_feedback_loop_dynamic_state === struct PhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT; #if defined( VK_USE_PLATFORM_SCREEN_QNX ) //=== VK_QNX_external_memory_screen_buffer === struct ScreenBufferPropertiesQNX; struct ScreenBufferFormatPropertiesQNX; struct ImportScreenBufferInfoQNX; struct ExternalFormatQNX; struct PhysicalDeviceExternalMemoryScreenBufferFeaturesQNX; #endif /*VK_USE_PLATFORM_SCREEN_QNX*/ //=== VK_MSFT_layered_driver === struct PhysicalDeviceLayeredDriverPropertiesMSFT; //=== VK_KHR_calibrated_timestamps === struct CalibratedTimestampInfoKHR; using CalibratedTimestampInfoEXT = CalibratedTimestampInfoKHR; //=== VK_KHR_maintenance6 === struct SetDescriptorBufferOffsetsInfoEXT; struct BindDescriptorBufferEmbeddedSamplersInfoEXT; //=== VK_NV_descriptor_pool_overallocation === struct PhysicalDeviceDescriptorPoolOverallocationFeaturesNV; //=== VK_NV_display_stereo === struct DisplaySurfaceStereoCreateInfoNV; struct DisplayModeStereoPropertiesNV; //=== VK_KHR_video_encode_quantization_map === struct VideoEncodeQuantizationMapCapabilitiesKHR; struct VideoFormatQuantizationMapPropertiesKHR; struct VideoEncodeQuantizationMapInfoKHR; struct VideoEncodeQuantizationMapSessionParametersCreateInfoKHR; struct PhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR; struct VideoEncodeH264QuantizationMapCapabilitiesKHR; struct VideoEncodeH265QuantizationMapCapabilitiesKHR; struct VideoFormatH265QuantizationMapPropertiesKHR; struct VideoEncodeAV1QuantizationMapCapabilitiesKHR; struct VideoFormatAV1QuantizationMapPropertiesKHR; //=== VK_NV_raw_access_chains === struct PhysicalDeviceRawAccessChainsFeaturesNV; //=== VK_KHR_shader_relaxed_extended_instruction === struct PhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR; //=== VK_NV_command_buffer_inheritance === struct PhysicalDeviceCommandBufferInheritanceFeaturesNV; //=== VK_KHR_maintenance7 === struct PhysicalDeviceMaintenance7FeaturesKHR; struct PhysicalDeviceMaintenance7PropertiesKHR; struct PhysicalDeviceLayeredApiPropertiesListKHR; struct PhysicalDeviceLayeredApiPropertiesKHR; struct PhysicalDeviceLayeredApiVulkanPropertiesKHR; //=== VK_NV_shader_atomic_float16_vector === struct PhysicalDeviceShaderAtomicFloat16VectorFeaturesNV; //=== VK_EXT_shader_replicated_composites === struct PhysicalDeviceShaderReplicatedCompositesFeaturesEXT; //=== VK_NV_ray_tracing_validation === struct PhysicalDeviceRayTracingValidationFeaturesNV; //=== VK_NV_cluster_acceleration_structure === struct PhysicalDeviceClusterAccelerationStructureFeaturesNV; struct PhysicalDeviceClusterAccelerationStructurePropertiesNV; struct ClusterAccelerationStructureClustersBottomLevelInputNV; struct ClusterAccelerationStructureTriangleClusterInputNV; struct ClusterAccelerationStructureMoveObjectsInputNV; union ClusterAccelerationStructureOpInputNV; struct ClusterAccelerationStructureInputInfoNV; struct ClusterAccelerationStructureCommandsInfoNV; struct StridedDeviceAddressNV; struct ClusterAccelerationStructureGeometryIndexAndGeometryFlagsNV; struct ClusterAccelerationStructureMoveObjectsInfoNV; struct ClusterAccelerationStructureBuildClustersBottomLevelInfoNV; struct ClusterAccelerationStructureBuildTriangleClusterInfoNV; struct ClusterAccelerationStructureBuildTriangleClusterTemplateInfoNV; struct ClusterAccelerationStructureInstantiateClusterInfoNV; struct RayTracingPipelineClusterAccelerationStructureCreateInfoNV; //=== VK_NV_partitioned_acceleration_structure === struct PhysicalDevicePartitionedAccelerationStructureFeaturesNV; struct PhysicalDevicePartitionedAccelerationStructurePropertiesNV; struct PartitionedAccelerationStructureFlagsNV; struct BuildPartitionedAccelerationStructureIndirectCommandNV; struct PartitionedAccelerationStructureWriteInstanceDataNV; struct PartitionedAccelerationStructureUpdateInstanceDataNV; struct PartitionedAccelerationStructureWritePartitionTranslationDataNV; struct WriteDescriptorSetPartitionedAccelerationStructureNV; struct PartitionedAccelerationStructureInstancesInputNV; struct BuildPartitionedAccelerationStructureInfoNV; //=== VK_EXT_device_generated_commands === struct PhysicalDeviceDeviceGeneratedCommandsFeaturesEXT; struct PhysicalDeviceDeviceGeneratedCommandsPropertiesEXT; struct GeneratedCommandsMemoryRequirementsInfoEXT; struct IndirectExecutionSetCreateInfoEXT; union IndirectExecutionSetInfoEXT; struct IndirectExecutionSetPipelineInfoEXT; struct IndirectExecutionSetShaderInfoEXT; struct GeneratedCommandsInfoEXT; struct WriteIndirectExecutionSetPipelineEXT; struct IndirectCommandsLayoutCreateInfoEXT; struct IndirectCommandsLayoutTokenEXT; struct DrawIndirectCountIndirectCommandEXT; struct IndirectCommandsVertexBufferTokenEXT; struct BindVertexBufferIndirectCommandEXT; struct IndirectCommandsIndexBufferTokenEXT; struct BindIndexBufferIndirectCommandEXT; struct IndirectCommandsPushConstantTokenEXT; struct IndirectCommandsExecutionSetTokenEXT; union IndirectCommandsTokenDataEXT; struct IndirectExecutionSetShaderLayoutInfoEXT; struct GeneratedCommandsPipelineInfoEXT; struct GeneratedCommandsShaderInfoEXT; struct WriteIndirectExecutionSetShaderEXT; //=== VK_KHR_maintenance8 === struct PhysicalDeviceMaintenance8FeaturesKHR; struct MemoryBarrierAccessFlags3KHR; //=== VK_MESA_image_alignment_control === struct PhysicalDeviceImageAlignmentControlFeaturesMESA; struct PhysicalDeviceImageAlignmentControlPropertiesMESA; struct ImageAlignmentControlCreateInfoMESA; //=== VK_EXT_depth_clamp_control === struct PhysicalDeviceDepthClampControlFeaturesEXT; struct PipelineViewportDepthClampControlCreateInfoEXT; struct DepthClampRangeEXT; //=== VK_KHR_video_maintenance2 === struct PhysicalDeviceVideoMaintenance2FeaturesKHR; struct VideoDecodeH264InlineSessionParametersInfoKHR; struct VideoDecodeH265InlineSessionParametersInfoKHR; struct VideoDecodeAV1InlineSessionParametersInfoKHR; //=== VK_HUAWEI_hdr_vivid === struct PhysicalDeviceHdrVividFeaturesHUAWEI; struct HdrVividDynamicMetadataHUAWEI; //=== VK_NV_cooperative_matrix2 === struct CooperativeMatrixFlexibleDimensionsPropertiesNV; struct PhysicalDeviceCooperativeMatrix2FeaturesNV; struct PhysicalDeviceCooperativeMatrix2PropertiesNV; //=== VK_ARM_pipeline_opacity_micromap === struct PhysicalDevicePipelineOpacityMicromapFeaturesARM; #if defined( VK_USE_PLATFORM_METAL_EXT ) //=== VK_EXT_external_memory_metal === struct ImportMemoryMetalHandleInfoEXT; struct MemoryMetalHandlePropertiesEXT; struct MemoryGetMetalHandleInfoEXT; #endif /*VK_USE_PLATFORM_METAL_EXT*/ //=== VK_KHR_depth_clamp_zero_one === struct PhysicalDeviceDepthClampZeroOneFeaturesKHR; using PhysicalDeviceDepthClampZeroOneFeaturesEXT = PhysicalDeviceDepthClampZeroOneFeaturesKHR; //=== VK_EXT_vertex_attribute_robustness === struct PhysicalDeviceVertexAttributeRobustnessFeaturesEXT; //=================================== //=== HANDLE forward declarations === //=================================== //=== VK_VERSION_1_0 === class Instance; class PhysicalDevice; class Device; class Queue; class DeviceMemory; class Fence; class Semaphore; class Event; class QueryPool; class Buffer; class BufferView; class Image; class ImageView; class ShaderModule; class PipelineCache; class Pipeline; class PipelineLayout; class Sampler; class DescriptorPool; class DescriptorSet; class DescriptorSetLayout; class Framebuffer; class RenderPass; class CommandPool; class CommandBuffer; //=== VK_VERSION_1_1 === class SamplerYcbcrConversion; class DescriptorUpdateTemplate; //=== VK_VERSION_1_3 === class PrivateDataSlot; //=== VK_KHR_surface === class SurfaceKHR; //=== VK_KHR_swapchain === class SwapchainKHR; //=== VK_KHR_display === class DisplayKHR; class DisplayModeKHR; //=== VK_EXT_debug_report === class DebugReportCallbackEXT; //=== VK_KHR_video_queue === class VideoSessionKHR; class VideoSessionParametersKHR; //=== VK_NVX_binary_import === class CuModuleNVX; class CuFunctionNVX; //=== VK_EXT_debug_utils === class DebugUtilsMessengerEXT; //=== VK_KHR_acceleration_structure === class AccelerationStructureKHR; //=== VK_EXT_validation_cache === class ValidationCacheEXT; //=== VK_NV_ray_tracing === class AccelerationStructureNV; //=== VK_INTEL_performance_query === class PerformanceConfigurationINTEL; //=== VK_KHR_deferred_host_operations === class DeferredOperationKHR; //=== VK_NV_device_generated_commands === class IndirectCommandsLayoutNV; #if defined( VK_ENABLE_BETA_EXTENSIONS ) //=== VK_NV_cuda_kernel_launch === class CudaModuleNV; class CudaFunctionNV; #endif /*VK_ENABLE_BETA_EXTENSIONS*/ #if defined( VK_USE_PLATFORM_FUCHSIA ) //=== VK_FUCHSIA_buffer_collection === class BufferCollectionFUCHSIA; #endif /*VK_USE_PLATFORM_FUCHSIA*/ //=== VK_EXT_opacity_micromap === class MicromapEXT; //=== VK_NV_optical_flow === class OpticalFlowSessionNV; //=== VK_EXT_shader_object === class ShaderEXT; //=== VK_KHR_pipeline_binary === class PipelineBinaryKHR; //=== VK_EXT_device_generated_commands === class IndirectCommandsLayoutEXT; class IndirectExecutionSetEXT; typedef void( VKAPI_PTR * PFN_VoidFunction )(); #ifndef VULKAN_HPP_NO_SMART_HANDLE //====================== //=== UNIQUE HANDLEs === //====================== //=== VK_VERSION_1_0 === template class UniqueHandleTraits { public: using deleter = detail::ObjectDestroy; }; using UniqueInstance = UniqueHandle; template class UniqueHandleTraits { public: using deleter = detail::ObjectDestroy; }; using UniqueDevice = UniqueHandle; template class UniqueHandleTraits { public: using deleter = detail::ObjectFree; }; using UniqueDeviceMemory = UniqueHandle; template class UniqueHandleTraits { public: using deleter = detail::ObjectDestroy; }; using UniqueFence = UniqueHandle; template class UniqueHandleTraits { public: using deleter = detail::ObjectDestroy; }; using UniqueSemaphore = UniqueHandle; template class UniqueHandleTraits { public: using deleter = detail::ObjectDestroy; }; using UniqueEvent = UniqueHandle; template class UniqueHandleTraits { public: using deleter = detail::ObjectDestroy; }; using UniqueQueryPool = UniqueHandle; template class UniqueHandleTraits { public: using deleter = detail::ObjectDestroy; }; using UniqueBuffer = UniqueHandle; template class UniqueHandleTraits { public: using deleter = detail::ObjectDestroy; }; using UniqueBufferView = UniqueHandle; template class UniqueHandleTraits { public: using deleter = detail::ObjectDestroy; }; using UniqueImage = UniqueHandle; template class UniqueHandleTraits { public: using deleter = detail::ObjectDestroy; }; using UniqueImageView = UniqueHandle; template class UniqueHandleTraits { public: using deleter = detail::ObjectDestroy; }; using UniqueShaderModule = UniqueHandle; template class UniqueHandleTraits { public: using deleter = detail::ObjectDestroy; }; using UniquePipelineCache = UniqueHandle; template class UniqueHandleTraits { public: using deleter = detail::ObjectDestroy; }; using UniquePipeline = UniqueHandle; template class UniqueHandleTraits { public: using deleter = detail::ObjectDestroy; }; using UniquePipelineLayout = UniqueHandle; template class UniqueHandleTraits { public: using deleter = detail::ObjectDestroy; }; using UniqueSampler = UniqueHandle; template class UniqueHandleTraits { public: using deleter = detail::ObjectDestroy; }; using UniqueDescriptorPool = UniqueHandle; template class UniqueHandleTraits { public: using deleter = detail::PoolFree; }; using UniqueDescriptorSet = UniqueHandle; template class UniqueHandleTraits { public: using deleter = detail::ObjectDestroy; }; using UniqueDescriptorSetLayout = UniqueHandle; template class UniqueHandleTraits { public: using deleter = detail::ObjectDestroy; }; using UniqueFramebuffer = UniqueHandle; template class UniqueHandleTraits { public: using deleter = detail::ObjectDestroy; }; using UniqueRenderPass = UniqueHandle; template class UniqueHandleTraits { public: using deleter = detail::ObjectDestroy; }; using UniqueCommandPool = UniqueHandle; template class UniqueHandleTraits { public: using deleter = detail::PoolFree; }; using UniqueCommandBuffer = UniqueHandle; //=== VK_VERSION_1_1 === template class UniqueHandleTraits { public: using deleter = detail::ObjectDestroy; }; using UniqueSamplerYcbcrConversion = UniqueHandle; using UniqueSamplerYcbcrConversionKHR = UniqueHandle; template class UniqueHandleTraits { public: using deleter = detail::ObjectDestroy; }; using UniqueDescriptorUpdateTemplate = UniqueHandle; using UniqueDescriptorUpdateTemplateKHR = UniqueHandle; //=== VK_VERSION_1_3 === template class UniqueHandleTraits { public: using deleter = detail::ObjectDestroy; }; using UniquePrivateDataSlot = UniqueHandle; using UniquePrivateDataSlotEXT = UniqueHandle; //=== VK_KHR_surface === template class UniqueHandleTraits { public: using deleter = detail::ObjectDestroy; }; using UniqueSurfaceKHR = UniqueHandle; //=== VK_KHR_swapchain === template class UniqueHandleTraits { public: using deleter = detail::ObjectDestroy; }; using UniqueSwapchainKHR = UniqueHandle; //=== VK_KHR_display === template class UniqueHandleTraits { public: using deleter = detail::ObjectDestroy; }; using UniqueDisplayKHR = UniqueHandle; //=== VK_EXT_debug_report === template class UniqueHandleTraits { public: using deleter = detail::ObjectDestroy; }; using UniqueDebugReportCallbackEXT = UniqueHandle; //=== VK_KHR_video_queue === template class UniqueHandleTraits { public: using deleter = detail::ObjectDestroy; }; using UniqueVideoSessionKHR = UniqueHandle; template class UniqueHandleTraits { public: using deleter = detail::ObjectDestroy; }; using UniqueVideoSessionParametersKHR = UniqueHandle; //=== VK_NVX_binary_import === template class UniqueHandleTraits { public: using deleter = detail::ObjectDestroy; }; using UniqueCuModuleNVX = UniqueHandle; template class UniqueHandleTraits { public: using deleter = detail::ObjectDestroy; }; using UniqueCuFunctionNVX = UniqueHandle; //=== VK_EXT_debug_utils === template class UniqueHandleTraits { public: using deleter = detail::ObjectDestroy; }; using UniqueDebugUtilsMessengerEXT = UniqueHandle; //=== VK_KHR_acceleration_structure === template class UniqueHandleTraits { public: using deleter = detail::ObjectDestroy; }; using UniqueAccelerationStructureKHR = UniqueHandle; //=== VK_EXT_validation_cache === template class UniqueHandleTraits { public: using deleter = detail::ObjectDestroy; }; using UniqueValidationCacheEXT = UniqueHandle; //=== VK_NV_ray_tracing === template class UniqueHandleTraits { public: using deleter = detail::ObjectDestroy; }; using UniqueAccelerationStructureNV = UniqueHandle; //=== VK_INTEL_performance_query === template class UniqueHandleTraits { public: using deleter = detail::ObjectDestroy; }; using UniquePerformanceConfigurationINTEL = UniqueHandle; //=== VK_KHR_deferred_host_operations === template class UniqueHandleTraits { public: using deleter = detail::ObjectDestroy; }; using UniqueDeferredOperationKHR = UniqueHandle; //=== VK_NV_device_generated_commands === template class UniqueHandleTraits { public: using deleter = detail::ObjectDestroy; }; using UniqueIndirectCommandsLayoutNV = UniqueHandle; # if defined( VK_ENABLE_BETA_EXTENSIONS ) //=== VK_NV_cuda_kernel_launch === template class UniqueHandleTraits { public: using deleter = detail::ObjectDestroy; }; using UniqueCudaModuleNV = UniqueHandle; template class UniqueHandleTraits { public: using deleter = detail::ObjectDestroy; }; using UniqueCudaFunctionNV = UniqueHandle; # endif /*VK_ENABLE_BETA_EXTENSIONS*/ # if defined( VK_USE_PLATFORM_FUCHSIA ) //=== VK_FUCHSIA_buffer_collection === template class UniqueHandleTraits { public: using deleter = detail::ObjectDestroy; }; using UniqueBufferCollectionFUCHSIA = UniqueHandle; # endif /*VK_USE_PLATFORM_FUCHSIA*/ //=== VK_EXT_opacity_micromap === template class UniqueHandleTraits { public: using deleter = detail::ObjectDestroy; }; using UniqueMicromapEXT = UniqueHandle; //=== VK_NV_optical_flow === template class UniqueHandleTraits { public: using deleter = detail::ObjectDestroy; }; using UniqueOpticalFlowSessionNV = UniqueHandle; //=== VK_EXT_shader_object === template class UniqueHandleTraits { public: using deleter = detail::ObjectDestroy; }; using UniqueShaderEXT = UniqueHandle; //=== VK_KHR_pipeline_binary === template class UniqueHandleTraits { public: using deleter = detail::ObjectDestroy; }; using UniquePipelineBinaryKHR = UniqueHandle; //=== VK_EXT_device_generated_commands === template class UniqueHandleTraits { public: using deleter = detail::ObjectDestroy; }; using UniqueIndirectCommandsLayoutEXT = UniqueHandle; template class UniqueHandleTraits { public: using deleter = detail::ObjectDestroy; }; using UniqueIndirectExecutionSetEXT = UniqueHandle; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ //=============== //=== HANDLEs === //=============== template struct isVulkanHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = false; }; class SurfaceKHR { public: using CType = VkSurfaceKHR; using NativeType = VkSurfaceKHR; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eSurfaceKHR; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eSurfaceKHR; public: SurfaceKHR() VULKAN_HPP_NOEXCEPT{}; // = default - try to workaround a compiler issue SurfaceKHR( SurfaceKHR const & rhs ) = default; SurfaceKHR & operator=( SurfaceKHR const & rhs ) = default; #if !defined( VULKAN_HPP_HANDLES_MOVE_EXCHANGE ) SurfaceKHR( SurfaceKHR && rhs ) = default; SurfaceKHR & operator=( SurfaceKHR && rhs ) = default; #else SurfaceKHR( SurfaceKHR && rhs ) VULKAN_HPP_NOEXCEPT : m_surfaceKHR( VULKAN_HPP_NAMESPACE::exchange( rhs.m_surfaceKHR, {} ) ) {} SurfaceKHR & operator=( SurfaceKHR && rhs ) VULKAN_HPP_NOEXCEPT { m_surfaceKHR = VULKAN_HPP_NAMESPACE::exchange( rhs.m_surfaceKHR, {} ); return *this; } #endif VULKAN_HPP_CONSTEXPR SurfaceKHR( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} VULKAN_HPP_TYPESAFE_EXPLICIT SurfaceKHR( VkSurfaceKHR surfaceKHR ) VULKAN_HPP_NOEXCEPT : m_surfaceKHR( surfaceKHR ) {} #if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 ) SurfaceKHR & operator=( VkSurfaceKHR surfaceKHR ) VULKAN_HPP_NOEXCEPT { m_surfaceKHR = surfaceKHR; return *this; } #endif SurfaceKHR & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT { m_surfaceKHR = {}; return *this; } VULKAN_HPP_TYPESAFE_EXPLICIT operator VkSurfaceKHR() const VULKAN_HPP_NOEXCEPT { return m_surfaceKHR; } explicit operator bool() const VULKAN_HPP_NOEXCEPT { return m_surfaceKHR != VK_NULL_HANDLE; } bool operator!() const VULKAN_HPP_NOEXCEPT { return m_surfaceKHR == VK_NULL_HANDLE; } private: VkSurfaceKHR m_surfaceKHR = {}; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::SurfaceKHR; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::SurfaceKHR; }; #if ( VK_USE_64_BIT_PTR_DEFINES == 1 ) template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::SurfaceKHR; }; #endif template <> struct isVulkanHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; class DebugReportCallbackEXT { public: using CType = VkDebugReportCallbackEXT; using NativeType = VkDebugReportCallbackEXT; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eDebugReportCallbackEXT; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eDebugReportCallbackEXT; public: DebugReportCallbackEXT() VULKAN_HPP_NOEXCEPT{}; // = default - try to workaround a compiler issue DebugReportCallbackEXT( DebugReportCallbackEXT const & rhs ) = default; DebugReportCallbackEXT & operator=( DebugReportCallbackEXT const & rhs ) = default; #if !defined( VULKAN_HPP_HANDLES_MOVE_EXCHANGE ) DebugReportCallbackEXT( DebugReportCallbackEXT && rhs ) = default; DebugReportCallbackEXT & operator=( DebugReportCallbackEXT && rhs ) = default; #else DebugReportCallbackEXT( DebugReportCallbackEXT && rhs ) VULKAN_HPP_NOEXCEPT : m_debugReportCallbackEXT( VULKAN_HPP_NAMESPACE::exchange( rhs.m_debugReportCallbackEXT, {} ) ) { } DebugReportCallbackEXT & operator=( DebugReportCallbackEXT && rhs ) VULKAN_HPP_NOEXCEPT { m_debugReportCallbackEXT = VULKAN_HPP_NAMESPACE::exchange( rhs.m_debugReportCallbackEXT, {} ); return *this; } #endif VULKAN_HPP_CONSTEXPR DebugReportCallbackEXT( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} VULKAN_HPP_TYPESAFE_EXPLICIT DebugReportCallbackEXT( VkDebugReportCallbackEXT debugReportCallbackEXT ) VULKAN_HPP_NOEXCEPT : m_debugReportCallbackEXT( debugReportCallbackEXT ) { } #if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 ) DebugReportCallbackEXT & operator=( VkDebugReportCallbackEXT debugReportCallbackEXT ) VULKAN_HPP_NOEXCEPT { m_debugReportCallbackEXT = debugReportCallbackEXT; return *this; } #endif DebugReportCallbackEXT & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT { m_debugReportCallbackEXT = {}; return *this; } VULKAN_HPP_TYPESAFE_EXPLICIT operator VkDebugReportCallbackEXT() const VULKAN_HPP_NOEXCEPT { return m_debugReportCallbackEXT; } explicit operator bool() const VULKAN_HPP_NOEXCEPT { return m_debugReportCallbackEXT != VK_NULL_HANDLE; } bool operator!() const VULKAN_HPP_NOEXCEPT { return m_debugReportCallbackEXT == VK_NULL_HANDLE; } private: VkDebugReportCallbackEXT m_debugReportCallbackEXT = {}; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::DebugReportCallbackEXT; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::DebugReportCallbackEXT; }; #if ( VK_USE_64_BIT_PTR_DEFINES == 1 ) template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::DebugReportCallbackEXT; }; #endif template <> struct isVulkanHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; class DebugUtilsMessengerEXT { public: using CType = VkDebugUtilsMessengerEXT; using NativeType = VkDebugUtilsMessengerEXT; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eDebugUtilsMessengerEXT; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eUnknown; public: DebugUtilsMessengerEXT() VULKAN_HPP_NOEXCEPT{}; // = default - try to workaround a compiler issue DebugUtilsMessengerEXT( DebugUtilsMessengerEXT const & rhs ) = default; DebugUtilsMessengerEXT & operator=( DebugUtilsMessengerEXT const & rhs ) = default; #if !defined( VULKAN_HPP_HANDLES_MOVE_EXCHANGE ) DebugUtilsMessengerEXT( DebugUtilsMessengerEXT && rhs ) = default; DebugUtilsMessengerEXT & operator=( DebugUtilsMessengerEXT && rhs ) = default; #else DebugUtilsMessengerEXT( DebugUtilsMessengerEXT && rhs ) VULKAN_HPP_NOEXCEPT : m_debugUtilsMessengerEXT( VULKAN_HPP_NAMESPACE::exchange( rhs.m_debugUtilsMessengerEXT, {} ) ) { } DebugUtilsMessengerEXT & operator=( DebugUtilsMessengerEXT && rhs ) VULKAN_HPP_NOEXCEPT { m_debugUtilsMessengerEXT = VULKAN_HPP_NAMESPACE::exchange( rhs.m_debugUtilsMessengerEXT, {} ); return *this; } #endif VULKAN_HPP_CONSTEXPR DebugUtilsMessengerEXT( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} VULKAN_HPP_TYPESAFE_EXPLICIT DebugUtilsMessengerEXT( VkDebugUtilsMessengerEXT debugUtilsMessengerEXT ) VULKAN_HPP_NOEXCEPT : m_debugUtilsMessengerEXT( debugUtilsMessengerEXT ) { } #if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 ) DebugUtilsMessengerEXT & operator=( VkDebugUtilsMessengerEXT debugUtilsMessengerEXT ) VULKAN_HPP_NOEXCEPT { m_debugUtilsMessengerEXT = debugUtilsMessengerEXT; return *this; } #endif DebugUtilsMessengerEXT & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT { m_debugUtilsMessengerEXT = {}; return *this; } VULKAN_HPP_TYPESAFE_EXPLICIT operator VkDebugUtilsMessengerEXT() const VULKAN_HPP_NOEXCEPT { return m_debugUtilsMessengerEXT; } explicit operator bool() const VULKAN_HPP_NOEXCEPT { return m_debugUtilsMessengerEXT != VK_NULL_HANDLE; } bool operator!() const VULKAN_HPP_NOEXCEPT { return m_debugUtilsMessengerEXT == VK_NULL_HANDLE; } private: VkDebugUtilsMessengerEXT m_debugUtilsMessengerEXT = {}; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::DebugUtilsMessengerEXT; }; #if ( VK_USE_64_BIT_PTR_DEFINES == 1 ) template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::DebugUtilsMessengerEXT; }; #endif template <> struct isVulkanHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; class DisplayKHR { public: using CType = VkDisplayKHR; using NativeType = VkDisplayKHR; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eDisplayKHR; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eDisplayKHR; public: DisplayKHR() VULKAN_HPP_NOEXCEPT{}; // = default - try to workaround a compiler issue DisplayKHR( DisplayKHR const & rhs ) = default; DisplayKHR & operator=( DisplayKHR const & rhs ) = default; #if !defined( VULKAN_HPP_HANDLES_MOVE_EXCHANGE ) DisplayKHR( DisplayKHR && rhs ) = default; DisplayKHR & operator=( DisplayKHR && rhs ) = default; #else DisplayKHR( DisplayKHR && rhs ) VULKAN_HPP_NOEXCEPT : m_displayKHR( VULKAN_HPP_NAMESPACE::exchange( rhs.m_displayKHR, {} ) ) {} DisplayKHR & operator=( DisplayKHR && rhs ) VULKAN_HPP_NOEXCEPT { m_displayKHR = VULKAN_HPP_NAMESPACE::exchange( rhs.m_displayKHR, {} ); return *this; } #endif VULKAN_HPP_CONSTEXPR DisplayKHR( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} VULKAN_HPP_TYPESAFE_EXPLICIT DisplayKHR( VkDisplayKHR displayKHR ) VULKAN_HPP_NOEXCEPT : m_displayKHR( displayKHR ) {} #if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 ) DisplayKHR & operator=( VkDisplayKHR displayKHR ) VULKAN_HPP_NOEXCEPT { m_displayKHR = displayKHR; return *this; } #endif DisplayKHR & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT { m_displayKHR = {}; return *this; } VULKAN_HPP_TYPESAFE_EXPLICIT operator VkDisplayKHR() const VULKAN_HPP_NOEXCEPT { return m_displayKHR; } explicit operator bool() const VULKAN_HPP_NOEXCEPT { return m_displayKHR != VK_NULL_HANDLE; } bool operator!() const VULKAN_HPP_NOEXCEPT { return m_displayKHR == VK_NULL_HANDLE; } private: VkDisplayKHR m_displayKHR = {}; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::DisplayKHR; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::DisplayKHR; }; #if ( VK_USE_64_BIT_PTR_DEFINES == 1 ) template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::DisplayKHR; }; #endif template <> struct isVulkanHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; class SwapchainKHR { public: using CType = VkSwapchainKHR; using NativeType = VkSwapchainKHR; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eSwapchainKHR; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eSwapchainKHR; public: SwapchainKHR() VULKAN_HPP_NOEXCEPT{}; // = default - try to workaround a compiler issue SwapchainKHR( SwapchainKHR const & rhs ) = default; SwapchainKHR & operator=( SwapchainKHR const & rhs ) = default; #if !defined( VULKAN_HPP_HANDLES_MOVE_EXCHANGE ) SwapchainKHR( SwapchainKHR && rhs ) = default; SwapchainKHR & operator=( SwapchainKHR && rhs ) = default; #else SwapchainKHR( SwapchainKHR && rhs ) VULKAN_HPP_NOEXCEPT : m_swapchainKHR( VULKAN_HPP_NAMESPACE::exchange( rhs.m_swapchainKHR, {} ) ) {} SwapchainKHR & operator=( SwapchainKHR && rhs ) VULKAN_HPP_NOEXCEPT { m_swapchainKHR = VULKAN_HPP_NAMESPACE::exchange( rhs.m_swapchainKHR, {} ); return *this; } #endif VULKAN_HPP_CONSTEXPR SwapchainKHR( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} VULKAN_HPP_TYPESAFE_EXPLICIT SwapchainKHR( VkSwapchainKHR swapchainKHR ) VULKAN_HPP_NOEXCEPT : m_swapchainKHR( swapchainKHR ) {} #if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 ) SwapchainKHR & operator=( VkSwapchainKHR swapchainKHR ) VULKAN_HPP_NOEXCEPT { m_swapchainKHR = swapchainKHR; return *this; } #endif SwapchainKHR & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT { m_swapchainKHR = {}; return *this; } VULKAN_HPP_TYPESAFE_EXPLICIT operator VkSwapchainKHR() const VULKAN_HPP_NOEXCEPT { return m_swapchainKHR; } explicit operator bool() const VULKAN_HPP_NOEXCEPT { return m_swapchainKHR != VK_NULL_HANDLE; } bool operator!() const VULKAN_HPP_NOEXCEPT { return m_swapchainKHR == VK_NULL_HANDLE; } private: VkSwapchainKHR m_swapchainKHR = {}; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::SwapchainKHR; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::SwapchainKHR; }; #if ( VK_USE_64_BIT_PTR_DEFINES == 1 ) template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::SwapchainKHR; }; #endif template <> struct isVulkanHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; class Semaphore { public: using CType = VkSemaphore; using NativeType = VkSemaphore; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eSemaphore; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eSemaphore; public: Semaphore() VULKAN_HPP_NOEXCEPT{}; // = default - try to workaround a compiler issue Semaphore( Semaphore const & rhs ) = default; Semaphore & operator=( Semaphore const & rhs ) = default; #if !defined( VULKAN_HPP_HANDLES_MOVE_EXCHANGE ) Semaphore( Semaphore && rhs ) = default; Semaphore & operator=( Semaphore && rhs ) = default; #else Semaphore( Semaphore && rhs ) VULKAN_HPP_NOEXCEPT : m_semaphore( VULKAN_HPP_NAMESPACE::exchange( rhs.m_semaphore, {} ) ) {} Semaphore & operator=( Semaphore && rhs ) VULKAN_HPP_NOEXCEPT { m_semaphore = VULKAN_HPP_NAMESPACE::exchange( rhs.m_semaphore, {} ); return *this; } #endif VULKAN_HPP_CONSTEXPR Semaphore( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} VULKAN_HPP_TYPESAFE_EXPLICIT Semaphore( VkSemaphore semaphore ) VULKAN_HPP_NOEXCEPT : m_semaphore( semaphore ) {} #if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 ) Semaphore & operator=( VkSemaphore semaphore ) VULKAN_HPP_NOEXCEPT { m_semaphore = semaphore; return *this; } #endif Semaphore & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT { m_semaphore = {}; return *this; } VULKAN_HPP_TYPESAFE_EXPLICIT operator VkSemaphore() const VULKAN_HPP_NOEXCEPT { return m_semaphore; } explicit operator bool() const VULKAN_HPP_NOEXCEPT { return m_semaphore != VK_NULL_HANDLE; } bool operator!() const VULKAN_HPP_NOEXCEPT { return m_semaphore == VK_NULL_HANDLE; } private: VkSemaphore m_semaphore = {}; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::Semaphore; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::Semaphore; }; #if ( VK_USE_64_BIT_PTR_DEFINES == 1 ) template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::Semaphore; }; #endif template <> struct isVulkanHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; class Fence { public: using CType = VkFence; using NativeType = VkFence; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eFence; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eFence; public: Fence() VULKAN_HPP_NOEXCEPT{}; // = default - try to workaround a compiler issue Fence( Fence const & rhs ) = default; Fence & operator=( Fence const & rhs ) = default; #if !defined( VULKAN_HPP_HANDLES_MOVE_EXCHANGE ) Fence( Fence && rhs ) = default; Fence & operator=( Fence && rhs ) = default; #else Fence( Fence && rhs ) VULKAN_HPP_NOEXCEPT : m_fence( VULKAN_HPP_NAMESPACE::exchange( rhs.m_fence, {} ) ) {} Fence & operator=( Fence && rhs ) VULKAN_HPP_NOEXCEPT { m_fence = VULKAN_HPP_NAMESPACE::exchange( rhs.m_fence, {} ); return *this; } #endif VULKAN_HPP_CONSTEXPR Fence( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} VULKAN_HPP_TYPESAFE_EXPLICIT Fence( VkFence fence ) VULKAN_HPP_NOEXCEPT : m_fence( fence ) {} #if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 ) Fence & operator=( VkFence fence ) VULKAN_HPP_NOEXCEPT { m_fence = fence; return *this; } #endif Fence & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT { m_fence = {}; return *this; } VULKAN_HPP_TYPESAFE_EXPLICIT operator VkFence() const VULKAN_HPP_NOEXCEPT { return m_fence; } explicit operator bool() const VULKAN_HPP_NOEXCEPT { return m_fence != VK_NULL_HANDLE; } bool operator!() const VULKAN_HPP_NOEXCEPT { return m_fence == VK_NULL_HANDLE; } private: VkFence m_fence = {}; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::Fence; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::Fence; }; #if ( VK_USE_64_BIT_PTR_DEFINES == 1 ) template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::Fence; }; #endif template <> struct isVulkanHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; class PerformanceConfigurationINTEL { public: using CType = VkPerformanceConfigurationINTEL; using NativeType = VkPerformanceConfigurationINTEL; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::ePerformanceConfigurationINTEL; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eUnknown; public: PerformanceConfigurationINTEL() VULKAN_HPP_NOEXCEPT{}; // = default - try to workaround a compiler issue PerformanceConfigurationINTEL( PerformanceConfigurationINTEL const & rhs ) = default; PerformanceConfigurationINTEL & operator=( PerformanceConfigurationINTEL const & rhs ) = default; #if !defined( VULKAN_HPP_HANDLES_MOVE_EXCHANGE ) PerformanceConfigurationINTEL( PerformanceConfigurationINTEL && rhs ) = default; PerformanceConfigurationINTEL & operator=( PerformanceConfigurationINTEL && rhs ) = default; #else PerformanceConfigurationINTEL( PerformanceConfigurationINTEL && rhs ) VULKAN_HPP_NOEXCEPT : m_performanceConfigurationINTEL( VULKAN_HPP_NAMESPACE::exchange( rhs.m_performanceConfigurationINTEL, {} ) ) { } PerformanceConfigurationINTEL & operator=( PerformanceConfigurationINTEL && rhs ) VULKAN_HPP_NOEXCEPT { m_performanceConfigurationINTEL = VULKAN_HPP_NAMESPACE::exchange( rhs.m_performanceConfigurationINTEL, {} ); return *this; } #endif VULKAN_HPP_CONSTEXPR PerformanceConfigurationINTEL( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} VULKAN_HPP_TYPESAFE_EXPLICIT PerformanceConfigurationINTEL( VkPerformanceConfigurationINTEL performanceConfigurationINTEL ) VULKAN_HPP_NOEXCEPT : m_performanceConfigurationINTEL( performanceConfigurationINTEL ) { } #if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 ) PerformanceConfigurationINTEL & operator=( VkPerformanceConfigurationINTEL performanceConfigurationINTEL ) VULKAN_HPP_NOEXCEPT { m_performanceConfigurationINTEL = performanceConfigurationINTEL; return *this; } #endif PerformanceConfigurationINTEL & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT { m_performanceConfigurationINTEL = {}; return *this; } VULKAN_HPP_TYPESAFE_EXPLICIT operator VkPerformanceConfigurationINTEL() const VULKAN_HPP_NOEXCEPT { return m_performanceConfigurationINTEL; } explicit operator bool() const VULKAN_HPP_NOEXCEPT { return m_performanceConfigurationINTEL != VK_NULL_HANDLE; } bool operator!() const VULKAN_HPP_NOEXCEPT { return m_performanceConfigurationINTEL == VK_NULL_HANDLE; } private: VkPerformanceConfigurationINTEL m_performanceConfigurationINTEL = {}; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::PerformanceConfigurationINTEL; }; #if ( VK_USE_64_BIT_PTR_DEFINES == 1 ) template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::PerformanceConfigurationINTEL; }; #endif template <> struct isVulkanHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; class QueryPool { public: using CType = VkQueryPool; using NativeType = VkQueryPool; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eQueryPool; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eQueryPool; public: QueryPool() VULKAN_HPP_NOEXCEPT{}; // = default - try to workaround a compiler issue QueryPool( QueryPool const & rhs ) = default; QueryPool & operator=( QueryPool const & rhs ) = default; #if !defined( VULKAN_HPP_HANDLES_MOVE_EXCHANGE ) QueryPool( QueryPool && rhs ) = default; QueryPool & operator=( QueryPool && rhs ) = default; #else QueryPool( QueryPool && rhs ) VULKAN_HPP_NOEXCEPT : m_queryPool( VULKAN_HPP_NAMESPACE::exchange( rhs.m_queryPool, {} ) ) {} QueryPool & operator=( QueryPool && rhs ) VULKAN_HPP_NOEXCEPT { m_queryPool = VULKAN_HPP_NAMESPACE::exchange( rhs.m_queryPool, {} ); return *this; } #endif VULKAN_HPP_CONSTEXPR QueryPool( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} VULKAN_HPP_TYPESAFE_EXPLICIT QueryPool( VkQueryPool queryPool ) VULKAN_HPP_NOEXCEPT : m_queryPool( queryPool ) {} #if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 ) QueryPool & operator=( VkQueryPool queryPool ) VULKAN_HPP_NOEXCEPT { m_queryPool = queryPool; return *this; } #endif QueryPool & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT { m_queryPool = {}; return *this; } VULKAN_HPP_TYPESAFE_EXPLICIT operator VkQueryPool() const VULKAN_HPP_NOEXCEPT { return m_queryPool; } explicit operator bool() const VULKAN_HPP_NOEXCEPT { return m_queryPool != VK_NULL_HANDLE; } bool operator!() const VULKAN_HPP_NOEXCEPT { return m_queryPool == VK_NULL_HANDLE; } private: VkQueryPool m_queryPool = {}; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::QueryPool; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::QueryPool; }; #if ( VK_USE_64_BIT_PTR_DEFINES == 1 ) template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::QueryPool; }; #endif template <> struct isVulkanHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; class Buffer { public: using CType = VkBuffer; using NativeType = VkBuffer; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eBuffer; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eBuffer; public: Buffer() VULKAN_HPP_NOEXCEPT{}; // = default - try to workaround a compiler issue Buffer( Buffer const & rhs ) = default; Buffer & operator=( Buffer const & rhs ) = default; #if !defined( VULKAN_HPP_HANDLES_MOVE_EXCHANGE ) Buffer( Buffer && rhs ) = default; Buffer & operator=( Buffer && rhs ) = default; #else Buffer( Buffer && rhs ) VULKAN_HPP_NOEXCEPT : m_buffer( VULKAN_HPP_NAMESPACE::exchange( rhs.m_buffer, {} ) ) {} Buffer & operator=( Buffer && rhs ) VULKAN_HPP_NOEXCEPT { m_buffer = VULKAN_HPP_NAMESPACE::exchange( rhs.m_buffer, {} ); return *this; } #endif VULKAN_HPP_CONSTEXPR Buffer( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} VULKAN_HPP_TYPESAFE_EXPLICIT Buffer( VkBuffer buffer ) VULKAN_HPP_NOEXCEPT : m_buffer( buffer ) {} #if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 ) Buffer & operator=( VkBuffer buffer ) VULKAN_HPP_NOEXCEPT { m_buffer = buffer; return *this; } #endif Buffer & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT { m_buffer = {}; return *this; } VULKAN_HPP_TYPESAFE_EXPLICIT operator VkBuffer() const VULKAN_HPP_NOEXCEPT { return m_buffer; } explicit operator bool() const VULKAN_HPP_NOEXCEPT { return m_buffer != VK_NULL_HANDLE; } bool operator!() const VULKAN_HPP_NOEXCEPT { return m_buffer == VK_NULL_HANDLE; } private: VkBuffer m_buffer = {}; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::Buffer; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::Buffer; }; #if ( VK_USE_64_BIT_PTR_DEFINES == 1 ) template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::Buffer; }; #endif template <> struct isVulkanHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; class PipelineLayout { public: using CType = VkPipelineLayout; using NativeType = VkPipelineLayout; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::ePipelineLayout; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::ePipelineLayout; public: PipelineLayout() VULKAN_HPP_NOEXCEPT{}; // = default - try to workaround a compiler issue PipelineLayout( PipelineLayout const & rhs ) = default; PipelineLayout & operator=( PipelineLayout const & rhs ) = default; #if !defined( VULKAN_HPP_HANDLES_MOVE_EXCHANGE ) PipelineLayout( PipelineLayout && rhs ) = default; PipelineLayout & operator=( PipelineLayout && rhs ) = default; #else PipelineLayout( PipelineLayout && rhs ) VULKAN_HPP_NOEXCEPT : m_pipelineLayout( VULKAN_HPP_NAMESPACE::exchange( rhs.m_pipelineLayout, {} ) ) {} PipelineLayout & operator=( PipelineLayout && rhs ) VULKAN_HPP_NOEXCEPT { m_pipelineLayout = VULKAN_HPP_NAMESPACE::exchange( rhs.m_pipelineLayout, {} ); return *this; } #endif VULKAN_HPP_CONSTEXPR PipelineLayout( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} VULKAN_HPP_TYPESAFE_EXPLICIT PipelineLayout( VkPipelineLayout pipelineLayout ) VULKAN_HPP_NOEXCEPT : m_pipelineLayout( pipelineLayout ) {} #if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 ) PipelineLayout & operator=( VkPipelineLayout pipelineLayout ) VULKAN_HPP_NOEXCEPT { m_pipelineLayout = pipelineLayout; return *this; } #endif PipelineLayout & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT { m_pipelineLayout = {}; return *this; } VULKAN_HPP_TYPESAFE_EXPLICIT operator VkPipelineLayout() const VULKAN_HPP_NOEXCEPT { return m_pipelineLayout; } explicit operator bool() const VULKAN_HPP_NOEXCEPT { return m_pipelineLayout != VK_NULL_HANDLE; } bool operator!() const VULKAN_HPP_NOEXCEPT { return m_pipelineLayout == VK_NULL_HANDLE; } private: VkPipelineLayout m_pipelineLayout = {}; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::PipelineLayout; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::PipelineLayout; }; #if ( VK_USE_64_BIT_PTR_DEFINES == 1 ) template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::PipelineLayout; }; #endif template <> struct isVulkanHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; class DescriptorSet { public: using CType = VkDescriptorSet; using NativeType = VkDescriptorSet; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eDescriptorSet; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eDescriptorSet; public: DescriptorSet() VULKAN_HPP_NOEXCEPT{}; // = default - try to workaround a compiler issue DescriptorSet( DescriptorSet const & rhs ) = default; DescriptorSet & operator=( DescriptorSet const & rhs ) = default; #if !defined( VULKAN_HPP_HANDLES_MOVE_EXCHANGE ) DescriptorSet( DescriptorSet && rhs ) = default; DescriptorSet & operator=( DescriptorSet && rhs ) = default; #else DescriptorSet( DescriptorSet && rhs ) VULKAN_HPP_NOEXCEPT : m_descriptorSet( VULKAN_HPP_NAMESPACE::exchange( rhs.m_descriptorSet, {} ) ) {} DescriptorSet & operator=( DescriptorSet && rhs ) VULKAN_HPP_NOEXCEPT { m_descriptorSet = VULKAN_HPP_NAMESPACE::exchange( rhs.m_descriptorSet, {} ); return *this; } #endif VULKAN_HPP_CONSTEXPR DescriptorSet( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} VULKAN_HPP_TYPESAFE_EXPLICIT DescriptorSet( VkDescriptorSet descriptorSet ) VULKAN_HPP_NOEXCEPT : m_descriptorSet( descriptorSet ) {} #if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 ) DescriptorSet & operator=( VkDescriptorSet descriptorSet ) VULKAN_HPP_NOEXCEPT { m_descriptorSet = descriptorSet; return *this; } #endif DescriptorSet & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT { m_descriptorSet = {}; return *this; } VULKAN_HPP_TYPESAFE_EXPLICIT operator VkDescriptorSet() const VULKAN_HPP_NOEXCEPT { return m_descriptorSet; } explicit operator bool() const VULKAN_HPP_NOEXCEPT { return m_descriptorSet != VK_NULL_HANDLE; } bool operator!() const VULKAN_HPP_NOEXCEPT { return m_descriptorSet == VK_NULL_HANDLE; } private: VkDescriptorSet m_descriptorSet = {}; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::DescriptorSet; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::DescriptorSet; }; #if ( VK_USE_64_BIT_PTR_DEFINES == 1 ) template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::DescriptorSet; }; #endif template <> struct isVulkanHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; class ImageView { public: using CType = VkImageView; using NativeType = VkImageView; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eImageView; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eImageView; public: ImageView() VULKAN_HPP_NOEXCEPT{}; // = default - try to workaround a compiler issue ImageView( ImageView const & rhs ) = default; ImageView & operator=( ImageView const & rhs ) = default; #if !defined( VULKAN_HPP_HANDLES_MOVE_EXCHANGE ) ImageView( ImageView && rhs ) = default; ImageView & operator=( ImageView && rhs ) = default; #else ImageView( ImageView && rhs ) VULKAN_HPP_NOEXCEPT : m_imageView( VULKAN_HPP_NAMESPACE::exchange( rhs.m_imageView, {} ) ) {} ImageView & operator=( ImageView && rhs ) VULKAN_HPP_NOEXCEPT { m_imageView = VULKAN_HPP_NAMESPACE::exchange( rhs.m_imageView, {} ); return *this; } #endif VULKAN_HPP_CONSTEXPR ImageView( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} VULKAN_HPP_TYPESAFE_EXPLICIT ImageView( VkImageView imageView ) VULKAN_HPP_NOEXCEPT : m_imageView( imageView ) {} #if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 ) ImageView & operator=( VkImageView imageView ) VULKAN_HPP_NOEXCEPT { m_imageView = imageView; return *this; } #endif ImageView & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT { m_imageView = {}; return *this; } VULKAN_HPP_TYPESAFE_EXPLICIT operator VkImageView() const VULKAN_HPP_NOEXCEPT { return m_imageView; } explicit operator bool() const VULKAN_HPP_NOEXCEPT { return m_imageView != VK_NULL_HANDLE; } bool operator!() const VULKAN_HPP_NOEXCEPT { return m_imageView == VK_NULL_HANDLE; } private: VkImageView m_imageView = {}; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::ImageView; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::ImageView; }; #if ( VK_USE_64_BIT_PTR_DEFINES == 1 ) template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::ImageView; }; #endif template <> struct isVulkanHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; class Pipeline { public: using CType = VkPipeline; using NativeType = VkPipeline; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::ePipeline; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::ePipeline; public: Pipeline() VULKAN_HPP_NOEXCEPT{}; // = default - try to workaround a compiler issue Pipeline( Pipeline const & rhs ) = default; Pipeline & operator=( Pipeline const & rhs ) = default; #if !defined( VULKAN_HPP_HANDLES_MOVE_EXCHANGE ) Pipeline( Pipeline && rhs ) = default; Pipeline & operator=( Pipeline && rhs ) = default; #else Pipeline( Pipeline && rhs ) VULKAN_HPP_NOEXCEPT : m_pipeline( VULKAN_HPP_NAMESPACE::exchange( rhs.m_pipeline, {} ) ) {} Pipeline & operator=( Pipeline && rhs ) VULKAN_HPP_NOEXCEPT { m_pipeline = VULKAN_HPP_NAMESPACE::exchange( rhs.m_pipeline, {} ); return *this; } #endif VULKAN_HPP_CONSTEXPR Pipeline( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} VULKAN_HPP_TYPESAFE_EXPLICIT Pipeline( VkPipeline pipeline ) VULKAN_HPP_NOEXCEPT : m_pipeline( pipeline ) {} #if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 ) Pipeline & operator=( VkPipeline pipeline ) VULKAN_HPP_NOEXCEPT { m_pipeline = pipeline; return *this; } #endif Pipeline & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT { m_pipeline = {}; return *this; } VULKAN_HPP_TYPESAFE_EXPLICIT operator VkPipeline() const VULKAN_HPP_NOEXCEPT { return m_pipeline; } explicit operator bool() const VULKAN_HPP_NOEXCEPT { return m_pipeline != VK_NULL_HANDLE; } bool operator!() const VULKAN_HPP_NOEXCEPT { return m_pipeline == VK_NULL_HANDLE; } private: VkPipeline m_pipeline = {}; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::Pipeline; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::Pipeline; }; #if ( VK_USE_64_BIT_PTR_DEFINES == 1 ) template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::Pipeline; }; #endif template <> struct isVulkanHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; class ShaderEXT { public: using CType = VkShaderEXT; using NativeType = VkShaderEXT; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eShaderEXT; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eUnknown; public: ShaderEXT() VULKAN_HPP_NOEXCEPT{}; // = default - try to workaround a compiler issue ShaderEXT( ShaderEXT const & rhs ) = default; ShaderEXT & operator=( ShaderEXT const & rhs ) = default; #if !defined( VULKAN_HPP_HANDLES_MOVE_EXCHANGE ) ShaderEXT( ShaderEXT && rhs ) = default; ShaderEXT & operator=( ShaderEXT && rhs ) = default; #else ShaderEXT( ShaderEXT && rhs ) VULKAN_HPP_NOEXCEPT : m_shaderEXT( VULKAN_HPP_NAMESPACE::exchange( rhs.m_shaderEXT, {} ) ) {} ShaderEXT & operator=( ShaderEXT && rhs ) VULKAN_HPP_NOEXCEPT { m_shaderEXT = VULKAN_HPP_NAMESPACE::exchange( rhs.m_shaderEXT, {} ); return *this; } #endif VULKAN_HPP_CONSTEXPR ShaderEXT( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} VULKAN_HPP_TYPESAFE_EXPLICIT ShaderEXT( VkShaderEXT shaderEXT ) VULKAN_HPP_NOEXCEPT : m_shaderEXT( shaderEXT ) {} #if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 ) ShaderEXT & operator=( VkShaderEXT shaderEXT ) VULKAN_HPP_NOEXCEPT { m_shaderEXT = shaderEXT; return *this; } #endif ShaderEXT & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT { m_shaderEXT = {}; return *this; } VULKAN_HPP_TYPESAFE_EXPLICIT operator VkShaderEXT() const VULKAN_HPP_NOEXCEPT { return m_shaderEXT; } explicit operator bool() const VULKAN_HPP_NOEXCEPT { return m_shaderEXT != VK_NULL_HANDLE; } bool operator!() const VULKAN_HPP_NOEXCEPT { return m_shaderEXT == VK_NULL_HANDLE; } private: VkShaderEXT m_shaderEXT = {}; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::ShaderEXT; }; #if ( VK_USE_64_BIT_PTR_DEFINES == 1 ) template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::ShaderEXT; }; #endif template <> struct isVulkanHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; class Image { public: using CType = VkImage; using NativeType = VkImage; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eImage; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eImage; public: Image() VULKAN_HPP_NOEXCEPT{}; // = default - try to workaround a compiler issue Image( Image const & rhs ) = default; Image & operator=( Image const & rhs ) = default; #if !defined( VULKAN_HPP_HANDLES_MOVE_EXCHANGE ) Image( Image && rhs ) = default; Image & operator=( Image && rhs ) = default; #else Image( Image && rhs ) VULKAN_HPP_NOEXCEPT : m_image( VULKAN_HPP_NAMESPACE::exchange( rhs.m_image, {} ) ) {} Image & operator=( Image && rhs ) VULKAN_HPP_NOEXCEPT { m_image = VULKAN_HPP_NAMESPACE::exchange( rhs.m_image, {} ); return *this; } #endif VULKAN_HPP_CONSTEXPR Image( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} VULKAN_HPP_TYPESAFE_EXPLICIT Image( VkImage image ) VULKAN_HPP_NOEXCEPT : m_image( image ) {} #if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 ) Image & operator=( VkImage image ) VULKAN_HPP_NOEXCEPT { m_image = image; return *this; } #endif Image & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT { m_image = {}; return *this; } VULKAN_HPP_TYPESAFE_EXPLICIT operator VkImage() const VULKAN_HPP_NOEXCEPT { return m_image; } explicit operator bool() const VULKAN_HPP_NOEXCEPT { return m_image != VK_NULL_HANDLE; } bool operator!() const VULKAN_HPP_NOEXCEPT { return m_image == VK_NULL_HANDLE; } private: VkImage m_image = {}; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::Image; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::Image; }; #if ( VK_USE_64_BIT_PTR_DEFINES == 1 ) template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::Image; }; #endif template <> struct isVulkanHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; class AccelerationStructureNV { public: using CType = VkAccelerationStructureNV; using NativeType = VkAccelerationStructureNV; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eAccelerationStructureNV; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eAccelerationStructureNV; public: AccelerationStructureNV() VULKAN_HPP_NOEXCEPT{}; // = default - try to workaround a compiler issue AccelerationStructureNV( AccelerationStructureNV const & rhs ) = default; AccelerationStructureNV & operator=( AccelerationStructureNV const & rhs ) = default; #if !defined( VULKAN_HPP_HANDLES_MOVE_EXCHANGE ) AccelerationStructureNV( AccelerationStructureNV && rhs ) = default; AccelerationStructureNV & operator=( AccelerationStructureNV && rhs ) = default; #else AccelerationStructureNV( AccelerationStructureNV && rhs ) VULKAN_HPP_NOEXCEPT : m_accelerationStructureNV( VULKAN_HPP_NAMESPACE::exchange( rhs.m_accelerationStructureNV, {} ) ) { } AccelerationStructureNV & operator=( AccelerationStructureNV && rhs ) VULKAN_HPP_NOEXCEPT { m_accelerationStructureNV = VULKAN_HPP_NAMESPACE::exchange( rhs.m_accelerationStructureNV, {} ); return *this; } #endif VULKAN_HPP_CONSTEXPR AccelerationStructureNV( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} VULKAN_HPP_TYPESAFE_EXPLICIT AccelerationStructureNV( VkAccelerationStructureNV accelerationStructureNV ) VULKAN_HPP_NOEXCEPT : m_accelerationStructureNV( accelerationStructureNV ) { } #if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 ) AccelerationStructureNV & operator=( VkAccelerationStructureNV accelerationStructureNV ) VULKAN_HPP_NOEXCEPT { m_accelerationStructureNV = accelerationStructureNV; return *this; } #endif AccelerationStructureNV & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT { m_accelerationStructureNV = {}; return *this; } VULKAN_HPP_TYPESAFE_EXPLICIT operator VkAccelerationStructureNV() const VULKAN_HPP_NOEXCEPT { return m_accelerationStructureNV; } explicit operator bool() const VULKAN_HPP_NOEXCEPT { return m_accelerationStructureNV != VK_NULL_HANDLE; } bool operator!() const VULKAN_HPP_NOEXCEPT { return m_accelerationStructureNV == VK_NULL_HANDLE; } private: VkAccelerationStructureNV m_accelerationStructureNV = {}; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::AccelerationStructureNV; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::AccelerationStructureNV; }; #if ( VK_USE_64_BIT_PTR_DEFINES == 1 ) template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::AccelerationStructureNV; }; #endif template <> struct isVulkanHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; class OpticalFlowSessionNV { public: using CType = VkOpticalFlowSessionNV; using NativeType = VkOpticalFlowSessionNV; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eOpticalFlowSessionNV; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eUnknown; public: OpticalFlowSessionNV() VULKAN_HPP_NOEXCEPT{}; // = default - try to workaround a compiler issue OpticalFlowSessionNV( OpticalFlowSessionNV const & rhs ) = default; OpticalFlowSessionNV & operator=( OpticalFlowSessionNV const & rhs ) = default; #if !defined( VULKAN_HPP_HANDLES_MOVE_EXCHANGE ) OpticalFlowSessionNV( OpticalFlowSessionNV && rhs ) = default; OpticalFlowSessionNV & operator=( OpticalFlowSessionNV && rhs ) = default; #else OpticalFlowSessionNV( OpticalFlowSessionNV && rhs ) VULKAN_HPP_NOEXCEPT : m_opticalFlowSessionNV( VULKAN_HPP_NAMESPACE::exchange( rhs.m_opticalFlowSessionNV, {} ) ) { } OpticalFlowSessionNV & operator=( OpticalFlowSessionNV && rhs ) VULKAN_HPP_NOEXCEPT { m_opticalFlowSessionNV = VULKAN_HPP_NAMESPACE::exchange( rhs.m_opticalFlowSessionNV, {} ); return *this; } #endif VULKAN_HPP_CONSTEXPR OpticalFlowSessionNV( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} VULKAN_HPP_TYPESAFE_EXPLICIT OpticalFlowSessionNV( VkOpticalFlowSessionNV opticalFlowSessionNV ) VULKAN_HPP_NOEXCEPT : m_opticalFlowSessionNV( opticalFlowSessionNV ) { } #if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 ) OpticalFlowSessionNV & operator=( VkOpticalFlowSessionNV opticalFlowSessionNV ) VULKAN_HPP_NOEXCEPT { m_opticalFlowSessionNV = opticalFlowSessionNV; return *this; } #endif OpticalFlowSessionNV & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT { m_opticalFlowSessionNV = {}; return *this; } VULKAN_HPP_TYPESAFE_EXPLICIT operator VkOpticalFlowSessionNV() const VULKAN_HPP_NOEXCEPT { return m_opticalFlowSessionNV; } explicit operator bool() const VULKAN_HPP_NOEXCEPT { return m_opticalFlowSessionNV != VK_NULL_HANDLE; } bool operator!() const VULKAN_HPP_NOEXCEPT { return m_opticalFlowSessionNV == VK_NULL_HANDLE; } private: VkOpticalFlowSessionNV m_opticalFlowSessionNV = {}; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::OpticalFlowSessionNV; }; #if ( VK_USE_64_BIT_PTR_DEFINES == 1 ) template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::OpticalFlowSessionNV; }; #endif template <> struct isVulkanHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; class DescriptorUpdateTemplate { public: using CType = VkDescriptorUpdateTemplate; using NativeType = VkDescriptorUpdateTemplate; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eDescriptorUpdateTemplate; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eDescriptorUpdateTemplate; public: DescriptorUpdateTemplate() VULKAN_HPP_NOEXCEPT{}; // = default - try to workaround a compiler issue DescriptorUpdateTemplate( DescriptorUpdateTemplate const & rhs ) = default; DescriptorUpdateTemplate & operator=( DescriptorUpdateTemplate const & rhs ) = default; #if !defined( VULKAN_HPP_HANDLES_MOVE_EXCHANGE ) DescriptorUpdateTemplate( DescriptorUpdateTemplate && rhs ) = default; DescriptorUpdateTemplate & operator=( DescriptorUpdateTemplate && rhs ) = default; #else DescriptorUpdateTemplate( DescriptorUpdateTemplate && rhs ) VULKAN_HPP_NOEXCEPT : m_descriptorUpdateTemplate( VULKAN_HPP_NAMESPACE::exchange( rhs.m_descriptorUpdateTemplate, {} ) ) { } DescriptorUpdateTemplate & operator=( DescriptorUpdateTemplate && rhs ) VULKAN_HPP_NOEXCEPT { m_descriptorUpdateTemplate = VULKAN_HPP_NAMESPACE::exchange( rhs.m_descriptorUpdateTemplate, {} ); return *this; } #endif VULKAN_HPP_CONSTEXPR DescriptorUpdateTemplate( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} VULKAN_HPP_TYPESAFE_EXPLICIT DescriptorUpdateTemplate( VkDescriptorUpdateTemplate descriptorUpdateTemplate ) VULKAN_HPP_NOEXCEPT : m_descriptorUpdateTemplate( descriptorUpdateTemplate ) { } #if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 ) DescriptorUpdateTemplate & operator=( VkDescriptorUpdateTemplate descriptorUpdateTemplate ) VULKAN_HPP_NOEXCEPT { m_descriptorUpdateTemplate = descriptorUpdateTemplate; return *this; } #endif DescriptorUpdateTemplate & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT { m_descriptorUpdateTemplate = {}; return *this; } VULKAN_HPP_TYPESAFE_EXPLICIT operator VkDescriptorUpdateTemplate() const VULKAN_HPP_NOEXCEPT { return m_descriptorUpdateTemplate; } explicit operator bool() const VULKAN_HPP_NOEXCEPT { return m_descriptorUpdateTemplate != VK_NULL_HANDLE; } bool operator!() const VULKAN_HPP_NOEXCEPT { return m_descriptorUpdateTemplate == VK_NULL_HANDLE; } private: VkDescriptorUpdateTemplate m_descriptorUpdateTemplate = {}; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate; }; #if ( VK_USE_64_BIT_PTR_DEFINES == 1 ) template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate; }; #endif template <> struct isVulkanHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; using DescriptorUpdateTemplateKHR = DescriptorUpdateTemplate; class Event { public: using CType = VkEvent; using NativeType = VkEvent; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eEvent; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eEvent; public: Event() VULKAN_HPP_NOEXCEPT{}; // = default - try to workaround a compiler issue Event( Event const & rhs ) = default; Event & operator=( Event const & rhs ) = default; #if !defined( VULKAN_HPP_HANDLES_MOVE_EXCHANGE ) Event( Event && rhs ) = default; Event & operator=( Event && rhs ) = default; #else Event( Event && rhs ) VULKAN_HPP_NOEXCEPT : m_event( VULKAN_HPP_NAMESPACE::exchange( rhs.m_event, {} ) ) {} Event & operator=( Event && rhs ) VULKAN_HPP_NOEXCEPT { m_event = VULKAN_HPP_NAMESPACE::exchange( rhs.m_event, {} ); return *this; } #endif VULKAN_HPP_CONSTEXPR Event( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} VULKAN_HPP_TYPESAFE_EXPLICIT Event( VkEvent event ) VULKAN_HPP_NOEXCEPT : m_event( event ) {} #if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 ) Event & operator=( VkEvent event ) VULKAN_HPP_NOEXCEPT { m_event = event; return *this; } #endif Event & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT { m_event = {}; return *this; } VULKAN_HPP_TYPESAFE_EXPLICIT operator VkEvent() const VULKAN_HPP_NOEXCEPT { return m_event; } explicit operator bool() const VULKAN_HPP_NOEXCEPT { return m_event != VK_NULL_HANDLE; } bool operator!() const VULKAN_HPP_NOEXCEPT { return m_event == VK_NULL_HANDLE; } private: VkEvent m_event = {}; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::Event; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::Event; }; #if ( VK_USE_64_BIT_PTR_DEFINES == 1 ) template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::Event; }; #endif template <> struct isVulkanHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; class AccelerationStructureKHR { public: using CType = VkAccelerationStructureKHR; using NativeType = VkAccelerationStructureKHR; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eAccelerationStructureKHR; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eAccelerationStructureKHR; public: AccelerationStructureKHR() VULKAN_HPP_NOEXCEPT{}; // = default - try to workaround a compiler issue AccelerationStructureKHR( AccelerationStructureKHR const & rhs ) = default; AccelerationStructureKHR & operator=( AccelerationStructureKHR const & rhs ) = default; #if !defined( VULKAN_HPP_HANDLES_MOVE_EXCHANGE ) AccelerationStructureKHR( AccelerationStructureKHR && rhs ) = default; AccelerationStructureKHR & operator=( AccelerationStructureKHR && rhs ) = default; #else AccelerationStructureKHR( AccelerationStructureKHR && rhs ) VULKAN_HPP_NOEXCEPT : m_accelerationStructureKHR( VULKAN_HPP_NAMESPACE::exchange( rhs.m_accelerationStructureKHR, {} ) ) { } AccelerationStructureKHR & operator=( AccelerationStructureKHR && rhs ) VULKAN_HPP_NOEXCEPT { m_accelerationStructureKHR = VULKAN_HPP_NAMESPACE::exchange( rhs.m_accelerationStructureKHR, {} ); return *this; } #endif VULKAN_HPP_CONSTEXPR AccelerationStructureKHR( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} VULKAN_HPP_TYPESAFE_EXPLICIT AccelerationStructureKHR( VkAccelerationStructureKHR accelerationStructureKHR ) VULKAN_HPP_NOEXCEPT : m_accelerationStructureKHR( accelerationStructureKHR ) { } #if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 ) AccelerationStructureKHR & operator=( VkAccelerationStructureKHR accelerationStructureKHR ) VULKAN_HPP_NOEXCEPT { m_accelerationStructureKHR = accelerationStructureKHR; return *this; } #endif AccelerationStructureKHR & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT { m_accelerationStructureKHR = {}; return *this; } VULKAN_HPP_TYPESAFE_EXPLICIT operator VkAccelerationStructureKHR() const VULKAN_HPP_NOEXCEPT { return m_accelerationStructureKHR; } explicit operator bool() const VULKAN_HPP_NOEXCEPT { return m_accelerationStructureKHR != VK_NULL_HANDLE; } bool operator!() const VULKAN_HPP_NOEXCEPT { return m_accelerationStructureKHR == VK_NULL_HANDLE; } private: VkAccelerationStructureKHR m_accelerationStructureKHR = {}; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::AccelerationStructureKHR; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::AccelerationStructureKHR; }; #if ( VK_USE_64_BIT_PTR_DEFINES == 1 ) template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::AccelerationStructureKHR; }; #endif template <> struct isVulkanHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; class MicromapEXT { public: using CType = VkMicromapEXT; using NativeType = VkMicromapEXT; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eMicromapEXT; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eUnknown; public: MicromapEXT() VULKAN_HPP_NOEXCEPT{}; // = default - try to workaround a compiler issue MicromapEXT( MicromapEXT const & rhs ) = default; MicromapEXT & operator=( MicromapEXT const & rhs ) = default; #if !defined( VULKAN_HPP_HANDLES_MOVE_EXCHANGE ) MicromapEXT( MicromapEXT && rhs ) = default; MicromapEXT & operator=( MicromapEXT && rhs ) = default; #else MicromapEXT( MicromapEXT && rhs ) VULKAN_HPP_NOEXCEPT : m_micromapEXT( VULKAN_HPP_NAMESPACE::exchange( rhs.m_micromapEXT, {} ) ) {} MicromapEXT & operator=( MicromapEXT && rhs ) VULKAN_HPP_NOEXCEPT { m_micromapEXT = VULKAN_HPP_NAMESPACE::exchange( rhs.m_micromapEXT, {} ); return *this; } #endif VULKAN_HPP_CONSTEXPR MicromapEXT( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} VULKAN_HPP_TYPESAFE_EXPLICIT MicromapEXT( VkMicromapEXT micromapEXT ) VULKAN_HPP_NOEXCEPT : m_micromapEXT( micromapEXT ) {} #if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 ) MicromapEXT & operator=( VkMicromapEXT micromapEXT ) VULKAN_HPP_NOEXCEPT { m_micromapEXT = micromapEXT; return *this; } #endif MicromapEXT & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT { m_micromapEXT = {}; return *this; } VULKAN_HPP_TYPESAFE_EXPLICIT operator VkMicromapEXT() const VULKAN_HPP_NOEXCEPT { return m_micromapEXT; } explicit operator bool() const VULKAN_HPP_NOEXCEPT { return m_micromapEXT != VK_NULL_HANDLE; } bool operator!() const VULKAN_HPP_NOEXCEPT { return m_micromapEXT == VK_NULL_HANDLE; } private: VkMicromapEXT m_micromapEXT = {}; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::MicromapEXT; }; #if ( VK_USE_64_BIT_PTR_DEFINES == 1 ) template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::MicromapEXT; }; #endif template <> struct isVulkanHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; class CommandBuffer { public: using CType = VkCommandBuffer; using NativeType = VkCommandBuffer; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eCommandBuffer; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eCommandBuffer; public: CommandBuffer() VULKAN_HPP_NOEXCEPT{}; // = default - try to workaround a compiler issue CommandBuffer( CommandBuffer const & rhs ) = default; CommandBuffer & operator=( CommandBuffer const & rhs ) = default; #if !defined( VULKAN_HPP_HANDLES_MOVE_EXCHANGE ) CommandBuffer( CommandBuffer && rhs ) = default; CommandBuffer & operator=( CommandBuffer && rhs ) = default; #else CommandBuffer( CommandBuffer && rhs ) VULKAN_HPP_NOEXCEPT : m_commandBuffer( VULKAN_HPP_NAMESPACE::exchange( rhs.m_commandBuffer, {} ) ) {} CommandBuffer & operator=( CommandBuffer && rhs ) VULKAN_HPP_NOEXCEPT { m_commandBuffer = VULKAN_HPP_NAMESPACE::exchange( rhs.m_commandBuffer, {} ); return *this; } #endif VULKAN_HPP_CONSTEXPR CommandBuffer( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} CommandBuffer( VkCommandBuffer commandBuffer ) VULKAN_HPP_NOEXCEPT : m_commandBuffer( commandBuffer ) {} CommandBuffer & operator=( VkCommandBuffer commandBuffer ) VULKAN_HPP_NOEXCEPT { m_commandBuffer = commandBuffer; return *this; } CommandBuffer & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT { m_commandBuffer = {}; return *this; } //=== VK_VERSION_1_0 === template VULKAN_HPP_NODISCARD Result begin( const VULKAN_HPP_NAMESPACE::CommandBufferBeginInfo * pBeginInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type begin( const VULKAN_HPP_NAMESPACE::CommandBufferBeginInfo & beginInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD Result end( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #else template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type end( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD Result reset( VULKAN_HPP_NAMESPACE::CommandBufferResetFlags flags, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #else template typename ResultValueType::type reset( VULKAN_HPP_NAMESPACE::CommandBufferResetFlags flags VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ template void bindPipeline( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint, VULKAN_HPP_NAMESPACE::Pipeline pipeline, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void setViewport( uint32_t firstViewport, uint32_t viewportCount, const VULKAN_HPP_NAMESPACE::Viewport * pViewports, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void setViewport( uint32_t firstViewport, VULKAN_HPP_NAMESPACE::ArrayProxy const & viewports, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void setScissor( uint32_t firstScissor, uint32_t scissorCount, const VULKAN_HPP_NAMESPACE::Rect2D * pScissors, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void setScissor( uint32_t firstScissor, VULKAN_HPP_NAMESPACE::ArrayProxy const & scissors, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void setLineWidth( float lineWidth, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void setDepthBias( float depthBiasConstantFactor, float depthBiasClamp, float depthBiasSlopeFactor, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void setBlendConstants( const float blendConstants[4], Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void setDepthBounds( float minDepthBounds, float maxDepthBounds, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void setStencilCompareMask( VULKAN_HPP_NAMESPACE::StencilFaceFlags faceMask, uint32_t compareMask, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void setStencilWriteMask( VULKAN_HPP_NAMESPACE::StencilFaceFlags faceMask, uint32_t writeMask, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void setStencilReference( VULKAN_HPP_NAMESPACE::StencilFaceFlags faceMask, uint32_t reference, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void bindDescriptorSets( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint, VULKAN_HPP_NAMESPACE::PipelineLayout layout, uint32_t firstSet, uint32_t descriptorSetCount, const VULKAN_HPP_NAMESPACE::DescriptorSet * pDescriptorSets, uint32_t dynamicOffsetCount, const uint32_t * pDynamicOffsets, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void bindDescriptorSets( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint, VULKAN_HPP_NAMESPACE::PipelineLayout layout, uint32_t firstSet, VULKAN_HPP_NAMESPACE::ArrayProxy const & descriptorSets, VULKAN_HPP_NAMESPACE::ArrayProxy const & dynamicOffsets, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void bindIndexBuffer( VULKAN_HPP_NAMESPACE::Buffer buffer, VULKAN_HPP_NAMESPACE::DeviceSize offset, VULKAN_HPP_NAMESPACE::IndexType indexType, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void bindVertexBuffers( uint32_t firstBinding, uint32_t bindingCount, const VULKAN_HPP_NAMESPACE::Buffer * pBuffers, const VULKAN_HPP_NAMESPACE::DeviceSize * pOffsets, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void bindVertexBuffers( uint32_t firstBinding, VULKAN_HPP_NAMESPACE::ArrayProxy const & buffers, VULKAN_HPP_NAMESPACE::ArrayProxy const & offsets, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void draw( uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void drawIndexed( uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, int32_t vertexOffset, uint32_t firstInstance, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void drawIndirect( VULKAN_HPP_NAMESPACE::Buffer buffer, VULKAN_HPP_NAMESPACE::DeviceSize offset, uint32_t drawCount, uint32_t stride, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void drawIndexedIndirect( VULKAN_HPP_NAMESPACE::Buffer buffer, VULKAN_HPP_NAMESPACE::DeviceSize offset, uint32_t drawCount, uint32_t stride, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void dispatch( uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void dispatchIndirect( VULKAN_HPP_NAMESPACE::Buffer buffer, VULKAN_HPP_NAMESPACE::DeviceSize offset, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void copyBuffer( VULKAN_HPP_NAMESPACE::Buffer srcBuffer, VULKAN_HPP_NAMESPACE::Buffer dstBuffer, uint32_t regionCount, const VULKAN_HPP_NAMESPACE::BufferCopy * pRegions, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void copyBuffer( VULKAN_HPP_NAMESPACE::Buffer srcBuffer, VULKAN_HPP_NAMESPACE::Buffer dstBuffer, VULKAN_HPP_NAMESPACE::ArrayProxy const & regions, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void copyImage( VULKAN_HPP_NAMESPACE::Image srcImage, VULKAN_HPP_NAMESPACE::ImageLayout srcImageLayout, VULKAN_HPP_NAMESPACE::Image dstImage, VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout, uint32_t regionCount, const VULKAN_HPP_NAMESPACE::ImageCopy * pRegions, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void copyImage( VULKAN_HPP_NAMESPACE::Image srcImage, VULKAN_HPP_NAMESPACE::ImageLayout srcImageLayout, VULKAN_HPP_NAMESPACE::Image dstImage, VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout, VULKAN_HPP_NAMESPACE::ArrayProxy const & regions, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void blitImage( VULKAN_HPP_NAMESPACE::Image srcImage, VULKAN_HPP_NAMESPACE::ImageLayout srcImageLayout, VULKAN_HPP_NAMESPACE::Image dstImage, VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout, uint32_t regionCount, const VULKAN_HPP_NAMESPACE::ImageBlit * pRegions, VULKAN_HPP_NAMESPACE::Filter filter, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void blitImage( VULKAN_HPP_NAMESPACE::Image srcImage, VULKAN_HPP_NAMESPACE::ImageLayout srcImageLayout, VULKAN_HPP_NAMESPACE::Image dstImage, VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout, VULKAN_HPP_NAMESPACE::ArrayProxy const & regions, VULKAN_HPP_NAMESPACE::Filter filter, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void copyBufferToImage( VULKAN_HPP_NAMESPACE::Buffer srcBuffer, VULKAN_HPP_NAMESPACE::Image dstImage, VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout, uint32_t regionCount, const VULKAN_HPP_NAMESPACE::BufferImageCopy * pRegions, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void copyBufferToImage( VULKAN_HPP_NAMESPACE::Buffer srcBuffer, VULKAN_HPP_NAMESPACE::Image dstImage, VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout, VULKAN_HPP_NAMESPACE::ArrayProxy const & regions, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void copyImageToBuffer( VULKAN_HPP_NAMESPACE::Image srcImage, VULKAN_HPP_NAMESPACE::ImageLayout srcImageLayout, VULKAN_HPP_NAMESPACE::Buffer dstBuffer, uint32_t regionCount, const VULKAN_HPP_NAMESPACE::BufferImageCopy * pRegions, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void copyImageToBuffer( VULKAN_HPP_NAMESPACE::Image srcImage, VULKAN_HPP_NAMESPACE::ImageLayout srcImageLayout, VULKAN_HPP_NAMESPACE::Buffer dstBuffer, VULKAN_HPP_NAMESPACE::ArrayProxy const & regions, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void updateBuffer( VULKAN_HPP_NAMESPACE::Buffer dstBuffer, VULKAN_HPP_NAMESPACE::DeviceSize dstOffset, VULKAN_HPP_NAMESPACE::DeviceSize dataSize, const void * pData, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void updateBuffer( VULKAN_HPP_NAMESPACE::Buffer dstBuffer, VULKAN_HPP_NAMESPACE::DeviceSize dstOffset, VULKAN_HPP_NAMESPACE::ArrayProxy const & data, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void fillBuffer( VULKAN_HPP_NAMESPACE::Buffer dstBuffer, VULKAN_HPP_NAMESPACE::DeviceSize dstOffset, VULKAN_HPP_NAMESPACE::DeviceSize size, uint32_t data, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void clearColorImage( VULKAN_HPP_NAMESPACE::Image image, VULKAN_HPP_NAMESPACE::ImageLayout imageLayout, const VULKAN_HPP_NAMESPACE::ClearColorValue * pColor, uint32_t rangeCount, const VULKAN_HPP_NAMESPACE::ImageSubresourceRange * pRanges, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void clearColorImage( VULKAN_HPP_NAMESPACE::Image image, VULKAN_HPP_NAMESPACE::ImageLayout imageLayout, const VULKAN_HPP_NAMESPACE::ClearColorValue & color, VULKAN_HPP_NAMESPACE::ArrayProxy const & ranges, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void clearDepthStencilImage( VULKAN_HPP_NAMESPACE::Image image, VULKAN_HPP_NAMESPACE::ImageLayout imageLayout, const VULKAN_HPP_NAMESPACE::ClearDepthStencilValue * pDepthStencil, uint32_t rangeCount, const VULKAN_HPP_NAMESPACE::ImageSubresourceRange * pRanges, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void clearDepthStencilImage( VULKAN_HPP_NAMESPACE::Image image, VULKAN_HPP_NAMESPACE::ImageLayout imageLayout, const VULKAN_HPP_NAMESPACE::ClearDepthStencilValue & depthStencil, VULKAN_HPP_NAMESPACE::ArrayProxy const & ranges, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void clearAttachments( uint32_t attachmentCount, const VULKAN_HPP_NAMESPACE::ClearAttachment * pAttachments, uint32_t rectCount, const VULKAN_HPP_NAMESPACE::ClearRect * pRects, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void clearAttachments( VULKAN_HPP_NAMESPACE::ArrayProxy const & attachments, VULKAN_HPP_NAMESPACE::ArrayProxy const & rects, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void resolveImage( VULKAN_HPP_NAMESPACE::Image srcImage, VULKAN_HPP_NAMESPACE::ImageLayout srcImageLayout, VULKAN_HPP_NAMESPACE::Image dstImage, VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout, uint32_t regionCount, const VULKAN_HPP_NAMESPACE::ImageResolve * pRegions, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void resolveImage( VULKAN_HPP_NAMESPACE::Image srcImage, VULKAN_HPP_NAMESPACE::ImageLayout srcImageLayout, VULKAN_HPP_NAMESPACE::Image dstImage, VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout, VULKAN_HPP_NAMESPACE::ArrayProxy const & regions, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void setEvent( VULKAN_HPP_NAMESPACE::Event event, VULKAN_HPP_NAMESPACE::PipelineStageFlags stageMask, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void resetEvent( VULKAN_HPP_NAMESPACE::Event event, VULKAN_HPP_NAMESPACE::PipelineStageFlags stageMask, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void waitEvents( uint32_t eventCount, const VULKAN_HPP_NAMESPACE::Event * pEvents, VULKAN_HPP_NAMESPACE::PipelineStageFlags srcStageMask, VULKAN_HPP_NAMESPACE::PipelineStageFlags dstStageMask, uint32_t memoryBarrierCount, const VULKAN_HPP_NAMESPACE::MemoryBarrier * pMemoryBarriers, uint32_t bufferMemoryBarrierCount, const VULKAN_HPP_NAMESPACE::BufferMemoryBarrier * pBufferMemoryBarriers, uint32_t imageMemoryBarrierCount, const VULKAN_HPP_NAMESPACE::ImageMemoryBarrier * pImageMemoryBarriers, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void waitEvents( VULKAN_HPP_NAMESPACE::ArrayProxy const & events, VULKAN_HPP_NAMESPACE::PipelineStageFlags srcStageMask, VULKAN_HPP_NAMESPACE::PipelineStageFlags dstStageMask, VULKAN_HPP_NAMESPACE::ArrayProxy const & memoryBarriers, VULKAN_HPP_NAMESPACE::ArrayProxy const & bufferMemoryBarriers, VULKAN_HPP_NAMESPACE::ArrayProxy const & imageMemoryBarriers, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void pipelineBarrier( VULKAN_HPP_NAMESPACE::PipelineStageFlags srcStageMask, VULKAN_HPP_NAMESPACE::PipelineStageFlags dstStageMask, VULKAN_HPP_NAMESPACE::DependencyFlags dependencyFlags, uint32_t memoryBarrierCount, const VULKAN_HPP_NAMESPACE::MemoryBarrier * pMemoryBarriers, uint32_t bufferMemoryBarrierCount, const VULKAN_HPP_NAMESPACE::BufferMemoryBarrier * pBufferMemoryBarriers, uint32_t imageMemoryBarrierCount, const VULKAN_HPP_NAMESPACE::ImageMemoryBarrier * pImageMemoryBarriers, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void pipelineBarrier( VULKAN_HPP_NAMESPACE::PipelineStageFlags srcStageMask, VULKAN_HPP_NAMESPACE::PipelineStageFlags dstStageMask, VULKAN_HPP_NAMESPACE::DependencyFlags dependencyFlags, VULKAN_HPP_NAMESPACE::ArrayProxy const & memoryBarriers, VULKAN_HPP_NAMESPACE::ArrayProxy const & bufferMemoryBarriers, VULKAN_HPP_NAMESPACE::ArrayProxy const & imageMemoryBarriers, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void beginQuery( VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t query, VULKAN_HPP_NAMESPACE::QueryControlFlags flags, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void endQuery( VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t query, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void resetQueryPool( VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void writeTimestamp( VULKAN_HPP_NAMESPACE::PipelineStageFlagBits pipelineStage, VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t query, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void copyQueryPoolResults( VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, VULKAN_HPP_NAMESPACE::Buffer dstBuffer, VULKAN_HPP_NAMESPACE::DeviceSize dstOffset, VULKAN_HPP_NAMESPACE::DeviceSize stride, VULKAN_HPP_NAMESPACE::QueryResultFlags flags, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void pushConstants( VULKAN_HPP_NAMESPACE::PipelineLayout layout, VULKAN_HPP_NAMESPACE::ShaderStageFlags stageFlags, uint32_t offset, uint32_t size, const void * pValues, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void pushConstants( VULKAN_HPP_NAMESPACE::PipelineLayout layout, VULKAN_HPP_NAMESPACE::ShaderStageFlags stageFlags, uint32_t offset, VULKAN_HPP_NAMESPACE::ArrayProxy const & values, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void beginRenderPass( const VULKAN_HPP_NAMESPACE::RenderPassBeginInfo * pRenderPassBegin, VULKAN_HPP_NAMESPACE::SubpassContents contents, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void beginRenderPass( const VULKAN_HPP_NAMESPACE::RenderPassBeginInfo & renderPassBegin, VULKAN_HPP_NAMESPACE::SubpassContents contents, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void nextSubpass( VULKAN_HPP_NAMESPACE::SubpassContents contents, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void endRenderPass( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void executeCommands( uint32_t commandBufferCount, const VULKAN_HPP_NAMESPACE::CommandBuffer * pCommandBuffers, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void executeCommands( VULKAN_HPP_NAMESPACE::ArrayProxy const & commandBuffers, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_VERSION_1_1 === template void setDeviceMask( uint32_t deviceMask, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void dispatchBase( uint32_t baseGroupX, uint32_t baseGroupY, uint32_t baseGroupZ, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; //=== VK_VERSION_1_2 === template void drawIndirectCount( VULKAN_HPP_NAMESPACE::Buffer buffer, VULKAN_HPP_NAMESPACE::DeviceSize offset, VULKAN_HPP_NAMESPACE::Buffer countBuffer, VULKAN_HPP_NAMESPACE::DeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void drawIndexedIndirectCount( VULKAN_HPP_NAMESPACE::Buffer buffer, VULKAN_HPP_NAMESPACE::DeviceSize offset, VULKAN_HPP_NAMESPACE::Buffer countBuffer, VULKAN_HPP_NAMESPACE::DeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void beginRenderPass2( const VULKAN_HPP_NAMESPACE::RenderPassBeginInfo * pRenderPassBegin, const VULKAN_HPP_NAMESPACE::SubpassBeginInfo * pSubpassBeginInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void beginRenderPass2( const VULKAN_HPP_NAMESPACE::RenderPassBeginInfo & renderPassBegin, const VULKAN_HPP_NAMESPACE::SubpassBeginInfo & subpassBeginInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void nextSubpass2( const VULKAN_HPP_NAMESPACE::SubpassBeginInfo * pSubpassBeginInfo, const VULKAN_HPP_NAMESPACE::SubpassEndInfo * pSubpassEndInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void nextSubpass2( const VULKAN_HPP_NAMESPACE::SubpassBeginInfo & subpassBeginInfo, const VULKAN_HPP_NAMESPACE::SubpassEndInfo & subpassEndInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void endRenderPass2( const VULKAN_HPP_NAMESPACE::SubpassEndInfo * pSubpassEndInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void endRenderPass2( const VULKAN_HPP_NAMESPACE::SubpassEndInfo & subpassEndInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_VERSION_1_3 === template void setEvent2( VULKAN_HPP_NAMESPACE::Event event, const VULKAN_HPP_NAMESPACE::DependencyInfo * pDependencyInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void setEvent2( VULKAN_HPP_NAMESPACE::Event event, const VULKAN_HPP_NAMESPACE::DependencyInfo & dependencyInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void resetEvent2( VULKAN_HPP_NAMESPACE::Event event, VULKAN_HPP_NAMESPACE::PipelineStageFlags2 stageMask, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void waitEvents2( uint32_t eventCount, const VULKAN_HPP_NAMESPACE::Event * pEvents, const VULKAN_HPP_NAMESPACE::DependencyInfo * pDependencyInfos, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void waitEvents2( VULKAN_HPP_NAMESPACE::ArrayProxy const & events, VULKAN_HPP_NAMESPACE::ArrayProxy const & dependencyInfos, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void pipelineBarrier2( const VULKAN_HPP_NAMESPACE::DependencyInfo * pDependencyInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void pipelineBarrier2( const VULKAN_HPP_NAMESPACE::DependencyInfo & dependencyInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void writeTimestamp2( VULKAN_HPP_NAMESPACE::PipelineStageFlags2 stage, VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t query, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void copyBuffer2( const VULKAN_HPP_NAMESPACE::CopyBufferInfo2 * pCopyBufferInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void copyBuffer2( const VULKAN_HPP_NAMESPACE::CopyBufferInfo2 & copyBufferInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void copyImage2( const VULKAN_HPP_NAMESPACE::CopyImageInfo2 * pCopyImageInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void copyImage2( const VULKAN_HPP_NAMESPACE::CopyImageInfo2 & copyImageInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void copyBufferToImage2( const VULKAN_HPP_NAMESPACE::CopyBufferToImageInfo2 * pCopyBufferToImageInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void copyBufferToImage2( const VULKAN_HPP_NAMESPACE::CopyBufferToImageInfo2 & copyBufferToImageInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void copyImageToBuffer2( const VULKAN_HPP_NAMESPACE::CopyImageToBufferInfo2 * pCopyImageToBufferInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void copyImageToBuffer2( const VULKAN_HPP_NAMESPACE::CopyImageToBufferInfo2 & copyImageToBufferInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void blitImage2( const VULKAN_HPP_NAMESPACE::BlitImageInfo2 * pBlitImageInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void blitImage2( const VULKAN_HPP_NAMESPACE::BlitImageInfo2 & blitImageInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void resolveImage2( const VULKAN_HPP_NAMESPACE::ResolveImageInfo2 * pResolveImageInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void resolveImage2( const VULKAN_HPP_NAMESPACE::ResolveImageInfo2 & resolveImageInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void beginRendering( const VULKAN_HPP_NAMESPACE::RenderingInfo * pRenderingInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void beginRendering( const VULKAN_HPP_NAMESPACE::RenderingInfo & renderingInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void endRendering( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void setCullMode( VULKAN_HPP_NAMESPACE::CullModeFlags cullMode, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void setFrontFace( VULKAN_HPP_NAMESPACE::FrontFace frontFace, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void setPrimitiveTopology( VULKAN_HPP_NAMESPACE::PrimitiveTopology primitiveTopology, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void setViewportWithCount( uint32_t viewportCount, const VULKAN_HPP_NAMESPACE::Viewport * pViewports, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void setViewportWithCount( VULKAN_HPP_NAMESPACE::ArrayProxy const & viewports, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void setScissorWithCount( uint32_t scissorCount, const VULKAN_HPP_NAMESPACE::Rect2D * pScissors, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void setScissorWithCount( VULKAN_HPP_NAMESPACE::ArrayProxy const & scissors, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void bindVertexBuffers2( uint32_t firstBinding, uint32_t bindingCount, const VULKAN_HPP_NAMESPACE::Buffer * pBuffers, const VULKAN_HPP_NAMESPACE::DeviceSize * pOffsets, const VULKAN_HPP_NAMESPACE::DeviceSize * pSizes, const VULKAN_HPP_NAMESPACE::DeviceSize * pStrides, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void bindVertexBuffers2( uint32_t firstBinding, VULKAN_HPP_NAMESPACE::ArrayProxy const & buffers, VULKAN_HPP_NAMESPACE::ArrayProxy const & offsets, VULKAN_HPP_NAMESPACE::ArrayProxy const & sizes VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, VULKAN_HPP_NAMESPACE::ArrayProxy const & strides VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void setDepthTestEnable( VULKAN_HPP_NAMESPACE::Bool32 depthTestEnable, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void setDepthWriteEnable( VULKAN_HPP_NAMESPACE::Bool32 depthWriteEnable, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void setDepthCompareOp( VULKAN_HPP_NAMESPACE::CompareOp depthCompareOp, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void setDepthBoundsTestEnable( VULKAN_HPP_NAMESPACE::Bool32 depthBoundsTestEnable, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void setStencilTestEnable( VULKAN_HPP_NAMESPACE::Bool32 stencilTestEnable, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void setStencilOp( VULKAN_HPP_NAMESPACE::StencilFaceFlags faceMask, VULKAN_HPP_NAMESPACE::StencilOp failOp, VULKAN_HPP_NAMESPACE::StencilOp passOp, VULKAN_HPP_NAMESPACE::StencilOp depthFailOp, VULKAN_HPP_NAMESPACE::CompareOp compareOp, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void setRasterizerDiscardEnable( VULKAN_HPP_NAMESPACE::Bool32 rasterizerDiscardEnable, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void setDepthBiasEnable( VULKAN_HPP_NAMESPACE::Bool32 depthBiasEnable, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void setPrimitiveRestartEnable( VULKAN_HPP_NAMESPACE::Bool32 primitiveRestartEnable, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; //=== VK_VERSION_1_4 === template void setLineStipple( uint32_t lineStippleFactor, uint16_t lineStipplePattern, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void bindIndexBuffer2( VULKAN_HPP_NAMESPACE::Buffer buffer, VULKAN_HPP_NAMESPACE::DeviceSize offset, VULKAN_HPP_NAMESPACE::DeviceSize size, VULKAN_HPP_NAMESPACE::IndexType indexType, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void pushDescriptorSet( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint, VULKAN_HPP_NAMESPACE::PipelineLayout layout, uint32_t set, uint32_t descriptorWriteCount, const VULKAN_HPP_NAMESPACE::WriteDescriptorSet * pDescriptorWrites, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void pushDescriptorSet( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint, VULKAN_HPP_NAMESPACE::PipelineLayout layout, uint32_t set, VULKAN_HPP_NAMESPACE::ArrayProxy const & descriptorWrites, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void pushDescriptorSetWithTemplate( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate, VULKAN_HPP_NAMESPACE::PipelineLayout layout, uint32_t set, const void * pData, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void pushDescriptorSetWithTemplate( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate, VULKAN_HPP_NAMESPACE::PipelineLayout layout, uint32_t set, DataType const & data, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void setRenderingAttachmentLocations( const VULKAN_HPP_NAMESPACE::RenderingAttachmentLocationInfo * pLocationInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void setRenderingAttachmentLocations( const VULKAN_HPP_NAMESPACE::RenderingAttachmentLocationInfo & locationInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void setRenderingInputAttachmentIndices( const VULKAN_HPP_NAMESPACE::RenderingInputAttachmentIndexInfo * pInputAttachmentIndexInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void setRenderingInputAttachmentIndices( const VULKAN_HPP_NAMESPACE::RenderingInputAttachmentIndexInfo & inputAttachmentIndexInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void bindDescriptorSets2( const VULKAN_HPP_NAMESPACE::BindDescriptorSetsInfo * pBindDescriptorSetsInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void bindDescriptorSets2( const VULKAN_HPP_NAMESPACE::BindDescriptorSetsInfo & bindDescriptorSetsInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void pushConstants2( const VULKAN_HPP_NAMESPACE::PushConstantsInfo * pPushConstantsInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void pushConstants2( const VULKAN_HPP_NAMESPACE::PushConstantsInfo & pushConstantsInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void pushDescriptorSet2( const VULKAN_HPP_NAMESPACE::PushDescriptorSetInfo * pPushDescriptorSetInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void pushDescriptorSet2( const VULKAN_HPP_NAMESPACE::PushDescriptorSetInfo & pushDescriptorSetInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void pushDescriptorSetWithTemplate2( const VULKAN_HPP_NAMESPACE::PushDescriptorSetWithTemplateInfo * pPushDescriptorSetWithTemplateInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void pushDescriptorSetWithTemplate2( const VULKAN_HPP_NAMESPACE::PushDescriptorSetWithTemplateInfo & pushDescriptorSetWithTemplateInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_EXT_debug_marker === template void debugMarkerBeginEXT( const VULKAN_HPP_NAMESPACE::DebugMarkerMarkerInfoEXT * pMarkerInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void debugMarkerBeginEXT( const VULKAN_HPP_NAMESPACE::DebugMarkerMarkerInfoEXT & markerInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void debugMarkerEndEXT( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void debugMarkerInsertEXT( const VULKAN_HPP_NAMESPACE::DebugMarkerMarkerInfoEXT * pMarkerInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void debugMarkerInsertEXT( const VULKAN_HPP_NAMESPACE::DebugMarkerMarkerInfoEXT & markerInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_KHR_video_queue === template void beginVideoCodingKHR( const VULKAN_HPP_NAMESPACE::VideoBeginCodingInfoKHR * pBeginInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void beginVideoCodingKHR( const VULKAN_HPP_NAMESPACE::VideoBeginCodingInfoKHR & beginInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void endVideoCodingKHR( const VULKAN_HPP_NAMESPACE::VideoEndCodingInfoKHR * pEndCodingInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void endVideoCodingKHR( const VULKAN_HPP_NAMESPACE::VideoEndCodingInfoKHR & endCodingInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void controlVideoCodingKHR( const VULKAN_HPP_NAMESPACE::VideoCodingControlInfoKHR * pCodingControlInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void controlVideoCodingKHR( const VULKAN_HPP_NAMESPACE::VideoCodingControlInfoKHR & codingControlInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_KHR_video_decode_queue === template void decodeVideoKHR( const VULKAN_HPP_NAMESPACE::VideoDecodeInfoKHR * pDecodeInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void decodeVideoKHR( const VULKAN_HPP_NAMESPACE::VideoDecodeInfoKHR & decodeInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_EXT_transform_feedback === template void bindTransformFeedbackBuffersEXT( uint32_t firstBinding, uint32_t bindingCount, const VULKAN_HPP_NAMESPACE::Buffer * pBuffers, const VULKAN_HPP_NAMESPACE::DeviceSize * pOffsets, const VULKAN_HPP_NAMESPACE::DeviceSize * pSizes, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void bindTransformFeedbackBuffersEXT( uint32_t firstBinding, VULKAN_HPP_NAMESPACE::ArrayProxy const & buffers, VULKAN_HPP_NAMESPACE::ArrayProxy const & offsets, VULKAN_HPP_NAMESPACE::ArrayProxy const & sizes VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void beginTransformFeedbackEXT( uint32_t firstCounterBuffer, uint32_t counterBufferCount, const VULKAN_HPP_NAMESPACE::Buffer * pCounterBuffers, const VULKAN_HPP_NAMESPACE::DeviceSize * pCounterBufferOffsets, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void beginTransformFeedbackEXT( uint32_t firstCounterBuffer, VULKAN_HPP_NAMESPACE::ArrayProxy const & counterBuffers, VULKAN_HPP_NAMESPACE::ArrayProxy const & counterBufferOffsets VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void endTransformFeedbackEXT( uint32_t firstCounterBuffer, uint32_t counterBufferCount, const VULKAN_HPP_NAMESPACE::Buffer * pCounterBuffers, const VULKAN_HPP_NAMESPACE::DeviceSize * pCounterBufferOffsets, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void endTransformFeedbackEXT( uint32_t firstCounterBuffer, VULKAN_HPP_NAMESPACE::ArrayProxy const & counterBuffers, VULKAN_HPP_NAMESPACE::ArrayProxy const & counterBufferOffsets VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void beginQueryIndexedEXT( VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t query, VULKAN_HPP_NAMESPACE::QueryControlFlags flags, uint32_t index, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void endQueryIndexedEXT( VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t query, uint32_t index, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void drawIndirectByteCountEXT( uint32_t instanceCount, uint32_t firstInstance, VULKAN_HPP_NAMESPACE::Buffer counterBuffer, VULKAN_HPP_NAMESPACE::DeviceSize counterBufferOffset, uint32_t counterOffset, uint32_t vertexStride, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; //=== VK_NVX_binary_import === template void cuLaunchKernelNVX( const VULKAN_HPP_NAMESPACE::CuLaunchInfoNVX * pLaunchInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void cuLaunchKernelNVX( const VULKAN_HPP_NAMESPACE::CuLaunchInfoNVX & launchInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_AMD_draw_indirect_count === template void drawIndirectCountAMD( VULKAN_HPP_NAMESPACE::Buffer buffer, VULKAN_HPP_NAMESPACE::DeviceSize offset, VULKAN_HPP_NAMESPACE::Buffer countBuffer, VULKAN_HPP_NAMESPACE::DeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void drawIndexedIndirectCountAMD( VULKAN_HPP_NAMESPACE::Buffer buffer, VULKAN_HPP_NAMESPACE::DeviceSize offset, VULKAN_HPP_NAMESPACE::Buffer countBuffer, VULKAN_HPP_NAMESPACE::DeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; //=== VK_KHR_dynamic_rendering === template void beginRenderingKHR( const VULKAN_HPP_NAMESPACE::RenderingInfo * pRenderingInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void beginRenderingKHR( const VULKAN_HPP_NAMESPACE::RenderingInfo & renderingInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void endRenderingKHR( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; //=== VK_KHR_device_group === template void setDeviceMaskKHR( uint32_t deviceMask, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void dispatchBaseKHR( uint32_t baseGroupX, uint32_t baseGroupY, uint32_t baseGroupZ, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; //=== VK_KHR_push_descriptor === template void pushDescriptorSetKHR( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint, VULKAN_HPP_NAMESPACE::PipelineLayout layout, uint32_t set, uint32_t descriptorWriteCount, const VULKAN_HPP_NAMESPACE::WriteDescriptorSet * pDescriptorWrites, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void pushDescriptorSetKHR( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint, VULKAN_HPP_NAMESPACE::PipelineLayout layout, uint32_t set, VULKAN_HPP_NAMESPACE::ArrayProxy const & descriptorWrites, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void pushDescriptorSetWithTemplateKHR( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate, VULKAN_HPP_NAMESPACE::PipelineLayout layout, uint32_t set, const void * pData, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void pushDescriptorSetWithTemplateKHR( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate, VULKAN_HPP_NAMESPACE::PipelineLayout layout, uint32_t set, DataType const & data, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_EXT_conditional_rendering === template void beginConditionalRenderingEXT( const VULKAN_HPP_NAMESPACE::ConditionalRenderingBeginInfoEXT * pConditionalRenderingBegin, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void beginConditionalRenderingEXT( const VULKAN_HPP_NAMESPACE::ConditionalRenderingBeginInfoEXT & conditionalRenderingBegin, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void endConditionalRenderingEXT( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; //=== VK_NV_clip_space_w_scaling === template void setViewportWScalingNV( uint32_t firstViewport, uint32_t viewportCount, const VULKAN_HPP_NAMESPACE::ViewportWScalingNV * pViewportWScalings, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void setViewportWScalingNV( uint32_t firstViewport, VULKAN_HPP_NAMESPACE::ArrayProxy const & viewportWScalings, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_EXT_discard_rectangles === template void setDiscardRectangleEXT( uint32_t firstDiscardRectangle, uint32_t discardRectangleCount, const VULKAN_HPP_NAMESPACE::Rect2D * pDiscardRectangles, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void setDiscardRectangleEXT( uint32_t firstDiscardRectangle, VULKAN_HPP_NAMESPACE::ArrayProxy const & discardRectangles, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void setDiscardRectangleEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 discardRectangleEnable, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void setDiscardRectangleModeEXT( VULKAN_HPP_NAMESPACE::DiscardRectangleModeEXT discardRectangleMode, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; //=== VK_KHR_create_renderpass2 === template void beginRenderPass2KHR( const VULKAN_HPP_NAMESPACE::RenderPassBeginInfo * pRenderPassBegin, const VULKAN_HPP_NAMESPACE::SubpassBeginInfo * pSubpassBeginInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void beginRenderPass2KHR( const VULKAN_HPP_NAMESPACE::RenderPassBeginInfo & renderPassBegin, const VULKAN_HPP_NAMESPACE::SubpassBeginInfo & subpassBeginInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void nextSubpass2KHR( const VULKAN_HPP_NAMESPACE::SubpassBeginInfo * pSubpassBeginInfo, const VULKAN_HPP_NAMESPACE::SubpassEndInfo * pSubpassEndInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void nextSubpass2KHR( const VULKAN_HPP_NAMESPACE::SubpassBeginInfo & subpassBeginInfo, const VULKAN_HPP_NAMESPACE::SubpassEndInfo & subpassEndInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void endRenderPass2KHR( const VULKAN_HPP_NAMESPACE::SubpassEndInfo * pSubpassEndInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void endRenderPass2KHR( const VULKAN_HPP_NAMESPACE::SubpassEndInfo & subpassEndInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_EXT_debug_utils === template void beginDebugUtilsLabelEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsLabelEXT * pLabelInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void beginDebugUtilsLabelEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsLabelEXT & labelInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void endDebugUtilsLabelEXT( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void insertDebugUtilsLabelEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsLabelEXT * pLabelInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void insertDebugUtilsLabelEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsLabelEXT & labelInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #if defined( VK_ENABLE_BETA_EXTENSIONS ) //=== VK_AMDX_shader_enqueue === template void initializeGraphScratchMemoryAMDX( VULKAN_HPP_NAMESPACE::Pipeline executionGraph, VULKAN_HPP_NAMESPACE::DeviceAddress scratch, VULKAN_HPP_NAMESPACE::DeviceSize scratchSize, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void dispatchGraphAMDX( VULKAN_HPP_NAMESPACE::DeviceAddress scratch, VULKAN_HPP_NAMESPACE::DeviceSize scratchSize, const VULKAN_HPP_NAMESPACE::DispatchGraphCountInfoAMDX * pCountInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void dispatchGraphAMDX( VULKAN_HPP_NAMESPACE::DeviceAddress scratch, VULKAN_HPP_NAMESPACE::DeviceSize scratchSize, const VULKAN_HPP_NAMESPACE::DispatchGraphCountInfoAMDX & countInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void dispatchGraphIndirectAMDX( VULKAN_HPP_NAMESPACE::DeviceAddress scratch, VULKAN_HPP_NAMESPACE::DeviceSize scratchSize, const VULKAN_HPP_NAMESPACE::DispatchGraphCountInfoAMDX * pCountInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void dispatchGraphIndirectAMDX( VULKAN_HPP_NAMESPACE::DeviceAddress scratch, VULKAN_HPP_NAMESPACE::DeviceSize scratchSize, const VULKAN_HPP_NAMESPACE::DispatchGraphCountInfoAMDX & countInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void dispatchGraphIndirectCountAMDX( VULKAN_HPP_NAMESPACE::DeviceAddress scratch, VULKAN_HPP_NAMESPACE::DeviceSize scratchSize, VULKAN_HPP_NAMESPACE::DeviceAddress countInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /*VK_ENABLE_BETA_EXTENSIONS*/ //=== VK_EXT_sample_locations === template void setSampleLocationsEXT( const VULKAN_HPP_NAMESPACE::SampleLocationsInfoEXT * pSampleLocationsInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void setSampleLocationsEXT( const VULKAN_HPP_NAMESPACE::SampleLocationsInfoEXT & sampleLocationsInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_KHR_acceleration_structure === template void buildAccelerationStructuresKHR( uint32_t infoCount, const VULKAN_HPP_NAMESPACE::AccelerationStructureBuildGeometryInfoKHR * pInfos, const VULKAN_HPP_NAMESPACE::AccelerationStructureBuildRangeInfoKHR * const * ppBuildRangeInfos, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void buildAccelerationStructuresKHR( VULKAN_HPP_NAMESPACE::ArrayProxy const & infos, VULKAN_HPP_NAMESPACE::ArrayProxy const & pBuildRangeInfos, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void buildAccelerationStructuresIndirectKHR( uint32_t infoCount, const VULKAN_HPP_NAMESPACE::AccelerationStructureBuildGeometryInfoKHR * pInfos, const VULKAN_HPP_NAMESPACE::DeviceAddress * pIndirectDeviceAddresses, const uint32_t * pIndirectStrides, const uint32_t * const * ppMaxPrimitiveCounts, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void buildAccelerationStructuresIndirectKHR( VULKAN_HPP_NAMESPACE::ArrayProxy const & infos, VULKAN_HPP_NAMESPACE::ArrayProxy const & indirectDeviceAddresses, VULKAN_HPP_NAMESPACE::ArrayProxy const & indirectStrides, VULKAN_HPP_NAMESPACE::ArrayProxy const & pMaxPrimitiveCounts, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void copyAccelerationStructureKHR( const VULKAN_HPP_NAMESPACE::CopyAccelerationStructureInfoKHR * pInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void copyAccelerationStructureKHR( const VULKAN_HPP_NAMESPACE::CopyAccelerationStructureInfoKHR & info, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void copyAccelerationStructureToMemoryKHR( const VULKAN_HPP_NAMESPACE::CopyAccelerationStructureToMemoryInfoKHR * pInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void copyAccelerationStructureToMemoryKHR( const VULKAN_HPP_NAMESPACE::CopyAccelerationStructureToMemoryInfoKHR & info, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void copyMemoryToAccelerationStructureKHR( const VULKAN_HPP_NAMESPACE::CopyMemoryToAccelerationStructureInfoKHR * pInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void copyMemoryToAccelerationStructureKHR( const VULKAN_HPP_NAMESPACE::CopyMemoryToAccelerationStructureInfoKHR & info, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void writeAccelerationStructuresPropertiesKHR( uint32_t accelerationStructureCount, const VULKAN_HPP_NAMESPACE::AccelerationStructureKHR * pAccelerationStructures, VULKAN_HPP_NAMESPACE::QueryType queryType, VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t firstQuery, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void writeAccelerationStructuresPropertiesKHR( VULKAN_HPP_NAMESPACE::ArrayProxy const & accelerationStructures, VULKAN_HPP_NAMESPACE::QueryType queryType, VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t firstQuery, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_KHR_ray_tracing_pipeline === template void traceRaysKHR( const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR * pRaygenShaderBindingTable, const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR * pMissShaderBindingTable, const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR * pHitShaderBindingTable, const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR * pCallableShaderBindingTable, uint32_t width, uint32_t height, uint32_t depth, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void traceRaysKHR( const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR & raygenShaderBindingTable, const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR & missShaderBindingTable, const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR & hitShaderBindingTable, const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR & callableShaderBindingTable, uint32_t width, uint32_t height, uint32_t depth, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void traceRaysIndirectKHR( const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR * pRaygenShaderBindingTable, const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR * pMissShaderBindingTable, const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR * pHitShaderBindingTable, const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR * pCallableShaderBindingTable, VULKAN_HPP_NAMESPACE::DeviceAddress indirectDeviceAddress, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void traceRaysIndirectKHR( const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR & raygenShaderBindingTable, const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR & missShaderBindingTable, const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR & hitShaderBindingTable, const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR & callableShaderBindingTable, VULKAN_HPP_NAMESPACE::DeviceAddress indirectDeviceAddress, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void setRayTracingPipelineStackSizeKHR( uint32_t pipelineStackSize, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; //=== VK_NV_shading_rate_image === template void bindShadingRateImageNV( VULKAN_HPP_NAMESPACE::ImageView imageView, VULKAN_HPP_NAMESPACE::ImageLayout imageLayout, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void setViewportShadingRatePaletteNV( uint32_t firstViewport, uint32_t viewportCount, const VULKAN_HPP_NAMESPACE::ShadingRatePaletteNV * pShadingRatePalettes, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void setViewportShadingRatePaletteNV( uint32_t firstViewport, VULKAN_HPP_NAMESPACE::ArrayProxy const & shadingRatePalettes, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void setCoarseSampleOrderNV( VULKAN_HPP_NAMESPACE::CoarseSampleOrderTypeNV sampleOrderType, uint32_t customSampleOrderCount, const VULKAN_HPP_NAMESPACE::CoarseSampleOrderCustomNV * pCustomSampleOrders, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void setCoarseSampleOrderNV( VULKAN_HPP_NAMESPACE::CoarseSampleOrderTypeNV sampleOrderType, VULKAN_HPP_NAMESPACE::ArrayProxy const & customSampleOrders, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_NV_ray_tracing === template void buildAccelerationStructureNV( const VULKAN_HPP_NAMESPACE::AccelerationStructureInfoNV * pInfo, VULKAN_HPP_NAMESPACE::Buffer instanceData, VULKAN_HPP_NAMESPACE::DeviceSize instanceOffset, VULKAN_HPP_NAMESPACE::Bool32 update, VULKAN_HPP_NAMESPACE::AccelerationStructureNV dst, VULKAN_HPP_NAMESPACE::AccelerationStructureNV src, VULKAN_HPP_NAMESPACE::Buffer scratch, VULKAN_HPP_NAMESPACE::DeviceSize scratchOffset, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void buildAccelerationStructureNV( const VULKAN_HPP_NAMESPACE::AccelerationStructureInfoNV & info, VULKAN_HPP_NAMESPACE::Buffer instanceData, VULKAN_HPP_NAMESPACE::DeviceSize instanceOffset, VULKAN_HPP_NAMESPACE::Bool32 update, VULKAN_HPP_NAMESPACE::AccelerationStructureNV dst, VULKAN_HPP_NAMESPACE::AccelerationStructureNV src, VULKAN_HPP_NAMESPACE::Buffer scratch, VULKAN_HPP_NAMESPACE::DeviceSize scratchOffset, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void copyAccelerationStructureNV( VULKAN_HPP_NAMESPACE::AccelerationStructureNV dst, VULKAN_HPP_NAMESPACE::AccelerationStructureNV src, VULKAN_HPP_NAMESPACE::CopyAccelerationStructureModeKHR mode, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void traceRaysNV( VULKAN_HPP_NAMESPACE::Buffer raygenShaderBindingTableBuffer, VULKAN_HPP_NAMESPACE::DeviceSize raygenShaderBindingOffset, VULKAN_HPP_NAMESPACE::Buffer missShaderBindingTableBuffer, VULKAN_HPP_NAMESPACE::DeviceSize missShaderBindingOffset, VULKAN_HPP_NAMESPACE::DeviceSize missShaderBindingStride, VULKAN_HPP_NAMESPACE::Buffer hitShaderBindingTableBuffer, VULKAN_HPP_NAMESPACE::DeviceSize hitShaderBindingOffset, VULKAN_HPP_NAMESPACE::DeviceSize hitShaderBindingStride, VULKAN_HPP_NAMESPACE::Buffer callableShaderBindingTableBuffer, VULKAN_HPP_NAMESPACE::DeviceSize callableShaderBindingOffset, VULKAN_HPP_NAMESPACE::DeviceSize callableShaderBindingStride, uint32_t width, uint32_t height, uint32_t depth, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void writeAccelerationStructuresPropertiesNV( uint32_t accelerationStructureCount, const VULKAN_HPP_NAMESPACE::AccelerationStructureNV * pAccelerationStructures, VULKAN_HPP_NAMESPACE::QueryType queryType, VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t firstQuery, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void writeAccelerationStructuresPropertiesNV( VULKAN_HPP_NAMESPACE::ArrayProxy const & accelerationStructures, VULKAN_HPP_NAMESPACE::QueryType queryType, VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t firstQuery, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_KHR_draw_indirect_count === template void drawIndirectCountKHR( VULKAN_HPP_NAMESPACE::Buffer buffer, VULKAN_HPP_NAMESPACE::DeviceSize offset, VULKAN_HPP_NAMESPACE::Buffer countBuffer, VULKAN_HPP_NAMESPACE::DeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void drawIndexedIndirectCountKHR( VULKAN_HPP_NAMESPACE::Buffer buffer, VULKAN_HPP_NAMESPACE::DeviceSize offset, VULKAN_HPP_NAMESPACE::Buffer countBuffer, VULKAN_HPP_NAMESPACE::DeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; //=== VK_AMD_buffer_marker === template void writeBufferMarkerAMD( VULKAN_HPP_NAMESPACE::PipelineStageFlagBits pipelineStage, VULKAN_HPP_NAMESPACE::Buffer dstBuffer, VULKAN_HPP_NAMESPACE::DeviceSize dstOffset, uint32_t marker, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void writeBufferMarker2AMD( VULKAN_HPP_NAMESPACE::PipelineStageFlags2 stage, VULKAN_HPP_NAMESPACE::Buffer dstBuffer, VULKAN_HPP_NAMESPACE::DeviceSize dstOffset, uint32_t marker, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; //=== VK_NV_mesh_shader === template void drawMeshTasksNV( uint32_t taskCount, uint32_t firstTask, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void drawMeshTasksIndirectNV( VULKAN_HPP_NAMESPACE::Buffer buffer, VULKAN_HPP_NAMESPACE::DeviceSize offset, uint32_t drawCount, uint32_t stride, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void drawMeshTasksIndirectCountNV( VULKAN_HPP_NAMESPACE::Buffer buffer, VULKAN_HPP_NAMESPACE::DeviceSize offset, VULKAN_HPP_NAMESPACE::Buffer countBuffer, VULKAN_HPP_NAMESPACE::DeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; //=== VK_NV_scissor_exclusive === template void setExclusiveScissorEnableNV( uint32_t firstExclusiveScissor, uint32_t exclusiveScissorCount, const VULKAN_HPP_NAMESPACE::Bool32 * pExclusiveScissorEnables, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void setExclusiveScissorEnableNV( uint32_t firstExclusiveScissor, VULKAN_HPP_NAMESPACE::ArrayProxy const & exclusiveScissorEnables, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void setExclusiveScissorNV( uint32_t firstExclusiveScissor, uint32_t exclusiveScissorCount, const VULKAN_HPP_NAMESPACE::Rect2D * pExclusiveScissors, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void setExclusiveScissorNV( uint32_t firstExclusiveScissor, VULKAN_HPP_NAMESPACE::ArrayProxy const & exclusiveScissors, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_NV_device_diagnostic_checkpoints === template void setCheckpointNV( const void * pCheckpointMarker, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void setCheckpointNV( CheckpointMarkerType const & checkpointMarker, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_INTEL_performance_query === template VULKAN_HPP_NODISCARD Result setPerformanceMarkerINTEL( const VULKAN_HPP_NAMESPACE::PerformanceMarkerInfoINTEL * pMarkerInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type setPerformanceMarkerINTEL( const VULKAN_HPP_NAMESPACE::PerformanceMarkerInfoINTEL & markerInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result setPerformanceStreamMarkerINTEL( const VULKAN_HPP_NAMESPACE::PerformanceStreamMarkerInfoINTEL * pMarkerInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type setPerformanceStreamMarkerINTEL( const VULKAN_HPP_NAMESPACE::PerformanceStreamMarkerInfoINTEL & markerInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result setPerformanceOverrideINTEL( const VULKAN_HPP_NAMESPACE::PerformanceOverrideInfoINTEL * pOverrideInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type setPerformanceOverrideINTEL( const VULKAN_HPP_NAMESPACE::PerformanceOverrideInfoINTEL & overrideInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_KHR_fragment_shading_rate === template void setFragmentShadingRateKHR( const VULKAN_HPP_NAMESPACE::Extent2D * pFragmentSize, const VULKAN_HPP_NAMESPACE::FragmentShadingRateCombinerOpKHR combinerOps[2], Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void setFragmentShadingRateKHR( const VULKAN_HPP_NAMESPACE::Extent2D & fragmentSize, const VULKAN_HPP_NAMESPACE::FragmentShadingRateCombinerOpKHR combinerOps[2], Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_KHR_dynamic_rendering_local_read === template void setRenderingAttachmentLocationsKHR( const VULKAN_HPP_NAMESPACE::RenderingAttachmentLocationInfo * pLocationInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void setRenderingAttachmentLocationsKHR( const VULKAN_HPP_NAMESPACE::RenderingAttachmentLocationInfo & locationInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void setRenderingInputAttachmentIndicesKHR( const VULKAN_HPP_NAMESPACE::RenderingInputAttachmentIndexInfo * pInputAttachmentIndexInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void setRenderingInputAttachmentIndicesKHR( const VULKAN_HPP_NAMESPACE::RenderingInputAttachmentIndexInfo & inputAttachmentIndexInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_EXT_line_rasterization === template void setLineStippleEXT( uint32_t lineStippleFactor, uint16_t lineStipplePattern, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; //=== VK_EXT_extended_dynamic_state === template void setCullModeEXT( VULKAN_HPP_NAMESPACE::CullModeFlags cullMode, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void setFrontFaceEXT( VULKAN_HPP_NAMESPACE::FrontFace frontFace, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void setPrimitiveTopologyEXT( VULKAN_HPP_NAMESPACE::PrimitiveTopology primitiveTopology, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void setViewportWithCountEXT( uint32_t viewportCount, const VULKAN_HPP_NAMESPACE::Viewport * pViewports, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void setViewportWithCountEXT( VULKAN_HPP_NAMESPACE::ArrayProxy const & viewports, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void setScissorWithCountEXT( uint32_t scissorCount, const VULKAN_HPP_NAMESPACE::Rect2D * pScissors, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void setScissorWithCountEXT( VULKAN_HPP_NAMESPACE::ArrayProxy const & scissors, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void bindVertexBuffers2EXT( uint32_t firstBinding, uint32_t bindingCount, const VULKAN_HPP_NAMESPACE::Buffer * pBuffers, const VULKAN_HPP_NAMESPACE::DeviceSize * pOffsets, const VULKAN_HPP_NAMESPACE::DeviceSize * pSizes, const VULKAN_HPP_NAMESPACE::DeviceSize * pStrides, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void bindVertexBuffers2EXT( uint32_t firstBinding, VULKAN_HPP_NAMESPACE::ArrayProxy const & buffers, VULKAN_HPP_NAMESPACE::ArrayProxy const & offsets, VULKAN_HPP_NAMESPACE::ArrayProxy const & sizes VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, VULKAN_HPP_NAMESPACE::ArrayProxy const & strides VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void setDepthTestEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 depthTestEnable, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void setDepthWriteEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 depthWriteEnable, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void setDepthCompareOpEXT( VULKAN_HPP_NAMESPACE::CompareOp depthCompareOp, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void setDepthBoundsTestEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 depthBoundsTestEnable, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void setStencilTestEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 stencilTestEnable, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void setStencilOpEXT( VULKAN_HPP_NAMESPACE::StencilFaceFlags faceMask, VULKAN_HPP_NAMESPACE::StencilOp failOp, VULKAN_HPP_NAMESPACE::StencilOp passOp, VULKAN_HPP_NAMESPACE::StencilOp depthFailOp, VULKAN_HPP_NAMESPACE::CompareOp compareOp, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; //=== VK_NV_device_generated_commands === template void preprocessGeneratedCommandsNV( const VULKAN_HPP_NAMESPACE::GeneratedCommandsInfoNV * pGeneratedCommandsInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void preprocessGeneratedCommandsNV( const VULKAN_HPP_NAMESPACE::GeneratedCommandsInfoNV & generatedCommandsInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void executeGeneratedCommandsNV( VULKAN_HPP_NAMESPACE::Bool32 isPreprocessed, const VULKAN_HPP_NAMESPACE::GeneratedCommandsInfoNV * pGeneratedCommandsInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void executeGeneratedCommandsNV( VULKAN_HPP_NAMESPACE::Bool32 isPreprocessed, const VULKAN_HPP_NAMESPACE::GeneratedCommandsInfoNV & generatedCommandsInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void bindPipelineShaderGroupNV( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint, VULKAN_HPP_NAMESPACE::Pipeline pipeline, uint32_t groupIndex, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; //=== VK_EXT_depth_bias_control === template void setDepthBias2EXT( const VULKAN_HPP_NAMESPACE::DepthBiasInfoEXT * pDepthBiasInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void setDepthBias2EXT( const VULKAN_HPP_NAMESPACE::DepthBiasInfoEXT & depthBiasInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_KHR_video_encode_queue === template void encodeVideoKHR( const VULKAN_HPP_NAMESPACE::VideoEncodeInfoKHR * pEncodeInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void encodeVideoKHR( const VULKAN_HPP_NAMESPACE::VideoEncodeInfoKHR & encodeInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #if defined( VK_ENABLE_BETA_EXTENSIONS ) //=== VK_NV_cuda_kernel_launch === template void cudaLaunchKernelNV( const VULKAN_HPP_NAMESPACE::CudaLaunchInfoNV * pLaunchInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void cudaLaunchKernelNV( const VULKAN_HPP_NAMESPACE::CudaLaunchInfoNV & launchInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #endif /*VK_ENABLE_BETA_EXTENSIONS*/ //=== VK_KHR_synchronization2 === template void setEvent2KHR( VULKAN_HPP_NAMESPACE::Event event, const VULKAN_HPP_NAMESPACE::DependencyInfo * pDependencyInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void setEvent2KHR( VULKAN_HPP_NAMESPACE::Event event, const VULKAN_HPP_NAMESPACE::DependencyInfo & dependencyInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void resetEvent2KHR( VULKAN_HPP_NAMESPACE::Event event, VULKAN_HPP_NAMESPACE::PipelineStageFlags2 stageMask, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void waitEvents2KHR( uint32_t eventCount, const VULKAN_HPP_NAMESPACE::Event * pEvents, const VULKAN_HPP_NAMESPACE::DependencyInfo * pDependencyInfos, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void waitEvents2KHR( VULKAN_HPP_NAMESPACE::ArrayProxy const & events, VULKAN_HPP_NAMESPACE::ArrayProxy const & dependencyInfos, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void pipelineBarrier2KHR( const VULKAN_HPP_NAMESPACE::DependencyInfo * pDependencyInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void pipelineBarrier2KHR( const VULKAN_HPP_NAMESPACE::DependencyInfo & dependencyInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void writeTimestamp2KHR( VULKAN_HPP_NAMESPACE::PipelineStageFlags2 stage, VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t query, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; //=== VK_EXT_descriptor_buffer === template void bindDescriptorBuffersEXT( uint32_t bufferCount, const VULKAN_HPP_NAMESPACE::DescriptorBufferBindingInfoEXT * pBindingInfos, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void bindDescriptorBuffersEXT( VULKAN_HPP_NAMESPACE::ArrayProxy const & bindingInfos, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void setDescriptorBufferOffsetsEXT( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint, VULKAN_HPP_NAMESPACE::PipelineLayout layout, uint32_t firstSet, uint32_t setCount, const uint32_t * pBufferIndices, const VULKAN_HPP_NAMESPACE::DeviceSize * pOffsets, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void setDescriptorBufferOffsetsEXT( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint, VULKAN_HPP_NAMESPACE::PipelineLayout layout, uint32_t firstSet, VULKAN_HPP_NAMESPACE::ArrayProxy const & bufferIndices, VULKAN_HPP_NAMESPACE::ArrayProxy const & offsets, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void bindDescriptorBufferEmbeddedSamplersEXT( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint, VULKAN_HPP_NAMESPACE::PipelineLayout layout, uint32_t set, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; //=== VK_NV_fragment_shading_rate_enums === template void setFragmentShadingRateEnumNV( VULKAN_HPP_NAMESPACE::FragmentShadingRateNV shadingRate, const VULKAN_HPP_NAMESPACE::FragmentShadingRateCombinerOpKHR combinerOps[2], Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; //=== VK_EXT_mesh_shader === template void drawMeshTasksEXT( uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void drawMeshTasksIndirectEXT( VULKAN_HPP_NAMESPACE::Buffer buffer, VULKAN_HPP_NAMESPACE::DeviceSize offset, uint32_t drawCount, uint32_t stride, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void drawMeshTasksIndirectCountEXT( VULKAN_HPP_NAMESPACE::Buffer buffer, VULKAN_HPP_NAMESPACE::DeviceSize offset, VULKAN_HPP_NAMESPACE::Buffer countBuffer, VULKAN_HPP_NAMESPACE::DeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; //=== VK_KHR_copy_commands2 === template void copyBuffer2KHR( const VULKAN_HPP_NAMESPACE::CopyBufferInfo2 * pCopyBufferInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void copyBuffer2KHR( const VULKAN_HPP_NAMESPACE::CopyBufferInfo2 & copyBufferInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void copyImage2KHR( const VULKAN_HPP_NAMESPACE::CopyImageInfo2 * pCopyImageInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void copyImage2KHR( const VULKAN_HPP_NAMESPACE::CopyImageInfo2 & copyImageInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void copyBufferToImage2KHR( const VULKAN_HPP_NAMESPACE::CopyBufferToImageInfo2 * pCopyBufferToImageInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void copyBufferToImage2KHR( const VULKAN_HPP_NAMESPACE::CopyBufferToImageInfo2 & copyBufferToImageInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void copyImageToBuffer2KHR( const VULKAN_HPP_NAMESPACE::CopyImageToBufferInfo2 * pCopyImageToBufferInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void copyImageToBuffer2KHR( const VULKAN_HPP_NAMESPACE::CopyImageToBufferInfo2 & copyImageToBufferInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void blitImage2KHR( const VULKAN_HPP_NAMESPACE::BlitImageInfo2 * pBlitImageInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void blitImage2KHR( const VULKAN_HPP_NAMESPACE::BlitImageInfo2 & blitImageInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void resolveImage2KHR( const VULKAN_HPP_NAMESPACE::ResolveImageInfo2 * pResolveImageInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void resolveImage2KHR( const VULKAN_HPP_NAMESPACE::ResolveImageInfo2 & resolveImageInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_EXT_vertex_input_dynamic_state === template void setVertexInputEXT( uint32_t vertexBindingDescriptionCount, const VULKAN_HPP_NAMESPACE::VertexInputBindingDescription2EXT * pVertexBindingDescriptions, uint32_t vertexAttributeDescriptionCount, const VULKAN_HPP_NAMESPACE::VertexInputAttributeDescription2EXT * pVertexAttributeDescriptions, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void setVertexInputEXT( VULKAN_HPP_NAMESPACE::ArrayProxy const & vertexBindingDescriptions, VULKAN_HPP_NAMESPACE::ArrayProxy const & vertexAttributeDescriptions, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_HUAWEI_subpass_shading === template void subpassShadingHUAWEI( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; //=== VK_HUAWEI_invocation_mask === template void bindInvocationMaskHUAWEI( VULKAN_HPP_NAMESPACE::ImageView imageView, VULKAN_HPP_NAMESPACE::ImageLayout imageLayout, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; //=== VK_EXT_extended_dynamic_state2 === template void setPatchControlPointsEXT( uint32_t patchControlPoints, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void setRasterizerDiscardEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 rasterizerDiscardEnable, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void setDepthBiasEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 depthBiasEnable, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void setLogicOpEXT( VULKAN_HPP_NAMESPACE::LogicOp logicOp, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void setPrimitiveRestartEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 primitiveRestartEnable, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; //=== VK_EXT_color_write_enable === template void setColorWriteEnableEXT( uint32_t attachmentCount, const VULKAN_HPP_NAMESPACE::Bool32 * pColorWriteEnables, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void setColorWriteEnableEXT( VULKAN_HPP_NAMESPACE::ArrayProxy const & colorWriteEnables, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_KHR_ray_tracing_maintenance1 === template void traceRaysIndirect2KHR( VULKAN_HPP_NAMESPACE::DeviceAddress indirectDeviceAddress, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; //=== VK_EXT_multi_draw === template void drawMultiEXT( uint32_t drawCount, const VULKAN_HPP_NAMESPACE::MultiDrawInfoEXT * pVertexInfo, uint32_t instanceCount, uint32_t firstInstance, uint32_t stride, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void drawMultiEXT( VULKAN_HPP_NAMESPACE::StridedArrayProxy const & vertexInfo, uint32_t instanceCount, uint32_t firstInstance, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void drawMultiIndexedEXT( uint32_t drawCount, const VULKAN_HPP_NAMESPACE::MultiDrawIndexedInfoEXT * pIndexInfo, uint32_t instanceCount, uint32_t firstInstance, uint32_t stride, const int32_t * pVertexOffset, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void drawMultiIndexedEXT( VULKAN_HPP_NAMESPACE::StridedArrayProxy const & indexInfo, uint32_t instanceCount, uint32_t firstInstance, Optional vertexOffset VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_EXT_opacity_micromap === template void buildMicromapsEXT( uint32_t infoCount, const VULKAN_HPP_NAMESPACE::MicromapBuildInfoEXT * pInfos, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void buildMicromapsEXT( VULKAN_HPP_NAMESPACE::ArrayProxy const & infos, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void copyMicromapEXT( const VULKAN_HPP_NAMESPACE::CopyMicromapInfoEXT * pInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void copyMicromapEXT( const VULKAN_HPP_NAMESPACE::CopyMicromapInfoEXT & info, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void copyMicromapToMemoryEXT( const VULKAN_HPP_NAMESPACE::CopyMicromapToMemoryInfoEXT * pInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void copyMicromapToMemoryEXT( const VULKAN_HPP_NAMESPACE::CopyMicromapToMemoryInfoEXT & info, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void copyMemoryToMicromapEXT( const VULKAN_HPP_NAMESPACE::CopyMemoryToMicromapInfoEXT * pInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void copyMemoryToMicromapEXT( const VULKAN_HPP_NAMESPACE::CopyMemoryToMicromapInfoEXT & info, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void writeMicromapsPropertiesEXT( uint32_t micromapCount, const VULKAN_HPP_NAMESPACE::MicromapEXT * pMicromaps, VULKAN_HPP_NAMESPACE::QueryType queryType, VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t firstQuery, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void writeMicromapsPropertiesEXT( VULKAN_HPP_NAMESPACE::ArrayProxy const & micromaps, VULKAN_HPP_NAMESPACE::QueryType queryType, VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t firstQuery, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_HUAWEI_cluster_culling_shader === template void drawClusterHUAWEI( uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void drawClusterIndirectHUAWEI( VULKAN_HPP_NAMESPACE::Buffer buffer, VULKAN_HPP_NAMESPACE::DeviceSize offset, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; //=== VK_NV_copy_memory_indirect === template void copyMemoryIndirectNV( VULKAN_HPP_NAMESPACE::DeviceAddress copyBufferAddress, uint32_t copyCount, uint32_t stride, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void copyMemoryToImageIndirectNV( VULKAN_HPP_NAMESPACE::DeviceAddress copyBufferAddress, uint32_t copyCount, uint32_t stride, VULKAN_HPP_NAMESPACE::Image dstImage, VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout, const VULKAN_HPP_NAMESPACE::ImageSubresourceLayers * pImageSubresources, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void copyMemoryToImageIndirectNV( VULKAN_HPP_NAMESPACE::DeviceAddress copyBufferAddress, uint32_t stride, VULKAN_HPP_NAMESPACE::Image dstImage, VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout, VULKAN_HPP_NAMESPACE::ArrayProxy const & imageSubresources, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_NV_memory_decompression === template void decompressMemoryNV( uint32_t decompressRegionCount, const VULKAN_HPP_NAMESPACE::DecompressMemoryRegionNV * pDecompressMemoryRegions, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void decompressMemoryNV( VULKAN_HPP_NAMESPACE::ArrayProxy const & decompressMemoryRegions, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void decompressMemoryIndirectCountNV( VULKAN_HPP_NAMESPACE::DeviceAddress indirectCommandsAddress, VULKAN_HPP_NAMESPACE::DeviceAddress indirectCommandsCountAddress, uint32_t stride, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; //=== VK_NV_device_generated_commands_compute === template void updatePipelineIndirectBufferNV( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint, VULKAN_HPP_NAMESPACE::Pipeline pipeline, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; //=== VK_EXT_extended_dynamic_state3 === template void setDepthClampEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 depthClampEnable, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void setPolygonModeEXT( VULKAN_HPP_NAMESPACE::PolygonMode polygonMode, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void setRasterizationSamplesEXT( VULKAN_HPP_NAMESPACE::SampleCountFlagBits rasterizationSamples, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void setSampleMaskEXT( VULKAN_HPP_NAMESPACE::SampleCountFlagBits samples, const VULKAN_HPP_NAMESPACE::SampleMask * pSampleMask, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void setSampleMaskEXT( VULKAN_HPP_NAMESPACE::SampleCountFlagBits samples, VULKAN_HPP_NAMESPACE::ArrayProxy const & sampleMask, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void setAlphaToCoverageEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 alphaToCoverageEnable, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void setAlphaToOneEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 alphaToOneEnable, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void setLogicOpEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 logicOpEnable, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void setColorBlendEnableEXT( uint32_t firstAttachment, uint32_t attachmentCount, const VULKAN_HPP_NAMESPACE::Bool32 * pColorBlendEnables, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void setColorBlendEnableEXT( uint32_t firstAttachment, VULKAN_HPP_NAMESPACE::ArrayProxy const & colorBlendEnables, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void setColorBlendEquationEXT( uint32_t firstAttachment, uint32_t attachmentCount, const VULKAN_HPP_NAMESPACE::ColorBlendEquationEXT * pColorBlendEquations, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void setColorBlendEquationEXT( uint32_t firstAttachment, VULKAN_HPP_NAMESPACE::ArrayProxy const & colorBlendEquations, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void setColorWriteMaskEXT( uint32_t firstAttachment, uint32_t attachmentCount, const VULKAN_HPP_NAMESPACE::ColorComponentFlags * pColorWriteMasks, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void setColorWriteMaskEXT( uint32_t firstAttachment, VULKAN_HPP_NAMESPACE::ArrayProxy const & colorWriteMasks, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void setTessellationDomainOriginEXT( VULKAN_HPP_NAMESPACE::TessellationDomainOrigin domainOrigin, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void setRasterizationStreamEXT( uint32_t rasterizationStream, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void setConservativeRasterizationModeEXT( VULKAN_HPP_NAMESPACE::ConservativeRasterizationModeEXT conservativeRasterizationMode, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void setExtraPrimitiveOverestimationSizeEXT( float extraPrimitiveOverestimationSize, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void setDepthClipEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 depthClipEnable, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void setSampleLocationsEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 sampleLocationsEnable, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void setColorBlendAdvancedEXT( uint32_t firstAttachment, uint32_t attachmentCount, const VULKAN_HPP_NAMESPACE::ColorBlendAdvancedEXT * pColorBlendAdvanced, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void setColorBlendAdvancedEXT( uint32_t firstAttachment, VULKAN_HPP_NAMESPACE::ArrayProxy const & colorBlendAdvanced, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void setProvokingVertexModeEXT( VULKAN_HPP_NAMESPACE::ProvokingVertexModeEXT provokingVertexMode, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void setLineRasterizationModeEXT( VULKAN_HPP_NAMESPACE::LineRasterizationModeEXT lineRasterizationMode, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void setLineStippleEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 stippledLineEnable, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void setDepthClipNegativeOneToOneEXT( VULKAN_HPP_NAMESPACE::Bool32 negativeOneToOne, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void setViewportWScalingEnableNV( VULKAN_HPP_NAMESPACE::Bool32 viewportWScalingEnable, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void setViewportSwizzleNV( uint32_t firstViewport, uint32_t viewportCount, const VULKAN_HPP_NAMESPACE::ViewportSwizzleNV * pViewportSwizzles, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void setViewportSwizzleNV( uint32_t firstViewport, VULKAN_HPP_NAMESPACE::ArrayProxy const & viewportSwizzles, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void setCoverageToColorEnableNV( VULKAN_HPP_NAMESPACE::Bool32 coverageToColorEnable, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void setCoverageToColorLocationNV( uint32_t coverageToColorLocation, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void setCoverageModulationModeNV( VULKAN_HPP_NAMESPACE::CoverageModulationModeNV coverageModulationMode, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void setCoverageModulationTableEnableNV( VULKAN_HPP_NAMESPACE::Bool32 coverageModulationTableEnable, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void setCoverageModulationTableNV( uint32_t coverageModulationTableCount, const float * pCoverageModulationTable, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void setCoverageModulationTableNV( VULKAN_HPP_NAMESPACE::ArrayProxy const & coverageModulationTable, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void setShadingRateImageEnableNV( VULKAN_HPP_NAMESPACE::Bool32 shadingRateImageEnable, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void setRepresentativeFragmentTestEnableNV( VULKAN_HPP_NAMESPACE::Bool32 representativeFragmentTestEnable, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void setCoverageReductionModeNV( VULKAN_HPP_NAMESPACE::CoverageReductionModeNV coverageReductionMode, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; //=== VK_NV_optical_flow === template void opticalFlowExecuteNV( VULKAN_HPP_NAMESPACE::OpticalFlowSessionNV session, const VULKAN_HPP_NAMESPACE::OpticalFlowExecuteInfoNV * pExecuteInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void opticalFlowExecuteNV( VULKAN_HPP_NAMESPACE::OpticalFlowSessionNV session, const VULKAN_HPP_NAMESPACE::OpticalFlowExecuteInfoNV & executeInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_KHR_maintenance5 === template void bindIndexBuffer2KHR( VULKAN_HPP_NAMESPACE::Buffer buffer, VULKAN_HPP_NAMESPACE::DeviceSize offset, VULKAN_HPP_NAMESPACE::DeviceSize size, VULKAN_HPP_NAMESPACE::IndexType indexType, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; //=== VK_EXT_shader_object === template void bindShadersEXT( uint32_t stageCount, const VULKAN_HPP_NAMESPACE::ShaderStageFlagBits * pStages, const VULKAN_HPP_NAMESPACE::ShaderEXT * pShaders, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void bindShadersEXT( VULKAN_HPP_NAMESPACE::ArrayProxy const & stages, VULKAN_HPP_NAMESPACE::ArrayProxy const & shaders, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void setDepthClampRangeEXT( VULKAN_HPP_NAMESPACE::DepthClampModeEXT depthClampMode, const VULKAN_HPP_NAMESPACE::DepthClampRangeEXT * pDepthClampRange, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void setDepthClampRangeEXT( VULKAN_HPP_NAMESPACE::DepthClampModeEXT depthClampMode, Optional depthClampRange VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_NV_cooperative_vector === template void convertCooperativeVectorMatrixNV( uint32_t infoCount, const VULKAN_HPP_NAMESPACE::ConvertCooperativeVectorMatrixInfoNV * pInfos, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void convertCooperativeVectorMatrixNV( VULKAN_HPP_NAMESPACE::ArrayProxy const & infos, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_EXT_attachment_feedback_loop_dynamic_state === template void setAttachmentFeedbackLoopEnableEXT( VULKAN_HPP_NAMESPACE::ImageAspectFlags aspectMask, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; //=== VK_KHR_line_rasterization === template void setLineStippleKHR( uint32_t lineStippleFactor, uint16_t lineStipplePattern, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; //=== VK_KHR_maintenance6 === template void bindDescriptorSets2KHR( const VULKAN_HPP_NAMESPACE::BindDescriptorSetsInfo * pBindDescriptorSetsInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void bindDescriptorSets2KHR( const VULKAN_HPP_NAMESPACE::BindDescriptorSetsInfo & bindDescriptorSetsInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void pushConstants2KHR( const VULKAN_HPP_NAMESPACE::PushConstantsInfo * pPushConstantsInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void pushConstants2KHR( const VULKAN_HPP_NAMESPACE::PushConstantsInfo & pushConstantsInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void pushDescriptorSet2KHR( const VULKAN_HPP_NAMESPACE::PushDescriptorSetInfo * pPushDescriptorSetInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void pushDescriptorSet2KHR( const VULKAN_HPP_NAMESPACE::PushDescriptorSetInfo & pushDescriptorSetInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void pushDescriptorSetWithTemplate2KHR( const VULKAN_HPP_NAMESPACE::PushDescriptorSetWithTemplateInfo * pPushDescriptorSetWithTemplateInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void pushDescriptorSetWithTemplate2KHR( const VULKAN_HPP_NAMESPACE::PushDescriptorSetWithTemplateInfo & pushDescriptorSetWithTemplateInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void setDescriptorBufferOffsets2EXT( const VULKAN_HPP_NAMESPACE::SetDescriptorBufferOffsetsInfoEXT * pSetDescriptorBufferOffsetsInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void setDescriptorBufferOffsets2EXT( const VULKAN_HPP_NAMESPACE::SetDescriptorBufferOffsetsInfoEXT & setDescriptorBufferOffsetsInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void bindDescriptorBufferEmbeddedSamplers2EXT( const VULKAN_HPP_NAMESPACE::BindDescriptorBufferEmbeddedSamplersInfoEXT * pBindDescriptorBufferEmbeddedSamplersInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void bindDescriptorBufferEmbeddedSamplers2EXT( const VULKAN_HPP_NAMESPACE::BindDescriptorBufferEmbeddedSamplersInfoEXT & bindDescriptorBufferEmbeddedSamplersInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_NV_cluster_acceleration_structure === template void buildClusterAccelerationStructureIndirectNV( const VULKAN_HPP_NAMESPACE::ClusterAccelerationStructureCommandsInfoNV * pCommandInfos, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void buildClusterAccelerationStructureIndirectNV( const VULKAN_HPP_NAMESPACE::ClusterAccelerationStructureCommandsInfoNV & commandInfos, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_NV_partitioned_acceleration_structure === template void buildPartitionedAccelerationStructuresNV( const VULKAN_HPP_NAMESPACE::BuildPartitionedAccelerationStructureInfoNV * pBuildInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void buildPartitionedAccelerationStructuresNV( const VULKAN_HPP_NAMESPACE::BuildPartitionedAccelerationStructureInfoNV & buildInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_EXT_device_generated_commands === template void preprocessGeneratedCommandsEXT( const VULKAN_HPP_NAMESPACE::GeneratedCommandsInfoEXT * pGeneratedCommandsInfo, VULKAN_HPP_NAMESPACE::CommandBuffer stateCommandBuffer, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void preprocessGeneratedCommandsEXT( const VULKAN_HPP_NAMESPACE::GeneratedCommandsInfoEXT & generatedCommandsInfo, VULKAN_HPP_NAMESPACE::CommandBuffer stateCommandBuffer, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void executeGeneratedCommandsEXT( VULKAN_HPP_NAMESPACE::Bool32 isPreprocessed, const VULKAN_HPP_NAMESPACE::GeneratedCommandsInfoEXT * pGeneratedCommandsInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void executeGeneratedCommandsEXT( VULKAN_HPP_NAMESPACE::Bool32 isPreprocessed, const VULKAN_HPP_NAMESPACE::GeneratedCommandsInfoEXT & generatedCommandsInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ operator VkCommandBuffer() const VULKAN_HPP_NOEXCEPT { return m_commandBuffer; } explicit operator bool() const VULKAN_HPP_NOEXCEPT { return m_commandBuffer != VK_NULL_HANDLE; } bool operator!() const VULKAN_HPP_NOEXCEPT { return m_commandBuffer == VK_NULL_HANDLE; } private: VkCommandBuffer m_commandBuffer = {}; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::CommandBuffer; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::CommandBuffer; }; #if ( VK_USE_64_BIT_PTR_DEFINES == 1 ) template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::CommandBuffer; }; #endif template <> struct isVulkanHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; class DeviceMemory { public: using CType = VkDeviceMemory; using NativeType = VkDeviceMemory; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eDeviceMemory; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eDeviceMemory; public: DeviceMemory() VULKAN_HPP_NOEXCEPT{}; // = default - try to workaround a compiler issue DeviceMemory( DeviceMemory const & rhs ) = default; DeviceMemory & operator=( DeviceMemory const & rhs ) = default; #if !defined( VULKAN_HPP_HANDLES_MOVE_EXCHANGE ) DeviceMemory( DeviceMemory && rhs ) = default; DeviceMemory & operator=( DeviceMemory && rhs ) = default; #else DeviceMemory( DeviceMemory && rhs ) VULKAN_HPP_NOEXCEPT : m_deviceMemory( VULKAN_HPP_NAMESPACE::exchange( rhs.m_deviceMemory, {} ) ) {} DeviceMemory & operator=( DeviceMemory && rhs ) VULKAN_HPP_NOEXCEPT { m_deviceMemory = VULKAN_HPP_NAMESPACE::exchange( rhs.m_deviceMemory, {} ); return *this; } #endif VULKAN_HPP_CONSTEXPR DeviceMemory( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} VULKAN_HPP_TYPESAFE_EXPLICIT DeviceMemory( VkDeviceMemory deviceMemory ) VULKAN_HPP_NOEXCEPT : m_deviceMemory( deviceMemory ) {} #if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 ) DeviceMemory & operator=( VkDeviceMemory deviceMemory ) VULKAN_HPP_NOEXCEPT { m_deviceMemory = deviceMemory; return *this; } #endif DeviceMemory & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT { m_deviceMemory = {}; return *this; } VULKAN_HPP_TYPESAFE_EXPLICIT operator VkDeviceMemory() const VULKAN_HPP_NOEXCEPT { return m_deviceMemory; } explicit operator bool() const VULKAN_HPP_NOEXCEPT { return m_deviceMemory != VK_NULL_HANDLE; } bool operator!() const VULKAN_HPP_NOEXCEPT { return m_deviceMemory == VK_NULL_HANDLE; } private: VkDeviceMemory m_deviceMemory = {}; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::DeviceMemory; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::DeviceMemory; }; #if ( VK_USE_64_BIT_PTR_DEFINES == 1 ) template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::DeviceMemory; }; #endif template <> struct isVulkanHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; class VideoSessionKHR { public: using CType = VkVideoSessionKHR; using NativeType = VkVideoSessionKHR; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eVideoSessionKHR; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eUnknown; public: VideoSessionKHR() VULKAN_HPP_NOEXCEPT{}; // = default - try to workaround a compiler issue VideoSessionKHR( VideoSessionKHR const & rhs ) = default; VideoSessionKHR & operator=( VideoSessionKHR const & rhs ) = default; #if !defined( VULKAN_HPP_HANDLES_MOVE_EXCHANGE ) VideoSessionKHR( VideoSessionKHR && rhs ) = default; VideoSessionKHR & operator=( VideoSessionKHR && rhs ) = default; #else VideoSessionKHR( VideoSessionKHR && rhs ) VULKAN_HPP_NOEXCEPT : m_videoSessionKHR( VULKAN_HPP_NAMESPACE::exchange( rhs.m_videoSessionKHR, {} ) ) {} VideoSessionKHR & operator=( VideoSessionKHR && rhs ) VULKAN_HPP_NOEXCEPT { m_videoSessionKHR = VULKAN_HPP_NAMESPACE::exchange( rhs.m_videoSessionKHR, {} ); return *this; } #endif VULKAN_HPP_CONSTEXPR VideoSessionKHR( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} VULKAN_HPP_TYPESAFE_EXPLICIT VideoSessionKHR( VkVideoSessionKHR videoSessionKHR ) VULKAN_HPP_NOEXCEPT : m_videoSessionKHR( videoSessionKHR ) {} #if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 ) VideoSessionKHR & operator=( VkVideoSessionKHR videoSessionKHR ) VULKAN_HPP_NOEXCEPT { m_videoSessionKHR = videoSessionKHR; return *this; } #endif VideoSessionKHR & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT { m_videoSessionKHR = {}; return *this; } VULKAN_HPP_TYPESAFE_EXPLICIT operator VkVideoSessionKHR() const VULKAN_HPP_NOEXCEPT { return m_videoSessionKHR; } explicit operator bool() const VULKAN_HPP_NOEXCEPT { return m_videoSessionKHR != VK_NULL_HANDLE; } bool operator!() const VULKAN_HPP_NOEXCEPT { return m_videoSessionKHR == VK_NULL_HANDLE; } private: VkVideoSessionKHR m_videoSessionKHR = {}; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::VideoSessionKHR; }; #if ( VK_USE_64_BIT_PTR_DEFINES == 1 ) template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::VideoSessionKHR; }; #endif template <> struct isVulkanHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; class DeferredOperationKHR { public: using CType = VkDeferredOperationKHR; using NativeType = VkDeferredOperationKHR; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eDeferredOperationKHR; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eUnknown; public: DeferredOperationKHR() VULKAN_HPP_NOEXCEPT{}; // = default - try to workaround a compiler issue DeferredOperationKHR( DeferredOperationKHR const & rhs ) = default; DeferredOperationKHR & operator=( DeferredOperationKHR const & rhs ) = default; #if !defined( VULKAN_HPP_HANDLES_MOVE_EXCHANGE ) DeferredOperationKHR( DeferredOperationKHR && rhs ) = default; DeferredOperationKHR & operator=( DeferredOperationKHR && rhs ) = default; #else DeferredOperationKHR( DeferredOperationKHR && rhs ) VULKAN_HPP_NOEXCEPT : m_deferredOperationKHR( VULKAN_HPP_NAMESPACE::exchange( rhs.m_deferredOperationKHR, {} ) ) { } DeferredOperationKHR & operator=( DeferredOperationKHR && rhs ) VULKAN_HPP_NOEXCEPT { m_deferredOperationKHR = VULKAN_HPP_NAMESPACE::exchange( rhs.m_deferredOperationKHR, {} ); return *this; } #endif VULKAN_HPP_CONSTEXPR DeferredOperationKHR( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} VULKAN_HPP_TYPESAFE_EXPLICIT DeferredOperationKHR( VkDeferredOperationKHR deferredOperationKHR ) VULKAN_HPP_NOEXCEPT : m_deferredOperationKHR( deferredOperationKHR ) { } #if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 ) DeferredOperationKHR & operator=( VkDeferredOperationKHR deferredOperationKHR ) VULKAN_HPP_NOEXCEPT { m_deferredOperationKHR = deferredOperationKHR; return *this; } #endif DeferredOperationKHR & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT { m_deferredOperationKHR = {}; return *this; } VULKAN_HPP_TYPESAFE_EXPLICIT operator VkDeferredOperationKHR() const VULKAN_HPP_NOEXCEPT { return m_deferredOperationKHR; } explicit operator bool() const VULKAN_HPP_NOEXCEPT { return m_deferredOperationKHR != VK_NULL_HANDLE; } bool operator!() const VULKAN_HPP_NOEXCEPT { return m_deferredOperationKHR == VK_NULL_HANDLE; } private: VkDeferredOperationKHR m_deferredOperationKHR = {}; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::DeferredOperationKHR; }; #if ( VK_USE_64_BIT_PTR_DEFINES == 1 ) template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::DeferredOperationKHR; }; #endif template <> struct isVulkanHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; #if defined( VK_USE_PLATFORM_FUCHSIA ) class BufferCollectionFUCHSIA { public: using CType = VkBufferCollectionFUCHSIA; using NativeType = VkBufferCollectionFUCHSIA; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eBufferCollectionFUCHSIA; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eBufferCollectionFUCHSIA; public: BufferCollectionFUCHSIA() VULKAN_HPP_NOEXCEPT{}; // = default - try to workaround a compiler issue BufferCollectionFUCHSIA( BufferCollectionFUCHSIA const & rhs ) = default; BufferCollectionFUCHSIA & operator=( BufferCollectionFUCHSIA const & rhs ) = default; # if !defined( VULKAN_HPP_HANDLES_MOVE_EXCHANGE ) BufferCollectionFUCHSIA( BufferCollectionFUCHSIA && rhs ) = default; BufferCollectionFUCHSIA & operator=( BufferCollectionFUCHSIA && rhs ) = default; # else BufferCollectionFUCHSIA( BufferCollectionFUCHSIA && rhs ) VULKAN_HPP_NOEXCEPT : m_bufferCollectionFUCHSIA( VULKAN_HPP_NAMESPACE::exchange( rhs.m_bufferCollectionFUCHSIA, {} ) ) { } BufferCollectionFUCHSIA & operator=( BufferCollectionFUCHSIA && rhs ) VULKAN_HPP_NOEXCEPT { m_bufferCollectionFUCHSIA = VULKAN_HPP_NAMESPACE::exchange( rhs.m_bufferCollectionFUCHSIA, {} ); return *this; } # endif VULKAN_HPP_CONSTEXPR BufferCollectionFUCHSIA( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} VULKAN_HPP_TYPESAFE_EXPLICIT BufferCollectionFUCHSIA( VkBufferCollectionFUCHSIA bufferCollectionFUCHSIA ) VULKAN_HPP_NOEXCEPT : m_bufferCollectionFUCHSIA( bufferCollectionFUCHSIA ) { } # if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 ) BufferCollectionFUCHSIA & operator=( VkBufferCollectionFUCHSIA bufferCollectionFUCHSIA ) VULKAN_HPP_NOEXCEPT { m_bufferCollectionFUCHSIA = bufferCollectionFUCHSIA; return *this; } # endif BufferCollectionFUCHSIA & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT { m_bufferCollectionFUCHSIA = {}; return *this; } VULKAN_HPP_TYPESAFE_EXPLICIT operator VkBufferCollectionFUCHSIA() const VULKAN_HPP_NOEXCEPT { return m_bufferCollectionFUCHSIA; } explicit operator bool() const VULKAN_HPP_NOEXCEPT { return m_bufferCollectionFUCHSIA != VK_NULL_HANDLE; } bool operator!() const VULKAN_HPP_NOEXCEPT { return m_bufferCollectionFUCHSIA == VK_NULL_HANDLE; } private: VkBufferCollectionFUCHSIA m_bufferCollectionFUCHSIA = {}; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::BufferCollectionFUCHSIA; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::BufferCollectionFUCHSIA; }; # if ( VK_USE_64_BIT_PTR_DEFINES == 1 ) template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::BufferCollectionFUCHSIA; }; # endif template <> struct isVulkanHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; #endif /*VK_USE_PLATFORM_FUCHSIA*/ class BufferView { public: using CType = VkBufferView; using NativeType = VkBufferView; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eBufferView; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eBufferView; public: BufferView() VULKAN_HPP_NOEXCEPT{}; // = default - try to workaround a compiler issue BufferView( BufferView const & rhs ) = default; BufferView & operator=( BufferView const & rhs ) = default; #if !defined( VULKAN_HPP_HANDLES_MOVE_EXCHANGE ) BufferView( BufferView && rhs ) = default; BufferView & operator=( BufferView && rhs ) = default; #else BufferView( BufferView && rhs ) VULKAN_HPP_NOEXCEPT : m_bufferView( VULKAN_HPP_NAMESPACE::exchange( rhs.m_bufferView, {} ) ) {} BufferView & operator=( BufferView && rhs ) VULKAN_HPP_NOEXCEPT { m_bufferView = VULKAN_HPP_NAMESPACE::exchange( rhs.m_bufferView, {} ); return *this; } #endif VULKAN_HPP_CONSTEXPR BufferView( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} VULKAN_HPP_TYPESAFE_EXPLICIT BufferView( VkBufferView bufferView ) VULKAN_HPP_NOEXCEPT : m_bufferView( bufferView ) {} #if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 ) BufferView & operator=( VkBufferView bufferView ) VULKAN_HPP_NOEXCEPT { m_bufferView = bufferView; return *this; } #endif BufferView & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT { m_bufferView = {}; return *this; } VULKAN_HPP_TYPESAFE_EXPLICIT operator VkBufferView() const VULKAN_HPP_NOEXCEPT { return m_bufferView; } explicit operator bool() const VULKAN_HPP_NOEXCEPT { return m_bufferView != VK_NULL_HANDLE; } bool operator!() const VULKAN_HPP_NOEXCEPT { return m_bufferView == VK_NULL_HANDLE; } private: VkBufferView m_bufferView = {}; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::BufferView; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::BufferView; }; #if ( VK_USE_64_BIT_PTR_DEFINES == 1 ) template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::BufferView; }; #endif template <> struct isVulkanHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; class CommandPool { public: using CType = VkCommandPool; using NativeType = VkCommandPool; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eCommandPool; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eCommandPool; public: CommandPool() VULKAN_HPP_NOEXCEPT{}; // = default - try to workaround a compiler issue CommandPool( CommandPool const & rhs ) = default; CommandPool & operator=( CommandPool const & rhs ) = default; #if !defined( VULKAN_HPP_HANDLES_MOVE_EXCHANGE ) CommandPool( CommandPool && rhs ) = default; CommandPool & operator=( CommandPool && rhs ) = default; #else CommandPool( CommandPool && rhs ) VULKAN_HPP_NOEXCEPT : m_commandPool( VULKAN_HPP_NAMESPACE::exchange( rhs.m_commandPool, {} ) ) {} CommandPool & operator=( CommandPool && rhs ) VULKAN_HPP_NOEXCEPT { m_commandPool = VULKAN_HPP_NAMESPACE::exchange( rhs.m_commandPool, {} ); return *this; } #endif VULKAN_HPP_CONSTEXPR CommandPool( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} VULKAN_HPP_TYPESAFE_EXPLICIT CommandPool( VkCommandPool commandPool ) VULKAN_HPP_NOEXCEPT : m_commandPool( commandPool ) {} #if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 ) CommandPool & operator=( VkCommandPool commandPool ) VULKAN_HPP_NOEXCEPT { m_commandPool = commandPool; return *this; } #endif CommandPool & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT { m_commandPool = {}; return *this; } VULKAN_HPP_TYPESAFE_EXPLICIT operator VkCommandPool() const VULKAN_HPP_NOEXCEPT { return m_commandPool; } explicit operator bool() const VULKAN_HPP_NOEXCEPT { return m_commandPool != VK_NULL_HANDLE; } bool operator!() const VULKAN_HPP_NOEXCEPT { return m_commandPool == VK_NULL_HANDLE; } private: VkCommandPool m_commandPool = {}; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::CommandPool; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::CommandPool; }; #if ( VK_USE_64_BIT_PTR_DEFINES == 1 ) template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::CommandPool; }; #endif template <> struct isVulkanHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; class PipelineCache { public: using CType = VkPipelineCache; using NativeType = VkPipelineCache; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::ePipelineCache; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::ePipelineCache; public: PipelineCache() VULKAN_HPP_NOEXCEPT{}; // = default - try to workaround a compiler issue PipelineCache( PipelineCache const & rhs ) = default; PipelineCache & operator=( PipelineCache const & rhs ) = default; #if !defined( VULKAN_HPP_HANDLES_MOVE_EXCHANGE ) PipelineCache( PipelineCache && rhs ) = default; PipelineCache & operator=( PipelineCache && rhs ) = default; #else PipelineCache( PipelineCache && rhs ) VULKAN_HPP_NOEXCEPT : m_pipelineCache( VULKAN_HPP_NAMESPACE::exchange( rhs.m_pipelineCache, {} ) ) {} PipelineCache & operator=( PipelineCache && rhs ) VULKAN_HPP_NOEXCEPT { m_pipelineCache = VULKAN_HPP_NAMESPACE::exchange( rhs.m_pipelineCache, {} ); return *this; } #endif VULKAN_HPP_CONSTEXPR PipelineCache( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} VULKAN_HPP_TYPESAFE_EXPLICIT PipelineCache( VkPipelineCache pipelineCache ) VULKAN_HPP_NOEXCEPT : m_pipelineCache( pipelineCache ) {} #if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 ) PipelineCache & operator=( VkPipelineCache pipelineCache ) VULKAN_HPP_NOEXCEPT { m_pipelineCache = pipelineCache; return *this; } #endif PipelineCache & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT { m_pipelineCache = {}; return *this; } VULKAN_HPP_TYPESAFE_EXPLICIT operator VkPipelineCache() const VULKAN_HPP_NOEXCEPT { return m_pipelineCache; } explicit operator bool() const VULKAN_HPP_NOEXCEPT { return m_pipelineCache != VK_NULL_HANDLE; } bool operator!() const VULKAN_HPP_NOEXCEPT { return m_pipelineCache == VK_NULL_HANDLE; } private: VkPipelineCache m_pipelineCache = {}; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::PipelineCache; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::PipelineCache; }; #if ( VK_USE_64_BIT_PTR_DEFINES == 1 ) template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::PipelineCache; }; #endif template <> struct isVulkanHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; class CuFunctionNVX { public: using CType = VkCuFunctionNVX; using NativeType = VkCuFunctionNVX; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eCuFunctionNVX; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eCuFunctionNVX; public: CuFunctionNVX() VULKAN_HPP_NOEXCEPT{}; // = default - try to workaround a compiler issue CuFunctionNVX( CuFunctionNVX const & rhs ) = default; CuFunctionNVX & operator=( CuFunctionNVX const & rhs ) = default; #if !defined( VULKAN_HPP_HANDLES_MOVE_EXCHANGE ) CuFunctionNVX( CuFunctionNVX && rhs ) = default; CuFunctionNVX & operator=( CuFunctionNVX && rhs ) = default; #else CuFunctionNVX( CuFunctionNVX && rhs ) VULKAN_HPP_NOEXCEPT : m_cuFunctionNVX( VULKAN_HPP_NAMESPACE::exchange( rhs.m_cuFunctionNVX, {} ) ) {} CuFunctionNVX & operator=( CuFunctionNVX && rhs ) VULKAN_HPP_NOEXCEPT { m_cuFunctionNVX = VULKAN_HPP_NAMESPACE::exchange( rhs.m_cuFunctionNVX, {} ); return *this; } #endif VULKAN_HPP_CONSTEXPR CuFunctionNVX( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} VULKAN_HPP_TYPESAFE_EXPLICIT CuFunctionNVX( VkCuFunctionNVX cuFunctionNVX ) VULKAN_HPP_NOEXCEPT : m_cuFunctionNVX( cuFunctionNVX ) {} #if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 ) CuFunctionNVX & operator=( VkCuFunctionNVX cuFunctionNVX ) VULKAN_HPP_NOEXCEPT { m_cuFunctionNVX = cuFunctionNVX; return *this; } #endif CuFunctionNVX & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT { m_cuFunctionNVX = {}; return *this; } VULKAN_HPP_TYPESAFE_EXPLICIT operator VkCuFunctionNVX() const VULKAN_HPP_NOEXCEPT { return m_cuFunctionNVX; } explicit operator bool() const VULKAN_HPP_NOEXCEPT { return m_cuFunctionNVX != VK_NULL_HANDLE; } bool operator!() const VULKAN_HPP_NOEXCEPT { return m_cuFunctionNVX == VK_NULL_HANDLE; } private: VkCuFunctionNVX m_cuFunctionNVX = {}; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::CuFunctionNVX; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::CuFunctionNVX; }; #if ( VK_USE_64_BIT_PTR_DEFINES == 1 ) template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::CuFunctionNVX; }; #endif template <> struct isVulkanHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; class CuModuleNVX { public: using CType = VkCuModuleNVX; using NativeType = VkCuModuleNVX; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eCuModuleNVX; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eCuModuleNVX; public: CuModuleNVX() VULKAN_HPP_NOEXCEPT{}; // = default - try to workaround a compiler issue CuModuleNVX( CuModuleNVX const & rhs ) = default; CuModuleNVX & operator=( CuModuleNVX const & rhs ) = default; #if !defined( VULKAN_HPP_HANDLES_MOVE_EXCHANGE ) CuModuleNVX( CuModuleNVX && rhs ) = default; CuModuleNVX & operator=( CuModuleNVX && rhs ) = default; #else CuModuleNVX( CuModuleNVX && rhs ) VULKAN_HPP_NOEXCEPT : m_cuModuleNVX( VULKAN_HPP_NAMESPACE::exchange( rhs.m_cuModuleNVX, {} ) ) {} CuModuleNVX & operator=( CuModuleNVX && rhs ) VULKAN_HPP_NOEXCEPT { m_cuModuleNVX = VULKAN_HPP_NAMESPACE::exchange( rhs.m_cuModuleNVX, {} ); return *this; } #endif VULKAN_HPP_CONSTEXPR CuModuleNVX( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} VULKAN_HPP_TYPESAFE_EXPLICIT CuModuleNVX( VkCuModuleNVX cuModuleNVX ) VULKAN_HPP_NOEXCEPT : m_cuModuleNVX( cuModuleNVX ) {} #if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 ) CuModuleNVX & operator=( VkCuModuleNVX cuModuleNVX ) VULKAN_HPP_NOEXCEPT { m_cuModuleNVX = cuModuleNVX; return *this; } #endif CuModuleNVX & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT { m_cuModuleNVX = {}; return *this; } VULKAN_HPP_TYPESAFE_EXPLICIT operator VkCuModuleNVX() const VULKAN_HPP_NOEXCEPT { return m_cuModuleNVX; } explicit operator bool() const VULKAN_HPP_NOEXCEPT { return m_cuModuleNVX != VK_NULL_HANDLE; } bool operator!() const VULKAN_HPP_NOEXCEPT { return m_cuModuleNVX == VK_NULL_HANDLE; } private: VkCuModuleNVX m_cuModuleNVX = {}; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::CuModuleNVX; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::CuModuleNVX; }; #if ( VK_USE_64_BIT_PTR_DEFINES == 1 ) template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::CuModuleNVX; }; #endif template <> struct isVulkanHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; #if defined( VK_ENABLE_BETA_EXTENSIONS ) class CudaFunctionNV { public: using CType = VkCudaFunctionNV; using NativeType = VkCudaFunctionNV; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eCudaFunctionNV; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eCudaFunctionNV; public: CudaFunctionNV() VULKAN_HPP_NOEXCEPT{}; // = default - try to workaround a compiler issue CudaFunctionNV( CudaFunctionNV const & rhs ) = default; CudaFunctionNV & operator=( CudaFunctionNV const & rhs ) = default; # if !defined( VULKAN_HPP_HANDLES_MOVE_EXCHANGE ) CudaFunctionNV( CudaFunctionNV && rhs ) = default; CudaFunctionNV & operator=( CudaFunctionNV && rhs ) = default; # else CudaFunctionNV( CudaFunctionNV && rhs ) VULKAN_HPP_NOEXCEPT : m_cudaFunctionNV( VULKAN_HPP_NAMESPACE::exchange( rhs.m_cudaFunctionNV, {} ) ) {} CudaFunctionNV & operator=( CudaFunctionNV && rhs ) VULKAN_HPP_NOEXCEPT { m_cudaFunctionNV = VULKAN_HPP_NAMESPACE::exchange( rhs.m_cudaFunctionNV, {} ); return *this; } # endif VULKAN_HPP_CONSTEXPR CudaFunctionNV( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} VULKAN_HPP_TYPESAFE_EXPLICIT CudaFunctionNV( VkCudaFunctionNV cudaFunctionNV ) VULKAN_HPP_NOEXCEPT : m_cudaFunctionNV( cudaFunctionNV ) {} # if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 ) CudaFunctionNV & operator=( VkCudaFunctionNV cudaFunctionNV ) VULKAN_HPP_NOEXCEPT { m_cudaFunctionNV = cudaFunctionNV; return *this; } # endif CudaFunctionNV & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT { m_cudaFunctionNV = {}; return *this; } VULKAN_HPP_TYPESAFE_EXPLICIT operator VkCudaFunctionNV() const VULKAN_HPP_NOEXCEPT { return m_cudaFunctionNV; } explicit operator bool() const VULKAN_HPP_NOEXCEPT { return m_cudaFunctionNV != VK_NULL_HANDLE; } bool operator!() const VULKAN_HPP_NOEXCEPT { return m_cudaFunctionNV == VK_NULL_HANDLE; } private: VkCudaFunctionNV m_cudaFunctionNV = {}; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::CudaFunctionNV; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::CudaFunctionNV; }; # if ( VK_USE_64_BIT_PTR_DEFINES == 1 ) template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::CudaFunctionNV; }; # endif template <> struct isVulkanHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; #endif /*VK_ENABLE_BETA_EXTENSIONS*/ #if defined( VK_ENABLE_BETA_EXTENSIONS ) class CudaModuleNV { public: using CType = VkCudaModuleNV; using NativeType = VkCudaModuleNV; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eCudaModuleNV; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eCudaModuleNV; public: CudaModuleNV() VULKAN_HPP_NOEXCEPT{}; // = default - try to workaround a compiler issue CudaModuleNV( CudaModuleNV const & rhs ) = default; CudaModuleNV & operator=( CudaModuleNV const & rhs ) = default; # if !defined( VULKAN_HPP_HANDLES_MOVE_EXCHANGE ) CudaModuleNV( CudaModuleNV && rhs ) = default; CudaModuleNV & operator=( CudaModuleNV && rhs ) = default; # else CudaModuleNV( CudaModuleNV && rhs ) VULKAN_HPP_NOEXCEPT : m_cudaModuleNV( VULKAN_HPP_NAMESPACE::exchange( rhs.m_cudaModuleNV, {} ) ) {} CudaModuleNV & operator=( CudaModuleNV && rhs ) VULKAN_HPP_NOEXCEPT { m_cudaModuleNV = VULKAN_HPP_NAMESPACE::exchange( rhs.m_cudaModuleNV, {} ); return *this; } # endif VULKAN_HPP_CONSTEXPR CudaModuleNV( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} VULKAN_HPP_TYPESAFE_EXPLICIT CudaModuleNV( VkCudaModuleNV cudaModuleNV ) VULKAN_HPP_NOEXCEPT : m_cudaModuleNV( cudaModuleNV ) {} # if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 ) CudaModuleNV & operator=( VkCudaModuleNV cudaModuleNV ) VULKAN_HPP_NOEXCEPT { m_cudaModuleNV = cudaModuleNV; return *this; } # endif CudaModuleNV & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT { m_cudaModuleNV = {}; return *this; } VULKAN_HPP_TYPESAFE_EXPLICIT operator VkCudaModuleNV() const VULKAN_HPP_NOEXCEPT { return m_cudaModuleNV; } explicit operator bool() const VULKAN_HPP_NOEXCEPT { return m_cudaModuleNV != VK_NULL_HANDLE; } bool operator!() const VULKAN_HPP_NOEXCEPT { return m_cudaModuleNV == VK_NULL_HANDLE; } private: VkCudaModuleNV m_cudaModuleNV = {}; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::CudaModuleNV; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::CudaModuleNV; }; # if ( VK_USE_64_BIT_PTR_DEFINES == 1 ) template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::CudaModuleNV; }; # endif template <> struct isVulkanHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; #endif /*VK_ENABLE_BETA_EXTENSIONS*/ class DescriptorPool { public: using CType = VkDescriptorPool; using NativeType = VkDescriptorPool; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eDescriptorPool; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eDescriptorPool; public: DescriptorPool() VULKAN_HPP_NOEXCEPT{}; // = default - try to workaround a compiler issue DescriptorPool( DescriptorPool const & rhs ) = default; DescriptorPool & operator=( DescriptorPool const & rhs ) = default; #if !defined( VULKAN_HPP_HANDLES_MOVE_EXCHANGE ) DescriptorPool( DescriptorPool && rhs ) = default; DescriptorPool & operator=( DescriptorPool && rhs ) = default; #else DescriptorPool( DescriptorPool && rhs ) VULKAN_HPP_NOEXCEPT : m_descriptorPool( VULKAN_HPP_NAMESPACE::exchange( rhs.m_descriptorPool, {} ) ) {} DescriptorPool & operator=( DescriptorPool && rhs ) VULKAN_HPP_NOEXCEPT { m_descriptorPool = VULKAN_HPP_NAMESPACE::exchange( rhs.m_descriptorPool, {} ); return *this; } #endif VULKAN_HPP_CONSTEXPR DescriptorPool( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} VULKAN_HPP_TYPESAFE_EXPLICIT DescriptorPool( VkDescriptorPool descriptorPool ) VULKAN_HPP_NOEXCEPT : m_descriptorPool( descriptorPool ) {} #if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 ) DescriptorPool & operator=( VkDescriptorPool descriptorPool ) VULKAN_HPP_NOEXCEPT { m_descriptorPool = descriptorPool; return *this; } #endif DescriptorPool & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT { m_descriptorPool = {}; return *this; } VULKAN_HPP_TYPESAFE_EXPLICIT operator VkDescriptorPool() const VULKAN_HPP_NOEXCEPT { return m_descriptorPool; } explicit operator bool() const VULKAN_HPP_NOEXCEPT { return m_descriptorPool != VK_NULL_HANDLE; } bool operator!() const VULKAN_HPP_NOEXCEPT { return m_descriptorPool == VK_NULL_HANDLE; } private: VkDescriptorPool m_descriptorPool = {}; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::DescriptorPool; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::DescriptorPool; }; #if ( VK_USE_64_BIT_PTR_DEFINES == 1 ) template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::DescriptorPool; }; #endif template <> struct isVulkanHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; class DescriptorSetLayout { public: using CType = VkDescriptorSetLayout; using NativeType = VkDescriptorSetLayout; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eDescriptorSetLayout; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eDescriptorSetLayout; public: DescriptorSetLayout() VULKAN_HPP_NOEXCEPT{}; // = default - try to workaround a compiler issue DescriptorSetLayout( DescriptorSetLayout const & rhs ) = default; DescriptorSetLayout & operator=( DescriptorSetLayout const & rhs ) = default; #if !defined( VULKAN_HPP_HANDLES_MOVE_EXCHANGE ) DescriptorSetLayout( DescriptorSetLayout && rhs ) = default; DescriptorSetLayout & operator=( DescriptorSetLayout && rhs ) = default; #else DescriptorSetLayout( DescriptorSetLayout && rhs ) VULKAN_HPP_NOEXCEPT : m_descriptorSetLayout( VULKAN_HPP_NAMESPACE::exchange( rhs.m_descriptorSetLayout, {} ) ) { } DescriptorSetLayout & operator=( DescriptorSetLayout && rhs ) VULKAN_HPP_NOEXCEPT { m_descriptorSetLayout = VULKAN_HPP_NAMESPACE::exchange( rhs.m_descriptorSetLayout, {} ); return *this; } #endif VULKAN_HPP_CONSTEXPR DescriptorSetLayout( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} VULKAN_HPP_TYPESAFE_EXPLICIT DescriptorSetLayout( VkDescriptorSetLayout descriptorSetLayout ) VULKAN_HPP_NOEXCEPT : m_descriptorSetLayout( descriptorSetLayout ) { } #if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 ) DescriptorSetLayout & operator=( VkDescriptorSetLayout descriptorSetLayout ) VULKAN_HPP_NOEXCEPT { m_descriptorSetLayout = descriptorSetLayout; return *this; } #endif DescriptorSetLayout & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT { m_descriptorSetLayout = {}; return *this; } VULKAN_HPP_TYPESAFE_EXPLICIT operator VkDescriptorSetLayout() const VULKAN_HPP_NOEXCEPT { return m_descriptorSetLayout; } explicit operator bool() const VULKAN_HPP_NOEXCEPT { return m_descriptorSetLayout != VK_NULL_HANDLE; } bool operator!() const VULKAN_HPP_NOEXCEPT { return m_descriptorSetLayout == VK_NULL_HANDLE; } private: VkDescriptorSetLayout m_descriptorSetLayout = {}; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::DescriptorSetLayout; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::DescriptorSetLayout; }; #if ( VK_USE_64_BIT_PTR_DEFINES == 1 ) template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::DescriptorSetLayout; }; #endif template <> struct isVulkanHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; class Framebuffer { public: using CType = VkFramebuffer; using NativeType = VkFramebuffer; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eFramebuffer; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eFramebuffer; public: Framebuffer() VULKAN_HPP_NOEXCEPT{}; // = default - try to workaround a compiler issue Framebuffer( Framebuffer const & rhs ) = default; Framebuffer & operator=( Framebuffer const & rhs ) = default; #if !defined( VULKAN_HPP_HANDLES_MOVE_EXCHANGE ) Framebuffer( Framebuffer && rhs ) = default; Framebuffer & operator=( Framebuffer && rhs ) = default; #else Framebuffer( Framebuffer && rhs ) VULKAN_HPP_NOEXCEPT : m_framebuffer( VULKAN_HPP_NAMESPACE::exchange( rhs.m_framebuffer, {} ) ) {} Framebuffer & operator=( Framebuffer && rhs ) VULKAN_HPP_NOEXCEPT { m_framebuffer = VULKAN_HPP_NAMESPACE::exchange( rhs.m_framebuffer, {} ); return *this; } #endif VULKAN_HPP_CONSTEXPR Framebuffer( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} VULKAN_HPP_TYPESAFE_EXPLICIT Framebuffer( VkFramebuffer framebuffer ) VULKAN_HPP_NOEXCEPT : m_framebuffer( framebuffer ) {} #if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 ) Framebuffer & operator=( VkFramebuffer framebuffer ) VULKAN_HPP_NOEXCEPT { m_framebuffer = framebuffer; return *this; } #endif Framebuffer & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT { m_framebuffer = {}; return *this; } VULKAN_HPP_TYPESAFE_EXPLICIT operator VkFramebuffer() const VULKAN_HPP_NOEXCEPT { return m_framebuffer; } explicit operator bool() const VULKAN_HPP_NOEXCEPT { return m_framebuffer != VK_NULL_HANDLE; } bool operator!() const VULKAN_HPP_NOEXCEPT { return m_framebuffer == VK_NULL_HANDLE; } private: VkFramebuffer m_framebuffer = {}; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::Framebuffer; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::Framebuffer; }; #if ( VK_USE_64_BIT_PTR_DEFINES == 1 ) template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::Framebuffer; }; #endif template <> struct isVulkanHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; class IndirectCommandsLayoutEXT { public: using CType = VkIndirectCommandsLayoutEXT; using NativeType = VkIndirectCommandsLayoutEXT; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eIndirectCommandsLayoutEXT; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eUnknown; public: IndirectCommandsLayoutEXT() VULKAN_HPP_NOEXCEPT{}; // = default - try to workaround a compiler issue IndirectCommandsLayoutEXT( IndirectCommandsLayoutEXT const & rhs ) = default; IndirectCommandsLayoutEXT & operator=( IndirectCommandsLayoutEXT const & rhs ) = default; #if !defined( VULKAN_HPP_HANDLES_MOVE_EXCHANGE ) IndirectCommandsLayoutEXT( IndirectCommandsLayoutEXT && rhs ) = default; IndirectCommandsLayoutEXT & operator=( IndirectCommandsLayoutEXT && rhs ) = default; #else IndirectCommandsLayoutEXT( IndirectCommandsLayoutEXT && rhs ) VULKAN_HPP_NOEXCEPT : m_indirectCommandsLayoutEXT( VULKAN_HPP_NAMESPACE::exchange( rhs.m_indirectCommandsLayoutEXT, {} ) ) { } IndirectCommandsLayoutEXT & operator=( IndirectCommandsLayoutEXT && rhs ) VULKAN_HPP_NOEXCEPT { m_indirectCommandsLayoutEXT = VULKAN_HPP_NAMESPACE::exchange( rhs.m_indirectCommandsLayoutEXT, {} ); return *this; } #endif VULKAN_HPP_CONSTEXPR IndirectCommandsLayoutEXT( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} VULKAN_HPP_TYPESAFE_EXPLICIT IndirectCommandsLayoutEXT( VkIndirectCommandsLayoutEXT indirectCommandsLayoutEXT ) VULKAN_HPP_NOEXCEPT : m_indirectCommandsLayoutEXT( indirectCommandsLayoutEXT ) { } #if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 ) IndirectCommandsLayoutEXT & operator=( VkIndirectCommandsLayoutEXT indirectCommandsLayoutEXT ) VULKAN_HPP_NOEXCEPT { m_indirectCommandsLayoutEXT = indirectCommandsLayoutEXT; return *this; } #endif IndirectCommandsLayoutEXT & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT { m_indirectCommandsLayoutEXT = {}; return *this; } VULKAN_HPP_TYPESAFE_EXPLICIT operator VkIndirectCommandsLayoutEXT() const VULKAN_HPP_NOEXCEPT { return m_indirectCommandsLayoutEXT; } explicit operator bool() const VULKAN_HPP_NOEXCEPT { return m_indirectCommandsLayoutEXT != VK_NULL_HANDLE; } bool operator!() const VULKAN_HPP_NOEXCEPT { return m_indirectCommandsLayoutEXT == VK_NULL_HANDLE; } private: VkIndirectCommandsLayoutEXT m_indirectCommandsLayoutEXT = {}; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutEXT; }; #if ( VK_USE_64_BIT_PTR_DEFINES == 1 ) template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutEXT; }; #endif template <> struct isVulkanHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; class IndirectCommandsLayoutNV { public: using CType = VkIndirectCommandsLayoutNV; using NativeType = VkIndirectCommandsLayoutNV; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eIndirectCommandsLayoutNV; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eUnknown; public: IndirectCommandsLayoutNV() VULKAN_HPP_NOEXCEPT{}; // = default - try to workaround a compiler issue IndirectCommandsLayoutNV( IndirectCommandsLayoutNV const & rhs ) = default; IndirectCommandsLayoutNV & operator=( IndirectCommandsLayoutNV const & rhs ) = default; #if !defined( VULKAN_HPP_HANDLES_MOVE_EXCHANGE ) IndirectCommandsLayoutNV( IndirectCommandsLayoutNV && rhs ) = default; IndirectCommandsLayoutNV & operator=( IndirectCommandsLayoutNV && rhs ) = default; #else IndirectCommandsLayoutNV( IndirectCommandsLayoutNV && rhs ) VULKAN_HPP_NOEXCEPT : m_indirectCommandsLayoutNV( VULKAN_HPP_NAMESPACE::exchange( rhs.m_indirectCommandsLayoutNV, {} ) ) { } IndirectCommandsLayoutNV & operator=( IndirectCommandsLayoutNV && rhs ) VULKAN_HPP_NOEXCEPT { m_indirectCommandsLayoutNV = VULKAN_HPP_NAMESPACE::exchange( rhs.m_indirectCommandsLayoutNV, {} ); return *this; } #endif VULKAN_HPP_CONSTEXPR IndirectCommandsLayoutNV( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} VULKAN_HPP_TYPESAFE_EXPLICIT IndirectCommandsLayoutNV( VkIndirectCommandsLayoutNV indirectCommandsLayoutNV ) VULKAN_HPP_NOEXCEPT : m_indirectCommandsLayoutNV( indirectCommandsLayoutNV ) { } #if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 ) IndirectCommandsLayoutNV & operator=( VkIndirectCommandsLayoutNV indirectCommandsLayoutNV ) VULKAN_HPP_NOEXCEPT { m_indirectCommandsLayoutNV = indirectCommandsLayoutNV; return *this; } #endif IndirectCommandsLayoutNV & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT { m_indirectCommandsLayoutNV = {}; return *this; } VULKAN_HPP_TYPESAFE_EXPLICIT operator VkIndirectCommandsLayoutNV() const VULKAN_HPP_NOEXCEPT { return m_indirectCommandsLayoutNV; } explicit operator bool() const VULKAN_HPP_NOEXCEPT { return m_indirectCommandsLayoutNV != VK_NULL_HANDLE; } bool operator!() const VULKAN_HPP_NOEXCEPT { return m_indirectCommandsLayoutNV == VK_NULL_HANDLE; } private: VkIndirectCommandsLayoutNV m_indirectCommandsLayoutNV = {}; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNV; }; #if ( VK_USE_64_BIT_PTR_DEFINES == 1 ) template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNV; }; #endif template <> struct isVulkanHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; class IndirectExecutionSetEXT { public: using CType = VkIndirectExecutionSetEXT; using NativeType = VkIndirectExecutionSetEXT; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eIndirectExecutionSetEXT; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eUnknown; public: IndirectExecutionSetEXT() VULKAN_HPP_NOEXCEPT{}; // = default - try to workaround a compiler issue IndirectExecutionSetEXT( IndirectExecutionSetEXT const & rhs ) = default; IndirectExecutionSetEXT & operator=( IndirectExecutionSetEXT const & rhs ) = default; #if !defined( VULKAN_HPP_HANDLES_MOVE_EXCHANGE ) IndirectExecutionSetEXT( IndirectExecutionSetEXT && rhs ) = default; IndirectExecutionSetEXT & operator=( IndirectExecutionSetEXT && rhs ) = default; #else IndirectExecutionSetEXT( IndirectExecutionSetEXT && rhs ) VULKAN_HPP_NOEXCEPT : m_indirectExecutionSetEXT( VULKAN_HPP_NAMESPACE::exchange( rhs.m_indirectExecutionSetEXT, {} ) ) { } IndirectExecutionSetEXT & operator=( IndirectExecutionSetEXT && rhs ) VULKAN_HPP_NOEXCEPT { m_indirectExecutionSetEXT = VULKAN_HPP_NAMESPACE::exchange( rhs.m_indirectExecutionSetEXT, {} ); return *this; } #endif VULKAN_HPP_CONSTEXPR IndirectExecutionSetEXT( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} VULKAN_HPP_TYPESAFE_EXPLICIT IndirectExecutionSetEXT( VkIndirectExecutionSetEXT indirectExecutionSetEXT ) VULKAN_HPP_NOEXCEPT : m_indirectExecutionSetEXT( indirectExecutionSetEXT ) { } #if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 ) IndirectExecutionSetEXT & operator=( VkIndirectExecutionSetEXT indirectExecutionSetEXT ) VULKAN_HPP_NOEXCEPT { m_indirectExecutionSetEXT = indirectExecutionSetEXT; return *this; } #endif IndirectExecutionSetEXT & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT { m_indirectExecutionSetEXT = {}; return *this; } VULKAN_HPP_TYPESAFE_EXPLICIT operator VkIndirectExecutionSetEXT() const VULKAN_HPP_NOEXCEPT { return m_indirectExecutionSetEXT; } explicit operator bool() const VULKAN_HPP_NOEXCEPT { return m_indirectExecutionSetEXT != VK_NULL_HANDLE; } bool operator!() const VULKAN_HPP_NOEXCEPT { return m_indirectExecutionSetEXT == VK_NULL_HANDLE; } private: VkIndirectExecutionSetEXT m_indirectExecutionSetEXT = {}; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::IndirectExecutionSetEXT; }; #if ( VK_USE_64_BIT_PTR_DEFINES == 1 ) template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::IndirectExecutionSetEXT; }; #endif template <> struct isVulkanHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; class PrivateDataSlot { public: using CType = VkPrivateDataSlot; using NativeType = VkPrivateDataSlot; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::ePrivateDataSlot; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eUnknown; public: PrivateDataSlot() VULKAN_HPP_NOEXCEPT{}; // = default - try to workaround a compiler issue PrivateDataSlot( PrivateDataSlot const & rhs ) = default; PrivateDataSlot & operator=( PrivateDataSlot const & rhs ) = default; #if !defined( VULKAN_HPP_HANDLES_MOVE_EXCHANGE ) PrivateDataSlot( PrivateDataSlot && rhs ) = default; PrivateDataSlot & operator=( PrivateDataSlot && rhs ) = default; #else PrivateDataSlot( PrivateDataSlot && rhs ) VULKAN_HPP_NOEXCEPT : m_privateDataSlot( VULKAN_HPP_NAMESPACE::exchange( rhs.m_privateDataSlot, {} ) ) {} PrivateDataSlot & operator=( PrivateDataSlot && rhs ) VULKAN_HPP_NOEXCEPT { m_privateDataSlot = VULKAN_HPP_NAMESPACE::exchange( rhs.m_privateDataSlot, {} ); return *this; } #endif VULKAN_HPP_CONSTEXPR PrivateDataSlot( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} VULKAN_HPP_TYPESAFE_EXPLICIT PrivateDataSlot( VkPrivateDataSlot privateDataSlot ) VULKAN_HPP_NOEXCEPT : m_privateDataSlot( privateDataSlot ) {} #if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 ) PrivateDataSlot & operator=( VkPrivateDataSlot privateDataSlot ) VULKAN_HPP_NOEXCEPT { m_privateDataSlot = privateDataSlot; return *this; } #endif PrivateDataSlot & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT { m_privateDataSlot = {}; return *this; } VULKAN_HPP_TYPESAFE_EXPLICIT operator VkPrivateDataSlot() const VULKAN_HPP_NOEXCEPT { return m_privateDataSlot; } explicit operator bool() const VULKAN_HPP_NOEXCEPT { return m_privateDataSlot != VK_NULL_HANDLE; } bool operator!() const VULKAN_HPP_NOEXCEPT { return m_privateDataSlot == VK_NULL_HANDLE; } private: VkPrivateDataSlot m_privateDataSlot = {}; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::PrivateDataSlot; }; #if ( VK_USE_64_BIT_PTR_DEFINES == 1 ) template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::PrivateDataSlot; }; #endif template <> struct isVulkanHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; using PrivateDataSlotEXT = PrivateDataSlot; class RenderPass { public: using CType = VkRenderPass; using NativeType = VkRenderPass; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eRenderPass; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eRenderPass; public: RenderPass() VULKAN_HPP_NOEXCEPT{}; // = default - try to workaround a compiler issue RenderPass( RenderPass const & rhs ) = default; RenderPass & operator=( RenderPass const & rhs ) = default; #if !defined( VULKAN_HPP_HANDLES_MOVE_EXCHANGE ) RenderPass( RenderPass && rhs ) = default; RenderPass & operator=( RenderPass && rhs ) = default; #else RenderPass( RenderPass && rhs ) VULKAN_HPP_NOEXCEPT : m_renderPass( VULKAN_HPP_NAMESPACE::exchange( rhs.m_renderPass, {} ) ) {} RenderPass & operator=( RenderPass && rhs ) VULKAN_HPP_NOEXCEPT { m_renderPass = VULKAN_HPP_NAMESPACE::exchange( rhs.m_renderPass, {} ); return *this; } #endif VULKAN_HPP_CONSTEXPR RenderPass( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} VULKAN_HPP_TYPESAFE_EXPLICIT RenderPass( VkRenderPass renderPass ) VULKAN_HPP_NOEXCEPT : m_renderPass( renderPass ) {} #if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 ) RenderPass & operator=( VkRenderPass renderPass ) VULKAN_HPP_NOEXCEPT { m_renderPass = renderPass; return *this; } #endif RenderPass & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT { m_renderPass = {}; return *this; } VULKAN_HPP_TYPESAFE_EXPLICIT operator VkRenderPass() const VULKAN_HPP_NOEXCEPT { return m_renderPass; } explicit operator bool() const VULKAN_HPP_NOEXCEPT { return m_renderPass != VK_NULL_HANDLE; } bool operator!() const VULKAN_HPP_NOEXCEPT { return m_renderPass == VK_NULL_HANDLE; } private: VkRenderPass m_renderPass = {}; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::RenderPass; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::RenderPass; }; #if ( VK_USE_64_BIT_PTR_DEFINES == 1 ) template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::RenderPass; }; #endif template <> struct isVulkanHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; class Sampler { public: using CType = VkSampler; using NativeType = VkSampler; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eSampler; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eSampler; public: Sampler() VULKAN_HPP_NOEXCEPT{}; // = default - try to workaround a compiler issue Sampler( Sampler const & rhs ) = default; Sampler & operator=( Sampler const & rhs ) = default; #if !defined( VULKAN_HPP_HANDLES_MOVE_EXCHANGE ) Sampler( Sampler && rhs ) = default; Sampler & operator=( Sampler && rhs ) = default; #else Sampler( Sampler && rhs ) VULKAN_HPP_NOEXCEPT : m_sampler( VULKAN_HPP_NAMESPACE::exchange( rhs.m_sampler, {} ) ) {} Sampler & operator=( Sampler && rhs ) VULKAN_HPP_NOEXCEPT { m_sampler = VULKAN_HPP_NAMESPACE::exchange( rhs.m_sampler, {} ); return *this; } #endif VULKAN_HPP_CONSTEXPR Sampler( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} VULKAN_HPP_TYPESAFE_EXPLICIT Sampler( VkSampler sampler ) VULKAN_HPP_NOEXCEPT : m_sampler( sampler ) {} #if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 ) Sampler & operator=( VkSampler sampler ) VULKAN_HPP_NOEXCEPT { m_sampler = sampler; return *this; } #endif Sampler & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT { m_sampler = {}; return *this; } VULKAN_HPP_TYPESAFE_EXPLICIT operator VkSampler() const VULKAN_HPP_NOEXCEPT { return m_sampler; } explicit operator bool() const VULKAN_HPP_NOEXCEPT { return m_sampler != VK_NULL_HANDLE; } bool operator!() const VULKAN_HPP_NOEXCEPT { return m_sampler == VK_NULL_HANDLE; } private: VkSampler m_sampler = {}; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::Sampler; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::Sampler; }; #if ( VK_USE_64_BIT_PTR_DEFINES == 1 ) template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::Sampler; }; #endif template <> struct isVulkanHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; class SamplerYcbcrConversion { public: using CType = VkSamplerYcbcrConversion; using NativeType = VkSamplerYcbcrConversion; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eSamplerYcbcrConversion; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eSamplerYcbcrConversion; public: SamplerYcbcrConversion() VULKAN_HPP_NOEXCEPT{}; // = default - try to workaround a compiler issue SamplerYcbcrConversion( SamplerYcbcrConversion const & rhs ) = default; SamplerYcbcrConversion & operator=( SamplerYcbcrConversion const & rhs ) = default; #if !defined( VULKAN_HPP_HANDLES_MOVE_EXCHANGE ) SamplerYcbcrConversion( SamplerYcbcrConversion && rhs ) = default; SamplerYcbcrConversion & operator=( SamplerYcbcrConversion && rhs ) = default; #else SamplerYcbcrConversion( SamplerYcbcrConversion && rhs ) VULKAN_HPP_NOEXCEPT : m_samplerYcbcrConversion( VULKAN_HPP_NAMESPACE::exchange( rhs.m_samplerYcbcrConversion, {} ) ) { } SamplerYcbcrConversion & operator=( SamplerYcbcrConversion && rhs ) VULKAN_HPP_NOEXCEPT { m_samplerYcbcrConversion = VULKAN_HPP_NAMESPACE::exchange( rhs.m_samplerYcbcrConversion, {} ); return *this; } #endif VULKAN_HPP_CONSTEXPR SamplerYcbcrConversion( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} VULKAN_HPP_TYPESAFE_EXPLICIT SamplerYcbcrConversion( VkSamplerYcbcrConversion samplerYcbcrConversion ) VULKAN_HPP_NOEXCEPT : m_samplerYcbcrConversion( samplerYcbcrConversion ) { } #if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 ) SamplerYcbcrConversion & operator=( VkSamplerYcbcrConversion samplerYcbcrConversion ) VULKAN_HPP_NOEXCEPT { m_samplerYcbcrConversion = samplerYcbcrConversion; return *this; } #endif SamplerYcbcrConversion & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT { m_samplerYcbcrConversion = {}; return *this; } VULKAN_HPP_TYPESAFE_EXPLICIT operator VkSamplerYcbcrConversion() const VULKAN_HPP_NOEXCEPT { return m_samplerYcbcrConversion; } explicit operator bool() const VULKAN_HPP_NOEXCEPT { return m_samplerYcbcrConversion != VK_NULL_HANDLE; } bool operator!() const VULKAN_HPP_NOEXCEPT { return m_samplerYcbcrConversion == VK_NULL_HANDLE; } private: VkSamplerYcbcrConversion m_samplerYcbcrConversion = {}; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion; }; #if ( VK_USE_64_BIT_PTR_DEFINES == 1 ) template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion; }; #endif template <> struct isVulkanHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; using SamplerYcbcrConversionKHR = SamplerYcbcrConversion; class ShaderModule { public: using CType = VkShaderModule; using NativeType = VkShaderModule; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eShaderModule; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eShaderModule; public: ShaderModule() VULKAN_HPP_NOEXCEPT{}; // = default - try to workaround a compiler issue ShaderModule( ShaderModule const & rhs ) = default; ShaderModule & operator=( ShaderModule const & rhs ) = default; #if !defined( VULKAN_HPP_HANDLES_MOVE_EXCHANGE ) ShaderModule( ShaderModule && rhs ) = default; ShaderModule & operator=( ShaderModule && rhs ) = default; #else ShaderModule( ShaderModule && rhs ) VULKAN_HPP_NOEXCEPT : m_shaderModule( VULKAN_HPP_NAMESPACE::exchange( rhs.m_shaderModule, {} ) ) {} ShaderModule & operator=( ShaderModule && rhs ) VULKAN_HPP_NOEXCEPT { m_shaderModule = VULKAN_HPP_NAMESPACE::exchange( rhs.m_shaderModule, {} ); return *this; } #endif VULKAN_HPP_CONSTEXPR ShaderModule( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} VULKAN_HPP_TYPESAFE_EXPLICIT ShaderModule( VkShaderModule shaderModule ) VULKAN_HPP_NOEXCEPT : m_shaderModule( shaderModule ) {} #if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 ) ShaderModule & operator=( VkShaderModule shaderModule ) VULKAN_HPP_NOEXCEPT { m_shaderModule = shaderModule; return *this; } #endif ShaderModule & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT { m_shaderModule = {}; return *this; } VULKAN_HPP_TYPESAFE_EXPLICIT operator VkShaderModule() const VULKAN_HPP_NOEXCEPT { return m_shaderModule; } explicit operator bool() const VULKAN_HPP_NOEXCEPT { return m_shaderModule != VK_NULL_HANDLE; } bool operator!() const VULKAN_HPP_NOEXCEPT { return m_shaderModule == VK_NULL_HANDLE; } private: VkShaderModule m_shaderModule = {}; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::ShaderModule; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::ShaderModule; }; #if ( VK_USE_64_BIT_PTR_DEFINES == 1 ) template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::ShaderModule; }; #endif template <> struct isVulkanHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; class ValidationCacheEXT { public: using CType = VkValidationCacheEXT; using NativeType = VkValidationCacheEXT; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eValidationCacheEXT; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eValidationCacheEXT; public: ValidationCacheEXT() VULKAN_HPP_NOEXCEPT{}; // = default - try to workaround a compiler issue ValidationCacheEXT( ValidationCacheEXT const & rhs ) = default; ValidationCacheEXT & operator=( ValidationCacheEXT const & rhs ) = default; #if !defined( VULKAN_HPP_HANDLES_MOVE_EXCHANGE ) ValidationCacheEXT( ValidationCacheEXT && rhs ) = default; ValidationCacheEXT & operator=( ValidationCacheEXT && rhs ) = default; #else ValidationCacheEXT( ValidationCacheEXT && rhs ) VULKAN_HPP_NOEXCEPT : m_validationCacheEXT( VULKAN_HPP_NAMESPACE::exchange( rhs.m_validationCacheEXT, {} ) ) { } ValidationCacheEXT & operator=( ValidationCacheEXT && rhs ) VULKAN_HPP_NOEXCEPT { m_validationCacheEXT = VULKAN_HPP_NAMESPACE::exchange( rhs.m_validationCacheEXT, {} ); return *this; } #endif VULKAN_HPP_CONSTEXPR ValidationCacheEXT( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} VULKAN_HPP_TYPESAFE_EXPLICIT ValidationCacheEXT( VkValidationCacheEXT validationCacheEXT ) VULKAN_HPP_NOEXCEPT : m_validationCacheEXT( validationCacheEXT ) { } #if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 ) ValidationCacheEXT & operator=( VkValidationCacheEXT validationCacheEXT ) VULKAN_HPP_NOEXCEPT { m_validationCacheEXT = validationCacheEXT; return *this; } #endif ValidationCacheEXT & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT { m_validationCacheEXT = {}; return *this; } VULKAN_HPP_TYPESAFE_EXPLICIT operator VkValidationCacheEXT() const VULKAN_HPP_NOEXCEPT { return m_validationCacheEXT; } explicit operator bool() const VULKAN_HPP_NOEXCEPT { return m_validationCacheEXT != VK_NULL_HANDLE; } bool operator!() const VULKAN_HPP_NOEXCEPT { return m_validationCacheEXT == VK_NULL_HANDLE; } private: VkValidationCacheEXT m_validationCacheEXT = {}; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::ValidationCacheEXT; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::ValidationCacheEXT; }; #if ( VK_USE_64_BIT_PTR_DEFINES == 1 ) template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::ValidationCacheEXT; }; #endif template <> struct isVulkanHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; class VideoSessionParametersKHR { public: using CType = VkVideoSessionParametersKHR; using NativeType = VkVideoSessionParametersKHR; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eVideoSessionParametersKHR; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eUnknown; public: VideoSessionParametersKHR() VULKAN_HPP_NOEXCEPT{}; // = default - try to workaround a compiler issue VideoSessionParametersKHR( VideoSessionParametersKHR const & rhs ) = default; VideoSessionParametersKHR & operator=( VideoSessionParametersKHR const & rhs ) = default; #if !defined( VULKAN_HPP_HANDLES_MOVE_EXCHANGE ) VideoSessionParametersKHR( VideoSessionParametersKHR && rhs ) = default; VideoSessionParametersKHR & operator=( VideoSessionParametersKHR && rhs ) = default; #else VideoSessionParametersKHR( VideoSessionParametersKHR && rhs ) VULKAN_HPP_NOEXCEPT : m_videoSessionParametersKHR( VULKAN_HPP_NAMESPACE::exchange( rhs.m_videoSessionParametersKHR, {} ) ) { } VideoSessionParametersKHR & operator=( VideoSessionParametersKHR && rhs ) VULKAN_HPP_NOEXCEPT { m_videoSessionParametersKHR = VULKAN_HPP_NAMESPACE::exchange( rhs.m_videoSessionParametersKHR, {} ); return *this; } #endif VULKAN_HPP_CONSTEXPR VideoSessionParametersKHR( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} VULKAN_HPP_TYPESAFE_EXPLICIT VideoSessionParametersKHR( VkVideoSessionParametersKHR videoSessionParametersKHR ) VULKAN_HPP_NOEXCEPT : m_videoSessionParametersKHR( videoSessionParametersKHR ) { } #if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 ) VideoSessionParametersKHR & operator=( VkVideoSessionParametersKHR videoSessionParametersKHR ) VULKAN_HPP_NOEXCEPT { m_videoSessionParametersKHR = videoSessionParametersKHR; return *this; } #endif VideoSessionParametersKHR & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT { m_videoSessionParametersKHR = {}; return *this; } VULKAN_HPP_TYPESAFE_EXPLICIT operator VkVideoSessionParametersKHR() const VULKAN_HPP_NOEXCEPT { return m_videoSessionParametersKHR; } explicit operator bool() const VULKAN_HPP_NOEXCEPT { return m_videoSessionParametersKHR != VK_NULL_HANDLE; } bool operator!() const VULKAN_HPP_NOEXCEPT { return m_videoSessionParametersKHR == VK_NULL_HANDLE; } private: VkVideoSessionParametersKHR m_videoSessionParametersKHR = {}; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::VideoSessionParametersKHR; }; #if ( VK_USE_64_BIT_PTR_DEFINES == 1 ) template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::VideoSessionParametersKHR; }; #endif template <> struct isVulkanHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; class PipelineBinaryKHR { public: using CType = VkPipelineBinaryKHR; using NativeType = VkPipelineBinaryKHR; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::ePipelineBinaryKHR; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eUnknown; public: PipelineBinaryKHR() VULKAN_HPP_NOEXCEPT{}; // = default - try to workaround a compiler issue PipelineBinaryKHR( PipelineBinaryKHR const & rhs ) = default; PipelineBinaryKHR & operator=( PipelineBinaryKHR const & rhs ) = default; #if !defined( VULKAN_HPP_HANDLES_MOVE_EXCHANGE ) PipelineBinaryKHR( PipelineBinaryKHR && rhs ) = default; PipelineBinaryKHR & operator=( PipelineBinaryKHR && rhs ) = default; #else PipelineBinaryKHR( PipelineBinaryKHR && rhs ) VULKAN_HPP_NOEXCEPT : m_pipelineBinaryKHR( VULKAN_HPP_NAMESPACE::exchange( rhs.m_pipelineBinaryKHR, {} ) ) {} PipelineBinaryKHR & operator=( PipelineBinaryKHR && rhs ) VULKAN_HPP_NOEXCEPT { m_pipelineBinaryKHR = VULKAN_HPP_NAMESPACE::exchange( rhs.m_pipelineBinaryKHR, {} ); return *this; } #endif VULKAN_HPP_CONSTEXPR PipelineBinaryKHR( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} VULKAN_HPP_TYPESAFE_EXPLICIT PipelineBinaryKHR( VkPipelineBinaryKHR pipelineBinaryKHR ) VULKAN_HPP_NOEXCEPT : m_pipelineBinaryKHR( pipelineBinaryKHR ) {} #if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 ) PipelineBinaryKHR & operator=( VkPipelineBinaryKHR pipelineBinaryKHR ) VULKAN_HPP_NOEXCEPT { m_pipelineBinaryKHR = pipelineBinaryKHR; return *this; } #endif PipelineBinaryKHR & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT { m_pipelineBinaryKHR = {}; return *this; } VULKAN_HPP_TYPESAFE_EXPLICIT operator VkPipelineBinaryKHR() const VULKAN_HPP_NOEXCEPT { return m_pipelineBinaryKHR; } explicit operator bool() const VULKAN_HPP_NOEXCEPT { return m_pipelineBinaryKHR != VK_NULL_HANDLE; } bool operator!() const VULKAN_HPP_NOEXCEPT { return m_pipelineBinaryKHR == VK_NULL_HANDLE; } private: VkPipelineBinaryKHR m_pipelineBinaryKHR = {}; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::PipelineBinaryKHR; }; #if ( VK_USE_64_BIT_PTR_DEFINES == 1 ) template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::PipelineBinaryKHR; }; #endif template <> struct isVulkanHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; class Queue { public: using CType = VkQueue; using NativeType = VkQueue; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eQueue; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eQueue; public: Queue() VULKAN_HPP_NOEXCEPT{}; // = default - try to workaround a compiler issue Queue( Queue const & rhs ) = default; Queue & operator=( Queue const & rhs ) = default; #if !defined( VULKAN_HPP_HANDLES_MOVE_EXCHANGE ) Queue( Queue && rhs ) = default; Queue & operator=( Queue && rhs ) = default; #else Queue( Queue && rhs ) VULKAN_HPP_NOEXCEPT : m_queue( VULKAN_HPP_NAMESPACE::exchange( rhs.m_queue, {} ) ) {} Queue & operator=( Queue && rhs ) VULKAN_HPP_NOEXCEPT { m_queue = VULKAN_HPP_NAMESPACE::exchange( rhs.m_queue, {} ); return *this; } #endif VULKAN_HPP_CONSTEXPR Queue( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} Queue( VkQueue queue ) VULKAN_HPP_NOEXCEPT : m_queue( queue ) {} Queue & operator=( VkQueue queue ) VULKAN_HPP_NOEXCEPT { m_queue = queue; return *this; } Queue & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT { m_queue = {}; return *this; } //=== VK_VERSION_1_0 === template VULKAN_HPP_NODISCARD Result submit( uint32_t submitCount, const VULKAN_HPP_NAMESPACE::SubmitInfo * pSubmits, VULKAN_HPP_NAMESPACE::Fence fence, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type submit( VULKAN_HPP_NAMESPACE::ArrayProxy const & submits, VULKAN_HPP_NAMESPACE::Fence fence VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD Result waitIdle( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #else template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type waitIdle( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ template VULKAN_HPP_NODISCARD Result bindSparse( uint32_t bindInfoCount, const VULKAN_HPP_NAMESPACE::BindSparseInfo * pBindInfo, VULKAN_HPP_NAMESPACE::Fence fence, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type bindSparse( VULKAN_HPP_NAMESPACE::ArrayProxy const & bindInfo, VULKAN_HPP_NAMESPACE::Fence fence VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_VERSION_1_3 === template VULKAN_HPP_NODISCARD Result submit2( uint32_t submitCount, const VULKAN_HPP_NAMESPACE::SubmitInfo2 * pSubmits, VULKAN_HPP_NAMESPACE::Fence fence, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type submit2( VULKAN_HPP_NAMESPACE::ArrayProxy const & submits, VULKAN_HPP_NAMESPACE::Fence fence VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_KHR_swapchain === template VULKAN_HPP_NODISCARD Result presentKHR( const VULKAN_HPP_NAMESPACE::PresentInfoKHR * pPresentInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Result presentKHR( const VULKAN_HPP_NAMESPACE::PresentInfoKHR & presentInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_EXT_debug_utils === template void beginDebugUtilsLabelEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsLabelEXT * pLabelInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void beginDebugUtilsLabelEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsLabelEXT & labelInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void endDebugUtilsLabelEXT( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void insertDebugUtilsLabelEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsLabelEXT * pLabelInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void insertDebugUtilsLabelEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsLabelEXT & labelInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_NV_device_diagnostic_checkpoints === template void getCheckpointDataNV( uint32_t * pCheckpointDataCount, VULKAN_HPP_NAMESPACE::CheckpointDataNV * pCheckpointData, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template < typename CheckpointDataNVAllocator = std::allocator, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD std::vector getCheckpointDataNV( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template < typename CheckpointDataNVAllocator = std::allocator, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD std::vector getCheckpointDataNV( CheckpointDataNVAllocator & checkpointDataNVAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void getCheckpointData2NV( uint32_t * pCheckpointDataCount, VULKAN_HPP_NAMESPACE::CheckpointData2NV * pCheckpointData, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template < typename CheckpointData2NVAllocator = std::allocator, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD std::vector getCheckpointData2NV( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template < typename CheckpointData2NVAllocator = std::allocator, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD std::vector getCheckpointData2NV( CheckpointData2NVAllocator & checkpointData2NVAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_INTEL_performance_query === #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD Result setPerformanceConfigurationINTEL( VULKAN_HPP_NAMESPACE::PerformanceConfigurationINTEL configuration, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #else template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type setPerformanceConfigurationINTEL( VULKAN_HPP_NAMESPACE::PerformanceConfigurationINTEL configuration, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ //=== VK_KHR_synchronization2 === template VULKAN_HPP_NODISCARD Result submit2KHR( uint32_t submitCount, const VULKAN_HPP_NAMESPACE::SubmitInfo2 * pSubmits, VULKAN_HPP_NAMESPACE::Fence fence, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type submit2KHR( VULKAN_HPP_NAMESPACE::ArrayProxy const & submits, VULKAN_HPP_NAMESPACE::Fence fence VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_NV_low_latency2 === template void notifyOutOfBandNV( const VULKAN_HPP_NAMESPACE::OutOfBandQueueTypeInfoNV * pQueueTypeInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void notifyOutOfBandNV( const VULKAN_HPP_NAMESPACE::OutOfBandQueueTypeInfoNV & queueTypeInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ operator VkQueue() const VULKAN_HPP_NOEXCEPT { return m_queue; } explicit operator bool() const VULKAN_HPP_NOEXCEPT { return m_queue != VK_NULL_HANDLE; } bool operator!() const VULKAN_HPP_NOEXCEPT { return m_queue == VK_NULL_HANDLE; } private: VkQueue m_queue = {}; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::Queue; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::Queue; }; #if ( VK_USE_64_BIT_PTR_DEFINES == 1 ) template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::Queue; }; #endif template <> struct isVulkanHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; class Device { public: using CType = VkDevice; using NativeType = VkDevice; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eDevice; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eDevice; public: Device() VULKAN_HPP_NOEXCEPT{}; // = default - try to workaround a compiler issue Device( Device const & rhs ) = default; Device & operator=( Device const & rhs ) = default; #if !defined( VULKAN_HPP_HANDLES_MOVE_EXCHANGE ) Device( Device && rhs ) = default; Device & operator=( Device && rhs ) = default; #else Device( Device && rhs ) VULKAN_HPP_NOEXCEPT : m_device( VULKAN_HPP_NAMESPACE::exchange( rhs.m_device, {} ) ) {} Device & operator=( Device && rhs ) VULKAN_HPP_NOEXCEPT { m_device = VULKAN_HPP_NAMESPACE::exchange( rhs.m_device, {} ); return *this; } #endif VULKAN_HPP_CONSTEXPR Device( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} Device( VkDevice device ) VULKAN_HPP_NOEXCEPT : m_device( device ) {} Device & operator=( VkDevice device ) VULKAN_HPP_NOEXCEPT { m_device = device; return *this; } Device & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT { m_device = {}; return *this; } //=== VK_VERSION_1_0 === template PFN_vkVoidFunction getProcAddr( const char * pName, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NAMESPACE::PFN_VoidFunction getProcAddr( const std::string & name, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void destroy( const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void destroy( Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void getQueue( uint32_t queueFamilyIndex, uint32_t queueIndex, VULKAN_HPP_NAMESPACE::Queue * pQueue, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Queue getQueue( uint32_t queueFamilyIndex, uint32_t queueIndex, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD Result waitIdle( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #else template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type waitIdle( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ template VULKAN_HPP_NODISCARD Result allocateMemory( const VULKAN_HPP_NAMESPACE::MemoryAllocateInfo * pAllocateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::DeviceMemory * pMemory, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type allocateMemory( const VULKAN_HPP_NAMESPACE::MemoryAllocateInfo & allocateInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD typename ResultValueType>::type allocateMemoryUnique( const VULKAN_HPP_NAMESPACE::MemoryAllocateInfo & allocateInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void freeMemory( VULKAN_HPP_NAMESPACE::DeviceMemory memory, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void freeMemory( VULKAN_HPP_NAMESPACE::DeviceMemory memory VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void( free )( VULKAN_HPP_NAMESPACE::DeviceMemory memory, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void( free )( VULKAN_HPP_NAMESPACE::DeviceMemory memory, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result mapMemory( VULKAN_HPP_NAMESPACE::DeviceMemory memory, VULKAN_HPP_NAMESPACE::DeviceSize offset, VULKAN_HPP_NAMESPACE::DeviceSize size, VULKAN_HPP_NAMESPACE::MemoryMapFlags flags, void ** ppData, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type mapMemory( VULKAN_HPP_NAMESPACE::DeviceMemory memory, VULKAN_HPP_NAMESPACE::DeviceSize offset, VULKAN_HPP_NAMESPACE::DeviceSize size, VULKAN_HPP_NAMESPACE::MemoryMapFlags flags VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void unmapMemory( VULKAN_HPP_NAMESPACE::DeviceMemory memory, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template VULKAN_HPP_NODISCARD Result flushMappedMemoryRanges( uint32_t memoryRangeCount, const VULKAN_HPP_NAMESPACE::MappedMemoryRange * pMemoryRanges, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type flushMappedMemoryRanges( VULKAN_HPP_NAMESPACE::ArrayProxy const & memoryRanges, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result invalidateMappedMemoryRanges( uint32_t memoryRangeCount, const VULKAN_HPP_NAMESPACE::MappedMemoryRange * pMemoryRanges, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type invalidateMappedMemoryRanges( VULKAN_HPP_NAMESPACE::ArrayProxy const & memoryRanges, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void getMemoryCommitment( VULKAN_HPP_NAMESPACE::DeviceMemory memory, VULKAN_HPP_NAMESPACE::DeviceSize * pCommittedMemoryInBytes, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::DeviceSize getMemoryCommitment( VULKAN_HPP_NAMESPACE::DeviceMemory memory, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD Result bindBufferMemory( VULKAN_HPP_NAMESPACE::Buffer buffer, VULKAN_HPP_NAMESPACE::DeviceMemory memory, VULKAN_HPP_NAMESPACE::DeviceSize memoryOffset, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #else template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type bindBufferMemory( VULKAN_HPP_NAMESPACE::Buffer buffer, VULKAN_HPP_NAMESPACE::DeviceMemory memory, VULKAN_HPP_NAMESPACE::DeviceSize memoryOffset, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD Result bindImageMemory( VULKAN_HPP_NAMESPACE::Image image, VULKAN_HPP_NAMESPACE::DeviceMemory memory, VULKAN_HPP_NAMESPACE::DeviceSize memoryOffset, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #else template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type bindImageMemory( VULKAN_HPP_NAMESPACE::Image image, VULKAN_HPP_NAMESPACE::DeviceMemory memory, VULKAN_HPP_NAMESPACE::DeviceSize memoryOffset, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ template void getBufferMemoryRequirements( VULKAN_HPP_NAMESPACE::Buffer buffer, VULKAN_HPP_NAMESPACE::MemoryRequirements * pMemoryRequirements, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::MemoryRequirements getBufferMemoryRequirements( VULKAN_HPP_NAMESPACE::Buffer buffer, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void getImageMemoryRequirements( VULKAN_HPP_NAMESPACE::Image image, VULKAN_HPP_NAMESPACE::MemoryRequirements * pMemoryRequirements, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::MemoryRequirements getImageMemoryRequirements( VULKAN_HPP_NAMESPACE::Image image, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void getImageSparseMemoryRequirements( VULKAN_HPP_NAMESPACE::Image image, uint32_t * pSparseMemoryRequirementCount, VULKAN_HPP_NAMESPACE::SparseImageMemoryRequirements * pSparseMemoryRequirements, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if< std::is_same::value, int>::type = 0> VULKAN_HPP_NODISCARD std::vector getImageSparseMemoryRequirements( VULKAN_HPP_NAMESPACE::Image image, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if< std::is_same::value, int>::type = 0> VULKAN_HPP_NODISCARD std::vector getImageSparseMemoryRequirements( VULKAN_HPP_NAMESPACE::Image image, SparseImageMemoryRequirementsAllocator & sparseImageMemoryRequirementsAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result createFence( const VULKAN_HPP_NAMESPACE::FenceCreateInfo * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::Fence * pFence, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type createFence( const VULKAN_HPP_NAMESPACE::FenceCreateInfo & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD typename ResultValueType>::type createFenceUnique( const VULKAN_HPP_NAMESPACE::FenceCreateInfo & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void destroyFence( VULKAN_HPP_NAMESPACE::Fence fence, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void destroyFence( VULKAN_HPP_NAMESPACE::Fence fence VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void destroy( VULKAN_HPP_NAMESPACE::Fence fence, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void destroy( VULKAN_HPP_NAMESPACE::Fence fence, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result resetFences( uint32_t fenceCount, const VULKAN_HPP_NAMESPACE::Fence * pFences, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template typename ResultValueType::type resetFences( VULKAN_HPP_NAMESPACE::ArrayProxy const & fences, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD Result getFenceStatus( VULKAN_HPP_NAMESPACE::Fence fence, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #else template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Result getFenceStatus( VULKAN_HPP_NAMESPACE::Fence fence, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ template VULKAN_HPP_NODISCARD Result waitForFences( uint32_t fenceCount, const VULKAN_HPP_NAMESPACE::Fence * pFences, VULKAN_HPP_NAMESPACE::Bool32 waitAll, uint64_t timeout, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Result waitForFences( VULKAN_HPP_NAMESPACE::ArrayProxy const & fences, VULKAN_HPP_NAMESPACE::Bool32 waitAll, uint64_t timeout, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result createSemaphore( const VULKAN_HPP_NAMESPACE::SemaphoreCreateInfo * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::Semaphore * pSemaphore, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type createSemaphore( const VULKAN_HPP_NAMESPACE::SemaphoreCreateInfo & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD typename ResultValueType>::type createSemaphoreUnique( const VULKAN_HPP_NAMESPACE::SemaphoreCreateInfo & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void destroySemaphore( VULKAN_HPP_NAMESPACE::Semaphore semaphore, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void destroySemaphore( VULKAN_HPP_NAMESPACE::Semaphore semaphore VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void destroy( VULKAN_HPP_NAMESPACE::Semaphore semaphore, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void destroy( VULKAN_HPP_NAMESPACE::Semaphore semaphore, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result createEvent( const VULKAN_HPP_NAMESPACE::EventCreateInfo * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::Event * pEvent, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type createEvent( const VULKAN_HPP_NAMESPACE::EventCreateInfo & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD typename ResultValueType>::type createEventUnique( const VULKAN_HPP_NAMESPACE::EventCreateInfo & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void destroyEvent( VULKAN_HPP_NAMESPACE::Event event, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void destroyEvent( VULKAN_HPP_NAMESPACE::Event event VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void destroy( VULKAN_HPP_NAMESPACE::Event event, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void destroy( VULKAN_HPP_NAMESPACE::Event event, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD Result getEventStatus( VULKAN_HPP_NAMESPACE::Event event, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #else template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Result getEventStatus( VULKAN_HPP_NAMESPACE::Event event, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD Result setEvent( VULKAN_HPP_NAMESPACE::Event event, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #else template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type setEvent( VULKAN_HPP_NAMESPACE::Event event, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD Result resetEvent( VULKAN_HPP_NAMESPACE::Event event, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #else template typename ResultValueType::type resetEvent( VULKAN_HPP_NAMESPACE::Event event, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ template VULKAN_HPP_NODISCARD Result createQueryPool( const VULKAN_HPP_NAMESPACE::QueryPoolCreateInfo * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::QueryPool * pQueryPool, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type createQueryPool( const VULKAN_HPP_NAMESPACE::QueryPoolCreateInfo & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD typename ResultValueType>::type createQueryPoolUnique( const VULKAN_HPP_NAMESPACE::QueryPoolCreateInfo & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void destroyQueryPool( VULKAN_HPP_NAMESPACE::QueryPool queryPool, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void destroyQueryPool( VULKAN_HPP_NAMESPACE::QueryPool queryPool VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void destroy( VULKAN_HPP_NAMESPACE::QueryPool queryPool, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void destroy( VULKAN_HPP_NAMESPACE::QueryPool queryPool, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result getQueryPoolResults( VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, size_t dataSize, void * pData, VULKAN_HPP_NAMESPACE::DeviceSize stride, VULKAN_HPP_NAMESPACE::QueryResultFlags flags, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD ResultValue> getQueryPoolResults( VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, size_t dataSize, VULKAN_HPP_NAMESPACE::DeviceSize stride, VULKAN_HPP_NAMESPACE::QueryResultFlags flags VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template VULKAN_HPP_NODISCARD ResultValue getQueryPoolResult( VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, VULKAN_HPP_NAMESPACE::DeviceSize stride, VULKAN_HPP_NAMESPACE::QueryResultFlags flags VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result createBuffer( const VULKAN_HPP_NAMESPACE::BufferCreateInfo * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::Buffer * pBuffer, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type createBuffer( const VULKAN_HPP_NAMESPACE::BufferCreateInfo & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD typename ResultValueType>::type createBufferUnique( const VULKAN_HPP_NAMESPACE::BufferCreateInfo & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void destroyBuffer( VULKAN_HPP_NAMESPACE::Buffer buffer, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void destroyBuffer( VULKAN_HPP_NAMESPACE::Buffer buffer VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void destroy( VULKAN_HPP_NAMESPACE::Buffer buffer, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void destroy( VULKAN_HPP_NAMESPACE::Buffer buffer, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result createBufferView( const VULKAN_HPP_NAMESPACE::BufferViewCreateInfo * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::BufferView * pView, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type createBufferView( const VULKAN_HPP_NAMESPACE::BufferViewCreateInfo & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD typename ResultValueType>::type createBufferViewUnique( const VULKAN_HPP_NAMESPACE::BufferViewCreateInfo & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void destroyBufferView( VULKAN_HPP_NAMESPACE::BufferView bufferView, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void destroyBufferView( VULKAN_HPP_NAMESPACE::BufferView bufferView VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void destroy( VULKAN_HPP_NAMESPACE::BufferView bufferView, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void destroy( VULKAN_HPP_NAMESPACE::BufferView bufferView, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result createImage( const VULKAN_HPP_NAMESPACE::ImageCreateInfo * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::Image * pImage, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type createImage( const VULKAN_HPP_NAMESPACE::ImageCreateInfo & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD typename ResultValueType>::type createImageUnique( const VULKAN_HPP_NAMESPACE::ImageCreateInfo & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void destroyImage( VULKAN_HPP_NAMESPACE::Image image, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void destroyImage( VULKAN_HPP_NAMESPACE::Image image VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void destroy( VULKAN_HPP_NAMESPACE::Image image, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void destroy( VULKAN_HPP_NAMESPACE::Image image, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void getImageSubresourceLayout( VULKAN_HPP_NAMESPACE::Image image, const VULKAN_HPP_NAMESPACE::ImageSubresource * pSubresource, VULKAN_HPP_NAMESPACE::SubresourceLayout * pLayout, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::SubresourceLayout getImageSubresourceLayout( VULKAN_HPP_NAMESPACE::Image image, const VULKAN_HPP_NAMESPACE::ImageSubresource & subresource, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result createImageView( const VULKAN_HPP_NAMESPACE::ImageViewCreateInfo * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::ImageView * pView, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type createImageView( const VULKAN_HPP_NAMESPACE::ImageViewCreateInfo & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD typename ResultValueType>::type createImageViewUnique( const VULKAN_HPP_NAMESPACE::ImageViewCreateInfo & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void destroyImageView( VULKAN_HPP_NAMESPACE::ImageView imageView, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void destroyImageView( VULKAN_HPP_NAMESPACE::ImageView imageView VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void destroy( VULKAN_HPP_NAMESPACE::ImageView imageView, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void destroy( VULKAN_HPP_NAMESPACE::ImageView imageView, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result createShaderModule( const VULKAN_HPP_NAMESPACE::ShaderModuleCreateInfo * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::ShaderModule * pShaderModule, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type createShaderModule( const VULKAN_HPP_NAMESPACE::ShaderModuleCreateInfo & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD typename ResultValueType>::type createShaderModuleUnique( const VULKAN_HPP_NAMESPACE::ShaderModuleCreateInfo & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void destroyShaderModule( VULKAN_HPP_NAMESPACE::ShaderModule shaderModule, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void destroyShaderModule( VULKAN_HPP_NAMESPACE::ShaderModule shaderModule VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void destroy( VULKAN_HPP_NAMESPACE::ShaderModule shaderModule, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void destroy( VULKAN_HPP_NAMESPACE::ShaderModule shaderModule, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result createPipelineCache( const VULKAN_HPP_NAMESPACE::PipelineCacheCreateInfo * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::PipelineCache * pPipelineCache, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type createPipelineCache( const VULKAN_HPP_NAMESPACE::PipelineCacheCreateInfo & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD typename ResultValueType>::type createPipelineCacheUnique( const VULKAN_HPP_NAMESPACE::PipelineCacheCreateInfo & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void destroyPipelineCache( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void destroyPipelineCache( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void destroy( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void destroy( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result getPipelineCacheData( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, size_t * pDataSize, void * pData, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getPipelineCacheData( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getPipelineCacheData( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, Uint8_tAllocator & uint8_tAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result mergePipelineCaches( VULKAN_HPP_NAMESPACE::PipelineCache dstCache, uint32_t srcCacheCount, const VULKAN_HPP_NAMESPACE::PipelineCache * pSrcCaches, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type mergePipelineCaches( VULKAN_HPP_NAMESPACE::PipelineCache dstCache, VULKAN_HPP_NAMESPACE::ArrayProxy const & srcCaches, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result createGraphicsPipelines( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, uint32_t createInfoCount, const VULKAN_HPP_NAMESPACE::GraphicsPipelineCreateInfo * pCreateInfos, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::Pipeline * pPipelines, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD ResultValue> createGraphicsPipelines( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD ResultValue> createGraphicsPipelines( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, Optional allocator, PipelineAllocator & pipelineAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template VULKAN_HPP_NODISCARD ResultValue createGraphicsPipeline( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, const VULKAN_HPP_NAMESPACE::GraphicsPipelineCreateInfo & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # ifndef VULKAN_HPP_NO_SMART_HANDLE template >, typename std::enable_if>::value, int>::type = 0> VULKAN_HPP_NODISCARD ResultValue, PipelineAllocator>> createGraphicsPipelinesUnique( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template >, typename std::enable_if>::value, int>::type = 0> VULKAN_HPP_NODISCARD ResultValue, PipelineAllocator>> createGraphicsPipelinesUnique( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, Optional allocator, PipelineAllocator & pipelineAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template VULKAN_HPP_NODISCARD ResultValue> createGraphicsPipelineUnique( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, const VULKAN_HPP_NAMESPACE::GraphicsPipelineCreateInfo & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result createComputePipelines( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, uint32_t createInfoCount, const VULKAN_HPP_NAMESPACE::ComputePipelineCreateInfo * pCreateInfos, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::Pipeline * pPipelines, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD ResultValue> createComputePipelines( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD ResultValue> createComputePipelines( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, Optional allocator, PipelineAllocator & pipelineAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template VULKAN_HPP_NODISCARD ResultValue createComputePipeline( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, const VULKAN_HPP_NAMESPACE::ComputePipelineCreateInfo & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # ifndef VULKAN_HPP_NO_SMART_HANDLE template >, typename std::enable_if>::value, int>::type = 0> VULKAN_HPP_NODISCARD ResultValue, PipelineAllocator>> createComputePipelinesUnique( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template >, typename std::enable_if>::value, int>::type = 0> VULKAN_HPP_NODISCARD ResultValue, PipelineAllocator>> createComputePipelinesUnique( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, Optional allocator, PipelineAllocator & pipelineAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template VULKAN_HPP_NODISCARD ResultValue> createComputePipelineUnique( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, const VULKAN_HPP_NAMESPACE::ComputePipelineCreateInfo & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void destroyPipeline( VULKAN_HPP_NAMESPACE::Pipeline pipeline, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void destroyPipeline( VULKAN_HPP_NAMESPACE::Pipeline pipeline VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void destroy( VULKAN_HPP_NAMESPACE::Pipeline pipeline, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void destroy( VULKAN_HPP_NAMESPACE::Pipeline pipeline, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result createPipelineLayout( const VULKAN_HPP_NAMESPACE::PipelineLayoutCreateInfo * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::PipelineLayout * pPipelineLayout, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type createPipelineLayout( const VULKAN_HPP_NAMESPACE::PipelineLayoutCreateInfo & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD typename ResultValueType>::type createPipelineLayoutUnique( const VULKAN_HPP_NAMESPACE::PipelineLayoutCreateInfo & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void destroyPipelineLayout( VULKAN_HPP_NAMESPACE::PipelineLayout pipelineLayout, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void destroyPipelineLayout( VULKAN_HPP_NAMESPACE::PipelineLayout pipelineLayout VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void destroy( VULKAN_HPP_NAMESPACE::PipelineLayout pipelineLayout, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void destroy( VULKAN_HPP_NAMESPACE::PipelineLayout pipelineLayout, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result createSampler( const VULKAN_HPP_NAMESPACE::SamplerCreateInfo * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::Sampler * pSampler, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type createSampler( const VULKAN_HPP_NAMESPACE::SamplerCreateInfo & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD typename ResultValueType>::type createSamplerUnique( const VULKAN_HPP_NAMESPACE::SamplerCreateInfo & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void destroySampler( VULKAN_HPP_NAMESPACE::Sampler sampler, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void destroySampler( VULKAN_HPP_NAMESPACE::Sampler sampler VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void destroy( VULKAN_HPP_NAMESPACE::Sampler sampler, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void destroy( VULKAN_HPP_NAMESPACE::Sampler sampler, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result createDescriptorSetLayout( const VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateInfo * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::DescriptorSetLayout * pSetLayout, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type createDescriptorSetLayout( const VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateInfo & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD typename ResultValueType>::type createDescriptorSetLayoutUnique( const VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateInfo & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void destroyDescriptorSetLayout( VULKAN_HPP_NAMESPACE::DescriptorSetLayout descriptorSetLayout, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void destroyDescriptorSetLayout( VULKAN_HPP_NAMESPACE::DescriptorSetLayout descriptorSetLayout VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void destroy( VULKAN_HPP_NAMESPACE::DescriptorSetLayout descriptorSetLayout, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void destroy( VULKAN_HPP_NAMESPACE::DescriptorSetLayout descriptorSetLayout, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result createDescriptorPool( const VULKAN_HPP_NAMESPACE::DescriptorPoolCreateInfo * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::DescriptorPool * pDescriptorPool, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type createDescriptorPool( const VULKAN_HPP_NAMESPACE::DescriptorPoolCreateInfo & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD typename ResultValueType>::type createDescriptorPoolUnique( const VULKAN_HPP_NAMESPACE::DescriptorPoolCreateInfo & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void destroyDescriptorPool( VULKAN_HPP_NAMESPACE::DescriptorPool descriptorPool, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void destroyDescriptorPool( VULKAN_HPP_NAMESPACE::DescriptorPool descriptorPool VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void destroy( VULKAN_HPP_NAMESPACE::DescriptorPool descriptorPool, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void destroy( VULKAN_HPP_NAMESPACE::DescriptorPool descriptorPool, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE template Result resetDescriptorPool( VULKAN_HPP_NAMESPACE::DescriptorPool descriptorPool, VULKAN_HPP_NAMESPACE::DescriptorPoolResetFlags flags, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #else template void resetDescriptorPool( VULKAN_HPP_NAMESPACE::DescriptorPool descriptorPool, VULKAN_HPP_NAMESPACE::DescriptorPoolResetFlags flags VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ template VULKAN_HPP_NODISCARD Result allocateDescriptorSets( const VULKAN_HPP_NAMESPACE::DescriptorSetAllocateInfo * pAllocateInfo, VULKAN_HPP_NAMESPACE::DescriptorSet * pDescriptorSets, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type allocateDescriptorSets( const VULKAN_HPP_NAMESPACE::DescriptorSetAllocateInfo & allocateInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type allocateDescriptorSets( const VULKAN_HPP_NAMESPACE::DescriptorSetAllocateInfo & allocateInfo, DescriptorSetAllocator & descriptorSetAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # ifndef VULKAN_HPP_NO_SMART_HANDLE template < typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename DescriptorSetAllocator = std::allocator>, typename std::enable_if>::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType, DescriptorSetAllocator>>::type allocateDescriptorSetsUnique( const VULKAN_HPP_NAMESPACE::DescriptorSetAllocateInfo & allocateInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template < typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename DescriptorSetAllocator = std::allocator>, typename std::enable_if>::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType, DescriptorSetAllocator>>::type allocateDescriptorSetsUnique( const VULKAN_HPP_NAMESPACE::DescriptorSetAllocateInfo & allocateInfo, DescriptorSetAllocator & descriptorSetAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template Result freeDescriptorSets( VULKAN_HPP_NAMESPACE::DescriptorPool descriptorPool, uint32_t descriptorSetCount, const VULKAN_HPP_NAMESPACE::DescriptorSet * pDescriptorSets, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void freeDescriptorSets( VULKAN_HPP_NAMESPACE::DescriptorPool descriptorPool, VULKAN_HPP_NAMESPACE::ArrayProxy const & descriptorSets, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template Result( free )( VULKAN_HPP_NAMESPACE::DescriptorPool descriptorPool, uint32_t descriptorSetCount, const VULKAN_HPP_NAMESPACE::DescriptorSet * pDescriptorSets, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void( free )( VULKAN_HPP_NAMESPACE::DescriptorPool descriptorPool, VULKAN_HPP_NAMESPACE::ArrayProxy const & descriptorSets, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void updateDescriptorSets( uint32_t descriptorWriteCount, const VULKAN_HPP_NAMESPACE::WriteDescriptorSet * pDescriptorWrites, uint32_t descriptorCopyCount, const VULKAN_HPP_NAMESPACE::CopyDescriptorSet * pDescriptorCopies, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void updateDescriptorSets( VULKAN_HPP_NAMESPACE::ArrayProxy const & descriptorWrites, VULKAN_HPP_NAMESPACE::ArrayProxy const & descriptorCopies, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result createFramebuffer( const VULKAN_HPP_NAMESPACE::FramebufferCreateInfo * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::Framebuffer * pFramebuffer, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type createFramebuffer( const VULKAN_HPP_NAMESPACE::FramebufferCreateInfo & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD typename ResultValueType>::type createFramebufferUnique( const VULKAN_HPP_NAMESPACE::FramebufferCreateInfo & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void destroyFramebuffer( VULKAN_HPP_NAMESPACE::Framebuffer framebuffer, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void destroyFramebuffer( VULKAN_HPP_NAMESPACE::Framebuffer framebuffer VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void destroy( VULKAN_HPP_NAMESPACE::Framebuffer framebuffer, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void destroy( VULKAN_HPP_NAMESPACE::Framebuffer framebuffer, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result createRenderPass( const VULKAN_HPP_NAMESPACE::RenderPassCreateInfo * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::RenderPass * pRenderPass, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type createRenderPass( const VULKAN_HPP_NAMESPACE::RenderPassCreateInfo & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD typename ResultValueType>::type createRenderPassUnique( const VULKAN_HPP_NAMESPACE::RenderPassCreateInfo & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void destroyRenderPass( VULKAN_HPP_NAMESPACE::RenderPass renderPass, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void destroyRenderPass( VULKAN_HPP_NAMESPACE::RenderPass renderPass VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void destroy( VULKAN_HPP_NAMESPACE::RenderPass renderPass, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void destroy( VULKAN_HPP_NAMESPACE::RenderPass renderPass, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void getRenderAreaGranularity( VULKAN_HPP_NAMESPACE::RenderPass renderPass, VULKAN_HPP_NAMESPACE::Extent2D * pGranularity, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Extent2D getRenderAreaGranularity( VULKAN_HPP_NAMESPACE::RenderPass renderPass, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result createCommandPool( const VULKAN_HPP_NAMESPACE::CommandPoolCreateInfo * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::CommandPool * pCommandPool, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type createCommandPool( const VULKAN_HPP_NAMESPACE::CommandPoolCreateInfo & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD typename ResultValueType>::type createCommandPoolUnique( const VULKAN_HPP_NAMESPACE::CommandPoolCreateInfo & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void destroyCommandPool( VULKAN_HPP_NAMESPACE::CommandPool commandPool, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void destroyCommandPool( VULKAN_HPP_NAMESPACE::CommandPool commandPool VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void destroy( VULKAN_HPP_NAMESPACE::CommandPool commandPool, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void destroy( VULKAN_HPP_NAMESPACE::CommandPool commandPool, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD Result resetCommandPool( VULKAN_HPP_NAMESPACE::CommandPool commandPool, VULKAN_HPP_NAMESPACE::CommandPoolResetFlags flags, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #else template typename ResultValueType::type resetCommandPool( VULKAN_HPP_NAMESPACE::CommandPool commandPool, VULKAN_HPP_NAMESPACE::CommandPoolResetFlags flags VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ template VULKAN_HPP_NODISCARD Result allocateCommandBuffers( const VULKAN_HPP_NAMESPACE::CommandBufferAllocateInfo * pAllocateInfo, VULKAN_HPP_NAMESPACE::CommandBuffer * pCommandBuffers, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type allocateCommandBuffers( const VULKAN_HPP_NAMESPACE::CommandBufferAllocateInfo & allocateInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type allocateCommandBuffers( const VULKAN_HPP_NAMESPACE::CommandBufferAllocateInfo & allocateInfo, CommandBufferAllocator & commandBufferAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # ifndef VULKAN_HPP_NO_SMART_HANDLE template < typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename CommandBufferAllocator = std::allocator>, typename std::enable_if>::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType, CommandBufferAllocator>>::type allocateCommandBuffersUnique( const VULKAN_HPP_NAMESPACE::CommandBufferAllocateInfo & allocateInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template < typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename CommandBufferAllocator = std::allocator>, typename std::enable_if>::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType, CommandBufferAllocator>>::type allocateCommandBuffersUnique( const VULKAN_HPP_NAMESPACE::CommandBufferAllocateInfo & allocateInfo, CommandBufferAllocator & commandBufferAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void freeCommandBuffers( VULKAN_HPP_NAMESPACE::CommandPool commandPool, uint32_t commandBufferCount, const VULKAN_HPP_NAMESPACE::CommandBuffer * pCommandBuffers, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void freeCommandBuffers( VULKAN_HPP_NAMESPACE::CommandPool commandPool, VULKAN_HPP_NAMESPACE::ArrayProxy const & commandBuffers, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void( free )( VULKAN_HPP_NAMESPACE::CommandPool commandPool, uint32_t commandBufferCount, const VULKAN_HPP_NAMESPACE::CommandBuffer * pCommandBuffers, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void( free )( VULKAN_HPP_NAMESPACE::CommandPool commandPool, VULKAN_HPP_NAMESPACE::ArrayProxy const & commandBuffers, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_VERSION_1_1 === template VULKAN_HPP_NODISCARD Result bindBufferMemory2( uint32_t bindInfoCount, const VULKAN_HPP_NAMESPACE::BindBufferMemoryInfo * pBindInfos, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type bindBufferMemory2( VULKAN_HPP_NAMESPACE::ArrayProxy const & bindInfos, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result bindImageMemory2( uint32_t bindInfoCount, const VULKAN_HPP_NAMESPACE::BindImageMemoryInfo * pBindInfos, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type bindImageMemory2( VULKAN_HPP_NAMESPACE::ArrayProxy const & bindInfos, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void getGroupPeerMemoryFeatures( uint32_t heapIndex, uint32_t localDeviceIndex, uint32_t remoteDeviceIndex, VULKAN_HPP_NAMESPACE::PeerMemoryFeatureFlags * pPeerMemoryFeatures, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::PeerMemoryFeatureFlags getGroupPeerMemoryFeatures( uint32_t heapIndex, uint32_t localDeviceIndex, uint32_t remoteDeviceIndex, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void getImageMemoryRequirements2( const VULKAN_HPP_NAMESPACE::ImageMemoryRequirementsInfo2 * pInfo, VULKAN_HPP_NAMESPACE::MemoryRequirements2 * pMemoryRequirements, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::MemoryRequirements2 getImageMemoryRequirements2( const VULKAN_HPP_NAMESPACE::ImageMemoryRequirementsInfo2 & info, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::StructureChain getImageMemoryRequirements2( const VULKAN_HPP_NAMESPACE::ImageMemoryRequirementsInfo2 & info, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void getBufferMemoryRequirements2( const VULKAN_HPP_NAMESPACE::BufferMemoryRequirementsInfo2 * pInfo, VULKAN_HPP_NAMESPACE::MemoryRequirements2 * pMemoryRequirements, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::MemoryRequirements2 getBufferMemoryRequirements2( const VULKAN_HPP_NAMESPACE::BufferMemoryRequirementsInfo2 & info, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::StructureChain getBufferMemoryRequirements2( const VULKAN_HPP_NAMESPACE::BufferMemoryRequirementsInfo2 & info, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void getImageSparseMemoryRequirements2( const VULKAN_HPP_NAMESPACE::ImageSparseMemoryRequirementsInfo2 * pInfo, uint32_t * pSparseMemoryRequirementCount, VULKAN_HPP_NAMESPACE::SparseImageMemoryRequirements2 * pSparseMemoryRequirements, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if< std::is_same::value, int>::type = 0> VULKAN_HPP_NODISCARD std::vector getImageSparseMemoryRequirements2( const VULKAN_HPP_NAMESPACE::ImageSparseMemoryRequirementsInfo2 & info, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if< std::is_same::value, int>::type = 0> VULKAN_HPP_NODISCARD std::vector getImageSparseMemoryRequirements2( const VULKAN_HPP_NAMESPACE::ImageSparseMemoryRequirementsInfo2 & info, SparseImageMemoryRequirements2Allocator & sparseImageMemoryRequirements2Allocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void trimCommandPool( VULKAN_HPP_NAMESPACE::CommandPool commandPool, VULKAN_HPP_NAMESPACE::CommandPoolTrimFlags flags, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void getQueue2( const VULKAN_HPP_NAMESPACE::DeviceQueueInfo2 * pQueueInfo, VULKAN_HPP_NAMESPACE::Queue * pQueue, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Queue getQueue2( const VULKAN_HPP_NAMESPACE::DeviceQueueInfo2 & queueInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result createSamplerYcbcrConversion( const VULKAN_HPP_NAMESPACE::SamplerYcbcrConversionCreateInfo * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion * pYcbcrConversion, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type createSamplerYcbcrConversion( const VULKAN_HPP_NAMESPACE::SamplerYcbcrConversionCreateInfo & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD typename ResultValueType>::type createSamplerYcbcrConversionUnique( const VULKAN_HPP_NAMESPACE::SamplerYcbcrConversionCreateInfo & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void destroySamplerYcbcrConversion( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion ycbcrConversion, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void destroySamplerYcbcrConversion( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion ycbcrConversion VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void destroy( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion ycbcrConversion, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void destroy( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion ycbcrConversion, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result createDescriptorUpdateTemplate( const VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateCreateInfo * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate * pDescriptorUpdateTemplate, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type createDescriptorUpdateTemplate( const VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateCreateInfo & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD typename ResultValueType>::type createDescriptorUpdateTemplateUnique( const VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateCreateInfo & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void destroyDescriptorUpdateTemplate( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void destroyDescriptorUpdateTemplate( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void destroy( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void destroy( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void updateDescriptorSetWithTemplate( VULKAN_HPP_NAMESPACE::DescriptorSet descriptorSet, VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate, const void * pData, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void updateDescriptorSetWithTemplate( VULKAN_HPP_NAMESPACE::DescriptorSet descriptorSet, VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate, DataType const & data, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void getDescriptorSetLayoutSupport( const VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateInfo * pCreateInfo, VULKAN_HPP_NAMESPACE::DescriptorSetLayoutSupport * pSupport, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::DescriptorSetLayoutSupport getDescriptorSetLayoutSupport( const VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateInfo & createInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::StructureChain getDescriptorSetLayoutSupport( const VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateInfo & createInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_VERSION_1_2 === template VULKAN_HPP_NODISCARD Result createRenderPass2( const VULKAN_HPP_NAMESPACE::RenderPassCreateInfo2 * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::RenderPass * pRenderPass, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type createRenderPass2( const VULKAN_HPP_NAMESPACE::RenderPassCreateInfo2 & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD typename ResultValueType>::type createRenderPass2Unique( const VULKAN_HPP_NAMESPACE::RenderPassCreateInfo2 & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void resetQueryPool( VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template VULKAN_HPP_NODISCARD Result getSemaphoreCounterValue( VULKAN_HPP_NAMESPACE::Semaphore semaphore, uint64_t * pValue, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type getSemaphoreCounterValue( VULKAN_HPP_NAMESPACE::Semaphore semaphore, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result waitSemaphores( const VULKAN_HPP_NAMESPACE::SemaphoreWaitInfo * pWaitInfo, uint64_t timeout, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Result waitSemaphores( const VULKAN_HPP_NAMESPACE::SemaphoreWaitInfo & waitInfo, uint64_t timeout, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result signalSemaphore( const VULKAN_HPP_NAMESPACE::SemaphoreSignalInfo * pSignalInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type signalSemaphore( const VULKAN_HPP_NAMESPACE::SemaphoreSignalInfo & signalInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template DeviceAddress getBufferAddress( const VULKAN_HPP_NAMESPACE::BufferDeviceAddressInfo * pInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NAMESPACE::DeviceAddress getBufferAddress( const VULKAN_HPP_NAMESPACE::BufferDeviceAddressInfo & info, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template uint64_t getBufferOpaqueCaptureAddress( const VULKAN_HPP_NAMESPACE::BufferDeviceAddressInfo * pInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template uint64_t getBufferOpaqueCaptureAddress( const VULKAN_HPP_NAMESPACE::BufferDeviceAddressInfo & info, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template uint64_t getMemoryOpaqueCaptureAddress( const VULKAN_HPP_NAMESPACE::DeviceMemoryOpaqueCaptureAddressInfo * pInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template uint64_t getMemoryOpaqueCaptureAddress( const VULKAN_HPP_NAMESPACE::DeviceMemoryOpaqueCaptureAddressInfo & info, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_VERSION_1_3 === template VULKAN_HPP_NODISCARD Result createPrivateDataSlot( const VULKAN_HPP_NAMESPACE::PrivateDataSlotCreateInfo * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::PrivateDataSlot * pPrivateDataSlot, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type createPrivateDataSlot( const VULKAN_HPP_NAMESPACE::PrivateDataSlotCreateInfo & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD typename ResultValueType>::type createPrivateDataSlotUnique( const VULKAN_HPP_NAMESPACE::PrivateDataSlotCreateInfo & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void destroyPrivateDataSlot( VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void destroyPrivateDataSlot( VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void destroy( VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void destroy( VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD Result setPrivateData( VULKAN_HPP_NAMESPACE::ObjectType objectType, uint64_t objectHandle, VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot, uint64_t data, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #else template typename ResultValueType::type setPrivateData( VULKAN_HPP_NAMESPACE::ObjectType objectType, uint64_t objectHandle, VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot, uint64_t data, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ template void getPrivateData( VULKAN_HPP_NAMESPACE::ObjectType objectType, uint64_t objectHandle, VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot, uint64_t * pData, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD uint64_t getPrivateData( VULKAN_HPP_NAMESPACE::ObjectType objectType, uint64_t objectHandle, VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void getBufferMemoryRequirements( const VULKAN_HPP_NAMESPACE::DeviceBufferMemoryRequirements * pInfo, VULKAN_HPP_NAMESPACE::MemoryRequirements2 * pMemoryRequirements, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::MemoryRequirements2 getBufferMemoryRequirements( const VULKAN_HPP_NAMESPACE::DeviceBufferMemoryRequirements & info, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::StructureChain getBufferMemoryRequirements( const VULKAN_HPP_NAMESPACE::DeviceBufferMemoryRequirements & info, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void getImageMemoryRequirements( const VULKAN_HPP_NAMESPACE::DeviceImageMemoryRequirements * pInfo, VULKAN_HPP_NAMESPACE::MemoryRequirements2 * pMemoryRequirements, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::MemoryRequirements2 getImageMemoryRequirements( const VULKAN_HPP_NAMESPACE::DeviceImageMemoryRequirements & info, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::StructureChain getImageMemoryRequirements( const VULKAN_HPP_NAMESPACE::DeviceImageMemoryRequirements & info, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void getImageSparseMemoryRequirements( const VULKAN_HPP_NAMESPACE::DeviceImageMemoryRequirements * pInfo, uint32_t * pSparseMemoryRequirementCount, VULKAN_HPP_NAMESPACE::SparseImageMemoryRequirements2 * pSparseMemoryRequirements, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if< std::is_same::value, int>::type = 0> VULKAN_HPP_NODISCARD std::vector getImageSparseMemoryRequirements( const VULKAN_HPP_NAMESPACE::DeviceImageMemoryRequirements & info, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if< std::is_same::value, int>::type = 0> VULKAN_HPP_NODISCARD std::vector getImageSparseMemoryRequirements( const VULKAN_HPP_NAMESPACE::DeviceImageMemoryRequirements & info, SparseImageMemoryRequirements2Allocator & sparseImageMemoryRequirements2Allocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_VERSION_1_4 === template VULKAN_HPP_NODISCARD Result mapMemory2( const VULKAN_HPP_NAMESPACE::MemoryMapInfo * pMemoryMapInfo, void ** ppData, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type mapMemory2( const VULKAN_HPP_NAMESPACE::MemoryMapInfo & memoryMapInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result unmapMemory2( const VULKAN_HPP_NAMESPACE::MemoryUnmapInfo * pMemoryUnmapInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template typename ResultValueType::type unmapMemory2( const VULKAN_HPP_NAMESPACE::MemoryUnmapInfo & memoryUnmapInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void getRenderingAreaGranularity( const VULKAN_HPP_NAMESPACE::RenderingAreaInfo * pRenderingAreaInfo, VULKAN_HPP_NAMESPACE::Extent2D * pGranularity, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Extent2D getRenderingAreaGranularity( const VULKAN_HPP_NAMESPACE::RenderingAreaInfo & renderingAreaInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void getImageSubresourceLayout( const VULKAN_HPP_NAMESPACE::DeviceImageSubresourceInfo * pInfo, VULKAN_HPP_NAMESPACE::SubresourceLayout2 * pLayout, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::SubresourceLayout2 getImageSubresourceLayout( const VULKAN_HPP_NAMESPACE::DeviceImageSubresourceInfo & info, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::StructureChain getImageSubresourceLayout( const VULKAN_HPP_NAMESPACE::DeviceImageSubresourceInfo & info, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void getImageSubresourceLayout2( VULKAN_HPP_NAMESPACE::Image image, const VULKAN_HPP_NAMESPACE::ImageSubresource2 * pSubresource, VULKAN_HPP_NAMESPACE::SubresourceLayout2 * pLayout, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::SubresourceLayout2 getImageSubresourceLayout2( VULKAN_HPP_NAMESPACE::Image image, const VULKAN_HPP_NAMESPACE::ImageSubresource2 & subresource, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::StructureChain getImageSubresourceLayout2( VULKAN_HPP_NAMESPACE::Image image, const VULKAN_HPP_NAMESPACE::ImageSubresource2 & subresource, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result copyMemoryToImage( const VULKAN_HPP_NAMESPACE::CopyMemoryToImageInfo * pCopyMemoryToImageInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type copyMemoryToImage( const VULKAN_HPP_NAMESPACE::CopyMemoryToImageInfo & copyMemoryToImageInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result copyImageToMemory( const VULKAN_HPP_NAMESPACE::CopyImageToMemoryInfo * pCopyImageToMemoryInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type copyImageToMemory( const VULKAN_HPP_NAMESPACE::CopyImageToMemoryInfo & copyImageToMemoryInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result copyImageToImage( const VULKAN_HPP_NAMESPACE::CopyImageToImageInfo * pCopyImageToImageInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type copyImageToImage( const VULKAN_HPP_NAMESPACE::CopyImageToImageInfo & copyImageToImageInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result transitionImageLayout( uint32_t transitionCount, const VULKAN_HPP_NAMESPACE::HostImageLayoutTransitionInfo * pTransitions, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type transitionImageLayout( VULKAN_HPP_NAMESPACE::ArrayProxy const & transitions, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_KHR_swapchain === template VULKAN_HPP_NODISCARD Result createSwapchainKHR( const VULKAN_HPP_NAMESPACE::SwapchainCreateInfoKHR * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::SwapchainKHR * pSwapchain, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type createSwapchainKHR( const VULKAN_HPP_NAMESPACE::SwapchainCreateInfoKHR & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD typename ResultValueType>::type createSwapchainKHRUnique( const VULKAN_HPP_NAMESPACE::SwapchainCreateInfoKHR & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void destroySwapchainKHR( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void destroySwapchainKHR( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void destroy( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void destroy( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result getSwapchainImagesKHR( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, uint32_t * pSwapchainImageCount, VULKAN_HPP_NAMESPACE::Image * pSwapchainImages, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getSwapchainImagesKHR( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getSwapchainImagesKHR( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, ImageAllocator & imageAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result acquireNextImageKHR( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, uint64_t timeout, VULKAN_HPP_NAMESPACE::Semaphore semaphore, VULKAN_HPP_NAMESPACE::Fence fence, uint32_t * pImageIndex, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD ResultValue acquireNextImageKHR( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, uint64_t timeout, VULKAN_HPP_NAMESPACE::Semaphore semaphore VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, VULKAN_HPP_NAMESPACE::Fence fence VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result getGroupPresentCapabilitiesKHR( VULKAN_HPP_NAMESPACE::DeviceGroupPresentCapabilitiesKHR * pDeviceGroupPresentCapabilities, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type getGroupPresentCapabilitiesKHR( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result getGroupSurfacePresentModesKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, VULKAN_HPP_NAMESPACE::DeviceGroupPresentModeFlagsKHR * pModes, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type getGroupSurfacePresentModesKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result acquireNextImage2KHR( const VULKAN_HPP_NAMESPACE::AcquireNextImageInfoKHR * pAcquireInfo, uint32_t * pImageIndex, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD ResultValue acquireNextImage2KHR( const VULKAN_HPP_NAMESPACE::AcquireNextImageInfoKHR & acquireInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_KHR_display_swapchain === template VULKAN_HPP_NODISCARD Result createSharedSwapchainsKHR( uint32_t swapchainCount, const VULKAN_HPP_NAMESPACE::SwapchainCreateInfoKHR * pCreateInfos, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::SwapchainKHR * pSwapchains, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type createSharedSwapchainsKHR( VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type createSharedSwapchainsKHR( VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, Optional allocator, SwapchainKHRAllocator & swapchainKHRAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template VULKAN_HPP_NODISCARD typename ResultValueType::type createSharedSwapchainKHR( const VULKAN_HPP_NAMESPACE::SwapchainCreateInfoKHR & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # ifndef VULKAN_HPP_NO_SMART_HANDLE template < typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename SwapchainKHRAllocator = std::allocator>, typename std::enable_if>::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType, SwapchainKHRAllocator>>::type createSharedSwapchainsKHRUnique( VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template < typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename SwapchainKHRAllocator = std::allocator>, typename std::enable_if>::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType, SwapchainKHRAllocator>>::type createSharedSwapchainsKHRUnique( VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, Optional allocator, SwapchainKHRAllocator & swapchainKHRAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template VULKAN_HPP_NODISCARD typename ResultValueType>::type createSharedSwapchainKHRUnique( const VULKAN_HPP_NAMESPACE::SwapchainCreateInfoKHR & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_EXT_debug_marker === template VULKAN_HPP_NODISCARD Result debugMarkerSetObjectTagEXT( const VULKAN_HPP_NAMESPACE::DebugMarkerObjectTagInfoEXT * pTagInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type debugMarkerSetObjectTagEXT( const VULKAN_HPP_NAMESPACE::DebugMarkerObjectTagInfoEXT & tagInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result debugMarkerSetObjectNameEXT( const VULKAN_HPP_NAMESPACE::DebugMarkerObjectNameInfoEXT * pNameInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type debugMarkerSetObjectNameEXT( const VULKAN_HPP_NAMESPACE::DebugMarkerObjectNameInfoEXT & nameInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_KHR_video_queue === template VULKAN_HPP_NODISCARD Result createVideoSessionKHR( const VULKAN_HPP_NAMESPACE::VideoSessionCreateInfoKHR * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::VideoSessionKHR * pVideoSession, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type createVideoSessionKHR( const VULKAN_HPP_NAMESPACE::VideoSessionCreateInfoKHR & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD typename ResultValueType>::type createVideoSessionKHRUnique( const VULKAN_HPP_NAMESPACE::VideoSessionCreateInfoKHR & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void destroyVideoSessionKHR( VULKAN_HPP_NAMESPACE::VideoSessionKHR videoSession, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void destroyVideoSessionKHR( VULKAN_HPP_NAMESPACE::VideoSessionKHR videoSession VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void destroy( VULKAN_HPP_NAMESPACE::VideoSessionKHR videoSession, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void destroy( VULKAN_HPP_NAMESPACE::VideoSessionKHR videoSession, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result getVideoSessionMemoryRequirementsKHR( VULKAN_HPP_NAMESPACE::VideoSessionKHR videoSession, uint32_t * pMemoryRequirementsCount, VULKAN_HPP_NAMESPACE::VideoSessionMemoryRequirementsKHR * pMemoryRequirements, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if< std::is_same::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getVideoSessionMemoryRequirementsKHR( VULKAN_HPP_NAMESPACE::VideoSessionKHR videoSession, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if< std::is_same::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getVideoSessionMemoryRequirementsKHR( VULKAN_HPP_NAMESPACE::VideoSessionKHR videoSession, VideoSessionMemoryRequirementsKHRAllocator & videoSessionMemoryRequirementsKHRAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result bindVideoSessionMemoryKHR( VULKAN_HPP_NAMESPACE::VideoSessionKHR videoSession, uint32_t bindSessionMemoryInfoCount, const VULKAN_HPP_NAMESPACE::BindVideoSessionMemoryInfoKHR * pBindSessionMemoryInfos, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type bindVideoSessionMemoryKHR( VULKAN_HPP_NAMESPACE::VideoSessionKHR videoSession, VULKAN_HPP_NAMESPACE::ArrayProxy const & bindSessionMemoryInfos, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result createVideoSessionParametersKHR( const VULKAN_HPP_NAMESPACE::VideoSessionParametersCreateInfoKHR * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::VideoSessionParametersKHR * pVideoSessionParameters, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type createVideoSessionParametersKHR( const VULKAN_HPP_NAMESPACE::VideoSessionParametersCreateInfoKHR & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD typename ResultValueType>::type createVideoSessionParametersKHRUnique( const VULKAN_HPP_NAMESPACE::VideoSessionParametersCreateInfoKHR & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result updateVideoSessionParametersKHR( VULKAN_HPP_NAMESPACE::VideoSessionParametersKHR videoSessionParameters, const VULKAN_HPP_NAMESPACE::VideoSessionParametersUpdateInfoKHR * pUpdateInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type updateVideoSessionParametersKHR( VULKAN_HPP_NAMESPACE::VideoSessionParametersKHR videoSessionParameters, const VULKAN_HPP_NAMESPACE::VideoSessionParametersUpdateInfoKHR & updateInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void destroyVideoSessionParametersKHR( VULKAN_HPP_NAMESPACE::VideoSessionParametersKHR videoSessionParameters, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void destroyVideoSessionParametersKHR( VULKAN_HPP_NAMESPACE::VideoSessionParametersKHR videoSessionParameters VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void destroy( VULKAN_HPP_NAMESPACE::VideoSessionParametersKHR videoSessionParameters, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void destroy( VULKAN_HPP_NAMESPACE::VideoSessionParametersKHR videoSessionParameters, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_NVX_binary_import === template VULKAN_HPP_NODISCARD Result createCuModuleNVX( const VULKAN_HPP_NAMESPACE::CuModuleCreateInfoNVX * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::CuModuleNVX * pModule, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type createCuModuleNVX( const VULKAN_HPP_NAMESPACE::CuModuleCreateInfoNVX & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD typename ResultValueType>::type createCuModuleNVXUnique( const VULKAN_HPP_NAMESPACE::CuModuleCreateInfoNVX & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result createCuFunctionNVX( const VULKAN_HPP_NAMESPACE::CuFunctionCreateInfoNVX * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::CuFunctionNVX * pFunction, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type createCuFunctionNVX( const VULKAN_HPP_NAMESPACE::CuFunctionCreateInfoNVX & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD typename ResultValueType>::type createCuFunctionNVXUnique( const VULKAN_HPP_NAMESPACE::CuFunctionCreateInfoNVX & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void destroyCuModuleNVX( VULKAN_HPP_NAMESPACE::CuModuleNVX module, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void destroyCuModuleNVX( VULKAN_HPP_NAMESPACE::CuModuleNVX module, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void destroy( VULKAN_HPP_NAMESPACE::CuModuleNVX module, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void destroy( VULKAN_HPP_NAMESPACE::CuModuleNVX module, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void destroyCuFunctionNVX( VULKAN_HPP_NAMESPACE::CuFunctionNVX function, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void destroyCuFunctionNVX( VULKAN_HPP_NAMESPACE::CuFunctionNVX function, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void destroy( VULKAN_HPP_NAMESPACE::CuFunctionNVX function, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void destroy( VULKAN_HPP_NAMESPACE::CuFunctionNVX function, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_NVX_image_view_handle === template uint32_t getImageViewHandleNVX( const VULKAN_HPP_NAMESPACE::ImageViewHandleInfoNVX * pInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template uint32_t getImageViewHandleNVX( const VULKAN_HPP_NAMESPACE::ImageViewHandleInfoNVX & info, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template uint64_t getImageViewHandle64NVX( const VULKAN_HPP_NAMESPACE::ImageViewHandleInfoNVX * pInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template uint64_t getImageViewHandle64NVX( const VULKAN_HPP_NAMESPACE::ImageViewHandleInfoNVX & info, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result getImageViewAddressNVX( VULKAN_HPP_NAMESPACE::ImageView imageView, VULKAN_HPP_NAMESPACE::ImageViewAddressPropertiesNVX * pProperties, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type getImageViewAddressNVX( VULKAN_HPP_NAMESPACE::ImageView imageView, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_AMD_shader_info === template VULKAN_HPP_NODISCARD Result getShaderInfoAMD( VULKAN_HPP_NAMESPACE::Pipeline pipeline, VULKAN_HPP_NAMESPACE::ShaderStageFlagBits shaderStage, VULKAN_HPP_NAMESPACE::ShaderInfoTypeAMD infoType, size_t * pInfoSize, void * pInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getShaderInfoAMD( VULKAN_HPP_NAMESPACE::Pipeline pipeline, VULKAN_HPP_NAMESPACE::ShaderStageFlagBits shaderStage, VULKAN_HPP_NAMESPACE::ShaderInfoTypeAMD infoType, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getShaderInfoAMD( VULKAN_HPP_NAMESPACE::Pipeline pipeline, VULKAN_HPP_NAMESPACE::ShaderStageFlagBits shaderStage, VULKAN_HPP_NAMESPACE::ShaderInfoTypeAMD infoType, Uint8_tAllocator & uint8_tAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_NV_external_memory_win32 === template VULKAN_HPP_NODISCARD Result getMemoryWin32HandleNV( VULKAN_HPP_NAMESPACE::DeviceMemory memory, VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagsNV handleType, HANDLE * pHandle, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type getMemoryWin32HandleNV( VULKAN_HPP_NAMESPACE::DeviceMemory memory, VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagsNV handleType, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_KHR_device_group === template void getGroupPeerMemoryFeaturesKHR( uint32_t heapIndex, uint32_t localDeviceIndex, uint32_t remoteDeviceIndex, VULKAN_HPP_NAMESPACE::PeerMemoryFeatureFlags * pPeerMemoryFeatures, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::PeerMemoryFeatureFlags getGroupPeerMemoryFeaturesKHR( uint32_t heapIndex, uint32_t localDeviceIndex, uint32_t remoteDeviceIndex, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_KHR_maintenance1 === template void trimCommandPoolKHR( VULKAN_HPP_NAMESPACE::CommandPool commandPool, VULKAN_HPP_NAMESPACE::CommandPoolTrimFlags flags, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_KHR_external_memory_win32 === template VULKAN_HPP_NODISCARD Result getMemoryWin32HandleKHR( const VULKAN_HPP_NAMESPACE::MemoryGetWin32HandleInfoKHR * pGetWin32HandleInfo, HANDLE * pHandle, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type getMemoryWin32HandleKHR( const VULKAN_HPP_NAMESPACE::MemoryGetWin32HandleInfoKHR & getWin32HandleInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result getMemoryWin32HandlePropertiesKHR( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType, HANDLE handle, VULKAN_HPP_NAMESPACE::MemoryWin32HandlePropertiesKHR * pMemoryWin32HandleProperties, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type getMemoryWin32HandlePropertiesKHR( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType, HANDLE handle, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_KHR_external_memory_fd === template VULKAN_HPP_NODISCARD Result getMemoryFdKHR( const VULKAN_HPP_NAMESPACE::MemoryGetFdInfoKHR * pGetFdInfo, int * pFd, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type getMemoryFdKHR( const VULKAN_HPP_NAMESPACE::MemoryGetFdInfoKHR & getFdInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result getMemoryFdPropertiesKHR( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType, int fd, VULKAN_HPP_NAMESPACE::MemoryFdPropertiesKHR * pMemoryFdProperties, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type getMemoryFdPropertiesKHR( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType, int fd, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_KHR_external_semaphore_win32 === template VULKAN_HPP_NODISCARD Result importSemaphoreWin32HandleKHR( const VULKAN_HPP_NAMESPACE::ImportSemaphoreWin32HandleInfoKHR * pImportSemaphoreWin32HandleInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type importSemaphoreWin32HandleKHR( const VULKAN_HPP_NAMESPACE::ImportSemaphoreWin32HandleInfoKHR & importSemaphoreWin32HandleInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result getSemaphoreWin32HandleKHR( const VULKAN_HPP_NAMESPACE::SemaphoreGetWin32HandleInfoKHR * pGetWin32HandleInfo, HANDLE * pHandle, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type getSemaphoreWin32HandleKHR( const VULKAN_HPP_NAMESPACE::SemaphoreGetWin32HandleInfoKHR & getWin32HandleInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_KHR_external_semaphore_fd === template VULKAN_HPP_NODISCARD Result importSemaphoreFdKHR( const VULKAN_HPP_NAMESPACE::ImportSemaphoreFdInfoKHR * pImportSemaphoreFdInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type importSemaphoreFdKHR( const VULKAN_HPP_NAMESPACE::ImportSemaphoreFdInfoKHR & importSemaphoreFdInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result getSemaphoreFdKHR( const VULKAN_HPP_NAMESPACE::SemaphoreGetFdInfoKHR * pGetFdInfo, int * pFd, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type getSemaphoreFdKHR( const VULKAN_HPP_NAMESPACE::SemaphoreGetFdInfoKHR & getFdInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_KHR_descriptor_update_template === template VULKAN_HPP_NODISCARD Result createDescriptorUpdateTemplateKHR( const VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateCreateInfo * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate * pDescriptorUpdateTemplate, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type createDescriptorUpdateTemplateKHR( const VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateCreateInfo & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD typename ResultValueType>::type createDescriptorUpdateTemplateKHRUnique( const VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateCreateInfo & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void destroyDescriptorUpdateTemplateKHR( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void destroyDescriptorUpdateTemplateKHR( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void updateDescriptorSetWithTemplateKHR( VULKAN_HPP_NAMESPACE::DescriptorSet descriptorSet, VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate, const void * pData, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void updateDescriptorSetWithTemplateKHR( VULKAN_HPP_NAMESPACE::DescriptorSet descriptorSet, VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate, DataType const & data, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_EXT_display_control === template VULKAN_HPP_NODISCARD Result displayPowerControlEXT( VULKAN_HPP_NAMESPACE::DisplayKHR display, const VULKAN_HPP_NAMESPACE::DisplayPowerInfoEXT * pDisplayPowerInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template typename ResultValueType::type displayPowerControlEXT( VULKAN_HPP_NAMESPACE::DisplayKHR display, const VULKAN_HPP_NAMESPACE::DisplayPowerInfoEXT & displayPowerInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result registerEventEXT( const VULKAN_HPP_NAMESPACE::DeviceEventInfoEXT * pDeviceEventInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::Fence * pFence, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type registerEventEXT( const VULKAN_HPP_NAMESPACE::DeviceEventInfoEXT & deviceEventInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD typename ResultValueType>::type registerEventEXTUnique( const VULKAN_HPP_NAMESPACE::DeviceEventInfoEXT & deviceEventInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result registerDisplayEventEXT( VULKAN_HPP_NAMESPACE::DisplayKHR display, const VULKAN_HPP_NAMESPACE::DisplayEventInfoEXT * pDisplayEventInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::Fence * pFence, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type registerDisplayEventEXT( VULKAN_HPP_NAMESPACE::DisplayKHR display, const VULKAN_HPP_NAMESPACE::DisplayEventInfoEXT & displayEventInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD typename ResultValueType>::type registerDisplayEventEXTUnique( VULKAN_HPP_NAMESPACE::DisplayKHR display, const VULKAN_HPP_NAMESPACE::DisplayEventInfoEXT & displayEventInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result getSwapchainCounterEXT( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, VULKAN_HPP_NAMESPACE::SurfaceCounterFlagBitsEXT counter, uint64_t * pCounterValue, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type getSwapchainCounterEXT( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, VULKAN_HPP_NAMESPACE::SurfaceCounterFlagBitsEXT counter, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_GOOGLE_display_timing === template VULKAN_HPP_NODISCARD Result getRefreshCycleDurationGOOGLE( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, VULKAN_HPP_NAMESPACE::RefreshCycleDurationGOOGLE * pDisplayTimingProperties, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type getRefreshCycleDurationGOOGLE( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result getPastPresentationTimingGOOGLE( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, uint32_t * pPresentationTimingCount, VULKAN_HPP_NAMESPACE::PastPresentationTimingGOOGLE * pPresentationTimings, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if< std::is_same::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getPastPresentationTimingGOOGLE( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if< std::is_same::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getPastPresentationTimingGOOGLE( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, PastPresentationTimingGOOGLEAllocator & pastPresentationTimingGOOGLEAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_EXT_hdr_metadata === template void setHdrMetadataEXT( uint32_t swapchainCount, const VULKAN_HPP_NAMESPACE::SwapchainKHR * pSwapchains, const VULKAN_HPP_NAMESPACE::HdrMetadataEXT * pMetadata, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void setHdrMetadataEXT( VULKAN_HPP_NAMESPACE::ArrayProxy const & swapchains, VULKAN_HPP_NAMESPACE::ArrayProxy const & metadata, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_KHR_create_renderpass2 === template VULKAN_HPP_NODISCARD Result createRenderPass2KHR( const VULKAN_HPP_NAMESPACE::RenderPassCreateInfo2 * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::RenderPass * pRenderPass, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type createRenderPass2KHR( const VULKAN_HPP_NAMESPACE::RenderPassCreateInfo2 & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD typename ResultValueType>::type createRenderPass2KHRUnique( const VULKAN_HPP_NAMESPACE::RenderPassCreateInfo2 & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_KHR_shared_presentable_image === #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD Result getSwapchainStatusKHR( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #else template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Result getSwapchainStatusKHR( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_KHR_external_fence_win32 === template VULKAN_HPP_NODISCARD Result importFenceWin32HandleKHR( const VULKAN_HPP_NAMESPACE::ImportFenceWin32HandleInfoKHR * pImportFenceWin32HandleInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type importFenceWin32HandleKHR( const VULKAN_HPP_NAMESPACE::ImportFenceWin32HandleInfoKHR & importFenceWin32HandleInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result getFenceWin32HandleKHR( const VULKAN_HPP_NAMESPACE::FenceGetWin32HandleInfoKHR * pGetWin32HandleInfo, HANDLE * pHandle, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type getFenceWin32HandleKHR( const VULKAN_HPP_NAMESPACE::FenceGetWin32HandleInfoKHR & getWin32HandleInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_KHR_external_fence_fd === template VULKAN_HPP_NODISCARD Result importFenceFdKHR( const VULKAN_HPP_NAMESPACE::ImportFenceFdInfoKHR * pImportFenceFdInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type importFenceFdKHR( const VULKAN_HPP_NAMESPACE::ImportFenceFdInfoKHR & importFenceFdInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result getFenceFdKHR( const VULKAN_HPP_NAMESPACE::FenceGetFdInfoKHR * pGetFdInfo, int * pFd, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type getFenceFdKHR( const VULKAN_HPP_NAMESPACE::FenceGetFdInfoKHR & getFdInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_KHR_performance_query === template VULKAN_HPP_NODISCARD Result acquireProfilingLockKHR( const VULKAN_HPP_NAMESPACE::AcquireProfilingLockInfoKHR * pInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type acquireProfilingLockKHR( const VULKAN_HPP_NAMESPACE::AcquireProfilingLockInfoKHR & info, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void releaseProfilingLockKHR( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; //=== VK_EXT_debug_utils === template VULKAN_HPP_NODISCARD Result setDebugUtilsObjectNameEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsObjectNameInfoEXT * pNameInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type setDebugUtilsObjectNameEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsObjectNameInfoEXT & nameInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result setDebugUtilsObjectTagEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsObjectTagInfoEXT * pTagInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type setDebugUtilsObjectTagEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsObjectTagInfoEXT & tagInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #if defined( VK_USE_PLATFORM_ANDROID_KHR ) //=== VK_ANDROID_external_memory_android_hardware_buffer === template VULKAN_HPP_NODISCARD Result getAndroidHardwareBufferPropertiesANDROID( const struct AHardwareBuffer * buffer, VULKAN_HPP_NAMESPACE::AndroidHardwareBufferPropertiesANDROID * pProperties, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type getAndroidHardwareBufferPropertiesANDROID( const struct AHardwareBuffer & buffer, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template VULKAN_HPP_NODISCARD typename ResultValueType>::type getAndroidHardwareBufferPropertiesANDROID( const struct AHardwareBuffer & buffer, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result getMemoryAndroidHardwareBufferANDROID( const VULKAN_HPP_NAMESPACE::MemoryGetAndroidHardwareBufferInfoANDROID * pInfo, struct AHardwareBuffer ** pBuffer, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type getMemoryAndroidHardwareBufferANDROID( const VULKAN_HPP_NAMESPACE::MemoryGetAndroidHardwareBufferInfoANDROID & info, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #endif /*VK_USE_PLATFORM_ANDROID_KHR*/ #if defined( VK_ENABLE_BETA_EXTENSIONS ) //=== VK_AMDX_shader_enqueue === template VULKAN_HPP_NODISCARD Result createExecutionGraphPipelinesAMDX( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, uint32_t createInfoCount, const VULKAN_HPP_NAMESPACE::ExecutionGraphPipelineCreateInfoAMDX * pCreateInfos, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::Pipeline * pPipelines, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD ResultValue> createExecutionGraphPipelinesAMDX( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD ResultValue> createExecutionGraphPipelinesAMDX( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, Optional allocator, PipelineAllocator & pipelineAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template VULKAN_HPP_NODISCARD ResultValue createExecutionGraphPipelineAMDX( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, const VULKAN_HPP_NAMESPACE::ExecutionGraphPipelineCreateInfoAMDX & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # ifndef VULKAN_HPP_NO_SMART_HANDLE template >, typename std::enable_if>::value, int>::type = 0> VULKAN_HPP_NODISCARD ResultValue, PipelineAllocator>> createExecutionGraphPipelinesAMDXUnique( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template >, typename std::enable_if>::value, int>::type = 0> VULKAN_HPP_NODISCARD ResultValue, PipelineAllocator>> createExecutionGraphPipelinesAMDXUnique( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, Optional allocator, PipelineAllocator & pipelineAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template VULKAN_HPP_NODISCARD ResultValue> createExecutionGraphPipelineAMDXUnique( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, const VULKAN_HPP_NAMESPACE::ExecutionGraphPipelineCreateInfoAMDX & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_NO_SMART_HANDLE */ # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result getExecutionGraphPipelineScratchSizeAMDX( VULKAN_HPP_NAMESPACE::Pipeline executionGraph, VULKAN_HPP_NAMESPACE::ExecutionGraphPipelineScratchSizeAMDX * pSizeInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type getExecutionGraphPipelineScratchSizeAMDX( VULKAN_HPP_NAMESPACE::Pipeline executionGraph, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result getExecutionGraphPipelineNodeIndexAMDX( VULKAN_HPP_NAMESPACE::Pipeline executionGraph, const VULKAN_HPP_NAMESPACE::PipelineShaderStageNodeCreateInfoAMDX * pNodeInfo, uint32_t * pNodeIndex, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type getExecutionGraphPipelineNodeIndexAMDX( VULKAN_HPP_NAMESPACE::Pipeline executionGraph, const VULKAN_HPP_NAMESPACE::PipelineShaderStageNodeCreateInfoAMDX & nodeInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #endif /*VK_ENABLE_BETA_EXTENSIONS*/ //=== VK_KHR_get_memory_requirements2 === template void getImageMemoryRequirements2KHR( const VULKAN_HPP_NAMESPACE::ImageMemoryRequirementsInfo2 * pInfo, VULKAN_HPP_NAMESPACE::MemoryRequirements2 * pMemoryRequirements, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::MemoryRequirements2 getImageMemoryRequirements2KHR( const VULKAN_HPP_NAMESPACE::ImageMemoryRequirementsInfo2 & info, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::StructureChain getImageMemoryRequirements2KHR( const VULKAN_HPP_NAMESPACE::ImageMemoryRequirementsInfo2 & info, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void getBufferMemoryRequirements2KHR( const VULKAN_HPP_NAMESPACE::BufferMemoryRequirementsInfo2 * pInfo, VULKAN_HPP_NAMESPACE::MemoryRequirements2 * pMemoryRequirements, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::MemoryRequirements2 getBufferMemoryRequirements2KHR( const VULKAN_HPP_NAMESPACE::BufferMemoryRequirementsInfo2 & info, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::StructureChain getBufferMemoryRequirements2KHR( const VULKAN_HPP_NAMESPACE::BufferMemoryRequirementsInfo2 & info, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void getImageSparseMemoryRequirements2KHR( const VULKAN_HPP_NAMESPACE::ImageSparseMemoryRequirementsInfo2 * pInfo, uint32_t * pSparseMemoryRequirementCount, VULKAN_HPP_NAMESPACE::SparseImageMemoryRequirements2 * pSparseMemoryRequirements, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if< std::is_same::value, int>::type = 0> VULKAN_HPP_NODISCARD std::vector getImageSparseMemoryRequirements2KHR( const VULKAN_HPP_NAMESPACE::ImageSparseMemoryRequirementsInfo2 & info, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if< std::is_same::value, int>::type = 0> VULKAN_HPP_NODISCARD std::vector getImageSparseMemoryRequirements2KHR( const VULKAN_HPP_NAMESPACE::ImageSparseMemoryRequirementsInfo2 & info, SparseImageMemoryRequirements2Allocator & sparseImageMemoryRequirements2Allocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_KHR_acceleration_structure === template VULKAN_HPP_NODISCARD Result createAccelerationStructureKHR( const VULKAN_HPP_NAMESPACE::AccelerationStructureCreateInfoKHR * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::AccelerationStructureKHR * pAccelerationStructure, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type createAccelerationStructureKHR( const VULKAN_HPP_NAMESPACE::AccelerationStructureCreateInfoKHR & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD typename ResultValueType>::type createAccelerationStructureKHRUnique( const VULKAN_HPP_NAMESPACE::AccelerationStructureCreateInfoKHR & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void destroyAccelerationStructureKHR( VULKAN_HPP_NAMESPACE::AccelerationStructureKHR accelerationStructure, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void destroyAccelerationStructureKHR( VULKAN_HPP_NAMESPACE::AccelerationStructureKHR accelerationStructure VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void destroy( VULKAN_HPP_NAMESPACE::AccelerationStructureKHR accelerationStructure, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void destroy( VULKAN_HPP_NAMESPACE::AccelerationStructureKHR accelerationStructure, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result buildAccelerationStructuresKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, uint32_t infoCount, const VULKAN_HPP_NAMESPACE::AccelerationStructureBuildGeometryInfoKHR * pInfos, const VULKAN_HPP_NAMESPACE::AccelerationStructureBuildRangeInfoKHR * const * ppBuildRangeInfos, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Result buildAccelerationStructuresKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, VULKAN_HPP_NAMESPACE::ArrayProxy const & infos, VULKAN_HPP_NAMESPACE::ArrayProxy const & pBuildRangeInfos, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result copyAccelerationStructureKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, const VULKAN_HPP_NAMESPACE::CopyAccelerationStructureInfoKHR * pInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Result copyAccelerationStructureKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, const VULKAN_HPP_NAMESPACE::CopyAccelerationStructureInfoKHR & info, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result copyAccelerationStructureToMemoryKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, const VULKAN_HPP_NAMESPACE::CopyAccelerationStructureToMemoryInfoKHR * pInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Result copyAccelerationStructureToMemoryKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, const VULKAN_HPP_NAMESPACE::CopyAccelerationStructureToMemoryInfoKHR & info, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result copyMemoryToAccelerationStructureKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, const VULKAN_HPP_NAMESPACE::CopyMemoryToAccelerationStructureInfoKHR * pInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Result copyMemoryToAccelerationStructureKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, const VULKAN_HPP_NAMESPACE::CopyMemoryToAccelerationStructureInfoKHR & info, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result writeAccelerationStructuresPropertiesKHR( uint32_t accelerationStructureCount, const VULKAN_HPP_NAMESPACE::AccelerationStructureKHR * pAccelerationStructures, VULKAN_HPP_NAMESPACE::QueryType queryType, size_t dataSize, void * pData, size_t stride, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type writeAccelerationStructuresPropertiesKHR( VULKAN_HPP_NAMESPACE::ArrayProxy const & accelerationStructures, VULKAN_HPP_NAMESPACE::QueryType queryType, size_t dataSize, size_t stride, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template VULKAN_HPP_NODISCARD typename ResultValueType::type writeAccelerationStructuresPropertyKHR( VULKAN_HPP_NAMESPACE::ArrayProxy const & accelerationStructures, VULKAN_HPP_NAMESPACE::QueryType queryType, size_t stride, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template DeviceAddress getAccelerationStructureAddressKHR( const VULKAN_HPP_NAMESPACE::AccelerationStructureDeviceAddressInfoKHR * pInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NAMESPACE::DeviceAddress getAccelerationStructureAddressKHR( const VULKAN_HPP_NAMESPACE::AccelerationStructureDeviceAddressInfoKHR & info, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void getAccelerationStructureCompatibilityKHR( const VULKAN_HPP_NAMESPACE::AccelerationStructureVersionInfoKHR * pVersionInfo, VULKAN_HPP_NAMESPACE::AccelerationStructureCompatibilityKHR * pCompatibility, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::AccelerationStructureCompatibilityKHR getAccelerationStructureCompatibilityKHR( const VULKAN_HPP_NAMESPACE::AccelerationStructureVersionInfoKHR & versionInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void getAccelerationStructureBuildSizesKHR( VULKAN_HPP_NAMESPACE::AccelerationStructureBuildTypeKHR buildType, const VULKAN_HPP_NAMESPACE::AccelerationStructureBuildGeometryInfoKHR * pBuildInfo, const uint32_t * pMaxPrimitiveCounts, VULKAN_HPP_NAMESPACE::AccelerationStructureBuildSizesInfoKHR * pSizeInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::AccelerationStructureBuildSizesInfoKHR getAccelerationStructureBuildSizesKHR( VULKAN_HPP_NAMESPACE::AccelerationStructureBuildTypeKHR buildType, const VULKAN_HPP_NAMESPACE::AccelerationStructureBuildGeometryInfoKHR & buildInfo, VULKAN_HPP_NAMESPACE::ArrayProxy const & maxPrimitiveCounts VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_KHR_ray_tracing_pipeline === template VULKAN_HPP_NODISCARD Result createRayTracingPipelinesKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, uint32_t createInfoCount, const VULKAN_HPP_NAMESPACE::RayTracingPipelineCreateInfoKHR * pCreateInfos, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::Pipeline * pPipelines, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD ResultValue> createRayTracingPipelinesKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD ResultValue> createRayTracingPipelinesKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, Optional allocator, PipelineAllocator & pipelineAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template VULKAN_HPP_NODISCARD ResultValue createRayTracingPipelineKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, const VULKAN_HPP_NAMESPACE::RayTracingPipelineCreateInfoKHR & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # ifndef VULKAN_HPP_NO_SMART_HANDLE template >, typename std::enable_if>::value, int>::type = 0> VULKAN_HPP_NODISCARD ResultValue, PipelineAllocator>> createRayTracingPipelinesKHRUnique( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template >, typename std::enable_if>::value, int>::type = 0> VULKAN_HPP_NODISCARD ResultValue, PipelineAllocator>> createRayTracingPipelinesKHRUnique( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, Optional allocator, PipelineAllocator & pipelineAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template VULKAN_HPP_NODISCARD ResultValue> createRayTracingPipelineKHRUnique( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, const VULKAN_HPP_NAMESPACE::RayTracingPipelineCreateInfoKHR & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result getRayTracingShaderGroupHandlesKHR( VULKAN_HPP_NAMESPACE::Pipeline pipeline, uint32_t firstGroup, uint32_t groupCount, size_t dataSize, void * pData, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getRayTracingShaderGroupHandlesKHR( VULKAN_HPP_NAMESPACE::Pipeline pipeline, uint32_t firstGroup, uint32_t groupCount, size_t dataSize, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template VULKAN_HPP_NODISCARD typename ResultValueType::type getRayTracingShaderGroupHandleKHR( VULKAN_HPP_NAMESPACE::Pipeline pipeline, uint32_t firstGroup, uint32_t groupCount, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result getRayTracingCaptureReplayShaderGroupHandlesKHR( VULKAN_HPP_NAMESPACE::Pipeline pipeline, uint32_t firstGroup, uint32_t groupCount, size_t dataSize, void * pData, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getRayTracingCaptureReplayShaderGroupHandlesKHR( VULKAN_HPP_NAMESPACE::Pipeline pipeline, uint32_t firstGroup, uint32_t groupCount, size_t dataSize, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template VULKAN_HPP_NODISCARD typename ResultValueType::type getRayTracingCaptureReplayShaderGroupHandleKHR( VULKAN_HPP_NAMESPACE::Pipeline pipeline, uint32_t firstGroup, uint32_t groupCount, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template DeviceSize getRayTracingShaderGroupStackSizeKHR( VULKAN_HPP_NAMESPACE::Pipeline pipeline, uint32_t group, VULKAN_HPP_NAMESPACE::ShaderGroupShaderKHR groupShader, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; //=== VK_KHR_sampler_ycbcr_conversion === template VULKAN_HPP_NODISCARD Result createSamplerYcbcrConversionKHR( const VULKAN_HPP_NAMESPACE::SamplerYcbcrConversionCreateInfo * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion * pYcbcrConversion, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type createSamplerYcbcrConversionKHR( const VULKAN_HPP_NAMESPACE::SamplerYcbcrConversionCreateInfo & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD typename ResultValueType>::type createSamplerYcbcrConversionKHRUnique( const VULKAN_HPP_NAMESPACE::SamplerYcbcrConversionCreateInfo & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void destroySamplerYcbcrConversionKHR( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion ycbcrConversion, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void destroySamplerYcbcrConversionKHR( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion ycbcrConversion VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_KHR_bind_memory2 === template VULKAN_HPP_NODISCARD Result bindBufferMemory2KHR( uint32_t bindInfoCount, const VULKAN_HPP_NAMESPACE::BindBufferMemoryInfo * pBindInfos, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type bindBufferMemory2KHR( VULKAN_HPP_NAMESPACE::ArrayProxy const & bindInfos, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result bindImageMemory2KHR( uint32_t bindInfoCount, const VULKAN_HPP_NAMESPACE::BindImageMemoryInfo * pBindInfos, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type bindImageMemory2KHR( VULKAN_HPP_NAMESPACE::ArrayProxy const & bindInfos, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_EXT_image_drm_format_modifier === template VULKAN_HPP_NODISCARD Result getImageDrmFormatModifierPropertiesEXT( VULKAN_HPP_NAMESPACE::Image image, VULKAN_HPP_NAMESPACE::ImageDrmFormatModifierPropertiesEXT * pProperties, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type getImageDrmFormatModifierPropertiesEXT( VULKAN_HPP_NAMESPACE::Image image, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_EXT_validation_cache === template VULKAN_HPP_NODISCARD Result createValidationCacheEXT( const VULKAN_HPP_NAMESPACE::ValidationCacheCreateInfoEXT * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::ValidationCacheEXT * pValidationCache, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type createValidationCacheEXT( const VULKAN_HPP_NAMESPACE::ValidationCacheCreateInfoEXT & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD typename ResultValueType>::type createValidationCacheEXTUnique( const VULKAN_HPP_NAMESPACE::ValidationCacheCreateInfoEXT & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void destroyValidationCacheEXT( VULKAN_HPP_NAMESPACE::ValidationCacheEXT validationCache, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void destroyValidationCacheEXT( VULKAN_HPP_NAMESPACE::ValidationCacheEXT validationCache VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void destroy( VULKAN_HPP_NAMESPACE::ValidationCacheEXT validationCache, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void destroy( VULKAN_HPP_NAMESPACE::ValidationCacheEXT validationCache, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result mergeValidationCachesEXT( VULKAN_HPP_NAMESPACE::ValidationCacheEXT dstCache, uint32_t srcCacheCount, const VULKAN_HPP_NAMESPACE::ValidationCacheEXT * pSrcCaches, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type mergeValidationCachesEXT( VULKAN_HPP_NAMESPACE::ValidationCacheEXT dstCache, VULKAN_HPP_NAMESPACE::ArrayProxy const & srcCaches, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result getValidationCacheDataEXT( VULKAN_HPP_NAMESPACE::ValidationCacheEXT validationCache, size_t * pDataSize, void * pData, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getValidationCacheDataEXT( VULKAN_HPP_NAMESPACE::ValidationCacheEXT validationCache, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getValidationCacheDataEXT( VULKAN_HPP_NAMESPACE::ValidationCacheEXT validationCache, Uint8_tAllocator & uint8_tAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_NV_ray_tracing === template VULKAN_HPP_NODISCARD Result createAccelerationStructureNV( const VULKAN_HPP_NAMESPACE::AccelerationStructureCreateInfoNV * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::AccelerationStructureNV * pAccelerationStructure, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type createAccelerationStructureNV( const VULKAN_HPP_NAMESPACE::AccelerationStructureCreateInfoNV & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD typename ResultValueType>::type createAccelerationStructureNVUnique( const VULKAN_HPP_NAMESPACE::AccelerationStructureCreateInfoNV & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void destroyAccelerationStructureNV( VULKAN_HPP_NAMESPACE::AccelerationStructureNV accelerationStructure, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void destroyAccelerationStructureNV( VULKAN_HPP_NAMESPACE::AccelerationStructureNV accelerationStructure VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void destroy( VULKAN_HPP_NAMESPACE::AccelerationStructureNV accelerationStructure, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void destroy( VULKAN_HPP_NAMESPACE::AccelerationStructureNV accelerationStructure, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void getAccelerationStructureMemoryRequirementsNV( const VULKAN_HPP_NAMESPACE::AccelerationStructureMemoryRequirementsInfoNV * pInfo, VULKAN_HPP_NAMESPACE::MemoryRequirements2KHR * pMemoryRequirements, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::MemoryRequirements2KHR getAccelerationStructureMemoryRequirementsNV( const VULKAN_HPP_NAMESPACE::AccelerationStructureMemoryRequirementsInfoNV & info, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::StructureChain getAccelerationStructureMemoryRequirementsNV( const VULKAN_HPP_NAMESPACE::AccelerationStructureMemoryRequirementsInfoNV & info, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result bindAccelerationStructureMemoryNV( uint32_t bindInfoCount, const VULKAN_HPP_NAMESPACE::BindAccelerationStructureMemoryInfoNV * pBindInfos, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type bindAccelerationStructureMemoryNV( VULKAN_HPP_NAMESPACE::ArrayProxy const & bindInfos, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result createRayTracingPipelinesNV( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, uint32_t createInfoCount, const VULKAN_HPP_NAMESPACE::RayTracingPipelineCreateInfoNV * pCreateInfos, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::Pipeline * pPipelines, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD ResultValue> createRayTracingPipelinesNV( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD ResultValue> createRayTracingPipelinesNV( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, Optional allocator, PipelineAllocator & pipelineAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template VULKAN_HPP_NODISCARD ResultValue createRayTracingPipelineNV( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, const VULKAN_HPP_NAMESPACE::RayTracingPipelineCreateInfoNV & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # ifndef VULKAN_HPP_NO_SMART_HANDLE template >, typename std::enable_if>::value, int>::type = 0> VULKAN_HPP_NODISCARD ResultValue, PipelineAllocator>> createRayTracingPipelinesNVUnique( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template >, typename std::enable_if>::value, int>::type = 0> VULKAN_HPP_NODISCARD ResultValue, PipelineAllocator>> createRayTracingPipelinesNVUnique( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, Optional allocator, PipelineAllocator & pipelineAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template VULKAN_HPP_NODISCARD ResultValue> createRayTracingPipelineNVUnique( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, const VULKAN_HPP_NAMESPACE::RayTracingPipelineCreateInfoNV & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result getRayTracingShaderGroupHandlesNV( VULKAN_HPP_NAMESPACE::Pipeline pipeline, uint32_t firstGroup, uint32_t groupCount, size_t dataSize, void * pData, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getRayTracingShaderGroupHandlesNV( VULKAN_HPP_NAMESPACE::Pipeline pipeline, uint32_t firstGroup, uint32_t groupCount, size_t dataSize, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template VULKAN_HPP_NODISCARD typename ResultValueType::type getRayTracingShaderGroupHandleNV( VULKAN_HPP_NAMESPACE::Pipeline pipeline, uint32_t firstGroup, uint32_t groupCount, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result getAccelerationStructureHandleNV( VULKAN_HPP_NAMESPACE::AccelerationStructureNV accelerationStructure, size_t dataSize, void * pData, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getAccelerationStructureHandleNV( VULKAN_HPP_NAMESPACE::AccelerationStructureNV accelerationStructure, size_t dataSize, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template VULKAN_HPP_NODISCARD typename ResultValueType::type getAccelerationStructureHandleNV( VULKAN_HPP_NAMESPACE::AccelerationStructureNV accelerationStructure, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD Result compileDeferredNV( VULKAN_HPP_NAMESPACE::Pipeline pipeline, uint32_t shader, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #else template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type compileDeferredNV( VULKAN_HPP_NAMESPACE::Pipeline pipeline, uint32_t shader, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ //=== VK_KHR_maintenance3 === template void getDescriptorSetLayoutSupportKHR( const VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateInfo * pCreateInfo, VULKAN_HPP_NAMESPACE::DescriptorSetLayoutSupport * pSupport, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::DescriptorSetLayoutSupport getDescriptorSetLayoutSupportKHR( const VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateInfo & createInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::StructureChain getDescriptorSetLayoutSupportKHR( const VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateInfo & createInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_EXT_external_memory_host === template VULKAN_HPP_NODISCARD Result getMemoryHostPointerPropertiesEXT( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType, const void * pHostPointer, VULKAN_HPP_NAMESPACE::MemoryHostPointerPropertiesEXT * pMemoryHostPointerProperties, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type getMemoryHostPointerPropertiesEXT( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType, const void * pHostPointer, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_EXT_calibrated_timestamps === template VULKAN_HPP_NODISCARD Result getCalibratedTimestampsEXT( uint32_t timestampCount, const VULKAN_HPP_NAMESPACE::CalibratedTimestampInfoKHR * pTimestampInfos, uint64_t * pTimestamps, uint64_t * pMaxDeviation, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType, uint64_t>>::type getCalibratedTimestampsEXT( VULKAN_HPP_NAMESPACE::ArrayProxy const & timestampInfos, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType, uint64_t>>::type getCalibratedTimestampsEXT( VULKAN_HPP_NAMESPACE::ArrayProxy const & timestampInfos, Uint64_tAllocator & uint64_tAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template VULKAN_HPP_NODISCARD typename ResultValueType>::type getCalibratedTimestampEXT( const VULKAN_HPP_NAMESPACE::CalibratedTimestampInfoKHR & timestampInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_KHR_timeline_semaphore === template VULKAN_HPP_NODISCARD Result getSemaphoreCounterValueKHR( VULKAN_HPP_NAMESPACE::Semaphore semaphore, uint64_t * pValue, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type getSemaphoreCounterValueKHR( VULKAN_HPP_NAMESPACE::Semaphore semaphore, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result waitSemaphoresKHR( const VULKAN_HPP_NAMESPACE::SemaphoreWaitInfo * pWaitInfo, uint64_t timeout, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Result waitSemaphoresKHR( const VULKAN_HPP_NAMESPACE::SemaphoreWaitInfo & waitInfo, uint64_t timeout, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result signalSemaphoreKHR( const VULKAN_HPP_NAMESPACE::SemaphoreSignalInfo * pSignalInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type signalSemaphoreKHR( const VULKAN_HPP_NAMESPACE::SemaphoreSignalInfo & signalInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_INTEL_performance_query === template VULKAN_HPP_NODISCARD Result initializePerformanceApiINTEL( const VULKAN_HPP_NAMESPACE::InitializePerformanceApiInfoINTEL * pInitializeInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type initializePerformanceApiINTEL( const VULKAN_HPP_NAMESPACE::InitializePerformanceApiInfoINTEL & initializeInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void uninitializePerformanceApiINTEL( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template VULKAN_HPP_NODISCARD Result acquirePerformanceConfigurationINTEL( const VULKAN_HPP_NAMESPACE::PerformanceConfigurationAcquireInfoINTEL * pAcquireInfo, VULKAN_HPP_NAMESPACE::PerformanceConfigurationINTEL * pConfiguration, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type acquirePerformanceConfigurationINTEL( const VULKAN_HPP_NAMESPACE::PerformanceConfigurationAcquireInfoINTEL & acquireInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD typename ResultValueType>::type acquirePerformanceConfigurationINTELUnique( const VULKAN_HPP_NAMESPACE::PerformanceConfigurationAcquireInfoINTEL & acquireInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD Result releasePerformanceConfigurationINTEL( VULKAN_HPP_NAMESPACE::PerformanceConfigurationINTEL configuration, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #else template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type releasePerformanceConfigurationINTEL( VULKAN_HPP_NAMESPACE::PerformanceConfigurationINTEL configuration VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD Result release( VULKAN_HPP_NAMESPACE::PerformanceConfigurationINTEL configuration, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #else template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type release( VULKAN_HPP_NAMESPACE::PerformanceConfigurationINTEL configuration, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ template VULKAN_HPP_NODISCARD Result getPerformanceParameterINTEL( VULKAN_HPP_NAMESPACE::PerformanceParameterTypeINTEL parameter, VULKAN_HPP_NAMESPACE::PerformanceValueINTEL * pValue, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type getPerformanceParameterINTEL( VULKAN_HPP_NAMESPACE::PerformanceParameterTypeINTEL parameter, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_AMD_display_native_hdr === template void setLocalDimmingAMD( VULKAN_HPP_NAMESPACE::SwapchainKHR swapChain, VULKAN_HPP_NAMESPACE::Bool32 localDimmingEnable, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; //=== VK_EXT_buffer_device_address === template DeviceAddress getBufferAddressEXT( const VULKAN_HPP_NAMESPACE::BufferDeviceAddressInfo * pInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NAMESPACE::DeviceAddress getBufferAddressEXT( const VULKAN_HPP_NAMESPACE::BufferDeviceAddressInfo & info, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_KHR_present_wait === #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD Result waitForPresentKHR( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, uint64_t presentId, uint64_t timeout, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #else template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Result waitForPresentKHR( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, uint64_t presentId, uint64_t timeout, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_EXT_full_screen_exclusive === # ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD Result acquireFullScreenExclusiveModeEXT( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; # else template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type acquireFullScreenExclusiveModeEXT( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ # ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD Result releaseFullScreenExclusiveModeEXT( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; # else template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type releaseFullScreenExclusiveModeEXT( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ template VULKAN_HPP_NODISCARD Result getGroupSurfacePresentModes2EXT( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR * pSurfaceInfo, VULKAN_HPP_NAMESPACE::DeviceGroupPresentModeFlagsKHR * pModes, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type getGroupSurfacePresentModes2EXT( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR & surfaceInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_KHR_buffer_device_address === template DeviceAddress getBufferAddressKHR( const VULKAN_HPP_NAMESPACE::BufferDeviceAddressInfo * pInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NAMESPACE::DeviceAddress getBufferAddressKHR( const VULKAN_HPP_NAMESPACE::BufferDeviceAddressInfo & info, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template uint64_t getBufferOpaqueCaptureAddressKHR( const VULKAN_HPP_NAMESPACE::BufferDeviceAddressInfo * pInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template uint64_t getBufferOpaqueCaptureAddressKHR( const VULKAN_HPP_NAMESPACE::BufferDeviceAddressInfo & info, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template uint64_t getMemoryOpaqueCaptureAddressKHR( const VULKAN_HPP_NAMESPACE::DeviceMemoryOpaqueCaptureAddressInfo * pInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template uint64_t getMemoryOpaqueCaptureAddressKHR( const VULKAN_HPP_NAMESPACE::DeviceMemoryOpaqueCaptureAddressInfo & info, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_EXT_host_query_reset === template void resetQueryPoolEXT( VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; //=== VK_KHR_deferred_host_operations === template VULKAN_HPP_NODISCARD Result createDeferredOperationKHR( const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::DeferredOperationKHR * pDeferredOperation, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type createDeferredOperationKHR( Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD typename ResultValueType>::type createDeferredOperationKHRUnique( Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void destroyDeferredOperationKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR operation, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void destroyDeferredOperationKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR operation VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void destroy( VULKAN_HPP_NAMESPACE::DeferredOperationKHR operation, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void destroy( VULKAN_HPP_NAMESPACE::DeferredOperationKHR operation, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template uint32_t getDeferredOperationMaxConcurrencyKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR operation, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD Result getDeferredOperationResultKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR operation, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #else template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Result getDeferredOperationResultKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR operation, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD Result deferredOperationJoinKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR operation, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #else template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Result deferredOperationJoinKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR operation, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ //=== VK_KHR_pipeline_executable_properties === template VULKAN_HPP_NODISCARD Result getPipelineExecutablePropertiesKHR( const VULKAN_HPP_NAMESPACE::PipelineInfoKHR * pPipelineInfo, uint32_t * pExecutableCount, VULKAN_HPP_NAMESPACE::PipelineExecutablePropertiesKHR * pProperties, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if< std::is_same::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getPipelineExecutablePropertiesKHR( const VULKAN_HPP_NAMESPACE::PipelineInfoKHR & pipelineInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if< std::is_same::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getPipelineExecutablePropertiesKHR( const VULKAN_HPP_NAMESPACE::PipelineInfoKHR & pipelineInfo, PipelineExecutablePropertiesKHRAllocator & pipelineExecutablePropertiesKHRAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result getPipelineExecutableStatisticsKHR( const VULKAN_HPP_NAMESPACE::PipelineExecutableInfoKHR * pExecutableInfo, uint32_t * pStatisticCount, VULKAN_HPP_NAMESPACE::PipelineExecutableStatisticKHR * pStatistics, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if< std::is_same::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getPipelineExecutableStatisticsKHR( const VULKAN_HPP_NAMESPACE::PipelineExecutableInfoKHR & executableInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if< std::is_same::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getPipelineExecutableStatisticsKHR( const VULKAN_HPP_NAMESPACE::PipelineExecutableInfoKHR & executableInfo, PipelineExecutableStatisticKHRAllocator & pipelineExecutableStatisticKHRAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result getPipelineExecutableInternalRepresentationsKHR( const VULKAN_HPP_NAMESPACE::PipelineExecutableInfoKHR * pExecutableInfo, uint32_t * pInternalRepresentationCount, VULKAN_HPP_NAMESPACE::PipelineExecutableInternalRepresentationKHR * pInternalRepresentations, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType< std::vector>::type getPipelineExecutableInternalRepresentationsKHR( const VULKAN_HPP_NAMESPACE::PipelineExecutableInfoKHR & executableInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType< std::vector>::type getPipelineExecutableInternalRepresentationsKHR( const VULKAN_HPP_NAMESPACE::PipelineExecutableInfoKHR & executableInfo, PipelineExecutableInternalRepresentationKHRAllocator & pipelineExecutableInternalRepresentationKHRAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_EXT_host_image_copy === template VULKAN_HPP_NODISCARD Result copyMemoryToImageEXT( const VULKAN_HPP_NAMESPACE::CopyMemoryToImageInfo * pCopyMemoryToImageInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type copyMemoryToImageEXT( const VULKAN_HPP_NAMESPACE::CopyMemoryToImageInfo & copyMemoryToImageInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result copyImageToMemoryEXT( const VULKAN_HPP_NAMESPACE::CopyImageToMemoryInfo * pCopyImageToMemoryInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type copyImageToMemoryEXT( const VULKAN_HPP_NAMESPACE::CopyImageToMemoryInfo & copyImageToMemoryInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result copyImageToImageEXT( const VULKAN_HPP_NAMESPACE::CopyImageToImageInfo * pCopyImageToImageInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type copyImageToImageEXT( const VULKAN_HPP_NAMESPACE::CopyImageToImageInfo & copyImageToImageInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result transitionImageLayoutEXT( uint32_t transitionCount, const VULKAN_HPP_NAMESPACE::HostImageLayoutTransitionInfo * pTransitions, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type transitionImageLayoutEXT( VULKAN_HPP_NAMESPACE::ArrayProxy const & transitions, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void getImageSubresourceLayout2EXT( VULKAN_HPP_NAMESPACE::Image image, const VULKAN_HPP_NAMESPACE::ImageSubresource2 * pSubresource, VULKAN_HPP_NAMESPACE::SubresourceLayout2 * pLayout, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::SubresourceLayout2 getImageSubresourceLayout2EXT( VULKAN_HPP_NAMESPACE::Image image, const VULKAN_HPP_NAMESPACE::ImageSubresource2 & subresource, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::StructureChain getImageSubresourceLayout2EXT( VULKAN_HPP_NAMESPACE::Image image, const VULKAN_HPP_NAMESPACE::ImageSubresource2 & subresource, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_KHR_map_memory2 === template VULKAN_HPP_NODISCARD Result mapMemory2KHR( const VULKAN_HPP_NAMESPACE::MemoryMapInfo * pMemoryMapInfo, void ** ppData, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type mapMemory2KHR( const VULKAN_HPP_NAMESPACE::MemoryMapInfo & memoryMapInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result unmapMemory2KHR( const VULKAN_HPP_NAMESPACE::MemoryUnmapInfo * pMemoryUnmapInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template typename ResultValueType::type unmapMemory2KHR( const VULKAN_HPP_NAMESPACE::MemoryUnmapInfo & memoryUnmapInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_EXT_swapchain_maintenance1 === template VULKAN_HPP_NODISCARD Result releaseSwapchainImagesEXT( const VULKAN_HPP_NAMESPACE::ReleaseSwapchainImagesInfoEXT * pReleaseInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template typename ResultValueType::type releaseSwapchainImagesEXT( const VULKAN_HPP_NAMESPACE::ReleaseSwapchainImagesInfoEXT & releaseInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_NV_device_generated_commands === template void getGeneratedCommandsMemoryRequirementsNV( const VULKAN_HPP_NAMESPACE::GeneratedCommandsMemoryRequirementsInfoNV * pInfo, VULKAN_HPP_NAMESPACE::MemoryRequirements2 * pMemoryRequirements, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::MemoryRequirements2 getGeneratedCommandsMemoryRequirementsNV( const VULKAN_HPP_NAMESPACE::GeneratedCommandsMemoryRequirementsInfoNV & info, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::StructureChain getGeneratedCommandsMemoryRequirementsNV( const VULKAN_HPP_NAMESPACE::GeneratedCommandsMemoryRequirementsInfoNV & info, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result createIndirectCommandsLayoutNV( const VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutCreateInfoNV * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNV * pIndirectCommandsLayout, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type createIndirectCommandsLayoutNV( const VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutCreateInfoNV & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD typename ResultValueType>::type createIndirectCommandsLayoutNVUnique( const VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutCreateInfoNV & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void destroyIndirectCommandsLayoutNV( VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNV indirectCommandsLayout, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void destroyIndirectCommandsLayoutNV( VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNV indirectCommandsLayout VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void destroy( VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNV indirectCommandsLayout, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void destroy( VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNV indirectCommandsLayout, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_EXT_private_data === template VULKAN_HPP_NODISCARD Result createPrivateDataSlotEXT( const VULKAN_HPP_NAMESPACE::PrivateDataSlotCreateInfo * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::PrivateDataSlot * pPrivateDataSlot, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type createPrivateDataSlotEXT( const VULKAN_HPP_NAMESPACE::PrivateDataSlotCreateInfo & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD typename ResultValueType>::type createPrivateDataSlotEXTUnique( const VULKAN_HPP_NAMESPACE::PrivateDataSlotCreateInfo & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void destroyPrivateDataSlotEXT( VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void destroyPrivateDataSlotEXT( VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD Result setPrivateDataEXT( VULKAN_HPP_NAMESPACE::ObjectType objectType, uint64_t objectHandle, VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot, uint64_t data, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #else template typename ResultValueType::type setPrivateDataEXT( VULKAN_HPP_NAMESPACE::ObjectType objectType, uint64_t objectHandle, VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot, uint64_t data, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ template void getPrivateDataEXT( VULKAN_HPP_NAMESPACE::ObjectType objectType, uint64_t objectHandle, VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot, uint64_t * pData, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD uint64_t getPrivateDataEXT( VULKAN_HPP_NAMESPACE::ObjectType objectType, uint64_t objectHandle, VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_KHR_video_encode_queue === template VULKAN_HPP_NODISCARD Result getEncodedVideoSessionParametersKHR( const VULKAN_HPP_NAMESPACE::VideoEncodeSessionParametersGetInfoKHR * pVideoSessionParametersInfo, VULKAN_HPP_NAMESPACE::VideoEncodeSessionParametersFeedbackInfoKHR * pFeedbackInfo, size_t * pDataSize, void * pData, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>>::type getEncodedVideoSessionParametersKHR( const VULKAN_HPP_NAMESPACE::VideoEncodeSessionParametersGetInfoKHR & videoSessionParametersInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>>::type getEncodedVideoSessionParametersKHR( const VULKAN_HPP_NAMESPACE::VideoEncodeSessionParametersGetInfoKHR & videoSessionParametersInfo, Uint8_tAllocator & uint8_tAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType, std::vector>>::type getEncodedVideoSessionParametersKHR( const VULKAN_HPP_NAMESPACE::VideoEncodeSessionParametersGetInfoKHR & videoSessionParametersInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType, std::vector>>::type getEncodedVideoSessionParametersKHR( const VULKAN_HPP_NAMESPACE::VideoEncodeSessionParametersGetInfoKHR & videoSessionParametersInfo, Uint8_tAllocator & uint8_tAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #if defined( VK_ENABLE_BETA_EXTENSIONS ) //=== VK_NV_cuda_kernel_launch === template VULKAN_HPP_NODISCARD Result createCudaModuleNV( const VULKAN_HPP_NAMESPACE::CudaModuleCreateInfoNV * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::CudaModuleNV * pModule, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type createCudaModuleNV( const VULKAN_HPP_NAMESPACE::CudaModuleCreateInfoNV & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD typename ResultValueType>::type createCudaModuleNVUnique( const VULKAN_HPP_NAMESPACE::CudaModuleCreateInfoNV & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_NO_SMART_HANDLE */ # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result getCudaModuleCacheNV( VULKAN_HPP_NAMESPACE::CudaModuleNV module, size_t * pCacheSize, void * pCacheData, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getCudaModuleCacheNV( VULKAN_HPP_NAMESPACE::CudaModuleNV module, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getCudaModuleCacheNV( VULKAN_HPP_NAMESPACE::CudaModuleNV module, Uint8_tAllocator & uint8_tAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result createCudaFunctionNV( const VULKAN_HPP_NAMESPACE::CudaFunctionCreateInfoNV * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::CudaFunctionNV * pFunction, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type createCudaFunctionNV( const VULKAN_HPP_NAMESPACE::CudaFunctionCreateInfoNV & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD typename ResultValueType>::type createCudaFunctionNVUnique( const VULKAN_HPP_NAMESPACE::CudaFunctionCreateInfoNV & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_NO_SMART_HANDLE */ # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void destroyCudaModuleNV( VULKAN_HPP_NAMESPACE::CudaModuleNV module, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void destroyCudaModuleNV( VULKAN_HPP_NAMESPACE::CudaModuleNV module, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void destroy( VULKAN_HPP_NAMESPACE::CudaModuleNV module, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void destroy( VULKAN_HPP_NAMESPACE::CudaModuleNV module, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void destroyCudaFunctionNV( VULKAN_HPP_NAMESPACE::CudaFunctionNV function, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void destroyCudaFunctionNV( VULKAN_HPP_NAMESPACE::CudaFunctionNV function, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void destroy( VULKAN_HPP_NAMESPACE::CudaFunctionNV function, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void destroy( VULKAN_HPP_NAMESPACE::CudaFunctionNV function, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #endif /*VK_ENABLE_BETA_EXTENSIONS*/ #if defined( VK_USE_PLATFORM_METAL_EXT ) //=== VK_EXT_metal_objects === template void exportMetalObjectsEXT( VULKAN_HPP_NAMESPACE::ExportMetalObjectsInfoEXT * pMetalObjectsInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::ExportMetalObjectsInfoEXT exportMetalObjectsEXT( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::StructureChain exportMetalObjectsEXT( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #endif /*VK_USE_PLATFORM_METAL_EXT*/ //=== VK_EXT_descriptor_buffer === template void getDescriptorSetLayoutSizeEXT( VULKAN_HPP_NAMESPACE::DescriptorSetLayout layout, VULKAN_HPP_NAMESPACE::DeviceSize * pLayoutSizeInBytes, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::DeviceSize getDescriptorSetLayoutSizeEXT( VULKAN_HPP_NAMESPACE::DescriptorSetLayout layout, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void getDescriptorSetLayoutBindingOffsetEXT( VULKAN_HPP_NAMESPACE::DescriptorSetLayout layout, uint32_t binding, VULKAN_HPP_NAMESPACE::DeviceSize * pOffset, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::DeviceSize getDescriptorSetLayoutBindingOffsetEXT( VULKAN_HPP_NAMESPACE::DescriptorSetLayout layout, uint32_t binding, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void getDescriptorEXT( const VULKAN_HPP_NAMESPACE::DescriptorGetInfoEXT * pDescriptorInfo, size_t dataSize, void * pDescriptor, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void getDescriptorEXT( const VULKAN_HPP_NAMESPACE::DescriptorGetInfoEXT & descriptorInfo, size_t dataSize, void * pDescriptor, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template VULKAN_HPP_NODISCARD DescriptorType getDescriptorEXT( const VULKAN_HPP_NAMESPACE::DescriptorGetInfoEXT & descriptorInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result getBufferOpaqueCaptureDescriptorDataEXT( const VULKAN_HPP_NAMESPACE::BufferCaptureDescriptorDataInfoEXT * pInfo, void * pData, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type getBufferOpaqueCaptureDescriptorDataEXT( const VULKAN_HPP_NAMESPACE::BufferCaptureDescriptorDataInfoEXT & info, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result getImageOpaqueCaptureDescriptorDataEXT( const VULKAN_HPP_NAMESPACE::ImageCaptureDescriptorDataInfoEXT * pInfo, void * pData, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type getImageOpaqueCaptureDescriptorDataEXT( const VULKAN_HPP_NAMESPACE::ImageCaptureDescriptorDataInfoEXT & info, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result getImageViewOpaqueCaptureDescriptorDataEXT( const VULKAN_HPP_NAMESPACE::ImageViewCaptureDescriptorDataInfoEXT * pInfo, void * pData, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type getImageViewOpaqueCaptureDescriptorDataEXT( const VULKAN_HPP_NAMESPACE::ImageViewCaptureDescriptorDataInfoEXT & info, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result getSamplerOpaqueCaptureDescriptorDataEXT( const VULKAN_HPP_NAMESPACE::SamplerCaptureDescriptorDataInfoEXT * pInfo, void * pData, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type getSamplerOpaqueCaptureDescriptorDataEXT( const VULKAN_HPP_NAMESPACE::SamplerCaptureDescriptorDataInfoEXT & info, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result getAccelerationStructureOpaqueCaptureDescriptorDataEXT( const VULKAN_HPP_NAMESPACE::AccelerationStructureCaptureDescriptorDataInfoEXT * pInfo, void * pData, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type getAccelerationStructureOpaqueCaptureDescriptorDataEXT( const VULKAN_HPP_NAMESPACE::AccelerationStructureCaptureDescriptorDataInfoEXT & info, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_EXT_device_fault === template VULKAN_HPP_NODISCARD Result getFaultInfoEXT( VULKAN_HPP_NAMESPACE::DeviceFaultCountsEXT * pFaultCounts, VULKAN_HPP_NAMESPACE::DeviceFaultInfoEXT * pFaultInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #if defined( VK_USE_PLATFORM_FUCHSIA ) //=== VK_FUCHSIA_external_memory === template VULKAN_HPP_NODISCARD Result getMemoryZirconHandleFUCHSIA( const VULKAN_HPP_NAMESPACE::MemoryGetZirconHandleInfoFUCHSIA * pGetZirconHandleInfo, zx_handle_t * pZirconHandle, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type getMemoryZirconHandleFUCHSIA( const VULKAN_HPP_NAMESPACE::MemoryGetZirconHandleInfoFUCHSIA & getZirconHandleInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result getMemoryZirconHandlePropertiesFUCHSIA( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType, zx_handle_t zirconHandle, VULKAN_HPP_NAMESPACE::MemoryZirconHandlePropertiesFUCHSIA * pMemoryZirconHandleProperties, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type getMemoryZirconHandlePropertiesFUCHSIA( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType, zx_handle_t zirconHandle, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #endif /*VK_USE_PLATFORM_FUCHSIA*/ #if defined( VK_USE_PLATFORM_FUCHSIA ) //=== VK_FUCHSIA_external_semaphore === template VULKAN_HPP_NODISCARD Result importSemaphoreZirconHandleFUCHSIA( const VULKAN_HPP_NAMESPACE::ImportSemaphoreZirconHandleInfoFUCHSIA * pImportSemaphoreZirconHandleInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type importSemaphoreZirconHandleFUCHSIA( const VULKAN_HPP_NAMESPACE::ImportSemaphoreZirconHandleInfoFUCHSIA & importSemaphoreZirconHandleInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result getSemaphoreZirconHandleFUCHSIA( const VULKAN_HPP_NAMESPACE::SemaphoreGetZirconHandleInfoFUCHSIA * pGetZirconHandleInfo, zx_handle_t * pZirconHandle, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type getSemaphoreZirconHandleFUCHSIA( const VULKAN_HPP_NAMESPACE::SemaphoreGetZirconHandleInfoFUCHSIA & getZirconHandleInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #endif /*VK_USE_PLATFORM_FUCHSIA*/ #if defined( VK_USE_PLATFORM_FUCHSIA ) //=== VK_FUCHSIA_buffer_collection === template VULKAN_HPP_NODISCARD Result createBufferCollectionFUCHSIA( const VULKAN_HPP_NAMESPACE::BufferCollectionCreateInfoFUCHSIA * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::BufferCollectionFUCHSIA * pCollection, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type createBufferCollectionFUCHSIA( const VULKAN_HPP_NAMESPACE::BufferCollectionCreateInfoFUCHSIA & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD typename ResultValueType>::type createBufferCollectionFUCHSIAUnique( const VULKAN_HPP_NAMESPACE::BufferCollectionCreateInfoFUCHSIA & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_NO_SMART_HANDLE */ # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result setBufferCollectionImageConstraintsFUCHSIA( VULKAN_HPP_NAMESPACE::BufferCollectionFUCHSIA collection, const VULKAN_HPP_NAMESPACE::ImageConstraintsInfoFUCHSIA * pImageConstraintsInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type setBufferCollectionImageConstraintsFUCHSIA( VULKAN_HPP_NAMESPACE::BufferCollectionFUCHSIA collection, const VULKAN_HPP_NAMESPACE::ImageConstraintsInfoFUCHSIA & imageConstraintsInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result setBufferCollectionBufferConstraintsFUCHSIA( VULKAN_HPP_NAMESPACE::BufferCollectionFUCHSIA collection, const VULKAN_HPP_NAMESPACE::BufferConstraintsInfoFUCHSIA * pBufferConstraintsInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type setBufferCollectionBufferConstraintsFUCHSIA( VULKAN_HPP_NAMESPACE::BufferCollectionFUCHSIA collection, const VULKAN_HPP_NAMESPACE::BufferConstraintsInfoFUCHSIA & bufferConstraintsInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void destroyBufferCollectionFUCHSIA( VULKAN_HPP_NAMESPACE::BufferCollectionFUCHSIA collection, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void destroyBufferCollectionFUCHSIA( VULKAN_HPP_NAMESPACE::BufferCollectionFUCHSIA collection, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void destroy( VULKAN_HPP_NAMESPACE::BufferCollectionFUCHSIA collection, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void destroy( VULKAN_HPP_NAMESPACE::BufferCollectionFUCHSIA collection, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result getBufferCollectionPropertiesFUCHSIA( VULKAN_HPP_NAMESPACE::BufferCollectionFUCHSIA collection, VULKAN_HPP_NAMESPACE::BufferCollectionPropertiesFUCHSIA * pProperties, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type getBufferCollectionPropertiesFUCHSIA( VULKAN_HPP_NAMESPACE::BufferCollectionFUCHSIA collection, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #endif /*VK_USE_PLATFORM_FUCHSIA*/ //=== VK_HUAWEI_subpass_shading === template VULKAN_HPP_NODISCARD Result getSubpassShadingMaxWorkgroupSizeHUAWEI( VULKAN_HPP_NAMESPACE::RenderPass renderpass, VULKAN_HPP_NAMESPACE::Extent2D * pMaxWorkgroupSize, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type getSubpassShadingMaxWorkgroupSizeHUAWEI( VULKAN_HPP_NAMESPACE::RenderPass renderpass, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_NV_external_memory_rdma === template VULKAN_HPP_NODISCARD Result getMemoryRemoteAddressNV( const VULKAN_HPP_NAMESPACE::MemoryGetRemoteAddressInfoNV * pMemoryGetRemoteAddressInfo, VULKAN_HPP_NAMESPACE::RemoteAddressNV * pAddress, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type getMemoryRemoteAddressNV( const VULKAN_HPP_NAMESPACE::MemoryGetRemoteAddressInfoNV & memoryGetRemoteAddressInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_EXT_pipeline_properties === template VULKAN_HPP_NODISCARD Result getPipelinePropertiesEXT( const VULKAN_HPP_NAMESPACE::PipelineInfoEXT * pPipelineInfo, VULKAN_HPP_NAMESPACE::BaseOutStructure * pPipelineProperties, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type getPipelinePropertiesEXT( const VULKAN_HPP_NAMESPACE::PipelineInfoEXT & pipelineInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_EXT_opacity_micromap === template VULKAN_HPP_NODISCARD Result createMicromapEXT( const VULKAN_HPP_NAMESPACE::MicromapCreateInfoEXT * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::MicromapEXT * pMicromap, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type createMicromapEXT( const VULKAN_HPP_NAMESPACE::MicromapCreateInfoEXT & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD typename ResultValueType>::type createMicromapEXTUnique( const VULKAN_HPP_NAMESPACE::MicromapCreateInfoEXT & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void destroyMicromapEXT( VULKAN_HPP_NAMESPACE::MicromapEXT micromap, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void destroyMicromapEXT( VULKAN_HPP_NAMESPACE::MicromapEXT micromap VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void destroy( VULKAN_HPP_NAMESPACE::MicromapEXT micromap, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void destroy( VULKAN_HPP_NAMESPACE::MicromapEXT micromap, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result buildMicromapsEXT( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, uint32_t infoCount, const VULKAN_HPP_NAMESPACE::MicromapBuildInfoEXT * pInfos, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Result buildMicromapsEXT( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, VULKAN_HPP_NAMESPACE::ArrayProxy const & infos, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result copyMicromapEXT( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, const VULKAN_HPP_NAMESPACE::CopyMicromapInfoEXT * pInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Result copyMicromapEXT( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, const VULKAN_HPP_NAMESPACE::CopyMicromapInfoEXT & info, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result copyMicromapToMemoryEXT( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, const VULKAN_HPP_NAMESPACE::CopyMicromapToMemoryInfoEXT * pInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Result copyMicromapToMemoryEXT( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, const VULKAN_HPP_NAMESPACE::CopyMicromapToMemoryInfoEXT & info, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result copyMemoryToMicromapEXT( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, const VULKAN_HPP_NAMESPACE::CopyMemoryToMicromapInfoEXT * pInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Result copyMemoryToMicromapEXT( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, const VULKAN_HPP_NAMESPACE::CopyMemoryToMicromapInfoEXT & info, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result writeMicromapsPropertiesEXT( uint32_t micromapCount, const VULKAN_HPP_NAMESPACE::MicromapEXT * pMicromaps, VULKAN_HPP_NAMESPACE::QueryType queryType, size_t dataSize, void * pData, size_t stride, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type writeMicromapsPropertiesEXT( VULKAN_HPP_NAMESPACE::ArrayProxy const & micromaps, VULKAN_HPP_NAMESPACE::QueryType queryType, size_t dataSize, size_t stride, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template VULKAN_HPP_NODISCARD typename ResultValueType::type writeMicromapsPropertyEXT( VULKAN_HPP_NAMESPACE::ArrayProxy const & micromaps, VULKAN_HPP_NAMESPACE::QueryType queryType, size_t stride, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void getMicromapCompatibilityEXT( const VULKAN_HPP_NAMESPACE::MicromapVersionInfoEXT * pVersionInfo, VULKAN_HPP_NAMESPACE::AccelerationStructureCompatibilityKHR * pCompatibility, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::AccelerationStructureCompatibilityKHR getMicromapCompatibilityEXT( const VULKAN_HPP_NAMESPACE::MicromapVersionInfoEXT & versionInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void getMicromapBuildSizesEXT( VULKAN_HPP_NAMESPACE::AccelerationStructureBuildTypeKHR buildType, const VULKAN_HPP_NAMESPACE::MicromapBuildInfoEXT * pBuildInfo, VULKAN_HPP_NAMESPACE::MicromapBuildSizesInfoEXT * pSizeInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::MicromapBuildSizesInfoEXT getMicromapBuildSizesEXT( VULKAN_HPP_NAMESPACE::AccelerationStructureBuildTypeKHR buildType, const VULKAN_HPP_NAMESPACE::MicromapBuildInfoEXT & buildInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_EXT_pageable_device_local_memory === template void setMemoryPriorityEXT( VULKAN_HPP_NAMESPACE::DeviceMemory memory, float priority, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; //=== VK_KHR_maintenance4 === template void getBufferMemoryRequirementsKHR( const VULKAN_HPP_NAMESPACE::DeviceBufferMemoryRequirements * pInfo, VULKAN_HPP_NAMESPACE::MemoryRequirements2 * pMemoryRequirements, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::MemoryRequirements2 getBufferMemoryRequirementsKHR( const VULKAN_HPP_NAMESPACE::DeviceBufferMemoryRequirements & info, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::StructureChain getBufferMemoryRequirementsKHR( const VULKAN_HPP_NAMESPACE::DeviceBufferMemoryRequirements & info, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void getImageMemoryRequirementsKHR( const VULKAN_HPP_NAMESPACE::DeviceImageMemoryRequirements * pInfo, VULKAN_HPP_NAMESPACE::MemoryRequirements2 * pMemoryRequirements, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::MemoryRequirements2 getImageMemoryRequirementsKHR( const VULKAN_HPP_NAMESPACE::DeviceImageMemoryRequirements & info, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::StructureChain getImageMemoryRequirementsKHR( const VULKAN_HPP_NAMESPACE::DeviceImageMemoryRequirements & info, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void getImageSparseMemoryRequirementsKHR( const VULKAN_HPP_NAMESPACE::DeviceImageMemoryRequirements * pInfo, uint32_t * pSparseMemoryRequirementCount, VULKAN_HPP_NAMESPACE::SparseImageMemoryRequirements2 * pSparseMemoryRequirements, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if< std::is_same::value, int>::type = 0> VULKAN_HPP_NODISCARD std::vector getImageSparseMemoryRequirementsKHR( const VULKAN_HPP_NAMESPACE::DeviceImageMemoryRequirements & info, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if< std::is_same::value, int>::type = 0> VULKAN_HPP_NODISCARD std::vector getImageSparseMemoryRequirementsKHR( const VULKAN_HPP_NAMESPACE::DeviceImageMemoryRequirements & info, SparseImageMemoryRequirements2Allocator & sparseImageMemoryRequirements2Allocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_VALVE_descriptor_set_host_mapping === template void getDescriptorSetLayoutHostMappingInfoVALVE( const VULKAN_HPP_NAMESPACE::DescriptorSetBindingReferenceVALVE * pBindingReference, VULKAN_HPP_NAMESPACE::DescriptorSetLayoutHostMappingInfoVALVE * pHostMapping, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::DescriptorSetLayoutHostMappingInfoVALVE getDescriptorSetLayoutHostMappingInfoVALVE( const VULKAN_HPP_NAMESPACE::DescriptorSetBindingReferenceVALVE & bindingReference, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void getDescriptorSetHostMappingVALVE( VULKAN_HPP_NAMESPACE::DescriptorSet descriptorSet, void ** ppData, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD void * getDescriptorSetHostMappingVALVE( VULKAN_HPP_NAMESPACE::DescriptorSet descriptorSet, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_NV_device_generated_commands_compute === template void getPipelineIndirectMemoryRequirementsNV( const VULKAN_HPP_NAMESPACE::ComputePipelineCreateInfo * pCreateInfo, VULKAN_HPP_NAMESPACE::MemoryRequirements2 * pMemoryRequirements, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::MemoryRequirements2 getPipelineIndirectMemoryRequirementsNV( const VULKAN_HPP_NAMESPACE::ComputePipelineCreateInfo & createInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::StructureChain getPipelineIndirectMemoryRequirementsNV( const VULKAN_HPP_NAMESPACE::ComputePipelineCreateInfo & createInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template DeviceAddress getPipelineIndirectAddressNV( const VULKAN_HPP_NAMESPACE::PipelineIndirectDeviceAddressInfoNV * pInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NAMESPACE::DeviceAddress getPipelineIndirectAddressNV( const VULKAN_HPP_NAMESPACE::PipelineIndirectDeviceAddressInfoNV & info, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_EXT_shader_module_identifier === template void getShaderModuleIdentifierEXT( VULKAN_HPP_NAMESPACE::ShaderModule shaderModule, VULKAN_HPP_NAMESPACE::ShaderModuleIdentifierEXT * pIdentifier, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::ShaderModuleIdentifierEXT getShaderModuleIdentifierEXT( VULKAN_HPP_NAMESPACE::ShaderModule shaderModule, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void getShaderModuleCreateInfoIdentifierEXT( const VULKAN_HPP_NAMESPACE::ShaderModuleCreateInfo * pCreateInfo, VULKAN_HPP_NAMESPACE::ShaderModuleIdentifierEXT * pIdentifier, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::ShaderModuleIdentifierEXT getShaderModuleCreateInfoIdentifierEXT( const VULKAN_HPP_NAMESPACE::ShaderModuleCreateInfo & createInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_NV_optical_flow === template VULKAN_HPP_NODISCARD Result createOpticalFlowSessionNV( const VULKAN_HPP_NAMESPACE::OpticalFlowSessionCreateInfoNV * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::OpticalFlowSessionNV * pSession, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type createOpticalFlowSessionNV( const VULKAN_HPP_NAMESPACE::OpticalFlowSessionCreateInfoNV & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD typename ResultValueType>::type createOpticalFlowSessionNVUnique( const VULKAN_HPP_NAMESPACE::OpticalFlowSessionCreateInfoNV & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void destroyOpticalFlowSessionNV( VULKAN_HPP_NAMESPACE::OpticalFlowSessionNV session, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void destroyOpticalFlowSessionNV( VULKAN_HPP_NAMESPACE::OpticalFlowSessionNV session, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void destroy( VULKAN_HPP_NAMESPACE::OpticalFlowSessionNV session, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void destroy( VULKAN_HPP_NAMESPACE::OpticalFlowSessionNV session, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD Result bindOpticalFlowSessionImageNV( VULKAN_HPP_NAMESPACE::OpticalFlowSessionNV session, VULKAN_HPP_NAMESPACE::OpticalFlowSessionBindingPointNV bindingPoint, VULKAN_HPP_NAMESPACE::ImageView view, VULKAN_HPP_NAMESPACE::ImageLayout layout, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #else template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type bindOpticalFlowSessionImageNV( VULKAN_HPP_NAMESPACE::OpticalFlowSessionNV session, VULKAN_HPP_NAMESPACE::OpticalFlowSessionBindingPointNV bindingPoint, VULKAN_HPP_NAMESPACE::ImageView view, VULKAN_HPP_NAMESPACE::ImageLayout layout, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ //=== VK_KHR_maintenance5 === template void getRenderingAreaGranularityKHR( const VULKAN_HPP_NAMESPACE::RenderingAreaInfo * pRenderingAreaInfo, VULKAN_HPP_NAMESPACE::Extent2D * pGranularity, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Extent2D getRenderingAreaGranularityKHR( const VULKAN_HPP_NAMESPACE::RenderingAreaInfo & renderingAreaInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void getImageSubresourceLayoutKHR( const VULKAN_HPP_NAMESPACE::DeviceImageSubresourceInfo * pInfo, VULKAN_HPP_NAMESPACE::SubresourceLayout2 * pLayout, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::SubresourceLayout2 getImageSubresourceLayoutKHR( const VULKAN_HPP_NAMESPACE::DeviceImageSubresourceInfo & info, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::StructureChain getImageSubresourceLayoutKHR( const VULKAN_HPP_NAMESPACE::DeviceImageSubresourceInfo & info, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void getImageSubresourceLayout2KHR( VULKAN_HPP_NAMESPACE::Image image, const VULKAN_HPP_NAMESPACE::ImageSubresource2 * pSubresource, VULKAN_HPP_NAMESPACE::SubresourceLayout2 * pLayout, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::SubresourceLayout2 getImageSubresourceLayout2KHR( VULKAN_HPP_NAMESPACE::Image image, const VULKAN_HPP_NAMESPACE::ImageSubresource2 & subresource, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::StructureChain getImageSubresourceLayout2KHR( VULKAN_HPP_NAMESPACE::Image image, const VULKAN_HPP_NAMESPACE::ImageSubresource2 & subresource, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_AMD_anti_lag === template void antiLagUpdateAMD( const VULKAN_HPP_NAMESPACE::AntiLagDataAMD * pData, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void antiLagUpdateAMD( const VULKAN_HPP_NAMESPACE::AntiLagDataAMD & data, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_EXT_shader_object === template VULKAN_HPP_NODISCARD Result createShadersEXT( uint32_t createInfoCount, const VULKAN_HPP_NAMESPACE::ShaderCreateInfoEXT * pCreateInfos, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::ShaderEXT * pShaders, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD ResultValue> createShadersEXT( VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD ResultValue> createShadersEXT( VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, Optional allocator, ShaderEXTAllocator & shaderEXTAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template VULKAN_HPP_NODISCARD ResultValue createShaderEXT( const VULKAN_HPP_NAMESPACE::ShaderCreateInfoEXT & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # ifndef VULKAN_HPP_NO_SMART_HANDLE template >, typename std::enable_if>::value, int>::type = 0> VULKAN_HPP_NODISCARD ResultValue, ShaderEXTAllocator>> createShadersEXTUnique( VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template >, typename std::enable_if>::value, int>::type = 0> VULKAN_HPP_NODISCARD ResultValue, ShaderEXTAllocator>> createShadersEXTUnique( VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, Optional allocator, ShaderEXTAllocator & shaderEXTAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template VULKAN_HPP_NODISCARD ResultValue> createShaderEXTUnique( const VULKAN_HPP_NAMESPACE::ShaderCreateInfoEXT & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void destroyShaderEXT( VULKAN_HPP_NAMESPACE::ShaderEXT shader, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void destroyShaderEXT( VULKAN_HPP_NAMESPACE::ShaderEXT shader VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void destroy( VULKAN_HPP_NAMESPACE::ShaderEXT shader, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void destroy( VULKAN_HPP_NAMESPACE::ShaderEXT shader, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result getShaderBinaryDataEXT( VULKAN_HPP_NAMESPACE::ShaderEXT shader, size_t * pDataSize, void * pData, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getShaderBinaryDataEXT( VULKAN_HPP_NAMESPACE::ShaderEXT shader, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getShaderBinaryDataEXT( VULKAN_HPP_NAMESPACE::ShaderEXT shader, Uint8_tAllocator & uint8_tAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_KHR_pipeline_binary === template VULKAN_HPP_NODISCARD Result createPipelineBinariesKHR( const VULKAN_HPP_NAMESPACE::PipelineBinaryCreateInfoKHR * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::PipelineBinaryHandlesInfoKHR * pBinaries, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template < typename PipelineBinaryKHRAllocator = std::allocator, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD ResultValue> createPipelineBinariesKHR( const VULKAN_HPP_NAMESPACE::PipelineBinaryCreateInfoKHR & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template < typename PipelineBinaryKHRAllocator = std::allocator, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD ResultValue> createPipelineBinariesKHR( const VULKAN_HPP_NAMESPACE::PipelineBinaryCreateInfoKHR & createInfo, Optional allocator, PipelineBinaryKHRAllocator & pipelineBinaryKHRAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # ifndef VULKAN_HPP_NO_SMART_HANDLE template >, typename std::enable_if< std::is_same>::value, int>::type = 0> VULKAN_HPP_NODISCARD ResultValue, PipelineBinaryKHRAllocator>> createPipelineBinariesKHRUnique( const VULKAN_HPP_NAMESPACE::PipelineBinaryCreateInfoKHR & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template >, typename std::enable_if< std::is_same>::value, int>::type = 0> VULKAN_HPP_NODISCARD ResultValue, PipelineBinaryKHRAllocator>> createPipelineBinariesKHRUnique( const VULKAN_HPP_NAMESPACE::PipelineBinaryCreateInfoKHR & createInfo, Optional allocator, PipelineBinaryKHRAllocator & pipelineBinaryKHRAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void destroyPipelineBinaryKHR( VULKAN_HPP_NAMESPACE::PipelineBinaryKHR pipelineBinary, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void destroyPipelineBinaryKHR( VULKAN_HPP_NAMESPACE::PipelineBinaryKHR pipelineBinary VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void destroy( VULKAN_HPP_NAMESPACE::PipelineBinaryKHR pipelineBinary, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void destroy( VULKAN_HPP_NAMESPACE::PipelineBinaryKHR pipelineBinary, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result getPipelineKeyKHR( const VULKAN_HPP_NAMESPACE::PipelineCreateInfoKHR * pPipelineCreateInfo, VULKAN_HPP_NAMESPACE::PipelineBinaryKeyKHR * pPipelineKey, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type getPipelineKeyKHR( Optional pipelineCreateInfo VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result getPipelineBinaryDataKHR( const VULKAN_HPP_NAMESPACE::PipelineBinaryDataInfoKHR * pInfo, VULKAN_HPP_NAMESPACE::PipelineBinaryKeyKHR * pPipelineBinaryKey, size_t * pPipelineBinaryDataSize, void * pPipelineBinaryData, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>>::type getPipelineBinaryDataKHR( const VULKAN_HPP_NAMESPACE::PipelineBinaryDataInfoKHR & info, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>>::type getPipelineBinaryDataKHR( const VULKAN_HPP_NAMESPACE::PipelineBinaryDataInfoKHR & info, Uint8_tAllocator & uint8_tAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template Result releaseCapturedPipelineDataKHR( const VULKAN_HPP_NAMESPACE::ReleaseCapturedPipelineDataInfoKHR * pInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void releaseCapturedPipelineDataKHR( const VULKAN_HPP_NAMESPACE::ReleaseCapturedPipelineDataInfoKHR & info, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_QCOM_tile_properties === template VULKAN_HPP_NODISCARD Result getFramebufferTilePropertiesQCOM( VULKAN_HPP_NAMESPACE::Framebuffer framebuffer, uint32_t * pPropertiesCount, VULKAN_HPP_NAMESPACE::TilePropertiesQCOM * pProperties, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template < typename TilePropertiesQCOMAllocator = std::allocator, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getFramebufferTilePropertiesQCOM( VULKAN_HPP_NAMESPACE::Framebuffer framebuffer, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template < typename TilePropertiesQCOMAllocator = std::allocator, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getFramebufferTilePropertiesQCOM( VULKAN_HPP_NAMESPACE::Framebuffer framebuffer, TilePropertiesQCOMAllocator & tilePropertiesQCOMAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template Result getDynamicRenderingTilePropertiesQCOM( const VULKAN_HPP_NAMESPACE::RenderingInfo * pRenderingInfo, VULKAN_HPP_NAMESPACE::TilePropertiesQCOM * pProperties, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::TilePropertiesQCOM getDynamicRenderingTilePropertiesQCOM( const VULKAN_HPP_NAMESPACE::RenderingInfo & renderingInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_NV_cooperative_vector === template VULKAN_HPP_NODISCARD Result convertCooperativeVectorMatrixNV( const VULKAN_HPP_NAMESPACE::ConvertCooperativeVectorMatrixInfoNV * pInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Result convertCooperativeVectorMatrixNV( const VULKAN_HPP_NAMESPACE::ConvertCooperativeVectorMatrixInfoNV & info, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_NV_low_latency2 === template VULKAN_HPP_NODISCARD Result setLatencySleepModeNV( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, const VULKAN_HPP_NAMESPACE::LatencySleepModeInfoNV * pSleepModeInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template typename ResultValueType::type setLatencySleepModeNV( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, const VULKAN_HPP_NAMESPACE::LatencySleepModeInfoNV & sleepModeInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template Result latencySleepNV( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, const VULKAN_HPP_NAMESPACE::LatencySleepInfoNV * pSleepInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void latencySleepNV( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, const VULKAN_HPP_NAMESPACE::LatencySleepInfoNV & sleepInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void setLatencyMarkerNV( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, const VULKAN_HPP_NAMESPACE::SetLatencyMarkerInfoNV * pLatencyMarkerInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void setLatencyMarkerNV( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, const VULKAN_HPP_NAMESPACE::SetLatencyMarkerInfoNV & latencyMarkerInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void getLatencyTimingsNV( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, VULKAN_HPP_NAMESPACE::GetLatencyMarkerInfoNV * pLatencyMarkerInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template < typename LatencyTimingsFrameReportNVAllocator = std::allocator, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD std::vector getLatencyTimingsNV( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template < typename LatencyTimingsFrameReportNVAllocator = std::allocator, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD std::vector getLatencyTimingsNV( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain, LatencyTimingsFrameReportNVAllocator & latencyTimingsFrameReportNVAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #if defined( VK_USE_PLATFORM_SCREEN_QNX ) //=== VK_QNX_external_memory_screen_buffer === template VULKAN_HPP_NODISCARD Result getScreenBufferPropertiesQNX( const struct _screen_buffer * buffer, VULKAN_HPP_NAMESPACE::ScreenBufferPropertiesQNX * pProperties, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type getScreenBufferPropertiesQNX( const struct _screen_buffer & buffer, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template VULKAN_HPP_NODISCARD typename ResultValueType>::type getScreenBufferPropertiesQNX( const struct _screen_buffer & buffer, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #endif /*VK_USE_PLATFORM_SCREEN_QNX*/ //=== VK_KHR_calibrated_timestamps === template VULKAN_HPP_NODISCARD Result getCalibratedTimestampsKHR( uint32_t timestampCount, const VULKAN_HPP_NAMESPACE::CalibratedTimestampInfoKHR * pTimestampInfos, uint64_t * pTimestamps, uint64_t * pMaxDeviation, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType, uint64_t>>::type getCalibratedTimestampsKHR( VULKAN_HPP_NAMESPACE::ArrayProxy const & timestampInfos, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType, uint64_t>>::type getCalibratedTimestampsKHR( VULKAN_HPP_NAMESPACE::ArrayProxy const & timestampInfos, Uint64_tAllocator & uint64_tAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template VULKAN_HPP_NODISCARD typename ResultValueType>::type getCalibratedTimestampKHR( const VULKAN_HPP_NAMESPACE::CalibratedTimestampInfoKHR & timestampInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_NV_cluster_acceleration_structure === template void getClusterAccelerationStructureBuildSizesNV( const VULKAN_HPP_NAMESPACE::ClusterAccelerationStructureInputInfoNV * pInfo, VULKAN_HPP_NAMESPACE::AccelerationStructureBuildSizesInfoKHR * pSizeInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::AccelerationStructureBuildSizesInfoKHR getClusterAccelerationStructureBuildSizesNV( const VULKAN_HPP_NAMESPACE::ClusterAccelerationStructureInputInfoNV & info, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_NV_partitioned_acceleration_structure === template void getPartitionedAccelerationStructuresBuildSizesNV( const VULKAN_HPP_NAMESPACE::PartitionedAccelerationStructureInstancesInputNV * pInfo, VULKAN_HPP_NAMESPACE::AccelerationStructureBuildSizesInfoKHR * pSizeInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::AccelerationStructureBuildSizesInfoKHR getPartitionedAccelerationStructuresBuildSizesNV( const VULKAN_HPP_NAMESPACE::PartitionedAccelerationStructureInstancesInputNV & info, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_EXT_device_generated_commands === template void getGeneratedCommandsMemoryRequirementsEXT( const VULKAN_HPP_NAMESPACE::GeneratedCommandsMemoryRequirementsInfoEXT * pInfo, VULKAN_HPP_NAMESPACE::MemoryRequirements2 * pMemoryRequirements, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::MemoryRequirements2 getGeneratedCommandsMemoryRequirementsEXT( const VULKAN_HPP_NAMESPACE::GeneratedCommandsMemoryRequirementsInfoEXT & info, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::StructureChain getGeneratedCommandsMemoryRequirementsEXT( const VULKAN_HPP_NAMESPACE::GeneratedCommandsMemoryRequirementsInfoEXT & info, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result createIndirectCommandsLayoutEXT( const VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutCreateInfoEXT * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutEXT * pIndirectCommandsLayout, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type createIndirectCommandsLayoutEXT( const VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutCreateInfoEXT & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD typename ResultValueType>::type createIndirectCommandsLayoutEXTUnique( const VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutCreateInfoEXT & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void destroyIndirectCommandsLayoutEXT( VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutEXT indirectCommandsLayout, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void destroyIndirectCommandsLayoutEXT( VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutEXT indirectCommandsLayout VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void destroy( VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutEXT indirectCommandsLayout, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void destroy( VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutEXT indirectCommandsLayout, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result createIndirectExecutionSetEXT( const VULKAN_HPP_NAMESPACE::IndirectExecutionSetCreateInfoEXT * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::IndirectExecutionSetEXT * pIndirectExecutionSet, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type createIndirectExecutionSetEXT( const VULKAN_HPP_NAMESPACE::IndirectExecutionSetCreateInfoEXT & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD typename ResultValueType>::type createIndirectExecutionSetEXTUnique( const VULKAN_HPP_NAMESPACE::IndirectExecutionSetCreateInfoEXT & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void destroyIndirectExecutionSetEXT( VULKAN_HPP_NAMESPACE::IndirectExecutionSetEXT indirectExecutionSet, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void destroyIndirectExecutionSetEXT( VULKAN_HPP_NAMESPACE::IndirectExecutionSetEXT indirectExecutionSet VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void destroy( VULKAN_HPP_NAMESPACE::IndirectExecutionSetEXT indirectExecutionSet, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void destroy( VULKAN_HPP_NAMESPACE::IndirectExecutionSetEXT indirectExecutionSet, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void updateIndirectExecutionSetPipelineEXT( VULKAN_HPP_NAMESPACE::IndirectExecutionSetEXT indirectExecutionSet, uint32_t executionSetWriteCount, const VULKAN_HPP_NAMESPACE::WriteIndirectExecutionSetPipelineEXT * pExecutionSetWrites, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void updateIndirectExecutionSetPipelineEXT( VULKAN_HPP_NAMESPACE::IndirectExecutionSetEXT indirectExecutionSet, VULKAN_HPP_NAMESPACE::ArrayProxy const & executionSetWrites, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void updateIndirectExecutionSetShaderEXT( VULKAN_HPP_NAMESPACE::IndirectExecutionSetEXT indirectExecutionSet, uint32_t executionSetWriteCount, const VULKAN_HPP_NAMESPACE::WriteIndirectExecutionSetShaderEXT * pExecutionSetWrites, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void updateIndirectExecutionSetShaderEXT( VULKAN_HPP_NAMESPACE::IndirectExecutionSetEXT indirectExecutionSet, VULKAN_HPP_NAMESPACE::ArrayProxy const & executionSetWrites, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #if defined( VK_USE_PLATFORM_METAL_EXT ) //=== VK_EXT_external_memory_metal === template VULKAN_HPP_NODISCARD Result getMemoryMetalHandleEXT( const VULKAN_HPP_NAMESPACE::MemoryGetMetalHandleInfoEXT * pGetMetalHandleInfo, void ** pHandle, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type getMemoryMetalHandleEXT( const VULKAN_HPP_NAMESPACE::MemoryGetMetalHandleInfoEXT & getMetalHandleInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result getMemoryMetalHandlePropertiesEXT( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType, const void * pHandle, VULKAN_HPP_NAMESPACE::MemoryMetalHandlePropertiesEXT * pMemoryMetalHandleProperties, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type getMemoryMetalHandlePropertiesEXT( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType, HandleType const & handle, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #endif /*VK_USE_PLATFORM_METAL_EXT*/ operator VkDevice() const VULKAN_HPP_NOEXCEPT { return m_device; } explicit operator bool() const VULKAN_HPP_NOEXCEPT { return m_device != VK_NULL_HANDLE; } bool operator!() const VULKAN_HPP_NOEXCEPT { return m_device == VK_NULL_HANDLE; } private: VkDevice m_device = {}; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::Device; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::Device; }; #if ( VK_USE_64_BIT_PTR_DEFINES == 1 ) template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::Device; }; #endif template <> struct isVulkanHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; class DisplayModeKHR { public: using CType = VkDisplayModeKHR; using NativeType = VkDisplayModeKHR; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eDisplayModeKHR; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eDisplayModeKHR; public: DisplayModeKHR() VULKAN_HPP_NOEXCEPT{}; // = default - try to workaround a compiler issue DisplayModeKHR( DisplayModeKHR const & rhs ) = default; DisplayModeKHR & operator=( DisplayModeKHR const & rhs ) = default; #if !defined( VULKAN_HPP_HANDLES_MOVE_EXCHANGE ) DisplayModeKHR( DisplayModeKHR && rhs ) = default; DisplayModeKHR & operator=( DisplayModeKHR && rhs ) = default; #else DisplayModeKHR( DisplayModeKHR && rhs ) VULKAN_HPP_NOEXCEPT : m_displayModeKHR( VULKAN_HPP_NAMESPACE::exchange( rhs.m_displayModeKHR, {} ) ) {} DisplayModeKHR & operator=( DisplayModeKHR && rhs ) VULKAN_HPP_NOEXCEPT { m_displayModeKHR = VULKAN_HPP_NAMESPACE::exchange( rhs.m_displayModeKHR, {} ); return *this; } #endif VULKAN_HPP_CONSTEXPR DisplayModeKHR( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} VULKAN_HPP_TYPESAFE_EXPLICIT DisplayModeKHR( VkDisplayModeKHR displayModeKHR ) VULKAN_HPP_NOEXCEPT : m_displayModeKHR( displayModeKHR ) {} #if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 ) DisplayModeKHR & operator=( VkDisplayModeKHR displayModeKHR ) VULKAN_HPP_NOEXCEPT { m_displayModeKHR = displayModeKHR; return *this; } #endif DisplayModeKHR & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT { m_displayModeKHR = {}; return *this; } VULKAN_HPP_TYPESAFE_EXPLICIT operator VkDisplayModeKHR() const VULKAN_HPP_NOEXCEPT { return m_displayModeKHR; } explicit operator bool() const VULKAN_HPP_NOEXCEPT { return m_displayModeKHR != VK_NULL_HANDLE; } bool operator!() const VULKAN_HPP_NOEXCEPT { return m_displayModeKHR == VK_NULL_HANDLE; } private: VkDisplayModeKHR m_displayModeKHR = {}; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::DisplayModeKHR; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::DisplayModeKHR; }; #if ( VK_USE_64_BIT_PTR_DEFINES == 1 ) template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::DisplayModeKHR; }; #endif template <> struct isVulkanHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; class PhysicalDevice { public: using CType = VkPhysicalDevice; using NativeType = VkPhysicalDevice; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::ePhysicalDevice; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::ePhysicalDevice; public: PhysicalDevice() VULKAN_HPP_NOEXCEPT{}; // = default - try to workaround a compiler issue PhysicalDevice( PhysicalDevice const & rhs ) = default; PhysicalDevice & operator=( PhysicalDevice const & rhs ) = default; #if !defined( VULKAN_HPP_HANDLES_MOVE_EXCHANGE ) PhysicalDevice( PhysicalDevice && rhs ) = default; PhysicalDevice & operator=( PhysicalDevice && rhs ) = default; #else PhysicalDevice( PhysicalDevice && rhs ) VULKAN_HPP_NOEXCEPT : m_physicalDevice( VULKAN_HPP_NAMESPACE::exchange( rhs.m_physicalDevice, {} ) ) {} PhysicalDevice & operator=( PhysicalDevice && rhs ) VULKAN_HPP_NOEXCEPT { m_physicalDevice = VULKAN_HPP_NAMESPACE::exchange( rhs.m_physicalDevice, {} ); return *this; } #endif VULKAN_HPP_CONSTEXPR PhysicalDevice( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} PhysicalDevice( VkPhysicalDevice physicalDevice ) VULKAN_HPP_NOEXCEPT : m_physicalDevice( physicalDevice ) {} PhysicalDevice & operator=( VkPhysicalDevice physicalDevice ) VULKAN_HPP_NOEXCEPT { m_physicalDevice = physicalDevice; return *this; } PhysicalDevice & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT { m_physicalDevice = {}; return *this; } //=== VK_VERSION_1_0 === template void getFeatures( VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures * pFeatures, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures getFeatures( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void getFormatProperties( VULKAN_HPP_NAMESPACE::Format format, VULKAN_HPP_NAMESPACE::FormatProperties * pFormatProperties, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::FormatProperties getFormatProperties( VULKAN_HPP_NAMESPACE::Format format, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result getImageFormatProperties( VULKAN_HPP_NAMESPACE::Format format, VULKAN_HPP_NAMESPACE::ImageType type, VULKAN_HPP_NAMESPACE::ImageTiling tiling, VULKAN_HPP_NAMESPACE::ImageUsageFlags usage, VULKAN_HPP_NAMESPACE::ImageCreateFlags flags, VULKAN_HPP_NAMESPACE::ImageFormatProperties * pImageFormatProperties, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type getImageFormatProperties( VULKAN_HPP_NAMESPACE::Format format, VULKAN_HPP_NAMESPACE::ImageType type, VULKAN_HPP_NAMESPACE::ImageTiling tiling, VULKAN_HPP_NAMESPACE::ImageUsageFlags usage, VULKAN_HPP_NAMESPACE::ImageCreateFlags flags VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void getProperties( VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties * pProperties, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties getProperties( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void getQueueFamilyProperties( uint32_t * pQueueFamilyPropertyCount, VULKAN_HPP_NAMESPACE::QueueFamilyProperties * pQueueFamilyProperties, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD std::vector getQueueFamilyProperties( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD std::vector getQueueFamilyProperties( QueueFamilyPropertiesAllocator & queueFamilyPropertiesAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void getMemoryProperties( VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties * pMemoryProperties, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties getMemoryProperties( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result createDevice( const VULKAN_HPP_NAMESPACE::DeviceCreateInfo * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::Device * pDevice, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type createDevice( const VULKAN_HPP_NAMESPACE::DeviceCreateInfo & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD typename ResultValueType>::type createDeviceUnique( const VULKAN_HPP_NAMESPACE::DeviceCreateInfo & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result enumerateDeviceExtensionProperties( const char * pLayerName, uint32_t * pPropertyCount, VULKAN_HPP_NAMESPACE::ExtensionProperties * pProperties, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template < typename ExtensionPropertiesAllocator = std::allocator, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type enumerateDeviceExtensionProperties( Optional layerName VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template < typename ExtensionPropertiesAllocator = std::allocator, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type enumerateDeviceExtensionProperties( Optional layerName, ExtensionPropertiesAllocator & extensionPropertiesAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result enumerateDeviceLayerProperties( uint32_t * pPropertyCount, VULKAN_HPP_NAMESPACE::LayerProperties * pProperties, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type enumerateDeviceLayerProperties( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type enumerateDeviceLayerProperties( LayerPropertiesAllocator & layerPropertiesAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void getSparseImageFormatProperties( VULKAN_HPP_NAMESPACE::Format format, VULKAN_HPP_NAMESPACE::ImageType type, VULKAN_HPP_NAMESPACE::SampleCountFlagBits samples, VULKAN_HPP_NAMESPACE::ImageUsageFlags usage, VULKAN_HPP_NAMESPACE::ImageTiling tiling, uint32_t * pPropertyCount, VULKAN_HPP_NAMESPACE::SparseImageFormatProperties * pProperties, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template < typename SparseImageFormatPropertiesAllocator = std::allocator, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD std::vector getSparseImageFormatProperties( VULKAN_HPP_NAMESPACE::Format format, VULKAN_HPP_NAMESPACE::ImageType type, VULKAN_HPP_NAMESPACE::SampleCountFlagBits samples, VULKAN_HPP_NAMESPACE::ImageUsageFlags usage, VULKAN_HPP_NAMESPACE::ImageTiling tiling, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template < typename SparseImageFormatPropertiesAllocator = std::allocator, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD std::vector getSparseImageFormatProperties( VULKAN_HPP_NAMESPACE::Format format, VULKAN_HPP_NAMESPACE::ImageType type, VULKAN_HPP_NAMESPACE::SampleCountFlagBits samples, VULKAN_HPP_NAMESPACE::ImageUsageFlags usage, VULKAN_HPP_NAMESPACE::ImageTiling tiling, SparseImageFormatPropertiesAllocator & sparseImageFormatPropertiesAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_VERSION_1_1 === template void getFeatures2( VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures2 * pFeatures, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures2 getFeatures2( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::StructureChain getFeatures2( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void getProperties2( VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties2 * pProperties, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties2 getProperties2( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::StructureChain getProperties2( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void getFormatProperties2( VULKAN_HPP_NAMESPACE::Format format, VULKAN_HPP_NAMESPACE::FormatProperties2 * pFormatProperties, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::FormatProperties2 getFormatProperties2( VULKAN_HPP_NAMESPACE::Format format, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::StructureChain getFormatProperties2( VULKAN_HPP_NAMESPACE::Format format, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result getImageFormatProperties2( const VULKAN_HPP_NAMESPACE::PhysicalDeviceImageFormatInfo2 * pImageFormatInfo, VULKAN_HPP_NAMESPACE::ImageFormatProperties2 * pImageFormatProperties, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type getImageFormatProperties2( const VULKAN_HPP_NAMESPACE::PhysicalDeviceImageFormatInfo2 & imageFormatInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template VULKAN_HPP_NODISCARD typename ResultValueType>::type getImageFormatProperties2( const VULKAN_HPP_NAMESPACE::PhysicalDeviceImageFormatInfo2 & imageFormatInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void getQueueFamilyProperties2( uint32_t * pQueueFamilyPropertyCount, VULKAN_HPP_NAMESPACE::QueueFamilyProperties2 * pQueueFamilyProperties, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD std::vector getQueueFamilyProperties2( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD std::vector getQueueFamilyProperties2( QueueFamilyProperties2Allocator & queueFamilyProperties2Allocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD std::vector getQueueFamilyProperties2( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD std::vector getQueueFamilyProperties2( StructureChainAllocator & structureChainAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void getMemoryProperties2( VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties2 * pMemoryProperties, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties2 getMemoryProperties2( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::StructureChain getMemoryProperties2( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void getSparseImageFormatProperties2( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSparseImageFormatInfo2 * pFormatInfo, uint32_t * pPropertyCount, VULKAN_HPP_NAMESPACE::SparseImageFormatProperties2 * pProperties, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if< std::is_same::value, int>::type = 0> VULKAN_HPP_NODISCARD std::vector getSparseImageFormatProperties2( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSparseImageFormatInfo2 & formatInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if< std::is_same::value, int>::type = 0> VULKAN_HPP_NODISCARD std::vector getSparseImageFormatProperties2( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSparseImageFormatInfo2 & formatInfo, SparseImageFormatProperties2Allocator & sparseImageFormatProperties2Allocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void getExternalBufferProperties( const VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalBufferInfo * pExternalBufferInfo, VULKAN_HPP_NAMESPACE::ExternalBufferProperties * pExternalBufferProperties, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::ExternalBufferProperties getExternalBufferProperties( const VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalBufferInfo & externalBufferInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void getExternalFenceProperties( const VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalFenceInfo * pExternalFenceInfo, VULKAN_HPP_NAMESPACE::ExternalFenceProperties * pExternalFenceProperties, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::ExternalFenceProperties getExternalFenceProperties( const VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalFenceInfo & externalFenceInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void getExternalSemaphoreProperties( const VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalSemaphoreInfo * pExternalSemaphoreInfo, VULKAN_HPP_NAMESPACE::ExternalSemaphoreProperties * pExternalSemaphoreProperties, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::ExternalSemaphoreProperties getExternalSemaphoreProperties( const VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalSemaphoreInfo & externalSemaphoreInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_VERSION_1_3 === template VULKAN_HPP_NODISCARD Result getToolProperties( uint32_t * pToolCount, VULKAN_HPP_NAMESPACE::PhysicalDeviceToolProperties * pToolProperties, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if< std::is_same::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getToolProperties( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if< std::is_same::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getToolProperties( PhysicalDeviceToolPropertiesAllocator & physicalDeviceToolPropertiesAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_KHR_surface === template VULKAN_HPP_NODISCARD Result getSurfaceSupportKHR( uint32_t queueFamilyIndex, VULKAN_HPP_NAMESPACE::SurfaceKHR surface, VULKAN_HPP_NAMESPACE::Bool32 * pSupported, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type getSurfaceSupportKHR( uint32_t queueFamilyIndex, VULKAN_HPP_NAMESPACE::SurfaceKHR surface, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result getSurfaceCapabilitiesKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, VULKAN_HPP_NAMESPACE::SurfaceCapabilitiesKHR * pSurfaceCapabilities, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type getSurfaceCapabilitiesKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result getSurfaceFormatsKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, uint32_t * pSurfaceFormatCount, VULKAN_HPP_NAMESPACE::SurfaceFormatKHR * pSurfaceFormats, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template < typename SurfaceFormatKHRAllocator = std::allocator, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getSurfaceFormatsKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template < typename SurfaceFormatKHRAllocator = std::allocator, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getSurfaceFormatsKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, SurfaceFormatKHRAllocator & surfaceFormatKHRAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result getSurfacePresentModesKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, uint32_t * pPresentModeCount, VULKAN_HPP_NAMESPACE::PresentModeKHR * pPresentModes, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getSurfacePresentModesKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getSurfacePresentModesKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, PresentModeKHRAllocator & presentModeKHRAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_KHR_swapchain === template VULKAN_HPP_NODISCARD Result getPresentRectanglesKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, uint32_t * pRectCount, VULKAN_HPP_NAMESPACE::Rect2D * pRects, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getPresentRectanglesKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getPresentRectanglesKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, Rect2DAllocator & rect2DAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_KHR_display === template VULKAN_HPP_NODISCARD Result getDisplayPropertiesKHR( uint32_t * pPropertyCount, VULKAN_HPP_NAMESPACE::DisplayPropertiesKHR * pProperties, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getDisplayPropertiesKHR( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getDisplayPropertiesKHR( DisplayPropertiesKHRAllocator & displayPropertiesKHRAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result getDisplayPlanePropertiesKHR( uint32_t * pPropertyCount, VULKAN_HPP_NAMESPACE::DisplayPlanePropertiesKHR * pProperties, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template < typename DisplayPlanePropertiesKHRAllocator = std::allocator, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getDisplayPlanePropertiesKHR( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template < typename DisplayPlanePropertiesKHRAllocator = std::allocator, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getDisplayPlanePropertiesKHR( DisplayPlanePropertiesKHRAllocator & displayPlanePropertiesKHRAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result getDisplayPlaneSupportedDisplaysKHR( uint32_t planeIndex, uint32_t * pDisplayCount, VULKAN_HPP_NAMESPACE::DisplayKHR * pDisplays, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getDisplayPlaneSupportedDisplaysKHR( uint32_t planeIndex, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getDisplayPlaneSupportedDisplaysKHR( uint32_t planeIndex, DisplayKHRAllocator & displayKHRAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result getDisplayModePropertiesKHR( VULKAN_HPP_NAMESPACE::DisplayKHR display, uint32_t * pPropertyCount, VULKAN_HPP_NAMESPACE::DisplayModePropertiesKHR * pProperties, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template < typename DisplayModePropertiesKHRAllocator = std::allocator, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getDisplayModePropertiesKHR( VULKAN_HPP_NAMESPACE::DisplayKHR display, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template < typename DisplayModePropertiesKHRAllocator = std::allocator, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getDisplayModePropertiesKHR( VULKAN_HPP_NAMESPACE::DisplayKHR display, DisplayModePropertiesKHRAllocator & displayModePropertiesKHRAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result createDisplayModeKHR( VULKAN_HPP_NAMESPACE::DisplayKHR display, const VULKAN_HPP_NAMESPACE::DisplayModeCreateInfoKHR * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::DisplayModeKHR * pMode, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type createDisplayModeKHR( VULKAN_HPP_NAMESPACE::DisplayKHR display, const VULKAN_HPP_NAMESPACE::DisplayModeCreateInfoKHR & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD typename ResultValueType>::type createDisplayModeKHRUnique( VULKAN_HPP_NAMESPACE::DisplayKHR display, const VULKAN_HPP_NAMESPACE::DisplayModeCreateInfoKHR & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result getDisplayPlaneCapabilitiesKHR( VULKAN_HPP_NAMESPACE::DisplayModeKHR mode, uint32_t planeIndex, VULKAN_HPP_NAMESPACE::DisplayPlaneCapabilitiesKHR * pCapabilities, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type getDisplayPlaneCapabilitiesKHR( VULKAN_HPP_NAMESPACE::DisplayModeKHR mode, uint32_t planeIndex, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #if defined( VK_USE_PLATFORM_XLIB_KHR ) //=== VK_KHR_xlib_surface === template Bool32 getXlibPresentationSupportKHR( uint32_t queueFamilyIndex, Display * dpy, VisualID visualID, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NAMESPACE::Bool32 getXlibPresentationSupportKHR( uint32_t queueFamilyIndex, Display & dpy, VisualID visualID, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #endif /*VK_USE_PLATFORM_XLIB_KHR*/ #if defined( VK_USE_PLATFORM_XCB_KHR ) //=== VK_KHR_xcb_surface === template Bool32 getXcbPresentationSupportKHR( uint32_t queueFamilyIndex, xcb_connection_t * connection, xcb_visualid_t visual_id, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NAMESPACE::Bool32 getXcbPresentationSupportKHR( uint32_t queueFamilyIndex, xcb_connection_t & connection, xcb_visualid_t visual_id, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #endif /*VK_USE_PLATFORM_XCB_KHR*/ #if defined( VK_USE_PLATFORM_WAYLAND_KHR ) //=== VK_KHR_wayland_surface === template Bool32 getWaylandPresentationSupportKHR( uint32_t queueFamilyIndex, struct wl_display * display, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NAMESPACE::Bool32 getWaylandPresentationSupportKHR( uint32_t queueFamilyIndex, struct wl_display & display, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #endif /*VK_USE_PLATFORM_WAYLAND_KHR*/ #if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_KHR_win32_surface === template Bool32 getWin32PresentationSupportKHR( uint32_t queueFamilyIndex, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_KHR_video_queue === template VULKAN_HPP_NODISCARD Result getVideoCapabilitiesKHR( const VULKAN_HPP_NAMESPACE::VideoProfileInfoKHR * pVideoProfile, VULKAN_HPP_NAMESPACE::VideoCapabilitiesKHR * pCapabilities, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type getVideoCapabilitiesKHR( const VULKAN_HPP_NAMESPACE::VideoProfileInfoKHR & videoProfile, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template VULKAN_HPP_NODISCARD typename ResultValueType>::type getVideoCapabilitiesKHR( const VULKAN_HPP_NAMESPACE::VideoProfileInfoKHR & videoProfile, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result getVideoFormatPropertiesKHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceVideoFormatInfoKHR * pVideoFormatInfo, uint32_t * pVideoFormatPropertyCount, VULKAN_HPP_NAMESPACE::VideoFormatPropertiesKHR * pVideoFormatProperties, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template < typename VideoFormatPropertiesKHRAllocator = std::allocator, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getVideoFormatPropertiesKHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceVideoFormatInfoKHR & videoFormatInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template < typename VideoFormatPropertiesKHRAllocator = std::allocator, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getVideoFormatPropertiesKHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceVideoFormatInfoKHR & videoFormatInfo, VideoFormatPropertiesKHRAllocator & videoFormatPropertiesKHRAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getVideoFormatPropertiesKHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceVideoFormatInfoKHR & videoFormatInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getVideoFormatPropertiesKHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceVideoFormatInfoKHR & videoFormatInfo, StructureChainAllocator & structureChainAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_NV_external_memory_capabilities === template VULKAN_HPP_NODISCARD Result getExternalImageFormatPropertiesNV( VULKAN_HPP_NAMESPACE::Format format, VULKAN_HPP_NAMESPACE::ImageType type, VULKAN_HPP_NAMESPACE::ImageTiling tiling, VULKAN_HPP_NAMESPACE::ImageUsageFlags usage, VULKAN_HPP_NAMESPACE::ImageCreateFlags flags, VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagsNV externalHandleType, VULKAN_HPP_NAMESPACE::ExternalImageFormatPropertiesNV * pExternalImageFormatProperties, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type getExternalImageFormatPropertiesNV( VULKAN_HPP_NAMESPACE::Format format, VULKAN_HPP_NAMESPACE::ImageType type, VULKAN_HPP_NAMESPACE::ImageTiling tiling, VULKAN_HPP_NAMESPACE::ImageUsageFlags usage, VULKAN_HPP_NAMESPACE::ImageCreateFlags flags VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagsNV externalHandleType VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_KHR_get_physical_device_properties2 === template void getFeatures2KHR( VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures2 * pFeatures, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures2 getFeatures2KHR( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::StructureChain getFeatures2KHR( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void getProperties2KHR( VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties2 * pProperties, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties2 getProperties2KHR( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::StructureChain getProperties2KHR( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void getFormatProperties2KHR( VULKAN_HPP_NAMESPACE::Format format, VULKAN_HPP_NAMESPACE::FormatProperties2 * pFormatProperties, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::FormatProperties2 getFormatProperties2KHR( VULKAN_HPP_NAMESPACE::Format format, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::StructureChain getFormatProperties2KHR( VULKAN_HPP_NAMESPACE::Format format, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result getImageFormatProperties2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceImageFormatInfo2 * pImageFormatInfo, VULKAN_HPP_NAMESPACE::ImageFormatProperties2 * pImageFormatProperties, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type getImageFormatProperties2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceImageFormatInfo2 & imageFormatInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template VULKAN_HPP_NODISCARD typename ResultValueType>::type getImageFormatProperties2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceImageFormatInfo2 & imageFormatInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void getQueueFamilyProperties2KHR( uint32_t * pQueueFamilyPropertyCount, VULKAN_HPP_NAMESPACE::QueueFamilyProperties2 * pQueueFamilyProperties, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD std::vector getQueueFamilyProperties2KHR( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD std::vector getQueueFamilyProperties2KHR( QueueFamilyProperties2Allocator & queueFamilyProperties2Allocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD std::vector getQueueFamilyProperties2KHR( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD std::vector getQueueFamilyProperties2KHR( StructureChainAllocator & structureChainAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void getMemoryProperties2KHR( VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties2 * pMemoryProperties, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties2 getMemoryProperties2KHR( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::StructureChain getMemoryProperties2KHR( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void getSparseImageFormatProperties2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSparseImageFormatInfo2 * pFormatInfo, uint32_t * pPropertyCount, VULKAN_HPP_NAMESPACE::SparseImageFormatProperties2 * pProperties, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if< std::is_same::value, int>::type = 0> VULKAN_HPP_NODISCARD std::vector getSparseImageFormatProperties2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSparseImageFormatInfo2 & formatInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if< std::is_same::value, int>::type = 0> VULKAN_HPP_NODISCARD std::vector getSparseImageFormatProperties2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSparseImageFormatInfo2 & formatInfo, SparseImageFormatProperties2Allocator & sparseImageFormatProperties2Allocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_KHR_external_memory_capabilities === template void getExternalBufferPropertiesKHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalBufferInfo * pExternalBufferInfo, VULKAN_HPP_NAMESPACE::ExternalBufferProperties * pExternalBufferProperties, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::ExternalBufferProperties getExternalBufferPropertiesKHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalBufferInfo & externalBufferInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_KHR_external_semaphore_capabilities === template void getExternalSemaphorePropertiesKHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalSemaphoreInfo * pExternalSemaphoreInfo, VULKAN_HPP_NAMESPACE::ExternalSemaphoreProperties * pExternalSemaphoreProperties, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::ExternalSemaphoreProperties getExternalSemaphorePropertiesKHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalSemaphoreInfo & externalSemaphoreInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_EXT_direct_mode_display === #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE template Result releaseDisplayEXT( VULKAN_HPP_NAMESPACE::DisplayKHR display, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #else template void releaseDisplayEXT( VULKAN_HPP_NAMESPACE::DisplayKHR display, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #if defined( VK_USE_PLATFORM_XLIB_XRANDR_EXT ) //=== VK_EXT_acquire_xlib_display === template VULKAN_HPP_NODISCARD Result acquireXlibDisplayEXT( Display * dpy, VULKAN_HPP_NAMESPACE::DisplayKHR display, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type acquireXlibDisplayEXT( Display & dpy, VULKAN_HPP_NAMESPACE::DisplayKHR display, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result getRandROutputDisplayEXT( Display * dpy, RROutput rrOutput, VULKAN_HPP_NAMESPACE::DisplayKHR * pDisplay, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type getRandROutputDisplayEXT( Display & dpy, RROutput rrOutput, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD typename ResultValueType>::type getRandROutputDisplayEXTUnique( Display & dpy, RROutput rrOutput, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_NO_SMART_HANDLE */ # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #endif /*VK_USE_PLATFORM_XLIB_XRANDR_EXT*/ //=== VK_EXT_display_surface_counter === template VULKAN_HPP_NODISCARD Result getSurfaceCapabilities2EXT( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, VULKAN_HPP_NAMESPACE::SurfaceCapabilities2EXT * pSurfaceCapabilities, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type getSurfaceCapabilities2EXT( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_KHR_external_fence_capabilities === template void getExternalFencePropertiesKHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalFenceInfo * pExternalFenceInfo, VULKAN_HPP_NAMESPACE::ExternalFenceProperties * pExternalFenceProperties, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::ExternalFenceProperties getExternalFencePropertiesKHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalFenceInfo & externalFenceInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_KHR_performance_query === template VULKAN_HPP_NODISCARD Result enumerateQueueFamilyPerformanceQueryCountersKHR( uint32_t queueFamilyIndex, uint32_t * pCounterCount, VULKAN_HPP_NAMESPACE::PerformanceCounterKHR * pCounters, VULKAN_HPP_NAMESPACE::PerformanceCounterDescriptionKHR * pCounterDescriptions, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template , typename PerformanceCounterDescriptionKHRAllocator = std::allocator, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if< std::is_same::value && std::is_same::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType, std::vector>>::type enumerateQueueFamilyPerformanceQueryCountersKHR( uint32_t queueFamilyIndex, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template , typename PerformanceCounterDescriptionKHRAllocator = std::allocator, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if< std::is_same::value && std::is_same::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType, std::vector>>::type enumerateQueueFamilyPerformanceQueryCountersKHR( uint32_t queueFamilyIndex, PerformanceCounterKHRAllocator & performanceCounterKHRAllocator, PerformanceCounterDescriptionKHRAllocator & performanceCounterDescriptionKHRAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void getQueueFamilyPerformanceQueryPassesKHR( const VULKAN_HPP_NAMESPACE::QueryPoolPerformanceCreateInfoKHR * pPerformanceQueryCreateInfo, uint32_t * pNumPasses, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD uint32_t getQueueFamilyPerformanceQueryPassesKHR( const VULKAN_HPP_NAMESPACE::QueryPoolPerformanceCreateInfoKHR & performanceQueryCreateInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_KHR_get_surface_capabilities2 === template VULKAN_HPP_NODISCARD Result getSurfaceCapabilities2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR * pSurfaceInfo, VULKAN_HPP_NAMESPACE::SurfaceCapabilities2KHR * pSurfaceCapabilities, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type getSurfaceCapabilities2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR & surfaceInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template VULKAN_HPP_NODISCARD typename ResultValueType>::type getSurfaceCapabilities2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR & surfaceInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result getSurfaceFormats2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR * pSurfaceInfo, uint32_t * pSurfaceFormatCount, VULKAN_HPP_NAMESPACE::SurfaceFormat2KHR * pSurfaceFormats, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template < typename SurfaceFormat2KHRAllocator = std::allocator, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getSurfaceFormats2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR & surfaceInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template < typename SurfaceFormat2KHRAllocator = std::allocator, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getSurfaceFormats2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR & surfaceInfo, SurfaceFormat2KHRAllocator & surfaceFormat2KHRAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getSurfaceFormats2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR & surfaceInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getSurfaceFormats2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR & surfaceInfo, StructureChainAllocator & structureChainAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_KHR_get_display_properties2 === template VULKAN_HPP_NODISCARD Result getDisplayProperties2KHR( uint32_t * pPropertyCount, VULKAN_HPP_NAMESPACE::DisplayProperties2KHR * pProperties, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getDisplayProperties2KHR( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getDisplayProperties2KHR( DisplayProperties2KHRAllocator & displayProperties2KHRAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result getDisplayPlaneProperties2KHR( uint32_t * pPropertyCount, VULKAN_HPP_NAMESPACE::DisplayPlaneProperties2KHR * pProperties, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template < typename DisplayPlaneProperties2KHRAllocator = std::allocator, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getDisplayPlaneProperties2KHR( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template < typename DisplayPlaneProperties2KHRAllocator = std::allocator, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getDisplayPlaneProperties2KHR( DisplayPlaneProperties2KHRAllocator & displayPlaneProperties2KHRAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result getDisplayModeProperties2KHR( VULKAN_HPP_NAMESPACE::DisplayKHR display, uint32_t * pPropertyCount, VULKAN_HPP_NAMESPACE::DisplayModeProperties2KHR * pProperties, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template < typename DisplayModeProperties2KHRAllocator = std::allocator, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getDisplayModeProperties2KHR( VULKAN_HPP_NAMESPACE::DisplayKHR display, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template < typename DisplayModeProperties2KHRAllocator = std::allocator, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getDisplayModeProperties2KHR( VULKAN_HPP_NAMESPACE::DisplayKHR display, DisplayModeProperties2KHRAllocator & displayModeProperties2KHRAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getDisplayModeProperties2KHR( VULKAN_HPP_NAMESPACE::DisplayKHR display, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getDisplayModeProperties2KHR( VULKAN_HPP_NAMESPACE::DisplayKHR display, StructureChainAllocator & structureChainAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result getDisplayPlaneCapabilities2KHR( const VULKAN_HPP_NAMESPACE::DisplayPlaneInfo2KHR * pDisplayPlaneInfo, VULKAN_HPP_NAMESPACE::DisplayPlaneCapabilities2KHR * pCapabilities, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type getDisplayPlaneCapabilities2KHR( const VULKAN_HPP_NAMESPACE::DisplayPlaneInfo2KHR & displayPlaneInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_EXT_sample_locations === template void getMultisamplePropertiesEXT( VULKAN_HPP_NAMESPACE::SampleCountFlagBits samples, VULKAN_HPP_NAMESPACE::MultisamplePropertiesEXT * pMultisampleProperties, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::MultisamplePropertiesEXT getMultisamplePropertiesEXT( VULKAN_HPP_NAMESPACE::SampleCountFlagBits samples, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_EXT_calibrated_timestamps === template VULKAN_HPP_NODISCARD Result getCalibrateableTimeDomainsEXT( uint32_t * pTimeDomainCount, VULKAN_HPP_NAMESPACE::TimeDomainKHR * pTimeDomains, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getCalibrateableTimeDomainsEXT( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getCalibrateableTimeDomainsEXT( TimeDomainKHRAllocator & timeDomainKHRAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_KHR_fragment_shading_rate === template VULKAN_HPP_NODISCARD Result getFragmentShadingRatesKHR( uint32_t * pFragmentShadingRateCount, VULKAN_HPP_NAMESPACE::PhysicalDeviceFragmentShadingRateKHR * pFragmentShadingRates, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getFragmentShadingRatesKHR( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getFragmentShadingRatesKHR( PhysicalDeviceFragmentShadingRateKHRAllocator & physicalDeviceFragmentShadingRateKHRAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_EXT_tooling_info === template VULKAN_HPP_NODISCARD Result getToolPropertiesEXT( uint32_t * pToolCount, VULKAN_HPP_NAMESPACE::PhysicalDeviceToolProperties * pToolProperties, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if< std::is_same::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getToolPropertiesEXT( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if< std::is_same::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getToolPropertiesEXT( PhysicalDeviceToolPropertiesAllocator & physicalDeviceToolPropertiesAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_NV_cooperative_matrix === template VULKAN_HPP_NODISCARD Result getCooperativeMatrixPropertiesNV( uint32_t * pPropertyCount, VULKAN_HPP_NAMESPACE::CooperativeMatrixPropertiesNV * pProperties, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if< std::is_same::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getCooperativeMatrixPropertiesNV( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if< std::is_same::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getCooperativeMatrixPropertiesNV( CooperativeMatrixPropertiesNVAllocator & cooperativeMatrixPropertiesNVAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_NV_coverage_reduction_mode === template VULKAN_HPP_NODISCARD Result getSupportedFramebufferMixedSamplesCombinationsNV( uint32_t * pCombinationCount, VULKAN_HPP_NAMESPACE::FramebufferMixedSamplesCombinationNV * pCombinations, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getSupportedFramebufferMixedSamplesCombinationsNV( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getSupportedFramebufferMixedSamplesCombinationsNV( FramebufferMixedSamplesCombinationNVAllocator & framebufferMixedSamplesCombinationNVAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_EXT_full_screen_exclusive === template VULKAN_HPP_NODISCARD Result getSurfacePresentModes2EXT( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR * pSurfaceInfo, uint32_t * pPresentModeCount, VULKAN_HPP_NAMESPACE::PresentModeKHR * pPresentModes, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getSurfacePresentModes2EXT( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR & surfaceInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getSurfacePresentModes2EXT( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR & surfaceInfo, PresentModeKHRAllocator & presentModeKHRAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_EXT_acquire_drm_display === #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD Result acquireDrmDisplayEXT( int32_t drmFd, VULKAN_HPP_NAMESPACE::DisplayKHR display, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #else template typename ResultValueType::type acquireDrmDisplayEXT( int32_t drmFd, VULKAN_HPP_NAMESPACE::DisplayKHR display, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ template VULKAN_HPP_NODISCARD Result getDrmDisplayEXT( int32_t drmFd, uint32_t connectorId, VULKAN_HPP_NAMESPACE::DisplayKHR * display, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type getDrmDisplayEXT( int32_t drmFd, uint32_t connectorId, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD typename ResultValueType>::type getDrmDisplayEXTUnique( int32_t drmFd, uint32_t connectorId, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_KHR_video_encode_queue === template VULKAN_HPP_NODISCARD Result getVideoEncodeQualityLevelPropertiesKHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceVideoEncodeQualityLevelInfoKHR * pQualityLevelInfo, VULKAN_HPP_NAMESPACE::VideoEncodeQualityLevelPropertiesKHR * pQualityLevelProperties, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type getVideoEncodeQualityLevelPropertiesKHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceVideoEncodeQualityLevelInfoKHR & qualityLevelInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template VULKAN_HPP_NODISCARD typename ResultValueType>::type getVideoEncodeQualityLevelPropertiesKHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceVideoEncodeQualityLevelInfoKHR & qualityLevelInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_NV_acquire_winrt_display === # ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD Result acquireWinrtDisplayNV( VULKAN_HPP_NAMESPACE::DisplayKHR display, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; # else template VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS typename ResultValueType::type acquireWinrtDisplayNV( VULKAN_HPP_NAMESPACE::DisplayKHR display, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ template VULKAN_HPP_NODISCARD Result getWinrtDisplayNV( uint32_t deviceRelativeId, VULKAN_HPP_NAMESPACE::DisplayKHR * pDisplay, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type getWinrtDisplayNV( uint32_t deviceRelativeId, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD typename ResultValueType>::type getWinrtDisplayNVUnique( uint32_t deviceRelativeId, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_NO_SMART_HANDLE */ # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #endif /*VK_USE_PLATFORM_WIN32_KHR*/ #if defined( VK_USE_PLATFORM_DIRECTFB_EXT ) //=== VK_EXT_directfb_surface === template Bool32 getDirectFBPresentationSupportEXT( uint32_t queueFamilyIndex, IDirectFB * dfb, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NAMESPACE::Bool32 getDirectFBPresentationSupportEXT( uint32_t queueFamilyIndex, IDirectFB & dfb, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #endif /*VK_USE_PLATFORM_DIRECTFB_EXT*/ #if defined( VK_USE_PLATFORM_SCREEN_QNX ) //=== VK_QNX_screen_surface === template Bool32 getScreenPresentationSupportQNX( uint32_t queueFamilyIndex, struct _screen_window * window, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NAMESPACE::Bool32 getScreenPresentationSupportQNX( uint32_t queueFamilyIndex, struct _screen_window & window, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #endif /*VK_USE_PLATFORM_SCREEN_QNX*/ //=== VK_NV_optical_flow === template VULKAN_HPP_NODISCARD Result getOpticalFlowImageFormatsNV( const VULKAN_HPP_NAMESPACE::OpticalFlowImageFormatInfoNV * pOpticalFlowImageFormatInfo, uint32_t * pFormatCount, VULKAN_HPP_NAMESPACE::OpticalFlowImageFormatPropertiesNV * pImageFormatProperties, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if< std::is_same::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getOpticalFlowImageFormatsNV( const VULKAN_HPP_NAMESPACE::OpticalFlowImageFormatInfoNV & opticalFlowImageFormatInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if< std::is_same::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getOpticalFlowImageFormatsNV( const VULKAN_HPP_NAMESPACE::OpticalFlowImageFormatInfoNV & opticalFlowImageFormatInfo, OpticalFlowImageFormatPropertiesNVAllocator & opticalFlowImageFormatPropertiesNVAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_NV_cooperative_vector === template VULKAN_HPP_NODISCARD Result getCooperativeVectorPropertiesNV( uint32_t * pPropertyCount, VULKAN_HPP_NAMESPACE::CooperativeVectorPropertiesNV * pProperties, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if< std::is_same::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getCooperativeVectorPropertiesNV( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if< std::is_same::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getCooperativeVectorPropertiesNV( CooperativeVectorPropertiesNVAllocator & cooperativeVectorPropertiesNVAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_KHR_cooperative_matrix === template VULKAN_HPP_NODISCARD Result getCooperativeMatrixPropertiesKHR( uint32_t * pPropertyCount, VULKAN_HPP_NAMESPACE::CooperativeMatrixPropertiesKHR * pProperties, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if< std::is_same::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getCooperativeMatrixPropertiesKHR( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if< std::is_same::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getCooperativeMatrixPropertiesKHR( CooperativeMatrixPropertiesKHRAllocator & cooperativeMatrixPropertiesKHRAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_KHR_calibrated_timestamps === template VULKAN_HPP_NODISCARD Result getCalibrateableTimeDomainsKHR( uint32_t * pTimeDomainCount, VULKAN_HPP_NAMESPACE::TimeDomainKHR * pTimeDomains, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getCalibrateableTimeDomainsKHR( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type getCalibrateableTimeDomainsKHR( TimeDomainKHRAllocator & timeDomainKHRAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_NV_cooperative_matrix2 === template VULKAN_HPP_NODISCARD Result getCooperativeMatrixFlexibleDimensionsPropertiesNV( uint32_t * pPropertyCount, VULKAN_HPP_NAMESPACE::CooperativeMatrixFlexibleDimensionsPropertiesNV * pProperties, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template < typename CooperativeMatrixFlexibleDimensionsPropertiesNVAllocator = std::allocator, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType< std::vector>::type getCooperativeMatrixFlexibleDimensionsPropertiesNV( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template < typename CooperativeMatrixFlexibleDimensionsPropertiesNVAllocator = std::allocator, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType< std::vector>::type getCooperativeMatrixFlexibleDimensionsPropertiesNV( CooperativeMatrixFlexibleDimensionsPropertiesNVAllocator & cooperativeMatrixFlexibleDimensionsPropertiesNVAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ operator VkPhysicalDevice() const VULKAN_HPP_NOEXCEPT { return m_physicalDevice; } explicit operator bool() const VULKAN_HPP_NOEXCEPT { return m_physicalDevice != VK_NULL_HANDLE; } bool operator!() const VULKAN_HPP_NOEXCEPT { return m_physicalDevice == VK_NULL_HANDLE; } private: VkPhysicalDevice m_physicalDevice = {}; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::PhysicalDevice; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::PhysicalDevice; }; #if ( VK_USE_64_BIT_PTR_DEFINES == 1 ) template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::PhysicalDevice; }; #endif template <> struct isVulkanHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; class Instance { public: using CType = VkInstance; using NativeType = VkInstance; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eInstance; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eInstance; public: Instance() VULKAN_HPP_NOEXCEPT{}; // = default - try to workaround a compiler issue Instance( Instance const & rhs ) = default; Instance & operator=( Instance const & rhs ) = default; #if !defined( VULKAN_HPP_HANDLES_MOVE_EXCHANGE ) Instance( Instance && rhs ) = default; Instance & operator=( Instance && rhs ) = default; #else Instance( Instance && rhs ) VULKAN_HPP_NOEXCEPT : m_instance( VULKAN_HPP_NAMESPACE::exchange( rhs.m_instance, {} ) ) {} Instance & operator=( Instance && rhs ) VULKAN_HPP_NOEXCEPT { m_instance = VULKAN_HPP_NAMESPACE::exchange( rhs.m_instance, {} ); return *this; } #endif VULKAN_HPP_CONSTEXPR Instance( std::nullptr_t ) VULKAN_HPP_NOEXCEPT {} Instance( VkInstance instance ) VULKAN_HPP_NOEXCEPT : m_instance( instance ) {} Instance & operator=( VkInstance instance ) VULKAN_HPP_NOEXCEPT { m_instance = instance; return *this; } Instance & operator=( std::nullptr_t ) VULKAN_HPP_NOEXCEPT { m_instance = {}; return *this; } //=== VK_VERSION_1_0 === template void destroy( const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void destroy( Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result enumeratePhysicalDevices( uint32_t * pPhysicalDeviceCount, VULKAN_HPP_NAMESPACE::PhysicalDevice * pPhysicalDevices, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type enumeratePhysicalDevices( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type enumeratePhysicalDevices( PhysicalDeviceAllocator & physicalDeviceAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template PFN_vkVoidFunction getProcAddr( const char * pName, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NAMESPACE::PFN_VoidFunction getProcAddr( const std::string & name, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_VERSION_1_1 === template VULKAN_HPP_NODISCARD Result enumeratePhysicalDeviceGroups( uint32_t * pPhysicalDeviceGroupCount, VULKAN_HPP_NAMESPACE::PhysicalDeviceGroupProperties * pPhysicalDeviceGroupProperties, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if< std::is_same::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type enumeratePhysicalDeviceGroups( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if< std::is_same::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type enumeratePhysicalDeviceGroups( PhysicalDeviceGroupPropertiesAllocator & physicalDeviceGroupPropertiesAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_KHR_surface === template void destroySurfaceKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void destroySurfaceKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void destroy( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void destroy( VULKAN_HPP_NAMESPACE::SurfaceKHR surface, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_KHR_display === template VULKAN_HPP_NODISCARD Result createDisplayPlaneSurfaceKHR( const VULKAN_HPP_NAMESPACE::DisplaySurfaceCreateInfoKHR * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::SurfaceKHR * pSurface, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type createDisplayPlaneSurfaceKHR( const VULKAN_HPP_NAMESPACE::DisplaySurfaceCreateInfoKHR & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD typename ResultValueType>::type createDisplayPlaneSurfaceKHRUnique( const VULKAN_HPP_NAMESPACE::DisplaySurfaceCreateInfoKHR & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #if defined( VK_USE_PLATFORM_XLIB_KHR ) //=== VK_KHR_xlib_surface === template VULKAN_HPP_NODISCARD Result createXlibSurfaceKHR( const VULKAN_HPP_NAMESPACE::XlibSurfaceCreateInfoKHR * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::SurfaceKHR * pSurface, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type createXlibSurfaceKHR( const VULKAN_HPP_NAMESPACE::XlibSurfaceCreateInfoKHR & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD typename ResultValueType>::type createXlibSurfaceKHRUnique( const VULKAN_HPP_NAMESPACE::XlibSurfaceCreateInfoKHR & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_NO_SMART_HANDLE */ # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #endif /*VK_USE_PLATFORM_XLIB_KHR*/ #if defined( VK_USE_PLATFORM_XCB_KHR ) //=== VK_KHR_xcb_surface === template VULKAN_HPP_NODISCARD Result createXcbSurfaceKHR( const VULKAN_HPP_NAMESPACE::XcbSurfaceCreateInfoKHR * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::SurfaceKHR * pSurface, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type createXcbSurfaceKHR( const VULKAN_HPP_NAMESPACE::XcbSurfaceCreateInfoKHR & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD typename ResultValueType>::type createXcbSurfaceKHRUnique( const VULKAN_HPP_NAMESPACE::XcbSurfaceCreateInfoKHR & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_NO_SMART_HANDLE */ # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #endif /*VK_USE_PLATFORM_XCB_KHR*/ #if defined( VK_USE_PLATFORM_WAYLAND_KHR ) //=== VK_KHR_wayland_surface === template VULKAN_HPP_NODISCARD Result createWaylandSurfaceKHR( const VULKAN_HPP_NAMESPACE::WaylandSurfaceCreateInfoKHR * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::SurfaceKHR * pSurface, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type createWaylandSurfaceKHR( const VULKAN_HPP_NAMESPACE::WaylandSurfaceCreateInfoKHR & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD typename ResultValueType>::type createWaylandSurfaceKHRUnique( const VULKAN_HPP_NAMESPACE::WaylandSurfaceCreateInfoKHR & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_NO_SMART_HANDLE */ # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #endif /*VK_USE_PLATFORM_WAYLAND_KHR*/ #if defined( VK_USE_PLATFORM_ANDROID_KHR ) //=== VK_KHR_android_surface === template VULKAN_HPP_NODISCARD Result createAndroidSurfaceKHR( const VULKAN_HPP_NAMESPACE::AndroidSurfaceCreateInfoKHR * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::SurfaceKHR * pSurface, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type createAndroidSurfaceKHR( const VULKAN_HPP_NAMESPACE::AndroidSurfaceCreateInfoKHR & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD typename ResultValueType>::type createAndroidSurfaceKHRUnique( const VULKAN_HPP_NAMESPACE::AndroidSurfaceCreateInfoKHR & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_NO_SMART_HANDLE */ # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #endif /*VK_USE_PLATFORM_ANDROID_KHR*/ #if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_KHR_win32_surface === template VULKAN_HPP_NODISCARD Result createWin32SurfaceKHR( const VULKAN_HPP_NAMESPACE::Win32SurfaceCreateInfoKHR * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::SurfaceKHR * pSurface, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type createWin32SurfaceKHR( const VULKAN_HPP_NAMESPACE::Win32SurfaceCreateInfoKHR & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD typename ResultValueType>::type createWin32SurfaceKHRUnique( const VULKAN_HPP_NAMESPACE::Win32SurfaceCreateInfoKHR & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_NO_SMART_HANDLE */ # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_EXT_debug_report === template VULKAN_HPP_NODISCARD Result createDebugReportCallbackEXT( const VULKAN_HPP_NAMESPACE::DebugReportCallbackCreateInfoEXT * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::DebugReportCallbackEXT * pCallback, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type createDebugReportCallbackEXT( const VULKAN_HPP_NAMESPACE::DebugReportCallbackCreateInfoEXT & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD typename ResultValueType>::type createDebugReportCallbackEXTUnique( const VULKAN_HPP_NAMESPACE::DebugReportCallbackCreateInfoEXT & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void destroyDebugReportCallbackEXT( VULKAN_HPP_NAMESPACE::DebugReportCallbackEXT callback, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void destroyDebugReportCallbackEXT( VULKAN_HPP_NAMESPACE::DebugReportCallbackEXT callback VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void destroy( VULKAN_HPP_NAMESPACE::DebugReportCallbackEXT callback, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void destroy( VULKAN_HPP_NAMESPACE::DebugReportCallbackEXT callback, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void debugReportMessageEXT( VULKAN_HPP_NAMESPACE::DebugReportFlagsEXT flags, VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT objectType, uint64_t object, size_t location, int32_t messageCode, const char * pLayerPrefix, const char * pMessage, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void debugReportMessageEXT( VULKAN_HPP_NAMESPACE::DebugReportFlagsEXT flags, VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT objectType, uint64_t object, size_t location, int32_t messageCode, const std::string & layerPrefix, const std::string & message, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #if defined( VK_USE_PLATFORM_GGP ) //=== VK_GGP_stream_descriptor_surface === template VULKAN_HPP_NODISCARD Result createStreamDescriptorSurfaceGGP( const VULKAN_HPP_NAMESPACE::StreamDescriptorSurfaceCreateInfoGGP * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::SurfaceKHR * pSurface, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type createStreamDescriptorSurfaceGGP( const VULKAN_HPP_NAMESPACE::StreamDescriptorSurfaceCreateInfoGGP & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD typename ResultValueType>::type createStreamDescriptorSurfaceGGPUnique( const VULKAN_HPP_NAMESPACE::StreamDescriptorSurfaceCreateInfoGGP & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_NO_SMART_HANDLE */ # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #endif /*VK_USE_PLATFORM_GGP*/ #if defined( VK_USE_PLATFORM_VI_NN ) //=== VK_NN_vi_surface === template VULKAN_HPP_NODISCARD Result createViSurfaceNN( const VULKAN_HPP_NAMESPACE::ViSurfaceCreateInfoNN * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::SurfaceKHR * pSurface, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type createViSurfaceNN( const VULKAN_HPP_NAMESPACE::ViSurfaceCreateInfoNN & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD typename ResultValueType>::type createViSurfaceNNUnique( const VULKAN_HPP_NAMESPACE::ViSurfaceCreateInfoNN & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_NO_SMART_HANDLE */ # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #endif /*VK_USE_PLATFORM_VI_NN*/ //=== VK_KHR_device_group_creation === template VULKAN_HPP_NODISCARD Result enumeratePhysicalDeviceGroupsKHR( uint32_t * pPhysicalDeviceGroupCount, VULKAN_HPP_NAMESPACE::PhysicalDeviceGroupProperties * pPhysicalDeviceGroupProperties, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if< std::is_same::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type enumeratePhysicalDeviceGroupsKHR( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if< std::is_same::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type enumeratePhysicalDeviceGroupsKHR( PhysicalDeviceGroupPropertiesAllocator & physicalDeviceGroupPropertiesAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #if defined( VK_USE_PLATFORM_IOS_MVK ) //=== VK_MVK_ios_surface === template VULKAN_HPP_NODISCARD Result createIOSSurfaceMVK( const VULKAN_HPP_NAMESPACE::IOSSurfaceCreateInfoMVK * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::SurfaceKHR * pSurface, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type createIOSSurfaceMVK( const VULKAN_HPP_NAMESPACE::IOSSurfaceCreateInfoMVK & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD typename ResultValueType>::type createIOSSurfaceMVKUnique( const VULKAN_HPP_NAMESPACE::IOSSurfaceCreateInfoMVK & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_NO_SMART_HANDLE */ # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #endif /*VK_USE_PLATFORM_IOS_MVK*/ #if defined( VK_USE_PLATFORM_MACOS_MVK ) //=== VK_MVK_macos_surface === template VULKAN_HPP_NODISCARD Result createMacOSSurfaceMVK( const VULKAN_HPP_NAMESPACE::MacOSSurfaceCreateInfoMVK * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::SurfaceKHR * pSurface, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type createMacOSSurfaceMVK( const VULKAN_HPP_NAMESPACE::MacOSSurfaceCreateInfoMVK & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD typename ResultValueType>::type createMacOSSurfaceMVKUnique( const VULKAN_HPP_NAMESPACE::MacOSSurfaceCreateInfoMVK & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_NO_SMART_HANDLE */ # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #endif /*VK_USE_PLATFORM_MACOS_MVK*/ //=== VK_EXT_debug_utils === template VULKAN_HPP_NODISCARD Result createDebugUtilsMessengerEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsMessengerCreateInfoEXT * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::DebugUtilsMessengerEXT * pMessenger, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type createDebugUtilsMessengerEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsMessengerCreateInfoEXT & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD typename ResultValueType>::type createDebugUtilsMessengerEXTUnique( const VULKAN_HPP_NAMESPACE::DebugUtilsMessengerCreateInfoEXT & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void destroyDebugUtilsMessengerEXT( VULKAN_HPP_NAMESPACE::DebugUtilsMessengerEXT messenger, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void destroyDebugUtilsMessengerEXT( VULKAN_HPP_NAMESPACE::DebugUtilsMessengerEXT messenger VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void destroy( VULKAN_HPP_NAMESPACE::DebugUtilsMessengerEXT messenger, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void destroy( VULKAN_HPP_NAMESPACE::DebugUtilsMessengerEXT messenger, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template void submitDebugUtilsMessageEXT( VULKAN_HPP_NAMESPACE::DebugUtilsMessageSeverityFlagBitsEXT messageSeverity, VULKAN_HPP_NAMESPACE::DebugUtilsMessageTypeFlagsEXT messageTypes, const VULKAN_HPP_NAMESPACE::DebugUtilsMessengerCallbackDataEXT * pCallbackData, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template void submitDebugUtilsMessageEXT( VULKAN_HPP_NAMESPACE::DebugUtilsMessageSeverityFlagBitsEXT messageSeverity, VULKAN_HPP_NAMESPACE::DebugUtilsMessageTypeFlagsEXT messageTypes, const VULKAN_HPP_NAMESPACE::DebugUtilsMessengerCallbackDataEXT & callbackData, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #if defined( VK_USE_PLATFORM_FUCHSIA ) //=== VK_FUCHSIA_imagepipe_surface === template VULKAN_HPP_NODISCARD Result createImagePipeSurfaceFUCHSIA( const VULKAN_HPP_NAMESPACE::ImagePipeSurfaceCreateInfoFUCHSIA * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::SurfaceKHR * pSurface, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type createImagePipeSurfaceFUCHSIA( const VULKAN_HPP_NAMESPACE::ImagePipeSurfaceCreateInfoFUCHSIA & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD typename ResultValueType>::type createImagePipeSurfaceFUCHSIAUnique( const VULKAN_HPP_NAMESPACE::ImagePipeSurfaceCreateInfoFUCHSIA & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_NO_SMART_HANDLE */ # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #endif /*VK_USE_PLATFORM_FUCHSIA*/ #if defined( VK_USE_PLATFORM_METAL_EXT ) //=== VK_EXT_metal_surface === template VULKAN_HPP_NODISCARD Result createMetalSurfaceEXT( const VULKAN_HPP_NAMESPACE::MetalSurfaceCreateInfoEXT * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::SurfaceKHR * pSurface, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type createMetalSurfaceEXT( const VULKAN_HPP_NAMESPACE::MetalSurfaceCreateInfoEXT & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD typename ResultValueType>::type createMetalSurfaceEXTUnique( const VULKAN_HPP_NAMESPACE::MetalSurfaceCreateInfoEXT & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_NO_SMART_HANDLE */ # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #endif /*VK_USE_PLATFORM_METAL_EXT*/ //=== VK_EXT_headless_surface === template VULKAN_HPP_NODISCARD Result createHeadlessSurfaceEXT( const VULKAN_HPP_NAMESPACE::HeadlessSurfaceCreateInfoEXT * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::SurfaceKHR * pSurface, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type createHeadlessSurfaceEXT( const VULKAN_HPP_NAMESPACE::HeadlessSurfaceCreateInfoEXT & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD typename ResultValueType>::type createHeadlessSurfaceEXTUnique( const VULKAN_HPP_NAMESPACE::HeadlessSurfaceCreateInfoEXT & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #if defined( VK_USE_PLATFORM_DIRECTFB_EXT ) //=== VK_EXT_directfb_surface === template VULKAN_HPP_NODISCARD Result createDirectFBSurfaceEXT( const VULKAN_HPP_NAMESPACE::DirectFBSurfaceCreateInfoEXT * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::SurfaceKHR * pSurface, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type createDirectFBSurfaceEXT( const VULKAN_HPP_NAMESPACE::DirectFBSurfaceCreateInfoEXT & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD typename ResultValueType>::type createDirectFBSurfaceEXTUnique( const VULKAN_HPP_NAMESPACE::DirectFBSurfaceCreateInfoEXT & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_NO_SMART_HANDLE */ # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #endif /*VK_USE_PLATFORM_DIRECTFB_EXT*/ #if defined( VK_USE_PLATFORM_SCREEN_QNX ) //=== VK_QNX_screen_surface === template VULKAN_HPP_NODISCARD Result createScreenSurfaceQNX( const VULKAN_HPP_NAMESPACE::ScreenSurfaceCreateInfoQNX * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::SurfaceKHR * pSurface, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; # ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type createScreenSurfaceQNX( const VULKAN_HPP_NAMESPACE::ScreenSurfaceCreateInfoQNX & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD typename ResultValueType>::type createScreenSurfaceQNXUnique( const VULKAN_HPP_NAMESPACE::ScreenSurfaceCreateInfoQNX & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const; # endif /* VULKAN_HPP_NO_SMART_HANDLE */ # endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ #endif /*VK_USE_PLATFORM_SCREEN_QNX*/ operator VkInstance() const VULKAN_HPP_NOEXCEPT { return m_instance; } explicit operator bool() const VULKAN_HPP_NOEXCEPT { return m_instance != VK_NULL_HANDLE; } bool operator!() const VULKAN_HPP_NOEXCEPT { return m_instance == VK_NULL_HANDLE; } private: VkInstance m_instance = {}; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::Instance; }; template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::Instance; }; #if ( VK_USE_64_BIT_PTR_DEFINES == 1 ) template <> struct CppType { using Type = VULKAN_HPP_NAMESPACE::Instance; }; #endif template <> struct isVulkanHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; //=== VK_VERSION_1_0 === template VULKAN_HPP_NODISCARD Result createInstance( const VULKAN_HPP_NAMESPACE::InstanceCreateInfo * pCreateInfo, const VULKAN_HPP_NAMESPACE::AllocationCallbacks * pAllocator, VULKAN_HPP_NAMESPACE::Instance * pInstance, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type createInstance( const VULKAN_HPP_NAMESPACE::InstanceCreateInfo & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ); # ifndef VULKAN_HPP_NO_SMART_HANDLE template VULKAN_HPP_NODISCARD typename ResultValueType>::type createInstanceUnique( const VULKAN_HPP_NAMESPACE::InstanceCreateInfo & createInfo, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ); # endif /* VULKAN_HPP_NO_SMART_HANDLE */ #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result enumerateInstanceExtensionProperties( const char * pLayerName, uint32_t * pPropertyCount, VULKAN_HPP_NAMESPACE::ExtensionProperties * pProperties, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template < typename ExtensionPropertiesAllocator = std::allocator, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type enumerateInstanceExtensionProperties( Optional layerName VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ); template < typename ExtensionPropertiesAllocator = std::allocator, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type enumerateInstanceExtensionProperties( Optional layerName, ExtensionPropertiesAllocator & extensionPropertiesAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ); #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ template VULKAN_HPP_NODISCARD Result enumerateInstanceLayerProperties( uint32_t * pPropertyCount, VULKAN_HPP_NAMESPACE::LayerProperties * pProperties, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type enumerateInstanceLayerProperties( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ); template , typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE, typename std::enable_if::value, int>::type = 0> VULKAN_HPP_NODISCARD typename ResultValueType>::type enumerateInstanceLayerProperties( LayerPropertiesAllocator & layerPropertiesAllocator, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ); #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ //=== VK_VERSION_1_1 === template VULKAN_HPP_NODISCARD Result enumerateInstanceVersion( uint32_t * pApiVersion, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) VULKAN_HPP_NOEXCEPT; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template VULKAN_HPP_NODISCARD typename ResultValueType::type enumerateInstanceVersion( Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ); #endif /* VULKAN_HPP_DISABLE_ENHANCED_MODE */ // operators to compare vk::-handles #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) template ::value, int>::type = 0> auto operator<=>( T const & lhs, T const & rhs ) { return static_cast( lhs ) <=> static_cast( rhs ); } #else template ::value, int>::type = 0> bool operator==( T const & lhs, T const & rhs ) { return static_cast( lhs ) == static_cast( rhs ); } template ::value, int>::type = 0> bool operator!=( T const & lhs, T const & rhs ) { return static_cast( lhs ) != static_cast( rhs ); } template ::value, int>::type = 0> bool operator<( T const & lhs, T const & rhs ) { return static_cast( lhs ) < static_cast( rhs ); } #endif template ::value, int>::type = 0> bool operator==( T const & v, std::nullptr_t ) { return !v; } template ::value, int>::type = 0> bool operator==( std::nullptr_t, T const & v ) { return !v; } template ::value, int>::type = 0> bool operator!=( T const & v, std::nullptr_t ) { return !!v; } template ::value, int>::type = 0> bool operator!=( std::nullptr_t, T const & v ) { return !!v; } } // namespace VULKAN_HPP_NAMESPACE #endif ================================================ FILE: src/libraries/vulkanheaders/vulkan_hash.hpp ================================================ // Copyright 2015-2025 The Khronos Group Inc. // // SPDX-License-Identifier: Apache-2.0 OR MIT // // This header is generated from the Khronos Vulkan XML API Registry. #ifndef VULKAN_HASH_HPP #define VULKAN_HASH_HPP #include namespace std { //======================================= //=== HASH structures for Flags types === //======================================= template struct hash> { std::size_t operator()( VULKAN_HPP_NAMESPACE::Flags const & flags ) const VULKAN_HPP_NOEXCEPT { return std::hash::type>{}( static_cast::type>( flags ) ); } }; //=================================== //=== HASH structures for handles === //=================================== //=== VK_VERSION_1_0 === template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::Instance const & instance ) const VULKAN_HPP_NOEXCEPT { return std::hash{}( static_cast( instance ) ); } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDevice const & physicalDevice ) const VULKAN_HPP_NOEXCEPT { return std::hash{}( static_cast( physicalDevice ) ); } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::Device const & device ) const VULKAN_HPP_NOEXCEPT { return std::hash{}( static_cast( device ) ); } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::Queue const & queue ) const VULKAN_HPP_NOEXCEPT { return std::hash{}( static_cast( queue ) ); } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DeviceMemory const & deviceMemory ) const VULKAN_HPP_NOEXCEPT { return std::hash{}( static_cast( deviceMemory ) ); } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::Fence const & fence ) const VULKAN_HPP_NOEXCEPT { return std::hash{}( static_cast( fence ) ); } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::Semaphore const & semaphore ) const VULKAN_HPP_NOEXCEPT { return std::hash{}( static_cast( semaphore ) ); } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::Event const & event ) const VULKAN_HPP_NOEXCEPT { return std::hash{}( static_cast( event ) ); } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::QueryPool const & queryPool ) const VULKAN_HPP_NOEXCEPT { return std::hash{}( static_cast( queryPool ) ); } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::Buffer const & buffer ) const VULKAN_HPP_NOEXCEPT { return std::hash{}( static_cast( buffer ) ); } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::BufferView const & bufferView ) const VULKAN_HPP_NOEXCEPT { return std::hash{}( static_cast( bufferView ) ); } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::Image const & image ) const VULKAN_HPP_NOEXCEPT { return std::hash{}( static_cast( image ) ); } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ImageView const & imageView ) const VULKAN_HPP_NOEXCEPT { return std::hash{}( static_cast( imageView ) ); } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ShaderModule const & shaderModule ) const VULKAN_HPP_NOEXCEPT { return std::hash{}( static_cast( shaderModule ) ); } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineCache const & pipelineCache ) const VULKAN_HPP_NOEXCEPT { return std::hash{}( static_cast( pipelineCache ) ); } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::Pipeline const & pipeline ) const VULKAN_HPP_NOEXCEPT { return std::hash{}( static_cast( pipeline ) ); } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineLayout const & pipelineLayout ) const VULKAN_HPP_NOEXCEPT { return std::hash{}( static_cast( pipelineLayout ) ); } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::Sampler const & sampler ) const VULKAN_HPP_NOEXCEPT { return std::hash{}( static_cast( sampler ) ); } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DescriptorPool const & descriptorPool ) const VULKAN_HPP_NOEXCEPT { return std::hash{}( static_cast( descriptorPool ) ); } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DescriptorSet const & descriptorSet ) const VULKAN_HPP_NOEXCEPT { return std::hash{}( static_cast( descriptorSet ) ); } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DescriptorSetLayout const & descriptorSetLayout ) const VULKAN_HPP_NOEXCEPT { return std::hash{}( static_cast( descriptorSetLayout ) ); } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::Framebuffer const & framebuffer ) const VULKAN_HPP_NOEXCEPT { return std::hash{}( static_cast( framebuffer ) ); } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::RenderPass const & renderPass ) const VULKAN_HPP_NOEXCEPT { return std::hash{}( static_cast( renderPass ) ); } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::CommandPool const & commandPool ) const VULKAN_HPP_NOEXCEPT { return std::hash{}( static_cast( commandPool ) ); } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::CommandBuffer const & commandBuffer ) const VULKAN_HPP_NOEXCEPT { return std::hash{}( static_cast( commandBuffer ) ); } }; //=== VK_VERSION_1_1 === template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion const & samplerYcbcrConversion ) const VULKAN_HPP_NOEXCEPT { return std::hash{}( static_cast( samplerYcbcrConversion ) ); } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate const & descriptorUpdateTemplate ) const VULKAN_HPP_NOEXCEPT { return std::hash{}( static_cast( descriptorUpdateTemplate ) ); } }; //=== VK_VERSION_1_3 === template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PrivateDataSlot const & privateDataSlot ) const VULKAN_HPP_NOEXCEPT { return std::hash{}( static_cast( privateDataSlot ) ); } }; //=== VK_KHR_surface === template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::SurfaceKHR const & surfaceKHR ) const VULKAN_HPP_NOEXCEPT { return std::hash{}( static_cast( surfaceKHR ) ); } }; //=== VK_KHR_swapchain === template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::SwapchainKHR const & swapchainKHR ) const VULKAN_HPP_NOEXCEPT { return std::hash{}( static_cast( swapchainKHR ) ); } }; //=== VK_KHR_display === template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DisplayKHR const & displayKHR ) const VULKAN_HPP_NOEXCEPT { return std::hash{}( static_cast( displayKHR ) ); } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DisplayModeKHR const & displayModeKHR ) const VULKAN_HPP_NOEXCEPT { return std::hash{}( static_cast( displayModeKHR ) ); } }; //=== VK_EXT_debug_report === template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DebugReportCallbackEXT const & debugReportCallbackEXT ) const VULKAN_HPP_NOEXCEPT { return std::hash{}( static_cast( debugReportCallbackEXT ) ); } }; //=== VK_KHR_video_queue === template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoSessionKHR const & videoSessionKHR ) const VULKAN_HPP_NOEXCEPT { return std::hash{}( static_cast( videoSessionKHR ) ); } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoSessionParametersKHR const & videoSessionParametersKHR ) const VULKAN_HPP_NOEXCEPT { return std::hash{}( static_cast( videoSessionParametersKHR ) ); } }; //=== VK_NVX_binary_import === template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::CuModuleNVX const & cuModuleNVX ) const VULKAN_HPP_NOEXCEPT { return std::hash{}( static_cast( cuModuleNVX ) ); } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::CuFunctionNVX const & cuFunctionNVX ) const VULKAN_HPP_NOEXCEPT { return std::hash{}( static_cast( cuFunctionNVX ) ); } }; //=== VK_EXT_debug_utils === template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DebugUtilsMessengerEXT const & debugUtilsMessengerEXT ) const VULKAN_HPP_NOEXCEPT { return std::hash{}( static_cast( debugUtilsMessengerEXT ) ); } }; //=== VK_KHR_acceleration_structure === template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::AccelerationStructureKHR const & accelerationStructureKHR ) const VULKAN_HPP_NOEXCEPT { return std::hash{}( static_cast( accelerationStructureKHR ) ); } }; //=== VK_EXT_validation_cache === template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ValidationCacheEXT const & validationCacheEXT ) const VULKAN_HPP_NOEXCEPT { return std::hash{}( static_cast( validationCacheEXT ) ); } }; //=== VK_NV_ray_tracing === template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::AccelerationStructureNV const & accelerationStructureNV ) const VULKAN_HPP_NOEXCEPT { return std::hash{}( static_cast( accelerationStructureNV ) ); } }; //=== VK_INTEL_performance_query === template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PerformanceConfigurationINTEL const & performanceConfigurationINTEL ) const VULKAN_HPP_NOEXCEPT { return std::hash{}( static_cast( performanceConfigurationINTEL ) ); } }; //=== VK_KHR_deferred_host_operations === template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DeferredOperationKHR const & deferredOperationKHR ) const VULKAN_HPP_NOEXCEPT { return std::hash{}( static_cast( deferredOperationKHR ) ); } }; //=== VK_NV_device_generated_commands === template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNV const & indirectCommandsLayoutNV ) const VULKAN_HPP_NOEXCEPT { return std::hash{}( static_cast( indirectCommandsLayoutNV ) ); } }; #if defined( VK_ENABLE_BETA_EXTENSIONS ) //=== VK_NV_cuda_kernel_launch === template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::CudaModuleNV const & cudaModuleNV ) const VULKAN_HPP_NOEXCEPT { return std::hash{}( static_cast( cudaModuleNV ) ); } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::CudaFunctionNV const & cudaFunctionNV ) const VULKAN_HPP_NOEXCEPT { return std::hash{}( static_cast( cudaFunctionNV ) ); } }; #endif /*VK_ENABLE_BETA_EXTENSIONS*/ #if defined( VK_USE_PLATFORM_FUCHSIA ) //=== VK_FUCHSIA_buffer_collection === template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::BufferCollectionFUCHSIA const & bufferCollectionFUCHSIA ) const VULKAN_HPP_NOEXCEPT { return std::hash{}( static_cast( bufferCollectionFUCHSIA ) ); } }; #endif /*VK_USE_PLATFORM_FUCHSIA*/ //=== VK_EXT_opacity_micromap === template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::MicromapEXT const & micromapEXT ) const VULKAN_HPP_NOEXCEPT { return std::hash{}( static_cast( micromapEXT ) ); } }; //=== VK_NV_optical_flow === template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::OpticalFlowSessionNV const & opticalFlowSessionNV ) const VULKAN_HPP_NOEXCEPT { return std::hash{}( static_cast( opticalFlowSessionNV ) ); } }; //=== VK_EXT_shader_object === template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ShaderEXT const & shaderEXT ) const VULKAN_HPP_NOEXCEPT { return std::hash{}( static_cast( shaderEXT ) ); } }; //=== VK_KHR_pipeline_binary === template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineBinaryKHR const & pipelineBinaryKHR ) const VULKAN_HPP_NOEXCEPT { return std::hash{}( static_cast( pipelineBinaryKHR ) ); } }; //=== VK_EXT_device_generated_commands === template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutEXT const & indirectCommandsLayoutEXT ) const VULKAN_HPP_NOEXCEPT { return std::hash{}( static_cast( indirectCommandsLayoutEXT ) ); } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::IndirectExecutionSetEXT const & indirectExecutionSetEXT ) const VULKAN_HPP_NOEXCEPT { return std::hash{}( static_cast( indirectExecutionSetEXT ) ); } }; #if 14 <= VULKAN_HPP_CPP_VERSION //====================================== //=== HASH structures for structures === //====================================== # if !defined( VULKAN_HPP_HASH_COMBINE ) # define VULKAN_HPP_HASH_COMBINE( seed, value ) \ seed ^= std::hash::type>{}( value ) + 0x9e3779b9 + ( seed << 6 ) + ( seed >> 2 ) # endif template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::AabbPositionsKHR const & aabbPositionsKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, aabbPositionsKHR.minX ); VULKAN_HPP_HASH_COMBINE( seed, aabbPositionsKHR.minY ); VULKAN_HPP_HASH_COMBINE( seed, aabbPositionsKHR.minZ ); VULKAN_HPP_HASH_COMBINE( seed, aabbPositionsKHR.maxX ); VULKAN_HPP_HASH_COMBINE( seed, aabbPositionsKHR.maxY ); VULKAN_HPP_HASH_COMBINE( seed, aabbPositionsKHR.maxZ ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::AccelerationStructureBuildRangeInfoKHR const & accelerationStructureBuildRangeInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureBuildRangeInfoKHR.primitiveCount ); VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureBuildRangeInfoKHR.primitiveOffset ); VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureBuildRangeInfoKHR.firstVertex ); VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureBuildRangeInfoKHR.transformOffset ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::AccelerationStructureBuildSizesInfoKHR const & accelerationStructureBuildSizesInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureBuildSizesInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureBuildSizesInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureBuildSizesInfoKHR.accelerationStructureSize ); VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureBuildSizesInfoKHR.updateScratchSize ); VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureBuildSizesInfoKHR.buildScratchSize ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::AccelerationStructureCaptureDescriptorDataInfoEXT const & accelerationStructureCaptureDescriptorDataInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureCaptureDescriptorDataInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureCaptureDescriptorDataInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureCaptureDescriptorDataInfoEXT.accelerationStructure ); VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureCaptureDescriptorDataInfoEXT.accelerationStructureNV ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::AccelerationStructureCreateInfoKHR const & accelerationStructureCreateInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureCreateInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureCreateInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureCreateInfoKHR.createFlags ); VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureCreateInfoKHR.buffer ); VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureCreateInfoKHR.offset ); VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureCreateInfoKHR.size ); VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureCreateInfoKHR.type ); VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureCreateInfoKHR.deviceAddress ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::GeometryTrianglesNV const & geometryTrianglesNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, geometryTrianglesNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, geometryTrianglesNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, geometryTrianglesNV.vertexData ); VULKAN_HPP_HASH_COMBINE( seed, geometryTrianglesNV.vertexOffset ); VULKAN_HPP_HASH_COMBINE( seed, geometryTrianglesNV.vertexCount ); VULKAN_HPP_HASH_COMBINE( seed, geometryTrianglesNV.vertexStride ); VULKAN_HPP_HASH_COMBINE( seed, geometryTrianglesNV.vertexFormat ); VULKAN_HPP_HASH_COMBINE( seed, geometryTrianglesNV.indexData ); VULKAN_HPP_HASH_COMBINE( seed, geometryTrianglesNV.indexOffset ); VULKAN_HPP_HASH_COMBINE( seed, geometryTrianglesNV.indexCount ); VULKAN_HPP_HASH_COMBINE( seed, geometryTrianglesNV.indexType ); VULKAN_HPP_HASH_COMBINE( seed, geometryTrianglesNV.transformData ); VULKAN_HPP_HASH_COMBINE( seed, geometryTrianglesNV.transformOffset ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::GeometryAABBNV const & geometryAABBNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, geometryAABBNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, geometryAABBNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, geometryAABBNV.aabbData ); VULKAN_HPP_HASH_COMBINE( seed, geometryAABBNV.numAABBs ); VULKAN_HPP_HASH_COMBINE( seed, geometryAABBNV.stride ); VULKAN_HPP_HASH_COMBINE( seed, geometryAABBNV.offset ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::GeometryDataNV const & geometryDataNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, geometryDataNV.triangles ); VULKAN_HPP_HASH_COMBINE( seed, geometryDataNV.aabbs ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::GeometryNV const & geometryNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, geometryNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, geometryNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, geometryNV.geometryType ); VULKAN_HPP_HASH_COMBINE( seed, geometryNV.geometry ); VULKAN_HPP_HASH_COMBINE( seed, geometryNV.flags ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::AccelerationStructureInfoNV const & accelerationStructureInfoNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureInfoNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureInfoNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureInfoNV.type ); VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureInfoNV.flags ); VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureInfoNV.instanceCount ); VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureInfoNV.geometryCount ); VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureInfoNV.pGeometries ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::AccelerationStructureCreateInfoNV const & accelerationStructureCreateInfoNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureCreateInfoNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureCreateInfoNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureCreateInfoNV.compactedSize ); VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureCreateInfoNV.info ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::AccelerationStructureDeviceAddressInfoKHR const & accelerationStructureDeviceAddressInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureDeviceAddressInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureDeviceAddressInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureDeviceAddressInfoKHR.accelerationStructure ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::TransformMatrixKHR const & transformMatrixKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; for ( size_t i = 0; i < 3; ++i ) { for ( size_t j = 0; j < 4; ++j ) { VULKAN_HPP_HASH_COMBINE( seed, transformMatrixKHR.matrix[i][j] ); } } return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::AccelerationStructureInstanceKHR const & accelerationStructureInstanceKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureInstanceKHR.transform ); VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureInstanceKHR.instanceCustomIndex ); VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureInstanceKHR.mask ); VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureInstanceKHR.instanceShaderBindingTableRecordOffset ); VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureInstanceKHR.flags ); VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureInstanceKHR.accelerationStructureReference ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::AccelerationStructureMatrixMotionInstanceNV const & accelerationStructureMatrixMotionInstanceNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureMatrixMotionInstanceNV.transformT0 ); VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureMatrixMotionInstanceNV.transformT1 ); VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureMatrixMotionInstanceNV.instanceCustomIndex ); VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureMatrixMotionInstanceNV.mask ); VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureMatrixMotionInstanceNV.instanceShaderBindingTableRecordOffset ); VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureMatrixMotionInstanceNV.flags ); VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureMatrixMotionInstanceNV.accelerationStructureReference ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::AccelerationStructureMemoryRequirementsInfoNV const & accelerationStructureMemoryRequirementsInfoNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureMemoryRequirementsInfoNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureMemoryRequirementsInfoNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureMemoryRequirementsInfoNV.type ); VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureMemoryRequirementsInfoNV.accelerationStructure ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::AccelerationStructureMotionInfoNV const & accelerationStructureMotionInfoNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureMotionInfoNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureMotionInfoNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureMotionInfoNV.maxInstances ); VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureMotionInfoNV.flags ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::SRTDataNV const & sRTDataNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, sRTDataNV.sx ); VULKAN_HPP_HASH_COMBINE( seed, sRTDataNV.a ); VULKAN_HPP_HASH_COMBINE( seed, sRTDataNV.b ); VULKAN_HPP_HASH_COMBINE( seed, sRTDataNV.pvx ); VULKAN_HPP_HASH_COMBINE( seed, sRTDataNV.sy ); VULKAN_HPP_HASH_COMBINE( seed, sRTDataNV.c ); VULKAN_HPP_HASH_COMBINE( seed, sRTDataNV.pvy ); VULKAN_HPP_HASH_COMBINE( seed, sRTDataNV.sz ); VULKAN_HPP_HASH_COMBINE( seed, sRTDataNV.pvz ); VULKAN_HPP_HASH_COMBINE( seed, sRTDataNV.qx ); VULKAN_HPP_HASH_COMBINE( seed, sRTDataNV.qy ); VULKAN_HPP_HASH_COMBINE( seed, sRTDataNV.qz ); VULKAN_HPP_HASH_COMBINE( seed, sRTDataNV.qw ); VULKAN_HPP_HASH_COMBINE( seed, sRTDataNV.tx ); VULKAN_HPP_HASH_COMBINE( seed, sRTDataNV.ty ); VULKAN_HPP_HASH_COMBINE( seed, sRTDataNV.tz ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::AccelerationStructureSRTMotionInstanceNV const & accelerationStructureSRTMotionInstanceNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureSRTMotionInstanceNV.transformT0 ); VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureSRTMotionInstanceNV.transformT1 ); VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureSRTMotionInstanceNV.instanceCustomIndex ); VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureSRTMotionInstanceNV.mask ); VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureSRTMotionInstanceNV.instanceShaderBindingTableRecordOffset ); VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureSRTMotionInstanceNV.flags ); VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureSRTMotionInstanceNV.accelerationStructureReference ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::MicromapUsageEXT const & micromapUsageEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, micromapUsageEXT.count ); VULKAN_HPP_HASH_COMBINE( seed, micromapUsageEXT.subdivisionLevel ); VULKAN_HPP_HASH_COMBINE( seed, micromapUsageEXT.format ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::AccelerationStructureVersionInfoKHR const & accelerationStructureVersionInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureVersionInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureVersionInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, accelerationStructureVersionInfoKHR.pVersionData ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::AcquireNextImageInfoKHR const & acquireNextImageInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, acquireNextImageInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, acquireNextImageInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, acquireNextImageInfoKHR.swapchain ); VULKAN_HPP_HASH_COMBINE( seed, acquireNextImageInfoKHR.timeout ); VULKAN_HPP_HASH_COMBINE( seed, acquireNextImageInfoKHR.semaphore ); VULKAN_HPP_HASH_COMBINE( seed, acquireNextImageInfoKHR.fence ); VULKAN_HPP_HASH_COMBINE( seed, acquireNextImageInfoKHR.deviceMask ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::AcquireProfilingLockInfoKHR const & acquireProfilingLockInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, acquireProfilingLockInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, acquireProfilingLockInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, acquireProfilingLockInfoKHR.flags ); VULKAN_HPP_HASH_COMBINE( seed, acquireProfilingLockInfoKHR.timeout ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::AllocationCallbacks const & allocationCallbacks ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, allocationCallbacks.pUserData ); VULKAN_HPP_HASH_COMBINE( seed, allocationCallbacks.pfnAllocation ); VULKAN_HPP_HASH_COMBINE( seed, allocationCallbacks.pfnReallocation ); VULKAN_HPP_HASH_COMBINE( seed, allocationCallbacks.pfnFree ); VULKAN_HPP_HASH_COMBINE( seed, allocationCallbacks.pfnInternalAllocation ); VULKAN_HPP_HASH_COMBINE( seed, allocationCallbacks.pfnInternalFree ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::AmigoProfilingSubmitInfoSEC const & amigoProfilingSubmitInfoSEC ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, amigoProfilingSubmitInfoSEC.sType ); VULKAN_HPP_HASH_COMBINE( seed, amigoProfilingSubmitInfoSEC.pNext ); VULKAN_HPP_HASH_COMBINE( seed, amigoProfilingSubmitInfoSEC.firstDrawTimestamp ); VULKAN_HPP_HASH_COMBINE( seed, amigoProfilingSubmitInfoSEC.swapBufferTimestamp ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ComponentMapping const & componentMapping ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, componentMapping.r ); VULKAN_HPP_HASH_COMBINE( seed, componentMapping.g ); VULKAN_HPP_HASH_COMBINE( seed, componentMapping.b ); VULKAN_HPP_HASH_COMBINE( seed, componentMapping.a ); return seed; } }; # if defined( VK_USE_PLATFORM_ANDROID_KHR ) template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::AndroidHardwareBufferFormatProperties2ANDROID const & androidHardwareBufferFormatProperties2ANDROID ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, androidHardwareBufferFormatProperties2ANDROID.sType ); VULKAN_HPP_HASH_COMBINE( seed, androidHardwareBufferFormatProperties2ANDROID.pNext ); VULKAN_HPP_HASH_COMBINE( seed, androidHardwareBufferFormatProperties2ANDROID.format ); VULKAN_HPP_HASH_COMBINE( seed, androidHardwareBufferFormatProperties2ANDROID.externalFormat ); VULKAN_HPP_HASH_COMBINE( seed, androidHardwareBufferFormatProperties2ANDROID.formatFeatures ); VULKAN_HPP_HASH_COMBINE( seed, androidHardwareBufferFormatProperties2ANDROID.samplerYcbcrConversionComponents ); VULKAN_HPP_HASH_COMBINE( seed, androidHardwareBufferFormatProperties2ANDROID.suggestedYcbcrModel ); VULKAN_HPP_HASH_COMBINE( seed, androidHardwareBufferFormatProperties2ANDROID.suggestedYcbcrRange ); VULKAN_HPP_HASH_COMBINE( seed, androidHardwareBufferFormatProperties2ANDROID.suggestedXChromaOffset ); VULKAN_HPP_HASH_COMBINE( seed, androidHardwareBufferFormatProperties2ANDROID.suggestedYChromaOffset ); return seed; } }; # endif /*VK_USE_PLATFORM_ANDROID_KHR*/ # if defined( VK_USE_PLATFORM_ANDROID_KHR ) template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::AndroidHardwareBufferFormatPropertiesANDROID const & androidHardwareBufferFormatPropertiesANDROID ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, androidHardwareBufferFormatPropertiesANDROID.sType ); VULKAN_HPP_HASH_COMBINE( seed, androidHardwareBufferFormatPropertiesANDROID.pNext ); VULKAN_HPP_HASH_COMBINE( seed, androidHardwareBufferFormatPropertiesANDROID.format ); VULKAN_HPP_HASH_COMBINE( seed, androidHardwareBufferFormatPropertiesANDROID.externalFormat ); VULKAN_HPP_HASH_COMBINE( seed, androidHardwareBufferFormatPropertiesANDROID.formatFeatures ); VULKAN_HPP_HASH_COMBINE( seed, androidHardwareBufferFormatPropertiesANDROID.samplerYcbcrConversionComponents ); VULKAN_HPP_HASH_COMBINE( seed, androidHardwareBufferFormatPropertiesANDROID.suggestedYcbcrModel ); VULKAN_HPP_HASH_COMBINE( seed, androidHardwareBufferFormatPropertiesANDROID.suggestedYcbcrRange ); VULKAN_HPP_HASH_COMBINE( seed, androidHardwareBufferFormatPropertiesANDROID.suggestedXChromaOffset ); VULKAN_HPP_HASH_COMBINE( seed, androidHardwareBufferFormatPropertiesANDROID.suggestedYChromaOffset ); return seed; } }; # endif /*VK_USE_PLATFORM_ANDROID_KHR*/ # if defined( VK_USE_PLATFORM_ANDROID_KHR ) template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::AndroidHardwareBufferFormatResolvePropertiesANDROID const & androidHardwareBufferFormatResolvePropertiesANDROID ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, androidHardwareBufferFormatResolvePropertiesANDROID.sType ); VULKAN_HPP_HASH_COMBINE( seed, androidHardwareBufferFormatResolvePropertiesANDROID.pNext ); VULKAN_HPP_HASH_COMBINE( seed, androidHardwareBufferFormatResolvePropertiesANDROID.colorAttachmentFormat ); return seed; } }; # endif /*VK_USE_PLATFORM_ANDROID_KHR*/ # if defined( VK_USE_PLATFORM_ANDROID_KHR ) template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::AndroidHardwareBufferPropertiesANDROID const & androidHardwareBufferPropertiesANDROID ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, androidHardwareBufferPropertiesANDROID.sType ); VULKAN_HPP_HASH_COMBINE( seed, androidHardwareBufferPropertiesANDROID.pNext ); VULKAN_HPP_HASH_COMBINE( seed, androidHardwareBufferPropertiesANDROID.allocationSize ); VULKAN_HPP_HASH_COMBINE( seed, androidHardwareBufferPropertiesANDROID.memoryTypeBits ); return seed; } }; # endif /*VK_USE_PLATFORM_ANDROID_KHR*/ # if defined( VK_USE_PLATFORM_ANDROID_KHR ) template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::AndroidHardwareBufferUsageANDROID const & androidHardwareBufferUsageANDROID ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, androidHardwareBufferUsageANDROID.sType ); VULKAN_HPP_HASH_COMBINE( seed, androidHardwareBufferUsageANDROID.pNext ); VULKAN_HPP_HASH_COMBINE( seed, androidHardwareBufferUsageANDROID.androidHardwareBufferUsage ); return seed; } }; # endif /*VK_USE_PLATFORM_ANDROID_KHR*/ # if defined( VK_USE_PLATFORM_ANDROID_KHR ) template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::AndroidSurfaceCreateInfoKHR const & androidSurfaceCreateInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, androidSurfaceCreateInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, androidSurfaceCreateInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, androidSurfaceCreateInfoKHR.flags ); VULKAN_HPP_HASH_COMBINE( seed, androidSurfaceCreateInfoKHR.window ); return seed; } }; # endif /*VK_USE_PLATFORM_ANDROID_KHR*/ template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::AntiLagPresentationInfoAMD const & antiLagPresentationInfoAMD ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, antiLagPresentationInfoAMD.sType ); VULKAN_HPP_HASH_COMBINE( seed, antiLagPresentationInfoAMD.pNext ); VULKAN_HPP_HASH_COMBINE( seed, antiLagPresentationInfoAMD.stage ); VULKAN_HPP_HASH_COMBINE( seed, antiLagPresentationInfoAMD.frameIndex ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::AntiLagDataAMD const & antiLagDataAMD ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, antiLagDataAMD.sType ); VULKAN_HPP_HASH_COMBINE( seed, antiLagDataAMD.pNext ); VULKAN_HPP_HASH_COMBINE( seed, antiLagDataAMD.mode ); VULKAN_HPP_HASH_COMBINE( seed, antiLagDataAMD.maxFPS ); VULKAN_HPP_HASH_COMBINE( seed, antiLagDataAMD.pPresentationInfo ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ApplicationInfo const & applicationInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, applicationInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, applicationInfo.pNext ); for ( const char * p = applicationInfo.pApplicationName; *p != '\0'; ++p ) { VULKAN_HPP_HASH_COMBINE( seed, *p ); } VULKAN_HPP_HASH_COMBINE( seed, applicationInfo.applicationVersion ); for ( const char * p = applicationInfo.pEngineName; *p != '\0'; ++p ) { VULKAN_HPP_HASH_COMBINE( seed, *p ); } VULKAN_HPP_HASH_COMBINE( seed, applicationInfo.engineVersion ); VULKAN_HPP_HASH_COMBINE( seed, applicationInfo.apiVersion ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::AttachmentDescription const & attachmentDescription ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, attachmentDescription.flags ); VULKAN_HPP_HASH_COMBINE( seed, attachmentDescription.format ); VULKAN_HPP_HASH_COMBINE( seed, attachmentDescription.samples ); VULKAN_HPP_HASH_COMBINE( seed, attachmentDescription.loadOp ); VULKAN_HPP_HASH_COMBINE( seed, attachmentDescription.storeOp ); VULKAN_HPP_HASH_COMBINE( seed, attachmentDescription.stencilLoadOp ); VULKAN_HPP_HASH_COMBINE( seed, attachmentDescription.stencilStoreOp ); VULKAN_HPP_HASH_COMBINE( seed, attachmentDescription.initialLayout ); VULKAN_HPP_HASH_COMBINE( seed, attachmentDescription.finalLayout ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::AttachmentDescription2 const & attachmentDescription2 ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, attachmentDescription2.sType ); VULKAN_HPP_HASH_COMBINE( seed, attachmentDescription2.pNext ); VULKAN_HPP_HASH_COMBINE( seed, attachmentDescription2.flags ); VULKAN_HPP_HASH_COMBINE( seed, attachmentDescription2.format ); VULKAN_HPP_HASH_COMBINE( seed, attachmentDescription2.samples ); VULKAN_HPP_HASH_COMBINE( seed, attachmentDescription2.loadOp ); VULKAN_HPP_HASH_COMBINE( seed, attachmentDescription2.storeOp ); VULKAN_HPP_HASH_COMBINE( seed, attachmentDescription2.stencilLoadOp ); VULKAN_HPP_HASH_COMBINE( seed, attachmentDescription2.stencilStoreOp ); VULKAN_HPP_HASH_COMBINE( seed, attachmentDescription2.initialLayout ); VULKAN_HPP_HASH_COMBINE( seed, attachmentDescription2.finalLayout ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::AttachmentDescriptionStencilLayout const & attachmentDescriptionStencilLayout ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, attachmentDescriptionStencilLayout.sType ); VULKAN_HPP_HASH_COMBINE( seed, attachmentDescriptionStencilLayout.pNext ); VULKAN_HPP_HASH_COMBINE( seed, attachmentDescriptionStencilLayout.stencilInitialLayout ); VULKAN_HPP_HASH_COMBINE( seed, attachmentDescriptionStencilLayout.stencilFinalLayout ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::AttachmentReference const & attachmentReference ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, attachmentReference.attachment ); VULKAN_HPP_HASH_COMBINE( seed, attachmentReference.layout ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::AttachmentReference2 const & attachmentReference2 ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, attachmentReference2.sType ); VULKAN_HPP_HASH_COMBINE( seed, attachmentReference2.pNext ); VULKAN_HPP_HASH_COMBINE( seed, attachmentReference2.attachment ); VULKAN_HPP_HASH_COMBINE( seed, attachmentReference2.layout ); VULKAN_HPP_HASH_COMBINE( seed, attachmentReference2.aspectMask ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::AttachmentReferenceStencilLayout const & attachmentReferenceStencilLayout ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, attachmentReferenceStencilLayout.sType ); VULKAN_HPP_HASH_COMBINE( seed, attachmentReferenceStencilLayout.pNext ); VULKAN_HPP_HASH_COMBINE( seed, attachmentReferenceStencilLayout.stencilLayout ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::AttachmentSampleCountInfoAMD const & attachmentSampleCountInfoAMD ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, attachmentSampleCountInfoAMD.sType ); VULKAN_HPP_HASH_COMBINE( seed, attachmentSampleCountInfoAMD.pNext ); VULKAN_HPP_HASH_COMBINE( seed, attachmentSampleCountInfoAMD.colorAttachmentCount ); VULKAN_HPP_HASH_COMBINE( seed, attachmentSampleCountInfoAMD.pColorAttachmentSamples ); VULKAN_HPP_HASH_COMBINE( seed, attachmentSampleCountInfoAMD.depthStencilAttachmentSamples ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::Extent2D const & extent2D ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, extent2D.width ); VULKAN_HPP_HASH_COMBINE( seed, extent2D.height ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::SampleLocationEXT const & sampleLocationEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, sampleLocationEXT.x ); VULKAN_HPP_HASH_COMBINE( seed, sampleLocationEXT.y ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::SampleLocationsInfoEXT const & sampleLocationsInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, sampleLocationsInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, sampleLocationsInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, sampleLocationsInfoEXT.sampleLocationsPerPixel ); VULKAN_HPP_HASH_COMBINE( seed, sampleLocationsInfoEXT.sampleLocationGridSize ); VULKAN_HPP_HASH_COMBINE( seed, sampleLocationsInfoEXT.sampleLocationsCount ); VULKAN_HPP_HASH_COMBINE( seed, sampleLocationsInfoEXT.pSampleLocations ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::AttachmentSampleLocationsEXT const & attachmentSampleLocationsEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, attachmentSampleLocationsEXT.attachmentIndex ); VULKAN_HPP_HASH_COMBINE( seed, attachmentSampleLocationsEXT.sampleLocationsInfo ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::BaseInStructure const & baseInStructure ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, baseInStructure.sType ); VULKAN_HPP_HASH_COMBINE( seed, baseInStructure.pNext ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::BaseOutStructure const & baseOutStructure ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, baseOutStructure.sType ); VULKAN_HPP_HASH_COMBINE( seed, baseOutStructure.pNext ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::BindAccelerationStructureMemoryInfoNV const & bindAccelerationStructureMemoryInfoNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, bindAccelerationStructureMemoryInfoNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, bindAccelerationStructureMemoryInfoNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, bindAccelerationStructureMemoryInfoNV.accelerationStructure ); VULKAN_HPP_HASH_COMBINE( seed, bindAccelerationStructureMemoryInfoNV.memory ); VULKAN_HPP_HASH_COMBINE( seed, bindAccelerationStructureMemoryInfoNV.memoryOffset ); VULKAN_HPP_HASH_COMBINE( seed, bindAccelerationStructureMemoryInfoNV.deviceIndexCount ); VULKAN_HPP_HASH_COMBINE( seed, bindAccelerationStructureMemoryInfoNV.pDeviceIndices ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::BindBufferMemoryDeviceGroupInfo const & bindBufferMemoryDeviceGroupInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, bindBufferMemoryDeviceGroupInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, bindBufferMemoryDeviceGroupInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, bindBufferMemoryDeviceGroupInfo.deviceIndexCount ); VULKAN_HPP_HASH_COMBINE( seed, bindBufferMemoryDeviceGroupInfo.pDeviceIndices ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::BindBufferMemoryInfo const & bindBufferMemoryInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, bindBufferMemoryInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, bindBufferMemoryInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, bindBufferMemoryInfo.buffer ); VULKAN_HPP_HASH_COMBINE( seed, bindBufferMemoryInfo.memory ); VULKAN_HPP_HASH_COMBINE( seed, bindBufferMemoryInfo.memoryOffset ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::BindDescriptorBufferEmbeddedSamplersInfoEXT const & bindDescriptorBufferEmbeddedSamplersInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, bindDescriptorBufferEmbeddedSamplersInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, bindDescriptorBufferEmbeddedSamplersInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, bindDescriptorBufferEmbeddedSamplersInfoEXT.stageFlags ); VULKAN_HPP_HASH_COMBINE( seed, bindDescriptorBufferEmbeddedSamplersInfoEXT.layout ); VULKAN_HPP_HASH_COMBINE( seed, bindDescriptorBufferEmbeddedSamplersInfoEXT.set ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::BindDescriptorSetsInfo const & bindDescriptorSetsInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, bindDescriptorSetsInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, bindDescriptorSetsInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, bindDescriptorSetsInfo.stageFlags ); VULKAN_HPP_HASH_COMBINE( seed, bindDescriptorSetsInfo.layout ); VULKAN_HPP_HASH_COMBINE( seed, bindDescriptorSetsInfo.firstSet ); VULKAN_HPP_HASH_COMBINE( seed, bindDescriptorSetsInfo.descriptorSetCount ); VULKAN_HPP_HASH_COMBINE( seed, bindDescriptorSetsInfo.pDescriptorSets ); VULKAN_HPP_HASH_COMBINE( seed, bindDescriptorSetsInfo.dynamicOffsetCount ); VULKAN_HPP_HASH_COMBINE( seed, bindDescriptorSetsInfo.pDynamicOffsets ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::Offset2D const & offset2D ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, offset2D.x ); VULKAN_HPP_HASH_COMBINE( seed, offset2D.y ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::Rect2D const & rect2D ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, rect2D.offset ); VULKAN_HPP_HASH_COMBINE( seed, rect2D.extent ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::BindImageMemoryDeviceGroupInfo const & bindImageMemoryDeviceGroupInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, bindImageMemoryDeviceGroupInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, bindImageMemoryDeviceGroupInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, bindImageMemoryDeviceGroupInfo.deviceIndexCount ); VULKAN_HPP_HASH_COMBINE( seed, bindImageMemoryDeviceGroupInfo.pDeviceIndices ); VULKAN_HPP_HASH_COMBINE( seed, bindImageMemoryDeviceGroupInfo.splitInstanceBindRegionCount ); VULKAN_HPP_HASH_COMBINE( seed, bindImageMemoryDeviceGroupInfo.pSplitInstanceBindRegions ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::BindImageMemoryInfo const & bindImageMemoryInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, bindImageMemoryInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, bindImageMemoryInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, bindImageMemoryInfo.image ); VULKAN_HPP_HASH_COMBINE( seed, bindImageMemoryInfo.memory ); VULKAN_HPP_HASH_COMBINE( seed, bindImageMemoryInfo.memoryOffset ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::BindImageMemorySwapchainInfoKHR const & bindImageMemorySwapchainInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, bindImageMemorySwapchainInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, bindImageMemorySwapchainInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, bindImageMemorySwapchainInfoKHR.swapchain ); VULKAN_HPP_HASH_COMBINE( seed, bindImageMemorySwapchainInfoKHR.imageIndex ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::BindImagePlaneMemoryInfo const & bindImagePlaneMemoryInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, bindImagePlaneMemoryInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, bindImagePlaneMemoryInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, bindImagePlaneMemoryInfo.planeAspect ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::BindIndexBufferIndirectCommandEXT const & bindIndexBufferIndirectCommandEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, bindIndexBufferIndirectCommandEXT.bufferAddress ); VULKAN_HPP_HASH_COMBINE( seed, bindIndexBufferIndirectCommandEXT.size ); VULKAN_HPP_HASH_COMBINE( seed, bindIndexBufferIndirectCommandEXT.indexType ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::BindIndexBufferIndirectCommandNV const & bindIndexBufferIndirectCommandNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, bindIndexBufferIndirectCommandNV.bufferAddress ); VULKAN_HPP_HASH_COMBINE( seed, bindIndexBufferIndirectCommandNV.size ); VULKAN_HPP_HASH_COMBINE( seed, bindIndexBufferIndirectCommandNV.indexType ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::BindMemoryStatus const & bindMemoryStatus ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, bindMemoryStatus.sType ); VULKAN_HPP_HASH_COMBINE( seed, bindMemoryStatus.pNext ); VULKAN_HPP_HASH_COMBINE( seed, bindMemoryStatus.pResult ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::BindPipelineIndirectCommandNV const & bindPipelineIndirectCommandNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, bindPipelineIndirectCommandNV.pipelineAddress ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::BindShaderGroupIndirectCommandNV const & bindShaderGroupIndirectCommandNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, bindShaderGroupIndirectCommandNV.groupIndex ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::SparseMemoryBind const & sparseMemoryBind ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, sparseMemoryBind.resourceOffset ); VULKAN_HPP_HASH_COMBINE( seed, sparseMemoryBind.size ); VULKAN_HPP_HASH_COMBINE( seed, sparseMemoryBind.memory ); VULKAN_HPP_HASH_COMBINE( seed, sparseMemoryBind.memoryOffset ); VULKAN_HPP_HASH_COMBINE( seed, sparseMemoryBind.flags ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::SparseBufferMemoryBindInfo const & sparseBufferMemoryBindInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, sparseBufferMemoryBindInfo.buffer ); VULKAN_HPP_HASH_COMBINE( seed, sparseBufferMemoryBindInfo.bindCount ); VULKAN_HPP_HASH_COMBINE( seed, sparseBufferMemoryBindInfo.pBinds ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::SparseImageOpaqueMemoryBindInfo const & sparseImageOpaqueMemoryBindInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, sparseImageOpaqueMemoryBindInfo.image ); VULKAN_HPP_HASH_COMBINE( seed, sparseImageOpaqueMemoryBindInfo.bindCount ); VULKAN_HPP_HASH_COMBINE( seed, sparseImageOpaqueMemoryBindInfo.pBinds ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ImageSubresource const & imageSubresource ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, imageSubresource.aspectMask ); VULKAN_HPP_HASH_COMBINE( seed, imageSubresource.mipLevel ); VULKAN_HPP_HASH_COMBINE( seed, imageSubresource.arrayLayer ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::Offset3D const & offset3D ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, offset3D.x ); VULKAN_HPP_HASH_COMBINE( seed, offset3D.y ); VULKAN_HPP_HASH_COMBINE( seed, offset3D.z ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::Extent3D const & extent3D ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, extent3D.width ); VULKAN_HPP_HASH_COMBINE( seed, extent3D.height ); VULKAN_HPP_HASH_COMBINE( seed, extent3D.depth ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::SparseImageMemoryBind const & sparseImageMemoryBind ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, sparseImageMemoryBind.subresource ); VULKAN_HPP_HASH_COMBINE( seed, sparseImageMemoryBind.offset ); VULKAN_HPP_HASH_COMBINE( seed, sparseImageMemoryBind.extent ); VULKAN_HPP_HASH_COMBINE( seed, sparseImageMemoryBind.memory ); VULKAN_HPP_HASH_COMBINE( seed, sparseImageMemoryBind.memoryOffset ); VULKAN_HPP_HASH_COMBINE( seed, sparseImageMemoryBind.flags ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::SparseImageMemoryBindInfo const & sparseImageMemoryBindInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, sparseImageMemoryBindInfo.image ); VULKAN_HPP_HASH_COMBINE( seed, sparseImageMemoryBindInfo.bindCount ); VULKAN_HPP_HASH_COMBINE( seed, sparseImageMemoryBindInfo.pBinds ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::BindSparseInfo const & bindSparseInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, bindSparseInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, bindSparseInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, bindSparseInfo.waitSemaphoreCount ); VULKAN_HPP_HASH_COMBINE( seed, bindSparseInfo.pWaitSemaphores ); VULKAN_HPP_HASH_COMBINE( seed, bindSparseInfo.bufferBindCount ); VULKAN_HPP_HASH_COMBINE( seed, bindSparseInfo.pBufferBinds ); VULKAN_HPP_HASH_COMBINE( seed, bindSparseInfo.imageOpaqueBindCount ); VULKAN_HPP_HASH_COMBINE( seed, bindSparseInfo.pImageOpaqueBinds ); VULKAN_HPP_HASH_COMBINE( seed, bindSparseInfo.imageBindCount ); VULKAN_HPP_HASH_COMBINE( seed, bindSparseInfo.pImageBinds ); VULKAN_HPP_HASH_COMBINE( seed, bindSparseInfo.signalSemaphoreCount ); VULKAN_HPP_HASH_COMBINE( seed, bindSparseInfo.pSignalSemaphores ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::BindVertexBufferIndirectCommandEXT const & bindVertexBufferIndirectCommandEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, bindVertexBufferIndirectCommandEXT.bufferAddress ); VULKAN_HPP_HASH_COMBINE( seed, bindVertexBufferIndirectCommandEXT.size ); VULKAN_HPP_HASH_COMBINE( seed, bindVertexBufferIndirectCommandEXT.stride ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::BindVertexBufferIndirectCommandNV const & bindVertexBufferIndirectCommandNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, bindVertexBufferIndirectCommandNV.bufferAddress ); VULKAN_HPP_HASH_COMBINE( seed, bindVertexBufferIndirectCommandNV.size ); VULKAN_HPP_HASH_COMBINE( seed, bindVertexBufferIndirectCommandNV.stride ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::BindVideoSessionMemoryInfoKHR const & bindVideoSessionMemoryInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, bindVideoSessionMemoryInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, bindVideoSessionMemoryInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, bindVideoSessionMemoryInfoKHR.memoryBindIndex ); VULKAN_HPP_HASH_COMBINE( seed, bindVideoSessionMemoryInfoKHR.memory ); VULKAN_HPP_HASH_COMBINE( seed, bindVideoSessionMemoryInfoKHR.memoryOffset ); VULKAN_HPP_HASH_COMBINE( seed, bindVideoSessionMemoryInfoKHR.memorySize ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::BlitImageCubicWeightsInfoQCOM const & blitImageCubicWeightsInfoQCOM ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, blitImageCubicWeightsInfoQCOM.sType ); VULKAN_HPP_HASH_COMBINE( seed, blitImageCubicWeightsInfoQCOM.pNext ); VULKAN_HPP_HASH_COMBINE( seed, blitImageCubicWeightsInfoQCOM.cubicWeights ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ImageSubresourceLayers const & imageSubresourceLayers ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, imageSubresourceLayers.aspectMask ); VULKAN_HPP_HASH_COMBINE( seed, imageSubresourceLayers.mipLevel ); VULKAN_HPP_HASH_COMBINE( seed, imageSubresourceLayers.baseArrayLayer ); VULKAN_HPP_HASH_COMBINE( seed, imageSubresourceLayers.layerCount ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ImageBlit2 const & imageBlit2 ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, imageBlit2.sType ); VULKAN_HPP_HASH_COMBINE( seed, imageBlit2.pNext ); VULKAN_HPP_HASH_COMBINE( seed, imageBlit2.srcSubresource ); for ( size_t i = 0; i < 2; ++i ) { VULKAN_HPP_HASH_COMBINE( seed, imageBlit2.srcOffsets[i] ); } VULKAN_HPP_HASH_COMBINE( seed, imageBlit2.dstSubresource ); for ( size_t i = 0; i < 2; ++i ) { VULKAN_HPP_HASH_COMBINE( seed, imageBlit2.dstOffsets[i] ); } return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::BlitImageInfo2 const & blitImageInfo2 ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, blitImageInfo2.sType ); VULKAN_HPP_HASH_COMBINE( seed, blitImageInfo2.pNext ); VULKAN_HPP_HASH_COMBINE( seed, blitImageInfo2.srcImage ); VULKAN_HPP_HASH_COMBINE( seed, blitImageInfo2.srcImageLayout ); VULKAN_HPP_HASH_COMBINE( seed, blitImageInfo2.dstImage ); VULKAN_HPP_HASH_COMBINE( seed, blitImageInfo2.dstImageLayout ); VULKAN_HPP_HASH_COMBINE( seed, blitImageInfo2.regionCount ); VULKAN_HPP_HASH_COMBINE( seed, blitImageInfo2.pRegions ); VULKAN_HPP_HASH_COMBINE( seed, blitImageInfo2.filter ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::BufferCaptureDescriptorDataInfoEXT const & bufferCaptureDescriptorDataInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, bufferCaptureDescriptorDataInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, bufferCaptureDescriptorDataInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, bufferCaptureDescriptorDataInfoEXT.buffer ); return seed; } }; # if defined( VK_USE_PLATFORM_FUCHSIA ) template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::BufferCollectionBufferCreateInfoFUCHSIA const & bufferCollectionBufferCreateInfoFUCHSIA ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, bufferCollectionBufferCreateInfoFUCHSIA.sType ); VULKAN_HPP_HASH_COMBINE( seed, bufferCollectionBufferCreateInfoFUCHSIA.pNext ); VULKAN_HPP_HASH_COMBINE( seed, bufferCollectionBufferCreateInfoFUCHSIA.collection ); VULKAN_HPP_HASH_COMBINE( seed, bufferCollectionBufferCreateInfoFUCHSIA.index ); return seed; } }; # endif /*VK_USE_PLATFORM_FUCHSIA*/ # if defined( VK_USE_PLATFORM_FUCHSIA ) template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::BufferCollectionConstraintsInfoFUCHSIA const & bufferCollectionConstraintsInfoFUCHSIA ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, bufferCollectionConstraintsInfoFUCHSIA.sType ); VULKAN_HPP_HASH_COMBINE( seed, bufferCollectionConstraintsInfoFUCHSIA.pNext ); VULKAN_HPP_HASH_COMBINE( seed, bufferCollectionConstraintsInfoFUCHSIA.minBufferCount ); VULKAN_HPP_HASH_COMBINE( seed, bufferCollectionConstraintsInfoFUCHSIA.maxBufferCount ); VULKAN_HPP_HASH_COMBINE( seed, bufferCollectionConstraintsInfoFUCHSIA.minBufferCountForCamping ); VULKAN_HPP_HASH_COMBINE( seed, bufferCollectionConstraintsInfoFUCHSIA.minBufferCountForDedicatedSlack ); VULKAN_HPP_HASH_COMBINE( seed, bufferCollectionConstraintsInfoFUCHSIA.minBufferCountForSharedSlack ); return seed; } }; # endif /*VK_USE_PLATFORM_FUCHSIA*/ # if defined( VK_USE_PLATFORM_FUCHSIA ) template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::BufferCollectionCreateInfoFUCHSIA const & bufferCollectionCreateInfoFUCHSIA ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, bufferCollectionCreateInfoFUCHSIA.sType ); VULKAN_HPP_HASH_COMBINE( seed, bufferCollectionCreateInfoFUCHSIA.pNext ); VULKAN_HPP_HASH_COMBINE( seed, bufferCollectionCreateInfoFUCHSIA.collectionToken ); return seed; } }; # endif /*VK_USE_PLATFORM_FUCHSIA*/ # if defined( VK_USE_PLATFORM_FUCHSIA ) template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::BufferCollectionImageCreateInfoFUCHSIA const & bufferCollectionImageCreateInfoFUCHSIA ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, bufferCollectionImageCreateInfoFUCHSIA.sType ); VULKAN_HPP_HASH_COMBINE( seed, bufferCollectionImageCreateInfoFUCHSIA.pNext ); VULKAN_HPP_HASH_COMBINE( seed, bufferCollectionImageCreateInfoFUCHSIA.collection ); VULKAN_HPP_HASH_COMBINE( seed, bufferCollectionImageCreateInfoFUCHSIA.index ); return seed; } }; # endif /*VK_USE_PLATFORM_FUCHSIA*/ # if defined( VK_USE_PLATFORM_FUCHSIA ) template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::SysmemColorSpaceFUCHSIA const & sysmemColorSpaceFUCHSIA ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, sysmemColorSpaceFUCHSIA.sType ); VULKAN_HPP_HASH_COMBINE( seed, sysmemColorSpaceFUCHSIA.pNext ); VULKAN_HPP_HASH_COMBINE( seed, sysmemColorSpaceFUCHSIA.colorSpace ); return seed; } }; # endif /*VK_USE_PLATFORM_FUCHSIA*/ # if defined( VK_USE_PLATFORM_FUCHSIA ) template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::BufferCollectionPropertiesFUCHSIA const & bufferCollectionPropertiesFUCHSIA ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, bufferCollectionPropertiesFUCHSIA.sType ); VULKAN_HPP_HASH_COMBINE( seed, bufferCollectionPropertiesFUCHSIA.pNext ); VULKAN_HPP_HASH_COMBINE( seed, bufferCollectionPropertiesFUCHSIA.memoryTypeBits ); VULKAN_HPP_HASH_COMBINE( seed, bufferCollectionPropertiesFUCHSIA.bufferCount ); VULKAN_HPP_HASH_COMBINE( seed, bufferCollectionPropertiesFUCHSIA.createInfoIndex ); VULKAN_HPP_HASH_COMBINE( seed, bufferCollectionPropertiesFUCHSIA.sysmemPixelFormat ); VULKAN_HPP_HASH_COMBINE( seed, bufferCollectionPropertiesFUCHSIA.formatFeatures ); VULKAN_HPP_HASH_COMBINE( seed, bufferCollectionPropertiesFUCHSIA.sysmemColorSpaceIndex ); VULKAN_HPP_HASH_COMBINE( seed, bufferCollectionPropertiesFUCHSIA.samplerYcbcrConversionComponents ); VULKAN_HPP_HASH_COMBINE( seed, bufferCollectionPropertiesFUCHSIA.suggestedYcbcrModel ); VULKAN_HPP_HASH_COMBINE( seed, bufferCollectionPropertiesFUCHSIA.suggestedYcbcrRange ); VULKAN_HPP_HASH_COMBINE( seed, bufferCollectionPropertiesFUCHSIA.suggestedXChromaOffset ); VULKAN_HPP_HASH_COMBINE( seed, bufferCollectionPropertiesFUCHSIA.suggestedYChromaOffset ); return seed; } }; # endif /*VK_USE_PLATFORM_FUCHSIA*/ template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::BufferCreateInfo const & bufferCreateInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, bufferCreateInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, bufferCreateInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, bufferCreateInfo.flags ); VULKAN_HPP_HASH_COMBINE( seed, bufferCreateInfo.size ); VULKAN_HPP_HASH_COMBINE( seed, bufferCreateInfo.usage ); VULKAN_HPP_HASH_COMBINE( seed, bufferCreateInfo.sharingMode ); VULKAN_HPP_HASH_COMBINE( seed, bufferCreateInfo.queueFamilyIndexCount ); VULKAN_HPP_HASH_COMBINE( seed, bufferCreateInfo.pQueueFamilyIndices ); return seed; } }; # if defined( VK_USE_PLATFORM_FUCHSIA ) template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::BufferConstraintsInfoFUCHSIA const & bufferConstraintsInfoFUCHSIA ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, bufferConstraintsInfoFUCHSIA.sType ); VULKAN_HPP_HASH_COMBINE( seed, bufferConstraintsInfoFUCHSIA.pNext ); VULKAN_HPP_HASH_COMBINE( seed, bufferConstraintsInfoFUCHSIA.createInfo ); VULKAN_HPP_HASH_COMBINE( seed, bufferConstraintsInfoFUCHSIA.requiredFormatFeatures ); VULKAN_HPP_HASH_COMBINE( seed, bufferConstraintsInfoFUCHSIA.bufferCollectionConstraints ); return seed; } }; # endif /*VK_USE_PLATFORM_FUCHSIA*/ template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::BufferCopy const & bufferCopy ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, bufferCopy.srcOffset ); VULKAN_HPP_HASH_COMBINE( seed, bufferCopy.dstOffset ); VULKAN_HPP_HASH_COMBINE( seed, bufferCopy.size ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::BufferCopy2 const & bufferCopy2 ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, bufferCopy2.sType ); VULKAN_HPP_HASH_COMBINE( seed, bufferCopy2.pNext ); VULKAN_HPP_HASH_COMBINE( seed, bufferCopy2.srcOffset ); VULKAN_HPP_HASH_COMBINE( seed, bufferCopy2.dstOffset ); VULKAN_HPP_HASH_COMBINE( seed, bufferCopy2.size ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::BufferDeviceAddressCreateInfoEXT const & bufferDeviceAddressCreateInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, bufferDeviceAddressCreateInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, bufferDeviceAddressCreateInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, bufferDeviceAddressCreateInfoEXT.deviceAddress ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::BufferDeviceAddressInfo const & bufferDeviceAddressInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, bufferDeviceAddressInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, bufferDeviceAddressInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, bufferDeviceAddressInfo.buffer ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::BufferImageCopy const & bufferImageCopy ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, bufferImageCopy.bufferOffset ); VULKAN_HPP_HASH_COMBINE( seed, bufferImageCopy.bufferRowLength ); VULKAN_HPP_HASH_COMBINE( seed, bufferImageCopy.bufferImageHeight ); VULKAN_HPP_HASH_COMBINE( seed, bufferImageCopy.imageSubresource ); VULKAN_HPP_HASH_COMBINE( seed, bufferImageCopy.imageOffset ); VULKAN_HPP_HASH_COMBINE( seed, bufferImageCopy.imageExtent ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::BufferImageCopy2 const & bufferImageCopy2 ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, bufferImageCopy2.sType ); VULKAN_HPP_HASH_COMBINE( seed, bufferImageCopy2.pNext ); VULKAN_HPP_HASH_COMBINE( seed, bufferImageCopy2.bufferOffset ); VULKAN_HPP_HASH_COMBINE( seed, bufferImageCopy2.bufferRowLength ); VULKAN_HPP_HASH_COMBINE( seed, bufferImageCopy2.bufferImageHeight ); VULKAN_HPP_HASH_COMBINE( seed, bufferImageCopy2.imageSubresource ); VULKAN_HPP_HASH_COMBINE( seed, bufferImageCopy2.imageOffset ); VULKAN_HPP_HASH_COMBINE( seed, bufferImageCopy2.imageExtent ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::BufferMemoryBarrier const & bufferMemoryBarrier ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, bufferMemoryBarrier.sType ); VULKAN_HPP_HASH_COMBINE( seed, bufferMemoryBarrier.pNext ); VULKAN_HPP_HASH_COMBINE( seed, bufferMemoryBarrier.srcAccessMask ); VULKAN_HPP_HASH_COMBINE( seed, bufferMemoryBarrier.dstAccessMask ); VULKAN_HPP_HASH_COMBINE( seed, bufferMemoryBarrier.srcQueueFamilyIndex ); VULKAN_HPP_HASH_COMBINE( seed, bufferMemoryBarrier.dstQueueFamilyIndex ); VULKAN_HPP_HASH_COMBINE( seed, bufferMemoryBarrier.buffer ); VULKAN_HPP_HASH_COMBINE( seed, bufferMemoryBarrier.offset ); VULKAN_HPP_HASH_COMBINE( seed, bufferMemoryBarrier.size ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::BufferMemoryBarrier2 const & bufferMemoryBarrier2 ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, bufferMemoryBarrier2.sType ); VULKAN_HPP_HASH_COMBINE( seed, bufferMemoryBarrier2.pNext ); VULKAN_HPP_HASH_COMBINE( seed, bufferMemoryBarrier2.srcStageMask ); VULKAN_HPP_HASH_COMBINE( seed, bufferMemoryBarrier2.srcAccessMask ); VULKAN_HPP_HASH_COMBINE( seed, bufferMemoryBarrier2.dstStageMask ); VULKAN_HPP_HASH_COMBINE( seed, bufferMemoryBarrier2.dstAccessMask ); VULKAN_HPP_HASH_COMBINE( seed, bufferMemoryBarrier2.srcQueueFamilyIndex ); VULKAN_HPP_HASH_COMBINE( seed, bufferMemoryBarrier2.dstQueueFamilyIndex ); VULKAN_HPP_HASH_COMBINE( seed, bufferMemoryBarrier2.buffer ); VULKAN_HPP_HASH_COMBINE( seed, bufferMemoryBarrier2.offset ); VULKAN_HPP_HASH_COMBINE( seed, bufferMemoryBarrier2.size ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::BufferMemoryRequirementsInfo2 const & bufferMemoryRequirementsInfo2 ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, bufferMemoryRequirementsInfo2.sType ); VULKAN_HPP_HASH_COMBINE( seed, bufferMemoryRequirementsInfo2.pNext ); VULKAN_HPP_HASH_COMBINE( seed, bufferMemoryRequirementsInfo2.buffer ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::BufferOpaqueCaptureAddressCreateInfo const & bufferOpaqueCaptureAddressCreateInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, bufferOpaqueCaptureAddressCreateInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, bufferOpaqueCaptureAddressCreateInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, bufferOpaqueCaptureAddressCreateInfo.opaqueCaptureAddress ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::BufferUsageFlags2CreateInfo const & bufferUsageFlags2CreateInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, bufferUsageFlags2CreateInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, bufferUsageFlags2CreateInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, bufferUsageFlags2CreateInfo.usage ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::BufferViewCreateInfo const & bufferViewCreateInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, bufferViewCreateInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, bufferViewCreateInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, bufferViewCreateInfo.flags ); VULKAN_HPP_HASH_COMBINE( seed, bufferViewCreateInfo.buffer ); VULKAN_HPP_HASH_COMBINE( seed, bufferViewCreateInfo.format ); VULKAN_HPP_HASH_COMBINE( seed, bufferViewCreateInfo.offset ); VULKAN_HPP_HASH_COMBINE( seed, bufferViewCreateInfo.range ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::StridedDeviceAddressNV const & stridedDeviceAddressNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, stridedDeviceAddressNV.startAddress ); VULKAN_HPP_HASH_COMBINE( seed, stridedDeviceAddressNV.strideInBytes ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::BuildPartitionedAccelerationStructureIndirectCommandNV const & buildPartitionedAccelerationStructureIndirectCommandNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, buildPartitionedAccelerationStructureIndirectCommandNV.opType ); VULKAN_HPP_HASH_COMBINE( seed, buildPartitionedAccelerationStructureIndirectCommandNV.argCount ); VULKAN_HPP_HASH_COMBINE( seed, buildPartitionedAccelerationStructureIndirectCommandNV.argData ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PartitionedAccelerationStructureInstancesInputNV const & partitionedAccelerationStructureInstancesInputNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, partitionedAccelerationStructureInstancesInputNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, partitionedAccelerationStructureInstancesInputNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, partitionedAccelerationStructureInstancesInputNV.flags ); VULKAN_HPP_HASH_COMBINE( seed, partitionedAccelerationStructureInstancesInputNV.instanceCount ); VULKAN_HPP_HASH_COMBINE( seed, partitionedAccelerationStructureInstancesInputNV.maxInstancePerPartitionCount ); VULKAN_HPP_HASH_COMBINE( seed, partitionedAccelerationStructureInstancesInputNV.partitionCount ); VULKAN_HPP_HASH_COMBINE( seed, partitionedAccelerationStructureInstancesInputNV.maxInstanceInGlobalPartitionCount ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::BuildPartitionedAccelerationStructureInfoNV const & buildPartitionedAccelerationStructureInfoNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, buildPartitionedAccelerationStructureInfoNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, buildPartitionedAccelerationStructureInfoNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, buildPartitionedAccelerationStructureInfoNV.input ); VULKAN_HPP_HASH_COMBINE( seed, buildPartitionedAccelerationStructureInfoNV.srcAccelerationStructureData ); VULKAN_HPP_HASH_COMBINE( seed, buildPartitionedAccelerationStructureInfoNV.dstAccelerationStructureData ); VULKAN_HPP_HASH_COMBINE( seed, buildPartitionedAccelerationStructureInfoNV.scratchData ); VULKAN_HPP_HASH_COMBINE( seed, buildPartitionedAccelerationStructureInfoNV.srcInfos ); VULKAN_HPP_HASH_COMBINE( seed, buildPartitionedAccelerationStructureInfoNV.srcInfosCount ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::CalibratedTimestampInfoKHR const & calibratedTimestampInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, calibratedTimestampInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, calibratedTimestampInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, calibratedTimestampInfoKHR.timeDomain ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::CheckpointData2NV const & checkpointData2NV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, checkpointData2NV.sType ); VULKAN_HPP_HASH_COMBINE( seed, checkpointData2NV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, checkpointData2NV.stage ); VULKAN_HPP_HASH_COMBINE( seed, checkpointData2NV.pCheckpointMarker ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::CheckpointDataNV const & checkpointDataNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, checkpointDataNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, checkpointDataNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, checkpointDataNV.stage ); VULKAN_HPP_HASH_COMBINE( seed, checkpointDataNV.pCheckpointMarker ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ClearDepthStencilValue const & clearDepthStencilValue ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, clearDepthStencilValue.depth ); VULKAN_HPP_HASH_COMBINE( seed, clearDepthStencilValue.stencil ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ClearRect const & clearRect ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, clearRect.rect ); VULKAN_HPP_HASH_COMBINE( seed, clearRect.baseArrayLayer ); VULKAN_HPP_HASH_COMBINE( seed, clearRect.layerCount ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ClusterAccelerationStructureBuildClustersBottomLevelInfoNV const & clusterAccelerationStructureBuildClustersBottomLevelInfoNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, clusterAccelerationStructureBuildClustersBottomLevelInfoNV.clusterReferencesCount ); VULKAN_HPP_HASH_COMBINE( seed, clusterAccelerationStructureBuildClustersBottomLevelInfoNV.clusterReferencesStride ); VULKAN_HPP_HASH_COMBINE( seed, clusterAccelerationStructureBuildClustersBottomLevelInfoNV.clusterReferences ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ClusterAccelerationStructureGeometryIndexAndGeometryFlagsNV const & clusterAccelerationStructureGeometryIndexAndGeometryFlagsNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, clusterAccelerationStructureGeometryIndexAndGeometryFlagsNV.geometryIndex ); VULKAN_HPP_HASH_COMBINE( seed, clusterAccelerationStructureGeometryIndexAndGeometryFlagsNV.reserved ); VULKAN_HPP_HASH_COMBINE( seed, clusterAccelerationStructureGeometryIndexAndGeometryFlagsNV.geometryFlags ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ClusterAccelerationStructureBuildTriangleClusterInfoNV const & clusterAccelerationStructureBuildTriangleClusterInfoNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, clusterAccelerationStructureBuildTriangleClusterInfoNV.clusterID ); VULKAN_HPP_HASH_COMBINE( seed, clusterAccelerationStructureBuildTriangleClusterInfoNV.clusterFlags ); VULKAN_HPP_HASH_COMBINE( seed, clusterAccelerationStructureBuildTriangleClusterInfoNV.triangleCount ); VULKAN_HPP_HASH_COMBINE( seed, clusterAccelerationStructureBuildTriangleClusterInfoNV.vertexCount ); VULKAN_HPP_HASH_COMBINE( seed, clusterAccelerationStructureBuildTriangleClusterInfoNV.positionTruncateBitCount ); VULKAN_HPP_HASH_COMBINE( seed, clusterAccelerationStructureBuildTriangleClusterInfoNV.indexType ); VULKAN_HPP_HASH_COMBINE( seed, clusterAccelerationStructureBuildTriangleClusterInfoNV.opacityMicromapIndexType ); VULKAN_HPP_HASH_COMBINE( seed, clusterAccelerationStructureBuildTriangleClusterInfoNV.baseGeometryIndexAndGeometryFlags ); VULKAN_HPP_HASH_COMBINE( seed, clusterAccelerationStructureBuildTriangleClusterInfoNV.indexBufferStride ); VULKAN_HPP_HASH_COMBINE( seed, clusterAccelerationStructureBuildTriangleClusterInfoNV.vertexBufferStride ); VULKAN_HPP_HASH_COMBINE( seed, clusterAccelerationStructureBuildTriangleClusterInfoNV.geometryIndexAndFlagsBufferStride ); VULKAN_HPP_HASH_COMBINE( seed, clusterAccelerationStructureBuildTriangleClusterInfoNV.opacityMicromapIndexBufferStride ); VULKAN_HPP_HASH_COMBINE( seed, clusterAccelerationStructureBuildTriangleClusterInfoNV.indexBuffer ); VULKAN_HPP_HASH_COMBINE( seed, clusterAccelerationStructureBuildTriangleClusterInfoNV.vertexBuffer ); VULKAN_HPP_HASH_COMBINE( seed, clusterAccelerationStructureBuildTriangleClusterInfoNV.geometryIndexAndFlagsBuffer ); VULKAN_HPP_HASH_COMBINE( seed, clusterAccelerationStructureBuildTriangleClusterInfoNV.opacityMicromapArray ); VULKAN_HPP_HASH_COMBINE( seed, clusterAccelerationStructureBuildTriangleClusterInfoNV.opacityMicromapIndexBuffer ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ClusterAccelerationStructureBuildTriangleClusterTemplateInfoNV const & clusterAccelerationStructureBuildTriangleClusterTemplateInfoNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, clusterAccelerationStructureBuildTriangleClusterTemplateInfoNV.clusterID ); VULKAN_HPP_HASH_COMBINE( seed, clusterAccelerationStructureBuildTriangleClusterTemplateInfoNV.clusterFlags ); VULKAN_HPP_HASH_COMBINE( seed, clusterAccelerationStructureBuildTriangleClusterTemplateInfoNV.triangleCount ); VULKAN_HPP_HASH_COMBINE( seed, clusterAccelerationStructureBuildTriangleClusterTemplateInfoNV.vertexCount ); VULKAN_HPP_HASH_COMBINE( seed, clusterAccelerationStructureBuildTriangleClusterTemplateInfoNV.positionTruncateBitCount ); VULKAN_HPP_HASH_COMBINE( seed, clusterAccelerationStructureBuildTriangleClusterTemplateInfoNV.indexType ); VULKAN_HPP_HASH_COMBINE( seed, clusterAccelerationStructureBuildTriangleClusterTemplateInfoNV.opacityMicromapIndexType ); VULKAN_HPP_HASH_COMBINE( seed, clusterAccelerationStructureBuildTriangleClusterTemplateInfoNV.baseGeometryIndexAndGeometryFlags ); VULKAN_HPP_HASH_COMBINE( seed, clusterAccelerationStructureBuildTriangleClusterTemplateInfoNV.indexBufferStride ); VULKAN_HPP_HASH_COMBINE( seed, clusterAccelerationStructureBuildTriangleClusterTemplateInfoNV.vertexBufferStride ); VULKAN_HPP_HASH_COMBINE( seed, clusterAccelerationStructureBuildTriangleClusterTemplateInfoNV.geometryIndexAndFlagsBufferStride ); VULKAN_HPP_HASH_COMBINE( seed, clusterAccelerationStructureBuildTriangleClusterTemplateInfoNV.opacityMicromapIndexBufferStride ); VULKAN_HPP_HASH_COMBINE( seed, clusterAccelerationStructureBuildTriangleClusterTemplateInfoNV.indexBuffer ); VULKAN_HPP_HASH_COMBINE( seed, clusterAccelerationStructureBuildTriangleClusterTemplateInfoNV.vertexBuffer ); VULKAN_HPP_HASH_COMBINE( seed, clusterAccelerationStructureBuildTriangleClusterTemplateInfoNV.geometryIndexAndFlagsBuffer ); VULKAN_HPP_HASH_COMBINE( seed, clusterAccelerationStructureBuildTriangleClusterTemplateInfoNV.opacityMicromapArray ); VULKAN_HPP_HASH_COMBINE( seed, clusterAccelerationStructureBuildTriangleClusterTemplateInfoNV.opacityMicromapIndexBuffer ); VULKAN_HPP_HASH_COMBINE( seed, clusterAccelerationStructureBuildTriangleClusterTemplateInfoNV.instantiationBoundingBoxLimit ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ClusterAccelerationStructureClustersBottomLevelInputNV const & clusterAccelerationStructureClustersBottomLevelInputNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, clusterAccelerationStructureClustersBottomLevelInputNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, clusterAccelerationStructureClustersBottomLevelInputNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, clusterAccelerationStructureClustersBottomLevelInputNV.maxTotalClusterCount ); VULKAN_HPP_HASH_COMBINE( seed, clusterAccelerationStructureClustersBottomLevelInputNV.maxClusterCountPerAccelerationStructure ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ClusterAccelerationStructureTriangleClusterInputNV const & clusterAccelerationStructureTriangleClusterInputNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, clusterAccelerationStructureTriangleClusterInputNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, clusterAccelerationStructureTriangleClusterInputNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, clusterAccelerationStructureTriangleClusterInputNV.vertexFormat ); VULKAN_HPP_HASH_COMBINE( seed, clusterAccelerationStructureTriangleClusterInputNV.maxGeometryIndexValue ); VULKAN_HPP_HASH_COMBINE( seed, clusterAccelerationStructureTriangleClusterInputNV.maxClusterUniqueGeometryCount ); VULKAN_HPP_HASH_COMBINE( seed, clusterAccelerationStructureTriangleClusterInputNV.maxClusterTriangleCount ); VULKAN_HPP_HASH_COMBINE( seed, clusterAccelerationStructureTriangleClusterInputNV.maxClusterVertexCount ); VULKAN_HPP_HASH_COMBINE( seed, clusterAccelerationStructureTriangleClusterInputNV.maxTotalTriangleCount ); VULKAN_HPP_HASH_COMBINE( seed, clusterAccelerationStructureTriangleClusterInputNV.maxTotalVertexCount ); VULKAN_HPP_HASH_COMBINE( seed, clusterAccelerationStructureTriangleClusterInputNV.minPositionTruncateBitCount ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ClusterAccelerationStructureMoveObjectsInputNV const & clusterAccelerationStructureMoveObjectsInputNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, clusterAccelerationStructureMoveObjectsInputNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, clusterAccelerationStructureMoveObjectsInputNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, clusterAccelerationStructureMoveObjectsInputNV.type ); VULKAN_HPP_HASH_COMBINE( seed, clusterAccelerationStructureMoveObjectsInputNV.noMoveOverlap ); VULKAN_HPP_HASH_COMBINE( seed, clusterAccelerationStructureMoveObjectsInputNV.maxMovedBytes ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR const & stridedDeviceAddressRegionKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, stridedDeviceAddressRegionKHR.deviceAddress ); VULKAN_HPP_HASH_COMBINE( seed, stridedDeviceAddressRegionKHR.stride ); VULKAN_HPP_HASH_COMBINE( seed, stridedDeviceAddressRegionKHR.size ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ClusterAccelerationStructureInstantiateClusterInfoNV const & clusterAccelerationStructureInstantiateClusterInfoNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, clusterAccelerationStructureInstantiateClusterInfoNV.clusterIdOffset ); VULKAN_HPP_HASH_COMBINE( seed, clusterAccelerationStructureInstantiateClusterInfoNV.geometryIndexOffset ); VULKAN_HPP_HASH_COMBINE( seed, clusterAccelerationStructureInstantiateClusterInfoNV.reserved ); VULKAN_HPP_HASH_COMBINE( seed, clusterAccelerationStructureInstantiateClusterInfoNV.clusterTemplateAddress ); VULKAN_HPP_HASH_COMBINE( seed, clusterAccelerationStructureInstantiateClusterInfoNV.vertexBuffer ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ClusterAccelerationStructureMoveObjectsInfoNV const & clusterAccelerationStructureMoveObjectsInfoNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, clusterAccelerationStructureMoveObjectsInfoNV.srcAccelerationStructure ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::CoarseSampleLocationNV const & coarseSampleLocationNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, coarseSampleLocationNV.pixelX ); VULKAN_HPP_HASH_COMBINE( seed, coarseSampleLocationNV.pixelY ); VULKAN_HPP_HASH_COMBINE( seed, coarseSampleLocationNV.sample ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::CoarseSampleOrderCustomNV const & coarseSampleOrderCustomNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, coarseSampleOrderCustomNV.shadingRate ); VULKAN_HPP_HASH_COMBINE( seed, coarseSampleOrderCustomNV.sampleCount ); VULKAN_HPP_HASH_COMBINE( seed, coarseSampleOrderCustomNV.sampleLocationCount ); VULKAN_HPP_HASH_COMBINE( seed, coarseSampleOrderCustomNV.pSampleLocations ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ColorBlendAdvancedEXT const & colorBlendAdvancedEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, colorBlendAdvancedEXT.advancedBlendOp ); VULKAN_HPP_HASH_COMBINE( seed, colorBlendAdvancedEXT.srcPremultiplied ); VULKAN_HPP_HASH_COMBINE( seed, colorBlendAdvancedEXT.dstPremultiplied ); VULKAN_HPP_HASH_COMBINE( seed, colorBlendAdvancedEXT.blendOverlap ); VULKAN_HPP_HASH_COMBINE( seed, colorBlendAdvancedEXT.clampResults ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ColorBlendEquationEXT const & colorBlendEquationEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, colorBlendEquationEXT.srcColorBlendFactor ); VULKAN_HPP_HASH_COMBINE( seed, colorBlendEquationEXT.dstColorBlendFactor ); VULKAN_HPP_HASH_COMBINE( seed, colorBlendEquationEXT.colorBlendOp ); VULKAN_HPP_HASH_COMBINE( seed, colorBlendEquationEXT.srcAlphaBlendFactor ); VULKAN_HPP_HASH_COMBINE( seed, colorBlendEquationEXT.dstAlphaBlendFactor ); VULKAN_HPP_HASH_COMBINE( seed, colorBlendEquationEXT.alphaBlendOp ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::CommandBufferAllocateInfo const & commandBufferAllocateInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, commandBufferAllocateInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, commandBufferAllocateInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, commandBufferAllocateInfo.commandPool ); VULKAN_HPP_HASH_COMBINE( seed, commandBufferAllocateInfo.level ); VULKAN_HPP_HASH_COMBINE( seed, commandBufferAllocateInfo.commandBufferCount ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::CommandBufferInheritanceInfo const & commandBufferInheritanceInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, commandBufferInheritanceInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, commandBufferInheritanceInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, commandBufferInheritanceInfo.renderPass ); VULKAN_HPP_HASH_COMBINE( seed, commandBufferInheritanceInfo.subpass ); VULKAN_HPP_HASH_COMBINE( seed, commandBufferInheritanceInfo.framebuffer ); VULKAN_HPP_HASH_COMBINE( seed, commandBufferInheritanceInfo.occlusionQueryEnable ); VULKAN_HPP_HASH_COMBINE( seed, commandBufferInheritanceInfo.queryFlags ); VULKAN_HPP_HASH_COMBINE( seed, commandBufferInheritanceInfo.pipelineStatistics ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::CommandBufferBeginInfo const & commandBufferBeginInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, commandBufferBeginInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, commandBufferBeginInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, commandBufferBeginInfo.flags ); VULKAN_HPP_HASH_COMBINE( seed, commandBufferBeginInfo.pInheritanceInfo ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::CommandBufferInheritanceConditionalRenderingInfoEXT const & commandBufferInheritanceConditionalRenderingInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, commandBufferInheritanceConditionalRenderingInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, commandBufferInheritanceConditionalRenderingInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, commandBufferInheritanceConditionalRenderingInfoEXT.conditionalRenderingEnable ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::CommandBufferInheritanceRenderPassTransformInfoQCOM const & commandBufferInheritanceRenderPassTransformInfoQCOM ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, commandBufferInheritanceRenderPassTransformInfoQCOM.sType ); VULKAN_HPP_HASH_COMBINE( seed, commandBufferInheritanceRenderPassTransformInfoQCOM.pNext ); VULKAN_HPP_HASH_COMBINE( seed, commandBufferInheritanceRenderPassTransformInfoQCOM.transform ); VULKAN_HPP_HASH_COMBINE( seed, commandBufferInheritanceRenderPassTransformInfoQCOM.renderArea ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::CommandBufferInheritanceRenderingInfo const & commandBufferInheritanceRenderingInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, commandBufferInheritanceRenderingInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, commandBufferInheritanceRenderingInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, commandBufferInheritanceRenderingInfo.flags ); VULKAN_HPP_HASH_COMBINE( seed, commandBufferInheritanceRenderingInfo.viewMask ); VULKAN_HPP_HASH_COMBINE( seed, commandBufferInheritanceRenderingInfo.colorAttachmentCount ); VULKAN_HPP_HASH_COMBINE( seed, commandBufferInheritanceRenderingInfo.pColorAttachmentFormats ); VULKAN_HPP_HASH_COMBINE( seed, commandBufferInheritanceRenderingInfo.depthAttachmentFormat ); VULKAN_HPP_HASH_COMBINE( seed, commandBufferInheritanceRenderingInfo.stencilAttachmentFormat ); VULKAN_HPP_HASH_COMBINE( seed, commandBufferInheritanceRenderingInfo.rasterizationSamples ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::Viewport const & viewport ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, viewport.x ); VULKAN_HPP_HASH_COMBINE( seed, viewport.y ); VULKAN_HPP_HASH_COMBINE( seed, viewport.width ); VULKAN_HPP_HASH_COMBINE( seed, viewport.height ); VULKAN_HPP_HASH_COMBINE( seed, viewport.minDepth ); VULKAN_HPP_HASH_COMBINE( seed, viewport.maxDepth ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::CommandBufferInheritanceViewportScissorInfoNV const & commandBufferInheritanceViewportScissorInfoNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, commandBufferInheritanceViewportScissorInfoNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, commandBufferInheritanceViewportScissorInfoNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, commandBufferInheritanceViewportScissorInfoNV.viewportScissor2D ); VULKAN_HPP_HASH_COMBINE( seed, commandBufferInheritanceViewportScissorInfoNV.viewportDepthCount ); VULKAN_HPP_HASH_COMBINE( seed, commandBufferInheritanceViewportScissorInfoNV.pViewportDepths ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::CommandBufferSubmitInfo const & commandBufferSubmitInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, commandBufferSubmitInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, commandBufferSubmitInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, commandBufferSubmitInfo.commandBuffer ); VULKAN_HPP_HASH_COMBINE( seed, commandBufferSubmitInfo.deviceMask ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::CommandPoolCreateInfo const & commandPoolCreateInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, commandPoolCreateInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, commandPoolCreateInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, commandPoolCreateInfo.flags ); VULKAN_HPP_HASH_COMBINE( seed, commandPoolCreateInfo.queueFamilyIndex ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::SpecializationMapEntry const & specializationMapEntry ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, specializationMapEntry.constantID ); VULKAN_HPP_HASH_COMBINE( seed, specializationMapEntry.offset ); VULKAN_HPP_HASH_COMBINE( seed, specializationMapEntry.size ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::SpecializationInfo const & specializationInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, specializationInfo.mapEntryCount ); VULKAN_HPP_HASH_COMBINE( seed, specializationInfo.pMapEntries ); VULKAN_HPP_HASH_COMBINE( seed, specializationInfo.dataSize ); VULKAN_HPP_HASH_COMBINE( seed, specializationInfo.pData ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineShaderStageCreateInfo const & pipelineShaderStageCreateInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, pipelineShaderStageCreateInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, pipelineShaderStageCreateInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, pipelineShaderStageCreateInfo.flags ); VULKAN_HPP_HASH_COMBINE( seed, pipelineShaderStageCreateInfo.stage ); VULKAN_HPP_HASH_COMBINE( seed, pipelineShaderStageCreateInfo.module ); for ( const char * p = pipelineShaderStageCreateInfo.pName; *p != '\0'; ++p ) { VULKAN_HPP_HASH_COMBINE( seed, *p ); } VULKAN_HPP_HASH_COMBINE( seed, pipelineShaderStageCreateInfo.pSpecializationInfo ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ComputePipelineCreateInfo const & computePipelineCreateInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, computePipelineCreateInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, computePipelineCreateInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, computePipelineCreateInfo.flags ); VULKAN_HPP_HASH_COMBINE( seed, computePipelineCreateInfo.stage ); VULKAN_HPP_HASH_COMBINE( seed, computePipelineCreateInfo.layout ); VULKAN_HPP_HASH_COMBINE( seed, computePipelineCreateInfo.basePipelineHandle ); VULKAN_HPP_HASH_COMBINE( seed, computePipelineCreateInfo.basePipelineIndex ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ComputePipelineIndirectBufferInfoNV const & computePipelineIndirectBufferInfoNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, computePipelineIndirectBufferInfoNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, computePipelineIndirectBufferInfoNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, computePipelineIndirectBufferInfoNV.deviceAddress ); VULKAN_HPP_HASH_COMBINE( seed, computePipelineIndirectBufferInfoNV.size ); VULKAN_HPP_HASH_COMBINE( seed, computePipelineIndirectBufferInfoNV.pipelineDeviceAddressCaptureReplay ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ConditionalRenderingBeginInfoEXT const & conditionalRenderingBeginInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, conditionalRenderingBeginInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, conditionalRenderingBeginInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, conditionalRenderingBeginInfoEXT.buffer ); VULKAN_HPP_HASH_COMBINE( seed, conditionalRenderingBeginInfoEXT.offset ); VULKAN_HPP_HASH_COMBINE( seed, conditionalRenderingBeginInfoEXT.flags ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ConformanceVersion const & conformanceVersion ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, conformanceVersion.major ); VULKAN_HPP_HASH_COMBINE( seed, conformanceVersion.minor ); VULKAN_HPP_HASH_COMBINE( seed, conformanceVersion.subminor ); VULKAN_HPP_HASH_COMBINE( seed, conformanceVersion.patch ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::CooperativeMatrixFlexibleDimensionsPropertiesNV const & cooperativeMatrixFlexibleDimensionsPropertiesNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, cooperativeMatrixFlexibleDimensionsPropertiesNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, cooperativeMatrixFlexibleDimensionsPropertiesNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, cooperativeMatrixFlexibleDimensionsPropertiesNV.MGranularity ); VULKAN_HPP_HASH_COMBINE( seed, cooperativeMatrixFlexibleDimensionsPropertiesNV.NGranularity ); VULKAN_HPP_HASH_COMBINE( seed, cooperativeMatrixFlexibleDimensionsPropertiesNV.KGranularity ); VULKAN_HPP_HASH_COMBINE( seed, cooperativeMatrixFlexibleDimensionsPropertiesNV.AType ); VULKAN_HPP_HASH_COMBINE( seed, cooperativeMatrixFlexibleDimensionsPropertiesNV.BType ); VULKAN_HPP_HASH_COMBINE( seed, cooperativeMatrixFlexibleDimensionsPropertiesNV.CType ); VULKAN_HPP_HASH_COMBINE( seed, cooperativeMatrixFlexibleDimensionsPropertiesNV.ResultType ); VULKAN_HPP_HASH_COMBINE( seed, cooperativeMatrixFlexibleDimensionsPropertiesNV.saturatingAccumulation ); VULKAN_HPP_HASH_COMBINE( seed, cooperativeMatrixFlexibleDimensionsPropertiesNV.scope ); VULKAN_HPP_HASH_COMBINE( seed, cooperativeMatrixFlexibleDimensionsPropertiesNV.workgroupInvocations ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::CooperativeMatrixPropertiesKHR const & cooperativeMatrixPropertiesKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, cooperativeMatrixPropertiesKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, cooperativeMatrixPropertiesKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, cooperativeMatrixPropertiesKHR.MSize ); VULKAN_HPP_HASH_COMBINE( seed, cooperativeMatrixPropertiesKHR.NSize ); VULKAN_HPP_HASH_COMBINE( seed, cooperativeMatrixPropertiesKHR.KSize ); VULKAN_HPP_HASH_COMBINE( seed, cooperativeMatrixPropertiesKHR.AType ); VULKAN_HPP_HASH_COMBINE( seed, cooperativeMatrixPropertiesKHR.BType ); VULKAN_HPP_HASH_COMBINE( seed, cooperativeMatrixPropertiesKHR.CType ); VULKAN_HPP_HASH_COMBINE( seed, cooperativeMatrixPropertiesKHR.ResultType ); VULKAN_HPP_HASH_COMBINE( seed, cooperativeMatrixPropertiesKHR.saturatingAccumulation ); VULKAN_HPP_HASH_COMBINE( seed, cooperativeMatrixPropertiesKHR.scope ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::CooperativeMatrixPropertiesNV const & cooperativeMatrixPropertiesNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, cooperativeMatrixPropertiesNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, cooperativeMatrixPropertiesNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, cooperativeMatrixPropertiesNV.MSize ); VULKAN_HPP_HASH_COMBINE( seed, cooperativeMatrixPropertiesNV.NSize ); VULKAN_HPP_HASH_COMBINE( seed, cooperativeMatrixPropertiesNV.KSize ); VULKAN_HPP_HASH_COMBINE( seed, cooperativeMatrixPropertiesNV.AType ); VULKAN_HPP_HASH_COMBINE( seed, cooperativeMatrixPropertiesNV.BType ); VULKAN_HPP_HASH_COMBINE( seed, cooperativeMatrixPropertiesNV.CType ); VULKAN_HPP_HASH_COMBINE( seed, cooperativeMatrixPropertiesNV.DType ); VULKAN_HPP_HASH_COMBINE( seed, cooperativeMatrixPropertiesNV.scope ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::CooperativeVectorPropertiesNV const & cooperativeVectorPropertiesNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, cooperativeVectorPropertiesNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, cooperativeVectorPropertiesNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, cooperativeVectorPropertiesNV.inputType ); VULKAN_HPP_HASH_COMBINE( seed, cooperativeVectorPropertiesNV.inputInterpretation ); VULKAN_HPP_HASH_COMBINE( seed, cooperativeVectorPropertiesNV.matrixInterpretation ); VULKAN_HPP_HASH_COMBINE( seed, cooperativeVectorPropertiesNV.biasInterpretation ); VULKAN_HPP_HASH_COMBINE( seed, cooperativeVectorPropertiesNV.resultType ); VULKAN_HPP_HASH_COMBINE( seed, cooperativeVectorPropertiesNV.transpose ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::CopyAccelerationStructureInfoKHR const & copyAccelerationStructureInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, copyAccelerationStructureInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, copyAccelerationStructureInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, copyAccelerationStructureInfoKHR.src ); VULKAN_HPP_HASH_COMBINE( seed, copyAccelerationStructureInfoKHR.dst ); VULKAN_HPP_HASH_COMBINE( seed, copyAccelerationStructureInfoKHR.mode ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::CopyBufferInfo2 const & copyBufferInfo2 ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, copyBufferInfo2.sType ); VULKAN_HPP_HASH_COMBINE( seed, copyBufferInfo2.pNext ); VULKAN_HPP_HASH_COMBINE( seed, copyBufferInfo2.srcBuffer ); VULKAN_HPP_HASH_COMBINE( seed, copyBufferInfo2.dstBuffer ); VULKAN_HPP_HASH_COMBINE( seed, copyBufferInfo2.regionCount ); VULKAN_HPP_HASH_COMBINE( seed, copyBufferInfo2.pRegions ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::CopyBufferToImageInfo2 const & copyBufferToImageInfo2 ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, copyBufferToImageInfo2.sType ); VULKAN_HPP_HASH_COMBINE( seed, copyBufferToImageInfo2.pNext ); VULKAN_HPP_HASH_COMBINE( seed, copyBufferToImageInfo2.srcBuffer ); VULKAN_HPP_HASH_COMBINE( seed, copyBufferToImageInfo2.dstImage ); VULKAN_HPP_HASH_COMBINE( seed, copyBufferToImageInfo2.dstImageLayout ); VULKAN_HPP_HASH_COMBINE( seed, copyBufferToImageInfo2.regionCount ); VULKAN_HPP_HASH_COMBINE( seed, copyBufferToImageInfo2.pRegions ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::CopyCommandTransformInfoQCOM const & copyCommandTransformInfoQCOM ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, copyCommandTransformInfoQCOM.sType ); VULKAN_HPP_HASH_COMBINE( seed, copyCommandTransformInfoQCOM.pNext ); VULKAN_HPP_HASH_COMBINE( seed, copyCommandTransformInfoQCOM.transform ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::CopyDescriptorSet const & copyDescriptorSet ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, copyDescriptorSet.sType ); VULKAN_HPP_HASH_COMBINE( seed, copyDescriptorSet.pNext ); VULKAN_HPP_HASH_COMBINE( seed, copyDescriptorSet.srcSet ); VULKAN_HPP_HASH_COMBINE( seed, copyDescriptorSet.srcBinding ); VULKAN_HPP_HASH_COMBINE( seed, copyDescriptorSet.srcArrayElement ); VULKAN_HPP_HASH_COMBINE( seed, copyDescriptorSet.dstSet ); VULKAN_HPP_HASH_COMBINE( seed, copyDescriptorSet.dstBinding ); VULKAN_HPP_HASH_COMBINE( seed, copyDescriptorSet.dstArrayElement ); VULKAN_HPP_HASH_COMBINE( seed, copyDescriptorSet.descriptorCount ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ImageCopy2 const & imageCopy2 ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, imageCopy2.sType ); VULKAN_HPP_HASH_COMBINE( seed, imageCopy2.pNext ); VULKAN_HPP_HASH_COMBINE( seed, imageCopy2.srcSubresource ); VULKAN_HPP_HASH_COMBINE( seed, imageCopy2.srcOffset ); VULKAN_HPP_HASH_COMBINE( seed, imageCopy2.dstSubresource ); VULKAN_HPP_HASH_COMBINE( seed, imageCopy2.dstOffset ); VULKAN_HPP_HASH_COMBINE( seed, imageCopy2.extent ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::CopyImageInfo2 const & copyImageInfo2 ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, copyImageInfo2.sType ); VULKAN_HPP_HASH_COMBINE( seed, copyImageInfo2.pNext ); VULKAN_HPP_HASH_COMBINE( seed, copyImageInfo2.srcImage ); VULKAN_HPP_HASH_COMBINE( seed, copyImageInfo2.srcImageLayout ); VULKAN_HPP_HASH_COMBINE( seed, copyImageInfo2.dstImage ); VULKAN_HPP_HASH_COMBINE( seed, copyImageInfo2.dstImageLayout ); VULKAN_HPP_HASH_COMBINE( seed, copyImageInfo2.regionCount ); VULKAN_HPP_HASH_COMBINE( seed, copyImageInfo2.pRegions ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::CopyImageToBufferInfo2 const & copyImageToBufferInfo2 ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, copyImageToBufferInfo2.sType ); VULKAN_HPP_HASH_COMBINE( seed, copyImageToBufferInfo2.pNext ); VULKAN_HPP_HASH_COMBINE( seed, copyImageToBufferInfo2.srcImage ); VULKAN_HPP_HASH_COMBINE( seed, copyImageToBufferInfo2.srcImageLayout ); VULKAN_HPP_HASH_COMBINE( seed, copyImageToBufferInfo2.dstBuffer ); VULKAN_HPP_HASH_COMBINE( seed, copyImageToBufferInfo2.regionCount ); VULKAN_HPP_HASH_COMBINE( seed, copyImageToBufferInfo2.pRegions ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::CopyImageToImageInfo const & copyImageToImageInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, copyImageToImageInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, copyImageToImageInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, copyImageToImageInfo.flags ); VULKAN_HPP_HASH_COMBINE( seed, copyImageToImageInfo.srcImage ); VULKAN_HPP_HASH_COMBINE( seed, copyImageToImageInfo.srcImageLayout ); VULKAN_HPP_HASH_COMBINE( seed, copyImageToImageInfo.dstImage ); VULKAN_HPP_HASH_COMBINE( seed, copyImageToImageInfo.dstImageLayout ); VULKAN_HPP_HASH_COMBINE( seed, copyImageToImageInfo.regionCount ); VULKAN_HPP_HASH_COMBINE( seed, copyImageToImageInfo.pRegions ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ImageToMemoryCopy const & imageToMemoryCopy ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, imageToMemoryCopy.sType ); VULKAN_HPP_HASH_COMBINE( seed, imageToMemoryCopy.pNext ); VULKAN_HPP_HASH_COMBINE( seed, imageToMemoryCopy.pHostPointer ); VULKAN_HPP_HASH_COMBINE( seed, imageToMemoryCopy.memoryRowLength ); VULKAN_HPP_HASH_COMBINE( seed, imageToMemoryCopy.memoryImageHeight ); VULKAN_HPP_HASH_COMBINE( seed, imageToMemoryCopy.imageSubresource ); VULKAN_HPP_HASH_COMBINE( seed, imageToMemoryCopy.imageOffset ); VULKAN_HPP_HASH_COMBINE( seed, imageToMemoryCopy.imageExtent ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::CopyImageToMemoryInfo const & copyImageToMemoryInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, copyImageToMemoryInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, copyImageToMemoryInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, copyImageToMemoryInfo.flags ); VULKAN_HPP_HASH_COMBINE( seed, copyImageToMemoryInfo.srcImage ); VULKAN_HPP_HASH_COMBINE( seed, copyImageToMemoryInfo.srcImageLayout ); VULKAN_HPP_HASH_COMBINE( seed, copyImageToMemoryInfo.regionCount ); VULKAN_HPP_HASH_COMBINE( seed, copyImageToMemoryInfo.pRegions ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::CopyMemoryIndirectCommandNV const & copyMemoryIndirectCommandNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, copyMemoryIndirectCommandNV.srcAddress ); VULKAN_HPP_HASH_COMBINE( seed, copyMemoryIndirectCommandNV.dstAddress ); VULKAN_HPP_HASH_COMBINE( seed, copyMemoryIndirectCommandNV.size ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::CopyMemoryToImageIndirectCommandNV const & copyMemoryToImageIndirectCommandNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, copyMemoryToImageIndirectCommandNV.srcAddress ); VULKAN_HPP_HASH_COMBINE( seed, copyMemoryToImageIndirectCommandNV.bufferRowLength ); VULKAN_HPP_HASH_COMBINE( seed, copyMemoryToImageIndirectCommandNV.bufferImageHeight ); VULKAN_HPP_HASH_COMBINE( seed, copyMemoryToImageIndirectCommandNV.imageSubresource ); VULKAN_HPP_HASH_COMBINE( seed, copyMemoryToImageIndirectCommandNV.imageOffset ); VULKAN_HPP_HASH_COMBINE( seed, copyMemoryToImageIndirectCommandNV.imageExtent ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::MemoryToImageCopy const & memoryToImageCopy ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, memoryToImageCopy.sType ); VULKAN_HPP_HASH_COMBINE( seed, memoryToImageCopy.pNext ); VULKAN_HPP_HASH_COMBINE( seed, memoryToImageCopy.pHostPointer ); VULKAN_HPP_HASH_COMBINE( seed, memoryToImageCopy.memoryRowLength ); VULKAN_HPP_HASH_COMBINE( seed, memoryToImageCopy.memoryImageHeight ); VULKAN_HPP_HASH_COMBINE( seed, memoryToImageCopy.imageSubresource ); VULKAN_HPP_HASH_COMBINE( seed, memoryToImageCopy.imageOffset ); VULKAN_HPP_HASH_COMBINE( seed, memoryToImageCopy.imageExtent ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::CopyMemoryToImageInfo const & copyMemoryToImageInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, copyMemoryToImageInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, copyMemoryToImageInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, copyMemoryToImageInfo.flags ); VULKAN_HPP_HASH_COMBINE( seed, copyMemoryToImageInfo.dstImage ); VULKAN_HPP_HASH_COMBINE( seed, copyMemoryToImageInfo.dstImageLayout ); VULKAN_HPP_HASH_COMBINE( seed, copyMemoryToImageInfo.regionCount ); VULKAN_HPP_HASH_COMBINE( seed, copyMemoryToImageInfo.pRegions ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::CopyMicromapInfoEXT const & copyMicromapInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, copyMicromapInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, copyMicromapInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, copyMicromapInfoEXT.src ); VULKAN_HPP_HASH_COMBINE( seed, copyMicromapInfoEXT.dst ); VULKAN_HPP_HASH_COMBINE( seed, copyMicromapInfoEXT.mode ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::CuFunctionCreateInfoNVX const & cuFunctionCreateInfoNVX ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, cuFunctionCreateInfoNVX.sType ); VULKAN_HPP_HASH_COMBINE( seed, cuFunctionCreateInfoNVX.pNext ); VULKAN_HPP_HASH_COMBINE( seed, cuFunctionCreateInfoNVX.module ); for ( const char * p = cuFunctionCreateInfoNVX.pName; *p != '\0'; ++p ) { VULKAN_HPP_HASH_COMBINE( seed, *p ); } return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::CuLaunchInfoNVX const & cuLaunchInfoNVX ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, cuLaunchInfoNVX.sType ); VULKAN_HPP_HASH_COMBINE( seed, cuLaunchInfoNVX.pNext ); VULKAN_HPP_HASH_COMBINE( seed, cuLaunchInfoNVX.function ); VULKAN_HPP_HASH_COMBINE( seed, cuLaunchInfoNVX.gridDimX ); VULKAN_HPP_HASH_COMBINE( seed, cuLaunchInfoNVX.gridDimY ); VULKAN_HPP_HASH_COMBINE( seed, cuLaunchInfoNVX.gridDimZ ); VULKAN_HPP_HASH_COMBINE( seed, cuLaunchInfoNVX.blockDimX ); VULKAN_HPP_HASH_COMBINE( seed, cuLaunchInfoNVX.blockDimY ); VULKAN_HPP_HASH_COMBINE( seed, cuLaunchInfoNVX.blockDimZ ); VULKAN_HPP_HASH_COMBINE( seed, cuLaunchInfoNVX.sharedMemBytes ); VULKAN_HPP_HASH_COMBINE( seed, cuLaunchInfoNVX.paramCount ); VULKAN_HPP_HASH_COMBINE( seed, cuLaunchInfoNVX.pParams ); VULKAN_HPP_HASH_COMBINE( seed, cuLaunchInfoNVX.extraCount ); VULKAN_HPP_HASH_COMBINE( seed, cuLaunchInfoNVX.pExtras ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::CuModuleCreateInfoNVX const & cuModuleCreateInfoNVX ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, cuModuleCreateInfoNVX.sType ); VULKAN_HPP_HASH_COMBINE( seed, cuModuleCreateInfoNVX.pNext ); VULKAN_HPP_HASH_COMBINE( seed, cuModuleCreateInfoNVX.dataSize ); VULKAN_HPP_HASH_COMBINE( seed, cuModuleCreateInfoNVX.pData ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::CuModuleTexturingModeCreateInfoNVX const & cuModuleTexturingModeCreateInfoNVX ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, cuModuleTexturingModeCreateInfoNVX.sType ); VULKAN_HPP_HASH_COMBINE( seed, cuModuleTexturingModeCreateInfoNVX.pNext ); VULKAN_HPP_HASH_COMBINE( seed, cuModuleTexturingModeCreateInfoNVX.use64bitTexturing ); return seed; } }; # if defined( VK_ENABLE_BETA_EXTENSIONS ) template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::CudaFunctionCreateInfoNV const & cudaFunctionCreateInfoNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, cudaFunctionCreateInfoNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, cudaFunctionCreateInfoNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, cudaFunctionCreateInfoNV.module ); for ( const char * p = cudaFunctionCreateInfoNV.pName; *p != '\0'; ++p ) { VULKAN_HPP_HASH_COMBINE( seed, *p ); } return seed; } }; # endif /*VK_ENABLE_BETA_EXTENSIONS*/ # if defined( VK_ENABLE_BETA_EXTENSIONS ) template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::CudaLaunchInfoNV const & cudaLaunchInfoNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, cudaLaunchInfoNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, cudaLaunchInfoNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, cudaLaunchInfoNV.function ); VULKAN_HPP_HASH_COMBINE( seed, cudaLaunchInfoNV.gridDimX ); VULKAN_HPP_HASH_COMBINE( seed, cudaLaunchInfoNV.gridDimY ); VULKAN_HPP_HASH_COMBINE( seed, cudaLaunchInfoNV.gridDimZ ); VULKAN_HPP_HASH_COMBINE( seed, cudaLaunchInfoNV.blockDimX ); VULKAN_HPP_HASH_COMBINE( seed, cudaLaunchInfoNV.blockDimY ); VULKAN_HPP_HASH_COMBINE( seed, cudaLaunchInfoNV.blockDimZ ); VULKAN_HPP_HASH_COMBINE( seed, cudaLaunchInfoNV.sharedMemBytes ); VULKAN_HPP_HASH_COMBINE( seed, cudaLaunchInfoNV.paramCount ); VULKAN_HPP_HASH_COMBINE( seed, cudaLaunchInfoNV.pParams ); VULKAN_HPP_HASH_COMBINE( seed, cudaLaunchInfoNV.extraCount ); VULKAN_HPP_HASH_COMBINE( seed, cudaLaunchInfoNV.pExtras ); return seed; } }; # endif /*VK_ENABLE_BETA_EXTENSIONS*/ # if defined( VK_ENABLE_BETA_EXTENSIONS ) template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::CudaModuleCreateInfoNV const & cudaModuleCreateInfoNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, cudaModuleCreateInfoNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, cudaModuleCreateInfoNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, cudaModuleCreateInfoNV.dataSize ); VULKAN_HPP_HASH_COMBINE( seed, cudaModuleCreateInfoNV.pData ); return seed; } }; # endif /*VK_ENABLE_BETA_EXTENSIONS*/ # if defined( VK_USE_PLATFORM_WIN32_KHR ) template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::D3D12FenceSubmitInfoKHR const & d3D12FenceSubmitInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, d3D12FenceSubmitInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, d3D12FenceSubmitInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, d3D12FenceSubmitInfoKHR.waitSemaphoreValuesCount ); VULKAN_HPP_HASH_COMBINE( seed, d3D12FenceSubmitInfoKHR.pWaitSemaphoreValues ); VULKAN_HPP_HASH_COMBINE( seed, d3D12FenceSubmitInfoKHR.signalSemaphoreValuesCount ); VULKAN_HPP_HASH_COMBINE( seed, d3D12FenceSubmitInfoKHR.pSignalSemaphoreValues ); return seed; } }; # endif /*VK_USE_PLATFORM_WIN32_KHR*/ template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DebugMarkerMarkerInfoEXT const & debugMarkerMarkerInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, debugMarkerMarkerInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, debugMarkerMarkerInfoEXT.pNext ); for ( const char * p = debugMarkerMarkerInfoEXT.pMarkerName; *p != '\0'; ++p ) { VULKAN_HPP_HASH_COMBINE( seed, *p ); } for ( size_t i = 0; i < 4; ++i ) { VULKAN_HPP_HASH_COMBINE( seed, debugMarkerMarkerInfoEXT.color[i] ); } return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DebugMarkerObjectNameInfoEXT const & debugMarkerObjectNameInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, debugMarkerObjectNameInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, debugMarkerObjectNameInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, debugMarkerObjectNameInfoEXT.objectType ); VULKAN_HPP_HASH_COMBINE( seed, debugMarkerObjectNameInfoEXT.object ); for ( const char * p = debugMarkerObjectNameInfoEXT.pObjectName; *p != '\0'; ++p ) { VULKAN_HPP_HASH_COMBINE( seed, *p ); } return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DebugMarkerObjectTagInfoEXT const & debugMarkerObjectTagInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, debugMarkerObjectTagInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, debugMarkerObjectTagInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, debugMarkerObjectTagInfoEXT.objectType ); VULKAN_HPP_HASH_COMBINE( seed, debugMarkerObjectTagInfoEXT.object ); VULKAN_HPP_HASH_COMBINE( seed, debugMarkerObjectTagInfoEXT.tagName ); VULKAN_HPP_HASH_COMBINE( seed, debugMarkerObjectTagInfoEXT.tagSize ); VULKAN_HPP_HASH_COMBINE( seed, debugMarkerObjectTagInfoEXT.pTag ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DebugReportCallbackCreateInfoEXT const & debugReportCallbackCreateInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, debugReportCallbackCreateInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, debugReportCallbackCreateInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, debugReportCallbackCreateInfoEXT.flags ); VULKAN_HPP_HASH_COMBINE( seed, debugReportCallbackCreateInfoEXT.pfnCallback ); VULKAN_HPP_HASH_COMBINE( seed, debugReportCallbackCreateInfoEXT.pUserData ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DebugUtilsLabelEXT const & debugUtilsLabelEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, debugUtilsLabelEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, debugUtilsLabelEXT.pNext ); for ( const char * p = debugUtilsLabelEXT.pLabelName; *p != '\0'; ++p ) { VULKAN_HPP_HASH_COMBINE( seed, *p ); } for ( size_t i = 0; i < 4; ++i ) { VULKAN_HPP_HASH_COMBINE( seed, debugUtilsLabelEXT.color[i] ); } return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DebugUtilsObjectNameInfoEXT const & debugUtilsObjectNameInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, debugUtilsObjectNameInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, debugUtilsObjectNameInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, debugUtilsObjectNameInfoEXT.objectType ); VULKAN_HPP_HASH_COMBINE( seed, debugUtilsObjectNameInfoEXT.objectHandle ); for ( const char * p = debugUtilsObjectNameInfoEXT.pObjectName; *p != '\0'; ++p ) { VULKAN_HPP_HASH_COMBINE( seed, *p ); } return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DebugUtilsMessengerCallbackDataEXT const & debugUtilsMessengerCallbackDataEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, debugUtilsMessengerCallbackDataEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, debugUtilsMessengerCallbackDataEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, debugUtilsMessengerCallbackDataEXT.flags ); for ( const char * p = debugUtilsMessengerCallbackDataEXT.pMessageIdName; *p != '\0'; ++p ) { VULKAN_HPP_HASH_COMBINE( seed, *p ); } VULKAN_HPP_HASH_COMBINE( seed, debugUtilsMessengerCallbackDataEXT.messageIdNumber ); for ( const char * p = debugUtilsMessengerCallbackDataEXT.pMessage; *p != '\0'; ++p ) { VULKAN_HPP_HASH_COMBINE( seed, *p ); } VULKAN_HPP_HASH_COMBINE( seed, debugUtilsMessengerCallbackDataEXT.queueLabelCount ); VULKAN_HPP_HASH_COMBINE( seed, debugUtilsMessengerCallbackDataEXT.pQueueLabels ); VULKAN_HPP_HASH_COMBINE( seed, debugUtilsMessengerCallbackDataEXT.cmdBufLabelCount ); VULKAN_HPP_HASH_COMBINE( seed, debugUtilsMessengerCallbackDataEXT.pCmdBufLabels ); VULKAN_HPP_HASH_COMBINE( seed, debugUtilsMessengerCallbackDataEXT.objectCount ); VULKAN_HPP_HASH_COMBINE( seed, debugUtilsMessengerCallbackDataEXT.pObjects ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DebugUtilsMessengerCreateInfoEXT const & debugUtilsMessengerCreateInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, debugUtilsMessengerCreateInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, debugUtilsMessengerCreateInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, debugUtilsMessengerCreateInfoEXT.flags ); VULKAN_HPP_HASH_COMBINE( seed, debugUtilsMessengerCreateInfoEXT.messageSeverity ); VULKAN_HPP_HASH_COMBINE( seed, debugUtilsMessengerCreateInfoEXT.messageType ); VULKAN_HPP_HASH_COMBINE( seed, debugUtilsMessengerCreateInfoEXT.pfnUserCallback ); VULKAN_HPP_HASH_COMBINE( seed, debugUtilsMessengerCreateInfoEXT.pUserData ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DebugUtilsObjectTagInfoEXT const & debugUtilsObjectTagInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, debugUtilsObjectTagInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, debugUtilsObjectTagInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, debugUtilsObjectTagInfoEXT.objectType ); VULKAN_HPP_HASH_COMBINE( seed, debugUtilsObjectTagInfoEXT.objectHandle ); VULKAN_HPP_HASH_COMBINE( seed, debugUtilsObjectTagInfoEXT.tagName ); VULKAN_HPP_HASH_COMBINE( seed, debugUtilsObjectTagInfoEXT.tagSize ); VULKAN_HPP_HASH_COMBINE( seed, debugUtilsObjectTagInfoEXT.pTag ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DecompressMemoryRegionNV const & decompressMemoryRegionNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, decompressMemoryRegionNV.srcAddress ); VULKAN_HPP_HASH_COMBINE( seed, decompressMemoryRegionNV.dstAddress ); VULKAN_HPP_HASH_COMBINE( seed, decompressMemoryRegionNV.compressedSize ); VULKAN_HPP_HASH_COMBINE( seed, decompressMemoryRegionNV.decompressedSize ); VULKAN_HPP_HASH_COMBINE( seed, decompressMemoryRegionNV.decompressionMethod ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DedicatedAllocationBufferCreateInfoNV const & dedicatedAllocationBufferCreateInfoNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, dedicatedAllocationBufferCreateInfoNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, dedicatedAllocationBufferCreateInfoNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, dedicatedAllocationBufferCreateInfoNV.dedicatedAllocation ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DedicatedAllocationImageCreateInfoNV const & dedicatedAllocationImageCreateInfoNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, dedicatedAllocationImageCreateInfoNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, dedicatedAllocationImageCreateInfoNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, dedicatedAllocationImageCreateInfoNV.dedicatedAllocation ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DedicatedAllocationMemoryAllocateInfoNV const & dedicatedAllocationMemoryAllocateInfoNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, dedicatedAllocationMemoryAllocateInfoNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, dedicatedAllocationMemoryAllocateInfoNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, dedicatedAllocationMemoryAllocateInfoNV.image ); VULKAN_HPP_HASH_COMBINE( seed, dedicatedAllocationMemoryAllocateInfoNV.buffer ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::MemoryBarrier2 const & memoryBarrier2 ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, memoryBarrier2.sType ); VULKAN_HPP_HASH_COMBINE( seed, memoryBarrier2.pNext ); VULKAN_HPP_HASH_COMBINE( seed, memoryBarrier2.srcStageMask ); VULKAN_HPP_HASH_COMBINE( seed, memoryBarrier2.srcAccessMask ); VULKAN_HPP_HASH_COMBINE( seed, memoryBarrier2.dstStageMask ); VULKAN_HPP_HASH_COMBINE( seed, memoryBarrier2.dstAccessMask ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ImageSubresourceRange const & imageSubresourceRange ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, imageSubresourceRange.aspectMask ); VULKAN_HPP_HASH_COMBINE( seed, imageSubresourceRange.baseMipLevel ); VULKAN_HPP_HASH_COMBINE( seed, imageSubresourceRange.levelCount ); VULKAN_HPP_HASH_COMBINE( seed, imageSubresourceRange.baseArrayLayer ); VULKAN_HPP_HASH_COMBINE( seed, imageSubresourceRange.layerCount ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ImageMemoryBarrier2 const & imageMemoryBarrier2 ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, imageMemoryBarrier2.sType ); VULKAN_HPP_HASH_COMBINE( seed, imageMemoryBarrier2.pNext ); VULKAN_HPP_HASH_COMBINE( seed, imageMemoryBarrier2.srcStageMask ); VULKAN_HPP_HASH_COMBINE( seed, imageMemoryBarrier2.srcAccessMask ); VULKAN_HPP_HASH_COMBINE( seed, imageMemoryBarrier2.dstStageMask ); VULKAN_HPP_HASH_COMBINE( seed, imageMemoryBarrier2.dstAccessMask ); VULKAN_HPP_HASH_COMBINE( seed, imageMemoryBarrier2.oldLayout ); VULKAN_HPP_HASH_COMBINE( seed, imageMemoryBarrier2.newLayout ); VULKAN_HPP_HASH_COMBINE( seed, imageMemoryBarrier2.srcQueueFamilyIndex ); VULKAN_HPP_HASH_COMBINE( seed, imageMemoryBarrier2.dstQueueFamilyIndex ); VULKAN_HPP_HASH_COMBINE( seed, imageMemoryBarrier2.image ); VULKAN_HPP_HASH_COMBINE( seed, imageMemoryBarrier2.subresourceRange ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DependencyInfo const & dependencyInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, dependencyInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, dependencyInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, dependencyInfo.dependencyFlags ); VULKAN_HPP_HASH_COMBINE( seed, dependencyInfo.memoryBarrierCount ); VULKAN_HPP_HASH_COMBINE( seed, dependencyInfo.pMemoryBarriers ); VULKAN_HPP_HASH_COMBINE( seed, dependencyInfo.bufferMemoryBarrierCount ); VULKAN_HPP_HASH_COMBINE( seed, dependencyInfo.pBufferMemoryBarriers ); VULKAN_HPP_HASH_COMBINE( seed, dependencyInfo.imageMemoryBarrierCount ); VULKAN_HPP_HASH_COMBINE( seed, dependencyInfo.pImageMemoryBarriers ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DepthBiasInfoEXT const & depthBiasInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, depthBiasInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, depthBiasInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, depthBiasInfoEXT.depthBiasConstantFactor ); VULKAN_HPP_HASH_COMBINE( seed, depthBiasInfoEXT.depthBiasClamp ); VULKAN_HPP_HASH_COMBINE( seed, depthBiasInfoEXT.depthBiasSlopeFactor ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DepthBiasRepresentationInfoEXT const & depthBiasRepresentationInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, depthBiasRepresentationInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, depthBiasRepresentationInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, depthBiasRepresentationInfoEXT.depthBiasRepresentation ); VULKAN_HPP_HASH_COMBINE( seed, depthBiasRepresentationInfoEXT.depthBiasExact ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DepthClampRangeEXT const & depthClampRangeEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, depthClampRangeEXT.minDepthClamp ); VULKAN_HPP_HASH_COMBINE( seed, depthClampRangeEXT.maxDepthClamp ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DescriptorAddressInfoEXT const & descriptorAddressInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, descriptorAddressInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, descriptorAddressInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, descriptorAddressInfoEXT.address ); VULKAN_HPP_HASH_COMBINE( seed, descriptorAddressInfoEXT.range ); VULKAN_HPP_HASH_COMBINE( seed, descriptorAddressInfoEXT.format ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DescriptorBufferBindingInfoEXT const & descriptorBufferBindingInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, descriptorBufferBindingInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, descriptorBufferBindingInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, descriptorBufferBindingInfoEXT.address ); VULKAN_HPP_HASH_COMBINE( seed, descriptorBufferBindingInfoEXT.usage ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DescriptorBufferBindingPushDescriptorBufferHandleEXT const & descriptorBufferBindingPushDescriptorBufferHandleEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, descriptorBufferBindingPushDescriptorBufferHandleEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, descriptorBufferBindingPushDescriptorBufferHandleEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, descriptorBufferBindingPushDescriptorBufferHandleEXT.buffer ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DescriptorBufferInfo const & descriptorBufferInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, descriptorBufferInfo.buffer ); VULKAN_HPP_HASH_COMBINE( seed, descriptorBufferInfo.offset ); VULKAN_HPP_HASH_COMBINE( seed, descriptorBufferInfo.range ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DescriptorImageInfo const & descriptorImageInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, descriptorImageInfo.sampler ); VULKAN_HPP_HASH_COMBINE( seed, descriptorImageInfo.imageView ); VULKAN_HPP_HASH_COMBINE( seed, descriptorImageInfo.imageLayout ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DescriptorPoolSize const & descriptorPoolSize ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, descriptorPoolSize.type ); VULKAN_HPP_HASH_COMBINE( seed, descriptorPoolSize.descriptorCount ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DescriptorPoolCreateInfo const & descriptorPoolCreateInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, descriptorPoolCreateInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, descriptorPoolCreateInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, descriptorPoolCreateInfo.flags ); VULKAN_HPP_HASH_COMBINE( seed, descriptorPoolCreateInfo.maxSets ); VULKAN_HPP_HASH_COMBINE( seed, descriptorPoolCreateInfo.poolSizeCount ); VULKAN_HPP_HASH_COMBINE( seed, descriptorPoolCreateInfo.pPoolSizes ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DescriptorPoolInlineUniformBlockCreateInfo const & descriptorPoolInlineUniformBlockCreateInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, descriptorPoolInlineUniformBlockCreateInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, descriptorPoolInlineUniformBlockCreateInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, descriptorPoolInlineUniformBlockCreateInfo.maxInlineUniformBlockBindings ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DescriptorSetAllocateInfo const & descriptorSetAllocateInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, descriptorSetAllocateInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, descriptorSetAllocateInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, descriptorSetAllocateInfo.descriptorPool ); VULKAN_HPP_HASH_COMBINE( seed, descriptorSetAllocateInfo.descriptorSetCount ); VULKAN_HPP_HASH_COMBINE( seed, descriptorSetAllocateInfo.pSetLayouts ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DescriptorSetBindingReferenceVALVE const & descriptorSetBindingReferenceVALVE ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, descriptorSetBindingReferenceVALVE.sType ); VULKAN_HPP_HASH_COMBINE( seed, descriptorSetBindingReferenceVALVE.pNext ); VULKAN_HPP_HASH_COMBINE( seed, descriptorSetBindingReferenceVALVE.descriptorSetLayout ); VULKAN_HPP_HASH_COMBINE( seed, descriptorSetBindingReferenceVALVE.binding ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DescriptorSetLayoutBinding const & descriptorSetLayoutBinding ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, descriptorSetLayoutBinding.binding ); VULKAN_HPP_HASH_COMBINE( seed, descriptorSetLayoutBinding.descriptorType ); VULKAN_HPP_HASH_COMBINE( seed, descriptorSetLayoutBinding.descriptorCount ); VULKAN_HPP_HASH_COMBINE( seed, descriptorSetLayoutBinding.stageFlags ); VULKAN_HPP_HASH_COMBINE( seed, descriptorSetLayoutBinding.pImmutableSamplers ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DescriptorSetLayoutBindingFlagsCreateInfo const & descriptorSetLayoutBindingFlagsCreateInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, descriptorSetLayoutBindingFlagsCreateInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, descriptorSetLayoutBindingFlagsCreateInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, descriptorSetLayoutBindingFlagsCreateInfo.bindingCount ); VULKAN_HPP_HASH_COMBINE( seed, descriptorSetLayoutBindingFlagsCreateInfo.pBindingFlags ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateInfo const & descriptorSetLayoutCreateInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, descriptorSetLayoutCreateInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, descriptorSetLayoutCreateInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, descriptorSetLayoutCreateInfo.flags ); VULKAN_HPP_HASH_COMBINE( seed, descriptorSetLayoutCreateInfo.bindingCount ); VULKAN_HPP_HASH_COMBINE( seed, descriptorSetLayoutCreateInfo.pBindings ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DescriptorSetLayoutHostMappingInfoVALVE const & descriptorSetLayoutHostMappingInfoVALVE ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, descriptorSetLayoutHostMappingInfoVALVE.sType ); VULKAN_HPP_HASH_COMBINE( seed, descriptorSetLayoutHostMappingInfoVALVE.pNext ); VULKAN_HPP_HASH_COMBINE( seed, descriptorSetLayoutHostMappingInfoVALVE.descriptorOffset ); VULKAN_HPP_HASH_COMBINE( seed, descriptorSetLayoutHostMappingInfoVALVE.descriptorSize ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DescriptorSetLayoutSupport const & descriptorSetLayoutSupport ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, descriptorSetLayoutSupport.sType ); VULKAN_HPP_HASH_COMBINE( seed, descriptorSetLayoutSupport.pNext ); VULKAN_HPP_HASH_COMBINE( seed, descriptorSetLayoutSupport.supported ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DescriptorSetVariableDescriptorCountAllocateInfo const & descriptorSetVariableDescriptorCountAllocateInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, descriptorSetVariableDescriptorCountAllocateInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, descriptorSetVariableDescriptorCountAllocateInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, descriptorSetVariableDescriptorCountAllocateInfo.descriptorSetCount ); VULKAN_HPP_HASH_COMBINE( seed, descriptorSetVariableDescriptorCountAllocateInfo.pDescriptorCounts ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DescriptorSetVariableDescriptorCountLayoutSupport const & descriptorSetVariableDescriptorCountLayoutSupport ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, descriptorSetVariableDescriptorCountLayoutSupport.sType ); VULKAN_HPP_HASH_COMBINE( seed, descriptorSetVariableDescriptorCountLayoutSupport.pNext ); VULKAN_HPP_HASH_COMBINE( seed, descriptorSetVariableDescriptorCountLayoutSupport.maxVariableDescriptorCount ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateEntry const & descriptorUpdateTemplateEntry ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, descriptorUpdateTemplateEntry.dstBinding ); VULKAN_HPP_HASH_COMBINE( seed, descriptorUpdateTemplateEntry.dstArrayElement ); VULKAN_HPP_HASH_COMBINE( seed, descriptorUpdateTemplateEntry.descriptorCount ); VULKAN_HPP_HASH_COMBINE( seed, descriptorUpdateTemplateEntry.descriptorType ); VULKAN_HPP_HASH_COMBINE( seed, descriptorUpdateTemplateEntry.offset ); VULKAN_HPP_HASH_COMBINE( seed, descriptorUpdateTemplateEntry.stride ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateCreateInfo const & descriptorUpdateTemplateCreateInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, descriptorUpdateTemplateCreateInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, descriptorUpdateTemplateCreateInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, descriptorUpdateTemplateCreateInfo.flags ); VULKAN_HPP_HASH_COMBINE( seed, descriptorUpdateTemplateCreateInfo.descriptorUpdateEntryCount ); VULKAN_HPP_HASH_COMBINE( seed, descriptorUpdateTemplateCreateInfo.pDescriptorUpdateEntries ); VULKAN_HPP_HASH_COMBINE( seed, descriptorUpdateTemplateCreateInfo.templateType ); VULKAN_HPP_HASH_COMBINE( seed, descriptorUpdateTemplateCreateInfo.descriptorSetLayout ); VULKAN_HPP_HASH_COMBINE( seed, descriptorUpdateTemplateCreateInfo.pipelineBindPoint ); VULKAN_HPP_HASH_COMBINE( seed, descriptorUpdateTemplateCreateInfo.pipelineLayout ); VULKAN_HPP_HASH_COMBINE( seed, descriptorUpdateTemplateCreateInfo.set ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DeviceAddressBindingCallbackDataEXT const & deviceAddressBindingCallbackDataEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, deviceAddressBindingCallbackDataEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, deviceAddressBindingCallbackDataEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, deviceAddressBindingCallbackDataEXT.flags ); VULKAN_HPP_HASH_COMBINE( seed, deviceAddressBindingCallbackDataEXT.baseAddress ); VULKAN_HPP_HASH_COMBINE( seed, deviceAddressBindingCallbackDataEXT.size ); VULKAN_HPP_HASH_COMBINE( seed, deviceAddressBindingCallbackDataEXT.bindingType ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DeviceBufferMemoryRequirements const & deviceBufferMemoryRequirements ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, deviceBufferMemoryRequirements.sType ); VULKAN_HPP_HASH_COMBINE( seed, deviceBufferMemoryRequirements.pNext ); VULKAN_HPP_HASH_COMBINE( seed, deviceBufferMemoryRequirements.pCreateInfo ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DeviceQueueCreateInfo const & deviceQueueCreateInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, deviceQueueCreateInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, deviceQueueCreateInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, deviceQueueCreateInfo.flags ); VULKAN_HPP_HASH_COMBINE( seed, deviceQueueCreateInfo.queueFamilyIndex ); VULKAN_HPP_HASH_COMBINE( seed, deviceQueueCreateInfo.queueCount ); VULKAN_HPP_HASH_COMBINE( seed, deviceQueueCreateInfo.pQueuePriorities ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures const & physicalDeviceFeatures ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.robustBufferAccess ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.fullDrawIndexUint32 ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.imageCubeArray ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.independentBlend ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.geometryShader ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.tessellationShader ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.sampleRateShading ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.dualSrcBlend ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.logicOp ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.multiDrawIndirect ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.drawIndirectFirstInstance ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.depthClamp ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.depthBiasClamp ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.fillModeNonSolid ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.depthBounds ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.wideLines ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.largePoints ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.alphaToOne ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.multiViewport ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.samplerAnisotropy ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.textureCompressionETC2 ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.textureCompressionASTC_LDR ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.textureCompressionBC ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.occlusionQueryPrecise ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.pipelineStatisticsQuery ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.vertexPipelineStoresAndAtomics ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.fragmentStoresAndAtomics ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.shaderTessellationAndGeometryPointSize ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.shaderImageGatherExtended ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.shaderStorageImageExtendedFormats ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.shaderStorageImageMultisample ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.shaderStorageImageReadWithoutFormat ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.shaderStorageImageWriteWithoutFormat ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.shaderUniformBufferArrayDynamicIndexing ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.shaderSampledImageArrayDynamicIndexing ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.shaderStorageBufferArrayDynamicIndexing ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.shaderStorageImageArrayDynamicIndexing ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.shaderClipDistance ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.shaderCullDistance ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.shaderFloat64 ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.shaderInt64 ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.shaderInt16 ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.shaderResourceResidency ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.shaderResourceMinLod ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.sparseBinding ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.sparseResidencyBuffer ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.sparseResidencyImage2D ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.sparseResidencyImage3D ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.sparseResidency2Samples ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.sparseResidency4Samples ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.sparseResidency8Samples ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.sparseResidency16Samples ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.sparseResidencyAliased ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.variableMultisampleRate ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures.inheritedQueries ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DeviceCreateInfo const & deviceCreateInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, deviceCreateInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, deviceCreateInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, deviceCreateInfo.flags ); VULKAN_HPP_HASH_COMBINE( seed, deviceCreateInfo.queueCreateInfoCount ); VULKAN_HPP_HASH_COMBINE( seed, deviceCreateInfo.pQueueCreateInfos ); VULKAN_HPP_HASH_COMBINE( seed, deviceCreateInfo.enabledLayerCount ); for ( size_t i = 0; i < deviceCreateInfo.enabledLayerCount; ++i ) { for ( const char * p = deviceCreateInfo.ppEnabledLayerNames[i]; *p != '\0'; ++p ) { VULKAN_HPP_HASH_COMBINE( seed, *p ); } } VULKAN_HPP_HASH_COMBINE( seed, deviceCreateInfo.enabledExtensionCount ); for ( size_t i = 0; i < deviceCreateInfo.enabledExtensionCount; ++i ) { for ( const char * p = deviceCreateInfo.ppEnabledExtensionNames[i]; *p != '\0'; ++p ) { VULKAN_HPP_HASH_COMBINE( seed, *p ); } } VULKAN_HPP_HASH_COMBINE( seed, deviceCreateInfo.pEnabledFeatures ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DeviceDeviceMemoryReportCreateInfoEXT const & deviceDeviceMemoryReportCreateInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, deviceDeviceMemoryReportCreateInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, deviceDeviceMemoryReportCreateInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, deviceDeviceMemoryReportCreateInfoEXT.flags ); VULKAN_HPP_HASH_COMBINE( seed, deviceDeviceMemoryReportCreateInfoEXT.pfnUserCallback ); VULKAN_HPP_HASH_COMBINE( seed, deviceDeviceMemoryReportCreateInfoEXT.pUserData ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DeviceDiagnosticsConfigCreateInfoNV const & deviceDiagnosticsConfigCreateInfoNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, deviceDiagnosticsConfigCreateInfoNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, deviceDiagnosticsConfigCreateInfoNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, deviceDiagnosticsConfigCreateInfoNV.flags ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DeviceEventInfoEXT const & deviceEventInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, deviceEventInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, deviceEventInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, deviceEventInfoEXT.deviceEvent ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DeviceFaultAddressInfoEXT const & deviceFaultAddressInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, deviceFaultAddressInfoEXT.addressType ); VULKAN_HPP_HASH_COMBINE( seed, deviceFaultAddressInfoEXT.reportedAddress ); VULKAN_HPP_HASH_COMBINE( seed, deviceFaultAddressInfoEXT.addressPrecision ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DeviceFaultCountsEXT const & deviceFaultCountsEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, deviceFaultCountsEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, deviceFaultCountsEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, deviceFaultCountsEXT.addressInfoCount ); VULKAN_HPP_HASH_COMBINE( seed, deviceFaultCountsEXT.vendorInfoCount ); VULKAN_HPP_HASH_COMBINE( seed, deviceFaultCountsEXT.vendorBinarySize ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DeviceFaultVendorInfoEXT const & deviceFaultVendorInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; for ( size_t i = 0; i < VK_MAX_DESCRIPTION_SIZE; ++i ) { VULKAN_HPP_HASH_COMBINE( seed, deviceFaultVendorInfoEXT.description[i] ); } VULKAN_HPP_HASH_COMBINE( seed, deviceFaultVendorInfoEXT.vendorFaultCode ); VULKAN_HPP_HASH_COMBINE( seed, deviceFaultVendorInfoEXT.vendorFaultData ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DeviceFaultInfoEXT const & deviceFaultInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, deviceFaultInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, deviceFaultInfoEXT.pNext ); for ( size_t i = 0; i < VK_MAX_DESCRIPTION_SIZE; ++i ) { VULKAN_HPP_HASH_COMBINE( seed, deviceFaultInfoEXT.description[i] ); } VULKAN_HPP_HASH_COMBINE( seed, deviceFaultInfoEXT.pAddressInfos ); VULKAN_HPP_HASH_COMBINE( seed, deviceFaultInfoEXT.pVendorInfos ); VULKAN_HPP_HASH_COMBINE( seed, deviceFaultInfoEXT.pVendorBinaryData ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DeviceFaultVendorBinaryHeaderVersionOneEXT const & deviceFaultVendorBinaryHeaderVersionOneEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, deviceFaultVendorBinaryHeaderVersionOneEXT.headerSize ); VULKAN_HPP_HASH_COMBINE( seed, deviceFaultVendorBinaryHeaderVersionOneEXT.headerVersion ); VULKAN_HPP_HASH_COMBINE( seed, deviceFaultVendorBinaryHeaderVersionOneEXT.vendorID ); VULKAN_HPP_HASH_COMBINE( seed, deviceFaultVendorBinaryHeaderVersionOneEXT.deviceID ); VULKAN_HPP_HASH_COMBINE( seed, deviceFaultVendorBinaryHeaderVersionOneEXT.driverVersion ); for ( size_t i = 0; i < VK_UUID_SIZE; ++i ) { VULKAN_HPP_HASH_COMBINE( seed, deviceFaultVendorBinaryHeaderVersionOneEXT.pipelineCacheUUID[i] ); } VULKAN_HPP_HASH_COMBINE( seed, deviceFaultVendorBinaryHeaderVersionOneEXT.applicationNameOffset ); VULKAN_HPP_HASH_COMBINE( seed, deviceFaultVendorBinaryHeaderVersionOneEXT.applicationVersion ); VULKAN_HPP_HASH_COMBINE( seed, deviceFaultVendorBinaryHeaderVersionOneEXT.engineNameOffset ); VULKAN_HPP_HASH_COMBINE( seed, deviceFaultVendorBinaryHeaderVersionOneEXT.engineVersion ); VULKAN_HPP_HASH_COMBINE( seed, deviceFaultVendorBinaryHeaderVersionOneEXT.apiVersion ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DeviceGroupBindSparseInfo const & deviceGroupBindSparseInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, deviceGroupBindSparseInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, deviceGroupBindSparseInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, deviceGroupBindSparseInfo.resourceDeviceIndex ); VULKAN_HPP_HASH_COMBINE( seed, deviceGroupBindSparseInfo.memoryDeviceIndex ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DeviceGroupCommandBufferBeginInfo const & deviceGroupCommandBufferBeginInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, deviceGroupCommandBufferBeginInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, deviceGroupCommandBufferBeginInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, deviceGroupCommandBufferBeginInfo.deviceMask ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DeviceGroupDeviceCreateInfo const & deviceGroupDeviceCreateInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, deviceGroupDeviceCreateInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, deviceGroupDeviceCreateInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, deviceGroupDeviceCreateInfo.physicalDeviceCount ); VULKAN_HPP_HASH_COMBINE( seed, deviceGroupDeviceCreateInfo.pPhysicalDevices ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DeviceGroupPresentCapabilitiesKHR const & deviceGroupPresentCapabilitiesKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, deviceGroupPresentCapabilitiesKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, deviceGroupPresentCapabilitiesKHR.pNext ); for ( size_t i = 0; i < VK_MAX_DEVICE_GROUP_SIZE; ++i ) { VULKAN_HPP_HASH_COMBINE( seed, deviceGroupPresentCapabilitiesKHR.presentMask[i] ); } VULKAN_HPP_HASH_COMBINE( seed, deviceGroupPresentCapabilitiesKHR.modes ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DeviceGroupPresentInfoKHR const & deviceGroupPresentInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, deviceGroupPresentInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, deviceGroupPresentInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, deviceGroupPresentInfoKHR.swapchainCount ); VULKAN_HPP_HASH_COMBINE( seed, deviceGroupPresentInfoKHR.pDeviceMasks ); VULKAN_HPP_HASH_COMBINE( seed, deviceGroupPresentInfoKHR.mode ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DeviceGroupRenderPassBeginInfo const & deviceGroupRenderPassBeginInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, deviceGroupRenderPassBeginInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, deviceGroupRenderPassBeginInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, deviceGroupRenderPassBeginInfo.deviceMask ); VULKAN_HPP_HASH_COMBINE( seed, deviceGroupRenderPassBeginInfo.deviceRenderAreaCount ); VULKAN_HPP_HASH_COMBINE( seed, deviceGroupRenderPassBeginInfo.pDeviceRenderAreas ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DeviceGroupSubmitInfo const & deviceGroupSubmitInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, deviceGroupSubmitInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, deviceGroupSubmitInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, deviceGroupSubmitInfo.waitSemaphoreCount ); VULKAN_HPP_HASH_COMBINE( seed, deviceGroupSubmitInfo.pWaitSemaphoreDeviceIndices ); VULKAN_HPP_HASH_COMBINE( seed, deviceGroupSubmitInfo.commandBufferCount ); VULKAN_HPP_HASH_COMBINE( seed, deviceGroupSubmitInfo.pCommandBufferDeviceMasks ); VULKAN_HPP_HASH_COMBINE( seed, deviceGroupSubmitInfo.signalSemaphoreCount ); VULKAN_HPP_HASH_COMBINE( seed, deviceGroupSubmitInfo.pSignalSemaphoreDeviceIndices ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DeviceGroupSwapchainCreateInfoKHR const & deviceGroupSwapchainCreateInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, deviceGroupSwapchainCreateInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, deviceGroupSwapchainCreateInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, deviceGroupSwapchainCreateInfoKHR.modes ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ImageCreateInfo const & imageCreateInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, imageCreateInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, imageCreateInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, imageCreateInfo.flags ); VULKAN_HPP_HASH_COMBINE( seed, imageCreateInfo.imageType ); VULKAN_HPP_HASH_COMBINE( seed, imageCreateInfo.format ); VULKAN_HPP_HASH_COMBINE( seed, imageCreateInfo.extent ); VULKAN_HPP_HASH_COMBINE( seed, imageCreateInfo.mipLevels ); VULKAN_HPP_HASH_COMBINE( seed, imageCreateInfo.arrayLayers ); VULKAN_HPP_HASH_COMBINE( seed, imageCreateInfo.samples ); VULKAN_HPP_HASH_COMBINE( seed, imageCreateInfo.tiling ); VULKAN_HPP_HASH_COMBINE( seed, imageCreateInfo.usage ); VULKAN_HPP_HASH_COMBINE( seed, imageCreateInfo.sharingMode ); VULKAN_HPP_HASH_COMBINE( seed, imageCreateInfo.queueFamilyIndexCount ); VULKAN_HPP_HASH_COMBINE( seed, imageCreateInfo.pQueueFamilyIndices ); VULKAN_HPP_HASH_COMBINE( seed, imageCreateInfo.initialLayout ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DeviceImageMemoryRequirements const & deviceImageMemoryRequirements ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, deviceImageMemoryRequirements.sType ); VULKAN_HPP_HASH_COMBINE( seed, deviceImageMemoryRequirements.pNext ); VULKAN_HPP_HASH_COMBINE( seed, deviceImageMemoryRequirements.pCreateInfo ); VULKAN_HPP_HASH_COMBINE( seed, deviceImageMemoryRequirements.planeAspect ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ImageSubresource2 const & imageSubresource2 ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, imageSubresource2.sType ); VULKAN_HPP_HASH_COMBINE( seed, imageSubresource2.pNext ); VULKAN_HPP_HASH_COMBINE( seed, imageSubresource2.imageSubresource ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DeviceImageSubresourceInfo const & deviceImageSubresourceInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, deviceImageSubresourceInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, deviceImageSubresourceInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, deviceImageSubresourceInfo.pCreateInfo ); VULKAN_HPP_HASH_COMBINE( seed, deviceImageSubresourceInfo.pSubresource ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DeviceMemoryOpaqueCaptureAddressInfo const & deviceMemoryOpaqueCaptureAddressInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, deviceMemoryOpaqueCaptureAddressInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, deviceMemoryOpaqueCaptureAddressInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, deviceMemoryOpaqueCaptureAddressInfo.memory ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DeviceMemoryOverallocationCreateInfoAMD const & deviceMemoryOverallocationCreateInfoAMD ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, deviceMemoryOverallocationCreateInfoAMD.sType ); VULKAN_HPP_HASH_COMBINE( seed, deviceMemoryOverallocationCreateInfoAMD.pNext ); VULKAN_HPP_HASH_COMBINE( seed, deviceMemoryOverallocationCreateInfoAMD.overallocationBehavior ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DeviceMemoryReportCallbackDataEXT const & deviceMemoryReportCallbackDataEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, deviceMemoryReportCallbackDataEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, deviceMemoryReportCallbackDataEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, deviceMemoryReportCallbackDataEXT.flags ); VULKAN_HPP_HASH_COMBINE( seed, deviceMemoryReportCallbackDataEXT.type ); VULKAN_HPP_HASH_COMBINE( seed, deviceMemoryReportCallbackDataEXT.memoryObjectId ); VULKAN_HPP_HASH_COMBINE( seed, deviceMemoryReportCallbackDataEXT.size ); VULKAN_HPP_HASH_COMBINE( seed, deviceMemoryReportCallbackDataEXT.objectType ); VULKAN_HPP_HASH_COMBINE( seed, deviceMemoryReportCallbackDataEXT.objectHandle ); VULKAN_HPP_HASH_COMBINE( seed, deviceMemoryReportCallbackDataEXT.heapIndex ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DevicePipelineBinaryInternalCacheControlKHR const & devicePipelineBinaryInternalCacheControlKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, devicePipelineBinaryInternalCacheControlKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, devicePipelineBinaryInternalCacheControlKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, devicePipelineBinaryInternalCacheControlKHR.disableInternalCache ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DevicePrivateDataCreateInfo const & devicePrivateDataCreateInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, devicePrivateDataCreateInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, devicePrivateDataCreateInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, devicePrivateDataCreateInfo.privateDataSlotRequestCount ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DeviceQueueGlobalPriorityCreateInfo const & deviceQueueGlobalPriorityCreateInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, deviceQueueGlobalPriorityCreateInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, deviceQueueGlobalPriorityCreateInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, deviceQueueGlobalPriorityCreateInfo.globalPriority ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DeviceQueueInfo2 const & deviceQueueInfo2 ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, deviceQueueInfo2.sType ); VULKAN_HPP_HASH_COMBINE( seed, deviceQueueInfo2.pNext ); VULKAN_HPP_HASH_COMBINE( seed, deviceQueueInfo2.flags ); VULKAN_HPP_HASH_COMBINE( seed, deviceQueueInfo2.queueFamilyIndex ); VULKAN_HPP_HASH_COMBINE( seed, deviceQueueInfo2.queueIndex ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DeviceQueueShaderCoreControlCreateInfoARM const & deviceQueueShaderCoreControlCreateInfoARM ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, deviceQueueShaderCoreControlCreateInfoARM.sType ); VULKAN_HPP_HASH_COMBINE( seed, deviceQueueShaderCoreControlCreateInfoARM.pNext ); VULKAN_HPP_HASH_COMBINE( seed, deviceQueueShaderCoreControlCreateInfoARM.shaderCoreCount ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DirectDriverLoadingInfoLUNARG const & directDriverLoadingInfoLUNARG ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, directDriverLoadingInfoLUNARG.sType ); VULKAN_HPP_HASH_COMBINE( seed, directDriverLoadingInfoLUNARG.pNext ); VULKAN_HPP_HASH_COMBINE( seed, directDriverLoadingInfoLUNARG.flags ); VULKAN_HPP_HASH_COMBINE( seed, directDriverLoadingInfoLUNARG.pfnGetInstanceProcAddr ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DirectDriverLoadingListLUNARG const & directDriverLoadingListLUNARG ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, directDriverLoadingListLUNARG.sType ); VULKAN_HPP_HASH_COMBINE( seed, directDriverLoadingListLUNARG.pNext ); VULKAN_HPP_HASH_COMBINE( seed, directDriverLoadingListLUNARG.mode ); VULKAN_HPP_HASH_COMBINE( seed, directDriverLoadingListLUNARG.driverCount ); VULKAN_HPP_HASH_COMBINE( seed, directDriverLoadingListLUNARG.pDrivers ); return seed; } }; # if defined( VK_USE_PLATFORM_DIRECTFB_EXT ) template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DirectFBSurfaceCreateInfoEXT const & directFBSurfaceCreateInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, directFBSurfaceCreateInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, directFBSurfaceCreateInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, directFBSurfaceCreateInfoEXT.flags ); VULKAN_HPP_HASH_COMBINE( seed, directFBSurfaceCreateInfoEXT.dfb ); VULKAN_HPP_HASH_COMBINE( seed, directFBSurfaceCreateInfoEXT.surface ); return seed; } }; # endif /*VK_USE_PLATFORM_DIRECTFB_EXT*/ template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DispatchIndirectCommand const & dispatchIndirectCommand ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, dispatchIndirectCommand.x ); VULKAN_HPP_HASH_COMBINE( seed, dispatchIndirectCommand.y ); VULKAN_HPP_HASH_COMBINE( seed, dispatchIndirectCommand.z ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DisplayEventInfoEXT const & displayEventInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, displayEventInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, displayEventInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, displayEventInfoEXT.displayEvent ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DisplayModeParametersKHR const & displayModeParametersKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, displayModeParametersKHR.visibleRegion ); VULKAN_HPP_HASH_COMBINE( seed, displayModeParametersKHR.refreshRate ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DisplayModeCreateInfoKHR const & displayModeCreateInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, displayModeCreateInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, displayModeCreateInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, displayModeCreateInfoKHR.flags ); VULKAN_HPP_HASH_COMBINE( seed, displayModeCreateInfoKHR.parameters ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DisplayModePropertiesKHR const & displayModePropertiesKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, displayModePropertiesKHR.displayMode ); VULKAN_HPP_HASH_COMBINE( seed, displayModePropertiesKHR.parameters ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DisplayModeProperties2KHR const & displayModeProperties2KHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, displayModeProperties2KHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, displayModeProperties2KHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, displayModeProperties2KHR.displayModeProperties ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DisplayModeStereoPropertiesNV const & displayModeStereoPropertiesNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, displayModeStereoPropertiesNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, displayModeStereoPropertiesNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, displayModeStereoPropertiesNV.hdmi3DSupported ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DisplayNativeHdrSurfaceCapabilitiesAMD const & displayNativeHdrSurfaceCapabilitiesAMD ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, displayNativeHdrSurfaceCapabilitiesAMD.sType ); VULKAN_HPP_HASH_COMBINE( seed, displayNativeHdrSurfaceCapabilitiesAMD.pNext ); VULKAN_HPP_HASH_COMBINE( seed, displayNativeHdrSurfaceCapabilitiesAMD.localDimmingSupport ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DisplayPlaneCapabilitiesKHR const & displayPlaneCapabilitiesKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, displayPlaneCapabilitiesKHR.supportedAlpha ); VULKAN_HPP_HASH_COMBINE( seed, displayPlaneCapabilitiesKHR.minSrcPosition ); VULKAN_HPP_HASH_COMBINE( seed, displayPlaneCapabilitiesKHR.maxSrcPosition ); VULKAN_HPP_HASH_COMBINE( seed, displayPlaneCapabilitiesKHR.minSrcExtent ); VULKAN_HPP_HASH_COMBINE( seed, displayPlaneCapabilitiesKHR.maxSrcExtent ); VULKAN_HPP_HASH_COMBINE( seed, displayPlaneCapabilitiesKHR.minDstPosition ); VULKAN_HPP_HASH_COMBINE( seed, displayPlaneCapabilitiesKHR.maxDstPosition ); VULKAN_HPP_HASH_COMBINE( seed, displayPlaneCapabilitiesKHR.minDstExtent ); VULKAN_HPP_HASH_COMBINE( seed, displayPlaneCapabilitiesKHR.maxDstExtent ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DisplayPlaneCapabilities2KHR const & displayPlaneCapabilities2KHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, displayPlaneCapabilities2KHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, displayPlaneCapabilities2KHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, displayPlaneCapabilities2KHR.capabilities ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DisplayPlaneInfo2KHR const & displayPlaneInfo2KHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, displayPlaneInfo2KHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, displayPlaneInfo2KHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, displayPlaneInfo2KHR.mode ); VULKAN_HPP_HASH_COMBINE( seed, displayPlaneInfo2KHR.planeIndex ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DisplayPlanePropertiesKHR const & displayPlanePropertiesKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, displayPlanePropertiesKHR.currentDisplay ); VULKAN_HPP_HASH_COMBINE( seed, displayPlanePropertiesKHR.currentStackIndex ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DisplayPlaneProperties2KHR const & displayPlaneProperties2KHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, displayPlaneProperties2KHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, displayPlaneProperties2KHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, displayPlaneProperties2KHR.displayPlaneProperties ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DisplayPowerInfoEXT const & displayPowerInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, displayPowerInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, displayPowerInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, displayPowerInfoEXT.powerState ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DisplayPresentInfoKHR const & displayPresentInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, displayPresentInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, displayPresentInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, displayPresentInfoKHR.srcRect ); VULKAN_HPP_HASH_COMBINE( seed, displayPresentInfoKHR.dstRect ); VULKAN_HPP_HASH_COMBINE( seed, displayPresentInfoKHR.persistent ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DisplayPropertiesKHR const & displayPropertiesKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, displayPropertiesKHR.display ); for ( const char * p = displayPropertiesKHR.displayName; *p != '\0'; ++p ) { VULKAN_HPP_HASH_COMBINE( seed, *p ); } VULKAN_HPP_HASH_COMBINE( seed, displayPropertiesKHR.physicalDimensions ); VULKAN_HPP_HASH_COMBINE( seed, displayPropertiesKHR.physicalResolution ); VULKAN_HPP_HASH_COMBINE( seed, displayPropertiesKHR.supportedTransforms ); VULKAN_HPP_HASH_COMBINE( seed, displayPropertiesKHR.planeReorderPossible ); VULKAN_HPP_HASH_COMBINE( seed, displayPropertiesKHR.persistentContent ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DisplayProperties2KHR const & displayProperties2KHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, displayProperties2KHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, displayProperties2KHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, displayProperties2KHR.displayProperties ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DisplaySurfaceCreateInfoKHR const & displaySurfaceCreateInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, displaySurfaceCreateInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, displaySurfaceCreateInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, displaySurfaceCreateInfoKHR.flags ); VULKAN_HPP_HASH_COMBINE( seed, displaySurfaceCreateInfoKHR.displayMode ); VULKAN_HPP_HASH_COMBINE( seed, displaySurfaceCreateInfoKHR.planeIndex ); VULKAN_HPP_HASH_COMBINE( seed, displaySurfaceCreateInfoKHR.planeStackIndex ); VULKAN_HPP_HASH_COMBINE( seed, displaySurfaceCreateInfoKHR.transform ); VULKAN_HPP_HASH_COMBINE( seed, displaySurfaceCreateInfoKHR.globalAlpha ); VULKAN_HPP_HASH_COMBINE( seed, displaySurfaceCreateInfoKHR.alphaMode ); VULKAN_HPP_HASH_COMBINE( seed, displaySurfaceCreateInfoKHR.imageExtent ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DisplaySurfaceStereoCreateInfoNV const & displaySurfaceStereoCreateInfoNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, displaySurfaceStereoCreateInfoNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, displaySurfaceStereoCreateInfoNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, displaySurfaceStereoCreateInfoNV.stereoType ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DrawIndexedIndirectCommand const & drawIndexedIndirectCommand ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, drawIndexedIndirectCommand.indexCount ); VULKAN_HPP_HASH_COMBINE( seed, drawIndexedIndirectCommand.instanceCount ); VULKAN_HPP_HASH_COMBINE( seed, drawIndexedIndirectCommand.firstIndex ); VULKAN_HPP_HASH_COMBINE( seed, drawIndexedIndirectCommand.vertexOffset ); VULKAN_HPP_HASH_COMBINE( seed, drawIndexedIndirectCommand.firstInstance ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DrawIndirectCommand const & drawIndirectCommand ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, drawIndirectCommand.vertexCount ); VULKAN_HPP_HASH_COMBINE( seed, drawIndirectCommand.instanceCount ); VULKAN_HPP_HASH_COMBINE( seed, drawIndirectCommand.firstVertex ); VULKAN_HPP_HASH_COMBINE( seed, drawIndirectCommand.firstInstance ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DrawIndirectCountIndirectCommandEXT const & drawIndirectCountIndirectCommandEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, drawIndirectCountIndirectCommandEXT.bufferAddress ); VULKAN_HPP_HASH_COMBINE( seed, drawIndirectCountIndirectCommandEXT.stride ); VULKAN_HPP_HASH_COMBINE( seed, drawIndirectCountIndirectCommandEXT.commandCount ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DrawMeshTasksIndirectCommandEXT const & drawMeshTasksIndirectCommandEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, drawMeshTasksIndirectCommandEXT.groupCountX ); VULKAN_HPP_HASH_COMBINE( seed, drawMeshTasksIndirectCommandEXT.groupCountY ); VULKAN_HPP_HASH_COMBINE( seed, drawMeshTasksIndirectCommandEXT.groupCountZ ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DrawMeshTasksIndirectCommandNV const & drawMeshTasksIndirectCommandNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, drawMeshTasksIndirectCommandNV.taskCount ); VULKAN_HPP_HASH_COMBINE( seed, drawMeshTasksIndirectCommandNV.firstTask ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DrmFormatModifierProperties2EXT const & drmFormatModifierProperties2EXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, drmFormatModifierProperties2EXT.drmFormatModifier ); VULKAN_HPP_HASH_COMBINE( seed, drmFormatModifierProperties2EXT.drmFormatModifierPlaneCount ); VULKAN_HPP_HASH_COMBINE( seed, drmFormatModifierProperties2EXT.drmFormatModifierTilingFeatures ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DrmFormatModifierPropertiesEXT const & drmFormatModifierPropertiesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, drmFormatModifierPropertiesEXT.drmFormatModifier ); VULKAN_HPP_HASH_COMBINE( seed, drmFormatModifierPropertiesEXT.drmFormatModifierPlaneCount ); VULKAN_HPP_HASH_COMBINE( seed, drmFormatModifierPropertiesEXT.drmFormatModifierTilingFeatures ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DrmFormatModifierPropertiesList2EXT const & drmFormatModifierPropertiesList2EXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, drmFormatModifierPropertiesList2EXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, drmFormatModifierPropertiesList2EXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, drmFormatModifierPropertiesList2EXT.drmFormatModifierCount ); VULKAN_HPP_HASH_COMBINE( seed, drmFormatModifierPropertiesList2EXT.pDrmFormatModifierProperties ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::DrmFormatModifierPropertiesListEXT const & drmFormatModifierPropertiesListEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, drmFormatModifierPropertiesListEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, drmFormatModifierPropertiesListEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, drmFormatModifierPropertiesListEXT.drmFormatModifierCount ); VULKAN_HPP_HASH_COMBINE( seed, drmFormatModifierPropertiesListEXT.pDrmFormatModifierProperties ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::EventCreateInfo const & eventCreateInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, eventCreateInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, eventCreateInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, eventCreateInfo.flags ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineLibraryCreateInfoKHR const & pipelineLibraryCreateInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, pipelineLibraryCreateInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, pipelineLibraryCreateInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, pipelineLibraryCreateInfoKHR.libraryCount ); VULKAN_HPP_HASH_COMBINE( seed, pipelineLibraryCreateInfoKHR.pLibraries ); return seed; } }; # if defined( VK_ENABLE_BETA_EXTENSIONS ) template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ExecutionGraphPipelineCreateInfoAMDX const & executionGraphPipelineCreateInfoAMDX ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, executionGraphPipelineCreateInfoAMDX.sType ); VULKAN_HPP_HASH_COMBINE( seed, executionGraphPipelineCreateInfoAMDX.pNext ); VULKAN_HPP_HASH_COMBINE( seed, executionGraphPipelineCreateInfoAMDX.flags ); VULKAN_HPP_HASH_COMBINE( seed, executionGraphPipelineCreateInfoAMDX.stageCount ); VULKAN_HPP_HASH_COMBINE( seed, executionGraphPipelineCreateInfoAMDX.pStages ); VULKAN_HPP_HASH_COMBINE( seed, executionGraphPipelineCreateInfoAMDX.pLibraryInfo ); VULKAN_HPP_HASH_COMBINE( seed, executionGraphPipelineCreateInfoAMDX.layout ); VULKAN_HPP_HASH_COMBINE( seed, executionGraphPipelineCreateInfoAMDX.basePipelineHandle ); VULKAN_HPP_HASH_COMBINE( seed, executionGraphPipelineCreateInfoAMDX.basePipelineIndex ); return seed; } }; # endif /*VK_ENABLE_BETA_EXTENSIONS*/ # if defined( VK_ENABLE_BETA_EXTENSIONS ) template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ExecutionGraphPipelineScratchSizeAMDX const & executionGraphPipelineScratchSizeAMDX ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, executionGraphPipelineScratchSizeAMDX.sType ); VULKAN_HPP_HASH_COMBINE( seed, executionGraphPipelineScratchSizeAMDX.pNext ); VULKAN_HPP_HASH_COMBINE( seed, executionGraphPipelineScratchSizeAMDX.minSize ); VULKAN_HPP_HASH_COMBINE( seed, executionGraphPipelineScratchSizeAMDX.maxSize ); VULKAN_HPP_HASH_COMBINE( seed, executionGraphPipelineScratchSizeAMDX.sizeGranularity ); return seed; } }; # endif /*VK_ENABLE_BETA_EXTENSIONS*/ template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ExportFenceCreateInfo const & exportFenceCreateInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, exportFenceCreateInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, exportFenceCreateInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, exportFenceCreateInfo.handleTypes ); return seed; } }; # if defined( VK_USE_PLATFORM_WIN32_KHR ) template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ExportFenceWin32HandleInfoKHR const & exportFenceWin32HandleInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, exportFenceWin32HandleInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, exportFenceWin32HandleInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, exportFenceWin32HandleInfoKHR.pAttributes ); VULKAN_HPP_HASH_COMBINE( seed, exportFenceWin32HandleInfoKHR.dwAccess ); VULKAN_HPP_HASH_COMBINE( seed, exportFenceWin32HandleInfoKHR.name ); return seed; } }; # endif /*VK_USE_PLATFORM_WIN32_KHR*/ template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ExportMemoryAllocateInfo const & exportMemoryAllocateInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, exportMemoryAllocateInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, exportMemoryAllocateInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, exportMemoryAllocateInfo.handleTypes ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ExportMemoryAllocateInfoNV const & exportMemoryAllocateInfoNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, exportMemoryAllocateInfoNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, exportMemoryAllocateInfoNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, exportMemoryAllocateInfoNV.handleTypes ); return seed; } }; # if defined( VK_USE_PLATFORM_WIN32_KHR ) template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ExportMemoryWin32HandleInfoKHR const & exportMemoryWin32HandleInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, exportMemoryWin32HandleInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, exportMemoryWin32HandleInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, exportMemoryWin32HandleInfoKHR.pAttributes ); VULKAN_HPP_HASH_COMBINE( seed, exportMemoryWin32HandleInfoKHR.dwAccess ); VULKAN_HPP_HASH_COMBINE( seed, exportMemoryWin32HandleInfoKHR.name ); return seed; } }; # endif /*VK_USE_PLATFORM_WIN32_KHR*/ # if defined( VK_USE_PLATFORM_WIN32_KHR ) template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ExportMemoryWin32HandleInfoNV const & exportMemoryWin32HandleInfoNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, exportMemoryWin32HandleInfoNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, exportMemoryWin32HandleInfoNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, exportMemoryWin32HandleInfoNV.pAttributes ); VULKAN_HPP_HASH_COMBINE( seed, exportMemoryWin32HandleInfoNV.dwAccess ); return seed; } }; # endif /*VK_USE_PLATFORM_WIN32_KHR*/ # if defined( VK_USE_PLATFORM_METAL_EXT ) template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ExportMetalBufferInfoEXT const & exportMetalBufferInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, exportMetalBufferInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, exportMetalBufferInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, exportMetalBufferInfoEXT.memory ); VULKAN_HPP_HASH_COMBINE( seed, exportMetalBufferInfoEXT.mtlBuffer ); return seed; } }; # endif /*VK_USE_PLATFORM_METAL_EXT*/ # if defined( VK_USE_PLATFORM_METAL_EXT ) template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ExportMetalCommandQueueInfoEXT const & exportMetalCommandQueueInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, exportMetalCommandQueueInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, exportMetalCommandQueueInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, exportMetalCommandQueueInfoEXT.queue ); VULKAN_HPP_HASH_COMBINE( seed, exportMetalCommandQueueInfoEXT.mtlCommandQueue ); return seed; } }; # endif /*VK_USE_PLATFORM_METAL_EXT*/ # if defined( VK_USE_PLATFORM_METAL_EXT ) template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ExportMetalDeviceInfoEXT const & exportMetalDeviceInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, exportMetalDeviceInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, exportMetalDeviceInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, exportMetalDeviceInfoEXT.mtlDevice ); return seed; } }; # endif /*VK_USE_PLATFORM_METAL_EXT*/ # if defined( VK_USE_PLATFORM_METAL_EXT ) template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ExportMetalIOSurfaceInfoEXT const & exportMetalIOSurfaceInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, exportMetalIOSurfaceInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, exportMetalIOSurfaceInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, exportMetalIOSurfaceInfoEXT.image ); VULKAN_HPP_HASH_COMBINE( seed, exportMetalIOSurfaceInfoEXT.ioSurface ); return seed; } }; # endif /*VK_USE_PLATFORM_METAL_EXT*/ # if defined( VK_USE_PLATFORM_METAL_EXT ) template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ExportMetalObjectCreateInfoEXT const & exportMetalObjectCreateInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, exportMetalObjectCreateInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, exportMetalObjectCreateInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, exportMetalObjectCreateInfoEXT.exportObjectType ); return seed; } }; # endif /*VK_USE_PLATFORM_METAL_EXT*/ # if defined( VK_USE_PLATFORM_METAL_EXT ) template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ExportMetalObjectsInfoEXT const & exportMetalObjectsInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, exportMetalObjectsInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, exportMetalObjectsInfoEXT.pNext ); return seed; } }; # endif /*VK_USE_PLATFORM_METAL_EXT*/ # if defined( VK_USE_PLATFORM_METAL_EXT ) template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ExportMetalSharedEventInfoEXT const & exportMetalSharedEventInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, exportMetalSharedEventInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, exportMetalSharedEventInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, exportMetalSharedEventInfoEXT.semaphore ); VULKAN_HPP_HASH_COMBINE( seed, exportMetalSharedEventInfoEXT.event ); VULKAN_HPP_HASH_COMBINE( seed, exportMetalSharedEventInfoEXT.mtlSharedEvent ); return seed; } }; # endif /*VK_USE_PLATFORM_METAL_EXT*/ # if defined( VK_USE_PLATFORM_METAL_EXT ) template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ExportMetalTextureInfoEXT const & exportMetalTextureInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, exportMetalTextureInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, exportMetalTextureInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, exportMetalTextureInfoEXT.image ); VULKAN_HPP_HASH_COMBINE( seed, exportMetalTextureInfoEXT.imageView ); VULKAN_HPP_HASH_COMBINE( seed, exportMetalTextureInfoEXT.bufferView ); VULKAN_HPP_HASH_COMBINE( seed, exportMetalTextureInfoEXT.plane ); VULKAN_HPP_HASH_COMBINE( seed, exportMetalTextureInfoEXT.mtlTexture ); return seed; } }; # endif /*VK_USE_PLATFORM_METAL_EXT*/ template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ExportSemaphoreCreateInfo const & exportSemaphoreCreateInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, exportSemaphoreCreateInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, exportSemaphoreCreateInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, exportSemaphoreCreateInfo.handleTypes ); return seed; } }; # if defined( VK_USE_PLATFORM_WIN32_KHR ) template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ExportSemaphoreWin32HandleInfoKHR const & exportSemaphoreWin32HandleInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, exportSemaphoreWin32HandleInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, exportSemaphoreWin32HandleInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, exportSemaphoreWin32HandleInfoKHR.pAttributes ); VULKAN_HPP_HASH_COMBINE( seed, exportSemaphoreWin32HandleInfoKHR.dwAccess ); VULKAN_HPP_HASH_COMBINE( seed, exportSemaphoreWin32HandleInfoKHR.name ); return seed; } }; # endif /*VK_USE_PLATFORM_WIN32_KHR*/ template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ExtensionProperties const & extensionProperties ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; for ( size_t i = 0; i < VK_MAX_EXTENSION_NAME_SIZE; ++i ) { VULKAN_HPP_HASH_COMBINE( seed, extensionProperties.extensionName[i] ); } VULKAN_HPP_HASH_COMBINE( seed, extensionProperties.specVersion ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ExternalMemoryProperties const & externalMemoryProperties ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, externalMemoryProperties.externalMemoryFeatures ); VULKAN_HPP_HASH_COMBINE( seed, externalMemoryProperties.exportFromImportedHandleTypes ); VULKAN_HPP_HASH_COMBINE( seed, externalMemoryProperties.compatibleHandleTypes ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ExternalBufferProperties const & externalBufferProperties ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, externalBufferProperties.sType ); VULKAN_HPP_HASH_COMBINE( seed, externalBufferProperties.pNext ); VULKAN_HPP_HASH_COMBINE( seed, externalBufferProperties.externalMemoryProperties ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ExternalFenceProperties const & externalFenceProperties ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, externalFenceProperties.sType ); VULKAN_HPP_HASH_COMBINE( seed, externalFenceProperties.pNext ); VULKAN_HPP_HASH_COMBINE( seed, externalFenceProperties.exportFromImportedHandleTypes ); VULKAN_HPP_HASH_COMBINE( seed, externalFenceProperties.compatibleHandleTypes ); VULKAN_HPP_HASH_COMBINE( seed, externalFenceProperties.externalFenceFeatures ); return seed; } }; # if defined( VK_USE_PLATFORM_ANDROID_KHR ) template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ExternalFormatANDROID const & externalFormatANDROID ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, externalFormatANDROID.sType ); VULKAN_HPP_HASH_COMBINE( seed, externalFormatANDROID.pNext ); VULKAN_HPP_HASH_COMBINE( seed, externalFormatANDROID.externalFormat ); return seed; } }; # endif /*VK_USE_PLATFORM_ANDROID_KHR*/ # if defined( VK_USE_PLATFORM_SCREEN_QNX ) template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ExternalFormatQNX const & externalFormatQNX ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, externalFormatQNX.sType ); VULKAN_HPP_HASH_COMBINE( seed, externalFormatQNX.pNext ); VULKAN_HPP_HASH_COMBINE( seed, externalFormatQNX.externalFormat ); return seed; } }; # endif /*VK_USE_PLATFORM_SCREEN_QNX*/ template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ExternalImageFormatProperties const & externalImageFormatProperties ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, externalImageFormatProperties.sType ); VULKAN_HPP_HASH_COMBINE( seed, externalImageFormatProperties.pNext ); VULKAN_HPP_HASH_COMBINE( seed, externalImageFormatProperties.externalMemoryProperties ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ImageFormatProperties const & imageFormatProperties ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, imageFormatProperties.maxExtent ); VULKAN_HPP_HASH_COMBINE( seed, imageFormatProperties.maxMipLevels ); VULKAN_HPP_HASH_COMBINE( seed, imageFormatProperties.maxArrayLayers ); VULKAN_HPP_HASH_COMBINE( seed, imageFormatProperties.sampleCounts ); VULKAN_HPP_HASH_COMBINE( seed, imageFormatProperties.maxResourceSize ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ExternalImageFormatPropertiesNV const & externalImageFormatPropertiesNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, externalImageFormatPropertiesNV.imageFormatProperties ); VULKAN_HPP_HASH_COMBINE( seed, externalImageFormatPropertiesNV.externalMemoryFeatures ); VULKAN_HPP_HASH_COMBINE( seed, externalImageFormatPropertiesNV.exportFromImportedHandleTypes ); VULKAN_HPP_HASH_COMBINE( seed, externalImageFormatPropertiesNV.compatibleHandleTypes ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ExternalMemoryAcquireUnmodifiedEXT const & externalMemoryAcquireUnmodifiedEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, externalMemoryAcquireUnmodifiedEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, externalMemoryAcquireUnmodifiedEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, externalMemoryAcquireUnmodifiedEXT.acquireUnmodifiedMemory ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ExternalMemoryBufferCreateInfo const & externalMemoryBufferCreateInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, externalMemoryBufferCreateInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, externalMemoryBufferCreateInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, externalMemoryBufferCreateInfo.handleTypes ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ExternalMemoryImageCreateInfo const & externalMemoryImageCreateInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, externalMemoryImageCreateInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, externalMemoryImageCreateInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, externalMemoryImageCreateInfo.handleTypes ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ExternalMemoryImageCreateInfoNV const & externalMemoryImageCreateInfoNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, externalMemoryImageCreateInfoNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, externalMemoryImageCreateInfoNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, externalMemoryImageCreateInfoNV.handleTypes ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ExternalSemaphoreProperties const & externalSemaphoreProperties ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, externalSemaphoreProperties.sType ); VULKAN_HPP_HASH_COMBINE( seed, externalSemaphoreProperties.pNext ); VULKAN_HPP_HASH_COMBINE( seed, externalSemaphoreProperties.exportFromImportedHandleTypes ); VULKAN_HPP_HASH_COMBINE( seed, externalSemaphoreProperties.compatibleHandleTypes ); VULKAN_HPP_HASH_COMBINE( seed, externalSemaphoreProperties.externalSemaphoreFeatures ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::FenceCreateInfo const & fenceCreateInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, fenceCreateInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, fenceCreateInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, fenceCreateInfo.flags ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::FenceGetFdInfoKHR const & fenceGetFdInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, fenceGetFdInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, fenceGetFdInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, fenceGetFdInfoKHR.fence ); VULKAN_HPP_HASH_COMBINE( seed, fenceGetFdInfoKHR.handleType ); return seed; } }; # if defined( VK_USE_PLATFORM_WIN32_KHR ) template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::FenceGetWin32HandleInfoKHR const & fenceGetWin32HandleInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, fenceGetWin32HandleInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, fenceGetWin32HandleInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, fenceGetWin32HandleInfoKHR.fence ); VULKAN_HPP_HASH_COMBINE( seed, fenceGetWin32HandleInfoKHR.handleType ); return seed; } }; # endif /*VK_USE_PLATFORM_WIN32_KHR*/ template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::FilterCubicImageViewImageFormatPropertiesEXT const & filterCubicImageViewImageFormatPropertiesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, filterCubicImageViewImageFormatPropertiesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, filterCubicImageViewImageFormatPropertiesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, filterCubicImageViewImageFormatPropertiesEXT.filterCubic ); VULKAN_HPP_HASH_COMBINE( seed, filterCubicImageViewImageFormatPropertiesEXT.filterCubicMinmax ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::FormatProperties const & formatProperties ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, formatProperties.linearTilingFeatures ); VULKAN_HPP_HASH_COMBINE( seed, formatProperties.optimalTilingFeatures ); VULKAN_HPP_HASH_COMBINE( seed, formatProperties.bufferFeatures ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::FormatProperties2 const & formatProperties2 ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, formatProperties2.sType ); VULKAN_HPP_HASH_COMBINE( seed, formatProperties2.pNext ); VULKAN_HPP_HASH_COMBINE( seed, formatProperties2.formatProperties ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::FormatProperties3 const & formatProperties3 ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, formatProperties3.sType ); VULKAN_HPP_HASH_COMBINE( seed, formatProperties3.pNext ); VULKAN_HPP_HASH_COMBINE( seed, formatProperties3.linearTilingFeatures ); VULKAN_HPP_HASH_COMBINE( seed, formatProperties3.optimalTilingFeatures ); VULKAN_HPP_HASH_COMBINE( seed, formatProperties3.bufferFeatures ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::FragmentShadingRateAttachmentInfoKHR const & fragmentShadingRateAttachmentInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, fragmentShadingRateAttachmentInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, fragmentShadingRateAttachmentInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, fragmentShadingRateAttachmentInfoKHR.pFragmentShadingRateAttachment ); VULKAN_HPP_HASH_COMBINE( seed, fragmentShadingRateAttachmentInfoKHR.shadingRateAttachmentTexelSize ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::FrameBoundaryEXT const & frameBoundaryEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, frameBoundaryEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, frameBoundaryEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, frameBoundaryEXT.flags ); VULKAN_HPP_HASH_COMBINE( seed, frameBoundaryEXT.frameID ); VULKAN_HPP_HASH_COMBINE( seed, frameBoundaryEXT.imageCount ); VULKAN_HPP_HASH_COMBINE( seed, frameBoundaryEXT.pImages ); VULKAN_HPP_HASH_COMBINE( seed, frameBoundaryEXT.bufferCount ); VULKAN_HPP_HASH_COMBINE( seed, frameBoundaryEXT.pBuffers ); VULKAN_HPP_HASH_COMBINE( seed, frameBoundaryEXT.tagName ); VULKAN_HPP_HASH_COMBINE( seed, frameBoundaryEXT.tagSize ); VULKAN_HPP_HASH_COMBINE( seed, frameBoundaryEXT.pTag ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::FramebufferAttachmentImageInfo const & framebufferAttachmentImageInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, framebufferAttachmentImageInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, framebufferAttachmentImageInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, framebufferAttachmentImageInfo.flags ); VULKAN_HPP_HASH_COMBINE( seed, framebufferAttachmentImageInfo.usage ); VULKAN_HPP_HASH_COMBINE( seed, framebufferAttachmentImageInfo.width ); VULKAN_HPP_HASH_COMBINE( seed, framebufferAttachmentImageInfo.height ); VULKAN_HPP_HASH_COMBINE( seed, framebufferAttachmentImageInfo.layerCount ); VULKAN_HPP_HASH_COMBINE( seed, framebufferAttachmentImageInfo.viewFormatCount ); VULKAN_HPP_HASH_COMBINE( seed, framebufferAttachmentImageInfo.pViewFormats ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::FramebufferAttachmentsCreateInfo const & framebufferAttachmentsCreateInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, framebufferAttachmentsCreateInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, framebufferAttachmentsCreateInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, framebufferAttachmentsCreateInfo.attachmentImageInfoCount ); VULKAN_HPP_HASH_COMBINE( seed, framebufferAttachmentsCreateInfo.pAttachmentImageInfos ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::FramebufferCreateInfo const & framebufferCreateInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, framebufferCreateInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, framebufferCreateInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, framebufferCreateInfo.flags ); VULKAN_HPP_HASH_COMBINE( seed, framebufferCreateInfo.renderPass ); VULKAN_HPP_HASH_COMBINE( seed, framebufferCreateInfo.attachmentCount ); VULKAN_HPP_HASH_COMBINE( seed, framebufferCreateInfo.pAttachments ); VULKAN_HPP_HASH_COMBINE( seed, framebufferCreateInfo.width ); VULKAN_HPP_HASH_COMBINE( seed, framebufferCreateInfo.height ); VULKAN_HPP_HASH_COMBINE( seed, framebufferCreateInfo.layers ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::FramebufferMixedSamplesCombinationNV const & framebufferMixedSamplesCombinationNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, framebufferMixedSamplesCombinationNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, framebufferMixedSamplesCombinationNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, framebufferMixedSamplesCombinationNV.coverageReductionMode ); VULKAN_HPP_HASH_COMBINE( seed, framebufferMixedSamplesCombinationNV.rasterizationSamples ); VULKAN_HPP_HASH_COMBINE( seed, framebufferMixedSamplesCombinationNV.depthStencilSamples ); VULKAN_HPP_HASH_COMBINE( seed, framebufferMixedSamplesCombinationNV.colorSamples ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::GeneratedCommandsInfoEXT const & generatedCommandsInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, generatedCommandsInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, generatedCommandsInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, generatedCommandsInfoEXT.shaderStages ); VULKAN_HPP_HASH_COMBINE( seed, generatedCommandsInfoEXT.indirectExecutionSet ); VULKAN_HPP_HASH_COMBINE( seed, generatedCommandsInfoEXT.indirectCommandsLayout ); VULKAN_HPP_HASH_COMBINE( seed, generatedCommandsInfoEXT.indirectAddress ); VULKAN_HPP_HASH_COMBINE( seed, generatedCommandsInfoEXT.indirectAddressSize ); VULKAN_HPP_HASH_COMBINE( seed, generatedCommandsInfoEXT.preprocessAddress ); VULKAN_HPP_HASH_COMBINE( seed, generatedCommandsInfoEXT.preprocessSize ); VULKAN_HPP_HASH_COMBINE( seed, generatedCommandsInfoEXT.maxSequenceCount ); VULKAN_HPP_HASH_COMBINE( seed, generatedCommandsInfoEXT.sequenceCountAddress ); VULKAN_HPP_HASH_COMBINE( seed, generatedCommandsInfoEXT.maxDrawCount ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::IndirectCommandsStreamNV const & indirectCommandsStreamNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, indirectCommandsStreamNV.buffer ); VULKAN_HPP_HASH_COMBINE( seed, indirectCommandsStreamNV.offset ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::GeneratedCommandsInfoNV const & generatedCommandsInfoNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, generatedCommandsInfoNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, generatedCommandsInfoNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, generatedCommandsInfoNV.pipelineBindPoint ); VULKAN_HPP_HASH_COMBINE( seed, generatedCommandsInfoNV.pipeline ); VULKAN_HPP_HASH_COMBINE( seed, generatedCommandsInfoNV.indirectCommandsLayout ); VULKAN_HPP_HASH_COMBINE( seed, generatedCommandsInfoNV.streamCount ); VULKAN_HPP_HASH_COMBINE( seed, generatedCommandsInfoNV.pStreams ); VULKAN_HPP_HASH_COMBINE( seed, generatedCommandsInfoNV.sequencesCount ); VULKAN_HPP_HASH_COMBINE( seed, generatedCommandsInfoNV.preprocessBuffer ); VULKAN_HPP_HASH_COMBINE( seed, generatedCommandsInfoNV.preprocessOffset ); VULKAN_HPP_HASH_COMBINE( seed, generatedCommandsInfoNV.preprocessSize ); VULKAN_HPP_HASH_COMBINE( seed, generatedCommandsInfoNV.sequencesCountBuffer ); VULKAN_HPP_HASH_COMBINE( seed, generatedCommandsInfoNV.sequencesCountOffset ); VULKAN_HPP_HASH_COMBINE( seed, generatedCommandsInfoNV.sequencesIndexBuffer ); VULKAN_HPP_HASH_COMBINE( seed, generatedCommandsInfoNV.sequencesIndexOffset ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::GeneratedCommandsMemoryRequirementsInfoEXT const & generatedCommandsMemoryRequirementsInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, generatedCommandsMemoryRequirementsInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, generatedCommandsMemoryRequirementsInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, generatedCommandsMemoryRequirementsInfoEXT.indirectExecutionSet ); VULKAN_HPP_HASH_COMBINE( seed, generatedCommandsMemoryRequirementsInfoEXT.indirectCommandsLayout ); VULKAN_HPP_HASH_COMBINE( seed, generatedCommandsMemoryRequirementsInfoEXT.maxSequenceCount ); VULKAN_HPP_HASH_COMBINE( seed, generatedCommandsMemoryRequirementsInfoEXT.maxDrawCount ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::GeneratedCommandsMemoryRequirementsInfoNV const & generatedCommandsMemoryRequirementsInfoNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, generatedCommandsMemoryRequirementsInfoNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, generatedCommandsMemoryRequirementsInfoNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, generatedCommandsMemoryRequirementsInfoNV.pipelineBindPoint ); VULKAN_HPP_HASH_COMBINE( seed, generatedCommandsMemoryRequirementsInfoNV.pipeline ); VULKAN_HPP_HASH_COMBINE( seed, generatedCommandsMemoryRequirementsInfoNV.indirectCommandsLayout ); VULKAN_HPP_HASH_COMBINE( seed, generatedCommandsMemoryRequirementsInfoNV.maxSequencesCount ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::GeneratedCommandsPipelineInfoEXT const & generatedCommandsPipelineInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, generatedCommandsPipelineInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, generatedCommandsPipelineInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, generatedCommandsPipelineInfoEXT.pipeline ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::GeneratedCommandsShaderInfoEXT const & generatedCommandsShaderInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, generatedCommandsShaderInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, generatedCommandsShaderInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, generatedCommandsShaderInfoEXT.shaderCount ); VULKAN_HPP_HASH_COMBINE( seed, generatedCommandsShaderInfoEXT.pShaders ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::LatencyTimingsFrameReportNV const & latencyTimingsFrameReportNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, latencyTimingsFrameReportNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, latencyTimingsFrameReportNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, latencyTimingsFrameReportNV.presentID ); VULKAN_HPP_HASH_COMBINE( seed, latencyTimingsFrameReportNV.inputSampleTimeUs ); VULKAN_HPP_HASH_COMBINE( seed, latencyTimingsFrameReportNV.simStartTimeUs ); VULKAN_HPP_HASH_COMBINE( seed, latencyTimingsFrameReportNV.simEndTimeUs ); VULKAN_HPP_HASH_COMBINE( seed, latencyTimingsFrameReportNV.renderSubmitStartTimeUs ); VULKAN_HPP_HASH_COMBINE( seed, latencyTimingsFrameReportNV.renderSubmitEndTimeUs ); VULKAN_HPP_HASH_COMBINE( seed, latencyTimingsFrameReportNV.presentStartTimeUs ); VULKAN_HPP_HASH_COMBINE( seed, latencyTimingsFrameReportNV.presentEndTimeUs ); VULKAN_HPP_HASH_COMBINE( seed, latencyTimingsFrameReportNV.driverStartTimeUs ); VULKAN_HPP_HASH_COMBINE( seed, latencyTimingsFrameReportNV.driverEndTimeUs ); VULKAN_HPP_HASH_COMBINE( seed, latencyTimingsFrameReportNV.osRenderQueueStartTimeUs ); VULKAN_HPP_HASH_COMBINE( seed, latencyTimingsFrameReportNV.osRenderQueueEndTimeUs ); VULKAN_HPP_HASH_COMBINE( seed, latencyTimingsFrameReportNV.gpuRenderStartTimeUs ); VULKAN_HPP_HASH_COMBINE( seed, latencyTimingsFrameReportNV.gpuRenderEndTimeUs ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::GetLatencyMarkerInfoNV const & getLatencyMarkerInfoNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, getLatencyMarkerInfoNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, getLatencyMarkerInfoNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, getLatencyMarkerInfoNV.timingCount ); VULKAN_HPP_HASH_COMBINE( seed, getLatencyMarkerInfoNV.pTimings ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VertexInputBindingDescription const & vertexInputBindingDescription ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, vertexInputBindingDescription.binding ); VULKAN_HPP_HASH_COMBINE( seed, vertexInputBindingDescription.stride ); VULKAN_HPP_HASH_COMBINE( seed, vertexInputBindingDescription.inputRate ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VertexInputAttributeDescription const & vertexInputAttributeDescription ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, vertexInputAttributeDescription.location ); VULKAN_HPP_HASH_COMBINE( seed, vertexInputAttributeDescription.binding ); VULKAN_HPP_HASH_COMBINE( seed, vertexInputAttributeDescription.format ); VULKAN_HPP_HASH_COMBINE( seed, vertexInputAttributeDescription.offset ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineVertexInputStateCreateInfo const & pipelineVertexInputStateCreateInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, pipelineVertexInputStateCreateInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, pipelineVertexInputStateCreateInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, pipelineVertexInputStateCreateInfo.flags ); VULKAN_HPP_HASH_COMBINE( seed, pipelineVertexInputStateCreateInfo.vertexBindingDescriptionCount ); VULKAN_HPP_HASH_COMBINE( seed, pipelineVertexInputStateCreateInfo.pVertexBindingDescriptions ); VULKAN_HPP_HASH_COMBINE( seed, pipelineVertexInputStateCreateInfo.vertexAttributeDescriptionCount ); VULKAN_HPP_HASH_COMBINE( seed, pipelineVertexInputStateCreateInfo.pVertexAttributeDescriptions ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineInputAssemblyStateCreateInfo const & pipelineInputAssemblyStateCreateInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, pipelineInputAssemblyStateCreateInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, pipelineInputAssemblyStateCreateInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, pipelineInputAssemblyStateCreateInfo.flags ); VULKAN_HPP_HASH_COMBINE( seed, pipelineInputAssemblyStateCreateInfo.topology ); VULKAN_HPP_HASH_COMBINE( seed, pipelineInputAssemblyStateCreateInfo.primitiveRestartEnable ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineTessellationStateCreateInfo const & pipelineTessellationStateCreateInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, pipelineTessellationStateCreateInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, pipelineTessellationStateCreateInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, pipelineTessellationStateCreateInfo.flags ); VULKAN_HPP_HASH_COMBINE( seed, pipelineTessellationStateCreateInfo.patchControlPoints ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineViewportStateCreateInfo const & pipelineViewportStateCreateInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, pipelineViewportStateCreateInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, pipelineViewportStateCreateInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, pipelineViewportStateCreateInfo.flags ); VULKAN_HPP_HASH_COMBINE( seed, pipelineViewportStateCreateInfo.viewportCount ); VULKAN_HPP_HASH_COMBINE( seed, pipelineViewportStateCreateInfo.pViewports ); VULKAN_HPP_HASH_COMBINE( seed, pipelineViewportStateCreateInfo.scissorCount ); VULKAN_HPP_HASH_COMBINE( seed, pipelineViewportStateCreateInfo.pScissors ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineRasterizationStateCreateInfo const & pipelineRasterizationStateCreateInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, pipelineRasterizationStateCreateInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, pipelineRasterizationStateCreateInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, pipelineRasterizationStateCreateInfo.flags ); VULKAN_HPP_HASH_COMBINE( seed, pipelineRasterizationStateCreateInfo.depthClampEnable ); VULKAN_HPP_HASH_COMBINE( seed, pipelineRasterizationStateCreateInfo.rasterizerDiscardEnable ); VULKAN_HPP_HASH_COMBINE( seed, pipelineRasterizationStateCreateInfo.polygonMode ); VULKAN_HPP_HASH_COMBINE( seed, pipelineRasterizationStateCreateInfo.cullMode ); VULKAN_HPP_HASH_COMBINE( seed, pipelineRasterizationStateCreateInfo.frontFace ); VULKAN_HPP_HASH_COMBINE( seed, pipelineRasterizationStateCreateInfo.depthBiasEnable ); VULKAN_HPP_HASH_COMBINE( seed, pipelineRasterizationStateCreateInfo.depthBiasConstantFactor ); VULKAN_HPP_HASH_COMBINE( seed, pipelineRasterizationStateCreateInfo.depthBiasClamp ); VULKAN_HPP_HASH_COMBINE( seed, pipelineRasterizationStateCreateInfo.depthBiasSlopeFactor ); VULKAN_HPP_HASH_COMBINE( seed, pipelineRasterizationStateCreateInfo.lineWidth ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineMultisampleStateCreateInfo const & pipelineMultisampleStateCreateInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, pipelineMultisampleStateCreateInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, pipelineMultisampleStateCreateInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, pipelineMultisampleStateCreateInfo.flags ); VULKAN_HPP_HASH_COMBINE( seed, pipelineMultisampleStateCreateInfo.rasterizationSamples ); VULKAN_HPP_HASH_COMBINE( seed, pipelineMultisampleStateCreateInfo.sampleShadingEnable ); VULKAN_HPP_HASH_COMBINE( seed, pipelineMultisampleStateCreateInfo.minSampleShading ); VULKAN_HPP_HASH_COMBINE( seed, pipelineMultisampleStateCreateInfo.pSampleMask ); VULKAN_HPP_HASH_COMBINE( seed, pipelineMultisampleStateCreateInfo.alphaToCoverageEnable ); VULKAN_HPP_HASH_COMBINE( seed, pipelineMultisampleStateCreateInfo.alphaToOneEnable ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::StencilOpState const & stencilOpState ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, stencilOpState.failOp ); VULKAN_HPP_HASH_COMBINE( seed, stencilOpState.passOp ); VULKAN_HPP_HASH_COMBINE( seed, stencilOpState.depthFailOp ); VULKAN_HPP_HASH_COMBINE( seed, stencilOpState.compareOp ); VULKAN_HPP_HASH_COMBINE( seed, stencilOpState.compareMask ); VULKAN_HPP_HASH_COMBINE( seed, stencilOpState.writeMask ); VULKAN_HPP_HASH_COMBINE( seed, stencilOpState.reference ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineDepthStencilStateCreateInfo const & pipelineDepthStencilStateCreateInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, pipelineDepthStencilStateCreateInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, pipelineDepthStencilStateCreateInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, pipelineDepthStencilStateCreateInfo.flags ); VULKAN_HPP_HASH_COMBINE( seed, pipelineDepthStencilStateCreateInfo.depthTestEnable ); VULKAN_HPP_HASH_COMBINE( seed, pipelineDepthStencilStateCreateInfo.depthWriteEnable ); VULKAN_HPP_HASH_COMBINE( seed, pipelineDepthStencilStateCreateInfo.depthCompareOp ); VULKAN_HPP_HASH_COMBINE( seed, pipelineDepthStencilStateCreateInfo.depthBoundsTestEnable ); VULKAN_HPP_HASH_COMBINE( seed, pipelineDepthStencilStateCreateInfo.stencilTestEnable ); VULKAN_HPP_HASH_COMBINE( seed, pipelineDepthStencilStateCreateInfo.front ); VULKAN_HPP_HASH_COMBINE( seed, pipelineDepthStencilStateCreateInfo.back ); VULKAN_HPP_HASH_COMBINE( seed, pipelineDepthStencilStateCreateInfo.minDepthBounds ); VULKAN_HPP_HASH_COMBINE( seed, pipelineDepthStencilStateCreateInfo.maxDepthBounds ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineColorBlendAttachmentState const & pipelineColorBlendAttachmentState ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, pipelineColorBlendAttachmentState.blendEnable ); VULKAN_HPP_HASH_COMBINE( seed, pipelineColorBlendAttachmentState.srcColorBlendFactor ); VULKAN_HPP_HASH_COMBINE( seed, pipelineColorBlendAttachmentState.dstColorBlendFactor ); VULKAN_HPP_HASH_COMBINE( seed, pipelineColorBlendAttachmentState.colorBlendOp ); VULKAN_HPP_HASH_COMBINE( seed, pipelineColorBlendAttachmentState.srcAlphaBlendFactor ); VULKAN_HPP_HASH_COMBINE( seed, pipelineColorBlendAttachmentState.dstAlphaBlendFactor ); VULKAN_HPP_HASH_COMBINE( seed, pipelineColorBlendAttachmentState.alphaBlendOp ); VULKAN_HPP_HASH_COMBINE( seed, pipelineColorBlendAttachmentState.colorWriteMask ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineColorBlendStateCreateInfo const & pipelineColorBlendStateCreateInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, pipelineColorBlendStateCreateInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, pipelineColorBlendStateCreateInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, pipelineColorBlendStateCreateInfo.flags ); VULKAN_HPP_HASH_COMBINE( seed, pipelineColorBlendStateCreateInfo.logicOpEnable ); VULKAN_HPP_HASH_COMBINE( seed, pipelineColorBlendStateCreateInfo.logicOp ); VULKAN_HPP_HASH_COMBINE( seed, pipelineColorBlendStateCreateInfo.attachmentCount ); VULKAN_HPP_HASH_COMBINE( seed, pipelineColorBlendStateCreateInfo.pAttachments ); for ( size_t i = 0; i < 4; ++i ) { VULKAN_HPP_HASH_COMBINE( seed, pipelineColorBlendStateCreateInfo.blendConstants[i] ); } return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineDynamicStateCreateInfo const & pipelineDynamicStateCreateInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, pipelineDynamicStateCreateInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, pipelineDynamicStateCreateInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, pipelineDynamicStateCreateInfo.flags ); VULKAN_HPP_HASH_COMBINE( seed, pipelineDynamicStateCreateInfo.dynamicStateCount ); VULKAN_HPP_HASH_COMBINE( seed, pipelineDynamicStateCreateInfo.pDynamicStates ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::GraphicsPipelineCreateInfo const & graphicsPipelineCreateInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, graphicsPipelineCreateInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, graphicsPipelineCreateInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, graphicsPipelineCreateInfo.flags ); VULKAN_HPP_HASH_COMBINE( seed, graphicsPipelineCreateInfo.stageCount ); VULKAN_HPP_HASH_COMBINE( seed, graphicsPipelineCreateInfo.pStages ); VULKAN_HPP_HASH_COMBINE( seed, graphicsPipelineCreateInfo.pVertexInputState ); VULKAN_HPP_HASH_COMBINE( seed, graphicsPipelineCreateInfo.pInputAssemblyState ); VULKAN_HPP_HASH_COMBINE( seed, graphicsPipelineCreateInfo.pTessellationState ); VULKAN_HPP_HASH_COMBINE( seed, graphicsPipelineCreateInfo.pViewportState ); VULKAN_HPP_HASH_COMBINE( seed, graphicsPipelineCreateInfo.pRasterizationState ); VULKAN_HPP_HASH_COMBINE( seed, graphicsPipelineCreateInfo.pMultisampleState ); VULKAN_HPP_HASH_COMBINE( seed, graphicsPipelineCreateInfo.pDepthStencilState ); VULKAN_HPP_HASH_COMBINE( seed, graphicsPipelineCreateInfo.pColorBlendState ); VULKAN_HPP_HASH_COMBINE( seed, graphicsPipelineCreateInfo.pDynamicState ); VULKAN_HPP_HASH_COMBINE( seed, graphicsPipelineCreateInfo.layout ); VULKAN_HPP_HASH_COMBINE( seed, graphicsPipelineCreateInfo.renderPass ); VULKAN_HPP_HASH_COMBINE( seed, graphicsPipelineCreateInfo.subpass ); VULKAN_HPP_HASH_COMBINE( seed, graphicsPipelineCreateInfo.basePipelineHandle ); VULKAN_HPP_HASH_COMBINE( seed, graphicsPipelineCreateInfo.basePipelineIndex ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::GraphicsPipelineLibraryCreateInfoEXT const & graphicsPipelineLibraryCreateInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, graphicsPipelineLibraryCreateInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, graphicsPipelineLibraryCreateInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, graphicsPipelineLibraryCreateInfoEXT.flags ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::GraphicsShaderGroupCreateInfoNV const & graphicsShaderGroupCreateInfoNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, graphicsShaderGroupCreateInfoNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, graphicsShaderGroupCreateInfoNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, graphicsShaderGroupCreateInfoNV.stageCount ); VULKAN_HPP_HASH_COMBINE( seed, graphicsShaderGroupCreateInfoNV.pStages ); VULKAN_HPP_HASH_COMBINE( seed, graphicsShaderGroupCreateInfoNV.pVertexInputState ); VULKAN_HPP_HASH_COMBINE( seed, graphicsShaderGroupCreateInfoNV.pTessellationState ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::GraphicsPipelineShaderGroupsCreateInfoNV const & graphicsPipelineShaderGroupsCreateInfoNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, graphicsPipelineShaderGroupsCreateInfoNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, graphicsPipelineShaderGroupsCreateInfoNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, graphicsPipelineShaderGroupsCreateInfoNV.groupCount ); VULKAN_HPP_HASH_COMBINE( seed, graphicsPipelineShaderGroupsCreateInfoNV.pGroups ); VULKAN_HPP_HASH_COMBINE( seed, graphicsPipelineShaderGroupsCreateInfoNV.pipelineCount ); VULKAN_HPP_HASH_COMBINE( seed, graphicsPipelineShaderGroupsCreateInfoNV.pPipelines ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::XYColorEXT const & xYColorEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, xYColorEXT.x ); VULKAN_HPP_HASH_COMBINE( seed, xYColorEXT.y ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::HdrMetadataEXT const & hdrMetadataEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, hdrMetadataEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, hdrMetadataEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, hdrMetadataEXT.displayPrimaryRed ); VULKAN_HPP_HASH_COMBINE( seed, hdrMetadataEXT.displayPrimaryGreen ); VULKAN_HPP_HASH_COMBINE( seed, hdrMetadataEXT.displayPrimaryBlue ); VULKAN_HPP_HASH_COMBINE( seed, hdrMetadataEXT.whitePoint ); VULKAN_HPP_HASH_COMBINE( seed, hdrMetadataEXT.maxLuminance ); VULKAN_HPP_HASH_COMBINE( seed, hdrMetadataEXT.minLuminance ); VULKAN_HPP_HASH_COMBINE( seed, hdrMetadataEXT.maxContentLightLevel ); VULKAN_HPP_HASH_COMBINE( seed, hdrMetadataEXT.maxFrameAverageLightLevel ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::HdrVividDynamicMetadataHUAWEI const & hdrVividDynamicMetadataHUAWEI ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, hdrVividDynamicMetadataHUAWEI.sType ); VULKAN_HPP_HASH_COMBINE( seed, hdrVividDynamicMetadataHUAWEI.pNext ); VULKAN_HPP_HASH_COMBINE( seed, hdrVividDynamicMetadataHUAWEI.dynamicMetadataSize ); VULKAN_HPP_HASH_COMBINE( seed, hdrVividDynamicMetadataHUAWEI.pDynamicMetadata ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::HeadlessSurfaceCreateInfoEXT const & headlessSurfaceCreateInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, headlessSurfaceCreateInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, headlessSurfaceCreateInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, headlessSurfaceCreateInfoEXT.flags ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::HostImageCopyDevicePerformanceQuery const & hostImageCopyDevicePerformanceQuery ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, hostImageCopyDevicePerformanceQuery.sType ); VULKAN_HPP_HASH_COMBINE( seed, hostImageCopyDevicePerformanceQuery.pNext ); VULKAN_HPP_HASH_COMBINE( seed, hostImageCopyDevicePerformanceQuery.optimalDeviceAccess ); VULKAN_HPP_HASH_COMBINE( seed, hostImageCopyDevicePerformanceQuery.identicalMemoryLayout ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::HostImageLayoutTransitionInfo const & hostImageLayoutTransitionInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, hostImageLayoutTransitionInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, hostImageLayoutTransitionInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, hostImageLayoutTransitionInfo.image ); VULKAN_HPP_HASH_COMBINE( seed, hostImageLayoutTransitionInfo.oldLayout ); VULKAN_HPP_HASH_COMBINE( seed, hostImageLayoutTransitionInfo.newLayout ); VULKAN_HPP_HASH_COMBINE( seed, hostImageLayoutTransitionInfo.subresourceRange ); return seed; } }; # if defined( VK_USE_PLATFORM_IOS_MVK ) template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::IOSSurfaceCreateInfoMVK const & iOSSurfaceCreateInfoMVK ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, iOSSurfaceCreateInfoMVK.sType ); VULKAN_HPP_HASH_COMBINE( seed, iOSSurfaceCreateInfoMVK.pNext ); VULKAN_HPP_HASH_COMBINE( seed, iOSSurfaceCreateInfoMVK.flags ); VULKAN_HPP_HASH_COMBINE( seed, iOSSurfaceCreateInfoMVK.pView ); return seed; } }; # endif /*VK_USE_PLATFORM_IOS_MVK*/ template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ImageAlignmentControlCreateInfoMESA const & imageAlignmentControlCreateInfoMESA ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, imageAlignmentControlCreateInfoMESA.sType ); VULKAN_HPP_HASH_COMBINE( seed, imageAlignmentControlCreateInfoMESA.pNext ); VULKAN_HPP_HASH_COMBINE( seed, imageAlignmentControlCreateInfoMESA.maximumRequestedAlignment ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ImageBlit const & imageBlit ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, imageBlit.srcSubresource ); for ( size_t i = 0; i < 2; ++i ) { VULKAN_HPP_HASH_COMBINE( seed, imageBlit.srcOffsets[i] ); } VULKAN_HPP_HASH_COMBINE( seed, imageBlit.dstSubresource ); for ( size_t i = 0; i < 2; ++i ) { VULKAN_HPP_HASH_COMBINE( seed, imageBlit.dstOffsets[i] ); } return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ImageCaptureDescriptorDataInfoEXT const & imageCaptureDescriptorDataInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, imageCaptureDescriptorDataInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, imageCaptureDescriptorDataInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, imageCaptureDescriptorDataInfoEXT.image ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ImageCompressionControlEXT const & imageCompressionControlEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, imageCompressionControlEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, imageCompressionControlEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, imageCompressionControlEXT.flags ); VULKAN_HPP_HASH_COMBINE( seed, imageCompressionControlEXT.compressionControlPlaneCount ); VULKAN_HPP_HASH_COMBINE( seed, imageCompressionControlEXT.pFixedRateFlags ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ImageCompressionPropertiesEXT const & imageCompressionPropertiesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, imageCompressionPropertiesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, imageCompressionPropertiesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, imageCompressionPropertiesEXT.imageCompressionFlags ); VULKAN_HPP_HASH_COMBINE( seed, imageCompressionPropertiesEXT.imageCompressionFixedRateFlags ); return seed; } }; # if defined( VK_USE_PLATFORM_FUCHSIA ) template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ImageFormatConstraintsInfoFUCHSIA const & imageFormatConstraintsInfoFUCHSIA ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, imageFormatConstraintsInfoFUCHSIA.sType ); VULKAN_HPP_HASH_COMBINE( seed, imageFormatConstraintsInfoFUCHSIA.pNext ); VULKAN_HPP_HASH_COMBINE( seed, imageFormatConstraintsInfoFUCHSIA.imageCreateInfo ); VULKAN_HPP_HASH_COMBINE( seed, imageFormatConstraintsInfoFUCHSIA.requiredFormatFeatures ); VULKAN_HPP_HASH_COMBINE( seed, imageFormatConstraintsInfoFUCHSIA.flags ); VULKAN_HPP_HASH_COMBINE( seed, imageFormatConstraintsInfoFUCHSIA.sysmemPixelFormat ); VULKAN_HPP_HASH_COMBINE( seed, imageFormatConstraintsInfoFUCHSIA.colorSpaceCount ); VULKAN_HPP_HASH_COMBINE( seed, imageFormatConstraintsInfoFUCHSIA.pColorSpaces ); return seed; } }; # endif /*VK_USE_PLATFORM_FUCHSIA*/ # if defined( VK_USE_PLATFORM_FUCHSIA ) template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ImageConstraintsInfoFUCHSIA const & imageConstraintsInfoFUCHSIA ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, imageConstraintsInfoFUCHSIA.sType ); VULKAN_HPP_HASH_COMBINE( seed, imageConstraintsInfoFUCHSIA.pNext ); VULKAN_HPP_HASH_COMBINE( seed, imageConstraintsInfoFUCHSIA.formatConstraintsCount ); VULKAN_HPP_HASH_COMBINE( seed, imageConstraintsInfoFUCHSIA.pFormatConstraints ); VULKAN_HPP_HASH_COMBINE( seed, imageConstraintsInfoFUCHSIA.bufferCollectionConstraints ); VULKAN_HPP_HASH_COMBINE( seed, imageConstraintsInfoFUCHSIA.flags ); return seed; } }; # endif /*VK_USE_PLATFORM_FUCHSIA*/ template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ImageCopy const & imageCopy ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, imageCopy.srcSubresource ); VULKAN_HPP_HASH_COMBINE( seed, imageCopy.srcOffset ); VULKAN_HPP_HASH_COMBINE( seed, imageCopy.dstSubresource ); VULKAN_HPP_HASH_COMBINE( seed, imageCopy.dstOffset ); VULKAN_HPP_HASH_COMBINE( seed, imageCopy.extent ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::SubresourceLayout const & subresourceLayout ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, subresourceLayout.offset ); VULKAN_HPP_HASH_COMBINE( seed, subresourceLayout.size ); VULKAN_HPP_HASH_COMBINE( seed, subresourceLayout.rowPitch ); VULKAN_HPP_HASH_COMBINE( seed, subresourceLayout.arrayPitch ); VULKAN_HPP_HASH_COMBINE( seed, subresourceLayout.depthPitch ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ImageDrmFormatModifierExplicitCreateInfoEXT const & imageDrmFormatModifierExplicitCreateInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, imageDrmFormatModifierExplicitCreateInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, imageDrmFormatModifierExplicitCreateInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, imageDrmFormatModifierExplicitCreateInfoEXT.drmFormatModifier ); VULKAN_HPP_HASH_COMBINE( seed, imageDrmFormatModifierExplicitCreateInfoEXT.drmFormatModifierPlaneCount ); VULKAN_HPP_HASH_COMBINE( seed, imageDrmFormatModifierExplicitCreateInfoEXT.pPlaneLayouts ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ImageDrmFormatModifierListCreateInfoEXT const & imageDrmFormatModifierListCreateInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, imageDrmFormatModifierListCreateInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, imageDrmFormatModifierListCreateInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, imageDrmFormatModifierListCreateInfoEXT.drmFormatModifierCount ); VULKAN_HPP_HASH_COMBINE( seed, imageDrmFormatModifierListCreateInfoEXT.pDrmFormatModifiers ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ImageDrmFormatModifierPropertiesEXT const & imageDrmFormatModifierPropertiesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, imageDrmFormatModifierPropertiesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, imageDrmFormatModifierPropertiesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, imageDrmFormatModifierPropertiesEXT.drmFormatModifier ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ImageFormatListCreateInfo const & imageFormatListCreateInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, imageFormatListCreateInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, imageFormatListCreateInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, imageFormatListCreateInfo.viewFormatCount ); VULKAN_HPP_HASH_COMBINE( seed, imageFormatListCreateInfo.pViewFormats ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ImageFormatProperties2 const & imageFormatProperties2 ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, imageFormatProperties2.sType ); VULKAN_HPP_HASH_COMBINE( seed, imageFormatProperties2.pNext ); VULKAN_HPP_HASH_COMBINE( seed, imageFormatProperties2.imageFormatProperties ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ImageMemoryBarrier const & imageMemoryBarrier ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, imageMemoryBarrier.sType ); VULKAN_HPP_HASH_COMBINE( seed, imageMemoryBarrier.pNext ); VULKAN_HPP_HASH_COMBINE( seed, imageMemoryBarrier.srcAccessMask ); VULKAN_HPP_HASH_COMBINE( seed, imageMemoryBarrier.dstAccessMask ); VULKAN_HPP_HASH_COMBINE( seed, imageMemoryBarrier.oldLayout ); VULKAN_HPP_HASH_COMBINE( seed, imageMemoryBarrier.newLayout ); VULKAN_HPP_HASH_COMBINE( seed, imageMemoryBarrier.srcQueueFamilyIndex ); VULKAN_HPP_HASH_COMBINE( seed, imageMemoryBarrier.dstQueueFamilyIndex ); VULKAN_HPP_HASH_COMBINE( seed, imageMemoryBarrier.image ); VULKAN_HPP_HASH_COMBINE( seed, imageMemoryBarrier.subresourceRange ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ImageMemoryRequirementsInfo2 const & imageMemoryRequirementsInfo2 ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, imageMemoryRequirementsInfo2.sType ); VULKAN_HPP_HASH_COMBINE( seed, imageMemoryRequirementsInfo2.pNext ); VULKAN_HPP_HASH_COMBINE( seed, imageMemoryRequirementsInfo2.image ); return seed; } }; # if defined( VK_USE_PLATFORM_FUCHSIA ) template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ImagePipeSurfaceCreateInfoFUCHSIA const & imagePipeSurfaceCreateInfoFUCHSIA ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, imagePipeSurfaceCreateInfoFUCHSIA.sType ); VULKAN_HPP_HASH_COMBINE( seed, imagePipeSurfaceCreateInfoFUCHSIA.pNext ); VULKAN_HPP_HASH_COMBINE( seed, imagePipeSurfaceCreateInfoFUCHSIA.flags ); VULKAN_HPP_HASH_COMBINE( seed, imagePipeSurfaceCreateInfoFUCHSIA.imagePipeHandle ); return seed; } }; # endif /*VK_USE_PLATFORM_FUCHSIA*/ template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ImagePlaneMemoryRequirementsInfo const & imagePlaneMemoryRequirementsInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, imagePlaneMemoryRequirementsInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, imagePlaneMemoryRequirementsInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, imagePlaneMemoryRequirementsInfo.planeAspect ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ImageResolve const & imageResolve ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, imageResolve.srcSubresource ); VULKAN_HPP_HASH_COMBINE( seed, imageResolve.srcOffset ); VULKAN_HPP_HASH_COMBINE( seed, imageResolve.dstSubresource ); VULKAN_HPP_HASH_COMBINE( seed, imageResolve.dstOffset ); VULKAN_HPP_HASH_COMBINE( seed, imageResolve.extent ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ImageResolve2 const & imageResolve2 ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, imageResolve2.sType ); VULKAN_HPP_HASH_COMBINE( seed, imageResolve2.pNext ); VULKAN_HPP_HASH_COMBINE( seed, imageResolve2.srcSubresource ); VULKAN_HPP_HASH_COMBINE( seed, imageResolve2.srcOffset ); VULKAN_HPP_HASH_COMBINE( seed, imageResolve2.dstSubresource ); VULKAN_HPP_HASH_COMBINE( seed, imageResolve2.dstOffset ); VULKAN_HPP_HASH_COMBINE( seed, imageResolve2.extent ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ImageSparseMemoryRequirementsInfo2 const & imageSparseMemoryRequirementsInfo2 ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, imageSparseMemoryRequirementsInfo2.sType ); VULKAN_HPP_HASH_COMBINE( seed, imageSparseMemoryRequirementsInfo2.pNext ); VULKAN_HPP_HASH_COMBINE( seed, imageSparseMemoryRequirementsInfo2.image ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ImageStencilUsageCreateInfo const & imageStencilUsageCreateInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, imageStencilUsageCreateInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, imageStencilUsageCreateInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, imageStencilUsageCreateInfo.stencilUsage ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ImageSwapchainCreateInfoKHR const & imageSwapchainCreateInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, imageSwapchainCreateInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, imageSwapchainCreateInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, imageSwapchainCreateInfoKHR.swapchain ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ImageViewASTCDecodeModeEXT const & imageViewASTCDecodeModeEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, imageViewASTCDecodeModeEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, imageViewASTCDecodeModeEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, imageViewASTCDecodeModeEXT.decodeMode ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ImageViewAddressPropertiesNVX const & imageViewAddressPropertiesNVX ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, imageViewAddressPropertiesNVX.sType ); VULKAN_HPP_HASH_COMBINE( seed, imageViewAddressPropertiesNVX.pNext ); VULKAN_HPP_HASH_COMBINE( seed, imageViewAddressPropertiesNVX.deviceAddress ); VULKAN_HPP_HASH_COMBINE( seed, imageViewAddressPropertiesNVX.size ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ImageViewCaptureDescriptorDataInfoEXT const & imageViewCaptureDescriptorDataInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, imageViewCaptureDescriptorDataInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, imageViewCaptureDescriptorDataInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, imageViewCaptureDescriptorDataInfoEXT.imageView ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ImageViewCreateInfo const & imageViewCreateInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, imageViewCreateInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, imageViewCreateInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, imageViewCreateInfo.flags ); VULKAN_HPP_HASH_COMBINE( seed, imageViewCreateInfo.image ); VULKAN_HPP_HASH_COMBINE( seed, imageViewCreateInfo.viewType ); VULKAN_HPP_HASH_COMBINE( seed, imageViewCreateInfo.format ); VULKAN_HPP_HASH_COMBINE( seed, imageViewCreateInfo.components ); VULKAN_HPP_HASH_COMBINE( seed, imageViewCreateInfo.subresourceRange ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ImageViewHandleInfoNVX const & imageViewHandleInfoNVX ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, imageViewHandleInfoNVX.sType ); VULKAN_HPP_HASH_COMBINE( seed, imageViewHandleInfoNVX.pNext ); VULKAN_HPP_HASH_COMBINE( seed, imageViewHandleInfoNVX.imageView ); VULKAN_HPP_HASH_COMBINE( seed, imageViewHandleInfoNVX.descriptorType ); VULKAN_HPP_HASH_COMBINE( seed, imageViewHandleInfoNVX.sampler ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ImageViewMinLodCreateInfoEXT const & imageViewMinLodCreateInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, imageViewMinLodCreateInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, imageViewMinLodCreateInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, imageViewMinLodCreateInfoEXT.minLod ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ImageViewSampleWeightCreateInfoQCOM const & imageViewSampleWeightCreateInfoQCOM ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, imageViewSampleWeightCreateInfoQCOM.sType ); VULKAN_HPP_HASH_COMBINE( seed, imageViewSampleWeightCreateInfoQCOM.pNext ); VULKAN_HPP_HASH_COMBINE( seed, imageViewSampleWeightCreateInfoQCOM.filterCenter ); VULKAN_HPP_HASH_COMBINE( seed, imageViewSampleWeightCreateInfoQCOM.filterSize ); VULKAN_HPP_HASH_COMBINE( seed, imageViewSampleWeightCreateInfoQCOM.numPhases ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ImageViewSlicedCreateInfoEXT const & imageViewSlicedCreateInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, imageViewSlicedCreateInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, imageViewSlicedCreateInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, imageViewSlicedCreateInfoEXT.sliceOffset ); VULKAN_HPP_HASH_COMBINE( seed, imageViewSlicedCreateInfoEXT.sliceCount ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ImageViewUsageCreateInfo const & imageViewUsageCreateInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, imageViewUsageCreateInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, imageViewUsageCreateInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, imageViewUsageCreateInfo.usage ); return seed; } }; # if defined( VK_USE_PLATFORM_ANDROID_KHR ) template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ImportAndroidHardwareBufferInfoANDROID const & importAndroidHardwareBufferInfoANDROID ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, importAndroidHardwareBufferInfoANDROID.sType ); VULKAN_HPP_HASH_COMBINE( seed, importAndroidHardwareBufferInfoANDROID.pNext ); VULKAN_HPP_HASH_COMBINE( seed, importAndroidHardwareBufferInfoANDROID.buffer ); return seed; } }; # endif /*VK_USE_PLATFORM_ANDROID_KHR*/ template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ImportFenceFdInfoKHR const & importFenceFdInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, importFenceFdInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, importFenceFdInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, importFenceFdInfoKHR.fence ); VULKAN_HPP_HASH_COMBINE( seed, importFenceFdInfoKHR.flags ); VULKAN_HPP_HASH_COMBINE( seed, importFenceFdInfoKHR.handleType ); VULKAN_HPP_HASH_COMBINE( seed, importFenceFdInfoKHR.fd ); return seed; } }; # if defined( VK_USE_PLATFORM_WIN32_KHR ) template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ImportFenceWin32HandleInfoKHR const & importFenceWin32HandleInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, importFenceWin32HandleInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, importFenceWin32HandleInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, importFenceWin32HandleInfoKHR.fence ); VULKAN_HPP_HASH_COMBINE( seed, importFenceWin32HandleInfoKHR.flags ); VULKAN_HPP_HASH_COMBINE( seed, importFenceWin32HandleInfoKHR.handleType ); VULKAN_HPP_HASH_COMBINE( seed, importFenceWin32HandleInfoKHR.handle ); VULKAN_HPP_HASH_COMBINE( seed, importFenceWin32HandleInfoKHR.name ); return seed; } }; # endif /*VK_USE_PLATFORM_WIN32_KHR*/ # if defined( VK_USE_PLATFORM_FUCHSIA ) template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ImportMemoryBufferCollectionFUCHSIA const & importMemoryBufferCollectionFUCHSIA ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, importMemoryBufferCollectionFUCHSIA.sType ); VULKAN_HPP_HASH_COMBINE( seed, importMemoryBufferCollectionFUCHSIA.pNext ); VULKAN_HPP_HASH_COMBINE( seed, importMemoryBufferCollectionFUCHSIA.collection ); VULKAN_HPP_HASH_COMBINE( seed, importMemoryBufferCollectionFUCHSIA.index ); return seed; } }; # endif /*VK_USE_PLATFORM_FUCHSIA*/ template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ImportMemoryFdInfoKHR const & importMemoryFdInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, importMemoryFdInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, importMemoryFdInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, importMemoryFdInfoKHR.handleType ); VULKAN_HPP_HASH_COMBINE( seed, importMemoryFdInfoKHR.fd ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ImportMemoryHostPointerInfoEXT const & importMemoryHostPointerInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, importMemoryHostPointerInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, importMemoryHostPointerInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, importMemoryHostPointerInfoEXT.handleType ); VULKAN_HPP_HASH_COMBINE( seed, importMemoryHostPointerInfoEXT.pHostPointer ); return seed; } }; # if defined( VK_USE_PLATFORM_METAL_EXT ) template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ImportMemoryMetalHandleInfoEXT const & importMemoryMetalHandleInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, importMemoryMetalHandleInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, importMemoryMetalHandleInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, importMemoryMetalHandleInfoEXT.handleType ); VULKAN_HPP_HASH_COMBINE( seed, importMemoryMetalHandleInfoEXT.handle ); return seed; } }; # endif /*VK_USE_PLATFORM_METAL_EXT*/ # if defined( VK_USE_PLATFORM_WIN32_KHR ) template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ImportMemoryWin32HandleInfoKHR const & importMemoryWin32HandleInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, importMemoryWin32HandleInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, importMemoryWin32HandleInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, importMemoryWin32HandleInfoKHR.handleType ); VULKAN_HPP_HASH_COMBINE( seed, importMemoryWin32HandleInfoKHR.handle ); VULKAN_HPP_HASH_COMBINE( seed, importMemoryWin32HandleInfoKHR.name ); return seed; } }; # endif /*VK_USE_PLATFORM_WIN32_KHR*/ # if defined( VK_USE_PLATFORM_WIN32_KHR ) template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ImportMemoryWin32HandleInfoNV const & importMemoryWin32HandleInfoNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, importMemoryWin32HandleInfoNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, importMemoryWin32HandleInfoNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, importMemoryWin32HandleInfoNV.handleType ); VULKAN_HPP_HASH_COMBINE( seed, importMemoryWin32HandleInfoNV.handle ); return seed; } }; # endif /*VK_USE_PLATFORM_WIN32_KHR*/ # if defined( VK_USE_PLATFORM_FUCHSIA ) template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ImportMemoryZirconHandleInfoFUCHSIA const & importMemoryZirconHandleInfoFUCHSIA ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, importMemoryZirconHandleInfoFUCHSIA.sType ); VULKAN_HPP_HASH_COMBINE( seed, importMemoryZirconHandleInfoFUCHSIA.pNext ); VULKAN_HPP_HASH_COMBINE( seed, importMemoryZirconHandleInfoFUCHSIA.handleType ); VULKAN_HPP_HASH_COMBINE( seed, importMemoryZirconHandleInfoFUCHSIA.handle ); return seed; } }; # endif /*VK_USE_PLATFORM_FUCHSIA*/ # if defined( VK_USE_PLATFORM_METAL_EXT ) template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ImportMetalBufferInfoEXT const & importMetalBufferInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, importMetalBufferInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, importMetalBufferInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, importMetalBufferInfoEXT.mtlBuffer ); return seed; } }; # endif /*VK_USE_PLATFORM_METAL_EXT*/ # if defined( VK_USE_PLATFORM_METAL_EXT ) template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ImportMetalIOSurfaceInfoEXT const & importMetalIOSurfaceInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, importMetalIOSurfaceInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, importMetalIOSurfaceInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, importMetalIOSurfaceInfoEXT.ioSurface ); return seed; } }; # endif /*VK_USE_PLATFORM_METAL_EXT*/ # if defined( VK_USE_PLATFORM_METAL_EXT ) template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ImportMetalSharedEventInfoEXT const & importMetalSharedEventInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, importMetalSharedEventInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, importMetalSharedEventInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, importMetalSharedEventInfoEXT.mtlSharedEvent ); return seed; } }; # endif /*VK_USE_PLATFORM_METAL_EXT*/ # if defined( VK_USE_PLATFORM_METAL_EXT ) template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ImportMetalTextureInfoEXT const & importMetalTextureInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, importMetalTextureInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, importMetalTextureInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, importMetalTextureInfoEXT.plane ); VULKAN_HPP_HASH_COMBINE( seed, importMetalTextureInfoEXT.mtlTexture ); return seed; } }; # endif /*VK_USE_PLATFORM_METAL_EXT*/ # if defined( VK_USE_PLATFORM_SCREEN_QNX ) template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ImportScreenBufferInfoQNX const & importScreenBufferInfoQNX ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, importScreenBufferInfoQNX.sType ); VULKAN_HPP_HASH_COMBINE( seed, importScreenBufferInfoQNX.pNext ); VULKAN_HPP_HASH_COMBINE( seed, importScreenBufferInfoQNX.buffer ); return seed; } }; # endif /*VK_USE_PLATFORM_SCREEN_QNX*/ template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ImportSemaphoreFdInfoKHR const & importSemaphoreFdInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, importSemaphoreFdInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, importSemaphoreFdInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, importSemaphoreFdInfoKHR.semaphore ); VULKAN_HPP_HASH_COMBINE( seed, importSemaphoreFdInfoKHR.flags ); VULKAN_HPP_HASH_COMBINE( seed, importSemaphoreFdInfoKHR.handleType ); VULKAN_HPP_HASH_COMBINE( seed, importSemaphoreFdInfoKHR.fd ); return seed; } }; # if defined( VK_USE_PLATFORM_WIN32_KHR ) template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ImportSemaphoreWin32HandleInfoKHR const & importSemaphoreWin32HandleInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, importSemaphoreWin32HandleInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, importSemaphoreWin32HandleInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, importSemaphoreWin32HandleInfoKHR.semaphore ); VULKAN_HPP_HASH_COMBINE( seed, importSemaphoreWin32HandleInfoKHR.flags ); VULKAN_HPP_HASH_COMBINE( seed, importSemaphoreWin32HandleInfoKHR.handleType ); VULKAN_HPP_HASH_COMBINE( seed, importSemaphoreWin32HandleInfoKHR.handle ); VULKAN_HPP_HASH_COMBINE( seed, importSemaphoreWin32HandleInfoKHR.name ); return seed; } }; # endif /*VK_USE_PLATFORM_WIN32_KHR*/ # if defined( VK_USE_PLATFORM_FUCHSIA ) template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ImportSemaphoreZirconHandleInfoFUCHSIA const & importSemaphoreZirconHandleInfoFUCHSIA ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, importSemaphoreZirconHandleInfoFUCHSIA.sType ); VULKAN_HPP_HASH_COMBINE( seed, importSemaphoreZirconHandleInfoFUCHSIA.pNext ); VULKAN_HPP_HASH_COMBINE( seed, importSemaphoreZirconHandleInfoFUCHSIA.semaphore ); VULKAN_HPP_HASH_COMBINE( seed, importSemaphoreZirconHandleInfoFUCHSIA.flags ); VULKAN_HPP_HASH_COMBINE( seed, importSemaphoreZirconHandleInfoFUCHSIA.handleType ); VULKAN_HPP_HASH_COMBINE( seed, importSemaphoreZirconHandleInfoFUCHSIA.zirconHandle ); return seed; } }; # endif /*VK_USE_PLATFORM_FUCHSIA*/ template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::IndirectCommandsExecutionSetTokenEXT const & indirectCommandsExecutionSetTokenEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, indirectCommandsExecutionSetTokenEXT.type ); VULKAN_HPP_HASH_COMBINE( seed, indirectCommandsExecutionSetTokenEXT.shaderStages ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::IndirectCommandsIndexBufferTokenEXT const & indirectCommandsIndexBufferTokenEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, indirectCommandsIndexBufferTokenEXT.mode ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PushConstantRange const & pushConstantRange ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, pushConstantRange.stageFlags ); VULKAN_HPP_HASH_COMBINE( seed, pushConstantRange.offset ); VULKAN_HPP_HASH_COMBINE( seed, pushConstantRange.size ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::IndirectCommandsPushConstantTokenEXT const & indirectCommandsPushConstantTokenEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, indirectCommandsPushConstantTokenEXT.updateRange ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::IndirectCommandsVertexBufferTokenEXT const & indirectCommandsVertexBufferTokenEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, indirectCommandsVertexBufferTokenEXT.vertexBindingUnit ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutCreateInfoEXT const & indirectCommandsLayoutCreateInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, indirectCommandsLayoutCreateInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, indirectCommandsLayoutCreateInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, indirectCommandsLayoutCreateInfoEXT.flags ); VULKAN_HPP_HASH_COMBINE( seed, indirectCommandsLayoutCreateInfoEXT.shaderStages ); VULKAN_HPP_HASH_COMBINE( seed, indirectCommandsLayoutCreateInfoEXT.indirectStride ); VULKAN_HPP_HASH_COMBINE( seed, indirectCommandsLayoutCreateInfoEXT.pipelineLayout ); VULKAN_HPP_HASH_COMBINE( seed, indirectCommandsLayoutCreateInfoEXT.tokenCount ); VULKAN_HPP_HASH_COMBINE( seed, indirectCommandsLayoutCreateInfoEXT.pTokens ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutTokenNV const & indirectCommandsLayoutTokenNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, indirectCommandsLayoutTokenNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, indirectCommandsLayoutTokenNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, indirectCommandsLayoutTokenNV.tokenType ); VULKAN_HPP_HASH_COMBINE( seed, indirectCommandsLayoutTokenNV.stream ); VULKAN_HPP_HASH_COMBINE( seed, indirectCommandsLayoutTokenNV.offset ); VULKAN_HPP_HASH_COMBINE( seed, indirectCommandsLayoutTokenNV.vertexBindingUnit ); VULKAN_HPP_HASH_COMBINE( seed, indirectCommandsLayoutTokenNV.vertexDynamicStride ); VULKAN_HPP_HASH_COMBINE( seed, indirectCommandsLayoutTokenNV.pushconstantPipelineLayout ); VULKAN_HPP_HASH_COMBINE( seed, indirectCommandsLayoutTokenNV.pushconstantShaderStageFlags ); VULKAN_HPP_HASH_COMBINE( seed, indirectCommandsLayoutTokenNV.pushconstantOffset ); VULKAN_HPP_HASH_COMBINE( seed, indirectCommandsLayoutTokenNV.pushconstantSize ); VULKAN_HPP_HASH_COMBINE( seed, indirectCommandsLayoutTokenNV.indirectStateFlags ); VULKAN_HPP_HASH_COMBINE( seed, indirectCommandsLayoutTokenNV.indexTypeCount ); VULKAN_HPP_HASH_COMBINE( seed, indirectCommandsLayoutTokenNV.pIndexTypes ); VULKAN_HPP_HASH_COMBINE( seed, indirectCommandsLayoutTokenNV.pIndexTypeValues ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutCreateInfoNV const & indirectCommandsLayoutCreateInfoNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, indirectCommandsLayoutCreateInfoNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, indirectCommandsLayoutCreateInfoNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, indirectCommandsLayoutCreateInfoNV.flags ); VULKAN_HPP_HASH_COMBINE( seed, indirectCommandsLayoutCreateInfoNV.pipelineBindPoint ); VULKAN_HPP_HASH_COMBINE( seed, indirectCommandsLayoutCreateInfoNV.tokenCount ); VULKAN_HPP_HASH_COMBINE( seed, indirectCommandsLayoutCreateInfoNV.pTokens ); VULKAN_HPP_HASH_COMBINE( seed, indirectCommandsLayoutCreateInfoNV.streamCount ); VULKAN_HPP_HASH_COMBINE( seed, indirectCommandsLayoutCreateInfoNV.pStreamStrides ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::IndirectExecutionSetPipelineInfoEXT const & indirectExecutionSetPipelineInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, indirectExecutionSetPipelineInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, indirectExecutionSetPipelineInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, indirectExecutionSetPipelineInfoEXT.initialPipeline ); VULKAN_HPP_HASH_COMBINE( seed, indirectExecutionSetPipelineInfoEXT.maxPipelineCount ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::IndirectExecutionSetShaderLayoutInfoEXT const & indirectExecutionSetShaderLayoutInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, indirectExecutionSetShaderLayoutInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, indirectExecutionSetShaderLayoutInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, indirectExecutionSetShaderLayoutInfoEXT.setLayoutCount ); VULKAN_HPP_HASH_COMBINE( seed, indirectExecutionSetShaderLayoutInfoEXT.pSetLayouts ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::IndirectExecutionSetShaderInfoEXT const & indirectExecutionSetShaderInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, indirectExecutionSetShaderInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, indirectExecutionSetShaderInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, indirectExecutionSetShaderInfoEXT.shaderCount ); VULKAN_HPP_HASH_COMBINE( seed, indirectExecutionSetShaderInfoEXT.pInitialShaders ); VULKAN_HPP_HASH_COMBINE( seed, indirectExecutionSetShaderInfoEXT.pSetLayoutInfos ); VULKAN_HPP_HASH_COMBINE( seed, indirectExecutionSetShaderInfoEXT.maxShaderCount ); VULKAN_HPP_HASH_COMBINE( seed, indirectExecutionSetShaderInfoEXT.pushConstantRangeCount ); VULKAN_HPP_HASH_COMBINE( seed, indirectExecutionSetShaderInfoEXT.pPushConstantRanges ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::InitializePerformanceApiInfoINTEL const & initializePerformanceApiInfoINTEL ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, initializePerformanceApiInfoINTEL.sType ); VULKAN_HPP_HASH_COMBINE( seed, initializePerformanceApiInfoINTEL.pNext ); VULKAN_HPP_HASH_COMBINE( seed, initializePerformanceApiInfoINTEL.pUserData ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::InputAttachmentAspectReference const & inputAttachmentAspectReference ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, inputAttachmentAspectReference.subpass ); VULKAN_HPP_HASH_COMBINE( seed, inputAttachmentAspectReference.inputAttachmentIndex ); VULKAN_HPP_HASH_COMBINE( seed, inputAttachmentAspectReference.aspectMask ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::InstanceCreateInfo const & instanceCreateInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, instanceCreateInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, instanceCreateInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, instanceCreateInfo.flags ); VULKAN_HPP_HASH_COMBINE( seed, instanceCreateInfo.pApplicationInfo ); VULKAN_HPP_HASH_COMBINE( seed, instanceCreateInfo.enabledLayerCount ); for ( size_t i = 0; i < instanceCreateInfo.enabledLayerCount; ++i ) { for ( const char * p = instanceCreateInfo.ppEnabledLayerNames[i]; *p != '\0'; ++p ) { VULKAN_HPP_HASH_COMBINE( seed, *p ); } } VULKAN_HPP_HASH_COMBINE( seed, instanceCreateInfo.enabledExtensionCount ); for ( size_t i = 0; i < instanceCreateInfo.enabledExtensionCount; ++i ) { for ( const char * p = instanceCreateInfo.ppEnabledExtensionNames[i]; *p != '\0'; ++p ) { VULKAN_HPP_HASH_COMBINE( seed, *p ); } } return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::LatencySleepInfoNV const & latencySleepInfoNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, latencySleepInfoNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, latencySleepInfoNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, latencySleepInfoNV.signalSemaphore ); VULKAN_HPP_HASH_COMBINE( seed, latencySleepInfoNV.value ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::LatencySleepModeInfoNV const & latencySleepModeInfoNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, latencySleepModeInfoNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, latencySleepModeInfoNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, latencySleepModeInfoNV.lowLatencyMode ); VULKAN_HPP_HASH_COMBINE( seed, latencySleepModeInfoNV.lowLatencyBoost ); VULKAN_HPP_HASH_COMBINE( seed, latencySleepModeInfoNV.minimumIntervalUs ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::LatencySubmissionPresentIdNV const & latencySubmissionPresentIdNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, latencySubmissionPresentIdNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, latencySubmissionPresentIdNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, latencySubmissionPresentIdNV.presentID ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::LatencySurfaceCapabilitiesNV const & latencySurfaceCapabilitiesNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, latencySurfaceCapabilitiesNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, latencySurfaceCapabilitiesNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, latencySurfaceCapabilitiesNV.presentModeCount ); VULKAN_HPP_HASH_COMBINE( seed, latencySurfaceCapabilitiesNV.pPresentModes ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::LayerProperties const & layerProperties ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; for ( size_t i = 0; i < VK_MAX_EXTENSION_NAME_SIZE; ++i ) { VULKAN_HPP_HASH_COMBINE( seed, layerProperties.layerName[i] ); } VULKAN_HPP_HASH_COMBINE( seed, layerProperties.specVersion ); VULKAN_HPP_HASH_COMBINE( seed, layerProperties.implementationVersion ); for ( size_t i = 0; i < VK_MAX_DESCRIPTION_SIZE; ++i ) { VULKAN_HPP_HASH_COMBINE( seed, layerProperties.description[i] ); } return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::LayerSettingEXT const & layerSettingEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; for ( const char * p = layerSettingEXT.pLayerName; *p != '\0'; ++p ) { VULKAN_HPP_HASH_COMBINE( seed, *p ); } for ( const char * p = layerSettingEXT.pSettingName; *p != '\0'; ++p ) { VULKAN_HPP_HASH_COMBINE( seed, *p ); } VULKAN_HPP_HASH_COMBINE( seed, layerSettingEXT.type ); VULKAN_HPP_HASH_COMBINE( seed, layerSettingEXT.valueCount ); VULKAN_HPP_HASH_COMBINE( seed, layerSettingEXT.pValues ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::LayerSettingsCreateInfoEXT const & layerSettingsCreateInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, layerSettingsCreateInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, layerSettingsCreateInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, layerSettingsCreateInfoEXT.settingCount ); VULKAN_HPP_HASH_COMBINE( seed, layerSettingsCreateInfoEXT.pSettings ); return seed; } }; # if defined( VK_USE_PLATFORM_MACOS_MVK ) template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::MacOSSurfaceCreateInfoMVK const & macOSSurfaceCreateInfoMVK ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, macOSSurfaceCreateInfoMVK.sType ); VULKAN_HPP_HASH_COMBINE( seed, macOSSurfaceCreateInfoMVK.pNext ); VULKAN_HPP_HASH_COMBINE( seed, macOSSurfaceCreateInfoMVK.flags ); VULKAN_HPP_HASH_COMBINE( seed, macOSSurfaceCreateInfoMVK.pView ); return seed; } }; # endif /*VK_USE_PLATFORM_MACOS_MVK*/ template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::MappedMemoryRange const & mappedMemoryRange ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, mappedMemoryRange.sType ); VULKAN_HPP_HASH_COMBINE( seed, mappedMemoryRange.pNext ); VULKAN_HPP_HASH_COMBINE( seed, mappedMemoryRange.memory ); VULKAN_HPP_HASH_COMBINE( seed, mappedMemoryRange.offset ); VULKAN_HPP_HASH_COMBINE( seed, mappedMemoryRange.size ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::MemoryAllocateFlagsInfo const & memoryAllocateFlagsInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, memoryAllocateFlagsInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, memoryAllocateFlagsInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, memoryAllocateFlagsInfo.flags ); VULKAN_HPP_HASH_COMBINE( seed, memoryAllocateFlagsInfo.deviceMask ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::MemoryAllocateInfo const & memoryAllocateInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, memoryAllocateInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, memoryAllocateInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, memoryAllocateInfo.allocationSize ); VULKAN_HPP_HASH_COMBINE( seed, memoryAllocateInfo.memoryTypeIndex ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::MemoryBarrier const & memoryBarrier ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, memoryBarrier.sType ); VULKAN_HPP_HASH_COMBINE( seed, memoryBarrier.pNext ); VULKAN_HPP_HASH_COMBINE( seed, memoryBarrier.srcAccessMask ); VULKAN_HPP_HASH_COMBINE( seed, memoryBarrier.dstAccessMask ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::MemoryBarrierAccessFlags3KHR const & memoryBarrierAccessFlags3KHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, memoryBarrierAccessFlags3KHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, memoryBarrierAccessFlags3KHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, memoryBarrierAccessFlags3KHR.srcAccessMask3 ); VULKAN_HPP_HASH_COMBINE( seed, memoryBarrierAccessFlags3KHR.dstAccessMask3 ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::MemoryDedicatedAllocateInfo const & memoryDedicatedAllocateInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, memoryDedicatedAllocateInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, memoryDedicatedAllocateInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, memoryDedicatedAllocateInfo.image ); VULKAN_HPP_HASH_COMBINE( seed, memoryDedicatedAllocateInfo.buffer ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::MemoryDedicatedRequirements const & memoryDedicatedRequirements ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, memoryDedicatedRequirements.sType ); VULKAN_HPP_HASH_COMBINE( seed, memoryDedicatedRequirements.pNext ); VULKAN_HPP_HASH_COMBINE( seed, memoryDedicatedRequirements.prefersDedicatedAllocation ); VULKAN_HPP_HASH_COMBINE( seed, memoryDedicatedRequirements.requiresDedicatedAllocation ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::MemoryFdPropertiesKHR const & memoryFdPropertiesKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, memoryFdPropertiesKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, memoryFdPropertiesKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, memoryFdPropertiesKHR.memoryTypeBits ); return seed; } }; # if defined( VK_USE_PLATFORM_ANDROID_KHR ) template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::MemoryGetAndroidHardwareBufferInfoANDROID const & memoryGetAndroidHardwareBufferInfoANDROID ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, memoryGetAndroidHardwareBufferInfoANDROID.sType ); VULKAN_HPP_HASH_COMBINE( seed, memoryGetAndroidHardwareBufferInfoANDROID.pNext ); VULKAN_HPP_HASH_COMBINE( seed, memoryGetAndroidHardwareBufferInfoANDROID.memory ); return seed; } }; # endif /*VK_USE_PLATFORM_ANDROID_KHR*/ template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::MemoryGetFdInfoKHR const & memoryGetFdInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, memoryGetFdInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, memoryGetFdInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, memoryGetFdInfoKHR.memory ); VULKAN_HPP_HASH_COMBINE( seed, memoryGetFdInfoKHR.handleType ); return seed; } }; # if defined( VK_USE_PLATFORM_METAL_EXT ) template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::MemoryGetMetalHandleInfoEXT const & memoryGetMetalHandleInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, memoryGetMetalHandleInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, memoryGetMetalHandleInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, memoryGetMetalHandleInfoEXT.memory ); VULKAN_HPP_HASH_COMBINE( seed, memoryGetMetalHandleInfoEXT.handleType ); return seed; } }; # endif /*VK_USE_PLATFORM_METAL_EXT*/ template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::MemoryGetRemoteAddressInfoNV const & memoryGetRemoteAddressInfoNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, memoryGetRemoteAddressInfoNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, memoryGetRemoteAddressInfoNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, memoryGetRemoteAddressInfoNV.memory ); VULKAN_HPP_HASH_COMBINE( seed, memoryGetRemoteAddressInfoNV.handleType ); return seed; } }; # if defined( VK_USE_PLATFORM_WIN32_KHR ) template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::MemoryGetWin32HandleInfoKHR const & memoryGetWin32HandleInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, memoryGetWin32HandleInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, memoryGetWin32HandleInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, memoryGetWin32HandleInfoKHR.memory ); VULKAN_HPP_HASH_COMBINE( seed, memoryGetWin32HandleInfoKHR.handleType ); return seed; } }; # endif /*VK_USE_PLATFORM_WIN32_KHR*/ # if defined( VK_USE_PLATFORM_FUCHSIA ) template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::MemoryGetZirconHandleInfoFUCHSIA const & memoryGetZirconHandleInfoFUCHSIA ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, memoryGetZirconHandleInfoFUCHSIA.sType ); VULKAN_HPP_HASH_COMBINE( seed, memoryGetZirconHandleInfoFUCHSIA.pNext ); VULKAN_HPP_HASH_COMBINE( seed, memoryGetZirconHandleInfoFUCHSIA.memory ); VULKAN_HPP_HASH_COMBINE( seed, memoryGetZirconHandleInfoFUCHSIA.handleType ); return seed; } }; # endif /*VK_USE_PLATFORM_FUCHSIA*/ template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::MemoryHeap const & memoryHeap ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, memoryHeap.size ); VULKAN_HPP_HASH_COMBINE( seed, memoryHeap.flags ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::MemoryHostPointerPropertiesEXT const & memoryHostPointerPropertiesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, memoryHostPointerPropertiesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, memoryHostPointerPropertiesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, memoryHostPointerPropertiesEXT.memoryTypeBits ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::MemoryMapInfo const & memoryMapInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, memoryMapInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, memoryMapInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, memoryMapInfo.flags ); VULKAN_HPP_HASH_COMBINE( seed, memoryMapInfo.memory ); VULKAN_HPP_HASH_COMBINE( seed, memoryMapInfo.offset ); VULKAN_HPP_HASH_COMBINE( seed, memoryMapInfo.size ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::MemoryMapPlacedInfoEXT const & memoryMapPlacedInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, memoryMapPlacedInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, memoryMapPlacedInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, memoryMapPlacedInfoEXT.pPlacedAddress ); return seed; } }; # if defined( VK_USE_PLATFORM_METAL_EXT ) template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::MemoryMetalHandlePropertiesEXT const & memoryMetalHandlePropertiesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, memoryMetalHandlePropertiesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, memoryMetalHandlePropertiesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, memoryMetalHandlePropertiesEXT.memoryTypeBits ); return seed; } }; # endif /*VK_USE_PLATFORM_METAL_EXT*/ template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::MemoryOpaqueCaptureAddressAllocateInfo const & memoryOpaqueCaptureAddressAllocateInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, memoryOpaqueCaptureAddressAllocateInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, memoryOpaqueCaptureAddressAllocateInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, memoryOpaqueCaptureAddressAllocateInfo.opaqueCaptureAddress ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::MemoryPriorityAllocateInfoEXT const & memoryPriorityAllocateInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, memoryPriorityAllocateInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, memoryPriorityAllocateInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, memoryPriorityAllocateInfoEXT.priority ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::MemoryRequirements const & memoryRequirements ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, memoryRequirements.size ); VULKAN_HPP_HASH_COMBINE( seed, memoryRequirements.alignment ); VULKAN_HPP_HASH_COMBINE( seed, memoryRequirements.memoryTypeBits ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::MemoryRequirements2 const & memoryRequirements2 ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, memoryRequirements2.sType ); VULKAN_HPP_HASH_COMBINE( seed, memoryRequirements2.pNext ); VULKAN_HPP_HASH_COMBINE( seed, memoryRequirements2.memoryRequirements ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::MemoryType const & memoryType ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, memoryType.propertyFlags ); VULKAN_HPP_HASH_COMBINE( seed, memoryType.heapIndex ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::MemoryUnmapInfo const & memoryUnmapInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, memoryUnmapInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, memoryUnmapInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, memoryUnmapInfo.flags ); VULKAN_HPP_HASH_COMBINE( seed, memoryUnmapInfo.memory ); return seed; } }; # if defined( VK_USE_PLATFORM_WIN32_KHR ) template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::MemoryWin32HandlePropertiesKHR const & memoryWin32HandlePropertiesKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, memoryWin32HandlePropertiesKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, memoryWin32HandlePropertiesKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, memoryWin32HandlePropertiesKHR.memoryTypeBits ); return seed; } }; # endif /*VK_USE_PLATFORM_WIN32_KHR*/ # if defined( VK_USE_PLATFORM_FUCHSIA ) template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::MemoryZirconHandlePropertiesFUCHSIA const & memoryZirconHandlePropertiesFUCHSIA ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, memoryZirconHandlePropertiesFUCHSIA.sType ); VULKAN_HPP_HASH_COMBINE( seed, memoryZirconHandlePropertiesFUCHSIA.pNext ); VULKAN_HPP_HASH_COMBINE( seed, memoryZirconHandlePropertiesFUCHSIA.memoryTypeBits ); return seed; } }; # endif /*VK_USE_PLATFORM_FUCHSIA*/ # if defined( VK_USE_PLATFORM_METAL_EXT ) template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::MetalSurfaceCreateInfoEXT const & metalSurfaceCreateInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, metalSurfaceCreateInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, metalSurfaceCreateInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, metalSurfaceCreateInfoEXT.flags ); VULKAN_HPP_HASH_COMBINE( seed, metalSurfaceCreateInfoEXT.pLayer ); return seed; } }; # endif /*VK_USE_PLATFORM_METAL_EXT*/ template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::MicromapBuildSizesInfoEXT const & micromapBuildSizesInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, micromapBuildSizesInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, micromapBuildSizesInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, micromapBuildSizesInfoEXT.micromapSize ); VULKAN_HPP_HASH_COMBINE( seed, micromapBuildSizesInfoEXT.buildScratchSize ); VULKAN_HPP_HASH_COMBINE( seed, micromapBuildSizesInfoEXT.discardable ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::MicromapCreateInfoEXT const & micromapCreateInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, micromapCreateInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, micromapCreateInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, micromapCreateInfoEXT.createFlags ); VULKAN_HPP_HASH_COMBINE( seed, micromapCreateInfoEXT.buffer ); VULKAN_HPP_HASH_COMBINE( seed, micromapCreateInfoEXT.offset ); VULKAN_HPP_HASH_COMBINE( seed, micromapCreateInfoEXT.size ); VULKAN_HPP_HASH_COMBINE( seed, micromapCreateInfoEXT.type ); VULKAN_HPP_HASH_COMBINE( seed, micromapCreateInfoEXT.deviceAddress ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::MicromapTriangleEXT const & micromapTriangleEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, micromapTriangleEXT.dataOffset ); VULKAN_HPP_HASH_COMBINE( seed, micromapTriangleEXT.subdivisionLevel ); VULKAN_HPP_HASH_COMBINE( seed, micromapTriangleEXT.format ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::MicromapVersionInfoEXT const & micromapVersionInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, micromapVersionInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, micromapVersionInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, micromapVersionInfoEXT.pVersionData ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::MultiDrawIndexedInfoEXT const & multiDrawIndexedInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, multiDrawIndexedInfoEXT.firstIndex ); VULKAN_HPP_HASH_COMBINE( seed, multiDrawIndexedInfoEXT.indexCount ); VULKAN_HPP_HASH_COMBINE( seed, multiDrawIndexedInfoEXT.vertexOffset ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::MultiDrawInfoEXT const & multiDrawInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, multiDrawInfoEXT.firstVertex ); VULKAN_HPP_HASH_COMBINE( seed, multiDrawInfoEXT.vertexCount ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::MultisamplePropertiesEXT const & multisamplePropertiesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, multisamplePropertiesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, multisamplePropertiesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, multisamplePropertiesEXT.maxSampleLocationGridSize ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::MultisampledRenderToSingleSampledInfoEXT const & multisampledRenderToSingleSampledInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, multisampledRenderToSingleSampledInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, multisampledRenderToSingleSampledInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, multisampledRenderToSingleSampledInfoEXT.multisampledRenderToSingleSampledEnable ); VULKAN_HPP_HASH_COMBINE( seed, multisampledRenderToSingleSampledInfoEXT.rasterizationSamples ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::MultiviewPerViewAttributesInfoNVX const & multiviewPerViewAttributesInfoNVX ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, multiviewPerViewAttributesInfoNVX.sType ); VULKAN_HPP_HASH_COMBINE( seed, multiviewPerViewAttributesInfoNVX.pNext ); VULKAN_HPP_HASH_COMBINE( seed, multiviewPerViewAttributesInfoNVX.perViewAttributes ); VULKAN_HPP_HASH_COMBINE( seed, multiviewPerViewAttributesInfoNVX.perViewAttributesPositionXOnly ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::MultiviewPerViewRenderAreasRenderPassBeginInfoQCOM const & multiviewPerViewRenderAreasRenderPassBeginInfoQCOM ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, multiviewPerViewRenderAreasRenderPassBeginInfoQCOM.sType ); VULKAN_HPP_HASH_COMBINE( seed, multiviewPerViewRenderAreasRenderPassBeginInfoQCOM.pNext ); VULKAN_HPP_HASH_COMBINE( seed, multiviewPerViewRenderAreasRenderPassBeginInfoQCOM.perViewRenderAreaCount ); VULKAN_HPP_HASH_COMBINE( seed, multiviewPerViewRenderAreasRenderPassBeginInfoQCOM.pPerViewRenderAreas ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::MutableDescriptorTypeListEXT const & mutableDescriptorTypeListEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, mutableDescriptorTypeListEXT.descriptorTypeCount ); VULKAN_HPP_HASH_COMBINE( seed, mutableDescriptorTypeListEXT.pDescriptorTypes ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::MutableDescriptorTypeCreateInfoEXT const & mutableDescriptorTypeCreateInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, mutableDescriptorTypeCreateInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, mutableDescriptorTypeCreateInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, mutableDescriptorTypeCreateInfoEXT.mutableDescriptorTypeListCount ); VULKAN_HPP_HASH_COMBINE( seed, mutableDescriptorTypeCreateInfoEXT.pMutableDescriptorTypeLists ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::OpaqueCaptureDescriptorDataCreateInfoEXT const & opaqueCaptureDescriptorDataCreateInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, opaqueCaptureDescriptorDataCreateInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, opaqueCaptureDescriptorDataCreateInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, opaqueCaptureDescriptorDataCreateInfoEXT.opaqueCaptureDescriptorData ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::OpticalFlowExecuteInfoNV const & opticalFlowExecuteInfoNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, opticalFlowExecuteInfoNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, opticalFlowExecuteInfoNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, opticalFlowExecuteInfoNV.flags ); VULKAN_HPP_HASH_COMBINE( seed, opticalFlowExecuteInfoNV.regionCount ); VULKAN_HPP_HASH_COMBINE( seed, opticalFlowExecuteInfoNV.pRegions ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::OpticalFlowImageFormatInfoNV const & opticalFlowImageFormatInfoNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, opticalFlowImageFormatInfoNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, opticalFlowImageFormatInfoNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, opticalFlowImageFormatInfoNV.usage ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::OpticalFlowImageFormatPropertiesNV const & opticalFlowImageFormatPropertiesNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, opticalFlowImageFormatPropertiesNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, opticalFlowImageFormatPropertiesNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, opticalFlowImageFormatPropertiesNV.format ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::OpticalFlowSessionCreateInfoNV const & opticalFlowSessionCreateInfoNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, opticalFlowSessionCreateInfoNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, opticalFlowSessionCreateInfoNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, opticalFlowSessionCreateInfoNV.width ); VULKAN_HPP_HASH_COMBINE( seed, opticalFlowSessionCreateInfoNV.height ); VULKAN_HPP_HASH_COMBINE( seed, opticalFlowSessionCreateInfoNV.imageFormat ); VULKAN_HPP_HASH_COMBINE( seed, opticalFlowSessionCreateInfoNV.flowVectorFormat ); VULKAN_HPP_HASH_COMBINE( seed, opticalFlowSessionCreateInfoNV.costFormat ); VULKAN_HPP_HASH_COMBINE( seed, opticalFlowSessionCreateInfoNV.outputGridSize ); VULKAN_HPP_HASH_COMBINE( seed, opticalFlowSessionCreateInfoNV.hintGridSize ); VULKAN_HPP_HASH_COMBINE( seed, opticalFlowSessionCreateInfoNV.performanceLevel ); VULKAN_HPP_HASH_COMBINE( seed, opticalFlowSessionCreateInfoNV.flags ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::OpticalFlowSessionCreatePrivateDataInfoNV const & opticalFlowSessionCreatePrivateDataInfoNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, opticalFlowSessionCreatePrivateDataInfoNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, opticalFlowSessionCreatePrivateDataInfoNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, opticalFlowSessionCreatePrivateDataInfoNV.id ); VULKAN_HPP_HASH_COMBINE( seed, opticalFlowSessionCreatePrivateDataInfoNV.size ); VULKAN_HPP_HASH_COMBINE( seed, opticalFlowSessionCreatePrivateDataInfoNV.pPrivateData ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::OutOfBandQueueTypeInfoNV const & outOfBandQueueTypeInfoNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, outOfBandQueueTypeInfoNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, outOfBandQueueTypeInfoNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, outOfBandQueueTypeInfoNV.queueType ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PartitionedAccelerationStructureFlagsNV const & partitionedAccelerationStructureFlagsNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, partitionedAccelerationStructureFlagsNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, partitionedAccelerationStructureFlagsNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, partitionedAccelerationStructureFlagsNV.enablePartitionTranslation ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PartitionedAccelerationStructureUpdateInstanceDataNV const & partitionedAccelerationStructureUpdateInstanceDataNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, partitionedAccelerationStructureUpdateInstanceDataNV.instanceIndex ); VULKAN_HPP_HASH_COMBINE( seed, partitionedAccelerationStructureUpdateInstanceDataNV.instanceContributionToHitGroupIndex ); VULKAN_HPP_HASH_COMBINE( seed, partitionedAccelerationStructureUpdateInstanceDataNV.accelerationStructure ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PartitionedAccelerationStructureWriteInstanceDataNV const & partitionedAccelerationStructureWriteInstanceDataNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, partitionedAccelerationStructureWriteInstanceDataNV.transform ); for ( size_t i = 0; i < 6; ++i ) { VULKAN_HPP_HASH_COMBINE( seed, partitionedAccelerationStructureWriteInstanceDataNV.explicitAABB[i] ); } VULKAN_HPP_HASH_COMBINE( seed, partitionedAccelerationStructureWriteInstanceDataNV.instanceID ); VULKAN_HPP_HASH_COMBINE( seed, partitionedAccelerationStructureWriteInstanceDataNV.instanceMask ); VULKAN_HPP_HASH_COMBINE( seed, partitionedAccelerationStructureWriteInstanceDataNV.instanceContributionToHitGroupIndex ); VULKAN_HPP_HASH_COMBINE( seed, partitionedAccelerationStructureWriteInstanceDataNV.instanceFlags ); VULKAN_HPP_HASH_COMBINE( seed, partitionedAccelerationStructureWriteInstanceDataNV.instanceIndex ); VULKAN_HPP_HASH_COMBINE( seed, partitionedAccelerationStructureWriteInstanceDataNV.partitionIndex ); VULKAN_HPP_HASH_COMBINE( seed, partitionedAccelerationStructureWriteInstanceDataNV.accelerationStructure ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PartitionedAccelerationStructureWritePartitionTranslationDataNV const & partitionedAccelerationStructureWritePartitionTranslationDataNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, partitionedAccelerationStructureWritePartitionTranslationDataNV.partitionIndex ); for ( size_t i = 0; i < 3; ++i ) { VULKAN_HPP_HASH_COMBINE( seed, partitionedAccelerationStructureWritePartitionTranslationDataNV.partitionTranslation[i] ); } return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PastPresentationTimingGOOGLE const & pastPresentationTimingGOOGLE ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, pastPresentationTimingGOOGLE.presentID ); VULKAN_HPP_HASH_COMBINE( seed, pastPresentationTimingGOOGLE.desiredPresentTime ); VULKAN_HPP_HASH_COMBINE( seed, pastPresentationTimingGOOGLE.actualPresentTime ); VULKAN_HPP_HASH_COMBINE( seed, pastPresentationTimingGOOGLE.earliestPresentTime ); VULKAN_HPP_HASH_COMBINE( seed, pastPresentationTimingGOOGLE.presentMargin ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PerformanceConfigurationAcquireInfoINTEL const & performanceConfigurationAcquireInfoINTEL ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, performanceConfigurationAcquireInfoINTEL.sType ); VULKAN_HPP_HASH_COMBINE( seed, performanceConfigurationAcquireInfoINTEL.pNext ); VULKAN_HPP_HASH_COMBINE( seed, performanceConfigurationAcquireInfoINTEL.type ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PerformanceCounterDescriptionKHR const & performanceCounterDescriptionKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, performanceCounterDescriptionKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, performanceCounterDescriptionKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, performanceCounterDescriptionKHR.flags ); for ( size_t i = 0; i < VK_MAX_DESCRIPTION_SIZE; ++i ) { VULKAN_HPP_HASH_COMBINE( seed, performanceCounterDescriptionKHR.name[i] ); } for ( size_t i = 0; i < VK_MAX_DESCRIPTION_SIZE; ++i ) { VULKAN_HPP_HASH_COMBINE( seed, performanceCounterDescriptionKHR.category[i] ); } for ( size_t i = 0; i < VK_MAX_DESCRIPTION_SIZE; ++i ) { VULKAN_HPP_HASH_COMBINE( seed, performanceCounterDescriptionKHR.description[i] ); } return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PerformanceCounterKHR const & performanceCounterKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, performanceCounterKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, performanceCounterKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, performanceCounterKHR.unit ); VULKAN_HPP_HASH_COMBINE( seed, performanceCounterKHR.scope ); VULKAN_HPP_HASH_COMBINE( seed, performanceCounterKHR.storage ); for ( size_t i = 0; i < VK_UUID_SIZE; ++i ) { VULKAN_HPP_HASH_COMBINE( seed, performanceCounterKHR.uuid[i] ); } return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PerformanceMarkerInfoINTEL const & performanceMarkerInfoINTEL ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, performanceMarkerInfoINTEL.sType ); VULKAN_HPP_HASH_COMBINE( seed, performanceMarkerInfoINTEL.pNext ); VULKAN_HPP_HASH_COMBINE( seed, performanceMarkerInfoINTEL.marker ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PerformanceOverrideInfoINTEL const & performanceOverrideInfoINTEL ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, performanceOverrideInfoINTEL.sType ); VULKAN_HPP_HASH_COMBINE( seed, performanceOverrideInfoINTEL.pNext ); VULKAN_HPP_HASH_COMBINE( seed, performanceOverrideInfoINTEL.type ); VULKAN_HPP_HASH_COMBINE( seed, performanceOverrideInfoINTEL.enable ); VULKAN_HPP_HASH_COMBINE( seed, performanceOverrideInfoINTEL.parameter ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PerformanceQuerySubmitInfoKHR const & performanceQuerySubmitInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, performanceQuerySubmitInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, performanceQuerySubmitInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, performanceQuerySubmitInfoKHR.counterPassIndex ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PerformanceStreamMarkerInfoINTEL const & performanceStreamMarkerInfoINTEL ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, performanceStreamMarkerInfoINTEL.sType ); VULKAN_HPP_HASH_COMBINE( seed, performanceStreamMarkerInfoINTEL.pNext ); VULKAN_HPP_HASH_COMBINE( seed, performanceStreamMarkerInfoINTEL.marker ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDevice16BitStorageFeatures const & physicalDevice16BitStorageFeatures ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDevice16BitStorageFeatures.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevice16BitStorageFeatures.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevice16BitStorageFeatures.storageBuffer16BitAccess ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevice16BitStorageFeatures.uniformAndStorageBuffer16BitAccess ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevice16BitStorageFeatures.storagePushConstant16 ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevice16BitStorageFeatures.storageInputOutput16 ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDevice4444FormatsFeaturesEXT const & physicalDevice4444FormatsFeaturesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDevice4444FormatsFeaturesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevice4444FormatsFeaturesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevice4444FormatsFeaturesEXT.formatA4R4G4B4 ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevice4444FormatsFeaturesEXT.formatA4B4G4R4 ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDevice8BitStorageFeatures const & physicalDevice8BitStorageFeatures ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDevice8BitStorageFeatures.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevice8BitStorageFeatures.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevice8BitStorageFeatures.storageBuffer8BitAccess ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevice8BitStorageFeatures.uniformAndStorageBuffer8BitAccess ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevice8BitStorageFeatures.storagePushConstant8 ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceASTCDecodeFeaturesEXT const & physicalDeviceASTCDecodeFeaturesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceASTCDecodeFeaturesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceASTCDecodeFeaturesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceASTCDecodeFeaturesEXT.decodeModeSharedExponent ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceAccelerationStructureFeaturesKHR const & physicalDeviceAccelerationStructureFeaturesKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceAccelerationStructureFeaturesKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceAccelerationStructureFeaturesKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceAccelerationStructureFeaturesKHR.accelerationStructure ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceAccelerationStructureFeaturesKHR.accelerationStructureCaptureReplay ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceAccelerationStructureFeaturesKHR.accelerationStructureIndirectBuild ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceAccelerationStructureFeaturesKHR.accelerationStructureHostCommands ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceAccelerationStructureFeaturesKHR.descriptorBindingAccelerationStructureUpdateAfterBind ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceAccelerationStructurePropertiesKHR const & physicalDeviceAccelerationStructurePropertiesKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceAccelerationStructurePropertiesKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceAccelerationStructurePropertiesKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceAccelerationStructurePropertiesKHR.maxGeometryCount ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceAccelerationStructurePropertiesKHR.maxInstanceCount ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceAccelerationStructurePropertiesKHR.maxPrimitiveCount ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceAccelerationStructurePropertiesKHR.maxPerStageDescriptorAccelerationStructures ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceAccelerationStructurePropertiesKHR.maxPerStageDescriptorUpdateAfterBindAccelerationStructures ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceAccelerationStructurePropertiesKHR.maxDescriptorSetAccelerationStructures ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceAccelerationStructurePropertiesKHR.maxDescriptorSetUpdateAfterBindAccelerationStructures ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceAccelerationStructurePropertiesKHR.minAccelerationStructureScratchOffsetAlignment ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceAddressBindingReportFeaturesEXT const & physicalDeviceAddressBindingReportFeaturesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceAddressBindingReportFeaturesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceAddressBindingReportFeaturesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceAddressBindingReportFeaturesEXT.reportAddressBinding ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceAmigoProfilingFeaturesSEC const & physicalDeviceAmigoProfilingFeaturesSEC ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceAmigoProfilingFeaturesSEC.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceAmigoProfilingFeaturesSEC.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceAmigoProfilingFeaturesSEC.amigoProfiling ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceAntiLagFeaturesAMD const & physicalDeviceAntiLagFeaturesAMD ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceAntiLagFeaturesAMD.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceAntiLagFeaturesAMD.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceAntiLagFeaturesAMD.antiLag ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT const & physicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT.attachmentFeedbackLoopDynamicState ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT const & physicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT.attachmentFeedbackLoopLayout ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceBlendOperationAdvancedFeaturesEXT const & physicalDeviceBlendOperationAdvancedFeaturesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceBlendOperationAdvancedFeaturesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceBlendOperationAdvancedFeaturesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceBlendOperationAdvancedFeaturesEXT.advancedBlendCoherentOperations ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceBlendOperationAdvancedPropertiesEXT const & physicalDeviceBlendOperationAdvancedPropertiesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceBlendOperationAdvancedPropertiesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceBlendOperationAdvancedPropertiesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceBlendOperationAdvancedPropertiesEXT.advancedBlendMaxColorAttachments ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceBlendOperationAdvancedPropertiesEXT.advancedBlendIndependentBlend ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceBlendOperationAdvancedPropertiesEXT.advancedBlendNonPremultipliedSrcColor ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceBlendOperationAdvancedPropertiesEXT.advancedBlendNonPremultipliedDstColor ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceBlendOperationAdvancedPropertiesEXT.advancedBlendCorrelatedOverlap ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceBlendOperationAdvancedPropertiesEXT.advancedBlendAllOperations ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceBorderColorSwizzleFeaturesEXT const & physicalDeviceBorderColorSwizzleFeaturesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceBorderColorSwizzleFeaturesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceBorderColorSwizzleFeaturesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceBorderColorSwizzleFeaturesEXT.borderColorSwizzle ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceBorderColorSwizzleFeaturesEXT.borderColorSwizzleFromImage ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceBufferDeviceAddressFeatures const & physicalDeviceBufferDeviceAddressFeatures ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceBufferDeviceAddressFeatures.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceBufferDeviceAddressFeatures.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceBufferDeviceAddressFeatures.bufferDeviceAddress ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceBufferDeviceAddressFeatures.bufferDeviceAddressCaptureReplay ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceBufferDeviceAddressFeatures.bufferDeviceAddressMultiDevice ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceBufferDeviceAddressFeaturesEXT const & physicalDeviceBufferDeviceAddressFeaturesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceBufferDeviceAddressFeaturesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceBufferDeviceAddressFeaturesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceBufferDeviceAddressFeaturesEXT.bufferDeviceAddress ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceBufferDeviceAddressFeaturesEXT.bufferDeviceAddressCaptureReplay ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceBufferDeviceAddressFeaturesEXT.bufferDeviceAddressMultiDevice ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceClusterAccelerationStructureFeaturesNV const & physicalDeviceClusterAccelerationStructureFeaturesNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceClusterAccelerationStructureFeaturesNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceClusterAccelerationStructureFeaturesNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceClusterAccelerationStructureFeaturesNV.clusterAccelerationStructure ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceClusterAccelerationStructurePropertiesNV const & physicalDeviceClusterAccelerationStructurePropertiesNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceClusterAccelerationStructurePropertiesNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceClusterAccelerationStructurePropertiesNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceClusterAccelerationStructurePropertiesNV.maxVerticesPerCluster ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceClusterAccelerationStructurePropertiesNV.maxTrianglesPerCluster ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceClusterAccelerationStructurePropertiesNV.clusterScratchByteAlignment ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceClusterAccelerationStructurePropertiesNV.clusterByteAlignment ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceClusterAccelerationStructurePropertiesNV.clusterTemplateByteAlignment ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceClusterAccelerationStructurePropertiesNV.clusterBottomLevelByteAlignment ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceClusterAccelerationStructurePropertiesNV.clusterTemplateBoundsByteAlignment ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceClusterAccelerationStructurePropertiesNV.maxClusterGeometryIndex ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceClusterCullingShaderFeaturesHUAWEI const & physicalDeviceClusterCullingShaderFeaturesHUAWEI ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceClusterCullingShaderFeaturesHUAWEI.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceClusterCullingShaderFeaturesHUAWEI.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceClusterCullingShaderFeaturesHUAWEI.clustercullingShader ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceClusterCullingShaderFeaturesHUAWEI.multiviewClusterCullingShader ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceClusterCullingShaderPropertiesHUAWEI const & physicalDeviceClusterCullingShaderPropertiesHUAWEI ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceClusterCullingShaderPropertiesHUAWEI.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceClusterCullingShaderPropertiesHUAWEI.pNext ); for ( size_t i = 0; i < 3; ++i ) { VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceClusterCullingShaderPropertiesHUAWEI.maxWorkGroupCount[i] ); } for ( size_t i = 0; i < 3; ++i ) { VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceClusterCullingShaderPropertiesHUAWEI.maxWorkGroupSize[i] ); } VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceClusterCullingShaderPropertiesHUAWEI.maxOutputClusterCount ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceClusterCullingShaderPropertiesHUAWEI.indirectBufferOffsetAlignment ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI const & physicalDeviceClusterCullingShaderVrsFeaturesHUAWEI ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceClusterCullingShaderVrsFeaturesHUAWEI.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceClusterCullingShaderVrsFeaturesHUAWEI.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceClusterCullingShaderVrsFeaturesHUAWEI.clusterShadingRate ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceCoherentMemoryFeaturesAMD const & physicalDeviceCoherentMemoryFeaturesAMD ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCoherentMemoryFeaturesAMD.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCoherentMemoryFeaturesAMD.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCoherentMemoryFeaturesAMD.deviceCoherentMemory ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceColorWriteEnableFeaturesEXT const & physicalDeviceColorWriteEnableFeaturesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceColorWriteEnableFeaturesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceColorWriteEnableFeaturesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceColorWriteEnableFeaturesEXT.colorWriteEnable ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceCommandBufferInheritanceFeaturesNV const & physicalDeviceCommandBufferInheritanceFeaturesNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCommandBufferInheritanceFeaturesNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCommandBufferInheritanceFeaturesNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCommandBufferInheritanceFeaturesNV.commandBufferInheritance ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceComputeShaderDerivativesFeaturesKHR const & physicalDeviceComputeShaderDerivativesFeaturesKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceComputeShaderDerivativesFeaturesKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceComputeShaderDerivativesFeaturesKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceComputeShaderDerivativesFeaturesKHR.computeDerivativeGroupQuads ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceComputeShaderDerivativesFeaturesKHR.computeDerivativeGroupLinear ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceComputeShaderDerivativesPropertiesKHR const & physicalDeviceComputeShaderDerivativesPropertiesKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceComputeShaderDerivativesPropertiesKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceComputeShaderDerivativesPropertiesKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceComputeShaderDerivativesPropertiesKHR.meshAndTaskShaderDerivatives ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceConditionalRenderingFeaturesEXT const & physicalDeviceConditionalRenderingFeaturesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceConditionalRenderingFeaturesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceConditionalRenderingFeaturesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceConditionalRenderingFeaturesEXT.conditionalRendering ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceConditionalRenderingFeaturesEXT.inheritedConditionalRendering ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceConservativeRasterizationPropertiesEXT const & physicalDeviceConservativeRasterizationPropertiesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceConservativeRasterizationPropertiesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceConservativeRasterizationPropertiesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceConservativeRasterizationPropertiesEXT.primitiveOverestimationSize ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceConservativeRasterizationPropertiesEXT.maxExtraPrimitiveOverestimationSize ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceConservativeRasterizationPropertiesEXT.extraPrimitiveOverestimationSizeGranularity ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceConservativeRasterizationPropertiesEXT.primitiveUnderestimation ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceConservativeRasterizationPropertiesEXT.conservativePointAndLineRasterization ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceConservativeRasterizationPropertiesEXT.degenerateTrianglesRasterized ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceConservativeRasterizationPropertiesEXT.degenerateLinesRasterized ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceConservativeRasterizationPropertiesEXT.fullyCoveredFragmentShaderInputVariable ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceConservativeRasterizationPropertiesEXT.conservativeRasterizationPostDepthCoverage ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceCooperativeMatrix2FeaturesNV const & physicalDeviceCooperativeMatrix2FeaturesNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCooperativeMatrix2FeaturesNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCooperativeMatrix2FeaturesNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCooperativeMatrix2FeaturesNV.cooperativeMatrixWorkgroupScope ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCooperativeMatrix2FeaturesNV.cooperativeMatrixFlexibleDimensions ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCooperativeMatrix2FeaturesNV.cooperativeMatrixReductions ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCooperativeMatrix2FeaturesNV.cooperativeMatrixConversions ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCooperativeMatrix2FeaturesNV.cooperativeMatrixPerElementOperations ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCooperativeMatrix2FeaturesNV.cooperativeMatrixTensorAddressing ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCooperativeMatrix2FeaturesNV.cooperativeMatrixBlockLoads ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceCooperativeMatrix2PropertiesNV const & physicalDeviceCooperativeMatrix2PropertiesNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCooperativeMatrix2PropertiesNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCooperativeMatrix2PropertiesNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCooperativeMatrix2PropertiesNV.cooperativeMatrixWorkgroupScopeMaxWorkgroupSize ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCooperativeMatrix2PropertiesNV.cooperativeMatrixFlexibleDimensionsMaxDimension ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCooperativeMatrix2PropertiesNV.cooperativeMatrixWorkgroupScopeReservedSharedMemory ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceCooperativeMatrixFeaturesKHR const & physicalDeviceCooperativeMatrixFeaturesKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCooperativeMatrixFeaturesKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCooperativeMatrixFeaturesKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCooperativeMatrixFeaturesKHR.cooperativeMatrix ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCooperativeMatrixFeaturesKHR.cooperativeMatrixRobustBufferAccess ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceCooperativeMatrixFeaturesNV const & physicalDeviceCooperativeMatrixFeaturesNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCooperativeMatrixFeaturesNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCooperativeMatrixFeaturesNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCooperativeMatrixFeaturesNV.cooperativeMatrix ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCooperativeMatrixFeaturesNV.cooperativeMatrixRobustBufferAccess ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceCooperativeMatrixPropertiesKHR const & physicalDeviceCooperativeMatrixPropertiesKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCooperativeMatrixPropertiesKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCooperativeMatrixPropertiesKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCooperativeMatrixPropertiesKHR.cooperativeMatrixSupportedStages ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceCooperativeMatrixPropertiesNV const & physicalDeviceCooperativeMatrixPropertiesNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCooperativeMatrixPropertiesNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCooperativeMatrixPropertiesNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCooperativeMatrixPropertiesNV.cooperativeMatrixSupportedStages ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceCooperativeVectorFeaturesNV const & physicalDeviceCooperativeVectorFeaturesNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCooperativeVectorFeaturesNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCooperativeVectorFeaturesNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCooperativeVectorFeaturesNV.cooperativeVector ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCooperativeVectorFeaturesNV.cooperativeVectorTraining ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceCooperativeVectorPropertiesNV const & physicalDeviceCooperativeVectorPropertiesNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCooperativeVectorPropertiesNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCooperativeVectorPropertiesNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCooperativeVectorPropertiesNV.cooperativeVectorSupportedStages ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCooperativeVectorPropertiesNV.cooperativeVectorTrainingFloat16Accumulation ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCooperativeVectorPropertiesNV.cooperativeVectorTrainingFloat32Accumulation ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCooperativeVectorPropertiesNV.maxCooperativeVectorComponents ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceCopyMemoryIndirectFeaturesNV const & physicalDeviceCopyMemoryIndirectFeaturesNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCopyMemoryIndirectFeaturesNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCopyMemoryIndirectFeaturesNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCopyMemoryIndirectFeaturesNV.indirectCopy ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceCopyMemoryIndirectPropertiesNV const & physicalDeviceCopyMemoryIndirectPropertiesNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCopyMemoryIndirectPropertiesNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCopyMemoryIndirectPropertiesNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCopyMemoryIndirectPropertiesNV.supportedQueues ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceCornerSampledImageFeaturesNV const & physicalDeviceCornerSampledImageFeaturesNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCornerSampledImageFeaturesNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCornerSampledImageFeaturesNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCornerSampledImageFeaturesNV.cornerSampledImage ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceCoverageReductionModeFeaturesNV const & physicalDeviceCoverageReductionModeFeaturesNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCoverageReductionModeFeaturesNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCoverageReductionModeFeaturesNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCoverageReductionModeFeaturesNV.coverageReductionMode ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceCubicClampFeaturesQCOM const & physicalDeviceCubicClampFeaturesQCOM ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCubicClampFeaturesQCOM.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCubicClampFeaturesQCOM.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCubicClampFeaturesQCOM.cubicRangeClamp ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceCubicWeightsFeaturesQCOM const & physicalDeviceCubicWeightsFeaturesQCOM ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCubicWeightsFeaturesQCOM.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCubicWeightsFeaturesQCOM.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCubicWeightsFeaturesQCOM.selectableCubicWeights ); return seed; } }; # if defined( VK_ENABLE_BETA_EXTENSIONS ) template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceCudaKernelLaunchFeaturesNV const & physicalDeviceCudaKernelLaunchFeaturesNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCudaKernelLaunchFeaturesNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCudaKernelLaunchFeaturesNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCudaKernelLaunchFeaturesNV.cudaKernelLaunchFeatures ); return seed; } }; # endif /*VK_ENABLE_BETA_EXTENSIONS*/ # if defined( VK_ENABLE_BETA_EXTENSIONS ) template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceCudaKernelLaunchPropertiesNV const & physicalDeviceCudaKernelLaunchPropertiesNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCudaKernelLaunchPropertiesNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCudaKernelLaunchPropertiesNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCudaKernelLaunchPropertiesNV.computeCapabilityMinor ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCudaKernelLaunchPropertiesNV.computeCapabilityMajor ); return seed; } }; # endif /*VK_ENABLE_BETA_EXTENSIONS*/ template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceCustomBorderColorFeaturesEXT const & physicalDeviceCustomBorderColorFeaturesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCustomBorderColorFeaturesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCustomBorderColorFeaturesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCustomBorderColorFeaturesEXT.customBorderColors ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCustomBorderColorFeaturesEXT.customBorderColorWithoutFormat ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceCustomBorderColorPropertiesEXT const & physicalDeviceCustomBorderColorPropertiesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCustomBorderColorPropertiesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCustomBorderColorPropertiesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceCustomBorderColorPropertiesEXT.maxCustomBorderColorSamplers ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV const & physicalDeviceDedicatedAllocationImageAliasingFeaturesNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDedicatedAllocationImageAliasingFeaturesNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDedicatedAllocationImageAliasingFeaturesNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDedicatedAllocationImageAliasingFeaturesNV.dedicatedAllocationImageAliasing ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceDepthBiasControlFeaturesEXT const & physicalDeviceDepthBiasControlFeaturesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDepthBiasControlFeaturesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDepthBiasControlFeaturesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDepthBiasControlFeaturesEXT.depthBiasControl ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDepthBiasControlFeaturesEXT.leastRepresentableValueForceUnormRepresentation ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDepthBiasControlFeaturesEXT.floatRepresentation ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDepthBiasControlFeaturesEXT.depthBiasExact ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceDepthClampControlFeaturesEXT const & physicalDeviceDepthClampControlFeaturesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDepthClampControlFeaturesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDepthClampControlFeaturesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDepthClampControlFeaturesEXT.depthClampControl ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceDepthClampZeroOneFeaturesKHR const & physicalDeviceDepthClampZeroOneFeaturesKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDepthClampZeroOneFeaturesKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDepthClampZeroOneFeaturesKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDepthClampZeroOneFeaturesKHR.depthClampZeroOne ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceDepthClipControlFeaturesEXT const & physicalDeviceDepthClipControlFeaturesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDepthClipControlFeaturesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDepthClipControlFeaturesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDepthClipControlFeaturesEXT.depthClipControl ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceDepthClipEnableFeaturesEXT const & physicalDeviceDepthClipEnableFeaturesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDepthClipEnableFeaturesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDepthClipEnableFeaturesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDepthClipEnableFeaturesEXT.depthClipEnable ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceDepthStencilResolveProperties const & physicalDeviceDepthStencilResolveProperties ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDepthStencilResolveProperties.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDepthStencilResolveProperties.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDepthStencilResolveProperties.supportedDepthResolveModes ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDepthStencilResolveProperties.supportedStencilResolveModes ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDepthStencilResolveProperties.independentResolveNone ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDepthStencilResolveProperties.independentResolve ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT const & physicalDeviceDescriptorBufferDensityMapPropertiesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorBufferDensityMapPropertiesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorBufferDensityMapPropertiesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorBufferDensityMapPropertiesEXT.combinedImageSamplerDensityMapDescriptorSize ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceDescriptorBufferFeaturesEXT const & physicalDeviceDescriptorBufferFeaturesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorBufferFeaturesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorBufferFeaturesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorBufferFeaturesEXT.descriptorBuffer ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorBufferFeaturesEXT.descriptorBufferCaptureReplay ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorBufferFeaturesEXT.descriptorBufferImageLayoutIgnored ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorBufferFeaturesEXT.descriptorBufferPushDescriptors ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceDescriptorBufferPropertiesEXT const & physicalDeviceDescriptorBufferPropertiesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorBufferPropertiesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorBufferPropertiesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorBufferPropertiesEXT.combinedImageSamplerDescriptorSingleArray ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorBufferPropertiesEXT.bufferlessPushDescriptors ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorBufferPropertiesEXT.allowSamplerImageViewPostSubmitCreation ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorBufferPropertiesEXT.descriptorBufferOffsetAlignment ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorBufferPropertiesEXT.maxDescriptorBufferBindings ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorBufferPropertiesEXT.maxResourceDescriptorBufferBindings ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorBufferPropertiesEXT.maxSamplerDescriptorBufferBindings ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorBufferPropertiesEXT.maxEmbeddedImmutableSamplerBindings ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorBufferPropertiesEXT.maxEmbeddedImmutableSamplers ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorBufferPropertiesEXT.bufferCaptureReplayDescriptorDataSize ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorBufferPropertiesEXT.imageCaptureReplayDescriptorDataSize ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorBufferPropertiesEXT.imageViewCaptureReplayDescriptorDataSize ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorBufferPropertiesEXT.samplerCaptureReplayDescriptorDataSize ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorBufferPropertiesEXT.accelerationStructureCaptureReplayDescriptorDataSize ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorBufferPropertiesEXT.samplerDescriptorSize ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorBufferPropertiesEXT.combinedImageSamplerDescriptorSize ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorBufferPropertiesEXT.sampledImageDescriptorSize ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorBufferPropertiesEXT.storageImageDescriptorSize ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorBufferPropertiesEXT.uniformTexelBufferDescriptorSize ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorBufferPropertiesEXT.robustUniformTexelBufferDescriptorSize ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorBufferPropertiesEXT.storageTexelBufferDescriptorSize ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorBufferPropertiesEXT.robustStorageTexelBufferDescriptorSize ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorBufferPropertiesEXT.uniformBufferDescriptorSize ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorBufferPropertiesEXT.robustUniformBufferDescriptorSize ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorBufferPropertiesEXT.storageBufferDescriptorSize ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorBufferPropertiesEXT.robustStorageBufferDescriptorSize ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorBufferPropertiesEXT.inputAttachmentDescriptorSize ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorBufferPropertiesEXT.accelerationStructureDescriptorSize ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorBufferPropertiesEXT.maxSamplerDescriptorBufferRange ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorBufferPropertiesEXT.maxResourceDescriptorBufferRange ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorBufferPropertiesEXT.samplerDescriptorBufferAddressSpaceSize ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorBufferPropertiesEXT.resourceDescriptorBufferAddressSpaceSize ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorBufferPropertiesEXT.descriptorBufferAddressSpaceSize ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceDescriptorIndexingFeatures const & physicalDeviceDescriptorIndexingFeatures ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingFeatures.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingFeatures.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingFeatures.shaderInputAttachmentArrayDynamicIndexing ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingFeatures.shaderUniformTexelBufferArrayDynamicIndexing ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingFeatures.shaderStorageTexelBufferArrayDynamicIndexing ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingFeatures.shaderUniformBufferArrayNonUniformIndexing ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingFeatures.shaderSampledImageArrayNonUniformIndexing ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingFeatures.shaderStorageBufferArrayNonUniformIndexing ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingFeatures.shaderStorageImageArrayNonUniformIndexing ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingFeatures.shaderInputAttachmentArrayNonUniformIndexing ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingFeatures.shaderUniformTexelBufferArrayNonUniformIndexing ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingFeatures.shaderStorageTexelBufferArrayNonUniformIndexing ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingFeatures.descriptorBindingUniformBufferUpdateAfterBind ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingFeatures.descriptorBindingSampledImageUpdateAfterBind ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingFeatures.descriptorBindingStorageImageUpdateAfterBind ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingFeatures.descriptorBindingStorageBufferUpdateAfterBind ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingFeatures.descriptorBindingUniformTexelBufferUpdateAfterBind ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingFeatures.descriptorBindingStorageTexelBufferUpdateAfterBind ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingFeatures.descriptorBindingUpdateUnusedWhilePending ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingFeatures.descriptorBindingPartiallyBound ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingFeatures.descriptorBindingVariableDescriptorCount ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingFeatures.runtimeDescriptorArray ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceDescriptorIndexingProperties const & physicalDeviceDescriptorIndexingProperties ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingProperties.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingProperties.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingProperties.maxUpdateAfterBindDescriptorsInAllPools ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingProperties.shaderUniformBufferArrayNonUniformIndexingNative ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingProperties.shaderSampledImageArrayNonUniformIndexingNative ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingProperties.shaderStorageBufferArrayNonUniformIndexingNative ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingProperties.shaderStorageImageArrayNonUniformIndexingNative ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingProperties.shaderInputAttachmentArrayNonUniformIndexingNative ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingProperties.robustBufferAccessUpdateAfterBind ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingProperties.quadDivergentImplicitLod ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingProperties.maxPerStageDescriptorUpdateAfterBindSamplers ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingProperties.maxPerStageDescriptorUpdateAfterBindUniformBuffers ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingProperties.maxPerStageDescriptorUpdateAfterBindStorageBuffers ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingProperties.maxPerStageDescriptorUpdateAfterBindSampledImages ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingProperties.maxPerStageDescriptorUpdateAfterBindStorageImages ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingProperties.maxPerStageDescriptorUpdateAfterBindInputAttachments ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingProperties.maxPerStageUpdateAfterBindResources ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingProperties.maxDescriptorSetUpdateAfterBindSamplers ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingProperties.maxDescriptorSetUpdateAfterBindUniformBuffers ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingProperties.maxDescriptorSetUpdateAfterBindUniformBuffersDynamic ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingProperties.maxDescriptorSetUpdateAfterBindStorageBuffers ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingProperties.maxDescriptorSetUpdateAfterBindStorageBuffersDynamic ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingProperties.maxDescriptorSetUpdateAfterBindSampledImages ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingProperties.maxDescriptorSetUpdateAfterBindStorageImages ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorIndexingProperties.maxDescriptorSetUpdateAfterBindInputAttachments ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceDescriptorPoolOverallocationFeaturesNV const & physicalDeviceDescriptorPoolOverallocationFeaturesNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorPoolOverallocationFeaturesNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorPoolOverallocationFeaturesNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorPoolOverallocationFeaturesNV.descriptorPoolOverallocation ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceDescriptorSetHostMappingFeaturesVALVE const & physicalDeviceDescriptorSetHostMappingFeaturesVALVE ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorSetHostMappingFeaturesVALVE.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorSetHostMappingFeaturesVALVE.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDescriptorSetHostMappingFeaturesVALVE.descriptorSetHostMapping ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV const & physicalDeviceDeviceGeneratedCommandsComputeFeaturesNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDeviceGeneratedCommandsComputeFeaturesNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDeviceGeneratedCommandsComputeFeaturesNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDeviceGeneratedCommandsComputeFeaturesNV.deviceGeneratedCompute ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDeviceGeneratedCommandsComputeFeaturesNV.deviceGeneratedComputePipelines ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDeviceGeneratedCommandsComputeFeaturesNV.deviceGeneratedComputeCaptureReplay ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceDeviceGeneratedCommandsFeaturesEXT const & physicalDeviceDeviceGeneratedCommandsFeaturesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDeviceGeneratedCommandsFeaturesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDeviceGeneratedCommandsFeaturesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDeviceGeneratedCommandsFeaturesEXT.deviceGeneratedCommands ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDeviceGeneratedCommandsFeaturesEXT.dynamicGeneratedPipelineLayout ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceDeviceGeneratedCommandsFeaturesNV const & physicalDeviceDeviceGeneratedCommandsFeaturesNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDeviceGeneratedCommandsFeaturesNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDeviceGeneratedCommandsFeaturesNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDeviceGeneratedCommandsFeaturesNV.deviceGeneratedCommands ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceDeviceGeneratedCommandsPropertiesEXT const & physicalDeviceDeviceGeneratedCommandsPropertiesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDeviceGeneratedCommandsPropertiesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDeviceGeneratedCommandsPropertiesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDeviceGeneratedCommandsPropertiesEXT.maxIndirectPipelineCount ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDeviceGeneratedCommandsPropertiesEXT.maxIndirectShaderObjectCount ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDeviceGeneratedCommandsPropertiesEXT.maxIndirectSequenceCount ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDeviceGeneratedCommandsPropertiesEXT.maxIndirectCommandsTokenCount ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDeviceGeneratedCommandsPropertiesEXT.maxIndirectCommandsTokenOffset ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDeviceGeneratedCommandsPropertiesEXT.maxIndirectCommandsIndirectStride ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDeviceGeneratedCommandsPropertiesEXT.supportedIndirectCommandsInputModes ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDeviceGeneratedCommandsPropertiesEXT.supportedIndirectCommandsShaderStages ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDeviceGeneratedCommandsPropertiesEXT.supportedIndirectCommandsShaderStagesPipelineBinding ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDeviceGeneratedCommandsPropertiesEXT.supportedIndirectCommandsShaderStagesShaderBinding ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDeviceGeneratedCommandsPropertiesEXT.deviceGeneratedCommandsTransformFeedback ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDeviceGeneratedCommandsPropertiesEXT.deviceGeneratedCommandsMultiDrawIndirectCount ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceDeviceGeneratedCommandsPropertiesNV const & physicalDeviceDeviceGeneratedCommandsPropertiesNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDeviceGeneratedCommandsPropertiesNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDeviceGeneratedCommandsPropertiesNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDeviceGeneratedCommandsPropertiesNV.maxGraphicsShaderGroupCount ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDeviceGeneratedCommandsPropertiesNV.maxIndirectSequenceCount ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDeviceGeneratedCommandsPropertiesNV.maxIndirectCommandsTokenCount ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDeviceGeneratedCommandsPropertiesNV.maxIndirectCommandsStreamCount ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDeviceGeneratedCommandsPropertiesNV.maxIndirectCommandsTokenOffset ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDeviceGeneratedCommandsPropertiesNV.maxIndirectCommandsStreamStride ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDeviceGeneratedCommandsPropertiesNV.minSequencesCountBufferOffsetAlignment ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDeviceGeneratedCommandsPropertiesNV.minSequencesIndexBufferOffsetAlignment ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDeviceGeneratedCommandsPropertiesNV.minIndirectCommandsBufferOffsetAlignment ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceDeviceMemoryReportFeaturesEXT const & physicalDeviceDeviceMemoryReportFeaturesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDeviceMemoryReportFeaturesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDeviceMemoryReportFeaturesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDeviceMemoryReportFeaturesEXT.deviceMemoryReport ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceDiagnosticsConfigFeaturesNV const & physicalDeviceDiagnosticsConfigFeaturesNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDiagnosticsConfigFeaturesNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDiagnosticsConfigFeaturesNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDiagnosticsConfigFeaturesNV.diagnosticsConfig ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceDiscardRectanglePropertiesEXT const & physicalDeviceDiscardRectanglePropertiesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDiscardRectanglePropertiesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDiscardRectanglePropertiesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDiscardRectanglePropertiesEXT.maxDiscardRectangles ); return seed; } }; # if defined( VK_ENABLE_BETA_EXTENSIONS ) template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceDisplacementMicromapFeaturesNV const & physicalDeviceDisplacementMicromapFeaturesNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDisplacementMicromapFeaturesNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDisplacementMicromapFeaturesNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDisplacementMicromapFeaturesNV.displacementMicromap ); return seed; } }; # endif /*VK_ENABLE_BETA_EXTENSIONS*/ # if defined( VK_ENABLE_BETA_EXTENSIONS ) template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceDisplacementMicromapPropertiesNV const & physicalDeviceDisplacementMicromapPropertiesNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDisplacementMicromapPropertiesNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDisplacementMicromapPropertiesNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDisplacementMicromapPropertiesNV.maxDisplacementMicromapSubdivisionLevel ); return seed; } }; # endif /*VK_ENABLE_BETA_EXTENSIONS*/ template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceDriverProperties const & physicalDeviceDriverProperties ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDriverProperties.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDriverProperties.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDriverProperties.driverID ); for ( size_t i = 0; i < VK_MAX_DRIVER_NAME_SIZE; ++i ) { VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDriverProperties.driverName[i] ); } for ( size_t i = 0; i < VK_MAX_DRIVER_INFO_SIZE; ++i ) { VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDriverProperties.driverInfo[i] ); } VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDriverProperties.conformanceVersion ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceDrmPropertiesEXT const & physicalDeviceDrmPropertiesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDrmPropertiesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDrmPropertiesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDrmPropertiesEXT.hasPrimary ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDrmPropertiesEXT.hasRender ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDrmPropertiesEXT.primaryMajor ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDrmPropertiesEXT.primaryMinor ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDrmPropertiesEXT.renderMajor ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDrmPropertiesEXT.renderMinor ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceDynamicRenderingFeatures const & physicalDeviceDynamicRenderingFeatures ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDynamicRenderingFeatures.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDynamicRenderingFeatures.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDynamicRenderingFeatures.dynamicRendering ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceDynamicRenderingLocalReadFeatures const & physicalDeviceDynamicRenderingLocalReadFeatures ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDynamicRenderingLocalReadFeatures.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDynamicRenderingLocalReadFeatures.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDynamicRenderingLocalReadFeatures.dynamicRenderingLocalRead ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT const & physicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT.dynamicRenderingUnusedAttachments ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceExclusiveScissorFeaturesNV const & physicalDeviceExclusiveScissorFeaturesNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExclusiveScissorFeaturesNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExclusiveScissorFeaturesNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExclusiveScissorFeaturesNV.exclusiveScissor ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceExtendedDynamicState2FeaturesEXT const & physicalDeviceExtendedDynamicState2FeaturesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExtendedDynamicState2FeaturesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExtendedDynamicState2FeaturesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExtendedDynamicState2FeaturesEXT.extendedDynamicState2 ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExtendedDynamicState2FeaturesEXT.extendedDynamicState2LogicOp ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExtendedDynamicState2FeaturesEXT.extendedDynamicState2PatchControlPoints ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceExtendedDynamicState3FeaturesEXT const & physicalDeviceExtendedDynamicState3FeaturesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExtendedDynamicState3FeaturesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExtendedDynamicState3FeaturesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExtendedDynamicState3FeaturesEXT.extendedDynamicState3TessellationDomainOrigin ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExtendedDynamicState3FeaturesEXT.extendedDynamicState3DepthClampEnable ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExtendedDynamicState3FeaturesEXT.extendedDynamicState3PolygonMode ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExtendedDynamicState3FeaturesEXT.extendedDynamicState3RasterizationSamples ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExtendedDynamicState3FeaturesEXT.extendedDynamicState3SampleMask ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExtendedDynamicState3FeaturesEXT.extendedDynamicState3AlphaToCoverageEnable ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExtendedDynamicState3FeaturesEXT.extendedDynamicState3AlphaToOneEnable ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExtendedDynamicState3FeaturesEXT.extendedDynamicState3LogicOpEnable ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExtendedDynamicState3FeaturesEXT.extendedDynamicState3ColorBlendEnable ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExtendedDynamicState3FeaturesEXT.extendedDynamicState3ColorBlendEquation ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExtendedDynamicState3FeaturesEXT.extendedDynamicState3ColorWriteMask ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExtendedDynamicState3FeaturesEXT.extendedDynamicState3RasterizationStream ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExtendedDynamicState3FeaturesEXT.extendedDynamicState3ConservativeRasterizationMode ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExtendedDynamicState3FeaturesEXT.extendedDynamicState3ExtraPrimitiveOverestimationSize ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExtendedDynamicState3FeaturesEXT.extendedDynamicState3DepthClipEnable ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExtendedDynamicState3FeaturesEXT.extendedDynamicState3SampleLocationsEnable ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExtendedDynamicState3FeaturesEXT.extendedDynamicState3ColorBlendAdvanced ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExtendedDynamicState3FeaturesEXT.extendedDynamicState3ProvokingVertexMode ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExtendedDynamicState3FeaturesEXT.extendedDynamicState3LineRasterizationMode ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExtendedDynamicState3FeaturesEXT.extendedDynamicState3LineStippleEnable ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExtendedDynamicState3FeaturesEXT.extendedDynamicState3DepthClipNegativeOneToOne ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExtendedDynamicState3FeaturesEXT.extendedDynamicState3ViewportWScalingEnable ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExtendedDynamicState3FeaturesEXT.extendedDynamicState3ViewportSwizzle ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExtendedDynamicState3FeaturesEXT.extendedDynamicState3CoverageToColorEnable ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExtendedDynamicState3FeaturesEXT.extendedDynamicState3CoverageToColorLocation ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExtendedDynamicState3FeaturesEXT.extendedDynamicState3CoverageModulationMode ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExtendedDynamicState3FeaturesEXT.extendedDynamicState3CoverageModulationTableEnable ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExtendedDynamicState3FeaturesEXT.extendedDynamicState3CoverageModulationTable ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExtendedDynamicState3FeaturesEXT.extendedDynamicState3CoverageReductionMode ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExtendedDynamicState3FeaturesEXT.extendedDynamicState3RepresentativeFragmentTestEnable ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExtendedDynamicState3FeaturesEXT.extendedDynamicState3ShadingRateImageEnable ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceExtendedDynamicState3PropertiesEXT const & physicalDeviceExtendedDynamicState3PropertiesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExtendedDynamicState3PropertiesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExtendedDynamicState3PropertiesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExtendedDynamicState3PropertiesEXT.dynamicPrimitiveTopologyUnrestricted ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceExtendedDynamicStateFeaturesEXT const & physicalDeviceExtendedDynamicStateFeaturesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExtendedDynamicStateFeaturesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExtendedDynamicStateFeaturesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExtendedDynamicStateFeaturesEXT.extendedDynamicState ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceExtendedSparseAddressSpaceFeaturesNV const & physicalDeviceExtendedSparseAddressSpaceFeaturesNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExtendedSparseAddressSpaceFeaturesNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExtendedSparseAddressSpaceFeaturesNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExtendedSparseAddressSpaceFeaturesNV.extendedSparseAddressSpace ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceExtendedSparseAddressSpacePropertiesNV const & physicalDeviceExtendedSparseAddressSpacePropertiesNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExtendedSparseAddressSpacePropertiesNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExtendedSparseAddressSpacePropertiesNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExtendedSparseAddressSpacePropertiesNV.extendedSparseAddressSpaceSize ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExtendedSparseAddressSpacePropertiesNV.extendedSparseImageUsageFlags ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExtendedSparseAddressSpacePropertiesNV.extendedSparseBufferUsageFlags ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalBufferInfo const & physicalDeviceExternalBufferInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExternalBufferInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExternalBufferInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExternalBufferInfo.flags ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExternalBufferInfo.usage ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExternalBufferInfo.handleType ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalFenceInfo const & physicalDeviceExternalFenceInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExternalFenceInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExternalFenceInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExternalFenceInfo.handleType ); return seed; } }; # if defined( VK_USE_PLATFORM_ANDROID_KHR ) template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalFormatResolveFeaturesANDROID const & physicalDeviceExternalFormatResolveFeaturesANDROID ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExternalFormatResolveFeaturesANDROID.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExternalFormatResolveFeaturesANDROID.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExternalFormatResolveFeaturesANDROID.externalFormatResolve ); return seed; } }; # endif /*VK_USE_PLATFORM_ANDROID_KHR*/ # if defined( VK_USE_PLATFORM_ANDROID_KHR ) template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalFormatResolvePropertiesANDROID const & physicalDeviceExternalFormatResolvePropertiesANDROID ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExternalFormatResolvePropertiesANDROID.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExternalFormatResolvePropertiesANDROID.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExternalFormatResolvePropertiesANDROID.nullColorAttachmentWithExternalFormatResolve ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExternalFormatResolvePropertiesANDROID.externalFormatResolveChromaOffsetX ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExternalFormatResolvePropertiesANDROID.externalFormatResolveChromaOffsetY ); return seed; } }; # endif /*VK_USE_PLATFORM_ANDROID_KHR*/ template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalImageFormatInfo const & physicalDeviceExternalImageFormatInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExternalImageFormatInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExternalImageFormatInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExternalImageFormatInfo.handleType ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalMemoryHostPropertiesEXT const & physicalDeviceExternalMemoryHostPropertiesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExternalMemoryHostPropertiesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExternalMemoryHostPropertiesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExternalMemoryHostPropertiesEXT.minImportedHostPointerAlignment ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalMemoryRDMAFeaturesNV const & physicalDeviceExternalMemoryRDMAFeaturesNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExternalMemoryRDMAFeaturesNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExternalMemoryRDMAFeaturesNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExternalMemoryRDMAFeaturesNV.externalMemoryRDMA ); return seed; } }; # if defined( VK_USE_PLATFORM_SCREEN_QNX ) template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalMemoryScreenBufferFeaturesQNX const & physicalDeviceExternalMemoryScreenBufferFeaturesQNX ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExternalMemoryScreenBufferFeaturesQNX.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExternalMemoryScreenBufferFeaturesQNX.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExternalMemoryScreenBufferFeaturesQNX.screenBufferImport ); return seed; } }; # endif /*VK_USE_PLATFORM_SCREEN_QNX*/ template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalSemaphoreInfo const & physicalDeviceExternalSemaphoreInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExternalSemaphoreInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExternalSemaphoreInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceExternalSemaphoreInfo.handleType ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceFaultFeaturesEXT const & physicalDeviceFaultFeaturesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFaultFeaturesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFaultFeaturesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFaultFeaturesEXT.deviceFault ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFaultFeaturesEXT.deviceFaultVendorBinary ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures2 const & physicalDeviceFeatures2 ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures2.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures2.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFeatures2.features ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceFloatControlsProperties const & physicalDeviceFloatControlsProperties ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFloatControlsProperties.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFloatControlsProperties.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFloatControlsProperties.denormBehaviorIndependence ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFloatControlsProperties.roundingModeIndependence ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFloatControlsProperties.shaderSignedZeroInfNanPreserveFloat16 ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFloatControlsProperties.shaderSignedZeroInfNanPreserveFloat32 ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFloatControlsProperties.shaderSignedZeroInfNanPreserveFloat64 ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFloatControlsProperties.shaderDenormPreserveFloat16 ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFloatControlsProperties.shaderDenormPreserveFloat32 ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFloatControlsProperties.shaderDenormPreserveFloat64 ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFloatControlsProperties.shaderDenormFlushToZeroFloat16 ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFloatControlsProperties.shaderDenormFlushToZeroFloat32 ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFloatControlsProperties.shaderDenormFlushToZeroFloat64 ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFloatControlsProperties.shaderRoundingModeRTEFloat16 ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFloatControlsProperties.shaderRoundingModeRTEFloat32 ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFloatControlsProperties.shaderRoundingModeRTEFloat64 ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFloatControlsProperties.shaderRoundingModeRTZFloat16 ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFloatControlsProperties.shaderRoundingModeRTZFloat32 ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFloatControlsProperties.shaderRoundingModeRTZFloat64 ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceFragmentDensityMap2FeaturesEXT const & physicalDeviceFragmentDensityMap2FeaturesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentDensityMap2FeaturesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentDensityMap2FeaturesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentDensityMap2FeaturesEXT.fragmentDensityMapDeferred ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceFragmentDensityMap2PropertiesEXT const & physicalDeviceFragmentDensityMap2PropertiesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentDensityMap2PropertiesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentDensityMap2PropertiesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentDensityMap2PropertiesEXT.subsampledLoads ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentDensityMap2PropertiesEXT.subsampledCoarseReconstructionEarlyAccess ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentDensityMap2PropertiesEXT.maxSubsampledArrayLayers ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentDensityMap2PropertiesEXT.maxDescriptorSetSubsampledSamplers ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceFragmentDensityMapFeaturesEXT const & physicalDeviceFragmentDensityMapFeaturesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentDensityMapFeaturesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentDensityMapFeaturesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentDensityMapFeaturesEXT.fragmentDensityMap ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentDensityMapFeaturesEXT.fragmentDensityMapDynamic ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentDensityMapFeaturesEXT.fragmentDensityMapNonSubsampledImages ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM const & physicalDeviceFragmentDensityMapOffsetFeaturesQCOM ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentDensityMapOffsetFeaturesQCOM.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentDensityMapOffsetFeaturesQCOM.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentDensityMapOffsetFeaturesQCOM.fragmentDensityMapOffset ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM const & physicalDeviceFragmentDensityMapOffsetPropertiesQCOM ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentDensityMapOffsetPropertiesQCOM.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentDensityMapOffsetPropertiesQCOM.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentDensityMapOffsetPropertiesQCOM.fragmentDensityOffsetGranularity ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceFragmentDensityMapPropertiesEXT const & physicalDeviceFragmentDensityMapPropertiesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentDensityMapPropertiesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentDensityMapPropertiesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentDensityMapPropertiesEXT.minFragmentDensityTexelSize ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentDensityMapPropertiesEXT.maxFragmentDensityTexelSize ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentDensityMapPropertiesEXT.fragmentDensityInvocations ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceFragmentShaderBarycentricFeaturesKHR const & physicalDeviceFragmentShaderBarycentricFeaturesKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShaderBarycentricFeaturesKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShaderBarycentricFeaturesKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShaderBarycentricFeaturesKHR.fragmentShaderBarycentric ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceFragmentShaderBarycentricPropertiesKHR const & physicalDeviceFragmentShaderBarycentricPropertiesKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShaderBarycentricPropertiesKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShaderBarycentricPropertiesKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShaderBarycentricPropertiesKHR.triStripVertexOrderIndependentOfProvokingVertex ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceFragmentShaderInterlockFeaturesEXT const & physicalDeviceFragmentShaderInterlockFeaturesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShaderInterlockFeaturesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShaderInterlockFeaturesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShaderInterlockFeaturesEXT.fragmentShaderSampleInterlock ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShaderInterlockFeaturesEXT.fragmentShaderPixelInterlock ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShaderInterlockFeaturesEXT.fragmentShaderShadingRateInterlock ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceFragmentShadingRateEnumsFeaturesNV const & physicalDeviceFragmentShadingRateEnumsFeaturesNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShadingRateEnumsFeaturesNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShadingRateEnumsFeaturesNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShadingRateEnumsFeaturesNV.fragmentShadingRateEnums ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShadingRateEnumsFeaturesNV.supersampleFragmentShadingRates ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShadingRateEnumsFeaturesNV.noInvocationFragmentShadingRates ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceFragmentShadingRateEnumsPropertiesNV const & physicalDeviceFragmentShadingRateEnumsPropertiesNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShadingRateEnumsPropertiesNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShadingRateEnumsPropertiesNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShadingRateEnumsPropertiesNV.maxFragmentShadingRateInvocationCount ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceFragmentShadingRateFeaturesKHR const & physicalDeviceFragmentShadingRateFeaturesKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShadingRateFeaturesKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShadingRateFeaturesKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShadingRateFeaturesKHR.pipelineFragmentShadingRate ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShadingRateFeaturesKHR.primitiveFragmentShadingRate ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShadingRateFeaturesKHR.attachmentFragmentShadingRate ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceFragmentShadingRateKHR const & physicalDeviceFragmentShadingRateKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShadingRateKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShadingRateKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShadingRateKHR.sampleCounts ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShadingRateKHR.fragmentSize ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceFragmentShadingRatePropertiesKHR const & physicalDeviceFragmentShadingRatePropertiesKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShadingRatePropertiesKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShadingRatePropertiesKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShadingRatePropertiesKHR.minFragmentShadingRateAttachmentTexelSize ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShadingRatePropertiesKHR.maxFragmentShadingRateAttachmentTexelSize ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShadingRatePropertiesKHR.maxFragmentShadingRateAttachmentTexelSizeAspectRatio ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShadingRatePropertiesKHR.primitiveFragmentShadingRateWithMultipleViewports ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShadingRatePropertiesKHR.layeredShadingRateAttachments ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShadingRatePropertiesKHR.fragmentShadingRateNonTrivialCombinerOps ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShadingRatePropertiesKHR.maxFragmentSize ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShadingRatePropertiesKHR.maxFragmentSizeAspectRatio ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShadingRatePropertiesKHR.maxFragmentShadingRateCoverageSamples ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShadingRatePropertiesKHR.maxFragmentShadingRateRasterizationSamples ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShadingRatePropertiesKHR.fragmentShadingRateWithShaderDepthStencilWrites ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShadingRatePropertiesKHR.fragmentShadingRateWithSampleMask ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShadingRatePropertiesKHR.fragmentShadingRateWithShaderSampleMask ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShadingRatePropertiesKHR.fragmentShadingRateWithConservativeRasterization ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShadingRatePropertiesKHR.fragmentShadingRateWithFragmentShaderInterlock ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShadingRatePropertiesKHR.fragmentShadingRateWithCustomSampleLocations ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFragmentShadingRatePropertiesKHR.fragmentShadingRateStrictMultiplyCombiner ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceFrameBoundaryFeaturesEXT const & physicalDeviceFrameBoundaryFeaturesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFrameBoundaryFeaturesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFrameBoundaryFeaturesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceFrameBoundaryFeaturesEXT.frameBoundary ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceGlobalPriorityQueryFeatures const & physicalDeviceGlobalPriorityQueryFeatures ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceGlobalPriorityQueryFeatures.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceGlobalPriorityQueryFeatures.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceGlobalPriorityQueryFeatures.globalPriorityQuery ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceGraphicsPipelineLibraryFeaturesEXT const & physicalDeviceGraphicsPipelineLibraryFeaturesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceGraphicsPipelineLibraryFeaturesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceGraphicsPipelineLibraryFeaturesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceGraphicsPipelineLibraryFeaturesEXT.graphicsPipelineLibrary ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceGraphicsPipelineLibraryPropertiesEXT const & physicalDeviceGraphicsPipelineLibraryPropertiesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceGraphicsPipelineLibraryPropertiesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceGraphicsPipelineLibraryPropertiesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceGraphicsPipelineLibraryPropertiesEXT.graphicsPipelineLibraryFastLinking ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceGraphicsPipelineLibraryPropertiesEXT.graphicsPipelineLibraryIndependentInterpolationDecoration ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceGroupProperties const & physicalDeviceGroupProperties ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceGroupProperties.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceGroupProperties.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceGroupProperties.physicalDeviceCount ); for ( size_t i = 0; i < VK_MAX_DEVICE_GROUP_SIZE; ++i ) { VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceGroupProperties.physicalDevices[i] ); } VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceGroupProperties.subsetAllocation ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceHdrVividFeaturesHUAWEI const & physicalDeviceHdrVividFeaturesHUAWEI ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceHdrVividFeaturesHUAWEI.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceHdrVividFeaturesHUAWEI.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceHdrVividFeaturesHUAWEI.hdrVivid ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceHostImageCopyFeatures const & physicalDeviceHostImageCopyFeatures ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceHostImageCopyFeatures.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceHostImageCopyFeatures.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceHostImageCopyFeatures.hostImageCopy ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceHostImageCopyProperties const & physicalDeviceHostImageCopyProperties ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceHostImageCopyProperties.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceHostImageCopyProperties.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceHostImageCopyProperties.copySrcLayoutCount ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceHostImageCopyProperties.pCopySrcLayouts ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceHostImageCopyProperties.copyDstLayoutCount ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceHostImageCopyProperties.pCopyDstLayouts ); for ( size_t i = 0; i < VK_UUID_SIZE; ++i ) { VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceHostImageCopyProperties.optimalTilingLayoutUUID[i] ); } VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceHostImageCopyProperties.identicalMemoryTypeRequirements ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceHostQueryResetFeatures const & physicalDeviceHostQueryResetFeatures ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceHostQueryResetFeatures.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceHostQueryResetFeatures.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceHostQueryResetFeatures.hostQueryReset ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceIDProperties const & physicalDeviceIDProperties ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceIDProperties.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceIDProperties.pNext ); for ( size_t i = 0; i < VK_UUID_SIZE; ++i ) { VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceIDProperties.deviceUUID[i] ); } for ( size_t i = 0; i < VK_UUID_SIZE; ++i ) { VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceIDProperties.driverUUID[i] ); } for ( size_t i = 0; i < VK_LUID_SIZE; ++i ) { VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceIDProperties.deviceLUID[i] ); } VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceIDProperties.deviceNodeMask ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceIDProperties.deviceLUIDValid ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceImage2DViewOf3DFeaturesEXT const & physicalDeviceImage2DViewOf3DFeaturesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImage2DViewOf3DFeaturesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImage2DViewOf3DFeaturesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImage2DViewOf3DFeaturesEXT.image2DViewOf3D ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImage2DViewOf3DFeaturesEXT.sampler2DViewOf3D ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceImageAlignmentControlFeaturesMESA const & physicalDeviceImageAlignmentControlFeaturesMESA ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageAlignmentControlFeaturesMESA.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageAlignmentControlFeaturesMESA.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageAlignmentControlFeaturesMESA.imageAlignmentControl ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceImageAlignmentControlPropertiesMESA const & physicalDeviceImageAlignmentControlPropertiesMESA ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageAlignmentControlPropertiesMESA.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageAlignmentControlPropertiesMESA.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageAlignmentControlPropertiesMESA.supportedImageAlignmentMask ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceImageCompressionControlFeaturesEXT const & physicalDeviceImageCompressionControlFeaturesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageCompressionControlFeaturesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageCompressionControlFeaturesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageCompressionControlFeaturesEXT.imageCompressionControl ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceImageCompressionControlSwapchainFeaturesEXT const & physicalDeviceImageCompressionControlSwapchainFeaturesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageCompressionControlSwapchainFeaturesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageCompressionControlSwapchainFeaturesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageCompressionControlSwapchainFeaturesEXT.imageCompressionControlSwapchain ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceImageDrmFormatModifierInfoEXT const & physicalDeviceImageDrmFormatModifierInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageDrmFormatModifierInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageDrmFormatModifierInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageDrmFormatModifierInfoEXT.drmFormatModifier ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageDrmFormatModifierInfoEXT.sharingMode ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageDrmFormatModifierInfoEXT.queueFamilyIndexCount ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageDrmFormatModifierInfoEXT.pQueueFamilyIndices ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceImageFormatInfo2 const & physicalDeviceImageFormatInfo2 ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageFormatInfo2.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageFormatInfo2.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageFormatInfo2.format ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageFormatInfo2.type ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageFormatInfo2.tiling ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageFormatInfo2.usage ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageFormatInfo2.flags ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceImageProcessing2FeaturesQCOM const & physicalDeviceImageProcessing2FeaturesQCOM ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageProcessing2FeaturesQCOM.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageProcessing2FeaturesQCOM.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageProcessing2FeaturesQCOM.textureBlockMatch2 ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceImageProcessing2PropertiesQCOM const & physicalDeviceImageProcessing2PropertiesQCOM ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageProcessing2PropertiesQCOM.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageProcessing2PropertiesQCOM.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageProcessing2PropertiesQCOM.maxBlockMatchWindow ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceImageProcessingFeaturesQCOM const & physicalDeviceImageProcessingFeaturesQCOM ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageProcessingFeaturesQCOM.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageProcessingFeaturesQCOM.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageProcessingFeaturesQCOM.textureSampleWeighted ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageProcessingFeaturesQCOM.textureBoxFilter ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageProcessingFeaturesQCOM.textureBlockMatch ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceImageProcessingPropertiesQCOM const & physicalDeviceImageProcessingPropertiesQCOM ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageProcessingPropertiesQCOM.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageProcessingPropertiesQCOM.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageProcessingPropertiesQCOM.maxWeightFilterPhases ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageProcessingPropertiesQCOM.maxWeightFilterDimension ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageProcessingPropertiesQCOM.maxBlockMatchRegion ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageProcessingPropertiesQCOM.maxBoxFilterBlockSize ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceImageRobustnessFeatures const & physicalDeviceImageRobustnessFeatures ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageRobustnessFeatures.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageRobustnessFeatures.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageRobustnessFeatures.robustImageAccess ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceImageSlicedViewOf3DFeaturesEXT const & physicalDeviceImageSlicedViewOf3DFeaturesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageSlicedViewOf3DFeaturesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageSlicedViewOf3DFeaturesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageSlicedViewOf3DFeaturesEXT.imageSlicedViewOf3D ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceImageViewImageFormatInfoEXT const & physicalDeviceImageViewImageFormatInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageViewImageFormatInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageViewImageFormatInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageViewImageFormatInfoEXT.imageViewType ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceImageViewMinLodFeaturesEXT const & physicalDeviceImageViewMinLodFeaturesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageViewMinLodFeaturesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageViewMinLodFeaturesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImageViewMinLodFeaturesEXT.minLod ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceImagelessFramebufferFeatures const & physicalDeviceImagelessFramebufferFeatures ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImagelessFramebufferFeatures.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImagelessFramebufferFeatures.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceImagelessFramebufferFeatures.imagelessFramebuffer ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceIndexTypeUint8Features const & physicalDeviceIndexTypeUint8Features ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceIndexTypeUint8Features.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceIndexTypeUint8Features.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceIndexTypeUint8Features.indexTypeUint8 ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceInheritedViewportScissorFeaturesNV const & physicalDeviceInheritedViewportScissorFeaturesNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceInheritedViewportScissorFeaturesNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceInheritedViewportScissorFeaturesNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceInheritedViewportScissorFeaturesNV.inheritedViewportScissor2D ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceInlineUniformBlockFeatures const & physicalDeviceInlineUniformBlockFeatures ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceInlineUniformBlockFeatures.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceInlineUniformBlockFeatures.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceInlineUniformBlockFeatures.inlineUniformBlock ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceInlineUniformBlockFeatures.descriptorBindingInlineUniformBlockUpdateAfterBind ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceInlineUniformBlockProperties const & physicalDeviceInlineUniformBlockProperties ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceInlineUniformBlockProperties.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceInlineUniformBlockProperties.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceInlineUniformBlockProperties.maxInlineUniformBlockSize ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceInlineUniformBlockProperties.maxPerStageDescriptorInlineUniformBlocks ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceInlineUniformBlockProperties.maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceInlineUniformBlockProperties.maxDescriptorSetInlineUniformBlocks ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceInlineUniformBlockProperties.maxDescriptorSetUpdateAfterBindInlineUniformBlocks ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceInvocationMaskFeaturesHUAWEI const & physicalDeviceInvocationMaskFeaturesHUAWEI ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceInvocationMaskFeaturesHUAWEI.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceInvocationMaskFeaturesHUAWEI.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceInvocationMaskFeaturesHUAWEI.invocationMask ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceLayeredApiPropertiesKHR const & physicalDeviceLayeredApiPropertiesKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLayeredApiPropertiesKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLayeredApiPropertiesKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLayeredApiPropertiesKHR.vendorID ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLayeredApiPropertiesKHR.deviceID ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLayeredApiPropertiesKHR.layeredAPI ); for ( size_t i = 0; i < VK_MAX_PHYSICAL_DEVICE_NAME_SIZE; ++i ) { VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLayeredApiPropertiesKHR.deviceName[i] ); } return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceLayeredApiPropertiesListKHR const & physicalDeviceLayeredApiPropertiesListKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLayeredApiPropertiesListKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLayeredApiPropertiesListKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLayeredApiPropertiesListKHR.layeredApiCount ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLayeredApiPropertiesListKHR.pLayeredApis ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceLimits const & physicalDeviceLimits ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxImageDimension1D ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxImageDimension2D ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxImageDimension3D ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxImageDimensionCube ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxImageArrayLayers ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxTexelBufferElements ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxUniformBufferRange ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxStorageBufferRange ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxPushConstantsSize ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxMemoryAllocationCount ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxSamplerAllocationCount ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.bufferImageGranularity ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.sparseAddressSpaceSize ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxBoundDescriptorSets ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxPerStageDescriptorSamplers ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxPerStageDescriptorUniformBuffers ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxPerStageDescriptorStorageBuffers ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxPerStageDescriptorSampledImages ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxPerStageDescriptorStorageImages ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxPerStageDescriptorInputAttachments ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxPerStageResources ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxDescriptorSetSamplers ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxDescriptorSetUniformBuffers ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxDescriptorSetUniformBuffersDynamic ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxDescriptorSetStorageBuffers ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxDescriptorSetStorageBuffersDynamic ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxDescriptorSetSampledImages ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxDescriptorSetStorageImages ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxDescriptorSetInputAttachments ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxVertexInputAttributes ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxVertexInputBindings ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxVertexInputAttributeOffset ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxVertexInputBindingStride ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxVertexOutputComponents ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxTessellationGenerationLevel ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxTessellationPatchSize ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxTessellationControlPerVertexInputComponents ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxTessellationControlPerVertexOutputComponents ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxTessellationControlPerPatchOutputComponents ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxTessellationControlTotalOutputComponents ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxTessellationEvaluationInputComponents ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxTessellationEvaluationOutputComponents ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxGeometryShaderInvocations ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxGeometryInputComponents ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxGeometryOutputComponents ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxGeometryOutputVertices ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxGeometryTotalOutputComponents ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxFragmentInputComponents ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxFragmentOutputAttachments ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxFragmentDualSrcAttachments ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxFragmentCombinedOutputResources ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxComputeSharedMemorySize ); for ( size_t i = 0; i < 3; ++i ) { VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxComputeWorkGroupCount[i] ); } VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxComputeWorkGroupInvocations ); for ( size_t i = 0; i < 3; ++i ) { VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxComputeWorkGroupSize[i] ); } VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.subPixelPrecisionBits ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.subTexelPrecisionBits ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.mipmapPrecisionBits ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxDrawIndexedIndexValue ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxDrawIndirectCount ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxSamplerLodBias ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxSamplerAnisotropy ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxViewports ); for ( size_t i = 0; i < 2; ++i ) { VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxViewportDimensions[i] ); } for ( size_t i = 0; i < 2; ++i ) { VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.viewportBoundsRange[i] ); } VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.viewportSubPixelBits ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.minMemoryMapAlignment ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.minTexelBufferOffsetAlignment ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.minUniformBufferOffsetAlignment ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.minStorageBufferOffsetAlignment ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.minTexelOffset ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxTexelOffset ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.minTexelGatherOffset ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxTexelGatherOffset ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.minInterpolationOffset ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxInterpolationOffset ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.subPixelInterpolationOffsetBits ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxFramebufferWidth ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxFramebufferHeight ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxFramebufferLayers ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.framebufferColorSampleCounts ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.framebufferDepthSampleCounts ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.framebufferStencilSampleCounts ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.framebufferNoAttachmentsSampleCounts ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxColorAttachments ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.sampledImageColorSampleCounts ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.sampledImageIntegerSampleCounts ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.sampledImageDepthSampleCounts ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.sampledImageStencilSampleCounts ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.storageImageSampleCounts ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxSampleMaskWords ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.timestampComputeAndGraphics ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.timestampPeriod ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxClipDistances ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxCullDistances ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.maxCombinedClipAndCullDistances ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.discreteQueuePriorities ); for ( size_t i = 0; i < 2; ++i ) { VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.pointSizeRange[i] ); } for ( size_t i = 0; i < 2; ++i ) { VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.lineWidthRange[i] ); } VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.pointSizeGranularity ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.lineWidthGranularity ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.strictLines ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.standardSampleLocations ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.optimalBufferCopyOffsetAlignment ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.optimalBufferCopyRowPitchAlignment ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLimits.nonCoherentAtomSize ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceSparseProperties const & physicalDeviceSparseProperties ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSparseProperties.residencyStandard2DBlockShape ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSparseProperties.residencyStandard2DMultisampleBlockShape ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSparseProperties.residencyStandard3DBlockShape ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSparseProperties.residencyAlignedMipSize ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSparseProperties.residencyNonResidentStrict ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties const & physicalDeviceProperties ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceProperties.apiVersion ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceProperties.driverVersion ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceProperties.vendorID ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceProperties.deviceID ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceProperties.deviceType ); for ( size_t i = 0; i < VK_MAX_PHYSICAL_DEVICE_NAME_SIZE; ++i ) { VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceProperties.deviceName[i] ); } for ( size_t i = 0; i < VK_UUID_SIZE; ++i ) { VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceProperties.pipelineCacheUUID[i] ); } VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceProperties.limits ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceProperties.sparseProperties ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties2 const & physicalDeviceProperties2 ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceProperties2.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceProperties2.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceProperties2.properties ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceLayeredApiVulkanPropertiesKHR const & physicalDeviceLayeredApiVulkanPropertiesKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLayeredApiVulkanPropertiesKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLayeredApiVulkanPropertiesKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLayeredApiVulkanPropertiesKHR.properties ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceLayeredDriverPropertiesMSFT const & physicalDeviceLayeredDriverPropertiesMSFT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLayeredDriverPropertiesMSFT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLayeredDriverPropertiesMSFT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLayeredDriverPropertiesMSFT.underlyingAPI ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceLegacyDitheringFeaturesEXT const & physicalDeviceLegacyDitheringFeaturesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLegacyDitheringFeaturesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLegacyDitheringFeaturesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLegacyDitheringFeaturesEXT.legacyDithering ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceLegacyVertexAttributesFeaturesEXT const & physicalDeviceLegacyVertexAttributesFeaturesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLegacyVertexAttributesFeaturesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLegacyVertexAttributesFeaturesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLegacyVertexAttributesFeaturesEXT.legacyVertexAttributes ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceLegacyVertexAttributesPropertiesEXT const & physicalDeviceLegacyVertexAttributesPropertiesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLegacyVertexAttributesPropertiesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLegacyVertexAttributesPropertiesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLegacyVertexAttributesPropertiesEXT.nativeUnalignedPerformance ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceLineRasterizationFeatures const & physicalDeviceLineRasterizationFeatures ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLineRasterizationFeatures.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLineRasterizationFeatures.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLineRasterizationFeatures.rectangularLines ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLineRasterizationFeatures.bresenhamLines ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLineRasterizationFeatures.smoothLines ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLineRasterizationFeatures.stippledRectangularLines ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLineRasterizationFeatures.stippledBresenhamLines ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLineRasterizationFeatures.stippledSmoothLines ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceLineRasterizationProperties const & physicalDeviceLineRasterizationProperties ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLineRasterizationProperties.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLineRasterizationProperties.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLineRasterizationProperties.lineSubPixelPrecisionBits ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceLinearColorAttachmentFeaturesNV const & physicalDeviceLinearColorAttachmentFeaturesNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLinearColorAttachmentFeaturesNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLinearColorAttachmentFeaturesNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceLinearColorAttachmentFeaturesNV.linearColorAttachment ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceMaintenance3Properties const & physicalDeviceMaintenance3Properties ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMaintenance3Properties.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMaintenance3Properties.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMaintenance3Properties.maxPerSetDescriptors ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMaintenance3Properties.maxMemoryAllocationSize ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceMaintenance4Features const & physicalDeviceMaintenance4Features ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMaintenance4Features.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMaintenance4Features.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMaintenance4Features.maintenance4 ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceMaintenance4Properties const & physicalDeviceMaintenance4Properties ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMaintenance4Properties.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMaintenance4Properties.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMaintenance4Properties.maxBufferSize ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceMaintenance5Features const & physicalDeviceMaintenance5Features ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMaintenance5Features.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMaintenance5Features.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMaintenance5Features.maintenance5 ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceMaintenance5Properties const & physicalDeviceMaintenance5Properties ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMaintenance5Properties.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMaintenance5Properties.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMaintenance5Properties.earlyFragmentMultisampleCoverageAfterSampleCounting ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMaintenance5Properties.earlyFragmentSampleMaskTestBeforeSampleCounting ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMaintenance5Properties.depthStencilSwizzleOneSupport ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMaintenance5Properties.polygonModePointSize ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMaintenance5Properties.nonStrictSinglePixelWideLinesUseParallelogram ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMaintenance5Properties.nonStrictWideLinesUseParallelogram ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceMaintenance6Features const & physicalDeviceMaintenance6Features ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMaintenance6Features.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMaintenance6Features.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMaintenance6Features.maintenance6 ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceMaintenance6Properties const & physicalDeviceMaintenance6Properties ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMaintenance6Properties.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMaintenance6Properties.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMaintenance6Properties.blockTexelViewCompatibleMultipleLayers ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMaintenance6Properties.maxCombinedImageSamplerDescriptorCount ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMaintenance6Properties.fragmentShadingRateClampCombinerInputs ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceMaintenance7FeaturesKHR const & physicalDeviceMaintenance7FeaturesKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMaintenance7FeaturesKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMaintenance7FeaturesKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMaintenance7FeaturesKHR.maintenance7 ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceMaintenance7PropertiesKHR const & physicalDeviceMaintenance7PropertiesKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMaintenance7PropertiesKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMaintenance7PropertiesKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMaintenance7PropertiesKHR.robustFragmentShadingRateAttachmentAccess ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMaintenance7PropertiesKHR.separateDepthStencilAttachmentAccess ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMaintenance7PropertiesKHR.maxDescriptorSetTotalUniformBuffersDynamic ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMaintenance7PropertiesKHR.maxDescriptorSetTotalStorageBuffersDynamic ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMaintenance7PropertiesKHR.maxDescriptorSetTotalBuffersDynamic ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMaintenance7PropertiesKHR.maxDescriptorSetUpdateAfterBindTotalUniformBuffersDynamic ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMaintenance7PropertiesKHR.maxDescriptorSetUpdateAfterBindTotalStorageBuffersDynamic ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMaintenance7PropertiesKHR.maxDescriptorSetUpdateAfterBindTotalBuffersDynamic ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceMaintenance8FeaturesKHR const & physicalDeviceMaintenance8FeaturesKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMaintenance8FeaturesKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMaintenance8FeaturesKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMaintenance8FeaturesKHR.maintenance8 ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceMapMemoryPlacedFeaturesEXT const & physicalDeviceMapMemoryPlacedFeaturesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMapMemoryPlacedFeaturesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMapMemoryPlacedFeaturesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMapMemoryPlacedFeaturesEXT.memoryMapPlaced ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMapMemoryPlacedFeaturesEXT.memoryMapRangePlaced ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMapMemoryPlacedFeaturesEXT.memoryUnmapReserve ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceMapMemoryPlacedPropertiesEXT const & physicalDeviceMapMemoryPlacedPropertiesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMapMemoryPlacedPropertiesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMapMemoryPlacedPropertiesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMapMemoryPlacedPropertiesEXT.minPlacedMemoryMapAlignment ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryBudgetPropertiesEXT const & physicalDeviceMemoryBudgetPropertiesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMemoryBudgetPropertiesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMemoryBudgetPropertiesEXT.pNext ); for ( size_t i = 0; i < VK_MAX_MEMORY_HEAPS; ++i ) { VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMemoryBudgetPropertiesEXT.heapBudget[i] ); } for ( size_t i = 0; i < VK_MAX_MEMORY_HEAPS; ++i ) { VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMemoryBudgetPropertiesEXT.heapUsage[i] ); } return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryDecompressionFeaturesNV const & physicalDeviceMemoryDecompressionFeaturesNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMemoryDecompressionFeaturesNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMemoryDecompressionFeaturesNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMemoryDecompressionFeaturesNV.memoryDecompression ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryDecompressionPropertiesNV const & physicalDeviceMemoryDecompressionPropertiesNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMemoryDecompressionPropertiesNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMemoryDecompressionPropertiesNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMemoryDecompressionPropertiesNV.decompressionMethods ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMemoryDecompressionPropertiesNV.maxDecompressionIndirectCount ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryPriorityFeaturesEXT const & physicalDeviceMemoryPriorityFeaturesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMemoryPriorityFeaturesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMemoryPriorityFeaturesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMemoryPriorityFeaturesEXT.memoryPriority ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties const & physicalDeviceMemoryProperties ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMemoryProperties.memoryTypeCount ); for ( size_t i = 0; i < VK_MAX_MEMORY_TYPES; ++i ) { VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMemoryProperties.memoryTypes[i] ); } VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMemoryProperties.memoryHeapCount ); for ( size_t i = 0; i < VK_MAX_MEMORY_HEAPS; ++i ) { VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMemoryProperties.memoryHeaps[i] ); } return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties2 const & physicalDeviceMemoryProperties2 ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMemoryProperties2.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMemoryProperties2.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMemoryProperties2.memoryProperties ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceMeshShaderFeaturesEXT const & physicalDeviceMeshShaderFeaturesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderFeaturesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderFeaturesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderFeaturesEXT.taskShader ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderFeaturesEXT.meshShader ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderFeaturesEXT.multiviewMeshShader ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderFeaturesEXT.primitiveFragmentShadingRateMeshShader ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderFeaturesEXT.meshShaderQueries ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceMeshShaderFeaturesNV const & physicalDeviceMeshShaderFeaturesNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderFeaturesNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderFeaturesNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderFeaturesNV.taskShader ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderFeaturesNV.meshShader ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceMeshShaderPropertiesEXT const & physicalDeviceMeshShaderPropertiesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderPropertiesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderPropertiesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderPropertiesEXT.maxTaskWorkGroupTotalCount ); for ( size_t i = 0; i < 3; ++i ) { VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderPropertiesEXT.maxTaskWorkGroupCount[i] ); } VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderPropertiesEXT.maxTaskWorkGroupInvocations ); for ( size_t i = 0; i < 3; ++i ) { VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderPropertiesEXT.maxTaskWorkGroupSize[i] ); } VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderPropertiesEXT.maxTaskPayloadSize ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderPropertiesEXT.maxTaskSharedMemorySize ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderPropertiesEXT.maxTaskPayloadAndSharedMemorySize ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderPropertiesEXT.maxMeshWorkGroupTotalCount ); for ( size_t i = 0; i < 3; ++i ) { VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderPropertiesEXT.maxMeshWorkGroupCount[i] ); } VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderPropertiesEXT.maxMeshWorkGroupInvocations ); for ( size_t i = 0; i < 3; ++i ) { VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderPropertiesEXT.maxMeshWorkGroupSize[i] ); } VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderPropertiesEXT.maxMeshSharedMemorySize ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderPropertiesEXT.maxMeshPayloadAndSharedMemorySize ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderPropertiesEXT.maxMeshOutputMemorySize ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderPropertiesEXT.maxMeshPayloadAndOutputMemorySize ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderPropertiesEXT.maxMeshOutputComponents ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderPropertiesEXT.maxMeshOutputVertices ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderPropertiesEXT.maxMeshOutputPrimitives ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderPropertiesEXT.maxMeshOutputLayers ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderPropertiesEXT.maxMeshMultiviewViewCount ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderPropertiesEXT.meshOutputPerVertexGranularity ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderPropertiesEXT.meshOutputPerPrimitiveGranularity ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderPropertiesEXT.maxPreferredTaskWorkGroupInvocations ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderPropertiesEXT.maxPreferredMeshWorkGroupInvocations ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderPropertiesEXT.prefersLocalInvocationVertexOutput ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderPropertiesEXT.prefersLocalInvocationPrimitiveOutput ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderPropertiesEXT.prefersCompactVertexOutput ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderPropertiesEXT.prefersCompactPrimitiveOutput ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceMeshShaderPropertiesNV const & physicalDeviceMeshShaderPropertiesNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderPropertiesNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderPropertiesNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderPropertiesNV.maxDrawMeshTasksCount ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderPropertiesNV.maxTaskWorkGroupInvocations ); for ( size_t i = 0; i < 3; ++i ) { VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderPropertiesNV.maxTaskWorkGroupSize[i] ); } VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderPropertiesNV.maxTaskTotalMemorySize ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderPropertiesNV.maxTaskOutputCount ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderPropertiesNV.maxMeshWorkGroupInvocations ); for ( size_t i = 0; i < 3; ++i ) { VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderPropertiesNV.maxMeshWorkGroupSize[i] ); } VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderPropertiesNV.maxMeshTotalMemorySize ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderPropertiesNV.maxMeshOutputVertices ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderPropertiesNV.maxMeshOutputPrimitives ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderPropertiesNV.maxMeshMultiviewViewCount ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderPropertiesNV.meshOutputPerVertexGranularity ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMeshShaderPropertiesNV.meshOutputPerPrimitiveGranularity ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceMultiDrawFeaturesEXT const & physicalDeviceMultiDrawFeaturesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMultiDrawFeaturesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMultiDrawFeaturesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMultiDrawFeaturesEXT.multiDraw ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceMultiDrawPropertiesEXT const & physicalDeviceMultiDrawPropertiesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMultiDrawPropertiesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMultiDrawPropertiesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMultiDrawPropertiesEXT.maxMultiDrawCount ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT const & physicalDeviceMultisampledRenderToSingleSampledFeaturesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMultisampledRenderToSingleSampledFeaturesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMultisampledRenderToSingleSampledFeaturesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMultisampledRenderToSingleSampledFeaturesEXT.multisampledRenderToSingleSampled ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceMultiviewFeatures const & physicalDeviceMultiviewFeatures ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMultiviewFeatures.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMultiviewFeatures.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMultiviewFeatures.multiview ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMultiviewFeatures.multiviewGeometryShader ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMultiviewFeatures.multiviewTessellationShader ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX const & physicalDeviceMultiviewPerViewAttributesPropertiesNVX ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMultiviewPerViewAttributesPropertiesNVX.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMultiviewPerViewAttributesPropertiesNVX.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMultiviewPerViewAttributesPropertiesNVX.perViewPositionAllComponents ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM const & physicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM.multiviewPerViewRenderAreas ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM const & physicalDeviceMultiviewPerViewViewportsFeaturesQCOM ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMultiviewPerViewViewportsFeaturesQCOM.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMultiviewPerViewViewportsFeaturesQCOM.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMultiviewPerViewViewportsFeaturesQCOM.multiviewPerViewViewports ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceMultiviewProperties const & physicalDeviceMultiviewProperties ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMultiviewProperties.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMultiviewProperties.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMultiviewProperties.maxMultiviewViewCount ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMultiviewProperties.maxMultiviewInstanceIndex ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceMutableDescriptorTypeFeaturesEXT const & physicalDeviceMutableDescriptorTypeFeaturesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMutableDescriptorTypeFeaturesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMutableDescriptorTypeFeaturesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceMutableDescriptorTypeFeaturesEXT.mutableDescriptorType ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceNestedCommandBufferFeaturesEXT const & physicalDeviceNestedCommandBufferFeaturesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceNestedCommandBufferFeaturesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceNestedCommandBufferFeaturesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceNestedCommandBufferFeaturesEXT.nestedCommandBuffer ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceNestedCommandBufferFeaturesEXT.nestedCommandBufferRendering ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceNestedCommandBufferFeaturesEXT.nestedCommandBufferSimultaneousUse ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceNestedCommandBufferPropertiesEXT const & physicalDeviceNestedCommandBufferPropertiesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceNestedCommandBufferPropertiesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceNestedCommandBufferPropertiesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceNestedCommandBufferPropertiesEXT.maxCommandBufferNestingLevel ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceNonSeamlessCubeMapFeaturesEXT const & physicalDeviceNonSeamlessCubeMapFeaturesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceNonSeamlessCubeMapFeaturesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceNonSeamlessCubeMapFeaturesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceNonSeamlessCubeMapFeaturesEXT.nonSeamlessCubeMap ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceOpacityMicromapFeaturesEXT const & physicalDeviceOpacityMicromapFeaturesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceOpacityMicromapFeaturesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceOpacityMicromapFeaturesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceOpacityMicromapFeaturesEXT.micromap ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceOpacityMicromapFeaturesEXT.micromapCaptureReplay ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceOpacityMicromapFeaturesEXT.micromapHostCommands ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceOpacityMicromapPropertiesEXT const & physicalDeviceOpacityMicromapPropertiesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceOpacityMicromapPropertiesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceOpacityMicromapPropertiesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceOpacityMicromapPropertiesEXT.maxOpacity2StateSubdivisionLevel ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceOpacityMicromapPropertiesEXT.maxOpacity4StateSubdivisionLevel ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceOpticalFlowFeaturesNV const & physicalDeviceOpticalFlowFeaturesNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceOpticalFlowFeaturesNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceOpticalFlowFeaturesNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceOpticalFlowFeaturesNV.opticalFlow ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceOpticalFlowPropertiesNV const & physicalDeviceOpticalFlowPropertiesNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceOpticalFlowPropertiesNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceOpticalFlowPropertiesNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceOpticalFlowPropertiesNV.supportedOutputGridSizes ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceOpticalFlowPropertiesNV.supportedHintGridSizes ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceOpticalFlowPropertiesNV.hintSupported ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceOpticalFlowPropertiesNV.costSupported ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceOpticalFlowPropertiesNV.bidirectionalFlowSupported ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceOpticalFlowPropertiesNV.globalFlowSupported ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceOpticalFlowPropertiesNV.minWidth ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceOpticalFlowPropertiesNV.minHeight ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceOpticalFlowPropertiesNV.maxWidth ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceOpticalFlowPropertiesNV.maxHeight ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceOpticalFlowPropertiesNV.maxNumRegionsOfInterest ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDevicePCIBusInfoPropertiesEXT const & physicalDevicePCIBusInfoPropertiesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePCIBusInfoPropertiesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePCIBusInfoPropertiesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePCIBusInfoPropertiesEXT.pciDomain ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePCIBusInfoPropertiesEXT.pciBus ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePCIBusInfoPropertiesEXT.pciDevice ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePCIBusInfoPropertiesEXT.pciFunction ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDevicePageableDeviceLocalMemoryFeaturesEXT const & physicalDevicePageableDeviceLocalMemoryFeaturesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePageableDeviceLocalMemoryFeaturesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePageableDeviceLocalMemoryFeaturesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePageableDeviceLocalMemoryFeaturesEXT.pageableDeviceLocalMemory ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDevicePartitionedAccelerationStructureFeaturesNV const & physicalDevicePartitionedAccelerationStructureFeaturesNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePartitionedAccelerationStructureFeaturesNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePartitionedAccelerationStructureFeaturesNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePartitionedAccelerationStructureFeaturesNV.partitionedAccelerationStructure ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDevicePartitionedAccelerationStructurePropertiesNV const & physicalDevicePartitionedAccelerationStructurePropertiesNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePartitionedAccelerationStructurePropertiesNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePartitionedAccelerationStructurePropertiesNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePartitionedAccelerationStructurePropertiesNV.maxPartitionCount ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDevicePerStageDescriptorSetFeaturesNV const & physicalDevicePerStageDescriptorSetFeaturesNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePerStageDescriptorSetFeaturesNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePerStageDescriptorSetFeaturesNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePerStageDescriptorSetFeaturesNV.perStageDescriptorSet ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePerStageDescriptorSetFeaturesNV.dynamicPipelineLayout ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDevicePerformanceQueryFeaturesKHR const & physicalDevicePerformanceQueryFeaturesKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePerformanceQueryFeaturesKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePerformanceQueryFeaturesKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePerformanceQueryFeaturesKHR.performanceCounterQueryPools ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePerformanceQueryFeaturesKHR.performanceCounterMultipleQueryPools ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDevicePerformanceQueryPropertiesKHR const & physicalDevicePerformanceQueryPropertiesKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePerformanceQueryPropertiesKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePerformanceQueryPropertiesKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePerformanceQueryPropertiesKHR.allowCommandBufferQueryCopies ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDevicePipelineBinaryFeaturesKHR const & physicalDevicePipelineBinaryFeaturesKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePipelineBinaryFeaturesKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePipelineBinaryFeaturesKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePipelineBinaryFeaturesKHR.pipelineBinaries ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDevicePipelineBinaryPropertiesKHR const & physicalDevicePipelineBinaryPropertiesKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePipelineBinaryPropertiesKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePipelineBinaryPropertiesKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePipelineBinaryPropertiesKHR.pipelineBinaryInternalCache ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePipelineBinaryPropertiesKHR.pipelineBinaryInternalCacheControl ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePipelineBinaryPropertiesKHR.pipelineBinaryPrefersInternalCache ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePipelineBinaryPropertiesKHR.pipelineBinaryPrecompiledInternalCache ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePipelineBinaryPropertiesKHR.pipelineBinaryCompressedData ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDevicePipelineCreationCacheControlFeatures const & physicalDevicePipelineCreationCacheControlFeatures ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePipelineCreationCacheControlFeatures.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePipelineCreationCacheControlFeatures.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePipelineCreationCacheControlFeatures.pipelineCreationCacheControl ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDevicePipelineExecutablePropertiesFeaturesKHR const & physicalDevicePipelineExecutablePropertiesFeaturesKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePipelineExecutablePropertiesFeaturesKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePipelineExecutablePropertiesFeaturesKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePipelineExecutablePropertiesFeaturesKHR.pipelineExecutableInfo ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT const & physicalDevicePipelineLibraryGroupHandlesFeaturesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePipelineLibraryGroupHandlesFeaturesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePipelineLibraryGroupHandlesFeaturesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePipelineLibraryGroupHandlesFeaturesEXT.pipelineLibraryGroupHandles ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDevicePipelineOpacityMicromapFeaturesARM const & physicalDevicePipelineOpacityMicromapFeaturesARM ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePipelineOpacityMicromapFeaturesARM.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePipelineOpacityMicromapFeaturesARM.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePipelineOpacityMicromapFeaturesARM.pipelineOpacityMicromap ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDevicePipelinePropertiesFeaturesEXT const & physicalDevicePipelinePropertiesFeaturesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePipelinePropertiesFeaturesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePipelinePropertiesFeaturesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePipelinePropertiesFeaturesEXT.pipelinePropertiesIdentifier ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDevicePipelineProtectedAccessFeatures const & physicalDevicePipelineProtectedAccessFeatures ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePipelineProtectedAccessFeatures.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePipelineProtectedAccessFeatures.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePipelineProtectedAccessFeatures.pipelineProtectedAccess ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDevicePipelineRobustnessFeatures const & physicalDevicePipelineRobustnessFeatures ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePipelineRobustnessFeatures.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePipelineRobustnessFeatures.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePipelineRobustnessFeatures.pipelineRobustness ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDevicePipelineRobustnessProperties const & physicalDevicePipelineRobustnessProperties ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePipelineRobustnessProperties.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePipelineRobustnessProperties.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePipelineRobustnessProperties.defaultRobustnessStorageBuffers ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePipelineRobustnessProperties.defaultRobustnessUniformBuffers ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePipelineRobustnessProperties.defaultRobustnessVertexInputs ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePipelineRobustnessProperties.defaultRobustnessImages ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDevicePointClippingProperties const & physicalDevicePointClippingProperties ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePointClippingProperties.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePointClippingProperties.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePointClippingProperties.pointClippingBehavior ); return seed; } }; # if defined( VK_ENABLE_BETA_EXTENSIONS ) template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDevicePortabilitySubsetFeaturesKHR const & physicalDevicePortabilitySubsetFeaturesKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePortabilitySubsetFeaturesKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePortabilitySubsetFeaturesKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePortabilitySubsetFeaturesKHR.constantAlphaColorBlendFactors ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePortabilitySubsetFeaturesKHR.events ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePortabilitySubsetFeaturesKHR.imageViewFormatReinterpretation ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePortabilitySubsetFeaturesKHR.imageViewFormatSwizzle ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePortabilitySubsetFeaturesKHR.imageView2DOn3DImage ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePortabilitySubsetFeaturesKHR.multisampleArrayImage ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePortabilitySubsetFeaturesKHR.mutableComparisonSamplers ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePortabilitySubsetFeaturesKHR.pointPolygons ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePortabilitySubsetFeaturesKHR.samplerMipLodBias ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePortabilitySubsetFeaturesKHR.separateStencilMaskRef ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePortabilitySubsetFeaturesKHR.shaderSampleRateInterpolationFunctions ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePortabilitySubsetFeaturesKHR.tessellationIsolines ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePortabilitySubsetFeaturesKHR.tessellationPointMode ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePortabilitySubsetFeaturesKHR.triangleFans ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePortabilitySubsetFeaturesKHR.vertexAttributeAccessBeyondStride ); return seed; } }; # endif /*VK_ENABLE_BETA_EXTENSIONS*/ # if defined( VK_ENABLE_BETA_EXTENSIONS ) template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDevicePortabilitySubsetPropertiesKHR const & physicalDevicePortabilitySubsetPropertiesKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePortabilitySubsetPropertiesKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePortabilitySubsetPropertiesKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePortabilitySubsetPropertiesKHR.minVertexInputBindingStrideAlignment ); return seed; } }; # endif /*VK_ENABLE_BETA_EXTENSIONS*/ template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDevicePresentBarrierFeaturesNV const & physicalDevicePresentBarrierFeaturesNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePresentBarrierFeaturesNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePresentBarrierFeaturesNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePresentBarrierFeaturesNV.presentBarrier ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDevicePresentIdFeaturesKHR const & physicalDevicePresentIdFeaturesKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePresentIdFeaturesKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePresentIdFeaturesKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePresentIdFeaturesKHR.presentId ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDevicePresentModeFifoLatestReadyFeaturesEXT const & physicalDevicePresentModeFifoLatestReadyFeaturesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePresentModeFifoLatestReadyFeaturesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePresentModeFifoLatestReadyFeaturesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePresentModeFifoLatestReadyFeaturesEXT.presentModeFifoLatestReady ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDevicePresentWaitFeaturesKHR const & physicalDevicePresentWaitFeaturesKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePresentWaitFeaturesKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePresentWaitFeaturesKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePresentWaitFeaturesKHR.presentWait ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT const & physicalDevicePrimitiveTopologyListRestartFeaturesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePrimitiveTopologyListRestartFeaturesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePrimitiveTopologyListRestartFeaturesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePrimitiveTopologyListRestartFeaturesEXT.primitiveTopologyListRestart ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePrimitiveTopologyListRestartFeaturesEXT.primitiveTopologyPatchListRestart ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDevicePrimitivesGeneratedQueryFeaturesEXT const & physicalDevicePrimitivesGeneratedQueryFeaturesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePrimitivesGeneratedQueryFeaturesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePrimitivesGeneratedQueryFeaturesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePrimitivesGeneratedQueryFeaturesEXT.primitivesGeneratedQuery ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePrimitivesGeneratedQueryFeaturesEXT.primitivesGeneratedQueryWithRasterizerDiscard ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePrimitivesGeneratedQueryFeaturesEXT.primitivesGeneratedQueryWithNonZeroStreams ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDevicePrivateDataFeatures const & physicalDevicePrivateDataFeatures ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePrivateDataFeatures.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePrivateDataFeatures.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePrivateDataFeatures.privateData ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceProtectedMemoryFeatures const & physicalDeviceProtectedMemoryFeatures ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceProtectedMemoryFeatures.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceProtectedMemoryFeatures.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceProtectedMemoryFeatures.protectedMemory ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceProtectedMemoryProperties const & physicalDeviceProtectedMemoryProperties ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceProtectedMemoryProperties.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceProtectedMemoryProperties.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceProtectedMemoryProperties.protectedNoFault ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceProvokingVertexFeaturesEXT const & physicalDeviceProvokingVertexFeaturesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceProvokingVertexFeaturesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceProvokingVertexFeaturesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceProvokingVertexFeaturesEXT.provokingVertexLast ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceProvokingVertexFeaturesEXT.transformFeedbackPreservesProvokingVertex ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceProvokingVertexPropertiesEXT const & physicalDeviceProvokingVertexPropertiesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceProvokingVertexPropertiesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceProvokingVertexPropertiesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceProvokingVertexPropertiesEXT.provokingVertexModePerPipeline ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceProvokingVertexPropertiesEXT.transformFeedbackPreservesTriangleFanProvokingVertex ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDevicePushDescriptorProperties const & physicalDevicePushDescriptorProperties ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePushDescriptorProperties.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePushDescriptorProperties.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDevicePushDescriptorProperties.maxPushDescriptors ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceRGBA10X6FormatsFeaturesEXT const & physicalDeviceRGBA10X6FormatsFeaturesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRGBA10X6FormatsFeaturesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRGBA10X6FormatsFeaturesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRGBA10X6FormatsFeaturesEXT.formatRgba10x6WithoutYCbCrSampler ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT const & physicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT.rasterizationOrderColorAttachmentAccess ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT.rasterizationOrderDepthAttachmentAccess ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT.rasterizationOrderStencilAttachmentAccess ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceRawAccessChainsFeaturesNV const & physicalDeviceRawAccessChainsFeaturesNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRawAccessChainsFeaturesNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRawAccessChainsFeaturesNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRawAccessChainsFeaturesNV.shaderRawAccessChains ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceRayQueryFeaturesKHR const & physicalDeviceRayQueryFeaturesKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayQueryFeaturesKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayQueryFeaturesKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayQueryFeaturesKHR.rayQuery ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceRayTracingInvocationReorderFeaturesNV const & physicalDeviceRayTracingInvocationReorderFeaturesNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayTracingInvocationReorderFeaturesNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayTracingInvocationReorderFeaturesNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayTracingInvocationReorderFeaturesNV.rayTracingInvocationReorder ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceRayTracingInvocationReorderPropertiesNV const & physicalDeviceRayTracingInvocationReorderPropertiesNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayTracingInvocationReorderPropertiesNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayTracingInvocationReorderPropertiesNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayTracingInvocationReorderPropertiesNV.rayTracingInvocationReorderReorderingHint ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceRayTracingLinearSweptSpheresFeaturesNV const & physicalDeviceRayTracingLinearSweptSpheresFeaturesNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayTracingLinearSweptSpheresFeaturesNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayTracingLinearSweptSpheresFeaturesNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayTracingLinearSweptSpheresFeaturesNV.spheres ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayTracingLinearSweptSpheresFeaturesNV.linearSweptSpheres ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceRayTracingMaintenance1FeaturesKHR const & physicalDeviceRayTracingMaintenance1FeaturesKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayTracingMaintenance1FeaturesKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayTracingMaintenance1FeaturesKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayTracingMaintenance1FeaturesKHR.rayTracingMaintenance1 ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayTracingMaintenance1FeaturesKHR.rayTracingPipelineTraceRaysIndirect2 ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceRayTracingMotionBlurFeaturesNV const & physicalDeviceRayTracingMotionBlurFeaturesNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayTracingMotionBlurFeaturesNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayTracingMotionBlurFeaturesNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayTracingMotionBlurFeaturesNV.rayTracingMotionBlur ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayTracingMotionBlurFeaturesNV.rayTracingMotionBlurPipelineTraceRaysIndirect ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceRayTracingPipelineFeaturesKHR const & physicalDeviceRayTracingPipelineFeaturesKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayTracingPipelineFeaturesKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayTracingPipelineFeaturesKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayTracingPipelineFeaturesKHR.rayTracingPipeline ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayTracingPipelineFeaturesKHR.rayTracingPipelineShaderGroupHandleCaptureReplay ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayTracingPipelineFeaturesKHR.rayTracingPipelineShaderGroupHandleCaptureReplayMixed ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayTracingPipelineFeaturesKHR.rayTracingPipelineTraceRaysIndirect ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayTracingPipelineFeaturesKHR.rayTraversalPrimitiveCulling ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceRayTracingPipelinePropertiesKHR const & physicalDeviceRayTracingPipelinePropertiesKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayTracingPipelinePropertiesKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayTracingPipelinePropertiesKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayTracingPipelinePropertiesKHR.shaderGroupHandleSize ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayTracingPipelinePropertiesKHR.maxRayRecursionDepth ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayTracingPipelinePropertiesKHR.maxShaderGroupStride ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayTracingPipelinePropertiesKHR.shaderGroupBaseAlignment ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayTracingPipelinePropertiesKHR.shaderGroupHandleCaptureReplaySize ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayTracingPipelinePropertiesKHR.maxRayDispatchInvocationCount ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayTracingPipelinePropertiesKHR.shaderGroupHandleAlignment ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayTracingPipelinePropertiesKHR.maxRayHitAttributeSize ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceRayTracingPositionFetchFeaturesKHR const & physicalDeviceRayTracingPositionFetchFeaturesKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayTracingPositionFetchFeaturesKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayTracingPositionFetchFeaturesKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayTracingPositionFetchFeaturesKHR.rayTracingPositionFetch ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceRayTracingPropertiesNV const & physicalDeviceRayTracingPropertiesNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayTracingPropertiesNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayTracingPropertiesNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayTracingPropertiesNV.shaderGroupHandleSize ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayTracingPropertiesNV.maxRecursionDepth ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayTracingPropertiesNV.maxShaderGroupStride ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayTracingPropertiesNV.shaderGroupBaseAlignment ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayTracingPropertiesNV.maxGeometryCount ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayTracingPropertiesNV.maxInstanceCount ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayTracingPropertiesNV.maxTriangleCount ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayTracingPropertiesNV.maxDescriptorSetAccelerationStructures ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceRayTracingValidationFeaturesNV const & physicalDeviceRayTracingValidationFeaturesNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayTracingValidationFeaturesNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayTracingValidationFeaturesNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRayTracingValidationFeaturesNV.rayTracingValidation ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceRelaxedLineRasterizationFeaturesIMG const & physicalDeviceRelaxedLineRasterizationFeaturesIMG ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRelaxedLineRasterizationFeaturesIMG.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRelaxedLineRasterizationFeaturesIMG.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRelaxedLineRasterizationFeaturesIMG.relaxedLineRasterization ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceRenderPassStripedFeaturesARM const & physicalDeviceRenderPassStripedFeaturesARM ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRenderPassStripedFeaturesARM.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRenderPassStripedFeaturesARM.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRenderPassStripedFeaturesARM.renderPassStriped ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceRenderPassStripedPropertiesARM const & physicalDeviceRenderPassStripedPropertiesARM ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRenderPassStripedPropertiesARM.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRenderPassStripedPropertiesARM.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRenderPassStripedPropertiesARM.renderPassStripeGranularity ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRenderPassStripedPropertiesARM.maxRenderPassStripes ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceRepresentativeFragmentTestFeaturesNV const & physicalDeviceRepresentativeFragmentTestFeaturesNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRepresentativeFragmentTestFeaturesNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRepresentativeFragmentTestFeaturesNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRepresentativeFragmentTestFeaturesNV.representativeFragmentTest ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceRobustness2FeaturesEXT const & physicalDeviceRobustness2FeaturesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRobustness2FeaturesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRobustness2FeaturesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRobustness2FeaturesEXT.robustBufferAccess2 ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRobustness2FeaturesEXT.robustImageAccess2 ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRobustness2FeaturesEXT.nullDescriptor ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceRobustness2PropertiesEXT const & physicalDeviceRobustness2PropertiesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRobustness2PropertiesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRobustness2PropertiesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRobustness2PropertiesEXT.robustStorageBufferAccessSizeAlignment ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceRobustness2PropertiesEXT.robustUniformBufferAccessSizeAlignment ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceSampleLocationsPropertiesEXT const & physicalDeviceSampleLocationsPropertiesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSampleLocationsPropertiesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSampleLocationsPropertiesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSampleLocationsPropertiesEXT.sampleLocationSampleCounts ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSampleLocationsPropertiesEXT.maxSampleLocationGridSize ); for ( size_t i = 0; i < 2; ++i ) { VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSampleLocationsPropertiesEXT.sampleLocationCoordinateRange[i] ); } VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSampleLocationsPropertiesEXT.sampleLocationSubPixelBits ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSampleLocationsPropertiesEXT.variableSampleLocations ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceSamplerFilterMinmaxProperties const & physicalDeviceSamplerFilterMinmaxProperties ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSamplerFilterMinmaxProperties.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSamplerFilterMinmaxProperties.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSamplerFilterMinmaxProperties.filterMinmaxSingleComponentFormats ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSamplerFilterMinmaxProperties.filterMinmaxImageComponentMapping ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceSamplerYcbcrConversionFeatures const & physicalDeviceSamplerYcbcrConversionFeatures ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSamplerYcbcrConversionFeatures.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSamplerYcbcrConversionFeatures.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSamplerYcbcrConversionFeatures.samplerYcbcrConversion ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceScalarBlockLayoutFeatures const & physicalDeviceScalarBlockLayoutFeatures ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceScalarBlockLayoutFeatures.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceScalarBlockLayoutFeatures.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceScalarBlockLayoutFeatures.scalarBlockLayout ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceSchedulingControlsFeaturesARM const & physicalDeviceSchedulingControlsFeaturesARM ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSchedulingControlsFeaturesARM.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSchedulingControlsFeaturesARM.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSchedulingControlsFeaturesARM.schedulingControls ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceSchedulingControlsPropertiesARM const & physicalDeviceSchedulingControlsPropertiesARM ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSchedulingControlsPropertiesARM.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSchedulingControlsPropertiesARM.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSchedulingControlsPropertiesARM.schedulingControlsFlags ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceSeparateDepthStencilLayoutsFeatures const & physicalDeviceSeparateDepthStencilLayoutsFeatures ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSeparateDepthStencilLayoutsFeatures.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSeparateDepthStencilLayoutsFeatures.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSeparateDepthStencilLayoutsFeatures.separateDepthStencilLayouts ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderAtomicFloat16VectorFeaturesNV const & physicalDeviceShaderAtomicFloat16VectorFeaturesNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderAtomicFloat16VectorFeaturesNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderAtomicFloat16VectorFeaturesNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderAtomicFloat16VectorFeaturesNV.shaderFloat16VectorAtomics ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderAtomicFloat2FeaturesEXT const & physicalDeviceShaderAtomicFloat2FeaturesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderAtomicFloat2FeaturesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderAtomicFloat2FeaturesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderAtomicFloat2FeaturesEXT.shaderBufferFloat16Atomics ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderAtomicFloat2FeaturesEXT.shaderBufferFloat16AtomicAdd ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderAtomicFloat2FeaturesEXT.shaderBufferFloat16AtomicMinMax ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderAtomicFloat2FeaturesEXT.shaderBufferFloat32AtomicMinMax ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderAtomicFloat2FeaturesEXT.shaderBufferFloat64AtomicMinMax ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderAtomicFloat2FeaturesEXT.shaderSharedFloat16Atomics ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderAtomicFloat2FeaturesEXT.shaderSharedFloat16AtomicAdd ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderAtomicFloat2FeaturesEXT.shaderSharedFloat16AtomicMinMax ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderAtomicFloat2FeaturesEXT.shaderSharedFloat32AtomicMinMax ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderAtomicFloat2FeaturesEXT.shaderSharedFloat64AtomicMinMax ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderAtomicFloat2FeaturesEXT.shaderImageFloat32AtomicMinMax ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderAtomicFloat2FeaturesEXT.sparseImageFloat32AtomicMinMax ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderAtomicFloatFeaturesEXT const & physicalDeviceShaderAtomicFloatFeaturesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderAtomicFloatFeaturesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderAtomicFloatFeaturesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderAtomicFloatFeaturesEXT.shaderBufferFloat32Atomics ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderAtomicFloatFeaturesEXT.shaderBufferFloat32AtomicAdd ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderAtomicFloatFeaturesEXT.shaderBufferFloat64Atomics ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderAtomicFloatFeaturesEXT.shaderBufferFloat64AtomicAdd ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderAtomicFloatFeaturesEXT.shaderSharedFloat32Atomics ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderAtomicFloatFeaturesEXT.shaderSharedFloat32AtomicAdd ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderAtomicFloatFeaturesEXT.shaderSharedFloat64Atomics ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderAtomicFloatFeaturesEXT.shaderSharedFloat64AtomicAdd ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderAtomicFloatFeaturesEXT.shaderImageFloat32Atomics ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderAtomicFloatFeaturesEXT.shaderImageFloat32AtomicAdd ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderAtomicFloatFeaturesEXT.sparseImageFloat32Atomics ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderAtomicFloatFeaturesEXT.sparseImageFloat32AtomicAdd ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderAtomicInt64Features const & physicalDeviceShaderAtomicInt64Features ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderAtomicInt64Features.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderAtomicInt64Features.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderAtomicInt64Features.shaderBufferInt64Atomics ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderAtomicInt64Features.shaderSharedInt64Atomics ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderClockFeaturesKHR const & physicalDeviceShaderClockFeaturesKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderClockFeaturesKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderClockFeaturesKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderClockFeaturesKHR.shaderSubgroupClock ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderClockFeaturesKHR.shaderDeviceClock ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderCoreBuiltinsFeaturesARM const & physicalDeviceShaderCoreBuiltinsFeaturesARM ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderCoreBuiltinsFeaturesARM.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderCoreBuiltinsFeaturesARM.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderCoreBuiltinsFeaturesARM.shaderCoreBuiltins ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderCoreBuiltinsPropertiesARM const & physicalDeviceShaderCoreBuiltinsPropertiesARM ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderCoreBuiltinsPropertiesARM.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderCoreBuiltinsPropertiesARM.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderCoreBuiltinsPropertiesARM.shaderCoreMask ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderCoreBuiltinsPropertiesARM.shaderCoreCount ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderCoreBuiltinsPropertiesARM.shaderWarpsPerCore ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderCoreProperties2AMD const & physicalDeviceShaderCoreProperties2AMD ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderCoreProperties2AMD.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderCoreProperties2AMD.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderCoreProperties2AMD.shaderCoreFeatures ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderCoreProperties2AMD.activeComputeUnitCount ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderCorePropertiesAMD const & physicalDeviceShaderCorePropertiesAMD ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderCorePropertiesAMD.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderCorePropertiesAMD.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderCorePropertiesAMD.shaderEngineCount ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderCorePropertiesAMD.shaderArraysPerEngineCount ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderCorePropertiesAMD.computeUnitsPerShaderArray ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderCorePropertiesAMD.simdPerComputeUnit ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderCorePropertiesAMD.wavefrontsPerSimd ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderCorePropertiesAMD.wavefrontSize ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderCorePropertiesAMD.sgprsPerSimd ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderCorePropertiesAMD.minSgprAllocation ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderCorePropertiesAMD.maxSgprAllocation ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderCorePropertiesAMD.sgprAllocationGranularity ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderCorePropertiesAMD.vgprsPerSimd ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderCorePropertiesAMD.minVgprAllocation ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderCorePropertiesAMD.maxVgprAllocation ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderCorePropertiesAMD.vgprAllocationGranularity ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderCorePropertiesARM const & physicalDeviceShaderCorePropertiesARM ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderCorePropertiesARM.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderCorePropertiesARM.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderCorePropertiesARM.pixelRate ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderCorePropertiesARM.texelRate ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderCorePropertiesARM.fmaRate ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderDemoteToHelperInvocationFeatures const & physicalDeviceShaderDemoteToHelperInvocationFeatures ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderDemoteToHelperInvocationFeatures.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderDemoteToHelperInvocationFeatures.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderDemoteToHelperInvocationFeatures.shaderDemoteToHelperInvocation ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderDrawParametersFeatures const & physicalDeviceShaderDrawParametersFeatures ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderDrawParametersFeatures.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderDrawParametersFeatures.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderDrawParametersFeatures.shaderDrawParameters ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD const & physicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD.shaderEarlyAndLateFragmentTests ); return seed; } }; # if defined( VK_ENABLE_BETA_EXTENSIONS ) template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderEnqueueFeaturesAMDX const & physicalDeviceShaderEnqueueFeaturesAMDX ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderEnqueueFeaturesAMDX.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderEnqueueFeaturesAMDX.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderEnqueueFeaturesAMDX.shaderEnqueue ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderEnqueueFeaturesAMDX.shaderMeshEnqueue ); return seed; } }; # endif /*VK_ENABLE_BETA_EXTENSIONS*/ # if defined( VK_ENABLE_BETA_EXTENSIONS ) template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderEnqueuePropertiesAMDX const & physicalDeviceShaderEnqueuePropertiesAMDX ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderEnqueuePropertiesAMDX.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderEnqueuePropertiesAMDX.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderEnqueuePropertiesAMDX.maxExecutionGraphDepth ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderEnqueuePropertiesAMDX.maxExecutionGraphShaderOutputNodes ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderEnqueuePropertiesAMDX.maxExecutionGraphShaderPayloadSize ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderEnqueuePropertiesAMDX.maxExecutionGraphShaderPayloadCount ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderEnqueuePropertiesAMDX.executionGraphDispatchAddressAlignment ); for ( size_t i = 0; i < 3; ++i ) { VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderEnqueuePropertiesAMDX.maxExecutionGraphWorkgroupCount[i] ); } VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderEnqueuePropertiesAMDX.maxExecutionGraphWorkgroups ); return seed; } }; # endif /*VK_ENABLE_BETA_EXTENSIONS*/ template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderExpectAssumeFeatures const & physicalDeviceShaderExpectAssumeFeatures ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderExpectAssumeFeatures.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderExpectAssumeFeatures.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderExpectAssumeFeatures.shaderExpectAssume ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderFloat16Int8Features const & physicalDeviceShaderFloat16Int8Features ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderFloat16Int8Features.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderFloat16Int8Features.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderFloat16Int8Features.shaderFloat16 ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderFloat16Int8Features.shaderInt8 ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderFloatControls2Features const & physicalDeviceShaderFloatControls2Features ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderFloatControls2Features.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderFloatControls2Features.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderFloatControls2Features.shaderFloatControls2 ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderImageAtomicInt64FeaturesEXT const & physicalDeviceShaderImageAtomicInt64FeaturesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderImageAtomicInt64FeaturesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderImageAtomicInt64FeaturesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderImageAtomicInt64FeaturesEXT.shaderImageInt64Atomics ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderImageAtomicInt64FeaturesEXT.sparseImageInt64Atomics ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderImageFootprintFeaturesNV const & physicalDeviceShaderImageFootprintFeaturesNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderImageFootprintFeaturesNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderImageFootprintFeaturesNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderImageFootprintFeaturesNV.imageFootprint ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderIntegerDotProductFeatures const & physicalDeviceShaderIntegerDotProductFeatures ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderIntegerDotProductFeatures.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderIntegerDotProductFeatures.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderIntegerDotProductFeatures.shaderIntegerDotProduct ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderIntegerDotProductProperties const & physicalDeviceShaderIntegerDotProductProperties ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderIntegerDotProductProperties.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderIntegerDotProductProperties.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderIntegerDotProductProperties.integerDotProduct8BitUnsignedAccelerated ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderIntegerDotProductProperties.integerDotProduct8BitSignedAccelerated ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderIntegerDotProductProperties.integerDotProduct8BitMixedSignednessAccelerated ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderIntegerDotProductProperties.integerDotProduct4x8BitPackedUnsignedAccelerated ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderIntegerDotProductProperties.integerDotProduct4x8BitPackedSignedAccelerated ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderIntegerDotProductProperties.integerDotProduct4x8BitPackedMixedSignednessAccelerated ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderIntegerDotProductProperties.integerDotProduct16BitUnsignedAccelerated ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderIntegerDotProductProperties.integerDotProduct16BitSignedAccelerated ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderIntegerDotProductProperties.integerDotProduct16BitMixedSignednessAccelerated ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderIntegerDotProductProperties.integerDotProduct32BitUnsignedAccelerated ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderIntegerDotProductProperties.integerDotProduct32BitSignedAccelerated ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderIntegerDotProductProperties.integerDotProduct32BitMixedSignednessAccelerated ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderIntegerDotProductProperties.integerDotProduct64BitUnsignedAccelerated ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderIntegerDotProductProperties.integerDotProduct64BitSignedAccelerated ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderIntegerDotProductProperties.integerDotProduct64BitMixedSignednessAccelerated ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderIntegerDotProductProperties.integerDotProductAccumulatingSaturating8BitUnsignedAccelerated ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderIntegerDotProductProperties.integerDotProductAccumulatingSaturating8BitSignedAccelerated ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderIntegerDotProductProperties.integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderIntegerDotProductProperties.integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderIntegerDotProductProperties.integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderIntegerDotProductProperties.integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderIntegerDotProductProperties.integerDotProductAccumulatingSaturating16BitUnsignedAccelerated ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderIntegerDotProductProperties.integerDotProductAccumulatingSaturating16BitSignedAccelerated ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderIntegerDotProductProperties.integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderIntegerDotProductProperties.integerDotProductAccumulatingSaturating32BitUnsignedAccelerated ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderIntegerDotProductProperties.integerDotProductAccumulatingSaturating32BitSignedAccelerated ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderIntegerDotProductProperties.integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderIntegerDotProductProperties.integerDotProductAccumulatingSaturating64BitUnsignedAccelerated ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderIntegerDotProductProperties.integerDotProductAccumulatingSaturating64BitSignedAccelerated ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderIntegerDotProductProperties.integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL const & physicalDeviceShaderIntegerFunctions2FeaturesINTEL ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderIntegerFunctions2FeaturesINTEL.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderIntegerFunctions2FeaturesINTEL.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderIntegerFunctions2FeaturesINTEL.shaderIntegerFunctions2 ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderMaximalReconvergenceFeaturesKHR const & physicalDeviceShaderMaximalReconvergenceFeaturesKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderMaximalReconvergenceFeaturesKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderMaximalReconvergenceFeaturesKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderMaximalReconvergenceFeaturesKHR.shaderMaximalReconvergence ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderModuleIdentifierFeaturesEXT const & physicalDeviceShaderModuleIdentifierFeaturesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderModuleIdentifierFeaturesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderModuleIdentifierFeaturesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderModuleIdentifierFeaturesEXT.shaderModuleIdentifier ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderModuleIdentifierPropertiesEXT const & physicalDeviceShaderModuleIdentifierPropertiesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderModuleIdentifierPropertiesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderModuleIdentifierPropertiesEXT.pNext ); for ( size_t i = 0; i < VK_UUID_SIZE; ++i ) { VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderModuleIdentifierPropertiesEXT.shaderModuleIdentifierAlgorithmUUID[i] ); } return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderObjectFeaturesEXT const & physicalDeviceShaderObjectFeaturesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderObjectFeaturesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderObjectFeaturesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderObjectFeaturesEXT.shaderObject ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderObjectPropertiesEXT const & physicalDeviceShaderObjectPropertiesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderObjectPropertiesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderObjectPropertiesEXT.pNext ); for ( size_t i = 0; i < VK_UUID_SIZE; ++i ) { VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderObjectPropertiesEXT.shaderBinaryUUID[i] ); } VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderObjectPropertiesEXT.shaderBinaryVersion ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderQuadControlFeaturesKHR const & physicalDeviceShaderQuadControlFeaturesKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderQuadControlFeaturesKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderQuadControlFeaturesKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderQuadControlFeaturesKHR.shaderQuadControl ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR const & physicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR.shaderRelaxedExtendedInstruction ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderReplicatedCompositesFeaturesEXT const & physicalDeviceShaderReplicatedCompositesFeaturesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderReplicatedCompositesFeaturesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderReplicatedCompositesFeaturesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderReplicatedCompositesFeaturesEXT.shaderReplicatedComposites ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderSMBuiltinsFeaturesNV const & physicalDeviceShaderSMBuiltinsFeaturesNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderSMBuiltinsFeaturesNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderSMBuiltinsFeaturesNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderSMBuiltinsFeaturesNV.shaderSMBuiltins ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderSMBuiltinsPropertiesNV const & physicalDeviceShaderSMBuiltinsPropertiesNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderSMBuiltinsPropertiesNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderSMBuiltinsPropertiesNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderSMBuiltinsPropertiesNV.shaderSMCount ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderSMBuiltinsPropertiesNV.shaderWarpsPerSM ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderSubgroupExtendedTypesFeatures const & physicalDeviceShaderSubgroupExtendedTypesFeatures ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderSubgroupExtendedTypesFeatures.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderSubgroupExtendedTypesFeatures.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderSubgroupExtendedTypesFeatures.shaderSubgroupExtendedTypes ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderSubgroupRotateFeatures const & physicalDeviceShaderSubgroupRotateFeatures ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderSubgroupRotateFeatures.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderSubgroupRotateFeatures.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderSubgroupRotateFeatures.shaderSubgroupRotate ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderSubgroupRotateFeatures.shaderSubgroupRotateClustered ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR const & physicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR.shaderSubgroupUniformControlFlow ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderTerminateInvocationFeatures const & physicalDeviceShaderTerminateInvocationFeatures ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderTerminateInvocationFeatures.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderTerminateInvocationFeatures.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderTerminateInvocationFeatures.shaderTerminateInvocation ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderTileImageFeaturesEXT const & physicalDeviceShaderTileImageFeaturesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderTileImageFeaturesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderTileImageFeaturesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderTileImageFeaturesEXT.shaderTileImageColorReadAccess ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderTileImageFeaturesEXT.shaderTileImageDepthReadAccess ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderTileImageFeaturesEXT.shaderTileImageStencilReadAccess ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderTileImagePropertiesEXT const & physicalDeviceShaderTileImagePropertiesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderTileImagePropertiesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderTileImagePropertiesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderTileImagePropertiesEXT.shaderTileImageCoherentReadAccelerated ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderTileImagePropertiesEXT.shaderTileImageReadSampleFromPixelRateInvocation ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShaderTileImagePropertiesEXT.shaderTileImageReadFromHelperInvocation ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceShadingRateImageFeaturesNV const & physicalDeviceShadingRateImageFeaturesNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShadingRateImageFeaturesNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShadingRateImageFeaturesNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShadingRateImageFeaturesNV.shadingRateImage ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShadingRateImageFeaturesNV.shadingRateCoarseSampleOrder ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceShadingRateImagePropertiesNV const & physicalDeviceShadingRateImagePropertiesNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShadingRateImagePropertiesNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShadingRateImagePropertiesNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShadingRateImagePropertiesNV.shadingRateTexelSize ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShadingRateImagePropertiesNV.shadingRatePaletteSize ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceShadingRateImagePropertiesNV.shadingRateMaxCoarseSamples ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceSparseImageFormatInfo2 const & physicalDeviceSparseImageFormatInfo2 ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSparseImageFormatInfo2.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSparseImageFormatInfo2.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSparseImageFormatInfo2.format ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSparseImageFormatInfo2.type ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSparseImageFormatInfo2.samples ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSparseImageFormatInfo2.usage ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSparseImageFormatInfo2.tiling ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceSubgroupProperties const & physicalDeviceSubgroupProperties ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSubgroupProperties.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSubgroupProperties.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSubgroupProperties.subgroupSize ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSubgroupProperties.supportedStages ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSubgroupProperties.supportedOperations ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSubgroupProperties.quadOperationsInAllStages ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceSubgroupSizeControlFeatures const & physicalDeviceSubgroupSizeControlFeatures ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSubgroupSizeControlFeatures.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSubgroupSizeControlFeatures.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSubgroupSizeControlFeatures.subgroupSizeControl ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSubgroupSizeControlFeatures.computeFullSubgroups ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceSubgroupSizeControlProperties const & physicalDeviceSubgroupSizeControlProperties ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSubgroupSizeControlProperties.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSubgroupSizeControlProperties.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSubgroupSizeControlProperties.minSubgroupSize ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSubgroupSizeControlProperties.maxSubgroupSize ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSubgroupSizeControlProperties.maxComputeWorkgroupSubgroups ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSubgroupSizeControlProperties.requiredSubgroupSizeStages ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceSubpassMergeFeedbackFeaturesEXT const & physicalDeviceSubpassMergeFeedbackFeaturesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSubpassMergeFeedbackFeaturesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSubpassMergeFeedbackFeaturesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSubpassMergeFeedbackFeaturesEXT.subpassMergeFeedback ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceSubpassShadingFeaturesHUAWEI const & physicalDeviceSubpassShadingFeaturesHUAWEI ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSubpassShadingFeaturesHUAWEI.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSubpassShadingFeaturesHUAWEI.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSubpassShadingFeaturesHUAWEI.subpassShading ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceSubpassShadingPropertiesHUAWEI const & physicalDeviceSubpassShadingPropertiesHUAWEI ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSubpassShadingPropertiesHUAWEI.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSubpassShadingPropertiesHUAWEI.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSubpassShadingPropertiesHUAWEI.maxSubpassShadingWorkgroupSizeAspectRatio ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR const & physicalDeviceSurfaceInfo2KHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSurfaceInfo2KHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSurfaceInfo2KHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSurfaceInfo2KHR.surface ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceSwapchainMaintenance1FeaturesEXT const & physicalDeviceSwapchainMaintenance1FeaturesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSwapchainMaintenance1FeaturesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSwapchainMaintenance1FeaturesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSwapchainMaintenance1FeaturesEXT.swapchainMaintenance1 ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceSynchronization2Features const & physicalDeviceSynchronization2Features ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSynchronization2Features.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSynchronization2Features.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceSynchronization2Features.synchronization2 ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceTexelBufferAlignmentFeaturesEXT const & physicalDeviceTexelBufferAlignmentFeaturesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceTexelBufferAlignmentFeaturesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceTexelBufferAlignmentFeaturesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceTexelBufferAlignmentFeaturesEXT.texelBufferAlignment ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceTexelBufferAlignmentProperties const & physicalDeviceTexelBufferAlignmentProperties ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceTexelBufferAlignmentProperties.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceTexelBufferAlignmentProperties.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceTexelBufferAlignmentProperties.storageTexelBufferOffsetAlignmentBytes ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceTexelBufferAlignmentProperties.storageTexelBufferOffsetSingleTexelAlignment ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceTexelBufferAlignmentProperties.uniformTexelBufferOffsetAlignmentBytes ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceTexelBufferAlignmentProperties.uniformTexelBufferOffsetSingleTexelAlignment ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceTextureCompressionASTCHDRFeatures const & physicalDeviceTextureCompressionASTCHDRFeatures ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceTextureCompressionASTCHDRFeatures.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceTextureCompressionASTCHDRFeatures.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceTextureCompressionASTCHDRFeatures.textureCompressionASTC_HDR ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceTilePropertiesFeaturesQCOM const & physicalDeviceTilePropertiesFeaturesQCOM ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceTilePropertiesFeaturesQCOM.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceTilePropertiesFeaturesQCOM.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceTilePropertiesFeaturesQCOM.tileProperties ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceTimelineSemaphoreFeatures const & physicalDeviceTimelineSemaphoreFeatures ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceTimelineSemaphoreFeatures.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceTimelineSemaphoreFeatures.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceTimelineSemaphoreFeatures.timelineSemaphore ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceTimelineSemaphoreProperties const & physicalDeviceTimelineSemaphoreProperties ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceTimelineSemaphoreProperties.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceTimelineSemaphoreProperties.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceTimelineSemaphoreProperties.maxTimelineSemaphoreValueDifference ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceToolProperties const & physicalDeviceToolProperties ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceToolProperties.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceToolProperties.pNext ); for ( size_t i = 0; i < VK_MAX_EXTENSION_NAME_SIZE; ++i ) { VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceToolProperties.name[i] ); } for ( size_t i = 0; i < VK_MAX_EXTENSION_NAME_SIZE; ++i ) { VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceToolProperties.version[i] ); } VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceToolProperties.purposes ); for ( size_t i = 0; i < VK_MAX_DESCRIPTION_SIZE; ++i ) { VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceToolProperties.description[i] ); } for ( size_t i = 0; i < VK_MAX_EXTENSION_NAME_SIZE; ++i ) { VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceToolProperties.layer[i] ); } return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceTransformFeedbackFeaturesEXT const & physicalDeviceTransformFeedbackFeaturesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceTransformFeedbackFeaturesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceTransformFeedbackFeaturesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceTransformFeedbackFeaturesEXT.transformFeedback ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceTransformFeedbackFeaturesEXT.geometryStreams ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceTransformFeedbackPropertiesEXT const & physicalDeviceTransformFeedbackPropertiesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceTransformFeedbackPropertiesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceTransformFeedbackPropertiesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceTransformFeedbackPropertiesEXT.maxTransformFeedbackStreams ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceTransformFeedbackPropertiesEXT.maxTransformFeedbackBuffers ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceTransformFeedbackPropertiesEXT.maxTransformFeedbackBufferSize ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceTransformFeedbackPropertiesEXT.maxTransformFeedbackStreamDataSize ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceTransformFeedbackPropertiesEXT.maxTransformFeedbackBufferDataSize ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceTransformFeedbackPropertiesEXT.maxTransformFeedbackBufferDataStride ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceTransformFeedbackPropertiesEXT.transformFeedbackQueries ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceTransformFeedbackPropertiesEXT.transformFeedbackStreamsLinesTriangles ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceTransformFeedbackPropertiesEXT.transformFeedbackRasterizationStreamSelect ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceTransformFeedbackPropertiesEXT.transformFeedbackDraw ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceUniformBufferStandardLayoutFeatures const & physicalDeviceUniformBufferStandardLayoutFeatures ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceUniformBufferStandardLayoutFeatures.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceUniformBufferStandardLayoutFeatures.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceUniformBufferStandardLayoutFeatures.uniformBufferStandardLayout ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceVariablePointersFeatures const & physicalDeviceVariablePointersFeatures ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVariablePointersFeatures.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVariablePointersFeatures.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVariablePointersFeatures.variablePointersStorageBuffer ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVariablePointersFeatures.variablePointers ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceVertexAttributeDivisorFeatures const & physicalDeviceVertexAttributeDivisorFeatures ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVertexAttributeDivisorFeatures.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVertexAttributeDivisorFeatures.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVertexAttributeDivisorFeatures.vertexAttributeInstanceRateDivisor ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVertexAttributeDivisorFeatures.vertexAttributeInstanceRateZeroDivisor ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceVertexAttributeDivisorProperties const & physicalDeviceVertexAttributeDivisorProperties ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVertexAttributeDivisorProperties.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVertexAttributeDivisorProperties.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVertexAttributeDivisorProperties.maxVertexAttribDivisor ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVertexAttributeDivisorProperties.supportsNonZeroFirstInstance ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceVertexAttributeDivisorPropertiesEXT const & physicalDeviceVertexAttributeDivisorPropertiesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVertexAttributeDivisorPropertiesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVertexAttributeDivisorPropertiesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVertexAttributeDivisorPropertiesEXT.maxVertexAttribDivisor ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceVertexAttributeRobustnessFeaturesEXT const & physicalDeviceVertexAttributeRobustnessFeaturesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVertexAttributeRobustnessFeaturesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVertexAttributeRobustnessFeaturesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVertexAttributeRobustnessFeaturesEXT.vertexAttributeRobustness ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceVertexInputDynamicStateFeaturesEXT const & physicalDeviceVertexInputDynamicStateFeaturesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVertexInputDynamicStateFeaturesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVertexInputDynamicStateFeaturesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVertexInputDynamicStateFeaturesEXT.vertexInputDynamicState ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceVideoEncodeAV1FeaturesKHR const & physicalDeviceVideoEncodeAV1FeaturesKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVideoEncodeAV1FeaturesKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVideoEncodeAV1FeaturesKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVideoEncodeAV1FeaturesKHR.videoEncodeAV1 ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoProfileInfoKHR const & videoProfileInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoProfileInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoProfileInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoProfileInfoKHR.videoCodecOperation ); VULKAN_HPP_HASH_COMBINE( seed, videoProfileInfoKHR.chromaSubsampling ); VULKAN_HPP_HASH_COMBINE( seed, videoProfileInfoKHR.lumaBitDepth ); VULKAN_HPP_HASH_COMBINE( seed, videoProfileInfoKHR.chromaBitDepth ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceVideoEncodeQualityLevelInfoKHR const & physicalDeviceVideoEncodeQualityLevelInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVideoEncodeQualityLevelInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVideoEncodeQualityLevelInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVideoEncodeQualityLevelInfoKHR.pVideoProfile ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVideoEncodeQualityLevelInfoKHR.qualityLevel ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR const & physicalDeviceVideoEncodeQuantizationMapFeaturesKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVideoEncodeQuantizationMapFeaturesKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVideoEncodeQuantizationMapFeaturesKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVideoEncodeQuantizationMapFeaturesKHR.videoEncodeQuantizationMap ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceVideoFormatInfoKHR const & physicalDeviceVideoFormatInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVideoFormatInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVideoFormatInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVideoFormatInfoKHR.imageUsage ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceVideoMaintenance1FeaturesKHR const & physicalDeviceVideoMaintenance1FeaturesKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVideoMaintenance1FeaturesKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVideoMaintenance1FeaturesKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVideoMaintenance1FeaturesKHR.videoMaintenance1 ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceVideoMaintenance2FeaturesKHR const & physicalDeviceVideoMaintenance2FeaturesKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVideoMaintenance2FeaturesKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVideoMaintenance2FeaturesKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVideoMaintenance2FeaturesKHR.videoMaintenance2 ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceVulkan11Features const & physicalDeviceVulkan11Features ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan11Features.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan11Features.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan11Features.storageBuffer16BitAccess ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan11Features.uniformAndStorageBuffer16BitAccess ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan11Features.storagePushConstant16 ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan11Features.storageInputOutput16 ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan11Features.multiview ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan11Features.multiviewGeometryShader ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan11Features.multiviewTessellationShader ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan11Features.variablePointersStorageBuffer ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan11Features.variablePointers ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan11Features.protectedMemory ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan11Features.samplerYcbcrConversion ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan11Features.shaderDrawParameters ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceVulkan11Properties const & physicalDeviceVulkan11Properties ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan11Properties.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan11Properties.pNext ); for ( size_t i = 0; i < VK_UUID_SIZE; ++i ) { VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan11Properties.deviceUUID[i] ); } for ( size_t i = 0; i < VK_UUID_SIZE; ++i ) { VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan11Properties.driverUUID[i] ); } for ( size_t i = 0; i < VK_LUID_SIZE; ++i ) { VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan11Properties.deviceLUID[i] ); } VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan11Properties.deviceNodeMask ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan11Properties.deviceLUIDValid ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan11Properties.subgroupSize ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan11Properties.subgroupSupportedStages ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan11Properties.subgroupSupportedOperations ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan11Properties.subgroupQuadOperationsInAllStages ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan11Properties.pointClippingBehavior ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan11Properties.maxMultiviewViewCount ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan11Properties.maxMultiviewInstanceIndex ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan11Properties.protectedNoFault ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan11Properties.maxPerSetDescriptors ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan11Properties.maxMemoryAllocationSize ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceVulkan12Features const & physicalDeviceVulkan12Features ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.samplerMirrorClampToEdge ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.drawIndirectCount ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.storageBuffer8BitAccess ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.uniformAndStorageBuffer8BitAccess ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.storagePushConstant8 ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.shaderBufferInt64Atomics ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.shaderSharedInt64Atomics ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.shaderFloat16 ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.shaderInt8 ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.descriptorIndexing ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.shaderInputAttachmentArrayDynamicIndexing ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.shaderUniformTexelBufferArrayDynamicIndexing ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.shaderStorageTexelBufferArrayDynamicIndexing ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.shaderUniformBufferArrayNonUniformIndexing ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.shaderSampledImageArrayNonUniformIndexing ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.shaderStorageBufferArrayNonUniformIndexing ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.shaderStorageImageArrayNonUniformIndexing ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.shaderInputAttachmentArrayNonUniformIndexing ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.shaderUniformTexelBufferArrayNonUniformIndexing ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.shaderStorageTexelBufferArrayNonUniformIndexing ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.descriptorBindingUniformBufferUpdateAfterBind ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.descriptorBindingSampledImageUpdateAfterBind ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.descriptorBindingStorageImageUpdateAfterBind ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.descriptorBindingStorageBufferUpdateAfterBind ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.descriptorBindingUniformTexelBufferUpdateAfterBind ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.descriptorBindingStorageTexelBufferUpdateAfterBind ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.descriptorBindingUpdateUnusedWhilePending ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.descriptorBindingPartiallyBound ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.descriptorBindingVariableDescriptorCount ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.runtimeDescriptorArray ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.samplerFilterMinmax ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.scalarBlockLayout ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.imagelessFramebuffer ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.uniformBufferStandardLayout ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.shaderSubgroupExtendedTypes ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.separateDepthStencilLayouts ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.hostQueryReset ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.timelineSemaphore ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.bufferDeviceAddress ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.bufferDeviceAddressCaptureReplay ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.bufferDeviceAddressMultiDevice ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.vulkanMemoryModel ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.vulkanMemoryModelDeviceScope ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.vulkanMemoryModelAvailabilityVisibilityChains ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.shaderOutputViewportIndex ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.shaderOutputLayer ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Features.subgroupBroadcastDynamicId ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceVulkan12Properties const & physicalDeviceVulkan12Properties ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.driverID ); for ( size_t i = 0; i < VK_MAX_DRIVER_NAME_SIZE; ++i ) { VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.driverName[i] ); } for ( size_t i = 0; i < VK_MAX_DRIVER_INFO_SIZE; ++i ) { VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.driverInfo[i] ); } VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.conformanceVersion ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.denormBehaviorIndependence ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.roundingModeIndependence ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.shaderSignedZeroInfNanPreserveFloat16 ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.shaderSignedZeroInfNanPreserveFloat32 ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.shaderSignedZeroInfNanPreserveFloat64 ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.shaderDenormPreserveFloat16 ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.shaderDenormPreserveFloat32 ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.shaderDenormPreserveFloat64 ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.shaderDenormFlushToZeroFloat16 ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.shaderDenormFlushToZeroFloat32 ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.shaderDenormFlushToZeroFloat64 ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.shaderRoundingModeRTEFloat16 ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.shaderRoundingModeRTEFloat32 ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.shaderRoundingModeRTEFloat64 ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.shaderRoundingModeRTZFloat16 ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.shaderRoundingModeRTZFloat32 ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.shaderRoundingModeRTZFloat64 ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.maxUpdateAfterBindDescriptorsInAllPools ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.shaderUniformBufferArrayNonUniformIndexingNative ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.shaderSampledImageArrayNonUniformIndexingNative ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.shaderStorageBufferArrayNonUniformIndexingNative ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.shaderStorageImageArrayNonUniformIndexingNative ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.shaderInputAttachmentArrayNonUniformIndexingNative ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.robustBufferAccessUpdateAfterBind ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.quadDivergentImplicitLod ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.maxPerStageDescriptorUpdateAfterBindSamplers ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.maxPerStageDescriptorUpdateAfterBindUniformBuffers ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.maxPerStageDescriptorUpdateAfterBindStorageBuffers ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.maxPerStageDescriptorUpdateAfterBindSampledImages ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.maxPerStageDescriptorUpdateAfterBindStorageImages ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.maxPerStageDescriptorUpdateAfterBindInputAttachments ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.maxPerStageUpdateAfterBindResources ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.maxDescriptorSetUpdateAfterBindSamplers ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.maxDescriptorSetUpdateAfterBindUniformBuffers ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.maxDescriptorSetUpdateAfterBindUniformBuffersDynamic ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.maxDescriptorSetUpdateAfterBindStorageBuffers ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.maxDescriptorSetUpdateAfterBindStorageBuffersDynamic ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.maxDescriptorSetUpdateAfterBindSampledImages ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.maxDescriptorSetUpdateAfterBindStorageImages ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.maxDescriptorSetUpdateAfterBindInputAttachments ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.supportedDepthResolveModes ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.supportedStencilResolveModes ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.independentResolveNone ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.independentResolve ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.filterMinmaxSingleComponentFormats ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.filterMinmaxImageComponentMapping ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.maxTimelineSemaphoreValueDifference ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan12Properties.framebufferIntegerColorSampleCounts ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceVulkan13Features const & physicalDeviceVulkan13Features ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Features.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Features.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Features.robustImageAccess ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Features.inlineUniformBlock ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Features.descriptorBindingInlineUniformBlockUpdateAfterBind ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Features.pipelineCreationCacheControl ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Features.privateData ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Features.shaderDemoteToHelperInvocation ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Features.shaderTerminateInvocation ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Features.subgroupSizeControl ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Features.computeFullSubgroups ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Features.synchronization2 ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Features.textureCompressionASTC_HDR ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Features.shaderZeroInitializeWorkgroupMemory ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Features.dynamicRendering ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Features.shaderIntegerDotProduct ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Features.maintenance4 ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceVulkan13Properties const & physicalDeviceVulkan13Properties ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.minSubgroupSize ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.maxSubgroupSize ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.maxComputeWorkgroupSubgroups ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.requiredSubgroupSizeStages ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.maxInlineUniformBlockSize ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.maxPerStageDescriptorInlineUniformBlocks ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.maxDescriptorSetInlineUniformBlocks ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.maxDescriptorSetUpdateAfterBindInlineUniformBlocks ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.maxInlineUniformTotalSize ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.integerDotProduct8BitUnsignedAccelerated ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.integerDotProduct8BitSignedAccelerated ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.integerDotProduct8BitMixedSignednessAccelerated ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.integerDotProduct4x8BitPackedUnsignedAccelerated ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.integerDotProduct4x8BitPackedSignedAccelerated ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.integerDotProduct4x8BitPackedMixedSignednessAccelerated ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.integerDotProduct16BitUnsignedAccelerated ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.integerDotProduct16BitSignedAccelerated ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.integerDotProduct16BitMixedSignednessAccelerated ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.integerDotProduct32BitUnsignedAccelerated ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.integerDotProduct32BitSignedAccelerated ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.integerDotProduct32BitMixedSignednessAccelerated ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.integerDotProduct64BitUnsignedAccelerated ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.integerDotProduct64BitSignedAccelerated ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.integerDotProduct64BitMixedSignednessAccelerated ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.integerDotProductAccumulatingSaturating8BitUnsignedAccelerated ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.integerDotProductAccumulatingSaturating8BitSignedAccelerated ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.integerDotProductAccumulatingSaturating16BitUnsignedAccelerated ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.integerDotProductAccumulatingSaturating16BitSignedAccelerated ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.integerDotProductAccumulatingSaturating32BitUnsignedAccelerated ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.integerDotProductAccumulatingSaturating32BitSignedAccelerated ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.integerDotProductAccumulatingSaturating64BitUnsignedAccelerated ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.integerDotProductAccumulatingSaturating64BitSignedAccelerated ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.storageTexelBufferOffsetAlignmentBytes ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.storageTexelBufferOffsetSingleTexelAlignment ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.uniformTexelBufferOffsetAlignmentBytes ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.uniformTexelBufferOffsetSingleTexelAlignment ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan13Properties.maxBufferSize ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceVulkan14Features const & physicalDeviceVulkan14Features ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan14Features.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan14Features.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan14Features.globalPriorityQuery ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan14Features.shaderSubgroupRotate ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan14Features.shaderSubgroupRotateClustered ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan14Features.shaderFloatControls2 ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan14Features.shaderExpectAssume ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan14Features.rectangularLines ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan14Features.bresenhamLines ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan14Features.smoothLines ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan14Features.stippledRectangularLines ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan14Features.stippledBresenhamLines ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan14Features.stippledSmoothLines ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan14Features.vertexAttributeInstanceRateDivisor ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan14Features.vertexAttributeInstanceRateZeroDivisor ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan14Features.indexTypeUint8 ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan14Features.dynamicRenderingLocalRead ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan14Features.maintenance5 ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan14Features.maintenance6 ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan14Features.pipelineProtectedAccess ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan14Features.pipelineRobustness ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan14Features.hostImageCopy ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan14Features.pushDescriptor ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceVulkan14Properties const & physicalDeviceVulkan14Properties ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan14Properties.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan14Properties.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan14Properties.lineSubPixelPrecisionBits ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan14Properties.maxVertexAttribDivisor ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan14Properties.supportsNonZeroFirstInstance ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan14Properties.maxPushDescriptors ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan14Properties.dynamicRenderingLocalReadDepthStencilAttachments ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan14Properties.dynamicRenderingLocalReadMultisampledAttachments ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan14Properties.earlyFragmentMultisampleCoverageAfterSampleCounting ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan14Properties.earlyFragmentSampleMaskTestBeforeSampleCounting ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan14Properties.depthStencilSwizzleOneSupport ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan14Properties.polygonModePointSize ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan14Properties.nonStrictSinglePixelWideLinesUseParallelogram ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan14Properties.nonStrictWideLinesUseParallelogram ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan14Properties.blockTexelViewCompatibleMultipleLayers ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan14Properties.maxCombinedImageSamplerDescriptorCount ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan14Properties.fragmentShadingRateClampCombinerInputs ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan14Properties.defaultRobustnessStorageBuffers ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan14Properties.defaultRobustnessUniformBuffers ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan14Properties.defaultRobustnessVertexInputs ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan14Properties.defaultRobustnessImages ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan14Properties.copySrcLayoutCount ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan14Properties.pCopySrcLayouts ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan14Properties.copyDstLayoutCount ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan14Properties.pCopyDstLayouts ); for ( size_t i = 0; i < VK_UUID_SIZE; ++i ) { VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan14Properties.optimalTilingLayoutUUID[i] ); } VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkan14Properties.identicalMemoryTypeRequirements ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceVulkanMemoryModelFeatures const & physicalDeviceVulkanMemoryModelFeatures ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkanMemoryModelFeatures.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkanMemoryModelFeatures.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkanMemoryModelFeatures.vulkanMemoryModel ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkanMemoryModelFeatures.vulkanMemoryModelDeviceScope ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceVulkanMemoryModelFeatures.vulkanMemoryModelAvailabilityVisibilityChains ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR const & physicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR.workgroupMemoryExplicitLayout ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR.workgroupMemoryExplicitLayoutScalarBlockLayout ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR.workgroupMemoryExplicitLayout8BitAccess ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR.workgroupMemoryExplicitLayout16BitAccess ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT const & physicalDeviceYcbcr2Plane444FormatsFeaturesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceYcbcr2Plane444FormatsFeaturesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceYcbcr2Plane444FormatsFeaturesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceYcbcr2Plane444FormatsFeaturesEXT.ycbcr2plane444Formats ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceYcbcrDegammaFeaturesQCOM const & physicalDeviceYcbcrDegammaFeaturesQCOM ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceYcbcrDegammaFeaturesQCOM.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceYcbcrDegammaFeaturesQCOM.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceYcbcrDegammaFeaturesQCOM.ycbcrDegamma ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceYcbcrImageArraysFeaturesEXT const & physicalDeviceYcbcrImageArraysFeaturesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceYcbcrImageArraysFeaturesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceYcbcrImageArraysFeaturesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceYcbcrImageArraysFeaturesEXT.ycbcrImageArrays ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PhysicalDeviceZeroInitializeWorkgroupMemoryFeatures const & physicalDeviceZeroInitializeWorkgroupMemoryFeatures ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceZeroInitializeWorkgroupMemoryFeatures.sType ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceZeroInitializeWorkgroupMemoryFeatures.pNext ); VULKAN_HPP_HASH_COMBINE( seed, physicalDeviceZeroInitializeWorkgroupMemoryFeatures.shaderZeroInitializeWorkgroupMemory ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineBinaryKeyKHR const & pipelineBinaryKeyKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, pipelineBinaryKeyKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, pipelineBinaryKeyKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, pipelineBinaryKeyKHR.keySize ); for ( size_t i = 0; i < VK_MAX_PIPELINE_BINARY_KEY_SIZE_KHR; ++i ) { VULKAN_HPP_HASH_COMBINE( seed, pipelineBinaryKeyKHR.key[i] ); } return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineBinaryDataKHR const & pipelineBinaryDataKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, pipelineBinaryDataKHR.dataSize ); VULKAN_HPP_HASH_COMBINE( seed, pipelineBinaryDataKHR.pData ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineBinaryKeysAndDataKHR const & pipelineBinaryKeysAndDataKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, pipelineBinaryKeysAndDataKHR.binaryCount ); VULKAN_HPP_HASH_COMBINE( seed, pipelineBinaryKeysAndDataKHR.pPipelineBinaryKeys ); VULKAN_HPP_HASH_COMBINE( seed, pipelineBinaryKeysAndDataKHR.pPipelineBinaryData ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineCreateInfoKHR const & pipelineCreateInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, pipelineCreateInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, pipelineCreateInfoKHR.pNext ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineBinaryCreateInfoKHR const & pipelineBinaryCreateInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, pipelineBinaryCreateInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, pipelineBinaryCreateInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, pipelineBinaryCreateInfoKHR.pKeysAndDataInfo ); VULKAN_HPP_HASH_COMBINE( seed, pipelineBinaryCreateInfoKHR.pipeline ); VULKAN_HPP_HASH_COMBINE( seed, pipelineBinaryCreateInfoKHR.pPipelineCreateInfo ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineBinaryDataInfoKHR const & pipelineBinaryDataInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, pipelineBinaryDataInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, pipelineBinaryDataInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, pipelineBinaryDataInfoKHR.pipelineBinary ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineBinaryHandlesInfoKHR const & pipelineBinaryHandlesInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, pipelineBinaryHandlesInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, pipelineBinaryHandlesInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, pipelineBinaryHandlesInfoKHR.pipelineBinaryCount ); VULKAN_HPP_HASH_COMBINE( seed, pipelineBinaryHandlesInfoKHR.pPipelineBinaries ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineBinaryInfoKHR const & pipelineBinaryInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, pipelineBinaryInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, pipelineBinaryInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, pipelineBinaryInfoKHR.binaryCount ); VULKAN_HPP_HASH_COMBINE( seed, pipelineBinaryInfoKHR.pPipelineBinaries ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineCacheCreateInfo const & pipelineCacheCreateInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, pipelineCacheCreateInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, pipelineCacheCreateInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, pipelineCacheCreateInfo.flags ); VULKAN_HPP_HASH_COMBINE( seed, pipelineCacheCreateInfo.initialDataSize ); VULKAN_HPP_HASH_COMBINE( seed, pipelineCacheCreateInfo.pInitialData ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineCacheHeaderVersionOne const & pipelineCacheHeaderVersionOne ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, pipelineCacheHeaderVersionOne.headerSize ); VULKAN_HPP_HASH_COMBINE( seed, pipelineCacheHeaderVersionOne.headerVersion ); VULKAN_HPP_HASH_COMBINE( seed, pipelineCacheHeaderVersionOne.vendorID ); VULKAN_HPP_HASH_COMBINE( seed, pipelineCacheHeaderVersionOne.deviceID ); for ( size_t i = 0; i < VK_UUID_SIZE; ++i ) { VULKAN_HPP_HASH_COMBINE( seed, pipelineCacheHeaderVersionOne.pipelineCacheUUID[i] ); } return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineColorBlendAdvancedStateCreateInfoEXT const & pipelineColorBlendAdvancedStateCreateInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, pipelineColorBlendAdvancedStateCreateInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, pipelineColorBlendAdvancedStateCreateInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, pipelineColorBlendAdvancedStateCreateInfoEXT.srcPremultiplied ); VULKAN_HPP_HASH_COMBINE( seed, pipelineColorBlendAdvancedStateCreateInfoEXT.dstPremultiplied ); VULKAN_HPP_HASH_COMBINE( seed, pipelineColorBlendAdvancedStateCreateInfoEXT.blendOverlap ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineColorWriteCreateInfoEXT const & pipelineColorWriteCreateInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, pipelineColorWriteCreateInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, pipelineColorWriteCreateInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, pipelineColorWriteCreateInfoEXT.attachmentCount ); VULKAN_HPP_HASH_COMBINE( seed, pipelineColorWriteCreateInfoEXT.pColorWriteEnables ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineCompilerControlCreateInfoAMD const & pipelineCompilerControlCreateInfoAMD ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, pipelineCompilerControlCreateInfoAMD.sType ); VULKAN_HPP_HASH_COMBINE( seed, pipelineCompilerControlCreateInfoAMD.pNext ); VULKAN_HPP_HASH_COMBINE( seed, pipelineCompilerControlCreateInfoAMD.compilerControlFlags ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineCoverageModulationStateCreateInfoNV const & pipelineCoverageModulationStateCreateInfoNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, pipelineCoverageModulationStateCreateInfoNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, pipelineCoverageModulationStateCreateInfoNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, pipelineCoverageModulationStateCreateInfoNV.flags ); VULKAN_HPP_HASH_COMBINE( seed, pipelineCoverageModulationStateCreateInfoNV.coverageModulationMode ); VULKAN_HPP_HASH_COMBINE( seed, pipelineCoverageModulationStateCreateInfoNV.coverageModulationTableEnable ); VULKAN_HPP_HASH_COMBINE( seed, pipelineCoverageModulationStateCreateInfoNV.coverageModulationTableCount ); VULKAN_HPP_HASH_COMBINE( seed, pipelineCoverageModulationStateCreateInfoNV.pCoverageModulationTable ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineCoverageReductionStateCreateInfoNV const & pipelineCoverageReductionStateCreateInfoNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, pipelineCoverageReductionStateCreateInfoNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, pipelineCoverageReductionStateCreateInfoNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, pipelineCoverageReductionStateCreateInfoNV.flags ); VULKAN_HPP_HASH_COMBINE( seed, pipelineCoverageReductionStateCreateInfoNV.coverageReductionMode ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineCoverageToColorStateCreateInfoNV const & pipelineCoverageToColorStateCreateInfoNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, pipelineCoverageToColorStateCreateInfoNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, pipelineCoverageToColorStateCreateInfoNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, pipelineCoverageToColorStateCreateInfoNV.flags ); VULKAN_HPP_HASH_COMBINE( seed, pipelineCoverageToColorStateCreateInfoNV.coverageToColorEnable ); VULKAN_HPP_HASH_COMBINE( seed, pipelineCoverageToColorStateCreateInfoNV.coverageToColorLocation ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineCreateFlags2CreateInfo const & pipelineCreateFlags2CreateInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, pipelineCreateFlags2CreateInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, pipelineCreateFlags2CreateInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, pipelineCreateFlags2CreateInfo.flags ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineCreationFeedback const & pipelineCreationFeedback ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, pipelineCreationFeedback.flags ); VULKAN_HPP_HASH_COMBINE( seed, pipelineCreationFeedback.duration ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineCreationFeedbackCreateInfo const & pipelineCreationFeedbackCreateInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, pipelineCreationFeedbackCreateInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, pipelineCreationFeedbackCreateInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, pipelineCreationFeedbackCreateInfo.pPipelineCreationFeedback ); VULKAN_HPP_HASH_COMBINE( seed, pipelineCreationFeedbackCreateInfo.pipelineStageCreationFeedbackCount ); VULKAN_HPP_HASH_COMBINE( seed, pipelineCreationFeedbackCreateInfo.pPipelineStageCreationFeedbacks ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineDiscardRectangleStateCreateInfoEXT const & pipelineDiscardRectangleStateCreateInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, pipelineDiscardRectangleStateCreateInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, pipelineDiscardRectangleStateCreateInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, pipelineDiscardRectangleStateCreateInfoEXT.flags ); VULKAN_HPP_HASH_COMBINE( seed, pipelineDiscardRectangleStateCreateInfoEXT.discardRectangleMode ); VULKAN_HPP_HASH_COMBINE( seed, pipelineDiscardRectangleStateCreateInfoEXT.discardRectangleCount ); VULKAN_HPP_HASH_COMBINE( seed, pipelineDiscardRectangleStateCreateInfoEXT.pDiscardRectangles ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineExecutableInfoKHR const & pipelineExecutableInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, pipelineExecutableInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, pipelineExecutableInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, pipelineExecutableInfoKHR.pipeline ); VULKAN_HPP_HASH_COMBINE( seed, pipelineExecutableInfoKHR.executableIndex ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineExecutableInternalRepresentationKHR const & pipelineExecutableInternalRepresentationKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, pipelineExecutableInternalRepresentationKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, pipelineExecutableInternalRepresentationKHR.pNext ); for ( size_t i = 0; i < VK_MAX_DESCRIPTION_SIZE; ++i ) { VULKAN_HPP_HASH_COMBINE( seed, pipelineExecutableInternalRepresentationKHR.name[i] ); } for ( size_t i = 0; i < VK_MAX_DESCRIPTION_SIZE; ++i ) { VULKAN_HPP_HASH_COMBINE( seed, pipelineExecutableInternalRepresentationKHR.description[i] ); } VULKAN_HPP_HASH_COMBINE( seed, pipelineExecutableInternalRepresentationKHR.isText ); VULKAN_HPP_HASH_COMBINE( seed, pipelineExecutableInternalRepresentationKHR.dataSize ); VULKAN_HPP_HASH_COMBINE( seed, pipelineExecutableInternalRepresentationKHR.pData ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineExecutablePropertiesKHR const & pipelineExecutablePropertiesKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, pipelineExecutablePropertiesKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, pipelineExecutablePropertiesKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, pipelineExecutablePropertiesKHR.stages ); for ( size_t i = 0; i < VK_MAX_DESCRIPTION_SIZE; ++i ) { VULKAN_HPP_HASH_COMBINE( seed, pipelineExecutablePropertiesKHR.name[i] ); } for ( size_t i = 0; i < VK_MAX_DESCRIPTION_SIZE; ++i ) { VULKAN_HPP_HASH_COMBINE( seed, pipelineExecutablePropertiesKHR.description[i] ); } VULKAN_HPP_HASH_COMBINE( seed, pipelineExecutablePropertiesKHR.subgroupSize ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineFragmentShadingRateEnumStateCreateInfoNV const & pipelineFragmentShadingRateEnumStateCreateInfoNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, pipelineFragmentShadingRateEnumStateCreateInfoNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, pipelineFragmentShadingRateEnumStateCreateInfoNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, pipelineFragmentShadingRateEnumStateCreateInfoNV.shadingRateType ); VULKAN_HPP_HASH_COMBINE( seed, pipelineFragmentShadingRateEnumStateCreateInfoNV.shadingRate ); for ( size_t i = 0; i < 2; ++i ) { VULKAN_HPP_HASH_COMBINE( seed, pipelineFragmentShadingRateEnumStateCreateInfoNV.combinerOps[i] ); } return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineFragmentShadingRateStateCreateInfoKHR const & pipelineFragmentShadingRateStateCreateInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, pipelineFragmentShadingRateStateCreateInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, pipelineFragmentShadingRateStateCreateInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, pipelineFragmentShadingRateStateCreateInfoKHR.fragmentSize ); for ( size_t i = 0; i < 2; ++i ) { VULKAN_HPP_HASH_COMBINE( seed, pipelineFragmentShadingRateStateCreateInfoKHR.combinerOps[i] ); } return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineIndirectDeviceAddressInfoNV const & pipelineIndirectDeviceAddressInfoNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, pipelineIndirectDeviceAddressInfoNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, pipelineIndirectDeviceAddressInfoNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, pipelineIndirectDeviceAddressInfoNV.pipelineBindPoint ); VULKAN_HPP_HASH_COMBINE( seed, pipelineIndirectDeviceAddressInfoNV.pipeline ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineInfoKHR const & pipelineInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, pipelineInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, pipelineInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, pipelineInfoKHR.pipeline ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineLayoutCreateInfo const & pipelineLayoutCreateInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, pipelineLayoutCreateInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, pipelineLayoutCreateInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, pipelineLayoutCreateInfo.flags ); VULKAN_HPP_HASH_COMBINE( seed, pipelineLayoutCreateInfo.setLayoutCount ); VULKAN_HPP_HASH_COMBINE( seed, pipelineLayoutCreateInfo.pSetLayouts ); VULKAN_HPP_HASH_COMBINE( seed, pipelineLayoutCreateInfo.pushConstantRangeCount ); VULKAN_HPP_HASH_COMBINE( seed, pipelineLayoutCreateInfo.pPushConstantRanges ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelinePropertiesIdentifierEXT const & pipelinePropertiesIdentifierEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, pipelinePropertiesIdentifierEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, pipelinePropertiesIdentifierEXT.pNext ); for ( size_t i = 0; i < VK_UUID_SIZE; ++i ) { VULKAN_HPP_HASH_COMBINE( seed, pipelinePropertiesIdentifierEXT.pipelineIdentifier[i] ); } return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineRasterizationConservativeStateCreateInfoEXT const & pipelineRasterizationConservativeStateCreateInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, pipelineRasterizationConservativeStateCreateInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, pipelineRasterizationConservativeStateCreateInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, pipelineRasterizationConservativeStateCreateInfoEXT.flags ); VULKAN_HPP_HASH_COMBINE( seed, pipelineRasterizationConservativeStateCreateInfoEXT.conservativeRasterizationMode ); VULKAN_HPP_HASH_COMBINE( seed, pipelineRasterizationConservativeStateCreateInfoEXT.extraPrimitiveOverestimationSize ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineRasterizationDepthClipStateCreateInfoEXT const & pipelineRasterizationDepthClipStateCreateInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, pipelineRasterizationDepthClipStateCreateInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, pipelineRasterizationDepthClipStateCreateInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, pipelineRasterizationDepthClipStateCreateInfoEXT.flags ); VULKAN_HPP_HASH_COMBINE( seed, pipelineRasterizationDepthClipStateCreateInfoEXT.depthClipEnable ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineRasterizationLineStateCreateInfo const & pipelineRasterizationLineStateCreateInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, pipelineRasterizationLineStateCreateInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, pipelineRasterizationLineStateCreateInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, pipelineRasterizationLineStateCreateInfo.lineRasterizationMode ); VULKAN_HPP_HASH_COMBINE( seed, pipelineRasterizationLineStateCreateInfo.stippledLineEnable ); VULKAN_HPP_HASH_COMBINE( seed, pipelineRasterizationLineStateCreateInfo.lineStippleFactor ); VULKAN_HPP_HASH_COMBINE( seed, pipelineRasterizationLineStateCreateInfo.lineStipplePattern ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineRasterizationProvokingVertexStateCreateInfoEXT const & pipelineRasterizationProvokingVertexStateCreateInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, pipelineRasterizationProvokingVertexStateCreateInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, pipelineRasterizationProvokingVertexStateCreateInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, pipelineRasterizationProvokingVertexStateCreateInfoEXT.provokingVertexMode ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineRasterizationStateRasterizationOrderAMD const & pipelineRasterizationStateRasterizationOrderAMD ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, pipelineRasterizationStateRasterizationOrderAMD.sType ); VULKAN_HPP_HASH_COMBINE( seed, pipelineRasterizationStateRasterizationOrderAMD.pNext ); VULKAN_HPP_HASH_COMBINE( seed, pipelineRasterizationStateRasterizationOrderAMD.rasterizationOrder ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineRasterizationStateStreamCreateInfoEXT const & pipelineRasterizationStateStreamCreateInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, pipelineRasterizationStateStreamCreateInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, pipelineRasterizationStateStreamCreateInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, pipelineRasterizationStateStreamCreateInfoEXT.flags ); VULKAN_HPP_HASH_COMBINE( seed, pipelineRasterizationStateStreamCreateInfoEXT.rasterizationStream ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineRenderingCreateInfo const & pipelineRenderingCreateInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, pipelineRenderingCreateInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, pipelineRenderingCreateInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, pipelineRenderingCreateInfo.viewMask ); VULKAN_HPP_HASH_COMBINE( seed, pipelineRenderingCreateInfo.colorAttachmentCount ); VULKAN_HPP_HASH_COMBINE( seed, pipelineRenderingCreateInfo.pColorAttachmentFormats ); VULKAN_HPP_HASH_COMBINE( seed, pipelineRenderingCreateInfo.depthAttachmentFormat ); VULKAN_HPP_HASH_COMBINE( seed, pipelineRenderingCreateInfo.stencilAttachmentFormat ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineRepresentativeFragmentTestStateCreateInfoNV const & pipelineRepresentativeFragmentTestStateCreateInfoNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, pipelineRepresentativeFragmentTestStateCreateInfoNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, pipelineRepresentativeFragmentTestStateCreateInfoNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, pipelineRepresentativeFragmentTestStateCreateInfoNV.representativeFragmentTestEnable ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineRobustnessCreateInfo const & pipelineRobustnessCreateInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, pipelineRobustnessCreateInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, pipelineRobustnessCreateInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, pipelineRobustnessCreateInfo.storageBuffers ); VULKAN_HPP_HASH_COMBINE( seed, pipelineRobustnessCreateInfo.uniformBuffers ); VULKAN_HPP_HASH_COMBINE( seed, pipelineRobustnessCreateInfo.vertexInputs ); VULKAN_HPP_HASH_COMBINE( seed, pipelineRobustnessCreateInfo.images ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineSampleLocationsStateCreateInfoEXT const & pipelineSampleLocationsStateCreateInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, pipelineSampleLocationsStateCreateInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, pipelineSampleLocationsStateCreateInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, pipelineSampleLocationsStateCreateInfoEXT.sampleLocationsEnable ); VULKAN_HPP_HASH_COMBINE( seed, pipelineSampleLocationsStateCreateInfoEXT.sampleLocationsInfo ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineShaderStageModuleIdentifierCreateInfoEXT const & pipelineShaderStageModuleIdentifierCreateInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, pipelineShaderStageModuleIdentifierCreateInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, pipelineShaderStageModuleIdentifierCreateInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, pipelineShaderStageModuleIdentifierCreateInfoEXT.identifierSize ); VULKAN_HPP_HASH_COMBINE( seed, pipelineShaderStageModuleIdentifierCreateInfoEXT.pIdentifier ); return seed; } }; # if defined( VK_ENABLE_BETA_EXTENSIONS ) template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineShaderStageNodeCreateInfoAMDX const & pipelineShaderStageNodeCreateInfoAMDX ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, pipelineShaderStageNodeCreateInfoAMDX.sType ); VULKAN_HPP_HASH_COMBINE( seed, pipelineShaderStageNodeCreateInfoAMDX.pNext ); for ( const char * p = pipelineShaderStageNodeCreateInfoAMDX.pName; *p != '\0'; ++p ) { VULKAN_HPP_HASH_COMBINE( seed, *p ); } VULKAN_HPP_HASH_COMBINE( seed, pipelineShaderStageNodeCreateInfoAMDX.index ); return seed; } }; # endif /*VK_ENABLE_BETA_EXTENSIONS*/ template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineShaderStageRequiredSubgroupSizeCreateInfo const & pipelineShaderStageRequiredSubgroupSizeCreateInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, pipelineShaderStageRequiredSubgroupSizeCreateInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, pipelineShaderStageRequiredSubgroupSizeCreateInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, pipelineShaderStageRequiredSubgroupSizeCreateInfo.requiredSubgroupSize ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineTessellationDomainOriginStateCreateInfo const & pipelineTessellationDomainOriginStateCreateInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, pipelineTessellationDomainOriginStateCreateInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, pipelineTessellationDomainOriginStateCreateInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, pipelineTessellationDomainOriginStateCreateInfo.domainOrigin ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VertexInputBindingDivisorDescription const & vertexInputBindingDivisorDescription ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, vertexInputBindingDivisorDescription.binding ); VULKAN_HPP_HASH_COMBINE( seed, vertexInputBindingDivisorDescription.divisor ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineVertexInputDivisorStateCreateInfo const & pipelineVertexInputDivisorStateCreateInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, pipelineVertexInputDivisorStateCreateInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, pipelineVertexInputDivisorStateCreateInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, pipelineVertexInputDivisorStateCreateInfo.vertexBindingDivisorCount ); VULKAN_HPP_HASH_COMBINE( seed, pipelineVertexInputDivisorStateCreateInfo.pVertexBindingDivisors ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineViewportCoarseSampleOrderStateCreateInfoNV const & pipelineViewportCoarseSampleOrderStateCreateInfoNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, pipelineViewportCoarseSampleOrderStateCreateInfoNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, pipelineViewportCoarseSampleOrderStateCreateInfoNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, pipelineViewportCoarseSampleOrderStateCreateInfoNV.sampleOrderType ); VULKAN_HPP_HASH_COMBINE( seed, pipelineViewportCoarseSampleOrderStateCreateInfoNV.customSampleOrderCount ); VULKAN_HPP_HASH_COMBINE( seed, pipelineViewportCoarseSampleOrderStateCreateInfoNV.pCustomSampleOrders ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineViewportDepthClampControlCreateInfoEXT const & pipelineViewportDepthClampControlCreateInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, pipelineViewportDepthClampControlCreateInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, pipelineViewportDepthClampControlCreateInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, pipelineViewportDepthClampControlCreateInfoEXT.depthClampMode ); VULKAN_HPP_HASH_COMBINE( seed, pipelineViewportDepthClampControlCreateInfoEXT.pDepthClampRange ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineViewportDepthClipControlCreateInfoEXT const & pipelineViewportDepthClipControlCreateInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, pipelineViewportDepthClipControlCreateInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, pipelineViewportDepthClipControlCreateInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, pipelineViewportDepthClipControlCreateInfoEXT.negativeOneToOne ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineViewportExclusiveScissorStateCreateInfoNV const & pipelineViewportExclusiveScissorStateCreateInfoNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, pipelineViewportExclusiveScissorStateCreateInfoNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, pipelineViewportExclusiveScissorStateCreateInfoNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, pipelineViewportExclusiveScissorStateCreateInfoNV.exclusiveScissorCount ); VULKAN_HPP_HASH_COMBINE( seed, pipelineViewportExclusiveScissorStateCreateInfoNV.pExclusiveScissors ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ShadingRatePaletteNV const & shadingRatePaletteNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, shadingRatePaletteNV.shadingRatePaletteEntryCount ); VULKAN_HPP_HASH_COMBINE( seed, shadingRatePaletteNV.pShadingRatePaletteEntries ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineViewportShadingRateImageStateCreateInfoNV const & pipelineViewportShadingRateImageStateCreateInfoNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, pipelineViewportShadingRateImageStateCreateInfoNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, pipelineViewportShadingRateImageStateCreateInfoNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, pipelineViewportShadingRateImageStateCreateInfoNV.shadingRateImageEnable ); VULKAN_HPP_HASH_COMBINE( seed, pipelineViewportShadingRateImageStateCreateInfoNV.viewportCount ); VULKAN_HPP_HASH_COMBINE( seed, pipelineViewportShadingRateImageStateCreateInfoNV.pShadingRatePalettes ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ViewportSwizzleNV const & viewportSwizzleNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, viewportSwizzleNV.x ); VULKAN_HPP_HASH_COMBINE( seed, viewportSwizzleNV.y ); VULKAN_HPP_HASH_COMBINE( seed, viewportSwizzleNV.z ); VULKAN_HPP_HASH_COMBINE( seed, viewportSwizzleNV.w ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineViewportSwizzleStateCreateInfoNV const & pipelineViewportSwizzleStateCreateInfoNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, pipelineViewportSwizzleStateCreateInfoNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, pipelineViewportSwizzleStateCreateInfoNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, pipelineViewportSwizzleStateCreateInfoNV.flags ); VULKAN_HPP_HASH_COMBINE( seed, pipelineViewportSwizzleStateCreateInfoNV.viewportCount ); VULKAN_HPP_HASH_COMBINE( seed, pipelineViewportSwizzleStateCreateInfoNV.pViewportSwizzles ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ViewportWScalingNV const & viewportWScalingNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, viewportWScalingNV.xcoeff ); VULKAN_HPP_HASH_COMBINE( seed, viewportWScalingNV.ycoeff ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PipelineViewportWScalingStateCreateInfoNV const & pipelineViewportWScalingStateCreateInfoNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, pipelineViewportWScalingStateCreateInfoNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, pipelineViewportWScalingStateCreateInfoNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, pipelineViewportWScalingStateCreateInfoNV.viewportWScalingEnable ); VULKAN_HPP_HASH_COMBINE( seed, pipelineViewportWScalingStateCreateInfoNV.viewportCount ); VULKAN_HPP_HASH_COMBINE( seed, pipelineViewportWScalingStateCreateInfoNV.pViewportWScalings ); return seed; } }; # if defined( VK_USE_PLATFORM_GGP ) template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PresentFrameTokenGGP const & presentFrameTokenGGP ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, presentFrameTokenGGP.sType ); VULKAN_HPP_HASH_COMBINE( seed, presentFrameTokenGGP.pNext ); VULKAN_HPP_HASH_COMBINE( seed, presentFrameTokenGGP.frameToken ); return seed; } }; # endif /*VK_USE_PLATFORM_GGP*/ template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PresentIdKHR const & presentIdKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, presentIdKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, presentIdKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, presentIdKHR.swapchainCount ); VULKAN_HPP_HASH_COMBINE( seed, presentIdKHR.pPresentIds ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PresentInfoKHR const & presentInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, presentInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, presentInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, presentInfoKHR.waitSemaphoreCount ); VULKAN_HPP_HASH_COMBINE( seed, presentInfoKHR.pWaitSemaphores ); VULKAN_HPP_HASH_COMBINE( seed, presentInfoKHR.swapchainCount ); VULKAN_HPP_HASH_COMBINE( seed, presentInfoKHR.pSwapchains ); VULKAN_HPP_HASH_COMBINE( seed, presentInfoKHR.pImageIndices ); VULKAN_HPP_HASH_COMBINE( seed, presentInfoKHR.pResults ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::RectLayerKHR const & rectLayerKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, rectLayerKHR.offset ); VULKAN_HPP_HASH_COMBINE( seed, rectLayerKHR.extent ); VULKAN_HPP_HASH_COMBINE( seed, rectLayerKHR.layer ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PresentRegionKHR const & presentRegionKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, presentRegionKHR.rectangleCount ); VULKAN_HPP_HASH_COMBINE( seed, presentRegionKHR.pRectangles ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PresentRegionsKHR const & presentRegionsKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, presentRegionsKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, presentRegionsKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, presentRegionsKHR.swapchainCount ); VULKAN_HPP_HASH_COMBINE( seed, presentRegionsKHR.pRegions ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PresentTimeGOOGLE const & presentTimeGOOGLE ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, presentTimeGOOGLE.presentID ); VULKAN_HPP_HASH_COMBINE( seed, presentTimeGOOGLE.desiredPresentTime ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PresentTimesInfoGOOGLE const & presentTimesInfoGOOGLE ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, presentTimesInfoGOOGLE.sType ); VULKAN_HPP_HASH_COMBINE( seed, presentTimesInfoGOOGLE.pNext ); VULKAN_HPP_HASH_COMBINE( seed, presentTimesInfoGOOGLE.swapchainCount ); VULKAN_HPP_HASH_COMBINE( seed, presentTimesInfoGOOGLE.pTimes ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PrivateDataSlotCreateInfo const & privateDataSlotCreateInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, privateDataSlotCreateInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, privateDataSlotCreateInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, privateDataSlotCreateInfo.flags ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ProtectedSubmitInfo const & protectedSubmitInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, protectedSubmitInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, protectedSubmitInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, protectedSubmitInfo.protectedSubmit ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PushConstantsInfo const & pushConstantsInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, pushConstantsInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, pushConstantsInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, pushConstantsInfo.layout ); VULKAN_HPP_HASH_COMBINE( seed, pushConstantsInfo.stageFlags ); VULKAN_HPP_HASH_COMBINE( seed, pushConstantsInfo.offset ); VULKAN_HPP_HASH_COMBINE( seed, pushConstantsInfo.size ); VULKAN_HPP_HASH_COMBINE( seed, pushConstantsInfo.pValues ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::WriteDescriptorSet const & writeDescriptorSet ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, writeDescriptorSet.sType ); VULKAN_HPP_HASH_COMBINE( seed, writeDescriptorSet.pNext ); VULKAN_HPP_HASH_COMBINE( seed, writeDescriptorSet.dstSet ); VULKAN_HPP_HASH_COMBINE( seed, writeDescriptorSet.dstBinding ); VULKAN_HPP_HASH_COMBINE( seed, writeDescriptorSet.dstArrayElement ); VULKAN_HPP_HASH_COMBINE( seed, writeDescriptorSet.descriptorCount ); VULKAN_HPP_HASH_COMBINE( seed, writeDescriptorSet.descriptorType ); VULKAN_HPP_HASH_COMBINE( seed, writeDescriptorSet.pImageInfo ); VULKAN_HPP_HASH_COMBINE( seed, writeDescriptorSet.pBufferInfo ); VULKAN_HPP_HASH_COMBINE( seed, writeDescriptorSet.pTexelBufferView ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PushDescriptorSetInfo const & pushDescriptorSetInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, pushDescriptorSetInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, pushDescriptorSetInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, pushDescriptorSetInfo.stageFlags ); VULKAN_HPP_HASH_COMBINE( seed, pushDescriptorSetInfo.layout ); VULKAN_HPP_HASH_COMBINE( seed, pushDescriptorSetInfo.set ); VULKAN_HPP_HASH_COMBINE( seed, pushDescriptorSetInfo.descriptorWriteCount ); VULKAN_HPP_HASH_COMBINE( seed, pushDescriptorSetInfo.pDescriptorWrites ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::PushDescriptorSetWithTemplateInfo const & pushDescriptorSetWithTemplateInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, pushDescriptorSetWithTemplateInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, pushDescriptorSetWithTemplateInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, pushDescriptorSetWithTemplateInfo.descriptorUpdateTemplate ); VULKAN_HPP_HASH_COMBINE( seed, pushDescriptorSetWithTemplateInfo.layout ); VULKAN_HPP_HASH_COMBINE( seed, pushDescriptorSetWithTemplateInfo.set ); VULKAN_HPP_HASH_COMBINE( seed, pushDescriptorSetWithTemplateInfo.pData ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::QueryLowLatencySupportNV const & queryLowLatencySupportNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, queryLowLatencySupportNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, queryLowLatencySupportNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, queryLowLatencySupportNV.pQueriedLowLatencyData ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::QueryPoolCreateInfo const & queryPoolCreateInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, queryPoolCreateInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, queryPoolCreateInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, queryPoolCreateInfo.flags ); VULKAN_HPP_HASH_COMBINE( seed, queryPoolCreateInfo.queryType ); VULKAN_HPP_HASH_COMBINE( seed, queryPoolCreateInfo.queryCount ); VULKAN_HPP_HASH_COMBINE( seed, queryPoolCreateInfo.pipelineStatistics ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::QueryPoolPerformanceCreateInfoKHR const & queryPoolPerformanceCreateInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, queryPoolPerformanceCreateInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, queryPoolPerformanceCreateInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, queryPoolPerformanceCreateInfoKHR.queueFamilyIndex ); VULKAN_HPP_HASH_COMBINE( seed, queryPoolPerformanceCreateInfoKHR.counterIndexCount ); VULKAN_HPP_HASH_COMBINE( seed, queryPoolPerformanceCreateInfoKHR.pCounterIndices ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::QueryPoolPerformanceQueryCreateInfoINTEL const & queryPoolPerformanceQueryCreateInfoINTEL ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, queryPoolPerformanceQueryCreateInfoINTEL.sType ); VULKAN_HPP_HASH_COMBINE( seed, queryPoolPerformanceQueryCreateInfoINTEL.pNext ); VULKAN_HPP_HASH_COMBINE( seed, queryPoolPerformanceQueryCreateInfoINTEL.performanceCountersSampling ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::QueryPoolVideoEncodeFeedbackCreateInfoKHR const & queryPoolVideoEncodeFeedbackCreateInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, queryPoolVideoEncodeFeedbackCreateInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, queryPoolVideoEncodeFeedbackCreateInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, queryPoolVideoEncodeFeedbackCreateInfoKHR.encodeFeedbackFlags ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::QueueFamilyCheckpointProperties2NV const & queueFamilyCheckpointProperties2NV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, queueFamilyCheckpointProperties2NV.sType ); VULKAN_HPP_HASH_COMBINE( seed, queueFamilyCheckpointProperties2NV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, queueFamilyCheckpointProperties2NV.checkpointExecutionStageMask ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::QueueFamilyCheckpointPropertiesNV const & queueFamilyCheckpointPropertiesNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, queueFamilyCheckpointPropertiesNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, queueFamilyCheckpointPropertiesNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, queueFamilyCheckpointPropertiesNV.checkpointExecutionStageMask ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::QueueFamilyGlobalPriorityProperties const & queueFamilyGlobalPriorityProperties ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, queueFamilyGlobalPriorityProperties.sType ); VULKAN_HPP_HASH_COMBINE( seed, queueFamilyGlobalPriorityProperties.pNext ); VULKAN_HPP_HASH_COMBINE( seed, queueFamilyGlobalPriorityProperties.priorityCount ); for ( size_t i = 0; i < VK_MAX_GLOBAL_PRIORITY_SIZE; ++i ) { VULKAN_HPP_HASH_COMBINE( seed, queueFamilyGlobalPriorityProperties.priorities[i] ); } return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::QueueFamilyProperties const & queueFamilyProperties ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, queueFamilyProperties.queueFlags ); VULKAN_HPP_HASH_COMBINE( seed, queueFamilyProperties.queueCount ); VULKAN_HPP_HASH_COMBINE( seed, queueFamilyProperties.timestampValidBits ); VULKAN_HPP_HASH_COMBINE( seed, queueFamilyProperties.minImageTransferGranularity ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::QueueFamilyProperties2 const & queueFamilyProperties2 ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, queueFamilyProperties2.sType ); VULKAN_HPP_HASH_COMBINE( seed, queueFamilyProperties2.pNext ); VULKAN_HPP_HASH_COMBINE( seed, queueFamilyProperties2.queueFamilyProperties ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::QueueFamilyQueryResultStatusPropertiesKHR const & queueFamilyQueryResultStatusPropertiesKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, queueFamilyQueryResultStatusPropertiesKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, queueFamilyQueryResultStatusPropertiesKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, queueFamilyQueryResultStatusPropertiesKHR.queryResultStatusSupport ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::QueueFamilyVideoPropertiesKHR const & queueFamilyVideoPropertiesKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, queueFamilyVideoPropertiesKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, queueFamilyVideoPropertiesKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, queueFamilyVideoPropertiesKHR.videoCodecOperations ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::RayTracingPipelineClusterAccelerationStructureCreateInfoNV const & rayTracingPipelineClusterAccelerationStructureCreateInfoNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, rayTracingPipelineClusterAccelerationStructureCreateInfoNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, rayTracingPipelineClusterAccelerationStructureCreateInfoNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, rayTracingPipelineClusterAccelerationStructureCreateInfoNV.allowClusterAccelerationStructure ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::RayTracingShaderGroupCreateInfoKHR const & rayTracingShaderGroupCreateInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, rayTracingShaderGroupCreateInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, rayTracingShaderGroupCreateInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, rayTracingShaderGroupCreateInfoKHR.type ); VULKAN_HPP_HASH_COMBINE( seed, rayTracingShaderGroupCreateInfoKHR.generalShader ); VULKAN_HPP_HASH_COMBINE( seed, rayTracingShaderGroupCreateInfoKHR.closestHitShader ); VULKAN_HPP_HASH_COMBINE( seed, rayTracingShaderGroupCreateInfoKHR.anyHitShader ); VULKAN_HPP_HASH_COMBINE( seed, rayTracingShaderGroupCreateInfoKHR.intersectionShader ); VULKAN_HPP_HASH_COMBINE( seed, rayTracingShaderGroupCreateInfoKHR.pShaderGroupCaptureReplayHandle ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::RayTracingPipelineInterfaceCreateInfoKHR const & rayTracingPipelineInterfaceCreateInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, rayTracingPipelineInterfaceCreateInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, rayTracingPipelineInterfaceCreateInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, rayTracingPipelineInterfaceCreateInfoKHR.maxPipelineRayPayloadSize ); VULKAN_HPP_HASH_COMBINE( seed, rayTracingPipelineInterfaceCreateInfoKHR.maxPipelineRayHitAttributeSize ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::RayTracingPipelineCreateInfoKHR const & rayTracingPipelineCreateInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, rayTracingPipelineCreateInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, rayTracingPipelineCreateInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, rayTracingPipelineCreateInfoKHR.flags ); VULKAN_HPP_HASH_COMBINE( seed, rayTracingPipelineCreateInfoKHR.stageCount ); VULKAN_HPP_HASH_COMBINE( seed, rayTracingPipelineCreateInfoKHR.pStages ); VULKAN_HPP_HASH_COMBINE( seed, rayTracingPipelineCreateInfoKHR.groupCount ); VULKAN_HPP_HASH_COMBINE( seed, rayTracingPipelineCreateInfoKHR.pGroups ); VULKAN_HPP_HASH_COMBINE( seed, rayTracingPipelineCreateInfoKHR.maxPipelineRayRecursionDepth ); VULKAN_HPP_HASH_COMBINE( seed, rayTracingPipelineCreateInfoKHR.pLibraryInfo ); VULKAN_HPP_HASH_COMBINE( seed, rayTracingPipelineCreateInfoKHR.pLibraryInterface ); VULKAN_HPP_HASH_COMBINE( seed, rayTracingPipelineCreateInfoKHR.pDynamicState ); VULKAN_HPP_HASH_COMBINE( seed, rayTracingPipelineCreateInfoKHR.layout ); VULKAN_HPP_HASH_COMBINE( seed, rayTracingPipelineCreateInfoKHR.basePipelineHandle ); VULKAN_HPP_HASH_COMBINE( seed, rayTracingPipelineCreateInfoKHR.basePipelineIndex ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::RayTracingShaderGroupCreateInfoNV const & rayTracingShaderGroupCreateInfoNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, rayTracingShaderGroupCreateInfoNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, rayTracingShaderGroupCreateInfoNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, rayTracingShaderGroupCreateInfoNV.type ); VULKAN_HPP_HASH_COMBINE( seed, rayTracingShaderGroupCreateInfoNV.generalShader ); VULKAN_HPP_HASH_COMBINE( seed, rayTracingShaderGroupCreateInfoNV.closestHitShader ); VULKAN_HPP_HASH_COMBINE( seed, rayTracingShaderGroupCreateInfoNV.anyHitShader ); VULKAN_HPP_HASH_COMBINE( seed, rayTracingShaderGroupCreateInfoNV.intersectionShader ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::RayTracingPipelineCreateInfoNV const & rayTracingPipelineCreateInfoNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, rayTracingPipelineCreateInfoNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, rayTracingPipelineCreateInfoNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, rayTracingPipelineCreateInfoNV.flags ); VULKAN_HPP_HASH_COMBINE( seed, rayTracingPipelineCreateInfoNV.stageCount ); VULKAN_HPP_HASH_COMBINE( seed, rayTracingPipelineCreateInfoNV.pStages ); VULKAN_HPP_HASH_COMBINE( seed, rayTracingPipelineCreateInfoNV.groupCount ); VULKAN_HPP_HASH_COMBINE( seed, rayTracingPipelineCreateInfoNV.pGroups ); VULKAN_HPP_HASH_COMBINE( seed, rayTracingPipelineCreateInfoNV.maxRecursionDepth ); VULKAN_HPP_HASH_COMBINE( seed, rayTracingPipelineCreateInfoNV.layout ); VULKAN_HPP_HASH_COMBINE( seed, rayTracingPipelineCreateInfoNV.basePipelineHandle ); VULKAN_HPP_HASH_COMBINE( seed, rayTracingPipelineCreateInfoNV.basePipelineIndex ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::RefreshCycleDurationGOOGLE const & refreshCycleDurationGOOGLE ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, refreshCycleDurationGOOGLE.refreshDuration ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ReleaseCapturedPipelineDataInfoKHR const & releaseCapturedPipelineDataInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, releaseCapturedPipelineDataInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, releaseCapturedPipelineDataInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, releaseCapturedPipelineDataInfoKHR.pipeline ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ReleaseSwapchainImagesInfoEXT const & releaseSwapchainImagesInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, releaseSwapchainImagesInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, releaseSwapchainImagesInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, releaseSwapchainImagesInfoEXT.swapchain ); VULKAN_HPP_HASH_COMBINE( seed, releaseSwapchainImagesInfoEXT.imageIndexCount ); VULKAN_HPP_HASH_COMBINE( seed, releaseSwapchainImagesInfoEXT.pImageIndices ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::RenderPassAttachmentBeginInfo const & renderPassAttachmentBeginInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, renderPassAttachmentBeginInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, renderPassAttachmentBeginInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, renderPassAttachmentBeginInfo.attachmentCount ); VULKAN_HPP_HASH_COMBINE( seed, renderPassAttachmentBeginInfo.pAttachments ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::RenderPassBeginInfo const & renderPassBeginInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, renderPassBeginInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, renderPassBeginInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, renderPassBeginInfo.renderPass ); VULKAN_HPP_HASH_COMBINE( seed, renderPassBeginInfo.framebuffer ); VULKAN_HPP_HASH_COMBINE( seed, renderPassBeginInfo.renderArea ); VULKAN_HPP_HASH_COMBINE( seed, renderPassBeginInfo.clearValueCount ); VULKAN_HPP_HASH_COMBINE( seed, renderPassBeginInfo.pClearValues ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::SubpassDescription const & subpassDescription ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, subpassDescription.flags ); VULKAN_HPP_HASH_COMBINE( seed, subpassDescription.pipelineBindPoint ); VULKAN_HPP_HASH_COMBINE( seed, subpassDescription.inputAttachmentCount ); VULKAN_HPP_HASH_COMBINE( seed, subpassDescription.pInputAttachments ); VULKAN_HPP_HASH_COMBINE( seed, subpassDescription.colorAttachmentCount ); VULKAN_HPP_HASH_COMBINE( seed, subpassDescription.pColorAttachments ); VULKAN_HPP_HASH_COMBINE( seed, subpassDescription.pResolveAttachments ); VULKAN_HPP_HASH_COMBINE( seed, subpassDescription.pDepthStencilAttachment ); VULKAN_HPP_HASH_COMBINE( seed, subpassDescription.preserveAttachmentCount ); VULKAN_HPP_HASH_COMBINE( seed, subpassDescription.pPreserveAttachments ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::SubpassDependency const & subpassDependency ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, subpassDependency.srcSubpass ); VULKAN_HPP_HASH_COMBINE( seed, subpassDependency.dstSubpass ); VULKAN_HPP_HASH_COMBINE( seed, subpassDependency.srcStageMask ); VULKAN_HPP_HASH_COMBINE( seed, subpassDependency.dstStageMask ); VULKAN_HPP_HASH_COMBINE( seed, subpassDependency.srcAccessMask ); VULKAN_HPP_HASH_COMBINE( seed, subpassDependency.dstAccessMask ); VULKAN_HPP_HASH_COMBINE( seed, subpassDependency.dependencyFlags ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::RenderPassCreateInfo const & renderPassCreateInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, renderPassCreateInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, renderPassCreateInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, renderPassCreateInfo.flags ); VULKAN_HPP_HASH_COMBINE( seed, renderPassCreateInfo.attachmentCount ); VULKAN_HPP_HASH_COMBINE( seed, renderPassCreateInfo.pAttachments ); VULKAN_HPP_HASH_COMBINE( seed, renderPassCreateInfo.subpassCount ); VULKAN_HPP_HASH_COMBINE( seed, renderPassCreateInfo.pSubpasses ); VULKAN_HPP_HASH_COMBINE( seed, renderPassCreateInfo.dependencyCount ); VULKAN_HPP_HASH_COMBINE( seed, renderPassCreateInfo.pDependencies ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::SubpassDescription2 const & subpassDescription2 ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, subpassDescription2.sType ); VULKAN_HPP_HASH_COMBINE( seed, subpassDescription2.pNext ); VULKAN_HPP_HASH_COMBINE( seed, subpassDescription2.flags ); VULKAN_HPP_HASH_COMBINE( seed, subpassDescription2.pipelineBindPoint ); VULKAN_HPP_HASH_COMBINE( seed, subpassDescription2.viewMask ); VULKAN_HPP_HASH_COMBINE( seed, subpassDescription2.inputAttachmentCount ); VULKAN_HPP_HASH_COMBINE( seed, subpassDescription2.pInputAttachments ); VULKAN_HPP_HASH_COMBINE( seed, subpassDescription2.colorAttachmentCount ); VULKAN_HPP_HASH_COMBINE( seed, subpassDescription2.pColorAttachments ); VULKAN_HPP_HASH_COMBINE( seed, subpassDescription2.pResolveAttachments ); VULKAN_HPP_HASH_COMBINE( seed, subpassDescription2.pDepthStencilAttachment ); VULKAN_HPP_HASH_COMBINE( seed, subpassDescription2.preserveAttachmentCount ); VULKAN_HPP_HASH_COMBINE( seed, subpassDescription2.pPreserveAttachments ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::SubpassDependency2 const & subpassDependency2 ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, subpassDependency2.sType ); VULKAN_HPP_HASH_COMBINE( seed, subpassDependency2.pNext ); VULKAN_HPP_HASH_COMBINE( seed, subpassDependency2.srcSubpass ); VULKAN_HPP_HASH_COMBINE( seed, subpassDependency2.dstSubpass ); VULKAN_HPP_HASH_COMBINE( seed, subpassDependency2.srcStageMask ); VULKAN_HPP_HASH_COMBINE( seed, subpassDependency2.dstStageMask ); VULKAN_HPP_HASH_COMBINE( seed, subpassDependency2.srcAccessMask ); VULKAN_HPP_HASH_COMBINE( seed, subpassDependency2.dstAccessMask ); VULKAN_HPP_HASH_COMBINE( seed, subpassDependency2.dependencyFlags ); VULKAN_HPP_HASH_COMBINE( seed, subpassDependency2.viewOffset ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::RenderPassCreateInfo2 const & renderPassCreateInfo2 ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, renderPassCreateInfo2.sType ); VULKAN_HPP_HASH_COMBINE( seed, renderPassCreateInfo2.pNext ); VULKAN_HPP_HASH_COMBINE( seed, renderPassCreateInfo2.flags ); VULKAN_HPP_HASH_COMBINE( seed, renderPassCreateInfo2.attachmentCount ); VULKAN_HPP_HASH_COMBINE( seed, renderPassCreateInfo2.pAttachments ); VULKAN_HPP_HASH_COMBINE( seed, renderPassCreateInfo2.subpassCount ); VULKAN_HPP_HASH_COMBINE( seed, renderPassCreateInfo2.pSubpasses ); VULKAN_HPP_HASH_COMBINE( seed, renderPassCreateInfo2.dependencyCount ); VULKAN_HPP_HASH_COMBINE( seed, renderPassCreateInfo2.pDependencies ); VULKAN_HPP_HASH_COMBINE( seed, renderPassCreateInfo2.correlatedViewMaskCount ); VULKAN_HPP_HASH_COMBINE( seed, renderPassCreateInfo2.pCorrelatedViewMasks ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::RenderPassCreationControlEXT const & renderPassCreationControlEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, renderPassCreationControlEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, renderPassCreationControlEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, renderPassCreationControlEXT.disallowMerging ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::RenderPassCreationFeedbackInfoEXT const & renderPassCreationFeedbackInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, renderPassCreationFeedbackInfoEXT.postMergeSubpassCount ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::RenderPassCreationFeedbackCreateInfoEXT const & renderPassCreationFeedbackCreateInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, renderPassCreationFeedbackCreateInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, renderPassCreationFeedbackCreateInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, renderPassCreationFeedbackCreateInfoEXT.pRenderPassFeedback ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::RenderPassFragmentDensityMapCreateInfoEXT const & renderPassFragmentDensityMapCreateInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, renderPassFragmentDensityMapCreateInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, renderPassFragmentDensityMapCreateInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, renderPassFragmentDensityMapCreateInfoEXT.fragmentDensityMapAttachment ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::RenderPassInputAttachmentAspectCreateInfo const & renderPassInputAttachmentAspectCreateInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, renderPassInputAttachmentAspectCreateInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, renderPassInputAttachmentAspectCreateInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, renderPassInputAttachmentAspectCreateInfo.aspectReferenceCount ); VULKAN_HPP_HASH_COMBINE( seed, renderPassInputAttachmentAspectCreateInfo.pAspectReferences ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::RenderPassMultiviewCreateInfo const & renderPassMultiviewCreateInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, renderPassMultiviewCreateInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, renderPassMultiviewCreateInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, renderPassMultiviewCreateInfo.subpassCount ); VULKAN_HPP_HASH_COMBINE( seed, renderPassMultiviewCreateInfo.pViewMasks ); VULKAN_HPP_HASH_COMBINE( seed, renderPassMultiviewCreateInfo.dependencyCount ); VULKAN_HPP_HASH_COMBINE( seed, renderPassMultiviewCreateInfo.pViewOffsets ); VULKAN_HPP_HASH_COMBINE( seed, renderPassMultiviewCreateInfo.correlationMaskCount ); VULKAN_HPP_HASH_COMBINE( seed, renderPassMultiviewCreateInfo.pCorrelationMasks ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::SubpassSampleLocationsEXT const & subpassSampleLocationsEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, subpassSampleLocationsEXT.subpassIndex ); VULKAN_HPP_HASH_COMBINE( seed, subpassSampleLocationsEXT.sampleLocationsInfo ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::RenderPassSampleLocationsBeginInfoEXT const & renderPassSampleLocationsBeginInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, renderPassSampleLocationsBeginInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, renderPassSampleLocationsBeginInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, renderPassSampleLocationsBeginInfoEXT.attachmentInitialSampleLocationsCount ); VULKAN_HPP_HASH_COMBINE( seed, renderPassSampleLocationsBeginInfoEXT.pAttachmentInitialSampleLocations ); VULKAN_HPP_HASH_COMBINE( seed, renderPassSampleLocationsBeginInfoEXT.postSubpassSampleLocationsCount ); VULKAN_HPP_HASH_COMBINE( seed, renderPassSampleLocationsBeginInfoEXT.pPostSubpassSampleLocations ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::RenderPassStripeInfoARM const & renderPassStripeInfoARM ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, renderPassStripeInfoARM.sType ); VULKAN_HPP_HASH_COMBINE( seed, renderPassStripeInfoARM.pNext ); VULKAN_HPP_HASH_COMBINE( seed, renderPassStripeInfoARM.stripeArea ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::RenderPassStripeBeginInfoARM const & renderPassStripeBeginInfoARM ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, renderPassStripeBeginInfoARM.sType ); VULKAN_HPP_HASH_COMBINE( seed, renderPassStripeBeginInfoARM.pNext ); VULKAN_HPP_HASH_COMBINE( seed, renderPassStripeBeginInfoARM.stripeInfoCount ); VULKAN_HPP_HASH_COMBINE( seed, renderPassStripeBeginInfoARM.pStripeInfos ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::SemaphoreSubmitInfo const & semaphoreSubmitInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, semaphoreSubmitInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, semaphoreSubmitInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, semaphoreSubmitInfo.semaphore ); VULKAN_HPP_HASH_COMBINE( seed, semaphoreSubmitInfo.value ); VULKAN_HPP_HASH_COMBINE( seed, semaphoreSubmitInfo.stageMask ); VULKAN_HPP_HASH_COMBINE( seed, semaphoreSubmitInfo.deviceIndex ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::RenderPassStripeSubmitInfoARM const & renderPassStripeSubmitInfoARM ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, renderPassStripeSubmitInfoARM.sType ); VULKAN_HPP_HASH_COMBINE( seed, renderPassStripeSubmitInfoARM.pNext ); VULKAN_HPP_HASH_COMBINE( seed, renderPassStripeSubmitInfoARM.stripeSemaphoreInfoCount ); VULKAN_HPP_HASH_COMBINE( seed, renderPassStripeSubmitInfoARM.pStripeSemaphoreInfos ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::RenderPassSubpassFeedbackInfoEXT const & renderPassSubpassFeedbackInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, renderPassSubpassFeedbackInfoEXT.subpassMergeStatus ); for ( size_t i = 0; i < VK_MAX_DESCRIPTION_SIZE; ++i ) { VULKAN_HPP_HASH_COMBINE( seed, renderPassSubpassFeedbackInfoEXT.description[i] ); } VULKAN_HPP_HASH_COMBINE( seed, renderPassSubpassFeedbackInfoEXT.postMergeIndex ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::RenderPassSubpassFeedbackCreateInfoEXT const & renderPassSubpassFeedbackCreateInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, renderPassSubpassFeedbackCreateInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, renderPassSubpassFeedbackCreateInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, renderPassSubpassFeedbackCreateInfoEXT.pSubpassFeedback ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::RenderPassTransformBeginInfoQCOM const & renderPassTransformBeginInfoQCOM ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, renderPassTransformBeginInfoQCOM.sType ); VULKAN_HPP_HASH_COMBINE( seed, renderPassTransformBeginInfoQCOM.pNext ); VULKAN_HPP_HASH_COMBINE( seed, renderPassTransformBeginInfoQCOM.transform ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::RenderingAreaInfo const & renderingAreaInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, renderingAreaInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, renderingAreaInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, renderingAreaInfo.viewMask ); VULKAN_HPP_HASH_COMBINE( seed, renderingAreaInfo.colorAttachmentCount ); VULKAN_HPP_HASH_COMBINE( seed, renderingAreaInfo.pColorAttachmentFormats ); VULKAN_HPP_HASH_COMBINE( seed, renderingAreaInfo.depthAttachmentFormat ); VULKAN_HPP_HASH_COMBINE( seed, renderingAreaInfo.stencilAttachmentFormat ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::RenderingAttachmentLocationInfo const & renderingAttachmentLocationInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, renderingAttachmentLocationInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, renderingAttachmentLocationInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, renderingAttachmentLocationInfo.colorAttachmentCount ); VULKAN_HPP_HASH_COMBINE( seed, renderingAttachmentLocationInfo.pColorAttachmentLocations ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::RenderingFragmentDensityMapAttachmentInfoEXT const & renderingFragmentDensityMapAttachmentInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, renderingFragmentDensityMapAttachmentInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, renderingFragmentDensityMapAttachmentInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, renderingFragmentDensityMapAttachmentInfoEXT.imageView ); VULKAN_HPP_HASH_COMBINE( seed, renderingFragmentDensityMapAttachmentInfoEXT.imageLayout ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::RenderingFragmentShadingRateAttachmentInfoKHR const & renderingFragmentShadingRateAttachmentInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, renderingFragmentShadingRateAttachmentInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, renderingFragmentShadingRateAttachmentInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, renderingFragmentShadingRateAttachmentInfoKHR.imageView ); VULKAN_HPP_HASH_COMBINE( seed, renderingFragmentShadingRateAttachmentInfoKHR.imageLayout ); VULKAN_HPP_HASH_COMBINE( seed, renderingFragmentShadingRateAttachmentInfoKHR.shadingRateAttachmentTexelSize ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::RenderingInfo const & renderingInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, renderingInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, renderingInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, renderingInfo.flags ); VULKAN_HPP_HASH_COMBINE( seed, renderingInfo.renderArea ); VULKAN_HPP_HASH_COMBINE( seed, renderingInfo.layerCount ); VULKAN_HPP_HASH_COMBINE( seed, renderingInfo.viewMask ); VULKAN_HPP_HASH_COMBINE( seed, renderingInfo.colorAttachmentCount ); VULKAN_HPP_HASH_COMBINE( seed, renderingInfo.pColorAttachments ); VULKAN_HPP_HASH_COMBINE( seed, renderingInfo.pDepthAttachment ); VULKAN_HPP_HASH_COMBINE( seed, renderingInfo.pStencilAttachment ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::RenderingInputAttachmentIndexInfo const & renderingInputAttachmentIndexInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, renderingInputAttachmentIndexInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, renderingInputAttachmentIndexInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, renderingInputAttachmentIndexInfo.colorAttachmentCount ); VULKAN_HPP_HASH_COMBINE( seed, renderingInputAttachmentIndexInfo.pColorAttachmentInputIndices ); VULKAN_HPP_HASH_COMBINE( seed, renderingInputAttachmentIndexInfo.pDepthInputAttachmentIndex ); VULKAN_HPP_HASH_COMBINE( seed, renderingInputAttachmentIndexInfo.pStencilInputAttachmentIndex ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ResolveImageInfo2 const & resolveImageInfo2 ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, resolveImageInfo2.sType ); VULKAN_HPP_HASH_COMBINE( seed, resolveImageInfo2.pNext ); VULKAN_HPP_HASH_COMBINE( seed, resolveImageInfo2.srcImage ); VULKAN_HPP_HASH_COMBINE( seed, resolveImageInfo2.srcImageLayout ); VULKAN_HPP_HASH_COMBINE( seed, resolveImageInfo2.dstImage ); VULKAN_HPP_HASH_COMBINE( seed, resolveImageInfo2.dstImageLayout ); VULKAN_HPP_HASH_COMBINE( seed, resolveImageInfo2.regionCount ); VULKAN_HPP_HASH_COMBINE( seed, resolveImageInfo2.pRegions ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::SamplerBlockMatchWindowCreateInfoQCOM const & samplerBlockMatchWindowCreateInfoQCOM ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, samplerBlockMatchWindowCreateInfoQCOM.sType ); VULKAN_HPP_HASH_COMBINE( seed, samplerBlockMatchWindowCreateInfoQCOM.pNext ); VULKAN_HPP_HASH_COMBINE( seed, samplerBlockMatchWindowCreateInfoQCOM.windowExtent ); VULKAN_HPP_HASH_COMBINE( seed, samplerBlockMatchWindowCreateInfoQCOM.windowCompareMode ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::SamplerBorderColorComponentMappingCreateInfoEXT const & samplerBorderColorComponentMappingCreateInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, samplerBorderColorComponentMappingCreateInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, samplerBorderColorComponentMappingCreateInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, samplerBorderColorComponentMappingCreateInfoEXT.components ); VULKAN_HPP_HASH_COMBINE( seed, samplerBorderColorComponentMappingCreateInfoEXT.srgb ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::SamplerCaptureDescriptorDataInfoEXT const & samplerCaptureDescriptorDataInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, samplerCaptureDescriptorDataInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, samplerCaptureDescriptorDataInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, samplerCaptureDescriptorDataInfoEXT.sampler ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::SamplerCreateInfo const & samplerCreateInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, samplerCreateInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, samplerCreateInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, samplerCreateInfo.flags ); VULKAN_HPP_HASH_COMBINE( seed, samplerCreateInfo.magFilter ); VULKAN_HPP_HASH_COMBINE( seed, samplerCreateInfo.minFilter ); VULKAN_HPP_HASH_COMBINE( seed, samplerCreateInfo.mipmapMode ); VULKAN_HPP_HASH_COMBINE( seed, samplerCreateInfo.addressModeU ); VULKAN_HPP_HASH_COMBINE( seed, samplerCreateInfo.addressModeV ); VULKAN_HPP_HASH_COMBINE( seed, samplerCreateInfo.addressModeW ); VULKAN_HPP_HASH_COMBINE( seed, samplerCreateInfo.mipLodBias ); VULKAN_HPP_HASH_COMBINE( seed, samplerCreateInfo.anisotropyEnable ); VULKAN_HPP_HASH_COMBINE( seed, samplerCreateInfo.maxAnisotropy ); VULKAN_HPP_HASH_COMBINE( seed, samplerCreateInfo.compareEnable ); VULKAN_HPP_HASH_COMBINE( seed, samplerCreateInfo.compareOp ); VULKAN_HPP_HASH_COMBINE( seed, samplerCreateInfo.minLod ); VULKAN_HPP_HASH_COMBINE( seed, samplerCreateInfo.maxLod ); VULKAN_HPP_HASH_COMBINE( seed, samplerCreateInfo.borderColor ); VULKAN_HPP_HASH_COMBINE( seed, samplerCreateInfo.unnormalizedCoordinates ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::SamplerCubicWeightsCreateInfoQCOM const & samplerCubicWeightsCreateInfoQCOM ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, samplerCubicWeightsCreateInfoQCOM.sType ); VULKAN_HPP_HASH_COMBINE( seed, samplerCubicWeightsCreateInfoQCOM.pNext ); VULKAN_HPP_HASH_COMBINE( seed, samplerCubicWeightsCreateInfoQCOM.cubicWeights ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::SamplerReductionModeCreateInfo const & samplerReductionModeCreateInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, samplerReductionModeCreateInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, samplerReductionModeCreateInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, samplerReductionModeCreateInfo.reductionMode ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversionCreateInfo const & samplerYcbcrConversionCreateInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, samplerYcbcrConversionCreateInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, samplerYcbcrConversionCreateInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, samplerYcbcrConversionCreateInfo.format ); VULKAN_HPP_HASH_COMBINE( seed, samplerYcbcrConversionCreateInfo.ycbcrModel ); VULKAN_HPP_HASH_COMBINE( seed, samplerYcbcrConversionCreateInfo.ycbcrRange ); VULKAN_HPP_HASH_COMBINE( seed, samplerYcbcrConversionCreateInfo.components ); VULKAN_HPP_HASH_COMBINE( seed, samplerYcbcrConversionCreateInfo.xChromaOffset ); VULKAN_HPP_HASH_COMBINE( seed, samplerYcbcrConversionCreateInfo.yChromaOffset ); VULKAN_HPP_HASH_COMBINE( seed, samplerYcbcrConversionCreateInfo.chromaFilter ); VULKAN_HPP_HASH_COMBINE( seed, samplerYcbcrConversionCreateInfo.forceExplicitReconstruction ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversionImageFormatProperties const & samplerYcbcrConversionImageFormatProperties ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, samplerYcbcrConversionImageFormatProperties.sType ); VULKAN_HPP_HASH_COMBINE( seed, samplerYcbcrConversionImageFormatProperties.pNext ); VULKAN_HPP_HASH_COMBINE( seed, samplerYcbcrConversionImageFormatProperties.combinedImageSamplerDescriptorCount ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversionInfo const & samplerYcbcrConversionInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, samplerYcbcrConversionInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, samplerYcbcrConversionInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, samplerYcbcrConversionInfo.conversion ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM const & samplerYcbcrConversionYcbcrDegammaCreateInfoQCOM ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, samplerYcbcrConversionYcbcrDegammaCreateInfoQCOM.sType ); VULKAN_HPP_HASH_COMBINE( seed, samplerYcbcrConversionYcbcrDegammaCreateInfoQCOM.pNext ); VULKAN_HPP_HASH_COMBINE( seed, samplerYcbcrConversionYcbcrDegammaCreateInfoQCOM.enableYDegamma ); VULKAN_HPP_HASH_COMBINE( seed, samplerYcbcrConversionYcbcrDegammaCreateInfoQCOM.enableCbCrDegamma ); return seed; } }; # if defined( VK_USE_PLATFORM_SCREEN_QNX ) template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ScreenBufferFormatPropertiesQNX const & screenBufferFormatPropertiesQNX ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, screenBufferFormatPropertiesQNX.sType ); VULKAN_HPP_HASH_COMBINE( seed, screenBufferFormatPropertiesQNX.pNext ); VULKAN_HPP_HASH_COMBINE( seed, screenBufferFormatPropertiesQNX.format ); VULKAN_HPP_HASH_COMBINE( seed, screenBufferFormatPropertiesQNX.externalFormat ); VULKAN_HPP_HASH_COMBINE( seed, screenBufferFormatPropertiesQNX.screenUsage ); VULKAN_HPP_HASH_COMBINE( seed, screenBufferFormatPropertiesQNX.formatFeatures ); VULKAN_HPP_HASH_COMBINE( seed, screenBufferFormatPropertiesQNX.samplerYcbcrConversionComponents ); VULKAN_HPP_HASH_COMBINE( seed, screenBufferFormatPropertiesQNX.suggestedYcbcrModel ); VULKAN_HPP_HASH_COMBINE( seed, screenBufferFormatPropertiesQNX.suggestedYcbcrRange ); VULKAN_HPP_HASH_COMBINE( seed, screenBufferFormatPropertiesQNX.suggestedXChromaOffset ); VULKAN_HPP_HASH_COMBINE( seed, screenBufferFormatPropertiesQNX.suggestedYChromaOffset ); return seed; } }; # endif /*VK_USE_PLATFORM_SCREEN_QNX*/ # if defined( VK_USE_PLATFORM_SCREEN_QNX ) template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ScreenBufferPropertiesQNX const & screenBufferPropertiesQNX ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, screenBufferPropertiesQNX.sType ); VULKAN_HPP_HASH_COMBINE( seed, screenBufferPropertiesQNX.pNext ); VULKAN_HPP_HASH_COMBINE( seed, screenBufferPropertiesQNX.allocationSize ); VULKAN_HPP_HASH_COMBINE( seed, screenBufferPropertiesQNX.memoryTypeBits ); return seed; } }; # endif /*VK_USE_PLATFORM_SCREEN_QNX*/ # if defined( VK_USE_PLATFORM_SCREEN_QNX ) template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ScreenSurfaceCreateInfoQNX const & screenSurfaceCreateInfoQNX ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, screenSurfaceCreateInfoQNX.sType ); VULKAN_HPP_HASH_COMBINE( seed, screenSurfaceCreateInfoQNX.pNext ); VULKAN_HPP_HASH_COMBINE( seed, screenSurfaceCreateInfoQNX.flags ); VULKAN_HPP_HASH_COMBINE( seed, screenSurfaceCreateInfoQNX.context ); VULKAN_HPP_HASH_COMBINE( seed, screenSurfaceCreateInfoQNX.window ); return seed; } }; # endif /*VK_USE_PLATFORM_SCREEN_QNX*/ template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::SemaphoreCreateInfo const & semaphoreCreateInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, semaphoreCreateInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, semaphoreCreateInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, semaphoreCreateInfo.flags ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::SemaphoreGetFdInfoKHR const & semaphoreGetFdInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, semaphoreGetFdInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, semaphoreGetFdInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, semaphoreGetFdInfoKHR.semaphore ); VULKAN_HPP_HASH_COMBINE( seed, semaphoreGetFdInfoKHR.handleType ); return seed; } }; # if defined( VK_USE_PLATFORM_WIN32_KHR ) template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::SemaphoreGetWin32HandleInfoKHR const & semaphoreGetWin32HandleInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, semaphoreGetWin32HandleInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, semaphoreGetWin32HandleInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, semaphoreGetWin32HandleInfoKHR.semaphore ); VULKAN_HPP_HASH_COMBINE( seed, semaphoreGetWin32HandleInfoKHR.handleType ); return seed; } }; # endif /*VK_USE_PLATFORM_WIN32_KHR*/ # if defined( VK_USE_PLATFORM_FUCHSIA ) template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::SemaphoreGetZirconHandleInfoFUCHSIA const & semaphoreGetZirconHandleInfoFUCHSIA ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, semaphoreGetZirconHandleInfoFUCHSIA.sType ); VULKAN_HPP_HASH_COMBINE( seed, semaphoreGetZirconHandleInfoFUCHSIA.pNext ); VULKAN_HPP_HASH_COMBINE( seed, semaphoreGetZirconHandleInfoFUCHSIA.semaphore ); VULKAN_HPP_HASH_COMBINE( seed, semaphoreGetZirconHandleInfoFUCHSIA.handleType ); return seed; } }; # endif /*VK_USE_PLATFORM_FUCHSIA*/ template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::SemaphoreSignalInfo const & semaphoreSignalInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, semaphoreSignalInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, semaphoreSignalInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, semaphoreSignalInfo.semaphore ); VULKAN_HPP_HASH_COMBINE( seed, semaphoreSignalInfo.value ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::SemaphoreTypeCreateInfo const & semaphoreTypeCreateInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, semaphoreTypeCreateInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, semaphoreTypeCreateInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, semaphoreTypeCreateInfo.semaphoreType ); VULKAN_HPP_HASH_COMBINE( seed, semaphoreTypeCreateInfo.initialValue ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::SemaphoreWaitInfo const & semaphoreWaitInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, semaphoreWaitInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, semaphoreWaitInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, semaphoreWaitInfo.flags ); VULKAN_HPP_HASH_COMBINE( seed, semaphoreWaitInfo.semaphoreCount ); VULKAN_HPP_HASH_COMBINE( seed, semaphoreWaitInfo.pSemaphores ); VULKAN_HPP_HASH_COMBINE( seed, semaphoreWaitInfo.pValues ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::SetDescriptorBufferOffsetsInfoEXT const & setDescriptorBufferOffsetsInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, setDescriptorBufferOffsetsInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, setDescriptorBufferOffsetsInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, setDescriptorBufferOffsetsInfoEXT.stageFlags ); VULKAN_HPP_HASH_COMBINE( seed, setDescriptorBufferOffsetsInfoEXT.layout ); VULKAN_HPP_HASH_COMBINE( seed, setDescriptorBufferOffsetsInfoEXT.firstSet ); VULKAN_HPP_HASH_COMBINE( seed, setDescriptorBufferOffsetsInfoEXT.setCount ); VULKAN_HPP_HASH_COMBINE( seed, setDescriptorBufferOffsetsInfoEXT.pBufferIndices ); VULKAN_HPP_HASH_COMBINE( seed, setDescriptorBufferOffsetsInfoEXT.pOffsets ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::SetLatencyMarkerInfoNV const & setLatencyMarkerInfoNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, setLatencyMarkerInfoNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, setLatencyMarkerInfoNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, setLatencyMarkerInfoNV.presentID ); VULKAN_HPP_HASH_COMBINE( seed, setLatencyMarkerInfoNV.marker ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::SetStateFlagsIndirectCommandNV const & setStateFlagsIndirectCommandNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, setStateFlagsIndirectCommandNV.data ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ShaderCreateInfoEXT const & shaderCreateInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, shaderCreateInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, shaderCreateInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, shaderCreateInfoEXT.flags ); VULKAN_HPP_HASH_COMBINE( seed, shaderCreateInfoEXT.stage ); VULKAN_HPP_HASH_COMBINE( seed, shaderCreateInfoEXT.nextStage ); VULKAN_HPP_HASH_COMBINE( seed, shaderCreateInfoEXT.codeType ); VULKAN_HPP_HASH_COMBINE( seed, shaderCreateInfoEXT.codeSize ); VULKAN_HPP_HASH_COMBINE( seed, shaderCreateInfoEXT.pCode ); for ( const char * p = shaderCreateInfoEXT.pName; *p != '\0'; ++p ) { VULKAN_HPP_HASH_COMBINE( seed, *p ); } VULKAN_HPP_HASH_COMBINE( seed, shaderCreateInfoEXT.setLayoutCount ); VULKAN_HPP_HASH_COMBINE( seed, shaderCreateInfoEXT.pSetLayouts ); VULKAN_HPP_HASH_COMBINE( seed, shaderCreateInfoEXT.pushConstantRangeCount ); VULKAN_HPP_HASH_COMBINE( seed, shaderCreateInfoEXT.pPushConstantRanges ); VULKAN_HPP_HASH_COMBINE( seed, shaderCreateInfoEXT.pSpecializationInfo ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ShaderModuleCreateInfo const & shaderModuleCreateInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, shaderModuleCreateInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, shaderModuleCreateInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, shaderModuleCreateInfo.flags ); VULKAN_HPP_HASH_COMBINE( seed, shaderModuleCreateInfo.codeSize ); VULKAN_HPP_HASH_COMBINE( seed, shaderModuleCreateInfo.pCode ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ShaderModuleIdentifierEXT const & shaderModuleIdentifierEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, shaderModuleIdentifierEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, shaderModuleIdentifierEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, shaderModuleIdentifierEXT.identifierSize ); for ( size_t i = 0; i < VK_MAX_SHADER_MODULE_IDENTIFIER_SIZE_EXT; ++i ) { VULKAN_HPP_HASH_COMBINE( seed, shaderModuleIdentifierEXT.identifier[i] ); } return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ShaderModuleValidationCacheCreateInfoEXT const & shaderModuleValidationCacheCreateInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, shaderModuleValidationCacheCreateInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, shaderModuleValidationCacheCreateInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, shaderModuleValidationCacheCreateInfoEXT.validationCache ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ShaderResourceUsageAMD const & shaderResourceUsageAMD ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, shaderResourceUsageAMD.numUsedVgprs ); VULKAN_HPP_HASH_COMBINE( seed, shaderResourceUsageAMD.numUsedSgprs ); VULKAN_HPP_HASH_COMBINE( seed, shaderResourceUsageAMD.ldsSizePerLocalWorkGroup ); VULKAN_HPP_HASH_COMBINE( seed, shaderResourceUsageAMD.ldsUsageSizeInBytes ); VULKAN_HPP_HASH_COMBINE( seed, shaderResourceUsageAMD.scratchMemUsageInBytes ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ShaderStatisticsInfoAMD const & shaderStatisticsInfoAMD ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, shaderStatisticsInfoAMD.shaderStageMask ); VULKAN_HPP_HASH_COMBINE( seed, shaderStatisticsInfoAMD.resourceUsage ); VULKAN_HPP_HASH_COMBINE( seed, shaderStatisticsInfoAMD.numPhysicalVgprs ); VULKAN_HPP_HASH_COMBINE( seed, shaderStatisticsInfoAMD.numPhysicalSgprs ); VULKAN_HPP_HASH_COMBINE( seed, shaderStatisticsInfoAMD.numAvailableVgprs ); VULKAN_HPP_HASH_COMBINE( seed, shaderStatisticsInfoAMD.numAvailableSgprs ); for ( size_t i = 0; i < 3; ++i ) { VULKAN_HPP_HASH_COMBINE( seed, shaderStatisticsInfoAMD.computeWorkGroupSize[i] ); } return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::SharedPresentSurfaceCapabilitiesKHR const & sharedPresentSurfaceCapabilitiesKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, sharedPresentSurfaceCapabilitiesKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, sharedPresentSurfaceCapabilitiesKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, sharedPresentSurfaceCapabilitiesKHR.sharedPresentSupportedUsageFlags ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::SparseImageFormatProperties const & sparseImageFormatProperties ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, sparseImageFormatProperties.aspectMask ); VULKAN_HPP_HASH_COMBINE( seed, sparseImageFormatProperties.imageGranularity ); VULKAN_HPP_HASH_COMBINE( seed, sparseImageFormatProperties.flags ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::SparseImageFormatProperties2 const & sparseImageFormatProperties2 ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, sparseImageFormatProperties2.sType ); VULKAN_HPP_HASH_COMBINE( seed, sparseImageFormatProperties2.pNext ); VULKAN_HPP_HASH_COMBINE( seed, sparseImageFormatProperties2.properties ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::SparseImageMemoryRequirements const & sparseImageMemoryRequirements ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, sparseImageMemoryRequirements.formatProperties ); VULKAN_HPP_HASH_COMBINE( seed, sparseImageMemoryRequirements.imageMipTailFirstLod ); VULKAN_HPP_HASH_COMBINE( seed, sparseImageMemoryRequirements.imageMipTailSize ); VULKAN_HPP_HASH_COMBINE( seed, sparseImageMemoryRequirements.imageMipTailOffset ); VULKAN_HPP_HASH_COMBINE( seed, sparseImageMemoryRequirements.imageMipTailStride ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::SparseImageMemoryRequirements2 const & sparseImageMemoryRequirements2 ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, sparseImageMemoryRequirements2.sType ); VULKAN_HPP_HASH_COMBINE( seed, sparseImageMemoryRequirements2.pNext ); VULKAN_HPP_HASH_COMBINE( seed, sparseImageMemoryRequirements2.memoryRequirements ); return seed; } }; # if defined( VK_USE_PLATFORM_GGP ) template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::StreamDescriptorSurfaceCreateInfoGGP const & streamDescriptorSurfaceCreateInfoGGP ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, streamDescriptorSurfaceCreateInfoGGP.sType ); VULKAN_HPP_HASH_COMBINE( seed, streamDescriptorSurfaceCreateInfoGGP.pNext ); VULKAN_HPP_HASH_COMBINE( seed, streamDescriptorSurfaceCreateInfoGGP.flags ); VULKAN_HPP_HASH_COMBINE( seed, streamDescriptorSurfaceCreateInfoGGP.streamDescriptor ); return seed; } }; # endif /*VK_USE_PLATFORM_GGP*/ template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::SubmitInfo const & submitInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, submitInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, submitInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, submitInfo.waitSemaphoreCount ); VULKAN_HPP_HASH_COMBINE( seed, submitInfo.pWaitSemaphores ); VULKAN_HPP_HASH_COMBINE( seed, submitInfo.pWaitDstStageMask ); VULKAN_HPP_HASH_COMBINE( seed, submitInfo.commandBufferCount ); VULKAN_HPP_HASH_COMBINE( seed, submitInfo.pCommandBuffers ); VULKAN_HPP_HASH_COMBINE( seed, submitInfo.signalSemaphoreCount ); VULKAN_HPP_HASH_COMBINE( seed, submitInfo.pSignalSemaphores ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::SubmitInfo2 const & submitInfo2 ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, submitInfo2.sType ); VULKAN_HPP_HASH_COMBINE( seed, submitInfo2.pNext ); VULKAN_HPP_HASH_COMBINE( seed, submitInfo2.flags ); VULKAN_HPP_HASH_COMBINE( seed, submitInfo2.waitSemaphoreInfoCount ); VULKAN_HPP_HASH_COMBINE( seed, submitInfo2.pWaitSemaphoreInfos ); VULKAN_HPP_HASH_COMBINE( seed, submitInfo2.commandBufferInfoCount ); VULKAN_HPP_HASH_COMBINE( seed, submitInfo2.pCommandBufferInfos ); VULKAN_HPP_HASH_COMBINE( seed, submitInfo2.signalSemaphoreInfoCount ); VULKAN_HPP_HASH_COMBINE( seed, submitInfo2.pSignalSemaphoreInfos ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::SubpassBeginInfo const & subpassBeginInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, subpassBeginInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, subpassBeginInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, subpassBeginInfo.contents ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::SubpassDescriptionDepthStencilResolve const & subpassDescriptionDepthStencilResolve ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, subpassDescriptionDepthStencilResolve.sType ); VULKAN_HPP_HASH_COMBINE( seed, subpassDescriptionDepthStencilResolve.pNext ); VULKAN_HPP_HASH_COMBINE( seed, subpassDescriptionDepthStencilResolve.depthResolveMode ); VULKAN_HPP_HASH_COMBINE( seed, subpassDescriptionDepthStencilResolve.stencilResolveMode ); VULKAN_HPP_HASH_COMBINE( seed, subpassDescriptionDepthStencilResolve.pDepthStencilResolveAttachment ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::SubpassEndInfo const & subpassEndInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, subpassEndInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, subpassEndInfo.pNext ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::SubpassFragmentDensityMapOffsetEndInfoQCOM const & subpassFragmentDensityMapOffsetEndInfoQCOM ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, subpassFragmentDensityMapOffsetEndInfoQCOM.sType ); VULKAN_HPP_HASH_COMBINE( seed, subpassFragmentDensityMapOffsetEndInfoQCOM.pNext ); VULKAN_HPP_HASH_COMBINE( seed, subpassFragmentDensityMapOffsetEndInfoQCOM.fragmentDensityOffsetCount ); VULKAN_HPP_HASH_COMBINE( seed, subpassFragmentDensityMapOffsetEndInfoQCOM.pFragmentDensityOffsets ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::SubpassResolvePerformanceQueryEXT const & subpassResolvePerformanceQueryEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, subpassResolvePerformanceQueryEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, subpassResolvePerformanceQueryEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, subpassResolvePerformanceQueryEXT.optimal ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::SubpassShadingPipelineCreateInfoHUAWEI const & subpassShadingPipelineCreateInfoHUAWEI ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, subpassShadingPipelineCreateInfoHUAWEI.sType ); VULKAN_HPP_HASH_COMBINE( seed, subpassShadingPipelineCreateInfoHUAWEI.pNext ); VULKAN_HPP_HASH_COMBINE( seed, subpassShadingPipelineCreateInfoHUAWEI.renderPass ); VULKAN_HPP_HASH_COMBINE( seed, subpassShadingPipelineCreateInfoHUAWEI.subpass ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::SubresourceHostMemcpySize const & subresourceHostMemcpySize ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, subresourceHostMemcpySize.sType ); VULKAN_HPP_HASH_COMBINE( seed, subresourceHostMemcpySize.pNext ); VULKAN_HPP_HASH_COMBINE( seed, subresourceHostMemcpySize.size ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::SubresourceLayout2 const & subresourceLayout2 ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, subresourceLayout2.sType ); VULKAN_HPP_HASH_COMBINE( seed, subresourceLayout2.pNext ); VULKAN_HPP_HASH_COMBINE( seed, subresourceLayout2.subresourceLayout ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::SurfaceCapabilities2EXT const & surfaceCapabilities2EXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, surfaceCapabilities2EXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, surfaceCapabilities2EXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, surfaceCapabilities2EXT.minImageCount ); VULKAN_HPP_HASH_COMBINE( seed, surfaceCapabilities2EXT.maxImageCount ); VULKAN_HPP_HASH_COMBINE( seed, surfaceCapabilities2EXT.currentExtent ); VULKAN_HPP_HASH_COMBINE( seed, surfaceCapabilities2EXT.minImageExtent ); VULKAN_HPP_HASH_COMBINE( seed, surfaceCapabilities2EXT.maxImageExtent ); VULKAN_HPP_HASH_COMBINE( seed, surfaceCapabilities2EXT.maxImageArrayLayers ); VULKAN_HPP_HASH_COMBINE( seed, surfaceCapabilities2EXT.supportedTransforms ); VULKAN_HPP_HASH_COMBINE( seed, surfaceCapabilities2EXT.currentTransform ); VULKAN_HPP_HASH_COMBINE( seed, surfaceCapabilities2EXT.supportedCompositeAlpha ); VULKAN_HPP_HASH_COMBINE( seed, surfaceCapabilities2EXT.supportedUsageFlags ); VULKAN_HPP_HASH_COMBINE( seed, surfaceCapabilities2EXT.supportedSurfaceCounters ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::SurfaceCapabilitiesKHR const & surfaceCapabilitiesKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, surfaceCapabilitiesKHR.minImageCount ); VULKAN_HPP_HASH_COMBINE( seed, surfaceCapabilitiesKHR.maxImageCount ); VULKAN_HPP_HASH_COMBINE( seed, surfaceCapabilitiesKHR.currentExtent ); VULKAN_HPP_HASH_COMBINE( seed, surfaceCapabilitiesKHR.minImageExtent ); VULKAN_HPP_HASH_COMBINE( seed, surfaceCapabilitiesKHR.maxImageExtent ); VULKAN_HPP_HASH_COMBINE( seed, surfaceCapabilitiesKHR.maxImageArrayLayers ); VULKAN_HPP_HASH_COMBINE( seed, surfaceCapabilitiesKHR.supportedTransforms ); VULKAN_HPP_HASH_COMBINE( seed, surfaceCapabilitiesKHR.currentTransform ); VULKAN_HPP_HASH_COMBINE( seed, surfaceCapabilitiesKHR.supportedCompositeAlpha ); VULKAN_HPP_HASH_COMBINE( seed, surfaceCapabilitiesKHR.supportedUsageFlags ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::SurfaceCapabilities2KHR const & surfaceCapabilities2KHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, surfaceCapabilities2KHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, surfaceCapabilities2KHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, surfaceCapabilities2KHR.surfaceCapabilities ); return seed; } }; # if defined( VK_USE_PLATFORM_WIN32_KHR ) template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::SurfaceCapabilitiesFullScreenExclusiveEXT const & surfaceCapabilitiesFullScreenExclusiveEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, surfaceCapabilitiesFullScreenExclusiveEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, surfaceCapabilitiesFullScreenExclusiveEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, surfaceCapabilitiesFullScreenExclusiveEXT.fullScreenExclusiveSupported ); return seed; } }; # endif /*VK_USE_PLATFORM_WIN32_KHR*/ template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::SurfaceCapabilitiesPresentBarrierNV const & surfaceCapabilitiesPresentBarrierNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, surfaceCapabilitiesPresentBarrierNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, surfaceCapabilitiesPresentBarrierNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, surfaceCapabilitiesPresentBarrierNV.presentBarrierSupported ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::SurfaceFormatKHR const & surfaceFormatKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, surfaceFormatKHR.format ); VULKAN_HPP_HASH_COMBINE( seed, surfaceFormatKHR.colorSpace ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::SurfaceFormat2KHR const & surfaceFormat2KHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, surfaceFormat2KHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, surfaceFormat2KHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, surfaceFormat2KHR.surfaceFormat ); return seed; } }; # if defined( VK_USE_PLATFORM_WIN32_KHR ) template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::SurfaceFullScreenExclusiveInfoEXT const & surfaceFullScreenExclusiveInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, surfaceFullScreenExclusiveInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, surfaceFullScreenExclusiveInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, surfaceFullScreenExclusiveInfoEXT.fullScreenExclusive ); return seed; } }; # endif /*VK_USE_PLATFORM_WIN32_KHR*/ # if defined( VK_USE_PLATFORM_WIN32_KHR ) template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::SurfaceFullScreenExclusiveWin32InfoEXT const & surfaceFullScreenExclusiveWin32InfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, surfaceFullScreenExclusiveWin32InfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, surfaceFullScreenExclusiveWin32InfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, surfaceFullScreenExclusiveWin32InfoEXT.hmonitor ); return seed; } }; # endif /*VK_USE_PLATFORM_WIN32_KHR*/ template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::SurfacePresentModeCompatibilityEXT const & surfacePresentModeCompatibilityEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, surfacePresentModeCompatibilityEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, surfacePresentModeCompatibilityEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, surfacePresentModeCompatibilityEXT.presentModeCount ); VULKAN_HPP_HASH_COMBINE( seed, surfacePresentModeCompatibilityEXT.pPresentModes ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::SurfacePresentModeEXT const & surfacePresentModeEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, surfacePresentModeEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, surfacePresentModeEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, surfacePresentModeEXT.presentMode ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::SurfacePresentScalingCapabilitiesEXT const & surfacePresentScalingCapabilitiesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, surfacePresentScalingCapabilitiesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, surfacePresentScalingCapabilitiesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, surfacePresentScalingCapabilitiesEXT.supportedPresentScaling ); VULKAN_HPP_HASH_COMBINE( seed, surfacePresentScalingCapabilitiesEXT.supportedPresentGravityX ); VULKAN_HPP_HASH_COMBINE( seed, surfacePresentScalingCapabilitiesEXT.supportedPresentGravityY ); VULKAN_HPP_HASH_COMBINE( seed, surfacePresentScalingCapabilitiesEXT.minScaledImageExtent ); VULKAN_HPP_HASH_COMBINE( seed, surfacePresentScalingCapabilitiesEXT.maxScaledImageExtent ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::SurfaceProtectedCapabilitiesKHR const & surfaceProtectedCapabilitiesKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, surfaceProtectedCapabilitiesKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, surfaceProtectedCapabilitiesKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, surfaceProtectedCapabilitiesKHR.supportsProtected ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::SwapchainCounterCreateInfoEXT const & swapchainCounterCreateInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, swapchainCounterCreateInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, swapchainCounterCreateInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, swapchainCounterCreateInfoEXT.surfaceCounters ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::SwapchainCreateInfoKHR const & swapchainCreateInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, swapchainCreateInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, swapchainCreateInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, swapchainCreateInfoKHR.flags ); VULKAN_HPP_HASH_COMBINE( seed, swapchainCreateInfoKHR.surface ); VULKAN_HPP_HASH_COMBINE( seed, swapchainCreateInfoKHR.minImageCount ); VULKAN_HPP_HASH_COMBINE( seed, swapchainCreateInfoKHR.imageFormat ); VULKAN_HPP_HASH_COMBINE( seed, swapchainCreateInfoKHR.imageColorSpace ); VULKAN_HPP_HASH_COMBINE( seed, swapchainCreateInfoKHR.imageExtent ); VULKAN_HPP_HASH_COMBINE( seed, swapchainCreateInfoKHR.imageArrayLayers ); VULKAN_HPP_HASH_COMBINE( seed, swapchainCreateInfoKHR.imageUsage ); VULKAN_HPP_HASH_COMBINE( seed, swapchainCreateInfoKHR.imageSharingMode ); VULKAN_HPP_HASH_COMBINE( seed, swapchainCreateInfoKHR.queueFamilyIndexCount ); VULKAN_HPP_HASH_COMBINE( seed, swapchainCreateInfoKHR.pQueueFamilyIndices ); VULKAN_HPP_HASH_COMBINE( seed, swapchainCreateInfoKHR.preTransform ); VULKAN_HPP_HASH_COMBINE( seed, swapchainCreateInfoKHR.compositeAlpha ); VULKAN_HPP_HASH_COMBINE( seed, swapchainCreateInfoKHR.presentMode ); VULKAN_HPP_HASH_COMBINE( seed, swapchainCreateInfoKHR.clipped ); VULKAN_HPP_HASH_COMBINE( seed, swapchainCreateInfoKHR.oldSwapchain ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::SwapchainDisplayNativeHdrCreateInfoAMD const & swapchainDisplayNativeHdrCreateInfoAMD ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, swapchainDisplayNativeHdrCreateInfoAMD.sType ); VULKAN_HPP_HASH_COMBINE( seed, swapchainDisplayNativeHdrCreateInfoAMD.pNext ); VULKAN_HPP_HASH_COMBINE( seed, swapchainDisplayNativeHdrCreateInfoAMD.localDimmingEnable ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::SwapchainLatencyCreateInfoNV const & swapchainLatencyCreateInfoNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, swapchainLatencyCreateInfoNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, swapchainLatencyCreateInfoNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, swapchainLatencyCreateInfoNV.latencyModeEnable ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::SwapchainPresentBarrierCreateInfoNV const & swapchainPresentBarrierCreateInfoNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, swapchainPresentBarrierCreateInfoNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, swapchainPresentBarrierCreateInfoNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, swapchainPresentBarrierCreateInfoNV.presentBarrierEnable ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::SwapchainPresentFenceInfoEXT const & swapchainPresentFenceInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, swapchainPresentFenceInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, swapchainPresentFenceInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, swapchainPresentFenceInfoEXT.swapchainCount ); VULKAN_HPP_HASH_COMBINE( seed, swapchainPresentFenceInfoEXT.pFences ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::SwapchainPresentModeInfoEXT const & swapchainPresentModeInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, swapchainPresentModeInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, swapchainPresentModeInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, swapchainPresentModeInfoEXT.swapchainCount ); VULKAN_HPP_HASH_COMBINE( seed, swapchainPresentModeInfoEXT.pPresentModes ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::SwapchainPresentModesCreateInfoEXT const & swapchainPresentModesCreateInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, swapchainPresentModesCreateInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, swapchainPresentModesCreateInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, swapchainPresentModesCreateInfoEXT.presentModeCount ); VULKAN_HPP_HASH_COMBINE( seed, swapchainPresentModesCreateInfoEXT.pPresentModes ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::SwapchainPresentScalingCreateInfoEXT const & swapchainPresentScalingCreateInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, swapchainPresentScalingCreateInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, swapchainPresentScalingCreateInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, swapchainPresentScalingCreateInfoEXT.scalingBehavior ); VULKAN_HPP_HASH_COMBINE( seed, swapchainPresentScalingCreateInfoEXT.presentGravityX ); VULKAN_HPP_HASH_COMBINE( seed, swapchainPresentScalingCreateInfoEXT.presentGravityY ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::TextureLODGatherFormatPropertiesAMD const & textureLODGatherFormatPropertiesAMD ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, textureLODGatherFormatPropertiesAMD.sType ); VULKAN_HPP_HASH_COMBINE( seed, textureLODGatherFormatPropertiesAMD.pNext ); VULKAN_HPP_HASH_COMBINE( seed, textureLODGatherFormatPropertiesAMD.supportsTextureGatherLODBiasAMD ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::TilePropertiesQCOM const & tilePropertiesQCOM ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, tilePropertiesQCOM.sType ); VULKAN_HPP_HASH_COMBINE( seed, tilePropertiesQCOM.pNext ); VULKAN_HPP_HASH_COMBINE( seed, tilePropertiesQCOM.tileSize ); VULKAN_HPP_HASH_COMBINE( seed, tilePropertiesQCOM.apronSize ); VULKAN_HPP_HASH_COMBINE( seed, tilePropertiesQCOM.origin ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::TimelineSemaphoreSubmitInfo const & timelineSemaphoreSubmitInfo ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, timelineSemaphoreSubmitInfo.sType ); VULKAN_HPP_HASH_COMBINE( seed, timelineSemaphoreSubmitInfo.pNext ); VULKAN_HPP_HASH_COMBINE( seed, timelineSemaphoreSubmitInfo.waitSemaphoreValueCount ); VULKAN_HPP_HASH_COMBINE( seed, timelineSemaphoreSubmitInfo.pWaitSemaphoreValues ); VULKAN_HPP_HASH_COMBINE( seed, timelineSemaphoreSubmitInfo.signalSemaphoreValueCount ); VULKAN_HPP_HASH_COMBINE( seed, timelineSemaphoreSubmitInfo.pSignalSemaphoreValues ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::TraceRaysIndirectCommand2KHR const & traceRaysIndirectCommand2KHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, traceRaysIndirectCommand2KHR.raygenShaderRecordAddress ); VULKAN_HPP_HASH_COMBINE( seed, traceRaysIndirectCommand2KHR.raygenShaderRecordSize ); VULKAN_HPP_HASH_COMBINE( seed, traceRaysIndirectCommand2KHR.missShaderBindingTableAddress ); VULKAN_HPP_HASH_COMBINE( seed, traceRaysIndirectCommand2KHR.missShaderBindingTableSize ); VULKAN_HPP_HASH_COMBINE( seed, traceRaysIndirectCommand2KHR.missShaderBindingTableStride ); VULKAN_HPP_HASH_COMBINE( seed, traceRaysIndirectCommand2KHR.hitShaderBindingTableAddress ); VULKAN_HPP_HASH_COMBINE( seed, traceRaysIndirectCommand2KHR.hitShaderBindingTableSize ); VULKAN_HPP_HASH_COMBINE( seed, traceRaysIndirectCommand2KHR.hitShaderBindingTableStride ); VULKAN_HPP_HASH_COMBINE( seed, traceRaysIndirectCommand2KHR.callableShaderBindingTableAddress ); VULKAN_HPP_HASH_COMBINE( seed, traceRaysIndirectCommand2KHR.callableShaderBindingTableSize ); VULKAN_HPP_HASH_COMBINE( seed, traceRaysIndirectCommand2KHR.callableShaderBindingTableStride ); VULKAN_HPP_HASH_COMBINE( seed, traceRaysIndirectCommand2KHR.width ); VULKAN_HPP_HASH_COMBINE( seed, traceRaysIndirectCommand2KHR.height ); VULKAN_HPP_HASH_COMBINE( seed, traceRaysIndirectCommand2KHR.depth ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::TraceRaysIndirectCommandKHR const & traceRaysIndirectCommandKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, traceRaysIndirectCommandKHR.width ); VULKAN_HPP_HASH_COMBINE( seed, traceRaysIndirectCommandKHR.height ); VULKAN_HPP_HASH_COMBINE( seed, traceRaysIndirectCommandKHR.depth ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ValidationCacheCreateInfoEXT const & validationCacheCreateInfoEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, validationCacheCreateInfoEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, validationCacheCreateInfoEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, validationCacheCreateInfoEXT.flags ); VULKAN_HPP_HASH_COMBINE( seed, validationCacheCreateInfoEXT.initialDataSize ); VULKAN_HPP_HASH_COMBINE( seed, validationCacheCreateInfoEXT.pInitialData ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ValidationFeaturesEXT const & validationFeaturesEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, validationFeaturesEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, validationFeaturesEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, validationFeaturesEXT.enabledValidationFeatureCount ); VULKAN_HPP_HASH_COMBINE( seed, validationFeaturesEXT.pEnabledValidationFeatures ); VULKAN_HPP_HASH_COMBINE( seed, validationFeaturesEXT.disabledValidationFeatureCount ); VULKAN_HPP_HASH_COMBINE( seed, validationFeaturesEXT.pDisabledValidationFeatures ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ValidationFlagsEXT const & validationFlagsEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, validationFlagsEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, validationFlagsEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, validationFlagsEXT.disabledValidationCheckCount ); VULKAN_HPP_HASH_COMBINE( seed, validationFlagsEXT.pDisabledValidationChecks ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VertexInputAttributeDescription2EXT const & vertexInputAttributeDescription2EXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, vertexInputAttributeDescription2EXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, vertexInputAttributeDescription2EXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, vertexInputAttributeDescription2EXT.location ); VULKAN_HPP_HASH_COMBINE( seed, vertexInputAttributeDescription2EXT.binding ); VULKAN_HPP_HASH_COMBINE( seed, vertexInputAttributeDescription2EXT.format ); VULKAN_HPP_HASH_COMBINE( seed, vertexInputAttributeDescription2EXT.offset ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VertexInputBindingDescription2EXT const & vertexInputBindingDescription2EXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, vertexInputBindingDescription2EXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, vertexInputBindingDescription2EXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, vertexInputBindingDescription2EXT.binding ); VULKAN_HPP_HASH_COMBINE( seed, vertexInputBindingDescription2EXT.stride ); VULKAN_HPP_HASH_COMBINE( seed, vertexInputBindingDescription2EXT.inputRate ); VULKAN_HPP_HASH_COMBINE( seed, vertexInputBindingDescription2EXT.divisor ); return seed; } }; # if defined( VK_USE_PLATFORM_VI_NN ) template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::ViSurfaceCreateInfoNN const & viSurfaceCreateInfoNN ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, viSurfaceCreateInfoNN.sType ); VULKAN_HPP_HASH_COMBINE( seed, viSurfaceCreateInfoNN.pNext ); VULKAN_HPP_HASH_COMBINE( seed, viSurfaceCreateInfoNN.flags ); VULKAN_HPP_HASH_COMBINE( seed, viSurfaceCreateInfoNN.window ); return seed; } }; # endif /*VK_USE_PLATFORM_VI_NN*/ template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoPictureResourceInfoKHR const & videoPictureResourceInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoPictureResourceInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoPictureResourceInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoPictureResourceInfoKHR.codedOffset ); VULKAN_HPP_HASH_COMBINE( seed, videoPictureResourceInfoKHR.codedExtent ); VULKAN_HPP_HASH_COMBINE( seed, videoPictureResourceInfoKHR.baseArrayLayer ); VULKAN_HPP_HASH_COMBINE( seed, videoPictureResourceInfoKHR.imageViewBinding ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoReferenceSlotInfoKHR const & videoReferenceSlotInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoReferenceSlotInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoReferenceSlotInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoReferenceSlotInfoKHR.slotIndex ); VULKAN_HPP_HASH_COMBINE( seed, videoReferenceSlotInfoKHR.pPictureResource ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoBeginCodingInfoKHR const & videoBeginCodingInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoBeginCodingInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoBeginCodingInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoBeginCodingInfoKHR.flags ); VULKAN_HPP_HASH_COMBINE( seed, videoBeginCodingInfoKHR.videoSession ); VULKAN_HPP_HASH_COMBINE( seed, videoBeginCodingInfoKHR.videoSessionParameters ); VULKAN_HPP_HASH_COMBINE( seed, videoBeginCodingInfoKHR.referenceSlotCount ); VULKAN_HPP_HASH_COMBINE( seed, videoBeginCodingInfoKHR.pReferenceSlots ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoCapabilitiesKHR const & videoCapabilitiesKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoCapabilitiesKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoCapabilitiesKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoCapabilitiesKHR.flags ); VULKAN_HPP_HASH_COMBINE( seed, videoCapabilitiesKHR.minBitstreamBufferOffsetAlignment ); VULKAN_HPP_HASH_COMBINE( seed, videoCapabilitiesKHR.minBitstreamBufferSizeAlignment ); VULKAN_HPP_HASH_COMBINE( seed, videoCapabilitiesKHR.pictureAccessGranularity ); VULKAN_HPP_HASH_COMBINE( seed, videoCapabilitiesKHR.minCodedExtent ); VULKAN_HPP_HASH_COMBINE( seed, videoCapabilitiesKHR.maxCodedExtent ); VULKAN_HPP_HASH_COMBINE( seed, videoCapabilitiesKHR.maxDpbSlots ); VULKAN_HPP_HASH_COMBINE( seed, videoCapabilitiesKHR.maxActiveReferencePictures ); VULKAN_HPP_HASH_COMBINE( seed, videoCapabilitiesKHR.stdHeaderVersion ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoCodingControlInfoKHR const & videoCodingControlInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoCodingControlInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoCodingControlInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoCodingControlInfoKHR.flags ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoDecodeAV1CapabilitiesKHR const & videoDecodeAV1CapabilitiesKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoDecodeAV1CapabilitiesKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoDecodeAV1CapabilitiesKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoDecodeAV1CapabilitiesKHR.maxLevel ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoDecodeAV1DpbSlotInfoKHR const & videoDecodeAV1DpbSlotInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoDecodeAV1DpbSlotInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoDecodeAV1DpbSlotInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoDecodeAV1DpbSlotInfoKHR.pStdReferenceInfo ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoDecodeAV1InlineSessionParametersInfoKHR const & videoDecodeAV1InlineSessionParametersInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoDecodeAV1InlineSessionParametersInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoDecodeAV1InlineSessionParametersInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoDecodeAV1InlineSessionParametersInfoKHR.pStdSequenceHeader ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoDecodeAV1PictureInfoKHR const & videoDecodeAV1PictureInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoDecodeAV1PictureInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoDecodeAV1PictureInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoDecodeAV1PictureInfoKHR.pStdPictureInfo ); for ( size_t i = 0; i < VK_MAX_VIDEO_AV1_REFERENCES_PER_FRAME_KHR; ++i ) { VULKAN_HPP_HASH_COMBINE( seed, videoDecodeAV1PictureInfoKHR.referenceNameSlotIndices[i] ); } VULKAN_HPP_HASH_COMBINE( seed, videoDecodeAV1PictureInfoKHR.frameHeaderOffset ); VULKAN_HPP_HASH_COMBINE( seed, videoDecodeAV1PictureInfoKHR.tileCount ); VULKAN_HPP_HASH_COMBINE( seed, videoDecodeAV1PictureInfoKHR.pTileOffsets ); VULKAN_HPP_HASH_COMBINE( seed, videoDecodeAV1PictureInfoKHR.pTileSizes ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoDecodeAV1ProfileInfoKHR const & videoDecodeAV1ProfileInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoDecodeAV1ProfileInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoDecodeAV1ProfileInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoDecodeAV1ProfileInfoKHR.stdProfile ); VULKAN_HPP_HASH_COMBINE( seed, videoDecodeAV1ProfileInfoKHR.filmGrainSupport ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoDecodeAV1SessionParametersCreateInfoKHR const & videoDecodeAV1SessionParametersCreateInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoDecodeAV1SessionParametersCreateInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoDecodeAV1SessionParametersCreateInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoDecodeAV1SessionParametersCreateInfoKHR.pStdSequenceHeader ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoDecodeCapabilitiesKHR const & videoDecodeCapabilitiesKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoDecodeCapabilitiesKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoDecodeCapabilitiesKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoDecodeCapabilitiesKHR.flags ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoDecodeH264CapabilitiesKHR const & videoDecodeH264CapabilitiesKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH264CapabilitiesKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH264CapabilitiesKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH264CapabilitiesKHR.maxLevelIdc ); VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH264CapabilitiesKHR.fieldOffsetGranularity ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoDecodeH264DpbSlotInfoKHR const & videoDecodeH264DpbSlotInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH264DpbSlotInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH264DpbSlotInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH264DpbSlotInfoKHR.pStdReferenceInfo ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoDecodeH264InlineSessionParametersInfoKHR const & videoDecodeH264InlineSessionParametersInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH264InlineSessionParametersInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH264InlineSessionParametersInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH264InlineSessionParametersInfoKHR.pStdSPS ); VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH264InlineSessionParametersInfoKHR.pStdPPS ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoDecodeH264PictureInfoKHR const & videoDecodeH264PictureInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH264PictureInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH264PictureInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH264PictureInfoKHR.pStdPictureInfo ); VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH264PictureInfoKHR.sliceCount ); VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH264PictureInfoKHR.pSliceOffsets ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoDecodeH264ProfileInfoKHR const & videoDecodeH264ProfileInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH264ProfileInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH264ProfileInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH264ProfileInfoKHR.stdProfileIdc ); VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH264ProfileInfoKHR.pictureLayout ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoDecodeH264SessionParametersAddInfoKHR const & videoDecodeH264SessionParametersAddInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH264SessionParametersAddInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH264SessionParametersAddInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH264SessionParametersAddInfoKHR.stdSPSCount ); VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH264SessionParametersAddInfoKHR.pStdSPSs ); VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH264SessionParametersAddInfoKHR.stdPPSCount ); VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH264SessionParametersAddInfoKHR.pStdPPSs ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoDecodeH264SessionParametersCreateInfoKHR const & videoDecodeH264SessionParametersCreateInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH264SessionParametersCreateInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH264SessionParametersCreateInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH264SessionParametersCreateInfoKHR.maxStdSPSCount ); VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH264SessionParametersCreateInfoKHR.maxStdPPSCount ); VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH264SessionParametersCreateInfoKHR.pParametersAddInfo ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoDecodeH265CapabilitiesKHR const & videoDecodeH265CapabilitiesKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH265CapabilitiesKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH265CapabilitiesKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH265CapabilitiesKHR.maxLevelIdc ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoDecodeH265DpbSlotInfoKHR const & videoDecodeH265DpbSlotInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH265DpbSlotInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH265DpbSlotInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH265DpbSlotInfoKHR.pStdReferenceInfo ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoDecodeH265InlineSessionParametersInfoKHR const & videoDecodeH265InlineSessionParametersInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH265InlineSessionParametersInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH265InlineSessionParametersInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH265InlineSessionParametersInfoKHR.pStdVPS ); VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH265InlineSessionParametersInfoKHR.pStdSPS ); VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH265InlineSessionParametersInfoKHR.pStdPPS ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoDecodeH265PictureInfoKHR const & videoDecodeH265PictureInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH265PictureInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH265PictureInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH265PictureInfoKHR.pStdPictureInfo ); VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH265PictureInfoKHR.sliceSegmentCount ); VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH265PictureInfoKHR.pSliceSegmentOffsets ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoDecodeH265ProfileInfoKHR const & videoDecodeH265ProfileInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH265ProfileInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH265ProfileInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH265ProfileInfoKHR.stdProfileIdc ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoDecodeH265SessionParametersAddInfoKHR const & videoDecodeH265SessionParametersAddInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH265SessionParametersAddInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH265SessionParametersAddInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH265SessionParametersAddInfoKHR.stdVPSCount ); VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH265SessionParametersAddInfoKHR.pStdVPSs ); VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH265SessionParametersAddInfoKHR.stdSPSCount ); VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH265SessionParametersAddInfoKHR.pStdSPSs ); VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH265SessionParametersAddInfoKHR.stdPPSCount ); VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH265SessionParametersAddInfoKHR.pStdPPSs ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoDecodeH265SessionParametersCreateInfoKHR const & videoDecodeH265SessionParametersCreateInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH265SessionParametersCreateInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH265SessionParametersCreateInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH265SessionParametersCreateInfoKHR.maxStdVPSCount ); VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH265SessionParametersCreateInfoKHR.maxStdSPSCount ); VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH265SessionParametersCreateInfoKHR.maxStdPPSCount ); VULKAN_HPP_HASH_COMBINE( seed, videoDecodeH265SessionParametersCreateInfoKHR.pParametersAddInfo ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoDecodeInfoKHR const & videoDecodeInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoDecodeInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoDecodeInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoDecodeInfoKHR.flags ); VULKAN_HPP_HASH_COMBINE( seed, videoDecodeInfoKHR.srcBuffer ); VULKAN_HPP_HASH_COMBINE( seed, videoDecodeInfoKHR.srcBufferOffset ); VULKAN_HPP_HASH_COMBINE( seed, videoDecodeInfoKHR.srcBufferRange ); VULKAN_HPP_HASH_COMBINE( seed, videoDecodeInfoKHR.dstPictureResource ); VULKAN_HPP_HASH_COMBINE( seed, videoDecodeInfoKHR.pSetupReferenceSlot ); VULKAN_HPP_HASH_COMBINE( seed, videoDecodeInfoKHR.referenceSlotCount ); VULKAN_HPP_HASH_COMBINE( seed, videoDecodeInfoKHR.pReferenceSlots ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoDecodeUsageInfoKHR const & videoDecodeUsageInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoDecodeUsageInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoDecodeUsageInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoDecodeUsageInfoKHR.videoUsageHints ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoEncodeAV1CapabilitiesKHR const & videoEncodeAV1CapabilitiesKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1CapabilitiesKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1CapabilitiesKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1CapabilitiesKHR.flags ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1CapabilitiesKHR.maxLevel ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1CapabilitiesKHR.codedPictureAlignment ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1CapabilitiesKHR.maxTiles ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1CapabilitiesKHR.minTileSize ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1CapabilitiesKHR.maxTileSize ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1CapabilitiesKHR.superblockSizes ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1CapabilitiesKHR.maxSingleReferenceCount ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1CapabilitiesKHR.singleReferenceNameMask ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1CapabilitiesKHR.maxUnidirectionalCompoundReferenceCount ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1CapabilitiesKHR.maxUnidirectionalCompoundGroup1ReferenceCount ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1CapabilitiesKHR.unidirectionalCompoundReferenceNameMask ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1CapabilitiesKHR.maxBidirectionalCompoundReferenceCount ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1CapabilitiesKHR.maxBidirectionalCompoundGroup1ReferenceCount ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1CapabilitiesKHR.maxBidirectionalCompoundGroup2ReferenceCount ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1CapabilitiesKHR.bidirectionalCompoundReferenceNameMask ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1CapabilitiesKHR.maxTemporalLayerCount ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1CapabilitiesKHR.maxSpatialLayerCount ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1CapabilitiesKHR.maxOperatingPoints ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1CapabilitiesKHR.minQIndex ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1CapabilitiesKHR.maxQIndex ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1CapabilitiesKHR.prefersGopRemainingFrames ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1CapabilitiesKHR.requiresGopRemainingFrames ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1CapabilitiesKHR.stdSyntaxFlags ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoEncodeAV1DpbSlotInfoKHR const & videoEncodeAV1DpbSlotInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1DpbSlotInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1DpbSlotInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1DpbSlotInfoKHR.pStdReferenceInfo ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoEncodeAV1FrameSizeKHR const & videoEncodeAV1FrameSizeKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1FrameSizeKHR.intraFrameSize ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1FrameSizeKHR.predictiveFrameSize ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1FrameSizeKHR.bipredictiveFrameSize ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoEncodeAV1GopRemainingFrameInfoKHR const & videoEncodeAV1GopRemainingFrameInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1GopRemainingFrameInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1GopRemainingFrameInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1GopRemainingFrameInfoKHR.useGopRemainingFrames ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1GopRemainingFrameInfoKHR.gopRemainingIntra ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1GopRemainingFrameInfoKHR.gopRemainingPredictive ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1GopRemainingFrameInfoKHR.gopRemainingBipredictive ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoEncodeAV1PictureInfoKHR const & videoEncodeAV1PictureInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1PictureInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1PictureInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1PictureInfoKHR.predictionMode ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1PictureInfoKHR.rateControlGroup ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1PictureInfoKHR.constantQIndex ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1PictureInfoKHR.pStdPictureInfo ); for ( size_t i = 0; i < VK_MAX_VIDEO_AV1_REFERENCES_PER_FRAME_KHR; ++i ) { VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1PictureInfoKHR.referenceNameSlotIndices[i] ); } VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1PictureInfoKHR.primaryReferenceCdfOnly ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1PictureInfoKHR.generateObuExtensionHeader ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoEncodeAV1ProfileInfoKHR const & videoEncodeAV1ProfileInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1ProfileInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1ProfileInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1ProfileInfoKHR.stdProfile ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoEncodeAV1QIndexKHR const & videoEncodeAV1QIndexKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1QIndexKHR.intraQIndex ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1QIndexKHR.predictiveQIndex ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1QIndexKHR.bipredictiveQIndex ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoEncodeAV1QualityLevelPropertiesKHR const & videoEncodeAV1QualityLevelPropertiesKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1QualityLevelPropertiesKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1QualityLevelPropertiesKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1QualityLevelPropertiesKHR.preferredRateControlFlags ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1QualityLevelPropertiesKHR.preferredGopFrameCount ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1QualityLevelPropertiesKHR.preferredKeyFramePeriod ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1QualityLevelPropertiesKHR.preferredConsecutiveBipredictiveFrameCount ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1QualityLevelPropertiesKHR.preferredTemporalLayerCount ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1QualityLevelPropertiesKHR.preferredConstantQIndex ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1QualityLevelPropertiesKHR.preferredMaxSingleReferenceCount ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1QualityLevelPropertiesKHR.preferredSingleReferenceNameMask ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1QualityLevelPropertiesKHR.preferredMaxUnidirectionalCompoundReferenceCount ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1QualityLevelPropertiesKHR.preferredMaxUnidirectionalCompoundGroup1ReferenceCount ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1QualityLevelPropertiesKHR.preferredUnidirectionalCompoundReferenceNameMask ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1QualityLevelPropertiesKHR.preferredMaxBidirectionalCompoundReferenceCount ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1QualityLevelPropertiesKHR.preferredMaxBidirectionalCompoundGroup1ReferenceCount ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1QualityLevelPropertiesKHR.preferredMaxBidirectionalCompoundGroup2ReferenceCount ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1QualityLevelPropertiesKHR.preferredBidirectionalCompoundReferenceNameMask ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoEncodeAV1QuantizationMapCapabilitiesKHR const & videoEncodeAV1QuantizationMapCapabilitiesKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1QuantizationMapCapabilitiesKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1QuantizationMapCapabilitiesKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1QuantizationMapCapabilitiesKHR.minQIndexDelta ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1QuantizationMapCapabilitiesKHR.maxQIndexDelta ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoEncodeAV1RateControlInfoKHR const & videoEncodeAV1RateControlInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1RateControlInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1RateControlInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1RateControlInfoKHR.flags ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1RateControlInfoKHR.gopFrameCount ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1RateControlInfoKHR.keyFramePeriod ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1RateControlInfoKHR.consecutiveBipredictiveFrameCount ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1RateControlInfoKHR.temporalLayerCount ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoEncodeAV1RateControlLayerInfoKHR const & videoEncodeAV1RateControlLayerInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1RateControlLayerInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1RateControlLayerInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1RateControlLayerInfoKHR.useMinQIndex ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1RateControlLayerInfoKHR.minQIndex ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1RateControlLayerInfoKHR.useMaxQIndex ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1RateControlLayerInfoKHR.maxQIndex ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1RateControlLayerInfoKHR.useMaxFrameSize ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1RateControlLayerInfoKHR.maxFrameSize ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoEncodeAV1SessionCreateInfoKHR const & videoEncodeAV1SessionCreateInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1SessionCreateInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1SessionCreateInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1SessionCreateInfoKHR.useMaxLevel ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1SessionCreateInfoKHR.maxLevel ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoEncodeAV1SessionParametersCreateInfoKHR const & videoEncodeAV1SessionParametersCreateInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1SessionParametersCreateInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1SessionParametersCreateInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1SessionParametersCreateInfoKHR.pStdSequenceHeader ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1SessionParametersCreateInfoKHR.pStdDecoderModelInfo ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1SessionParametersCreateInfoKHR.stdOperatingPointCount ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeAV1SessionParametersCreateInfoKHR.pStdOperatingPoints ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoEncodeCapabilitiesKHR const & videoEncodeCapabilitiesKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoEncodeCapabilitiesKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeCapabilitiesKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeCapabilitiesKHR.flags ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeCapabilitiesKHR.rateControlModes ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeCapabilitiesKHR.maxRateControlLayers ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeCapabilitiesKHR.maxBitrate ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeCapabilitiesKHR.maxQualityLevels ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeCapabilitiesKHR.encodeInputPictureGranularity ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeCapabilitiesKHR.supportedEncodeFeedbackFlags ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoEncodeH264CapabilitiesKHR const & videoEncodeH264CapabilitiesKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264CapabilitiesKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264CapabilitiesKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264CapabilitiesKHR.flags ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264CapabilitiesKHR.maxLevelIdc ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264CapabilitiesKHR.maxSliceCount ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264CapabilitiesKHR.maxPPictureL0ReferenceCount ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264CapabilitiesKHR.maxBPictureL0ReferenceCount ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264CapabilitiesKHR.maxL1ReferenceCount ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264CapabilitiesKHR.maxTemporalLayerCount ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264CapabilitiesKHR.expectDyadicTemporalLayerPattern ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264CapabilitiesKHR.minQp ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264CapabilitiesKHR.maxQp ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264CapabilitiesKHR.prefersGopRemainingFrames ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264CapabilitiesKHR.requiresGopRemainingFrames ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264CapabilitiesKHR.stdSyntaxFlags ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoEncodeH264DpbSlotInfoKHR const & videoEncodeH264DpbSlotInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264DpbSlotInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264DpbSlotInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264DpbSlotInfoKHR.pStdReferenceInfo ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoEncodeH264FrameSizeKHR const & videoEncodeH264FrameSizeKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264FrameSizeKHR.frameISize ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264FrameSizeKHR.framePSize ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264FrameSizeKHR.frameBSize ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoEncodeH264GopRemainingFrameInfoKHR const & videoEncodeH264GopRemainingFrameInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264GopRemainingFrameInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264GopRemainingFrameInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264GopRemainingFrameInfoKHR.useGopRemainingFrames ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264GopRemainingFrameInfoKHR.gopRemainingI ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264GopRemainingFrameInfoKHR.gopRemainingP ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264GopRemainingFrameInfoKHR.gopRemainingB ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoEncodeH264NaluSliceInfoKHR const & videoEncodeH264NaluSliceInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264NaluSliceInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264NaluSliceInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264NaluSliceInfoKHR.constantQp ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264NaluSliceInfoKHR.pStdSliceHeader ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoEncodeH264PictureInfoKHR const & videoEncodeH264PictureInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264PictureInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264PictureInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264PictureInfoKHR.naluSliceEntryCount ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264PictureInfoKHR.pNaluSliceEntries ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264PictureInfoKHR.pStdPictureInfo ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264PictureInfoKHR.generatePrefixNalu ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoEncodeH264ProfileInfoKHR const & videoEncodeH264ProfileInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264ProfileInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264ProfileInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264ProfileInfoKHR.stdProfileIdc ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoEncodeH264QpKHR const & videoEncodeH264QpKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264QpKHR.qpI ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264QpKHR.qpP ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264QpKHR.qpB ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoEncodeH264QualityLevelPropertiesKHR const & videoEncodeH264QualityLevelPropertiesKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264QualityLevelPropertiesKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264QualityLevelPropertiesKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264QualityLevelPropertiesKHR.preferredRateControlFlags ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264QualityLevelPropertiesKHR.preferredGopFrameCount ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264QualityLevelPropertiesKHR.preferredIdrPeriod ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264QualityLevelPropertiesKHR.preferredConsecutiveBFrameCount ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264QualityLevelPropertiesKHR.preferredTemporalLayerCount ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264QualityLevelPropertiesKHR.preferredConstantQp ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264QualityLevelPropertiesKHR.preferredMaxL0ReferenceCount ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264QualityLevelPropertiesKHR.preferredMaxL1ReferenceCount ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264QualityLevelPropertiesKHR.preferredStdEntropyCodingModeFlag ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoEncodeH264QuantizationMapCapabilitiesKHR const & videoEncodeH264QuantizationMapCapabilitiesKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264QuantizationMapCapabilitiesKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264QuantizationMapCapabilitiesKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264QuantizationMapCapabilitiesKHR.minQpDelta ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264QuantizationMapCapabilitiesKHR.maxQpDelta ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoEncodeH264RateControlInfoKHR const & videoEncodeH264RateControlInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264RateControlInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264RateControlInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264RateControlInfoKHR.flags ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264RateControlInfoKHR.gopFrameCount ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264RateControlInfoKHR.idrPeriod ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264RateControlInfoKHR.consecutiveBFrameCount ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264RateControlInfoKHR.temporalLayerCount ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoEncodeH264RateControlLayerInfoKHR const & videoEncodeH264RateControlLayerInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264RateControlLayerInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264RateControlLayerInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264RateControlLayerInfoKHR.useMinQp ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264RateControlLayerInfoKHR.minQp ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264RateControlLayerInfoKHR.useMaxQp ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264RateControlLayerInfoKHR.maxQp ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264RateControlLayerInfoKHR.useMaxFrameSize ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264RateControlLayerInfoKHR.maxFrameSize ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoEncodeH264SessionCreateInfoKHR const & videoEncodeH264SessionCreateInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264SessionCreateInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264SessionCreateInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264SessionCreateInfoKHR.useMaxLevelIdc ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264SessionCreateInfoKHR.maxLevelIdc ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoEncodeH264SessionParametersAddInfoKHR const & videoEncodeH264SessionParametersAddInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264SessionParametersAddInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264SessionParametersAddInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264SessionParametersAddInfoKHR.stdSPSCount ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264SessionParametersAddInfoKHR.pStdSPSs ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264SessionParametersAddInfoKHR.stdPPSCount ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264SessionParametersAddInfoKHR.pStdPPSs ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoEncodeH264SessionParametersCreateInfoKHR const & videoEncodeH264SessionParametersCreateInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264SessionParametersCreateInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264SessionParametersCreateInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264SessionParametersCreateInfoKHR.maxStdSPSCount ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264SessionParametersCreateInfoKHR.maxStdPPSCount ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264SessionParametersCreateInfoKHR.pParametersAddInfo ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoEncodeH264SessionParametersFeedbackInfoKHR const & videoEncodeH264SessionParametersFeedbackInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264SessionParametersFeedbackInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264SessionParametersFeedbackInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264SessionParametersFeedbackInfoKHR.hasStdSPSOverrides ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264SessionParametersFeedbackInfoKHR.hasStdPPSOverrides ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoEncodeH264SessionParametersGetInfoKHR const & videoEncodeH264SessionParametersGetInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264SessionParametersGetInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264SessionParametersGetInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264SessionParametersGetInfoKHR.writeStdSPS ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264SessionParametersGetInfoKHR.writeStdPPS ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264SessionParametersGetInfoKHR.stdSPSId ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH264SessionParametersGetInfoKHR.stdPPSId ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoEncodeH265CapabilitiesKHR const & videoEncodeH265CapabilitiesKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265CapabilitiesKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265CapabilitiesKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265CapabilitiesKHR.flags ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265CapabilitiesKHR.maxLevelIdc ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265CapabilitiesKHR.maxSliceSegmentCount ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265CapabilitiesKHR.maxTiles ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265CapabilitiesKHR.ctbSizes ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265CapabilitiesKHR.transformBlockSizes ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265CapabilitiesKHR.maxPPictureL0ReferenceCount ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265CapabilitiesKHR.maxBPictureL0ReferenceCount ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265CapabilitiesKHR.maxL1ReferenceCount ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265CapabilitiesKHR.maxSubLayerCount ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265CapabilitiesKHR.expectDyadicTemporalSubLayerPattern ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265CapabilitiesKHR.minQp ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265CapabilitiesKHR.maxQp ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265CapabilitiesKHR.prefersGopRemainingFrames ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265CapabilitiesKHR.requiresGopRemainingFrames ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265CapabilitiesKHR.stdSyntaxFlags ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoEncodeH265DpbSlotInfoKHR const & videoEncodeH265DpbSlotInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265DpbSlotInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265DpbSlotInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265DpbSlotInfoKHR.pStdReferenceInfo ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoEncodeH265FrameSizeKHR const & videoEncodeH265FrameSizeKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265FrameSizeKHR.frameISize ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265FrameSizeKHR.framePSize ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265FrameSizeKHR.frameBSize ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoEncodeH265GopRemainingFrameInfoKHR const & videoEncodeH265GopRemainingFrameInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265GopRemainingFrameInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265GopRemainingFrameInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265GopRemainingFrameInfoKHR.useGopRemainingFrames ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265GopRemainingFrameInfoKHR.gopRemainingI ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265GopRemainingFrameInfoKHR.gopRemainingP ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265GopRemainingFrameInfoKHR.gopRemainingB ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoEncodeH265NaluSliceSegmentInfoKHR const & videoEncodeH265NaluSliceSegmentInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265NaluSliceSegmentInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265NaluSliceSegmentInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265NaluSliceSegmentInfoKHR.constantQp ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265NaluSliceSegmentInfoKHR.pStdSliceSegmentHeader ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoEncodeH265PictureInfoKHR const & videoEncodeH265PictureInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265PictureInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265PictureInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265PictureInfoKHR.naluSliceSegmentEntryCount ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265PictureInfoKHR.pNaluSliceSegmentEntries ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265PictureInfoKHR.pStdPictureInfo ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoEncodeH265ProfileInfoKHR const & videoEncodeH265ProfileInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265ProfileInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265ProfileInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265ProfileInfoKHR.stdProfileIdc ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoEncodeH265QpKHR const & videoEncodeH265QpKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265QpKHR.qpI ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265QpKHR.qpP ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265QpKHR.qpB ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoEncodeH265QualityLevelPropertiesKHR const & videoEncodeH265QualityLevelPropertiesKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265QualityLevelPropertiesKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265QualityLevelPropertiesKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265QualityLevelPropertiesKHR.preferredRateControlFlags ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265QualityLevelPropertiesKHR.preferredGopFrameCount ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265QualityLevelPropertiesKHR.preferredIdrPeriod ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265QualityLevelPropertiesKHR.preferredConsecutiveBFrameCount ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265QualityLevelPropertiesKHR.preferredSubLayerCount ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265QualityLevelPropertiesKHR.preferredConstantQp ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265QualityLevelPropertiesKHR.preferredMaxL0ReferenceCount ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265QualityLevelPropertiesKHR.preferredMaxL1ReferenceCount ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoEncodeH265QuantizationMapCapabilitiesKHR const & videoEncodeH265QuantizationMapCapabilitiesKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265QuantizationMapCapabilitiesKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265QuantizationMapCapabilitiesKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265QuantizationMapCapabilitiesKHR.minQpDelta ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265QuantizationMapCapabilitiesKHR.maxQpDelta ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoEncodeH265RateControlInfoKHR const & videoEncodeH265RateControlInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265RateControlInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265RateControlInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265RateControlInfoKHR.flags ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265RateControlInfoKHR.gopFrameCount ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265RateControlInfoKHR.idrPeriod ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265RateControlInfoKHR.consecutiveBFrameCount ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265RateControlInfoKHR.subLayerCount ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoEncodeH265RateControlLayerInfoKHR const & videoEncodeH265RateControlLayerInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265RateControlLayerInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265RateControlLayerInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265RateControlLayerInfoKHR.useMinQp ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265RateControlLayerInfoKHR.minQp ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265RateControlLayerInfoKHR.useMaxQp ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265RateControlLayerInfoKHR.maxQp ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265RateControlLayerInfoKHR.useMaxFrameSize ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265RateControlLayerInfoKHR.maxFrameSize ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoEncodeH265SessionCreateInfoKHR const & videoEncodeH265SessionCreateInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265SessionCreateInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265SessionCreateInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265SessionCreateInfoKHR.useMaxLevelIdc ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265SessionCreateInfoKHR.maxLevelIdc ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoEncodeH265SessionParametersAddInfoKHR const & videoEncodeH265SessionParametersAddInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265SessionParametersAddInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265SessionParametersAddInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265SessionParametersAddInfoKHR.stdVPSCount ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265SessionParametersAddInfoKHR.pStdVPSs ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265SessionParametersAddInfoKHR.stdSPSCount ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265SessionParametersAddInfoKHR.pStdSPSs ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265SessionParametersAddInfoKHR.stdPPSCount ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265SessionParametersAddInfoKHR.pStdPPSs ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoEncodeH265SessionParametersCreateInfoKHR const & videoEncodeH265SessionParametersCreateInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265SessionParametersCreateInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265SessionParametersCreateInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265SessionParametersCreateInfoKHR.maxStdVPSCount ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265SessionParametersCreateInfoKHR.maxStdSPSCount ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265SessionParametersCreateInfoKHR.maxStdPPSCount ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265SessionParametersCreateInfoKHR.pParametersAddInfo ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoEncodeH265SessionParametersFeedbackInfoKHR const & videoEncodeH265SessionParametersFeedbackInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265SessionParametersFeedbackInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265SessionParametersFeedbackInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265SessionParametersFeedbackInfoKHR.hasStdVPSOverrides ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265SessionParametersFeedbackInfoKHR.hasStdSPSOverrides ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265SessionParametersFeedbackInfoKHR.hasStdPPSOverrides ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoEncodeH265SessionParametersGetInfoKHR const & videoEncodeH265SessionParametersGetInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265SessionParametersGetInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265SessionParametersGetInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265SessionParametersGetInfoKHR.writeStdVPS ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265SessionParametersGetInfoKHR.writeStdSPS ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265SessionParametersGetInfoKHR.writeStdPPS ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265SessionParametersGetInfoKHR.stdVPSId ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265SessionParametersGetInfoKHR.stdSPSId ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeH265SessionParametersGetInfoKHR.stdPPSId ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoEncodeInfoKHR const & videoEncodeInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoEncodeInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeInfoKHR.flags ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeInfoKHR.dstBuffer ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeInfoKHR.dstBufferOffset ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeInfoKHR.dstBufferRange ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeInfoKHR.srcPictureResource ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeInfoKHR.pSetupReferenceSlot ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeInfoKHR.referenceSlotCount ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeInfoKHR.pReferenceSlots ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeInfoKHR.precedingExternallyEncodedBytes ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoEncodeQualityLevelInfoKHR const & videoEncodeQualityLevelInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoEncodeQualityLevelInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeQualityLevelInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeQualityLevelInfoKHR.qualityLevel ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoEncodeQualityLevelPropertiesKHR const & videoEncodeQualityLevelPropertiesKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoEncodeQualityLevelPropertiesKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeQualityLevelPropertiesKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeQualityLevelPropertiesKHR.preferredRateControlMode ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeQualityLevelPropertiesKHR.preferredRateControlLayerCount ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoEncodeQuantizationMapCapabilitiesKHR const & videoEncodeQuantizationMapCapabilitiesKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoEncodeQuantizationMapCapabilitiesKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeQuantizationMapCapabilitiesKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeQuantizationMapCapabilitiesKHR.maxQuantizationMapExtent ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoEncodeQuantizationMapInfoKHR const & videoEncodeQuantizationMapInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoEncodeQuantizationMapInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeQuantizationMapInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeQuantizationMapInfoKHR.quantizationMap ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeQuantizationMapInfoKHR.quantizationMapExtent ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoEncodeQuantizationMapSessionParametersCreateInfoKHR const & videoEncodeQuantizationMapSessionParametersCreateInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoEncodeQuantizationMapSessionParametersCreateInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeQuantizationMapSessionParametersCreateInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeQuantizationMapSessionParametersCreateInfoKHR.quantizationMapTexelSize ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoEncodeRateControlLayerInfoKHR const & videoEncodeRateControlLayerInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoEncodeRateControlLayerInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeRateControlLayerInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeRateControlLayerInfoKHR.averageBitrate ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeRateControlLayerInfoKHR.maxBitrate ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeRateControlLayerInfoKHR.frameRateNumerator ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeRateControlLayerInfoKHR.frameRateDenominator ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoEncodeRateControlInfoKHR const & videoEncodeRateControlInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoEncodeRateControlInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeRateControlInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeRateControlInfoKHR.flags ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeRateControlInfoKHR.rateControlMode ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeRateControlInfoKHR.layerCount ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeRateControlInfoKHR.pLayers ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeRateControlInfoKHR.virtualBufferSizeInMs ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeRateControlInfoKHR.initialVirtualBufferSizeInMs ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoEncodeSessionParametersFeedbackInfoKHR const & videoEncodeSessionParametersFeedbackInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoEncodeSessionParametersFeedbackInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeSessionParametersFeedbackInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeSessionParametersFeedbackInfoKHR.hasOverrides ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoEncodeSessionParametersGetInfoKHR const & videoEncodeSessionParametersGetInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoEncodeSessionParametersGetInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeSessionParametersGetInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeSessionParametersGetInfoKHR.videoSessionParameters ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoEncodeUsageInfoKHR const & videoEncodeUsageInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoEncodeUsageInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeUsageInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeUsageInfoKHR.videoUsageHints ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeUsageInfoKHR.videoContentHints ); VULKAN_HPP_HASH_COMBINE( seed, videoEncodeUsageInfoKHR.tuningMode ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoEndCodingInfoKHR const & videoEndCodingInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoEndCodingInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoEndCodingInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoEndCodingInfoKHR.flags ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoFormatAV1QuantizationMapPropertiesKHR const & videoFormatAV1QuantizationMapPropertiesKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoFormatAV1QuantizationMapPropertiesKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoFormatAV1QuantizationMapPropertiesKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoFormatAV1QuantizationMapPropertiesKHR.compatibleSuperblockSizes ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoFormatH265QuantizationMapPropertiesKHR const & videoFormatH265QuantizationMapPropertiesKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoFormatH265QuantizationMapPropertiesKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoFormatH265QuantizationMapPropertiesKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoFormatH265QuantizationMapPropertiesKHR.compatibleCtbSizes ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoFormatPropertiesKHR const & videoFormatPropertiesKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoFormatPropertiesKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoFormatPropertiesKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoFormatPropertiesKHR.format ); VULKAN_HPP_HASH_COMBINE( seed, videoFormatPropertiesKHR.componentMapping ); VULKAN_HPP_HASH_COMBINE( seed, videoFormatPropertiesKHR.imageCreateFlags ); VULKAN_HPP_HASH_COMBINE( seed, videoFormatPropertiesKHR.imageType ); VULKAN_HPP_HASH_COMBINE( seed, videoFormatPropertiesKHR.imageTiling ); VULKAN_HPP_HASH_COMBINE( seed, videoFormatPropertiesKHR.imageUsageFlags ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoFormatQuantizationMapPropertiesKHR const & videoFormatQuantizationMapPropertiesKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoFormatQuantizationMapPropertiesKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoFormatQuantizationMapPropertiesKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoFormatQuantizationMapPropertiesKHR.quantizationMapTexelSize ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoInlineQueryInfoKHR const & videoInlineQueryInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoInlineQueryInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoInlineQueryInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoInlineQueryInfoKHR.queryPool ); VULKAN_HPP_HASH_COMBINE( seed, videoInlineQueryInfoKHR.firstQuery ); VULKAN_HPP_HASH_COMBINE( seed, videoInlineQueryInfoKHR.queryCount ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoProfileListInfoKHR const & videoProfileListInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoProfileListInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoProfileListInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoProfileListInfoKHR.profileCount ); VULKAN_HPP_HASH_COMBINE( seed, videoProfileListInfoKHR.pProfiles ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoSessionCreateInfoKHR const & videoSessionCreateInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoSessionCreateInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoSessionCreateInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoSessionCreateInfoKHR.queueFamilyIndex ); VULKAN_HPP_HASH_COMBINE( seed, videoSessionCreateInfoKHR.flags ); VULKAN_HPP_HASH_COMBINE( seed, videoSessionCreateInfoKHR.pVideoProfile ); VULKAN_HPP_HASH_COMBINE( seed, videoSessionCreateInfoKHR.pictureFormat ); VULKAN_HPP_HASH_COMBINE( seed, videoSessionCreateInfoKHR.maxCodedExtent ); VULKAN_HPP_HASH_COMBINE( seed, videoSessionCreateInfoKHR.referencePictureFormat ); VULKAN_HPP_HASH_COMBINE( seed, videoSessionCreateInfoKHR.maxDpbSlots ); VULKAN_HPP_HASH_COMBINE( seed, videoSessionCreateInfoKHR.maxActiveReferencePictures ); VULKAN_HPP_HASH_COMBINE( seed, videoSessionCreateInfoKHR.pStdHeaderVersion ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoSessionMemoryRequirementsKHR const & videoSessionMemoryRequirementsKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoSessionMemoryRequirementsKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoSessionMemoryRequirementsKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoSessionMemoryRequirementsKHR.memoryBindIndex ); VULKAN_HPP_HASH_COMBINE( seed, videoSessionMemoryRequirementsKHR.memoryRequirements ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoSessionParametersCreateInfoKHR const & videoSessionParametersCreateInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoSessionParametersCreateInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoSessionParametersCreateInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoSessionParametersCreateInfoKHR.flags ); VULKAN_HPP_HASH_COMBINE( seed, videoSessionParametersCreateInfoKHR.videoSessionParametersTemplate ); VULKAN_HPP_HASH_COMBINE( seed, videoSessionParametersCreateInfoKHR.videoSession ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::VideoSessionParametersUpdateInfoKHR const & videoSessionParametersUpdateInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, videoSessionParametersUpdateInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, videoSessionParametersUpdateInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, videoSessionParametersUpdateInfoKHR.updateSequenceCount ); return seed; } }; # if defined( VK_USE_PLATFORM_WAYLAND_KHR ) template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::WaylandSurfaceCreateInfoKHR const & waylandSurfaceCreateInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, waylandSurfaceCreateInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, waylandSurfaceCreateInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, waylandSurfaceCreateInfoKHR.flags ); VULKAN_HPP_HASH_COMBINE( seed, waylandSurfaceCreateInfoKHR.display ); VULKAN_HPP_HASH_COMBINE( seed, waylandSurfaceCreateInfoKHR.surface ); return seed; } }; # endif /*VK_USE_PLATFORM_WAYLAND_KHR*/ # if defined( VK_USE_PLATFORM_WIN32_KHR ) template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::Win32KeyedMutexAcquireReleaseInfoKHR const & win32KeyedMutexAcquireReleaseInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, win32KeyedMutexAcquireReleaseInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, win32KeyedMutexAcquireReleaseInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, win32KeyedMutexAcquireReleaseInfoKHR.acquireCount ); VULKAN_HPP_HASH_COMBINE( seed, win32KeyedMutexAcquireReleaseInfoKHR.pAcquireSyncs ); VULKAN_HPP_HASH_COMBINE( seed, win32KeyedMutexAcquireReleaseInfoKHR.pAcquireKeys ); VULKAN_HPP_HASH_COMBINE( seed, win32KeyedMutexAcquireReleaseInfoKHR.pAcquireTimeouts ); VULKAN_HPP_HASH_COMBINE( seed, win32KeyedMutexAcquireReleaseInfoKHR.releaseCount ); VULKAN_HPP_HASH_COMBINE( seed, win32KeyedMutexAcquireReleaseInfoKHR.pReleaseSyncs ); VULKAN_HPP_HASH_COMBINE( seed, win32KeyedMutexAcquireReleaseInfoKHR.pReleaseKeys ); return seed; } }; # endif /*VK_USE_PLATFORM_WIN32_KHR*/ # if defined( VK_USE_PLATFORM_WIN32_KHR ) template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::Win32KeyedMutexAcquireReleaseInfoNV const & win32KeyedMutexAcquireReleaseInfoNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, win32KeyedMutexAcquireReleaseInfoNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, win32KeyedMutexAcquireReleaseInfoNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, win32KeyedMutexAcquireReleaseInfoNV.acquireCount ); VULKAN_HPP_HASH_COMBINE( seed, win32KeyedMutexAcquireReleaseInfoNV.pAcquireSyncs ); VULKAN_HPP_HASH_COMBINE( seed, win32KeyedMutexAcquireReleaseInfoNV.pAcquireKeys ); VULKAN_HPP_HASH_COMBINE( seed, win32KeyedMutexAcquireReleaseInfoNV.pAcquireTimeoutMilliseconds ); VULKAN_HPP_HASH_COMBINE( seed, win32KeyedMutexAcquireReleaseInfoNV.releaseCount ); VULKAN_HPP_HASH_COMBINE( seed, win32KeyedMutexAcquireReleaseInfoNV.pReleaseSyncs ); VULKAN_HPP_HASH_COMBINE( seed, win32KeyedMutexAcquireReleaseInfoNV.pReleaseKeys ); return seed; } }; # endif /*VK_USE_PLATFORM_WIN32_KHR*/ # if defined( VK_USE_PLATFORM_WIN32_KHR ) template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::Win32SurfaceCreateInfoKHR const & win32SurfaceCreateInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, win32SurfaceCreateInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, win32SurfaceCreateInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, win32SurfaceCreateInfoKHR.flags ); VULKAN_HPP_HASH_COMBINE( seed, win32SurfaceCreateInfoKHR.hinstance ); VULKAN_HPP_HASH_COMBINE( seed, win32SurfaceCreateInfoKHR.hwnd ); return seed; } }; # endif /*VK_USE_PLATFORM_WIN32_KHR*/ template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::WriteDescriptorSetAccelerationStructureKHR const & writeDescriptorSetAccelerationStructureKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, writeDescriptorSetAccelerationStructureKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, writeDescriptorSetAccelerationStructureKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, writeDescriptorSetAccelerationStructureKHR.accelerationStructureCount ); VULKAN_HPP_HASH_COMBINE( seed, writeDescriptorSetAccelerationStructureKHR.pAccelerationStructures ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::WriteDescriptorSetAccelerationStructureNV const & writeDescriptorSetAccelerationStructureNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, writeDescriptorSetAccelerationStructureNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, writeDescriptorSetAccelerationStructureNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, writeDescriptorSetAccelerationStructureNV.accelerationStructureCount ); VULKAN_HPP_HASH_COMBINE( seed, writeDescriptorSetAccelerationStructureNV.pAccelerationStructures ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::WriteDescriptorSetInlineUniformBlock const & writeDescriptorSetInlineUniformBlock ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, writeDescriptorSetInlineUniformBlock.sType ); VULKAN_HPP_HASH_COMBINE( seed, writeDescriptorSetInlineUniformBlock.pNext ); VULKAN_HPP_HASH_COMBINE( seed, writeDescriptorSetInlineUniformBlock.dataSize ); VULKAN_HPP_HASH_COMBINE( seed, writeDescriptorSetInlineUniformBlock.pData ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::WriteDescriptorSetPartitionedAccelerationStructureNV const & writeDescriptorSetPartitionedAccelerationStructureNV ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, writeDescriptorSetPartitionedAccelerationStructureNV.sType ); VULKAN_HPP_HASH_COMBINE( seed, writeDescriptorSetPartitionedAccelerationStructureNV.pNext ); VULKAN_HPP_HASH_COMBINE( seed, writeDescriptorSetPartitionedAccelerationStructureNV.accelerationStructureCount ); VULKAN_HPP_HASH_COMBINE( seed, writeDescriptorSetPartitionedAccelerationStructureNV.pAccelerationStructures ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::WriteIndirectExecutionSetPipelineEXT const & writeIndirectExecutionSetPipelineEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, writeIndirectExecutionSetPipelineEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, writeIndirectExecutionSetPipelineEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, writeIndirectExecutionSetPipelineEXT.index ); VULKAN_HPP_HASH_COMBINE( seed, writeIndirectExecutionSetPipelineEXT.pipeline ); return seed; } }; template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::WriteIndirectExecutionSetShaderEXT const & writeIndirectExecutionSetShaderEXT ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, writeIndirectExecutionSetShaderEXT.sType ); VULKAN_HPP_HASH_COMBINE( seed, writeIndirectExecutionSetShaderEXT.pNext ); VULKAN_HPP_HASH_COMBINE( seed, writeIndirectExecutionSetShaderEXT.index ); VULKAN_HPP_HASH_COMBINE( seed, writeIndirectExecutionSetShaderEXT.shader ); return seed; } }; # if defined( VK_USE_PLATFORM_XCB_KHR ) template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::XcbSurfaceCreateInfoKHR const & xcbSurfaceCreateInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, xcbSurfaceCreateInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, xcbSurfaceCreateInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, xcbSurfaceCreateInfoKHR.flags ); VULKAN_HPP_HASH_COMBINE( seed, xcbSurfaceCreateInfoKHR.connection ); VULKAN_HPP_HASH_COMBINE( seed, xcbSurfaceCreateInfoKHR.window ); return seed; } }; # endif /*VK_USE_PLATFORM_XCB_KHR*/ # if defined( VK_USE_PLATFORM_XLIB_KHR ) template <> struct hash { std::size_t operator()( VULKAN_HPP_NAMESPACE::XlibSurfaceCreateInfoKHR const & xlibSurfaceCreateInfoKHR ) const VULKAN_HPP_NOEXCEPT { std::size_t seed = 0; VULKAN_HPP_HASH_COMBINE( seed, xlibSurfaceCreateInfoKHR.sType ); VULKAN_HPP_HASH_COMBINE( seed, xlibSurfaceCreateInfoKHR.pNext ); VULKAN_HPP_HASH_COMBINE( seed, xlibSurfaceCreateInfoKHR.flags ); VULKAN_HPP_HASH_COMBINE( seed, xlibSurfaceCreateInfoKHR.dpy ); VULKAN_HPP_HASH_COMBINE( seed, xlibSurfaceCreateInfoKHR.window ); return seed; } }; # endif /*VK_USE_PLATFORM_XLIB_KHR*/ #endif // 14 <= VULKAN_HPP_CPP_VERSION } // namespace std #endif ================================================ FILE: src/libraries/vulkanheaders/vulkan_hpp_macros.hpp ================================================ // Copyright 2015-2025 The Khronos Group Inc. // // SPDX-License-Identifier: Apache-2.0 OR MIT // // This header is generated from the Khronos Vulkan XML API Registry. #ifndef VULKAN_HPP_MACROS_HPP #define VULKAN_HPP_MACROS_HPP #if defined( _MSVC_LANG ) # define VULKAN_HPP_CPLUSPLUS _MSVC_LANG #else # define VULKAN_HPP_CPLUSPLUS __cplusplus #endif #if 202002L < VULKAN_HPP_CPLUSPLUS # define VULKAN_HPP_CPP_VERSION 23 #elif 201703L < VULKAN_HPP_CPLUSPLUS # define VULKAN_HPP_CPP_VERSION 20 #elif 201402L < VULKAN_HPP_CPLUSPLUS # define VULKAN_HPP_CPP_VERSION 17 #elif 201103L < VULKAN_HPP_CPLUSPLUS # define VULKAN_HPP_CPP_VERSION 14 #elif 199711L < VULKAN_HPP_CPLUSPLUS # define VULKAN_HPP_CPP_VERSION 11 #else # error "vulkan.hpp needs at least c++ standard version 11" #endif // include headers holding feature-test macros #if 20 <= VULKAN_HPP_CPP_VERSION # include #else # include #endif #if defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) # if !defined( VULKAN_HPP_NO_SMART_HANDLE ) # define VULKAN_HPP_NO_SMART_HANDLE # endif #endif #if defined( VULKAN_HPP_NO_CONSTRUCTORS ) # if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) # define VULKAN_HPP_NO_STRUCT_CONSTRUCTORS # endif # if !defined( VULKAN_HPP_NO_UNION_CONSTRUCTORS ) # define VULKAN_HPP_NO_UNION_CONSTRUCTORS # endif #endif #if defined( VULKAN_HPP_NO_SETTERS ) # if !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) # define VULKAN_HPP_NO_STRUCT_SETTERS # endif # if !defined( VULKAN_HPP_NO_UNION_SETTERS ) # define VULKAN_HPP_NO_UNION_SETTERS # endif #endif #if !defined( VULKAN_HPP_ASSERT ) # define VULKAN_HPP_ASSERT assert #endif #if !defined( VULKAN_HPP_ASSERT_ON_RESULT ) # define VULKAN_HPP_ASSERT_ON_RESULT VULKAN_HPP_ASSERT #endif #if !defined( VULKAN_HPP_STATIC_ASSERT ) # define VULKAN_HPP_STATIC_ASSERT static_assert #endif #if !defined( VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL ) # define VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL 1 #endif #if !defined( __has_include ) # define __has_include( x ) false #endif #if ( 201907 <= __cpp_lib_three_way_comparison ) && __has_include( ) && !defined( VULKAN_HPP_NO_SPACESHIP_OPERATOR ) # define VULKAN_HPP_HAS_SPACESHIP_OPERATOR #endif #if ( 201803 <= __cpp_lib_span ) # define VULKAN_HPP_SUPPORT_SPAN #endif #if defined( __cpp_lib_modules ) && !defined( VULKAN_HPP_STD_MODULE ) && defined( VULKAN_HPP_ENABLE_STD_MODULE ) # define VULKAN_HPP_STD_MODULE std.compat #endif #ifndef VK_USE_64_BIT_PTR_DEFINES # if defined( __LP64__ ) || defined( _WIN64 ) || ( defined( __x86_64__ ) && !defined( __ILP32__ ) ) || defined( _M_X64 ) || defined( __ia64 ) || \ defined( _M_IA64 ) || defined( __aarch64__ ) || defined( __powerpc64__ ) || ( defined( __riscv ) && __riscv_xlen == 64 ) # define VK_USE_64_BIT_PTR_DEFINES 1 # else # define VK_USE_64_BIT_PTR_DEFINES 0 # endif #endif // 32-bit vulkan is not typesafe for non-dispatchable handles, so don't allow copy constructors on this platform by default. // To enable this feature on 32-bit platforms please #define VULKAN_HPP_TYPESAFE_CONVERSION 1 // To disable this feature on 64-bit platforms please #define VULKAN_HPP_TYPESAFE_CONVERSION 0 #if ( VK_USE_64_BIT_PTR_DEFINES == 1 ) # if !defined( VULKAN_HPP_TYPESAFE_CONVERSION ) # define VULKAN_HPP_TYPESAFE_CONVERSION 1 # endif #endif #if defined( __GNUC__ ) # define GCC_VERSION ( __GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__ ) #endif #if !defined( VULKAN_HPP_HAS_UNRESTRICTED_UNIONS ) # if defined( __clang__ ) # if __has_feature( cxx_unrestricted_unions ) # define VULKAN_HPP_HAS_UNRESTRICTED_UNIONS # endif # elif defined( __GNUC__ ) # if 40600 <= GCC_VERSION # define VULKAN_HPP_HAS_UNRESTRICTED_UNIONS # endif # elif defined( _MSC_VER ) # if 1900 <= _MSC_VER # define VULKAN_HPP_HAS_UNRESTRICTED_UNIONS # endif # endif #endif #if !defined( VULKAN_HPP_INLINE ) # if defined( __clang__ ) # if __has_attribute( always_inline ) # define VULKAN_HPP_INLINE __attribute__( ( always_inline ) ) __inline__ # else # define VULKAN_HPP_INLINE inline # endif # elif defined( __GNUC__ ) # define VULKAN_HPP_INLINE __attribute__( ( always_inline ) ) __inline__ # elif defined( _MSC_VER ) # define VULKAN_HPP_INLINE inline # else # define VULKAN_HPP_INLINE inline # endif #endif #if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 ) # define VULKAN_HPP_TYPESAFE_EXPLICIT #else # define VULKAN_HPP_TYPESAFE_EXPLICIT explicit #endif #if defined( __cpp_constexpr ) # define VULKAN_HPP_CONSTEXPR constexpr # if 201304 <= __cpp_constexpr # define VULKAN_HPP_CONSTEXPR_14 constexpr # else # define VULKAN_HPP_CONSTEXPR_14 # endif # if ( 201907 <= __cpp_constexpr ) && ( !defined( __GNUC__ ) || ( 110400 < GCC_VERSION ) ) # define VULKAN_HPP_CONSTEXPR_20 constexpr # else # define VULKAN_HPP_CONSTEXPR_20 # endif # define VULKAN_HPP_CONST_OR_CONSTEXPR constexpr #else # define VULKAN_HPP_CONSTEXPR # define VULKAN_HPP_CONSTEXPR_14 # define VULKAN_HPP_CONST_OR_CONSTEXPR const #endif #if !defined( VULKAN_HPP_CONSTEXPR_INLINE ) # if 201606L <= __cpp_inline_variables # define VULKAN_HPP_CONSTEXPR_INLINE VULKAN_HPP_CONSTEXPR inline # else # define VULKAN_HPP_CONSTEXPR_INLINE VULKAN_HPP_CONSTEXPR # endif #endif #if !defined( VULKAN_HPP_NOEXCEPT ) # if defined( _MSC_VER ) && ( _MSC_VER <= 1800 ) # define VULKAN_HPP_NOEXCEPT # else # define VULKAN_HPP_NOEXCEPT noexcept # define VULKAN_HPP_HAS_NOEXCEPT 1 # if defined( VULKAN_HPP_NO_EXCEPTIONS ) # define VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS noexcept # else # define VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS # endif # endif #endif #if 14 <= VULKAN_HPP_CPP_VERSION # define VULKAN_HPP_DEPRECATED( msg ) [[deprecated( msg )]] #else # define VULKAN_HPP_DEPRECATED( msg ) #endif #if 17 <= VULKAN_HPP_CPP_VERSION # define VULKAN_HPP_DEPRECATED_17( msg ) [[deprecated( msg )]] #else # define VULKAN_HPP_DEPRECATED_17( msg ) #endif #if ( 17 <= VULKAN_HPP_CPP_VERSION ) && !defined( VULKAN_HPP_NO_NODISCARD_WARNINGS ) # define VULKAN_HPP_NODISCARD [[nodiscard]] # if defined( VULKAN_HPP_NO_EXCEPTIONS ) # define VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS [[nodiscard]] # else # define VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS # endif #else # define VULKAN_HPP_NODISCARD # define VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS #endif #if !defined( VULKAN_HPP_NAMESPACE ) # define VULKAN_HPP_NAMESPACE vk #endif #define VULKAN_HPP_STRINGIFY2( text ) #text #define VULKAN_HPP_STRINGIFY( text ) VULKAN_HPP_STRINGIFY2( text ) #define VULKAN_HPP_NAMESPACE_STRING VULKAN_HPP_STRINGIFY( VULKAN_HPP_NAMESPACE ) #if !defined( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC ) # if defined( VK_NO_PROTOTYPES ) # define VULKAN_HPP_DISPATCH_LOADER_DYNAMIC 1 # else # define VULKAN_HPP_DISPATCH_LOADER_DYNAMIC 0 # endif #endif #if !defined( VULKAN_HPP_STORAGE_API ) # if defined( VULKAN_HPP_STORAGE_SHARED ) # if defined( _MSC_VER ) # if defined( VULKAN_HPP_STORAGE_SHARED_EXPORT ) # define VULKAN_HPP_STORAGE_API __declspec( dllexport ) # else # define VULKAN_HPP_STORAGE_API __declspec( dllimport ) # endif # elif defined( __clang__ ) || defined( __GNUC__ ) # if defined( VULKAN_HPP_STORAGE_SHARED_EXPORT ) # define VULKAN_HPP_STORAGE_API __attribute__( ( visibility( "default" ) ) ) # else # define VULKAN_HPP_STORAGE_API # endif # else # define VULKAN_HPP_STORAGE_API # pragma warning Unknown import / export semantics # endif # else # define VULKAN_HPP_STORAGE_API # endif #endif namespace VULKAN_HPP_NAMESPACE { namespace detail { class DispatchLoaderDynamic; #if !defined( VULKAN_HPP_DEFAULT_DISPATCHER ) # if VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 extern VULKAN_HPP_STORAGE_API DispatchLoaderDynamic defaultDispatchLoaderDynamic; # endif #endif } // namespace detail } // namespace VULKAN_HPP_NAMESPACE #if !defined( VULKAN_HPP_DEFAULT_DISPATCHER ) # if VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 # define VULKAN_HPP_DEFAULT_DISPATCHER ::VULKAN_HPP_NAMESPACE::detail::defaultDispatchLoaderDynamic # define VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE \ namespace VULKAN_HPP_NAMESPACE \ { \ namespace detail \ { \ VULKAN_HPP_STORAGE_API DispatchLoaderDynamic defaultDispatchLoaderDynamic; \ } \ } # else # define VULKAN_HPP_DEFAULT_DISPATCHER ::VULKAN_HPP_NAMESPACE::detail::getDispatchLoaderStatic() # define VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE # endif #endif #if !defined( VULKAN_HPP_DEFAULT_DISPATCHER_TYPE ) # if VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 # define VULKAN_HPP_DEFAULT_DISPATCHER_TYPE ::VULKAN_HPP_NAMESPACE::detail::DispatchLoaderDynamic # else # define VULKAN_HPP_DEFAULT_DISPATCHER_TYPE ::VULKAN_HPP_NAMESPACE::detail::DispatchLoaderStatic # endif #endif #if defined( VULKAN_HPP_NO_DEFAULT_DISPATCHER ) # define VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT # define VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT # define VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT #else # define VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT = {} # define VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT = nullptr # define VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT = VULKAN_HPP_DEFAULT_DISPATCHER #endif #if !defined( VULKAN_HPP_EXPECTED ) && ( 23 <= VULKAN_HPP_CPP_VERSION ) && defined( __cpp_lib_expected ) # if !( defined( VULKAN_HPP_ENABLE_STD_MODULE ) && defined( VULKAN_HPP_STD_MODULE ) ) # include # endif # define VULKAN_HPP_EXPECTED std::expected # define VULKAN_HPP_UNEXPECTED std::unexpected #endif #if !defined( VULKAN_HPP_RAII_NAMESPACE ) # define VULKAN_HPP_RAII_NAMESPACE raii #endif #if defined( VULKAN_HPP_NO_EXCEPTIONS ) && defined( VULKAN_HPP_EXPECTED ) # define VULKAN_HPP_RAII_NO_EXCEPTIONS # define VULKAN_HPP_RAII_CREATE_NOEXCEPT noexcept #else # define VULKAN_HPP_RAII_CREATE_NOEXCEPT #endif #endif ================================================ FILE: src/libraries/vulkanheaders/vulkan_ios.h ================================================ #ifndef VULKAN_IOS_H_ #define VULKAN_IOS_H_ 1 /* ** Copyright 2015-2025 The Khronos Group Inc. ** ** SPDX-License-Identifier: Apache-2.0 */ /* ** This header is generated from the Khronos Vulkan XML API Registry. ** */ #ifdef __cplusplus extern "C" { #endif // VK_MVK_ios_surface is a preprocessor guard. Do not pass it to API calls. #define VK_MVK_ios_surface 1 #define VK_MVK_IOS_SURFACE_SPEC_VERSION 3 #define VK_MVK_IOS_SURFACE_EXTENSION_NAME "VK_MVK_ios_surface" typedef VkFlags VkIOSSurfaceCreateFlagsMVK; typedef struct VkIOSSurfaceCreateInfoMVK { VkStructureType sType; const void* pNext; VkIOSSurfaceCreateFlagsMVK flags; const void* pView; } VkIOSSurfaceCreateInfoMVK; typedef VkResult (VKAPI_PTR *PFN_vkCreateIOSSurfaceMVK)(VkInstance instance, const VkIOSSurfaceCreateInfoMVK* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkCreateIOSSurfaceMVK( VkInstance instance, const VkIOSSurfaceCreateInfoMVK* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); #endif #ifdef __cplusplus } #endif #endif ================================================ FILE: src/libraries/vulkanheaders/vulkan_macos.h ================================================ #ifndef VULKAN_MACOS_H_ #define VULKAN_MACOS_H_ 1 /* ** Copyright 2015-2025 The Khronos Group Inc. ** ** SPDX-License-Identifier: Apache-2.0 */ /* ** This header is generated from the Khronos Vulkan XML API Registry. ** */ #ifdef __cplusplus extern "C" { #endif // VK_MVK_macos_surface is a preprocessor guard. Do not pass it to API calls. #define VK_MVK_macos_surface 1 #define VK_MVK_MACOS_SURFACE_SPEC_VERSION 3 #define VK_MVK_MACOS_SURFACE_EXTENSION_NAME "VK_MVK_macos_surface" typedef VkFlags VkMacOSSurfaceCreateFlagsMVK; typedef struct VkMacOSSurfaceCreateInfoMVK { VkStructureType sType; const void* pNext; VkMacOSSurfaceCreateFlagsMVK flags; const void* pView; } VkMacOSSurfaceCreateInfoMVK; typedef VkResult (VKAPI_PTR *PFN_vkCreateMacOSSurfaceMVK)(VkInstance instance, const VkMacOSSurfaceCreateInfoMVK* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkCreateMacOSSurfaceMVK( VkInstance instance, const VkMacOSSurfaceCreateInfoMVK* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); #endif #ifdef __cplusplus } #endif #endif ================================================ FILE: src/libraries/vulkanheaders/vulkan_metal.h ================================================ #ifndef VULKAN_METAL_H_ #define VULKAN_METAL_H_ 1 /* ** Copyright 2015-2025 The Khronos Group Inc. ** ** SPDX-License-Identifier: Apache-2.0 */ /* ** This header is generated from the Khronos Vulkan XML API Registry. ** */ #ifdef __cplusplus extern "C" { #endif // VK_EXT_metal_surface is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_metal_surface 1 #ifdef __OBJC__ @class CAMetalLayer; #else typedef void CAMetalLayer; #endif #define VK_EXT_METAL_SURFACE_SPEC_VERSION 1 #define VK_EXT_METAL_SURFACE_EXTENSION_NAME "VK_EXT_metal_surface" typedef VkFlags VkMetalSurfaceCreateFlagsEXT; typedef struct VkMetalSurfaceCreateInfoEXT { VkStructureType sType; const void* pNext; VkMetalSurfaceCreateFlagsEXT flags; const CAMetalLayer* pLayer; } VkMetalSurfaceCreateInfoEXT; typedef VkResult (VKAPI_PTR *PFN_vkCreateMetalSurfaceEXT)(VkInstance instance, const VkMetalSurfaceCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkCreateMetalSurfaceEXT( VkInstance instance, const VkMetalSurfaceCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); #endif // VK_EXT_metal_objects is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_metal_objects 1 #ifdef __OBJC__ @protocol MTLDevice; typedef __unsafe_unretained id MTLDevice_id; #else typedef void* MTLDevice_id; #endif #ifdef __OBJC__ @protocol MTLCommandQueue; typedef __unsafe_unretained id MTLCommandQueue_id; #else typedef void* MTLCommandQueue_id; #endif #ifdef __OBJC__ @protocol MTLBuffer; typedef __unsafe_unretained id MTLBuffer_id; #else typedef void* MTLBuffer_id; #endif #ifdef __OBJC__ @protocol MTLTexture; typedef __unsafe_unretained id MTLTexture_id; #else typedef void* MTLTexture_id; #endif typedef struct __IOSurface* IOSurfaceRef; #ifdef __OBJC__ @protocol MTLSharedEvent; typedef __unsafe_unretained id MTLSharedEvent_id; #else typedef void* MTLSharedEvent_id; #endif #define VK_EXT_METAL_OBJECTS_SPEC_VERSION 2 #define VK_EXT_METAL_OBJECTS_EXTENSION_NAME "VK_EXT_metal_objects" typedef enum VkExportMetalObjectTypeFlagBitsEXT { VK_EXPORT_METAL_OBJECT_TYPE_METAL_DEVICE_BIT_EXT = 0x00000001, VK_EXPORT_METAL_OBJECT_TYPE_METAL_COMMAND_QUEUE_BIT_EXT = 0x00000002, VK_EXPORT_METAL_OBJECT_TYPE_METAL_BUFFER_BIT_EXT = 0x00000004, VK_EXPORT_METAL_OBJECT_TYPE_METAL_TEXTURE_BIT_EXT = 0x00000008, VK_EXPORT_METAL_OBJECT_TYPE_METAL_IOSURFACE_BIT_EXT = 0x00000010, VK_EXPORT_METAL_OBJECT_TYPE_METAL_SHARED_EVENT_BIT_EXT = 0x00000020, VK_EXPORT_METAL_OBJECT_TYPE_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF } VkExportMetalObjectTypeFlagBitsEXT; typedef VkFlags VkExportMetalObjectTypeFlagsEXT; typedef struct VkExportMetalObjectCreateInfoEXT { VkStructureType sType; const void* pNext; VkExportMetalObjectTypeFlagBitsEXT exportObjectType; } VkExportMetalObjectCreateInfoEXT; typedef struct VkExportMetalObjectsInfoEXT { VkStructureType sType; const void* pNext; } VkExportMetalObjectsInfoEXT; typedef struct VkExportMetalDeviceInfoEXT { VkStructureType sType; const void* pNext; MTLDevice_id mtlDevice; } VkExportMetalDeviceInfoEXT; typedef struct VkExportMetalCommandQueueInfoEXT { VkStructureType sType; const void* pNext; VkQueue queue; MTLCommandQueue_id mtlCommandQueue; } VkExportMetalCommandQueueInfoEXT; typedef struct VkExportMetalBufferInfoEXT { VkStructureType sType; const void* pNext; VkDeviceMemory memory; MTLBuffer_id mtlBuffer; } VkExportMetalBufferInfoEXT; typedef struct VkImportMetalBufferInfoEXT { VkStructureType sType; const void* pNext; MTLBuffer_id mtlBuffer; } VkImportMetalBufferInfoEXT; typedef struct VkExportMetalTextureInfoEXT { VkStructureType sType; const void* pNext; VkImage image; VkImageView imageView; VkBufferView bufferView; VkImageAspectFlagBits plane; MTLTexture_id mtlTexture; } VkExportMetalTextureInfoEXT; typedef struct VkImportMetalTextureInfoEXT { VkStructureType sType; const void* pNext; VkImageAspectFlagBits plane; MTLTexture_id mtlTexture; } VkImportMetalTextureInfoEXT; typedef struct VkExportMetalIOSurfaceInfoEXT { VkStructureType sType; const void* pNext; VkImage image; IOSurfaceRef ioSurface; } VkExportMetalIOSurfaceInfoEXT; typedef struct VkImportMetalIOSurfaceInfoEXT { VkStructureType sType; const void* pNext; IOSurfaceRef ioSurface; } VkImportMetalIOSurfaceInfoEXT; typedef struct VkExportMetalSharedEventInfoEXT { VkStructureType sType; const void* pNext; VkSemaphore semaphore; VkEvent event; MTLSharedEvent_id mtlSharedEvent; } VkExportMetalSharedEventInfoEXT; typedef struct VkImportMetalSharedEventInfoEXT { VkStructureType sType; const void* pNext; MTLSharedEvent_id mtlSharedEvent; } VkImportMetalSharedEventInfoEXT; typedef void (VKAPI_PTR *PFN_vkExportMetalObjectsEXT)(VkDevice device, VkExportMetalObjectsInfoEXT* pMetalObjectsInfo); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR void VKAPI_CALL vkExportMetalObjectsEXT( VkDevice device, VkExportMetalObjectsInfoEXT* pMetalObjectsInfo); #endif // VK_EXT_external_memory_metal is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_external_memory_metal 1 #define VK_EXT_EXTERNAL_MEMORY_METAL_SPEC_VERSION 1 #define VK_EXT_EXTERNAL_MEMORY_METAL_EXTENSION_NAME "VK_EXT_external_memory_metal" typedef struct VkImportMemoryMetalHandleInfoEXT { VkStructureType sType; const void* pNext; VkExternalMemoryHandleTypeFlagBits handleType; void* handle; } VkImportMemoryMetalHandleInfoEXT; typedef struct VkMemoryMetalHandlePropertiesEXT { VkStructureType sType; void* pNext; uint32_t memoryTypeBits; } VkMemoryMetalHandlePropertiesEXT; typedef struct VkMemoryGetMetalHandleInfoEXT { VkStructureType sType; const void* pNext; VkDeviceMemory memory; VkExternalMemoryHandleTypeFlagBits handleType; } VkMemoryGetMetalHandleInfoEXT; typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryMetalHandleEXT)(VkDevice device, const VkMemoryGetMetalHandleInfoEXT* pGetMetalHandleInfo, void** pHandle); typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryMetalHandlePropertiesEXT)(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, const void* pHandle, VkMemoryMetalHandlePropertiesEXT* pMemoryMetalHandleProperties); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryMetalHandleEXT( VkDevice device, const VkMemoryGetMetalHandleInfoEXT* pGetMetalHandleInfo, void** pHandle); VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryMetalHandlePropertiesEXT( VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, const void* pHandle, VkMemoryMetalHandlePropertiesEXT* pMemoryMetalHandleProperties); #endif #ifdef __cplusplus } #endif #endif ================================================ FILE: src/libraries/vulkanheaders/vulkan_raii.hpp ================================================ // Copyright 2015-2025 The Khronos Group Inc. // // SPDX-License-Identifier: Apache-2.0 OR MIT // // This header is generated from the Khronos Vulkan XML API Registry. #ifndef VULKAN_RAII_HPP #define VULKAN_RAII_HPP #include #if !( defined( VULKAN_HPP_ENABLE_STD_MODULE ) && defined( VULKAN_HPP_STD_MODULE ) ) # include // std::unique_ptr # include // std::forward #endif #if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) namespace VULKAN_HPP_NAMESPACE { namespace VULKAN_HPP_RAII_NAMESPACE { namespace detail { template class CreateReturnType { public: # if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) using Type = VULKAN_HPP_EXPECTED; # else using Type = T; # endif }; using PFN_dummy = void ( * )(); class ContextDispatcher : public ::VULKAN_HPP_NAMESPACE::detail::DispatchLoaderBase { public: ContextDispatcher( PFN_vkGetInstanceProcAddr getProcAddr ) : vkGetInstanceProcAddr( getProcAddr ) //=== VK_VERSION_1_0 === , vkCreateInstance( PFN_vkCreateInstance( getProcAddr( NULL, "vkCreateInstance" ) ) ) , vkEnumerateInstanceExtensionProperties( PFN_vkEnumerateInstanceExtensionProperties( getProcAddr( NULL, "vkEnumerateInstanceExtensionProperties" ) ) ) , vkEnumerateInstanceLayerProperties( PFN_vkEnumerateInstanceLayerProperties( getProcAddr( NULL, "vkEnumerateInstanceLayerProperties" ) ) ) //=== VK_VERSION_1_1 === , vkEnumerateInstanceVersion( PFN_vkEnumerateInstanceVersion( getProcAddr( NULL, "vkEnumerateInstanceVersion" ) ) ) { } public: PFN_vkGetInstanceProcAddr vkGetInstanceProcAddr = 0; //=== VK_VERSION_1_0 === PFN_vkCreateInstance vkCreateInstance = 0; PFN_vkEnumerateInstanceExtensionProperties vkEnumerateInstanceExtensionProperties = 0; PFN_vkEnumerateInstanceLayerProperties vkEnumerateInstanceLayerProperties = 0; //=== VK_VERSION_1_1 === PFN_vkEnumerateInstanceVersion vkEnumerateInstanceVersion = 0; }; class InstanceDispatcher : public ::VULKAN_HPP_NAMESPACE::detail::DispatchLoaderBase { public: InstanceDispatcher( PFN_vkGetInstanceProcAddr getProcAddr, VkInstance instance ) : vkGetInstanceProcAddr( getProcAddr ) { //=== VK_VERSION_1_0 === vkDestroyInstance = PFN_vkDestroyInstance( vkGetInstanceProcAddr( instance, "vkDestroyInstance" ) ); vkEnumeratePhysicalDevices = PFN_vkEnumeratePhysicalDevices( vkGetInstanceProcAddr( instance, "vkEnumeratePhysicalDevices" ) ); vkGetPhysicalDeviceFeatures = PFN_vkGetPhysicalDeviceFeatures( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceFeatures" ) ); vkGetPhysicalDeviceFormatProperties = PFN_vkGetPhysicalDeviceFormatProperties( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceFormatProperties" ) ); vkGetPhysicalDeviceImageFormatProperties = PFN_vkGetPhysicalDeviceImageFormatProperties( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceImageFormatProperties" ) ); vkGetPhysicalDeviceProperties = PFN_vkGetPhysicalDeviceProperties( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceProperties" ) ); vkGetPhysicalDeviceQueueFamilyProperties = PFN_vkGetPhysicalDeviceQueueFamilyProperties( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceQueueFamilyProperties" ) ); vkGetPhysicalDeviceMemoryProperties = PFN_vkGetPhysicalDeviceMemoryProperties( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceMemoryProperties" ) ); vkCreateDevice = PFN_vkCreateDevice( vkGetInstanceProcAddr( instance, "vkCreateDevice" ) ); vkEnumerateDeviceExtensionProperties = PFN_vkEnumerateDeviceExtensionProperties( vkGetInstanceProcAddr( instance, "vkEnumerateDeviceExtensionProperties" ) ); vkEnumerateDeviceLayerProperties = PFN_vkEnumerateDeviceLayerProperties( vkGetInstanceProcAddr( instance, "vkEnumerateDeviceLayerProperties" ) ); vkGetPhysicalDeviceSparseImageFormatProperties = PFN_vkGetPhysicalDeviceSparseImageFormatProperties( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceSparseImageFormatProperties" ) ); //=== VK_VERSION_1_1 === vkEnumeratePhysicalDeviceGroups = PFN_vkEnumeratePhysicalDeviceGroups( vkGetInstanceProcAddr( instance, "vkEnumeratePhysicalDeviceGroups" ) ); vkGetPhysicalDeviceFeatures2 = PFN_vkGetPhysicalDeviceFeatures2( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceFeatures2" ) ); vkGetPhysicalDeviceProperties2 = PFN_vkGetPhysicalDeviceProperties2( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceProperties2" ) ); vkGetPhysicalDeviceFormatProperties2 = PFN_vkGetPhysicalDeviceFormatProperties2( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceFormatProperties2" ) ); vkGetPhysicalDeviceImageFormatProperties2 = PFN_vkGetPhysicalDeviceImageFormatProperties2( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceImageFormatProperties2" ) ); vkGetPhysicalDeviceQueueFamilyProperties2 = PFN_vkGetPhysicalDeviceQueueFamilyProperties2( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceQueueFamilyProperties2" ) ); vkGetPhysicalDeviceMemoryProperties2 = PFN_vkGetPhysicalDeviceMemoryProperties2( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceMemoryProperties2" ) ); vkGetPhysicalDeviceSparseImageFormatProperties2 = PFN_vkGetPhysicalDeviceSparseImageFormatProperties2( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceSparseImageFormatProperties2" ) ); vkGetPhysicalDeviceExternalBufferProperties = PFN_vkGetPhysicalDeviceExternalBufferProperties( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceExternalBufferProperties" ) ); vkGetPhysicalDeviceExternalFenceProperties = PFN_vkGetPhysicalDeviceExternalFenceProperties( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceExternalFenceProperties" ) ); vkGetPhysicalDeviceExternalSemaphoreProperties = PFN_vkGetPhysicalDeviceExternalSemaphoreProperties( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceExternalSemaphoreProperties" ) ); //=== VK_VERSION_1_3 === vkGetPhysicalDeviceToolProperties = PFN_vkGetPhysicalDeviceToolProperties( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceToolProperties" ) ); //=== VK_KHR_surface === vkDestroySurfaceKHR = PFN_vkDestroySurfaceKHR( vkGetInstanceProcAddr( instance, "vkDestroySurfaceKHR" ) ); vkGetPhysicalDeviceSurfaceSupportKHR = PFN_vkGetPhysicalDeviceSurfaceSupportKHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceSurfaceSupportKHR" ) ); vkGetPhysicalDeviceSurfaceCapabilitiesKHR = PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceSurfaceCapabilitiesKHR" ) ); vkGetPhysicalDeviceSurfaceFormatsKHR = PFN_vkGetPhysicalDeviceSurfaceFormatsKHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceSurfaceFormatsKHR" ) ); vkGetPhysicalDeviceSurfacePresentModesKHR = PFN_vkGetPhysicalDeviceSurfacePresentModesKHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceSurfacePresentModesKHR" ) ); //=== VK_KHR_swapchain === vkGetPhysicalDevicePresentRectanglesKHR = PFN_vkGetPhysicalDevicePresentRectanglesKHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDevicePresentRectanglesKHR" ) ); //=== VK_KHR_display === vkGetPhysicalDeviceDisplayPropertiesKHR = PFN_vkGetPhysicalDeviceDisplayPropertiesKHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceDisplayPropertiesKHR" ) ); vkGetPhysicalDeviceDisplayPlanePropertiesKHR = PFN_vkGetPhysicalDeviceDisplayPlanePropertiesKHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceDisplayPlanePropertiesKHR" ) ); vkGetDisplayPlaneSupportedDisplaysKHR = PFN_vkGetDisplayPlaneSupportedDisplaysKHR( vkGetInstanceProcAddr( instance, "vkGetDisplayPlaneSupportedDisplaysKHR" ) ); vkGetDisplayModePropertiesKHR = PFN_vkGetDisplayModePropertiesKHR( vkGetInstanceProcAddr( instance, "vkGetDisplayModePropertiesKHR" ) ); vkCreateDisplayModeKHR = PFN_vkCreateDisplayModeKHR( vkGetInstanceProcAddr( instance, "vkCreateDisplayModeKHR" ) ); vkGetDisplayPlaneCapabilitiesKHR = PFN_vkGetDisplayPlaneCapabilitiesKHR( vkGetInstanceProcAddr( instance, "vkGetDisplayPlaneCapabilitiesKHR" ) ); vkCreateDisplayPlaneSurfaceKHR = PFN_vkCreateDisplayPlaneSurfaceKHR( vkGetInstanceProcAddr( instance, "vkCreateDisplayPlaneSurfaceKHR" ) ); # if defined( VK_USE_PLATFORM_XLIB_KHR ) //=== VK_KHR_xlib_surface === vkCreateXlibSurfaceKHR = PFN_vkCreateXlibSurfaceKHR( vkGetInstanceProcAddr( instance, "vkCreateXlibSurfaceKHR" ) ); vkGetPhysicalDeviceXlibPresentationSupportKHR = PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceXlibPresentationSupportKHR" ) ); # endif /*VK_USE_PLATFORM_XLIB_KHR*/ # if defined( VK_USE_PLATFORM_XCB_KHR ) //=== VK_KHR_xcb_surface === vkCreateXcbSurfaceKHR = PFN_vkCreateXcbSurfaceKHR( vkGetInstanceProcAddr( instance, "vkCreateXcbSurfaceKHR" ) ); vkGetPhysicalDeviceXcbPresentationSupportKHR = PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceXcbPresentationSupportKHR" ) ); # endif /*VK_USE_PLATFORM_XCB_KHR*/ # if defined( VK_USE_PLATFORM_WAYLAND_KHR ) //=== VK_KHR_wayland_surface === vkCreateWaylandSurfaceKHR = PFN_vkCreateWaylandSurfaceKHR( vkGetInstanceProcAddr( instance, "vkCreateWaylandSurfaceKHR" ) ); vkGetPhysicalDeviceWaylandPresentationSupportKHR = PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceWaylandPresentationSupportKHR" ) ); # endif /*VK_USE_PLATFORM_WAYLAND_KHR*/ # if defined( VK_USE_PLATFORM_ANDROID_KHR ) //=== VK_KHR_android_surface === vkCreateAndroidSurfaceKHR = PFN_vkCreateAndroidSurfaceKHR( vkGetInstanceProcAddr( instance, "vkCreateAndroidSurfaceKHR" ) ); # endif /*VK_USE_PLATFORM_ANDROID_KHR*/ # if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_KHR_win32_surface === vkCreateWin32SurfaceKHR = PFN_vkCreateWin32SurfaceKHR( vkGetInstanceProcAddr( instance, "vkCreateWin32SurfaceKHR" ) ); vkGetPhysicalDeviceWin32PresentationSupportKHR = PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceWin32PresentationSupportKHR" ) ); # endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_EXT_debug_report === vkCreateDebugReportCallbackEXT = PFN_vkCreateDebugReportCallbackEXT( vkGetInstanceProcAddr( instance, "vkCreateDebugReportCallbackEXT" ) ); vkDestroyDebugReportCallbackEXT = PFN_vkDestroyDebugReportCallbackEXT( vkGetInstanceProcAddr( instance, "vkDestroyDebugReportCallbackEXT" ) ); vkDebugReportMessageEXT = PFN_vkDebugReportMessageEXT( vkGetInstanceProcAddr( instance, "vkDebugReportMessageEXT" ) ); //=== VK_KHR_video_queue === vkGetPhysicalDeviceVideoCapabilitiesKHR = PFN_vkGetPhysicalDeviceVideoCapabilitiesKHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceVideoCapabilitiesKHR" ) ); vkGetPhysicalDeviceVideoFormatPropertiesKHR = PFN_vkGetPhysicalDeviceVideoFormatPropertiesKHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceVideoFormatPropertiesKHR" ) ); # if defined( VK_USE_PLATFORM_GGP ) //=== VK_GGP_stream_descriptor_surface === vkCreateStreamDescriptorSurfaceGGP = PFN_vkCreateStreamDescriptorSurfaceGGP( vkGetInstanceProcAddr( instance, "vkCreateStreamDescriptorSurfaceGGP" ) ); # endif /*VK_USE_PLATFORM_GGP*/ //=== VK_NV_external_memory_capabilities === vkGetPhysicalDeviceExternalImageFormatPropertiesNV = PFN_vkGetPhysicalDeviceExternalImageFormatPropertiesNV( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceExternalImageFormatPropertiesNV" ) ); //=== VK_KHR_get_physical_device_properties2 === vkGetPhysicalDeviceFeatures2KHR = PFN_vkGetPhysicalDeviceFeatures2KHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceFeatures2KHR" ) ); if ( !vkGetPhysicalDeviceFeatures2 ) vkGetPhysicalDeviceFeatures2 = vkGetPhysicalDeviceFeatures2KHR; vkGetPhysicalDeviceProperties2KHR = PFN_vkGetPhysicalDeviceProperties2KHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceProperties2KHR" ) ); if ( !vkGetPhysicalDeviceProperties2 ) vkGetPhysicalDeviceProperties2 = vkGetPhysicalDeviceProperties2KHR; vkGetPhysicalDeviceFormatProperties2KHR = PFN_vkGetPhysicalDeviceFormatProperties2KHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceFormatProperties2KHR" ) ); if ( !vkGetPhysicalDeviceFormatProperties2 ) vkGetPhysicalDeviceFormatProperties2 = vkGetPhysicalDeviceFormatProperties2KHR; vkGetPhysicalDeviceImageFormatProperties2KHR = PFN_vkGetPhysicalDeviceImageFormatProperties2KHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceImageFormatProperties2KHR" ) ); if ( !vkGetPhysicalDeviceImageFormatProperties2 ) vkGetPhysicalDeviceImageFormatProperties2 = vkGetPhysicalDeviceImageFormatProperties2KHR; vkGetPhysicalDeviceQueueFamilyProperties2KHR = PFN_vkGetPhysicalDeviceQueueFamilyProperties2KHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceQueueFamilyProperties2KHR" ) ); if ( !vkGetPhysicalDeviceQueueFamilyProperties2 ) vkGetPhysicalDeviceQueueFamilyProperties2 = vkGetPhysicalDeviceQueueFamilyProperties2KHR; vkGetPhysicalDeviceMemoryProperties2KHR = PFN_vkGetPhysicalDeviceMemoryProperties2KHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceMemoryProperties2KHR" ) ); if ( !vkGetPhysicalDeviceMemoryProperties2 ) vkGetPhysicalDeviceMemoryProperties2 = vkGetPhysicalDeviceMemoryProperties2KHR; vkGetPhysicalDeviceSparseImageFormatProperties2KHR = PFN_vkGetPhysicalDeviceSparseImageFormatProperties2KHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceSparseImageFormatProperties2KHR" ) ); if ( !vkGetPhysicalDeviceSparseImageFormatProperties2 ) vkGetPhysicalDeviceSparseImageFormatProperties2 = vkGetPhysicalDeviceSparseImageFormatProperties2KHR; # if defined( VK_USE_PLATFORM_VI_NN ) //=== VK_NN_vi_surface === vkCreateViSurfaceNN = PFN_vkCreateViSurfaceNN( vkGetInstanceProcAddr( instance, "vkCreateViSurfaceNN" ) ); # endif /*VK_USE_PLATFORM_VI_NN*/ //=== VK_KHR_device_group_creation === vkEnumeratePhysicalDeviceGroupsKHR = PFN_vkEnumeratePhysicalDeviceGroupsKHR( vkGetInstanceProcAddr( instance, "vkEnumeratePhysicalDeviceGroupsKHR" ) ); if ( !vkEnumeratePhysicalDeviceGroups ) vkEnumeratePhysicalDeviceGroups = vkEnumeratePhysicalDeviceGroupsKHR; //=== VK_KHR_external_memory_capabilities === vkGetPhysicalDeviceExternalBufferPropertiesKHR = PFN_vkGetPhysicalDeviceExternalBufferPropertiesKHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceExternalBufferPropertiesKHR" ) ); if ( !vkGetPhysicalDeviceExternalBufferProperties ) vkGetPhysicalDeviceExternalBufferProperties = vkGetPhysicalDeviceExternalBufferPropertiesKHR; //=== VK_KHR_external_semaphore_capabilities === vkGetPhysicalDeviceExternalSemaphorePropertiesKHR = PFN_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceExternalSemaphorePropertiesKHR" ) ); if ( !vkGetPhysicalDeviceExternalSemaphoreProperties ) vkGetPhysicalDeviceExternalSemaphoreProperties = vkGetPhysicalDeviceExternalSemaphorePropertiesKHR; //=== VK_EXT_direct_mode_display === vkReleaseDisplayEXT = PFN_vkReleaseDisplayEXT( vkGetInstanceProcAddr( instance, "vkReleaseDisplayEXT" ) ); # if defined( VK_USE_PLATFORM_XLIB_XRANDR_EXT ) //=== VK_EXT_acquire_xlib_display === vkAcquireXlibDisplayEXT = PFN_vkAcquireXlibDisplayEXT( vkGetInstanceProcAddr( instance, "vkAcquireXlibDisplayEXT" ) ); vkGetRandROutputDisplayEXT = PFN_vkGetRandROutputDisplayEXT( vkGetInstanceProcAddr( instance, "vkGetRandROutputDisplayEXT" ) ); # endif /*VK_USE_PLATFORM_XLIB_XRANDR_EXT*/ //=== VK_EXT_display_surface_counter === vkGetPhysicalDeviceSurfaceCapabilities2EXT = PFN_vkGetPhysicalDeviceSurfaceCapabilities2EXT( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceSurfaceCapabilities2EXT" ) ); //=== VK_KHR_external_fence_capabilities === vkGetPhysicalDeviceExternalFencePropertiesKHR = PFN_vkGetPhysicalDeviceExternalFencePropertiesKHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceExternalFencePropertiesKHR" ) ); if ( !vkGetPhysicalDeviceExternalFenceProperties ) vkGetPhysicalDeviceExternalFenceProperties = vkGetPhysicalDeviceExternalFencePropertiesKHR; //=== VK_KHR_performance_query === vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR = PFN_vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR( vkGetInstanceProcAddr( instance, "vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR" ) ); vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR = PFN_vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR" ) ); //=== VK_KHR_get_surface_capabilities2 === vkGetPhysicalDeviceSurfaceCapabilities2KHR = PFN_vkGetPhysicalDeviceSurfaceCapabilities2KHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceSurfaceCapabilities2KHR" ) ); vkGetPhysicalDeviceSurfaceFormats2KHR = PFN_vkGetPhysicalDeviceSurfaceFormats2KHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceSurfaceFormats2KHR" ) ); //=== VK_KHR_get_display_properties2 === vkGetPhysicalDeviceDisplayProperties2KHR = PFN_vkGetPhysicalDeviceDisplayProperties2KHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceDisplayProperties2KHR" ) ); vkGetPhysicalDeviceDisplayPlaneProperties2KHR = PFN_vkGetPhysicalDeviceDisplayPlaneProperties2KHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceDisplayPlaneProperties2KHR" ) ); vkGetDisplayModeProperties2KHR = PFN_vkGetDisplayModeProperties2KHR( vkGetInstanceProcAddr( instance, "vkGetDisplayModeProperties2KHR" ) ); vkGetDisplayPlaneCapabilities2KHR = PFN_vkGetDisplayPlaneCapabilities2KHR( vkGetInstanceProcAddr( instance, "vkGetDisplayPlaneCapabilities2KHR" ) ); # if defined( VK_USE_PLATFORM_IOS_MVK ) //=== VK_MVK_ios_surface === vkCreateIOSSurfaceMVK = PFN_vkCreateIOSSurfaceMVK( vkGetInstanceProcAddr( instance, "vkCreateIOSSurfaceMVK" ) ); # endif /*VK_USE_PLATFORM_IOS_MVK*/ # if defined( VK_USE_PLATFORM_MACOS_MVK ) //=== VK_MVK_macos_surface === vkCreateMacOSSurfaceMVK = PFN_vkCreateMacOSSurfaceMVK( vkGetInstanceProcAddr( instance, "vkCreateMacOSSurfaceMVK" ) ); # endif /*VK_USE_PLATFORM_MACOS_MVK*/ //=== VK_EXT_debug_utils === vkCreateDebugUtilsMessengerEXT = PFN_vkCreateDebugUtilsMessengerEXT( vkGetInstanceProcAddr( instance, "vkCreateDebugUtilsMessengerEXT" ) ); vkDestroyDebugUtilsMessengerEXT = PFN_vkDestroyDebugUtilsMessengerEXT( vkGetInstanceProcAddr( instance, "vkDestroyDebugUtilsMessengerEXT" ) ); vkSubmitDebugUtilsMessageEXT = PFN_vkSubmitDebugUtilsMessageEXT( vkGetInstanceProcAddr( instance, "vkSubmitDebugUtilsMessageEXT" ) ); //=== VK_EXT_sample_locations === vkGetPhysicalDeviceMultisamplePropertiesEXT = PFN_vkGetPhysicalDeviceMultisamplePropertiesEXT( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceMultisamplePropertiesEXT" ) ); //=== VK_EXT_calibrated_timestamps === vkGetPhysicalDeviceCalibrateableTimeDomainsEXT = PFN_vkGetPhysicalDeviceCalibrateableTimeDomainsEXT( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceCalibrateableTimeDomainsEXT" ) ); if ( !vkGetPhysicalDeviceCalibrateableTimeDomainsKHR ) vkGetPhysicalDeviceCalibrateableTimeDomainsKHR = vkGetPhysicalDeviceCalibrateableTimeDomainsEXT; # if defined( VK_USE_PLATFORM_FUCHSIA ) //=== VK_FUCHSIA_imagepipe_surface === vkCreateImagePipeSurfaceFUCHSIA = PFN_vkCreateImagePipeSurfaceFUCHSIA( vkGetInstanceProcAddr( instance, "vkCreateImagePipeSurfaceFUCHSIA" ) ); # endif /*VK_USE_PLATFORM_FUCHSIA*/ # if defined( VK_USE_PLATFORM_METAL_EXT ) //=== VK_EXT_metal_surface === vkCreateMetalSurfaceEXT = PFN_vkCreateMetalSurfaceEXT( vkGetInstanceProcAddr( instance, "vkCreateMetalSurfaceEXT" ) ); # endif /*VK_USE_PLATFORM_METAL_EXT*/ //=== VK_KHR_fragment_shading_rate === vkGetPhysicalDeviceFragmentShadingRatesKHR = PFN_vkGetPhysicalDeviceFragmentShadingRatesKHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceFragmentShadingRatesKHR" ) ); //=== VK_EXT_tooling_info === vkGetPhysicalDeviceToolPropertiesEXT = PFN_vkGetPhysicalDeviceToolPropertiesEXT( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceToolPropertiesEXT" ) ); if ( !vkGetPhysicalDeviceToolProperties ) vkGetPhysicalDeviceToolProperties = vkGetPhysicalDeviceToolPropertiesEXT; //=== VK_NV_cooperative_matrix === vkGetPhysicalDeviceCooperativeMatrixPropertiesNV = PFN_vkGetPhysicalDeviceCooperativeMatrixPropertiesNV( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceCooperativeMatrixPropertiesNV" ) ); //=== VK_NV_coverage_reduction_mode === vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV = PFN_vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV" ) ); # if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_EXT_full_screen_exclusive === vkGetPhysicalDeviceSurfacePresentModes2EXT = PFN_vkGetPhysicalDeviceSurfacePresentModes2EXT( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceSurfacePresentModes2EXT" ) ); # endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_EXT_headless_surface === vkCreateHeadlessSurfaceEXT = PFN_vkCreateHeadlessSurfaceEXT( vkGetInstanceProcAddr( instance, "vkCreateHeadlessSurfaceEXT" ) ); //=== VK_EXT_acquire_drm_display === vkAcquireDrmDisplayEXT = PFN_vkAcquireDrmDisplayEXT( vkGetInstanceProcAddr( instance, "vkAcquireDrmDisplayEXT" ) ); vkGetDrmDisplayEXT = PFN_vkGetDrmDisplayEXT( vkGetInstanceProcAddr( instance, "vkGetDrmDisplayEXT" ) ); //=== VK_KHR_video_encode_queue === vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR = PFN_vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR" ) ); # if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_NV_acquire_winrt_display === vkAcquireWinrtDisplayNV = PFN_vkAcquireWinrtDisplayNV( vkGetInstanceProcAddr( instance, "vkAcquireWinrtDisplayNV" ) ); vkGetWinrtDisplayNV = PFN_vkGetWinrtDisplayNV( vkGetInstanceProcAddr( instance, "vkGetWinrtDisplayNV" ) ); # endif /*VK_USE_PLATFORM_WIN32_KHR*/ # if defined( VK_USE_PLATFORM_DIRECTFB_EXT ) //=== VK_EXT_directfb_surface === vkCreateDirectFBSurfaceEXT = PFN_vkCreateDirectFBSurfaceEXT( vkGetInstanceProcAddr( instance, "vkCreateDirectFBSurfaceEXT" ) ); vkGetPhysicalDeviceDirectFBPresentationSupportEXT = PFN_vkGetPhysicalDeviceDirectFBPresentationSupportEXT( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceDirectFBPresentationSupportEXT" ) ); # endif /*VK_USE_PLATFORM_DIRECTFB_EXT*/ # if defined( VK_USE_PLATFORM_SCREEN_QNX ) //=== VK_QNX_screen_surface === vkCreateScreenSurfaceQNX = PFN_vkCreateScreenSurfaceQNX( vkGetInstanceProcAddr( instance, "vkCreateScreenSurfaceQNX" ) ); vkGetPhysicalDeviceScreenPresentationSupportQNX = PFN_vkGetPhysicalDeviceScreenPresentationSupportQNX( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceScreenPresentationSupportQNX" ) ); # endif /*VK_USE_PLATFORM_SCREEN_QNX*/ //=== VK_NV_optical_flow === vkGetPhysicalDeviceOpticalFlowImageFormatsNV = PFN_vkGetPhysicalDeviceOpticalFlowImageFormatsNV( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceOpticalFlowImageFormatsNV" ) ); //=== VK_NV_cooperative_vector === vkGetPhysicalDeviceCooperativeVectorPropertiesNV = PFN_vkGetPhysicalDeviceCooperativeVectorPropertiesNV( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceCooperativeVectorPropertiesNV" ) ); //=== VK_KHR_cooperative_matrix === vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR = PFN_vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR" ) ); //=== VK_KHR_calibrated_timestamps === vkGetPhysicalDeviceCalibrateableTimeDomainsKHR = PFN_vkGetPhysicalDeviceCalibrateableTimeDomainsKHR( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceCalibrateableTimeDomainsKHR" ) ); //=== VK_NV_cooperative_matrix2 === vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV = PFN_vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV( vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV" ) ); vkGetDeviceProcAddr = PFN_vkGetDeviceProcAddr( vkGetInstanceProcAddr( instance, "vkGetDeviceProcAddr" ) ); } public: //=== VK_VERSION_1_0 === PFN_vkDestroyInstance vkDestroyInstance = 0; PFN_vkEnumeratePhysicalDevices vkEnumeratePhysicalDevices = 0; PFN_vkGetPhysicalDeviceFeatures vkGetPhysicalDeviceFeatures = 0; PFN_vkGetPhysicalDeviceFormatProperties vkGetPhysicalDeviceFormatProperties = 0; PFN_vkGetPhysicalDeviceImageFormatProperties vkGetPhysicalDeviceImageFormatProperties = 0; PFN_vkGetPhysicalDeviceProperties vkGetPhysicalDeviceProperties = 0; PFN_vkGetPhysicalDeviceQueueFamilyProperties vkGetPhysicalDeviceQueueFamilyProperties = 0; PFN_vkGetPhysicalDeviceMemoryProperties vkGetPhysicalDeviceMemoryProperties = 0; PFN_vkGetInstanceProcAddr vkGetInstanceProcAddr = 0; PFN_vkCreateDevice vkCreateDevice = 0; PFN_vkEnumerateDeviceExtensionProperties vkEnumerateDeviceExtensionProperties = 0; PFN_vkEnumerateDeviceLayerProperties vkEnumerateDeviceLayerProperties = 0; PFN_vkGetPhysicalDeviceSparseImageFormatProperties vkGetPhysicalDeviceSparseImageFormatProperties = 0; //=== VK_VERSION_1_1 === PFN_vkEnumeratePhysicalDeviceGroups vkEnumeratePhysicalDeviceGroups = 0; PFN_vkGetPhysicalDeviceFeatures2 vkGetPhysicalDeviceFeatures2 = 0; PFN_vkGetPhysicalDeviceProperties2 vkGetPhysicalDeviceProperties2 = 0; PFN_vkGetPhysicalDeviceFormatProperties2 vkGetPhysicalDeviceFormatProperties2 = 0; PFN_vkGetPhysicalDeviceImageFormatProperties2 vkGetPhysicalDeviceImageFormatProperties2 = 0; PFN_vkGetPhysicalDeviceQueueFamilyProperties2 vkGetPhysicalDeviceQueueFamilyProperties2 = 0; PFN_vkGetPhysicalDeviceMemoryProperties2 vkGetPhysicalDeviceMemoryProperties2 = 0; PFN_vkGetPhysicalDeviceSparseImageFormatProperties2 vkGetPhysicalDeviceSparseImageFormatProperties2 = 0; PFN_vkGetPhysicalDeviceExternalBufferProperties vkGetPhysicalDeviceExternalBufferProperties = 0; PFN_vkGetPhysicalDeviceExternalFenceProperties vkGetPhysicalDeviceExternalFenceProperties = 0; PFN_vkGetPhysicalDeviceExternalSemaphoreProperties vkGetPhysicalDeviceExternalSemaphoreProperties = 0; //=== VK_VERSION_1_3 === PFN_vkGetPhysicalDeviceToolProperties vkGetPhysicalDeviceToolProperties = 0; //=== VK_KHR_surface === PFN_vkDestroySurfaceKHR vkDestroySurfaceKHR = 0; PFN_vkGetPhysicalDeviceSurfaceSupportKHR vkGetPhysicalDeviceSurfaceSupportKHR = 0; PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR vkGetPhysicalDeviceSurfaceCapabilitiesKHR = 0; PFN_vkGetPhysicalDeviceSurfaceFormatsKHR vkGetPhysicalDeviceSurfaceFormatsKHR = 0; PFN_vkGetPhysicalDeviceSurfacePresentModesKHR vkGetPhysicalDeviceSurfacePresentModesKHR = 0; //=== VK_KHR_swapchain === PFN_vkGetPhysicalDevicePresentRectanglesKHR vkGetPhysicalDevicePresentRectanglesKHR = 0; //=== VK_KHR_display === PFN_vkGetPhysicalDeviceDisplayPropertiesKHR vkGetPhysicalDeviceDisplayPropertiesKHR = 0; PFN_vkGetPhysicalDeviceDisplayPlanePropertiesKHR vkGetPhysicalDeviceDisplayPlanePropertiesKHR = 0; PFN_vkGetDisplayPlaneSupportedDisplaysKHR vkGetDisplayPlaneSupportedDisplaysKHR = 0; PFN_vkGetDisplayModePropertiesKHR vkGetDisplayModePropertiesKHR = 0; PFN_vkCreateDisplayModeKHR vkCreateDisplayModeKHR = 0; PFN_vkGetDisplayPlaneCapabilitiesKHR vkGetDisplayPlaneCapabilitiesKHR = 0; PFN_vkCreateDisplayPlaneSurfaceKHR vkCreateDisplayPlaneSurfaceKHR = 0; # if defined( VK_USE_PLATFORM_XLIB_KHR ) //=== VK_KHR_xlib_surface === PFN_vkCreateXlibSurfaceKHR vkCreateXlibSurfaceKHR = 0; PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR vkGetPhysicalDeviceXlibPresentationSupportKHR = 0; # else PFN_dummy vkCreateXlibSurfaceKHR_placeholder = 0; PFN_dummy vkGetPhysicalDeviceXlibPresentationSupportKHR_placeholder = 0; # endif /*VK_USE_PLATFORM_XLIB_KHR*/ # if defined( VK_USE_PLATFORM_XCB_KHR ) //=== VK_KHR_xcb_surface === PFN_vkCreateXcbSurfaceKHR vkCreateXcbSurfaceKHR = 0; PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR vkGetPhysicalDeviceXcbPresentationSupportKHR = 0; # else PFN_dummy vkCreateXcbSurfaceKHR_placeholder = 0; PFN_dummy vkGetPhysicalDeviceXcbPresentationSupportKHR_placeholder = 0; # endif /*VK_USE_PLATFORM_XCB_KHR*/ # if defined( VK_USE_PLATFORM_WAYLAND_KHR ) //=== VK_KHR_wayland_surface === PFN_vkCreateWaylandSurfaceKHR vkCreateWaylandSurfaceKHR = 0; PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR vkGetPhysicalDeviceWaylandPresentationSupportKHR = 0; # else PFN_dummy vkCreateWaylandSurfaceKHR_placeholder = 0; PFN_dummy vkGetPhysicalDeviceWaylandPresentationSupportKHR_placeholder = 0; # endif /*VK_USE_PLATFORM_WAYLAND_KHR*/ # if defined( VK_USE_PLATFORM_ANDROID_KHR ) //=== VK_KHR_android_surface === PFN_vkCreateAndroidSurfaceKHR vkCreateAndroidSurfaceKHR = 0; # else PFN_dummy vkCreateAndroidSurfaceKHR_placeholder = 0; # endif /*VK_USE_PLATFORM_ANDROID_KHR*/ # if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_KHR_win32_surface === PFN_vkCreateWin32SurfaceKHR vkCreateWin32SurfaceKHR = 0; PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR vkGetPhysicalDeviceWin32PresentationSupportKHR = 0; # else PFN_dummy vkCreateWin32SurfaceKHR_placeholder = 0; PFN_dummy vkGetPhysicalDeviceWin32PresentationSupportKHR_placeholder = 0; # endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_EXT_debug_report === PFN_vkCreateDebugReportCallbackEXT vkCreateDebugReportCallbackEXT = 0; PFN_vkDestroyDebugReportCallbackEXT vkDestroyDebugReportCallbackEXT = 0; PFN_vkDebugReportMessageEXT vkDebugReportMessageEXT = 0; //=== VK_KHR_video_queue === PFN_vkGetPhysicalDeviceVideoCapabilitiesKHR vkGetPhysicalDeviceVideoCapabilitiesKHR = 0; PFN_vkGetPhysicalDeviceVideoFormatPropertiesKHR vkGetPhysicalDeviceVideoFormatPropertiesKHR = 0; # if defined( VK_USE_PLATFORM_GGP ) //=== VK_GGP_stream_descriptor_surface === PFN_vkCreateStreamDescriptorSurfaceGGP vkCreateStreamDescriptorSurfaceGGP = 0; # else PFN_dummy vkCreateStreamDescriptorSurfaceGGP_placeholder = 0; # endif /*VK_USE_PLATFORM_GGP*/ //=== VK_NV_external_memory_capabilities === PFN_vkGetPhysicalDeviceExternalImageFormatPropertiesNV vkGetPhysicalDeviceExternalImageFormatPropertiesNV = 0; //=== VK_KHR_get_physical_device_properties2 === PFN_vkGetPhysicalDeviceFeatures2KHR vkGetPhysicalDeviceFeatures2KHR = 0; PFN_vkGetPhysicalDeviceProperties2KHR vkGetPhysicalDeviceProperties2KHR = 0; PFN_vkGetPhysicalDeviceFormatProperties2KHR vkGetPhysicalDeviceFormatProperties2KHR = 0; PFN_vkGetPhysicalDeviceImageFormatProperties2KHR vkGetPhysicalDeviceImageFormatProperties2KHR = 0; PFN_vkGetPhysicalDeviceQueueFamilyProperties2KHR vkGetPhysicalDeviceQueueFamilyProperties2KHR = 0; PFN_vkGetPhysicalDeviceMemoryProperties2KHR vkGetPhysicalDeviceMemoryProperties2KHR = 0; PFN_vkGetPhysicalDeviceSparseImageFormatProperties2KHR vkGetPhysicalDeviceSparseImageFormatProperties2KHR = 0; # if defined( VK_USE_PLATFORM_VI_NN ) //=== VK_NN_vi_surface === PFN_vkCreateViSurfaceNN vkCreateViSurfaceNN = 0; # else PFN_dummy vkCreateViSurfaceNN_placeholder = 0; # endif /*VK_USE_PLATFORM_VI_NN*/ //=== VK_KHR_device_group_creation === PFN_vkEnumeratePhysicalDeviceGroupsKHR vkEnumeratePhysicalDeviceGroupsKHR = 0; //=== VK_KHR_external_memory_capabilities === PFN_vkGetPhysicalDeviceExternalBufferPropertiesKHR vkGetPhysicalDeviceExternalBufferPropertiesKHR = 0; //=== VK_KHR_external_semaphore_capabilities === PFN_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR vkGetPhysicalDeviceExternalSemaphorePropertiesKHR = 0; //=== VK_EXT_direct_mode_display === PFN_vkReleaseDisplayEXT vkReleaseDisplayEXT = 0; # if defined( VK_USE_PLATFORM_XLIB_XRANDR_EXT ) //=== VK_EXT_acquire_xlib_display === PFN_vkAcquireXlibDisplayEXT vkAcquireXlibDisplayEXT = 0; PFN_vkGetRandROutputDisplayEXT vkGetRandROutputDisplayEXT = 0; # else PFN_dummy vkAcquireXlibDisplayEXT_placeholder = 0; PFN_dummy vkGetRandROutputDisplayEXT_placeholder = 0; # endif /*VK_USE_PLATFORM_XLIB_XRANDR_EXT*/ //=== VK_EXT_display_surface_counter === PFN_vkGetPhysicalDeviceSurfaceCapabilities2EXT vkGetPhysicalDeviceSurfaceCapabilities2EXT = 0; //=== VK_KHR_external_fence_capabilities === PFN_vkGetPhysicalDeviceExternalFencePropertiesKHR vkGetPhysicalDeviceExternalFencePropertiesKHR = 0; //=== VK_KHR_performance_query === PFN_vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR = 0; PFN_vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR = 0; //=== VK_KHR_get_surface_capabilities2 === PFN_vkGetPhysicalDeviceSurfaceCapabilities2KHR vkGetPhysicalDeviceSurfaceCapabilities2KHR = 0; PFN_vkGetPhysicalDeviceSurfaceFormats2KHR vkGetPhysicalDeviceSurfaceFormats2KHR = 0; //=== VK_KHR_get_display_properties2 === PFN_vkGetPhysicalDeviceDisplayProperties2KHR vkGetPhysicalDeviceDisplayProperties2KHR = 0; PFN_vkGetPhysicalDeviceDisplayPlaneProperties2KHR vkGetPhysicalDeviceDisplayPlaneProperties2KHR = 0; PFN_vkGetDisplayModeProperties2KHR vkGetDisplayModeProperties2KHR = 0; PFN_vkGetDisplayPlaneCapabilities2KHR vkGetDisplayPlaneCapabilities2KHR = 0; # if defined( VK_USE_PLATFORM_IOS_MVK ) //=== VK_MVK_ios_surface === PFN_vkCreateIOSSurfaceMVK vkCreateIOSSurfaceMVK = 0; # else PFN_dummy vkCreateIOSSurfaceMVK_placeholder = 0; # endif /*VK_USE_PLATFORM_IOS_MVK*/ # if defined( VK_USE_PLATFORM_MACOS_MVK ) //=== VK_MVK_macos_surface === PFN_vkCreateMacOSSurfaceMVK vkCreateMacOSSurfaceMVK = 0; # else PFN_dummy vkCreateMacOSSurfaceMVK_placeholder = 0; # endif /*VK_USE_PLATFORM_MACOS_MVK*/ //=== VK_EXT_debug_utils === PFN_vkCreateDebugUtilsMessengerEXT vkCreateDebugUtilsMessengerEXT = 0; PFN_vkDestroyDebugUtilsMessengerEXT vkDestroyDebugUtilsMessengerEXT = 0; PFN_vkSubmitDebugUtilsMessageEXT vkSubmitDebugUtilsMessageEXT = 0; //=== VK_EXT_sample_locations === PFN_vkGetPhysicalDeviceMultisamplePropertiesEXT vkGetPhysicalDeviceMultisamplePropertiesEXT = 0; //=== VK_EXT_calibrated_timestamps === PFN_vkGetPhysicalDeviceCalibrateableTimeDomainsEXT vkGetPhysicalDeviceCalibrateableTimeDomainsEXT = 0; # if defined( VK_USE_PLATFORM_FUCHSIA ) //=== VK_FUCHSIA_imagepipe_surface === PFN_vkCreateImagePipeSurfaceFUCHSIA vkCreateImagePipeSurfaceFUCHSIA = 0; # else PFN_dummy vkCreateImagePipeSurfaceFUCHSIA_placeholder = 0; # endif /*VK_USE_PLATFORM_FUCHSIA*/ # if defined( VK_USE_PLATFORM_METAL_EXT ) //=== VK_EXT_metal_surface === PFN_vkCreateMetalSurfaceEXT vkCreateMetalSurfaceEXT = 0; # else PFN_dummy vkCreateMetalSurfaceEXT_placeholder = 0; # endif /*VK_USE_PLATFORM_METAL_EXT*/ //=== VK_KHR_fragment_shading_rate === PFN_vkGetPhysicalDeviceFragmentShadingRatesKHR vkGetPhysicalDeviceFragmentShadingRatesKHR = 0; //=== VK_EXT_tooling_info === PFN_vkGetPhysicalDeviceToolPropertiesEXT vkGetPhysicalDeviceToolPropertiesEXT = 0; //=== VK_NV_cooperative_matrix === PFN_vkGetPhysicalDeviceCooperativeMatrixPropertiesNV vkGetPhysicalDeviceCooperativeMatrixPropertiesNV = 0; //=== VK_NV_coverage_reduction_mode === PFN_vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV = 0; # if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_EXT_full_screen_exclusive === PFN_vkGetPhysicalDeviceSurfacePresentModes2EXT vkGetPhysicalDeviceSurfacePresentModes2EXT = 0; # else PFN_dummy vkGetPhysicalDeviceSurfacePresentModes2EXT_placeholder = 0; # endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_EXT_headless_surface === PFN_vkCreateHeadlessSurfaceEXT vkCreateHeadlessSurfaceEXT = 0; //=== VK_EXT_acquire_drm_display === PFN_vkAcquireDrmDisplayEXT vkAcquireDrmDisplayEXT = 0; PFN_vkGetDrmDisplayEXT vkGetDrmDisplayEXT = 0; //=== VK_KHR_video_encode_queue === PFN_vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR = 0; # if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_NV_acquire_winrt_display === PFN_vkAcquireWinrtDisplayNV vkAcquireWinrtDisplayNV = 0; PFN_vkGetWinrtDisplayNV vkGetWinrtDisplayNV = 0; # else PFN_dummy vkAcquireWinrtDisplayNV_placeholder = 0; PFN_dummy vkGetWinrtDisplayNV_placeholder = 0; # endif /*VK_USE_PLATFORM_WIN32_KHR*/ # if defined( VK_USE_PLATFORM_DIRECTFB_EXT ) //=== VK_EXT_directfb_surface === PFN_vkCreateDirectFBSurfaceEXT vkCreateDirectFBSurfaceEXT = 0; PFN_vkGetPhysicalDeviceDirectFBPresentationSupportEXT vkGetPhysicalDeviceDirectFBPresentationSupportEXT = 0; # else PFN_dummy vkCreateDirectFBSurfaceEXT_placeholder = 0; PFN_dummy vkGetPhysicalDeviceDirectFBPresentationSupportEXT_placeholder = 0; # endif /*VK_USE_PLATFORM_DIRECTFB_EXT*/ # if defined( VK_USE_PLATFORM_SCREEN_QNX ) //=== VK_QNX_screen_surface === PFN_vkCreateScreenSurfaceQNX vkCreateScreenSurfaceQNX = 0; PFN_vkGetPhysicalDeviceScreenPresentationSupportQNX vkGetPhysicalDeviceScreenPresentationSupportQNX = 0; # else PFN_dummy vkCreateScreenSurfaceQNX_placeholder = 0; PFN_dummy vkGetPhysicalDeviceScreenPresentationSupportQNX_placeholder = 0; # endif /*VK_USE_PLATFORM_SCREEN_QNX*/ //=== VK_NV_optical_flow === PFN_vkGetPhysicalDeviceOpticalFlowImageFormatsNV vkGetPhysicalDeviceOpticalFlowImageFormatsNV = 0; //=== VK_NV_cooperative_vector === PFN_vkGetPhysicalDeviceCooperativeVectorPropertiesNV vkGetPhysicalDeviceCooperativeVectorPropertiesNV = 0; //=== VK_KHR_cooperative_matrix === PFN_vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR = 0; //=== VK_KHR_calibrated_timestamps === PFN_vkGetPhysicalDeviceCalibrateableTimeDomainsKHR vkGetPhysicalDeviceCalibrateableTimeDomainsKHR = 0; //=== VK_NV_cooperative_matrix2 === PFN_vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV = 0; PFN_vkGetDeviceProcAddr vkGetDeviceProcAddr = 0; }; class DeviceDispatcher : public ::VULKAN_HPP_NAMESPACE::detail::DispatchLoaderBase { public: DeviceDispatcher( PFN_vkGetDeviceProcAddr getProcAddr, VkDevice device ) : vkGetDeviceProcAddr( getProcAddr ) { //=== VK_VERSION_1_0 === vkGetDeviceProcAddr = PFN_vkGetDeviceProcAddr( vkGetDeviceProcAddr( device, "vkGetDeviceProcAddr" ) ); vkDestroyDevice = PFN_vkDestroyDevice( vkGetDeviceProcAddr( device, "vkDestroyDevice" ) ); vkGetDeviceQueue = PFN_vkGetDeviceQueue( vkGetDeviceProcAddr( device, "vkGetDeviceQueue" ) ); vkQueueSubmit = PFN_vkQueueSubmit( vkGetDeviceProcAddr( device, "vkQueueSubmit" ) ); vkQueueWaitIdle = PFN_vkQueueWaitIdle( vkGetDeviceProcAddr( device, "vkQueueWaitIdle" ) ); vkDeviceWaitIdle = PFN_vkDeviceWaitIdle( vkGetDeviceProcAddr( device, "vkDeviceWaitIdle" ) ); vkAllocateMemory = PFN_vkAllocateMemory( vkGetDeviceProcAddr( device, "vkAllocateMemory" ) ); vkFreeMemory = PFN_vkFreeMemory( vkGetDeviceProcAddr( device, "vkFreeMemory" ) ); vkMapMemory = PFN_vkMapMemory( vkGetDeviceProcAddr( device, "vkMapMemory" ) ); vkUnmapMemory = PFN_vkUnmapMemory( vkGetDeviceProcAddr( device, "vkUnmapMemory" ) ); vkFlushMappedMemoryRanges = PFN_vkFlushMappedMemoryRanges( vkGetDeviceProcAddr( device, "vkFlushMappedMemoryRanges" ) ); vkInvalidateMappedMemoryRanges = PFN_vkInvalidateMappedMemoryRanges( vkGetDeviceProcAddr( device, "vkInvalidateMappedMemoryRanges" ) ); vkGetDeviceMemoryCommitment = PFN_vkGetDeviceMemoryCommitment( vkGetDeviceProcAddr( device, "vkGetDeviceMemoryCommitment" ) ); vkBindBufferMemory = PFN_vkBindBufferMemory( vkGetDeviceProcAddr( device, "vkBindBufferMemory" ) ); vkBindImageMemory = PFN_vkBindImageMemory( vkGetDeviceProcAddr( device, "vkBindImageMemory" ) ); vkGetBufferMemoryRequirements = PFN_vkGetBufferMemoryRequirements( vkGetDeviceProcAddr( device, "vkGetBufferMemoryRequirements" ) ); vkGetImageMemoryRequirements = PFN_vkGetImageMemoryRequirements( vkGetDeviceProcAddr( device, "vkGetImageMemoryRequirements" ) ); vkGetImageSparseMemoryRequirements = PFN_vkGetImageSparseMemoryRequirements( vkGetDeviceProcAddr( device, "vkGetImageSparseMemoryRequirements" ) ); vkQueueBindSparse = PFN_vkQueueBindSparse( vkGetDeviceProcAddr( device, "vkQueueBindSparse" ) ); vkCreateFence = PFN_vkCreateFence( vkGetDeviceProcAddr( device, "vkCreateFence" ) ); vkDestroyFence = PFN_vkDestroyFence( vkGetDeviceProcAddr( device, "vkDestroyFence" ) ); vkResetFences = PFN_vkResetFences( vkGetDeviceProcAddr( device, "vkResetFences" ) ); vkGetFenceStatus = PFN_vkGetFenceStatus( vkGetDeviceProcAddr( device, "vkGetFenceStatus" ) ); vkWaitForFences = PFN_vkWaitForFences( vkGetDeviceProcAddr( device, "vkWaitForFences" ) ); vkCreateSemaphore = PFN_vkCreateSemaphore( vkGetDeviceProcAddr( device, "vkCreateSemaphore" ) ); vkDestroySemaphore = PFN_vkDestroySemaphore( vkGetDeviceProcAddr( device, "vkDestroySemaphore" ) ); vkCreateEvent = PFN_vkCreateEvent( vkGetDeviceProcAddr( device, "vkCreateEvent" ) ); vkDestroyEvent = PFN_vkDestroyEvent( vkGetDeviceProcAddr( device, "vkDestroyEvent" ) ); vkGetEventStatus = PFN_vkGetEventStatus( vkGetDeviceProcAddr( device, "vkGetEventStatus" ) ); vkSetEvent = PFN_vkSetEvent( vkGetDeviceProcAddr( device, "vkSetEvent" ) ); vkResetEvent = PFN_vkResetEvent( vkGetDeviceProcAddr( device, "vkResetEvent" ) ); vkCreateQueryPool = PFN_vkCreateQueryPool( vkGetDeviceProcAddr( device, "vkCreateQueryPool" ) ); vkDestroyQueryPool = PFN_vkDestroyQueryPool( vkGetDeviceProcAddr( device, "vkDestroyQueryPool" ) ); vkGetQueryPoolResults = PFN_vkGetQueryPoolResults( vkGetDeviceProcAddr( device, "vkGetQueryPoolResults" ) ); vkCreateBuffer = PFN_vkCreateBuffer( vkGetDeviceProcAddr( device, "vkCreateBuffer" ) ); vkDestroyBuffer = PFN_vkDestroyBuffer( vkGetDeviceProcAddr( device, "vkDestroyBuffer" ) ); vkCreateBufferView = PFN_vkCreateBufferView( vkGetDeviceProcAddr( device, "vkCreateBufferView" ) ); vkDestroyBufferView = PFN_vkDestroyBufferView( vkGetDeviceProcAddr( device, "vkDestroyBufferView" ) ); vkCreateImage = PFN_vkCreateImage( vkGetDeviceProcAddr( device, "vkCreateImage" ) ); vkDestroyImage = PFN_vkDestroyImage( vkGetDeviceProcAddr( device, "vkDestroyImage" ) ); vkGetImageSubresourceLayout = PFN_vkGetImageSubresourceLayout( vkGetDeviceProcAddr( device, "vkGetImageSubresourceLayout" ) ); vkCreateImageView = PFN_vkCreateImageView( vkGetDeviceProcAddr( device, "vkCreateImageView" ) ); vkDestroyImageView = PFN_vkDestroyImageView( vkGetDeviceProcAddr( device, "vkDestroyImageView" ) ); vkCreateShaderModule = PFN_vkCreateShaderModule( vkGetDeviceProcAddr( device, "vkCreateShaderModule" ) ); vkDestroyShaderModule = PFN_vkDestroyShaderModule( vkGetDeviceProcAddr( device, "vkDestroyShaderModule" ) ); vkCreatePipelineCache = PFN_vkCreatePipelineCache( vkGetDeviceProcAddr( device, "vkCreatePipelineCache" ) ); vkDestroyPipelineCache = PFN_vkDestroyPipelineCache( vkGetDeviceProcAddr( device, "vkDestroyPipelineCache" ) ); vkGetPipelineCacheData = PFN_vkGetPipelineCacheData( vkGetDeviceProcAddr( device, "vkGetPipelineCacheData" ) ); vkMergePipelineCaches = PFN_vkMergePipelineCaches( vkGetDeviceProcAddr( device, "vkMergePipelineCaches" ) ); vkCreateGraphicsPipelines = PFN_vkCreateGraphicsPipelines( vkGetDeviceProcAddr( device, "vkCreateGraphicsPipelines" ) ); vkCreateComputePipelines = PFN_vkCreateComputePipelines( vkGetDeviceProcAddr( device, "vkCreateComputePipelines" ) ); vkDestroyPipeline = PFN_vkDestroyPipeline( vkGetDeviceProcAddr( device, "vkDestroyPipeline" ) ); vkCreatePipelineLayout = PFN_vkCreatePipelineLayout( vkGetDeviceProcAddr( device, "vkCreatePipelineLayout" ) ); vkDestroyPipelineLayout = PFN_vkDestroyPipelineLayout( vkGetDeviceProcAddr( device, "vkDestroyPipelineLayout" ) ); vkCreateSampler = PFN_vkCreateSampler( vkGetDeviceProcAddr( device, "vkCreateSampler" ) ); vkDestroySampler = PFN_vkDestroySampler( vkGetDeviceProcAddr( device, "vkDestroySampler" ) ); vkCreateDescriptorSetLayout = PFN_vkCreateDescriptorSetLayout( vkGetDeviceProcAddr( device, "vkCreateDescriptorSetLayout" ) ); vkDestroyDescriptorSetLayout = PFN_vkDestroyDescriptorSetLayout( vkGetDeviceProcAddr( device, "vkDestroyDescriptorSetLayout" ) ); vkCreateDescriptorPool = PFN_vkCreateDescriptorPool( vkGetDeviceProcAddr( device, "vkCreateDescriptorPool" ) ); vkDestroyDescriptorPool = PFN_vkDestroyDescriptorPool( vkGetDeviceProcAddr( device, "vkDestroyDescriptorPool" ) ); vkResetDescriptorPool = PFN_vkResetDescriptorPool( vkGetDeviceProcAddr( device, "vkResetDescriptorPool" ) ); vkAllocateDescriptorSets = PFN_vkAllocateDescriptorSets( vkGetDeviceProcAddr( device, "vkAllocateDescriptorSets" ) ); vkFreeDescriptorSets = PFN_vkFreeDescriptorSets( vkGetDeviceProcAddr( device, "vkFreeDescriptorSets" ) ); vkUpdateDescriptorSets = PFN_vkUpdateDescriptorSets( vkGetDeviceProcAddr( device, "vkUpdateDescriptorSets" ) ); vkCreateFramebuffer = PFN_vkCreateFramebuffer( vkGetDeviceProcAddr( device, "vkCreateFramebuffer" ) ); vkDestroyFramebuffer = PFN_vkDestroyFramebuffer( vkGetDeviceProcAddr( device, "vkDestroyFramebuffer" ) ); vkCreateRenderPass = PFN_vkCreateRenderPass( vkGetDeviceProcAddr( device, "vkCreateRenderPass" ) ); vkDestroyRenderPass = PFN_vkDestroyRenderPass( vkGetDeviceProcAddr( device, "vkDestroyRenderPass" ) ); vkGetRenderAreaGranularity = PFN_vkGetRenderAreaGranularity( vkGetDeviceProcAddr( device, "vkGetRenderAreaGranularity" ) ); vkCreateCommandPool = PFN_vkCreateCommandPool( vkGetDeviceProcAddr( device, "vkCreateCommandPool" ) ); vkDestroyCommandPool = PFN_vkDestroyCommandPool( vkGetDeviceProcAddr( device, "vkDestroyCommandPool" ) ); vkResetCommandPool = PFN_vkResetCommandPool( vkGetDeviceProcAddr( device, "vkResetCommandPool" ) ); vkAllocateCommandBuffers = PFN_vkAllocateCommandBuffers( vkGetDeviceProcAddr( device, "vkAllocateCommandBuffers" ) ); vkFreeCommandBuffers = PFN_vkFreeCommandBuffers( vkGetDeviceProcAddr( device, "vkFreeCommandBuffers" ) ); vkBeginCommandBuffer = PFN_vkBeginCommandBuffer( vkGetDeviceProcAddr( device, "vkBeginCommandBuffer" ) ); vkEndCommandBuffer = PFN_vkEndCommandBuffer( vkGetDeviceProcAddr( device, "vkEndCommandBuffer" ) ); vkResetCommandBuffer = PFN_vkResetCommandBuffer( vkGetDeviceProcAddr( device, "vkResetCommandBuffer" ) ); vkCmdBindPipeline = PFN_vkCmdBindPipeline( vkGetDeviceProcAddr( device, "vkCmdBindPipeline" ) ); vkCmdSetViewport = PFN_vkCmdSetViewport( vkGetDeviceProcAddr( device, "vkCmdSetViewport" ) ); vkCmdSetScissor = PFN_vkCmdSetScissor( vkGetDeviceProcAddr( device, "vkCmdSetScissor" ) ); vkCmdSetLineWidth = PFN_vkCmdSetLineWidth( vkGetDeviceProcAddr( device, "vkCmdSetLineWidth" ) ); vkCmdSetDepthBias = PFN_vkCmdSetDepthBias( vkGetDeviceProcAddr( device, "vkCmdSetDepthBias" ) ); vkCmdSetBlendConstants = PFN_vkCmdSetBlendConstants( vkGetDeviceProcAddr( device, "vkCmdSetBlendConstants" ) ); vkCmdSetDepthBounds = PFN_vkCmdSetDepthBounds( vkGetDeviceProcAddr( device, "vkCmdSetDepthBounds" ) ); vkCmdSetStencilCompareMask = PFN_vkCmdSetStencilCompareMask( vkGetDeviceProcAddr( device, "vkCmdSetStencilCompareMask" ) ); vkCmdSetStencilWriteMask = PFN_vkCmdSetStencilWriteMask( vkGetDeviceProcAddr( device, "vkCmdSetStencilWriteMask" ) ); vkCmdSetStencilReference = PFN_vkCmdSetStencilReference( vkGetDeviceProcAddr( device, "vkCmdSetStencilReference" ) ); vkCmdBindDescriptorSets = PFN_vkCmdBindDescriptorSets( vkGetDeviceProcAddr( device, "vkCmdBindDescriptorSets" ) ); vkCmdBindIndexBuffer = PFN_vkCmdBindIndexBuffer( vkGetDeviceProcAddr( device, "vkCmdBindIndexBuffer" ) ); vkCmdBindVertexBuffers = PFN_vkCmdBindVertexBuffers( vkGetDeviceProcAddr( device, "vkCmdBindVertexBuffers" ) ); vkCmdDraw = PFN_vkCmdDraw( vkGetDeviceProcAddr( device, "vkCmdDraw" ) ); vkCmdDrawIndexed = PFN_vkCmdDrawIndexed( vkGetDeviceProcAddr( device, "vkCmdDrawIndexed" ) ); vkCmdDrawIndirect = PFN_vkCmdDrawIndirect( vkGetDeviceProcAddr( device, "vkCmdDrawIndirect" ) ); vkCmdDrawIndexedIndirect = PFN_vkCmdDrawIndexedIndirect( vkGetDeviceProcAddr( device, "vkCmdDrawIndexedIndirect" ) ); vkCmdDispatch = PFN_vkCmdDispatch( vkGetDeviceProcAddr( device, "vkCmdDispatch" ) ); vkCmdDispatchIndirect = PFN_vkCmdDispatchIndirect( vkGetDeviceProcAddr( device, "vkCmdDispatchIndirect" ) ); vkCmdCopyBuffer = PFN_vkCmdCopyBuffer( vkGetDeviceProcAddr( device, "vkCmdCopyBuffer" ) ); vkCmdCopyImage = PFN_vkCmdCopyImage( vkGetDeviceProcAddr( device, "vkCmdCopyImage" ) ); vkCmdBlitImage = PFN_vkCmdBlitImage( vkGetDeviceProcAddr( device, "vkCmdBlitImage" ) ); vkCmdCopyBufferToImage = PFN_vkCmdCopyBufferToImage( vkGetDeviceProcAddr( device, "vkCmdCopyBufferToImage" ) ); vkCmdCopyImageToBuffer = PFN_vkCmdCopyImageToBuffer( vkGetDeviceProcAddr( device, "vkCmdCopyImageToBuffer" ) ); vkCmdUpdateBuffer = PFN_vkCmdUpdateBuffer( vkGetDeviceProcAddr( device, "vkCmdUpdateBuffer" ) ); vkCmdFillBuffer = PFN_vkCmdFillBuffer( vkGetDeviceProcAddr( device, "vkCmdFillBuffer" ) ); vkCmdClearColorImage = PFN_vkCmdClearColorImage( vkGetDeviceProcAddr( device, "vkCmdClearColorImage" ) ); vkCmdClearDepthStencilImage = PFN_vkCmdClearDepthStencilImage( vkGetDeviceProcAddr( device, "vkCmdClearDepthStencilImage" ) ); vkCmdClearAttachments = PFN_vkCmdClearAttachments( vkGetDeviceProcAddr( device, "vkCmdClearAttachments" ) ); vkCmdResolveImage = PFN_vkCmdResolveImage( vkGetDeviceProcAddr( device, "vkCmdResolveImage" ) ); vkCmdSetEvent = PFN_vkCmdSetEvent( vkGetDeviceProcAddr( device, "vkCmdSetEvent" ) ); vkCmdResetEvent = PFN_vkCmdResetEvent( vkGetDeviceProcAddr( device, "vkCmdResetEvent" ) ); vkCmdWaitEvents = PFN_vkCmdWaitEvents( vkGetDeviceProcAddr( device, "vkCmdWaitEvents" ) ); vkCmdPipelineBarrier = PFN_vkCmdPipelineBarrier( vkGetDeviceProcAddr( device, "vkCmdPipelineBarrier" ) ); vkCmdBeginQuery = PFN_vkCmdBeginQuery( vkGetDeviceProcAddr( device, "vkCmdBeginQuery" ) ); vkCmdEndQuery = PFN_vkCmdEndQuery( vkGetDeviceProcAddr( device, "vkCmdEndQuery" ) ); vkCmdResetQueryPool = PFN_vkCmdResetQueryPool( vkGetDeviceProcAddr( device, "vkCmdResetQueryPool" ) ); vkCmdWriteTimestamp = PFN_vkCmdWriteTimestamp( vkGetDeviceProcAddr( device, "vkCmdWriteTimestamp" ) ); vkCmdCopyQueryPoolResults = PFN_vkCmdCopyQueryPoolResults( vkGetDeviceProcAddr( device, "vkCmdCopyQueryPoolResults" ) ); vkCmdPushConstants = PFN_vkCmdPushConstants( vkGetDeviceProcAddr( device, "vkCmdPushConstants" ) ); vkCmdBeginRenderPass = PFN_vkCmdBeginRenderPass( vkGetDeviceProcAddr( device, "vkCmdBeginRenderPass" ) ); vkCmdNextSubpass = PFN_vkCmdNextSubpass( vkGetDeviceProcAddr( device, "vkCmdNextSubpass" ) ); vkCmdEndRenderPass = PFN_vkCmdEndRenderPass( vkGetDeviceProcAddr( device, "vkCmdEndRenderPass" ) ); vkCmdExecuteCommands = PFN_vkCmdExecuteCommands( vkGetDeviceProcAddr( device, "vkCmdExecuteCommands" ) ); //=== VK_VERSION_1_1 === vkBindBufferMemory2 = PFN_vkBindBufferMemory2( vkGetDeviceProcAddr( device, "vkBindBufferMemory2" ) ); vkBindImageMemory2 = PFN_vkBindImageMemory2( vkGetDeviceProcAddr( device, "vkBindImageMemory2" ) ); vkGetDeviceGroupPeerMemoryFeatures = PFN_vkGetDeviceGroupPeerMemoryFeatures( vkGetDeviceProcAddr( device, "vkGetDeviceGroupPeerMemoryFeatures" ) ); vkCmdSetDeviceMask = PFN_vkCmdSetDeviceMask( vkGetDeviceProcAddr( device, "vkCmdSetDeviceMask" ) ); vkCmdDispatchBase = PFN_vkCmdDispatchBase( vkGetDeviceProcAddr( device, "vkCmdDispatchBase" ) ); vkGetImageMemoryRequirements2 = PFN_vkGetImageMemoryRequirements2( vkGetDeviceProcAddr( device, "vkGetImageMemoryRequirements2" ) ); vkGetBufferMemoryRequirements2 = PFN_vkGetBufferMemoryRequirements2( vkGetDeviceProcAddr( device, "vkGetBufferMemoryRequirements2" ) ); vkGetImageSparseMemoryRequirements2 = PFN_vkGetImageSparseMemoryRequirements2( vkGetDeviceProcAddr( device, "vkGetImageSparseMemoryRequirements2" ) ); vkTrimCommandPool = PFN_vkTrimCommandPool( vkGetDeviceProcAddr( device, "vkTrimCommandPool" ) ); vkGetDeviceQueue2 = PFN_vkGetDeviceQueue2( vkGetDeviceProcAddr( device, "vkGetDeviceQueue2" ) ); vkCreateSamplerYcbcrConversion = PFN_vkCreateSamplerYcbcrConversion( vkGetDeviceProcAddr( device, "vkCreateSamplerYcbcrConversion" ) ); vkDestroySamplerYcbcrConversion = PFN_vkDestroySamplerYcbcrConversion( vkGetDeviceProcAddr( device, "vkDestroySamplerYcbcrConversion" ) ); vkCreateDescriptorUpdateTemplate = PFN_vkCreateDescriptorUpdateTemplate( vkGetDeviceProcAddr( device, "vkCreateDescriptorUpdateTemplate" ) ); vkDestroyDescriptorUpdateTemplate = PFN_vkDestroyDescriptorUpdateTemplate( vkGetDeviceProcAddr( device, "vkDestroyDescriptorUpdateTemplate" ) ); vkUpdateDescriptorSetWithTemplate = PFN_vkUpdateDescriptorSetWithTemplate( vkGetDeviceProcAddr( device, "vkUpdateDescriptorSetWithTemplate" ) ); vkGetDescriptorSetLayoutSupport = PFN_vkGetDescriptorSetLayoutSupport( vkGetDeviceProcAddr( device, "vkGetDescriptorSetLayoutSupport" ) ); //=== VK_VERSION_1_2 === vkCmdDrawIndirectCount = PFN_vkCmdDrawIndirectCount( vkGetDeviceProcAddr( device, "vkCmdDrawIndirectCount" ) ); vkCmdDrawIndexedIndirectCount = PFN_vkCmdDrawIndexedIndirectCount( vkGetDeviceProcAddr( device, "vkCmdDrawIndexedIndirectCount" ) ); vkCreateRenderPass2 = PFN_vkCreateRenderPass2( vkGetDeviceProcAddr( device, "vkCreateRenderPass2" ) ); vkCmdBeginRenderPass2 = PFN_vkCmdBeginRenderPass2( vkGetDeviceProcAddr( device, "vkCmdBeginRenderPass2" ) ); vkCmdNextSubpass2 = PFN_vkCmdNextSubpass2( vkGetDeviceProcAddr( device, "vkCmdNextSubpass2" ) ); vkCmdEndRenderPass2 = PFN_vkCmdEndRenderPass2( vkGetDeviceProcAddr( device, "vkCmdEndRenderPass2" ) ); vkResetQueryPool = PFN_vkResetQueryPool( vkGetDeviceProcAddr( device, "vkResetQueryPool" ) ); vkGetSemaphoreCounterValue = PFN_vkGetSemaphoreCounterValue( vkGetDeviceProcAddr( device, "vkGetSemaphoreCounterValue" ) ); vkWaitSemaphores = PFN_vkWaitSemaphores( vkGetDeviceProcAddr( device, "vkWaitSemaphores" ) ); vkSignalSemaphore = PFN_vkSignalSemaphore( vkGetDeviceProcAddr( device, "vkSignalSemaphore" ) ); vkGetBufferDeviceAddress = PFN_vkGetBufferDeviceAddress( vkGetDeviceProcAddr( device, "vkGetBufferDeviceAddress" ) ); vkGetBufferOpaqueCaptureAddress = PFN_vkGetBufferOpaqueCaptureAddress( vkGetDeviceProcAddr( device, "vkGetBufferOpaqueCaptureAddress" ) ); vkGetDeviceMemoryOpaqueCaptureAddress = PFN_vkGetDeviceMemoryOpaqueCaptureAddress( vkGetDeviceProcAddr( device, "vkGetDeviceMemoryOpaqueCaptureAddress" ) ); //=== VK_VERSION_1_3 === vkCreatePrivateDataSlot = PFN_vkCreatePrivateDataSlot( vkGetDeviceProcAddr( device, "vkCreatePrivateDataSlot" ) ); vkDestroyPrivateDataSlot = PFN_vkDestroyPrivateDataSlot( vkGetDeviceProcAddr( device, "vkDestroyPrivateDataSlot" ) ); vkSetPrivateData = PFN_vkSetPrivateData( vkGetDeviceProcAddr( device, "vkSetPrivateData" ) ); vkGetPrivateData = PFN_vkGetPrivateData( vkGetDeviceProcAddr( device, "vkGetPrivateData" ) ); vkCmdSetEvent2 = PFN_vkCmdSetEvent2( vkGetDeviceProcAddr( device, "vkCmdSetEvent2" ) ); vkCmdResetEvent2 = PFN_vkCmdResetEvent2( vkGetDeviceProcAddr( device, "vkCmdResetEvent2" ) ); vkCmdWaitEvents2 = PFN_vkCmdWaitEvents2( vkGetDeviceProcAddr( device, "vkCmdWaitEvents2" ) ); vkCmdPipelineBarrier2 = PFN_vkCmdPipelineBarrier2( vkGetDeviceProcAddr( device, "vkCmdPipelineBarrier2" ) ); vkCmdWriteTimestamp2 = PFN_vkCmdWriteTimestamp2( vkGetDeviceProcAddr( device, "vkCmdWriteTimestamp2" ) ); vkQueueSubmit2 = PFN_vkQueueSubmit2( vkGetDeviceProcAddr( device, "vkQueueSubmit2" ) ); vkCmdCopyBuffer2 = PFN_vkCmdCopyBuffer2( vkGetDeviceProcAddr( device, "vkCmdCopyBuffer2" ) ); vkCmdCopyImage2 = PFN_vkCmdCopyImage2( vkGetDeviceProcAddr( device, "vkCmdCopyImage2" ) ); vkCmdCopyBufferToImage2 = PFN_vkCmdCopyBufferToImage2( vkGetDeviceProcAddr( device, "vkCmdCopyBufferToImage2" ) ); vkCmdCopyImageToBuffer2 = PFN_vkCmdCopyImageToBuffer2( vkGetDeviceProcAddr( device, "vkCmdCopyImageToBuffer2" ) ); vkCmdBlitImage2 = PFN_vkCmdBlitImage2( vkGetDeviceProcAddr( device, "vkCmdBlitImage2" ) ); vkCmdResolveImage2 = PFN_vkCmdResolveImage2( vkGetDeviceProcAddr( device, "vkCmdResolveImage2" ) ); vkCmdBeginRendering = PFN_vkCmdBeginRendering( vkGetDeviceProcAddr( device, "vkCmdBeginRendering" ) ); vkCmdEndRendering = PFN_vkCmdEndRendering( vkGetDeviceProcAddr( device, "vkCmdEndRendering" ) ); vkCmdSetCullMode = PFN_vkCmdSetCullMode( vkGetDeviceProcAddr( device, "vkCmdSetCullMode" ) ); vkCmdSetFrontFace = PFN_vkCmdSetFrontFace( vkGetDeviceProcAddr( device, "vkCmdSetFrontFace" ) ); vkCmdSetPrimitiveTopology = PFN_vkCmdSetPrimitiveTopology( vkGetDeviceProcAddr( device, "vkCmdSetPrimitiveTopology" ) ); vkCmdSetViewportWithCount = PFN_vkCmdSetViewportWithCount( vkGetDeviceProcAddr( device, "vkCmdSetViewportWithCount" ) ); vkCmdSetScissorWithCount = PFN_vkCmdSetScissorWithCount( vkGetDeviceProcAddr( device, "vkCmdSetScissorWithCount" ) ); vkCmdBindVertexBuffers2 = PFN_vkCmdBindVertexBuffers2( vkGetDeviceProcAddr( device, "vkCmdBindVertexBuffers2" ) ); vkCmdSetDepthTestEnable = PFN_vkCmdSetDepthTestEnable( vkGetDeviceProcAddr( device, "vkCmdSetDepthTestEnable" ) ); vkCmdSetDepthWriteEnable = PFN_vkCmdSetDepthWriteEnable( vkGetDeviceProcAddr( device, "vkCmdSetDepthWriteEnable" ) ); vkCmdSetDepthCompareOp = PFN_vkCmdSetDepthCompareOp( vkGetDeviceProcAddr( device, "vkCmdSetDepthCompareOp" ) ); vkCmdSetDepthBoundsTestEnable = PFN_vkCmdSetDepthBoundsTestEnable( vkGetDeviceProcAddr( device, "vkCmdSetDepthBoundsTestEnable" ) ); vkCmdSetStencilTestEnable = PFN_vkCmdSetStencilTestEnable( vkGetDeviceProcAddr( device, "vkCmdSetStencilTestEnable" ) ); vkCmdSetStencilOp = PFN_vkCmdSetStencilOp( vkGetDeviceProcAddr( device, "vkCmdSetStencilOp" ) ); vkCmdSetRasterizerDiscardEnable = PFN_vkCmdSetRasterizerDiscardEnable( vkGetDeviceProcAddr( device, "vkCmdSetRasterizerDiscardEnable" ) ); vkCmdSetDepthBiasEnable = PFN_vkCmdSetDepthBiasEnable( vkGetDeviceProcAddr( device, "vkCmdSetDepthBiasEnable" ) ); vkCmdSetPrimitiveRestartEnable = PFN_vkCmdSetPrimitiveRestartEnable( vkGetDeviceProcAddr( device, "vkCmdSetPrimitiveRestartEnable" ) ); vkGetDeviceBufferMemoryRequirements = PFN_vkGetDeviceBufferMemoryRequirements( vkGetDeviceProcAddr( device, "vkGetDeviceBufferMemoryRequirements" ) ); vkGetDeviceImageMemoryRequirements = PFN_vkGetDeviceImageMemoryRequirements( vkGetDeviceProcAddr( device, "vkGetDeviceImageMemoryRequirements" ) ); vkGetDeviceImageSparseMemoryRequirements = PFN_vkGetDeviceImageSparseMemoryRequirements( vkGetDeviceProcAddr( device, "vkGetDeviceImageSparseMemoryRequirements" ) ); //=== VK_VERSION_1_4 === vkCmdSetLineStipple = PFN_vkCmdSetLineStipple( vkGetDeviceProcAddr( device, "vkCmdSetLineStipple" ) ); vkMapMemory2 = PFN_vkMapMemory2( vkGetDeviceProcAddr( device, "vkMapMemory2" ) ); vkUnmapMemory2 = PFN_vkUnmapMemory2( vkGetDeviceProcAddr( device, "vkUnmapMemory2" ) ); vkCmdBindIndexBuffer2 = PFN_vkCmdBindIndexBuffer2( vkGetDeviceProcAddr( device, "vkCmdBindIndexBuffer2" ) ); vkGetRenderingAreaGranularity = PFN_vkGetRenderingAreaGranularity( vkGetDeviceProcAddr( device, "vkGetRenderingAreaGranularity" ) ); vkGetDeviceImageSubresourceLayout = PFN_vkGetDeviceImageSubresourceLayout( vkGetDeviceProcAddr( device, "vkGetDeviceImageSubresourceLayout" ) ); vkGetImageSubresourceLayout2 = PFN_vkGetImageSubresourceLayout2( vkGetDeviceProcAddr( device, "vkGetImageSubresourceLayout2" ) ); vkCmdPushDescriptorSet = PFN_vkCmdPushDescriptorSet( vkGetDeviceProcAddr( device, "vkCmdPushDescriptorSet" ) ); vkCmdPushDescriptorSetWithTemplate = PFN_vkCmdPushDescriptorSetWithTemplate( vkGetDeviceProcAddr( device, "vkCmdPushDescriptorSetWithTemplate" ) ); vkCmdSetRenderingAttachmentLocations = PFN_vkCmdSetRenderingAttachmentLocations( vkGetDeviceProcAddr( device, "vkCmdSetRenderingAttachmentLocations" ) ); vkCmdSetRenderingInputAttachmentIndices = PFN_vkCmdSetRenderingInputAttachmentIndices( vkGetDeviceProcAddr( device, "vkCmdSetRenderingInputAttachmentIndices" ) ); vkCmdBindDescriptorSets2 = PFN_vkCmdBindDescriptorSets2( vkGetDeviceProcAddr( device, "vkCmdBindDescriptorSets2" ) ); vkCmdPushConstants2 = PFN_vkCmdPushConstants2( vkGetDeviceProcAddr( device, "vkCmdPushConstants2" ) ); vkCmdPushDescriptorSet2 = PFN_vkCmdPushDescriptorSet2( vkGetDeviceProcAddr( device, "vkCmdPushDescriptorSet2" ) ); vkCmdPushDescriptorSetWithTemplate2 = PFN_vkCmdPushDescriptorSetWithTemplate2( vkGetDeviceProcAddr( device, "vkCmdPushDescriptorSetWithTemplate2" ) ); vkCopyMemoryToImage = PFN_vkCopyMemoryToImage( vkGetDeviceProcAddr( device, "vkCopyMemoryToImage" ) ); vkCopyImageToMemory = PFN_vkCopyImageToMemory( vkGetDeviceProcAddr( device, "vkCopyImageToMemory" ) ); vkCopyImageToImage = PFN_vkCopyImageToImage( vkGetDeviceProcAddr( device, "vkCopyImageToImage" ) ); vkTransitionImageLayout = PFN_vkTransitionImageLayout( vkGetDeviceProcAddr( device, "vkTransitionImageLayout" ) ); //=== VK_KHR_swapchain === vkCreateSwapchainKHR = PFN_vkCreateSwapchainKHR( vkGetDeviceProcAddr( device, "vkCreateSwapchainKHR" ) ); vkDestroySwapchainKHR = PFN_vkDestroySwapchainKHR( vkGetDeviceProcAddr( device, "vkDestroySwapchainKHR" ) ); vkGetSwapchainImagesKHR = PFN_vkGetSwapchainImagesKHR( vkGetDeviceProcAddr( device, "vkGetSwapchainImagesKHR" ) ); vkAcquireNextImageKHR = PFN_vkAcquireNextImageKHR( vkGetDeviceProcAddr( device, "vkAcquireNextImageKHR" ) ); vkQueuePresentKHR = PFN_vkQueuePresentKHR( vkGetDeviceProcAddr( device, "vkQueuePresentKHR" ) ); vkGetDeviceGroupPresentCapabilitiesKHR = PFN_vkGetDeviceGroupPresentCapabilitiesKHR( vkGetDeviceProcAddr( device, "vkGetDeviceGroupPresentCapabilitiesKHR" ) ); vkGetDeviceGroupSurfacePresentModesKHR = PFN_vkGetDeviceGroupSurfacePresentModesKHR( vkGetDeviceProcAddr( device, "vkGetDeviceGroupSurfacePresentModesKHR" ) ); vkAcquireNextImage2KHR = PFN_vkAcquireNextImage2KHR( vkGetDeviceProcAddr( device, "vkAcquireNextImage2KHR" ) ); //=== VK_KHR_display_swapchain === vkCreateSharedSwapchainsKHR = PFN_vkCreateSharedSwapchainsKHR( vkGetDeviceProcAddr( device, "vkCreateSharedSwapchainsKHR" ) ); //=== VK_EXT_debug_marker === vkDebugMarkerSetObjectTagEXT = PFN_vkDebugMarkerSetObjectTagEXT( vkGetDeviceProcAddr( device, "vkDebugMarkerSetObjectTagEXT" ) ); vkDebugMarkerSetObjectNameEXT = PFN_vkDebugMarkerSetObjectNameEXT( vkGetDeviceProcAddr( device, "vkDebugMarkerSetObjectNameEXT" ) ); vkCmdDebugMarkerBeginEXT = PFN_vkCmdDebugMarkerBeginEXT( vkGetDeviceProcAddr( device, "vkCmdDebugMarkerBeginEXT" ) ); vkCmdDebugMarkerEndEXT = PFN_vkCmdDebugMarkerEndEXT( vkGetDeviceProcAddr( device, "vkCmdDebugMarkerEndEXT" ) ); vkCmdDebugMarkerInsertEXT = PFN_vkCmdDebugMarkerInsertEXT( vkGetDeviceProcAddr( device, "vkCmdDebugMarkerInsertEXT" ) ); //=== VK_KHR_video_queue === vkCreateVideoSessionKHR = PFN_vkCreateVideoSessionKHR( vkGetDeviceProcAddr( device, "vkCreateVideoSessionKHR" ) ); vkDestroyVideoSessionKHR = PFN_vkDestroyVideoSessionKHR( vkGetDeviceProcAddr( device, "vkDestroyVideoSessionKHR" ) ); vkGetVideoSessionMemoryRequirementsKHR = PFN_vkGetVideoSessionMemoryRequirementsKHR( vkGetDeviceProcAddr( device, "vkGetVideoSessionMemoryRequirementsKHR" ) ); vkBindVideoSessionMemoryKHR = PFN_vkBindVideoSessionMemoryKHR( vkGetDeviceProcAddr( device, "vkBindVideoSessionMemoryKHR" ) ); vkCreateVideoSessionParametersKHR = PFN_vkCreateVideoSessionParametersKHR( vkGetDeviceProcAddr( device, "vkCreateVideoSessionParametersKHR" ) ); vkUpdateVideoSessionParametersKHR = PFN_vkUpdateVideoSessionParametersKHR( vkGetDeviceProcAddr( device, "vkUpdateVideoSessionParametersKHR" ) ); vkDestroyVideoSessionParametersKHR = PFN_vkDestroyVideoSessionParametersKHR( vkGetDeviceProcAddr( device, "vkDestroyVideoSessionParametersKHR" ) ); vkCmdBeginVideoCodingKHR = PFN_vkCmdBeginVideoCodingKHR( vkGetDeviceProcAddr( device, "vkCmdBeginVideoCodingKHR" ) ); vkCmdEndVideoCodingKHR = PFN_vkCmdEndVideoCodingKHR( vkGetDeviceProcAddr( device, "vkCmdEndVideoCodingKHR" ) ); vkCmdControlVideoCodingKHR = PFN_vkCmdControlVideoCodingKHR( vkGetDeviceProcAddr( device, "vkCmdControlVideoCodingKHR" ) ); //=== VK_KHR_video_decode_queue === vkCmdDecodeVideoKHR = PFN_vkCmdDecodeVideoKHR( vkGetDeviceProcAddr( device, "vkCmdDecodeVideoKHR" ) ); //=== VK_EXT_transform_feedback === vkCmdBindTransformFeedbackBuffersEXT = PFN_vkCmdBindTransformFeedbackBuffersEXT( vkGetDeviceProcAddr( device, "vkCmdBindTransformFeedbackBuffersEXT" ) ); vkCmdBeginTransformFeedbackEXT = PFN_vkCmdBeginTransformFeedbackEXT( vkGetDeviceProcAddr( device, "vkCmdBeginTransformFeedbackEXT" ) ); vkCmdEndTransformFeedbackEXT = PFN_vkCmdEndTransformFeedbackEXT( vkGetDeviceProcAddr( device, "vkCmdEndTransformFeedbackEXT" ) ); vkCmdBeginQueryIndexedEXT = PFN_vkCmdBeginQueryIndexedEXT( vkGetDeviceProcAddr( device, "vkCmdBeginQueryIndexedEXT" ) ); vkCmdEndQueryIndexedEXT = PFN_vkCmdEndQueryIndexedEXT( vkGetDeviceProcAddr( device, "vkCmdEndQueryIndexedEXT" ) ); vkCmdDrawIndirectByteCountEXT = PFN_vkCmdDrawIndirectByteCountEXT( vkGetDeviceProcAddr( device, "vkCmdDrawIndirectByteCountEXT" ) ); //=== VK_NVX_binary_import === vkCreateCuModuleNVX = PFN_vkCreateCuModuleNVX( vkGetDeviceProcAddr( device, "vkCreateCuModuleNVX" ) ); vkCreateCuFunctionNVX = PFN_vkCreateCuFunctionNVX( vkGetDeviceProcAddr( device, "vkCreateCuFunctionNVX" ) ); vkDestroyCuModuleNVX = PFN_vkDestroyCuModuleNVX( vkGetDeviceProcAddr( device, "vkDestroyCuModuleNVX" ) ); vkDestroyCuFunctionNVX = PFN_vkDestroyCuFunctionNVX( vkGetDeviceProcAddr( device, "vkDestroyCuFunctionNVX" ) ); vkCmdCuLaunchKernelNVX = PFN_vkCmdCuLaunchKernelNVX( vkGetDeviceProcAddr( device, "vkCmdCuLaunchKernelNVX" ) ); //=== VK_NVX_image_view_handle === vkGetImageViewHandleNVX = PFN_vkGetImageViewHandleNVX( vkGetDeviceProcAddr( device, "vkGetImageViewHandleNVX" ) ); vkGetImageViewHandle64NVX = PFN_vkGetImageViewHandle64NVX( vkGetDeviceProcAddr( device, "vkGetImageViewHandle64NVX" ) ); vkGetImageViewAddressNVX = PFN_vkGetImageViewAddressNVX( vkGetDeviceProcAddr( device, "vkGetImageViewAddressNVX" ) ); //=== VK_AMD_draw_indirect_count === vkCmdDrawIndirectCountAMD = PFN_vkCmdDrawIndirectCountAMD( vkGetDeviceProcAddr( device, "vkCmdDrawIndirectCountAMD" ) ); if ( !vkCmdDrawIndirectCount ) vkCmdDrawIndirectCount = vkCmdDrawIndirectCountAMD; vkCmdDrawIndexedIndirectCountAMD = PFN_vkCmdDrawIndexedIndirectCountAMD( vkGetDeviceProcAddr( device, "vkCmdDrawIndexedIndirectCountAMD" ) ); if ( !vkCmdDrawIndexedIndirectCount ) vkCmdDrawIndexedIndirectCount = vkCmdDrawIndexedIndirectCountAMD; //=== VK_AMD_shader_info === vkGetShaderInfoAMD = PFN_vkGetShaderInfoAMD( vkGetDeviceProcAddr( device, "vkGetShaderInfoAMD" ) ); //=== VK_KHR_dynamic_rendering === vkCmdBeginRenderingKHR = PFN_vkCmdBeginRenderingKHR( vkGetDeviceProcAddr( device, "vkCmdBeginRenderingKHR" ) ); if ( !vkCmdBeginRendering ) vkCmdBeginRendering = vkCmdBeginRenderingKHR; vkCmdEndRenderingKHR = PFN_vkCmdEndRenderingKHR( vkGetDeviceProcAddr( device, "vkCmdEndRenderingKHR" ) ); if ( !vkCmdEndRendering ) vkCmdEndRendering = vkCmdEndRenderingKHR; # if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_NV_external_memory_win32 === vkGetMemoryWin32HandleNV = PFN_vkGetMemoryWin32HandleNV( vkGetDeviceProcAddr( device, "vkGetMemoryWin32HandleNV" ) ); # endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_KHR_device_group === vkGetDeviceGroupPeerMemoryFeaturesKHR = PFN_vkGetDeviceGroupPeerMemoryFeaturesKHR( vkGetDeviceProcAddr( device, "vkGetDeviceGroupPeerMemoryFeaturesKHR" ) ); if ( !vkGetDeviceGroupPeerMemoryFeatures ) vkGetDeviceGroupPeerMemoryFeatures = vkGetDeviceGroupPeerMemoryFeaturesKHR; vkCmdSetDeviceMaskKHR = PFN_vkCmdSetDeviceMaskKHR( vkGetDeviceProcAddr( device, "vkCmdSetDeviceMaskKHR" ) ); if ( !vkCmdSetDeviceMask ) vkCmdSetDeviceMask = vkCmdSetDeviceMaskKHR; vkCmdDispatchBaseKHR = PFN_vkCmdDispatchBaseKHR( vkGetDeviceProcAddr( device, "vkCmdDispatchBaseKHR" ) ); if ( !vkCmdDispatchBase ) vkCmdDispatchBase = vkCmdDispatchBaseKHR; //=== VK_KHR_maintenance1 === vkTrimCommandPoolKHR = PFN_vkTrimCommandPoolKHR( vkGetDeviceProcAddr( device, "vkTrimCommandPoolKHR" ) ); if ( !vkTrimCommandPool ) vkTrimCommandPool = vkTrimCommandPoolKHR; # if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_KHR_external_memory_win32 === vkGetMemoryWin32HandleKHR = PFN_vkGetMemoryWin32HandleKHR( vkGetDeviceProcAddr( device, "vkGetMemoryWin32HandleKHR" ) ); vkGetMemoryWin32HandlePropertiesKHR = PFN_vkGetMemoryWin32HandlePropertiesKHR( vkGetDeviceProcAddr( device, "vkGetMemoryWin32HandlePropertiesKHR" ) ); # endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_KHR_external_memory_fd === vkGetMemoryFdKHR = PFN_vkGetMemoryFdKHR( vkGetDeviceProcAddr( device, "vkGetMemoryFdKHR" ) ); vkGetMemoryFdPropertiesKHR = PFN_vkGetMemoryFdPropertiesKHR( vkGetDeviceProcAddr( device, "vkGetMemoryFdPropertiesKHR" ) ); # if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_KHR_external_semaphore_win32 === vkImportSemaphoreWin32HandleKHR = PFN_vkImportSemaphoreWin32HandleKHR( vkGetDeviceProcAddr( device, "vkImportSemaphoreWin32HandleKHR" ) ); vkGetSemaphoreWin32HandleKHR = PFN_vkGetSemaphoreWin32HandleKHR( vkGetDeviceProcAddr( device, "vkGetSemaphoreWin32HandleKHR" ) ); # endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_KHR_external_semaphore_fd === vkImportSemaphoreFdKHR = PFN_vkImportSemaphoreFdKHR( vkGetDeviceProcAddr( device, "vkImportSemaphoreFdKHR" ) ); vkGetSemaphoreFdKHR = PFN_vkGetSemaphoreFdKHR( vkGetDeviceProcAddr( device, "vkGetSemaphoreFdKHR" ) ); //=== VK_KHR_push_descriptor === vkCmdPushDescriptorSetKHR = PFN_vkCmdPushDescriptorSetKHR( vkGetDeviceProcAddr( device, "vkCmdPushDescriptorSetKHR" ) ); if ( !vkCmdPushDescriptorSet ) vkCmdPushDescriptorSet = vkCmdPushDescriptorSetKHR; vkCmdPushDescriptorSetWithTemplateKHR = PFN_vkCmdPushDescriptorSetWithTemplateKHR( vkGetDeviceProcAddr( device, "vkCmdPushDescriptorSetWithTemplateKHR" ) ); if ( !vkCmdPushDescriptorSetWithTemplate ) vkCmdPushDescriptorSetWithTemplate = vkCmdPushDescriptorSetWithTemplateKHR; //=== VK_EXT_conditional_rendering === vkCmdBeginConditionalRenderingEXT = PFN_vkCmdBeginConditionalRenderingEXT( vkGetDeviceProcAddr( device, "vkCmdBeginConditionalRenderingEXT" ) ); vkCmdEndConditionalRenderingEXT = PFN_vkCmdEndConditionalRenderingEXT( vkGetDeviceProcAddr( device, "vkCmdEndConditionalRenderingEXT" ) ); //=== VK_KHR_descriptor_update_template === vkCreateDescriptorUpdateTemplateKHR = PFN_vkCreateDescriptorUpdateTemplateKHR( vkGetDeviceProcAddr( device, "vkCreateDescriptorUpdateTemplateKHR" ) ); if ( !vkCreateDescriptorUpdateTemplate ) vkCreateDescriptorUpdateTemplate = vkCreateDescriptorUpdateTemplateKHR; vkDestroyDescriptorUpdateTemplateKHR = PFN_vkDestroyDescriptorUpdateTemplateKHR( vkGetDeviceProcAddr( device, "vkDestroyDescriptorUpdateTemplateKHR" ) ); if ( !vkDestroyDescriptorUpdateTemplate ) vkDestroyDescriptorUpdateTemplate = vkDestroyDescriptorUpdateTemplateKHR; vkUpdateDescriptorSetWithTemplateKHR = PFN_vkUpdateDescriptorSetWithTemplateKHR( vkGetDeviceProcAddr( device, "vkUpdateDescriptorSetWithTemplateKHR" ) ); if ( !vkUpdateDescriptorSetWithTemplate ) vkUpdateDescriptorSetWithTemplate = vkUpdateDescriptorSetWithTemplateKHR; //=== VK_NV_clip_space_w_scaling === vkCmdSetViewportWScalingNV = PFN_vkCmdSetViewportWScalingNV( vkGetDeviceProcAddr( device, "vkCmdSetViewportWScalingNV" ) ); //=== VK_EXT_display_control === vkDisplayPowerControlEXT = PFN_vkDisplayPowerControlEXT( vkGetDeviceProcAddr( device, "vkDisplayPowerControlEXT" ) ); vkRegisterDeviceEventEXT = PFN_vkRegisterDeviceEventEXT( vkGetDeviceProcAddr( device, "vkRegisterDeviceEventEXT" ) ); vkRegisterDisplayEventEXT = PFN_vkRegisterDisplayEventEXT( vkGetDeviceProcAddr( device, "vkRegisterDisplayEventEXT" ) ); vkGetSwapchainCounterEXT = PFN_vkGetSwapchainCounterEXT( vkGetDeviceProcAddr( device, "vkGetSwapchainCounterEXT" ) ); //=== VK_GOOGLE_display_timing === vkGetRefreshCycleDurationGOOGLE = PFN_vkGetRefreshCycleDurationGOOGLE( vkGetDeviceProcAddr( device, "vkGetRefreshCycleDurationGOOGLE" ) ); vkGetPastPresentationTimingGOOGLE = PFN_vkGetPastPresentationTimingGOOGLE( vkGetDeviceProcAddr( device, "vkGetPastPresentationTimingGOOGLE" ) ); //=== VK_EXT_discard_rectangles === vkCmdSetDiscardRectangleEXT = PFN_vkCmdSetDiscardRectangleEXT( vkGetDeviceProcAddr( device, "vkCmdSetDiscardRectangleEXT" ) ); vkCmdSetDiscardRectangleEnableEXT = PFN_vkCmdSetDiscardRectangleEnableEXT( vkGetDeviceProcAddr( device, "vkCmdSetDiscardRectangleEnableEXT" ) ); vkCmdSetDiscardRectangleModeEXT = PFN_vkCmdSetDiscardRectangleModeEXT( vkGetDeviceProcAddr( device, "vkCmdSetDiscardRectangleModeEXT" ) ); //=== VK_EXT_hdr_metadata === vkSetHdrMetadataEXT = PFN_vkSetHdrMetadataEXT( vkGetDeviceProcAddr( device, "vkSetHdrMetadataEXT" ) ); //=== VK_KHR_create_renderpass2 === vkCreateRenderPass2KHR = PFN_vkCreateRenderPass2KHR( vkGetDeviceProcAddr( device, "vkCreateRenderPass2KHR" ) ); if ( !vkCreateRenderPass2 ) vkCreateRenderPass2 = vkCreateRenderPass2KHR; vkCmdBeginRenderPass2KHR = PFN_vkCmdBeginRenderPass2KHR( vkGetDeviceProcAddr( device, "vkCmdBeginRenderPass2KHR" ) ); if ( !vkCmdBeginRenderPass2 ) vkCmdBeginRenderPass2 = vkCmdBeginRenderPass2KHR; vkCmdNextSubpass2KHR = PFN_vkCmdNextSubpass2KHR( vkGetDeviceProcAddr( device, "vkCmdNextSubpass2KHR" ) ); if ( !vkCmdNextSubpass2 ) vkCmdNextSubpass2 = vkCmdNextSubpass2KHR; vkCmdEndRenderPass2KHR = PFN_vkCmdEndRenderPass2KHR( vkGetDeviceProcAddr( device, "vkCmdEndRenderPass2KHR" ) ); if ( !vkCmdEndRenderPass2 ) vkCmdEndRenderPass2 = vkCmdEndRenderPass2KHR; //=== VK_KHR_shared_presentable_image === vkGetSwapchainStatusKHR = PFN_vkGetSwapchainStatusKHR( vkGetDeviceProcAddr( device, "vkGetSwapchainStatusKHR" ) ); # if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_KHR_external_fence_win32 === vkImportFenceWin32HandleKHR = PFN_vkImportFenceWin32HandleKHR( vkGetDeviceProcAddr( device, "vkImportFenceWin32HandleKHR" ) ); vkGetFenceWin32HandleKHR = PFN_vkGetFenceWin32HandleKHR( vkGetDeviceProcAddr( device, "vkGetFenceWin32HandleKHR" ) ); # endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_KHR_external_fence_fd === vkImportFenceFdKHR = PFN_vkImportFenceFdKHR( vkGetDeviceProcAddr( device, "vkImportFenceFdKHR" ) ); vkGetFenceFdKHR = PFN_vkGetFenceFdKHR( vkGetDeviceProcAddr( device, "vkGetFenceFdKHR" ) ); //=== VK_KHR_performance_query === vkAcquireProfilingLockKHR = PFN_vkAcquireProfilingLockKHR( vkGetDeviceProcAddr( device, "vkAcquireProfilingLockKHR" ) ); vkReleaseProfilingLockKHR = PFN_vkReleaseProfilingLockKHR( vkGetDeviceProcAddr( device, "vkReleaseProfilingLockKHR" ) ); //=== VK_EXT_debug_utils === vkSetDebugUtilsObjectNameEXT = PFN_vkSetDebugUtilsObjectNameEXT( vkGetDeviceProcAddr( device, "vkSetDebugUtilsObjectNameEXT" ) ); vkSetDebugUtilsObjectTagEXT = PFN_vkSetDebugUtilsObjectTagEXT( vkGetDeviceProcAddr( device, "vkSetDebugUtilsObjectTagEXT" ) ); vkQueueBeginDebugUtilsLabelEXT = PFN_vkQueueBeginDebugUtilsLabelEXT( vkGetDeviceProcAddr( device, "vkQueueBeginDebugUtilsLabelEXT" ) ); vkQueueEndDebugUtilsLabelEXT = PFN_vkQueueEndDebugUtilsLabelEXT( vkGetDeviceProcAddr( device, "vkQueueEndDebugUtilsLabelEXT" ) ); vkQueueInsertDebugUtilsLabelEXT = PFN_vkQueueInsertDebugUtilsLabelEXT( vkGetDeviceProcAddr( device, "vkQueueInsertDebugUtilsLabelEXT" ) ); vkCmdBeginDebugUtilsLabelEXT = PFN_vkCmdBeginDebugUtilsLabelEXT( vkGetDeviceProcAddr( device, "vkCmdBeginDebugUtilsLabelEXT" ) ); vkCmdEndDebugUtilsLabelEXT = PFN_vkCmdEndDebugUtilsLabelEXT( vkGetDeviceProcAddr( device, "vkCmdEndDebugUtilsLabelEXT" ) ); vkCmdInsertDebugUtilsLabelEXT = PFN_vkCmdInsertDebugUtilsLabelEXT( vkGetDeviceProcAddr( device, "vkCmdInsertDebugUtilsLabelEXT" ) ); # if defined( VK_USE_PLATFORM_ANDROID_KHR ) //=== VK_ANDROID_external_memory_android_hardware_buffer === vkGetAndroidHardwareBufferPropertiesANDROID = PFN_vkGetAndroidHardwareBufferPropertiesANDROID( vkGetDeviceProcAddr( device, "vkGetAndroidHardwareBufferPropertiesANDROID" ) ); vkGetMemoryAndroidHardwareBufferANDROID = PFN_vkGetMemoryAndroidHardwareBufferANDROID( vkGetDeviceProcAddr( device, "vkGetMemoryAndroidHardwareBufferANDROID" ) ); # endif /*VK_USE_PLATFORM_ANDROID_KHR*/ # if defined( VK_ENABLE_BETA_EXTENSIONS ) //=== VK_AMDX_shader_enqueue === vkCreateExecutionGraphPipelinesAMDX = PFN_vkCreateExecutionGraphPipelinesAMDX( vkGetDeviceProcAddr( device, "vkCreateExecutionGraphPipelinesAMDX" ) ); vkGetExecutionGraphPipelineScratchSizeAMDX = PFN_vkGetExecutionGraphPipelineScratchSizeAMDX( vkGetDeviceProcAddr( device, "vkGetExecutionGraphPipelineScratchSizeAMDX" ) ); vkGetExecutionGraphPipelineNodeIndexAMDX = PFN_vkGetExecutionGraphPipelineNodeIndexAMDX( vkGetDeviceProcAddr( device, "vkGetExecutionGraphPipelineNodeIndexAMDX" ) ); vkCmdInitializeGraphScratchMemoryAMDX = PFN_vkCmdInitializeGraphScratchMemoryAMDX( vkGetDeviceProcAddr( device, "vkCmdInitializeGraphScratchMemoryAMDX" ) ); vkCmdDispatchGraphAMDX = PFN_vkCmdDispatchGraphAMDX( vkGetDeviceProcAddr( device, "vkCmdDispatchGraphAMDX" ) ); vkCmdDispatchGraphIndirectAMDX = PFN_vkCmdDispatchGraphIndirectAMDX( vkGetDeviceProcAddr( device, "vkCmdDispatchGraphIndirectAMDX" ) ); vkCmdDispatchGraphIndirectCountAMDX = PFN_vkCmdDispatchGraphIndirectCountAMDX( vkGetDeviceProcAddr( device, "vkCmdDispatchGraphIndirectCountAMDX" ) ); # endif /*VK_ENABLE_BETA_EXTENSIONS*/ //=== VK_EXT_sample_locations === vkCmdSetSampleLocationsEXT = PFN_vkCmdSetSampleLocationsEXT( vkGetDeviceProcAddr( device, "vkCmdSetSampleLocationsEXT" ) ); //=== VK_KHR_get_memory_requirements2 === vkGetImageMemoryRequirements2KHR = PFN_vkGetImageMemoryRequirements2KHR( vkGetDeviceProcAddr( device, "vkGetImageMemoryRequirements2KHR" ) ); if ( !vkGetImageMemoryRequirements2 ) vkGetImageMemoryRequirements2 = vkGetImageMemoryRequirements2KHR; vkGetBufferMemoryRequirements2KHR = PFN_vkGetBufferMemoryRequirements2KHR( vkGetDeviceProcAddr( device, "vkGetBufferMemoryRequirements2KHR" ) ); if ( !vkGetBufferMemoryRequirements2 ) vkGetBufferMemoryRequirements2 = vkGetBufferMemoryRequirements2KHR; vkGetImageSparseMemoryRequirements2KHR = PFN_vkGetImageSparseMemoryRequirements2KHR( vkGetDeviceProcAddr( device, "vkGetImageSparseMemoryRequirements2KHR" ) ); if ( !vkGetImageSparseMemoryRequirements2 ) vkGetImageSparseMemoryRequirements2 = vkGetImageSparseMemoryRequirements2KHR; //=== VK_KHR_acceleration_structure === vkCreateAccelerationStructureKHR = PFN_vkCreateAccelerationStructureKHR( vkGetDeviceProcAddr( device, "vkCreateAccelerationStructureKHR" ) ); vkDestroyAccelerationStructureKHR = PFN_vkDestroyAccelerationStructureKHR( vkGetDeviceProcAddr( device, "vkDestroyAccelerationStructureKHR" ) ); vkCmdBuildAccelerationStructuresKHR = PFN_vkCmdBuildAccelerationStructuresKHR( vkGetDeviceProcAddr( device, "vkCmdBuildAccelerationStructuresKHR" ) ); vkCmdBuildAccelerationStructuresIndirectKHR = PFN_vkCmdBuildAccelerationStructuresIndirectKHR( vkGetDeviceProcAddr( device, "vkCmdBuildAccelerationStructuresIndirectKHR" ) ); vkBuildAccelerationStructuresKHR = PFN_vkBuildAccelerationStructuresKHR( vkGetDeviceProcAddr( device, "vkBuildAccelerationStructuresKHR" ) ); vkCopyAccelerationStructureKHR = PFN_vkCopyAccelerationStructureKHR( vkGetDeviceProcAddr( device, "vkCopyAccelerationStructureKHR" ) ); vkCopyAccelerationStructureToMemoryKHR = PFN_vkCopyAccelerationStructureToMemoryKHR( vkGetDeviceProcAddr( device, "vkCopyAccelerationStructureToMemoryKHR" ) ); vkCopyMemoryToAccelerationStructureKHR = PFN_vkCopyMemoryToAccelerationStructureKHR( vkGetDeviceProcAddr( device, "vkCopyMemoryToAccelerationStructureKHR" ) ); vkWriteAccelerationStructuresPropertiesKHR = PFN_vkWriteAccelerationStructuresPropertiesKHR( vkGetDeviceProcAddr( device, "vkWriteAccelerationStructuresPropertiesKHR" ) ); vkCmdCopyAccelerationStructureKHR = PFN_vkCmdCopyAccelerationStructureKHR( vkGetDeviceProcAddr( device, "vkCmdCopyAccelerationStructureKHR" ) ); vkCmdCopyAccelerationStructureToMemoryKHR = PFN_vkCmdCopyAccelerationStructureToMemoryKHR( vkGetDeviceProcAddr( device, "vkCmdCopyAccelerationStructureToMemoryKHR" ) ); vkCmdCopyMemoryToAccelerationStructureKHR = PFN_vkCmdCopyMemoryToAccelerationStructureKHR( vkGetDeviceProcAddr( device, "vkCmdCopyMemoryToAccelerationStructureKHR" ) ); vkGetAccelerationStructureDeviceAddressKHR = PFN_vkGetAccelerationStructureDeviceAddressKHR( vkGetDeviceProcAddr( device, "vkGetAccelerationStructureDeviceAddressKHR" ) ); vkCmdWriteAccelerationStructuresPropertiesKHR = PFN_vkCmdWriteAccelerationStructuresPropertiesKHR( vkGetDeviceProcAddr( device, "vkCmdWriteAccelerationStructuresPropertiesKHR" ) ); vkGetDeviceAccelerationStructureCompatibilityKHR = PFN_vkGetDeviceAccelerationStructureCompatibilityKHR( vkGetDeviceProcAddr( device, "vkGetDeviceAccelerationStructureCompatibilityKHR" ) ); vkGetAccelerationStructureBuildSizesKHR = PFN_vkGetAccelerationStructureBuildSizesKHR( vkGetDeviceProcAddr( device, "vkGetAccelerationStructureBuildSizesKHR" ) ); //=== VK_KHR_ray_tracing_pipeline === vkCmdTraceRaysKHR = PFN_vkCmdTraceRaysKHR( vkGetDeviceProcAddr( device, "vkCmdTraceRaysKHR" ) ); vkCreateRayTracingPipelinesKHR = PFN_vkCreateRayTracingPipelinesKHR( vkGetDeviceProcAddr( device, "vkCreateRayTracingPipelinesKHR" ) ); vkGetRayTracingShaderGroupHandlesKHR = PFN_vkGetRayTracingShaderGroupHandlesKHR( vkGetDeviceProcAddr( device, "vkGetRayTracingShaderGroupHandlesKHR" ) ); vkGetRayTracingCaptureReplayShaderGroupHandlesKHR = PFN_vkGetRayTracingCaptureReplayShaderGroupHandlesKHR( vkGetDeviceProcAddr( device, "vkGetRayTracingCaptureReplayShaderGroupHandlesKHR" ) ); vkCmdTraceRaysIndirectKHR = PFN_vkCmdTraceRaysIndirectKHR( vkGetDeviceProcAddr( device, "vkCmdTraceRaysIndirectKHR" ) ); vkGetRayTracingShaderGroupStackSizeKHR = PFN_vkGetRayTracingShaderGroupStackSizeKHR( vkGetDeviceProcAddr( device, "vkGetRayTracingShaderGroupStackSizeKHR" ) ); vkCmdSetRayTracingPipelineStackSizeKHR = PFN_vkCmdSetRayTracingPipelineStackSizeKHR( vkGetDeviceProcAddr( device, "vkCmdSetRayTracingPipelineStackSizeKHR" ) ); //=== VK_KHR_sampler_ycbcr_conversion === vkCreateSamplerYcbcrConversionKHR = PFN_vkCreateSamplerYcbcrConversionKHR( vkGetDeviceProcAddr( device, "vkCreateSamplerYcbcrConversionKHR" ) ); if ( !vkCreateSamplerYcbcrConversion ) vkCreateSamplerYcbcrConversion = vkCreateSamplerYcbcrConversionKHR; vkDestroySamplerYcbcrConversionKHR = PFN_vkDestroySamplerYcbcrConversionKHR( vkGetDeviceProcAddr( device, "vkDestroySamplerYcbcrConversionKHR" ) ); if ( !vkDestroySamplerYcbcrConversion ) vkDestroySamplerYcbcrConversion = vkDestroySamplerYcbcrConversionKHR; //=== VK_KHR_bind_memory2 === vkBindBufferMemory2KHR = PFN_vkBindBufferMemory2KHR( vkGetDeviceProcAddr( device, "vkBindBufferMemory2KHR" ) ); if ( !vkBindBufferMemory2 ) vkBindBufferMemory2 = vkBindBufferMemory2KHR; vkBindImageMemory2KHR = PFN_vkBindImageMemory2KHR( vkGetDeviceProcAddr( device, "vkBindImageMemory2KHR" ) ); if ( !vkBindImageMemory2 ) vkBindImageMemory2 = vkBindImageMemory2KHR; //=== VK_EXT_image_drm_format_modifier === vkGetImageDrmFormatModifierPropertiesEXT = PFN_vkGetImageDrmFormatModifierPropertiesEXT( vkGetDeviceProcAddr( device, "vkGetImageDrmFormatModifierPropertiesEXT" ) ); //=== VK_EXT_validation_cache === vkCreateValidationCacheEXT = PFN_vkCreateValidationCacheEXT( vkGetDeviceProcAddr( device, "vkCreateValidationCacheEXT" ) ); vkDestroyValidationCacheEXT = PFN_vkDestroyValidationCacheEXT( vkGetDeviceProcAddr( device, "vkDestroyValidationCacheEXT" ) ); vkMergeValidationCachesEXT = PFN_vkMergeValidationCachesEXT( vkGetDeviceProcAddr( device, "vkMergeValidationCachesEXT" ) ); vkGetValidationCacheDataEXT = PFN_vkGetValidationCacheDataEXT( vkGetDeviceProcAddr( device, "vkGetValidationCacheDataEXT" ) ); //=== VK_NV_shading_rate_image === vkCmdBindShadingRateImageNV = PFN_vkCmdBindShadingRateImageNV( vkGetDeviceProcAddr( device, "vkCmdBindShadingRateImageNV" ) ); vkCmdSetViewportShadingRatePaletteNV = PFN_vkCmdSetViewportShadingRatePaletteNV( vkGetDeviceProcAddr( device, "vkCmdSetViewportShadingRatePaletteNV" ) ); vkCmdSetCoarseSampleOrderNV = PFN_vkCmdSetCoarseSampleOrderNV( vkGetDeviceProcAddr( device, "vkCmdSetCoarseSampleOrderNV" ) ); //=== VK_NV_ray_tracing === vkCreateAccelerationStructureNV = PFN_vkCreateAccelerationStructureNV( vkGetDeviceProcAddr( device, "vkCreateAccelerationStructureNV" ) ); vkDestroyAccelerationStructureNV = PFN_vkDestroyAccelerationStructureNV( vkGetDeviceProcAddr( device, "vkDestroyAccelerationStructureNV" ) ); vkGetAccelerationStructureMemoryRequirementsNV = PFN_vkGetAccelerationStructureMemoryRequirementsNV( vkGetDeviceProcAddr( device, "vkGetAccelerationStructureMemoryRequirementsNV" ) ); vkBindAccelerationStructureMemoryNV = PFN_vkBindAccelerationStructureMemoryNV( vkGetDeviceProcAddr( device, "vkBindAccelerationStructureMemoryNV" ) ); vkCmdBuildAccelerationStructureNV = PFN_vkCmdBuildAccelerationStructureNV( vkGetDeviceProcAddr( device, "vkCmdBuildAccelerationStructureNV" ) ); vkCmdCopyAccelerationStructureNV = PFN_vkCmdCopyAccelerationStructureNV( vkGetDeviceProcAddr( device, "vkCmdCopyAccelerationStructureNV" ) ); vkCmdTraceRaysNV = PFN_vkCmdTraceRaysNV( vkGetDeviceProcAddr( device, "vkCmdTraceRaysNV" ) ); vkCreateRayTracingPipelinesNV = PFN_vkCreateRayTracingPipelinesNV( vkGetDeviceProcAddr( device, "vkCreateRayTracingPipelinesNV" ) ); vkGetRayTracingShaderGroupHandlesNV = PFN_vkGetRayTracingShaderGroupHandlesNV( vkGetDeviceProcAddr( device, "vkGetRayTracingShaderGroupHandlesNV" ) ); if ( !vkGetRayTracingShaderGroupHandlesKHR ) vkGetRayTracingShaderGroupHandlesKHR = vkGetRayTracingShaderGroupHandlesNV; vkGetAccelerationStructureHandleNV = PFN_vkGetAccelerationStructureHandleNV( vkGetDeviceProcAddr( device, "vkGetAccelerationStructureHandleNV" ) ); vkCmdWriteAccelerationStructuresPropertiesNV = PFN_vkCmdWriteAccelerationStructuresPropertiesNV( vkGetDeviceProcAddr( device, "vkCmdWriteAccelerationStructuresPropertiesNV" ) ); vkCompileDeferredNV = PFN_vkCompileDeferredNV( vkGetDeviceProcAddr( device, "vkCompileDeferredNV" ) ); //=== VK_KHR_maintenance3 === vkGetDescriptorSetLayoutSupportKHR = PFN_vkGetDescriptorSetLayoutSupportKHR( vkGetDeviceProcAddr( device, "vkGetDescriptorSetLayoutSupportKHR" ) ); if ( !vkGetDescriptorSetLayoutSupport ) vkGetDescriptorSetLayoutSupport = vkGetDescriptorSetLayoutSupportKHR; //=== VK_KHR_draw_indirect_count === vkCmdDrawIndirectCountKHR = PFN_vkCmdDrawIndirectCountKHR( vkGetDeviceProcAddr( device, "vkCmdDrawIndirectCountKHR" ) ); if ( !vkCmdDrawIndirectCount ) vkCmdDrawIndirectCount = vkCmdDrawIndirectCountKHR; vkCmdDrawIndexedIndirectCountKHR = PFN_vkCmdDrawIndexedIndirectCountKHR( vkGetDeviceProcAddr( device, "vkCmdDrawIndexedIndirectCountKHR" ) ); if ( !vkCmdDrawIndexedIndirectCount ) vkCmdDrawIndexedIndirectCount = vkCmdDrawIndexedIndirectCountKHR; //=== VK_EXT_external_memory_host === vkGetMemoryHostPointerPropertiesEXT = PFN_vkGetMemoryHostPointerPropertiesEXT( vkGetDeviceProcAddr( device, "vkGetMemoryHostPointerPropertiesEXT" ) ); //=== VK_AMD_buffer_marker === vkCmdWriteBufferMarkerAMD = PFN_vkCmdWriteBufferMarkerAMD( vkGetDeviceProcAddr( device, "vkCmdWriteBufferMarkerAMD" ) ); vkCmdWriteBufferMarker2AMD = PFN_vkCmdWriteBufferMarker2AMD( vkGetDeviceProcAddr( device, "vkCmdWriteBufferMarker2AMD" ) ); //=== VK_EXT_calibrated_timestamps === vkGetCalibratedTimestampsEXT = PFN_vkGetCalibratedTimestampsEXT( vkGetDeviceProcAddr( device, "vkGetCalibratedTimestampsEXT" ) ); if ( !vkGetCalibratedTimestampsKHR ) vkGetCalibratedTimestampsKHR = vkGetCalibratedTimestampsEXT; //=== VK_NV_mesh_shader === vkCmdDrawMeshTasksNV = PFN_vkCmdDrawMeshTasksNV( vkGetDeviceProcAddr( device, "vkCmdDrawMeshTasksNV" ) ); vkCmdDrawMeshTasksIndirectNV = PFN_vkCmdDrawMeshTasksIndirectNV( vkGetDeviceProcAddr( device, "vkCmdDrawMeshTasksIndirectNV" ) ); vkCmdDrawMeshTasksIndirectCountNV = PFN_vkCmdDrawMeshTasksIndirectCountNV( vkGetDeviceProcAddr( device, "vkCmdDrawMeshTasksIndirectCountNV" ) ); //=== VK_NV_scissor_exclusive === vkCmdSetExclusiveScissorEnableNV = PFN_vkCmdSetExclusiveScissorEnableNV( vkGetDeviceProcAddr( device, "vkCmdSetExclusiveScissorEnableNV" ) ); vkCmdSetExclusiveScissorNV = PFN_vkCmdSetExclusiveScissorNV( vkGetDeviceProcAddr( device, "vkCmdSetExclusiveScissorNV" ) ); //=== VK_NV_device_diagnostic_checkpoints === vkCmdSetCheckpointNV = PFN_vkCmdSetCheckpointNV( vkGetDeviceProcAddr( device, "vkCmdSetCheckpointNV" ) ); vkGetQueueCheckpointDataNV = PFN_vkGetQueueCheckpointDataNV( vkGetDeviceProcAddr( device, "vkGetQueueCheckpointDataNV" ) ); vkGetQueueCheckpointData2NV = PFN_vkGetQueueCheckpointData2NV( vkGetDeviceProcAddr( device, "vkGetQueueCheckpointData2NV" ) ); //=== VK_KHR_timeline_semaphore === vkGetSemaphoreCounterValueKHR = PFN_vkGetSemaphoreCounterValueKHR( vkGetDeviceProcAddr( device, "vkGetSemaphoreCounterValueKHR" ) ); if ( !vkGetSemaphoreCounterValue ) vkGetSemaphoreCounterValue = vkGetSemaphoreCounterValueKHR; vkWaitSemaphoresKHR = PFN_vkWaitSemaphoresKHR( vkGetDeviceProcAddr( device, "vkWaitSemaphoresKHR" ) ); if ( !vkWaitSemaphores ) vkWaitSemaphores = vkWaitSemaphoresKHR; vkSignalSemaphoreKHR = PFN_vkSignalSemaphoreKHR( vkGetDeviceProcAddr( device, "vkSignalSemaphoreKHR" ) ); if ( !vkSignalSemaphore ) vkSignalSemaphore = vkSignalSemaphoreKHR; //=== VK_INTEL_performance_query === vkInitializePerformanceApiINTEL = PFN_vkInitializePerformanceApiINTEL( vkGetDeviceProcAddr( device, "vkInitializePerformanceApiINTEL" ) ); vkUninitializePerformanceApiINTEL = PFN_vkUninitializePerformanceApiINTEL( vkGetDeviceProcAddr( device, "vkUninitializePerformanceApiINTEL" ) ); vkCmdSetPerformanceMarkerINTEL = PFN_vkCmdSetPerformanceMarkerINTEL( vkGetDeviceProcAddr( device, "vkCmdSetPerformanceMarkerINTEL" ) ); vkCmdSetPerformanceStreamMarkerINTEL = PFN_vkCmdSetPerformanceStreamMarkerINTEL( vkGetDeviceProcAddr( device, "vkCmdSetPerformanceStreamMarkerINTEL" ) ); vkCmdSetPerformanceOverrideINTEL = PFN_vkCmdSetPerformanceOverrideINTEL( vkGetDeviceProcAddr( device, "vkCmdSetPerformanceOverrideINTEL" ) ); vkAcquirePerformanceConfigurationINTEL = PFN_vkAcquirePerformanceConfigurationINTEL( vkGetDeviceProcAddr( device, "vkAcquirePerformanceConfigurationINTEL" ) ); vkReleasePerformanceConfigurationINTEL = PFN_vkReleasePerformanceConfigurationINTEL( vkGetDeviceProcAddr( device, "vkReleasePerformanceConfigurationINTEL" ) ); vkQueueSetPerformanceConfigurationINTEL = PFN_vkQueueSetPerformanceConfigurationINTEL( vkGetDeviceProcAddr( device, "vkQueueSetPerformanceConfigurationINTEL" ) ); vkGetPerformanceParameterINTEL = PFN_vkGetPerformanceParameterINTEL( vkGetDeviceProcAddr( device, "vkGetPerformanceParameterINTEL" ) ); //=== VK_AMD_display_native_hdr === vkSetLocalDimmingAMD = PFN_vkSetLocalDimmingAMD( vkGetDeviceProcAddr( device, "vkSetLocalDimmingAMD" ) ); //=== VK_KHR_fragment_shading_rate === vkCmdSetFragmentShadingRateKHR = PFN_vkCmdSetFragmentShadingRateKHR( vkGetDeviceProcAddr( device, "vkCmdSetFragmentShadingRateKHR" ) ); //=== VK_KHR_dynamic_rendering_local_read === vkCmdSetRenderingAttachmentLocationsKHR = PFN_vkCmdSetRenderingAttachmentLocationsKHR( vkGetDeviceProcAddr( device, "vkCmdSetRenderingAttachmentLocationsKHR" ) ); if ( !vkCmdSetRenderingAttachmentLocations ) vkCmdSetRenderingAttachmentLocations = vkCmdSetRenderingAttachmentLocationsKHR; vkCmdSetRenderingInputAttachmentIndicesKHR = PFN_vkCmdSetRenderingInputAttachmentIndicesKHR( vkGetDeviceProcAddr( device, "vkCmdSetRenderingInputAttachmentIndicesKHR" ) ); if ( !vkCmdSetRenderingInputAttachmentIndices ) vkCmdSetRenderingInputAttachmentIndices = vkCmdSetRenderingInputAttachmentIndicesKHR; //=== VK_EXT_buffer_device_address === vkGetBufferDeviceAddressEXT = PFN_vkGetBufferDeviceAddressEXT( vkGetDeviceProcAddr( device, "vkGetBufferDeviceAddressEXT" ) ); if ( !vkGetBufferDeviceAddress ) vkGetBufferDeviceAddress = vkGetBufferDeviceAddressEXT; //=== VK_KHR_present_wait === vkWaitForPresentKHR = PFN_vkWaitForPresentKHR( vkGetDeviceProcAddr( device, "vkWaitForPresentKHR" ) ); # if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_EXT_full_screen_exclusive === vkAcquireFullScreenExclusiveModeEXT = PFN_vkAcquireFullScreenExclusiveModeEXT( vkGetDeviceProcAddr( device, "vkAcquireFullScreenExclusiveModeEXT" ) ); vkReleaseFullScreenExclusiveModeEXT = PFN_vkReleaseFullScreenExclusiveModeEXT( vkGetDeviceProcAddr( device, "vkReleaseFullScreenExclusiveModeEXT" ) ); vkGetDeviceGroupSurfacePresentModes2EXT = PFN_vkGetDeviceGroupSurfacePresentModes2EXT( vkGetDeviceProcAddr( device, "vkGetDeviceGroupSurfacePresentModes2EXT" ) ); # endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_KHR_buffer_device_address === vkGetBufferDeviceAddressKHR = PFN_vkGetBufferDeviceAddressKHR( vkGetDeviceProcAddr( device, "vkGetBufferDeviceAddressKHR" ) ); if ( !vkGetBufferDeviceAddress ) vkGetBufferDeviceAddress = vkGetBufferDeviceAddressKHR; vkGetBufferOpaqueCaptureAddressKHR = PFN_vkGetBufferOpaqueCaptureAddressKHR( vkGetDeviceProcAddr( device, "vkGetBufferOpaqueCaptureAddressKHR" ) ); if ( !vkGetBufferOpaqueCaptureAddress ) vkGetBufferOpaqueCaptureAddress = vkGetBufferOpaqueCaptureAddressKHR; vkGetDeviceMemoryOpaqueCaptureAddressKHR = PFN_vkGetDeviceMemoryOpaqueCaptureAddressKHR( vkGetDeviceProcAddr( device, "vkGetDeviceMemoryOpaqueCaptureAddressKHR" ) ); if ( !vkGetDeviceMemoryOpaqueCaptureAddress ) vkGetDeviceMemoryOpaqueCaptureAddress = vkGetDeviceMemoryOpaqueCaptureAddressKHR; //=== VK_EXT_line_rasterization === vkCmdSetLineStippleEXT = PFN_vkCmdSetLineStippleEXT( vkGetDeviceProcAddr( device, "vkCmdSetLineStippleEXT" ) ); if ( !vkCmdSetLineStipple ) vkCmdSetLineStipple = vkCmdSetLineStippleEXT; //=== VK_EXT_host_query_reset === vkResetQueryPoolEXT = PFN_vkResetQueryPoolEXT( vkGetDeviceProcAddr( device, "vkResetQueryPoolEXT" ) ); if ( !vkResetQueryPool ) vkResetQueryPool = vkResetQueryPoolEXT; //=== VK_EXT_extended_dynamic_state === vkCmdSetCullModeEXT = PFN_vkCmdSetCullModeEXT( vkGetDeviceProcAddr( device, "vkCmdSetCullModeEXT" ) ); if ( !vkCmdSetCullMode ) vkCmdSetCullMode = vkCmdSetCullModeEXT; vkCmdSetFrontFaceEXT = PFN_vkCmdSetFrontFaceEXT( vkGetDeviceProcAddr( device, "vkCmdSetFrontFaceEXT" ) ); if ( !vkCmdSetFrontFace ) vkCmdSetFrontFace = vkCmdSetFrontFaceEXT; vkCmdSetPrimitiveTopologyEXT = PFN_vkCmdSetPrimitiveTopologyEXT( vkGetDeviceProcAddr( device, "vkCmdSetPrimitiveTopologyEXT" ) ); if ( !vkCmdSetPrimitiveTopology ) vkCmdSetPrimitiveTopology = vkCmdSetPrimitiveTopologyEXT; vkCmdSetViewportWithCountEXT = PFN_vkCmdSetViewportWithCountEXT( vkGetDeviceProcAddr( device, "vkCmdSetViewportWithCountEXT" ) ); if ( !vkCmdSetViewportWithCount ) vkCmdSetViewportWithCount = vkCmdSetViewportWithCountEXT; vkCmdSetScissorWithCountEXT = PFN_vkCmdSetScissorWithCountEXT( vkGetDeviceProcAddr( device, "vkCmdSetScissorWithCountEXT" ) ); if ( !vkCmdSetScissorWithCount ) vkCmdSetScissorWithCount = vkCmdSetScissorWithCountEXT; vkCmdBindVertexBuffers2EXT = PFN_vkCmdBindVertexBuffers2EXT( vkGetDeviceProcAddr( device, "vkCmdBindVertexBuffers2EXT" ) ); if ( !vkCmdBindVertexBuffers2 ) vkCmdBindVertexBuffers2 = vkCmdBindVertexBuffers2EXT; vkCmdSetDepthTestEnableEXT = PFN_vkCmdSetDepthTestEnableEXT( vkGetDeviceProcAddr( device, "vkCmdSetDepthTestEnableEXT" ) ); if ( !vkCmdSetDepthTestEnable ) vkCmdSetDepthTestEnable = vkCmdSetDepthTestEnableEXT; vkCmdSetDepthWriteEnableEXT = PFN_vkCmdSetDepthWriteEnableEXT( vkGetDeviceProcAddr( device, "vkCmdSetDepthWriteEnableEXT" ) ); if ( !vkCmdSetDepthWriteEnable ) vkCmdSetDepthWriteEnable = vkCmdSetDepthWriteEnableEXT; vkCmdSetDepthCompareOpEXT = PFN_vkCmdSetDepthCompareOpEXT( vkGetDeviceProcAddr( device, "vkCmdSetDepthCompareOpEXT" ) ); if ( !vkCmdSetDepthCompareOp ) vkCmdSetDepthCompareOp = vkCmdSetDepthCompareOpEXT; vkCmdSetDepthBoundsTestEnableEXT = PFN_vkCmdSetDepthBoundsTestEnableEXT( vkGetDeviceProcAddr( device, "vkCmdSetDepthBoundsTestEnableEXT" ) ); if ( !vkCmdSetDepthBoundsTestEnable ) vkCmdSetDepthBoundsTestEnable = vkCmdSetDepthBoundsTestEnableEXT; vkCmdSetStencilTestEnableEXT = PFN_vkCmdSetStencilTestEnableEXT( vkGetDeviceProcAddr( device, "vkCmdSetStencilTestEnableEXT" ) ); if ( !vkCmdSetStencilTestEnable ) vkCmdSetStencilTestEnable = vkCmdSetStencilTestEnableEXT; vkCmdSetStencilOpEXT = PFN_vkCmdSetStencilOpEXT( vkGetDeviceProcAddr( device, "vkCmdSetStencilOpEXT" ) ); if ( !vkCmdSetStencilOp ) vkCmdSetStencilOp = vkCmdSetStencilOpEXT; //=== VK_KHR_deferred_host_operations === vkCreateDeferredOperationKHR = PFN_vkCreateDeferredOperationKHR( vkGetDeviceProcAddr( device, "vkCreateDeferredOperationKHR" ) ); vkDestroyDeferredOperationKHR = PFN_vkDestroyDeferredOperationKHR( vkGetDeviceProcAddr( device, "vkDestroyDeferredOperationKHR" ) ); vkGetDeferredOperationMaxConcurrencyKHR = PFN_vkGetDeferredOperationMaxConcurrencyKHR( vkGetDeviceProcAddr( device, "vkGetDeferredOperationMaxConcurrencyKHR" ) ); vkGetDeferredOperationResultKHR = PFN_vkGetDeferredOperationResultKHR( vkGetDeviceProcAddr( device, "vkGetDeferredOperationResultKHR" ) ); vkDeferredOperationJoinKHR = PFN_vkDeferredOperationJoinKHR( vkGetDeviceProcAddr( device, "vkDeferredOperationJoinKHR" ) ); //=== VK_KHR_pipeline_executable_properties === vkGetPipelineExecutablePropertiesKHR = PFN_vkGetPipelineExecutablePropertiesKHR( vkGetDeviceProcAddr( device, "vkGetPipelineExecutablePropertiesKHR" ) ); vkGetPipelineExecutableStatisticsKHR = PFN_vkGetPipelineExecutableStatisticsKHR( vkGetDeviceProcAddr( device, "vkGetPipelineExecutableStatisticsKHR" ) ); vkGetPipelineExecutableInternalRepresentationsKHR = PFN_vkGetPipelineExecutableInternalRepresentationsKHR( vkGetDeviceProcAddr( device, "vkGetPipelineExecutableInternalRepresentationsKHR" ) ); //=== VK_EXT_host_image_copy === vkCopyMemoryToImageEXT = PFN_vkCopyMemoryToImageEXT( vkGetDeviceProcAddr( device, "vkCopyMemoryToImageEXT" ) ); if ( !vkCopyMemoryToImage ) vkCopyMemoryToImage = vkCopyMemoryToImageEXT; vkCopyImageToMemoryEXT = PFN_vkCopyImageToMemoryEXT( vkGetDeviceProcAddr( device, "vkCopyImageToMemoryEXT" ) ); if ( !vkCopyImageToMemory ) vkCopyImageToMemory = vkCopyImageToMemoryEXT; vkCopyImageToImageEXT = PFN_vkCopyImageToImageEXT( vkGetDeviceProcAddr( device, "vkCopyImageToImageEXT" ) ); if ( !vkCopyImageToImage ) vkCopyImageToImage = vkCopyImageToImageEXT; vkTransitionImageLayoutEXT = PFN_vkTransitionImageLayoutEXT( vkGetDeviceProcAddr( device, "vkTransitionImageLayoutEXT" ) ); if ( !vkTransitionImageLayout ) vkTransitionImageLayout = vkTransitionImageLayoutEXT; vkGetImageSubresourceLayout2EXT = PFN_vkGetImageSubresourceLayout2EXT( vkGetDeviceProcAddr( device, "vkGetImageSubresourceLayout2EXT" ) ); if ( !vkGetImageSubresourceLayout2 ) vkGetImageSubresourceLayout2 = vkGetImageSubresourceLayout2EXT; //=== VK_KHR_map_memory2 === vkMapMemory2KHR = PFN_vkMapMemory2KHR( vkGetDeviceProcAddr( device, "vkMapMemory2KHR" ) ); if ( !vkMapMemory2 ) vkMapMemory2 = vkMapMemory2KHR; vkUnmapMemory2KHR = PFN_vkUnmapMemory2KHR( vkGetDeviceProcAddr( device, "vkUnmapMemory2KHR" ) ); if ( !vkUnmapMemory2 ) vkUnmapMemory2 = vkUnmapMemory2KHR; //=== VK_EXT_swapchain_maintenance1 === vkReleaseSwapchainImagesEXT = PFN_vkReleaseSwapchainImagesEXT( vkGetDeviceProcAddr( device, "vkReleaseSwapchainImagesEXT" ) ); //=== VK_NV_device_generated_commands === vkGetGeneratedCommandsMemoryRequirementsNV = PFN_vkGetGeneratedCommandsMemoryRequirementsNV( vkGetDeviceProcAddr( device, "vkGetGeneratedCommandsMemoryRequirementsNV" ) ); vkCmdPreprocessGeneratedCommandsNV = PFN_vkCmdPreprocessGeneratedCommandsNV( vkGetDeviceProcAddr( device, "vkCmdPreprocessGeneratedCommandsNV" ) ); vkCmdExecuteGeneratedCommandsNV = PFN_vkCmdExecuteGeneratedCommandsNV( vkGetDeviceProcAddr( device, "vkCmdExecuteGeneratedCommandsNV" ) ); vkCmdBindPipelineShaderGroupNV = PFN_vkCmdBindPipelineShaderGroupNV( vkGetDeviceProcAddr( device, "vkCmdBindPipelineShaderGroupNV" ) ); vkCreateIndirectCommandsLayoutNV = PFN_vkCreateIndirectCommandsLayoutNV( vkGetDeviceProcAddr( device, "vkCreateIndirectCommandsLayoutNV" ) ); vkDestroyIndirectCommandsLayoutNV = PFN_vkDestroyIndirectCommandsLayoutNV( vkGetDeviceProcAddr( device, "vkDestroyIndirectCommandsLayoutNV" ) ); //=== VK_EXT_depth_bias_control === vkCmdSetDepthBias2EXT = PFN_vkCmdSetDepthBias2EXT( vkGetDeviceProcAddr( device, "vkCmdSetDepthBias2EXT" ) ); //=== VK_EXT_private_data === vkCreatePrivateDataSlotEXT = PFN_vkCreatePrivateDataSlotEXT( vkGetDeviceProcAddr( device, "vkCreatePrivateDataSlotEXT" ) ); if ( !vkCreatePrivateDataSlot ) vkCreatePrivateDataSlot = vkCreatePrivateDataSlotEXT; vkDestroyPrivateDataSlotEXT = PFN_vkDestroyPrivateDataSlotEXT( vkGetDeviceProcAddr( device, "vkDestroyPrivateDataSlotEXT" ) ); if ( !vkDestroyPrivateDataSlot ) vkDestroyPrivateDataSlot = vkDestroyPrivateDataSlotEXT; vkSetPrivateDataEXT = PFN_vkSetPrivateDataEXT( vkGetDeviceProcAddr( device, "vkSetPrivateDataEXT" ) ); if ( !vkSetPrivateData ) vkSetPrivateData = vkSetPrivateDataEXT; vkGetPrivateDataEXT = PFN_vkGetPrivateDataEXT( vkGetDeviceProcAddr( device, "vkGetPrivateDataEXT" ) ); if ( !vkGetPrivateData ) vkGetPrivateData = vkGetPrivateDataEXT; //=== VK_KHR_video_encode_queue === vkGetEncodedVideoSessionParametersKHR = PFN_vkGetEncodedVideoSessionParametersKHR( vkGetDeviceProcAddr( device, "vkGetEncodedVideoSessionParametersKHR" ) ); vkCmdEncodeVideoKHR = PFN_vkCmdEncodeVideoKHR( vkGetDeviceProcAddr( device, "vkCmdEncodeVideoKHR" ) ); # if defined( VK_ENABLE_BETA_EXTENSIONS ) //=== VK_NV_cuda_kernel_launch === vkCreateCudaModuleNV = PFN_vkCreateCudaModuleNV( vkGetDeviceProcAddr( device, "vkCreateCudaModuleNV" ) ); vkGetCudaModuleCacheNV = PFN_vkGetCudaModuleCacheNV( vkGetDeviceProcAddr( device, "vkGetCudaModuleCacheNV" ) ); vkCreateCudaFunctionNV = PFN_vkCreateCudaFunctionNV( vkGetDeviceProcAddr( device, "vkCreateCudaFunctionNV" ) ); vkDestroyCudaModuleNV = PFN_vkDestroyCudaModuleNV( vkGetDeviceProcAddr( device, "vkDestroyCudaModuleNV" ) ); vkDestroyCudaFunctionNV = PFN_vkDestroyCudaFunctionNV( vkGetDeviceProcAddr( device, "vkDestroyCudaFunctionNV" ) ); vkCmdCudaLaunchKernelNV = PFN_vkCmdCudaLaunchKernelNV( vkGetDeviceProcAddr( device, "vkCmdCudaLaunchKernelNV" ) ); # endif /*VK_ENABLE_BETA_EXTENSIONS*/ # if defined( VK_USE_PLATFORM_METAL_EXT ) //=== VK_EXT_metal_objects === vkExportMetalObjectsEXT = PFN_vkExportMetalObjectsEXT( vkGetDeviceProcAddr( device, "vkExportMetalObjectsEXT" ) ); # endif /*VK_USE_PLATFORM_METAL_EXT*/ //=== VK_KHR_synchronization2 === vkCmdSetEvent2KHR = PFN_vkCmdSetEvent2KHR( vkGetDeviceProcAddr( device, "vkCmdSetEvent2KHR" ) ); if ( !vkCmdSetEvent2 ) vkCmdSetEvent2 = vkCmdSetEvent2KHR; vkCmdResetEvent2KHR = PFN_vkCmdResetEvent2KHR( vkGetDeviceProcAddr( device, "vkCmdResetEvent2KHR" ) ); if ( !vkCmdResetEvent2 ) vkCmdResetEvent2 = vkCmdResetEvent2KHR; vkCmdWaitEvents2KHR = PFN_vkCmdWaitEvents2KHR( vkGetDeviceProcAddr( device, "vkCmdWaitEvents2KHR" ) ); if ( !vkCmdWaitEvents2 ) vkCmdWaitEvents2 = vkCmdWaitEvents2KHR; vkCmdPipelineBarrier2KHR = PFN_vkCmdPipelineBarrier2KHR( vkGetDeviceProcAddr( device, "vkCmdPipelineBarrier2KHR" ) ); if ( !vkCmdPipelineBarrier2 ) vkCmdPipelineBarrier2 = vkCmdPipelineBarrier2KHR; vkCmdWriteTimestamp2KHR = PFN_vkCmdWriteTimestamp2KHR( vkGetDeviceProcAddr( device, "vkCmdWriteTimestamp2KHR" ) ); if ( !vkCmdWriteTimestamp2 ) vkCmdWriteTimestamp2 = vkCmdWriteTimestamp2KHR; vkQueueSubmit2KHR = PFN_vkQueueSubmit2KHR( vkGetDeviceProcAddr( device, "vkQueueSubmit2KHR" ) ); if ( !vkQueueSubmit2 ) vkQueueSubmit2 = vkQueueSubmit2KHR; //=== VK_EXT_descriptor_buffer === vkGetDescriptorSetLayoutSizeEXT = PFN_vkGetDescriptorSetLayoutSizeEXT( vkGetDeviceProcAddr( device, "vkGetDescriptorSetLayoutSizeEXT" ) ); vkGetDescriptorSetLayoutBindingOffsetEXT = PFN_vkGetDescriptorSetLayoutBindingOffsetEXT( vkGetDeviceProcAddr( device, "vkGetDescriptorSetLayoutBindingOffsetEXT" ) ); vkGetDescriptorEXT = PFN_vkGetDescriptorEXT( vkGetDeviceProcAddr( device, "vkGetDescriptorEXT" ) ); vkCmdBindDescriptorBuffersEXT = PFN_vkCmdBindDescriptorBuffersEXT( vkGetDeviceProcAddr( device, "vkCmdBindDescriptorBuffersEXT" ) ); vkCmdSetDescriptorBufferOffsetsEXT = PFN_vkCmdSetDescriptorBufferOffsetsEXT( vkGetDeviceProcAddr( device, "vkCmdSetDescriptorBufferOffsetsEXT" ) ); vkCmdBindDescriptorBufferEmbeddedSamplersEXT = PFN_vkCmdBindDescriptorBufferEmbeddedSamplersEXT( vkGetDeviceProcAddr( device, "vkCmdBindDescriptorBufferEmbeddedSamplersEXT" ) ); vkGetBufferOpaqueCaptureDescriptorDataEXT = PFN_vkGetBufferOpaqueCaptureDescriptorDataEXT( vkGetDeviceProcAddr( device, "vkGetBufferOpaqueCaptureDescriptorDataEXT" ) ); vkGetImageOpaqueCaptureDescriptorDataEXT = PFN_vkGetImageOpaqueCaptureDescriptorDataEXT( vkGetDeviceProcAddr( device, "vkGetImageOpaqueCaptureDescriptorDataEXT" ) ); vkGetImageViewOpaqueCaptureDescriptorDataEXT = PFN_vkGetImageViewOpaqueCaptureDescriptorDataEXT( vkGetDeviceProcAddr( device, "vkGetImageViewOpaqueCaptureDescriptorDataEXT" ) ); vkGetSamplerOpaqueCaptureDescriptorDataEXT = PFN_vkGetSamplerOpaqueCaptureDescriptorDataEXT( vkGetDeviceProcAddr( device, "vkGetSamplerOpaqueCaptureDescriptorDataEXT" ) ); vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT = PFN_vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT( vkGetDeviceProcAddr( device, "vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT" ) ); //=== VK_NV_fragment_shading_rate_enums === vkCmdSetFragmentShadingRateEnumNV = PFN_vkCmdSetFragmentShadingRateEnumNV( vkGetDeviceProcAddr( device, "vkCmdSetFragmentShadingRateEnumNV" ) ); //=== VK_EXT_mesh_shader === vkCmdDrawMeshTasksEXT = PFN_vkCmdDrawMeshTasksEXT( vkGetDeviceProcAddr( device, "vkCmdDrawMeshTasksEXT" ) ); vkCmdDrawMeshTasksIndirectEXT = PFN_vkCmdDrawMeshTasksIndirectEXT( vkGetDeviceProcAddr( device, "vkCmdDrawMeshTasksIndirectEXT" ) ); vkCmdDrawMeshTasksIndirectCountEXT = PFN_vkCmdDrawMeshTasksIndirectCountEXT( vkGetDeviceProcAddr( device, "vkCmdDrawMeshTasksIndirectCountEXT" ) ); //=== VK_KHR_copy_commands2 === vkCmdCopyBuffer2KHR = PFN_vkCmdCopyBuffer2KHR( vkGetDeviceProcAddr( device, "vkCmdCopyBuffer2KHR" ) ); if ( !vkCmdCopyBuffer2 ) vkCmdCopyBuffer2 = vkCmdCopyBuffer2KHR; vkCmdCopyImage2KHR = PFN_vkCmdCopyImage2KHR( vkGetDeviceProcAddr( device, "vkCmdCopyImage2KHR" ) ); if ( !vkCmdCopyImage2 ) vkCmdCopyImage2 = vkCmdCopyImage2KHR; vkCmdCopyBufferToImage2KHR = PFN_vkCmdCopyBufferToImage2KHR( vkGetDeviceProcAddr( device, "vkCmdCopyBufferToImage2KHR" ) ); if ( !vkCmdCopyBufferToImage2 ) vkCmdCopyBufferToImage2 = vkCmdCopyBufferToImage2KHR; vkCmdCopyImageToBuffer2KHR = PFN_vkCmdCopyImageToBuffer2KHR( vkGetDeviceProcAddr( device, "vkCmdCopyImageToBuffer2KHR" ) ); if ( !vkCmdCopyImageToBuffer2 ) vkCmdCopyImageToBuffer2 = vkCmdCopyImageToBuffer2KHR; vkCmdBlitImage2KHR = PFN_vkCmdBlitImage2KHR( vkGetDeviceProcAddr( device, "vkCmdBlitImage2KHR" ) ); if ( !vkCmdBlitImage2 ) vkCmdBlitImage2 = vkCmdBlitImage2KHR; vkCmdResolveImage2KHR = PFN_vkCmdResolveImage2KHR( vkGetDeviceProcAddr( device, "vkCmdResolveImage2KHR" ) ); if ( !vkCmdResolveImage2 ) vkCmdResolveImage2 = vkCmdResolveImage2KHR; //=== VK_EXT_device_fault === vkGetDeviceFaultInfoEXT = PFN_vkGetDeviceFaultInfoEXT( vkGetDeviceProcAddr( device, "vkGetDeviceFaultInfoEXT" ) ); //=== VK_EXT_vertex_input_dynamic_state === vkCmdSetVertexInputEXT = PFN_vkCmdSetVertexInputEXT( vkGetDeviceProcAddr( device, "vkCmdSetVertexInputEXT" ) ); # if defined( VK_USE_PLATFORM_FUCHSIA ) //=== VK_FUCHSIA_external_memory === vkGetMemoryZirconHandleFUCHSIA = PFN_vkGetMemoryZirconHandleFUCHSIA( vkGetDeviceProcAddr( device, "vkGetMemoryZirconHandleFUCHSIA" ) ); vkGetMemoryZirconHandlePropertiesFUCHSIA = PFN_vkGetMemoryZirconHandlePropertiesFUCHSIA( vkGetDeviceProcAddr( device, "vkGetMemoryZirconHandlePropertiesFUCHSIA" ) ); # endif /*VK_USE_PLATFORM_FUCHSIA*/ # if defined( VK_USE_PLATFORM_FUCHSIA ) //=== VK_FUCHSIA_external_semaphore === vkImportSemaphoreZirconHandleFUCHSIA = PFN_vkImportSemaphoreZirconHandleFUCHSIA( vkGetDeviceProcAddr( device, "vkImportSemaphoreZirconHandleFUCHSIA" ) ); vkGetSemaphoreZirconHandleFUCHSIA = PFN_vkGetSemaphoreZirconHandleFUCHSIA( vkGetDeviceProcAddr( device, "vkGetSemaphoreZirconHandleFUCHSIA" ) ); # endif /*VK_USE_PLATFORM_FUCHSIA*/ # if defined( VK_USE_PLATFORM_FUCHSIA ) //=== VK_FUCHSIA_buffer_collection === vkCreateBufferCollectionFUCHSIA = PFN_vkCreateBufferCollectionFUCHSIA( vkGetDeviceProcAddr( device, "vkCreateBufferCollectionFUCHSIA" ) ); vkSetBufferCollectionImageConstraintsFUCHSIA = PFN_vkSetBufferCollectionImageConstraintsFUCHSIA( vkGetDeviceProcAddr( device, "vkSetBufferCollectionImageConstraintsFUCHSIA" ) ); vkSetBufferCollectionBufferConstraintsFUCHSIA = PFN_vkSetBufferCollectionBufferConstraintsFUCHSIA( vkGetDeviceProcAddr( device, "vkSetBufferCollectionBufferConstraintsFUCHSIA" ) ); vkDestroyBufferCollectionFUCHSIA = PFN_vkDestroyBufferCollectionFUCHSIA( vkGetDeviceProcAddr( device, "vkDestroyBufferCollectionFUCHSIA" ) ); vkGetBufferCollectionPropertiesFUCHSIA = PFN_vkGetBufferCollectionPropertiesFUCHSIA( vkGetDeviceProcAddr( device, "vkGetBufferCollectionPropertiesFUCHSIA" ) ); # endif /*VK_USE_PLATFORM_FUCHSIA*/ //=== VK_HUAWEI_subpass_shading === vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI = PFN_vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI( vkGetDeviceProcAddr( device, "vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI" ) ); vkCmdSubpassShadingHUAWEI = PFN_vkCmdSubpassShadingHUAWEI( vkGetDeviceProcAddr( device, "vkCmdSubpassShadingHUAWEI" ) ); //=== VK_HUAWEI_invocation_mask === vkCmdBindInvocationMaskHUAWEI = PFN_vkCmdBindInvocationMaskHUAWEI( vkGetDeviceProcAddr( device, "vkCmdBindInvocationMaskHUAWEI" ) ); //=== VK_NV_external_memory_rdma === vkGetMemoryRemoteAddressNV = PFN_vkGetMemoryRemoteAddressNV( vkGetDeviceProcAddr( device, "vkGetMemoryRemoteAddressNV" ) ); //=== VK_EXT_pipeline_properties === vkGetPipelinePropertiesEXT = PFN_vkGetPipelinePropertiesEXT( vkGetDeviceProcAddr( device, "vkGetPipelinePropertiesEXT" ) ); //=== VK_EXT_extended_dynamic_state2 === vkCmdSetPatchControlPointsEXT = PFN_vkCmdSetPatchControlPointsEXT( vkGetDeviceProcAddr( device, "vkCmdSetPatchControlPointsEXT" ) ); vkCmdSetRasterizerDiscardEnableEXT = PFN_vkCmdSetRasterizerDiscardEnableEXT( vkGetDeviceProcAddr( device, "vkCmdSetRasterizerDiscardEnableEXT" ) ); if ( !vkCmdSetRasterizerDiscardEnable ) vkCmdSetRasterizerDiscardEnable = vkCmdSetRasterizerDiscardEnableEXT; vkCmdSetDepthBiasEnableEXT = PFN_vkCmdSetDepthBiasEnableEXT( vkGetDeviceProcAddr( device, "vkCmdSetDepthBiasEnableEXT" ) ); if ( !vkCmdSetDepthBiasEnable ) vkCmdSetDepthBiasEnable = vkCmdSetDepthBiasEnableEXT; vkCmdSetLogicOpEXT = PFN_vkCmdSetLogicOpEXT( vkGetDeviceProcAddr( device, "vkCmdSetLogicOpEXT" ) ); vkCmdSetPrimitiveRestartEnableEXT = PFN_vkCmdSetPrimitiveRestartEnableEXT( vkGetDeviceProcAddr( device, "vkCmdSetPrimitiveRestartEnableEXT" ) ); if ( !vkCmdSetPrimitiveRestartEnable ) vkCmdSetPrimitiveRestartEnable = vkCmdSetPrimitiveRestartEnableEXT; //=== VK_EXT_color_write_enable === vkCmdSetColorWriteEnableEXT = PFN_vkCmdSetColorWriteEnableEXT( vkGetDeviceProcAddr( device, "vkCmdSetColorWriteEnableEXT" ) ); //=== VK_KHR_ray_tracing_maintenance1 === vkCmdTraceRaysIndirect2KHR = PFN_vkCmdTraceRaysIndirect2KHR( vkGetDeviceProcAddr( device, "vkCmdTraceRaysIndirect2KHR" ) ); //=== VK_EXT_multi_draw === vkCmdDrawMultiEXT = PFN_vkCmdDrawMultiEXT( vkGetDeviceProcAddr( device, "vkCmdDrawMultiEXT" ) ); vkCmdDrawMultiIndexedEXT = PFN_vkCmdDrawMultiIndexedEXT( vkGetDeviceProcAddr( device, "vkCmdDrawMultiIndexedEXT" ) ); //=== VK_EXT_opacity_micromap === vkCreateMicromapEXT = PFN_vkCreateMicromapEXT( vkGetDeviceProcAddr( device, "vkCreateMicromapEXT" ) ); vkDestroyMicromapEXT = PFN_vkDestroyMicromapEXT( vkGetDeviceProcAddr( device, "vkDestroyMicromapEXT" ) ); vkCmdBuildMicromapsEXT = PFN_vkCmdBuildMicromapsEXT( vkGetDeviceProcAddr( device, "vkCmdBuildMicromapsEXT" ) ); vkBuildMicromapsEXT = PFN_vkBuildMicromapsEXT( vkGetDeviceProcAddr( device, "vkBuildMicromapsEXT" ) ); vkCopyMicromapEXT = PFN_vkCopyMicromapEXT( vkGetDeviceProcAddr( device, "vkCopyMicromapEXT" ) ); vkCopyMicromapToMemoryEXT = PFN_vkCopyMicromapToMemoryEXT( vkGetDeviceProcAddr( device, "vkCopyMicromapToMemoryEXT" ) ); vkCopyMemoryToMicromapEXT = PFN_vkCopyMemoryToMicromapEXT( vkGetDeviceProcAddr( device, "vkCopyMemoryToMicromapEXT" ) ); vkWriteMicromapsPropertiesEXT = PFN_vkWriteMicromapsPropertiesEXT( vkGetDeviceProcAddr( device, "vkWriteMicromapsPropertiesEXT" ) ); vkCmdCopyMicromapEXT = PFN_vkCmdCopyMicromapEXT( vkGetDeviceProcAddr( device, "vkCmdCopyMicromapEXT" ) ); vkCmdCopyMicromapToMemoryEXT = PFN_vkCmdCopyMicromapToMemoryEXT( vkGetDeviceProcAddr( device, "vkCmdCopyMicromapToMemoryEXT" ) ); vkCmdCopyMemoryToMicromapEXT = PFN_vkCmdCopyMemoryToMicromapEXT( vkGetDeviceProcAddr( device, "vkCmdCopyMemoryToMicromapEXT" ) ); vkCmdWriteMicromapsPropertiesEXT = PFN_vkCmdWriteMicromapsPropertiesEXT( vkGetDeviceProcAddr( device, "vkCmdWriteMicromapsPropertiesEXT" ) ); vkGetDeviceMicromapCompatibilityEXT = PFN_vkGetDeviceMicromapCompatibilityEXT( vkGetDeviceProcAddr( device, "vkGetDeviceMicromapCompatibilityEXT" ) ); vkGetMicromapBuildSizesEXT = PFN_vkGetMicromapBuildSizesEXT( vkGetDeviceProcAddr( device, "vkGetMicromapBuildSizesEXT" ) ); //=== VK_HUAWEI_cluster_culling_shader === vkCmdDrawClusterHUAWEI = PFN_vkCmdDrawClusterHUAWEI( vkGetDeviceProcAddr( device, "vkCmdDrawClusterHUAWEI" ) ); vkCmdDrawClusterIndirectHUAWEI = PFN_vkCmdDrawClusterIndirectHUAWEI( vkGetDeviceProcAddr( device, "vkCmdDrawClusterIndirectHUAWEI" ) ); //=== VK_EXT_pageable_device_local_memory === vkSetDeviceMemoryPriorityEXT = PFN_vkSetDeviceMemoryPriorityEXT( vkGetDeviceProcAddr( device, "vkSetDeviceMemoryPriorityEXT" ) ); //=== VK_KHR_maintenance4 === vkGetDeviceBufferMemoryRequirementsKHR = PFN_vkGetDeviceBufferMemoryRequirementsKHR( vkGetDeviceProcAddr( device, "vkGetDeviceBufferMemoryRequirementsKHR" ) ); if ( !vkGetDeviceBufferMemoryRequirements ) vkGetDeviceBufferMemoryRequirements = vkGetDeviceBufferMemoryRequirementsKHR; vkGetDeviceImageMemoryRequirementsKHR = PFN_vkGetDeviceImageMemoryRequirementsKHR( vkGetDeviceProcAddr( device, "vkGetDeviceImageMemoryRequirementsKHR" ) ); if ( !vkGetDeviceImageMemoryRequirements ) vkGetDeviceImageMemoryRequirements = vkGetDeviceImageMemoryRequirementsKHR; vkGetDeviceImageSparseMemoryRequirementsKHR = PFN_vkGetDeviceImageSparseMemoryRequirementsKHR( vkGetDeviceProcAddr( device, "vkGetDeviceImageSparseMemoryRequirementsKHR" ) ); if ( !vkGetDeviceImageSparseMemoryRequirements ) vkGetDeviceImageSparseMemoryRequirements = vkGetDeviceImageSparseMemoryRequirementsKHR; //=== VK_VALVE_descriptor_set_host_mapping === vkGetDescriptorSetLayoutHostMappingInfoVALVE = PFN_vkGetDescriptorSetLayoutHostMappingInfoVALVE( vkGetDeviceProcAddr( device, "vkGetDescriptorSetLayoutHostMappingInfoVALVE" ) ); vkGetDescriptorSetHostMappingVALVE = PFN_vkGetDescriptorSetHostMappingVALVE( vkGetDeviceProcAddr( device, "vkGetDescriptorSetHostMappingVALVE" ) ); //=== VK_NV_copy_memory_indirect === vkCmdCopyMemoryIndirectNV = PFN_vkCmdCopyMemoryIndirectNV( vkGetDeviceProcAddr( device, "vkCmdCopyMemoryIndirectNV" ) ); vkCmdCopyMemoryToImageIndirectNV = PFN_vkCmdCopyMemoryToImageIndirectNV( vkGetDeviceProcAddr( device, "vkCmdCopyMemoryToImageIndirectNV" ) ); //=== VK_NV_memory_decompression === vkCmdDecompressMemoryNV = PFN_vkCmdDecompressMemoryNV( vkGetDeviceProcAddr( device, "vkCmdDecompressMemoryNV" ) ); vkCmdDecompressMemoryIndirectCountNV = PFN_vkCmdDecompressMemoryIndirectCountNV( vkGetDeviceProcAddr( device, "vkCmdDecompressMemoryIndirectCountNV" ) ); //=== VK_NV_device_generated_commands_compute === vkGetPipelineIndirectMemoryRequirementsNV = PFN_vkGetPipelineIndirectMemoryRequirementsNV( vkGetDeviceProcAddr( device, "vkGetPipelineIndirectMemoryRequirementsNV" ) ); vkCmdUpdatePipelineIndirectBufferNV = PFN_vkCmdUpdatePipelineIndirectBufferNV( vkGetDeviceProcAddr( device, "vkCmdUpdatePipelineIndirectBufferNV" ) ); vkGetPipelineIndirectDeviceAddressNV = PFN_vkGetPipelineIndirectDeviceAddressNV( vkGetDeviceProcAddr( device, "vkGetPipelineIndirectDeviceAddressNV" ) ); //=== VK_EXT_extended_dynamic_state3 === vkCmdSetDepthClampEnableEXT = PFN_vkCmdSetDepthClampEnableEXT( vkGetDeviceProcAddr( device, "vkCmdSetDepthClampEnableEXT" ) ); vkCmdSetPolygonModeEXT = PFN_vkCmdSetPolygonModeEXT( vkGetDeviceProcAddr( device, "vkCmdSetPolygonModeEXT" ) ); vkCmdSetRasterizationSamplesEXT = PFN_vkCmdSetRasterizationSamplesEXT( vkGetDeviceProcAddr( device, "vkCmdSetRasterizationSamplesEXT" ) ); vkCmdSetSampleMaskEXT = PFN_vkCmdSetSampleMaskEXT( vkGetDeviceProcAddr( device, "vkCmdSetSampleMaskEXT" ) ); vkCmdSetAlphaToCoverageEnableEXT = PFN_vkCmdSetAlphaToCoverageEnableEXT( vkGetDeviceProcAddr( device, "vkCmdSetAlphaToCoverageEnableEXT" ) ); vkCmdSetAlphaToOneEnableEXT = PFN_vkCmdSetAlphaToOneEnableEXT( vkGetDeviceProcAddr( device, "vkCmdSetAlphaToOneEnableEXT" ) ); vkCmdSetLogicOpEnableEXT = PFN_vkCmdSetLogicOpEnableEXT( vkGetDeviceProcAddr( device, "vkCmdSetLogicOpEnableEXT" ) ); vkCmdSetColorBlendEnableEXT = PFN_vkCmdSetColorBlendEnableEXT( vkGetDeviceProcAddr( device, "vkCmdSetColorBlendEnableEXT" ) ); vkCmdSetColorBlendEquationEXT = PFN_vkCmdSetColorBlendEquationEXT( vkGetDeviceProcAddr( device, "vkCmdSetColorBlendEquationEXT" ) ); vkCmdSetColorWriteMaskEXT = PFN_vkCmdSetColorWriteMaskEXT( vkGetDeviceProcAddr( device, "vkCmdSetColorWriteMaskEXT" ) ); vkCmdSetTessellationDomainOriginEXT = PFN_vkCmdSetTessellationDomainOriginEXT( vkGetDeviceProcAddr( device, "vkCmdSetTessellationDomainOriginEXT" ) ); vkCmdSetRasterizationStreamEXT = PFN_vkCmdSetRasterizationStreamEXT( vkGetDeviceProcAddr( device, "vkCmdSetRasterizationStreamEXT" ) ); vkCmdSetConservativeRasterizationModeEXT = PFN_vkCmdSetConservativeRasterizationModeEXT( vkGetDeviceProcAddr( device, "vkCmdSetConservativeRasterizationModeEXT" ) ); vkCmdSetExtraPrimitiveOverestimationSizeEXT = PFN_vkCmdSetExtraPrimitiveOverestimationSizeEXT( vkGetDeviceProcAddr( device, "vkCmdSetExtraPrimitiveOverestimationSizeEXT" ) ); vkCmdSetDepthClipEnableEXT = PFN_vkCmdSetDepthClipEnableEXT( vkGetDeviceProcAddr( device, "vkCmdSetDepthClipEnableEXT" ) ); vkCmdSetSampleLocationsEnableEXT = PFN_vkCmdSetSampleLocationsEnableEXT( vkGetDeviceProcAddr( device, "vkCmdSetSampleLocationsEnableEXT" ) ); vkCmdSetColorBlendAdvancedEXT = PFN_vkCmdSetColorBlendAdvancedEXT( vkGetDeviceProcAddr( device, "vkCmdSetColorBlendAdvancedEXT" ) ); vkCmdSetProvokingVertexModeEXT = PFN_vkCmdSetProvokingVertexModeEXT( vkGetDeviceProcAddr( device, "vkCmdSetProvokingVertexModeEXT" ) ); vkCmdSetLineRasterizationModeEXT = PFN_vkCmdSetLineRasterizationModeEXT( vkGetDeviceProcAddr( device, "vkCmdSetLineRasterizationModeEXT" ) ); vkCmdSetLineStippleEnableEXT = PFN_vkCmdSetLineStippleEnableEXT( vkGetDeviceProcAddr( device, "vkCmdSetLineStippleEnableEXT" ) ); vkCmdSetDepthClipNegativeOneToOneEXT = PFN_vkCmdSetDepthClipNegativeOneToOneEXT( vkGetDeviceProcAddr( device, "vkCmdSetDepthClipNegativeOneToOneEXT" ) ); vkCmdSetViewportWScalingEnableNV = PFN_vkCmdSetViewportWScalingEnableNV( vkGetDeviceProcAddr( device, "vkCmdSetViewportWScalingEnableNV" ) ); vkCmdSetViewportSwizzleNV = PFN_vkCmdSetViewportSwizzleNV( vkGetDeviceProcAddr( device, "vkCmdSetViewportSwizzleNV" ) ); vkCmdSetCoverageToColorEnableNV = PFN_vkCmdSetCoverageToColorEnableNV( vkGetDeviceProcAddr( device, "vkCmdSetCoverageToColorEnableNV" ) ); vkCmdSetCoverageToColorLocationNV = PFN_vkCmdSetCoverageToColorLocationNV( vkGetDeviceProcAddr( device, "vkCmdSetCoverageToColorLocationNV" ) ); vkCmdSetCoverageModulationModeNV = PFN_vkCmdSetCoverageModulationModeNV( vkGetDeviceProcAddr( device, "vkCmdSetCoverageModulationModeNV" ) ); vkCmdSetCoverageModulationTableEnableNV = PFN_vkCmdSetCoverageModulationTableEnableNV( vkGetDeviceProcAddr( device, "vkCmdSetCoverageModulationTableEnableNV" ) ); vkCmdSetCoverageModulationTableNV = PFN_vkCmdSetCoverageModulationTableNV( vkGetDeviceProcAddr( device, "vkCmdSetCoverageModulationTableNV" ) ); vkCmdSetShadingRateImageEnableNV = PFN_vkCmdSetShadingRateImageEnableNV( vkGetDeviceProcAddr( device, "vkCmdSetShadingRateImageEnableNV" ) ); vkCmdSetRepresentativeFragmentTestEnableNV = PFN_vkCmdSetRepresentativeFragmentTestEnableNV( vkGetDeviceProcAddr( device, "vkCmdSetRepresentativeFragmentTestEnableNV" ) ); vkCmdSetCoverageReductionModeNV = PFN_vkCmdSetCoverageReductionModeNV( vkGetDeviceProcAddr( device, "vkCmdSetCoverageReductionModeNV" ) ); //=== VK_EXT_shader_module_identifier === vkGetShaderModuleIdentifierEXT = PFN_vkGetShaderModuleIdentifierEXT( vkGetDeviceProcAddr( device, "vkGetShaderModuleIdentifierEXT" ) ); vkGetShaderModuleCreateInfoIdentifierEXT = PFN_vkGetShaderModuleCreateInfoIdentifierEXT( vkGetDeviceProcAddr( device, "vkGetShaderModuleCreateInfoIdentifierEXT" ) ); //=== VK_NV_optical_flow === vkCreateOpticalFlowSessionNV = PFN_vkCreateOpticalFlowSessionNV( vkGetDeviceProcAddr( device, "vkCreateOpticalFlowSessionNV" ) ); vkDestroyOpticalFlowSessionNV = PFN_vkDestroyOpticalFlowSessionNV( vkGetDeviceProcAddr( device, "vkDestroyOpticalFlowSessionNV" ) ); vkBindOpticalFlowSessionImageNV = PFN_vkBindOpticalFlowSessionImageNV( vkGetDeviceProcAddr( device, "vkBindOpticalFlowSessionImageNV" ) ); vkCmdOpticalFlowExecuteNV = PFN_vkCmdOpticalFlowExecuteNV( vkGetDeviceProcAddr( device, "vkCmdOpticalFlowExecuteNV" ) ); //=== VK_KHR_maintenance5 === vkCmdBindIndexBuffer2KHR = PFN_vkCmdBindIndexBuffer2KHR( vkGetDeviceProcAddr( device, "vkCmdBindIndexBuffer2KHR" ) ); if ( !vkCmdBindIndexBuffer2 ) vkCmdBindIndexBuffer2 = vkCmdBindIndexBuffer2KHR; vkGetRenderingAreaGranularityKHR = PFN_vkGetRenderingAreaGranularityKHR( vkGetDeviceProcAddr( device, "vkGetRenderingAreaGranularityKHR" ) ); if ( !vkGetRenderingAreaGranularity ) vkGetRenderingAreaGranularity = vkGetRenderingAreaGranularityKHR; vkGetDeviceImageSubresourceLayoutKHR = PFN_vkGetDeviceImageSubresourceLayoutKHR( vkGetDeviceProcAddr( device, "vkGetDeviceImageSubresourceLayoutKHR" ) ); if ( !vkGetDeviceImageSubresourceLayout ) vkGetDeviceImageSubresourceLayout = vkGetDeviceImageSubresourceLayoutKHR; vkGetImageSubresourceLayout2KHR = PFN_vkGetImageSubresourceLayout2KHR( vkGetDeviceProcAddr( device, "vkGetImageSubresourceLayout2KHR" ) ); if ( !vkGetImageSubresourceLayout2 ) vkGetImageSubresourceLayout2 = vkGetImageSubresourceLayout2KHR; //=== VK_AMD_anti_lag === vkAntiLagUpdateAMD = PFN_vkAntiLagUpdateAMD( vkGetDeviceProcAddr( device, "vkAntiLagUpdateAMD" ) ); //=== VK_EXT_shader_object === vkCreateShadersEXT = PFN_vkCreateShadersEXT( vkGetDeviceProcAddr( device, "vkCreateShadersEXT" ) ); vkDestroyShaderEXT = PFN_vkDestroyShaderEXT( vkGetDeviceProcAddr( device, "vkDestroyShaderEXT" ) ); vkGetShaderBinaryDataEXT = PFN_vkGetShaderBinaryDataEXT( vkGetDeviceProcAddr( device, "vkGetShaderBinaryDataEXT" ) ); vkCmdBindShadersEXT = PFN_vkCmdBindShadersEXT( vkGetDeviceProcAddr( device, "vkCmdBindShadersEXT" ) ); vkCmdSetDepthClampRangeEXT = PFN_vkCmdSetDepthClampRangeEXT( vkGetDeviceProcAddr( device, "vkCmdSetDepthClampRangeEXT" ) ); //=== VK_KHR_pipeline_binary === vkCreatePipelineBinariesKHR = PFN_vkCreatePipelineBinariesKHR( vkGetDeviceProcAddr( device, "vkCreatePipelineBinariesKHR" ) ); vkDestroyPipelineBinaryKHR = PFN_vkDestroyPipelineBinaryKHR( vkGetDeviceProcAddr( device, "vkDestroyPipelineBinaryKHR" ) ); vkGetPipelineKeyKHR = PFN_vkGetPipelineKeyKHR( vkGetDeviceProcAddr( device, "vkGetPipelineKeyKHR" ) ); vkGetPipelineBinaryDataKHR = PFN_vkGetPipelineBinaryDataKHR( vkGetDeviceProcAddr( device, "vkGetPipelineBinaryDataKHR" ) ); vkReleaseCapturedPipelineDataKHR = PFN_vkReleaseCapturedPipelineDataKHR( vkGetDeviceProcAddr( device, "vkReleaseCapturedPipelineDataKHR" ) ); //=== VK_QCOM_tile_properties === vkGetFramebufferTilePropertiesQCOM = PFN_vkGetFramebufferTilePropertiesQCOM( vkGetDeviceProcAddr( device, "vkGetFramebufferTilePropertiesQCOM" ) ); vkGetDynamicRenderingTilePropertiesQCOM = PFN_vkGetDynamicRenderingTilePropertiesQCOM( vkGetDeviceProcAddr( device, "vkGetDynamicRenderingTilePropertiesQCOM" ) ); //=== VK_NV_cooperative_vector === vkConvertCooperativeVectorMatrixNV = PFN_vkConvertCooperativeVectorMatrixNV( vkGetDeviceProcAddr( device, "vkConvertCooperativeVectorMatrixNV" ) ); vkCmdConvertCooperativeVectorMatrixNV = PFN_vkCmdConvertCooperativeVectorMatrixNV( vkGetDeviceProcAddr( device, "vkCmdConvertCooperativeVectorMatrixNV" ) ); //=== VK_NV_low_latency2 === vkSetLatencySleepModeNV = PFN_vkSetLatencySleepModeNV( vkGetDeviceProcAddr( device, "vkSetLatencySleepModeNV" ) ); vkLatencySleepNV = PFN_vkLatencySleepNV( vkGetDeviceProcAddr( device, "vkLatencySleepNV" ) ); vkSetLatencyMarkerNV = PFN_vkSetLatencyMarkerNV( vkGetDeviceProcAddr( device, "vkSetLatencyMarkerNV" ) ); vkGetLatencyTimingsNV = PFN_vkGetLatencyTimingsNV( vkGetDeviceProcAddr( device, "vkGetLatencyTimingsNV" ) ); vkQueueNotifyOutOfBandNV = PFN_vkQueueNotifyOutOfBandNV( vkGetDeviceProcAddr( device, "vkQueueNotifyOutOfBandNV" ) ); //=== VK_EXT_attachment_feedback_loop_dynamic_state === vkCmdSetAttachmentFeedbackLoopEnableEXT = PFN_vkCmdSetAttachmentFeedbackLoopEnableEXT( vkGetDeviceProcAddr( device, "vkCmdSetAttachmentFeedbackLoopEnableEXT" ) ); # if defined( VK_USE_PLATFORM_SCREEN_QNX ) //=== VK_QNX_external_memory_screen_buffer === vkGetScreenBufferPropertiesQNX = PFN_vkGetScreenBufferPropertiesQNX( vkGetDeviceProcAddr( device, "vkGetScreenBufferPropertiesQNX" ) ); # endif /*VK_USE_PLATFORM_SCREEN_QNX*/ //=== VK_KHR_line_rasterization === vkCmdSetLineStippleKHR = PFN_vkCmdSetLineStippleKHR( vkGetDeviceProcAddr( device, "vkCmdSetLineStippleKHR" ) ); if ( !vkCmdSetLineStipple ) vkCmdSetLineStipple = vkCmdSetLineStippleKHR; //=== VK_KHR_calibrated_timestamps === vkGetCalibratedTimestampsKHR = PFN_vkGetCalibratedTimestampsKHR( vkGetDeviceProcAddr( device, "vkGetCalibratedTimestampsKHR" ) ); //=== VK_KHR_maintenance6 === vkCmdBindDescriptorSets2KHR = PFN_vkCmdBindDescriptorSets2KHR( vkGetDeviceProcAddr( device, "vkCmdBindDescriptorSets2KHR" ) ); if ( !vkCmdBindDescriptorSets2 ) vkCmdBindDescriptorSets2 = vkCmdBindDescriptorSets2KHR; vkCmdPushConstants2KHR = PFN_vkCmdPushConstants2KHR( vkGetDeviceProcAddr( device, "vkCmdPushConstants2KHR" ) ); if ( !vkCmdPushConstants2 ) vkCmdPushConstants2 = vkCmdPushConstants2KHR; vkCmdPushDescriptorSet2KHR = PFN_vkCmdPushDescriptorSet2KHR( vkGetDeviceProcAddr( device, "vkCmdPushDescriptorSet2KHR" ) ); if ( !vkCmdPushDescriptorSet2 ) vkCmdPushDescriptorSet2 = vkCmdPushDescriptorSet2KHR; vkCmdPushDescriptorSetWithTemplate2KHR = PFN_vkCmdPushDescriptorSetWithTemplate2KHR( vkGetDeviceProcAddr( device, "vkCmdPushDescriptorSetWithTemplate2KHR" ) ); if ( !vkCmdPushDescriptorSetWithTemplate2 ) vkCmdPushDescriptorSetWithTemplate2 = vkCmdPushDescriptorSetWithTemplate2KHR; vkCmdSetDescriptorBufferOffsets2EXT = PFN_vkCmdSetDescriptorBufferOffsets2EXT( vkGetDeviceProcAddr( device, "vkCmdSetDescriptorBufferOffsets2EXT" ) ); vkCmdBindDescriptorBufferEmbeddedSamplers2EXT = PFN_vkCmdBindDescriptorBufferEmbeddedSamplers2EXT( vkGetDeviceProcAddr( device, "vkCmdBindDescriptorBufferEmbeddedSamplers2EXT" ) ); //=== VK_NV_cluster_acceleration_structure === vkGetClusterAccelerationStructureBuildSizesNV = PFN_vkGetClusterAccelerationStructureBuildSizesNV( vkGetDeviceProcAddr( device, "vkGetClusterAccelerationStructureBuildSizesNV" ) ); vkCmdBuildClusterAccelerationStructureIndirectNV = PFN_vkCmdBuildClusterAccelerationStructureIndirectNV( vkGetDeviceProcAddr( device, "vkCmdBuildClusterAccelerationStructureIndirectNV" ) ); //=== VK_NV_partitioned_acceleration_structure === vkGetPartitionedAccelerationStructuresBuildSizesNV = PFN_vkGetPartitionedAccelerationStructuresBuildSizesNV( vkGetDeviceProcAddr( device, "vkGetPartitionedAccelerationStructuresBuildSizesNV" ) ); vkCmdBuildPartitionedAccelerationStructuresNV = PFN_vkCmdBuildPartitionedAccelerationStructuresNV( vkGetDeviceProcAddr( device, "vkCmdBuildPartitionedAccelerationStructuresNV" ) ); //=== VK_EXT_device_generated_commands === vkGetGeneratedCommandsMemoryRequirementsEXT = PFN_vkGetGeneratedCommandsMemoryRequirementsEXT( vkGetDeviceProcAddr( device, "vkGetGeneratedCommandsMemoryRequirementsEXT" ) ); vkCmdPreprocessGeneratedCommandsEXT = PFN_vkCmdPreprocessGeneratedCommandsEXT( vkGetDeviceProcAddr( device, "vkCmdPreprocessGeneratedCommandsEXT" ) ); vkCmdExecuteGeneratedCommandsEXT = PFN_vkCmdExecuteGeneratedCommandsEXT( vkGetDeviceProcAddr( device, "vkCmdExecuteGeneratedCommandsEXT" ) ); vkCreateIndirectCommandsLayoutEXT = PFN_vkCreateIndirectCommandsLayoutEXT( vkGetDeviceProcAddr( device, "vkCreateIndirectCommandsLayoutEXT" ) ); vkDestroyIndirectCommandsLayoutEXT = PFN_vkDestroyIndirectCommandsLayoutEXT( vkGetDeviceProcAddr( device, "vkDestroyIndirectCommandsLayoutEXT" ) ); vkCreateIndirectExecutionSetEXT = PFN_vkCreateIndirectExecutionSetEXT( vkGetDeviceProcAddr( device, "vkCreateIndirectExecutionSetEXT" ) ); vkDestroyIndirectExecutionSetEXT = PFN_vkDestroyIndirectExecutionSetEXT( vkGetDeviceProcAddr( device, "vkDestroyIndirectExecutionSetEXT" ) ); vkUpdateIndirectExecutionSetPipelineEXT = PFN_vkUpdateIndirectExecutionSetPipelineEXT( vkGetDeviceProcAddr( device, "vkUpdateIndirectExecutionSetPipelineEXT" ) ); vkUpdateIndirectExecutionSetShaderEXT = PFN_vkUpdateIndirectExecutionSetShaderEXT( vkGetDeviceProcAddr( device, "vkUpdateIndirectExecutionSetShaderEXT" ) ); # if defined( VK_USE_PLATFORM_METAL_EXT ) //=== VK_EXT_external_memory_metal === vkGetMemoryMetalHandleEXT = PFN_vkGetMemoryMetalHandleEXT( vkGetDeviceProcAddr( device, "vkGetMemoryMetalHandleEXT" ) ); vkGetMemoryMetalHandlePropertiesEXT = PFN_vkGetMemoryMetalHandlePropertiesEXT( vkGetDeviceProcAddr( device, "vkGetMemoryMetalHandlePropertiesEXT" ) ); # endif /*VK_USE_PLATFORM_METAL_EXT*/ } public: //=== VK_VERSION_1_0 === PFN_vkGetDeviceProcAddr vkGetDeviceProcAddr = 0; PFN_vkDestroyDevice vkDestroyDevice = 0; PFN_vkGetDeviceQueue vkGetDeviceQueue = 0; PFN_vkQueueSubmit vkQueueSubmit = 0; PFN_vkQueueWaitIdle vkQueueWaitIdle = 0; PFN_vkDeviceWaitIdle vkDeviceWaitIdle = 0; PFN_vkAllocateMemory vkAllocateMemory = 0; PFN_vkFreeMemory vkFreeMemory = 0; PFN_vkMapMemory vkMapMemory = 0; PFN_vkUnmapMemory vkUnmapMemory = 0; PFN_vkFlushMappedMemoryRanges vkFlushMappedMemoryRanges = 0; PFN_vkInvalidateMappedMemoryRanges vkInvalidateMappedMemoryRanges = 0; PFN_vkGetDeviceMemoryCommitment vkGetDeviceMemoryCommitment = 0; PFN_vkBindBufferMemory vkBindBufferMemory = 0; PFN_vkBindImageMemory vkBindImageMemory = 0; PFN_vkGetBufferMemoryRequirements vkGetBufferMemoryRequirements = 0; PFN_vkGetImageMemoryRequirements vkGetImageMemoryRequirements = 0; PFN_vkGetImageSparseMemoryRequirements vkGetImageSparseMemoryRequirements = 0; PFN_vkQueueBindSparse vkQueueBindSparse = 0; PFN_vkCreateFence vkCreateFence = 0; PFN_vkDestroyFence vkDestroyFence = 0; PFN_vkResetFences vkResetFences = 0; PFN_vkGetFenceStatus vkGetFenceStatus = 0; PFN_vkWaitForFences vkWaitForFences = 0; PFN_vkCreateSemaphore vkCreateSemaphore = 0; PFN_vkDestroySemaphore vkDestroySemaphore = 0; PFN_vkCreateEvent vkCreateEvent = 0; PFN_vkDestroyEvent vkDestroyEvent = 0; PFN_vkGetEventStatus vkGetEventStatus = 0; PFN_vkSetEvent vkSetEvent = 0; PFN_vkResetEvent vkResetEvent = 0; PFN_vkCreateQueryPool vkCreateQueryPool = 0; PFN_vkDestroyQueryPool vkDestroyQueryPool = 0; PFN_vkGetQueryPoolResults vkGetQueryPoolResults = 0; PFN_vkCreateBuffer vkCreateBuffer = 0; PFN_vkDestroyBuffer vkDestroyBuffer = 0; PFN_vkCreateBufferView vkCreateBufferView = 0; PFN_vkDestroyBufferView vkDestroyBufferView = 0; PFN_vkCreateImage vkCreateImage = 0; PFN_vkDestroyImage vkDestroyImage = 0; PFN_vkGetImageSubresourceLayout vkGetImageSubresourceLayout = 0; PFN_vkCreateImageView vkCreateImageView = 0; PFN_vkDestroyImageView vkDestroyImageView = 0; PFN_vkCreateShaderModule vkCreateShaderModule = 0; PFN_vkDestroyShaderModule vkDestroyShaderModule = 0; PFN_vkCreatePipelineCache vkCreatePipelineCache = 0; PFN_vkDestroyPipelineCache vkDestroyPipelineCache = 0; PFN_vkGetPipelineCacheData vkGetPipelineCacheData = 0; PFN_vkMergePipelineCaches vkMergePipelineCaches = 0; PFN_vkCreateGraphicsPipelines vkCreateGraphicsPipelines = 0; PFN_vkCreateComputePipelines vkCreateComputePipelines = 0; PFN_vkDestroyPipeline vkDestroyPipeline = 0; PFN_vkCreatePipelineLayout vkCreatePipelineLayout = 0; PFN_vkDestroyPipelineLayout vkDestroyPipelineLayout = 0; PFN_vkCreateSampler vkCreateSampler = 0; PFN_vkDestroySampler vkDestroySampler = 0; PFN_vkCreateDescriptorSetLayout vkCreateDescriptorSetLayout = 0; PFN_vkDestroyDescriptorSetLayout vkDestroyDescriptorSetLayout = 0; PFN_vkCreateDescriptorPool vkCreateDescriptorPool = 0; PFN_vkDestroyDescriptorPool vkDestroyDescriptorPool = 0; PFN_vkResetDescriptorPool vkResetDescriptorPool = 0; PFN_vkAllocateDescriptorSets vkAllocateDescriptorSets = 0; PFN_vkFreeDescriptorSets vkFreeDescriptorSets = 0; PFN_vkUpdateDescriptorSets vkUpdateDescriptorSets = 0; PFN_vkCreateFramebuffer vkCreateFramebuffer = 0; PFN_vkDestroyFramebuffer vkDestroyFramebuffer = 0; PFN_vkCreateRenderPass vkCreateRenderPass = 0; PFN_vkDestroyRenderPass vkDestroyRenderPass = 0; PFN_vkGetRenderAreaGranularity vkGetRenderAreaGranularity = 0; PFN_vkCreateCommandPool vkCreateCommandPool = 0; PFN_vkDestroyCommandPool vkDestroyCommandPool = 0; PFN_vkResetCommandPool vkResetCommandPool = 0; PFN_vkAllocateCommandBuffers vkAllocateCommandBuffers = 0; PFN_vkFreeCommandBuffers vkFreeCommandBuffers = 0; PFN_vkBeginCommandBuffer vkBeginCommandBuffer = 0; PFN_vkEndCommandBuffer vkEndCommandBuffer = 0; PFN_vkResetCommandBuffer vkResetCommandBuffer = 0; PFN_vkCmdBindPipeline vkCmdBindPipeline = 0; PFN_vkCmdSetViewport vkCmdSetViewport = 0; PFN_vkCmdSetScissor vkCmdSetScissor = 0; PFN_vkCmdSetLineWidth vkCmdSetLineWidth = 0; PFN_vkCmdSetDepthBias vkCmdSetDepthBias = 0; PFN_vkCmdSetBlendConstants vkCmdSetBlendConstants = 0; PFN_vkCmdSetDepthBounds vkCmdSetDepthBounds = 0; PFN_vkCmdSetStencilCompareMask vkCmdSetStencilCompareMask = 0; PFN_vkCmdSetStencilWriteMask vkCmdSetStencilWriteMask = 0; PFN_vkCmdSetStencilReference vkCmdSetStencilReference = 0; PFN_vkCmdBindDescriptorSets vkCmdBindDescriptorSets = 0; PFN_vkCmdBindIndexBuffer vkCmdBindIndexBuffer = 0; PFN_vkCmdBindVertexBuffers vkCmdBindVertexBuffers = 0; PFN_vkCmdDraw vkCmdDraw = 0; PFN_vkCmdDrawIndexed vkCmdDrawIndexed = 0; PFN_vkCmdDrawIndirect vkCmdDrawIndirect = 0; PFN_vkCmdDrawIndexedIndirect vkCmdDrawIndexedIndirect = 0; PFN_vkCmdDispatch vkCmdDispatch = 0; PFN_vkCmdDispatchIndirect vkCmdDispatchIndirect = 0; PFN_vkCmdCopyBuffer vkCmdCopyBuffer = 0; PFN_vkCmdCopyImage vkCmdCopyImage = 0; PFN_vkCmdBlitImage vkCmdBlitImage = 0; PFN_vkCmdCopyBufferToImage vkCmdCopyBufferToImage = 0; PFN_vkCmdCopyImageToBuffer vkCmdCopyImageToBuffer = 0; PFN_vkCmdUpdateBuffer vkCmdUpdateBuffer = 0; PFN_vkCmdFillBuffer vkCmdFillBuffer = 0; PFN_vkCmdClearColorImage vkCmdClearColorImage = 0; PFN_vkCmdClearDepthStencilImage vkCmdClearDepthStencilImage = 0; PFN_vkCmdClearAttachments vkCmdClearAttachments = 0; PFN_vkCmdResolveImage vkCmdResolveImage = 0; PFN_vkCmdSetEvent vkCmdSetEvent = 0; PFN_vkCmdResetEvent vkCmdResetEvent = 0; PFN_vkCmdWaitEvents vkCmdWaitEvents = 0; PFN_vkCmdPipelineBarrier vkCmdPipelineBarrier = 0; PFN_vkCmdBeginQuery vkCmdBeginQuery = 0; PFN_vkCmdEndQuery vkCmdEndQuery = 0; PFN_vkCmdResetQueryPool vkCmdResetQueryPool = 0; PFN_vkCmdWriteTimestamp vkCmdWriteTimestamp = 0; PFN_vkCmdCopyQueryPoolResults vkCmdCopyQueryPoolResults = 0; PFN_vkCmdPushConstants vkCmdPushConstants = 0; PFN_vkCmdBeginRenderPass vkCmdBeginRenderPass = 0; PFN_vkCmdNextSubpass vkCmdNextSubpass = 0; PFN_vkCmdEndRenderPass vkCmdEndRenderPass = 0; PFN_vkCmdExecuteCommands vkCmdExecuteCommands = 0; //=== VK_VERSION_1_1 === PFN_vkBindBufferMemory2 vkBindBufferMemory2 = 0; PFN_vkBindImageMemory2 vkBindImageMemory2 = 0; PFN_vkGetDeviceGroupPeerMemoryFeatures vkGetDeviceGroupPeerMemoryFeatures = 0; PFN_vkCmdSetDeviceMask vkCmdSetDeviceMask = 0; PFN_vkCmdDispatchBase vkCmdDispatchBase = 0; PFN_vkGetImageMemoryRequirements2 vkGetImageMemoryRequirements2 = 0; PFN_vkGetBufferMemoryRequirements2 vkGetBufferMemoryRequirements2 = 0; PFN_vkGetImageSparseMemoryRequirements2 vkGetImageSparseMemoryRequirements2 = 0; PFN_vkTrimCommandPool vkTrimCommandPool = 0; PFN_vkGetDeviceQueue2 vkGetDeviceQueue2 = 0; PFN_vkCreateSamplerYcbcrConversion vkCreateSamplerYcbcrConversion = 0; PFN_vkDestroySamplerYcbcrConversion vkDestroySamplerYcbcrConversion = 0; PFN_vkCreateDescriptorUpdateTemplate vkCreateDescriptorUpdateTemplate = 0; PFN_vkDestroyDescriptorUpdateTemplate vkDestroyDescriptorUpdateTemplate = 0; PFN_vkUpdateDescriptorSetWithTemplate vkUpdateDescriptorSetWithTemplate = 0; PFN_vkGetDescriptorSetLayoutSupport vkGetDescriptorSetLayoutSupport = 0; //=== VK_VERSION_1_2 === PFN_vkCmdDrawIndirectCount vkCmdDrawIndirectCount = 0; PFN_vkCmdDrawIndexedIndirectCount vkCmdDrawIndexedIndirectCount = 0; PFN_vkCreateRenderPass2 vkCreateRenderPass2 = 0; PFN_vkCmdBeginRenderPass2 vkCmdBeginRenderPass2 = 0; PFN_vkCmdNextSubpass2 vkCmdNextSubpass2 = 0; PFN_vkCmdEndRenderPass2 vkCmdEndRenderPass2 = 0; PFN_vkResetQueryPool vkResetQueryPool = 0; PFN_vkGetSemaphoreCounterValue vkGetSemaphoreCounterValue = 0; PFN_vkWaitSemaphores vkWaitSemaphores = 0; PFN_vkSignalSemaphore vkSignalSemaphore = 0; PFN_vkGetBufferDeviceAddress vkGetBufferDeviceAddress = 0; PFN_vkGetBufferOpaqueCaptureAddress vkGetBufferOpaqueCaptureAddress = 0; PFN_vkGetDeviceMemoryOpaqueCaptureAddress vkGetDeviceMemoryOpaqueCaptureAddress = 0; //=== VK_VERSION_1_3 === PFN_vkCreatePrivateDataSlot vkCreatePrivateDataSlot = 0; PFN_vkDestroyPrivateDataSlot vkDestroyPrivateDataSlot = 0; PFN_vkSetPrivateData vkSetPrivateData = 0; PFN_vkGetPrivateData vkGetPrivateData = 0; PFN_vkCmdSetEvent2 vkCmdSetEvent2 = 0; PFN_vkCmdResetEvent2 vkCmdResetEvent2 = 0; PFN_vkCmdWaitEvents2 vkCmdWaitEvents2 = 0; PFN_vkCmdPipelineBarrier2 vkCmdPipelineBarrier2 = 0; PFN_vkCmdWriteTimestamp2 vkCmdWriteTimestamp2 = 0; PFN_vkQueueSubmit2 vkQueueSubmit2 = 0; PFN_vkCmdCopyBuffer2 vkCmdCopyBuffer2 = 0; PFN_vkCmdCopyImage2 vkCmdCopyImage2 = 0; PFN_vkCmdCopyBufferToImage2 vkCmdCopyBufferToImage2 = 0; PFN_vkCmdCopyImageToBuffer2 vkCmdCopyImageToBuffer2 = 0; PFN_vkCmdBlitImage2 vkCmdBlitImage2 = 0; PFN_vkCmdResolveImage2 vkCmdResolveImage2 = 0; PFN_vkCmdBeginRendering vkCmdBeginRendering = 0; PFN_vkCmdEndRendering vkCmdEndRendering = 0; PFN_vkCmdSetCullMode vkCmdSetCullMode = 0; PFN_vkCmdSetFrontFace vkCmdSetFrontFace = 0; PFN_vkCmdSetPrimitiveTopology vkCmdSetPrimitiveTopology = 0; PFN_vkCmdSetViewportWithCount vkCmdSetViewportWithCount = 0; PFN_vkCmdSetScissorWithCount vkCmdSetScissorWithCount = 0; PFN_vkCmdBindVertexBuffers2 vkCmdBindVertexBuffers2 = 0; PFN_vkCmdSetDepthTestEnable vkCmdSetDepthTestEnable = 0; PFN_vkCmdSetDepthWriteEnable vkCmdSetDepthWriteEnable = 0; PFN_vkCmdSetDepthCompareOp vkCmdSetDepthCompareOp = 0; PFN_vkCmdSetDepthBoundsTestEnable vkCmdSetDepthBoundsTestEnable = 0; PFN_vkCmdSetStencilTestEnable vkCmdSetStencilTestEnable = 0; PFN_vkCmdSetStencilOp vkCmdSetStencilOp = 0; PFN_vkCmdSetRasterizerDiscardEnable vkCmdSetRasterizerDiscardEnable = 0; PFN_vkCmdSetDepthBiasEnable vkCmdSetDepthBiasEnable = 0; PFN_vkCmdSetPrimitiveRestartEnable vkCmdSetPrimitiveRestartEnable = 0; PFN_vkGetDeviceBufferMemoryRequirements vkGetDeviceBufferMemoryRequirements = 0; PFN_vkGetDeviceImageMemoryRequirements vkGetDeviceImageMemoryRequirements = 0; PFN_vkGetDeviceImageSparseMemoryRequirements vkGetDeviceImageSparseMemoryRequirements = 0; //=== VK_VERSION_1_4 === PFN_vkCmdSetLineStipple vkCmdSetLineStipple = 0; PFN_vkMapMemory2 vkMapMemory2 = 0; PFN_vkUnmapMemory2 vkUnmapMemory2 = 0; PFN_vkCmdBindIndexBuffer2 vkCmdBindIndexBuffer2 = 0; PFN_vkGetRenderingAreaGranularity vkGetRenderingAreaGranularity = 0; PFN_vkGetDeviceImageSubresourceLayout vkGetDeviceImageSubresourceLayout = 0; PFN_vkGetImageSubresourceLayout2 vkGetImageSubresourceLayout2 = 0; PFN_vkCmdPushDescriptorSet vkCmdPushDescriptorSet = 0; PFN_vkCmdPushDescriptorSetWithTemplate vkCmdPushDescriptorSetWithTemplate = 0; PFN_vkCmdSetRenderingAttachmentLocations vkCmdSetRenderingAttachmentLocations = 0; PFN_vkCmdSetRenderingInputAttachmentIndices vkCmdSetRenderingInputAttachmentIndices = 0; PFN_vkCmdBindDescriptorSets2 vkCmdBindDescriptorSets2 = 0; PFN_vkCmdPushConstants2 vkCmdPushConstants2 = 0; PFN_vkCmdPushDescriptorSet2 vkCmdPushDescriptorSet2 = 0; PFN_vkCmdPushDescriptorSetWithTemplate2 vkCmdPushDescriptorSetWithTemplate2 = 0; PFN_vkCopyMemoryToImage vkCopyMemoryToImage = 0; PFN_vkCopyImageToMemory vkCopyImageToMemory = 0; PFN_vkCopyImageToImage vkCopyImageToImage = 0; PFN_vkTransitionImageLayout vkTransitionImageLayout = 0; //=== VK_KHR_swapchain === PFN_vkCreateSwapchainKHR vkCreateSwapchainKHR = 0; PFN_vkDestroySwapchainKHR vkDestroySwapchainKHR = 0; PFN_vkGetSwapchainImagesKHR vkGetSwapchainImagesKHR = 0; PFN_vkAcquireNextImageKHR vkAcquireNextImageKHR = 0; PFN_vkQueuePresentKHR vkQueuePresentKHR = 0; PFN_vkGetDeviceGroupPresentCapabilitiesKHR vkGetDeviceGroupPresentCapabilitiesKHR = 0; PFN_vkGetDeviceGroupSurfacePresentModesKHR vkGetDeviceGroupSurfacePresentModesKHR = 0; PFN_vkAcquireNextImage2KHR vkAcquireNextImage2KHR = 0; //=== VK_KHR_display_swapchain === PFN_vkCreateSharedSwapchainsKHR vkCreateSharedSwapchainsKHR = 0; //=== VK_EXT_debug_marker === PFN_vkDebugMarkerSetObjectTagEXT vkDebugMarkerSetObjectTagEXT = 0; PFN_vkDebugMarkerSetObjectNameEXT vkDebugMarkerSetObjectNameEXT = 0; PFN_vkCmdDebugMarkerBeginEXT vkCmdDebugMarkerBeginEXT = 0; PFN_vkCmdDebugMarkerEndEXT vkCmdDebugMarkerEndEXT = 0; PFN_vkCmdDebugMarkerInsertEXT vkCmdDebugMarkerInsertEXT = 0; //=== VK_KHR_video_queue === PFN_vkCreateVideoSessionKHR vkCreateVideoSessionKHR = 0; PFN_vkDestroyVideoSessionKHR vkDestroyVideoSessionKHR = 0; PFN_vkGetVideoSessionMemoryRequirementsKHR vkGetVideoSessionMemoryRequirementsKHR = 0; PFN_vkBindVideoSessionMemoryKHR vkBindVideoSessionMemoryKHR = 0; PFN_vkCreateVideoSessionParametersKHR vkCreateVideoSessionParametersKHR = 0; PFN_vkUpdateVideoSessionParametersKHR vkUpdateVideoSessionParametersKHR = 0; PFN_vkDestroyVideoSessionParametersKHR vkDestroyVideoSessionParametersKHR = 0; PFN_vkCmdBeginVideoCodingKHR vkCmdBeginVideoCodingKHR = 0; PFN_vkCmdEndVideoCodingKHR vkCmdEndVideoCodingKHR = 0; PFN_vkCmdControlVideoCodingKHR vkCmdControlVideoCodingKHR = 0; //=== VK_KHR_video_decode_queue === PFN_vkCmdDecodeVideoKHR vkCmdDecodeVideoKHR = 0; //=== VK_EXT_transform_feedback === PFN_vkCmdBindTransformFeedbackBuffersEXT vkCmdBindTransformFeedbackBuffersEXT = 0; PFN_vkCmdBeginTransformFeedbackEXT vkCmdBeginTransformFeedbackEXT = 0; PFN_vkCmdEndTransformFeedbackEXT vkCmdEndTransformFeedbackEXT = 0; PFN_vkCmdBeginQueryIndexedEXT vkCmdBeginQueryIndexedEXT = 0; PFN_vkCmdEndQueryIndexedEXT vkCmdEndQueryIndexedEXT = 0; PFN_vkCmdDrawIndirectByteCountEXT vkCmdDrawIndirectByteCountEXT = 0; //=== VK_NVX_binary_import === PFN_vkCreateCuModuleNVX vkCreateCuModuleNVX = 0; PFN_vkCreateCuFunctionNVX vkCreateCuFunctionNVX = 0; PFN_vkDestroyCuModuleNVX vkDestroyCuModuleNVX = 0; PFN_vkDestroyCuFunctionNVX vkDestroyCuFunctionNVX = 0; PFN_vkCmdCuLaunchKernelNVX vkCmdCuLaunchKernelNVX = 0; //=== VK_NVX_image_view_handle === PFN_vkGetImageViewHandleNVX vkGetImageViewHandleNVX = 0; PFN_vkGetImageViewHandle64NVX vkGetImageViewHandle64NVX = 0; PFN_vkGetImageViewAddressNVX vkGetImageViewAddressNVX = 0; //=== VK_AMD_draw_indirect_count === PFN_vkCmdDrawIndirectCountAMD vkCmdDrawIndirectCountAMD = 0; PFN_vkCmdDrawIndexedIndirectCountAMD vkCmdDrawIndexedIndirectCountAMD = 0; //=== VK_AMD_shader_info === PFN_vkGetShaderInfoAMD vkGetShaderInfoAMD = 0; //=== VK_KHR_dynamic_rendering === PFN_vkCmdBeginRenderingKHR vkCmdBeginRenderingKHR = 0; PFN_vkCmdEndRenderingKHR vkCmdEndRenderingKHR = 0; # if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_NV_external_memory_win32 === PFN_vkGetMemoryWin32HandleNV vkGetMemoryWin32HandleNV = 0; # else PFN_dummy vkGetMemoryWin32HandleNV_placeholder = 0; # endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_KHR_device_group === PFN_vkGetDeviceGroupPeerMemoryFeaturesKHR vkGetDeviceGroupPeerMemoryFeaturesKHR = 0; PFN_vkCmdSetDeviceMaskKHR vkCmdSetDeviceMaskKHR = 0; PFN_vkCmdDispatchBaseKHR vkCmdDispatchBaseKHR = 0; //=== VK_KHR_maintenance1 === PFN_vkTrimCommandPoolKHR vkTrimCommandPoolKHR = 0; # if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_KHR_external_memory_win32 === PFN_vkGetMemoryWin32HandleKHR vkGetMemoryWin32HandleKHR = 0; PFN_vkGetMemoryWin32HandlePropertiesKHR vkGetMemoryWin32HandlePropertiesKHR = 0; # else PFN_dummy vkGetMemoryWin32HandleKHR_placeholder = 0; PFN_dummy vkGetMemoryWin32HandlePropertiesKHR_placeholder = 0; # endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_KHR_external_memory_fd === PFN_vkGetMemoryFdKHR vkGetMemoryFdKHR = 0; PFN_vkGetMemoryFdPropertiesKHR vkGetMemoryFdPropertiesKHR = 0; # if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_KHR_external_semaphore_win32 === PFN_vkImportSemaphoreWin32HandleKHR vkImportSemaphoreWin32HandleKHR = 0; PFN_vkGetSemaphoreWin32HandleKHR vkGetSemaphoreWin32HandleKHR = 0; # else PFN_dummy vkImportSemaphoreWin32HandleKHR_placeholder = 0; PFN_dummy vkGetSemaphoreWin32HandleKHR_placeholder = 0; # endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_KHR_external_semaphore_fd === PFN_vkImportSemaphoreFdKHR vkImportSemaphoreFdKHR = 0; PFN_vkGetSemaphoreFdKHR vkGetSemaphoreFdKHR = 0; //=== VK_KHR_push_descriptor === PFN_vkCmdPushDescriptorSetKHR vkCmdPushDescriptorSetKHR = 0; PFN_vkCmdPushDescriptorSetWithTemplateKHR vkCmdPushDescriptorSetWithTemplateKHR = 0; //=== VK_EXT_conditional_rendering === PFN_vkCmdBeginConditionalRenderingEXT vkCmdBeginConditionalRenderingEXT = 0; PFN_vkCmdEndConditionalRenderingEXT vkCmdEndConditionalRenderingEXT = 0; //=== VK_KHR_descriptor_update_template === PFN_vkCreateDescriptorUpdateTemplateKHR vkCreateDescriptorUpdateTemplateKHR = 0; PFN_vkDestroyDescriptorUpdateTemplateKHR vkDestroyDescriptorUpdateTemplateKHR = 0; PFN_vkUpdateDescriptorSetWithTemplateKHR vkUpdateDescriptorSetWithTemplateKHR = 0; //=== VK_NV_clip_space_w_scaling === PFN_vkCmdSetViewportWScalingNV vkCmdSetViewportWScalingNV = 0; //=== VK_EXT_display_control === PFN_vkDisplayPowerControlEXT vkDisplayPowerControlEXT = 0; PFN_vkRegisterDeviceEventEXT vkRegisterDeviceEventEXT = 0; PFN_vkRegisterDisplayEventEXT vkRegisterDisplayEventEXT = 0; PFN_vkGetSwapchainCounterEXT vkGetSwapchainCounterEXT = 0; //=== VK_GOOGLE_display_timing === PFN_vkGetRefreshCycleDurationGOOGLE vkGetRefreshCycleDurationGOOGLE = 0; PFN_vkGetPastPresentationTimingGOOGLE vkGetPastPresentationTimingGOOGLE = 0; //=== VK_EXT_discard_rectangles === PFN_vkCmdSetDiscardRectangleEXT vkCmdSetDiscardRectangleEXT = 0; PFN_vkCmdSetDiscardRectangleEnableEXT vkCmdSetDiscardRectangleEnableEXT = 0; PFN_vkCmdSetDiscardRectangleModeEXT vkCmdSetDiscardRectangleModeEXT = 0; //=== VK_EXT_hdr_metadata === PFN_vkSetHdrMetadataEXT vkSetHdrMetadataEXT = 0; //=== VK_KHR_create_renderpass2 === PFN_vkCreateRenderPass2KHR vkCreateRenderPass2KHR = 0; PFN_vkCmdBeginRenderPass2KHR vkCmdBeginRenderPass2KHR = 0; PFN_vkCmdNextSubpass2KHR vkCmdNextSubpass2KHR = 0; PFN_vkCmdEndRenderPass2KHR vkCmdEndRenderPass2KHR = 0; //=== VK_KHR_shared_presentable_image === PFN_vkGetSwapchainStatusKHR vkGetSwapchainStatusKHR = 0; # if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_KHR_external_fence_win32 === PFN_vkImportFenceWin32HandleKHR vkImportFenceWin32HandleKHR = 0; PFN_vkGetFenceWin32HandleKHR vkGetFenceWin32HandleKHR = 0; # else PFN_dummy vkImportFenceWin32HandleKHR_placeholder = 0; PFN_dummy vkGetFenceWin32HandleKHR_placeholder = 0; # endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_KHR_external_fence_fd === PFN_vkImportFenceFdKHR vkImportFenceFdKHR = 0; PFN_vkGetFenceFdKHR vkGetFenceFdKHR = 0; //=== VK_KHR_performance_query === PFN_vkAcquireProfilingLockKHR vkAcquireProfilingLockKHR = 0; PFN_vkReleaseProfilingLockKHR vkReleaseProfilingLockKHR = 0; //=== VK_EXT_debug_utils === PFN_vkSetDebugUtilsObjectNameEXT vkSetDebugUtilsObjectNameEXT = 0; PFN_vkSetDebugUtilsObjectTagEXT vkSetDebugUtilsObjectTagEXT = 0; PFN_vkQueueBeginDebugUtilsLabelEXT vkQueueBeginDebugUtilsLabelEXT = 0; PFN_vkQueueEndDebugUtilsLabelEXT vkQueueEndDebugUtilsLabelEXT = 0; PFN_vkQueueInsertDebugUtilsLabelEXT vkQueueInsertDebugUtilsLabelEXT = 0; PFN_vkCmdBeginDebugUtilsLabelEXT vkCmdBeginDebugUtilsLabelEXT = 0; PFN_vkCmdEndDebugUtilsLabelEXT vkCmdEndDebugUtilsLabelEXT = 0; PFN_vkCmdInsertDebugUtilsLabelEXT vkCmdInsertDebugUtilsLabelEXT = 0; # if defined( VK_USE_PLATFORM_ANDROID_KHR ) //=== VK_ANDROID_external_memory_android_hardware_buffer === PFN_vkGetAndroidHardwareBufferPropertiesANDROID vkGetAndroidHardwareBufferPropertiesANDROID = 0; PFN_vkGetMemoryAndroidHardwareBufferANDROID vkGetMemoryAndroidHardwareBufferANDROID = 0; # else PFN_dummy vkGetAndroidHardwareBufferPropertiesANDROID_placeholder = 0; PFN_dummy vkGetMemoryAndroidHardwareBufferANDROID_placeholder = 0; # endif /*VK_USE_PLATFORM_ANDROID_KHR*/ # if defined( VK_ENABLE_BETA_EXTENSIONS ) //=== VK_AMDX_shader_enqueue === PFN_vkCreateExecutionGraphPipelinesAMDX vkCreateExecutionGraphPipelinesAMDX = 0; PFN_vkGetExecutionGraphPipelineScratchSizeAMDX vkGetExecutionGraphPipelineScratchSizeAMDX = 0; PFN_vkGetExecutionGraphPipelineNodeIndexAMDX vkGetExecutionGraphPipelineNodeIndexAMDX = 0; PFN_vkCmdInitializeGraphScratchMemoryAMDX vkCmdInitializeGraphScratchMemoryAMDX = 0; PFN_vkCmdDispatchGraphAMDX vkCmdDispatchGraphAMDX = 0; PFN_vkCmdDispatchGraphIndirectAMDX vkCmdDispatchGraphIndirectAMDX = 0; PFN_vkCmdDispatchGraphIndirectCountAMDX vkCmdDispatchGraphIndirectCountAMDX = 0; # else PFN_dummy vkCreateExecutionGraphPipelinesAMDX_placeholder = 0; PFN_dummy vkGetExecutionGraphPipelineScratchSizeAMDX_placeholder = 0; PFN_dummy vkGetExecutionGraphPipelineNodeIndexAMDX_placeholder = 0; PFN_dummy vkCmdInitializeGraphScratchMemoryAMDX_placeholder = 0; PFN_dummy vkCmdDispatchGraphAMDX_placeholder = 0; PFN_dummy vkCmdDispatchGraphIndirectAMDX_placeholder = 0; PFN_dummy vkCmdDispatchGraphIndirectCountAMDX_placeholder = 0; # endif /*VK_ENABLE_BETA_EXTENSIONS*/ //=== VK_EXT_sample_locations === PFN_vkCmdSetSampleLocationsEXT vkCmdSetSampleLocationsEXT = 0; //=== VK_KHR_get_memory_requirements2 === PFN_vkGetImageMemoryRequirements2KHR vkGetImageMemoryRequirements2KHR = 0; PFN_vkGetBufferMemoryRequirements2KHR vkGetBufferMemoryRequirements2KHR = 0; PFN_vkGetImageSparseMemoryRequirements2KHR vkGetImageSparseMemoryRequirements2KHR = 0; //=== VK_KHR_acceleration_structure === PFN_vkCreateAccelerationStructureKHR vkCreateAccelerationStructureKHR = 0; PFN_vkDestroyAccelerationStructureKHR vkDestroyAccelerationStructureKHR = 0; PFN_vkCmdBuildAccelerationStructuresKHR vkCmdBuildAccelerationStructuresKHR = 0; PFN_vkCmdBuildAccelerationStructuresIndirectKHR vkCmdBuildAccelerationStructuresIndirectKHR = 0; PFN_vkBuildAccelerationStructuresKHR vkBuildAccelerationStructuresKHR = 0; PFN_vkCopyAccelerationStructureKHR vkCopyAccelerationStructureKHR = 0; PFN_vkCopyAccelerationStructureToMemoryKHR vkCopyAccelerationStructureToMemoryKHR = 0; PFN_vkCopyMemoryToAccelerationStructureKHR vkCopyMemoryToAccelerationStructureKHR = 0; PFN_vkWriteAccelerationStructuresPropertiesKHR vkWriteAccelerationStructuresPropertiesKHR = 0; PFN_vkCmdCopyAccelerationStructureKHR vkCmdCopyAccelerationStructureKHR = 0; PFN_vkCmdCopyAccelerationStructureToMemoryKHR vkCmdCopyAccelerationStructureToMemoryKHR = 0; PFN_vkCmdCopyMemoryToAccelerationStructureKHR vkCmdCopyMemoryToAccelerationStructureKHR = 0; PFN_vkGetAccelerationStructureDeviceAddressKHR vkGetAccelerationStructureDeviceAddressKHR = 0; PFN_vkCmdWriteAccelerationStructuresPropertiesKHR vkCmdWriteAccelerationStructuresPropertiesKHR = 0; PFN_vkGetDeviceAccelerationStructureCompatibilityKHR vkGetDeviceAccelerationStructureCompatibilityKHR = 0; PFN_vkGetAccelerationStructureBuildSizesKHR vkGetAccelerationStructureBuildSizesKHR = 0; //=== VK_KHR_ray_tracing_pipeline === PFN_vkCmdTraceRaysKHR vkCmdTraceRaysKHR = 0; PFN_vkCreateRayTracingPipelinesKHR vkCreateRayTracingPipelinesKHR = 0; PFN_vkGetRayTracingShaderGroupHandlesKHR vkGetRayTracingShaderGroupHandlesKHR = 0; PFN_vkGetRayTracingCaptureReplayShaderGroupHandlesKHR vkGetRayTracingCaptureReplayShaderGroupHandlesKHR = 0; PFN_vkCmdTraceRaysIndirectKHR vkCmdTraceRaysIndirectKHR = 0; PFN_vkGetRayTracingShaderGroupStackSizeKHR vkGetRayTracingShaderGroupStackSizeKHR = 0; PFN_vkCmdSetRayTracingPipelineStackSizeKHR vkCmdSetRayTracingPipelineStackSizeKHR = 0; //=== VK_KHR_sampler_ycbcr_conversion === PFN_vkCreateSamplerYcbcrConversionKHR vkCreateSamplerYcbcrConversionKHR = 0; PFN_vkDestroySamplerYcbcrConversionKHR vkDestroySamplerYcbcrConversionKHR = 0; //=== VK_KHR_bind_memory2 === PFN_vkBindBufferMemory2KHR vkBindBufferMemory2KHR = 0; PFN_vkBindImageMemory2KHR vkBindImageMemory2KHR = 0; //=== VK_EXT_image_drm_format_modifier === PFN_vkGetImageDrmFormatModifierPropertiesEXT vkGetImageDrmFormatModifierPropertiesEXT = 0; //=== VK_EXT_validation_cache === PFN_vkCreateValidationCacheEXT vkCreateValidationCacheEXT = 0; PFN_vkDestroyValidationCacheEXT vkDestroyValidationCacheEXT = 0; PFN_vkMergeValidationCachesEXT vkMergeValidationCachesEXT = 0; PFN_vkGetValidationCacheDataEXT vkGetValidationCacheDataEXT = 0; //=== VK_NV_shading_rate_image === PFN_vkCmdBindShadingRateImageNV vkCmdBindShadingRateImageNV = 0; PFN_vkCmdSetViewportShadingRatePaletteNV vkCmdSetViewportShadingRatePaletteNV = 0; PFN_vkCmdSetCoarseSampleOrderNV vkCmdSetCoarseSampleOrderNV = 0; //=== VK_NV_ray_tracing === PFN_vkCreateAccelerationStructureNV vkCreateAccelerationStructureNV = 0; PFN_vkDestroyAccelerationStructureNV vkDestroyAccelerationStructureNV = 0; PFN_vkGetAccelerationStructureMemoryRequirementsNV vkGetAccelerationStructureMemoryRequirementsNV = 0; PFN_vkBindAccelerationStructureMemoryNV vkBindAccelerationStructureMemoryNV = 0; PFN_vkCmdBuildAccelerationStructureNV vkCmdBuildAccelerationStructureNV = 0; PFN_vkCmdCopyAccelerationStructureNV vkCmdCopyAccelerationStructureNV = 0; PFN_vkCmdTraceRaysNV vkCmdTraceRaysNV = 0; PFN_vkCreateRayTracingPipelinesNV vkCreateRayTracingPipelinesNV = 0; PFN_vkGetRayTracingShaderGroupHandlesNV vkGetRayTracingShaderGroupHandlesNV = 0; PFN_vkGetAccelerationStructureHandleNV vkGetAccelerationStructureHandleNV = 0; PFN_vkCmdWriteAccelerationStructuresPropertiesNV vkCmdWriteAccelerationStructuresPropertiesNV = 0; PFN_vkCompileDeferredNV vkCompileDeferredNV = 0; //=== VK_KHR_maintenance3 === PFN_vkGetDescriptorSetLayoutSupportKHR vkGetDescriptorSetLayoutSupportKHR = 0; //=== VK_KHR_draw_indirect_count === PFN_vkCmdDrawIndirectCountKHR vkCmdDrawIndirectCountKHR = 0; PFN_vkCmdDrawIndexedIndirectCountKHR vkCmdDrawIndexedIndirectCountKHR = 0; //=== VK_EXT_external_memory_host === PFN_vkGetMemoryHostPointerPropertiesEXT vkGetMemoryHostPointerPropertiesEXT = 0; //=== VK_AMD_buffer_marker === PFN_vkCmdWriteBufferMarkerAMD vkCmdWriteBufferMarkerAMD = 0; PFN_vkCmdWriteBufferMarker2AMD vkCmdWriteBufferMarker2AMD = 0; //=== VK_EXT_calibrated_timestamps === PFN_vkGetCalibratedTimestampsEXT vkGetCalibratedTimestampsEXT = 0; //=== VK_NV_mesh_shader === PFN_vkCmdDrawMeshTasksNV vkCmdDrawMeshTasksNV = 0; PFN_vkCmdDrawMeshTasksIndirectNV vkCmdDrawMeshTasksIndirectNV = 0; PFN_vkCmdDrawMeshTasksIndirectCountNV vkCmdDrawMeshTasksIndirectCountNV = 0; //=== VK_NV_scissor_exclusive === PFN_vkCmdSetExclusiveScissorEnableNV vkCmdSetExclusiveScissorEnableNV = 0; PFN_vkCmdSetExclusiveScissorNV vkCmdSetExclusiveScissorNV = 0; //=== VK_NV_device_diagnostic_checkpoints === PFN_vkCmdSetCheckpointNV vkCmdSetCheckpointNV = 0; PFN_vkGetQueueCheckpointDataNV vkGetQueueCheckpointDataNV = 0; PFN_vkGetQueueCheckpointData2NV vkGetQueueCheckpointData2NV = 0; //=== VK_KHR_timeline_semaphore === PFN_vkGetSemaphoreCounterValueKHR vkGetSemaphoreCounterValueKHR = 0; PFN_vkWaitSemaphoresKHR vkWaitSemaphoresKHR = 0; PFN_vkSignalSemaphoreKHR vkSignalSemaphoreKHR = 0; //=== VK_INTEL_performance_query === PFN_vkInitializePerformanceApiINTEL vkInitializePerformanceApiINTEL = 0; PFN_vkUninitializePerformanceApiINTEL vkUninitializePerformanceApiINTEL = 0; PFN_vkCmdSetPerformanceMarkerINTEL vkCmdSetPerformanceMarkerINTEL = 0; PFN_vkCmdSetPerformanceStreamMarkerINTEL vkCmdSetPerformanceStreamMarkerINTEL = 0; PFN_vkCmdSetPerformanceOverrideINTEL vkCmdSetPerformanceOverrideINTEL = 0; PFN_vkAcquirePerformanceConfigurationINTEL vkAcquirePerformanceConfigurationINTEL = 0; PFN_vkReleasePerformanceConfigurationINTEL vkReleasePerformanceConfigurationINTEL = 0; PFN_vkQueueSetPerformanceConfigurationINTEL vkQueueSetPerformanceConfigurationINTEL = 0; PFN_vkGetPerformanceParameterINTEL vkGetPerformanceParameterINTEL = 0; //=== VK_AMD_display_native_hdr === PFN_vkSetLocalDimmingAMD vkSetLocalDimmingAMD = 0; //=== VK_KHR_fragment_shading_rate === PFN_vkCmdSetFragmentShadingRateKHR vkCmdSetFragmentShadingRateKHR = 0; //=== VK_KHR_dynamic_rendering_local_read === PFN_vkCmdSetRenderingAttachmentLocationsKHR vkCmdSetRenderingAttachmentLocationsKHR = 0; PFN_vkCmdSetRenderingInputAttachmentIndicesKHR vkCmdSetRenderingInputAttachmentIndicesKHR = 0; //=== VK_EXT_buffer_device_address === PFN_vkGetBufferDeviceAddressEXT vkGetBufferDeviceAddressEXT = 0; //=== VK_KHR_present_wait === PFN_vkWaitForPresentKHR vkWaitForPresentKHR = 0; # if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_EXT_full_screen_exclusive === PFN_vkAcquireFullScreenExclusiveModeEXT vkAcquireFullScreenExclusiveModeEXT = 0; PFN_vkReleaseFullScreenExclusiveModeEXT vkReleaseFullScreenExclusiveModeEXT = 0; PFN_vkGetDeviceGroupSurfacePresentModes2EXT vkGetDeviceGroupSurfacePresentModes2EXT = 0; # else PFN_dummy vkAcquireFullScreenExclusiveModeEXT_placeholder = 0; PFN_dummy vkReleaseFullScreenExclusiveModeEXT_placeholder = 0; PFN_dummy vkGetDeviceGroupSurfacePresentModes2EXT_placeholder = 0; # endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_KHR_buffer_device_address === PFN_vkGetBufferDeviceAddressKHR vkGetBufferDeviceAddressKHR = 0; PFN_vkGetBufferOpaqueCaptureAddressKHR vkGetBufferOpaqueCaptureAddressKHR = 0; PFN_vkGetDeviceMemoryOpaqueCaptureAddressKHR vkGetDeviceMemoryOpaqueCaptureAddressKHR = 0; //=== VK_EXT_line_rasterization === PFN_vkCmdSetLineStippleEXT vkCmdSetLineStippleEXT = 0; //=== VK_EXT_host_query_reset === PFN_vkResetQueryPoolEXT vkResetQueryPoolEXT = 0; //=== VK_EXT_extended_dynamic_state === PFN_vkCmdSetCullModeEXT vkCmdSetCullModeEXT = 0; PFN_vkCmdSetFrontFaceEXT vkCmdSetFrontFaceEXT = 0; PFN_vkCmdSetPrimitiveTopologyEXT vkCmdSetPrimitiveTopologyEXT = 0; PFN_vkCmdSetViewportWithCountEXT vkCmdSetViewportWithCountEXT = 0; PFN_vkCmdSetScissorWithCountEXT vkCmdSetScissorWithCountEXT = 0; PFN_vkCmdBindVertexBuffers2EXT vkCmdBindVertexBuffers2EXT = 0; PFN_vkCmdSetDepthTestEnableEXT vkCmdSetDepthTestEnableEXT = 0; PFN_vkCmdSetDepthWriteEnableEXT vkCmdSetDepthWriteEnableEXT = 0; PFN_vkCmdSetDepthCompareOpEXT vkCmdSetDepthCompareOpEXT = 0; PFN_vkCmdSetDepthBoundsTestEnableEXT vkCmdSetDepthBoundsTestEnableEXT = 0; PFN_vkCmdSetStencilTestEnableEXT vkCmdSetStencilTestEnableEXT = 0; PFN_vkCmdSetStencilOpEXT vkCmdSetStencilOpEXT = 0; //=== VK_KHR_deferred_host_operations === PFN_vkCreateDeferredOperationKHR vkCreateDeferredOperationKHR = 0; PFN_vkDestroyDeferredOperationKHR vkDestroyDeferredOperationKHR = 0; PFN_vkGetDeferredOperationMaxConcurrencyKHR vkGetDeferredOperationMaxConcurrencyKHR = 0; PFN_vkGetDeferredOperationResultKHR vkGetDeferredOperationResultKHR = 0; PFN_vkDeferredOperationJoinKHR vkDeferredOperationJoinKHR = 0; //=== VK_KHR_pipeline_executable_properties === PFN_vkGetPipelineExecutablePropertiesKHR vkGetPipelineExecutablePropertiesKHR = 0; PFN_vkGetPipelineExecutableStatisticsKHR vkGetPipelineExecutableStatisticsKHR = 0; PFN_vkGetPipelineExecutableInternalRepresentationsKHR vkGetPipelineExecutableInternalRepresentationsKHR = 0; //=== VK_EXT_host_image_copy === PFN_vkCopyMemoryToImageEXT vkCopyMemoryToImageEXT = 0; PFN_vkCopyImageToMemoryEXT vkCopyImageToMemoryEXT = 0; PFN_vkCopyImageToImageEXT vkCopyImageToImageEXT = 0; PFN_vkTransitionImageLayoutEXT vkTransitionImageLayoutEXT = 0; PFN_vkGetImageSubresourceLayout2EXT vkGetImageSubresourceLayout2EXT = 0; //=== VK_KHR_map_memory2 === PFN_vkMapMemory2KHR vkMapMemory2KHR = 0; PFN_vkUnmapMemory2KHR vkUnmapMemory2KHR = 0; //=== VK_EXT_swapchain_maintenance1 === PFN_vkReleaseSwapchainImagesEXT vkReleaseSwapchainImagesEXT = 0; //=== VK_NV_device_generated_commands === PFN_vkGetGeneratedCommandsMemoryRequirementsNV vkGetGeneratedCommandsMemoryRequirementsNV = 0; PFN_vkCmdPreprocessGeneratedCommandsNV vkCmdPreprocessGeneratedCommandsNV = 0; PFN_vkCmdExecuteGeneratedCommandsNV vkCmdExecuteGeneratedCommandsNV = 0; PFN_vkCmdBindPipelineShaderGroupNV vkCmdBindPipelineShaderGroupNV = 0; PFN_vkCreateIndirectCommandsLayoutNV vkCreateIndirectCommandsLayoutNV = 0; PFN_vkDestroyIndirectCommandsLayoutNV vkDestroyIndirectCommandsLayoutNV = 0; //=== VK_EXT_depth_bias_control === PFN_vkCmdSetDepthBias2EXT vkCmdSetDepthBias2EXT = 0; //=== VK_EXT_private_data === PFN_vkCreatePrivateDataSlotEXT vkCreatePrivateDataSlotEXT = 0; PFN_vkDestroyPrivateDataSlotEXT vkDestroyPrivateDataSlotEXT = 0; PFN_vkSetPrivateDataEXT vkSetPrivateDataEXT = 0; PFN_vkGetPrivateDataEXT vkGetPrivateDataEXT = 0; //=== VK_KHR_video_encode_queue === PFN_vkGetEncodedVideoSessionParametersKHR vkGetEncodedVideoSessionParametersKHR = 0; PFN_vkCmdEncodeVideoKHR vkCmdEncodeVideoKHR = 0; # if defined( VK_ENABLE_BETA_EXTENSIONS ) //=== VK_NV_cuda_kernel_launch === PFN_vkCreateCudaModuleNV vkCreateCudaModuleNV = 0; PFN_vkGetCudaModuleCacheNV vkGetCudaModuleCacheNV = 0; PFN_vkCreateCudaFunctionNV vkCreateCudaFunctionNV = 0; PFN_vkDestroyCudaModuleNV vkDestroyCudaModuleNV = 0; PFN_vkDestroyCudaFunctionNV vkDestroyCudaFunctionNV = 0; PFN_vkCmdCudaLaunchKernelNV vkCmdCudaLaunchKernelNV = 0; # else PFN_dummy vkCreateCudaModuleNV_placeholder = 0; PFN_dummy vkGetCudaModuleCacheNV_placeholder = 0; PFN_dummy vkCreateCudaFunctionNV_placeholder = 0; PFN_dummy vkDestroyCudaModuleNV_placeholder = 0; PFN_dummy vkDestroyCudaFunctionNV_placeholder = 0; PFN_dummy vkCmdCudaLaunchKernelNV_placeholder = 0; # endif /*VK_ENABLE_BETA_EXTENSIONS*/ # if defined( VK_USE_PLATFORM_METAL_EXT ) //=== VK_EXT_metal_objects === PFN_vkExportMetalObjectsEXT vkExportMetalObjectsEXT = 0; # else PFN_dummy vkExportMetalObjectsEXT_placeholder = 0; # endif /*VK_USE_PLATFORM_METAL_EXT*/ //=== VK_KHR_synchronization2 === PFN_vkCmdSetEvent2KHR vkCmdSetEvent2KHR = 0; PFN_vkCmdResetEvent2KHR vkCmdResetEvent2KHR = 0; PFN_vkCmdWaitEvents2KHR vkCmdWaitEvents2KHR = 0; PFN_vkCmdPipelineBarrier2KHR vkCmdPipelineBarrier2KHR = 0; PFN_vkCmdWriteTimestamp2KHR vkCmdWriteTimestamp2KHR = 0; PFN_vkQueueSubmit2KHR vkQueueSubmit2KHR = 0; //=== VK_EXT_descriptor_buffer === PFN_vkGetDescriptorSetLayoutSizeEXT vkGetDescriptorSetLayoutSizeEXT = 0; PFN_vkGetDescriptorSetLayoutBindingOffsetEXT vkGetDescriptorSetLayoutBindingOffsetEXT = 0; PFN_vkGetDescriptorEXT vkGetDescriptorEXT = 0; PFN_vkCmdBindDescriptorBuffersEXT vkCmdBindDescriptorBuffersEXT = 0; PFN_vkCmdSetDescriptorBufferOffsetsEXT vkCmdSetDescriptorBufferOffsetsEXT = 0; PFN_vkCmdBindDescriptorBufferEmbeddedSamplersEXT vkCmdBindDescriptorBufferEmbeddedSamplersEXT = 0; PFN_vkGetBufferOpaqueCaptureDescriptorDataEXT vkGetBufferOpaqueCaptureDescriptorDataEXT = 0; PFN_vkGetImageOpaqueCaptureDescriptorDataEXT vkGetImageOpaqueCaptureDescriptorDataEXT = 0; PFN_vkGetImageViewOpaqueCaptureDescriptorDataEXT vkGetImageViewOpaqueCaptureDescriptorDataEXT = 0; PFN_vkGetSamplerOpaqueCaptureDescriptorDataEXT vkGetSamplerOpaqueCaptureDescriptorDataEXT = 0; PFN_vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT = 0; //=== VK_NV_fragment_shading_rate_enums === PFN_vkCmdSetFragmentShadingRateEnumNV vkCmdSetFragmentShadingRateEnumNV = 0; //=== VK_EXT_mesh_shader === PFN_vkCmdDrawMeshTasksEXT vkCmdDrawMeshTasksEXT = 0; PFN_vkCmdDrawMeshTasksIndirectEXT vkCmdDrawMeshTasksIndirectEXT = 0; PFN_vkCmdDrawMeshTasksIndirectCountEXT vkCmdDrawMeshTasksIndirectCountEXT = 0; //=== VK_KHR_copy_commands2 === PFN_vkCmdCopyBuffer2KHR vkCmdCopyBuffer2KHR = 0; PFN_vkCmdCopyImage2KHR vkCmdCopyImage2KHR = 0; PFN_vkCmdCopyBufferToImage2KHR vkCmdCopyBufferToImage2KHR = 0; PFN_vkCmdCopyImageToBuffer2KHR vkCmdCopyImageToBuffer2KHR = 0; PFN_vkCmdBlitImage2KHR vkCmdBlitImage2KHR = 0; PFN_vkCmdResolveImage2KHR vkCmdResolveImage2KHR = 0; //=== VK_EXT_device_fault === PFN_vkGetDeviceFaultInfoEXT vkGetDeviceFaultInfoEXT = 0; //=== VK_EXT_vertex_input_dynamic_state === PFN_vkCmdSetVertexInputEXT vkCmdSetVertexInputEXT = 0; # if defined( VK_USE_PLATFORM_FUCHSIA ) //=== VK_FUCHSIA_external_memory === PFN_vkGetMemoryZirconHandleFUCHSIA vkGetMemoryZirconHandleFUCHSIA = 0; PFN_vkGetMemoryZirconHandlePropertiesFUCHSIA vkGetMemoryZirconHandlePropertiesFUCHSIA = 0; # else PFN_dummy vkGetMemoryZirconHandleFUCHSIA_placeholder = 0; PFN_dummy vkGetMemoryZirconHandlePropertiesFUCHSIA_placeholder = 0; # endif /*VK_USE_PLATFORM_FUCHSIA*/ # if defined( VK_USE_PLATFORM_FUCHSIA ) //=== VK_FUCHSIA_external_semaphore === PFN_vkImportSemaphoreZirconHandleFUCHSIA vkImportSemaphoreZirconHandleFUCHSIA = 0; PFN_vkGetSemaphoreZirconHandleFUCHSIA vkGetSemaphoreZirconHandleFUCHSIA = 0; # else PFN_dummy vkImportSemaphoreZirconHandleFUCHSIA_placeholder = 0; PFN_dummy vkGetSemaphoreZirconHandleFUCHSIA_placeholder = 0; # endif /*VK_USE_PLATFORM_FUCHSIA*/ # if defined( VK_USE_PLATFORM_FUCHSIA ) //=== VK_FUCHSIA_buffer_collection === PFN_vkCreateBufferCollectionFUCHSIA vkCreateBufferCollectionFUCHSIA = 0; PFN_vkSetBufferCollectionImageConstraintsFUCHSIA vkSetBufferCollectionImageConstraintsFUCHSIA = 0; PFN_vkSetBufferCollectionBufferConstraintsFUCHSIA vkSetBufferCollectionBufferConstraintsFUCHSIA = 0; PFN_vkDestroyBufferCollectionFUCHSIA vkDestroyBufferCollectionFUCHSIA = 0; PFN_vkGetBufferCollectionPropertiesFUCHSIA vkGetBufferCollectionPropertiesFUCHSIA = 0; # else PFN_dummy vkCreateBufferCollectionFUCHSIA_placeholder = 0; PFN_dummy vkSetBufferCollectionImageConstraintsFUCHSIA_placeholder = 0; PFN_dummy vkSetBufferCollectionBufferConstraintsFUCHSIA_placeholder = 0; PFN_dummy vkDestroyBufferCollectionFUCHSIA_placeholder = 0; PFN_dummy vkGetBufferCollectionPropertiesFUCHSIA_placeholder = 0; # endif /*VK_USE_PLATFORM_FUCHSIA*/ //=== VK_HUAWEI_subpass_shading === PFN_vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI = 0; PFN_vkCmdSubpassShadingHUAWEI vkCmdSubpassShadingHUAWEI = 0; //=== VK_HUAWEI_invocation_mask === PFN_vkCmdBindInvocationMaskHUAWEI vkCmdBindInvocationMaskHUAWEI = 0; //=== VK_NV_external_memory_rdma === PFN_vkGetMemoryRemoteAddressNV vkGetMemoryRemoteAddressNV = 0; //=== VK_EXT_pipeline_properties === PFN_vkGetPipelinePropertiesEXT vkGetPipelinePropertiesEXT = 0; //=== VK_EXT_extended_dynamic_state2 === PFN_vkCmdSetPatchControlPointsEXT vkCmdSetPatchControlPointsEXT = 0; PFN_vkCmdSetRasterizerDiscardEnableEXT vkCmdSetRasterizerDiscardEnableEXT = 0; PFN_vkCmdSetDepthBiasEnableEXT vkCmdSetDepthBiasEnableEXT = 0; PFN_vkCmdSetLogicOpEXT vkCmdSetLogicOpEXT = 0; PFN_vkCmdSetPrimitiveRestartEnableEXT vkCmdSetPrimitiveRestartEnableEXT = 0; //=== VK_EXT_color_write_enable === PFN_vkCmdSetColorWriteEnableEXT vkCmdSetColorWriteEnableEXT = 0; //=== VK_KHR_ray_tracing_maintenance1 === PFN_vkCmdTraceRaysIndirect2KHR vkCmdTraceRaysIndirect2KHR = 0; //=== VK_EXT_multi_draw === PFN_vkCmdDrawMultiEXT vkCmdDrawMultiEXT = 0; PFN_vkCmdDrawMultiIndexedEXT vkCmdDrawMultiIndexedEXT = 0; //=== VK_EXT_opacity_micromap === PFN_vkCreateMicromapEXT vkCreateMicromapEXT = 0; PFN_vkDestroyMicromapEXT vkDestroyMicromapEXT = 0; PFN_vkCmdBuildMicromapsEXT vkCmdBuildMicromapsEXT = 0; PFN_vkBuildMicromapsEXT vkBuildMicromapsEXT = 0; PFN_vkCopyMicromapEXT vkCopyMicromapEXT = 0; PFN_vkCopyMicromapToMemoryEXT vkCopyMicromapToMemoryEXT = 0; PFN_vkCopyMemoryToMicromapEXT vkCopyMemoryToMicromapEXT = 0; PFN_vkWriteMicromapsPropertiesEXT vkWriteMicromapsPropertiesEXT = 0; PFN_vkCmdCopyMicromapEXT vkCmdCopyMicromapEXT = 0; PFN_vkCmdCopyMicromapToMemoryEXT vkCmdCopyMicromapToMemoryEXT = 0; PFN_vkCmdCopyMemoryToMicromapEXT vkCmdCopyMemoryToMicromapEXT = 0; PFN_vkCmdWriteMicromapsPropertiesEXT vkCmdWriteMicromapsPropertiesEXT = 0; PFN_vkGetDeviceMicromapCompatibilityEXT vkGetDeviceMicromapCompatibilityEXT = 0; PFN_vkGetMicromapBuildSizesEXT vkGetMicromapBuildSizesEXT = 0; //=== VK_HUAWEI_cluster_culling_shader === PFN_vkCmdDrawClusterHUAWEI vkCmdDrawClusterHUAWEI = 0; PFN_vkCmdDrawClusterIndirectHUAWEI vkCmdDrawClusterIndirectHUAWEI = 0; //=== VK_EXT_pageable_device_local_memory === PFN_vkSetDeviceMemoryPriorityEXT vkSetDeviceMemoryPriorityEXT = 0; //=== VK_KHR_maintenance4 === PFN_vkGetDeviceBufferMemoryRequirementsKHR vkGetDeviceBufferMemoryRequirementsKHR = 0; PFN_vkGetDeviceImageMemoryRequirementsKHR vkGetDeviceImageMemoryRequirementsKHR = 0; PFN_vkGetDeviceImageSparseMemoryRequirementsKHR vkGetDeviceImageSparseMemoryRequirementsKHR = 0; //=== VK_VALVE_descriptor_set_host_mapping === PFN_vkGetDescriptorSetLayoutHostMappingInfoVALVE vkGetDescriptorSetLayoutHostMappingInfoVALVE = 0; PFN_vkGetDescriptorSetHostMappingVALVE vkGetDescriptorSetHostMappingVALVE = 0; //=== VK_NV_copy_memory_indirect === PFN_vkCmdCopyMemoryIndirectNV vkCmdCopyMemoryIndirectNV = 0; PFN_vkCmdCopyMemoryToImageIndirectNV vkCmdCopyMemoryToImageIndirectNV = 0; //=== VK_NV_memory_decompression === PFN_vkCmdDecompressMemoryNV vkCmdDecompressMemoryNV = 0; PFN_vkCmdDecompressMemoryIndirectCountNV vkCmdDecompressMemoryIndirectCountNV = 0; //=== VK_NV_device_generated_commands_compute === PFN_vkGetPipelineIndirectMemoryRequirementsNV vkGetPipelineIndirectMemoryRequirementsNV = 0; PFN_vkCmdUpdatePipelineIndirectBufferNV vkCmdUpdatePipelineIndirectBufferNV = 0; PFN_vkGetPipelineIndirectDeviceAddressNV vkGetPipelineIndirectDeviceAddressNV = 0; //=== VK_EXT_extended_dynamic_state3 === PFN_vkCmdSetDepthClampEnableEXT vkCmdSetDepthClampEnableEXT = 0; PFN_vkCmdSetPolygonModeEXT vkCmdSetPolygonModeEXT = 0; PFN_vkCmdSetRasterizationSamplesEXT vkCmdSetRasterizationSamplesEXT = 0; PFN_vkCmdSetSampleMaskEXT vkCmdSetSampleMaskEXT = 0; PFN_vkCmdSetAlphaToCoverageEnableEXT vkCmdSetAlphaToCoverageEnableEXT = 0; PFN_vkCmdSetAlphaToOneEnableEXT vkCmdSetAlphaToOneEnableEXT = 0; PFN_vkCmdSetLogicOpEnableEXT vkCmdSetLogicOpEnableEXT = 0; PFN_vkCmdSetColorBlendEnableEXT vkCmdSetColorBlendEnableEXT = 0; PFN_vkCmdSetColorBlendEquationEXT vkCmdSetColorBlendEquationEXT = 0; PFN_vkCmdSetColorWriteMaskEXT vkCmdSetColorWriteMaskEXT = 0; PFN_vkCmdSetTessellationDomainOriginEXT vkCmdSetTessellationDomainOriginEXT = 0; PFN_vkCmdSetRasterizationStreamEXT vkCmdSetRasterizationStreamEXT = 0; PFN_vkCmdSetConservativeRasterizationModeEXT vkCmdSetConservativeRasterizationModeEXT = 0; PFN_vkCmdSetExtraPrimitiveOverestimationSizeEXT vkCmdSetExtraPrimitiveOverestimationSizeEXT = 0; PFN_vkCmdSetDepthClipEnableEXT vkCmdSetDepthClipEnableEXT = 0; PFN_vkCmdSetSampleLocationsEnableEXT vkCmdSetSampleLocationsEnableEXT = 0; PFN_vkCmdSetColorBlendAdvancedEXT vkCmdSetColorBlendAdvancedEXT = 0; PFN_vkCmdSetProvokingVertexModeEXT vkCmdSetProvokingVertexModeEXT = 0; PFN_vkCmdSetLineRasterizationModeEXT vkCmdSetLineRasterizationModeEXT = 0; PFN_vkCmdSetLineStippleEnableEXT vkCmdSetLineStippleEnableEXT = 0; PFN_vkCmdSetDepthClipNegativeOneToOneEXT vkCmdSetDepthClipNegativeOneToOneEXT = 0; PFN_vkCmdSetViewportWScalingEnableNV vkCmdSetViewportWScalingEnableNV = 0; PFN_vkCmdSetViewportSwizzleNV vkCmdSetViewportSwizzleNV = 0; PFN_vkCmdSetCoverageToColorEnableNV vkCmdSetCoverageToColorEnableNV = 0; PFN_vkCmdSetCoverageToColorLocationNV vkCmdSetCoverageToColorLocationNV = 0; PFN_vkCmdSetCoverageModulationModeNV vkCmdSetCoverageModulationModeNV = 0; PFN_vkCmdSetCoverageModulationTableEnableNV vkCmdSetCoverageModulationTableEnableNV = 0; PFN_vkCmdSetCoverageModulationTableNV vkCmdSetCoverageModulationTableNV = 0; PFN_vkCmdSetShadingRateImageEnableNV vkCmdSetShadingRateImageEnableNV = 0; PFN_vkCmdSetRepresentativeFragmentTestEnableNV vkCmdSetRepresentativeFragmentTestEnableNV = 0; PFN_vkCmdSetCoverageReductionModeNV vkCmdSetCoverageReductionModeNV = 0; //=== VK_EXT_shader_module_identifier === PFN_vkGetShaderModuleIdentifierEXT vkGetShaderModuleIdentifierEXT = 0; PFN_vkGetShaderModuleCreateInfoIdentifierEXT vkGetShaderModuleCreateInfoIdentifierEXT = 0; //=== VK_NV_optical_flow === PFN_vkCreateOpticalFlowSessionNV vkCreateOpticalFlowSessionNV = 0; PFN_vkDestroyOpticalFlowSessionNV vkDestroyOpticalFlowSessionNV = 0; PFN_vkBindOpticalFlowSessionImageNV vkBindOpticalFlowSessionImageNV = 0; PFN_vkCmdOpticalFlowExecuteNV vkCmdOpticalFlowExecuteNV = 0; //=== VK_KHR_maintenance5 === PFN_vkCmdBindIndexBuffer2KHR vkCmdBindIndexBuffer2KHR = 0; PFN_vkGetRenderingAreaGranularityKHR vkGetRenderingAreaGranularityKHR = 0; PFN_vkGetDeviceImageSubresourceLayoutKHR vkGetDeviceImageSubresourceLayoutKHR = 0; PFN_vkGetImageSubresourceLayout2KHR vkGetImageSubresourceLayout2KHR = 0; //=== VK_AMD_anti_lag === PFN_vkAntiLagUpdateAMD vkAntiLagUpdateAMD = 0; //=== VK_EXT_shader_object === PFN_vkCreateShadersEXT vkCreateShadersEXT = 0; PFN_vkDestroyShaderEXT vkDestroyShaderEXT = 0; PFN_vkGetShaderBinaryDataEXT vkGetShaderBinaryDataEXT = 0; PFN_vkCmdBindShadersEXT vkCmdBindShadersEXT = 0; PFN_vkCmdSetDepthClampRangeEXT vkCmdSetDepthClampRangeEXT = 0; //=== VK_KHR_pipeline_binary === PFN_vkCreatePipelineBinariesKHR vkCreatePipelineBinariesKHR = 0; PFN_vkDestroyPipelineBinaryKHR vkDestroyPipelineBinaryKHR = 0; PFN_vkGetPipelineKeyKHR vkGetPipelineKeyKHR = 0; PFN_vkGetPipelineBinaryDataKHR vkGetPipelineBinaryDataKHR = 0; PFN_vkReleaseCapturedPipelineDataKHR vkReleaseCapturedPipelineDataKHR = 0; //=== VK_QCOM_tile_properties === PFN_vkGetFramebufferTilePropertiesQCOM vkGetFramebufferTilePropertiesQCOM = 0; PFN_vkGetDynamicRenderingTilePropertiesQCOM vkGetDynamicRenderingTilePropertiesQCOM = 0; //=== VK_NV_cooperative_vector === PFN_vkConvertCooperativeVectorMatrixNV vkConvertCooperativeVectorMatrixNV = 0; PFN_vkCmdConvertCooperativeVectorMatrixNV vkCmdConvertCooperativeVectorMatrixNV = 0; //=== VK_NV_low_latency2 === PFN_vkSetLatencySleepModeNV vkSetLatencySleepModeNV = 0; PFN_vkLatencySleepNV vkLatencySleepNV = 0; PFN_vkSetLatencyMarkerNV vkSetLatencyMarkerNV = 0; PFN_vkGetLatencyTimingsNV vkGetLatencyTimingsNV = 0; PFN_vkQueueNotifyOutOfBandNV vkQueueNotifyOutOfBandNV = 0; //=== VK_EXT_attachment_feedback_loop_dynamic_state === PFN_vkCmdSetAttachmentFeedbackLoopEnableEXT vkCmdSetAttachmentFeedbackLoopEnableEXT = 0; # if defined( VK_USE_PLATFORM_SCREEN_QNX ) //=== VK_QNX_external_memory_screen_buffer === PFN_vkGetScreenBufferPropertiesQNX vkGetScreenBufferPropertiesQNX = 0; # else PFN_dummy vkGetScreenBufferPropertiesQNX_placeholder = 0; # endif /*VK_USE_PLATFORM_SCREEN_QNX*/ //=== VK_KHR_line_rasterization === PFN_vkCmdSetLineStippleKHR vkCmdSetLineStippleKHR = 0; //=== VK_KHR_calibrated_timestamps === PFN_vkGetCalibratedTimestampsKHR vkGetCalibratedTimestampsKHR = 0; //=== VK_KHR_maintenance6 === PFN_vkCmdBindDescriptorSets2KHR vkCmdBindDescriptorSets2KHR = 0; PFN_vkCmdPushConstants2KHR vkCmdPushConstants2KHR = 0; PFN_vkCmdPushDescriptorSet2KHR vkCmdPushDescriptorSet2KHR = 0; PFN_vkCmdPushDescriptorSetWithTemplate2KHR vkCmdPushDescriptorSetWithTemplate2KHR = 0; PFN_vkCmdSetDescriptorBufferOffsets2EXT vkCmdSetDescriptorBufferOffsets2EXT = 0; PFN_vkCmdBindDescriptorBufferEmbeddedSamplers2EXT vkCmdBindDescriptorBufferEmbeddedSamplers2EXT = 0; //=== VK_NV_cluster_acceleration_structure === PFN_vkGetClusterAccelerationStructureBuildSizesNV vkGetClusterAccelerationStructureBuildSizesNV = 0; PFN_vkCmdBuildClusterAccelerationStructureIndirectNV vkCmdBuildClusterAccelerationStructureIndirectNV = 0; //=== VK_NV_partitioned_acceleration_structure === PFN_vkGetPartitionedAccelerationStructuresBuildSizesNV vkGetPartitionedAccelerationStructuresBuildSizesNV = 0; PFN_vkCmdBuildPartitionedAccelerationStructuresNV vkCmdBuildPartitionedAccelerationStructuresNV = 0; //=== VK_EXT_device_generated_commands === PFN_vkGetGeneratedCommandsMemoryRequirementsEXT vkGetGeneratedCommandsMemoryRequirementsEXT = 0; PFN_vkCmdPreprocessGeneratedCommandsEXT vkCmdPreprocessGeneratedCommandsEXT = 0; PFN_vkCmdExecuteGeneratedCommandsEXT vkCmdExecuteGeneratedCommandsEXT = 0; PFN_vkCreateIndirectCommandsLayoutEXT vkCreateIndirectCommandsLayoutEXT = 0; PFN_vkDestroyIndirectCommandsLayoutEXT vkDestroyIndirectCommandsLayoutEXT = 0; PFN_vkCreateIndirectExecutionSetEXT vkCreateIndirectExecutionSetEXT = 0; PFN_vkDestroyIndirectExecutionSetEXT vkDestroyIndirectExecutionSetEXT = 0; PFN_vkUpdateIndirectExecutionSetPipelineEXT vkUpdateIndirectExecutionSetPipelineEXT = 0; PFN_vkUpdateIndirectExecutionSetShaderEXT vkUpdateIndirectExecutionSetShaderEXT = 0; # if defined( VK_USE_PLATFORM_METAL_EXT ) //=== VK_EXT_external_memory_metal === PFN_vkGetMemoryMetalHandleEXT vkGetMemoryMetalHandleEXT = 0; PFN_vkGetMemoryMetalHandlePropertiesEXT vkGetMemoryMetalHandlePropertiesEXT = 0; # else PFN_dummy vkGetMemoryMetalHandleEXT_placeholder = 0; PFN_dummy vkGetMemoryMetalHandlePropertiesEXT_placeholder = 0; # endif /*VK_USE_PLATFORM_METAL_EXT*/ }; } // namespace detail //======================================== //=== RAII HANDLE forward declarations === //======================================== //=== VK_VERSION_1_0 === class Instance; class PhysicalDevice; class Device; class Queue; class DeviceMemory; class Fence; class Semaphore; class Event; class QueryPool; class Buffer; class BufferView; class Image; class ImageView; class ShaderModule; class PipelineCache; class Pipeline; class PipelineLayout; class Sampler; class DescriptorPool; class DescriptorSet; class DescriptorSetLayout; class Framebuffer; class RenderPass; class CommandPool; class CommandBuffer; //=== VK_VERSION_1_1 === class SamplerYcbcrConversion; class DescriptorUpdateTemplate; //=== VK_VERSION_1_3 === class PrivateDataSlot; //=== VK_KHR_surface === class SurfaceKHR; //=== VK_KHR_swapchain === class SwapchainKHR; //=== VK_KHR_display === class DisplayKHR; class DisplayModeKHR; //=== VK_EXT_debug_report === class DebugReportCallbackEXT; //=== VK_KHR_video_queue === class VideoSessionKHR; class VideoSessionParametersKHR; //=== VK_NVX_binary_import === class CuModuleNVX; class CuFunctionNVX; //=== VK_EXT_debug_utils === class DebugUtilsMessengerEXT; //=== VK_KHR_acceleration_structure === class AccelerationStructureKHR; //=== VK_EXT_validation_cache === class ValidationCacheEXT; //=== VK_NV_ray_tracing === class AccelerationStructureNV; //=== VK_INTEL_performance_query === class PerformanceConfigurationINTEL; //=== VK_KHR_deferred_host_operations === class DeferredOperationKHR; //=== VK_NV_device_generated_commands === class IndirectCommandsLayoutNV; # if defined( VK_ENABLE_BETA_EXTENSIONS ) //=== VK_NV_cuda_kernel_launch === class CudaModuleNV; class CudaFunctionNV; # endif /*VK_ENABLE_BETA_EXTENSIONS*/ # if defined( VK_USE_PLATFORM_FUCHSIA ) //=== VK_FUCHSIA_buffer_collection === class BufferCollectionFUCHSIA; # endif /*VK_USE_PLATFORM_FUCHSIA*/ //=== VK_EXT_opacity_micromap === class MicromapEXT; //=== VK_NV_optical_flow === class OpticalFlowSessionNV; //=== VK_EXT_shader_object === class ShaderEXT; //=== VK_KHR_pipeline_binary === class PipelineBinaryKHR; //=== VK_EXT_device_generated_commands === class IndirectCommandsLayoutEXT; class IndirectExecutionSetEXT; //==================== //=== RAII HANDLES === //==================== template struct isVulkanRAIIHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = false; }; class Context { public: # if VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL Context() : m_dispatcher( new VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::ContextDispatcher( m_dynamicLoader.getProcAddress( "vkGetInstanceProcAddr" ) ) ) # else Context( PFN_vkGetInstanceProcAddr getInstanceProcAddr ) : m_dispatcher( new VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::ContextDispatcher( getInstanceProcAddr ) ) # endif { } ~Context() = default; Context( Context const & ) = delete; Context( Context && rhs ) VULKAN_HPP_NOEXCEPT # if VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL : m_dynamicLoader( std::move( rhs.m_dynamicLoader ) ) , m_dispatcher( rhs.m_dispatcher.release() ) # else : m_dispatcher( rhs.m_dispatcher.release() ) # endif { } Context & operator=( Context const & ) = delete; Context & operator=( Context && rhs ) VULKAN_HPP_NOEXCEPT { if ( this != &rhs ) { # if VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL m_dynamicLoader = std::move( rhs.m_dynamicLoader ); # endif m_dispatcher.reset( rhs.m_dispatcher.release() ); } return *this; } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::ContextDispatcher const * getDispatcher() const { VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); return &*m_dispatcher; } void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Context & rhs ) { # if VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL std::swap( m_dynamicLoader, rhs.m_dynamicLoader ); # endif m_dispatcher.swap( rhs.m_dispatcher ); } //=== VK_VERSION_1_0 === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type createInstance( VULKAN_HPP_NAMESPACE::InstanceCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT; VULKAN_HPP_NODISCARD std::vector enumerateInstanceExtensionProperties( Optional layerName VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT ) const; VULKAN_HPP_NODISCARD std::vector enumerateInstanceLayerProperties() const; //=== VK_VERSION_1_1 === VULKAN_HPP_NODISCARD uint32_t enumerateInstanceVersion() const; private: # if VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL VULKAN_HPP_NAMESPACE::detail::DynamicLoader m_dynamicLoader; # endif std::unique_ptr m_dispatcher; }; class Instance { public: using CType = VkInstance; using CppType = VULKAN_HPP_NAMESPACE::Instance; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eInstance; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eInstance; public: # if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) Instance( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Context const & context, VULKAN_HPP_NAMESPACE::InstanceCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) { *this = context.createInstance( createInfo, allocator ); } # endif Instance( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Context const & context, VkInstance instance, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) : m_instance( instance ), m_allocator( static_cast( allocator ) ) { m_dispatcher.reset( new VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::InstanceDispatcher( context.getDispatcher()->vkGetInstanceProcAddr, static_cast( m_instance ) ) ); } Instance( std::nullptr_t ) {} ~Instance() { clear(); } Instance() = delete; Instance( Instance const & ) = delete; Instance( Instance && rhs ) VULKAN_HPP_NOEXCEPT : m_instance( VULKAN_HPP_NAMESPACE::exchange( rhs.m_instance, {} ) ) , m_allocator( VULKAN_HPP_NAMESPACE::exchange( rhs.m_allocator, {} ) ) , m_dispatcher( rhs.m_dispatcher.release() ) { } Instance & operator=( Instance const & ) = delete; Instance & operator=( Instance && rhs ) VULKAN_HPP_NOEXCEPT { if ( this != &rhs ) { std::swap( m_instance, rhs.m_instance ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_dispatcher, rhs.m_dispatcher ); } return *this; } VULKAN_HPP_NAMESPACE::Instance const & operator*() const VULKAN_HPP_NOEXCEPT { return m_instance; } operator VULKAN_HPP_NAMESPACE::Instance() const VULKAN_HPP_NOEXCEPT { return m_instance; } void clear() VULKAN_HPP_NOEXCEPT { if ( m_instance ) { getDispatcher()->vkDestroyInstance( static_cast( m_instance ), reinterpret_cast( m_allocator ) ); } m_instance = nullptr; m_allocator = nullptr; m_dispatcher = nullptr; } VULKAN_HPP_NAMESPACE::Instance release() { m_allocator = nullptr; m_dispatcher = nullptr; return VULKAN_HPP_NAMESPACE::exchange( m_instance, nullptr ); } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::InstanceDispatcher const * getDispatcher() const { VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); return &*m_dispatcher; } void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance & rhs ) VULKAN_HPP_NOEXCEPT { std::swap( m_instance, rhs.m_instance ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_dispatcher, rhs.m_dispatcher ); } //=== VK_VERSION_1_0 === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType< std::vector>::Type enumeratePhysicalDevices() const; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::PFN_VoidFunction getProcAddr( const std::string & name ) const VULKAN_HPP_NOEXCEPT; //=== VK_VERSION_1_1 === VULKAN_HPP_NODISCARD std::vector enumeratePhysicalDeviceGroups() const; //=== VK_KHR_display === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type createDisplayPlaneSurfaceKHR( VULKAN_HPP_NAMESPACE::DisplaySurfaceCreateInfoKHR const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT; # if defined( VK_USE_PLATFORM_XLIB_KHR ) //=== VK_KHR_xlib_surface === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type createXlibSurfaceKHR( VULKAN_HPP_NAMESPACE::XlibSurfaceCreateInfoKHR const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT; # endif /*VK_USE_PLATFORM_XLIB_KHR*/ # if defined( VK_USE_PLATFORM_XCB_KHR ) //=== VK_KHR_xcb_surface === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type createXcbSurfaceKHR( VULKAN_HPP_NAMESPACE::XcbSurfaceCreateInfoKHR const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT; # endif /*VK_USE_PLATFORM_XCB_KHR*/ # if defined( VK_USE_PLATFORM_WAYLAND_KHR ) //=== VK_KHR_wayland_surface === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type createWaylandSurfaceKHR( VULKAN_HPP_NAMESPACE::WaylandSurfaceCreateInfoKHR const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT; # endif /*VK_USE_PLATFORM_WAYLAND_KHR*/ # if defined( VK_USE_PLATFORM_ANDROID_KHR ) //=== VK_KHR_android_surface === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type createAndroidSurfaceKHR( VULKAN_HPP_NAMESPACE::AndroidSurfaceCreateInfoKHR const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT; # endif /*VK_USE_PLATFORM_ANDROID_KHR*/ # if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_KHR_win32_surface === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type createWin32SurfaceKHR( VULKAN_HPP_NAMESPACE::Win32SurfaceCreateInfoKHR const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT; # endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_EXT_debug_report === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type createDebugReportCallbackEXT( VULKAN_HPP_NAMESPACE::DebugReportCallbackCreateInfoEXT const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT; void debugReportMessageEXT( VULKAN_HPP_NAMESPACE::DebugReportFlagsEXT flags, VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT objectType, uint64_t object, size_t location, int32_t messageCode, const std::string & layerPrefix, const std::string & message ) const VULKAN_HPP_NOEXCEPT; # if defined( VK_USE_PLATFORM_GGP ) //=== VK_GGP_stream_descriptor_surface === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type createStreamDescriptorSurfaceGGP( VULKAN_HPP_NAMESPACE::StreamDescriptorSurfaceCreateInfoGGP const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT; # endif /*VK_USE_PLATFORM_GGP*/ # if defined( VK_USE_PLATFORM_VI_NN ) //=== VK_NN_vi_surface === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type createViSurfaceNN( VULKAN_HPP_NAMESPACE::ViSurfaceCreateInfoNN const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT; # endif /*VK_USE_PLATFORM_VI_NN*/ //=== VK_KHR_device_group_creation === VULKAN_HPP_NODISCARD std::vector enumeratePhysicalDeviceGroupsKHR() const; # if defined( VK_USE_PLATFORM_IOS_MVK ) //=== VK_MVK_ios_surface === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type createIOSSurfaceMVK( VULKAN_HPP_NAMESPACE::IOSSurfaceCreateInfoMVK const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT; # endif /*VK_USE_PLATFORM_IOS_MVK*/ # if defined( VK_USE_PLATFORM_MACOS_MVK ) //=== VK_MVK_macos_surface === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type createMacOSSurfaceMVK( VULKAN_HPP_NAMESPACE::MacOSSurfaceCreateInfoMVK const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT; # endif /*VK_USE_PLATFORM_MACOS_MVK*/ //=== VK_EXT_debug_utils === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type createDebugUtilsMessengerEXT( VULKAN_HPP_NAMESPACE::DebugUtilsMessengerCreateInfoEXT const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT; void submitDebugUtilsMessageEXT( VULKAN_HPP_NAMESPACE::DebugUtilsMessageSeverityFlagBitsEXT messageSeverity, VULKAN_HPP_NAMESPACE::DebugUtilsMessageTypeFlagsEXT messageTypes, const VULKAN_HPP_NAMESPACE::DebugUtilsMessengerCallbackDataEXT & callbackData ) const VULKAN_HPP_NOEXCEPT; # if defined( VK_USE_PLATFORM_FUCHSIA ) //=== VK_FUCHSIA_imagepipe_surface === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type createImagePipeSurfaceFUCHSIA( VULKAN_HPP_NAMESPACE::ImagePipeSurfaceCreateInfoFUCHSIA const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT; # endif /*VK_USE_PLATFORM_FUCHSIA*/ # if defined( VK_USE_PLATFORM_METAL_EXT ) //=== VK_EXT_metal_surface === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type createMetalSurfaceEXT( VULKAN_HPP_NAMESPACE::MetalSurfaceCreateInfoEXT const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT; # endif /*VK_USE_PLATFORM_METAL_EXT*/ //=== VK_EXT_headless_surface === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type createHeadlessSurfaceEXT( VULKAN_HPP_NAMESPACE::HeadlessSurfaceCreateInfoEXT const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT; # if defined( VK_USE_PLATFORM_DIRECTFB_EXT ) //=== VK_EXT_directfb_surface === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type createDirectFBSurfaceEXT( VULKAN_HPP_NAMESPACE::DirectFBSurfaceCreateInfoEXT const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT; # endif /*VK_USE_PLATFORM_DIRECTFB_EXT*/ # if defined( VK_USE_PLATFORM_SCREEN_QNX ) //=== VK_QNX_screen_surface === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type createScreenSurfaceQNX( VULKAN_HPP_NAMESPACE::ScreenSurfaceCreateInfoQNX const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT; # endif /*VK_USE_PLATFORM_SCREEN_QNX*/ private: VULKAN_HPP_NAMESPACE::Instance m_instance = {}; const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; std::unique_ptr m_dispatcher; }; template <> struct isVulkanRAIIHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; class PhysicalDevice { public: using CType = VkPhysicalDevice; using CppType = VULKAN_HPP_NAMESPACE::PhysicalDevice; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::ePhysicalDevice; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::ePhysicalDevice; public: PhysicalDevice( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance, VkPhysicalDevice physicalDevice ) : m_physicalDevice( physicalDevice ), m_dispatcher( instance.getDispatcher() ) { } PhysicalDevice( std::nullptr_t ) {} ~PhysicalDevice() { clear(); } PhysicalDevice() = delete; PhysicalDevice( PhysicalDevice const & rhs ) : m_physicalDevice( rhs.m_physicalDevice ), m_dispatcher( rhs.m_dispatcher ) {} PhysicalDevice( PhysicalDevice && rhs ) VULKAN_HPP_NOEXCEPT : m_physicalDevice( VULKAN_HPP_NAMESPACE::exchange( rhs.m_physicalDevice, {} ) ) , m_dispatcher( VULKAN_HPP_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) { } PhysicalDevice & operator=( PhysicalDevice const & rhs ) { m_physicalDevice = rhs.m_physicalDevice; m_dispatcher = rhs.m_dispatcher; return *this; } PhysicalDevice & operator=( PhysicalDevice && rhs ) VULKAN_HPP_NOEXCEPT { if ( this != &rhs ) { std::swap( m_physicalDevice, rhs.m_physicalDevice ); std::swap( m_dispatcher, rhs.m_dispatcher ); } return *this; } VULKAN_HPP_NAMESPACE::PhysicalDevice const & operator*() const VULKAN_HPP_NOEXCEPT { return m_physicalDevice; } operator VULKAN_HPP_NAMESPACE::PhysicalDevice() const VULKAN_HPP_NOEXCEPT { return m_physicalDevice; } void clear() VULKAN_HPP_NOEXCEPT { m_physicalDevice = nullptr; m_dispatcher = nullptr; } VULKAN_HPP_NAMESPACE::PhysicalDevice release() { m_dispatcher = nullptr; return VULKAN_HPP_NAMESPACE::exchange( m_physicalDevice, nullptr ); } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::InstanceDispatcher const * getDispatcher() const { VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); return m_dispatcher; } void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::PhysicalDevice & rhs ) VULKAN_HPP_NOEXCEPT { std::swap( m_physicalDevice, rhs.m_physicalDevice ); std::swap( m_dispatcher, rhs.m_dispatcher ); } //=== VK_VERSION_1_0 === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures getFeatures() const VULKAN_HPP_NOEXCEPT; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::FormatProperties getFormatProperties( VULKAN_HPP_NAMESPACE::Format format ) const VULKAN_HPP_NOEXCEPT; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::ImageFormatProperties getImageFormatProperties( VULKAN_HPP_NAMESPACE::Format format, VULKAN_HPP_NAMESPACE::ImageType type, VULKAN_HPP_NAMESPACE::ImageTiling tiling, VULKAN_HPP_NAMESPACE::ImageUsageFlags usage, VULKAN_HPP_NAMESPACE::ImageCreateFlags flags VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT ) const; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties getProperties() const VULKAN_HPP_NOEXCEPT; VULKAN_HPP_NODISCARD std::vector getQueueFamilyProperties() const; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties getMemoryProperties() const VULKAN_HPP_NOEXCEPT; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type createDevice( VULKAN_HPP_NAMESPACE::DeviceCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT; VULKAN_HPP_NODISCARD std::vector enumerateDeviceExtensionProperties( Optional layerName VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT ) const; VULKAN_HPP_NODISCARD std::vector enumerateDeviceLayerProperties() const; VULKAN_HPP_NODISCARD std::vector getSparseImageFormatProperties( VULKAN_HPP_NAMESPACE::Format format, VULKAN_HPP_NAMESPACE::ImageType type, VULKAN_HPP_NAMESPACE::SampleCountFlagBits samples, VULKAN_HPP_NAMESPACE::ImageUsageFlags usage, VULKAN_HPP_NAMESPACE::ImageTiling tiling ) const; //=== VK_VERSION_1_1 === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures2 getFeatures2() const VULKAN_HPP_NOEXCEPT; template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::StructureChain getFeatures2() const VULKAN_HPP_NOEXCEPT; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties2 getProperties2() const VULKAN_HPP_NOEXCEPT; template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::StructureChain getProperties2() const VULKAN_HPP_NOEXCEPT; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::FormatProperties2 getFormatProperties2( VULKAN_HPP_NAMESPACE::Format format ) const VULKAN_HPP_NOEXCEPT; template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::StructureChain getFormatProperties2( VULKAN_HPP_NAMESPACE::Format format ) const VULKAN_HPP_NOEXCEPT; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::ImageFormatProperties2 getImageFormatProperties2( const VULKAN_HPP_NAMESPACE::PhysicalDeviceImageFormatInfo2 & imageFormatInfo ) const; template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::StructureChain getImageFormatProperties2( const VULKAN_HPP_NAMESPACE::PhysicalDeviceImageFormatInfo2 & imageFormatInfo ) const; VULKAN_HPP_NODISCARD std::vector getQueueFamilyProperties2() const; template VULKAN_HPP_NODISCARD std::vector getQueueFamilyProperties2() const; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties2 getMemoryProperties2() const VULKAN_HPP_NOEXCEPT; template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::StructureChain getMemoryProperties2() const VULKAN_HPP_NOEXCEPT; VULKAN_HPP_NODISCARD std::vector getSparseImageFormatProperties2( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSparseImageFormatInfo2 & formatInfo ) const; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::ExternalBufferProperties getExternalBufferProperties( const VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalBufferInfo & externalBufferInfo ) const VULKAN_HPP_NOEXCEPT; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::ExternalFenceProperties getExternalFenceProperties( const VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalFenceInfo & externalFenceInfo ) const VULKAN_HPP_NOEXCEPT; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::ExternalSemaphoreProperties getExternalSemaphoreProperties( const VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalSemaphoreInfo & externalSemaphoreInfo ) const VULKAN_HPP_NOEXCEPT; //=== VK_VERSION_1_3 === VULKAN_HPP_NODISCARD std::vector getToolProperties() const; //=== VK_KHR_surface === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Bool32 getSurfaceSupportKHR( uint32_t queueFamilyIndex, VULKAN_HPP_NAMESPACE::SurfaceKHR surface ) const; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::SurfaceCapabilitiesKHR getSurfaceCapabilitiesKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface ) const; VULKAN_HPP_NODISCARD std::vector getSurfaceFormatsKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT ) const; VULKAN_HPP_NODISCARD std::vector getSurfacePresentModesKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT ) const; //=== VK_KHR_swapchain === VULKAN_HPP_NODISCARD std::vector getPresentRectanglesKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface ) const; //=== VK_KHR_display === VULKAN_HPP_NODISCARD std::vector getDisplayPropertiesKHR() const; VULKAN_HPP_NODISCARD std::vector getDisplayPlanePropertiesKHR() const; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType< std::vector>::Type getDisplayPlaneSupportedDisplaysKHR( uint32_t planeIndex ) const; # if defined( VK_USE_PLATFORM_XLIB_KHR ) //=== VK_KHR_xlib_surface === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Bool32 getXlibPresentationSupportKHR( uint32_t queueFamilyIndex, Display & dpy, VisualID visualID ) const VULKAN_HPP_NOEXCEPT; # endif /*VK_USE_PLATFORM_XLIB_KHR*/ # if defined( VK_USE_PLATFORM_XCB_KHR ) //=== VK_KHR_xcb_surface === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Bool32 getXcbPresentationSupportKHR( uint32_t queueFamilyIndex, xcb_connection_t & connection, xcb_visualid_t visual_id ) const VULKAN_HPP_NOEXCEPT; # endif /*VK_USE_PLATFORM_XCB_KHR*/ # if defined( VK_USE_PLATFORM_WAYLAND_KHR ) //=== VK_KHR_wayland_surface === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Bool32 getWaylandPresentationSupportKHR( uint32_t queueFamilyIndex, struct wl_display & display ) const VULKAN_HPP_NOEXCEPT; # endif /*VK_USE_PLATFORM_WAYLAND_KHR*/ # if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_KHR_win32_surface === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Bool32 getWin32PresentationSupportKHR( uint32_t queueFamilyIndex ) const VULKAN_HPP_NOEXCEPT; # endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_KHR_video_queue === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VideoCapabilitiesKHR getVideoCapabilitiesKHR( const VULKAN_HPP_NAMESPACE::VideoProfileInfoKHR & videoProfile ) const; template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::StructureChain getVideoCapabilitiesKHR( const VULKAN_HPP_NAMESPACE::VideoProfileInfoKHR & videoProfile ) const; VULKAN_HPP_NODISCARD std::vector getVideoFormatPropertiesKHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceVideoFormatInfoKHR & videoFormatInfo ) const; template VULKAN_HPP_NODISCARD std::vector getVideoFormatPropertiesKHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceVideoFormatInfoKHR & videoFormatInfo ) const; //=== VK_NV_external_memory_capabilities === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::ExternalImageFormatPropertiesNV getExternalImageFormatPropertiesNV( VULKAN_HPP_NAMESPACE::Format format, VULKAN_HPP_NAMESPACE::ImageType type, VULKAN_HPP_NAMESPACE::ImageTiling tiling, VULKAN_HPP_NAMESPACE::ImageUsageFlags usage, VULKAN_HPP_NAMESPACE::ImageCreateFlags flags VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagsNV externalHandleType VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT ) const; //=== VK_KHR_get_physical_device_properties2 === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures2 getFeatures2KHR() const VULKAN_HPP_NOEXCEPT; template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::StructureChain getFeatures2KHR() const VULKAN_HPP_NOEXCEPT; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties2 getProperties2KHR() const VULKAN_HPP_NOEXCEPT; template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::StructureChain getProperties2KHR() const VULKAN_HPP_NOEXCEPT; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::FormatProperties2 getFormatProperties2KHR( VULKAN_HPP_NAMESPACE::Format format ) const VULKAN_HPP_NOEXCEPT; template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::StructureChain getFormatProperties2KHR( VULKAN_HPP_NAMESPACE::Format format ) const VULKAN_HPP_NOEXCEPT; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::ImageFormatProperties2 getImageFormatProperties2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceImageFormatInfo2 & imageFormatInfo ) const; template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::StructureChain getImageFormatProperties2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceImageFormatInfo2 & imageFormatInfo ) const; VULKAN_HPP_NODISCARD std::vector getQueueFamilyProperties2KHR() const; template VULKAN_HPP_NODISCARD std::vector getQueueFamilyProperties2KHR() const; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties2 getMemoryProperties2KHR() const VULKAN_HPP_NOEXCEPT; template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::StructureChain getMemoryProperties2KHR() const VULKAN_HPP_NOEXCEPT; VULKAN_HPP_NODISCARD std::vector getSparseImageFormatProperties2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSparseImageFormatInfo2 & formatInfo ) const; //=== VK_KHR_external_memory_capabilities === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::ExternalBufferProperties getExternalBufferPropertiesKHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalBufferInfo & externalBufferInfo ) const VULKAN_HPP_NOEXCEPT; //=== VK_KHR_external_semaphore_capabilities === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::ExternalSemaphoreProperties getExternalSemaphorePropertiesKHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalSemaphoreInfo & externalSemaphoreInfo ) const VULKAN_HPP_NOEXCEPT; # if defined( VK_USE_PLATFORM_XLIB_XRANDR_EXT ) //=== VK_EXT_acquire_xlib_display === void acquireXlibDisplayEXT( Display & dpy, VULKAN_HPP_NAMESPACE::DisplayKHR display ) const; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type getRandROutputDisplayEXT( Display & dpy, RROutput rrOutput ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT; # endif /*VK_USE_PLATFORM_XLIB_XRANDR_EXT*/ //=== VK_EXT_display_surface_counter === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::SurfaceCapabilities2EXT getSurfaceCapabilities2EXT( VULKAN_HPP_NAMESPACE::SurfaceKHR surface ) const; //=== VK_KHR_external_fence_capabilities === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::ExternalFenceProperties getExternalFencePropertiesKHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalFenceInfo & externalFenceInfo ) const VULKAN_HPP_NOEXCEPT; //=== VK_KHR_performance_query === VULKAN_HPP_NODISCARD std::pair, std::vector> enumerateQueueFamilyPerformanceQueryCountersKHR( uint32_t queueFamilyIndex ) const; VULKAN_HPP_NODISCARD uint32_t getQueueFamilyPerformanceQueryPassesKHR( const VULKAN_HPP_NAMESPACE::QueryPoolPerformanceCreateInfoKHR & performanceQueryCreateInfo ) const VULKAN_HPP_NOEXCEPT; //=== VK_KHR_get_surface_capabilities2 === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::SurfaceCapabilities2KHR getSurfaceCapabilities2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR & surfaceInfo ) const; template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::StructureChain getSurfaceCapabilities2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR & surfaceInfo ) const; VULKAN_HPP_NODISCARD std::vector getSurfaceFormats2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR & surfaceInfo ) const; template VULKAN_HPP_NODISCARD std::vector getSurfaceFormats2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR & surfaceInfo ) const; //=== VK_KHR_get_display_properties2 === VULKAN_HPP_NODISCARD std::vector getDisplayProperties2KHR() const; VULKAN_HPP_NODISCARD std::vector getDisplayPlaneProperties2KHR() const; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::DisplayPlaneCapabilities2KHR getDisplayPlaneCapabilities2KHR( const VULKAN_HPP_NAMESPACE::DisplayPlaneInfo2KHR & displayPlaneInfo ) const; //=== VK_EXT_sample_locations === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::MultisamplePropertiesEXT getMultisamplePropertiesEXT( VULKAN_HPP_NAMESPACE::SampleCountFlagBits samples ) const VULKAN_HPP_NOEXCEPT; //=== VK_EXT_calibrated_timestamps === VULKAN_HPP_NODISCARD std::vector getCalibrateableTimeDomainsEXT() const; //=== VK_KHR_fragment_shading_rate === VULKAN_HPP_NODISCARD std::vector getFragmentShadingRatesKHR() const; //=== VK_EXT_tooling_info === VULKAN_HPP_NODISCARD std::vector getToolPropertiesEXT() const; //=== VK_NV_cooperative_matrix === VULKAN_HPP_NODISCARD std::vector getCooperativeMatrixPropertiesNV() const; //=== VK_NV_coverage_reduction_mode === VULKAN_HPP_NODISCARD std::vector getSupportedFramebufferMixedSamplesCombinationsNV() const; # if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_EXT_full_screen_exclusive === VULKAN_HPP_NODISCARD std::vector getSurfacePresentModes2EXT( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR & surfaceInfo ) const; # endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_EXT_acquire_drm_display === void acquireDrmDisplayEXT( int32_t drmFd, VULKAN_HPP_NAMESPACE::DisplayKHR display ) const; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type getDrmDisplayEXT( int32_t drmFd, uint32_t connectorId ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT; //=== VK_KHR_video_encode_queue === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VideoEncodeQualityLevelPropertiesKHR getVideoEncodeQualityLevelPropertiesKHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceVideoEncodeQualityLevelInfoKHR & qualityLevelInfo ) const; template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::StructureChain getVideoEncodeQualityLevelPropertiesKHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceVideoEncodeQualityLevelInfoKHR & qualityLevelInfo ) const; # if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_NV_acquire_winrt_display === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type getWinrtDisplayNV( uint32_t deviceRelativeId ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT; # endif /*VK_USE_PLATFORM_WIN32_KHR*/ # if defined( VK_USE_PLATFORM_DIRECTFB_EXT ) //=== VK_EXT_directfb_surface === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Bool32 getDirectFBPresentationSupportEXT( uint32_t queueFamilyIndex, IDirectFB & dfb ) const VULKAN_HPP_NOEXCEPT; # endif /*VK_USE_PLATFORM_DIRECTFB_EXT*/ # if defined( VK_USE_PLATFORM_SCREEN_QNX ) //=== VK_QNX_screen_surface === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Bool32 getScreenPresentationSupportQNX( uint32_t queueFamilyIndex, struct _screen_window & window ) const VULKAN_HPP_NOEXCEPT; # endif /*VK_USE_PLATFORM_SCREEN_QNX*/ //=== VK_NV_optical_flow === VULKAN_HPP_NODISCARD std::vector getOpticalFlowImageFormatsNV( const VULKAN_HPP_NAMESPACE::OpticalFlowImageFormatInfoNV & opticalFlowImageFormatInfo ) const; //=== VK_NV_cooperative_vector === VULKAN_HPP_NODISCARD std::vector getCooperativeVectorPropertiesNV() const; //=== VK_KHR_cooperative_matrix === VULKAN_HPP_NODISCARD std::vector getCooperativeMatrixPropertiesKHR() const; //=== VK_KHR_calibrated_timestamps === VULKAN_HPP_NODISCARD std::vector getCalibrateableTimeDomainsKHR() const; //=== VK_NV_cooperative_matrix2 === VULKAN_HPP_NODISCARD std::vector getCooperativeMatrixFlexibleDimensionsPropertiesNV() const; private: VULKAN_HPP_NAMESPACE::PhysicalDevice m_physicalDevice = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::InstanceDispatcher const * m_dispatcher = nullptr; }; template <> struct isVulkanRAIIHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; class PhysicalDevices : public std::vector { public: # if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) PhysicalDevices( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance ) { *this = instance.enumeratePhysicalDevices(); } # endif PhysicalDevices( std::nullptr_t ) {} PhysicalDevices() = delete; PhysicalDevices( PhysicalDevices const & ) = delete; PhysicalDevices( PhysicalDevices && rhs ) = default; PhysicalDevices & operator=( PhysicalDevices const & ) = delete; PhysicalDevices & operator=( PhysicalDevices && rhs ) = default; private: PhysicalDevices( std::vector && rhs ) { std::swap( *this, rhs ); } }; class Device { public: using CType = VkDevice; using CppType = VULKAN_HPP_NAMESPACE::Device; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eDevice; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eDevice; public: # if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) Device( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::PhysicalDevice const & physicalDevice, VULKAN_HPP_NAMESPACE::DeviceCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) { *this = physicalDevice.createDevice( createInfo, allocator ); } # endif Device( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::PhysicalDevice const & physicalDevice, VkDevice device, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) : m_device( device ), m_allocator( static_cast( allocator ) ) { m_dispatcher.reset( new VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher( physicalDevice.getDispatcher()->vkGetDeviceProcAddr, static_cast( m_device ) ) ); } Device( std::nullptr_t ) {} ~Device() { clear(); } Device() = delete; Device( Device const & ) = delete; Device( Device && rhs ) VULKAN_HPP_NOEXCEPT : m_device( VULKAN_HPP_NAMESPACE::exchange( rhs.m_device, {} ) ) , m_allocator( VULKAN_HPP_NAMESPACE::exchange( rhs.m_allocator, {} ) ) , m_dispatcher( rhs.m_dispatcher.release() ) { } Device & operator=( Device const & ) = delete; Device & operator=( Device && rhs ) VULKAN_HPP_NOEXCEPT { if ( this != &rhs ) { std::swap( m_device, rhs.m_device ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_dispatcher, rhs.m_dispatcher ); } return *this; } VULKAN_HPP_NAMESPACE::Device const & operator*() const VULKAN_HPP_NOEXCEPT { return m_device; } operator VULKAN_HPP_NAMESPACE::Device() const VULKAN_HPP_NOEXCEPT { return m_device; } void clear() VULKAN_HPP_NOEXCEPT { if ( m_device ) { getDispatcher()->vkDestroyDevice( static_cast( m_device ), reinterpret_cast( m_allocator ) ); } m_device = nullptr; m_allocator = nullptr; m_dispatcher = nullptr; } VULKAN_HPP_NAMESPACE::Device release() { m_allocator = nullptr; m_dispatcher = nullptr; return VULKAN_HPP_NAMESPACE::exchange( m_device, nullptr ); } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * getDispatcher() const { VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); return &*m_dispatcher; } void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device & rhs ) VULKAN_HPP_NOEXCEPT { std::swap( m_device, rhs.m_device ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_dispatcher, rhs.m_dispatcher ); } //=== VK_VERSION_1_0 === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::PFN_VoidFunction getProcAddr( const std::string & name ) const VULKAN_HPP_NOEXCEPT; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type getQueue( uint32_t queueFamilyIndex, uint32_t queueIndex ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT; void waitIdle() const; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type allocateMemory( VULKAN_HPP_NAMESPACE::MemoryAllocateInfo const & allocateInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT; void flushMappedMemoryRanges( VULKAN_HPP_NAMESPACE::ArrayProxy const & memoryRanges ) const; void invalidateMappedMemoryRanges( VULKAN_HPP_NAMESPACE::ArrayProxy const & memoryRanges ) const; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type createFence( VULKAN_HPP_NAMESPACE::FenceCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT; void resetFences( VULKAN_HPP_NAMESPACE::ArrayProxy const & fences ) const; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Result waitForFences( VULKAN_HPP_NAMESPACE::ArrayProxy const & fences, VULKAN_HPP_NAMESPACE::Bool32 waitAll, uint64_t timeout ) const; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type createSemaphore( VULKAN_HPP_NAMESPACE::SemaphoreCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type createEvent( VULKAN_HPP_NAMESPACE::EventCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type createQueryPool( VULKAN_HPP_NAMESPACE::QueryPoolCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type createBuffer( VULKAN_HPP_NAMESPACE::BufferCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type createBufferView( VULKAN_HPP_NAMESPACE::BufferViewCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type createImage( VULKAN_HPP_NAMESPACE::ImageCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type createImageView( VULKAN_HPP_NAMESPACE::ImageViewCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type createShaderModule( VULKAN_HPP_NAMESPACE::ShaderModuleCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type createPipelineCache( VULKAN_HPP_NAMESPACE::PipelineCacheCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType>::Type createGraphicsPipelines( VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type createGraphicsPipeline( VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, VULKAN_HPP_NAMESPACE::GraphicsPipelineCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType>::Type createComputePipelines( VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type createComputePipeline( VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, VULKAN_HPP_NAMESPACE::ComputePipelineCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type createPipelineLayout( VULKAN_HPP_NAMESPACE::PipelineLayoutCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type createSampler( VULKAN_HPP_NAMESPACE::SamplerCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type createDescriptorSetLayout( VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type createDescriptorPool( VULKAN_HPP_NAMESPACE::DescriptorPoolCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType< std::vector>::Type allocateDescriptorSets( VULKAN_HPP_NAMESPACE::DescriptorSetAllocateInfo const & allocateInfo ) const; void updateDescriptorSets( VULKAN_HPP_NAMESPACE::ArrayProxy const & descriptorWrites, VULKAN_HPP_NAMESPACE::ArrayProxy const & descriptorCopies ) const VULKAN_HPP_NOEXCEPT; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type createFramebuffer( VULKAN_HPP_NAMESPACE::FramebufferCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type createRenderPass( VULKAN_HPP_NAMESPACE::RenderPassCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type createCommandPool( VULKAN_HPP_NAMESPACE::CommandPoolCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType< std::vector>::Type allocateCommandBuffers( VULKAN_HPP_NAMESPACE::CommandBufferAllocateInfo const & allocateInfo ) const; //=== VK_VERSION_1_1 === void bindBufferMemory2( VULKAN_HPP_NAMESPACE::ArrayProxy const & bindInfos ) const; void bindImageMemory2( VULKAN_HPP_NAMESPACE::ArrayProxy const & bindInfos ) const; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::PeerMemoryFeatureFlags getGroupPeerMemoryFeatures( uint32_t heapIndex, uint32_t localDeviceIndex, uint32_t remoteDeviceIndex ) const VULKAN_HPP_NOEXCEPT; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::MemoryRequirements2 getImageMemoryRequirements2( const VULKAN_HPP_NAMESPACE::ImageMemoryRequirementsInfo2 & info ) const VULKAN_HPP_NOEXCEPT; template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::StructureChain getImageMemoryRequirements2( const VULKAN_HPP_NAMESPACE::ImageMemoryRequirementsInfo2 & info ) const VULKAN_HPP_NOEXCEPT; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::MemoryRequirements2 getBufferMemoryRequirements2( const VULKAN_HPP_NAMESPACE::BufferMemoryRequirementsInfo2 & info ) const VULKAN_HPP_NOEXCEPT; template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::StructureChain getBufferMemoryRequirements2( const VULKAN_HPP_NAMESPACE::BufferMemoryRequirementsInfo2 & info ) const VULKAN_HPP_NOEXCEPT; VULKAN_HPP_NODISCARD std::vector getImageSparseMemoryRequirements2( const VULKAN_HPP_NAMESPACE::ImageSparseMemoryRequirementsInfo2 & info ) const; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type getQueue2( VULKAN_HPP_NAMESPACE::DeviceQueueInfo2 const & queueInfo ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type createSamplerYcbcrConversion( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversionCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType< VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DescriptorUpdateTemplate>::Type createDescriptorUpdateTemplate( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::DescriptorSetLayoutSupport getDescriptorSetLayoutSupport( const VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateInfo & createInfo ) const VULKAN_HPP_NOEXCEPT; template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::StructureChain getDescriptorSetLayoutSupport( const VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateInfo & createInfo ) const VULKAN_HPP_NOEXCEPT; //=== VK_VERSION_1_2 === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type createRenderPass2( VULKAN_HPP_NAMESPACE::RenderPassCreateInfo2 const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Result waitSemaphores( const VULKAN_HPP_NAMESPACE::SemaphoreWaitInfo & waitInfo, uint64_t timeout ) const; void signalSemaphore( const VULKAN_HPP_NAMESPACE::SemaphoreSignalInfo & signalInfo ) const; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::DeviceAddress getBufferAddress( const VULKAN_HPP_NAMESPACE::BufferDeviceAddressInfo & info ) const VULKAN_HPP_NOEXCEPT; VULKAN_HPP_NODISCARD uint64_t getBufferOpaqueCaptureAddress( const VULKAN_HPP_NAMESPACE::BufferDeviceAddressInfo & info ) const VULKAN_HPP_NOEXCEPT; VULKAN_HPP_NODISCARD uint64_t getMemoryOpaqueCaptureAddress( const VULKAN_HPP_NAMESPACE::DeviceMemoryOpaqueCaptureAddressInfo & info ) const VULKAN_HPP_NOEXCEPT; //=== VK_VERSION_1_3 === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type createPrivateDataSlot( VULKAN_HPP_NAMESPACE::PrivateDataSlotCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT; void setPrivateData( VULKAN_HPP_NAMESPACE::ObjectType objectType, uint64_t objectHandle, VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot, uint64_t data ) const; VULKAN_HPP_NODISCARD uint64_t getPrivateData( VULKAN_HPP_NAMESPACE::ObjectType objectType, uint64_t objectHandle, VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot ) const VULKAN_HPP_NOEXCEPT; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::MemoryRequirements2 getBufferMemoryRequirements( const VULKAN_HPP_NAMESPACE::DeviceBufferMemoryRequirements & info ) const VULKAN_HPP_NOEXCEPT; template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::StructureChain getBufferMemoryRequirements( const VULKAN_HPP_NAMESPACE::DeviceBufferMemoryRequirements & info ) const VULKAN_HPP_NOEXCEPT; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::MemoryRequirements2 getImageMemoryRequirements( const VULKAN_HPP_NAMESPACE::DeviceImageMemoryRequirements & info ) const VULKAN_HPP_NOEXCEPT; template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::StructureChain getImageMemoryRequirements( const VULKAN_HPP_NAMESPACE::DeviceImageMemoryRequirements & info ) const VULKAN_HPP_NOEXCEPT; VULKAN_HPP_NODISCARD std::vector getImageSparseMemoryRequirements( const VULKAN_HPP_NAMESPACE::DeviceImageMemoryRequirements & info ) const; //=== VK_VERSION_1_4 === VULKAN_HPP_NODISCARD void * mapMemory2( const VULKAN_HPP_NAMESPACE::MemoryMapInfo & memoryMapInfo ) const; void unmapMemory2( const VULKAN_HPP_NAMESPACE::MemoryUnmapInfo & memoryUnmapInfo ) const; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Extent2D getRenderingAreaGranularity( const VULKAN_HPP_NAMESPACE::RenderingAreaInfo & renderingAreaInfo ) const VULKAN_HPP_NOEXCEPT; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::SubresourceLayout2 getImageSubresourceLayout( const VULKAN_HPP_NAMESPACE::DeviceImageSubresourceInfo & info ) const VULKAN_HPP_NOEXCEPT; template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::StructureChain getImageSubresourceLayout( const VULKAN_HPP_NAMESPACE::DeviceImageSubresourceInfo & info ) const VULKAN_HPP_NOEXCEPT; void copyMemoryToImage( const VULKAN_HPP_NAMESPACE::CopyMemoryToImageInfo & copyMemoryToImageInfo ) const; void copyImageToMemory( const VULKAN_HPP_NAMESPACE::CopyImageToMemoryInfo & copyImageToMemoryInfo ) const; void copyImageToImage( const VULKAN_HPP_NAMESPACE::CopyImageToImageInfo & copyImageToImageInfo ) const; void transitionImageLayout( VULKAN_HPP_NAMESPACE::ArrayProxy const & transitions ) const; //=== VK_KHR_swapchain === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type createSwapchainKHR( VULKAN_HPP_NAMESPACE::SwapchainCreateInfoKHR const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::DeviceGroupPresentCapabilitiesKHR getGroupPresentCapabilitiesKHR() const; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::DeviceGroupPresentModeFlagsKHR getGroupSurfacePresentModesKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface ) const; VULKAN_HPP_NODISCARD std::pair acquireNextImage2KHR( const VULKAN_HPP_NAMESPACE::AcquireNextImageInfoKHR & acquireInfo ) const; //=== VK_KHR_display_swapchain === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType< std::vector>::Type createSharedSwapchainsKHR( VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type createSharedSwapchainKHR( VULKAN_HPP_NAMESPACE::SwapchainCreateInfoKHR const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT; //=== VK_EXT_debug_marker === void debugMarkerSetObjectTagEXT( const VULKAN_HPP_NAMESPACE::DebugMarkerObjectTagInfoEXT & tagInfo ) const; void debugMarkerSetObjectNameEXT( const VULKAN_HPP_NAMESPACE::DebugMarkerObjectNameInfoEXT & nameInfo ) const; //=== VK_KHR_video_queue === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type createVideoSessionKHR( VULKAN_HPP_NAMESPACE::VideoSessionCreateInfoKHR const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType< VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::VideoSessionParametersKHR>::Type createVideoSessionParametersKHR( VULKAN_HPP_NAMESPACE::VideoSessionParametersCreateInfoKHR const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT; //=== VK_NVX_binary_import === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type createCuModuleNVX( VULKAN_HPP_NAMESPACE::CuModuleCreateInfoNVX const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type createCuFunctionNVX( VULKAN_HPP_NAMESPACE::CuFunctionCreateInfoNVX const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT; //=== VK_NVX_image_view_handle === VULKAN_HPP_NODISCARD uint32_t getImageViewHandleNVX( const VULKAN_HPP_NAMESPACE::ImageViewHandleInfoNVX & info ) const VULKAN_HPP_NOEXCEPT; VULKAN_HPP_NODISCARD uint64_t getImageViewHandle64NVX( const VULKAN_HPP_NAMESPACE::ImageViewHandleInfoNVX & info ) const VULKAN_HPP_NOEXCEPT; //=== VK_KHR_device_group === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::PeerMemoryFeatureFlags getGroupPeerMemoryFeaturesKHR( uint32_t heapIndex, uint32_t localDeviceIndex, uint32_t remoteDeviceIndex ) const VULKAN_HPP_NOEXCEPT; # if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_KHR_external_memory_win32 === VULKAN_HPP_NODISCARD HANDLE getMemoryWin32HandleKHR( const VULKAN_HPP_NAMESPACE::MemoryGetWin32HandleInfoKHR & getWin32HandleInfo ) const; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::MemoryWin32HandlePropertiesKHR getMemoryWin32HandlePropertiesKHR( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType, HANDLE handle ) const; # endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_KHR_external_memory_fd === VULKAN_HPP_NODISCARD int getMemoryFdKHR( const VULKAN_HPP_NAMESPACE::MemoryGetFdInfoKHR & getFdInfo ) const; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::MemoryFdPropertiesKHR getMemoryFdPropertiesKHR( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType, int fd ) const; # if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_KHR_external_semaphore_win32 === void importSemaphoreWin32HandleKHR( const VULKAN_HPP_NAMESPACE::ImportSemaphoreWin32HandleInfoKHR & importSemaphoreWin32HandleInfo ) const; VULKAN_HPP_NODISCARD HANDLE getSemaphoreWin32HandleKHR( const VULKAN_HPP_NAMESPACE::SemaphoreGetWin32HandleInfoKHR & getWin32HandleInfo ) const; # endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_KHR_external_semaphore_fd === void importSemaphoreFdKHR( const VULKAN_HPP_NAMESPACE::ImportSemaphoreFdInfoKHR & importSemaphoreFdInfo ) const; VULKAN_HPP_NODISCARD int getSemaphoreFdKHR( const VULKAN_HPP_NAMESPACE::SemaphoreGetFdInfoKHR & getFdInfo ) const; //=== VK_KHR_descriptor_update_template === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType< VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DescriptorUpdateTemplate>::Type createDescriptorUpdateTemplateKHR( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT; void destroyDescriptorUpdateTemplateKHR( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; //=== VK_EXT_display_control === void displayPowerControlEXT( VULKAN_HPP_NAMESPACE::DisplayKHR display, const VULKAN_HPP_NAMESPACE::DisplayPowerInfoEXT & displayPowerInfo ) const; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type registerEventEXT( VULKAN_HPP_NAMESPACE::DeviceEventInfoEXT const & deviceEventInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type registerDisplayEventEXT( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DisplayKHR const & display, VULKAN_HPP_NAMESPACE::DisplayEventInfoEXT const & displayEventInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT; //=== VK_EXT_hdr_metadata === void setHdrMetadataEXT( VULKAN_HPP_NAMESPACE::ArrayProxy const & swapchains, VULKAN_HPP_NAMESPACE::ArrayProxy const & metadata ) const; //=== VK_KHR_create_renderpass2 === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type createRenderPass2KHR( VULKAN_HPP_NAMESPACE::RenderPassCreateInfo2 const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT; # if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_KHR_external_fence_win32 === void importFenceWin32HandleKHR( const VULKAN_HPP_NAMESPACE::ImportFenceWin32HandleInfoKHR & importFenceWin32HandleInfo ) const; VULKAN_HPP_NODISCARD HANDLE getFenceWin32HandleKHR( const VULKAN_HPP_NAMESPACE::FenceGetWin32HandleInfoKHR & getWin32HandleInfo ) const; # endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_KHR_external_fence_fd === void importFenceFdKHR( const VULKAN_HPP_NAMESPACE::ImportFenceFdInfoKHR & importFenceFdInfo ) const; VULKAN_HPP_NODISCARD int getFenceFdKHR( const VULKAN_HPP_NAMESPACE::FenceGetFdInfoKHR & getFdInfo ) const; //=== VK_KHR_performance_query === void acquireProfilingLockKHR( const VULKAN_HPP_NAMESPACE::AcquireProfilingLockInfoKHR & info ) const; void releaseProfilingLockKHR() const VULKAN_HPP_NOEXCEPT; //=== VK_EXT_debug_utils === void setDebugUtilsObjectNameEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsObjectNameInfoEXT & nameInfo ) const; void setDebugUtilsObjectTagEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsObjectTagInfoEXT & tagInfo ) const; # if defined( VK_USE_PLATFORM_ANDROID_KHR ) //=== VK_ANDROID_external_memory_android_hardware_buffer === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::AndroidHardwareBufferPropertiesANDROID getAndroidHardwareBufferPropertiesANDROID( const struct AHardwareBuffer & buffer ) const; template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::StructureChain getAndroidHardwareBufferPropertiesANDROID( const struct AHardwareBuffer & buffer ) const; VULKAN_HPP_NODISCARD struct AHardwareBuffer * getMemoryAndroidHardwareBufferANDROID( const VULKAN_HPP_NAMESPACE::MemoryGetAndroidHardwareBufferInfoANDROID & info ) const; # endif /*VK_USE_PLATFORM_ANDROID_KHR*/ # if defined( VK_ENABLE_BETA_EXTENSIONS ) //=== VK_AMDX_shader_enqueue === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType>::Type createExecutionGraphPipelinesAMDX( VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type createExecutionGraphPipelineAMDX( VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, VULKAN_HPP_NAMESPACE::ExecutionGraphPipelineCreateInfoAMDX const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT; # endif /*VK_ENABLE_BETA_EXTENSIONS*/ //=== VK_KHR_get_memory_requirements2 === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::MemoryRequirements2 getImageMemoryRequirements2KHR( const VULKAN_HPP_NAMESPACE::ImageMemoryRequirementsInfo2 & info ) const VULKAN_HPP_NOEXCEPT; template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::StructureChain getImageMemoryRequirements2KHR( const VULKAN_HPP_NAMESPACE::ImageMemoryRequirementsInfo2 & info ) const VULKAN_HPP_NOEXCEPT; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::MemoryRequirements2 getBufferMemoryRequirements2KHR( const VULKAN_HPP_NAMESPACE::BufferMemoryRequirementsInfo2 & info ) const VULKAN_HPP_NOEXCEPT; template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::StructureChain getBufferMemoryRequirements2KHR( const VULKAN_HPP_NAMESPACE::BufferMemoryRequirementsInfo2 & info ) const VULKAN_HPP_NOEXCEPT; VULKAN_HPP_NODISCARD std::vector getImageSparseMemoryRequirements2KHR( const VULKAN_HPP_NAMESPACE::ImageSparseMemoryRequirementsInfo2 & info ) const; //=== VK_KHR_acceleration_structure === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType< VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::AccelerationStructureKHR>::Type createAccelerationStructureKHR( VULKAN_HPP_NAMESPACE::AccelerationStructureCreateInfoKHR const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Result buildAccelerationStructuresKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, VULKAN_HPP_NAMESPACE::ArrayProxy const & infos, VULKAN_HPP_NAMESPACE::ArrayProxy const & pBuildRangeInfos ) const; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Result copyAccelerationStructureKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, const VULKAN_HPP_NAMESPACE::CopyAccelerationStructureInfoKHR & info ) const; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Result copyAccelerationStructureToMemoryKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, const VULKAN_HPP_NAMESPACE::CopyAccelerationStructureToMemoryInfoKHR & info ) const; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Result copyMemoryToAccelerationStructureKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, const VULKAN_HPP_NAMESPACE::CopyMemoryToAccelerationStructureInfoKHR & info ) const; template VULKAN_HPP_NODISCARD std::vector writeAccelerationStructuresPropertiesKHR( VULKAN_HPP_NAMESPACE::ArrayProxy const & accelerationStructures, VULKAN_HPP_NAMESPACE::QueryType queryType, size_t dataSize, size_t stride ) const; template VULKAN_HPP_NODISCARD DataType writeAccelerationStructuresPropertyKHR( VULKAN_HPP_NAMESPACE::ArrayProxy const & accelerationStructures, VULKAN_HPP_NAMESPACE::QueryType queryType, size_t stride ) const; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::DeviceAddress getAccelerationStructureAddressKHR( const VULKAN_HPP_NAMESPACE::AccelerationStructureDeviceAddressInfoKHR & info ) const VULKAN_HPP_NOEXCEPT; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::AccelerationStructureCompatibilityKHR getAccelerationStructureCompatibilityKHR( const VULKAN_HPP_NAMESPACE::AccelerationStructureVersionInfoKHR & versionInfo ) const VULKAN_HPP_NOEXCEPT; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::AccelerationStructureBuildSizesInfoKHR getAccelerationStructureBuildSizesKHR( VULKAN_HPP_NAMESPACE::AccelerationStructureBuildTypeKHR buildType, const VULKAN_HPP_NAMESPACE::AccelerationStructureBuildGeometryInfoKHR & buildInfo, VULKAN_HPP_NAMESPACE::ArrayProxy const & maxPrimitiveCounts VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT ) const; //=== VK_KHR_ray_tracing_pipeline === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType>::Type createRayTracingPipelinesKHR( VULKAN_HPP_NAMESPACE::Optional const & deferredOperation, VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type createRayTracingPipelineKHR( VULKAN_HPP_NAMESPACE::Optional const & deferredOperation, VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, VULKAN_HPP_NAMESPACE::RayTracingPipelineCreateInfoKHR const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT; //=== VK_KHR_sampler_ycbcr_conversion === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type createSamplerYcbcrConversionKHR( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversionCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT; void destroySamplerYcbcrConversionKHR( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion ycbcrConversion VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; //=== VK_KHR_bind_memory2 === void bindBufferMemory2KHR( VULKAN_HPP_NAMESPACE::ArrayProxy const & bindInfos ) const; void bindImageMemory2KHR( VULKAN_HPP_NAMESPACE::ArrayProxy const & bindInfos ) const; //=== VK_EXT_validation_cache === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type createValidationCacheEXT( VULKAN_HPP_NAMESPACE::ValidationCacheCreateInfoEXT const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT; //=== VK_NV_ray_tracing === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType< VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::AccelerationStructureNV>::Type createAccelerationStructureNV( VULKAN_HPP_NAMESPACE::AccelerationStructureCreateInfoNV const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::MemoryRequirements2KHR getAccelerationStructureMemoryRequirementsNV( const VULKAN_HPP_NAMESPACE::AccelerationStructureMemoryRequirementsInfoNV & info ) const VULKAN_HPP_NOEXCEPT; template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::StructureChain getAccelerationStructureMemoryRequirementsNV( const VULKAN_HPP_NAMESPACE::AccelerationStructureMemoryRequirementsInfoNV & info ) const VULKAN_HPP_NOEXCEPT; void bindAccelerationStructureMemoryNV( VULKAN_HPP_NAMESPACE::ArrayProxy const & bindInfos ) const; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType>::Type createRayTracingPipelinesNV( VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type createRayTracingPipelineNV( VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, VULKAN_HPP_NAMESPACE::RayTracingPipelineCreateInfoNV const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT; //=== VK_KHR_maintenance3 === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::DescriptorSetLayoutSupport getDescriptorSetLayoutSupportKHR( const VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateInfo & createInfo ) const VULKAN_HPP_NOEXCEPT; template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::StructureChain getDescriptorSetLayoutSupportKHR( const VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateInfo & createInfo ) const VULKAN_HPP_NOEXCEPT; //=== VK_EXT_external_memory_host === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::MemoryHostPointerPropertiesEXT getMemoryHostPointerPropertiesEXT( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType, const void * pHostPointer ) const; //=== VK_EXT_calibrated_timestamps === VULKAN_HPP_NODISCARD std::pair, uint64_t> getCalibratedTimestampsEXT( VULKAN_HPP_NAMESPACE::ArrayProxy const & timestampInfos ) const; VULKAN_HPP_NODISCARD std::pair getCalibratedTimestampEXT( const VULKAN_HPP_NAMESPACE::CalibratedTimestampInfoKHR & timestampInfo ) const; //=== VK_KHR_timeline_semaphore === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Result waitSemaphoresKHR( const VULKAN_HPP_NAMESPACE::SemaphoreWaitInfo & waitInfo, uint64_t timeout ) const; void signalSemaphoreKHR( const VULKAN_HPP_NAMESPACE::SemaphoreSignalInfo & signalInfo ) const; //=== VK_INTEL_performance_query === void initializePerformanceApiINTEL( const VULKAN_HPP_NAMESPACE::InitializePerformanceApiInfoINTEL & initializeInfo ) const; void uninitializePerformanceApiINTEL() const VULKAN_HPP_NOEXCEPT; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType< VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::PerformanceConfigurationINTEL>::Type acquirePerformanceConfigurationINTEL( VULKAN_HPP_NAMESPACE::PerformanceConfigurationAcquireInfoINTEL const & acquireInfo ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::PerformanceValueINTEL getPerformanceParameterINTEL( VULKAN_HPP_NAMESPACE::PerformanceParameterTypeINTEL parameter ) const; //=== VK_EXT_buffer_device_address === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::DeviceAddress getBufferAddressEXT( const VULKAN_HPP_NAMESPACE::BufferDeviceAddressInfo & info ) const VULKAN_HPP_NOEXCEPT; # if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_EXT_full_screen_exclusive === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::DeviceGroupPresentModeFlagsKHR getGroupSurfacePresentModes2EXT( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR & surfaceInfo ) const; # endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_KHR_buffer_device_address === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::DeviceAddress getBufferAddressKHR( const VULKAN_HPP_NAMESPACE::BufferDeviceAddressInfo & info ) const VULKAN_HPP_NOEXCEPT; VULKAN_HPP_NODISCARD uint64_t getBufferOpaqueCaptureAddressKHR( const VULKAN_HPP_NAMESPACE::BufferDeviceAddressInfo & info ) const VULKAN_HPP_NOEXCEPT; VULKAN_HPP_NODISCARD uint64_t getMemoryOpaqueCaptureAddressKHR( const VULKAN_HPP_NAMESPACE::DeviceMemoryOpaqueCaptureAddressInfo & info ) const VULKAN_HPP_NOEXCEPT; //=== VK_KHR_deferred_host_operations === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type createDeferredOperationKHR( VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT; //=== VK_KHR_pipeline_executable_properties === VULKAN_HPP_NODISCARD std::vector getPipelineExecutablePropertiesKHR( const VULKAN_HPP_NAMESPACE::PipelineInfoKHR & pipelineInfo ) const; VULKAN_HPP_NODISCARD std::vector getPipelineExecutableStatisticsKHR( const VULKAN_HPP_NAMESPACE::PipelineExecutableInfoKHR & executableInfo ) const; VULKAN_HPP_NODISCARD std::vector getPipelineExecutableInternalRepresentationsKHR( const VULKAN_HPP_NAMESPACE::PipelineExecutableInfoKHR & executableInfo ) const; //=== VK_EXT_host_image_copy === void copyMemoryToImageEXT( const VULKAN_HPP_NAMESPACE::CopyMemoryToImageInfo & copyMemoryToImageInfo ) const; void copyImageToMemoryEXT( const VULKAN_HPP_NAMESPACE::CopyImageToMemoryInfo & copyImageToMemoryInfo ) const; void copyImageToImageEXT( const VULKAN_HPP_NAMESPACE::CopyImageToImageInfo & copyImageToImageInfo ) const; void transitionImageLayoutEXT( VULKAN_HPP_NAMESPACE::ArrayProxy const & transitions ) const; //=== VK_KHR_map_memory2 === VULKAN_HPP_NODISCARD void * mapMemory2KHR( const VULKAN_HPP_NAMESPACE::MemoryMapInfo & memoryMapInfo ) const; void unmapMemory2KHR( const VULKAN_HPP_NAMESPACE::MemoryUnmapInfo & memoryUnmapInfo ) const; //=== VK_EXT_swapchain_maintenance1 === void releaseSwapchainImagesEXT( const VULKAN_HPP_NAMESPACE::ReleaseSwapchainImagesInfoEXT & releaseInfo ) const; //=== VK_NV_device_generated_commands === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::MemoryRequirements2 getGeneratedCommandsMemoryRequirementsNV( const VULKAN_HPP_NAMESPACE::GeneratedCommandsMemoryRequirementsInfoNV & info ) const VULKAN_HPP_NOEXCEPT; template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::StructureChain getGeneratedCommandsMemoryRequirementsNV( const VULKAN_HPP_NAMESPACE::GeneratedCommandsMemoryRequirementsInfoNV & info ) const VULKAN_HPP_NOEXCEPT; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType< VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::IndirectCommandsLayoutNV>::Type createIndirectCommandsLayoutNV( VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutCreateInfoNV const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT; //=== VK_EXT_private_data === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type createPrivateDataSlotEXT( VULKAN_HPP_NAMESPACE::PrivateDataSlotCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT; void destroyPrivateDataSlotEXT( VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; void setPrivateDataEXT( VULKAN_HPP_NAMESPACE::ObjectType objectType, uint64_t objectHandle, VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot, uint64_t data ) const; VULKAN_HPP_NODISCARD uint64_t getPrivateDataEXT( VULKAN_HPP_NAMESPACE::ObjectType objectType, uint64_t objectHandle, VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot ) const VULKAN_HPP_NOEXCEPT; //=== VK_KHR_video_encode_queue === VULKAN_HPP_NODISCARD std::pair> getEncodedVideoSessionParametersKHR( const VULKAN_HPP_NAMESPACE::VideoEncodeSessionParametersGetInfoKHR & videoSessionParametersInfo ) const; template VULKAN_HPP_NODISCARD std::pair, std::vector> getEncodedVideoSessionParametersKHR( const VULKAN_HPP_NAMESPACE::VideoEncodeSessionParametersGetInfoKHR & videoSessionParametersInfo ) const; # if defined( VK_ENABLE_BETA_EXTENSIONS ) //=== VK_NV_cuda_kernel_launch === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type createCudaModuleNV( VULKAN_HPP_NAMESPACE::CudaModuleCreateInfoNV const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type createCudaFunctionNV( VULKAN_HPP_NAMESPACE::CudaFunctionCreateInfoNV const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT; # endif /*VK_ENABLE_BETA_EXTENSIONS*/ # if defined( VK_USE_PLATFORM_METAL_EXT ) //=== VK_EXT_metal_objects === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::ExportMetalObjectsInfoEXT exportMetalObjectsEXT() const VULKAN_HPP_NOEXCEPT; template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::StructureChain exportMetalObjectsEXT() const VULKAN_HPP_NOEXCEPT; # endif /*VK_USE_PLATFORM_METAL_EXT*/ //=== VK_EXT_descriptor_buffer === void getDescriptorEXT( const VULKAN_HPP_NAMESPACE::DescriptorGetInfoEXT & descriptorInfo, size_t dataSize, void * pDescriptor ) const VULKAN_HPP_NOEXCEPT; template VULKAN_HPP_NODISCARD DescriptorType getDescriptorEXT( const VULKAN_HPP_NAMESPACE::DescriptorGetInfoEXT & descriptorInfo ) const VULKAN_HPP_NOEXCEPT; template VULKAN_HPP_NODISCARD DataType getBufferOpaqueCaptureDescriptorDataEXT( const VULKAN_HPP_NAMESPACE::BufferCaptureDescriptorDataInfoEXT & info ) const; template VULKAN_HPP_NODISCARD DataType getImageOpaqueCaptureDescriptorDataEXT( const VULKAN_HPP_NAMESPACE::ImageCaptureDescriptorDataInfoEXT & info ) const; template VULKAN_HPP_NODISCARD DataType getImageViewOpaqueCaptureDescriptorDataEXT( const VULKAN_HPP_NAMESPACE::ImageViewCaptureDescriptorDataInfoEXT & info ) const; template VULKAN_HPP_NODISCARD DataType getSamplerOpaqueCaptureDescriptorDataEXT( const VULKAN_HPP_NAMESPACE::SamplerCaptureDescriptorDataInfoEXT & info ) const; template VULKAN_HPP_NODISCARD DataType getAccelerationStructureOpaqueCaptureDescriptorDataEXT( const VULKAN_HPP_NAMESPACE::AccelerationStructureCaptureDescriptorDataInfoEXT & info ) const; //=== VK_EXT_device_fault === template VULKAN_HPP_NODISCARD Result getFaultInfoEXT( VULKAN_HPP_NAMESPACE::DeviceFaultCountsEXT * pFaultCounts, VULKAN_HPP_NAMESPACE::DeviceFaultInfoEXT * pFaultInfo, Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; # if defined( VK_USE_PLATFORM_FUCHSIA ) //=== VK_FUCHSIA_external_memory === VULKAN_HPP_NODISCARD zx_handle_t getMemoryZirconHandleFUCHSIA( const VULKAN_HPP_NAMESPACE::MemoryGetZirconHandleInfoFUCHSIA & getZirconHandleInfo ) const; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::MemoryZirconHandlePropertiesFUCHSIA getMemoryZirconHandlePropertiesFUCHSIA( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType, zx_handle_t zirconHandle ) const; # endif /*VK_USE_PLATFORM_FUCHSIA*/ # if defined( VK_USE_PLATFORM_FUCHSIA ) //=== VK_FUCHSIA_external_semaphore === void importSemaphoreZirconHandleFUCHSIA( const VULKAN_HPP_NAMESPACE::ImportSemaphoreZirconHandleInfoFUCHSIA & importSemaphoreZirconHandleInfo ) const; VULKAN_HPP_NODISCARD zx_handle_t getSemaphoreZirconHandleFUCHSIA( const VULKAN_HPP_NAMESPACE::SemaphoreGetZirconHandleInfoFUCHSIA & getZirconHandleInfo ) const; # endif /*VK_USE_PLATFORM_FUCHSIA*/ # if defined( VK_USE_PLATFORM_FUCHSIA ) //=== VK_FUCHSIA_buffer_collection === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType< VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::BufferCollectionFUCHSIA>::Type createBufferCollectionFUCHSIA( VULKAN_HPP_NAMESPACE::BufferCollectionCreateInfoFUCHSIA const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT; # endif /*VK_USE_PLATFORM_FUCHSIA*/ //=== VK_NV_external_memory_rdma === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::RemoteAddressNV getMemoryRemoteAddressNV( const VULKAN_HPP_NAMESPACE::MemoryGetRemoteAddressInfoNV & memoryGetRemoteAddressInfo ) const; //=== VK_EXT_pipeline_properties === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::BaseOutStructure getPipelinePropertiesEXT( const VULKAN_HPP_NAMESPACE::PipelineInfoEXT & pipelineInfo ) const; //=== VK_EXT_opacity_micromap === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type createMicromapEXT( VULKAN_HPP_NAMESPACE::MicromapCreateInfoEXT const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Result buildMicromapsEXT( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, VULKAN_HPP_NAMESPACE::ArrayProxy const & infos ) const; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Result copyMicromapEXT( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, const VULKAN_HPP_NAMESPACE::CopyMicromapInfoEXT & info ) const; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Result copyMicromapToMemoryEXT( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, const VULKAN_HPP_NAMESPACE::CopyMicromapToMemoryInfoEXT & info ) const; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Result copyMemoryToMicromapEXT( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, const VULKAN_HPP_NAMESPACE::CopyMemoryToMicromapInfoEXT & info ) const; template VULKAN_HPP_NODISCARD std::vector writeMicromapsPropertiesEXT( VULKAN_HPP_NAMESPACE::ArrayProxy const & micromaps, VULKAN_HPP_NAMESPACE::QueryType queryType, size_t dataSize, size_t stride ) const; template VULKAN_HPP_NODISCARD DataType writeMicromapsPropertyEXT( VULKAN_HPP_NAMESPACE::ArrayProxy const & micromaps, VULKAN_HPP_NAMESPACE::QueryType queryType, size_t stride ) const; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::AccelerationStructureCompatibilityKHR getMicromapCompatibilityEXT( const VULKAN_HPP_NAMESPACE::MicromapVersionInfoEXT & versionInfo ) const VULKAN_HPP_NOEXCEPT; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::MicromapBuildSizesInfoEXT getMicromapBuildSizesEXT( VULKAN_HPP_NAMESPACE::AccelerationStructureBuildTypeKHR buildType, const VULKAN_HPP_NAMESPACE::MicromapBuildInfoEXT & buildInfo ) const VULKAN_HPP_NOEXCEPT; //=== VK_KHR_maintenance4 === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::MemoryRequirements2 getBufferMemoryRequirementsKHR( const VULKAN_HPP_NAMESPACE::DeviceBufferMemoryRequirements & info ) const VULKAN_HPP_NOEXCEPT; template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::StructureChain getBufferMemoryRequirementsKHR( const VULKAN_HPP_NAMESPACE::DeviceBufferMemoryRequirements & info ) const VULKAN_HPP_NOEXCEPT; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::MemoryRequirements2 getImageMemoryRequirementsKHR( const VULKAN_HPP_NAMESPACE::DeviceImageMemoryRequirements & info ) const VULKAN_HPP_NOEXCEPT; template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::StructureChain getImageMemoryRequirementsKHR( const VULKAN_HPP_NAMESPACE::DeviceImageMemoryRequirements & info ) const VULKAN_HPP_NOEXCEPT; VULKAN_HPP_NODISCARD std::vector getImageSparseMemoryRequirementsKHR( const VULKAN_HPP_NAMESPACE::DeviceImageMemoryRequirements & info ) const; //=== VK_VALVE_descriptor_set_host_mapping === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::DescriptorSetLayoutHostMappingInfoVALVE getDescriptorSetLayoutHostMappingInfoVALVE( const VULKAN_HPP_NAMESPACE::DescriptorSetBindingReferenceVALVE & bindingReference ) const VULKAN_HPP_NOEXCEPT; //=== VK_NV_device_generated_commands_compute === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::MemoryRequirements2 getPipelineIndirectMemoryRequirementsNV( const VULKAN_HPP_NAMESPACE::ComputePipelineCreateInfo & createInfo ) const VULKAN_HPP_NOEXCEPT; template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::StructureChain getPipelineIndirectMemoryRequirementsNV( const VULKAN_HPP_NAMESPACE::ComputePipelineCreateInfo & createInfo ) const VULKAN_HPP_NOEXCEPT; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::DeviceAddress getPipelineIndirectAddressNV( const VULKAN_HPP_NAMESPACE::PipelineIndirectDeviceAddressInfoNV & info ) const VULKAN_HPP_NOEXCEPT; //=== VK_EXT_shader_module_identifier === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::ShaderModuleIdentifierEXT getShaderModuleCreateInfoIdentifierEXT( const VULKAN_HPP_NAMESPACE::ShaderModuleCreateInfo & createInfo ) const VULKAN_HPP_NOEXCEPT; //=== VK_NV_optical_flow === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type createOpticalFlowSessionNV( VULKAN_HPP_NAMESPACE::OpticalFlowSessionCreateInfoNV const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT; //=== VK_KHR_maintenance5 === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Extent2D getRenderingAreaGranularityKHR( const VULKAN_HPP_NAMESPACE::RenderingAreaInfo & renderingAreaInfo ) const VULKAN_HPP_NOEXCEPT; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::SubresourceLayout2 getImageSubresourceLayoutKHR( const VULKAN_HPP_NAMESPACE::DeviceImageSubresourceInfo & info ) const VULKAN_HPP_NOEXCEPT; template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::StructureChain getImageSubresourceLayoutKHR( const VULKAN_HPP_NAMESPACE::DeviceImageSubresourceInfo & info ) const VULKAN_HPP_NOEXCEPT; //=== VK_AMD_anti_lag === void antiLagUpdateAMD( const VULKAN_HPP_NAMESPACE::AntiLagDataAMD & data ) const VULKAN_HPP_NOEXCEPT; //=== VK_EXT_shader_object === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType>::Type createShadersEXT( VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type createShaderEXT( VULKAN_HPP_NAMESPACE::ShaderCreateInfoEXT const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT; //=== VK_KHR_pipeline_binary === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType< std::vector>::Type createPipelineBinariesKHR( VULKAN_HPP_NAMESPACE::PipelineBinaryCreateInfoKHR const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::PipelineBinaryKeyKHR getPipelineKeyKHR( Optional pipelineCreateInfo VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT ) const; VULKAN_HPP_NODISCARD std::pair> getPipelineBinaryDataKHR( const VULKAN_HPP_NAMESPACE::PipelineBinaryDataInfoKHR & info ) const; void releaseCapturedPipelineDataKHR( const VULKAN_HPP_NAMESPACE::ReleaseCapturedPipelineDataInfoKHR & info, Optional allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; //=== VK_QCOM_tile_properties === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::TilePropertiesQCOM getDynamicRenderingTilePropertiesQCOM( const VULKAN_HPP_NAMESPACE::RenderingInfo & renderingInfo ) const VULKAN_HPP_NOEXCEPT; //=== VK_NV_cooperative_vector === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Result convertCooperativeVectorMatrixNV( const VULKAN_HPP_NAMESPACE::ConvertCooperativeVectorMatrixInfoNV & info ) const; # if defined( VK_USE_PLATFORM_SCREEN_QNX ) //=== VK_QNX_external_memory_screen_buffer === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::ScreenBufferPropertiesQNX getScreenBufferPropertiesQNX( const struct _screen_buffer & buffer ) const; template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::StructureChain getScreenBufferPropertiesQNX( const struct _screen_buffer & buffer ) const; # endif /*VK_USE_PLATFORM_SCREEN_QNX*/ //=== VK_KHR_calibrated_timestamps === VULKAN_HPP_NODISCARD std::pair, uint64_t> getCalibratedTimestampsKHR( VULKAN_HPP_NAMESPACE::ArrayProxy const & timestampInfos ) const; VULKAN_HPP_NODISCARD std::pair getCalibratedTimestampKHR( const VULKAN_HPP_NAMESPACE::CalibratedTimestampInfoKHR & timestampInfo ) const; //=== VK_NV_cluster_acceleration_structure === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::AccelerationStructureBuildSizesInfoKHR getClusterAccelerationStructureBuildSizesNV( const VULKAN_HPP_NAMESPACE::ClusterAccelerationStructureInputInfoNV & info ) const VULKAN_HPP_NOEXCEPT; //=== VK_NV_partitioned_acceleration_structure === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::AccelerationStructureBuildSizesInfoKHR getPartitionedAccelerationStructuresBuildSizesNV( const VULKAN_HPP_NAMESPACE::PartitionedAccelerationStructureInstancesInputNV & info ) const VULKAN_HPP_NOEXCEPT; //=== VK_EXT_device_generated_commands === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::MemoryRequirements2 getGeneratedCommandsMemoryRequirementsEXT( const VULKAN_HPP_NAMESPACE::GeneratedCommandsMemoryRequirementsInfoEXT & info ) const VULKAN_HPP_NOEXCEPT; template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::StructureChain getGeneratedCommandsMemoryRequirementsEXT( const VULKAN_HPP_NAMESPACE::GeneratedCommandsMemoryRequirementsInfoEXT & info ) const VULKAN_HPP_NOEXCEPT; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType< VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::IndirectCommandsLayoutEXT>::Type createIndirectCommandsLayoutEXT( VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutCreateInfoEXT const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType< VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::IndirectExecutionSetEXT>::Type createIndirectExecutionSetEXT( VULKAN_HPP_NAMESPACE::IndirectExecutionSetCreateInfoEXT const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT; # if defined( VK_USE_PLATFORM_METAL_EXT ) //=== VK_EXT_external_memory_metal === VULKAN_HPP_NODISCARD void * getMemoryMetalHandleEXT( const VULKAN_HPP_NAMESPACE::MemoryGetMetalHandleInfoEXT & getMetalHandleInfo ) const; template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::MemoryMetalHandlePropertiesEXT getMemoryMetalHandlePropertiesEXT( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType, HandleType const & handle ) const; # endif /*VK_USE_PLATFORM_METAL_EXT*/ private: VULKAN_HPP_NAMESPACE::Device m_device = {}; const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; std::unique_ptr m_dispatcher; }; template <> struct isVulkanRAIIHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; class AccelerationStructureKHR { public: using CType = VkAccelerationStructureKHR; using CppType = VULKAN_HPP_NAMESPACE::AccelerationStructureKHR; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eAccelerationStructureKHR; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eAccelerationStructureKHR; public: # if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) AccelerationStructureKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::AccelerationStructureCreateInfoKHR const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) { *this = device.createAccelerationStructureKHR( createInfo, allocator ); } # endif AccelerationStructureKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkAccelerationStructureKHR accelerationStructure, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) : m_device( device ) , m_accelerationStructure( accelerationStructure ) , m_allocator( static_cast( allocator ) ) , m_dispatcher( device.getDispatcher() ) { } AccelerationStructureKHR( std::nullptr_t ) {} ~AccelerationStructureKHR() { clear(); } AccelerationStructureKHR() = delete; AccelerationStructureKHR( AccelerationStructureKHR const & ) = delete; AccelerationStructureKHR( AccelerationStructureKHR && rhs ) VULKAN_HPP_NOEXCEPT : m_device( VULKAN_HPP_NAMESPACE::exchange( rhs.m_device, {} ) ) , m_accelerationStructure( VULKAN_HPP_NAMESPACE::exchange( rhs.m_accelerationStructure, {} ) ) , m_allocator( VULKAN_HPP_NAMESPACE::exchange( rhs.m_allocator, {} ) ) , m_dispatcher( VULKAN_HPP_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) { } AccelerationStructureKHR & operator=( AccelerationStructureKHR const & ) = delete; AccelerationStructureKHR & operator=( AccelerationStructureKHR && rhs ) VULKAN_HPP_NOEXCEPT { if ( this != &rhs ) { std::swap( m_device, rhs.m_device ); std::swap( m_accelerationStructure, rhs.m_accelerationStructure ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_dispatcher, rhs.m_dispatcher ); } return *this; } VULKAN_HPP_NAMESPACE::AccelerationStructureKHR const & operator*() const VULKAN_HPP_NOEXCEPT { return m_accelerationStructure; } operator VULKAN_HPP_NAMESPACE::AccelerationStructureKHR() const VULKAN_HPP_NOEXCEPT { return m_accelerationStructure; } void clear() VULKAN_HPP_NOEXCEPT { if ( m_accelerationStructure ) { getDispatcher()->vkDestroyAccelerationStructureKHR( static_cast( m_device ), static_cast( m_accelerationStructure ), reinterpret_cast( m_allocator ) ); } m_device = nullptr; m_accelerationStructure = nullptr; m_allocator = nullptr; m_dispatcher = nullptr; } VULKAN_HPP_NAMESPACE::AccelerationStructureKHR release() { m_device = nullptr; m_allocator = nullptr; m_dispatcher = nullptr; return VULKAN_HPP_NAMESPACE::exchange( m_accelerationStructure, nullptr ); } VULKAN_HPP_NAMESPACE::Device getDevice() const { return m_device; } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * getDispatcher() const { VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); return m_dispatcher; } void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::AccelerationStructureKHR & rhs ) VULKAN_HPP_NOEXCEPT { std::swap( m_device, rhs.m_device ); std::swap( m_accelerationStructure, rhs.m_accelerationStructure ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_dispatcher, rhs.m_dispatcher ); } private: VULKAN_HPP_NAMESPACE::Device m_device = {}; VULKAN_HPP_NAMESPACE::AccelerationStructureKHR m_accelerationStructure = {}; const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; template <> struct isVulkanRAIIHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; class AccelerationStructureNV { public: using CType = VkAccelerationStructureNV; using CppType = VULKAN_HPP_NAMESPACE::AccelerationStructureNV; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eAccelerationStructureNV; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eAccelerationStructureNV; public: # if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) AccelerationStructureNV( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::AccelerationStructureCreateInfoNV const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) { *this = device.createAccelerationStructureNV( createInfo, allocator ); } # endif AccelerationStructureNV( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkAccelerationStructureNV accelerationStructure, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) : m_device( device ) , m_accelerationStructure( accelerationStructure ) , m_allocator( static_cast( allocator ) ) , m_dispatcher( device.getDispatcher() ) { } AccelerationStructureNV( std::nullptr_t ) {} ~AccelerationStructureNV() { clear(); } AccelerationStructureNV() = delete; AccelerationStructureNV( AccelerationStructureNV const & ) = delete; AccelerationStructureNV( AccelerationStructureNV && rhs ) VULKAN_HPP_NOEXCEPT : m_device( VULKAN_HPP_NAMESPACE::exchange( rhs.m_device, {} ) ) , m_accelerationStructure( VULKAN_HPP_NAMESPACE::exchange( rhs.m_accelerationStructure, {} ) ) , m_allocator( VULKAN_HPP_NAMESPACE::exchange( rhs.m_allocator, {} ) ) , m_dispatcher( VULKAN_HPP_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) { } AccelerationStructureNV & operator=( AccelerationStructureNV const & ) = delete; AccelerationStructureNV & operator=( AccelerationStructureNV && rhs ) VULKAN_HPP_NOEXCEPT { if ( this != &rhs ) { std::swap( m_device, rhs.m_device ); std::swap( m_accelerationStructure, rhs.m_accelerationStructure ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_dispatcher, rhs.m_dispatcher ); } return *this; } VULKAN_HPP_NAMESPACE::AccelerationStructureNV const & operator*() const VULKAN_HPP_NOEXCEPT { return m_accelerationStructure; } operator VULKAN_HPP_NAMESPACE::AccelerationStructureNV() const VULKAN_HPP_NOEXCEPT { return m_accelerationStructure; } void clear() VULKAN_HPP_NOEXCEPT { if ( m_accelerationStructure ) { getDispatcher()->vkDestroyAccelerationStructureNV( static_cast( m_device ), static_cast( m_accelerationStructure ), reinterpret_cast( m_allocator ) ); } m_device = nullptr; m_accelerationStructure = nullptr; m_allocator = nullptr; m_dispatcher = nullptr; } VULKAN_HPP_NAMESPACE::AccelerationStructureNV release() { m_device = nullptr; m_allocator = nullptr; m_dispatcher = nullptr; return VULKAN_HPP_NAMESPACE::exchange( m_accelerationStructure, nullptr ); } VULKAN_HPP_NAMESPACE::Device getDevice() const { return m_device; } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * getDispatcher() const { VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); return m_dispatcher; } void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::AccelerationStructureNV & rhs ) VULKAN_HPP_NOEXCEPT { std::swap( m_device, rhs.m_device ); std::swap( m_accelerationStructure, rhs.m_accelerationStructure ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_dispatcher, rhs.m_dispatcher ); } //=== VK_NV_ray_tracing === template VULKAN_HPP_NODISCARD std::vector getHandle( size_t dataSize ) const; template VULKAN_HPP_NODISCARD DataType getHandle() const; private: VULKAN_HPP_NAMESPACE::Device m_device = {}; VULKAN_HPP_NAMESPACE::AccelerationStructureNV m_accelerationStructure = {}; const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; template <> struct isVulkanRAIIHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; class Buffer { public: using CType = VkBuffer; using CppType = VULKAN_HPP_NAMESPACE::Buffer; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eBuffer; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eBuffer; public: # if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) Buffer( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::BufferCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) { *this = device.createBuffer( createInfo, allocator ); } # endif Buffer( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkBuffer buffer, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) : m_device( device ) , m_buffer( buffer ) , m_allocator( static_cast( allocator ) ) , m_dispatcher( device.getDispatcher() ) { } Buffer( std::nullptr_t ) {} ~Buffer() { clear(); } Buffer() = delete; Buffer( Buffer const & ) = delete; Buffer( Buffer && rhs ) VULKAN_HPP_NOEXCEPT : m_device( VULKAN_HPP_NAMESPACE::exchange( rhs.m_device, {} ) ) , m_buffer( VULKAN_HPP_NAMESPACE::exchange( rhs.m_buffer, {} ) ) , m_allocator( VULKAN_HPP_NAMESPACE::exchange( rhs.m_allocator, {} ) ) , m_dispatcher( VULKAN_HPP_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) { } Buffer & operator=( Buffer const & ) = delete; Buffer & operator=( Buffer && rhs ) VULKAN_HPP_NOEXCEPT { if ( this != &rhs ) { std::swap( m_device, rhs.m_device ); std::swap( m_buffer, rhs.m_buffer ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_dispatcher, rhs.m_dispatcher ); } return *this; } VULKAN_HPP_NAMESPACE::Buffer const & operator*() const VULKAN_HPP_NOEXCEPT { return m_buffer; } operator VULKAN_HPP_NAMESPACE::Buffer() const VULKAN_HPP_NOEXCEPT { return m_buffer; } void clear() VULKAN_HPP_NOEXCEPT { if ( m_buffer ) { getDispatcher()->vkDestroyBuffer( static_cast( m_device ), static_cast( m_buffer ), reinterpret_cast( m_allocator ) ); } m_device = nullptr; m_buffer = nullptr; m_allocator = nullptr; m_dispatcher = nullptr; } VULKAN_HPP_NAMESPACE::Buffer release() { m_device = nullptr; m_allocator = nullptr; m_dispatcher = nullptr; return VULKAN_HPP_NAMESPACE::exchange( m_buffer, nullptr ); } VULKAN_HPP_NAMESPACE::Device getDevice() const { return m_device; } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * getDispatcher() const { VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); return m_dispatcher; } void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Buffer & rhs ) VULKAN_HPP_NOEXCEPT { std::swap( m_device, rhs.m_device ); std::swap( m_buffer, rhs.m_buffer ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_dispatcher, rhs.m_dispatcher ); } //=== VK_VERSION_1_0 === void bindMemory( VULKAN_HPP_NAMESPACE::DeviceMemory memory, VULKAN_HPP_NAMESPACE::DeviceSize memoryOffset ) const; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::MemoryRequirements getMemoryRequirements() const VULKAN_HPP_NOEXCEPT; private: VULKAN_HPP_NAMESPACE::Device m_device = {}; VULKAN_HPP_NAMESPACE::Buffer m_buffer = {}; const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; template <> struct isVulkanRAIIHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; # if defined( VK_USE_PLATFORM_FUCHSIA ) class BufferCollectionFUCHSIA { public: using CType = VkBufferCollectionFUCHSIA; using CppType = VULKAN_HPP_NAMESPACE::BufferCollectionFUCHSIA; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eBufferCollectionFUCHSIA; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eBufferCollectionFUCHSIA; public: # if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) BufferCollectionFUCHSIA( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::BufferCollectionCreateInfoFUCHSIA const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) { *this = device.createBufferCollectionFUCHSIA( createInfo, allocator ); } # endif BufferCollectionFUCHSIA( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkBufferCollectionFUCHSIA collection, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) : m_device( device ) , m_collection( collection ) , m_allocator( static_cast( allocator ) ) , m_dispatcher( device.getDispatcher() ) { } BufferCollectionFUCHSIA( std::nullptr_t ) {} ~BufferCollectionFUCHSIA() { clear(); } BufferCollectionFUCHSIA() = delete; BufferCollectionFUCHSIA( BufferCollectionFUCHSIA const & ) = delete; BufferCollectionFUCHSIA( BufferCollectionFUCHSIA && rhs ) VULKAN_HPP_NOEXCEPT : m_device( VULKAN_HPP_NAMESPACE::exchange( rhs.m_device, {} ) ) , m_collection( VULKAN_HPP_NAMESPACE::exchange( rhs.m_collection, {} ) ) , m_allocator( VULKAN_HPP_NAMESPACE::exchange( rhs.m_allocator, {} ) ) , m_dispatcher( VULKAN_HPP_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) { } BufferCollectionFUCHSIA & operator=( BufferCollectionFUCHSIA const & ) = delete; BufferCollectionFUCHSIA & operator=( BufferCollectionFUCHSIA && rhs ) VULKAN_HPP_NOEXCEPT { if ( this != &rhs ) { std::swap( m_device, rhs.m_device ); std::swap( m_collection, rhs.m_collection ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_dispatcher, rhs.m_dispatcher ); } return *this; } VULKAN_HPP_NAMESPACE::BufferCollectionFUCHSIA const & operator*() const VULKAN_HPP_NOEXCEPT { return m_collection; } operator VULKAN_HPP_NAMESPACE::BufferCollectionFUCHSIA() const VULKAN_HPP_NOEXCEPT { return m_collection; } void clear() VULKAN_HPP_NOEXCEPT { if ( m_collection ) { getDispatcher()->vkDestroyBufferCollectionFUCHSIA( static_cast( m_device ), static_cast( m_collection ), reinterpret_cast( m_allocator ) ); } m_device = nullptr; m_collection = nullptr; m_allocator = nullptr; m_dispatcher = nullptr; } VULKAN_HPP_NAMESPACE::BufferCollectionFUCHSIA release() { m_device = nullptr; m_allocator = nullptr; m_dispatcher = nullptr; return VULKAN_HPP_NAMESPACE::exchange( m_collection, nullptr ); } VULKAN_HPP_NAMESPACE::Device getDevice() const { return m_device; } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * getDispatcher() const { VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); return m_dispatcher; } void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::BufferCollectionFUCHSIA & rhs ) VULKAN_HPP_NOEXCEPT { std::swap( m_device, rhs.m_device ); std::swap( m_collection, rhs.m_collection ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_dispatcher, rhs.m_dispatcher ); } //=== VK_FUCHSIA_buffer_collection === void setImageConstraints( const VULKAN_HPP_NAMESPACE::ImageConstraintsInfoFUCHSIA & imageConstraintsInfo ) const; void setBufferConstraints( const VULKAN_HPP_NAMESPACE::BufferConstraintsInfoFUCHSIA & bufferConstraintsInfo ) const; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::BufferCollectionPropertiesFUCHSIA getProperties() const; private: VULKAN_HPP_NAMESPACE::Device m_device = {}; VULKAN_HPP_NAMESPACE::BufferCollectionFUCHSIA m_collection = {}; const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; template <> struct isVulkanRAIIHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; # endif /*VK_USE_PLATFORM_FUCHSIA*/ class BufferView { public: using CType = VkBufferView; using CppType = VULKAN_HPP_NAMESPACE::BufferView; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eBufferView; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eBufferView; public: # if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) BufferView( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::BufferViewCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) { *this = device.createBufferView( createInfo, allocator ); } # endif BufferView( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkBufferView bufferView, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) : m_device( device ) , m_bufferView( bufferView ) , m_allocator( static_cast( allocator ) ) , m_dispatcher( device.getDispatcher() ) { } BufferView( std::nullptr_t ) {} ~BufferView() { clear(); } BufferView() = delete; BufferView( BufferView const & ) = delete; BufferView( BufferView && rhs ) VULKAN_HPP_NOEXCEPT : m_device( VULKAN_HPP_NAMESPACE::exchange( rhs.m_device, {} ) ) , m_bufferView( VULKAN_HPP_NAMESPACE::exchange( rhs.m_bufferView, {} ) ) , m_allocator( VULKAN_HPP_NAMESPACE::exchange( rhs.m_allocator, {} ) ) , m_dispatcher( VULKAN_HPP_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) { } BufferView & operator=( BufferView const & ) = delete; BufferView & operator=( BufferView && rhs ) VULKAN_HPP_NOEXCEPT { if ( this != &rhs ) { std::swap( m_device, rhs.m_device ); std::swap( m_bufferView, rhs.m_bufferView ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_dispatcher, rhs.m_dispatcher ); } return *this; } VULKAN_HPP_NAMESPACE::BufferView const & operator*() const VULKAN_HPP_NOEXCEPT { return m_bufferView; } operator VULKAN_HPP_NAMESPACE::BufferView() const VULKAN_HPP_NOEXCEPT { return m_bufferView; } void clear() VULKAN_HPP_NOEXCEPT { if ( m_bufferView ) { getDispatcher()->vkDestroyBufferView( static_cast( m_device ), static_cast( m_bufferView ), reinterpret_cast( m_allocator ) ); } m_device = nullptr; m_bufferView = nullptr; m_allocator = nullptr; m_dispatcher = nullptr; } VULKAN_HPP_NAMESPACE::BufferView release() { m_device = nullptr; m_allocator = nullptr; m_dispatcher = nullptr; return VULKAN_HPP_NAMESPACE::exchange( m_bufferView, nullptr ); } VULKAN_HPP_NAMESPACE::Device getDevice() const { return m_device; } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * getDispatcher() const { VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); return m_dispatcher; } void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::BufferView & rhs ) VULKAN_HPP_NOEXCEPT { std::swap( m_device, rhs.m_device ); std::swap( m_bufferView, rhs.m_bufferView ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_dispatcher, rhs.m_dispatcher ); } private: VULKAN_HPP_NAMESPACE::Device m_device = {}; VULKAN_HPP_NAMESPACE::BufferView m_bufferView = {}; const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; template <> struct isVulkanRAIIHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; class CommandPool { public: using CType = VkCommandPool; using CppType = VULKAN_HPP_NAMESPACE::CommandPool; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eCommandPool; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eCommandPool; public: # if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) CommandPool( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::CommandPoolCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) { *this = device.createCommandPool( createInfo, allocator ); } # endif CommandPool( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkCommandPool commandPool, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) : m_device( device ) , m_commandPool( commandPool ) , m_allocator( static_cast( allocator ) ) , m_dispatcher( device.getDispatcher() ) { } CommandPool( std::nullptr_t ) {} ~CommandPool() { clear(); } CommandPool() = delete; CommandPool( CommandPool const & ) = delete; CommandPool( CommandPool && rhs ) VULKAN_HPP_NOEXCEPT : m_device( VULKAN_HPP_NAMESPACE::exchange( rhs.m_device, {} ) ) , m_commandPool( VULKAN_HPP_NAMESPACE::exchange( rhs.m_commandPool, {} ) ) , m_allocator( VULKAN_HPP_NAMESPACE::exchange( rhs.m_allocator, {} ) ) , m_dispatcher( VULKAN_HPP_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) { } CommandPool & operator=( CommandPool const & ) = delete; CommandPool & operator=( CommandPool && rhs ) VULKAN_HPP_NOEXCEPT { if ( this != &rhs ) { std::swap( m_device, rhs.m_device ); std::swap( m_commandPool, rhs.m_commandPool ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_dispatcher, rhs.m_dispatcher ); } return *this; } VULKAN_HPP_NAMESPACE::CommandPool const & operator*() const VULKAN_HPP_NOEXCEPT { return m_commandPool; } operator VULKAN_HPP_NAMESPACE::CommandPool() const VULKAN_HPP_NOEXCEPT { return m_commandPool; } void clear() VULKAN_HPP_NOEXCEPT { if ( m_commandPool ) { getDispatcher()->vkDestroyCommandPool( static_cast( m_device ), static_cast( m_commandPool ), reinterpret_cast( m_allocator ) ); } m_device = nullptr; m_commandPool = nullptr; m_allocator = nullptr; m_dispatcher = nullptr; } VULKAN_HPP_NAMESPACE::CommandPool release() { m_device = nullptr; m_allocator = nullptr; m_dispatcher = nullptr; return VULKAN_HPP_NAMESPACE::exchange( m_commandPool, nullptr ); } VULKAN_HPP_NAMESPACE::Device getDevice() const { return m_device; } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * getDispatcher() const { VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); return m_dispatcher; } void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CommandPool & rhs ) VULKAN_HPP_NOEXCEPT { std::swap( m_device, rhs.m_device ); std::swap( m_commandPool, rhs.m_commandPool ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_dispatcher, rhs.m_dispatcher ); } //=== VK_VERSION_1_0 === void reset( VULKAN_HPP_NAMESPACE::CommandPoolResetFlags flags VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT ) const; //=== VK_VERSION_1_1 === void trim( VULKAN_HPP_NAMESPACE::CommandPoolTrimFlags flags VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; //=== VK_KHR_maintenance1 === void trimKHR( VULKAN_HPP_NAMESPACE::CommandPoolTrimFlags flags VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; private: VULKAN_HPP_NAMESPACE::Device m_device = {}; VULKAN_HPP_NAMESPACE::CommandPool m_commandPool = {}; const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; template <> struct isVulkanRAIIHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; class CommandBuffer { public: using CType = VkCommandBuffer; using CppType = VULKAN_HPP_NAMESPACE::CommandBuffer; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eCommandBuffer; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eCommandBuffer; public: CommandBuffer( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkCommandBuffer commandBuffer, VkCommandPool commandPool ) : m_device( device ), m_commandPool( commandPool ), m_commandBuffer( commandBuffer ), m_dispatcher( device.getDispatcher() ) { } CommandBuffer( std::nullptr_t ) {} ~CommandBuffer() { clear(); } CommandBuffer() = delete; CommandBuffer( CommandBuffer const & ) = delete; CommandBuffer( CommandBuffer && rhs ) VULKAN_HPP_NOEXCEPT : m_device( VULKAN_HPP_NAMESPACE::exchange( rhs.m_device, {} ) ) , m_commandPool( VULKAN_HPP_NAMESPACE::exchange( rhs.m_commandPool, {} ) ) , m_commandBuffer( VULKAN_HPP_NAMESPACE::exchange( rhs.m_commandBuffer, {} ) ) , m_dispatcher( VULKAN_HPP_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) { } CommandBuffer & operator=( CommandBuffer const & ) = delete; CommandBuffer & operator=( CommandBuffer && rhs ) VULKAN_HPP_NOEXCEPT { if ( this != &rhs ) { std::swap( m_device, rhs.m_device ); std::swap( m_commandPool, rhs.m_commandPool ); std::swap( m_commandBuffer, rhs.m_commandBuffer ); std::swap( m_dispatcher, rhs.m_dispatcher ); } return *this; } VULKAN_HPP_NAMESPACE::CommandBuffer const & operator*() const VULKAN_HPP_NOEXCEPT { return m_commandBuffer; } operator VULKAN_HPP_NAMESPACE::CommandBuffer() const VULKAN_HPP_NOEXCEPT { return m_commandBuffer; } void clear() VULKAN_HPP_NOEXCEPT { if ( m_commandBuffer ) { getDispatcher()->vkFreeCommandBuffers( static_cast( m_device ), static_cast( m_commandPool ), 1, reinterpret_cast( &m_commandBuffer ) ); } m_device = nullptr; m_commandPool = nullptr; m_commandBuffer = nullptr; m_dispatcher = nullptr; } VULKAN_HPP_NAMESPACE::CommandBuffer release() { m_device = nullptr; m_commandPool = nullptr; m_dispatcher = nullptr; return VULKAN_HPP_NAMESPACE::exchange( m_commandBuffer, nullptr ); } VULKAN_HPP_NAMESPACE::Device getDevice() const { return m_device; } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * getDispatcher() const { VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); return m_dispatcher; } void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CommandBuffer & rhs ) VULKAN_HPP_NOEXCEPT { std::swap( m_device, rhs.m_device ); std::swap( m_commandPool, rhs.m_commandPool ); std::swap( m_commandBuffer, rhs.m_commandBuffer ); std::swap( m_dispatcher, rhs.m_dispatcher ); } //=== VK_VERSION_1_0 === void begin( const VULKAN_HPP_NAMESPACE::CommandBufferBeginInfo & beginInfo ) const; void end() const; void reset( VULKAN_HPP_NAMESPACE::CommandBufferResetFlags flags VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT ) const; void bindPipeline( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint, VULKAN_HPP_NAMESPACE::Pipeline pipeline ) const VULKAN_HPP_NOEXCEPT; void setViewport( uint32_t firstViewport, VULKAN_HPP_NAMESPACE::ArrayProxy const & viewports ) const VULKAN_HPP_NOEXCEPT; void setScissor( uint32_t firstScissor, VULKAN_HPP_NAMESPACE::ArrayProxy const & scissors ) const VULKAN_HPP_NOEXCEPT; void setLineWidth( float lineWidth ) const VULKAN_HPP_NOEXCEPT; void setDepthBias( float depthBiasConstantFactor, float depthBiasClamp, float depthBiasSlopeFactor ) const VULKAN_HPP_NOEXCEPT; void setBlendConstants( const float blendConstants[4] ) const VULKAN_HPP_NOEXCEPT; void setDepthBounds( float minDepthBounds, float maxDepthBounds ) const VULKAN_HPP_NOEXCEPT; void setStencilCompareMask( VULKAN_HPP_NAMESPACE::StencilFaceFlags faceMask, uint32_t compareMask ) const VULKAN_HPP_NOEXCEPT; void setStencilWriteMask( VULKAN_HPP_NAMESPACE::StencilFaceFlags faceMask, uint32_t writeMask ) const VULKAN_HPP_NOEXCEPT; void setStencilReference( VULKAN_HPP_NAMESPACE::StencilFaceFlags faceMask, uint32_t reference ) const VULKAN_HPP_NOEXCEPT; void bindDescriptorSets( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint, VULKAN_HPP_NAMESPACE::PipelineLayout layout, uint32_t firstSet, VULKAN_HPP_NAMESPACE::ArrayProxy const & descriptorSets, VULKAN_HPP_NAMESPACE::ArrayProxy const & dynamicOffsets ) const VULKAN_HPP_NOEXCEPT; void bindIndexBuffer( VULKAN_HPP_NAMESPACE::Buffer buffer, VULKAN_HPP_NAMESPACE::DeviceSize offset, VULKAN_HPP_NAMESPACE::IndexType indexType ) const VULKAN_HPP_NOEXCEPT; void bindVertexBuffers( uint32_t firstBinding, VULKAN_HPP_NAMESPACE::ArrayProxy const & buffers, VULKAN_HPP_NAMESPACE::ArrayProxy const & offsets ) const; void draw( uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance ) const VULKAN_HPP_NOEXCEPT; void drawIndexed( uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, int32_t vertexOffset, uint32_t firstInstance ) const VULKAN_HPP_NOEXCEPT; void drawIndirect( VULKAN_HPP_NAMESPACE::Buffer buffer, VULKAN_HPP_NAMESPACE::DeviceSize offset, uint32_t drawCount, uint32_t stride ) const VULKAN_HPP_NOEXCEPT; void drawIndexedIndirect( VULKAN_HPP_NAMESPACE::Buffer buffer, VULKAN_HPP_NAMESPACE::DeviceSize offset, uint32_t drawCount, uint32_t stride ) const VULKAN_HPP_NOEXCEPT; void dispatch( uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ ) const VULKAN_HPP_NOEXCEPT; void dispatchIndirect( VULKAN_HPP_NAMESPACE::Buffer buffer, VULKAN_HPP_NAMESPACE::DeviceSize offset ) const VULKAN_HPP_NOEXCEPT; void copyBuffer( VULKAN_HPP_NAMESPACE::Buffer srcBuffer, VULKAN_HPP_NAMESPACE::Buffer dstBuffer, VULKAN_HPP_NAMESPACE::ArrayProxy const & regions ) const VULKAN_HPP_NOEXCEPT; void copyImage( VULKAN_HPP_NAMESPACE::Image srcImage, VULKAN_HPP_NAMESPACE::ImageLayout srcImageLayout, VULKAN_HPP_NAMESPACE::Image dstImage, VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout, VULKAN_HPP_NAMESPACE::ArrayProxy const & regions ) const VULKAN_HPP_NOEXCEPT; void blitImage( VULKAN_HPP_NAMESPACE::Image srcImage, VULKAN_HPP_NAMESPACE::ImageLayout srcImageLayout, VULKAN_HPP_NAMESPACE::Image dstImage, VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout, VULKAN_HPP_NAMESPACE::ArrayProxy const & regions, VULKAN_HPP_NAMESPACE::Filter filter ) const VULKAN_HPP_NOEXCEPT; void copyBufferToImage( VULKAN_HPP_NAMESPACE::Buffer srcBuffer, VULKAN_HPP_NAMESPACE::Image dstImage, VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout, VULKAN_HPP_NAMESPACE::ArrayProxy const & regions ) const VULKAN_HPP_NOEXCEPT; void copyImageToBuffer( VULKAN_HPP_NAMESPACE::Image srcImage, VULKAN_HPP_NAMESPACE::ImageLayout srcImageLayout, VULKAN_HPP_NAMESPACE::Buffer dstBuffer, VULKAN_HPP_NAMESPACE::ArrayProxy const & regions ) const VULKAN_HPP_NOEXCEPT; template void updateBuffer( VULKAN_HPP_NAMESPACE::Buffer dstBuffer, VULKAN_HPP_NAMESPACE::DeviceSize dstOffset, VULKAN_HPP_NAMESPACE::ArrayProxy const & data ) const VULKAN_HPP_NOEXCEPT; void fillBuffer( VULKAN_HPP_NAMESPACE::Buffer dstBuffer, VULKAN_HPP_NAMESPACE::DeviceSize dstOffset, VULKAN_HPP_NAMESPACE::DeviceSize size, uint32_t data ) const VULKAN_HPP_NOEXCEPT; void clearColorImage( VULKAN_HPP_NAMESPACE::Image image, VULKAN_HPP_NAMESPACE::ImageLayout imageLayout, const VULKAN_HPP_NAMESPACE::ClearColorValue & color, VULKAN_HPP_NAMESPACE::ArrayProxy const & ranges ) const VULKAN_HPP_NOEXCEPT; void clearDepthStencilImage( VULKAN_HPP_NAMESPACE::Image image, VULKAN_HPP_NAMESPACE::ImageLayout imageLayout, const VULKAN_HPP_NAMESPACE::ClearDepthStencilValue & depthStencil, VULKAN_HPP_NAMESPACE::ArrayProxy const & ranges ) const VULKAN_HPP_NOEXCEPT; void clearAttachments( VULKAN_HPP_NAMESPACE::ArrayProxy const & attachments, VULKAN_HPP_NAMESPACE::ArrayProxy const & rects ) const VULKAN_HPP_NOEXCEPT; void resolveImage( VULKAN_HPP_NAMESPACE::Image srcImage, VULKAN_HPP_NAMESPACE::ImageLayout srcImageLayout, VULKAN_HPP_NAMESPACE::Image dstImage, VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout, VULKAN_HPP_NAMESPACE::ArrayProxy const & regions ) const VULKAN_HPP_NOEXCEPT; void setEvent( VULKAN_HPP_NAMESPACE::Event event, VULKAN_HPP_NAMESPACE::PipelineStageFlags stageMask VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; void resetEvent( VULKAN_HPP_NAMESPACE::Event event, VULKAN_HPP_NAMESPACE::PipelineStageFlags stageMask VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; void waitEvents( VULKAN_HPP_NAMESPACE::ArrayProxy const & events, VULKAN_HPP_NAMESPACE::PipelineStageFlags srcStageMask, VULKAN_HPP_NAMESPACE::PipelineStageFlags dstStageMask, VULKAN_HPP_NAMESPACE::ArrayProxy const & memoryBarriers, VULKAN_HPP_NAMESPACE::ArrayProxy const & bufferMemoryBarriers, VULKAN_HPP_NAMESPACE::ArrayProxy const & imageMemoryBarriers ) const VULKAN_HPP_NOEXCEPT; void pipelineBarrier( VULKAN_HPP_NAMESPACE::PipelineStageFlags srcStageMask, VULKAN_HPP_NAMESPACE::PipelineStageFlags dstStageMask, VULKAN_HPP_NAMESPACE::DependencyFlags dependencyFlags, VULKAN_HPP_NAMESPACE::ArrayProxy const & memoryBarriers, VULKAN_HPP_NAMESPACE::ArrayProxy const & bufferMemoryBarriers, VULKAN_HPP_NAMESPACE::ArrayProxy const & imageMemoryBarriers ) const VULKAN_HPP_NOEXCEPT; void beginQuery( VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t query, VULKAN_HPP_NAMESPACE::QueryControlFlags flags VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; void endQuery( VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t query ) const VULKAN_HPP_NOEXCEPT; void resetQueryPool( VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount ) const VULKAN_HPP_NOEXCEPT; void writeTimestamp( VULKAN_HPP_NAMESPACE::PipelineStageFlagBits pipelineStage, VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t query ) const VULKAN_HPP_NOEXCEPT; void copyQueryPoolResults( VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, VULKAN_HPP_NAMESPACE::Buffer dstBuffer, VULKAN_HPP_NAMESPACE::DeviceSize dstOffset, VULKAN_HPP_NAMESPACE::DeviceSize stride, VULKAN_HPP_NAMESPACE::QueryResultFlags flags VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; template void pushConstants( VULKAN_HPP_NAMESPACE::PipelineLayout layout, VULKAN_HPP_NAMESPACE::ShaderStageFlags stageFlags, uint32_t offset, VULKAN_HPP_NAMESPACE::ArrayProxy const & values ) const VULKAN_HPP_NOEXCEPT; void beginRenderPass( const VULKAN_HPP_NAMESPACE::RenderPassBeginInfo & renderPassBegin, VULKAN_HPP_NAMESPACE::SubpassContents contents ) const VULKAN_HPP_NOEXCEPT; void nextSubpass( VULKAN_HPP_NAMESPACE::SubpassContents contents ) const VULKAN_HPP_NOEXCEPT; void endRenderPass() const VULKAN_HPP_NOEXCEPT; void executeCommands( VULKAN_HPP_NAMESPACE::ArrayProxy const & commandBuffers ) const VULKAN_HPP_NOEXCEPT; //=== VK_VERSION_1_1 === void setDeviceMask( uint32_t deviceMask ) const VULKAN_HPP_NOEXCEPT; void dispatchBase( uint32_t baseGroupX, uint32_t baseGroupY, uint32_t baseGroupZ, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ ) const VULKAN_HPP_NOEXCEPT; //=== VK_VERSION_1_2 === void drawIndirectCount( VULKAN_HPP_NAMESPACE::Buffer buffer, VULKAN_HPP_NAMESPACE::DeviceSize offset, VULKAN_HPP_NAMESPACE::Buffer countBuffer, VULKAN_HPP_NAMESPACE::DeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride ) const VULKAN_HPP_NOEXCEPT; void drawIndexedIndirectCount( VULKAN_HPP_NAMESPACE::Buffer buffer, VULKAN_HPP_NAMESPACE::DeviceSize offset, VULKAN_HPP_NAMESPACE::Buffer countBuffer, VULKAN_HPP_NAMESPACE::DeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride ) const VULKAN_HPP_NOEXCEPT; void beginRenderPass2( const VULKAN_HPP_NAMESPACE::RenderPassBeginInfo & renderPassBegin, const VULKAN_HPP_NAMESPACE::SubpassBeginInfo & subpassBeginInfo ) const VULKAN_HPP_NOEXCEPT; void nextSubpass2( const VULKAN_HPP_NAMESPACE::SubpassBeginInfo & subpassBeginInfo, const VULKAN_HPP_NAMESPACE::SubpassEndInfo & subpassEndInfo ) const VULKAN_HPP_NOEXCEPT; void endRenderPass2( const VULKAN_HPP_NAMESPACE::SubpassEndInfo & subpassEndInfo ) const VULKAN_HPP_NOEXCEPT; //=== VK_VERSION_1_3 === void setEvent2( VULKAN_HPP_NAMESPACE::Event event, const VULKAN_HPP_NAMESPACE::DependencyInfo & dependencyInfo ) const VULKAN_HPP_NOEXCEPT; void resetEvent2( VULKAN_HPP_NAMESPACE::Event event, VULKAN_HPP_NAMESPACE::PipelineStageFlags2 stageMask VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; void waitEvents2( VULKAN_HPP_NAMESPACE::ArrayProxy const & events, VULKAN_HPP_NAMESPACE::ArrayProxy const & dependencyInfos ) const; void pipelineBarrier2( const VULKAN_HPP_NAMESPACE::DependencyInfo & dependencyInfo ) const VULKAN_HPP_NOEXCEPT; void writeTimestamp2( VULKAN_HPP_NAMESPACE::PipelineStageFlags2 stage, VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t query ) const VULKAN_HPP_NOEXCEPT; void copyBuffer2( const VULKAN_HPP_NAMESPACE::CopyBufferInfo2 & copyBufferInfo ) const VULKAN_HPP_NOEXCEPT; void copyImage2( const VULKAN_HPP_NAMESPACE::CopyImageInfo2 & copyImageInfo ) const VULKAN_HPP_NOEXCEPT; void copyBufferToImage2( const VULKAN_HPP_NAMESPACE::CopyBufferToImageInfo2 & copyBufferToImageInfo ) const VULKAN_HPP_NOEXCEPT; void copyImageToBuffer2( const VULKAN_HPP_NAMESPACE::CopyImageToBufferInfo2 & copyImageToBufferInfo ) const VULKAN_HPP_NOEXCEPT; void blitImage2( const VULKAN_HPP_NAMESPACE::BlitImageInfo2 & blitImageInfo ) const VULKAN_HPP_NOEXCEPT; void resolveImage2( const VULKAN_HPP_NAMESPACE::ResolveImageInfo2 & resolveImageInfo ) const VULKAN_HPP_NOEXCEPT; void beginRendering( const VULKAN_HPP_NAMESPACE::RenderingInfo & renderingInfo ) const VULKAN_HPP_NOEXCEPT; void endRendering() const VULKAN_HPP_NOEXCEPT; void setCullMode( VULKAN_HPP_NAMESPACE::CullModeFlags cullMode VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; void setFrontFace( VULKAN_HPP_NAMESPACE::FrontFace frontFace ) const VULKAN_HPP_NOEXCEPT; void setPrimitiveTopology( VULKAN_HPP_NAMESPACE::PrimitiveTopology primitiveTopology ) const VULKAN_HPP_NOEXCEPT; void setViewportWithCount( VULKAN_HPP_NAMESPACE::ArrayProxy const & viewports ) const VULKAN_HPP_NOEXCEPT; void setScissorWithCount( VULKAN_HPP_NAMESPACE::ArrayProxy const & scissors ) const VULKAN_HPP_NOEXCEPT; void bindVertexBuffers2( uint32_t firstBinding, VULKAN_HPP_NAMESPACE::ArrayProxy const & buffers, VULKAN_HPP_NAMESPACE::ArrayProxy const & offsets, VULKAN_HPP_NAMESPACE::ArrayProxy const & sizes VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, VULKAN_HPP_NAMESPACE::ArrayProxy const & strides VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT ) const; void setDepthTestEnable( VULKAN_HPP_NAMESPACE::Bool32 depthTestEnable ) const VULKAN_HPP_NOEXCEPT; void setDepthWriteEnable( VULKAN_HPP_NAMESPACE::Bool32 depthWriteEnable ) const VULKAN_HPP_NOEXCEPT; void setDepthCompareOp( VULKAN_HPP_NAMESPACE::CompareOp depthCompareOp ) const VULKAN_HPP_NOEXCEPT; void setDepthBoundsTestEnable( VULKAN_HPP_NAMESPACE::Bool32 depthBoundsTestEnable ) const VULKAN_HPP_NOEXCEPT; void setStencilTestEnable( VULKAN_HPP_NAMESPACE::Bool32 stencilTestEnable ) const VULKAN_HPP_NOEXCEPT; void setStencilOp( VULKAN_HPP_NAMESPACE::StencilFaceFlags faceMask, VULKAN_HPP_NAMESPACE::StencilOp failOp, VULKAN_HPP_NAMESPACE::StencilOp passOp, VULKAN_HPP_NAMESPACE::StencilOp depthFailOp, VULKAN_HPP_NAMESPACE::CompareOp compareOp ) const VULKAN_HPP_NOEXCEPT; void setRasterizerDiscardEnable( VULKAN_HPP_NAMESPACE::Bool32 rasterizerDiscardEnable ) const VULKAN_HPP_NOEXCEPT; void setDepthBiasEnable( VULKAN_HPP_NAMESPACE::Bool32 depthBiasEnable ) const VULKAN_HPP_NOEXCEPT; void setPrimitiveRestartEnable( VULKAN_HPP_NAMESPACE::Bool32 primitiveRestartEnable ) const VULKAN_HPP_NOEXCEPT; //=== VK_VERSION_1_4 === void setLineStipple( uint32_t lineStippleFactor, uint16_t lineStipplePattern ) const VULKAN_HPP_NOEXCEPT; void bindIndexBuffer2( VULKAN_HPP_NAMESPACE::Buffer buffer, VULKAN_HPP_NAMESPACE::DeviceSize offset, VULKAN_HPP_NAMESPACE::DeviceSize size, VULKAN_HPP_NAMESPACE::IndexType indexType ) const VULKAN_HPP_NOEXCEPT; void pushDescriptorSet( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint, VULKAN_HPP_NAMESPACE::PipelineLayout layout, uint32_t set, VULKAN_HPP_NAMESPACE::ArrayProxy const & descriptorWrites ) const VULKAN_HPP_NOEXCEPT; template void pushDescriptorSetWithTemplate( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate, VULKAN_HPP_NAMESPACE::PipelineLayout layout, uint32_t set, DataType const & data ) const VULKAN_HPP_NOEXCEPT; void setRenderingAttachmentLocations( const VULKAN_HPP_NAMESPACE::RenderingAttachmentLocationInfo & locationInfo ) const VULKAN_HPP_NOEXCEPT; void setRenderingInputAttachmentIndices( const VULKAN_HPP_NAMESPACE::RenderingInputAttachmentIndexInfo & inputAttachmentIndexInfo ) const VULKAN_HPP_NOEXCEPT; void bindDescriptorSets2( const VULKAN_HPP_NAMESPACE::BindDescriptorSetsInfo & bindDescriptorSetsInfo ) const VULKAN_HPP_NOEXCEPT; void pushConstants2( const VULKAN_HPP_NAMESPACE::PushConstantsInfo & pushConstantsInfo ) const VULKAN_HPP_NOEXCEPT; void pushDescriptorSet2( const VULKAN_HPP_NAMESPACE::PushDescriptorSetInfo & pushDescriptorSetInfo ) const VULKAN_HPP_NOEXCEPT; void pushDescriptorSetWithTemplate2( const VULKAN_HPP_NAMESPACE::PushDescriptorSetWithTemplateInfo & pushDescriptorSetWithTemplateInfo ) const VULKAN_HPP_NOEXCEPT; //=== VK_EXT_debug_marker === void debugMarkerBeginEXT( const VULKAN_HPP_NAMESPACE::DebugMarkerMarkerInfoEXT & markerInfo ) const VULKAN_HPP_NOEXCEPT; void debugMarkerEndEXT() const VULKAN_HPP_NOEXCEPT; void debugMarkerInsertEXT( const VULKAN_HPP_NAMESPACE::DebugMarkerMarkerInfoEXT & markerInfo ) const VULKAN_HPP_NOEXCEPT; //=== VK_KHR_video_queue === void beginVideoCodingKHR( const VULKAN_HPP_NAMESPACE::VideoBeginCodingInfoKHR & beginInfo ) const VULKAN_HPP_NOEXCEPT; void endVideoCodingKHR( const VULKAN_HPP_NAMESPACE::VideoEndCodingInfoKHR & endCodingInfo ) const VULKAN_HPP_NOEXCEPT; void controlVideoCodingKHR( const VULKAN_HPP_NAMESPACE::VideoCodingControlInfoKHR & codingControlInfo ) const VULKAN_HPP_NOEXCEPT; //=== VK_KHR_video_decode_queue === void decodeVideoKHR( const VULKAN_HPP_NAMESPACE::VideoDecodeInfoKHR & decodeInfo ) const VULKAN_HPP_NOEXCEPT; //=== VK_EXT_transform_feedback === void bindTransformFeedbackBuffersEXT( uint32_t firstBinding, VULKAN_HPP_NAMESPACE::ArrayProxy const & buffers, VULKAN_HPP_NAMESPACE::ArrayProxy const & offsets, VULKAN_HPP_NAMESPACE::ArrayProxy const & sizes VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT ) const; void beginTransformFeedbackEXT( uint32_t firstCounterBuffer, VULKAN_HPP_NAMESPACE::ArrayProxy const & counterBuffers, VULKAN_HPP_NAMESPACE::ArrayProxy const & counterBufferOffsets VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT ) const; void endTransformFeedbackEXT( uint32_t firstCounterBuffer, VULKAN_HPP_NAMESPACE::ArrayProxy const & counterBuffers, VULKAN_HPP_NAMESPACE::ArrayProxy const & counterBufferOffsets VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT ) const; void beginQueryIndexedEXT( VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t query, VULKAN_HPP_NAMESPACE::QueryControlFlags flags, uint32_t index ) const VULKAN_HPP_NOEXCEPT; void endQueryIndexedEXT( VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t query, uint32_t index ) const VULKAN_HPP_NOEXCEPT; void drawIndirectByteCountEXT( uint32_t instanceCount, uint32_t firstInstance, VULKAN_HPP_NAMESPACE::Buffer counterBuffer, VULKAN_HPP_NAMESPACE::DeviceSize counterBufferOffset, uint32_t counterOffset, uint32_t vertexStride ) const VULKAN_HPP_NOEXCEPT; //=== VK_NVX_binary_import === void cuLaunchKernelNVX( const VULKAN_HPP_NAMESPACE::CuLaunchInfoNVX & launchInfo ) const VULKAN_HPP_NOEXCEPT; //=== VK_AMD_draw_indirect_count === void drawIndirectCountAMD( VULKAN_HPP_NAMESPACE::Buffer buffer, VULKAN_HPP_NAMESPACE::DeviceSize offset, VULKAN_HPP_NAMESPACE::Buffer countBuffer, VULKAN_HPP_NAMESPACE::DeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride ) const VULKAN_HPP_NOEXCEPT; void drawIndexedIndirectCountAMD( VULKAN_HPP_NAMESPACE::Buffer buffer, VULKAN_HPP_NAMESPACE::DeviceSize offset, VULKAN_HPP_NAMESPACE::Buffer countBuffer, VULKAN_HPP_NAMESPACE::DeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride ) const VULKAN_HPP_NOEXCEPT; //=== VK_KHR_dynamic_rendering === void beginRenderingKHR( const VULKAN_HPP_NAMESPACE::RenderingInfo & renderingInfo ) const VULKAN_HPP_NOEXCEPT; void endRenderingKHR() const VULKAN_HPP_NOEXCEPT; //=== VK_KHR_device_group === void setDeviceMaskKHR( uint32_t deviceMask ) const VULKAN_HPP_NOEXCEPT; void dispatchBaseKHR( uint32_t baseGroupX, uint32_t baseGroupY, uint32_t baseGroupZ, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ ) const VULKAN_HPP_NOEXCEPT; //=== VK_KHR_push_descriptor === void pushDescriptorSetKHR( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint, VULKAN_HPP_NAMESPACE::PipelineLayout layout, uint32_t set, VULKAN_HPP_NAMESPACE::ArrayProxy const & descriptorWrites ) const VULKAN_HPP_NOEXCEPT; template void pushDescriptorSetWithTemplateKHR( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate, VULKAN_HPP_NAMESPACE::PipelineLayout layout, uint32_t set, DataType const & data ) const VULKAN_HPP_NOEXCEPT; //=== VK_EXT_conditional_rendering === void beginConditionalRenderingEXT( const VULKAN_HPP_NAMESPACE::ConditionalRenderingBeginInfoEXT & conditionalRenderingBegin ) const VULKAN_HPP_NOEXCEPT; void endConditionalRenderingEXT() const VULKAN_HPP_NOEXCEPT; //=== VK_NV_clip_space_w_scaling === void setViewportWScalingNV( uint32_t firstViewport, VULKAN_HPP_NAMESPACE::ArrayProxy const & viewportWScalings ) const VULKAN_HPP_NOEXCEPT; //=== VK_EXT_discard_rectangles === void setDiscardRectangleEXT( uint32_t firstDiscardRectangle, VULKAN_HPP_NAMESPACE::ArrayProxy const & discardRectangles ) const VULKAN_HPP_NOEXCEPT; void setDiscardRectangleEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 discardRectangleEnable ) const VULKAN_HPP_NOEXCEPT; void setDiscardRectangleModeEXT( VULKAN_HPP_NAMESPACE::DiscardRectangleModeEXT discardRectangleMode ) const VULKAN_HPP_NOEXCEPT; //=== VK_KHR_create_renderpass2 === void beginRenderPass2KHR( const VULKAN_HPP_NAMESPACE::RenderPassBeginInfo & renderPassBegin, const VULKAN_HPP_NAMESPACE::SubpassBeginInfo & subpassBeginInfo ) const VULKAN_HPP_NOEXCEPT; void nextSubpass2KHR( const VULKAN_HPP_NAMESPACE::SubpassBeginInfo & subpassBeginInfo, const VULKAN_HPP_NAMESPACE::SubpassEndInfo & subpassEndInfo ) const VULKAN_HPP_NOEXCEPT; void endRenderPass2KHR( const VULKAN_HPP_NAMESPACE::SubpassEndInfo & subpassEndInfo ) const VULKAN_HPP_NOEXCEPT; //=== VK_EXT_debug_utils === void beginDebugUtilsLabelEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsLabelEXT & labelInfo ) const VULKAN_HPP_NOEXCEPT; void endDebugUtilsLabelEXT() const VULKAN_HPP_NOEXCEPT; void insertDebugUtilsLabelEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsLabelEXT & labelInfo ) const VULKAN_HPP_NOEXCEPT; # if defined( VK_ENABLE_BETA_EXTENSIONS ) //=== VK_AMDX_shader_enqueue === void initializeGraphScratchMemoryAMDX( VULKAN_HPP_NAMESPACE::Pipeline executionGraph, VULKAN_HPP_NAMESPACE::DeviceAddress scratch, VULKAN_HPP_NAMESPACE::DeviceSize scratchSize ) const VULKAN_HPP_NOEXCEPT; void dispatchGraphAMDX( VULKAN_HPP_NAMESPACE::DeviceAddress scratch, VULKAN_HPP_NAMESPACE::DeviceSize scratchSize, const VULKAN_HPP_NAMESPACE::DispatchGraphCountInfoAMDX & countInfo ) const VULKAN_HPP_NOEXCEPT; void dispatchGraphIndirectAMDX( VULKAN_HPP_NAMESPACE::DeviceAddress scratch, VULKAN_HPP_NAMESPACE::DeviceSize scratchSize, const VULKAN_HPP_NAMESPACE::DispatchGraphCountInfoAMDX & countInfo ) const VULKAN_HPP_NOEXCEPT; void dispatchGraphIndirectCountAMDX( VULKAN_HPP_NAMESPACE::DeviceAddress scratch, VULKAN_HPP_NAMESPACE::DeviceSize scratchSize, VULKAN_HPP_NAMESPACE::DeviceAddress countInfo ) const VULKAN_HPP_NOEXCEPT; # endif /*VK_ENABLE_BETA_EXTENSIONS*/ //=== VK_EXT_sample_locations === void setSampleLocationsEXT( const VULKAN_HPP_NAMESPACE::SampleLocationsInfoEXT & sampleLocationsInfo ) const VULKAN_HPP_NOEXCEPT; //=== VK_KHR_acceleration_structure === void buildAccelerationStructuresKHR( VULKAN_HPP_NAMESPACE::ArrayProxy const & infos, VULKAN_HPP_NAMESPACE::ArrayProxy const & pBuildRangeInfos ) const; void buildAccelerationStructuresIndirectKHR( VULKAN_HPP_NAMESPACE::ArrayProxy const & infos, VULKAN_HPP_NAMESPACE::ArrayProxy const & indirectDeviceAddresses, VULKAN_HPP_NAMESPACE::ArrayProxy const & indirectStrides, VULKAN_HPP_NAMESPACE::ArrayProxy const & pMaxPrimitiveCounts ) const; void copyAccelerationStructureKHR( const VULKAN_HPP_NAMESPACE::CopyAccelerationStructureInfoKHR & info ) const VULKAN_HPP_NOEXCEPT; void copyAccelerationStructureToMemoryKHR( const VULKAN_HPP_NAMESPACE::CopyAccelerationStructureToMemoryInfoKHR & info ) const VULKAN_HPP_NOEXCEPT; void copyMemoryToAccelerationStructureKHR( const VULKAN_HPP_NAMESPACE::CopyMemoryToAccelerationStructureInfoKHR & info ) const VULKAN_HPP_NOEXCEPT; void writeAccelerationStructuresPropertiesKHR( VULKAN_HPP_NAMESPACE::ArrayProxy const & accelerationStructures, VULKAN_HPP_NAMESPACE::QueryType queryType, VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t firstQuery ) const VULKAN_HPP_NOEXCEPT; //=== VK_KHR_ray_tracing_pipeline === void traceRaysKHR( const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR & raygenShaderBindingTable, const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR & missShaderBindingTable, const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR & hitShaderBindingTable, const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR & callableShaderBindingTable, uint32_t width, uint32_t height, uint32_t depth ) const VULKAN_HPP_NOEXCEPT; void traceRaysIndirectKHR( const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR & raygenShaderBindingTable, const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR & missShaderBindingTable, const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR & hitShaderBindingTable, const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR & callableShaderBindingTable, VULKAN_HPP_NAMESPACE::DeviceAddress indirectDeviceAddress ) const VULKAN_HPP_NOEXCEPT; void setRayTracingPipelineStackSizeKHR( uint32_t pipelineStackSize ) const VULKAN_HPP_NOEXCEPT; //=== VK_NV_shading_rate_image === void bindShadingRateImageNV( VULKAN_HPP_NAMESPACE::ImageView imageView, VULKAN_HPP_NAMESPACE::ImageLayout imageLayout ) const VULKAN_HPP_NOEXCEPT; void setViewportShadingRatePaletteNV( uint32_t firstViewport, VULKAN_HPP_NAMESPACE::ArrayProxy const & shadingRatePalettes ) const VULKAN_HPP_NOEXCEPT; void setCoarseSampleOrderNV( VULKAN_HPP_NAMESPACE::CoarseSampleOrderTypeNV sampleOrderType, VULKAN_HPP_NAMESPACE::ArrayProxy const & customSampleOrders ) const VULKAN_HPP_NOEXCEPT; //=== VK_NV_ray_tracing === void buildAccelerationStructureNV( const VULKAN_HPP_NAMESPACE::AccelerationStructureInfoNV & info, VULKAN_HPP_NAMESPACE::Buffer instanceData, VULKAN_HPP_NAMESPACE::DeviceSize instanceOffset, VULKAN_HPP_NAMESPACE::Bool32 update, VULKAN_HPP_NAMESPACE::AccelerationStructureNV dst, VULKAN_HPP_NAMESPACE::AccelerationStructureNV src, VULKAN_HPP_NAMESPACE::Buffer scratch, VULKAN_HPP_NAMESPACE::DeviceSize scratchOffset ) const VULKAN_HPP_NOEXCEPT; void copyAccelerationStructureNV( VULKAN_HPP_NAMESPACE::AccelerationStructureNV dst, VULKAN_HPP_NAMESPACE::AccelerationStructureNV src, VULKAN_HPP_NAMESPACE::CopyAccelerationStructureModeKHR mode ) const VULKAN_HPP_NOEXCEPT; void traceRaysNV( VULKAN_HPP_NAMESPACE::Buffer raygenShaderBindingTableBuffer, VULKAN_HPP_NAMESPACE::DeviceSize raygenShaderBindingOffset, VULKAN_HPP_NAMESPACE::Buffer missShaderBindingTableBuffer, VULKAN_HPP_NAMESPACE::DeviceSize missShaderBindingOffset, VULKAN_HPP_NAMESPACE::DeviceSize missShaderBindingStride, VULKAN_HPP_NAMESPACE::Buffer hitShaderBindingTableBuffer, VULKAN_HPP_NAMESPACE::DeviceSize hitShaderBindingOffset, VULKAN_HPP_NAMESPACE::DeviceSize hitShaderBindingStride, VULKAN_HPP_NAMESPACE::Buffer callableShaderBindingTableBuffer, VULKAN_HPP_NAMESPACE::DeviceSize callableShaderBindingOffset, VULKAN_HPP_NAMESPACE::DeviceSize callableShaderBindingStride, uint32_t width, uint32_t height, uint32_t depth ) const VULKAN_HPP_NOEXCEPT; void writeAccelerationStructuresPropertiesNV( VULKAN_HPP_NAMESPACE::ArrayProxy const & accelerationStructures, VULKAN_HPP_NAMESPACE::QueryType queryType, VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t firstQuery ) const VULKAN_HPP_NOEXCEPT; //=== VK_KHR_draw_indirect_count === void drawIndirectCountKHR( VULKAN_HPP_NAMESPACE::Buffer buffer, VULKAN_HPP_NAMESPACE::DeviceSize offset, VULKAN_HPP_NAMESPACE::Buffer countBuffer, VULKAN_HPP_NAMESPACE::DeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride ) const VULKAN_HPP_NOEXCEPT; void drawIndexedIndirectCountKHR( VULKAN_HPP_NAMESPACE::Buffer buffer, VULKAN_HPP_NAMESPACE::DeviceSize offset, VULKAN_HPP_NAMESPACE::Buffer countBuffer, VULKAN_HPP_NAMESPACE::DeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride ) const VULKAN_HPP_NOEXCEPT; //=== VK_AMD_buffer_marker === void writeBufferMarkerAMD( VULKAN_HPP_NAMESPACE::PipelineStageFlagBits pipelineStage, VULKAN_HPP_NAMESPACE::Buffer dstBuffer, VULKAN_HPP_NAMESPACE::DeviceSize dstOffset, uint32_t marker ) const VULKAN_HPP_NOEXCEPT; void writeBufferMarker2AMD( VULKAN_HPP_NAMESPACE::PipelineStageFlags2 stage, VULKAN_HPP_NAMESPACE::Buffer dstBuffer, VULKAN_HPP_NAMESPACE::DeviceSize dstOffset, uint32_t marker ) const VULKAN_HPP_NOEXCEPT; //=== VK_NV_mesh_shader === void drawMeshTasksNV( uint32_t taskCount, uint32_t firstTask ) const VULKAN_HPP_NOEXCEPT; void drawMeshTasksIndirectNV( VULKAN_HPP_NAMESPACE::Buffer buffer, VULKAN_HPP_NAMESPACE::DeviceSize offset, uint32_t drawCount, uint32_t stride ) const VULKAN_HPP_NOEXCEPT; void drawMeshTasksIndirectCountNV( VULKAN_HPP_NAMESPACE::Buffer buffer, VULKAN_HPP_NAMESPACE::DeviceSize offset, VULKAN_HPP_NAMESPACE::Buffer countBuffer, VULKAN_HPP_NAMESPACE::DeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride ) const VULKAN_HPP_NOEXCEPT; //=== VK_NV_scissor_exclusive === void setExclusiveScissorEnableNV( uint32_t firstExclusiveScissor, VULKAN_HPP_NAMESPACE::ArrayProxy const & exclusiveScissorEnables ) const VULKAN_HPP_NOEXCEPT; void setExclusiveScissorNV( uint32_t firstExclusiveScissor, VULKAN_HPP_NAMESPACE::ArrayProxy const & exclusiveScissors ) const VULKAN_HPP_NOEXCEPT; //=== VK_NV_device_diagnostic_checkpoints === template void setCheckpointNV( CheckpointMarkerType const & checkpointMarker ) const VULKAN_HPP_NOEXCEPT; //=== VK_INTEL_performance_query === void setPerformanceMarkerINTEL( const VULKAN_HPP_NAMESPACE::PerformanceMarkerInfoINTEL & markerInfo ) const; void setPerformanceStreamMarkerINTEL( const VULKAN_HPP_NAMESPACE::PerformanceStreamMarkerInfoINTEL & markerInfo ) const; void setPerformanceOverrideINTEL( const VULKAN_HPP_NAMESPACE::PerformanceOverrideInfoINTEL & overrideInfo ) const; //=== VK_KHR_fragment_shading_rate === void setFragmentShadingRateKHR( const VULKAN_HPP_NAMESPACE::Extent2D & fragmentSize, const VULKAN_HPP_NAMESPACE::FragmentShadingRateCombinerOpKHR combinerOps[2] ) const VULKAN_HPP_NOEXCEPT; //=== VK_KHR_dynamic_rendering_local_read === void setRenderingAttachmentLocationsKHR( const VULKAN_HPP_NAMESPACE::RenderingAttachmentLocationInfo & locationInfo ) const VULKAN_HPP_NOEXCEPT; void setRenderingInputAttachmentIndicesKHR( const VULKAN_HPP_NAMESPACE::RenderingInputAttachmentIndexInfo & inputAttachmentIndexInfo ) const VULKAN_HPP_NOEXCEPT; //=== VK_EXT_line_rasterization === void setLineStippleEXT( uint32_t lineStippleFactor, uint16_t lineStipplePattern ) const VULKAN_HPP_NOEXCEPT; //=== VK_EXT_extended_dynamic_state === void setCullModeEXT( VULKAN_HPP_NAMESPACE::CullModeFlags cullMode VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; void setFrontFaceEXT( VULKAN_HPP_NAMESPACE::FrontFace frontFace ) const VULKAN_HPP_NOEXCEPT; void setPrimitiveTopologyEXT( VULKAN_HPP_NAMESPACE::PrimitiveTopology primitiveTopology ) const VULKAN_HPP_NOEXCEPT; void setViewportWithCountEXT( VULKAN_HPP_NAMESPACE::ArrayProxy const & viewports ) const VULKAN_HPP_NOEXCEPT; void setScissorWithCountEXT( VULKAN_HPP_NAMESPACE::ArrayProxy const & scissors ) const VULKAN_HPP_NOEXCEPT; void bindVertexBuffers2EXT( uint32_t firstBinding, VULKAN_HPP_NAMESPACE::ArrayProxy const & buffers, VULKAN_HPP_NAMESPACE::ArrayProxy const & offsets, VULKAN_HPP_NAMESPACE::ArrayProxy const & sizes VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, VULKAN_HPP_NAMESPACE::ArrayProxy const & strides VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT ) const; void setDepthTestEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 depthTestEnable ) const VULKAN_HPP_NOEXCEPT; void setDepthWriteEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 depthWriteEnable ) const VULKAN_HPP_NOEXCEPT; void setDepthCompareOpEXT( VULKAN_HPP_NAMESPACE::CompareOp depthCompareOp ) const VULKAN_HPP_NOEXCEPT; void setDepthBoundsTestEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 depthBoundsTestEnable ) const VULKAN_HPP_NOEXCEPT; void setStencilTestEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 stencilTestEnable ) const VULKAN_HPP_NOEXCEPT; void setStencilOpEXT( VULKAN_HPP_NAMESPACE::StencilFaceFlags faceMask, VULKAN_HPP_NAMESPACE::StencilOp failOp, VULKAN_HPP_NAMESPACE::StencilOp passOp, VULKAN_HPP_NAMESPACE::StencilOp depthFailOp, VULKAN_HPP_NAMESPACE::CompareOp compareOp ) const VULKAN_HPP_NOEXCEPT; //=== VK_NV_device_generated_commands === void preprocessGeneratedCommandsNV( const VULKAN_HPP_NAMESPACE::GeneratedCommandsInfoNV & generatedCommandsInfo ) const VULKAN_HPP_NOEXCEPT; void executeGeneratedCommandsNV( VULKAN_HPP_NAMESPACE::Bool32 isPreprocessed, const VULKAN_HPP_NAMESPACE::GeneratedCommandsInfoNV & generatedCommandsInfo ) const VULKAN_HPP_NOEXCEPT; void bindPipelineShaderGroupNV( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint, VULKAN_HPP_NAMESPACE::Pipeline pipeline, uint32_t groupIndex ) const VULKAN_HPP_NOEXCEPT; //=== VK_EXT_depth_bias_control === void setDepthBias2EXT( const VULKAN_HPP_NAMESPACE::DepthBiasInfoEXT & depthBiasInfo ) const VULKAN_HPP_NOEXCEPT; //=== VK_KHR_video_encode_queue === void encodeVideoKHR( const VULKAN_HPP_NAMESPACE::VideoEncodeInfoKHR & encodeInfo ) const VULKAN_HPP_NOEXCEPT; # if defined( VK_ENABLE_BETA_EXTENSIONS ) //=== VK_NV_cuda_kernel_launch === void cudaLaunchKernelNV( const VULKAN_HPP_NAMESPACE::CudaLaunchInfoNV & launchInfo ) const VULKAN_HPP_NOEXCEPT; # endif /*VK_ENABLE_BETA_EXTENSIONS*/ //=== VK_KHR_synchronization2 === void setEvent2KHR( VULKAN_HPP_NAMESPACE::Event event, const VULKAN_HPP_NAMESPACE::DependencyInfo & dependencyInfo ) const VULKAN_HPP_NOEXCEPT; void resetEvent2KHR( VULKAN_HPP_NAMESPACE::Event event, VULKAN_HPP_NAMESPACE::PipelineStageFlags2 stageMask VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; void waitEvents2KHR( VULKAN_HPP_NAMESPACE::ArrayProxy const & events, VULKAN_HPP_NAMESPACE::ArrayProxy const & dependencyInfos ) const; void pipelineBarrier2KHR( const VULKAN_HPP_NAMESPACE::DependencyInfo & dependencyInfo ) const VULKAN_HPP_NOEXCEPT; void writeTimestamp2KHR( VULKAN_HPP_NAMESPACE::PipelineStageFlags2 stage, VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t query ) const VULKAN_HPP_NOEXCEPT; //=== VK_EXT_descriptor_buffer === void bindDescriptorBuffersEXT( VULKAN_HPP_NAMESPACE::ArrayProxy const & bindingInfos ) const VULKAN_HPP_NOEXCEPT; void setDescriptorBufferOffsetsEXT( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint, VULKAN_HPP_NAMESPACE::PipelineLayout layout, uint32_t firstSet, VULKAN_HPP_NAMESPACE::ArrayProxy const & bufferIndices, VULKAN_HPP_NAMESPACE::ArrayProxy const & offsets ) const; void bindDescriptorBufferEmbeddedSamplersEXT( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint, VULKAN_HPP_NAMESPACE::PipelineLayout layout, uint32_t set ) const VULKAN_HPP_NOEXCEPT; //=== VK_NV_fragment_shading_rate_enums === void setFragmentShadingRateEnumNV( VULKAN_HPP_NAMESPACE::FragmentShadingRateNV shadingRate, const VULKAN_HPP_NAMESPACE::FragmentShadingRateCombinerOpKHR combinerOps[2] ) const VULKAN_HPP_NOEXCEPT; //=== VK_EXT_mesh_shader === void drawMeshTasksEXT( uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ ) const VULKAN_HPP_NOEXCEPT; void drawMeshTasksIndirectEXT( VULKAN_HPP_NAMESPACE::Buffer buffer, VULKAN_HPP_NAMESPACE::DeviceSize offset, uint32_t drawCount, uint32_t stride ) const VULKAN_HPP_NOEXCEPT; void drawMeshTasksIndirectCountEXT( VULKAN_HPP_NAMESPACE::Buffer buffer, VULKAN_HPP_NAMESPACE::DeviceSize offset, VULKAN_HPP_NAMESPACE::Buffer countBuffer, VULKAN_HPP_NAMESPACE::DeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride ) const VULKAN_HPP_NOEXCEPT; //=== VK_KHR_copy_commands2 === void copyBuffer2KHR( const VULKAN_HPP_NAMESPACE::CopyBufferInfo2 & copyBufferInfo ) const VULKAN_HPP_NOEXCEPT; void copyImage2KHR( const VULKAN_HPP_NAMESPACE::CopyImageInfo2 & copyImageInfo ) const VULKAN_HPP_NOEXCEPT; void copyBufferToImage2KHR( const VULKAN_HPP_NAMESPACE::CopyBufferToImageInfo2 & copyBufferToImageInfo ) const VULKAN_HPP_NOEXCEPT; void copyImageToBuffer2KHR( const VULKAN_HPP_NAMESPACE::CopyImageToBufferInfo2 & copyImageToBufferInfo ) const VULKAN_HPP_NOEXCEPT; void blitImage2KHR( const VULKAN_HPP_NAMESPACE::BlitImageInfo2 & blitImageInfo ) const VULKAN_HPP_NOEXCEPT; void resolveImage2KHR( const VULKAN_HPP_NAMESPACE::ResolveImageInfo2 & resolveImageInfo ) const VULKAN_HPP_NOEXCEPT; //=== VK_EXT_vertex_input_dynamic_state === void setVertexInputEXT( VULKAN_HPP_NAMESPACE::ArrayProxy const & vertexBindingDescriptions, VULKAN_HPP_NAMESPACE::ArrayProxy const & vertexAttributeDescriptions ) const VULKAN_HPP_NOEXCEPT; //=== VK_HUAWEI_subpass_shading === void subpassShadingHUAWEI() const VULKAN_HPP_NOEXCEPT; //=== VK_HUAWEI_invocation_mask === void bindInvocationMaskHUAWEI( VULKAN_HPP_NAMESPACE::ImageView imageView, VULKAN_HPP_NAMESPACE::ImageLayout imageLayout ) const VULKAN_HPP_NOEXCEPT; //=== VK_EXT_extended_dynamic_state2 === void setPatchControlPointsEXT( uint32_t patchControlPoints ) const VULKAN_HPP_NOEXCEPT; void setRasterizerDiscardEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 rasterizerDiscardEnable ) const VULKAN_HPP_NOEXCEPT; void setDepthBiasEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 depthBiasEnable ) const VULKAN_HPP_NOEXCEPT; void setLogicOpEXT( VULKAN_HPP_NAMESPACE::LogicOp logicOp ) const VULKAN_HPP_NOEXCEPT; void setPrimitiveRestartEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 primitiveRestartEnable ) const VULKAN_HPP_NOEXCEPT; //=== VK_EXT_color_write_enable === void setColorWriteEnableEXT( VULKAN_HPP_NAMESPACE::ArrayProxy const & colorWriteEnables ) const VULKAN_HPP_NOEXCEPT; //=== VK_KHR_ray_tracing_maintenance1 === void traceRaysIndirect2KHR( VULKAN_HPP_NAMESPACE::DeviceAddress indirectDeviceAddress ) const VULKAN_HPP_NOEXCEPT; //=== VK_EXT_multi_draw === void drawMultiEXT( VULKAN_HPP_NAMESPACE::StridedArrayProxy const & vertexInfo, uint32_t instanceCount, uint32_t firstInstance ) const VULKAN_HPP_NOEXCEPT; void drawMultiIndexedEXT( VULKAN_HPP_NAMESPACE::StridedArrayProxy const & indexInfo, uint32_t instanceCount, uint32_t firstInstance, Optional vertexOffset VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; //=== VK_EXT_opacity_micromap === void buildMicromapsEXT( VULKAN_HPP_NAMESPACE::ArrayProxy const & infos ) const VULKAN_HPP_NOEXCEPT; void copyMicromapEXT( const VULKAN_HPP_NAMESPACE::CopyMicromapInfoEXT & info ) const VULKAN_HPP_NOEXCEPT; void copyMicromapToMemoryEXT( const VULKAN_HPP_NAMESPACE::CopyMicromapToMemoryInfoEXT & info ) const VULKAN_HPP_NOEXCEPT; void copyMemoryToMicromapEXT( const VULKAN_HPP_NAMESPACE::CopyMemoryToMicromapInfoEXT & info ) const VULKAN_HPP_NOEXCEPT; void writeMicromapsPropertiesEXT( VULKAN_HPP_NAMESPACE::ArrayProxy const & micromaps, VULKAN_HPP_NAMESPACE::QueryType queryType, VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t firstQuery ) const VULKAN_HPP_NOEXCEPT; //=== VK_HUAWEI_cluster_culling_shader === void drawClusterHUAWEI( uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ ) const VULKAN_HPP_NOEXCEPT; void drawClusterIndirectHUAWEI( VULKAN_HPP_NAMESPACE::Buffer buffer, VULKAN_HPP_NAMESPACE::DeviceSize offset ) const VULKAN_HPP_NOEXCEPT; //=== VK_NV_copy_memory_indirect === void copyMemoryIndirectNV( VULKAN_HPP_NAMESPACE::DeviceAddress copyBufferAddress, uint32_t copyCount, uint32_t stride ) const VULKAN_HPP_NOEXCEPT; void copyMemoryToImageIndirectNV( VULKAN_HPP_NAMESPACE::DeviceAddress copyBufferAddress, uint32_t stride, VULKAN_HPP_NAMESPACE::Image dstImage, VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout, VULKAN_HPP_NAMESPACE::ArrayProxy const & imageSubresources ) const VULKAN_HPP_NOEXCEPT; //=== VK_NV_memory_decompression === void decompressMemoryNV( VULKAN_HPP_NAMESPACE::ArrayProxy const & decompressMemoryRegions ) const VULKAN_HPP_NOEXCEPT; void decompressMemoryIndirectCountNV( VULKAN_HPP_NAMESPACE::DeviceAddress indirectCommandsAddress, VULKAN_HPP_NAMESPACE::DeviceAddress indirectCommandsCountAddress, uint32_t stride ) const VULKAN_HPP_NOEXCEPT; //=== VK_NV_device_generated_commands_compute === void updatePipelineIndirectBufferNV( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint, VULKAN_HPP_NAMESPACE::Pipeline pipeline ) const VULKAN_HPP_NOEXCEPT; //=== VK_EXT_extended_dynamic_state3 === void setDepthClampEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 depthClampEnable ) const VULKAN_HPP_NOEXCEPT; void setPolygonModeEXT( VULKAN_HPP_NAMESPACE::PolygonMode polygonMode ) const VULKAN_HPP_NOEXCEPT; void setRasterizationSamplesEXT( VULKAN_HPP_NAMESPACE::SampleCountFlagBits rasterizationSamples ) const VULKAN_HPP_NOEXCEPT; void setSampleMaskEXT( VULKAN_HPP_NAMESPACE::SampleCountFlagBits samples, VULKAN_HPP_NAMESPACE::ArrayProxy const & sampleMask ) const; void setAlphaToCoverageEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 alphaToCoverageEnable ) const VULKAN_HPP_NOEXCEPT; void setAlphaToOneEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 alphaToOneEnable ) const VULKAN_HPP_NOEXCEPT; void setLogicOpEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 logicOpEnable ) const VULKAN_HPP_NOEXCEPT; void setColorBlendEnableEXT( uint32_t firstAttachment, VULKAN_HPP_NAMESPACE::ArrayProxy const & colorBlendEnables ) const VULKAN_HPP_NOEXCEPT; void setColorBlendEquationEXT( uint32_t firstAttachment, VULKAN_HPP_NAMESPACE::ArrayProxy const & colorBlendEquations ) const VULKAN_HPP_NOEXCEPT; void setColorWriteMaskEXT( uint32_t firstAttachment, VULKAN_HPP_NAMESPACE::ArrayProxy const & colorWriteMasks ) const VULKAN_HPP_NOEXCEPT; void setTessellationDomainOriginEXT( VULKAN_HPP_NAMESPACE::TessellationDomainOrigin domainOrigin ) const VULKAN_HPP_NOEXCEPT; void setRasterizationStreamEXT( uint32_t rasterizationStream ) const VULKAN_HPP_NOEXCEPT; void setConservativeRasterizationModeEXT( VULKAN_HPP_NAMESPACE::ConservativeRasterizationModeEXT conservativeRasterizationMode ) const VULKAN_HPP_NOEXCEPT; void setExtraPrimitiveOverestimationSizeEXT( float extraPrimitiveOverestimationSize ) const VULKAN_HPP_NOEXCEPT; void setDepthClipEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 depthClipEnable ) const VULKAN_HPP_NOEXCEPT; void setSampleLocationsEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 sampleLocationsEnable ) const VULKAN_HPP_NOEXCEPT; void setColorBlendAdvancedEXT( uint32_t firstAttachment, VULKAN_HPP_NAMESPACE::ArrayProxy const & colorBlendAdvanced ) const VULKAN_HPP_NOEXCEPT; void setProvokingVertexModeEXT( VULKAN_HPP_NAMESPACE::ProvokingVertexModeEXT provokingVertexMode ) const VULKAN_HPP_NOEXCEPT; void setLineRasterizationModeEXT( VULKAN_HPP_NAMESPACE::LineRasterizationModeEXT lineRasterizationMode ) const VULKAN_HPP_NOEXCEPT; void setLineStippleEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 stippledLineEnable ) const VULKAN_HPP_NOEXCEPT; void setDepthClipNegativeOneToOneEXT( VULKAN_HPP_NAMESPACE::Bool32 negativeOneToOne ) const VULKAN_HPP_NOEXCEPT; void setViewportWScalingEnableNV( VULKAN_HPP_NAMESPACE::Bool32 viewportWScalingEnable ) const VULKAN_HPP_NOEXCEPT; void setViewportSwizzleNV( uint32_t firstViewport, VULKAN_HPP_NAMESPACE::ArrayProxy const & viewportSwizzles ) const VULKAN_HPP_NOEXCEPT; void setCoverageToColorEnableNV( VULKAN_HPP_NAMESPACE::Bool32 coverageToColorEnable ) const VULKAN_HPP_NOEXCEPT; void setCoverageToColorLocationNV( uint32_t coverageToColorLocation ) const VULKAN_HPP_NOEXCEPT; void setCoverageModulationModeNV( VULKAN_HPP_NAMESPACE::CoverageModulationModeNV coverageModulationMode ) const VULKAN_HPP_NOEXCEPT; void setCoverageModulationTableEnableNV( VULKAN_HPP_NAMESPACE::Bool32 coverageModulationTableEnable ) const VULKAN_HPP_NOEXCEPT; void setCoverageModulationTableNV( VULKAN_HPP_NAMESPACE::ArrayProxy const & coverageModulationTable ) const VULKAN_HPP_NOEXCEPT; void setShadingRateImageEnableNV( VULKAN_HPP_NAMESPACE::Bool32 shadingRateImageEnable ) const VULKAN_HPP_NOEXCEPT; void setRepresentativeFragmentTestEnableNV( VULKAN_HPP_NAMESPACE::Bool32 representativeFragmentTestEnable ) const VULKAN_HPP_NOEXCEPT; void setCoverageReductionModeNV( VULKAN_HPP_NAMESPACE::CoverageReductionModeNV coverageReductionMode ) const VULKAN_HPP_NOEXCEPT; //=== VK_NV_optical_flow === void opticalFlowExecuteNV( VULKAN_HPP_NAMESPACE::OpticalFlowSessionNV session, const VULKAN_HPP_NAMESPACE::OpticalFlowExecuteInfoNV & executeInfo ) const VULKAN_HPP_NOEXCEPT; //=== VK_KHR_maintenance5 === void bindIndexBuffer2KHR( VULKAN_HPP_NAMESPACE::Buffer buffer, VULKAN_HPP_NAMESPACE::DeviceSize offset, VULKAN_HPP_NAMESPACE::DeviceSize size, VULKAN_HPP_NAMESPACE::IndexType indexType ) const VULKAN_HPP_NOEXCEPT; //=== VK_EXT_shader_object === void bindShadersEXT( VULKAN_HPP_NAMESPACE::ArrayProxy const & stages, VULKAN_HPP_NAMESPACE::ArrayProxy const & shaders ) const; void setDepthClampRangeEXT( VULKAN_HPP_NAMESPACE::DepthClampModeEXT depthClampMode, Optional depthClampRange VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; //=== VK_NV_cooperative_vector === void convertCooperativeVectorMatrixNV( VULKAN_HPP_NAMESPACE::ArrayProxy const & infos ) const VULKAN_HPP_NOEXCEPT; //=== VK_EXT_attachment_feedback_loop_dynamic_state === void setAttachmentFeedbackLoopEnableEXT( VULKAN_HPP_NAMESPACE::ImageAspectFlags aspectMask VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; //=== VK_KHR_line_rasterization === void setLineStippleKHR( uint32_t lineStippleFactor, uint16_t lineStipplePattern ) const VULKAN_HPP_NOEXCEPT; //=== VK_KHR_maintenance6 === void bindDescriptorSets2KHR( const VULKAN_HPP_NAMESPACE::BindDescriptorSetsInfo & bindDescriptorSetsInfo ) const VULKAN_HPP_NOEXCEPT; void pushConstants2KHR( const VULKAN_HPP_NAMESPACE::PushConstantsInfo & pushConstantsInfo ) const VULKAN_HPP_NOEXCEPT; void pushDescriptorSet2KHR( const VULKAN_HPP_NAMESPACE::PushDescriptorSetInfo & pushDescriptorSetInfo ) const VULKAN_HPP_NOEXCEPT; void pushDescriptorSetWithTemplate2KHR( const VULKAN_HPP_NAMESPACE::PushDescriptorSetWithTemplateInfo & pushDescriptorSetWithTemplateInfo ) const VULKAN_HPP_NOEXCEPT; void setDescriptorBufferOffsets2EXT( const VULKAN_HPP_NAMESPACE::SetDescriptorBufferOffsetsInfoEXT & setDescriptorBufferOffsetsInfo ) const VULKAN_HPP_NOEXCEPT; void bindDescriptorBufferEmbeddedSamplers2EXT( const VULKAN_HPP_NAMESPACE::BindDescriptorBufferEmbeddedSamplersInfoEXT & bindDescriptorBufferEmbeddedSamplersInfo ) const VULKAN_HPP_NOEXCEPT; //=== VK_NV_cluster_acceleration_structure === void buildClusterAccelerationStructureIndirectNV( const VULKAN_HPP_NAMESPACE::ClusterAccelerationStructureCommandsInfoNV & commandInfos ) const VULKAN_HPP_NOEXCEPT; //=== VK_NV_partitioned_acceleration_structure === void buildPartitionedAccelerationStructuresNV( const VULKAN_HPP_NAMESPACE::BuildPartitionedAccelerationStructureInfoNV & buildInfo ) const VULKAN_HPP_NOEXCEPT; //=== VK_EXT_device_generated_commands === void preprocessGeneratedCommandsEXT( const VULKAN_HPP_NAMESPACE::GeneratedCommandsInfoEXT & generatedCommandsInfo, VULKAN_HPP_NAMESPACE::CommandBuffer stateCommandBuffer ) const VULKAN_HPP_NOEXCEPT; void executeGeneratedCommandsEXT( VULKAN_HPP_NAMESPACE::Bool32 isPreprocessed, const VULKAN_HPP_NAMESPACE::GeneratedCommandsInfoEXT & generatedCommandsInfo ) const VULKAN_HPP_NOEXCEPT; private: VULKAN_HPP_NAMESPACE::Device m_device = {}; VULKAN_HPP_NAMESPACE::CommandPool m_commandPool = {}; VULKAN_HPP_NAMESPACE::CommandBuffer m_commandBuffer = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; template <> struct isVulkanRAIIHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; class CommandBuffers : public std::vector { public: # if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) CommandBuffers( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::CommandBufferAllocateInfo const & allocateInfo ) { *this = device.allocateCommandBuffers( allocateInfo ); } # endif CommandBuffers( std::nullptr_t ) {} CommandBuffers() = delete; CommandBuffers( CommandBuffers const & ) = delete; CommandBuffers( CommandBuffers && rhs ) = default; CommandBuffers & operator=( CommandBuffers const & ) = delete; CommandBuffers & operator=( CommandBuffers && rhs ) = default; private: CommandBuffers( std::vector && rhs ) { std::swap( *this, rhs ); } }; class CuFunctionNVX { public: using CType = VkCuFunctionNVX; using CppType = VULKAN_HPP_NAMESPACE::CuFunctionNVX; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eCuFunctionNVX; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eCuFunctionNVX; public: # if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) CuFunctionNVX( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::CuFunctionCreateInfoNVX const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) { *this = device.createCuFunctionNVX( createInfo, allocator ); } # endif CuFunctionNVX( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkCuFunctionNVX function, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) : m_device( device ) , m_function( function ) , m_allocator( static_cast( allocator ) ) , m_dispatcher( device.getDispatcher() ) { } CuFunctionNVX( std::nullptr_t ) {} ~CuFunctionNVX() { clear(); } CuFunctionNVX() = delete; CuFunctionNVX( CuFunctionNVX const & ) = delete; CuFunctionNVX( CuFunctionNVX && rhs ) VULKAN_HPP_NOEXCEPT : m_device( VULKAN_HPP_NAMESPACE::exchange( rhs.m_device, {} ) ) , m_function( VULKAN_HPP_NAMESPACE::exchange( rhs.m_function, {} ) ) , m_allocator( VULKAN_HPP_NAMESPACE::exchange( rhs.m_allocator, {} ) ) , m_dispatcher( VULKAN_HPP_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) { } CuFunctionNVX & operator=( CuFunctionNVX const & ) = delete; CuFunctionNVX & operator=( CuFunctionNVX && rhs ) VULKAN_HPP_NOEXCEPT { if ( this != &rhs ) { std::swap( m_device, rhs.m_device ); std::swap( m_function, rhs.m_function ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_dispatcher, rhs.m_dispatcher ); } return *this; } VULKAN_HPP_NAMESPACE::CuFunctionNVX const & operator*() const VULKAN_HPP_NOEXCEPT { return m_function; } operator VULKAN_HPP_NAMESPACE::CuFunctionNVX() const VULKAN_HPP_NOEXCEPT { return m_function; } void clear() VULKAN_HPP_NOEXCEPT { if ( m_function ) { getDispatcher()->vkDestroyCuFunctionNVX( static_cast( m_device ), static_cast( m_function ), reinterpret_cast( m_allocator ) ); } m_device = nullptr; m_function = nullptr; m_allocator = nullptr; m_dispatcher = nullptr; } VULKAN_HPP_NAMESPACE::CuFunctionNVX release() { m_device = nullptr; m_allocator = nullptr; m_dispatcher = nullptr; return VULKAN_HPP_NAMESPACE::exchange( m_function, nullptr ); } VULKAN_HPP_NAMESPACE::Device getDevice() const { return m_device; } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * getDispatcher() const { VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); return m_dispatcher; } void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CuFunctionNVX & rhs ) VULKAN_HPP_NOEXCEPT { std::swap( m_device, rhs.m_device ); std::swap( m_function, rhs.m_function ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_dispatcher, rhs.m_dispatcher ); } private: VULKAN_HPP_NAMESPACE::Device m_device = {}; VULKAN_HPP_NAMESPACE::CuFunctionNVX m_function = {}; const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; template <> struct isVulkanRAIIHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; class CuModuleNVX { public: using CType = VkCuModuleNVX; using CppType = VULKAN_HPP_NAMESPACE::CuModuleNVX; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eCuModuleNVX; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eCuModuleNVX; public: # if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) CuModuleNVX( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::CuModuleCreateInfoNVX const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) { *this = device.createCuModuleNVX( createInfo, allocator ); } # endif CuModuleNVX( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkCuModuleNVX module, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) : m_device( device ) , m_module( module ) , m_allocator( static_cast( allocator ) ) , m_dispatcher( device.getDispatcher() ) { } CuModuleNVX( std::nullptr_t ) {} ~CuModuleNVX() { clear(); } CuModuleNVX() = delete; CuModuleNVX( CuModuleNVX const & ) = delete; CuModuleNVX( CuModuleNVX && rhs ) VULKAN_HPP_NOEXCEPT : m_device( VULKAN_HPP_NAMESPACE::exchange( rhs.m_device, {} ) ) , m_module( VULKAN_HPP_NAMESPACE::exchange( rhs.m_module, {} ) ) , m_allocator( VULKAN_HPP_NAMESPACE::exchange( rhs.m_allocator, {} ) ) , m_dispatcher( VULKAN_HPP_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) { } CuModuleNVX & operator=( CuModuleNVX const & ) = delete; CuModuleNVX & operator=( CuModuleNVX && rhs ) VULKAN_HPP_NOEXCEPT { if ( this != &rhs ) { std::swap( m_device, rhs.m_device ); std::swap( m_module, rhs.m_module ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_dispatcher, rhs.m_dispatcher ); } return *this; } VULKAN_HPP_NAMESPACE::CuModuleNVX const & operator*() const VULKAN_HPP_NOEXCEPT { return m_module; } operator VULKAN_HPP_NAMESPACE::CuModuleNVX() const VULKAN_HPP_NOEXCEPT { return m_module; } void clear() VULKAN_HPP_NOEXCEPT { if ( m_module ) { getDispatcher()->vkDestroyCuModuleNVX( static_cast( m_device ), static_cast( m_module ), reinterpret_cast( m_allocator ) ); } m_device = nullptr; m_module = nullptr; m_allocator = nullptr; m_dispatcher = nullptr; } VULKAN_HPP_NAMESPACE::CuModuleNVX release() { m_device = nullptr; m_allocator = nullptr; m_dispatcher = nullptr; return VULKAN_HPP_NAMESPACE::exchange( m_module, nullptr ); } VULKAN_HPP_NAMESPACE::Device getDevice() const { return m_device; } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * getDispatcher() const { VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); return m_dispatcher; } void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CuModuleNVX & rhs ) VULKAN_HPP_NOEXCEPT { std::swap( m_device, rhs.m_device ); std::swap( m_module, rhs.m_module ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_dispatcher, rhs.m_dispatcher ); } private: VULKAN_HPP_NAMESPACE::Device m_device = {}; VULKAN_HPP_NAMESPACE::CuModuleNVX m_module = {}; const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; template <> struct isVulkanRAIIHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; # if defined( VK_ENABLE_BETA_EXTENSIONS ) class CudaFunctionNV { public: using CType = VkCudaFunctionNV; using CppType = VULKAN_HPP_NAMESPACE::CudaFunctionNV; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eCudaFunctionNV; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eCudaFunctionNV; public: # if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) CudaFunctionNV( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::CudaFunctionCreateInfoNV const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) { *this = device.createCudaFunctionNV( createInfo, allocator ); } # endif CudaFunctionNV( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkCudaFunctionNV function, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) : m_device( device ) , m_function( function ) , m_allocator( static_cast( allocator ) ) , m_dispatcher( device.getDispatcher() ) { } CudaFunctionNV( std::nullptr_t ) {} ~CudaFunctionNV() { clear(); } CudaFunctionNV() = delete; CudaFunctionNV( CudaFunctionNV const & ) = delete; CudaFunctionNV( CudaFunctionNV && rhs ) VULKAN_HPP_NOEXCEPT : m_device( VULKAN_HPP_NAMESPACE::exchange( rhs.m_device, {} ) ) , m_function( VULKAN_HPP_NAMESPACE::exchange( rhs.m_function, {} ) ) , m_allocator( VULKAN_HPP_NAMESPACE::exchange( rhs.m_allocator, {} ) ) , m_dispatcher( VULKAN_HPP_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) { } CudaFunctionNV & operator=( CudaFunctionNV const & ) = delete; CudaFunctionNV & operator=( CudaFunctionNV && rhs ) VULKAN_HPP_NOEXCEPT { if ( this != &rhs ) { std::swap( m_device, rhs.m_device ); std::swap( m_function, rhs.m_function ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_dispatcher, rhs.m_dispatcher ); } return *this; } VULKAN_HPP_NAMESPACE::CudaFunctionNV const & operator*() const VULKAN_HPP_NOEXCEPT { return m_function; } operator VULKAN_HPP_NAMESPACE::CudaFunctionNV() const VULKAN_HPP_NOEXCEPT { return m_function; } void clear() VULKAN_HPP_NOEXCEPT { if ( m_function ) { getDispatcher()->vkDestroyCudaFunctionNV( static_cast( m_device ), static_cast( m_function ), reinterpret_cast( m_allocator ) ); } m_device = nullptr; m_function = nullptr; m_allocator = nullptr; m_dispatcher = nullptr; } VULKAN_HPP_NAMESPACE::CudaFunctionNV release() { m_device = nullptr; m_allocator = nullptr; m_dispatcher = nullptr; return VULKAN_HPP_NAMESPACE::exchange( m_function, nullptr ); } VULKAN_HPP_NAMESPACE::Device getDevice() const { return m_device; } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * getDispatcher() const { VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); return m_dispatcher; } void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CudaFunctionNV & rhs ) VULKAN_HPP_NOEXCEPT { std::swap( m_device, rhs.m_device ); std::swap( m_function, rhs.m_function ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_dispatcher, rhs.m_dispatcher ); } private: VULKAN_HPP_NAMESPACE::Device m_device = {}; VULKAN_HPP_NAMESPACE::CudaFunctionNV m_function = {}; const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; template <> struct isVulkanRAIIHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; # endif /*VK_ENABLE_BETA_EXTENSIONS*/ # if defined( VK_ENABLE_BETA_EXTENSIONS ) class CudaModuleNV { public: using CType = VkCudaModuleNV; using CppType = VULKAN_HPP_NAMESPACE::CudaModuleNV; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eCudaModuleNV; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eCudaModuleNV; public: # if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) CudaModuleNV( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::CudaModuleCreateInfoNV const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) { *this = device.createCudaModuleNV( createInfo, allocator ); } # endif CudaModuleNV( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkCudaModuleNV module, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) : m_device( device ) , m_module( module ) , m_allocator( static_cast( allocator ) ) , m_dispatcher( device.getDispatcher() ) { } CudaModuleNV( std::nullptr_t ) {} ~CudaModuleNV() { clear(); } CudaModuleNV() = delete; CudaModuleNV( CudaModuleNV const & ) = delete; CudaModuleNV( CudaModuleNV && rhs ) VULKAN_HPP_NOEXCEPT : m_device( VULKAN_HPP_NAMESPACE::exchange( rhs.m_device, {} ) ) , m_module( VULKAN_HPP_NAMESPACE::exchange( rhs.m_module, {} ) ) , m_allocator( VULKAN_HPP_NAMESPACE::exchange( rhs.m_allocator, {} ) ) , m_dispatcher( VULKAN_HPP_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) { } CudaModuleNV & operator=( CudaModuleNV const & ) = delete; CudaModuleNV & operator=( CudaModuleNV && rhs ) VULKAN_HPP_NOEXCEPT { if ( this != &rhs ) { std::swap( m_device, rhs.m_device ); std::swap( m_module, rhs.m_module ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_dispatcher, rhs.m_dispatcher ); } return *this; } VULKAN_HPP_NAMESPACE::CudaModuleNV const & operator*() const VULKAN_HPP_NOEXCEPT { return m_module; } operator VULKAN_HPP_NAMESPACE::CudaModuleNV() const VULKAN_HPP_NOEXCEPT { return m_module; } void clear() VULKAN_HPP_NOEXCEPT { if ( m_module ) { getDispatcher()->vkDestroyCudaModuleNV( static_cast( m_device ), static_cast( m_module ), reinterpret_cast( m_allocator ) ); } m_device = nullptr; m_module = nullptr; m_allocator = nullptr; m_dispatcher = nullptr; } VULKAN_HPP_NAMESPACE::CudaModuleNV release() { m_device = nullptr; m_allocator = nullptr; m_dispatcher = nullptr; return VULKAN_HPP_NAMESPACE::exchange( m_module, nullptr ); } VULKAN_HPP_NAMESPACE::Device getDevice() const { return m_device; } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * getDispatcher() const { VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); return m_dispatcher; } void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CudaModuleNV & rhs ) VULKAN_HPP_NOEXCEPT { std::swap( m_device, rhs.m_device ); std::swap( m_module, rhs.m_module ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_dispatcher, rhs.m_dispatcher ); } //=== VK_NV_cuda_kernel_launch === VULKAN_HPP_NODISCARD std::vector getCache() const; private: VULKAN_HPP_NAMESPACE::Device m_device = {}; VULKAN_HPP_NAMESPACE::CudaModuleNV m_module = {}; const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; template <> struct isVulkanRAIIHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; # endif /*VK_ENABLE_BETA_EXTENSIONS*/ class DebugReportCallbackEXT { public: using CType = VkDebugReportCallbackEXT; using CppType = VULKAN_HPP_NAMESPACE::DebugReportCallbackEXT; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eDebugReportCallbackEXT; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eDebugReportCallbackEXT; public: # if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) DebugReportCallbackEXT( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance, VULKAN_HPP_NAMESPACE::DebugReportCallbackCreateInfoEXT const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) { *this = instance.createDebugReportCallbackEXT( createInfo, allocator ); } # endif DebugReportCallbackEXT( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance, VkDebugReportCallbackEXT callback, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) : m_instance( instance ) , m_callback( callback ) , m_allocator( static_cast( allocator ) ) , m_dispatcher( instance.getDispatcher() ) { } DebugReportCallbackEXT( std::nullptr_t ) {} ~DebugReportCallbackEXT() { clear(); } DebugReportCallbackEXT() = delete; DebugReportCallbackEXT( DebugReportCallbackEXT const & ) = delete; DebugReportCallbackEXT( DebugReportCallbackEXT && rhs ) VULKAN_HPP_NOEXCEPT : m_instance( VULKAN_HPP_NAMESPACE::exchange( rhs.m_instance, {} ) ) , m_callback( VULKAN_HPP_NAMESPACE::exchange( rhs.m_callback, {} ) ) , m_allocator( VULKAN_HPP_NAMESPACE::exchange( rhs.m_allocator, {} ) ) , m_dispatcher( VULKAN_HPP_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) { } DebugReportCallbackEXT & operator=( DebugReportCallbackEXT const & ) = delete; DebugReportCallbackEXT & operator=( DebugReportCallbackEXT && rhs ) VULKAN_HPP_NOEXCEPT { if ( this != &rhs ) { std::swap( m_instance, rhs.m_instance ); std::swap( m_callback, rhs.m_callback ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_dispatcher, rhs.m_dispatcher ); } return *this; } VULKAN_HPP_NAMESPACE::DebugReportCallbackEXT const & operator*() const VULKAN_HPP_NOEXCEPT { return m_callback; } operator VULKAN_HPP_NAMESPACE::DebugReportCallbackEXT() const VULKAN_HPP_NOEXCEPT { return m_callback; } void clear() VULKAN_HPP_NOEXCEPT { if ( m_callback ) { getDispatcher()->vkDestroyDebugReportCallbackEXT( static_cast( m_instance ), static_cast( m_callback ), reinterpret_cast( m_allocator ) ); } m_instance = nullptr; m_callback = nullptr; m_allocator = nullptr; m_dispatcher = nullptr; } VULKAN_HPP_NAMESPACE::DebugReportCallbackEXT release() { m_instance = nullptr; m_allocator = nullptr; m_dispatcher = nullptr; return VULKAN_HPP_NAMESPACE::exchange( m_callback, nullptr ); } VULKAN_HPP_NAMESPACE::Instance getInstance() const { return m_instance; } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::InstanceDispatcher const * getDispatcher() const { VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); return m_dispatcher; } void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DebugReportCallbackEXT & rhs ) VULKAN_HPP_NOEXCEPT { std::swap( m_instance, rhs.m_instance ); std::swap( m_callback, rhs.m_callback ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_dispatcher, rhs.m_dispatcher ); } private: VULKAN_HPP_NAMESPACE::Instance m_instance = {}; VULKAN_HPP_NAMESPACE::DebugReportCallbackEXT m_callback = {}; const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::InstanceDispatcher const * m_dispatcher = nullptr; }; template <> struct isVulkanRAIIHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; class DebugUtilsMessengerEXT { public: using CType = VkDebugUtilsMessengerEXT; using CppType = VULKAN_HPP_NAMESPACE::DebugUtilsMessengerEXT; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eDebugUtilsMessengerEXT; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eUnknown; public: # if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) DebugUtilsMessengerEXT( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance, VULKAN_HPP_NAMESPACE::DebugUtilsMessengerCreateInfoEXT const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) { *this = instance.createDebugUtilsMessengerEXT( createInfo, allocator ); } # endif DebugUtilsMessengerEXT( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance, VkDebugUtilsMessengerEXT messenger, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) : m_instance( instance ) , m_messenger( messenger ) , m_allocator( static_cast( allocator ) ) , m_dispatcher( instance.getDispatcher() ) { } DebugUtilsMessengerEXT( std::nullptr_t ) {} ~DebugUtilsMessengerEXT() { clear(); } DebugUtilsMessengerEXT() = delete; DebugUtilsMessengerEXT( DebugUtilsMessengerEXT const & ) = delete; DebugUtilsMessengerEXT( DebugUtilsMessengerEXT && rhs ) VULKAN_HPP_NOEXCEPT : m_instance( VULKAN_HPP_NAMESPACE::exchange( rhs.m_instance, {} ) ) , m_messenger( VULKAN_HPP_NAMESPACE::exchange( rhs.m_messenger, {} ) ) , m_allocator( VULKAN_HPP_NAMESPACE::exchange( rhs.m_allocator, {} ) ) , m_dispatcher( VULKAN_HPP_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) { } DebugUtilsMessengerEXT & operator=( DebugUtilsMessengerEXT const & ) = delete; DebugUtilsMessengerEXT & operator=( DebugUtilsMessengerEXT && rhs ) VULKAN_HPP_NOEXCEPT { if ( this != &rhs ) { std::swap( m_instance, rhs.m_instance ); std::swap( m_messenger, rhs.m_messenger ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_dispatcher, rhs.m_dispatcher ); } return *this; } VULKAN_HPP_NAMESPACE::DebugUtilsMessengerEXT const & operator*() const VULKAN_HPP_NOEXCEPT { return m_messenger; } operator VULKAN_HPP_NAMESPACE::DebugUtilsMessengerEXT() const VULKAN_HPP_NOEXCEPT { return m_messenger; } void clear() VULKAN_HPP_NOEXCEPT { if ( m_messenger ) { getDispatcher()->vkDestroyDebugUtilsMessengerEXT( static_cast( m_instance ), static_cast( m_messenger ), reinterpret_cast( m_allocator ) ); } m_instance = nullptr; m_messenger = nullptr; m_allocator = nullptr; m_dispatcher = nullptr; } VULKAN_HPP_NAMESPACE::DebugUtilsMessengerEXT release() { m_instance = nullptr; m_allocator = nullptr; m_dispatcher = nullptr; return VULKAN_HPP_NAMESPACE::exchange( m_messenger, nullptr ); } VULKAN_HPP_NAMESPACE::Instance getInstance() const { return m_instance; } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::InstanceDispatcher const * getDispatcher() const { VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); return m_dispatcher; } void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DebugUtilsMessengerEXT & rhs ) VULKAN_HPP_NOEXCEPT { std::swap( m_instance, rhs.m_instance ); std::swap( m_messenger, rhs.m_messenger ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_dispatcher, rhs.m_dispatcher ); } private: VULKAN_HPP_NAMESPACE::Instance m_instance = {}; VULKAN_HPP_NAMESPACE::DebugUtilsMessengerEXT m_messenger = {}; const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::InstanceDispatcher const * m_dispatcher = nullptr; }; template <> struct isVulkanRAIIHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; class DeferredOperationKHR { public: using CType = VkDeferredOperationKHR; using CppType = VULKAN_HPP_NAMESPACE::DeferredOperationKHR; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eDeferredOperationKHR; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eUnknown; public: # if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) DeferredOperationKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) { *this = device.createDeferredOperationKHR( allocator ); } # endif DeferredOperationKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkDeferredOperationKHR operation, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) : m_device( device ) , m_operation( operation ) , m_allocator( static_cast( allocator ) ) , m_dispatcher( device.getDispatcher() ) { } DeferredOperationKHR( std::nullptr_t ) {} ~DeferredOperationKHR() { clear(); } DeferredOperationKHR() = delete; DeferredOperationKHR( DeferredOperationKHR const & ) = delete; DeferredOperationKHR( DeferredOperationKHR && rhs ) VULKAN_HPP_NOEXCEPT : m_device( VULKAN_HPP_NAMESPACE::exchange( rhs.m_device, {} ) ) , m_operation( VULKAN_HPP_NAMESPACE::exchange( rhs.m_operation, {} ) ) , m_allocator( VULKAN_HPP_NAMESPACE::exchange( rhs.m_allocator, {} ) ) , m_dispatcher( VULKAN_HPP_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) { } DeferredOperationKHR & operator=( DeferredOperationKHR const & ) = delete; DeferredOperationKHR & operator=( DeferredOperationKHR && rhs ) VULKAN_HPP_NOEXCEPT { if ( this != &rhs ) { std::swap( m_device, rhs.m_device ); std::swap( m_operation, rhs.m_operation ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_dispatcher, rhs.m_dispatcher ); } return *this; } VULKAN_HPP_NAMESPACE::DeferredOperationKHR const & operator*() const VULKAN_HPP_NOEXCEPT { return m_operation; } operator VULKAN_HPP_NAMESPACE::DeferredOperationKHR() const VULKAN_HPP_NOEXCEPT { return m_operation; } void clear() VULKAN_HPP_NOEXCEPT { if ( m_operation ) { getDispatcher()->vkDestroyDeferredOperationKHR( static_cast( m_device ), static_cast( m_operation ), reinterpret_cast( m_allocator ) ); } m_device = nullptr; m_operation = nullptr; m_allocator = nullptr; m_dispatcher = nullptr; } VULKAN_HPP_NAMESPACE::DeferredOperationKHR release() { m_device = nullptr; m_allocator = nullptr; m_dispatcher = nullptr; return VULKAN_HPP_NAMESPACE::exchange( m_operation, nullptr ); } VULKAN_HPP_NAMESPACE::Device getDevice() const { return m_device; } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * getDispatcher() const { VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); return m_dispatcher; } void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeferredOperationKHR & rhs ) VULKAN_HPP_NOEXCEPT { std::swap( m_device, rhs.m_device ); std::swap( m_operation, rhs.m_operation ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_dispatcher, rhs.m_dispatcher ); } //=== VK_KHR_deferred_host_operations === VULKAN_HPP_NODISCARD uint32_t getMaxConcurrency() const VULKAN_HPP_NOEXCEPT; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Result getResult() const VULKAN_HPP_NOEXCEPT; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Result join() const; private: VULKAN_HPP_NAMESPACE::Device m_device = {}; VULKAN_HPP_NAMESPACE::DeferredOperationKHR m_operation = {}; const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; template <> struct isVulkanRAIIHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; class DescriptorPool { public: using CType = VkDescriptorPool; using CppType = VULKAN_HPP_NAMESPACE::DescriptorPool; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eDescriptorPool; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eDescriptorPool; public: # if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) DescriptorPool( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::DescriptorPoolCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) { *this = device.createDescriptorPool( createInfo, allocator ); } # endif DescriptorPool( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkDescriptorPool descriptorPool, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) : m_device( device ) , m_descriptorPool( descriptorPool ) , m_allocator( static_cast( allocator ) ) , m_dispatcher( device.getDispatcher() ) { } DescriptorPool( std::nullptr_t ) {} ~DescriptorPool() { clear(); } DescriptorPool() = delete; DescriptorPool( DescriptorPool const & ) = delete; DescriptorPool( DescriptorPool && rhs ) VULKAN_HPP_NOEXCEPT : m_device( VULKAN_HPP_NAMESPACE::exchange( rhs.m_device, {} ) ) , m_descriptorPool( VULKAN_HPP_NAMESPACE::exchange( rhs.m_descriptorPool, {} ) ) , m_allocator( VULKAN_HPP_NAMESPACE::exchange( rhs.m_allocator, {} ) ) , m_dispatcher( VULKAN_HPP_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) { } DescriptorPool & operator=( DescriptorPool const & ) = delete; DescriptorPool & operator=( DescriptorPool && rhs ) VULKAN_HPP_NOEXCEPT { if ( this != &rhs ) { std::swap( m_device, rhs.m_device ); std::swap( m_descriptorPool, rhs.m_descriptorPool ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_dispatcher, rhs.m_dispatcher ); } return *this; } VULKAN_HPP_NAMESPACE::DescriptorPool const & operator*() const VULKAN_HPP_NOEXCEPT { return m_descriptorPool; } operator VULKAN_HPP_NAMESPACE::DescriptorPool() const VULKAN_HPP_NOEXCEPT { return m_descriptorPool; } void clear() VULKAN_HPP_NOEXCEPT { if ( m_descriptorPool ) { getDispatcher()->vkDestroyDescriptorPool( static_cast( m_device ), static_cast( m_descriptorPool ), reinterpret_cast( m_allocator ) ); } m_device = nullptr; m_descriptorPool = nullptr; m_allocator = nullptr; m_dispatcher = nullptr; } VULKAN_HPP_NAMESPACE::DescriptorPool release() { m_device = nullptr; m_allocator = nullptr; m_dispatcher = nullptr; return VULKAN_HPP_NAMESPACE::exchange( m_descriptorPool, nullptr ); } VULKAN_HPP_NAMESPACE::Device getDevice() const { return m_device; } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * getDispatcher() const { VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); return m_dispatcher; } void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DescriptorPool & rhs ) VULKAN_HPP_NOEXCEPT { std::swap( m_device, rhs.m_device ); std::swap( m_descriptorPool, rhs.m_descriptorPool ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_dispatcher, rhs.m_dispatcher ); } //=== VK_VERSION_1_0 === void reset( VULKAN_HPP_NAMESPACE::DescriptorPoolResetFlags flags VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT; private: VULKAN_HPP_NAMESPACE::Device m_device = {}; VULKAN_HPP_NAMESPACE::DescriptorPool m_descriptorPool = {}; const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; template <> struct isVulkanRAIIHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; class DescriptorSet { public: using CType = VkDescriptorSet; using CppType = VULKAN_HPP_NAMESPACE::DescriptorSet; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eDescriptorSet; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eDescriptorSet; public: DescriptorSet( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkDescriptorSet descriptorSet, VkDescriptorPool descriptorPool ) : m_device( device ), m_descriptorPool( descriptorPool ), m_descriptorSet( descriptorSet ), m_dispatcher( device.getDispatcher() ) { } DescriptorSet( std::nullptr_t ) {} ~DescriptorSet() { clear(); } DescriptorSet() = delete; DescriptorSet( DescriptorSet const & ) = delete; DescriptorSet( DescriptorSet && rhs ) VULKAN_HPP_NOEXCEPT : m_device( VULKAN_HPP_NAMESPACE::exchange( rhs.m_device, {} ) ) , m_descriptorPool( VULKAN_HPP_NAMESPACE::exchange( rhs.m_descriptorPool, {} ) ) , m_descriptorSet( VULKAN_HPP_NAMESPACE::exchange( rhs.m_descriptorSet, {} ) ) , m_dispatcher( VULKAN_HPP_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) { } DescriptorSet & operator=( DescriptorSet const & ) = delete; DescriptorSet & operator=( DescriptorSet && rhs ) VULKAN_HPP_NOEXCEPT { if ( this != &rhs ) { std::swap( m_device, rhs.m_device ); std::swap( m_descriptorPool, rhs.m_descriptorPool ); std::swap( m_descriptorSet, rhs.m_descriptorSet ); std::swap( m_dispatcher, rhs.m_dispatcher ); } return *this; } VULKAN_HPP_NAMESPACE::DescriptorSet const & operator*() const VULKAN_HPP_NOEXCEPT { return m_descriptorSet; } operator VULKAN_HPP_NAMESPACE::DescriptorSet() const VULKAN_HPP_NOEXCEPT { return m_descriptorSet; } void clear() VULKAN_HPP_NOEXCEPT { if ( m_descriptorSet ) { getDispatcher()->vkFreeDescriptorSets( static_cast( m_device ), static_cast( m_descriptorPool ), 1, reinterpret_cast( &m_descriptorSet ) ); } m_device = nullptr; m_descriptorPool = nullptr; m_descriptorSet = nullptr; m_dispatcher = nullptr; } VULKAN_HPP_NAMESPACE::DescriptorSet release() { m_device = nullptr; m_descriptorPool = nullptr; m_dispatcher = nullptr; return VULKAN_HPP_NAMESPACE::exchange( m_descriptorSet, nullptr ); } VULKAN_HPP_NAMESPACE::Device getDevice() const { return m_device; } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * getDispatcher() const { VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); return m_dispatcher; } void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DescriptorSet & rhs ) VULKAN_HPP_NOEXCEPT { std::swap( m_device, rhs.m_device ); std::swap( m_descriptorPool, rhs.m_descriptorPool ); std::swap( m_descriptorSet, rhs.m_descriptorSet ); std::swap( m_dispatcher, rhs.m_dispatcher ); } //=== VK_VERSION_1_1 === template void updateWithTemplate( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate, DataType const & data ) const VULKAN_HPP_NOEXCEPT; //=== VK_KHR_descriptor_update_template === template void updateWithTemplateKHR( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate, DataType const & data ) const VULKAN_HPP_NOEXCEPT; //=== VK_VALVE_descriptor_set_host_mapping === VULKAN_HPP_NODISCARD void * getHostMappingVALVE() const VULKAN_HPP_NOEXCEPT; private: VULKAN_HPP_NAMESPACE::Device m_device = {}; VULKAN_HPP_NAMESPACE::DescriptorPool m_descriptorPool = {}; VULKAN_HPP_NAMESPACE::DescriptorSet m_descriptorSet = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; template <> struct isVulkanRAIIHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; class DescriptorSets : public std::vector { public: # if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) DescriptorSets( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::DescriptorSetAllocateInfo const & allocateInfo ) { *this = device.allocateDescriptorSets( allocateInfo ); } # endif DescriptorSets( std::nullptr_t ) {} DescriptorSets() = delete; DescriptorSets( DescriptorSets const & ) = delete; DescriptorSets( DescriptorSets && rhs ) = default; DescriptorSets & operator=( DescriptorSets const & ) = delete; DescriptorSets & operator=( DescriptorSets && rhs ) = default; private: DescriptorSets( std::vector && rhs ) { std::swap( *this, rhs ); } }; class DescriptorSetLayout { public: using CType = VkDescriptorSetLayout; using CppType = VULKAN_HPP_NAMESPACE::DescriptorSetLayout; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eDescriptorSetLayout; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eDescriptorSetLayout; public: # if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) DescriptorSetLayout( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) { *this = device.createDescriptorSetLayout( createInfo, allocator ); } # endif DescriptorSetLayout( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkDescriptorSetLayout descriptorSetLayout, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) : m_device( device ) , m_descriptorSetLayout( descriptorSetLayout ) , m_allocator( static_cast( allocator ) ) , m_dispatcher( device.getDispatcher() ) { } DescriptorSetLayout( std::nullptr_t ) {} ~DescriptorSetLayout() { clear(); } DescriptorSetLayout() = delete; DescriptorSetLayout( DescriptorSetLayout const & ) = delete; DescriptorSetLayout( DescriptorSetLayout && rhs ) VULKAN_HPP_NOEXCEPT : m_device( VULKAN_HPP_NAMESPACE::exchange( rhs.m_device, {} ) ) , m_descriptorSetLayout( VULKAN_HPP_NAMESPACE::exchange( rhs.m_descriptorSetLayout, {} ) ) , m_allocator( VULKAN_HPP_NAMESPACE::exchange( rhs.m_allocator, {} ) ) , m_dispatcher( VULKAN_HPP_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) { } DescriptorSetLayout & operator=( DescriptorSetLayout const & ) = delete; DescriptorSetLayout & operator=( DescriptorSetLayout && rhs ) VULKAN_HPP_NOEXCEPT { if ( this != &rhs ) { std::swap( m_device, rhs.m_device ); std::swap( m_descriptorSetLayout, rhs.m_descriptorSetLayout ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_dispatcher, rhs.m_dispatcher ); } return *this; } VULKAN_HPP_NAMESPACE::DescriptorSetLayout const & operator*() const VULKAN_HPP_NOEXCEPT { return m_descriptorSetLayout; } operator VULKAN_HPP_NAMESPACE::DescriptorSetLayout() const VULKAN_HPP_NOEXCEPT { return m_descriptorSetLayout; } void clear() VULKAN_HPP_NOEXCEPT { if ( m_descriptorSetLayout ) { getDispatcher()->vkDestroyDescriptorSetLayout( static_cast( m_device ), static_cast( m_descriptorSetLayout ), reinterpret_cast( m_allocator ) ); } m_device = nullptr; m_descriptorSetLayout = nullptr; m_allocator = nullptr; m_dispatcher = nullptr; } VULKAN_HPP_NAMESPACE::DescriptorSetLayout release() { m_device = nullptr; m_allocator = nullptr; m_dispatcher = nullptr; return VULKAN_HPP_NAMESPACE::exchange( m_descriptorSetLayout, nullptr ); } VULKAN_HPP_NAMESPACE::Device getDevice() const { return m_device; } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * getDispatcher() const { VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); return m_dispatcher; } void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DescriptorSetLayout & rhs ) VULKAN_HPP_NOEXCEPT { std::swap( m_device, rhs.m_device ); std::swap( m_descriptorSetLayout, rhs.m_descriptorSetLayout ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_dispatcher, rhs.m_dispatcher ); } //=== VK_EXT_descriptor_buffer === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::DeviceSize getSizeEXT() const VULKAN_HPP_NOEXCEPT; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::DeviceSize getBindingOffsetEXT( uint32_t binding ) const VULKAN_HPP_NOEXCEPT; private: VULKAN_HPP_NAMESPACE::Device m_device = {}; VULKAN_HPP_NAMESPACE::DescriptorSetLayout m_descriptorSetLayout = {}; const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; template <> struct isVulkanRAIIHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; class DescriptorUpdateTemplate { public: using CType = VkDescriptorUpdateTemplate; using CppType = VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eDescriptorUpdateTemplate; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eDescriptorUpdateTemplate; public: # if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) DescriptorUpdateTemplate( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) { *this = device.createDescriptorUpdateTemplate( createInfo, allocator ); } # endif DescriptorUpdateTemplate( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkDescriptorUpdateTemplate descriptorUpdateTemplate, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) : m_device( device ) , m_descriptorUpdateTemplate( descriptorUpdateTemplate ) , m_allocator( static_cast( allocator ) ) , m_dispatcher( device.getDispatcher() ) { } DescriptorUpdateTemplate( std::nullptr_t ) {} ~DescriptorUpdateTemplate() { clear(); } DescriptorUpdateTemplate() = delete; DescriptorUpdateTemplate( DescriptorUpdateTemplate const & ) = delete; DescriptorUpdateTemplate( DescriptorUpdateTemplate && rhs ) VULKAN_HPP_NOEXCEPT : m_device( VULKAN_HPP_NAMESPACE::exchange( rhs.m_device, {} ) ) , m_descriptorUpdateTemplate( VULKAN_HPP_NAMESPACE::exchange( rhs.m_descriptorUpdateTemplate, {} ) ) , m_allocator( VULKAN_HPP_NAMESPACE::exchange( rhs.m_allocator, {} ) ) , m_dispatcher( VULKAN_HPP_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) { } DescriptorUpdateTemplate & operator=( DescriptorUpdateTemplate const & ) = delete; DescriptorUpdateTemplate & operator=( DescriptorUpdateTemplate && rhs ) VULKAN_HPP_NOEXCEPT { if ( this != &rhs ) { std::swap( m_device, rhs.m_device ); std::swap( m_descriptorUpdateTemplate, rhs.m_descriptorUpdateTemplate ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_dispatcher, rhs.m_dispatcher ); } return *this; } VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate const & operator*() const VULKAN_HPP_NOEXCEPT { return m_descriptorUpdateTemplate; } operator VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate() const VULKAN_HPP_NOEXCEPT { return m_descriptorUpdateTemplate; } void clear() VULKAN_HPP_NOEXCEPT { if ( m_descriptorUpdateTemplate ) { getDispatcher()->vkDestroyDescriptorUpdateTemplate( static_cast( m_device ), static_cast( m_descriptorUpdateTemplate ), reinterpret_cast( m_allocator ) ); } m_device = nullptr; m_descriptorUpdateTemplate = nullptr; m_allocator = nullptr; m_dispatcher = nullptr; } VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate release() { m_device = nullptr; m_allocator = nullptr; m_dispatcher = nullptr; return VULKAN_HPP_NAMESPACE::exchange( m_descriptorUpdateTemplate, nullptr ); } VULKAN_HPP_NAMESPACE::Device getDevice() const { return m_device; } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * getDispatcher() const { VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); return m_dispatcher; } void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DescriptorUpdateTemplate & rhs ) VULKAN_HPP_NOEXCEPT { std::swap( m_device, rhs.m_device ); std::swap( m_descriptorUpdateTemplate, rhs.m_descriptorUpdateTemplate ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_dispatcher, rhs.m_dispatcher ); } private: VULKAN_HPP_NAMESPACE::Device m_device = {}; VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate m_descriptorUpdateTemplate = {}; const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; template <> struct isVulkanRAIIHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; class DeviceMemory { public: using CType = VkDeviceMemory; using CppType = VULKAN_HPP_NAMESPACE::DeviceMemory; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eDeviceMemory; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eDeviceMemory; public: # if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) DeviceMemory( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::MemoryAllocateInfo const & allocateInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) { *this = device.allocateMemory( allocateInfo, allocator ); } # endif DeviceMemory( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkDeviceMemory memory, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) : m_device( device ) , m_memory( memory ) , m_allocator( static_cast( allocator ) ) , m_dispatcher( device.getDispatcher() ) { } DeviceMemory( std::nullptr_t ) {} ~DeviceMemory() { clear(); } DeviceMemory() = delete; DeviceMemory( DeviceMemory const & ) = delete; DeviceMemory( DeviceMemory && rhs ) VULKAN_HPP_NOEXCEPT : m_device( VULKAN_HPP_NAMESPACE::exchange( rhs.m_device, {} ) ) , m_memory( VULKAN_HPP_NAMESPACE::exchange( rhs.m_memory, {} ) ) , m_allocator( VULKAN_HPP_NAMESPACE::exchange( rhs.m_allocator, {} ) ) , m_dispatcher( VULKAN_HPP_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) { } DeviceMemory & operator=( DeviceMemory const & ) = delete; DeviceMemory & operator=( DeviceMemory && rhs ) VULKAN_HPP_NOEXCEPT { if ( this != &rhs ) { std::swap( m_device, rhs.m_device ); std::swap( m_memory, rhs.m_memory ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_dispatcher, rhs.m_dispatcher ); } return *this; } VULKAN_HPP_NAMESPACE::DeviceMemory const & operator*() const VULKAN_HPP_NOEXCEPT { return m_memory; } operator VULKAN_HPP_NAMESPACE::DeviceMemory() const VULKAN_HPP_NOEXCEPT { return m_memory; } void clear() VULKAN_HPP_NOEXCEPT { if ( m_memory ) { getDispatcher()->vkFreeMemory( static_cast( m_device ), static_cast( m_memory ), reinterpret_cast( m_allocator ) ); } m_device = nullptr; m_memory = nullptr; m_allocator = nullptr; m_dispatcher = nullptr; } VULKAN_HPP_NAMESPACE::DeviceMemory release() { m_device = nullptr; m_allocator = nullptr; m_dispatcher = nullptr; return VULKAN_HPP_NAMESPACE::exchange( m_memory, nullptr ); } VULKAN_HPP_NAMESPACE::Device getDevice() const { return m_device; } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * getDispatcher() const { VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); return m_dispatcher; } void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceMemory & rhs ) VULKAN_HPP_NOEXCEPT { std::swap( m_device, rhs.m_device ); std::swap( m_memory, rhs.m_memory ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_dispatcher, rhs.m_dispatcher ); } //=== VK_VERSION_1_0 === VULKAN_HPP_NODISCARD void * mapMemory( VULKAN_HPP_NAMESPACE::DeviceSize offset, VULKAN_HPP_NAMESPACE::DeviceSize size, VULKAN_HPP_NAMESPACE::MemoryMapFlags flags VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT ) const; void unmapMemory() const VULKAN_HPP_NOEXCEPT; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::DeviceSize getCommitment() const VULKAN_HPP_NOEXCEPT; # if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_NV_external_memory_win32 === VULKAN_HPP_NODISCARD HANDLE getMemoryWin32HandleNV( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagsNV handleType ) const; # endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_EXT_pageable_device_local_memory === void setPriorityEXT( float priority ) const VULKAN_HPP_NOEXCEPT; private: VULKAN_HPP_NAMESPACE::Device m_device = {}; VULKAN_HPP_NAMESPACE::DeviceMemory m_memory = {}; const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; template <> struct isVulkanRAIIHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; class DisplayKHR { public: using CType = VkDisplayKHR; using CppType = VULKAN_HPP_NAMESPACE::DisplayKHR; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eDisplayKHR; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eDisplayKHR; public: # if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) DisplayKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::PhysicalDevice const & physicalDevice, int32_t drmFd, uint32_t connectorId ) { *this = physicalDevice.getDrmDisplayEXT( drmFd, connectorId ); } # endif # if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) # if defined( VK_USE_PLATFORM_XLIB_XRANDR_EXT ) DisplayKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::PhysicalDevice const & physicalDevice, Display & dpy, RROutput rrOutput ) { *this = physicalDevice.getRandROutputDisplayEXT( dpy, rrOutput ); } # endif /*VK_USE_PLATFORM_XLIB_XRANDR_EXT*/ # endif # if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) # if defined( VK_USE_PLATFORM_WIN32_KHR ) DisplayKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::PhysicalDevice const & physicalDevice, uint32_t deviceRelativeId ) { *this = physicalDevice.getWinrtDisplayNV( deviceRelativeId ); } # endif /*VK_USE_PLATFORM_WIN32_KHR*/ # endif DisplayKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::PhysicalDevice const & physicalDevice, VkDisplayKHR display ) : m_physicalDevice( physicalDevice ), m_display( display ), m_dispatcher( physicalDevice.getDispatcher() ) { } DisplayKHR( std::nullptr_t ) {} ~DisplayKHR() { clear(); } DisplayKHR() = delete; DisplayKHR( DisplayKHR const & ) = delete; DisplayKHR( DisplayKHR && rhs ) VULKAN_HPP_NOEXCEPT : m_physicalDevice( VULKAN_HPP_NAMESPACE::exchange( rhs.m_physicalDevice, {} ) ) , m_display( VULKAN_HPP_NAMESPACE::exchange( rhs.m_display, {} ) ) , m_dispatcher( VULKAN_HPP_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) { } DisplayKHR & operator=( DisplayKHR const & ) = delete; DisplayKHR & operator=( DisplayKHR && rhs ) VULKAN_HPP_NOEXCEPT { if ( this != &rhs ) { std::swap( m_physicalDevice, rhs.m_physicalDevice ); std::swap( m_display, rhs.m_display ); std::swap( m_dispatcher, rhs.m_dispatcher ); } return *this; } VULKAN_HPP_NAMESPACE::DisplayKHR const & operator*() const VULKAN_HPP_NOEXCEPT { return m_display; } operator VULKAN_HPP_NAMESPACE::DisplayKHR() const VULKAN_HPP_NOEXCEPT { return m_display; } void clear() VULKAN_HPP_NOEXCEPT { if ( m_display ) { getDispatcher()->vkReleaseDisplayEXT( static_cast( m_physicalDevice ), static_cast( m_display ) ); } m_physicalDevice = nullptr; m_display = nullptr; m_dispatcher = nullptr; } VULKAN_HPP_NAMESPACE::DisplayKHR release() { m_physicalDevice = nullptr; m_dispatcher = nullptr; return VULKAN_HPP_NAMESPACE::exchange( m_display, nullptr ); } VULKAN_HPP_NAMESPACE::PhysicalDevice getPhysicalDevice() const { return m_physicalDevice; } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::InstanceDispatcher const * getDispatcher() const { VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); return m_dispatcher; } void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DisplayKHR & rhs ) VULKAN_HPP_NOEXCEPT { std::swap( m_physicalDevice, rhs.m_physicalDevice ); std::swap( m_display, rhs.m_display ); std::swap( m_dispatcher, rhs.m_dispatcher ); } //=== VK_KHR_display === VULKAN_HPP_NODISCARD std::vector getModeProperties() const; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type createMode( VULKAN_HPP_NAMESPACE::DisplayModeCreateInfoKHR const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT; //=== VK_KHR_get_display_properties2 === VULKAN_HPP_NODISCARD std::vector getModeProperties2() const; template VULKAN_HPP_NODISCARD std::vector getModeProperties2() const; # if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_NV_acquire_winrt_display === void acquireWinrtNV() const; # endif /*VK_USE_PLATFORM_WIN32_KHR*/ private: VULKAN_HPP_NAMESPACE::PhysicalDevice m_physicalDevice = {}; VULKAN_HPP_NAMESPACE::DisplayKHR m_display = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::InstanceDispatcher const * m_dispatcher = nullptr; }; template <> struct isVulkanRAIIHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; class DisplayKHRs : public std::vector { public: # if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) DisplayKHRs( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::PhysicalDevice const & physicalDevice, uint32_t planeIndex ) { *this = physicalDevice.getDisplayPlaneSupportedDisplaysKHR( planeIndex ); } # endif DisplayKHRs( std::nullptr_t ) {} DisplayKHRs() = delete; DisplayKHRs( DisplayKHRs const & ) = delete; DisplayKHRs( DisplayKHRs && rhs ) = default; DisplayKHRs & operator=( DisplayKHRs const & ) = delete; DisplayKHRs & operator=( DisplayKHRs && rhs ) = default; private: DisplayKHRs( std::vector && rhs ) { std::swap( *this, rhs ); } }; class DisplayModeKHR { public: using CType = VkDisplayModeKHR; using CppType = VULKAN_HPP_NAMESPACE::DisplayModeKHR; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eDisplayModeKHR; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eDisplayModeKHR; public: # if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) DisplayModeKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DisplayKHR const & display, VULKAN_HPP_NAMESPACE::DisplayModeCreateInfoKHR const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) { *this = display.createMode( createInfo, allocator ); } # endif DisplayModeKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DisplayKHR const & display, VkDisplayModeKHR displayModeKHR ) : m_physicalDevice( display.getPhysicalDevice() ), m_displayModeKHR( displayModeKHR ), m_dispatcher( display.getDispatcher() ) { } DisplayModeKHR( std::nullptr_t ) {} ~DisplayModeKHR() { clear(); } DisplayModeKHR() = delete; DisplayModeKHR( DisplayModeKHR const & rhs ) : m_displayModeKHR( rhs.m_displayModeKHR ), m_dispatcher( rhs.m_dispatcher ) {} DisplayModeKHR( DisplayModeKHR && rhs ) VULKAN_HPP_NOEXCEPT : m_physicalDevice( VULKAN_HPP_NAMESPACE::exchange( rhs.m_physicalDevice, {} ) ) , m_displayModeKHR( VULKAN_HPP_NAMESPACE::exchange( rhs.m_displayModeKHR, {} ) ) , m_dispatcher( VULKAN_HPP_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) { } DisplayModeKHR & operator=( DisplayModeKHR const & rhs ) { m_displayModeKHR = rhs.m_displayModeKHR; m_dispatcher = rhs.m_dispatcher; return *this; } DisplayModeKHR & operator=( DisplayModeKHR && rhs ) VULKAN_HPP_NOEXCEPT { if ( this != &rhs ) { std::swap( m_physicalDevice, rhs.m_physicalDevice ); std::swap( m_displayModeKHR, rhs.m_displayModeKHR ); std::swap( m_dispatcher, rhs.m_dispatcher ); } return *this; } VULKAN_HPP_NAMESPACE::DisplayModeKHR const & operator*() const VULKAN_HPP_NOEXCEPT { return m_displayModeKHR; } operator VULKAN_HPP_NAMESPACE::DisplayModeKHR() const VULKAN_HPP_NOEXCEPT { return m_displayModeKHR; } void clear() VULKAN_HPP_NOEXCEPT { m_physicalDevice = nullptr; m_displayModeKHR = nullptr; m_dispatcher = nullptr; } VULKAN_HPP_NAMESPACE::DisplayModeKHR release() { m_physicalDevice = nullptr; m_dispatcher = nullptr; return VULKAN_HPP_NAMESPACE::exchange( m_displayModeKHR, nullptr ); } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::InstanceDispatcher const * getDispatcher() const { VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); return m_dispatcher; } void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DisplayModeKHR & rhs ) VULKAN_HPP_NOEXCEPT { std::swap( m_physicalDevice, rhs.m_physicalDevice ); std::swap( m_displayModeKHR, rhs.m_displayModeKHR ); std::swap( m_dispatcher, rhs.m_dispatcher ); } //=== VK_KHR_display === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::DisplayPlaneCapabilitiesKHR getDisplayPlaneCapabilities( uint32_t planeIndex ) const; private: VULKAN_HPP_NAMESPACE::PhysicalDevice m_physicalDevice = {}; VULKAN_HPP_NAMESPACE::DisplayModeKHR m_displayModeKHR = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::InstanceDispatcher const * m_dispatcher = nullptr; }; template <> struct isVulkanRAIIHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; class Event { public: using CType = VkEvent; using CppType = VULKAN_HPP_NAMESPACE::Event; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eEvent; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eEvent; public: # if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) Event( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::EventCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) { *this = device.createEvent( createInfo, allocator ); } # endif Event( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkEvent event, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) : m_device( device ) , m_event( event ) , m_allocator( static_cast( allocator ) ) , m_dispatcher( device.getDispatcher() ) { } Event( std::nullptr_t ) {} ~Event() { clear(); } Event() = delete; Event( Event const & ) = delete; Event( Event && rhs ) VULKAN_HPP_NOEXCEPT : m_device( VULKAN_HPP_NAMESPACE::exchange( rhs.m_device, {} ) ) , m_event( VULKAN_HPP_NAMESPACE::exchange( rhs.m_event, {} ) ) , m_allocator( VULKAN_HPP_NAMESPACE::exchange( rhs.m_allocator, {} ) ) , m_dispatcher( VULKAN_HPP_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) { } Event & operator=( Event const & ) = delete; Event & operator=( Event && rhs ) VULKAN_HPP_NOEXCEPT { if ( this != &rhs ) { std::swap( m_device, rhs.m_device ); std::swap( m_event, rhs.m_event ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_dispatcher, rhs.m_dispatcher ); } return *this; } VULKAN_HPP_NAMESPACE::Event const & operator*() const VULKAN_HPP_NOEXCEPT { return m_event; } operator VULKAN_HPP_NAMESPACE::Event() const VULKAN_HPP_NOEXCEPT { return m_event; } void clear() VULKAN_HPP_NOEXCEPT { if ( m_event ) { getDispatcher()->vkDestroyEvent( static_cast( m_device ), static_cast( m_event ), reinterpret_cast( m_allocator ) ); } m_device = nullptr; m_event = nullptr; m_allocator = nullptr; m_dispatcher = nullptr; } VULKAN_HPP_NAMESPACE::Event release() { m_device = nullptr; m_allocator = nullptr; m_dispatcher = nullptr; return VULKAN_HPP_NAMESPACE::exchange( m_event, nullptr ); } VULKAN_HPP_NAMESPACE::Device getDevice() const { return m_device; } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * getDispatcher() const { VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); return m_dispatcher; } void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Event & rhs ) VULKAN_HPP_NOEXCEPT { std::swap( m_device, rhs.m_device ); std::swap( m_event, rhs.m_event ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_dispatcher, rhs.m_dispatcher ); } //=== VK_VERSION_1_0 === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Result getStatus() const; void set() const; void reset() const; private: VULKAN_HPP_NAMESPACE::Device m_device = {}; VULKAN_HPP_NAMESPACE::Event m_event = {}; const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; template <> struct isVulkanRAIIHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; class Fence { public: using CType = VkFence; using CppType = VULKAN_HPP_NAMESPACE::Fence; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eFence; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eFence; public: # if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) Fence( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::FenceCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) { *this = device.createFence( createInfo, allocator ); } # endif # if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) Fence( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::DeviceEventInfoEXT const & deviceEventInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) { *this = device.registerEventEXT( deviceEventInfo, allocator ); } # endif # if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) Fence( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DisplayKHR const & display, VULKAN_HPP_NAMESPACE::DisplayEventInfoEXT const & displayEventInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) { *this = device.registerDisplayEventEXT( display, displayEventInfo, allocator ); } # endif Fence( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkFence fence, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) : m_device( device ) , m_fence( fence ) , m_allocator( static_cast( allocator ) ) , m_dispatcher( device.getDispatcher() ) { } Fence( std::nullptr_t ) {} ~Fence() { clear(); } Fence() = delete; Fence( Fence const & ) = delete; Fence( Fence && rhs ) VULKAN_HPP_NOEXCEPT : m_device( VULKAN_HPP_NAMESPACE::exchange( rhs.m_device, {} ) ) , m_fence( VULKAN_HPP_NAMESPACE::exchange( rhs.m_fence, {} ) ) , m_allocator( VULKAN_HPP_NAMESPACE::exchange( rhs.m_allocator, {} ) ) , m_dispatcher( VULKAN_HPP_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) { } Fence & operator=( Fence const & ) = delete; Fence & operator=( Fence && rhs ) VULKAN_HPP_NOEXCEPT { if ( this != &rhs ) { std::swap( m_device, rhs.m_device ); std::swap( m_fence, rhs.m_fence ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_dispatcher, rhs.m_dispatcher ); } return *this; } VULKAN_HPP_NAMESPACE::Fence const & operator*() const VULKAN_HPP_NOEXCEPT { return m_fence; } operator VULKAN_HPP_NAMESPACE::Fence() const VULKAN_HPP_NOEXCEPT { return m_fence; } void clear() VULKAN_HPP_NOEXCEPT { if ( m_fence ) { getDispatcher()->vkDestroyFence( static_cast( m_device ), static_cast( m_fence ), reinterpret_cast( m_allocator ) ); } m_device = nullptr; m_fence = nullptr; m_allocator = nullptr; m_dispatcher = nullptr; } VULKAN_HPP_NAMESPACE::Fence release() { m_device = nullptr; m_allocator = nullptr; m_dispatcher = nullptr; return VULKAN_HPP_NAMESPACE::exchange( m_fence, nullptr ); } VULKAN_HPP_NAMESPACE::Device getDevice() const { return m_device; } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * getDispatcher() const { VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); return m_dispatcher; } void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Fence & rhs ) VULKAN_HPP_NOEXCEPT { std::swap( m_device, rhs.m_device ); std::swap( m_fence, rhs.m_fence ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_dispatcher, rhs.m_dispatcher ); } //=== VK_VERSION_1_0 === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Result getStatus() const; private: VULKAN_HPP_NAMESPACE::Device m_device = {}; VULKAN_HPP_NAMESPACE::Fence m_fence = {}; const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; template <> struct isVulkanRAIIHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; class Framebuffer { public: using CType = VkFramebuffer; using CppType = VULKAN_HPP_NAMESPACE::Framebuffer; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eFramebuffer; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eFramebuffer; public: # if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) Framebuffer( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::FramebufferCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) { *this = device.createFramebuffer( createInfo, allocator ); } # endif Framebuffer( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkFramebuffer framebuffer, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) : m_device( device ) , m_framebuffer( framebuffer ) , m_allocator( static_cast( allocator ) ) , m_dispatcher( device.getDispatcher() ) { } Framebuffer( std::nullptr_t ) {} ~Framebuffer() { clear(); } Framebuffer() = delete; Framebuffer( Framebuffer const & ) = delete; Framebuffer( Framebuffer && rhs ) VULKAN_HPP_NOEXCEPT : m_device( VULKAN_HPP_NAMESPACE::exchange( rhs.m_device, {} ) ) , m_framebuffer( VULKAN_HPP_NAMESPACE::exchange( rhs.m_framebuffer, {} ) ) , m_allocator( VULKAN_HPP_NAMESPACE::exchange( rhs.m_allocator, {} ) ) , m_dispatcher( VULKAN_HPP_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) { } Framebuffer & operator=( Framebuffer const & ) = delete; Framebuffer & operator=( Framebuffer && rhs ) VULKAN_HPP_NOEXCEPT { if ( this != &rhs ) { std::swap( m_device, rhs.m_device ); std::swap( m_framebuffer, rhs.m_framebuffer ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_dispatcher, rhs.m_dispatcher ); } return *this; } VULKAN_HPP_NAMESPACE::Framebuffer const & operator*() const VULKAN_HPP_NOEXCEPT { return m_framebuffer; } operator VULKAN_HPP_NAMESPACE::Framebuffer() const VULKAN_HPP_NOEXCEPT { return m_framebuffer; } void clear() VULKAN_HPP_NOEXCEPT { if ( m_framebuffer ) { getDispatcher()->vkDestroyFramebuffer( static_cast( m_device ), static_cast( m_framebuffer ), reinterpret_cast( m_allocator ) ); } m_device = nullptr; m_framebuffer = nullptr; m_allocator = nullptr; m_dispatcher = nullptr; } VULKAN_HPP_NAMESPACE::Framebuffer release() { m_device = nullptr; m_allocator = nullptr; m_dispatcher = nullptr; return VULKAN_HPP_NAMESPACE::exchange( m_framebuffer, nullptr ); } VULKAN_HPP_NAMESPACE::Device getDevice() const { return m_device; } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * getDispatcher() const { VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); return m_dispatcher; } void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Framebuffer & rhs ) VULKAN_HPP_NOEXCEPT { std::swap( m_device, rhs.m_device ); std::swap( m_framebuffer, rhs.m_framebuffer ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_dispatcher, rhs.m_dispatcher ); } //=== VK_QCOM_tile_properties === VULKAN_HPP_NODISCARD std::vector getTilePropertiesQCOM() const; private: VULKAN_HPP_NAMESPACE::Device m_device = {}; VULKAN_HPP_NAMESPACE::Framebuffer m_framebuffer = {}; const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; template <> struct isVulkanRAIIHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; class Image { public: using CType = VkImage; using CppType = VULKAN_HPP_NAMESPACE::Image; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eImage; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eImage; public: # if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) Image( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::ImageCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) { *this = device.createImage( createInfo, allocator ); } # endif Image( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkImage image, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) : m_device( device ) , m_image( image ) , m_allocator( static_cast( allocator ) ) , m_dispatcher( device.getDispatcher() ) { } Image( std::nullptr_t ) {} ~Image() { clear(); } Image() = delete; Image( Image const & ) = delete; Image( Image && rhs ) VULKAN_HPP_NOEXCEPT : m_device( VULKAN_HPP_NAMESPACE::exchange( rhs.m_device, {} ) ) , m_image( VULKAN_HPP_NAMESPACE::exchange( rhs.m_image, {} ) ) , m_allocator( VULKAN_HPP_NAMESPACE::exchange( rhs.m_allocator, {} ) ) , m_dispatcher( VULKAN_HPP_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) { } Image & operator=( Image const & ) = delete; Image & operator=( Image && rhs ) VULKAN_HPP_NOEXCEPT { if ( this != &rhs ) { std::swap( m_device, rhs.m_device ); std::swap( m_image, rhs.m_image ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_dispatcher, rhs.m_dispatcher ); } return *this; } VULKAN_HPP_NAMESPACE::Image const & operator*() const VULKAN_HPP_NOEXCEPT { return m_image; } operator VULKAN_HPP_NAMESPACE::Image() const VULKAN_HPP_NOEXCEPT { return m_image; } void clear() VULKAN_HPP_NOEXCEPT { if ( m_image ) { getDispatcher()->vkDestroyImage( static_cast( m_device ), static_cast( m_image ), reinterpret_cast( m_allocator ) ); } m_device = nullptr; m_image = nullptr; m_allocator = nullptr; m_dispatcher = nullptr; } VULKAN_HPP_NAMESPACE::Image release() { m_device = nullptr; m_allocator = nullptr; m_dispatcher = nullptr; return VULKAN_HPP_NAMESPACE::exchange( m_image, nullptr ); } VULKAN_HPP_NAMESPACE::Device getDevice() const { return m_device; } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * getDispatcher() const { VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); return m_dispatcher; } void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Image & rhs ) VULKAN_HPP_NOEXCEPT { std::swap( m_device, rhs.m_device ); std::swap( m_image, rhs.m_image ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_dispatcher, rhs.m_dispatcher ); } //=== VK_VERSION_1_0 === void bindMemory( VULKAN_HPP_NAMESPACE::DeviceMemory memory, VULKAN_HPP_NAMESPACE::DeviceSize memoryOffset ) const; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::MemoryRequirements getMemoryRequirements() const VULKAN_HPP_NOEXCEPT; VULKAN_HPP_NODISCARD std::vector getSparseMemoryRequirements() const; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::SubresourceLayout getSubresourceLayout( const VULKAN_HPP_NAMESPACE::ImageSubresource & subresource ) const VULKAN_HPP_NOEXCEPT; //=== VK_VERSION_1_4 === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::SubresourceLayout2 getSubresourceLayout2( const VULKAN_HPP_NAMESPACE::ImageSubresource2 & subresource ) const VULKAN_HPP_NOEXCEPT; template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::StructureChain getSubresourceLayout2( const VULKAN_HPP_NAMESPACE::ImageSubresource2 & subresource ) const VULKAN_HPP_NOEXCEPT; //=== VK_EXT_image_drm_format_modifier === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::ImageDrmFormatModifierPropertiesEXT getDrmFormatModifierPropertiesEXT() const; //=== VK_EXT_host_image_copy === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::SubresourceLayout2 getSubresourceLayout2EXT( const VULKAN_HPP_NAMESPACE::ImageSubresource2 & subresource ) const VULKAN_HPP_NOEXCEPT; template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::StructureChain getSubresourceLayout2EXT( const VULKAN_HPP_NAMESPACE::ImageSubresource2 & subresource ) const VULKAN_HPP_NOEXCEPT; //=== VK_KHR_maintenance5 === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::SubresourceLayout2 getSubresourceLayout2KHR( const VULKAN_HPP_NAMESPACE::ImageSubresource2 & subresource ) const VULKAN_HPP_NOEXCEPT; template VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::StructureChain getSubresourceLayout2KHR( const VULKAN_HPP_NAMESPACE::ImageSubresource2 & subresource ) const VULKAN_HPP_NOEXCEPT; private: VULKAN_HPP_NAMESPACE::Device m_device = {}; VULKAN_HPP_NAMESPACE::Image m_image = {}; const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; template <> struct isVulkanRAIIHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; class ImageView { public: using CType = VkImageView; using CppType = VULKAN_HPP_NAMESPACE::ImageView; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eImageView; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eImageView; public: # if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) ImageView( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::ImageViewCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) { *this = device.createImageView( createInfo, allocator ); } # endif ImageView( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkImageView imageView, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) : m_device( device ) , m_imageView( imageView ) , m_allocator( static_cast( allocator ) ) , m_dispatcher( device.getDispatcher() ) { } ImageView( std::nullptr_t ) {} ~ImageView() { clear(); } ImageView() = delete; ImageView( ImageView const & ) = delete; ImageView( ImageView && rhs ) VULKAN_HPP_NOEXCEPT : m_device( VULKAN_HPP_NAMESPACE::exchange( rhs.m_device, {} ) ) , m_imageView( VULKAN_HPP_NAMESPACE::exchange( rhs.m_imageView, {} ) ) , m_allocator( VULKAN_HPP_NAMESPACE::exchange( rhs.m_allocator, {} ) ) , m_dispatcher( VULKAN_HPP_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) { } ImageView & operator=( ImageView const & ) = delete; ImageView & operator=( ImageView && rhs ) VULKAN_HPP_NOEXCEPT { if ( this != &rhs ) { std::swap( m_device, rhs.m_device ); std::swap( m_imageView, rhs.m_imageView ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_dispatcher, rhs.m_dispatcher ); } return *this; } VULKAN_HPP_NAMESPACE::ImageView const & operator*() const VULKAN_HPP_NOEXCEPT { return m_imageView; } operator VULKAN_HPP_NAMESPACE::ImageView() const VULKAN_HPP_NOEXCEPT { return m_imageView; } void clear() VULKAN_HPP_NOEXCEPT { if ( m_imageView ) { getDispatcher()->vkDestroyImageView( static_cast( m_device ), static_cast( m_imageView ), reinterpret_cast( m_allocator ) ); } m_device = nullptr; m_imageView = nullptr; m_allocator = nullptr; m_dispatcher = nullptr; } VULKAN_HPP_NAMESPACE::ImageView release() { m_device = nullptr; m_allocator = nullptr; m_dispatcher = nullptr; return VULKAN_HPP_NAMESPACE::exchange( m_imageView, nullptr ); } VULKAN_HPP_NAMESPACE::Device getDevice() const { return m_device; } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * getDispatcher() const { VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); return m_dispatcher; } void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::ImageView & rhs ) VULKAN_HPP_NOEXCEPT { std::swap( m_device, rhs.m_device ); std::swap( m_imageView, rhs.m_imageView ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_dispatcher, rhs.m_dispatcher ); } //=== VK_NVX_image_view_handle === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::ImageViewAddressPropertiesNVX getAddressNVX() const; private: VULKAN_HPP_NAMESPACE::Device m_device = {}; VULKAN_HPP_NAMESPACE::ImageView m_imageView = {}; const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; template <> struct isVulkanRAIIHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; class IndirectCommandsLayoutEXT { public: using CType = VkIndirectCommandsLayoutEXT; using CppType = VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutEXT; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eIndirectCommandsLayoutEXT; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eUnknown; public: # if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) IndirectCommandsLayoutEXT( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutCreateInfoEXT const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) { *this = device.createIndirectCommandsLayoutEXT( createInfo, allocator ); } # endif IndirectCommandsLayoutEXT( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkIndirectCommandsLayoutEXT indirectCommandsLayout, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) : m_device( device ) , m_indirectCommandsLayout( indirectCommandsLayout ) , m_allocator( static_cast( allocator ) ) , m_dispatcher( device.getDispatcher() ) { } IndirectCommandsLayoutEXT( std::nullptr_t ) {} ~IndirectCommandsLayoutEXT() { clear(); } IndirectCommandsLayoutEXT() = delete; IndirectCommandsLayoutEXT( IndirectCommandsLayoutEXT const & ) = delete; IndirectCommandsLayoutEXT( IndirectCommandsLayoutEXT && rhs ) VULKAN_HPP_NOEXCEPT : m_device( VULKAN_HPP_NAMESPACE::exchange( rhs.m_device, {} ) ) , m_indirectCommandsLayout( VULKAN_HPP_NAMESPACE::exchange( rhs.m_indirectCommandsLayout, {} ) ) , m_allocator( VULKAN_HPP_NAMESPACE::exchange( rhs.m_allocator, {} ) ) , m_dispatcher( VULKAN_HPP_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) { } IndirectCommandsLayoutEXT & operator=( IndirectCommandsLayoutEXT const & ) = delete; IndirectCommandsLayoutEXT & operator=( IndirectCommandsLayoutEXT && rhs ) VULKAN_HPP_NOEXCEPT { if ( this != &rhs ) { std::swap( m_device, rhs.m_device ); std::swap( m_indirectCommandsLayout, rhs.m_indirectCommandsLayout ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_dispatcher, rhs.m_dispatcher ); } return *this; } VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutEXT const & operator*() const VULKAN_HPP_NOEXCEPT { return m_indirectCommandsLayout; } operator VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutEXT() const VULKAN_HPP_NOEXCEPT { return m_indirectCommandsLayout; } void clear() VULKAN_HPP_NOEXCEPT { if ( m_indirectCommandsLayout ) { getDispatcher()->vkDestroyIndirectCommandsLayoutEXT( static_cast( m_device ), static_cast( m_indirectCommandsLayout ), reinterpret_cast( m_allocator ) ); } m_device = nullptr; m_indirectCommandsLayout = nullptr; m_allocator = nullptr; m_dispatcher = nullptr; } VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutEXT release() { m_device = nullptr; m_allocator = nullptr; m_dispatcher = nullptr; return VULKAN_HPP_NAMESPACE::exchange( m_indirectCommandsLayout, nullptr ); } VULKAN_HPP_NAMESPACE::Device getDevice() const { return m_device; } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * getDispatcher() const { VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); return m_dispatcher; } void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::IndirectCommandsLayoutEXT & rhs ) VULKAN_HPP_NOEXCEPT { std::swap( m_device, rhs.m_device ); std::swap( m_indirectCommandsLayout, rhs.m_indirectCommandsLayout ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_dispatcher, rhs.m_dispatcher ); } private: VULKAN_HPP_NAMESPACE::Device m_device = {}; VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutEXT m_indirectCommandsLayout = {}; const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; template <> struct isVulkanRAIIHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; class IndirectCommandsLayoutNV { public: using CType = VkIndirectCommandsLayoutNV; using CppType = VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNV; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eIndirectCommandsLayoutNV; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eUnknown; public: # if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) IndirectCommandsLayoutNV( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutCreateInfoNV const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) { *this = device.createIndirectCommandsLayoutNV( createInfo, allocator ); } # endif IndirectCommandsLayoutNV( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkIndirectCommandsLayoutNV indirectCommandsLayout, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) : m_device( device ) , m_indirectCommandsLayout( indirectCommandsLayout ) , m_allocator( static_cast( allocator ) ) , m_dispatcher( device.getDispatcher() ) { } IndirectCommandsLayoutNV( std::nullptr_t ) {} ~IndirectCommandsLayoutNV() { clear(); } IndirectCommandsLayoutNV() = delete; IndirectCommandsLayoutNV( IndirectCommandsLayoutNV const & ) = delete; IndirectCommandsLayoutNV( IndirectCommandsLayoutNV && rhs ) VULKAN_HPP_NOEXCEPT : m_device( VULKAN_HPP_NAMESPACE::exchange( rhs.m_device, {} ) ) , m_indirectCommandsLayout( VULKAN_HPP_NAMESPACE::exchange( rhs.m_indirectCommandsLayout, {} ) ) , m_allocator( VULKAN_HPP_NAMESPACE::exchange( rhs.m_allocator, {} ) ) , m_dispatcher( VULKAN_HPP_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) { } IndirectCommandsLayoutNV & operator=( IndirectCommandsLayoutNV const & ) = delete; IndirectCommandsLayoutNV & operator=( IndirectCommandsLayoutNV && rhs ) VULKAN_HPP_NOEXCEPT { if ( this != &rhs ) { std::swap( m_device, rhs.m_device ); std::swap( m_indirectCommandsLayout, rhs.m_indirectCommandsLayout ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_dispatcher, rhs.m_dispatcher ); } return *this; } VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNV const & operator*() const VULKAN_HPP_NOEXCEPT { return m_indirectCommandsLayout; } operator VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNV() const VULKAN_HPP_NOEXCEPT { return m_indirectCommandsLayout; } void clear() VULKAN_HPP_NOEXCEPT { if ( m_indirectCommandsLayout ) { getDispatcher()->vkDestroyIndirectCommandsLayoutNV( static_cast( m_device ), static_cast( m_indirectCommandsLayout ), reinterpret_cast( m_allocator ) ); } m_device = nullptr; m_indirectCommandsLayout = nullptr; m_allocator = nullptr; m_dispatcher = nullptr; } VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNV release() { m_device = nullptr; m_allocator = nullptr; m_dispatcher = nullptr; return VULKAN_HPP_NAMESPACE::exchange( m_indirectCommandsLayout, nullptr ); } VULKAN_HPP_NAMESPACE::Device getDevice() const { return m_device; } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * getDispatcher() const { VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); return m_dispatcher; } void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::IndirectCommandsLayoutNV & rhs ) VULKAN_HPP_NOEXCEPT { std::swap( m_device, rhs.m_device ); std::swap( m_indirectCommandsLayout, rhs.m_indirectCommandsLayout ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_dispatcher, rhs.m_dispatcher ); } private: VULKAN_HPP_NAMESPACE::Device m_device = {}; VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNV m_indirectCommandsLayout = {}; const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; template <> struct isVulkanRAIIHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; class IndirectExecutionSetEXT { public: using CType = VkIndirectExecutionSetEXT; using CppType = VULKAN_HPP_NAMESPACE::IndirectExecutionSetEXT; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eIndirectExecutionSetEXT; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eUnknown; public: # if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) IndirectExecutionSetEXT( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::IndirectExecutionSetCreateInfoEXT const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) { *this = device.createIndirectExecutionSetEXT( createInfo, allocator ); } # endif IndirectExecutionSetEXT( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkIndirectExecutionSetEXT indirectExecutionSet, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) : m_device( device ) , m_indirectExecutionSet( indirectExecutionSet ) , m_allocator( static_cast( allocator ) ) , m_dispatcher( device.getDispatcher() ) { } IndirectExecutionSetEXT( std::nullptr_t ) {} ~IndirectExecutionSetEXT() { clear(); } IndirectExecutionSetEXT() = delete; IndirectExecutionSetEXT( IndirectExecutionSetEXT const & ) = delete; IndirectExecutionSetEXT( IndirectExecutionSetEXT && rhs ) VULKAN_HPP_NOEXCEPT : m_device( VULKAN_HPP_NAMESPACE::exchange( rhs.m_device, {} ) ) , m_indirectExecutionSet( VULKAN_HPP_NAMESPACE::exchange( rhs.m_indirectExecutionSet, {} ) ) , m_allocator( VULKAN_HPP_NAMESPACE::exchange( rhs.m_allocator, {} ) ) , m_dispatcher( VULKAN_HPP_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) { } IndirectExecutionSetEXT & operator=( IndirectExecutionSetEXT const & ) = delete; IndirectExecutionSetEXT & operator=( IndirectExecutionSetEXT && rhs ) VULKAN_HPP_NOEXCEPT { if ( this != &rhs ) { std::swap( m_device, rhs.m_device ); std::swap( m_indirectExecutionSet, rhs.m_indirectExecutionSet ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_dispatcher, rhs.m_dispatcher ); } return *this; } VULKAN_HPP_NAMESPACE::IndirectExecutionSetEXT const & operator*() const VULKAN_HPP_NOEXCEPT { return m_indirectExecutionSet; } operator VULKAN_HPP_NAMESPACE::IndirectExecutionSetEXT() const VULKAN_HPP_NOEXCEPT { return m_indirectExecutionSet; } void clear() VULKAN_HPP_NOEXCEPT { if ( m_indirectExecutionSet ) { getDispatcher()->vkDestroyIndirectExecutionSetEXT( static_cast( m_device ), static_cast( m_indirectExecutionSet ), reinterpret_cast( m_allocator ) ); } m_device = nullptr; m_indirectExecutionSet = nullptr; m_allocator = nullptr; m_dispatcher = nullptr; } VULKAN_HPP_NAMESPACE::IndirectExecutionSetEXT release() { m_device = nullptr; m_allocator = nullptr; m_dispatcher = nullptr; return VULKAN_HPP_NAMESPACE::exchange( m_indirectExecutionSet, nullptr ); } VULKAN_HPP_NAMESPACE::Device getDevice() const { return m_device; } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * getDispatcher() const { VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); return m_dispatcher; } void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::IndirectExecutionSetEXT & rhs ) VULKAN_HPP_NOEXCEPT { std::swap( m_device, rhs.m_device ); std::swap( m_indirectExecutionSet, rhs.m_indirectExecutionSet ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_dispatcher, rhs.m_dispatcher ); } //=== VK_EXT_device_generated_commands === void updatePipeline( VULKAN_HPP_NAMESPACE::ArrayProxy const & executionSetWrites ) const VULKAN_HPP_NOEXCEPT; void updateShader( VULKAN_HPP_NAMESPACE::ArrayProxy const & executionSetWrites ) const VULKAN_HPP_NOEXCEPT; private: VULKAN_HPP_NAMESPACE::Device m_device = {}; VULKAN_HPP_NAMESPACE::IndirectExecutionSetEXT m_indirectExecutionSet = {}; const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; template <> struct isVulkanRAIIHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; class MicromapEXT { public: using CType = VkMicromapEXT; using CppType = VULKAN_HPP_NAMESPACE::MicromapEXT; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eMicromapEXT; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eUnknown; public: # if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) MicromapEXT( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::MicromapCreateInfoEXT const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) { *this = device.createMicromapEXT( createInfo, allocator ); } # endif MicromapEXT( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkMicromapEXT micromap, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) : m_device( device ) , m_micromap( micromap ) , m_allocator( static_cast( allocator ) ) , m_dispatcher( device.getDispatcher() ) { } MicromapEXT( std::nullptr_t ) {} ~MicromapEXT() { clear(); } MicromapEXT() = delete; MicromapEXT( MicromapEXT const & ) = delete; MicromapEXT( MicromapEXT && rhs ) VULKAN_HPP_NOEXCEPT : m_device( VULKAN_HPP_NAMESPACE::exchange( rhs.m_device, {} ) ) , m_micromap( VULKAN_HPP_NAMESPACE::exchange( rhs.m_micromap, {} ) ) , m_allocator( VULKAN_HPP_NAMESPACE::exchange( rhs.m_allocator, {} ) ) , m_dispatcher( VULKAN_HPP_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) { } MicromapEXT & operator=( MicromapEXT const & ) = delete; MicromapEXT & operator=( MicromapEXT && rhs ) VULKAN_HPP_NOEXCEPT { if ( this != &rhs ) { std::swap( m_device, rhs.m_device ); std::swap( m_micromap, rhs.m_micromap ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_dispatcher, rhs.m_dispatcher ); } return *this; } VULKAN_HPP_NAMESPACE::MicromapEXT const & operator*() const VULKAN_HPP_NOEXCEPT { return m_micromap; } operator VULKAN_HPP_NAMESPACE::MicromapEXT() const VULKAN_HPP_NOEXCEPT { return m_micromap; } void clear() VULKAN_HPP_NOEXCEPT { if ( m_micromap ) { getDispatcher()->vkDestroyMicromapEXT( static_cast( m_device ), static_cast( m_micromap ), reinterpret_cast( m_allocator ) ); } m_device = nullptr; m_micromap = nullptr; m_allocator = nullptr; m_dispatcher = nullptr; } VULKAN_HPP_NAMESPACE::MicromapEXT release() { m_device = nullptr; m_allocator = nullptr; m_dispatcher = nullptr; return VULKAN_HPP_NAMESPACE::exchange( m_micromap, nullptr ); } VULKAN_HPP_NAMESPACE::Device getDevice() const { return m_device; } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * getDispatcher() const { VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); return m_dispatcher; } void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::MicromapEXT & rhs ) VULKAN_HPP_NOEXCEPT { std::swap( m_device, rhs.m_device ); std::swap( m_micromap, rhs.m_micromap ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_dispatcher, rhs.m_dispatcher ); } private: VULKAN_HPP_NAMESPACE::Device m_device = {}; VULKAN_HPP_NAMESPACE::MicromapEXT m_micromap = {}; const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; template <> struct isVulkanRAIIHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; class OpticalFlowSessionNV { public: using CType = VkOpticalFlowSessionNV; using CppType = VULKAN_HPP_NAMESPACE::OpticalFlowSessionNV; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eOpticalFlowSessionNV; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eUnknown; public: # if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) OpticalFlowSessionNV( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::OpticalFlowSessionCreateInfoNV const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) { *this = device.createOpticalFlowSessionNV( createInfo, allocator ); } # endif OpticalFlowSessionNV( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkOpticalFlowSessionNV session, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) : m_device( device ) , m_session( session ) , m_allocator( static_cast( allocator ) ) , m_dispatcher( device.getDispatcher() ) { } OpticalFlowSessionNV( std::nullptr_t ) {} ~OpticalFlowSessionNV() { clear(); } OpticalFlowSessionNV() = delete; OpticalFlowSessionNV( OpticalFlowSessionNV const & ) = delete; OpticalFlowSessionNV( OpticalFlowSessionNV && rhs ) VULKAN_HPP_NOEXCEPT : m_device( VULKAN_HPP_NAMESPACE::exchange( rhs.m_device, {} ) ) , m_session( VULKAN_HPP_NAMESPACE::exchange( rhs.m_session, {} ) ) , m_allocator( VULKAN_HPP_NAMESPACE::exchange( rhs.m_allocator, {} ) ) , m_dispatcher( VULKAN_HPP_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) { } OpticalFlowSessionNV & operator=( OpticalFlowSessionNV const & ) = delete; OpticalFlowSessionNV & operator=( OpticalFlowSessionNV && rhs ) VULKAN_HPP_NOEXCEPT { if ( this != &rhs ) { std::swap( m_device, rhs.m_device ); std::swap( m_session, rhs.m_session ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_dispatcher, rhs.m_dispatcher ); } return *this; } VULKAN_HPP_NAMESPACE::OpticalFlowSessionNV const & operator*() const VULKAN_HPP_NOEXCEPT { return m_session; } operator VULKAN_HPP_NAMESPACE::OpticalFlowSessionNV() const VULKAN_HPP_NOEXCEPT { return m_session; } void clear() VULKAN_HPP_NOEXCEPT { if ( m_session ) { getDispatcher()->vkDestroyOpticalFlowSessionNV( static_cast( m_device ), static_cast( m_session ), reinterpret_cast( m_allocator ) ); } m_device = nullptr; m_session = nullptr; m_allocator = nullptr; m_dispatcher = nullptr; } VULKAN_HPP_NAMESPACE::OpticalFlowSessionNV release() { m_device = nullptr; m_allocator = nullptr; m_dispatcher = nullptr; return VULKAN_HPP_NAMESPACE::exchange( m_session, nullptr ); } VULKAN_HPP_NAMESPACE::Device getDevice() const { return m_device; } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * getDispatcher() const { VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); return m_dispatcher; } void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::OpticalFlowSessionNV & rhs ) VULKAN_HPP_NOEXCEPT { std::swap( m_device, rhs.m_device ); std::swap( m_session, rhs.m_session ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_dispatcher, rhs.m_dispatcher ); } //=== VK_NV_optical_flow === void bindImage( VULKAN_HPP_NAMESPACE::OpticalFlowSessionBindingPointNV bindingPoint, VULKAN_HPP_NAMESPACE::ImageView view, VULKAN_HPP_NAMESPACE::ImageLayout layout ) const; private: VULKAN_HPP_NAMESPACE::Device m_device = {}; VULKAN_HPP_NAMESPACE::OpticalFlowSessionNV m_session = {}; const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; template <> struct isVulkanRAIIHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; class PerformanceConfigurationINTEL { public: using CType = VkPerformanceConfigurationINTEL; using CppType = VULKAN_HPP_NAMESPACE::PerformanceConfigurationINTEL; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::ePerformanceConfigurationINTEL; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eUnknown; public: # if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) PerformanceConfigurationINTEL( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::PerformanceConfigurationAcquireInfoINTEL const & acquireInfo ) { *this = device.acquirePerformanceConfigurationINTEL( acquireInfo ); } # endif PerformanceConfigurationINTEL( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkPerformanceConfigurationINTEL configuration ) : m_device( device ), m_configuration( configuration ), m_dispatcher( device.getDispatcher() ) { } PerformanceConfigurationINTEL( std::nullptr_t ) {} ~PerformanceConfigurationINTEL() { clear(); } PerformanceConfigurationINTEL() = delete; PerformanceConfigurationINTEL( PerformanceConfigurationINTEL const & ) = delete; PerformanceConfigurationINTEL( PerformanceConfigurationINTEL && rhs ) VULKAN_HPP_NOEXCEPT : m_device( VULKAN_HPP_NAMESPACE::exchange( rhs.m_device, {} ) ) , m_configuration( VULKAN_HPP_NAMESPACE::exchange( rhs.m_configuration, {} ) ) , m_dispatcher( VULKAN_HPP_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) { } PerformanceConfigurationINTEL & operator=( PerformanceConfigurationINTEL const & ) = delete; PerformanceConfigurationINTEL & operator=( PerformanceConfigurationINTEL && rhs ) VULKAN_HPP_NOEXCEPT { if ( this != &rhs ) { std::swap( m_device, rhs.m_device ); std::swap( m_configuration, rhs.m_configuration ); std::swap( m_dispatcher, rhs.m_dispatcher ); } return *this; } VULKAN_HPP_NAMESPACE::PerformanceConfigurationINTEL const & operator*() const VULKAN_HPP_NOEXCEPT { return m_configuration; } operator VULKAN_HPP_NAMESPACE::PerformanceConfigurationINTEL() const VULKAN_HPP_NOEXCEPT { return m_configuration; } void clear() VULKAN_HPP_NOEXCEPT { if ( m_configuration ) { getDispatcher()->vkReleasePerformanceConfigurationINTEL( static_cast( m_device ), static_cast( m_configuration ) ); } m_device = nullptr; m_configuration = nullptr; m_dispatcher = nullptr; } VULKAN_HPP_NAMESPACE::PerformanceConfigurationINTEL release() { m_device = nullptr; m_dispatcher = nullptr; return VULKAN_HPP_NAMESPACE::exchange( m_configuration, nullptr ); } VULKAN_HPP_NAMESPACE::Device getDevice() const { return m_device; } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * getDispatcher() const { VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); return m_dispatcher; } void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::PerformanceConfigurationINTEL & rhs ) VULKAN_HPP_NOEXCEPT { std::swap( m_device, rhs.m_device ); std::swap( m_configuration, rhs.m_configuration ); std::swap( m_dispatcher, rhs.m_dispatcher ); } private: VULKAN_HPP_NAMESPACE::Device m_device = {}; VULKAN_HPP_NAMESPACE::PerformanceConfigurationINTEL m_configuration = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; template <> struct isVulkanRAIIHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; class PipelineCache { public: using CType = VkPipelineCache; using CppType = VULKAN_HPP_NAMESPACE::PipelineCache; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::ePipelineCache; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::ePipelineCache; public: # if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) PipelineCache( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::PipelineCacheCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) { *this = device.createPipelineCache( createInfo, allocator ); } # endif PipelineCache( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkPipelineCache pipelineCache, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) : m_device( device ) , m_pipelineCache( pipelineCache ) , m_allocator( static_cast( allocator ) ) , m_dispatcher( device.getDispatcher() ) { } PipelineCache( std::nullptr_t ) {} ~PipelineCache() { clear(); } PipelineCache() = delete; PipelineCache( PipelineCache const & ) = delete; PipelineCache( PipelineCache && rhs ) VULKAN_HPP_NOEXCEPT : m_device( VULKAN_HPP_NAMESPACE::exchange( rhs.m_device, {} ) ) , m_pipelineCache( VULKAN_HPP_NAMESPACE::exchange( rhs.m_pipelineCache, {} ) ) , m_allocator( VULKAN_HPP_NAMESPACE::exchange( rhs.m_allocator, {} ) ) , m_dispatcher( VULKAN_HPP_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) { } PipelineCache & operator=( PipelineCache const & ) = delete; PipelineCache & operator=( PipelineCache && rhs ) VULKAN_HPP_NOEXCEPT { if ( this != &rhs ) { std::swap( m_device, rhs.m_device ); std::swap( m_pipelineCache, rhs.m_pipelineCache ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_dispatcher, rhs.m_dispatcher ); } return *this; } VULKAN_HPP_NAMESPACE::PipelineCache const & operator*() const VULKAN_HPP_NOEXCEPT { return m_pipelineCache; } operator VULKAN_HPP_NAMESPACE::PipelineCache() const VULKAN_HPP_NOEXCEPT { return m_pipelineCache; } void clear() VULKAN_HPP_NOEXCEPT { if ( m_pipelineCache ) { getDispatcher()->vkDestroyPipelineCache( static_cast( m_device ), static_cast( m_pipelineCache ), reinterpret_cast( m_allocator ) ); } m_device = nullptr; m_pipelineCache = nullptr; m_allocator = nullptr; m_dispatcher = nullptr; } VULKAN_HPP_NAMESPACE::PipelineCache release() { m_device = nullptr; m_allocator = nullptr; m_dispatcher = nullptr; return VULKAN_HPP_NAMESPACE::exchange( m_pipelineCache, nullptr ); } VULKAN_HPP_NAMESPACE::Device getDevice() const { return m_device; } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * getDispatcher() const { VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); return m_dispatcher; } void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::PipelineCache & rhs ) VULKAN_HPP_NOEXCEPT { std::swap( m_device, rhs.m_device ); std::swap( m_pipelineCache, rhs.m_pipelineCache ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_dispatcher, rhs.m_dispatcher ); } //=== VK_VERSION_1_0 === VULKAN_HPP_NODISCARD std::vector getData() const; void merge( VULKAN_HPP_NAMESPACE::ArrayProxy const & srcCaches ) const; private: VULKAN_HPP_NAMESPACE::Device m_device = {}; VULKAN_HPP_NAMESPACE::PipelineCache m_pipelineCache = {}; const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; template <> struct isVulkanRAIIHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; class Pipeline { public: using CType = VkPipeline; using CppType = VULKAN_HPP_NAMESPACE::Pipeline; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::ePipeline; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::ePipeline; public: # if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) Pipeline( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, VULKAN_HPP_NAMESPACE::ComputePipelineCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) { *this = device.createComputePipeline( pipelineCache, createInfo, allocator ); } # endif # if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) # if defined( VK_ENABLE_BETA_EXTENSIONS ) Pipeline( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, VULKAN_HPP_NAMESPACE::ExecutionGraphPipelineCreateInfoAMDX const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) { *this = device.createExecutionGraphPipelineAMDX( pipelineCache, createInfo, allocator ); } # endif /*VK_ENABLE_BETA_EXTENSIONS*/ # endif # if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) Pipeline( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, VULKAN_HPP_NAMESPACE::GraphicsPipelineCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) { *this = device.createGraphicsPipeline( pipelineCache, createInfo, allocator ); } # endif # if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) Pipeline( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::Optional const & deferredOperation, VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, VULKAN_HPP_NAMESPACE::RayTracingPipelineCreateInfoKHR const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) { *this = device.createRayTracingPipelineKHR( deferredOperation, pipelineCache, createInfo, allocator ); } # endif # if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) Pipeline( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, VULKAN_HPP_NAMESPACE::RayTracingPipelineCreateInfoNV const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) { *this = device.createRayTracingPipelineNV( pipelineCache, createInfo, allocator ); } # endif Pipeline( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkPipeline pipeline, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr, VULKAN_HPP_NAMESPACE::Result successCode = VULKAN_HPP_NAMESPACE::Result::eSuccess ) : m_device( device ) , m_pipeline( pipeline ) , m_allocator( static_cast( allocator ) ) , m_constructorSuccessCode( successCode ) , m_dispatcher( device.getDispatcher() ) { } Pipeline( std::nullptr_t ) {} ~Pipeline() { clear(); } Pipeline() = delete; Pipeline( Pipeline const & ) = delete; Pipeline( Pipeline && rhs ) VULKAN_HPP_NOEXCEPT : m_device( VULKAN_HPP_NAMESPACE::exchange( rhs.m_device, {} ) ) , m_pipeline( VULKAN_HPP_NAMESPACE::exchange( rhs.m_pipeline, {} ) ) , m_allocator( VULKAN_HPP_NAMESPACE::exchange( rhs.m_allocator, {} ) ) , m_constructorSuccessCode( VULKAN_HPP_NAMESPACE::exchange( rhs.m_constructorSuccessCode, {} ) ) , m_dispatcher( VULKAN_HPP_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) { } Pipeline & operator=( Pipeline const & ) = delete; Pipeline & operator=( Pipeline && rhs ) VULKAN_HPP_NOEXCEPT { if ( this != &rhs ) { std::swap( m_device, rhs.m_device ); std::swap( m_pipeline, rhs.m_pipeline ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_constructorSuccessCode, rhs.m_constructorSuccessCode ); std::swap( m_dispatcher, rhs.m_dispatcher ); } return *this; } VULKAN_HPP_NAMESPACE::Pipeline const & operator*() const VULKAN_HPP_NOEXCEPT { return m_pipeline; } operator VULKAN_HPP_NAMESPACE::Pipeline() const VULKAN_HPP_NOEXCEPT { return m_pipeline; } void clear() VULKAN_HPP_NOEXCEPT { if ( m_pipeline ) { getDispatcher()->vkDestroyPipeline( static_cast( m_device ), static_cast( m_pipeline ), reinterpret_cast( m_allocator ) ); } m_device = nullptr; m_pipeline = nullptr; m_allocator = nullptr; m_constructorSuccessCode = VULKAN_HPP_NAMESPACE::Result::eErrorUnknown; m_dispatcher = nullptr; } VULKAN_HPP_NAMESPACE::Pipeline release() { m_device = nullptr; m_allocator = nullptr; m_constructorSuccessCode = VULKAN_HPP_NAMESPACE::Result::eErrorUnknown; m_dispatcher = nullptr; return VULKAN_HPP_NAMESPACE::exchange( m_pipeline, nullptr ); } VULKAN_HPP_NAMESPACE::Result getConstructorSuccessCode() const { return m_constructorSuccessCode; } VULKAN_HPP_NAMESPACE::Device getDevice() const { return m_device; } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * getDispatcher() const { VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); return m_dispatcher; } void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Pipeline & rhs ) VULKAN_HPP_NOEXCEPT { std::swap( m_device, rhs.m_device ); std::swap( m_pipeline, rhs.m_pipeline ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_constructorSuccessCode, rhs.m_constructorSuccessCode ); std::swap( m_dispatcher, rhs.m_dispatcher ); } //=== VK_AMD_shader_info === VULKAN_HPP_NODISCARD std::vector getShaderInfoAMD( VULKAN_HPP_NAMESPACE::ShaderStageFlagBits shaderStage, VULKAN_HPP_NAMESPACE::ShaderInfoTypeAMD infoType ) const; # if defined( VK_ENABLE_BETA_EXTENSIONS ) //=== VK_AMDX_shader_enqueue === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::ExecutionGraphPipelineScratchSizeAMDX getExecutionGraphScratchSizeAMDX() const; VULKAN_HPP_NODISCARD uint32_t getExecutionGraphNodeIndexAMDX( const VULKAN_HPP_NAMESPACE::PipelineShaderStageNodeCreateInfoAMDX & nodeInfo ) const; # endif /*VK_ENABLE_BETA_EXTENSIONS*/ //=== VK_KHR_ray_tracing_pipeline === template VULKAN_HPP_NODISCARD std::vector getRayTracingShaderGroupHandlesKHR( uint32_t firstGroup, uint32_t groupCount, size_t dataSize ) const; template VULKAN_HPP_NODISCARD DataType getRayTracingShaderGroupHandleKHR( uint32_t firstGroup, uint32_t groupCount ) const; template VULKAN_HPP_NODISCARD std::vector getRayTracingCaptureReplayShaderGroupHandlesKHR( uint32_t firstGroup, uint32_t groupCount, size_t dataSize ) const; template VULKAN_HPP_NODISCARD DataType getRayTracingCaptureReplayShaderGroupHandleKHR( uint32_t firstGroup, uint32_t groupCount ) const; VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::DeviceSize getRayTracingShaderGroupStackSizeKHR( uint32_t group, VULKAN_HPP_NAMESPACE::ShaderGroupShaderKHR groupShader ) const VULKAN_HPP_NOEXCEPT; //=== VK_NV_ray_tracing === template VULKAN_HPP_NODISCARD std::vector getRayTracingShaderGroupHandlesNV( uint32_t firstGroup, uint32_t groupCount, size_t dataSize ) const; template VULKAN_HPP_NODISCARD DataType getRayTracingShaderGroupHandleNV( uint32_t firstGroup, uint32_t groupCount ) const; void compileDeferredNV( uint32_t shader ) const; private: VULKAN_HPP_NAMESPACE::Device m_device = {}; VULKAN_HPP_NAMESPACE::Pipeline m_pipeline = {}; const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; VULKAN_HPP_NAMESPACE::Result m_constructorSuccessCode = VULKAN_HPP_NAMESPACE::Result::eErrorUnknown; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; template <> struct isVulkanRAIIHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; class Pipelines : public std::vector { public: # if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) Pipelines( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) { *this = device.createComputePipelines( pipelineCache, createInfos, allocator ); } # endif # if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) # if defined( VK_ENABLE_BETA_EXTENSIONS ) Pipelines( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) { *this = device.createExecutionGraphPipelinesAMDX( pipelineCache, createInfos, allocator ); } # endif /*VK_ENABLE_BETA_EXTENSIONS*/ # endif # if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) Pipelines( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) { *this = device.createGraphicsPipelines( pipelineCache, createInfos, allocator ); } # endif # if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) Pipelines( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::Optional const & deferredOperation, VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) { *this = device.createRayTracingPipelinesKHR( deferredOperation, pipelineCache, createInfos, allocator ); } # endif # if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) Pipelines( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) { *this = device.createRayTracingPipelinesNV( pipelineCache, createInfos, allocator ); } # endif Pipelines( std::nullptr_t ) {} Pipelines() = delete; Pipelines( Pipelines const & ) = delete; Pipelines( Pipelines && rhs ) = default; Pipelines & operator=( Pipelines const & ) = delete; Pipelines & operator=( Pipelines && rhs ) = default; private: Pipelines( std::vector && rhs ) { std::swap( *this, rhs ); } }; class PipelineBinaryKHR { public: using CType = VkPipelineBinaryKHR; using CppType = VULKAN_HPP_NAMESPACE::PipelineBinaryKHR; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::ePipelineBinaryKHR; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eUnknown; public: PipelineBinaryKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkPipelineBinaryKHR pipelineBinary, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr, VULKAN_HPP_NAMESPACE::Result successCode = VULKAN_HPP_NAMESPACE::Result::eSuccess ) : m_device( device ) , m_pipelineBinary( pipelineBinary ) , m_allocator( static_cast( allocator ) ) , m_constructorSuccessCode( successCode ) , m_dispatcher( device.getDispatcher() ) { } PipelineBinaryKHR( std::nullptr_t ) {} ~PipelineBinaryKHR() { clear(); } PipelineBinaryKHR() = delete; PipelineBinaryKHR( PipelineBinaryKHR const & ) = delete; PipelineBinaryKHR( PipelineBinaryKHR && rhs ) VULKAN_HPP_NOEXCEPT : m_device( VULKAN_HPP_NAMESPACE::exchange( rhs.m_device, {} ) ) , m_pipelineBinary( VULKAN_HPP_NAMESPACE::exchange( rhs.m_pipelineBinary, {} ) ) , m_allocator( VULKAN_HPP_NAMESPACE::exchange( rhs.m_allocator, {} ) ) , m_constructorSuccessCode( VULKAN_HPP_NAMESPACE::exchange( rhs.m_constructorSuccessCode, {} ) ) , m_dispatcher( VULKAN_HPP_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) { } PipelineBinaryKHR & operator=( PipelineBinaryKHR const & ) = delete; PipelineBinaryKHR & operator=( PipelineBinaryKHR && rhs ) VULKAN_HPP_NOEXCEPT { if ( this != &rhs ) { std::swap( m_device, rhs.m_device ); std::swap( m_pipelineBinary, rhs.m_pipelineBinary ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_constructorSuccessCode, rhs.m_constructorSuccessCode ); std::swap( m_dispatcher, rhs.m_dispatcher ); } return *this; } VULKAN_HPP_NAMESPACE::PipelineBinaryKHR const & operator*() const VULKAN_HPP_NOEXCEPT { return m_pipelineBinary; } operator VULKAN_HPP_NAMESPACE::PipelineBinaryKHR() const VULKAN_HPP_NOEXCEPT { return m_pipelineBinary; } void clear() VULKAN_HPP_NOEXCEPT { if ( m_pipelineBinary ) { getDispatcher()->vkDestroyPipelineBinaryKHR( static_cast( m_device ), static_cast( m_pipelineBinary ), reinterpret_cast( m_allocator ) ); } m_device = nullptr; m_pipelineBinary = nullptr; m_allocator = nullptr; m_constructorSuccessCode = VULKAN_HPP_NAMESPACE::Result::eErrorUnknown; m_dispatcher = nullptr; } VULKAN_HPP_NAMESPACE::PipelineBinaryKHR release() { m_device = nullptr; m_allocator = nullptr; m_constructorSuccessCode = VULKAN_HPP_NAMESPACE::Result::eErrorUnknown; m_dispatcher = nullptr; return VULKAN_HPP_NAMESPACE::exchange( m_pipelineBinary, nullptr ); } VULKAN_HPP_NAMESPACE::Result getConstructorSuccessCode() const { return m_constructorSuccessCode; } VULKAN_HPP_NAMESPACE::Device getDevice() const { return m_device; } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * getDispatcher() const { VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); return m_dispatcher; } void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::PipelineBinaryKHR & rhs ) VULKAN_HPP_NOEXCEPT { std::swap( m_device, rhs.m_device ); std::swap( m_pipelineBinary, rhs.m_pipelineBinary ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_constructorSuccessCode, rhs.m_constructorSuccessCode ); std::swap( m_dispatcher, rhs.m_dispatcher ); } private: VULKAN_HPP_NAMESPACE::Device m_device = {}; VULKAN_HPP_NAMESPACE::PipelineBinaryKHR m_pipelineBinary = {}; const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; VULKAN_HPP_NAMESPACE::Result m_constructorSuccessCode = VULKAN_HPP_NAMESPACE::Result::eErrorUnknown; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; template <> struct isVulkanRAIIHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; class PipelineBinaryKHRs : public std::vector { public: # if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) PipelineBinaryKHRs( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::PipelineBinaryCreateInfoKHR const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) { *this = device.createPipelineBinariesKHR( createInfo, allocator ); } # endif PipelineBinaryKHRs( std::nullptr_t ) {} PipelineBinaryKHRs() = delete; PipelineBinaryKHRs( PipelineBinaryKHRs const & ) = delete; PipelineBinaryKHRs( PipelineBinaryKHRs && rhs ) = default; PipelineBinaryKHRs & operator=( PipelineBinaryKHRs const & ) = delete; PipelineBinaryKHRs & operator=( PipelineBinaryKHRs && rhs ) = default; private: PipelineBinaryKHRs( std::vector && rhs ) { std::swap( *this, rhs ); } }; class PipelineLayout { public: using CType = VkPipelineLayout; using CppType = VULKAN_HPP_NAMESPACE::PipelineLayout; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::ePipelineLayout; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::ePipelineLayout; public: # if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) PipelineLayout( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::PipelineLayoutCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) { *this = device.createPipelineLayout( createInfo, allocator ); } # endif PipelineLayout( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkPipelineLayout pipelineLayout, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) : m_device( device ) , m_pipelineLayout( pipelineLayout ) , m_allocator( static_cast( allocator ) ) , m_dispatcher( device.getDispatcher() ) { } PipelineLayout( std::nullptr_t ) {} ~PipelineLayout() { clear(); } PipelineLayout() = delete; PipelineLayout( PipelineLayout const & ) = delete; PipelineLayout( PipelineLayout && rhs ) VULKAN_HPP_NOEXCEPT : m_device( VULKAN_HPP_NAMESPACE::exchange( rhs.m_device, {} ) ) , m_pipelineLayout( VULKAN_HPP_NAMESPACE::exchange( rhs.m_pipelineLayout, {} ) ) , m_allocator( VULKAN_HPP_NAMESPACE::exchange( rhs.m_allocator, {} ) ) , m_dispatcher( VULKAN_HPP_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) { } PipelineLayout & operator=( PipelineLayout const & ) = delete; PipelineLayout & operator=( PipelineLayout && rhs ) VULKAN_HPP_NOEXCEPT { if ( this != &rhs ) { std::swap( m_device, rhs.m_device ); std::swap( m_pipelineLayout, rhs.m_pipelineLayout ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_dispatcher, rhs.m_dispatcher ); } return *this; } VULKAN_HPP_NAMESPACE::PipelineLayout const & operator*() const VULKAN_HPP_NOEXCEPT { return m_pipelineLayout; } operator VULKAN_HPP_NAMESPACE::PipelineLayout() const VULKAN_HPP_NOEXCEPT { return m_pipelineLayout; } void clear() VULKAN_HPP_NOEXCEPT { if ( m_pipelineLayout ) { getDispatcher()->vkDestroyPipelineLayout( static_cast( m_device ), static_cast( m_pipelineLayout ), reinterpret_cast( m_allocator ) ); } m_device = nullptr; m_pipelineLayout = nullptr; m_allocator = nullptr; m_dispatcher = nullptr; } VULKAN_HPP_NAMESPACE::PipelineLayout release() { m_device = nullptr; m_allocator = nullptr; m_dispatcher = nullptr; return VULKAN_HPP_NAMESPACE::exchange( m_pipelineLayout, nullptr ); } VULKAN_HPP_NAMESPACE::Device getDevice() const { return m_device; } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * getDispatcher() const { VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); return m_dispatcher; } void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::PipelineLayout & rhs ) VULKAN_HPP_NOEXCEPT { std::swap( m_device, rhs.m_device ); std::swap( m_pipelineLayout, rhs.m_pipelineLayout ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_dispatcher, rhs.m_dispatcher ); } private: VULKAN_HPP_NAMESPACE::Device m_device = {}; VULKAN_HPP_NAMESPACE::PipelineLayout m_pipelineLayout = {}; const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; template <> struct isVulkanRAIIHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; class PrivateDataSlot { public: using CType = VkPrivateDataSlot; using CppType = VULKAN_HPP_NAMESPACE::PrivateDataSlot; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::ePrivateDataSlot; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eUnknown; public: # if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) PrivateDataSlot( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::PrivateDataSlotCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) { *this = device.createPrivateDataSlot( createInfo, allocator ); } # endif PrivateDataSlot( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkPrivateDataSlot privateDataSlot, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) : m_device( device ) , m_privateDataSlot( privateDataSlot ) , m_allocator( static_cast( allocator ) ) , m_dispatcher( device.getDispatcher() ) { } PrivateDataSlot( std::nullptr_t ) {} ~PrivateDataSlot() { clear(); } PrivateDataSlot() = delete; PrivateDataSlot( PrivateDataSlot const & ) = delete; PrivateDataSlot( PrivateDataSlot && rhs ) VULKAN_HPP_NOEXCEPT : m_device( VULKAN_HPP_NAMESPACE::exchange( rhs.m_device, {} ) ) , m_privateDataSlot( VULKAN_HPP_NAMESPACE::exchange( rhs.m_privateDataSlot, {} ) ) , m_allocator( VULKAN_HPP_NAMESPACE::exchange( rhs.m_allocator, {} ) ) , m_dispatcher( VULKAN_HPP_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) { } PrivateDataSlot & operator=( PrivateDataSlot const & ) = delete; PrivateDataSlot & operator=( PrivateDataSlot && rhs ) VULKAN_HPP_NOEXCEPT { if ( this != &rhs ) { std::swap( m_device, rhs.m_device ); std::swap( m_privateDataSlot, rhs.m_privateDataSlot ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_dispatcher, rhs.m_dispatcher ); } return *this; } VULKAN_HPP_NAMESPACE::PrivateDataSlot const & operator*() const VULKAN_HPP_NOEXCEPT { return m_privateDataSlot; } operator VULKAN_HPP_NAMESPACE::PrivateDataSlot() const VULKAN_HPP_NOEXCEPT { return m_privateDataSlot; } void clear() VULKAN_HPP_NOEXCEPT { if ( m_privateDataSlot ) { getDispatcher()->vkDestroyPrivateDataSlot( static_cast( m_device ), static_cast( m_privateDataSlot ), reinterpret_cast( m_allocator ) ); } m_device = nullptr; m_privateDataSlot = nullptr; m_allocator = nullptr; m_dispatcher = nullptr; } VULKAN_HPP_NAMESPACE::PrivateDataSlot release() { m_device = nullptr; m_allocator = nullptr; m_dispatcher = nullptr; return VULKAN_HPP_NAMESPACE::exchange( m_privateDataSlot, nullptr ); } VULKAN_HPP_NAMESPACE::Device getDevice() const { return m_device; } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * getDispatcher() const { VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); return m_dispatcher; } void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::PrivateDataSlot & rhs ) VULKAN_HPP_NOEXCEPT { std::swap( m_device, rhs.m_device ); std::swap( m_privateDataSlot, rhs.m_privateDataSlot ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_dispatcher, rhs.m_dispatcher ); } private: VULKAN_HPP_NAMESPACE::Device m_device = {}; VULKAN_HPP_NAMESPACE::PrivateDataSlot m_privateDataSlot = {}; const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; template <> struct isVulkanRAIIHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; class QueryPool { public: using CType = VkQueryPool; using CppType = VULKAN_HPP_NAMESPACE::QueryPool; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eQueryPool; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eQueryPool; public: # if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) QueryPool( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::QueryPoolCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) { *this = device.createQueryPool( createInfo, allocator ); } # endif QueryPool( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkQueryPool queryPool, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) : m_device( device ) , m_queryPool( queryPool ) , m_allocator( static_cast( allocator ) ) , m_dispatcher( device.getDispatcher() ) { } QueryPool( std::nullptr_t ) {} ~QueryPool() { clear(); } QueryPool() = delete; QueryPool( QueryPool const & ) = delete; QueryPool( QueryPool && rhs ) VULKAN_HPP_NOEXCEPT : m_device( VULKAN_HPP_NAMESPACE::exchange( rhs.m_device, {} ) ) , m_queryPool( VULKAN_HPP_NAMESPACE::exchange( rhs.m_queryPool, {} ) ) , m_allocator( VULKAN_HPP_NAMESPACE::exchange( rhs.m_allocator, {} ) ) , m_dispatcher( VULKAN_HPP_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) { } QueryPool & operator=( QueryPool const & ) = delete; QueryPool & operator=( QueryPool && rhs ) VULKAN_HPP_NOEXCEPT { if ( this != &rhs ) { std::swap( m_device, rhs.m_device ); std::swap( m_queryPool, rhs.m_queryPool ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_dispatcher, rhs.m_dispatcher ); } return *this; } VULKAN_HPP_NAMESPACE::QueryPool const & operator*() const VULKAN_HPP_NOEXCEPT { return m_queryPool; } operator VULKAN_HPP_NAMESPACE::QueryPool() const VULKAN_HPP_NOEXCEPT { return m_queryPool; } void clear() VULKAN_HPP_NOEXCEPT { if ( m_queryPool ) { getDispatcher()->vkDestroyQueryPool( static_cast( m_device ), static_cast( m_queryPool ), reinterpret_cast( m_allocator ) ); } m_device = nullptr; m_queryPool = nullptr; m_allocator = nullptr; m_dispatcher = nullptr; } VULKAN_HPP_NAMESPACE::QueryPool release() { m_device = nullptr; m_allocator = nullptr; m_dispatcher = nullptr; return VULKAN_HPP_NAMESPACE::exchange( m_queryPool, nullptr ); } VULKAN_HPP_NAMESPACE::Device getDevice() const { return m_device; } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * getDispatcher() const { VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); return m_dispatcher; } void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::QueryPool & rhs ) VULKAN_HPP_NOEXCEPT { std::swap( m_device, rhs.m_device ); std::swap( m_queryPool, rhs.m_queryPool ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_dispatcher, rhs.m_dispatcher ); } //=== VK_VERSION_1_0 === template VULKAN_HPP_NODISCARD std::pair> getResults( uint32_t firstQuery, uint32_t queryCount, size_t dataSize, VULKAN_HPP_NAMESPACE::DeviceSize stride, VULKAN_HPP_NAMESPACE::QueryResultFlags flags VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT ) const; template VULKAN_HPP_NODISCARD std::pair getResult( uint32_t firstQuery, uint32_t queryCount, VULKAN_HPP_NAMESPACE::DeviceSize stride, VULKAN_HPP_NAMESPACE::QueryResultFlags flags VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT ) const; //=== VK_VERSION_1_2 === void reset( uint32_t firstQuery, uint32_t queryCount ) const VULKAN_HPP_NOEXCEPT; //=== VK_EXT_host_query_reset === void resetEXT( uint32_t firstQuery, uint32_t queryCount ) const VULKAN_HPP_NOEXCEPT; private: VULKAN_HPP_NAMESPACE::Device m_device = {}; VULKAN_HPP_NAMESPACE::QueryPool m_queryPool = {}; const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; template <> struct isVulkanRAIIHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; class Queue { public: using CType = VkQueue; using CppType = VULKAN_HPP_NAMESPACE::Queue; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eQueue; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eQueue; public: # if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) Queue( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, uint32_t queueFamilyIndex, uint32_t queueIndex ) { *this = device.getQueue( queueFamilyIndex, queueIndex ); } # endif # if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) Queue( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::DeviceQueueInfo2 const & queueInfo ) { *this = device.getQueue2( queueInfo ); } # endif Queue( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkQueue queue ) : m_queue( queue ), m_dispatcher( device.getDispatcher() ) { } Queue( std::nullptr_t ) {} ~Queue() { clear(); } Queue() = delete; Queue( Queue const & rhs ) : m_queue( rhs.m_queue ), m_dispatcher( rhs.m_dispatcher ) {} Queue( Queue && rhs ) VULKAN_HPP_NOEXCEPT : m_queue( VULKAN_HPP_NAMESPACE::exchange( rhs.m_queue, {} ) ) , m_dispatcher( VULKAN_HPP_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) { } Queue & operator=( Queue const & rhs ) { m_queue = rhs.m_queue; m_dispatcher = rhs.m_dispatcher; return *this; } Queue & operator=( Queue && rhs ) VULKAN_HPP_NOEXCEPT { if ( this != &rhs ) { std::swap( m_queue, rhs.m_queue ); std::swap( m_dispatcher, rhs.m_dispatcher ); } return *this; } VULKAN_HPP_NAMESPACE::Queue const & operator*() const VULKAN_HPP_NOEXCEPT { return m_queue; } operator VULKAN_HPP_NAMESPACE::Queue() const VULKAN_HPP_NOEXCEPT { return m_queue; } void clear() VULKAN_HPP_NOEXCEPT { m_queue = nullptr; m_dispatcher = nullptr; } VULKAN_HPP_NAMESPACE::Queue release() { m_dispatcher = nullptr; return VULKAN_HPP_NAMESPACE::exchange( m_queue, nullptr ); } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * getDispatcher() const { VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); return m_dispatcher; } void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Queue & rhs ) VULKAN_HPP_NOEXCEPT { std::swap( m_queue, rhs.m_queue ); std::swap( m_dispatcher, rhs.m_dispatcher ); } //=== VK_VERSION_1_0 === void submit( VULKAN_HPP_NAMESPACE::ArrayProxy const & submits, VULKAN_HPP_NAMESPACE::Fence fence VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT ) const; void waitIdle() const; void bindSparse( VULKAN_HPP_NAMESPACE::ArrayProxy const & bindInfo, VULKAN_HPP_NAMESPACE::Fence fence VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT ) const; //=== VK_VERSION_1_3 === void submit2( VULKAN_HPP_NAMESPACE::ArrayProxy const & submits, VULKAN_HPP_NAMESPACE::Fence fence VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT ) const; //=== VK_KHR_swapchain === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Result presentKHR( const VULKAN_HPP_NAMESPACE::PresentInfoKHR & presentInfo ) const; //=== VK_EXT_debug_utils === void beginDebugUtilsLabelEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsLabelEXT & labelInfo ) const VULKAN_HPP_NOEXCEPT; void endDebugUtilsLabelEXT() const VULKAN_HPP_NOEXCEPT; void insertDebugUtilsLabelEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsLabelEXT & labelInfo ) const VULKAN_HPP_NOEXCEPT; //=== VK_NV_device_diagnostic_checkpoints === VULKAN_HPP_NODISCARD std::vector getCheckpointDataNV() const; VULKAN_HPP_NODISCARD std::vector getCheckpointData2NV() const; //=== VK_INTEL_performance_query === void setPerformanceConfigurationINTEL( VULKAN_HPP_NAMESPACE::PerformanceConfigurationINTEL configuration ) const; //=== VK_KHR_synchronization2 === void submit2KHR( VULKAN_HPP_NAMESPACE::ArrayProxy const & submits, VULKAN_HPP_NAMESPACE::Fence fence VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT ) const; //=== VK_NV_low_latency2 === void notifyOutOfBandNV( const VULKAN_HPP_NAMESPACE::OutOfBandQueueTypeInfoNV & queueTypeInfo ) const VULKAN_HPP_NOEXCEPT; private: VULKAN_HPP_NAMESPACE::Queue m_queue = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; template <> struct isVulkanRAIIHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; class RenderPass { public: using CType = VkRenderPass; using CppType = VULKAN_HPP_NAMESPACE::RenderPass; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eRenderPass; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eRenderPass; public: # if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) RenderPass( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::RenderPassCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) { *this = device.createRenderPass( createInfo, allocator ); } # endif # if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) RenderPass( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::RenderPassCreateInfo2 const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) { *this = device.createRenderPass2( createInfo, allocator ); } # endif RenderPass( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkRenderPass renderPass, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) : m_device( device ) , m_renderPass( renderPass ) , m_allocator( static_cast( allocator ) ) , m_dispatcher( device.getDispatcher() ) { } RenderPass( std::nullptr_t ) {} ~RenderPass() { clear(); } RenderPass() = delete; RenderPass( RenderPass const & ) = delete; RenderPass( RenderPass && rhs ) VULKAN_HPP_NOEXCEPT : m_device( VULKAN_HPP_NAMESPACE::exchange( rhs.m_device, {} ) ) , m_renderPass( VULKAN_HPP_NAMESPACE::exchange( rhs.m_renderPass, {} ) ) , m_allocator( VULKAN_HPP_NAMESPACE::exchange( rhs.m_allocator, {} ) ) , m_dispatcher( VULKAN_HPP_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) { } RenderPass & operator=( RenderPass const & ) = delete; RenderPass & operator=( RenderPass && rhs ) VULKAN_HPP_NOEXCEPT { if ( this != &rhs ) { std::swap( m_device, rhs.m_device ); std::swap( m_renderPass, rhs.m_renderPass ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_dispatcher, rhs.m_dispatcher ); } return *this; } VULKAN_HPP_NAMESPACE::RenderPass const & operator*() const VULKAN_HPP_NOEXCEPT { return m_renderPass; } operator VULKAN_HPP_NAMESPACE::RenderPass() const VULKAN_HPP_NOEXCEPT { return m_renderPass; } void clear() VULKAN_HPP_NOEXCEPT { if ( m_renderPass ) { getDispatcher()->vkDestroyRenderPass( static_cast( m_device ), static_cast( m_renderPass ), reinterpret_cast( m_allocator ) ); } m_device = nullptr; m_renderPass = nullptr; m_allocator = nullptr; m_dispatcher = nullptr; } VULKAN_HPP_NAMESPACE::RenderPass release() { m_device = nullptr; m_allocator = nullptr; m_dispatcher = nullptr; return VULKAN_HPP_NAMESPACE::exchange( m_renderPass, nullptr ); } VULKAN_HPP_NAMESPACE::Device getDevice() const { return m_device; } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * getDispatcher() const { VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); return m_dispatcher; } void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::RenderPass & rhs ) VULKAN_HPP_NOEXCEPT { std::swap( m_device, rhs.m_device ); std::swap( m_renderPass, rhs.m_renderPass ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_dispatcher, rhs.m_dispatcher ); } //=== VK_VERSION_1_0 === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Extent2D getRenderAreaGranularity() const VULKAN_HPP_NOEXCEPT; //=== VK_HUAWEI_subpass_shading === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Extent2D getSubpassShadingMaxWorkgroupSizeHUAWEI() const; private: VULKAN_HPP_NAMESPACE::Device m_device = {}; VULKAN_HPP_NAMESPACE::RenderPass m_renderPass = {}; const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; template <> struct isVulkanRAIIHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; class Sampler { public: using CType = VkSampler; using CppType = VULKAN_HPP_NAMESPACE::Sampler; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eSampler; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eSampler; public: # if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) Sampler( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::SamplerCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) { *this = device.createSampler( createInfo, allocator ); } # endif Sampler( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkSampler sampler, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) : m_device( device ) , m_sampler( sampler ) , m_allocator( static_cast( allocator ) ) , m_dispatcher( device.getDispatcher() ) { } Sampler( std::nullptr_t ) {} ~Sampler() { clear(); } Sampler() = delete; Sampler( Sampler const & ) = delete; Sampler( Sampler && rhs ) VULKAN_HPP_NOEXCEPT : m_device( VULKAN_HPP_NAMESPACE::exchange( rhs.m_device, {} ) ) , m_sampler( VULKAN_HPP_NAMESPACE::exchange( rhs.m_sampler, {} ) ) , m_allocator( VULKAN_HPP_NAMESPACE::exchange( rhs.m_allocator, {} ) ) , m_dispatcher( VULKAN_HPP_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) { } Sampler & operator=( Sampler const & ) = delete; Sampler & operator=( Sampler && rhs ) VULKAN_HPP_NOEXCEPT { if ( this != &rhs ) { std::swap( m_device, rhs.m_device ); std::swap( m_sampler, rhs.m_sampler ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_dispatcher, rhs.m_dispatcher ); } return *this; } VULKAN_HPP_NAMESPACE::Sampler const & operator*() const VULKAN_HPP_NOEXCEPT { return m_sampler; } operator VULKAN_HPP_NAMESPACE::Sampler() const VULKAN_HPP_NOEXCEPT { return m_sampler; } void clear() VULKAN_HPP_NOEXCEPT { if ( m_sampler ) { getDispatcher()->vkDestroySampler( static_cast( m_device ), static_cast( m_sampler ), reinterpret_cast( m_allocator ) ); } m_device = nullptr; m_sampler = nullptr; m_allocator = nullptr; m_dispatcher = nullptr; } VULKAN_HPP_NAMESPACE::Sampler release() { m_device = nullptr; m_allocator = nullptr; m_dispatcher = nullptr; return VULKAN_HPP_NAMESPACE::exchange( m_sampler, nullptr ); } VULKAN_HPP_NAMESPACE::Device getDevice() const { return m_device; } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * getDispatcher() const { VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); return m_dispatcher; } void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Sampler & rhs ) VULKAN_HPP_NOEXCEPT { std::swap( m_device, rhs.m_device ); std::swap( m_sampler, rhs.m_sampler ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_dispatcher, rhs.m_dispatcher ); } private: VULKAN_HPP_NAMESPACE::Device m_device = {}; VULKAN_HPP_NAMESPACE::Sampler m_sampler = {}; const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; template <> struct isVulkanRAIIHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; class SamplerYcbcrConversion { public: using CType = VkSamplerYcbcrConversion; using CppType = VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eSamplerYcbcrConversion; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eSamplerYcbcrConversion; public: # if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) SamplerYcbcrConversion( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::SamplerYcbcrConversionCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) { *this = device.createSamplerYcbcrConversion( createInfo, allocator ); } # endif SamplerYcbcrConversion( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkSamplerYcbcrConversion ycbcrConversion, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) : m_device( device ) , m_ycbcrConversion( ycbcrConversion ) , m_allocator( static_cast( allocator ) ) , m_dispatcher( device.getDispatcher() ) { } SamplerYcbcrConversion( std::nullptr_t ) {} ~SamplerYcbcrConversion() { clear(); } SamplerYcbcrConversion() = delete; SamplerYcbcrConversion( SamplerYcbcrConversion const & ) = delete; SamplerYcbcrConversion( SamplerYcbcrConversion && rhs ) VULKAN_HPP_NOEXCEPT : m_device( VULKAN_HPP_NAMESPACE::exchange( rhs.m_device, {} ) ) , m_ycbcrConversion( VULKAN_HPP_NAMESPACE::exchange( rhs.m_ycbcrConversion, {} ) ) , m_allocator( VULKAN_HPP_NAMESPACE::exchange( rhs.m_allocator, {} ) ) , m_dispatcher( VULKAN_HPP_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) { } SamplerYcbcrConversion & operator=( SamplerYcbcrConversion const & ) = delete; SamplerYcbcrConversion & operator=( SamplerYcbcrConversion && rhs ) VULKAN_HPP_NOEXCEPT { if ( this != &rhs ) { std::swap( m_device, rhs.m_device ); std::swap( m_ycbcrConversion, rhs.m_ycbcrConversion ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_dispatcher, rhs.m_dispatcher ); } return *this; } VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion const & operator*() const VULKAN_HPP_NOEXCEPT { return m_ycbcrConversion; } operator VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion() const VULKAN_HPP_NOEXCEPT { return m_ycbcrConversion; } void clear() VULKAN_HPP_NOEXCEPT { if ( m_ycbcrConversion ) { getDispatcher()->vkDestroySamplerYcbcrConversion( static_cast( m_device ), static_cast( m_ycbcrConversion ), reinterpret_cast( m_allocator ) ); } m_device = nullptr; m_ycbcrConversion = nullptr; m_allocator = nullptr; m_dispatcher = nullptr; } VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion release() { m_device = nullptr; m_allocator = nullptr; m_dispatcher = nullptr; return VULKAN_HPP_NAMESPACE::exchange( m_ycbcrConversion, nullptr ); } VULKAN_HPP_NAMESPACE::Device getDevice() const { return m_device; } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * getDispatcher() const { VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); return m_dispatcher; } void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::SamplerYcbcrConversion & rhs ) VULKAN_HPP_NOEXCEPT { std::swap( m_device, rhs.m_device ); std::swap( m_ycbcrConversion, rhs.m_ycbcrConversion ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_dispatcher, rhs.m_dispatcher ); } private: VULKAN_HPP_NAMESPACE::Device m_device = {}; VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion m_ycbcrConversion = {}; const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; template <> struct isVulkanRAIIHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; class Semaphore { public: using CType = VkSemaphore; using CppType = VULKAN_HPP_NAMESPACE::Semaphore; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eSemaphore; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eSemaphore; public: # if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) Semaphore( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::SemaphoreCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) { *this = device.createSemaphore( createInfo, allocator ); } # endif Semaphore( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkSemaphore semaphore, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) : m_device( device ) , m_semaphore( semaphore ) , m_allocator( static_cast( allocator ) ) , m_dispatcher( device.getDispatcher() ) { } Semaphore( std::nullptr_t ) {} ~Semaphore() { clear(); } Semaphore() = delete; Semaphore( Semaphore const & ) = delete; Semaphore( Semaphore && rhs ) VULKAN_HPP_NOEXCEPT : m_device( VULKAN_HPP_NAMESPACE::exchange( rhs.m_device, {} ) ) , m_semaphore( VULKAN_HPP_NAMESPACE::exchange( rhs.m_semaphore, {} ) ) , m_allocator( VULKAN_HPP_NAMESPACE::exchange( rhs.m_allocator, {} ) ) , m_dispatcher( VULKAN_HPP_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) { } Semaphore & operator=( Semaphore const & ) = delete; Semaphore & operator=( Semaphore && rhs ) VULKAN_HPP_NOEXCEPT { if ( this != &rhs ) { std::swap( m_device, rhs.m_device ); std::swap( m_semaphore, rhs.m_semaphore ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_dispatcher, rhs.m_dispatcher ); } return *this; } VULKAN_HPP_NAMESPACE::Semaphore const & operator*() const VULKAN_HPP_NOEXCEPT { return m_semaphore; } operator VULKAN_HPP_NAMESPACE::Semaphore() const VULKAN_HPP_NOEXCEPT { return m_semaphore; } void clear() VULKAN_HPP_NOEXCEPT { if ( m_semaphore ) { getDispatcher()->vkDestroySemaphore( static_cast( m_device ), static_cast( m_semaphore ), reinterpret_cast( m_allocator ) ); } m_device = nullptr; m_semaphore = nullptr; m_allocator = nullptr; m_dispatcher = nullptr; } VULKAN_HPP_NAMESPACE::Semaphore release() { m_device = nullptr; m_allocator = nullptr; m_dispatcher = nullptr; return VULKAN_HPP_NAMESPACE::exchange( m_semaphore, nullptr ); } VULKAN_HPP_NAMESPACE::Device getDevice() const { return m_device; } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * getDispatcher() const { VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); return m_dispatcher; } void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Semaphore & rhs ) VULKAN_HPP_NOEXCEPT { std::swap( m_device, rhs.m_device ); std::swap( m_semaphore, rhs.m_semaphore ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_dispatcher, rhs.m_dispatcher ); } //=== VK_VERSION_1_2 === VULKAN_HPP_NODISCARD uint64_t getCounterValue() const; //=== VK_KHR_timeline_semaphore === VULKAN_HPP_NODISCARD uint64_t getCounterValueKHR() const; private: VULKAN_HPP_NAMESPACE::Device m_device = {}; VULKAN_HPP_NAMESPACE::Semaphore m_semaphore = {}; const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; template <> struct isVulkanRAIIHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; class ShaderEXT { public: using CType = VkShaderEXT; using CppType = VULKAN_HPP_NAMESPACE::ShaderEXT; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eShaderEXT; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eUnknown; public: # if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) ShaderEXT( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::ShaderCreateInfoEXT const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) { *this = device.createShaderEXT( createInfo, allocator ); } # endif ShaderEXT( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkShaderEXT shader, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr, VULKAN_HPP_NAMESPACE::Result successCode = VULKAN_HPP_NAMESPACE::Result::eSuccess ) : m_device( device ) , m_shader( shader ) , m_allocator( static_cast( allocator ) ) , m_constructorSuccessCode( successCode ) , m_dispatcher( device.getDispatcher() ) { } ShaderEXT( std::nullptr_t ) {} ~ShaderEXT() { clear(); } ShaderEXT() = delete; ShaderEXT( ShaderEXT const & ) = delete; ShaderEXT( ShaderEXT && rhs ) VULKAN_HPP_NOEXCEPT : m_device( VULKAN_HPP_NAMESPACE::exchange( rhs.m_device, {} ) ) , m_shader( VULKAN_HPP_NAMESPACE::exchange( rhs.m_shader, {} ) ) , m_allocator( VULKAN_HPP_NAMESPACE::exchange( rhs.m_allocator, {} ) ) , m_constructorSuccessCode( VULKAN_HPP_NAMESPACE::exchange( rhs.m_constructorSuccessCode, {} ) ) , m_dispatcher( VULKAN_HPP_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) { } ShaderEXT & operator=( ShaderEXT const & ) = delete; ShaderEXT & operator=( ShaderEXT && rhs ) VULKAN_HPP_NOEXCEPT { if ( this != &rhs ) { std::swap( m_device, rhs.m_device ); std::swap( m_shader, rhs.m_shader ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_constructorSuccessCode, rhs.m_constructorSuccessCode ); std::swap( m_dispatcher, rhs.m_dispatcher ); } return *this; } VULKAN_HPP_NAMESPACE::ShaderEXT const & operator*() const VULKAN_HPP_NOEXCEPT { return m_shader; } operator VULKAN_HPP_NAMESPACE::ShaderEXT() const VULKAN_HPP_NOEXCEPT { return m_shader; } void clear() VULKAN_HPP_NOEXCEPT { if ( m_shader ) { getDispatcher()->vkDestroyShaderEXT( static_cast( m_device ), static_cast( m_shader ), reinterpret_cast( m_allocator ) ); } m_device = nullptr; m_shader = nullptr; m_allocator = nullptr; m_constructorSuccessCode = VULKAN_HPP_NAMESPACE::Result::eErrorUnknown; m_dispatcher = nullptr; } VULKAN_HPP_NAMESPACE::ShaderEXT release() { m_device = nullptr; m_allocator = nullptr; m_constructorSuccessCode = VULKAN_HPP_NAMESPACE::Result::eErrorUnknown; m_dispatcher = nullptr; return VULKAN_HPP_NAMESPACE::exchange( m_shader, nullptr ); } VULKAN_HPP_NAMESPACE::Result getConstructorSuccessCode() const { return m_constructorSuccessCode; } VULKAN_HPP_NAMESPACE::Device getDevice() const { return m_device; } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * getDispatcher() const { VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); return m_dispatcher; } void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::ShaderEXT & rhs ) VULKAN_HPP_NOEXCEPT { std::swap( m_device, rhs.m_device ); std::swap( m_shader, rhs.m_shader ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_constructorSuccessCode, rhs.m_constructorSuccessCode ); std::swap( m_dispatcher, rhs.m_dispatcher ); } //=== VK_EXT_shader_object === VULKAN_HPP_NODISCARD std::vector getBinaryData() const; private: VULKAN_HPP_NAMESPACE::Device m_device = {}; VULKAN_HPP_NAMESPACE::ShaderEXT m_shader = {}; const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; VULKAN_HPP_NAMESPACE::Result m_constructorSuccessCode = VULKAN_HPP_NAMESPACE::Result::eErrorUnknown; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; template <> struct isVulkanRAIIHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; class ShaderEXTs : public std::vector { public: # if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) ShaderEXTs( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) { *this = device.createShadersEXT( createInfos, allocator ); } # endif ShaderEXTs( std::nullptr_t ) {} ShaderEXTs() = delete; ShaderEXTs( ShaderEXTs const & ) = delete; ShaderEXTs( ShaderEXTs && rhs ) = default; ShaderEXTs & operator=( ShaderEXTs const & ) = delete; ShaderEXTs & operator=( ShaderEXTs && rhs ) = default; private: ShaderEXTs( std::vector && rhs ) { std::swap( *this, rhs ); } }; class ShaderModule { public: using CType = VkShaderModule; using CppType = VULKAN_HPP_NAMESPACE::ShaderModule; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eShaderModule; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eShaderModule; public: # if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) ShaderModule( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::ShaderModuleCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) { *this = device.createShaderModule( createInfo, allocator ); } # endif ShaderModule( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkShaderModule shaderModule, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) : m_device( device ) , m_shaderModule( shaderModule ) , m_allocator( static_cast( allocator ) ) , m_dispatcher( device.getDispatcher() ) { } ShaderModule( std::nullptr_t ) {} ~ShaderModule() { clear(); } ShaderModule() = delete; ShaderModule( ShaderModule const & ) = delete; ShaderModule( ShaderModule && rhs ) VULKAN_HPP_NOEXCEPT : m_device( VULKAN_HPP_NAMESPACE::exchange( rhs.m_device, {} ) ) , m_shaderModule( VULKAN_HPP_NAMESPACE::exchange( rhs.m_shaderModule, {} ) ) , m_allocator( VULKAN_HPP_NAMESPACE::exchange( rhs.m_allocator, {} ) ) , m_dispatcher( VULKAN_HPP_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) { } ShaderModule & operator=( ShaderModule const & ) = delete; ShaderModule & operator=( ShaderModule && rhs ) VULKAN_HPP_NOEXCEPT { if ( this != &rhs ) { std::swap( m_device, rhs.m_device ); std::swap( m_shaderModule, rhs.m_shaderModule ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_dispatcher, rhs.m_dispatcher ); } return *this; } VULKAN_HPP_NAMESPACE::ShaderModule const & operator*() const VULKAN_HPP_NOEXCEPT { return m_shaderModule; } operator VULKAN_HPP_NAMESPACE::ShaderModule() const VULKAN_HPP_NOEXCEPT { return m_shaderModule; } void clear() VULKAN_HPP_NOEXCEPT { if ( m_shaderModule ) { getDispatcher()->vkDestroyShaderModule( static_cast( m_device ), static_cast( m_shaderModule ), reinterpret_cast( m_allocator ) ); } m_device = nullptr; m_shaderModule = nullptr; m_allocator = nullptr; m_dispatcher = nullptr; } VULKAN_HPP_NAMESPACE::ShaderModule release() { m_device = nullptr; m_allocator = nullptr; m_dispatcher = nullptr; return VULKAN_HPP_NAMESPACE::exchange( m_shaderModule, nullptr ); } VULKAN_HPP_NAMESPACE::Device getDevice() const { return m_device; } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * getDispatcher() const { VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); return m_dispatcher; } void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::ShaderModule & rhs ) VULKAN_HPP_NOEXCEPT { std::swap( m_device, rhs.m_device ); std::swap( m_shaderModule, rhs.m_shaderModule ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_dispatcher, rhs.m_dispatcher ); } //=== VK_EXT_shader_module_identifier === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::ShaderModuleIdentifierEXT getIdentifierEXT() const VULKAN_HPP_NOEXCEPT; private: VULKAN_HPP_NAMESPACE::Device m_device = {}; VULKAN_HPP_NAMESPACE::ShaderModule m_shaderModule = {}; const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; template <> struct isVulkanRAIIHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; class SurfaceKHR { public: using CType = VkSurfaceKHR; using CppType = VULKAN_HPP_NAMESPACE::SurfaceKHR; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eSurfaceKHR; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eSurfaceKHR; public: # if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) # if defined( VK_USE_PLATFORM_ANDROID_KHR ) SurfaceKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance, VULKAN_HPP_NAMESPACE::AndroidSurfaceCreateInfoKHR const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) { *this = instance.createAndroidSurfaceKHR( createInfo, allocator ); } # endif /*VK_USE_PLATFORM_ANDROID_KHR*/ # endif # if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) # if defined( VK_USE_PLATFORM_DIRECTFB_EXT ) SurfaceKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance, VULKAN_HPP_NAMESPACE::DirectFBSurfaceCreateInfoEXT const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) { *this = instance.createDirectFBSurfaceEXT( createInfo, allocator ); } # endif /*VK_USE_PLATFORM_DIRECTFB_EXT*/ # endif # if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) SurfaceKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance, VULKAN_HPP_NAMESPACE::DisplaySurfaceCreateInfoKHR const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) { *this = instance.createDisplayPlaneSurfaceKHR( createInfo, allocator ); } # endif # if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) SurfaceKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance, VULKAN_HPP_NAMESPACE::HeadlessSurfaceCreateInfoEXT const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) { *this = instance.createHeadlessSurfaceEXT( createInfo, allocator ); } # endif # if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) # if defined( VK_USE_PLATFORM_IOS_MVK ) SurfaceKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance, VULKAN_HPP_NAMESPACE::IOSSurfaceCreateInfoMVK const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) { *this = instance.createIOSSurfaceMVK( createInfo, allocator ); } # endif /*VK_USE_PLATFORM_IOS_MVK*/ # endif # if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) # if defined( VK_USE_PLATFORM_FUCHSIA ) SurfaceKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance, VULKAN_HPP_NAMESPACE::ImagePipeSurfaceCreateInfoFUCHSIA const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) { *this = instance.createImagePipeSurfaceFUCHSIA( createInfo, allocator ); } # endif /*VK_USE_PLATFORM_FUCHSIA*/ # endif # if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) # if defined( VK_USE_PLATFORM_MACOS_MVK ) SurfaceKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance, VULKAN_HPP_NAMESPACE::MacOSSurfaceCreateInfoMVK const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) { *this = instance.createMacOSSurfaceMVK( createInfo, allocator ); } # endif /*VK_USE_PLATFORM_MACOS_MVK*/ # endif # if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) # if defined( VK_USE_PLATFORM_METAL_EXT ) SurfaceKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance, VULKAN_HPP_NAMESPACE::MetalSurfaceCreateInfoEXT const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) { *this = instance.createMetalSurfaceEXT( createInfo, allocator ); } # endif /*VK_USE_PLATFORM_METAL_EXT*/ # endif # if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) # if defined( VK_USE_PLATFORM_SCREEN_QNX ) SurfaceKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance, VULKAN_HPP_NAMESPACE::ScreenSurfaceCreateInfoQNX const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) { *this = instance.createScreenSurfaceQNX( createInfo, allocator ); } # endif /*VK_USE_PLATFORM_SCREEN_QNX*/ # endif # if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) # if defined( VK_USE_PLATFORM_GGP ) SurfaceKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance, VULKAN_HPP_NAMESPACE::StreamDescriptorSurfaceCreateInfoGGP const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) { *this = instance.createStreamDescriptorSurfaceGGP( createInfo, allocator ); } # endif /*VK_USE_PLATFORM_GGP*/ # endif # if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) # if defined( VK_USE_PLATFORM_VI_NN ) SurfaceKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance, VULKAN_HPP_NAMESPACE::ViSurfaceCreateInfoNN const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) { *this = instance.createViSurfaceNN( createInfo, allocator ); } # endif /*VK_USE_PLATFORM_VI_NN*/ # endif # if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) # if defined( VK_USE_PLATFORM_WAYLAND_KHR ) SurfaceKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance, VULKAN_HPP_NAMESPACE::WaylandSurfaceCreateInfoKHR const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) { *this = instance.createWaylandSurfaceKHR( createInfo, allocator ); } # endif /*VK_USE_PLATFORM_WAYLAND_KHR*/ # endif # if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) # if defined( VK_USE_PLATFORM_WIN32_KHR ) SurfaceKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance, VULKAN_HPP_NAMESPACE::Win32SurfaceCreateInfoKHR const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) { *this = instance.createWin32SurfaceKHR( createInfo, allocator ); } # endif /*VK_USE_PLATFORM_WIN32_KHR*/ # endif # if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) # if defined( VK_USE_PLATFORM_XCB_KHR ) SurfaceKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance, VULKAN_HPP_NAMESPACE::XcbSurfaceCreateInfoKHR const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) { *this = instance.createXcbSurfaceKHR( createInfo, allocator ); } # endif /*VK_USE_PLATFORM_XCB_KHR*/ # endif # if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) # if defined( VK_USE_PLATFORM_XLIB_KHR ) SurfaceKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance, VULKAN_HPP_NAMESPACE::XlibSurfaceCreateInfoKHR const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) { *this = instance.createXlibSurfaceKHR( createInfo, allocator ); } # endif /*VK_USE_PLATFORM_XLIB_KHR*/ # endif SurfaceKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance const & instance, VkSurfaceKHR surface, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) : m_instance( instance ) , m_surface( surface ) , m_allocator( static_cast( allocator ) ) , m_dispatcher( instance.getDispatcher() ) { } SurfaceKHR( std::nullptr_t ) {} ~SurfaceKHR() { clear(); } SurfaceKHR() = delete; SurfaceKHR( SurfaceKHR const & ) = delete; SurfaceKHR( SurfaceKHR && rhs ) VULKAN_HPP_NOEXCEPT : m_instance( VULKAN_HPP_NAMESPACE::exchange( rhs.m_instance, {} ) ) , m_surface( VULKAN_HPP_NAMESPACE::exchange( rhs.m_surface, {} ) ) , m_allocator( VULKAN_HPP_NAMESPACE::exchange( rhs.m_allocator, {} ) ) , m_dispatcher( VULKAN_HPP_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) { } SurfaceKHR & operator=( SurfaceKHR const & ) = delete; SurfaceKHR & operator=( SurfaceKHR && rhs ) VULKAN_HPP_NOEXCEPT { if ( this != &rhs ) { std::swap( m_instance, rhs.m_instance ); std::swap( m_surface, rhs.m_surface ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_dispatcher, rhs.m_dispatcher ); } return *this; } VULKAN_HPP_NAMESPACE::SurfaceKHR const & operator*() const VULKAN_HPP_NOEXCEPT { return m_surface; } operator VULKAN_HPP_NAMESPACE::SurfaceKHR() const VULKAN_HPP_NOEXCEPT { return m_surface; } void clear() VULKAN_HPP_NOEXCEPT { if ( m_surface ) { getDispatcher()->vkDestroySurfaceKHR( static_cast( m_instance ), static_cast( m_surface ), reinterpret_cast( m_allocator ) ); } m_instance = nullptr; m_surface = nullptr; m_allocator = nullptr; m_dispatcher = nullptr; } VULKAN_HPP_NAMESPACE::SurfaceKHR release() { m_instance = nullptr; m_allocator = nullptr; m_dispatcher = nullptr; return VULKAN_HPP_NAMESPACE::exchange( m_surface, nullptr ); } VULKAN_HPP_NAMESPACE::Instance getInstance() const { return m_instance; } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::InstanceDispatcher const * getDispatcher() const { VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); return m_dispatcher; } void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR & rhs ) VULKAN_HPP_NOEXCEPT { std::swap( m_instance, rhs.m_instance ); std::swap( m_surface, rhs.m_surface ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_dispatcher, rhs.m_dispatcher ); } private: VULKAN_HPP_NAMESPACE::Instance m_instance = {}; VULKAN_HPP_NAMESPACE::SurfaceKHR m_surface = {}; const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::InstanceDispatcher const * m_dispatcher = nullptr; }; template <> struct isVulkanRAIIHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; class SwapchainKHR { public: using CType = VkSwapchainKHR; using CppType = VULKAN_HPP_NAMESPACE::SwapchainKHR; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eSwapchainKHR; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eSwapchainKHR; public: # if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) SwapchainKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::SwapchainCreateInfoKHR const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) { *this = device.createSwapchainKHR( createInfo, allocator ); } # endif SwapchainKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkSwapchainKHR swapchain, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) : m_device( device ) , m_swapchain( swapchain ) , m_allocator( static_cast( allocator ) ) , m_dispatcher( device.getDispatcher() ) { } SwapchainKHR( std::nullptr_t ) {} ~SwapchainKHR() { clear(); } SwapchainKHR() = delete; SwapchainKHR( SwapchainKHR const & ) = delete; SwapchainKHR( SwapchainKHR && rhs ) VULKAN_HPP_NOEXCEPT : m_device( VULKAN_HPP_NAMESPACE::exchange( rhs.m_device, {} ) ) , m_swapchain( VULKAN_HPP_NAMESPACE::exchange( rhs.m_swapchain, {} ) ) , m_allocator( VULKAN_HPP_NAMESPACE::exchange( rhs.m_allocator, {} ) ) , m_dispatcher( VULKAN_HPP_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) { } SwapchainKHR & operator=( SwapchainKHR const & ) = delete; SwapchainKHR & operator=( SwapchainKHR && rhs ) VULKAN_HPP_NOEXCEPT { if ( this != &rhs ) { std::swap( m_device, rhs.m_device ); std::swap( m_swapchain, rhs.m_swapchain ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_dispatcher, rhs.m_dispatcher ); } return *this; } VULKAN_HPP_NAMESPACE::SwapchainKHR const & operator*() const VULKAN_HPP_NOEXCEPT { return m_swapchain; } operator VULKAN_HPP_NAMESPACE::SwapchainKHR() const VULKAN_HPP_NOEXCEPT { return m_swapchain; } void clear() VULKAN_HPP_NOEXCEPT { if ( m_swapchain ) { getDispatcher()->vkDestroySwapchainKHR( static_cast( m_device ), static_cast( m_swapchain ), reinterpret_cast( m_allocator ) ); } m_device = nullptr; m_swapchain = nullptr; m_allocator = nullptr; m_dispatcher = nullptr; } VULKAN_HPP_NAMESPACE::SwapchainKHR release() { m_device = nullptr; m_allocator = nullptr; m_dispatcher = nullptr; return VULKAN_HPP_NAMESPACE::exchange( m_swapchain, nullptr ); } VULKAN_HPP_NAMESPACE::Device getDevice() const { return m_device; } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * getDispatcher() const { VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); return m_dispatcher; } void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::SwapchainKHR & rhs ) VULKAN_HPP_NOEXCEPT { std::swap( m_device, rhs.m_device ); std::swap( m_swapchain, rhs.m_swapchain ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_dispatcher, rhs.m_dispatcher ); } //=== VK_KHR_swapchain === VULKAN_HPP_NODISCARD std::vector getImages() const; VULKAN_HPP_NODISCARD std::pair acquireNextImage( uint64_t timeout, VULKAN_HPP_NAMESPACE::Semaphore semaphore VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT, VULKAN_HPP_NAMESPACE::Fence fence VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT ) const; //=== VK_EXT_display_control === VULKAN_HPP_NODISCARD uint64_t getCounterEXT( VULKAN_HPP_NAMESPACE::SurfaceCounterFlagBitsEXT counter ) const; //=== VK_GOOGLE_display_timing === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::RefreshCycleDurationGOOGLE getRefreshCycleDurationGOOGLE() const; VULKAN_HPP_NODISCARD std::vector getPastPresentationTimingGOOGLE() const; //=== VK_KHR_shared_presentable_image === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Result getStatus() const; //=== VK_AMD_display_native_hdr === void setLocalDimmingAMD( VULKAN_HPP_NAMESPACE::Bool32 localDimmingEnable ) const VULKAN_HPP_NOEXCEPT; //=== VK_KHR_present_wait === VULKAN_HPP_NODISCARD VULKAN_HPP_NAMESPACE::Result waitForPresent( uint64_t presentId, uint64_t timeout ) const; # if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_EXT_full_screen_exclusive === void acquireFullScreenExclusiveModeEXT() const; void releaseFullScreenExclusiveModeEXT() const; # endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_NV_low_latency2 === void setLatencySleepModeNV( const VULKAN_HPP_NAMESPACE::LatencySleepModeInfoNV & sleepModeInfo ) const; void latencySleepNV( const VULKAN_HPP_NAMESPACE::LatencySleepInfoNV & sleepInfo ) const VULKAN_HPP_NOEXCEPT; void setLatencyMarkerNV( const VULKAN_HPP_NAMESPACE::SetLatencyMarkerInfoNV & latencyMarkerInfo ) const VULKAN_HPP_NOEXCEPT; VULKAN_HPP_NODISCARD std::vector getLatencyTimingsNV() const; private: VULKAN_HPP_NAMESPACE::Device m_device = {}; VULKAN_HPP_NAMESPACE::SwapchainKHR m_swapchain = {}; const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; template <> struct isVulkanRAIIHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; class SwapchainKHRs : public std::vector { public: # if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) SwapchainKHRs( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) { *this = device.createSharedSwapchainsKHR( createInfos, allocator ); } # endif SwapchainKHRs( std::nullptr_t ) {} SwapchainKHRs() = delete; SwapchainKHRs( SwapchainKHRs const & ) = delete; SwapchainKHRs( SwapchainKHRs && rhs ) = default; SwapchainKHRs & operator=( SwapchainKHRs const & ) = delete; SwapchainKHRs & operator=( SwapchainKHRs && rhs ) = default; private: SwapchainKHRs( std::vector && rhs ) { std::swap( *this, rhs ); } }; class ValidationCacheEXT { public: using CType = VkValidationCacheEXT; using CppType = VULKAN_HPP_NAMESPACE::ValidationCacheEXT; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eValidationCacheEXT; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eValidationCacheEXT; public: # if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) ValidationCacheEXT( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::ValidationCacheCreateInfoEXT const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) { *this = device.createValidationCacheEXT( createInfo, allocator ); } # endif ValidationCacheEXT( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkValidationCacheEXT validationCache, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) : m_device( device ) , m_validationCache( validationCache ) , m_allocator( static_cast( allocator ) ) , m_dispatcher( device.getDispatcher() ) { } ValidationCacheEXT( std::nullptr_t ) {} ~ValidationCacheEXT() { clear(); } ValidationCacheEXT() = delete; ValidationCacheEXT( ValidationCacheEXT const & ) = delete; ValidationCacheEXT( ValidationCacheEXT && rhs ) VULKAN_HPP_NOEXCEPT : m_device( VULKAN_HPP_NAMESPACE::exchange( rhs.m_device, {} ) ) , m_validationCache( VULKAN_HPP_NAMESPACE::exchange( rhs.m_validationCache, {} ) ) , m_allocator( VULKAN_HPP_NAMESPACE::exchange( rhs.m_allocator, {} ) ) , m_dispatcher( VULKAN_HPP_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) { } ValidationCacheEXT & operator=( ValidationCacheEXT const & ) = delete; ValidationCacheEXT & operator=( ValidationCacheEXT && rhs ) VULKAN_HPP_NOEXCEPT { if ( this != &rhs ) { std::swap( m_device, rhs.m_device ); std::swap( m_validationCache, rhs.m_validationCache ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_dispatcher, rhs.m_dispatcher ); } return *this; } VULKAN_HPP_NAMESPACE::ValidationCacheEXT const & operator*() const VULKAN_HPP_NOEXCEPT { return m_validationCache; } operator VULKAN_HPP_NAMESPACE::ValidationCacheEXT() const VULKAN_HPP_NOEXCEPT { return m_validationCache; } void clear() VULKAN_HPP_NOEXCEPT { if ( m_validationCache ) { getDispatcher()->vkDestroyValidationCacheEXT( static_cast( m_device ), static_cast( m_validationCache ), reinterpret_cast( m_allocator ) ); } m_device = nullptr; m_validationCache = nullptr; m_allocator = nullptr; m_dispatcher = nullptr; } VULKAN_HPP_NAMESPACE::ValidationCacheEXT release() { m_device = nullptr; m_allocator = nullptr; m_dispatcher = nullptr; return VULKAN_HPP_NAMESPACE::exchange( m_validationCache, nullptr ); } VULKAN_HPP_NAMESPACE::Device getDevice() const { return m_device; } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * getDispatcher() const { VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); return m_dispatcher; } void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::ValidationCacheEXT & rhs ) VULKAN_HPP_NOEXCEPT { std::swap( m_device, rhs.m_device ); std::swap( m_validationCache, rhs.m_validationCache ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_dispatcher, rhs.m_dispatcher ); } //=== VK_EXT_validation_cache === void merge( VULKAN_HPP_NAMESPACE::ArrayProxy const & srcCaches ) const; VULKAN_HPP_NODISCARD std::vector getData() const; private: VULKAN_HPP_NAMESPACE::Device m_device = {}; VULKAN_HPP_NAMESPACE::ValidationCacheEXT m_validationCache = {}; const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; template <> struct isVulkanRAIIHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; class VideoSessionKHR { public: using CType = VkVideoSessionKHR; using CppType = VULKAN_HPP_NAMESPACE::VideoSessionKHR; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eVideoSessionKHR; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eUnknown; public: # if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) VideoSessionKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::VideoSessionCreateInfoKHR const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) { *this = device.createVideoSessionKHR( createInfo, allocator ); } # endif VideoSessionKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkVideoSessionKHR videoSession, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) : m_device( device ) , m_videoSession( videoSession ) , m_allocator( static_cast( allocator ) ) , m_dispatcher( device.getDispatcher() ) { } VideoSessionKHR( std::nullptr_t ) {} ~VideoSessionKHR() { clear(); } VideoSessionKHR() = delete; VideoSessionKHR( VideoSessionKHR const & ) = delete; VideoSessionKHR( VideoSessionKHR && rhs ) VULKAN_HPP_NOEXCEPT : m_device( VULKAN_HPP_NAMESPACE::exchange( rhs.m_device, {} ) ) , m_videoSession( VULKAN_HPP_NAMESPACE::exchange( rhs.m_videoSession, {} ) ) , m_allocator( VULKAN_HPP_NAMESPACE::exchange( rhs.m_allocator, {} ) ) , m_dispatcher( VULKAN_HPP_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) { } VideoSessionKHR & operator=( VideoSessionKHR const & ) = delete; VideoSessionKHR & operator=( VideoSessionKHR && rhs ) VULKAN_HPP_NOEXCEPT { if ( this != &rhs ) { std::swap( m_device, rhs.m_device ); std::swap( m_videoSession, rhs.m_videoSession ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_dispatcher, rhs.m_dispatcher ); } return *this; } VULKAN_HPP_NAMESPACE::VideoSessionKHR const & operator*() const VULKAN_HPP_NOEXCEPT { return m_videoSession; } operator VULKAN_HPP_NAMESPACE::VideoSessionKHR() const VULKAN_HPP_NOEXCEPT { return m_videoSession; } void clear() VULKAN_HPP_NOEXCEPT { if ( m_videoSession ) { getDispatcher()->vkDestroyVideoSessionKHR( static_cast( m_device ), static_cast( m_videoSession ), reinterpret_cast( m_allocator ) ); } m_device = nullptr; m_videoSession = nullptr; m_allocator = nullptr; m_dispatcher = nullptr; } VULKAN_HPP_NAMESPACE::VideoSessionKHR release() { m_device = nullptr; m_allocator = nullptr; m_dispatcher = nullptr; return VULKAN_HPP_NAMESPACE::exchange( m_videoSession, nullptr ); } VULKAN_HPP_NAMESPACE::Device getDevice() const { return m_device; } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * getDispatcher() const { VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); return m_dispatcher; } void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::VideoSessionKHR & rhs ) VULKAN_HPP_NOEXCEPT { std::swap( m_device, rhs.m_device ); std::swap( m_videoSession, rhs.m_videoSession ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_dispatcher, rhs.m_dispatcher ); } //=== VK_KHR_video_queue === VULKAN_HPP_NODISCARD std::vector getMemoryRequirements() const; void bindMemory( VULKAN_HPP_NAMESPACE::ArrayProxy const & bindSessionMemoryInfos ) const; private: VULKAN_HPP_NAMESPACE::Device m_device = {}; VULKAN_HPP_NAMESPACE::VideoSessionKHR m_videoSession = {}; const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; template <> struct isVulkanRAIIHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; class VideoSessionParametersKHR { public: using CType = VkVideoSessionParametersKHR; using CppType = VULKAN_HPP_NAMESPACE::VideoSessionParametersKHR; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eVideoSessionParametersKHR; static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eUnknown; public: # if !defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) VideoSessionParametersKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VULKAN_HPP_NAMESPACE::VideoSessionParametersCreateInfoKHR const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) { *this = device.createVideoSessionParametersKHR( createInfo, allocator ); } # endif VideoSessionParametersKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device const & device, VkVideoSessionParametersKHR videoSessionParameters, VULKAN_HPP_NAMESPACE::Optional allocator = nullptr ) : m_device( device ) , m_videoSessionParameters( videoSessionParameters ) , m_allocator( static_cast( allocator ) ) , m_dispatcher( device.getDispatcher() ) { } VideoSessionParametersKHR( std::nullptr_t ) {} ~VideoSessionParametersKHR() { clear(); } VideoSessionParametersKHR() = delete; VideoSessionParametersKHR( VideoSessionParametersKHR const & ) = delete; VideoSessionParametersKHR( VideoSessionParametersKHR && rhs ) VULKAN_HPP_NOEXCEPT : m_device( VULKAN_HPP_NAMESPACE::exchange( rhs.m_device, {} ) ) , m_videoSessionParameters( VULKAN_HPP_NAMESPACE::exchange( rhs.m_videoSessionParameters, {} ) ) , m_allocator( VULKAN_HPP_NAMESPACE::exchange( rhs.m_allocator, {} ) ) , m_dispatcher( VULKAN_HPP_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) ) { } VideoSessionParametersKHR & operator=( VideoSessionParametersKHR const & ) = delete; VideoSessionParametersKHR & operator=( VideoSessionParametersKHR && rhs ) VULKAN_HPP_NOEXCEPT { if ( this != &rhs ) { std::swap( m_device, rhs.m_device ); std::swap( m_videoSessionParameters, rhs.m_videoSessionParameters ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_dispatcher, rhs.m_dispatcher ); } return *this; } VULKAN_HPP_NAMESPACE::VideoSessionParametersKHR const & operator*() const VULKAN_HPP_NOEXCEPT { return m_videoSessionParameters; } operator VULKAN_HPP_NAMESPACE::VideoSessionParametersKHR() const VULKAN_HPP_NOEXCEPT { return m_videoSessionParameters; } void clear() VULKAN_HPP_NOEXCEPT { if ( m_videoSessionParameters ) { getDispatcher()->vkDestroyVideoSessionParametersKHR( static_cast( m_device ), static_cast( m_videoSessionParameters ), reinterpret_cast( m_allocator ) ); } m_device = nullptr; m_videoSessionParameters = nullptr; m_allocator = nullptr; m_dispatcher = nullptr; } VULKAN_HPP_NAMESPACE::VideoSessionParametersKHR release() { m_device = nullptr; m_allocator = nullptr; m_dispatcher = nullptr; return VULKAN_HPP_NAMESPACE::exchange( m_videoSessionParameters, nullptr ); } VULKAN_HPP_NAMESPACE::Device getDevice() const { return m_device; } VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * getDispatcher() const { VULKAN_HPP_ASSERT( m_dispatcher->getVkHeaderVersion() == VK_HEADER_VERSION ); return m_dispatcher; } void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::VideoSessionParametersKHR & rhs ) VULKAN_HPP_NOEXCEPT { std::swap( m_device, rhs.m_device ); std::swap( m_videoSessionParameters, rhs.m_videoSessionParameters ); std::swap( m_allocator, rhs.m_allocator ); std::swap( m_dispatcher, rhs.m_dispatcher ); } //=== VK_KHR_video_queue === void update( const VULKAN_HPP_NAMESPACE::VideoSessionParametersUpdateInfoKHR & updateInfo ) const; private: VULKAN_HPP_NAMESPACE::Device m_device = {}; VULKAN_HPP_NAMESPACE::VideoSessionParametersKHR m_videoSessionParameters = {}; const VULKAN_HPP_NAMESPACE::AllocationCallbacks * m_allocator = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::DeviceDispatcher const * m_dispatcher = nullptr; }; template <> struct isVulkanRAIIHandleType { static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = true; }; // operators to compare vk::raii-handles # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) template ::value, bool>::type = 0> auto operator<=>( T const & a, T const & b ) VULKAN_HPP_NOEXCEPT { return *a <=> *b; } # else template ::value, bool>::type = 0> bool operator==( T const & a, T const & b ) VULKAN_HPP_NOEXCEPT { return *a == *b; } template ::value, bool>::type = 0> bool operator!=( T const & a, T const & b ) VULKAN_HPP_NOEXCEPT { return *a != *b; } template ::value, bool>::type = 0> bool operator<( T const & a, T const & b ) VULKAN_HPP_NOEXCEPT { return *a < *b; } # endif template ::value, bool>::type = 0> bool operator==( const T & v, std::nullptr_t ) VULKAN_HPP_NOEXCEPT { return !*v; } template ::value, bool>::type = 0> bool operator==( std::nullptr_t, const T & v ) VULKAN_HPP_NOEXCEPT { return !*v; } template ::value, bool>::type = 0> bool operator!=( const T & v, std::nullptr_t ) VULKAN_HPP_NOEXCEPT { return *v; } template ::value, bool>::type = 0> bool operator!=( std::nullptr_t, const T & v ) VULKAN_HPP_NOEXCEPT { return *v; } //=========================== //=== COMMAND Definitions === //=========================== //=== VK_VERSION_1_0 === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type Context::createInstance( VULKAN_HPP_NAMESPACE::InstanceCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { VULKAN_HPP_NAMESPACE::Instance instance; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateInstance( reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &instance ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { # if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) return VULKAN_HPP_UNEXPECTED( result ); # else VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Context::createInstance" ); # endif } return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Instance( *this, *reinterpret_cast( &instance ), allocator ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType< std::vector>::Type Instance::enumeratePhysicalDevices() const { std::vector physicalDevices; uint32_t physicalDeviceCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( getDispatcher()->vkEnumeratePhysicalDevices( static_cast( m_instance ), &physicalDeviceCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && physicalDeviceCount ) { physicalDevices.resize( physicalDeviceCount ); result = static_cast( getDispatcher()->vkEnumeratePhysicalDevices( static_cast( m_instance ), &physicalDeviceCount, reinterpret_cast( physicalDevices.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); if ( ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) && ( result != VULKAN_HPP_NAMESPACE::Result::eIncomplete ) ) { # if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) return VULKAN_HPP_UNEXPECTED( result ); # else VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Instance::enumeratePhysicalDevices" ); # endif } std::vector physicalDevicesRAII; physicalDevicesRAII.reserve( physicalDevices.size() ); for ( auto & physicalDevice : physicalDevices ) { physicalDevicesRAII.emplace_back( *this, *reinterpret_cast( &physicalDevice ) ); } return physicalDevicesRAII; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures PhysicalDevice::getFeatures() const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceFeatures && "Function requires " ); VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures features; getDispatcher()->vkGetPhysicalDeviceFeatures( static_cast( m_physicalDevice ), reinterpret_cast( &features ) ); return features; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::FormatProperties PhysicalDevice::getFormatProperties( VULKAN_HPP_NAMESPACE::Format format ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceFormatProperties && "Function requires " ); VULKAN_HPP_NAMESPACE::FormatProperties formatProperties; getDispatcher()->vkGetPhysicalDeviceFormatProperties( static_cast( m_physicalDevice ), static_cast( format ), reinterpret_cast( &formatProperties ) ); return formatProperties; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::ImageFormatProperties PhysicalDevice::getImageFormatProperties( VULKAN_HPP_NAMESPACE::Format format, VULKAN_HPP_NAMESPACE::ImageType type, VULKAN_HPP_NAMESPACE::ImageTiling tiling, VULKAN_HPP_NAMESPACE::ImageUsageFlags usage, VULKAN_HPP_NAMESPACE::ImageCreateFlags flags ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceImageFormatProperties && "Function requires " ); VULKAN_HPP_NAMESPACE::ImageFormatProperties imageFormatProperties; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetPhysicalDeviceImageFormatProperties( static_cast( m_physicalDevice ), static_cast( format ), static_cast( type ), static_cast( tiling ), static_cast( usage ), static_cast( flags ), reinterpret_cast( &imageFormatProperties ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getImageFormatProperties" ); return imageFormatProperties; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties PhysicalDevice::getProperties() const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceProperties && "Function requires " ); VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties properties; getDispatcher()->vkGetPhysicalDeviceProperties( static_cast( m_physicalDevice ), reinterpret_cast( &properties ) ); return properties; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector PhysicalDevice::getQueueFamilyProperties() const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceQueueFamilyProperties && "Function requires " ); std::vector queueFamilyProperties; uint32_t queueFamilyPropertyCount; getDispatcher()->vkGetPhysicalDeviceQueueFamilyProperties( static_cast( m_physicalDevice ), &queueFamilyPropertyCount, nullptr ); queueFamilyProperties.resize( queueFamilyPropertyCount ); getDispatcher()->vkGetPhysicalDeviceQueueFamilyProperties( static_cast( m_physicalDevice ), &queueFamilyPropertyCount, reinterpret_cast( queueFamilyProperties.data() ) ); VULKAN_HPP_ASSERT( queueFamilyPropertyCount <= queueFamilyProperties.size() ); if ( queueFamilyPropertyCount < queueFamilyProperties.size() ) { queueFamilyProperties.resize( queueFamilyPropertyCount ); } return queueFamilyProperties; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties PhysicalDevice::getMemoryProperties() const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceMemoryProperties && "Function requires " ); VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties memoryProperties; getDispatcher()->vkGetPhysicalDeviceMemoryProperties( static_cast( m_physicalDevice ), reinterpret_cast( &memoryProperties ) ); return memoryProperties; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::PFN_VoidFunction Instance::getProcAddr( const std::string & name ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetInstanceProcAddr && "Function requires " ); PFN_vkVoidFunction result = getDispatcher()->vkGetInstanceProcAddr( static_cast( m_instance ), name.c_str() ); return result; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::PFN_VoidFunction Device::getProcAddr( const std::string & name ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetDeviceProcAddr && "Function requires " ); PFN_vkVoidFunction result = getDispatcher()->vkGetDeviceProcAddr( static_cast( m_device ), name.c_str() ); return result; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type PhysicalDevice::createDevice( VULKAN_HPP_NAMESPACE::DeviceCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { VULKAN_HPP_NAMESPACE::Device device; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateDevice( static_cast( m_physicalDevice ), reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &device ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { # if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) return VULKAN_HPP_UNEXPECTED( result ); # else VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "PhysicalDevice::createDevice" ); # endif } return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Device( *this, *reinterpret_cast( &device ), allocator ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector Context::enumerateInstanceExtensionProperties( Optional layerName ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkEnumerateInstanceExtensionProperties && "Function requires " ); std::vector properties; uint32_t propertyCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( getDispatcher()->vkEnumerateInstanceExtensionProperties( layerName ? layerName->c_str() : nullptr, &propertyCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); result = static_cast( getDispatcher()->vkEnumerateInstanceExtensionProperties( layerName ? layerName->c_str() : nullptr, &propertyCount, reinterpret_cast( properties.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Context::enumerateInstanceExtensionProperties" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } return properties; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector PhysicalDevice::enumerateDeviceExtensionProperties( Optional layerName ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkEnumerateDeviceExtensionProperties && "Function requires " ); std::vector properties; uint32_t propertyCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( getDispatcher()->vkEnumerateDeviceExtensionProperties( static_cast( m_physicalDevice ), layerName ? layerName->c_str() : nullptr, &propertyCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); result = static_cast( getDispatcher()->vkEnumerateDeviceExtensionProperties( static_cast( m_physicalDevice ), layerName ? layerName->c_str() : nullptr, &propertyCount, reinterpret_cast( properties.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::enumerateDeviceExtensionProperties" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } return properties; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector Context::enumerateInstanceLayerProperties() const { VULKAN_HPP_ASSERT( getDispatcher()->vkEnumerateInstanceLayerProperties && "Function requires " ); std::vector properties; uint32_t propertyCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( getDispatcher()->vkEnumerateInstanceLayerProperties( &propertyCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); result = static_cast( getDispatcher()->vkEnumerateInstanceLayerProperties( &propertyCount, reinterpret_cast( properties.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Context::enumerateInstanceLayerProperties" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } return properties; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector PhysicalDevice::enumerateDeviceLayerProperties() const { VULKAN_HPP_ASSERT( getDispatcher()->vkEnumerateDeviceLayerProperties && "Function requires " ); std::vector properties; uint32_t propertyCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( getDispatcher()->vkEnumerateDeviceLayerProperties( static_cast( m_physicalDevice ), &propertyCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); result = static_cast( getDispatcher()->vkEnumerateDeviceLayerProperties( static_cast( m_physicalDevice ), &propertyCount, reinterpret_cast( properties.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::enumerateDeviceLayerProperties" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } return properties; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type Device::getQueue( uint32_t queueFamilyIndex, uint32_t queueIndex ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { VULKAN_HPP_NAMESPACE::Queue queue; getDispatcher()->vkGetDeviceQueue( static_cast( m_device ), queueFamilyIndex, queueIndex, reinterpret_cast( &queue ) ); return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Queue( *this, *reinterpret_cast( &queue ) ); } VULKAN_HPP_INLINE void Queue::submit( VULKAN_HPP_NAMESPACE::ArrayProxy const & submits, VULKAN_HPP_NAMESPACE::Fence fence ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkQueueSubmit && "Function requires " ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkQueueSubmit( static_cast( m_queue ), submits.size(), reinterpret_cast( submits.data() ), static_cast( fence ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Queue::submit" ); } VULKAN_HPP_INLINE void Queue::waitIdle() const { VULKAN_HPP_ASSERT( getDispatcher()->vkQueueWaitIdle && "Function requires " ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkQueueWaitIdle( static_cast( m_queue ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Queue::waitIdle" ); } VULKAN_HPP_INLINE void Device::waitIdle() const { VULKAN_HPP_ASSERT( getDispatcher()->vkDeviceWaitIdle && "Function requires " ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkDeviceWaitIdle( static_cast( m_device ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::waitIdle" ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type Device::allocateMemory( VULKAN_HPP_NAMESPACE::MemoryAllocateInfo const & allocateInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { VULKAN_HPP_NAMESPACE::DeviceMemory memory; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkAllocateMemory( static_cast( m_device ), reinterpret_cast( &allocateInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &memory ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { # if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) return VULKAN_HPP_UNEXPECTED( result ); # else VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::allocateMemory" ); # endif } return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeviceMemory( *this, *reinterpret_cast( &memory ), allocator ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE void * DeviceMemory::mapMemory( VULKAN_HPP_NAMESPACE::DeviceSize offset, VULKAN_HPP_NAMESPACE::DeviceSize size, VULKAN_HPP_NAMESPACE::MemoryMapFlags flags ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkMapMemory && "Function requires " ); void * pData; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkMapMemory( static_cast( m_device ), static_cast( m_memory ), static_cast( offset ), static_cast( size ), static_cast( flags ), &pData ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::DeviceMemory::mapMemory" ); return pData; } VULKAN_HPP_INLINE void DeviceMemory::unmapMemory() const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkUnmapMemory && "Function requires " ); getDispatcher()->vkUnmapMemory( static_cast( m_device ), static_cast( m_memory ) ); } VULKAN_HPP_INLINE void Device::flushMappedMemoryRanges( VULKAN_HPP_NAMESPACE::ArrayProxy const & memoryRanges ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkFlushMappedMemoryRanges && "Function requires " ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkFlushMappedMemoryRanges( static_cast( m_device ), memoryRanges.size(), reinterpret_cast( memoryRanges.data() ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::flushMappedMemoryRanges" ); } VULKAN_HPP_INLINE void Device::invalidateMappedMemoryRanges( VULKAN_HPP_NAMESPACE::ArrayProxy const & memoryRanges ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkInvalidateMappedMemoryRanges && "Function requires " ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkInvalidateMappedMemoryRanges( static_cast( m_device ), memoryRanges.size(), reinterpret_cast( memoryRanges.data() ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::invalidateMappedMemoryRanges" ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::DeviceSize DeviceMemory::getCommitment() const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetDeviceMemoryCommitment && "Function requires " ); VULKAN_HPP_NAMESPACE::DeviceSize committedMemoryInBytes; getDispatcher()->vkGetDeviceMemoryCommitment( static_cast( m_device ), static_cast( m_memory ), reinterpret_cast( &committedMemoryInBytes ) ); return committedMemoryInBytes; } VULKAN_HPP_INLINE void Buffer::bindMemory( VULKAN_HPP_NAMESPACE::DeviceMemory memory, VULKAN_HPP_NAMESPACE::DeviceSize memoryOffset ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkBindBufferMemory && "Function requires " ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkBindBufferMemory( static_cast( m_device ), static_cast( m_buffer ), static_cast( memory ), static_cast( memoryOffset ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Buffer::bindMemory" ); } VULKAN_HPP_INLINE void Image::bindMemory( VULKAN_HPP_NAMESPACE::DeviceMemory memory, VULKAN_HPP_NAMESPACE::DeviceSize memoryOffset ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkBindImageMemory && "Function requires " ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkBindImageMemory( static_cast( m_device ), static_cast( m_image ), static_cast( memory ), static_cast( memoryOffset ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Image::bindMemory" ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MemoryRequirements Buffer::getMemoryRequirements() const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetBufferMemoryRequirements && "Function requires " ); VULKAN_HPP_NAMESPACE::MemoryRequirements memoryRequirements; getDispatcher()->vkGetBufferMemoryRequirements( static_cast( m_device ), static_cast( m_buffer ), reinterpret_cast( &memoryRequirements ) ); return memoryRequirements; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MemoryRequirements Image::getMemoryRequirements() const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetImageMemoryRequirements && "Function requires " ); VULKAN_HPP_NAMESPACE::MemoryRequirements memoryRequirements; getDispatcher()->vkGetImageMemoryRequirements( static_cast( m_device ), static_cast( m_image ), reinterpret_cast( &memoryRequirements ) ); return memoryRequirements; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector Image::getSparseMemoryRequirements() const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetImageSparseMemoryRequirements && "Function requires " ); std::vector sparseMemoryRequirements; uint32_t sparseMemoryRequirementCount; getDispatcher()->vkGetImageSparseMemoryRequirements( static_cast( m_device ), static_cast( m_image ), &sparseMemoryRequirementCount, nullptr ); sparseMemoryRequirements.resize( sparseMemoryRequirementCount ); getDispatcher()->vkGetImageSparseMemoryRequirements( static_cast( m_device ), static_cast( m_image ), &sparseMemoryRequirementCount, reinterpret_cast( sparseMemoryRequirements.data() ) ); VULKAN_HPP_ASSERT( sparseMemoryRequirementCount <= sparseMemoryRequirements.size() ); if ( sparseMemoryRequirementCount < sparseMemoryRequirements.size() ) { sparseMemoryRequirements.resize( sparseMemoryRequirementCount ); } return sparseMemoryRequirements; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector PhysicalDevice::getSparseImageFormatProperties( VULKAN_HPP_NAMESPACE::Format format, VULKAN_HPP_NAMESPACE::ImageType type, VULKAN_HPP_NAMESPACE::SampleCountFlagBits samples, VULKAN_HPP_NAMESPACE::ImageUsageFlags usage, VULKAN_HPP_NAMESPACE::ImageTiling tiling ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceSparseImageFormatProperties && "Function requires " ); std::vector properties; uint32_t propertyCount; getDispatcher()->vkGetPhysicalDeviceSparseImageFormatProperties( static_cast( m_physicalDevice ), static_cast( format ), static_cast( type ), static_cast( samples ), static_cast( usage ), static_cast( tiling ), &propertyCount, nullptr ); properties.resize( propertyCount ); getDispatcher()->vkGetPhysicalDeviceSparseImageFormatProperties( static_cast( m_physicalDevice ), static_cast( format ), static_cast( type ), static_cast( samples ), static_cast( usage ), static_cast( tiling ), &propertyCount, reinterpret_cast( properties.data() ) ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } return properties; } VULKAN_HPP_INLINE void Queue::bindSparse( VULKAN_HPP_NAMESPACE::ArrayProxy const & bindInfo, VULKAN_HPP_NAMESPACE::Fence fence ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkQueueBindSparse && "Function requires " ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkQueueBindSparse( static_cast( m_queue ), bindInfo.size(), reinterpret_cast( bindInfo.data() ), static_cast( fence ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Queue::bindSparse" ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type Device::createFence( VULKAN_HPP_NAMESPACE::FenceCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { VULKAN_HPP_NAMESPACE::Fence fence; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateFence( static_cast( m_device ), reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &fence ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { # if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) return VULKAN_HPP_UNEXPECTED( result ); # else VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createFence" ); # endif } return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Fence( *this, *reinterpret_cast( &fence ), allocator ); } VULKAN_HPP_INLINE void Device::resetFences( VULKAN_HPP_NAMESPACE::ArrayProxy const & fences ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkResetFences && "Function requires " ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkResetFences( static_cast( m_device ), fences.size(), reinterpret_cast( fences.data() ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::resetFences" ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Fence::getStatus() const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetFenceStatus && "Function requires " ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetFenceStatus( static_cast( m_device ), static_cast( m_fence ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Fence::getStatus", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eNotReady } ); return static_cast( result ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Device::waitForFences( VULKAN_HPP_NAMESPACE::ArrayProxy const & fences, VULKAN_HPP_NAMESPACE::Bool32 waitAll, uint64_t timeout ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkWaitForFences && "Function requires " ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkWaitForFences( static_cast( m_device ), fences.size(), reinterpret_cast( fences.data() ), static_cast( waitAll ), timeout ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::waitForFences", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eTimeout } ); return static_cast( result ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type Device::createSemaphore( VULKAN_HPP_NAMESPACE::SemaphoreCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { VULKAN_HPP_NAMESPACE::Semaphore semaphore; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateSemaphore( static_cast( m_device ), reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &semaphore ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { # if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) return VULKAN_HPP_UNEXPECTED( result ); # else VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createSemaphore" ); # endif } return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Semaphore( *this, *reinterpret_cast( &semaphore ), allocator ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type Device::createEvent( VULKAN_HPP_NAMESPACE::EventCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { VULKAN_HPP_NAMESPACE::Event event; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateEvent( static_cast( m_device ), reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &event ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { # if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) return VULKAN_HPP_UNEXPECTED( result ); # else VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createEvent" ); # endif } return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Event( *this, *reinterpret_cast( &event ), allocator ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Event::getStatus() const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetEventStatus && "Function requires " ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetEventStatus( static_cast( m_device ), static_cast( m_event ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Event::getStatus", { VULKAN_HPP_NAMESPACE::Result::eEventSet, VULKAN_HPP_NAMESPACE::Result::eEventReset } ); return static_cast( result ); } VULKAN_HPP_INLINE void Event::set() const { VULKAN_HPP_ASSERT( getDispatcher()->vkSetEvent && "Function requires " ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkSetEvent( static_cast( m_device ), static_cast( m_event ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Event::set" ); } VULKAN_HPP_INLINE void Event::reset() const { VULKAN_HPP_ASSERT( getDispatcher()->vkResetEvent && "Function requires " ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkResetEvent( static_cast( m_device ), static_cast( m_event ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Event::reset" ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type Device::createQueryPool( VULKAN_HPP_NAMESPACE::QueryPoolCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { VULKAN_HPP_NAMESPACE::QueryPool queryPool; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateQueryPool( static_cast( m_device ), reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &queryPool ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { # if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) return VULKAN_HPP_UNEXPECTED( result ); # else VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createQueryPool" ); # endif } return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::QueryPool( *this, *reinterpret_cast( &queryPool ), allocator ); } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::pair> QueryPool::getResults( uint32_t firstQuery, uint32_t queryCount, size_t dataSize, VULKAN_HPP_NAMESPACE::DeviceSize stride, VULKAN_HPP_NAMESPACE::QueryResultFlags flags ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetQueryPoolResults && "Function requires " ); VULKAN_HPP_ASSERT( dataSize % sizeof( DataType ) == 0 ); std::vector data( dataSize / sizeof( DataType ) ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetQueryPoolResults( static_cast( m_device ), static_cast( m_queryPool ), firstQuery, queryCount, data.size() * sizeof( DataType ), reinterpret_cast( data.data() ), static_cast( stride ), static_cast( flags ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::QueryPool::getResults", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eNotReady } ); return std::make_pair( result, std::move( data ) ); } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::pair QueryPool::getResult( uint32_t firstQuery, uint32_t queryCount, VULKAN_HPP_NAMESPACE::DeviceSize stride, VULKAN_HPP_NAMESPACE::QueryResultFlags flags ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetQueryPoolResults && "Function requires " ); DataType data; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetQueryPoolResults( static_cast( m_device ), static_cast( m_queryPool ), firstQuery, queryCount, sizeof( DataType ), reinterpret_cast( &data ), static_cast( stride ), static_cast( flags ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::QueryPool::getResult", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eNotReady } ); return std::make_pair( result, std::move( data ) ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type Device::createBuffer( VULKAN_HPP_NAMESPACE::BufferCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { VULKAN_HPP_NAMESPACE::Buffer buffer; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateBuffer( static_cast( m_device ), reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &buffer ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { # if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) return VULKAN_HPP_UNEXPECTED( result ); # else VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createBuffer" ); # endif } return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Buffer( *this, *reinterpret_cast( &buffer ), allocator ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type Device::createBufferView( VULKAN_HPP_NAMESPACE::BufferViewCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { VULKAN_HPP_NAMESPACE::BufferView view; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateBufferView( static_cast( m_device ), reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &view ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { # if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) return VULKAN_HPP_UNEXPECTED( result ); # else VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createBufferView" ); # endif } return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::BufferView( *this, *reinterpret_cast( &view ), allocator ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type Device::createImage( VULKAN_HPP_NAMESPACE::ImageCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { VULKAN_HPP_NAMESPACE::Image image; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateImage( static_cast( m_device ), reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &image ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { # if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) return VULKAN_HPP_UNEXPECTED( result ); # else VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createImage" ); # endif } return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Image( *this, *reinterpret_cast( &image ), allocator ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::SubresourceLayout Image::getSubresourceLayout( const VULKAN_HPP_NAMESPACE::ImageSubresource & subresource ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetImageSubresourceLayout && "Function requires " ); VULKAN_HPP_NAMESPACE::SubresourceLayout layout; getDispatcher()->vkGetImageSubresourceLayout( static_cast( m_device ), static_cast( m_image ), reinterpret_cast( &subresource ), reinterpret_cast( &layout ) ); return layout; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type Device::createImageView( VULKAN_HPP_NAMESPACE::ImageViewCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { VULKAN_HPP_NAMESPACE::ImageView view; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateImageView( static_cast( m_device ), reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &view ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { # if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) return VULKAN_HPP_UNEXPECTED( result ); # else VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createImageView" ); # endif } return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::ImageView( *this, *reinterpret_cast( &view ), allocator ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type Device::createShaderModule( VULKAN_HPP_NAMESPACE::ShaderModuleCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { VULKAN_HPP_NAMESPACE::ShaderModule shaderModule; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateShaderModule( static_cast( m_device ), reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &shaderModule ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { # if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) return VULKAN_HPP_UNEXPECTED( result ); # else VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createShaderModule" ); # endif } return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::ShaderModule( *this, *reinterpret_cast( &shaderModule ), allocator ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type Device::createPipelineCache( VULKAN_HPP_NAMESPACE::PipelineCacheCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreatePipelineCache( static_cast( m_device ), reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &pipelineCache ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { # if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) return VULKAN_HPP_UNEXPECTED( result ); # else VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createPipelineCache" ); # endif } return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::PipelineCache( *this, *reinterpret_cast( &pipelineCache ), allocator ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector PipelineCache::getData() const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPipelineCacheData && "Function requires " ); std::vector data; size_t dataSize; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( getDispatcher()->vkGetPipelineCacheData( static_cast( m_device ), static_cast( m_pipelineCache ), &dataSize, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && dataSize ) { data.resize( dataSize ); result = static_cast( getDispatcher()->vkGetPipelineCacheData( static_cast( m_device ), static_cast( m_pipelineCache ), &dataSize, reinterpret_cast( data.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PipelineCache::getData" ); VULKAN_HPP_ASSERT( dataSize <= data.size() ); if ( dataSize < data.size() ) { data.resize( dataSize ); } return data; } VULKAN_HPP_INLINE void PipelineCache::merge( VULKAN_HPP_NAMESPACE::ArrayProxy const & srcCaches ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkMergePipelineCaches && "Function requires " ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkMergePipelineCaches( static_cast( m_device ), static_cast( m_pipelineCache ), srcCaches.size(), reinterpret_cast( srcCaches.data() ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PipelineCache::merge" ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType>::Type Device::createGraphicsPipelines( VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, VULKAN_HPP_NAMESPACE::Optional allocator ) const { std::vector pipelines( createInfos.size() ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateGraphicsPipelines( static_cast( m_device ), pipelineCache ? static_cast( **pipelineCache ) : 0, createInfos.size(), reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( pipelines.data() ) ) ); if ( ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) && ( result != VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT ) ) { # if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) return VULKAN_HPP_UNEXPECTED( result ); # else VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createGraphicsPipelines" ); # endif } std::vector pipelinesRAII; pipelinesRAII.reserve( pipelines.size() ); for ( auto & pipeline : pipelines ) { pipelinesRAII.emplace_back( *this, *reinterpret_cast( &pipeline ), allocator, result ); } return pipelinesRAII; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type Device::createGraphicsPipeline( VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, VULKAN_HPP_NAMESPACE::GraphicsPipelineCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { VULKAN_HPP_NAMESPACE::Pipeline pipeline; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateGraphicsPipelines( static_cast( m_device ), pipelineCache ? static_cast( **pipelineCache ) : 0, 1, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &pipeline ) ) ); if ( ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) && ( result != VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT ) ) { # if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) return VULKAN_HPP_UNEXPECTED( result ); # else VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createGraphicsPipeline" ); # endif } return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Pipeline( *this, *reinterpret_cast( &pipeline ), allocator, result ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType>::Type Device::createComputePipelines( VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, VULKAN_HPP_NAMESPACE::Optional allocator ) const { std::vector pipelines( createInfos.size() ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateComputePipelines( static_cast( m_device ), pipelineCache ? static_cast( **pipelineCache ) : 0, createInfos.size(), reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( pipelines.data() ) ) ); if ( ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) && ( result != VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT ) ) { # if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) return VULKAN_HPP_UNEXPECTED( result ); # else VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createComputePipelines" ); # endif } std::vector pipelinesRAII; pipelinesRAII.reserve( pipelines.size() ); for ( auto & pipeline : pipelines ) { pipelinesRAII.emplace_back( *this, *reinterpret_cast( &pipeline ), allocator, result ); } return pipelinesRAII; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type Device::createComputePipeline( VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, VULKAN_HPP_NAMESPACE::ComputePipelineCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { VULKAN_HPP_NAMESPACE::Pipeline pipeline; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateComputePipelines( static_cast( m_device ), pipelineCache ? static_cast( **pipelineCache ) : 0, 1, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &pipeline ) ) ); if ( ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) && ( result != VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT ) ) { # if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) return VULKAN_HPP_UNEXPECTED( result ); # else VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createComputePipeline" ); # endif } return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Pipeline( *this, *reinterpret_cast( &pipeline ), allocator, result ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type Device::createPipelineLayout( VULKAN_HPP_NAMESPACE::PipelineLayoutCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { VULKAN_HPP_NAMESPACE::PipelineLayout pipelineLayout; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreatePipelineLayout( static_cast( m_device ), reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &pipelineLayout ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { # if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) return VULKAN_HPP_UNEXPECTED( result ); # else VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createPipelineLayout" ); # endif } return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::PipelineLayout( *this, *reinterpret_cast( &pipelineLayout ), allocator ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type Device::createSampler( VULKAN_HPP_NAMESPACE::SamplerCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { VULKAN_HPP_NAMESPACE::Sampler sampler; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateSampler( static_cast( m_device ), reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &sampler ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { # if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) return VULKAN_HPP_UNEXPECTED( result ); # else VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createSampler" ); # endif } return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Sampler( *this, *reinterpret_cast( &sampler ), allocator ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type Device::createDescriptorSetLayout( VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { VULKAN_HPP_NAMESPACE::DescriptorSetLayout setLayout; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateDescriptorSetLayout( static_cast( m_device ), reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &setLayout ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { # if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) return VULKAN_HPP_UNEXPECTED( result ); # else VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createDescriptorSetLayout" ); # endif } return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DescriptorSetLayout( *this, *reinterpret_cast( &setLayout ), allocator ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type Device::createDescriptorPool( VULKAN_HPP_NAMESPACE::DescriptorPoolCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { VULKAN_HPP_NAMESPACE::DescriptorPool descriptorPool; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateDescriptorPool( static_cast( m_device ), reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &descriptorPool ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { # if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) return VULKAN_HPP_UNEXPECTED( result ); # else VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createDescriptorPool" ); # endif } return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DescriptorPool( *this, *reinterpret_cast( &descriptorPool ), allocator ); } VULKAN_HPP_INLINE void DescriptorPool::reset( VULKAN_HPP_NAMESPACE::DescriptorPoolResetFlags flags ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkResetDescriptorPool && "Function requires " ); getDispatcher()->vkResetDescriptorPool( static_cast( m_device ), static_cast( m_descriptorPool ), static_cast( flags ) ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType< std::vector>::Type Device::allocateDescriptorSets( VULKAN_HPP_NAMESPACE::DescriptorSetAllocateInfo const & allocateInfo ) const { std::vector descriptorSets( allocateInfo.descriptorSetCount ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkAllocateDescriptorSets( static_cast( m_device ), reinterpret_cast( &allocateInfo ), reinterpret_cast( descriptorSets.data() ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { # if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) return VULKAN_HPP_UNEXPECTED( result ); # else VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::allocateDescriptorSets" ); # endif } std::vector descriptorSetsRAII; descriptorSetsRAII.reserve( descriptorSets.size() ); for ( auto & descriptorSet : descriptorSets ) { descriptorSetsRAII.emplace_back( *this, *reinterpret_cast( &descriptorSet ), static_cast( allocateInfo.descriptorPool ) ); } return descriptorSetsRAII; } VULKAN_HPP_INLINE void Device::updateDescriptorSets( VULKAN_HPP_NAMESPACE::ArrayProxy const & descriptorWrites, VULKAN_HPP_NAMESPACE::ArrayProxy const & descriptorCopies ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkUpdateDescriptorSets && "Function requires " ); getDispatcher()->vkUpdateDescriptorSets( static_cast( m_device ), descriptorWrites.size(), reinterpret_cast( descriptorWrites.data() ), descriptorCopies.size(), reinterpret_cast( descriptorCopies.data() ) ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type Device::createFramebuffer( VULKAN_HPP_NAMESPACE::FramebufferCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { VULKAN_HPP_NAMESPACE::Framebuffer framebuffer; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateFramebuffer( static_cast( m_device ), reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &framebuffer ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { # if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) return VULKAN_HPP_UNEXPECTED( result ); # else VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createFramebuffer" ); # endif } return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Framebuffer( *this, *reinterpret_cast( &framebuffer ), allocator ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type Device::createRenderPass( VULKAN_HPP_NAMESPACE::RenderPassCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { VULKAN_HPP_NAMESPACE::RenderPass renderPass; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateRenderPass( static_cast( m_device ), reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &renderPass ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { # if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) return VULKAN_HPP_UNEXPECTED( result ); # else VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createRenderPass" ); # endif } return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::RenderPass( *this, *reinterpret_cast( &renderPass ), allocator ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Extent2D RenderPass::getRenderAreaGranularity() const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetRenderAreaGranularity && "Function requires " ); VULKAN_HPP_NAMESPACE::Extent2D granularity; getDispatcher()->vkGetRenderAreaGranularity( static_cast( m_device ), static_cast( m_renderPass ), reinterpret_cast( &granularity ) ); return granularity; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type Device::createCommandPool( VULKAN_HPP_NAMESPACE::CommandPoolCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { VULKAN_HPP_NAMESPACE::CommandPool commandPool; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateCommandPool( static_cast( m_device ), reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &commandPool ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { # if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) return VULKAN_HPP_UNEXPECTED( result ); # else VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createCommandPool" ); # endif } return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CommandPool( *this, *reinterpret_cast( &commandPool ), allocator ); } VULKAN_HPP_INLINE void CommandPool::reset( VULKAN_HPP_NAMESPACE::CommandPoolResetFlags flags ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkResetCommandPool && "Function requires " ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkResetCommandPool( static_cast( m_device ), static_cast( m_commandPool ), static_cast( flags ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::CommandPool::reset" ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType< std::vector>::Type Device::allocateCommandBuffers( VULKAN_HPP_NAMESPACE::CommandBufferAllocateInfo const & allocateInfo ) const { std::vector commandBuffers( allocateInfo.commandBufferCount ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkAllocateCommandBuffers( static_cast( m_device ), reinterpret_cast( &allocateInfo ), reinterpret_cast( commandBuffers.data() ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { # if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) return VULKAN_HPP_UNEXPECTED( result ); # else VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::allocateCommandBuffers" ); # endif } std::vector commandBuffersRAII; commandBuffersRAII.reserve( commandBuffers.size() ); for ( auto & commandBuffer : commandBuffers ) { commandBuffersRAII.emplace_back( *this, *reinterpret_cast( &commandBuffer ), static_cast( allocateInfo.commandPool ) ); } return commandBuffersRAII; } VULKAN_HPP_INLINE void CommandBuffer::begin( const VULKAN_HPP_NAMESPACE::CommandBufferBeginInfo & beginInfo ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkBeginCommandBuffer && "Function requires " ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkBeginCommandBuffer( static_cast( m_commandBuffer ), reinterpret_cast( &beginInfo ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::begin" ); } VULKAN_HPP_INLINE void CommandBuffer::end() const { VULKAN_HPP_ASSERT( getDispatcher()->vkEndCommandBuffer && "Function requires " ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkEndCommandBuffer( static_cast( m_commandBuffer ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::end" ); } VULKAN_HPP_INLINE void CommandBuffer::reset( VULKAN_HPP_NAMESPACE::CommandBufferResetFlags flags ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkResetCommandBuffer && "Function requires " ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkResetCommandBuffer( static_cast( m_commandBuffer ), static_cast( flags ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::reset" ); } VULKAN_HPP_INLINE void CommandBuffer::bindPipeline( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint, VULKAN_HPP_NAMESPACE::Pipeline pipeline ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdBindPipeline && "Function requires " ); getDispatcher()->vkCmdBindPipeline( static_cast( m_commandBuffer ), static_cast( pipelineBindPoint ), static_cast( pipeline ) ); } VULKAN_HPP_INLINE void CommandBuffer::setViewport( uint32_t firstViewport, VULKAN_HPP_NAMESPACE::ArrayProxy const & viewports ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetViewport && "Function requires " ); getDispatcher()->vkCmdSetViewport( static_cast( m_commandBuffer ), firstViewport, viewports.size(), reinterpret_cast( viewports.data() ) ); } VULKAN_HPP_INLINE void CommandBuffer::setScissor( uint32_t firstScissor, VULKAN_HPP_NAMESPACE::ArrayProxy const & scissors ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetScissor && "Function requires " ); getDispatcher()->vkCmdSetScissor( static_cast( m_commandBuffer ), firstScissor, scissors.size(), reinterpret_cast( scissors.data() ) ); } VULKAN_HPP_INLINE void CommandBuffer::setLineWidth( float lineWidth ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetLineWidth && "Function requires " ); getDispatcher()->vkCmdSetLineWidth( static_cast( m_commandBuffer ), lineWidth ); } VULKAN_HPP_INLINE void CommandBuffer::setDepthBias( float depthBiasConstantFactor, float depthBiasClamp, float depthBiasSlopeFactor ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetDepthBias && "Function requires " ); getDispatcher()->vkCmdSetDepthBias( static_cast( m_commandBuffer ), depthBiasConstantFactor, depthBiasClamp, depthBiasSlopeFactor ); } VULKAN_HPP_INLINE void CommandBuffer::setBlendConstants( const float blendConstants[4] ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetBlendConstants && "Function requires " ); getDispatcher()->vkCmdSetBlendConstants( static_cast( m_commandBuffer ), blendConstants ); } VULKAN_HPP_INLINE void CommandBuffer::setDepthBounds( float minDepthBounds, float maxDepthBounds ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetDepthBounds && "Function requires " ); getDispatcher()->vkCmdSetDepthBounds( static_cast( m_commandBuffer ), minDepthBounds, maxDepthBounds ); } VULKAN_HPP_INLINE void CommandBuffer::setStencilCompareMask( VULKAN_HPP_NAMESPACE::StencilFaceFlags faceMask, uint32_t compareMask ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetStencilCompareMask && "Function requires " ); getDispatcher()->vkCmdSetStencilCompareMask( static_cast( m_commandBuffer ), static_cast( faceMask ), compareMask ); } VULKAN_HPP_INLINE void CommandBuffer::setStencilWriteMask( VULKAN_HPP_NAMESPACE::StencilFaceFlags faceMask, uint32_t writeMask ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetStencilWriteMask && "Function requires " ); getDispatcher()->vkCmdSetStencilWriteMask( static_cast( m_commandBuffer ), static_cast( faceMask ), writeMask ); } VULKAN_HPP_INLINE void CommandBuffer::setStencilReference( VULKAN_HPP_NAMESPACE::StencilFaceFlags faceMask, uint32_t reference ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetStencilReference && "Function requires " ); getDispatcher()->vkCmdSetStencilReference( static_cast( m_commandBuffer ), static_cast( faceMask ), reference ); } VULKAN_HPP_INLINE void CommandBuffer::bindDescriptorSets( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint, VULKAN_HPP_NAMESPACE::PipelineLayout layout, uint32_t firstSet, VULKAN_HPP_NAMESPACE::ArrayProxy const & descriptorSets, VULKAN_HPP_NAMESPACE::ArrayProxy const & dynamicOffsets ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdBindDescriptorSets && "Function requires " ); getDispatcher()->vkCmdBindDescriptorSets( static_cast( m_commandBuffer ), static_cast( pipelineBindPoint ), static_cast( layout ), firstSet, descriptorSets.size(), reinterpret_cast( descriptorSets.data() ), dynamicOffsets.size(), dynamicOffsets.data() ); } VULKAN_HPP_INLINE void CommandBuffer::bindIndexBuffer( VULKAN_HPP_NAMESPACE::Buffer buffer, VULKAN_HPP_NAMESPACE::DeviceSize offset, VULKAN_HPP_NAMESPACE::IndexType indexType ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdBindIndexBuffer && "Function requires " ); getDispatcher()->vkCmdBindIndexBuffer( static_cast( m_commandBuffer ), static_cast( buffer ), static_cast( offset ), static_cast( indexType ) ); } VULKAN_HPP_INLINE void CommandBuffer::bindVertexBuffers( uint32_t firstBinding, VULKAN_HPP_NAMESPACE::ArrayProxy const & buffers, VULKAN_HPP_NAMESPACE::ArrayProxy const & offsets ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdBindVertexBuffers && "Function requires " ); # ifdef VULKAN_HPP_NO_EXCEPTIONS VULKAN_HPP_ASSERT( buffers.size() == offsets.size() ); # else if ( buffers.size() != offsets.size() ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::bindVertexBuffers: buffers.size() != offsets.size()" ); } # endif /*VULKAN_HPP_NO_EXCEPTIONS*/ getDispatcher()->vkCmdBindVertexBuffers( static_cast( m_commandBuffer ), firstBinding, buffers.size(), reinterpret_cast( buffers.data() ), reinterpret_cast( offsets.data() ) ); } VULKAN_HPP_INLINE void CommandBuffer::draw( uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdDraw && "Function requires " ); getDispatcher()->vkCmdDraw( static_cast( m_commandBuffer ), vertexCount, instanceCount, firstVertex, firstInstance ); } VULKAN_HPP_INLINE void CommandBuffer::drawIndexed( uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, int32_t vertexOffset, uint32_t firstInstance ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdDrawIndexed && "Function requires " ); getDispatcher()->vkCmdDrawIndexed( static_cast( m_commandBuffer ), indexCount, instanceCount, firstIndex, vertexOffset, firstInstance ); } VULKAN_HPP_INLINE void CommandBuffer::drawIndirect( VULKAN_HPP_NAMESPACE::Buffer buffer, VULKAN_HPP_NAMESPACE::DeviceSize offset, uint32_t drawCount, uint32_t stride ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdDrawIndirect && "Function requires " ); getDispatcher()->vkCmdDrawIndirect( static_cast( m_commandBuffer ), static_cast( buffer ), static_cast( offset ), drawCount, stride ); } VULKAN_HPP_INLINE void CommandBuffer::drawIndexedIndirect( VULKAN_HPP_NAMESPACE::Buffer buffer, VULKAN_HPP_NAMESPACE::DeviceSize offset, uint32_t drawCount, uint32_t stride ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdDrawIndexedIndirect && "Function requires " ); getDispatcher()->vkCmdDrawIndexedIndirect( static_cast( m_commandBuffer ), static_cast( buffer ), static_cast( offset ), drawCount, stride ); } VULKAN_HPP_INLINE void CommandBuffer::dispatch( uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdDispatch && "Function requires " ); getDispatcher()->vkCmdDispatch( static_cast( m_commandBuffer ), groupCountX, groupCountY, groupCountZ ); } VULKAN_HPP_INLINE void CommandBuffer::dispatchIndirect( VULKAN_HPP_NAMESPACE::Buffer buffer, VULKAN_HPP_NAMESPACE::DeviceSize offset ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdDispatchIndirect && "Function requires " ); getDispatcher()->vkCmdDispatchIndirect( static_cast( m_commandBuffer ), static_cast( buffer ), static_cast( offset ) ); } VULKAN_HPP_INLINE void CommandBuffer::copyBuffer( VULKAN_HPP_NAMESPACE::Buffer srcBuffer, VULKAN_HPP_NAMESPACE::Buffer dstBuffer, VULKAN_HPP_NAMESPACE::ArrayProxy const & regions ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdCopyBuffer && "Function requires " ); getDispatcher()->vkCmdCopyBuffer( static_cast( m_commandBuffer ), static_cast( srcBuffer ), static_cast( dstBuffer ), regions.size(), reinterpret_cast( regions.data() ) ); } VULKAN_HPP_INLINE void CommandBuffer::copyImage( VULKAN_HPP_NAMESPACE::Image srcImage, VULKAN_HPP_NAMESPACE::ImageLayout srcImageLayout, VULKAN_HPP_NAMESPACE::Image dstImage, VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout, VULKAN_HPP_NAMESPACE::ArrayProxy const & regions ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdCopyImage && "Function requires " ); getDispatcher()->vkCmdCopyImage( static_cast( m_commandBuffer ), static_cast( srcImage ), static_cast( srcImageLayout ), static_cast( dstImage ), static_cast( dstImageLayout ), regions.size(), reinterpret_cast( regions.data() ) ); } VULKAN_HPP_INLINE void CommandBuffer::blitImage( VULKAN_HPP_NAMESPACE::Image srcImage, VULKAN_HPP_NAMESPACE::ImageLayout srcImageLayout, VULKAN_HPP_NAMESPACE::Image dstImage, VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout, VULKAN_HPP_NAMESPACE::ArrayProxy const & regions, VULKAN_HPP_NAMESPACE::Filter filter ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdBlitImage && "Function requires " ); getDispatcher()->vkCmdBlitImage( static_cast( m_commandBuffer ), static_cast( srcImage ), static_cast( srcImageLayout ), static_cast( dstImage ), static_cast( dstImageLayout ), regions.size(), reinterpret_cast( regions.data() ), static_cast( filter ) ); } VULKAN_HPP_INLINE void CommandBuffer::copyBufferToImage( VULKAN_HPP_NAMESPACE::Buffer srcBuffer, VULKAN_HPP_NAMESPACE::Image dstImage, VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout, VULKAN_HPP_NAMESPACE::ArrayProxy const & regions ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdCopyBufferToImage && "Function requires " ); getDispatcher()->vkCmdCopyBufferToImage( static_cast( m_commandBuffer ), static_cast( srcBuffer ), static_cast( dstImage ), static_cast( dstImageLayout ), regions.size(), reinterpret_cast( regions.data() ) ); } VULKAN_HPP_INLINE void CommandBuffer::copyImageToBuffer( VULKAN_HPP_NAMESPACE::Image srcImage, VULKAN_HPP_NAMESPACE::ImageLayout srcImageLayout, VULKAN_HPP_NAMESPACE::Buffer dstBuffer, VULKAN_HPP_NAMESPACE::ArrayProxy const & regions ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdCopyImageToBuffer && "Function requires " ); getDispatcher()->vkCmdCopyImageToBuffer( static_cast( m_commandBuffer ), static_cast( srcImage ), static_cast( srcImageLayout ), static_cast( dstBuffer ), regions.size(), reinterpret_cast( regions.data() ) ); } template VULKAN_HPP_INLINE void CommandBuffer::updateBuffer( VULKAN_HPP_NAMESPACE::Buffer dstBuffer, VULKAN_HPP_NAMESPACE::DeviceSize dstOffset, VULKAN_HPP_NAMESPACE::ArrayProxy const & data ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdUpdateBuffer && "Function requires " ); getDispatcher()->vkCmdUpdateBuffer( static_cast( m_commandBuffer ), static_cast( dstBuffer ), static_cast( dstOffset ), data.size() * sizeof( DataType ), reinterpret_cast( data.data() ) ); } VULKAN_HPP_INLINE void CommandBuffer::fillBuffer( VULKAN_HPP_NAMESPACE::Buffer dstBuffer, VULKAN_HPP_NAMESPACE::DeviceSize dstOffset, VULKAN_HPP_NAMESPACE::DeviceSize size, uint32_t data ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdFillBuffer && "Function requires " ); getDispatcher()->vkCmdFillBuffer( static_cast( m_commandBuffer ), static_cast( dstBuffer ), static_cast( dstOffset ), static_cast( size ), data ); } VULKAN_HPP_INLINE void CommandBuffer::clearColorImage( VULKAN_HPP_NAMESPACE::Image image, VULKAN_HPP_NAMESPACE::ImageLayout imageLayout, const VULKAN_HPP_NAMESPACE::ClearColorValue & color, VULKAN_HPP_NAMESPACE::ArrayProxy const & ranges ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdClearColorImage && "Function requires " ); getDispatcher()->vkCmdClearColorImage( static_cast( m_commandBuffer ), static_cast( image ), static_cast( imageLayout ), reinterpret_cast( &color ), ranges.size(), reinterpret_cast( ranges.data() ) ); } VULKAN_HPP_INLINE void CommandBuffer::clearDepthStencilImage( VULKAN_HPP_NAMESPACE::Image image, VULKAN_HPP_NAMESPACE::ImageLayout imageLayout, const VULKAN_HPP_NAMESPACE::ClearDepthStencilValue & depthStencil, VULKAN_HPP_NAMESPACE::ArrayProxy const & ranges ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdClearDepthStencilImage && "Function requires " ); getDispatcher()->vkCmdClearDepthStencilImage( static_cast( m_commandBuffer ), static_cast( image ), static_cast( imageLayout ), reinterpret_cast( &depthStencil ), ranges.size(), reinterpret_cast( ranges.data() ) ); } VULKAN_HPP_INLINE void CommandBuffer::clearAttachments( VULKAN_HPP_NAMESPACE::ArrayProxy const & attachments, VULKAN_HPP_NAMESPACE::ArrayProxy const & rects ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdClearAttachments && "Function requires " ); getDispatcher()->vkCmdClearAttachments( static_cast( m_commandBuffer ), attachments.size(), reinterpret_cast( attachments.data() ), rects.size(), reinterpret_cast( rects.data() ) ); } VULKAN_HPP_INLINE void CommandBuffer::resolveImage( VULKAN_HPP_NAMESPACE::Image srcImage, VULKAN_HPP_NAMESPACE::ImageLayout srcImageLayout, VULKAN_HPP_NAMESPACE::Image dstImage, VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout, VULKAN_HPP_NAMESPACE::ArrayProxy const & regions ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdResolveImage && "Function requires " ); getDispatcher()->vkCmdResolveImage( static_cast( m_commandBuffer ), static_cast( srcImage ), static_cast( srcImageLayout ), static_cast( dstImage ), static_cast( dstImageLayout ), regions.size(), reinterpret_cast( regions.data() ) ); } VULKAN_HPP_INLINE void CommandBuffer::setEvent( VULKAN_HPP_NAMESPACE::Event event, VULKAN_HPP_NAMESPACE::PipelineStageFlags stageMask ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetEvent && "Function requires " ); getDispatcher()->vkCmdSetEvent( static_cast( m_commandBuffer ), static_cast( event ), static_cast( stageMask ) ); } VULKAN_HPP_INLINE void CommandBuffer::resetEvent( VULKAN_HPP_NAMESPACE::Event event, VULKAN_HPP_NAMESPACE::PipelineStageFlags stageMask ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdResetEvent && "Function requires " ); getDispatcher()->vkCmdResetEvent( static_cast( m_commandBuffer ), static_cast( event ), static_cast( stageMask ) ); } VULKAN_HPP_INLINE void CommandBuffer::waitEvents( VULKAN_HPP_NAMESPACE::ArrayProxy const & events, VULKAN_HPP_NAMESPACE::PipelineStageFlags srcStageMask, VULKAN_HPP_NAMESPACE::PipelineStageFlags dstStageMask, VULKAN_HPP_NAMESPACE::ArrayProxy const & memoryBarriers, VULKAN_HPP_NAMESPACE::ArrayProxy const & bufferMemoryBarriers, VULKAN_HPP_NAMESPACE::ArrayProxy const & imageMemoryBarriers ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdWaitEvents && "Function requires " ); getDispatcher()->vkCmdWaitEvents( static_cast( m_commandBuffer ), events.size(), reinterpret_cast( events.data() ), static_cast( srcStageMask ), static_cast( dstStageMask ), memoryBarriers.size(), reinterpret_cast( memoryBarriers.data() ), bufferMemoryBarriers.size(), reinterpret_cast( bufferMemoryBarriers.data() ), imageMemoryBarriers.size(), reinterpret_cast( imageMemoryBarriers.data() ) ); } VULKAN_HPP_INLINE void CommandBuffer::pipelineBarrier( VULKAN_HPP_NAMESPACE::PipelineStageFlags srcStageMask, VULKAN_HPP_NAMESPACE::PipelineStageFlags dstStageMask, VULKAN_HPP_NAMESPACE::DependencyFlags dependencyFlags, VULKAN_HPP_NAMESPACE::ArrayProxy const & memoryBarriers, VULKAN_HPP_NAMESPACE::ArrayProxy const & bufferMemoryBarriers, VULKAN_HPP_NAMESPACE::ArrayProxy const & imageMemoryBarriers ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdPipelineBarrier && "Function requires " ); getDispatcher()->vkCmdPipelineBarrier( static_cast( m_commandBuffer ), static_cast( srcStageMask ), static_cast( dstStageMask ), static_cast( dependencyFlags ), memoryBarriers.size(), reinterpret_cast( memoryBarriers.data() ), bufferMemoryBarriers.size(), reinterpret_cast( bufferMemoryBarriers.data() ), imageMemoryBarriers.size(), reinterpret_cast( imageMemoryBarriers.data() ) ); } VULKAN_HPP_INLINE void CommandBuffer::beginQuery( VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t query, VULKAN_HPP_NAMESPACE::QueryControlFlags flags ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdBeginQuery && "Function requires " ); getDispatcher()->vkCmdBeginQuery( static_cast( m_commandBuffer ), static_cast( queryPool ), query, static_cast( flags ) ); } VULKAN_HPP_INLINE void CommandBuffer::endQuery( VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t query ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdEndQuery && "Function requires " ); getDispatcher()->vkCmdEndQuery( static_cast( m_commandBuffer ), static_cast( queryPool ), query ); } VULKAN_HPP_INLINE void CommandBuffer::resetQueryPool( VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdResetQueryPool && "Function requires " ); getDispatcher()->vkCmdResetQueryPool( static_cast( m_commandBuffer ), static_cast( queryPool ), firstQuery, queryCount ); } VULKAN_HPP_INLINE void CommandBuffer::writeTimestamp( VULKAN_HPP_NAMESPACE::PipelineStageFlagBits pipelineStage, VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t query ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdWriteTimestamp && "Function requires " ); getDispatcher()->vkCmdWriteTimestamp( static_cast( m_commandBuffer ), static_cast( pipelineStage ), static_cast( queryPool ), query ); } VULKAN_HPP_INLINE void CommandBuffer::copyQueryPoolResults( VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, VULKAN_HPP_NAMESPACE::Buffer dstBuffer, VULKAN_HPP_NAMESPACE::DeviceSize dstOffset, VULKAN_HPP_NAMESPACE::DeviceSize stride, VULKAN_HPP_NAMESPACE::QueryResultFlags flags ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdCopyQueryPoolResults && "Function requires " ); getDispatcher()->vkCmdCopyQueryPoolResults( static_cast( m_commandBuffer ), static_cast( queryPool ), firstQuery, queryCount, static_cast( dstBuffer ), static_cast( dstOffset ), static_cast( stride ), static_cast( flags ) ); } template VULKAN_HPP_INLINE void CommandBuffer::pushConstants( VULKAN_HPP_NAMESPACE::PipelineLayout layout, VULKAN_HPP_NAMESPACE::ShaderStageFlags stageFlags, uint32_t offset, VULKAN_HPP_NAMESPACE::ArrayProxy const & values ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdPushConstants && "Function requires " ); getDispatcher()->vkCmdPushConstants( static_cast( m_commandBuffer ), static_cast( layout ), static_cast( stageFlags ), offset, values.size() * sizeof( ValuesType ), reinterpret_cast( values.data() ) ); } VULKAN_HPP_INLINE void CommandBuffer::beginRenderPass( const VULKAN_HPP_NAMESPACE::RenderPassBeginInfo & renderPassBegin, VULKAN_HPP_NAMESPACE::SubpassContents contents ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdBeginRenderPass && "Function requires " ); getDispatcher()->vkCmdBeginRenderPass( static_cast( m_commandBuffer ), reinterpret_cast( &renderPassBegin ), static_cast( contents ) ); } VULKAN_HPP_INLINE void CommandBuffer::nextSubpass( VULKAN_HPP_NAMESPACE::SubpassContents contents ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdNextSubpass && "Function requires " ); getDispatcher()->vkCmdNextSubpass( static_cast( m_commandBuffer ), static_cast( contents ) ); } VULKAN_HPP_INLINE void CommandBuffer::endRenderPass() const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdEndRenderPass && "Function requires " ); getDispatcher()->vkCmdEndRenderPass( static_cast( m_commandBuffer ) ); } VULKAN_HPP_INLINE void CommandBuffer::executeCommands( VULKAN_HPP_NAMESPACE::ArrayProxy const & commandBuffers ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdExecuteCommands && "Function requires " ); getDispatcher()->vkCmdExecuteCommands( static_cast( m_commandBuffer ), commandBuffers.size(), reinterpret_cast( commandBuffers.data() ) ); } //=== VK_VERSION_1_1 === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE uint32_t Context::enumerateInstanceVersion() const { VULKAN_HPP_ASSERT( getDispatcher()->vkEnumerateInstanceVersion && "Function requires " ); uint32_t apiVersion; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkEnumerateInstanceVersion( &apiVersion ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Context::enumerateInstanceVersion" ); return apiVersion; } VULKAN_HPP_INLINE void Device::bindBufferMemory2( VULKAN_HPP_NAMESPACE::ArrayProxy const & bindInfos ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkBindBufferMemory2 && "Function requires or " ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkBindBufferMemory2( static_cast( m_device ), bindInfos.size(), reinterpret_cast( bindInfos.data() ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::bindBufferMemory2" ); } VULKAN_HPP_INLINE void Device::bindImageMemory2( VULKAN_HPP_NAMESPACE::ArrayProxy const & bindInfos ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkBindImageMemory2 && "Function requires or " ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkBindImageMemory2( static_cast( m_device ), bindInfos.size(), reinterpret_cast( bindInfos.data() ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::bindImageMemory2" ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::PeerMemoryFeatureFlags Device::getGroupPeerMemoryFeatures( uint32_t heapIndex, uint32_t localDeviceIndex, uint32_t remoteDeviceIndex ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetDeviceGroupPeerMemoryFeatures && "Function requires or " ); VULKAN_HPP_NAMESPACE::PeerMemoryFeatureFlags peerMemoryFeatures; getDispatcher()->vkGetDeviceGroupPeerMemoryFeatures( static_cast( m_device ), heapIndex, localDeviceIndex, remoteDeviceIndex, reinterpret_cast( &peerMemoryFeatures ) ); return peerMemoryFeatures; } VULKAN_HPP_INLINE void CommandBuffer::setDeviceMask( uint32_t deviceMask ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetDeviceMask && "Function requires or " ); getDispatcher()->vkCmdSetDeviceMask( static_cast( m_commandBuffer ), deviceMask ); } VULKAN_HPP_INLINE void CommandBuffer::dispatchBase( uint32_t baseGroupX, uint32_t baseGroupY, uint32_t baseGroupZ, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdDispatchBase && "Function requires or " ); getDispatcher()->vkCmdDispatchBase( static_cast( m_commandBuffer ), baseGroupX, baseGroupY, baseGroupZ, groupCountX, groupCountY, groupCountZ ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector Instance::enumeratePhysicalDeviceGroups() const { VULKAN_HPP_ASSERT( getDispatcher()->vkEnumeratePhysicalDeviceGroups && "Function requires or " ); std::vector physicalDeviceGroupProperties; uint32_t physicalDeviceGroupCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( getDispatcher()->vkEnumeratePhysicalDeviceGroups( static_cast( m_instance ), &physicalDeviceGroupCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && physicalDeviceGroupCount ) { physicalDeviceGroupProperties.resize( physicalDeviceGroupCount ); result = static_cast( getDispatcher()->vkEnumeratePhysicalDeviceGroups( static_cast( m_instance ), &physicalDeviceGroupCount, reinterpret_cast( physicalDeviceGroupProperties.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::enumeratePhysicalDeviceGroups" ); VULKAN_HPP_ASSERT( physicalDeviceGroupCount <= physicalDeviceGroupProperties.size() ); if ( physicalDeviceGroupCount < physicalDeviceGroupProperties.size() ) { physicalDeviceGroupProperties.resize( physicalDeviceGroupCount ); } return physicalDeviceGroupProperties; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MemoryRequirements2 Device::getImageMemoryRequirements2( const VULKAN_HPP_NAMESPACE::ImageMemoryRequirementsInfo2 & info ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetImageMemoryRequirements2 && "Function requires or " ); VULKAN_HPP_NAMESPACE::MemoryRequirements2 memoryRequirements; getDispatcher()->vkGetImageMemoryRequirements2( static_cast( m_device ), reinterpret_cast( &info ), reinterpret_cast( &memoryRequirements ) ); return memoryRequirements; } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::StructureChain Device::getImageMemoryRequirements2( const VULKAN_HPP_NAMESPACE::ImageMemoryRequirementsInfo2 & info ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetImageMemoryRequirements2 && "Function requires or " ); VULKAN_HPP_NAMESPACE::StructureChain structureChain; VULKAN_HPP_NAMESPACE::MemoryRequirements2 & memoryRequirements = structureChain.template get(); getDispatcher()->vkGetImageMemoryRequirements2( static_cast( m_device ), reinterpret_cast( &info ), reinterpret_cast( &memoryRequirements ) ); return structureChain; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MemoryRequirements2 Device::getBufferMemoryRequirements2( const VULKAN_HPP_NAMESPACE::BufferMemoryRequirementsInfo2 & info ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetBufferMemoryRequirements2 && "Function requires or " ); VULKAN_HPP_NAMESPACE::MemoryRequirements2 memoryRequirements; getDispatcher()->vkGetBufferMemoryRequirements2( static_cast( m_device ), reinterpret_cast( &info ), reinterpret_cast( &memoryRequirements ) ); return memoryRequirements; } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::StructureChain Device::getBufferMemoryRequirements2( const VULKAN_HPP_NAMESPACE::BufferMemoryRequirementsInfo2 & info ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetBufferMemoryRequirements2 && "Function requires or " ); VULKAN_HPP_NAMESPACE::StructureChain structureChain; VULKAN_HPP_NAMESPACE::MemoryRequirements2 & memoryRequirements = structureChain.template get(); getDispatcher()->vkGetBufferMemoryRequirements2( static_cast( m_device ), reinterpret_cast( &info ), reinterpret_cast( &memoryRequirements ) ); return structureChain; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector Device::getImageSparseMemoryRequirements2( const VULKAN_HPP_NAMESPACE::ImageSparseMemoryRequirementsInfo2 & info ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetImageSparseMemoryRequirements2 && "Function requires or " ); std::vector sparseMemoryRequirements; uint32_t sparseMemoryRequirementCount; getDispatcher()->vkGetImageSparseMemoryRequirements2( static_cast( m_device ), reinterpret_cast( &info ), &sparseMemoryRequirementCount, nullptr ); sparseMemoryRequirements.resize( sparseMemoryRequirementCount ); getDispatcher()->vkGetImageSparseMemoryRequirements2( static_cast( m_device ), reinterpret_cast( &info ), &sparseMemoryRequirementCount, reinterpret_cast( sparseMemoryRequirements.data() ) ); VULKAN_HPP_ASSERT( sparseMemoryRequirementCount <= sparseMemoryRequirements.size() ); if ( sparseMemoryRequirementCount < sparseMemoryRequirements.size() ) { sparseMemoryRequirements.resize( sparseMemoryRequirementCount ); } return sparseMemoryRequirements; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures2 PhysicalDevice::getFeatures2() const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceFeatures2 && "Function requires or " ); VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures2 features; getDispatcher()->vkGetPhysicalDeviceFeatures2( static_cast( m_physicalDevice ), reinterpret_cast( &features ) ); return features; } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::StructureChain PhysicalDevice::getFeatures2() const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceFeatures2 && "Function requires or " ); VULKAN_HPP_NAMESPACE::StructureChain structureChain; VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures2 & features = structureChain.template get(); getDispatcher()->vkGetPhysicalDeviceFeatures2( static_cast( m_physicalDevice ), reinterpret_cast( &features ) ); return structureChain; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties2 PhysicalDevice::getProperties2() const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceProperties2 && "Function requires or " ); VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties2 properties; getDispatcher()->vkGetPhysicalDeviceProperties2( static_cast( m_physicalDevice ), reinterpret_cast( &properties ) ); return properties; } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::StructureChain PhysicalDevice::getProperties2() const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceProperties2 && "Function requires or " ); VULKAN_HPP_NAMESPACE::StructureChain structureChain; VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties2 & properties = structureChain.template get(); getDispatcher()->vkGetPhysicalDeviceProperties2( static_cast( m_physicalDevice ), reinterpret_cast( &properties ) ); return structureChain; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::FormatProperties2 PhysicalDevice::getFormatProperties2( VULKAN_HPP_NAMESPACE::Format format ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceFormatProperties2 && "Function requires or " ); VULKAN_HPP_NAMESPACE::FormatProperties2 formatProperties; getDispatcher()->vkGetPhysicalDeviceFormatProperties2( static_cast( m_physicalDevice ), static_cast( format ), reinterpret_cast( &formatProperties ) ); return formatProperties; } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::StructureChain PhysicalDevice::getFormatProperties2( VULKAN_HPP_NAMESPACE::Format format ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceFormatProperties2 && "Function requires or " ); VULKAN_HPP_NAMESPACE::StructureChain structureChain; VULKAN_HPP_NAMESPACE::FormatProperties2 & formatProperties = structureChain.template get(); getDispatcher()->vkGetPhysicalDeviceFormatProperties2( static_cast( m_physicalDevice ), static_cast( format ), reinterpret_cast( &formatProperties ) ); return structureChain; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::ImageFormatProperties2 PhysicalDevice::getImageFormatProperties2( const VULKAN_HPP_NAMESPACE::PhysicalDeviceImageFormatInfo2 & imageFormatInfo ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceImageFormatProperties2 && "Function requires or " ); VULKAN_HPP_NAMESPACE::ImageFormatProperties2 imageFormatProperties; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetPhysicalDeviceImageFormatProperties2( static_cast( m_physicalDevice ), reinterpret_cast( &imageFormatInfo ), reinterpret_cast( &imageFormatProperties ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getImageFormatProperties2" ); return imageFormatProperties; } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::StructureChain PhysicalDevice::getImageFormatProperties2( const VULKAN_HPP_NAMESPACE::PhysicalDeviceImageFormatInfo2 & imageFormatInfo ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceImageFormatProperties2 && "Function requires or " ); StructureChain structureChain; VULKAN_HPP_NAMESPACE::ImageFormatProperties2 & imageFormatProperties = structureChain.template get(); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetPhysicalDeviceImageFormatProperties2( static_cast( m_physicalDevice ), reinterpret_cast( &imageFormatInfo ), reinterpret_cast( &imageFormatProperties ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getImageFormatProperties2" ); return structureChain; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector PhysicalDevice::getQueueFamilyProperties2() const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceQueueFamilyProperties2 && "Function requires or " ); std::vector queueFamilyProperties; uint32_t queueFamilyPropertyCount; getDispatcher()->vkGetPhysicalDeviceQueueFamilyProperties2( static_cast( m_physicalDevice ), &queueFamilyPropertyCount, nullptr ); queueFamilyProperties.resize( queueFamilyPropertyCount ); getDispatcher()->vkGetPhysicalDeviceQueueFamilyProperties2( static_cast( m_physicalDevice ), &queueFamilyPropertyCount, reinterpret_cast( queueFamilyProperties.data() ) ); VULKAN_HPP_ASSERT( queueFamilyPropertyCount <= queueFamilyProperties.size() ); if ( queueFamilyPropertyCount < queueFamilyProperties.size() ) { queueFamilyProperties.resize( queueFamilyPropertyCount ); } return queueFamilyProperties; } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector PhysicalDevice::getQueueFamilyProperties2() const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceQueueFamilyProperties2 && "Function requires or " ); std::vector structureChains; std::vector queueFamilyProperties; uint32_t queueFamilyPropertyCount; getDispatcher()->vkGetPhysicalDeviceQueueFamilyProperties2( static_cast( m_physicalDevice ), &queueFamilyPropertyCount, nullptr ); structureChains.resize( queueFamilyPropertyCount ); queueFamilyProperties.resize( queueFamilyPropertyCount ); for ( uint32_t i = 0; i < queueFamilyPropertyCount; i++ ) { queueFamilyProperties[i].pNext = structureChains[i].template get().pNext; } getDispatcher()->vkGetPhysicalDeviceQueueFamilyProperties2( static_cast( m_physicalDevice ), &queueFamilyPropertyCount, reinterpret_cast( queueFamilyProperties.data() ) ); VULKAN_HPP_ASSERT( queueFamilyPropertyCount <= queueFamilyProperties.size() ); if ( queueFamilyPropertyCount < queueFamilyProperties.size() ) { structureChains.resize( queueFamilyPropertyCount ); } for ( uint32_t i = 0; i < queueFamilyPropertyCount; i++ ) { structureChains[i].template get() = queueFamilyProperties[i]; } return structureChains; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties2 PhysicalDevice::getMemoryProperties2() const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceMemoryProperties2 && "Function requires or " ); VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties2 memoryProperties; getDispatcher()->vkGetPhysicalDeviceMemoryProperties2( static_cast( m_physicalDevice ), reinterpret_cast( &memoryProperties ) ); return memoryProperties; } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::StructureChain PhysicalDevice::getMemoryProperties2() const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceMemoryProperties2 && "Function requires or " ); VULKAN_HPP_NAMESPACE::StructureChain structureChain; VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties2 & memoryProperties = structureChain.template get(); getDispatcher()->vkGetPhysicalDeviceMemoryProperties2( static_cast( m_physicalDevice ), reinterpret_cast( &memoryProperties ) ); return structureChain; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector PhysicalDevice::getSparseImageFormatProperties2( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSparseImageFormatInfo2 & formatInfo ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceSparseImageFormatProperties2 && "Function requires or " ); std::vector properties; uint32_t propertyCount; getDispatcher()->vkGetPhysicalDeviceSparseImageFormatProperties2( static_cast( m_physicalDevice ), reinterpret_cast( &formatInfo ), &propertyCount, nullptr ); properties.resize( propertyCount ); getDispatcher()->vkGetPhysicalDeviceSparseImageFormatProperties2( static_cast( m_physicalDevice ), reinterpret_cast( &formatInfo ), &propertyCount, reinterpret_cast( properties.data() ) ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } return properties; } VULKAN_HPP_INLINE void CommandPool::trim( VULKAN_HPP_NAMESPACE::CommandPoolTrimFlags flags ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkTrimCommandPool && "Function requires or " ); getDispatcher()->vkTrimCommandPool( static_cast( m_device ), static_cast( m_commandPool ), static_cast( flags ) ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type Device::getQueue2( VULKAN_HPP_NAMESPACE::DeviceQueueInfo2 const & queueInfo ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { VULKAN_HPP_NAMESPACE::Queue queue; getDispatcher()->vkGetDeviceQueue2( static_cast( m_device ), reinterpret_cast( &queueInfo ), reinterpret_cast( &queue ) ); return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Queue( *this, *reinterpret_cast( &queue ) ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type Device::createSamplerYcbcrConversion( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversionCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion ycbcrConversion; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateSamplerYcbcrConversion( static_cast( m_device ), reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &ycbcrConversion ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { # if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) return VULKAN_HPP_UNEXPECTED( result ); # else VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createSamplerYcbcrConversion" ); # endif } return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::SamplerYcbcrConversion( *this, *reinterpret_cast( &ycbcrConversion ), allocator ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type Device::createDescriptorUpdateTemplate( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateDescriptorUpdateTemplate( static_cast( m_device ), reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &descriptorUpdateTemplate ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { # if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) return VULKAN_HPP_UNEXPECTED( result ); # else VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createDescriptorUpdateTemplate" ); # endif } return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DescriptorUpdateTemplate( *this, *reinterpret_cast( &descriptorUpdateTemplate ), allocator ); } template VULKAN_HPP_INLINE void DescriptorSet::updateWithTemplate( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate, DataType const & data ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkUpdateDescriptorSetWithTemplate && "Function requires or " ); getDispatcher()->vkUpdateDescriptorSetWithTemplate( static_cast( m_device ), static_cast( m_descriptorSet ), static_cast( descriptorUpdateTemplate ), reinterpret_cast( &data ) ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::ExternalBufferProperties PhysicalDevice::getExternalBufferProperties( const VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalBufferInfo & externalBufferInfo ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceExternalBufferProperties && "Function requires or " ); VULKAN_HPP_NAMESPACE::ExternalBufferProperties externalBufferProperties; getDispatcher()->vkGetPhysicalDeviceExternalBufferProperties( static_cast( m_physicalDevice ), reinterpret_cast( &externalBufferInfo ), reinterpret_cast( &externalBufferProperties ) ); return externalBufferProperties; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::ExternalFenceProperties PhysicalDevice::getExternalFenceProperties( const VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalFenceInfo & externalFenceInfo ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceExternalFenceProperties && "Function requires or " ); VULKAN_HPP_NAMESPACE::ExternalFenceProperties externalFenceProperties; getDispatcher()->vkGetPhysicalDeviceExternalFenceProperties( static_cast( m_physicalDevice ), reinterpret_cast( &externalFenceInfo ), reinterpret_cast( &externalFenceProperties ) ); return externalFenceProperties; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::ExternalSemaphoreProperties PhysicalDevice::getExternalSemaphoreProperties( const VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalSemaphoreInfo & externalSemaphoreInfo ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceExternalSemaphoreProperties && "Function requires or " ); VULKAN_HPP_NAMESPACE::ExternalSemaphoreProperties externalSemaphoreProperties; getDispatcher()->vkGetPhysicalDeviceExternalSemaphoreProperties( static_cast( m_physicalDevice ), reinterpret_cast( &externalSemaphoreInfo ), reinterpret_cast( &externalSemaphoreProperties ) ); return externalSemaphoreProperties; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::DescriptorSetLayoutSupport Device::getDescriptorSetLayoutSupport( const VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateInfo & createInfo ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetDescriptorSetLayoutSupport && "Function requires or " ); VULKAN_HPP_NAMESPACE::DescriptorSetLayoutSupport support; getDispatcher()->vkGetDescriptorSetLayoutSupport( static_cast( m_device ), reinterpret_cast( &createInfo ), reinterpret_cast( &support ) ); return support; } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::StructureChain Device::getDescriptorSetLayoutSupport( const VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateInfo & createInfo ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetDescriptorSetLayoutSupport && "Function requires or " ); VULKAN_HPP_NAMESPACE::StructureChain structureChain; VULKAN_HPP_NAMESPACE::DescriptorSetLayoutSupport & support = structureChain.template get(); getDispatcher()->vkGetDescriptorSetLayoutSupport( static_cast( m_device ), reinterpret_cast( &createInfo ), reinterpret_cast( &support ) ); return structureChain; } //=== VK_VERSION_1_2 === VULKAN_HPP_INLINE void CommandBuffer::drawIndirectCount( VULKAN_HPP_NAMESPACE::Buffer buffer, VULKAN_HPP_NAMESPACE::DeviceSize offset, VULKAN_HPP_NAMESPACE::Buffer countBuffer, VULKAN_HPP_NAMESPACE::DeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdDrawIndirectCount && "Function requires or or " ); getDispatcher()->vkCmdDrawIndirectCount( static_cast( m_commandBuffer ), static_cast( buffer ), static_cast( offset ), static_cast( countBuffer ), static_cast( countBufferOffset ), maxDrawCount, stride ); } VULKAN_HPP_INLINE void CommandBuffer::drawIndexedIndirectCount( VULKAN_HPP_NAMESPACE::Buffer buffer, VULKAN_HPP_NAMESPACE::DeviceSize offset, VULKAN_HPP_NAMESPACE::Buffer countBuffer, VULKAN_HPP_NAMESPACE::DeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdDrawIndexedIndirectCount && "Function requires or or " ); getDispatcher()->vkCmdDrawIndexedIndirectCount( static_cast( m_commandBuffer ), static_cast( buffer ), static_cast( offset ), static_cast( countBuffer ), static_cast( countBufferOffset ), maxDrawCount, stride ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type Device::createRenderPass2( VULKAN_HPP_NAMESPACE::RenderPassCreateInfo2 const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { VULKAN_HPP_NAMESPACE::RenderPass renderPass; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateRenderPass2( static_cast( m_device ), reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &renderPass ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { # if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) return VULKAN_HPP_UNEXPECTED( result ); # else VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createRenderPass2" ); # endif } return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::RenderPass( *this, *reinterpret_cast( &renderPass ), allocator ); } VULKAN_HPP_INLINE void CommandBuffer::beginRenderPass2( const VULKAN_HPP_NAMESPACE::RenderPassBeginInfo & renderPassBegin, const VULKAN_HPP_NAMESPACE::SubpassBeginInfo & subpassBeginInfo ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdBeginRenderPass2 && "Function requires or " ); getDispatcher()->vkCmdBeginRenderPass2( static_cast( m_commandBuffer ), reinterpret_cast( &renderPassBegin ), reinterpret_cast( &subpassBeginInfo ) ); } VULKAN_HPP_INLINE void CommandBuffer::nextSubpass2( const VULKAN_HPP_NAMESPACE::SubpassBeginInfo & subpassBeginInfo, const VULKAN_HPP_NAMESPACE::SubpassEndInfo & subpassEndInfo ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdNextSubpass2 && "Function requires or " ); getDispatcher()->vkCmdNextSubpass2( static_cast( m_commandBuffer ), reinterpret_cast( &subpassBeginInfo ), reinterpret_cast( &subpassEndInfo ) ); } VULKAN_HPP_INLINE void CommandBuffer::endRenderPass2( const VULKAN_HPP_NAMESPACE::SubpassEndInfo & subpassEndInfo ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdEndRenderPass2 && "Function requires or " ); getDispatcher()->vkCmdEndRenderPass2( static_cast( m_commandBuffer ), reinterpret_cast( &subpassEndInfo ) ); } VULKAN_HPP_INLINE void QueryPool::reset( uint32_t firstQuery, uint32_t queryCount ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkResetQueryPool && "Function requires or " ); getDispatcher()->vkResetQueryPool( static_cast( m_device ), static_cast( m_queryPool ), firstQuery, queryCount ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE uint64_t Semaphore::getCounterValue() const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetSemaphoreCounterValue && "Function requires or " ); uint64_t value; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetSemaphoreCounterValue( static_cast( m_device ), static_cast( m_semaphore ), &value ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Semaphore::getCounterValue" ); return value; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Device::waitSemaphores( const VULKAN_HPP_NAMESPACE::SemaphoreWaitInfo & waitInfo, uint64_t timeout ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkWaitSemaphores && "Function requires or " ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkWaitSemaphores( static_cast( m_device ), reinterpret_cast( &waitInfo ), timeout ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::waitSemaphores", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eTimeout } ); return static_cast( result ); } VULKAN_HPP_INLINE void Device::signalSemaphore( const VULKAN_HPP_NAMESPACE::SemaphoreSignalInfo & signalInfo ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkSignalSemaphore && "Function requires or " ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkSignalSemaphore( static_cast( m_device ), reinterpret_cast( &signalInfo ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::signalSemaphore" ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::DeviceAddress Device::getBufferAddress( const VULKAN_HPP_NAMESPACE::BufferDeviceAddressInfo & info ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetBufferDeviceAddress && "Function requires or or " ); VkDeviceAddress result = getDispatcher()->vkGetBufferDeviceAddress( static_cast( m_device ), reinterpret_cast( &info ) ); return static_cast( result ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE uint64_t Device::getBufferOpaqueCaptureAddress( const VULKAN_HPP_NAMESPACE::BufferDeviceAddressInfo & info ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetBufferOpaqueCaptureAddress && "Function requires or " ); uint64_t result = getDispatcher()->vkGetBufferOpaqueCaptureAddress( static_cast( m_device ), reinterpret_cast( &info ) ); return result; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE uint64_t Device::getMemoryOpaqueCaptureAddress( const VULKAN_HPP_NAMESPACE::DeviceMemoryOpaqueCaptureAddressInfo & info ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetDeviceMemoryOpaqueCaptureAddress && "Function requires or " ); uint64_t result = getDispatcher()->vkGetDeviceMemoryOpaqueCaptureAddress( static_cast( m_device ), reinterpret_cast( &info ) ); return result; } //=== VK_VERSION_1_3 === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector PhysicalDevice::getToolProperties() const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceToolProperties && "Function requires or " ); std::vector toolProperties; uint32_t toolCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( getDispatcher()->vkGetPhysicalDeviceToolProperties( static_cast( m_physicalDevice ), &toolCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && toolCount ) { toolProperties.resize( toolCount ); result = static_cast( getDispatcher()->vkGetPhysicalDeviceToolProperties( static_cast( m_physicalDevice ), &toolCount, reinterpret_cast( toolProperties.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getToolProperties" ); VULKAN_HPP_ASSERT( toolCount <= toolProperties.size() ); if ( toolCount < toolProperties.size() ) { toolProperties.resize( toolCount ); } return toolProperties; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type Device::createPrivateDataSlot( VULKAN_HPP_NAMESPACE::PrivateDataSlotCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreatePrivateDataSlot( static_cast( m_device ), reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &privateDataSlot ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { # if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) return VULKAN_HPP_UNEXPECTED( result ); # else VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createPrivateDataSlot" ); # endif } return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::PrivateDataSlot( *this, *reinterpret_cast( &privateDataSlot ), allocator ); } VULKAN_HPP_INLINE void Device::setPrivateData( VULKAN_HPP_NAMESPACE::ObjectType objectType_, uint64_t objectHandle, VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot, uint64_t data ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkSetPrivateData && "Function requires or " ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkSetPrivateData( static_cast( m_device ), static_cast( objectType_ ), objectHandle, static_cast( privateDataSlot ), data ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::setPrivateData" ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE uint64_t Device::getPrivateData( VULKAN_HPP_NAMESPACE::ObjectType objectType_, uint64_t objectHandle, VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPrivateData && "Function requires or " ); uint64_t data; getDispatcher()->vkGetPrivateData( static_cast( m_device ), static_cast( objectType_ ), objectHandle, static_cast( privateDataSlot ), &data ); return data; } VULKAN_HPP_INLINE void CommandBuffer::setEvent2( VULKAN_HPP_NAMESPACE::Event event, const VULKAN_HPP_NAMESPACE::DependencyInfo & dependencyInfo ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetEvent2 && "Function requires or " ); getDispatcher()->vkCmdSetEvent2( static_cast( m_commandBuffer ), static_cast( event ), reinterpret_cast( &dependencyInfo ) ); } VULKAN_HPP_INLINE void CommandBuffer::resetEvent2( VULKAN_HPP_NAMESPACE::Event event, VULKAN_HPP_NAMESPACE::PipelineStageFlags2 stageMask ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdResetEvent2 && "Function requires or " ); getDispatcher()->vkCmdResetEvent2( static_cast( m_commandBuffer ), static_cast( event ), static_cast( stageMask ) ); } VULKAN_HPP_INLINE void CommandBuffer::waitEvents2( VULKAN_HPP_NAMESPACE::ArrayProxy const & events, VULKAN_HPP_NAMESPACE::ArrayProxy const & dependencyInfos ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdWaitEvents2 && "Function requires or " ); # ifdef VULKAN_HPP_NO_EXCEPTIONS VULKAN_HPP_ASSERT( events.size() == dependencyInfos.size() ); # else if ( events.size() != dependencyInfos.size() ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::waitEvents2: events.size() != dependencyInfos.size()" ); } # endif /*VULKAN_HPP_NO_EXCEPTIONS*/ getDispatcher()->vkCmdWaitEvents2( static_cast( m_commandBuffer ), events.size(), reinterpret_cast( events.data() ), reinterpret_cast( dependencyInfos.data() ) ); } VULKAN_HPP_INLINE void CommandBuffer::pipelineBarrier2( const VULKAN_HPP_NAMESPACE::DependencyInfo & dependencyInfo ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdPipelineBarrier2 && "Function requires or " ); getDispatcher()->vkCmdPipelineBarrier2( static_cast( m_commandBuffer ), reinterpret_cast( &dependencyInfo ) ); } VULKAN_HPP_INLINE void CommandBuffer::writeTimestamp2( VULKAN_HPP_NAMESPACE::PipelineStageFlags2 stage, VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t query ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdWriteTimestamp2 && "Function requires or " ); getDispatcher()->vkCmdWriteTimestamp2( static_cast( m_commandBuffer ), static_cast( stage ), static_cast( queryPool ), query ); } VULKAN_HPP_INLINE void Queue::submit2( VULKAN_HPP_NAMESPACE::ArrayProxy const & submits, VULKAN_HPP_NAMESPACE::Fence fence ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkQueueSubmit2 && "Function requires or " ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkQueueSubmit2( static_cast( m_queue ), submits.size(), reinterpret_cast( submits.data() ), static_cast( fence ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Queue::submit2" ); } VULKAN_HPP_INLINE void CommandBuffer::copyBuffer2( const VULKAN_HPP_NAMESPACE::CopyBufferInfo2 & copyBufferInfo ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdCopyBuffer2 && "Function requires or " ); getDispatcher()->vkCmdCopyBuffer2( static_cast( m_commandBuffer ), reinterpret_cast( ©BufferInfo ) ); } VULKAN_HPP_INLINE void CommandBuffer::copyImage2( const VULKAN_HPP_NAMESPACE::CopyImageInfo2 & copyImageInfo ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdCopyImage2 && "Function requires or " ); getDispatcher()->vkCmdCopyImage2( static_cast( m_commandBuffer ), reinterpret_cast( ©ImageInfo ) ); } VULKAN_HPP_INLINE void CommandBuffer::copyBufferToImage2( const VULKAN_HPP_NAMESPACE::CopyBufferToImageInfo2 & copyBufferToImageInfo ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdCopyBufferToImage2 && "Function requires or " ); getDispatcher()->vkCmdCopyBufferToImage2( static_cast( m_commandBuffer ), reinterpret_cast( ©BufferToImageInfo ) ); } VULKAN_HPP_INLINE void CommandBuffer::copyImageToBuffer2( const VULKAN_HPP_NAMESPACE::CopyImageToBufferInfo2 & copyImageToBufferInfo ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdCopyImageToBuffer2 && "Function requires or " ); getDispatcher()->vkCmdCopyImageToBuffer2( static_cast( m_commandBuffer ), reinterpret_cast( ©ImageToBufferInfo ) ); } VULKAN_HPP_INLINE void CommandBuffer::blitImage2( const VULKAN_HPP_NAMESPACE::BlitImageInfo2 & blitImageInfo ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdBlitImage2 && "Function requires or " ); getDispatcher()->vkCmdBlitImage2( static_cast( m_commandBuffer ), reinterpret_cast( &blitImageInfo ) ); } VULKAN_HPP_INLINE void CommandBuffer::resolveImage2( const VULKAN_HPP_NAMESPACE::ResolveImageInfo2 & resolveImageInfo ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdResolveImage2 && "Function requires or " ); getDispatcher()->vkCmdResolveImage2( static_cast( m_commandBuffer ), reinterpret_cast( &resolveImageInfo ) ); } VULKAN_HPP_INLINE void CommandBuffer::beginRendering( const VULKAN_HPP_NAMESPACE::RenderingInfo & renderingInfo ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdBeginRendering && "Function requires or " ); getDispatcher()->vkCmdBeginRendering( static_cast( m_commandBuffer ), reinterpret_cast( &renderingInfo ) ); } VULKAN_HPP_INLINE void CommandBuffer::endRendering() const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdEndRendering && "Function requires or " ); getDispatcher()->vkCmdEndRendering( static_cast( m_commandBuffer ) ); } VULKAN_HPP_INLINE void CommandBuffer::setCullMode( VULKAN_HPP_NAMESPACE::CullModeFlags cullMode ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetCullMode && "Function requires or or " ); getDispatcher()->vkCmdSetCullMode( static_cast( m_commandBuffer ), static_cast( cullMode ) ); } VULKAN_HPP_INLINE void CommandBuffer::setFrontFace( VULKAN_HPP_NAMESPACE::FrontFace frontFace ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetFrontFace && "Function requires or or " ); getDispatcher()->vkCmdSetFrontFace( static_cast( m_commandBuffer ), static_cast( frontFace ) ); } VULKAN_HPP_INLINE void CommandBuffer::setPrimitiveTopology( VULKAN_HPP_NAMESPACE::PrimitiveTopology primitiveTopology ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetPrimitiveTopology && "Function requires or or " ); getDispatcher()->vkCmdSetPrimitiveTopology( static_cast( m_commandBuffer ), static_cast( primitiveTopology ) ); } VULKAN_HPP_INLINE void CommandBuffer::setViewportWithCount( VULKAN_HPP_NAMESPACE::ArrayProxy const & viewports ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetViewportWithCount && "Function requires or or " ); getDispatcher()->vkCmdSetViewportWithCount( static_cast( m_commandBuffer ), viewports.size(), reinterpret_cast( viewports.data() ) ); } VULKAN_HPP_INLINE void CommandBuffer::setScissorWithCount( VULKAN_HPP_NAMESPACE::ArrayProxy const & scissors ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetScissorWithCount && "Function requires or or " ); getDispatcher()->vkCmdSetScissorWithCount( static_cast( m_commandBuffer ), scissors.size(), reinterpret_cast( scissors.data() ) ); } VULKAN_HPP_INLINE void CommandBuffer::bindVertexBuffers2( uint32_t firstBinding, VULKAN_HPP_NAMESPACE::ArrayProxy const & buffers, VULKAN_HPP_NAMESPACE::ArrayProxy const & offsets, VULKAN_HPP_NAMESPACE::ArrayProxy const & sizes, VULKAN_HPP_NAMESPACE::ArrayProxy const & strides ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdBindVertexBuffers2 && "Function requires or or " ); # ifdef VULKAN_HPP_NO_EXCEPTIONS VULKAN_HPP_ASSERT( buffers.size() == offsets.size() ); VULKAN_HPP_ASSERT( sizes.empty() || buffers.size() == sizes.size() ); VULKAN_HPP_ASSERT( strides.empty() || buffers.size() == strides.size() ); # else if ( buffers.size() != offsets.size() ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::bindVertexBuffers2: buffers.size() != offsets.size()" ); } if ( !sizes.empty() && buffers.size() != sizes.size() ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::bindVertexBuffers2: buffers.size() != sizes.size()" ); } if ( !strides.empty() && buffers.size() != strides.size() ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::bindVertexBuffers2: buffers.size() != strides.size()" ); } # endif /*VULKAN_HPP_NO_EXCEPTIONS*/ getDispatcher()->vkCmdBindVertexBuffers2( static_cast( m_commandBuffer ), firstBinding, buffers.size(), reinterpret_cast( buffers.data() ), reinterpret_cast( offsets.data() ), reinterpret_cast( sizes.data() ), reinterpret_cast( strides.data() ) ); } VULKAN_HPP_INLINE void CommandBuffer::setDepthTestEnable( VULKAN_HPP_NAMESPACE::Bool32 depthTestEnable ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetDepthTestEnable && "Function requires or or " ); getDispatcher()->vkCmdSetDepthTestEnable( static_cast( m_commandBuffer ), static_cast( depthTestEnable ) ); } VULKAN_HPP_INLINE void CommandBuffer::setDepthWriteEnable( VULKAN_HPP_NAMESPACE::Bool32 depthWriteEnable ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetDepthWriteEnable && "Function requires or or " ); getDispatcher()->vkCmdSetDepthWriteEnable( static_cast( m_commandBuffer ), static_cast( depthWriteEnable ) ); } VULKAN_HPP_INLINE void CommandBuffer::setDepthCompareOp( VULKAN_HPP_NAMESPACE::CompareOp depthCompareOp ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetDepthCompareOp && "Function requires or or " ); getDispatcher()->vkCmdSetDepthCompareOp( static_cast( m_commandBuffer ), static_cast( depthCompareOp ) ); } VULKAN_HPP_INLINE void CommandBuffer::setDepthBoundsTestEnable( VULKAN_HPP_NAMESPACE::Bool32 depthBoundsTestEnable ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetDepthBoundsTestEnable && "Function requires or or " ); getDispatcher()->vkCmdSetDepthBoundsTestEnable( static_cast( m_commandBuffer ), static_cast( depthBoundsTestEnable ) ); } VULKAN_HPP_INLINE void CommandBuffer::setStencilTestEnable( VULKAN_HPP_NAMESPACE::Bool32 stencilTestEnable ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetStencilTestEnable && "Function requires or or " ); getDispatcher()->vkCmdSetStencilTestEnable( static_cast( m_commandBuffer ), static_cast( stencilTestEnable ) ); } VULKAN_HPP_INLINE void CommandBuffer::setStencilOp( VULKAN_HPP_NAMESPACE::StencilFaceFlags faceMask, VULKAN_HPP_NAMESPACE::StencilOp failOp, VULKAN_HPP_NAMESPACE::StencilOp passOp, VULKAN_HPP_NAMESPACE::StencilOp depthFailOp, VULKAN_HPP_NAMESPACE::CompareOp compareOp ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetStencilOp && "Function requires or or " ); getDispatcher()->vkCmdSetStencilOp( static_cast( m_commandBuffer ), static_cast( faceMask ), static_cast( failOp ), static_cast( passOp ), static_cast( depthFailOp ), static_cast( compareOp ) ); } VULKAN_HPP_INLINE void CommandBuffer::setRasterizerDiscardEnable( VULKAN_HPP_NAMESPACE::Bool32 rasterizerDiscardEnable ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetRasterizerDiscardEnable && "Function requires or or " ); getDispatcher()->vkCmdSetRasterizerDiscardEnable( static_cast( m_commandBuffer ), static_cast( rasterizerDiscardEnable ) ); } VULKAN_HPP_INLINE void CommandBuffer::setDepthBiasEnable( VULKAN_HPP_NAMESPACE::Bool32 depthBiasEnable ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetDepthBiasEnable && "Function requires or or " ); getDispatcher()->vkCmdSetDepthBiasEnable( static_cast( m_commandBuffer ), static_cast( depthBiasEnable ) ); } VULKAN_HPP_INLINE void CommandBuffer::setPrimitiveRestartEnable( VULKAN_HPP_NAMESPACE::Bool32 primitiveRestartEnable ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetPrimitiveRestartEnable && "Function requires or or " ); getDispatcher()->vkCmdSetPrimitiveRestartEnable( static_cast( m_commandBuffer ), static_cast( primitiveRestartEnable ) ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MemoryRequirements2 Device::getBufferMemoryRequirements( const VULKAN_HPP_NAMESPACE::DeviceBufferMemoryRequirements & info ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetDeviceBufferMemoryRequirements && "Function requires or " ); VULKAN_HPP_NAMESPACE::MemoryRequirements2 memoryRequirements; getDispatcher()->vkGetDeviceBufferMemoryRequirements( static_cast( m_device ), reinterpret_cast( &info ), reinterpret_cast( &memoryRequirements ) ); return memoryRequirements; } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::StructureChain Device::getBufferMemoryRequirements( const VULKAN_HPP_NAMESPACE::DeviceBufferMemoryRequirements & info ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetDeviceBufferMemoryRequirements && "Function requires or " ); VULKAN_HPP_NAMESPACE::StructureChain structureChain; VULKAN_HPP_NAMESPACE::MemoryRequirements2 & memoryRequirements = structureChain.template get(); getDispatcher()->vkGetDeviceBufferMemoryRequirements( static_cast( m_device ), reinterpret_cast( &info ), reinterpret_cast( &memoryRequirements ) ); return structureChain; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MemoryRequirements2 Device::getImageMemoryRequirements( const VULKAN_HPP_NAMESPACE::DeviceImageMemoryRequirements & info ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetDeviceImageMemoryRequirements && "Function requires or " ); VULKAN_HPP_NAMESPACE::MemoryRequirements2 memoryRequirements; getDispatcher()->vkGetDeviceImageMemoryRequirements( static_cast( m_device ), reinterpret_cast( &info ), reinterpret_cast( &memoryRequirements ) ); return memoryRequirements; } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::StructureChain Device::getImageMemoryRequirements( const VULKAN_HPP_NAMESPACE::DeviceImageMemoryRequirements & info ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetDeviceImageMemoryRequirements && "Function requires or " ); VULKAN_HPP_NAMESPACE::StructureChain structureChain; VULKAN_HPP_NAMESPACE::MemoryRequirements2 & memoryRequirements = structureChain.template get(); getDispatcher()->vkGetDeviceImageMemoryRequirements( static_cast( m_device ), reinterpret_cast( &info ), reinterpret_cast( &memoryRequirements ) ); return structureChain; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector Device::getImageSparseMemoryRequirements( const VULKAN_HPP_NAMESPACE::DeviceImageMemoryRequirements & info ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetDeviceImageSparseMemoryRequirements && "Function requires or " ); std::vector sparseMemoryRequirements; uint32_t sparseMemoryRequirementCount; getDispatcher()->vkGetDeviceImageSparseMemoryRequirements( static_cast( m_device ), reinterpret_cast( &info ), &sparseMemoryRequirementCount, nullptr ); sparseMemoryRequirements.resize( sparseMemoryRequirementCount ); getDispatcher()->vkGetDeviceImageSparseMemoryRequirements( static_cast( m_device ), reinterpret_cast( &info ), &sparseMemoryRequirementCount, reinterpret_cast( sparseMemoryRequirements.data() ) ); VULKAN_HPP_ASSERT( sparseMemoryRequirementCount <= sparseMemoryRequirements.size() ); if ( sparseMemoryRequirementCount < sparseMemoryRequirements.size() ) { sparseMemoryRequirements.resize( sparseMemoryRequirementCount ); } return sparseMemoryRequirements; } //=== VK_VERSION_1_4 === VULKAN_HPP_INLINE void CommandBuffer::setLineStipple( uint32_t lineStippleFactor, uint16_t lineStipplePattern ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetLineStipple && "Function requires or or " ); getDispatcher()->vkCmdSetLineStipple( static_cast( m_commandBuffer ), lineStippleFactor, lineStipplePattern ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE void * Device::mapMemory2( const VULKAN_HPP_NAMESPACE::MemoryMapInfo & memoryMapInfo ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkMapMemory2 && "Function requires or " ); void * pData; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkMapMemory2( static_cast( m_device ), reinterpret_cast( &memoryMapInfo ), &pData ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::mapMemory2" ); return pData; } VULKAN_HPP_INLINE void Device::unmapMemory2( const VULKAN_HPP_NAMESPACE::MemoryUnmapInfo & memoryUnmapInfo ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkUnmapMemory2 && "Function requires or " ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkUnmapMemory2( static_cast( m_device ), reinterpret_cast( &memoryUnmapInfo ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::unmapMemory2" ); } VULKAN_HPP_INLINE void CommandBuffer::bindIndexBuffer2( VULKAN_HPP_NAMESPACE::Buffer buffer, VULKAN_HPP_NAMESPACE::DeviceSize offset, VULKAN_HPP_NAMESPACE::DeviceSize size, VULKAN_HPP_NAMESPACE::IndexType indexType ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdBindIndexBuffer2 && "Function requires or " ); getDispatcher()->vkCmdBindIndexBuffer2( static_cast( m_commandBuffer ), static_cast( buffer ), static_cast( offset ), static_cast( size ), static_cast( indexType ) ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Extent2D Device::getRenderingAreaGranularity( const VULKAN_HPP_NAMESPACE::RenderingAreaInfo & renderingAreaInfo ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetRenderingAreaGranularity && "Function requires or " ); VULKAN_HPP_NAMESPACE::Extent2D granularity; getDispatcher()->vkGetRenderingAreaGranularity( static_cast( m_device ), reinterpret_cast( &renderingAreaInfo ), reinterpret_cast( &granularity ) ); return granularity; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::SubresourceLayout2 Device::getImageSubresourceLayout( const VULKAN_HPP_NAMESPACE::DeviceImageSubresourceInfo & info ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetDeviceImageSubresourceLayout && "Function requires or " ); VULKAN_HPP_NAMESPACE::SubresourceLayout2 layout; getDispatcher()->vkGetDeviceImageSubresourceLayout( static_cast( m_device ), reinterpret_cast( &info ), reinterpret_cast( &layout ) ); return layout; } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::StructureChain Device::getImageSubresourceLayout( const VULKAN_HPP_NAMESPACE::DeviceImageSubresourceInfo & info ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetDeviceImageSubresourceLayout && "Function requires or " ); VULKAN_HPP_NAMESPACE::StructureChain structureChain; VULKAN_HPP_NAMESPACE::SubresourceLayout2 & layout = structureChain.template get(); getDispatcher()->vkGetDeviceImageSubresourceLayout( static_cast( m_device ), reinterpret_cast( &info ), reinterpret_cast( &layout ) ); return structureChain; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::SubresourceLayout2 Image::getSubresourceLayout2( const VULKAN_HPP_NAMESPACE::ImageSubresource2 & subresource ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetImageSubresourceLayout2 && "Function requires or or or " ); VULKAN_HPP_NAMESPACE::SubresourceLayout2 layout; getDispatcher()->vkGetImageSubresourceLayout2( static_cast( m_device ), static_cast( m_image ), reinterpret_cast( &subresource ), reinterpret_cast( &layout ) ); return layout; } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::StructureChain Image::getSubresourceLayout2( const VULKAN_HPP_NAMESPACE::ImageSubresource2 & subresource ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetImageSubresourceLayout2 && "Function requires or or or " ); VULKAN_HPP_NAMESPACE::StructureChain structureChain; VULKAN_HPP_NAMESPACE::SubresourceLayout2 & layout = structureChain.template get(); getDispatcher()->vkGetImageSubresourceLayout2( static_cast( m_device ), static_cast( m_image ), reinterpret_cast( &subresource ), reinterpret_cast( &layout ) ); return structureChain; } VULKAN_HPP_INLINE void CommandBuffer::pushDescriptorSet( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint, VULKAN_HPP_NAMESPACE::PipelineLayout layout, uint32_t set, VULKAN_HPP_NAMESPACE::ArrayProxy const & descriptorWrites ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdPushDescriptorSet && "Function requires or " ); getDispatcher()->vkCmdPushDescriptorSet( static_cast( m_commandBuffer ), static_cast( pipelineBindPoint ), static_cast( layout ), set, descriptorWrites.size(), reinterpret_cast( descriptorWrites.data() ) ); } template VULKAN_HPP_INLINE void CommandBuffer::pushDescriptorSetWithTemplate( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate, VULKAN_HPP_NAMESPACE::PipelineLayout layout, uint32_t set, DataType const & data ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdPushDescriptorSetWithTemplate && "Function requires or or " ); getDispatcher()->vkCmdPushDescriptorSetWithTemplate( static_cast( m_commandBuffer ), static_cast( descriptorUpdateTemplate ), static_cast( layout ), set, reinterpret_cast( &data ) ); } VULKAN_HPP_INLINE void CommandBuffer::setRenderingAttachmentLocations( const VULKAN_HPP_NAMESPACE::RenderingAttachmentLocationInfo & locationInfo ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetRenderingAttachmentLocations && "Function requires or " ); getDispatcher()->vkCmdSetRenderingAttachmentLocations( static_cast( m_commandBuffer ), reinterpret_cast( &locationInfo ) ); } VULKAN_HPP_INLINE void CommandBuffer::setRenderingInputAttachmentIndices( const VULKAN_HPP_NAMESPACE::RenderingInputAttachmentIndexInfo & inputAttachmentIndexInfo ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetRenderingInputAttachmentIndices && "Function requires or " ); getDispatcher()->vkCmdSetRenderingInputAttachmentIndices( static_cast( m_commandBuffer ), reinterpret_cast( &inputAttachmentIndexInfo ) ); } VULKAN_HPP_INLINE void CommandBuffer::bindDescriptorSets2( const VULKAN_HPP_NAMESPACE::BindDescriptorSetsInfo & bindDescriptorSetsInfo ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdBindDescriptorSets2 && "Function requires or " ); getDispatcher()->vkCmdBindDescriptorSets2( static_cast( m_commandBuffer ), reinterpret_cast( &bindDescriptorSetsInfo ) ); } VULKAN_HPP_INLINE void CommandBuffer::pushConstants2( const VULKAN_HPP_NAMESPACE::PushConstantsInfo & pushConstantsInfo ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdPushConstants2 && "Function requires or " ); getDispatcher()->vkCmdPushConstants2( static_cast( m_commandBuffer ), reinterpret_cast( &pushConstantsInfo ) ); } VULKAN_HPP_INLINE void CommandBuffer::pushDescriptorSet2( const VULKAN_HPP_NAMESPACE::PushDescriptorSetInfo & pushDescriptorSetInfo ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdPushDescriptorSet2 && "Function requires or " ); getDispatcher()->vkCmdPushDescriptorSet2( static_cast( m_commandBuffer ), reinterpret_cast( &pushDescriptorSetInfo ) ); } VULKAN_HPP_INLINE void CommandBuffer::pushDescriptorSetWithTemplate2( const VULKAN_HPP_NAMESPACE::PushDescriptorSetWithTemplateInfo & pushDescriptorSetWithTemplateInfo ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdPushDescriptorSetWithTemplate2 && "Function requires or " ); getDispatcher()->vkCmdPushDescriptorSetWithTemplate2( static_cast( m_commandBuffer ), reinterpret_cast( &pushDescriptorSetWithTemplateInfo ) ); } VULKAN_HPP_INLINE void Device::copyMemoryToImage( const VULKAN_HPP_NAMESPACE::CopyMemoryToImageInfo & copyMemoryToImageInfo ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkCopyMemoryToImage && "Function requires or " ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCopyMemoryToImage( static_cast( m_device ), reinterpret_cast( ©MemoryToImageInfo ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::copyMemoryToImage" ); } VULKAN_HPP_INLINE void Device::copyImageToMemory( const VULKAN_HPP_NAMESPACE::CopyImageToMemoryInfo & copyImageToMemoryInfo ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkCopyImageToMemory && "Function requires or " ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCopyImageToMemory( static_cast( m_device ), reinterpret_cast( ©ImageToMemoryInfo ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::copyImageToMemory" ); } VULKAN_HPP_INLINE void Device::copyImageToImage( const VULKAN_HPP_NAMESPACE::CopyImageToImageInfo & copyImageToImageInfo ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkCopyImageToImage && "Function requires or " ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCopyImageToImage( static_cast( m_device ), reinterpret_cast( ©ImageToImageInfo ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::copyImageToImage" ); } VULKAN_HPP_INLINE void Device::transitionImageLayout( VULKAN_HPP_NAMESPACE::ArrayProxy const & transitions ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkTransitionImageLayout && "Function requires or " ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkTransitionImageLayout( static_cast( m_device ), transitions.size(), reinterpret_cast( transitions.data() ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::transitionImageLayout" ); } //=== VK_KHR_surface === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Bool32 PhysicalDevice::getSurfaceSupportKHR( uint32_t queueFamilyIndex, VULKAN_HPP_NAMESPACE::SurfaceKHR surface ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceSurfaceSupportKHR && "Function requires " ); VULKAN_HPP_NAMESPACE::Bool32 supported; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetPhysicalDeviceSurfaceSupportKHR( static_cast( m_physicalDevice ), queueFamilyIndex, static_cast( surface ), reinterpret_cast( &supported ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceSupportKHR" ); return supported; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::SurfaceCapabilitiesKHR PhysicalDevice::getSurfaceCapabilitiesKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceSurfaceCapabilitiesKHR && "Function requires " ); VULKAN_HPP_NAMESPACE::SurfaceCapabilitiesKHR surfaceCapabilities; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetPhysicalDeviceSurfaceCapabilitiesKHR( static_cast( m_physicalDevice ), static_cast( surface ), reinterpret_cast( &surfaceCapabilities ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceCapabilitiesKHR" ); return surfaceCapabilities; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector PhysicalDevice::getSurfaceFormatsKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceSurfaceFormatsKHR && "Function requires " ); std::vector surfaceFormats; uint32_t surfaceFormatCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( getDispatcher()->vkGetPhysicalDeviceSurfaceFormatsKHR( static_cast( m_physicalDevice ), static_cast( surface ), &surfaceFormatCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && surfaceFormatCount ) { surfaceFormats.resize( surfaceFormatCount ); result = static_cast( getDispatcher()->vkGetPhysicalDeviceSurfaceFormatsKHR( static_cast( m_physicalDevice ), static_cast( surface ), &surfaceFormatCount, reinterpret_cast( surfaceFormats.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceFormatsKHR" ); VULKAN_HPP_ASSERT( surfaceFormatCount <= surfaceFormats.size() ); if ( surfaceFormatCount < surfaceFormats.size() ) { surfaceFormats.resize( surfaceFormatCount ); } return surfaceFormats; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector PhysicalDevice::getSurfacePresentModesKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceSurfacePresentModesKHR && "Function requires " ); std::vector presentModes; uint32_t presentModeCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( getDispatcher()->vkGetPhysicalDeviceSurfacePresentModesKHR( static_cast( m_physicalDevice ), static_cast( surface ), &presentModeCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && presentModeCount ) { presentModes.resize( presentModeCount ); result = static_cast( getDispatcher()->vkGetPhysicalDeviceSurfacePresentModesKHR( static_cast( m_physicalDevice ), static_cast( surface ), &presentModeCount, reinterpret_cast( presentModes.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfacePresentModesKHR" ); VULKAN_HPP_ASSERT( presentModeCount <= presentModes.size() ); if ( presentModeCount < presentModes.size() ) { presentModes.resize( presentModeCount ); } return presentModes; } //=== VK_KHR_swapchain === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type Device::createSwapchainKHR( VULKAN_HPP_NAMESPACE::SwapchainCreateInfoKHR const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateSwapchainKHR( static_cast( m_device ), reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &swapchain ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { # if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) return VULKAN_HPP_UNEXPECTED( result ); # else VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createSwapchainKHR" ); # endif } return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::SwapchainKHR( *this, *reinterpret_cast( &swapchain ), allocator ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector SwapchainKHR::getImages() const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetSwapchainImagesKHR && "Function requires " ); std::vector swapchainImages; uint32_t swapchainImageCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( getDispatcher()->vkGetSwapchainImagesKHR( static_cast( m_device ), static_cast( m_swapchain ), &swapchainImageCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && swapchainImageCount ) { swapchainImages.resize( swapchainImageCount ); result = static_cast( getDispatcher()->vkGetSwapchainImagesKHR( static_cast( m_device ), static_cast( m_swapchain ), &swapchainImageCount, reinterpret_cast( swapchainImages.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::SwapchainKHR::getImages" ); VULKAN_HPP_ASSERT( swapchainImageCount <= swapchainImages.size() ); if ( swapchainImageCount < swapchainImages.size() ) { swapchainImages.resize( swapchainImageCount ); } return swapchainImages; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::pair SwapchainKHR::acquireNextImage( uint64_t timeout, VULKAN_HPP_NAMESPACE::Semaphore semaphore, VULKAN_HPP_NAMESPACE::Fence fence ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkAcquireNextImageKHR && "Function requires " ); uint32_t imageIndex; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkAcquireNextImageKHR( static_cast( m_device ), static_cast( m_swapchain ), timeout, static_cast( semaphore ), static_cast( fence ), &imageIndex ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::SwapchainKHR::acquireNextImage", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eTimeout, VULKAN_HPP_NAMESPACE::Result::eNotReady, VULKAN_HPP_NAMESPACE::Result::eSuboptimalKHR } ); return std::make_pair( result, std::move( imageIndex ) ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Queue::presentKHR( const VULKAN_HPP_NAMESPACE::PresentInfoKHR & presentInfo ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkQueuePresentKHR && "Function requires " ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkQueuePresentKHR( static_cast( m_queue ), reinterpret_cast( &presentInfo ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Queue::presentKHR", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eSuboptimalKHR } ); return static_cast( result ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::DeviceGroupPresentCapabilitiesKHR Device::getGroupPresentCapabilitiesKHR() const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetDeviceGroupPresentCapabilitiesKHR && "Function requires or " ); VULKAN_HPP_NAMESPACE::DeviceGroupPresentCapabilitiesKHR deviceGroupPresentCapabilities; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetDeviceGroupPresentCapabilitiesKHR( static_cast( m_device ), reinterpret_cast( &deviceGroupPresentCapabilities ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getGroupPresentCapabilitiesKHR" ); return deviceGroupPresentCapabilities; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::DeviceGroupPresentModeFlagsKHR Device::getGroupSurfacePresentModesKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetDeviceGroupSurfacePresentModesKHR && "Function requires or " ); VULKAN_HPP_NAMESPACE::DeviceGroupPresentModeFlagsKHR modes; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetDeviceGroupSurfacePresentModesKHR( static_cast( m_device ), static_cast( surface ), reinterpret_cast( &modes ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getGroupSurfacePresentModesKHR" ); return modes; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector PhysicalDevice::getPresentRectanglesKHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDevicePresentRectanglesKHR && "Function requires or " ); std::vector rects; uint32_t rectCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( getDispatcher()->vkGetPhysicalDevicePresentRectanglesKHR( static_cast( m_physicalDevice ), static_cast( surface ), &rectCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && rectCount ) { rects.resize( rectCount ); result = static_cast( getDispatcher()->vkGetPhysicalDevicePresentRectanglesKHR( static_cast( m_physicalDevice ), static_cast( surface ), &rectCount, reinterpret_cast( rects.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getPresentRectanglesKHR" ); VULKAN_HPP_ASSERT( rectCount <= rects.size() ); if ( rectCount < rects.size() ) { rects.resize( rectCount ); } return rects; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::pair Device::acquireNextImage2KHR( const VULKAN_HPP_NAMESPACE::AcquireNextImageInfoKHR & acquireInfo ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkAcquireNextImage2KHR && "Function requires or " ); uint32_t imageIndex; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkAcquireNextImage2KHR( static_cast( m_device ), reinterpret_cast( &acquireInfo ), &imageIndex ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::acquireNextImage2KHR", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eTimeout, VULKAN_HPP_NAMESPACE::Result::eNotReady, VULKAN_HPP_NAMESPACE::Result::eSuboptimalKHR } ); return std::make_pair( result, std::move( imageIndex ) ); } //=== VK_KHR_display === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector PhysicalDevice::getDisplayPropertiesKHR() const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceDisplayPropertiesKHR && "Function requires " ); std::vector properties; uint32_t propertyCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( getDispatcher()->vkGetPhysicalDeviceDisplayPropertiesKHR( static_cast( m_physicalDevice ), &propertyCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); result = static_cast( getDispatcher()->vkGetPhysicalDeviceDisplayPropertiesKHR( static_cast( m_physicalDevice ), &propertyCount, reinterpret_cast( properties.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPropertiesKHR" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } return properties; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector PhysicalDevice::getDisplayPlanePropertiesKHR() const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceDisplayPlanePropertiesKHR && "Function requires " ); std::vector properties; uint32_t propertyCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( getDispatcher()->vkGetPhysicalDeviceDisplayPlanePropertiesKHR( static_cast( m_physicalDevice ), &propertyCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); result = static_cast( getDispatcher()->vkGetPhysicalDeviceDisplayPlanePropertiesKHR( static_cast( m_physicalDevice ), &propertyCount, reinterpret_cast( properties.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPlanePropertiesKHR" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } return properties; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType>::Type PhysicalDevice::getDisplayPlaneSupportedDisplaysKHR( uint32_t planeIndex ) const { std::vector displays; uint32_t displayCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( getDispatcher()->vkGetDisplayPlaneSupportedDisplaysKHR( static_cast( m_physicalDevice ), planeIndex, &displayCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && displayCount ) { displays.resize( displayCount ); result = static_cast( getDispatcher()->vkGetDisplayPlaneSupportedDisplaysKHR( static_cast( m_physicalDevice ), planeIndex, &displayCount, reinterpret_cast( displays.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); if ( ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) && ( result != VULKAN_HPP_NAMESPACE::Result::eIncomplete ) ) { # if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) return VULKAN_HPP_UNEXPECTED( result ); # else VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "PhysicalDevice::getDisplayPlaneSupportedDisplaysKHR" ); # endif } std::vector displaysRAII; displaysRAII.reserve( displays.size() ); for ( auto & display : displays ) { displaysRAII.emplace_back( *this, *reinterpret_cast( &display ) ); } return displaysRAII; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector DisplayKHR::getModeProperties() const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetDisplayModePropertiesKHR && "Function requires " ); std::vector properties; uint32_t propertyCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( getDispatcher()->vkGetDisplayModePropertiesKHR( static_cast( m_physicalDevice ), static_cast( m_display ), &propertyCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); result = static_cast( getDispatcher()->vkGetDisplayModePropertiesKHR( static_cast( m_physicalDevice ), static_cast( m_display ), &propertyCount, reinterpret_cast( properties.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::DisplayKHR::getModeProperties" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } return properties; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type DisplayKHR::createMode( VULKAN_HPP_NAMESPACE::DisplayModeCreateInfoKHR const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { VULKAN_HPP_NAMESPACE::DisplayModeKHR mode; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateDisplayModeKHR( static_cast( m_physicalDevice ), static_cast( m_display ), reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &mode ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { # if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) return VULKAN_HPP_UNEXPECTED( result ); # else VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "DisplayKHR::createMode" ); # endif } return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DisplayModeKHR( *this, *reinterpret_cast( &mode ) ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::DisplayPlaneCapabilitiesKHR DisplayModeKHR::getDisplayPlaneCapabilities( uint32_t planeIndex ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetDisplayPlaneCapabilitiesKHR && "Function requires " ); VULKAN_HPP_NAMESPACE::DisplayPlaneCapabilitiesKHR capabilities; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetDisplayPlaneCapabilitiesKHR( static_cast( m_physicalDevice ), static_cast( m_displayModeKHR ), planeIndex, reinterpret_cast( &capabilities ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::DisplayModeKHR::getDisplayPlaneCapabilities" ); return capabilities; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type Instance::createDisplayPlaneSurfaceKHR( VULKAN_HPP_NAMESPACE::DisplaySurfaceCreateInfoKHR const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { VULKAN_HPP_NAMESPACE::SurfaceKHR surface; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateDisplayPlaneSurfaceKHR( static_cast( m_instance ), reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { # if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) return VULKAN_HPP_UNEXPECTED( result ); # else VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Instance::createDisplayPlaneSurfaceKHR" ); # endif } return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR( *this, *reinterpret_cast( &surface ), allocator ); } //=== VK_KHR_display_swapchain === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType< std::vector>::Type Device::createSharedSwapchainsKHR( VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, VULKAN_HPP_NAMESPACE::Optional allocator ) const { std::vector swapchains( createInfos.size() ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateSharedSwapchainsKHR( static_cast( m_device ), createInfos.size(), reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( swapchains.data() ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { # if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) return VULKAN_HPP_UNEXPECTED( result ); # else VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createSharedSwapchainsKHR" ); # endif } std::vector swapchainsRAII; swapchainsRAII.reserve( swapchains.size() ); for ( auto & swapchain : swapchains ) { swapchainsRAII.emplace_back( *this, *reinterpret_cast( &swapchain ), allocator ); } return swapchainsRAII; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type Device::createSharedSwapchainKHR( VULKAN_HPP_NAMESPACE::SwapchainCreateInfoKHR const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateSharedSwapchainsKHR( static_cast( m_device ), 1, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &swapchain ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { # if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) return VULKAN_HPP_UNEXPECTED( result ); # else VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createSharedSwapchainKHR" ); # endif } return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::SwapchainKHR( *this, *reinterpret_cast( &swapchain ), allocator ); } # if defined( VK_USE_PLATFORM_XLIB_KHR ) //=== VK_KHR_xlib_surface === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type Instance::createXlibSurfaceKHR( VULKAN_HPP_NAMESPACE::XlibSurfaceCreateInfoKHR const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { VULKAN_HPP_NAMESPACE::SurfaceKHR surface; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateXlibSurfaceKHR( static_cast( m_instance ), reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { # if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) return VULKAN_HPP_UNEXPECTED( result ); # else VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Instance::createXlibSurfaceKHR" ); # endif } return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR( *this, *reinterpret_cast( &surface ), allocator ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Bool32 PhysicalDevice::getXlibPresentationSupportKHR( uint32_t queueFamilyIndex, Display & dpy, VisualID visualID ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceXlibPresentationSupportKHR && "Function requires " ); VkBool32 result = getDispatcher()->vkGetPhysicalDeviceXlibPresentationSupportKHR( static_cast( m_physicalDevice ), queueFamilyIndex, &dpy, visualID ); return static_cast( result ); } # endif /*VK_USE_PLATFORM_XLIB_KHR*/ # if defined( VK_USE_PLATFORM_XCB_KHR ) //=== VK_KHR_xcb_surface === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type Instance::createXcbSurfaceKHR( VULKAN_HPP_NAMESPACE::XcbSurfaceCreateInfoKHR const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { VULKAN_HPP_NAMESPACE::SurfaceKHR surface; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateXcbSurfaceKHR( static_cast( m_instance ), reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { # if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) return VULKAN_HPP_UNEXPECTED( result ); # else VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Instance::createXcbSurfaceKHR" ); # endif } return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR( *this, *reinterpret_cast( &surface ), allocator ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Bool32 PhysicalDevice::getXcbPresentationSupportKHR( uint32_t queueFamilyIndex, xcb_connection_t & connection, xcb_visualid_t visual_id ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceXcbPresentationSupportKHR && "Function requires " ); VkBool32 result = getDispatcher()->vkGetPhysicalDeviceXcbPresentationSupportKHR( static_cast( m_physicalDevice ), queueFamilyIndex, &connection, visual_id ); return static_cast( result ); } # endif /*VK_USE_PLATFORM_XCB_KHR*/ # if defined( VK_USE_PLATFORM_WAYLAND_KHR ) //=== VK_KHR_wayland_surface === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type Instance::createWaylandSurfaceKHR( VULKAN_HPP_NAMESPACE::WaylandSurfaceCreateInfoKHR const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { VULKAN_HPP_NAMESPACE::SurfaceKHR surface; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateWaylandSurfaceKHR( static_cast( m_instance ), reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { # if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) return VULKAN_HPP_UNEXPECTED( result ); # else VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Instance::createWaylandSurfaceKHR" ); # endif } return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR( *this, *reinterpret_cast( &surface ), allocator ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Bool32 PhysicalDevice::getWaylandPresentationSupportKHR( uint32_t queueFamilyIndex, struct wl_display & display ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceWaylandPresentationSupportKHR && "Function requires " ); VkBool32 result = getDispatcher()->vkGetPhysicalDeviceWaylandPresentationSupportKHR( static_cast( m_physicalDevice ), queueFamilyIndex, &display ); return static_cast( result ); } # endif /*VK_USE_PLATFORM_WAYLAND_KHR*/ # if defined( VK_USE_PLATFORM_ANDROID_KHR ) //=== VK_KHR_android_surface === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type Instance::createAndroidSurfaceKHR( VULKAN_HPP_NAMESPACE::AndroidSurfaceCreateInfoKHR const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { VULKAN_HPP_NAMESPACE::SurfaceKHR surface; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateAndroidSurfaceKHR( static_cast( m_instance ), reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { # if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) return VULKAN_HPP_UNEXPECTED( result ); # else VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Instance::createAndroidSurfaceKHR" ); # endif } return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR( *this, *reinterpret_cast( &surface ), allocator ); } # endif /*VK_USE_PLATFORM_ANDROID_KHR*/ # if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_KHR_win32_surface === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type Instance::createWin32SurfaceKHR( VULKAN_HPP_NAMESPACE::Win32SurfaceCreateInfoKHR const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { VULKAN_HPP_NAMESPACE::SurfaceKHR surface; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateWin32SurfaceKHR( static_cast( m_instance ), reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { # if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) return VULKAN_HPP_UNEXPECTED( result ); # else VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Instance::createWin32SurfaceKHR" ); # endif } return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR( *this, *reinterpret_cast( &surface ), allocator ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Bool32 PhysicalDevice::getWin32PresentationSupportKHR( uint32_t queueFamilyIndex ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceWin32PresentationSupportKHR && "Function requires " ); VkBool32 result = getDispatcher()->vkGetPhysicalDeviceWin32PresentationSupportKHR( static_cast( m_physicalDevice ), queueFamilyIndex ); return static_cast( result ); } # endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_EXT_debug_report === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type Instance::createDebugReportCallbackEXT( VULKAN_HPP_NAMESPACE::DebugReportCallbackCreateInfoEXT const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { VULKAN_HPP_NAMESPACE::DebugReportCallbackEXT callback; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateDebugReportCallbackEXT( static_cast( m_instance ), reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &callback ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { # if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) return VULKAN_HPP_UNEXPECTED( result ); # else VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Instance::createDebugReportCallbackEXT" ); # endif } return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DebugReportCallbackEXT( *this, *reinterpret_cast( &callback ), allocator ); } VULKAN_HPP_INLINE void Instance::debugReportMessageEXT( VULKAN_HPP_NAMESPACE::DebugReportFlagsEXT flags, VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT objectType_, uint64_t object, size_t location, int32_t messageCode, const std::string & layerPrefix, const std::string & message ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkDebugReportMessageEXT && "Function requires " ); getDispatcher()->vkDebugReportMessageEXT( static_cast( m_instance ), static_cast( flags ), static_cast( objectType_ ), object, location, messageCode, layerPrefix.c_str(), message.c_str() ); } //=== VK_EXT_debug_marker === VULKAN_HPP_INLINE void Device::debugMarkerSetObjectTagEXT( const VULKAN_HPP_NAMESPACE::DebugMarkerObjectTagInfoEXT & tagInfo ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkDebugMarkerSetObjectTagEXT && "Function requires " ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkDebugMarkerSetObjectTagEXT( static_cast( m_device ), reinterpret_cast( &tagInfo ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::debugMarkerSetObjectTagEXT" ); } VULKAN_HPP_INLINE void Device::debugMarkerSetObjectNameEXT( const VULKAN_HPP_NAMESPACE::DebugMarkerObjectNameInfoEXT & nameInfo ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkDebugMarkerSetObjectNameEXT && "Function requires " ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkDebugMarkerSetObjectNameEXT( static_cast( m_device ), reinterpret_cast( &nameInfo ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::debugMarkerSetObjectNameEXT" ); } VULKAN_HPP_INLINE void CommandBuffer::debugMarkerBeginEXT( const VULKAN_HPP_NAMESPACE::DebugMarkerMarkerInfoEXT & markerInfo ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdDebugMarkerBeginEXT && "Function requires " ); getDispatcher()->vkCmdDebugMarkerBeginEXT( static_cast( m_commandBuffer ), reinterpret_cast( &markerInfo ) ); } VULKAN_HPP_INLINE void CommandBuffer::debugMarkerEndEXT() const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdDebugMarkerEndEXT && "Function requires " ); getDispatcher()->vkCmdDebugMarkerEndEXT( static_cast( m_commandBuffer ) ); } VULKAN_HPP_INLINE void CommandBuffer::debugMarkerInsertEXT( const VULKAN_HPP_NAMESPACE::DebugMarkerMarkerInfoEXT & markerInfo ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdDebugMarkerInsertEXT && "Function requires " ); getDispatcher()->vkCmdDebugMarkerInsertEXT( static_cast( m_commandBuffer ), reinterpret_cast( &markerInfo ) ); } //=== VK_KHR_video_queue === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VideoCapabilitiesKHR PhysicalDevice::getVideoCapabilitiesKHR( const VULKAN_HPP_NAMESPACE::VideoProfileInfoKHR & videoProfile ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceVideoCapabilitiesKHR && "Function requires " ); VULKAN_HPP_NAMESPACE::VideoCapabilitiesKHR capabilities; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetPhysicalDeviceVideoCapabilitiesKHR( static_cast( m_physicalDevice ), reinterpret_cast( &videoProfile ), reinterpret_cast( &capabilities ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getVideoCapabilitiesKHR" ); return capabilities; } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::StructureChain PhysicalDevice::getVideoCapabilitiesKHR( const VULKAN_HPP_NAMESPACE::VideoProfileInfoKHR & videoProfile ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceVideoCapabilitiesKHR && "Function requires " ); StructureChain structureChain; VULKAN_HPP_NAMESPACE::VideoCapabilitiesKHR & capabilities = structureChain.template get(); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetPhysicalDeviceVideoCapabilitiesKHR( static_cast( m_physicalDevice ), reinterpret_cast( &videoProfile ), reinterpret_cast( &capabilities ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getVideoCapabilitiesKHR" ); return structureChain; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector PhysicalDevice::getVideoFormatPropertiesKHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceVideoFormatInfoKHR & videoFormatInfo ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceVideoFormatPropertiesKHR && "Function requires " ); std::vector videoFormatProperties; uint32_t videoFormatPropertyCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( getDispatcher()->vkGetPhysicalDeviceVideoFormatPropertiesKHR( static_cast( m_physicalDevice ), reinterpret_cast( &videoFormatInfo ), &videoFormatPropertyCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && videoFormatPropertyCount ) { videoFormatProperties.resize( videoFormatPropertyCount ); result = static_cast( getDispatcher()->vkGetPhysicalDeviceVideoFormatPropertiesKHR( static_cast( m_physicalDevice ), reinterpret_cast( &videoFormatInfo ), &videoFormatPropertyCount, reinterpret_cast( videoFormatProperties.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getVideoFormatPropertiesKHR" ); VULKAN_HPP_ASSERT( videoFormatPropertyCount <= videoFormatProperties.size() ); if ( videoFormatPropertyCount < videoFormatProperties.size() ) { videoFormatProperties.resize( videoFormatPropertyCount ); } return videoFormatProperties; } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector PhysicalDevice::getVideoFormatPropertiesKHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceVideoFormatInfoKHR & videoFormatInfo ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceVideoFormatPropertiesKHR && "Function requires " ); std::vector structureChains; std::vector videoFormatProperties; uint32_t videoFormatPropertyCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( getDispatcher()->vkGetPhysicalDeviceVideoFormatPropertiesKHR( static_cast( m_physicalDevice ), reinterpret_cast( &videoFormatInfo ), &videoFormatPropertyCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && videoFormatPropertyCount ) { structureChains.resize( videoFormatPropertyCount ); videoFormatProperties.resize( videoFormatPropertyCount ); for ( uint32_t i = 0; i < videoFormatPropertyCount; i++ ) { videoFormatProperties[i].pNext = structureChains[i].template get().pNext; } result = static_cast( getDispatcher()->vkGetPhysicalDeviceVideoFormatPropertiesKHR( static_cast( m_physicalDevice ), reinterpret_cast( &videoFormatInfo ), &videoFormatPropertyCount, reinterpret_cast( videoFormatProperties.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getVideoFormatPropertiesKHR" ); VULKAN_HPP_ASSERT( videoFormatPropertyCount <= videoFormatProperties.size() ); if ( videoFormatPropertyCount < videoFormatProperties.size() ) { structureChains.resize( videoFormatPropertyCount ); } for ( uint32_t i = 0; i < videoFormatPropertyCount; i++ ) { structureChains[i].template get() = videoFormatProperties[i]; } return structureChains; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type Device::createVideoSessionKHR( VULKAN_HPP_NAMESPACE::VideoSessionCreateInfoKHR const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { VULKAN_HPP_NAMESPACE::VideoSessionKHR videoSession; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateVideoSessionKHR( static_cast( m_device ), reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &videoSession ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { # if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) return VULKAN_HPP_UNEXPECTED( result ); # else VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createVideoSessionKHR" ); # endif } return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::VideoSessionKHR( *this, *reinterpret_cast( &videoSession ), allocator ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector VideoSessionKHR::getMemoryRequirements() const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetVideoSessionMemoryRequirementsKHR && "Function requires " ); std::vector memoryRequirements; uint32_t memoryRequirementsCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( getDispatcher()->vkGetVideoSessionMemoryRequirementsKHR( static_cast( m_device ), static_cast( m_videoSession ), &memoryRequirementsCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && memoryRequirementsCount ) { memoryRequirements.resize( memoryRequirementsCount ); result = static_cast( getDispatcher()->vkGetVideoSessionMemoryRequirementsKHR( static_cast( m_device ), static_cast( m_videoSession ), &memoryRequirementsCount, reinterpret_cast( memoryRequirements.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_ASSERT( memoryRequirementsCount <= memoryRequirements.size() ); if ( memoryRequirementsCount < memoryRequirements.size() ) { memoryRequirements.resize( memoryRequirementsCount ); } return memoryRequirements; } VULKAN_HPP_INLINE void VideoSessionKHR::bindMemory( VULKAN_HPP_NAMESPACE::ArrayProxy const & bindSessionMemoryInfos ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkBindVideoSessionMemoryKHR && "Function requires " ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkBindVideoSessionMemoryKHR( static_cast( m_device ), static_cast( m_videoSession ), bindSessionMemoryInfos.size(), reinterpret_cast( bindSessionMemoryInfos.data() ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::VideoSessionKHR::bindMemory" ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType< VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::VideoSessionParametersKHR>::Type Device::createVideoSessionParametersKHR( VULKAN_HPP_NAMESPACE::VideoSessionParametersCreateInfoKHR const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { VULKAN_HPP_NAMESPACE::VideoSessionParametersKHR videoSessionParameters; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateVideoSessionParametersKHR( static_cast( m_device ), reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &videoSessionParameters ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { # if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) return VULKAN_HPP_UNEXPECTED( result ); # else VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createVideoSessionParametersKHR" ); # endif } return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::VideoSessionParametersKHR( *this, *reinterpret_cast( &videoSessionParameters ), allocator ); } VULKAN_HPP_INLINE void VideoSessionParametersKHR::update( const VULKAN_HPP_NAMESPACE::VideoSessionParametersUpdateInfoKHR & updateInfo ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkUpdateVideoSessionParametersKHR && "Function requires " ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkUpdateVideoSessionParametersKHR( static_cast( m_device ), static_cast( m_videoSessionParameters ), reinterpret_cast( &updateInfo ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::VideoSessionParametersKHR::update" ); } VULKAN_HPP_INLINE void CommandBuffer::beginVideoCodingKHR( const VULKAN_HPP_NAMESPACE::VideoBeginCodingInfoKHR & beginInfo ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdBeginVideoCodingKHR && "Function requires " ); getDispatcher()->vkCmdBeginVideoCodingKHR( static_cast( m_commandBuffer ), reinterpret_cast( &beginInfo ) ); } VULKAN_HPP_INLINE void CommandBuffer::endVideoCodingKHR( const VULKAN_HPP_NAMESPACE::VideoEndCodingInfoKHR & endCodingInfo ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdEndVideoCodingKHR && "Function requires " ); getDispatcher()->vkCmdEndVideoCodingKHR( static_cast( m_commandBuffer ), reinterpret_cast( &endCodingInfo ) ); } VULKAN_HPP_INLINE void CommandBuffer::controlVideoCodingKHR( const VULKAN_HPP_NAMESPACE::VideoCodingControlInfoKHR & codingControlInfo ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdControlVideoCodingKHR && "Function requires " ); getDispatcher()->vkCmdControlVideoCodingKHR( static_cast( m_commandBuffer ), reinterpret_cast( &codingControlInfo ) ); } //=== VK_KHR_video_decode_queue === VULKAN_HPP_INLINE void CommandBuffer::decodeVideoKHR( const VULKAN_HPP_NAMESPACE::VideoDecodeInfoKHR & decodeInfo ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdDecodeVideoKHR && "Function requires " ); getDispatcher()->vkCmdDecodeVideoKHR( static_cast( m_commandBuffer ), reinterpret_cast( &decodeInfo ) ); } //=== VK_EXT_transform_feedback === VULKAN_HPP_INLINE void CommandBuffer::bindTransformFeedbackBuffersEXT( uint32_t firstBinding, VULKAN_HPP_NAMESPACE::ArrayProxy const & buffers, VULKAN_HPP_NAMESPACE::ArrayProxy const & offsets, VULKAN_HPP_NAMESPACE::ArrayProxy const & sizes ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdBindTransformFeedbackBuffersEXT && "Function requires " ); # ifdef VULKAN_HPP_NO_EXCEPTIONS VULKAN_HPP_ASSERT( buffers.size() == offsets.size() ); VULKAN_HPP_ASSERT( sizes.empty() || buffers.size() == sizes.size() ); # else if ( buffers.size() != offsets.size() ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::bindTransformFeedbackBuffersEXT: buffers.size() != offsets.size()" ); } if ( !sizes.empty() && buffers.size() != sizes.size() ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::bindTransformFeedbackBuffersEXT: buffers.size() != sizes.size()" ); } # endif /*VULKAN_HPP_NO_EXCEPTIONS*/ getDispatcher()->vkCmdBindTransformFeedbackBuffersEXT( static_cast( m_commandBuffer ), firstBinding, buffers.size(), reinterpret_cast( buffers.data() ), reinterpret_cast( offsets.data() ), reinterpret_cast( sizes.data() ) ); } VULKAN_HPP_INLINE void CommandBuffer::beginTransformFeedbackEXT( uint32_t firstCounterBuffer, VULKAN_HPP_NAMESPACE::ArrayProxy const & counterBuffers, VULKAN_HPP_NAMESPACE::ArrayProxy const & counterBufferOffsets ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdBeginTransformFeedbackEXT && "Function requires " ); # ifdef VULKAN_HPP_NO_EXCEPTIONS VULKAN_HPP_ASSERT( counterBufferOffsets.empty() || counterBuffers.size() == counterBufferOffsets.size() ); # else if ( !counterBufferOffsets.empty() && counterBuffers.size() != counterBufferOffsets.size() ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::beginTransformFeedbackEXT: counterBuffers.size() != counterBufferOffsets.size()" ); } # endif /*VULKAN_HPP_NO_EXCEPTIONS*/ getDispatcher()->vkCmdBeginTransformFeedbackEXT( static_cast( m_commandBuffer ), firstCounterBuffer, counterBuffers.size(), reinterpret_cast( counterBuffers.data() ), reinterpret_cast( counterBufferOffsets.data() ) ); } VULKAN_HPP_INLINE void CommandBuffer::endTransformFeedbackEXT( uint32_t firstCounterBuffer, VULKAN_HPP_NAMESPACE::ArrayProxy const & counterBuffers, VULKAN_HPP_NAMESPACE::ArrayProxy const & counterBufferOffsets ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdEndTransformFeedbackEXT && "Function requires " ); # ifdef VULKAN_HPP_NO_EXCEPTIONS VULKAN_HPP_ASSERT( counterBufferOffsets.empty() || counterBuffers.size() == counterBufferOffsets.size() ); # else if ( !counterBufferOffsets.empty() && counterBuffers.size() != counterBufferOffsets.size() ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::endTransformFeedbackEXT: counterBuffers.size() != counterBufferOffsets.size()" ); } # endif /*VULKAN_HPP_NO_EXCEPTIONS*/ getDispatcher()->vkCmdEndTransformFeedbackEXT( static_cast( m_commandBuffer ), firstCounterBuffer, counterBuffers.size(), reinterpret_cast( counterBuffers.data() ), reinterpret_cast( counterBufferOffsets.data() ) ); } VULKAN_HPP_INLINE void CommandBuffer::beginQueryIndexedEXT( VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t query, VULKAN_HPP_NAMESPACE::QueryControlFlags flags, uint32_t index ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdBeginQueryIndexedEXT && "Function requires " ); getDispatcher()->vkCmdBeginQueryIndexedEXT( static_cast( m_commandBuffer ), static_cast( queryPool ), query, static_cast( flags ), index ); } VULKAN_HPP_INLINE void CommandBuffer::endQueryIndexedEXT( VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t query, uint32_t index ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdEndQueryIndexedEXT && "Function requires " ); getDispatcher()->vkCmdEndQueryIndexedEXT( static_cast( m_commandBuffer ), static_cast( queryPool ), query, index ); } VULKAN_HPP_INLINE void CommandBuffer::drawIndirectByteCountEXT( uint32_t instanceCount, uint32_t firstInstance, VULKAN_HPP_NAMESPACE::Buffer counterBuffer, VULKAN_HPP_NAMESPACE::DeviceSize counterBufferOffset, uint32_t counterOffset, uint32_t vertexStride ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdDrawIndirectByteCountEXT && "Function requires " ); getDispatcher()->vkCmdDrawIndirectByteCountEXT( static_cast( m_commandBuffer ), instanceCount, firstInstance, static_cast( counterBuffer ), static_cast( counterBufferOffset ), counterOffset, vertexStride ); } //=== VK_NVX_binary_import === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type Device::createCuModuleNVX( VULKAN_HPP_NAMESPACE::CuModuleCreateInfoNVX const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { VULKAN_HPP_NAMESPACE::CuModuleNVX module; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateCuModuleNVX( static_cast( m_device ), reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &module ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { # if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) return VULKAN_HPP_UNEXPECTED( result ); # else VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createCuModuleNVX" ); # endif } return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CuModuleNVX( *this, *reinterpret_cast( &module ), allocator ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type Device::createCuFunctionNVX( VULKAN_HPP_NAMESPACE::CuFunctionCreateInfoNVX const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { VULKAN_HPP_NAMESPACE::CuFunctionNVX function; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateCuFunctionNVX( static_cast( m_device ), reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &function ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { # if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) return VULKAN_HPP_UNEXPECTED( result ); # else VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createCuFunctionNVX" ); # endif } return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CuFunctionNVX( *this, *reinterpret_cast( &function ), allocator ); } VULKAN_HPP_INLINE void CommandBuffer::cuLaunchKernelNVX( const VULKAN_HPP_NAMESPACE::CuLaunchInfoNVX & launchInfo ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdCuLaunchKernelNVX && "Function requires " ); getDispatcher()->vkCmdCuLaunchKernelNVX( static_cast( m_commandBuffer ), reinterpret_cast( &launchInfo ) ); } //=== VK_NVX_image_view_handle === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE uint32_t Device::getImageViewHandleNVX( const VULKAN_HPP_NAMESPACE::ImageViewHandleInfoNVX & info ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetImageViewHandleNVX && "Function requires " ); uint32_t result = getDispatcher()->vkGetImageViewHandleNVX( static_cast( m_device ), reinterpret_cast( &info ) ); return result; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE uint64_t Device::getImageViewHandle64NVX( const VULKAN_HPP_NAMESPACE::ImageViewHandleInfoNVX & info ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetImageViewHandle64NVX && "Function requires " ); uint64_t result = getDispatcher()->vkGetImageViewHandle64NVX( static_cast( m_device ), reinterpret_cast( &info ) ); return result; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::ImageViewAddressPropertiesNVX ImageView::getAddressNVX() const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetImageViewAddressNVX && "Function requires " ); VULKAN_HPP_NAMESPACE::ImageViewAddressPropertiesNVX properties; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetImageViewAddressNVX( static_cast( m_device ), static_cast( m_imageView ), reinterpret_cast( &properties ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::ImageView::getAddressNVX" ); return properties; } //=== VK_AMD_draw_indirect_count === VULKAN_HPP_INLINE void CommandBuffer::drawIndirectCountAMD( VULKAN_HPP_NAMESPACE::Buffer buffer, VULKAN_HPP_NAMESPACE::DeviceSize offset, VULKAN_HPP_NAMESPACE::Buffer countBuffer, VULKAN_HPP_NAMESPACE::DeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdDrawIndirectCountAMD && "Function requires or or " ); getDispatcher()->vkCmdDrawIndirectCountAMD( static_cast( m_commandBuffer ), static_cast( buffer ), static_cast( offset ), static_cast( countBuffer ), static_cast( countBufferOffset ), maxDrawCount, stride ); } VULKAN_HPP_INLINE void CommandBuffer::drawIndexedIndirectCountAMD( VULKAN_HPP_NAMESPACE::Buffer buffer, VULKAN_HPP_NAMESPACE::DeviceSize offset, VULKAN_HPP_NAMESPACE::Buffer countBuffer, VULKAN_HPP_NAMESPACE::DeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdDrawIndexedIndirectCountAMD && "Function requires or or " ); getDispatcher()->vkCmdDrawIndexedIndirectCountAMD( static_cast( m_commandBuffer ), static_cast( buffer ), static_cast( offset ), static_cast( countBuffer ), static_cast( countBufferOffset ), maxDrawCount, stride ); } //=== VK_AMD_shader_info === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector Pipeline::getShaderInfoAMD( VULKAN_HPP_NAMESPACE::ShaderStageFlagBits shaderStage, VULKAN_HPP_NAMESPACE::ShaderInfoTypeAMD infoType ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetShaderInfoAMD && "Function requires " ); std::vector info; size_t infoSize; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( getDispatcher()->vkGetShaderInfoAMD( static_cast( m_device ), static_cast( m_pipeline ), static_cast( shaderStage ), static_cast( infoType ), &infoSize, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && infoSize ) { info.resize( infoSize ); result = static_cast( getDispatcher()->vkGetShaderInfoAMD( static_cast( m_device ), static_cast( m_pipeline ), static_cast( shaderStage ), static_cast( infoType ), &infoSize, reinterpret_cast( info.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Pipeline::getShaderInfoAMD" ); VULKAN_HPP_ASSERT( infoSize <= info.size() ); if ( infoSize < info.size() ) { info.resize( infoSize ); } return info; } //=== VK_KHR_dynamic_rendering === VULKAN_HPP_INLINE void CommandBuffer::beginRenderingKHR( const VULKAN_HPP_NAMESPACE::RenderingInfo & renderingInfo ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdBeginRenderingKHR && "Function requires or " ); getDispatcher()->vkCmdBeginRenderingKHR( static_cast( m_commandBuffer ), reinterpret_cast( &renderingInfo ) ); } VULKAN_HPP_INLINE void CommandBuffer::endRenderingKHR() const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdEndRenderingKHR && "Function requires or " ); getDispatcher()->vkCmdEndRenderingKHR( static_cast( m_commandBuffer ) ); } # if defined( VK_USE_PLATFORM_GGP ) //=== VK_GGP_stream_descriptor_surface === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type Instance::createStreamDescriptorSurfaceGGP( VULKAN_HPP_NAMESPACE::StreamDescriptorSurfaceCreateInfoGGP const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { VULKAN_HPP_NAMESPACE::SurfaceKHR surface; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateStreamDescriptorSurfaceGGP( static_cast( m_instance ), reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { # if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) return VULKAN_HPP_UNEXPECTED( result ); # else VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Instance::createStreamDescriptorSurfaceGGP" ); # endif } return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR( *this, *reinterpret_cast( &surface ), allocator ); } # endif /*VK_USE_PLATFORM_GGP*/ //=== VK_NV_external_memory_capabilities === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::ExternalImageFormatPropertiesNV PhysicalDevice::getExternalImageFormatPropertiesNV( VULKAN_HPP_NAMESPACE::Format format, VULKAN_HPP_NAMESPACE::ImageType type, VULKAN_HPP_NAMESPACE::ImageTiling tiling, VULKAN_HPP_NAMESPACE::ImageUsageFlags usage, VULKAN_HPP_NAMESPACE::ImageCreateFlags flags, VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagsNV externalHandleType ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceExternalImageFormatPropertiesNV && "Function requires " ); VULKAN_HPP_NAMESPACE::ExternalImageFormatPropertiesNV externalImageFormatProperties; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetPhysicalDeviceExternalImageFormatPropertiesNV( static_cast( m_physicalDevice ), static_cast( format ), static_cast( type ), static_cast( tiling ), static_cast( usage ), static_cast( flags ), static_cast( externalHandleType ), reinterpret_cast( &externalImageFormatProperties ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getExternalImageFormatPropertiesNV" ); return externalImageFormatProperties; } # if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_NV_external_memory_win32 === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE HANDLE DeviceMemory::getMemoryWin32HandleNV( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagsNV handleType ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetMemoryWin32HandleNV && "Function requires " ); HANDLE handle; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetMemoryWin32HandleNV( static_cast( m_device ), static_cast( m_memory ), static_cast( handleType ), &handle ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::DeviceMemory::getMemoryWin32HandleNV" ); return handle; } # endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_KHR_get_physical_device_properties2 === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures2 PhysicalDevice::getFeatures2KHR() const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceFeatures2KHR && "Function requires or " ); VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures2 features; getDispatcher()->vkGetPhysicalDeviceFeatures2KHR( static_cast( m_physicalDevice ), reinterpret_cast( &features ) ); return features; } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::StructureChain PhysicalDevice::getFeatures2KHR() const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceFeatures2KHR && "Function requires or " ); VULKAN_HPP_NAMESPACE::StructureChain structureChain; VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures2 & features = structureChain.template get(); getDispatcher()->vkGetPhysicalDeviceFeatures2KHR( static_cast( m_physicalDevice ), reinterpret_cast( &features ) ); return structureChain; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties2 PhysicalDevice::getProperties2KHR() const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceProperties2KHR && "Function requires or " ); VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties2 properties; getDispatcher()->vkGetPhysicalDeviceProperties2KHR( static_cast( m_physicalDevice ), reinterpret_cast( &properties ) ); return properties; } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::StructureChain PhysicalDevice::getProperties2KHR() const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceProperties2KHR && "Function requires or " ); VULKAN_HPP_NAMESPACE::StructureChain structureChain; VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties2 & properties = structureChain.template get(); getDispatcher()->vkGetPhysicalDeviceProperties2KHR( static_cast( m_physicalDevice ), reinterpret_cast( &properties ) ); return structureChain; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::FormatProperties2 PhysicalDevice::getFormatProperties2KHR( VULKAN_HPP_NAMESPACE::Format format ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceFormatProperties2KHR && "Function requires or " ); VULKAN_HPP_NAMESPACE::FormatProperties2 formatProperties; getDispatcher()->vkGetPhysicalDeviceFormatProperties2KHR( static_cast( m_physicalDevice ), static_cast( format ), reinterpret_cast( &formatProperties ) ); return formatProperties; } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::StructureChain PhysicalDevice::getFormatProperties2KHR( VULKAN_HPP_NAMESPACE::Format format ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceFormatProperties2KHR && "Function requires or " ); VULKAN_HPP_NAMESPACE::StructureChain structureChain; VULKAN_HPP_NAMESPACE::FormatProperties2 & formatProperties = structureChain.template get(); getDispatcher()->vkGetPhysicalDeviceFormatProperties2KHR( static_cast( m_physicalDevice ), static_cast( format ), reinterpret_cast( &formatProperties ) ); return structureChain; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::ImageFormatProperties2 PhysicalDevice::getImageFormatProperties2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceImageFormatInfo2 & imageFormatInfo ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceImageFormatProperties2KHR && "Function requires or " ); VULKAN_HPP_NAMESPACE::ImageFormatProperties2 imageFormatProperties; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetPhysicalDeviceImageFormatProperties2KHR( static_cast( m_physicalDevice ), reinterpret_cast( &imageFormatInfo ), reinterpret_cast( &imageFormatProperties ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getImageFormatProperties2KHR" ); return imageFormatProperties; } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::StructureChain PhysicalDevice::getImageFormatProperties2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceImageFormatInfo2 & imageFormatInfo ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceImageFormatProperties2KHR && "Function requires or " ); StructureChain structureChain; VULKAN_HPP_NAMESPACE::ImageFormatProperties2 & imageFormatProperties = structureChain.template get(); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetPhysicalDeviceImageFormatProperties2KHR( static_cast( m_physicalDevice ), reinterpret_cast( &imageFormatInfo ), reinterpret_cast( &imageFormatProperties ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getImageFormatProperties2KHR" ); return structureChain; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector PhysicalDevice::getQueueFamilyProperties2KHR() const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceQueueFamilyProperties2KHR && "Function requires or " ); std::vector queueFamilyProperties; uint32_t queueFamilyPropertyCount; getDispatcher()->vkGetPhysicalDeviceQueueFamilyProperties2KHR( static_cast( m_physicalDevice ), &queueFamilyPropertyCount, nullptr ); queueFamilyProperties.resize( queueFamilyPropertyCount ); getDispatcher()->vkGetPhysicalDeviceQueueFamilyProperties2KHR( static_cast( m_physicalDevice ), &queueFamilyPropertyCount, reinterpret_cast( queueFamilyProperties.data() ) ); VULKAN_HPP_ASSERT( queueFamilyPropertyCount <= queueFamilyProperties.size() ); if ( queueFamilyPropertyCount < queueFamilyProperties.size() ) { queueFamilyProperties.resize( queueFamilyPropertyCount ); } return queueFamilyProperties; } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector PhysicalDevice::getQueueFamilyProperties2KHR() const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceQueueFamilyProperties2KHR && "Function requires or " ); std::vector structureChains; std::vector queueFamilyProperties; uint32_t queueFamilyPropertyCount; getDispatcher()->vkGetPhysicalDeviceQueueFamilyProperties2KHR( static_cast( m_physicalDevice ), &queueFamilyPropertyCount, nullptr ); structureChains.resize( queueFamilyPropertyCount ); queueFamilyProperties.resize( queueFamilyPropertyCount ); for ( uint32_t i = 0; i < queueFamilyPropertyCount; i++ ) { queueFamilyProperties[i].pNext = structureChains[i].template get().pNext; } getDispatcher()->vkGetPhysicalDeviceQueueFamilyProperties2KHR( static_cast( m_physicalDevice ), &queueFamilyPropertyCount, reinterpret_cast( queueFamilyProperties.data() ) ); VULKAN_HPP_ASSERT( queueFamilyPropertyCount <= queueFamilyProperties.size() ); if ( queueFamilyPropertyCount < queueFamilyProperties.size() ) { structureChains.resize( queueFamilyPropertyCount ); } for ( uint32_t i = 0; i < queueFamilyPropertyCount; i++ ) { structureChains[i].template get() = queueFamilyProperties[i]; } return structureChains; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties2 PhysicalDevice::getMemoryProperties2KHR() const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceMemoryProperties2KHR && "Function requires or " ); VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties2 memoryProperties; getDispatcher()->vkGetPhysicalDeviceMemoryProperties2KHR( static_cast( m_physicalDevice ), reinterpret_cast( &memoryProperties ) ); return memoryProperties; } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::StructureChain PhysicalDevice::getMemoryProperties2KHR() const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceMemoryProperties2KHR && "Function requires or " ); VULKAN_HPP_NAMESPACE::StructureChain structureChain; VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties2 & memoryProperties = structureChain.template get(); getDispatcher()->vkGetPhysicalDeviceMemoryProperties2KHR( static_cast( m_physicalDevice ), reinterpret_cast( &memoryProperties ) ); return structureChain; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector PhysicalDevice::getSparseImageFormatProperties2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSparseImageFormatInfo2 & formatInfo ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceSparseImageFormatProperties2KHR && "Function requires or " ); std::vector properties; uint32_t propertyCount; getDispatcher()->vkGetPhysicalDeviceSparseImageFormatProperties2KHR( static_cast( m_physicalDevice ), reinterpret_cast( &formatInfo ), &propertyCount, nullptr ); properties.resize( propertyCount ); getDispatcher()->vkGetPhysicalDeviceSparseImageFormatProperties2KHR( static_cast( m_physicalDevice ), reinterpret_cast( &formatInfo ), &propertyCount, reinterpret_cast( properties.data() ) ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } return properties; } //=== VK_KHR_device_group === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::PeerMemoryFeatureFlags Device::getGroupPeerMemoryFeaturesKHR( uint32_t heapIndex, uint32_t localDeviceIndex, uint32_t remoteDeviceIndex ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetDeviceGroupPeerMemoryFeaturesKHR && "Function requires or " ); VULKAN_HPP_NAMESPACE::PeerMemoryFeatureFlags peerMemoryFeatures; getDispatcher()->vkGetDeviceGroupPeerMemoryFeaturesKHR( static_cast( m_device ), heapIndex, localDeviceIndex, remoteDeviceIndex, reinterpret_cast( &peerMemoryFeatures ) ); return peerMemoryFeatures; } VULKAN_HPP_INLINE void CommandBuffer::setDeviceMaskKHR( uint32_t deviceMask ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetDeviceMaskKHR && "Function requires or " ); getDispatcher()->vkCmdSetDeviceMaskKHR( static_cast( m_commandBuffer ), deviceMask ); } VULKAN_HPP_INLINE void CommandBuffer::dispatchBaseKHR( uint32_t baseGroupX, uint32_t baseGroupY, uint32_t baseGroupZ, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdDispatchBaseKHR && "Function requires or " ); getDispatcher()->vkCmdDispatchBaseKHR( static_cast( m_commandBuffer ), baseGroupX, baseGroupY, baseGroupZ, groupCountX, groupCountY, groupCountZ ); } # if defined( VK_USE_PLATFORM_VI_NN ) //=== VK_NN_vi_surface === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type Instance::createViSurfaceNN( VULKAN_HPP_NAMESPACE::ViSurfaceCreateInfoNN const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { VULKAN_HPP_NAMESPACE::SurfaceKHR surface; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateViSurfaceNN( static_cast( m_instance ), reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { # if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) return VULKAN_HPP_UNEXPECTED( result ); # else VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Instance::createViSurfaceNN" ); # endif } return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR( *this, *reinterpret_cast( &surface ), allocator ); } # endif /*VK_USE_PLATFORM_VI_NN*/ //=== VK_KHR_maintenance1 === VULKAN_HPP_INLINE void CommandPool::trimKHR( VULKAN_HPP_NAMESPACE::CommandPoolTrimFlags flags ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkTrimCommandPoolKHR && "Function requires or " ); getDispatcher()->vkTrimCommandPoolKHR( static_cast( m_device ), static_cast( m_commandPool ), static_cast( flags ) ); } //=== VK_KHR_device_group_creation === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector Instance::enumeratePhysicalDeviceGroupsKHR() const { VULKAN_HPP_ASSERT( getDispatcher()->vkEnumeratePhysicalDeviceGroupsKHR && "Function requires or " ); std::vector physicalDeviceGroupProperties; uint32_t physicalDeviceGroupCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( getDispatcher()->vkEnumeratePhysicalDeviceGroupsKHR( static_cast( m_instance ), &physicalDeviceGroupCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && physicalDeviceGroupCount ) { physicalDeviceGroupProperties.resize( physicalDeviceGroupCount ); result = static_cast( getDispatcher()->vkEnumeratePhysicalDeviceGroupsKHR( static_cast( m_instance ), &physicalDeviceGroupCount, reinterpret_cast( physicalDeviceGroupProperties.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Instance::enumeratePhysicalDeviceGroupsKHR" ); VULKAN_HPP_ASSERT( physicalDeviceGroupCount <= physicalDeviceGroupProperties.size() ); if ( physicalDeviceGroupCount < physicalDeviceGroupProperties.size() ) { physicalDeviceGroupProperties.resize( physicalDeviceGroupCount ); } return physicalDeviceGroupProperties; } //=== VK_KHR_external_memory_capabilities === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::ExternalBufferProperties PhysicalDevice::getExternalBufferPropertiesKHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalBufferInfo & externalBufferInfo ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceExternalBufferPropertiesKHR && "Function requires or " ); VULKAN_HPP_NAMESPACE::ExternalBufferProperties externalBufferProperties; getDispatcher()->vkGetPhysicalDeviceExternalBufferPropertiesKHR( static_cast( m_physicalDevice ), reinterpret_cast( &externalBufferInfo ), reinterpret_cast( &externalBufferProperties ) ); return externalBufferProperties; } # if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_KHR_external_memory_win32 === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE HANDLE Device::getMemoryWin32HandleKHR( const VULKAN_HPP_NAMESPACE::MemoryGetWin32HandleInfoKHR & getWin32HandleInfo ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetMemoryWin32HandleKHR && "Function requires " ); HANDLE handle; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetMemoryWin32HandleKHR( static_cast( m_device ), reinterpret_cast( &getWin32HandleInfo ), &handle ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryWin32HandleKHR" ); return handle; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MemoryWin32HandlePropertiesKHR Device::getMemoryWin32HandlePropertiesKHR( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType, HANDLE handle ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetMemoryWin32HandlePropertiesKHR && "Function requires " ); VULKAN_HPP_NAMESPACE::MemoryWin32HandlePropertiesKHR memoryWin32HandleProperties; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetMemoryWin32HandlePropertiesKHR( static_cast( m_device ), static_cast( handleType ), handle, reinterpret_cast( &memoryWin32HandleProperties ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryWin32HandlePropertiesKHR" ); return memoryWin32HandleProperties; } # endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_KHR_external_memory_fd === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE int Device::getMemoryFdKHR( const VULKAN_HPP_NAMESPACE::MemoryGetFdInfoKHR & getFdInfo ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetMemoryFdKHR && "Function requires " ); int fd; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetMemoryFdKHR( static_cast( m_device ), reinterpret_cast( &getFdInfo ), &fd ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryFdKHR" ); return fd; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MemoryFdPropertiesKHR Device::getMemoryFdPropertiesKHR( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType, int fd ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetMemoryFdPropertiesKHR && "Function requires " ); VULKAN_HPP_NAMESPACE::MemoryFdPropertiesKHR memoryFdProperties; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetMemoryFdPropertiesKHR( static_cast( m_device ), static_cast( handleType ), fd, reinterpret_cast( &memoryFdProperties ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryFdPropertiesKHR" ); return memoryFdProperties; } //=== VK_KHR_external_semaphore_capabilities === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::ExternalSemaphoreProperties PhysicalDevice::getExternalSemaphorePropertiesKHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalSemaphoreInfo & externalSemaphoreInfo ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceExternalSemaphorePropertiesKHR && "Function requires or " ); VULKAN_HPP_NAMESPACE::ExternalSemaphoreProperties externalSemaphoreProperties; getDispatcher()->vkGetPhysicalDeviceExternalSemaphorePropertiesKHR( static_cast( m_physicalDevice ), reinterpret_cast( &externalSemaphoreInfo ), reinterpret_cast( &externalSemaphoreProperties ) ); return externalSemaphoreProperties; } # if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_KHR_external_semaphore_win32 === VULKAN_HPP_INLINE void Device::importSemaphoreWin32HandleKHR( const VULKAN_HPP_NAMESPACE::ImportSemaphoreWin32HandleInfoKHR & importSemaphoreWin32HandleInfo ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkImportSemaphoreWin32HandleKHR && "Function requires " ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkImportSemaphoreWin32HandleKHR( static_cast( m_device ), reinterpret_cast( &importSemaphoreWin32HandleInfo ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::importSemaphoreWin32HandleKHR" ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE HANDLE Device::getSemaphoreWin32HandleKHR( const VULKAN_HPP_NAMESPACE::SemaphoreGetWin32HandleInfoKHR & getWin32HandleInfo ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetSemaphoreWin32HandleKHR && "Function requires " ); HANDLE handle; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetSemaphoreWin32HandleKHR( static_cast( m_device ), reinterpret_cast( &getWin32HandleInfo ), &handle ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getSemaphoreWin32HandleKHR" ); return handle; } # endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_KHR_external_semaphore_fd === VULKAN_HPP_INLINE void Device::importSemaphoreFdKHR( const VULKAN_HPP_NAMESPACE::ImportSemaphoreFdInfoKHR & importSemaphoreFdInfo ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkImportSemaphoreFdKHR && "Function requires " ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkImportSemaphoreFdKHR( static_cast( m_device ), reinterpret_cast( &importSemaphoreFdInfo ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::importSemaphoreFdKHR" ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE int Device::getSemaphoreFdKHR( const VULKAN_HPP_NAMESPACE::SemaphoreGetFdInfoKHR & getFdInfo ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetSemaphoreFdKHR && "Function requires " ); int fd; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetSemaphoreFdKHR( static_cast( m_device ), reinterpret_cast( &getFdInfo ), &fd ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getSemaphoreFdKHR" ); return fd; } //=== VK_KHR_push_descriptor === VULKAN_HPP_INLINE void CommandBuffer::pushDescriptorSetKHR( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint, VULKAN_HPP_NAMESPACE::PipelineLayout layout, uint32_t set, VULKAN_HPP_NAMESPACE::ArrayProxy const & descriptorWrites ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdPushDescriptorSetKHR && "Function requires or " ); getDispatcher()->vkCmdPushDescriptorSetKHR( static_cast( m_commandBuffer ), static_cast( pipelineBindPoint ), static_cast( layout ), set, descriptorWrites.size(), reinterpret_cast( descriptorWrites.data() ) ); } template VULKAN_HPP_INLINE void CommandBuffer::pushDescriptorSetWithTemplateKHR( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate, VULKAN_HPP_NAMESPACE::PipelineLayout layout, uint32_t set, DataType const & data ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdPushDescriptorSetWithTemplateKHR && "Function requires or or " ); getDispatcher()->vkCmdPushDescriptorSetWithTemplateKHR( static_cast( m_commandBuffer ), static_cast( descriptorUpdateTemplate ), static_cast( layout ), set, reinterpret_cast( &data ) ); } //=== VK_EXT_conditional_rendering === VULKAN_HPP_INLINE void CommandBuffer::beginConditionalRenderingEXT( const VULKAN_HPP_NAMESPACE::ConditionalRenderingBeginInfoEXT & conditionalRenderingBegin ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdBeginConditionalRenderingEXT && "Function requires " ); getDispatcher()->vkCmdBeginConditionalRenderingEXT( static_cast( m_commandBuffer ), reinterpret_cast( &conditionalRenderingBegin ) ); } VULKAN_HPP_INLINE void CommandBuffer::endConditionalRenderingEXT() const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdEndConditionalRenderingEXT && "Function requires " ); getDispatcher()->vkCmdEndConditionalRenderingEXT( static_cast( m_commandBuffer ) ); } //=== VK_KHR_descriptor_update_template === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type Device::createDescriptorUpdateTemplateKHR( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateDescriptorUpdateTemplateKHR( static_cast( m_device ), reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &descriptorUpdateTemplate ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { # if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) return VULKAN_HPP_UNEXPECTED( result ); # else VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createDescriptorUpdateTemplateKHR" ); # endif } return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DescriptorUpdateTemplate( *this, *reinterpret_cast( &descriptorUpdateTemplate ), allocator ); } VULKAN_HPP_INLINE void Device::destroyDescriptorUpdateTemplateKHR( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate, Optional allocator ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkDestroyDescriptorUpdateTemplateKHR && "Function requires or " ); getDispatcher()->vkDestroyDescriptorUpdateTemplateKHR( static_cast( m_device ), static_cast( descriptorUpdateTemplate ), reinterpret_cast( static_cast( allocator ) ) ); } template VULKAN_HPP_INLINE void DescriptorSet::updateWithTemplateKHR( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate, DataType const & data ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkUpdateDescriptorSetWithTemplateKHR && "Function requires or " ); getDispatcher()->vkUpdateDescriptorSetWithTemplateKHR( static_cast( m_device ), static_cast( m_descriptorSet ), static_cast( descriptorUpdateTemplate ), reinterpret_cast( &data ) ); } //=== VK_NV_clip_space_w_scaling === VULKAN_HPP_INLINE void CommandBuffer::setViewportWScalingNV( uint32_t firstViewport, VULKAN_HPP_NAMESPACE::ArrayProxy const & viewportWScalings ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetViewportWScalingNV && "Function requires " ); getDispatcher()->vkCmdSetViewportWScalingNV( static_cast( m_commandBuffer ), firstViewport, viewportWScalings.size(), reinterpret_cast( viewportWScalings.data() ) ); } # if defined( VK_USE_PLATFORM_XLIB_XRANDR_EXT ) //=== VK_EXT_acquire_xlib_display === VULKAN_HPP_INLINE void PhysicalDevice::acquireXlibDisplayEXT( Display & dpy, VULKAN_HPP_NAMESPACE::DisplayKHR display ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkAcquireXlibDisplayEXT && "Function requires " ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkAcquireXlibDisplayEXT( static_cast( m_physicalDevice ), &dpy, static_cast( display ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::acquireXlibDisplayEXT" ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type PhysicalDevice::getRandROutputDisplayEXT( Display & dpy, RROutput rrOutput ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { VULKAN_HPP_NAMESPACE::DisplayKHR display; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetRandROutputDisplayEXT( static_cast( m_physicalDevice ), &dpy, rrOutput, reinterpret_cast( &display ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { # if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) return VULKAN_HPP_UNEXPECTED( result ); # else VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "PhysicalDevice::getRandROutputDisplayEXT" ); # endif } return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DisplayKHR( *this, *reinterpret_cast( &display ) ); } # endif /*VK_USE_PLATFORM_XLIB_XRANDR_EXT*/ //=== VK_EXT_display_surface_counter === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::SurfaceCapabilities2EXT PhysicalDevice::getSurfaceCapabilities2EXT( VULKAN_HPP_NAMESPACE::SurfaceKHR surface ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceSurfaceCapabilities2EXT && "Function requires " ); VULKAN_HPP_NAMESPACE::SurfaceCapabilities2EXT surfaceCapabilities; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetPhysicalDeviceSurfaceCapabilities2EXT( static_cast( m_physicalDevice ), static_cast( surface ), reinterpret_cast( &surfaceCapabilities ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceCapabilities2EXT" ); return surfaceCapabilities; } //=== VK_EXT_display_control === VULKAN_HPP_INLINE void Device::displayPowerControlEXT( VULKAN_HPP_NAMESPACE::DisplayKHR display, const VULKAN_HPP_NAMESPACE::DisplayPowerInfoEXT & displayPowerInfo ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkDisplayPowerControlEXT && "Function requires " ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkDisplayPowerControlEXT( static_cast( m_device ), static_cast( display ), reinterpret_cast( &displayPowerInfo ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::displayPowerControlEXT" ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type Device::registerEventEXT( VULKAN_HPP_NAMESPACE::DeviceEventInfoEXT const & deviceEventInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { VULKAN_HPP_NAMESPACE::Fence fence; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkRegisterDeviceEventEXT( static_cast( m_device ), reinterpret_cast( &deviceEventInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &fence ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { # if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) return VULKAN_HPP_UNEXPECTED( result ); # else VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::registerEventEXT" ); # endif } return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Fence( *this, *reinterpret_cast( &fence ), allocator ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type Device::registerDisplayEventEXT( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DisplayKHR const & display, VULKAN_HPP_NAMESPACE::DisplayEventInfoEXT const & displayEventInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { VULKAN_HPP_NAMESPACE::Fence fence; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkRegisterDisplayEventEXT( static_cast( m_device ), static_cast( *display ), reinterpret_cast( &displayEventInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &fence ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { # if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) return VULKAN_HPP_UNEXPECTED( result ); # else VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::registerDisplayEventEXT" ); # endif } return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Fence( *this, *reinterpret_cast( &fence ), allocator ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE uint64_t SwapchainKHR::getCounterEXT( VULKAN_HPP_NAMESPACE::SurfaceCounterFlagBitsEXT counter ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetSwapchainCounterEXT && "Function requires " ); uint64_t counterValue; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetSwapchainCounterEXT( static_cast( m_device ), static_cast( m_swapchain ), static_cast( counter ), &counterValue ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::SwapchainKHR::getCounterEXT" ); return counterValue; } //=== VK_GOOGLE_display_timing === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::RefreshCycleDurationGOOGLE SwapchainKHR::getRefreshCycleDurationGOOGLE() const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetRefreshCycleDurationGOOGLE && "Function requires " ); VULKAN_HPP_NAMESPACE::RefreshCycleDurationGOOGLE displayTimingProperties; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetRefreshCycleDurationGOOGLE( static_cast( m_device ), static_cast( m_swapchain ), reinterpret_cast( &displayTimingProperties ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::SwapchainKHR::getRefreshCycleDurationGOOGLE" ); return displayTimingProperties; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector SwapchainKHR::getPastPresentationTimingGOOGLE() const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPastPresentationTimingGOOGLE && "Function requires " ); std::vector presentationTimings; uint32_t presentationTimingCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( getDispatcher()->vkGetPastPresentationTimingGOOGLE( static_cast( m_device ), static_cast( m_swapchain ), &presentationTimingCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && presentationTimingCount ) { presentationTimings.resize( presentationTimingCount ); result = static_cast( getDispatcher()->vkGetPastPresentationTimingGOOGLE( static_cast( m_device ), static_cast( m_swapchain ), &presentationTimingCount, reinterpret_cast( presentationTimings.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::SwapchainKHR::getPastPresentationTimingGOOGLE" ); VULKAN_HPP_ASSERT( presentationTimingCount <= presentationTimings.size() ); if ( presentationTimingCount < presentationTimings.size() ) { presentationTimings.resize( presentationTimingCount ); } return presentationTimings; } //=== VK_EXT_discard_rectangles === VULKAN_HPP_INLINE void CommandBuffer::setDiscardRectangleEXT( uint32_t firstDiscardRectangle, VULKAN_HPP_NAMESPACE::ArrayProxy const & discardRectangles ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetDiscardRectangleEXT && "Function requires " ); getDispatcher()->vkCmdSetDiscardRectangleEXT( static_cast( m_commandBuffer ), firstDiscardRectangle, discardRectangles.size(), reinterpret_cast( discardRectangles.data() ) ); } VULKAN_HPP_INLINE void CommandBuffer::setDiscardRectangleEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 discardRectangleEnable ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetDiscardRectangleEnableEXT && "Function requires " ); getDispatcher()->vkCmdSetDiscardRectangleEnableEXT( static_cast( m_commandBuffer ), static_cast( discardRectangleEnable ) ); } VULKAN_HPP_INLINE void CommandBuffer::setDiscardRectangleModeEXT( VULKAN_HPP_NAMESPACE::DiscardRectangleModeEXT discardRectangleMode ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetDiscardRectangleModeEXT && "Function requires " ); getDispatcher()->vkCmdSetDiscardRectangleModeEXT( static_cast( m_commandBuffer ), static_cast( discardRectangleMode ) ); } //=== VK_EXT_hdr_metadata === VULKAN_HPP_INLINE void Device::setHdrMetadataEXT( VULKAN_HPP_NAMESPACE::ArrayProxy const & swapchains, VULKAN_HPP_NAMESPACE::ArrayProxy const & metadata ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkSetHdrMetadataEXT && "Function requires " ); # ifdef VULKAN_HPP_NO_EXCEPTIONS VULKAN_HPP_ASSERT( swapchains.size() == metadata.size() ); # else if ( swapchains.size() != metadata.size() ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::Device::setHdrMetadataEXT: swapchains.size() != metadata.size()" ); } # endif /*VULKAN_HPP_NO_EXCEPTIONS*/ getDispatcher()->vkSetHdrMetadataEXT( static_cast( m_device ), swapchains.size(), reinterpret_cast( swapchains.data() ), reinterpret_cast( metadata.data() ) ); } //=== VK_KHR_create_renderpass2 === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type Device::createRenderPass2KHR( VULKAN_HPP_NAMESPACE::RenderPassCreateInfo2 const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { VULKAN_HPP_NAMESPACE::RenderPass renderPass; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateRenderPass2KHR( static_cast( m_device ), reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &renderPass ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { # if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) return VULKAN_HPP_UNEXPECTED( result ); # else VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createRenderPass2KHR" ); # endif } return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::RenderPass( *this, *reinterpret_cast( &renderPass ), allocator ); } VULKAN_HPP_INLINE void CommandBuffer::beginRenderPass2KHR( const VULKAN_HPP_NAMESPACE::RenderPassBeginInfo & renderPassBegin, const VULKAN_HPP_NAMESPACE::SubpassBeginInfo & subpassBeginInfo ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdBeginRenderPass2KHR && "Function requires or " ); getDispatcher()->vkCmdBeginRenderPass2KHR( static_cast( m_commandBuffer ), reinterpret_cast( &renderPassBegin ), reinterpret_cast( &subpassBeginInfo ) ); } VULKAN_HPP_INLINE void CommandBuffer::nextSubpass2KHR( const VULKAN_HPP_NAMESPACE::SubpassBeginInfo & subpassBeginInfo, const VULKAN_HPP_NAMESPACE::SubpassEndInfo & subpassEndInfo ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdNextSubpass2KHR && "Function requires or " ); getDispatcher()->vkCmdNextSubpass2KHR( static_cast( m_commandBuffer ), reinterpret_cast( &subpassBeginInfo ), reinterpret_cast( &subpassEndInfo ) ); } VULKAN_HPP_INLINE void CommandBuffer::endRenderPass2KHR( const VULKAN_HPP_NAMESPACE::SubpassEndInfo & subpassEndInfo ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdEndRenderPass2KHR && "Function requires or " ); getDispatcher()->vkCmdEndRenderPass2KHR( static_cast( m_commandBuffer ), reinterpret_cast( &subpassEndInfo ) ); } //=== VK_KHR_shared_presentable_image === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result SwapchainKHR::getStatus() const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetSwapchainStatusKHR && "Function requires " ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetSwapchainStatusKHR( static_cast( m_device ), static_cast( m_swapchain ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::SwapchainKHR::getStatus", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eSuboptimalKHR } ); return static_cast( result ); } //=== VK_KHR_external_fence_capabilities === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::ExternalFenceProperties PhysicalDevice::getExternalFencePropertiesKHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalFenceInfo & externalFenceInfo ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceExternalFencePropertiesKHR && "Function requires or " ); VULKAN_HPP_NAMESPACE::ExternalFenceProperties externalFenceProperties; getDispatcher()->vkGetPhysicalDeviceExternalFencePropertiesKHR( static_cast( m_physicalDevice ), reinterpret_cast( &externalFenceInfo ), reinterpret_cast( &externalFenceProperties ) ); return externalFenceProperties; } # if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_KHR_external_fence_win32 === VULKAN_HPP_INLINE void Device::importFenceWin32HandleKHR( const VULKAN_HPP_NAMESPACE::ImportFenceWin32HandleInfoKHR & importFenceWin32HandleInfo ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkImportFenceWin32HandleKHR && "Function requires " ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkImportFenceWin32HandleKHR( static_cast( m_device ), reinterpret_cast( &importFenceWin32HandleInfo ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::importFenceWin32HandleKHR" ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE HANDLE Device::getFenceWin32HandleKHR( const VULKAN_HPP_NAMESPACE::FenceGetWin32HandleInfoKHR & getWin32HandleInfo ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetFenceWin32HandleKHR && "Function requires " ); HANDLE handle; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetFenceWin32HandleKHR( static_cast( m_device ), reinterpret_cast( &getWin32HandleInfo ), &handle ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getFenceWin32HandleKHR" ); return handle; } # endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_KHR_external_fence_fd === VULKAN_HPP_INLINE void Device::importFenceFdKHR( const VULKAN_HPP_NAMESPACE::ImportFenceFdInfoKHR & importFenceFdInfo ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkImportFenceFdKHR && "Function requires " ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkImportFenceFdKHR( static_cast( m_device ), reinterpret_cast( &importFenceFdInfo ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::importFenceFdKHR" ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE int Device::getFenceFdKHR( const VULKAN_HPP_NAMESPACE::FenceGetFdInfoKHR & getFdInfo ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetFenceFdKHR && "Function requires " ); int fd; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetFenceFdKHR( static_cast( m_device ), reinterpret_cast( &getFdInfo ), &fd ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getFenceFdKHR" ); return fd; } //=== VK_KHR_performance_query === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::pair, std::vector> PhysicalDevice::enumerateQueueFamilyPerformanceQueryCountersKHR( uint32_t queueFamilyIndex ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR && "Function requires " ); std::pair, std::vector> data_; std::vector & counters = data_.first; std::vector & counterDescriptions = data_.second; uint32_t counterCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( getDispatcher()->vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR( static_cast( m_physicalDevice ), queueFamilyIndex, &counterCount, nullptr, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && counterCount ) { counters.resize( counterCount ); counterDescriptions.resize( counterCount ); result = static_cast( getDispatcher()->vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR( static_cast( m_physicalDevice ), queueFamilyIndex, &counterCount, reinterpret_cast( counters.data() ), reinterpret_cast( counterDescriptions.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::enumerateQueueFamilyPerformanceQueryCountersKHR" ); VULKAN_HPP_ASSERT( counterCount <= counters.size() ); if ( counterCount < counters.size() ) { counters.resize( counterCount ); counterDescriptions.resize( counterCount ); } return data_; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE uint32_t PhysicalDevice::getQueueFamilyPerformanceQueryPassesKHR( const VULKAN_HPP_NAMESPACE::QueryPoolPerformanceCreateInfoKHR & performanceQueryCreateInfo ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR && "Function requires " ); uint32_t numPasses; getDispatcher()->vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR( static_cast( m_physicalDevice ), reinterpret_cast( &performanceQueryCreateInfo ), &numPasses ); return numPasses; } VULKAN_HPP_INLINE void Device::acquireProfilingLockKHR( const VULKAN_HPP_NAMESPACE::AcquireProfilingLockInfoKHR & info ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkAcquireProfilingLockKHR && "Function requires " ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkAcquireProfilingLockKHR( static_cast( m_device ), reinterpret_cast( &info ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::acquireProfilingLockKHR" ); } VULKAN_HPP_INLINE void Device::releaseProfilingLockKHR() const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkReleaseProfilingLockKHR && "Function requires " ); getDispatcher()->vkReleaseProfilingLockKHR( static_cast( m_device ) ); } //=== VK_KHR_get_surface_capabilities2 === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::SurfaceCapabilities2KHR PhysicalDevice::getSurfaceCapabilities2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR & surfaceInfo ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceSurfaceCapabilities2KHR && "Function requires " ); VULKAN_HPP_NAMESPACE::SurfaceCapabilities2KHR surfaceCapabilities; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetPhysicalDeviceSurfaceCapabilities2KHR( static_cast( m_physicalDevice ), reinterpret_cast( &surfaceInfo ), reinterpret_cast( &surfaceCapabilities ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceCapabilities2KHR" ); return surfaceCapabilities; } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::StructureChain PhysicalDevice::getSurfaceCapabilities2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR & surfaceInfo ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceSurfaceCapabilities2KHR && "Function requires " ); StructureChain structureChain; VULKAN_HPP_NAMESPACE::SurfaceCapabilities2KHR & surfaceCapabilities = structureChain.template get(); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetPhysicalDeviceSurfaceCapabilities2KHR( static_cast( m_physicalDevice ), reinterpret_cast( &surfaceInfo ), reinterpret_cast( &surfaceCapabilities ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceCapabilities2KHR" ); return structureChain; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector PhysicalDevice::getSurfaceFormats2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR & surfaceInfo ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceSurfaceFormats2KHR && "Function requires " ); std::vector surfaceFormats; uint32_t surfaceFormatCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( getDispatcher()->vkGetPhysicalDeviceSurfaceFormats2KHR( static_cast( m_physicalDevice ), reinterpret_cast( &surfaceInfo ), &surfaceFormatCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && surfaceFormatCount ) { surfaceFormats.resize( surfaceFormatCount ); result = static_cast( getDispatcher()->vkGetPhysicalDeviceSurfaceFormats2KHR( static_cast( m_physicalDevice ), reinterpret_cast( &surfaceInfo ), &surfaceFormatCount, reinterpret_cast( surfaceFormats.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceFormats2KHR" ); VULKAN_HPP_ASSERT( surfaceFormatCount <= surfaceFormats.size() ); if ( surfaceFormatCount < surfaceFormats.size() ) { surfaceFormats.resize( surfaceFormatCount ); } return surfaceFormats; } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector PhysicalDevice::getSurfaceFormats2KHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR & surfaceInfo ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceSurfaceFormats2KHR && "Function requires " ); std::vector structureChains; std::vector surfaceFormats; uint32_t surfaceFormatCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( getDispatcher()->vkGetPhysicalDeviceSurfaceFormats2KHR( static_cast( m_physicalDevice ), reinterpret_cast( &surfaceInfo ), &surfaceFormatCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && surfaceFormatCount ) { structureChains.resize( surfaceFormatCount ); surfaceFormats.resize( surfaceFormatCount ); for ( uint32_t i = 0; i < surfaceFormatCount; i++ ) { surfaceFormats[i].pNext = structureChains[i].template get().pNext; } result = static_cast( getDispatcher()->vkGetPhysicalDeviceSurfaceFormats2KHR( static_cast( m_physicalDevice ), reinterpret_cast( &surfaceInfo ), &surfaceFormatCount, reinterpret_cast( surfaceFormats.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfaceFormats2KHR" ); VULKAN_HPP_ASSERT( surfaceFormatCount <= surfaceFormats.size() ); if ( surfaceFormatCount < surfaceFormats.size() ) { structureChains.resize( surfaceFormatCount ); } for ( uint32_t i = 0; i < surfaceFormatCount; i++ ) { structureChains[i].template get() = surfaceFormats[i]; } return structureChains; } //=== VK_KHR_get_display_properties2 === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector PhysicalDevice::getDisplayProperties2KHR() const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceDisplayProperties2KHR && "Function requires " ); std::vector properties; uint32_t propertyCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( getDispatcher()->vkGetPhysicalDeviceDisplayProperties2KHR( static_cast( m_physicalDevice ), &propertyCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); result = static_cast( getDispatcher()->vkGetPhysicalDeviceDisplayProperties2KHR( static_cast( m_physicalDevice ), &propertyCount, reinterpret_cast( properties.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayProperties2KHR" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } return properties; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector PhysicalDevice::getDisplayPlaneProperties2KHR() const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceDisplayPlaneProperties2KHR && "Function requires " ); std::vector properties; uint32_t propertyCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( getDispatcher()->vkGetPhysicalDeviceDisplayPlaneProperties2KHR( static_cast( m_physicalDevice ), &propertyCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); result = static_cast( getDispatcher()->vkGetPhysicalDeviceDisplayPlaneProperties2KHR( static_cast( m_physicalDevice ), &propertyCount, reinterpret_cast( properties.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPlaneProperties2KHR" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } return properties; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector DisplayKHR::getModeProperties2() const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetDisplayModeProperties2KHR && "Function requires " ); std::vector properties; uint32_t propertyCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( getDispatcher()->vkGetDisplayModeProperties2KHR( static_cast( m_physicalDevice ), static_cast( m_display ), &propertyCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); result = static_cast( getDispatcher()->vkGetDisplayModeProperties2KHR( static_cast( m_physicalDevice ), static_cast( m_display ), &propertyCount, reinterpret_cast( properties.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::DisplayKHR::getModeProperties2" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } return properties; } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector DisplayKHR::getModeProperties2() const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetDisplayModeProperties2KHR && "Function requires " ); std::vector structureChains; std::vector properties; uint32_t propertyCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( getDispatcher()->vkGetDisplayModeProperties2KHR( static_cast( m_physicalDevice ), static_cast( m_display ), &propertyCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { structureChains.resize( propertyCount ); properties.resize( propertyCount ); for ( uint32_t i = 0; i < propertyCount; i++ ) { properties[i].pNext = structureChains[i].template get().pNext; } result = static_cast( getDispatcher()->vkGetDisplayModeProperties2KHR( static_cast( m_physicalDevice ), static_cast( m_display ), &propertyCount, reinterpret_cast( properties.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::DisplayKHR::getModeProperties2" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { structureChains.resize( propertyCount ); } for ( uint32_t i = 0; i < propertyCount; i++ ) { structureChains[i].template get() = properties[i]; } return structureChains; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::DisplayPlaneCapabilities2KHR PhysicalDevice::getDisplayPlaneCapabilities2KHR( const VULKAN_HPP_NAMESPACE::DisplayPlaneInfo2KHR & displayPlaneInfo ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetDisplayPlaneCapabilities2KHR && "Function requires " ); VULKAN_HPP_NAMESPACE::DisplayPlaneCapabilities2KHR capabilities; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetDisplayPlaneCapabilities2KHR( static_cast( m_physicalDevice ), reinterpret_cast( &displayPlaneInfo ), reinterpret_cast( &capabilities ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getDisplayPlaneCapabilities2KHR" ); return capabilities; } # if defined( VK_USE_PLATFORM_IOS_MVK ) //=== VK_MVK_ios_surface === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type Instance::createIOSSurfaceMVK( VULKAN_HPP_NAMESPACE::IOSSurfaceCreateInfoMVK const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { VULKAN_HPP_NAMESPACE::SurfaceKHR surface; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateIOSSurfaceMVK( static_cast( m_instance ), reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { # if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) return VULKAN_HPP_UNEXPECTED( result ); # else VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Instance::createIOSSurfaceMVK" ); # endif } return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR( *this, *reinterpret_cast( &surface ), allocator ); } # endif /*VK_USE_PLATFORM_IOS_MVK*/ # if defined( VK_USE_PLATFORM_MACOS_MVK ) //=== VK_MVK_macos_surface === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type Instance::createMacOSSurfaceMVK( VULKAN_HPP_NAMESPACE::MacOSSurfaceCreateInfoMVK const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { VULKAN_HPP_NAMESPACE::SurfaceKHR surface; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateMacOSSurfaceMVK( static_cast( m_instance ), reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { # if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) return VULKAN_HPP_UNEXPECTED( result ); # else VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Instance::createMacOSSurfaceMVK" ); # endif } return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR( *this, *reinterpret_cast( &surface ), allocator ); } # endif /*VK_USE_PLATFORM_MACOS_MVK*/ //=== VK_EXT_debug_utils === VULKAN_HPP_INLINE void Device::setDebugUtilsObjectNameEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsObjectNameInfoEXT & nameInfo ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkSetDebugUtilsObjectNameEXT && "Function requires " ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkSetDebugUtilsObjectNameEXT( static_cast( m_device ), reinterpret_cast( &nameInfo ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::setDebugUtilsObjectNameEXT" ); } VULKAN_HPP_INLINE void Device::setDebugUtilsObjectTagEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsObjectTagInfoEXT & tagInfo ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkSetDebugUtilsObjectTagEXT && "Function requires " ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkSetDebugUtilsObjectTagEXT( static_cast( m_device ), reinterpret_cast( &tagInfo ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::setDebugUtilsObjectTagEXT" ); } VULKAN_HPP_INLINE void Queue::beginDebugUtilsLabelEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsLabelEXT & labelInfo ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkQueueBeginDebugUtilsLabelEXT && "Function requires " ); getDispatcher()->vkQueueBeginDebugUtilsLabelEXT( static_cast( m_queue ), reinterpret_cast( &labelInfo ) ); } VULKAN_HPP_INLINE void Queue::endDebugUtilsLabelEXT() const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkQueueEndDebugUtilsLabelEXT && "Function requires " ); getDispatcher()->vkQueueEndDebugUtilsLabelEXT( static_cast( m_queue ) ); } VULKAN_HPP_INLINE void Queue::insertDebugUtilsLabelEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsLabelEXT & labelInfo ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkQueueInsertDebugUtilsLabelEXT && "Function requires " ); getDispatcher()->vkQueueInsertDebugUtilsLabelEXT( static_cast( m_queue ), reinterpret_cast( &labelInfo ) ); } VULKAN_HPP_INLINE void CommandBuffer::beginDebugUtilsLabelEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsLabelEXT & labelInfo ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdBeginDebugUtilsLabelEXT && "Function requires " ); getDispatcher()->vkCmdBeginDebugUtilsLabelEXT( static_cast( m_commandBuffer ), reinterpret_cast( &labelInfo ) ); } VULKAN_HPP_INLINE void CommandBuffer::endDebugUtilsLabelEXT() const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdEndDebugUtilsLabelEXT && "Function requires " ); getDispatcher()->vkCmdEndDebugUtilsLabelEXT( static_cast( m_commandBuffer ) ); } VULKAN_HPP_INLINE void CommandBuffer::insertDebugUtilsLabelEXT( const VULKAN_HPP_NAMESPACE::DebugUtilsLabelEXT & labelInfo ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdInsertDebugUtilsLabelEXT && "Function requires " ); getDispatcher()->vkCmdInsertDebugUtilsLabelEXT( static_cast( m_commandBuffer ), reinterpret_cast( &labelInfo ) ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type Instance::createDebugUtilsMessengerEXT( VULKAN_HPP_NAMESPACE::DebugUtilsMessengerCreateInfoEXT const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { VULKAN_HPP_NAMESPACE::DebugUtilsMessengerEXT messenger; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateDebugUtilsMessengerEXT( static_cast( m_instance ), reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &messenger ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { # if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) return VULKAN_HPP_UNEXPECTED( result ); # else VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Instance::createDebugUtilsMessengerEXT" ); # endif } return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DebugUtilsMessengerEXT( *this, *reinterpret_cast( &messenger ), allocator ); } VULKAN_HPP_INLINE void Instance::submitDebugUtilsMessageEXT( VULKAN_HPP_NAMESPACE::DebugUtilsMessageSeverityFlagBitsEXT messageSeverity, VULKAN_HPP_NAMESPACE::DebugUtilsMessageTypeFlagsEXT messageTypes, const VULKAN_HPP_NAMESPACE::DebugUtilsMessengerCallbackDataEXT & callbackData ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkSubmitDebugUtilsMessageEXT && "Function requires " ); getDispatcher()->vkSubmitDebugUtilsMessageEXT( static_cast( m_instance ), static_cast( messageSeverity ), static_cast( messageTypes ), reinterpret_cast( &callbackData ) ); } # if defined( VK_USE_PLATFORM_ANDROID_KHR ) //=== VK_ANDROID_external_memory_android_hardware_buffer === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::AndroidHardwareBufferPropertiesANDROID Device::getAndroidHardwareBufferPropertiesANDROID( const struct AHardwareBuffer & buffer ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetAndroidHardwareBufferPropertiesANDROID && "Function requires " ); VULKAN_HPP_NAMESPACE::AndroidHardwareBufferPropertiesANDROID properties; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetAndroidHardwareBufferPropertiesANDROID( static_cast( m_device ), &buffer, reinterpret_cast( &properties ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getAndroidHardwareBufferPropertiesANDROID" ); return properties; } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::StructureChain Device::getAndroidHardwareBufferPropertiesANDROID( const struct AHardwareBuffer & buffer ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetAndroidHardwareBufferPropertiesANDROID && "Function requires " ); StructureChain structureChain; VULKAN_HPP_NAMESPACE::AndroidHardwareBufferPropertiesANDROID & properties = structureChain.template get(); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetAndroidHardwareBufferPropertiesANDROID( static_cast( m_device ), &buffer, reinterpret_cast( &properties ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getAndroidHardwareBufferPropertiesANDROID" ); return structureChain; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE struct AHardwareBuffer * Device::getMemoryAndroidHardwareBufferANDROID( const VULKAN_HPP_NAMESPACE::MemoryGetAndroidHardwareBufferInfoANDROID & info ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetMemoryAndroidHardwareBufferANDROID && "Function requires " ); struct AHardwareBuffer * buffer; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetMemoryAndroidHardwareBufferANDROID( static_cast( m_device ), reinterpret_cast( &info ), &buffer ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryAndroidHardwareBufferANDROID" ); return buffer; } # endif /*VK_USE_PLATFORM_ANDROID_KHR*/ # if defined( VK_ENABLE_BETA_EXTENSIONS ) //=== VK_AMDX_shader_enqueue === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType>::Type Device::createExecutionGraphPipelinesAMDX( VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, VULKAN_HPP_NAMESPACE::Optional allocator ) const { std::vector pipelines( createInfos.size() ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateExecutionGraphPipelinesAMDX( static_cast( m_device ), pipelineCache ? static_cast( **pipelineCache ) : 0, createInfos.size(), reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( pipelines.data() ) ) ); if ( ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) && ( result != VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT ) ) { # if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) return VULKAN_HPP_UNEXPECTED( result ); # else VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createExecutionGraphPipelinesAMDX" ); # endif } std::vector pipelinesRAII; pipelinesRAII.reserve( pipelines.size() ); for ( auto & pipeline : pipelines ) { pipelinesRAII.emplace_back( *this, *reinterpret_cast( &pipeline ), allocator, result ); } return pipelinesRAII; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type Device::createExecutionGraphPipelineAMDX( VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, VULKAN_HPP_NAMESPACE::ExecutionGraphPipelineCreateInfoAMDX const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { VULKAN_HPP_NAMESPACE::Pipeline pipeline; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateExecutionGraphPipelinesAMDX( static_cast( m_device ), pipelineCache ? static_cast( **pipelineCache ) : 0, 1, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &pipeline ) ) ); if ( ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) && ( result != VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT ) ) { # if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) return VULKAN_HPP_UNEXPECTED( result ); # else VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createExecutionGraphPipelineAMDX" ); # endif } return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Pipeline( *this, *reinterpret_cast( &pipeline ), allocator, result ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::ExecutionGraphPipelineScratchSizeAMDX Pipeline::getExecutionGraphScratchSizeAMDX() const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetExecutionGraphPipelineScratchSizeAMDX && "Function requires " ); VULKAN_HPP_NAMESPACE::ExecutionGraphPipelineScratchSizeAMDX sizeInfo; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetExecutionGraphPipelineScratchSizeAMDX( static_cast( m_device ), static_cast( m_pipeline ), reinterpret_cast( &sizeInfo ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Pipeline::getExecutionGraphScratchSizeAMDX" ); return sizeInfo; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE uint32_t Pipeline::getExecutionGraphNodeIndexAMDX( const VULKAN_HPP_NAMESPACE::PipelineShaderStageNodeCreateInfoAMDX & nodeInfo ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetExecutionGraphPipelineNodeIndexAMDX && "Function requires " ); uint32_t nodeIndex; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetExecutionGraphPipelineNodeIndexAMDX( static_cast( m_device ), static_cast( m_pipeline ), reinterpret_cast( &nodeInfo ), &nodeIndex ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Pipeline::getExecutionGraphNodeIndexAMDX" ); return nodeIndex; } VULKAN_HPP_INLINE void CommandBuffer::initializeGraphScratchMemoryAMDX( VULKAN_HPP_NAMESPACE::Pipeline executionGraph, VULKAN_HPP_NAMESPACE::DeviceAddress scratch, VULKAN_HPP_NAMESPACE::DeviceSize scratchSize ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdInitializeGraphScratchMemoryAMDX && "Function requires " ); getDispatcher()->vkCmdInitializeGraphScratchMemoryAMDX( static_cast( m_commandBuffer ), static_cast( executionGraph ), static_cast( scratch ), static_cast( scratchSize ) ); } VULKAN_HPP_INLINE void CommandBuffer::dispatchGraphAMDX( VULKAN_HPP_NAMESPACE::DeviceAddress scratch, VULKAN_HPP_NAMESPACE::DeviceSize scratchSize, const VULKAN_HPP_NAMESPACE::DispatchGraphCountInfoAMDX & countInfo ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdDispatchGraphAMDX && "Function requires " ); getDispatcher()->vkCmdDispatchGraphAMDX( static_cast( m_commandBuffer ), static_cast( scratch ), static_cast( scratchSize ), reinterpret_cast( &countInfo ) ); } VULKAN_HPP_INLINE void CommandBuffer::dispatchGraphIndirectAMDX( VULKAN_HPP_NAMESPACE::DeviceAddress scratch, VULKAN_HPP_NAMESPACE::DeviceSize scratchSize, const VULKAN_HPP_NAMESPACE::DispatchGraphCountInfoAMDX & countInfo ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdDispatchGraphIndirectAMDX && "Function requires " ); getDispatcher()->vkCmdDispatchGraphIndirectAMDX( static_cast( m_commandBuffer ), static_cast( scratch ), static_cast( scratchSize ), reinterpret_cast( &countInfo ) ); } VULKAN_HPP_INLINE void CommandBuffer::dispatchGraphIndirectCountAMDX( VULKAN_HPP_NAMESPACE::DeviceAddress scratch, VULKAN_HPP_NAMESPACE::DeviceSize scratchSize, VULKAN_HPP_NAMESPACE::DeviceAddress countInfo ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdDispatchGraphIndirectCountAMDX && "Function requires " ); getDispatcher()->vkCmdDispatchGraphIndirectCountAMDX( static_cast( m_commandBuffer ), static_cast( scratch ), static_cast( scratchSize ), static_cast( countInfo ) ); } # endif /*VK_ENABLE_BETA_EXTENSIONS*/ //=== VK_EXT_sample_locations === VULKAN_HPP_INLINE void CommandBuffer::setSampleLocationsEXT( const VULKAN_HPP_NAMESPACE::SampleLocationsInfoEXT & sampleLocationsInfo ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetSampleLocationsEXT && "Function requires " ); getDispatcher()->vkCmdSetSampleLocationsEXT( static_cast( m_commandBuffer ), reinterpret_cast( &sampleLocationsInfo ) ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MultisamplePropertiesEXT PhysicalDevice::getMultisamplePropertiesEXT( VULKAN_HPP_NAMESPACE::SampleCountFlagBits samples ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceMultisamplePropertiesEXT && "Function requires " ); VULKAN_HPP_NAMESPACE::MultisamplePropertiesEXT multisampleProperties; getDispatcher()->vkGetPhysicalDeviceMultisamplePropertiesEXT( static_cast( m_physicalDevice ), static_cast( samples ), reinterpret_cast( &multisampleProperties ) ); return multisampleProperties; } //=== VK_KHR_get_memory_requirements2 === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MemoryRequirements2 Device::getImageMemoryRequirements2KHR( const VULKAN_HPP_NAMESPACE::ImageMemoryRequirementsInfo2 & info ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetImageMemoryRequirements2KHR && "Function requires or " ); VULKAN_HPP_NAMESPACE::MemoryRequirements2 memoryRequirements; getDispatcher()->vkGetImageMemoryRequirements2KHR( static_cast( m_device ), reinterpret_cast( &info ), reinterpret_cast( &memoryRequirements ) ); return memoryRequirements; } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::StructureChain Device::getImageMemoryRequirements2KHR( const VULKAN_HPP_NAMESPACE::ImageMemoryRequirementsInfo2 & info ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetImageMemoryRequirements2KHR && "Function requires or " ); VULKAN_HPP_NAMESPACE::StructureChain structureChain; VULKAN_HPP_NAMESPACE::MemoryRequirements2 & memoryRequirements = structureChain.template get(); getDispatcher()->vkGetImageMemoryRequirements2KHR( static_cast( m_device ), reinterpret_cast( &info ), reinterpret_cast( &memoryRequirements ) ); return structureChain; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MemoryRequirements2 Device::getBufferMemoryRequirements2KHR( const VULKAN_HPP_NAMESPACE::BufferMemoryRequirementsInfo2 & info ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetBufferMemoryRequirements2KHR && "Function requires or " ); VULKAN_HPP_NAMESPACE::MemoryRequirements2 memoryRequirements; getDispatcher()->vkGetBufferMemoryRequirements2KHR( static_cast( m_device ), reinterpret_cast( &info ), reinterpret_cast( &memoryRequirements ) ); return memoryRequirements; } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::StructureChain Device::getBufferMemoryRequirements2KHR( const VULKAN_HPP_NAMESPACE::BufferMemoryRequirementsInfo2 & info ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetBufferMemoryRequirements2KHR && "Function requires or " ); VULKAN_HPP_NAMESPACE::StructureChain structureChain; VULKAN_HPP_NAMESPACE::MemoryRequirements2 & memoryRequirements = structureChain.template get(); getDispatcher()->vkGetBufferMemoryRequirements2KHR( static_cast( m_device ), reinterpret_cast( &info ), reinterpret_cast( &memoryRequirements ) ); return structureChain; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector Device::getImageSparseMemoryRequirements2KHR( const VULKAN_HPP_NAMESPACE::ImageSparseMemoryRequirementsInfo2 & info ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetImageSparseMemoryRequirements2KHR && "Function requires or " ); std::vector sparseMemoryRequirements; uint32_t sparseMemoryRequirementCount; getDispatcher()->vkGetImageSparseMemoryRequirements2KHR( static_cast( m_device ), reinterpret_cast( &info ), &sparseMemoryRequirementCount, nullptr ); sparseMemoryRequirements.resize( sparseMemoryRequirementCount ); getDispatcher()->vkGetImageSparseMemoryRequirements2KHR( static_cast( m_device ), reinterpret_cast( &info ), &sparseMemoryRequirementCount, reinterpret_cast( sparseMemoryRequirements.data() ) ); VULKAN_HPP_ASSERT( sparseMemoryRequirementCount <= sparseMemoryRequirements.size() ); if ( sparseMemoryRequirementCount < sparseMemoryRequirements.size() ) { sparseMemoryRequirements.resize( sparseMemoryRequirementCount ); } return sparseMemoryRequirements; } //=== VK_KHR_acceleration_structure === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type Device::createAccelerationStructureKHR( VULKAN_HPP_NAMESPACE::AccelerationStructureCreateInfoKHR const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { VULKAN_HPP_NAMESPACE::AccelerationStructureKHR accelerationStructure; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateAccelerationStructureKHR( static_cast( m_device ), reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &accelerationStructure ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { # if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) return VULKAN_HPP_UNEXPECTED( result ); # else VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createAccelerationStructureKHR" ); # endif } return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::AccelerationStructureKHR( *this, *reinterpret_cast( &accelerationStructure ), allocator ); } VULKAN_HPP_INLINE void CommandBuffer::buildAccelerationStructuresKHR( VULKAN_HPP_NAMESPACE::ArrayProxy const & infos, VULKAN_HPP_NAMESPACE::ArrayProxy const & pBuildRangeInfos ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdBuildAccelerationStructuresKHR && "Function requires " ); # ifdef VULKAN_HPP_NO_EXCEPTIONS VULKAN_HPP_ASSERT( infos.size() == pBuildRangeInfos.size() ); # else if ( infos.size() != pBuildRangeInfos.size() ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::buildAccelerationStructuresKHR: infos.size() != pBuildRangeInfos.size()" ); } # endif /*VULKAN_HPP_NO_EXCEPTIONS*/ getDispatcher()->vkCmdBuildAccelerationStructuresKHR( static_cast( m_commandBuffer ), infos.size(), reinterpret_cast( infos.data() ), reinterpret_cast( pBuildRangeInfos.data() ) ); } VULKAN_HPP_INLINE void CommandBuffer::buildAccelerationStructuresIndirectKHR( VULKAN_HPP_NAMESPACE::ArrayProxy const & infos, VULKAN_HPP_NAMESPACE::ArrayProxy const & indirectDeviceAddresses, VULKAN_HPP_NAMESPACE::ArrayProxy const & indirectStrides, VULKAN_HPP_NAMESPACE::ArrayProxy const & pMaxPrimitiveCounts ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdBuildAccelerationStructuresIndirectKHR && "Function requires " ); # ifdef VULKAN_HPP_NO_EXCEPTIONS VULKAN_HPP_ASSERT( infos.size() == indirectDeviceAddresses.size() ); VULKAN_HPP_ASSERT( infos.size() == indirectStrides.size() ); VULKAN_HPP_ASSERT( infos.size() == pMaxPrimitiveCounts.size() ); # else if ( infos.size() != indirectDeviceAddresses.size() ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::buildAccelerationStructuresIndirectKHR: infos.size() != indirectDeviceAddresses.size()" ); } if ( infos.size() != indirectStrides.size() ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::buildAccelerationStructuresIndirectKHR: infos.size() != indirectStrides.size()" ); } if ( infos.size() != pMaxPrimitiveCounts.size() ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::buildAccelerationStructuresIndirectKHR: infos.size() != pMaxPrimitiveCounts.size()" ); } # endif /*VULKAN_HPP_NO_EXCEPTIONS*/ getDispatcher()->vkCmdBuildAccelerationStructuresIndirectKHR( static_cast( m_commandBuffer ), infos.size(), reinterpret_cast( infos.data() ), reinterpret_cast( indirectDeviceAddresses.data() ), indirectStrides.data(), pMaxPrimitiveCounts.data() ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Device::buildAccelerationStructuresKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, VULKAN_HPP_NAMESPACE::ArrayProxy const & infos, VULKAN_HPP_NAMESPACE::ArrayProxy const & pBuildRangeInfos ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkBuildAccelerationStructuresKHR && "Function requires " ); # ifdef VULKAN_HPP_NO_EXCEPTIONS VULKAN_HPP_ASSERT( infos.size() == pBuildRangeInfos.size() ); # else if ( infos.size() != pBuildRangeInfos.size() ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::Device::buildAccelerationStructuresKHR: infos.size() != pBuildRangeInfos.size()" ); } # endif /*VULKAN_HPP_NO_EXCEPTIONS*/ VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkBuildAccelerationStructuresKHR( static_cast( m_device ), static_cast( deferredOperation ), infos.size(), reinterpret_cast( infos.data() ), reinterpret_cast( pBuildRangeInfos.data() ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::buildAccelerationStructuresKHR", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eOperationDeferredKHR, VULKAN_HPP_NAMESPACE::Result::eOperationNotDeferredKHR } ); return static_cast( result ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Device::copyAccelerationStructureKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, const VULKAN_HPP_NAMESPACE::CopyAccelerationStructureInfoKHR & info ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkCopyAccelerationStructureKHR && "Function requires " ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCopyAccelerationStructureKHR( static_cast( m_device ), static_cast( deferredOperation ), reinterpret_cast( &info ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::copyAccelerationStructureKHR", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eOperationDeferredKHR, VULKAN_HPP_NAMESPACE::Result::eOperationNotDeferredKHR } ); return static_cast( result ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Device::copyAccelerationStructureToMemoryKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, const VULKAN_HPP_NAMESPACE::CopyAccelerationStructureToMemoryInfoKHR & info ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkCopyAccelerationStructureToMemoryKHR && "Function requires " ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCopyAccelerationStructureToMemoryKHR( static_cast( m_device ), static_cast( deferredOperation ), reinterpret_cast( &info ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::copyAccelerationStructureToMemoryKHR", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eOperationDeferredKHR, VULKAN_HPP_NAMESPACE::Result::eOperationNotDeferredKHR } ); return static_cast( result ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Device::copyMemoryToAccelerationStructureKHR( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, const VULKAN_HPP_NAMESPACE::CopyMemoryToAccelerationStructureInfoKHR & info ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkCopyMemoryToAccelerationStructureKHR && "Function requires " ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCopyMemoryToAccelerationStructureKHR( static_cast( m_device ), static_cast( deferredOperation ), reinterpret_cast( &info ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::copyMemoryToAccelerationStructureKHR", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eOperationDeferredKHR, VULKAN_HPP_NAMESPACE::Result::eOperationNotDeferredKHR } ); return static_cast( result ); } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector Device::writeAccelerationStructuresPropertiesKHR( VULKAN_HPP_NAMESPACE::ArrayProxy const & accelerationStructures, VULKAN_HPP_NAMESPACE::QueryType queryType, size_t dataSize, size_t stride ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkWriteAccelerationStructuresPropertiesKHR && "Function requires " ); VULKAN_HPP_ASSERT( dataSize % sizeof( DataType ) == 0 ); std::vector data( dataSize / sizeof( DataType ) ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkWriteAccelerationStructuresPropertiesKHR( static_cast( m_device ), accelerationStructures.size(), reinterpret_cast( accelerationStructures.data() ), static_cast( queryType ), data.size() * sizeof( DataType ), reinterpret_cast( data.data() ), stride ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::writeAccelerationStructuresPropertiesKHR" ); return data; } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE DataType Device::writeAccelerationStructuresPropertyKHR( VULKAN_HPP_NAMESPACE::ArrayProxy const & accelerationStructures, VULKAN_HPP_NAMESPACE::QueryType queryType, size_t stride ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkWriteAccelerationStructuresPropertiesKHR && "Function requires " ); DataType data; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkWriteAccelerationStructuresPropertiesKHR( static_cast( m_device ), accelerationStructures.size(), reinterpret_cast( accelerationStructures.data() ), static_cast( queryType ), sizeof( DataType ), reinterpret_cast( &data ), stride ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::writeAccelerationStructuresPropertyKHR" ); return data; } VULKAN_HPP_INLINE void CommandBuffer::copyAccelerationStructureKHR( const VULKAN_HPP_NAMESPACE::CopyAccelerationStructureInfoKHR & info ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdCopyAccelerationStructureKHR && "Function requires " ); getDispatcher()->vkCmdCopyAccelerationStructureKHR( static_cast( m_commandBuffer ), reinterpret_cast( &info ) ); } VULKAN_HPP_INLINE void CommandBuffer::copyAccelerationStructureToMemoryKHR( const VULKAN_HPP_NAMESPACE::CopyAccelerationStructureToMemoryInfoKHR & info ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdCopyAccelerationStructureToMemoryKHR && "Function requires " ); getDispatcher()->vkCmdCopyAccelerationStructureToMemoryKHR( static_cast( m_commandBuffer ), reinterpret_cast( &info ) ); } VULKAN_HPP_INLINE void CommandBuffer::copyMemoryToAccelerationStructureKHR( const VULKAN_HPP_NAMESPACE::CopyMemoryToAccelerationStructureInfoKHR & info ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdCopyMemoryToAccelerationStructureKHR && "Function requires " ); getDispatcher()->vkCmdCopyMemoryToAccelerationStructureKHR( static_cast( m_commandBuffer ), reinterpret_cast( &info ) ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::DeviceAddress Device::getAccelerationStructureAddressKHR( const VULKAN_HPP_NAMESPACE::AccelerationStructureDeviceAddressInfoKHR & info ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetAccelerationStructureDeviceAddressKHR && "Function requires " ); VkDeviceAddress result = getDispatcher()->vkGetAccelerationStructureDeviceAddressKHR( static_cast( m_device ), reinterpret_cast( &info ) ); return static_cast( result ); } VULKAN_HPP_INLINE void CommandBuffer::writeAccelerationStructuresPropertiesKHR( VULKAN_HPP_NAMESPACE::ArrayProxy const & accelerationStructures, VULKAN_HPP_NAMESPACE::QueryType queryType, VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t firstQuery ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdWriteAccelerationStructuresPropertiesKHR && "Function requires " ); getDispatcher()->vkCmdWriteAccelerationStructuresPropertiesKHR( static_cast( m_commandBuffer ), accelerationStructures.size(), reinterpret_cast( accelerationStructures.data() ), static_cast( queryType ), static_cast( queryPool ), firstQuery ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::AccelerationStructureCompatibilityKHR Device::getAccelerationStructureCompatibilityKHR( const VULKAN_HPP_NAMESPACE::AccelerationStructureVersionInfoKHR & versionInfo ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetDeviceAccelerationStructureCompatibilityKHR && "Function requires " ); VULKAN_HPP_NAMESPACE::AccelerationStructureCompatibilityKHR compatibility; getDispatcher()->vkGetDeviceAccelerationStructureCompatibilityKHR( static_cast( m_device ), reinterpret_cast( &versionInfo ), reinterpret_cast( &compatibility ) ); return compatibility; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::AccelerationStructureBuildSizesInfoKHR Device::getAccelerationStructureBuildSizesKHR( VULKAN_HPP_NAMESPACE::AccelerationStructureBuildTypeKHR buildType, const VULKAN_HPP_NAMESPACE::AccelerationStructureBuildGeometryInfoKHR & buildInfo, VULKAN_HPP_NAMESPACE::ArrayProxy const & maxPrimitiveCounts ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetAccelerationStructureBuildSizesKHR && "Function requires " ); # ifdef VULKAN_HPP_NO_EXCEPTIONS VULKAN_HPP_ASSERT( maxPrimitiveCounts.size() == buildInfo.geometryCount ); # else if ( maxPrimitiveCounts.size() != buildInfo.geometryCount ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::Device::getAccelerationStructureBuildSizesKHR: maxPrimitiveCounts.size() != buildInfo.geometryCount" ); } # endif /*VULKAN_HPP_NO_EXCEPTIONS*/ VULKAN_HPP_NAMESPACE::AccelerationStructureBuildSizesInfoKHR sizeInfo; getDispatcher()->vkGetAccelerationStructureBuildSizesKHR( static_cast( m_device ), static_cast( buildType ), reinterpret_cast( &buildInfo ), maxPrimitiveCounts.data(), reinterpret_cast( &sizeInfo ) ); return sizeInfo; } //=== VK_KHR_ray_tracing_pipeline === VULKAN_HPP_INLINE void CommandBuffer::traceRaysKHR( const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR & raygenShaderBindingTable, const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR & missShaderBindingTable, const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR & hitShaderBindingTable, const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR & callableShaderBindingTable, uint32_t width, uint32_t height, uint32_t depth ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdTraceRaysKHR && "Function requires " ); getDispatcher()->vkCmdTraceRaysKHR( static_cast( m_commandBuffer ), reinterpret_cast( &raygenShaderBindingTable ), reinterpret_cast( &missShaderBindingTable ), reinterpret_cast( &hitShaderBindingTable ), reinterpret_cast( &callableShaderBindingTable ), width, height, depth ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType>::Type Device::createRayTracingPipelinesKHR( VULKAN_HPP_NAMESPACE::Optional const & deferredOperation, VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, VULKAN_HPP_NAMESPACE::Optional allocator ) const { std::vector pipelines( createInfos.size() ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateRayTracingPipelinesKHR( static_cast( m_device ), deferredOperation ? static_cast( **deferredOperation ) : 0, pipelineCache ? static_cast( **pipelineCache ) : 0, createInfos.size(), reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( pipelines.data() ) ) ); if ( ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) && ( result != VULKAN_HPP_NAMESPACE::Result::eOperationDeferredKHR ) && ( result != VULKAN_HPP_NAMESPACE::Result::eOperationNotDeferredKHR ) && ( result != VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT ) ) { # if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) return VULKAN_HPP_UNEXPECTED( result ); # else VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createRayTracingPipelinesKHR" ); # endif } std::vector pipelinesRAII; pipelinesRAII.reserve( pipelines.size() ); for ( auto & pipeline : pipelines ) { pipelinesRAII.emplace_back( *this, *reinterpret_cast( &pipeline ), allocator, result ); } return pipelinesRAII; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type Device::createRayTracingPipelineKHR( VULKAN_HPP_NAMESPACE::Optional const & deferredOperation, VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, VULKAN_HPP_NAMESPACE::RayTracingPipelineCreateInfoKHR const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { VULKAN_HPP_NAMESPACE::Pipeline pipeline; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateRayTracingPipelinesKHR( static_cast( m_device ), deferredOperation ? static_cast( **deferredOperation ) : 0, pipelineCache ? static_cast( **pipelineCache ) : 0, 1, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &pipeline ) ) ); if ( ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) && ( result != VULKAN_HPP_NAMESPACE::Result::eOperationDeferredKHR ) && ( result != VULKAN_HPP_NAMESPACE::Result::eOperationNotDeferredKHR ) && ( result != VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT ) ) { # if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) return VULKAN_HPP_UNEXPECTED( result ); # else VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createRayTracingPipelineKHR" ); # endif } return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Pipeline( *this, *reinterpret_cast( &pipeline ), allocator, result ); } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector Pipeline::getRayTracingShaderGroupHandlesKHR( uint32_t firstGroup, uint32_t groupCount, size_t dataSize ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetRayTracingShaderGroupHandlesKHR && "Function requires or " ); VULKAN_HPP_ASSERT( dataSize % sizeof( DataType ) == 0 ); std::vector data( dataSize / sizeof( DataType ) ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetRayTracingShaderGroupHandlesKHR( static_cast( m_device ), static_cast( m_pipeline ), firstGroup, groupCount, data.size() * sizeof( DataType ), reinterpret_cast( data.data() ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Pipeline::getRayTracingShaderGroupHandlesKHR" ); return data; } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE DataType Pipeline::getRayTracingShaderGroupHandleKHR( uint32_t firstGroup, uint32_t groupCount ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetRayTracingShaderGroupHandlesKHR && "Function requires or " ); DataType data; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetRayTracingShaderGroupHandlesKHR( static_cast( m_device ), static_cast( m_pipeline ), firstGroup, groupCount, sizeof( DataType ), reinterpret_cast( &data ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Pipeline::getRayTracingShaderGroupHandleKHR" ); return data; } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector Pipeline::getRayTracingCaptureReplayShaderGroupHandlesKHR( uint32_t firstGroup, uint32_t groupCount, size_t dataSize ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetRayTracingCaptureReplayShaderGroupHandlesKHR && "Function requires " ); VULKAN_HPP_ASSERT( dataSize % sizeof( DataType ) == 0 ); std::vector data( dataSize / sizeof( DataType ) ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetRayTracingCaptureReplayShaderGroupHandlesKHR( static_cast( m_device ), static_cast( m_pipeline ), firstGroup, groupCount, data.size() * sizeof( DataType ), reinterpret_cast( data.data() ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Pipeline::getRayTracingCaptureReplayShaderGroupHandlesKHR" ); return data; } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE DataType Pipeline::getRayTracingCaptureReplayShaderGroupHandleKHR( uint32_t firstGroup, uint32_t groupCount ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetRayTracingCaptureReplayShaderGroupHandlesKHR && "Function requires " ); DataType data; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetRayTracingCaptureReplayShaderGroupHandlesKHR( static_cast( m_device ), static_cast( m_pipeline ), firstGroup, groupCount, sizeof( DataType ), reinterpret_cast( &data ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Pipeline::getRayTracingCaptureReplayShaderGroupHandleKHR" ); return data; } VULKAN_HPP_INLINE void CommandBuffer::traceRaysIndirectKHR( const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR & raygenShaderBindingTable, const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR & missShaderBindingTable, const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR & hitShaderBindingTable, const VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR & callableShaderBindingTable, VULKAN_HPP_NAMESPACE::DeviceAddress indirectDeviceAddress ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdTraceRaysIndirectKHR && "Function requires " ); getDispatcher()->vkCmdTraceRaysIndirectKHR( static_cast( m_commandBuffer ), reinterpret_cast( &raygenShaderBindingTable ), reinterpret_cast( &missShaderBindingTable ), reinterpret_cast( &hitShaderBindingTable ), reinterpret_cast( &callableShaderBindingTable ), static_cast( indirectDeviceAddress ) ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::DeviceSize Pipeline::getRayTracingShaderGroupStackSizeKHR( uint32_t group, VULKAN_HPP_NAMESPACE::ShaderGroupShaderKHR groupShader ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetRayTracingShaderGroupStackSizeKHR && "Function requires " ); VkDeviceSize result = getDispatcher()->vkGetRayTracingShaderGroupStackSizeKHR( static_cast( m_device ), static_cast( m_pipeline ), group, static_cast( groupShader ) ); return static_cast( result ); } VULKAN_HPP_INLINE void CommandBuffer::setRayTracingPipelineStackSizeKHR( uint32_t pipelineStackSize ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetRayTracingPipelineStackSizeKHR && "Function requires " ); getDispatcher()->vkCmdSetRayTracingPipelineStackSizeKHR( static_cast( m_commandBuffer ), pipelineStackSize ); } //=== VK_KHR_sampler_ycbcr_conversion === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type Device::createSamplerYcbcrConversionKHR( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversionCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion ycbcrConversion; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateSamplerYcbcrConversionKHR( static_cast( m_device ), reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &ycbcrConversion ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { # if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) return VULKAN_HPP_UNEXPECTED( result ); # else VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createSamplerYcbcrConversionKHR" ); # endif } return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::SamplerYcbcrConversion( *this, *reinterpret_cast( &ycbcrConversion ), allocator ); } VULKAN_HPP_INLINE void Device::destroySamplerYcbcrConversionKHR( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion ycbcrConversion, Optional allocator ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkDestroySamplerYcbcrConversionKHR && "Function requires or " ); getDispatcher()->vkDestroySamplerYcbcrConversionKHR( static_cast( m_device ), static_cast( ycbcrConversion ), reinterpret_cast( static_cast( allocator ) ) ); } //=== VK_KHR_bind_memory2 === VULKAN_HPP_INLINE void Device::bindBufferMemory2KHR( VULKAN_HPP_NAMESPACE::ArrayProxy const & bindInfos ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkBindBufferMemory2KHR && "Function requires or " ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkBindBufferMemory2KHR( static_cast( m_device ), bindInfos.size(), reinterpret_cast( bindInfos.data() ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::bindBufferMemory2KHR" ); } VULKAN_HPP_INLINE void Device::bindImageMemory2KHR( VULKAN_HPP_NAMESPACE::ArrayProxy const & bindInfos ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkBindImageMemory2KHR && "Function requires or " ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkBindImageMemory2KHR( static_cast( m_device ), bindInfos.size(), reinterpret_cast( bindInfos.data() ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::bindImageMemory2KHR" ); } //=== VK_EXT_image_drm_format_modifier === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::ImageDrmFormatModifierPropertiesEXT Image::getDrmFormatModifierPropertiesEXT() const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetImageDrmFormatModifierPropertiesEXT && "Function requires " ); VULKAN_HPP_NAMESPACE::ImageDrmFormatModifierPropertiesEXT properties; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetImageDrmFormatModifierPropertiesEXT( static_cast( m_device ), static_cast( m_image ), reinterpret_cast( &properties ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Image::getDrmFormatModifierPropertiesEXT" ); return properties; } //=== VK_EXT_validation_cache === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type Device::createValidationCacheEXT( VULKAN_HPP_NAMESPACE::ValidationCacheCreateInfoEXT const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { VULKAN_HPP_NAMESPACE::ValidationCacheEXT validationCache; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateValidationCacheEXT( static_cast( m_device ), reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &validationCache ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { # if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) return VULKAN_HPP_UNEXPECTED( result ); # else VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createValidationCacheEXT" ); # endif } return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::ValidationCacheEXT( *this, *reinterpret_cast( &validationCache ), allocator ); } VULKAN_HPP_INLINE void ValidationCacheEXT::merge( VULKAN_HPP_NAMESPACE::ArrayProxy const & srcCaches ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkMergeValidationCachesEXT && "Function requires " ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkMergeValidationCachesEXT( static_cast( m_device ), static_cast( m_validationCache ), srcCaches.size(), reinterpret_cast( srcCaches.data() ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::ValidationCacheEXT::merge" ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector ValidationCacheEXT::getData() const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetValidationCacheDataEXT && "Function requires " ); std::vector data; size_t dataSize; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( getDispatcher()->vkGetValidationCacheDataEXT( static_cast( m_device ), static_cast( m_validationCache ), &dataSize, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && dataSize ) { data.resize( dataSize ); result = static_cast( getDispatcher()->vkGetValidationCacheDataEXT( static_cast( m_device ), static_cast( m_validationCache ), &dataSize, reinterpret_cast( data.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::ValidationCacheEXT::getData" ); VULKAN_HPP_ASSERT( dataSize <= data.size() ); if ( dataSize < data.size() ) { data.resize( dataSize ); } return data; } //=== VK_NV_shading_rate_image === VULKAN_HPP_INLINE void CommandBuffer::bindShadingRateImageNV( VULKAN_HPP_NAMESPACE::ImageView imageView, VULKAN_HPP_NAMESPACE::ImageLayout imageLayout ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdBindShadingRateImageNV && "Function requires " ); getDispatcher()->vkCmdBindShadingRateImageNV( static_cast( m_commandBuffer ), static_cast( imageView ), static_cast( imageLayout ) ); } VULKAN_HPP_INLINE void CommandBuffer::setViewportShadingRatePaletteNV( uint32_t firstViewport, VULKAN_HPP_NAMESPACE::ArrayProxy const & shadingRatePalettes ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetViewportShadingRatePaletteNV && "Function requires " ); getDispatcher()->vkCmdSetViewportShadingRatePaletteNV( static_cast( m_commandBuffer ), firstViewport, shadingRatePalettes.size(), reinterpret_cast( shadingRatePalettes.data() ) ); } VULKAN_HPP_INLINE void CommandBuffer::setCoarseSampleOrderNV( VULKAN_HPP_NAMESPACE::CoarseSampleOrderTypeNV sampleOrderType, VULKAN_HPP_NAMESPACE::ArrayProxy const & customSampleOrders ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetCoarseSampleOrderNV && "Function requires " ); getDispatcher()->vkCmdSetCoarseSampleOrderNV( static_cast( m_commandBuffer ), static_cast( sampleOrderType ), customSampleOrders.size(), reinterpret_cast( customSampleOrders.data() ) ); } //=== VK_NV_ray_tracing === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type Device::createAccelerationStructureNV( VULKAN_HPP_NAMESPACE::AccelerationStructureCreateInfoNV const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { VULKAN_HPP_NAMESPACE::AccelerationStructureNV accelerationStructure; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateAccelerationStructureNV( static_cast( m_device ), reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &accelerationStructure ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { # if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) return VULKAN_HPP_UNEXPECTED( result ); # else VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createAccelerationStructureNV" ); # endif } return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::AccelerationStructureNV( *this, *reinterpret_cast( &accelerationStructure ), allocator ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MemoryRequirements2KHR Device::getAccelerationStructureMemoryRequirementsNV( const VULKAN_HPP_NAMESPACE::AccelerationStructureMemoryRequirementsInfoNV & info ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetAccelerationStructureMemoryRequirementsNV && "Function requires " ); VULKAN_HPP_NAMESPACE::MemoryRequirements2KHR memoryRequirements; getDispatcher()->vkGetAccelerationStructureMemoryRequirementsNV( static_cast( m_device ), reinterpret_cast( &info ), reinterpret_cast( &memoryRequirements ) ); return memoryRequirements; } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::StructureChain Device::getAccelerationStructureMemoryRequirementsNV( const VULKAN_HPP_NAMESPACE::AccelerationStructureMemoryRequirementsInfoNV & info ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetAccelerationStructureMemoryRequirementsNV && "Function requires " ); VULKAN_HPP_NAMESPACE::StructureChain structureChain; VULKAN_HPP_NAMESPACE::MemoryRequirements2KHR & memoryRequirements = structureChain.template get(); getDispatcher()->vkGetAccelerationStructureMemoryRequirementsNV( static_cast( m_device ), reinterpret_cast( &info ), reinterpret_cast( &memoryRequirements ) ); return structureChain; } VULKAN_HPP_INLINE void Device::bindAccelerationStructureMemoryNV( VULKAN_HPP_NAMESPACE::ArrayProxy const & bindInfos ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkBindAccelerationStructureMemoryNV && "Function requires " ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkBindAccelerationStructureMemoryNV( static_cast( m_device ), bindInfos.size(), reinterpret_cast( bindInfos.data() ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::bindAccelerationStructureMemoryNV" ); } VULKAN_HPP_INLINE void CommandBuffer::buildAccelerationStructureNV( const VULKAN_HPP_NAMESPACE::AccelerationStructureInfoNV & info, VULKAN_HPP_NAMESPACE::Buffer instanceData, VULKAN_HPP_NAMESPACE::DeviceSize instanceOffset, VULKAN_HPP_NAMESPACE::Bool32 update, VULKAN_HPP_NAMESPACE::AccelerationStructureNV dst, VULKAN_HPP_NAMESPACE::AccelerationStructureNV src, VULKAN_HPP_NAMESPACE::Buffer scratch, VULKAN_HPP_NAMESPACE::DeviceSize scratchOffset ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdBuildAccelerationStructureNV && "Function requires " ); getDispatcher()->vkCmdBuildAccelerationStructureNV( static_cast( m_commandBuffer ), reinterpret_cast( &info ), static_cast( instanceData ), static_cast( instanceOffset ), static_cast( update ), static_cast( dst ), static_cast( src ), static_cast( scratch ), static_cast( scratchOffset ) ); } VULKAN_HPP_INLINE void CommandBuffer::copyAccelerationStructureNV( VULKAN_HPP_NAMESPACE::AccelerationStructureNV dst, VULKAN_HPP_NAMESPACE::AccelerationStructureNV src, VULKAN_HPP_NAMESPACE::CopyAccelerationStructureModeKHR mode ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdCopyAccelerationStructureNV && "Function requires " ); getDispatcher()->vkCmdCopyAccelerationStructureNV( static_cast( m_commandBuffer ), static_cast( dst ), static_cast( src ), static_cast( mode ) ); } VULKAN_HPP_INLINE void CommandBuffer::traceRaysNV( VULKAN_HPP_NAMESPACE::Buffer raygenShaderBindingTableBuffer, VULKAN_HPP_NAMESPACE::DeviceSize raygenShaderBindingOffset, VULKAN_HPP_NAMESPACE::Buffer missShaderBindingTableBuffer, VULKAN_HPP_NAMESPACE::DeviceSize missShaderBindingOffset, VULKAN_HPP_NAMESPACE::DeviceSize missShaderBindingStride, VULKAN_HPP_NAMESPACE::Buffer hitShaderBindingTableBuffer, VULKAN_HPP_NAMESPACE::DeviceSize hitShaderBindingOffset, VULKAN_HPP_NAMESPACE::DeviceSize hitShaderBindingStride, VULKAN_HPP_NAMESPACE::Buffer callableShaderBindingTableBuffer, VULKAN_HPP_NAMESPACE::DeviceSize callableShaderBindingOffset, VULKAN_HPP_NAMESPACE::DeviceSize callableShaderBindingStride, uint32_t width, uint32_t height, uint32_t depth ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdTraceRaysNV && "Function requires " ); getDispatcher()->vkCmdTraceRaysNV( static_cast( m_commandBuffer ), static_cast( raygenShaderBindingTableBuffer ), static_cast( raygenShaderBindingOffset ), static_cast( missShaderBindingTableBuffer ), static_cast( missShaderBindingOffset ), static_cast( missShaderBindingStride ), static_cast( hitShaderBindingTableBuffer ), static_cast( hitShaderBindingOffset ), static_cast( hitShaderBindingStride ), static_cast( callableShaderBindingTableBuffer ), static_cast( callableShaderBindingOffset ), static_cast( callableShaderBindingStride ), width, height, depth ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType>::Type Device::createRayTracingPipelinesNV( VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, VULKAN_HPP_NAMESPACE::Optional allocator ) const { std::vector pipelines( createInfos.size() ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateRayTracingPipelinesNV( static_cast( m_device ), pipelineCache ? static_cast( **pipelineCache ) : 0, createInfos.size(), reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( pipelines.data() ) ) ); if ( ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) && ( result != VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT ) ) { # if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) return VULKAN_HPP_UNEXPECTED( result ); # else VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createRayTracingPipelinesNV" ); # endif } std::vector pipelinesRAII; pipelinesRAII.reserve( pipelines.size() ); for ( auto & pipeline : pipelines ) { pipelinesRAII.emplace_back( *this, *reinterpret_cast( &pipeline ), allocator, result ); } return pipelinesRAII; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type Device::createRayTracingPipelineNV( VULKAN_HPP_NAMESPACE::Optional const & pipelineCache, VULKAN_HPP_NAMESPACE::RayTracingPipelineCreateInfoNV const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { VULKAN_HPP_NAMESPACE::Pipeline pipeline; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateRayTracingPipelinesNV( static_cast( m_device ), pipelineCache ? static_cast( **pipelineCache ) : 0, 1, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &pipeline ) ) ); if ( ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) && ( result != VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT ) ) { # if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) return VULKAN_HPP_UNEXPECTED( result ); # else VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createRayTracingPipelineNV" ); # endif } return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::Pipeline( *this, *reinterpret_cast( &pipeline ), allocator, result ); } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector Pipeline::getRayTracingShaderGroupHandlesNV( uint32_t firstGroup, uint32_t groupCount, size_t dataSize ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetRayTracingShaderGroupHandlesNV && "Function requires or " ); VULKAN_HPP_ASSERT( dataSize % sizeof( DataType ) == 0 ); std::vector data( dataSize / sizeof( DataType ) ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetRayTracingShaderGroupHandlesNV( static_cast( m_device ), static_cast( m_pipeline ), firstGroup, groupCount, data.size() * sizeof( DataType ), reinterpret_cast( data.data() ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Pipeline::getRayTracingShaderGroupHandlesNV" ); return data; } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE DataType Pipeline::getRayTracingShaderGroupHandleNV( uint32_t firstGroup, uint32_t groupCount ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetRayTracingShaderGroupHandlesNV && "Function requires or " ); DataType data; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetRayTracingShaderGroupHandlesNV( static_cast( m_device ), static_cast( m_pipeline ), firstGroup, groupCount, sizeof( DataType ), reinterpret_cast( &data ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Pipeline::getRayTracingShaderGroupHandleNV" ); return data; } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector AccelerationStructureNV::getHandle( size_t dataSize ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetAccelerationStructureHandleNV && "Function requires " ); VULKAN_HPP_ASSERT( dataSize % sizeof( DataType ) == 0 ); std::vector data( dataSize / sizeof( DataType ) ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetAccelerationStructureHandleNV( static_cast( m_device ), static_cast( m_accelerationStructure ), data.size() * sizeof( DataType ), reinterpret_cast( data.data() ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::AccelerationStructureNV::getHandle" ); return data; } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE DataType AccelerationStructureNV::getHandle() const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetAccelerationStructureHandleNV && "Function requires " ); DataType data; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetAccelerationStructureHandleNV( static_cast( m_device ), static_cast( m_accelerationStructure ), sizeof( DataType ), reinterpret_cast( &data ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::AccelerationStructureNV::getHandle" ); return data; } VULKAN_HPP_INLINE void CommandBuffer::writeAccelerationStructuresPropertiesNV( VULKAN_HPP_NAMESPACE::ArrayProxy const & accelerationStructures, VULKAN_HPP_NAMESPACE::QueryType queryType, VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t firstQuery ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdWriteAccelerationStructuresPropertiesNV && "Function requires " ); getDispatcher()->vkCmdWriteAccelerationStructuresPropertiesNV( static_cast( m_commandBuffer ), accelerationStructures.size(), reinterpret_cast( accelerationStructures.data() ), static_cast( queryType ), static_cast( queryPool ), firstQuery ); } VULKAN_HPP_INLINE void Pipeline::compileDeferredNV( uint32_t shader ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkCompileDeferredNV && "Function requires " ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCompileDeferredNV( static_cast( m_device ), static_cast( m_pipeline ), shader ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Pipeline::compileDeferredNV" ); } //=== VK_KHR_maintenance3 === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::DescriptorSetLayoutSupport Device::getDescriptorSetLayoutSupportKHR( const VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateInfo & createInfo ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetDescriptorSetLayoutSupportKHR && "Function requires or " ); VULKAN_HPP_NAMESPACE::DescriptorSetLayoutSupport support; getDispatcher()->vkGetDescriptorSetLayoutSupportKHR( static_cast( m_device ), reinterpret_cast( &createInfo ), reinterpret_cast( &support ) ); return support; } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::StructureChain Device::getDescriptorSetLayoutSupportKHR( const VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateInfo & createInfo ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetDescriptorSetLayoutSupportKHR && "Function requires or " ); VULKAN_HPP_NAMESPACE::StructureChain structureChain; VULKAN_HPP_NAMESPACE::DescriptorSetLayoutSupport & support = structureChain.template get(); getDispatcher()->vkGetDescriptorSetLayoutSupportKHR( static_cast( m_device ), reinterpret_cast( &createInfo ), reinterpret_cast( &support ) ); return structureChain; } //=== VK_KHR_draw_indirect_count === VULKAN_HPP_INLINE void CommandBuffer::drawIndirectCountKHR( VULKAN_HPP_NAMESPACE::Buffer buffer, VULKAN_HPP_NAMESPACE::DeviceSize offset, VULKAN_HPP_NAMESPACE::Buffer countBuffer, VULKAN_HPP_NAMESPACE::DeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdDrawIndirectCountKHR && "Function requires or or " ); getDispatcher()->vkCmdDrawIndirectCountKHR( static_cast( m_commandBuffer ), static_cast( buffer ), static_cast( offset ), static_cast( countBuffer ), static_cast( countBufferOffset ), maxDrawCount, stride ); } VULKAN_HPP_INLINE void CommandBuffer::drawIndexedIndirectCountKHR( VULKAN_HPP_NAMESPACE::Buffer buffer, VULKAN_HPP_NAMESPACE::DeviceSize offset, VULKAN_HPP_NAMESPACE::Buffer countBuffer, VULKAN_HPP_NAMESPACE::DeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdDrawIndexedIndirectCountKHR && "Function requires or or " ); getDispatcher()->vkCmdDrawIndexedIndirectCountKHR( static_cast( m_commandBuffer ), static_cast( buffer ), static_cast( offset ), static_cast( countBuffer ), static_cast( countBufferOffset ), maxDrawCount, stride ); } //=== VK_EXT_external_memory_host === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MemoryHostPointerPropertiesEXT Device::getMemoryHostPointerPropertiesEXT( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType, const void * pHostPointer ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetMemoryHostPointerPropertiesEXT && "Function requires " ); VULKAN_HPP_NAMESPACE::MemoryHostPointerPropertiesEXT memoryHostPointerProperties; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetMemoryHostPointerPropertiesEXT( static_cast( m_device ), static_cast( handleType ), pHostPointer, reinterpret_cast( &memoryHostPointerProperties ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryHostPointerPropertiesEXT" ); return memoryHostPointerProperties; } //=== VK_AMD_buffer_marker === VULKAN_HPP_INLINE void CommandBuffer::writeBufferMarkerAMD( VULKAN_HPP_NAMESPACE::PipelineStageFlagBits pipelineStage, VULKAN_HPP_NAMESPACE::Buffer dstBuffer, VULKAN_HPP_NAMESPACE::DeviceSize dstOffset, uint32_t marker ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdWriteBufferMarkerAMD && "Function requires " ); getDispatcher()->vkCmdWriteBufferMarkerAMD( static_cast( m_commandBuffer ), static_cast( pipelineStage ), static_cast( dstBuffer ), static_cast( dstOffset ), marker ); } VULKAN_HPP_INLINE void CommandBuffer::writeBufferMarker2AMD( VULKAN_HPP_NAMESPACE::PipelineStageFlags2 stage, VULKAN_HPP_NAMESPACE::Buffer dstBuffer, VULKAN_HPP_NAMESPACE::DeviceSize dstOffset, uint32_t marker ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdWriteBufferMarker2AMD && "Function requires " ); getDispatcher()->vkCmdWriteBufferMarker2AMD( static_cast( m_commandBuffer ), static_cast( stage ), static_cast( dstBuffer ), static_cast( dstOffset ), marker ); } //=== VK_EXT_calibrated_timestamps === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector PhysicalDevice::getCalibrateableTimeDomainsEXT() const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceCalibrateableTimeDomainsEXT && "Function requires or " ); std::vector timeDomains; uint32_t timeDomainCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( getDispatcher()->vkGetPhysicalDeviceCalibrateableTimeDomainsEXT( static_cast( m_physicalDevice ), &timeDomainCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && timeDomainCount ) { timeDomains.resize( timeDomainCount ); result = static_cast( getDispatcher()->vkGetPhysicalDeviceCalibrateableTimeDomainsEXT( static_cast( m_physicalDevice ), &timeDomainCount, reinterpret_cast( timeDomains.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getCalibrateableTimeDomainsEXT" ); VULKAN_HPP_ASSERT( timeDomainCount <= timeDomains.size() ); if ( timeDomainCount < timeDomains.size() ) { timeDomains.resize( timeDomainCount ); } return timeDomains; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::pair, uint64_t> Device::getCalibratedTimestampsEXT( VULKAN_HPP_NAMESPACE::ArrayProxy const & timestampInfos ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetCalibratedTimestampsEXT && "Function requires or " ); std::pair, uint64_t> data_( std::piecewise_construct, std::forward_as_tuple( timestampInfos.size() ), std::forward_as_tuple( 0 ) ); std::vector & timestamps = data_.first; uint64_t & maxDeviation = data_.second; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetCalibratedTimestampsEXT( static_cast( m_device ), timestampInfos.size(), reinterpret_cast( timestampInfos.data() ), timestamps.data(), &maxDeviation ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getCalibratedTimestampsEXT" ); return data_; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::pair Device::getCalibratedTimestampEXT( const VULKAN_HPP_NAMESPACE::CalibratedTimestampInfoKHR & timestampInfo ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetCalibratedTimestampsEXT && "Function requires or " ); std::pair data_; uint64_t & timestamp = data_.first; uint64_t & maxDeviation = data_.second; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetCalibratedTimestampsEXT( static_cast( m_device ), 1, reinterpret_cast( ×tampInfo ), ×tamp, &maxDeviation ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getCalibratedTimestampEXT" ); return data_; } //=== VK_NV_mesh_shader === VULKAN_HPP_INLINE void CommandBuffer::drawMeshTasksNV( uint32_t taskCount, uint32_t firstTask ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdDrawMeshTasksNV && "Function requires " ); getDispatcher()->vkCmdDrawMeshTasksNV( static_cast( m_commandBuffer ), taskCount, firstTask ); } VULKAN_HPP_INLINE void CommandBuffer::drawMeshTasksIndirectNV( VULKAN_HPP_NAMESPACE::Buffer buffer, VULKAN_HPP_NAMESPACE::DeviceSize offset, uint32_t drawCount, uint32_t stride ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdDrawMeshTasksIndirectNV && "Function requires " ); getDispatcher()->vkCmdDrawMeshTasksIndirectNV( static_cast( m_commandBuffer ), static_cast( buffer ), static_cast( offset ), drawCount, stride ); } VULKAN_HPP_INLINE void CommandBuffer::drawMeshTasksIndirectCountNV( VULKAN_HPP_NAMESPACE::Buffer buffer, VULKAN_HPP_NAMESPACE::DeviceSize offset, VULKAN_HPP_NAMESPACE::Buffer countBuffer, VULKAN_HPP_NAMESPACE::DeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdDrawMeshTasksIndirectCountNV && "Function requires " ); getDispatcher()->vkCmdDrawMeshTasksIndirectCountNV( static_cast( m_commandBuffer ), static_cast( buffer ), static_cast( offset ), static_cast( countBuffer ), static_cast( countBufferOffset ), maxDrawCount, stride ); } //=== VK_NV_scissor_exclusive === VULKAN_HPP_INLINE void CommandBuffer::setExclusiveScissorEnableNV( uint32_t firstExclusiveScissor, VULKAN_HPP_NAMESPACE::ArrayProxy const & exclusiveScissorEnables ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetExclusiveScissorEnableNV && "Function requires " ); getDispatcher()->vkCmdSetExclusiveScissorEnableNV( static_cast( m_commandBuffer ), firstExclusiveScissor, exclusiveScissorEnables.size(), reinterpret_cast( exclusiveScissorEnables.data() ) ); } VULKAN_HPP_INLINE void CommandBuffer::setExclusiveScissorNV( uint32_t firstExclusiveScissor, VULKAN_HPP_NAMESPACE::ArrayProxy const & exclusiveScissors ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetExclusiveScissorNV && "Function requires " ); getDispatcher()->vkCmdSetExclusiveScissorNV( static_cast( m_commandBuffer ), firstExclusiveScissor, exclusiveScissors.size(), reinterpret_cast( exclusiveScissors.data() ) ); } //=== VK_NV_device_diagnostic_checkpoints === template VULKAN_HPP_INLINE void CommandBuffer::setCheckpointNV( CheckpointMarkerType const & checkpointMarker ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetCheckpointNV && "Function requires " ); getDispatcher()->vkCmdSetCheckpointNV( static_cast( m_commandBuffer ), reinterpret_cast( &checkpointMarker ) ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector Queue::getCheckpointDataNV() const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetQueueCheckpointDataNV && "Function requires " ); std::vector checkpointData; uint32_t checkpointDataCount; getDispatcher()->vkGetQueueCheckpointDataNV( static_cast( m_queue ), &checkpointDataCount, nullptr ); checkpointData.resize( checkpointDataCount ); getDispatcher()->vkGetQueueCheckpointDataNV( static_cast( m_queue ), &checkpointDataCount, reinterpret_cast( checkpointData.data() ) ); VULKAN_HPP_ASSERT( checkpointDataCount <= checkpointData.size() ); if ( checkpointDataCount < checkpointData.size() ) { checkpointData.resize( checkpointDataCount ); } return checkpointData; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector Queue::getCheckpointData2NV() const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetQueueCheckpointData2NV && "Function requires " ); std::vector checkpointData; uint32_t checkpointDataCount; getDispatcher()->vkGetQueueCheckpointData2NV( static_cast( m_queue ), &checkpointDataCount, nullptr ); checkpointData.resize( checkpointDataCount ); getDispatcher()->vkGetQueueCheckpointData2NV( static_cast( m_queue ), &checkpointDataCount, reinterpret_cast( checkpointData.data() ) ); VULKAN_HPP_ASSERT( checkpointDataCount <= checkpointData.size() ); if ( checkpointDataCount < checkpointData.size() ) { checkpointData.resize( checkpointDataCount ); } return checkpointData; } //=== VK_KHR_timeline_semaphore === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE uint64_t Semaphore::getCounterValueKHR() const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetSemaphoreCounterValueKHR && "Function requires or " ); uint64_t value; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetSemaphoreCounterValueKHR( static_cast( m_device ), static_cast( m_semaphore ), &value ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Semaphore::getCounterValueKHR" ); return value; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Device::waitSemaphoresKHR( const VULKAN_HPP_NAMESPACE::SemaphoreWaitInfo & waitInfo, uint64_t timeout ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkWaitSemaphoresKHR && "Function requires or " ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkWaitSemaphoresKHR( static_cast( m_device ), reinterpret_cast( &waitInfo ), timeout ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::waitSemaphoresKHR", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eTimeout } ); return static_cast( result ); } VULKAN_HPP_INLINE void Device::signalSemaphoreKHR( const VULKAN_HPP_NAMESPACE::SemaphoreSignalInfo & signalInfo ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkSignalSemaphoreKHR && "Function requires or " ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkSignalSemaphoreKHR( static_cast( m_device ), reinterpret_cast( &signalInfo ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::signalSemaphoreKHR" ); } //=== VK_INTEL_performance_query === VULKAN_HPP_INLINE void Device::initializePerformanceApiINTEL( const VULKAN_HPP_NAMESPACE::InitializePerformanceApiInfoINTEL & initializeInfo ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkInitializePerformanceApiINTEL && "Function requires " ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkInitializePerformanceApiINTEL( static_cast( m_device ), reinterpret_cast( &initializeInfo ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::initializePerformanceApiINTEL" ); } VULKAN_HPP_INLINE void Device::uninitializePerformanceApiINTEL() const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkUninitializePerformanceApiINTEL && "Function requires " ); getDispatcher()->vkUninitializePerformanceApiINTEL( static_cast( m_device ) ); } VULKAN_HPP_INLINE void CommandBuffer::setPerformanceMarkerINTEL( const VULKAN_HPP_NAMESPACE::PerformanceMarkerInfoINTEL & markerInfo ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetPerformanceMarkerINTEL && "Function requires " ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCmdSetPerformanceMarkerINTEL( static_cast( m_commandBuffer ), reinterpret_cast( &markerInfo ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::setPerformanceMarkerINTEL" ); } VULKAN_HPP_INLINE void CommandBuffer::setPerformanceStreamMarkerINTEL( const VULKAN_HPP_NAMESPACE::PerformanceStreamMarkerInfoINTEL & markerInfo ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetPerformanceStreamMarkerINTEL && "Function requires " ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCmdSetPerformanceStreamMarkerINTEL( static_cast( m_commandBuffer ), reinterpret_cast( &markerInfo ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::setPerformanceStreamMarkerINTEL" ); } VULKAN_HPP_INLINE void CommandBuffer::setPerformanceOverrideINTEL( const VULKAN_HPP_NAMESPACE::PerformanceOverrideInfoINTEL & overrideInfo ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetPerformanceOverrideINTEL && "Function requires " ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCmdSetPerformanceOverrideINTEL( static_cast( m_commandBuffer ), reinterpret_cast( &overrideInfo ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::setPerformanceOverrideINTEL" ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType< VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::PerformanceConfigurationINTEL>::Type Device::acquirePerformanceConfigurationINTEL( VULKAN_HPP_NAMESPACE::PerformanceConfigurationAcquireInfoINTEL const & acquireInfo ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { VULKAN_HPP_NAMESPACE::PerformanceConfigurationINTEL configuration; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkAcquirePerformanceConfigurationINTEL( static_cast( m_device ), reinterpret_cast( &acquireInfo ), reinterpret_cast( &configuration ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { # if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) return VULKAN_HPP_UNEXPECTED( result ); # else VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::acquirePerformanceConfigurationINTEL" ); # endif } return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::PerformanceConfigurationINTEL( *this, *reinterpret_cast( &configuration ) ); } VULKAN_HPP_INLINE void Queue::setPerformanceConfigurationINTEL( VULKAN_HPP_NAMESPACE::PerformanceConfigurationINTEL configuration ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkQueueSetPerformanceConfigurationINTEL && "Function requires " ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkQueueSetPerformanceConfigurationINTEL( static_cast( m_queue ), static_cast( configuration ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Queue::setPerformanceConfigurationINTEL" ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::PerformanceValueINTEL Device::getPerformanceParameterINTEL( VULKAN_HPP_NAMESPACE::PerformanceParameterTypeINTEL parameter ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPerformanceParameterINTEL && "Function requires " ); VULKAN_HPP_NAMESPACE::PerformanceValueINTEL value; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetPerformanceParameterINTEL( static_cast( m_device ), static_cast( parameter ), reinterpret_cast( &value ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getPerformanceParameterINTEL" ); return value; } //=== VK_AMD_display_native_hdr === VULKAN_HPP_INLINE void SwapchainKHR::setLocalDimmingAMD( VULKAN_HPP_NAMESPACE::Bool32 localDimmingEnable ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkSetLocalDimmingAMD && "Function requires " ); getDispatcher()->vkSetLocalDimmingAMD( static_cast( m_device ), static_cast( m_swapchain ), static_cast( localDimmingEnable ) ); } # if defined( VK_USE_PLATFORM_FUCHSIA ) //=== VK_FUCHSIA_imagepipe_surface === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type Instance::createImagePipeSurfaceFUCHSIA( VULKAN_HPP_NAMESPACE::ImagePipeSurfaceCreateInfoFUCHSIA const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { VULKAN_HPP_NAMESPACE::SurfaceKHR surface; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateImagePipeSurfaceFUCHSIA( static_cast( m_instance ), reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { # if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) return VULKAN_HPP_UNEXPECTED( result ); # else VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Instance::createImagePipeSurfaceFUCHSIA" ); # endif } return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR( *this, *reinterpret_cast( &surface ), allocator ); } # endif /*VK_USE_PLATFORM_FUCHSIA*/ # if defined( VK_USE_PLATFORM_METAL_EXT ) //=== VK_EXT_metal_surface === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type Instance::createMetalSurfaceEXT( VULKAN_HPP_NAMESPACE::MetalSurfaceCreateInfoEXT const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { VULKAN_HPP_NAMESPACE::SurfaceKHR surface; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateMetalSurfaceEXT( static_cast( m_instance ), reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { # if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) return VULKAN_HPP_UNEXPECTED( result ); # else VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Instance::createMetalSurfaceEXT" ); # endif } return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR( *this, *reinterpret_cast( &surface ), allocator ); } # endif /*VK_USE_PLATFORM_METAL_EXT*/ //=== VK_KHR_fragment_shading_rate === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector PhysicalDevice::getFragmentShadingRatesKHR() const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceFragmentShadingRatesKHR && "Function requires " ); std::vector fragmentShadingRates; uint32_t fragmentShadingRateCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( getDispatcher()->vkGetPhysicalDeviceFragmentShadingRatesKHR( static_cast( m_physicalDevice ), &fragmentShadingRateCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && fragmentShadingRateCount ) { fragmentShadingRates.resize( fragmentShadingRateCount ); result = static_cast( getDispatcher()->vkGetPhysicalDeviceFragmentShadingRatesKHR( static_cast( m_physicalDevice ), &fragmentShadingRateCount, reinterpret_cast( fragmentShadingRates.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getFragmentShadingRatesKHR" ); VULKAN_HPP_ASSERT( fragmentShadingRateCount <= fragmentShadingRates.size() ); if ( fragmentShadingRateCount < fragmentShadingRates.size() ) { fragmentShadingRates.resize( fragmentShadingRateCount ); } return fragmentShadingRates; } VULKAN_HPP_INLINE void CommandBuffer::setFragmentShadingRateKHR( const VULKAN_HPP_NAMESPACE::Extent2D & fragmentSize, const VULKAN_HPP_NAMESPACE::FragmentShadingRateCombinerOpKHR combinerOps[2] ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetFragmentShadingRateKHR && "Function requires " ); getDispatcher()->vkCmdSetFragmentShadingRateKHR( static_cast( m_commandBuffer ), reinterpret_cast( &fragmentSize ), reinterpret_cast( combinerOps ) ); } //=== VK_KHR_dynamic_rendering_local_read === VULKAN_HPP_INLINE void CommandBuffer::setRenderingAttachmentLocationsKHR( const VULKAN_HPP_NAMESPACE::RenderingAttachmentLocationInfo & locationInfo ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetRenderingAttachmentLocationsKHR && "Function requires or " ); getDispatcher()->vkCmdSetRenderingAttachmentLocationsKHR( static_cast( m_commandBuffer ), reinterpret_cast( &locationInfo ) ); } VULKAN_HPP_INLINE void CommandBuffer::setRenderingInputAttachmentIndicesKHR( const VULKAN_HPP_NAMESPACE::RenderingInputAttachmentIndexInfo & inputAttachmentIndexInfo ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetRenderingInputAttachmentIndicesKHR && "Function requires or " ); getDispatcher()->vkCmdSetRenderingInputAttachmentIndicesKHR( static_cast( m_commandBuffer ), reinterpret_cast( &inputAttachmentIndexInfo ) ); } //=== VK_EXT_buffer_device_address === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::DeviceAddress Device::getBufferAddressEXT( const VULKAN_HPP_NAMESPACE::BufferDeviceAddressInfo & info ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetBufferDeviceAddressEXT && "Function requires or or " ); VkDeviceAddress result = getDispatcher()->vkGetBufferDeviceAddressEXT( static_cast( m_device ), reinterpret_cast( &info ) ); return static_cast( result ); } //=== VK_EXT_tooling_info === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector PhysicalDevice::getToolPropertiesEXT() const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceToolPropertiesEXT && "Function requires or " ); std::vector toolProperties; uint32_t toolCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( getDispatcher()->vkGetPhysicalDeviceToolPropertiesEXT( static_cast( m_physicalDevice ), &toolCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && toolCount ) { toolProperties.resize( toolCount ); result = static_cast( getDispatcher()->vkGetPhysicalDeviceToolPropertiesEXT( static_cast( m_physicalDevice ), &toolCount, reinterpret_cast( toolProperties.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getToolPropertiesEXT" ); VULKAN_HPP_ASSERT( toolCount <= toolProperties.size() ); if ( toolCount < toolProperties.size() ) { toolProperties.resize( toolCount ); } return toolProperties; } //=== VK_KHR_present_wait === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result SwapchainKHR::waitForPresent( uint64_t presentId, uint64_t timeout ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkWaitForPresentKHR && "Function requires " ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkWaitForPresentKHR( static_cast( m_device ), static_cast( m_swapchain ), presentId, timeout ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::SwapchainKHR::waitForPresent", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eTimeout, VULKAN_HPP_NAMESPACE::Result::eSuboptimalKHR } ); return static_cast( result ); } //=== VK_NV_cooperative_matrix === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector PhysicalDevice::getCooperativeMatrixPropertiesNV() const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceCooperativeMatrixPropertiesNV && "Function requires " ); std::vector properties; uint32_t propertyCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( getDispatcher()->vkGetPhysicalDeviceCooperativeMatrixPropertiesNV( static_cast( m_physicalDevice ), &propertyCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); result = static_cast( getDispatcher()->vkGetPhysicalDeviceCooperativeMatrixPropertiesNV( static_cast( m_physicalDevice ), &propertyCount, reinterpret_cast( properties.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getCooperativeMatrixPropertiesNV" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } return properties; } //=== VK_NV_coverage_reduction_mode === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector PhysicalDevice::getSupportedFramebufferMixedSamplesCombinationsNV() const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV && "Function requires " ); std::vector combinations; uint32_t combinationCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( getDispatcher()->vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV( static_cast( m_physicalDevice ), &combinationCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && combinationCount ) { combinations.resize( combinationCount ); result = static_cast( getDispatcher()->vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV( static_cast( m_physicalDevice ), &combinationCount, reinterpret_cast( combinations.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSupportedFramebufferMixedSamplesCombinationsNV" ); VULKAN_HPP_ASSERT( combinationCount <= combinations.size() ); if ( combinationCount < combinations.size() ) { combinations.resize( combinationCount ); } return combinations; } # if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_EXT_full_screen_exclusive === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector PhysicalDevice::getSurfacePresentModes2EXT( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR & surfaceInfo ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceSurfacePresentModes2EXT && "Function requires " ); std::vector presentModes; uint32_t presentModeCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( getDispatcher()->vkGetPhysicalDeviceSurfacePresentModes2EXT( static_cast( m_physicalDevice ), reinterpret_cast( &surfaceInfo ), &presentModeCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && presentModeCount ) { presentModes.resize( presentModeCount ); result = static_cast( getDispatcher()->vkGetPhysicalDeviceSurfacePresentModes2EXT( static_cast( m_physicalDevice ), reinterpret_cast( &surfaceInfo ), &presentModeCount, reinterpret_cast( presentModes.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getSurfacePresentModes2EXT" ); VULKAN_HPP_ASSERT( presentModeCount <= presentModes.size() ); if ( presentModeCount < presentModes.size() ) { presentModes.resize( presentModeCount ); } return presentModes; } VULKAN_HPP_INLINE void SwapchainKHR::acquireFullScreenExclusiveModeEXT() const { VULKAN_HPP_ASSERT( getDispatcher()->vkAcquireFullScreenExclusiveModeEXT && "Function requires " ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkAcquireFullScreenExclusiveModeEXT( static_cast( m_device ), static_cast( m_swapchain ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::SwapchainKHR::acquireFullScreenExclusiveModeEXT" ); } VULKAN_HPP_INLINE void SwapchainKHR::releaseFullScreenExclusiveModeEXT() const { VULKAN_HPP_ASSERT( getDispatcher()->vkReleaseFullScreenExclusiveModeEXT && "Function requires " ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkReleaseFullScreenExclusiveModeEXT( static_cast( m_device ), static_cast( m_swapchain ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::SwapchainKHR::releaseFullScreenExclusiveModeEXT" ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::DeviceGroupPresentModeFlagsKHR Device::getGroupSurfacePresentModes2EXT( const VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR & surfaceInfo ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetDeviceGroupSurfacePresentModes2EXT && "Function requires " ); VULKAN_HPP_NAMESPACE::DeviceGroupPresentModeFlagsKHR modes; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetDeviceGroupSurfacePresentModes2EXT( static_cast( m_device ), reinterpret_cast( &surfaceInfo ), reinterpret_cast( &modes ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getGroupSurfacePresentModes2EXT" ); return modes; } # endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_EXT_headless_surface === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type Instance::createHeadlessSurfaceEXT( VULKAN_HPP_NAMESPACE::HeadlessSurfaceCreateInfoEXT const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { VULKAN_HPP_NAMESPACE::SurfaceKHR surface; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateHeadlessSurfaceEXT( static_cast( m_instance ), reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { # if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) return VULKAN_HPP_UNEXPECTED( result ); # else VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Instance::createHeadlessSurfaceEXT" ); # endif } return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR( *this, *reinterpret_cast( &surface ), allocator ); } //=== VK_KHR_buffer_device_address === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::DeviceAddress Device::getBufferAddressKHR( const VULKAN_HPP_NAMESPACE::BufferDeviceAddressInfo & info ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetBufferDeviceAddressKHR && "Function requires or or " ); VkDeviceAddress result = getDispatcher()->vkGetBufferDeviceAddressKHR( static_cast( m_device ), reinterpret_cast( &info ) ); return static_cast( result ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE uint64_t Device::getBufferOpaqueCaptureAddressKHR( const VULKAN_HPP_NAMESPACE::BufferDeviceAddressInfo & info ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetBufferOpaqueCaptureAddressKHR && "Function requires or " ); uint64_t result = getDispatcher()->vkGetBufferOpaqueCaptureAddressKHR( static_cast( m_device ), reinterpret_cast( &info ) ); return result; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE uint64_t Device::getMemoryOpaqueCaptureAddressKHR( const VULKAN_HPP_NAMESPACE::DeviceMemoryOpaqueCaptureAddressInfo & info ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetDeviceMemoryOpaqueCaptureAddressKHR && "Function requires or " ); uint64_t result = getDispatcher()->vkGetDeviceMemoryOpaqueCaptureAddressKHR( static_cast( m_device ), reinterpret_cast( &info ) ); return result; } //=== VK_EXT_line_rasterization === VULKAN_HPP_INLINE void CommandBuffer::setLineStippleEXT( uint32_t lineStippleFactor, uint16_t lineStipplePattern ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetLineStippleEXT && "Function requires or or " ); getDispatcher()->vkCmdSetLineStippleEXT( static_cast( m_commandBuffer ), lineStippleFactor, lineStipplePattern ); } //=== VK_EXT_host_query_reset === VULKAN_HPP_INLINE void QueryPool::resetEXT( uint32_t firstQuery, uint32_t queryCount ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkResetQueryPoolEXT && "Function requires or " ); getDispatcher()->vkResetQueryPoolEXT( static_cast( m_device ), static_cast( m_queryPool ), firstQuery, queryCount ); } //=== VK_EXT_extended_dynamic_state === VULKAN_HPP_INLINE void CommandBuffer::setCullModeEXT( VULKAN_HPP_NAMESPACE::CullModeFlags cullMode ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetCullModeEXT && "Function requires or or " ); getDispatcher()->vkCmdSetCullModeEXT( static_cast( m_commandBuffer ), static_cast( cullMode ) ); } VULKAN_HPP_INLINE void CommandBuffer::setFrontFaceEXT( VULKAN_HPP_NAMESPACE::FrontFace frontFace ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetFrontFaceEXT && "Function requires or or " ); getDispatcher()->vkCmdSetFrontFaceEXT( static_cast( m_commandBuffer ), static_cast( frontFace ) ); } VULKAN_HPP_INLINE void CommandBuffer::setPrimitiveTopologyEXT( VULKAN_HPP_NAMESPACE::PrimitiveTopology primitiveTopology ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetPrimitiveTopologyEXT && "Function requires or or " ); getDispatcher()->vkCmdSetPrimitiveTopologyEXT( static_cast( m_commandBuffer ), static_cast( primitiveTopology ) ); } VULKAN_HPP_INLINE void CommandBuffer::setViewportWithCountEXT( VULKAN_HPP_NAMESPACE::ArrayProxy const & viewports ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetViewportWithCountEXT && "Function requires or or " ); getDispatcher()->vkCmdSetViewportWithCountEXT( static_cast( m_commandBuffer ), viewports.size(), reinterpret_cast( viewports.data() ) ); } VULKAN_HPP_INLINE void CommandBuffer::setScissorWithCountEXT( VULKAN_HPP_NAMESPACE::ArrayProxy const & scissors ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetScissorWithCountEXT && "Function requires or or " ); getDispatcher()->vkCmdSetScissorWithCountEXT( static_cast( m_commandBuffer ), scissors.size(), reinterpret_cast( scissors.data() ) ); } VULKAN_HPP_INLINE void CommandBuffer::bindVertexBuffers2EXT( uint32_t firstBinding, VULKAN_HPP_NAMESPACE::ArrayProxy const & buffers, VULKAN_HPP_NAMESPACE::ArrayProxy const & offsets, VULKAN_HPP_NAMESPACE::ArrayProxy const & sizes, VULKAN_HPP_NAMESPACE::ArrayProxy const & strides ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdBindVertexBuffers2EXT && "Function requires or or " ); # ifdef VULKAN_HPP_NO_EXCEPTIONS VULKAN_HPP_ASSERT( buffers.size() == offsets.size() ); VULKAN_HPP_ASSERT( sizes.empty() || buffers.size() == sizes.size() ); VULKAN_HPP_ASSERT( strides.empty() || buffers.size() == strides.size() ); # else if ( buffers.size() != offsets.size() ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::bindVertexBuffers2EXT: buffers.size() != offsets.size()" ); } if ( !sizes.empty() && buffers.size() != sizes.size() ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::bindVertexBuffers2EXT: buffers.size() != sizes.size()" ); } if ( !strides.empty() && buffers.size() != strides.size() ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::bindVertexBuffers2EXT: buffers.size() != strides.size()" ); } # endif /*VULKAN_HPP_NO_EXCEPTIONS*/ getDispatcher()->vkCmdBindVertexBuffers2EXT( static_cast( m_commandBuffer ), firstBinding, buffers.size(), reinterpret_cast( buffers.data() ), reinterpret_cast( offsets.data() ), reinterpret_cast( sizes.data() ), reinterpret_cast( strides.data() ) ); } VULKAN_HPP_INLINE void CommandBuffer::setDepthTestEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 depthTestEnable ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetDepthTestEnableEXT && "Function requires or or " ); getDispatcher()->vkCmdSetDepthTestEnableEXT( static_cast( m_commandBuffer ), static_cast( depthTestEnable ) ); } VULKAN_HPP_INLINE void CommandBuffer::setDepthWriteEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 depthWriteEnable ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetDepthWriteEnableEXT && "Function requires or or " ); getDispatcher()->vkCmdSetDepthWriteEnableEXT( static_cast( m_commandBuffer ), static_cast( depthWriteEnable ) ); } VULKAN_HPP_INLINE void CommandBuffer::setDepthCompareOpEXT( VULKAN_HPP_NAMESPACE::CompareOp depthCompareOp ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetDepthCompareOpEXT && "Function requires or or " ); getDispatcher()->vkCmdSetDepthCompareOpEXT( static_cast( m_commandBuffer ), static_cast( depthCompareOp ) ); } VULKAN_HPP_INLINE void CommandBuffer::setDepthBoundsTestEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 depthBoundsTestEnable ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetDepthBoundsTestEnableEXT && "Function requires or or " ); getDispatcher()->vkCmdSetDepthBoundsTestEnableEXT( static_cast( m_commandBuffer ), static_cast( depthBoundsTestEnable ) ); } VULKAN_HPP_INLINE void CommandBuffer::setStencilTestEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 stencilTestEnable ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetStencilTestEnableEXT && "Function requires or or " ); getDispatcher()->vkCmdSetStencilTestEnableEXT( static_cast( m_commandBuffer ), static_cast( stencilTestEnable ) ); } VULKAN_HPP_INLINE void CommandBuffer::setStencilOpEXT( VULKAN_HPP_NAMESPACE::StencilFaceFlags faceMask, VULKAN_HPP_NAMESPACE::StencilOp failOp, VULKAN_HPP_NAMESPACE::StencilOp passOp, VULKAN_HPP_NAMESPACE::StencilOp depthFailOp, VULKAN_HPP_NAMESPACE::CompareOp compareOp ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetStencilOpEXT && "Function requires or or " ); getDispatcher()->vkCmdSetStencilOpEXT( static_cast( m_commandBuffer ), static_cast( faceMask ), static_cast( failOp ), static_cast( passOp ), static_cast( depthFailOp ), static_cast( compareOp ) ); } //=== VK_KHR_deferred_host_operations === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type Device::createDeferredOperationKHR( VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateDeferredOperationKHR( static_cast( m_device ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &deferredOperation ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { # if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) return VULKAN_HPP_UNEXPECTED( result ); # else VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createDeferredOperationKHR" ); # endif } return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DeferredOperationKHR( *this, *reinterpret_cast( &deferredOperation ), allocator ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE uint32_t DeferredOperationKHR::getMaxConcurrency() const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetDeferredOperationMaxConcurrencyKHR && "Function requires " ); uint32_t result = getDispatcher()->vkGetDeferredOperationMaxConcurrencyKHR( static_cast( m_device ), static_cast( m_operation ) ); return result; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result DeferredOperationKHR::getResult() const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetDeferredOperationResultKHR && "Function requires " ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetDeferredOperationResultKHR( static_cast( m_device ), static_cast( m_operation ) ) ); return static_cast( result ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result DeferredOperationKHR::join() const { VULKAN_HPP_ASSERT( getDispatcher()->vkDeferredOperationJoinKHR && "Function requires " ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkDeferredOperationJoinKHR( static_cast( m_device ), static_cast( m_operation ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::DeferredOperationKHR::join", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eThreadDoneKHR, VULKAN_HPP_NAMESPACE::Result::eThreadIdleKHR } ); return static_cast( result ); } //=== VK_KHR_pipeline_executable_properties === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector Device::getPipelineExecutablePropertiesKHR( const VULKAN_HPP_NAMESPACE::PipelineInfoKHR & pipelineInfo ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPipelineExecutablePropertiesKHR && "Function requires " ); std::vector properties; uint32_t executableCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( getDispatcher()->vkGetPipelineExecutablePropertiesKHR( static_cast( m_device ), reinterpret_cast( &pipelineInfo ), &executableCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && executableCount ) { properties.resize( executableCount ); result = static_cast( getDispatcher()->vkGetPipelineExecutablePropertiesKHR( static_cast( m_device ), reinterpret_cast( &pipelineInfo ), &executableCount, reinterpret_cast( properties.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getPipelineExecutablePropertiesKHR" ); VULKAN_HPP_ASSERT( executableCount <= properties.size() ); if ( executableCount < properties.size() ) { properties.resize( executableCount ); } return properties; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector Device::getPipelineExecutableStatisticsKHR( const VULKAN_HPP_NAMESPACE::PipelineExecutableInfoKHR & executableInfo ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPipelineExecutableStatisticsKHR && "Function requires " ); std::vector statistics; uint32_t statisticCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( getDispatcher()->vkGetPipelineExecutableStatisticsKHR( static_cast( m_device ), reinterpret_cast( &executableInfo ), &statisticCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && statisticCount ) { statistics.resize( statisticCount ); result = static_cast( getDispatcher()->vkGetPipelineExecutableStatisticsKHR( static_cast( m_device ), reinterpret_cast( &executableInfo ), &statisticCount, reinterpret_cast( statistics.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getPipelineExecutableStatisticsKHR" ); VULKAN_HPP_ASSERT( statisticCount <= statistics.size() ); if ( statisticCount < statistics.size() ) { statistics.resize( statisticCount ); } return statistics; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector Device::getPipelineExecutableInternalRepresentationsKHR( const VULKAN_HPP_NAMESPACE::PipelineExecutableInfoKHR & executableInfo ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPipelineExecutableInternalRepresentationsKHR && "Function requires " ); std::vector internalRepresentations; uint32_t internalRepresentationCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( getDispatcher()->vkGetPipelineExecutableInternalRepresentationsKHR( static_cast( m_device ), reinterpret_cast( &executableInfo ), &internalRepresentationCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && internalRepresentationCount ) { internalRepresentations.resize( internalRepresentationCount ); result = static_cast( getDispatcher()->vkGetPipelineExecutableInternalRepresentationsKHR( static_cast( m_device ), reinterpret_cast( &executableInfo ), &internalRepresentationCount, reinterpret_cast( internalRepresentations.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getPipelineExecutableInternalRepresentationsKHR" ); VULKAN_HPP_ASSERT( internalRepresentationCount <= internalRepresentations.size() ); if ( internalRepresentationCount < internalRepresentations.size() ) { internalRepresentations.resize( internalRepresentationCount ); } return internalRepresentations; } //=== VK_EXT_host_image_copy === VULKAN_HPP_INLINE void Device::copyMemoryToImageEXT( const VULKAN_HPP_NAMESPACE::CopyMemoryToImageInfo & copyMemoryToImageInfo ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkCopyMemoryToImageEXT && "Function requires or " ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCopyMemoryToImageEXT( static_cast( m_device ), reinterpret_cast( ©MemoryToImageInfo ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::copyMemoryToImageEXT" ); } VULKAN_HPP_INLINE void Device::copyImageToMemoryEXT( const VULKAN_HPP_NAMESPACE::CopyImageToMemoryInfo & copyImageToMemoryInfo ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkCopyImageToMemoryEXT && "Function requires or " ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCopyImageToMemoryEXT( static_cast( m_device ), reinterpret_cast( ©ImageToMemoryInfo ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::copyImageToMemoryEXT" ); } VULKAN_HPP_INLINE void Device::copyImageToImageEXT( const VULKAN_HPP_NAMESPACE::CopyImageToImageInfo & copyImageToImageInfo ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkCopyImageToImageEXT && "Function requires or " ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCopyImageToImageEXT( static_cast( m_device ), reinterpret_cast( ©ImageToImageInfo ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::copyImageToImageEXT" ); } VULKAN_HPP_INLINE void Device::transitionImageLayoutEXT( VULKAN_HPP_NAMESPACE::ArrayProxy const & transitions ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkTransitionImageLayoutEXT && "Function requires or " ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkTransitionImageLayoutEXT( static_cast( m_device ), transitions.size(), reinterpret_cast( transitions.data() ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::transitionImageLayoutEXT" ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::SubresourceLayout2 Image::getSubresourceLayout2EXT( const VULKAN_HPP_NAMESPACE::ImageSubresource2 & subresource ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetImageSubresourceLayout2EXT && "Function requires or or or " ); VULKAN_HPP_NAMESPACE::SubresourceLayout2 layout; getDispatcher()->vkGetImageSubresourceLayout2EXT( static_cast( m_device ), static_cast( m_image ), reinterpret_cast( &subresource ), reinterpret_cast( &layout ) ); return layout; } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::StructureChain Image::getSubresourceLayout2EXT( const VULKAN_HPP_NAMESPACE::ImageSubresource2 & subresource ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetImageSubresourceLayout2EXT && "Function requires or or or " ); VULKAN_HPP_NAMESPACE::StructureChain structureChain; VULKAN_HPP_NAMESPACE::SubresourceLayout2 & layout = structureChain.template get(); getDispatcher()->vkGetImageSubresourceLayout2EXT( static_cast( m_device ), static_cast( m_image ), reinterpret_cast( &subresource ), reinterpret_cast( &layout ) ); return structureChain; } //=== VK_KHR_map_memory2 === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE void * Device::mapMemory2KHR( const VULKAN_HPP_NAMESPACE::MemoryMapInfo & memoryMapInfo ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkMapMemory2KHR && "Function requires or " ); void * pData; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkMapMemory2KHR( static_cast( m_device ), reinterpret_cast( &memoryMapInfo ), &pData ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::mapMemory2KHR" ); return pData; } VULKAN_HPP_INLINE void Device::unmapMemory2KHR( const VULKAN_HPP_NAMESPACE::MemoryUnmapInfo & memoryUnmapInfo ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkUnmapMemory2KHR && "Function requires or " ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkUnmapMemory2KHR( static_cast( m_device ), reinterpret_cast( &memoryUnmapInfo ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::unmapMemory2KHR" ); } //=== VK_EXT_swapchain_maintenance1 === VULKAN_HPP_INLINE void Device::releaseSwapchainImagesEXT( const VULKAN_HPP_NAMESPACE::ReleaseSwapchainImagesInfoEXT & releaseInfo ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkReleaseSwapchainImagesEXT && "Function requires " ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkReleaseSwapchainImagesEXT( static_cast( m_device ), reinterpret_cast( &releaseInfo ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::releaseSwapchainImagesEXT" ); } //=== VK_NV_device_generated_commands === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MemoryRequirements2 Device::getGeneratedCommandsMemoryRequirementsNV( const VULKAN_HPP_NAMESPACE::GeneratedCommandsMemoryRequirementsInfoNV & info ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetGeneratedCommandsMemoryRequirementsNV && "Function requires " ); VULKAN_HPP_NAMESPACE::MemoryRequirements2 memoryRequirements; getDispatcher()->vkGetGeneratedCommandsMemoryRequirementsNV( static_cast( m_device ), reinterpret_cast( &info ), reinterpret_cast( &memoryRequirements ) ); return memoryRequirements; } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::StructureChain Device::getGeneratedCommandsMemoryRequirementsNV( const VULKAN_HPP_NAMESPACE::GeneratedCommandsMemoryRequirementsInfoNV & info ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetGeneratedCommandsMemoryRequirementsNV && "Function requires " ); VULKAN_HPP_NAMESPACE::StructureChain structureChain; VULKAN_HPP_NAMESPACE::MemoryRequirements2 & memoryRequirements = structureChain.template get(); getDispatcher()->vkGetGeneratedCommandsMemoryRequirementsNV( static_cast( m_device ), reinterpret_cast( &info ), reinterpret_cast( &memoryRequirements ) ); return structureChain; } VULKAN_HPP_INLINE void CommandBuffer::preprocessGeneratedCommandsNV( const VULKAN_HPP_NAMESPACE::GeneratedCommandsInfoNV & generatedCommandsInfo ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdPreprocessGeneratedCommandsNV && "Function requires " ); getDispatcher()->vkCmdPreprocessGeneratedCommandsNV( static_cast( m_commandBuffer ), reinterpret_cast( &generatedCommandsInfo ) ); } VULKAN_HPP_INLINE void CommandBuffer::executeGeneratedCommandsNV( VULKAN_HPP_NAMESPACE::Bool32 isPreprocessed, const VULKAN_HPP_NAMESPACE::GeneratedCommandsInfoNV & generatedCommandsInfo ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdExecuteGeneratedCommandsNV && "Function requires " ); getDispatcher()->vkCmdExecuteGeneratedCommandsNV( static_cast( m_commandBuffer ), static_cast( isPreprocessed ), reinterpret_cast( &generatedCommandsInfo ) ); } VULKAN_HPP_INLINE void CommandBuffer::bindPipelineShaderGroupNV( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint, VULKAN_HPP_NAMESPACE::Pipeline pipeline, uint32_t groupIndex ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdBindPipelineShaderGroupNV && "Function requires " ); getDispatcher()->vkCmdBindPipelineShaderGroupNV( static_cast( m_commandBuffer ), static_cast( pipelineBindPoint ), static_cast( pipeline ), groupIndex ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type Device::createIndirectCommandsLayoutNV( VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutCreateInfoNV const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNV indirectCommandsLayout; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateIndirectCommandsLayoutNV( static_cast( m_device ), reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &indirectCommandsLayout ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { # if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) return VULKAN_HPP_UNEXPECTED( result ); # else VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createIndirectCommandsLayoutNV" ); # endif } return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::IndirectCommandsLayoutNV( *this, *reinterpret_cast( &indirectCommandsLayout ), allocator ); } //=== VK_EXT_depth_bias_control === VULKAN_HPP_INLINE void CommandBuffer::setDepthBias2EXT( const VULKAN_HPP_NAMESPACE::DepthBiasInfoEXT & depthBiasInfo ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetDepthBias2EXT && "Function requires " ); getDispatcher()->vkCmdSetDepthBias2EXT( static_cast( m_commandBuffer ), reinterpret_cast( &depthBiasInfo ) ); } //=== VK_EXT_acquire_drm_display === VULKAN_HPP_INLINE void PhysicalDevice::acquireDrmDisplayEXT( int32_t drmFd, VULKAN_HPP_NAMESPACE::DisplayKHR display ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkAcquireDrmDisplayEXT && "Function requires " ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkAcquireDrmDisplayEXT( static_cast( m_physicalDevice ), drmFd, static_cast( display ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::acquireDrmDisplayEXT" ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type PhysicalDevice::getDrmDisplayEXT( int32_t drmFd, uint32_t connectorId ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { VULKAN_HPP_NAMESPACE::DisplayKHR display; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetDrmDisplayEXT( static_cast( m_physicalDevice ), drmFd, connectorId, reinterpret_cast( &display ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { # if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) return VULKAN_HPP_UNEXPECTED( result ); # else VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "PhysicalDevice::getDrmDisplayEXT" ); # endif } return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DisplayKHR( *this, *reinterpret_cast( &display ) ); } //=== VK_EXT_private_data === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type Device::createPrivateDataSlotEXT( VULKAN_HPP_NAMESPACE::PrivateDataSlotCreateInfo const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreatePrivateDataSlotEXT( static_cast( m_device ), reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &privateDataSlot ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { # if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) return VULKAN_HPP_UNEXPECTED( result ); # else VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createPrivateDataSlotEXT" ); # endif } return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::PrivateDataSlot( *this, *reinterpret_cast( &privateDataSlot ), allocator ); } VULKAN_HPP_INLINE void Device::destroyPrivateDataSlotEXT( VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot, Optional allocator ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkDestroyPrivateDataSlotEXT && "Function requires or " ); getDispatcher()->vkDestroyPrivateDataSlotEXT( static_cast( m_device ), static_cast( privateDataSlot ), reinterpret_cast( static_cast( allocator ) ) ); } VULKAN_HPP_INLINE void Device::setPrivateDataEXT( VULKAN_HPP_NAMESPACE::ObjectType objectType_, uint64_t objectHandle, VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot, uint64_t data ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkSetPrivateDataEXT && "Function requires or " ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkSetPrivateDataEXT( static_cast( m_device ), static_cast( objectType_ ), objectHandle, static_cast( privateDataSlot ), data ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::setPrivateDataEXT" ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE uint64_t Device::getPrivateDataEXT( VULKAN_HPP_NAMESPACE::ObjectType objectType_, uint64_t objectHandle, VULKAN_HPP_NAMESPACE::PrivateDataSlot privateDataSlot ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPrivateDataEXT && "Function requires or " ); uint64_t data; getDispatcher()->vkGetPrivateDataEXT( static_cast( m_device ), static_cast( objectType_ ), objectHandle, static_cast( privateDataSlot ), &data ); return data; } //=== VK_KHR_video_encode_queue === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VideoEncodeQualityLevelPropertiesKHR PhysicalDevice::getVideoEncodeQualityLevelPropertiesKHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceVideoEncodeQualityLevelInfoKHR & qualityLevelInfo ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR && "Function requires " ); VULKAN_HPP_NAMESPACE::VideoEncodeQualityLevelPropertiesKHR qualityLevelProperties; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR( static_cast( m_physicalDevice ), reinterpret_cast( &qualityLevelInfo ), reinterpret_cast( &qualityLevelProperties ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getVideoEncodeQualityLevelPropertiesKHR" ); return qualityLevelProperties; } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::StructureChain PhysicalDevice::getVideoEncodeQualityLevelPropertiesKHR( const VULKAN_HPP_NAMESPACE::PhysicalDeviceVideoEncodeQualityLevelInfoKHR & qualityLevelInfo ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR && "Function requires " ); StructureChain structureChain; VULKAN_HPP_NAMESPACE::VideoEncodeQualityLevelPropertiesKHR & qualityLevelProperties = structureChain.template get(); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR( static_cast( m_physicalDevice ), reinterpret_cast( &qualityLevelInfo ), reinterpret_cast( &qualityLevelProperties ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getVideoEncodeQualityLevelPropertiesKHR" ); return structureChain; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::pair> Device::getEncodedVideoSessionParametersKHR( const VULKAN_HPP_NAMESPACE::VideoEncodeSessionParametersGetInfoKHR & videoSessionParametersInfo ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetEncodedVideoSessionParametersKHR && "Function requires " ); std::pair> data_; VULKAN_HPP_NAMESPACE::VideoEncodeSessionParametersFeedbackInfoKHR & feedbackInfo = data_.first; std::vector & data = data_.second; size_t dataSize; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( getDispatcher()->vkGetEncodedVideoSessionParametersKHR( static_cast( m_device ), reinterpret_cast( &videoSessionParametersInfo ), reinterpret_cast( &feedbackInfo ), &dataSize, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && dataSize ) { data.resize( dataSize ); result = static_cast( getDispatcher()->vkGetEncodedVideoSessionParametersKHR( static_cast( m_device ), reinterpret_cast( &videoSessionParametersInfo ), reinterpret_cast( &feedbackInfo ), &dataSize, reinterpret_cast( data.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getEncodedVideoSessionParametersKHR" ); return data_; } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::pair, std::vector> Device::getEncodedVideoSessionParametersKHR( const VULKAN_HPP_NAMESPACE::VideoEncodeSessionParametersGetInfoKHR & videoSessionParametersInfo ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetEncodedVideoSessionParametersKHR && "Function requires " ); std::pair, std::vector> data_; VULKAN_HPP_NAMESPACE::VideoEncodeSessionParametersFeedbackInfoKHR & feedbackInfo = data_.first.template get(); std::vector & data = data_.second; size_t dataSize; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( getDispatcher()->vkGetEncodedVideoSessionParametersKHR( static_cast( m_device ), reinterpret_cast( &videoSessionParametersInfo ), reinterpret_cast( &feedbackInfo ), &dataSize, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && dataSize ) { data.resize( dataSize ); result = static_cast( getDispatcher()->vkGetEncodedVideoSessionParametersKHR( static_cast( m_device ), reinterpret_cast( &videoSessionParametersInfo ), reinterpret_cast( &feedbackInfo ), &dataSize, reinterpret_cast( data.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getEncodedVideoSessionParametersKHR" ); return data_; } VULKAN_HPP_INLINE void CommandBuffer::encodeVideoKHR( const VULKAN_HPP_NAMESPACE::VideoEncodeInfoKHR & encodeInfo ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdEncodeVideoKHR && "Function requires " ); getDispatcher()->vkCmdEncodeVideoKHR( static_cast( m_commandBuffer ), reinterpret_cast( &encodeInfo ) ); } # if defined( VK_ENABLE_BETA_EXTENSIONS ) //=== VK_NV_cuda_kernel_launch === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type Device::createCudaModuleNV( VULKAN_HPP_NAMESPACE::CudaModuleCreateInfoNV const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { VULKAN_HPP_NAMESPACE::CudaModuleNV module; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateCudaModuleNV( static_cast( m_device ), reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &module ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { # if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) return VULKAN_HPP_UNEXPECTED( result ); # else VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createCudaModuleNV" ); # endif } return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CudaModuleNV( *this, *reinterpret_cast( &module ), allocator ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector CudaModuleNV::getCache() const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetCudaModuleCacheNV && "Function requires " ); std::vector cacheData; size_t cacheSize; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( getDispatcher()->vkGetCudaModuleCacheNV( static_cast( m_device ), static_cast( m_module ), &cacheSize, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && cacheSize ) { cacheData.resize( cacheSize ); result = static_cast( getDispatcher()->vkGetCudaModuleCacheNV( static_cast( m_device ), static_cast( m_module ), &cacheSize, reinterpret_cast( cacheData.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::CudaModuleNV::getCache" ); VULKAN_HPP_ASSERT( cacheSize <= cacheData.size() ); if ( cacheSize < cacheData.size() ) { cacheData.resize( cacheSize ); } return cacheData; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type Device::createCudaFunctionNV( VULKAN_HPP_NAMESPACE::CudaFunctionCreateInfoNV const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { VULKAN_HPP_NAMESPACE::CudaFunctionNV function; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateCudaFunctionNV( static_cast( m_device ), reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &function ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { # if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) return VULKAN_HPP_UNEXPECTED( result ); # else VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createCudaFunctionNV" ); # endif } return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::CudaFunctionNV( *this, *reinterpret_cast( &function ), allocator ); } VULKAN_HPP_INLINE void CommandBuffer::cudaLaunchKernelNV( const VULKAN_HPP_NAMESPACE::CudaLaunchInfoNV & launchInfo ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdCudaLaunchKernelNV && "Function requires " ); getDispatcher()->vkCmdCudaLaunchKernelNV( static_cast( m_commandBuffer ), reinterpret_cast( &launchInfo ) ); } # endif /*VK_ENABLE_BETA_EXTENSIONS*/ # if defined( VK_USE_PLATFORM_METAL_EXT ) //=== VK_EXT_metal_objects === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::ExportMetalObjectsInfoEXT Device::exportMetalObjectsEXT() const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkExportMetalObjectsEXT && "Function requires " ); VULKAN_HPP_NAMESPACE::ExportMetalObjectsInfoEXT metalObjectsInfo; getDispatcher()->vkExportMetalObjectsEXT( static_cast( m_device ), reinterpret_cast( &metalObjectsInfo ) ); return metalObjectsInfo; } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::StructureChain Device::exportMetalObjectsEXT() const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkExportMetalObjectsEXT && "Function requires " ); VULKAN_HPP_NAMESPACE::StructureChain structureChain; VULKAN_HPP_NAMESPACE::ExportMetalObjectsInfoEXT & metalObjectsInfo = structureChain.template get(); getDispatcher()->vkExportMetalObjectsEXT( static_cast( m_device ), reinterpret_cast( &metalObjectsInfo ) ); return structureChain; } # endif /*VK_USE_PLATFORM_METAL_EXT*/ //=== VK_KHR_synchronization2 === VULKAN_HPP_INLINE void CommandBuffer::setEvent2KHR( VULKAN_HPP_NAMESPACE::Event event, const VULKAN_HPP_NAMESPACE::DependencyInfo & dependencyInfo ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetEvent2KHR && "Function requires or " ); getDispatcher()->vkCmdSetEvent2KHR( static_cast( m_commandBuffer ), static_cast( event ), reinterpret_cast( &dependencyInfo ) ); } VULKAN_HPP_INLINE void CommandBuffer::resetEvent2KHR( VULKAN_HPP_NAMESPACE::Event event, VULKAN_HPP_NAMESPACE::PipelineStageFlags2 stageMask ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdResetEvent2KHR && "Function requires or " ); getDispatcher()->vkCmdResetEvent2KHR( static_cast( m_commandBuffer ), static_cast( event ), static_cast( stageMask ) ); } VULKAN_HPP_INLINE void CommandBuffer::waitEvents2KHR( VULKAN_HPP_NAMESPACE::ArrayProxy const & events, VULKAN_HPP_NAMESPACE::ArrayProxy const & dependencyInfos ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdWaitEvents2KHR && "Function requires or " ); # ifdef VULKAN_HPP_NO_EXCEPTIONS VULKAN_HPP_ASSERT( events.size() == dependencyInfos.size() ); # else if ( events.size() != dependencyInfos.size() ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::waitEvents2KHR: events.size() != dependencyInfos.size()" ); } # endif /*VULKAN_HPP_NO_EXCEPTIONS*/ getDispatcher()->vkCmdWaitEvents2KHR( static_cast( m_commandBuffer ), events.size(), reinterpret_cast( events.data() ), reinterpret_cast( dependencyInfos.data() ) ); } VULKAN_HPP_INLINE void CommandBuffer::pipelineBarrier2KHR( const VULKAN_HPP_NAMESPACE::DependencyInfo & dependencyInfo ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdPipelineBarrier2KHR && "Function requires or " ); getDispatcher()->vkCmdPipelineBarrier2KHR( static_cast( m_commandBuffer ), reinterpret_cast( &dependencyInfo ) ); } VULKAN_HPP_INLINE void CommandBuffer::writeTimestamp2KHR( VULKAN_HPP_NAMESPACE::PipelineStageFlags2 stage, VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t query ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdWriteTimestamp2KHR && "Function requires or " ); getDispatcher()->vkCmdWriteTimestamp2KHR( static_cast( m_commandBuffer ), static_cast( stage ), static_cast( queryPool ), query ); } VULKAN_HPP_INLINE void Queue::submit2KHR( VULKAN_HPP_NAMESPACE::ArrayProxy const & submits, VULKAN_HPP_NAMESPACE::Fence fence ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkQueueSubmit2KHR && "Function requires or " ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkQueueSubmit2KHR( static_cast( m_queue ), submits.size(), reinterpret_cast( submits.data() ), static_cast( fence ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Queue::submit2KHR" ); } //=== VK_EXT_descriptor_buffer === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::DeviceSize DescriptorSetLayout::getSizeEXT() const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetDescriptorSetLayoutSizeEXT && "Function requires " ); VULKAN_HPP_NAMESPACE::DeviceSize layoutSizeInBytes; getDispatcher()->vkGetDescriptorSetLayoutSizeEXT( static_cast( m_device ), static_cast( m_descriptorSetLayout ), reinterpret_cast( &layoutSizeInBytes ) ); return layoutSizeInBytes; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::DeviceSize DescriptorSetLayout::getBindingOffsetEXT( uint32_t binding ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetDescriptorSetLayoutBindingOffsetEXT && "Function requires " ); VULKAN_HPP_NAMESPACE::DeviceSize offset; getDispatcher()->vkGetDescriptorSetLayoutBindingOffsetEXT( static_cast( m_device ), static_cast( m_descriptorSetLayout ), binding, reinterpret_cast( &offset ) ); return offset; } VULKAN_HPP_INLINE void Device::getDescriptorEXT( const VULKAN_HPP_NAMESPACE::DescriptorGetInfoEXT & descriptorInfo, size_t dataSize, void * pDescriptor ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetDescriptorEXT && "Function requires " ); getDispatcher()->vkGetDescriptorEXT( static_cast( m_device ), reinterpret_cast( &descriptorInfo ), dataSize, pDescriptor ); } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE DescriptorType Device::getDescriptorEXT( const VULKAN_HPP_NAMESPACE::DescriptorGetInfoEXT & descriptorInfo ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetDescriptorEXT && "Function requires " ); DescriptorType descriptor; getDispatcher()->vkGetDescriptorEXT( static_cast( m_device ), reinterpret_cast( &descriptorInfo ), sizeof( DescriptorType ), reinterpret_cast( &descriptor ) ); return descriptor; } VULKAN_HPP_INLINE void CommandBuffer::bindDescriptorBuffersEXT( VULKAN_HPP_NAMESPACE::ArrayProxy const & bindingInfos ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdBindDescriptorBuffersEXT && "Function requires " ); getDispatcher()->vkCmdBindDescriptorBuffersEXT( static_cast( m_commandBuffer ), bindingInfos.size(), reinterpret_cast( bindingInfos.data() ) ); } VULKAN_HPP_INLINE void CommandBuffer::setDescriptorBufferOffsetsEXT( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint, VULKAN_HPP_NAMESPACE::PipelineLayout layout, uint32_t firstSet, VULKAN_HPP_NAMESPACE::ArrayProxy const & bufferIndices, VULKAN_HPP_NAMESPACE::ArrayProxy const & offsets ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetDescriptorBufferOffsetsEXT && "Function requires " ); # ifdef VULKAN_HPP_NO_EXCEPTIONS VULKAN_HPP_ASSERT( bufferIndices.size() == offsets.size() ); # else if ( bufferIndices.size() != offsets.size() ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::setDescriptorBufferOffsetsEXT: bufferIndices.size() != offsets.size()" ); } # endif /*VULKAN_HPP_NO_EXCEPTIONS*/ getDispatcher()->vkCmdSetDescriptorBufferOffsetsEXT( static_cast( m_commandBuffer ), static_cast( pipelineBindPoint ), static_cast( layout ), firstSet, bufferIndices.size(), bufferIndices.data(), reinterpret_cast( offsets.data() ) ); } VULKAN_HPP_INLINE void CommandBuffer::bindDescriptorBufferEmbeddedSamplersEXT( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint, VULKAN_HPP_NAMESPACE::PipelineLayout layout, uint32_t set ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdBindDescriptorBufferEmbeddedSamplersEXT && "Function requires " ); getDispatcher()->vkCmdBindDescriptorBufferEmbeddedSamplersEXT( static_cast( m_commandBuffer ), static_cast( pipelineBindPoint ), static_cast( layout ), set ); } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE DataType Device::getBufferOpaqueCaptureDescriptorDataEXT( const VULKAN_HPP_NAMESPACE::BufferCaptureDescriptorDataInfoEXT & info ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetBufferOpaqueCaptureDescriptorDataEXT && "Function requires " ); DataType data; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetBufferOpaqueCaptureDescriptorDataEXT( static_cast( m_device ), reinterpret_cast( &info ), &data ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getBufferOpaqueCaptureDescriptorDataEXT" ); return data; } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE DataType Device::getImageOpaqueCaptureDescriptorDataEXT( const VULKAN_HPP_NAMESPACE::ImageCaptureDescriptorDataInfoEXT & info ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetImageOpaqueCaptureDescriptorDataEXT && "Function requires " ); DataType data; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetImageOpaqueCaptureDescriptorDataEXT( static_cast( m_device ), reinterpret_cast( &info ), &data ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getImageOpaqueCaptureDescriptorDataEXT" ); return data; } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE DataType Device::getImageViewOpaqueCaptureDescriptorDataEXT( const VULKAN_HPP_NAMESPACE::ImageViewCaptureDescriptorDataInfoEXT & info ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetImageViewOpaqueCaptureDescriptorDataEXT && "Function requires " ); DataType data; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetImageViewOpaqueCaptureDescriptorDataEXT( static_cast( m_device ), reinterpret_cast( &info ), &data ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getImageViewOpaqueCaptureDescriptorDataEXT" ); return data; } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE DataType Device::getSamplerOpaqueCaptureDescriptorDataEXT( const VULKAN_HPP_NAMESPACE::SamplerCaptureDescriptorDataInfoEXT & info ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetSamplerOpaqueCaptureDescriptorDataEXT && "Function requires " ); DataType data; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetSamplerOpaqueCaptureDescriptorDataEXT( static_cast( m_device ), reinterpret_cast( &info ), &data ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getSamplerOpaqueCaptureDescriptorDataEXT" ); return data; } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE DataType Device::getAccelerationStructureOpaqueCaptureDescriptorDataEXT( const VULKAN_HPP_NAMESPACE::AccelerationStructureCaptureDescriptorDataInfoEXT & info ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT && "Function requires " ); DataType data; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT( static_cast( m_device ), reinterpret_cast( &info ), &data ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getAccelerationStructureOpaqueCaptureDescriptorDataEXT" ); return data; } //=== VK_NV_fragment_shading_rate_enums === VULKAN_HPP_INLINE void CommandBuffer::setFragmentShadingRateEnumNV( VULKAN_HPP_NAMESPACE::FragmentShadingRateNV shadingRate, const VULKAN_HPP_NAMESPACE::FragmentShadingRateCombinerOpKHR combinerOps[2] ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetFragmentShadingRateEnumNV && "Function requires " ); getDispatcher()->vkCmdSetFragmentShadingRateEnumNV( static_cast( m_commandBuffer ), static_cast( shadingRate ), reinterpret_cast( combinerOps ) ); } //=== VK_EXT_mesh_shader === VULKAN_HPP_INLINE void CommandBuffer::drawMeshTasksEXT( uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdDrawMeshTasksEXT && "Function requires " ); getDispatcher()->vkCmdDrawMeshTasksEXT( static_cast( m_commandBuffer ), groupCountX, groupCountY, groupCountZ ); } VULKAN_HPP_INLINE void CommandBuffer::drawMeshTasksIndirectEXT( VULKAN_HPP_NAMESPACE::Buffer buffer, VULKAN_HPP_NAMESPACE::DeviceSize offset, uint32_t drawCount, uint32_t stride ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdDrawMeshTasksIndirectEXT && "Function requires " ); getDispatcher()->vkCmdDrawMeshTasksIndirectEXT( static_cast( m_commandBuffer ), static_cast( buffer ), static_cast( offset ), drawCount, stride ); } VULKAN_HPP_INLINE void CommandBuffer::drawMeshTasksIndirectCountEXT( VULKAN_HPP_NAMESPACE::Buffer buffer, VULKAN_HPP_NAMESPACE::DeviceSize offset, VULKAN_HPP_NAMESPACE::Buffer countBuffer, VULKAN_HPP_NAMESPACE::DeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdDrawMeshTasksIndirectCountEXT && "Function requires " ); getDispatcher()->vkCmdDrawMeshTasksIndirectCountEXT( static_cast( m_commandBuffer ), static_cast( buffer ), static_cast( offset ), static_cast( countBuffer ), static_cast( countBufferOffset ), maxDrawCount, stride ); } //=== VK_KHR_copy_commands2 === VULKAN_HPP_INLINE void CommandBuffer::copyBuffer2KHR( const VULKAN_HPP_NAMESPACE::CopyBufferInfo2 & copyBufferInfo ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdCopyBuffer2KHR && "Function requires or " ); getDispatcher()->vkCmdCopyBuffer2KHR( static_cast( m_commandBuffer ), reinterpret_cast( ©BufferInfo ) ); } VULKAN_HPP_INLINE void CommandBuffer::copyImage2KHR( const VULKAN_HPP_NAMESPACE::CopyImageInfo2 & copyImageInfo ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdCopyImage2KHR && "Function requires or " ); getDispatcher()->vkCmdCopyImage2KHR( static_cast( m_commandBuffer ), reinterpret_cast( ©ImageInfo ) ); } VULKAN_HPP_INLINE void CommandBuffer::copyBufferToImage2KHR( const VULKAN_HPP_NAMESPACE::CopyBufferToImageInfo2 & copyBufferToImageInfo ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdCopyBufferToImage2KHR && "Function requires or " ); getDispatcher()->vkCmdCopyBufferToImage2KHR( static_cast( m_commandBuffer ), reinterpret_cast( ©BufferToImageInfo ) ); } VULKAN_HPP_INLINE void CommandBuffer::copyImageToBuffer2KHR( const VULKAN_HPP_NAMESPACE::CopyImageToBufferInfo2 & copyImageToBufferInfo ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdCopyImageToBuffer2KHR && "Function requires or " ); getDispatcher()->vkCmdCopyImageToBuffer2KHR( static_cast( m_commandBuffer ), reinterpret_cast( ©ImageToBufferInfo ) ); } VULKAN_HPP_INLINE void CommandBuffer::blitImage2KHR( const VULKAN_HPP_NAMESPACE::BlitImageInfo2 & blitImageInfo ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdBlitImage2KHR && "Function requires or " ); getDispatcher()->vkCmdBlitImage2KHR( static_cast( m_commandBuffer ), reinterpret_cast( &blitImageInfo ) ); } VULKAN_HPP_INLINE void CommandBuffer::resolveImage2KHR( const VULKAN_HPP_NAMESPACE::ResolveImageInfo2 & resolveImageInfo ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdResolveImage2KHR && "Function requires or " ); getDispatcher()->vkCmdResolveImage2KHR( static_cast( m_commandBuffer ), reinterpret_cast( &resolveImageInfo ) ); } //=== VK_EXT_device_fault === template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Device::getFaultInfoEXT( VULKAN_HPP_NAMESPACE::DeviceFaultCountsEXT * pFaultCounts, VULKAN_HPP_NAMESPACE::DeviceFaultInfoEXT * pFaultInfo, Dispatch const & d ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION ); return static_cast( d.vkGetDeviceFaultInfoEXT( static_cast( m_device ), reinterpret_cast( pFaultCounts ), reinterpret_cast( pFaultInfo ) ) ); } # if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_NV_acquire_winrt_display === VULKAN_HPP_INLINE void DisplayKHR::acquireWinrtNV() const { VULKAN_HPP_ASSERT( getDispatcher()->vkAcquireWinrtDisplayNV && "Function requires " ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkAcquireWinrtDisplayNV( static_cast( m_physicalDevice ), static_cast( m_display ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::DisplayKHR::acquireWinrtNV" ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type PhysicalDevice::getWinrtDisplayNV( uint32_t deviceRelativeId ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { VULKAN_HPP_NAMESPACE::DisplayKHR display; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetWinrtDisplayNV( static_cast( m_physicalDevice ), deviceRelativeId, reinterpret_cast( &display ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { # if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) return VULKAN_HPP_UNEXPECTED( result ); # else VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "PhysicalDevice::getWinrtDisplayNV" ); # endif } return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DisplayKHR( *this, *reinterpret_cast( &display ) ); } # endif /*VK_USE_PLATFORM_WIN32_KHR*/ # if defined( VK_USE_PLATFORM_DIRECTFB_EXT ) //=== VK_EXT_directfb_surface === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type Instance::createDirectFBSurfaceEXT( VULKAN_HPP_NAMESPACE::DirectFBSurfaceCreateInfoEXT const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { VULKAN_HPP_NAMESPACE::SurfaceKHR surface; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateDirectFBSurfaceEXT( static_cast( m_instance ), reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { # if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) return VULKAN_HPP_UNEXPECTED( result ); # else VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Instance::createDirectFBSurfaceEXT" ); # endif } return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR( *this, *reinterpret_cast( &surface ), allocator ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Bool32 PhysicalDevice::getDirectFBPresentationSupportEXT( uint32_t queueFamilyIndex, IDirectFB & dfb ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceDirectFBPresentationSupportEXT && "Function requires " ); VkBool32 result = getDispatcher()->vkGetPhysicalDeviceDirectFBPresentationSupportEXT( static_cast( m_physicalDevice ), queueFamilyIndex, &dfb ); return static_cast( result ); } # endif /*VK_USE_PLATFORM_DIRECTFB_EXT*/ //=== VK_EXT_vertex_input_dynamic_state === VULKAN_HPP_INLINE void CommandBuffer::setVertexInputEXT( VULKAN_HPP_NAMESPACE::ArrayProxy const & vertexBindingDescriptions, VULKAN_HPP_NAMESPACE::ArrayProxy const & vertexAttributeDescriptions ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetVertexInputEXT && "Function requires or " ); getDispatcher()->vkCmdSetVertexInputEXT( static_cast( m_commandBuffer ), vertexBindingDescriptions.size(), reinterpret_cast( vertexBindingDescriptions.data() ), vertexAttributeDescriptions.size(), reinterpret_cast( vertexAttributeDescriptions.data() ) ); } # if defined( VK_USE_PLATFORM_FUCHSIA ) //=== VK_FUCHSIA_external_memory === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE zx_handle_t Device::getMemoryZirconHandleFUCHSIA( const VULKAN_HPP_NAMESPACE::MemoryGetZirconHandleInfoFUCHSIA & getZirconHandleInfo ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetMemoryZirconHandleFUCHSIA && "Function requires " ); zx_handle_t zirconHandle; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetMemoryZirconHandleFUCHSIA( static_cast( m_device ), reinterpret_cast( &getZirconHandleInfo ), &zirconHandle ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryZirconHandleFUCHSIA" ); return zirconHandle; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MemoryZirconHandlePropertiesFUCHSIA Device::getMemoryZirconHandlePropertiesFUCHSIA( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType, zx_handle_t zirconHandle ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetMemoryZirconHandlePropertiesFUCHSIA && "Function requires " ); VULKAN_HPP_NAMESPACE::MemoryZirconHandlePropertiesFUCHSIA memoryZirconHandleProperties; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetMemoryZirconHandlePropertiesFUCHSIA( static_cast( m_device ), static_cast( handleType ), zirconHandle, reinterpret_cast( &memoryZirconHandleProperties ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryZirconHandlePropertiesFUCHSIA" ); return memoryZirconHandleProperties; } # endif /*VK_USE_PLATFORM_FUCHSIA*/ # if defined( VK_USE_PLATFORM_FUCHSIA ) //=== VK_FUCHSIA_external_semaphore === VULKAN_HPP_INLINE void Device::importSemaphoreZirconHandleFUCHSIA( const VULKAN_HPP_NAMESPACE::ImportSemaphoreZirconHandleInfoFUCHSIA & importSemaphoreZirconHandleInfo ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkImportSemaphoreZirconHandleFUCHSIA && "Function requires " ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkImportSemaphoreZirconHandleFUCHSIA( static_cast( m_device ), reinterpret_cast( &importSemaphoreZirconHandleInfo ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::importSemaphoreZirconHandleFUCHSIA" ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE zx_handle_t Device::getSemaphoreZirconHandleFUCHSIA( const VULKAN_HPP_NAMESPACE::SemaphoreGetZirconHandleInfoFUCHSIA & getZirconHandleInfo ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetSemaphoreZirconHandleFUCHSIA && "Function requires " ); zx_handle_t zirconHandle; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetSemaphoreZirconHandleFUCHSIA( static_cast( m_device ), reinterpret_cast( &getZirconHandleInfo ), &zirconHandle ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getSemaphoreZirconHandleFUCHSIA" ); return zirconHandle; } # endif /*VK_USE_PLATFORM_FUCHSIA*/ # if defined( VK_USE_PLATFORM_FUCHSIA ) //=== VK_FUCHSIA_buffer_collection === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type Device::createBufferCollectionFUCHSIA( VULKAN_HPP_NAMESPACE::BufferCollectionCreateInfoFUCHSIA const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { VULKAN_HPP_NAMESPACE::BufferCollectionFUCHSIA collection; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateBufferCollectionFUCHSIA( static_cast( m_device ), reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &collection ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { # if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) return VULKAN_HPP_UNEXPECTED( result ); # else VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createBufferCollectionFUCHSIA" ); # endif } return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::BufferCollectionFUCHSIA( *this, *reinterpret_cast( &collection ), allocator ); } VULKAN_HPP_INLINE void BufferCollectionFUCHSIA::setImageConstraints( const VULKAN_HPP_NAMESPACE::ImageConstraintsInfoFUCHSIA & imageConstraintsInfo ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkSetBufferCollectionImageConstraintsFUCHSIA && "Function requires " ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkSetBufferCollectionImageConstraintsFUCHSIA( static_cast( m_device ), static_cast( m_collection ), reinterpret_cast( &imageConstraintsInfo ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::BufferCollectionFUCHSIA::setImageConstraints" ); } VULKAN_HPP_INLINE void BufferCollectionFUCHSIA::setBufferConstraints( const VULKAN_HPP_NAMESPACE::BufferConstraintsInfoFUCHSIA & bufferConstraintsInfo ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkSetBufferCollectionBufferConstraintsFUCHSIA && "Function requires " ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkSetBufferCollectionBufferConstraintsFUCHSIA( static_cast( m_device ), static_cast( m_collection ), reinterpret_cast( &bufferConstraintsInfo ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::BufferCollectionFUCHSIA::setBufferConstraints" ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::BufferCollectionPropertiesFUCHSIA BufferCollectionFUCHSIA::getProperties() const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetBufferCollectionPropertiesFUCHSIA && "Function requires " ); VULKAN_HPP_NAMESPACE::BufferCollectionPropertiesFUCHSIA properties; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetBufferCollectionPropertiesFUCHSIA( static_cast( m_device ), static_cast( m_collection ), reinterpret_cast( &properties ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::BufferCollectionFUCHSIA::getProperties" ); return properties; } # endif /*VK_USE_PLATFORM_FUCHSIA*/ //=== VK_HUAWEI_subpass_shading === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Extent2D RenderPass::getSubpassShadingMaxWorkgroupSizeHUAWEI() const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI && "Function requires " ); VULKAN_HPP_NAMESPACE::Extent2D maxWorkgroupSize; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI( static_cast( m_device ), static_cast( m_renderPass ), reinterpret_cast( &maxWorkgroupSize ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::RenderPass::getSubpassShadingMaxWorkgroupSizeHUAWEI" ); return maxWorkgroupSize; } VULKAN_HPP_INLINE void CommandBuffer::subpassShadingHUAWEI() const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSubpassShadingHUAWEI && "Function requires " ); getDispatcher()->vkCmdSubpassShadingHUAWEI( static_cast( m_commandBuffer ) ); } //=== VK_HUAWEI_invocation_mask === VULKAN_HPP_INLINE void CommandBuffer::bindInvocationMaskHUAWEI( VULKAN_HPP_NAMESPACE::ImageView imageView, VULKAN_HPP_NAMESPACE::ImageLayout imageLayout ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdBindInvocationMaskHUAWEI && "Function requires " ); getDispatcher()->vkCmdBindInvocationMaskHUAWEI( static_cast( m_commandBuffer ), static_cast( imageView ), static_cast( imageLayout ) ); } //=== VK_NV_external_memory_rdma === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::RemoteAddressNV Device::getMemoryRemoteAddressNV( const VULKAN_HPP_NAMESPACE::MemoryGetRemoteAddressInfoNV & memoryGetRemoteAddressInfo ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetMemoryRemoteAddressNV && "Function requires " ); VULKAN_HPP_NAMESPACE::RemoteAddressNV address; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetMemoryRemoteAddressNV( static_cast( m_device ), reinterpret_cast( &memoryGetRemoteAddressInfo ), reinterpret_cast( &address ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryRemoteAddressNV" ); return address; } //=== VK_EXT_pipeline_properties === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::BaseOutStructure Device::getPipelinePropertiesEXT( const VULKAN_HPP_NAMESPACE::PipelineInfoEXT & pipelineInfo ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPipelinePropertiesEXT && "Function requires " ); VULKAN_HPP_NAMESPACE::BaseOutStructure pipelineProperties; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetPipelinePropertiesEXT( static_cast( m_device ), reinterpret_cast( &pipelineInfo ), reinterpret_cast( &pipelineProperties ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getPipelinePropertiesEXT" ); return pipelineProperties; } //=== VK_EXT_extended_dynamic_state2 === VULKAN_HPP_INLINE void CommandBuffer::setPatchControlPointsEXT( uint32_t patchControlPoints ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetPatchControlPointsEXT && "Function requires or " ); getDispatcher()->vkCmdSetPatchControlPointsEXT( static_cast( m_commandBuffer ), patchControlPoints ); } VULKAN_HPP_INLINE void CommandBuffer::setRasterizerDiscardEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 rasterizerDiscardEnable ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetRasterizerDiscardEnableEXT && "Function requires or or " ); getDispatcher()->vkCmdSetRasterizerDiscardEnableEXT( static_cast( m_commandBuffer ), static_cast( rasterizerDiscardEnable ) ); } VULKAN_HPP_INLINE void CommandBuffer::setDepthBiasEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 depthBiasEnable ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetDepthBiasEnableEXT && "Function requires or or " ); getDispatcher()->vkCmdSetDepthBiasEnableEXT( static_cast( m_commandBuffer ), static_cast( depthBiasEnable ) ); } VULKAN_HPP_INLINE void CommandBuffer::setLogicOpEXT( VULKAN_HPP_NAMESPACE::LogicOp logicOp ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetLogicOpEXT && "Function requires or " ); getDispatcher()->vkCmdSetLogicOpEXT( static_cast( m_commandBuffer ), static_cast( logicOp ) ); } VULKAN_HPP_INLINE void CommandBuffer::setPrimitiveRestartEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 primitiveRestartEnable ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetPrimitiveRestartEnableEXT && "Function requires or or " ); getDispatcher()->vkCmdSetPrimitiveRestartEnableEXT( static_cast( m_commandBuffer ), static_cast( primitiveRestartEnable ) ); } # if defined( VK_USE_PLATFORM_SCREEN_QNX ) //=== VK_QNX_screen_surface === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type Instance::createScreenSurfaceQNX( VULKAN_HPP_NAMESPACE::ScreenSurfaceCreateInfoQNX const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { VULKAN_HPP_NAMESPACE::SurfaceKHR surface; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateScreenSurfaceQNX( static_cast( m_instance ), reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { # if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) return VULKAN_HPP_UNEXPECTED( result ); # else VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Instance::createScreenSurfaceQNX" ); # endif } return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::SurfaceKHR( *this, *reinterpret_cast( &surface ), allocator ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Bool32 PhysicalDevice::getScreenPresentationSupportQNX( uint32_t queueFamilyIndex, struct _screen_window & window ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceScreenPresentationSupportQNX && "Function requires " ); VkBool32 result = getDispatcher()->vkGetPhysicalDeviceScreenPresentationSupportQNX( static_cast( m_physicalDevice ), queueFamilyIndex, &window ); return static_cast( result ); } # endif /*VK_USE_PLATFORM_SCREEN_QNX*/ //=== VK_EXT_color_write_enable === VULKAN_HPP_INLINE void CommandBuffer::setColorWriteEnableEXT( VULKAN_HPP_NAMESPACE::ArrayProxy const & colorWriteEnables ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetColorWriteEnableEXT && "Function requires " ); getDispatcher()->vkCmdSetColorWriteEnableEXT( static_cast( m_commandBuffer ), colorWriteEnables.size(), reinterpret_cast( colorWriteEnables.data() ) ); } //=== VK_KHR_ray_tracing_maintenance1 === VULKAN_HPP_INLINE void CommandBuffer::traceRaysIndirect2KHR( VULKAN_HPP_NAMESPACE::DeviceAddress indirectDeviceAddress ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdTraceRaysIndirect2KHR && "Function requires " ); getDispatcher()->vkCmdTraceRaysIndirect2KHR( static_cast( m_commandBuffer ), static_cast( indirectDeviceAddress ) ); } //=== VK_EXT_multi_draw === VULKAN_HPP_INLINE void CommandBuffer::drawMultiEXT( VULKAN_HPP_NAMESPACE::StridedArrayProxy const & vertexInfo, uint32_t instanceCount, uint32_t firstInstance ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdDrawMultiEXT && "Function requires " ); getDispatcher()->vkCmdDrawMultiEXT( static_cast( m_commandBuffer ), vertexInfo.size(), reinterpret_cast( vertexInfo.data() ), instanceCount, firstInstance, vertexInfo.stride() ); } VULKAN_HPP_INLINE void CommandBuffer::drawMultiIndexedEXT( VULKAN_HPP_NAMESPACE::StridedArrayProxy const & indexInfo, uint32_t instanceCount, uint32_t firstInstance, Optional vertexOffset ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdDrawMultiIndexedEXT && "Function requires " ); getDispatcher()->vkCmdDrawMultiIndexedEXT( static_cast( m_commandBuffer ), indexInfo.size(), reinterpret_cast( indexInfo.data() ), instanceCount, firstInstance, indexInfo.stride(), static_cast( vertexOffset ) ); } //=== VK_EXT_opacity_micromap === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type Device::createMicromapEXT( VULKAN_HPP_NAMESPACE::MicromapCreateInfoEXT const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { VULKAN_HPP_NAMESPACE::MicromapEXT micromap; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateMicromapEXT( static_cast( m_device ), reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( µmap ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { # if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) return VULKAN_HPP_UNEXPECTED( result ); # else VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createMicromapEXT" ); # endif } return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::MicromapEXT( *this, *reinterpret_cast( µmap ), allocator ); } VULKAN_HPP_INLINE void CommandBuffer::buildMicromapsEXT( VULKAN_HPP_NAMESPACE::ArrayProxy const & infos ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdBuildMicromapsEXT && "Function requires " ); getDispatcher()->vkCmdBuildMicromapsEXT( static_cast( m_commandBuffer ), infos.size(), reinterpret_cast( infos.data() ) ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Device::buildMicromapsEXT( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, VULKAN_HPP_NAMESPACE::ArrayProxy const & infos ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkBuildMicromapsEXT && "Function requires " ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkBuildMicromapsEXT( static_cast( m_device ), static_cast( deferredOperation ), infos.size(), reinterpret_cast( infos.data() ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::buildMicromapsEXT", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eOperationDeferredKHR, VULKAN_HPP_NAMESPACE::Result::eOperationNotDeferredKHR } ); return static_cast( result ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Device::copyMicromapEXT( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, const VULKAN_HPP_NAMESPACE::CopyMicromapInfoEXT & info ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkCopyMicromapEXT && "Function requires " ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCopyMicromapEXT( static_cast( m_device ), static_cast( deferredOperation ), reinterpret_cast( &info ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::copyMicromapEXT", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eOperationDeferredKHR, VULKAN_HPP_NAMESPACE::Result::eOperationNotDeferredKHR } ); return static_cast( result ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Device::copyMicromapToMemoryEXT( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, const VULKAN_HPP_NAMESPACE::CopyMicromapToMemoryInfoEXT & info ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkCopyMicromapToMemoryEXT && "Function requires " ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCopyMicromapToMemoryEXT( static_cast( m_device ), static_cast( deferredOperation ), reinterpret_cast( &info ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::copyMicromapToMemoryEXT", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eOperationDeferredKHR, VULKAN_HPP_NAMESPACE::Result::eOperationNotDeferredKHR } ); return static_cast( result ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Device::copyMemoryToMicromapEXT( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation, const VULKAN_HPP_NAMESPACE::CopyMemoryToMicromapInfoEXT & info ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkCopyMemoryToMicromapEXT && "Function requires " ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCopyMemoryToMicromapEXT( static_cast( m_device ), static_cast( deferredOperation ), reinterpret_cast( &info ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::copyMemoryToMicromapEXT", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eOperationDeferredKHR, VULKAN_HPP_NAMESPACE::Result::eOperationNotDeferredKHR } ); return static_cast( result ); } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector Device::writeMicromapsPropertiesEXT( VULKAN_HPP_NAMESPACE::ArrayProxy const & micromaps, VULKAN_HPP_NAMESPACE::QueryType queryType, size_t dataSize, size_t stride ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkWriteMicromapsPropertiesEXT && "Function requires " ); VULKAN_HPP_ASSERT( dataSize % sizeof( DataType ) == 0 ); std::vector data( dataSize / sizeof( DataType ) ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkWriteMicromapsPropertiesEXT( static_cast( m_device ), micromaps.size(), reinterpret_cast( micromaps.data() ), static_cast( queryType ), data.size() * sizeof( DataType ), reinterpret_cast( data.data() ), stride ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::writeMicromapsPropertiesEXT" ); return data; } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE DataType Device::writeMicromapsPropertyEXT( VULKAN_HPP_NAMESPACE::ArrayProxy const & micromaps, VULKAN_HPP_NAMESPACE::QueryType queryType, size_t stride ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkWriteMicromapsPropertiesEXT && "Function requires " ); DataType data; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkWriteMicromapsPropertiesEXT( static_cast( m_device ), micromaps.size(), reinterpret_cast( micromaps.data() ), static_cast( queryType ), sizeof( DataType ), reinterpret_cast( &data ), stride ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::writeMicromapsPropertyEXT" ); return data; } VULKAN_HPP_INLINE void CommandBuffer::copyMicromapEXT( const VULKAN_HPP_NAMESPACE::CopyMicromapInfoEXT & info ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdCopyMicromapEXT && "Function requires " ); getDispatcher()->vkCmdCopyMicromapEXT( static_cast( m_commandBuffer ), reinterpret_cast( &info ) ); } VULKAN_HPP_INLINE void CommandBuffer::copyMicromapToMemoryEXT( const VULKAN_HPP_NAMESPACE::CopyMicromapToMemoryInfoEXT & info ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdCopyMicromapToMemoryEXT && "Function requires " ); getDispatcher()->vkCmdCopyMicromapToMemoryEXT( static_cast( m_commandBuffer ), reinterpret_cast( &info ) ); } VULKAN_HPP_INLINE void CommandBuffer::copyMemoryToMicromapEXT( const VULKAN_HPP_NAMESPACE::CopyMemoryToMicromapInfoEXT & info ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdCopyMemoryToMicromapEXT && "Function requires " ); getDispatcher()->vkCmdCopyMemoryToMicromapEXT( static_cast( m_commandBuffer ), reinterpret_cast( &info ) ); } VULKAN_HPP_INLINE void CommandBuffer::writeMicromapsPropertiesEXT( VULKAN_HPP_NAMESPACE::ArrayProxy const & micromaps, VULKAN_HPP_NAMESPACE::QueryType queryType, VULKAN_HPP_NAMESPACE::QueryPool queryPool, uint32_t firstQuery ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdWriteMicromapsPropertiesEXT && "Function requires " ); getDispatcher()->vkCmdWriteMicromapsPropertiesEXT( static_cast( m_commandBuffer ), micromaps.size(), reinterpret_cast( micromaps.data() ), static_cast( queryType ), static_cast( queryPool ), firstQuery ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::AccelerationStructureCompatibilityKHR Device::getMicromapCompatibilityEXT( const VULKAN_HPP_NAMESPACE::MicromapVersionInfoEXT & versionInfo ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetDeviceMicromapCompatibilityEXT && "Function requires " ); VULKAN_HPP_NAMESPACE::AccelerationStructureCompatibilityKHR compatibility; getDispatcher()->vkGetDeviceMicromapCompatibilityEXT( static_cast( m_device ), reinterpret_cast( &versionInfo ), reinterpret_cast( &compatibility ) ); return compatibility; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MicromapBuildSizesInfoEXT Device::getMicromapBuildSizesEXT( VULKAN_HPP_NAMESPACE::AccelerationStructureBuildTypeKHR buildType, const VULKAN_HPP_NAMESPACE::MicromapBuildInfoEXT & buildInfo ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetMicromapBuildSizesEXT && "Function requires " ); VULKAN_HPP_NAMESPACE::MicromapBuildSizesInfoEXT sizeInfo; getDispatcher()->vkGetMicromapBuildSizesEXT( static_cast( m_device ), static_cast( buildType ), reinterpret_cast( &buildInfo ), reinterpret_cast( &sizeInfo ) ); return sizeInfo; } //=== VK_HUAWEI_cluster_culling_shader === VULKAN_HPP_INLINE void CommandBuffer::drawClusterHUAWEI( uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdDrawClusterHUAWEI && "Function requires " ); getDispatcher()->vkCmdDrawClusterHUAWEI( static_cast( m_commandBuffer ), groupCountX, groupCountY, groupCountZ ); } VULKAN_HPP_INLINE void CommandBuffer::drawClusterIndirectHUAWEI( VULKAN_HPP_NAMESPACE::Buffer buffer, VULKAN_HPP_NAMESPACE::DeviceSize offset ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdDrawClusterIndirectHUAWEI && "Function requires " ); getDispatcher()->vkCmdDrawClusterIndirectHUAWEI( static_cast( m_commandBuffer ), static_cast( buffer ), static_cast( offset ) ); } //=== VK_EXT_pageable_device_local_memory === VULKAN_HPP_INLINE void DeviceMemory::setPriorityEXT( float priority ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkSetDeviceMemoryPriorityEXT && "Function requires " ); getDispatcher()->vkSetDeviceMemoryPriorityEXT( static_cast( m_device ), static_cast( m_memory ), priority ); } //=== VK_KHR_maintenance4 === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MemoryRequirements2 Device::getBufferMemoryRequirementsKHR( const VULKAN_HPP_NAMESPACE::DeviceBufferMemoryRequirements & info ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetDeviceBufferMemoryRequirementsKHR && "Function requires or " ); VULKAN_HPP_NAMESPACE::MemoryRequirements2 memoryRequirements; getDispatcher()->vkGetDeviceBufferMemoryRequirementsKHR( static_cast( m_device ), reinterpret_cast( &info ), reinterpret_cast( &memoryRequirements ) ); return memoryRequirements; } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::StructureChain Device::getBufferMemoryRequirementsKHR( const VULKAN_HPP_NAMESPACE::DeviceBufferMemoryRequirements & info ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetDeviceBufferMemoryRequirementsKHR && "Function requires or " ); VULKAN_HPP_NAMESPACE::StructureChain structureChain; VULKAN_HPP_NAMESPACE::MemoryRequirements2 & memoryRequirements = structureChain.template get(); getDispatcher()->vkGetDeviceBufferMemoryRequirementsKHR( static_cast( m_device ), reinterpret_cast( &info ), reinterpret_cast( &memoryRequirements ) ); return structureChain; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MemoryRequirements2 Device::getImageMemoryRequirementsKHR( const VULKAN_HPP_NAMESPACE::DeviceImageMemoryRequirements & info ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetDeviceImageMemoryRequirementsKHR && "Function requires or " ); VULKAN_HPP_NAMESPACE::MemoryRequirements2 memoryRequirements; getDispatcher()->vkGetDeviceImageMemoryRequirementsKHR( static_cast( m_device ), reinterpret_cast( &info ), reinterpret_cast( &memoryRequirements ) ); return memoryRequirements; } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::StructureChain Device::getImageMemoryRequirementsKHR( const VULKAN_HPP_NAMESPACE::DeviceImageMemoryRequirements & info ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetDeviceImageMemoryRequirementsKHR && "Function requires or " ); VULKAN_HPP_NAMESPACE::StructureChain structureChain; VULKAN_HPP_NAMESPACE::MemoryRequirements2 & memoryRequirements = structureChain.template get(); getDispatcher()->vkGetDeviceImageMemoryRequirementsKHR( static_cast( m_device ), reinterpret_cast( &info ), reinterpret_cast( &memoryRequirements ) ); return structureChain; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector Device::getImageSparseMemoryRequirementsKHR( const VULKAN_HPP_NAMESPACE::DeviceImageMemoryRequirements & info ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetDeviceImageSparseMemoryRequirementsKHR && "Function requires or " ); std::vector sparseMemoryRequirements; uint32_t sparseMemoryRequirementCount; getDispatcher()->vkGetDeviceImageSparseMemoryRequirementsKHR( static_cast( m_device ), reinterpret_cast( &info ), &sparseMemoryRequirementCount, nullptr ); sparseMemoryRequirements.resize( sparseMemoryRequirementCount ); getDispatcher()->vkGetDeviceImageSparseMemoryRequirementsKHR( static_cast( m_device ), reinterpret_cast( &info ), &sparseMemoryRequirementCount, reinterpret_cast( sparseMemoryRequirements.data() ) ); VULKAN_HPP_ASSERT( sparseMemoryRequirementCount <= sparseMemoryRequirements.size() ); if ( sparseMemoryRequirementCount < sparseMemoryRequirements.size() ) { sparseMemoryRequirements.resize( sparseMemoryRequirementCount ); } return sparseMemoryRequirements; } //=== VK_VALVE_descriptor_set_host_mapping === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::DescriptorSetLayoutHostMappingInfoVALVE Device::getDescriptorSetLayoutHostMappingInfoVALVE( const VULKAN_HPP_NAMESPACE::DescriptorSetBindingReferenceVALVE & bindingReference ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetDescriptorSetLayoutHostMappingInfoVALVE && "Function requires " ); VULKAN_HPP_NAMESPACE::DescriptorSetLayoutHostMappingInfoVALVE hostMapping; getDispatcher()->vkGetDescriptorSetLayoutHostMappingInfoVALVE( static_cast( m_device ), reinterpret_cast( &bindingReference ), reinterpret_cast( &hostMapping ) ); return hostMapping; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE void * DescriptorSet::getHostMappingVALVE() const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetDescriptorSetHostMappingVALVE && "Function requires " ); void * pData; getDispatcher()->vkGetDescriptorSetHostMappingVALVE( static_cast( m_device ), static_cast( m_descriptorSet ), &pData ); return pData; } //=== VK_NV_copy_memory_indirect === VULKAN_HPP_INLINE void CommandBuffer::copyMemoryIndirectNV( VULKAN_HPP_NAMESPACE::DeviceAddress copyBufferAddress, uint32_t copyCount, uint32_t stride ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdCopyMemoryIndirectNV && "Function requires " ); getDispatcher()->vkCmdCopyMemoryIndirectNV( static_cast( m_commandBuffer ), static_cast( copyBufferAddress ), copyCount, stride ); } VULKAN_HPP_INLINE void CommandBuffer::copyMemoryToImageIndirectNV( VULKAN_HPP_NAMESPACE::DeviceAddress copyBufferAddress, uint32_t stride, VULKAN_HPP_NAMESPACE::Image dstImage, VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout, VULKAN_HPP_NAMESPACE::ArrayProxy const & imageSubresources ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdCopyMemoryToImageIndirectNV && "Function requires " ); getDispatcher()->vkCmdCopyMemoryToImageIndirectNV( static_cast( m_commandBuffer ), static_cast( copyBufferAddress ), imageSubresources.size(), stride, static_cast( dstImage ), static_cast( dstImageLayout ), reinterpret_cast( imageSubresources.data() ) ); } //=== VK_NV_memory_decompression === VULKAN_HPP_INLINE void CommandBuffer::decompressMemoryNV( VULKAN_HPP_NAMESPACE::ArrayProxy const & decompressMemoryRegions ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdDecompressMemoryNV && "Function requires " ); getDispatcher()->vkCmdDecompressMemoryNV( static_cast( m_commandBuffer ), decompressMemoryRegions.size(), reinterpret_cast( decompressMemoryRegions.data() ) ); } VULKAN_HPP_INLINE void CommandBuffer::decompressMemoryIndirectCountNV( VULKAN_HPP_NAMESPACE::DeviceAddress indirectCommandsAddress, VULKAN_HPP_NAMESPACE::DeviceAddress indirectCommandsCountAddress, uint32_t stride ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdDecompressMemoryIndirectCountNV && "Function requires " ); getDispatcher()->vkCmdDecompressMemoryIndirectCountNV( static_cast( m_commandBuffer ), static_cast( indirectCommandsAddress ), static_cast( indirectCommandsCountAddress ), stride ); } //=== VK_NV_device_generated_commands_compute === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MemoryRequirements2 Device::getPipelineIndirectMemoryRequirementsNV( const VULKAN_HPP_NAMESPACE::ComputePipelineCreateInfo & createInfo ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPipelineIndirectMemoryRequirementsNV && "Function requires " ); VULKAN_HPP_NAMESPACE::MemoryRequirements2 memoryRequirements; getDispatcher()->vkGetPipelineIndirectMemoryRequirementsNV( static_cast( m_device ), reinterpret_cast( &createInfo ), reinterpret_cast( &memoryRequirements ) ); return memoryRequirements; } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::StructureChain Device::getPipelineIndirectMemoryRequirementsNV( const VULKAN_HPP_NAMESPACE::ComputePipelineCreateInfo & createInfo ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPipelineIndirectMemoryRequirementsNV && "Function requires " ); VULKAN_HPP_NAMESPACE::StructureChain structureChain; VULKAN_HPP_NAMESPACE::MemoryRequirements2 & memoryRequirements = structureChain.template get(); getDispatcher()->vkGetPipelineIndirectMemoryRequirementsNV( static_cast( m_device ), reinterpret_cast( &createInfo ), reinterpret_cast( &memoryRequirements ) ); return structureChain; } VULKAN_HPP_INLINE void CommandBuffer::updatePipelineIndirectBufferNV( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint, VULKAN_HPP_NAMESPACE::Pipeline pipeline ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdUpdatePipelineIndirectBufferNV && "Function requires " ); getDispatcher()->vkCmdUpdatePipelineIndirectBufferNV( static_cast( m_commandBuffer ), static_cast( pipelineBindPoint ), static_cast( pipeline ) ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::DeviceAddress Device::getPipelineIndirectAddressNV( const VULKAN_HPP_NAMESPACE::PipelineIndirectDeviceAddressInfoNV & info ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPipelineIndirectDeviceAddressNV && "Function requires " ); VkDeviceAddress result = getDispatcher()->vkGetPipelineIndirectDeviceAddressNV( static_cast( m_device ), reinterpret_cast( &info ) ); return static_cast( result ); } //=== VK_EXT_extended_dynamic_state3 === VULKAN_HPP_INLINE void CommandBuffer::setDepthClampEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 depthClampEnable ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetDepthClampEnableEXT && "Function requires or " ); getDispatcher()->vkCmdSetDepthClampEnableEXT( static_cast( m_commandBuffer ), static_cast( depthClampEnable ) ); } VULKAN_HPP_INLINE void CommandBuffer::setPolygonModeEXT( VULKAN_HPP_NAMESPACE::PolygonMode polygonMode ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetPolygonModeEXT && "Function requires or " ); getDispatcher()->vkCmdSetPolygonModeEXT( static_cast( m_commandBuffer ), static_cast( polygonMode ) ); } VULKAN_HPP_INLINE void CommandBuffer::setRasterizationSamplesEXT( VULKAN_HPP_NAMESPACE::SampleCountFlagBits rasterizationSamples ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetRasterizationSamplesEXT && "Function requires or " ); getDispatcher()->vkCmdSetRasterizationSamplesEXT( static_cast( m_commandBuffer ), static_cast( rasterizationSamples ) ); } VULKAN_HPP_INLINE void CommandBuffer::setSampleMaskEXT( VULKAN_HPP_NAMESPACE::SampleCountFlagBits samples, VULKAN_HPP_NAMESPACE::ArrayProxy const & sampleMask ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetSampleMaskEXT && "Function requires or " ); # ifdef VULKAN_HPP_NO_EXCEPTIONS VULKAN_HPP_ASSERT( sampleMask.size() == ( static_cast( samples ) + 31 ) / 32 ); # else if ( sampleMask.size() != ( static_cast( samples ) + 31 ) / 32 ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::setSampleMaskEXT: sampleMask.size() != ( static_cast( samples ) + 31 ) / 32" ); } # endif /*VULKAN_HPP_NO_EXCEPTIONS*/ getDispatcher()->vkCmdSetSampleMaskEXT( static_cast( m_commandBuffer ), static_cast( samples ), reinterpret_cast( sampleMask.data() ) ); } VULKAN_HPP_INLINE void CommandBuffer::setAlphaToCoverageEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 alphaToCoverageEnable ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetAlphaToCoverageEnableEXT && "Function requires or " ); getDispatcher()->vkCmdSetAlphaToCoverageEnableEXT( static_cast( m_commandBuffer ), static_cast( alphaToCoverageEnable ) ); } VULKAN_HPP_INLINE void CommandBuffer::setAlphaToOneEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 alphaToOneEnable ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetAlphaToOneEnableEXT && "Function requires or " ); getDispatcher()->vkCmdSetAlphaToOneEnableEXT( static_cast( m_commandBuffer ), static_cast( alphaToOneEnable ) ); } VULKAN_HPP_INLINE void CommandBuffer::setLogicOpEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 logicOpEnable ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetLogicOpEnableEXT && "Function requires or " ); getDispatcher()->vkCmdSetLogicOpEnableEXT( static_cast( m_commandBuffer ), static_cast( logicOpEnable ) ); } VULKAN_HPP_INLINE void CommandBuffer::setColorBlendEnableEXT( uint32_t firstAttachment, VULKAN_HPP_NAMESPACE::ArrayProxy const & colorBlendEnables ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetColorBlendEnableEXT && "Function requires or " ); getDispatcher()->vkCmdSetColorBlendEnableEXT( static_cast( m_commandBuffer ), firstAttachment, colorBlendEnables.size(), reinterpret_cast( colorBlendEnables.data() ) ); } VULKAN_HPP_INLINE void CommandBuffer::setColorBlendEquationEXT( uint32_t firstAttachment, VULKAN_HPP_NAMESPACE::ArrayProxy const & colorBlendEquations ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetColorBlendEquationEXT && "Function requires or " ); getDispatcher()->vkCmdSetColorBlendEquationEXT( static_cast( m_commandBuffer ), firstAttachment, colorBlendEquations.size(), reinterpret_cast( colorBlendEquations.data() ) ); } VULKAN_HPP_INLINE void CommandBuffer::setColorWriteMaskEXT( uint32_t firstAttachment, VULKAN_HPP_NAMESPACE::ArrayProxy const & colorWriteMasks ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetColorWriteMaskEXT && "Function requires or " ); getDispatcher()->vkCmdSetColorWriteMaskEXT( static_cast( m_commandBuffer ), firstAttachment, colorWriteMasks.size(), reinterpret_cast( colorWriteMasks.data() ) ); } VULKAN_HPP_INLINE void CommandBuffer::setTessellationDomainOriginEXT( VULKAN_HPP_NAMESPACE::TessellationDomainOrigin domainOrigin ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetTessellationDomainOriginEXT && "Function requires or " ); getDispatcher()->vkCmdSetTessellationDomainOriginEXT( static_cast( m_commandBuffer ), static_cast( domainOrigin ) ); } VULKAN_HPP_INLINE void CommandBuffer::setRasterizationStreamEXT( uint32_t rasterizationStream ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetRasterizationStreamEXT && "Function requires or " ); getDispatcher()->vkCmdSetRasterizationStreamEXT( static_cast( m_commandBuffer ), rasterizationStream ); } VULKAN_HPP_INLINE void CommandBuffer::setConservativeRasterizationModeEXT( VULKAN_HPP_NAMESPACE::ConservativeRasterizationModeEXT conservativeRasterizationMode ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetConservativeRasterizationModeEXT && "Function requires or " ); getDispatcher()->vkCmdSetConservativeRasterizationModeEXT( static_cast( m_commandBuffer ), static_cast( conservativeRasterizationMode ) ); } VULKAN_HPP_INLINE void CommandBuffer::setExtraPrimitiveOverestimationSizeEXT( float extraPrimitiveOverestimationSize ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetExtraPrimitiveOverestimationSizeEXT && "Function requires or " ); getDispatcher()->vkCmdSetExtraPrimitiveOverestimationSizeEXT( static_cast( m_commandBuffer ), extraPrimitiveOverestimationSize ); } VULKAN_HPP_INLINE void CommandBuffer::setDepthClipEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 depthClipEnable ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetDepthClipEnableEXT && "Function requires or " ); getDispatcher()->vkCmdSetDepthClipEnableEXT( static_cast( m_commandBuffer ), static_cast( depthClipEnable ) ); } VULKAN_HPP_INLINE void CommandBuffer::setSampleLocationsEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 sampleLocationsEnable ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetSampleLocationsEnableEXT && "Function requires or " ); getDispatcher()->vkCmdSetSampleLocationsEnableEXT( static_cast( m_commandBuffer ), static_cast( sampleLocationsEnable ) ); } VULKAN_HPP_INLINE void CommandBuffer::setColorBlendAdvancedEXT( uint32_t firstAttachment, VULKAN_HPP_NAMESPACE::ArrayProxy const & colorBlendAdvanced ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetColorBlendAdvancedEXT && "Function requires or " ); getDispatcher()->vkCmdSetColorBlendAdvancedEXT( static_cast( m_commandBuffer ), firstAttachment, colorBlendAdvanced.size(), reinterpret_cast( colorBlendAdvanced.data() ) ); } VULKAN_HPP_INLINE void CommandBuffer::setProvokingVertexModeEXT( VULKAN_HPP_NAMESPACE::ProvokingVertexModeEXT provokingVertexMode ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetProvokingVertexModeEXT && "Function requires or " ); getDispatcher()->vkCmdSetProvokingVertexModeEXT( static_cast( m_commandBuffer ), static_cast( provokingVertexMode ) ); } VULKAN_HPP_INLINE void CommandBuffer::setLineRasterizationModeEXT( VULKAN_HPP_NAMESPACE::LineRasterizationModeEXT lineRasterizationMode ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetLineRasterizationModeEXT && "Function requires or " ); getDispatcher()->vkCmdSetLineRasterizationModeEXT( static_cast( m_commandBuffer ), static_cast( lineRasterizationMode ) ); } VULKAN_HPP_INLINE void CommandBuffer::setLineStippleEnableEXT( VULKAN_HPP_NAMESPACE::Bool32 stippledLineEnable ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetLineStippleEnableEXT && "Function requires or " ); getDispatcher()->vkCmdSetLineStippleEnableEXT( static_cast( m_commandBuffer ), static_cast( stippledLineEnable ) ); } VULKAN_HPP_INLINE void CommandBuffer::setDepthClipNegativeOneToOneEXT( VULKAN_HPP_NAMESPACE::Bool32 negativeOneToOne ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetDepthClipNegativeOneToOneEXT && "Function requires or " ); getDispatcher()->vkCmdSetDepthClipNegativeOneToOneEXT( static_cast( m_commandBuffer ), static_cast( negativeOneToOne ) ); } VULKAN_HPP_INLINE void CommandBuffer::setViewportWScalingEnableNV( VULKAN_HPP_NAMESPACE::Bool32 viewportWScalingEnable ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetViewportWScalingEnableNV && "Function requires or " ); getDispatcher()->vkCmdSetViewportWScalingEnableNV( static_cast( m_commandBuffer ), static_cast( viewportWScalingEnable ) ); } VULKAN_HPP_INLINE void CommandBuffer::setViewportSwizzleNV( uint32_t firstViewport, VULKAN_HPP_NAMESPACE::ArrayProxy const & viewportSwizzles ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetViewportSwizzleNV && "Function requires or " ); getDispatcher()->vkCmdSetViewportSwizzleNV( static_cast( m_commandBuffer ), firstViewport, viewportSwizzles.size(), reinterpret_cast( viewportSwizzles.data() ) ); } VULKAN_HPP_INLINE void CommandBuffer::setCoverageToColorEnableNV( VULKAN_HPP_NAMESPACE::Bool32 coverageToColorEnable ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetCoverageToColorEnableNV && "Function requires or " ); getDispatcher()->vkCmdSetCoverageToColorEnableNV( static_cast( m_commandBuffer ), static_cast( coverageToColorEnable ) ); } VULKAN_HPP_INLINE void CommandBuffer::setCoverageToColorLocationNV( uint32_t coverageToColorLocation ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetCoverageToColorLocationNV && "Function requires or " ); getDispatcher()->vkCmdSetCoverageToColorLocationNV( static_cast( m_commandBuffer ), coverageToColorLocation ); } VULKAN_HPP_INLINE void CommandBuffer::setCoverageModulationModeNV( VULKAN_HPP_NAMESPACE::CoverageModulationModeNV coverageModulationMode ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetCoverageModulationModeNV && "Function requires or " ); getDispatcher()->vkCmdSetCoverageModulationModeNV( static_cast( m_commandBuffer ), static_cast( coverageModulationMode ) ); } VULKAN_HPP_INLINE void CommandBuffer::setCoverageModulationTableEnableNV( VULKAN_HPP_NAMESPACE::Bool32 coverageModulationTableEnable ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetCoverageModulationTableEnableNV && "Function requires or " ); getDispatcher()->vkCmdSetCoverageModulationTableEnableNV( static_cast( m_commandBuffer ), static_cast( coverageModulationTableEnable ) ); } VULKAN_HPP_INLINE void CommandBuffer::setCoverageModulationTableNV( VULKAN_HPP_NAMESPACE::ArrayProxy const & coverageModulationTable ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetCoverageModulationTableNV && "Function requires or " ); getDispatcher()->vkCmdSetCoverageModulationTableNV( static_cast( m_commandBuffer ), coverageModulationTable.size(), coverageModulationTable.data() ); } VULKAN_HPP_INLINE void CommandBuffer::setShadingRateImageEnableNV( VULKAN_HPP_NAMESPACE::Bool32 shadingRateImageEnable ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetShadingRateImageEnableNV && "Function requires or " ); getDispatcher()->vkCmdSetShadingRateImageEnableNV( static_cast( m_commandBuffer ), static_cast( shadingRateImageEnable ) ); } VULKAN_HPP_INLINE void CommandBuffer::setRepresentativeFragmentTestEnableNV( VULKAN_HPP_NAMESPACE::Bool32 representativeFragmentTestEnable ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetRepresentativeFragmentTestEnableNV && "Function requires or " ); getDispatcher()->vkCmdSetRepresentativeFragmentTestEnableNV( static_cast( m_commandBuffer ), static_cast( representativeFragmentTestEnable ) ); } VULKAN_HPP_INLINE void CommandBuffer::setCoverageReductionModeNV( VULKAN_HPP_NAMESPACE::CoverageReductionModeNV coverageReductionMode ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetCoverageReductionModeNV && "Function requires or " ); getDispatcher()->vkCmdSetCoverageReductionModeNV( static_cast( m_commandBuffer ), static_cast( coverageReductionMode ) ); } //=== VK_EXT_shader_module_identifier === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::ShaderModuleIdentifierEXT ShaderModule::getIdentifierEXT() const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetShaderModuleIdentifierEXT && "Function requires " ); VULKAN_HPP_NAMESPACE::ShaderModuleIdentifierEXT identifier; getDispatcher()->vkGetShaderModuleIdentifierEXT( static_cast( m_device ), static_cast( m_shaderModule ), reinterpret_cast( &identifier ) ); return identifier; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::ShaderModuleIdentifierEXT Device::getShaderModuleCreateInfoIdentifierEXT( const VULKAN_HPP_NAMESPACE::ShaderModuleCreateInfo & createInfo ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetShaderModuleCreateInfoIdentifierEXT && "Function requires " ); VULKAN_HPP_NAMESPACE::ShaderModuleIdentifierEXT identifier; getDispatcher()->vkGetShaderModuleCreateInfoIdentifierEXT( static_cast( m_device ), reinterpret_cast( &createInfo ), reinterpret_cast( &identifier ) ); return identifier; } //=== VK_NV_optical_flow === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector PhysicalDevice::getOpticalFlowImageFormatsNV( const VULKAN_HPP_NAMESPACE::OpticalFlowImageFormatInfoNV & opticalFlowImageFormatInfo ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceOpticalFlowImageFormatsNV && "Function requires " ); std::vector imageFormatProperties; uint32_t formatCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( getDispatcher()->vkGetPhysicalDeviceOpticalFlowImageFormatsNV( static_cast( m_physicalDevice ), reinterpret_cast( &opticalFlowImageFormatInfo ), &formatCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && formatCount ) { imageFormatProperties.resize( formatCount ); result = static_cast( getDispatcher()->vkGetPhysicalDeviceOpticalFlowImageFormatsNV( static_cast( m_physicalDevice ), reinterpret_cast( &opticalFlowImageFormatInfo ), &formatCount, reinterpret_cast( imageFormatProperties.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getOpticalFlowImageFormatsNV" ); VULKAN_HPP_ASSERT( formatCount <= imageFormatProperties.size() ); if ( formatCount < imageFormatProperties.size() ) { imageFormatProperties.resize( formatCount ); } return imageFormatProperties; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type Device::createOpticalFlowSessionNV( VULKAN_HPP_NAMESPACE::OpticalFlowSessionCreateInfoNV const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { VULKAN_HPP_NAMESPACE::OpticalFlowSessionNV session; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateOpticalFlowSessionNV( static_cast( m_device ), reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &session ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { # if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) return VULKAN_HPP_UNEXPECTED( result ); # else VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createOpticalFlowSessionNV" ); # endif } return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::OpticalFlowSessionNV( *this, *reinterpret_cast( &session ), allocator ); } VULKAN_HPP_INLINE void OpticalFlowSessionNV::bindImage( VULKAN_HPP_NAMESPACE::OpticalFlowSessionBindingPointNV bindingPoint, VULKAN_HPP_NAMESPACE::ImageView view, VULKAN_HPP_NAMESPACE::ImageLayout layout ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkBindOpticalFlowSessionImageNV && "Function requires " ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkBindOpticalFlowSessionImageNV( static_cast( m_device ), static_cast( m_session ), static_cast( bindingPoint ), static_cast( view ), static_cast( layout ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::OpticalFlowSessionNV::bindImage" ); } VULKAN_HPP_INLINE void CommandBuffer::opticalFlowExecuteNV( VULKAN_HPP_NAMESPACE::OpticalFlowSessionNV session, const VULKAN_HPP_NAMESPACE::OpticalFlowExecuteInfoNV & executeInfo ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdOpticalFlowExecuteNV && "Function requires " ); getDispatcher()->vkCmdOpticalFlowExecuteNV( static_cast( m_commandBuffer ), static_cast( session ), reinterpret_cast( &executeInfo ) ); } //=== VK_KHR_maintenance5 === VULKAN_HPP_INLINE void CommandBuffer::bindIndexBuffer2KHR( VULKAN_HPP_NAMESPACE::Buffer buffer, VULKAN_HPP_NAMESPACE::DeviceSize offset, VULKAN_HPP_NAMESPACE::DeviceSize size, VULKAN_HPP_NAMESPACE::IndexType indexType ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdBindIndexBuffer2KHR && "Function requires or " ); getDispatcher()->vkCmdBindIndexBuffer2KHR( static_cast( m_commandBuffer ), static_cast( buffer ), static_cast( offset ), static_cast( size ), static_cast( indexType ) ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Extent2D Device::getRenderingAreaGranularityKHR( const VULKAN_HPP_NAMESPACE::RenderingAreaInfo & renderingAreaInfo ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetRenderingAreaGranularityKHR && "Function requires or " ); VULKAN_HPP_NAMESPACE::Extent2D granularity; getDispatcher()->vkGetRenderingAreaGranularityKHR( static_cast( m_device ), reinterpret_cast( &renderingAreaInfo ), reinterpret_cast( &granularity ) ); return granularity; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::SubresourceLayout2 Device::getImageSubresourceLayoutKHR( const VULKAN_HPP_NAMESPACE::DeviceImageSubresourceInfo & info ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetDeviceImageSubresourceLayoutKHR && "Function requires or " ); VULKAN_HPP_NAMESPACE::SubresourceLayout2 layout; getDispatcher()->vkGetDeviceImageSubresourceLayoutKHR( static_cast( m_device ), reinterpret_cast( &info ), reinterpret_cast( &layout ) ); return layout; } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::StructureChain Device::getImageSubresourceLayoutKHR( const VULKAN_HPP_NAMESPACE::DeviceImageSubresourceInfo & info ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetDeviceImageSubresourceLayoutKHR && "Function requires or " ); VULKAN_HPP_NAMESPACE::StructureChain structureChain; VULKAN_HPP_NAMESPACE::SubresourceLayout2 & layout = structureChain.template get(); getDispatcher()->vkGetDeviceImageSubresourceLayoutKHR( static_cast( m_device ), reinterpret_cast( &info ), reinterpret_cast( &layout ) ); return structureChain; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::SubresourceLayout2 Image::getSubresourceLayout2KHR( const VULKAN_HPP_NAMESPACE::ImageSubresource2 & subresource ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetImageSubresourceLayout2KHR && "Function requires or or or " ); VULKAN_HPP_NAMESPACE::SubresourceLayout2 layout; getDispatcher()->vkGetImageSubresourceLayout2KHR( static_cast( m_device ), static_cast( m_image ), reinterpret_cast( &subresource ), reinterpret_cast( &layout ) ); return layout; } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::StructureChain Image::getSubresourceLayout2KHR( const VULKAN_HPP_NAMESPACE::ImageSubresource2 & subresource ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetImageSubresourceLayout2KHR && "Function requires or or or " ); VULKAN_HPP_NAMESPACE::StructureChain structureChain; VULKAN_HPP_NAMESPACE::SubresourceLayout2 & layout = structureChain.template get(); getDispatcher()->vkGetImageSubresourceLayout2KHR( static_cast( m_device ), static_cast( m_image ), reinterpret_cast( &subresource ), reinterpret_cast( &layout ) ); return structureChain; } //=== VK_AMD_anti_lag === VULKAN_HPP_INLINE void Device::antiLagUpdateAMD( const VULKAN_HPP_NAMESPACE::AntiLagDataAMD & data ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkAntiLagUpdateAMD && "Function requires " ); getDispatcher()->vkAntiLagUpdateAMD( static_cast( m_device ), reinterpret_cast( &data ) ); } //=== VK_EXT_shader_object === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType>::Type Device::createShadersEXT( VULKAN_HPP_NAMESPACE::ArrayProxy const & createInfos, VULKAN_HPP_NAMESPACE::Optional allocator ) const { std::vector shaders( createInfos.size() ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateShadersEXT( static_cast( m_device ), createInfos.size(), reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( shaders.data() ) ) ); if ( ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) && ( result != VULKAN_HPP_NAMESPACE::Result::eIncompatibleShaderBinaryEXT ) ) { # if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) return VULKAN_HPP_UNEXPECTED( result ); # else VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createShadersEXT" ); # endif } std::vector shadersRAII; shadersRAII.reserve( shaders.size() ); for ( auto & shader : shaders ) { shadersRAII.emplace_back( *this, *reinterpret_cast( &shader ), allocator, result ); } return shadersRAII; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type Device::createShaderEXT( VULKAN_HPP_NAMESPACE::ShaderCreateInfoEXT const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { VULKAN_HPP_NAMESPACE::ShaderEXT shader; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateShadersEXT( static_cast( m_device ), 1, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &shader ) ) ); if ( ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) && ( result != VULKAN_HPP_NAMESPACE::Result::eIncompatibleShaderBinaryEXT ) ) { # if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) return VULKAN_HPP_UNEXPECTED( result ); # else VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createShaderEXT" ); # endif } return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::ShaderEXT( *this, *reinterpret_cast( &shader ), allocator, result ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector ShaderEXT::getBinaryData() const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetShaderBinaryDataEXT && "Function requires " ); std::vector data; size_t dataSize; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( getDispatcher()->vkGetShaderBinaryDataEXT( static_cast( m_device ), static_cast( m_shader ), &dataSize, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && dataSize ) { data.resize( dataSize ); result = static_cast( getDispatcher()->vkGetShaderBinaryDataEXT( static_cast( m_device ), static_cast( m_shader ), &dataSize, reinterpret_cast( data.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::ShaderEXT::getBinaryData" ); VULKAN_HPP_ASSERT( dataSize <= data.size() ); if ( dataSize < data.size() ) { data.resize( dataSize ); } return data; } VULKAN_HPP_INLINE void CommandBuffer::bindShadersEXT( VULKAN_HPP_NAMESPACE::ArrayProxy const & stages, VULKAN_HPP_NAMESPACE::ArrayProxy const & shaders ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdBindShadersEXT && "Function requires " ); # ifdef VULKAN_HPP_NO_EXCEPTIONS VULKAN_HPP_ASSERT( stages.size() == shaders.size() ); # else if ( stages.size() != shaders.size() ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::CommandBuffer::bindShadersEXT: stages.size() != shaders.size()" ); } # endif /*VULKAN_HPP_NO_EXCEPTIONS*/ getDispatcher()->vkCmdBindShadersEXT( static_cast( m_commandBuffer ), stages.size(), reinterpret_cast( stages.data() ), reinterpret_cast( shaders.data() ) ); } VULKAN_HPP_INLINE void CommandBuffer::setDepthClampRangeEXT( VULKAN_HPP_NAMESPACE::DepthClampModeEXT depthClampMode, Optional depthClampRange ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetDepthClampRangeEXT && "Function requires or " ); getDispatcher()->vkCmdSetDepthClampRangeEXT( static_cast( m_commandBuffer ), static_cast( depthClampMode ), reinterpret_cast( static_cast( depthClampRange ) ) ); } //=== VK_KHR_pipeline_binary === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType< std::vector>::Type Device::createPipelineBinariesKHR( VULKAN_HPP_NAMESPACE::PipelineBinaryCreateInfoKHR const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const { std::vector pipelineBinaries; VULKAN_HPP_NAMESPACE::PipelineBinaryHandlesInfoKHR binaries; VULKAN_HPP_NAMESPACE::Result result; if ( createInfo.pKeysAndDataInfo ) { VULKAN_HPP_ASSERT( !createInfo.pipeline && !createInfo.pPipelineCreateInfo ); pipelineBinaries.resize( createInfo.pKeysAndDataInfo->binaryCount ); binaries.pipelineBinaryCount = createInfo.pKeysAndDataInfo->binaryCount; binaries.pPipelineBinaries = pipelineBinaries.data(); result = static_cast( getDispatcher()->vkCreatePipelineBinariesKHR( static_cast( m_device ), reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &binaries ) ) ); } else { VULKAN_HPP_ASSERT( !createInfo.pipeline ^ !createInfo.pPipelineCreateInfo ); result = static_cast( getDispatcher()->vkCreatePipelineBinariesKHR( static_cast( m_device ), reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &binaries ) ) ); if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) { pipelineBinaries.resize( binaries.pipelineBinaryCount ); binaries.pPipelineBinaries = pipelineBinaries.data(); result = static_cast( getDispatcher()->vkCreatePipelineBinariesKHR( static_cast( m_device ), reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &binaries ) ) ); } } if ( ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) && ( result != VULKAN_HPP_NAMESPACE::Result::eIncomplete ) && ( result != VULKAN_HPP_NAMESPACE::Result::ePipelineBinaryMissingKHR ) ) { # if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) return VULKAN_HPP_UNEXPECTED( result ); # else VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createPipelineBinariesKHR" ); # endif } std::vector pipelineBinariesRAII; pipelineBinariesRAII.reserve( pipelineBinaries.size() ); for ( auto & pipelineBinary : pipelineBinaries ) { pipelineBinariesRAII.emplace_back( *this, *reinterpret_cast( &pipelineBinary ), allocator, result ); } return pipelineBinariesRAII; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::PipelineBinaryKeyKHR Device::getPipelineKeyKHR( Optional pipelineCreateInfo ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPipelineKeyKHR && "Function requires " ); VULKAN_HPP_NAMESPACE::PipelineBinaryKeyKHR pipelineKey; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetPipelineKeyKHR( static_cast( m_device ), reinterpret_cast( static_cast( pipelineCreateInfo ) ), reinterpret_cast( &pipelineKey ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getPipelineKeyKHR" ); return pipelineKey; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::pair> Device::getPipelineBinaryDataKHR( const VULKAN_HPP_NAMESPACE::PipelineBinaryDataInfoKHR & info ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPipelineBinaryDataKHR && "Function requires " ); std::pair> data_; VULKAN_HPP_NAMESPACE::PipelineBinaryKeyKHR & pipelineBinaryKey = data_.first; std::vector & pipelineBinaryData = data_.second; size_t pipelineBinaryDataSize; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetPipelineBinaryDataKHR( static_cast( m_device ), reinterpret_cast( &info ), reinterpret_cast( &pipelineBinaryKey ), &pipelineBinaryDataSize, nullptr ) ); if ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) { pipelineBinaryData.resize( pipelineBinaryDataSize ); result = static_cast( getDispatcher()->vkGetPipelineBinaryDataKHR( static_cast( m_device ), reinterpret_cast( &info ), reinterpret_cast( &pipelineBinaryKey ), &pipelineBinaryDataSize, reinterpret_cast( pipelineBinaryData.data() ) ) ); } VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getPipelineBinaryDataKHR" ); return data_; } VULKAN_HPP_INLINE void Device::releaseCapturedPipelineDataKHR( const VULKAN_HPP_NAMESPACE::ReleaseCapturedPipelineDataInfoKHR & info, Optional allocator ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkReleaseCapturedPipelineDataKHR && "Function requires " ); getDispatcher()->vkReleaseCapturedPipelineDataKHR( static_cast( m_device ), reinterpret_cast( &info ), reinterpret_cast( static_cast( allocator ) ) ); } //=== VK_QCOM_tile_properties === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector Framebuffer::getTilePropertiesQCOM() const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetFramebufferTilePropertiesQCOM && "Function requires " ); std::vector properties; uint32_t propertiesCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( getDispatcher()->vkGetFramebufferTilePropertiesQCOM( static_cast( m_device ), static_cast( m_framebuffer ), &propertiesCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertiesCount ) { properties.resize( propertiesCount ); result = static_cast( getDispatcher()->vkGetFramebufferTilePropertiesQCOM( static_cast( m_device ), static_cast( m_framebuffer ), &propertiesCount, reinterpret_cast( properties.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_ASSERT( propertiesCount <= properties.size() ); if ( propertiesCount < properties.size() ) { properties.resize( propertiesCount ); } return properties; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::TilePropertiesQCOM Device::getDynamicRenderingTilePropertiesQCOM( const VULKAN_HPP_NAMESPACE::RenderingInfo & renderingInfo ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetDynamicRenderingTilePropertiesQCOM && "Function requires " ); VULKAN_HPP_NAMESPACE::TilePropertiesQCOM properties; getDispatcher()->vkGetDynamicRenderingTilePropertiesQCOM( static_cast( m_device ), reinterpret_cast( &renderingInfo ), reinterpret_cast( &properties ) ); return properties; } //=== VK_NV_cooperative_vector === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector PhysicalDevice::getCooperativeVectorPropertiesNV() const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceCooperativeVectorPropertiesNV && "Function requires " ); std::vector properties; uint32_t propertyCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( getDispatcher()->vkGetPhysicalDeviceCooperativeVectorPropertiesNV( static_cast( m_physicalDevice ), &propertyCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); result = static_cast( getDispatcher()->vkGetPhysicalDeviceCooperativeVectorPropertiesNV( static_cast( m_physicalDevice ), &propertyCount, reinterpret_cast( properties.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getCooperativeVectorPropertiesNV" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } return properties; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::Result Device::convertCooperativeVectorMatrixNV( const VULKAN_HPP_NAMESPACE::ConvertCooperativeVectorMatrixInfoNV & info ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkConvertCooperativeVectorMatrixNV && "Function requires " ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkConvertCooperativeVectorMatrixNV( static_cast( m_device ), reinterpret_cast( &info ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::convertCooperativeVectorMatrixNV", { VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::eIncomplete } ); return static_cast( result ); } VULKAN_HPP_INLINE void CommandBuffer::convertCooperativeVectorMatrixNV( VULKAN_HPP_NAMESPACE::ArrayProxy const & infos ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdConvertCooperativeVectorMatrixNV && "Function requires " ); getDispatcher()->vkCmdConvertCooperativeVectorMatrixNV( static_cast( m_commandBuffer ), infos.size(), reinterpret_cast( infos.data() ) ); } //=== VK_NV_low_latency2 === VULKAN_HPP_INLINE void SwapchainKHR::setLatencySleepModeNV( const VULKAN_HPP_NAMESPACE::LatencySleepModeInfoNV & sleepModeInfo ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkSetLatencySleepModeNV && "Function requires " ); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkSetLatencySleepModeNV( static_cast( m_device ), static_cast( m_swapchain ), reinterpret_cast( &sleepModeInfo ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::SwapchainKHR::setLatencySleepModeNV" ); } VULKAN_HPP_INLINE void SwapchainKHR::latencySleepNV( const VULKAN_HPP_NAMESPACE::LatencySleepInfoNV & sleepInfo ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkLatencySleepNV && "Function requires " ); getDispatcher()->vkLatencySleepNV( static_cast( m_device ), static_cast( m_swapchain ), reinterpret_cast( &sleepInfo ) ); } VULKAN_HPP_INLINE void SwapchainKHR::setLatencyMarkerNV( const VULKAN_HPP_NAMESPACE::SetLatencyMarkerInfoNV & latencyMarkerInfo ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkSetLatencyMarkerNV && "Function requires " ); getDispatcher()->vkSetLatencyMarkerNV( static_cast( m_device ), static_cast( m_swapchain ), reinterpret_cast( &latencyMarkerInfo ) ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector SwapchainKHR::getLatencyTimingsNV() const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetLatencyTimingsNV && "Function requires " ); std::vector timings; VULKAN_HPP_NAMESPACE::GetLatencyMarkerInfoNV latencyMarkerInfo; getDispatcher()->vkGetLatencyTimingsNV( static_cast( m_device ), static_cast( m_swapchain ), reinterpret_cast( &latencyMarkerInfo ) ); timings.resize( latencyMarkerInfo.timingCount ); latencyMarkerInfo.pTimings = timings.data(); getDispatcher()->vkGetLatencyTimingsNV( static_cast( m_device ), static_cast( m_swapchain ), reinterpret_cast( &latencyMarkerInfo ) ); return timings; } VULKAN_HPP_INLINE void Queue::notifyOutOfBandNV( const VULKAN_HPP_NAMESPACE::OutOfBandQueueTypeInfoNV & queueTypeInfo ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkQueueNotifyOutOfBandNV && "Function requires " ); getDispatcher()->vkQueueNotifyOutOfBandNV( static_cast( m_queue ), reinterpret_cast( &queueTypeInfo ) ); } //=== VK_KHR_cooperative_matrix === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector PhysicalDevice::getCooperativeMatrixPropertiesKHR() const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR && "Function requires " ); std::vector properties; uint32_t propertyCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( getDispatcher()->vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR( static_cast( m_physicalDevice ), &propertyCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); result = static_cast( getDispatcher()->vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR( static_cast( m_physicalDevice ), &propertyCount, reinterpret_cast( properties.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getCooperativeMatrixPropertiesKHR" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } return properties; } //=== VK_EXT_attachment_feedback_loop_dynamic_state === VULKAN_HPP_INLINE void CommandBuffer::setAttachmentFeedbackLoopEnableEXT( VULKAN_HPP_NAMESPACE::ImageAspectFlags aspectMask ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetAttachmentFeedbackLoopEnableEXT && "Function requires " ); getDispatcher()->vkCmdSetAttachmentFeedbackLoopEnableEXT( static_cast( m_commandBuffer ), static_cast( aspectMask ) ); } # if defined( VK_USE_PLATFORM_SCREEN_QNX ) //=== VK_QNX_external_memory_screen_buffer === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::ScreenBufferPropertiesQNX Device::getScreenBufferPropertiesQNX( const struct _screen_buffer & buffer ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetScreenBufferPropertiesQNX && "Function requires " ); VULKAN_HPP_NAMESPACE::ScreenBufferPropertiesQNX properties; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetScreenBufferPropertiesQNX( static_cast( m_device ), &buffer, reinterpret_cast( &properties ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getScreenBufferPropertiesQNX" ); return properties; } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::StructureChain Device::getScreenBufferPropertiesQNX( const struct _screen_buffer & buffer ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetScreenBufferPropertiesQNX && "Function requires " ); StructureChain structureChain; VULKAN_HPP_NAMESPACE::ScreenBufferPropertiesQNX & properties = structureChain.template get(); VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetScreenBufferPropertiesQNX( static_cast( m_device ), &buffer, reinterpret_cast( &properties ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getScreenBufferPropertiesQNX" ); return structureChain; } # endif /*VK_USE_PLATFORM_SCREEN_QNX*/ //=== VK_KHR_line_rasterization === VULKAN_HPP_INLINE void CommandBuffer::setLineStippleKHR( uint32_t lineStippleFactor, uint16_t lineStipplePattern ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetLineStippleKHR && "Function requires or or " ); getDispatcher()->vkCmdSetLineStippleKHR( static_cast( m_commandBuffer ), lineStippleFactor, lineStipplePattern ); } //=== VK_KHR_calibrated_timestamps === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector PhysicalDevice::getCalibrateableTimeDomainsKHR() const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceCalibrateableTimeDomainsKHR && "Function requires or " ); std::vector timeDomains; uint32_t timeDomainCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( getDispatcher()->vkGetPhysicalDeviceCalibrateableTimeDomainsKHR( static_cast( m_physicalDevice ), &timeDomainCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && timeDomainCount ) { timeDomains.resize( timeDomainCount ); result = static_cast( getDispatcher()->vkGetPhysicalDeviceCalibrateableTimeDomainsKHR( static_cast( m_physicalDevice ), &timeDomainCount, reinterpret_cast( timeDomains.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getCalibrateableTimeDomainsKHR" ); VULKAN_HPP_ASSERT( timeDomainCount <= timeDomains.size() ); if ( timeDomainCount < timeDomains.size() ) { timeDomains.resize( timeDomainCount ); } return timeDomains; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::pair, uint64_t> Device::getCalibratedTimestampsKHR( VULKAN_HPP_NAMESPACE::ArrayProxy const & timestampInfos ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetCalibratedTimestampsKHR && "Function requires or " ); std::pair, uint64_t> data_( std::piecewise_construct, std::forward_as_tuple( timestampInfos.size() ), std::forward_as_tuple( 0 ) ); std::vector & timestamps = data_.first; uint64_t & maxDeviation = data_.second; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetCalibratedTimestampsKHR( static_cast( m_device ), timestampInfos.size(), reinterpret_cast( timestampInfos.data() ), timestamps.data(), &maxDeviation ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getCalibratedTimestampsKHR" ); return data_; } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::pair Device::getCalibratedTimestampKHR( const VULKAN_HPP_NAMESPACE::CalibratedTimestampInfoKHR & timestampInfo ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetCalibratedTimestampsKHR && "Function requires or " ); std::pair data_; uint64_t & timestamp = data_.first; uint64_t & maxDeviation = data_.second; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetCalibratedTimestampsKHR( static_cast( m_device ), 1, reinterpret_cast( ×tampInfo ), ×tamp, &maxDeviation ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getCalibratedTimestampKHR" ); return data_; } //=== VK_KHR_maintenance6 === VULKAN_HPP_INLINE void CommandBuffer::bindDescriptorSets2KHR( const VULKAN_HPP_NAMESPACE::BindDescriptorSetsInfo & bindDescriptorSetsInfo ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdBindDescriptorSets2KHR && "Function requires or " ); getDispatcher()->vkCmdBindDescriptorSets2KHR( static_cast( m_commandBuffer ), reinterpret_cast( &bindDescriptorSetsInfo ) ); } VULKAN_HPP_INLINE void CommandBuffer::pushConstants2KHR( const VULKAN_HPP_NAMESPACE::PushConstantsInfo & pushConstantsInfo ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdPushConstants2KHR && "Function requires or " ); getDispatcher()->vkCmdPushConstants2KHR( static_cast( m_commandBuffer ), reinterpret_cast( &pushConstantsInfo ) ); } VULKAN_HPP_INLINE void CommandBuffer::pushDescriptorSet2KHR( const VULKAN_HPP_NAMESPACE::PushDescriptorSetInfo & pushDescriptorSetInfo ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdPushDescriptorSet2KHR && "Function requires or " ); getDispatcher()->vkCmdPushDescriptorSet2KHR( static_cast( m_commandBuffer ), reinterpret_cast( &pushDescriptorSetInfo ) ); } VULKAN_HPP_INLINE void CommandBuffer::pushDescriptorSetWithTemplate2KHR( const VULKAN_HPP_NAMESPACE::PushDescriptorSetWithTemplateInfo & pushDescriptorSetWithTemplateInfo ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdPushDescriptorSetWithTemplate2KHR && "Function requires or " ); getDispatcher()->vkCmdPushDescriptorSetWithTemplate2KHR( static_cast( m_commandBuffer ), reinterpret_cast( &pushDescriptorSetWithTemplateInfo ) ); } VULKAN_HPP_INLINE void CommandBuffer::setDescriptorBufferOffsets2EXT( const VULKAN_HPP_NAMESPACE::SetDescriptorBufferOffsetsInfoEXT & setDescriptorBufferOffsetsInfo ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdSetDescriptorBufferOffsets2EXT && "Function requires " ); getDispatcher()->vkCmdSetDescriptorBufferOffsets2EXT( static_cast( m_commandBuffer ), reinterpret_cast( &setDescriptorBufferOffsetsInfo ) ); } VULKAN_HPP_INLINE void CommandBuffer::bindDescriptorBufferEmbeddedSamplers2EXT( const VULKAN_HPP_NAMESPACE::BindDescriptorBufferEmbeddedSamplersInfoEXT & bindDescriptorBufferEmbeddedSamplersInfo ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdBindDescriptorBufferEmbeddedSamplers2EXT && "Function requires " ); getDispatcher()->vkCmdBindDescriptorBufferEmbeddedSamplers2EXT( static_cast( m_commandBuffer ), reinterpret_cast( &bindDescriptorBufferEmbeddedSamplersInfo ) ); } //=== VK_NV_cluster_acceleration_structure === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::AccelerationStructureBuildSizesInfoKHR Device::getClusterAccelerationStructureBuildSizesNV( const VULKAN_HPP_NAMESPACE::ClusterAccelerationStructureInputInfoNV & info ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetClusterAccelerationStructureBuildSizesNV && "Function requires " ); VULKAN_HPP_NAMESPACE::AccelerationStructureBuildSizesInfoKHR sizeInfo; getDispatcher()->vkGetClusterAccelerationStructureBuildSizesNV( static_cast( m_device ), reinterpret_cast( &info ), reinterpret_cast( &sizeInfo ) ); return sizeInfo; } VULKAN_HPP_INLINE void CommandBuffer::buildClusterAccelerationStructureIndirectNV( const VULKAN_HPP_NAMESPACE::ClusterAccelerationStructureCommandsInfoNV & commandInfos ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdBuildClusterAccelerationStructureIndirectNV && "Function requires " ); getDispatcher()->vkCmdBuildClusterAccelerationStructureIndirectNV( static_cast( m_commandBuffer ), reinterpret_cast( &commandInfos ) ); } //=== VK_NV_partitioned_acceleration_structure === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::AccelerationStructureBuildSizesInfoKHR Device::getPartitionedAccelerationStructuresBuildSizesNV( const VULKAN_HPP_NAMESPACE::PartitionedAccelerationStructureInstancesInputNV & info ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPartitionedAccelerationStructuresBuildSizesNV && "Function requires " ); VULKAN_HPP_NAMESPACE::AccelerationStructureBuildSizesInfoKHR sizeInfo; getDispatcher()->vkGetPartitionedAccelerationStructuresBuildSizesNV( static_cast( m_device ), reinterpret_cast( &info ), reinterpret_cast( &sizeInfo ) ); return sizeInfo; } VULKAN_HPP_INLINE void CommandBuffer::buildPartitionedAccelerationStructuresNV( const VULKAN_HPP_NAMESPACE::BuildPartitionedAccelerationStructureInfoNV & buildInfo ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdBuildPartitionedAccelerationStructuresNV && "Function requires " ); getDispatcher()->vkCmdBuildPartitionedAccelerationStructuresNV( static_cast( m_commandBuffer ), reinterpret_cast( &buildInfo ) ); } //=== VK_EXT_device_generated_commands === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MemoryRequirements2 Device::getGeneratedCommandsMemoryRequirementsEXT( const VULKAN_HPP_NAMESPACE::GeneratedCommandsMemoryRequirementsInfoEXT & info ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetGeneratedCommandsMemoryRequirementsEXT && "Function requires " ); VULKAN_HPP_NAMESPACE::MemoryRequirements2 memoryRequirements; getDispatcher()->vkGetGeneratedCommandsMemoryRequirementsEXT( static_cast( m_device ), reinterpret_cast( &info ), reinterpret_cast( &memoryRequirements ) ); return memoryRequirements; } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::StructureChain Device::getGeneratedCommandsMemoryRequirementsEXT( const VULKAN_HPP_NAMESPACE::GeneratedCommandsMemoryRequirementsInfoEXT & info ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkGetGeneratedCommandsMemoryRequirementsEXT && "Function requires " ); VULKAN_HPP_NAMESPACE::StructureChain structureChain; VULKAN_HPP_NAMESPACE::MemoryRequirements2 & memoryRequirements = structureChain.template get(); getDispatcher()->vkGetGeneratedCommandsMemoryRequirementsEXT( static_cast( m_device ), reinterpret_cast( &info ), reinterpret_cast( &memoryRequirements ) ); return structureChain; } VULKAN_HPP_INLINE void CommandBuffer::preprocessGeneratedCommandsEXT( const VULKAN_HPP_NAMESPACE::GeneratedCommandsInfoEXT & generatedCommandsInfo, VULKAN_HPP_NAMESPACE::CommandBuffer stateCommandBuffer ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdPreprocessGeneratedCommandsEXT && "Function requires " ); getDispatcher()->vkCmdPreprocessGeneratedCommandsEXT( static_cast( m_commandBuffer ), reinterpret_cast( &generatedCommandsInfo ), static_cast( stateCommandBuffer ) ); } VULKAN_HPP_INLINE void CommandBuffer::executeGeneratedCommandsEXT( VULKAN_HPP_NAMESPACE::Bool32 isPreprocessed, const VULKAN_HPP_NAMESPACE::GeneratedCommandsInfoEXT & generatedCommandsInfo ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkCmdExecuteGeneratedCommandsEXT && "Function requires " ); getDispatcher()->vkCmdExecuteGeneratedCommandsEXT( static_cast( m_commandBuffer ), static_cast( isPreprocessed ), reinterpret_cast( &generatedCommandsInfo ) ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType< VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::IndirectCommandsLayoutEXT>::Type Device::createIndirectCommandsLayoutEXT( VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutCreateInfoEXT const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutEXT indirectCommandsLayout; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateIndirectCommandsLayoutEXT( static_cast( m_device ), reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &indirectCommandsLayout ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { # if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) return VULKAN_HPP_UNEXPECTED( result ); # else VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createIndirectCommandsLayoutEXT" ); # endif } return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::IndirectCommandsLayoutEXT( *this, *reinterpret_cast( &indirectCommandsLayout ), allocator ); } VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType::Type Device::createIndirectExecutionSetEXT( VULKAN_HPP_NAMESPACE::IndirectExecutionSetCreateInfoEXT const & createInfo, VULKAN_HPP_NAMESPACE::Optional allocator ) const VULKAN_HPP_RAII_CREATE_NOEXCEPT { VULKAN_HPP_NAMESPACE::IndirectExecutionSetEXT indirectExecutionSet; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkCreateIndirectExecutionSetEXT( static_cast( m_device ), reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &indirectExecutionSet ) ) ); if ( result != VULKAN_HPP_NAMESPACE::Result::eSuccess ) { # if defined( VULKAN_HPP_RAII_NO_EXCEPTIONS ) return VULKAN_HPP_UNEXPECTED( result ); # else VULKAN_HPP_NAMESPACE::detail::throwResultException( result, "Device::createIndirectExecutionSetEXT" ); # endif } return VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::IndirectExecutionSetEXT( *this, *reinterpret_cast( &indirectExecutionSet ), allocator ); } VULKAN_HPP_INLINE void IndirectExecutionSetEXT::updatePipeline( VULKAN_HPP_NAMESPACE::ArrayProxy const & executionSetWrites ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkUpdateIndirectExecutionSetPipelineEXT && "Function requires " ); getDispatcher()->vkUpdateIndirectExecutionSetPipelineEXT( static_cast( m_device ), static_cast( m_indirectExecutionSet ), executionSetWrites.size(), reinterpret_cast( executionSetWrites.data() ) ); } VULKAN_HPP_INLINE void IndirectExecutionSetEXT::updateShader( VULKAN_HPP_NAMESPACE::ArrayProxy const & executionSetWrites ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( getDispatcher()->vkUpdateIndirectExecutionSetShaderEXT && "Function requires " ); getDispatcher()->vkUpdateIndirectExecutionSetShaderEXT( static_cast( m_device ), static_cast( m_indirectExecutionSet ), executionSetWrites.size(), reinterpret_cast( executionSetWrites.data() ) ); } //=== VK_NV_cooperative_matrix2 === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE std::vector PhysicalDevice::getCooperativeMatrixFlexibleDimensionsPropertiesNV() const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV && "Function requires " ); std::vector properties; uint32_t propertyCount; VULKAN_HPP_NAMESPACE::Result result; do { result = static_cast( getDispatcher()->vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV( static_cast( m_physicalDevice ), &propertyCount, nullptr ) ); if ( ( result == VULKAN_HPP_NAMESPACE::Result::eSuccess ) && propertyCount ) { properties.resize( propertyCount ); result = static_cast( getDispatcher()->vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV( static_cast( m_physicalDevice ), &propertyCount, reinterpret_cast( properties.data() ) ) ); } } while ( result == VULKAN_HPP_NAMESPACE::Result::eIncomplete ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::PhysicalDevice::getCooperativeMatrixFlexibleDimensionsPropertiesNV" ); VULKAN_HPP_ASSERT( propertyCount <= properties.size() ); if ( propertyCount < properties.size() ) { properties.resize( propertyCount ); } return properties; } # if defined( VK_USE_PLATFORM_METAL_EXT ) //=== VK_EXT_external_memory_metal === VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE void * Device::getMemoryMetalHandleEXT( const VULKAN_HPP_NAMESPACE::MemoryGetMetalHandleInfoEXT & getMetalHandleInfo ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetMemoryMetalHandleEXT && "Function requires " ); void * handle; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetMemoryMetalHandleEXT( static_cast( m_device ), reinterpret_cast( &getMetalHandleInfo ), &handle ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryMetalHandleEXT" ); return handle; } template VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::MemoryMetalHandlePropertiesEXT Device::getMemoryMetalHandlePropertiesEXT( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType, HandleType const & handle ) const { VULKAN_HPP_ASSERT( getDispatcher()->vkGetMemoryMetalHandlePropertiesEXT && "Function requires " ); VULKAN_HPP_NAMESPACE::MemoryMetalHandlePropertiesEXT memoryMetalHandleProperties; VULKAN_HPP_NAMESPACE::Result result = static_cast( getDispatcher()->vkGetMemoryMetalHandlePropertiesEXT( static_cast( m_device ), static_cast( handleType ), reinterpret_cast( &handle ), reinterpret_cast( &memoryMetalHandleProperties ) ) ); VULKAN_HPP_NAMESPACE::detail::resultCheck( result, VULKAN_HPP_NAMESPACE_STRING "::Device::getMemoryMetalHandlePropertiesEXT" ); return memoryMetalHandleProperties; } # endif /*VK_USE_PLATFORM_METAL_EXT*/ //==================== //=== RAII Helpers === //==================== template std::vector filterCppTypes( std::vector const & raiiTypes ) { std::vector cppTypes( raiiTypes.size() ); std::transform( raiiTypes.begin(), raiiTypes.end(), cppTypes.begin(), []( RAIIType const & d ) { return *d; } ); return cppTypes; } template std::vector filterCppTypes( std::vector const & raiiTypes, UnaryPredicate p ) { std::vector cppTypes; for ( auto const & t : raiiTypes ) { if ( p( t ) ) { cppTypes.push_back( *t ); } } return cppTypes; } } // namespace VULKAN_HPP_RAII_NAMESPACE } // namespace VULKAN_HPP_NAMESPACE #endif #endif ================================================ FILE: src/libraries/vulkanheaders/vulkan_screen.h ================================================ #ifndef VULKAN_SCREEN_H_ #define VULKAN_SCREEN_H_ 1 /* ** Copyright 2015-2025 The Khronos Group Inc. ** ** SPDX-License-Identifier: Apache-2.0 */ /* ** This header is generated from the Khronos Vulkan XML API Registry. ** */ #ifdef __cplusplus extern "C" { #endif // VK_QNX_screen_surface is a preprocessor guard. Do not pass it to API calls. #define VK_QNX_screen_surface 1 #define VK_QNX_SCREEN_SURFACE_SPEC_VERSION 1 #define VK_QNX_SCREEN_SURFACE_EXTENSION_NAME "VK_QNX_screen_surface" typedef VkFlags VkScreenSurfaceCreateFlagsQNX; typedef struct VkScreenSurfaceCreateInfoQNX { VkStructureType sType; const void* pNext; VkScreenSurfaceCreateFlagsQNX flags; struct _screen_context* context; struct _screen_window* window; } VkScreenSurfaceCreateInfoQNX; typedef VkResult (VKAPI_PTR *PFN_vkCreateScreenSurfaceQNX)(VkInstance instance, const VkScreenSurfaceCreateInfoQNX* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceScreenPresentationSupportQNX)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, struct _screen_window* window); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkCreateScreenSurfaceQNX( VkInstance instance, const VkScreenSurfaceCreateInfoQNX* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceScreenPresentationSupportQNX( VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, struct _screen_window* window); #endif // VK_QNX_external_memory_screen_buffer is a preprocessor guard. Do not pass it to API calls. #define VK_QNX_external_memory_screen_buffer 1 #define VK_QNX_EXTERNAL_MEMORY_SCREEN_BUFFER_SPEC_VERSION 1 #define VK_QNX_EXTERNAL_MEMORY_SCREEN_BUFFER_EXTENSION_NAME "VK_QNX_external_memory_screen_buffer" typedef struct VkScreenBufferPropertiesQNX { VkStructureType sType; void* pNext; VkDeviceSize allocationSize; uint32_t memoryTypeBits; } VkScreenBufferPropertiesQNX; typedef struct VkScreenBufferFormatPropertiesQNX { VkStructureType sType; void* pNext; VkFormat format; uint64_t externalFormat; uint64_t screenUsage; VkFormatFeatureFlags formatFeatures; VkComponentMapping samplerYcbcrConversionComponents; VkSamplerYcbcrModelConversion suggestedYcbcrModel; VkSamplerYcbcrRange suggestedYcbcrRange; VkChromaLocation suggestedXChromaOffset; VkChromaLocation suggestedYChromaOffset; } VkScreenBufferFormatPropertiesQNX; typedef struct VkImportScreenBufferInfoQNX { VkStructureType sType; const void* pNext; struct _screen_buffer* buffer; } VkImportScreenBufferInfoQNX; typedef struct VkExternalFormatQNX { VkStructureType sType; void* pNext; uint64_t externalFormat; } VkExternalFormatQNX; typedef struct VkPhysicalDeviceExternalMemoryScreenBufferFeaturesQNX { VkStructureType sType; void* pNext; VkBool32 screenBufferImport; } VkPhysicalDeviceExternalMemoryScreenBufferFeaturesQNX; typedef VkResult (VKAPI_PTR *PFN_vkGetScreenBufferPropertiesQNX)(VkDevice device, const struct _screen_buffer* buffer, VkScreenBufferPropertiesQNX* pProperties); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkGetScreenBufferPropertiesQNX( VkDevice device, const struct _screen_buffer* buffer, VkScreenBufferPropertiesQNX* pProperties); #endif #ifdef __cplusplus } #endif #endif ================================================ FILE: src/libraries/vulkanheaders/vulkan_shared.hpp ================================================ // Copyright 2015-2025 The Khronos Group Inc. // // SPDX-License-Identifier: Apache-2.0 OR MIT // // This header is generated from the Khronos Vulkan XML API Registry. #ifndef VULKAN_SHARED_HPP #define VULKAN_SHARED_HPP #include #if !( defined( VULKAN_HPP_ENABLE_STD_MODULE ) && defined( VULKAN_HPP_STD_MODULE ) ) # include // std::atomic_size_t #endif namespace VULKAN_HPP_NAMESPACE { #if !defined( VULKAN_HPP_NO_SMART_HANDLE ) template class SharedHandleTraits; class NoDestructor { }; template struct HasDestructorType : std::false_type { }; template struct HasDestructorType::DestructorType() )> : std::true_type { }; template struct GetDestructorType { using type = NoDestructor; }; template struct GetDestructorType::value>::type> { using type = typename SharedHandleTraits::DestructorType; }; template using DestructorTypeOf = typename GetDestructorType::type; template struct HasDestructor : std::integral_constant, NoDestructor>::value> { }; template struct HasPoolType : std::false_type { }; template struct HasPoolType::deleter::PoolTypeExport() )> : std::true_type { }; template struct GetPoolType { using type = NoDestructor; }; template struct GetPoolType::value>::type> { using type = typename SharedHandleTraits::deleter::PoolTypeExport; }; //===================================================================================================================== template class SharedHandle; template struct SharedHeader { SharedHeader( SharedHandle parent, Deleter deleter = Deleter() ) VULKAN_HPP_NOEXCEPT : parent( std::move( parent ) ) , deleter( std::move( deleter ) ) { } SharedHandle parent; Deleter deleter; }; template struct SharedHeader { SharedHeader( Deleter deleter = Deleter() ) VULKAN_HPP_NOEXCEPT : deleter( std::move( deleter ) ) {} Deleter deleter; }; //===================================================================================================================== template class ReferenceCounter { public: template ReferenceCounter( Args &&... control_args ) : m_header( std::forward( control_args )... ) { } ReferenceCounter( const ReferenceCounter & ) = delete; ReferenceCounter & operator=( const ReferenceCounter & ) = delete; public: size_t addRef() VULKAN_HPP_NOEXCEPT { // Relaxed memory order is sufficient since this does not impose any ordering on other operations return m_ref_cnt.fetch_add( 1, std::memory_order_relaxed ); } size_t release() VULKAN_HPP_NOEXCEPT { // A release memory order to ensure that all releases are ordered return m_ref_cnt.fetch_sub( 1, std::memory_order_release ); } public: std::atomic_size_t m_ref_cnt{ 1 }; HeaderType m_header{}; }; //===================================================================================================================== template > class SharedHandleBase { public: SharedHandleBase() = default; template SharedHandleBase( HandleType handle, Args &&... control_args ) : m_control( new ReferenceCounter( std::forward( control_args )... ) ), m_handle( handle ) { } SharedHandleBase( const SharedHandleBase & o ) VULKAN_HPP_NOEXCEPT { o.addRef(); m_handle = o.m_handle; m_control = o.m_control; } SharedHandleBase( SharedHandleBase && o ) VULKAN_HPP_NOEXCEPT : m_control( o.m_control ) , m_handle( o.m_handle ) { o.m_handle = nullptr; o.m_control = nullptr; } SharedHandleBase & operator=( const SharedHandleBase & o ) VULKAN_HPP_NOEXCEPT { SharedHandleBase( o ).swap( *this ); return *this; } SharedHandleBase & operator=( SharedHandleBase && o ) VULKAN_HPP_NOEXCEPT { SharedHandleBase( std::move( o ) ).swap( *this ); return *this; } ~SharedHandleBase() { // only this function owns the last reference to the control block // the same principle is used in the default deleter of std::shared_ptr if ( m_control && ( m_control->release() == 1 ) ) { // noop in x86, but does thread synchronization in ARM // it is required to ensure that last thread is getting to destroy the control block // by ordering all atomic operations before this fence std::atomic_thread_fence( std::memory_order_acquire ); ForwardType::internalDestroy( getHeader(), m_handle ); delete m_control; } } public: HandleType get() const VULKAN_HPP_NOEXCEPT { return m_handle; } HandleType operator*() const VULKAN_HPP_NOEXCEPT { return m_handle; } explicit operator bool() const VULKAN_HPP_NOEXCEPT { return bool( m_handle ); } # if defined( VULKAN_HPP_SMART_HANDLE_IMPLICIT_CAST ) operator HandleType() const VULKAN_HPP_NOEXCEPT { return m_handle; } # endif const HandleType * operator->() const VULKAN_HPP_NOEXCEPT { return &m_handle; } HandleType * operator->() VULKAN_HPP_NOEXCEPT { return &m_handle; } void reset() VULKAN_HPP_NOEXCEPT { SharedHandleBase().swap( *this ); } void swap( SharedHandleBase & o ) VULKAN_HPP_NOEXCEPT { std::swap( m_handle, o.m_handle ); std::swap( m_control, o.m_control ); } template typename std::enable_if::value, const SharedHandle> &>::type getDestructorType() const VULKAN_HPP_NOEXCEPT { return getHeader().parent; } protected: template static typename std::enable_if::value, void>::type internalDestroy( const HeaderType & control, HandleType handle ) VULKAN_HPP_NOEXCEPT { control.deleter.destroy( handle ); } template static typename std::enable_if::value, void>::type internalDestroy( const HeaderType & control, HandleType handle ) VULKAN_HPP_NOEXCEPT { control.deleter.destroy( control.parent.get(), handle ); } const HeaderType & getHeader() const VULKAN_HPP_NOEXCEPT { return m_control->m_header; } private: void addRef() const VULKAN_HPP_NOEXCEPT { if ( m_control ) m_control->addRef(); } protected: ReferenceCounter * m_control = nullptr; HandleType m_handle{}; }; template class SharedHandle : public SharedHandleBase, typename SharedHandleTraits::deleter>> { private: using BaseType = SharedHandleBase, typename SharedHandleTraits::deleter>>; using DeleterType = typename SharedHandleTraits::deleter; friend BaseType; public: SharedHandle() = default; template ::value && !HasPoolType::value>::type> explicit SharedHandle( HandleType handle, SharedHandle> parent, DeleterType deleter = DeleterType() ) VULKAN_HPP_NOEXCEPT : BaseType( handle, std::move( parent ), std::move( deleter ) ) { } template ::value && HasPoolType::value>::type> explicit SharedHandle( HandleType handle, SharedHandle> parent, SharedHandle::type> pool, const Dispatcher & dispatch VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) VULKAN_HPP_NOEXCEPT : BaseType( handle, std::move( parent ), DeleterType{ std::move( pool ), dispatch } ) { } template ::value>::type> explicit SharedHandle( HandleType handle, DeleterType deleter = DeleterType() ) VULKAN_HPP_NOEXCEPT : BaseType( handle, std::move( deleter ) ) { } protected: using BaseType::internalDestroy; }; namespace detail { // Silence the function cast warnings. # if defined( __GNUC__ ) && !defined( __clang__ ) && !defined( __INTEL_COMPILER ) # pragma GCC diagnostic push # pragma GCC diagnostic ignored "-Wcast-function-type" # endif template class ObjectDestroyShared { public: using DestructorType = typename SharedHandleTraits::DestructorType; template using DestroyFunctionPointerType = typename std::conditional::value, void ( DestructorType::* )( HandleType, const AllocationCallbacks *, const Dispatcher & ) const, void ( HandleType::* )( const AllocationCallbacks *, const Dispatcher & ) const>::type; using SelectorType = typename std::conditional::value, DestructorType, HandleType>::type; template ObjectDestroyShared( Optional allocationCallbacks VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, const Dispatcher & dispatch VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) : m_destroy( reinterpret_cast( static_cast>( &SelectorType::destroy ) ) ) , m_dispatch( &dispatch ) , m_allocationCallbacks( allocationCallbacks ) { } public: template typename std::enable_if::value, void>::type destroy( DestructorType parent, HandleType handle ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( m_destroy && m_dispatch ); ( parent.*m_destroy )( handle, m_allocationCallbacks, *m_dispatch ); } template typename std::enable_if::value, void>::type destroy( HandleType handle ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( m_destroy && m_dispatch ); ( handle.*m_destroy )( m_allocationCallbacks, *m_dispatch ); } private: DestroyFunctionPointerType m_destroy = nullptr; const detail::DispatchLoaderBase * m_dispatch = nullptr; Optional m_allocationCallbacks = nullptr; }; template class ObjectFreeShared { public: using DestructorType = typename SharedHandleTraits::DestructorType; template using DestroyFunctionPointerType = void ( DestructorType::* )( HandleType, const AllocationCallbacks *, const Dispatcher & ) const; template ObjectFreeShared( Optional allocationCallbacks VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT, const Dispatcher & dispatch VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) : m_destroy( reinterpret_cast( static_cast>( &DestructorType::free ) ) ) , m_dispatch( &dispatch ) , m_allocationCallbacks( allocationCallbacks ) { } public: void destroy( DestructorType parent, HandleType handle ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( m_destroy && m_dispatch ); ( parent.*m_destroy )( handle, m_allocationCallbacks, *m_dispatch ); } private: DestroyFunctionPointerType m_destroy = nullptr; const detail::DispatchLoaderBase * m_dispatch = nullptr; Optional m_allocationCallbacks = nullptr; }; template class ObjectReleaseShared { public: using DestructorType = typename SharedHandleTraits::DestructorType; template using DestroyFunctionPointerType = void ( DestructorType::* )( HandleType, const Dispatcher & ) const; template ObjectReleaseShared( const Dispatcher & dispatch VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) : m_destroy( reinterpret_cast( static_cast>( &DestructorType::release ) ) ) , m_dispatch( &dispatch ) { } public: void destroy( DestructorType parent, HandleType handle ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( m_destroy && m_dispatch ); ( parent.*m_destroy )( handle, *m_dispatch ); } private: DestroyFunctionPointerType m_destroy = nullptr; const detail::DispatchLoaderBase * m_dispatch = nullptr; }; template class PoolFreeShared { public: using DestructorType = typename SharedHandleTraits::DestructorType; using PoolTypeExport = PoolType; template using ReturnType = decltype( std::declval().free( PoolType(), 0u, nullptr, Dispatcher() ) ); template using DestroyFunctionPointerType = ReturnType ( DestructorType::* )( PoolType, uint32_t, const HandleType *, const Dispatcher & ) const; PoolFreeShared() = default; template PoolFreeShared( SharedHandle pool, const Dispatcher & dispatch VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) : m_destroy( reinterpret_cast( static_cast>( &DestructorType::free ) ) ) , m_dispatch( &dispatch ) , m_pool( std::move( pool ) ) { } public: void destroy( DestructorType parent, HandleType handle ) const VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( m_destroy && m_dispatch && m_pool ); ( parent.*m_destroy )( m_pool.get(), 1u, &handle, *m_dispatch ); } private: DestroyFunctionPointerType m_destroy = nullptr; const detail::DispatchLoaderBase * m_dispatch = nullptr; SharedHandle m_pool{}; }; # if defined( __GNUC__ ) && !defined( __clang__ ) && !defined( __INTEL_COMPILER ) # pragma GCC diagnostic pop # endif } // namespace detail //====================== //=== SHARED HANDLEs === //====================== //=== VK_VERSION_1_0 === template <> class SharedHandleTraits { public: using DestructorType = NoDestructor; using deleter = detail::ObjectDestroyShared; }; using SharedInstance = SharedHandle; template <> class SharedHandleTraits { public: using DestructorType = NoDestructor; using deleter = detail::ObjectDestroyShared; }; using SharedDevice = SharedHandle; template <> class SharedHandleTraits { public: using DestructorType = Device; using deleter = detail::ObjectFreeShared; }; using SharedDeviceMemory = SharedHandle; template <> class SharedHandleTraits { public: using DestructorType = Device; using deleter = detail::ObjectDestroyShared; }; using SharedFence = SharedHandle; template <> class SharedHandleTraits { public: using DestructorType = Device; using deleter = detail::ObjectDestroyShared; }; using SharedSemaphore = SharedHandle; template <> class SharedHandleTraits { public: using DestructorType = Device; using deleter = detail::ObjectDestroyShared; }; using SharedEvent = SharedHandle; template <> class SharedHandleTraits { public: using DestructorType = Device; using deleter = detail::ObjectDestroyShared; }; using SharedQueryPool = SharedHandle; template <> class SharedHandleTraits { public: using DestructorType = Device; using deleter = detail::ObjectDestroyShared; }; using SharedBuffer = SharedHandle; template <> class SharedHandleTraits { public: using DestructorType = Device; using deleter = detail::ObjectDestroyShared; }; using SharedBufferView = SharedHandle; template <> class SharedHandleTraits { public: using DestructorType = Device; using deleter = detail::ObjectDestroyShared; }; using SharedImage = SharedHandle; template <> class SharedHandleTraits { public: using DestructorType = Device; using deleter = detail::ObjectDestroyShared; }; using SharedImageView = SharedHandle; template <> class SharedHandleTraits { public: using DestructorType = Device; using deleter = detail::ObjectDestroyShared; }; using SharedShaderModule = SharedHandle; template <> class SharedHandleTraits { public: using DestructorType = Device; using deleter = detail::ObjectDestroyShared; }; using SharedPipelineCache = SharedHandle; template <> class SharedHandleTraits { public: using DestructorType = Device; using deleter = detail::ObjectDestroyShared; }; using SharedPipeline = SharedHandle; template <> class SharedHandleTraits { public: using DestructorType = Device; using deleter = detail::ObjectDestroyShared; }; using SharedPipelineLayout = SharedHandle; template <> class SharedHandleTraits { public: using DestructorType = Device; using deleter = detail::ObjectDestroyShared; }; using SharedSampler = SharedHandle; template <> class SharedHandleTraits { public: using DestructorType = Device; using deleter = detail::ObjectDestroyShared; }; using SharedDescriptorPool = SharedHandle; template <> class SharedHandleTraits { public: using DestructorType = Device; using deleter = detail::PoolFreeShared; }; using SharedDescriptorSet = SharedHandle; template <> class SharedHandleTraits { public: using DestructorType = Device; using deleter = detail::ObjectDestroyShared; }; using SharedDescriptorSetLayout = SharedHandle; template <> class SharedHandleTraits { public: using DestructorType = Device; using deleter = detail::ObjectDestroyShared; }; using SharedFramebuffer = SharedHandle; template <> class SharedHandleTraits { public: using DestructorType = Device; using deleter = detail::ObjectDestroyShared; }; using SharedRenderPass = SharedHandle; template <> class SharedHandleTraits { public: using DestructorType = Device; using deleter = detail::ObjectDestroyShared; }; using SharedCommandPool = SharedHandle; template <> class SharedHandleTraits { public: using DestructorType = Device; using deleter = detail::PoolFreeShared; }; using SharedCommandBuffer = SharedHandle; //=== VK_VERSION_1_1 === template <> class SharedHandleTraits { public: using DestructorType = Device; using deleter = detail::ObjectDestroyShared; }; using SharedSamplerYcbcrConversion = SharedHandle; using SharedSamplerYcbcrConversionKHR = SharedHandle; template <> class SharedHandleTraits { public: using DestructorType = Device; using deleter = detail::ObjectDestroyShared; }; using SharedDescriptorUpdateTemplate = SharedHandle; using SharedDescriptorUpdateTemplateKHR = SharedHandle; //=== VK_VERSION_1_3 === template <> class SharedHandleTraits { public: using DestructorType = Device; using deleter = detail::ObjectDestroyShared; }; using SharedPrivateDataSlot = SharedHandle; using SharedPrivateDataSlotEXT = SharedHandle; //=== VK_KHR_surface === template <> class SharedHandleTraits { public: using DestructorType = Instance; using deleter = detail::ObjectDestroyShared; }; using SharedSurfaceKHR = SharedHandle; //=== VK_KHR_swapchain === template <> class SharedHandleTraits { public: using DestructorType = Device; using deleter = detail::ObjectDestroyShared; }; using SharedSwapchainKHR = SharedHandle; //=== VK_KHR_display === template <> class SharedHandleTraits { public: using DestructorType = PhysicalDevice; using deleter = detail::ObjectDestroyShared; }; using SharedDisplayKHR = SharedHandle; //=== VK_EXT_debug_report === template <> class SharedHandleTraits { public: using DestructorType = Instance; using deleter = detail::ObjectDestroyShared; }; using SharedDebugReportCallbackEXT = SharedHandle; //=== VK_KHR_video_queue === template <> class SharedHandleTraits { public: using DestructorType = Device; using deleter = detail::ObjectDestroyShared; }; using SharedVideoSessionKHR = SharedHandle; template <> class SharedHandleTraits { public: using DestructorType = Device; using deleter = detail::ObjectDestroyShared; }; using SharedVideoSessionParametersKHR = SharedHandle; //=== VK_NVX_binary_import === template <> class SharedHandleTraits { public: using DestructorType = Device; using deleter = detail::ObjectDestroyShared; }; using SharedCuModuleNVX = SharedHandle; template <> class SharedHandleTraits { public: using DestructorType = Device; using deleter = detail::ObjectDestroyShared; }; using SharedCuFunctionNVX = SharedHandle; //=== VK_EXT_debug_utils === template <> class SharedHandleTraits { public: using DestructorType = Instance; using deleter = detail::ObjectDestroyShared; }; using SharedDebugUtilsMessengerEXT = SharedHandle; //=== VK_KHR_acceleration_structure === template <> class SharedHandleTraits { public: using DestructorType = Device; using deleter = detail::ObjectDestroyShared; }; using SharedAccelerationStructureKHR = SharedHandle; //=== VK_EXT_validation_cache === template <> class SharedHandleTraits { public: using DestructorType = Device; using deleter = detail::ObjectDestroyShared; }; using SharedValidationCacheEXT = SharedHandle; //=== VK_NV_ray_tracing === template <> class SharedHandleTraits { public: using DestructorType = Device; using deleter = detail::ObjectDestroyShared; }; using SharedAccelerationStructureNV = SharedHandle; //=== VK_INTEL_performance_query === template <> class SharedHandleTraits { public: using DestructorType = Device; using deleter = detail::ObjectDestroyShared; }; using SharedPerformanceConfigurationINTEL = SharedHandle; //=== VK_KHR_deferred_host_operations === template <> class SharedHandleTraits { public: using DestructorType = Device; using deleter = detail::ObjectDestroyShared; }; using SharedDeferredOperationKHR = SharedHandle; //=== VK_NV_device_generated_commands === template <> class SharedHandleTraits { public: using DestructorType = Device; using deleter = detail::ObjectDestroyShared; }; using SharedIndirectCommandsLayoutNV = SharedHandle; # if defined( VK_ENABLE_BETA_EXTENSIONS ) //=== VK_NV_cuda_kernel_launch === template <> class SharedHandleTraits { public: using DestructorType = Device; using deleter = detail::ObjectDestroyShared; }; using SharedCudaModuleNV = SharedHandle; template <> class SharedHandleTraits { public: using DestructorType = Device; using deleter = detail::ObjectDestroyShared; }; using SharedCudaFunctionNV = SharedHandle; # endif /*VK_ENABLE_BETA_EXTENSIONS*/ # if defined( VK_USE_PLATFORM_FUCHSIA ) //=== VK_FUCHSIA_buffer_collection === template <> class SharedHandleTraits { public: using DestructorType = Device; using deleter = detail::ObjectDestroyShared; }; using SharedBufferCollectionFUCHSIA = SharedHandle; # endif /*VK_USE_PLATFORM_FUCHSIA*/ //=== VK_EXT_opacity_micromap === template <> class SharedHandleTraits { public: using DestructorType = Device; using deleter = detail::ObjectDestroyShared; }; using SharedMicromapEXT = SharedHandle; //=== VK_NV_optical_flow === template <> class SharedHandleTraits { public: using DestructorType = Device; using deleter = detail::ObjectDestroyShared; }; using SharedOpticalFlowSessionNV = SharedHandle; //=== VK_EXT_shader_object === template <> class SharedHandleTraits { public: using DestructorType = Device; using deleter = detail::ObjectDestroyShared; }; using SharedShaderEXT = SharedHandle; //=== VK_KHR_pipeline_binary === template <> class SharedHandleTraits { public: using DestructorType = Device; using deleter = detail::ObjectDestroyShared; }; using SharedPipelineBinaryKHR = SharedHandle; //=== VK_EXT_device_generated_commands === template <> class SharedHandleTraits { public: using DestructorType = Device; using deleter = detail::ObjectDestroyShared; }; using SharedIndirectCommandsLayoutEXT = SharedHandle; template <> class SharedHandleTraits { public: using DestructorType = Device; using deleter = detail::ObjectDestroyShared; }; using SharedIndirectExecutionSetEXT = SharedHandle; enum class SwapchainOwns { no, yes, }; struct ImageHeader : SharedHeader, typename SharedHandleTraits::deleter> { ImageHeader( SharedHandle> parent, typename SharedHandleTraits::deleter deleter = typename SharedHandleTraits::deleter(), SwapchainOwns swapchainOwned = SwapchainOwns::no ) VULKAN_HPP_NOEXCEPT : SharedHeader, typename SharedHandleTraits::deleter>( std::move( parent ), std::move( deleter ) ) , swapchainOwned( swapchainOwned ) { } SwapchainOwns swapchainOwned = SwapchainOwns::no; }; template <> class SharedHandle : public SharedHandleBase { using BaseType = SharedHandleBase; using DeleterType = typename SharedHandleTraits::deleter; friend BaseType; public: SharedHandle() = default; explicit SharedHandle( VULKAN_HPP_NAMESPACE::Image handle, SharedHandle> parent, SwapchainOwns swapchain_owned = SwapchainOwns::no, DeleterType deleter = DeleterType() ) VULKAN_HPP_NOEXCEPT : BaseType( handle, std::move( parent ), std::move( deleter ), swapchain_owned ) { } protected: static void internalDestroy( const ImageHeader & control, VULKAN_HPP_NAMESPACE::Image handle ) VULKAN_HPP_NOEXCEPT { if ( control.swapchainOwned == SwapchainOwns::no ) { control.deleter.destroy( control.parent.get(), handle ); } } }; struct SwapchainHeader { SwapchainHeader( SharedHandle surface, SharedHandle> parent, typename SharedHandleTraits::deleter deleter = typename SharedHandleTraits::deleter() ) VULKAN_HPP_NOEXCEPT : surface( std::move( surface ) ) , parent( std::move( parent ) ) , deleter( std::move( deleter ) ) { } SharedHandle surface{}; SharedHandle> parent{}; typename SharedHandleTraits::deleter deleter{}; }; template <> class SharedHandle : public SharedHandleBase { using BaseType = SharedHandleBase; using DeleterType = typename SharedHandleTraits::deleter; friend BaseType; public: SharedHandle() = default; explicit SharedHandle( VULKAN_HPP_NAMESPACE::SwapchainKHR handle, SharedHandle> parent, SharedHandle surface, DeleterType deleter = DeleterType() ) VULKAN_HPP_NOEXCEPT : BaseType( handle, std::move( surface ), std::move( parent ), std::move( deleter ) ) { } public: const SharedHandle & getSurface() const VULKAN_HPP_NOEXCEPT { return getHeader().surface; } protected: using BaseType::internalDestroy; }; template class SharedHandleBaseNoDestroy : public SharedHandleBase { public: using SharedHandleBase::SharedHandleBase; const DestructorType & getDestructorType() const VULKAN_HPP_NOEXCEPT { return SharedHandleBase::getHeader(); } protected: static void internalDestroy( const DestructorType &, HandleType ) VULKAN_HPP_NOEXCEPT {} }; //=== VK_VERSION_1_0 === template <> class SharedHandle : public SharedHandleBaseNoDestroy { friend SharedHandleBase; public: SharedHandle() = default; explicit SharedHandle( PhysicalDevice handle, SharedInstance parent ) noexcept : SharedHandleBaseNoDestroy( handle, std::move( parent ) ) { } }; using SharedPhysicalDevice = SharedHandle; template <> class SharedHandle : public SharedHandleBaseNoDestroy { friend SharedHandleBase; public: SharedHandle() = default; explicit SharedHandle( Queue handle, SharedDevice parent ) noexcept : SharedHandleBaseNoDestroy( handle, std::move( parent ) ) {} }; using SharedQueue = SharedHandle; //=== VK_KHR_display === template <> class SharedHandle : public SharedHandleBaseNoDestroy { friend SharedHandleBase; public: SharedHandle() = default; explicit SharedHandle( DisplayModeKHR handle, SharedDisplayKHR parent ) noexcept : SharedHandleBaseNoDestroy( handle, std::move( parent ) ) { } }; using SharedDisplayModeKHR = SharedHandle; #endif // !VULKAN_HPP_NO_SMART_HANDLE } // namespace VULKAN_HPP_NAMESPACE #endif // VULKAN_SHARED_HPP ================================================ FILE: src/libraries/vulkanheaders/vulkan_static_assertions.hpp ================================================ // Copyright 2015-2025 The Khronos Group Inc. // // SPDX-License-Identifier: Apache-2.0 OR MIT // // This header is generated from the Khronos Vulkan XML API Registry. #ifndef VULKAN_STATIC_ASSERTIONS_HPP #define VULKAN_STATIC_ASSERTIONS_HPP #include //========================= //=== static_assertions === //========================= //=== VK_VERSION_1_0 === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::Extent2D ) == sizeof( VkExtent2D ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "Extent2D is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::Extent3D ) == sizeof( VkExtent3D ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "Extent3D is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::Offset2D ) == sizeof( VkOffset2D ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "Offset2D is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::Offset3D ) == sizeof( VkOffset3D ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "Offset3D is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::Rect2D ) == sizeof( VkRect2D ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "Rect2D is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::BaseInStructure ) == sizeof( VkBaseInStructure ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "BaseInStructure is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::BaseOutStructure ) == sizeof( VkBaseOutStructure ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "BaseOutStructure is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::BufferMemoryBarrier ) == sizeof( VkBufferMemoryBarrier ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "BufferMemoryBarrier is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DispatchIndirectCommand ) == sizeof( VkDispatchIndirectCommand ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DispatchIndirectCommand is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DrawIndexedIndirectCommand ) == sizeof( VkDrawIndexedIndirectCommand ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DrawIndexedIndirectCommand is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DrawIndirectCommand ) == sizeof( VkDrawIndirectCommand ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DrawIndirectCommand is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImageMemoryBarrier ) == sizeof( VkImageMemoryBarrier ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ImageMemoryBarrier is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::MemoryBarrier ) == sizeof( VkMemoryBarrier ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "MemoryBarrier is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineCacheHeaderVersionOne ) == sizeof( VkPipelineCacheHeaderVersionOne ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PipelineCacheHeaderVersionOne is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AllocationCallbacks ) == sizeof( VkAllocationCallbacks ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "AllocationCallbacks is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ApplicationInfo ) == sizeof( VkApplicationInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ApplicationInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::FormatProperties ) == sizeof( VkFormatProperties ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "FormatProperties is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImageFormatProperties ) == sizeof( VkImageFormatProperties ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ImageFormatProperties is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::Instance ) == sizeof( VkInstance ), "handle and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_copy_constructible::value, "Instance is not copy_constructible!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "Instance is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::InstanceCreateInfo ) == sizeof( VkInstanceCreateInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "InstanceCreateInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::MemoryHeap ) == sizeof( VkMemoryHeap ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "MemoryHeap is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::MemoryType ) == sizeof( VkMemoryType ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "MemoryType is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDevice ) == sizeof( VkPhysicalDevice ), "handle and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_copy_constructible::value, "PhysicalDevice is not copy_constructible!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDevice is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures ) == sizeof( VkPhysicalDeviceFeatures ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceFeatures is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceLimits ) == sizeof( VkPhysicalDeviceLimits ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceLimits is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties ) == sizeof( VkPhysicalDeviceMemoryProperties ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceMemoryProperties is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties ) == sizeof( VkPhysicalDeviceProperties ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceProperties is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceSparseProperties ) == sizeof( VkPhysicalDeviceSparseProperties ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceSparseProperties is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::QueueFamilyProperties ) == sizeof( VkQueueFamilyProperties ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "QueueFamilyProperties is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::Device ) == sizeof( VkDevice ), "handle and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_copy_constructible::value, "Device is not copy_constructible!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "Device is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DeviceCreateInfo ) == sizeof( VkDeviceCreateInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DeviceCreateInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DeviceQueueCreateInfo ) == sizeof( VkDeviceQueueCreateInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DeviceQueueCreateInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ExtensionProperties ) == sizeof( VkExtensionProperties ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ExtensionProperties is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::LayerProperties ) == sizeof( VkLayerProperties ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "LayerProperties is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::Queue ) == sizeof( VkQueue ), "handle and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_copy_constructible::value, "Queue is not copy_constructible!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "Queue is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SubmitInfo ) == sizeof( VkSubmitInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "SubmitInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::MappedMemoryRange ) == sizeof( VkMappedMemoryRange ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "MappedMemoryRange is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::MemoryAllocateInfo ) == sizeof( VkMemoryAllocateInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "MemoryAllocateInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DeviceMemory ) == sizeof( VkDeviceMemory ), "handle and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_copy_constructible::value, "DeviceMemory is not copy_constructible!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DeviceMemory is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::MemoryRequirements ) == sizeof( VkMemoryRequirements ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "MemoryRequirements is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::BindSparseInfo ) == sizeof( VkBindSparseInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "BindSparseInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImageSubresource ) == sizeof( VkImageSubresource ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ImageSubresource is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SparseBufferMemoryBindInfo ) == sizeof( VkSparseBufferMemoryBindInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "SparseBufferMemoryBindInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SparseImageFormatProperties ) == sizeof( VkSparseImageFormatProperties ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "SparseImageFormatProperties is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SparseImageMemoryBind ) == sizeof( VkSparseImageMemoryBind ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "SparseImageMemoryBind is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SparseImageMemoryBindInfo ) == sizeof( VkSparseImageMemoryBindInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "SparseImageMemoryBindInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SparseImageMemoryRequirements ) == sizeof( VkSparseImageMemoryRequirements ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "SparseImageMemoryRequirements is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SparseImageOpaqueMemoryBindInfo ) == sizeof( VkSparseImageOpaqueMemoryBindInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "SparseImageOpaqueMemoryBindInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SparseMemoryBind ) == sizeof( VkSparseMemoryBind ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "SparseMemoryBind is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::Fence ) == sizeof( VkFence ), "handle and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_copy_constructible::value, "Fence is not copy_constructible!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "Fence is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::FenceCreateInfo ) == sizeof( VkFenceCreateInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "FenceCreateInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::Semaphore ) == sizeof( VkSemaphore ), "handle and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_copy_constructible::value, "Semaphore is not copy_constructible!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "Semaphore is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SemaphoreCreateInfo ) == sizeof( VkSemaphoreCreateInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "SemaphoreCreateInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::Event ) == sizeof( VkEvent ), "handle and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_copy_constructible::value, "Event is not copy_constructible!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "Event is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::EventCreateInfo ) == sizeof( VkEventCreateInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "EventCreateInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::QueryPool ) == sizeof( VkQueryPool ), "handle and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_copy_constructible::value, "QueryPool is not copy_constructible!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "QueryPool is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::QueryPoolCreateInfo ) == sizeof( VkQueryPoolCreateInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "QueryPoolCreateInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::Buffer ) == sizeof( VkBuffer ), "handle and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_copy_constructible::value, "Buffer is not copy_constructible!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "Buffer is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::BufferCreateInfo ) == sizeof( VkBufferCreateInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "BufferCreateInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::BufferView ) == sizeof( VkBufferView ), "handle and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_copy_constructible::value, "BufferView is not copy_constructible!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "BufferView is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::BufferViewCreateInfo ) == sizeof( VkBufferViewCreateInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "BufferViewCreateInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::Image ) == sizeof( VkImage ), "handle and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_copy_constructible::value, "Image is not copy_constructible!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "Image is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImageCreateInfo ) == sizeof( VkImageCreateInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ImageCreateInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SubresourceLayout ) == sizeof( VkSubresourceLayout ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "SubresourceLayout is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ComponentMapping ) == sizeof( VkComponentMapping ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ComponentMapping is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImageSubresourceRange ) == sizeof( VkImageSubresourceRange ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ImageSubresourceRange is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImageView ) == sizeof( VkImageView ), "handle and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_copy_constructible::value, "ImageView is not copy_constructible!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ImageView is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImageViewCreateInfo ) == sizeof( VkImageViewCreateInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ImageViewCreateInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ShaderModule ) == sizeof( VkShaderModule ), "handle and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_copy_constructible::value, "ShaderModule is not copy_constructible!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ShaderModule is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ShaderModuleCreateInfo ) == sizeof( VkShaderModuleCreateInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ShaderModuleCreateInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineCache ) == sizeof( VkPipelineCache ), "handle and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_copy_constructible::value, "PipelineCache is not copy_constructible!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PipelineCache is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineCacheCreateInfo ) == sizeof( VkPipelineCacheCreateInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PipelineCacheCreateInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ComputePipelineCreateInfo ) == sizeof( VkComputePipelineCreateInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ComputePipelineCreateInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::GraphicsPipelineCreateInfo ) == sizeof( VkGraphicsPipelineCreateInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "GraphicsPipelineCreateInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::Pipeline ) == sizeof( VkPipeline ), "handle and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_copy_constructible::value, "Pipeline is not copy_constructible!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "Pipeline is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineColorBlendAttachmentState ) == sizeof( VkPipelineColorBlendAttachmentState ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PipelineColorBlendAttachmentState is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineColorBlendStateCreateInfo ) == sizeof( VkPipelineColorBlendStateCreateInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PipelineColorBlendStateCreateInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineDepthStencilStateCreateInfo ) == sizeof( VkPipelineDepthStencilStateCreateInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PipelineDepthStencilStateCreateInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineDynamicStateCreateInfo ) == sizeof( VkPipelineDynamicStateCreateInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PipelineDynamicStateCreateInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineInputAssemblyStateCreateInfo ) == sizeof( VkPipelineInputAssemblyStateCreateInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PipelineInputAssemblyStateCreateInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineMultisampleStateCreateInfo ) == sizeof( VkPipelineMultisampleStateCreateInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PipelineMultisampleStateCreateInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineRasterizationStateCreateInfo ) == sizeof( VkPipelineRasterizationStateCreateInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PipelineRasterizationStateCreateInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineShaderStageCreateInfo ) == sizeof( VkPipelineShaderStageCreateInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PipelineShaderStageCreateInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineTessellationStateCreateInfo ) == sizeof( VkPipelineTessellationStateCreateInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PipelineTessellationStateCreateInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineVertexInputStateCreateInfo ) == sizeof( VkPipelineVertexInputStateCreateInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PipelineVertexInputStateCreateInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineViewportStateCreateInfo ) == sizeof( VkPipelineViewportStateCreateInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PipelineViewportStateCreateInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SpecializationInfo ) == sizeof( VkSpecializationInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "SpecializationInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SpecializationMapEntry ) == sizeof( VkSpecializationMapEntry ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "SpecializationMapEntry is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::StencilOpState ) == sizeof( VkStencilOpState ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "StencilOpState is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VertexInputAttributeDescription ) == sizeof( VkVertexInputAttributeDescription ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VertexInputAttributeDescription is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VertexInputBindingDescription ) == sizeof( VkVertexInputBindingDescription ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VertexInputBindingDescription is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::Viewport ) == sizeof( VkViewport ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "Viewport is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineLayout ) == sizeof( VkPipelineLayout ), "handle and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_copy_constructible::value, "PipelineLayout is not copy_constructible!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PipelineLayout is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineLayoutCreateInfo ) == sizeof( VkPipelineLayoutCreateInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PipelineLayoutCreateInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PushConstantRange ) == sizeof( VkPushConstantRange ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PushConstantRange is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::Sampler ) == sizeof( VkSampler ), "handle and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_copy_constructible::value, "Sampler is not copy_constructible!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "Sampler is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SamplerCreateInfo ) == sizeof( VkSamplerCreateInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "SamplerCreateInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::CopyDescriptorSet ) == sizeof( VkCopyDescriptorSet ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "CopyDescriptorSet is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DescriptorBufferInfo ) == sizeof( VkDescriptorBufferInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DescriptorBufferInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DescriptorImageInfo ) == sizeof( VkDescriptorImageInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DescriptorImageInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DescriptorPool ) == sizeof( VkDescriptorPool ), "handle and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_copy_constructible::value, "DescriptorPool is not copy_constructible!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DescriptorPool is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DescriptorPoolCreateInfo ) == sizeof( VkDescriptorPoolCreateInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DescriptorPoolCreateInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DescriptorPoolSize ) == sizeof( VkDescriptorPoolSize ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DescriptorPoolSize is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DescriptorSet ) == sizeof( VkDescriptorSet ), "handle and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_copy_constructible::value, "DescriptorSet is not copy_constructible!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DescriptorSet is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DescriptorSetAllocateInfo ) == sizeof( VkDescriptorSetAllocateInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DescriptorSetAllocateInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DescriptorSetLayout ) == sizeof( VkDescriptorSetLayout ), "handle and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_copy_constructible::value, "DescriptorSetLayout is not copy_constructible!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DescriptorSetLayout is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DescriptorSetLayoutBinding ) == sizeof( VkDescriptorSetLayoutBinding ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DescriptorSetLayoutBinding is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateInfo ) == sizeof( VkDescriptorSetLayoutCreateInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DescriptorSetLayoutCreateInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::WriteDescriptorSet ) == sizeof( VkWriteDescriptorSet ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "WriteDescriptorSet is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AttachmentDescription ) == sizeof( VkAttachmentDescription ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "AttachmentDescription is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AttachmentReference ) == sizeof( VkAttachmentReference ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "AttachmentReference is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::Framebuffer ) == sizeof( VkFramebuffer ), "handle and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_copy_constructible::value, "Framebuffer is not copy_constructible!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "Framebuffer is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::FramebufferCreateInfo ) == sizeof( VkFramebufferCreateInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "FramebufferCreateInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::RenderPass ) == sizeof( VkRenderPass ), "handle and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_copy_constructible::value, "RenderPass is not copy_constructible!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "RenderPass is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::RenderPassCreateInfo ) == sizeof( VkRenderPassCreateInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "RenderPassCreateInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SubpassDependency ) == sizeof( VkSubpassDependency ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "SubpassDependency is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SubpassDescription ) == sizeof( VkSubpassDescription ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "SubpassDescription is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::CommandPool ) == sizeof( VkCommandPool ), "handle and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_copy_constructible::value, "CommandPool is not copy_constructible!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "CommandPool is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::CommandPoolCreateInfo ) == sizeof( VkCommandPoolCreateInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "CommandPoolCreateInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::CommandBuffer ) == sizeof( VkCommandBuffer ), "handle and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_copy_constructible::value, "CommandBuffer is not copy_constructible!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "CommandBuffer is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::CommandBufferAllocateInfo ) == sizeof( VkCommandBufferAllocateInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "CommandBufferAllocateInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::CommandBufferBeginInfo ) == sizeof( VkCommandBufferBeginInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "CommandBufferBeginInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::CommandBufferInheritanceInfo ) == sizeof( VkCommandBufferInheritanceInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "CommandBufferInheritanceInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::BufferCopy ) == sizeof( VkBufferCopy ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "BufferCopy is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::BufferImageCopy ) == sizeof( VkBufferImageCopy ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "BufferImageCopy is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ClearAttachment ) == sizeof( VkClearAttachment ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ClearAttachment is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ClearColorValue ) == sizeof( VkClearColorValue ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ClearColorValue is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ClearDepthStencilValue ) == sizeof( VkClearDepthStencilValue ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ClearDepthStencilValue is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ClearRect ) == sizeof( VkClearRect ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ClearRect is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ClearValue ) == sizeof( VkClearValue ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ClearValue is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImageBlit ) == sizeof( VkImageBlit ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ImageBlit is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImageCopy ) == sizeof( VkImageCopy ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ImageCopy is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImageResolve ) == sizeof( VkImageResolve ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ImageResolve is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImageSubresourceLayers ) == sizeof( VkImageSubresourceLayers ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ImageSubresourceLayers is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::RenderPassBeginInfo ) == sizeof( VkRenderPassBeginInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "RenderPassBeginInfo is not nothrow_move_constructible!" ); //=== VK_VERSION_1_1 === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceSubgroupProperties ) == sizeof( VkPhysicalDeviceSubgroupProperties ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceSubgroupProperties is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::BindBufferMemoryInfo ) == sizeof( VkBindBufferMemoryInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "BindBufferMemoryInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::BindImageMemoryInfo ) == sizeof( VkBindImageMemoryInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "BindImageMemoryInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDevice16BitStorageFeatures ) == sizeof( VkPhysicalDevice16BitStorageFeatures ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDevice16BitStorageFeatures is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::MemoryDedicatedRequirements ) == sizeof( VkMemoryDedicatedRequirements ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "MemoryDedicatedRequirements is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::MemoryDedicatedAllocateInfo ) == sizeof( VkMemoryDedicatedAllocateInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "MemoryDedicatedAllocateInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::MemoryAllocateFlagsInfo ) == sizeof( VkMemoryAllocateFlagsInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "MemoryAllocateFlagsInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DeviceGroupRenderPassBeginInfo ) == sizeof( VkDeviceGroupRenderPassBeginInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DeviceGroupRenderPassBeginInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DeviceGroupCommandBufferBeginInfo ) == sizeof( VkDeviceGroupCommandBufferBeginInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DeviceGroupCommandBufferBeginInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DeviceGroupSubmitInfo ) == sizeof( VkDeviceGroupSubmitInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DeviceGroupSubmitInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DeviceGroupBindSparseInfo ) == sizeof( VkDeviceGroupBindSparseInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DeviceGroupBindSparseInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::BindBufferMemoryDeviceGroupInfo ) == sizeof( VkBindBufferMemoryDeviceGroupInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "BindBufferMemoryDeviceGroupInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::BindImageMemoryDeviceGroupInfo ) == sizeof( VkBindImageMemoryDeviceGroupInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "BindImageMemoryDeviceGroupInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceGroupProperties ) == sizeof( VkPhysicalDeviceGroupProperties ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceGroupProperties is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DeviceGroupDeviceCreateInfo ) == sizeof( VkDeviceGroupDeviceCreateInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DeviceGroupDeviceCreateInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::BufferMemoryRequirementsInfo2 ) == sizeof( VkBufferMemoryRequirementsInfo2 ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "BufferMemoryRequirementsInfo2 is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImageMemoryRequirementsInfo2 ) == sizeof( VkImageMemoryRequirementsInfo2 ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ImageMemoryRequirementsInfo2 is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImageSparseMemoryRequirementsInfo2 ) == sizeof( VkImageSparseMemoryRequirementsInfo2 ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ImageSparseMemoryRequirementsInfo2 is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::MemoryRequirements2 ) == sizeof( VkMemoryRequirements2 ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "MemoryRequirements2 is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SparseImageMemoryRequirements2 ) == sizeof( VkSparseImageMemoryRequirements2 ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "SparseImageMemoryRequirements2 is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures2 ) == sizeof( VkPhysicalDeviceFeatures2 ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceFeatures2 is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties2 ) == sizeof( VkPhysicalDeviceProperties2 ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceProperties2 is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::FormatProperties2 ) == sizeof( VkFormatProperties2 ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "FormatProperties2 is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImageFormatProperties2 ) == sizeof( VkImageFormatProperties2 ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ImageFormatProperties2 is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceImageFormatInfo2 ) == sizeof( VkPhysicalDeviceImageFormatInfo2 ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceImageFormatInfo2 is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::QueueFamilyProperties2 ) == sizeof( VkQueueFamilyProperties2 ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "QueueFamilyProperties2 is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties2 ) == sizeof( VkPhysicalDeviceMemoryProperties2 ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceMemoryProperties2 is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SparseImageFormatProperties2 ) == sizeof( VkSparseImageFormatProperties2 ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "SparseImageFormatProperties2 is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceSparseImageFormatInfo2 ) == sizeof( VkPhysicalDeviceSparseImageFormatInfo2 ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceSparseImageFormatInfo2 is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDevicePointClippingProperties ) == sizeof( VkPhysicalDevicePointClippingProperties ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDevicePointClippingProperties is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::RenderPassInputAttachmentAspectCreateInfo ) == sizeof( VkRenderPassInputAttachmentAspectCreateInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "RenderPassInputAttachmentAspectCreateInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::InputAttachmentAspectReference ) == sizeof( VkInputAttachmentAspectReference ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "InputAttachmentAspectReference is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImageViewUsageCreateInfo ) == sizeof( VkImageViewUsageCreateInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ImageViewUsageCreateInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineTessellationDomainOriginStateCreateInfo ) == sizeof( VkPipelineTessellationDomainOriginStateCreateInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PipelineTessellationDomainOriginStateCreateInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::RenderPassMultiviewCreateInfo ) == sizeof( VkRenderPassMultiviewCreateInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "RenderPassMultiviewCreateInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceMultiviewFeatures ) == sizeof( VkPhysicalDeviceMultiviewFeatures ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceMultiviewFeatures is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceMultiviewProperties ) == sizeof( VkPhysicalDeviceMultiviewProperties ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceMultiviewProperties is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceVariablePointersFeatures ) == sizeof( VkPhysicalDeviceVariablePointersFeatures ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceVariablePointersFeatures is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceProtectedMemoryFeatures ) == sizeof( VkPhysicalDeviceProtectedMemoryFeatures ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceProtectedMemoryFeatures is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceProtectedMemoryProperties ) == sizeof( VkPhysicalDeviceProtectedMemoryProperties ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceProtectedMemoryProperties is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DeviceQueueInfo2 ) == sizeof( VkDeviceQueueInfo2 ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DeviceQueueInfo2 is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ProtectedSubmitInfo ) == sizeof( VkProtectedSubmitInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ProtectedSubmitInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversionCreateInfo ) == sizeof( VkSamplerYcbcrConversionCreateInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "SamplerYcbcrConversionCreateInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversionInfo ) == sizeof( VkSamplerYcbcrConversionInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "SamplerYcbcrConversionInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::BindImagePlaneMemoryInfo ) == sizeof( VkBindImagePlaneMemoryInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "BindImagePlaneMemoryInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImagePlaneMemoryRequirementsInfo ) == sizeof( VkImagePlaneMemoryRequirementsInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ImagePlaneMemoryRequirementsInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceSamplerYcbcrConversionFeatures ) == sizeof( VkPhysicalDeviceSamplerYcbcrConversionFeatures ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceSamplerYcbcrConversionFeatures is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversionImageFormatProperties ) == sizeof( VkSamplerYcbcrConversionImageFormatProperties ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "SamplerYcbcrConversionImageFormatProperties is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion ) == sizeof( VkSamplerYcbcrConversion ), "handle and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_copy_constructible::value, "SamplerYcbcrConversion is not copy_constructible!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "SamplerYcbcrConversion is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate ) == sizeof( VkDescriptorUpdateTemplate ), "handle and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_copy_constructible::value, "DescriptorUpdateTemplate is not copy_constructible!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DescriptorUpdateTemplate is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateEntry ) == sizeof( VkDescriptorUpdateTemplateEntry ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DescriptorUpdateTemplateEntry is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateCreateInfo ) == sizeof( VkDescriptorUpdateTemplateCreateInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DescriptorUpdateTemplateCreateInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ExternalMemoryProperties ) == sizeof( VkExternalMemoryProperties ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ExternalMemoryProperties is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalImageFormatInfo ) == sizeof( VkPhysicalDeviceExternalImageFormatInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceExternalImageFormatInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ExternalImageFormatProperties ) == sizeof( VkExternalImageFormatProperties ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ExternalImageFormatProperties is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalBufferInfo ) == sizeof( VkPhysicalDeviceExternalBufferInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceExternalBufferInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ExternalBufferProperties ) == sizeof( VkExternalBufferProperties ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ExternalBufferProperties is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceIDProperties ) == sizeof( VkPhysicalDeviceIDProperties ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceIDProperties is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ExternalMemoryImageCreateInfo ) == sizeof( VkExternalMemoryImageCreateInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ExternalMemoryImageCreateInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ExternalMemoryBufferCreateInfo ) == sizeof( VkExternalMemoryBufferCreateInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ExternalMemoryBufferCreateInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ExportMemoryAllocateInfo ) == sizeof( VkExportMemoryAllocateInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ExportMemoryAllocateInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalFenceInfo ) == sizeof( VkPhysicalDeviceExternalFenceInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceExternalFenceInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ExternalFenceProperties ) == sizeof( VkExternalFenceProperties ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ExternalFenceProperties is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ExportFenceCreateInfo ) == sizeof( VkExportFenceCreateInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ExportFenceCreateInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ExportSemaphoreCreateInfo ) == sizeof( VkExportSemaphoreCreateInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ExportSemaphoreCreateInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalSemaphoreInfo ) == sizeof( VkPhysicalDeviceExternalSemaphoreInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceExternalSemaphoreInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ExternalSemaphoreProperties ) == sizeof( VkExternalSemaphoreProperties ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ExternalSemaphoreProperties is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceMaintenance3Properties ) == sizeof( VkPhysicalDeviceMaintenance3Properties ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceMaintenance3Properties is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DescriptorSetLayoutSupport ) == sizeof( VkDescriptorSetLayoutSupport ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DescriptorSetLayoutSupport is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderDrawParametersFeatures ) == sizeof( VkPhysicalDeviceShaderDrawParametersFeatures ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceShaderDrawParametersFeatures is not nothrow_move_constructible!" ); //=== VK_VERSION_1_2 === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceVulkan11Features ) == sizeof( VkPhysicalDeviceVulkan11Features ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceVulkan11Features is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceVulkan11Properties ) == sizeof( VkPhysicalDeviceVulkan11Properties ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceVulkan11Properties is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceVulkan12Features ) == sizeof( VkPhysicalDeviceVulkan12Features ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceVulkan12Features is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceVulkan12Properties ) == sizeof( VkPhysicalDeviceVulkan12Properties ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceVulkan12Properties is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImageFormatListCreateInfo ) == sizeof( VkImageFormatListCreateInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ImageFormatListCreateInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::RenderPassCreateInfo2 ) == sizeof( VkRenderPassCreateInfo2 ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "RenderPassCreateInfo2 is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AttachmentDescription2 ) == sizeof( VkAttachmentDescription2 ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "AttachmentDescription2 is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AttachmentReference2 ) == sizeof( VkAttachmentReference2 ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "AttachmentReference2 is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SubpassDescription2 ) == sizeof( VkSubpassDescription2 ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "SubpassDescription2 is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SubpassDependency2 ) == sizeof( VkSubpassDependency2 ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "SubpassDependency2 is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SubpassBeginInfo ) == sizeof( VkSubpassBeginInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "SubpassBeginInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SubpassEndInfo ) == sizeof( VkSubpassEndInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "SubpassEndInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDevice8BitStorageFeatures ) == sizeof( VkPhysicalDevice8BitStorageFeatures ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDevice8BitStorageFeatures is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ConformanceVersion ) == sizeof( VkConformanceVersion ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ConformanceVersion is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceDriverProperties ) == sizeof( VkPhysicalDeviceDriverProperties ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceDriverProperties is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderAtomicInt64Features ) == sizeof( VkPhysicalDeviceShaderAtomicInt64Features ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceShaderAtomicInt64Features is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderFloat16Int8Features ) == sizeof( VkPhysicalDeviceShaderFloat16Int8Features ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceShaderFloat16Int8Features is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceFloatControlsProperties ) == sizeof( VkPhysicalDeviceFloatControlsProperties ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceFloatControlsProperties is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DescriptorSetLayoutBindingFlagsCreateInfo ) == sizeof( VkDescriptorSetLayoutBindingFlagsCreateInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DescriptorSetLayoutBindingFlagsCreateInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceDescriptorIndexingFeatures ) == sizeof( VkPhysicalDeviceDescriptorIndexingFeatures ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceDescriptorIndexingFeatures is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceDescriptorIndexingProperties ) == sizeof( VkPhysicalDeviceDescriptorIndexingProperties ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceDescriptorIndexingProperties is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DescriptorSetVariableDescriptorCountAllocateInfo ) == sizeof( VkDescriptorSetVariableDescriptorCountAllocateInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DescriptorSetVariableDescriptorCountAllocateInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DescriptorSetVariableDescriptorCountLayoutSupport ) == sizeof( VkDescriptorSetVariableDescriptorCountLayoutSupport ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DescriptorSetVariableDescriptorCountLayoutSupport is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SubpassDescriptionDepthStencilResolve ) == sizeof( VkSubpassDescriptionDepthStencilResolve ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "SubpassDescriptionDepthStencilResolve is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceDepthStencilResolveProperties ) == sizeof( VkPhysicalDeviceDepthStencilResolveProperties ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceDepthStencilResolveProperties is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceScalarBlockLayoutFeatures ) == sizeof( VkPhysicalDeviceScalarBlockLayoutFeatures ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceScalarBlockLayoutFeatures is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImageStencilUsageCreateInfo ) == sizeof( VkImageStencilUsageCreateInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ImageStencilUsageCreateInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SamplerReductionModeCreateInfo ) == sizeof( VkSamplerReductionModeCreateInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "SamplerReductionModeCreateInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceSamplerFilterMinmaxProperties ) == sizeof( VkPhysicalDeviceSamplerFilterMinmaxProperties ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceSamplerFilterMinmaxProperties is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceVulkanMemoryModelFeatures ) == sizeof( VkPhysicalDeviceVulkanMemoryModelFeatures ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceVulkanMemoryModelFeatures is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceImagelessFramebufferFeatures ) == sizeof( VkPhysicalDeviceImagelessFramebufferFeatures ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceImagelessFramebufferFeatures is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::FramebufferAttachmentsCreateInfo ) == sizeof( VkFramebufferAttachmentsCreateInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "FramebufferAttachmentsCreateInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::FramebufferAttachmentImageInfo ) == sizeof( VkFramebufferAttachmentImageInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "FramebufferAttachmentImageInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::RenderPassAttachmentBeginInfo ) == sizeof( VkRenderPassAttachmentBeginInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "RenderPassAttachmentBeginInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceUniformBufferStandardLayoutFeatures ) == sizeof( VkPhysicalDeviceUniformBufferStandardLayoutFeatures ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceUniformBufferStandardLayoutFeatures is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderSubgroupExtendedTypesFeatures ) == sizeof( VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceShaderSubgroupExtendedTypesFeatures is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceSeparateDepthStencilLayoutsFeatures ) == sizeof( VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceSeparateDepthStencilLayoutsFeatures is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AttachmentReferenceStencilLayout ) == sizeof( VkAttachmentReferenceStencilLayout ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "AttachmentReferenceStencilLayout is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AttachmentDescriptionStencilLayout ) == sizeof( VkAttachmentDescriptionStencilLayout ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "AttachmentDescriptionStencilLayout is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceHostQueryResetFeatures ) == sizeof( VkPhysicalDeviceHostQueryResetFeatures ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceHostQueryResetFeatures is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceTimelineSemaphoreFeatures ) == sizeof( VkPhysicalDeviceTimelineSemaphoreFeatures ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceTimelineSemaphoreFeatures is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceTimelineSemaphoreProperties ) == sizeof( VkPhysicalDeviceTimelineSemaphoreProperties ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceTimelineSemaphoreProperties is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SemaphoreTypeCreateInfo ) == sizeof( VkSemaphoreTypeCreateInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "SemaphoreTypeCreateInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::TimelineSemaphoreSubmitInfo ) == sizeof( VkTimelineSemaphoreSubmitInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "TimelineSemaphoreSubmitInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SemaphoreWaitInfo ) == sizeof( VkSemaphoreWaitInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "SemaphoreWaitInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SemaphoreSignalInfo ) == sizeof( VkSemaphoreSignalInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "SemaphoreSignalInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceBufferDeviceAddressFeatures ) == sizeof( VkPhysicalDeviceBufferDeviceAddressFeatures ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceBufferDeviceAddressFeatures is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::BufferDeviceAddressInfo ) == sizeof( VkBufferDeviceAddressInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "BufferDeviceAddressInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::BufferOpaqueCaptureAddressCreateInfo ) == sizeof( VkBufferOpaqueCaptureAddressCreateInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "BufferOpaqueCaptureAddressCreateInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::MemoryOpaqueCaptureAddressAllocateInfo ) == sizeof( VkMemoryOpaqueCaptureAddressAllocateInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "MemoryOpaqueCaptureAddressAllocateInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DeviceMemoryOpaqueCaptureAddressInfo ) == sizeof( VkDeviceMemoryOpaqueCaptureAddressInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DeviceMemoryOpaqueCaptureAddressInfo is not nothrow_move_constructible!" ); //=== VK_VERSION_1_3 === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceVulkan13Features ) == sizeof( VkPhysicalDeviceVulkan13Features ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceVulkan13Features is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceVulkan13Properties ) == sizeof( VkPhysicalDeviceVulkan13Properties ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceVulkan13Properties is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineCreationFeedbackCreateInfo ) == sizeof( VkPipelineCreationFeedbackCreateInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PipelineCreationFeedbackCreateInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineCreationFeedback ) == sizeof( VkPipelineCreationFeedback ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PipelineCreationFeedback is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderTerminateInvocationFeatures ) == sizeof( VkPhysicalDeviceShaderTerminateInvocationFeatures ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceShaderTerminateInvocationFeatures is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceToolProperties ) == sizeof( VkPhysicalDeviceToolProperties ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceToolProperties is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderDemoteToHelperInvocationFeatures ) == sizeof( VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceShaderDemoteToHelperInvocationFeatures is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDevicePrivateDataFeatures ) == sizeof( VkPhysicalDevicePrivateDataFeatures ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDevicePrivateDataFeatures is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DevicePrivateDataCreateInfo ) == sizeof( VkDevicePrivateDataCreateInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DevicePrivateDataCreateInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PrivateDataSlotCreateInfo ) == sizeof( VkPrivateDataSlotCreateInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PrivateDataSlotCreateInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PrivateDataSlot ) == sizeof( VkPrivateDataSlot ), "handle and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_copy_constructible::value, "PrivateDataSlot is not copy_constructible!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PrivateDataSlot is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDevicePipelineCreationCacheControlFeatures ) == sizeof( VkPhysicalDevicePipelineCreationCacheControlFeatures ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDevicePipelineCreationCacheControlFeatures is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::MemoryBarrier2 ) == sizeof( VkMemoryBarrier2 ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "MemoryBarrier2 is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::BufferMemoryBarrier2 ) == sizeof( VkBufferMemoryBarrier2 ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "BufferMemoryBarrier2 is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImageMemoryBarrier2 ) == sizeof( VkImageMemoryBarrier2 ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ImageMemoryBarrier2 is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DependencyInfo ) == sizeof( VkDependencyInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DependencyInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SubmitInfo2 ) == sizeof( VkSubmitInfo2 ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "SubmitInfo2 is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SemaphoreSubmitInfo ) == sizeof( VkSemaphoreSubmitInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "SemaphoreSubmitInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::CommandBufferSubmitInfo ) == sizeof( VkCommandBufferSubmitInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "CommandBufferSubmitInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceSynchronization2Features ) == sizeof( VkPhysicalDeviceSynchronization2Features ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceSynchronization2Features is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceZeroInitializeWorkgroupMemoryFeatures ) == sizeof( VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceZeroInitializeWorkgroupMemoryFeatures is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceImageRobustnessFeatures ) == sizeof( VkPhysicalDeviceImageRobustnessFeatures ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceImageRobustnessFeatures is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::CopyBufferInfo2 ) == sizeof( VkCopyBufferInfo2 ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "CopyBufferInfo2 is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::CopyImageInfo2 ) == sizeof( VkCopyImageInfo2 ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "CopyImageInfo2 is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::CopyBufferToImageInfo2 ) == sizeof( VkCopyBufferToImageInfo2 ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "CopyBufferToImageInfo2 is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::CopyImageToBufferInfo2 ) == sizeof( VkCopyImageToBufferInfo2 ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "CopyImageToBufferInfo2 is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::BlitImageInfo2 ) == sizeof( VkBlitImageInfo2 ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "BlitImageInfo2 is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ResolveImageInfo2 ) == sizeof( VkResolveImageInfo2 ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ResolveImageInfo2 is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::BufferCopy2 ) == sizeof( VkBufferCopy2 ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "BufferCopy2 is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImageCopy2 ) == sizeof( VkImageCopy2 ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ImageCopy2 is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImageBlit2 ) == sizeof( VkImageBlit2 ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ImageBlit2 is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::BufferImageCopy2 ) == sizeof( VkBufferImageCopy2 ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "BufferImageCopy2 is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImageResolve2 ) == sizeof( VkImageResolve2 ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ImageResolve2 is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceSubgroupSizeControlFeatures ) == sizeof( VkPhysicalDeviceSubgroupSizeControlFeatures ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceSubgroupSizeControlFeatures is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceSubgroupSizeControlProperties ) == sizeof( VkPhysicalDeviceSubgroupSizeControlProperties ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceSubgroupSizeControlProperties is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineShaderStageRequiredSubgroupSizeCreateInfo ) == sizeof( VkPipelineShaderStageRequiredSubgroupSizeCreateInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PipelineShaderStageRequiredSubgroupSizeCreateInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceInlineUniformBlockFeatures ) == sizeof( VkPhysicalDeviceInlineUniformBlockFeatures ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceInlineUniformBlockFeatures is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceInlineUniformBlockProperties ) == sizeof( VkPhysicalDeviceInlineUniformBlockProperties ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceInlineUniformBlockProperties is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::WriteDescriptorSetInlineUniformBlock ) == sizeof( VkWriteDescriptorSetInlineUniformBlock ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "WriteDescriptorSetInlineUniformBlock is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DescriptorPoolInlineUniformBlockCreateInfo ) == sizeof( VkDescriptorPoolInlineUniformBlockCreateInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DescriptorPoolInlineUniformBlockCreateInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceTextureCompressionASTCHDRFeatures ) == sizeof( VkPhysicalDeviceTextureCompressionASTCHDRFeatures ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceTextureCompressionASTCHDRFeatures is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::RenderingInfo ) == sizeof( VkRenderingInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "RenderingInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::RenderingAttachmentInfo ) == sizeof( VkRenderingAttachmentInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "RenderingAttachmentInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineRenderingCreateInfo ) == sizeof( VkPipelineRenderingCreateInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PipelineRenderingCreateInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceDynamicRenderingFeatures ) == sizeof( VkPhysicalDeviceDynamicRenderingFeatures ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceDynamicRenderingFeatures is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::CommandBufferInheritanceRenderingInfo ) == sizeof( VkCommandBufferInheritanceRenderingInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "CommandBufferInheritanceRenderingInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderIntegerDotProductFeatures ) == sizeof( VkPhysicalDeviceShaderIntegerDotProductFeatures ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceShaderIntegerDotProductFeatures is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderIntegerDotProductProperties ) == sizeof( VkPhysicalDeviceShaderIntegerDotProductProperties ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceShaderIntegerDotProductProperties is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceTexelBufferAlignmentProperties ) == sizeof( VkPhysicalDeviceTexelBufferAlignmentProperties ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceTexelBufferAlignmentProperties is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::FormatProperties3 ) == sizeof( VkFormatProperties3 ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "FormatProperties3 is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceMaintenance4Features ) == sizeof( VkPhysicalDeviceMaintenance4Features ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceMaintenance4Features is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceMaintenance4Properties ) == sizeof( VkPhysicalDeviceMaintenance4Properties ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceMaintenance4Properties is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DeviceBufferMemoryRequirements ) == sizeof( VkDeviceBufferMemoryRequirements ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DeviceBufferMemoryRequirements is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DeviceImageMemoryRequirements ) == sizeof( VkDeviceImageMemoryRequirements ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DeviceImageMemoryRequirements is not nothrow_move_constructible!" ); //=== VK_VERSION_1_4 === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceVulkan14Features ) == sizeof( VkPhysicalDeviceVulkan14Features ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceVulkan14Features is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceVulkan14Properties ) == sizeof( VkPhysicalDeviceVulkan14Properties ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceVulkan14Properties is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DeviceQueueGlobalPriorityCreateInfo ) == sizeof( VkDeviceQueueGlobalPriorityCreateInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DeviceQueueGlobalPriorityCreateInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceGlobalPriorityQueryFeatures ) == sizeof( VkPhysicalDeviceGlobalPriorityQueryFeatures ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceGlobalPriorityQueryFeatures is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::QueueFamilyGlobalPriorityProperties ) == sizeof( VkQueueFamilyGlobalPriorityProperties ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "QueueFamilyGlobalPriorityProperties is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderSubgroupRotateFeatures ) == sizeof( VkPhysicalDeviceShaderSubgroupRotateFeatures ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceShaderSubgroupRotateFeatures is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderFloatControls2Features ) == sizeof( VkPhysicalDeviceShaderFloatControls2Features ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceShaderFloatControls2Features is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderExpectAssumeFeatures ) == sizeof( VkPhysicalDeviceShaderExpectAssumeFeatures ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceShaderExpectAssumeFeatures is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceLineRasterizationFeatures ) == sizeof( VkPhysicalDeviceLineRasterizationFeatures ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceLineRasterizationFeatures is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceLineRasterizationProperties ) == sizeof( VkPhysicalDeviceLineRasterizationProperties ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceLineRasterizationProperties is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineRasterizationLineStateCreateInfo ) == sizeof( VkPipelineRasterizationLineStateCreateInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PipelineRasterizationLineStateCreateInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceVertexAttributeDivisorProperties ) == sizeof( VkPhysicalDeviceVertexAttributeDivisorProperties ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceVertexAttributeDivisorProperties is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VertexInputBindingDivisorDescription ) == sizeof( VkVertexInputBindingDivisorDescription ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VertexInputBindingDivisorDescription is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineVertexInputDivisorStateCreateInfo ) == sizeof( VkPipelineVertexInputDivisorStateCreateInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PipelineVertexInputDivisorStateCreateInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceVertexAttributeDivisorFeatures ) == sizeof( VkPhysicalDeviceVertexAttributeDivisorFeatures ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceVertexAttributeDivisorFeatures is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceIndexTypeUint8Features ) == sizeof( VkPhysicalDeviceIndexTypeUint8Features ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceIndexTypeUint8Features is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::MemoryMapInfo ) == sizeof( VkMemoryMapInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "MemoryMapInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::MemoryUnmapInfo ) == sizeof( VkMemoryUnmapInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "MemoryUnmapInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceMaintenance5Features ) == sizeof( VkPhysicalDeviceMaintenance5Features ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceMaintenance5Features is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceMaintenance5Properties ) == sizeof( VkPhysicalDeviceMaintenance5Properties ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceMaintenance5Properties is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::RenderingAreaInfo ) == sizeof( VkRenderingAreaInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "RenderingAreaInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DeviceImageSubresourceInfo ) == sizeof( VkDeviceImageSubresourceInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DeviceImageSubresourceInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImageSubresource2 ) == sizeof( VkImageSubresource2 ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ImageSubresource2 is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SubresourceLayout2 ) == sizeof( VkSubresourceLayout2 ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "SubresourceLayout2 is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineCreateFlags2CreateInfo ) == sizeof( VkPipelineCreateFlags2CreateInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PipelineCreateFlags2CreateInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::BufferUsageFlags2CreateInfo ) == sizeof( VkBufferUsageFlags2CreateInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "BufferUsageFlags2CreateInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDevicePushDescriptorProperties ) == sizeof( VkPhysicalDevicePushDescriptorProperties ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDevicePushDescriptorProperties is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceDynamicRenderingLocalReadFeatures ) == sizeof( VkPhysicalDeviceDynamicRenderingLocalReadFeatures ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceDynamicRenderingLocalReadFeatures is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::RenderingAttachmentLocationInfo ) == sizeof( VkRenderingAttachmentLocationInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "RenderingAttachmentLocationInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::RenderingInputAttachmentIndexInfo ) == sizeof( VkRenderingInputAttachmentIndexInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "RenderingInputAttachmentIndexInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceMaintenance6Features ) == sizeof( VkPhysicalDeviceMaintenance6Features ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceMaintenance6Features is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceMaintenance6Properties ) == sizeof( VkPhysicalDeviceMaintenance6Properties ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceMaintenance6Properties is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::BindMemoryStatus ) == sizeof( VkBindMemoryStatus ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "BindMemoryStatus is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::BindDescriptorSetsInfo ) == sizeof( VkBindDescriptorSetsInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "BindDescriptorSetsInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PushConstantsInfo ) == sizeof( VkPushConstantsInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PushConstantsInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PushDescriptorSetInfo ) == sizeof( VkPushDescriptorSetInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PushDescriptorSetInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PushDescriptorSetWithTemplateInfo ) == sizeof( VkPushDescriptorSetWithTemplateInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PushDescriptorSetWithTemplateInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDevicePipelineProtectedAccessFeatures ) == sizeof( VkPhysicalDevicePipelineProtectedAccessFeatures ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDevicePipelineProtectedAccessFeatures is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDevicePipelineRobustnessFeatures ) == sizeof( VkPhysicalDevicePipelineRobustnessFeatures ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDevicePipelineRobustnessFeatures is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDevicePipelineRobustnessProperties ) == sizeof( VkPhysicalDevicePipelineRobustnessProperties ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDevicePipelineRobustnessProperties is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineRobustnessCreateInfo ) == sizeof( VkPipelineRobustnessCreateInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PipelineRobustnessCreateInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceHostImageCopyFeatures ) == sizeof( VkPhysicalDeviceHostImageCopyFeatures ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceHostImageCopyFeatures is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceHostImageCopyProperties ) == sizeof( VkPhysicalDeviceHostImageCopyProperties ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceHostImageCopyProperties is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::MemoryToImageCopy ) == sizeof( VkMemoryToImageCopy ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "MemoryToImageCopy is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImageToMemoryCopy ) == sizeof( VkImageToMemoryCopy ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ImageToMemoryCopy is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::CopyMemoryToImageInfo ) == sizeof( VkCopyMemoryToImageInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "CopyMemoryToImageInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::CopyImageToMemoryInfo ) == sizeof( VkCopyImageToMemoryInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "CopyImageToMemoryInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::CopyImageToImageInfo ) == sizeof( VkCopyImageToImageInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "CopyImageToImageInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::HostImageLayoutTransitionInfo ) == sizeof( VkHostImageLayoutTransitionInfo ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "HostImageLayoutTransitionInfo is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SubresourceHostMemcpySize ) == sizeof( VkSubresourceHostMemcpySize ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "SubresourceHostMemcpySize is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::HostImageCopyDevicePerformanceQuery ) == sizeof( VkHostImageCopyDevicePerformanceQuery ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "HostImageCopyDevicePerformanceQuery is not nothrow_move_constructible!" ); //=== VK_KHR_surface === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SurfaceKHR ) == sizeof( VkSurfaceKHR ), "handle and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_copy_constructible::value, "SurfaceKHR is not copy_constructible!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "SurfaceKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SurfaceCapabilitiesKHR ) == sizeof( VkSurfaceCapabilitiesKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "SurfaceCapabilitiesKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SurfaceFormatKHR ) == sizeof( VkSurfaceFormatKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "SurfaceFormatKHR is not nothrow_move_constructible!" ); //=== VK_KHR_swapchain === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SwapchainCreateInfoKHR ) == sizeof( VkSwapchainCreateInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "SwapchainCreateInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SwapchainKHR ) == sizeof( VkSwapchainKHR ), "handle and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_copy_constructible::value, "SwapchainKHR is not copy_constructible!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "SwapchainKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PresentInfoKHR ) == sizeof( VkPresentInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PresentInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImageSwapchainCreateInfoKHR ) == sizeof( VkImageSwapchainCreateInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ImageSwapchainCreateInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::BindImageMemorySwapchainInfoKHR ) == sizeof( VkBindImageMemorySwapchainInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "BindImageMemorySwapchainInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AcquireNextImageInfoKHR ) == sizeof( VkAcquireNextImageInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "AcquireNextImageInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DeviceGroupPresentCapabilitiesKHR ) == sizeof( VkDeviceGroupPresentCapabilitiesKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DeviceGroupPresentCapabilitiesKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DeviceGroupPresentInfoKHR ) == sizeof( VkDeviceGroupPresentInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DeviceGroupPresentInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DeviceGroupSwapchainCreateInfoKHR ) == sizeof( VkDeviceGroupSwapchainCreateInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DeviceGroupSwapchainCreateInfoKHR is not nothrow_move_constructible!" ); //=== VK_KHR_display === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DisplayKHR ) == sizeof( VkDisplayKHR ), "handle and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_copy_constructible::value, "DisplayKHR is not copy_constructible!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DisplayKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DisplayModeCreateInfoKHR ) == sizeof( VkDisplayModeCreateInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DisplayModeCreateInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DisplayModeKHR ) == sizeof( VkDisplayModeKHR ), "handle and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_copy_constructible::value, "DisplayModeKHR is not copy_constructible!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DisplayModeKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DisplayModeParametersKHR ) == sizeof( VkDisplayModeParametersKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DisplayModeParametersKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DisplayModePropertiesKHR ) == sizeof( VkDisplayModePropertiesKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DisplayModePropertiesKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DisplayPlaneCapabilitiesKHR ) == sizeof( VkDisplayPlaneCapabilitiesKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DisplayPlaneCapabilitiesKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DisplayPlanePropertiesKHR ) == sizeof( VkDisplayPlanePropertiesKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DisplayPlanePropertiesKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DisplayPropertiesKHR ) == sizeof( VkDisplayPropertiesKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DisplayPropertiesKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DisplaySurfaceCreateInfoKHR ) == sizeof( VkDisplaySurfaceCreateInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DisplaySurfaceCreateInfoKHR is not nothrow_move_constructible!" ); //=== VK_KHR_display_swapchain === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DisplayPresentInfoKHR ) == sizeof( VkDisplayPresentInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DisplayPresentInfoKHR is not nothrow_move_constructible!" ); #if defined( VK_USE_PLATFORM_XLIB_KHR ) //=== VK_KHR_xlib_surface === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::XlibSurfaceCreateInfoKHR ) == sizeof( VkXlibSurfaceCreateInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "XlibSurfaceCreateInfoKHR is not nothrow_move_constructible!" ); #endif /*VK_USE_PLATFORM_XLIB_KHR*/ #if defined( VK_USE_PLATFORM_XCB_KHR ) //=== VK_KHR_xcb_surface === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::XcbSurfaceCreateInfoKHR ) == sizeof( VkXcbSurfaceCreateInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "XcbSurfaceCreateInfoKHR is not nothrow_move_constructible!" ); #endif /*VK_USE_PLATFORM_XCB_KHR*/ #if defined( VK_USE_PLATFORM_WAYLAND_KHR ) //=== VK_KHR_wayland_surface === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::WaylandSurfaceCreateInfoKHR ) == sizeof( VkWaylandSurfaceCreateInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "WaylandSurfaceCreateInfoKHR is not nothrow_move_constructible!" ); #endif /*VK_USE_PLATFORM_WAYLAND_KHR*/ #if defined( VK_USE_PLATFORM_ANDROID_KHR ) //=== VK_KHR_android_surface === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AndroidSurfaceCreateInfoKHR ) == sizeof( VkAndroidSurfaceCreateInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "AndroidSurfaceCreateInfoKHR is not nothrow_move_constructible!" ); #endif /*VK_USE_PLATFORM_ANDROID_KHR*/ #if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_KHR_win32_surface === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::Win32SurfaceCreateInfoKHR ) == sizeof( VkWin32SurfaceCreateInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "Win32SurfaceCreateInfoKHR is not nothrow_move_constructible!" ); #endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_EXT_debug_report === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DebugReportCallbackEXT ) == sizeof( VkDebugReportCallbackEXT ), "handle and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_copy_constructible::value, "DebugReportCallbackEXT is not copy_constructible!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DebugReportCallbackEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DebugReportCallbackCreateInfoEXT ) == sizeof( VkDebugReportCallbackCreateInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DebugReportCallbackCreateInfoEXT is not nothrow_move_constructible!" ); //=== VK_AMD_rasterization_order === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineRasterizationStateRasterizationOrderAMD ) == sizeof( VkPipelineRasterizationStateRasterizationOrderAMD ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PipelineRasterizationStateRasterizationOrderAMD is not nothrow_move_constructible!" ); //=== VK_EXT_debug_marker === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DebugMarkerObjectNameInfoEXT ) == sizeof( VkDebugMarkerObjectNameInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DebugMarkerObjectNameInfoEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DebugMarkerObjectTagInfoEXT ) == sizeof( VkDebugMarkerObjectTagInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DebugMarkerObjectTagInfoEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DebugMarkerMarkerInfoEXT ) == sizeof( VkDebugMarkerMarkerInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DebugMarkerMarkerInfoEXT is not nothrow_move_constructible!" ); //=== VK_KHR_video_queue === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoSessionKHR ) == sizeof( VkVideoSessionKHR ), "handle and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_copy_constructible::value, "VideoSessionKHR is not copy_constructible!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoSessionKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoSessionParametersKHR ) == sizeof( VkVideoSessionParametersKHR ), "handle and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_copy_constructible::value, "VideoSessionParametersKHR is not copy_constructible!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoSessionParametersKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::QueueFamilyQueryResultStatusPropertiesKHR ) == sizeof( VkQueueFamilyQueryResultStatusPropertiesKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "QueueFamilyQueryResultStatusPropertiesKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::QueueFamilyVideoPropertiesKHR ) == sizeof( VkQueueFamilyVideoPropertiesKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "QueueFamilyVideoPropertiesKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoProfileInfoKHR ) == sizeof( VkVideoProfileInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoProfileInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoProfileListInfoKHR ) == sizeof( VkVideoProfileListInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoProfileListInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoCapabilitiesKHR ) == sizeof( VkVideoCapabilitiesKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoCapabilitiesKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceVideoFormatInfoKHR ) == sizeof( VkPhysicalDeviceVideoFormatInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceVideoFormatInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoFormatPropertiesKHR ) == sizeof( VkVideoFormatPropertiesKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoFormatPropertiesKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoPictureResourceInfoKHR ) == sizeof( VkVideoPictureResourceInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoPictureResourceInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoReferenceSlotInfoKHR ) == sizeof( VkVideoReferenceSlotInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoReferenceSlotInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoSessionMemoryRequirementsKHR ) == sizeof( VkVideoSessionMemoryRequirementsKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoSessionMemoryRequirementsKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::BindVideoSessionMemoryInfoKHR ) == sizeof( VkBindVideoSessionMemoryInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "BindVideoSessionMemoryInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoSessionCreateInfoKHR ) == sizeof( VkVideoSessionCreateInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoSessionCreateInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoSessionParametersCreateInfoKHR ) == sizeof( VkVideoSessionParametersCreateInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoSessionParametersCreateInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoSessionParametersUpdateInfoKHR ) == sizeof( VkVideoSessionParametersUpdateInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoSessionParametersUpdateInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoBeginCodingInfoKHR ) == sizeof( VkVideoBeginCodingInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoBeginCodingInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEndCodingInfoKHR ) == sizeof( VkVideoEndCodingInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoEndCodingInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoCodingControlInfoKHR ) == sizeof( VkVideoCodingControlInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoCodingControlInfoKHR is not nothrow_move_constructible!" ); //=== VK_KHR_video_decode_queue === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoDecodeCapabilitiesKHR ) == sizeof( VkVideoDecodeCapabilitiesKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoDecodeCapabilitiesKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoDecodeUsageInfoKHR ) == sizeof( VkVideoDecodeUsageInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoDecodeUsageInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoDecodeInfoKHR ) == sizeof( VkVideoDecodeInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoDecodeInfoKHR is not nothrow_move_constructible!" ); //=== VK_NV_dedicated_allocation === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DedicatedAllocationImageCreateInfoNV ) == sizeof( VkDedicatedAllocationImageCreateInfoNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DedicatedAllocationImageCreateInfoNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DedicatedAllocationBufferCreateInfoNV ) == sizeof( VkDedicatedAllocationBufferCreateInfoNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DedicatedAllocationBufferCreateInfoNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DedicatedAllocationMemoryAllocateInfoNV ) == sizeof( VkDedicatedAllocationMemoryAllocateInfoNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DedicatedAllocationMemoryAllocateInfoNV is not nothrow_move_constructible!" ); //=== VK_EXT_transform_feedback === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceTransformFeedbackFeaturesEXT ) == sizeof( VkPhysicalDeviceTransformFeedbackFeaturesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceTransformFeedbackFeaturesEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceTransformFeedbackPropertiesEXT ) == sizeof( VkPhysicalDeviceTransformFeedbackPropertiesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceTransformFeedbackPropertiesEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineRasterizationStateStreamCreateInfoEXT ) == sizeof( VkPipelineRasterizationStateStreamCreateInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PipelineRasterizationStateStreamCreateInfoEXT is not nothrow_move_constructible!" ); //=== VK_NVX_binary_import === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::CuModuleNVX ) == sizeof( VkCuModuleNVX ), "handle and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_copy_constructible::value, "CuModuleNVX is not copy_constructible!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "CuModuleNVX is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::CuFunctionNVX ) == sizeof( VkCuFunctionNVX ), "handle and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_copy_constructible::value, "CuFunctionNVX is not copy_constructible!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "CuFunctionNVX is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::CuModuleCreateInfoNVX ) == sizeof( VkCuModuleCreateInfoNVX ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "CuModuleCreateInfoNVX is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::CuModuleTexturingModeCreateInfoNVX ) == sizeof( VkCuModuleTexturingModeCreateInfoNVX ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "CuModuleTexturingModeCreateInfoNVX is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::CuFunctionCreateInfoNVX ) == sizeof( VkCuFunctionCreateInfoNVX ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "CuFunctionCreateInfoNVX is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::CuLaunchInfoNVX ) == sizeof( VkCuLaunchInfoNVX ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "CuLaunchInfoNVX is not nothrow_move_constructible!" ); //=== VK_NVX_image_view_handle === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImageViewHandleInfoNVX ) == sizeof( VkImageViewHandleInfoNVX ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ImageViewHandleInfoNVX is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImageViewAddressPropertiesNVX ) == sizeof( VkImageViewAddressPropertiesNVX ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ImageViewAddressPropertiesNVX is not nothrow_move_constructible!" ); //=== VK_KHR_video_encode_h264 === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEncodeH264CapabilitiesKHR ) == sizeof( VkVideoEncodeH264CapabilitiesKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoEncodeH264CapabilitiesKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEncodeH264QualityLevelPropertiesKHR ) == sizeof( VkVideoEncodeH264QualityLevelPropertiesKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoEncodeH264QualityLevelPropertiesKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEncodeH264SessionCreateInfoKHR ) == sizeof( VkVideoEncodeH264SessionCreateInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoEncodeH264SessionCreateInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEncodeH264SessionParametersCreateInfoKHR ) == sizeof( VkVideoEncodeH264SessionParametersCreateInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoEncodeH264SessionParametersCreateInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEncodeH264SessionParametersAddInfoKHR ) == sizeof( VkVideoEncodeH264SessionParametersAddInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoEncodeH264SessionParametersAddInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEncodeH264SessionParametersGetInfoKHR ) == sizeof( VkVideoEncodeH264SessionParametersGetInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoEncodeH264SessionParametersGetInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEncodeH264SessionParametersFeedbackInfoKHR ) == sizeof( VkVideoEncodeH264SessionParametersFeedbackInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoEncodeH264SessionParametersFeedbackInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEncodeH264PictureInfoKHR ) == sizeof( VkVideoEncodeH264PictureInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoEncodeH264PictureInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEncodeH264DpbSlotInfoKHR ) == sizeof( VkVideoEncodeH264DpbSlotInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoEncodeH264DpbSlotInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEncodeH264NaluSliceInfoKHR ) == sizeof( VkVideoEncodeH264NaluSliceInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoEncodeH264NaluSliceInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEncodeH264ProfileInfoKHR ) == sizeof( VkVideoEncodeH264ProfileInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoEncodeH264ProfileInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEncodeH264RateControlInfoKHR ) == sizeof( VkVideoEncodeH264RateControlInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoEncodeH264RateControlInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEncodeH264RateControlLayerInfoKHR ) == sizeof( VkVideoEncodeH264RateControlLayerInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoEncodeH264RateControlLayerInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEncodeH264QpKHR ) == sizeof( VkVideoEncodeH264QpKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoEncodeH264QpKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEncodeH264FrameSizeKHR ) == sizeof( VkVideoEncodeH264FrameSizeKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoEncodeH264FrameSizeKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEncodeH264GopRemainingFrameInfoKHR ) == sizeof( VkVideoEncodeH264GopRemainingFrameInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoEncodeH264GopRemainingFrameInfoKHR is not nothrow_move_constructible!" ); //=== VK_KHR_video_encode_h265 === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEncodeH265CapabilitiesKHR ) == sizeof( VkVideoEncodeH265CapabilitiesKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoEncodeH265CapabilitiesKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEncodeH265SessionCreateInfoKHR ) == sizeof( VkVideoEncodeH265SessionCreateInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoEncodeH265SessionCreateInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEncodeH265QualityLevelPropertiesKHR ) == sizeof( VkVideoEncodeH265QualityLevelPropertiesKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoEncodeH265QualityLevelPropertiesKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEncodeH265SessionParametersCreateInfoKHR ) == sizeof( VkVideoEncodeH265SessionParametersCreateInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoEncodeH265SessionParametersCreateInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEncodeH265SessionParametersAddInfoKHR ) == sizeof( VkVideoEncodeH265SessionParametersAddInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoEncodeH265SessionParametersAddInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEncodeH265SessionParametersGetInfoKHR ) == sizeof( VkVideoEncodeH265SessionParametersGetInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoEncodeH265SessionParametersGetInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEncodeH265SessionParametersFeedbackInfoKHR ) == sizeof( VkVideoEncodeH265SessionParametersFeedbackInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoEncodeH265SessionParametersFeedbackInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEncodeH265PictureInfoKHR ) == sizeof( VkVideoEncodeH265PictureInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoEncodeH265PictureInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEncodeH265DpbSlotInfoKHR ) == sizeof( VkVideoEncodeH265DpbSlotInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoEncodeH265DpbSlotInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEncodeH265NaluSliceSegmentInfoKHR ) == sizeof( VkVideoEncodeH265NaluSliceSegmentInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoEncodeH265NaluSliceSegmentInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEncodeH265ProfileInfoKHR ) == sizeof( VkVideoEncodeH265ProfileInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoEncodeH265ProfileInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEncodeH265RateControlInfoKHR ) == sizeof( VkVideoEncodeH265RateControlInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoEncodeH265RateControlInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEncodeH265RateControlLayerInfoKHR ) == sizeof( VkVideoEncodeH265RateControlLayerInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoEncodeH265RateControlLayerInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEncodeH265QpKHR ) == sizeof( VkVideoEncodeH265QpKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoEncodeH265QpKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEncodeH265FrameSizeKHR ) == sizeof( VkVideoEncodeH265FrameSizeKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoEncodeH265FrameSizeKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEncodeH265GopRemainingFrameInfoKHR ) == sizeof( VkVideoEncodeH265GopRemainingFrameInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoEncodeH265GopRemainingFrameInfoKHR is not nothrow_move_constructible!" ); //=== VK_KHR_video_decode_h264 === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoDecodeH264ProfileInfoKHR ) == sizeof( VkVideoDecodeH264ProfileInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoDecodeH264ProfileInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoDecodeH264CapabilitiesKHR ) == sizeof( VkVideoDecodeH264CapabilitiesKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoDecodeH264CapabilitiesKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoDecodeH264SessionParametersCreateInfoKHR ) == sizeof( VkVideoDecodeH264SessionParametersCreateInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoDecodeH264SessionParametersCreateInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoDecodeH264SessionParametersAddInfoKHR ) == sizeof( VkVideoDecodeH264SessionParametersAddInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoDecodeH264SessionParametersAddInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoDecodeH264PictureInfoKHR ) == sizeof( VkVideoDecodeH264PictureInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoDecodeH264PictureInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoDecodeH264DpbSlotInfoKHR ) == sizeof( VkVideoDecodeH264DpbSlotInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoDecodeH264DpbSlotInfoKHR is not nothrow_move_constructible!" ); //=== VK_AMD_texture_gather_bias_lod === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::TextureLODGatherFormatPropertiesAMD ) == sizeof( VkTextureLODGatherFormatPropertiesAMD ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "TextureLODGatherFormatPropertiesAMD is not nothrow_move_constructible!" ); //=== VK_AMD_shader_info === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ShaderResourceUsageAMD ) == sizeof( VkShaderResourceUsageAMD ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ShaderResourceUsageAMD is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ShaderStatisticsInfoAMD ) == sizeof( VkShaderStatisticsInfoAMD ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ShaderStatisticsInfoAMD is not nothrow_move_constructible!" ); #if defined( VK_USE_PLATFORM_GGP ) //=== VK_GGP_stream_descriptor_surface === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::StreamDescriptorSurfaceCreateInfoGGP ) == sizeof( VkStreamDescriptorSurfaceCreateInfoGGP ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "StreamDescriptorSurfaceCreateInfoGGP is not nothrow_move_constructible!" ); #endif /*VK_USE_PLATFORM_GGP*/ //=== VK_NV_corner_sampled_image === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceCornerSampledImageFeaturesNV ) == sizeof( VkPhysicalDeviceCornerSampledImageFeaturesNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceCornerSampledImageFeaturesNV is not nothrow_move_constructible!" ); //=== VK_NV_external_memory_capabilities === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ExternalImageFormatPropertiesNV ) == sizeof( VkExternalImageFormatPropertiesNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ExternalImageFormatPropertiesNV is not nothrow_move_constructible!" ); //=== VK_NV_external_memory === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ExternalMemoryImageCreateInfoNV ) == sizeof( VkExternalMemoryImageCreateInfoNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ExternalMemoryImageCreateInfoNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ExportMemoryAllocateInfoNV ) == sizeof( VkExportMemoryAllocateInfoNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ExportMemoryAllocateInfoNV is not nothrow_move_constructible!" ); #if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_NV_external_memory_win32 === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImportMemoryWin32HandleInfoNV ) == sizeof( VkImportMemoryWin32HandleInfoNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ImportMemoryWin32HandleInfoNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ExportMemoryWin32HandleInfoNV ) == sizeof( VkExportMemoryWin32HandleInfoNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ExportMemoryWin32HandleInfoNV is not nothrow_move_constructible!" ); #endif /*VK_USE_PLATFORM_WIN32_KHR*/ #if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_NV_win32_keyed_mutex === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::Win32KeyedMutexAcquireReleaseInfoNV ) == sizeof( VkWin32KeyedMutexAcquireReleaseInfoNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "Win32KeyedMutexAcquireReleaseInfoNV is not nothrow_move_constructible!" ); #endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_EXT_validation_flags === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ValidationFlagsEXT ) == sizeof( VkValidationFlagsEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ValidationFlagsEXT is not nothrow_move_constructible!" ); #if defined( VK_USE_PLATFORM_VI_NN ) //=== VK_NN_vi_surface === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ViSurfaceCreateInfoNN ) == sizeof( VkViSurfaceCreateInfoNN ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ViSurfaceCreateInfoNN is not nothrow_move_constructible!" ); #endif /*VK_USE_PLATFORM_VI_NN*/ //=== VK_EXT_astc_decode_mode === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImageViewASTCDecodeModeEXT ) == sizeof( VkImageViewASTCDecodeModeEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ImageViewASTCDecodeModeEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceASTCDecodeFeaturesEXT ) == sizeof( VkPhysicalDeviceASTCDecodeFeaturesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceASTCDecodeFeaturesEXT is not nothrow_move_constructible!" ); #if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_KHR_external_memory_win32 === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImportMemoryWin32HandleInfoKHR ) == sizeof( VkImportMemoryWin32HandleInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ImportMemoryWin32HandleInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ExportMemoryWin32HandleInfoKHR ) == sizeof( VkExportMemoryWin32HandleInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ExportMemoryWin32HandleInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::MemoryWin32HandlePropertiesKHR ) == sizeof( VkMemoryWin32HandlePropertiesKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "MemoryWin32HandlePropertiesKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::MemoryGetWin32HandleInfoKHR ) == sizeof( VkMemoryGetWin32HandleInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "MemoryGetWin32HandleInfoKHR is not nothrow_move_constructible!" ); #endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_KHR_external_memory_fd === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImportMemoryFdInfoKHR ) == sizeof( VkImportMemoryFdInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ImportMemoryFdInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::MemoryFdPropertiesKHR ) == sizeof( VkMemoryFdPropertiesKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "MemoryFdPropertiesKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::MemoryGetFdInfoKHR ) == sizeof( VkMemoryGetFdInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "MemoryGetFdInfoKHR is not nothrow_move_constructible!" ); #if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_KHR_win32_keyed_mutex === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::Win32KeyedMutexAcquireReleaseInfoKHR ) == sizeof( VkWin32KeyedMutexAcquireReleaseInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "Win32KeyedMutexAcquireReleaseInfoKHR is not nothrow_move_constructible!" ); #endif /*VK_USE_PLATFORM_WIN32_KHR*/ #if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_KHR_external_semaphore_win32 === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImportSemaphoreWin32HandleInfoKHR ) == sizeof( VkImportSemaphoreWin32HandleInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ImportSemaphoreWin32HandleInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ExportSemaphoreWin32HandleInfoKHR ) == sizeof( VkExportSemaphoreWin32HandleInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ExportSemaphoreWin32HandleInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::D3D12FenceSubmitInfoKHR ) == sizeof( VkD3D12FenceSubmitInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "D3D12FenceSubmitInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SemaphoreGetWin32HandleInfoKHR ) == sizeof( VkSemaphoreGetWin32HandleInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "SemaphoreGetWin32HandleInfoKHR is not nothrow_move_constructible!" ); #endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_KHR_external_semaphore_fd === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImportSemaphoreFdInfoKHR ) == sizeof( VkImportSemaphoreFdInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ImportSemaphoreFdInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SemaphoreGetFdInfoKHR ) == sizeof( VkSemaphoreGetFdInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "SemaphoreGetFdInfoKHR is not nothrow_move_constructible!" ); //=== VK_EXT_conditional_rendering === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ConditionalRenderingBeginInfoEXT ) == sizeof( VkConditionalRenderingBeginInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ConditionalRenderingBeginInfoEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceConditionalRenderingFeaturesEXT ) == sizeof( VkPhysicalDeviceConditionalRenderingFeaturesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceConditionalRenderingFeaturesEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::CommandBufferInheritanceConditionalRenderingInfoEXT ) == sizeof( VkCommandBufferInheritanceConditionalRenderingInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "CommandBufferInheritanceConditionalRenderingInfoEXT is not nothrow_move_constructible!" ); //=== VK_KHR_incremental_present === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PresentRegionsKHR ) == sizeof( VkPresentRegionsKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PresentRegionsKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PresentRegionKHR ) == sizeof( VkPresentRegionKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PresentRegionKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::RectLayerKHR ) == sizeof( VkRectLayerKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "RectLayerKHR is not nothrow_move_constructible!" ); //=== VK_NV_clip_space_w_scaling === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ViewportWScalingNV ) == sizeof( VkViewportWScalingNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ViewportWScalingNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineViewportWScalingStateCreateInfoNV ) == sizeof( VkPipelineViewportWScalingStateCreateInfoNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PipelineViewportWScalingStateCreateInfoNV is not nothrow_move_constructible!" ); //=== VK_EXT_display_surface_counter === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SurfaceCapabilities2EXT ) == sizeof( VkSurfaceCapabilities2EXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "SurfaceCapabilities2EXT is not nothrow_move_constructible!" ); //=== VK_EXT_display_control === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DisplayPowerInfoEXT ) == sizeof( VkDisplayPowerInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DisplayPowerInfoEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DeviceEventInfoEXT ) == sizeof( VkDeviceEventInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DeviceEventInfoEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DisplayEventInfoEXT ) == sizeof( VkDisplayEventInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DisplayEventInfoEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SwapchainCounterCreateInfoEXT ) == sizeof( VkSwapchainCounterCreateInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "SwapchainCounterCreateInfoEXT is not nothrow_move_constructible!" ); //=== VK_GOOGLE_display_timing === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::RefreshCycleDurationGOOGLE ) == sizeof( VkRefreshCycleDurationGOOGLE ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "RefreshCycleDurationGOOGLE is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PastPresentationTimingGOOGLE ) == sizeof( VkPastPresentationTimingGOOGLE ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PastPresentationTimingGOOGLE is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PresentTimesInfoGOOGLE ) == sizeof( VkPresentTimesInfoGOOGLE ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PresentTimesInfoGOOGLE is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PresentTimeGOOGLE ) == sizeof( VkPresentTimeGOOGLE ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PresentTimeGOOGLE is not nothrow_move_constructible!" ); //=== VK_NVX_multiview_per_view_attributes === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX ) == sizeof( VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::MultiviewPerViewAttributesInfoNVX ) == sizeof( VkMultiviewPerViewAttributesInfoNVX ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "MultiviewPerViewAttributesInfoNVX is not nothrow_move_constructible!" ); //=== VK_NV_viewport_swizzle === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ViewportSwizzleNV ) == sizeof( VkViewportSwizzleNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ViewportSwizzleNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineViewportSwizzleStateCreateInfoNV ) == sizeof( VkPipelineViewportSwizzleStateCreateInfoNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PipelineViewportSwizzleStateCreateInfoNV is not nothrow_move_constructible!" ); //=== VK_EXT_discard_rectangles === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceDiscardRectanglePropertiesEXT ) == sizeof( VkPhysicalDeviceDiscardRectanglePropertiesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceDiscardRectanglePropertiesEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineDiscardRectangleStateCreateInfoEXT ) == sizeof( VkPipelineDiscardRectangleStateCreateInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PipelineDiscardRectangleStateCreateInfoEXT is not nothrow_move_constructible!" ); //=== VK_EXT_conservative_rasterization === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceConservativeRasterizationPropertiesEXT ) == sizeof( VkPhysicalDeviceConservativeRasterizationPropertiesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceConservativeRasterizationPropertiesEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineRasterizationConservativeStateCreateInfoEXT ) == sizeof( VkPipelineRasterizationConservativeStateCreateInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PipelineRasterizationConservativeStateCreateInfoEXT is not nothrow_move_constructible!" ); //=== VK_EXT_depth_clip_enable === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceDepthClipEnableFeaturesEXT ) == sizeof( VkPhysicalDeviceDepthClipEnableFeaturesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceDepthClipEnableFeaturesEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineRasterizationDepthClipStateCreateInfoEXT ) == sizeof( VkPipelineRasterizationDepthClipStateCreateInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PipelineRasterizationDepthClipStateCreateInfoEXT is not nothrow_move_constructible!" ); //=== VK_EXT_hdr_metadata === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::HdrMetadataEXT ) == sizeof( VkHdrMetadataEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "HdrMetadataEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::XYColorEXT ) == sizeof( VkXYColorEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "XYColorEXT is not nothrow_move_constructible!" ); //=== VK_IMG_relaxed_line_rasterization === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceRelaxedLineRasterizationFeaturesIMG ) == sizeof( VkPhysicalDeviceRelaxedLineRasterizationFeaturesIMG ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceRelaxedLineRasterizationFeaturesIMG is not nothrow_move_constructible!" ); //=== VK_KHR_shared_presentable_image === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SharedPresentSurfaceCapabilitiesKHR ) == sizeof( VkSharedPresentSurfaceCapabilitiesKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "SharedPresentSurfaceCapabilitiesKHR is not nothrow_move_constructible!" ); #if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_KHR_external_fence_win32 === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImportFenceWin32HandleInfoKHR ) == sizeof( VkImportFenceWin32HandleInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ImportFenceWin32HandleInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ExportFenceWin32HandleInfoKHR ) == sizeof( VkExportFenceWin32HandleInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ExportFenceWin32HandleInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::FenceGetWin32HandleInfoKHR ) == sizeof( VkFenceGetWin32HandleInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "FenceGetWin32HandleInfoKHR is not nothrow_move_constructible!" ); #endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_KHR_external_fence_fd === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImportFenceFdInfoKHR ) == sizeof( VkImportFenceFdInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ImportFenceFdInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::FenceGetFdInfoKHR ) == sizeof( VkFenceGetFdInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "FenceGetFdInfoKHR is not nothrow_move_constructible!" ); //=== VK_KHR_performance_query === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDevicePerformanceQueryFeaturesKHR ) == sizeof( VkPhysicalDevicePerformanceQueryFeaturesKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDevicePerformanceQueryFeaturesKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDevicePerformanceQueryPropertiesKHR ) == sizeof( VkPhysicalDevicePerformanceQueryPropertiesKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDevicePerformanceQueryPropertiesKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PerformanceCounterKHR ) == sizeof( VkPerformanceCounterKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PerformanceCounterKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PerformanceCounterDescriptionKHR ) == sizeof( VkPerformanceCounterDescriptionKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PerformanceCounterDescriptionKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::QueryPoolPerformanceCreateInfoKHR ) == sizeof( VkQueryPoolPerformanceCreateInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "QueryPoolPerformanceCreateInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PerformanceCounterResultKHR ) == sizeof( VkPerformanceCounterResultKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PerformanceCounterResultKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AcquireProfilingLockInfoKHR ) == sizeof( VkAcquireProfilingLockInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "AcquireProfilingLockInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PerformanceQuerySubmitInfoKHR ) == sizeof( VkPerformanceQuerySubmitInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PerformanceQuerySubmitInfoKHR is not nothrow_move_constructible!" ); //=== VK_KHR_get_surface_capabilities2 === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceSurfaceInfo2KHR ) == sizeof( VkPhysicalDeviceSurfaceInfo2KHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceSurfaceInfo2KHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SurfaceCapabilities2KHR ) == sizeof( VkSurfaceCapabilities2KHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "SurfaceCapabilities2KHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SurfaceFormat2KHR ) == sizeof( VkSurfaceFormat2KHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "SurfaceFormat2KHR is not nothrow_move_constructible!" ); //=== VK_KHR_get_display_properties2 === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DisplayProperties2KHR ) == sizeof( VkDisplayProperties2KHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DisplayProperties2KHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DisplayPlaneProperties2KHR ) == sizeof( VkDisplayPlaneProperties2KHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DisplayPlaneProperties2KHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DisplayModeProperties2KHR ) == sizeof( VkDisplayModeProperties2KHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DisplayModeProperties2KHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DisplayPlaneInfo2KHR ) == sizeof( VkDisplayPlaneInfo2KHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DisplayPlaneInfo2KHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DisplayPlaneCapabilities2KHR ) == sizeof( VkDisplayPlaneCapabilities2KHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DisplayPlaneCapabilities2KHR is not nothrow_move_constructible!" ); #if defined( VK_USE_PLATFORM_IOS_MVK ) //=== VK_MVK_ios_surface === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::IOSSurfaceCreateInfoMVK ) == sizeof( VkIOSSurfaceCreateInfoMVK ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "IOSSurfaceCreateInfoMVK is not nothrow_move_constructible!" ); #endif /*VK_USE_PLATFORM_IOS_MVK*/ #if defined( VK_USE_PLATFORM_MACOS_MVK ) //=== VK_MVK_macos_surface === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::MacOSSurfaceCreateInfoMVK ) == sizeof( VkMacOSSurfaceCreateInfoMVK ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "MacOSSurfaceCreateInfoMVK is not nothrow_move_constructible!" ); #endif /*VK_USE_PLATFORM_MACOS_MVK*/ //=== VK_EXT_debug_utils === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DebugUtilsLabelEXT ) == sizeof( VkDebugUtilsLabelEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DebugUtilsLabelEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DebugUtilsMessengerCallbackDataEXT ) == sizeof( VkDebugUtilsMessengerCallbackDataEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DebugUtilsMessengerCallbackDataEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DebugUtilsMessengerCreateInfoEXT ) == sizeof( VkDebugUtilsMessengerCreateInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DebugUtilsMessengerCreateInfoEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DebugUtilsMessengerEXT ) == sizeof( VkDebugUtilsMessengerEXT ), "handle and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_copy_constructible::value, "DebugUtilsMessengerEXT is not copy_constructible!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DebugUtilsMessengerEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DebugUtilsObjectNameInfoEXT ) == sizeof( VkDebugUtilsObjectNameInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DebugUtilsObjectNameInfoEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DebugUtilsObjectTagInfoEXT ) == sizeof( VkDebugUtilsObjectTagInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DebugUtilsObjectTagInfoEXT is not nothrow_move_constructible!" ); #if defined( VK_USE_PLATFORM_ANDROID_KHR ) //=== VK_ANDROID_external_memory_android_hardware_buffer === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AndroidHardwareBufferUsageANDROID ) == sizeof( VkAndroidHardwareBufferUsageANDROID ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "AndroidHardwareBufferUsageANDROID is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AndroidHardwareBufferPropertiesANDROID ) == sizeof( VkAndroidHardwareBufferPropertiesANDROID ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "AndroidHardwareBufferPropertiesANDROID is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AndroidHardwareBufferFormatPropertiesANDROID ) == sizeof( VkAndroidHardwareBufferFormatPropertiesANDROID ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "AndroidHardwareBufferFormatPropertiesANDROID is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImportAndroidHardwareBufferInfoANDROID ) == sizeof( VkImportAndroidHardwareBufferInfoANDROID ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ImportAndroidHardwareBufferInfoANDROID is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::MemoryGetAndroidHardwareBufferInfoANDROID ) == sizeof( VkMemoryGetAndroidHardwareBufferInfoANDROID ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "MemoryGetAndroidHardwareBufferInfoANDROID is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ExternalFormatANDROID ) == sizeof( VkExternalFormatANDROID ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ExternalFormatANDROID is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AndroidHardwareBufferFormatProperties2ANDROID ) == sizeof( VkAndroidHardwareBufferFormatProperties2ANDROID ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "AndroidHardwareBufferFormatProperties2ANDROID is not nothrow_move_constructible!" ); #endif /*VK_USE_PLATFORM_ANDROID_KHR*/ #if defined( VK_ENABLE_BETA_EXTENSIONS ) //=== VK_AMDX_shader_enqueue === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderEnqueueFeaturesAMDX ) == sizeof( VkPhysicalDeviceShaderEnqueueFeaturesAMDX ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceShaderEnqueueFeaturesAMDX is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderEnqueuePropertiesAMDX ) == sizeof( VkPhysicalDeviceShaderEnqueuePropertiesAMDX ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceShaderEnqueuePropertiesAMDX is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ExecutionGraphPipelineScratchSizeAMDX ) == sizeof( VkExecutionGraphPipelineScratchSizeAMDX ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ExecutionGraphPipelineScratchSizeAMDX is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ExecutionGraphPipelineCreateInfoAMDX ) == sizeof( VkExecutionGraphPipelineCreateInfoAMDX ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ExecutionGraphPipelineCreateInfoAMDX is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DispatchGraphInfoAMDX ) == sizeof( VkDispatchGraphInfoAMDX ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DispatchGraphInfoAMDX is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DispatchGraphCountInfoAMDX ) == sizeof( VkDispatchGraphCountInfoAMDX ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DispatchGraphCountInfoAMDX is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineShaderStageNodeCreateInfoAMDX ) == sizeof( VkPipelineShaderStageNodeCreateInfoAMDX ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PipelineShaderStageNodeCreateInfoAMDX is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstAMDX ) == sizeof( VkDeviceOrHostAddressConstAMDX ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DeviceOrHostAddressConstAMDX is not nothrow_move_constructible!" ); #endif /*VK_ENABLE_BETA_EXTENSIONS*/ //=== VK_AMD_mixed_attachment_samples === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AttachmentSampleCountInfoAMD ) == sizeof( VkAttachmentSampleCountInfoAMD ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "AttachmentSampleCountInfoAMD is not nothrow_move_constructible!" ); //=== VK_EXT_sample_locations === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SampleLocationEXT ) == sizeof( VkSampleLocationEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "SampleLocationEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SampleLocationsInfoEXT ) == sizeof( VkSampleLocationsInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "SampleLocationsInfoEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AttachmentSampleLocationsEXT ) == sizeof( VkAttachmentSampleLocationsEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "AttachmentSampleLocationsEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SubpassSampleLocationsEXT ) == sizeof( VkSubpassSampleLocationsEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "SubpassSampleLocationsEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::RenderPassSampleLocationsBeginInfoEXT ) == sizeof( VkRenderPassSampleLocationsBeginInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "RenderPassSampleLocationsBeginInfoEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineSampleLocationsStateCreateInfoEXT ) == sizeof( VkPipelineSampleLocationsStateCreateInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PipelineSampleLocationsStateCreateInfoEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceSampleLocationsPropertiesEXT ) == sizeof( VkPhysicalDeviceSampleLocationsPropertiesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceSampleLocationsPropertiesEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::MultisamplePropertiesEXT ) == sizeof( VkMultisamplePropertiesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "MultisamplePropertiesEXT is not nothrow_move_constructible!" ); //=== VK_EXT_blend_operation_advanced === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceBlendOperationAdvancedFeaturesEXT ) == sizeof( VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceBlendOperationAdvancedFeaturesEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceBlendOperationAdvancedPropertiesEXT ) == sizeof( VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceBlendOperationAdvancedPropertiesEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineColorBlendAdvancedStateCreateInfoEXT ) == sizeof( VkPipelineColorBlendAdvancedStateCreateInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PipelineColorBlendAdvancedStateCreateInfoEXT is not nothrow_move_constructible!" ); //=== VK_NV_fragment_coverage_to_color === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineCoverageToColorStateCreateInfoNV ) == sizeof( VkPipelineCoverageToColorStateCreateInfoNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PipelineCoverageToColorStateCreateInfoNV is not nothrow_move_constructible!" ); //=== VK_KHR_acceleration_structure === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DeviceOrHostAddressKHR ) == sizeof( VkDeviceOrHostAddressKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DeviceOrHostAddressKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR ) == sizeof( VkDeviceOrHostAddressConstKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DeviceOrHostAddressConstKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AccelerationStructureBuildRangeInfoKHR ) == sizeof( VkAccelerationStructureBuildRangeInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "AccelerationStructureBuildRangeInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AabbPositionsKHR ) == sizeof( VkAabbPositionsKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "AabbPositionsKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AccelerationStructureGeometryTrianglesDataKHR ) == sizeof( VkAccelerationStructureGeometryTrianglesDataKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "AccelerationStructureGeometryTrianglesDataKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::TransformMatrixKHR ) == sizeof( VkTransformMatrixKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "TransformMatrixKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AccelerationStructureBuildGeometryInfoKHR ) == sizeof( VkAccelerationStructureBuildGeometryInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "AccelerationStructureBuildGeometryInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AccelerationStructureGeometryAabbsDataKHR ) == sizeof( VkAccelerationStructureGeometryAabbsDataKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "AccelerationStructureGeometryAabbsDataKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AccelerationStructureInstanceKHR ) == sizeof( VkAccelerationStructureInstanceKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "AccelerationStructureInstanceKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AccelerationStructureGeometryInstancesDataKHR ) == sizeof( VkAccelerationStructureGeometryInstancesDataKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "AccelerationStructureGeometryInstancesDataKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AccelerationStructureGeometryDataKHR ) == sizeof( VkAccelerationStructureGeometryDataKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "AccelerationStructureGeometryDataKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AccelerationStructureGeometryKHR ) == sizeof( VkAccelerationStructureGeometryKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "AccelerationStructureGeometryKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AccelerationStructureCreateInfoKHR ) == sizeof( VkAccelerationStructureCreateInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "AccelerationStructureCreateInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AccelerationStructureKHR ) == sizeof( VkAccelerationStructureKHR ), "handle and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_copy_constructible::value, "AccelerationStructureKHR is not copy_constructible!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "AccelerationStructureKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::WriteDescriptorSetAccelerationStructureKHR ) == sizeof( VkWriteDescriptorSetAccelerationStructureKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "WriteDescriptorSetAccelerationStructureKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceAccelerationStructureFeaturesKHR ) == sizeof( VkPhysicalDeviceAccelerationStructureFeaturesKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceAccelerationStructureFeaturesKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceAccelerationStructurePropertiesKHR ) == sizeof( VkPhysicalDeviceAccelerationStructurePropertiesKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceAccelerationStructurePropertiesKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AccelerationStructureDeviceAddressInfoKHR ) == sizeof( VkAccelerationStructureDeviceAddressInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "AccelerationStructureDeviceAddressInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AccelerationStructureVersionInfoKHR ) == sizeof( VkAccelerationStructureVersionInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "AccelerationStructureVersionInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::CopyAccelerationStructureToMemoryInfoKHR ) == sizeof( VkCopyAccelerationStructureToMemoryInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "CopyAccelerationStructureToMemoryInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::CopyMemoryToAccelerationStructureInfoKHR ) == sizeof( VkCopyMemoryToAccelerationStructureInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "CopyMemoryToAccelerationStructureInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::CopyAccelerationStructureInfoKHR ) == sizeof( VkCopyAccelerationStructureInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "CopyAccelerationStructureInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AccelerationStructureBuildSizesInfoKHR ) == sizeof( VkAccelerationStructureBuildSizesInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "AccelerationStructureBuildSizesInfoKHR is not nothrow_move_constructible!" ); //=== VK_KHR_ray_tracing_pipeline === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::RayTracingShaderGroupCreateInfoKHR ) == sizeof( VkRayTracingShaderGroupCreateInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "RayTracingShaderGroupCreateInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::RayTracingPipelineCreateInfoKHR ) == sizeof( VkRayTracingPipelineCreateInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "RayTracingPipelineCreateInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceRayTracingPipelineFeaturesKHR ) == sizeof( VkPhysicalDeviceRayTracingPipelineFeaturesKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceRayTracingPipelineFeaturesKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceRayTracingPipelinePropertiesKHR ) == sizeof( VkPhysicalDeviceRayTracingPipelinePropertiesKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceRayTracingPipelinePropertiesKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR ) == sizeof( VkStridedDeviceAddressRegionKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "StridedDeviceAddressRegionKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::TraceRaysIndirectCommandKHR ) == sizeof( VkTraceRaysIndirectCommandKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "TraceRaysIndirectCommandKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::RayTracingPipelineInterfaceCreateInfoKHR ) == sizeof( VkRayTracingPipelineInterfaceCreateInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "RayTracingPipelineInterfaceCreateInfoKHR is not nothrow_move_constructible!" ); //=== VK_KHR_ray_query === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceRayQueryFeaturesKHR ) == sizeof( VkPhysicalDeviceRayQueryFeaturesKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceRayQueryFeaturesKHR is not nothrow_move_constructible!" ); //=== VK_NV_framebuffer_mixed_samples === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineCoverageModulationStateCreateInfoNV ) == sizeof( VkPipelineCoverageModulationStateCreateInfoNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PipelineCoverageModulationStateCreateInfoNV is not nothrow_move_constructible!" ); //=== VK_NV_shader_sm_builtins === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderSMBuiltinsPropertiesNV ) == sizeof( VkPhysicalDeviceShaderSMBuiltinsPropertiesNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceShaderSMBuiltinsPropertiesNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderSMBuiltinsFeaturesNV ) == sizeof( VkPhysicalDeviceShaderSMBuiltinsFeaturesNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceShaderSMBuiltinsFeaturesNV is not nothrow_move_constructible!" ); //=== VK_EXT_image_drm_format_modifier === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DrmFormatModifierPropertiesListEXT ) == sizeof( VkDrmFormatModifierPropertiesListEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DrmFormatModifierPropertiesListEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DrmFormatModifierPropertiesEXT ) == sizeof( VkDrmFormatModifierPropertiesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DrmFormatModifierPropertiesEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceImageDrmFormatModifierInfoEXT ) == sizeof( VkPhysicalDeviceImageDrmFormatModifierInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceImageDrmFormatModifierInfoEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImageDrmFormatModifierListCreateInfoEXT ) == sizeof( VkImageDrmFormatModifierListCreateInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ImageDrmFormatModifierListCreateInfoEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImageDrmFormatModifierExplicitCreateInfoEXT ) == sizeof( VkImageDrmFormatModifierExplicitCreateInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ImageDrmFormatModifierExplicitCreateInfoEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImageDrmFormatModifierPropertiesEXT ) == sizeof( VkImageDrmFormatModifierPropertiesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ImageDrmFormatModifierPropertiesEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DrmFormatModifierPropertiesList2EXT ) == sizeof( VkDrmFormatModifierPropertiesList2EXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DrmFormatModifierPropertiesList2EXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DrmFormatModifierProperties2EXT ) == sizeof( VkDrmFormatModifierProperties2EXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DrmFormatModifierProperties2EXT is not nothrow_move_constructible!" ); //=== VK_EXT_validation_cache === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ValidationCacheEXT ) == sizeof( VkValidationCacheEXT ), "handle and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_copy_constructible::value, "ValidationCacheEXT is not copy_constructible!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ValidationCacheEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ValidationCacheCreateInfoEXT ) == sizeof( VkValidationCacheCreateInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ValidationCacheCreateInfoEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ShaderModuleValidationCacheCreateInfoEXT ) == sizeof( VkShaderModuleValidationCacheCreateInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ShaderModuleValidationCacheCreateInfoEXT is not nothrow_move_constructible!" ); #if defined( VK_ENABLE_BETA_EXTENSIONS ) //=== VK_KHR_portability_subset === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDevicePortabilitySubsetFeaturesKHR ) == sizeof( VkPhysicalDevicePortabilitySubsetFeaturesKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDevicePortabilitySubsetFeaturesKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDevicePortabilitySubsetPropertiesKHR ) == sizeof( VkPhysicalDevicePortabilitySubsetPropertiesKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDevicePortabilitySubsetPropertiesKHR is not nothrow_move_constructible!" ); #endif /*VK_ENABLE_BETA_EXTENSIONS*/ //=== VK_NV_shading_rate_image === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ShadingRatePaletteNV ) == sizeof( VkShadingRatePaletteNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ShadingRatePaletteNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineViewportShadingRateImageStateCreateInfoNV ) == sizeof( VkPipelineViewportShadingRateImageStateCreateInfoNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PipelineViewportShadingRateImageStateCreateInfoNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceShadingRateImageFeaturesNV ) == sizeof( VkPhysicalDeviceShadingRateImageFeaturesNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceShadingRateImageFeaturesNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceShadingRateImagePropertiesNV ) == sizeof( VkPhysicalDeviceShadingRateImagePropertiesNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceShadingRateImagePropertiesNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::CoarseSampleLocationNV ) == sizeof( VkCoarseSampleLocationNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "CoarseSampleLocationNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::CoarseSampleOrderCustomNV ) == sizeof( VkCoarseSampleOrderCustomNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "CoarseSampleOrderCustomNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineViewportCoarseSampleOrderStateCreateInfoNV ) == sizeof( VkPipelineViewportCoarseSampleOrderStateCreateInfoNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PipelineViewportCoarseSampleOrderStateCreateInfoNV is not nothrow_move_constructible!" ); //=== VK_NV_ray_tracing === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::RayTracingShaderGroupCreateInfoNV ) == sizeof( VkRayTracingShaderGroupCreateInfoNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "RayTracingShaderGroupCreateInfoNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::RayTracingPipelineCreateInfoNV ) == sizeof( VkRayTracingPipelineCreateInfoNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "RayTracingPipelineCreateInfoNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::GeometryTrianglesNV ) == sizeof( VkGeometryTrianglesNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "GeometryTrianglesNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::GeometryAABBNV ) == sizeof( VkGeometryAABBNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "GeometryAABBNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::GeometryDataNV ) == sizeof( VkGeometryDataNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "GeometryDataNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::GeometryNV ) == sizeof( VkGeometryNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "GeometryNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AccelerationStructureInfoNV ) == sizeof( VkAccelerationStructureInfoNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "AccelerationStructureInfoNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AccelerationStructureCreateInfoNV ) == sizeof( VkAccelerationStructureCreateInfoNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "AccelerationStructureCreateInfoNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AccelerationStructureNV ) == sizeof( VkAccelerationStructureNV ), "handle and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_copy_constructible::value, "AccelerationStructureNV is not copy_constructible!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "AccelerationStructureNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::BindAccelerationStructureMemoryInfoNV ) == sizeof( VkBindAccelerationStructureMemoryInfoNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "BindAccelerationStructureMemoryInfoNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::WriteDescriptorSetAccelerationStructureNV ) == sizeof( VkWriteDescriptorSetAccelerationStructureNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "WriteDescriptorSetAccelerationStructureNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AccelerationStructureMemoryRequirementsInfoNV ) == sizeof( VkAccelerationStructureMemoryRequirementsInfoNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "AccelerationStructureMemoryRequirementsInfoNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceRayTracingPropertiesNV ) == sizeof( VkPhysicalDeviceRayTracingPropertiesNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceRayTracingPropertiesNV is not nothrow_move_constructible!" ); //=== VK_NV_representative_fragment_test === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceRepresentativeFragmentTestFeaturesNV ) == sizeof( VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceRepresentativeFragmentTestFeaturesNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineRepresentativeFragmentTestStateCreateInfoNV ) == sizeof( VkPipelineRepresentativeFragmentTestStateCreateInfoNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PipelineRepresentativeFragmentTestStateCreateInfoNV is not nothrow_move_constructible!" ); //=== VK_EXT_filter_cubic === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceImageViewImageFormatInfoEXT ) == sizeof( VkPhysicalDeviceImageViewImageFormatInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceImageViewImageFormatInfoEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::FilterCubicImageViewImageFormatPropertiesEXT ) == sizeof( VkFilterCubicImageViewImageFormatPropertiesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "FilterCubicImageViewImageFormatPropertiesEXT is not nothrow_move_constructible!" ); //=== VK_EXT_external_memory_host === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImportMemoryHostPointerInfoEXT ) == sizeof( VkImportMemoryHostPointerInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ImportMemoryHostPointerInfoEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::MemoryHostPointerPropertiesEXT ) == sizeof( VkMemoryHostPointerPropertiesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "MemoryHostPointerPropertiesEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalMemoryHostPropertiesEXT ) == sizeof( VkPhysicalDeviceExternalMemoryHostPropertiesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceExternalMemoryHostPropertiesEXT is not nothrow_move_constructible!" ); //=== VK_KHR_shader_clock === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderClockFeaturesKHR ) == sizeof( VkPhysicalDeviceShaderClockFeaturesKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceShaderClockFeaturesKHR is not nothrow_move_constructible!" ); //=== VK_AMD_pipeline_compiler_control === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineCompilerControlCreateInfoAMD ) == sizeof( VkPipelineCompilerControlCreateInfoAMD ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PipelineCompilerControlCreateInfoAMD is not nothrow_move_constructible!" ); //=== VK_AMD_shader_core_properties === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderCorePropertiesAMD ) == sizeof( VkPhysicalDeviceShaderCorePropertiesAMD ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceShaderCorePropertiesAMD is not nothrow_move_constructible!" ); //=== VK_KHR_video_decode_h265 === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoDecodeH265ProfileInfoKHR ) == sizeof( VkVideoDecodeH265ProfileInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoDecodeH265ProfileInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoDecodeH265CapabilitiesKHR ) == sizeof( VkVideoDecodeH265CapabilitiesKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoDecodeH265CapabilitiesKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoDecodeH265SessionParametersCreateInfoKHR ) == sizeof( VkVideoDecodeH265SessionParametersCreateInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoDecodeH265SessionParametersCreateInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoDecodeH265SessionParametersAddInfoKHR ) == sizeof( VkVideoDecodeH265SessionParametersAddInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoDecodeH265SessionParametersAddInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoDecodeH265PictureInfoKHR ) == sizeof( VkVideoDecodeH265PictureInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoDecodeH265PictureInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoDecodeH265DpbSlotInfoKHR ) == sizeof( VkVideoDecodeH265DpbSlotInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoDecodeH265DpbSlotInfoKHR is not nothrow_move_constructible!" ); //=== VK_AMD_memory_overallocation_behavior === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DeviceMemoryOverallocationCreateInfoAMD ) == sizeof( VkDeviceMemoryOverallocationCreateInfoAMD ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DeviceMemoryOverallocationCreateInfoAMD is not nothrow_move_constructible!" ); //=== VK_EXT_vertex_attribute_divisor === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceVertexAttributeDivisorPropertiesEXT ) == sizeof( VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceVertexAttributeDivisorPropertiesEXT is not nothrow_move_constructible!" ); #if defined( VK_USE_PLATFORM_GGP ) //=== VK_GGP_frame_token === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PresentFrameTokenGGP ) == sizeof( VkPresentFrameTokenGGP ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PresentFrameTokenGGP is not nothrow_move_constructible!" ); #endif /*VK_USE_PLATFORM_GGP*/ //=== VK_NV_mesh_shader === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceMeshShaderFeaturesNV ) == sizeof( VkPhysicalDeviceMeshShaderFeaturesNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceMeshShaderFeaturesNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceMeshShaderPropertiesNV ) == sizeof( VkPhysicalDeviceMeshShaderPropertiesNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceMeshShaderPropertiesNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DrawMeshTasksIndirectCommandNV ) == sizeof( VkDrawMeshTasksIndirectCommandNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DrawMeshTasksIndirectCommandNV is not nothrow_move_constructible!" ); //=== VK_NV_shader_image_footprint === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderImageFootprintFeaturesNV ) == sizeof( VkPhysicalDeviceShaderImageFootprintFeaturesNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceShaderImageFootprintFeaturesNV is not nothrow_move_constructible!" ); //=== VK_NV_scissor_exclusive === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineViewportExclusiveScissorStateCreateInfoNV ) == sizeof( VkPipelineViewportExclusiveScissorStateCreateInfoNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PipelineViewportExclusiveScissorStateCreateInfoNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceExclusiveScissorFeaturesNV ) == sizeof( VkPhysicalDeviceExclusiveScissorFeaturesNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceExclusiveScissorFeaturesNV is not nothrow_move_constructible!" ); //=== VK_NV_device_diagnostic_checkpoints === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::QueueFamilyCheckpointPropertiesNV ) == sizeof( VkQueueFamilyCheckpointPropertiesNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "QueueFamilyCheckpointPropertiesNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::CheckpointDataNV ) == sizeof( VkCheckpointDataNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "CheckpointDataNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::QueueFamilyCheckpointProperties2NV ) == sizeof( VkQueueFamilyCheckpointProperties2NV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "QueueFamilyCheckpointProperties2NV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::CheckpointData2NV ) == sizeof( VkCheckpointData2NV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "CheckpointData2NV is not nothrow_move_constructible!" ); //=== VK_INTEL_shader_integer_functions2 === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL ) == sizeof( VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL is not nothrow_move_constructible!" ); //=== VK_INTEL_performance_query === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PerformanceValueDataINTEL ) == sizeof( VkPerformanceValueDataINTEL ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PerformanceValueDataINTEL is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PerformanceValueINTEL ) == sizeof( VkPerformanceValueINTEL ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PerformanceValueINTEL is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::InitializePerformanceApiInfoINTEL ) == sizeof( VkInitializePerformanceApiInfoINTEL ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "InitializePerformanceApiInfoINTEL is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::QueryPoolPerformanceQueryCreateInfoINTEL ) == sizeof( VkQueryPoolPerformanceQueryCreateInfoINTEL ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "QueryPoolPerformanceQueryCreateInfoINTEL is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PerformanceMarkerInfoINTEL ) == sizeof( VkPerformanceMarkerInfoINTEL ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PerformanceMarkerInfoINTEL is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PerformanceStreamMarkerInfoINTEL ) == sizeof( VkPerformanceStreamMarkerInfoINTEL ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PerformanceStreamMarkerInfoINTEL is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PerformanceOverrideInfoINTEL ) == sizeof( VkPerformanceOverrideInfoINTEL ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PerformanceOverrideInfoINTEL is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PerformanceConfigurationAcquireInfoINTEL ) == sizeof( VkPerformanceConfigurationAcquireInfoINTEL ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PerformanceConfigurationAcquireInfoINTEL is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PerformanceConfigurationINTEL ) == sizeof( VkPerformanceConfigurationINTEL ), "handle and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_copy_constructible::value, "PerformanceConfigurationINTEL is not copy_constructible!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PerformanceConfigurationINTEL is not nothrow_move_constructible!" ); //=== VK_EXT_pci_bus_info === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDevicePCIBusInfoPropertiesEXT ) == sizeof( VkPhysicalDevicePCIBusInfoPropertiesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDevicePCIBusInfoPropertiesEXT is not nothrow_move_constructible!" ); //=== VK_AMD_display_native_hdr === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DisplayNativeHdrSurfaceCapabilitiesAMD ) == sizeof( VkDisplayNativeHdrSurfaceCapabilitiesAMD ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DisplayNativeHdrSurfaceCapabilitiesAMD is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SwapchainDisplayNativeHdrCreateInfoAMD ) == sizeof( VkSwapchainDisplayNativeHdrCreateInfoAMD ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "SwapchainDisplayNativeHdrCreateInfoAMD is not nothrow_move_constructible!" ); #if defined( VK_USE_PLATFORM_FUCHSIA ) //=== VK_FUCHSIA_imagepipe_surface === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImagePipeSurfaceCreateInfoFUCHSIA ) == sizeof( VkImagePipeSurfaceCreateInfoFUCHSIA ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ImagePipeSurfaceCreateInfoFUCHSIA is not nothrow_move_constructible!" ); #endif /*VK_USE_PLATFORM_FUCHSIA*/ #if defined( VK_USE_PLATFORM_METAL_EXT ) //=== VK_EXT_metal_surface === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::MetalSurfaceCreateInfoEXT ) == sizeof( VkMetalSurfaceCreateInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "MetalSurfaceCreateInfoEXT is not nothrow_move_constructible!" ); #endif /*VK_USE_PLATFORM_METAL_EXT*/ //=== VK_EXT_fragment_density_map === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceFragmentDensityMapFeaturesEXT ) == sizeof( VkPhysicalDeviceFragmentDensityMapFeaturesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceFragmentDensityMapFeaturesEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceFragmentDensityMapPropertiesEXT ) == sizeof( VkPhysicalDeviceFragmentDensityMapPropertiesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceFragmentDensityMapPropertiesEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::RenderPassFragmentDensityMapCreateInfoEXT ) == sizeof( VkRenderPassFragmentDensityMapCreateInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "RenderPassFragmentDensityMapCreateInfoEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::RenderingFragmentDensityMapAttachmentInfoEXT ) == sizeof( VkRenderingFragmentDensityMapAttachmentInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "RenderingFragmentDensityMapAttachmentInfoEXT is not nothrow_move_constructible!" ); //=== VK_KHR_fragment_shading_rate === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::FragmentShadingRateAttachmentInfoKHR ) == sizeof( VkFragmentShadingRateAttachmentInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "FragmentShadingRateAttachmentInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineFragmentShadingRateStateCreateInfoKHR ) == sizeof( VkPipelineFragmentShadingRateStateCreateInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PipelineFragmentShadingRateStateCreateInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceFragmentShadingRateFeaturesKHR ) == sizeof( VkPhysicalDeviceFragmentShadingRateFeaturesKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceFragmentShadingRateFeaturesKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceFragmentShadingRatePropertiesKHR ) == sizeof( VkPhysicalDeviceFragmentShadingRatePropertiesKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceFragmentShadingRatePropertiesKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceFragmentShadingRateKHR ) == sizeof( VkPhysicalDeviceFragmentShadingRateKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceFragmentShadingRateKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::RenderingFragmentShadingRateAttachmentInfoKHR ) == sizeof( VkRenderingFragmentShadingRateAttachmentInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "RenderingFragmentShadingRateAttachmentInfoKHR is not nothrow_move_constructible!" ); //=== VK_AMD_shader_core_properties2 === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderCoreProperties2AMD ) == sizeof( VkPhysicalDeviceShaderCoreProperties2AMD ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceShaderCoreProperties2AMD is not nothrow_move_constructible!" ); //=== VK_AMD_device_coherent_memory === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceCoherentMemoryFeaturesAMD ) == sizeof( VkPhysicalDeviceCoherentMemoryFeaturesAMD ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceCoherentMemoryFeaturesAMD is not nothrow_move_constructible!" ); //=== VK_EXT_shader_image_atomic_int64 === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderImageAtomicInt64FeaturesEXT ) == sizeof( VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceShaderImageAtomicInt64FeaturesEXT is not nothrow_move_constructible!" ); //=== VK_KHR_shader_quad_control === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderQuadControlFeaturesKHR ) == sizeof( VkPhysicalDeviceShaderQuadControlFeaturesKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceShaderQuadControlFeaturesKHR is not nothrow_move_constructible!" ); //=== VK_EXT_memory_budget === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryBudgetPropertiesEXT ) == sizeof( VkPhysicalDeviceMemoryBudgetPropertiesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceMemoryBudgetPropertiesEXT is not nothrow_move_constructible!" ); //=== VK_EXT_memory_priority === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryPriorityFeaturesEXT ) == sizeof( VkPhysicalDeviceMemoryPriorityFeaturesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceMemoryPriorityFeaturesEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::MemoryPriorityAllocateInfoEXT ) == sizeof( VkMemoryPriorityAllocateInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "MemoryPriorityAllocateInfoEXT is not nothrow_move_constructible!" ); //=== VK_KHR_surface_protected_capabilities === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SurfaceProtectedCapabilitiesKHR ) == sizeof( VkSurfaceProtectedCapabilitiesKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "SurfaceProtectedCapabilitiesKHR is not nothrow_move_constructible!" ); //=== VK_NV_dedicated_allocation_image_aliasing === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV ) == sizeof( VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV is not nothrow_move_constructible!" ); //=== VK_EXT_buffer_device_address === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceBufferDeviceAddressFeaturesEXT ) == sizeof( VkPhysicalDeviceBufferDeviceAddressFeaturesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceBufferDeviceAddressFeaturesEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::BufferDeviceAddressCreateInfoEXT ) == sizeof( VkBufferDeviceAddressCreateInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "BufferDeviceAddressCreateInfoEXT is not nothrow_move_constructible!" ); //=== VK_EXT_validation_features === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ValidationFeaturesEXT ) == sizeof( VkValidationFeaturesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ValidationFeaturesEXT is not nothrow_move_constructible!" ); //=== VK_KHR_present_wait === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDevicePresentWaitFeaturesKHR ) == sizeof( VkPhysicalDevicePresentWaitFeaturesKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDevicePresentWaitFeaturesKHR is not nothrow_move_constructible!" ); //=== VK_NV_cooperative_matrix === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::CooperativeMatrixPropertiesNV ) == sizeof( VkCooperativeMatrixPropertiesNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "CooperativeMatrixPropertiesNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceCooperativeMatrixFeaturesNV ) == sizeof( VkPhysicalDeviceCooperativeMatrixFeaturesNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceCooperativeMatrixFeaturesNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceCooperativeMatrixPropertiesNV ) == sizeof( VkPhysicalDeviceCooperativeMatrixPropertiesNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceCooperativeMatrixPropertiesNV is not nothrow_move_constructible!" ); //=== VK_NV_coverage_reduction_mode === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceCoverageReductionModeFeaturesNV ) == sizeof( VkPhysicalDeviceCoverageReductionModeFeaturesNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceCoverageReductionModeFeaturesNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineCoverageReductionStateCreateInfoNV ) == sizeof( VkPipelineCoverageReductionStateCreateInfoNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PipelineCoverageReductionStateCreateInfoNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::FramebufferMixedSamplesCombinationNV ) == sizeof( VkFramebufferMixedSamplesCombinationNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "FramebufferMixedSamplesCombinationNV is not nothrow_move_constructible!" ); //=== VK_EXT_fragment_shader_interlock === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceFragmentShaderInterlockFeaturesEXT ) == sizeof( VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceFragmentShaderInterlockFeaturesEXT is not nothrow_move_constructible!" ); //=== VK_EXT_ycbcr_image_arrays === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceYcbcrImageArraysFeaturesEXT ) == sizeof( VkPhysicalDeviceYcbcrImageArraysFeaturesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceYcbcrImageArraysFeaturesEXT is not nothrow_move_constructible!" ); //=== VK_EXT_provoking_vertex === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceProvokingVertexFeaturesEXT ) == sizeof( VkPhysicalDeviceProvokingVertexFeaturesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceProvokingVertexFeaturesEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceProvokingVertexPropertiesEXT ) == sizeof( VkPhysicalDeviceProvokingVertexPropertiesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceProvokingVertexPropertiesEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineRasterizationProvokingVertexStateCreateInfoEXT ) == sizeof( VkPipelineRasterizationProvokingVertexStateCreateInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PipelineRasterizationProvokingVertexStateCreateInfoEXT is not nothrow_move_constructible!" ); #if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_EXT_full_screen_exclusive === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SurfaceFullScreenExclusiveInfoEXT ) == sizeof( VkSurfaceFullScreenExclusiveInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "SurfaceFullScreenExclusiveInfoEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SurfaceCapabilitiesFullScreenExclusiveEXT ) == sizeof( VkSurfaceCapabilitiesFullScreenExclusiveEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "SurfaceCapabilitiesFullScreenExclusiveEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SurfaceFullScreenExclusiveWin32InfoEXT ) == sizeof( VkSurfaceFullScreenExclusiveWin32InfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "SurfaceFullScreenExclusiveWin32InfoEXT is not nothrow_move_constructible!" ); #endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_EXT_headless_surface === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::HeadlessSurfaceCreateInfoEXT ) == sizeof( VkHeadlessSurfaceCreateInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "HeadlessSurfaceCreateInfoEXT is not nothrow_move_constructible!" ); //=== VK_EXT_shader_atomic_float === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderAtomicFloatFeaturesEXT ) == sizeof( VkPhysicalDeviceShaderAtomicFloatFeaturesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceShaderAtomicFloatFeaturesEXT is not nothrow_move_constructible!" ); //=== VK_EXT_extended_dynamic_state === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceExtendedDynamicStateFeaturesEXT ) == sizeof( VkPhysicalDeviceExtendedDynamicStateFeaturesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceExtendedDynamicStateFeaturesEXT is not nothrow_move_constructible!" ); //=== VK_KHR_deferred_host_operations === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DeferredOperationKHR ) == sizeof( VkDeferredOperationKHR ), "handle and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_copy_constructible::value, "DeferredOperationKHR is not copy_constructible!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DeferredOperationKHR is not nothrow_move_constructible!" ); //=== VK_KHR_pipeline_executable_properties === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDevicePipelineExecutablePropertiesFeaturesKHR ) == sizeof( VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDevicePipelineExecutablePropertiesFeaturesKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineInfoKHR ) == sizeof( VkPipelineInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PipelineInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineExecutablePropertiesKHR ) == sizeof( VkPipelineExecutablePropertiesKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PipelineExecutablePropertiesKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineExecutableInfoKHR ) == sizeof( VkPipelineExecutableInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PipelineExecutableInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineExecutableStatisticValueKHR ) == sizeof( VkPipelineExecutableStatisticValueKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PipelineExecutableStatisticValueKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineExecutableStatisticKHR ) == sizeof( VkPipelineExecutableStatisticKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PipelineExecutableStatisticKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineExecutableInternalRepresentationKHR ) == sizeof( VkPipelineExecutableInternalRepresentationKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PipelineExecutableInternalRepresentationKHR is not nothrow_move_constructible!" ); //=== VK_EXT_map_memory_placed === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceMapMemoryPlacedFeaturesEXT ) == sizeof( VkPhysicalDeviceMapMemoryPlacedFeaturesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceMapMemoryPlacedFeaturesEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceMapMemoryPlacedPropertiesEXT ) == sizeof( VkPhysicalDeviceMapMemoryPlacedPropertiesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceMapMemoryPlacedPropertiesEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::MemoryMapPlacedInfoEXT ) == sizeof( VkMemoryMapPlacedInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "MemoryMapPlacedInfoEXT is not nothrow_move_constructible!" ); //=== VK_EXT_shader_atomic_float2 === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderAtomicFloat2FeaturesEXT ) == sizeof( VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceShaderAtomicFloat2FeaturesEXT is not nothrow_move_constructible!" ); //=== VK_EXT_surface_maintenance1 === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SurfacePresentModeEXT ) == sizeof( VkSurfacePresentModeEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "SurfacePresentModeEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SurfacePresentScalingCapabilitiesEXT ) == sizeof( VkSurfacePresentScalingCapabilitiesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "SurfacePresentScalingCapabilitiesEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SurfacePresentModeCompatibilityEXT ) == sizeof( VkSurfacePresentModeCompatibilityEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "SurfacePresentModeCompatibilityEXT is not nothrow_move_constructible!" ); //=== VK_EXT_swapchain_maintenance1 === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceSwapchainMaintenance1FeaturesEXT ) == sizeof( VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceSwapchainMaintenance1FeaturesEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SwapchainPresentFenceInfoEXT ) == sizeof( VkSwapchainPresentFenceInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "SwapchainPresentFenceInfoEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SwapchainPresentModesCreateInfoEXT ) == sizeof( VkSwapchainPresentModesCreateInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "SwapchainPresentModesCreateInfoEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SwapchainPresentModeInfoEXT ) == sizeof( VkSwapchainPresentModeInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "SwapchainPresentModeInfoEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SwapchainPresentScalingCreateInfoEXT ) == sizeof( VkSwapchainPresentScalingCreateInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "SwapchainPresentScalingCreateInfoEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ReleaseSwapchainImagesInfoEXT ) == sizeof( VkReleaseSwapchainImagesInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ReleaseSwapchainImagesInfoEXT is not nothrow_move_constructible!" ); //=== VK_NV_device_generated_commands === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceDeviceGeneratedCommandsPropertiesNV ) == sizeof( VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceDeviceGeneratedCommandsPropertiesNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceDeviceGeneratedCommandsFeaturesNV ) == sizeof( VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceDeviceGeneratedCommandsFeaturesNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::GraphicsShaderGroupCreateInfoNV ) == sizeof( VkGraphicsShaderGroupCreateInfoNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "GraphicsShaderGroupCreateInfoNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::GraphicsPipelineShaderGroupsCreateInfoNV ) == sizeof( VkGraphicsPipelineShaderGroupsCreateInfoNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "GraphicsPipelineShaderGroupsCreateInfoNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::BindShaderGroupIndirectCommandNV ) == sizeof( VkBindShaderGroupIndirectCommandNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "BindShaderGroupIndirectCommandNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::BindIndexBufferIndirectCommandNV ) == sizeof( VkBindIndexBufferIndirectCommandNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "BindIndexBufferIndirectCommandNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::BindVertexBufferIndirectCommandNV ) == sizeof( VkBindVertexBufferIndirectCommandNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "BindVertexBufferIndirectCommandNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SetStateFlagsIndirectCommandNV ) == sizeof( VkSetStateFlagsIndirectCommandNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "SetStateFlagsIndirectCommandNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNV ) == sizeof( VkIndirectCommandsLayoutNV ), "handle and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_copy_constructible::value, "IndirectCommandsLayoutNV is not copy_constructible!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "IndirectCommandsLayoutNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::IndirectCommandsStreamNV ) == sizeof( VkIndirectCommandsStreamNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "IndirectCommandsStreamNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutTokenNV ) == sizeof( VkIndirectCommandsLayoutTokenNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "IndirectCommandsLayoutTokenNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutCreateInfoNV ) == sizeof( VkIndirectCommandsLayoutCreateInfoNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "IndirectCommandsLayoutCreateInfoNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::GeneratedCommandsInfoNV ) == sizeof( VkGeneratedCommandsInfoNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "GeneratedCommandsInfoNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::GeneratedCommandsMemoryRequirementsInfoNV ) == sizeof( VkGeneratedCommandsMemoryRequirementsInfoNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "GeneratedCommandsMemoryRequirementsInfoNV is not nothrow_move_constructible!" ); //=== VK_NV_inherited_viewport_scissor === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceInheritedViewportScissorFeaturesNV ) == sizeof( VkPhysicalDeviceInheritedViewportScissorFeaturesNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceInheritedViewportScissorFeaturesNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::CommandBufferInheritanceViewportScissorInfoNV ) == sizeof( VkCommandBufferInheritanceViewportScissorInfoNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "CommandBufferInheritanceViewportScissorInfoNV is not nothrow_move_constructible!" ); //=== VK_EXT_texel_buffer_alignment === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceTexelBufferAlignmentFeaturesEXT ) == sizeof( VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceTexelBufferAlignmentFeaturesEXT is not nothrow_move_constructible!" ); //=== VK_QCOM_render_pass_transform === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::RenderPassTransformBeginInfoQCOM ) == sizeof( VkRenderPassTransformBeginInfoQCOM ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "RenderPassTransformBeginInfoQCOM is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::CommandBufferInheritanceRenderPassTransformInfoQCOM ) == sizeof( VkCommandBufferInheritanceRenderPassTransformInfoQCOM ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "CommandBufferInheritanceRenderPassTransformInfoQCOM is not nothrow_move_constructible!" ); //=== VK_EXT_depth_bias_control === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceDepthBiasControlFeaturesEXT ) == sizeof( VkPhysicalDeviceDepthBiasControlFeaturesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceDepthBiasControlFeaturesEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DepthBiasInfoEXT ) == sizeof( VkDepthBiasInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DepthBiasInfoEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DepthBiasRepresentationInfoEXT ) == sizeof( VkDepthBiasRepresentationInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DepthBiasRepresentationInfoEXT is not nothrow_move_constructible!" ); //=== VK_EXT_device_memory_report === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceDeviceMemoryReportFeaturesEXT ) == sizeof( VkPhysicalDeviceDeviceMemoryReportFeaturesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceDeviceMemoryReportFeaturesEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DeviceDeviceMemoryReportCreateInfoEXT ) == sizeof( VkDeviceDeviceMemoryReportCreateInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DeviceDeviceMemoryReportCreateInfoEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DeviceMemoryReportCallbackDataEXT ) == sizeof( VkDeviceMemoryReportCallbackDataEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DeviceMemoryReportCallbackDataEXT is not nothrow_move_constructible!" ); //=== VK_EXT_robustness2 === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceRobustness2FeaturesEXT ) == sizeof( VkPhysicalDeviceRobustness2FeaturesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceRobustness2FeaturesEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceRobustness2PropertiesEXT ) == sizeof( VkPhysicalDeviceRobustness2PropertiesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceRobustness2PropertiesEXT is not nothrow_move_constructible!" ); //=== VK_EXT_custom_border_color === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SamplerCustomBorderColorCreateInfoEXT ) == sizeof( VkSamplerCustomBorderColorCreateInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "SamplerCustomBorderColorCreateInfoEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceCustomBorderColorPropertiesEXT ) == sizeof( VkPhysicalDeviceCustomBorderColorPropertiesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceCustomBorderColorPropertiesEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceCustomBorderColorFeaturesEXT ) == sizeof( VkPhysicalDeviceCustomBorderColorFeaturesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceCustomBorderColorFeaturesEXT is not nothrow_move_constructible!" ); //=== VK_KHR_pipeline_library === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineLibraryCreateInfoKHR ) == sizeof( VkPipelineLibraryCreateInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PipelineLibraryCreateInfoKHR is not nothrow_move_constructible!" ); //=== VK_NV_present_barrier === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDevicePresentBarrierFeaturesNV ) == sizeof( VkPhysicalDevicePresentBarrierFeaturesNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDevicePresentBarrierFeaturesNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SurfaceCapabilitiesPresentBarrierNV ) == sizeof( VkSurfaceCapabilitiesPresentBarrierNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "SurfaceCapabilitiesPresentBarrierNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SwapchainPresentBarrierCreateInfoNV ) == sizeof( VkSwapchainPresentBarrierCreateInfoNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "SwapchainPresentBarrierCreateInfoNV is not nothrow_move_constructible!" ); //=== VK_KHR_present_id === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PresentIdKHR ) == sizeof( VkPresentIdKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PresentIdKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDevicePresentIdFeaturesKHR ) == sizeof( VkPhysicalDevicePresentIdFeaturesKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDevicePresentIdFeaturesKHR is not nothrow_move_constructible!" ); //=== VK_KHR_video_encode_queue === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEncodeInfoKHR ) == sizeof( VkVideoEncodeInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoEncodeInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEncodeCapabilitiesKHR ) == sizeof( VkVideoEncodeCapabilitiesKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoEncodeCapabilitiesKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::QueryPoolVideoEncodeFeedbackCreateInfoKHR ) == sizeof( VkQueryPoolVideoEncodeFeedbackCreateInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "QueryPoolVideoEncodeFeedbackCreateInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEncodeUsageInfoKHR ) == sizeof( VkVideoEncodeUsageInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoEncodeUsageInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEncodeRateControlInfoKHR ) == sizeof( VkVideoEncodeRateControlInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoEncodeRateControlInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEncodeRateControlLayerInfoKHR ) == sizeof( VkVideoEncodeRateControlLayerInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoEncodeRateControlLayerInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceVideoEncodeQualityLevelInfoKHR ) == sizeof( VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceVideoEncodeQualityLevelInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEncodeQualityLevelPropertiesKHR ) == sizeof( VkVideoEncodeQualityLevelPropertiesKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoEncodeQualityLevelPropertiesKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEncodeQualityLevelInfoKHR ) == sizeof( VkVideoEncodeQualityLevelInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoEncodeQualityLevelInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEncodeSessionParametersGetInfoKHR ) == sizeof( VkVideoEncodeSessionParametersGetInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoEncodeSessionParametersGetInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEncodeSessionParametersFeedbackInfoKHR ) == sizeof( VkVideoEncodeSessionParametersFeedbackInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoEncodeSessionParametersFeedbackInfoKHR is not nothrow_move_constructible!" ); //=== VK_NV_device_diagnostics_config === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceDiagnosticsConfigFeaturesNV ) == sizeof( VkPhysicalDeviceDiagnosticsConfigFeaturesNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceDiagnosticsConfigFeaturesNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DeviceDiagnosticsConfigCreateInfoNV ) == sizeof( VkDeviceDiagnosticsConfigCreateInfoNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DeviceDiagnosticsConfigCreateInfoNV is not nothrow_move_constructible!" ); #if defined( VK_ENABLE_BETA_EXTENSIONS ) //=== VK_NV_cuda_kernel_launch === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::CudaModuleNV ) == sizeof( VkCudaModuleNV ), "handle and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_copy_constructible::value, "CudaModuleNV is not copy_constructible!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "CudaModuleNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::CudaFunctionNV ) == sizeof( VkCudaFunctionNV ), "handle and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_copy_constructible::value, "CudaFunctionNV is not copy_constructible!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "CudaFunctionNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::CudaModuleCreateInfoNV ) == sizeof( VkCudaModuleCreateInfoNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "CudaModuleCreateInfoNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::CudaFunctionCreateInfoNV ) == sizeof( VkCudaFunctionCreateInfoNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "CudaFunctionCreateInfoNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::CudaLaunchInfoNV ) == sizeof( VkCudaLaunchInfoNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "CudaLaunchInfoNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceCudaKernelLaunchFeaturesNV ) == sizeof( VkPhysicalDeviceCudaKernelLaunchFeaturesNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceCudaKernelLaunchFeaturesNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceCudaKernelLaunchPropertiesNV ) == sizeof( VkPhysicalDeviceCudaKernelLaunchPropertiesNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceCudaKernelLaunchPropertiesNV is not nothrow_move_constructible!" ); #endif /*VK_ENABLE_BETA_EXTENSIONS*/ //=== VK_NV_low_latency === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::QueryLowLatencySupportNV ) == sizeof( VkQueryLowLatencySupportNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "QueryLowLatencySupportNV is not nothrow_move_constructible!" ); #if defined( VK_USE_PLATFORM_METAL_EXT ) //=== VK_EXT_metal_objects === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ExportMetalObjectCreateInfoEXT ) == sizeof( VkExportMetalObjectCreateInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ExportMetalObjectCreateInfoEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ExportMetalObjectsInfoEXT ) == sizeof( VkExportMetalObjectsInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ExportMetalObjectsInfoEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ExportMetalDeviceInfoEXT ) == sizeof( VkExportMetalDeviceInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ExportMetalDeviceInfoEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ExportMetalCommandQueueInfoEXT ) == sizeof( VkExportMetalCommandQueueInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ExportMetalCommandQueueInfoEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ExportMetalBufferInfoEXT ) == sizeof( VkExportMetalBufferInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ExportMetalBufferInfoEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImportMetalBufferInfoEXT ) == sizeof( VkImportMetalBufferInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ImportMetalBufferInfoEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ExportMetalTextureInfoEXT ) == sizeof( VkExportMetalTextureInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ExportMetalTextureInfoEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImportMetalTextureInfoEXT ) == sizeof( VkImportMetalTextureInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ImportMetalTextureInfoEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ExportMetalIOSurfaceInfoEXT ) == sizeof( VkExportMetalIOSurfaceInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ExportMetalIOSurfaceInfoEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImportMetalIOSurfaceInfoEXT ) == sizeof( VkImportMetalIOSurfaceInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ImportMetalIOSurfaceInfoEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ExportMetalSharedEventInfoEXT ) == sizeof( VkExportMetalSharedEventInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ExportMetalSharedEventInfoEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImportMetalSharedEventInfoEXT ) == sizeof( VkImportMetalSharedEventInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ImportMetalSharedEventInfoEXT is not nothrow_move_constructible!" ); #endif /*VK_USE_PLATFORM_METAL_EXT*/ //=== VK_EXT_descriptor_buffer === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceDescriptorBufferPropertiesEXT ) == sizeof( VkPhysicalDeviceDescriptorBufferPropertiesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceDescriptorBufferPropertiesEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT ) == sizeof( VkPhysicalDeviceDescriptorBufferDensityMapPropertiesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceDescriptorBufferFeaturesEXT ) == sizeof( VkPhysicalDeviceDescriptorBufferFeaturesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceDescriptorBufferFeaturesEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DescriptorAddressInfoEXT ) == sizeof( VkDescriptorAddressInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DescriptorAddressInfoEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DescriptorBufferBindingInfoEXT ) == sizeof( VkDescriptorBufferBindingInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DescriptorBufferBindingInfoEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DescriptorBufferBindingPushDescriptorBufferHandleEXT ) == sizeof( VkDescriptorBufferBindingPushDescriptorBufferHandleEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DescriptorBufferBindingPushDescriptorBufferHandleEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DescriptorDataEXT ) == sizeof( VkDescriptorDataEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DescriptorDataEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DescriptorGetInfoEXT ) == sizeof( VkDescriptorGetInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DescriptorGetInfoEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::BufferCaptureDescriptorDataInfoEXT ) == sizeof( VkBufferCaptureDescriptorDataInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "BufferCaptureDescriptorDataInfoEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImageCaptureDescriptorDataInfoEXT ) == sizeof( VkImageCaptureDescriptorDataInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ImageCaptureDescriptorDataInfoEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImageViewCaptureDescriptorDataInfoEXT ) == sizeof( VkImageViewCaptureDescriptorDataInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ImageViewCaptureDescriptorDataInfoEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SamplerCaptureDescriptorDataInfoEXT ) == sizeof( VkSamplerCaptureDescriptorDataInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "SamplerCaptureDescriptorDataInfoEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::OpaqueCaptureDescriptorDataCreateInfoEXT ) == sizeof( VkOpaqueCaptureDescriptorDataCreateInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "OpaqueCaptureDescriptorDataCreateInfoEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AccelerationStructureCaptureDescriptorDataInfoEXT ) == sizeof( VkAccelerationStructureCaptureDescriptorDataInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "AccelerationStructureCaptureDescriptorDataInfoEXT is not nothrow_move_constructible!" ); //=== VK_EXT_graphics_pipeline_library === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceGraphicsPipelineLibraryFeaturesEXT ) == sizeof( VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceGraphicsPipelineLibraryFeaturesEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceGraphicsPipelineLibraryPropertiesEXT ) == sizeof( VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceGraphicsPipelineLibraryPropertiesEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::GraphicsPipelineLibraryCreateInfoEXT ) == sizeof( VkGraphicsPipelineLibraryCreateInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "GraphicsPipelineLibraryCreateInfoEXT is not nothrow_move_constructible!" ); //=== VK_AMD_shader_early_and_late_fragment_tests === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD ) == sizeof( VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD is not nothrow_move_constructible!" ); //=== VK_KHR_fragment_shader_barycentric === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceFragmentShaderBarycentricFeaturesKHR ) == sizeof( VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceFragmentShaderBarycentricFeaturesKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceFragmentShaderBarycentricPropertiesKHR ) == sizeof( VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceFragmentShaderBarycentricPropertiesKHR is not nothrow_move_constructible!" ); //=== VK_KHR_shader_subgroup_uniform_control_flow === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR ) == sizeof( VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR is not nothrow_move_constructible!" ); //=== VK_NV_fragment_shading_rate_enums === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceFragmentShadingRateEnumsFeaturesNV ) == sizeof( VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceFragmentShadingRateEnumsFeaturesNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceFragmentShadingRateEnumsPropertiesNV ) == sizeof( VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceFragmentShadingRateEnumsPropertiesNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineFragmentShadingRateEnumStateCreateInfoNV ) == sizeof( VkPipelineFragmentShadingRateEnumStateCreateInfoNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PipelineFragmentShadingRateEnumStateCreateInfoNV is not nothrow_move_constructible!" ); //=== VK_NV_ray_tracing_motion_blur === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AccelerationStructureGeometryMotionTrianglesDataNV ) == sizeof( VkAccelerationStructureGeometryMotionTrianglesDataNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "AccelerationStructureGeometryMotionTrianglesDataNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AccelerationStructureMotionInfoNV ) == sizeof( VkAccelerationStructureMotionInfoNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "AccelerationStructureMotionInfoNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AccelerationStructureMotionInstanceNV ) == sizeof( VkAccelerationStructureMotionInstanceNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "AccelerationStructureMotionInstanceNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AccelerationStructureMotionInstanceDataNV ) == sizeof( VkAccelerationStructureMotionInstanceDataNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "AccelerationStructureMotionInstanceDataNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AccelerationStructureMatrixMotionInstanceNV ) == sizeof( VkAccelerationStructureMatrixMotionInstanceNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "AccelerationStructureMatrixMotionInstanceNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AccelerationStructureSRTMotionInstanceNV ) == sizeof( VkAccelerationStructureSRTMotionInstanceNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "AccelerationStructureSRTMotionInstanceNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SRTDataNV ) == sizeof( VkSRTDataNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "SRTDataNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceRayTracingMotionBlurFeaturesNV ) == sizeof( VkPhysicalDeviceRayTracingMotionBlurFeaturesNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceRayTracingMotionBlurFeaturesNV is not nothrow_move_constructible!" ); //=== VK_EXT_mesh_shader === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceMeshShaderFeaturesEXT ) == sizeof( VkPhysicalDeviceMeshShaderFeaturesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceMeshShaderFeaturesEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceMeshShaderPropertiesEXT ) == sizeof( VkPhysicalDeviceMeshShaderPropertiesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceMeshShaderPropertiesEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DrawMeshTasksIndirectCommandEXT ) == sizeof( VkDrawMeshTasksIndirectCommandEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DrawMeshTasksIndirectCommandEXT is not nothrow_move_constructible!" ); //=== VK_EXT_ycbcr_2plane_444_formats === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT ) == sizeof( VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT is not nothrow_move_constructible!" ); //=== VK_EXT_fragment_density_map2 === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceFragmentDensityMap2FeaturesEXT ) == sizeof( VkPhysicalDeviceFragmentDensityMap2FeaturesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceFragmentDensityMap2FeaturesEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceFragmentDensityMap2PropertiesEXT ) == sizeof( VkPhysicalDeviceFragmentDensityMap2PropertiesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceFragmentDensityMap2PropertiesEXT is not nothrow_move_constructible!" ); //=== VK_QCOM_rotated_copy_commands === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::CopyCommandTransformInfoQCOM ) == sizeof( VkCopyCommandTransformInfoQCOM ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "CopyCommandTransformInfoQCOM is not nothrow_move_constructible!" ); //=== VK_KHR_workgroup_memory_explicit_layout === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR ) == sizeof( VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR is not nothrow_move_constructible!" ); //=== VK_EXT_image_compression_control === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceImageCompressionControlFeaturesEXT ) == sizeof( VkPhysicalDeviceImageCompressionControlFeaturesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceImageCompressionControlFeaturesEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImageCompressionControlEXT ) == sizeof( VkImageCompressionControlEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ImageCompressionControlEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImageCompressionPropertiesEXT ) == sizeof( VkImageCompressionPropertiesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ImageCompressionPropertiesEXT is not nothrow_move_constructible!" ); //=== VK_EXT_attachment_feedback_loop_layout === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT ) == sizeof( VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT is not nothrow_move_constructible!" ); //=== VK_EXT_4444_formats === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDevice4444FormatsFeaturesEXT ) == sizeof( VkPhysicalDevice4444FormatsFeaturesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDevice4444FormatsFeaturesEXT is not nothrow_move_constructible!" ); //=== VK_EXT_device_fault === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceFaultFeaturesEXT ) == sizeof( VkPhysicalDeviceFaultFeaturesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceFaultFeaturesEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DeviceFaultCountsEXT ) == sizeof( VkDeviceFaultCountsEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DeviceFaultCountsEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DeviceFaultInfoEXT ) == sizeof( VkDeviceFaultInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DeviceFaultInfoEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DeviceFaultAddressInfoEXT ) == sizeof( VkDeviceFaultAddressInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DeviceFaultAddressInfoEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DeviceFaultVendorInfoEXT ) == sizeof( VkDeviceFaultVendorInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DeviceFaultVendorInfoEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DeviceFaultVendorBinaryHeaderVersionOneEXT ) == sizeof( VkDeviceFaultVendorBinaryHeaderVersionOneEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DeviceFaultVendorBinaryHeaderVersionOneEXT is not nothrow_move_constructible!" ); //=== VK_EXT_rgba10x6_formats === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceRGBA10X6FormatsFeaturesEXT ) == sizeof( VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceRGBA10X6FormatsFeaturesEXT is not nothrow_move_constructible!" ); #if defined( VK_USE_PLATFORM_DIRECTFB_EXT ) //=== VK_EXT_directfb_surface === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DirectFBSurfaceCreateInfoEXT ) == sizeof( VkDirectFBSurfaceCreateInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DirectFBSurfaceCreateInfoEXT is not nothrow_move_constructible!" ); #endif /*VK_USE_PLATFORM_DIRECTFB_EXT*/ //=== VK_EXT_vertex_input_dynamic_state === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceVertexInputDynamicStateFeaturesEXT ) == sizeof( VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceVertexInputDynamicStateFeaturesEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VertexInputBindingDescription2EXT ) == sizeof( VkVertexInputBindingDescription2EXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VertexInputBindingDescription2EXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VertexInputAttributeDescription2EXT ) == sizeof( VkVertexInputAttributeDescription2EXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VertexInputAttributeDescription2EXT is not nothrow_move_constructible!" ); //=== VK_EXT_physical_device_drm === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceDrmPropertiesEXT ) == sizeof( VkPhysicalDeviceDrmPropertiesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceDrmPropertiesEXT is not nothrow_move_constructible!" ); //=== VK_EXT_device_address_binding_report === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceAddressBindingReportFeaturesEXT ) == sizeof( VkPhysicalDeviceAddressBindingReportFeaturesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceAddressBindingReportFeaturesEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DeviceAddressBindingCallbackDataEXT ) == sizeof( VkDeviceAddressBindingCallbackDataEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DeviceAddressBindingCallbackDataEXT is not nothrow_move_constructible!" ); //=== VK_EXT_depth_clip_control === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceDepthClipControlFeaturesEXT ) == sizeof( VkPhysicalDeviceDepthClipControlFeaturesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceDepthClipControlFeaturesEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineViewportDepthClipControlCreateInfoEXT ) == sizeof( VkPipelineViewportDepthClipControlCreateInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PipelineViewportDepthClipControlCreateInfoEXT is not nothrow_move_constructible!" ); //=== VK_EXT_primitive_topology_list_restart === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT ) == sizeof( VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT is not nothrow_move_constructible!" ); //=== VK_EXT_present_mode_fifo_latest_ready === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDevicePresentModeFifoLatestReadyFeaturesEXT ) == sizeof( VkPhysicalDevicePresentModeFifoLatestReadyFeaturesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDevicePresentModeFifoLatestReadyFeaturesEXT is not nothrow_move_constructible!" ); #if defined( VK_USE_PLATFORM_FUCHSIA ) //=== VK_FUCHSIA_external_memory === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImportMemoryZirconHandleInfoFUCHSIA ) == sizeof( VkImportMemoryZirconHandleInfoFUCHSIA ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ImportMemoryZirconHandleInfoFUCHSIA is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::MemoryZirconHandlePropertiesFUCHSIA ) == sizeof( VkMemoryZirconHandlePropertiesFUCHSIA ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "MemoryZirconHandlePropertiesFUCHSIA is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::MemoryGetZirconHandleInfoFUCHSIA ) == sizeof( VkMemoryGetZirconHandleInfoFUCHSIA ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "MemoryGetZirconHandleInfoFUCHSIA is not nothrow_move_constructible!" ); #endif /*VK_USE_PLATFORM_FUCHSIA*/ #if defined( VK_USE_PLATFORM_FUCHSIA ) //=== VK_FUCHSIA_external_semaphore === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImportSemaphoreZirconHandleInfoFUCHSIA ) == sizeof( VkImportSemaphoreZirconHandleInfoFUCHSIA ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ImportSemaphoreZirconHandleInfoFUCHSIA is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SemaphoreGetZirconHandleInfoFUCHSIA ) == sizeof( VkSemaphoreGetZirconHandleInfoFUCHSIA ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "SemaphoreGetZirconHandleInfoFUCHSIA is not nothrow_move_constructible!" ); #endif /*VK_USE_PLATFORM_FUCHSIA*/ #if defined( VK_USE_PLATFORM_FUCHSIA ) //=== VK_FUCHSIA_buffer_collection === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::BufferCollectionFUCHSIA ) == sizeof( VkBufferCollectionFUCHSIA ), "handle and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_copy_constructible::value, "BufferCollectionFUCHSIA is not copy_constructible!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "BufferCollectionFUCHSIA is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::BufferCollectionCreateInfoFUCHSIA ) == sizeof( VkBufferCollectionCreateInfoFUCHSIA ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "BufferCollectionCreateInfoFUCHSIA is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImportMemoryBufferCollectionFUCHSIA ) == sizeof( VkImportMemoryBufferCollectionFUCHSIA ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ImportMemoryBufferCollectionFUCHSIA is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::BufferCollectionImageCreateInfoFUCHSIA ) == sizeof( VkBufferCollectionImageCreateInfoFUCHSIA ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "BufferCollectionImageCreateInfoFUCHSIA is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::BufferConstraintsInfoFUCHSIA ) == sizeof( VkBufferConstraintsInfoFUCHSIA ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "BufferConstraintsInfoFUCHSIA is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::BufferCollectionBufferCreateInfoFUCHSIA ) == sizeof( VkBufferCollectionBufferCreateInfoFUCHSIA ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "BufferCollectionBufferCreateInfoFUCHSIA is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::BufferCollectionPropertiesFUCHSIA ) == sizeof( VkBufferCollectionPropertiesFUCHSIA ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "BufferCollectionPropertiesFUCHSIA is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SysmemColorSpaceFUCHSIA ) == sizeof( VkSysmemColorSpaceFUCHSIA ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "SysmemColorSpaceFUCHSIA is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImageConstraintsInfoFUCHSIA ) == sizeof( VkImageConstraintsInfoFUCHSIA ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ImageConstraintsInfoFUCHSIA is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImageFormatConstraintsInfoFUCHSIA ) == sizeof( VkImageFormatConstraintsInfoFUCHSIA ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ImageFormatConstraintsInfoFUCHSIA is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::BufferCollectionConstraintsInfoFUCHSIA ) == sizeof( VkBufferCollectionConstraintsInfoFUCHSIA ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "BufferCollectionConstraintsInfoFUCHSIA is not nothrow_move_constructible!" ); #endif /*VK_USE_PLATFORM_FUCHSIA*/ //=== VK_HUAWEI_subpass_shading === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SubpassShadingPipelineCreateInfoHUAWEI ) == sizeof( VkSubpassShadingPipelineCreateInfoHUAWEI ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "SubpassShadingPipelineCreateInfoHUAWEI is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceSubpassShadingFeaturesHUAWEI ) == sizeof( VkPhysicalDeviceSubpassShadingFeaturesHUAWEI ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceSubpassShadingFeaturesHUAWEI is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceSubpassShadingPropertiesHUAWEI ) == sizeof( VkPhysicalDeviceSubpassShadingPropertiesHUAWEI ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceSubpassShadingPropertiesHUAWEI is not nothrow_move_constructible!" ); //=== VK_HUAWEI_invocation_mask === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceInvocationMaskFeaturesHUAWEI ) == sizeof( VkPhysicalDeviceInvocationMaskFeaturesHUAWEI ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceInvocationMaskFeaturesHUAWEI is not nothrow_move_constructible!" ); //=== VK_NV_external_memory_rdma === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::MemoryGetRemoteAddressInfoNV ) == sizeof( VkMemoryGetRemoteAddressInfoNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "MemoryGetRemoteAddressInfoNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalMemoryRDMAFeaturesNV ) == sizeof( VkPhysicalDeviceExternalMemoryRDMAFeaturesNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceExternalMemoryRDMAFeaturesNV is not nothrow_move_constructible!" ); //=== VK_EXT_pipeline_properties === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelinePropertiesIdentifierEXT ) == sizeof( VkPipelinePropertiesIdentifierEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PipelinePropertiesIdentifierEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDevicePipelinePropertiesFeaturesEXT ) == sizeof( VkPhysicalDevicePipelinePropertiesFeaturesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDevicePipelinePropertiesFeaturesEXT is not nothrow_move_constructible!" ); //=== VK_EXT_frame_boundary === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceFrameBoundaryFeaturesEXT ) == sizeof( VkPhysicalDeviceFrameBoundaryFeaturesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceFrameBoundaryFeaturesEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::FrameBoundaryEXT ) == sizeof( VkFrameBoundaryEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "FrameBoundaryEXT is not nothrow_move_constructible!" ); //=== VK_EXT_multisampled_render_to_single_sampled === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT ) == sizeof( VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SubpassResolvePerformanceQueryEXT ) == sizeof( VkSubpassResolvePerformanceQueryEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "SubpassResolvePerformanceQueryEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::MultisampledRenderToSingleSampledInfoEXT ) == sizeof( VkMultisampledRenderToSingleSampledInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "MultisampledRenderToSingleSampledInfoEXT is not nothrow_move_constructible!" ); //=== VK_EXT_extended_dynamic_state2 === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceExtendedDynamicState2FeaturesEXT ) == sizeof( VkPhysicalDeviceExtendedDynamicState2FeaturesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceExtendedDynamicState2FeaturesEXT is not nothrow_move_constructible!" ); #if defined( VK_USE_PLATFORM_SCREEN_QNX ) //=== VK_QNX_screen_surface === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ScreenSurfaceCreateInfoQNX ) == sizeof( VkScreenSurfaceCreateInfoQNX ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ScreenSurfaceCreateInfoQNX is not nothrow_move_constructible!" ); #endif /*VK_USE_PLATFORM_SCREEN_QNX*/ //=== VK_EXT_color_write_enable === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceColorWriteEnableFeaturesEXT ) == sizeof( VkPhysicalDeviceColorWriteEnableFeaturesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceColorWriteEnableFeaturesEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineColorWriteCreateInfoEXT ) == sizeof( VkPipelineColorWriteCreateInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PipelineColorWriteCreateInfoEXT is not nothrow_move_constructible!" ); //=== VK_EXT_primitives_generated_query === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDevicePrimitivesGeneratedQueryFeaturesEXT ) == sizeof( VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDevicePrimitivesGeneratedQueryFeaturesEXT is not nothrow_move_constructible!" ); //=== VK_KHR_ray_tracing_maintenance1 === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceRayTracingMaintenance1FeaturesKHR ) == sizeof( VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceRayTracingMaintenance1FeaturesKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::TraceRaysIndirectCommand2KHR ) == sizeof( VkTraceRaysIndirectCommand2KHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "TraceRaysIndirectCommand2KHR is not nothrow_move_constructible!" ); //=== VK_EXT_image_view_min_lod === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceImageViewMinLodFeaturesEXT ) == sizeof( VkPhysicalDeviceImageViewMinLodFeaturesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceImageViewMinLodFeaturesEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImageViewMinLodCreateInfoEXT ) == sizeof( VkImageViewMinLodCreateInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ImageViewMinLodCreateInfoEXT is not nothrow_move_constructible!" ); //=== VK_EXT_multi_draw === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceMultiDrawFeaturesEXT ) == sizeof( VkPhysicalDeviceMultiDrawFeaturesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceMultiDrawFeaturesEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceMultiDrawPropertiesEXT ) == sizeof( VkPhysicalDeviceMultiDrawPropertiesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceMultiDrawPropertiesEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::MultiDrawInfoEXT ) == sizeof( VkMultiDrawInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "MultiDrawInfoEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::MultiDrawIndexedInfoEXT ) == sizeof( VkMultiDrawIndexedInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "MultiDrawIndexedInfoEXT is not nothrow_move_constructible!" ); //=== VK_EXT_image_2d_view_of_3d === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceImage2DViewOf3DFeaturesEXT ) == sizeof( VkPhysicalDeviceImage2DViewOf3DFeaturesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceImage2DViewOf3DFeaturesEXT is not nothrow_move_constructible!" ); //=== VK_EXT_shader_tile_image === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderTileImageFeaturesEXT ) == sizeof( VkPhysicalDeviceShaderTileImageFeaturesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceShaderTileImageFeaturesEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderTileImagePropertiesEXT ) == sizeof( VkPhysicalDeviceShaderTileImagePropertiesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceShaderTileImagePropertiesEXT is not nothrow_move_constructible!" ); //=== VK_EXT_opacity_micromap === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::MicromapBuildInfoEXT ) == sizeof( VkMicromapBuildInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "MicromapBuildInfoEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::MicromapUsageEXT ) == sizeof( VkMicromapUsageEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "MicromapUsageEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::MicromapCreateInfoEXT ) == sizeof( VkMicromapCreateInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "MicromapCreateInfoEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::MicromapEXT ) == sizeof( VkMicromapEXT ), "handle and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_copy_constructible::value, "MicromapEXT is not copy_constructible!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "MicromapEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceOpacityMicromapFeaturesEXT ) == sizeof( VkPhysicalDeviceOpacityMicromapFeaturesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceOpacityMicromapFeaturesEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceOpacityMicromapPropertiesEXT ) == sizeof( VkPhysicalDeviceOpacityMicromapPropertiesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceOpacityMicromapPropertiesEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::MicromapVersionInfoEXT ) == sizeof( VkMicromapVersionInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "MicromapVersionInfoEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::CopyMicromapToMemoryInfoEXT ) == sizeof( VkCopyMicromapToMemoryInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "CopyMicromapToMemoryInfoEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::CopyMemoryToMicromapInfoEXT ) == sizeof( VkCopyMemoryToMicromapInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "CopyMemoryToMicromapInfoEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::CopyMicromapInfoEXT ) == sizeof( VkCopyMicromapInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "CopyMicromapInfoEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::MicromapBuildSizesInfoEXT ) == sizeof( VkMicromapBuildSizesInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "MicromapBuildSizesInfoEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AccelerationStructureTrianglesOpacityMicromapEXT ) == sizeof( VkAccelerationStructureTrianglesOpacityMicromapEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "AccelerationStructureTrianglesOpacityMicromapEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::MicromapTriangleEXT ) == sizeof( VkMicromapTriangleEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "MicromapTriangleEXT is not nothrow_move_constructible!" ); #if defined( VK_ENABLE_BETA_EXTENSIONS ) //=== VK_NV_displacement_micromap === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceDisplacementMicromapFeaturesNV ) == sizeof( VkPhysicalDeviceDisplacementMicromapFeaturesNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceDisplacementMicromapFeaturesNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceDisplacementMicromapPropertiesNV ) == sizeof( VkPhysicalDeviceDisplacementMicromapPropertiesNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceDisplacementMicromapPropertiesNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AccelerationStructureTrianglesDisplacementMicromapNV ) == sizeof( VkAccelerationStructureTrianglesDisplacementMicromapNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "AccelerationStructureTrianglesDisplacementMicromapNV is not nothrow_move_constructible!" ); #endif /*VK_ENABLE_BETA_EXTENSIONS*/ //=== VK_HUAWEI_cluster_culling_shader === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceClusterCullingShaderFeaturesHUAWEI ) == sizeof( VkPhysicalDeviceClusterCullingShaderFeaturesHUAWEI ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceClusterCullingShaderFeaturesHUAWEI is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceClusterCullingShaderPropertiesHUAWEI ) == sizeof( VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceClusterCullingShaderPropertiesHUAWEI is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI ) == sizeof( VkPhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI is not nothrow_move_constructible!" ); //=== VK_EXT_border_color_swizzle === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceBorderColorSwizzleFeaturesEXT ) == sizeof( VkPhysicalDeviceBorderColorSwizzleFeaturesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceBorderColorSwizzleFeaturesEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SamplerBorderColorComponentMappingCreateInfoEXT ) == sizeof( VkSamplerBorderColorComponentMappingCreateInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "SamplerBorderColorComponentMappingCreateInfoEXT is not nothrow_move_constructible!" ); //=== VK_EXT_pageable_device_local_memory === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDevicePageableDeviceLocalMemoryFeaturesEXT ) == sizeof( VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDevicePageableDeviceLocalMemoryFeaturesEXT is not nothrow_move_constructible!" ); //=== VK_ARM_shader_core_properties === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderCorePropertiesARM ) == sizeof( VkPhysicalDeviceShaderCorePropertiesARM ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceShaderCorePropertiesARM is not nothrow_move_constructible!" ); //=== VK_ARM_scheduling_controls === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DeviceQueueShaderCoreControlCreateInfoARM ) == sizeof( VkDeviceQueueShaderCoreControlCreateInfoARM ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DeviceQueueShaderCoreControlCreateInfoARM is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceSchedulingControlsFeaturesARM ) == sizeof( VkPhysicalDeviceSchedulingControlsFeaturesARM ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceSchedulingControlsFeaturesARM is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceSchedulingControlsPropertiesARM ) == sizeof( VkPhysicalDeviceSchedulingControlsPropertiesARM ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceSchedulingControlsPropertiesARM is not nothrow_move_constructible!" ); //=== VK_EXT_image_sliced_view_of_3d === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceImageSlicedViewOf3DFeaturesEXT ) == sizeof( VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceImageSlicedViewOf3DFeaturesEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImageViewSlicedCreateInfoEXT ) == sizeof( VkImageViewSlicedCreateInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ImageViewSlicedCreateInfoEXT is not nothrow_move_constructible!" ); //=== VK_VALVE_descriptor_set_host_mapping === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceDescriptorSetHostMappingFeaturesVALVE ) == sizeof( VkPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceDescriptorSetHostMappingFeaturesVALVE is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DescriptorSetBindingReferenceVALVE ) == sizeof( VkDescriptorSetBindingReferenceVALVE ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DescriptorSetBindingReferenceVALVE is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DescriptorSetLayoutHostMappingInfoVALVE ) == sizeof( VkDescriptorSetLayoutHostMappingInfoVALVE ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DescriptorSetLayoutHostMappingInfoVALVE is not nothrow_move_constructible!" ); //=== VK_EXT_non_seamless_cube_map === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceNonSeamlessCubeMapFeaturesEXT ) == sizeof( VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceNonSeamlessCubeMapFeaturesEXT is not nothrow_move_constructible!" ); //=== VK_ARM_render_pass_striped === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceRenderPassStripedFeaturesARM ) == sizeof( VkPhysicalDeviceRenderPassStripedFeaturesARM ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceRenderPassStripedFeaturesARM is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceRenderPassStripedPropertiesARM ) == sizeof( VkPhysicalDeviceRenderPassStripedPropertiesARM ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceRenderPassStripedPropertiesARM is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::RenderPassStripeBeginInfoARM ) == sizeof( VkRenderPassStripeBeginInfoARM ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "RenderPassStripeBeginInfoARM is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::RenderPassStripeInfoARM ) == sizeof( VkRenderPassStripeInfoARM ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "RenderPassStripeInfoARM is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::RenderPassStripeSubmitInfoARM ) == sizeof( VkRenderPassStripeSubmitInfoARM ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "RenderPassStripeSubmitInfoARM is not nothrow_move_constructible!" ); //=== VK_QCOM_fragment_density_map_offset === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM ) == sizeof( VkPhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM ) == sizeof( VkPhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SubpassFragmentDensityMapOffsetEndInfoQCOM ) == sizeof( VkSubpassFragmentDensityMapOffsetEndInfoQCOM ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "SubpassFragmentDensityMapOffsetEndInfoQCOM is not nothrow_move_constructible!" ); //=== VK_NV_copy_memory_indirect === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::CopyMemoryIndirectCommandNV ) == sizeof( VkCopyMemoryIndirectCommandNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "CopyMemoryIndirectCommandNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::CopyMemoryToImageIndirectCommandNV ) == sizeof( VkCopyMemoryToImageIndirectCommandNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "CopyMemoryToImageIndirectCommandNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceCopyMemoryIndirectFeaturesNV ) == sizeof( VkPhysicalDeviceCopyMemoryIndirectFeaturesNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceCopyMemoryIndirectFeaturesNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceCopyMemoryIndirectPropertiesNV ) == sizeof( VkPhysicalDeviceCopyMemoryIndirectPropertiesNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceCopyMemoryIndirectPropertiesNV is not nothrow_move_constructible!" ); //=== VK_NV_memory_decompression === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DecompressMemoryRegionNV ) == sizeof( VkDecompressMemoryRegionNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DecompressMemoryRegionNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryDecompressionFeaturesNV ) == sizeof( VkPhysicalDeviceMemoryDecompressionFeaturesNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceMemoryDecompressionFeaturesNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryDecompressionPropertiesNV ) == sizeof( VkPhysicalDeviceMemoryDecompressionPropertiesNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceMemoryDecompressionPropertiesNV is not nothrow_move_constructible!" ); //=== VK_NV_device_generated_commands_compute === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV ) == sizeof( VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ComputePipelineIndirectBufferInfoNV ) == sizeof( VkComputePipelineIndirectBufferInfoNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ComputePipelineIndirectBufferInfoNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineIndirectDeviceAddressInfoNV ) == sizeof( VkPipelineIndirectDeviceAddressInfoNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PipelineIndirectDeviceAddressInfoNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::BindPipelineIndirectCommandNV ) == sizeof( VkBindPipelineIndirectCommandNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "BindPipelineIndirectCommandNV is not nothrow_move_constructible!" ); //=== VK_NV_ray_tracing_linear_swept_spheres === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceRayTracingLinearSweptSpheresFeaturesNV ) == sizeof( VkPhysicalDeviceRayTracingLinearSweptSpheresFeaturesNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceRayTracingLinearSweptSpheresFeaturesNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AccelerationStructureGeometryLinearSweptSpheresDataNV ) == sizeof( VkAccelerationStructureGeometryLinearSweptSpheresDataNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "AccelerationStructureGeometryLinearSweptSpheresDataNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AccelerationStructureGeometrySpheresDataNV ) == sizeof( VkAccelerationStructureGeometrySpheresDataNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "AccelerationStructureGeometrySpheresDataNV is not nothrow_move_constructible!" ); //=== VK_NV_linear_color_attachment === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceLinearColorAttachmentFeaturesNV ) == sizeof( VkPhysicalDeviceLinearColorAttachmentFeaturesNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceLinearColorAttachmentFeaturesNV is not nothrow_move_constructible!" ); //=== VK_KHR_shader_maximal_reconvergence === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderMaximalReconvergenceFeaturesKHR ) == sizeof( VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceShaderMaximalReconvergenceFeaturesKHR is not nothrow_move_constructible!" ); //=== VK_EXT_image_compression_control_swapchain === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceImageCompressionControlSwapchainFeaturesEXT ) == sizeof( VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceImageCompressionControlSwapchainFeaturesEXT is not nothrow_move_constructible!" ); //=== VK_QCOM_image_processing === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImageViewSampleWeightCreateInfoQCOM ) == sizeof( VkImageViewSampleWeightCreateInfoQCOM ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ImageViewSampleWeightCreateInfoQCOM is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceImageProcessingFeaturesQCOM ) == sizeof( VkPhysicalDeviceImageProcessingFeaturesQCOM ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceImageProcessingFeaturesQCOM is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceImageProcessingPropertiesQCOM ) == sizeof( VkPhysicalDeviceImageProcessingPropertiesQCOM ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceImageProcessingPropertiesQCOM is not nothrow_move_constructible!" ); //=== VK_EXT_nested_command_buffer === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceNestedCommandBufferFeaturesEXT ) == sizeof( VkPhysicalDeviceNestedCommandBufferFeaturesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceNestedCommandBufferFeaturesEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceNestedCommandBufferPropertiesEXT ) == sizeof( VkPhysicalDeviceNestedCommandBufferPropertiesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceNestedCommandBufferPropertiesEXT is not nothrow_move_constructible!" ); //=== VK_EXT_external_memory_acquire_unmodified === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ExternalMemoryAcquireUnmodifiedEXT ) == sizeof( VkExternalMemoryAcquireUnmodifiedEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ExternalMemoryAcquireUnmodifiedEXT is not nothrow_move_constructible!" ); //=== VK_EXT_extended_dynamic_state3 === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceExtendedDynamicState3FeaturesEXT ) == sizeof( VkPhysicalDeviceExtendedDynamicState3FeaturesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceExtendedDynamicState3FeaturesEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceExtendedDynamicState3PropertiesEXT ) == sizeof( VkPhysicalDeviceExtendedDynamicState3PropertiesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceExtendedDynamicState3PropertiesEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ColorBlendEquationEXT ) == sizeof( VkColorBlendEquationEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ColorBlendEquationEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ColorBlendAdvancedEXT ) == sizeof( VkColorBlendAdvancedEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ColorBlendAdvancedEXT is not nothrow_move_constructible!" ); //=== VK_EXT_subpass_merge_feedback === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceSubpassMergeFeedbackFeaturesEXT ) == sizeof( VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceSubpassMergeFeedbackFeaturesEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::RenderPassCreationControlEXT ) == sizeof( VkRenderPassCreationControlEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "RenderPassCreationControlEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::RenderPassCreationFeedbackInfoEXT ) == sizeof( VkRenderPassCreationFeedbackInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "RenderPassCreationFeedbackInfoEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::RenderPassCreationFeedbackCreateInfoEXT ) == sizeof( VkRenderPassCreationFeedbackCreateInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "RenderPassCreationFeedbackCreateInfoEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::RenderPassSubpassFeedbackInfoEXT ) == sizeof( VkRenderPassSubpassFeedbackInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "RenderPassSubpassFeedbackInfoEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::RenderPassSubpassFeedbackCreateInfoEXT ) == sizeof( VkRenderPassSubpassFeedbackCreateInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "RenderPassSubpassFeedbackCreateInfoEXT is not nothrow_move_constructible!" ); //=== VK_LUNARG_direct_driver_loading === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DirectDriverLoadingInfoLUNARG ) == sizeof( VkDirectDriverLoadingInfoLUNARG ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DirectDriverLoadingInfoLUNARG is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DirectDriverLoadingListLUNARG ) == sizeof( VkDirectDriverLoadingListLUNARG ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DirectDriverLoadingListLUNARG is not nothrow_move_constructible!" ); //=== VK_EXT_shader_module_identifier === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderModuleIdentifierFeaturesEXT ) == sizeof( VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceShaderModuleIdentifierFeaturesEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderModuleIdentifierPropertiesEXT ) == sizeof( VkPhysicalDeviceShaderModuleIdentifierPropertiesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceShaderModuleIdentifierPropertiesEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineShaderStageModuleIdentifierCreateInfoEXT ) == sizeof( VkPipelineShaderStageModuleIdentifierCreateInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PipelineShaderStageModuleIdentifierCreateInfoEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ShaderModuleIdentifierEXT ) == sizeof( VkShaderModuleIdentifierEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ShaderModuleIdentifierEXT is not nothrow_move_constructible!" ); //=== VK_EXT_rasterization_order_attachment_access === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT ) == sizeof( VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT is not nothrow_move_constructible!" ); //=== VK_NV_optical_flow === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceOpticalFlowFeaturesNV ) == sizeof( VkPhysicalDeviceOpticalFlowFeaturesNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceOpticalFlowFeaturesNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceOpticalFlowPropertiesNV ) == sizeof( VkPhysicalDeviceOpticalFlowPropertiesNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceOpticalFlowPropertiesNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::OpticalFlowImageFormatInfoNV ) == sizeof( VkOpticalFlowImageFormatInfoNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "OpticalFlowImageFormatInfoNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::OpticalFlowImageFormatPropertiesNV ) == sizeof( VkOpticalFlowImageFormatPropertiesNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "OpticalFlowImageFormatPropertiesNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::OpticalFlowSessionNV ) == sizeof( VkOpticalFlowSessionNV ), "handle and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_copy_constructible::value, "OpticalFlowSessionNV is not copy_constructible!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "OpticalFlowSessionNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::OpticalFlowSessionCreateInfoNV ) == sizeof( VkOpticalFlowSessionCreateInfoNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "OpticalFlowSessionCreateInfoNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::OpticalFlowSessionCreatePrivateDataInfoNV ) == sizeof( VkOpticalFlowSessionCreatePrivateDataInfoNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "OpticalFlowSessionCreatePrivateDataInfoNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::OpticalFlowExecuteInfoNV ) == sizeof( VkOpticalFlowExecuteInfoNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "OpticalFlowExecuteInfoNV is not nothrow_move_constructible!" ); //=== VK_EXT_legacy_dithering === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceLegacyDitheringFeaturesEXT ) == sizeof( VkPhysicalDeviceLegacyDitheringFeaturesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceLegacyDitheringFeaturesEXT is not nothrow_move_constructible!" ); #if defined( VK_USE_PLATFORM_ANDROID_KHR ) //=== VK_ANDROID_external_format_resolve === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalFormatResolveFeaturesANDROID ) == sizeof( VkPhysicalDeviceExternalFormatResolveFeaturesANDROID ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceExternalFormatResolveFeaturesANDROID is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalFormatResolvePropertiesANDROID ) == sizeof( VkPhysicalDeviceExternalFormatResolvePropertiesANDROID ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceExternalFormatResolvePropertiesANDROID is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AndroidHardwareBufferFormatResolvePropertiesANDROID ) == sizeof( VkAndroidHardwareBufferFormatResolvePropertiesANDROID ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "AndroidHardwareBufferFormatResolvePropertiesANDROID is not nothrow_move_constructible!" ); #endif /*VK_USE_PLATFORM_ANDROID_KHR*/ //=== VK_AMD_anti_lag === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceAntiLagFeaturesAMD ) == sizeof( VkPhysicalDeviceAntiLagFeaturesAMD ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceAntiLagFeaturesAMD is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AntiLagDataAMD ) == sizeof( VkAntiLagDataAMD ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "AntiLagDataAMD is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AntiLagPresentationInfoAMD ) == sizeof( VkAntiLagPresentationInfoAMD ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "AntiLagPresentationInfoAMD is not nothrow_move_constructible!" ); //=== VK_KHR_ray_tracing_position_fetch === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceRayTracingPositionFetchFeaturesKHR ) == sizeof( VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceRayTracingPositionFetchFeaturesKHR is not nothrow_move_constructible!" ); //=== VK_EXT_shader_object === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ShaderEXT ) == sizeof( VkShaderEXT ), "handle and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_copy_constructible::value, "ShaderEXT is not copy_constructible!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ShaderEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderObjectFeaturesEXT ) == sizeof( VkPhysicalDeviceShaderObjectFeaturesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceShaderObjectFeaturesEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderObjectPropertiesEXT ) == sizeof( VkPhysicalDeviceShaderObjectPropertiesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceShaderObjectPropertiesEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ShaderCreateInfoEXT ) == sizeof( VkShaderCreateInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ShaderCreateInfoEXT is not nothrow_move_constructible!" ); //=== VK_KHR_pipeline_binary === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDevicePipelineBinaryFeaturesKHR ) == sizeof( VkPhysicalDevicePipelineBinaryFeaturesKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDevicePipelineBinaryFeaturesKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDevicePipelineBinaryPropertiesKHR ) == sizeof( VkPhysicalDevicePipelineBinaryPropertiesKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDevicePipelineBinaryPropertiesKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DevicePipelineBinaryInternalCacheControlKHR ) == sizeof( VkDevicePipelineBinaryInternalCacheControlKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DevicePipelineBinaryInternalCacheControlKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineBinaryKHR ) == sizeof( VkPipelineBinaryKHR ), "handle and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_copy_constructible::value, "PipelineBinaryKHR is not copy_constructible!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PipelineBinaryKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineBinaryKeyKHR ) == sizeof( VkPipelineBinaryKeyKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PipelineBinaryKeyKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineBinaryDataKHR ) == sizeof( VkPipelineBinaryDataKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PipelineBinaryDataKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineBinaryKeysAndDataKHR ) == sizeof( VkPipelineBinaryKeysAndDataKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PipelineBinaryKeysAndDataKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineBinaryCreateInfoKHR ) == sizeof( VkPipelineBinaryCreateInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PipelineBinaryCreateInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineBinaryInfoKHR ) == sizeof( VkPipelineBinaryInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PipelineBinaryInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ReleaseCapturedPipelineDataInfoKHR ) == sizeof( VkReleaseCapturedPipelineDataInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ReleaseCapturedPipelineDataInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineBinaryDataInfoKHR ) == sizeof( VkPipelineBinaryDataInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PipelineBinaryDataInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineCreateInfoKHR ) == sizeof( VkPipelineCreateInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PipelineCreateInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineBinaryHandlesInfoKHR ) == sizeof( VkPipelineBinaryHandlesInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PipelineBinaryHandlesInfoKHR is not nothrow_move_constructible!" ); //=== VK_QCOM_tile_properties === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceTilePropertiesFeaturesQCOM ) == sizeof( VkPhysicalDeviceTilePropertiesFeaturesQCOM ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceTilePropertiesFeaturesQCOM is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::TilePropertiesQCOM ) == sizeof( VkTilePropertiesQCOM ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "TilePropertiesQCOM is not nothrow_move_constructible!" ); //=== VK_SEC_amigo_profiling === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceAmigoProfilingFeaturesSEC ) == sizeof( VkPhysicalDeviceAmigoProfilingFeaturesSEC ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceAmigoProfilingFeaturesSEC is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::AmigoProfilingSubmitInfoSEC ) == sizeof( VkAmigoProfilingSubmitInfoSEC ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "AmigoProfilingSubmitInfoSEC is not nothrow_move_constructible!" ); //=== VK_QCOM_multiview_per_view_viewports === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM ) == sizeof( VkPhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM is not nothrow_move_constructible!" ); //=== VK_NV_ray_tracing_invocation_reorder === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceRayTracingInvocationReorderPropertiesNV ) == sizeof( VkPhysicalDeviceRayTracingInvocationReorderPropertiesNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceRayTracingInvocationReorderPropertiesNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceRayTracingInvocationReorderFeaturesNV ) == sizeof( VkPhysicalDeviceRayTracingInvocationReorderFeaturesNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceRayTracingInvocationReorderFeaturesNV is not nothrow_move_constructible!" ); //=== VK_NV_cooperative_vector === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceCooperativeVectorPropertiesNV ) == sizeof( VkPhysicalDeviceCooperativeVectorPropertiesNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceCooperativeVectorPropertiesNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceCooperativeVectorFeaturesNV ) == sizeof( VkPhysicalDeviceCooperativeVectorFeaturesNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceCooperativeVectorFeaturesNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::CooperativeVectorPropertiesNV ) == sizeof( VkCooperativeVectorPropertiesNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "CooperativeVectorPropertiesNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ConvertCooperativeVectorMatrixInfoNV ) == sizeof( VkConvertCooperativeVectorMatrixInfoNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ConvertCooperativeVectorMatrixInfoNV is not nothrow_move_constructible!" ); //=== VK_NV_extended_sparse_address_space === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceExtendedSparseAddressSpaceFeaturesNV ) == sizeof( VkPhysicalDeviceExtendedSparseAddressSpaceFeaturesNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceExtendedSparseAddressSpaceFeaturesNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceExtendedSparseAddressSpacePropertiesNV ) == sizeof( VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceExtendedSparseAddressSpacePropertiesNV is not nothrow_move_constructible!" ); //=== VK_EXT_mutable_descriptor_type === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceMutableDescriptorTypeFeaturesEXT ) == sizeof( VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceMutableDescriptorTypeFeaturesEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::MutableDescriptorTypeListEXT ) == sizeof( VkMutableDescriptorTypeListEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "MutableDescriptorTypeListEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::MutableDescriptorTypeCreateInfoEXT ) == sizeof( VkMutableDescriptorTypeCreateInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "MutableDescriptorTypeCreateInfoEXT is not nothrow_move_constructible!" ); //=== VK_EXT_legacy_vertex_attributes === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceLegacyVertexAttributesFeaturesEXT ) == sizeof( VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceLegacyVertexAttributesFeaturesEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceLegacyVertexAttributesPropertiesEXT ) == sizeof( VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceLegacyVertexAttributesPropertiesEXT is not nothrow_move_constructible!" ); //=== VK_EXT_layer_settings === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::LayerSettingsCreateInfoEXT ) == sizeof( VkLayerSettingsCreateInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "LayerSettingsCreateInfoEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::LayerSettingEXT ) == sizeof( VkLayerSettingEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "LayerSettingEXT is not nothrow_move_constructible!" ); //=== VK_ARM_shader_core_builtins === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderCoreBuiltinsFeaturesARM ) == sizeof( VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceShaderCoreBuiltinsFeaturesARM is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderCoreBuiltinsPropertiesARM ) == sizeof( VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceShaderCoreBuiltinsPropertiesARM is not nothrow_move_constructible!" ); //=== VK_EXT_pipeline_library_group_handles === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT ) == sizeof( VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT is not nothrow_move_constructible!" ); //=== VK_EXT_dynamic_rendering_unused_attachments === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT ) == sizeof( VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT is not nothrow_move_constructible!" ); //=== VK_NV_low_latency2 === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::LatencySleepModeInfoNV ) == sizeof( VkLatencySleepModeInfoNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "LatencySleepModeInfoNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::LatencySleepInfoNV ) == sizeof( VkLatencySleepInfoNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "LatencySleepInfoNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SetLatencyMarkerInfoNV ) == sizeof( VkSetLatencyMarkerInfoNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "SetLatencyMarkerInfoNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::GetLatencyMarkerInfoNV ) == sizeof( VkGetLatencyMarkerInfoNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "GetLatencyMarkerInfoNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::LatencyTimingsFrameReportNV ) == sizeof( VkLatencyTimingsFrameReportNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "LatencyTimingsFrameReportNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::LatencySubmissionPresentIdNV ) == sizeof( VkLatencySubmissionPresentIdNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "LatencySubmissionPresentIdNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SwapchainLatencyCreateInfoNV ) == sizeof( VkSwapchainLatencyCreateInfoNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "SwapchainLatencyCreateInfoNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::OutOfBandQueueTypeInfoNV ) == sizeof( VkOutOfBandQueueTypeInfoNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "OutOfBandQueueTypeInfoNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::LatencySurfaceCapabilitiesNV ) == sizeof( VkLatencySurfaceCapabilitiesNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "LatencySurfaceCapabilitiesNV is not nothrow_move_constructible!" ); //=== VK_KHR_cooperative_matrix === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::CooperativeMatrixPropertiesKHR ) == sizeof( VkCooperativeMatrixPropertiesKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "CooperativeMatrixPropertiesKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceCooperativeMatrixFeaturesKHR ) == sizeof( VkPhysicalDeviceCooperativeMatrixFeaturesKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceCooperativeMatrixFeaturesKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceCooperativeMatrixPropertiesKHR ) == sizeof( VkPhysicalDeviceCooperativeMatrixPropertiesKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceCooperativeMatrixPropertiesKHR is not nothrow_move_constructible!" ); //=== VK_QCOM_multiview_per_view_render_areas === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM ) == sizeof( VkPhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::MultiviewPerViewRenderAreasRenderPassBeginInfoQCOM ) == sizeof( VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "MultiviewPerViewRenderAreasRenderPassBeginInfoQCOM is not nothrow_move_constructible!" ); //=== VK_KHR_compute_shader_derivatives === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceComputeShaderDerivativesFeaturesKHR ) == sizeof( VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceComputeShaderDerivativesFeaturesKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceComputeShaderDerivativesPropertiesKHR ) == sizeof( VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceComputeShaderDerivativesPropertiesKHR is not nothrow_move_constructible!" ); //=== VK_KHR_video_decode_av1 === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoDecodeAV1ProfileInfoKHR ) == sizeof( VkVideoDecodeAV1ProfileInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoDecodeAV1ProfileInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoDecodeAV1CapabilitiesKHR ) == sizeof( VkVideoDecodeAV1CapabilitiesKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoDecodeAV1CapabilitiesKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoDecodeAV1SessionParametersCreateInfoKHR ) == sizeof( VkVideoDecodeAV1SessionParametersCreateInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoDecodeAV1SessionParametersCreateInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoDecodeAV1PictureInfoKHR ) == sizeof( VkVideoDecodeAV1PictureInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoDecodeAV1PictureInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoDecodeAV1DpbSlotInfoKHR ) == sizeof( VkVideoDecodeAV1DpbSlotInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoDecodeAV1DpbSlotInfoKHR is not nothrow_move_constructible!" ); //=== VK_KHR_video_encode_av1 === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceVideoEncodeAV1FeaturesKHR ) == sizeof( VkPhysicalDeviceVideoEncodeAV1FeaturesKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceVideoEncodeAV1FeaturesKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEncodeAV1CapabilitiesKHR ) == sizeof( VkVideoEncodeAV1CapabilitiesKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoEncodeAV1CapabilitiesKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEncodeAV1QualityLevelPropertiesKHR ) == sizeof( VkVideoEncodeAV1QualityLevelPropertiesKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoEncodeAV1QualityLevelPropertiesKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEncodeAV1SessionCreateInfoKHR ) == sizeof( VkVideoEncodeAV1SessionCreateInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoEncodeAV1SessionCreateInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEncodeAV1SessionParametersCreateInfoKHR ) == sizeof( VkVideoEncodeAV1SessionParametersCreateInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoEncodeAV1SessionParametersCreateInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEncodeAV1PictureInfoKHR ) == sizeof( VkVideoEncodeAV1PictureInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoEncodeAV1PictureInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEncodeAV1DpbSlotInfoKHR ) == sizeof( VkVideoEncodeAV1DpbSlotInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoEncodeAV1DpbSlotInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEncodeAV1ProfileInfoKHR ) == sizeof( VkVideoEncodeAV1ProfileInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoEncodeAV1ProfileInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEncodeAV1QIndexKHR ) == sizeof( VkVideoEncodeAV1QIndexKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoEncodeAV1QIndexKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEncodeAV1FrameSizeKHR ) == sizeof( VkVideoEncodeAV1FrameSizeKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoEncodeAV1FrameSizeKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEncodeAV1GopRemainingFrameInfoKHR ) == sizeof( VkVideoEncodeAV1GopRemainingFrameInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoEncodeAV1GopRemainingFrameInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEncodeAV1RateControlInfoKHR ) == sizeof( VkVideoEncodeAV1RateControlInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoEncodeAV1RateControlInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEncodeAV1RateControlLayerInfoKHR ) == sizeof( VkVideoEncodeAV1RateControlLayerInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoEncodeAV1RateControlLayerInfoKHR is not nothrow_move_constructible!" ); //=== VK_KHR_video_maintenance1 === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceVideoMaintenance1FeaturesKHR ) == sizeof( VkPhysicalDeviceVideoMaintenance1FeaturesKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceVideoMaintenance1FeaturesKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoInlineQueryInfoKHR ) == sizeof( VkVideoInlineQueryInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoInlineQueryInfoKHR is not nothrow_move_constructible!" ); //=== VK_NV_per_stage_descriptor_set === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDevicePerStageDescriptorSetFeaturesNV ) == sizeof( VkPhysicalDevicePerStageDescriptorSetFeaturesNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDevicePerStageDescriptorSetFeaturesNV is not nothrow_move_constructible!" ); //=== VK_QCOM_image_processing2 === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceImageProcessing2FeaturesQCOM ) == sizeof( VkPhysicalDeviceImageProcessing2FeaturesQCOM ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceImageProcessing2FeaturesQCOM is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceImageProcessing2PropertiesQCOM ) == sizeof( VkPhysicalDeviceImageProcessing2PropertiesQCOM ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceImageProcessing2PropertiesQCOM is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SamplerBlockMatchWindowCreateInfoQCOM ) == sizeof( VkSamplerBlockMatchWindowCreateInfoQCOM ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "SamplerBlockMatchWindowCreateInfoQCOM is not nothrow_move_constructible!" ); //=== VK_QCOM_filter_cubic_weights === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceCubicWeightsFeaturesQCOM ) == sizeof( VkPhysicalDeviceCubicWeightsFeaturesQCOM ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceCubicWeightsFeaturesQCOM is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SamplerCubicWeightsCreateInfoQCOM ) == sizeof( VkSamplerCubicWeightsCreateInfoQCOM ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "SamplerCubicWeightsCreateInfoQCOM is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::BlitImageCubicWeightsInfoQCOM ) == sizeof( VkBlitImageCubicWeightsInfoQCOM ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "BlitImageCubicWeightsInfoQCOM is not nothrow_move_constructible!" ); //=== VK_QCOM_ycbcr_degamma === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceYcbcrDegammaFeaturesQCOM ) == sizeof( VkPhysicalDeviceYcbcrDegammaFeaturesQCOM ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceYcbcrDegammaFeaturesQCOM is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM ) == sizeof( VkSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "SamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM is not nothrow_move_constructible!" ); //=== VK_QCOM_filter_cubic_clamp === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceCubicClampFeaturesQCOM ) == sizeof( VkPhysicalDeviceCubicClampFeaturesQCOM ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceCubicClampFeaturesQCOM is not nothrow_move_constructible!" ); //=== VK_EXT_attachment_feedback_loop_dynamic_state === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT ) == sizeof( VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT is not nothrow_move_constructible!" ); #if defined( VK_USE_PLATFORM_SCREEN_QNX ) //=== VK_QNX_external_memory_screen_buffer === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ScreenBufferPropertiesQNX ) == sizeof( VkScreenBufferPropertiesQNX ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ScreenBufferPropertiesQNX is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ScreenBufferFormatPropertiesQNX ) == sizeof( VkScreenBufferFormatPropertiesQNX ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ScreenBufferFormatPropertiesQNX is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImportScreenBufferInfoQNX ) == sizeof( VkImportScreenBufferInfoQNX ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ImportScreenBufferInfoQNX is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ExternalFormatQNX ) == sizeof( VkExternalFormatQNX ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ExternalFormatQNX is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceExternalMemoryScreenBufferFeaturesQNX ) == sizeof( VkPhysicalDeviceExternalMemoryScreenBufferFeaturesQNX ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceExternalMemoryScreenBufferFeaturesQNX is not nothrow_move_constructible!" ); #endif /*VK_USE_PLATFORM_SCREEN_QNX*/ //=== VK_MSFT_layered_driver === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceLayeredDriverPropertiesMSFT ) == sizeof( VkPhysicalDeviceLayeredDriverPropertiesMSFT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceLayeredDriverPropertiesMSFT is not nothrow_move_constructible!" ); //=== VK_KHR_calibrated_timestamps === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::CalibratedTimestampInfoKHR ) == sizeof( VkCalibratedTimestampInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "CalibratedTimestampInfoKHR is not nothrow_move_constructible!" ); //=== VK_KHR_maintenance6 === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::SetDescriptorBufferOffsetsInfoEXT ) == sizeof( VkSetDescriptorBufferOffsetsInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "SetDescriptorBufferOffsetsInfoEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::BindDescriptorBufferEmbeddedSamplersInfoEXT ) == sizeof( VkBindDescriptorBufferEmbeddedSamplersInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "BindDescriptorBufferEmbeddedSamplersInfoEXT is not nothrow_move_constructible!" ); //=== VK_NV_descriptor_pool_overallocation === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceDescriptorPoolOverallocationFeaturesNV ) == sizeof( VkPhysicalDeviceDescriptorPoolOverallocationFeaturesNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceDescriptorPoolOverallocationFeaturesNV is not nothrow_move_constructible!" ); //=== VK_NV_display_stereo === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DisplaySurfaceStereoCreateInfoNV ) == sizeof( VkDisplaySurfaceStereoCreateInfoNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DisplaySurfaceStereoCreateInfoNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DisplayModeStereoPropertiesNV ) == sizeof( VkDisplayModeStereoPropertiesNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DisplayModeStereoPropertiesNV is not nothrow_move_constructible!" ); //=== VK_KHR_video_encode_quantization_map === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEncodeQuantizationMapCapabilitiesKHR ) == sizeof( VkVideoEncodeQuantizationMapCapabilitiesKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoEncodeQuantizationMapCapabilitiesKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoFormatQuantizationMapPropertiesKHR ) == sizeof( VkVideoFormatQuantizationMapPropertiesKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoFormatQuantizationMapPropertiesKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEncodeQuantizationMapInfoKHR ) == sizeof( VkVideoEncodeQuantizationMapInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoEncodeQuantizationMapInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEncodeQuantizationMapSessionParametersCreateInfoKHR ) == sizeof( VkVideoEncodeQuantizationMapSessionParametersCreateInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoEncodeQuantizationMapSessionParametersCreateInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR ) == sizeof( VkPhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEncodeH264QuantizationMapCapabilitiesKHR ) == sizeof( VkVideoEncodeH264QuantizationMapCapabilitiesKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoEncodeH264QuantizationMapCapabilitiesKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEncodeH265QuantizationMapCapabilitiesKHR ) == sizeof( VkVideoEncodeH265QuantizationMapCapabilitiesKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoEncodeH265QuantizationMapCapabilitiesKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoFormatH265QuantizationMapPropertiesKHR ) == sizeof( VkVideoFormatH265QuantizationMapPropertiesKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoFormatH265QuantizationMapPropertiesKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoEncodeAV1QuantizationMapCapabilitiesKHR ) == sizeof( VkVideoEncodeAV1QuantizationMapCapabilitiesKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoEncodeAV1QuantizationMapCapabilitiesKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoFormatAV1QuantizationMapPropertiesKHR ) == sizeof( VkVideoFormatAV1QuantizationMapPropertiesKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoFormatAV1QuantizationMapPropertiesKHR is not nothrow_move_constructible!" ); //=== VK_NV_raw_access_chains === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceRawAccessChainsFeaturesNV ) == sizeof( VkPhysicalDeviceRawAccessChainsFeaturesNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceRawAccessChainsFeaturesNV is not nothrow_move_constructible!" ); //=== VK_KHR_shader_relaxed_extended_instruction === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR ) == sizeof( VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR is not nothrow_move_constructible!" ); //=== VK_NV_command_buffer_inheritance === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceCommandBufferInheritanceFeaturesNV ) == sizeof( VkPhysicalDeviceCommandBufferInheritanceFeaturesNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceCommandBufferInheritanceFeaturesNV is not nothrow_move_constructible!" ); //=== VK_KHR_maintenance7 === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceMaintenance7FeaturesKHR ) == sizeof( VkPhysicalDeviceMaintenance7FeaturesKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceMaintenance7FeaturesKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceMaintenance7PropertiesKHR ) == sizeof( VkPhysicalDeviceMaintenance7PropertiesKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceMaintenance7PropertiesKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceLayeredApiPropertiesListKHR ) == sizeof( VkPhysicalDeviceLayeredApiPropertiesListKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceLayeredApiPropertiesListKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceLayeredApiPropertiesKHR ) == sizeof( VkPhysicalDeviceLayeredApiPropertiesKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceLayeredApiPropertiesKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceLayeredApiVulkanPropertiesKHR ) == sizeof( VkPhysicalDeviceLayeredApiVulkanPropertiesKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceLayeredApiVulkanPropertiesKHR is not nothrow_move_constructible!" ); //=== VK_NV_shader_atomic_float16_vector === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderAtomicFloat16VectorFeaturesNV ) == sizeof( VkPhysicalDeviceShaderAtomicFloat16VectorFeaturesNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceShaderAtomicFloat16VectorFeaturesNV is not nothrow_move_constructible!" ); //=== VK_EXT_shader_replicated_composites === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceShaderReplicatedCompositesFeaturesEXT ) == sizeof( VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceShaderReplicatedCompositesFeaturesEXT is not nothrow_move_constructible!" ); //=== VK_NV_ray_tracing_validation === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceRayTracingValidationFeaturesNV ) == sizeof( VkPhysicalDeviceRayTracingValidationFeaturesNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceRayTracingValidationFeaturesNV is not nothrow_move_constructible!" ); //=== VK_NV_cluster_acceleration_structure === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceClusterAccelerationStructureFeaturesNV ) == sizeof( VkPhysicalDeviceClusterAccelerationStructureFeaturesNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceClusterAccelerationStructureFeaturesNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceClusterAccelerationStructurePropertiesNV ) == sizeof( VkPhysicalDeviceClusterAccelerationStructurePropertiesNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceClusterAccelerationStructurePropertiesNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ClusterAccelerationStructureClustersBottomLevelInputNV ) == sizeof( VkClusterAccelerationStructureClustersBottomLevelInputNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ClusterAccelerationStructureClustersBottomLevelInputNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ClusterAccelerationStructureTriangleClusterInputNV ) == sizeof( VkClusterAccelerationStructureTriangleClusterInputNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ClusterAccelerationStructureTriangleClusterInputNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ClusterAccelerationStructureMoveObjectsInputNV ) == sizeof( VkClusterAccelerationStructureMoveObjectsInputNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ClusterAccelerationStructureMoveObjectsInputNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ClusterAccelerationStructureOpInputNV ) == sizeof( VkClusterAccelerationStructureOpInputNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ClusterAccelerationStructureOpInputNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ClusterAccelerationStructureInputInfoNV ) == sizeof( VkClusterAccelerationStructureInputInfoNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ClusterAccelerationStructureInputInfoNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ClusterAccelerationStructureCommandsInfoNV ) == sizeof( VkClusterAccelerationStructureCommandsInfoNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ClusterAccelerationStructureCommandsInfoNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::StridedDeviceAddressNV ) == sizeof( VkStridedDeviceAddressNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "StridedDeviceAddressNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ClusterAccelerationStructureGeometryIndexAndGeometryFlagsNV ) == sizeof( VkClusterAccelerationStructureGeometryIndexAndGeometryFlagsNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ClusterAccelerationStructureGeometryIndexAndGeometryFlagsNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ClusterAccelerationStructureMoveObjectsInfoNV ) == sizeof( VkClusterAccelerationStructureMoveObjectsInfoNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ClusterAccelerationStructureMoveObjectsInfoNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ClusterAccelerationStructureBuildClustersBottomLevelInfoNV ) == sizeof( VkClusterAccelerationStructureBuildClustersBottomLevelInfoNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ClusterAccelerationStructureBuildClustersBottomLevelInfoNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ClusterAccelerationStructureBuildTriangleClusterInfoNV ) == sizeof( VkClusterAccelerationStructureBuildTriangleClusterInfoNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ClusterAccelerationStructureBuildTriangleClusterInfoNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ClusterAccelerationStructureBuildTriangleClusterTemplateInfoNV ) == sizeof( VkClusterAccelerationStructureBuildTriangleClusterTemplateInfoNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ClusterAccelerationStructureBuildTriangleClusterTemplateInfoNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ClusterAccelerationStructureInstantiateClusterInfoNV ) == sizeof( VkClusterAccelerationStructureInstantiateClusterInfoNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ClusterAccelerationStructureInstantiateClusterInfoNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::RayTracingPipelineClusterAccelerationStructureCreateInfoNV ) == sizeof( VkRayTracingPipelineClusterAccelerationStructureCreateInfoNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "RayTracingPipelineClusterAccelerationStructureCreateInfoNV is not nothrow_move_constructible!" ); //=== VK_NV_partitioned_acceleration_structure === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDevicePartitionedAccelerationStructureFeaturesNV ) == sizeof( VkPhysicalDevicePartitionedAccelerationStructureFeaturesNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDevicePartitionedAccelerationStructureFeaturesNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDevicePartitionedAccelerationStructurePropertiesNV ) == sizeof( VkPhysicalDevicePartitionedAccelerationStructurePropertiesNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDevicePartitionedAccelerationStructurePropertiesNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PartitionedAccelerationStructureFlagsNV ) == sizeof( VkPartitionedAccelerationStructureFlagsNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PartitionedAccelerationStructureFlagsNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::BuildPartitionedAccelerationStructureIndirectCommandNV ) == sizeof( VkBuildPartitionedAccelerationStructureIndirectCommandNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "BuildPartitionedAccelerationStructureIndirectCommandNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PartitionedAccelerationStructureWriteInstanceDataNV ) == sizeof( VkPartitionedAccelerationStructureWriteInstanceDataNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PartitionedAccelerationStructureWriteInstanceDataNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PartitionedAccelerationStructureUpdateInstanceDataNV ) == sizeof( VkPartitionedAccelerationStructureUpdateInstanceDataNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PartitionedAccelerationStructureUpdateInstanceDataNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PartitionedAccelerationStructureWritePartitionTranslationDataNV ) == sizeof( VkPartitionedAccelerationStructureWritePartitionTranslationDataNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PartitionedAccelerationStructureWritePartitionTranslationDataNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::WriteDescriptorSetPartitionedAccelerationStructureNV ) == sizeof( VkWriteDescriptorSetPartitionedAccelerationStructureNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "WriteDescriptorSetPartitionedAccelerationStructureNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PartitionedAccelerationStructureInstancesInputNV ) == sizeof( VkPartitionedAccelerationStructureInstancesInputNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PartitionedAccelerationStructureInstancesInputNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::BuildPartitionedAccelerationStructureInfoNV ) == sizeof( VkBuildPartitionedAccelerationStructureInfoNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "BuildPartitionedAccelerationStructureInfoNV is not nothrow_move_constructible!" ); //=== VK_EXT_device_generated_commands === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceDeviceGeneratedCommandsFeaturesEXT ) == sizeof( VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceDeviceGeneratedCommandsFeaturesEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceDeviceGeneratedCommandsPropertiesEXT ) == sizeof( VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceDeviceGeneratedCommandsPropertiesEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::GeneratedCommandsMemoryRequirementsInfoEXT ) == sizeof( VkGeneratedCommandsMemoryRequirementsInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "GeneratedCommandsMemoryRequirementsInfoEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::IndirectExecutionSetCreateInfoEXT ) == sizeof( VkIndirectExecutionSetCreateInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "IndirectExecutionSetCreateInfoEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::IndirectExecutionSetInfoEXT ) == sizeof( VkIndirectExecutionSetInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "IndirectExecutionSetInfoEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::IndirectExecutionSetPipelineInfoEXT ) == sizeof( VkIndirectExecutionSetPipelineInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "IndirectExecutionSetPipelineInfoEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::IndirectExecutionSetShaderInfoEXT ) == sizeof( VkIndirectExecutionSetShaderInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "IndirectExecutionSetShaderInfoEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::GeneratedCommandsInfoEXT ) == sizeof( VkGeneratedCommandsInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "GeneratedCommandsInfoEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::WriteIndirectExecutionSetPipelineEXT ) == sizeof( VkWriteIndirectExecutionSetPipelineEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "WriteIndirectExecutionSetPipelineEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutCreateInfoEXT ) == sizeof( VkIndirectCommandsLayoutCreateInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "IndirectCommandsLayoutCreateInfoEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutTokenEXT ) == sizeof( VkIndirectCommandsLayoutTokenEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "IndirectCommandsLayoutTokenEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DrawIndirectCountIndirectCommandEXT ) == sizeof( VkDrawIndirectCountIndirectCommandEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DrawIndirectCountIndirectCommandEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::IndirectCommandsVertexBufferTokenEXT ) == sizeof( VkIndirectCommandsVertexBufferTokenEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "IndirectCommandsVertexBufferTokenEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::BindVertexBufferIndirectCommandEXT ) == sizeof( VkBindVertexBufferIndirectCommandEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "BindVertexBufferIndirectCommandEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::IndirectCommandsIndexBufferTokenEXT ) == sizeof( VkIndirectCommandsIndexBufferTokenEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "IndirectCommandsIndexBufferTokenEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::BindIndexBufferIndirectCommandEXT ) == sizeof( VkBindIndexBufferIndirectCommandEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "BindIndexBufferIndirectCommandEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::IndirectCommandsPushConstantTokenEXT ) == sizeof( VkIndirectCommandsPushConstantTokenEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "IndirectCommandsPushConstantTokenEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::IndirectCommandsExecutionSetTokenEXT ) == sizeof( VkIndirectCommandsExecutionSetTokenEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "IndirectCommandsExecutionSetTokenEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::IndirectCommandsTokenDataEXT ) == sizeof( VkIndirectCommandsTokenDataEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "IndirectCommandsTokenDataEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutEXT ) == sizeof( VkIndirectCommandsLayoutEXT ), "handle and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_copy_constructible::value, "IndirectCommandsLayoutEXT is not copy_constructible!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "IndirectCommandsLayoutEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::IndirectExecutionSetEXT ) == sizeof( VkIndirectExecutionSetEXT ), "handle and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_copy_constructible::value, "IndirectExecutionSetEXT is not copy_constructible!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "IndirectExecutionSetEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::IndirectExecutionSetShaderLayoutInfoEXT ) == sizeof( VkIndirectExecutionSetShaderLayoutInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "IndirectExecutionSetShaderLayoutInfoEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::GeneratedCommandsPipelineInfoEXT ) == sizeof( VkGeneratedCommandsPipelineInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "GeneratedCommandsPipelineInfoEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::GeneratedCommandsShaderInfoEXT ) == sizeof( VkGeneratedCommandsShaderInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "GeneratedCommandsShaderInfoEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::WriteIndirectExecutionSetShaderEXT ) == sizeof( VkWriteIndirectExecutionSetShaderEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "WriteIndirectExecutionSetShaderEXT is not nothrow_move_constructible!" ); //=== VK_KHR_maintenance8 === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceMaintenance8FeaturesKHR ) == sizeof( VkPhysicalDeviceMaintenance8FeaturesKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceMaintenance8FeaturesKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::MemoryBarrierAccessFlags3KHR ) == sizeof( VkMemoryBarrierAccessFlags3KHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "MemoryBarrierAccessFlags3KHR is not nothrow_move_constructible!" ); //=== VK_MESA_image_alignment_control === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceImageAlignmentControlFeaturesMESA ) == sizeof( VkPhysicalDeviceImageAlignmentControlFeaturesMESA ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceImageAlignmentControlFeaturesMESA is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceImageAlignmentControlPropertiesMESA ) == sizeof( VkPhysicalDeviceImageAlignmentControlPropertiesMESA ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceImageAlignmentControlPropertiesMESA is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImageAlignmentControlCreateInfoMESA ) == sizeof( VkImageAlignmentControlCreateInfoMESA ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ImageAlignmentControlCreateInfoMESA is not nothrow_move_constructible!" ); //=== VK_EXT_depth_clamp_control === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceDepthClampControlFeaturesEXT ) == sizeof( VkPhysicalDeviceDepthClampControlFeaturesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceDepthClampControlFeaturesEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PipelineViewportDepthClampControlCreateInfoEXT ) == sizeof( VkPipelineViewportDepthClampControlCreateInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PipelineViewportDepthClampControlCreateInfoEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::DepthClampRangeEXT ) == sizeof( VkDepthClampRangeEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "DepthClampRangeEXT is not nothrow_move_constructible!" ); //=== VK_KHR_video_maintenance2 === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceVideoMaintenance2FeaturesKHR ) == sizeof( VkPhysicalDeviceVideoMaintenance2FeaturesKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceVideoMaintenance2FeaturesKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoDecodeH264InlineSessionParametersInfoKHR ) == sizeof( VkVideoDecodeH264InlineSessionParametersInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoDecodeH264InlineSessionParametersInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoDecodeH265InlineSessionParametersInfoKHR ) == sizeof( VkVideoDecodeH265InlineSessionParametersInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoDecodeH265InlineSessionParametersInfoKHR is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::VideoDecodeAV1InlineSessionParametersInfoKHR ) == sizeof( VkVideoDecodeAV1InlineSessionParametersInfoKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "VideoDecodeAV1InlineSessionParametersInfoKHR is not nothrow_move_constructible!" ); //=== VK_HUAWEI_hdr_vivid === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceHdrVividFeaturesHUAWEI ) == sizeof( VkPhysicalDeviceHdrVividFeaturesHUAWEI ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceHdrVividFeaturesHUAWEI is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::HdrVividDynamicMetadataHUAWEI ) == sizeof( VkHdrVividDynamicMetadataHUAWEI ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "HdrVividDynamicMetadataHUAWEI is not nothrow_move_constructible!" ); //=== VK_NV_cooperative_matrix2 === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::CooperativeMatrixFlexibleDimensionsPropertiesNV ) == sizeof( VkCooperativeMatrixFlexibleDimensionsPropertiesNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "CooperativeMatrixFlexibleDimensionsPropertiesNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceCooperativeMatrix2FeaturesNV ) == sizeof( VkPhysicalDeviceCooperativeMatrix2FeaturesNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceCooperativeMatrix2FeaturesNV is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceCooperativeMatrix2PropertiesNV ) == sizeof( VkPhysicalDeviceCooperativeMatrix2PropertiesNV ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceCooperativeMatrix2PropertiesNV is not nothrow_move_constructible!" ); //=== VK_ARM_pipeline_opacity_micromap === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDevicePipelineOpacityMicromapFeaturesARM ) == sizeof( VkPhysicalDevicePipelineOpacityMicromapFeaturesARM ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDevicePipelineOpacityMicromapFeaturesARM is not nothrow_move_constructible!" ); #if defined( VK_USE_PLATFORM_METAL_EXT ) //=== VK_EXT_external_memory_metal === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::ImportMemoryMetalHandleInfoEXT ) == sizeof( VkImportMemoryMetalHandleInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "ImportMemoryMetalHandleInfoEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::MemoryMetalHandlePropertiesEXT ) == sizeof( VkMemoryMetalHandlePropertiesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "MemoryMetalHandlePropertiesEXT is not nothrow_move_constructible!" ); VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::MemoryGetMetalHandleInfoEXT ) == sizeof( VkMemoryGetMetalHandleInfoEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "MemoryGetMetalHandleInfoEXT is not nothrow_move_constructible!" ); #endif /*VK_USE_PLATFORM_METAL_EXT*/ //=== VK_KHR_depth_clamp_zero_one === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceDepthClampZeroOneFeaturesKHR ) == sizeof( VkPhysicalDeviceDepthClampZeroOneFeaturesKHR ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceDepthClampZeroOneFeaturesKHR is not nothrow_move_constructible!" ); //=== VK_EXT_vertex_attribute_robustness === VULKAN_HPP_STATIC_ASSERT( sizeof( VULKAN_HPP_NAMESPACE::PhysicalDeviceVertexAttributeRobustnessFeaturesEXT ) == sizeof( VkPhysicalDeviceVertexAttributeRobustnessFeaturesEXT ), "struct and wrapper have different size!" ); VULKAN_HPP_STATIC_ASSERT( std::is_standard_layout::value, "struct wrapper is not a standard layout!" ); VULKAN_HPP_STATIC_ASSERT( std::is_nothrow_move_constructible::value, "PhysicalDeviceVertexAttributeRobustnessFeaturesEXT is not nothrow_move_constructible!" ); #endif ================================================ FILE: src/libraries/vulkanheaders/vulkan_structs.hpp ================================================ // Copyright 2015-2025 The Khronos Group Inc. // // SPDX-License-Identifier: Apache-2.0 OR MIT // // This header is generated from the Khronos Vulkan XML API Registry. #ifndef VULKAN_STRUCTS_HPP #define VULKAN_STRUCTS_HPP // include-what-you-use: make sure, vulkan.hpp is used by code-completers // IWYU pragma: private; include "vulkan.hpp" #include // strcmp namespace VULKAN_HPP_NAMESPACE { //=============== //=== STRUCTS === //=============== struct AabbPositionsKHR { using NativeType = VkAabbPositionsKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR AabbPositionsKHR( float minX_ = {}, float minY_ = {}, float minZ_ = {}, float maxX_ = {}, float maxY_ = {}, float maxZ_ = {} ) VULKAN_HPP_NOEXCEPT : minX{ minX_ } , minY{ minY_ } , minZ{ minZ_ } , maxX{ maxX_ } , maxY{ maxY_ } , maxZ{ maxZ_ } { } VULKAN_HPP_CONSTEXPR AabbPositionsKHR( AabbPositionsKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; AabbPositionsKHR( VkAabbPositionsKHR const & rhs ) VULKAN_HPP_NOEXCEPT : AabbPositionsKHR( *reinterpret_cast( &rhs ) ) {} AabbPositionsKHR & operator=( AabbPositionsKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ AabbPositionsKHR & operator=( VkAabbPositionsKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 AabbPositionsKHR & setMinX( float minX_ ) VULKAN_HPP_NOEXCEPT { minX = minX_; return *this; } VULKAN_HPP_CONSTEXPR_14 AabbPositionsKHR & setMinY( float minY_ ) VULKAN_HPP_NOEXCEPT { minY = minY_; return *this; } VULKAN_HPP_CONSTEXPR_14 AabbPositionsKHR & setMinZ( float minZ_ ) VULKAN_HPP_NOEXCEPT { minZ = minZ_; return *this; } VULKAN_HPP_CONSTEXPR_14 AabbPositionsKHR & setMaxX( float maxX_ ) VULKAN_HPP_NOEXCEPT { maxX = maxX_; return *this; } VULKAN_HPP_CONSTEXPR_14 AabbPositionsKHR & setMaxY( float maxY_ ) VULKAN_HPP_NOEXCEPT { maxY = maxY_; return *this; } VULKAN_HPP_CONSTEXPR_14 AabbPositionsKHR & setMaxZ( float maxZ_ ) VULKAN_HPP_NOEXCEPT { maxZ = maxZ_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkAabbPositionsKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkAabbPositionsKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( minX, minY, minZ, maxX, maxY, maxZ ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( AabbPositionsKHR const & ) const = default; #else bool operator==( AabbPositionsKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( minX == rhs.minX ) && ( minY == rhs.minY ) && ( minZ == rhs.minZ ) && ( maxX == rhs.maxX ) && ( maxY == rhs.maxY ) && ( maxZ == rhs.maxZ ); # endif } bool operator!=( AabbPositionsKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: float minX = {}; float minY = {}; float minZ = {}; float maxX = {}; float maxY = {}; float maxZ = {}; }; using AabbPositionsNV = AabbPositionsKHR; union DeviceOrHostAddressConstKHR { using NativeType = VkDeviceOrHostAddressConstKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_UNION_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 DeviceOrHostAddressConstKHR( VULKAN_HPP_NAMESPACE::DeviceAddress deviceAddress_ = {} ) : deviceAddress( deviceAddress_ ) {} VULKAN_HPP_CONSTEXPR_14 DeviceOrHostAddressConstKHR( const void * hostAddress_ ) : hostAddress( hostAddress_ ) {} #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_UNION_SETTERS ) VULKAN_HPP_CONSTEXPR_14 DeviceOrHostAddressConstKHR & setDeviceAddress( VULKAN_HPP_NAMESPACE::DeviceAddress deviceAddress_ ) VULKAN_HPP_NOEXCEPT { deviceAddress = deviceAddress_; return *this; } VULKAN_HPP_CONSTEXPR_14 DeviceOrHostAddressConstKHR & setHostAddress( const void * hostAddress_ ) VULKAN_HPP_NOEXCEPT { hostAddress = hostAddress_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkDeviceOrHostAddressConstKHR const &() const { return *reinterpret_cast( this ); } operator VkDeviceOrHostAddressConstKHR &() { return *reinterpret_cast( this ); } #ifdef VULKAN_HPP_HAS_UNRESTRICTED_UNIONS VULKAN_HPP_NAMESPACE::DeviceAddress deviceAddress; const void * hostAddress; #else VkDeviceAddress deviceAddress; const void * hostAddress; #endif /*VULKAN_HPP_HAS_UNRESTRICTED_UNIONS*/ }; struct AccelerationStructureGeometryTrianglesDataKHR { using NativeType = VkAccelerationStructureGeometryTrianglesDataKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eAccelerationStructureGeometryTrianglesDataKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometryTrianglesDataKHR( VULKAN_HPP_NAMESPACE::Format vertexFormat_ = VULKAN_HPP_NAMESPACE::Format::eUndefined, VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR vertexData_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize vertexStride_ = {}, uint32_t maxVertex_ = {}, VULKAN_HPP_NAMESPACE::IndexType indexType_ = VULKAN_HPP_NAMESPACE::IndexType::eUint16, VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR indexData_ = {}, VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR transformData_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , vertexFormat{ vertexFormat_ } , vertexData{ vertexData_ } , vertexStride{ vertexStride_ } , maxVertex{ maxVertex_ } , indexType{ indexType_ } , indexData{ indexData_ } , transformData{ transformData_ } { } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometryTrianglesDataKHR( AccelerationStructureGeometryTrianglesDataKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; AccelerationStructureGeometryTrianglesDataKHR( VkAccelerationStructureGeometryTrianglesDataKHR const & rhs ) VULKAN_HPP_NOEXCEPT : AccelerationStructureGeometryTrianglesDataKHR( *reinterpret_cast( &rhs ) ) { } AccelerationStructureGeometryTrianglesDataKHR & operator=( AccelerationStructureGeometryTrianglesDataKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ AccelerationStructureGeometryTrianglesDataKHR & operator=( VkAccelerationStructureGeometryTrianglesDataKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometryTrianglesDataKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometryTrianglesDataKHR & setVertexFormat( VULKAN_HPP_NAMESPACE::Format vertexFormat_ ) VULKAN_HPP_NOEXCEPT { vertexFormat = vertexFormat_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometryTrianglesDataKHR & setVertexData( VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR const & vertexData_ ) VULKAN_HPP_NOEXCEPT { vertexData = vertexData_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometryTrianglesDataKHR & setVertexStride( VULKAN_HPP_NAMESPACE::DeviceSize vertexStride_ ) VULKAN_HPP_NOEXCEPT { vertexStride = vertexStride_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometryTrianglesDataKHR & setMaxVertex( uint32_t maxVertex_ ) VULKAN_HPP_NOEXCEPT { maxVertex = maxVertex_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometryTrianglesDataKHR & setIndexType( VULKAN_HPP_NAMESPACE::IndexType indexType_ ) VULKAN_HPP_NOEXCEPT { indexType = indexType_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometryTrianglesDataKHR & setIndexData( VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR const & indexData_ ) VULKAN_HPP_NOEXCEPT { indexData = indexData_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometryTrianglesDataKHR & setTransformData( VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR const & transformData_ ) VULKAN_HPP_NOEXCEPT { transformData = transformData_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkAccelerationStructureGeometryTrianglesDataKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkAccelerationStructureGeometryTrianglesDataKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, vertexFormat, vertexData, vertexStride, maxVertex, indexType, indexData, transformData ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eAccelerationStructureGeometryTrianglesDataKHR; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Format vertexFormat = VULKAN_HPP_NAMESPACE::Format::eUndefined; VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR vertexData = {}; VULKAN_HPP_NAMESPACE::DeviceSize vertexStride = {}; uint32_t maxVertex = {}; VULKAN_HPP_NAMESPACE::IndexType indexType = VULKAN_HPP_NAMESPACE::IndexType::eUint16; VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR indexData = {}; VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR transformData = {}; }; template <> struct CppType { using Type = AccelerationStructureGeometryTrianglesDataKHR; }; struct AccelerationStructureGeometryAabbsDataKHR { using NativeType = VkAccelerationStructureGeometryAabbsDataKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eAccelerationStructureGeometryAabbsDataKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometryAabbsDataKHR( VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR data_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize stride_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , data{ data_ } , stride{ stride_ } { } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometryAabbsDataKHR( AccelerationStructureGeometryAabbsDataKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; AccelerationStructureGeometryAabbsDataKHR( VkAccelerationStructureGeometryAabbsDataKHR const & rhs ) VULKAN_HPP_NOEXCEPT : AccelerationStructureGeometryAabbsDataKHR( *reinterpret_cast( &rhs ) ) { } AccelerationStructureGeometryAabbsDataKHR & operator=( AccelerationStructureGeometryAabbsDataKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ AccelerationStructureGeometryAabbsDataKHR & operator=( VkAccelerationStructureGeometryAabbsDataKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometryAabbsDataKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometryAabbsDataKHR & setData( VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR const & data_ ) VULKAN_HPP_NOEXCEPT { data = data_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometryAabbsDataKHR & setStride( VULKAN_HPP_NAMESPACE::DeviceSize stride_ ) VULKAN_HPP_NOEXCEPT { stride = stride_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkAccelerationStructureGeometryAabbsDataKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkAccelerationStructureGeometryAabbsDataKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, data, stride ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eAccelerationStructureGeometryAabbsDataKHR; const void * pNext = {}; VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR data = {}; VULKAN_HPP_NAMESPACE::DeviceSize stride = {}; }; template <> struct CppType { using Type = AccelerationStructureGeometryAabbsDataKHR; }; struct AccelerationStructureGeometryInstancesDataKHR { using NativeType = VkAccelerationStructureGeometryInstancesDataKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eAccelerationStructureGeometryInstancesDataKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometryInstancesDataKHR( VULKAN_HPP_NAMESPACE::Bool32 arrayOfPointers_ = {}, VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR data_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , arrayOfPointers{ arrayOfPointers_ } , data{ data_ } { } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometryInstancesDataKHR( AccelerationStructureGeometryInstancesDataKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; AccelerationStructureGeometryInstancesDataKHR( VkAccelerationStructureGeometryInstancesDataKHR const & rhs ) VULKAN_HPP_NOEXCEPT : AccelerationStructureGeometryInstancesDataKHR( *reinterpret_cast( &rhs ) ) { } AccelerationStructureGeometryInstancesDataKHR & operator=( AccelerationStructureGeometryInstancesDataKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ AccelerationStructureGeometryInstancesDataKHR & operator=( VkAccelerationStructureGeometryInstancesDataKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometryInstancesDataKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometryInstancesDataKHR & setArrayOfPointers( VULKAN_HPP_NAMESPACE::Bool32 arrayOfPointers_ ) VULKAN_HPP_NOEXCEPT { arrayOfPointers = arrayOfPointers_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometryInstancesDataKHR & setData( VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR const & data_ ) VULKAN_HPP_NOEXCEPT { data = data_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkAccelerationStructureGeometryInstancesDataKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkAccelerationStructureGeometryInstancesDataKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, arrayOfPointers, data ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eAccelerationStructureGeometryInstancesDataKHR; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 arrayOfPointers = {}; VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR data = {}; }; template <> struct CppType { using Type = AccelerationStructureGeometryInstancesDataKHR; }; union AccelerationStructureGeometryDataKHR { using NativeType = VkAccelerationStructureGeometryDataKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_UNION_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometryDataKHR( VULKAN_HPP_NAMESPACE::AccelerationStructureGeometryTrianglesDataKHR triangles_ = {} ) : triangles( triangles_ ) { } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometryDataKHR( VULKAN_HPP_NAMESPACE::AccelerationStructureGeometryAabbsDataKHR aabbs_ ) : aabbs( aabbs_ ) {} VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometryDataKHR( VULKAN_HPP_NAMESPACE::AccelerationStructureGeometryInstancesDataKHR instances_ ) : instances( instances_ ) { } #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_UNION_SETTERS ) VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometryDataKHR & setTriangles( VULKAN_HPP_NAMESPACE::AccelerationStructureGeometryTrianglesDataKHR const & triangles_ ) VULKAN_HPP_NOEXCEPT { triangles = triangles_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometryDataKHR & setAabbs( VULKAN_HPP_NAMESPACE::AccelerationStructureGeometryAabbsDataKHR const & aabbs_ ) VULKAN_HPP_NOEXCEPT { aabbs = aabbs_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometryDataKHR & setInstances( VULKAN_HPP_NAMESPACE::AccelerationStructureGeometryInstancesDataKHR const & instances_ ) VULKAN_HPP_NOEXCEPT { instances = instances_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkAccelerationStructureGeometryDataKHR const &() const { return *reinterpret_cast( this ); } operator VkAccelerationStructureGeometryDataKHR &() { return *reinterpret_cast( this ); } #ifdef VULKAN_HPP_HAS_UNRESTRICTED_UNIONS VULKAN_HPP_NAMESPACE::AccelerationStructureGeometryTrianglesDataKHR triangles; VULKAN_HPP_NAMESPACE::AccelerationStructureGeometryAabbsDataKHR aabbs; VULKAN_HPP_NAMESPACE::AccelerationStructureGeometryInstancesDataKHR instances; #else VkAccelerationStructureGeometryTrianglesDataKHR triangles; VkAccelerationStructureGeometryAabbsDataKHR aabbs; VkAccelerationStructureGeometryInstancesDataKHR instances; #endif /*VULKAN_HPP_HAS_UNRESTRICTED_UNIONS*/ }; struct AccelerationStructureGeometryKHR { using NativeType = VkAccelerationStructureGeometryKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eAccelerationStructureGeometryKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometryKHR( VULKAN_HPP_NAMESPACE::GeometryTypeKHR geometryType_ = VULKAN_HPP_NAMESPACE::GeometryTypeKHR::eTriangles, VULKAN_HPP_NAMESPACE::AccelerationStructureGeometryDataKHR geometry_ = {}, VULKAN_HPP_NAMESPACE::GeometryFlagsKHR flags_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , geometryType{ geometryType_ } , geometry{ geometry_ } , flags{ flags_ } { } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometryKHR( AccelerationStructureGeometryKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; AccelerationStructureGeometryKHR( VkAccelerationStructureGeometryKHR const & rhs ) VULKAN_HPP_NOEXCEPT : AccelerationStructureGeometryKHR( *reinterpret_cast( &rhs ) ) { } AccelerationStructureGeometryKHR & operator=( AccelerationStructureGeometryKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ AccelerationStructureGeometryKHR & operator=( VkAccelerationStructureGeometryKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometryKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometryKHR & setGeometryType( VULKAN_HPP_NAMESPACE::GeometryTypeKHR geometryType_ ) VULKAN_HPP_NOEXCEPT { geometryType = geometryType_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometryKHR & setGeometry( VULKAN_HPP_NAMESPACE::AccelerationStructureGeometryDataKHR const & geometry_ ) VULKAN_HPP_NOEXCEPT { geometry = geometry_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometryKHR & setFlags( VULKAN_HPP_NAMESPACE::GeometryFlagsKHR flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkAccelerationStructureGeometryKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkAccelerationStructureGeometryKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, geometryType, geometry, flags ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eAccelerationStructureGeometryKHR; const void * pNext = {}; VULKAN_HPP_NAMESPACE::GeometryTypeKHR geometryType = VULKAN_HPP_NAMESPACE::GeometryTypeKHR::eTriangles; VULKAN_HPP_NAMESPACE::AccelerationStructureGeometryDataKHR geometry = {}; VULKAN_HPP_NAMESPACE::GeometryFlagsKHR flags = {}; }; template <> struct CppType { using Type = AccelerationStructureGeometryKHR; }; union DeviceOrHostAddressKHR { using NativeType = VkDeviceOrHostAddressKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_UNION_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 DeviceOrHostAddressKHR( VULKAN_HPP_NAMESPACE::DeviceAddress deviceAddress_ = {} ) : deviceAddress( deviceAddress_ ) {} VULKAN_HPP_CONSTEXPR_14 DeviceOrHostAddressKHR( void * hostAddress_ ) : hostAddress( hostAddress_ ) {} #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_UNION_SETTERS ) VULKAN_HPP_CONSTEXPR_14 DeviceOrHostAddressKHR & setDeviceAddress( VULKAN_HPP_NAMESPACE::DeviceAddress deviceAddress_ ) VULKAN_HPP_NOEXCEPT { deviceAddress = deviceAddress_; return *this; } VULKAN_HPP_CONSTEXPR_14 DeviceOrHostAddressKHR & setHostAddress( void * hostAddress_ ) VULKAN_HPP_NOEXCEPT { hostAddress = hostAddress_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkDeviceOrHostAddressKHR const &() const { return *reinterpret_cast( this ); } operator VkDeviceOrHostAddressKHR &() { return *reinterpret_cast( this ); } #ifdef VULKAN_HPP_HAS_UNRESTRICTED_UNIONS VULKAN_HPP_NAMESPACE::DeviceAddress deviceAddress; void * hostAddress; #else VkDeviceAddress deviceAddress; void * hostAddress; #endif /*VULKAN_HPP_HAS_UNRESTRICTED_UNIONS*/ }; struct AccelerationStructureBuildGeometryInfoKHR { using NativeType = VkAccelerationStructureBuildGeometryInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eAccelerationStructureBuildGeometryInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 AccelerationStructureBuildGeometryInfoKHR( VULKAN_HPP_NAMESPACE::AccelerationStructureTypeKHR type_ = VULKAN_HPP_NAMESPACE::AccelerationStructureTypeKHR::eTopLevel, VULKAN_HPP_NAMESPACE::BuildAccelerationStructureFlagsKHR flags_ = {}, VULKAN_HPP_NAMESPACE::BuildAccelerationStructureModeKHR mode_ = VULKAN_HPP_NAMESPACE::BuildAccelerationStructureModeKHR::eBuild, VULKAN_HPP_NAMESPACE::AccelerationStructureKHR srcAccelerationStructure_ = {}, VULKAN_HPP_NAMESPACE::AccelerationStructureKHR dstAccelerationStructure_ = {}, uint32_t geometryCount_ = {}, const VULKAN_HPP_NAMESPACE::AccelerationStructureGeometryKHR * pGeometries_ = {}, const VULKAN_HPP_NAMESPACE::AccelerationStructureGeometryKHR * const * ppGeometries_ = {}, VULKAN_HPP_NAMESPACE::DeviceOrHostAddressKHR scratchData_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , type{ type_ } , flags{ flags_ } , mode{ mode_ } , srcAccelerationStructure{ srcAccelerationStructure_ } , dstAccelerationStructure{ dstAccelerationStructure_ } , geometryCount{ geometryCount_ } , pGeometries{ pGeometries_ } , ppGeometries{ ppGeometries_ } , scratchData{ scratchData_ } { } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureBuildGeometryInfoKHR( AccelerationStructureBuildGeometryInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; AccelerationStructureBuildGeometryInfoKHR( VkAccelerationStructureBuildGeometryInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : AccelerationStructureBuildGeometryInfoKHR( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) AccelerationStructureBuildGeometryInfoKHR( VULKAN_HPP_NAMESPACE::AccelerationStructureTypeKHR type_, VULKAN_HPP_NAMESPACE::BuildAccelerationStructureFlagsKHR flags_, VULKAN_HPP_NAMESPACE::BuildAccelerationStructureModeKHR mode_, VULKAN_HPP_NAMESPACE::AccelerationStructureKHR srcAccelerationStructure_, VULKAN_HPP_NAMESPACE::AccelerationStructureKHR dstAccelerationStructure_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & geometries_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & pGeometries_ = {}, VULKAN_HPP_NAMESPACE::DeviceOrHostAddressKHR scratchData_ = {}, const void * pNext_ = nullptr ) : pNext( pNext_ ) , type( type_ ) , flags( flags_ ) , mode( mode_ ) , srcAccelerationStructure( srcAccelerationStructure_ ) , dstAccelerationStructure( dstAccelerationStructure_ ) , geometryCount( static_cast( !geometries_.empty() ? geometries_.size() : pGeometries_.size() ) ) , pGeometries( geometries_.data() ) , ppGeometries( pGeometries_.data() ) , scratchData( scratchData_ ) { # ifdef VULKAN_HPP_NO_EXCEPTIONS VULKAN_HPP_ASSERT( ( !geometries_.empty() + !pGeometries_.empty() ) <= 1 ); # else if ( 1 < ( !geometries_.empty() + !pGeometries_.empty() ) ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::AccelerationStructureBuildGeometryInfoKHR::AccelerationStructureBuildGeometryInfoKHR: 1 < ( !geometries_.empty() + !pGeometries_.empty() )" ); } # endif /*VULKAN_HPP_NO_EXCEPTIONS*/ } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ AccelerationStructureBuildGeometryInfoKHR & operator=( AccelerationStructureBuildGeometryInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ AccelerationStructureBuildGeometryInfoKHR & operator=( VkAccelerationStructureBuildGeometryInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 AccelerationStructureBuildGeometryInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureBuildGeometryInfoKHR & setType( VULKAN_HPP_NAMESPACE::AccelerationStructureTypeKHR type_ ) VULKAN_HPP_NOEXCEPT { type = type_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureBuildGeometryInfoKHR & setFlags( VULKAN_HPP_NAMESPACE::BuildAccelerationStructureFlagsKHR flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureBuildGeometryInfoKHR & setMode( VULKAN_HPP_NAMESPACE::BuildAccelerationStructureModeKHR mode_ ) VULKAN_HPP_NOEXCEPT { mode = mode_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureBuildGeometryInfoKHR & setSrcAccelerationStructure( VULKAN_HPP_NAMESPACE::AccelerationStructureKHR srcAccelerationStructure_ ) VULKAN_HPP_NOEXCEPT { srcAccelerationStructure = srcAccelerationStructure_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureBuildGeometryInfoKHR & setDstAccelerationStructure( VULKAN_HPP_NAMESPACE::AccelerationStructureKHR dstAccelerationStructure_ ) VULKAN_HPP_NOEXCEPT { dstAccelerationStructure = dstAccelerationStructure_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureBuildGeometryInfoKHR & setGeometryCount( uint32_t geometryCount_ ) VULKAN_HPP_NOEXCEPT { geometryCount = geometryCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureBuildGeometryInfoKHR & setPGeometries( const VULKAN_HPP_NAMESPACE::AccelerationStructureGeometryKHR * pGeometries_ ) VULKAN_HPP_NOEXCEPT { pGeometries = pGeometries_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) AccelerationStructureBuildGeometryInfoKHR & setGeometries( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & geometries_ ) VULKAN_HPP_NOEXCEPT { geometryCount = static_cast( geometries_.size() ); pGeometries = geometries_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 AccelerationStructureBuildGeometryInfoKHR & setPpGeometries( const VULKAN_HPP_NAMESPACE::AccelerationStructureGeometryKHR * const * ppGeometries_ ) VULKAN_HPP_NOEXCEPT { ppGeometries = ppGeometries_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) AccelerationStructureBuildGeometryInfoKHR & setPGeometries( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & pGeometries_ ) VULKAN_HPP_NOEXCEPT { geometryCount = static_cast( pGeometries_.size() ); ppGeometries = pGeometries_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 AccelerationStructureBuildGeometryInfoKHR & setScratchData( VULKAN_HPP_NAMESPACE::DeviceOrHostAddressKHR const & scratchData_ ) VULKAN_HPP_NOEXCEPT { scratchData = scratchData_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkAccelerationStructureBuildGeometryInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkAccelerationStructureBuildGeometryInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, type, flags, mode, srcAccelerationStructure, dstAccelerationStructure, geometryCount, pGeometries, ppGeometries, scratchData ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eAccelerationStructureBuildGeometryInfoKHR; const void * pNext = {}; VULKAN_HPP_NAMESPACE::AccelerationStructureTypeKHR type = VULKAN_HPP_NAMESPACE::AccelerationStructureTypeKHR::eTopLevel; VULKAN_HPP_NAMESPACE::BuildAccelerationStructureFlagsKHR flags = {}; VULKAN_HPP_NAMESPACE::BuildAccelerationStructureModeKHR mode = VULKAN_HPP_NAMESPACE::BuildAccelerationStructureModeKHR::eBuild; VULKAN_HPP_NAMESPACE::AccelerationStructureKHR srcAccelerationStructure = {}; VULKAN_HPP_NAMESPACE::AccelerationStructureKHR dstAccelerationStructure = {}; uint32_t geometryCount = {}; const VULKAN_HPP_NAMESPACE::AccelerationStructureGeometryKHR * pGeometries = {}; const VULKAN_HPP_NAMESPACE::AccelerationStructureGeometryKHR * const * ppGeometries = {}; VULKAN_HPP_NAMESPACE::DeviceOrHostAddressKHR scratchData = {}; }; template <> struct CppType { using Type = AccelerationStructureBuildGeometryInfoKHR; }; struct AccelerationStructureBuildRangeInfoKHR { using NativeType = VkAccelerationStructureBuildRangeInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR AccelerationStructureBuildRangeInfoKHR( uint32_t primitiveCount_ = {}, uint32_t primitiveOffset_ = {}, uint32_t firstVertex_ = {}, uint32_t transformOffset_ = {} ) VULKAN_HPP_NOEXCEPT : primitiveCount{ primitiveCount_ } , primitiveOffset{ primitiveOffset_ } , firstVertex{ firstVertex_ } , transformOffset{ transformOffset_ } { } VULKAN_HPP_CONSTEXPR AccelerationStructureBuildRangeInfoKHR( AccelerationStructureBuildRangeInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; AccelerationStructureBuildRangeInfoKHR( VkAccelerationStructureBuildRangeInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : AccelerationStructureBuildRangeInfoKHR( *reinterpret_cast( &rhs ) ) { } AccelerationStructureBuildRangeInfoKHR & operator=( AccelerationStructureBuildRangeInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ AccelerationStructureBuildRangeInfoKHR & operator=( VkAccelerationStructureBuildRangeInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 AccelerationStructureBuildRangeInfoKHR & setPrimitiveCount( uint32_t primitiveCount_ ) VULKAN_HPP_NOEXCEPT { primitiveCount = primitiveCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureBuildRangeInfoKHR & setPrimitiveOffset( uint32_t primitiveOffset_ ) VULKAN_HPP_NOEXCEPT { primitiveOffset = primitiveOffset_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureBuildRangeInfoKHR & setFirstVertex( uint32_t firstVertex_ ) VULKAN_HPP_NOEXCEPT { firstVertex = firstVertex_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureBuildRangeInfoKHR & setTransformOffset( uint32_t transformOffset_ ) VULKAN_HPP_NOEXCEPT { transformOffset = transformOffset_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkAccelerationStructureBuildRangeInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkAccelerationStructureBuildRangeInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( primitiveCount, primitiveOffset, firstVertex, transformOffset ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( AccelerationStructureBuildRangeInfoKHR const & ) const = default; #else bool operator==( AccelerationStructureBuildRangeInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( primitiveCount == rhs.primitiveCount ) && ( primitiveOffset == rhs.primitiveOffset ) && ( firstVertex == rhs.firstVertex ) && ( transformOffset == rhs.transformOffset ); # endif } bool operator!=( AccelerationStructureBuildRangeInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: uint32_t primitiveCount = {}; uint32_t primitiveOffset = {}; uint32_t firstVertex = {}; uint32_t transformOffset = {}; }; struct AccelerationStructureBuildSizesInfoKHR { using NativeType = VkAccelerationStructureBuildSizesInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eAccelerationStructureBuildSizesInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR AccelerationStructureBuildSizesInfoKHR( VULKAN_HPP_NAMESPACE::DeviceSize accelerationStructureSize_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize updateScratchSize_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize buildScratchSize_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , accelerationStructureSize{ accelerationStructureSize_ } , updateScratchSize{ updateScratchSize_ } , buildScratchSize{ buildScratchSize_ } { } VULKAN_HPP_CONSTEXPR AccelerationStructureBuildSizesInfoKHR( AccelerationStructureBuildSizesInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; AccelerationStructureBuildSizesInfoKHR( VkAccelerationStructureBuildSizesInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : AccelerationStructureBuildSizesInfoKHR( *reinterpret_cast( &rhs ) ) { } AccelerationStructureBuildSizesInfoKHR & operator=( AccelerationStructureBuildSizesInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ AccelerationStructureBuildSizesInfoKHR & operator=( VkAccelerationStructureBuildSizesInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkAccelerationStructureBuildSizesInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkAccelerationStructureBuildSizesInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, accelerationStructureSize, updateScratchSize, buildScratchSize ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( AccelerationStructureBuildSizesInfoKHR const & ) const = default; #else bool operator==( AccelerationStructureBuildSizesInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( accelerationStructureSize == rhs.accelerationStructureSize ) && ( updateScratchSize == rhs.updateScratchSize ) && ( buildScratchSize == rhs.buildScratchSize ); # endif } bool operator!=( AccelerationStructureBuildSizesInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eAccelerationStructureBuildSizesInfoKHR; const void * pNext = {}; VULKAN_HPP_NAMESPACE::DeviceSize accelerationStructureSize = {}; VULKAN_HPP_NAMESPACE::DeviceSize updateScratchSize = {}; VULKAN_HPP_NAMESPACE::DeviceSize buildScratchSize = {}; }; template <> struct CppType { using Type = AccelerationStructureBuildSizesInfoKHR; }; struct AccelerationStructureCaptureDescriptorDataInfoEXT { using NativeType = VkAccelerationStructureCaptureDescriptorDataInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eAccelerationStructureCaptureDescriptorDataInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR AccelerationStructureCaptureDescriptorDataInfoEXT( VULKAN_HPP_NAMESPACE::AccelerationStructureKHR accelerationStructure_ = {}, VULKAN_HPP_NAMESPACE::AccelerationStructureNV accelerationStructureNV_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , accelerationStructure{ accelerationStructure_ } , accelerationStructureNV{ accelerationStructureNV_ } { } VULKAN_HPP_CONSTEXPR AccelerationStructureCaptureDescriptorDataInfoEXT( AccelerationStructureCaptureDescriptorDataInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; AccelerationStructureCaptureDescriptorDataInfoEXT( VkAccelerationStructureCaptureDescriptorDataInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : AccelerationStructureCaptureDescriptorDataInfoEXT( *reinterpret_cast( &rhs ) ) { } AccelerationStructureCaptureDescriptorDataInfoEXT & operator=( AccelerationStructureCaptureDescriptorDataInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ AccelerationStructureCaptureDescriptorDataInfoEXT & operator=( VkAccelerationStructureCaptureDescriptorDataInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 AccelerationStructureCaptureDescriptorDataInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureCaptureDescriptorDataInfoEXT & setAccelerationStructure( VULKAN_HPP_NAMESPACE::AccelerationStructureKHR accelerationStructure_ ) VULKAN_HPP_NOEXCEPT { accelerationStructure = accelerationStructure_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureCaptureDescriptorDataInfoEXT & setAccelerationStructureNV( VULKAN_HPP_NAMESPACE::AccelerationStructureNV accelerationStructureNV_ ) VULKAN_HPP_NOEXCEPT { accelerationStructureNV = accelerationStructureNV_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkAccelerationStructureCaptureDescriptorDataInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkAccelerationStructureCaptureDescriptorDataInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, accelerationStructure, accelerationStructureNV ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( AccelerationStructureCaptureDescriptorDataInfoEXT const & ) const = default; #else bool operator==( AccelerationStructureCaptureDescriptorDataInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( accelerationStructure == rhs.accelerationStructure ) && ( accelerationStructureNV == rhs.accelerationStructureNV ); # endif } bool operator!=( AccelerationStructureCaptureDescriptorDataInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eAccelerationStructureCaptureDescriptorDataInfoEXT; const void * pNext = {}; VULKAN_HPP_NAMESPACE::AccelerationStructureKHR accelerationStructure = {}; VULKAN_HPP_NAMESPACE::AccelerationStructureNV accelerationStructureNV = {}; }; template <> struct CppType { using Type = AccelerationStructureCaptureDescriptorDataInfoEXT; }; struct AccelerationStructureCreateInfoKHR { using NativeType = VkAccelerationStructureCreateInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eAccelerationStructureCreateInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR AccelerationStructureCreateInfoKHR( VULKAN_HPP_NAMESPACE::AccelerationStructureCreateFlagsKHR createFlags_ = {}, VULKAN_HPP_NAMESPACE::Buffer buffer_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize offset_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize size_ = {}, VULKAN_HPP_NAMESPACE::AccelerationStructureTypeKHR type_ = VULKAN_HPP_NAMESPACE::AccelerationStructureTypeKHR::eTopLevel, VULKAN_HPP_NAMESPACE::DeviceAddress deviceAddress_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , createFlags{ createFlags_ } , buffer{ buffer_ } , offset{ offset_ } , size{ size_ } , type{ type_ } , deviceAddress{ deviceAddress_ } { } VULKAN_HPP_CONSTEXPR AccelerationStructureCreateInfoKHR( AccelerationStructureCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; AccelerationStructureCreateInfoKHR( VkAccelerationStructureCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : AccelerationStructureCreateInfoKHR( *reinterpret_cast( &rhs ) ) { } AccelerationStructureCreateInfoKHR & operator=( AccelerationStructureCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ AccelerationStructureCreateInfoKHR & operator=( VkAccelerationStructureCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 AccelerationStructureCreateInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureCreateInfoKHR & setCreateFlags( VULKAN_HPP_NAMESPACE::AccelerationStructureCreateFlagsKHR createFlags_ ) VULKAN_HPP_NOEXCEPT { createFlags = createFlags_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureCreateInfoKHR & setBuffer( VULKAN_HPP_NAMESPACE::Buffer buffer_ ) VULKAN_HPP_NOEXCEPT { buffer = buffer_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureCreateInfoKHR & setOffset( VULKAN_HPP_NAMESPACE::DeviceSize offset_ ) VULKAN_HPP_NOEXCEPT { offset = offset_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureCreateInfoKHR & setSize( VULKAN_HPP_NAMESPACE::DeviceSize size_ ) VULKAN_HPP_NOEXCEPT { size = size_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureCreateInfoKHR & setType( VULKAN_HPP_NAMESPACE::AccelerationStructureTypeKHR type_ ) VULKAN_HPP_NOEXCEPT { type = type_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureCreateInfoKHR & setDeviceAddress( VULKAN_HPP_NAMESPACE::DeviceAddress deviceAddress_ ) VULKAN_HPP_NOEXCEPT { deviceAddress = deviceAddress_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkAccelerationStructureCreateInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkAccelerationStructureCreateInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, createFlags, buffer, offset, size, type, deviceAddress ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( AccelerationStructureCreateInfoKHR const & ) const = default; #else bool operator==( AccelerationStructureCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( createFlags == rhs.createFlags ) && ( buffer == rhs.buffer ) && ( offset == rhs.offset ) && ( size == rhs.size ) && ( type == rhs.type ) && ( deviceAddress == rhs.deviceAddress ); # endif } bool operator!=( AccelerationStructureCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eAccelerationStructureCreateInfoKHR; const void * pNext = {}; VULKAN_HPP_NAMESPACE::AccelerationStructureCreateFlagsKHR createFlags = {}; VULKAN_HPP_NAMESPACE::Buffer buffer = {}; VULKAN_HPP_NAMESPACE::DeviceSize offset = {}; VULKAN_HPP_NAMESPACE::DeviceSize size = {}; VULKAN_HPP_NAMESPACE::AccelerationStructureTypeKHR type = VULKAN_HPP_NAMESPACE::AccelerationStructureTypeKHR::eTopLevel; VULKAN_HPP_NAMESPACE::DeviceAddress deviceAddress = {}; }; template <> struct CppType { using Type = AccelerationStructureCreateInfoKHR; }; struct GeometryTrianglesNV { using NativeType = VkGeometryTrianglesNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eGeometryTrianglesNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR GeometryTrianglesNV( VULKAN_HPP_NAMESPACE::Buffer vertexData_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize vertexOffset_ = {}, uint32_t vertexCount_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize vertexStride_ = {}, VULKAN_HPP_NAMESPACE::Format vertexFormat_ = VULKAN_HPP_NAMESPACE::Format::eUndefined, VULKAN_HPP_NAMESPACE::Buffer indexData_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize indexOffset_ = {}, uint32_t indexCount_ = {}, VULKAN_HPP_NAMESPACE::IndexType indexType_ = VULKAN_HPP_NAMESPACE::IndexType::eUint16, VULKAN_HPP_NAMESPACE::Buffer transformData_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize transformOffset_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , vertexData{ vertexData_ } , vertexOffset{ vertexOffset_ } , vertexCount{ vertexCount_ } , vertexStride{ vertexStride_ } , vertexFormat{ vertexFormat_ } , indexData{ indexData_ } , indexOffset{ indexOffset_ } , indexCount{ indexCount_ } , indexType{ indexType_ } , transformData{ transformData_ } , transformOffset{ transformOffset_ } { } VULKAN_HPP_CONSTEXPR GeometryTrianglesNV( GeometryTrianglesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; GeometryTrianglesNV( VkGeometryTrianglesNV const & rhs ) VULKAN_HPP_NOEXCEPT : GeometryTrianglesNV( *reinterpret_cast( &rhs ) ) { } GeometryTrianglesNV & operator=( GeometryTrianglesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ GeometryTrianglesNV & operator=( VkGeometryTrianglesNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 GeometryTrianglesNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 GeometryTrianglesNV & setVertexData( VULKAN_HPP_NAMESPACE::Buffer vertexData_ ) VULKAN_HPP_NOEXCEPT { vertexData = vertexData_; return *this; } VULKAN_HPP_CONSTEXPR_14 GeometryTrianglesNV & setVertexOffset( VULKAN_HPP_NAMESPACE::DeviceSize vertexOffset_ ) VULKAN_HPP_NOEXCEPT { vertexOffset = vertexOffset_; return *this; } VULKAN_HPP_CONSTEXPR_14 GeometryTrianglesNV & setVertexCount( uint32_t vertexCount_ ) VULKAN_HPP_NOEXCEPT { vertexCount = vertexCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 GeometryTrianglesNV & setVertexStride( VULKAN_HPP_NAMESPACE::DeviceSize vertexStride_ ) VULKAN_HPP_NOEXCEPT { vertexStride = vertexStride_; return *this; } VULKAN_HPP_CONSTEXPR_14 GeometryTrianglesNV & setVertexFormat( VULKAN_HPP_NAMESPACE::Format vertexFormat_ ) VULKAN_HPP_NOEXCEPT { vertexFormat = vertexFormat_; return *this; } VULKAN_HPP_CONSTEXPR_14 GeometryTrianglesNV & setIndexData( VULKAN_HPP_NAMESPACE::Buffer indexData_ ) VULKAN_HPP_NOEXCEPT { indexData = indexData_; return *this; } VULKAN_HPP_CONSTEXPR_14 GeometryTrianglesNV & setIndexOffset( VULKAN_HPP_NAMESPACE::DeviceSize indexOffset_ ) VULKAN_HPP_NOEXCEPT { indexOffset = indexOffset_; return *this; } VULKAN_HPP_CONSTEXPR_14 GeometryTrianglesNV & setIndexCount( uint32_t indexCount_ ) VULKAN_HPP_NOEXCEPT { indexCount = indexCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 GeometryTrianglesNV & setIndexType( VULKAN_HPP_NAMESPACE::IndexType indexType_ ) VULKAN_HPP_NOEXCEPT { indexType = indexType_; return *this; } VULKAN_HPP_CONSTEXPR_14 GeometryTrianglesNV & setTransformData( VULKAN_HPP_NAMESPACE::Buffer transformData_ ) VULKAN_HPP_NOEXCEPT { transformData = transformData_; return *this; } VULKAN_HPP_CONSTEXPR_14 GeometryTrianglesNV & setTransformOffset( VULKAN_HPP_NAMESPACE::DeviceSize transformOffset_ ) VULKAN_HPP_NOEXCEPT { transformOffset = transformOffset_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkGeometryTrianglesNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkGeometryTrianglesNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, vertexData, vertexOffset, vertexCount, vertexStride, vertexFormat, indexData, indexOffset, indexCount, indexType, transformData, transformOffset ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( GeometryTrianglesNV const & ) const = default; #else bool operator==( GeometryTrianglesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( vertexData == rhs.vertexData ) && ( vertexOffset == rhs.vertexOffset ) && ( vertexCount == rhs.vertexCount ) && ( vertexStride == rhs.vertexStride ) && ( vertexFormat == rhs.vertexFormat ) && ( indexData == rhs.indexData ) && ( indexOffset == rhs.indexOffset ) && ( indexCount == rhs.indexCount ) && ( indexType == rhs.indexType ) && ( transformData == rhs.transformData ) && ( transformOffset == rhs.transformOffset ); # endif } bool operator!=( GeometryTrianglesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eGeometryTrianglesNV; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Buffer vertexData = {}; VULKAN_HPP_NAMESPACE::DeviceSize vertexOffset = {}; uint32_t vertexCount = {}; VULKAN_HPP_NAMESPACE::DeviceSize vertexStride = {}; VULKAN_HPP_NAMESPACE::Format vertexFormat = VULKAN_HPP_NAMESPACE::Format::eUndefined; VULKAN_HPP_NAMESPACE::Buffer indexData = {}; VULKAN_HPP_NAMESPACE::DeviceSize indexOffset = {}; uint32_t indexCount = {}; VULKAN_HPP_NAMESPACE::IndexType indexType = VULKAN_HPP_NAMESPACE::IndexType::eUint16; VULKAN_HPP_NAMESPACE::Buffer transformData = {}; VULKAN_HPP_NAMESPACE::DeviceSize transformOffset = {}; }; template <> struct CppType { using Type = GeometryTrianglesNV; }; struct GeometryAABBNV { using NativeType = VkGeometryAABBNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eGeometryAabbNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR GeometryAABBNV( VULKAN_HPP_NAMESPACE::Buffer aabbData_ = {}, uint32_t numAABBs_ = {}, uint32_t stride_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize offset_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , aabbData{ aabbData_ } , numAABBs{ numAABBs_ } , stride{ stride_ } , offset{ offset_ } { } VULKAN_HPP_CONSTEXPR GeometryAABBNV( GeometryAABBNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; GeometryAABBNV( VkGeometryAABBNV const & rhs ) VULKAN_HPP_NOEXCEPT : GeometryAABBNV( *reinterpret_cast( &rhs ) ) {} GeometryAABBNV & operator=( GeometryAABBNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ GeometryAABBNV & operator=( VkGeometryAABBNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 GeometryAABBNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 GeometryAABBNV & setAabbData( VULKAN_HPP_NAMESPACE::Buffer aabbData_ ) VULKAN_HPP_NOEXCEPT { aabbData = aabbData_; return *this; } VULKAN_HPP_CONSTEXPR_14 GeometryAABBNV & setNumAABBs( uint32_t numAABBs_ ) VULKAN_HPP_NOEXCEPT { numAABBs = numAABBs_; return *this; } VULKAN_HPP_CONSTEXPR_14 GeometryAABBNV & setStride( uint32_t stride_ ) VULKAN_HPP_NOEXCEPT { stride = stride_; return *this; } VULKAN_HPP_CONSTEXPR_14 GeometryAABBNV & setOffset( VULKAN_HPP_NAMESPACE::DeviceSize offset_ ) VULKAN_HPP_NOEXCEPT { offset = offset_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkGeometryAABBNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkGeometryAABBNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, aabbData, numAABBs, stride, offset ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( GeometryAABBNV const & ) const = default; #else bool operator==( GeometryAABBNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( aabbData == rhs.aabbData ) && ( numAABBs == rhs.numAABBs ) && ( stride == rhs.stride ) && ( offset == rhs.offset ); # endif } bool operator!=( GeometryAABBNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eGeometryAabbNV; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Buffer aabbData = {}; uint32_t numAABBs = {}; uint32_t stride = {}; VULKAN_HPP_NAMESPACE::DeviceSize offset = {}; }; template <> struct CppType { using Type = GeometryAABBNV; }; struct GeometryDataNV { using NativeType = VkGeometryDataNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR GeometryDataNV( VULKAN_HPP_NAMESPACE::GeometryTrianglesNV triangles_ = {}, VULKAN_HPP_NAMESPACE::GeometryAABBNV aabbs_ = {} ) VULKAN_HPP_NOEXCEPT : triangles{ triangles_ } , aabbs{ aabbs_ } { } VULKAN_HPP_CONSTEXPR GeometryDataNV( GeometryDataNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; GeometryDataNV( VkGeometryDataNV const & rhs ) VULKAN_HPP_NOEXCEPT : GeometryDataNV( *reinterpret_cast( &rhs ) ) {} GeometryDataNV & operator=( GeometryDataNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ GeometryDataNV & operator=( VkGeometryDataNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 GeometryDataNV & setTriangles( VULKAN_HPP_NAMESPACE::GeometryTrianglesNV const & triangles_ ) VULKAN_HPP_NOEXCEPT { triangles = triangles_; return *this; } VULKAN_HPP_CONSTEXPR_14 GeometryDataNV & setAabbs( VULKAN_HPP_NAMESPACE::GeometryAABBNV const & aabbs_ ) VULKAN_HPP_NOEXCEPT { aabbs = aabbs_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkGeometryDataNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkGeometryDataNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( triangles, aabbs ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( GeometryDataNV const & ) const = default; #else bool operator==( GeometryDataNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( triangles == rhs.triangles ) && ( aabbs == rhs.aabbs ); # endif } bool operator!=( GeometryDataNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::GeometryTrianglesNV triangles = {}; VULKAN_HPP_NAMESPACE::GeometryAABBNV aabbs = {}; }; struct GeometryNV { using NativeType = VkGeometryNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eGeometryNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR GeometryNV( VULKAN_HPP_NAMESPACE::GeometryTypeKHR geometryType_ = VULKAN_HPP_NAMESPACE::GeometryTypeKHR::eTriangles, VULKAN_HPP_NAMESPACE::GeometryDataNV geometry_ = {}, VULKAN_HPP_NAMESPACE::GeometryFlagsKHR flags_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , geometryType{ geometryType_ } , geometry{ geometry_ } , flags{ flags_ } { } VULKAN_HPP_CONSTEXPR GeometryNV( GeometryNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; GeometryNV( VkGeometryNV const & rhs ) VULKAN_HPP_NOEXCEPT : GeometryNV( *reinterpret_cast( &rhs ) ) {} GeometryNV & operator=( GeometryNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ GeometryNV & operator=( VkGeometryNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 GeometryNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 GeometryNV & setGeometryType( VULKAN_HPP_NAMESPACE::GeometryTypeKHR geometryType_ ) VULKAN_HPP_NOEXCEPT { geometryType = geometryType_; return *this; } VULKAN_HPP_CONSTEXPR_14 GeometryNV & setGeometry( VULKAN_HPP_NAMESPACE::GeometryDataNV const & geometry_ ) VULKAN_HPP_NOEXCEPT { geometry = geometry_; return *this; } VULKAN_HPP_CONSTEXPR_14 GeometryNV & setFlags( VULKAN_HPP_NAMESPACE::GeometryFlagsKHR flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkGeometryNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkGeometryNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, geometryType, geometry, flags ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( GeometryNV const & ) const = default; #else bool operator==( GeometryNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( geometryType == rhs.geometryType ) && ( geometry == rhs.geometry ) && ( flags == rhs.flags ); # endif } bool operator!=( GeometryNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eGeometryNV; const void * pNext = {}; VULKAN_HPP_NAMESPACE::GeometryTypeKHR geometryType = VULKAN_HPP_NAMESPACE::GeometryTypeKHR::eTriangles; VULKAN_HPP_NAMESPACE::GeometryDataNV geometry = {}; VULKAN_HPP_NAMESPACE::GeometryFlagsKHR flags = {}; }; template <> struct CppType { using Type = GeometryNV; }; struct AccelerationStructureInfoNV { using NativeType = VkAccelerationStructureInfoNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eAccelerationStructureInfoNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR AccelerationStructureInfoNV( VULKAN_HPP_NAMESPACE::AccelerationStructureTypeNV type_ = {}, VULKAN_HPP_NAMESPACE::BuildAccelerationStructureFlagsNV flags_ = {}, uint32_t instanceCount_ = {}, uint32_t geometryCount_ = {}, const VULKAN_HPP_NAMESPACE::GeometryNV * pGeometries_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , type{ type_ } , flags{ flags_ } , instanceCount{ instanceCount_ } , geometryCount{ geometryCount_ } , pGeometries{ pGeometries_ } { } VULKAN_HPP_CONSTEXPR AccelerationStructureInfoNV( AccelerationStructureInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; AccelerationStructureInfoNV( VkAccelerationStructureInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT : AccelerationStructureInfoNV( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) AccelerationStructureInfoNV( VULKAN_HPP_NAMESPACE::AccelerationStructureTypeNV type_, VULKAN_HPP_NAMESPACE::BuildAccelerationStructureFlagsNV flags_, uint32_t instanceCount_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & geometries_, const void * pNext_ = nullptr ) : pNext( pNext_ ) , type( type_ ) , flags( flags_ ) , instanceCount( instanceCount_ ) , geometryCount( static_cast( geometries_.size() ) ) , pGeometries( geometries_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ AccelerationStructureInfoNV & operator=( AccelerationStructureInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ AccelerationStructureInfoNV & operator=( VkAccelerationStructureInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 AccelerationStructureInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureInfoNV & setType( VULKAN_HPP_NAMESPACE::AccelerationStructureTypeNV type_ ) VULKAN_HPP_NOEXCEPT { type = type_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureInfoNV & setFlags( VULKAN_HPP_NAMESPACE::BuildAccelerationStructureFlagsNV flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureInfoNV & setInstanceCount( uint32_t instanceCount_ ) VULKAN_HPP_NOEXCEPT { instanceCount = instanceCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureInfoNV & setGeometryCount( uint32_t geometryCount_ ) VULKAN_HPP_NOEXCEPT { geometryCount = geometryCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureInfoNV & setPGeometries( const VULKAN_HPP_NAMESPACE::GeometryNV * pGeometries_ ) VULKAN_HPP_NOEXCEPT { pGeometries = pGeometries_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) AccelerationStructureInfoNV & setGeometries( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & geometries_ ) VULKAN_HPP_NOEXCEPT { geometryCount = static_cast( geometries_.size() ); pGeometries = geometries_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkAccelerationStructureInfoNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkAccelerationStructureInfoNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, type, flags, instanceCount, geometryCount, pGeometries ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( AccelerationStructureInfoNV const & ) const = default; #else bool operator==( AccelerationStructureInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( type == rhs.type ) && ( flags == rhs.flags ) && ( instanceCount == rhs.instanceCount ) && ( geometryCount == rhs.geometryCount ) && ( pGeometries == rhs.pGeometries ); # endif } bool operator!=( AccelerationStructureInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eAccelerationStructureInfoNV; const void * pNext = {}; VULKAN_HPP_NAMESPACE::AccelerationStructureTypeNV type = {}; VULKAN_HPP_NAMESPACE::BuildAccelerationStructureFlagsNV flags = {}; uint32_t instanceCount = {}; uint32_t geometryCount = {}; const VULKAN_HPP_NAMESPACE::GeometryNV * pGeometries = {}; }; template <> struct CppType { using Type = AccelerationStructureInfoNV; }; struct AccelerationStructureCreateInfoNV { using NativeType = VkAccelerationStructureCreateInfoNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eAccelerationStructureCreateInfoNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR AccelerationStructureCreateInfoNV( VULKAN_HPP_NAMESPACE::DeviceSize compactedSize_ = {}, VULKAN_HPP_NAMESPACE::AccelerationStructureInfoNV info_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , compactedSize{ compactedSize_ } , info{ info_ } { } VULKAN_HPP_CONSTEXPR AccelerationStructureCreateInfoNV( AccelerationStructureCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; AccelerationStructureCreateInfoNV( VkAccelerationStructureCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT : AccelerationStructureCreateInfoNV( *reinterpret_cast( &rhs ) ) { } AccelerationStructureCreateInfoNV & operator=( AccelerationStructureCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ AccelerationStructureCreateInfoNV & operator=( VkAccelerationStructureCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 AccelerationStructureCreateInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureCreateInfoNV & setCompactedSize( VULKAN_HPP_NAMESPACE::DeviceSize compactedSize_ ) VULKAN_HPP_NOEXCEPT { compactedSize = compactedSize_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureCreateInfoNV & setInfo( VULKAN_HPP_NAMESPACE::AccelerationStructureInfoNV const & info_ ) VULKAN_HPP_NOEXCEPT { info = info_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkAccelerationStructureCreateInfoNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkAccelerationStructureCreateInfoNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, compactedSize, info ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( AccelerationStructureCreateInfoNV const & ) const = default; #else bool operator==( AccelerationStructureCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( compactedSize == rhs.compactedSize ) && ( info == rhs.info ); # endif } bool operator!=( AccelerationStructureCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eAccelerationStructureCreateInfoNV; const void * pNext = {}; VULKAN_HPP_NAMESPACE::DeviceSize compactedSize = {}; VULKAN_HPP_NAMESPACE::AccelerationStructureInfoNV info = {}; }; template <> struct CppType { using Type = AccelerationStructureCreateInfoNV; }; struct AccelerationStructureDeviceAddressInfoKHR { using NativeType = VkAccelerationStructureDeviceAddressInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eAccelerationStructureDeviceAddressInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR AccelerationStructureDeviceAddressInfoKHR( VULKAN_HPP_NAMESPACE::AccelerationStructureKHR accelerationStructure_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , accelerationStructure{ accelerationStructure_ } { } VULKAN_HPP_CONSTEXPR AccelerationStructureDeviceAddressInfoKHR( AccelerationStructureDeviceAddressInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; AccelerationStructureDeviceAddressInfoKHR( VkAccelerationStructureDeviceAddressInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : AccelerationStructureDeviceAddressInfoKHR( *reinterpret_cast( &rhs ) ) { } AccelerationStructureDeviceAddressInfoKHR & operator=( AccelerationStructureDeviceAddressInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ AccelerationStructureDeviceAddressInfoKHR & operator=( VkAccelerationStructureDeviceAddressInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 AccelerationStructureDeviceAddressInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureDeviceAddressInfoKHR & setAccelerationStructure( VULKAN_HPP_NAMESPACE::AccelerationStructureKHR accelerationStructure_ ) VULKAN_HPP_NOEXCEPT { accelerationStructure = accelerationStructure_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkAccelerationStructureDeviceAddressInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkAccelerationStructureDeviceAddressInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, accelerationStructure ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( AccelerationStructureDeviceAddressInfoKHR const & ) const = default; #else bool operator==( AccelerationStructureDeviceAddressInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( accelerationStructure == rhs.accelerationStructure ); # endif } bool operator!=( AccelerationStructureDeviceAddressInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eAccelerationStructureDeviceAddressInfoKHR; const void * pNext = {}; VULKAN_HPP_NAMESPACE::AccelerationStructureKHR accelerationStructure = {}; }; template <> struct CppType { using Type = AccelerationStructureDeviceAddressInfoKHR; }; struct AccelerationStructureGeometryLinearSweptSpheresDataNV { using NativeType = VkAccelerationStructureGeometryLinearSweptSpheresDataNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eAccelerationStructureGeometryLinearSweptSpheresDataNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometryLinearSweptSpheresDataNV( VULKAN_HPP_NAMESPACE::Format vertexFormat_ = VULKAN_HPP_NAMESPACE::Format::eUndefined, VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR vertexData_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize vertexStride_ = {}, VULKAN_HPP_NAMESPACE::Format radiusFormat_ = VULKAN_HPP_NAMESPACE::Format::eUndefined, VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR radiusData_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize radiusStride_ = {}, VULKAN_HPP_NAMESPACE::IndexType indexType_ = VULKAN_HPP_NAMESPACE::IndexType::eUint16, VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR indexData_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize indexStride_ = {}, VULKAN_HPP_NAMESPACE::RayTracingLssIndexingModeNV indexingMode_ = VULKAN_HPP_NAMESPACE::RayTracingLssIndexingModeNV::eList, VULKAN_HPP_NAMESPACE::RayTracingLssPrimitiveEndCapsModeNV endCapsMode_ = VULKAN_HPP_NAMESPACE::RayTracingLssPrimitiveEndCapsModeNV::eNone, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , vertexFormat{ vertexFormat_ } , vertexData{ vertexData_ } , vertexStride{ vertexStride_ } , radiusFormat{ radiusFormat_ } , radiusData{ radiusData_ } , radiusStride{ radiusStride_ } , indexType{ indexType_ } , indexData{ indexData_ } , indexStride{ indexStride_ } , indexingMode{ indexingMode_ } , endCapsMode{ endCapsMode_ } { } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometryLinearSweptSpheresDataNV( AccelerationStructureGeometryLinearSweptSpheresDataNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; AccelerationStructureGeometryLinearSweptSpheresDataNV( VkAccelerationStructureGeometryLinearSweptSpheresDataNV const & rhs ) VULKAN_HPP_NOEXCEPT : AccelerationStructureGeometryLinearSweptSpheresDataNV( *reinterpret_cast( &rhs ) ) { } AccelerationStructureGeometryLinearSweptSpheresDataNV & operator=( AccelerationStructureGeometryLinearSweptSpheresDataNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ AccelerationStructureGeometryLinearSweptSpheresDataNV & operator=( VkAccelerationStructureGeometryLinearSweptSpheresDataNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometryLinearSweptSpheresDataNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometryLinearSweptSpheresDataNV & setVertexFormat( VULKAN_HPP_NAMESPACE::Format vertexFormat_ ) VULKAN_HPP_NOEXCEPT { vertexFormat = vertexFormat_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometryLinearSweptSpheresDataNV & setVertexData( VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR const & vertexData_ ) VULKAN_HPP_NOEXCEPT { vertexData = vertexData_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometryLinearSweptSpheresDataNV & setVertexStride( VULKAN_HPP_NAMESPACE::DeviceSize vertexStride_ ) VULKAN_HPP_NOEXCEPT { vertexStride = vertexStride_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometryLinearSweptSpheresDataNV & setRadiusFormat( VULKAN_HPP_NAMESPACE::Format radiusFormat_ ) VULKAN_HPP_NOEXCEPT { radiusFormat = radiusFormat_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometryLinearSweptSpheresDataNV & setRadiusData( VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR const & radiusData_ ) VULKAN_HPP_NOEXCEPT { radiusData = radiusData_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometryLinearSweptSpheresDataNV & setRadiusStride( VULKAN_HPP_NAMESPACE::DeviceSize radiusStride_ ) VULKAN_HPP_NOEXCEPT { radiusStride = radiusStride_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometryLinearSweptSpheresDataNV & setIndexType( VULKAN_HPP_NAMESPACE::IndexType indexType_ ) VULKAN_HPP_NOEXCEPT { indexType = indexType_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometryLinearSweptSpheresDataNV & setIndexData( VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR const & indexData_ ) VULKAN_HPP_NOEXCEPT { indexData = indexData_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometryLinearSweptSpheresDataNV & setIndexStride( VULKAN_HPP_NAMESPACE::DeviceSize indexStride_ ) VULKAN_HPP_NOEXCEPT { indexStride = indexStride_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometryLinearSweptSpheresDataNV & setIndexingMode( VULKAN_HPP_NAMESPACE::RayTracingLssIndexingModeNV indexingMode_ ) VULKAN_HPP_NOEXCEPT { indexingMode = indexingMode_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometryLinearSweptSpheresDataNV & setEndCapsMode( VULKAN_HPP_NAMESPACE::RayTracingLssPrimitiveEndCapsModeNV endCapsMode_ ) VULKAN_HPP_NOEXCEPT { endCapsMode = endCapsMode_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkAccelerationStructureGeometryLinearSweptSpheresDataNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkAccelerationStructureGeometryLinearSweptSpheresDataNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, vertexFormat, vertexData, vertexStride, radiusFormat, radiusData, radiusStride, indexType, indexData, indexStride, indexingMode, endCapsMode ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eAccelerationStructureGeometryLinearSweptSpheresDataNV; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Format vertexFormat = VULKAN_HPP_NAMESPACE::Format::eUndefined; VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR vertexData = {}; VULKAN_HPP_NAMESPACE::DeviceSize vertexStride = {}; VULKAN_HPP_NAMESPACE::Format radiusFormat = VULKAN_HPP_NAMESPACE::Format::eUndefined; VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR radiusData = {}; VULKAN_HPP_NAMESPACE::DeviceSize radiusStride = {}; VULKAN_HPP_NAMESPACE::IndexType indexType = VULKAN_HPP_NAMESPACE::IndexType::eUint16; VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR indexData = {}; VULKAN_HPP_NAMESPACE::DeviceSize indexStride = {}; VULKAN_HPP_NAMESPACE::RayTracingLssIndexingModeNV indexingMode = VULKAN_HPP_NAMESPACE::RayTracingLssIndexingModeNV::eList; VULKAN_HPP_NAMESPACE::RayTracingLssPrimitiveEndCapsModeNV endCapsMode = VULKAN_HPP_NAMESPACE::RayTracingLssPrimitiveEndCapsModeNV::eNone; }; template <> struct CppType { using Type = AccelerationStructureGeometryLinearSweptSpheresDataNV; }; struct AccelerationStructureGeometryMotionTrianglesDataNV { using NativeType = VkAccelerationStructureGeometryMotionTrianglesDataNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eAccelerationStructureGeometryMotionTrianglesDataNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometryMotionTrianglesDataNV( VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR vertexData_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , vertexData{ vertexData_ } { } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometryMotionTrianglesDataNV( AccelerationStructureGeometryMotionTrianglesDataNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; AccelerationStructureGeometryMotionTrianglesDataNV( VkAccelerationStructureGeometryMotionTrianglesDataNV const & rhs ) VULKAN_HPP_NOEXCEPT : AccelerationStructureGeometryMotionTrianglesDataNV( *reinterpret_cast( &rhs ) ) { } AccelerationStructureGeometryMotionTrianglesDataNV & operator=( AccelerationStructureGeometryMotionTrianglesDataNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ AccelerationStructureGeometryMotionTrianglesDataNV & operator=( VkAccelerationStructureGeometryMotionTrianglesDataNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometryMotionTrianglesDataNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometryMotionTrianglesDataNV & setVertexData( VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR const & vertexData_ ) VULKAN_HPP_NOEXCEPT { vertexData = vertexData_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkAccelerationStructureGeometryMotionTrianglesDataNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkAccelerationStructureGeometryMotionTrianglesDataNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, vertexData ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eAccelerationStructureGeometryMotionTrianglesDataNV; const void * pNext = {}; VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR vertexData = {}; }; template <> struct CppType { using Type = AccelerationStructureGeometryMotionTrianglesDataNV; }; struct AccelerationStructureGeometrySpheresDataNV { using NativeType = VkAccelerationStructureGeometrySpheresDataNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eAccelerationStructureGeometrySpheresDataNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometrySpheresDataNV( VULKAN_HPP_NAMESPACE::Format vertexFormat_ = VULKAN_HPP_NAMESPACE::Format::eUndefined, VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR vertexData_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize vertexStride_ = {}, VULKAN_HPP_NAMESPACE::Format radiusFormat_ = VULKAN_HPP_NAMESPACE::Format::eUndefined, VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR radiusData_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize radiusStride_ = {}, VULKAN_HPP_NAMESPACE::IndexType indexType_ = VULKAN_HPP_NAMESPACE::IndexType::eUint16, VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR indexData_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize indexStride_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , vertexFormat{ vertexFormat_ } , vertexData{ vertexData_ } , vertexStride{ vertexStride_ } , radiusFormat{ radiusFormat_ } , radiusData{ radiusData_ } , radiusStride{ radiusStride_ } , indexType{ indexType_ } , indexData{ indexData_ } , indexStride{ indexStride_ } { } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometrySpheresDataNV( AccelerationStructureGeometrySpheresDataNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; AccelerationStructureGeometrySpheresDataNV( VkAccelerationStructureGeometrySpheresDataNV const & rhs ) VULKAN_HPP_NOEXCEPT : AccelerationStructureGeometrySpheresDataNV( *reinterpret_cast( &rhs ) ) { } AccelerationStructureGeometrySpheresDataNV & operator=( AccelerationStructureGeometrySpheresDataNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ AccelerationStructureGeometrySpheresDataNV & operator=( VkAccelerationStructureGeometrySpheresDataNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometrySpheresDataNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometrySpheresDataNV & setVertexFormat( VULKAN_HPP_NAMESPACE::Format vertexFormat_ ) VULKAN_HPP_NOEXCEPT { vertexFormat = vertexFormat_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometrySpheresDataNV & setVertexData( VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR const & vertexData_ ) VULKAN_HPP_NOEXCEPT { vertexData = vertexData_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometrySpheresDataNV & setVertexStride( VULKAN_HPP_NAMESPACE::DeviceSize vertexStride_ ) VULKAN_HPP_NOEXCEPT { vertexStride = vertexStride_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometrySpheresDataNV & setRadiusFormat( VULKAN_HPP_NAMESPACE::Format radiusFormat_ ) VULKAN_HPP_NOEXCEPT { radiusFormat = radiusFormat_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometrySpheresDataNV & setRadiusData( VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR const & radiusData_ ) VULKAN_HPP_NOEXCEPT { radiusData = radiusData_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometrySpheresDataNV & setRadiusStride( VULKAN_HPP_NAMESPACE::DeviceSize radiusStride_ ) VULKAN_HPP_NOEXCEPT { radiusStride = radiusStride_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometrySpheresDataNV & setIndexType( VULKAN_HPP_NAMESPACE::IndexType indexType_ ) VULKAN_HPP_NOEXCEPT { indexType = indexType_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometrySpheresDataNV & setIndexData( VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR const & indexData_ ) VULKAN_HPP_NOEXCEPT { indexData = indexData_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureGeometrySpheresDataNV & setIndexStride( VULKAN_HPP_NAMESPACE::DeviceSize indexStride_ ) VULKAN_HPP_NOEXCEPT { indexStride = indexStride_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkAccelerationStructureGeometrySpheresDataNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkAccelerationStructureGeometrySpheresDataNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, vertexFormat, vertexData, vertexStride, radiusFormat, radiusData, radiusStride, indexType, indexData, indexStride ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eAccelerationStructureGeometrySpheresDataNV; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Format vertexFormat = VULKAN_HPP_NAMESPACE::Format::eUndefined; VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR vertexData = {}; VULKAN_HPP_NAMESPACE::DeviceSize vertexStride = {}; VULKAN_HPP_NAMESPACE::Format radiusFormat = VULKAN_HPP_NAMESPACE::Format::eUndefined; VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR radiusData = {}; VULKAN_HPP_NAMESPACE::DeviceSize radiusStride = {}; VULKAN_HPP_NAMESPACE::IndexType indexType = VULKAN_HPP_NAMESPACE::IndexType::eUint16; VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR indexData = {}; VULKAN_HPP_NAMESPACE::DeviceSize indexStride = {}; }; template <> struct CppType { using Type = AccelerationStructureGeometrySpheresDataNV; }; struct TransformMatrixKHR { using NativeType = VkTransformMatrixKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 TransformMatrixKHR( std::array, 3> const & matrix_ = {} ) VULKAN_HPP_NOEXCEPT : matrix{ matrix_ } {} VULKAN_HPP_CONSTEXPR_14 TransformMatrixKHR( TransformMatrixKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; TransformMatrixKHR( VkTransformMatrixKHR const & rhs ) VULKAN_HPP_NOEXCEPT : TransformMatrixKHR( *reinterpret_cast( &rhs ) ) {} TransformMatrixKHR & operator=( TransformMatrixKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ TransformMatrixKHR & operator=( VkTransformMatrixKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 TransformMatrixKHR & setMatrix( std::array, 3> matrix_ ) VULKAN_HPP_NOEXCEPT { matrix = matrix_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkTransformMatrixKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkTransformMatrixKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple const &> # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( matrix ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( TransformMatrixKHR const & ) const = default; #else bool operator==( TransformMatrixKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( matrix == rhs.matrix ); # endif } bool operator!=( TransformMatrixKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::ArrayWrapper2D matrix = {}; }; using TransformMatrixNV = TransformMatrixKHR; struct AccelerationStructureInstanceKHR { using NativeType = VkAccelerationStructureInstanceKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 AccelerationStructureInstanceKHR( VULKAN_HPP_NAMESPACE::TransformMatrixKHR transform_ = {}, uint32_t instanceCustomIndex_ = {}, uint32_t mask_ = {}, uint32_t instanceShaderBindingTableRecordOffset_ = {}, VULKAN_HPP_NAMESPACE::GeometryInstanceFlagsKHR flags_ = {}, uint64_t accelerationStructureReference_ = {} ) VULKAN_HPP_NOEXCEPT : transform{ transform_ } , instanceCustomIndex{ instanceCustomIndex_ } , mask{ mask_ } , instanceShaderBindingTableRecordOffset{ instanceShaderBindingTableRecordOffset_ } , flags{ flags_ } , accelerationStructureReference{ accelerationStructureReference_ } { } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureInstanceKHR( AccelerationStructureInstanceKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; AccelerationStructureInstanceKHR( VkAccelerationStructureInstanceKHR const & rhs ) VULKAN_HPP_NOEXCEPT : AccelerationStructureInstanceKHR( *reinterpret_cast( &rhs ) ) { } AccelerationStructureInstanceKHR & operator=( AccelerationStructureInstanceKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ AccelerationStructureInstanceKHR & operator=( VkAccelerationStructureInstanceKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 AccelerationStructureInstanceKHR & setTransform( VULKAN_HPP_NAMESPACE::TransformMatrixKHR const & transform_ ) VULKAN_HPP_NOEXCEPT { transform = transform_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureInstanceKHR & setInstanceCustomIndex( uint32_t instanceCustomIndex_ ) VULKAN_HPP_NOEXCEPT { instanceCustomIndex = instanceCustomIndex_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureInstanceKHR & setMask( uint32_t mask_ ) VULKAN_HPP_NOEXCEPT { mask = mask_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureInstanceKHR & setInstanceShaderBindingTableRecordOffset( uint32_t instanceShaderBindingTableRecordOffset_ ) VULKAN_HPP_NOEXCEPT { instanceShaderBindingTableRecordOffset = instanceShaderBindingTableRecordOffset_; return *this; } AccelerationStructureInstanceKHR & setFlags( VULKAN_HPP_NAMESPACE::GeometryInstanceFlagsKHR flags_ ) VULKAN_HPP_NOEXCEPT { flags = *reinterpret_cast( &flags_ ); return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureInstanceKHR & setAccelerationStructureReference( uint64_t accelerationStructureReference_ ) VULKAN_HPP_NOEXCEPT { accelerationStructureReference = accelerationStructureReference_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkAccelerationStructureInstanceKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkAccelerationStructureInstanceKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( transform, instanceCustomIndex, mask, instanceShaderBindingTableRecordOffset, flags, accelerationStructureReference ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( AccelerationStructureInstanceKHR const & ) const = default; #else bool operator==( AccelerationStructureInstanceKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( transform == rhs.transform ) && ( instanceCustomIndex == rhs.instanceCustomIndex ) && ( mask == rhs.mask ) && ( instanceShaderBindingTableRecordOffset == rhs.instanceShaderBindingTableRecordOffset ) && ( flags == rhs.flags ) && ( accelerationStructureReference == rhs.accelerationStructureReference ); # endif } bool operator!=( AccelerationStructureInstanceKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::TransformMatrixKHR transform = {}; uint32_t instanceCustomIndex : 24; uint32_t mask : 8; uint32_t instanceShaderBindingTableRecordOffset : 24; VkGeometryInstanceFlagsKHR flags : 8; uint64_t accelerationStructureReference = {}; }; using AccelerationStructureInstanceNV = AccelerationStructureInstanceKHR; struct AccelerationStructureMatrixMotionInstanceNV { using NativeType = VkAccelerationStructureMatrixMotionInstanceNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 AccelerationStructureMatrixMotionInstanceNV( VULKAN_HPP_NAMESPACE::TransformMatrixKHR transformT0_ = {}, VULKAN_HPP_NAMESPACE::TransformMatrixKHR transformT1_ = {}, uint32_t instanceCustomIndex_ = {}, uint32_t mask_ = {}, uint32_t instanceShaderBindingTableRecordOffset_ = {}, VULKAN_HPP_NAMESPACE::GeometryInstanceFlagsKHR flags_ = {}, uint64_t accelerationStructureReference_ = {} ) VULKAN_HPP_NOEXCEPT : transformT0{ transformT0_ } , transformT1{ transformT1_ } , instanceCustomIndex{ instanceCustomIndex_ } , mask{ mask_ } , instanceShaderBindingTableRecordOffset{ instanceShaderBindingTableRecordOffset_ } , flags{ flags_ } , accelerationStructureReference{ accelerationStructureReference_ } { } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureMatrixMotionInstanceNV( AccelerationStructureMatrixMotionInstanceNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; AccelerationStructureMatrixMotionInstanceNV( VkAccelerationStructureMatrixMotionInstanceNV const & rhs ) VULKAN_HPP_NOEXCEPT : AccelerationStructureMatrixMotionInstanceNV( *reinterpret_cast( &rhs ) ) { } AccelerationStructureMatrixMotionInstanceNV & operator=( AccelerationStructureMatrixMotionInstanceNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ AccelerationStructureMatrixMotionInstanceNV & operator=( VkAccelerationStructureMatrixMotionInstanceNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 AccelerationStructureMatrixMotionInstanceNV & setTransformT0( VULKAN_HPP_NAMESPACE::TransformMatrixKHR const & transformT0_ ) VULKAN_HPP_NOEXCEPT { transformT0 = transformT0_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureMatrixMotionInstanceNV & setTransformT1( VULKAN_HPP_NAMESPACE::TransformMatrixKHR const & transformT1_ ) VULKAN_HPP_NOEXCEPT { transformT1 = transformT1_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureMatrixMotionInstanceNV & setInstanceCustomIndex( uint32_t instanceCustomIndex_ ) VULKAN_HPP_NOEXCEPT { instanceCustomIndex = instanceCustomIndex_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureMatrixMotionInstanceNV & setMask( uint32_t mask_ ) VULKAN_HPP_NOEXCEPT { mask = mask_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureMatrixMotionInstanceNV & setInstanceShaderBindingTableRecordOffset( uint32_t instanceShaderBindingTableRecordOffset_ ) VULKAN_HPP_NOEXCEPT { instanceShaderBindingTableRecordOffset = instanceShaderBindingTableRecordOffset_; return *this; } AccelerationStructureMatrixMotionInstanceNV & setFlags( VULKAN_HPP_NAMESPACE::GeometryInstanceFlagsKHR flags_ ) VULKAN_HPP_NOEXCEPT { flags = *reinterpret_cast( &flags_ ); return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureMatrixMotionInstanceNV & setAccelerationStructureReference( uint64_t accelerationStructureReference_ ) VULKAN_HPP_NOEXCEPT { accelerationStructureReference = accelerationStructureReference_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkAccelerationStructureMatrixMotionInstanceNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkAccelerationStructureMatrixMotionInstanceNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( transformT0, transformT1, instanceCustomIndex, mask, instanceShaderBindingTableRecordOffset, flags, accelerationStructureReference ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( AccelerationStructureMatrixMotionInstanceNV const & ) const = default; #else bool operator==( AccelerationStructureMatrixMotionInstanceNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( transformT0 == rhs.transformT0 ) && ( transformT1 == rhs.transformT1 ) && ( instanceCustomIndex == rhs.instanceCustomIndex ) && ( mask == rhs.mask ) && ( instanceShaderBindingTableRecordOffset == rhs.instanceShaderBindingTableRecordOffset ) && ( flags == rhs.flags ) && ( accelerationStructureReference == rhs.accelerationStructureReference ); # endif } bool operator!=( AccelerationStructureMatrixMotionInstanceNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::TransformMatrixKHR transformT0 = {}; VULKAN_HPP_NAMESPACE::TransformMatrixKHR transformT1 = {}; uint32_t instanceCustomIndex : 24; uint32_t mask : 8; uint32_t instanceShaderBindingTableRecordOffset : 24; VkGeometryInstanceFlagsKHR flags : 8; uint64_t accelerationStructureReference = {}; }; struct AccelerationStructureMemoryRequirementsInfoNV { using NativeType = VkAccelerationStructureMemoryRequirementsInfoNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eAccelerationStructureMemoryRequirementsInfoNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR AccelerationStructureMemoryRequirementsInfoNV( VULKAN_HPP_NAMESPACE::AccelerationStructureMemoryRequirementsTypeNV type_ = VULKAN_HPP_NAMESPACE::AccelerationStructureMemoryRequirementsTypeNV::eObject, VULKAN_HPP_NAMESPACE::AccelerationStructureNV accelerationStructure_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , type{ type_ } , accelerationStructure{ accelerationStructure_ } { } VULKAN_HPP_CONSTEXPR AccelerationStructureMemoryRequirementsInfoNV( AccelerationStructureMemoryRequirementsInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; AccelerationStructureMemoryRequirementsInfoNV( VkAccelerationStructureMemoryRequirementsInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT : AccelerationStructureMemoryRequirementsInfoNV( *reinterpret_cast( &rhs ) ) { } AccelerationStructureMemoryRequirementsInfoNV & operator=( AccelerationStructureMemoryRequirementsInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ AccelerationStructureMemoryRequirementsInfoNV & operator=( VkAccelerationStructureMemoryRequirementsInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 AccelerationStructureMemoryRequirementsInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureMemoryRequirementsInfoNV & setType( VULKAN_HPP_NAMESPACE::AccelerationStructureMemoryRequirementsTypeNV type_ ) VULKAN_HPP_NOEXCEPT { type = type_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureMemoryRequirementsInfoNV & setAccelerationStructure( VULKAN_HPP_NAMESPACE::AccelerationStructureNV accelerationStructure_ ) VULKAN_HPP_NOEXCEPT { accelerationStructure = accelerationStructure_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkAccelerationStructureMemoryRequirementsInfoNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkAccelerationStructureMemoryRequirementsInfoNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, type, accelerationStructure ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( AccelerationStructureMemoryRequirementsInfoNV const & ) const = default; #else bool operator==( AccelerationStructureMemoryRequirementsInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( type == rhs.type ) && ( accelerationStructure == rhs.accelerationStructure ); # endif } bool operator!=( AccelerationStructureMemoryRequirementsInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eAccelerationStructureMemoryRequirementsInfoNV; const void * pNext = {}; VULKAN_HPP_NAMESPACE::AccelerationStructureMemoryRequirementsTypeNV type = VULKAN_HPP_NAMESPACE::AccelerationStructureMemoryRequirementsTypeNV::eObject; VULKAN_HPP_NAMESPACE::AccelerationStructureNV accelerationStructure = {}; }; template <> struct CppType { using Type = AccelerationStructureMemoryRequirementsInfoNV; }; struct AccelerationStructureMotionInfoNV { using NativeType = VkAccelerationStructureMotionInfoNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eAccelerationStructureMotionInfoNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR AccelerationStructureMotionInfoNV( uint32_t maxInstances_ = {}, VULKAN_HPP_NAMESPACE::AccelerationStructureMotionInfoFlagsNV flags_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , maxInstances{ maxInstances_ } , flags{ flags_ } { } VULKAN_HPP_CONSTEXPR AccelerationStructureMotionInfoNV( AccelerationStructureMotionInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; AccelerationStructureMotionInfoNV( VkAccelerationStructureMotionInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT : AccelerationStructureMotionInfoNV( *reinterpret_cast( &rhs ) ) { } AccelerationStructureMotionInfoNV & operator=( AccelerationStructureMotionInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ AccelerationStructureMotionInfoNV & operator=( VkAccelerationStructureMotionInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 AccelerationStructureMotionInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureMotionInfoNV & setMaxInstances( uint32_t maxInstances_ ) VULKAN_HPP_NOEXCEPT { maxInstances = maxInstances_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureMotionInfoNV & setFlags( VULKAN_HPP_NAMESPACE::AccelerationStructureMotionInfoFlagsNV flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkAccelerationStructureMotionInfoNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkAccelerationStructureMotionInfoNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, maxInstances, flags ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( AccelerationStructureMotionInfoNV const & ) const = default; #else bool operator==( AccelerationStructureMotionInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( maxInstances == rhs.maxInstances ) && ( flags == rhs.flags ); # endif } bool operator!=( AccelerationStructureMotionInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eAccelerationStructureMotionInfoNV; const void * pNext = {}; uint32_t maxInstances = {}; VULKAN_HPP_NAMESPACE::AccelerationStructureMotionInfoFlagsNV flags = {}; }; template <> struct CppType { using Type = AccelerationStructureMotionInfoNV; }; struct SRTDataNV { using NativeType = VkSRTDataNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR SRTDataNV( float sx_ = {}, float a_ = {}, float b_ = {}, float pvx_ = {}, float sy_ = {}, float c_ = {}, float pvy_ = {}, float sz_ = {}, float pvz_ = {}, float qx_ = {}, float qy_ = {}, float qz_ = {}, float qw_ = {}, float tx_ = {}, float ty_ = {}, float tz_ = {} ) VULKAN_HPP_NOEXCEPT : sx{ sx_ } , a{ a_ } , b{ b_ } , pvx{ pvx_ } , sy{ sy_ } , c{ c_ } , pvy{ pvy_ } , sz{ sz_ } , pvz{ pvz_ } , qx{ qx_ } , qy{ qy_ } , qz{ qz_ } , qw{ qw_ } , tx{ tx_ } , ty{ ty_ } , tz{ tz_ } { } VULKAN_HPP_CONSTEXPR SRTDataNV( SRTDataNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; SRTDataNV( VkSRTDataNV const & rhs ) VULKAN_HPP_NOEXCEPT : SRTDataNV( *reinterpret_cast( &rhs ) ) {} SRTDataNV & operator=( SRTDataNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ SRTDataNV & operator=( VkSRTDataNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 SRTDataNV & setSx( float sx_ ) VULKAN_HPP_NOEXCEPT { sx = sx_; return *this; } VULKAN_HPP_CONSTEXPR_14 SRTDataNV & setA( float a_ ) VULKAN_HPP_NOEXCEPT { a = a_; return *this; } VULKAN_HPP_CONSTEXPR_14 SRTDataNV & setB( float b_ ) VULKAN_HPP_NOEXCEPT { b = b_; return *this; } VULKAN_HPP_CONSTEXPR_14 SRTDataNV & setPvx( float pvx_ ) VULKAN_HPP_NOEXCEPT { pvx = pvx_; return *this; } VULKAN_HPP_CONSTEXPR_14 SRTDataNV & setSy( float sy_ ) VULKAN_HPP_NOEXCEPT { sy = sy_; return *this; } VULKAN_HPP_CONSTEXPR_14 SRTDataNV & setC( float c_ ) VULKAN_HPP_NOEXCEPT { c = c_; return *this; } VULKAN_HPP_CONSTEXPR_14 SRTDataNV & setPvy( float pvy_ ) VULKAN_HPP_NOEXCEPT { pvy = pvy_; return *this; } VULKAN_HPP_CONSTEXPR_14 SRTDataNV & setSz( float sz_ ) VULKAN_HPP_NOEXCEPT { sz = sz_; return *this; } VULKAN_HPP_CONSTEXPR_14 SRTDataNV & setPvz( float pvz_ ) VULKAN_HPP_NOEXCEPT { pvz = pvz_; return *this; } VULKAN_HPP_CONSTEXPR_14 SRTDataNV & setQx( float qx_ ) VULKAN_HPP_NOEXCEPT { qx = qx_; return *this; } VULKAN_HPP_CONSTEXPR_14 SRTDataNV & setQy( float qy_ ) VULKAN_HPP_NOEXCEPT { qy = qy_; return *this; } VULKAN_HPP_CONSTEXPR_14 SRTDataNV & setQz( float qz_ ) VULKAN_HPP_NOEXCEPT { qz = qz_; return *this; } VULKAN_HPP_CONSTEXPR_14 SRTDataNV & setQw( float qw_ ) VULKAN_HPP_NOEXCEPT { qw = qw_; return *this; } VULKAN_HPP_CONSTEXPR_14 SRTDataNV & setTx( float tx_ ) VULKAN_HPP_NOEXCEPT { tx = tx_; return *this; } VULKAN_HPP_CONSTEXPR_14 SRTDataNV & setTy( float ty_ ) VULKAN_HPP_NOEXCEPT { ty = ty_; return *this; } VULKAN_HPP_CONSTEXPR_14 SRTDataNV & setTz( float tz_ ) VULKAN_HPP_NOEXCEPT { tz = tz_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkSRTDataNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkSRTDataNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sx, a, b, pvx, sy, c, pvy, sz, pvz, qx, qy, qz, qw, tx, ty, tz ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( SRTDataNV const & ) const = default; #else bool operator==( SRTDataNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sx == rhs.sx ) && ( a == rhs.a ) && ( b == rhs.b ) && ( pvx == rhs.pvx ) && ( sy == rhs.sy ) && ( c == rhs.c ) && ( pvy == rhs.pvy ) && ( sz == rhs.sz ) && ( pvz == rhs.pvz ) && ( qx == rhs.qx ) && ( qy == rhs.qy ) && ( qz == rhs.qz ) && ( qw == rhs.qw ) && ( tx == rhs.tx ) && ( ty == rhs.ty ) && ( tz == rhs.tz ); # endif } bool operator!=( SRTDataNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: float sx = {}; float a = {}; float b = {}; float pvx = {}; float sy = {}; float c = {}; float pvy = {}; float sz = {}; float pvz = {}; float qx = {}; float qy = {}; float qz = {}; float qw = {}; float tx = {}; float ty = {}; float tz = {}; }; struct AccelerationStructureSRTMotionInstanceNV { using NativeType = VkAccelerationStructureSRTMotionInstanceNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR AccelerationStructureSRTMotionInstanceNV( VULKAN_HPP_NAMESPACE::SRTDataNV transformT0_ = {}, VULKAN_HPP_NAMESPACE::SRTDataNV transformT1_ = {}, uint32_t instanceCustomIndex_ = {}, uint32_t mask_ = {}, uint32_t instanceShaderBindingTableRecordOffset_ = {}, VULKAN_HPP_NAMESPACE::GeometryInstanceFlagsKHR flags_ = {}, uint64_t accelerationStructureReference_ = {} ) VULKAN_HPP_NOEXCEPT : transformT0{ transformT0_ } , transformT1{ transformT1_ } , instanceCustomIndex{ instanceCustomIndex_ } , mask{ mask_ } , instanceShaderBindingTableRecordOffset{ instanceShaderBindingTableRecordOffset_ } , flags{ flags_ } , accelerationStructureReference{ accelerationStructureReference_ } { } VULKAN_HPP_CONSTEXPR AccelerationStructureSRTMotionInstanceNV( AccelerationStructureSRTMotionInstanceNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; AccelerationStructureSRTMotionInstanceNV( VkAccelerationStructureSRTMotionInstanceNV const & rhs ) VULKAN_HPP_NOEXCEPT : AccelerationStructureSRTMotionInstanceNV( *reinterpret_cast( &rhs ) ) { } AccelerationStructureSRTMotionInstanceNV & operator=( AccelerationStructureSRTMotionInstanceNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ AccelerationStructureSRTMotionInstanceNV & operator=( VkAccelerationStructureSRTMotionInstanceNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 AccelerationStructureSRTMotionInstanceNV & setTransformT0( VULKAN_HPP_NAMESPACE::SRTDataNV const & transformT0_ ) VULKAN_HPP_NOEXCEPT { transformT0 = transformT0_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureSRTMotionInstanceNV & setTransformT1( VULKAN_HPP_NAMESPACE::SRTDataNV const & transformT1_ ) VULKAN_HPP_NOEXCEPT { transformT1 = transformT1_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureSRTMotionInstanceNV & setInstanceCustomIndex( uint32_t instanceCustomIndex_ ) VULKAN_HPP_NOEXCEPT { instanceCustomIndex = instanceCustomIndex_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureSRTMotionInstanceNV & setMask( uint32_t mask_ ) VULKAN_HPP_NOEXCEPT { mask = mask_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureSRTMotionInstanceNV & setInstanceShaderBindingTableRecordOffset( uint32_t instanceShaderBindingTableRecordOffset_ ) VULKAN_HPP_NOEXCEPT { instanceShaderBindingTableRecordOffset = instanceShaderBindingTableRecordOffset_; return *this; } AccelerationStructureSRTMotionInstanceNV & setFlags( VULKAN_HPP_NAMESPACE::GeometryInstanceFlagsKHR flags_ ) VULKAN_HPP_NOEXCEPT { flags = *reinterpret_cast( &flags_ ); return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureSRTMotionInstanceNV & setAccelerationStructureReference( uint64_t accelerationStructureReference_ ) VULKAN_HPP_NOEXCEPT { accelerationStructureReference = accelerationStructureReference_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkAccelerationStructureSRTMotionInstanceNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkAccelerationStructureSRTMotionInstanceNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( transformT0, transformT1, instanceCustomIndex, mask, instanceShaderBindingTableRecordOffset, flags, accelerationStructureReference ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( AccelerationStructureSRTMotionInstanceNV const & ) const = default; #else bool operator==( AccelerationStructureSRTMotionInstanceNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( transformT0 == rhs.transformT0 ) && ( transformT1 == rhs.transformT1 ) && ( instanceCustomIndex == rhs.instanceCustomIndex ) && ( mask == rhs.mask ) && ( instanceShaderBindingTableRecordOffset == rhs.instanceShaderBindingTableRecordOffset ) && ( flags == rhs.flags ) && ( accelerationStructureReference == rhs.accelerationStructureReference ); # endif } bool operator!=( AccelerationStructureSRTMotionInstanceNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::SRTDataNV transformT0 = {}; VULKAN_HPP_NAMESPACE::SRTDataNV transformT1 = {}; uint32_t instanceCustomIndex : 24; uint32_t mask : 8; uint32_t instanceShaderBindingTableRecordOffset : 24; VkGeometryInstanceFlagsKHR flags : 8; uint64_t accelerationStructureReference = {}; }; union AccelerationStructureMotionInstanceDataNV { using NativeType = VkAccelerationStructureMotionInstanceDataNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_UNION_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 AccelerationStructureMotionInstanceDataNV( VULKAN_HPP_NAMESPACE::AccelerationStructureInstanceKHR staticInstance_ = {} ) : staticInstance( staticInstance_ ) { } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureMotionInstanceDataNV( VULKAN_HPP_NAMESPACE::AccelerationStructureMatrixMotionInstanceNV matrixMotionInstance_ ) : matrixMotionInstance( matrixMotionInstance_ ) { } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureMotionInstanceDataNV( VULKAN_HPP_NAMESPACE::AccelerationStructureSRTMotionInstanceNV srtMotionInstance_ ) : srtMotionInstance( srtMotionInstance_ ) { } #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_UNION_SETTERS ) VULKAN_HPP_CONSTEXPR_14 AccelerationStructureMotionInstanceDataNV & setStaticInstance( VULKAN_HPP_NAMESPACE::AccelerationStructureInstanceKHR const & staticInstance_ ) VULKAN_HPP_NOEXCEPT { staticInstance = staticInstance_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureMotionInstanceDataNV & setMatrixMotionInstance( VULKAN_HPP_NAMESPACE::AccelerationStructureMatrixMotionInstanceNV const & matrixMotionInstance_ ) VULKAN_HPP_NOEXCEPT { matrixMotionInstance = matrixMotionInstance_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureMotionInstanceDataNV & setSrtMotionInstance( VULKAN_HPP_NAMESPACE::AccelerationStructureSRTMotionInstanceNV const & srtMotionInstance_ ) VULKAN_HPP_NOEXCEPT { srtMotionInstance = srtMotionInstance_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkAccelerationStructureMotionInstanceDataNV const &() const { return *reinterpret_cast( this ); } operator VkAccelerationStructureMotionInstanceDataNV &() { return *reinterpret_cast( this ); } #ifdef VULKAN_HPP_HAS_UNRESTRICTED_UNIONS VULKAN_HPP_NAMESPACE::AccelerationStructureInstanceKHR staticInstance; VULKAN_HPP_NAMESPACE::AccelerationStructureMatrixMotionInstanceNV matrixMotionInstance; VULKAN_HPP_NAMESPACE::AccelerationStructureSRTMotionInstanceNV srtMotionInstance; #else VkAccelerationStructureInstanceKHR staticInstance; VkAccelerationStructureMatrixMotionInstanceNV matrixMotionInstance; VkAccelerationStructureSRTMotionInstanceNV srtMotionInstance; #endif /*VULKAN_HPP_HAS_UNRESTRICTED_UNIONS*/ }; struct AccelerationStructureMotionInstanceNV { using NativeType = VkAccelerationStructureMotionInstanceNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 AccelerationStructureMotionInstanceNV( VULKAN_HPP_NAMESPACE::AccelerationStructureMotionInstanceTypeNV type_ = VULKAN_HPP_NAMESPACE::AccelerationStructureMotionInstanceTypeNV::eStatic, VULKAN_HPP_NAMESPACE::AccelerationStructureMotionInstanceFlagsNV flags_ = {}, VULKAN_HPP_NAMESPACE::AccelerationStructureMotionInstanceDataNV data_ = {} ) VULKAN_HPP_NOEXCEPT : type{ type_ } , flags{ flags_ } , data{ data_ } { } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureMotionInstanceNV( AccelerationStructureMotionInstanceNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; AccelerationStructureMotionInstanceNV( VkAccelerationStructureMotionInstanceNV const & rhs ) VULKAN_HPP_NOEXCEPT : AccelerationStructureMotionInstanceNV( *reinterpret_cast( &rhs ) ) { } AccelerationStructureMotionInstanceNV & operator=( AccelerationStructureMotionInstanceNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ AccelerationStructureMotionInstanceNV & operator=( VkAccelerationStructureMotionInstanceNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 AccelerationStructureMotionInstanceNV & setType( VULKAN_HPP_NAMESPACE::AccelerationStructureMotionInstanceTypeNV type_ ) VULKAN_HPP_NOEXCEPT { type = type_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureMotionInstanceNV & setFlags( VULKAN_HPP_NAMESPACE::AccelerationStructureMotionInstanceFlagsNV flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureMotionInstanceNV & setData( VULKAN_HPP_NAMESPACE::AccelerationStructureMotionInstanceDataNV const & data_ ) VULKAN_HPP_NOEXCEPT { data = data_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkAccelerationStructureMotionInstanceNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkAccelerationStructureMotionInstanceNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( type, flags, data ); } #endif public: VULKAN_HPP_NAMESPACE::AccelerationStructureMotionInstanceTypeNV type = VULKAN_HPP_NAMESPACE::AccelerationStructureMotionInstanceTypeNV::eStatic; VULKAN_HPP_NAMESPACE::AccelerationStructureMotionInstanceFlagsNV flags = {}; VULKAN_HPP_NAMESPACE::AccelerationStructureMotionInstanceDataNV data = {}; }; struct MicromapUsageEXT { using NativeType = VkMicromapUsageEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR MicromapUsageEXT( uint32_t count_ = {}, uint32_t subdivisionLevel_ = {}, uint32_t format_ = {} ) VULKAN_HPP_NOEXCEPT : count{ count_ } , subdivisionLevel{ subdivisionLevel_ } , format{ format_ } { } VULKAN_HPP_CONSTEXPR MicromapUsageEXT( MicromapUsageEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; MicromapUsageEXT( VkMicromapUsageEXT const & rhs ) VULKAN_HPP_NOEXCEPT : MicromapUsageEXT( *reinterpret_cast( &rhs ) ) {} MicromapUsageEXT & operator=( MicromapUsageEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ MicromapUsageEXT & operator=( VkMicromapUsageEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 MicromapUsageEXT & setCount( uint32_t count_ ) VULKAN_HPP_NOEXCEPT { count = count_; return *this; } VULKAN_HPP_CONSTEXPR_14 MicromapUsageEXT & setSubdivisionLevel( uint32_t subdivisionLevel_ ) VULKAN_HPP_NOEXCEPT { subdivisionLevel = subdivisionLevel_; return *this; } VULKAN_HPP_CONSTEXPR_14 MicromapUsageEXT & setFormat( uint32_t format_ ) VULKAN_HPP_NOEXCEPT { format = format_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkMicromapUsageEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkMicromapUsageEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( count, subdivisionLevel, format ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( MicromapUsageEXT const & ) const = default; #else bool operator==( MicromapUsageEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( count == rhs.count ) && ( subdivisionLevel == rhs.subdivisionLevel ) && ( format == rhs.format ); # endif } bool operator!=( MicromapUsageEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: uint32_t count = {}; uint32_t subdivisionLevel = {}; uint32_t format = {}; }; #if defined( VK_ENABLE_BETA_EXTENSIONS ) struct AccelerationStructureTrianglesDisplacementMicromapNV { using NativeType = VkAccelerationStructureTrianglesDisplacementMicromapNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eAccelerationStructureTrianglesDisplacementMicromapNV; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 AccelerationStructureTrianglesDisplacementMicromapNV( VULKAN_HPP_NAMESPACE::Format displacementBiasAndScaleFormat_ = VULKAN_HPP_NAMESPACE::Format::eUndefined, VULKAN_HPP_NAMESPACE::Format displacementVectorFormat_ = VULKAN_HPP_NAMESPACE::Format::eUndefined, VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR displacementBiasAndScaleBuffer_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize displacementBiasAndScaleStride_ = {}, VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR displacementVectorBuffer_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize displacementVectorStride_ = {}, VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR displacedMicromapPrimitiveFlags_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize displacedMicromapPrimitiveFlagsStride_ = {}, VULKAN_HPP_NAMESPACE::IndexType indexType_ = VULKAN_HPP_NAMESPACE::IndexType::eUint16, VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR indexBuffer_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize indexStride_ = {}, uint32_t baseTriangle_ = {}, uint32_t usageCountsCount_ = {}, const VULKAN_HPP_NAMESPACE::MicromapUsageEXT * pUsageCounts_ = {}, const VULKAN_HPP_NAMESPACE::MicromapUsageEXT * const * ppUsageCounts_ = {}, VULKAN_HPP_NAMESPACE::MicromapEXT micromap_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , displacementBiasAndScaleFormat{ displacementBiasAndScaleFormat_ } , displacementVectorFormat{ displacementVectorFormat_ } , displacementBiasAndScaleBuffer{ displacementBiasAndScaleBuffer_ } , displacementBiasAndScaleStride{ displacementBiasAndScaleStride_ } , displacementVectorBuffer{ displacementVectorBuffer_ } , displacementVectorStride{ displacementVectorStride_ } , displacedMicromapPrimitiveFlags{ displacedMicromapPrimitiveFlags_ } , displacedMicromapPrimitiveFlagsStride{ displacedMicromapPrimitiveFlagsStride_ } , indexType{ indexType_ } , indexBuffer{ indexBuffer_ } , indexStride{ indexStride_ } , baseTriangle{ baseTriangle_ } , usageCountsCount{ usageCountsCount_ } , pUsageCounts{ pUsageCounts_ } , ppUsageCounts{ ppUsageCounts_ } , micromap{ micromap_ } { } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureTrianglesDisplacementMicromapNV( AccelerationStructureTrianglesDisplacementMicromapNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; AccelerationStructureTrianglesDisplacementMicromapNV( VkAccelerationStructureTrianglesDisplacementMicromapNV const & rhs ) VULKAN_HPP_NOEXCEPT : AccelerationStructureTrianglesDisplacementMicromapNV( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) AccelerationStructureTrianglesDisplacementMicromapNV( VULKAN_HPP_NAMESPACE::Format displacementBiasAndScaleFormat_, VULKAN_HPP_NAMESPACE::Format displacementVectorFormat_, VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR displacementBiasAndScaleBuffer_, VULKAN_HPP_NAMESPACE::DeviceSize displacementBiasAndScaleStride_, VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR displacementVectorBuffer_, VULKAN_HPP_NAMESPACE::DeviceSize displacementVectorStride_, VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR displacedMicromapPrimitiveFlags_, VULKAN_HPP_NAMESPACE::DeviceSize displacedMicromapPrimitiveFlagsStride_, VULKAN_HPP_NAMESPACE::IndexType indexType_, VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR indexBuffer_, VULKAN_HPP_NAMESPACE::DeviceSize indexStride_, uint32_t baseTriangle_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & usageCounts_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & pUsageCounts_ = {}, VULKAN_HPP_NAMESPACE::MicromapEXT micromap_ = {}, void * pNext_ = nullptr ) : pNext( pNext_ ) , displacementBiasAndScaleFormat( displacementBiasAndScaleFormat_ ) , displacementVectorFormat( displacementVectorFormat_ ) , displacementBiasAndScaleBuffer( displacementBiasAndScaleBuffer_ ) , displacementBiasAndScaleStride( displacementBiasAndScaleStride_ ) , displacementVectorBuffer( displacementVectorBuffer_ ) , displacementVectorStride( displacementVectorStride_ ) , displacedMicromapPrimitiveFlags( displacedMicromapPrimitiveFlags_ ) , displacedMicromapPrimitiveFlagsStride( displacedMicromapPrimitiveFlagsStride_ ) , indexType( indexType_ ) , indexBuffer( indexBuffer_ ) , indexStride( indexStride_ ) , baseTriangle( baseTriangle_ ) , usageCountsCount( static_cast( usageCounts_.size() ) ) , pUsageCounts( usageCounts_.data() ) , ppUsageCounts( pUsageCounts_.data() ) , micromap( micromap_ ) { # ifdef VULKAN_HPP_NO_EXCEPTIONS VULKAN_HPP_ASSERT( usageCounts_.empty() || pUsageCounts_.empty() || ( usageCounts_.size() == pUsageCounts_.size() ) ); # else if ( !usageCounts_.empty() && !pUsageCounts_.empty() && ( usageCounts_.size() != pUsageCounts_.size() ) ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::AccelerationStructureTrianglesDisplacementMicromapNV::AccelerationStructureTrianglesDisplacementMicromapNV: !usageCounts_.empty() && !pUsageCounts_.empty() && ( usageCounts_.size() != pUsageCounts_.size() )" ); } # endif /*VULKAN_HPP_NO_EXCEPTIONS*/ } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ AccelerationStructureTrianglesDisplacementMicromapNV & operator=( AccelerationStructureTrianglesDisplacementMicromapNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ AccelerationStructureTrianglesDisplacementMicromapNV & operator=( VkAccelerationStructureTrianglesDisplacementMicromapNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } # if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 AccelerationStructureTrianglesDisplacementMicromapNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureTrianglesDisplacementMicromapNV & setDisplacementBiasAndScaleFormat( VULKAN_HPP_NAMESPACE::Format displacementBiasAndScaleFormat_ ) VULKAN_HPP_NOEXCEPT { displacementBiasAndScaleFormat = displacementBiasAndScaleFormat_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureTrianglesDisplacementMicromapNV & setDisplacementVectorFormat( VULKAN_HPP_NAMESPACE::Format displacementVectorFormat_ ) VULKAN_HPP_NOEXCEPT { displacementVectorFormat = displacementVectorFormat_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureTrianglesDisplacementMicromapNV & setDisplacementBiasAndScaleBuffer( VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR const & displacementBiasAndScaleBuffer_ ) VULKAN_HPP_NOEXCEPT { displacementBiasAndScaleBuffer = displacementBiasAndScaleBuffer_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureTrianglesDisplacementMicromapNV & setDisplacementBiasAndScaleStride( VULKAN_HPP_NAMESPACE::DeviceSize displacementBiasAndScaleStride_ ) VULKAN_HPP_NOEXCEPT { displacementBiasAndScaleStride = displacementBiasAndScaleStride_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureTrianglesDisplacementMicromapNV & setDisplacementVectorBuffer( VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR const & displacementVectorBuffer_ ) VULKAN_HPP_NOEXCEPT { displacementVectorBuffer = displacementVectorBuffer_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureTrianglesDisplacementMicromapNV & setDisplacementVectorStride( VULKAN_HPP_NAMESPACE::DeviceSize displacementVectorStride_ ) VULKAN_HPP_NOEXCEPT { displacementVectorStride = displacementVectorStride_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureTrianglesDisplacementMicromapNV & setDisplacedMicromapPrimitiveFlags( VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR const & displacedMicromapPrimitiveFlags_ ) VULKAN_HPP_NOEXCEPT { displacedMicromapPrimitiveFlags = displacedMicromapPrimitiveFlags_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureTrianglesDisplacementMicromapNV & setDisplacedMicromapPrimitiveFlagsStride( VULKAN_HPP_NAMESPACE::DeviceSize displacedMicromapPrimitiveFlagsStride_ ) VULKAN_HPP_NOEXCEPT { displacedMicromapPrimitiveFlagsStride = displacedMicromapPrimitiveFlagsStride_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureTrianglesDisplacementMicromapNV & setIndexType( VULKAN_HPP_NAMESPACE::IndexType indexType_ ) VULKAN_HPP_NOEXCEPT { indexType = indexType_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureTrianglesDisplacementMicromapNV & setIndexBuffer( VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR const & indexBuffer_ ) VULKAN_HPP_NOEXCEPT { indexBuffer = indexBuffer_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureTrianglesDisplacementMicromapNV & setIndexStride( VULKAN_HPP_NAMESPACE::DeviceSize indexStride_ ) VULKAN_HPP_NOEXCEPT { indexStride = indexStride_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureTrianglesDisplacementMicromapNV & setBaseTriangle( uint32_t baseTriangle_ ) VULKAN_HPP_NOEXCEPT { baseTriangle = baseTriangle_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureTrianglesDisplacementMicromapNV & setUsageCountsCount( uint32_t usageCountsCount_ ) VULKAN_HPP_NOEXCEPT { usageCountsCount = usageCountsCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureTrianglesDisplacementMicromapNV & setPUsageCounts( const VULKAN_HPP_NAMESPACE::MicromapUsageEXT * pUsageCounts_ ) VULKAN_HPP_NOEXCEPT { pUsageCounts = pUsageCounts_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) AccelerationStructureTrianglesDisplacementMicromapNV & setUsageCounts( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & usageCounts_ ) VULKAN_HPP_NOEXCEPT { usageCountsCount = static_cast( usageCounts_.size() ); pUsageCounts = usageCounts_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 AccelerationStructureTrianglesDisplacementMicromapNV & setPpUsageCounts( const VULKAN_HPP_NAMESPACE::MicromapUsageEXT * const * ppUsageCounts_ ) VULKAN_HPP_NOEXCEPT { ppUsageCounts = ppUsageCounts_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) AccelerationStructureTrianglesDisplacementMicromapNV & setPUsageCounts( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & pUsageCounts_ ) VULKAN_HPP_NOEXCEPT { usageCountsCount = static_cast( pUsageCounts_.size() ); ppUsageCounts = pUsageCounts_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 AccelerationStructureTrianglesDisplacementMicromapNV & setMicromap( VULKAN_HPP_NAMESPACE::MicromapEXT micromap_ ) VULKAN_HPP_NOEXCEPT { micromap = micromap_; return *this; } # endif /*VULKAN_HPP_NO_SETTERS*/ operator VkAccelerationStructureTrianglesDisplacementMicromapNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkAccelerationStructureTrianglesDisplacementMicromapNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, displacementBiasAndScaleFormat, displacementVectorFormat, displacementBiasAndScaleBuffer, displacementBiasAndScaleStride, displacementVectorBuffer, displacementVectorStride, displacedMicromapPrimitiveFlags, displacedMicromapPrimitiveFlagsStride, indexType, indexBuffer, indexStride, baseTriangle, usageCountsCount, pUsageCounts, ppUsageCounts, micromap ); } # endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eAccelerationStructureTrianglesDisplacementMicromapNV; void * pNext = {}; VULKAN_HPP_NAMESPACE::Format displacementBiasAndScaleFormat = VULKAN_HPP_NAMESPACE::Format::eUndefined; VULKAN_HPP_NAMESPACE::Format displacementVectorFormat = VULKAN_HPP_NAMESPACE::Format::eUndefined; VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR displacementBiasAndScaleBuffer = {}; VULKAN_HPP_NAMESPACE::DeviceSize displacementBiasAndScaleStride = {}; VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR displacementVectorBuffer = {}; VULKAN_HPP_NAMESPACE::DeviceSize displacementVectorStride = {}; VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR displacedMicromapPrimitiveFlags = {}; VULKAN_HPP_NAMESPACE::DeviceSize displacedMicromapPrimitiveFlagsStride = {}; VULKAN_HPP_NAMESPACE::IndexType indexType = VULKAN_HPP_NAMESPACE::IndexType::eUint16; VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR indexBuffer = {}; VULKAN_HPP_NAMESPACE::DeviceSize indexStride = {}; uint32_t baseTriangle = {}; uint32_t usageCountsCount = {}; const VULKAN_HPP_NAMESPACE::MicromapUsageEXT * pUsageCounts = {}; const VULKAN_HPP_NAMESPACE::MicromapUsageEXT * const * ppUsageCounts = {}; VULKAN_HPP_NAMESPACE::MicromapEXT micromap = {}; }; template <> struct CppType { using Type = AccelerationStructureTrianglesDisplacementMicromapNV; }; #endif /*VK_ENABLE_BETA_EXTENSIONS*/ struct AccelerationStructureTrianglesOpacityMicromapEXT { using NativeType = VkAccelerationStructureTrianglesOpacityMicromapEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eAccelerationStructureTrianglesOpacityMicromapEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 AccelerationStructureTrianglesOpacityMicromapEXT( VULKAN_HPP_NAMESPACE::IndexType indexType_ = VULKAN_HPP_NAMESPACE::IndexType::eUint16, VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR indexBuffer_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize indexStride_ = {}, uint32_t baseTriangle_ = {}, uint32_t usageCountsCount_ = {}, const VULKAN_HPP_NAMESPACE::MicromapUsageEXT * pUsageCounts_ = {}, const VULKAN_HPP_NAMESPACE::MicromapUsageEXT * const * ppUsageCounts_ = {}, VULKAN_HPP_NAMESPACE::MicromapEXT micromap_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , indexType{ indexType_ } , indexBuffer{ indexBuffer_ } , indexStride{ indexStride_ } , baseTriangle{ baseTriangle_ } , usageCountsCount{ usageCountsCount_ } , pUsageCounts{ pUsageCounts_ } , ppUsageCounts{ ppUsageCounts_ } , micromap{ micromap_ } { } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureTrianglesOpacityMicromapEXT( AccelerationStructureTrianglesOpacityMicromapEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; AccelerationStructureTrianglesOpacityMicromapEXT( VkAccelerationStructureTrianglesOpacityMicromapEXT const & rhs ) VULKAN_HPP_NOEXCEPT : AccelerationStructureTrianglesOpacityMicromapEXT( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) AccelerationStructureTrianglesOpacityMicromapEXT( VULKAN_HPP_NAMESPACE::IndexType indexType_, VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR indexBuffer_, VULKAN_HPP_NAMESPACE::DeviceSize indexStride_, uint32_t baseTriangle_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & usageCounts_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & pUsageCounts_ = {}, VULKAN_HPP_NAMESPACE::MicromapEXT micromap_ = {}, void * pNext_ = nullptr ) : pNext( pNext_ ) , indexType( indexType_ ) , indexBuffer( indexBuffer_ ) , indexStride( indexStride_ ) , baseTriangle( baseTriangle_ ) , usageCountsCount( static_cast( !usageCounts_.empty() ? usageCounts_.size() : pUsageCounts_.size() ) ) , pUsageCounts( usageCounts_.data() ) , ppUsageCounts( pUsageCounts_.data() ) , micromap( micromap_ ) { # ifdef VULKAN_HPP_NO_EXCEPTIONS VULKAN_HPP_ASSERT( ( !usageCounts_.empty() + !pUsageCounts_.empty() ) <= 1 ); # else if ( 1 < ( !usageCounts_.empty() + !pUsageCounts_.empty() ) ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::AccelerationStructureTrianglesOpacityMicromapEXT::AccelerationStructureTrianglesOpacityMicromapEXT: 1 < ( !usageCounts_.empty() + !pUsageCounts_.empty() )" ); } # endif /*VULKAN_HPP_NO_EXCEPTIONS*/ } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ AccelerationStructureTrianglesOpacityMicromapEXT & operator=( AccelerationStructureTrianglesOpacityMicromapEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ AccelerationStructureTrianglesOpacityMicromapEXT & operator=( VkAccelerationStructureTrianglesOpacityMicromapEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 AccelerationStructureTrianglesOpacityMicromapEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureTrianglesOpacityMicromapEXT & setIndexType( VULKAN_HPP_NAMESPACE::IndexType indexType_ ) VULKAN_HPP_NOEXCEPT { indexType = indexType_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureTrianglesOpacityMicromapEXT & setIndexBuffer( VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR const & indexBuffer_ ) VULKAN_HPP_NOEXCEPT { indexBuffer = indexBuffer_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureTrianglesOpacityMicromapEXT & setIndexStride( VULKAN_HPP_NAMESPACE::DeviceSize indexStride_ ) VULKAN_HPP_NOEXCEPT { indexStride = indexStride_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureTrianglesOpacityMicromapEXT & setBaseTriangle( uint32_t baseTriangle_ ) VULKAN_HPP_NOEXCEPT { baseTriangle = baseTriangle_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureTrianglesOpacityMicromapEXT & setUsageCountsCount( uint32_t usageCountsCount_ ) VULKAN_HPP_NOEXCEPT { usageCountsCount = usageCountsCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureTrianglesOpacityMicromapEXT & setPUsageCounts( const VULKAN_HPP_NAMESPACE::MicromapUsageEXT * pUsageCounts_ ) VULKAN_HPP_NOEXCEPT { pUsageCounts = pUsageCounts_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) AccelerationStructureTrianglesOpacityMicromapEXT & setUsageCounts( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & usageCounts_ ) VULKAN_HPP_NOEXCEPT { usageCountsCount = static_cast( usageCounts_.size() ); pUsageCounts = usageCounts_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 AccelerationStructureTrianglesOpacityMicromapEXT & setPpUsageCounts( const VULKAN_HPP_NAMESPACE::MicromapUsageEXT * const * ppUsageCounts_ ) VULKAN_HPP_NOEXCEPT { ppUsageCounts = ppUsageCounts_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) AccelerationStructureTrianglesOpacityMicromapEXT & setPUsageCounts( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & pUsageCounts_ ) VULKAN_HPP_NOEXCEPT { usageCountsCount = static_cast( pUsageCounts_.size() ); ppUsageCounts = pUsageCounts_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 AccelerationStructureTrianglesOpacityMicromapEXT & setMicromap( VULKAN_HPP_NAMESPACE::MicromapEXT micromap_ ) VULKAN_HPP_NOEXCEPT { micromap = micromap_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkAccelerationStructureTrianglesOpacityMicromapEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkAccelerationStructureTrianglesOpacityMicromapEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, indexType, indexBuffer, indexStride, baseTriangle, usageCountsCount, pUsageCounts, ppUsageCounts, micromap ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eAccelerationStructureTrianglesOpacityMicromapEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::IndexType indexType = VULKAN_HPP_NAMESPACE::IndexType::eUint16; VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR indexBuffer = {}; VULKAN_HPP_NAMESPACE::DeviceSize indexStride = {}; uint32_t baseTriangle = {}; uint32_t usageCountsCount = {}; const VULKAN_HPP_NAMESPACE::MicromapUsageEXT * pUsageCounts = {}; const VULKAN_HPP_NAMESPACE::MicromapUsageEXT * const * ppUsageCounts = {}; VULKAN_HPP_NAMESPACE::MicromapEXT micromap = {}; }; template <> struct CppType { using Type = AccelerationStructureTrianglesOpacityMicromapEXT; }; struct AccelerationStructureVersionInfoKHR { using NativeType = VkAccelerationStructureVersionInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eAccelerationStructureVersionInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR AccelerationStructureVersionInfoKHR( const uint8_t * pVersionData_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , pVersionData{ pVersionData_ } { } VULKAN_HPP_CONSTEXPR AccelerationStructureVersionInfoKHR( AccelerationStructureVersionInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; AccelerationStructureVersionInfoKHR( VkAccelerationStructureVersionInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : AccelerationStructureVersionInfoKHR( *reinterpret_cast( &rhs ) ) { } AccelerationStructureVersionInfoKHR & operator=( AccelerationStructureVersionInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ AccelerationStructureVersionInfoKHR & operator=( VkAccelerationStructureVersionInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 AccelerationStructureVersionInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 AccelerationStructureVersionInfoKHR & setPVersionData( const uint8_t * pVersionData_ ) VULKAN_HPP_NOEXCEPT { pVersionData = pVersionData_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkAccelerationStructureVersionInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkAccelerationStructureVersionInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, pVersionData ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( AccelerationStructureVersionInfoKHR const & ) const = default; #else bool operator==( AccelerationStructureVersionInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( pVersionData == rhs.pVersionData ); # endif } bool operator!=( AccelerationStructureVersionInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eAccelerationStructureVersionInfoKHR; const void * pNext = {}; const uint8_t * pVersionData = {}; }; template <> struct CppType { using Type = AccelerationStructureVersionInfoKHR; }; struct AcquireNextImageInfoKHR { using NativeType = VkAcquireNextImageInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eAcquireNextImageInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR AcquireNextImageInfoKHR( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain_ = {}, uint64_t timeout_ = {}, VULKAN_HPP_NAMESPACE::Semaphore semaphore_ = {}, VULKAN_HPP_NAMESPACE::Fence fence_ = {}, uint32_t deviceMask_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , swapchain{ swapchain_ } , timeout{ timeout_ } , semaphore{ semaphore_ } , fence{ fence_ } , deviceMask{ deviceMask_ } { } VULKAN_HPP_CONSTEXPR AcquireNextImageInfoKHR( AcquireNextImageInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; AcquireNextImageInfoKHR( VkAcquireNextImageInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : AcquireNextImageInfoKHR( *reinterpret_cast( &rhs ) ) { } AcquireNextImageInfoKHR & operator=( AcquireNextImageInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ AcquireNextImageInfoKHR & operator=( VkAcquireNextImageInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 AcquireNextImageInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 AcquireNextImageInfoKHR & setSwapchain( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain_ ) VULKAN_HPP_NOEXCEPT { swapchain = swapchain_; return *this; } VULKAN_HPP_CONSTEXPR_14 AcquireNextImageInfoKHR & setTimeout( uint64_t timeout_ ) VULKAN_HPP_NOEXCEPT { timeout = timeout_; return *this; } VULKAN_HPP_CONSTEXPR_14 AcquireNextImageInfoKHR & setSemaphore( VULKAN_HPP_NAMESPACE::Semaphore semaphore_ ) VULKAN_HPP_NOEXCEPT { semaphore = semaphore_; return *this; } VULKAN_HPP_CONSTEXPR_14 AcquireNextImageInfoKHR & setFence( VULKAN_HPP_NAMESPACE::Fence fence_ ) VULKAN_HPP_NOEXCEPT { fence = fence_; return *this; } VULKAN_HPP_CONSTEXPR_14 AcquireNextImageInfoKHR & setDeviceMask( uint32_t deviceMask_ ) VULKAN_HPP_NOEXCEPT { deviceMask = deviceMask_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkAcquireNextImageInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkAcquireNextImageInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, swapchain, timeout, semaphore, fence, deviceMask ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( AcquireNextImageInfoKHR const & ) const = default; #else bool operator==( AcquireNextImageInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( swapchain == rhs.swapchain ) && ( timeout == rhs.timeout ) && ( semaphore == rhs.semaphore ) && ( fence == rhs.fence ) && ( deviceMask == rhs.deviceMask ); # endif } bool operator!=( AcquireNextImageInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eAcquireNextImageInfoKHR; const void * pNext = {}; VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain = {}; uint64_t timeout = {}; VULKAN_HPP_NAMESPACE::Semaphore semaphore = {}; VULKAN_HPP_NAMESPACE::Fence fence = {}; uint32_t deviceMask = {}; }; template <> struct CppType { using Type = AcquireNextImageInfoKHR; }; struct AcquireProfilingLockInfoKHR { using NativeType = VkAcquireProfilingLockInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eAcquireProfilingLockInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR AcquireProfilingLockInfoKHR( VULKAN_HPP_NAMESPACE::AcquireProfilingLockFlagsKHR flags_ = {}, uint64_t timeout_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , timeout{ timeout_ } { } VULKAN_HPP_CONSTEXPR AcquireProfilingLockInfoKHR( AcquireProfilingLockInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; AcquireProfilingLockInfoKHR( VkAcquireProfilingLockInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : AcquireProfilingLockInfoKHR( *reinterpret_cast( &rhs ) ) { } AcquireProfilingLockInfoKHR & operator=( AcquireProfilingLockInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ AcquireProfilingLockInfoKHR & operator=( VkAcquireProfilingLockInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 AcquireProfilingLockInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 AcquireProfilingLockInfoKHR & setFlags( VULKAN_HPP_NAMESPACE::AcquireProfilingLockFlagsKHR flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 AcquireProfilingLockInfoKHR & setTimeout( uint64_t timeout_ ) VULKAN_HPP_NOEXCEPT { timeout = timeout_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkAcquireProfilingLockInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkAcquireProfilingLockInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, timeout ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( AcquireProfilingLockInfoKHR const & ) const = default; #else bool operator==( AcquireProfilingLockInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( timeout == rhs.timeout ); # endif } bool operator!=( AcquireProfilingLockInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eAcquireProfilingLockInfoKHR; const void * pNext = {}; VULKAN_HPP_NAMESPACE::AcquireProfilingLockFlagsKHR flags = {}; uint64_t timeout = {}; }; template <> struct CppType { using Type = AcquireProfilingLockInfoKHR; }; typedef void *( VKAPI_PTR * PFN_AllocationFunction )( void * pUserData, size_t size, size_t alignment, VULKAN_HPP_NAMESPACE::SystemAllocationScope allocationScope ); typedef void *( VKAPI_PTR * PFN_ReallocationFunction )( void * pUserData, void * pOriginal, size_t size, size_t alignment, VULKAN_HPP_NAMESPACE::SystemAllocationScope allocationScope ); typedef void( VKAPI_PTR * PFN_FreeFunction )( void * pUserData, void * pMemory ); typedef void( VKAPI_PTR * PFN_InternalAllocationNotification )( void * pUserData, size_t size, VULKAN_HPP_NAMESPACE::InternalAllocationType allocationType, VULKAN_HPP_NAMESPACE::SystemAllocationScope allocationScope ); typedef void( VKAPI_PTR * PFN_InternalFreeNotification )( void * pUserData, size_t size, VULKAN_HPP_NAMESPACE::InternalAllocationType allocationType, VULKAN_HPP_NAMESPACE::SystemAllocationScope allocationScope ); struct AllocationCallbacks { using NativeType = VkAllocationCallbacks; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR AllocationCallbacks( void * pUserData_ = {}, VULKAN_HPP_NAMESPACE::PFN_AllocationFunction pfnAllocation_ = {}, VULKAN_HPP_NAMESPACE::PFN_ReallocationFunction pfnReallocation_ = {}, VULKAN_HPP_NAMESPACE::PFN_FreeFunction pfnFree_ = {}, VULKAN_HPP_NAMESPACE::PFN_InternalAllocationNotification pfnInternalAllocation_ = {}, VULKAN_HPP_NAMESPACE::PFN_InternalFreeNotification pfnInternalFree_ = {} ) VULKAN_HPP_NOEXCEPT : pUserData{ pUserData_ } , pfnAllocation{ pfnAllocation_ } , pfnReallocation{ pfnReallocation_ } , pfnFree{ pfnFree_ } , pfnInternalAllocation{ pfnInternalAllocation_ } , pfnInternalFree{ pfnInternalFree_ } { } VULKAN_HPP_CONSTEXPR AllocationCallbacks( AllocationCallbacks const & rhs ) VULKAN_HPP_NOEXCEPT = default; AllocationCallbacks( VkAllocationCallbacks const & rhs ) VULKAN_HPP_NOEXCEPT : AllocationCallbacks( *reinterpret_cast( &rhs ) ) { } # if defined( __clang__ ) || defined( __GNUC__ ) # pragma GCC diagnostic push # if defined( __clang__ ) # pragma clang diagnostic ignored "-Wunknown-warning-option" # endif # pragma GCC diagnostic ignored "-Wcast-function-type" # endif VULKAN_HPP_DEPRECATED( "This constructor is deprecated. Use the one taking function pointer types from the vk-namespace instead." ) AllocationCallbacks( void * pUserData_, PFN_vkAllocationFunction pfnAllocation_, PFN_vkReallocationFunction pfnReallocation_ = {}, PFN_vkFreeFunction pfnFree_ = {}, PFN_vkInternalAllocationNotification pfnInternalAllocation_ = {}, PFN_vkInternalFreeNotification pfnInternalFree_ = {} ) VULKAN_HPP_NOEXCEPT : AllocationCallbacks( pUserData_, reinterpret_cast( pfnAllocation_ ), reinterpret_cast( pfnReallocation_ ), reinterpret_cast( pfnFree_ ), reinterpret_cast( pfnInternalAllocation_ ), reinterpret_cast( pfnInternalFree_ ) ) { } # if defined( __clang__ ) || defined( __GNUC__ ) # pragma GCC diagnostic pop # endif AllocationCallbacks & operator=( AllocationCallbacks const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ AllocationCallbacks & operator=( VkAllocationCallbacks const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 AllocationCallbacks & setPUserData( void * pUserData_ ) VULKAN_HPP_NOEXCEPT { pUserData = pUserData_; return *this; } VULKAN_HPP_CONSTEXPR_14 AllocationCallbacks & setPfnAllocation( VULKAN_HPP_NAMESPACE::PFN_AllocationFunction pfnAllocation_ ) VULKAN_HPP_NOEXCEPT { pfnAllocation = pfnAllocation_; return *this; } VULKAN_HPP_CONSTEXPR_14 AllocationCallbacks & setPfnReallocation( VULKAN_HPP_NAMESPACE::PFN_ReallocationFunction pfnReallocation_ ) VULKAN_HPP_NOEXCEPT { pfnReallocation = pfnReallocation_; return *this; } VULKAN_HPP_CONSTEXPR_14 AllocationCallbacks & setPfnFree( VULKAN_HPP_NAMESPACE::PFN_FreeFunction pfnFree_ ) VULKAN_HPP_NOEXCEPT { pfnFree = pfnFree_; return *this; } VULKAN_HPP_CONSTEXPR_14 AllocationCallbacks & setPfnInternalAllocation( VULKAN_HPP_NAMESPACE::PFN_InternalAllocationNotification pfnInternalAllocation_ ) VULKAN_HPP_NOEXCEPT { pfnInternalAllocation = pfnInternalAllocation_; return *this; } VULKAN_HPP_CONSTEXPR_14 AllocationCallbacks & setPfnInternalFree( VULKAN_HPP_NAMESPACE::PFN_InternalFreeNotification pfnInternalFree_ ) VULKAN_HPP_NOEXCEPT { pfnInternalFree = pfnInternalFree_; return *this; } # if defined( __clang__ ) || defined( __GNUC__ ) # pragma GCC diagnostic push # if defined( __clang__ ) # pragma clang diagnostic ignored "-Wunknown-warning-option" # endif # pragma GCC diagnostic ignored "-Wcast-function-type" # endif VULKAN_HPP_DEPRECATED( "This setter is deprecated. Use the one taking a function pointer type from the vk-namespace instead." ) AllocationCallbacks & setPfnAllocation( PFN_vkAllocationFunction pfnAllocation_ ) VULKAN_HPP_NOEXCEPT { return setPfnAllocation( reinterpret_cast( pfnAllocation_ ) ); } VULKAN_HPP_DEPRECATED( "This setter is deprecated. Use the one taking a function pointer type from the vk-namespace instead." ) AllocationCallbacks & setPfnReallocation( PFN_vkReallocationFunction pfnReallocation_ ) VULKAN_HPP_NOEXCEPT { return setPfnReallocation( reinterpret_cast( pfnReallocation_ ) ); } VULKAN_HPP_DEPRECATED( "This setter is deprecated. Use the one taking a function pointer type from the vk-namespace instead." ) AllocationCallbacks & setPfnInternalAllocation( PFN_vkInternalAllocationNotification pfnInternalAllocation_ ) VULKAN_HPP_NOEXCEPT { return setPfnInternalAllocation( reinterpret_cast( pfnInternalAllocation_ ) ); } VULKAN_HPP_DEPRECATED( "This setter is deprecated. Use the one taking a function pointer type from the vk-namespace instead." ) AllocationCallbacks & setPfnInternalFree( PFN_vkInternalFreeNotification pfnInternalFree_ ) VULKAN_HPP_NOEXCEPT { return setPfnInternalFree( reinterpret_cast( pfnInternalFree_ ) ); } # if defined( __clang__ ) || defined( __GNUC__ ) # pragma GCC diagnostic pop # endif #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkAllocationCallbacks const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkAllocationCallbacks &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( pUserData, pfnAllocation, pfnReallocation, pfnFree, pfnInternalAllocation, pfnInternalFree ); } #endif bool operator==( AllocationCallbacks const & rhs ) const VULKAN_HPP_NOEXCEPT { #if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); #else return ( pUserData == rhs.pUserData ) && ( pfnAllocation == rhs.pfnAllocation ) && ( pfnReallocation == rhs.pfnReallocation ) && ( pfnFree == rhs.pfnFree ) && ( pfnInternalAllocation == rhs.pfnInternalAllocation ) && ( pfnInternalFree == rhs.pfnInternalFree ); #endif } bool operator!=( AllocationCallbacks const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: void * pUserData = {}; VULKAN_HPP_NAMESPACE::PFN_AllocationFunction pfnAllocation = {}; VULKAN_HPP_NAMESPACE::PFN_ReallocationFunction pfnReallocation = {}; VULKAN_HPP_NAMESPACE::PFN_FreeFunction pfnFree = {}; VULKAN_HPP_NAMESPACE::PFN_InternalAllocationNotification pfnInternalAllocation = {}; VULKAN_HPP_NAMESPACE::PFN_InternalFreeNotification pfnInternalFree = {}; }; struct AmigoProfilingSubmitInfoSEC { using NativeType = VkAmigoProfilingSubmitInfoSEC; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eAmigoProfilingSubmitInfoSEC; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR AmigoProfilingSubmitInfoSEC( uint64_t firstDrawTimestamp_ = {}, uint64_t swapBufferTimestamp_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , firstDrawTimestamp{ firstDrawTimestamp_ } , swapBufferTimestamp{ swapBufferTimestamp_ } { } VULKAN_HPP_CONSTEXPR AmigoProfilingSubmitInfoSEC( AmigoProfilingSubmitInfoSEC const & rhs ) VULKAN_HPP_NOEXCEPT = default; AmigoProfilingSubmitInfoSEC( VkAmigoProfilingSubmitInfoSEC const & rhs ) VULKAN_HPP_NOEXCEPT : AmigoProfilingSubmitInfoSEC( *reinterpret_cast( &rhs ) ) { } AmigoProfilingSubmitInfoSEC & operator=( AmigoProfilingSubmitInfoSEC const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ AmigoProfilingSubmitInfoSEC & operator=( VkAmigoProfilingSubmitInfoSEC const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 AmigoProfilingSubmitInfoSEC & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 AmigoProfilingSubmitInfoSEC & setFirstDrawTimestamp( uint64_t firstDrawTimestamp_ ) VULKAN_HPP_NOEXCEPT { firstDrawTimestamp = firstDrawTimestamp_; return *this; } VULKAN_HPP_CONSTEXPR_14 AmigoProfilingSubmitInfoSEC & setSwapBufferTimestamp( uint64_t swapBufferTimestamp_ ) VULKAN_HPP_NOEXCEPT { swapBufferTimestamp = swapBufferTimestamp_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkAmigoProfilingSubmitInfoSEC const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkAmigoProfilingSubmitInfoSEC &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, firstDrawTimestamp, swapBufferTimestamp ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( AmigoProfilingSubmitInfoSEC const & ) const = default; #else bool operator==( AmigoProfilingSubmitInfoSEC const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( firstDrawTimestamp == rhs.firstDrawTimestamp ) && ( swapBufferTimestamp == rhs.swapBufferTimestamp ); # endif } bool operator!=( AmigoProfilingSubmitInfoSEC const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eAmigoProfilingSubmitInfoSEC; const void * pNext = {}; uint64_t firstDrawTimestamp = {}; uint64_t swapBufferTimestamp = {}; }; template <> struct CppType { using Type = AmigoProfilingSubmitInfoSEC; }; struct ComponentMapping { using NativeType = VkComponentMapping; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ComponentMapping( VULKAN_HPP_NAMESPACE::ComponentSwizzle r_ = VULKAN_HPP_NAMESPACE::ComponentSwizzle::eIdentity, VULKAN_HPP_NAMESPACE::ComponentSwizzle g_ = VULKAN_HPP_NAMESPACE::ComponentSwizzle::eIdentity, VULKAN_HPP_NAMESPACE::ComponentSwizzle b_ = VULKAN_HPP_NAMESPACE::ComponentSwizzle::eIdentity, VULKAN_HPP_NAMESPACE::ComponentSwizzle a_ = VULKAN_HPP_NAMESPACE::ComponentSwizzle::eIdentity ) VULKAN_HPP_NOEXCEPT : r{ r_ } , g{ g_ } , b{ b_ } , a{ a_ } { } VULKAN_HPP_CONSTEXPR ComponentMapping( ComponentMapping const & rhs ) VULKAN_HPP_NOEXCEPT = default; ComponentMapping( VkComponentMapping const & rhs ) VULKAN_HPP_NOEXCEPT : ComponentMapping( *reinterpret_cast( &rhs ) ) {} ComponentMapping & operator=( ComponentMapping const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ComponentMapping & operator=( VkComponentMapping const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ComponentMapping & setR( VULKAN_HPP_NAMESPACE::ComponentSwizzle r_ ) VULKAN_HPP_NOEXCEPT { r = r_; return *this; } VULKAN_HPP_CONSTEXPR_14 ComponentMapping & setG( VULKAN_HPP_NAMESPACE::ComponentSwizzle g_ ) VULKAN_HPP_NOEXCEPT { g = g_; return *this; } VULKAN_HPP_CONSTEXPR_14 ComponentMapping & setB( VULKAN_HPP_NAMESPACE::ComponentSwizzle b_ ) VULKAN_HPP_NOEXCEPT { b = b_; return *this; } VULKAN_HPP_CONSTEXPR_14 ComponentMapping & setA( VULKAN_HPP_NAMESPACE::ComponentSwizzle a_ ) VULKAN_HPP_NOEXCEPT { a = a_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkComponentMapping const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkComponentMapping &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( r, g, b, a ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ComponentMapping const & ) const = default; #else bool operator==( ComponentMapping const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( r == rhs.r ) && ( g == rhs.g ) && ( b == rhs.b ) && ( a == rhs.a ); # endif } bool operator!=( ComponentMapping const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::ComponentSwizzle r = VULKAN_HPP_NAMESPACE::ComponentSwizzle::eIdentity; VULKAN_HPP_NAMESPACE::ComponentSwizzle g = VULKAN_HPP_NAMESPACE::ComponentSwizzle::eIdentity; VULKAN_HPP_NAMESPACE::ComponentSwizzle b = VULKAN_HPP_NAMESPACE::ComponentSwizzle::eIdentity; VULKAN_HPP_NAMESPACE::ComponentSwizzle a = VULKAN_HPP_NAMESPACE::ComponentSwizzle::eIdentity; }; #if defined( VK_USE_PLATFORM_ANDROID_KHR ) struct AndroidHardwareBufferFormatProperties2ANDROID { using NativeType = VkAndroidHardwareBufferFormatProperties2ANDROID; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eAndroidHardwareBufferFormatProperties2ANDROID; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR AndroidHardwareBufferFormatProperties2ANDROID( VULKAN_HPP_NAMESPACE::Format format_ = VULKAN_HPP_NAMESPACE::Format::eUndefined, uint64_t externalFormat_ = {}, VULKAN_HPP_NAMESPACE::FormatFeatureFlags2 formatFeatures_ = {}, VULKAN_HPP_NAMESPACE::ComponentMapping samplerYcbcrConversionComponents_ = {}, VULKAN_HPP_NAMESPACE::SamplerYcbcrModelConversion suggestedYcbcrModel_ = VULKAN_HPP_NAMESPACE::SamplerYcbcrModelConversion::eRgbIdentity, VULKAN_HPP_NAMESPACE::SamplerYcbcrRange suggestedYcbcrRange_ = VULKAN_HPP_NAMESPACE::SamplerYcbcrRange::eItuFull, VULKAN_HPP_NAMESPACE::ChromaLocation suggestedXChromaOffset_ = VULKAN_HPP_NAMESPACE::ChromaLocation::eCositedEven, VULKAN_HPP_NAMESPACE::ChromaLocation suggestedYChromaOffset_ = VULKAN_HPP_NAMESPACE::ChromaLocation::eCositedEven, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , format{ format_ } , externalFormat{ externalFormat_ } , formatFeatures{ formatFeatures_ } , samplerYcbcrConversionComponents{ samplerYcbcrConversionComponents_ } , suggestedYcbcrModel{ suggestedYcbcrModel_ } , suggestedYcbcrRange{ suggestedYcbcrRange_ } , suggestedXChromaOffset{ suggestedXChromaOffset_ } , suggestedYChromaOffset{ suggestedYChromaOffset_ } { } VULKAN_HPP_CONSTEXPR AndroidHardwareBufferFormatProperties2ANDROID( AndroidHardwareBufferFormatProperties2ANDROID const & rhs ) VULKAN_HPP_NOEXCEPT = default; AndroidHardwareBufferFormatProperties2ANDROID( VkAndroidHardwareBufferFormatProperties2ANDROID const & rhs ) VULKAN_HPP_NOEXCEPT : AndroidHardwareBufferFormatProperties2ANDROID( *reinterpret_cast( &rhs ) ) { } AndroidHardwareBufferFormatProperties2ANDROID & operator=( AndroidHardwareBufferFormatProperties2ANDROID const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ AndroidHardwareBufferFormatProperties2ANDROID & operator=( VkAndroidHardwareBufferFormatProperties2ANDROID const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkAndroidHardwareBufferFormatProperties2ANDROID const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkAndroidHardwareBufferFormatProperties2ANDROID &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, format, externalFormat, formatFeatures, samplerYcbcrConversionComponents, suggestedYcbcrModel, suggestedYcbcrRange, suggestedXChromaOffset, suggestedYChromaOffset ); } # endif # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( AndroidHardwareBufferFormatProperties2ANDROID const & ) const = default; # else bool operator==( AndroidHardwareBufferFormatProperties2ANDROID const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( format == rhs.format ) && ( externalFormat == rhs.externalFormat ) && ( formatFeatures == rhs.formatFeatures ) && ( samplerYcbcrConversionComponents == rhs.samplerYcbcrConversionComponents ) && ( suggestedYcbcrModel == rhs.suggestedYcbcrModel ) && ( suggestedYcbcrRange == rhs.suggestedYcbcrRange ) && ( suggestedXChromaOffset == rhs.suggestedXChromaOffset ) && ( suggestedYChromaOffset == rhs.suggestedYChromaOffset ); # endif } bool operator!=( AndroidHardwareBufferFormatProperties2ANDROID const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } # endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eAndroidHardwareBufferFormatProperties2ANDROID; void * pNext = {}; VULKAN_HPP_NAMESPACE::Format format = VULKAN_HPP_NAMESPACE::Format::eUndefined; uint64_t externalFormat = {}; VULKAN_HPP_NAMESPACE::FormatFeatureFlags2 formatFeatures = {}; VULKAN_HPP_NAMESPACE::ComponentMapping samplerYcbcrConversionComponents = {}; VULKAN_HPP_NAMESPACE::SamplerYcbcrModelConversion suggestedYcbcrModel = VULKAN_HPP_NAMESPACE::SamplerYcbcrModelConversion::eRgbIdentity; VULKAN_HPP_NAMESPACE::SamplerYcbcrRange suggestedYcbcrRange = VULKAN_HPP_NAMESPACE::SamplerYcbcrRange::eItuFull; VULKAN_HPP_NAMESPACE::ChromaLocation suggestedXChromaOffset = VULKAN_HPP_NAMESPACE::ChromaLocation::eCositedEven; VULKAN_HPP_NAMESPACE::ChromaLocation suggestedYChromaOffset = VULKAN_HPP_NAMESPACE::ChromaLocation::eCositedEven; }; template <> struct CppType { using Type = AndroidHardwareBufferFormatProperties2ANDROID; }; #endif /*VK_USE_PLATFORM_ANDROID_KHR*/ #if defined( VK_USE_PLATFORM_ANDROID_KHR ) struct AndroidHardwareBufferFormatPropertiesANDROID { using NativeType = VkAndroidHardwareBufferFormatPropertiesANDROID; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eAndroidHardwareBufferFormatPropertiesANDROID; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR AndroidHardwareBufferFormatPropertiesANDROID( VULKAN_HPP_NAMESPACE::Format format_ = VULKAN_HPP_NAMESPACE::Format::eUndefined, uint64_t externalFormat_ = {}, VULKAN_HPP_NAMESPACE::FormatFeatureFlags formatFeatures_ = {}, VULKAN_HPP_NAMESPACE::ComponentMapping samplerYcbcrConversionComponents_ = {}, VULKAN_HPP_NAMESPACE::SamplerYcbcrModelConversion suggestedYcbcrModel_ = VULKAN_HPP_NAMESPACE::SamplerYcbcrModelConversion::eRgbIdentity, VULKAN_HPP_NAMESPACE::SamplerYcbcrRange suggestedYcbcrRange_ = VULKAN_HPP_NAMESPACE::SamplerYcbcrRange::eItuFull, VULKAN_HPP_NAMESPACE::ChromaLocation suggestedXChromaOffset_ = VULKAN_HPP_NAMESPACE::ChromaLocation::eCositedEven, VULKAN_HPP_NAMESPACE::ChromaLocation suggestedYChromaOffset_ = VULKAN_HPP_NAMESPACE::ChromaLocation::eCositedEven, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , format{ format_ } , externalFormat{ externalFormat_ } , formatFeatures{ formatFeatures_ } , samplerYcbcrConversionComponents{ samplerYcbcrConversionComponents_ } , suggestedYcbcrModel{ suggestedYcbcrModel_ } , suggestedYcbcrRange{ suggestedYcbcrRange_ } , suggestedXChromaOffset{ suggestedXChromaOffset_ } , suggestedYChromaOffset{ suggestedYChromaOffset_ } { } VULKAN_HPP_CONSTEXPR AndroidHardwareBufferFormatPropertiesANDROID( AndroidHardwareBufferFormatPropertiesANDROID const & rhs ) VULKAN_HPP_NOEXCEPT = default; AndroidHardwareBufferFormatPropertiesANDROID( VkAndroidHardwareBufferFormatPropertiesANDROID const & rhs ) VULKAN_HPP_NOEXCEPT : AndroidHardwareBufferFormatPropertiesANDROID( *reinterpret_cast( &rhs ) ) { } AndroidHardwareBufferFormatPropertiesANDROID & operator=( AndroidHardwareBufferFormatPropertiesANDROID const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ AndroidHardwareBufferFormatPropertiesANDROID & operator=( VkAndroidHardwareBufferFormatPropertiesANDROID const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkAndroidHardwareBufferFormatPropertiesANDROID const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkAndroidHardwareBufferFormatPropertiesANDROID &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, format, externalFormat, formatFeatures, samplerYcbcrConversionComponents, suggestedYcbcrModel, suggestedYcbcrRange, suggestedXChromaOffset, suggestedYChromaOffset ); } # endif # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( AndroidHardwareBufferFormatPropertiesANDROID const & ) const = default; # else bool operator==( AndroidHardwareBufferFormatPropertiesANDROID const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( format == rhs.format ) && ( externalFormat == rhs.externalFormat ) && ( formatFeatures == rhs.formatFeatures ) && ( samplerYcbcrConversionComponents == rhs.samplerYcbcrConversionComponents ) && ( suggestedYcbcrModel == rhs.suggestedYcbcrModel ) && ( suggestedYcbcrRange == rhs.suggestedYcbcrRange ) && ( suggestedXChromaOffset == rhs.suggestedXChromaOffset ) && ( suggestedYChromaOffset == rhs.suggestedYChromaOffset ); # endif } bool operator!=( AndroidHardwareBufferFormatPropertiesANDROID const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } # endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eAndroidHardwareBufferFormatPropertiesANDROID; void * pNext = {}; VULKAN_HPP_NAMESPACE::Format format = VULKAN_HPP_NAMESPACE::Format::eUndefined; uint64_t externalFormat = {}; VULKAN_HPP_NAMESPACE::FormatFeatureFlags formatFeatures = {}; VULKAN_HPP_NAMESPACE::ComponentMapping samplerYcbcrConversionComponents = {}; VULKAN_HPP_NAMESPACE::SamplerYcbcrModelConversion suggestedYcbcrModel = VULKAN_HPP_NAMESPACE::SamplerYcbcrModelConversion::eRgbIdentity; VULKAN_HPP_NAMESPACE::SamplerYcbcrRange suggestedYcbcrRange = VULKAN_HPP_NAMESPACE::SamplerYcbcrRange::eItuFull; VULKAN_HPP_NAMESPACE::ChromaLocation suggestedXChromaOffset = VULKAN_HPP_NAMESPACE::ChromaLocation::eCositedEven; VULKAN_HPP_NAMESPACE::ChromaLocation suggestedYChromaOffset = VULKAN_HPP_NAMESPACE::ChromaLocation::eCositedEven; }; template <> struct CppType { using Type = AndroidHardwareBufferFormatPropertiesANDROID; }; #endif /*VK_USE_PLATFORM_ANDROID_KHR*/ #if defined( VK_USE_PLATFORM_ANDROID_KHR ) struct AndroidHardwareBufferFormatResolvePropertiesANDROID { using NativeType = VkAndroidHardwareBufferFormatResolvePropertiesANDROID; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eAndroidHardwareBufferFormatResolvePropertiesANDROID; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR AndroidHardwareBufferFormatResolvePropertiesANDROID( VULKAN_HPP_NAMESPACE::Format colorAttachmentFormat_ = VULKAN_HPP_NAMESPACE::Format::eUndefined, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , colorAttachmentFormat{ colorAttachmentFormat_ } { } VULKAN_HPP_CONSTEXPR AndroidHardwareBufferFormatResolvePropertiesANDROID( AndroidHardwareBufferFormatResolvePropertiesANDROID const & rhs ) VULKAN_HPP_NOEXCEPT = default; AndroidHardwareBufferFormatResolvePropertiesANDROID( VkAndroidHardwareBufferFormatResolvePropertiesANDROID const & rhs ) VULKAN_HPP_NOEXCEPT : AndroidHardwareBufferFormatResolvePropertiesANDROID( *reinterpret_cast( &rhs ) ) { } AndroidHardwareBufferFormatResolvePropertiesANDROID & operator=( AndroidHardwareBufferFormatResolvePropertiesANDROID const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ AndroidHardwareBufferFormatResolvePropertiesANDROID & operator=( VkAndroidHardwareBufferFormatResolvePropertiesANDROID const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkAndroidHardwareBufferFormatResolvePropertiesANDROID const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkAndroidHardwareBufferFormatResolvePropertiesANDROID &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, colorAttachmentFormat ); } # endif # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( AndroidHardwareBufferFormatResolvePropertiesANDROID const & ) const = default; # else bool operator==( AndroidHardwareBufferFormatResolvePropertiesANDROID const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( colorAttachmentFormat == rhs.colorAttachmentFormat ); # endif } bool operator!=( AndroidHardwareBufferFormatResolvePropertiesANDROID const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } # endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eAndroidHardwareBufferFormatResolvePropertiesANDROID; void * pNext = {}; VULKAN_HPP_NAMESPACE::Format colorAttachmentFormat = VULKAN_HPP_NAMESPACE::Format::eUndefined; }; template <> struct CppType { using Type = AndroidHardwareBufferFormatResolvePropertiesANDROID; }; #endif /*VK_USE_PLATFORM_ANDROID_KHR*/ #if defined( VK_USE_PLATFORM_ANDROID_KHR ) struct AndroidHardwareBufferPropertiesANDROID { using NativeType = VkAndroidHardwareBufferPropertiesANDROID; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eAndroidHardwareBufferPropertiesANDROID; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR AndroidHardwareBufferPropertiesANDROID( VULKAN_HPP_NAMESPACE::DeviceSize allocationSize_ = {}, uint32_t memoryTypeBits_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , allocationSize{ allocationSize_ } , memoryTypeBits{ memoryTypeBits_ } { } VULKAN_HPP_CONSTEXPR AndroidHardwareBufferPropertiesANDROID( AndroidHardwareBufferPropertiesANDROID const & rhs ) VULKAN_HPP_NOEXCEPT = default; AndroidHardwareBufferPropertiesANDROID( VkAndroidHardwareBufferPropertiesANDROID const & rhs ) VULKAN_HPP_NOEXCEPT : AndroidHardwareBufferPropertiesANDROID( *reinterpret_cast( &rhs ) ) { } AndroidHardwareBufferPropertiesANDROID & operator=( AndroidHardwareBufferPropertiesANDROID const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ AndroidHardwareBufferPropertiesANDROID & operator=( VkAndroidHardwareBufferPropertiesANDROID const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkAndroidHardwareBufferPropertiesANDROID const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkAndroidHardwareBufferPropertiesANDROID &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, allocationSize, memoryTypeBits ); } # endif # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( AndroidHardwareBufferPropertiesANDROID const & ) const = default; # else bool operator==( AndroidHardwareBufferPropertiesANDROID const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( allocationSize == rhs.allocationSize ) && ( memoryTypeBits == rhs.memoryTypeBits ); # endif } bool operator!=( AndroidHardwareBufferPropertiesANDROID const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } # endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eAndroidHardwareBufferPropertiesANDROID; void * pNext = {}; VULKAN_HPP_NAMESPACE::DeviceSize allocationSize = {}; uint32_t memoryTypeBits = {}; }; template <> struct CppType { using Type = AndroidHardwareBufferPropertiesANDROID; }; #endif /*VK_USE_PLATFORM_ANDROID_KHR*/ #if defined( VK_USE_PLATFORM_ANDROID_KHR ) struct AndroidHardwareBufferUsageANDROID { using NativeType = VkAndroidHardwareBufferUsageANDROID; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eAndroidHardwareBufferUsageANDROID; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR AndroidHardwareBufferUsageANDROID( uint64_t androidHardwareBufferUsage_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , androidHardwareBufferUsage{ androidHardwareBufferUsage_ } { } VULKAN_HPP_CONSTEXPR AndroidHardwareBufferUsageANDROID( AndroidHardwareBufferUsageANDROID const & rhs ) VULKAN_HPP_NOEXCEPT = default; AndroidHardwareBufferUsageANDROID( VkAndroidHardwareBufferUsageANDROID const & rhs ) VULKAN_HPP_NOEXCEPT : AndroidHardwareBufferUsageANDROID( *reinterpret_cast( &rhs ) ) { } AndroidHardwareBufferUsageANDROID & operator=( AndroidHardwareBufferUsageANDROID const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ AndroidHardwareBufferUsageANDROID & operator=( VkAndroidHardwareBufferUsageANDROID const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkAndroidHardwareBufferUsageANDROID const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkAndroidHardwareBufferUsageANDROID &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, androidHardwareBufferUsage ); } # endif # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( AndroidHardwareBufferUsageANDROID const & ) const = default; # else bool operator==( AndroidHardwareBufferUsageANDROID const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( androidHardwareBufferUsage == rhs.androidHardwareBufferUsage ); # endif } bool operator!=( AndroidHardwareBufferUsageANDROID const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } # endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eAndroidHardwareBufferUsageANDROID; void * pNext = {}; uint64_t androidHardwareBufferUsage = {}; }; template <> struct CppType { using Type = AndroidHardwareBufferUsageANDROID; }; #endif /*VK_USE_PLATFORM_ANDROID_KHR*/ #if defined( VK_USE_PLATFORM_ANDROID_KHR ) struct AndroidSurfaceCreateInfoKHR { using NativeType = VkAndroidSurfaceCreateInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eAndroidSurfaceCreateInfoKHR; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR AndroidSurfaceCreateInfoKHR( VULKAN_HPP_NAMESPACE::AndroidSurfaceCreateFlagsKHR flags_ = {}, struct ANativeWindow * window_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , window{ window_ } { } VULKAN_HPP_CONSTEXPR AndroidSurfaceCreateInfoKHR( AndroidSurfaceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; AndroidSurfaceCreateInfoKHR( VkAndroidSurfaceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : AndroidSurfaceCreateInfoKHR( *reinterpret_cast( &rhs ) ) { } AndroidSurfaceCreateInfoKHR & operator=( AndroidSurfaceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ AndroidSurfaceCreateInfoKHR & operator=( VkAndroidSurfaceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } # if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 AndroidSurfaceCreateInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 AndroidSurfaceCreateInfoKHR & setFlags( VULKAN_HPP_NAMESPACE::AndroidSurfaceCreateFlagsKHR flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 AndroidSurfaceCreateInfoKHR & setWindow( struct ANativeWindow * window_ ) VULKAN_HPP_NOEXCEPT { window = window_; return *this; } # endif /*VULKAN_HPP_NO_SETTERS*/ operator VkAndroidSurfaceCreateInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkAndroidSurfaceCreateInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, window ); } # endif # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( AndroidSurfaceCreateInfoKHR const & ) const = default; # else bool operator==( AndroidSurfaceCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( window == rhs.window ); # endif } bool operator!=( AndroidSurfaceCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } # endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eAndroidSurfaceCreateInfoKHR; const void * pNext = {}; VULKAN_HPP_NAMESPACE::AndroidSurfaceCreateFlagsKHR flags = {}; struct ANativeWindow * window = {}; }; template <> struct CppType { using Type = AndroidSurfaceCreateInfoKHR; }; #endif /*VK_USE_PLATFORM_ANDROID_KHR*/ struct AntiLagPresentationInfoAMD { using NativeType = VkAntiLagPresentationInfoAMD; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eAntiLagPresentationInfoAMD; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR AntiLagPresentationInfoAMD( VULKAN_HPP_NAMESPACE::AntiLagStageAMD stage_ = VULKAN_HPP_NAMESPACE::AntiLagStageAMD::eInput, uint64_t frameIndex_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , stage{ stage_ } , frameIndex{ frameIndex_ } { } VULKAN_HPP_CONSTEXPR AntiLagPresentationInfoAMD( AntiLagPresentationInfoAMD const & rhs ) VULKAN_HPP_NOEXCEPT = default; AntiLagPresentationInfoAMD( VkAntiLagPresentationInfoAMD const & rhs ) VULKAN_HPP_NOEXCEPT : AntiLagPresentationInfoAMD( *reinterpret_cast( &rhs ) ) { } AntiLagPresentationInfoAMD & operator=( AntiLagPresentationInfoAMD const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ AntiLagPresentationInfoAMD & operator=( VkAntiLagPresentationInfoAMD const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 AntiLagPresentationInfoAMD & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 AntiLagPresentationInfoAMD & setStage( VULKAN_HPP_NAMESPACE::AntiLagStageAMD stage_ ) VULKAN_HPP_NOEXCEPT { stage = stage_; return *this; } VULKAN_HPP_CONSTEXPR_14 AntiLagPresentationInfoAMD & setFrameIndex( uint64_t frameIndex_ ) VULKAN_HPP_NOEXCEPT { frameIndex = frameIndex_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkAntiLagPresentationInfoAMD const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkAntiLagPresentationInfoAMD &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, stage, frameIndex ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( AntiLagPresentationInfoAMD const & ) const = default; #else bool operator==( AntiLagPresentationInfoAMD const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( stage == rhs.stage ) && ( frameIndex == rhs.frameIndex ); # endif } bool operator!=( AntiLagPresentationInfoAMD const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eAntiLagPresentationInfoAMD; void * pNext = {}; VULKAN_HPP_NAMESPACE::AntiLagStageAMD stage = VULKAN_HPP_NAMESPACE::AntiLagStageAMD::eInput; uint64_t frameIndex = {}; }; template <> struct CppType { using Type = AntiLagPresentationInfoAMD; }; struct AntiLagDataAMD { using NativeType = VkAntiLagDataAMD; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eAntiLagDataAMD; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR AntiLagDataAMD( VULKAN_HPP_NAMESPACE::AntiLagModeAMD mode_ = VULKAN_HPP_NAMESPACE::AntiLagModeAMD::eDriverControl, uint32_t maxFPS_ = {}, const VULKAN_HPP_NAMESPACE::AntiLagPresentationInfoAMD * pPresentationInfo_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , mode{ mode_ } , maxFPS{ maxFPS_ } , pPresentationInfo{ pPresentationInfo_ } { } VULKAN_HPP_CONSTEXPR AntiLagDataAMD( AntiLagDataAMD const & rhs ) VULKAN_HPP_NOEXCEPT = default; AntiLagDataAMD( VkAntiLagDataAMD const & rhs ) VULKAN_HPP_NOEXCEPT : AntiLagDataAMD( *reinterpret_cast( &rhs ) ) {} AntiLagDataAMD & operator=( AntiLagDataAMD const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ AntiLagDataAMD & operator=( VkAntiLagDataAMD const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 AntiLagDataAMD & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 AntiLagDataAMD & setMode( VULKAN_HPP_NAMESPACE::AntiLagModeAMD mode_ ) VULKAN_HPP_NOEXCEPT { mode = mode_; return *this; } VULKAN_HPP_CONSTEXPR_14 AntiLagDataAMD & setMaxFPS( uint32_t maxFPS_ ) VULKAN_HPP_NOEXCEPT { maxFPS = maxFPS_; return *this; } VULKAN_HPP_CONSTEXPR_14 AntiLagDataAMD & setPPresentationInfo( const VULKAN_HPP_NAMESPACE::AntiLagPresentationInfoAMD * pPresentationInfo_ ) VULKAN_HPP_NOEXCEPT { pPresentationInfo = pPresentationInfo_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkAntiLagDataAMD const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkAntiLagDataAMD &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, mode, maxFPS, pPresentationInfo ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( AntiLagDataAMD const & ) const = default; #else bool operator==( AntiLagDataAMD const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( mode == rhs.mode ) && ( maxFPS == rhs.maxFPS ) && ( pPresentationInfo == rhs.pPresentationInfo ); # endif } bool operator!=( AntiLagDataAMD const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eAntiLagDataAMD; const void * pNext = {}; VULKAN_HPP_NAMESPACE::AntiLagModeAMD mode = VULKAN_HPP_NAMESPACE::AntiLagModeAMD::eDriverControl; uint32_t maxFPS = {}; const VULKAN_HPP_NAMESPACE::AntiLagPresentationInfoAMD * pPresentationInfo = {}; }; template <> struct CppType { using Type = AntiLagDataAMD; }; struct ApplicationInfo { using NativeType = VkApplicationInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eApplicationInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ApplicationInfo( const char * pApplicationName_ = {}, uint32_t applicationVersion_ = {}, const char * pEngineName_ = {}, uint32_t engineVersion_ = {}, uint32_t apiVersion_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , pApplicationName{ pApplicationName_ } , applicationVersion{ applicationVersion_ } , pEngineName{ pEngineName_ } , engineVersion{ engineVersion_ } , apiVersion{ apiVersion_ } { } VULKAN_HPP_CONSTEXPR ApplicationInfo( ApplicationInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; ApplicationInfo( VkApplicationInfo const & rhs ) VULKAN_HPP_NOEXCEPT : ApplicationInfo( *reinterpret_cast( &rhs ) ) {} ApplicationInfo & operator=( ApplicationInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ApplicationInfo & operator=( VkApplicationInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ApplicationInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ApplicationInfo & setPApplicationName( const char * pApplicationName_ ) VULKAN_HPP_NOEXCEPT { pApplicationName = pApplicationName_; return *this; } VULKAN_HPP_CONSTEXPR_14 ApplicationInfo & setApplicationVersion( uint32_t applicationVersion_ ) VULKAN_HPP_NOEXCEPT { applicationVersion = applicationVersion_; return *this; } VULKAN_HPP_CONSTEXPR_14 ApplicationInfo & setPEngineName( const char * pEngineName_ ) VULKAN_HPP_NOEXCEPT { pEngineName = pEngineName_; return *this; } VULKAN_HPP_CONSTEXPR_14 ApplicationInfo & setEngineVersion( uint32_t engineVersion_ ) VULKAN_HPP_NOEXCEPT { engineVersion = engineVersion_; return *this; } VULKAN_HPP_CONSTEXPR_14 ApplicationInfo & setApiVersion( uint32_t apiVersion_ ) VULKAN_HPP_NOEXCEPT { apiVersion = apiVersion_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkApplicationInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkApplicationInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, pApplicationName, applicationVersion, pEngineName, engineVersion, apiVersion ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) std::strong_ordering operator<=>( ApplicationInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { if ( auto cmp = sType <=> rhs.sType; cmp != 0 ) return cmp; if ( auto cmp = pNext <=> rhs.pNext; cmp != 0 ) return cmp; if ( pApplicationName != rhs.pApplicationName ) if ( auto cmp = strcmp( pApplicationName, rhs.pApplicationName ); cmp != 0 ) return ( cmp < 0 ) ? std::strong_ordering::less : std::strong_ordering::greater; if ( auto cmp = applicationVersion <=> rhs.applicationVersion; cmp != 0 ) return cmp; if ( pEngineName != rhs.pEngineName ) if ( auto cmp = strcmp( pEngineName, rhs.pEngineName ); cmp != 0 ) return ( cmp < 0 ) ? std::strong_ordering::less : std::strong_ordering::greater; if ( auto cmp = engineVersion <=> rhs.engineVersion; cmp != 0 ) return cmp; if ( auto cmp = apiVersion <=> rhs.apiVersion; cmp != 0 ) return cmp; return std::strong_ordering::equivalent; } #endif bool operator==( ApplicationInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( ( pApplicationName == rhs.pApplicationName ) || ( strcmp( pApplicationName, rhs.pApplicationName ) == 0 ) ) && ( applicationVersion == rhs.applicationVersion ) && ( ( pEngineName == rhs.pEngineName ) || ( strcmp( pEngineName, rhs.pEngineName ) == 0 ) ) && ( engineVersion == rhs.engineVersion ) && ( apiVersion == rhs.apiVersion ); } bool operator!=( ApplicationInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eApplicationInfo; const void * pNext = {}; const char * pApplicationName = {}; uint32_t applicationVersion = {}; const char * pEngineName = {}; uint32_t engineVersion = {}; uint32_t apiVersion = {}; }; template <> struct CppType { using Type = ApplicationInfo; }; struct AttachmentDescription { using NativeType = VkAttachmentDescription; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR AttachmentDescription( VULKAN_HPP_NAMESPACE::AttachmentDescriptionFlags flags_ = {}, VULKAN_HPP_NAMESPACE::Format format_ = VULKAN_HPP_NAMESPACE::Format::eUndefined, VULKAN_HPP_NAMESPACE::SampleCountFlagBits samples_ = VULKAN_HPP_NAMESPACE::SampleCountFlagBits::e1, VULKAN_HPP_NAMESPACE::AttachmentLoadOp loadOp_ = VULKAN_HPP_NAMESPACE::AttachmentLoadOp::eLoad, VULKAN_HPP_NAMESPACE::AttachmentStoreOp storeOp_ = VULKAN_HPP_NAMESPACE::AttachmentStoreOp::eStore, VULKAN_HPP_NAMESPACE::AttachmentLoadOp stencilLoadOp_ = VULKAN_HPP_NAMESPACE::AttachmentLoadOp::eLoad, VULKAN_HPP_NAMESPACE::AttachmentStoreOp stencilStoreOp_ = VULKAN_HPP_NAMESPACE::AttachmentStoreOp::eStore, VULKAN_HPP_NAMESPACE::ImageLayout initialLayout_ = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined, VULKAN_HPP_NAMESPACE::ImageLayout finalLayout_ = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined ) VULKAN_HPP_NOEXCEPT : flags{ flags_ } , format{ format_ } , samples{ samples_ } , loadOp{ loadOp_ } , storeOp{ storeOp_ } , stencilLoadOp{ stencilLoadOp_ } , stencilStoreOp{ stencilStoreOp_ } , initialLayout{ initialLayout_ } , finalLayout{ finalLayout_ } { } VULKAN_HPP_CONSTEXPR AttachmentDescription( AttachmentDescription const & rhs ) VULKAN_HPP_NOEXCEPT = default; AttachmentDescription( VkAttachmentDescription const & rhs ) VULKAN_HPP_NOEXCEPT : AttachmentDescription( *reinterpret_cast( &rhs ) ) { } AttachmentDescription & operator=( AttachmentDescription const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ AttachmentDescription & operator=( VkAttachmentDescription const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 AttachmentDescription & setFlags( VULKAN_HPP_NAMESPACE::AttachmentDescriptionFlags flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 AttachmentDescription & setFormat( VULKAN_HPP_NAMESPACE::Format format_ ) VULKAN_HPP_NOEXCEPT { format = format_; return *this; } VULKAN_HPP_CONSTEXPR_14 AttachmentDescription & setSamples( VULKAN_HPP_NAMESPACE::SampleCountFlagBits samples_ ) VULKAN_HPP_NOEXCEPT { samples = samples_; return *this; } VULKAN_HPP_CONSTEXPR_14 AttachmentDescription & setLoadOp( VULKAN_HPP_NAMESPACE::AttachmentLoadOp loadOp_ ) VULKAN_HPP_NOEXCEPT { loadOp = loadOp_; return *this; } VULKAN_HPP_CONSTEXPR_14 AttachmentDescription & setStoreOp( VULKAN_HPP_NAMESPACE::AttachmentStoreOp storeOp_ ) VULKAN_HPP_NOEXCEPT { storeOp = storeOp_; return *this; } VULKAN_HPP_CONSTEXPR_14 AttachmentDescription & setStencilLoadOp( VULKAN_HPP_NAMESPACE::AttachmentLoadOp stencilLoadOp_ ) VULKAN_HPP_NOEXCEPT { stencilLoadOp = stencilLoadOp_; return *this; } VULKAN_HPP_CONSTEXPR_14 AttachmentDescription & setStencilStoreOp( VULKAN_HPP_NAMESPACE::AttachmentStoreOp stencilStoreOp_ ) VULKAN_HPP_NOEXCEPT { stencilStoreOp = stencilStoreOp_; return *this; } VULKAN_HPP_CONSTEXPR_14 AttachmentDescription & setInitialLayout( VULKAN_HPP_NAMESPACE::ImageLayout initialLayout_ ) VULKAN_HPP_NOEXCEPT { initialLayout = initialLayout_; return *this; } VULKAN_HPP_CONSTEXPR_14 AttachmentDescription & setFinalLayout( VULKAN_HPP_NAMESPACE::ImageLayout finalLayout_ ) VULKAN_HPP_NOEXCEPT { finalLayout = finalLayout_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkAttachmentDescription const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkAttachmentDescription &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( flags, format, samples, loadOp, storeOp, stencilLoadOp, stencilStoreOp, initialLayout, finalLayout ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( AttachmentDescription const & ) const = default; #else bool operator==( AttachmentDescription const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( flags == rhs.flags ) && ( format == rhs.format ) && ( samples == rhs.samples ) && ( loadOp == rhs.loadOp ) && ( storeOp == rhs.storeOp ) && ( stencilLoadOp == rhs.stencilLoadOp ) && ( stencilStoreOp == rhs.stencilStoreOp ) && ( initialLayout == rhs.initialLayout ) && ( finalLayout == rhs.finalLayout ); # endif } bool operator!=( AttachmentDescription const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::AttachmentDescriptionFlags flags = {}; VULKAN_HPP_NAMESPACE::Format format = VULKAN_HPP_NAMESPACE::Format::eUndefined; VULKAN_HPP_NAMESPACE::SampleCountFlagBits samples = VULKAN_HPP_NAMESPACE::SampleCountFlagBits::e1; VULKAN_HPP_NAMESPACE::AttachmentLoadOp loadOp = VULKAN_HPP_NAMESPACE::AttachmentLoadOp::eLoad; VULKAN_HPP_NAMESPACE::AttachmentStoreOp storeOp = VULKAN_HPP_NAMESPACE::AttachmentStoreOp::eStore; VULKAN_HPP_NAMESPACE::AttachmentLoadOp stencilLoadOp = VULKAN_HPP_NAMESPACE::AttachmentLoadOp::eLoad; VULKAN_HPP_NAMESPACE::AttachmentStoreOp stencilStoreOp = VULKAN_HPP_NAMESPACE::AttachmentStoreOp::eStore; VULKAN_HPP_NAMESPACE::ImageLayout initialLayout = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined; VULKAN_HPP_NAMESPACE::ImageLayout finalLayout = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined; }; struct AttachmentDescription2 { using NativeType = VkAttachmentDescription2; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eAttachmentDescription2; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR AttachmentDescription2( VULKAN_HPP_NAMESPACE::AttachmentDescriptionFlags flags_ = {}, VULKAN_HPP_NAMESPACE::Format format_ = VULKAN_HPP_NAMESPACE::Format::eUndefined, VULKAN_HPP_NAMESPACE::SampleCountFlagBits samples_ = VULKAN_HPP_NAMESPACE::SampleCountFlagBits::e1, VULKAN_HPP_NAMESPACE::AttachmentLoadOp loadOp_ = VULKAN_HPP_NAMESPACE::AttachmentLoadOp::eLoad, VULKAN_HPP_NAMESPACE::AttachmentStoreOp storeOp_ = VULKAN_HPP_NAMESPACE::AttachmentStoreOp::eStore, VULKAN_HPP_NAMESPACE::AttachmentLoadOp stencilLoadOp_ = VULKAN_HPP_NAMESPACE::AttachmentLoadOp::eLoad, VULKAN_HPP_NAMESPACE::AttachmentStoreOp stencilStoreOp_ = VULKAN_HPP_NAMESPACE::AttachmentStoreOp::eStore, VULKAN_HPP_NAMESPACE::ImageLayout initialLayout_ = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined, VULKAN_HPP_NAMESPACE::ImageLayout finalLayout_ = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , format{ format_ } , samples{ samples_ } , loadOp{ loadOp_ } , storeOp{ storeOp_ } , stencilLoadOp{ stencilLoadOp_ } , stencilStoreOp{ stencilStoreOp_ } , initialLayout{ initialLayout_ } , finalLayout{ finalLayout_ } { } VULKAN_HPP_CONSTEXPR AttachmentDescription2( AttachmentDescription2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; AttachmentDescription2( VkAttachmentDescription2 const & rhs ) VULKAN_HPP_NOEXCEPT : AttachmentDescription2( *reinterpret_cast( &rhs ) ) { } AttachmentDescription2 & operator=( AttachmentDescription2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ AttachmentDescription2 & operator=( VkAttachmentDescription2 const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 AttachmentDescription2 & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 AttachmentDescription2 & setFlags( VULKAN_HPP_NAMESPACE::AttachmentDescriptionFlags flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 AttachmentDescription2 & setFormat( VULKAN_HPP_NAMESPACE::Format format_ ) VULKAN_HPP_NOEXCEPT { format = format_; return *this; } VULKAN_HPP_CONSTEXPR_14 AttachmentDescription2 & setSamples( VULKAN_HPP_NAMESPACE::SampleCountFlagBits samples_ ) VULKAN_HPP_NOEXCEPT { samples = samples_; return *this; } VULKAN_HPP_CONSTEXPR_14 AttachmentDescription2 & setLoadOp( VULKAN_HPP_NAMESPACE::AttachmentLoadOp loadOp_ ) VULKAN_HPP_NOEXCEPT { loadOp = loadOp_; return *this; } VULKAN_HPP_CONSTEXPR_14 AttachmentDescription2 & setStoreOp( VULKAN_HPP_NAMESPACE::AttachmentStoreOp storeOp_ ) VULKAN_HPP_NOEXCEPT { storeOp = storeOp_; return *this; } VULKAN_HPP_CONSTEXPR_14 AttachmentDescription2 & setStencilLoadOp( VULKAN_HPP_NAMESPACE::AttachmentLoadOp stencilLoadOp_ ) VULKAN_HPP_NOEXCEPT { stencilLoadOp = stencilLoadOp_; return *this; } VULKAN_HPP_CONSTEXPR_14 AttachmentDescription2 & setStencilStoreOp( VULKAN_HPP_NAMESPACE::AttachmentStoreOp stencilStoreOp_ ) VULKAN_HPP_NOEXCEPT { stencilStoreOp = stencilStoreOp_; return *this; } VULKAN_HPP_CONSTEXPR_14 AttachmentDescription2 & setInitialLayout( VULKAN_HPP_NAMESPACE::ImageLayout initialLayout_ ) VULKAN_HPP_NOEXCEPT { initialLayout = initialLayout_; return *this; } VULKAN_HPP_CONSTEXPR_14 AttachmentDescription2 & setFinalLayout( VULKAN_HPP_NAMESPACE::ImageLayout finalLayout_ ) VULKAN_HPP_NOEXCEPT { finalLayout = finalLayout_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkAttachmentDescription2 const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkAttachmentDescription2 &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, format, samples, loadOp, storeOp, stencilLoadOp, stencilStoreOp, initialLayout, finalLayout ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( AttachmentDescription2 const & ) const = default; #else bool operator==( AttachmentDescription2 const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( format == rhs.format ) && ( samples == rhs.samples ) && ( loadOp == rhs.loadOp ) && ( storeOp == rhs.storeOp ) && ( stencilLoadOp == rhs.stencilLoadOp ) && ( stencilStoreOp == rhs.stencilStoreOp ) && ( initialLayout == rhs.initialLayout ) && ( finalLayout == rhs.finalLayout ); # endif } bool operator!=( AttachmentDescription2 const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eAttachmentDescription2; const void * pNext = {}; VULKAN_HPP_NAMESPACE::AttachmentDescriptionFlags flags = {}; VULKAN_HPP_NAMESPACE::Format format = VULKAN_HPP_NAMESPACE::Format::eUndefined; VULKAN_HPP_NAMESPACE::SampleCountFlagBits samples = VULKAN_HPP_NAMESPACE::SampleCountFlagBits::e1; VULKAN_HPP_NAMESPACE::AttachmentLoadOp loadOp = VULKAN_HPP_NAMESPACE::AttachmentLoadOp::eLoad; VULKAN_HPP_NAMESPACE::AttachmentStoreOp storeOp = VULKAN_HPP_NAMESPACE::AttachmentStoreOp::eStore; VULKAN_HPP_NAMESPACE::AttachmentLoadOp stencilLoadOp = VULKAN_HPP_NAMESPACE::AttachmentLoadOp::eLoad; VULKAN_HPP_NAMESPACE::AttachmentStoreOp stencilStoreOp = VULKAN_HPP_NAMESPACE::AttachmentStoreOp::eStore; VULKAN_HPP_NAMESPACE::ImageLayout initialLayout = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined; VULKAN_HPP_NAMESPACE::ImageLayout finalLayout = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined; }; template <> struct CppType { using Type = AttachmentDescription2; }; using AttachmentDescription2KHR = AttachmentDescription2; struct AttachmentDescriptionStencilLayout { using NativeType = VkAttachmentDescriptionStencilLayout; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eAttachmentDescriptionStencilLayout; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR AttachmentDescriptionStencilLayout( VULKAN_HPP_NAMESPACE::ImageLayout stencilInitialLayout_ = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined, VULKAN_HPP_NAMESPACE::ImageLayout stencilFinalLayout_ = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , stencilInitialLayout{ stencilInitialLayout_ } , stencilFinalLayout{ stencilFinalLayout_ } { } VULKAN_HPP_CONSTEXPR AttachmentDescriptionStencilLayout( AttachmentDescriptionStencilLayout const & rhs ) VULKAN_HPP_NOEXCEPT = default; AttachmentDescriptionStencilLayout( VkAttachmentDescriptionStencilLayout const & rhs ) VULKAN_HPP_NOEXCEPT : AttachmentDescriptionStencilLayout( *reinterpret_cast( &rhs ) ) { } AttachmentDescriptionStencilLayout & operator=( AttachmentDescriptionStencilLayout const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ AttachmentDescriptionStencilLayout & operator=( VkAttachmentDescriptionStencilLayout const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 AttachmentDescriptionStencilLayout & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 AttachmentDescriptionStencilLayout & setStencilInitialLayout( VULKAN_HPP_NAMESPACE::ImageLayout stencilInitialLayout_ ) VULKAN_HPP_NOEXCEPT { stencilInitialLayout = stencilInitialLayout_; return *this; } VULKAN_HPP_CONSTEXPR_14 AttachmentDescriptionStencilLayout & setStencilFinalLayout( VULKAN_HPP_NAMESPACE::ImageLayout stencilFinalLayout_ ) VULKAN_HPP_NOEXCEPT { stencilFinalLayout = stencilFinalLayout_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkAttachmentDescriptionStencilLayout const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkAttachmentDescriptionStencilLayout &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std:: tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, stencilInitialLayout, stencilFinalLayout ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( AttachmentDescriptionStencilLayout const & ) const = default; #else bool operator==( AttachmentDescriptionStencilLayout const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( stencilInitialLayout == rhs.stencilInitialLayout ) && ( stencilFinalLayout == rhs.stencilFinalLayout ); # endif } bool operator!=( AttachmentDescriptionStencilLayout const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eAttachmentDescriptionStencilLayout; void * pNext = {}; VULKAN_HPP_NAMESPACE::ImageLayout stencilInitialLayout = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined; VULKAN_HPP_NAMESPACE::ImageLayout stencilFinalLayout = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined; }; template <> struct CppType { using Type = AttachmentDescriptionStencilLayout; }; using AttachmentDescriptionStencilLayoutKHR = AttachmentDescriptionStencilLayout; struct AttachmentReference { using NativeType = VkAttachmentReference; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR AttachmentReference( uint32_t attachment_ = {}, VULKAN_HPP_NAMESPACE::ImageLayout layout_ = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined ) VULKAN_HPP_NOEXCEPT : attachment{ attachment_ } , layout{ layout_ } { } VULKAN_HPP_CONSTEXPR AttachmentReference( AttachmentReference const & rhs ) VULKAN_HPP_NOEXCEPT = default; AttachmentReference( VkAttachmentReference const & rhs ) VULKAN_HPP_NOEXCEPT : AttachmentReference( *reinterpret_cast( &rhs ) ) { } AttachmentReference & operator=( AttachmentReference const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ AttachmentReference & operator=( VkAttachmentReference const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 AttachmentReference & setAttachment( uint32_t attachment_ ) VULKAN_HPP_NOEXCEPT { attachment = attachment_; return *this; } VULKAN_HPP_CONSTEXPR_14 AttachmentReference & setLayout( VULKAN_HPP_NAMESPACE::ImageLayout layout_ ) VULKAN_HPP_NOEXCEPT { layout = layout_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkAttachmentReference const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkAttachmentReference &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( attachment, layout ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( AttachmentReference const & ) const = default; #else bool operator==( AttachmentReference const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( attachment == rhs.attachment ) && ( layout == rhs.layout ); # endif } bool operator!=( AttachmentReference const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: uint32_t attachment = {}; VULKAN_HPP_NAMESPACE::ImageLayout layout = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined; }; struct AttachmentReference2 { using NativeType = VkAttachmentReference2; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eAttachmentReference2; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR AttachmentReference2( uint32_t attachment_ = {}, VULKAN_HPP_NAMESPACE::ImageLayout layout_ = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined, VULKAN_HPP_NAMESPACE::ImageAspectFlags aspectMask_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , attachment{ attachment_ } , layout{ layout_ } , aspectMask{ aspectMask_ } { } VULKAN_HPP_CONSTEXPR AttachmentReference2( AttachmentReference2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; AttachmentReference2( VkAttachmentReference2 const & rhs ) VULKAN_HPP_NOEXCEPT : AttachmentReference2( *reinterpret_cast( &rhs ) ) { } AttachmentReference2 & operator=( AttachmentReference2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ AttachmentReference2 & operator=( VkAttachmentReference2 const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 AttachmentReference2 & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 AttachmentReference2 & setAttachment( uint32_t attachment_ ) VULKAN_HPP_NOEXCEPT { attachment = attachment_; return *this; } VULKAN_HPP_CONSTEXPR_14 AttachmentReference2 & setLayout( VULKAN_HPP_NAMESPACE::ImageLayout layout_ ) VULKAN_HPP_NOEXCEPT { layout = layout_; return *this; } VULKAN_HPP_CONSTEXPR_14 AttachmentReference2 & setAspectMask( VULKAN_HPP_NAMESPACE::ImageAspectFlags aspectMask_ ) VULKAN_HPP_NOEXCEPT { aspectMask = aspectMask_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkAttachmentReference2 const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkAttachmentReference2 &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, attachment, layout, aspectMask ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( AttachmentReference2 const & ) const = default; #else bool operator==( AttachmentReference2 const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( attachment == rhs.attachment ) && ( layout == rhs.layout ) && ( aspectMask == rhs.aspectMask ); # endif } bool operator!=( AttachmentReference2 const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eAttachmentReference2; const void * pNext = {}; uint32_t attachment = {}; VULKAN_HPP_NAMESPACE::ImageLayout layout = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined; VULKAN_HPP_NAMESPACE::ImageAspectFlags aspectMask = {}; }; template <> struct CppType { using Type = AttachmentReference2; }; using AttachmentReference2KHR = AttachmentReference2; struct AttachmentReferenceStencilLayout { using NativeType = VkAttachmentReferenceStencilLayout; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eAttachmentReferenceStencilLayout; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR AttachmentReferenceStencilLayout( VULKAN_HPP_NAMESPACE::ImageLayout stencilLayout_ = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , stencilLayout{ stencilLayout_ } { } VULKAN_HPP_CONSTEXPR AttachmentReferenceStencilLayout( AttachmentReferenceStencilLayout const & rhs ) VULKAN_HPP_NOEXCEPT = default; AttachmentReferenceStencilLayout( VkAttachmentReferenceStencilLayout const & rhs ) VULKAN_HPP_NOEXCEPT : AttachmentReferenceStencilLayout( *reinterpret_cast( &rhs ) ) { } AttachmentReferenceStencilLayout & operator=( AttachmentReferenceStencilLayout const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ AttachmentReferenceStencilLayout & operator=( VkAttachmentReferenceStencilLayout const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 AttachmentReferenceStencilLayout & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 AttachmentReferenceStencilLayout & setStencilLayout( VULKAN_HPP_NAMESPACE::ImageLayout stencilLayout_ ) VULKAN_HPP_NOEXCEPT { stencilLayout = stencilLayout_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkAttachmentReferenceStencilLayout const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkAttachmentReferenceStencilLayout &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, stencilLayout ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( AttachmentReferenceStencilLayout const & ) const = default; #else bool operator==( AttachmentReferenceStencilLayout const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( stencilLayout == rhs.stencilLayout ); # endif } bool operator!=( AttachmentReferenceStencilLayout const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eAttachmentReferenceStencilLayout; void * pNext = {}; VULKAN_HPP_NAMESPACE::ImageLayout stencilLayout = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined; }; template <> struct CppType { using Type = AttachmentReferenceStencilLayout; }; using AttachmentReferenceStencilLayoutKHR = AttachmentReferenceStencilLayout; struct AttachmentSampleCountInfoAMD { using NativeType = VkAttachmentSampleCountInfoAMD; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eAttachmentSampleCountInfoAMD; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR AttachmentSampleCountInfoAMD( uint32_t colorAttachmentCount_ = {}, const VULKAN_HPP_NAMESPACE::SampleCountFlagBits * pColorAttachmentSamples_ = {}, VULKAN_HPP_NAMESPACE::SampleCountFlagBits depthStencilAttachmentSamples_ = VULKAN_HPP_NAMESPACE::SampleCountFlagBits::e1, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , colorAttachmentCount{ colorAttachmentCount_ } , pColorAttachmentSamples{ pColorAttachmentSamples_ } , depthStencilAttachmentSamples{ depthStencilAttachmentSamples_ } { } VULKAN_HPP_CONSTEXPR AttachmentSampleCountInfoAMD( AttachmentSampleCountInfoAMD const & rhs ) VULKAN_HPP_NOEXCEPT = default; AttachmentSampleCountInfoAMD( VkAttachmentSampleCountInfoAMD const & rhs ) VULKAN_HPP_NOEXCEPT : AttachmentSampleCountInfoAMD( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) AttachmentSampleCountInfoAMD( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & colorAttachmentSamples_, VULKAN_HPP_NAMESPACE::SampleCountFlagBits depthStencilAttachmentSamples_ = VULKAN_HPP_NAMESPACE::SampleCountFlagBits::e1, const void * pNext_ = nullptr ) : pNext( pNext_ ) , colorAttachmentCount( static_cast( colorAttachmentSamples_.size() ) ) , pColorAttachmentSamples( colorAttachmentSamples_.data() ) , depthStencilAttachmentSamples( depthStencilAttachmentSamples_ ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ AttachmentSampleCountInfoAMD & operator=( AttachmentSampleCountInfoAMD const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ AttachmentSampleCountInfoAMD & operator=( VkAttachmentSampleCountInfoAMD const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 AttachmentSampleCountInfoAMD & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 AttachmentSampleCountInfoAMD & setColorAttachmentCount( uint32_t colorAttachmentCount_ ) VULKAN_HPP_NOEXCEPT { colorAttachmentCount = colorAttachmentCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 AttachmentSampleCountInfoAMD & setPColorAttachmentSamples( const VULKAN_HPP_NAMESPACE::SampleCountFlagBits * pColorAttachmentSamples_ ) VULKAN_HPP_NOEXCEPT { pColorAttachmentSamples = pColorAttachmentSamples_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) AttachmentSampleCountInfoAMD & setColorAttachmentSamples( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & colorAttachmentSamples_ ) VULKAN_HPP_NOEXCEPT { colorAttachmentCount = static_cast( colorAttachmentSamples_.size() ); pColorAttachmentSamples = colorAttachmentSamples_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 AttachmentSampleCountInfoAMD & setDepthStencilAttachmentSamples( VULKAN_HPP_NAMESPACE::SampleCountFlagBits depthStencilAttachmentSamples_ ) VULKAN_HPP_NOEXCEPT { depthStencilAttachmentSamples = depthStencilAttachmentSamples_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkAttachmentSampleCountInfoAMD const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkAttachmentSampleCountInfoAMD &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, colorAttachmentCount, pColorAttachmentSamples, depthStencilAttachmentSamples ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( AttachmentSampleCountInfoAMD const & ) const = default; #else bool operator==( AttachmentSampleCountInfoAMD const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( colorAttachmentCount == rhs.colorAttachmentCount ) && ( pColorAttachmentSamples == rhs.pColorAttachmentSamples ) && ( depthStencilAttachmentSamples == rhs.depthStencilAttachmentSamples ); # endif } bool operator!=( AttachmentSampleCountInfoAMD const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eAttachmentSampleCountInfoAMD; const void * pNext = {}; uint32_t colorAttachmentCount = {}; const VULKAN_HPP_NAMESPACE::SampleCountFlagBits * pColorAttachmentSamples = {}; VULKAN_HPP_NAMESPACE::SampleCountFlagBits depthStencilAttachmentSamples = VULKAN_HPP_NAMESPACE::SampleCountFlagBits::e1; }; template <> struct CppType { using Type = AttachmentSampleCountInfoAMD; }; using AttachmentSampleCountInfoNV = AttachmentSampleCountInfoAMD; struct Extent2D { using NativeType = VkExtent2D; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR Extent2D( uint32_t width_ = {}, uint32_t height_ = {} ) VULKAN_HPP_NOEXCEPT : width{ width_ } , height{ height_ } { } VULKAN_HPP_CONSTEXPR Extent2D( Extent2D const & rhs ) VULKAN_HPP_NOEXCEPT = default; Extent2D( VkExtent2D const & rhs ) VULKAN_HPP_NOEXCEPT : Extent2D( *reinterpret_cast( &rhs ) ) {} Extent2D & operator=( Extent2D const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ Extent2D & operator=( VkExtent2D const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 Extent2D & setWidth( uint32_t width_ ) VULKAN_HPP_NOEXCEPT { width = width_; return *this; } VULKAN_HPP_CONSTEXPR_14 Extent2D & setHeight( uint32_t height_ ) VULKAN_HPP_NOEXCEPT { height = height_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkExtent2D const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkExtent2D &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( width, height ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( Extent2D const & ) const = default; #else bool operator==( Extent2D const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( width == rhs.width ) && ( height == rhs.height ); # endif } bool operator!=( Extent2D const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: uint32_t width = {}; uint32_t height = {}; }; struct SampleLocationEXT { using NativeType = VkSampleLocationEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR SampleLocationEXT( float x_ = {}, float y_ = {} ) VULKAN_HPP_NOEXCEPT : x{ x_ } , y{ y_ } { } VULKAN_HPP_CONSTEXPR SampleLocationEXT( SampleLocationEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; SampleLocationEXT( VkSampleLocationEXT const & rhs ) VULKAN_HPP_NOEXCEPT : SampleLocationEXT( *reinterpret_cast( &rhs ) ) {} SampleLocationEXT & operator=( SampleLocationEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ SampleLocationEXT & operator=( VkSampleLocationEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 SampleLocationEXT & setX( float x_ ) VULKAN_HPP_NOEXCEPT { x = x_; return *this; } VULKAN_HPP_CONSTEXPR_14 SampleLocationEXT & setY( float y_ ) VULKAN_HPP_NOEXCEPT { y = y_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkSampleLocationEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkSampleLocationEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( x, y ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( SampleLocationEXT const & ) const = default; #else bool operator==( SampleLocationEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( x == rhs.x ) && ( y == rhs.y ); # endif } bool operator!=( SampleLocationEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: float x = {}; float y = {}; }; struct SampleLocationsInfoEXT { using NativeType = VkSampleLocationsInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSampleLocationsInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR SampleLocationsInfoEXT( VULKAN_HPP_NAMESPACE::SampleCountFlagBits sampleLocationsPerPixel_ = VULKAN_HPP_NAMESPACE::SampleCountFlagBits::e1, VULKAN_HPP_NAMESPACE::Extent2D sampleLocationGridSize_ = {}, uint32_t sampleLocationsCount_ = {}, const VULKAN_HPP_NAMESPACE::SampleLocationEXT * pSampleLocations_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , sampleLocationsPerPixel{ sampleLocationsPerPixel_ } , sampleLocationGridSize{ sampleLocationGridSize_ } , sampleLocationsCount{ sampleLocationsCount_ } , pSampleLocations{ pSampleLocations_ } { } VULKAN_HPP_CONSTEXPR SampleLocationsInfoEXT( SampleLocationsInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; SampleLocationsInfoEXT( VkSampleLocationsInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : SampleLocationsInfoEXT( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) SampleLocationsInfoEXT( VULKAN_HPP_NAMESPACE::SampleCountFlagBits sampleLocationsPerPixel_, VULKAN_HPP_NAMESPACE::Extent2D sampleLocationGridSize_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & sampleLocations_, const void * pNext_ = nullptr ) : pNext( pNext_ ) , sampleLocationsPerPixel( sampleLocationsPerPixel_ ) , sampleLocationGridSize( sampleLocationGridSize_ ) , sampleLocationsCount( static_cast( sampleLocations_.size() ) ) , pSampleLocations( sampleLocations_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ SampleLocationsInfoEXT & operator=( SampleLocationsInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ SampleLocationsInfoEXT & operator=( VkSampleLocationsInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 SampleLocationsInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 SampleLocationsInfoEXT & setSampleLocationsPerPixel( VULKAN_HPP_NAMESPACE::SampleCountFlagBits sampleLocationsPerPixel_ ) VULKAN_HPP_NOEXCEPT { sampleLocationsPerPixel = sampleLocationsPerPixel_; return *this; } VULKAN_HPP_CONSTEXPR_14 SampleLocationsInfoEXT & setSampleLocationGridSize( VULKAN_HPP_NAMESPACE::Extent2D const & sampleLocationGridSize_ ) VULKAN_HPP_NOEXCEPT { sampleLocationGridSize = sampleLocationGridSize_; return *this; } VULKAN_HPP_CONSTEXPR_14 SampleLocationsInfoEXT & setSampleLocationsCount( uint32_t sampleLocationsCount_ ) VULKAN_HPP_NOEXCEPT { sampleLocationsCount = sampleLocationsCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 SampleLocationsInfoEXT & setPSampleLocations( const VULKAN_HPP_NAMESPACE::SampleLocationEXT * pSampleLocations_ ) VULKAN_HPP_NOEXCEPT { pSampleLocations = pSampleLocations_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) SampleLocationsInfoEXT & setSampleLocations( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & sampleLocations_ ) VULKAN_HPP_NOEXCEPT { sampleLocationsCount = static_cast( sampleLocations_.size() ); pSampleLocations = sampleLocations_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkSampleLocationsInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkSampleLocationsInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, sampleLocationsPerPixel, sampleLocationGridSize, sampleLocationsCount, pSampleLocations ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( SampleLocationsInfoEXT const & ) const = default; #else bool operator==( SampleLocationsInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( sampleLocationsPerPixel == rhs.sampleLocationsPerPixel ) && ( sampleLocationGridSize == rhs.sampleLocationGridSize ) && ( sampleLocationsCount == rhs.sampleLocationsCount ) && ( pSampleLocations == rhs.pSampleLocations ); # endif } bool operator!=( SampleLocationsInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSampleLocationsInfoEXT; const void * pNext = {}; VULKAN_HPP_NAMESPACE::SampleCountFlagBits sampleLocationsPerPixel = VULKAN_HPP_NAMESPACE::SampleCountFlagBits::e1; VULKAN_HPP_NAMESPACE::Extent2D sampleLocationGridSize = {}; uint32_t sampleLocationsCount = {}; const VULKAN_HPP_NAMESPACE::SampleLocationEXT * pSampleLocations = {}; }; template <> struct CppType { using Type = SampleLocationsInfoEXT; }; struct AttachmentSampleLocationsEXT { using NativeType = VkAttachmentSampleLocationsEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR AttachmentSampleLocationsEXT( uint32_t attachmentIndex_ = {}, VULKAN_HPP_NAMESPACE::SampleLocationsInfoEXT sampleLocationsInfo_ = {} ) VULKAN_HPP_NOEXCEPT : attachmentIndex{ attachmentIndex_ } , sampleLocationsInfo{ sampleLocationsInfo_ } { } VULKAN_HPP_CONSTEXPR AttachmentSampleLocationsEXT( AttachmentSampleLocationsEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; AttachmentSampleLocationsEXT( VkAttachmentSampleLocationsEXT const & rhs ) VULKAN_HPP_NOEXCEPT : AttachmentSampleLocationsEXT( *reinterpret_cast( &rhs ) ) { } AttachmentSampleLocationsEXT & operator=( AttachmentSampleLocationsEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ AttachmentSampleLocationsEXT & operator=( VkAttachmentSampleLocationsEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 AttachmentSampleLocationsEXT & setAttachmentIndex( uint32_t attachmentIndex_ ) VULKAN_HPP_NOEXCEPT { attachmentIndex = attachmentIndex_; return *this; } VULKAN_HPP_CONSTEXPR_14 AttachmentSampleLocationsEXT & setSampleLocationsInfo( VULKAN_HPP_NAMESPACE::SampleLocationsInfoEXT const & sampleLocationsInfo_ ) VULKAN_HPP_NOEXCEPT { sampleLocationsInfo = sampleLocationsInfo_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkAttachmentSampleLocationsEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkAttachmentSampleLocationsEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( attachmentIndex, sampleLocationsInfo ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( AttachmentSampleLocationsEXT const & ) const = default; #else bool operator==( AttachmentSampleLocationsEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( attachmentIndex == rhs.attachmentIndex ) && ( sampleLocationsInfo == rhs.sampleLocationsInfo ); # endif } bool operator!=( AttachmentSampleLocationsEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: uint32_t attachmentIndex = {}; VULKAN_HPP_NAMESPACE::SampleLocationsInfoEXT sampleLocationsInfo = {}; }; struct BaseInStructure { using NativeType = VkBaseInStructure; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) BaseInStructure( VULKAN_HPP_NAMESPACE::StructureType sType_ = VULKAN_HPP_NAMESPACE::StructureType::eApplicationInfo, const struct VULKAN_HPP_NAMESPACE::BaseInStructure * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : sType{ sType_ } , pNext{ pNext_ } { } BaseInStructure( BaseInStructure const & rhs ) VULKAN_HPP_NOEXCEPT = default; BaseInStructure( VkBaseInStructure const & rhs ) VULKAN_HPP_NOEXCEPT : BaseInStructure( *reinterpret_cast( &rhs ) ) {} BaseInStructure & operator=( BaseInStructure const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ BaseInStructure & operator=( VkBaseInStructure const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 BaseInStructure & setPNext( const struct VULKAN_HPP_NAMESPACE::BaseInStructure * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkBaseInStructure const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkBaseInStructure &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( BaseInStructure const & ) const = default; #else bool operator==( BaseInStructure const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ); # endif } bool operator!=( BaseInStructure const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = VULKAN_HPP_NAMESPACE::StructureType::eApplicationInfo; const struct VULKAN_HPP_NAMESPACE::BaseInStructure * pNext = {}; }; struct BaseOutStructure { using NativeType = VkBaseOutStructure; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) BaseOutStructure( VULKAN_HPP_NAMESPACE::StructureType sType_ = VULKAN_HPP_NAMESPACE::StructureType::eApplicationInfo, struct VULKAN_HPP_NAMESPACE::BaseOutStructure * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : sType{ sType_ } , pNext{ pNext_ } { } BaseOutStructure( BaseOutStructure const & rhs ) VULKAN_HPP_NOEXCEPT = default; BaseOutStructure( VkBaseOutStructure const & rhs ) VULKAN_HPP_NOEXCEPT : BaseOutStructure( *reinterpret_cast( &rhs ) ) {} BaseOutStructure & operator=( BaseOutStructure const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ BaseOutStructure & operator=( VkBaseOutStructure const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 BaseOutStructure & setPNext( struct VULKAN_HPP_NAMESPACE::BaseOutStructure * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkBaseOutStructure const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkBaseOutStructure &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( BaseOutStructure const & ) const = default; #else bool operator==( BaseOutStructure const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ); # endif } bool operator!=( BaseOutStructure const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = VULKAN_HPP_NAMESPACE::StructureType::eApplicationInfo; struct VULKAN_HPP_NAMESPACE::BaseOutStructure * pNext = {}; }; struct BindAccelerationStructureMemoryInfoNV { using NativeType = VkBindAccelerationStructureMemoryInfoNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eBindAccelerationStructureMemoryInfoNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR BindAccelerationStructureMemoryInfoNV( VULKAN_HPP_NAMESPACE::AccelerationStructureNV accelerationStructure_ = {}, VULKAN_HPP_NAMESPACE::DeviceMemory memory_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize memoryOffset_ = {}, uint32_t deviceIndexCount_ = {}, const uint32_t * pDeviceIndices_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , accelerationStructure{ accelerationStructure_ } , memory{ memory_ } , memoryOffset{ memoryOffset_ } , deviceIndexCount{ deviceIndexCount_ } , pDeviceIndices{ pDeviceIndices_ } { } VULKAN_HPP_CONSTEXPR BindAccelerationStructureMemoryInfoNV( BindAccelerationStructureMemoryInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; BindAccelerationStructureMemoryInfoNV( VkBindAccelerationStructureMemoryInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT : BindAccelerationStructureMemoryInfoNV( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) BindAccelerationStructureMemoryInfoNV( VULKAN_HPP_NAMESPACE::AccelerationStructureNV accelerationStructure_, VULKAN_HPP_NAMESPACE::DeviceMemory memory_, VULKAN_HPP_NAMESPACE::DeviceSize memoryOffset_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & deviceIndices_, const void * pNext_ = nullptr ) : pNext( pNext_ ) , accelerationStructure( accelerationStructure_ ) , memory( memory_ ) , memoryOffset( memoryOffset_ ) , deviceIndexCount( static_cast( deviceIndices_.size() ) ) , pDeviceIndices( deviceIndices_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ BindAccelerationStructureMemoryInfoNV & operator=( BindAccelerationStructureMemoryInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ BindAccelerationStructureMemoryInfoNV & operator=( VkBindAccelerationStructureMemoryInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 BindAccelerationStructureMemoryInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 BindAccelerationStructureMemoryInfoNV & setAccelerationStructure( VULKAN_HPP_NAMESPACE::AccelerationStructureNV accelerationStructure_ ) VULKAN_HPP_NOEXCEPT { accelerationStructure = accelerationStructure_; return *this; } VULKAN_HPP_CONSTEXPR_14 BindAccelerationStructureMemoryInfoNV & setMemory( VULKAN_HPP_NAMESPACE::DeviceMemory memory_ ) VULKAN_HPP_NOEXCEPT { memory = memory_; return *this; } VULKAN_HPP_CONSTEXPR_14 BindAccelerationStructureMemoryInfoNV & setMemoryOffset( VULKAN_HPP_NAMESPACE::DeviceSize memoryOffset_ ) VULKAN_HPP_NOEXCEPT { memoryOffset = memoryOffset_; return *this; } VULKAN_HPP_CONSTEXPR_14 BindAccelerationStructureMemoryInfoNV & setDeviceIndexCount( uint32_t deviceIndexCount_ ) VULKAN_HPP_NOEXCEPT { deviceIndexCount = deviceIndexCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 BindAccelerationStructureMemoryInfoNV & setPDeviceIndices( const uint32_t * pDeviceIndices_ ) VULKAN_HPP_NOEXCEPT { pDeviceIndices = pDeviceIndices_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) BindAccelerationStructureMemoryInfoNV & setDeviceIndices( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & deviceIndices_ ) VULKAN_HPP_NOEXCEPT { deviceIndexCount = static_cast( deviceIndices_.size() ); pDeviceIndices = deviceIndices_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkBindAccelerationStructureMemoryInfoNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkBindAccelerationStructureMemoryInfoNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, accelerationStructure, memory, memoryOffset, deviceIndexCount, pDeviceIndices ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( BindAccelerationStructureMemoryInfoNV const & ) const = default; #else bool operator==( BindAccelerationStructureMemoryInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( accelerationStructure == rhs.accelerationStructure ) && ( memory == rhs.memory ) && ( memoryOffset == rhs.memoryOffset ) && ( deviceIndexCount == rhs.deviceIndexCount ) && ( pDeviceIndices == rhs.pDeviceIndices ); # endif } bool operator!=( BindAccelerationStructureMemoryInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eBindAccelerationStructureMemoryInfoNV; const void * pNext = {}; VULKAN_HPP_NAMESPACE::AccelerationStructureNV accelerationStructure = {}; VULKAN_HPP_NAMESPACE::DeviceMemory memory = {}; VULKAN_HPP_NAMESPACE::DeviceSize memoryOffset = {}; uint32_t deviceIndexCount = {}; const uint32_t * pDeviceIndices = {}; }; template <> struct CppType { using Type = BindAccelerationStructureMemoryInfoNV; }; struct BindBufferMemoryDeviceGroupInfo { using NativeType = VkBindBufferMemoryDeviceGroupInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eBindBufferMemoryDeviceGroupInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR BindBufferMemoryDeviceGroupInfo( uint32_t deviceIndexCount_ = {}, const uint32_t * pDeviceIndices_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , deviceIndexCount{ deviceIndexCount_ } , pDeviceIndices{ pDeviceIndices_ } { } VULKAN_HPP_CONSTEXPR BindBufferMemoryDeviceGroupInfo( BindBufferMemoryDeviceGroupInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; BindBufferMemoryDeviceGroupInfo( VkBindBufferMemoryDeviceGroupInfo const & rhs ) VULKAN_HPP_NOEXCEPT : BindBufferMemoryDeviceGroupInfo( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) BindBufferMemoryDeviceGroupInfo( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & deviceIndices_, const void * pNext_ = nullptr ) : pNext( pNext_ ), deviceIndexCount( static_cast( deviceIndices_.size() ) ), pDeviceIndices( deviceIndices_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ BindBufferMemoryDeviceGroupInfo & operator=( BindBufferMemoryDeviceGroupInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ BindBufferMemoryDeviceGroupInfo & operator=( VkBindBufferMemoryDeviceGroupInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 BindBufferMemoryDeviceGroupInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 BindBufferMemoryDeviceGroupInfo & setDeviceIndexCount( uint32_t deviceIndexCount_ ) VULKAN_HPP_NOEXCEPT { deviceIndexCount = deviceIndexCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 BindBufferMemoryDeviceGroupInfo & setPDeviceIndices( const uint32_t * pDeviceIndices_ ) VULKAN_HPP_NOEXCEPT { pDeviceIndices = pDeviceIndices_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) BindBufferMemoryDeviceGroupInfo & setDeviceIndices( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & deviceIndices_ ) VULKAN_HPP_NOEXCEPT { deviceIndexCount = static_cast( deviceIndices_.size() ); pDeviceIndices = deviceIndices_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkBindBufferMemoryDeviceGroupInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkBindBufferMemoryDeviceGroupInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, deviceIndexCount, pDeviceIndices ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( BindBufferMemoryDeviceGroupInfo const & ) const = default; #else bool operator==( BindBufferMemoryDeviceGroupInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( deviceIndexCount == rhs.deviceIndexCount ) && ( pDeviceIndices == rhs.pDeviceIndices ); # endif } bool operator!=( BindBufferMemoryDeviceGroupInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eBindBufferMemoryDeviceGroupInfo; const void * pNext = {}; uint32_t deviceIndexCount = {}; const uint32_t * pDeviceIndices = {}; }; template <> struct CppType { using Type = BindBufferMemoryDeviceGroupInfo; }; using BindBufferMemoryDeviceGroupInfoKHR = BindBufferMemoryDeviceGroupInfo; struct BindBufferMemoryInfo { using NativeType = VkBindBufferMemoryInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eBindBufferMemoryInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR BindBufferMemoryInfo( VULKAN_HPP_NAMESPACE::Buffer buffer_ = {}, VULKAN_HPP_NAMESPACE::DeviceMemory memory_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize memoryOffset_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , buffer{ buffer_ } , memory{ memory_ } , memoryOffset{ memoryOffset_ } { } VULKAN_HPP_CONSTEXPR BindBufferMemoryInfo( BindBufferMemoryInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; BindBufferMemoryInfo( VkBindBufferMemoryInfo const & rhs ) VULKAN_HPP_NOEXCEPT : BindBufferMemoryInfo( *reinterpret_cast( &rhs ) ) { } BindBufferMemoryInfo & operator=( BindBufferMemoryInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ BindBufferMemoryInfo & operator=( VkBindBufferMemoryInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 BindBufferMemoryInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 BindBufferMemoryInfo & setBuffer( VULKAN_HPP_NAMESPACE::Buffer buffer_ ) VULKAN_HPP_NOEXCEPT { buffer = buffer_; return *this; } VULKAN_HPP_CONSTEXPR_14 BindBufferMemoryInfo & setMemory( VULKAN_HPP_NAMESPACE::DeviceMemory memory_ ) VULKAN_HPP_NOEXCEPT { memory = memory_; return *this; } VULKAN_HPP_CONSTEXPR_14 BindBufferMemoryInfo & setMemoryOffset( VULKAN_HPP_NAMESPACE::DeviceSize memoryOffset_ ) VULKAN_HPP_NOEXCEPT { memoryOffset = memoryOffset_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkBindBufferMemoryInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkBindBufferMemoryInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, buffer, memory, memoryOffset ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( BindBufferMemoryInfo const & ) const = default; #else bool operator==( BindBufferMemoryInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( buffer == rhs.buffer ) && ( memory == rhs.memory ) && ( memoryOffset == rhs.memoryOffset ); # endif } bool operator!=( BindBufferMemoryInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eBindBufferMemoryInfo; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Buffer buffer = {}; VULKAN_HPP_NAMESPACE::DeviceMemory memory = {}; VULKAN_HPP_NAMESPACE::DeviceSize memoryOffset = {}; }; template <> struct CppType { using Type = BindBufferMemoryInfo; }; using BindBufferMemoryInfoKHR = BindBufferMemoryInfo; struct BindDescriptorBufferEmbeddedSamplersInfoEXT { using NativeType = VkBindDescriptorBufferEmbeddedSamplersInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eBindDescriptorBufferEmbeddedSamplersInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR BindDescriptorBufferEmbeddedSamplersInfoEXT( VULKAN_HPP_NAMESPACE::ShaderStageFlags stageFlags_ = {}, VULKAN_HPP_NAMESPACE::PipelineLayout layout_ = {}, uint32_t set_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , stageFlags{ stageFlags_ } , layout{ layout_ } , set{ set_ } { } VULKAN_HPP_CONSTEXPR BindDescriptorBufferEmbeddedSamplersInfoEXT( BindDescriptorBufferEmbeddedSamplersInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; BindDescriptorBufferEmbeddedSamplersInfoEXT( VkBindDescriptorBufferEmbeddedSamplersInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : BindDescriptorBufferEmbeddedSamplersInfoEXT( *reinterpret_cast( &rhs ) ) { } BindDescriptorBufferEmbeddedSamplersInfoEXT & operator=( BindDescriptorBufferEmbeddedSamplersInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ BindDescriptorBufferEmbeddedSamplersInfoEXT & operator=( VkBindDescriptorBufferEmbeddedSamplersInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 BindDescriptorBufferEmbeddedSamplersInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 BindDescriptorBufferEmbeddedSamplersInfoEXT & setStageFlags( VULKAN_HPP_NAMESPACE::ShaderStageFlags stageFlags_ ) VULKAN_HPP_NOEXCEPT { stageFlags = stageFlags_; return *this; } VULKAN_HPP_CONSTEXPR_14 BindDescriptorBufferEmbeddedSamplersInfoEXT & setLayout( VULKAN_HPP_NAMESPACE::PipelineLayout layout_ ) VULKAN_HPP_NOEXCEPT { layout = layout_; return *this; } VULKAN_HPP_CONSTEXPR_14 BindDescriptorBufferEmbeddedSamplersInfoEXT & setSet( uint32_t set_ ) VULKAN_HPP_NOEXCEPT { set = set_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkBindDescriptorBufferEmbeddedSamplersInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkBindDescriptorBufferEmbeddedSamplersInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, stageFlags, layout, set ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( BindDescriptorBufferEmbeddedSamplersInfoEXT const & ) const = default; #else bool operator==( BindDescriptorBufferEmbeddedSamplersInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( stageFlags == rhs.stageFlags ) && ( layout == rhs.layout ) && ( set == rhs.set ); # endif } bool operator!=( BindDescriptorBufferEmbeddedSamplersInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eBindDescriptorBufferEmbeddedSamplersInfoEXT; const void * pNext = {}; VULKAN_HPP_NAMESPACE::ShaderStageFlags stageFlags = {}; VULKAN_HPP_NAMESPACE::PipelineLayout layout = {}; uint32_t set = {}; }; template <> struct CppType { using Type = BindDescriptorBufferEmbeddedSamplersInfoEXT; }; struct BindDescriptorSetsInfo { using NativeType = VkBindDescriptorSetsInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eBindDescriptorSetsInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR BindDescriptorSetsInfo( VULKAN_HPP_NAMESPACE::ShaderStageFlags stageFlags_ = {}, VULKAN_HPP_NAMESPACE::PipelineLayout layout_ = {}, uint32_t firstSet_ = {}, uint32_t descriptorSetCount_ = {}, const VULKAN_HPP_NAMESPACE::DescriptorSet * pDescriptorSets_ = {}, uint32_t dynamicOffsetCount_ = {}, const uint32_t * pDynamicOffsets_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , stageFlags{ stageFlags_ } , layout{ layout_ } , firstSet{ firstSet_ } , descriptorSetCount{ descriptorSetCount_ } , pDescriptorSets{ pDescriptorSets_ } , dynamicOffsetCount{ dynamicOffsetCount_ } , pDynamicOffsets{ pDynamicOffsets_ } { } VULKAN_HPP_CONSTEXPR BindDescriptorSetsInfo( BindDescriptorSetsInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; BindDescriptorSetsInfo( VkBindDescriptorSetsInfo const & rhs ) VULKAN_HPP_NOEXCEPT : BindDescriptorSetsInfo( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) BindDescriptorSetsInfo( VULKAN_HPP_NAMESPACE::ShaderStageFlags stageFlags_, VULKAN_HPP_NAMESPACE::PipelineLayout layout_, uint32_t firstSet_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & descriptorSets_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & dynamicOffsets_ = {}, const void * pNext_ = nullptr ) : pNext( pNext_ ) , stageFlags( stageFlags_ ) , layout( layout_ ) , firstSet( firstSet_ ) , descriptorSetCount( static_cast( descriptorSets_.size() ) ) , pDescriptorSets( descriptorSets_.data() ) , dynamicOffsetCount( static_cast( dynamicOffsets_.size() ) ) , pDynamicOffsets( dynamicOffsets_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ BindDescriptorSetsInfo & operator=( BindDescriptorSetsInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ BindDescriptorSetsInfo & operator=( VkBindDescriptorSetsInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 BindDescriptorSetsInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 BindDescriptorSetsInfo & setStageFlags( VULKAN_HPP_NAMESPACE::ShaderStageFlags stageFlags_ ) VULKAN_HPP_NOEXCEPT { stageFlags = stageFlags_; return *this; } VULKAN_HPP_CONSTEXPR_14 BindDescriptorSetsInfo & setLayout( VULKAN_HPP_NAMESPACE::PipelineLayout layout_ ) VULKAN_HPP_NOEXCEPT { layout = layout_; return *this; } VULKAN_HPP_CONSTEXPR_14 BindDescriptorSetsInfo & setFirstSet( uint32_t firstSet_ ) VULKAN_HPP_NOEXCEPT { firstSet = firstSet_; return *this; } VULKAN_HPP_CONSTEXPR_14 BindDescriptorSetsInfo & setDescriptorSetCount( uint32_t descriptorSetCount_ ) VULKAN_HPP_NOEXCEPT { descriptorSetCount = descriptorSetCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 BindDescriptorSetsInfo & setPDescriptorSets( const VULKAN_HPP_NAMESPACE::DescriptorSet * pDescriptorSets_ ) VULKAN_HPP_NOEXCEPT { pDescriptorSets = pDescriptorSets_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) BindDescriptorSetsInfo & setDescriptorSets( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & descriptorSets_ ) VULKAN_HPP_NOEXCEPT { descriptorSetCount = static_cast( descriptorSets_.size() ); pDescriptorSets = descriptorSets_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 BindDescriptorSetsInfo & setDynamicOffsetCount( uint32_t dynamicOffsetCount_ ) VULKAN_HPP_NOEXCEPT { dynamicOffsetCount = dynamicOffsetCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 BindDescriptorSetsInfo & setPDynamicOffsets( const uint32_t * pDynamicOffsets_ ) VULKAN_HPP_NOEXCEPT { pDynamicOffsets = pDynamicOffsets_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) BindDescriptorSetsInfo & setDynamicOffsets( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & dynamicOffsets_ ) VULKAN_HPP_NOEXCEPT { dynamicOffsetCount = static_cast( dynamicOffsets_.size() ); pDynamicOffsets = dynamicOffsets_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkBindDescriptorSetsInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkBindDescriptorSetsInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, stageFlags, layout, firstSet, descriptorSetCount, pDescriptorSets, dynamicOffsetCount, pDynamicOffsets ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( BindDescriptorSetsInfo const & ) const = default; #else bool operator==( BindDescriptorSetsInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( stageFlags == rhs.stageFlags ) && ( layout == rhs.layout ) && ( firstSet == rhs.firstSet ) && ( descriptorSetCount == rhs.descriptorSetCount ) && ( pDescriptorSets == rhs.pDescriptorSets ) && ( dynamicOffsetCount == rhs.dynamicOffsetCount ) && ( pDynamicOffsets == rhs.pDynamicOffsets ); # endif } bool operator!=( BindDescriptorSetsInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eBindDescriptorSetsInfo; const void * pNext = {}; VULKAN_HPP_NAMESPACE::ShaderStageFlags stageFlags = {}; VULKAN_HPP_NAMESPACE::PipelineLayout layout = {}; uint32_t firstSet = {}; uint32_t descriptorSetCount = {}; const VULKAN_HPP_NAMESPACE::DescriptorSet * pDescriptorSets = {}; uint32_t dynamicOffsetCount = {}; const uint32_t * pDynamicOffsets = {}; }; template <> struct CppType { using Type = BindDescriptorSetsInfo; }; using BindDescriptorSetsInfoKHR = BindDescriptorSetsInfo; struct Offset2D { using NativeType = VkOffset2D; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR Offset2D( int32_t x_ = {}, int32_t y_ = {} ) VULKAN_HPP_NOEXCEPT : x{ x_ } , y{ y_ } { } VULKAN_HPP_CONSTEXPR Offset2D( Offset2D const & rhs ) VULKAN_HPP_NOEXCEPT = default; Offset2D( VkOffset2D const & rhs ) VULKAN_HPP_NOEXCEPT : Offset2D( *reinterpret_cast( &rhs ) ) {} Offset2D & operator=( Offset2D const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ Offset2D & operator=( VkOffset2D const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 Offset2D & setX( int32_t x_ ) VULKAN_HPP_NOEXCEPT { x = x_; return *this; } VULKAN_HPP_CONSTEXPR_14 Offset2D & setY( int32_t y_ ) VULKAN_HPP_NOEXCEPT { y = y_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkOffset2D const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkOffset2D &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( x, y ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( Offset2D const & ) const = default; #else bool operator==( Offset2D const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( x == rhs.x ) && ( y == rhs.y ); # endif } bool operator!=( Offset2D const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: int32_t x = {}; int32_t y = {}; }; struct Rect2D { using NativeType = VkRect2D; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR Rect2D( VULKAN_HPP_NAMESPACE::Offset2D offset_ = {}, VULKAN_HPP_NAMESPACE::Extent2D extent_ = {} ) VULKAN_HPP_NOEXCEPT : offset{ offset_ } , extent{ extent_ } { } VULKAN_HPP_CONSTEXPR Rect2D( Rect2D const & rhs ) VULKAN_HPP_NOEXCEPT = default; Rect2D( VkRect2D const & rhs ) VULKAN_HPP_NOEXCEPT : Rect2D( *reinterpret_cast( &rhs ) ) {} Rect2D & operator=( Rect2D const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ Rect2D & operator=( VkRect2D const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 Rect2D & setOffset( VULKAN_HPP_NAMESPACE::Offset2D const & offset_ ) VULKAN_HPP_NOEXCEPT { offset = offset_; return *this; } VULKAN_HPP_CONSTEXPR_14 Rect2D & setExtent( VULKAN_HPP_NAMESPACE::Extent2D const & extent_ ) VULKAN_HPP_NOEXCEPT { extent = extent_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkRect2D const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkRect2D &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( offset, extent ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( Rect2D const & ) const = default; #else bool operator==( Rect2D const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( offset == rhs.offset ) && ( extent == rhs.extent ); # endif } bool operator!=( Rect2D const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::Offset2D offset = {}; VULKAN_HPP_NAMESPACE::Extent2D extent = {}; }; struct BindImageMemoryDeviceGroupInfo { using NativeType = VkBindImageMemoryDeviceGroupInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eBindImageMemoryDeviceGroupInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR BindImageMemoryDeviceGroupInfo( uint32_t deviceIndexCount_ = {}, const uint32_t * pDeviceIndices_ = {}, uint32_t splitInstanceBindRegionCount_ = {}, const VULKAN_HPP_NAMESPACE::Rect2D * pSplitInstanceBindRegions_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , deviceIndexCount{ deviceIndexCount_ } , pDeviceIndices{ pDeviceIndices_ } , splitInstanceBindRegionCount{ splitInstanceBindRegionCount_ } , pSplitInstanceBindRegions{ pSplitInstanceBindRegions_ } { } VULKAN_HPP_CONSTEXPR BindImageMemoryDeviceGroupInfo( BindImageMemoryDeviceGroupInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; BindImageMemoryDeviceGroupInfo( VkBindImageMemoryDeviceGroupInfo const & rhs ) VULKAN_HPP_NOEXCEPT : BindImageMemoryDeviceGroupInfo( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) BindImageMemoryDeviceGroupInfo( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & deviceIndices_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & splitInstanceBindRegions_ = {}, const void * pNext_ = nullptr ) : pNext( pNext_ ) , deviceIndexCount( static_cast( deviceIndices_.size() ) ) , pDeviceIndices( deviceIndices_.data() ) , splitInstanceBindRegionCount( static_cast( splitInstanceBindRegions_.size() ) ) , pSplitInstanceBindRegions( splitInstanceBindRegions_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ BindImageMemoryDeviceGroupInfo & operator=( BindImageMemoryDeviceGroupInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ BindImageMemoryDeviceGroupInfo & operator=( VkBindImageMemoryDeviceGroupInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 BindImageMemoryDeviceGroupInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 BindImageMemoryDeviceGroupInfo & setDeviceIndexCount( uint32_t deviceIndexCount_ ) VULKAN_HPP_NOEXCEPT { deviceIndexCount = deviceIndexCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 BindImageMemoryDeviceGroupInfo & setPDeviceIndices( const uint32_t * pDeviceIndices_ ) VULKAN_HPP_NOEXCEPT { pDeviceIndices = pDeviceIndices_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) BindImageMemoryDeviceGroupInfo & setDeviceIndices( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & deviceIndices_ ) VULKAN_HPP_NOEXCEPT { deviceIndexCount = static_cast( deviceIndices_.size() ); pDeviceIndices = deviceIndices_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 BindImageMemoryDeviceGroupInfo & setSplitInstanceBindRegionCount( uint32_t splitInstanceBindRegionCount_ ) VULKAN_HPP_NOEXCEPT { splitInstanceBindRegionCount = splitInstanceBindRegionCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 BindImageMemoryDeviceGroupInfo & setPSplitInstanceBindRegions( const VULKAN_HPP_NAMESPACE::Rect2D * pSplitInstanceBindRegions_ ) VULKAN_HPP_NOEXCEPT { pSplitInstanceBindRegions = pSplitInstanceBindRegions_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) BindImageMemoryDeviceGroupInfo & setSplitInstanceBindRegions( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & splitInstanceBindRegions_ ) VULKAN_HPP_NOEXCEPT { splitInstanceBindRegionCount = static_cast( splitInstanceBindRegions_.size() ); pSplitInstanceBindRegions = splitInstanceBindRegions_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkBindImageMemoryDeviceGroupInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkBindImageMemoryDeviceGroupInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, deviceIndexCount, pDeviceIndices, splitInstanceBindRegionCount, pSplitInstanceBindRegions ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( BindImageMemoryDeviceGroupInfo const & ) const = default; #else bool operator==( BindImageMemoryDeviceGroupInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( deviceIndexCount == rhs.deviceIndexCount ) && ( pDeviceIndices == rhs.pDeviceIndices ) && ( splitInstanceBindRegionCount == rhs.splitInstanceBindRegionCount ) && ( pSplitInstanceBindRegions == rhs.pSplitInstanceBindRegions ); # endif } bool operator!=( BindImageMemoryDeviceGroupInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eBindImageMemoryDeviceGroupInfo; const void * pNext = {}; uint32_t deviceIndexCount = {}; const uint32_t * pDeviceIndices = {}; uint32_t splitInstanceBindRegionCount = {}; const VULKAN_HPP_NAMESPACE::Rect2D * pSplitInstanceBindRegions = {}; }; template <> struct CppType { using Type = BindImageMemoryDeviceGroupInfo; }; using BindImageMemoryDeviceGroupInfoKHR = BindImageMemoryDeviceGroupInfo; struct BindImageMemoryInfo { using NativeType = VkBindImageMemoryInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eBindImageMemoryInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR BindImageMemoryInfo( VULKAN_HPP_NAMESPACE::Image image_ = {}, VULKAN_HPP_NAMESPACE::DeviceMemory memory_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize memoryOffset_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , image{ image_ } , memory{ memory_ } , memoryOffset{ memoryOffset_ } { } VULKAN_HPP_CONSTEXPR BindImageMemoryInfo( BindImageMemoryInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; BindImageMemoryInfo( VkBindImageMemoryInfo const & rhs ) VULKAN_HPP_NOEXCEPT : BindImageMemoryInfo( *reinterpret_cast( &rhs ) ) { } BindImageMemoryInfo & operator=( BindImageMemoryInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ BindImageMemoryInfo & operator=( VkBindImageMemoryInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 BindImageMemoryInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 BindImageMemoryInfo & setImage( VULKAN_HPP_NAMESPACE::Image image_ ) VULKAN_HPP_NOEXCEPT { image = image_; return *this; } VULKAN_HPP_CONSTEXPR_14 BindImageMemoryInfo & setMemory( VULKAN_HPP_NAMESPACE::DeviceMemory memory_ ) VULKAN_HPP_NOEXCEPT { memory = memory_; return *this; } VULKAN_HPP_CONSTEXPR_14 BindImageMemoryInfo & setMemoryOffset( VULKAN_HPP_NAMESPACE::DeviceSize memoryOffset_ ) VULKAN_HPP_NOEXCEPT { memoryOffset = memoryOffset_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkBindImageMemoryInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkBindImageMemoryInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, image, memory, memoryOffset ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( BindImageMemoryInfo const & ) const = default; #else bool operator==( BindImageMemoryInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( image == rhs.image ) && ( memory == rhs.memory ) && ( memoryOffset == rhs.memoryOffset ); # endif } bool operator!=( BindImageMemoryInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eBindImageMemoryInfo; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Image image = {}; VULKAN_HPP_NAMESPACE::DeviceMemory memory = {}; VULKAN_HPP_NAMESPACE::DeviceSize memoryOffset = {}; }; template <> struct CppType { using Type = BindImageMemoryInfo; }; using BindImageMemoryInfoKHR = BindImageMemoryInfo; struct BindImageMemorySwapchainInfoKHR { using NativeType = VkBindImageMemorySwapchainInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eBindImageMemorySwapchainInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR BindImageMemorySwapchainInfoKHR( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain_ = {}, uint32_t imageIndex_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , swapchain{ swapchain_ } , imageIndex{ imageIndex_ } { } VULKAN_HPP_CONSTEXPR BindImageMemorySwapchainInfoKHR( BindImageMemorySwapchainInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; BindImageMemorySwapchainInfoKHR( VkBindImageMemorySwapchainInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : BindImageMemorySwapchainInfoKHR( *reinterpret_cast( &rhs ) ) { } BindImageMemorySwapchainInfoKHR & operator=( BindImageMemorySwapchainInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ BindImageMemorySwapchainInfoKHR & operator=( VkBindImageMemorySwapchainInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 BindImageMemorySwapchainInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 BindImageMemorySwapchainInfoKHR & setSwapchain( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain_ ) VULKAN_HPP_NOEXCEPT { swapchain = swapchain_; return *this; } VULKAN_HPP_CONSTEXPR_14 BindImageMemorySwapchainInfoKHR & setImageIndex( uint32_t imageIndex_ ) VULKAN_HPP_NOEXCEPT { imageIndex = imageIndex_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkBindImageMemorySwapchainInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkBindImageMemorySwapchainInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, swapchain, imageIndex ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( BindImageMemorySwapchainInfoKHR const & ) const = default; #else bool operator==( BindImageMemorySwapchainInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( swapchain == rhs.swapchain ) && ( imageIndex == rhs.imageIndex ); # endif } bool operator!=( BindImageMemorySwapchainInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eBindImageMemorySwapchainInfoKHR; const void * pNext = {}; VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain = {}; uint32_t imageIndex = {}; }; template <> struct CppType { using Type = BindImageMemorySwapchainInfoKHR; }; struct BindImagePlaneMemoryInfo { using NativeType = VkBindImagePlaneMemoryInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eBindImagePlaneMemoryInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR BindImagePlaneMemoryInfo( VULKAN_HPP_NAMESPACE::ImageAspectFlagBits planeAspect_ = VULKAN_HPP_NAMESPACE::ImageAspectFlagBits::eColor, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , planeAspect{ planeAspect_ } { } VULKAN_HPP_CONSTEXPR BindImagePlaneMemoryInfo( BindImagePlaneMemoryInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; BindImagePlaneMemoryInfo( VkBindImagePlaneMemoryInfo const & rhs ) VULKAN_HPP_NOEXCEPT : BindImagePlaneMemoryInfo( *reinterpret_cast( &rhs ) ) { } BindImagePlaneMemoryInfo & operator=( BindImagePlaneMemoryInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ BindImagePlaneMemoryInfo & operator=( VkBindImagePlaneMemoryInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 BindImagePlaneMemoryInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 BindImagePlaneMemoryInfo & setPlaneAspect( VULKAN_HPP_NAMESPACE::ImageAspectFlagBits planeAspect_ ) VULKAN_HPP_NOEXCEPT { planeAspect = planeAspect_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkBindImagePlaneMemoryInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkBindImagePlaneMemoryInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, planeAspect ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( BindImagePlaneMemoryInfo const & ) const = default; #else bool operator==( BindImagePlaneMemoryInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( planeAspect == rhs.planeAspect ); # endif } bool operator!=( BindImagePlaneMemoryInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eBindImagePlaneMemoryInfo; const void * pNext = {}; VULKAN_HPP_NAMESPACE::ImageAspectFlagBits planeAspect = VULKAN_HPP_NAMESPACE::ImageAspectFlagBits::eColor; }; template <> struct CppType { using Type = BindImagePlaneMemoryInfo; }; using BindImagePlaneMemoryInfoKHR = BindImagePlaneMemoryInfo; struct BindIndexBufferIndirectCommandEXT { using NativeType = VkBindIndexBufferIndirectCommandEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR BindIndexBufferIndirectCommandEXT( VULKAN_HPP_NAMESPACE::DeviceAddress bufferAddress_ = {}, uint32_t size_ = {}, VULKAN_HPP_NAMESPACE::IndexType indexType_ = VULKAN_HPP_NAMESPACE::IndexType::eUint16 ) VULKAN_HPP_NOEXCEPT : bufferAddress{ bufferAddress_ } , size{ size_ } , indexType{ indexType_ } { } VULKAN_HPP_CONSTEXPR BindIndexBufferIndirectCommandEXT( BindIndexBufferIndirectCommandEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; BindIndexBufferIndirectCommandEXT( VkBindIndexBufferIndirectCommandEXT const & rhs ) VULKAN_HPP_NOEXCEPT : BindIndexBufferIndirectCommandEXT( *reinterpret_cast( &rhs ) ) { } BindIndexBufferIndirectCommandEXT & operator=( BindIndexBufferIndirectCommandEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ BindIndexBufferIndirectCommandEXT & operator=( VkBindIndexBufferIndirectCommandEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 BindIndexBufferIndirectCommandEXT & setBufferAddress( VULKAN_HPP_NAMESPACE::DeviceAddress bufferAddress_ ) VULKAN_HPP_NOEXCEPT { bufferAddress = bufferAddress_; return *this; } VULKAN_HPP_CONSTEXPR_14 BindIndexBufferIndirectCommandEXT & setSize( uint32_t size_ ) VULKAN_HPP_NOEXCEPT { size = size_; return *this; } VULKAN_HPP_CONSTEXPR_14 BindIndexBufferIndirectCommandEXT & setIndexType( VULKAN_HPP_NAMESPACE::IndexType indexType_ ) VULKAN_HPP_NOEXCEPT { indexType = indexType_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkBindIndexBufferIndirectCommandEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkBindIndexBufferIndirectCommandEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( bufferAddress, size, indexType ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( BindIndexBufferIndirectCommandEXT const & ) const = default; #else bool operator==( BindIndexBufferIndirectCommandEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( bufferAddress == rhs.bufferAddress ) && ( size == rhs.size ) && ( indexType == rhs.indexType ); # endif } bool operator!=( BindIndexBufferIndirectCommandEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::DeviceAddress bufferAddress = {}; uint32_t size = {}; VULKAN_HPP_NAMESPACE::IndexType indexType = VULKAN_HPP_NAMESPACE::IndexType::eUint16; }; struct BindIndexBufferIndirectCommandNV { using NativeType = VkBindIndexBufferIndirectCommandNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR BindIndexBufferIndirectCommandNV( VULKAN_HPP_NAMESPACE::DeviceAddress bufferAddress_ = {}, uint32_t size_ = {}, VULKAN_HPP_NAMESPACE::IndexType indexType_ = VULKAN_HPP_NAMESPACE::IndexType::eUint16 ) VULKAN_HPP_NOEXCEPT : bufferAddress{ bufferAddress_ } , size{ size_ } , indexType{ indexType_ } { } VULKAN_HPP_CONSTEXPR BindIndexBufferIndirectCommandNV( BindIndexBufferIndirectCommandNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; BindIndexBufferIndirectCommandNV( VkBindIndexBufferIndirectCommandNV const & rhs ) VULKAN_HPP_NOEXCEPT : BindIndexBufferIndirectCommandNV( *reinterpret_cast( &rhs ) ) { } BindIndexBufferIndirectCommandNV & operator=( BindIndexBufferIndirectCommandNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ BindIndexBufferIndirectCommandNV & operator=( VkBindIndexBufferIndirectCommandNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 BindIndexBufferIndirectCommandNV & setBufferAddress( VULKAN_HPP_NAMESPACE::DeviceAddress bufferAddress_ ) VULKAN_HPP_NOEXCEPT { bufferAddress = bufferAddress_; return *this; } VULKAN_HPP_CONSTEXPR_14 BindIndexBufferIndirectCommandNV & setSize( uint32_t size_ ) VULKAN_HPP_NOEXCEPT { size = size_; return *this; } VULKAN_HPP_CONSTEXPR_14 BindIndexBufferIndirectCommandNV & setIndexType( VULKAN_HPP_NAMESPACE::IndexType indexType_ ) VULKAN_HPP_NOEXCEPT { indexType = indexType_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkBindIndexBufferIndirectCommandNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkBindIndexBufferIndirectCommandNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( bufferAddress, size, indexType ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( BindIndexBufferIndirectCommandNV const & ) const = default; #else bool operator==( BindIndexBufferIndirectCommandNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( bufferAddress == rhs.bufferAddress ) && ( size == rhs.size ) && ( indexType == rhs.indexType ); # endif } bool operator!=( BindIndexBufferIndirectCommandNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::DeviceAddress bufferAddress = {}; uint32_t size = {}; VULKAN_HPP_NAMESPACE::IndexType indexType = VULKAN_HPP_NAMESPACE::IndexType::eUint16; }; struct BindMemoryStatus { using NativeType = VkBindMemoryStatus; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eBindMemoryStatus; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR BindMemoryStatus( VULKAN_HPP_NAMESPACE::Result * pResult_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , pResult{ pResult_ } { } VULKAN_HPP_CONSTEXPR BindMemoryStatus( BindMemoryStatus const & rhs ) VULKAN_HPP_NOEXCEPT = default; BindMemoryStatus( VkBindMemoryStatus const & rhs ) VULKAN_HPP_NOEXCEPT : BindMemoryStatus( *reinterpret_cast( &rhs ) ) {} BindMemoryStatus & operator=( BindMemoryStatus const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ BindMemoryStatus & operator=( VkBindMemoryStatus const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 BindMemoryStatus & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 BindMemoryStatus & setPResult( VULKAN_HPP_NAMESPACE::Result * pResult_ ) VULKAN_HPP_NOEXCEPT { pResult = pResult_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkBindMemoryStatus const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkBindMemoryStatus &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, pResult ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( BindMemoryStatus const & ) const = default; #else bool operator==( BindMemoryStatus const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( pResult == rhs.pResult ); # endif } bool operator!=( BindMemoryStatus const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eBindMemoryStatus; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Result * pResult = {}; }; template <> struct CppType { using Type = BindMemoryStatus; }; using BindMemoryStatusKHR = BindMemoryStatus; struct BindPipelineIndirectCommandNV { using NativeType = VkBindPipelineIndirectCommandNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR BindPipelineIndirectCommandNV( VULKAN_HPP_NAMESPACE::DeviceAddress pipelineAddress_ = {} ) VULKAN_HPP_NOEXCEPT : pipelineAddress{ pipelineAddress_ } { } VULKAN_HPP_CONSTEXPR BindPipelineIndirectCommandNV( BindPipelineIndirectCommandNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; BindPipelineIndirectCommandNV( VkBindPipelineIndirectCommandNV const & rhs ) VULKAN_HPP_NOEXCEPT : BindPipelineIndirectCommandNV( *reinterpret_cast( &rhs ) ) { } BindPipelineIndirectCommandNV & operator=( BindPipelineIndirectCommandNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ BindPipelineIndirectCommandNV & operator=( VkBindPipelineIndirectCommandNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 BindPipelineIndirectCommandNV & setPipelineAddress( VULKAN_HPP_NAMESPACE::DeviceAddress pipelineAddress_ ) VULKAN_HPP_NOEXCEPT { pipelineAddress = pipelineAddress_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkBindPipelineIndirectCommandNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkBindPipelineIndirectCommandNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( pipelineAddress ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( BindPipelineIndirectCommandNV const & ) const = default; #else bool operator==( BindPipelineIndirectCommandNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( pipelineAddress == rhs.pipelineAddress ); # endif } bool operator!=( BindPipelineIndirectCommandNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::DeviceAddress pipelineAddress = {}; }; struct BindShaderGroupIndirectCommandNV { using NativeType = VkBindShaderGroupIndirectCommandNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR BindShaderGroupIndirectCommandNV( uint32_t groupIndex_ = {} ) VULKAN_HPP_NOEXCEPT : groupIndex{ groupIndex_ } {} VULKAN_HPP_CONSTEXPR BindShaderGroupIndirectCommandNV( BindShaderGroupIndirectCommandNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; BindShaderGroupIndirectCommandNV( VkBindShaderGroupIndirectCommandNV const & rhs ) VULKAN_HPP_NOEXCEPT : BindShaderGroupIndirectCommandNV( *reinterpret_cast( &rhs ) ) { } BindShaderGroupIndirectCommandNV & operator=( BindShaderGroupIndirectCommandNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ BindShaderGroupIndirectCommandNV & operator=( VkBindShaderGroupIndirectCommandNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 BindShaderGroupIndirectCommandNV & setGroupIndex( uint32_t groupIndex_ ) VULKAN_HPP_NOEXCEPT { groupIndex = groupIndex_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkBindShaderGroupIndirectCommandNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkBindShaderGroupIndirectCommandNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( groupIndex ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( BindShaderGroupIndirectCommandNV const & ) const = default; #else bool operator==( BindShaderGroupIndirectCommandNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( groupIndex == rhs.groupIndex ); # endif } bool operator!=( BindShaderGroupIndirectCommandNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: uint32_t groupIndex = {}; }; struct SparseMemoryBind { using NativeType = VkSparseMemoryBind; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR SparseMemoryBind( VULKAN_HPP_NAMESPACE::DeviceSize resourceOffset_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize size_ = {}, VULKAN_HPP_NAMESPACE::DeviceMemory memory_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize memoryOffset_ = {}, VULKAN_HPP_NAMESPACE::SparseMemoryBindFlags flags_ = {} ) VULKAN_HPP_NOEXCEPT : resourceOffset{ resourceOffset_ } , size{ size_ } , memory{ memory_ } , memoryOffset{ memoryOffset_ } , flags{ flags_ } { } VULKAN_HPP_CONSTEXPR SparseMemoryBind( SparseMemoryBind const & rhs ) VULKAN_HPP_NOEXCEPT = default; SparseMemoryBind( VkSparseMemoryBind const & rhs ) VULKAN_HPP_NOEXCEPT : SparseMemoryBind( *reinterpret_cast( &rhs ) ) {} SparseMemoryBind & operator=( SparseMemoryBind const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ SparseMemoryBind & operator=( VkSparseMemoryBind const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 SparseMemoryBind & setResourceOffset( VULKAN_HPP_NAMESPACE::DeviceSize resourceOffset_ ) VULKAN_HPP_NOEXCEPT { resourceOffset = resourceOffset_; return *this; } VULKAN_HPP_CONSTEXPR_14 SparseMemoryBind & setSize( VULKAN_HPP_NAMESPACE::DeviceSize size_ ) VULKAN_HPP_NOEXCEPT { size = size_; return *this; } VULKAN_HPP_CONSTEXPR_14 SparseMemoryBind & setMemory( VULKAN_HPP_NAMESPACE::DeviceMemory memory_ ) VULKAN_HPP_NOEXCEPT { memory = memory_; return *this; } VULKAN_HPP_CONSTEXPR_14 SparseMemoryBind & setMemoryOffset( VULKAN_HPP_NAMESPACE::DeviceSize memoryOffset_ ) VULKAN_HPP_NOEXCEPT { memoryOffset = memoryOffset_; return *this; } VULKAN_HPP_CONSTEXPR_14 SparseMemoryBind & setFlags( VULKAN_HPP_NAMESPACE::SparseMemoryBindFlags flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkSparseMemoryBind const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkSparseMemoryBind &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( resourceOffset, size, memory, memoryOffset, flags ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( SparseMemoryBind const & ) const = default; #else bool operator==( SparseMemoryBind const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( resourceOffset == rhs.resourceOffset ) && ( size == rhs.size ) && ( memory == rhs.memory ) && ( memoryOffset == rhs.memoryOffset ) && ( flags == rhs.flags ); # endif } bool operator!=( SparseMemoryBind const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::DeviceSize resourceOffset = {}; VULKAN_HPP_NAMESPACE::DeviceSize size = {}; VULKAN_HPP_NAMESPACE::DeviceMemory memory = {}; VULKAN_HPP_NAMESPACE::DeviceSize memoryOffset = {}; VULKAN_HPP_NAMESPACE::SparseMemoryBindFlags flags = {}; }; struct SparseBufferMemoryBindInfo { using NativeType = VkSparseBufferMemoryBindInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR SparseBufferMemoryBindInfo( VULKAN_HPP_NAMESPACE::Buffer buffer_ = {}, uint32_t bindCount_ = {}, const VULKAN_HPP_NAMESPACE::SparseMemoryBind * pBinds_ = {} ) VULKAN_HPP_NOEXCEPT : buffer{ buffer_ } , bindCount{ bindCount_ } , pBinds{ pBinds_ } { } VULKAN_HPP_CONSTEXPR SparseBufferMemoryBindInfo( SparseBufferMemoryBindInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; SparseBufferMemoryBindInfo( VkSparseBufferMemoryBindInfo const & rhs ) VULKAN_HPP_NOEXCEPT : SparseBufferMemoryBindInfo( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) SparseBufferMemoryBindInfo( VULKAN_HPP_NAMESPACE::Buffer buffer_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & binds_ ) : buffer( buffer_ ), bindCount( static_cast( binds_.size() ) ), pBinds( binds_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ SparseBufferMemoryBindInfo & operator=( SparseBufferMemoryBindInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ SparseBufferMemoryBindInfo & operator=( VkSparseBufferMemoryBindInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 SparseBufferMemoryBindInfo & setBuffer( VULKAN_HPP_NAMESPACE::Buffer buffer_ ) VULKAN_HPP_NOEXCEPT { buffer = buffer_; return *this; } VULKAN_HPP_CONSTEXPR_14 SparseBufferMemoryBindInfo & setBindCount( uint32_t bindCount_ ) VULKAN_HPP_NOEXCEPT { bindCount = bindCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 SparseBufferMemoryBindInfo & setPBinds( const VULKAN_HPP_NAMESPACE::SparseMemoryBind * pBinds_ ) VULKAN_HPP_NOEXCEPT { pBinds = pBinds_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) SparseBufferMemoryBindInfo & setBinds( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & binds_ ) VULKAN_HPP_NOEXCEPT { bindCount = static_cast( binds_.size() ); pBinds = binds_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkSparseBufferMemoryBindInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkSparseBufferMemoryBindInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( buffer, bindCount, pBinds ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( SparseBufferMemoryBindInfo const & ) const = default; #else bool operator==( SparseBufferMemoryBindInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( buffer == rhs.buffer ) && ( bindCount == rhs.bindCount ) && ( pBinds == rhs.pBinds ); # endif } bool operator!=( SparseBufferMemoryBindInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::Buffer buffer = {}; uint32_t bindCount = {}; const VULKAN_HPP_NAMESPACE::SparseMemoryBind * pBinds = {}; }; struct SparseImageOpaqueMemoryBindInfo { using NativeType = VkSparseImageOpaqueMemoryBindInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR SparseImageOpaqueMemoryBindInfo( VULKAN_HPP_NAMESPACE::Image image_ = {}, uint32_t bindCount_ = {}, const VULKAN_HPP_NAMESPACE::SparseMemoryBind * pBinds_ = {} ) VULKAN_HPP_NOEXCEPT : image{ image_ } , bindCount{ bindCount_ } , pBinds{ pBinds_ } { } VULKAN_HPP_CONSTEXPR SparseImageOpaqueMemoryBindInfo( SparseImageOpaqueMemoryBindInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; SparseImageOpaqueMemoryBindInfo( VkSparseImageOpaqueMemoryBindInfo const & rhs ) VULKAN_HPP_NOEXCEPT : SparseImageOpaqueMemoryBindInfo( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) SparseImageOpaqueMemoryBindInfo( VULKAN_HPP_NAMESPACE::Image image_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & binds_ ) : image( image_ ), bindCount( static_cast( binds_.size() ) ), pBinds( binds_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ SparseImageOpaqueMemoryBindInfo & operator=( SparseImageOpaqueMemoryBindInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ SparseImageOpaqueMemoryBindInfo & operator=( VkSparseImageOpaqueMemoryBindInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 SparseImageOpaqueMemoryBindInfo & setImage( VULKAN_HPP_NAMESPACE::Image image_ ) VULKAN_HPP_NOEXCEPT { image = image_; return *this; } VULKAN_HPP_CONSTEXPR_14 SparseImageOpaqueMemoryBindInfo & setBindCount( uint32_t bindCount_ ) VULKAN_HPP_NOEXCEPT { bindCount = bindCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 SparseImageOpaqueMemoryBindInfo & setPBinds( const VULKAN_HPP_NAMESPACE::SparseMemoryBind * pBinds_ ) VULKAN_HPP_NOEXCEPT { pBinds = pBinds_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) SparseImageOpaqueMemoryBindInfo & setBinds( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & binds_ ) VULKAN_HPP_NOEXCEPT { bindCount = static_cast( binds_.size() ); pBinds = binds_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkSparseImageOpaqueMemoryBindInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkSparseImageOpaqueMemoryBindInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( image, bindCount, pBinds ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( SparseImageOpaqueMemoryBindInfo const & ) const = default; #else bool operator==( SparseImageOpaqueMemoryBindInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( image == rhs.image ) && ( bindCount == rhs.bindCount ) && ( pBinds == rhs.pBinds ); # endif } bool operator!=( SparseImageOpaqueMemoryBindInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::Image image = {}; uint32_t bindCount = {}; const VULKAN_HPP_NAMESPACE::SparseMemoryBind * pBinds = {}; }; struct ImageSubresource { using NativeType = VkImageSubresource; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ImageSubresource( VULKAN_HPP_NAMESPACE::ImageAspectFlags aspectMask_ = {}, uint32_t mipLevel_ = {}, uint32_t arrayLayer_ = {} ) VULKAN_HPP_NOEXCEPT : aspectMask{ aspectMask_ } , mipLevel{ mipLevel_ } , arrayLayer{ arrayLayer_ } { } VULKAN_HPP_CONSTEXPR ImageSubresource( ImageSubresource const & rhs ) VULKAN_HPP_NOEXCEPT = default; ImageSubresource( VkImageSubresource const & rhs ) VULKAN_HPP_NOEXCEPT : ImageSubresource( *reinterpret_cast( &rhs ) ) {} ImageSubresource & operator=( ImageSubresource const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ImageSubresource & operator=( VkImageSubresource const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ImageSubresource & setAspectMask( VULKAN_HPP_NAMESPACE::ImageAspectFlags aspectMask_ ) VULKAN_HPP_NOEXCEPT { aspectMask = aspectMask_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageSubresource & setMipLevel( uint32_t mipLevel_ ) VULKAN_HPP_NOEXCEPT { mipLevel = mipLevel_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageSubresource & setArrayLayer( uint32_t arrayLayer_ ) VULKAN_HPP_NOEXCEPT { arrayLayer = arrayLayer_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkImageSubresource const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkImageSubresource &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( aspectMask, mipLevel, arrayLayer ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ImageSubresource const & ) const = default; #else bool operator==( ImageSubresource const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( aspectMask == rhs.aspectMask ) && ( mipLevel == rhs.mipLevel ) && ( arrayLayer == rhs.arrayLayer ); # endif } bool operator!=( ImageSubresource const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::ImageAspectFlags aspectMask = {}; uint32_t mipLevel = {}; uint32_t arrayLayer = {}; }; struct Offset3D { using NativeType = VkOffset3D; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR Offset3D( int32_t x_ = {}, int32_t y_ = {}, int32_t z_ = {} ) VULKAN_HPP_NOEXCEPT : x{ x_ } , y{ y_ } , z{ z_ } { } VULKAN_HPP_CONSTEXPR Offset3D( Offset3D const & rhs ) VULKAN_HPP_NOEXCEPT = default; Offset3D( VkOffset3D const & rhs ) VULKAN_HPP_NOEXCEPT : Offset3D( *reinterpret_cast( &rhs ) ) {} explicit Offset3D( Offset2D const & offset2D, int32_t z_ = {} ) : x( offset2D.x ), y( offset2D.y ), z( z_ ) {} Offset3D & operator=( Offset3D const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ Offset3D & operator=( VkOffset3D const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 Offset3D & setX( int32_t x_ ) VULKAN_HPP_NOEXCEPT { x = x_; return *this; } VULKAN_HPP_CONSTEXPR_14 Offset3D & setY( int32_t y_ ) VULKAN_HPP_NOEXCEPT { y = y_; return *this; } VULKAN_HPP_CONSTEXPR_14 Offset3D & setZ( int32_t z_ ) VULKAN_HPP_NOEXCEPT { z = z_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkOffset3D const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkOffset3D &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( x, y, z ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( Offset3D const & ) const = default; #else bool operator==( Offset3D const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( x == rhs.x ) && ( y == rhs.y ) && ( z == rhs.z ); # endif } bool operator!=( Offset3D const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: int32_t x = {}; int32_t y = {}; int32_t z = {}; }; struct Extent3D { using NativeType = VkExtent3D; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR Extent3D( uint32_t width_ = {}, uint32_t height_ = {}, uint32_t depth_ = {} ) VULKAN_HPP_NOEXCEPT : width{ width_ } , height{ height_ } , depth{ depth_ } { } VULKAN_HPP_CONSTEXPR Extent3D( Extent3D const & rhs ) VULKAN_HPP_NOEXCEPT = default; Extent3D( VkExtent3D const & rhs ) VULKAN_HPP_NOEXCEPT : Extent3D( *reinterpret_cast( &rhs ) ) {} explicit Extent3D( Extent2D const & extent2D, uint32_t depth_ = {} ) : width( extent2D.width ), height( extent2D.height ), depth( depth_ ) {} Extent3D & operator=( Extent3D const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ Extent3D & operator=( VkExtent3D const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 Extent3D & setWidth( uint32_t width_ ) VULKAN_HPP_NOEXCEPT { width = width_; return *this; } VULKAN_HPP_CONSTEXPR_14 Extent3D & setHeight( uint32_t height_ ) VULKAN_HPP_NOEXCEPT { height = height_; return *this; } VULKAN_HPP_CONSTEXPR_14 Extent3D & setDepth( uint32_t depth_ ) VULKAN_HPP_NOEXCEPT { depth = depth_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkExtent3D const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkExtent3D &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( width, height, depth ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( Extent3D const & ) const = default; #else bool operator==( Extent3D const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( width == rhs.width ) && ( height == rhs.height ) && ( depth == rhs.depth ); # endif } bool operator!=( Extent3D const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: uint32_t width = {}; uint32_t height = {}; uint32_t depth = {}; }; struct SparseImageMemoryBind { using NativeType = VkSparseImageMemoryBind; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR SparseImageMemoryBind( VULKAN_HPP_NAMESPACE::ImageSubresource subresource_ = {}, VULKAN_HPP_NAMESPACE::Offset3D offset_ = {}, VULKAN_HPP_NAMESPACE::Extent3D extent_ = {}, VULKAN_HPP_NAMESPACE::DeviceMemory memory_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize memoryOffset_ = {}, VULKAN_HPP_NAMESPACE::SparseMemoryBindFlags flags_ = {} ) VULKAN_HPP_NOEXCEPT : subresource{ subresource_ } , offset{ offset_ } , extent{ extent_ } , memory{ memory_ } , memoryOffset{ memoryOffset_ } , flags{ flags_ } { } VULKAN_HPP_CONSTEXPR SparseImageMemoryBind( SparseImageMemoryBind const & rhs ) VULKAN_HPP_NOEXCEPT = default; SparseImageMemoryBind( VkSparseImageMemoryBind const & rhs ) VULKAN_HPP_NOEXCEPT : SparseImageMemoryBind( *reinterpret_cast( &rhs ) ) { } SparseImageMemoryBind & operator=( SparseImageMemoryBind const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ SparseImageMemoryBind & operator=( VkSparseImageMemoryBind const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 SparseImageMemoryBind & setSubresource( VULKAN_HPP_NAMESPACE::ImageSubresource const & subresource_ ) VULKAN_HPP_NOEXCEPT { subresource = subresource_; return *this; } VULKAN_HPP_CONSTEXPR_14 SparseImageMemoryBind & setOffset( VULKAN_HPP_NAMESPACE::Offset3D const & offset_ ) VULKAN_HPP_NOEXCEPT { offset = offset_; return *this; } VULKAN_HPP_CONSTEXPR_14 SparseImageMemoryBind & setExtent( VULKAN_HPP_NAMESPACE::Extent3D const & extent_ ) VULKAN_HPP_NOEXCEPT { extent = extent_; return *this; } VULKAN_HPP_CONSTEXPR_14 SparseImageMemoryBind & setMemory( VULKAN_HPP_NAMESPACE::DeviceMemory memory_ ) VULKAN_HPP_NOEXCEPT { memory = memory_; return *this; } VULKAN_HPP_CONSTEXPR_14 SparseImageMemoryBind & setMemoryOffset( VULKAN_HPP_NAMESPACE::DeviceSize memoryOffset_ ) VULKAN_HPP_NOEXCEPT { memoryOffset = memoryOffset_; return *this; } VULKAN_HPP_CONSTEXPR_14 SparseImageMemoryBind & setFlags( VULKAN_HPP_NAMESPACE::SparseMemoryBindFlags flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkSparseImageMemoryBind const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkSparseImageMemoryBind &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( subresource, offset, extent, memory, memoryOffset, flags ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( SparseImageMemoryBind const & ) const = default; #else bool operator==( SparseImageMemoryBind const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( subresource == rhs.subresource ) && ( offset == rhs.offset ) && ( extent == rhs.extent ) && ( memory == rhs.memory ) && ( memoryOffset == rhs.memoryOffset ) && ( flags == rhs.flags ); # endif } bool operator!=( SparseImageMemoryBind const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::ImageSubresource subresource = {}; VULKAN_HPP_NAMESPACE::Offset3D offset = {}; VULKAN_HPP_NAMESPACE::Extent3D extent = {}; VULKAN_HPP_NAMESPACE::DeviceMemory memory = {}; VULKAN_HPP_NAMESPACE::DeviceSize memoryOffset = {}; VULKAN_HPP_NAMESPACE::SparseMemoryBindFlags flags = {}; }; struct SparseImageMemoryBindInfo { using NativeType = VkSparseImageMemoryBindInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR SparseImageMemoryBindInfo( VULKAN_HPP_NAMESPACE::Image image_ = {}, uint32_t bindCount_ = {}, const VULKAN_HPP_NAMESPACE::SparseImageMemoryBind * pBinds_ = {} ) VULKAN_HPP_NOEXCEPT : image{ image_ } , bindCount{ bindCount_ } , pBinds{ pBinds_ } { } VULKAN_HPP_CONSTEXPR SparseImageMemoryBindInfo( SparseImageMemoryBindInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; SparseImageMemoryBindInfo( VkSparseImageMemoryBindInfo const & rhs ) VULKAN_HPP_NOEXCEPT : SparseImageMemoryBindInfo( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) SparseImageMemoryBindInfo( VULKAN_HPP_NAMESPACE::Image image_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & binds_ ) : image( image_ ), bindCount( static_cast( binds_.size() ) ), pBinds( binds_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ SparseImageMemoryBindInfo & operator=( SparseImageMemoryBindInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ SparseImageMemoryBindInfo & operator=( VkSparseImageMemoryBindInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 SparseImageMemoryBindInfo & setImage( VULKAN_HPP_NAMESPACE::Image image_ ) VULKAN_HPP_NOEXCEPT { image = image_; return *this; } VULKAN_HPP_CONSTEXPR_14 SparseImageMemoryBindInfo & setBindCount( uint32_t bindCount_ ) VULKAN_HPP_NOEXCEPT { bindCount = bindCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 SparseImageMemoryBindInfo & setPBinds( const VULKAN_HPP_NAMESPACE::SparseImageMemoryBind * pBinds_ ) VULKAN_HPP_NOEXCEPT { pBinds = pBinds_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) SparseImageMemoryBindInfo & setBinds( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & binds_ ) VULKAN_HPP_NOEXCEPT { bindCount = static_cast( binds_.size() ); pBinds = binds_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkSparseImageMemoryBindInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkSparseImageMemoryBindInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( image, bindCount, pBinds ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( SparseImageMemoryBindInfo const & ) const = default; #else bool operator==( SparseImageMemoryBindInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( image == rhs.image ) && ( bindCount == rhs.bindCount ) && ( pBinds == rhs.pBinds ); # endif } bool operator!=( SparseImageMemoryBindInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::Image image = {}; uint32_t bindCount = {}; const VULKAN_HPP_NAMESPACE::SparseImageMemoryBind * pBinds = {}; }; struct BindSparseInfo { using NativeType = VkBindSparseInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eBindSparseInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR BindSparseInfo( uint32_t waitSemaphoreCount_ = {}, const VULKAN_HPP_NAMESPACE::Semaphore * pWaitSemaphores_ = {}, uint32_t bufferBindCount_ = {}, const VULKAN_HPP_NAMESPACE::SparseBufferMemoryBindInfo * pBufferBinds_ = {}, uint32_t imageOpaqueBindCount_ = {}, const VULKAN_HPP_NAMESPACE::SparseImageOpaqueMemoryBindInfo * pImageOpaqueBinds_ = {}, uint32_t imageBindCount_ = {}, const VULKAN_HPP_NAMESPACE::SparseImageMemoryBindInfo * pImageBinds_ = {}, uint32_t signalSemaphoreCount_ = {}, const VULKAN_HPP_NAMESPACE::Semaphore * pSignalSemaphores_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , waitSemaphoreCount{ waitSemaphoreCount_ } , pWaitSemaphores{ pWaitSemaphores_ } , bufferBindCount{ bufferBindCount_ } , pBufferBinds{ pBufferBinds_ } , imageOpaqueBindCount{ imageOpaqueBindCount_ } , pImageOpaqueBinds{ pImageOpaqueBinds_ } , imageBindCount{ imageBindCount_ } , pImageBinds{ pImageBinds_ } , signalSemaphoreCount{ signalSemaphoreCount_ } , pSignalSemaphores{ pSignalSemaphores_ } { } VULKAN_HPP_CONSTEXPR BindSparseInfo( BindSparseInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; BindSparseInfo( VkBindSparseInfo const & rhs ) VULKAN_HPP_NOEXCEPT : BindSparseInfo( *reinterpret_cast( &rhs ) ) {} # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) BindSparseInfo( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & waitSemaphores_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & bufferBinds_ = {}, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & imageOpaqueBinds_ = {}, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & imageBinds_ = {}, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & signalSemaphores_ = {}, const void * pNext_ = nullptr ) : pNext( pNext_ ) , waitSemaphoreCount( static_cast( waitSemaphores_.size() ) ) , pWaitSemaphores( waitSemaphores_.data() ) , bufferBindCount( static_cast( bufferBinds_.size() ) ) , pBufferBinds( bufferBinds_.data() ) , imageOpaqueBindCount( static_cast( imageOpaqueBinds_.size() ) ) , pImageOpaqueBinds( imageOpaqueBinds_.data() ) , imageBindCount( static_cast( imageBinds_.size() ) ) , pImageBinds( imageBinds_.data() ) , signalSemaphoreCount( static_cast( signalSemaphores_.size() ) ) , pSignalSemaphores( signalSemaphores_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ BindSparseInfo & operator=( BindSparseInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ BindSparseInfo & operator=( VkBindSparseInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 BindSparseInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 BindSparseInfo & setWaitSemaphoreCount( uint32_t waitSemaphoreCount_ ) VULKAN_HPP_NOEXCEPT { waitSemaphoreCount = waitSemaphoreCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 BindSparseInfo & setPWaitSemaphores( const VULKAN_HPP_NAMESPACE::Semaphore * pWaitSemaphores_ ) VULKAN_HPP_NOEXCEPT { pWaitSemaphores = pWaitSemaphores_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) BindSparseInfo & setWaitSemaphores( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & waitSemaphores_ ) VULKAN_HPP_NOEXCEPT { waitSemaphoreCount = static_cast( waitSemaphores_.size() ); pWaitSemaphores = waitSemaphores_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 BindSparseInfo & setBufferBindCount( uint32_t bufferBindCount_ ) VULKAN_HPP_NOEXCEPT { bufferBindCount = bufferBindCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 BindSparseInfo & setPBufferBinds( const VULKAN_HPP_NAMESPACE::SparseBufferMemoryBindInfo * pBufferBinds_ ) VULKAN_HPP_NOEXCEPT { pBufferBinds = pBufferBinds_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) BindSparseInfo & setBufferBinds( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & bufferBinds_ ) VULKAN_HPP_NOEXCEPT { bufferBindCount = static_cast( bufferBinds_.size() ); pBufferBinds = bufferBinds_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 BindSparseInfo & setImageOpaqueBindCount( uint32_t imageOpaqueBindCount_ ) VULKAN_HPP_NOEXCEPT { imageOpaqueBindCount = imageOpaqueBindCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 BindSparseInfo & setPImageOpaqueBinds( const VULKAN_HPP_NAMESPACE::SparseImageOpaqueMemoryBindInfo * pImageOpaqueBinds_ ) VULKAN_HPP_NOEXCEPT { pImageOpaqueBinds = pImageOpaqueBinds_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) BindSparseInfo & setImageOpaqueBinds( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & imageOpaqueBinds_ ) VULKAN_HPP_NOEXCEPT { imageOpaqueBindCount = static_cast( imageOpaqueBinds_.size() ); pImageOpaqueBinds = imageOpaqueBinds_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 BindSparseInfo & setImageBindCount( uint32_t imageBindCount_ ) VULKAN_HPP_NOEXCEPT { imageBindCount = imageBindCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 BindSparseInfo & setPImageBinds( const VULKAN_HPP_NAMESPACE::SparseImageMemoryBindInfo * pImageBinds_ ) VULKAN_HPP_NOEXCEPT { pImageBinds = pImageBinds_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) BindSparseInfo & setImageBinds( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & imageBinds_ ) VULKAN_HPP_NOEXCEPT { imageBindCount = static_cast( imageBinds_.size() ); pImageBinds = imageBinds_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 BindSparseInfo & setSignalSemaphoreCount( uint32_t signalSemaphoreCount_ ) VULKAN_HPP_NOEXCEPT { signalSemaphoreCount = signalSemaphoreCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 BindSparseInfo & setPSignalSemaphores( const VULKAN_HPP_NAMESPACE::Semaphore * pSignalSemaphores_ ) VULKAN_HPP_NOEXCEPT { pSignalSemaphores = pSignalSemaphores_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) BindSparseInfo & setSignalSemaphores( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & signalSemaphores_ ) VULKAN_HPP_NOEXCEPT { signalSemaphoreCount = static_cast( signalSemaphores_.size() ); pSignalSemaphores = signalSemaphores_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkBindSparseInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkBindSparseInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, waitSemaphoreCount, pWaitSemaphores, bufferBindCount, pBufferBinds, imageOpaqueBindCount, pImageOpaqueBinds, imageBindCount, pImageBinds, signalSemaphoreCount, pSignalSemaphores ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( BindSparseInfo const & ) const = default; #else bool operator==( BindSparseInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( waitSemaphoreCount == rhs.waitSemaphoreCount ) && ( pWaitSemaphores == rhs.pWaitSemaphores ) && ( bufferBindCount == rhs.bufferBindCount ) && ( pBufferBinds == rhs.pBufferBinds ) && ( imageOpaqueBindCount == rhs.imageOpaqueBindCount ) && ( pImageOpaqueBinds == rhs.pImageOpaqueBinds ) && ( imageBindCount == rhs.imageBindCount ) && ( pImageBinds == rhs.pImageBinds ) && ( signalSemaphoreCount == rhs.signalSemaphoreCount ) && ( pSignalSemaphores == rhs.pSignalSemaphores ); # endif } bool operator!=( BindSparseInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eBindSparseInfo; const void * pNext = {}; uint32_t waitSemaphoreCount = {}; const VULKAN_HPP_NAMESPACE::Semaphore * pWaitSemaphores = {}; uint32_t bufferBindCount = {}; const VULKAN_HPP_NAMESPACE::SparseBufferMemoryBindInfo * pBufferBinds = {}; uint32_t imageOpaqueBindCount = {}; const VULKAN_HPP_NAMESPACE::SparseImageOpaqueMemoryBindInfo * pImageOpaqueBinds = {}; uint32_t imageBindCount = {}; const VULKAN_HPP_NAMESPACE::SparseImageMemoryBindInfo * pImageBinds = {}; uint32_t signalSemaphoreCount = {}; const VULKAN_HPP_NAMESPACE::Semaphore * pSignalSemaphores = {}; }; template <> struct CppType { using Type = BindSparseInfo; }; struct BindVertexBufferIndirectCommandEXT { using NativeType = VkBindVertexBufferIndirectCommandEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR BindVertexBufferIndirectCommandEXT( VULKAN_HPP_NAMESPACE::DeviceAddress bufferAddress_ = {}, uint32_t size_ = {}, uint32_t stride_ = {} ) VULKAN_HPP_NOEXCEPT : bufferAddress{ bufferAddress_ } , size{ size_ } , stride{ stride_ } { } VULKAN_HPP_CONSTEXPR BindVertexBufferIndirectCommandEXT( BindVertexBufferIndirectCommandEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; BindVertexBufferIndirectCommandEXT( VkBindVertexBufferIndirectCommandEXT const & rhs ) VULKAN_HPP_NOEXCEPT : BindVertexBufferIndirectCommandEXT( *reinterpret_cast( &rhs ) ) { } BindVertexBufferIndirectCommandEXT & operator=( BindVertexBufferIndirectCommandEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ BindVertexBufferIndirectCommandEXT & operator=( VkBindVertexBufferIndirectCommandEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 BindVertexBufferIndirectCommandEXT & setBufferAddress( VULKAN_HPP_NAMESPACE::DeviceAddress bufferAddress_ ) VULKAN_HPP_NOEXCEPT { bufferAddress = bufferAddress_; return *this; } VULKAN_HPP_CONSTEXPR_14 BindVertexBufferIndirectCommandEXT & setSize( uint32_t size_ ) VULKAN_HPP_NOEXCEPT { size = size_; return *this; } VULKAN_HPP_CONSTEXPR_14 BindVertexBufferIndirectCommandEXT & setStride( uint32_t stride_ ) VULKAN_HPP_NOEXCEPT { stride = stride_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkBindVertexBufferIndirectCommandEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkBindVertexBufferIndirectCommandEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( bufferAddress, size, stride ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( BindVertexBufferIndirectCommandEXT const & ) const = default; #else bool operator==( BindVertexBufferIndirectCommandEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( bufferAddress == rhs.bufferAddress ) && ( size == rhs.size ) && ( stride == rhs.stride ); # endif } bool operator!=( BindVertexBufferIndirectCommandEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::DeviceAddress bufferAddress = {}; uint32_t size = {}; uint32_t stride = {}; }; struct BindVertexBufferIndirectCommandNV { using NativeType = VkBindVertexBufferIndirectCommandNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR BindVertexBufferIndirectCommandNV( VULKAN_HPP_NAMESPACE::DeviceAddress bufferAddress_ = {}, uint32_t size_ = {}, uint32_t stride_ = {} ) VULKAN_HPP_NOEXCEPT : bufferAddress{ bufferAddress_ } , size{ size_ } , stride{ stride_ } { } VULKAN_HPP_CONSTEXPR BindVertexBufferIndirectCommandNV( BindVertexBufferIndirectCommandNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; BindVertexBufferIndirectCommandNV( VkBindVertexBufferIndirectCommandNV const & rhs ) VULKAN_HPP_NOEXCEPT : BindVertexBufferIndirectCommandNV( *reinterpret_cast( &rhs ) ) { } BindVertexBufferIndirectCommandNV & operator=( BindVertexBufferIndirectCommandNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ BindVertexBufferIndirectCommandNV & operator=( VkBindVertexBufferIndirectCommandNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 BindVertexBufferIndirectCommandNV & setBufferAddress( VULKAN_HPP_NAMESPACE::DeviceAddress bufferAddress_ ) VULKAN_HPP_NOEXCEPT { bufferAddress = bufferAddress_; return *this; } VULKAN_HPP_CONSTEXPR_14 BindVertexBufferIndirectCommandNV & setSize( uint32_t size_ ) VULKAN_HPP_NOEXCEPT { size = size_; return *this; } VULKAN_HPP_CONSTEXPR_14 BindVertexBufferIndirectCommandNV & setStride( uint32_t stride_ ) VULKAN_HPP_NOEXCEPT { stride = stride_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkBindVertexBufferIndirectCommandNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkBindVertexBufferIndirectCommandNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( bufferAddress, size, stride ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( BindVertexBufferIndirectCommandNV const & ) const = default; #else bool operator==( BindVertexBufferIndirectCommandNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( bufferAddress == rhs.bufferAddress ) && ( size == rhs.size ) && ( stride == rhs.stride ); # endif } bool operator!=( BindVertexBufferIndirectCommandNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::DeviceAddress bufferAddress = {}; uint32_t size = {}; uint32_t stride = {}; }; struct BindVideoSessionMemoryInfoKHR { using NativeType = VkBindVideoSessionMemoryInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eBindVideoSessionMemoryInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR BindVideoSessionMemoryInfoKHR( uint32_t memoryBindIndex_ = {}, VULKAN_HPP_NAMESPACE::DeviceMemory memory_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize memoryOffset_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize memorySize_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , memoryBindIndex{ memoryBindIndex_ } , memory{ memory_ } , memoryOffset{ memoryOffset_ } , memorySize{ memorySize_ } { } VULKAN_HPP_CONSTEXPR BindVideoSessionMemoryInfoKHR( BindVideoSessionMemoryInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; BindVideoSessionMemoryInfoKHR( VkBindVideoSessionMemoryInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : BindVideoSessionMemoryInfoKHR( *reinterpret_cast( &rhs ) ) { } BindVideoSessionMemoryInfoKHR & operator=( BindVideoSessionMemoryInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ BindVideoSessionMemoryInfoKHR & operator=( VkBindVideoSessionMemoryInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 BindVideoSessionMemoryInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 BindVideoSessionMemoryInfoKHR & setMemoryBindIndex( uint32_t memoryBindIndex_ ) VULKAN_HPP_NOEXCEPT { memoryBindIndex = memoryBindIndex_; return *this; } VULKAN_HPP_CONSTEXPR_14 BindVideoSessionMemoryInfoKHR & setMemory( VULKAN_HPP_NAMESPACE::DeviceMemory memory_ ) VULKAN_HPP_NOEXCEPT { memory = memory_; return *this; } VULKAN_HPP_CONSTEXPR_14 BindVideoSessionMemoryInfoKHR & setMemoryOffset( VULKAN_HPP_NAMESPACE::DeviceSize memoryOffset_ ) VULKAN_HPP_NOEXCEPT { memoryOffset = memoryOffset_; return *this; } VULKAN_HPP_CONSTEXPR_14 BindVideoSessionMemoryInfoKHR & setMemorySize( VULKAN_HPP_NAMESPACE::DeviceSize memorySize_ ) VULKAN_HPP_NOEXCEPT { memorySize = memorySize_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkBindVideoSessionMemoryInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkBindVideoSessionMemoryInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, memoryBindIndex, memory, memoryOffset, memorySize ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( BindVideoSessionMemoryInfoKHR const & ) const = default; #else bool operator==( BindVideoSessionMemoryInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( memoryBindIndex == rhs.memoryBindIndex ) && ( memory == rhs.memory ) && ( memoryOffset == rhs.memoryOffset ) && ( memorySize == rhs.memorySize ); # endif } bool operator!=( BindVideoSessionMemoryInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eBindVideoSessionMemoryInfoKHR; const void * pNext = {}; uint32_t memoryBindIndex = {}; VULKAN_HPP_NAMESPACE::DeviceMemory memory = {}; VULKAN_HPP_NAMESPACE::DeviceSize memoryOffset = {}; VULKAN_HPP_NAMESPACE::DeviceSize memorySize = {}; }; template <> struct CppType { using Type = BindVideoSessionMemoryInfoKHR; }; struct BlitImageCubicWeightsInfoQCOM { using NativeType = VkBlitImageCubicWeightsInfoQCOM; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eBlitImageCubicWeightsInfoQCOM; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR BlitImageCubicWeightsInfoQCOM( VULKAN_HPP_NAMESPACE::CubicFilterWeightsQCOM cubicWeights_ = VULKAN_HPP_NAMESPACE::CubicFilterWeightsQCOM::eCatmullRom, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , cubicWeights{ cubicWeights_ } { } VULKAN_HPP_CONSTEXPR BlitImageCubicWeightsInfoQCOM( BlitImageCubicWeightsInfoQCOM const & rhs ) VULKAN_HPP_NOEXCEPT = default; BlitImageCubicWeightsInfoQCOM( VkBlitImageCubicWeightsInfoQCOM const & rhs ) VULKAN_HPP_NOEXCEPT : BlitImageCubicWeightsInfoQCOM( *reinterpret_cast( &rhs ) ) { } BlitImageCubicWeightsInfoQCOM & operator=( BlitImageCubicWeightsInfoQCOM const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ BlitImageCubicWeightsInfoQCOM & operator=( VkBlitImageCubicWeightsInfoQCOM const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 BlitImageCubicWeightsInfoQCOM & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 BlitImageCubicWeightsInfoQCOM & setCubicWeights( VULKAN_HPP_NAMESPACE::CubicFilterWeightsQCOM cubicWeights_ ) VULKAN_HPP_NOEXCEPT { cubicWeights = cubicWeights_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkBlitImageCubicWeightsInfoQCOM const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkBlitImageCubicWeightsInfoQCOM &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, cubicWeights ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( BlitImageCubicWeightsInfoQCOM const & ) const = default; #else bool operator==( BlitImageCubicWeightsInfoQCOM const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( cubicWeights == rhs.cubicWeights ); # endif } bool operator!=( BlitImageCubicWeightsInfoQCOM const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eBlitImageCubicWeightsInfoQCOM; const void * pNext = {}; VULKAN_HPP_NAMESPACE::CubicFilterWeightsQCOM cubicWeights = VULKAN_HPP_NAMESPACE::CubicFilterWeightsQCOM::eCatmullRom; }; template <> struct CppType { using Type = BlitImageCubicWeightsInfoQCOM; }; struct ImageSubresourceLayers { using NativeType = VkImageSubresourceLayers; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ImageSubresourceLayers( VULKAN_HPP_NAMESPACE::ImageAspectFlags aspectMask_ = {}, uint32_t mipLevel_ = {}, uint32_t baseArrayLayer_ = {}, uint32_t layerCount_ = {} ) VULKAN_HPP_NOEXCEPT : aspectMask{ aspectMask_ } , mipLevel{ mipLevel_ } , baseArrayLayer{ baseArrayLayer_ } , layerCount{ layerCount_ } { } VULKAN_HPP_CONSTEXPR ImageSubresourceLayers( ImageSubresourceLayers const & rhs ) VULKAN_HPP_NOEXCEPT = default; ImageSubresourceLayers( VkImageSubresourceLayers const & rhs ) VULKAN_HPP_NOEXCEPT : ImageSubresourceLayers( *reinterpret_cast( &rhs ) ) { } ImageSubresourceLayers & operator=( ImageSubresourceLayers const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ImageSubresourceLayers & operator=( VkImageSubresourceLayers const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ImageSubresourceLayers & setAspectMask( VULKAN_HPP_NAMESPACE::ImageAspectFlags aspectMask_ ) VULKAN_HPP_NOEXCEPT { aspectMask = aspectMask_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageSubresourceLayers & setMipLevel( uint32_t mipLevel_ ) VULKAN_HPP_NOEXCEPT { mipLevel = mipLevel_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageSubresourceLayers & setBaseArrayLayer( uint32_t baseArrayLayer_ ) VULKAN_HPP_NOEXCEPT { baseArrayLayer = baseArrayLayer_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageSubresourceLayers & setLayerCount( uint32_t layerCount_ ) VULKAN_HPP_NOEXCEPT { layerCount = layerCount_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkImageSubresourceLayers const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkImageSubresourceLayers &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( aspectMask, mipLevel, baseArrayLayer, layerCount ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ImageSubresourceLayers const & ) const = default; #else bool operator==( ImageSubresourceLayers const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( aspectMask == rhs.aspectMask ) && ( mipLevel == rhs.mipLevel ) && ( baseArrayLayer == rhs.baseArrayLayer ) && ( layerCount == rhs.layerCount ); # endif } bool operator!=( ImageSubresourceLayers const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::ImageAspectFlags aspectMask = {}; uint32_t mipLevel = {}; uint32_t baseArrayLayer = {}; uint32_t layerCount = {}; }; struct ImageBlit2 { using NativeType = VkImageBlit2; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImageBlit2; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 ImageBlit2( VULKAN_HPP_NAMESPACE::ImageSubresourceLayers srcSubresource_ = {}, std::array const & srcOffsets_ = {}, VULKAN_HPP_NAMESPACE::ImageSubresourceLayers dstSubresource_ = {}, std::array const & dstOffsets_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , srcSubresource{ srcSubresource_ } , srcOffsets{ srcOffsets_ } , dstSubresource{ dstSubresource_ } , dstOffsets{ dstOffsets_ } { } VULKAN_HPP_CONSTEXPR_14 ImageBlit2( ImageBlit2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; ImageBlit2( VkImageBlit2 const & rhs ) VULKAN_HPP_NOEXCEPT : ImageBlit2( *reinterpret_cast( &rhs ) ) {} ImageBlit2 & operator=( ImageBlit2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ImageBlit2 & operator=( VkImageBlit2 const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ImageBlit2 & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageBlit2 & setSrcSubresource( VULKAN_HPP_NAMESPACE::ImageSubresourceLayers const & srcSubresource_ ) VULKAN_HPP_NOEXCEPT { srcSubresource = srcSubresource_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageBlit2 & setSrcOffsets( std::array const & srcOffsets_ ) VULKAN_HPP_NOEXCEPT { srcOffsets = srcOffsets_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageBlit2 & setDstSubresource( VULKAN_HPP_NAMESPACE::ImageSubresourceLayers const & dstSubresource_ ) VULKAN_HPP_NOEXCEPT { dstSubresource = dstSubresource_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageBlit2 & setDstOffsets( std::array const & dstOffsets_ ) VULKAN_HPP_NOEXCEPT { dstOffsets = dstOffsets_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkImageBlit2 const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkImageBlit2 &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple const &, VULKAN_HPP_NAMESPACE::ImageSubresourceLayers const &, VULKAN_HPP_NAMESPACE::ArrayWrapper1D const &> # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, srcSubresource, srcOffsets, dstSubresource, dstOffsets ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ImageBlit2 const & ) const = default; #else bool operator==( ImageBlit2 const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( srcSubresource == rhs.srcSubresource ) && ( srcOffsets == rhs.srcOffsets ) && ( dstSubresource == rhs.dstSubresource ) && ( dstOffsets == rhs.dstOffsets ); # endif } bool operator!=( ImageBlit2 const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImageBlit2; const void * pNext = {}; VULKAN_HPP_NAMESPACE::ImageSubresourceLayers srcSubresource = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D srcOffsets = {}; VULKAN_HPP_NAMESPACE::ImageSubresourceLayers dstSubresource = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D dstOffsets = {}; }; template <> struct CppType { using Type = ImageBlit2; }; using ImageBlit2KHR = ImageBlit2; struct BlitImageInfo2 { using NativeType = VkBlitImageInfo2; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eBlitImageInfo2; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 BlitImageInfo2( VULKAN_HPP_NAMESPACE::Image srcImage_ = {}, VULKAN_HPP_NAMESPACE::ImageLayout srcImageLayout_ = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined, VULKAN_HPP_NAMESPACE::Image dstImage_ = {}, VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout_ = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined, uint32_t regionCount_ = {}, const VULKAN_HPP_NAMESPACE::ImageBlit2 * pRegions_ = {}, VULKAN_HPP_NAMESPACE::Filter filter_ = VULKAN_HPP_NAMESPACE::Filter::eNearest, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , srcImage{ srcImage_ } , srcImageLayout{ srcImageLayout_ } , dstImage{ dstImage_ } , dstImageLayout{ dstImageLayout_ } , regionCount{ regionCount_ } , pRegions{ pRegions_ } , filter{ filter_ } { } VULKAN_HPP_CONSTEXPR_14 BlitImageInfo2( BlitImageInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; BlitImageInfo2( VkBlitImageInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT : BlitImageInfo2( *reinterpret_cast( &rhs ) ) {} # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) BlitImageInfo2( VULKAN_HPP_NAMESPACE::Image srcImage_, VULKAN_HPP_NAMESPACE::ImageLayout srcImageLayout_, VULKAN_HPP_NAMESPACE::Image dstImage_, VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & regions_, VULKAN_HPP_NAMESPACE::Filter filter_ = VULKAN_HPP_NAMESPACE::Filter::eNearest, const void * pNext_ = nullptr ) : pNext( pNext_ ) , srcImage( srcImage_ ) , srcImageLayout( srcImageLayout_ ) , dstImage( dstImage_ ) , dstImageLayout( dstImageLayout_ ) , regionCount( static_cast( regions_.size() ) ) , pRegions( regions_.data() ) , filter( filter_ ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ BlitImageInfo2 & operator=( BlitImageInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ BlitImageInfo2 & operator=( VkBlitImageInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 BlitImageInfo2 & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 BlitImageInfo2 & setSrcImage( VULKAN_HPP_NAMESPACE::Image srcImage_ ) VULKAN_HPP_NOEXCEPT { srcImage = srcImage_; return *this; } VULKAN_HPP_CONSTEXPR_14 BlitImageInfo2 & setSrcImageLayout( VULKAN_HPP_NAMESPACE::ImageLayout srcImageLayout_ ) VULKAN_HPP_NOEXCEPT { srcImageLayout = srcImageLayout_; return *this; } VULKAN_HPP_CONSTEXPR_14 BlitImageInfo2 & setDstImage( VULKAN_HPP_NAMESPACE::Image dstImage_ ) VULKAN_HPP_NOEXCEPT { dstImage = dstImage_; return *this; } VULKAN_HPP_CONSTEXPR_14 BlitImageInfo2 & setDstImageLayout( VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout_ ) VULKAN_HPP_NOEXCEPT { dstImageLayout = dstImageLayout_; return *this; } VULKAN_HPP_CONSTEXPR_14 BlitImageInfo2 & setRegionCount( uint32_t regionCount_ ) VULKAN_HPP_NOEXCEPT { regionCount = regionCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 BlitImageInfo2 & setPRegions( const VULKAN_HPP_NAMESPACE::ImageBlit2 * pRegions_ ) VULKAN_HPP_NOEXCEPT { pRegions = pRegions_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) BlitImageInfo2 & setRegions( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & regions_ ) VULKAN_HPP_NOEXCEPT { regionCount = static_cast( regions_.size() ); pRegions = regions_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 BlitImageInfo2 & setFilter( VULKAN_HPP_NAMESPACE::Filter filter_ ) VULKAN_HPP_NOEXCEPT { filter = filter_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkBlitImageInfo2 const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkBlitImageInfo2 &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, pRegions, filter ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( BlitImageInfo2 const & ) const = default; #else bool operator==( BlitImageInfo2 const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( srcImage == rhs.srcImage ) && ( srcImageLayout == rhs.srcImageLayout ) && ( dstImage == rhs.dstImage ) && ( dstImageLayout == rhs.dstImageLayout ) && ( regionCount == rhs.regionCount ) && ( pRegions == rhs.pRegions ) && ( filter == rhs.filter ); # endif } bool operator!=( BlitImageInfo2 const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eBlitImageInfo2; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Image srcImage = {}; VULKAN_HPP_NAMESPACE::ImageLayout srcImageLayout = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined; VULKAN_HPP_NAMESPACE::Image dstImage = {}; VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined; uint32_t regionCount = {}; const VULKAN_HPP_NAMESPACE::ImageBlit2 * pRegions = {}; VULKAN_HPP_NAMESPACE::Filter filter = VULKAN_HPP_NAMESPACE::Filter::eNearest; }; template <> struct CppType { using Type = BlitImageInfo2; }; using BlitImageInfo2KHR = BlitImageInfo2; struct BufferCaptureDescriptorDataInfoEXT { using NativeType = VkBufferCaptureDescriptorDataInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eBufferCaptureDescriptorDataInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR BufferCaptureDescriptorDataInfoEXT( VULKAN_HPP_NAMESPACE::Buffer buffer_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , buffer{ buffer_ } { } VULKAN_HPP_CONSTEXPR BufferCaptureDescriptorDataInfoEXT( BufferCaptureDescriptorDataInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; BufferCaptureDescriptorDataInfoEXT( VkBufferCaptureDescriptorDataInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : BufferCaptureDescriptorDataInfoEXT( *reinterpret_cast( &rhs ) ) { } BufferCaptureDescriptorDataInfoEXT & operator=( BufferCaptureDescriptorDataInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ BufferCaptureDescriptorDataInfoEXT & operator=( VkBufferCaptureDescriptorDataInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 BufferCaptureDescriptorDataInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 BufferCaptureDescriptorDataInfoEXT & setBuffer( VULKAN_HPP_NAMESPACE::Buffer buffer_ ) VULKAN_HPP_NOEXCEPT { buffer = buffer_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkBufferCaptureDescriptorDataInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkBufferCaptureDescriptorDataInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, buffer ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( BufferCaptureDescriptorDataInfoEXT const & ) const = default; #else bool operator==( BufferCaptureDescriptorDataInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( buffer == rhs.buffer ); # endif } bool operator!=( BufferCaptureDescriptorDataInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eBufferCaptureDescriptorDataInfoEXT; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Buffer buffer = {}; }; template <> struct CppType { using Type = BufferCaptureDescriptorDataInfoEXT; }; #if defined( VK_USE_PLATFORM_FUCHSIA ) struct BufferCollectionBufferCreateInfoFUCHSIA { using NativeType = VkBufferCollectionBufferCreateInfoFUCHSIA; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eBufferCollectionBufferCreateInfoFUCHSIA; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR BufferCollectionBufferCreateInfoFUCHSIA( VULKAN_HPP_NAMESPACE::BufferCollectionFUCHSIA collection_ = {}, uint32_t index_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , collection{ collection_ } , index{ index_ } { } VULKAN_HPP_CONSTEXPR BufferCollectionBufferCreateInfoFUCHSIA( BufferCollectionBufferCreateInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT = default; BufferCollectionBufferCreateInfoFUCHSIA( VkBufferCollectionBufferCreateInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT : BufferCollectionBufferCreateInfoFUCHSIA( *reinterpret_cast( &rhs ) ) { } BufferCollectionBufferCreateInfoFUCHSIA & operator=( BufferCollectionBufferCreateInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ BufferCollectionBufferCreateInfoFUCHSIA & operator=( VkBufferCollectionBufferCreateInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } # if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 BufferCollectionBufferCreateInfoFUCHSIA & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 BufferCollectionBufferCreateInfoFUCHSIA & setCollection( VULKAN_HPP_NAMESPACE::BufferCollectionFUCHSIA collection_ ) VULKAN_HPP_NOEXCEPT { collection = collection_; return *this; } VULKAN_HPP_CONSTEXPR_14 BufferCollectionBufferCreateInfoFUCHSIA & setIndex( uint32_t index_ ) VULKAN_HPP_NOEXCEPT { index = index_; return *this; } # endif /*VULKAN_HPP_NO_SETTERS*/ operator VkBufferCollectionBufferCreateInfoFUCHSIA const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkBufferCollectionBufferCreateInfoFUCHSIA &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, collection, index ); } # endif # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( BufferCollectionBufferCreateInfoFUCHSIA const & ) const = default; # else bool operator==( BufferCollectionBufferCreateInfoFUCHSIA const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( collection == rhs.collection ) && ( index == rhs.index ); # endif } bool operator!=( BufferCollectionBufferCreateInfoFUCHSIA const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } # endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eBufferCollectionBufferCreateInfoFUCHSIA; const void * pNext = {}; VULKAN_HPP_NAMESPACE::BufferCollectionFUCHSIA collection = {}; uint32_t index = {}; }; template <> struct CppType { using Type = BufferCollectionBufferCreateInfoFUCHSIA; }; #endif /*VK_USE_PLATFORM_FUCHSIA*/ #if defined( VK_USE_PLATFORM_FUCHSIA ) struct BufferCollectionConstraintsInfoFUCHSIA { using NativeType = VkBufferCollectionConstraintsInfoFUCHSIA; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eBufferCollectionConstraintsInfoFUCHSIA; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR BufferCollectionConstraintsInfoFUCHSIA( uint32_t minBufferCount_ = {}, uint32_t maxBufferCount_ = {}, uint32_t minBufferCountForCamping_ = {}, uint32_t minBufferCountForDedicatedSlack_ = {}, uint32_t minBufferCountForSharedSlack_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , minBufferCount{ minBufferCount_ } , maxBufferCount{ maxBufferCount_ } , minBufferCountForCamping{ minBufferCountForCamping_ } , minBufferCountForDedicatedSlack{ minBufferCountForDedicatedSlack_ } , minBufferCountForSharedSlack{ minBufferCountForSharedSlack_ } { } VULKAN_HPP_CONSTEXPR BufferCollectionConstraintsInfoFUCHSIA( BufferCollectionConstraintsInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT = default; BufferCollectionConstraintsInfoFUCHSIA( VkBufferCollectionConstraintsInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT : BufferCollectionConstraintsInfoFUCHSIA( *reinterpret_cast( &rhs ) ) { } BufferCollectionConstraintsInfoFUCHSIA & operator=( BufferCollectionConstraintsInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ BufferCollectionConstraintsInfoFUCHSIA & operator=( VkBufferCollectionConstraintsInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } # if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 BufferCollectionConstraintsInfoFUCHSIA & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 BufferCollectionConstraintsInfoFUCHSIA & setMinBufferCount( uint32_t minBufferCount_ ) VULKAN_HPP_NOEXCEPT { minBufferCount = minBufferCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 BufferCollectionConstraintsInfoFUCHSIA & setMaxBufferCount( uint32_t maxBufferCount_ ) VULKAN_HPP_NOEXCEPT { maxBufferCount = maxBufferCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 BufferCollectionConstraintsInfoFUCHSIA & setMinBufferCountForCamping( uint32_t minBufferCountForCamping_ ) VULKAN_HPP_NOEXCEPT { minBufferCountForCamping = minBufferCountForCamping_; return *this; } VULKAN_HPP_CONSTEXPR_14 BufferCollectionConstraintsInfoFUCHSIA & setMinBufferCountForDedicatedSlack( uint32_t minBufferCountForDedicatedSlack_ ) VULKAN_HPP_NOEXCEPT { minBufferCountForDedicatedSlack = minBufferCountForDedicatedSlack_; return *this; } VULKAN_HPP_CONSTEXPR_14 BufferCollectionConstraintsInfoFUCHSIA & setMinBufferCountForSharedSlack( uint32_t minBufferCountForSharedSlack_ ) VULKAN_HPP_NOEXCEPT { minBufferCountForSharedSlack = minBufferCountForSharedSlack_; return *this; } # endif /*VULKAN_HPP_NO_SETTERS*/ operator VkBufferCollectionConstraintsInfoFUCHSIA const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkBufferCollectionConstraintsInfoFUCHSIA &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, minBufferCount, maxBufferCount, minBufferCountForCamping, minBufferCountForDedicatedSlack, minBufferCountForSharedSlack ); } # endif # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( BufferCollectionConstraintsInfoFUCHSIA const & ) const = default; # else bool operator==( BufferCollectionConstraintsInfoFUCHSIA const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( minBufferCount == rhs.minBufferCount ) && ( maxBufferCount == rhs.maxBufferCount ) && ( minBufferCountForCamping == rhs.minBufferCountForCamping ) && ( minBufferCountForDedicatedSlack == rhs.minBufferCountForDedicatedSlack ) && ( minBufferCountForSharedSlack == rhs.minBufferCountForSharedSlack ); # endif } bool operator!=( BufferCollectionConstraintsInfoFUCHSIA const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } # endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eBufferCollectionConstraintsInfoFUCHSIA; const void * pNext = {}; uint32_t minBufferCount = {}; uint32_t maxBufferCount = {}; uint32_t minBufferCountForCamping = {}; uint32_t minBufferCountForDedicatedSlack = {}; uint32_t minBufferCountForSharedSlack = {}; }; template <> struct CppType { using Type = BufferCollectionConstraintsInfoFUCHSIA; }; #endif /*VK_USE_PLATFORM_FUCHSIA*/ #if defined( VK_USE_PLATFORM_FUCHSIA ) struct BufferCollectionCreateInfoFUCHSIA { using NativeType = VkBufferCollectionCreateInfoFUCHSIA; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eBufferCollectionCreateInfoFUCHSIA; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR BufferCollectionCreateInfoFUCHSIA( zx_handle_t collectionToken_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , collectionToken{ collectionToken_ } { } VULKAN_HPP_CONSTEXPR BufferCollectionCreateInfoFUCHSIA( BufferCollectionCreateInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT = default; BufferCollectionCreateInfoFUCHSIA( VkBufferCollectionCreateInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT : BufferCollectionCreateInfoFUCHSIA( *reinterpret_cast( &rhs ) ) { } BufferCollectionCreateInfoFUCHSIA & operator=( BufferCollectionCreateInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ BufferCollectionCreateInfoFUCHSIA & operator=( VkBufferCollectionCreateInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } # if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 BufferCollectionCreateInfoFUCHSIA & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 BufferCollectionCreateInfoFUCHSIA & setCollectionToken( zx_handle_t collectionToken_ ) VULKAN_HPP_NOEXCEPT { collectionToken = collectionToken_; return *this; } # endif /*VULKAN_HPP_NO_SETTERS*/ operator VkBufferCollectionCreateInfoFUCHSIA const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkBufferCollectionCreateInfoFUCHSIA &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, collectionToken ); } # endif # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) std::strong_ordering operator<=>( BufferCollectionCreateInfoFUCHSIA const & rhs ) const VULKAN_HPP_NOEXCEPT { if ( auto cmp = sType <=> rhs.sType; cmp != 0 ) return cmp; if ( auto cmp = pNext <=> rhs.pNext; cmp != 0 ) return cmp; if ( auto cmp = memcmp( &collectionToken, &rhs.collectionToken, sizeof( zx_handle_t ) ); cmp != 0 ) return ( cmp < 0 ) ? std::strong_ordering::less : std::strong_ordering::greater; return std::strong_ordering::equivalent; } # endif bool operator==( BufferCollectionCreateInfoFUCHSIA const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( memcmp( &collectionToken, &rhs.collectionToken, sizeof( zx_handle_t ) ) == 0 ); } bool operator!=( BufferCollectionCreateInfoFUCHSIA const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eBufferCollectionCreateInfoFUCHSIA; const void * pNext = {}; zx_handle_t collectionToken = {}; }; template <> struct CppType { using Type = BufferCollectionCreateInfoFUCHSIA; }; #endif /*VK_USE_PLATFORM_FUCHSIA*/ #if defined( VK_USE_PLATFORM_FUCHSIA ) struct BufferCollectionImageCreateInfoFUCHSIA { using NativeType = VkBufferCollectionImageCreateInfoFUCHSIA; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eBufferCollectionImageCreateInfoFUCHSIA; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR BufferCollectionImageCreateInfoFUCHSIA( VULKAN_HPP_NAMESPACE::BufferCollectionFUCHSIA collection_ = {}, uint32_t index_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , collection{ collection_ } , index{ index_ } { } VULKAN_HPP_CONSTEXPR BufferCollectionImageCreateInfoFUCHSIA( BufferCollectionImageCreateInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT = default; BufferCollectionImageCreateInfoFUCHSIA( VkBufferCollectionImageCreateInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT : BufferCollectionImageCreateInfoFUCHSIA( *reinterpret_cast( &rhs ) ) { } BufferCollectionImageCreateInfoFUCHSIA & operator=( BufferCollectionImageCreateInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ BufferCollectionImageCreateInfoFUCHSIA & operator=( VkBufferCollectionImageCreateInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } # if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 BufferCollectionImageCreateInfoFUCHSIA & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 BufferCollectionImageCreateInfoFUCHSIA & setCollection( VULKAN_HPP_NAMESPACE::BufferCollectionFUCHSIA collection_ ) VULKAN_HPP_NOEXCEPT { collection = collection_; return *this; } VULKAN_HPP_CONSTEXPR_14 BufferCollectionImageCreateInfoFUCHSIA & setIndex( uint32_t index_ ) VULKAN_HPP_NOEXCEPT { index = index_; return *this; } # endif /*VULKAN_HPP_NO_SETTERS*/ operator VkBufferCollectionImageCreateInfoFUCHSIA const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkBufferCollectionImageCreateInfoFUCHSIA &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, collection, index ); } # endif # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( BufferCollectionImageCreateInfoFUCHSIA const & ) const = default; # else bool operator==( BufferCollectionImageCreateInfoFUCHSIA const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( collection == rhs.collection ) && ( index == rhs.index ); # endif } bool operator!=( BufferCollectionImageCreateInfoFUCHSIA const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } # endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eBufferCollectionImageCreateInfoFUCHSIA; const void * pNext = {}; VULKAN_HPP_NAMESPACE::BufferCollectionFUCHSIA collection = {}; uint32_t index = {}; }; template <> struct CppType { using Type = BufferCollectionImageCreateInfoFUCHSIA; }; #endif /*VK_USE_PLATFORM_FUCHSIA*/ #if defined( VK_USE_PLATFORM_FUCHSIA ) struct SysmemColorSpaceFUCHSIA { using NativeType = VkSysmemColorSpaceFUCHSIA; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSysmemColorSpaceFUCHSIA; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR SysmemColorSpaceFUCHSIA( uint32_t colorSpace_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , colorSpace{ colorSpace_ } { } VULKAN_HPP_CONSTEXPR SysmemColorSpaceFUCHSIA( SysmemColorSpaceFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT = default; SysmemColorSpaceFUCHSIA( VkSysmemColorSpaceFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT : SysmemColorSpaceFUCHSIA( *reinterpret_cast( &rhs ) ) { } SysmemColorSpaceFUCHSIA & operator=( SysmemColorSpaceFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ SysmemColorSpaceFUCHSIA & operator=( VkSysmemColorSpaceFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } # if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 SysmemColorSpaceFUCHSIA & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 SysmemColorSpaceFUCHSIA & setColorSpace( uint32_t colorSpace_ ) VULKAN_HPP_NOEXCEPT { colorSpace = colorSpace_; return *this; } # endif /*VULKAN_HPP_NO_SETTERS*/ operator VkSysmemColorSpaceFUCHSIA const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkSysmemColorSpaceFUCHSIA &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, colorSpace ); } # endif # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( SysmemColorSpaceFUCHSIA const & ) const = default; # else bool operator==( SysmemColorSpaceFUCHSIA const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( colorSpace == rhs.colorSpace ); # endif } bool operator!=( SysmemColorSpaceFUCHSIA const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } # endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSysmemColorSpaceFUCHSIA; const void * pNext = {}; uint32_t colorSpace = {}; }; template <> struct CppType { using Type = SysmemColorSpaceFUCHSIA; }; #endif /*VK_USE_PLATFORM_FUCHSIA*/ #if defined( VK_USE_PLATFORM_FUCHSIA ) struct BufferCollectionPropertiesFUCHSIA { using NativeType = VkBufferCollectionPropertiesFUCHSIA; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eBufferCollectionPropertiesFUCHSIA; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR BufferCollectionPropertiesFUCHSIA( uint32_t memoryTypeBits_ = {}, uint32_t bufferCount_ = {}, uint32_t createInfoIndex_ = {}, uint64_t sysmemPixelFormat_ = {}, VULKAN_HPP_NAMESPACE::FormatFeatureFlags formatFeatures_ = {}, VULKAN_HPP_NAMESPACE::SysmemColorSpaceFUCHSIA sysmemColorSpaceIndex_ = {}, VULKAN_HPP_NAMESPACE::ComponentMapping samplerYcbcrConversionComponents_ = {}, VULKAN_HPP_NAMESPACE::SamplerYcbcrModelConversion suggestedYcbcrModel_ = VULKAN_HPP_NAMESPACE::SamplerYcbcrModelConversion::eRgbIdentity, VULKAN_HPP_NAMESPACE::SamplerYcbcrRange suggestedYcbcrRange_ = VULKAN_HPP_NAMESPACE::SamplerYcbcrRange::eItuFull, VULKAN_HPP_NAMESPACE::ChromaLocation suggestedXChromaOffset_ = VULKAN_HPP_NAMESPACE::ChromaLocation::eCositedEven, VULKAN_HPP_NAMESPACE::ChromaLocation suggestedYChromaOffset_ = VULKAN_HPP_NAMESPACE::ChromaLocation::eCositedEven, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , memoryTypeBits{ memoryTypeBits_ } , bufferCount{ bufferCount_ } , createInfoIndex{ createInfoIndex_ } , sysmemPixelFormat{ sysmemPixelFormat_ } , formatFeatures{ formatFeatures_ } , sysmemColorSpaceIndex{ sysmemColorSpaceIndex_ } , samplerYcbcrConversionComponents{ samplerYcbcrConversionComponents_ } , suggestedYcbcrModel{ suggestedYcbcrModel_ } , suggestedYcbcrRange{ suggestedYcbcrRange_ } , suggestedXChromaOffset{ suggestedXChromaOffset_ } , suggestedYChromaOffset{ suggestedYChromaOffset_ } { } VULKAN_HPP_CONSTEXPR BufferCollectionPropertiesFUCHSIA( BufferCollectionPropertiesFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT = default; BufferCollectionPropertiesFUCHSIA( VkBufferCollectionPropertiesFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT : BufferCollectionPropertiesFUCHSIA( *reinterpret_cast( &rhs ) ) { } BufferCollectionPropertiesFUCHSIA & operator=( BufferCollectionPropertiesFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ BufferCollectionPropertiesFUCHSIA & operator=( VkBufferCollectionPropertiesFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkBufferCollectionPropertiesFUCHSIA const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkBufferCollectionPropertiesFUCHSIA &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, memoryTypeBits, bufferCount, createInfoIndex, sysmemPixelFormat, formatFeatures, sysmemColorSpaceIndex, samplerYcbcrConversionComponents, suggestedYcbcrModel, suggestedYcbcrRange, suggestedXChromaOffset, suggestedYChromaOffset ); } # endif # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( BufferCollectionPropertiesFUCHSIA const & ) const = default; # else bool operator==( BufferCollectionPropertiesFUCHSIA const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( memoryTypeBits == rhs.memoryTypeBits ) && ( bufferCount == rhs.bufferCount ) && ( createInfoIndex == rhs.createInfoIndex ) && ( sysmemPixelFormat == rhs.sysmemPixelFormat ) && ( formatFeatures == rhs.formatFeatures ) && ( sysmemColorSpaceIndex == rhs.sysmemColorSpaceIndex ) && ( samplerYcbcrConversionComponents == rhs.samplerYcbcrConversionComponents ) && ( suggestedYcbcrModel == rhs.suggestedYcbcrModel ) && ( suggestedYcbcrRange == rhs.suggestedYcbcrRange ) && ( suggestedXChromaOffset == rhs.suggestedXChromaOffset ) && ( suggestedYChromaOffset == rhs.suggestedYChromaOffset ); # endif } bool operator!=( BufferCollectionPropertiesFUCHSIA const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } # endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eBufferCollectionPropertiesFUCHSIA; void * pNext = {}; uint32_t memoryTypeBits = {}; uint32_t bufferCount = {}; uint32_t createInfoIndex = {}; uint64_t sysmemPixelFormat = {}; VULKAN_HPP_NAMESPACE::FormatFeatureFlags formatFeatures = {}; VULKAN_HPP_NAMESPACE::SysmemColorSpaceFUCHSIA sysmemColorSpaceIndex = {}; VULKAN_HPP_NAMESPACE::ComponentMapping samplerYcbcrConversionComponents = {}; VULKAN_HPP_NAMESPACE::SamplerYcbcrModelConversion suggestedYcbcrModel = VULKAN_HPP_NAMESPACE::SamplerYcbcrModelConversion::eRgbIdentity; VULKAN_HPP_NAMESPACE::SamplerYcbcrRange suggestedYcbcrRange = VULKAN_HPP_NAMESPACE::SamplerYcbcrRange::eItuFull; VULKAN_HPP_NAMESPACE::ChromaLocation suggestedXChromaOffset = VULKAN_HPP_NAMESPACE::ChromaLocation::eCositedEven; VULKAN_HPP_NAMESPACE::ChromaLocation suggestedYChromaOffset = VULKAN_HPP_NAMESPACE::ChromaLocation::eCositedEven; }; template <> struct CppType { using Type = BufferCollectionPropertiesFUCHSIA; }; #endif /*VK_USE_PLATFORM_FUCHSIA*/ struct BufferCreateInfo { using NativeType = VkBufferCreateInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eBufferCreateInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR BufferCreateInfo( VULKAN_HPP_NAMESPACE::BufferCreateFlags flags_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize size_ = {}, VULKAN_HPP_NAMESPACE::BufferUsageFlags usage_ = {}, VULKAN_HPP_NAMESPACE::SharingMode sharingMode_ = VULKAN_HPP_NAMESPACE::SharingMode::eExclusive, uint32_t queueFamilyIndexCount_ = {}, const uint32_t * pQueueFamilyIndices_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , size{ size_ } , usage{ usage_ } , sharingMode{ sharingMode_ } , queueFamilyIndexCount{ queueFamilyIndexCount_ } , pQueueFamilyIndices{ pQueueFamilyIndices_ } { } VULKAN_HPP_CONSTEXPR BufferCreateInfo( BufferCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; BufferCreateInfo( VkBufferCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT : BufferCreateInfo( *reinterpret_cast( &rhs ) ) {} # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) BufferCreateInfo( VULKAN_HPP_NAMESPACE::BufferCreateFlags flags_, VULKAN_HPP_NAMESPACE::DeviceSize size_, VULKAN_HPP_NAMESPACE::BufferUsageFlags usage_, VULKAN_HPP_NAMESPACE::SharingMode sharingMode_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & queueFamilyIndices_, const void * pNext_ = nullptr ) : pNext( pNext_ ) , flags( flags_ ) , size( size_ ) , usage( usage_ ) , sharingMode( sharingMode_ ) , queueFamilyIndexCount( static_cast( queueFamilyIndices_.size() ) ) , pQueueFamilyIndices( queueFamilyIndices_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ BufferCreateInfo & operator=( BufferCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ BufferCreateInfo & operator=( VkBufferCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 BufferCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 BufferCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::BufferCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 BufferCreateInfo & setSize( VULKAN_HPP_NAMESPACE::DeviceSize size_ ) VULKAN_HPP_NOEXCEPT { size = size_; return *this; } VULKAN_HPP_CONSTEXPR_14 BufferCreateInfo & setUsage( VULKAN_HPP_NAMESPACE::BufferUsageFlags usage_ ) VULKAN_HPP_NOEXCEPT { usage = usage_; return *this; } VULKAN_HPP_CONSTEXPR_14 BufferCreateInfo & setSharingMode( VULKAN_HPP_NAMESPACE::SharingMode sharingMode_ ) VULKAN_HPP_NOEXCEPT { sharingMode = sharingMode_; return *this; } VULKAN_HPP_CONSTEXPR_14 BufferCreateInfo & setQueueFamilyIndexCount( uint32_t queueFamilyIndexCount_ ) VULKAN_HPP_NOEXCEPT { queueFamilyIndexCount = queueFamilyIndexCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 BufferCreateInfo & setPQueueFamilyIndices( const uint32_t * pQueueFamilyIndices_ ) VULKAN_HPP_NOEXCEPT { pQueueFamilyIndices = pQueueFamilyIndices_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) BufferCreateInfo & setQueueFamilyIndices( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & queueFamilyIndices_ ) VULKAN_HPP_NOEXCEPT { queueFamilyIndexCount = static_cast( queueFamilyIndices_.size() ); pQueueFamilyIndices = queueFamilyIndices_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkBufferCreateInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkBufferCreateInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, size, usage, sharingMode, queueFamilyIndexCount, pQueueFamilyIndices ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( BufferCreateInfo const & ) const = default; #else bool operator==( BufferCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( size == rhs.size ) && ( usage == rhs.usage ) && ( sharingMode == rhs.sharingMode ) && ( queueFamilyIndexCount == rhs.queueFamilyIndexCount ) && ( pQueueFamilyIndices == rhs.pQueueFamilyIndices ); # endif } bool operator!=( BufferCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eBufferCreateInfo; const void * pNext = {}; VULKAN_HPP_NAMESPACE::BufferCreateFlags flags = {}; VULKAN_HPP_NAMESPACE::DeviceSize size = {}; VULKAN_HPP_NAMESPACE::BufferUsageFlags usage = {}; VULKAN_HPP_NAMESPACE::SharingMode sharingMode = VULKAN_HPP_NAMESPACE::SharingMode::eExclusive; uint32_t queueFamilyIndexCount = {}; const uint32_t * pQueueFamilyIndices = {}; }; template <> struct CppType { using Type = BufferCreateInfo; }; #if defined( VK_USE_PLATFORM_FUCHSIA ) struct BufferConstraintsInfoFUCHSIA { using NativeType = VkBufferConstraintsInfoFUCHSIA; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eBufferConstraintsInfoFUCHSIA; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR BufferConstraintsInfoFUCHSIA( VULKAN_HPP_NAMESPACE::BufferCreateInfo createInfo_ = {}, VULKAN_HPP_NAMESPACE::FormatFeatureFlags requiredFormatFeatures_ = {}, VULKAN_HPP_NAMESPACE::BufferCollectionConstraintsInfoFUCHSIA bufferCollectionConstraints_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , createInfo{ createInfo_ } , requiredFormatFeatures{ requiredFormatFeatures_ } , bufferCollectionConstraints{ bufferCollectionConstraints_ } { } VULKAN_HPP_CONSTEXPR BufferConstraintsInfoFUCHSIA( BufferConstraintsInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT = default; BufferConstraintsInfoFUCHSIA( VkBufferConstraintsInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT : BufferConstraintsInfoFUCHSIA( *reinterpret_cast( &rhs ) ) { } BufferConstraintsInfoFUCHSIA & operator=( BufferConstraintsInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ BufferConstraintsInfoFUCHSIA & operator=( VkBufferConstraintsInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } # if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 BufferConstraintsInfoFUCHSIA & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 BufferConstraintsInfoFUCHSIA & setCreateInfo( VULKAN_HPP_NAMESPACE::BufferCreateInfo const & createInfo_ ) VULKAN_HPP_NOEXCEPT { createInfo = createInfo_; return *this; } VULKAN_HPP_CONSTEXPR_14 BufferConstraintsInfoFUCHSIA & setRequiredFormatFeatures( VULKAN_HPP_NAMESPACE::FormatFeatureFlags requiredFormatFeatures_ ) VULKAN_HPP_NOEXCEPT { requiredFormatFeatures = requiredFormatFeatures_; return *this; } VULKAN_HPP_CONSTEXPR_14 BufferConstraintsInfoFUCHSIA & setBufferCollectionConstraints( VULKAN_HPP_NAMESPACE::BufferCollectionConstraintsInfoFUCHSIA const & bufferCollectionConstraints_ ) VULKAN_HPP_NOEXCEPT { bufferCollectionConstraints = bufferCollectionConstraints_; return *this; } # endif /*VULKAN_HPP_NO_SETTERS*/ operator VkBufferConstraintsInfoFUCHSIA const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkBufferConstraintsInfoFUCHSIA &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, createInfo, requiredFormatFeatures, bufferCollectionConstraints ); } # endif # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( BufferConstraintsInfoFUCHSIA const & ) const = default; # else bool operator==( BufferConstraintsInfoFUCHSIA const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( createInfo == rhs.createInfo ) && ( requiredFormatFeatures == rhs.requiredFormatFeatures ) && ( bufferCollectionConstraints == rhs.bufferCollectionConstraints ); # endif } bool operator!=( BufferConstraintsInfoFUCHSIA const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } # endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eBufferConstraintsInfoFUCHSIA; const void * pNext = {}; VULKAN_HPP_NAMESPACE::BufferCreateInfo createInfo = {}; VULKAN_HPP_NAMESPACE::FormatFeatureFlags requiredFormatFeatures = {}; VULKAN_HPP_NAMESPACE::BufferCollectionConstraintsInfoFUCHSIA bufferCollectionConstraints = {}; }; template <> struct CppType { using Type = BufferConstraintsInfoFUCHSIA; }; #endif /*VK_USE_PLATFORM_FUCHSIA*/ struct BufferCopy { using NativeType = VkBufferCopy; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR BufferCopy( VULKAN_HPP_NAMESPACE::DeviceSize srcOffset_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize dstOffset_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize size_ = {} ) VULKAN_HPP_NOEXCEPT : srcOffset{ srcOffset_ } , dstOffset{ dstOffset_ } , size{ size_ } { } VULKAN_HPP_CONSTEXPR BufferCopy( BufferCopy const & rhs ) VULKAN_HPP_NOEXCEPT = default; BufferCopy( VkBufferCopy const & rhs ) VULKAN_HPP_NOEXCEPT : BufferCopy( *reinterpret_cast( &rhs ) ) {} BufferCopy & operator=( BufferCopy const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ BufferCopy & operator=( VkBufferCopy const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 BufferCopy & setSrcOffset( VULKAN_HPP_NAMESPACE::DeviceSize srcOffset_ ) VULKAN_HPP_NOEXCEPT { srcOffset = srcOffset_; return *this; } VULKAN_HPP_CONSTEXPR_14 BufferCopy & setDstOffset( VULKAN_HPP_NAMESPACE::DeviceSize dstOffset_ ) VULKAN_HPP_NOEXCEPT { dstOffset = dstOffset_; return *this; } VULKAN_HPP_CONSTEXPR_14 BufferCopy & setSize( VULKAN_HPP_NAMESPACE::DeviceSize size_ ) VULKAN_HPP_NOEXCEPT { size = size_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkBufferCopy const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkBufferCopy &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( srcOffset, dstOffset, size ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( BufferCopy const & ) const = default; #else bool operator==( BufferCopy const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( srcOffset == rhs.srcOffset ) && ( dstOffset == rhs.dstOffset ) && ( size == rhs.size ); # endif } bool operator!=( BufferCopy const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::DeviceSize srcOffset = {}; VULKAN_HPP_NAMESPACE::DeviceSize dstOffset = {}; VULKAN_HPP_NAMESPACE::DeviceSize size = {}; }; struct BufferCopy2 { using NativeType = VkBufferCopy2; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eBufferCopy2; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR BufferCopy2( VULKAN_HPP_NAMESPACE::DeviceSize srcOffset_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize dstOffset_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize size_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , srcOffset{ srcOffset_ } , dstOffset{ dstOffset_ } , size{ size_ } { } VULKAN_HPP_CONSTEXPR BufferCopy2( BufferCopy2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; BufferCopy2( VkBufferCopy2 const & rhs ) VULKAN_HPP_NOEXCEPT : BufferCopy2( *reinterpret_cast( &rhs ) ) {} BufferCopy2 & operator=( BufferCopy2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ BufferCopy2 & operator=( VkBufferCopy2 const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 BufferCopy2 & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 BufferCopy2 & setSrcOffset( VULKAN_HPP_NAMESPACE::DeviceSize srcOffset_ ) VULKAN_HPP_NOEXCEPT { srcOffset = srcOffset_; return *this; } VULKAN_HPP_CONSTEXPR_14 BufferCopy2 & setDstOffset( VULKAN_HPP_NAMESPACE::DeviceSize dstOffset_ ) VULKAN_HPP_NOEXCEPT { dstOffset = dstOffset_; return *this; } VULKAN_HPP_CONSTEXPR_14 BufferCopy2 & setSize( VULKAN_HPP_NAMESPACE::DeviceSize size_ ) VULKAN_HPP_NOEXCEPT { size = size_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkBufferCopy2 const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkBufferCopy2 &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, srcOffset, dstOffset, size ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( BufferCopy2 const & ) const = default; #else bool operator==( BufferCopy2 const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( srcOffset == rhs.srcOffset ) && ( dstOffset == rhs.dstOffset ) && ( size == rhs.size ); # endif } bool operator!=( BufferCopy2 const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eBufferCopy2; const void * pNext = {}; VULKAN_HPP_NAMESPACE::DeviceSize srcOffset = {}; VULKAN_HPP_NAMESPACE::DeviceSize dstOffset = {}; VULKAN_HPP_NAMESPACE::DeviceSize size = {}; }; template <> struct CppType { using Type = BufferCopy2; }; using BufferCopy2KHR = BufferCopy2; struct BufferDeviceAddressCreateInfoEXT { using NativeType = VkBufferDeviceAddressCreateInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eBufferDeviceAddressCreateInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR BufferDeviceAddressCreateInfoEXT( VULKAN_HPP_NAMESPACE::DeviceAddress deviceAddress_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , deviceAddress{ deviceAddress_ } { } VULKAN_HPP_CONSTEXPR BufferDeviceAddressCreateInfoEXT( BufferDeviceAddressCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; BufferDeviceAddressCreateInfoEXT( VkBufferDeviceAddressCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : BufferDeviceAddressCreateInfoEXT( *reinterpret_cast( &rhs ) ) { } BufferDeviceAddressCreateInfoEXT & operator=( BufferDeviceAddressCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ BufferDeviceAddressCreateInfoEXT & operator=( VkBufferDeviceAddressCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 BufferDeviceAddressCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 BufferDeviceAddressCreateInfoEXT & setDeviceAddress( VULKAN_HPP_NAMESPACE::DeviceAddress deviceAddress_ ) VULKAN_HPP_NOEXCEPT { deviceAddress = deviceAddress_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkBufferDeviceAddressCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkBufferDeviceAddressCreateInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, deviceAddress ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( BufferDeviceAddressCreateInfoEXT const & ) const = default; #else bool operator==( BufferDeviceAddressCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( deviceAddress == rhs.deviceAddress ); # endif } bool operator!=( BufferDeviceAddressCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eBufferDeviceAddressCreateInfoEXT; const void * pNext = {}; VULKAN_HPP_NAMESPACE::DeviceAddress deviceAddress = {}; }; template <> struct CppType { using Type = BufferDeviceAddressCreateInfoEXT; }; struct BufferDeviceAddressInfo { using NativeType = VkBufferDeviceAddressInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eBufferDeviceAddressInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR BufferDeviceAddressInfo( VULKAN_HPP_NAMESPACE::Buffer buffer_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , buffer{ buffer_ } { } VULKAN_HPP_CONSTEXPR BufferDeviceAddressInfo( BufferDeviceAddressInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; BufferDeviceAddressInfo( VkBufferDeviceAddressInfo const & rhs ) VULKAN_HPP_NOEXCEPT : BufferDeviceAddressInfo( *reinterpret_cast( &rhs ) ) { } BufferDeviceAddressInfo & operator=( BufferDeviceAddressInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ BufferDeviceAddressInfo & operator=( VkBufferDeviceAddressInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 BufferDeviceAddressInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 BufferDeviceAddressInfo & setBuffer( VULKAN_HPP_NAMESPACE::Buffer buffer_ ) VULKAN_HPP_NOEXCEPT { buffer = buffer_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkBufferDeviceAddressInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkBufferDeviceAddressInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, buffer ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( BufferDeviceAddressInfo const & ) const = default; #else bool operator==( BufferDeviceAddressInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( buffer == rhs.buffer ); # endif } bool operator!=( BufferDeviceAddressInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eBufferDeviceAddressInfo; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Buffer buffer = {}; }; template <> struct CppType { using Type = BufferDeviceAddressInfo; }; using BufferDeviceAddressInfoEXT = BufferDeviceAddressInfo; using BufferDeviceAddressInfoKHR = BufferDeviceAddressInfo; struct BufferImageCopy { using NativeType = VkBufferImageCopy; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR BufferImageCopy( VULKAN_HPP_NAMESPACE::DeviceSize bufferOffset_ = {}, uint32_t bufferRowLength_ = {}, uint32_t bufferImageHeight_ = {}, VULKAN_HPP_NAMESPACE::ImageSubresourceLayers imageSubresource_ = {}, VULKAN_HPP_NAMESPACE::Offset3D imageOffset_ = {}, VULKAN_HPP_NAMESPACE::Extent3D imageExtent_ = {} ) VULKAN_HPP_NOEXCEPT : bufferOffset{ bufferOffset_ } , bufferRowLength{ bufferRowLength_ } , bufferImageHeight{ bufferImageHeight_ } , imageSubresource{ imageSubresource_ } , imageOffset{ imageOffset_ } , imageExtent{ imageExtent_ } { } VULKAN_HPP_CONSTEXPR BufferImageCopy( BufferImageCopy const & rhs ) VULKAN_HPP_NOEXCEPT = default; BufferImageCopy( VkBufferImageCopy const & rhs ) VULKAN_HPP_NOEXCEPT : BufferImageCopy( *reinterpret_cast( &rhs ) ) {} BufferImageCopy & operator=( BufferImageCopy const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ BufferImageCopy & operator=( VkBufferImageCopy const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 BufferImageCopy & setBufferOffset( VULKAN_HPP_NAMESPACE::DeviceSize bufferOffset_ ) VULKAN_HPP_NOEXCEPT { bufferOffset = bufferOffset_; return *this; } VULKAN_HPP_CONSTEXPR_14 BufferImageCopy & setBufferRowLength( uint32_t bufferRowLength_ ) VULKAN_HPP_NOEXCEPT { bufferRowLength = bufferRowLength_; return *this; } VULKAN_HPP_CONSTEXPR_14 BufferImageCopy & setBufferImageHeight( uint32_t bufferImageHeight_ ) VULKAN_HPP_NOEXCEPT { bufferImageHeight = bufferImageHeight_; return *this; } VULKAN_HPP_CONSTEXPR_14 BufferImageCopy & setImageSubresource( VULKAN_HPP_NAMESPACE::ImageSubresourceLayers const & imageSubresource_ ) VULKAN_HPP_NOEXCEPT { imageSubresource = imageSubresource_; return *this; } VULKAN_HPP_CONSTEXPR_14 BufferImageCopy & setImageOffset( VULKAN_HPP_NAMESPACE::Offset3D const & imageOffset_ ) VULKAN_HPP_NOEXCEPT { imageOffset = imageOffset_; return *this; } VULKAN_HPP_CONSTEXPR_14 BufferImageCopy & setImageExtent( VULKAN_HPP_NAMESPACE::Extent3D const & imageExtent_ ) VULKAN_HPP_NOEXCEPT { imageExtent = imageExtent_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkBufferImageCopy const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkBufferImageCopy &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( bufferOffset, bufferRowLength, bufferImageHeight, imageSubresource, imageOffset, imageExtent ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( BufferImageCopy const & ) const = default; #else bool operator==( BufferImageCopy const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( bufferOffset == rhs.bufferOffset ) && ( bufferRowLength == rhs.bufferRowLength ) && ( bufferImageHeight == rhs.bufferImageHeight ) && ( imageSubresource == rhs.imageSubresource ) && ( imageOffset == rhs.imageOffset ) && ( imageExtent == rhs.imageExtent ); # endif } bool operator!=( BufferImageCopy const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::DeviceSize bufferOffset = {}; uint32_t bufferRowLength = {}; uint32_t bufferImageHeight = {}; VULKAN_HPP_NAMESPACE::ImageSubresourceLayers imageSubresource = {}; VULKAN_HPP_NAMESPACE::Offset3D imageOffset = {}; VULKAN_HPP_NAMESPACE::Extent3D imageExtent = {}; }; struct BufferImageCopy2 { using NativeType = VkBufferImageCopy2; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eBufferImageCopy2; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR BufferImageCopy2( VULKAN_HPP_NAMESPACE::DeviceSize bufferOffset_ = {}, uint32_t bufferRowLength_ = {}, uint32_t bufferImageHeight_ = {}, VULKAN_HPP_NAMESPACE::ImageSubresourceLayers imageSubresource_ = {}, VULKAN_HPP_NAMESPACE::Offset3D imageOffset_ = {}, VULKAN_HPP_NAMESPACE::Extent3D imageExtent_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , bufferOffset{ bufferOffset_ } , bufferRowLength{ bufferRowLength_ } , bufferImageHeight{ bufferImageHeight_ } , imageSubresource{ imageSubresource_ } , imageOffset{ imageOffset_ } , imageExtent{ imageExtent_ } { } VULKAN_HPP_CONSTEXPR BufferImageCopy2( BufferImageCopy2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; BufferImageCopy2( VkBufferImageCopy2 const & rhs ) VULKAN_HPP_NOEXCEPT : BufferImageCopy2( *reinterpret_cast( &rhs ) ) {} BufferImageCopy2 & operator=( BufferImageCopy2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ BufferImageCopy2 & operator=( VkBufferImageCopy2 const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 BufferImageCopy2 & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 BufferImageCopy2 & setBufferOffset( VULKAN_HPP_NAMESPACE::DeviceSize bufferOffset_ ) VULKAN_HPP_NOEXCEPT { bufferOffset = bufferOffset_; return *this; } VULKAN_HPP_CONSTEXPR_14 BufferImageCopy2 & setBufferRowLength( uint32_t bufferRowLength_ ) VULKAN_HPP_NOEXCEPT { bufferRowLength = bufferRowLength_; return *this; } VULKAN_HPP_CONSTEXPR_14 BufferImageCopy2 & setBufferImageHeight( uint32_t bufferImageHeight_ ) VULKAN_HPP_NOEXCEPT { bufferImageHeight = bufferImageHeight_; return *this; } VULKAN_HPP_CONSTEXPR_14 BufferImageCopy2 & setImageSubresource( VULKAN_HPP_NAMESPACE::ImageSubresourceLayers const & imageSubresource_ ) VULKAN_HPP_NOEXCEPT { imageSubresource = imageSubresource_; return *this; } VULKAN_HPP_CONSTEXPR_14 BufferImageCopy2 & setImageOffset( VULKAN_HPP_NAMESPACE::Offset3D const & imageOffset_ ) VULKAN_HPP_NOEXCEPT { imageOffset = imageOffset_; return *this; } VULKAN_HPP_CONSTEXPR_14 BufferImageCopy2 & setImageExtent( VULKAN_HPP_NAMESPACE::Extent3D const & imageExtent_ ) VULKAN_HPP_NOEXCEPT { imageExtent = imageExtent_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkBufferImageCopy2 const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkBufferImageCopy2 &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, bufferOffset, bufferRowLength, bufferImageHeight, imageSubresource, imageOffset, imageExtent ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( BufferImageCopy2 const & ) const = default; #else bool operator==( BufferImageCopy2 const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( bufferOffset == rhs.bufferOffset ) && ( bufferRowLength == rhs.bufferRowLength ) && ( bufferImageHeight == rhs.bufferImageHeight ) && ( imageSubresource == rhs.imageSubresource ) && ( imageOffset == rhs.imageOffset ) && ( imageExtent == rhs.imageExtent ); # endif } bool operator!=( BufferImageCopy2 const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eBufferImageCopy2; const void * pNext = {}; VULKAN_HPP_NAMESPACE::DeviceSize bufferOffset = {}; uint32_t bufferRowLength = {}; uint32_t bufferImageHeight = {}; VULKAN_HPP_NAMESPACE::ImageSubresourceLayers imageSubresource = {}; VULKAN_HPP_NAMESPACE::Offset3D imageOffset = {}; VULKAN_HPP_NAMESPACE::Extent3D imageExtent = {}; }; template <> struct CppType { using Type = BufferImageCopy2; }; using BufferImageCopy2KHR = BufferImageCopy2; struct BufferMemoryBarrier { using NativeType = VkBufferMemoryBarrier; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eBufferMemoryBarrier; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR BufferMemoryBarrier( VULKAN_HPP_NAMESPACE::AccessFlags srcAccessMask_ = {}, VULKAN_HPP_NAMESPACE::AccessFlags dstAccessMask_ = {}, uint32_t srcQueueFamilyIndex_ = {}, uint32_t dstQueueFamilyIndex_ = {}, VULKAN_HPP_NAMESPACE::Buffer buffer_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize offset_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize size_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , srcAccessMask{ srcAccessMask_ } , dstAccessMask{ dstAccessMask_ } , srcQueueFamilyIndex{ srcQueueFamilyIndex_ } , dstQueueFamilyIndex{ dstQueueFamilyIndex_ } , buffer{ buffer_ } , offset{ offset_ } , size{ size_ } { } VULKAN_HPP_CONSTEXPR BufferMemoryBarrier( BufferMemoryBarrier const & rhs ) VULKAN_HPP_NOEXCEPT = default; BufferMemoryBarrier( VkBufferMemoryBarrier const & rhs ) VULKAN_HPP_NOEXCEPT : BufferMemoryBarrier( *reinterpret_cast( &rhs ) ) { } BufferMemoryBarrier & operator=( BufferMemoryBarrier const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ BufferMemoryBarrier & operator=( VkBufferMemoryBarrier const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 BufferMemoryBarrier & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 BufferMemoryBarrier & setSrcAccessMask( VULKAN_HPP_NAMESPACE::AccessFlags srcAccessMask_ ) VULKAN_HPP_NOEXCEPT { srcAccessMask = srcAccessMask_; return *this; } VULKAN_HPP_CONSTEXPR_14 BufferMemoryBarrier & setDstAccessMask( VULKAN_HPP_NAMESPACE::AccessFlags dstAccessMask_ ) VULKAN_HPP_NOEXCEPT { dstAccessMask = dstAccessMask_; return *this; } VULKAN_HPP_CONSTEXPR_14 BufferMemoryBarrier & setSrcQueueFamilyIndex( uint32_t srcQueueFamilyIndex_ ) VULKAN_HPP_NOEXCEPT { srcQueueFamilyIndex = srcQueueFamilyIndex_; return *this; } VULKAN_HPP_CONSTEXPR_14 BufferMemoryBarrier & setDstQueueFamilyIndex( uint32_t dstQueueFamilyIndex_ ) VULKAN_HPP_NOEXCEPT { dstQueueFamilyIndex = dstQueueFamilyIndex_; return *this; } VULKAN_HPP_CONSTEXPR_14 BufferMemoryBarrier & setBuffer( VULKAN_HPP_NAMESPACE::Buffer buffer_ ) VULKAN_HPP_NOEXCEPT { buffer = buffer_; return *this; } VULKAN_HPP_CONSTEXPR_14 BufferMemoryBarrier & setOffset( VULKAN_HPP_NAMESPACE::DeviceSize offset_ ) VULKAN_HPP_NOEXCEPT { offset = offset_; return *this; } VULKAN_HPP_CONSTEXPR_14 BufferMemoryBarrier & setSize( VULKAN_HPP_NAMESPACE::DeviceSize size_ ) VULKAN_HPP_NOEXCEPT { size = size_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkBufferMemoryBarrier const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkBufferMemoryBarrier &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, srcAccessMask, dstAccessMask, srcQueueFamilyIndex, dstQueueFamilyIndex, buffer, offset, size ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( BufferMemoryBarrier const & ) const = default; #else bool operator==( BufferMemoryBarrier const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( srcAccessMask == rhs.srcAccessMask ) && ( dstAccessMask == rhs.dstAccessMask ) && ( srcQueueFamilyIndex == rhs.srcQueueFamilyIndex ) && ( dstQueueFamilyIndex == rhs.dstQueueFamilyIndex ) && ( buffer == rhs.buffer ) && ( offset == rhs.offset ) && ( size == rhs.size ); # endif } bool operator!=( BufferMemoryBarrier const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eBufferMemoryBarrier; const void * pNext = {}; VULKAN_HPP_NAMESPACE::AccessFlags srcAccessMask = {}; VULKAN_HPP_NAMESPACE::AccessFlags dstAccessMask = {}; uint32_t srcQueueFamilyIndex = {}; uint32_t dstQueueFamilyIndex = {}; VULKAN_HPP_NAMESPACE::Buffer buffer = {}; VULKAN_HPP_NAMESPACE::DeviceSize offset = {}; VULKAN_HPP_NAMESPACE::DeviceSize size = {}; }; template <> struct CppType { using Type = BufferMemoryBarrier; }; struct BufferMemoryBarrier2 { using NativeType = VkBufferMemoryBarrier2; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eBufferMemoryBarrier2; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR BufferMemoryBarrier2( VULKAN_HPP_NAMESPACE::PipelineStageFlags2 srcStageMask_ = {}, VULKAN_HPP_NAMESPACE::AccessFlags2 srcAccessMask_ = {}, VULKAN_HPP_NAMESPACE::PipelineStageFlags2 dstStageMask_ = {}, VULKAN_HPP_NAMESPACE::AccessFlags2 dstAccessMask_ = {}, uint32_t srcQueueFamilyIndex_ = {}, uint32_t dstQueueFamilyIndex_ = {}, VULKAN_HPP_NAMESPACE::Buffer buffer_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize offset_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize size_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , srcStageMask{ srcStageMask_ } , srcAccessMask{ srcAccessMask_ } , dstStageMask{ dstStageMask_ } , dstAccessMask{ dstAccessMask_ } , srcQueueFamilyIndex{ srcQueueFamilyIndex_ } , dstQueueFamilyIndex{ dstQueueFamilyIndex_ } , buffer{ buffer_ } , offset{ offset_ } , size{ size_ } { } VULKAN_HPP_CONSTEXPR BufferMemoryBarrier2( BufferMemoryBarrier2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; BufferMemoryBarrier2( VkBufferMemoryBarrier2 const & rhs ) VULKAN_HPP_NOEXCEPT : BufferMemoryBarrier2( *reinterpret_cast( &rhs ) ) { } BufferMemoryBarrier2 & operator=( BufferMemoryBarrier2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ BufferMemoryBarrier2 & operator=( VkBufferMemoryBarrier2 const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 BufferMemoryBarrier2 & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 BufferMemoryBarrier2 & setSrcStageMask( VULKAN_HPP_NAMESPACE::PipelineStageFlags2 srcStageMask_ ) VULKAN_HPP_NOEXCEPT { srcStageMask = srcStageMask_; return *this; } VULKAN_HPP_CONSTEXPR_14 BufferMemoryBarrier2 & setSrcAccessMask( VULKAN_HPP_NAMESPACE::AccessFlags2 srcAccessMask_ ) VULKAN_HPP_NOEXCEPT { srcAccessMask = srcAccessMask_; return *this; } VULKAN_HPP_CONSTEXPR_14 BufferMemoryBarrier2 & setDstStageMask( VULKAN_HPP_NAMESPACE::PipelineStageFlags2 dstStageMask_ ) VULKAN_HPP_NOEXCEPT { dstStageMask = dstStageMask_; return *this; } VULKAN_HPP_CONSTEXPR_14 BufferMemoryBarrier2 & setDstAccessMask( VULKAN_HPP_NAMESPACE::AccessFlags2 dstAccessMask_ ) VULKAN_HPP_NOEXCEPT { dstAccessMask = dstAccessMask_; return *this; } VULKAN_HPP_CONSTEXPR_14 BufferMemoryBarrier2 & setSrcQueueFamilyIndex( uint32_t srcQueueFamilyIndex_ ) VULKAN_HPP_NOEXCEPT { srcQueueFamilyIndex = srcQueueFamilyIndex_; return *this; } VULKAN_HPP_CONSTEXPR_14 BufferMemoryBarrier2 & setDstQueueFamilyIndex( uint32_t dstQueueFamilyIndex_ ) VULKAN_HPP_NOEXCEPT { dstQueueFamilyIndex = dstQueueFamilyIndex_; return *this; } VULKAN_HPP_CONSTEXPR_14 BufferMemoryBarrier2 & setBuffer( VULKAN_HPP_NAMESPACE::Buffer buffer_ ) VULKAN_HPP_NOEXCEPT { buffer = buffer_; return *this; } VULKAN_HPP_CONSTEXPR_14 BufferMemoryBarrier2 & setOffset( VULKAN_HPP_NAMESPACE::DeviceSize offset_ ) VULKAN_HPP_NOEXCEPT { offset = offset_; return *this; } VULKAN_HPP_CONSTEXPR_14 BufferMemoryBarrier2 & setSize( VULKAN_HPP_NAMESPACE::DeviceSize size_ ) VULKAN_HPP_NOEXCEPT { size = size_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkBufferMemoryBarrier2 const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkBufferMemoryBarrier2 &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, srcStageMask, srcAccessMask, dstStageMask, dstAccessMask, srcQueueFamilyIndex, dstQueueFamilyIndex, buffer, offset, size ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( BufferMemoryBarrier2 const & ) const = default; #else bool operator==( BufferMemoryBarrier2 const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( srcStageMask == rhs.srcStageMask ) && ( srcAccessMask == rhs.srcAccessMask ) && ( dstStageMask == rhs.dstStageMask ) && ( dstAccessMask == rhs.dstAccessMask ) && ( srcQueueFamilyIndex == rhs.srcQueueFamilyIndex ) && ( dstQueueFamilyIndex == rhs.dstQueueFamilyIndex ) && ( buffer == rhs.buffer ) && ( offset == rhs.offset ) && ( size == rhs.size ); # endif } bool operator!=( BufferMemoryBarrier2 const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eBufferMemoryBarrier2; const void * pNext = {}; VULKAN_HPP_NAMESPACE::PipelineStageFlags2 srcStageMask = {}; VULKAN_HPP_NAMESPACE::AccessFlags2 srcAccessMask = {}; VULKAN_HPP_NAMESPACE::PipelineStageFlags2 dstStageMask = {}; VULKAN_HPP_NAMESPACE::AccessFlags2 dstAccessMask = {}; uint32_t srcQueueFamilyIndex = {}; uint32_t dstQueueFamilyIndex = {}; VULKAN_HPP_NAMESPACE::Buffer buffer = {}; VULKAN_HPP_NAMESPACE::DeviceSize offset = {}; VULKAN_HPP_NAMESPACE::DeviceSize size = {}; }; template <> struct CppType { using Type = BufferMemoryBarrier2; }; using BufferMemoryBarrier2KHR = BufferMemoryBarrier2; struct BufferMemoryRequirementsInfo2 { using NativeType = VkBufferMemoryRequirementsInfo2; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eBufferMemoryRequirementsInfo2; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR BufferMemoryRequirementsInfo2( VULKAN_HPP_NAMESPACE::Buffer buffer_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , buffer{ buffer_ } { } VULKAN_HPP_CONSTEXPR BufferMemoryRequirementsInfo2( BufferMemoryRequirementsInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; BufferMemoryRequirementsInfo2( VkBufferMemoryRequirementsInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT : BufferMemoryRequirementsInfo2( *reinterpret_cast( &rhs ) ) { } BufferMemoryRequirementsInfo2 & operator=( BufferMemoryRequirementsInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ BufferMemoryRequirementsInfo2 & operator=( VkBufferMemoryRequirementsInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 BufferMemoryRequirementsInfo2 & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 BufferMemoryRequirementsInfo2 & setBuffer( VULKAN_HPP_NAMESPACE::Buffer buffer_ ) VULKAN_HPP_NOEXCEPT { buffer = buffer_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkBufferMemoryRequirementsInfo2 const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkBufferMemoryRequirementsInfo2 &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, buffer ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( BufferMemoryRequirementsInfo2 const & ) const = default; #else bool operator==( BufferMemoryRequirementsInfo2 const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( buffer == rhs.buffer ); # endif } bool operator!=( BufferMemoryRequirementsInfo2 const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eBufferMemoryRequirementsInfo2; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Buffer buffer = {}; }; template <> struct CppType { using Type = BufferMemoryRequirementsInfo2; }; using BufferMemoryRequirementsInfo2KHR = BufferMemoryRequirementsInfo2; struct BufferOpaqueCaptureAddressCreateInfo { using NativeType = VkBufferOpaqueCaptureAddressCreateInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eBufferOpaqueCaptureAddressCreateInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR BufferOpaqueCaptureAddressCreateInfo( uint64_t opaqueCaptureAddress_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , opaqueCaptureAddress{ opaqueCaptureAddress_ } { } VULKAN_HPP_CONSTEXPR BufferOpaqueCaptureAddressCreateInfo( BufferOpaqueCaptureAddressCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; BufferOpaqueCaptureAddressCreateInfo( VkBufferOpaqueCaptureAddressCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT : BufferOpaqueCaptureAddressCreateInfo( *reinterpret_cast( &rhs ) ) { } BufferOpaqueCaptureAddressCreateInfo & operator=( BufferOpaqueCaptureAddressCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ BufferOpaqueCaptureAddressCreateInfo & operator=( VkBufferOpaqueCaptureAddressCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 BufferOpaqueCaptureAddressCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 BufferOpaqueCaptureAddressCreateInfo & setOpaqueCaptureAddress( uint64_t opaqueCaptureAddress_ ) VULKAN_HPP_NOEXCEPT { opaqueCaptureAddress = opaqueCaptureAddress_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkBufferOpaqueCaptureAddressCreateInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkBufferOpaqueCaptureAddressCreateInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, opaqueCaptureAddress ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( BufferOpaqueCaptureAddressCreateInfo const & ) const = default; #else bool operator==( BufferOpaqueCaptureAddressCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( opaqueCaptureAddress == rhs.opaqueCaptureAddress ); # endif } bool operator!=( BufferOpaqueCaptureAddressCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eBufferOpaqueCaptureAddressCreateInfo; const void * pNext = {}; uint64_t opaqueCaptureAddress = {}; }; template <> struct CppType { using Type = BufferOpaqueCaptureAddressCreateInfo; }; using BufferOpaqueCaptureAddressCreateInfoKHR = BufferOpaqueCaptureAddressCreateInfo; struct BufferUsageFlags2CreateInfo { using NativeType = VkBufferUsageFlags2CreateInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eBufferUsageFlags2CreateInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR BufferUsageFlags2CreateInfo( VULKAN_HPP_NAMESPACE::BufferUsageFlags2 usage_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , usage{ usage_ } { } VULKAN_HPP_CONSTEXPR BufferUsageFlags2CreateInfo( BufferUsageFlags2CreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; BufferUsageFlags2CreateInfo( VkBufferUsageFlags2CreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT : BufferUsageFlags2CreateInfo( *reinterpret_cast( &rhs ) ) { } BufferUsageFlags2CreateInfo & operator=( BufferUsageFlags2CreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ BufferUsageFlags2CreateInfo & operator=( VkBufferUsageFlags2CreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 BufferUsageFlags2CreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 BufferUsageFlags2CreateInfo & setUsage( VULKAN_HPP_NAMESPACE::BufferUsageFlags2 usage_ ) VULKAN_HPP_NOEXCEPT { usage = usage_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkBufferUsageFlags2CreateInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkBufferUsageFlags2CreateInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, usage ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( BufferUsageFlags2CreateInfo const & ) const = default; #else bool operator==( BufferUsageFlags2CreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( usage == rhs.usage ); # endif } bool operator!=( BufferUsageFlags2CreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eBufferUsageFlags2CreateInfo; const void * pNext = {}; VULKAN_HPP_NAMESPACE::BufferUsageFlags2 usage = {}; }; template <> struct CppType { using Type = BufferUsageFlags2CreateInfo; }; using BufferUsageFlags2CreateInfoKHR = BufferUsageFlags2CreateInfo; struct BufferViewCreateInfo { using NativeType = VkBufferViewCreateInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eBufferViewCreateInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR BufferViewCreateInfo( VULKAN_HPP_NAMESPACE::BufferViewCreateFlags flags_ = {}, VULKAN_HPP_NAMESPACE::Buffer buffer_ = {}, VULKAN_HPP_NAMESPACE::Format format_ = VULKAN_HPP_NAMESPACE::Format::eUndefined, VULKAN_HPP_NAMESPACE::DeviceSize offset_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize range_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , buffer{ buffer_ } , format{ format_ } , offset{ offset_ } , range{ range_ } { } VULKAN_HPP_CONSTEXPR BufferViewCreateInfo( BufferViewCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; BufferViewCreateInfo( VkBufferViewCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT : BufferViewCreateInfo( *reinterpret_cast( &rhs ) ) { } BufferViewCreateInfo & operator=( BufferViewCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ BufferViewCreateInfo & operator=( VkBufferViewCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 BufferViewCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 BufferViewCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::BufferViewCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 BufferViewCreateInfo & setBuffer( VULKAN_HPP_NAMESPACE::Buffer buffer_ ) VULKAN_HPP_NOEXCEPT { buffer = buffer_; return *this; } VULKAN_HPP_CONSTEXPR_14 BufferViewCreateInfo & setFormat( VULKAN_HPP_NAMESPACE::Format format_ ) VULKAN_HPP_NOEXCEPT { format = format_; return *this; } VULKAN_HPP_CONSTEXPR_14 BufferViewCreateInfo & setOffset( VULKAN_HPP_NAMESPACE::DeviceSize offset_ ) VULKAN_HPP_NOEXCEPT { offset = offset_; return *this; } VULKAN_HPP_CONSTEXPR_14 BufferViewCreateInfo & setRange( VULKAN_HPP_NAMESPACE::DeviceSize range_ ) VULKAN_HPP_NOEXCEPT { range = range_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkBufferViewCreateInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkBufferViewCreateInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, buffer, format, offset, range ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( BufferViewCreateInfo const & ) const = default; #else bool operator==( BufferViewCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( buffer == rhs.buffer ) && ( format == rhs.format ) && ( offset == rhs.offset ) && ( range == rhs.range ); # endif } bool operator!=( BufferViewCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eBufferViewCreateInfo; const void * pNext = {}; VULKAN_HPP_NAMESPACE::BufferViewCreateFlags flags = {}; VULKAN_HPP_NAMESPACE::Buffer buffer = {}; VULKAN_HPP_NAMESPACE::Format format = VULKAN_HPP_NAMESPACE::Format::eUndefined; VULKAN_HPP_NAMESPACE::DeviceSize offset = {}; VULKAN_HPP_NAMESPACE::DeviceSize range = {}; }; template <> struct CppType { using Type = BufferViewCreateInfo; }; struct StridedDeviceAddressNV { using NativeType = VkStridedDeviceAddressNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR StridedDeviceAddressNV( VULKAN_HPP_NAMESPACE::DeviceAddress startAddress_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize strideInBytes_ = {} ) VULKAN_HPP_NOEXCEPT : startAddress{ startAddress_ } , strideInBytes{ strideInBytes_ } { } VULKAN_HPP_CONSTEXPR StridedDeviceAddressNV( StridedDeviceAddressNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; StridedDeviceAddressNV( VkStridedDeviceAddressNV const & rhs ) VULKAN_HPP_NOEXCEPT : StridedDeviceAddressNV( *reinterpret_cast( &rhs ) ) { } StridedDeviceAddressNV & operator=( StridedDeviceAddressNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ StridedDeviceAddressNV & operator=( VkStridedDeviceAddressNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 StridedDeviceAddressNV & setStartAddress( VULKAN_HPP_NAMESPACE::DeviceAddress startAddress_ ) VULKAN_HPP_NOEXCEPT { startAddress = startAddress_; return *this; } VULKAN_HPP_CONSTEXPR_14 StridedDeviceAddressNV & setStrideInBytes( VULKAN_HPP_NAMESPACE::DeviceSize strideInBytes_ ) VULKAN_HPP_NOEXCEPT { strideInBytes = strideInBytes_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkStridedDeviceAddressNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkStridedDeviceAddressNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( startAddress, strideInBytes ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( StridedDeviceAddressNV const & ) const = default; #else bool operator==( StridedDeviceAddressNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( startAddress == rhs.startAddress ) && ( strideInBytes == rhs.strideInBytes ); # endif } bool operator!=( StridedDeviceAddressNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::DeviceAddress startAddress = {}; VULKAN_HPP_NAMESPACE::DeviceSize strideInBytes = {}; }; struct BuildPartitionedAccelerationStructureIndirectCommandNV { using NativeType = VkBuildPartitionedAccelerationStructureIndirectCommandNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR BuildPartitionedAccelerationStructureIndirectCommandNV( VULKAN_HPP_NAMESPACE::PartitionedAccelerationStructureOpTypeNV opType_ = VULKAN_HPP_NAMESPACE::PartitionedAccelerationStructureOpTypeNV::eWriteInstance, uint32_t argCount_ = {}, VULKAN_HPP_NAMESPACE::StridedDeviceAddressNV argData_ = {} ) VULKAN_HPP_NOEXCEPT : opType{ opType_ } , argCount{ argCount_ } , argData{ argData_ } { } VULKAN_HPP_CONSTEXPR BuildPartitionedAccelerationStructureIndirectCommandNV( BuildPartitionedAccelerationStructureIndirectCommandNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; BuildPartitionedAccelerationStructureIndirectCommandNV( VkBuildPartitionedAccelerationStructureIndirectCommandNV const & rhs ) VULKAN_HPP_NOEXCEPT : BuildPartitionedAccelerationStructureIndirectCommandNV( *reinterpret_cast( &rhs ) ) { } BuildPartitionedAccelerationStructureIndirectCommandNV & operator=( BuildPartitionedAccelerationStructureIndirectCommandNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ BuildPartitionedAccelerationStructureIndirectCommandNV & operator=( VkBuildPartitionedAccelerationStructureIndirectCommandNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 BuildPartitionedAccelerationStructureIndirectCommandNV & setOpType( VULKAN_HPP_NAMESPACE::PartitionedAccelerationStructureOpTypeNV opType_ ) VULKAN_HPP_NOEXCEPT { opType = opType_; return *this; } VULKAN_HPP_CONSTEXPR_14 BuildPartitionedAccelerationStructureIndirectCommandNV & setArgCount( uint32_t argCount_ ) VULKAN_HPP_NOEXCEPT { argCount = argCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 BuildPartitionedAccelerationStructureIndirectCommandNV & setArgData( VULKAN_HPP_NAMESPACE::StridedDeviceAddressNV const & argData_ ) VULKAN_HPP_NOEXCEPT { argData = argData_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkBuildPartitionedAccelerationStructureIndirectCommandNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkBuildPartitionedAccelerationStructureIndirectCommandNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( opType, argCount, argData ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( BuildPartitionedAccelerationStructureIndirectCommandNV const & ) const = default; #else bool operator==( BuildPartitionedAccelerationStructureIndirectCommandNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( opType == rhs.opType ) && ( argCount == rhs.argCount ) && ( argData == rhs.argData ); # endif } bool operator!=( BuildPartitionedAccelerationStructureIndirectCommandNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::PartitionedAccelerationStructureOpTypeNV opType = VULKAN_HPP_NAMESPACE::PartitionedAccelerationStructureOpTypeNV::eWriteInstance; uint32_t argCount = {}; VULKAN_HPP_NAMESPACE::StridedDeviceAddressNV argData = {}; }; struct PartitionedAccelerationStructureInstancesInputNV { using NativeType = VkPartitionedAccelerationStructureInstancesInputNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePartitionedAccelerationStructureInstancesInputNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PartitionedAccelerationStructureInstancesInputNV( VULKAN_HPP_NAMESPACE::BuildAccelerationStructureFlagsKHR flags_ = {}, uint32_t instanceCount_ = {}, uint32_t maxInstancePerPartitionCount_ = {}, uint32_t partitionCount_ = {}, uint32_t maxInstanceInGlobalPartitionCount_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , instanceCount{ instanceCount_ } , maxInstancePerPartitionCount{ maxInstancePerPartitionCount_ } , partitionCount{ partitionCount_ } , maxInstanceInGlobalPartitionCount{ maxInstanceInGlobalPartitionCount_ } { } VULKAN_HPP_CONSTEXPR PartitionedAccelerationStructureInstancesInputNV( PartitionedAccelerationStructureInstancesInputNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; PartitionedAccelerationStructureInstancesInputNV( VkPartitionedAccelerationStructureInstancesInputNV const & rhs ) VULKAN_HPP_NOEXCEPT : PartitionedAccelerationStructureInstancesInputNV( *reinterpret_cast( &rhs ) ) { } PartitionedAccelerationStructureInstancesInputNV & operator=( PartitionedAccelerationStructureInstancesInputNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PartitionedAccelerationStructureInstancesInputNV & operator=( VkPartitionedAccelerationStructureInstancesInputNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PartitionedAccelerationStructureInstancesInputNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PartitionedAccelerationStructureInstancesInputNV & setFlags( VULKAN_HPP_NAMESPACE::BuildAccelerationStructureFlagsKHR flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 PartitionedAccelerationStructureInstancesInputNV & setInstanceCount( uint32_t instanceCount_ ) VULKAN_HPP_NOEXCEPT { instanceCount = instanceCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 PartitionedAccelerationStructureInstancesInputNV & setMaxInstancePerPartitionCount( uint32_t maxInstancePerPartitionCount_ ) VULKAN_HPP_NOEXCEPT { maxInstancePerPartitionCount = maxInstancePerPartitionCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 PartitionedAccelerationStructureInstancesInputNV & setPartitionCount( uint32_t partitionCount_ ) VULKAN_HPP_NOEXCEPT { partitionCount = partitionCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 PartitionedAccelerationStructureInstancesInputNV & setMaxInstanceInGlobalPartitionCount( uint32_t maxInstanceInGlobalPartitionCount_ ) VULKAN_HPP_NOEXCEPT { maxInstanceInGlobalPartitionCount = maxInstanceInGlobalPartitionCount_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPartitionedAccelerationStructureInstancesInputNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPartitionedAccelerationStructureInstancesInputNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, instanceCount, maxInstancePerPartitionCount, partitionCount, maxInstanceInGlobalPartitionCount ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PartitionedAccelerationStructureInstancesInputNV const & ) const = default; #else bool operator==( PartitionedAccelerationStructureInstancesInputNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( instanceCount == rhs.instanceCount ) && ( maxInstancePerPartitionCount == rhs.maxInstancePerPartitionCount ) && ( partitionCount == rhs.partitionCount ) && ( maxInstanceInGlobalPartitionCount == rhs.maxInstanceInGlobalPartitionCount ); # endif } bool operator!=( PartitionedAccelerationStructureInstancesInputNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePartitionedAccelerationStructureInstancesInputNV; void * pNext = {}; VULKAN_HPP_NAMESPACE::BuildAccelerationStructureFlagsKHR flags = {}; uint32_t instanceCount = {}; uint32_t maxInstancePerPartitionCount = {}; uint32_t partitionCount = {}; uint32_t maxInstanceInGlobalPartitionCount = {}; }; template <> struct CppType { using Type = PartitionedAccelerationStructureInstancesInputNV; }; struct BuildPartitionedAccelerationStructureInfoNV { using NativeType = VkBuildPartitionedAccelerationStructureInfoNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eBuildPartitionedAccelerationStructureInfoNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR BuildPartitionedAccelerationStructureInfoNV( VULKAN_HPP_NAMESPACE::PartitionedAccelerationStructureInstancesInputNV input_ = {}, VULKAN_HPP_NAMESPACE::DeviceAddress srcAccelerationStructureData_ = {}, VULKAN_HPP_NAMESPACE::DeviceAddress dstAccelerationStructureData_ = {}, VULKAN_HPP_NAMESPACE::DeviceAddress scratchData_ = {}, VULKAN_HPP_NAMESPACE::DeviceAddress srcInfos_ = {}, VULKAN_HPP_NAMESPACE::DeviceAddress srcInfosCount_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , input{ input_ } , srcAccelerationStructureData{ srcAccelerationStructureData_ } , dstAccelerationStructureData{ dstAccelerationStructureData_ } , scratchData{ scratchData_ } , srcInfos{ srcInfos_ } , srcInfosCount{ srcInfosCount_ } { } VULKAN_HPP_CONSTEXPR BuildPartitionedAccelerationStructureInfoNV( BuildPartitionedAccelerationStructureInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; BuildPartitionedAccelerationStructureInfoNV( VkBuildPartitionedAccelerationStructureInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT : BuildPartitionedAccelerationStructureInfoNV( *reinterpret_cast( &rhs ) ) { } BuildPartitionedAccelerationStructureInfoNV & operator=( BuildPartitionedAccelerationStructureInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ BuildPartitionedAccelerationStructureInfoNV & operator=( VkBuildPartitionedAccelerationStructureInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 BuildPartitionedAccelerationStructureInfoNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 BuildPartitionedAccelerationStructureInfoNV & setInput( VULKAN_HPP_NAMESPACE::PartitionedAccelerationStructureInstancesInputNV const & input_ ) VULKAN_HPP_NOEXCEPT { input = input_; return *this; } VULKAN_HPP_CONSTEXPR_14 BuildPartitionedAccelerationStructureInfoNV & setSrcAccelerationStructureData( VULKAN_HPP_NAMESPACE::DeviceAddress srcAccelerationStructureData_ ) VULKAN_HPP_NOEXCEPT { srcAccelerationStructureData = srcAccelerationStructureData_; return *this; } VULKAN_HPP_CONSTEXPR_14 BuildPartitionedAccelerationStructureInfoNV & setDstAccelerationStructureData( VULKAN_HPP_NAMESPACE::DeviceAddress dstAccelerationStructureData_ ) VULKAN_HPP_NOEXCEPT { dstAccelerationStructureData = dstAccelerationStructureData_; return *this; } VULKAN_HPP_CONSTEXPR_14 BuildPartitionedAccelerationStructureInfoNV & setScratchData( VULKAN_HPP_NAMESPACE::DeviceAddress scratchData_ ) VULKAN_HPP_NOEXCEPT { scratchData = scratchData_; return *this; } VULKAN_HPP_CONSTEXPR_14 BuildPartitionedAccelerationStructureInfoNV & setSrcInfos( VULKAN_HPP_NAMESPACE::DeviceAddress srcInfos_ ) VULKAN_HPP_NOEXCEPT { srcInfos = srcInfos_; return *this; } VULKAN_HPP_CONSTEXPR_14 BuildPartitionedAccelerationStructureInfoNV & setSrcInfosCount( VULKAN_HPP_NAMESPACE::DeviceAddress srcInfosCount_ ) VULKAN_HPP_NOEXCEPT { srcInfosCount = srcInfosCount_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkBuildPartitionedAccelerationStructureInfoNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkBuildPartitionedAccelerationStructureInfoNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, input, srcAccelerationStructureData, dstAccelerationStructureData, scratchData, srcInfos, srcInfosCount ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( BuildPartitionedAccelerationStructureInfoNV const & ) const = default; #else bool operator==( BuildPartitionedAccelerationStructureInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( input == rhs.input ) && ( srcAccelerationStructureData == rhs.srcAccelerationStructureData ) && ( dstAccelerationStructureData == rhs.dstAccelerationStructureData ) && ( scratchData == rhs.scratchData ) && ( srcInfos == rhs.srcInfos ) && ( srcInfosCount == rhs.srcInfosCount ); # endif } bool operator!=( BuildPartitionedAccelerationStructureInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eBuildPartitionedAccelerationStructureInfoNV; void * pNext = {}; VULKAN_HPP_NAMESPACE::PartitionedAccelerationStructureInstancesInputNV input = {}; VULKAN_HPP_NAMESPACE::DeviceAddress srcAccelerationStructureData = {}; VULKAN_HPP_NAMESPACE::DeviceAddress dstAccelerationStructureData = {}; VULKAN_HPP_NAMESPACE::DeviceAddress scratchData = {}; VULKAN_HPP_NAMESPACE::DeviceAddress srcInfos = {}; VULKAN_HPP_NAMESPACE::DeviceAddress srcInfosCount = {}; }; template <> struct CppType { using Type = BuildPartitionedAccelerationStructureInfoNV; }; struct CalibratedTimestampInfoKHR { using NativeType = VkCalibratedTimestampInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eCalibratedTimestampInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR CalibratedTimestampInfoKHR( VULKAN_HPP_NAMESPACE::TimeDomainKHR timeDomain_ = VULKAN_HPP_NAMESPACE::TimeDomainKHR::eDevice, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , timeDomain{ timeDomain_ } { } VULKAN_HPP_CONSTEXPR CalibratedTimestampInfoKHR( CalibratedTimestampInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; CalibratedTimestampInfoKHR( VkCalibratedTimestampInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : CalibratedTimestampInfoKHR( *reinterpret_cast( &rhs ) ) { } CalibratedTimestampInfoKHR & operator=( CalibratedTimestampInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ CalibratedTimestampInfoKHR & operator=( VkCalibratedTimestampInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 CalibratedTimestampInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 CalibratedTimestampInfoKHR & setTimeDomain( VULKAN_HPP_NAMESPACE::TimeDomainKHR timeDomain_ ) VULKAN_HPP_NOEXCEPT { timeDomain = timeDomain_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkCalibratedTimestampInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkCalibratedTimestampInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, timeDomain ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( CalibratedTimestampInfoKHR const & ) const = default; #else bool operator==( CalibratedTimestampInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( timeDomain == rhs.timeDomain ); # endif } bool operator!=( CalibratedTimestampInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eCalibratedTimestampInfoKHR; const void * pNext = {}; VULKAN_HPP_NAMESPACE::TimeDomainKHR timeDomain = VULKAN_HPP_NAMESPACE::TimeDomainKHR::eDevice; }; template <> struct CppType { using Type = CalibratedTimestampInfoKHR; }; using CalibratedTimestampInfoEXT = CalibratedTimestampInfoKHR; struct CheckpointData2NV { using NativeType = VkCheckpointData2NV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eCheckpointData2NV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR CheckpointData2NV( VULKAN_HPP_NAMESPACE::PipelineStageFlags2 stage_ = {}, void * pCheckpointMarker_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , stage{ stage_ } , pCheckpointMarker{ pCheckpointMarker_ } { } VULKAN_HPP_CONSTEXPR CheckpointData2NV( CheckpointData2NV const & rhs ) VULKAN_HPP_NOEXCEPT = default; CheckpointData2NV( VkCheckpointData2NV const & rhs ) VULKAN_HPP_NOEXCEPT : CheckpointData2NV( *reinterpret_cast( &rhs ) ) {} CheckpointData2NV & operator=( CheckpointData2NV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ CheckpointData2NV & operator=( VkCheckpointData2NV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkCheckpointData2NV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkCheckpointData2NV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, stage, pCheckpointMarker ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( CheckpointData2NV const & ) const = default; #else bool operator==( CheckpointData2NV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( stage == rhs.stage ) && ( pCheckpointMarker == rhs.pCheckpointMarker ); # endif } bool operator!=( CheckpointData2NV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eCheckpointData2NV; void * pNext = {}; VULKAN_HPP_NAMESPACE::PipelineStageFlags2 stage = {}; void * pCheckpointMarker = {}; }; template <> struct CppType { using Type = CheckpointData2NV; }; struct CheckpointDataNV { using NativeType = VkCheckpointDataNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eCheckpointDataNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR CheckpointDataNV( VULKAN_HPP_NAMESPACE::PipelineStageFlagBits stage_ = VULKAN_HPP_NAMESPACE::PipelineStageFlagBits::eTopOfPipe, void * pCheckpointMarker_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , stage{ stage_ } , pCheckpointMarker{ pCheckpointMarker_ } { } VULKAN_HPP_CONSTEXPR CheckpointDataNV( CheckpointDataNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; CheckpointDataNV( VkCheckpointDataNV const & rhs ) VULKAN_HPP_NOEXCEPT : CheckpointDataNV( *reinterpret_cast( &rhs ) ) {} CheckpointDataNV & operator=( CheckpointDataNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ CheckpointDataNV & operator=( VkCheckpointDataNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkCheckpointDataNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkCheckpointDataNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, stage, pCheckpointMarker ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( CheckpointDataNV const & ) const = default; #else bool operator==( CheckpointDataNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( stage == rhs.stage ) && ( pCheckpointMarker == rhs.pCheckpointMarker ); # endif } bool operator!=( CheckpointDataNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eCheckpointDataNV; void * pNext = {}; VULKAN_HPP_NAMESPACE::PipelineStageFlagBits stage = VULKAN_HPP_NAMESPACE::PipelineStageFlagBits::eTopOfPipe; void * pCheckpointMarker = {}; }; template <> struct CppType { using Type = CheckpointDataNV; }; union ClearColorValue { using NativeType = VkClearColorValue; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_UNION_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 ClearColorValue( const std::array & float32_ = {} ) : float32( float32_ ) {} VULKAN_HPP_CONSTEXPR ClearColorValue( float float32_0, float float32_1, float float32_2, float float32_3 ) : float32{ { { float32_0, float32_1, float32_2, float32_3 } } } { } VULKAN_HPP_CONSTEXPR_14 ClearColorValue( const std::array & int32_ ) : int32( int32_ ) {} VULKAN_HPP_CONSTEXPR ClearColorValue( int32_t int32_0, int32_t int32_1, int32_t int32_2, int32_t int32_3 ) : int32{ { { int32_0, int32_1, int32_2, int32_3 } } } { } VULKAN_HPP_CONSTEXPR_14 ClearColorValue( const std::array & uint32_ ) : uint32( uint32_ ) {} VULKAN_HPP_CONSTEXPR ClearColorValue( uint32_t uint32_0, uint32_t uint32_1, uint32_t uint32_2, uint32_t uint32_3 ) : uint32{ { { uint32_0, uint32_1, uint32_2, uint32_3 } } } { } #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_UNION_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ClearColorValue & setFloat32( std::array float32_ ) VULKAN_HPP_NOEXCEPT { float32 = float32_; return *this; } VULKAN_HPP_CONSTEXPR_14 ClearColorValue & setInt32( std::array int32_ ) VULKAN_HPP_NOEXCEPT { int32 = int32_; return *this; } VULKAN_HPP_CONSTEXPR_14 ClearColorValue & setUint32( std::array uint32_ ) VULKAN_HPP_NOEXCEPT { uint32 = uint32_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkClearColorValue const &() const { return *reinterpret_cast( this ); } operator VkClearColorValue &() { return *reinterpret_cast( this ); } VULKAN_HPP_NAMESPACE::ArrayWrapper1D float32; VULKAN_HPP_NAMESPACE::ArrayWrapper1D int32; VULKAN_HPP_NAMESPACE::ArrayWrapper1D uint32; }; struct ClearDepthStencilValue { using NativeType = VkClearDepthStencilValue; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ClearDepthStencilValue( float depth_ = {}, uint32_t stencil_ = {} ) VULKAN_HPP_NOEXCEPT : depth{ depth_ } , stencil{ stencil_ } { } VULKAN_HPP_CONSTEXPR ClearDepthStencilValue( ClearDepthStencilValue const & rhs ) VULKAN_HPP_NOEXCEPT = default; ClearDepthStencilValue( VkClearDepthStencilValue const & rhs ) VULKAN_HPP_NOEXCEPT : ClearDepthStencilValue( *reinterpret_cast( &rhs ) ) { } ClearDepthStencilValue & operator=( ClearDepthStencilValue const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ClearDepthStencilValue & operator=( VkClearDepthStencilValue const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ClearDepthStencilValue & setDepth( float depth_ ) VULKAN_HPP_NOEXCEPT { depth = depth_; return *this; } VULKAN_HPP_CONSTEXPR_14 ClearDepthStencilValue & setStencil( uint32_t stencil_ ) VULKAN_HPP_NOEXCEPT { stencil = stencil_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkClearDepthStencilValue const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkClearDepthStencilValue &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( depth, stencil ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ClearDepthStencilValue const & ) const = default; #else bool operator==( ClearDepthStencilValue const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( depth == rhs.depth ) && ( stencil == rhs.stencil ); # endif } bool operator!=( ClearDepthStencilValue const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: float depth = {}; uint32_t stencil = {}; }; union ClearValue { using NativeType = VkClearValue; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_UNION_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 ClearValue( VULKAN_HPP_NAMESPACE::ClearColorValue color_ = {} ) : color( color_ ) {} VULKAN_HPP_CONSTEXPR_14 ClearValue( VULKAN_HPP_NAMESPACE::ClearDepthStencilValue depthStencil_ ) : depthStencil( depthStencil_ ) {} #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_UNION_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ClearValue & setColor( VULKAN_HPP_NAMESPACE::ClearColorValue const & color_ ) VULKAN_HPP_NOEXCEPT { color = color_; return *this; } VULKAN_HPP_CONSTEXPR_14 ClearValue & setDepthStencil( VULKAN_HPP_NAMESPACE::ClearDepthStencilValue const & depthStencil_ ) VULKAN_HPP_NOEXCEPT { depthStencil = depthStencil_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkClearValue const &() const { return *reinterpret_cast( this ); } operator VkClearValue &() { return *reinterpret_cast( this ); } #ifdef VULKAN_HPP_HAS_UNRESTRICTED_UNIONS VULKAN_HPP_NAMESPACE::ClearColorValue color; VULKAN_HPP_NAMESPACE::ClearDepthStencilValue depthStencil; #else VkClearColorValue color; VkClearDepthStencilValue depthStencil; #endif /*VULKAN_HPP_HAS_UNRESTRICTED_UNIONS*/ }; struct ClearAttachment { using NativeType = VkClearAttachment; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 ClearAttachment( VULKAN_HPP_NAMESPACE::ImageAspectFlags aspectMask_ = {}, uint32_t colorAttachment_ = {}, VULKAN_HPP_NAMESPACE::ClearValue clearValue_ = {} ) VULKAN_HPP_NOEXCEPT : aspectMask{ aspectMask_ } , colorAttachment{ colorAttachment_ } , clearValue{ clearValue_ } { } VULKAN_HPP_CONSTEXPR_14 ClearAttachment( ClearAttachment const & rhs ) VULKAN_HPP_NOEXCEPT = default; ClearAttachment( VkClearAttachment const & rhs ) VULKAN_HPP_NOEXCEPT : ClearAttachment( *reinterpret_cast( &rhs ) ) {} ClearAttachment & operator=( ClearAttachment const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ClearAttachment & operator=( VkClearAttachment const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ClearAttachment & setAspectMask( VULKAN_HPP_NAMESPACE::ImageAspectFlags aspectMask_ ) VULKAN_HPP_NOEXCEPT { aspectMask = aspectMask_; return *this; } VULKAN_HPP_CONSTEXPR_14 ClearAttachment & setColorAttachment( uint32_t colorAttachment_ ) VULKAN_HPP_NOEXCEPT { colorAttachment = colorAttachment_; return *this; } VULKAN_HPP_CONSTEXPR_14 ClearAttachment & setClearValue( VULKAN_HPP_NAMESPACE::ClearValue const & clearValue_ ) VULKAN_HPP_NOEXCEPT { clearValue = clearValue_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkClearAttachment const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkClearAttachment &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( aspectMask, colorAttachment, clearValue ); } #endif public: VULKAN_HPP_NAMESPACE::ImageAspectFlags aspectMask = {}; uint32_t colorAttachment = {}; VULKAN_HPP_NAMESPACE::ClearValue clearValue = {}; }; struct ClearRect { using NativeType = VkClearRect; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ClearRect( VULKAN_HPP_NAMESPACE::Rect2D rect_ = {}, uint32_t baseArrayLayer_ = {}, uint32_t layerCount_ = {} ) VULKAN_HPP_NOEXCEPT : rect{ rect_ } , baseArrayLayer{ baseArrayLayer_ } , layerCount{ layerCount_ } { } VULKAN_HPP_CONSTEXPR ClearRect( ClearRect const & rhs ) VULKAN_HPP_NOEXCEPT = default; ClearRect( VkClearRect const & rhs ) VULKAN_HPP_NOEXCEPT : ClearRect( *reinterpret_cast( &rhs ) ) {} ClearRect & operator=( ClearRect const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ClearRect & operator=( VkClearRect const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ClearRect & setRect( VULKAN_HPP_NAMESPACE::Rect2D const & rect_ ) VULKAN_HPP_NOEXCEPT { rect = rect_; return *this; } VULKAN_HPP_CONSTEXPR_14 ClearRect & setBaseArrayLayer( uint32_t baseArrayLayer_ ) VULKAN_HPP_NOEXCEPT { baseArrayLayer = baseArrayLayer_; return *this; } VULKAN_HPP_CONSTEXPR_14 ClearRect & setLayerCount( uint32_t layerCount_ ) VULKAN_HPP_NOEXCEPT { layerCount = layerCount_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkClearRect const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkClearRect &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( rect, baseArrayLayer, layerCount ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ClearRect const & ) const = default; #else bool operator==( ClearRect const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( rect == rhs.rect ) && ( baseArrayLayer == rhs.baseArrayLayer ) && ( layerCount == rhs.layerCount ); # endif } bool operator!=( ClearRect const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::Rect2D rect = {}; uint32_t baseArrayLayer = {}; uint32_t layerCount = {}; }; struct ClusterAccelerationStructureBuildClustersBottomLevelInfoNV { using NativeType = VkClusterAccelerationStructureBuildClustersBottomLevelInfoNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ClusterAccelerationStructureBuildClustersBottomLevelInfoNV( uint32_t clusterReferencesCount_ = {}, uint32_t clusterReferencesStride_ = {}, VULKAN_HPP_NAMESPACE::DeviceAddress clusterReferences_ = {} ) VULKAN_HPP_NOEXCEPT : clusterReferencesCount{ clusterReferencesCount_ } , clusterReferencesStride{ clusterReferencesStride_ } , clusterReferences{ clusterReferences_ } { } VULKAN_HPP_CONSTEXPR ClusterAccelerationStructureBuildClustersBottomLevelInfoNV( ClusterAccelerationStructureBuildClustersBottomLevelInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; ClusterAccelerationStructureBuildClustersBottomLevelInfoNV( VkClusterAccelerationStructureBuildClustersBottomLevelInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT : ClusterAccelerationStructureBuildClustersBottomLevelInfoNV( *reinterpret_cast( &rhs ) ) { } ClusterAccelerationStructureBuildClustersBottomLevelInfoNV & operator=( ClusterAccelerationStructureBuildClustersBottomLevelInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ClusterAccelerationStructureBuildClustersBottomLevelInfoNV & operator=( VkClusterAccelerationStructureBuildClustersBottomLevelInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ClusterAccelerationStructureBuildClustersBottomLevelInfoNV & setClusterReferencesCount( uint32_t clusterReferencesCount_ ) VULKAN_HPP_NOEXCEPT { clusterReferencesCount = clusterReferencesCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 ClusterAccelerationStructureBuildClustersBottomLevelInfoNV & setClusterReferencesStride( uint32_t clusterReferencesStride_ ) VULKAN_HPP_NOEXCEPT { clusterReferencesStride = clusterReferencesStride_; return *this; } VULKAN_HPP_CONSTEXPR_14 ClusterAccelerationStructureBuildClustersBottomLevelInfoNV & setClusterReferences( VULKAN_HPP_NAMESPACE::DeviceAddress clusterReferences_ ) VULKAN_HPP_NOEXCEPT { clusterReferences = clusterReferences_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkClusterAccelerationStructureBuildClustersBottomLevelInfoNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkClusterAccelerationStructureBuildClustersBottomLevelInfoNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( clusterReferencesCount, clusterReferencesStride, clusterReferences ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ClusterAccelerationStructureBuildClustersBottomLevelInfoNV const & ) const = default; #else bool operator==( ClusterAccelerationStructureBuildClustersBottomLevelInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( clusterReferencesCount == rhs.clusterReferencesCount ) && ( clusterReferencesStride == rhs.clusterReferencesStride ) && ( clusterReferences == rhs.clusterReferences ); # endif } bool operator!=( ClusterAccelerationStructureBuildClustersBottomLevelInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: uint32_t clusterReferencesCount = {}; uint32_t clusterReferencesStride = {}; VULKAN_HPP_NAMESPACE::DeviceAddress clusterReferences = {}; }; struct ClusterAccelerationStructureGeometryIndexAndGeometryFlagsNV { using NativeType = VkClusterAccelerationStructureGeometryIndexAndGeometryFlagsNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ClusterAccelerationStructureGeometryIndexAndGeometryFlagsNV( uint32_t geometryIndex_ = {}, uint32_t reserved_ = {}, uint32_t geometryFlags_ = {} ) VULKAN_HPP_NOEXCEPT : geometryIndex{ geometryIndex_ } , reserved{ reserved_ } , geometryFlags{ geometryFlags_ } { } VULKAN_HPP_CONSTEXPR ClusterAccelerationStructureGeometryIndexAndGeometryFlagsNV( ClusterAccelerationStructureGeometryIndexAndGeometryFlagsNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; ClusterAccelerationStructureGeometryIndexAndGeometryFlagsNV( VkClusterAccelerationStructureGeometryIndexAndGeometryFlagsNV const & rhs ) VULKAN_HPP_NOEXCEPT : ClusterAccelerationStructureGeometryIndexAndGeometryFlagsNV( *reinterpret_cast( &rhs ) ) { } ClusterAccelerationStructureGeometryIndexAndGeometryFlagsNV & operator=( ClusterAccelerationStructureGeometryIndexAndGeometryFlagsNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ClusterAccelerationStructureGeometryIndexAndGeometryFlagsNV & operator=( VkClusterAccelerationStructureGeometryIndexAndGeometryFlagsNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ClusterAccelerationStructureGeometryIndexAndGeometryFlagsNV & setGeometryIndex( uint32_t geometryIndex_ ) VULKAN_HPP_NOEXCEPT { geometryIndex = geometryIndex_; return *this; } VULKAN_HPP_CONSTEXPR_14 ClusterAccelerationStructureGeometryIndexAndGeometryFlagsNV & setReserved( uint32_t reserved_ ) VULKAN_HPP_NOEXCEPT { reserved = reserved_; return *this; } VULKAN_HPP_CONSTEXPR_14 ClusterAccelerationStructureGeometryIndexAndGeometryFlagsNV & setGeometryFlags( uint32_t geometryFlags_ ) VULKAN_HPP_NOEXCEPT { geometryFlags = geometryFlags_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkClusterAccelerationStructureGeometryIndexAndGeometryFlagsNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkClusterAccelerationStructureGeometryIndexAndGeometryFlagsNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( geometryIndex, reserved, geometryFlags ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ClusterAccelerationStructureGeometryIndexAndGeometryFlagsNV const & ) const = default; #else bool operator==( ClusterAccelerationStructureGeometryIndexAndGeometryFlagsNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( geometryIndex == rhs.geometryIndex ) && ( reserved == rhs.reserved ) && ( geometryFlags == rhs.geometryFlags ); # endif } bool operator!=( ClusterAccelerationStructureGeometryIndexAndGeometryFlagsNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: uint32_t geometryIndex : 24; uint32_t reserved : 5; uint32_t geometryFlags : 3; }; struct ClusterAccelerationStructureBuildTriangleClusterInfoNV { using NativeType = VkClusterAccelerationStructureBuildTriangleClusterInfoNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ClusterAccelerationStructureBuildTriangleClusterInfoNV( uint32_t clusterID_ = {}, VULKAN_HPP_NAMESPACE::ClusterAccelerationStructureClusterFlagsNV clusterFlags_ = {}, uint32_t triangleCount_ = {}, uint32_t vertexCount_ = {}, uint32_t positionTruncateBitCount_ = {}, uint32_t indexType_ = {}, uint32_t opacityMicromapIndexType_ = {}, VULKAN_HPP_NAMESPACE::ClusterAccelerationStructureGeometryIndexAndGeometryFlagsNV baseGeometryIndexAndGeometryFlags_ = {}, uint16_t indexBufferStride_ = {}, uint16_t vertexBufferStride_ = {}, uint16_t geometryIndexAndFlagsBufferStride_ = {}, uint16_t opacityMicromapIndexBufferStride_ = {}, VULKAN_HPP_NAMESPACE::DeviceAddress indexBuffer_ = {}, VULKAN_HPP_NAMESPACE::DeviceAddress vertexBuffer_ = {}, VULKAN_HPP_NAMESPACE::DeviceAddress geometryIndexAndFlagsBuffer_ = {}, VULKAN_HPP_NAMESPACE::DeviceAddress opacityMicromapArray_ = {}, VULKAN_HPP_NAMESPACE::DeviceAddress opacityMicromapIndexBuffer_ = {} ) VULKAN_HPP_NOEXCEPT : clusterID{ clusterID_ } , clusterFlags{ clusterFlags_ } , triangleCount{ triangleCount_ } , vertexCount{ vertexCount_ } , positionTruncateBitCount{ positionTruncateBitCount_ } , indexType{ indexType_ } , opacityMicromapIndexType{ opacityMicromapIndexType_ } , baseGeometryIndexAndGeometryFlags{ baseGeometryIndexAndGeometryFlags_ } , indexBufferStride{ indexBufferStride_ } , vertexBufferStride{ vertexBufferStride_ } , geometryIndexAndFlagsBufferStride{ geometryIndexAndFlagsBufferStride_ } , opacityMicromapIndexBufferStride{ opacityMicromapIndexBufferStride_ } , indexBuffer{ indexBuffer_ } , vertexBuffer{ vertexBuffer_ } , geometryIndexAndFlagsBuffer{ geometryIndexAndFlagsBuffer_ } , opacityMicromapArray{ opacityMicromapArray_ } , opacityMicromapIndexBuffer{ opacityMicromapIndexBuffer_ } { } VULKAN_HPP_CONSTEXPR ClusterAccelerationStructureBuildTriangleClusterInfoNV( ClusterAccelerationStructureBuildTriangleClusterInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; ClusterAccelerationStructureBuildTriangleClusterInfoNV( VkClusterAccelerationStructureBuildTriangleClusterInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT : ClusterAccelerationStructureBuildTriangleClusterInfoNV( *reinterpret_cast( &rhs ) ) { } ClusterAccelerationStructureBuildTriangleClusterInfoNV & operator=( ClusterAccelerationStructureBuildTriangleClusterInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ClusterAccelerationStructureBuildTriangleClusterInfoNV & operator=( VkClusterAccelerationStructureBuildTriangleClusterInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ClusterAccelerationStructureBuildTriangleClusterInfoNV & setClusterID( uint32_t clusterID_ ) VULKAN_HPP_NOEXCEPT { clusterID = clusterID_; return *this; } VULKAN_HPP_CONSTEXPR_14 ClusterAccelerationStructureBuildTriangleClusterInfoNV & setClusterFlags( VULKAN_HPP_NAMESPACE::ClusterAccelerationStructureClusterFlagsNV clusterFlags_ ) VULKAN_HPP_NOEXCEPT { clusterFlags = clusterFlags_; return *this; } VULKAN_HPP_CONSTEXPR_14 ClusterAccelerationStructureBuildTriangleClusterInfoNV & setTriangleCount( uint32_t triangleCount_ ) VULKAN_HPP_NOEXCEPT { triangleCount = triangleCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 ClusterAccelerationStructureBuildTriangleClusterInfoNV & setVertexCount( uint32_t vertexCount_ ) VULKAN_HPP_NOEXCEPT { vertexCount = vertexCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 ClusterAccelerationStructureBuildTriangleClusterInfoNV & setPositionTruncateBitCount( uint32_t positionTruncateBitCount_ ) VULKAN_HPP_NOEXCEPT { positionTruncateBitCount = positionTruncateBitCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 ClusterAccelerationStructureBuildTriangleClusterInfoNV & setIndexType( uint32_t indexType_ ) VULKAN_HPP_NOEXCEPT { indexType = indexType_; return *this; } VULKAN_HPP_CONSTEXPR_14 ClusterAccelerationStructureBuildTriangleClusterInfoNV & setOpacityMicromapIndexType( uint32_t opacityMicromapIndexType_ ) VULKAN_HPP_NOEXCEPT { opacityMicromapIndexType = opacityMicromapIndexType_; return *this; } VULKAN_HPP_CONSTEXPR_14 ClusterAccelerationStructureBuildTriangleClusterInfoNV & setBaseGeometryIndexAndGeometryFlags( VULKAN_HPP_NAMESPACE::ClusterAccelerationStructureGeometryIndexAndGeometryFlagsNV const & baseGeometryIndexAndGeometryFlags_ ) VULKAN_HPP_NOEXCEPT { baseGeometryIndexAndGeometryFlags = baseGeometryIndexAndGeometryFlags_; return *this; } VULKAN_HPP_CONSTEXPR_14 ClusterAccelerationStructureBuildTriangleClusterInfoNV & setIndexBufferStride( uint16_t indexBufferStride_ ) VULKAN_HPP_NOEXCEPT { indexBufferStride = indexBufferStride_; return *this; } VULKAN_HPP_CONSTEXPR_14 ClusterAccelerationStructureBuildTriangleClusterInfoNV & setVertexBufferStride( uint16_t vertexBufferStride_ ) VULKAN_HPP_NOEXCEPT { vertexBufferStride = vertexBufferStride_; return *this; } VULKAN_HPP_CONSTEXPR_14 ClusterAccelerationStructureBuildTriangleClusterInfoNV & setGeometryIndexAndFlagsBufferStride( uint16_t geometryIndexAndFlagsBufferStride_ ) VULKAN_HPP_NOEXCEPT { geometryIndexAndFlagsBufferStride = geometryIndexAndFlagsBufferStride_; return *this; } VULKAN_HPP_CONSTEXPR_14 ClusterAccelerationStructureBuildTriangleClusterInfoNV & setOpacityMicromapIndexBufferStride( uint16_t opacityMicromapIndexBufferStride_ ) VULKAN_HPP_NOEXCEPT { opacityMicromapIndexBufferStride = opacityMicromapIndexBufferStride_; return *this; } VULKAN_HPP_CONSTEXPR_14 ClusterAccelerationStructureBuildTriangleClusterInfoNV & setIndexBuffer( VULKAN_HPP_NAMESPACE::DeviceAddress indexBuffer_ ) VULKAN_HPP_NOEXCEPT { indexBuffer = indexBuffer_; return *this; } VULKAN_HPP_CONSTEXPR_14 ClusterAccelerationStructureBuildTriangleClusterInfoNV & setVertexBuffer( VULKAN_HPP_NAMESPACE::DeviceAddress vertexBuffer_ ) VULKAN_HPP_NOEXCEPT { vertexBuffer = vertexBuffer_; return *this; } VULKAN_HPP_CONSTEXPR_14 ClusterAccelerationStructureBuildTriangleClusterInfoNV & setGeometryIndexAndFlagsBuffer( VULKAN_HPP_NAMESPACE::DeviceAddress geometryIndexAndFlagsBuffer_ ) VULKAN_HPP_NOEXCEPT { geometryIndexAndFlagsBuffer = geometryIndexAndFlagsBuffer_; return *this; } VULKAN_HPP_CONSTEXPR_14 ClusterAccelerationStructureBuildTriangleClusterInfoNV & setOpacityMicromapArray( VULKAN_HPP_NAMESPACE::DeviceAddress opacityMicromapArray_ ) VULKAN_HPP_NOEXCEPT { opacityMicromapArray = opacityMicromapArray_; return *this; } VULKAN_HPP_CONSTEXPR_14 ClusterAccelerationStructureBuildTriangleClusterInfoNV & setOpacityMicromapIndexBuffer( VULKAN_HPP_NAMESPACE::DeviceAddress opacityMicromapIndexBuffer_ ) VULKAN_HPP_NOEXCEPT { opacityMicromapIndexBuffer = opacityMicromapIndexBuffer_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkClusterAccelerationStructureBuildTriangleClusterInfoNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkClusterAccelerationStructureBuildTriangleClusterInfoNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( clusterID, clusterFlags, triangleCount, vertexCount, positionTruncateBitCount, indexType, opacityMicromapIndexType, baseGeometryIndexAndGeometryFlags, indexBufferStride, vertexBufferStride, geometryIndexAndFlagsBufferStride, opacityMicromapIndexBufferStride, indexBuffer, vertexBuffer, geometryIndexAndFlagsBuffer, opacityMicromapArray, opacityMicromapIndexBuffer ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ClusterAccelerationStructureBuildTriangleClusterInfoNV const & ) const = default; #else bool operator==( ClusterAccelerationStructureBuildTriangleClusterInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( clusterID == rhs.clusterID ) && ( clusterFlags == rhs.clusterFlags ) && ( triangleCount == rhs.triangleCount ) && ( vertexCount == rhs.vertexCount ) && ( positionTruncateBitCount == rhs.positionTruncateBitCount ) && ( indexType == rhs.indexType ) && ( opacityMicromapIndexType == rhs.opacityMicromapIndexType ) && ( baseGeometryIndexAndGeometryFlags == rhs.baseGeometryIndexAndGeometryFlags ) && ( indexBufferStride == rhs.indexBufferStride ) && ( vertexBufferStride == rhs.vertexBufferStride ) && ( geometryIndexAndFlagsBufferStride == rhs.geometryIndexAndFlagsBufferStride ) && ( opacityMicromapIndexBufferStride == rhs.opacityMicromapIndexBufferStride ) && ( indexBuffer == rhs.indexBuffer ) && ( vertexBuffer == rhs.vertexBuffer ) && ( geometryIndexAndFlagsBuffer == rhs.geometryIndexAndFlagsBuffer ) && ( opacityMicromapArray == rhs.opacityMicromapArray ) && ( opacityMicromapIndexBuffer == rhs.opacityMicromapIndexBuffer ); # endif } bool operator!=( ClusterAccelerationStructureBuildTriangleClusterInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: uint32_t clusterID = {}; VULKAN_HPP_NAMESPACE::ClusterAccelerationStructureClusterFlagsNV clusterFlags = {}; uint32_t triangleCount : 9; uint32_t vertexCount : 9; uint32_t positionTruncateBitCount : 6; uint32_t indexType : 4; uint32_t opacityMicromapIndexType : 4; VULKAN_HPP_NAMESPACE::ClusterAccelerationStructureGeometryIndexAndGeometryFlagsNV baseGeometryIndexAndGeometryFlags = {}; uint16_t indexBufferStride = {}; uint16_t vertexBufferStride = {}; uint16_t geometryIndexAndFlagsBufferStride = {}; uint16_t opacityMicromapIndexBufferStride = {}; VULKAN_HPP_NAMESPACE::DeviceAddress indexBuffer = {}; VULKAN_HPP_NAMESPACE::DeviceAddress vertexBuffer = {}; VULKAN_HPP_NAMESPACE::DeviceAddress geometryIndexAndFlagsBuffer = {}; VULKAN_HPP_NAMESPACE::DeviceAddress opacityMicromapArray = {}; VULKAN_HPP_NAMESPACE::DeviceAddress opacityMicromapIndexBuffer = {}; }; struct ClusterAccelerationStructureBuildTriangleClusterTemplateInfoNV { using NativeType = VkClusterAccelerationStructureBuildTriangleClusterTemplateInfoNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ClusterAccelerationStructureBuildTriangleClusterTemplateInfoNV( uint32_t clusterID_ = {}, VULKAN_HPP_NAMESPACE::ClusterAccelerationStructureClusterFlagsNV clusterFlags_ = {}, uint32_t triangleCount_ = {}, uint32_t vertexCount_ = {}, uint32_t positionTruncateBitCount_ = {}, uint32_t indexType_ = {}, uint32_t opacityMicromapIndexType_ = {}, VULKAN_HPP_NAMESPACE::ClusterAccelerationStructureGeometryIndexAndGeometryFlagsNV baseGeometryIndexAndGeometryFlags_ = {}, uint16_t indexBufferStride_ = {}, uint16_t vertexBufferStride_ = {}, uint16_t geometryIndexAndFlagsBufferStride_ = {}, uint16_t opacityMicromapIndexBufferStride_ = {}, VULKAN_HPP_NAMESPACE::DeviceAddress indexBuffer_ = {}, VULKAN_HPP_NAMESPACE::DeviceAddress vertexBuffer_ = {}, VULKAN_HPP_NAMESPACE::DeviceAddress geometryIndexAndFlagsBuffer_ = {}, VULKAN_HPP_NAMESPACE::DeviceAddress opacityMicromapArray_ = {}, VULKAN_HPP_NAMESPACE::DeviceAddress opacityMicromapIndexBuffer_ = {}, VULKAN_HPP_NAMESPACE::DeviceAddress instantiationBoundingBoxLimit_ = {} ) VULKAN_HPP_NOEXCEPT : clusterID{ clusterID_ } , clusterFlags{ clusterFlags_ } , triangleCount{ triangleCount_ } , vertexCount{ vertexCount_ } , positionTruncateBitCount{ positionTruncateBitCount_ } , indexType{ indexType_ } , opacityMicromapIndexType{ opacityMicromapIndexType_ } , baseGeometryIndexAndGeometryFlags{ baseGeometryIndexAndGeometryFlags_ } , indexBufferStride{ indexBufferStride_ } , vertexBufferStride{ vertexBufferStride_ } , geometryIndexAndFlagsBufferStride{ geometryIndexAndFlagsBufferStride_ } , opacityMicromapIndexBufferStride{ opacityMicromapIndexBufferStride_ } , indexBuffer{ indexBuffer_ } , vertexBuffer{ vertexBuffer_ } , geometryIndexAndFlagsBuffer{ geometryIndexAndFlagsBuffer_ } , opacityMicromapArray{ opacityMicromapArray_ } , opacityMicromapIndexBuffer{ opacityMicromapIndexBuffer_ } , instantiationBoundingBoxLimit{ instantiationBoundingBoxLimit_ } { } VULKAN_HPP_CONSTEXPR ClusterAccelerationStructureBuildTriangleClusterTemplateInfoNV( ClusterAccelerationStructureBuildTriangleClusterTemplateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; ClusterAccelerationStructureBuildTriangleClusterTemplateInfoNV( VkClusterAccelerationStructureBuildTriangleClusterTemplateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT : ClusterAccelerationStructureBuildTriangleClusterTemplateInfoNV( *reinterpret_cast( &rhs ) ) { } explicit ClusterAccelerationStructureBuildTriangleClusterTemplateInfoNV( ClusterAccelerationStructureBuildTriangleClusterInfoNV const & clusterAccelerationStructureBuildTriangleClusterInfoNV, VULKAN_HPP_NAMESPACE::DeviceAddress instantiationBoundingBoxLimit_ = {} ) : clusterID( clusterAccelerationStructureBuildTriangleClusterInfoNV.clusterID ) , clusterFlags( clusterAccelerationStructureBuildTriangleClusterInfoNV.clusterFlags ) , triangleCount( clusterAccelerationStructureBuildTriangleClusterInfoNV.triangleCount ) , vertexCount( clusterAccelerationStructureBuildTriangleClusterInfoNV.vertexCount ) , positionTruncateBitCount( clusterAccelerationStructureBuildTriangleClusterInfoNV.positionTruncateBitCount ) , indexType( clusterAccelerationStructureBuildTriangleClusterInfoNV.indexType ) , opacityMicromapIndexType( clusterAccelerationStructureBuildTriangleClusterInfoNV.opacityMicromapIndexType ) , baseGeometryIndexAndGeometryFlags( clusterAccelerationStructureBuildTriangleClusterInfoNV.baseGeometryIndexAndGeometryFlags ) , indexBufferStride( clusterAccelerationStructureBuildTriangleClusterInfoNV.indexBufferStride ) , vertexBufferStride( clusterAccelerationStructureBuildTriangleClusterInfoNV.vertexBufferStride ) , geometryIndexAndFlagsBufferStride( clusterAccelerationStructureBuildTriangleClusterInfoNV.geometryIndexAndFlagsBufferStride ) , opacityMicromapIndexBufferStride( clusterAccelerationStructureBuildTriangleClusterInfoNV.opacityMicromapIndexBufferStride ) , indexBuffer( clusterAccelerationStructureBuildTriangleClusterInfoNV.indexBuffer ) , vertexBuffer( clusterAccelerationStructureBuildTriangleClusterInfoNV.vertexBuffer ) , geometryIndexAndFlagsBuffer( clusterAccelerationStructureBuildTriangleClusterInfoNV.geometryIndexAndFlagsBuffer ) , opacityMicromapArray( clusterAccelerationStructureBuildTriangleClusterInfoNV.opacityMicromapArray ) , opacityMicromapIndexBuffer( clusterAccelerationStructureBuildTriangleClusterInfoNV.opacityMicromapIndexBuffer ) , instantiationBoundingBoxLimit( instantiationBoundingBoxLimit_ ) { } ClusterAccelerationStructureBuildTriangleClusterTemplateInfoNV & operator=( ClusterAccelerationStructureBuildTriangleClusterTemplateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ClusterAccelerationStructureBuildTriangleClusterTemplateInfoNV & operator=( VkClusterAccelerationStructureBuildTriangleClusterTemplateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ClusterAccelerationStructureBuildTriangleClusterTemplateInfoNV & setClusterID( uint32_t clusterID_ ) VULKAN_HPP_NOEXCEPT { clusterID = clusterID_; return *this; } VULKAN_HPP_CONSTEXPR_14 ClusterAccelerationStructureBuildTriangleClusterTemplateInfoNV & setClusterFlags( VULKAN_HPP_NAMESPACE::ClusterAccelerationStructureClusterFlagsNV clusterFlags_ ) VULKAN_HPP_NOEXCEPT { clusterFlags = clusterFlags_; return *this; } VULKAN_HPP_CONSTEXPR_14 ClusterAccelerationStructureBuildTriangleClusterTemplateInfoNV & setTriangleCount( uint32_t triangleCount_ ) VULKAN_HPP_NOEXCEPT { triangleCount = triangleCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 ClusterAccelerationStructureBuildTriangleClusterTemplateInfoNV & setVertexCount( uint32_t vertexCount_ ) VULKAN_HPP_NOEXCEPT { vertexCount = vertexCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 ClusterAccelerationStructureBuildTriangleClusterTemplateInfoNV & setPositionTruncateBitCount( uint32_t positionTruncateBitCount_ ) VULKAN_HPP_NOEXCEPT { positionTruncateBitCount = positionTruncateBitCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 ClusterAccelerationStructureBuildTriangleClusterTemplateInfoNV & setIndexType( uint32_t indexType_ ) VULKAN_HPP_NOEXCEPT { indexType = indexType_; return *this; } VULKAN_HPP_CONSTEXPR_14 ClusterAccelerationStructureBuildTriangleClusterTemplateInfoNV & setOpacityMicromapIndexType( uint32_t opacityMicromapIndexType_ ) VULKAN_HPP_NOEXCEPT { opacityMicromapIndexType = opacityMicromapIndexType_; return *this; } VULKAN_HPP_CONSTEXPR_14 ClusterAccelerationStructureBuildTriangleClusterTemplateInfoNV & setBaseGeometryIndexAndGeometryFlags( VULKAN_HPP_NAMESPACE::ClusterAccelerationStructureGeometryIndexAndGeometryFlagsNV const & baseGeometryIndexAndGeometryFlags_ ) VULKAN_HPP_NOEXCEPT { baseGeometryIndexAndGeometryFlags = baseGeometryIndexAndGeometryFlags_; return *this; } VULKAN_HPP_CONSTEXPR_14 ClusterAccelerationStructureBuildTriangleClusterTemplateInfoNV & setIndexBufferStride( uint16_t indexBufferStride_ ) VULKAN_HPP_NOEXCEPT { indexBufferStride = indexBufferStride_; return *this; } VULKAN_HPP_CONSTEXPR_14 ClusterAccelerationStructureBuildTriangleClusterTemplateInfoNV & setVertexBufferStride( uint16_t vertexBufferStride_ ) VULKAN_HPP_NOEXCEPT { vertexBufferStride = vertexBufferStride_; return *this; } VULKAN_HPP_CONSTEXPR_14 ClusterAccelerationStructureBuildTriangleClusterTemplateInfoNV & setGeometryIndexAndFlagsBufferStride( uint16_t geometryIndexAndFlagsBufferStride_ ) VULKAN_HPP_NOEXCEPT { geometryIndexAndFlagsBufferStride = geometryIndexAndFlagsBufferStride_; return *this; } VULKAN_HPP_CONSTEXPR_14 ClusterAccelerationStructureBuildTriangleClusterTemplateInfoNV & setOpacityMicromapIndexBufferStride( uint16_t opacityMicromapIndexBufferStride_ ) VULKAN_HPP_NOEXCEPT { opacityMicromapIndexBufferStride = opacityMicromapIndexBufferStride_; return *this; } VULKAN_HPP_CONSTEXPR_14 ClusterAccelerationStructureBuildTriangleClusterTemplateInfoNV & setIndexBuffer( VULKAN_HPP_NAMESPACE::DeviceAddress indexBuffer_ ) VULKAN_HPP_NOEXCEPT { indexBuffer = indexBuffer_; return *this; } VULKAN_HPP_CONSTEXPR_14 ClusterAccelerationStructureBuildTriangleClusterTemplateInfoNV & setVertexBuffer( VULKAN_HPP_NAMESPACE::DeviceAddress vertexBuffer_ ) VULKAN_HPP_NOEXCEPT { vertexBuffer = vertexBuffer_; return *this; } VULKAN_HPP_CONSTEXPR_14 ClusterAccelerationStructureBuildTriangleClusterTemplateInfoNV & setGeometryIndexAndFlagsBuffer( VULKAN_HPP_NAMESPACE::DeviceAddress geometryIndexAndFlagsBuffer_ ) VULKAN_HPP_NOEXCEPT { geometryIndexAndFlagsBuffer = geometryIndexAndFlagsBuffer_; return *this; } VULKAN_HPP_CONSTEXPR_14 ClusterAccelerationStructureBuildTriangleClusterTemplateInfoNV & setOpacityMicromapArray( VULKAN_HPP_NAMESPACE::DeviceAddress opacityMicromapArray_ ) VULKAN_HPP_NOEXCEPT { opacityMicromapArray = opacityMicromapArray_; return *this; } VULKAN_HPP_CONSTEXPR_14 ClusterAccelerationStructureBuildTriangleClusterTemplateInfoNV & setOpacityMicromapIndexBuffer( VULKAN_HPP_NAMESPACE::DeviceAddress opacityMicromapIndexBuffer_ ) VULKAN_HPP_NOEXCEPT { opacityMicromapIndexBuffer = opacityMicromapIndexBuffer_; return *this; } VULKAN_HPP_CONSTEXPR_14 ClusterAccelerationStructureBuildTriangleClusterTemplateInfoNV & setInstantiationBoundingBoxLimit( VULKAN_HPP_NAMESPACE::DeviceAddress instantiationBoundingBoxLimit_ ) VULKAN_HPP_NOEXCEPT { instantiationBoundingBoxLimit = instantiationBoundingBoxLimit_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkClusterAccelerationStructureBuildTriangleClusterTemplateInfoNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkClusterAccelerationStructureBuildTriangleClusterTemplateInfoNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( clusterID, clusterFlags, triangleCount, vertexCount, positionTruncateBitCount, indexType, opacityMicromapIndexType, baseGeometryIndexAndGeometryFlags, indexBufferStride, vertexBufferStride, geometryIndexAndFlagsBufferStride, opacityMicromapIndexBufferStride, indexBuffer, vertexBuffer, geometryIndexAndFlagsBuffer, opacityMicromapArray, opacityMicromapIndexBuffer, instantiationBoundingBoxLimit ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ClusterAccelerationStructureBuildTriangleClusterTemplateInfoNV const & ) const = default; #else bool operator==( ClusterAccelerationStructureBuildTriangleClusterTemplateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( clusterID == rhs.clusterID ) && ( clusterFlags == rhs.clusterFlags ) && ( triangleCount == rhs.triangleCount ) && ( vertexCount == rhs.vertexCount ) && ( positionTruncateBitCount == rhs.positionTruncateBitCount ) && ( indexType == rhs.indexType ) && ( opacityMicromapIndexType == rhs.opacityMicromapIndexType ) && ( baseGeometryIndexAndGeometryFlags == rhs.baseGeometryIndexAndGeometryFlags ) && ( indexBufferStride == rhs.indexBufferStride ) && ( vertexBufferStride == rhs.vertexBufferStride ) && ( geometryIndexAndFlagsBufferStride == rhs.geometryIndexAndFlagsBufferStride ) && ( opacityMicromapIndexBufferStride == rhs.opacityMicromapIndexBufferStride ) && ( indexBuffer == rhs.indexBuffer ) && ( vertexBuffer == rhs.vertexBuffer ) && ( geometryIndexAndFlagsBuffer == rhs.geometryIndexAndFlagsBuffer ) && ( opacityMicromapArray == rhs.opacityMicromapArray ) && ( opacityMicromapIndexBuffer == rhs.opacityMicromapIndexBuffer ) && ( instantiationBoundingBoxLimit == rhs.instantiationBoundingBoxLimit ); # endif } bool operator!=( ClusterAccelerationStructureBuildTriangleClusterTemplateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: uint32_t clusterID = {}; VULKAN_HPP_NAMESPACE::ClusterAccelerationStructureClusterFlagsNV clusterFlags = {}; uint32_t triangleCount : 9; uint32_t vertexCount : 9; uint32_t positionTruncateBitCount : 6; uint32_t indexType : 4; uint32_t opacityMicromapIndexType : 4; VULKAN_HPP_NAMESPACE::ClusterAccelerationStructureGeometryIndexAndGeometryFlagsNV baseGeometryIndexAndGeometryFlags = {}; uint16_t indexBufferStride = {}; uint16_t vertexBufferStride = {}; uint16_t geometryIndexAndFlagsBufferStride = {}; uint16_t opacityMicromapIndexBufferStride = {}; VULKAN_HPP_NAMESPACE::DeviceAddress indexBuffer = {}; VULKAN_HPP_NAMESPACE::DeviceAddress vertexBuffer = {}; VULKAN_HPP_NAMESPACE::DeviceAddress geometryIndexAndFlagsBuffer = {}; VULKAN_HPP_NAMESPACE::DeviceAddress opacityMicromapArray = {}; VULKAN_HPP_NAMESPACE::DeviceAddress opacityMicromapIndexBuffer = {}; VULKAN_HPP_NAMESPACE::DeviceAddress instantiationBoundingBoxLimit = {}; }; struct ClusterAccelerationStructureClustersBottomLevelInputNV { using NativeType = VkClusterAccelerationStructureClustersBottomLevelInputNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eClusterAccelerationStructureClustersBottomLevelInputNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ClusterAccelerationStructureClustersBottomLevelInputNV( uint32_t maxTotalClusterCount_ = {}, uint32_t maxClusterCountPerAccelerationStructure_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , maxTotalClusterCount{ maxTotalClusterCount_ } , maxClusterCountPerAccelerationStructure{ maxClusterCountPerAccelerationStructure_ } { } VULKAN_HPP_CONSTEXPR ClusterAccelerationStructureClustersBottomLevelInputNV( ClusterAccelerationStructureClustersBottomLevelInputNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; ClusterAccelerationStructureClustersBottomLevelInputNV( VkClusterAccelerationStructureClustersBottomLevelInputNV const & rhs ) VULKAN_HPP_NOEXCEPT : ClusterAccelerationStructureClustersBottomLevelInputNV( *reinterpret_cast( &rhs ) ) { } ClusterAccelerationStructureClustersBottomLevelInputNV & operator=( ClusterAccelerationStructureClustersBottomLevelInputNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ClusterAccelerationStructureClustersBottomLevelInputNV & operator=( VkClusterAccelerationStructureClustersBottomLevelInputNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ClusterAccelerationStructureClustersBottomLevelInputNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ClusterAccelerationStructureClustersBottomLevelInputNV & setMaxTotalClusterCount( uint32_t maxTotalClusterCount_ ) VULKAN_HPP_NOEXCEPT { maxTotalClusterCount = maxTotalClusterCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 ClusterAccelerationStructureClustersBottomLevelInputNV & setMaxClusterCountPerAccelerationStructure( uint32_t maxClusterCountPerAccelerationStructure_ ) VULKAN_HPP_NOEXCEPT { maxClusterCountPerAccelerationStructure = maxClusterCountPerAccelerationStructure_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkClusterAccelerationStructureClustersBottomLevelInputNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkClusterAccelerationStructureClustersBottomLevelInputNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, maxTotalClusterCount, maxClusterCountPerAccelerationStructure ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ClusterAccelerationStructureClustersBottomLevelInputNV const & ) const = default; #else bool operator==( ClusterAccelerationStructureClustersBottomLevelInputNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( maxTotalClusterCount == rhs.maxTotalClusterCount ) && ( maxClusterCountPerAccelerationStructure == rhs.maxClusterCountPerAccelerationStructure ); # endif } bool operator!=( ClusterAccelerationStructureClustersBottomLevelInputNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eClusterAccelerationStructureClustersBottomLevelInputNV; void * pNext = {}; uint32_t maxTotalClusterCount = {}; uint32_t maxClusterCountPerAccelerationStructure = {}; }; template <> struct CppType { using Type = ClusterAccelerationStructureClustersBottomLevelInputNV; }; struct ClusterAccelerationStructureTriangleClusterInputNV { using NativeType = VkClusterAccelerationStructureTriangleClusterInputNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eClusterAccelerationStructureTriangleClusterInputNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ClusterAccelerationStructureTriangleClusterInputNV( VULKAN_HPP_NAMESPACE::Format vertexFormat_ = VULKAN_HPP_NAMESPACE::Format::eUndefined, uint32_t maxGeometryIndexValue_ = {}, uint32_t maxClusterUniqueGeometryCount_ = {}, uint32_t maxClusterTriangleCount_ = {}, uint32_t maxClusterVertexCount_ = {}, uint32_t maxTotalTriangleCount_ = {}, uint32_t maxTotalVertexCount_ = {}, uint32_t minPositionTruncateBitCount_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , vertexFormat{ vertexFormat_ } , maxGeometryIndexValue{ maxGeometryIndexValue_ } , maxClusterUniqueGeometryCount{ maxClusterUniqueGeometryCount_ } , maxClusterTriangleCount{ maxClusterTriangleCount_ } , maxClusterVertexCount{ maxClusterVertexCount_ } , maxTotalTriangleCount{ maxTotalTriangleCount_ } , maxTotalVertexCount{ maxTotalVertexCount_ } , minPositionTruncateBitCount{ minPositionTruncateBitCount_ } { } VULKAN_HPP_CONSTEXPR ClusterAccelerationStructureTriangleClusterInputNV( ClusterAccelerationStructureTriangleClusterInputNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; ClusterAccelerationStructureTriangleClusterInputNV( VkClusterAccelerationStructureTriangleClusterInputNV const & rhs ) VULKAN_HPP_NOEXCEPT : ClusterAccelerationStructureTriangleClusterInputNV( *reinterpret_cast( &rhs ) ) { } ClusterAccelerationStructureTriangleClusterInputNV & operator=( ClusterAccelerationStructureTriangleClusterInputNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ClusterAccelerationStructureTriangleClusterInputNV & operator=( VkClusterAccelerationStructureTriangleClusterInputNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ClusterAccelerationStructureTriangleClusterInputNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ClusterAccelerationStructureTriangleClusterInputNV & setVertexFormat( VULKAN_HPP_NAMESPACE::Format vertexFormat_ ) VULKAN_HPP_NOEXCEPT { vertexFormat = vertexFormat_; return *this; } VULKAN_HPP_CONSTEXPR_14 ClusterAccelerationStructureTriangleClusterInputNV & setMaxGeometryIndexValue( uint32_t maxGeometryIndexValue_ ) VULKAN_HPP_NOEXCEPT { maxGeometryIndexValue = maxGeometryIndexValue_; return *this; } VULKAN_HPP_CONSTEXPR_14 ClusterAccelerationStructureTriangleClusterInputNV & setMaxClusterUniqueGeometryCount( uint32_t maxClusterUniqueGeometryCount_ ) VULKAN_HPP_NOEXCEPT { maxClusterUniqueGeometryCount = maxClusterUniqueGeometryCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 ClusterAccelerationStructureTriangleClusterInputNV & setMaxClusterTriangleCount( uint32_t maxClusterTriangleCount_ ) VULKAN_HPP_NOEXCEPT { maxClusterTriangleCount = maxClusterTriangleCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 ClusterAccelerationStructureTriangleClusterInputNV & setMaxClusterVertexCount( uint32_t maxClusterVertexCount_ ) VULKAN_HPP_NOEXCEPT { maxClusterVertexCount = maxClusterVertexCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 ClusterAccelerationStructureTriangleClusterInputNV & setMaxTotalTriangleCount( uint32_t maxTotalTriangleCount_ ) VULKAN_HPP_NOEXCEPT { maxTotalTriangleCount = maxTotalTriangleCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 ClusterAccelerationStructureTriangleClusterInputNV & setMaxTotalVertexCount( uint32_t maxTotalVertexCount_ ) VULKAN_HPP_NOEXCEPT { maxTotalVertexCount = maxTotalVertexCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 ClusterAccelerationStructureTriangleClusterInputNV & setMinPositionTruncateBitCount( uint32_t minPositionTruncateBitCount_ ) VULKAN_HPP_NOEXCEPT { minPositionTruncateBitCount = minPositionTruncateBitCount_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkClusterAccelerationStructureTriangleClusterInputNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkClusterAccelerationStructureTriangleClusterInputNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, vertexFormat, maxGeometryIndexValue, maxClusterUniqueGeometryCount, maxClusterTriangleCount, maxClusterVertexCount, maxTotalTriangleCount, maxTotalVertexCount, minPositionTruncateBitCount ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ClusterAccelerationStructureTriangleClusterInputNV const & ) const = default; #else bool operator==( ClusterAccelerationStructureTriangleClusterInputNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( vertexFormat == rhs.vertexFormat ) && ( maxGeometryIndexValue == rhs.maxGeometryIndexValue ) && ( maxClusterUniqueGeometryCount == rhs.maxClusterUniqueGeometryCount ) && ( maxClusterTriangleCount == rhs.maxClusterTriangleCount ) && ( maxClusterVertexCount == rhs.maxClusterVertexCount ) && ( maxTotalTriangleCount == rhs.maxTotalTriangleCount ) && ( maxTotalVertexCount == rhs.maxTotalVertexCount ) && ( minPositionTruncateBitCount == rhs.minPositionTruncateBitCount ); # endif } bool operator!=( ClusterAccelerationStructureTriangleClusterInputNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eClusterAccelerationStructureTriangleClusterInputNV; void * pNext = {}; VULKAN_HPP_NAMESPACE::Format vertexFormat = VULKAN_HPP_NAMESPACE::Format::eUndefined; uint32_t maxGeometryIndexValue = {}; uint32_t maxClusterUniqueGeometryCount = {}; uint32_t maxClusterTriangleCount = {}; uint32_t maxClusterVertexCount = {}; uint32_t maxTotalTriangleCount = {}; uint32_t maxTotalVertexCount = {}; uint32_t minPositionTruncateBitCount = {}; }; template <> struct CppType { using Type = ClusterAccelerationStructureTriangleClusterInputNV; }; struct ClusterAccelerationStructureMoveObjectsInputNV { using NativeType = VkClusterAccelerationStructureMoveObjectsInputNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eClusterAccelerationStructureMoveObjectsInputNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ClusterAccelerationStructureMoveObjectsInputNV( VULKAN_HPP_NAMESPACE::ClusterAccelerationStructureTypeNV type_ = VULKAN_HPP_NAMESPACE::ClusterAccelerationStructureTypeNV::eClustersBottomLevel, VULKAN_HPP_NAMESPACE::Bool32 noMoveOverlap_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize maxMovedBytes_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , type{ type_ } , noMoveOverlap{ noMoveOverlap_ } , maxMovedBytes{ maxMovedBytes_ } { } VULKAN_HPP_CONSTEXPR ClusterAccelerationStructureMoveObjectsInputNV( ClusterAccelerationStructureMoveObjectsInputNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; ClusterAccelerationStructureMoveObjectsInputNV( VkClusterAccelerationStructureMoveObjectsInputNV const & rhs ) VULKAN_HPP_NOEXCEPT : ClusterAccelerationStructureMoveObjectsInputNV( *reinterpret_cast( &rhs ) ) { } ClusterAccelerationStructureMoveObjectsInputNV & operator=( ClusterAccelerationStructureMoveObjectsInputNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ClusterAccelerationStructureMoveObjectsInputNV & operator=( VkClusterAccelerationStructureMoveObjectsInputNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ClusterAccelerationStructureMoveObjectsInputNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ClusterAccelerationStructureMoveObjectsInputNV & setType( VULKAN_HPP_NAMESPACE::ClusterAccelerationStructureTypeNV type_ ) VULKAN_HPP_NOEXCEPT { type = type_; return *this; } VULKAN_HPP_CONSTEXPR_14 ClusterAccelerationStructureMoveObjectsInputNV & setNoMoveOverlap( VULKAN_HPP_NAMESPACE::Bool32 noMoveOverlap_ ) VULKAN_HPP_NOEXCEPT { noMoveOverlap = noMoveOverlap_; return *this; } VULKAN_HPP_CONSTEXPR_14 ClusterAccelerationStructureMoveObjectsInputNV & setMaxMovedBytes( VULKAN_HPP_NAMESPACE::DeviceSize maxMovedBytes_ ) VULKAN_HPP_NOEXCEPT { maxMovedBytes = maxMovedBytes_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkClusterAccelerationStructureMoveObjectsInputNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkClusterAccelerationStructureMoveObjectsInputNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, type, noMoveOverlap, maxMovedBytes ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ClusterAccelerationStructureMoveObjectsInputNV const & ) const = default; #else bool operator==( ClusterAccelerationStructureMoveObjectsInputNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( type == rhs.type ) && ( noMoveOverlap == rhs.noMoveOverlap ) && ( maxMovedBytes == rhs.maxMovedBytes ); # endif } bool operator!=( ClusterAccelerationStructureMoveObjectsInputNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eClusterAccelerationStructureMoveObjectsInputNV; void * pNext = {}; VULKAN_HPP_NAMESPACE::ClusterAccelerationStructureTypeNV type = VULKAN_HPP_NAMESPACE::ClusterAccelerationStructureTypeNV::eClustersBottomLevel; VULKAN_HPP_NAMESPACE::Bool32 noMoveOverlap = {}; VULKAN_HPP_NAMESPACE::DeviceSize maxMovedBytes = {}; }; template <> struct CppType { using Type = ClusterAccelerationStructureMoveObjectsInputNV; }; union ClusterAccelerationStructureOpInputNV { using NativeType = VkClusterAccelerationStructureOpInputNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_UNION_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 ClusterAccelerationStructureOpInputNV( VULKAN_HPP_NAMESPACE::ClusterAccelerationStructureClustersBottomLevelInputNV * pClustersBottomLevel_ = {} ) : pClustersBottomLevel( pClustersBottomLevel_ ) { } VULKAN_HPP_CONSTEXPR_14 ClusterAccelerationStructureOpInputNV( VULKAN_HPP_NAMESPACE::ClusterAccelerationStructureTriangleClusterInputNV * pTriangleClusters_ ) : pTriangleClusters( pTriangleClusters_ ) { } VULKAN_HPP_CONSTEXPR_14 ClusterAccelerationStructureOpInputNV( VULKAN_HPP_NAMESPACE::ClusterAccelerationStructureMoveObjectsInputNV * pMoveObjects_ ) : pMoveObjects( pMoveObjects_ ) { } #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_UNION_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ClusterAccelerationStructureOpInputNV & setPClustersBottomLevel( VULKAN_HPP_NAMESPACE::ClusterAccelerationStructureClustersBottomLevelInputNV * pClustersBottomLevel_ ) VULKAN_HPP_NOEXCEPT { pClustersBottomLevel = pClustersBottomLevel_; return *this; } VULKAN_HPP_CONSTEXPR_14 ClusterAccelerationStructureOpInputNV & setPTriangleClusters( VULKAN_HPP_NAMESPACE::ClusterAccelerationStructureTriangleClusterInputNV * pTriangleClusters_ ) VULKAN_HPP_NOEXCEPT { pTriangleClusters = pTriangleClusters_; return *this; } VULKAN_HPP_CONSTEXPR_14 ClusterAccelerationStructureOpInputNV & setPMoveObjects( VULKAN_HPP_NAMESPACE::ClusterAccelerationStructureMoveObjectsInputNV * pMoveObjects_ ) VULKAN_HPP_NOEXCEPT { pMoveObjects = pMoveObjects_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkClusterAccelerationStructureOpInputNV const &() const { return *reinterpret_cast( this ); } operator VkClusterAccelerationStructureOpInputNV &() { return *reinterpret_cast( this ); } #ifdef VULKAN_HPP_HAS_UNRESTRICTED_UNIONS VULKAN_HPP_NAMESPACE::ClusterAccelerationStructureClustersBottomLevelInputNV * pClustersBottomLevel; VULKAN_HPP_NAMESPACE::ClusterAccelerationStructureTriangleClusterInputNV * pTriangleClusters; VULKAN_HPP_NAMESPACE::ClusterAccelerationStructureMoveObjectsInputNV * pMoveObjects; #else VkClusterAccelerationStructureClustersBottomLevelInputNV * pClustersBottomLevel; VkClusterAccelerationStructureTriangleClusterInputNV * pTriangleClusters; VkClusterAccelerationStructureMoveObjectsInputNV * pMoveObjects; #endif /*VULKAN_HPP_HAS_UNRESTRICTED_UNIONS*/ }; struct ClusterAccelerationStructureInputInfoNV { using NativeType = VkClusterAccelerationStructureInputInfoNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eClusterAccelerationStructureInputInfoNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 ClusterAccelerationStructureInputInfoNV( uint32_t maxAccelerationStructureCount_ = {}, VULKAN_HPP_NAMESPACE::BuildAccelerationStructureFlagsKHR flags_ = {}, VULKAN_HPP_NAMESPACE::ClusterAccelerationStructureOpTypeNV opType_ = VULKAN_HPP_NAMESPACE::ClusterAccelerationStructureOpTypeNV::eMoveObjects, VULKAN_HPP_NAMESPACE::ClusterAccelerationStructureOpModeNV opMode_ = VULKAN_HPP_NAMESPACE::ClusterAccelerationStructureOpModeNV::eImplicitDestinations, VULKAN_HPP_NAMESPACE::ClusterAccelerationStructureOpInputNV opInput_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , maxAccelerationStructureCount{ maxAccelerationStructureCount_ } , flags{ flags_ } , opType{ opType_ } , opMode{ opMode_ } , opInput{ opInput_ } { } VULKAN_HPP_CONSTEXPR_14 ClusterAccelerationStructureInputInfoNV( ClusterAccelerationStructureInputInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; ClusterAccelerationStructureInputInfoNV( VkClusterAccelerationStructureInputInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT : ClusterAccelerationStructureInputInfoNV( *reinterpret_cast( &rhs ) ) { } ClusterAccelerationStructureInputInfoNV & operator=( ClusterAccelerationStructureInputInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ClusterAccelerationStructureInputInfoNV & operator=( VkClusterAccelerationStructureInputInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ClusterAccelerationStructureInputInfoNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ClusterAccelerationStructureInputInfoNV & setMaxAccelerationStructureCount( uint32_t maxAccelerationStructureCount_ ) VULKAN_HPP_NOEXCEPT { maxAccelerationStructureCount = maxAccelerationStructureCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 ClusterAccelerationStructureInputInfoNV & setFlags( VULKAN_HPP_NAMESPACE::BuildAccelerationStructureFlagsKHR flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 ClusterAccelerationStructureInputInfoNV & setOpType( VULKAN_HPP_NAMESPACE::ClusterAccelerationStructureOpTypeNV opType_ ) VULKAN_HPP_NOEXCEPT { opType = opType_; return *this; } VULKAN_HPP_CONSTEXPR_14 ClusterAccelerationStructureInputInfoNV & setOpMode( VULKAN_HPP_NAMESPACE::ClusterAccelerationStructureOpModeNV opMode_ ) VULKAN_HPP_NOEXCEPT { opMode = opMode_; return *this; } VULKAN_HPP_CONSTEXPR_14 ClusterAccelerationStructureInputInfoNV & setOpInput( VULKAN_HPP_NAMESPACE::ClusterAccelerationStructureOpInputNV const & opInput_ ) VULKAN_HPP_NOEXCEPT { opInput = opInput_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkClusterAccelerationStructureInputInfoNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkClusterAccelerationStructureInputInfoNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, maxAccelerationStructureCount, flags, opType, opMode, opInput ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eClusterAccelerationStructureInputInfoNV; void * pNext = {}; uint32_t maxAccelerationStructureCount = {}; VULKAN_HPP_NAMESPACE::BuildAccelerationStructureFlagsKHR flags = {}; VULKAN_HPP_NAMESPACE::ClusterAccelerationStructureOpTypeNV opType = VULKAN_HPP_NAMESPACE::ClusterAccelerationStructureOpTypeNV::eMoveObjects; VULKAN_HPP_NAMESPACE::ClusterAccelerationStructureOpModeNV opMode = VULKAN_HPP_NAMESPACE::ClusterAccelerationStructureOpModeNV::eImplicitDestinations; VULKAN_HPP_NAMESPACE::ClusterAccelerationStructureOpInputNV opInput = {}; }; template <> struct CppType { using Type = ClusterAccelerationStructureInputInfoNV; }; struct StridedDeviceAddressRegionKHR { using NativeType = VkStridedDeviceAddressRegionKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR StridedDeviceAddressRegionKHR( VULKAN_HPP_NAMESPACE::DeviceAddress deviceAddress_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize stride_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize size_ = {} ) VULKAN_HPP_NOEXCEPT : deviceAddress{ deviceAddress_ } , stride{ stride_ } , size{ size_ } { } VULKAN_HPP_CONSTEXPR StridedDeviceAddressRegionKHR( StridedDeviceAddressRegionKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; StridedDeviceAddressRegionKHR( VkStridedDeviceAddressRegionKHR const & rhs ) VULKAN_HPP_NOEXCEPT : StridedDeviceAddressRegionKHR( *reinterpret_cast( &rhs ) ) { } StridedDeviceAddressRegionKHR & operator=( StridedDeviceAddressRegionKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ StridedDeviceAddressRegionKHR & operator=( VkStridedDeviceAddressRegionKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 StridedDeviceAddressRegionKHR & setDeviceAddress( VULKAN_HPP_NAMESPACE::DeviceAddress deviceAddress_ ) VULKAN_HPP_NOEXCEPT { deviceAddress = deviceAddress_; return *this; } VULKAN_HPP_CONSTEXPR_14 StridedDeviceAddressRegionKHR & setStride( VULKAN_HPP_NAMESPACE::DeviceSize stride_ ) VULKAN_HPP_NOEXCEPT { stride = stride_; return *this; } VULKAN_HPP_CONSTEXPR_14 StridedDeviceAddressRegionKHR & setSize( VULKAN_HPP_NAMESPACE::DeviceSize size_ ) VULKAN_HPP_NOEXCEPT { size = size_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkStridedDeviceAddressRegionKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkStridedDeviceAddressRegionKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( deviceAddress, stride, size ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( StridedDeviceAddressRegionKHR const & ) const = default; #else bool operator==( StridedDeviceAddressRegionKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( deviceAddress == rhs.deviceAddress ) && ( stride == rhs.stride ) && ( size == rhs.size ); # endif } bool operator!=( StridedDeviceAddressRegionKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::DeviceAddress deviceAddress = {}; VULKAN_HPP_NAMESPACE::DeviceSize stride = {}; VULKAN_HPP_NAMESPACE::DeviceSize size = {}; }; struct ClusterAccelerationStructureCommandsInfoNV { using NativeType = VkClusterAccelerationStructureCommandsInfoNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eClusterAccelerationStructureCommandsInfoNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 ClusterAccelerationStructureCommandsInfoNV( VULKAN_HPP_NAMESPACE::ClusterAccelerationStructureInputInfoNV input_ = {}, VULKAN_HPP_NAMESPACE::DeviceAddress dstImplicitData_ = {}, VULKAN_HPP_NAMESPACE::DeviceAddress scratchData_ = {}, VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR dstAddressesArray_ = {}, VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR dstSizesArray_ = {}, VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR srcInfosArray_ = {}, VULKAN_HPP_NAMESPACE::DeviceAddress srcInfosCount_ = {}, VULKAN_HPP_NAMESPACE::ClusterAccelerationStructureAddressResolutionFlagsNV addressResolutionFlags_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , input{ input_ } , dstImplicitData{ dstImplicitData_ } , scratchData{ scratchData_ } , dstAddressesArray{ dstAddressesArray_ } , dstSizesArray{ dstSizesArray_ } , srcInfosArray{ srcInfosArray_ } , srcInfosCount{ srcInfosCount_ } , addressResolutionFlags{ addressResolutionFlags_ } { } VULKAN_HPP_CONSTEXPR_14 ClusterAccelerationStructureCommandsInfoNV( ClusterAccelerationStructureCommandsInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; ClusterAccelerationStructureCommandsInfoNV( VkClusterAccelerationStructureCommandsInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT : ClusterAccelerationStructureCommandsInfoNV( *reinterpret_cast( &rhs ) ) { } ClusterAccelerationStructureCommandsInfoNV & operator=( ClusterAccelerationStructureCommandsInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ClusterAccelerationStructureCommandsInfoNV & operator=( VkClusterAccelerationStructureCommandsInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ClusterAccelerationStructureCommandsInfoNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ClusterAccelerationStructureCommandsInfoNV & setInput( VULKAN_HPP_NAMESPACE::ClusterAccelerationStructureInputInfoNV const & input_ ) VULKAN_HPP_NOEXCEPT { input = input_; return *this; } VULKAN_HPP_CONSTEXPR_14 ClusterAccelerationStructureCommandsInfoNV & setDstImplicitData( VULKAN_HPP_NAMESPACE::DeviceAddress dstImplicitData_ ) VULKAN_HPP_NOEXCEPT { dstImplicitData = dstImplicitData_; return *this; } VULKAN_HPP_CONSTEXPR_14 ClusterAccelerationStructureCommandsInfoNV & setScratchData( VULKAN_HPP_NAMESPACE::DeviceAddress scratchData_ ) VULKAN_HPP_NOEXCEPT { scratchData = scratchData_; return *this; } VULKAN_HPP_CONSTEXPR_14 ClusterAccelerationStructureCommandsInfoNV & setDstAddressesArray( VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR const & dstAddressesArray_ ) VULKAN_HPP_NOEXCEPT { dstAddressesArray = dstAddressesArray_; return *this; } VULKAN_HPP_CONSTEXPR_14 ClusterAccelerationStructureCommandsInfoNV & setDstSizesArray( VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR const & dstSizesArray_ ) VULKAN_HPP_NOEXCEPT { dstSizesArray = dstSizesArray_; return *this; } VULKAN_HPP_CONSTEXPR_14 ClusterAccelerationStructureCommandsInfoNV & setSrcInfosArray( VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR const & srcInfosArray_ ) VULKAN_HPP_NOEXCEPT { srcInfosArray = srcInfosArray_; return *this; } VULKAN_HPP_CONSTEXPR_14 ClusterAccelerationStructureCommandsInfoNV & setSrcInfosCount( VULKAN_HPP_NAMESPACE::DeviceAddress srcInfosCount_ ) VULKAN_HPP_NOEXCEPT { srcInfosCount = srcInfosCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 ClusterAccelerationStructureCommandsInfoNV & setAddressResolutionFlags( VULKAN_HPP_NAMESPACE::ClusterAccelerationStructureAddressResolutionFlagsNV addressResolutionFlags_ ) VULKAN_HPP_NOEXCEPT { addressResolutionFlags = addressResolutionFlags_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkClusterAccelerationStructureCommandsInfoNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkClusterAccelerationStructureCommandsInfoNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, input, dstImplicitData, scratchData, dstAddressesArray, dstSizesArray, srcInfosArray, srcInfosCount, addressResolutionFlags ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eClusterAccelerationStructureCommandsInfoNV; void * pNext = {}; VULKAN_HPP_NAMESPACE::ClusterAccelerationStructureInputInfoNV input = {}; VULKAN_HPP_NAMESPACE::DeviceAddress dstImplicitData = {}; VULKAN_HPP_NAMESPACE::DeviceAddress scratchData = {}; VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR dstAddressesArray = {}; VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR dstSizesArray = {}; VULKAN_HPP_NAMESPACE::StridedDeviceAddressRegionKHR srcInfosArray = {}; VULKAN_HPP_NAMESPACE::DeviceAddress srcInfosCount = {}; VULKAN_HPP_NAMESPACE::ClusterAccelerationStructureAddressResolutionFlagsNV addressResolutionFlags = {}; }; template <> struct CppType { using Type = ClusterAccelerationStructureCommandsInfoNV; }; struct ClusterAccelerationStructureInstantiateClusterInfoNV { using NativeType = VkClusterAccelerationStructureInstantiateClusterInfoNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ClusterAccelerationStructureInstantiateClusterInfoNV( uint32_t clusterIdOffset_ = {}, uint32_t geometryIndexOffset_ = {}, uint32_t reserved_ = {}, VULKAN_HPP_NAMESPACE::DeviceAddress clusterTemplateAddress_ = {}, VULKAN_HPP_NAMESPACE::StridedDeviceAddressNV vertexBuffer_ = {} ) VULKAN_HPP_NOEXCEPT : clusterIdOffset{ clusterIdOffset_ } , geometryIndexOffset{ geometryIndexOffset_ } , reserved{ reserved_ } , clusterTemplateAddress{ clusterTemplateAddress_ } , vertexBuffer{ vertexBuffer_ } { } VULKAN_HPP_CONSTEXPR ClusterAccelerationStructureInstantiateClusterInfoNV( ClusterAccelerationStructureInstantiateClusterInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; ClusterAccelerationStructureInstantiateClusterInfoNV( VkClusterAccelerationStructureInstantiateClusterInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT : ClusterAccelerationStructureInstantiateClusterInfoNV( *reinterpret_cast( &rhs ) ) { } ClusterAccelerationStructureInstantiateClusterInfoNV & operator=( ClusterAccelerationStructureInstantiateClusterInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ClusterAccelerationStructureInstantiateClusterInfoNV & operator=( VkClusterAccelerationStructureInstantiateClusterInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ClusterAccelerationStructureInstantiateClusterInfoNV & setClusterIdOffset( uint32_t clusterIdOffset_ ) VULKAN_HPP_NOEXCEPT { clusterIdOffset = clusterIdOffset_; return *this; } VULKAN_HPP_CONSTEXPR_14 ClusterAccelerationStructureInstantiateClusterInfoNV & setGeometryIndexOffset( uint32_t geometryIndexOffset_ ) VULKAN_HPP_NOEXCEPT { geometryIndexOffset = geometryIndexOffset_; return *this; } VULKAN_HPP_CONSTEXPR_14 ClusterAccelerationStructureInstantiateClusterInfoNV & setReserved( uint32_t reserved_ ) VULKAN_HPP_NOEXCEPT { reserved = reserved_; return *this; } VULKAN_HPP_CONSTEXPR_14 ClusterAccelerationStructureInstantiateClusterInfoNV & setClusterTemplateAddress( VULKAN_HPP_NAMESPACE::DeviceAddress clusterTemplateAddress_ ) VULKAN_HPP_NOEXCEPT { clusterTemplateAddress = clusterTemplateAddress_; return *this; } VULKAN_HPP_CONSTEXPR_14 ClusterAccelerationStructureInstantiateClusterInfoNV & setVertexBuffer( VULKAN_HPP_NAMESPACE::StridedDeviceAddressNV const & vertexBuffer_ ) VULKAN_HPP_NOEXCEPT { vertexBuffer = vertexBuffer_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkClusterAccelerationStructureInstantiateClusterInfoNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkClusterAccelerationStructureInstantiateClusterInfoNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( clusterIdOffset, geometryIndexOffset, reserved, clusterTemplateAddress, vertexBuffer ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ClusterAccelerationStructureInstantiateClusterInfoNV const & ) const = default; #else bool operator==( ClusterAccelerationStructureInstantiateClusterInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( clusterIdOffset == rhs.clusterIdOffset ) && ( geometryIndexOffset == rhs.geometryIndexOffset ) && ( reserved == rhs.reserved ) && ( clusterTemplateAddress == rhs.clusterTemplateAddress ) && ( vertexBuffer == rhs.vertexBuffer ); # endif } bool operator!=( ClusterAccelerationStructureInstantiateClusterInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: uint32_t clusterIdOffset = {}; uint32_t geometryIndexOffset : 24; uint32_t reserved : 8; VULKAN_HPP_NAMESPACE::DeviceAddress clusterTemplateAddress = {}; VULKAN_HPP_NAMESPACE::StridedDeviceAddressNV vertexBuffer = {}; }; struct ClusterAccelerationStructureMoveObjectsInfoNV { using NativeType = VkClusterAccelerationStructureMoveObjectsInfoNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ClusterAccelerationStructureMoveObjectsInfoNV( VULKAN_HPP_NAMESPACE::DeviceAddress srcAccelerationStructure_ = {} ) VULKAN_HPP_NOEXCEPT : srcAccelerationStructure{ srcAccelerationStructure_ } { } VULKAN_HPP_CONSTEXPR ClusterAccelerationStructureMoveObjectsInfoNV( ClusterAccelerationStructureMoveObjectsInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; ClusterAccelerationStructureMoveObjectsInfoNV( VkClusterAccelerationStructureMoveObjectsInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT : ClusterAccelerationStructureMoveObjectsInfoNV( *reinterpret_cast( &rhs ) ) { } ClusterAccelerationStructureMoveObjectsInfoNV & operator=( ClusterAccelerationStructureMoveObjectsInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ClusterAccelerationStructureMoveObjectsInfoNV & operator=( VkClusterAccelerationStructureMoveObjectsInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ClusterAccelerationStructureMoveObjectsInfoNV & setSrcAccelerationStructure( VULKAN_HPP_NAMESPACE::DeviceAddress srcAccelerationStructure_ ) VULKAN_HPP_NOEXCEPT { srcAccelerationStructure = srcAccelerationStructure_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkClusterAccelerationStructureMoveObjectsInfoNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkClusterAccelerationStructureMoveObjectsInfoNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( srcAccelerationStructure ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ClusterAccelerationStructureMoveObjectsInfoNV const & ) const = default; #else bool operator==( ClusterAccelerationStructureMoveObjectsInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( srcAccelerationStructure == rhs.srcAccelerationStructure ); # endif } bool operator!=( ClusterAccelerationStructureMoveObjectsInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::DeviceAddress srcAccelerationStructure = {}; }; struct CoarseSampleLocationNV { using NativeType = VkCoarseSampleLocationNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR CoarseSampleLocationNV( uint32_t pixelX_ = {}, uint32_t pixelY_ = {}, uint32_t sample_ = {} ) VULKAN_HPP_NOEXCEPT : pixelX{ pixelX_ } , pixelY{ pixelY_ } , sample{ sample_ } { } VULKAN_HPP_CONSTEXPR CoarseSampleLocationNV( CoarseSampleLocationNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; CoarseSampleLocationNV( VkCoarseSampleLocationNV const & rhs ) VULKAN_HPP_NOEXCEPT : CoarseSampleLocationNV( *reinterpret_cast( &rhs ) ) { } CoarseSampleLocationNV & operator=( CoarseSampleLocationNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ CoarseSampleLocationNV & operator=( VkCoarseSampleLocationNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 CoarseSampleLocationNV & setPixelX( uint32_t pixelX_ ) VULKAN_HPP_NOEXCEPT { pixelX = pixelX_; return *this; } VULKAN_HPP_CONSTEXPR_14 CoarseSampleLocationNV & setPixelY( uint32_t pixelY_ ) VULKAN_HPP_NOEXCEPT { pixelY = pixelY_; return *this; } VULKAN_HPP_CONSTEXPR_14 CoarseSampleLocationNV & setSample( uint32_t sample_ ) VULKAN_HPP_NOEXCEPT { sample = sample_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkCoarseSampleLocationNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkCoarseSampleLocationNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( pixelX, pixelY, sample ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( CoarseSampleLocationNV const & ) const = default; #else bool operator==( CoarseSampleLocationNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( pixelX == rhs.pixelX ) && ( pixelY == rhs.pixelY ) && ( sample == rhs.sample ); # endif } bool operator!=( CoarseSampleLocationNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: uint32_t pixelX = {}; uint32_t pixelY = {}; uint32_t sample = {}; }; struct CoarseSampleOrderCustomNV { using NativeType = VkCoarseSampleOrderCustomNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR CoarseSampleOrderCustomNV( VULKAN_HPP_NAMESPACE::ShadingRatePaletteEntryNV shadingRate_ = VULKAN_HPP_NAMESPACE::ShadingRatePaletteEntryNV::eNoInvocations, uint32_t sampleCount_ = {}, uint32_t sampleLocationCount_ = {}, const VULKAN_HPP_NAMESPACE::CoarseSampleLocationNV * pSampleLocations_ = {} ) VULKAN_HPP_NOEXCEPT : shadingRate{ shadingRate_ } , sampleCount{ sampleCount_ } , sampleLocationCount{ sampleLocationCount_ } , pSampleLocations{ pSampleLocations_ } { } VULKAN_HPP_CONSTEXPR CoarseSampleOrderCustomNV( CoarseSampleOrderCustomNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; CoarseSampleOrderCustomNV( VkCoarseSampleOrderCustomNV const & rhs ) VULKAN_HPP_NOEXCEPT : CoarseSampleOrderCustomNV( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) CoarseSampleOrderCustomNV( VULKAN_HPP_NAMESPACE::ShadingRatePaletteEntryNV shadingRate_, uint32_t sampleCount_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & sampleLocations_ ) : shadingRate( shadingRate_ ) , sampleCount( sampleCount_ ) , sampleLocationCount( static_cast( sampleLocations_.size() ) ) , pSampleLocations( sampleLocations_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ CoarseSampleOrderCustomNV & operator=( CoarseSampleOrderCustomNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ CoarseSampleOrderCustomNV & operator=( VkCoarseSampleOrderCustomNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 CoarseSampleOrderCustomNV & setShadingRate( VULKAN_HPP_NAMESPACE::ShadingRatePaletteEntryNV shadingRate_ ) VULKAN_HPP_NOEXCEPT { shadingRate = shadingRate_; return *this; } VULKAN_HPP_CONSTEXPR_14 CoarseSampleOrderCustomNV & setSampleCount( uint32_t sampleCount_ ) VULKAN_HPP_NOEXCEPT { sampleCount = sampleCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 CoarseSampleOrderCustomNV & setSampleLocationCount( uint32_t sampleLocationCount_ ) VULKAN_HPP_NOEXCEPT { sampleLocationCount = sampleLocationCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 CoarseSampleOrderCustomNV & setPSampleLocations( const VULKAN_HPP_NAMESPACE::CoarseSampleLocationNV * pSampleLocations_ ) VULKAN_HPP_NOEXCEPT { pSampleLocations = pSampleLocations_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) CoarseSampleOrderCustomNV & setSampleLocations( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & sampleLocations_ ) VULKAN_HPP_NOEXCEPT { sampleLocationCount = static_cast( sampleLocations_.size() ); pSampleLocations = sampleLocations_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkCoarseSampleOrderCustomNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkCoarseSampleOrderCustomNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( shadingRate, sampleCount, sampleLocationCount, pSampleLocations ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( CoarseSampleOrderCustomNV const & ) const = default; #else bool operator==( CoarseSampleOrderCustomNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( shadingRate == rhs.shadingRate ) && ( sampleCount == rhs.sampleCount ) && ( sampleLocationCount == rhs.sampleLocationCount ) && ( pSampleLocations == rhs.pSampleLocations ); # endif } bool operator!=( CoarseSampleOrderCustomNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::ShadingRatePaletteEntryNV shadingRate = VULKAN_HPP_NAMESPACE::ShadingRatePaletteEntryNV::eNoInvocations; uint32_t sampleCount = {}; uint32_t sampleLocationCount = {}; const VULKAN_HPP_NAMESPACE::CoarseSampleLocationNV * pSampleLocations = {}; }; struct ColorBlendAdvancedEXT { using NativeType = VkColorBlendAdvancedEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ColorBlendAdvancedEXT( VULKAN_HPP_NAMESPACE::BlendOp advancedBlendOp_ = VULKAN_HPP_NAMESPACE::BlendOp::eAdd, VULKAN_HPP_NAMESPACE::Bool32 srcPremultiplied_ = {}, VULKAN_HPP_NAMESPACE::Bool32 dstPremultiplied_ = {}, VULKAN_HPP_NAMESPACE::BlendOverlapEXT blendOverlap_ = VULKAN_HPP_NAMESPACE::BlendOverlapEXT::eUncorrelated, VULKAN_HPP_NAMESPACE::Bool32 clampResults_ = {} ) VULKAN_HPP_NOEXCEPT : advancedBlendOp{ advancedBlendOp_ } , srcPremultiplied{ srcPremultiplied_ } , dstPremultiplied{ dstPremultiplied_ } , blendOverlap{ blendOverlap_ } , clampResults{ clampResults_ } { } VULKAN_HPP_CONSTEXPR ColorBlendAdvancedEXT( ColorBlendAdvancedEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; ColorBlendAdvancedEXT( VkColorBlendAdvancedEXT const & rhs ) VULKAN_HPP_NOEXCEPT : ColorBlendAdvancedEXT( *reinterpret_cast( &rhs ) ) { } ColorBlendAdvancedEXT & operator=( ColorBlendAdvancedEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ColorBlendAdvancedEXT & operator=( VkColorBlendAdvancedEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ColorBlendAdvancedEXT & setAdvancedBlendOp( VULKAN_HPP_NAMESPACE::BlendOp advancedBlendOp_ ) VULKAN_HPP_NOEXCEPT { advancedBlendOp = advancedBlendOp_; return *this; } VULKAN_HPP_CONSTEXPR_14 ColorBlendAdvancedEXT & setSrcPremultiplied( VULKAN_HPP_NAMESPACE::Bool32 srcPremultiplied_ ) VULKAN_HPP_NOEXCEPT { srcPremultiplied = srcPremultiplied_; return *this; } VULKAN_HPP_CONSTEXPR_14 ColorBlendAdvancedEXT & setDstPremultiplied( VULKAN_HPP_NAMESPACE::Bool32 dstPremultiplied_ ) VULKAN_HPP_NOEXCEPT { dstPremultiplied = dstPremultiplied_; return *this; } VULKAN_HPP_CONSTEXPR_14 ColorBlendAdvancedEXT & setBlendOverlap( VULKAN_HPP_NAMESPACE::BlendOverlapEXT blendOverlap_ ) VULKAN_HPP_NOEXCEPT { blendOverlap = blendOverlap_; return *this; } VULKAN_HPP_CONSTEXPR_14 ColorBlendAdvancedEXT & setClampResults( VULKAN_HPP_NAMESPACE::Bool32 clampResults_ ) VULKAN_HPP_NOEXCEPT { clampResults = clampResults_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkColorBlendAdvancedEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkColorBlendAdvancedEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( advancedBlendOp, srcPremultiplied, dstPremultiplied, blendOverlap, clampResults ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ColorBlendAdvancedEXT const & ) const = default; #else bool operator==( ColorBlendAdvancedEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( advancedBlendOp == rhs.advancedBlendOp ) && ( srcPremultiplied == rhs.srcPremultiplied ) && ( dstPremultiplied == rhs.dstPremultiplied ) && ( blendOverlap == rhs.blendOverlap ) && ( clampResults == rhs.clampResults ); # endif } bool operator!=( ColorBlendAdvancedEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::BlendOp advancedBlendOp = VULKAN_HPP_NAMESPACE::BlendOp::eAdd; VULKAN_HPP_NAMESPACE::Bool32 srcPremultiplied = {}; VULKAN_HPP_NAMESPACE::Bool32 dstPremultiplied = {}; VULKAN_HPP_NAMESPACE::BlendOverlapEXT blendOverlap = VULKAN_HPP_NAMESPACE::BlendOverlapEXT::eUncorrelated; VULKAN_HPP_NAMESPACE::Bool32 clampResults = {}; }; struct ColorBlendEquationEXT { using NativeType = VkColorBlendEquationEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ColorBlendEquationEXT( VULKAN_HPP_NAMESPACE::BlendFactor srcColorBlendFactor_ = VULKAN_HPP_NAMESPACE::BlendFactor::eZero, VULKAN_HPP_NAMESPACE::BlendFactor dstColorBlendFactor_ = VULKAN_HPP_NAMESPACE::BlendFactor::eZero, VULKAN_HPP_NAMESPACE::BlendOp colorBlendOp_ = VULKAN_HPP_NAMESPACE::BlendOp::eAdd, VULKAN_HPP_NAMESPACE::BlendFactor srcAlphaBlendFactor_ = VULKAN_HPP_NAMESPACE::BlendFactor::eZero, VULKAN_HPP_NAMESPACE::BlendFactor dstAlphaBlendFactor_ = VULKAN_HPP_NAMESPACE::BlendFactor::eZero, VULKAN_HPP_NAMESPACE::BlendOp alphaBlendOp_ = VULKAN_HPP_NAMESPACE::BlendOp::eAdd ) VULKAN_HPP_NOEXCEPT : srcColorBlendFactor{ srcColorBlendFactor_ } , dstColorBlendFactor{ dstColorBlendFactor_ } , colorBlendOp{ colorBlendOp_ } , srcAlphaBlendFactor{ srcAlphaBlendFactor_ } , dstAlphaBlendFactor{ dstAlphaBlendFactor_ } , alphaBlendOp{ alphaBlendOp_ } { } VULKAN_HPP_CONSTEXPR ColorBlendEquationEXT( ColorBlendEquationEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; ColorBlendEquationEXT( VkColorBlendEquationEXT const & rhs ) VULKAN_HPP_NOEXCEPT : ColorBlendEquationEXT( *reinterpret_cast( &rhs ) ) { } ColorBlendEquationEXT & operator=( ColorBlendEquationEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ColorBlendEquationEXT & operator=( VkColorBlendEquationEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ColorBlendEquationEXT & setSrcColorBlendFactor( VULKAN_HPP_NAMESPACE::BlendFactor srcColorBlendFactor_ ) VULKAN_HPP_NOEXCEPT { srcColorBlendFactor = srcColorBlendFactor_; return *this; } VULKAN_HPP_CONSTEXPR_14 ColorBlendEquationEXT & setDstColorBlendFactor( VULKAN_HPP_NAMESPACE::BlendFactor dstColorBlendFactor_ ) VULKAN_HPP_NOEXCEPT { dstColorBlendFactor = dstColorBlendFactor_; return *this; } VULKAN_HPP_CONSTEXPR_14 ColorBlendEquationEXT & setColorBlendOp( VULKAN_HPP_NAMESPACE::BlendOp colorBlendOp_ ) VULKAN_HPP_NOEXCEPT { colorBlendOp = colorBlendOp_; return *this; } VULKAN_HPP_CONSTEXPR_14 ColorBlendEquationEXT & setSrcAlphaBlendFactor( VULKAN_HPP_NAMESPACE::BlendFactor srcAlphaBlendFactor_ ) VULKAN_HPP_NOEXCEPT { srcAlphaBlendFactor = srcAlphaBlendFactor_; return *this; } VULKAN_HPP_CONSTEXPR_14 ColorBlendEquationEXT & setDstAlphaBlendFactor( VULKAN_HPP_NAMESPACE::BlendFactor dstAlphaBlendFactor_ ) VULKAN_HPP_NOEXCEPT { dstAlphaBlendFactor = dstAlphaBlendFactor_; return *this; } VULKAN_HPP_CONSTEXPR_14 ColorBlendEquationEXT & setAlphaBlendOp( VULKAN_HPP_NAMESPACE::BlendOp alphaBlendOp_ ) VULKAN_HPP_NOEXCEPT { alphaBlendOp = alphaBlendOp_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkColorBlendEquationEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkColorBlendEquationEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( srcColorBlendFactor, dstColorBlendFactor, colorBlendOp, srcAlphaBlendFactor, dstAlphaBlendFactor, alphaBlendOp ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ColorBlendEquationEXT const & ) const = default; #else bool operator==( ColorBlendEquationEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( srcColorBlendFactor == rhs.srcColorBlendFactor ) && ( dstColorBlendFactor == rhs.dstColorBlendFactor ) && ( colorBlendOp == rhs.colorBlendOp ) && ( srcAlphaBlendFactor == rhs.srcAlphaBlendFactor ) && ( dstAlphaBlendFactor == rhs.dstAlphaBlendFactor ) && ( alphaBlendOp == rhs.alphaBlendOp ); # endif } bool operator!=( ColorBlendEquationEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::BlendFactor srcColorBlendFactor = VULKAN_HPP_NAMESPACE::BlendFactor::eZero; VULKAN_HPP_NAMESPACE::BlendFactor dstColorBlendFactor = VULKAN_HPP_NAMESPACE::BlendFactor::eZero; VULKAN_HPP_NAMESPACE::BlendOp colorBlendOp = VULKAN_HPP_NAMESPACE::BlendOp::eAdd; VULKAN_HPP_NAMESPACE::BlendFactor srcAlphaBlendFactor = VULKAN_HPP_NAMESPACE::BlendFactor::eZero; VULKAN_HPP_NAMESPACE::BlendFactor dstAlphaBlendFactor = VULKAN_HPP_NAMESPACE::BlendFactor::eZero; VULKAN_HPP_NAMESPACE::BlendOp alphaBlendOp = VULKAN_HPP_NAMESPACE::BlendOp::eAdd; }; struct CommandBufferAllocateInfo { using NativeType = VkCommandBufferAllocateInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eCommandBufferAllocateInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR CommandBufferAllocateInfo( VULKAN_HPP_NAMESPACE::CommandPool commandPool_ = {}, VULKAN_HPP_NAMESPACE::CommandBufferLevel level_ = VULKAN_HPP_NAMESPACE::CommandBufferLevel::ePrimary, uint32_t commandBufferCount_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , commandPool{ commandPool_ } , level{ level_ } , commandBufferCount{ commandBufferCount_ } { } VULKAN_HPP_CONSTEXPR CommandBufferAllocateInfo( CommandBufferAllocateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; CommandBufferAllocateInfo( VkCommandBufferAllocateInfo const & rhs ) VULKAN_HPP_NOEXCEPT : CommandBufferAllocateInfo( *reinterpret_cast( &rhs ) ) { } CommandBufferAllocateInfo & operator=( CommandBufferAllocateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ CommandBufferAllocateInfo & operator=( VkCommandBufferAllocateInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 CommandBufferAllocateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 CommandBufferAllocateInfo & setCommandPool( VULKAN_HPP_NAMESPACE::CommandPool commandPool_ ) VULKAN_HPP_NOEXCEPT { commandPool = commandPool_; return *this; } VULKAN_HPP_CONSTEXPR_14 CommandBufferAllocateInfo & setLevel( VULKAN_HPP_NAMESPACE::CommandBufferLevel level_ ) VULKAN_HPP_NOEXCEPT { level = level_; return *this; } VULKAN_HPP_CONSTEXPR_14 CommandBufferAllocateInfo & setCommandBufferCount( uint32_t commandBufferCount_ ) VULKAN_HPP_NOEXCEPT { commandBufferCount = commandBufferCount_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkCommandBufferAllocateInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkCommandBufferAllocateInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, commandPool, level, commandBufferCount ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( CommandBufferAllocateInfo const & ) const = default; #else bool operator==( CommandBufferAllocateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( commandPool == rhs.commandPool ) && ( level == rhs.level ) && ( commandBufferCount == rhs.commandBufferCount ); # endif } bool operator!=( CommandBufferAllocateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eCommandBufferAllocateInfo; const void * pNext = {}; VULKAN_HPP_NAMESPACE::CommandPool commandPool = {}; VULKAN_HPP_NAMESPACE::CommandBufferLevel level = VULKAN_HPP_NAMESPACE::CommandBufferLevel::ePrimary; uint32_t commandBufferCount = {}; }; template <> struct CppType { using Type = CommandBufferAllocateInfo; }; struct CommandBufferInheritanceInfo { using NativeType = VkCommandBufferInheritanceInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eCommandBufferInheritanceInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR CommandBufferInheritanceInfo( VULKAN_HPP_NAMESPACE::RenderPass renderPass_ = {}, uint32_t subpass_ = {}, VULKAN_HPP_NAMESPACE::Framebuffer framebuffer_ = {}, VULKAN_HPP_NAMESPACE::Bool32 occlusionQueryEnable_ = {}, VULKAN_HPP_NAMESPACE::QueryControlFlags queryFlags_ = {}, VULKAN_HPP_NAMESPACE::QueryPipelineStatisticFlags pipelineStatistics_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , renderPass{ renderPass_ } , subpass{ subpass_ } , framebuffer{ framebuffer_ } , occlusionQueryEnable{ occlusionQueryEnable_ } , queryFlags{ queryFlags_ } , pipelineStatistics{ pipelineStatistics_ } { } VULKAN_HPP_CONSTEXPR CommandBufferInheritanceInfo( CommandBufferInheritanceInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; CommandBufferInheritanceInfo( VkCommandBufferInheritanceInfo const & rhs ) VULKAN_HPP_NOEXCEPT : CommandBufferInheritanceInfo( *reinterpret_cast( &rhs ) ) { } CommandBufferInheritanceInfo & operator=( CommandBufferInheritanceInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ CommandBufferInheritanceInfo & operator=( VkCommandBufferInheritanceInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 CommandBufferInheritanceInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 CommandBufferInheritanceInfo & setRenderPass( VULKAN_HPP_NAMESPACE::RenderPass renderPass_ ) VULKAN_HPP_NOEXCEPT { renderPass = renderPass_; return *this; } VULKAN_HPP_CONSTEXPR_14 CommandBufferInheritanceInfo & setSubpass( uint32_t subpass_ ) VULKAN_HPP_NOEXCEPT { subpass = subpass_; return *this; } VULKAN_HPP_CONSTEXPR_14 CommandBufferInheritanceInfo & setFramebuffer( VULKAN_HPP_NAMESPACE::Framebuffer framebuffer_ ) VULKAN_HPP_NOEXCEPT { framebuffer = framebuffer_; return *this; } VULKAN_HPP_CONSTEXPR_14 CommandBufferInheritanceInfo & setOcclusionQueryEnable( VULKAN_HPP_NAMESPACE::Bool32 occlusionQueryEnable_ ) VULKAN_HPP_NOEXCEPT { occlusionQueryEnable = occlusionQueryEnable_; return *this; } VULKAN_HPP_CONSTEXPR_14 CommandBufferInheritanceInfo & setQueryFlags( VULKAN_HPP_NAMESPACE::QueryControlFlags queryFlags_ ) VULKAN_HPP_NOEXCEPT { queryFlags = queryFlags_; return *this; } VULKAN_HPP_CONSTEXPR_14 CommandBufferInheritanceInfo & setPipelineStatistics( VULKAN_HPP_NAMESPACE::QueryPipelineStatisticFlags pipelineStatistics_ ) VULKAN_HPP_NOEXCEPT { pipelineStatistics = pipelineStatistics_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkCommandBufferInheritanceInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkCommandBufferInheritanceInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, renderPass, subpass, framebuffer, occlusionQueryEnable, queryFlags, pipelineStatistics ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( CommandBufferInheritanceInfo const & ) const = default; #else bool operator==( CommandBufferInheritanceInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( renderPass == rhs.renderPass ) && ( subpass == rhs.subpass ) && ( framebuffer == rhs.framebuffer ) && ( occlusionQueryEnable == rhs.occlusionQueryEnable ) && ( queryFlags == rhs.queryFlags ) && ( pipelineStatistics == rhs.pipelineStatistics ); # endif } bool operator!=( CommandBufferInheritanceInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eCommandBufferInheritanceInfo; const void * pNext = {}; VULKAN_HPP_NAMESPACE::RenderPass renderPass = {}; uint32_t subpass = {}; VULKAN_HPP_NAMESPACE::Framebuffer framebuffer = {}; VULKAN_HPP_NAMESPACE::Bool32 occlusionQueryEnable = {}; VULKAN_HPP_NAMESPACE::QueryControlFlags queryFlags = {}; VULKAN_HPP_NAMESPACE::QueryPipelineStatisticFlags pipelineStatistics = {}; }; template <> struct CppType { using Type = CommandBufferInheritanceInfo; }; struct CommandBufferBeginInfo { using NativeType = VkCommandBufferBeginInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eCommandBufferBeginInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR CommandBufferBeginInfo( VULKAN_HPP_NAMESPACE::CommandBufferUsageFlags flags_ = {}, const VULKAN_HPP_NAMESPACE::CommandBufferInheritanceInfo * pInheritanceInfo_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , pInheritanceInfo{ pInheritanceInfo_ } { } VULKAN_HPP_CONSTEXPR CommandBufferBeginInfo( CommandBufferBeginInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; CommandBufferBeginInfo( VkCommandBufferBeginInfo const & rhs ) VULKAN_HPP_NOEXCEPT : CommandBufferBeginInfo( *reinterpret_cast( &rhs ) ) { } CommandBufferBeginInfo & operator=( CommandBufferBeginInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ CommandBufferBeginInfo & operator=( VkCommandBufferBeginInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 CommandBufferBeginInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 CommandBufferBeginInfo & setFlags( VULKAN_HPP_NAMESPACE::CommandBufferUsageFlags flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 CommandBufferBeginInfo & setPInheritanceInfo( const VULKAN_HPP_NAMESPACE::CommandBufferInheritanceInfo * pInheritanceInfo_ ) VULKAN_HPP_NOEXCEPT { pInheritanceInfo = pInheritanceInfo_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkCommandBufferBeginInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkCommandBufferBeginInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, pInheritanceInfo ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( CommandBufferBeginInfo const & ) const = default; #else bool operator==( CommandBufferBeginInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( pInheritanceInfo == rhs.pInheritanceInfo ); # endif } bool operator!=( CommandBufferBeginInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eCommandBufferBeginInfo; const void * pNext = {}; VULKAN_HPP_NAMESPACE::CommandBufferUsageFlags flags = {}; const VULKAN_HPP_NAMESPACE::CommandBufferInheritanceInfo * pInheritanceInfo = {}; }; template <> struct CppType { using Type = CommandBufferBeginInfo; }; struct CommandBufferInheritanceConditionalRenderingInfoEXT { using NativeType = VkCommandBufferInheritanceConditionalRenderingInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eCommandBufferInheritanceConditionalRenderingInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR CommandBufferInheritanceConditionalRenderingInfoEXT( VULKAN_HPP_NAMESPACE::Bool32 conditionalRenderingEnable_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , conditionalRenderingEnable{ conditionalRenderingEnable_ } { } VULKAN_HPP_CONSTEXPR CommandBufferInheritanceConditionalRenderingInfoEXT( CommandBufferInheritanceConditionalRenderingInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; CommandBufferInheritanceConditionalRenderingInfoEXT( VkCommandBufferInheritanceConditionalRenderingInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : CommandBufferInheritanceConditionalRenderingInfoEXT( *reinterpret_cast( &rhs ) ) { } CommandBufferInheritanceConditionalRenderingInfoEXT & operator=( CommandBufferInheritanceConditionalRenderingInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ CommandBufferInheritanceConditionalRenderingInfoEXT & operator=( VkCommandBufferInheritanceConditionalRenderingInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 CommandBufferInheritanceConditionalRenderingInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 CommandBufferInheritanceConditionalRenderingInfoEXT & setConditionalRenderingEnable( VULKAN_HPP_NAMESPACE::Bool32 conditionalRenderingEnable_ ) VULKAN_HPP_NOEXCEPT { conditionalRenderingEnable = conditionalRenderingEnable_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkCommandBufferInheritanceConditionalRenderingInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkCommandBufferInheritanceConditionalRenderingInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, conditionalRenderingEnable ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( CommandBufferInheritanceConditionalRenderingInfoEXT const & ) const = default; #else bool operator==( CommandBufferInheritanceConditionalRenderingInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( conditionalRenderingEnable == rhs.conditionalRenderingEnable ); # endif } bool operator!=( CommandBufferInheritanceConditionalRenderingInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eCommandBufferInheritanceConditionalRenderingInfoEXT; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 conditionalRenderingEnable = {}; }; template <> struct CppType { using Type = CommandBufferInheritanceConditionalRenderingInfoEXT; }; struct CommandBufferInheritanceRenderPassTransformInfoQCOM { using NativeType = VkCommandBufferInheritanceRenderPassTransformInfoQCOM; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eCommandBufferInheritanceRenderPassTransformInfoQCOM; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR CommandBufferInheritanceRenderPassTransformInfoQCOM( VULKAN_HPP_NAMESPACE::SurfaceTransformFlagBitsKHR transform_ = VULKAN_HPP_NAMESPACE::SurfaceTransformFlagBitsKHR::eIdentity, VULKAN_HPP_NAMESPACE::Rect2D renderArea_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , transform{ transform_ } , renderArea{ renderArea_ } { } VULKAN_HPP_CONSTEXPR CommandBufferInheritanceRenderPassTransformInfoQCOM( CommandBufferInheritanceRenderPassTransformInfoQCOM const & rhs ) VULKAN_HPP_NOEXCEPT = default; CommandBufferInheritanceRenderPassTransformInfoQCOM( VkCommandBufferInheritanceRenderPassTransformInfoQCOM const & rhs ) VULKAN_HPP_NOEXCEPT : CommandBufferInheritanceRenderPassTransformInfoQCOM( *reinterpret_cast( &rhs ) ) { } CommandBufferInheritanceRenderPassTransformInfoQCOM & operator=( CommandBufferInheritanceRenderPassTransformInfoQCOM const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ CommandBufferInheritanceRenderPassTransformInfoQCOM & operator=( VkCommandBufferInheritanceRenderPassTransformInfoQCOM const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 CommandBufferInheritanceRenderPassTransformInfoQCOM & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 CommandBufferInheritanceRenderPassTransformInfoQCOM & setTransform( VULKAN_HPP_NAMESPACE::SurfaceTransformFlagBitsKHR transform_ ) VULKAN_HPP_NOEXCEPT { transform = transform_; return *this; } VULKAN_HPP_CONSTEXPR_14 CommandBufferInheritanceRenderPassTransformInfoQCOM & setRenderArea( VULKAN_HPP_NAMESPACE::Rect2D const & renderArea_ ) VULKAN_HPP_NOEXCEPT { renderArea = renderArea_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkCommandBufferInheritanceRenderPassTransformInfoQCOM const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkCommandBufferInheritanceRenderPassTransformInfoQCOM &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, transform, renderArea ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( CommandBufferInheritanceRenderPassTransformInfoQCOM const & ) const = default; #else bool operator==( CommandBufferInheritanceRenderPassTransformInfoQCOM const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( transform == rhs.transform ) && ( renderArea == rhs.renderArea ); # endif } bool operator!=( CommandBufferInheritanceRenderPassTransformInfoQCOM const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eCommandBufferInheritanceRenderPassTransformInfoQCOM; void * pNext = {}; VULKAN_HPP_NAMESPACE::SurfaceTransformFlagBitsKHR transform = VULKAN_HPP_NAMESPACE::SurfaceTransformFlagBitsKHR::eIdentity; VULKAN_HPP_NAMESPACE::Rect2D renderArea = {}; }; template <> struct CppType { using Type = CommandBufferInheritanceRenderPassTransformInfoQCOM; }; struct CommandBufferInheritanceRenderingInfo { using NativeType = VkCommandBufferInheritanceRenderingInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eCommandBufferInheritanceRenderingInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR CommandBufferInheritanceRenderingInfo( VULKAN_HPP_NAMESPACE::RenderingFlags flags_ = {}, uint32_t viewMask_ = {}, uint32_t colorAttachmentCount_ = {}, const VULKAN_HPP_NAMESPACE::Format * pColorAttachmentFormats_ = {}, VULKAN_HPP_NAMESPACE::Format depthAttachmentFormat_ = VULKAN_HPP_NAMESPACE::Format::eUndefined, VULKAN_HPP_NAMESPACE::Format stencilAttachmentFormat_ = VULKAN_HPP_NAMESPACE::Format::eUndefined, VULKAN_HPP_NAMESPACE::SampleCountFlagBits rasterizationSamples_ = VULKAN_HPP_NAMESPACE::SampleCountFlagBits::e1, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , viewMask{ viewMask_ } , colorAttachmentCount{ colorAttachmentCount_ } , pColorAttachmentFormats{ pColorAttachmentFormats_ } , depthAttachmentFormat{ depthAttachmentFormat_ } , stencilAttachmentFormat{ stencilAttachmentFormat_ } , rasterizationSamples{ rasterizationSamples_ } { } VULKAN_HPP_CONSTEXPR CommandBufferInheritanceRenderingInfo( CommandBufferInheritanceRenderingInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; CommandBufferInheritanceRenderingInfo( VkCommandBufferInheritanceRenderingInfo const & rhs ) VULKAN_HPP_NOEXCEPT : CommandBufferInheritanceRenderingInfo( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) CommandBufferInheritanceRenderingInfo( VULKAN_HPP_NAMESPACE::RenderingFlags flags_, uint32_t viewMask_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & colorAttachmentFormats_, VULKAN_HPP_NAMESPACE::Format depthAttachmentFormat_ = VULKAN_HPP_NAMESPACE::Format::eUndefined, VULKAN_HPP_NAMESPACE::Format stencilAttachmentFormat_ = VULKAN_HPP_NAMESPACE::Format::eUndefined, VULKAN_HPP_NAMESPACE::SampleCountFlagBits rasterizationSamples_ = VULKAN_HPP_NAMESPACE::SampleCountFlagBits::e1, const void * pNext_ = nullptr ) : pNext( pNext_ ) , flags( flags_ ) , viewMask( viewMask_ ) , colorAttachmentCount( static_cast( colorAttachmentFormats_.size() ) ) , pColorAttachmentFormats( colorAttachmentFormats_.data() ) , depthAttachmentFormat( depthAttachmentFormat_ ) , stencilAttachmentFormat( stencilAttachmentFormat_ ) , rasterizationSamples( rasterizationSamples_ ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ CommandBufferInheritanceRenderingInfo & operator=( CommandBufferInheritanceRenderingInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ CommandBufferInheritanceRenderingInfo & operator=( VkCommandBufferInheritanceRenderingInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 CommandBufferInheritanceRenderingInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 CommandBufferInheritanceRenderingInfo & setFlags( VULKAN_HPP_NAMESPACE::RenderingFlags flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 CommandBufferInheritanceRenderingInfo & setViewMask( uint32_t viewMask_ ) VULKAN_HPP_NOEXCEPT { viewMask = viewMask_; return *this; } VULKAN_HPP_CONSTEXPR_14 CommandBufferInheritanceRenderingInfo & setColorAttachmentCount( uint32_t colorAttachmentCount_ ) VULKAN_HPP_NOEXCEPT { colorAttachmentCount = colorAttachmentCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 CommandBufferInheritanceRenderingInfo & setPColorAttachmentFormats( const VULKAN_HPP_NAMESPACE::Format * pColorAttachmentFormats_ ) VULKAN_HPP_NOEXCEPT { pColorAttachmentFormats = pColorAttachmentFormats_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) CommandBufferInheritanceRenderingInfo & setColorAttachmentFormats( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & colorAttachmentFormats_ ) VULKAN_HPP_NOEXCEPT { colorAttachmentCount = static_cast( colorAttachmentFormats_.size() ); pColorAttachmentFormats = colorAttachmentFormats_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 CommandBufferInheritanceRenderingInfo & setDepthAttachmentFormat( VULKAN_HPP_NAMESPACE::Format depthAttachmentFormat_ ) VULKAN_HPP_NOEXCEPT { depthAttachmentFormat = depthAttachmentFormat_; return *this; } VULKAN_HPP_CONSTEXPR_14 CommandBufferInheritanceRenderingInfo & setStencilAttachmentFormat( VULKAN_HPP_NAMESPACE::Format stencilAttachmentFormat_ ) VULKAN_HPP_NOEXCEPT { stencilAttachmentFormat = stencilAttachmentFormat_; return *this; } VULKAN_HPP_CONSTEXPR_14 CommandBufferInheritanceRenderingInfo & setRasterizationSamples( VULKAN_HPP_NAMESPACE::SampleCountFlagBits rasterizationSamples_ ) VULKAN_HPP_NOEXCEPT { rasterizationSamples = rasterizationSamples_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkCommandBufferInheritanceRenderingInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkCommandBufferInheritanceRenderingInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, viewMask, colorAttachmentCount, pColorAttachmentFormats, depthAttachmentFormat, stencilAttachmentFormat, rasterizationSamples ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( CommandBufferInheritanceRenderingInfo const & ) const = default; #else bool operator==( CommandBufferInheritanceRenderingInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( viewMask == rhs.viewMask ) && ( colorAttachmentCount == rhs.colorAttachmentCount ) && ( pColorAttachmentFormats == rhs.pColorAttachmentFormats ) && ( depthAttachmentFormat == rhs.depthAttachmentFormat ) && ( stencilAttachmentFormat == rhs.stencilAttachmentFormat ) && ( rasterizationSamples == rhs.rasterizationSamples ); # endif } bool operator!=( CommandBufferInheritanceRenderingInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eCommandBufferInheritanceRenderingInfo; const void * pNext = {}; VULKAN_HPP_NAMESPACE::RenderingFlags flags = {}; uint32_t viewMask = {}; uint32_t colorAttachmentCount = {}; const VULKAN_HPP_NAMESPACE::Format * pColorAttachmentFormats = {}; VULKAN_HPP_NAMESPACE::Format depthAttachmentFormat = VULKAN_HPP_NAMESPACE::Format::eUndefined; VULKAN_HPP_NAMESPACE::Format stencilAttachmentFormat = VULKAN_HPP_NAMESPACE::Format::eUndefined; VULKAN_HPP_NAMESPACE::SampleCountFlagBits rasterizationSamples = VULKAN_HPP_NAMESPACE::SampleCountFlagBits::e1; }; template <> struct CppType { using Type = CommandBufferInheritanceRenderingInfo; }; using CommandBufferInheritanceRenderingInfoKHR = CommandBufferInheritanceRenderingInfo; struct Viewport { using NativeType = VkViewport; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR Viewport( float x_ = {}, float y_ = {}, float width_ = {}, float height_ = {}, float minDepth_ = {}, float maxDepth_ = {} ) VULKAN_HPP_NOEXCEPT : x{ x_ } , y{ y_ } , width{ width_ } , height{ height_ } , minDepth{ minDepth_ } , maxDepth{ maxDepth_ } { } VULKAN_HPP_CONSTEXPR Viewport( Viewport const & rhs ) VULKAN_HPP_NOEXCEPT = default; Viewport( VkViewport const & rhs ) VULKAN_HPP_NOEXCEPT : Viewport( *reinterpret_cast( &rhs ) ) {} Viewport & operator=( Viewport const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ Viewport & operator=( VkViewport const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 Viewport & setX( float x_ ) VULKAN_HPP_NOEXCEPT { x = x_; return *this; } VULKAN_HPP_CONSTEXPR_14 Viewport & setY( float y_ ) VULKAN_HPP_NOEXCEPT { y = y_; return *this; } VULKAN_HPP_CONSTEXPR_14 Viewport & setWidth( float width_ ) VULKAN_HPP_NOEXCEPT { width = width_; return *this; } VULKAN_HPP_CONSTEXPR_14 Viewport & setHeight( float height_ ) VULKAN_HPP_NOEXCEPT { height = height_; return *this; } VULKAN_HPP_CONSTEXPR_14 Viewport & setMinDepth( float minDepth_ ) VULKAN_HPP_NOEXCEPT { minDepth = minDepth_; return *this; } VULKAN_HPP_CONSTEXPR_14 Viewport & setMaxDepth( float maxDepth_ ) VULKAN_HPP_NOEXCEPT { maxDepth = maxDepth_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkViewport const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkViewport &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( x, y, width, height, minDepth, maxDepth ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( Viewport const & ) const = default; #else bool operator==( Viewport const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( x == rhs.x ) && ( y == rhs.y ) && ( width == rhs.width ) && ( height == rhs.height ) && ( minDepth == rhs.minDepth ) && ( maxDepth == rhs.maxDepth ); # endif } bool operator!=( Viewport const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: float x = {}; float y = {}; float width = {}; float height = {}; float minDepth = {}; float maxDepth = {}; }; struct CommandBufferInheritanceViewportScissorInfoNV { using NativeType = VkCommandBufferInheritanceViewportScissorInfoNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eCommandBufferInheritanceViewportScissorInfoNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR CommandBufferInheritanceViewportScissorInfoNV( VULKAN_HPP_NAMESPACE::Bool32 viewportScissor2D_ = {}, uint32_t viewportDepthCount_ = {}, const VULKAN_HPP_NAMESPACE::Viewport * pViewportDepths_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , viewportScissor2D{ viewportScissor2D_ } , viewportDepthCount{ viewportDepthCount_ } , pViewportDepths{ pViewportDepths_ } { } VULKAN_HPP_CONSTEXPR CommandBufferInheritanceViewportScissorInfoNV( CommandBufferInheritanceViewportScissorInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; CommandBufferInheritanceViewportScissorInfoNV( VkCommandBufferInheritanceViewportScissorInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT : CommandBufferInheritanceViewportScissorInfoNV( *reinterpret_cast( &rhs ) ) { } CommandBufferInheritanceViewportScissorInfoNV & operator=( CommandBufferInheritanceViewportScissorInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ CommandBufferInheritanceViewportScissorInfoNV & operator=( VkCommandBufferInheritanceViewportScissorInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 CommandBufferInheritanceViewportScissorInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 CommandBufferInheritanceViewportScissorInfoNV & setViewportScissor2D( VULKAN_HPP_NAMESPACE::Bool32 viewportScissor2D_ ) VULKAN_HPP_NOEXCEPT { viewportScissor2D = viewportScissor2D_; return *this; } VULKAN_HPP_CONSTEXPR_14 CommandBufferInheritanceViewportScissorInfoNV & setViewportDepthCount( uint32_t viewportDepthCount_ ) VULKAN_HPP_NOEXCEPT { viewportDepthCount = viewportDepthCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 CommandBufferInheritanceViewportScissorInfoNV & setPViewportDepths( const VULKAN_HPP_NAMESPACE::Viewport * pViewportDepths_ ) VULKAN_HPP_NOEXCEPT { pViewportDepths = pViewportDepths_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkCommandBufferInheritanceViewportScissorInfoNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkCommandBufferInheritanceViewportScissorInfoNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, viewportScissor2D, viewportDepthCount, pViewportDepths ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( CommandBufferInheritanceViewportScissorInfoNV const & ) const = default; #else bool operator==( CommandBufferInheritanceViewportScissorInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( viewportScissor2D == rhs.viewportScissor2D ) && ( viewportDepthCount == rhs.viewportDepthCount ) && ( pViewportDepths == rhs.pViewportDepths ); # endif } bool operator!=( CommandBufferInheritanceViewportScissorInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eCommandBufferInheritanceViewportScissorInfoNV; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 viewportScissor2D = {}; uint32_t viewportDepthCount = {}; const VULKAN_HPP_NAMESPACE::Viewport * pViewportDepths = {}; }; template <> struct CppType { using Type = CommandBufferInheritanceViewportScissorInfoNV; }; struct CommandBufferSubmitInfo { using NativeType = VkCommandBufferSubmitInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eCommandBufferSubmitInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR CommandBufferSubmitInfo( VULKAN_HPP_NAMESPACE::CommandBuffer commandBuffer_ = {}, uint32_t deviceMask_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , commandBuffer{ commandBuffer_ } , deviceMask{ deviceMask_ } { } VULKAN_HPP_CONSTEXPR CommandBufferSubmitInfo( CommandBufferSubmitInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; CommandBufferSubmitInfo( VkCommandBufferSubmitInfo const & rhs ) VULKAN_HPP_NOEXCEPT : CommandBufferSubmitInfo( *reinterpret_cast( &rhs ) ) { } CommandBufferSubmitInfo & operator=( CommandBufferSubmitInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ CommandBufferSubmitInfo & operator=( VkCommandBufferSubmitInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 CommandBufferSubmitInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 CommandBufferSubmitInfo & setCommandBuffer( VULKAN_HPP_NAMESPACE::CommandBuffer commandBuffer_ ) VULKAN_HPP_NOEXCEPT { commandBuffer = commandBuffer_; return *this; } VULKAN_HPP_CONSTEXPR_14 CommandBufferSubmitInfo & setDeviceMask( uint32_t deviceMask_ ) VULKAN_HPP_NOEXCEPT { deviceMask = deviceMask_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkCommandBufferSubmitInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkCommandBufferSubmitInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, commandBuffer, deviceMask ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( CommandBufferSubmitInfo const & ) const = default; #else bool operator==( CommandBufferSubmitInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( commandBuffer == rhs.commandBuffer ) && ( deviceMask == rhs.deviceMask ); # endif } bool operator!=( CommandBufferSubmitInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eCommandBufferSubmitInfo; const void * pNext = {}; VULKAN_HPP_NAMESPACE::CommandBuffer commandBuffer = {}; uint32_t deviceMask = {}; }; template <> struct CppType { using Type = CommandBufferSubmitInfo; }; using CommandBufferSubmitInfoKHR = CommandBufferSubmitInfo; struct CommandPoolCreateInfo { using NativeType = VkCommandPoolCreateInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eCommandPoolCreateInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR CommandPoolCreateInfo( VULKAN_HPP_NAMESPACE::CommandPoolCreateFlags flags_ = {}, uint32_t queueFamilyIndex_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , queueFamilyIndex{ queueFamilyIndex_ } { } VULKAN_HPP_CONSTEXPR CommandPoolCreateInfo( CommandPoolCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; CommandPoolCreateInfo( VkCommandPoolCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT : CommandPoolCreateInfo( *reinterpret_cast( &rhs ) ) { } CommandPoolCreateInfo & operator=( CommandPoolCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ CommandPoolCreateInfo & operator=( VkCommandPoolCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 CommandPoolCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 CommandPoolCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::CommandPoolCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 CommandPoolCreateInfo & setQueueFamilyIndex( uint32_t queueFamilyIndex_ ) VULKAN_HPP_NOEXCEPT { queueFamilyIndex = queueFamilyIndex_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkCommandPoolCreateInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkCommandPoolCreateInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, queueFamilyIndex ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( CommandPoolCreateInfo const & ) const = default; #else bool operator==( CommandPoolCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( queueFamilyIndex == rhs.queueFamilyIndex ); # endif } bool operator!=( CommandPoolCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eCommandPoolCreateInfo; const void * pNext = {}; VULKAN_HPP_NAMESPACE::CommandPoolCreateFlags flags = {}; uint32_t queueFamilyIndex = {}; }; template <> struct CppType { using Type = CommandPoolCreateInfo; }; struct SpecializationMapEntry { using NativeType = VkSpecializationMapEntry; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR SpecializationMapEntry( uint32_t constantID_ = {}, uint32_t offset_ = {}, size_t size_ = {} ) VULKAN_HPP_NOEXCEPT : constantID{ constantID_ } , offset{ offset_ } , size{ size_ } { } VULKAN_HPP_CONSTEXPR SpecializationMapEntry( SpecializationMapEntry const & rhs ) VULKAN_HPP_NOEXCEPT = default; SpecializationMapEntry( VkSpecializationMapEntry const & rhs ) VULKAN_HPP_NOEXCEPT : SpecializationMapEntry( *reinterpret_cast( &rhs ) ) { } SpecializationMapEntry & operator=( SpecializationMapEntry const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ SpecializationMapEntry & operator=( VkSpecializationMapEntry const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 SpecializationMapEntry & setConstantID( uint32_t constantID_ ) VULKAN_HPP_NOEXCEPT { constantID = constantID_; return *this; } VULKAN_HPP_CONSTEXPR_14 SpecializationMapEntry & setOffset( uint32_t offset_ ) VULKAN_HPP_NOEXCEPT { offset = offset_; return *this; } VULKAN_HPP_CONSTEXPR_14 SpecializationMapEntry & setSize( size_t size_ ) VULKAN_HPP_NOEXCEPT { size = size_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkSpecializationMapEntry const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkSpecializationMapEntry &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( constantID, offset, size ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( SpecializationMapEntry const & ) const = default; #else bool operator==( SpecializationMapEntry const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( constantID == rhs.constantID ) && ( offset == rhs.offset ) && ( size == rhs.size ); # endif } bool operator!=( SpecializationMapEntry const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: uint32_t constantID = {}; uint32_t offset = {}; size_t size = {}; }; struct SpecializationInfo { using NativeType = VkSpecializationInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR SpecializationInfo( uint32_t mapEntryCount_ = {}, const VULKAN_HPP_NAMESPACE::SpecializationMapEntry * pMapEntries_ = {}, size_t dataSize_ = {}, const void * pData_ = {} ) VULKAN_HPP_NOEXCEPT : mapEntryCount{ mapEntryCount_ } , pMapEntries{ pMapEntries_ } , dataSize{ dataSize_ } , pData{ pData_ } { } VULKAN_HPP_CONSTEXPR SpecializationInfo( SpecializationInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; SpecializationInfo( VkSpecializationInfo const & rhs ) VULKAN_HPP_NOEXCEPT : SpecializationInfo( *reinterpret_cast( &rhs ) ) {} # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) template SpecializationInfo( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & mapEntries_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & data_ = {} ) : mapEntryCount( static_cast( mapEntries_.size() ) ) , pMapEntries( mapEntries_.data() ) , dataSize( data_.size() * sizeof( T ) ) , pData( data_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ SpecializationInfo & operator=( SpecializationInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ SpecializationInfo & operator=( VkSpecializationInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 SpecializationInfo & setMapEntryCount( uint32_t mapEntryCount_ ) VULKAN_HPP_NOEXCEPT { mapEntryCount = mapEntryCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 SpecializationInfo & setPMapEntries( const VULKAN_HPP_NAMESPACE::SpecializationMapEntry * pMapEntries_ ) VULKAN_HPP_NOEXCEPT { pMapEntries = pMapEntries_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) SpecializationInfo & setMapEntries( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & mapEntries_ ) VULKAN_HPP_NOEXCEPT { mapEntryCount = static_cast( mapEntries_.size() ); pMapEntries = mapEntries_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 SpecializationInfo & setDataSize( size_t dataSize_ ) VULKAN_HPP_NOEXCEPT { dataSize = dataSize_; return *this; } VULKAN_HPP_CONSTEXPR_14 SpecializationInfo & setPData( const void * pData_ ) VULKAN_HPP_NOEXCEPT { pData = pData_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) template SpecializationInfo & setData( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & data_ ) VULKAN_HPP_NOEXCEPT { dataSize = data_.size() * sizeof( T ); pData = data_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkSpecializationInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkSpecializationInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( mapEntryCount, pMapEntries, dataSize, pData ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( SpecializationInfo const & ) const = default; #else bool operator==( SpecializationInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( mapEntryCount == rhs.mapEntryCount ) && ( pMapEntries == rhs.pMapEntries ) && ( dataSize == rhs.dataSize ) && ( pData == rhs.pData ); # endif } bool operator!=( SpecializationInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: uint32_t mapEntryCount = {}; const VULKAN_HPP_NAMESPACE::SpecializationMapEntry * pMapEntries = {}; size_t dataSize = {}; const void * pData = {}; }; struct PipelineShaderStageCreateInfo { using NativeType = VkPipelineShaderStageCreateInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineShaderStageCreateInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PipelineShaderStageCreateInfo( VULKAN_HPP_NAMESPACE::PipelineShaderStageCreateFlags flags_ = {}, VULKAN_HPP_NAMESPACE::ShaderStageFlagBits stage_ = VULKAN_HPP_NAMESPACE::ShaderStageFlagBits::eVertex, VULKAN_HPP_NAMESPACE::ShaderModule module_ = {}, const char * pName_ = {}, const VULKAN_HPP_NAMESPACE::SpecializationInfo * pSpecializationInfo_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , stage{ stage_ } , module{ module_ } , pName{ pName_ } , pSpecializationInfo{ pSpecializationInfo_ } { } VULKAN_HPP_CONSTEXPR PipelineShaderStageCreateInfo( PipelineShaderStageCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; PipelineShaderStageCreateInfo( VkPipelineShaderStageCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT : PipelineShaderStageCreateInfo( *reinterpret_cast( &rhs ) ) { } PipelineShaderStageCreateInfo & operator=( PipelineShaderStageCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PipelineShaderStageCreateInfo & operator=( VkPipelineShaderStageCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PipelineShaderStageCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineShaderStageCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::PipelineShaderStageCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineShaderStageCreateInfo & setStage( VULKAN_HPP_NAMESPACE::ShaderStageFlagBits stage_ ) VULKAN_HPP_NOEXCEPT { stage = stage_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineShaderStageCreateInfo & setModule( VULKAN_HPP_NAMESPACE::ShaderModule module_ ) VULKAN_HPP_NOEXCEPT { module = module_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineShaderStageCreateInfo & setPName( const char * pName_ ) VULKAN_HPP_NOEXCEPT { pName = pName_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineShaderStageCreateInfo & setPSpecializationInfo( const VULKAN_HPP_NAMESPACE::SpecializationInfo * pSpecializationInfo_ ) VULKAN_HPP_NOEXCEPT { pSpecializationInfo = pSpecializationInfo_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPipelineShaderStageCreateInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPipelineShaderStageCreateInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, stage, module, pName, pSpecializationInfo ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) std::strong_ordering operator<=>( PipelineShaderStageCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { if ( auto cmp = sType <=> rhs.sType; cmp != 0 ) return cmp; if ( auto cmp = pNext <=> rhs.pNext; cmp != 0 ) return cmp; if ( auto cmp = flags <=> rhs.flags; cmp != 0 ) return cmp; if ( auto cmp = stage <=> rhs.stage; cmp != 0 ) return cmp; if ( auto cmp = module <=> rhs.module; cmp != 0 ) return cmp; if ( pName != rhs.pName ) if ( auto cmp = strcmp( pName, rhs.pName ); cmp != 0 ) return ( cmp < 0 ) ? std::strong_ordering::less : std::strong_ordering::greater; if ( auto cmp = pSpecializationInfo <=> rhs.pSpecializationInfo; cmp != 0 ) return cmp; return std::strong_ordering::equivalent; } #endif bool operator==( PipelineShaderStageCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( stage == rhs.stage ) && ( module == rhs.module ) && ( ( pName == rhs.pName ) || ( strcmp( pName, rhs.pName ) == 0 ) ) && ( pSpecializationInfo == rhs.pSpecializationInfo ); } bool operator!=( PipelineShaderStageCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineShaderStageCreateInfo; const void * pNext = {}; VULKAN_HPP_NAMESPACE::PipelineShaderStageCreateFlags flags = {}; VULKAN_HPP_NAMESPACE::ShaderStageFlagBits stage = VULKAN_HPP_NAMESPACE::ShaderStageFlagBits::eVertex; VULKAN_HPP_NAMESPACE::ShaderModule module = {}; const char * pName = {}; const VULKAN_HPP_NAMESPACE::SpecializationInfo * pSpecializationInfo = {}; }; template <> struct CppType { using Type = PipelineShaderStageCreateInfo; }; struct ComputePipelineCreateInfo { using NativeType = VkComputePipelineCreateInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eComputePipelineCreateInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ComputePipelineCreateInfo( VULKAN_HPP_NAMESPACE::PipelineCreateFlags flags_ = {}, VULKAN_HPP_NAMESPACE::PipelineShaderStageCreateInfo stage_ = {}, VULKAN_HPP_NAMESPACE::PipelineLayout layout_ = {}, VULKAN_HPP_NAMESPACE::Pipeline basePipelineHandle_ = {}, int32_t basePipelineIndex_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , stage{ stage_ } , layout{ layout_ } , basePipelineHandle{ basePipelineHandle_ } , basePipelineIndex{ basePipelineIndex_ } { } VULKAN_HPP_CONSTEXPR ComputePipelineCreateInfo( ComputePipelineCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; ComputePipelineCreateInfo( VkComputePipelineCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT : ComputePipelineCreateInfo( *reinterpret_cast( &rhs ) ) { } ComputePipelineCreateInfo & operator=( ComputePipelineCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ComputePipelineCreateInfo & operator=( VkComputePipelineCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ComputePipelineCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ComputePipelineCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::PipelineCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 ComputePipelineCreateInfo & setStage( VULKAN_HPP_NAMESPACE::PipelineShaderStageCreateInfo const & stage_ ) VULKAN_HPP_NOEXCEPT { stage = stage_; return *this; } VULKAN_HPP_CONSTEXPR_14 ComputePipelineCreateInfo & setLayout( VULKAN_HPP_NAMESPACE::PipelineLayout layout_ ) VULKAN_HPP_NOEXCEPT { layout = layout_; return *this; } VULKAN_HPP_CONSTEXPR_14 ComputePipelineCreateInfo & setBasePipelineHandle( VULKAN_HPP_NAMESPACE::Pipeline basePipelineHandle_ ) VULKAN_HPP_NOEXCEPT { basePipelineHandle = basePipelineHandle_; return *this; } VULKAN_HPP_CONSTEXPR_14 ComputePipelineCreateInfo & setBasePipelineIndex( int32_t basePipelineIndex_ ) VULKAN_HPP_NOEXCEPT { basePipelineIndex = basePipelineIndex_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkComputePipelineCreateInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkComputePipelineCreateInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, stage, layout, basePipelineHandle, basePipelineIndex ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ComputePipelineCreateInfo const & ) const = default; #else bool operator==( ComputePipelineCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( stage == rhs.stage ) && ( layout == rhs.layout ) && ( basePipelineHandle == rhs.basePipelineHandle ) && ( basePipelineIndex == rhs.basePipelineIndex ); # endif } bool operator!=( ComputePipelineCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eComputePipelineCreateInfo; const void * pNext = {}; VULKAN_HPP_NAMESPACE::PipelineCreateFlags flags = {}; VULKAN_HPP_NAMESPACE::PipelineShaderStageCreateInfo stage = {}; VULKAN_HPP_NAMESPACE::PipelineLayout layout = {}; VULKAN_HPP_NAMESPACE::Pipeline basePipelineHandle = {}; int32_t basePipelineIndex = {}; }; template <> struct CppType { using Type = ComputePipelineCreateInfo; }; struct ComputePipelineIndirectBufferInfoNV { using NativeType = VkComputePipelineIndirectBufferInfoNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eComputePipelineIndirectBufferInfoNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ComputePipelineIndirectBufferInfoNV( VULKAN_HPP_NAMESPACE::DeviceAddress deviceAddress_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize size_ = {}, VULKAN_HPP_NAMESPACE::DeviceAddress pipelineDeviceAddressCaptureReplay_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , deviceAddress{ deviceAddress_ } , size{ size_ } , pipelineDeviceAddressCaptureReplay{ pipelineDeviceAddressCaptureReplay_ } { } VULKAN_HPP_CONSTEXPR ComputePipelineIndirectBufferInfoNV( ComputePipelineIndirectBufferInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; ComputePipelineIndirectBufferInfoNV( VkComputePipelineIndirectBufferInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT : ComputePipelineIndirectBufferInfoNV( *reinterpret_cast( &rhs ) ) { } ComputePipelineIndirectBufferInfoNV & operator=( ComputePipelineIndirectBufferInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ComputePipelineIndirectBufferInfoNV & operator=( VkComputePipelineIndirectBufferInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ComputePipelineIndirectBufferInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ComputePipelineIndirectBufferInfoNV & setDeviceAddress( VULKAN_HPP_NAMESPACE::DeviceAddress deviceAddress_ ) VULKAN_HPP_NOEXCEPT { deviceAddress = deviceAddress_; return *this; } VULKAN_HPP_CONSTEXPR_14 ComputePipelineIndirectBufferInfoNV & setSize( VULKAN_HPP_NAMESPACE::DeviceSize size_ ) VULKAN_HPP_NOEXCEPT { size = size_; return *this; } VULKAN_HPP_CONSTEXPR_14 ComputePipelineIndirectBufferInfoNV & setPipelineDeviceAddressCaptureReplay( VULKAN_HPP_NAMESPACE::DeviceAddress pipelineDeviceAddressCaptureReplay_ ) VULKAN_HPP_NOEXCEPT { pipelineDeviceAddressCaptureReplay = pipelineDeviceAddressCaptureReplay_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkComputePipelineIndirectBufferInfoNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkComputePipelineIndirectBufferInfoNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, deviceAddress, size, pipelineDeviceAddressCaptureReplay ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ComputePipelineIndirectBufferInfoNV const & ) const = default; #else bool operator==( ComputePipelineIndirectBufferInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( deviceAddress == rhs.deviceAddress ) && ( size == rhs.size ) && ( pipelineDeviceAddressCaptureReplay == rhs.pipelineDeviceAddressCaptureReplay ); # endif } bool operator!=( ComputePipelineIndirectBufferInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eComputePipelineIndirectBufferInfoNV; const void * pNext = {}; VULKAN_HPP_NAMESPACE::DeviceAddress deviceAddress = {}; VULKAN_HPP_NAMESPACE::DeviceSize size = {}; VULKAN_HPP_NAMESPACE::DeviceAddress pipelineDeviceAddressCaptureReplay = {}; }; template <> struct CppType { using Type = ComputePipelineIndirectBufferInfoNV; }; struct ConditionalRenderingBeginInfoEXT { using NativeType = VkConditionalRenderingBeginInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eConditionalRenderingBeginInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ConditionalRenderingBeginInfoEXT( VULKAN_HPP_NAMESPACE::Buffer buffer_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize offset_ = {}, VULKAN_HPP_NAMESPACE::ConditionalRenderingFlagsEXT flags_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , buffer{ buffer_ } , offset{ offset_ } , flags{ flags_ } { } VULKAN_HPP_CONSTEXPR ConditionalRenderingBeginInfoEXT( ConditionalRenderingBeginInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; ConditionalRenderingBeginInfoEXT( VkConditionalRenderingBeginInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : ConditionalRenderingBeginInfoEXT( *reinterpret_cast( &rhs ) ) { } ConditionalRenderingBeginInfoEXT & operator=( ConditionalRenderingBeginInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ConditionalRenderingBeginInfoEXT & operator=( VkConditionalRenderingBeginInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ConditionalRenderingBeginInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ConditionalRenderingBeginInfoEXT & setBuffer( VULKAN_HPP_NAMESPACE::Buffer buffer_ ) VULKAN_HPP_NOEXCEPT { buffer = buffer_; return *this; } VULKAN_HPP_CONSTEXPR_14 ConditionalRenderingBeginInfoEXT & setOffset( VULKAN_HPP_NAMESPACE::DeviceSize offset_ ) VULKAN_HPP_NOEXCEPT { offset = offset_; return *this; } VULKAN_HPP_CONSTEXPR_14 ConditionalRenderingBeginInfoEXT & setFlags( VULKAN_HPP_NAMESPACE::ConditionalRenderingFlagsEXT flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkConditionalRenderingBeginInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkConditionalRenderingBeginInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, buffer, offset, flags ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ConditionalRenderingBeginInfoEXT const & ) const = default; #else bool operator==( ConditionalRenderingBeginInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( buffer == rhs.buffer ) && ( offset == rhs.offset ) && ( flags == rhs.flags ); # endif } bool operator!=( ConditionalRenderingBeginInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eConditionalRenderingBeginInfoEXT; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Buffer buffer = {}; VULKAN_HPP_NAMESPACE::DeviceSize offset = {}; VULKAN_HPP_NAMESPACE::ConditionalRenderingFlagsEXT flags = {}; }; template <> struct CppType { using Type = ConditionalRenderingBeginInfoEXT; }; struct ConformanceVersion { using NativeType = VkConformanceVersion; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ConformanceVersion( uint8_t major_ = {}, uint8_t minor_ = {}, uint8_t subminor_ = {}, uint8_t patch_ = {} ) VULKAN_HPP_NOEXCEPT : major{ major_ } , minor{ minor_ } , subminor{ subminor_ } , patch{ patch_ } { } VULKAN_HPP_CONSTEXPR ConformanceVersion( ConformanceVersion const & rhs ) VULKAN_HPP_NOEXCEPT = default; ConformanceVersion( VkConformanceVersion const & rhs ) VULKAN_HPP_NOEXCEPT : ConformanceVersion( *reinterpret_cast( &rhs ) ) {} ConformanceVersion & operator=( ConformanceVersion const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ConformanceVersion & operator=( VkConformanceVersion const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ConformanceVersion & setMajor( uint8_t major_ ) VULKAN_HPP_NOEXCEPT { major = major_; return *this; } VULKAN_HPP_CONSTEXPR_14 ConformanceVersion & setMinor( uint8_t minor_ ) VULKAN_HPP_NOEXCEPT { minor = minor_; return *this; } VULKAN_HPP_CONSTEXPR_14 ConformanceVersion & setSubminor( uint8_t subminor_ ) VULKAN_HPP_NOEXCEPT { subminor = subminor_; return *this; } VULKAN_HPP_CONSTEXPR_14 ConformanceVersion & setPatch( uint8_t patch_ ) VULKAN_HPP_NOEXCEPT { patch = patch_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkConformanceVersion const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkConformanceVersion &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( major, minor, subminor, patch ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ConformanceVersion const & ) const = default; #else bool operator==( ConformanceVersion const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( major == rhs.major ) && ( minor == rhs.minor ) && ( subminor == rhs.subminor ) && ( patch == rhs.patch ); # endif } bool operator!=( ConformanceVersion const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: uint8_t major = {}; uint8_t minor = {}; uint8_t subminor = {}; uint8_t patch = {}; }; using ConformanceVersionKHR = ConformanceVersion; struct ConvertCooperativeVectorMatrixInfoNV { using NativeType = VkConvertCooperativeVectorMatrixInfoNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eConvertCooperativeVectorMatrixInfoNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 ConvertCooperativeVectorMatrixInfoNV( size_t srcSize_ = {}, VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR srcData_ = {}, size_t * pDstSize_ = {}, VULKAN_HPP_NAMESPACE::DeviceOrHostAddressKHR dstData_ = {}, VULKAN_HPP_NAMESPACE::ComponentTypeKHR srcComponentType_ = VULKAN_HPP_NAMESPACE::ComponentTypeKHR::eFloat16, VULKAN_HPP_NAMESPACE::ComponentTypeKHR dstComponentType_ = VULKAN_HPP_NAMESPACE::ComponentTypeKHR::eFloat16, uint32_t numRows_ = {}, uint32_t numColumns_ = {}, VULKAN_HPP_NAMESPACE::CooperativeVectorMatrixLayoutNV srcLayout_ = VULKAN_HPP_NAMESPACE::CooperativeVectorMatrixLayoutNV::eRowMajor, size_t srcStride_ = {}, VULKAN_HPP_NAMESPACE::CooperativeVectorMatrixLayoutNV dstLayout_ = VULKAN_HPP_NAMESPACE::CooperativeVectorMatrixLayoutNV::eRowMajor, size_t dstStride_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , srcSize{ srcSize_ } , srcData{ srcData_ } , pDstSize{ pDstSize_ } , dstData{ dstData_ } , srcComponentType{ srcComponentType_ } , dstComponentType{ dstComponentType_ } , numRows{ numRows_ } , numColumns{ numColumns_ } , srcLayout{ srcLayout_ } , srcStride{ srcStride_ } , dstLayout{ dstLayout_ } , dstStride{ dstStride_ } { } VULKAN_HPP_CONSTEXPR_14 ConvertCooperativeVectorMatrixInfoNV( ConvertCooperativeVectorMatrixInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; ConvertCooperativeVectorMatrixInfoNV( VkConvertCooperativeVectorMatrixInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT : ConvertCooperativeVectorMatrixInfoNV( *reinterpret_cast( &rhs ) ) { } ConvertCooperativeVectorMatrixInfoNV & operator=( ConvertCooperativeVectorMatrixInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ConvertCooperativeVectorMatrixInfoNV & operator=( VkConvertCooperativeVectorMatrixInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ConvertCooperativeVectorMatrixInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ConvertCooperativeVectorMatrixInfoNV & setSrcSize( size_t srcSize_ ) VULKAN_HPP_NOEXCEPT { srcSize = srcSize_; return *this; } VULKAN_HPP_CONSTEXPR_14 ConvertCooperativeVectorMatrixInfoNV & setSrcData( VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR const & srcData_ ) VULKAN_HPP_NOEXCEPT { srcData = srcData_; return *this; } VULKAN_HPP_CONSTEXPR_14 ConvertCooperativeVectorMatrixInfoNV & setPDstSize( size_t * pDstSize_ ) VULKAN_HPP_NOEXCEPT { pDstSize = pDstSize_; return *this; } VULKAN_HPP_CONSTEXPR_14 ConvertCooperativeVectorMatrixInfoNV & setDstData( VULKAN_HPP_NAMESPACE::DeviceOrHostAddressKHR const & dstData_ ) VULKAN_HPP_NOEXCEPT { dstData = dstData_; return *this; } VULKAN_HPP_CONSTEXPR_14 ConvertCooperativeVectorMatrixInfoNV & setSrcComponentType( VULKAN_HPP_NAMESPACE::ComponentTypeKHR srcComponentType_ ) VULKAN_HPP_NOEXCEPT { srcComponentType = srcComponentType_; return *this; } VULKAN_HPP_CONSTEXPR_14 ConvertCooperativeVectorMatrixInfoNV & setDstComponentType( VULKAN_HPP_NAMESPACE::ComponentTypeKHR dstComponentType_ ) VULKAN_HPP_NOEXCEPT { dstComponentType = dstComponentType_; return *this; } VULKAN_HPP_CONSTEXPR_14 ConvertCooperativeVectorMatrixInfoNV & setNumRows( uint32_t numRows_ ) VULKAN_HPP_NOEXCEPT { numRows = numRows_; return *this; } VULKAN_HPP_CONSTEXPR_14 ConvertCooperativeVectorMatrixInfoNV & setNumColumns( uint32_t numColumns_ ) VULKAN_HPP_NOEXCEPT { numColumns = numColumns_; return *this; } VULKAN_HPP_CONSTEXPR_14 ConvertCooperativeVectorMatrixInfoNV & setSrcLayout( VULKAN_HPP_NAMESPACE::CooperativeVectorMatrixLayoutNV srcLayout_ ) VULKAN_HPP_NOEXCEPT { srcLayout = srcLayout_; return *this; } VULKAN_HPP_CONSTEXPR_14 ConvertCooperativeVectorMatrixInfoNV & setSrcStride( size_t srcStride_ ) VULKAN_HPP_NOEXCEPT { srcStride = srcStride_; return *this; } VULKAN_HPP_CONSTEXPR_14 ConvertCooperativeVectorMatrixInfoNV & setDstLayout( VULKAN_HPP_NAMESPACE::CooperativeVectorMatrixLayoutNV dstLayout_ ) VULKAN_HPP_NOEXCEPT { dstLayout = dstLayout_; return *this; } VULKAN_HPP_CONSTEXPR_14 ConvertCooperativeVectorMatrixInfoNV & setDstStride( size_t dstStride_ ) VULKAN_HPP_NOEXCEPT { dstStride = dstStride_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkConvertCooperativeVectorMatrixInfoNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkConvertCooperativeVectorMatrixInfoNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, srcSize, srcData, pDstSize, dstData, srcComponentType, dstComponentType, numRows, numColumns, srcLayout, srcStride, dstLayout, dstStride ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eConvertCooperativeVectorMatrixInfoNV; const void * pNext = {}; size_t srcSize = {}; VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR srcData = {}; size_t * pDstSize = {}; VULKAN_HPP_NAMESPACE::DeviceOrHostAddressKHR dstData = {}; VULKAN_HPP_NAMESPACE::ComponentTypeKHR srcComponentType = VULKAN_HPP_NAMESPACE::ComponentTypeKHR::eFloat16; VULKAN_HPP_NAMESPACE::ComponentTypeKHR dstComponentType = VULKAN_HPP_NAMESPACE::ComponentTypeKHR::eFloat16; uint32_t numRows = {}; uint32_t numColumns = {}; VULKAN_HPP_NAMESPACE::CooperativeVectorMatrixLayoutNV srcLayout = VULKAN_HPP_NAMESPACE::CooperativeVectorMatrixLayoutNV::eRowMajor; size_t srcStride = {}; VULKAN_HPP_NAMESPACE::CooperativeVectorMatrixLayoutNV dstLayout = VULKAN_HPP_NAMESPACE::CooperativeVectorMatrixLayoutNV::eRowMajor; size_t dstStride = {}; }; template <> struct CppType { using Type = ConvertCooperativeVectorMatrixInfoNV; }; struct CooperativeMatrixFlexibleDimensionsPropertiesNV { using NativeType = VkCooperativeMatrixFlexibleDimensionsPropertiesNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eCooperativeMatrixFlexibleDimensionsPropertiesNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR CooperativeMatrixFlexibleDimensionsPropertiesNV( uint32_t MGranularity_ = {}, uint32_t NGranularity_ = {}, uint32_t KGranularity_ = {}, VULKAN_HPP_NAMESPACE::ComponentTypeKHR AType_ = VULKAN_HPP_NAMESPACE::ComponentTypeKHR::eFloat16, VULKAN_HPP_NAMESPACE::ComponentTypeKHR BType_ = VULKAN_HPP_NAMESPACE::ComponentTypeKHR::eFloat16, VULKAN_HPP_NAMESPACE::ComponentTypeKHR CType_ = VULKAN_HPP_NAMESPACE::ComponentTypeKHR::eFloat16, VULKAN_HPP_NAMESPACE::ComponentTypeKHR ResultType_ = VULKAN_HPP_NAMESPACE::ComponentTypeKHR::eFloat16, VULKAN_HPP_NAMESPACE::Bool32 saturatingAccumulation_ = {}, VULKAN_HPP_NAMESPACE::ScopeKHR scope_ = VULKAN_HPP_NAMESPACE::ScopeKHR::eDevice, uint32_t workgroupInvocations_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , MGranularity{ MGranularity_ } , NGranularity{ NGranularity_ } , KGranularity{ KGranularity_ } , AType{ AType_ } , BType{ BType_ } , CType{ CType_ } , ResultType{ ResultType_ } , saturatingAccumulation{ saturatingAccumulation_ } , scope{ scope_ } , workgroupInvocations{ workgroupInvocations_ } { } VULKAN_HPP_CONSTEXPR CooperativeMatrixFlexibleDimensionsPropertiesNV( CooperativeMatrixFlexibleDimensionsPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; CooperativeMatrixFlexibleDimensionsPropertiesNV( VkCooperativeMatrixFlexibleDimensionsPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT : CooperativeMatrixFlexibleDimensionsPropertiesNV( *reinterpret_cast( &rhs ) ) { } CooperativeMatrixFlexibleDimensionsPropertiesNV & operator=( CooperativeMatrixFlexibleDimensionsPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ CooperativeMatrixFlexibleDimensionsPropertiesNV & operator=( VkCooperativeMatrixFlexibleDimensionsPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkCooperativeMatrixFlexibleDimensionsPropertiesNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkCooperativeMatrixFlexibleDimensionsPropertiesNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, MGranularity, NGranularity, KGranularity, AType, BType, CType, ResultType, saturatingAccumulation, scope, workgroupInvocations ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( CooperativeMatrixFlexibleDimensionsPropertiesNV const & ) const = default; #else bool operator==( CooperativeMatrixFlexibleDimensionsPropertiesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( MGranularity == rhs.MGranularity ) && ( NGranularity == rhs.NGranularity ) && ( KGranularity == rhs.KGranularity ) && ( AType == rhs.AType ) && ( BType == rhs.BType ) && ( CType == rhs.CType ) && ( ResultType == rhs.ResultType ) && ( saturatingAccumulation == rhs.saturatingAccumulation ) && ( scope == rhs.scope ) && ( workgroupInvocations == rhs.workgroupInvocations ); # endif } bool operator!=( CooperativeMatrixFlexibleDimensionsPropertiesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eCooperativeMatrixFlexibleDimensionsPropertiesNV; void * pNext = {}; uint32_t MGranularity = {}; uint32_t NGranularity = {}; uint32_t KGranularity = {}; VULKAN_HPP_NAMESPACE::ComponentTypeKHR AType = VULKAN_HPP_NAMESPACE::ComponentTypeKHR::eFloat16; VULKAN_HPP_NAMESPACE::ComponentTypeKHR BType = VULKAN_HPP_NAMESPACE::ComponentTypeKHR::eFloat16; VULKAN_HPP_NAMESPACE::ComponentTypeKHR CType = VULKAN_HPP_NAMESPACE::ComponentTypeKHR::eFloat16; VULKAN_HPP_NAMESPACE::ComponentTypeKHR ResultType = VULKAN_HPP_NAMESPACE::ComponentTypeKHR::eFloat16; VULKAN_HPP_NAMESPACE::Bool32 saturatingAccumulation = {}; VULKAN_HPP_NAMESPACE::ScopeKHR scope = VULKAN_HPP_NAMESPACE::ScopeKHR::eDevice; uint32_t workgroupInvocations = {}; }; template <> struct CppType { using Type = CooperativeMatrixFlexibleDimensionsPropertiesNV; }; struct CooperativeMatrixPropertiesKHR { using NativeType = VkCooperativeMatrixPropertiesKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eCooperativeMatrixPropertiesKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR CooperativeMatrixPropertiesKHR( uint32_t MSize_ = {}, uint32_t NSize_ = {}, uint32_t KSize_ = {}, VULKAN_HPP_NAMESPACE::ComponentTypeKHR AType_ = VULKAN_HPP_NAMESPACE::ComponentTypeKHR::eFloat16, VULKAN_HPP_NAMESPACE::ComponentTypeKHR BType_ = VULKAN_HPP_NAMESPACE::ComponentTypeKHR::eFloat16, VULKAN_HPP_NAMESPACE::ComponentTypeKHR CType_ = VULKAN_HPP_NAMESPACE::ComponentTypeKHR::eFloat16, VULKAN_HPP_NAMESPACE::ComponentTypeKHR ResultType_ = VULKAN_HPP_NAMESPACE::ComponentTypeKHR::eFloat16, VULKAN_HPP_NAMESPACE::Bool32 saturatingAccumulation_ = {}, VULKAN_HPP_NAMESPACE::ScopeKHR scope_ = VULKAN_HPP_NAMESPACE::ScopeKHR::eDevice, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , MSize{ MSize_ } , NSize{ NSize_ } , KSize{ KSize_ } , AType{ AType_ } , BType{ BType_ } , CType{ CType_ } , ResultType{ ResultType_ } , saturatingAccumulation{ saturatingAccumulation_ } , scope{ scope_ } { } VULKAN_HPP_CONSTEXPR CooperativeMatrixPropertiesKHR( CooperativeMatrixPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; CooperativeMatrixPropertiesKHR( VkCooperativeMatrixPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT : CooperativeMatrixPropertiesKHR( *reinterpret_cast( &rhs ) ) { } CooperativeMatrixPropertiesKHR & operator=( CooperativeMatrixPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ CooperativeMatrixPropertiesKHR & operator=( VkCooperativeMatrixPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkCooperativeMatrixPropertiesKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkCooperativeMatrixPropertiesKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, MSize, NSize, KSize, AType, BType, CType, ResultType, saturatingAccumulation, scope ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( CooperativeMatrixPropertiesKHR const & ) const = default; #else bool operator==( CooperativeMatrixPropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( MSize == rhs.MSize ) && ( NSize == rhs.NSize ) && ( KSize == rhs.KSize ) && ( AType == rhs.AType ) && ( BType == rhs.BType ) && ( CType == rhs.CType ) && ( ResultType == rhs.ResultType ) && ( saturatingAccumulation == rhs.saturatingAccumulation ) && ( scope == rhs.scope ); # endif } bool operator!=( CooperativeMatrixPropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eCooperativeMatrixPropertiesKHR; void * pNext = {}; uint32_t MSize = {}; uint32_t NSize = {}; uint32_t KSize = {}; VULKAN_HPP_NAMESPACE::ComponentTypeKHR AType = VULKAN_HPP_NAMESPACE::ComponentTypeKHR::eFloat16; VULKAN_HPP_NAMESPACE::ComponentTypeKHR BType = VULKAN_HPP_NAMESPACE::ComponentTypeKHR::eFloat16; VULKAN_HPP_NAMESPACE::ComponentTypeKHR CType = VULKAN_HPP_NAMESPACE::ComponentTypeKHR::eFloat16; VULKAN_HPP_NAMESPACE::ComponentTypeKHR ResultType = VULKAN_HPP_NAMESPACE::ComponentTypeKHR::eFloat16; VULKAN_HPP_NAMESPACE::Bool32 saturatingAccumulation = {}; VULKAN_HPP_NAMESPACE::ScopeKHR scope = VULKAN_HPP_NAMESPACE::ScopeKHR::eDevice; }; template <> struct CppType { using Type = CooperativeMatrixPropertiesKHR; }; struct CooperativeMatrixPropertiesNV { using NativeType = VkCooperativeMatrixPropertiesNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eCooperativeMatrixPropertiesNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR CooperativeMatrixPropertiesNV( uint32_t MSize_ = {}, uint32_t NSize_ = {}, uint32_t KSize_ = {}, VULKAN_HPP_NAMESPACE::ComponentTypeNV AType_ = {}, VULKAN_HPP_NAMESPACE::ComponentTypeNV BType_ = {}, VULKAN_HPP_NAMESPACE::ComponentTypeNV CType_ = {}, VULKAN_HPP_NAMESPACE::ComponentTypeNV DType_ = {}, VULKAN_HPP_NAMESPACE::ScopeNV scope_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , MSize{ MSize_ } , NSize{ NSize_ } , KSize{ KSize_ } , AType{ AType_ } , BType{ BType_ } , CType{ CType_ } , DType{ DType_ } , scope{ scope_ } { } VULKAN_HPP_CONSTEXPR CooperativeMatrixPropertiesNV( CooperativeMatrixPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; CooperativeMatrixPropertiesNV( VkCooperativeMatrixPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT : CooperativeMatrixPropertiesNV( *reinterpret_cast( &rhs ) ) { } CooperativeMatrixPropertiesNV & operator=( CooperativeMatrixPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ CooperativeMatrixPropertiesNV & operator=( VkCooperativeMatrixPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkCooperativeMatrixPropertiesNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkCooperativeMatrixPropertiesNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, MSize, NSize, KSize, AType, BType, CType, DType, scope ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( CooperativeMatrixPropertiesNV const & ) const = default; #else bool operator==( CooperativeMatrixPropertiesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( MSize == rhs.MSize ) && ( NSize == rhs.NSize ) && ( KSize == rhs.KSize ) && ( AType == rhs.AType ) && ( BType == rhs.BType ) && ( CType == rhs.CType ) && ( DType == rhs.DType ) && ( scope == rhs.scope ); # endif } bool operator!=( CooperativeMatrixPropertiesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eCooperativeMatrixPropertiesNV; void * pNext = {}; uint32_t MSize = {}; uint32_t NSize = {}; uint32_t KSize = {}; VULKAN_HPP_NAMESPACE::ComponentTypeNV AType = {}; VULKAN_HPP_NAMESPACE::ComponentTypeNV BType = {}; VULKAN_HPP_NAMESPACE::ComponentTypeNV CType = {}; VULKAN_HPP_NAMESPACE::ComponentTypeNV DType = {}; VULKAN_HPP_NAMESPACE::ScopeNV scope = {}; }; template <> struct CppType { using Type = CooperativeMatrixPropertiesNV; }; struct CooperativeVectorPropertiesNV { using NativeType = VkCooperativeVectorPropertiesNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eCooperativeVectorPropertiesNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR CooperativeVectorPropertiesNV( VULKAN_HPP_NAMESPACE::ComponentTypeKHR inputType_ = VULKAN_HPP_NAMESPACE::ComponentTypeKHR::eFloat16, VULKAN_HPP_NAMESPACE::ComponentTypeKHR inputInterpretation_ = VULKAN_HPP_NAMESPACE::ComponentTypeKHR::eFloat16, VULKAN_HPP_NAMESPACE::ComponentTypeKHR matrixInterpretation_ = VULKAN_HPP_NAMESPACE::ComponentTypeKHR::eFloat16, VULKAN_HPP_NAMESPACE::ComponentTypeKHR biasInterpretation_ = VULKAN_HPP_NAMESPACE::ComponentTypeKHR::eFloat16, VULKAN_HPP_NAMESPACE::ComponentTypeKHR resultType_ = VULKAN_HPP_NAMESPACE::ComponentTypeKHR::eFloat16, VULKAN_HPP_NAMESPACE::Bool32 transpose_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , inputType{ inputType_ } , inputInterpretation{ inputInterpretation_ } , matrixInterpretation{ matrixInterpretation_ } , biasInterpretation{ biasInterpretation_ } , resultType{ resultType_ } , transpose{ transpose_ } { } VULKAN_HPP_CONSTEXPR CooperativeVectorPropertiesNV( CooperativeVectorPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; CooperativeVectorPropertiesNV( VkCooperativeVectorPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT : CooperativeVectorPropertiesNV( *reinterpret_cast( &rhs ) ) { } CooperativeVectorPropertiesNV & operator=( CooperativeVectorPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ CooperativeVectorPropertiesNV & operator=( VkCooperativeVectorPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 CooperativeVectorPropertiesNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 CooperativeVectorPropertiesNV & setInputType( VULKAN_HPP_NAMESPACE::ComponentTypeKHR inputType_ ) VULKAN_HPP_NOEXCEPT { inputType = inputType_; return *this; } VULKAN_HPP_CONSTEXPR_14 CooperativeVectorPropertiesNV & setInputInterpretation( VULKAN_HPP_NAMESPACE::ComponentTypeKHR inputInterpretation_ ) VULKAN_HPP_NOEXCEPT { inputInterpretation = inputInterpretation_; return *this; } VULKAN_HPP_CONSTEXPR_14 CooperativeVectorPropertiesNV & setMatrixInterpretation( VULKAN_HPP_NAMESPACE::ComponentTypeKHR matrixInterpretation_ ) VULKAN_HPP_NOEXCEPT { matrixInterpretation = matrixInterpretation_; return *this; } VULKAN_HPP_CONSTEXPR_14 CooperativeVectorPropertiesNV & setBiasInterpretation( VULKAN_HPP_NAMESPACE::ComponentTypeKHR biasInterpretation_ ) VULKAN_HPP_NOEXCEPT { biasInterpretation = biasInterpretation_; return *this; } VULKAN_HPP_CONSTEXPR_14 CooperativeVectorPropertiesNV & setResultType( VULKAN_HPP_NAMESPACE::ComponentTypeKHR resultType_ ) VULKAN_HPP_NOEXCEPT { resultType = resultType_; return *this; } VULKAN_HPP_CONSTEXPR_14 CooperativeVectorPropertiesNV & setTranspose( VULKAN_HPP_NAMESPACE::Bool32 transpose_ ) VULKAN_HPP_NOEXCEPT { transpose = transpose_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkCooperativeVectorPropertiesNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkCooperativeVectorPropertiesNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, inputType, inputInterpretation, matrixInterpretation, biasInterpretation, resultType, transpose ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( CooperativeVectorPropertiesNV const & ) const = default; #else bool operator==( CooperativeVectorPropertiesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( inputType == rhs.inputType ) && ( inputInterpretation == rhs.inputInterpretation ) && ( matrixInterpretation == rhs.matrixInterpretation ) && ( biasInterpretation == rhs.biasInterpretation ) && ( resultType == rhs.resultType ) && ( transpose == rhs.transpose ); # endif } bool operator!=( CooperativeVectorPropertiesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eCooperativeVectorPropertiesNV; void * pNext = {}; VULKAN_HPP_NAMESPACE::ComponentTypeKHR inputType = VULKAN_HPP_NAMESPACE::ComponentTypeKHR::eFloat16; VULKAN_HPP_NAMESPACE::ComponentTypeKHR inputInterpretation = VULKAN_HPP_NAMESPACE::ComponentTypeKHR::eFloat16; VULKAN_HPP_NAMESPACE::ComponentTypeKHR matrixInterpretation = VULKAN_HPP_NAMESPACE::ComponentTypeKHR::eFloat16; VULKAN_HPP_NAMESPACE::ComponentTypeKHR biasInterpretation = VULKAN_HPP_NAMESPACE::ComponentTypeKHR::eFloat16; VULKAN_HPP_NAMESPACE::ComponentTypeKHR resultType = VULKAN_HPP_NAMESPACE::ComponentTypeKHR::eFloat16; VULKAN_HPP_NAMESPACE::Bool32 transpose = {}; }; template <> struct CppType { using Type = CooperativeVectorPropertiesNV; }; struct CopyAccelerationStructureInfoKHR { using NativeType = VkCopyAccelerationStructureInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eCopyAccelerationStructureInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR CopyAccelerationStructureInfoKHR( VULKAN_HPP_NAMESPACE::AccelerationStructureKHR src_ = {}, VULKAN_HPP_NAMESPACE::AccelerationStructureKHR dst_ = {}, VULKAN_HPP_NAMESPACE::CopyAccelerationStructureModeKHR mode_ = VULKAN_HPP_NAMESPACE::CopyAccelerationStructureModeKHR::eClone, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , src{ src_ } , dst{ dst_ } , mode{ mode_ } { } VULKAN_HPP_CONSTEXPR CopyAccelerationStructureInfoKHR( CopyAccelerationStructureInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; CopyAccelerationStructureInfoKHR( VkCopyAccelerationStructureInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : CopyAccelerationStructureInfoKHR( *reinterpret_cast( &rhs ) ) { } CopyAccelerationStructureInfoKHR & operator=( CopyAccelerationStructureInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ CopyAccelerationStructureInfoKHR & operator=( VkCopyAccelerationStructureInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 CopyAccelerationStructureInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 CopyAccelerationStructureInfoKHR & setSrc( VULKAN_HPP_NAMESPACE::AccelerationStructureKHR src_ ) VULKAN_HPP_NOEXCEPT { src = src_; return *this; } VULKAN_HPP_CONSTEXPR_14 CopyAccelerationStructureInfoKHR & setDst( VULKAN_HPP_NAMESPACE::AccelerationStructureKHR dst_ ) VULKAN_HPP_NOEXCEPT { dst = dst_; return *this; } VULKAN_HPP_CONSTEXPR_14 CopyAccelerationStructureInfoKHR & setMode( VULKAN_HPP_NAMESPACE::CopyAccelerationStructureModeKHR mode_ ) VULKAN_HPP_NOEXCEPT { mode = mode_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkCopyAccelerationStructureInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkCopyAccelerationStructureInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, src, dst, mode ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( CopyAccelerationStructureInfoKHR const & ) const = default; #else bool operator==( CopyAccelerationStructureInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( src == rhs.src ) && ( dst == rhs.dst ) && ( mode == rhs.mode ); # endif } bool operator!=( CopyAccelerationStructureInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eCopyAccelerationStructureInfoKHR; const void * pNext = {}; VULKAN_HPP_NAMESPACE::AccelerationStructureKHR src = {}; VULKAN_HPP_NAMESPACE::AccelerationStructureKHR dst = {}; VULKAN_HPP_NAMESPACE::CopyAccelerationStructureModeKHR mode = VULKAN_HPP_NAMESPACE::CopyAccelerationStructureModeKHR::eClone; }; template <> struct CppType { using Type = CopyAccelerationStructureInfoKHR; }; struct CopyAccelerationStructureToMemoryInfoKHR { using NativeType = VkCopyAccelerationStructureToMemoryInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eCopyAccelerationStructureToMemoryInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 CopyAccelerationStructureToMemoryInfoKHR( VULKAN_HPP_NAMESPACE::AccelerationStructureKHR src_ = {}, VULKAN_HPP_NAMESPACE::DeviceOrHostAddressKHR dst_ = {}, VULKAN_HPP_NAMESPACE::CopyAccelerationStructureModeKHR mode_ = VULKAN_HPP_NAMESPACE::CopyAccelerationStructureModeKHR::eClone, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , src{ src_ } , dst{ dst_ } , mode{ mode_ } { } VULKAN_HPP_CONSTEXPR_14 CopyAccelerationStructureToMemoryInfoKHR( CopyAccelerationStructureToMemoryInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; CopyAccelerationStructureToMemoryInfoKHR( VkCopyAccelerationStructureToMemoryInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : CopyAccelerationStructureToMemoryInfoKHR( *reinterpret_cast( &rhs ) ) { } CopyAccelerationStructureToMemoryInfoKHR & operator=( CopyAccelerationStructureToMemoryInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ CopyAccelerationStructureToMemoryInfoKHR & operator=( VkCopyAccelerationStructureToMemoryInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 CopyAccelerationStructureToMemoryInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 CopyAccelerationStructureToMemoryInfoKHR & setSrc( VULKAN_HPP_NAMESPACE::AccelerationStructureKHR src_ ) VULKAN_HPP_NOEXCEPT { src = src_; return *this; } VULKAN_HPP_CONSTEXPR_14 CopyAccelerationStructureToMemoryInfoKHR & setDst( VULKAN_HPP_NAMESPACE::DeviceOrHostAddressKHR const & dst_ ) VULKAN_HPP_NOEXCEPT { dst = dst_; return *this; } VULKAN_HPP_CONSTEXPR_14 CopyAccelerationStructureToMemoryInfoKHR & setMode( VULKAN_HPP_NAMESPACE::CopyAccelerationStructureModeKHR mode_ ) VULKAN_HPP_NOEXCEPT { mode = mode_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkCopyAccelerationStructureToMemoryInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkCopyAccelerationStructureToMemoryInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, src, dst, mode ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eCopyAccelerationStructureToMemoryInfoKHR; const void * pNext = {}; VULKAN_HPP_NAMESPACE::AccelerationStructureKHR src = {}; VULKAN_HPP_NAMESPACE::DeviceOrHostAddressKHR dst = {}; VULKAN_HPP_NAMESPACE::CopyAccelerationStructureModeKHR mode = VULKAN_HPP_NAMESPACE::CopyAccelerationStructureModeKHR::eClone; }; template <> struct CppType { using Type = CopyAccelerationStructureToMemoryInfoKHR; }; struct CopyBufferInfo2 { using NativeType = VkCopyBufferInfo2; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eCopyBufferInfo2; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR CopyBufferInfo2( VULKAN_HPP_NAMESPACE::Buffer srcBuffer_ = {}, VULKAN_HPP_NAMESPACE::Buffer dstBuffer_ = {}, uint32_t regionCount_ = {}, const VULKAN_HPP_NAMESPACE::BufferCopy2 * pRegions_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , srcBuffer{ srcBuffer_ } , dstBuffer{ dstBuffer_ } , regionCount{ regionCount_ } , pRegions{ pRegions_ } { } VULKAN_HPP_CONSTEXPR CopyBufferInfo2( CopyBufferInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; CopyBufferInfo2( VkCopyBufferInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT : CopyBufferInfo2( *reinterpret_cast( &rhs ) ) {} # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) CopyBufferInfo2( VULKAN_HPP_NAMESPACE::Buffer srcBuffer_, VULKAN_HPP_NAMESPACE::Buffer dstBuffer_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & regions_, const void * pNext_ = nullptr ) : pNext( pNext_ ), srcBuffer( srcBuffer_ ), dstBuffer( dstBuffer_ ), regionCount( static_cast( regions_.size() ) ), pRegions( regions_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ CopyBufferInfo2 & operator=( CopyBufferInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ CopyBufferInfo2 & operator=( VkCopyBufferInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 CopyBufferInfo2 & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 CopyBufferInfo2 & setSrcBuffer( VULKAN_HPP_NAMESPACE::Buffer srcBuffer_ ) VULKAN_HPP_NOEXCEPT { srcBuffer = srcBuffer_; return *this; } VULKAN_HPP_CONSTEXPR_14 CopyBufferInfo2 & setDstBuffer( VULKAN_HPP_NAMESPACE::Buffer dstBuffer_ ) VULKAN_HPP_NOEXCEPT { dstBuffer = dstBuffer_; return *this; } VULKAN_HPP_CONSTEXPR_14 CopyBufferInfo2 & setRegionCount( uint32_t regionCount_ ) VULKAN_HPP_NOEXCEPT { regionCount = regionCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 CopyBufferInfo2 & setPRegions( const VULKAN_HPP_NAMESPACE::BufferCopy2 * pRegions_ ) VULKAN_HPP_NOEXCEPT { pRegions = pRegions_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) CopyBufferInfo2 & setRegions( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & regions_ ) VULKAN_HPP_NOEXCEPT { regionCount = static_cast( regions_.size() ); pRegions = regions_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkCopyBufferInfo2 const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkCopyBufferInfo2 &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, srcBuffer, dstBuffer, regionCount, pRegions ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( CopyBufferInfo2 const & ) const = default; #else bool operator==( CopyBufferInfo2 const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( srcBuffer == rhs.srcBuffer ) && ( dstBuffer == rhs.dstBuffer ) && ( regionCount == rhs.regionCount ) && ( pRegions == rhs.pRegions ); # endif } bool operator!=( CopyBufferInfo2 const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eCopyBufferInfo2; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Buffer srcBuffer = {}; VULKAN_HPP_NAMESPACE::Buffer dstBuffer = {}; uint32_t regionCount = {}; const VULKAN_HPP_NAMESPACE::BufferCopy2 * pRegions = {}; }; template <> struct CppType { using Type = CopyBufferInfo2; }; using CopyBufferInfo2KHR = CopyBufferInfo2; struct CopyBufferToImageInfo2 { using NativeType = VkCopyBufferToImageInfo2; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eCopyBufferToImageInfo2; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR CopyBufferToImageInfo2( VULKAN_HPP_NAMESPACE::Buffer srcBuffer_ = {}, VULKAN_HPP_NAMESPACE::Image dstImage_ = {}, VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout_ = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined, uint32_t regionCount_ = {}, const VULKAN_HPP_NAMESPACE::BufferImageCopy2 * pRegions_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , srcBuffer{ srcBuffer_ } , dstImage{ dstImage_ } , dstImageLayout{ dstImageLayout_ } , regionCount{ regionCount_ } , pRegions{ pRegions_ } { } VULKAN_HPP_CONSTEXPR CopyBufferToImageInfo2( CopyBufferToImageInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; CopyBufferToImageInfo2( VkCopyBufferToImageInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT : CopyBufferToImageInfo2( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) CopyBufferToImageInfo2( VULKAN_HPP_NAMESPACE::Buffer srcBuffer_, VULKAN_HPP_NAMESPACE::Image dstImage_, VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & regions_, const void * pNext_ = nullptr ) : pNext( pNext_ ) , srcBuffer( srcBuffer_ ) , dstImage( dstImage_ ) , dstImageLayout( dstImageLayout_ ) , regionCount( static_cast( regions_.size() ) ) , pRegions( regions_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ CopyBufferToImageInfo2 & operator=( CopyBufferToImageInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ CopyBufferToImageInfo2 & operator=( VkCopyBufferToImageInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 CopyBufferToImageInfo2 & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 CopyBufferToImageInfo2 & setSrcBuffer( VULKAN_HPP_NAMESPACE::Buffer srcBuffer_ ) VULKAN_HPP_NOEXCEPT { srcBuffer = srcBuffer_; return *this; } VULKAN_HPP_CONSTEXPR_14 CopyBufferToImageInfo2 & setDstImage( VULKAN_HPP_NAMESPACE::Image dstImage_ ) VULKAN_HPP_NOEXCEPT { dstImage = dstImage_; return *this; } VULKAN_HPP_CONSTEXPR_14 CopyBufferToImageInfo2 & setDstImageLayout( VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout_ ) VULKAN_HPP_NOEXCEPT { dstImageLayout = dstImageLayout_; return *this; } VULKAN_HPP_CONSTEXPR_14 CopyBufferToImageInfo2 & setRegionCount( uint32_t regionCount_ ) VULKAN_HPP_NOEXCEPT { regionCount = regionCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 CopyBufferToImageInfo2 & setPRegions( const VULKAN_HPP_NAMESPACE::BufferImageCopy2 * pRegions_ ) VULKAN_HPP_NOEXCEPT { pRegions = pRegions_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) CopyBufferToImageInfo2 & setRegions( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & regions_ ) VULKAN_HPP_NOEXCEPT { regionCount = static_cast( regions_.size() ); pRegions = regions_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkCopyBufferToImageInfo2 const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkCopyBufferToImageInfo2 &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, srcBuffer, dstImage, dstImageLayout, regionCount, pRegions ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( CopyBufferToImageInfo2 const & ) const = default; #else bool operator==( CopyBufferToImageInfo2 const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( srcBuffer == rhs.srcBuffer ) && ( dstImage == rhs.dstImage ) && ( dstImageLayout == rhs.dstImageLayout ) && ( regionCount == rhs.regionCount ) && ( pRegions == rhs.pRegions ); # endif } bool operator!=( CopyBufferToImageInfo2 const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eCopyBufferToImageInfo2; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Buffer srcBuffer = {}; VULKAN_HPP_NAMESPACE::Image dstImage = {}; VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined; uint32_t regionCount = {}; const VULKAN_HPP_NAMESPACE::BufferImageCopy2 * pRegions = {}; }; template <> struct CppType { using Type = CopyBufferToImageInfo2; }; using CopyBufferToImageInfo2KHR = CopyBufferToImageInfo2; struct CopyCommandTransformInfoQCOM { using NativeType = VkCopyCommandTransformInfoQCOM; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eCopyCommandTransformInfoQCOM; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR CopyCommandTransformInfoQCOM( VULKAN_HPP_NAMESPACE::SurfaceTransformFlagBitsKHR transform_ = VULKAN_HPP_NAMESPACE::SurfaceTransformFlagBitsKHR::eIdentity, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , transform{ transform_ } { } VULKAN_HPP_CONSTEXPR CopyCommandTransformInfoQCOM( CopyCommandTransformInfoQCOM const & rhs ) VULKAN_HPP_NOEXCEPT = default; CopyCommandTransformInfoQCOM( VkCopyCommandTransformInfoQCOM const & rhs ) VULKAN_HPP_NOEXCEPT : CopyCommandTransformInfoQCOM( *reinterpret_cast( &rhs ) ) { } CopyCommandTransformInfoQCOM & operator=( CopyCommandTransformInfoQCOM const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ CopyCommandTransformInfoQCOM & operator=( VkCopyCommandTransformInfoQCOM const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 CopyCommandTransformInfoQCOM & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 CopyCommandTransformInfoQCOM & setTransform( VULKAN_HPP_NAMESPACE::SurfaceTransformFlagBitsKHR transform_ ) VULKAN_HPP_NOEXCEPT { transform = transform_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkCopyCommandTransformInfoQCOM const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkCopyCommandTransformInfoQCOM &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, transform ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( CopyCommandTransformInfoQCOM const & ) const = default; #else bool operator==( CopyCommandTransformInfoQCOM const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( transform == rhs.transform ); # endif } bool operator!=( CopyCommandTransformInfoQCOM const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eCopyCommandTransformInfoQCOM; const void * pNext = {}; VULKAN_HPP_NAMESPACE::SurfaceTransformFlagBitsKHR transform = VULKAN_HPP_NAMESPACE::SurfaceTransformFlagBitsKHR::eIdentity; }; template <> struct CppType { using Type = CopyCommandTransformInfoQCOM; }; struct CopyDescriptorSet { using NativeType = VkCopyDescriptorSet; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eCopyDescriptorSet; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR CopyDescriptorSet( VULKAN_HPP_NAMESPACE::DescriptorSet srcSet_ = {}, uint32_t srcBinding_ = {}, uint32_t srcArrayElement_ = {}, VULKAN_HPP_NAMESPACE::DescriptorSet dstSet_ = {}, uint32_t dstBinding_ = {}, uint32_t dstArrayElement_ = {}, uint32_t descriptorCount_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , srcSet{ srcSet_ } , srcBinding{ srcBinding_ } , srcArrayElement{ srcArrayElement_ } , dstSet{ dstSet_ } , dstBinding{ dstBinding_ } , dstArrayElement{ dstArrayElement_ } , descriptorCount{ descriptorCount_ } { } VULKAN_HPP_CONSTEXPR CopyDescriptorSet( CopyDescriptorSet const & rhs ) VULKAN_HPP_NOEXCEPT = default; CopyDescriptorSet( VkCopyDescriptorSet const & rhs ) VULKAN_HPP_NOEXCEPT : CopyDescriptorSet( *reinterpret_cast( &rhs ) ) {} CopyDescriptorSet & operator=( CopyDescriptorSet const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ CopyDescriptorSet & operator=( VkCopyDescriptorSet const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 CopyDescriptorSet & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 CopyDescriptorSet & setSrcSet( VULKAN_HPP_NAMESPACE::DescriptorSet srcSet_ ) VULKAN_HPP_NOEXCEPT { srcSet = srcSet_; return *this; } VULKAN_HPP_CONSTEXPR_14 CopyDescriptorSet & setSrcBinding( uint32_t srcBinding_ ) VULKAN_HPP_NOEXCEPT { srcBinding = srcBinding_; return *this; } VULKAN_HPP_CONSTEXPR_14 CopyDescriptorSet & setSrcArrayElement( uint32_t srcArrayElement_ ) VULKAN_HPP_NOEXCEPT { srcArrayElement = srcArrayElement_; return *this; } VULKAN_HPP_CONSTEXPR_14 CopyDescriptorSet & setDstSet( VULKAN_HPP_NAMESPACE::DescriptorSet dstSet_ ) VULKAN_HPP_NOEXCEPT { dstSet = dstSet_; return *this; } VULKAN_HPP_CONSTEXPR_14 CopyDescriptorSet & setDstBinding( uint32_t dstBinding_ ) VULKAN_HPP_NOEXCEPT { dstBinding = dstBinding_; return *this; } VULKAN_HPP_CONSTEXPR_14 CopyDescriptorSet & setDstArrayElement( uint32_t dstArrayElement_ ) VULKAN_HPP_NOEXCEPT { dstArrayElement = dstArrayElement_; return *this; } VULKAN_HPP_CONSTEXPR_14 CopyDescriptorSet & setDescriptorCount( uint32_t descriptorCount_ ) VULKAN_HPP_NOEXCEPT { descriptorCount = descriptorCount_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkCopyDescriptorSet const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkCopyDescriptorSet &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, srcSet, srcBinding, srcArrayElement, dstSet, dstBinding, dstArrayElement, descriptorCount ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( CopyDescriptorSet const & ) const = default; #else bool operator==( CopyDescriptorSet const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( srcSet == rhs.srcSet ) && ( srcBinding == rhs.srcBinding ) && ( srcArrayElement == rhs.srcArrayElement ) && ( dstSet == rhs.dstSet ) && ( dstBinding == rhs.dstBinding ) && ( dstArrayElement == rhs.dstArrayElement ) && ( descriptorCount == rhs.descriptorCount ); # endif } bool operator!=( CopyDescriptorSet const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eCopyDescriptorSet; const void * pNext = {}; VULKAN_HPP_NAMESPACE::DescriptorSet srcSet = {}; uint32_t srcBinding = {}; uint32_t srcArrayElement = {}; VULKAN_HPP_NAMESPACE::DescriptorSet dstSet = {}; uint32_t dstBinding = {}; uint32_t dstArrayElement = {}; uint32_t descriptorCount = {}; }; template <> struct CppType { using Type = CopyDescriptorSet; }; struct ImageCopy2 { using NativeType = VkImageCopy2; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImageCopy2; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ImageCopy2( VULKAN_HPP_NAMESPACE::ImageSubresourceLayers srcSubresource_ = {}, VULKAN_HPP_NAMESPACE::Offset3D srcOffset_ = {}, VULKAN_HPP_NAMESPACE::ImageSubresourceLayers dstSubresource_ = {}, VULKAN_HPP_NAMESPACE::Offset3D dstOffset_ = {}, VULKAN_HPP_NAMESPACE::Extent3D extent_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , srcSubresource{ srcSubresource_ } , srcOffset{ srcOffset_ } , dstSubresource{ dstSubresource_ } , dstOffset{ dstOffset_ } , extent{ extent_ } { } VULKAN_HPP_CONSTEXPR ImageCopy2( ImageCopy2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; ImageCopy2( VkImageCopy2 const & rhs ) VULKAN_HPP_NOEXCEPT : ImageCopy2( *reinterpret_cast( &rhs ) ) {} ImageCopy2 & operator=( ImageCopy2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ImageCopy2 & operator=( VkImageCopy2 const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ImageCopy2 & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageCopy2 & setSrcSubresource( VULKAN_HPP_NAMESPACE::ImageSubresourceLayers const & srcSubresource_ ) VULKAN_HPP_NOEXCEPT { srcSubresource = srcSubresource_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageCopy2 & setSrcOffset( VULKAN_HPP_NAMESPACE::Offset3D const & srcOffset_ ) VULKAN_HPP_NOEXCEPT { srcOffset = srcOffset_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageCopy2 & setDstSubresource( VULKAN_HPP_NAMESPACE::ImageSubresourceLayers const & dstSubresource_ ) VULKAN_HPP_NOEXCEPT { dstSubresource = dstSubresource_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageCopy2 & setDstOffset( VULKAN_HPP_NAMESPACE::Offset3D const & dstOffset_ ) VULKAN_HPP_NOEXCEPT { dstOffset = dstOffset_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageCopy2 & setExtent( VULKAN_HPP_NAMESPACE::Extent3D const & extent_ ) VULKAN_HPP_NOEXCEPT { extent = extent_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkImageCopy2 const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkImageCopy2 &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, srcSubresource, srcOffset, dstSubresource, dstOffset, extent ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ImageCopy2 const & ) const = default; #else bool operator==( ImageCopy2 const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( srcSubresource == rhs.srcSubresource ) && ( srcOffset == rhs.srcOffset ) && ( dstSubresource == rhs.dstSubresource ) && ( dstOffset == rhs.dstOffset ) && ( extent == rhs.extent ); # endif } bool operator!=( ImageCopy2 const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImageCopy2; const void * pNext = {}; VULKAN_HPP_NAMESPACE::ImageSubresourceLayers srcSubresource = {}; VULKAN_HPP_NAMESPACE::Offset3D srcOffset = {}; VULKAN_HPP_NAMESPACE::ImageSubresourceLayers dstSubresource = {}; VULKAN_HPP_NAMESPACE::Offset3D dstOffset = {}; VULKAN_HPP_NAMESPACE::Extent3D extent = {}; }; template <> struct CppType { using Type = ImageCopy2; }; using ImageCopy2KHR = ImageCopy2; struct CopyImageInfo2 { using NativeType = VkCopyImageInfo2; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eCopyImageInfo2; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR CopyImageInfo2( VULKAN_HPP_NAMESPACE::Image srcImage_ = {}, VULKAN_HPP_NAMESPACE::ImageLayout srcImageLayout_ = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined, VULKAN_HPP_NAMESPACE::Image dstImage_ = {}, VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout_ = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined, uint32_t regionCount_ = {}, const VULKAN_HPP_NAMESPACE::ImageCopy2 * pRegions_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , srcImage{ srcImage_ } , srcImageLayout{ srcImageLayout_ } , dstImage{ dstImage_ } , dstImageLayout{ dstImageLayout_ } , regionCount{ regionCount_ } , pRegions{ pRegions_ } { } VULKAN_HPP_CONSTEXPR CopyImageInfo2( CopyImageInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; CopyImageInfo2( VkCopyImageInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT : CopyImageInfo2( *reinterpret_cast( &rhs ) ) {} # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) CopyImageInfo2( VULKAN_HPP_NAMESPACE::Image srcImage_, VULKAN_HPP_NAMESPACE::ImageLayout srcImageLayout_, VULKAN_HPP_NAMESPACE::Image dstImage_, VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & regions_, const void * pNext_ = nullptr ) : pNext( pNext_ ) , srcImage( srcImage_ ) , srcImageLayout( srcImageLayout_ ) , dstImage( dstImage_ ) , dstImageLayout( dstImageLayout_ ) , regionCount( static_cast( regions_.size() ) ) , pRegions( regions_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ CopyImageInfo2 & operator=( CopyImageInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ CopyImageInfo2 & operator=( VkCopyImageInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 CopyImageInfo2 & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 CopyImageInfo2 & setSrcImage( VULKAN_HPP_NAMESPACE::Image srcImage_ ) VULKAN_HPP_NOEXCEPT { srcImage = srcImage_; return *this; } VULKAN_HPP_CONSTEXPR_14 CopyImageInfo2 & setSrcImageLayout( VULKAN_HPP_NAMESPACE::ImageLayout srcImageLayout_ ) VULKAN_HPP_NOEXCEPT { srcImageLayout = srcImageLayout_; return *this; } VULKAN_HPP_CONSTEXPR_14 CopyImageInfo2 & setDstImage( VULKAN_HPP_NAMESPACE::Image dstImage_ ) VULKAN_HPP_NOEXCEPT { dstImage = dstImage_; return *this; } VULKAN_HPP_CONSTEXPR_14 CopyImageInfo2 & setDstImageLayout( VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout_ ) VULKAN_HPP_NOEXCEPT { dstImageLayout = dstImageLayout_; return *this; } VULKAN_HPP_CONSTEXPR_14 CopyImageInfo2 & setRegionCount( uint32_t regionCount_ ) VULKAN_HPP_NOEXCEPT { regionCount = regionCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 CopyImageInfo2 & setPRegions( const VULKAN_HPP_NAMESPACE::ImageCopy2 * pRegions_ ) VULKAN_HPP_NOEXCEPT { pRegions = pRegions_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) CopyImageInfo2 & setRegions( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & regions_ ) VULKAN_HPP_NOEXCEPT { regionCount = static_cast( regions_.size() ); pRegions = regions_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkCopyImageInfo2 const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkCopyImageInfo2 &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, pRegions ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( CopyImageInfo2 const & ) const = default; #else bool operator==( CopyImageInfo2 const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( srcImage == rhs.srcImage ) && ( srcImageLayout == rhs.srcImageLayout ) && ( dstImage == rhs.dstImage ) && ( dstImageLayout == rhs.dstImageLayout ) && ( regionCount == rhs.regionCount ) && ( pRegions == rhs.pRegions ); # endif } bool operator!=( CopyImageInfo2 const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eCopyImageInfo2; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Image srcImage = {}; VULKAN_HPP_NAMESPACE::ImageLayout srcImageLayout = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined; VULKAN_HPP_NAMESPACE::Image dstImage = {}; VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined; uint32_t regionCount = {}; const VULKAN_HPP_NAMESPACE::ImageCopy2 * pRegions = {}; }; template <> struct CppType { using Type = CopyImageInfo2; }; using CopyImageInfo2KHR = CopyImageInfo2; struct CopyImageToBufferInfo2 { using NativeType = VkCopyImageToBufferInfo2; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eCopyImageToBufferInfo2; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR CopyImageToBufferInfo2( VULKAN_HPP_NAMESPACE::Image srcImage_ = {}, VULKAN_HPP_NAMESPACE::ImageLayout srcImageLayout_ = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined, VULKAN_HPP_NAMESPACE::Buffer dstBuffer_ = {}, uint32_t regionCount_ = {}, const VULKAN_HPP_NAMESPACE::BufferImageCopy2 * pRegions_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , srcImage{ srcImage_ } , srcImageLayout{ srcImageLayout_ } , dstBuffer{ dstBuffer_ } , regionCount{ regionCount_ } , pRegions{ pRegions_ } { } VULKAN_HPP_CONSTEXPR CopyImageToBufferInfo2( CopyImageToBufferInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; CopyImageToBufferInfo2( VkCopyImageToBufferInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT : CopyImageToBufferInfo2( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) CopyImageToBufferInfo2( VULKAN_HPP_NAMESPACE::Image srcImage_, VULKAN_HPP_NAMESPACE::ImageLayout srcImageLayout_, VULKAN_HPP_NAMESPACE::Buffer dstBuffer_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & regions_, const void * pNext_ = nullptr ) : pNext( pNext_ ) , srcImage( srcImage_ ) , srcImageLayout( srcImageLayout_ ) , dstBuffer( dstBuffer_ ) , regionCount( static_cast( regions_.size() ) ) , pRegions( regions_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ CopyImageToBufferInfo2 & operator=( CopyImageToBufferInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ CopyImageToBufferInfo2 & operator=( VkCopyImageToBufferInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 CopyImageToBufferInfo2 & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 CopyImageToBufferInfo2 & setSrcImage( VULKAN_HPP_NAMESPACE::Image srcImage_ ) VULKAN_HPP_NOEXCEPT { srcImage = srcImage_; return *this; } VULKAN_HPP_CONSTEXPR_14 CopyImageToBufferInfo2 & setSrcImageLayout( VULKAN_HPP_NAMESPACE::ImageLayout srcImageLayout_ ) VULKAN_HPP_NOEXCEPT { srcImageLayout = srcImageLayout_; return *this; } VULKAN_HPP_CONSTEXPR_14 CopyImageToBufferInfo2 & setDstBuffer( VULKAN_HPP_NAMESPACE::Buffer dstBuffer_ ) VULKAN_HPP_NOEXCEPT { dstBuffer = dstBuffer_; return *this; } VULKAN_HPP_CONSTEXPR_14 CopyImageToBufferInfo2 & setRegionCount( uint32_t regionCount_ ) VULKAN_HPP_NOEXCEPT { regionCount = regionCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 CopyImageToBufferInfo2 & setPRegions( const VULKAN_HPP_NAMESPACE::BufferImageCopy2 * pRegions_ ) VULKAN_HPP_NOEXCEPT { pRegions = pRegions_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) CopyImageToBufferInfo2 & setRegions( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & regions_ ) VULKAN_HPP_NOEXCEPT { regionCount = static_cast( regions_.size() ); pRegions = regions_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkCopyImageToBufferInfo2 const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkCopyImageToBufferInfo2 &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, srcImage, srcImageLayout, dstBuffer, regionCount, pRegions ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( CopyImageToBufferInfo2 const & ) const = default; #else bool operator==( CopyImageToBufferInfo2 const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( srcImage == rhs.srcImage ) && ( srcImageLayout == rhs.srcImageLayout ) && ( dstBuffer == rhs.dstBuffer ) && ( regionCount == rhs.regionCount ) && ( pRegions == rhs.pRegions ); # endif } bool operator!=( CopyImageToBufferInfo2 const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eCopyImageToBufferInfo2; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Image srcImage = {}; VULKAN_HPP_NAMESPACE::ImageLayout srcImageLayout = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined; VULKAN_HPP_NAMESPACE::Buffer dstBuffer = {}; uint32_t regionCount = {}; const VULKAN_HPP_NAMESPACE::BufferImageCopy2 * pRegions = {}; }; template <> struct CppType { using Type = CopyImageToBufferInfo2; }; using CopyImageToBufferInfo2KHR = CopyImageToBufferInfo2; struct CopyImageToImageInfo { using NativeType = VkCopyImageToImageInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eCopyImageToImageInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR CopyImageToImageInfo( VULKAN_HPP_NAMESPACE::HostImageCopyFlags flags_ = {}, VULKAN_HPP_NAMESPACE::Image srcImage_ = {}, VULKAN_HPP_NAMESPACE::ImageLayout srcImageLayout_ = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined, VULKAN_HPP_NAMESPACE::Image dstImage_ = {}, VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout_ = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined, uint32_t regionCount_ = {}, const VULKAN_HPP_NAMESPACE::ImageCopy2 * pRegions_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , srcImage{ srcImage_ } , srcImageLayout{ srcImageLayout_ } , dstImage{ dstImage_ } , dstImageLayout{ dstImageLayout_ } , regionCount{ regionCount_ } , pRegions{ pRegions_ } { } VULKAN_HPP_CONSTEXPR CopyImageToImageInfo( CopyImageToImageInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; CopyImageToImageInfo( VkCopyImageToImageInfo const & rhs ) VULKAN_HPP_NOEXCEPT : CopyImageToImageInfo( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) CopyImageToImageInfo( VULKAN_HPP_NAMESPACE::HostImageCopyFlags flags_, VULKAN_HPP_NAMESPACE::Image srcImage_, VULKAN_HPP_NAMESPACE::ImageLayout srcImageLayout_, VULKAN_HPP_NAMESPACE::Image dstImage_, VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & regions_, const void * pNext_ = nullptr ) : pNext( pNext_ ) , flags( flags_ ) , srcImage( srcImage_ ) , srcImageLayout( srcImageLayout_ ) , dstImage( dstImage_ ) , dstImageLayout( dstImageLayout_ ) , regionCount( static_cast( regions_.size() ) ) , pRegions( regions_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ CopyImageToImageInfo & operator=( CopyImageToImageInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ CopyImageToImageInfo & operator=( VkCopyImageToImageInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 CopyImageToImageInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 CopyImageToImageInfo & setFlags( VULKAN_HPP_NAMESPACE::HostImageCopyFlags flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 CopyImageToImageInfo & setSrcImage( VULKAN_HPP_NAMESPACE::Image srcImage_ ) VULKAN_HPP_NOEXCEPT { srcImage = srcImage_; return *this; } VULKAN_HPP_CONSTEXPR_14 CopyImageToImageInfo & setSrcImageLayout( VULKAN_HPP_NAMESPACE::ImageLayout srcImageLayout_ ) VULKAN_HPP_NOEXCEPT { srcImageLayout = srcImageLayout_; return *this; } VULKAN_HPP_CONSTEXPR_14 CopyImageToImageInfo & setDstImage( VULKAN_HPP_NAMESPACE::Image dstImage_ ) VULKAN_HPP_NOEXCEPT { dstImage = dstImage_; return *this; } VULKAN_HPP_CONSTEXPR_14 CopyImageToImageInfo & setDstImageLayout( VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout_ ) VULKAN_HPP_NOEXCEPT { dstImageLayout = dstImageLayout_; return *this; } VULKAN_HPP_CONSTEXPR_14 CopyImageToImageInfo & setRegionCount( uint32_t regionCount_ ) VULKAN_HPP_NOEXCEPT { regionCount = regionCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 CopyImageToImageInfo & setPRegions( const VULKAN_HPP_NAMESPACE::ImageCopy2 * pRegions_ ) VULKAN_HPP_NOEXCEPT { pRegions = pRegions_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) CopyImageToImageInfo & setRegions( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & regions_ ) VULKAN_HPP_NOEXCEPT { regionCount = static_cast( regions_.size() ); pRegions = regions_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkCopyImageToImageInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkCopyImageToImageInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, pRegions ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( CopyImageToImageInfo const & ) const = default; #else bool operator==( CopyImageToImageInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( srcImage == rhs.srcImage ) && ( srcImageLayout == rhs.srcImageLayout ) && ( dstImage == rhs.dstImage ) && ( dstImageLayout == rhs.dstImageLayout ) && ( regionCount == rhs.regionCount ) && ( pRegions == rhs.pRegions ); # endif } bool operator!=( CopyImageToImageInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eCopyImageToImageInfo; const void * pNext = {}; VULKAN_HPP_NAMESPACE::HostImageCopyFlags flags = {}; VULKAN_HPP_NAMESPACE::Image srcImage = {}; VULKAN_HPP_NAMESPACE::ImageLayout srcImageLayout = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined; VULKAN_HPP_NAMESPACE::Image dstImage = {}; VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined; uint32_t regionCount = {}; const VULKAN_HPP_NAMESPACE::ImageCopy2 * pRegions = {}; }; template <> struct CppType { using Type = CopyImageToImageInfo; }; using CopyImageToImageInfoEXT = CopyImageToImageInfo; struct ImageToMemoryCopy { using NativeType = VkImageToMemoryCopy; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImageToMemoryCopy; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ImageToMemoryCopy( void * pHostPointer_ = {}, uint32_t memoryRowLength_ = {}, uint32_t memoryImageHeight_ = {}, VULKAN_HPP_NAMESPACE::ImageSubresourceLayers imageSubresource_ = {}, VULKAN_HPP_NAMESPACE::Offset3D imageOffset_ = {}, VULKAN_HPP_NAMESPACE::Extent3D imageExtent_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , pHostPointer{ pHostPointer_ } , memoryRowLength{ memoryRowLength_ } , memoryImageHeight{ memoryImageHeight_ } , imageSubresource{ imageSubresource_ } , imageOffset{ imageOffset_ } , imageExtent{ imageExtent_ } { } VULKAN_HPP_CONSTEXPR ImageToMemoryCopy( ImageToMemoryCopy const & rhs ) VULKAN_HPP_NOEXCEPT = default; ImageToMemoryCopy( VkImageToMemoryCopy const & rhs ) VULKAN_HPP_NOEXCEPT : ImageToMemoryCopy( *reinterpret_cast( &rhs ) ) {} ImageToMemoryCopy & operator=( ImageToMemoryCopy const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ImageToMemoryCopy & operator=( VkImageToMemoryCopy const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ImageToMemoryCopy & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageToMemoryCopy & setPHostPointer( void * pHostPointer_ ) VULKAN_HPP_NOEXCEPT { pHostPointer = pHostPointer_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageToMemoryCopy & setMemoryRowLength( uint32_t memoryRowLength_ ) VULKAN_HPP_NOEXCEPT { memoryRowLength = memoryRowLength_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageToMemoryCopy & setMemoryImageHeight( uint32_t memoryImageHeight_ ) VULKAN_HPP_NOEXCEPT { memoryImageHeight = memoryImageHeight_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageToMemoryCopy & setImageSubresource( VULKAN_HPP_NAMESPACE::ImageSubresourceLayers const & imageSubresource_ ) VULKAN_HPP_NOEXCEPT { imageSubresource = imageSubresource_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageToMemoryCopy & setImageOffset( VULKAN_HPP_NAMESPACE::Offset3D const & imageOffset_ ) VULKAN_HPP_NOEXCEPT { imageOffset = imageOffset_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageToMemoryCopy & setImageExtent( VULKAN_HPP_NAMESPACE::Extent3D const & imageExtent_ ) VULKAN_HPP_NOEXCEPT { imageExtent = imageExtent_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkImageToMemoryCopy const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkImageToMemoryCopy &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, pHostPointer, memoryRowLength, memoryImageHeight, imageSubresource, imageOffset, imageExtent ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ImageToMemoryCopy const & ) const = default; #else bool operator==( ImageToMemoryCopy const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( pHostPointer == rhs.pHostPointer ) && ( memoryRowLength == rhs.memoryRowLength ) && ( memoryImageHeight == rhs.memoryImageHeight ) && ( imageSubresource == rhs.imageSubresource ) && ( imageOffset == rhs.imageOffset ) && ( imageExtent == rhs.imageExtent ); # endif } bool operator!=( ImageToMemoryCopy const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImageToMemoryCopy; const void * pNext = {}; void * pHostPointer = {}; uint32_t memoryRowLength = {}; uint32_t memoryImageHeight = {}; VULKAN_HPP_NAMESPACE::ImageSubresourceLayers imageSubresource = {}; VULKAN_HPP_NAMESPACE::Offset3D imageOffset = {}; VULKAN_HPP_NAMESPACE::Extent3D imageExtent = {}; }; template <> struct CppType { using Type = ImageToMemoryCopy; }; using ImageToMemoryCopyEXT = ImageToMemoryCopy; struct CopyImageToMemoryInfo { using NativeType = VkCopyImageToMemoryInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eCopyImageToMemoryInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR CopyImageToMemoryInfo( VULKAN_HPP_NAMESPACE::HostImageCopyFlags flags_ = {}, VULKAN_HPP_NAMESPACE::Image srcImage_ = {}, VULKAN_HPP_NAMESPACE::ImageLayout srcImageLayout_ = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined, uint32_t regionCount_ = {}, const VULKAN_HPP_NAMESPACE::ImageToMemoryCopy * pRegions_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , srcImage{ srcImage_ } , srcImageLayout{ srcImageLayout_ } , regionCount{ regionCount_ } , pRegions{ pRegions_ } { } VULKAN_HPP_CONSTEXPR CopyImageToMemoryInfo( CopyImageToMemoryInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; CopyImageToMemoryInfo( VkCopyImageToMemoryInfo const & rhs ) VULKAN_HPP_NOEXCEPT : CopyImageToMemoryInfo( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) CopyImageToMemoryInfo( VULKAN_HPP_NAMESPACE::HostImageCopyFlags flags_, VULKAN_HPP_NAMESPACE::Image srcImage_, VULKAN_HPP_NAMESPACE::ImageLayout srcImageLayout_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & regions_, const void * pNext_ = nullptr ) : pNext( pNext_ ) , flags( flags_ ) , srcImage( srcImage_ ) , srcImageLayout( srcImageLayout_ ) , regionCount( static_cast( regions_.size() ) ) , pRegions( regions_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ CopyImageToMemoryInfo & operator=( CopyImageToMemoryInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ CopyImageToMemoryInfo & operator=( VkCopyImageToMemoryInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 CopyImageToMemoryInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 CopyImageToMemoryInfo & setFlags( VULKAN_HPP_NAMESPACE::HostImageCopyFlags flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 CopyImageToMemoryInfo & setSrcImage( VULKAN_HPP_NAMESPACE::Image srcImage_ ) VULKAN_HPP_NOEXCEPT { srcImage = srcImage_; return *this; } VULKAN_HPP_CONSTEXPR_14 CopyImageToMemoryInfo & setSrcImageLayout( VULKAN_HPP_NAMESPACE::ImageLayout srcImageLayout_ ) VULKAN_HPP_NOEXCEPT { srcImageLayout = srcImageLayout_; return *this; } VULKAN_HPP_CONSTEXPR_14 CopyImageToMemoryInfo & setRegionCount( uint32_t regionCount_ ) VULKAN_HPP_NOEXCEPT { regionCount = regionCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 CopyImageToMemoryInfo & setPRegions( const VULKAN_HPP_NAMESPACE::ImageToMemoryCopy * pRegions_ ) VULKAN_HPP_NOEXCEPT { pRegions = pRegions_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) CopyImageToMemoryInfo & setRegions( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & regions_ ) VULKAN_HPP_NOEXCEPT { regionCount = static_cast( regions_.size() ); pRegions = regions_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkCopyImageToMemoryInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkCopyImageToMemoryInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, srcImage, srcImageLayout, regionCount, pRegions ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( CopyImageToMemoryInfo const & ) const = default; #else bool operator==( CopyImageToMemoryInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( srcImage == rhs.srcImage ) && ( srcImageLayout == rhs.srcImageLayout ) && ( regionCount == rhs.regionCount ) && ( pRegions == rhs.pRegions ); # endif } bool operator!=( CopyImageToMemoryInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eCopyImageToMemoryInfo; const void * pNext = {}; VULKAN_HPP_NAMESPACE::HostImageCopyFlags flags = {}; VULKAN_HPP_NAMESPACE::Image srcImage = {}; VULKAN_HPP_NAMESPACE::ImageLayout srcImageLayout = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined; uint32_t regionCount = {}; const VULKAN_HPP_NAMESPACE::ImageToMemoryCopy * pRegions = {}; }; template <> struct CppType { using Type = CopyImageToMemoryInfo; }; using CopyImageToMemoryInfoEXT = CopyImageToMemoryInfo; struct CopyMemoryIndirectCommandNV { using NativeType = VkCopyMemoryIndirectCommandNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR CopyMemoryIndirectCommandNV( VULKAN_HPP_NAMESPACE::DeviceAddress srcAddress_ = {}, VULKAN_HPP_NAMESPACE::DeviceAddress dstAddress_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize size_ = {} ) VULKAN_HPP_NOEXCEPT : srcAddress{ srcAddress_ } , dstAddress{ dstAddress_ } , size{ size_ } { } VULKAN_HPP_CONSTEXPR CopyMemoryIndirectCommandNV( CopyMemoryIndirectCommandNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; CopyMemoryIndirectCommandNV( VkCopyMemoryIndirectCommandNV const & rhs ) VULKAN_HPP_NOEXCEPT : CopyMemoryIndirectCommandNV( *reinterpret_cast( &rhs ) ) { } CopyMemoryIndirectCommandNV & operator=( CopyMemoryIndirectCommandNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ CopyMemoryIndirectCommandNV & operator=( VkCopyMemoryIndirectCommandNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 CopyMemoryIndirectCommandNV & setSrcAddress( VULKAN_HPP_NAMESPACE::DeviceAddress srcAddress_ ) VULKAN_HPP_NOEXCEPT { srcAddress = srcAddress_; return *this; } VULKAN_HPP_CONSTEXPR_14 CopyMemoryIndirectCommandNV & setDstAddress( VULKAN_HPP_NAMESPACE::DeviceAddress dstAddress_ ) VULKAN_HPP_NOEXCEPT { dstAddress = dstAddress_; return *this; } VULKAN_HPP_CONSTEXPR_14 CopyMemoryIndirectCommandNV & setSize( VULKAN_HPP_NAMESPACE::DeviceSize size_ ) VULKAN_HPP_NOEXCEPT { size = size_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkCopyMemoryIndirectCommandNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkCopyMemoryIndirectCommandNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( srcAddress, dstAddress, size ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( CopyMemoryIndirectCommandNV const & ) const = default; #else bool operator==( CopyMemoryIndirectCommandNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( srcAddress == rhs.srcAddress ) && ( dstAddress == rhs.dstAddress ) && ( size == rhs.size ); # endif } bool operator!=( CopyMemoryIndirectCommandNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::DeviceAddress srcAddress = {}; VULKAN_HPP_NAMESPACE::DeviceAddress dstAddress = {}; VULKAN_HPP_NAMESPACE::DeviceSize size = {}; }; struct CopyMemoryToAccelerationStructureInfoKHR { using NativeType = VkCopyMemoryToAccelerationStructureInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eCopyMemoryToAccelerationStructureInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 CopyMemoryToAccelerationStructureInfoKHR( VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR src_ = {}, VULKAN_HPP_NAMESPACE::AccelerationStructureKHR dst_ = {}, VULKAN_HPP_NAMESPACE::CopyAccelerationStructureModeKHR mode_ = VULKAN_HPP_NAMESPACE::CopyAccelerationStructureModeKHR::eClone, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , src{ src_ } , dst{ dst_ } , mode{ mode_ } { } VULKAN_HPP_CONSTEXPR_14 CopyMemoryToAccelerationStructureInfoKHR( CopyMemoryToAccelerationStructureInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; CopyMemoryToAccelerationStructureInfoKHR( VkCopyMemoryToAccelerationStructureInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : CopyMemoryToAccelerationStructureInfoKHR( *reinterpret_cast( &rhs ) ) { } CopyMemoryToAccelerationStructureInfoKHR & operator=( CopyMemoryToAccelerationStructureInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ CopyMemoryToAccelerationStructureInfoKHR & operator=( VkCopyMemoryToAccelerationStructureInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 CopyMemoryToAccelerationStructureInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 CopyMemoryToAccelerationStructureInfoKHR & setSrc( VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR const & src_ ) VULKAN_HPP_NOEXCEPT { src = src_; return *this; } VULKAN_HPP_CONSTEXPR_14 CopyMemoryToAccelerationStructureInfoKHR & setDst( VULKAN_HPP_NAMESPACE::AccelerationStructureKHR dst_ ) VULKAN_HPP_NOEXCEPT { dst = dst_; return *this; } VULKAN_HPP_CONSTEXPR_14 CopyMemoryToAccelerationStructureInfoKHR & setMode( VULKAN_HPP_NAMESPACE::CopyAccelerationStructureModeKHR mode_ ) VULKAN_HPP_NOEXCEPT { mode = mode_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkCopyMemoryToAccelerationStructureInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkCopyMemoryToAccelerationStructureInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, src, dst, mode ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eCopyMemoryToAccelerationStructureInfoKHR; const void * pNext = {}; VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR src = {}; VULKAN_HPP_NAMESPACE::AccelerationStructureKHR dst = {}; VULKAN_HPP_NAMESPACE::CopyAccelerationStructureModeKHR mode = VULKAN_HPP_NAMESPACE::CopyAccelerationStructureModeKHR::eClone; }; template <> struct CppType { using Type = CopyMemoryToAccelerationStructureInfoKHR; }; struct CopyMemoryToImageIndirectCommandNV { using NativeType = VkCopyMemoryToImageIndirectCommandNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR CopyMemoryToImageIndirectCommandNV( VULKAN_HPP_NAMESPACE::DeviceAddress srcAddress_ = {}, uint32_t bufferRowLength_ = {}, uint32_t bufferImageHeight_ = {}, VULKAN_HPP_NAMESPACE::ImageSubresourceLayers imageSubresource_ = {}, VULKAN_HPP_NAMESPACE::Offset3D imageOffset_ = {}, VULKAN_HPP_NAMESPACE::Extent3D imageExtent_ = {} ) VULKAN_HPP_NOEXCEPT : srcAddress{ srcAddress_ } , bufferRowLength{ bufferRowLength_ } , bufferImageHeight{ bufferImageHeight_ } , imageSubresource{ imageSubresource_ } , imageOffset{ imageOffset_ } , imageExtent{ imageExtent_ } { } VULKAN_HPP_CONSTEXPR CopyMemoryToImageIndirectCommandNV( CopyMemoryToImageIndirectCommandNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; CopyMemoryToImageIndirectCommandNV( VkCopyMemoryToImageIndirectCommandNV const & rhs ) VULKAN_HPP_NOEXCEPT : CopyMemoryToImageIndirectCommandNV( *reinterpret_cast( &rhs ) ) { } CopyMemoryToImageIndirectCommandNV & operator=( CopyMemoryToImageIndirectCommandNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ CopyMemoryToImageIndirectCommandNV & operator=( VkCopyMemoryToImageIndirectCommandNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 CopyMemoryToImageIndirectCommandNV & setSrcAddress( VULKAN_HPP_NAMESPACE::DeviceAddress srcAddress_ ) VULKAN_HPP_NOEXCEPT { srcAddress = srcAddress_; return *this; } VULKAN_HPP_CONSTEXPR_14 CopyMemoryToImageIndirectCommandNV & setBufferRowLength( uint32_t bufferRowLength_ ) VULKAN_HPP_NOEXCEPT { bufferRowLength = bufferRowLength_; return *this; } VULKAN_HPP_CONSTEXPR_14 CopyMemoryToImageIndirectCommandNV & setBufferImageHeight( uint32_t bufferImageHeight_ ) VULKAN_HPP_NOEXCEPT { bufferImageHeight = bufferImageHeight_; return *this; } VULKAN_HPP_CONSTEXPR_14 CopyMemoryToImageIndirectCommandNV & setImageSubresource( VULKAN_HPP_NAMESPACE::ImageSubresourceLayers const & imageSubresource_ ) VULKAN_HPP_NOEXCEPT { imageSubresource = imageSubresource_; return *this; } VULKAN_HPP_CONSTEXPR_14 CopyMemoryToImageIndirectCommandNV & setImageOffset( VULKAN_HPP_NAMESPACE::Offset3D const & imageOffset_ ) VULKAN_HPP_NOEXCEPT { imageOffset = imageOffset_; return *this; } VULKAN_HPP_CONSTEXPR_14 CopyMemoryToImageIndirectCommandNV & setImageExtent( VULKAN_HPP_NAMESPACE::Extent3D const & imageExtent_ ) VULKAN_HPP_NOEXCEPT { imageExtent = imageExtent_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkCopyMemoryToImageIndirectCommandNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkCopyMemoryToImageIndirectCommandNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( srcAddress, bufferRowLength, bufferImageHeight, imageSubresource, imageOffset, imageExtent ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( CopyMemoryToImageIndirectCommandNV const & ) const = default; #else bool operator==( CopyMemoryToImageIndirectCommandNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( srcAddress == rhs.srcAddress ) && ( bufferRowLength == rhs.bufferRowLength ) && ( bufferImageHeight == rhs.bufferImageHeight ) && ( imageSubresource == rhs.imageSubresource ) && ( imageOffset == rhs.imageOffset ) && ( imageExtent == rhs.imageExtent ); # endif } bool operator!=( CopyMemoryToImageIndirectCommandNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::DeviceAddress srcAddress = {}; uint32_t bufferRowLength = {}; uint32_t bufferImageHeight = {}; VULKAN_HPP_NAMESPACE::ImageSubresourceLayers imageSubresource = {}; VULKAN_HPP_NAMESPACE::Offset3D imageOffset = {}; VULKAN_HPP_NAMESPACE::Extent3D imageExtent = {}; }; struct MemoryToImageCopy { using NativeType = VkMemoryToImageCopy; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eMemoryToImageCopy; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR MemoryToImageCopy( const void * pHostPointer_ = {}, uint32_t memoryRowLength_ = {}, uint32_t memoryImageHeight_ = {}, VULKAN_HPP_NAMESPACE::ImageSubresourceLayers imageSubresource_ = {}, VULKAN_HPP_NAMESPACE::Offset3D imageOffset_ = {}, VULKAN_HPP_NAMESPACE::Extent3D imageExtent_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , pHostPointer{ pHostPointer_ } , memoryRowLength{ memoryRowLength_ } , memoryImageHeight{ memoryImageHeight_ } , imageSubresource{ imageSubresource_ } , imageOffset{ imageOffset_ } , imageExtent{ imageExtent_ } { } VULKAN_HPP_CONSTEXPR MemoryToImageCopy( MemoryToImageCopy const & rhs ) VULKAN_HPP_NOEXCEPT = default; MemoryToImageCopy( VkMemoryToImageCopy const & rhs ) VULKAN_HPP_NOEXCEPT : MemoryToImageCopy( *reinterpret_cast( &rhs ) ) {} MemoryToImageCopy & operator=( MemoryToImageCopy const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ MemoryToImageCopy & operator=( VkMemoryToImageCopy const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 MemoryToImageCopy & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 MemoryToImageCopy & setPHostPointer( const void * pHostPointer_ ) VULKAN_HPP_NOEXCEPT { pHostPointer = pHostPointer_; return *this; } VULKAN_HPP_CONSTEXPR_14 MemoryToImageCopy & setMemoryRowLength( uint32_t memoryRowLength_ ) VULKAN_HPP_NOEXCEPT { memoryRowLength = memoryRowLength_; return *this; } VULKAN_HPP_CONSTEXPR_14 MemoryToImageCopy & setMemoryImageHeight( uint32_t memoryImageHeight_ ) VULKAN_HPP_NOEXCEPT { memoryImageHeight = memoryImageHeight_; return *this; } VULKAN_HPP_CONSTEXPR_14 MemoryToImageCopy & setImageSubresource( VULKAN_HPP_NAMESPACE::ImageSubresourceLayers const & imageSubresource_ ) VULKAN_HPP_NOEXCEPT { imageSubresource = imageSubresource_; return *this; } VULKAN_HPP_CONSTEXPR_14 MemoryToImageCopy & setImageOffset( VULKAN_HPP_NAMESPACE::Offset3D const & imageOffset_ ) VULKAN_HPP_NOEXCEPT { imageOffset = imageOffset_; return *this; } VULKAN_HPP_CONSTEXPR_14 MemoryToImageCopy & setImageExtent( VULKAN_HPP_NAMESPACE::Extent3D const & imageExtent_ ) VULKAN_HPP_NOEXCEPT { imageExtent = imageExtent_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkMemoryToImageCopy const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkMemoryToImageCopy &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, pHostPointer, memoryRowLength, memoryImageHeight, imageSubresource, imageOffset, imageExtent ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( MemoryToImageCopy const & ) const = default; #else bool operator==( MemoryToImageCopy const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( pHostPointer == rhs.pHostPointer ) && ( memoryRowLength == rhs.memoryRowLength ) && ( memoryImageHeight == rhs.memoryImageHeight ) && ( imageSubresource == rhs.imageSubresource ) && ( imageOffset == rhs.imageOffset ) && ( imageExtent == rhs.imageExtent ); # endif } bool operator!=( MemoryToImageCopy const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eMemoryToImageCopy; const void * pNext = {}; const void * pHostPointer = {}; uint32_t memoryRowLength = {}; uint32_t memoryImageHeight = {}; VULKAN_HPP_NAMESPACE::ImageSubresourceLayers imageSubresource = {}; VULKAN_HPP_NAMESPACE::Offset3D imageOffset = {}; VULKAN_HPP_NAMESPACE::Extent3D imageExtent = {}; }; template <> struct CppType { using Type = MemoryToImageCopy; }; using MemoryToImageCopyEXT = MemoryToImageCopy; struct CopyMemoryToImageInfo { using NativeType = VkCopyMemoryToImageInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eCopyMemoryToImageInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR CopyMemoryToImageInfo( VULKAN_HPP_NAMESPACE::HostImageCopyFlags flags_ = {}, VULKAN_HPP_NAMESPACE::Image dstImage_ = {}, VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout_ = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined, uint32_t regionCount_ = {}, const VULKAN_HPP_NAMESPACE::MemoryToImageCopy * pRegions_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , dstImage{ dstImage_ } , dstImageLayout{ dstImageLayout_ } , regionCount{ regionCount_ } , pRegions{ pRegions_ } { } VULKAN_HPP_CONSTEXPR CopyMemoryToImageInfo( CopyMemoryToImageInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; CopyMemoryToImageInfo( VkCopyMemoryToImageInfo const & rhs ) VULKAN_HPP_NOEXCEPT : CopyMemoryToImageInfo( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) CopyMemoryToImageInfo( VULKAN_HPP_NAMESPACE::HostImageCopyFlags flags_, VULKAN_HPP_NAMESPACE::Image dstImage_, VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & regions_, const void * pNext_ = nullptr ) : pNext( pNext_ ) , flags( flags_ ) , dstImage( dstImage_ ) , dstImageLayout( dstImageLayout_ ) , regionCount( static_cast( regions_.size() ) ) , pRegions( regions_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ CopyMemoryToImageInfo & operator=( CopyMemoryToImageInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ CopyMemoryToImageInfo & operator=( VkCopyMemoryToImageInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 CopyMemoryToImageInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 CopyMemoryToImageInfo & setFlags( VULKAN_HPP_NAMESPACE::HostImageCopyFlags flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 CopyMemoryToImageInfo & setDstImage( VULKAN_HPP_NAMESPACE::Image dstImage_ ) VULKAN_HPP_NOEXCEPT { dstImage = dstImage_; return *this; } VULKAN_HPP_CONSTEXPR_14 CopyMemoryToImageInfo & setDstImageLayout( VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout_ ) VULKAN_HPP_NOEXCEPT { dstImageLayout = dstImageLayout_; return *this; } VULKAN_HPP_CONSTEXPR_14 CopyMemoryToImageInfo & setRegionCount( uint32_t regionCount_ ) VULKAN_HPP_NOEXCEPT { regionCount = regionCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 CopyMemoryToImageInfo & setPRegions( const VULKAN_HPP_NAMESPACE::MemoryToImageCopy * pRegions_ ) VULKAN_HPP_NOEXCEPT { pRegions = pRegions_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) CopyMemoryToImageInfo & setRegions( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & regions_ ) VULKAN_HPP_NOEXCEPT { regionCount = static_cast( regions_.size() ); pRegions = regions_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkCopyMemoryToImageInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkCopyMemoryToImageInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, dstImage, dstImageLayout, regionCount, pRegions ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( CopyMemoryToImageInfo const & ) const = default; #else bool operator==( CopyMemoryToImageInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( dstImage == rhs.dstImage ) && ( dstImageLayout == rhs.dstImageLayout ) && ( regionCount == rhs.regionCount ) && ( pRegions == rhs.pRegions ); # endif } bool operator!=( CopyMemoryToImageInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eCopyMemoryToImageInfo; const void * pNext = {}; VULKAN_HPP_NAMESPACE::HostImageCopyFlags flags = {}; VULKAN_HPP_NAMESPACE::Image dstImage = {}; VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined; uint32_t regionCount = {}; const VULKAN_HPP_NAMESPACE::MemoryToImageCopy * pRegions = {}; }; template <> struct CppType { using Type = CopyMemoryToImageInfo; }; using CopyMemoryToImageInfoEXT = CopyMemoryToImageInfo; struct CopyMemoryToMicromapInfoEXT { using NativeType = VkCopyMemoryToMicromapInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eCopyMemoryToMicromapInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 CopyMemoryToMicromapInfoEXT( VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR src_ = {}, VULKAN_HPP_NAMESPACE::MicromapEXT dst_ = {}, VULKAN_HPP_NAMESPACE::CopyMicromapModeEXT mode_ = VULKAN_HPP_NAMESPACE::CopyMicromapModeEXT::eClone, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , src{ src_ } , dst{ dst_ } , mode{ mode_ } { } VULKAN_HPP_CONSTEXPR_14 CopyMemoryToMicromapInfoEXT( CopyMemoryToMicromapInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; CopyMemoryToMicromapInfoEXT( VkCopyMemoryToMicromapInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : CopyMemoryToMicromapInfoEXT( *reinterpret_cast( &rhs ) ) { } CopyMemoryToMicromapInfoEXT & operator=( CopyMemoryToMicromapInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ CopyMemoryToMicromapInfoEXT & operator=( VkCopyMemoryToMicromapInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 CopyMemoryToMicromapInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 CopyMemoryToMicromapInfoEXT & setSrc( VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR const & src_ ) VULKAN_HPP_NOEXCEPT { src = src_; return *this; } VULKAN_HPP_CONSTEXPR_14 CopyMemoryToMicromapInfoEXT & setDst( VULKAN_HPP_NAMESPACE::MicromapEXT dst_ ) VULKAN_HPP_NOEXCEPT { dst = dst_; return *this; } VULKAN_HPP_CONSTEXPR_14 CopyMemoryToMicromapInfoEXT & setMode( VULKAN_HPP_NAMESPACE::CopyMicromapModeEXT mode_ ) VULKAN_HPP_NOEXCEPT { mode = mode_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkCopyMemoryToMicromapInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkCopyMemoryToMicromapInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, src, dst, mode ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eCopyMemoryToMicromapInfoEXT; const void * pNext = {}; VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR src = {}; VULKAN_HPP_NAMESPACE::MicromapEXT dst = {}; VULKAN_HPP_NAMESPACE::CopyMicromapModeEXT mode = VULKAN_HPP_NAMESPACE::CopyMicromapModeEXT::eClone; }; template <> struct CppType { using Type = CopyMemoryToMicromapInfoEXT; }; struct CopyMicromapInfoEXT { using NativeType = VkCopyMicromapInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eCopyMicromapInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR CopyMicromapInfoEXT( VULKAN_HPP_NAMESPACE::MicromapEXT src_ = {}, VULKAN_HPP_NAMESPACE::MicromapEXT dst_ = {}, VULKAN_HPP_NAMESPACE::CopyMicromapModeEXT mode_ = VULKAN_HPP_NAMESPACE::CopyMicromapModeEXT::eClone, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , src{ src_ } , dst{ dst_ } , mode{ mode_ } { } VULKAN_HPP_CONSTEXPR CopyMicromapInfoEXT( CopyMicromapInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; CopyMicromapInfoEXT( VkCopyMicromapInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : CopyMicromapInfoEXT( *reinterpret_cast( &rhs ) ) { } CopyMicromapInfoEXT & operator=( CopyMicromapInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ CopyMicromapInfoEXT & operator=( VkCopyMicromapInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 CopyMicromapInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 CopyMicromapInfoEXT & setSrc( VULKAN_HPP_NAMESPACE::MicromapEXT src_ ) VULKAN_HPP_NOEXCEPT { src = src_; return *this; } VULKAN_HPP_CONSTEXPR_14 CopyMicromapInfoEXT & setDst( VULKAN_HPP_NAMESPACE::MicromapEXT dst_ ) VULKAN_HPP_NOEXCEPT { dst = dst_; return *this; } VULKAN_HPP_CONSTEXPR_14 CopyMicromapInfoEXT & setMode( VULKAN_HPP_NAMESPACE::CopyMicromapModeEXT mode_ ) VULKAN_HPP_NOEXCEPT { mode = mode_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkCopyMicromapInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkCopyMicromapInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, src, dst, mode ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( CopyMicromapInfoEXT const & ) const = default; #else bool operator==( CopyMicromapInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( src == rhs.src ) && ( dst == rhs.dst ) && ( mode == rhs.mode ); # endif } bool operator!=( CopyMicromapInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eCopyMicromapInfoEXT; const void * pNext = {}; VULKAN_HPP_NAMESPACE::MicromapEXT src = {}; VULKAN_HPP_NAMESPACE::MicromapEXT dst = {}; VULKAN_HPP_NAMESPACE::CopyMicromapModeEXT mode = VULKAN_HPP_NAMESPACE::CopyMicromapModeEXT::eClone; }; template <> struct CppType { using Type = CopyMicromapInfoEXT; }; struct CopyMicromapToMemoryInfoEXT { using NativeType = VkCopyMicromapToMemoryInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eCopyMicromapToMemoryInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 CopyMicromapToMemoryInfoEXT( VULKAN_HPP_NAMESPACE::MicromapEXT src_ = {}, VULKAN_HPP_NAMESPACE::DeviceOrHostAddressKHR dst_ = {}, VULKAN_HPP_NAMESPACE::CopyMicromapModeEXT mode_ = VULKAN_HPP_NAMESPACE::CopyMicromapModeEXT::eClone, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , src{ src_ } , dst{ dst_ } , mode{ mode_ } { } VULKAN_HPP_CONSTEXPR_14 CopyMicromapToMemoryInfoEXT( CopyMicromapToMemoryInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; CopyMicromapToMemoryInfoEXT( VkCopyMicromapToMemoryInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : CopyMicromapToMemoryInfoEXT( *reinterpret_cast( &rhs ) ) { } CopyMicromapToMemoryInfoEXT & operator=( CopyMicromapToMemoryInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ CopyMicromapToMemoryInfoEXT & operator=( VkCopyMicromapToMemoryInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 CopyMicromapToMemoryInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 CopyMicromapToMemoryInfoEXT & setSrc( VULKAN_HPP_NAMESPACE::MicromapEXT src_ ) VULKAN_HPP_NOEXCEPT { src = src_; return *this; } VULKAN_HPP_CONSTEXPR_14 CopyMicromapToMemoryInfoEXT & setDst( VULKAN_HPP_NAMESPACE::DeviceOrHostAddressKHR const & dst_ ) VULKAN_HPP_NOEXCEPT { dst = dst_; return *this; } VULKAN_HPP_CONSTEXPR_14 CopyMicromapToMemoryInfoEXT & setMode( VULKAN_HPP_NAMESPACE::CopyMicromapModeEXT mode_ ) VULKAN_HPP_NOEXCEPT { mode = mode_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkCopyMicromapToMemoryInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkCopyMicromapToMemoryInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, src, dst, mode ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eCopyMicromapToMemoryInfoEXT; const void * pNext = {}; VULKAN_HPP_NAMESPACE::MicromapEXT src = {}; VULKAN_HPP_NAMESPACE::DeviceOrHostAddressKHR dst = {}; VULKAN_HPP_NAMESPACE::CopyMicromapModeEXT mode = VULKAN_HPP_NAMESPACE::CopyMicromapModeEXT::eClone; }; template <> struct CppType { using Type = CopyMicromapToMemoryInfoEXT; }; struct CuFunctionCreateInfoNVX { using NativeType = VkCuFunctionCreateInfoNVX; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eCuFunctionCreateInfoNVX; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR CuFunctionCreateInfoNVX( VULKAN_HPP_NAMESPACE::CuModuleNVX module_ = {}, const char * pName_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , module{ module_ } , pName{ pName_ } { } VULKAN_HPP_CONSTEXPR CuFunctionCreateInfoNVX( CuFunctionCreateInfoNVX const & rhs ) VULKAN_HPP_NOEXCEPT = default; CuFunctionCreateInfoNVX( VkCuFunctionCreateInfoNVX const & rhs ) VULKAN_HPP_NOEXCEPT : CuFunctionCreateInfoNVX( *reinterpret_cast( &rhs ) ) { } CuFunctionCreateInfoNVX & operator=( CuFunctionCreateInfoNVX const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ CuFunctionCreateInfoNVX & operator=( VkCuFunctionCreateInfoNVX const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 CuFunctionCreateInfoNVX & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 CuFunctionCreateInfoNVX & setModule( VULKAN_HPP_NAMESPACE::CuModuleNVX module_ ) VULKAN_HPP_NOEXCEPT { module = module_; return *this; } VULKAN_HPP_CONSTEXPR_14 CuFunctionCreateInfoNVX & setPName( const char * pName_ ) VULKAN_HPP_NOEXCEPT { pName = pName_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkCuFunctionCreateInfoNVX const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkCuFunctionCreateInfoNVX &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, module, pName ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) std::strong_ordering operator<=>( CuFunctionCreateInfoNVX const & rhs ) const VULKAN_HPP_NOEXCEPT { if ( auto cmp = sType <=> rhs.sType; cmp != 0 ) return cmp; if ( auto cmp = pNext <=> rhs.pNext; cmp != 0 ) return cmp; if ( auto cmp = module <=> rhs.module; cmp != 0 ) return cmp; if ( pName != rhs.pName ) if ( auto cmp = strcmp( pName, rhs.pName ); cmp != 0 ) return ( cmp < 0 ) ? std::strong_ordering::less : std::strong_ordering::greater; return std::strong_ordering::equivalent; } #endif bool operator==( CuFunctionCreateInfoNVX const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( module == rhs.module ) && ( ( pName == rhs.pName ) || ( strcmp( pName, rhs.pName ) == 0 ) ); } bool operator!=( CuFunctionCreateInfoNVX const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eCuFunctionCreateInfoNVX; const void * pNext = {}; VULKAN_HPP_NAMESPACE::CuModuleNVX module = {}; const char * pName = {}; }; template <> struct CppType { using Type = CuFunctionCreateInfoNVX; }; struct CuLaunchInfoNVX { using NativeType = VkCuLaunchInfoNVX; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eCuLaunchInfoNVX; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR CuLaunchInfoNVX( VULKAN_HPP_NAMESPACE::CuFunctionNVX function_ = {}, uint32_t gridDimX_ = {}, uint32_t gridDimY_ = {}, uint32_t gridDimZ_ = {}, uint32_t blockDimX_ = {}, uint32_t blockDimY_ = {}, uint32_t blockDimZ_ = {}, uint32_t sharedMemBytes_ = {}, size_t paramCount_ = {}, const void * const * pParams_ = {}, size_t extraCount_ = {}, const void * const * pExtras_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , function{ function_ } , gridDimX{ gridDimX_ } , gridDimY{ gridDimY_ } , gridDimZ{ gridDimZ_ } , blockDimX{ blockDimX_ } , blockDimY{ blockDimY_ } , blockDimZ{ blockDimZ_ } , sharedMemBytes{ sharedMemBytes_ } , paramCount{ paramCount_ } , pParams{ pParams_ } , extraCount{ extraCount_ } , pExtras{ pExtras_ } { } VULKAN_HPP_CONSTEXPR CuLaunchInfoNVX( CuLaunchInfoNVX const & rhs ) VULKAN_HPP_NOEXCEPT = default; CuLaunchInfoNVX( VkCuLaunchInfoNVX const & rhs ) VULKAN_HPP_NOEXCEPT : CuLaunchInfoNVX( *reinterpret_cast( &rhs ) ) {} # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) CuLaunchInfoNVX( VULKAN_HPP_NAMESPACE::CuFunctionNVX function_, uint32_t gridDimX_, uint32_t gridDimY_, uint32_t gridDimZ_, uint32_t blockDimX_, uint32_t blockDimY_, uint32_t blockDimZ_, uint32_t sharedMemBytes_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & params_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & extras_ = {}, const void * pNext_ = nullptr ) : pNext( pNext_ ) , function( function_ ) , gridDimX( gridDimX_ ) , gridDimY( gridDimY_ ) , gridDimZ( gridDimZ_ ) , blockDimX( blockDimX_ ) , blockDimY( blockDimY_ ) , blockDimZ( blockDimZ_ ) , sharedMemBytes( sharedMemBytes_ ) , paramCount( params_.size() ) , pParams( params_.data() ) , extraCount( extras_.size() ) , pExtras( extras_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ CuLaunchInfoNVX & operator=( CuLaunchInfoNVX const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ CuLaunchInfoNVX & operator=( VkCuLaunchInfoNVX const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 CuLaunchInfoNVX & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 CuLaunchInfoNVX & setFunction( VULKAN_HPP_NAMESPACE::CuFunctionNVX function_ ) VULKAN_HPP_NOEXCEPT { function = function_; return *this; } VULKAN_HPP_CONSTEXPR_14 CuLaunchInfoNVX & setGridDimX( uint32_t gridDimX_ ) VULKAN_HPP_NOEXCEPT { gridDimX = gridDimX_; return *this; } VULKAN_HPP_CONSTEXPR_14 CuLaunchInfoNVX & setGridDimY( uint32_t gridDimY_ ) VULKAN_HPP_NOEXCEPT { gridDimY = gridDimY_; return *this; } VULKAN_HPP_CONSTEXPR_14 CuLaunchInfoNVX & setGridDimZ( uint32_t gridDimZ_ ) VULKAN_HPP_NOEXCEPT { gridDimZ = gridDimZ_; return *this; } VULKAN_HPP_CONSTEXPR_14 CuLaunchInfoNVX & setBlockDimX( uint32_t blockDimX_ ) VULKAN_HPP_NOEXCEPT { blockDimX = blockDimX_; return *this; } VULKAN_HPP_CONSTEXPR_14 CuLaunchInfoNVX & setBlockDimY( uint32_t blockDimY_ ) VULKAN_HPP_NOEXCEPT { blockDimY = blockDimY_; return *this; } VULKAN_HPP_CONSTEXPR_14 CuLaunchInfoNVX & setBlockDimZ( uint32_t blockDimZ_ ) VULKAN_HPP_NOEXCEPT { blockDimZ = blockDimZ_; return *this; } VULKAN_HPP_CONSTEXPR_14 CuLaunchInfoNVX & setSharedMemBytes( uint32_t sharedMemBytes_ ) VULKAN_HPP_NOEXCEPT { sharedMemBytes = sharedMemBytes_; return *this; } VULKAN_HPP_CONSTEXPR_14 CuLaunchInfoNVX & setParamCount( size_t paramCount_ ) VULKAN_HPP_NOEXCEPT { paramCount = paramCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 CuLaunchInfoNVX & setPParams( const void * const * pParams_ ) VULKAN_HPP_NOEXCEPT { pParams = pParams_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) CuLaunchInfoNVX & setParams( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & params_ ) VULKAN_HPP_NOEXCEPT { paramCount = params_.size(); pParams = params_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 CuLaunchInfoNVX & setExtraCount( size_t extraCount_ ) VULKAN_HPP_NOEXCEPT { extraCount = extraCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 CuLaunchInfoNVX & setPExtras( const void * const * pExtras_ ) VULKAN_HPP_NOEXCEPT { pExtras = pExtras_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) CuLaunchInfoNVX & setExtras( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & extras_ ) VULKAN_HPP_NOEXCEPT { extraCount = extras_.size(); pExtras = extras_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkCuLaunchInfoNVX const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkCuLaunchInfoNVX &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, function, gridDimX, gridDimY, gridDimZ, blockDimX, blockDimY, blockDimZ, sharedMemBytes, paramCount, pParams, extraCount, pExtras ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( CuLaunchInfoNVX const & ) const = default; #else bool operator==( CuLaunchInfoNVX const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( function == rhs.function ) && ( gridDimX == rhs.gridDimX ) && ( gridDimY == rhs.gridDimY ) && ( gridDimZ == rhs.gridDimZ ) && ( blockDimX == rhs.blockDimX ) && ( blockDimY == rhs.blockDimY ) && ( blockDimZ == rhs.blockDimZ ) && ( sharedMemBytes == rhs.sharedMemBytes ) && ( paramCount == rhs.paramCount ) && ( pParams == rhs.pParams ) && ( extraCount == rhs.extraCount ) && ( pExtras == rhs.pExtras ); # endif } bool operator!=( CuLaunchInfoNVX const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eCuLaunchInfoNVX; const void * pNext = {}; VULKAN_HPP_NAMESPACE::CuFunctionNVX function = {}; uint32_t gridDimX = {}; uint32_t gridDimY = {}; uint32_t gridDimZ = {}; uint32_t blockDimX = {}; uint32_t blockDimY = {}; uint32_t blockDimZ = {}; uint32_t sharedMemBytes = {}; size_t paramCount = {}; const void * const * pParams = {}; size_t extraCount = {}; const void * const * pExtras = {}; }; template <> struct CppType { using Type = CuLaunchInfoNVX; }; struct CuModuleCreateInfoNVX { using NativeType = VkCuModuleCreateInfoNVX; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eCuModuleCreateInfoNVX; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR CuModuleCreateInfoNVX( size_t dataSize_ = {}, const void * pData_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , dataSize{ dataSize_ } , pData{ pData_ } { } VULKAN_HPP_CONSTEXPR CuModuleCreateInfoNVX( CuModuleCreateInfoNVX const & rhs ) VULKAN_HPP_NOEXCEPT = default; CuModuleCreateInfoNVX( VkCuModuleCreateInfoNVX const & rhs ) VULKAN_HPP_NOEXCEPT : CuModuleCreateInfoNVX( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) template CuModuleCreateInfoNVX( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & data_, const void * pNext_ = nullptr ) : pNext( pNext_ ), dataSize( data_.size() * sizeof( T ) ), pData( data_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ CuModuleCreateInfoNVX & operator=( CuModuleCreateInfoNVX const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ CuModuleCreateInfoNVX & operator=( VkCuModuleCreateInfoNVX const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 CuModuleCreateInfoNVX & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 CuModuleCreateInfoNVX & setDataSize( size_t dataSize_ ) VULKAN_HPP_NOEXCEPT { dataSize = dataSize_; return *this; } VULKAN_HPP_CONSTEXPR_14 CuModuleCreateInfoNVX & setPData( const void * pData_ ) VULKAN_HPP_NOEXCEPT { pData = pData_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) template CuModuleCreateInfoNVX & setData( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & data_ ) VULKAN_HPP_NOEXCEPT { dataSize = data_.size() * sizeof( T ); pData = data_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkCuModuleCreateInfoNVX const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkCuModuleCreateInfoNVX &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, dataSize, pData ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( CuModuleCreateInfoNVX const & ) const = default; #else bool operator==( CuModuleCreateInfoNVX const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( dataSize == rhs.dataSize ) && ( pData == rhs.pData ); # endif } bool operator!=( CuModuleCreateInfoNVX const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eCuModuleCreateInfoNVX; const void * pNext = {}; size_t dataSize = {}; const void * pData = {}; }; template <> struct CppType { using Type = CuModuleCreateInfoNVX; }; struct CuModuleTexturingModeCreateInfoNVX { using NativeType = VkCuModuleTexturingModeCreateInfoNVX; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eCuModuleTexturingModeCreateInfoNVX; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR CuModuleTexturingModeCreateInfoNVX( VULKAN_HPP_NAMESPACE::Bool32 use64bitTexturing_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , use64bitTexturing{ use64bitTexturing_ } { } VULKAN_HPP_CONSTEXPR CuModuleTexturingModeCreateInfoNVX( CuModuleTexturingModeCreateInfoNVX const & rhs ) VULKAN_HPP_NOEXCEPT = default; CuModuleTexturingModeCreateInfoNVX( VkCuModuleTexturingModeCreateInfoNVX const & rhs ) VULKAN_HPP_NOEXCEPT : CuModuleTexturingModeCreateInfoNVX( *reinterpret_cast( &rhs ) ) { } CuModuleTexturingModeCreateInfoNVX & operator=( CuModuleTexturingModeCreateInfoNVX const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ CuModuleTexturingModeCreateInfoNVX & operator=( VkCuModuleTexturingModeCreateInfoNVX const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 CuModuleTexturingModeCreateInfoNVX & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 CuModuleTexturingModeCreateInfoNVX & setUse64bitTexturing( VULKAN_HPP_NAMESPACE::Bool32 use64bitTexturing_ ) VULKAN_HPP_NOEXCEPT { use64bitTexturing = use64bitTexturing_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkCuModuleTexturingModeCreateInfoNVX const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkCuModuleTexturingModeCreateInfoNVX &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, use64bitTexturing ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( CuModuleTexturingModeCreateInfoNVX const & ) const = default; #else bool operator==( CuModuleTexturingModeCreateInfoNVX const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( use64bitTexturing == rhs.use64bitTexturing ); # endif } bool operator!=( CuModuleTexturingModeCreateInfoNVX const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eCuModuleTexturingModeCreateInfoNVX; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 use64bitTexturing = {}; }; template <> struct CppType { using Type = CuModuleTexturingModeCreateInfoNVX; }; #if defined( VK_ENABLE_BETA_EXTENSIONS ) struct CudaFunctionCreateInfoNV { using NativeType = VkCudaFunctionCreateInfoNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eCudaFunctionCreateInfoNV; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR CudaFunctionCreateInfoNV( VULKAN_HPP_NAMESPACE::CudaModuleNV module_ = {}, const char * pName_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , module{ module_ } , pName{ pName_ } { } VULKAN_HPP_CONSTEXPR CudaFunctionCreateInfoNV( CudaFunctionCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; CudaFunctionCreateInfoNV( VkCudaFunctionCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT : CudaFunctionCreateInfoNV( *reinterpret_cast( &rhs ) ) { } CudaFunctionCreateInfoNV & operator=( CudaFunctionCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ CudaFunctionCreateInfoNV & operator=( VkCudaFunctionCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } # if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 CudaFunctionCreateInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 CudaFunctionCreateInfoNV & setModule( VULKAN_HPP_NAMESPACE::CudaModuleNV module_ ) VULKAN_HPP_NOEXCEPT { module = module_; return *this; } VULKAN_HPP_CONSTEXPR_14 CudaFunctionCreateInfoNV & setPName( const char * pName_ ) VULKAN_HPP_NOEXCEPT { pName = pName_; return *this; } # endif /*VULKAN_HPP_NO_SETTERS*/ operator VkCudaFunctionCreateInfoNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkCudaFunctionCreateInfoNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, module, pName ); } # endif # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) std::strong_ordering operator<=>( CudaFunctionCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { if ( auto cmp = sType <=> rhs.sType; cmp != 0 ) return cmp; if ( auto cmp = pNext <=> rhs.pNext; cmp != 0 ) return cmp; if ( auto cmp = module <=> rhs.module; cmp != 0 ) return cmp; if ( pName != rhs.pName ) if ( auto cmp = strcmp( pName, rhs.pName ); cmp != 0 ) return ( cmp < 0 ) ? std::strong_ordering::less : std::strong_ordering::greater; return std::strong_ordering::equivalent; } # endif bool operator==( CudaFunctionCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( module == rhs.module ) && ( ( pName == rhs.pName ) || ( strcmp( pName, rhs.pName ) == 0 ) ); } bool operator!=( CudaFunctionCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eCudaFunctionCreateInfoNV; const void * pNext = {}; VULKAN_HPP_NAMESPACE::CudaModuleNV module = {}; const char * pName = {}; }; template <> struct CppType { using Type = CudaFunctionCreateInfoNV; }; #endif /*VK_ENABLE_BETA_EXTENSIONS*/ #if defined( VK_ENABLE_BETA_EXTENSIONS ) struct CudaLaunchInfoNV { using NativeType = VkCudaLaunchInfoNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eCudaLaunchInfoNV; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR CudaLaunchInfoNV( VULKAN_HPP_NAMESPACE::CudaFunctionNV function_ = {}, uint32_t gridDimX_ = {}, uint32_t gridDimY_ = {}, uint32_t gridDimZ_ = {}, uint32_t blockDimX_ = {}, uint32_t blockDimY_ = {}, uint32_t blockDimZ_ = {}, uint32_t sharedMemBytes_ = {}, size_t paramCount_ = {}, const void * const * pParams_ = {}, size_t extraCount_ = {}, const void * const * pExtras_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , function{ function_ } , gridDimX{ gridDimX_ } , gridDimY{ gridDimY_ } , gridDimZ{ gridDimZ_ } , blockDimX{ blockDimX_ } , blockDimY{ blockDimY_ } , blockDimZ{ blockDimZ_ } , sharedMemBytes{ sharedMemBytes_ } , paramCount{ paramCount_ } , pParams{ pParams_ } , extraCount{ extraCount_ } , pExtras{ pExtras_ } { } VULKAN_HPP_CONSTEXPR CudaLaunchInfoNV( CudaLaunchInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; CudaLaunchInfoNV( VkCudaLaunchInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT : CudaLaunchInfoNV( *reinterpret_cast( &rhs ) ) {} # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) CudaLaunchInfoNV( VULKAN_HPP_NAMESPACE::CudaFunctionNV function_, uint32_t gridDimX_, uint32_t gridDimY_, uint32_t gridDimZ_, uint32_t blockDimX_, uint32_t blockDimY_, uint32_t blockDimZ_, uint32_t sharedMemBytes_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & params_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & extras_ = {}, const void * pNext_ = nullptr ) : pNext( pNext_ ) , function( function_ ) , gridDimX( gridDimX_ ) , gridDimY( gridDimY_ ) , gridDimZ( gridDimZ_ ) , blockDimX( blockDimX_ ) , blockDimY( blockDimY_ ) , blockDimZ( blockDimZ_ ) , sharedMemBytes( sharedMemBytes_ ) , paramCount( params_.size() ) , pParams( params_.data() ) , extraCount( extras_.size() ) , pExtras( extras_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ CudaLaunchInfoNV & operator=( CudaLaunchInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ CudaLaunchInfoNV & operator=( VkCudaLaunchInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } # if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 CudaLaunchInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 CudaLaunchInfoNV & setFunction( VULKAN_HPP_NAMESPACE::CudaFunctionNV function_ ) VULKAN_HPP_NOEXCEPT { function = function_; return *this; } VULKAN_HPP_CONSTEXPR_14 CudaLaunchInfoNV & setGridDimX( uint32_t gridDimX_ ) VULKAN_HPP_NOEXCEPT { gridDimX = gridDimX_; return *this; } VULKAN_HPP_CONSTEXPR_14 CudaLaunchInfoNV & setGridDimY( uint32_t gridDimY_ ) VULKAN_HPP_NOEXCEPT { gridDimY = gridDimY_; return *this; } VULKAN_HPP_CONSTEXPR_14 CudaLaunchInfoNV & setGridDimZ( uint32_t gridDimZ_ ) VULKAN_HPP_NOEXCEPT { gridDimZ = gridDimZ_; return *this; } VULKAN_HPP_CONSTEXPR_14 CudaLaunchInfoNV & setBlockDimX( uint32_t blockDimX_ ) VULKAN_HPP_NOEXCEPT { blockDimX = blockDimX_; return *this; } VULKAN_HPP_CONSTEXPR_14 CudaLaunchInfoNV & setBlockDimY( uint32_t blockDimY_ ) VULKAN_HPP_NOEXCEPT { blockDimY = blockDimY_; return *this; } VULKAN_HPP_CONSTEXPR_14 CudaLaunchInfoNV & setBlockDimZ( uint32_t blockDimZ_ ) VULKAN_HPP_NOEXCEPT { blockDimZ = blockDimZ_; return *this; } VULKAN_HPP_CONSTEXPR_14 CudaLaunchInfoNV & setSharedMemBytes( uint32_t sharedMemBytes_ ) VULKAN_HPP_NOEXCEPT { sharedMemBytes = sharedMemBytes_; return *this; } VULKAN_HPP_CONSTEXPR_14 CudaLaunchInfoNV & setParamCount( size_t paramCount_ ) VULKAN_HPP_NOEXCEPT { paramCount = paramCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 CudaLaunchInfoNV & setPParams( const void * const * pParams_ ) VULKAN_HPP_NOEXCEPT { pParams = pParams_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) CudaLaunchInfoNV & setParams( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & params_ ) VULKAN_HPP_NOEXCEPT { paramCount = params_.size(); pParams = params_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 CudaLaunchInfoNV & setExtraCount( size_t extraCount_ ) VULKAN_HPP_NOEXCEPT { extraCount = extraCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 CudaLaunchInfoNV & setPExtras( const void * const * pExtras_ ) VULKAN_HPP_NOEXCEPT { pExtras = pExtras_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) CudaLaunchInfoNV & setExtras( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & extras_ ) VULKAN_HPP_NOEXCEPT { extraCount = extras_.size(); pExtras = extras_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ # endif /*VULKAN_HPP_NO_SETTERS*/ operator VkCudaLaunchInfoNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkCudaLaunchInfoNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, function, gridDimX, gridDimY, gridDimZ, blockDimX, blockDimY, blockDimZ, sharedMemBytes, paramCount, pParams, extraCount, pExtras ); } # endif # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( CudaLaunchInfoNV const & ) const = default; # else bool operator==( CudaLaunchInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( function == rhs.function ) && ( gridDimX == rhs.gridDimX ) && ( gridDimY == rhs.gridDimY ) && ( gridDimZ == rhs.gridDimZ ) && ( blockDimX == rhs.blockDimX ) && ( blockDimY == rhs.blockDimY ) && ( blockDimZ == rhs.blockDimZ ) && ( sharedMemBytes == rhs.sharedMemBytes ) && ( paramCount == rhs.paramCount ) && ( pParams == rhs.pParams ) && ( extraCount == rhs.extraCount ) && ( pExtras == rhs.pExtras ); # endif } bool operator!=( CudaLaunchInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } # endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eCudaLaunchInfoNV; const void * pNext = {}; VULKAN_HPP_NAMESPACE::CudaFunctionNV function = {}; uint32_t gridDimX = {}; uint32_t gridDimY = {}; uint32_t gridDimZ = {}; uint32_t blockDimX = {}; uint32_t blockDimY = {}; uint32_t blockDimZ = {}; uint32_t sharedMemBytes = {}; size_t paramCount = {}; const void * const * pParams = {}; size_t extraCount = {}; const void * const * pExtras = {}; }; template <> struct CppType { using Type = CudaLaunchInfoNV; }; #endif /*VK_ENABLE_BETA_EXTENSIONS*/ #if defined( VK_ENABLE_BETA_EXTENSIONS ) struct CudaModuleCreateInfoNV { using NativeType = VkCudaModuleCreateInfoNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eCudaModuleCreateInfoNV; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR CudaModuleCreateInfoNV( size_t dataSize_ = {}, const void * pData_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , dataSize{ dataSize_ } , pData{ pData_ } { } VULKAN_HPP_CONSTEXPR CudaModuleCreateInfoNV( CudaModuleCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; CudaModuleCreateInfoNV( VkCudaModuleCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT : CudaModuleCreateInfoNV( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) template CudaModuleCreateInfoNV( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & data_, const void * pNext_ = nullptr ) : pNext( pNext_ ), dataSize( data_.size() * sizeof( T ) ), pData( data_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ CudaModuleCreateInfoNV & operator=( CudaModuleCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ CudaModuleCreateInfoNV & operator=( VkCudaModuleCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } # if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 CudaModuleCreateInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 CudaModuleCreateInfoNV & setDataSize( size_t dataSize_ ) VULKAN_HPP_NOEXCEPT { dataSize = dataSize_; return *this; } VULKAN_HPP_CONSTEXPR_14 CudaModuleCreateInfoNV & setPData( const void * pData_ ) VULKAN_HPP_NOEXCEPT { pData = pData_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) template CudaModuleCreateInfoNV & setData( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & data_ ) VULKAN_HPP_NOEXCEPT { dataSize = data_.size() * sizeof( T ); pData = data_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ # endif /*VULKAN_HPP_NO_SETTERS*/ operator VkCudaModuleCreateInfoNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkCudaModuleCreateInfoNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, dataSize, pData ); } # endif # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( CudaModuleCreateInfoNV const & ) const = default; # else bool operator==( CudaModuleCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( dataSize == rhs.dataSize ) && ( pData == rhs.pData ); # endif } bool operator!=( CudaModuleCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } # endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eCudaModuleCreateInfoNV; const void * pNext = {}; size_t dataSize = {}; const void * pData = {}; }; template <> struct CppType { using Type = CudaModuleCreateInfoNV; }; #endif /*VK_ENABLE_BETA_EXTENSIONS*/ #if defined( VK_USE_PLATFORM_WIN32_KHR ) struct D3D12FenceSubmitInfoKHR { using NativeType = VkD3D12FenceSubmitInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eD3D12FenceSubmitInfoKHR; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR D3D12FenceSubmitInfoKHR( uint32_t waitSemaphoreValuesCount_ = {}, const uint64_t * pWaitSemaphoreValues_ = {}, uint32_t signalSemaphoreValuesCount_ = {}, const uint64_t * pSignalSemaphoreValues_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , waitSemaphoreValuesCount{ waitSemaphoreValuesCount_ } , pWaitSemaphoreValues{ pWaitSemaphoreValues_ } , signalSemaphoreValuesCount{ signalSemaphoreValuesCount_ } , pSignalSemaphoreValues{ pSignalSemaphoreValues_ } { } VULKAN_HPP_CONSTEXPR D3D12FenceSubmitInfoKHR( D3D12FenceSubmitInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; D3D12FenceSubmitInfoKHR( VkD3D12FenceSubmitInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : D3D12FenceSubmitInfoKHR( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) D3D12FenceSubmitInfoKHR( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & waitSemaphoreValues_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & signalSemaphoreValues_ = {}, const void * pNext_ = nullptr ) : pNext( pNext_ ) , waitSemaphoreValuesCount( static_cast( waitSemaphoreValues_.size() ) ) , pWaitSemaphoreValues( waitSemaphoreValues_.data() ) , signalSemaphoreValuesCount( static_cast( signalSemaphoreValues_.size() ) ) , pSignalSemaphoreValues( signalSemaphoreValues_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ D3D12FenceSubmitInfoKHR & operator=( D3D12FenceSubmitInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ D3D12FenceSubmitInfoKHR & operator=( VkD3D12FenceSubmitInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } # if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 D3D12FenceSubmitInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 D3D12FenceSubmitInfoKHR & setWaitSemaphoreValuesCount( uint32_t waitSemaphoreValuesCount_ ) VULKAN_HPP_NOEXCEPT { waitSemaphoreValuesCount = waitSemaphoreValuesCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 D3D12FenceSubmitInfoKHR & setPWaitSemaphoreValues( const uint64_t * pWaitSemaphoreValues_ ) VULKAN_HPP_NOEXCEPT { pWaitSemaphoreValues = pWaitSemaphoreValues_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) D3D12FenceSubmitInfoKHR & setWaitSemaphoreValues( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & waitSemaphoreValues_ ) VULKAN_HPP_NOEXCEPT { waitSemaphoreValuesCount = static_cast( waitSemaphoreValues_.size() ); pWaitSemaphoreValues = waitSemaphoreValues_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 D3D12FenceSubmitInfoKHR & setSignalSemaphoreValuesCount( uint32_t signalSemaphoreValuesCount_ ) VULKAN_HPP_NOEXCEPT { signalSemaphoreValuesCount = signalSemaphoreValuesCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 D3D12FenceSubmitInfoKHR & setPSignalSemaphoreValues( const uint64_t * pSignalSemaphoreValues_ ) VULKAN_HPP_NOEXCEPT { pSignalSemaphoreValues = pSignalSemaphoreValues_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) D3D12FenceSubmitInfoKHR & setSignalSemaphoreValues( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & signalSemaphoreValues_ ) VULKAN_HPP_NOEXCEPT { signalSemaphoreValuesCount = static_cast( signalSemaphoreValues_.size() ); pSignalSemaphoreValues = signalSemaphoreValues_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ # endif /*VULKAN_HPP_NO_SETTERS*/ operator VkD3D12FenceSubmitInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkD3D12FenceSubmitInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, waitSemaphoreValuesCount, pWaitSemaphoreValues, signalSemaphoreValuesCount, pSignalSemaphoreValues ); } # endif # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( D3D12FenceSubmitInfoKHR const & ) const = default; # else bool operator==( D3D12FenceSubmitInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( waitSemaphoreValuesCount == rhs.waitSemaphoreValuesCount ) && ( pWaitSemaphoreValues == rhs.pWaitSemaphoreValues ) && ( signalSemaphoreValuesCount == rhs.signalSemaphoreValuesCount ) && ( pSignalSemaphoreValues == rhs.pSignalSemaphoreValues ); # endif } bool operator!=( D3D12FenceSubmitInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } # endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eD3D12FenceSubmitInfoKHR; const void * pNext = {}; uint32_t waitSemaphoreValuesCount = {}; const uint64_t * pWaitSemaphoreValues = {}; uint32_t signalSemaphoreValuesCount = {}; const uint64_t * pSignalSemaphoreValues = {}; }; template <> struct CppType { using Type = D3D12FenceSubmitInfoKHR; }; #endif /*VK_USE_PLATFORM_WIN32_KHR*/ struct DebugMarkerMarkerInfoEXT { using NativeType = VkDebugMarkerMarkerInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDebugMarkerMarkerInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 DebugMarkerMarkerInfoEXT( const char * pMarkerName_ = {}, std::array const & color_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , pMarkerName{ pMarkerName_ } , color{ color_ } { } VULKAN_HPP_CONSTEXPR_14 DebugMarkerMarkerInfoEXT( DebugMarkerMarkerInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; DebugMarkerMarkerInfoEXT( VkDebugMarkerMarkerInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : DebugMarkerMarkerInfoEXT( *reinterpret_cast( &rhs ) ) { } DebugMarkerMarkerInfoEXT & operator=( DebugMarkerMarkerInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DebugMarkerMarkerInfoEXT & operator=( VkDebugMarkerMarkerInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 DebugMarkerMarkerInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 DebugMarkerMarkerInfoEXT & setPMarkerName( const char * pMarkerName_ ) VULKAN_HPP_NOEXCEPT { pMarkerName = pMarkerName_; return *this; } VULKAN_HPP_CONSTEXPR_14 DebugMarkerMarkerInfoEXT & setColor( std::array color_ ) VULKAN_HPP_NOEXCEPT { color = color_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkDebugMarkerMarkerInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDebugMarkerMarkerInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple const &> # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, pMarkerName, color ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) std::partial_ordering operator<=>( DebugMarkerMarkerInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { if ( auto cmp = sType <=> rhs.sType; cmp != 0 ) return cmp; if ( auto cmp = pNext <=> rhs.pNext; cmp != 0 ) return cmp; if ( pMarkerName != rhs.pMarkerName ) if ( auto cmp = strcmp( pMarkerName, rhs.pMarkerName ); cmp != 0 ) return ( cmp < 0 ) ? std::partial_ordering::less : std::partial_ordering::greater; if ( auto cmp = color <=> rhs.color; cmp != 0 ) return cmp; return std::partial_ordering::equivalent; } #endif bool operator==( DebugMarkerMarkerInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( ( pMarkerName == rhs.pMarkerName ) || ( strcmp( pMarkerName, rhs.pMarkerName ) == 0 ) ) && ( color == rhs.color ); } bool operator!=( DebugMarkerMarkerInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDebugMarkerMarkerInfoEXT; const void * pNext = {}; const char * pMarkerName = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D color = {}; }; template <> struct CppType { using Type = DebugMarkerMarkerInfoEXT; }; struct DebugMarkerObjectNameInfoEXT { using NativeType = VkDebugMarkerObjectNameInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDebugMarkerObjectNameInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR DebugMarkerObjectNameInfoEXT( VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT objectType_ = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eUnknown, uint64_t object_ = {}, const char * pObjectName_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , objectType{ objectType_ } , object{ object_ } , pObjectName{ pObjectName_ } { } VULKAN_HPP_CONSTEXPR DebugMarkerObjectNameInfoEXT( DebugMarkerObjectNameInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; DebugMarkerObjectNameInfoEXT( VkDebugMarkerObjectNameInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : DebugMarkerObjectNameInfoEXT( *reinterpret_cast( &rhs ) ) { } DebugMarkerObjectNameInfoEXT & operator=( DebugMarkerObjectNameInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DebugMarkerObjectNameInfoEXT & operator=( VkDebugMarkerObjectNameInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 DebugMarkerObjectNameInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 DebugMarkerObjectNameInfoEXT & setObjectType( VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT objectType_ ) VULKAN_HPP_NOEXCEPT { objectType = objectType_; return *this; } VULKAN_HPP_CONSTEXPR_14 DebugMarkerObjectNameInfoEXT & setObject( uint64_t object_ ) VULKAN_HPP_NOEXCEPT { object = object_; return *this; } VULKAN_HPP_CONSTEXPR_14 DebugMarkerObjectNameInfoEXT & setPObjectName( const char * pObjectName_ ) VULKAN_HPP_NOEXCEPT { pObjectName = pObjectName_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkDebugMarkerObjectNameInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDebugMarkerObjectNameInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, objectType, object, pObjectName ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) std::strong_ordering operator<=>( DebugMarkerObjectNameInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { if ( auto cmp = sType <=> rhs.sType; cmp != 0 ) return cmp; if ( auto cmp = pNext <=> rhs.pNext; cmp != 0 ) return cmp; if ( auto cmp = objectType <=> rhs.objectType; cmp != 0 ) return cmp; if ( auto cmp = object <=> rhs.object; cmp != 0 ) return cmp; if ( pObjectName != rhs.pObjectName ) if ( auto cmp = strcmp( pObjectName, rhs.pObjectName ); cmp != 0 ) return ( cmp < 0 ) ? std::strong_ordering::less : std::strong_ordering::greater; return std::strong_ordering::equivalent; } #endif bool operator==( DebugMarkerObjectNameInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( objectType == rhs.objectType ) && ( object == rhs.object ) && ( ( pObjectName == rhs.pObjectName ) || ( strcmp( pObjectName, rhs.pObjectName ) == 0 ) ); } bool operator!=( DebugMarkerObjectNameInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDebugMarkerObjectNameInfoEXT; const void * pNext = {}; VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT objectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eUnknown; uint64_t object = {}; const char * pObjectName = {}; }; template <> struct CppType { using Type = DebugMarkerObjectNameInfoEXT; }; struct DebugMarkerObjectTagInfoEXT { using NativeType = VkDebugMarkerObjectTagInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDebugMarkerObjectTagInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR DebugMarkerObjectTagInfoEXT( VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT objectType_ = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eUnknown, uint64_t object_ = {}, uint64_t tagName_ = {}, size_t tagSize_ = {}, const void * pTag_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , objectType{ objectType_ } , object{ object_ } , tagName{ tagName_ } , tagSize{ tagSize_ } , pTag{ pTag_ } { } VULKAN_HPP_CONSTEXPR DebugMarkerObjectTagInfoEXT( DebugMarkerObjectTagInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; DebugMarkerObjectTagInfoEXT( VkDebugMarkerObjectTagInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : DebugMarkerObjectTagInfoEXT( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) template DebugMarkerObjectTagInfoEXT( VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT objectType_, uint64_t object_, uint64_t tagName_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & tag_, const void * pNext_ = nullptr ) : pNext( pNext_ ), objectType( objectType_ ), object( object_ ), tagName( tagName_ ), tagSize( tag_.size() * sizeof( T ) ), pTag( tag_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ DebugMarkerObjectTagInfoEXT & operator=( DebugMarkerObjectTagInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DebugMarkerObjectTagInfoEXT & operator=( VkDebugMarkerObjectTagInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 DebugMarkerObjectTagInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 DebugMarkerObjectTagInfoEXT & setObjectType( VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT objectType_ ) VULKAN_HPP_NOEXCEPT { objectType = objectType_; return *this; } VULKAN_HPP_CONSTEXPR_14 DebugMarkerObjectTagInfoEXT & setObject( uint64_t object_ ) VULKAN_HPP_NOEXCEPT { object = object_; return *this; } VULKAN_HPP_CONSTEXPR_14 DebugMarkerObjectTagInfoEXT & setTagName( uint64_t tagName_ ) VULKAN_HPP_NOEXCEPT { tagName = tagName_; return *this; } VULKAN_HPP_CONSTEXPR_14 DebugMarkerObjectTagInfoEXT & setTagSize( size_t tagSize_ ) VULKAN_HPP_NOEXCEPT { tagSize = tagSize_; return *this; } VULKAN_HPP_CONSTEXPR_14 DebugMarkerObjectTagInfoEXT & setPTag( const void * pTag_ ) VULKAN_HPP_NOEXCEPT { pTag = pTag_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) template DebugMarkerObjectTagInfoEXT & setTag( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & tag_ ) VULKAN_HPP_NOEXCEPT { tagSize = tag_.size() * sizeof( T ); pTag = tag_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkDebugMarkerObjectTagInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDebugMarkerObjectTagInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, objectType, object, tagName, tagSize, pTag ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( DebugMarkerObjectTagInfoEXT const & ) const = default; #else bool operator==( DebugMarkerObjectTagInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( objectType == rhs.objectType ) && ( object == rhs.object ) && ( tagName == rhs.tagName ) && ( tagSize == rhs.tagSize ) && ( pTag == rhs.pTag ); # endif } bool operator!=( DebugMarkerObjectTagInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDebugMarkerObjectTagInfoEXT; const void * pNext = {}; VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT objectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::eUnknown; uint64_t object = {}; uint64_t tagName = {}; size_t tagSize = {}; const void * pTag = {}; }; template <> struct CppType { using Type = DebugMarkerObjectTagInfoEXT; }; typedef VULKAN_HPP_NAMESPACE::Bool32( VKAPI_PTR * PFN_DebugReportCallbackEXT )( VULKAN_HPP_NAMESPACE::DebugReportFlagsEXT flags, VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT objectType, uint64_t object, size_t location, int32_t messageCode, const char * pLayerPrefix, const char * pMessage, void * pUserData ); struct DebugReportCallbackCreateInfoEXT { using NativeType = VkDebugReportCallbackCreateInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDebugReportCallbackCreateInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR DebugReportCallbackCreateInfoEXT( VULKAN_HPP_NAMESPACE::DebugReportFlagsEXT flags_ = {}, VULKAN_HPP_NAMESPACE::PFN_DebugReportCallbackEXT pfnCallback_ = {}, void * pUserData_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , pfnCallback{ pfnCallback_ } , pUserData{ pUserData_ } { } VULKAN_HPP_CONSTEXPR DebugReportCallbackCreateInfoEXT( DebugReportCallbackCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; DebugReportCallbackCreateInfoEXT( VkDebugReportCallbackCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : DebugReportCallbackCreateInfoEXT( *reinterpret_cast( &rhs ) ) { } # if defined( __clang__ ) || defined( __GNUC__ ) # pragma GCC diagnostic push # if defined( __clang__ ) # pragma clang diagnostic ignored "-Wunknown-warning-option" # endif # pragma GCC diagnostic ignored "-Wcast-function-type" # endif VULKAN_HPP_DEPRECATED( "This constructor is deprecated. Use the one taking function pointer types from the vk-namespace instead." ) DebugReportCallbackCreateInfoEXT( VULKAN_HPP_NAMESPACE::DebugReportFlagsEXT flags_, PFN_vkDebugReportCallbackEXT pfnCallback_, void * pUserData_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : DebugReportCallbackCreateInfoEXT( flags_, reinterpret_cast( pfnCallback_ ), pUserData_, pNext_ ) { } # if defined( __clang__ ) || defined( __GNUC__ ) # pragma GCC diagnostic pop # endif DebugReportCallbackCreateInfoEXT & operator=( DebugReportCallbackCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DebugReportCallbackCreateInfoEXT & operator=( VkDebugReportCallbackCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 DebugReportCallbackCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 DebugReportCallbackCreateInfoEXT & setFlags( VULKAN_HPP_NAMESPACE::DebugReportFlagsEXT flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 DebugReportCallbackCreateInfoEXT & setPfnCallback( VULKAN_HPP_NAMESPACE::PFN_DebugReportCallbackEXT pfnCallback_ ) VULKAN_HPP_NOEXCEPT { pfnCallback = pfnCallback_; return *this; } VULKAN_HPP_CONSTEXPR_14 DebugReportCallbackCreateInfoEXT & setPUserData( void * pUserData_ ) VULKAN_HPP_NOEXCEPT { pUserData = pUserData_; return *this; } # if defined( __clang__ ) || defined( __GNUC__ ) # pragma GCC diagnostic push # if defined( __clang__ ) # pragma clang diagnostic ignored "-Wunknown-warning-option" # endif # pragma GCC diagnostic ignored "-Wcast-function-type" # endif VULKAN_HPP_DEPRECATED( "This setter is deprecated. Use the one taking a function pointer type from the vk-namespace instead." ) DebugReportCallbackCreateInfoEXT & setPfnCallback( PFN_vkDebugReportCallbackEXT pfnCallback_ ) VULKAN_HPP_NOEXCEPT { return setPfnCallback( reinterpret_cast( pfnCallback_ ) ); } # if defined( __clang__ ) || defined( __GNUC__ ) # pragma GCC diagnostic pop # endif #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkDebugReportCallbackCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDebugReportCallbackCreateInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, pfnCallback, pUserData ); } #endif bool operator==( DebugReportCallbackCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { #if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); #else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( pfnCallback == rhs.pfnCallback ) && ( pUserData == rhs.pUserData ); #endif } bool operator!=( DebugReportCallbackCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDebugReportCallbackCreateInfoEXT; const void * pNext = {}; VULKAN_HPP_NAMESPACE::DebugReportFlagsEXT flags = {}; VULKAN_HPP_NAMESPACE::PFN_DebugReportCallbackEXT pfnCallback = {}; void * pUserData = {}; }; template <> struct CppType { using Type = DebugReportCallbackCreateInfoEXT; }; struct DebugUtilsLabelEXT { using NativeType = VkDebugUtilsLabelEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDebugUtilsLabelEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 DebugUtilsLabelEXT( const char * pLabelName_ = {}, std::array const & color_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , pLabelName{ pLabelName_ } , color{ color_ } { } VULKAN_HPP_CONSTEXPR_14 DebugUtilsLabelEXT( DebugUtilsLabelEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; DebugUtilsLabelEXT( VkDebugUtilsLabelEXT const & rhs ) VULKAN_HPP_NOEXCEPT : DebugUtilsLabelEXT( *reinterpret_cast( &rhs ) ) {} DebugUtilsLabelEXT & operator=( DebugUtilsLabelEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DebugUtilsLabelEXT & operator=( VkDebugUtilsLabelEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 DebugUtilsLabelEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 DebugUtilsLabelEXT & setPLabelName( const char * pLabelName_ ) VULKAN_HPP_NOEXCEPT { pLabelName = pLabelName_; return *this; } VULKAN_HPP_CONSTEXPR_14 DebugUtilsLabelEXT & setColor( std::array color_ ) VULKAN_HPP_NOEXCEPT { color = color_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkDebugUtilsLabelEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDebugUtilsLabelEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple const &> # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, pLabelName, color ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) std::partial_ordering operator<=>( DebugUtilsLabelEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { if ( auto cmp = sType <=> rhs.sType; cmp != 0 ) return cmp; if ( auto cmp = pNext <=> rhs.pNext; cmp != 0 ) return cmp; if ( pLabelName != rhs.pLabelName ) if ( auto cmp = strcmp( pLabelName, rhs.pLabelName ); cmp != 0 ) return ( cmp < 0 ) ? std::partial_ordering::less : std::partial_ordering::greater; if ( auto cmp = color <=> rhs.color; cmp != 0 ) return cmp; return std::partial_ordering::equivalent; } #endif bool operator==( DebugUtilsLabelEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( ( pLabelName == rhs.pLabelName ) || ( strcmp( pLabelName, rhs.pLabelName ) == 0 ) ) && ( color == rhs.color ); } bool operator!=( DebugUtilsLabelEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDebugUtilsLabelEXT; const void * pNext = {}; const char * pLabelName = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D color = {}; }; template <> struct CppType { using Type = DebugUtilsLabelEXT; }; struct DebugUtilsObjectNameInfoEXT { using NativeType = VkDebugUtilsObjectNameInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDebugUtilsObjectNameInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR DebugUtilsObjectNameInfoEXT( VULKAN_HPP_NAMESPACE::ObjectType objectType_ = VULKAN_HPP_NAMESPACE::ObjectType::eUnknown, uint64_t objectHandle_ = {}, const char * pObjectName_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , objectType{ objectType_ } , objectHandle{ objectHandle_ } , pObjectName{ pObjectName_ } { } VULKAN_HPP_CONSTEXPR DebugUtilsObjectNameInfoEXT( DebugUtilsObjectNameInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; DebugUtilsObjectNameInfoEXT( VkDebugUtilsObjectNameInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : DebugUtilsObjectNameInfoEXT( *reinterpret_cast( &rhs ) ) { } DebugUtilsObjectNameInfoEXT & operator=( DebugUtilsObjectNameInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DebugUtilsObjectNameInfoEXT & operator=( VkDebugUtilsObjectNameInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 DebugUtilsObjectNameInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 DebugUtilsObjectNameInfoEXT & setObjectType( VULKAN_HPP_NAMESPACE::ObjectType objectType_ ) VULKAN_HPP_NOEXCEPT { objectType = objectType_; return *this; } VULKAN_HPP_CONSTEXPR_14 DebugUtilsObjectNameInfoEXT & setObjectHandle( uint64_t objectHandle_ ) VULKAN_HPP_NOEXCEPT { objectHandle = objectHandle_; return *this; } VULKAN_HPP_CONSTEXPR_14 DebugUtilsObjectNameInfoEXT & setPObjectName( const char * pObjectName_ ) VULKAN_HPP_NOEXCEPT { pObjectName = pObjectName_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkDebugUtilsObjectNameInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDebugUtilsObjectNameInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std:: tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, objectType, objectHandle, pObjectName ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) std::strong_ordering operator<=>( DebugUtilsObjectNameInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { if ( auto cmp = sType <=> rhs.sType; cmp != 0 ) return cmp; if ( auto cmp = pNext <=> rhs.pNext; cmp != 0 ) return cmp; if ( auto cmp = objectType <=> rhs.objectType; cmp != 0 ) return cmp; if ( auto cmp = objectHandle <=> rhs.objectHandle; cmp != 0 ) return cmp; if ( pObjectName != rhs.pObjectName ) if ( auto cmp = strcmp( pObjectName, rhs.pObjectName ); cmp != 0 ) return ( cmp < 0 ) ? std::strong_ordering::less : std::strong_ordering::greater; return std::strong_ordering::equivalent; } #endif bool operator==( DebugUtilsObjectNameInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( objectType == rhs.objectType ) && ( objectHandle == rhs.objectHandle ) && ( ( pObjectName == rhs.pObjectName ) || ( strcmp( pObjectName, rhs.pObjectName ) == 0 ) ); } bool operator!=( DebugUtilsObjectNameInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDebugUtilsObjectNameInfoEXT; const void * pNext = {}; VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eUnknown; uint64_t objectHandle = {}; const char * pObjectName = {}; }; template <> struct CppType { using Type = DebugUtilsObjectNameInfoEXT; }; struct DebugUtilsMessengerCallbackDataEXT { using NativeType = VkDebugUtilsMessengerCallbackDataEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDebugUtilsMessengerCallbackDataEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 DebugUtilsMessengerCallbackDataEXT( VULKAN_HPP_NAMESPACE::DebugUtilsMessengerCallbackDataFlagsEXT flags_ = {}, const char * pMessageIdName_ = {}, int32_t messageIdNumber_ = {}, const char * pMessage_ = {}, uint32_t queueLabelCount_ = {}, const VULKAN_HPP_NAMESPACE::DebugUtilsLabelEXT * pQueueLabels_ = {}, uint32_t cmdBufLabelCount_ = {}, const VULKAN_HPP_NAMESPACE::DebugUtilsLabelEXT * pCmdBufLabels_ = {}, uint32_t objectCount_ = {}, const VULKAN_HPP_NAMESPACE::DebugUtilsObjectNameInfoEXT * pObjects_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , pMessageIdName{ pMessageIdName_ } , messageIdNumber{ messageIdNumber_ } , pMessage{ pMessage_ } , queueLabelCount{ queueLabelCount_ } , pQueueLabels{ pQueueLabels_ } , cmdBufLabelCount{ cmdBufLabelCount_ } , pCmdBufLabels{ pCmdBufLabels_ } , objectCount{ objectCount_ } , pObjects{ pObjects_ } { } VULKAN_HPP_CONSTEXPR_14 DebugUtilsMessengerCallbackDataEXT( DebugUtilsMessengerCallbackDataEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; DebugUtilsMessengerCallbackDataEXT( VkDebugUtilsMessengerCallbackDataEXT const & rhs ) VULKAN_HPP_NOEXCEPT : DebugUtilsMessengerCallbackDataEXT( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) DebugUtilsMessengerCallbackDataEXT( VULKAN_HPP_NAMESPACE::DebugUtilsMessengerCallbackDataFlagsEXT flags_, const char * pMessageIdName_, int32_t messageIdNumber_, const char * pMessage_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & queueLabels_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & cmdBufLabels_ = {}, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & objects_ = {}, const void * pNext_ = nullptr ) : pNext( pNext_ ) , flags( flags_ ) , pMessageIdName( pMessageIdName_ ) , messageIdNumber( messageIdNumber_ ) , pMessage( pMessage_ ) , queueLabelCount( static_cast( queueLabels_.size() ) ) , pQueueLabels( queueLabels_.data() ) , cmdBufLabelCount( static_cast( cmdBufLabels_.size() ) ) , pCmdBufLabels( cmdBufLabels_.data() ) , objectCount( static_cast( objects_.size() ) ) , pObjects( objects_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ DebugUtilsMessengerCallbackDataEXT & operator=( DebugUtilsMessengerCallbackDataEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DebugUtilsMessengerCallbackDataEXT & operator=( VkDebugUtilsMessengerCallbackDataEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 DebugUtilsMessengerCallbackDataEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 DebugUtilsMessengerCallbackDataEXT & setFlags( VULKAN_HPP_NAMESPACE::DebugUtilsMessengerCallbackDataFlagsEXT flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 DebugUtilsMessengerCallbackDataEXT & setPMessageIdName( const char * pMessageIdName_ ) VULKAN_HPP_NOEXCEPT { pMessageIdName = pMessageIdName_; return *this; } VULKAN_HPP_CONSTEXPR_14 DebugUtilsMessengerCallbackDataEXT & setMessageIdNumber( int32_t messageIdNumber_ ) VULKAN_HPP_NOEXCEPT { messageIdNumber = messageIdNumber_; return *this; } VULKAN_HPP_CONSTEXPR_14 DebugUtilsMessengerCallbackDataEXT & setPMessage( const char * pMessage_ ) VULKAN_HPP_NOEXCEPT { pMessage = pMessage_; return *this; } VULKAN_HPP_CONSTEXPR_14 DebugUtilsMessengerCallbackDataEXT & setQueueLabelCount( uint32_t queueLabelCount_ ) VULKAN_HPP_NOEXCEPT { queueLabelCount = queueLabelCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 DebugUtilsMessengerCallbackDataEXT & setPQueueLabels( const VULKAN_HPP_NAMESPACE::DebugUtilsLabelEXT * pQueueLabels_ ) VULKAN_HPP_NOEXCEPT { pQueueLabels = pQueueLabels_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) DebugUtilsMessengerCallbackDataEXT & setQueueLabels( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & queueLabels_ ) VULKAN_HPP_NOEXCEPT { queueLabelCount = static_cast( queueLabels_.size() ); pQueueLabels = queueLabels_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 DebugUtilsMessengerCallbackDataEXT & setCmdBufLabelCount( uint32_t cmdBufLabelCount_ ) VULKAN_HPP_NOEXCEPT { cmdBufLabelCount = cmdBufLabelCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 DebugUtilsMessengerCallbackDataEXT & setPCmdBufLabels( const VULKAN_HPP_NAMESPACE::DebugUtilsLabelEXT * pCmdBufLabels_ ) VULKAN_HPP_NOEXCEPT { pCmdBufLabels = pCmdBufLabels_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) DebugUtilsMessengerCallbackDataEXT & setCmdBufLabels( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & cmdBufLabels_ ) VULKAN_HPP_NOEXCEPT { cmdBufLabelCount = static_cast( cmdBufLabels_.size() ); pCmdBufLabels = cmdBufLabels_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 DebugUtilsMessengerCallbackDataEXT & setObjectCount( uint32_t objectCount_ ) VULKAN_HPP_NOEXCEPT { objectCount = objectCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 DebugUtilsMessengerCallbackDataEXT & setPObjects( const VULKAN_HPP_NAMESPACE::DebugUtilsObjectNameInfoEXT * pObjects_ ) VULKAN_HPP_NOEXCEPT { pObjects = pObjects_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) DebugUtilsMessengerCallbackDataEXT & setObjects( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & objects_ ) VULKAN_HPP_NOEXCEPT { objectCount = static_cast( objects_.size() ); pObjects = objects_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkDebugUtilsMessengerCallbackDataEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDebugUtilsMessengerCallbackDataEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, pMessageIdName, messageIdNumber, pMessage, queueLabelCount, pQueueLabels, cmdBufLabelCount, pCmdBufLabels, objectCount, pObjects ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) std::strong_ordering operator<=>( DebugUtilsMessengerCallbackDataEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { if ( auto cmp = sType <=> rhs.sType; cmp != 0 ) return cmp; if ( auto cmp = pNext <=> rhs.pNext; cmp != 0 ) return cmp; if ( auto cmp = flags <=> rhs.flags; cmp != 0 ) return cmp; if ( pMessageIdName != rhs.pMessageIdName ) if ( auto cmp = strcmp( pMessageIdName, rhs.pMessageIdName ); cmp != 0 ) return ( cmp < 0 ) ? std::strong_ordering::less : std::strong_ordering::greater; if ( auto cmp = messageIdNumber <=> rhs.messageIdNumber; cmp != 0 ) return cmp; if ( pMessage != rhs.pMessage ) if ( auto cmp = strcmp( pMessage, rhs.pMessage ); cmp != 0 ) return ( cmp < 0 ) ? std::strong_ordering::less : std::strong_ordering::greater; if ( auto cmp = queueLabelCount <=> rhs.queueLabelCount; cmp != 0 ) return cmp; if ( auto cmp = pQueueLabels <=> rhs.pQueueLabels; cmp != 0 ) return cmp; if ( auto cmp = cmdBufLabelCount <=> rhs.cmdBufLabelCount; cmp != 0 ) return cmp; if ( auto cmp = pCmdBufLabels <=> rhs.pCmdBufLabels; cmp != 0 ) return cmp; if ( auto cmp = objectCount <=> rhs.objectCount; cmp != 0 ) return cmp; if ( auto cmp = pObjects <=> rhs.pObjects; cmp != 0 ) return cmp; return std::strong_ordering::equivalent; } #endif bool operator==( DebugUtilsMessengerCallbackDataEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( ( pMessageIdName == rhs.pMessageIdName ) || ( strcmp( pMessageIdName, rhs.pMessageIdName ) == 0 ) ) && ( messageIdNumber == rhs.messageIdNumber ) && ( ( pMessage == rhs.pMessage ) || ( strcmp( pMessage, rhs.pMessage ) == 0 ) ) && ( queueLabelCount == rhs.queueLabelCount ) && ( pQueueLabels == rhs.pQueueLabels ) && ( cmdBufLabelCount == rhs.cmdBufLabelCount ) && ( pCmdBufLabels == rhs.pCmdBufLabels ) && ( objectCount == rhs.objectCount ) && ( pObjects == rhs.pObjects ); } bool operator!=( DebugUtilsMessengerCallbackDataEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDebugUtilsMessengerCallbackDataEXT; const void * pNext = {}; VULKAN_HPP_NAMESPACE::DebugUtilsMessengerCallbackDataFlagsEXT flags = {}; const char * pMessageIdName = {}; int32_t messageIdNumber = {}; const char * pMessage = {}; uint32_t queueLabelCount = {}; const VULKAN_HPP_NAMESPACE::DebugUtilsLabelEXT * pQueueLabels = {}; uint32_t cmdBufLabelCount = {}; const VULKAN_HPP_NAMESPACE::DebugUtilsLabelEXT * pCmdBufLabels = {}; uint32_t objectCount = {}; const VULKAN_HPP_NAMESPACE::DebugUtilsObjectNameInfoEXT * pObjects = {}; }; template <> struct CppType { using Type = DebugUtilsMessengerCallbackDataEXT; }; typedef VULKAN_HPP_NAMESPACE::Bool32( VKAPI_PTR * PFN_DebugUtilsMessengerCallbackEXT )( VULKAN_HPP_NAMESPACE::DebugUtilsMessageSeverityFlagBitsEXT messageSeverity, VULKAN_HPP_NAMESPACE::DebugUtilsMessageTypeFlagsEXT messageTypes, const VULKAN_HPP_NAMESPACE::DebugUtilsMessengerCallbackDataEXT * pCallbackData, void * pUserData ); struct DebugUtilsMessengerCreateInfoEXT { using NativeType = VkDebugUtilsMessengerCreateInfoEXT; static const bool allowDuplicate = true; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDebugUtilsMessengerCreateInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR DebugUtilsMessengerCreateInfoEXT( VULKAN_HPP_NAMESPACE::DebugUtilsMessengerCreateFlagsEXT flags_ = {}, VULKAN_HPP_NAMESPACE::DebugUtilsMessageSeverityFlagsEXT messageSeverity_ = {}, VULKAN_HPP_NAMESPACE::DebugUtilsMessageTypeFlagsEXT messageType_ = {}, VULKAN_HPP_NAMESPACE::PFN_DebugUtilsMessengerCallbackEXT pfnUserCallback_ = {}, void * pUserData_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , messageSeverity{ messageSeverity_ } , messageType{ messageType_ } , pfnUserCallback{ pfnUserCallback_ } , pUserData{ pUserData_ } { } VULKAN_HPP_CONSTEXPR DebugUtilsMessengerCreateInfoEXT( DebugUtilsMessengerCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; DebugUtilsMessengerCreateInfoEXT( VkDebugUtilsMessengerCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : DebugUtilsMessengerCreateInfoEXT( *reinterpret_cast( &rhs ) ) { } # if defined( __clang__ ) || defined( __GNUC__ ) # pragma GCC diagnostic push # if defined( __clang__ ) # pragma clang diagnostic ignored "-Wunknown-warning-option" # endif # pragma GCC diagnostic ignored "-Wcast-function-type" # endif VULKAN_HPP_DEPRECATED( "This constructor is deprecated. Use the one taking function pointer types from the vk-namespace instead." ) DebugUtilsMessengerCreateInfoEXT( VULKAN_HPP_NAMESPACE::DebugUtilsMessengerCreateFlagsEXT flags_, VULKAN_HPP_NAMESPACE::DebugUtilsMessageSeverityFlagsEXT messageSeverity_, VULKAN_HPP_NAMESPACE::DebugUtilsMessageTypeFlagsEXT messageType_, PFN_vkDebugUtilsMessengerCallbackEXT pfnUserCallback_, void * pUserData_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : DebugUtilsMessengerCreateInfoEXT( flags_, messageSeverity_, messageType_, reinterpret_cast( pfnUserCallback_ ), pUserData_, pNext_ ) { } # if defined( __clang__ ) || defined( __GNUC__ ) # pragma GCC diagnostic pop # endif DebugUtilsMessengerCreateInfoEXT & operator=( DebugUtilsMessengerCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DebugUtilsMessengerCreateInfoEXT & operator=( VkDebugUtilsMessengerCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 DebugUtilsMessengerCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 DebugUtilsMessengerCreateInfoEXT & setFlags( VULKAN_HPP_NAMESPACE::DebugUtilsMessengerCreateFlagsEXT flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 DebugUtilsMessengerCreateInfoEXT & setMessageSeverity( VULKAN_HPP_NAMESPACE::DebugUtilsMessageSeverityFlagsEXT messageSeverity_ ) VULKAN_HPP_NOEXCEPT { messageSeverity = messageSeverity_; return *this; } VULKAN_HPP_CONSTEXPR_14 DebugUtilsMessengerCreateInfoEXT & setMessageType( VULKAN_HPP_NAMESPACE::DebugUtilsMessageTypeFlagsEXT messageType_ ) VULKAN_HPP_NOEXCEPT { messageType = messageType_; return *this; } VULKAN_HPP_CONSTEXPR_14 DebugUtilsMessengerCreateInfoEXT & setPfnUserCallback( VULKAN_HPP_NAMESPACE::PFN_DebugUtilsMessengerCallbackEXT pfnUserCallback_ ) VULKAN_HPP_NOEXCEPT { pfnUserCallback = pfnUserCallback_; return *this; } VULKAN_HPP_CONSTEXPR_14 DebugUtilsMessengerCreateInfoEXT & setPUserData( void * pUserData_ ) VULKAN_HPP_NOEXCEPT { pUserData = pUserData_; return *this; } # if defined( __clang__ ) || defined( __GNUC__ ) # pragma GCC diagnostic push # if defined( __clang__ ) # pragma clang diagnostic ignored "-Wunknown-warning-option" # endif # pragma GCC diagnostic ignored "-Wcast-function-type" # endif VULKAN_HPP_DEPRECATED( "This setter is deprecated. Use the one taking a function pointer type from the vk-namespace instead." ) DebugUtilsMessengerCreateInfoEXT & setPfnUserCallback( PFN_vkDebugUtilsMessengerCallbackEXT pfnUserCallback_ ) VULKAN_HPP_NOEXCEPT { return setPfnUserCallback( reinterpret_cast( pfnUserCallback_ ) ); } # if defined( __clang__ ) || defined( __GNUC__ ) # pragma GCC diagnostic pop # endif #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkDebugUtilsMessengerCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDebugUtilsMessengerCreateInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, messageSeverity, messageType, pfnUserCallback, pUserData ); } #endif bool operator==( DebugUtilsMessengerCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { #if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); #else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( messageSeverity == rhs.messageSeverity ) && ( messageType == rhs.messageType ) && ( pfnUserCallback == rhs.pfnUserCallback ) && ( pUserData == rhs.pUserData ); #endif } bool operator!=( DebugUtilsMessengerCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDebugUtilsMessengerCreateInfoEXT; const void * pNext = {}; VULKAN_HPP_NAMESPACE::DebugUtilsMessengerCreateFlagsEXT flags = {}; VULKAN_HPP_NAMESPACE::DebugUtilsMessageSeverityFlagsEXT messageSeverity = {}; VULKAN_HPP_NAMESPACE::DebugUtilsMessageTypeFlagsEXT messageType = {}; VULKAN_HPP_NAMESPACE::PFN_DebugUtilsMessengerCallbackEXT pfnUserCallback = {}; void * pUserData = {}; }; template <> struct CppType { using Type = DebugUtilsMessengerCreateInfoEXT; }; struct DebugUtilsObjectTagInfoEXT { using NativeType = VkDebugUtilsObjectTagInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDebugUtilsObjectTagInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR DebugUtilsObjectTagInfoEXT( VULKAN_HPP_NAMESPACE::ObjectType objectType_ = VULKAN_HPP_NAMESPACE::ObjectType::eUnknown, uint64_t objectHandle_ = {}, uint64_t tagName_ = {}, size_t tagSize_ = {}, const void * pTag_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , objectType{ objectType_ } , objectHandle{ objectHandle_ } , tagName{ tagName_ } , tagSize{ tagSize_ } , pTag{ pTag_ } { } VULKAN_HPP_CONSTEXPR DebugUtilsObjectTagInfoEXT( DebugUtilsObjectTagInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; DebugUtilsObjectTagInfoEXT( VkDebugUtilsObjectTagInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : DebugUtilsObjectTagInfoEXT( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) template DebugUtilsObjectTagInfoEXT( VULKAN_HPP_NAMESPACE::ObjectType objectType_, uint64_t objectHandle_, uint64_t tagName_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & tag_, const void * pNext_ = nullptr ) : pNext( pNext_ ) , objectType( objectType_ ) , objectHandle( objectHandle_ ) , tagName( tagName_ ) , tagSize( tag_.size() * sizeof( T ) ) , pTag( tag_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ DebugUtilsObjectTagInfoEXT & operator=( DebugUtilsObjectTagInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DebugUtilsObjectTagInfoEXT & operator=( VkDebugUtilsObjectTagInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 DebugUtilsObjectTagInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 DebugUtilsObjectTagInfoEXT & setObjectType( VULKAN_HPP_NAMESPACE::ObjectType objectType_ ) VULKAN_HPP_NOEXCEPT { objectType = objectType_; return *this; } VULKAN_HPP_CONSTEXPR_14 DebugUtilsObjectTagInfoEXT & setObjectHandle( uint64_t objectHandle_ ) VULKAN_HPP_NOEXCEPT { objectHandle = objectHandle_; return *this; } VULKAN_HPP_CONSTEXPR_14 DebugUtilsObjectTagInfoEXT & setTagName( uint64_t tagName_ ) VULKAN_HPP_NOEXCEPT { tagName = tagName_; return *this; } VULKAN_HPP_CONSTEXPR_14 DebugUtilsObjectTagInfoEXT & setTagSize( size_t tagSize_ ) VULKAN_HPP_NOEXCEPT { tagSize = tagSize_; return *this; } VULKAN_HPP_CONSTEXPR_14 DebugUtilsObjectTagInfoEXT & setPTag( const void * pTag_ ) VULKAN_HPP_NOEXCEPT { pTag = pTag_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) template DebugUtilsObjectTagInfoEXT & setTag( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & tag_ ) VULKAN_HPP_NOEXCEPT { tagSize = tag_.size() * sizeof( T ); pTag = tag_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkDebugUtilsObjectTagInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDebugUtilsObjectTagInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, objectType, objectHandle, tagName, tagSize, pTag ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( DebugUtilsObjectTagInfoEXT const & ) const = default; #else bool operator==( DebugUtilsObjectTagInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( objectType == rhs.objectType ) && ( objectHandle == rhs.objectHandle ) && ( tagName == rhs.tagName ) && ( tagSize == rhs.tagSize ) && ( pTag == rhs.pTag ); # endif } bool operator!=( DebugUtilsObjectTagInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDebugUtilsObjectTagInfoEXT; const void * pNext = {}; VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eUnknown; uint64_t objectHandle = {}; uint64_t tagName = {}; size_t tagSize = {}; const void * pTag = {}; }; template <> struct CppType { using Type = DebugUtilsObjectTagInfoEXT; }; struct DecompressMemoryRegionNV { using NativeType = VkDecompressMemoryRegionNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR DecompressMemoryRegionNV( VULKAN_HPP_NAMESPACE::DeviceAddress srcAddress_ = {}, VULKAN_HPP_NAMESPACE::DeviceAddress dstAddress_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize compressedSize_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize decompressedSize_ = {}, VULKAN_HPP_NAMESPACE::MemoryDecompressionMethodFlagsNV decompressionMethod_ = {} ) VULKAN_HPP_NOEXCEPT : srcAddress{ srcAddress_ } , dstAddress{ dstAddress_ } , compressedSize{ compressedSize_ } , decompressedSize{ decompressedSize_ } , decompressionMethod{ decompressionMethod_ } { } VULKAN_HPP_CONSTEXPR DecompressMemoryRegionNV( DecompressMemoryRegionNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; DecompressMemoryRegionNV( VkDecompressMemoryRegionNV const & rhs ) VULKAN_HPP_NOEXCEPT : DecompressMemoryRegionNV( *reinterpret_cast( &rhs ) ) { } DecompressMemoryRegionNV & operator=( DecompressMemoryRegionNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DecompressMemoryRegionNV & operator=( VkDecompressMemoryRegionNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 DecompressMemoryRegionNV & setSrcAddress( VULKAN_HPP_NAMESPACE::DeviceAddress srcAddress_ ) VULKAN_HPP_NOEXCEPT { srcAddress = srcAddress_; return *this; } VULKAN_HPP_CONSTEXPR_14 DecompressMemoryRegionNV & setDstAddress( VULKAN_HPP_NAMESPACE::DeviceAddress dstAddress_ ) VULKAN_HPP_NOEXCEPT { dstAddress = dstAddress_; return *this; } VULKAN_HPP_CONSTEXPR_14 DecompressMemoryRegionNV & setCompressedSize( VULKAN_HPP_NAMESPACE::DeviceSize compressedSize_ ) VULKAN_HPP_NOEXCEPT { compressedSize = compressedSize_; return *this; } VULKAN_HPP_CONSTEXPR_14 DecompressMemoryRegionNV & setDecompressedSize( VULKAN_HPP_NAMESPACE::DeviceSize decompressedSize_ ) VULKAN_HPP_NOEXCEPT { decompressedSize = decompressedSize_; return *this; } VULKAN_HPP_CONSTEXPR_14 DecompressMemoryRegionNV & setDecompressionMethod( VULKAN_HPP_NAMESPACE::MemoryDecompressionMethodFlagsNV decompressionMethod_ ) VULKAN_HPP_NOEXCEPT { decompressionMethod = decompressionMethod_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkDecompressMemoryRegionNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDecompressMemoryRegionNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( srcAddress, dstAddress, compressedSize, decompressedSize, decompressionMethod ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( DecompressMemoryRegionNV const & ) const = default; #else bool operator==( DecompressMemoryRegionNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( srcAddress == rhs.srcAddress ) && ( dstAddress == rhs.dstAddress ) && ( compressedSize == rhs.compressedSize ) && ( decompressedSize == rhs.decompressedSize ) && ( decompressionMethod == rhs.decompressionMethod ); # endif } bool operator!=( DecompressMemoryRegionNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::DeviceAddress srcAddress = {}; VULKAN_HPP_NAMESPACE::DeviceAddress dstAddress = {}; VULKAN_HPP_NAMESPACE::DeviceSize compressedSize = {}; VULKAN_HPP_NAMESPACE::DeviceSize decompressedSize = {}; VULKAN_HPP_NAMESPACE::MemoryDecompressionMethodFlagsNV decompressionMethod = {}; }; struct DedicatedAllocationBufferCreateInfoNV { using NativeType = VkDedicatedAllocationBufferCreateInfoNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDedicatedAllocationBufferCreateInfoNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR DedicatedAllocationBufferCreateInfoNV( VULKAN_HPP_NAMESPACE::Bool32 dedicatedAllocation_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , dedicatedAllocation{ dedicatedAllocation_ } { } VULKAN_HPP_CONSTEXPR DedicatedAllocationBufferCreateInfoNV( DedicatedAllocationBufferCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; DedicatedAllocationBufferCreateInfoNV( VkDedicatedAllocationBufferCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT : DedicatedAllocationBufferCreateInfoNV( *reinterpret_cast( &rhs ) ) { } DedicatedAllocationBufferCreateInfoNV & operator=( DedicatedAllocationBufferCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DedicatedAllocationBufferCreateInfoNV & operator=( VkDedicatedAllocationBufferCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 DedicatedAllocationBufferCreateInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 DedicatedAllocationBufferCreateInfoNV & setDedicatedAllocation( VULKAN_HPP_NAMESPACE::Bool32 dedicatedAllocation_ ) VULKAN_HPP_NOEXCEPT { dedicatedAllocation = dedicatedAllocation_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkDedicatedAllocationBufferCreateInfoNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDedicatedAllocationBufferCreateInfoNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, dedicatedAllocation ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( DedicatedAllocationBufferCreateInfoNV const & ) const = default; #else bool operator==( DedicatedAllocationBufferCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( dedicatedAllocation == rhs.dedicatedAllocation ); # endif } bool operator!=( DedicatedAllocationBufferCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDedicatedAllocationBufferCreateInfoNV; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 dedicatedAllocation = {}; }; template <> struct CppType { using Type = DedicatedAllocationBufferCreateInfoNV; }; struct DedicatedAllocationImageCreateInfoNV { using NativeType = VkDedicatedAllocationImageCreateInfoNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDedicatedAllocationImageCreateInfoNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR DedicatedAllocationImageCreateInfoNV( VULKAN_HPP_NAMESPACE::Bool32 dedicatedAllocation_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , dedicatedAllocation{ dedicatedAllocation_ } { } VULKAN_HPP_CONSTEXPR DedicatedAllocationImageCreateInfoNV( DedicatedAllocationImageCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; DedicatedAllocationImageCreateInfoNV( VkDedicatedAllocationImageCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT : DedicatedAllocationImageCreateInfoNV( *reinterpret_cast( &rhs ) ) { } DedicatedAllocationImageCreateInfoNV & operator=( DedicatedAllocationImageCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DedicatedAllocationImageCreateInfoNV & operator=( VkDedicatedAllocationImageCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 DedicatedAllocationImageCreateInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 DedicatedAllocationImageCreateInfoNV & setDedicatedAllocation( VULKAN_HPP_NAMESPACE::Bool32 dedicatedAllocation_ ) VULKAN_HPP_NOEXCEPT { dedicatedAllocation = dedicatedAllocation_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkDedicatedAllocationImageCreateInfoNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDedicatedAllocationImageCreateInfoNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, dedicatedAllocation ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( DedicatedAllocationImageCreateInfoNV const & ) const = default; #else bool operator==( DedicatedAllocationImageCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( dedicatedAllocation == rhs.dedicatedAllocation ); # endif } bool operator!=( DedicatedAllocationImageCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDedicatedAllocationImageCreateInfoNV; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 dedicatedAllocation = {}; }; template <> struct CppType { using Type = DedicatedAllocationImageCreateInfoNV; }; struct DedicatedAllocationMemoryAllocateInfoNV { using NativeType = VkDedicatedAllocationMemoryAllocateInfoNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDedicatedAllocationMemoryAllocateInfoNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR DedicatedAllocationMemoryAllocateInfoNV( VULKAN_HPP_NAMESPACE::Image image_ = {}, VULKAN_HPP_NAMESPACE::Buffer buffer_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , image{ image_ } , buffer{ buffer_ } { } VULKAN_HPP_CONSTEXPR DedicatedAllocationMemoryAllocateInfoNV( DedicatedAllocationMemoryAllocateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; DedicatedAllocationMemoryAllocateInfoNV( VkDedicatedAllocationMemoryAllocateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT : DedicatedAllocationMemoryAllocateInfoNV( *reinterpret_cast( &rhs ) ) { } DedicatedAllocationMemoryAllocateInfoNV & operator=( DedicatedAllocationMemoryAllocateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DedicatedAllocationMemoryAllocateInfoNV & operator=( VkDedicatedAllocationMemoryAllocateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 DedicatedAllocationMemoryAllocateInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 DedicatedAllocationMemoryAllocateInfoNV & setImage( VULKAN_HPP_NAMESPACE::Image image_ ) VULKAN_HPP_NOEXCEPT { image = image_; return *this; } VULKAN_HPP_CONSTEXPR_14 DedicatedAllocationMemoryAllocateInfoNV & setBuffer( VULKAN_HPP_NAMESPACE::Buffer buffer_ ) VULKAN_HPP_NOEXCEPT { buffer = buffer_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkDedicatedAllocationMemoryAllocateInfoNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDedicatedAllocationMemoryAllocateInfoNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, image, buffer ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( DedicatedAllocationMemoryAllocateInfoNV const & ) const = default; #else bool operator==( DedicatedAllocationMemoryAllocateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( image == rhs.image ) && ( buffer == rhs.buffer ); # endif } bool operator!=( DedicatedAllocationMemoryAllocateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDedicatedAllocationMemoryAllocateInfoNV; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Image image = {}; VULKAN_HPP_NAMESPACE::Buffer buffer = {}; }; template <> struct CppType { using Type = DedicatedAllocationMemoryAllocateInfoNV; }; struct MemoryBarrier2 { using NativeType = VkMemoryBarrier2; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eMemoryBarrier2; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR MemoryBarrier2( VULKAN_HPP_NAMESPACE::PipelineStageFlags2 srcStageMask_ = {}, VULKAN_HPP_NAMESPACE::AccessFlags2 srcAccessMask_ = {}, VULKAN_HPP_NAMESPACE::PipelineStageFlags2 dstStageMask_ = {}, VULKAN_HPP_NAMESPACE::AccessFlags2 dstAccessMask_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , srcStageMask{ srcStageMask_ } , srcAccessMask{ srcAccessMask_ } , dstStageMask{ dstStageMask_ } , dstAccessMask{ dstAccessMask_ } { } VULKAN_HPP_CONSTEXPR MemoryBarrier2( MemoryBarrier2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; MemoryBarrier2( VkMemoryBarrier2 const & rhs ) VULKAN_HPP_NOEXCEPT : MemoryBarrier2( *reinterpret_cast( &rhs ) ) {} MemoryBarrier2 & operator=( MemoryBarrier2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ MemoryBarrier2 & operator=( VkMemoryBarrier2 const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 MemoryBarrier2 & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 MemoryBarrier2 & setSrcStageMask( VULKAN_HPP_NAMESPACE::PipelineStageFlags2 srcStageMask_ ) VULKAN_HPP_NOEXCEPT { srcStageMask = srcStageMask_; return *this; } VULKAN_HPP_CONSTEXPR_14 MemoryBarrier2 & setSrcAccessMask( VULKAN_HPP_NAMESPACE::AccessFlags2 srcAccessMask_ ) VULKAN_HPP_NOEXCEPT { srcAccessMask = srcAccessMask_; return *this; } VULKAN_HPP_CONSTEXPR_14 MemoryBarrier2 & setDstStageMask( VULKAN_HPP_NAMESPACE::PipelineStageFlags2 dstStageMask_ ) VULKAN_HPP_NOEXCEPT { dstStageMask = dstStageMask_; return *this; } VULKAN_HPP_CONSTEXPR_14 MemoryBarrier2 & setDstAccessMask( VULKAN_HPP_NAMESPACE::AccessFlags2 dstAccessMask_ ) VULKAN_HPP_NOEXCEPT { dstAccessMask = dstAccessMask_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkMemoryBarrier2 const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkMemoryBarrier2 &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, srcStageMask, srcAccessMask, dstStageMask, dstAccessMask ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( MemoryBarrier2 const & ) const = default; #else bool operator==( MemoryBarrier2 const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( srcStageMask == rhs.srcStageMask ) && ( srcAccessMask == rhs.srcAccessMask ) && ( dstStageMask == rhs.dstStageMask ) && ( dstAccessMask == rhs.dstAccessMask ); # endif } bool operator!=( MemoryBarrier2 const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eMemoryBarrier2; const void * pNext = {}; VULKAN_HPP_NAMESPACE::PipelineStageFlags2 srcStageMask = {}; VULKAN_HPP_NAMESPACE::AccessFlags2 srcAccessMask = {}; VULKAN_HPP_NAMESPACE::PipelineStageFlags2 dstStageMask = {}; VULKAN_HPP_NAMESPACE::AccessFlags2 dstAccessMask = {}; }; template <> struct CppType { using Type = MemoryBarrier2; }; using MemoryBarrier2KHR = MemoryBarrier2; struct ImageSubresourceRange { using NativeType = VkImageSubresourceRange; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ImageSubresourceRange( VULKAN_HPP_NAMESPACE::ImageAspectFlags aspectMask_ = {}, uint32_t baseMipLevel_ = {}, uint32_t levelCount_ = {}, uint32_t baseArrayLayer_ = {}, uint32_t layerCount_ = {} ) VULKAN_HPP_NOEXCEPT : aspectMask{ aspectMask_ } , baseMipLevel{ baseMipLevel_ } , levelCount{ levelCount_ } , baseArrayLayer{ baseArrayLayer_ } , layerCount{ layerCount_ } { } VULKAN_HPP_CONSTEXPR ImageSubresourceRange( ImageSubresourceRange const & rhs ) VULKAN_HPP_NOEXCEPT = default; ImageSubresourceRange( VkImageSubresourceRange const & rhs ) VULKAN_HPP_NOEXCEPT : ImageSubresourceRange( *reinterpret_cast( &rhs ) ) { } ImageSubresourceRange & operator=( ImageSubresourceRange const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ImageSubresourceRange & operator=( VkImageSubresourceRange const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ImageSubresourceRange & setAspectMask( VULKAN_HPP_NAMESPACE::ImageAspectFlags aspectMask_ ) VULKAN_HPP_NOEXCEPT { aspectMask = aspectMask_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageSubresourceRange & setBaseMipLevel( uint32_t baseMipLevel_ ) VULKAN_HPP_NOEXCEPT { baseMipLevel = baseMipLevel_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageSubresourceRange & setLevelCount( uint32_t levelCount_ ) VULKAN_HPP_NOEXCEPT { levelCount = levelCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageSubresourceRange & setBaseArrayLayer( uint32_t baseArrayLayer_ ) VULKAN_HPP_NOEXCEPT { baseArrayLayer = baseArrayLayer_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageSubresourceRange & setLayerCount( uint32_t layerCount_ ) VULKAN_HPP_NOEXCEPT { layerCount = layerCount_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkImageSubresourceRange const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkImageSubresourceRange &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( aspectMask, baseMipLevel, levelCount, baseArrayLayer, layerCount ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ImageSubresourceRange const & ) const = default; #else bool operator==( ImageSubresourceRange const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( aspectMask == rhs.aspectMask ) && ( baseMipLevel == rhs.baseMipLevel ) && ( levelCount == rhs.levelCount ) && ( baseArrayLayer == rhs.baseArrayLayer ) && ( layerCount == rhs.layerCount ); # endif } bool operator!=( ImageSubresourceRange const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::ImageAspectFlags aspectMask = {}; uint32_t baseMipLevel = {}; uint32_t levelCount = {}; uint32_t baseArrayLayer = {}; uint32_t layerCount = {}; }; struct ImageMemoryBarrier2 { using NativeType = VkImageMemoryBarrier2; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImageMemoryBarrier2; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ImageMemoryBarrier2( VULKAN_HPP_NAMESPACE::PipelineStageFlags2 srcStageMask_ = {}, VULKAN_HPP_NAMESPACE::AccessFlags2 srcAccessMask_ = {}, VULKAN_HPP_NAMESPACE::PipelineStageFlags2 dstStageMask_ = {}, VULKAN_HPP_NAMESPACE::AccessFlags2 dstAccessMask_ = {}, VULKAN_HPP_NAMESPACE::ImageLayout oldLayout_ = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined, VULKAN_HPP_NAMESPACE::ImageLayout newLayout_ = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined, uint32_t srcQueueFamilyIndex_ = {}, uint32_t dstQueueFamilyIndex_ = {}, VULKAN_HPP_NAMESPACE::Image image_ = {}, VULKAN_HPP_NAMESPACE::ImageSubresourceRange subresourceRange_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , srcStageMask{ srcStageMask_ } , srcAccessMask{ srcAccessMask_ } , dstStageMask{ dstStageMask_ } , dstAccessMask{ dstAccessMask_ } , oldLayout{ oldLayout_ } , newLayout{ newLayout_ } , srcQueueFamilyIndex{ srcQueueFamilyIndex_ } , dstQueueFamilyIndex{ dstQueueFamilyIndex_ } , image{ image_ } , subresourceRange{ subresourceRange_ } { } VULKAN_HPP_CONSTEXPR ImageMemoryBarrier2( ImageMemoryBarrier2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; ImageMemoryBarrier2( VkImageMemoryBarrier2 const & rhs ) VULKAN_HPP_NOEXCEPT : ImageMemoryBarrier2( *reinterpret_cast( &rhs ) ) { } ImageMemoryBarrier2 & operator=( ImageMemoryBarrier2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ImageMemoryBarrier2 & operator=( VkImageMemoryBarrier2 const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ImageMemoryBarrier2 & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageMemoryBarrier2 & setSrcStageMask( VULKAN_HPP_NAMESPACE::PipelineStageFlags2 srcStageMask_ ) VULKAN_HPP_NOEXCEPT { srcStageMask = srcStageMask_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageMemoryBarrier2 & setSrcAccessMask( VULKAN_HPP_NAMESPACE::AccessFlags2 srcAccessMask_ ) VULKAN_HPP_NOEXCEPT { srcAccessMask = srcAccessMask_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageMemoryBarrier2 & setDstStageMask( VULKAN_HPP_NAMESPACE::PipelineStageFlags2 dstStageMask_ ) VULKAN_HPP_NOEXCEPT { dstStageMask = dstStageMask_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageMemoryBarrier2 & setDstAccessMask( VULKAN_HPP_NAMESPACE::AccessFlags2 dstAccessMask_ ) VULKAN_HPP_NOEXCEPT { dstAccessMask = dstAccessMask_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageMemoryBarrier2 & setOldLayout( VULKAN_HPP_NAMESPACE::ImageLayout oldLayout_ ) VULKAN_HPP_NOEXCEPT { oldLayout = oldLayout_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageMemoryBarrier2 & setNewLayout( VULKAN_HPP_NAMESPACE::ImageLayout newLayout_ ) VULKAN_HPP_NOEXCEPT { newLayout = newLayout_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageMemoryBarrier2 & setSrcQueueFamilyIndex( uint32_t srcQueueFamilyIndex_ ) VULKAN_HPP_NOEXCEPT { srcQueueFamilyIndex = srcQueueFamilyIndex_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageMemoryBarrier2 & setDstQueueFamilyIndex( uint32_t dstQueueFamilyIndex_ ) VULKAN_HPP_NOEXCEPT { dstQueueFamilyIndex = dstQueueFamilyIndex_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageMemoryBarrier2 & setImage( VULKAN_HPP_NAMESPACE::Image image_ ) VULKAN_HPP_NOEXCEPT { image = image_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageMemoryBarrier2 & setSubresourceRange( VULKAN_HPP_NAMESPACE::ImageSubresourceRange const & subresourceRange_ ) VULKAN_HPP_NOEXCEPT { subresourceRange = subresourceRange_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkImageMemoryBarrier2 const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkImageMemoryBarrier2 &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, srcStageMask, srcAccessMask, dstStageMask, dstAccessMask, oldLayout, newLayout, srcQueueFamilyIndex, dstQueueFamilyIndex, image, subresourceRange ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ImageMemoryBarrier2 const & ) const = default; #else bool operator==( ImageMemoryBarrier2 const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( srcStageMask == rhs.srcStageMask ) && ( srcAccessMask == rhs.srcAccessMask ) && ( dstStageMask == rhs.dstStageMask ) && ( dstAccessMask == rhs.dstAccessMask ) && ( oldLayout == rhs.oldLayout ) && ( newLayout == rhs.newLayout ) && ( srcQueueFamilyIndex == rhs.srcQueueFamilyIndex ) && ( dstQueueFamilyIndex == rhs.dstQueueFamilyIndex ) && ( image == rhs.image ) && ( subresourceRange == rhs.subresourceRange ); # endif } bool operator!=( ImageMemoryBarrier2 const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImageMemoryBarrier2; const void * pNext = {}; VULKAN_HPP_NAMESPACE::PipelineStageFlags2 srcStageMask = {}; VULKAN_HPP_NAMESPACE::AccessFlags2 srcAccessMask = {}; VULKAN_HPP_NAMESPACE::PipelineStageFlags2 dstStageMask = {}; VULKAN_HPP_NAMESPACE::AccessFlags2 dstAccessMask = {}; VULKAN_HPP_NAMESPACE::ImageLayout oldLayout = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined; VULKAN_HPP_NAMESPACE::ImageLayout newLayout = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined; uint32_t srcQueueFamilyIndex = {}; uint32_t dstQueueFamilyIndex = {}; VULKAN_HPP_NAMESPACE::Image image = {}; VULKAN_HPP_NAMESPACE::ImageSubresourceRange subresourceRange = {}; }; template <> struct CppType { using Type = ImageMemoryBarrier2; }; using ImageMemoryBarrier2KHR = ImageMemoryBarrier2; struct DependencyInfo { using NativeType = VkDependencyInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDependencyInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR DependencyInfo( VULKAN_HPP_NAMESPACE::DependencyFlags dependencyFlags_ = {}, uint32_t memoryBarrierCount_ = {}, const VULKAN_HPP_NAMESPACE::MemoryBarrier2 * pMemoryBarriers_ = {}, uint32_t bufferMemoryBarrierCount_ = {}, const VULKAN_HPP_NAMESPACE::BufferMemoryBarrier2 * pBufferMemoryBarriers_ = {}, uint32_t imageMemoryBarrierCount_ = {}, const VULKAN_HPP_NAMESPACE::ImageMemoryBarrier2 * pImageMemoryBarriers_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , dependencyFlags{ dependencyFlags_ } , memoryBarrierCount{ memoryBarrierCount_ } , pMemoryBarriers{ pMemoryBarriers_ } , bufferMemoryBarrierCount{ bufferMemoryBarrierCount_ } , pBufferMemoryBarriers{ pBufferMemoryBarriers_ } , imageMemoryBarrierCount{ imageMemoryBarrierCount_ } , pImageMemoryBarriers{ pImageMemoryBarriers_ } { } VULKAN_HPP_CONSTEXPR DependencyInfo( DependencyInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; DependencyInfo( VkDependencyInfo const & rhs ) VULKAN_HPP_NOEXCEPT : DependencyInfo( *reinterpret_cast( &rhs ) ) {} # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) DependencyInfo( VULKAN_HPP_NAMESPACE::DependencyFlags dependencyFlags_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & memoryBarriers_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & bufferMemoryBarriers_ = {}, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & imageMemoryBarriers_ = {}, const void * pNext_ = nullptr ) : pNext( pNext_ ) , dependencyFlags( dependencyFlags_ ) , memoryBarrierCount( static_cast( memoryBarriers_.size() ) ) , pMemoryBarriers( memoryBarriers_.data() ) , bufferMemoryBarrierCount( static_cast( bufferMemoryBarriers_.size() ) ) , pBufferMemoryBarriers( bufferMemoryBarriers_.data() ) , imageMemoryBarrierCount( static_cast( imageMemoryBarriers_.size() ) ) , pImageMemoryBarriers( imageMemoryBarriers_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ DependencyInfo & operator=( DependencyInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DependencyInfo & operator=( VkDependencyInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 DependencyInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 DependencyInfo & setDependencyFlags( VULKAN_HPP_NAMESPACE::DependencyFlags dependencyFlags_ ) VULKAN_HPP_NOEXCEPT { dependencyFlags = dependencyFlags_; return *this; } VULKAN_HPP_CONSTEXPR_14 DependencyInfo & setMemoryBarrierCount( uint32_t memoryBarrierCount_ ) VULKAN_HPP_NOEXCEPT { memoryBarrierCount = memoryBarrierCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 DependencyInfo & setPMemoryBarriers( const VULKAN_HPP_NAMESPACE::MemoryBarrier2 * pMemoryBarriers_ ) VULKAN_HPP_NOEXCEPT { pMemoryBarriers = pMemoryBarriers_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) DependencyInfo & setMemoryBarriers( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & memoryBarriers_ ) VULKAN_HPP_NOEXCEPT { memoryBarrierCount = static_cast( memoryBarriers_.size() ); pMemoryBarriers = memoryBarriers_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 DependencyInfo & setBufferMemoryBarrierCount( uint32_t bufferMemoryBarrierCount_ ) VULKAN_HPP_NOEXCEPT { bufferMemoryBarrierCount = bufferMemoryBarrierCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 DependencyInfo & setPBufferMemoryBarriers( const VULKAN_HPP_NAMESPACE::BufferMemoryBarrier2 * pBufferMemoryBarriers_ ) VULKAN_HPP_NOEXCEPT { pBufferMemoryBarriers = pBufferMemoryBarriers_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) DependencyInfo & setBufferMemoryBarriers( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & bufferMemoryBarriers_ ) VULKAN_HPP_NOEXCEPT { bufferMemoryBarrierCount = static_cast( bufferMemoryBarriers_.size() ); pBufferMemoryBarriers = bufferMemoryBarriers_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 DependencyInfo & setImageMemoryBarrierCount( uint32_t imageMemoryBarrierCount_ ) VULKAN_HPP_NOEXCEPT { imageMemoryBarrierCount = imageMemoryBarrierCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 DependencyInfo & setPImageMemoryBarriers( const VULKAN_HPP_NAMESPACE::ImageMemoryBarrier2 * pImageMemoryBarriers_ ) VULKAN_HPP_NOEXCEPT { pImageMemoryBarriers = pImageMemoryBarriers_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) DependencyInfo & setImageMemoryBarriers( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & imageMemoryBarriers_ ) VULKAN_HPP_NOEXCEPT { imageMemoryBarrierCount = static_cast( imageMemoryBarriers_.size() ); pImageMemoryBarriers = imageMemoryBarriers_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkDependencyInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDependencyInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, dependencyFlags, memoryBarrierCount, pMemoryBarriers, bufferMemoryBarrierCount, pBufferMemoryBarriers, imageMemoryBarrierCount, pImageMemoryBarriers ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( DependencyInfo const & ) const = default; #else bool operator==( DependencyInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( dependencyFlags == rhs.dependencyFlags ) && ( memoryBarrierCount == rhs.memoryBarrierCount ) && ( pMemoryBarriers == rhs.pMemoryBarriers ) && ( bufferMemoryBarrierCount == rhs.bufferMemoryBarrierCount ) && ( pBufferMemoryBarriers == rhs.pBufferMemoryBarriers ) && ( imageMemoryBarrierCount == rhs.imageMemoryBarrierCount ) && ( pImageMemoryBarriers == rhs.pImageMemoryBarriers ); # endif } bool operator!=( DependencyInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDependencyInfo; const void * pNext = {}; VULKAN_HPP_NAMESPACE::DependencyFlags dependencyFlags = {}; uint32_t memoryBarrierCount = {}; const VULKAN_HPP_NAMESPACE::MemoryBarrier2 * pMemoryBarriers = {}; uint32_t bufferMemoryBarrierCount = {}; const VULKAN_HPP_NAMESPACE::BufferMemoryBarrier2 * pBufferMemoryBarriers = {}; uint32_t imageMemoryBarrierCount = {}; const VULKAN_HPP_NAMESPACE::ImageMemoryBarrier2 * pImageMemoryBarriers = {}; }; template <> struct CppType { using Type = DependencyInfo; }; using DependencyInfoKHR = DependencyInfo; struct DepthBiasInfoEXT { using NativeType = VkDepthBiasInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDepthBiasInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR DepthBiasInfoEXT( float depthBiasConstantFactor_ = {}, float depthBiasClamp_ = {}, float depthBiasSlopeFactor_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , depthBiasConstantFactor{ depthBiasConstantFactor_ } , depthBiasClamp{ depthBiasClamp_ } , depthBiasSlopeFactor{ depthBiasSlopeFactor_ } { } VULKAN_HPP_CONSTEXPR DepthBiasInfoEXT( DepthBiasInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; DepthBiasInfoEXT( VkDepthBiasInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : DepthBiasInfoEXT( *reinterpret_cast( &rhs ) ) {} DepthBiasInfoEXT & operator=( DepthBiasInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DepthBiasInfoEXT & operator=( VkDepthBiasInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 DepthBiasInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 DepthBiasInfoEXT & setDepthBiasConstantFactor( float depthBiasConstantFactor_ ) VULKAN_HPP_NOEXCEPT { depthBiasConstantFactor = depthBiasConstantFactor_; return *this; } VULKAN_HPP_CONSTEXPR_14 DepthBiasInfoEXT & setDepthBiasClamp( float depthBiasClamp_ ) VULKAN_HPP_NOEXCEPT { depthBiasClamp = depthBiasClamp_; return *this; } VULKAN_HPP_CONSTEXPR_14 DepthBiasInfoEXT & setDepthBiasSlopeFactor( float depthBiasSlopeFactor_ ) VULKAN_HPP_NOEXCEPT { depthBiasSlopeFactor = depthBiasSlopeFactor_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkDepthBiasInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDepthBiasInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, depthBiasConstantFactor, depthBiasClamp, depthBiasSlopeFactor ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( DepthBiasInfoEXT const & ) const = default; #else bool operator==( DepthBiasInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( depthBiasConstantFactor == rhs.depthBiasConstantFactor ) && ( depthBiasClamp == rhs.depthBiasClamp ) && ( depthBiasSlopeFactor == rhs.depthBiasSlopeFactor ); # endif } bool operator!=( DepthBiasInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDepthBiasInfoEXT; const void * pNext = {}; float depthBiasConstantFactor = {}; float depthBiasClamp = {}; float depthBiasSlopeFactor = {}; }; template <> struct CppType { using Type = DepthBiasInfoEXT; }; struct DepthBiasRepresentationInfoEXT { using NativeType = VkDepthBiasRepresentationInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDepthBiasRepresentationInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR DepthBiasRepresentationInfoEXT( VULKAN_HPP_NAMESPACE::DepthBiasRepresentationEXT depthBiasRepresentation_ = VULKAN_HPP_NAMESPACE::DepthBiasRepresentationEXT::eLeastRepresentableValueFormat, VULKAN_HPP_NAMESPACE::Bool32 depthBiasExact_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , depthBiasRepresentation{ depthBiasRepresentation_ } , depthBiasExact{ depthBiasExact_ } { } VULKAN_HPP_CONSTEXPR DepthBiasRepresentationInfoEXT( DepthBiasRepresentationInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; DepthBiasRepresentationInfoEXT( VkDepthBiasRepresentationInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : DepthBiasRepresentationInfoEXT( *reinterpret_cast( &rhs ) ) { } DepthBiasRepresentationInfoEXT & operator=( DepthBiasRepresentationInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DepthBiasRepresentationInfoEXT & operator=( VkDepthBiasRepresentationInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 DepthBiasRepresentationInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 DepthBiasRepresentationInfoEXT & setDepthBiasRepresentation( VULKAN_HPP_NAMESPACE::DepthBiasRepresentationEXT depthBiasRepresentation_ ) VULKAN_HPP_NOEXCEPT { depthBiasRepresentation = depthBiasRepresentation_; return *this; } VULKAN_HPP_CONSTEXPR_14 DepthBiasRepresentationInfoEXT & setDepthBiasExact( VULKAN_HPP_NAMESPACE::Bool32 depthBiasExact_ ) VULKAN_HPP_NOEXCEPT { depthBiasExact = depthBiasExact_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkDepthBiasRepresentationInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDepthBiasRepresentationInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, depthBiasRepresentation, depthBiasExact ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( DepthBiasRepresentationInfoEXT const & ) const = default; #else bool operator==( DepthBiasRepresentationInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( depthBiasRepresentation == rhs.depthBiasRepresentation ) && ( depthBiasExact == rhs.depthBiasExact ); # endif } bool operator!=( DepthBiasRepresentationInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDepthBiasRepresentationInfoEXT; const void * pNext = {}; VULKAN_HPP_NAMESPACE::DepthBiasRepresentationEXT depthBiasRepresentation = VULKAN_HPP_NAMESPACE::DepthBiasRepresentationEXT::eLeastRepresentableValueFormat; VULKAN_HPP_NAMESPACE::Bool32 depthBiasExact = {}; }; template <> struct CppType { using Type = DepthBiasRepresentationInfoEXT; }; struct DepthClampRangeEXT { using NativeType = VkDepthClampRangeEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR DepthClampRangeEXT( float minDepthClamp_ = {}, float maxDepthClamp_ = {} ) VULKAN_HPP_NOEXCEPT : minDepthClamp{ minDepthClamp_ } , maxDepthClamp{ maxDepthClamp_ } { } VULKAN_HPP_CONSTEXPR DepthClampRangeEXT( DepthClampRangeEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; DepthClampRangeEXT( VkDepthClampRangeEXT const & rhs ) VULKAN_HPP_NOEXCEPT : DepthClampRangeEXT( *reinterpret_cast( &rhs ) ) {} DepthClampRangeEXT & operator=( DepthClampRangeEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DepthClampRangeEXT & operator=( VkDepthClampRangeEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 DepthClampRangeEXT & setMinDepthClamp( float minDepthClamp_ ) VULKAN_HPP_NOEXCEPT { minDepthClamp = minDepthClamp_; return *this; } VULKAN_HPP_CONSTEXPR_14 DepthClampRangeEXT & setMaxDepthClamp( float maxDepthClamp_ ) VULKAN_HPP_NOEXCEPT { maxDepthClamp = maxDepthClamp_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkDepthClampRangeEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDepthClampRangeEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( minDepthClamp, maxDepthClamp ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( DepthClampRangeEXT const & ) const = default; #else bool operator==( DepthClampRangeEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( minDepthClamp == rhs.minDepthClamp ) && ( maxDepthClamp == rhs.maxDepthClamp ); # endif } bool operator!=( DepthClampRangeEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: float minDepthClamp = {}; float maxDepthClamp = {}; }; struct DescriptorAddressInfoEXT { using NativeType = VkDescriptorAddressInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDescriptorAddressInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR DescriptorAddressInfoEXT( VULKAN_HPP_NAMESPACE::DeviceAddress address_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize range_ = {}, VULKAN_HPP_NAMESPACE::Format format_ = VULKAN_HPP_NAMESPACE::Format::eUndefined, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , address{ address_ } , range{ range_ } , format{ format_ } { } VULKAN_HPP_CONSTEXPR DescriptorAddressInfoEXT( DescriptorAddressInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; DescriptorAddressInfoEXT( VkDescriptorAddressInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : DescriptorAddressInfoEXT( *reinterpret_cast( &rhs ) ) { } DescriptorAddressInfoEXT & operator=( DescriptorAddressInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DescriptorAddressInfoEXT & operator=( VkDescriptorAddressInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 DescriptorAddressInfoEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 DescriptorAddressInfoEXT & setAddress( VULKAN_HPP_NAMESPACE::DeviceAddress address_ ) VULKAN_HPP_NOEXCEPT { address = address_; return *this; } VULKAN_HPP_CONSTEXPR_14 DescriptorAddressInfoEXT & setRange( VULKAN_HPP_NAMESPACE::DeviceSize range_ ) VULKAN_HPP_NOEXCEPT { range = range_; return *this; } VULKAN_HPP_CONSTEXPR_14 DescriptorAddressInfoEXT & setFormat( VULKAN_HPP_NAMESPACE::Format format_ ) VULKAN_HPP_NOEXCEPT { format = format_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkDescriptorAddressInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDescriptorAddressInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, address, range, format ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( DescriptorAddressInfoEXT const & ) const = default; #else bool operator==( DescriptorAddressInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( address == rhs.address ) && ( range == rhs.range ) && ( format == rhs.format ); # endif } bool operator!=( DescriptorAddressInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDescriptorAddressInfoEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::DeviceAddress address = {}; VULKAN_HPP_NAMESPACE::DeviceSize range = {}; VULKAN_HPP_NAMESPACE::Format format = VULKAN_HPP_NAMESPACE::Format::eUndefined; }; template <> struct CppType { using Type = DescriptorAddressInfoEXT; }; struct DescriptorBufferBindingInfoEXT { using NativeType = VkDescriptorBufferBindingInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDescriptorBufferBindingInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR DescriptorBufferBindingInfoEXT( VULKAN_HPP_NAMESPACE::DeviceAddress address_ = {}, VULKAN_HPP_NAMESPACE::BufferUsageFlags usage_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , address{ address_ } , usage{ usage_ } { } VULKAN_HPP_CONSTEXPR DescriptorBufferBindingInfoEXT( DescriptorBufferBindingInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; DescriptorBufferBindingInfoEXT( VkDescriptorBufferBindingInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : DescriptorBufferBindingInfoEXT( *reinterpret_cast( &rhs ) ) { } DescriptorBufferBindingInfoEXT & operator=( DescriptorBufferBindingInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DescriptorBufferBindingInfoEXT & operator=( VkDescriptorBufferBindingInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 DescriptorBufferBindingInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 DescriptorBufferBindingInfoEXT & setAddress( VULKAN_HPP_NAMESPACE::DeviceAddress address_ ) VULKAN_HPP_NOEXCEPT { address = address_; return *this; } VULKAN_HPP_CONSTEXPR_14 DescriptorBufferBindingInfoEXT & setUsage( VULKAN_HPP_NAMESPACE::BufferUsageFlags usage_ ) VULKAN_HPP_NOEXCEPT { usage = usage_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkDescriptorBufferBindingInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDescriptorBufferBindingInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, address, usage ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( DescriptorBufferBindingInfoEXT const & ) const = default; #else bool operator==( DescriptorBufferBindingInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( address == rhs.address ) && ( usage == rhs.usage ); # endif } bool operator!=( DescriptorBufferBindingInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDescriptorBufferBindingInfoEXT; const void * pNext = {}; VULKAN_HPP_NAMESPACE::DeviceAddress address = {}; VULKAN_HPP_NAMESPACE::BufferUsageFlags usage = {}; }; template <> struct CppType { using Type = DescriptorBufferBindingInfoEXT; }; struct DescriptorBufferBindingPushDescriptorBufferHandleEXT { using NativeType = VkDescriptorBufferBindingPushDescriptorBufferHandleEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDescriptorBufferBindingPushDescriptorBufferHandleEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR DescriptorBufferBindingPushDescriptorBufferHandleEXT( VULKAN_HPP_NAMESPACE::Buffer buffer_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , buffer{ buffer_ } { } VULKAN_HPP_CONSTEXPR DescriptorBufferBindingPushDescriptorBufferHandleEXT( DescriptorBufferBindingPushDescriptorBufferHandleEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; DescriptorBufferBindingPushDescriptorBufferHandleEXT( VkDescriptorBufferBindingPushDescriptorBufferHandleEXT const & rhs ) VULKAN_HPP_NOEXCEPT : DescriptorBufferBindingPushDescriptorBufferHandleEXT( *reinterpret_cast( &rhs ) ) { } DescriptorBufferBindingPushDescriptorBufferHandleEXT & operator=( DescriptorBufferBindingPushDescriptorBufferHandleEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DescriptorBufferBindingPushDescriptorBufferHandleEXT & operator=( VkDescriptorBufferBindingPushDescriptorBufferHandleEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 DescriptorBufferBindingPushDescriptorBufferHandleEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 DescriptorBufferBindingPushDescriptorBufferHandleEXT & setBuffer( VULKAN_HPP_NAMESPACE::Buffer buffer_ ) VULKAN_HPP_NOEXCEPT { buffer = buffer_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkDescriptorBufferBindingPushDescriptorBufferHandleEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDescriptorBufferBindingPushDescriptorBufferHandleEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, buffer ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( DescriptorBufferBindingPushDescriptorBufferHandleEXT const & ) const = default; #else bool operator==( DescriptorBufferBindingPushDescriptorBufferHandleEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( buffer == rhs.buffer ); # endif } bool operator!=( DescriptorBufferBindingPushDescriptorBufferHandleEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDescriptorBufferBindingPushDescriptorBufferHandleEXT; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Buffer buffer = {}; }; template <> struct CppType { using Type = DescriptorBufferBindingPushDescriptorBufferHandleEXT; }; struct DescriptorBufferInfo { using NativeType = VkDescriptorBufferInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR DescriptorBufferInfo( VULKAN_HPP_NAMESPACE::Buffer buffer_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize offset_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize range_ = {} ) VULKAN_HPP_NOEXCEPT : buffer{ buffer_ } , offset{ offset_ } , range{ range_ } { } VULKAN_HPP_CONSTEXPR DescriptorBufferInfo( DescriptorBufferInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; DescriptorBufferInfo( VkDescriptorBufferInfo const & rhs ) VULKAN_HPP_NOEXCEPT : DescriptorBufferInfo( *reinterpret_cast( &rhs ) ) { } DescriptorBufferInfo & operator=( DescriptorBufferInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DescriptorBufferInfo & operator=( VkDescriptorBufferInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 DescriptorBufferInfo & setBuffer( VULKAN_HPP_NAMESPACE::Buffer buffer_ ) VULKAN_HPP_NOEXCEPT { buffer = buffer_; return *this; } VULKAN_HPP_CONSTEXPR_14 DescriptorBufferInfo & setOffset( VULKAN_HPP_NAMESPACE::DeviceSize offset_ ) VULKAN_HPP_NOEXCEPT { offset = offset_; return *this; } VULKAN_HPP_CONSTEXPR_14 DescriptorBufferInfo & setRange( VULKAN_HPP_NAMESPACE::DeviceSize range_ ) VULKAN_HPP_NOEXCEPT { range = range_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkDescriptorBufferInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDescriptorBufferInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( buffer, offset, range ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( DescriptorBufferInfo const & ) const = default; #else bool operator==( DescriptorBufferInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( buffer == rhs.buffer ) && ( offset == rhs.offset ) && ( range == rhs.range ); # endif } bool operator!=( DescriptorBufferInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::Buffer buffer = {}; VULKAN_HPP_NAMESPACE::DeviceSize offset = {}; VULKAN_HPP_NAMESPACE::DeviceSize range = {}; }; struct DescriptorImageInfo { using NativeType = VkDescriptorImageInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR DescriptorImageInfo( VULKAN_HPP_NAMESPACE::Sampler sampler_ = {}, VULKAN_HPP_NAMESPACE::ImageView imageView_ = {}, VULKAN_HPP_NAMESPACE::ImageLayout imageLayout_ = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined ) VULKAN_HPP_NOEXCEPT : sampler{ sampler_ } , imageView{ imageView_ } , imageLayout{ imageLayout_ } { } VULKAN_HPP_CONSTEXPR DescriptorImageInfo( DescriptorImageInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; DescriptorImageInfo( VkDescriptorImageInfo const & rhs ) VULKAN_HPP_NOEXCEPT : DescriptorImageInfo( *reinterpret_cast( &rhs ) ) { } DescriptorImageInfo & operator=( DescriptorImageInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DescriptorImageInfo & operator=( VkDescriptorImageInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 DescriptorImageInfo & setSampler( VULKAN_HPP_NAMESPACE::Sampler sampler_ ) VULKAN_HPP_NOEXCEPT { sampler = sampler_; return *this; } VULKAN_HPP_CONSTEXPR_14 DescriptorImageInfo & setImageView( VULKAN_HPP_NAMESPACE::ImageView imageView_ ) VULKAN_HPP_NOEXCEPT { imageView = imageView_; return *this; } VULKAN_HPP_CONSTEXPR_14 DescriptorImageInfo & setImageLayout( VULKAN_HPP_NAMESPACE::ImageLayout imageLayout_ ) VULKAN_HPP_NOEXCEPT { imageLayout = imageLayout_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkDescriptorImageInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDescriptorImageInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sampler, imageView, imageLayout ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( DescriptorImageInfo const & ) const = default; #else bool operator==( DescriptorImageInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sampler == rhs.sampler ) && ( imageView == rhs.imageView ) && ( imageLayout == rhs.imageLayout ); # endif } bool operator!=( DescriptorImageInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::Sampler sampler = {}; VULKAN_HPP_NAMESPACE::ImageView imageView = {}; VULKAN_HPP_NAMESPACE::ImageLayout imageLayout = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined; }; union DescriptorDataEXT { using NativeType = VkDescriptorDataEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_UNION_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 DescriptorDataEXT( const VULKAN_HPP_NAMESPACE::Sampler * pSampler_ = {} ) : pSampler( pSampler_ ) {} VULKAN_HPP_CONSTEXPR_14 DescriptorDataEXT( const VULKAN_HPP_NAMESPACE::DescriptorImageInfo * pDescriptorImageInfo_ ) : pCombinedImageSampler( pDescriptorImageInfo_ ) { } VULKAN_HPP_CONSTEXPR_14 DescriptorDataEXT( const VULKAN_HPP_NAMESPACE::DescriptorAddressInfoEXT * pDescriptorAddressInfoEXT_ ) : pUniformTexelBuffer( pDescriptorAddressInfoEXT_ ) { } VULKAN_HPP_CONSTEXPR_14 DescriptorDataEXT( VULKAN_HPP_NAMESPACE::DeviceAddress accelerationStructure_ ) : accelerationStructure( accelerationStructure_ ) {} #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_UNION_SETTERS ) VULKAN_HPP_CONSTEXPR_14 DescriptorDataEXT & setPSampler( const VULKAN_HPP_NAMESPACE::Sampler * pSampler_ ) VULKAN_HPP_NOEXCEPT { pSampler = pSampler_; return *this; } VULKAN_HPP_CONSTEXPR_14 DescriptorDataEXT & setPCombinedImageSampler( const VULKAN_HPP_NAMESPACE::DescriptorImageInfo * pCombinedImageSampler_ ) VULKAN_HPP_NOEXCEPT { pCombinedImageSampler = pCombinedImageSampler_; return *this; } VULKAN_HPP_CONSTEXPR_14 DescriptorDataEXT & setPInputAttachmentImage( const VULKAN_HPP_NAMESPACE::DescriptorImageInfo * pInputAttachmentImage_ ) VULKAN_HPP_NOEXCEPT { pInputAttachmentImage = pInputAttachmentImage_; return *this; } VULKAN_HPP_CONSTEXPR_14 DescriptorDataEXT & setPSampledImage( const VULKAN_HPP_NAMESPACE::DescriptorImageInfo * pSampledImage_ ) VULKAN_HPP_NOEXCEPT { pSampledImage = pSampledImage_; return *this; } VULKAN_HPP_CONSTEXPR_14 DescriptorDataEXT & setPStorageImage( const VULKAN_HPP_NAMESPACE::DescriptorImageInfo * pStorageImage_ ) VULKAN_HPP_NOEXCEPT { pStorageImage = pStorageImage_; return *this; } VULKAN_HPP_CONSTEXPR_14 DescriptorDataEXT & setPUniformTexelBuffer( const VULKAN_HPP_NAMESPACE::DescriptorAddressInfoEXT * pUniformTexelBuffer_ ) VULKAN_HPP_NOEXCEPT { pUniformTexelBuffer = pUniformTexelBuffer_; return *this; } VULKAN_HPP_CONSTEXPR_14 DescriptorDataEXT & setPStorageTexelBuffer( const VULKAN_HPP_NAMESPACE::DescriptorAddressInfoEXT * pStorageTexelBuffer_ ) VULKAN_HPP_NOEXCEPT { pStorageTexelBuffer = pStorageTexelBuffer_; return *this; } VULKAN_HPP_CONSTEXPR_14 DescriptorDataEXT & setPUniformBuffer( const VULKAN_HPP_NAMESPACE::DescriptorAddressInfoEXT * pUniformBuffer_ ) VULKAN_HPP_NOEXCEPT { pUniformBuffer = pUniformBuffer_; return *this; } VULKAN_HPP_CONSTEXPR_14 DescriptorDataEXT & setPStorageBuffer( const VULKAN_HPP_NAMESPACE::DescriptorAddressInfoEXT * pStorageBuffer_ ) VULKAN_HPP_NOEXCEPT { pStorageBuffer = pStorageBuffer_; return *this; } VULKAN_HPP_CONSTEXPR_14 DescriptorDataEXT & setAccelerationStructure( VULKAN_HPP_NAMESPACE::DeviceAddress accelerationStructure_ ) VULKAN_HPP_NOEXCEPT { accelerationStructure = accelerationStructure_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkDescriptorDataEXT const &() const { return *reinterpret_cast( this ); } operator VkDescriptorDataEXT &() { return *reinterpret_cast( this ); } #ifdef VULKAN_HPP_HAS_UNRESTRICTED_UNIONS const VULKAN_HPP_NAMESPACE::Sampler * pSampler; const VULKAN_HPP_NAMESPACE::DescriptorImageInfo * pCombinedImageSampler; const VULKAN_HPP_NAMESPACE::DescriptorImageInfo * pInputAttachmentImage; const VULKAN_HPP_NAMESPACE::DescriptorImageInfo * pSampledImage; const VULKAN_HPP_NAMESPACE::DescriptorImageInfo * pStorageImage; const VULKAN_HPP_NAMESPACE::DescriptorAddressInfoEXT * pUniformTexelBuffer; const VULKAN_HPP_NAMESPACE::DescriptorAddressInfoEXT * pStorageTexelBuffer; const VULKAN_HPP_NAMESPACE::DescriptorAddressInfoEXT * pUniformBuffer; const VULKAN_HPP_NAMESPACE::DescriptorAddressInfoEXT * pStorageBuffer; VULKAN_HPP_NAMESPACE::DeviceAddress accelerationStructure; #else const VkSampler * pSampler; const VkDescriptorImageInfo * pCombinedImageSampler; const VkDescriptorImageInfo * pInputAttachmentImage; const VkDescriptorImageInfo * pSampledImage; const VkDescriptorImageInfo * pStorageImage; const VkDescriptorAddressInfoEXT * pUniformTexelBuffer; const VkDescriptorAddressInfoEXT * pStorageTexelBuffer; const VkDescriptorAddressInfoEXT * pUniformBuffer; const VkDescriptorAddressInfoEXT * pStorageBuffer; VkDeviceAddress accelerationStructure; #endif /*VULKAN_HPP_HAS_UNRESTRICTED_UNIONS*/ }; struct DescriptorGetInfoEXT { using NativeType = VkDescriptorGetInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDescriptorGetInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 DescriptorGetInfoEXT( VULKAN_HPP_NAMESPACE::DescriptorType type_ = VULKAN_HPP_NAMESPACE::DescriptorType::eSampler, VULKAN_HPP_NAMESPACE::DescriptorDataEXT data_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , type{ type_ } , data{ data_ } { } VULKAN_HPP_CONSTEXPR_14 DescriptorGetInfoEXT( DescriptorGetInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; DescriptorGetInfoEXT( VkDescriptorGetInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : DescriptorGetInfoEXT( *reinterpret_cast( &rhs ) ) { } DescriptorGetInfoEXT & operator=( DescriptorGetInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DescriptorGetInfoEXT & operator=( VkDescriptorGetInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 DescriptorGetInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 DescriptorGetInfoEXT & setType( VULKAN_HPP_NAMESPACE::DescriptorType type_ ) VULKAN_HPP_NOEXCEPT { type = type_; return *this; } VULKAN_HPP_CONSTEXPR_14 DescriptorGetInfoEXT & setData( VULKAN_HPP_NAMESPACE::DescriptorDataEXT const & data_ ) VULKAN_HPP_NOEXCEPT { data = data_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkDescriptorGetInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDescriptorGetInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, type, data ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDescriptorGetInfoEXT; const void * pNext = {}; VULKAN_HPP_NAMESPACE::DescriptorType type = VULKAN_HPP_NAMESPACE::DescriptorType::eSampler; VULKAN_HPP_NAMESPACE::DescriptorDataEXT data = {}; }; template <> struct CppType { using Type = DescriptorGetInfoEXT; }; struct DescriptorPoolSize { using NativeType = VkDescriptorPoolSize; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR DescriptorPoolSize( VULKAN_HPP_NAMESPACE::DescriptorType type_ = VULKAN_HPP_NAMESPACE::DescriptorType::eSampler, uint32_t descriptorCount_ = {} ) VULKAN_HPP_NOEXCEPT : type{ type_ } , descriptorCount{ descriptorCount_ } { } VULKAN_HPP_CONSTEXPR DescriptorPoolSize( DescriptorPoolSize const & rhs ) VULKAN_HPP_NOEXCEPT = default; DescriptorPoolSize( VkDescriptorPoolSize const & rhs ) VULKAN_HPP_NOEXCEPT : DescriptorPoolSize( *reinterpret_cast( &rhs ) ) {} DescriptorPoolSize & operator=( DescriptorPoolSize const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DescriptorPoolSize & operator=( VkDescriptorPoolSize const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 DescriptorPoolSize & setType( VULKAN_HPP_NAMESPACE::DescriptorType type_ ) VULKAN_HPP_NOEXCEPT { type = type_; return *this; } VULKAN_HPP_CONSTEXPR_14 DescriptorPoolSize & setDescriptorCount( uint32_t descriptorCount_ ) VULKAN_HPP_NOEXCEPT { descriptorCount = descriptorCount_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkDescriptorPoolSize const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDescriptorPoolSize &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( type, descriptorCount ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( DescriptorPoolSize const & ) const = default; #else bool operator==( DescriptorPoolSize const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( type == rhs.type ) && ( descriptorCount == rhs.descriptorCount ); # endif } bool operator!=( DescriptorPoolSize const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::DescriptorType type = VULKAN_HPP_NAMESPACE::DescriptorType::eSampler; uint32_t descriptorCount = {}; }; struct DescriptorPoolCreateInfo { using NativeType = VkDescriptorPoolCreateInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDescriptorPoolCreateInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR DescriptorPoolCreateInfo( VULKAN_HPP_NAMESPACE::DescriptorPoolCreateFlags flags_ = {}, uint32_t maxSets_ = {}, uint32_t poolSizeCount_ = {}, const VULKAN_HPP_NAMESPACE::DescriptorPoolSize * pPoolSizes_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , maxSets{ maxSets_ } , poolSizeCount{ poolSizeCount_ } , pPoolSizes{ pPoolSizes_ } { } VULKAN_HPP_CONSTEXPR DescriptorPoolCreateInfo( DescriptorPoolCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; DescriptorPoolCreateInfo( VkDescriptorPoolCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT : DescriptorPoolCreateInfo( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) DescriptorPoolCreateInfo( VULKAN_HPP_NAMESPACE::DescriptorPoolCreateFlags flags_, uint32_t maxSets_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & poolSizes_, const void * pNext_ = nullptr ) : pNext( pNext_ ), flags( flags_ ), maxSets( maxSets_ ), poolSizeCount( static_cast( poolSizes_.size() ) ), pPoolSizes( poolSizes_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ DescriptorPoolCreateInfo & operator=( DescriptorPoolCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DescriptorPoolCreateInfo & operator=( VkDescriptorPoolCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 DescriptorPoolCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 DescriptorPoolCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::DescriptorPoolCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 DescriptorPoolCreateInfo & setMaxSets( uint32_t maxSets_ ) VULKAN_HPP_NOEXCEPT { maxSets = maxSets_; return *this; } VULKAN_HPP_CONSTEXPR_14 DescriptorPoolCreateInfo & setPoolSizeCount( uint32_t poolSizeCount_ ) VULKAN_HPP_NOEXCEPT { poolSizeCount = poolSizeCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 DescriptorPoolCreateInfo & setPPoolSizes( const VULKAN_HPP_NAMESPACE::DescriptorPoolSize * pPoolSizes_ ) VULKAN_HPP_NOEXCEPT { pPoolSizes = pPoolSizes_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) DescriptorPoolCreateInfo & setPoolSizes( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & poolSizes_ ) VULKAN_HPP_NOEXCEPT { poolSizeCount = static_cast( poolSizes_.size() ); pPoolSizes = poolSizes_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkDescriptorPoolCreateInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDescriptorPoolCreateInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, maxSets, poolSizeCount, pPoolSizes ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( DescriptorPoolCreateInfo const & ) const = default; #else bool operator==( DescriptorPoolCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( maxSets == rhs.maxSets ) && ( poolSizeCount == rhs.poolSizeCount ) && ( pPoolSizes == rhs.pPoolSizes ); # endif } bool operator!=( DescriptorPoolCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDescriptorPoolCreateInfo; const void * pNext = {}; VULKAN_HPP_NAMESPACE::DescriptorPoolCreateFlags flags = {}; uint32_t maxSets = {}; uint32_t poolSizeCount = {}; const VULKAN_HPP_NAMESPACE::DescriptorPoolSize * pPoolSizes = {}; }; template <> struct CppType { using Type = DescriptorPoolCreateInfo; }; struct DescriptorPoolInlineUniformBlockCreateInfo { using NativeType = VkDescriptorPoolInlineUniformBlockCreateInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDescriptorPoolInlineUniformBlockCreateInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR DescriptorPoolInlineUniformBlockCreateInfo( uint32_t maxInlineUniformBlockBindings_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , maxInlineUniformBlockBindings{ maxInlineUniformBlockBindings_ } { } VULKAN_HPP_CONSTEXPR DescriptorPoolInlineUniformBlockCreateInfo( DescriptorPoolInlineUniformBlockCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; DescriptorPoolInlineUniformBlockCreateInfo( VkDescriptorPoolInlineUniformBlockCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT : DescriptorPoolInlineUniformBlockCreateInfo( *reinterpret_cast( &rhs ) ) { } DescriptorPoolInlineUniformBlockCreateInfo & operator=( DescriptorPoolInlineUniformBlockCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DescriptorPoolInlineUniformBlockCreateInfo & operator=( VkDescriptorPoolInlineUniformBlockCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 DescriptorPoolInlineUniformBlockCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 DescriptorPoolInlineUniformBlockCreateInfo & setMaxInlineUniformBlockBindings( uint32_t maxInlineUniformBlockBindings_ ) VULKAN_HPP_NOEXCEPT { maxInlineUniformBlockBindings = maxInlineUniformBlockBindings_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkDescriptorPoolInlineUniformBlockCreateInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDescriptorPoolInlineUniformBlockCreateInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, maxInlineUniformBlockBindings ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( DescriptorPoolInlineUniformBlockCreateInfo const & ) const = default; #else bool operator==( DescriptorPoolInlineUniformBlockCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( maxInlineUniformBlockBindings == rhs.maxInlineUniformBlockBindings ); # endif } bool operator!=( DescriptorPoolInlineUniformBlockCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDescriptorPoolInlineUniformBlockCreateInfo; const void * pNext = {}; uint32_t maxInlineUniformBlockBindings = {}; }; template <> struct CppType { using Type = DescriptorPoolInlineUniformBlockCreateInfo; }; using DescriptorPoolInlineUniformBlockCreateInfoEXT = DescriptorPoolInlineUniformBlockCreateInfo; struct DescriptorSetAllocateInfo { using NativeType = VkDescriptorSetAllocateInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDescriptorSetAllocateInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR DescriptorSetAllocateInfo( VULKAN_HPP_NAMESPACE::DescriptorPool descriptorPool_ = {}, uint32_t descriptorSetCount_ = {}, const VULKAN_HPP_NAMESPACE::DescriptorSetLayout * pSetLayouts_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , descriptorPool{ descriptorPool_ } , descriptorSetCount{ descriptorSetCount_ } , pSetLayouts{ pSetLayouts_ } { } VULKAN_HPP_CONSTEXPR DescriptorSetAllocateInfo( DescriptorSetAllocateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; DescriptorSetAllocateInfo( VkDescriptorSetAllocateInfo const & rhs ) VULKAN_HPP_NOEXCEPT : DescriptorSetAllocateInfo( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) DescriptorSetAllocateInfo( VULKAN_HPP_NAMESPACE::DescriptorPool descriptorPool_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & setLayouts_, const void * pNext_ = nullptr ) : pNext( pNext_ ), descriptorPool( descriptorPool_ ), descriptorSetCount( static_cast( setLayouts_.size() ) ), pSetLayouts( setLayouts_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ DescriptorSetAllocateInfo & operator=( DescriptorSetAllocateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DescriptorSetAllocateInfo & operator=( VkDescriptorSetAllocateInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 DescriptorSetAllocateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 DescriptorSetAllocateInfo & setDescriptorPool( VULKAN_HPP_NAMESPACE::DescriptorPool descriptorPool_ ) VULKAN_HPP_NOEXCEPT { descriptorPool = descriptorPool_; return *this; } VULKAN_HPP_CONSTEXPR_14 DescriptorSetAllocateInfo & setDescriptorSetCount( uint32_t descriptorSetCount_ ) VULKAN_HPP_NOEXCEPT { descriptorSetCount = descriptorSetCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 DescriptorSetAllocateInfo & setPSetLayouts( const VULKAN_HPP_NAMESPACE::DescriptorSetLayout * pSetLayouts_ ) VULKAN_HPP_NOEXCEPT { pSetLayouts = pSetLayouts_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) DescriptorSetAllocateInfo & setSetLayouts( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & setLayouts_ ) VULKAN_HPP_NOEXCEPT { descriptorSetCount = static_cast( setLayouts_.size() ); pSetLayouts = setLayouts_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkDescriptorSetAllocateInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDescriptorSetAllocateInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, descriptorPool, descriptorSetCount, pSetLayouts ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( DescriptorSetAllocateInfo const & ) const = default; #else bool operator==( DescriptorSetAllocateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( descriptorPool == rhs.descriptorPool ) && ( descriptorSetCount == rhs.descriptorSetCount ) && ( pSetLayouts == rhs.pSetLayouts ); # endif } bool operator!=( DescriptorSetAllocateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDescriptorSetAllocateInfo; const void * pNext = {}; VULKAN_HPP_NAMESPACE::DescriptorPool descriptorPool = {}; uint32_t descriptorSetCount = {}; const VULKAN_HPP_NAMESPACE::DescriptorSetLayout * pSetLayouts = {}; }; template <> struct CppType { using Type = DescriptorSetAllocateInfo; }; struct DescriptorSetBindingReferenceVALVE { using NativeType = VkDescriptorSetBindingReferenceVALVE; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDescriptorSetBindingReferenceVALVE; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR DescriptorSetBindingReferenceVALVE( VULKAN_HPP_NAMESPACE::DescriptorSetLayout descriptorSetLayout_ = {}, uint32_t binding_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , descriptorSetLayout{ descriptorSetLayout_ } , binding{ binding_ } { } VULKAN_HPP_CONSTEXPR DescriptorSetBindingReferenceVALVE( DescriptorSetBindingReferenceVALVE const & rhs ) VULKAN_HPP_NOEXCEPT = default; DescriptorSetBindingReferenceVALVE( VkDescriptorSetBindingReferenceVALVE const & rhs ) VULKAN_HPP_NOEXCEPT : DescriptorSetBindingReferenceVALVE( *reinterpret_cast( &rhs ) ) { } DescriptorSetBindingReferenceVALVE & operator=( DescriptorSetBindingReferenceVALVE const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DescriptorSetBindingReferenceVALVE & operator=( VkDescriptorSetBindingReferenceVALVE const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 DescriptorSetBindingReferenceVALVE & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 DescriptorSetBindingReferenceVALVE & setDescriptorSetLayout( VULKAN_HPP_NAMESPACE::DescriptorSetLayout descriptorSetLayout_ ) VULKAN_HPP_NOEXCEPT { descriptorSetLayout = descriptorSetLayout_; return *this; } VULKAN_HPP_CONSTEXPR_14 DescriptorSetBindingReferenceVALVE & setBinding( uint32_t binding_ ) VULKAN_HPP_NOEXCEPT { binding = binding_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkDescriptorSetBindingReferenceVALVE const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDescriptorSetBindingReferenceVALVE &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, descriptorSetLayout, binding ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( DescriptorSetBindingReferenceVALVE const & ) const = default; #else bool operator==( DescriptorSetBindingReferenceVALVE const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( descriptorSetLayout == rhs.descriptorSetLayout ) && ( binding == rhs.binding ); # endif } bool operator!=( DescriptorSetBindingReferenceVALVE const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDescriptorSetBindingReferenceVALVE; const void * pNext = {}; VULKAN_HPP_NAMESPACE::DescriptorSetLayout descriptorSetLayout = {}; uint32_t binding = {}; }; template <> struct CppType { using Type = DescriptorSetBindingReferenceVALVE; }; struct DescriptorSetLayoutBinding { using NativeType = VkDescriptorSetLayoutBinding; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR DescriptorSetLayoutBinding( uint32_t binding_ = {}, VULKAN_HPP_NAMESPACE::DescriptorType descriptorType_ = VULKAN_HPP_NAMESPACE::DescriptorType::eSampler, uint32_t descriptorCount_ = {}, VULKAN_HPP_NAMESPACE::ShaderStageFlags stageFlags_ = {}, const VULKAN_HPP_NAMESPACE::Sampler * pImmutableSamplers_ = {} ) VULKAN_HPP_NOEXCEPT : binding{ binding_ } , descriptorType{ descriptorType_ } , descriptorCount{ descriptorCount_ } , stageFlags{ stageFlags_ } , pImmutableSamplers{ pImmutableSamplers_ } { } VULKAN_HPP_CONSTEXPR DescriptorSetLayoutBinding( DescriptorSetLayoutBinding const & rhs ) VULKAN_HPP_NOEXCEPT = default; DescriptorSetLayoutBinding( VkDescriptorSetLayoutBinding const & rhs ) VULKAN_HPP_NOEXCEPT : DescriptorSetLayoutBinding( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) DescriptorSetLayoutBinding( uint32_t binding_, VULKAN_HPP_NAMESPACE::DescriptorType descriptorType_, VULKAN_HPP_NAMESPACE::ShaderStageFlags stageFlags_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & immutableSamplers_ ) : binding( binding_ ) , descriptorType( descriptorType_ ) , descriptorCount( static_cast( immutableSamplers_.size() ) ) , stageFlags( stageFlags_ ) , pImmutableSamplers( immutableSamplers_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ DescriptorSetLayoutBinding & operator=( DescriptorSetLayoutBinding const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DescriptorSetLayoutBinding & operator=( VkDescriptorSetLayoutBinding const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 DescriptorSetLayoutBinding & setBinding( uint32_t binding_ ) VULKAN_HPP_NOEXCEPT { binding = binding_; return *this; } VULKAN_HPP_CONSTEXPR_14 DescriptorSetLayoutBinding & setDescriptorType( VULKAN_HPP_NAMESPACE::DescriptorType descriptorType_ ) VULKAN_HPP_NOEXCEPT { descriptorType = descriptorType_; return *this; } VULKAN_HPP_CONSTEXPR_14 DescriptorSetLayoutBinding & setDescriptorCount( uint32_t descriptorCount_ ) VULKAN_HPP_NOEXCEPT { descriptorCount = descriptorCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 DescriptorSetLayoutBinding & setStageFlags( VULKAN_HPP_NAMESPACE::ShaderStageFlags stageFlags_ ) VULKAN_HPP_NOEXCEPT { stageFlags = stageFlags_; return *this; } VULKAN_HPP_CONSTEXPR_14 DescriptorSetLayoutBinding & setPImmutableSamplers( const VULKAN_HPP_NAMESPACE::Sampler * pImmutableSamplers_ ) VULKAN_HPP_NOEXCEPT { pImmutableSamplers = pImmutableSamplers_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) DescriptorSetLayoutBinding & setImmutableSamplers( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & immutableSamplers_ ) VULKAN_HPP_NOEXCEPT { descriptorCount = static_cast( immutableSamplers_.size() ); pImmutableSamplers = immutableSamplers_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkDescriptorSetLayoutBinding const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDescriptorSetLayoutBinding &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( binding, descriptorType, descriptorCount, stageFlags, pImmutableSamplers ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( DescriptorSetLayoutBinding const & ) const = default; #else bool operator==( DescriptorSetLayoutBinding const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( binding == rhs.binding ) && ( descriptorType == rhs.descriptorType ) && ( descriptorCount == rhs.descriptorCount ) && ( stageFlags == rhs.stageFlags ) && ( pImmutableSamplers == rhs.pImmutableSamplers ); # endif } bool operator!=( DescriptorSetLayoutBinding const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: uint32_t binding = {}; VULKAN_HPP_NAMESPACE::DescriptorType descriptorType = VULKAN_HPP_NAMESPACE::DescriptorType::eSampler; uint32_t descriptorCount = {}; VULKAN_HPP_NAMESPACE::ShaderStageFlags stageFlags = {}; const VULKAN_HPP_NAMESPACE::Sampler * pImmutableSamplers = {}; }; struct DescriptorSetLayoutBindingFlagsCreateInfo { using NativeType = VkDescriptorSetLayoutBindingFlagsCreateInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDescriptorSetLayoutBindingFlagsCreateInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR DescriptorSetLayoutBindingFlagsCreateInfo( uint32_t bindingCount_ = {}, const VULKAN_HPP_NAMESPACE::DescriptorBindingFlags * pBindingFlags_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , bindingCount{ bindingCount_ } , pBindingFlags{ pBindingFlags_ } { } VULKAN_HPP_CONSTEXPR DescriptorSetLayoutBindingFlagsCreateInfo( DescriptorSetLayoutBindingFlagsCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; DescriptorSetLayoutBindingFlagsCreateInfo( VkDescriptorSetLayoutBindingFlagsCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT : DescriptorSetLayoutBindingFlagsCreateInfo( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) DescriptorSetLayoutBindingFlagsCreateInfo( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & bindingFlags_, const void * pNext_ = nullptr ) : pNext( pNext_ ), bindingCount( static_cast( bindingFlags_.size() ) ), pBindingFlags( bindingFlags_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ DescriptorSetLayoutBindingFlagsCreateInfo & operator=( DescriptorSetLayoutBindingFlagsCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DescriptorSetLayoutBindingFlagsCreateInfo & operator=( VkDescriptorSetLayoutBindingFlagsCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 DescriptorSetLayoutBindingFlagsCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 DescriptorSetLayoutBindingFlagsCreateInfo & setBindingCount( uint32_t bindingCount_ ) VULKAN_HPP_NOEXCEPT { bindingCount = bindingCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 DescriptorSetLayoutBindingFlagsCreateInfo & setPBindingFlags( const VULKAN_HPP_NAMESPACE::DescriptorBindingFlags * pBindingFlags_ ) VULKAN_HPP_NOEXCEPT { pBindingFlags = pBindingFlags_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) DescriptorSetLayoutBindingFlagsCreateInfo & setBindingFlags( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & bindingFlags_ ) VULKAN_HPP_NOEXCEPT { bindingCount = static_cast( bindingFlags_.size() ); pBindingFlags = bindingFlags_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkDescriptorSetLayoutBindingFlagsCreateInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDescriptorSetLayoutBindingFlagsCreateInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std:: tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, bindingCount, pBindingFlags ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( DescriptorSetLayoutBindingFlagsCreateInfo const & ) const = default; #else bool operator==( DescriptorSetLayoutBindingFlagsCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( bindingCount == rhs.bindingCount ) && ( pBindingFlags == rhs.pBindingFlags ); # endif } bool operator!=( DescriptorSetLayoutBindingFlagsCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDescriptorSetLayoutBindingFlagsCreateInfo; const void * pNext = {}; uint32_t bindingCount = {}; const VULKAN_HPP_NAMESPACE::DescriptorBindingFlags * pBindingFlags = {}; }; template <> struct CppType { using Type = DescriptorSetLayoutBindingFlagsCreateInfo; }; using DescriptorSetLayoutBindingFlagsCreateInfoEXT = DescriptorSetLayoutBindingFlagsCreateInfo; struct DescriptorSetLayoutCreateInfo { using NativeType = VkDescriptorSetLayoutCreateInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDescriptorSetLayoutCreateInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR DescriptorSetLayoutCreateInfo( VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateFlags flags_ = {}, uint32_t bindingCount_ = {}, const VULKAN_HPP_NAMESPACE::DescriptorSetLayoutBinding * pBindings_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , bindingCount{ bindingCount_ } , pBindings{ pBindings_ } { } VULKAN_HPP_CONSTEXPR DescriptorSetLayoutCreateInfo( DescriptorSetLayoutCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; DescriptorSetLayoutCreateInfo( VkDescriptorSetLayoutCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT : DescriptorSetLayoutCreateInfo( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) DescriptorSetLayoutCreateInfo( VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateFlags flags_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & bindings_, const void * pNext_ = nullptr ) : pNext( pNext_ ), flags( flags_ ), bindingCount( static_cast( bindings_.size() ) ), pBindings( bindings_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ DescriptorSetLayoutCreateInfo & operator=( DescriptorSetLayoutCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DescriptorSetLayoutCreateInfo & operator=( VkDescriptorSetLayoutCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 DescriptorSetLayoutCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 DescriptorSetLayoutCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 DescriptorSetLayoutCreateInfo & setBindingCount( uint32_t bindingCount_ ) VULKAN_HPP_NOEXCEPT { bindingCount = bindingCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 DescriptorSetLayoutCreateInfo & setPBindings( const VULKAN_HPP_NAMESPACE::DescriptorSetLayoutBinding * pBindings_ ) VULKAN_HPP_NOEXCEPT { pBindings = pBindings_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) DescriptorSetLayoutCreateInfo & setBindings( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & bindings_ ) VULKAN_HPP_NOEXCEPT { bindingCount = static_cast( bindings_.size() ); pBindings = bindings_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkDescriptorSetLayoutCreateInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDescriptorSetLayoutCreateInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, bindingCount, pBindings ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( DescriptorSetLayoutCreateInfo const & ) const = default; #else bool operator==( DescriptorSetLayoutCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( bindingCount == rhs.bindingCount ) && ( pBindings == rhs.pBindings ); # endif } bool operator!=( DescriptorSetLayoutCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDescriptorSetLayoutCreateInfo; const void * pNext = {}; VULKAN_HPP_NAMESPACE::DescriptorSetLayoutCreateFlags flags = {}; uint32_t bindingCount = {}; const VULKAN_HPP_NAMESPACE::DescriptorSetLayoutBinding * pBindings = {}; }; template <> struct CppType { using Type = DescriptorSetLayoutCreateInfo; }; struct DescriptorSetLayoutHostMappingInfoVALVE { using NativeType = VkDescriptorSetLayoutHostMappingInfoVALVE; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDescriptorSetLayoutHostMappingInfoVALVE; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR DescriptorSetLayoutHostMappingInfoVALVE( size_t descriptorOffset_ = {}, uint32_t descriptorSize_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , descriptorOffset{ descriptorOffset_ } , descriptorSize{ descriptorSize_ } { } VULKAN_HPP_CONSTEXPR DescriptorSetLayoutHostMappingInfoVALVE( DescriptorSetLayoutHostMappingInfoVALVE const & rhs ) VULKAN_HPP_NOEXCEPT = default; DescriptorSetLayoutHostMappingInfoVALVE( VkDescriptorSetLayoutHostMappingInfoVALVE const & rhs ) VULKAN_HPP_NOEXCEPT : DescriptorSetLayoutHostMappingInfoVALVE( *reinterpret_cast( &rhs ) ) { } DescriptorSetLayoutHostMappingInfoVALVE & operator=( DescriptorSetLayoutHostMappingInfoVALVE const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DescriptorSetLayoutHostMappingInfoVALVE & operator=( VkDescriptorSetLayoutHostMappingInfoVALVE const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 DescriptorSetLayoutHostMappingInfoVALVE & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 DescriptorSetLayoutHostMappingInfoVALVE & setDescriptorOffset( size_t descriptorOffset_ ) VULKAN_HPP_NOEXCEPT { descriptorOffset = descriptorOffset_; return *this; } VULKAN_HPP_CONSTEXPR_14 DescriptorSetLayoutHostMappingInfoVALVE & setDescriptorSize( uint32_t descriptorSize_ ) VULKAN_HPP_NOEXCEPT { descriptorSize = descriptorSize_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkDescriptorSetLayoutHostMappingInfoVALVE const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDescriptorSetLayoutHostMappingInfoVALVE &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, descriptorOffset, descriptorSize ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( DescriptorSetLayoutHostMappingInfoVALVE const & ) const = default; #else bool operator==( DescriptorSetLayoutHostMappingInfoVALVE const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( descriptorOffset == rhs.descriptorOffset ) && ( descriptorSize == rhs.descriptorSize ); # endif } bool operator!=( DescriptorSetLayoutHostMappingInfoVALVE const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDescriptorSetLayoutHostMappingInfoVALVE; void * pNext = {}; size_t descriptorOffset = {}; uint32_t descriptorSize = {}; }; template <> struct CppType { using Type = DescriptorSetLayoutHostMappingInfoVALVE; }; struct DescriptorSetLayoutSupport { using NativeType = VkDescriptorSetLayoutSupport; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDescriptorSetLayoutSupport; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR DescriptorSetLayoutSupport( VULKAN_HPP_NAMESPACE::Bool32 supported_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , supported{ supported_ } { } VULKAN_HPP_CONSTEXPR DescriptorSetLayoutSupport( DescriptorSetLayoutSupport const & rhs ) VULKAN_HPP_NOEXCEPT = default; DescriptorSetLayoutSupport( VkDescriptorSetLayoutSupport const & rhs ) VULKAN_HPP_NOEXCEPT : DescriptorSetLayoutSupport( *reinterpret_cast( &rhs ) ) { } DescriptorSetLayoutSupport & operator=( DescriptorSetLayoutSupport const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DescriptorSetLayoutSupport & operator=( VkDescriptorSetLayoutSupport const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkDescriptorSetLayoutSupport const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDescriptorSetLayoutSupport &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, supported ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( DescriptorSetLayoutSupport const & ) const = default; #else bool operator==( DescriptorSetLayoutSupport const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( supported == rhs.supported ); # endif } bool operator!=( DescriptorSetLayoutSupport const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDescriptorSetLayoutSupport; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 supported = {}; }; template <> struct CppType { using Type = DescriptorSetLayoutSupport; }; using DescriptorSetLayoutSupportKHR = DescriptorSetLayoutSupport; struct DescriptorSetVariableDescriptorCountAllocateInfo { using NativeType = VkDescriptorSetVariableDescriptorCountAllocateInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDescriptorSetVariableDescriptorCountAllocateInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR DescriptorSetVariableDescriptorCountAllocateInfo( uint32_t descriptorSetCount_ = {}, const uint32_t * pDescriptorCounts_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , descriptorSetCount{ descriptorSetCount_ } , pDescriptorCounts{ pDescriptorCounts_ } { } VULKAN_HPP_CONSTEXPR DescriptorSetVariableDescriptorCountAllocateInfo( DescriptorSetVariableDescriptorCountAllocateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; DescriptorSetVariableDescriptorCountAllocateInfo( VkDescriptorSetVariableDescriptorCountAllocateInfo const & rhs ) VULKAN_HPP_NOEXCEPT : DescriptorSetVariableDescriptorCountAllocateInfo( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) DescriptorSetVariableDescriptorCountAllocateInfo( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & descriptorCounts_, const void * pNext_ = nullptr ) : pNext( pNext_ ), descriptorSetCount( static_cast( descriptorCounts_.size() ) ), pDescriptorCounts( descriptorCounts_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ DescriptorSetVariableDescriptorCountAllocateInfo & operator=( DescriptorSetVariableDescriptorCountAllocateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DescriptorSetVariableDescriptorCountAllocateInfo & operator=( VkDescriptorSetVariableDescriptorCountAllocateInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 DescriptorSetVariableDescriptorCountAllocateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 DescriptorSetVariableDescriptorCountAllocateInfo & setDescriptorSetCount( uint32_t descriptorSetCount_ ) VULKAN_HPP_NOEXCEPT { descriptorSetCount = descriptorSetCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 DescriptorSetVariableDescriptorCountAllocateInfo & setPDescriptorCounts( const uint32_t * pDescriptorCounts_ ) VULKAN_HPP_NOEXCEPT { pDescriptorCounts = pDescriptorCounts_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) DescriptorSetVariableDescriptorCountAllocateInfo & setDescriptorCounts( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & descriptorCounts_ ) VULKAN_HPP_NOEXCEPT { descriptorSetCount = static_cast( descriptorCounts_.size() ); pDescriptorCounts = descriptorCounts_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkDescriptorSetVariableDescriptorCountAllocateInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDescriptorSetVariableDescriptorCountAllocateInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, descriptorSetCount, pDescriptorCounts ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( DescriptorSetVariableDescriptorCountAllocateInfo const & ) const = default; #else bool operator==( DescriptorSetVariableDescriptorCountAllocateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( descriptorSetCount == rhs.descriptorSetCount ) && ( pDescriptorCounts == rhs.pDescriptorCounts ); # endif } bool operator!=( DescriptorSetVariableDescriptorCountAllocateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDescriptorSetVariableDescriptorCountAllocateInfo; const void * pNext = {}; uint32_t descriptorSetCount = {}; const uint32_t * pDescriptorCounts = {}; }; template <> struct CppType { using Type = DescriptorSetVariableDescriptorCountAllocateInfo; }; using DescriptorSetVariableDescriptorCountAllocateInfoEXT = DescriptorSetVariableDescriptorCountAllocateInfo; struct DescriptorSetVariableDescriptorCountLayoutSupport { using NativeType = VkDescriptorSetVariableDescriptorCountLayoutSupport; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDescriptorSetVariableDescriptorCountLayoutSupport; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR DescriptorSetVariableDescriptorCountLayoutSupport( uint32_t maxVariableDescriptorCount_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , maxVariableDescriptorCount{ maxVariableDescriptorCount_ } { } VULKAN_HPP_CONSTEXPR DescriptorSetVariableDescriptorCountLayoutSupport( DescriptorSetVariableDescriptorCountLayoutSupport const & rhs ) VULKAN_HPP_NOEXCEPT = default; DescriptorSetVariableDescriptorCountLayoutSupport( VkDescriptorSetVariableDescriptorCountLayoutSupport const & rhs ) VULKAN_HPP_NOEXCEPT : DescriptorSetVariableDescriptorCountLayoutSupport( *reinterpret_cast( &rhs ) ) { } DescriptorSetVariableDescriptorCountLayoutSupport & operator=( DescriptorSetVariableDescriptorCountLayoutSupport const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DescriptorSetVariableDescriptorCountLayoutSupport & operator=( VkDescriptorSetVariableDescriptorCountLayoutSupport const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkDescriptorSetVariableDescriptorCountLayoutSupport const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDescriptorSetVariableDescriptorCountLayoutSupport &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, maxVariableDescriptorCount ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( DescriptorSetVariableDescriptorCountLayoutSupport const & ) const = default; #else bool operator==( DescriptorSetVariableDescriptorCountLayoutSupport const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( maxVariableDescriptorCount == rhs.maxVariableDescriptorCount ); # endif } bool operator!=( DescriptorSetVariableDescriptorCountLayoutSupport const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDescriptorSetVariableDescriptorCountLayoutSupport; void * pNext = {}; uint32_t maxVariableDescriptorCount = {}; }; template <> struct CppType { using Type = DescriptorSetVariableDescriptorCountLayoutSupport; }; using DescriptorSetVariableDescriptorCountLayoutSupportEXT = DescriptorSetVariableDescriptorCountLayoutSupport; struct DescriptorUpdateTemplateEntry { using NativeType = VkDescriptorUpdateTemplateEntry; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR DescriptorUpdateTemplateEntry( uint32_t dstBinding_ = {}, uint32_t dstArrayElement_ = {}, uint32_t descriptorCount_ = {}, VULKAN_HPP_NAMESPACE::DescriptorType descriptorType_ = VULKAN_HPP_NAMESPACE::DescriptorType::eSampler, size_t offset_ = {}, size_t stride_ = {} ) VULKAN_HPP_NOEXCEPT : dstBinding{ dstBinding_ } , dstArrayElement{ dstArrayElement_ } , descriptorCount{ descriptorCount_ } , descriptorType{ descriptorType_ } , offset{ offset_ } , stride{ stride_ } { } VULKAN_HPP_CONSTEXPR DescriptorUpdateTemplateEntry( DescriptorUpdateTemplateEntry const & rhs ) VULKAN_HPP_NOEXCEPT = default; DescriptorUpdateTemplateEntry( VkDescriptorUpdateTemplateEntry const & rhs ) VULKAN_HPP_NOEXCEPT : DescriptorUpdateTemplateEntry( *reinterpret_cast( &rhs ) ) { } DescriptorUpdateTemplateEntry & operator=( DescriptorUpdateTemplateEntry const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DescriptorUpdateTemplateEntry & operator=( VkDescriptorUpdateTemplateEntry const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 DescriptorUpdateTemplateEntry & setDstBinding( uint32_t dstBinding_ ) VULKAN_HPP_NOEXCEPT { dstBinding = dstBinding_; return *this; } VULKAN_HPP_CONSTEXPR_14 DescriptorUpdateTemplateEntry & setDstArrayElement( uint32_t dstArrayElement_ ) VULKAN_HPP_NOEXCEPT { dstArrayElement = dstArrayElement_; return *this; } VULKAN_HPP_CONSTEXPR_14 DescriptorUpdateTemplateEntry & setDescriptorCount( uint32_t descriptorCount_ ) VULKAN_HPP_NOEXCEPT { descriptorCount = descriptorCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 DescriptorUpdateTemplateEntry & setDescriptorType( VULKAN_HPP_NAMESPACE::DescriptorType descriptorType_ ) VULKAN_HPP_NOEXCEPT { descriptorType = descriptorType_; return *this; } VULKAN_HPP_CONSTEXPR_14 DescriptorUpdateTemplateEntry & setOffset( size_t offset_ ) VULKAN_HPP_NOEXCEPT { offset = offset_; return *this; } VULKAN_HPP_CONSTEXPR_14 DescriptorUpdateTemplateEntry & setStride( size_t stride_ ) VULKAN_HPP_NOEXCEPT { stride = stride_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkDescriptorUpdateTemplateEntry const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDescriptorUpdateTemplateEntry &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( dstBinding, dstArrayElement, descriptorCount, descriptorType, offset, stride ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( DescriptorUpdateTemplateEntry const & ) const = default; #else bool operator==( DescriptorUpdateTemplateEntry const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( dstBinding == rhs.dstBinding ) && ( dstArrayElement == rhs.dstArrayElement ) && ( descriptorCount == rhs.descriptorCount ) && ( descriptorType == rhs.descriptorType ) && ( offset == rhs.offset ) && ( stride == rhs.stride ); # endif } bool operator!=( DescriptorUpdateTemplateEntry const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: uint32_t dstBinding = {}; uint32_t dstArrayElement = {}; uint32_t descriptorCount = {}; VULKAN_HPP_NAMESPACE::DescriptorType descriptorType = VULKAN_HPP_NAMESPACE::DescriptorType::eSampler; size_t offset = {}; size_t stride = {}; }; using DescriptorUpdateTemplateEntryKHR = DescriptorUpdateTemplateEntry; struct DescriptorUpdateTemplateCreateInfo { using NativeType = VkDescriptorUpdateTemplateCreateInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDescriptorUpdateTemplateCreateInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR DescriptorUpdateTemplateCreateInfo( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateCreateFlags flags_ = {}, uint32_t descriptorUpdateEntryCount_ = {}, const VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateEntry * pDescriptorUpdateEntries_ = {}, VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateType templateType_ = VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateType::eDescriptorSet, VULKAN_HPP_NAMESPACE::DescriptorSetLayout descriptorSetLayout_ = {}, VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint_ = VULKAN_HPP_NAMESPACE::PipelineBindPoint::eGraphics, VULKAN_HPP_NAMESPACE::PipelineLayout pipelineLayout_ = {}, uint32_t set_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , descriptorUpdateEntryCount{ descriptorUpdateEntryCount_ } , pDescriptorUpdateEntries{ pDescriptorUpdateEntries_ } , templateType{ templateType_ } , descriptorSetLayout{ descriptorSetLayout_ } , pipelineBindPoint{ pipelineBindPoint_ } , pipelineLayout{ pipelineLayout_ } , set{ set_ } { } VULKAN_HPP_CONSTEXPR DescriptorUpdateTemplateCreateInfo( DescriptorUpdateTemplateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; DescriptorUpdateTemplateCreateInfo( VkDescriptorUpdateTemplateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT : DescriptorUpdateTemplateCreateInfo( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) DescriptorUpdateTemplateCreateInfo( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateCreateFlags flags_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & descriptorUpdateEntries_, VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateType templateType_ = VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateType::eDescriptorSet, VULKAN_HPP_NAMESPACE::DescriptorSetLayout descriptorSetLayout_ = {}, VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint_ = VULKAN_HPP_NAMESPACE::PipelineBindPoint::eGraphics, VULKAN_HPP_NAMESPACE::PipelineLayout pipelineLayout_ = {}, uint32_t set_ = {}, const void * pNext_ = nullptr ) : pNext( pNext_ ) , flags( flags_ ) , descriptorUpdateEntryCount( static_cast( descriptorUpdateEntries_.size() ) ) , pDescriptorUpdateEntries( descriptorUpdateEntries_.data() ) , templateType( templateType_ ) , descriptorSetLayout( descriptorSetLayout_ ) , pipelineBindPoint( pipelineBindPoint_ ) , pipelineLayout( pipelineLayout_ ) , set( set_ ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ DescriptorUpdateTemplateCreateInfo & operator=( DescriptorUpdateTemplateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DescriptorUpdateTemplateCreateInfo & operator=( VkDescriptorUpdateTemplateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 DescriptorUpdateTemplateCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 DescriptorUpdateTemplateCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 DescriptorUpdateTemplateCreateInfo & setDescriptorUpdateEntryCount( uint32_t descriptorUpdateEntryCount_ ) VULKAN_HPP_NOEXCEPT { descriptorUpdateEntryCount = descriptorUpdateEntryCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 DescriptorUpdateTemplateCreateInfo & setPDescriptorUpdateEntries( const VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateEntry * pDescriptorUpdateEntries_ ) VULKAN_HPP_NOEXCEPT { pDescriptorUpdateEntries = pDescriptorUpdateEntries_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) DescriptorUpdateTemplateCreateInfo & setDescriptorUpdateEntries( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & descriptorUpdateEntries_ ) VULKAN_HPP_NOEXCEPT { descriptorUpdateEntryCount = static_cast( descriptorUpdateEntries_.size() ); pDescriptorUpdateEntries = descriptorUpdateEntries_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 DescriptorUpdateTemplateCreateInfo & setTemplateType( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateType templateType_ ) VULKAN_HPP_NOEXCEPT { templateType = templateType_; return *this; } VULKAN_HPP_CONSTEXPR_14 DescriptorUpdateTemplateCreateInfo & setDescriptorSetLayout( VULKAN_HPP_NAMESPACE::DescriptorSetLayout descriptorSetLayout_ ) VULKAN_HPP_NOEXCEPT { descriptorSetLayout = descriptorSetLayout_; return *this; } VULKAN_HPP_CONSTEXPR_14 DescriptorUpdateTemplateCreateInfo & setPipelineBindPoint( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint_ ) VULKAN_HPP_NOEXCEPT { pipelineBindPoint = pipelineBindPoint_; return *this; } VULKAN_HPP_CONSTEXPR_14 DescriptorUpdateTemplateCreateInfo & setPipelineLayout( VULKAN_HPP_NAMESPACE::PipelineLayout pipelineLayout_ ) VULKAN_HPP_NOEXCEPT { pipelineLayout = pipelineLayout_; return *this; } VULKAN_HPP_CONSTEXPR_14 DescriptorUpdateTemplateCreateInfo & setSet( uint32_t set_ ) VULKAN_HPP_NOEXCEPT { set = set_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkDescriptorUpdateTemplateCreateInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDescriptorUpdateTemplateCreateInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, descriptorUpdateEntryCount, pDescriptorUpdateEntries, templateType, descriptorSetLayout, pipelineBindPoint, pipelineLayout, set ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( DescriptorUpdateTemplateCreateInfo const & ) const = default; #else bool operator==( DescriptorUpdateTemplateCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( descriptorUpdateEntryCount == rhs.descriptorUpdateEntryCount ) && ( pDescriptorUpdateEntries == rhs.pDescriptorUpdateEntries ) && ( templateType == rhs.templateType ) && ( descriptorSetLayout == rhs.descriptorSetLayout ) && ( pipelineBindPoint == rhs.pipelineBindPoint ) && ( pipelineLayout == rhs.pipelineLayout ) && ( set == rhs.set ); # endif } bool operator!=( DescriptorUpdateTemplateCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDescriptorUpdateTemplateCreateInfo; const void * pNext = {}; VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateCreateFlags flags = {}; uint32_t descriptorUpdateEntryCount = {}; const VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateEntry * pDescriptorUpdateEntries = {}; VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateType templateType = VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplateType::eDescriptorSet; VULKAN_HPP_NAMESPACE::DescriptorSetLayout descriptorSetLayout = {}; VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint = VULKAN_HPP_NAMESPACE::PipelineBindPoint::eGraphics; VULKAN_HPP_NAMESPACE::PipelineLayout pipelineLayout = {}; uint32_t set = {}; }; template <> struct CppType { using Type = DescriptorUpdateTemplateCreateInfo; }; using DescriptorUpdateTemplateCreateInfoKHR = DescriptorUpdateTemplateCreateInfo; struct DeviceAddressBindingCallbackDataEXT { using NativeType = VkDeviceAddressBindingCallbackDataEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDeviceAddressBindingCallbackDataEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR DeviceAddressBindingCallbackDataEXT( VULKAN_HPP_NAMESPACE::DeviceAddressBindingFlagsEXT flags_ = {}, VULKAN_HPP_NAMESPACE::DeviceAddress baseAddress_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize size_ = {}, VULKAN_HPP_NAMESPACE::DeviceAddressBindingTypeEXT bindingType_ = VULKAN_HPP_NAMESPACE::DeviceAddressBindingTypeEXT::eBind, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , baseAddress{ baseAddress_ } , size{ size_ } , bindingType{ bindingType_ } { } VULKAN_HPP_CONSTEXPR DeviceAddressBindingCallbackDataEXT( DeviceAddressBindingCallbackDataEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; DeviceAddressBindingCallbackDataEXT( VkDeviceAddressBindingCallbackDataEXT const & rhs ) VULKAN_HPP_NOEXCEPT : DeviceAddressBindingCallbackDataEXT( *reinterpret_cast( &rhs ) ) { } DeviceAddressBindingCallbackDataEXT & operator=( DeviceAddressBindingCallbackDataEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DeviceAddressBindingCallbackDataEXT & operator=( VkDeviceAddressBindingCallbackDataEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 DeviceAddressBindingCallbackDataEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 DeviceAddressBindingCallbackDataEXT & setFlags( VULKAN_HPP_NAMESPACE::DeviceAddressBindingFlagsEXT flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 DeviceAddressBindingCallbackDataEXT & setBaseAddress( VULKAN_HPP_NAMESPACE::DeviceAddress baseAddress_ ) VULKAN_HPP_NOEXCEPT { baseAddress = baseAddress_; return *this; } VULKAN_HPP_CONSTEXPR_14 DeviceAddressBindingCallbackDataEXT & setSize( VULKAN_HPP_NAMESPACE::DeviceSize size_ ) VULKAN_HPP_NOEXCEPT { size = size_; return *this; } VULKAN_HPP_CONSTEXPR_14 DeviceAddressBindingCallbackDataEXT & setBindingType( VULKAN_HPP_NAMESPACE::DeviceAddressBindingTypeEXT bindingType_ ) VULKAN_HPP_NOEXCEPT { bindingType = bindingType_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkDeviceAddressBindingCallbackDataEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDeviceAddressBindingCallbackDataEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, baseAddress, size, bindingType ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( DeviceAddressBindingCallbackDataEXT const & ) const = default; #else bool operator==( DeviceAddressBindingCallbackDataEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( baseAddress == rhs.baseAddress ) && ( size == rhs.size ) && ( bindingType == rhs.bindingType ); # endif } bool operator!=( DeviceAddressBindingCallbackDataEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDeviceAddressBindingCallbackDataEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::DeviceAddressBindingFlagsEXT flags = {}; VULKAN_HPP_NAMESPACE::DeviceAddress baseAddress = {}; VULKAN_HPP_NAMESPACE::DeviceSize size = {}; VULKAN_HPP_NAMESPACE::DeviceAddressBindingTypeEXT bindingType = VULKAN_HPP_NAMESPACE::DeviceAddressBindingTypeEXT::eBind; }; template <> struct CppType { using Type = DeviceAddressBindingCallbackDataEXT; }; struct DeviceBufferMemoryRequirements { using NativeType = VkDeviceBufferMemoryRequirements; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDeviceBufferMemoryRequirements; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR DeviceBufferMemoryRequirements( const VULKAN_HPP_NAMESPACE::BufferCreateInfo * pCreateInfo_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , pCreateInfo{ pCreateInfo_ } { } VULKAN_HPP_CONSTEXPR DeviceBufferMemoryRequirements( DeviceBufferMemoryRequirements const & rhs ) VULKAN_HPP_NOEXCEPT = default; DeviceBufferMemoryRequirements( VkDeviceBufferMemoryRequirements const & rhs ) VULKAN_HPP_NOEXCEPT : DeviceBufferMemoryRequirements( *reinterpret_cast( &rhs ) ) { } DeviceBufferMemoryRequirements & operator=( DeviceBufferMemoryRequirements const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DeviceBufferMemoryRequirements & operator=( VkDeviceBufferMemoryRequirements const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 DeviceBufferMemoryRequirements & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 DeviceBufferMemoryRequirements & setPCreateInfo( const VULKAN_HPP_NAMESPACE::BufferCreateInfo * pCreateInfo_ ) VULKAN_HPP_NOEXCEPT { pCreateInfo = pCreateInfo_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkDeviceBufferMemoryRequirements const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDeviceBufferMemoryRequirements &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, pCreateInfo ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( DeviceBufferMemoryRequirements const & ) const = default; #else bool operator==( DeviceBufferMemoryRequirements const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( pCreateInfo == rhs.pCreateInfo ); # endif } bool operator!=( DeviceBufferMemoryRequirements const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDeviceBufferMemoryRequirements; const void * pNext = {}; const VULKAN_HPP_NAMESPACE::BufferCreateInfo * pCreateInfo = {}; }; template <> struct CppType { using Type = DeviceBufferMemoryRequirements; }; using DeviceBufferMemoryRequirementsKHR = DeviceBufferMemoryRequirements; struct DeviceQueueCreateInfo { using NativeType = VkDeviceQueueCreateInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDeviceQueueCreateInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR DeviceQueueCreateInfo( VULKAN_HPP_NAMESPACE::DeviceQueueCreateFlags flags_ = {}, uint32_t queueFamilyIndex_ = {}, uint32_t queueCount_ = {}, const float * pQueuePriorities_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , queueFamilyIndex{ queueFamilyIndex_ } , queueCount{ queueCount_ } , pQueuePriorities{ pQueuePriorities_ } { } VULKAN_HPP_CONSTEXPR DeviceQueueCreateInfo( DeviceQueueCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; DeviceQueueCreateInfo( VkDeviceQueueCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT : DeviceQueueCreateInfo( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) DeviceQueueCreateInfo( VULKAN_HPP_NAMESPACE::DeviceQueueCreateFlags flags_, uint32_t queueFamilyIndex_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & queuePriorities_, const void * pNext_ = nullptr ) : pNext( pNext_ ) , flags( flags_ ) , queueFamilyIndex( queueFamilyIndex_ ) , queueCount( static_cast( queuePriorities_.size() ) ) , pQueuePriorities( queuePriorities_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ DeviceQueueCreateInfo & operator=( DeviceQueueCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DeviceQueueCreateInfo & operator=( VkDeviceQueueCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 DeviceQueueCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 DeviceQueueCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::DeviceQueueCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 DeviceQueueCreateInfo & setQueueFamilyIndex( uint32_t queueFamilyIndex_ ) VULKAN_HPP_NOEXCEPT { queueFamilyIndex = queueFamilyIndex_; return *this; } VULKAN_HPP_CONSTEXPR_14 DeviceQueueCreateInfo & setQueueCount( uint32_t queueCount_ ) VULKAN_HPP_NOEXCEPT { queueCount = queueCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 DeviceQueueCreateInfo & setPQueuePriorities( const float * pQueuePriorities_ ) VULKAN_HPP_NOEXCEPT { pQueuePriorities = pQueuePriorities_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) DeviceQueueCreateInfo & setQueuePriorities( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & queuePriorities_ ) VULKAN_HPP_NOEXCEPT { queueCount = static_cast( queuePriorities_.size() ); pQueuePriorities = queuePriorities_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkDeviceQueueCreateInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDeviceQueueCreateInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, queueFamilyIndex, queueCount, pQueuePriorities ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( DeviceQueueCreateInfo const & ) const = default; #else bool operator==( DeviceQueueCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( queueFamilyIndex == rhs.queueFamilyIndex ) && ( queueCount == rhs.queueCount ) && ( pQueuePriorities == rhs.pQueuePriorities ); # endif } bool operator!=( DeviceQueueCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDeviceQueueCreateInfo; const void * pNext = {}; VULKAN_HPP_NAMESPACE::DeviceQueueCreateFlags flags = {}; uint32_t queueFamilyIndex = {}; uint32_t queueCount = {}; const float * pQueuePriorities = {}; }; template <> struct CppType { using Type = DeviceQueueCreateInfo; }; struct PhysicalDeviceFeatures { using NativeType = VkPhysicalDeviceFeatures; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceFeatures( VULKAN_HPP_NAMESPACE::Bool32 robustBufferAccess_ = {}, VULKAN_HPP_NAMESPACE::Bool32 fullDrawIndexUint32_ = {}, VULKAN_HPP_NAMESPACE::Bool32 imageCubeArray_ = {}, VULKAN_HPP_NAMESPACE::Bool32 independentBlend_ = {}, VULKAN_HPP_NAMESPACE::Bool32 geometryShader_ = {}, VULKAN_HPP_NAMESPACE::Bool32 tessellationShader_ = {}, VULKAN_HPP_NAMESPACE::Bool32 sampleRateShading_ = {}, VULKAN_HPP_NAMESPACE::Bool32 dualSrcBlend_ = {}, VULKAN_HPP_NAMESPACE::Bool32 logicOp_ = {}, VULKAN_HPP_NAMESPACE::Bool32 multiDrawIndirect_ = {}, VULKAN_HPP_NAMESPACE::Bool32 drawIndirectFirstInstance_ = {}, VULKAN_HPP_NAMESPACE::Bool32 depthClamp_ = {}, VULKAN_HPP_NAMESPACE::Bool32 depthBiasClamp_ = {}, VULKAN_HPP_NAMESPACE::Bool32 fillModeNonSolid_ = {}, VULKAN_HPP_NAMESPACE::Bool32 depthBounds_ = {}, VULKAN_HPP_NAMESPACE::Bool32 wideLines_ = {}, VULKAN_HPP_NAMESPACE::Bool32 largePoints_ = {}, VULKAN_HPP_NAMESPACE::Bool32 alphaToOne_ = {}, VULKAN_HPP_NAMESPACE::Bool32 multiViewport_ = {}, VULKAN_HPP_NAMESPACE::Bool32 samplerAnisotropy_ = {}, VULKAN_HPP_NAMESPACE::Bool32 textureCompressionETC2_ = {}, VULKAN_HPP_NAMESPACE::Bool32 textureCompressionASTC_LDR_ = {}, VULKAN_HPP_NAMESPACE::Bool32 textureCompressionBC_ = {}, VULKAN_HPP_NAMESPACE::Bool32 occlusionQueryPrecise_ = {}, VULKAN_HPP_NAMESPACE::Bool32 pipelineStatisticsQuery_ = {}, VULKAN_HPP_NAMESPACE::Bool32 vertexPipelineStoresAndAtomics_ = {}, VULKAN_HPP_NAMESPACE::Bool32 fragmentStoresAndAtomics_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderTessellationAndGeometryPointSize_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderImageGatherExtended_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderStorageImageExtendedFormats_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderStorageImageMultisample_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderStorageImageReadWithoutFormat_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderStorageImageWriteWithoutFormat_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderUniformBufferArrayDynamicIndexing_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderSampledImageArrayDynamicIndexing_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderStorageBufferArrayDynamicIndexing_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderStorageImageArrayDynamicIndexing_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderClipDistance_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderCullDistance_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderFloat64_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderInt64_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderInt16_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderResourceResidency_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderResourceMinLod_ = {}, VULKAN_HPP_NAMESPACE::Bool32 sparseBinding_ = {}, VULKAN_HPP_NAMESPACE::Bool32 sparseResidencyBuffer_ = {}, VULKAN_HPP_NAMESPACE::Bool32 sparseResidencyImage2D_ = {}, VULKAN_HPP_NAMESPACE::Bool32 sparseResidencyImage3D_ = {}, VULKAN_HPP_NAMESPACE::Bool32 sparseResidency2Samples_ = {}, VULKAN_HPP_NAMESPACE::Bool32 sparseResidency4Samples_ = {}, VULKAN_HPP_NAMESPACE::Bool32 sparseResidency8Samples_ = {}, VULKAN_HPP_NAMESPACE::Bool32 sparseResidency16Samples_ = {}, VULKAN_HPP_NAMESPACE::Bool32 sparseResidencyAliased_ = {}, VULKAN_HPP_NAMESPACE::Bool32 variableMultisampleRate_ = {}, VULKAN_HPP_NAMESPACE::Bool32 inheritedQueries_ = {} ) VULKAN_HPP_NOEXCEPT : robustBufferAccess{ robustBufferAccess_ } , fullDrawIndexUint32{ fullDrawIndexUint32_ } , imageCubeArray{ imageCubeArray_ } , independentBlend{ independentBlend_ } , geometryShader{ geometryShader_ } , tessellationShader{ tessellationShader_ } , sampleRateShading{ sampleRateShading_ } , dualSrcBlend{ dualSrcBlend_ } , logicOp{ logicOp_ } , multiDrawIndirect{ multiDrawIndirect_ } , drawIndirectFirstInstance{ drawIndirectFirstInstance_ } , depthClamp{ depthClamp_ } , depthBiasClamp{ depthBiasClamp_ } , fillModeNonSolid{ fillModeNonSolid_ } , depthBounds{ depthBounds_ } , wideLines{ wideLines_ } , largePoints{ largePoints_ } , alphaToOne{ alphaToOne_ } , multiViewport{ multiViewport_ } , samplerAnisotropy{ samplerAnisotropy_ } , textureCompressionETC2{ textureCompressionETC2_ } , textureCompressionASTC_LDR{ textureCompressionASTC_LDR_ } , textureCompressionBC{ textureCompressionBC_ } , occlusionQueryPrecise{ occlusionQueryPrecise_ } , pipelineStatisticsQuery{ pipelineStatisticsQuery_ } , vertexPipelineStoresAndAtomics{ vertexPipelineStoresAndAtomics_ } , fragmentStoresAndAtomics{ fragmentStoresAndAtomics_ } , shaderTessellationAndGeometryPointSize{ shaderTessellationAndGeometryPointSize_ } , shaderImageGatherExtended{ shaderImageGatherExtended_ } , shaderStorageImageExtendedFormats{ shaderStorageImageExtendedFormats_ } , shaderStorageImageMultisample{ shaderStorageImageMultisample_ } , shaderStorageImageReadWithoutFormat{ shaderStorageImageReadWithoutFormat_ } , shaderStorageImageWriteWithoutFormat{ shaderStorageImageWriteWithoutFormat_ } , shaderUniformBufferArrayDynamicIndexing{ shaderUniformBufferArrayDynamicIndexing_ } , shaderSampledImageArrayDynamicIndexing{ shaderSampledImageArrayDynamicIndexing_ } , shaderStorageBufferArrayDynamicIndexing{ shaderStorageBufferArrayDynamicIndexing_ } , shaderStorageImageArrayDynamicIndexing{ shaderStorageImageArrayDynamicIndexing_ } , shaderClipDistance{ shaderClipDistance_ } , shaderCullDistance{ shaderCullDistance_ } , shaderFloat64{ shaderFloat64_ } , shaderInt64{ shaderInt64_ } , shaderInt16{ shaderInt16_ } , shaderResourceResidency{ shaderResourceResidency_ } , shaderResourceMinLod{ shaderResourceMinLod_ } , sparseBinding{ sparseBinding_ } , sparseResidencyBuffer{ sparseResidencyBuffer_ } , sparseResidencyImage2D{ sparseResidencyImage2D_ } , sparseResidencyImage3D{ sparseResidencyImage3D_ } , sparseResidency2Samples{ sparseResidency2Samples_ } , sparseResidency4Samples{ sparseResidency4Samples_ } , sparseResidency8Samples{ sparseResidency8Samples_ } , sparseResidency16Samples{ sparseResidency16Samples_ } , sparseResidencyAliased{ sparseResidencyAliased_ } , variableMultisampleRate{ variableMultisampleRate_ } , inheritedQueries{ inheritedQueries_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceFeatures( PhysicalDeviceFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceFeatures( VkPhysicalDeviceFeatures const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceFeatures( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceFeatures & operator=( PhysicalDeviceFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceFeatures & operator=( VkPhysicalDeviceFeatures const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setRobustBufferAccess( VULKAN_HPP_NAMESPACE::Bool32 robustBufferAccess_ ) VULKAN_HPP_NOEXCEPT { robustBufferAccess = robustBufferAccess_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setFullDrawIndexUint32( VULKAN_HPP_NAMESPACE::Bool32 fullDrawIndexUint32_ ) VULKAN_HPP_NOEXCEPT { fullDrawIndexUint32 = fullDrawIndexUint32_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setImageCubeArray( VULKAN_HPP_NAMESPACE::Bool32 imageCubeArray_ ) VULKAN_HPP_NOEXCEPT { imageCubeArray = imageCubeArray_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setIndependentBlend( VULKAN_HPP_NAMESPACE::Bool32 independentBlend_ ) VULKAN_HPP_NOEXCEPT { independentBlend = independentBlend_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setGeometryShader( VULKAN_HPP_NAMESPACE::Bool32 geometryShader_ ) VULKAN_HPP_NOEXCEPT { geometryShader = geometryShader_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setTessellationShader( VULKAN_HPP_NAMESPACE::Bool32 tessellationShader_ ) VULKAN_HPP_NOEXCEPT { tessellationShader = tessellationShader_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setSampleRateShading( VULKAN_HPP_NAMESPACE::Bool32 sampleRateShading_ ) VULKAN_HPP_NOEXCEPT { sampleRateShading = sampleRateShading_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setDualSrcBlend( VULKAN_HPP_NAMESPACE::Bool32 dualSrcBlend_ ) VULKAN_HPP_NOEXCEPT { dualSrcBlend = dualSrcBlend_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setLogicOp( VULKAN_HPP_NAMESPACE::Bool32 logicOp_ ) VULKAN_HPP_NOEXCEPT { logicOp = logicOp_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setMultiDrawIndirect( VULKAN_HPP_NAMESPACE::Bool32 multiDrawIndirect_ ) VULKAN_HPP_NOEXCEPT { multiDrawIndirect = multiDrawIndirect_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setDrawIndirectFirstInstance( VULKAN_HPP_NAMESPACE::Bool32 drawIndirectFirstInstance_ ) VULKAN_HPP_NOEXCEPT { drawIndirectFirstInstance = drawIndirectFirstInstance_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setDepthClamp( VULKAN_HPP_NAMESPACE::Bool32 depthClamp_ ) VULKAN_HPP_NOEXCEPT { depthClamp = depthClamp_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setDepthBiasClamp( VULKAN_HPP_NAMESPACE::Bool32 depthBiasClamp_ ) VULKAN_HPP_NOEXCEPT { depthBiasClamp = depthBiasClamp_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setFillModeNonSolid( VULKAN_HPP_NAMESPACE::Bool32 fillModeNonSolid_ ) VULKAN_HPP_NOEXCEPT { fillModeNonSolid = fillModeNonSolid_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setDepthBounds( VULKAN_HPP_NAMESPACE::Bool32 depthBounds_ ) VULKAN_HPP_NOEXCEPT { depthBounds = depthBounds_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setWideLines( VULKAN_HPP_NAMESPACE::Bool32 wideLines_ ) VULKAN_HPP_NOEXCEPT { wideLines = wideLines_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setLargePoints( VULKAN_HPP_NAMESPACE::Bool32 largePoints_ ) VULKAN_HPP_NOEXCEPT { largePoints = largePoints_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setAlphaToOne( VULKAN_HPP_NAMESPACE::Bool32 alphaToOne_ ) VULKAN_HPP_NOEXCEPT { alphaToOne = alphaToOne_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setMultiViewport( VULKAN_HPP_NAMESPACE::Bool32 multiViewport_ ) VULKAN_HPP_NOEXCEPT { multiViewport = multiViewport_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setSamplerAnisotropy( VULKAN_HPP_NAMESPACE::Bool32 samplerAnisotropy_ ) VULKAN_HPP_NOEXCEPT { samplerAnisotropy = samplerAnisotropy_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setTextureCompressionETC2( VULKAN_HPP_NAMESPACE::Bool32 textureCompressionETC2_ ) VULKAN_HPP_NOEXCEPT { textureCompressionETC2 = textureCompressionETC2_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setTextureCompressionASTC_LDR( VULKAN_HPP_NAMESPACE::Bool32 textureCompressionASTC_LDR_ ) VULKAN_HPP_NOEXCEPT { textureCompressionASTC_LDR = textureCompressionASTC_LDR_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setTextureCompressionBC( VULKAN_HPP_NAMESPACE::Bool32 textureCompressionBC_ ) VULKAN_HPP_NOEXCEPT { textureCompressionBC = textureCompressionBC_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setOcclusionQueryPrecise( VULKAN_HPP_NAMESPACE::Bool32 occlusionQueryPrecise_ ) VULKAN_HPP_NOEXCEPT { occlusionQueryPrecise = occlusionQueryPrecise_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setPipelineStatisticsQuery( VULKAN_HPP_NAMESPACE::Bool32 pipelineStatisticsQuery_ ) VULKAN_HPP_NOEXCEPT { pipelineStatisticsQuery = pipelineStatisticsQuery_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setVertexPipelineStoresAndAtomics( VULKAN_HPP_NAMESPACE::Bool32 vertexPipelineStoresAndAtomics_ ) VULKAN_HPP_NOEXCEPT { vertexPipelineStoresAndAtomics = vertexPipelineStoresAndAtomics_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setFragmentStoresAndAtomics( VULKAN_HPP_NAMESPACE::Bool32 fragmentStoresAndAtomics_ ) VULKAN_HPP_NOEXCEPT { fragmentStoresAndAtomics = fragmentStoresAndAtomics_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setShaderTessellationAndGeometryPointSize( VULKAN_HPP_NAMESPACE::Bool32 shaderTessellationAndGeometryPointSize_ ) VULKAN_HPP_NOEXCEPT { shaderTessellationAndGeometryPointSize = shaderTessellationAndGeometryPointSize_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setShaderImageGatherExtended( VULKAN_HPP_NAMESPACE::Bool32 shaderImageGatherExtended_ ) VULKAN_HPP_NOEXCEPT { shaderImageGatherExtended = shaderImageGatherExtended_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setShaderStorageImageExtendedFormats( VULKAN_HPP_NAMESPACE::Bool32 shaderStorageImageExtendedFormats_ ) VULKAN_HPP_NOEXCEPT { shaderStorageImageExtendedFormats = shaderStorageImageExtendedFormats_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setShaderStorageImageMultisample( VULKAN_HPP_NAMESPACE::Bool32 shaderStorageImageMultisample_ ) VULKAN_HPP_NOEXCEPT { shaderStorageImageMultisample = shaderStorageImageMultisample_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setShaderStorageImageReadWithoutFormat( VULKAN_HPP_NAMESPACE::Bool32 shaderStorageImageReadWithoutFormat_ ) VULKAN_HPP_NOEXCEPT { shaderStorageImageReadWithoutFormat = shaderStorageImageReadWithoutFormat_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setShaderStorageImageWriteWithoutFormat( VULKAN_HPP_NAMESPACE::Bool32 shaderStorageImageWriteWithoutFormat_ ) VULKAN_HPP_NOEXCEPT { shaderStorageImageWriteWithoutFormat = shaderStorageImageWriteWithoutFormat_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setShaderUniformBufferArrayDynamicIndexing( VULKAN_HPP_NAMESPACE::Bool32 shaderUniformBufferArrayDynamicIndexing_ ) VULKAN_HPP_NOEXCEPT { shaderUniformBufferArrayDynamicIndexing = shaderUniformBufferArrayDynamicIndexing_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setShaderSampledImageArrayDynamicIndexing( VULKAN_HPP_NAMESPACE::Bool32 shaderSampledImageArrayDynamicIndexing_ ) VULKAN_HPP_NOEXCEPT { shaderSampledImageArrayDynamicIndexing = shaderSampledImageArrayDynamicIndexing_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setShaderStorageBufferArrayDynamicIndexing( VULKAN_HPP_NAMESPACE::Bool32 shaderStorageBufferArrayDynamicIndexing_ ) VULKAN_HPP_NOEXCEPT { shaderStorageBufferArrayDynamicIndexing = shaderStorageBufferArrayDynamicIndexing_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setShaderStorageImageArrayDynamicIndexing( VULKAN_HPP_NAMESPACE::Bool32 shaderStorageImageArrayDynamicIndexing_ ) VULKAN_HPP_NOEXCEPT { shaderStorageImageArrayDynamicIndexing = shaderStorageImageArrayDynamicIndexing_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setShaderClipDistance( VULKAN_HPP_NAMESPACE::Bool32 shaderClipDistance_ ) VULKAN_HPP_NOEXCEPT { shaderClipDistance = shaderClipDistance_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setShaderCullDistance( VULKAN_HPP_NAMESPACE::Bool32 shaderCullDistance_ ) VULKAN_HPP_NOEXCEPT { shaderCullDistance = shaderCullDistance_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setShaderFloat64( VULKAN_HPP_NAMESPACE::Bool32 shaderFloat64_ ) VULKAN_HPP_NOEXCEPT { shaderFloat64 = shaderFloat64_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setShaderInt64( VULKAN_HPP_NAMESPACE::Bool32 shaderInt64_ ) VULKAN_HPP_NOEXCEPT { shaderInt64 = shaderInt64_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setShaderInt16( VULKAN_HPP_NAMESPACE::Bool32 shaderInt16_ ) VULKAN_HPP_NOEXCEPT { shaderInt16 = shaderInt16_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setShaderResourceResidency( VULKAN_HPP_NAMESPACE::Bool32 shaderResourceResidency_ ) VULKAN_HPP_NOEXCEPT { shaderResourceResidency = shaderResourceResidency_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setShaderResourceMinLod( VULKAN_HPP_NAMESPACE::Bool32 shaderResourceMinLod_ ) VULKAN_HPP_NOEXCEPT { shaderResourceMinLod = shaderResourceMinLod_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setSparseBinding( VULKAN_HPP_NAMESPACE::Bool32 sparseBinding_ ) VULKAN_HPP_NOEXCEPT { sparseBinding = sparseBinding_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setSparseResidencyBuffer( VULKAN_HPP_NAMESPACE::Bool32 sparseResidencyBuffer_ ) VULKAN_HPP_NOEXCEPT { sparseResidencyBuffer = sparseResidencyBuffer_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setSparseResidencyImage2D( VULKAN_HPP_NAMESPACE::Bool32 sparseResidencyImage2D_ ) VULKAN_HPP_NOEXCEPT { sparseResidencyImage2D = sparseResidencyImage2D_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setSparseResidencyImage3D( VULKAN_HPP_NAMESPACE::Bool32 sparseResidencyImage3D_ ) VULKAN_HPP_NOEXCEPT { sparseResidencyImage3D = sparseResidencyImage3D_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setSparseResidency2Samples( VULKAN_HPP_NAMESPACE::Bool32 sparseResidency2Samples_ ) VULKAN_HPP_NOEXCEPT { sparseResidency2Samples = sparseResidency2Samples_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setSparseResidency4Samples( VULKAN_HPP_NAMESPACE::Bool32 sparseResidency4Samples_ ) VULKAN_HPP_NOEXCEPT { sparseResidency4Samples = sparseResidency4Samples_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setSparseResidency8Samples( VULKAN_HPP_NAMESPACE::Bool32 sparseResidency8Samples_ ) VULKAN_HPP_NOEXCEPT { sparseResidency8Samples = sparseResidency8Samples_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setSparseResidency16Samples( VULKAN_HPP_NAMESPACE::Bool32 sparseResidency16Samples_ ) VULKAN_HPP_NOEXCEPT { sparseResidency16Samples = sparseResidency16Samples_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setSparseResidencyAliased( VULKAN_HPP_NAMESPACE::Bool32 sparseResidencyAliased_ ) VULKAN_HPP_NOEXCEPT { sparseResidencyAliased = sparseResidencyAliased_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setVariableMultisampleRate( VULKAN_HPP_NAMESPACE::Bool32 variableMultisampleRate_ ) VULKAN_HPP_NOEXCEPT { variableMultisampleRate = variableMultisampleRate_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures & setInheritedQueries( VULKAN_HPP_NAMESPACE::Bool32 inheritedQueries_ ) VULKAN_HPP_NOEXCEPT { inheritedQueries = inheritedQueries_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceFeatures const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceFeatures &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( robustBufferAccess, fullDrawIndexUint32, imageCubeArray, independentBlend, geometryShader, tessellationShader, sampleRateShading, dualSrcBlend, logicOp, multiDrawIndirect, drawIndirectFirstInstance, depthClamp, depthBiasClamp, fillModeNonSolid, depthBounds, wideLines, largePoints, alphaToOne, multiViewport, samplerAnisotropy, textureCompressionETC2, textureCompressionASTC_LDR, textureCompressionBC, occlusionQueryPrecise, pipelineStatisticsQuery, vertexPipelineStoresAndAtomics, fragmentStoresAndAtomics, shaderTessellationAndGeometryPointSize, shaderImageGatherExtended, shaderStorageImageExtendedFormats, shaderStorageImageMultisample, shaderStorageImageReadWithoutFormat, shaderStorageImageWriteWithoutFormat, shaderUniformBufferArrayDynamicIndexing, shaderSampledImageArrayDynamicIndexing, shaderStorageBufferArrayDynamicIndexing, shaderStorageImageArrayDynamicIndexing, shaderClipDistance, shaderCullDistance, shaderFloat64, shaderInt64, shaderInt16, shaderResourceResidency, shaderResourceMinLod, sparseBinding, sparseResidencyBuffer, sparseResidencyImage2D, sparseResidencyImage3D, sparseResidency2Samples, sparseResidency4Samples, sparseResidency8Samples, sparseResidency16Samples, sparseResidencyAliased, variableMultisampleRate, inheritedQueries ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceFeatures const & ) const = default; #else bool operator==( PhysicalDeviceFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( robustBufferAccess == rhs.robustBufferAccess ) && ( fullDrawIndexUint32 == rhs.fullDrawIndexUint32 ) && ( imageCubeArray == rhs.imageCubeArray ) && ( independentBlend == rhs.independentBlend ) && ( geometryShader == rhs.geometryShader ) && ( tessellationShader == rhs.tessellationShader ) && ( sampleRateShading == rhs.sampleRateShading ) && ( dualSrcBlend == rhs.dualSrcBlend ) && ( logicOp == rhs.logicOp ) && ( multiDrawIndirect == rhs.multiDrawIndirect ) && ( drawIndirectFirstInstance == rhs.drawIndirectFirstInstance ) && ( depthClamp == rhs.depthClamp ) && ( depthBiasClamp == rhs.depthBiasClamp ) && ( fillModeNonSolid == rhs.fillModeNonSolid ) && ( depthBounds == rhs.depthBounds ) && ( wideLines == rhs.wideLines ) && ( largePoints == rhs.largePoints ) && ( alphaToOne == rhs.alphaToOne ) && ( multiViewport == rhs.multiViewport ) && ( samplerAnisotropy == rhs.samplerAnisotropy ) && ( textureCompressionETC2 == rhs.textureCompressionETC2 ) && ( textureCompressionASTC_LDR == rhs.textureCompressionASTC_LDR ) && ( textureCompressionBC == rhs.textureCompressionBC ) && ( occlusionQueryPrecise == rhs.occlusionQueryPrecise ) && ( pipelineStatisticsQuery == rhs.pipelineStatisticsQuery ) && ( vertexPipelineStoresAndAtomics == rhs.vertexPipelineStoresAndAtomics ) && ( fragmentStoresAndAtomics == rhs.fragmentStoresAndAtomics ) && ( shaderTessellationAndGeometryPointSize == rhs.shaderTessellationAndGeometryPointSize ) && ( shaderImageGatherExtended == rhs.shaderImageGatherExtended ) && ( shaderStorageImageExtendedFormats == rhs.shaderStorageImageExtendedFormats ) && ( shaderStorageImageMultisample == rhs.shaderStorageImageMultisample ) && ( shaderStorageImageReadWithoutFormat == rhs.shaderStorageImageReadWithoutFormat ) && ( shaderStorageImageWriteWithoutFormat == rhs.shaderStorageImageWriteWithoutFormat ) && ( shaderUniformBufferArrayDynamicIndexing == rhs.shaderUniformBufferArrayDynamicIndexing ) && ( shaderSampledImageArrayDynamicIndexing == rhs.shaderSampledImageArrayDynamicIndexing ) && ( shaderStorageBufferArrayDynamicIndexing == rhs.shaderStorageBufferArrayDynamicIndexing ) && ( shaderStorageImageArrayDynamicIndexing == rhs.shaderStorageImageArrayDynamicIndexing ) && ( shaderClipDistance == rhs.shaderClipDistance ) && ( shaderCullDistance == rhs.shaderCullDistance ) && ( shaderFloat64 == rhs.shaderFloat64 ) && ( shaderInt64 == rhs.shaderInt64 ) && ( shaderInt16 == rhs.shaderInt16 ) && ( shaderResourceResidency == rhs.shaderResourceResidency ) && ( shaderResourceMinLod == rhs.shaderResourceMinLod ) && ( sparseBinding == rhs.sparseBinding ) && ( sparseResidencyBuffer == rhs.sparseResidencyBuffer ) && ( sparseResidencyImage2D == rhs.sparseResidencyImage2D ) && ( sparseResidencyImage3D == rhs.sparseResidencyImage3D ) && ( sparseResidency2Samples == rhs.sparseResidency2Samples ) && ( sparseResidency4Samples == rhs.sparseResidency4Samples ) && ( sparseResidency8Samples == rhs.sparseResidency8Samples ) && ( sparseResidency16Samples == rhs.sparseResidency16Samples ) && ( sparseResidencyAliased == rhs.sparseResidencyAliased ) && ( variableMultisampleRate == rhs.variableMultisampleRate ) && ( inheritedQueries == rhs.inheritedQueries ); # endif } bool operator!=( PhysicalDeviceFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::Bool32 robustBufferAccess = {}; VULKAN_HPP_NAMESPACE::Bool32 fullDrawIndexUint32 = {}; VULKAN_HPP_NAMESPACE::Bool32 imageCubeArray = {}; VULKAN_HPP_NAMESPACE::Bool32 independentBlend = {}; VULKAN_HPP_NAMESPACE::Bool32 geometryShader = {}; VULKAN_HPP_NAMESPACE::Bool32 tessellationShader = {}; VULKAN_HPP_NAMESPACE::Bool32 sampleRateShading = {}; VULKAN_HPP_NAMESPACE::Bool32 dualSrcBlend = {}; VULKAN_HPP_NAMESPACE::Bool32 logicOp = {}; VULKAN_HPP_NAMESPACE::Bool32 multiDrawIndirect = {}; VULKAN_HPP_NAMESPACE::Bool32 drawIndirectFirstInstance = {}; VULKAN_HPP_NAMESPACE::Bool32 depthClamp = {}; VULKAN_HPP_NAMESPACE::Bool32 depthBiasClamp = {}; VULKAN_HPP_NAMESPACE::Bool32 fillModeNonSolid = {}; VULKAN_HPP_NAMESPACE::Bool32 depthBounds = {}; VULKAN_HPP_NAMESPACE::Bool32 wideLines = {}; VULKAN_HPP_NAMESPACE::Bool32 largePoints = {}; VULKAN_HPP_NAMESPACE::Bool32 alphaToOne = {}; VULKAN_HPP_NAMESPACE::Bool32 multiViewport = {}; VULKAN_HPP_NAMESPACE::Bool32 samplerAnisotropy = {}; VULKAN_HPP_NAMESPACE::Bool32 textureCompressionETC2 = {}; VULKAN_HPP_NAMESPACE::Bool32 textureCompressionASTC_LDR = {}; VULKAN_HPP_NAMESPACE::Bool32 textureCompressionBC = {}; VULKAN_HPP_NAMESPACE::Bool32 occlusionQueryPrecise = {}; VULKAN_HPP_NAMESPACE::Bool32 pipelineStatisticsQuery = {}; VULKAN_HPP_NAMESPACE::Bool32 vertexPipelineStoresAndAtomics = {}; VULKAN_HPP_NAMESPACE::Bool32 fragmentStoresAndAtomics = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderTessellationAndGeometryPointSize = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderImageGatherExtended = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderStorageImageExtendedFormats = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderStorageImageMultisample = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderStorageImageReadWithoutFormat = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderStorageImageWriteWithoutFormat = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderUniformBufferArrayDynamicIndexing = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderSampledImageArrayDynamicIndexing = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderStorageBufferArrayDynamicIndexing = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderStorageImageArrayDynamicIndexing = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderClipDistance = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderCullDistance = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderFloat64 = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderInt64 = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderInt16 = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderResourceResidency = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderResourceMinLod = {}; VULKAN_HPP_NAMESPACE::Bool32 sparseBinding = {}; VULKAN_HPP_NAMESPACE::Bool32 sparseResidencyBuffer = {}; VULKAN_HPP_NAMESPACE::Bool32 sparseResidencyImage2D = {}; VULKAN_HPP_NAMESPACE::Bool32 sparseResidencyImage3D = {}; VULKAN_HPP_NAMESPACE::Bool32 sparseResidency2Samples = {}; VULKAN_HPP_NAMESPACE::Bool32 sparseResidency4Samples = {}; VULKAN_HPP_NAMESPACE::Bool32 sparseResidency8Samples = {}; VULKAN_HPP_NAMESPACE::Bool32 sparseResidency16Samples = {}; VULKAN_HPP_NAMESPACE::Bool32 sparseResidencyAliased = {}; VULKAN_HPP_NAMESPACE::Bool32 variableMultisampleRate = {}; VULKAN_HPP_NAMESPACE::Bool32 inheritedQueries = {}; }; struct DeviceCreateInfo { using NativeType = VkDeviceCreateInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDeviceCreateInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR DeviceCreateInfo( VULKAN_HPP_NAMESPACE::DeviceCreateFlags flags_ = {}, uint32_t queueCreateInfoCount_ = {}, const VULKAN_HPP_NAMESPACE::DeviceQueueCreateInfo * pQueueCreateInfos_ = {}, uint32_t enabledLayerCount_ = {}, const char * const * ppEnabledLayerNames_ = {}, uint32_t enabledExtensionCount_ = {}, const char * const * ppEnabledExtensionNames_ = {}, const VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures * pEnabledFeatures_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , queueCreateInfoCount{ queueCreateInfoCount_ } , pQueueCreateInfos{ pQueueCreateInfos_ } , enabledLayerCount{ enabledLayerCount_ } , ppEnabledLayerNames{ ppEnabledLayerNames_ } , enabledExtensionCount{ enabledExtensionCount_ } , ppEnabledExtensionNames{ ppEnabledExtensionNames_ } , pEnabledFeatures{ pEnabledFeatures_ } { } VULKAN_HPP_CONSTEXPR DeviceCreateInfo( DeviceCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; DeviceCreateInfo( VkDeviceCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT : DeviceCreateInfo( *reinterpret_cast( &rhs ) ) {} # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) DeviceCreateInfo( VULKAN_HPP_NAMESPACE::DeviceCreateFlags flags_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & queueCreateInfos_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & pEnabledLayerNames_ = {}, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & pEnabledExtensionNames_ = {}, const VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures * pEnabledFeatures_ = {}, const void * pNext_ = nullptr ) : pNext( pNext_ ) , flags( flags_ ) , queueCreateInfoCount( static_cast( queueCreateInfos_.size() ) ) , pQueueCreateInfos( queueCreateInfos_.data() ) , enabledLayerCount( static_cast( pEnabledLayerNames_.size() ) ) , ppEnabledLayerNames( pEnabledLayerNames_.data() ) , enabledExtensionCount( static_cast( pEnabledExtensionNames_.size() ) ) , ppEnabledExtensionNames( pEnabledExtensionNames_.data() ) , pEnabledFeatures( pEnabledFeatures_ ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ DeviceCreateInfo & operator=( DeviceCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DeviceCreateInfo & operator=( VkDeviceCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 DeviceCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 DeviceCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::DeviceCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 DeviceCreateInfo & setQueueCreateInfoCount( uint32_t queueCreateInfoCount_ ) VULKAN_HPP_NOEXCEPT { queueCreateInfoCount = queueCreateInfoCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 DeviceCreateInfo & setPQueueCreateInfos( const VULKAN_HPP_NAMESPACE::DeviceQueueCreateInfo * pQueueCreateInfos_ ) VULKAN_HPP_NOEXCEPT { pQueueCreateInfos = pQueueCreateInfos_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) DeviceCreateInfo & setQueueCreateInfos( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & queueCreateInfos_ ) VULKAN_HPP_NOEXCEPT { queueCreateInfoCount = static_cast( queueCreateInfos_.size() ); pQueueCreateInfos = queueCreateInfos_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 DeviceCreateInfo & setEnabledLayerCount( uint32_t enabledLayerCount_ ) VULKAN_HPP_NOEXCEPT { enabledLayerCount = enabledLayerCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 DeviceCreateInfo & setPpEnabledLayerNames( const char * const * ppEnabledLayerNames_ ) VULKAN_HPP_NOEXCEPT { ppEnabledLayerNames = ppEnabledLayerNames_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) DeviceCreateInfo & setPEnabledLayerNames( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & pEnabledLayerNames_ ) VULKAN_HPP_NOEXCEPT { enabledLayerCount = static_cast( pEnabledLayerNames_.size() ); ppEnabledLayerNames = pEnabledLayerNames_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 DeviceCreateInfo & setEnabledExtensionCount( uint32_t enabledExtensionCount_ ) VULKAN_HPP_NOEXCEPT { enabledExtensionCount = enabledExtensionCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 DeviceCreateInfo & setPpEnabledExtensionNames( const char * const * ppEnabledExtensionNames_ ) VULKAN_HPP_NOEXCEPT { ppEnabledExtensionNames = ppEnabledExtensionNames_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) DeviceCreateInfo & setPEnabledExtensionNames( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & pEnabledExtensionNames_ ) VULKAN_HPP_NOEXCEPT { enabledExtensionCount = static_cast( pEnabledExtensionNames_.size() ); ppEnabledExtensionNames = pEnabledExtensionNames_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 DeviceCreateInfo & setPEnabledFeatures( const VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures * pEnabledFeatures_ ) VULKAN_HPP_NOEXCEPT { pEnabledFeatures = pEnabledFeatures_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkDeviceCreateInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDeviceCreateInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, queueCreateInfoCount, pQueueCreateInfos, enabledLayerCount, ppEnabledLayerNames, enabledExtensionCount, ppEnabledExtensionNames, pEnabledFeatures ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) std::strong_ordering operator<=>( DeviceCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { if ( auto cmp = sType <=> rhs.sType; cmp != 0 ) return cmp; if ( auto cmp = pNext <=> rhs.pNext; cmp != 0 ) return cmp; if ( auto cmp = flags <=> rhs.flags; cmp != 0 ) return cmp; if ( auto cmp = queueCreateInfoCount <=> rhs.queueCreateInfoCount; cmp != 0 ) return cmp; if ( auto cmp = pQueueCreateInfos <=> rhs.pQueueCreateInfos; cmp != 0 ) return cmp; if ( auto cmp = enabledLayerCount <=> rhs.enabledLayerCount; cmp != 0 ) return cmp; for ( size_t i = 0; i < enabledLayerCount; ++i ) { if ( ppEnabledLayerNames[i] != rhs.ppEnabledLayerNames[i] ) if ( auto cmp = strcmp( ppEnabledLayerNames[i], rhs.ppEnabledLayerNames[i] ); cmp != 0 ) return cmp < 0 ? std::strong_ordering::less : std::strong_ordering::greater; } if ( auto cmp = enabledExtensionCount <=> rhs.enabledExtensionCount; cmp != 0 ) return cmp; for ( size_t i = 0; i < enabledExtensionCount; ++i ) { if ( ppEnabledExtensionNames[i] != rhs.ppEnabledExtensionNames[i] ) if ( auto cmp = strcmp( ppEnabledExtensionNames[i], rhs.ppEnabledExtensionNames[i] ); cmp != 0 ) return cmp < 0 ? std::strong_ordering::less : std::strong_ordering::greater; } if ( auto cmp = pEnabledFeatures <=> rhs.pEnabledFeatures; cmp != 0 ) return cmp; return std::strong_ordering::equivalent; } #endif bool operator==( DeviceCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( queueCreateInfoCount == rhs.queueCreateInfoCount ) && ( pQueueCreateInfos == rhs.pQueueCreateInfos ) && ( enabledLayerCount == rhs.enabledLayerCount ) && std::equal( ppEnabledLayerNames, ppEnabledLayerNames + enabledLayerCount, rhs.ppEnabledLayerNames, []( char const * left, char const * right ) { return ( left == right ) || ( strcmp( left, right ) == 0 ); } ) && ( enabledExtensionCount == rhs.enabledExtensionCount ) && std::equal( ppEnabledExtensionNames, ppEnabledExtensionNames + enabledExtensionCount, rhs.ppEnabledExtensionNames, []( char const * left, char const * right ) { return ( left == right ) || ( strcmp( left, right ) == 0 ); } ) && ( pEnabledFeatures == rhs.pEnabledFeatures ); } bool operator!=( DeviceCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDeviceCreateInfo; const void * pNext = {}; VULKAN_HPP_NAMESPACE::DeviceCreateFlags flags = {}; uint32_t queueCreateInfoCount = {}; const VULKAN_HPP_NAMESPACE::DeviceQueueCreateInfo * pQueueCreateInfos = {}; uint32_t enabledLayerCount = {}; const char * const * ppEnabledLayerNames = {}; uint32_t enabledExtensionCount = {}; const char * const * ppEnabledExtensionNames = {}; const VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures * pEnabledFeatures = {}; }; template <> struct CppType { using Type = DeviceCreateInfo; }; struct DeviceMemoryReportCallbackDataEXT { using NativeType = VkDeviceMemoryReportCallbackDataEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDeviceMemoryReportCallbackDataEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR DeviceMemoryReportCallbackDataEXT( VULKAN_HPP_NAMESPACE::DeviceMemoryReportFlagsEXT flags_ = {}, VULKAN_HPP_NAMESPACE::DeviceMemoryReportEventTypeEXT type_ = VULKAN_HPP_NAMESPACE::DeviceMemoryReportEventTypeEXT::eAllocate, uint64_t memoryObjectId_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize size_ = {}, VULKAN_HPP_NAMESPACE::ObjectType objectType_ = VULKAN_HPP_NAMESPACE::ObjectType::eUnknown, uint64_t objectHandle_ = {}, uint32_t heapIndex_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , type{ type_ } , memoryObjectId{ memoryObjectId_ } , size{ size_ } , objectType{ objectType_ } , objectHandle{ objectHandle_ } , heapIndex{ heapIndex_ } { } VULKAN_HPP_CONSTEXPR DeviceMemoryReportCallbackDataEXT( DeviceMemoryReportCallbackDataEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; DeviceMemoryReportCallbackDataEXT( VkDeviceMemoryReportCallbackDataEXT const & rhs ) VULKAN_HPP_NOEXCEPT : DeviceMemoryReportCallbackDataEXT( *reinterpret_cast( &rhs ) ) { } DeviceMemoryReportCallbackDataEXT & operator=( DeviceMemoryReportCallbackDataEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DeviceMemoryReportCallbackDataEXT & operator=( VkDeviceMemoryReportCallbackDataEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkDeviceMemoryReportCallbackDataEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDeviceMemoryReportCallbackDataEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, type, memoryObjectId, size, objectType, objectHandle, heapIndex ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( DeviceMemoryReportCallbackDataEXT const & ) const = default; #else bool operator==( DeviceMemoryReportCallbackDataEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( type == rhs.type ) && ( memoryObjectId == rhs.memoryObjectId ) && ( size == rhs.size ) && ( objectType == rhs.objectType ) && ( objectHandle == rhs.objectHandle ) && ( heapIndex == rhs.heapIndex ); # endif } bool operator!=( DeviceMemoryReportCallbackDataEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDeviceMemoryReportCallbackDataEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::DeviceMemoryReportFlagsEXT flags = {}; VULKAN_HPP_NAMESPACE::DeviceMemoryReportEventTypeEXT type = VULKAN_HPP_NAMESPACE::DeviceMemoryReportEventTypeEXT::eAllocate; uint64_t memoryObjectId = {}; VULKAN_HPP_NAMESPACE::DeviceSize size = {}; VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eUnknown; uint64_t objectHandle = {}; uint32_t heapIndex = {}; }; template <> struct CppType { using Type = DeviceMemoryReportCallbackDataEXT; }; typedef void( VKAPI_PTR * PFN_DeviceMemoryReportCallbackEXT )( const VULKAN_HPP_NAMESPACE::DeviceMemoryReportCallbackDataEXT * pCallbackData, void * pUserData ); struct DeviceDeviceMemoryReportCreateInfoEXT { using NativeType = VkDeviceDeviceMemoryReportCreateInfoEXT; static const bool allowDuplicate = true; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDeviceDeviceMemoryReportCreateInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR DeviceDeviceMemoryReportCreateInfoEXT( VULKAN_HPP_NAMESPACE::DeviceMemoryReportFlagsEXT flags_ = {}, VULKAN_HPP_NAMESPACE::PFN_DeviceMemoryReportCallbackEXT pfnUserCallback_ = {}, void * pUserData_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , pfnUserCallback{ pfnUserCallback_ } , pUserData{ pUserData_ } { } VULKAN_HPP_CONSTEXPR DeviceDeviceMemoryReportCreateInfoEXT( DeviceDeviceMemoryReportCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; DeviceDeviceMemoryReportCreateInfoEXT( VkDeviceDeviceMemoryReportCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : DeviceDeviceMemoryReportCreateInfoEXT( *reinterpret_cast( &rhs ) ) { } # if defined( __clang__ ) || defined( __GNUC__ ) # pragma GCC diagnostic push # if defined( __clang__ ) # pragma clang diagnostic ignored "-Wunknown-warning-option" # endif # pragma GCC diagnostic ignored "-Wcast-function-type" # endif VULKAN_HPP_DEPRECATED( "This constructor is deprecated. Use the one taking function pointer types from the vk-namespace instead." ) DeviceDeviceMemoryReportCreateInfoEXT( VULKAN_HPP_NAMESPACE::DeviceMemoryReportFlagsEXT flags_, PFN_vkDeviceMemoryReportCallbackEXT pfnUserCallback_, void * pUserData_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : DeviceDeviceMemoryReportCreateInfoEXT( flags_, reinterpret_cast( pfnUserCallback_ ), pUserData_, pNext_ ) { } # if defined( __clang__ ) || defined( __GNUC__ ) # pragma GCC diagnostic pop # endif DeviceDeviceMemoryReportCreateInfoEXT & operator=( DeviceDeviceMemoryReportCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DeviceDeviceMemoryReportCreateInfoEXT & operator=( VkDeviceDeviceMemoryReportCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 DeviceDeviceMemoryReportCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 DeviceDeviceMemoryReportCreateInfoEXT & setFlags( VULKAN_HPP_NAMESPACE::DeviceMemoryReportFlagsEXT flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 DeviceDeviceMemoryReportCreateInfoEXT & setPfnUserCallback( VULKAN_HPP_NAMESPACE::PFN_DeviceMemoryReportCallbackEXT pfnUserCallback_ ) VULKAN_HPP_NOEXCEPT { pfnUserCallback = pfnUserCallback_; return *this; } VULKAN_HPP_CONSTEXPR_14 DeviceDeviceMemoryReportCreateInfoEXT & setPUserData( void * pUserData_ ) VULKAN_HPP_NOEXCEPT { pUserData = pUserData_; return *this; } # if defined( __clang__ ) || defined( __GNUC__ ) # pragma GCC diagnostic push # if defined( __clang__ ) # pragma clang diagnostic ignored "-Wunknown-warning-option" # endif # pragma GCC diagnostic ignored "-Wcast-function-type" # endif VULKAN_HPP_DEPRECATED( "This setter is deprecated. Use the one taking a function pointer type from the vk-namespace instead." ) DeviceDeviceMemoryReportCreateInfoEXT & setPfnUserCallback( PFN_vkDeviceMemoryReportCallbackEXT pfnUserCallback_ ) VULKAN_HPP_NOEXCEPT { return setPfnUserCallback( reinterpret_cast( pfnUserCallback_ ) ); } # if defined( __clang__ ) || defined( __GNUC__ ) # pragma GCC diagnostic pop # endif #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkDeviceDeviceMemoryReportCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDeviceDeviceMemoryReportCreateInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, pfnUserCallback, pUserData ); } #endif bool operator==( DeviceDeviceMemoryReportCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { #if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); #else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( pfnUserCallback == rhs.pfnUserCallback ) && ( pUserData == rhs.pUserData ); #endif } bool operator!=( DeviceDeviceMemoryReportCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDeviceDeviceMemoryReportCreateInfoEXT; const void * pNext = {}; VULKAN_HPP_NAMESPACE::DeviceMemoryReportFlagsEXT flags = {}; VULKAN_HPP_NAMESPACE::PFN_DeviceMemoryReportCallbackEXT pfnUserCallback = {}; void * pUserData = {}; }; template <> struct CppType { using Type = DeviceDeviceMemoryReportCreateInfoEXT; }; struct DeviceDiagnosticsConfigCreateInfoNV { using NativeType = VkDeviceDiagnosticsConfigCreateInfoNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDeviceDiagnosticsConfigCreateInfoNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR DeviceDiagnosticsConfigCreateInfoNV( VULKAN_HPP_NAMESPACE::DeviceDiagnosticsConfigFlagsNV flags_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } { } VULKAN_HPP_CONSTEXPR DeviceDiagnosticsConfigCreateInfoNV( DeviceDiagnosticsConfigCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; DeviceDiagnosticsConfigCreateInfoNV( VkDeviceDiagnosticsConfigCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT : DeviceDiagnosticsConfigCreateInfoNV( *reinterpret_cast( &rhs ) ) { } DeviceDiagnosticsConfigCreateInfoNV & operator=( DeviceDiagnosticsConfigCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DeviceDiagnosticsConfigCreateInfoNV & operator=( VkDeviceDiagnosticsConfigCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 DeviceDiagnosticsConfigCreateInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 DeviceDiagnosticsConfigCreateInfoNV & setFlags( VULKAN_HPP_NAMESPACE::DeviceDiagnosticsConfigFlagsNV flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkDeviceDiagnosticsConfigCreateInfoNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDeviceDiagnosticsConfigCreateInfoNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( DeviceDiagnosticsConfigCreateInfoNV const & ) const = default; #else bool operator==( DeviceDiagnosticsConfigCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ); # endif } bool operator!=( DeviceDiagnosticsConfigCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDeviceDiagnosticsConfigCreateInfoNV; const void * pNext = {}; VULKAN_HPP_NAMESPACE::DeviceDiagnosticsConfigFlagsNV flags = {}; }; template <> struct CppType { using Type = DeviceDiagnosticsConfigCreateInfoNV; }; struct DeviceEventInfoEXT { using NativeType = VkDeviceEventInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDeviceEventInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR DeviceEventInfoEXT( VULKAN_HPP_NAMESPACE::DeviceEventTypeEXT deviceEvent_ = VULKAN_HPP_NAMESPACE::DeviceEventTypeEXT::eDisplayHotplug, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , deviceEvent{ deviceEvent_ } { } VULKAN_HPP_CONSTEXPR DeviceEventInfoEXT( DeviceEventInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; DeviceEventInfoEXT( VkDeviceEventInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : DeviceEventInfoEXT( *reinterpret_cast( &rhs ) ) {} DeviceEventInfoEXT & operator=( DeviceEventInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DeviceEventInfoEXT & operator=( VkDeviceEventInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 DeviceEventInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 DeviceEventInfoEXT & setDeviceEvent( VULKAN_HPP_NAMESPACE::DeviceEventTypeEXT deviceEvent_ ) VULKAN_HPP_NOEXCEPT { deviceEvent = deviceEvent_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkDeviceEventInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDeviceEventInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, deviceEvent ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( DeviceEventInfoEXT const & ) const = default; #else bool operator==( DeviceEventInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( deviceEvent == rhs.deviceEvent ); # endif } bool operator!=( DeviceEventInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDeviceEventInfoEXT; const void * pNext = {}; VULKAN_HPP_NAMESPACE::DeviceEventTypeEXT deviceEvent = VULKAN_HPP_NAMESPACE::DeviceEventTypeEXT::eDisplayHotplug; }; template <> struct CppType { using Type = DeviceEventInfoEXT; }; struct DeviceFaultAddressInfoEXT { using NativeType = VkDeviceFaultAddressInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR DeviceFaultAddressInfoEXT( VULKAN_HPP_NAMESPACE::DeviceFaultAddressTypeEXT addressType_ = VULKAN_HPP_NAMESPACE::DeviceFaultAddressTypeEXT::eNone, VULKAN_HPP_NAMESPACE::DeviceAddress reportedAddress_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize addressPrecision_ = {} ) VULKAN_HPP_NOEXCEPT : addressType{ addressType_ } , reportedAddress{ reportedAddress_ } , addressPrecision{ addressPrecision_ } { } VULKAN_HPP_CONSTEXPR DeviceFaultAddressInfoEXT( DeviceFaultAddressInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; DeviceFaultAddressInfoEXT( VkDeviceFaultAddressInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : DeviceFaultAddressInfoEXT( *reinterpret_cast( &rhs ) ) { } DeviceFaultAddressInfoEXT & operator=( DeviceFaultAddressInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DeviceFaultAddressInfoEXT & operator=( VkDeviceFaultAddressInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 DeviceFaultAddressInfoEXT & setAddressType( VULKAN_HPP_NAMESPACE::DeviceFaultAddressTypeEXT addressType_ ) VULKAN_HPP_NOEXCEPT { addressType = addressType_; return *this; } VULKAN_HPP_CONSTEXPR_14 DeviceFaultAddressInfoEXT & setReportedAddress( VULKAN_HPP_NAMESPACE::DeviceAddress reportedAddress_ ) VULKAN_HPP_NOEXCEPT { reportedAddress = reportedAddress_; return *this; } VULKAN_HPP_CONSTEXPR_14 DeviceFaultAddressInfoEXT & setAddressPrecision( VULKAN_HPP_NAMESPACE::DeviceSize addressPrecision_ ) VULKAN_HPP_NOEXCEPT { addressPrecision = addressPrecision_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkDeviceFaultAddressInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDeviceFaultAddressInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( addressType, reportedAddress, addressPrecision ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( DeviceFaultAddressInfoEXT const & ) const = default; #else bool operator==( DeviceFaultAddressInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( addressType == rhs.addressType ) && ( reportedAddress == rhs.reportedAddress ) && ( addressPrecision == rhs.addressPrecision ); # endif } bool operator!=( DeviceFaultAddressInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::DeviceFaultAddressTypeEXT addressType = VULKAN_HPP_NAMESPACE::DeviceFaultAddressTypeEXT::eNone; VULKAN_HPP_NAMESPACE::DeviceAddress reportedAddress = {}; VULKAN_HPP_NAMESPACE::DeviceSize addressPrecision = {}; }; struct DeviceFaultCountsEXT { using NativeType = VkDeviceFaultCountsEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDeviceFaultCountsEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR DeviceFaultCountsEXT( uint32_t addressInfoCount_ = {}, uint32_t vendorInfoCount_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize vendorBinarySize_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , addressInfoCount{ addressInfoCount_ } , vendorInfoCount{ vendorInfoCount_ } , vendorBinarySize{ vendorBinarySize_ } { } VULKAN_HPP_CONSTEXPR DeviceFaultCountsEXT( DeviceFaultCountsEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; DeviceFaultCountsEXT( VkDeviceFaultCountsEXT const & rhs ) VULKAN_HPP_NOEXCEPT : DeviceFaultCountsEXT( *reinterpret_cast( &rhs ) ) { } DeviceFaultCountsEXT & operator=( DeviceFaultCountsEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DeviceFaultCountsEXT & operator=( VkDeviceFaultCountsEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 DeviceFaultCountsEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 DeviceFaultCountsEXT & setAddressInfoCount( uint32_t addressInfoCount_ ) VULKAN_HPP_NOEXCEPT { addressInfoCount = addressInfoCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 DeviceFaultCountsEXT & setVendorInfoCount( uint32_t vendorInfoCount_ ) VULKAN_HPP_NOEXCEPT { vendorInfoCount = vendorInfoCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 DeviceFaultCountsEXT & setVendorBinarySize( VULKAN_HPP_NAMESPACE::DeviceSize vendorBinarySize_ ) VULKAN_HPP_NOEXCEPT { vendorBinarySize = vendorBinarySize_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkDeviceFaultCountsEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDeviceFaultCountsEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, addressInfoCount, vendorInfoCount, vendorBinarySize ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( DeviceFaultCountsEXT const & ) const = default; #else bool operator==( DeviceFaultCountsEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( addressInfoCount == rhs.addressInfoCount ) && ( vendorInfoCount == rhs.vendorInfoCount ) && ( vendorBinarySize == rhs.vendorBinarySize ); # endif } bool operator!=( DeviceFaultCountsEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDeviceFaultCountsEXT; void * pNext = {}; uint32_t addressInfoCount = {}; uint32_t vendorInfoCount = {}; VULKAN_HPP_NAMESPACE::DeviceSize vendorBinarySize = {}; }; template <> struct CppType { using Type = DeviceFaultCountsEXT; }; struct DeviceFaultVendorInfoEXT { using NativeType = VkDeviceFaultVendorInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 DeviceFaultVendorInfoEXT( std::array const & description_ = {}, uint64_t vendorFaultCode_ = {}, uint64_t vendorFaultData_ = {} ) VULKAN_HPP_NOEXCEPT : description{ description_ } , vendorFaultCode{ vendorFaultCode_ } , vendorFaultData{ vendorFaultData_ } { } VULKAN_HPP_CONSTEXPR_14 DeviceFaultVendorInfoEXT( DeviceFaultVendorInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; DeviceFaultVendorInfoEXT( VkDeviceFaultVendorInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : DeviceFaultVendorInfoEXT( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) DeviceFaultVendorInfoEXT( std::string const & description_, uint64_t vendorFaultCode_ = {}, uint64_t vendorFaultData_ = {} ) : vendorFaultCode( vendorFaultCode_ ), vendorFaultData( vendorFaultData_ ) { VULKAN_HPP_ASSERT( description_.size() < VK_MAX_DESCRIPTION_SIZE ); # if defined( _WIN32 ) strncpy_s( description, VK_MAX_DESCRIPTION_SIZE, description_.data(), description_.size() ); # else strncpy( description, description_.data(), std::min( VK_MAX_DESCRIPTION_SIZE, description_.size() ) ); # endif } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ DeviceFaultVendorInfoEXT & operator=( DeviceFaultVendorInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DeviceFaultVendorInfoEXT & operator=( VkDeviceFaultVendorInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 DeviceFaultVendorInfoEXT & setDescription( std::array description_ ) VULKAN_HPP_NOEXCEPT { description = description_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) DeviceFaultVendorInfoEXT & setDescription( std::string const & description_ ) VULKAN_HPP_NOEXCEPT { VULKAN_HPP_ASSERT( description_.size() < VK_MAX_DESCRIPTION_SIZE ); # if defined( _WIN32 ) strncpy_s( description, VK_MAX_DESCRIPTION_SIZE, description_.data(), description_.size() ); # else strncpy( description, description_.data(), std::min( VK_MAX_DESCRIPTION_SIZE, description_.size() ) ); # endif return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 DeviceFaultVendorInfoEXT & setVendorFaultCode( uint64_t vendorFaultCode_ ) VULKAN_HPP_NOEXCEPT { vendorFaultCode = vendorFaultCode_; return *this; } VULKAN_HPP_CONSTEXPR_14 DeviceFaultVendorInfoEXT & setVendorFaultData( uint64_t vendorFaultData_ ) VULKAN_HPP_NOEXCEPT { vendorFaultData = vendorFaultData_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkDeviceFaultVendorInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDeviceFaultVendorInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple const &, uint64_t const &, uint64_t const &> # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( description, vendorFaultCode, vendorFaultData ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) std::strong_ordering operator<=>( DeviceFaultVendorInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { if ( auto cmp = strcmp( description, rhs.description ); cmp != 0 ) return ( cmp < 0 ) ? std::strong_ordering::less : std::strong_ordering::greater; if ( auto cmp = vendorFaultCode <=> rhs.vendorFaultCode; cmp != 0 ) return cmp; if ( auto cmp = vendorFaultData <=> rhs.vendorFaultData; cmp != 0 ) return cmp; return std::strong_ordering::equivalent; } #endif bool operator==( DeviceFaultVendorInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( strcmp( description, rhs.description ) == 0 ) && ( vendorFaultCode == rhs.vendorFaultCode ) && ( vendorFaultData == rhs.vendorFaultData ); } bool operator!=( DeviceFaultVendorInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::ArrayWrapper1D description = {}; uint64_t vendorFaultCode = {}; uint64_t vendorFaultData = {}; }; struct DeviceFaultInfoEXT { using NativeType = VkDeviceFaultInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDeviceFaultInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 DeviceFaultInfoEXT( std::array const & description_ = {}, VULKAN_HPP_NAMESPACE::DeviceFaultAddressInfoEXT * pAddressInfos_ = {}, VULKAN_HPP_NAMESPACE::DeviceFaultVendorInfoEXT * pVendorInfos_ = {}, void * pVendorBinaryData_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , description{ description_ } , pAddressInfos{ pAddressInfos_ } , pVendorInfos{ pVendorInfos_ } , pVendorBinaryData{ pVendorBinaryData_ } { } # ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE VULKAN_HPP_CONSTEXPR_14 DeviceFaultInfoEXT( DeviceFaultInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; DeviceFaultInfoEXT( VkDeviceFaultInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : DeviceFaultInfoEXT( *reinterpret_cast( &rhs ) ) {} DeviceFaultInfoEXT & operator=( DeviceFaultInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; # else DeviceFaultInfoEXT( DeviceFaultInfoEXT const & ) = delete; DeviceFaultInfoEXT & operator=( DeviceFaultInfoEXT const & ) = delete; DeviceFaultInfoEXT( DeviceFaultInfoEXT && rhs ) VULKAN_HPP_NOEXCEPT : pNext{ rhs.pNext } , pAddressInfos{ rhs.pAddressInfos } , pVendorInfos{ rhs.pVendorInfos } , pVendorBinaryData{ rhs.pVendorBinaryData } { memcpy( description, rhs.description, VK_MAX_DESCRIPTION_SIZE ); rhs.pNext = nullptr; memset( rhs.description, 0, VK_MAX_DESCRIPTION_SIZE ); rhs.pAddressInfos = nullptr; rhs.pVendorInfos = nullptr; rhs.pVendorBinaryData = nullptr; } DeviceFaultInfoEXT & operator=( DeviceFaultInfoEXT && rhs ) VULKAN_HPP_NOEXCEPT { free( pAddressInfos ); free( pVendorInfos ); free( pVendorBinaryData ); pNext = rhs.pNext; memcpy( description, rhs.description, VK_MAX_DESCRIPTION_SIZE ); pAddressInfos = rhs.pAddressInfos; pVendorInfos = rhs.pVendorInfos; pVendorBinaryData = rhs.pVendorBinaryData; rhs.pNext = nullptr; memset( rhs.description, 0, VK_MAX_DESCRIPTION_SIZE ); rhs.pAddressInfos = nullptr; rhs.pVendorInfos = nullptr; rhs.pVendorBinaryData = nullptr; return *this; } ~DeviceFaultInfoEXT() VULKAN_HPP_NOEXCEPT { free( pAddressInfos ); free( pVendorInfos ); free( pVendorBinaryData ); } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ operator VkDeviceFaultInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDeviceFaultInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple const &, VULKAN_HPP_NAMESPACE::DeviceFaultAddressInfoEXT * const &, VULKAN_HPP_NAMESPACE::DeviceFaultVendorInfoEXT * const &, void * const &> # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, description, pAddressInfos, pVendorInfos, pVendorBinaryData ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) std::strong_ordering operator<=>( DeviceFaultInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { if ( auto cmp = sType <=> rhs.sType; cmp != 0 ) return cmp; if ( auto cmp = pNext <=> rhs.pNext; cmp != 0 ) return cmp; if ( auto cmp = strcmp( description, rhs.description ); cmp != 0 ) return ( cmp < 0 ) ? std::strong_ordering::less : std::strong_ordering::greater; if ( auto cmp = pAddressInfos <=> rhs.pAddressInfos; cmp != 0 ) return cmp; if ( auto cmp = pVendorInfos <=> rhs.pVendorInfos; cmp != 0 ) return cmp; if ( auto cmp = pVendorBinaryData <=> rhs.pVendorBinaryData; cmp != 0 ) return cmp; return std::strong_ordering::equivalent; } #endif bool operator==( DeviceFaultInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( strcmp( description, rhs.description ) == 0 ) && ( pAddressInfos == rhs.pAddressInfos ) && ( pVendorInfos == rhs.pVendorInfos ) && ( pVendorBinaryData == rhs.pVendorBinaryData ); } bool operator!=( DeviceFaultInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDeviceFaultInfoEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D description = {}; VULKAN_HPP_NAMESPACE::DeviceFaultAddressInfoEXT * pAddressInfos = {}; VULKAN_HPP_NAMESPACE::DeviceFaultVendorInfoEXT * pVendorInfos = {}; void * pVendorBinaryData = {}; }; template <> struct CppType { using Type = DeviceFaultInfoEXT; }; struct DeviceFaultVendorBinaryHeaderVersionOneEXT { using NativeType = VkDeviceFaultVendorBinaryHeaderVersionOneEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 DeviceFaultVendorBinaryHeaderVersionOneEXT( uint32_t headerSize_ = {}, VULKAN_HPP_NAMESPACE::DeviceFaultVendorBinaryHeaderVersionEXT headerVersion_ = VULKAN_HPP_NAMESPACE::DeviceFaultVendorBinaryHeaderVersionEXT::eOne, uint32_t vendorID_ = {}, uint32_t deviceID_ = {}, uint32_t driverVersion_ = {}, std::array const & pipelineCacheUUID_ = {}, uint32_t applicationNameOffset_ = {}, uint32_t applicationVersion_ = {}, uint32_t engineNameOffset_ = {}, uint32_t engineVersion_ = {}, uint32_t apiVersion_ = {} ) VULKAN_HPP_NOEXCEPT : headerSize{ headerSize_ } , headerVersion{ headerVersion_ } , vendorID{ vendorID_ } , deviceID{ deviceID_ } , driverVersion{ driverVersion_ } , pipelineCacheUUID{ pipelineCacheUUID_ } , applicationNameOffset{ applicationNameOffset_ } , applicationVersion{ applicationVersion_ } , engineNameOffset{ engineNameOffset_ } , engineVersion{ engineVersion_ } , apiVersion{ apiVersion_ } { } VULKAN_HPP_CONSTEXPR_14 DeviceFaultVendorBinaryHeaderVersionOneEXT( DeviceFaultVendorBinaryHeaderVersionOneEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; DeviceFaultVendorBinaryHeaderVersionOneEXT( VkDeviceFaultVendorBinaryHeaderVersionOneEXT const & rhs ) VULKAN_HPP_NOEXCEPT : DeviceFaultVendorBinaryHeaderVersionOneEXT( *reinterpret_cast( &rhs ) ) { } DeviceFaultVendorBinaryHeaderVersionOneEXT & operator=( DeviceFaultVendorBinaryHeaderVersionOneEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DeviceFaultVendorBinaryHeaderVersionOneEXT & operator=( VkDeviceFaultVendorBinaryHeaderVersionOneEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 DeviceFaultVendorBinaryHeaderVersionOneEXT & setHeaderSize( uint32_t headerSize_ ) VULKAN_HPP_NOEXCEPT { headerSize = headerSize_; return *this; } VULKAN_HPP_CONSTEXPR_14 DeviceFaultVendorBinaryHeaderVersionOneEXT & setHeaderVersion( VULKAN_HPP_NAMESPACE::DeviceFaultVendorBinaryHeaderVersionEXT headerVersion_ ) VULKAN_HPP_NOEXCEPT { headerVersion = headerVersion_; return *this; } VULKAN_HPP_CONSTEXPR_14 DeviceFaultVendorBinaryHeaderVersionOneEXT & setVendorID( uint32_t vendorID_ ) VULKAN_HPP_NOEXCEPT { vendorID = vendorID_; return *this; } VULKAN_HPP_CONSTEXPR_14 DeviceFaultVendorBinaryHeaderVersionOneEXT & setDeviceID( uint32_t deviceID_ ) VULKAN_HPP_NOEXCEPT { deviceID = deviceID_; return *this; } VULKAN_HPP_CONSTEXPR_14 DeviceFaultVendorBinaryHeaderVersionOneEXT & setDriverVersion( uint32_t driverVersion_ ) VULKAN_HPP_NOEXCEPT { driverVersion = driverVersion_; return *this; } VULKAN_HPP_CONSTEXPR_14 DeviceFaultVendorBinaryHeaderVersionOneEXT & setPipelineCacheUUID( std::array pipelineCacheUUID_ ) VULKAN_HPP_NOEXCEPT { pipelineCacheUUID = pipelineCacheUUID_; return *this; } VULKAN_HPP_CONSTEXPR_14 DeviceFaultVendorBinaryHeaderVersionOneEXT & setApplicationNameOffset( uint32_t applicationNameOffset_ ) VULKAN_HPP_NOEXCEPT { applicationNameOffset = applicationNameOffset_; return *this; } VULKAN_HPP_CONSTEXPR_14 DeviceFaultVendorBinaryHeaderVersionOneEXT & setApplicationVersion( uint32_t applicationVersion_ ) VULKAN_HPP_NOEXCEPT { applicationVersion = applicationVersion_; return *this; } VULKAN_HPP_CONSTEXPR_14 DeviceFaultVendorBinaryHeaderVersionOneEXT & setEngineNameOffset( uint32_t engineNameOffset_ ) VULKAN_HPP_NOEXCEPT { engineNameOffset = engineNameOffset_; return *this; } VULKAN_HPP_CONSTEXPR_14 DeviceFaultVendorBinaryHeaderVersionOneEXT & setEngineVersion( uint32_t engineVersion_ ) VULKAN_HPP_NOEXCEPT { engineVersion = engineVersion_; return *this; } VULKAN_HPP_CONSTEXPR_14 DeviceFaultVendorBinaryHeaderVersionOneEXT & setApiVersion( uint32_t apiVersion_ ) VULKAN_HPP_NOEXCEPT { apiVersion = apiVersion_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkDeviceFaultVendorBinaryHeaderVersionOneEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDeviceFaultVendorBinaryHeaderVersionOneEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple const &, uint32_t const &, uint32_t const &, uint32_t const &, uint32_t const &, uint32_t const &> # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( headerSize, headerVersion, vendorID, deviceID, driverVersion, pipelineCacheUUID, applicationNameOffset, applicationVersion, engineNameOffset, engineVersion, apiVersion ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( DeviceFaultVendorBinaryHeaderVersionOneEXT const & ) const = default; #else bool operator==( DeviceFaultVendorBinaryHeaderVersionOneEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( headerSize == rhs.headerSize ) && ( headerVersion == rhs.headerVersion ) && ( vendorID == rhs.vendorID ) && ( deviceID == rhs.deviceID ) && ( driverVersion == rhs.driverVersion ) && ( pipelineCacheUUID == rhs.pipelineCacheUUID ) && ( applicationNameOffset == rhs.applicationNameOffset ) && ( applicationVersion == rhs.applicationVersion ) && ( engineNameOffset == rhs.engineNameOffset ) && ( engineVersion == rhs.engineVersion ) && ( apiVersion == rhs.apiVersion ); # endif } bool operator!=( DeviceFaultVendorBinaryHeaderVersionOneEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: uint32_t headerSize = {}; VULKAN_HPP_NAMESPACE::DeviceFaultVendorBinaryHeaderVersionEXT headerVersion = VULKAN_HPP_NAMESPACE::DeviceFaultVendorBinaryHeaderVersionEXT::eOne; uint32_t vendorID = {}; uint32_t deviceID = {}; uint32_t driverVersion = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D pipelineCacheUUID = {}; uint32_t applicationNameOffset = {}; uint32_t applicationVersion = {}; uint32_t engineNameOffset = {}; uint32_t engineVersion = {}; uint32_t apiVersion = {}; }; struct DeviceGroupBindSparseInfo { using NativeType = VkDeviceGroupBindSparseInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDeviceGroupBindSparseInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR DeviceGroupBindSparseInfo( uint32_t resourceDeviceIndex_ = {}, uint32_t memoryDeviceIndex_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , resourceDeviceIndex{ resourceDeviceIndex_ } , memoryDeviceIndex{ memoryDeviceIndex_ } { } VULKAN_HPP_CONSTEXPR DeviceGroupBindSparseInfo( DeviceGroupBindSparseInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; DeviceGroupBindSparseInfo( VkDeviceGroupBindSparseInfo const & rhs ) VULKAN_HPP_NOEXCEPT : DeviceGroupBindSparseInfo( *reinterpret_cast( &rhs ) ) { } DeviceGroupBindSparseInfo & operator=( DeviceGroupBindSparseInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DeviceGroupBindSparseInfo & operator=( VkDeviceGroupBindSparseInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 DeviceGroupBindSparseInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 DeviceGroupBindSparseInfo & setResourceDeviceIndex( uint32_t resourceDeviceIndex_ ) VULKAN_HPP_NOEXCEPT { resourceDeviceIndex = resourceDeviceIndex_; return *this; } VULKAN_HPP_CONSTEXPR_14 DeviceGroupBindSparseInfo & setMemoryDeviceIndex( uint32_t memoryDeviceIndex_ ) VULKAN_HPP_NOEXCEPT { memoryDeviceIndex = memoryDeviceIndex_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkDeviceGroupBindSparseInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDeviceGroupBindSparseInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, resourceDeviceIndex, memoryDeviceIndex ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( DeviceGroupBindSparseInfo const & ) const = default; #else bool operator==( DeviceGroupBindSparseInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( resourceDeviceIndex == rhs.resourceDeviceIndex ) && ( memoryDeviceIndex == rhs.memoryDeviceIndex ); # endif } bool operator!=( DeviceGroupBindSparseInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDeviceGroupBindSparseInfo; const void * pNext = {}; uint32_t resourceDeviceIndex = {}; uint32_t memoryDeviceIndex = {}; }; template <> struct CppType { using Type = DeviceGroupBindSparseInfo; }; using DeviceGroupBindSparseInfoKHR = DeviceGroupBindSparseInfo; struct DeviceGroupCommandBufferBeginInfo { using NativeType = VkDeviceGroupCommandBufferBeginInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDeviceGroupCommandBufferBeginInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR DeviceGroupCommandBufferBeginInfo( uint32_t deviceMask_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , deviceMask{ deviceMask_ } { } VULKAN_HPP_CONSTEXPR DeviceGroupCommandBufferBeginInfo( DeviceGroupCommandBufferBeginInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; DeviceGroupCommandBufferBeginInfo( VkDeviceGroupCommandBufferBeginInfo const & rhs ) VULKAN_HPP_NOEXCEPT : DeviceGroupCommandBufferBeginInfo( *reinterpret_cast( &rhs ) ) { } DeviceGroupCommandBufferBeginInfo & operator=( DeviceGroupCommandBufferBeginInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DeviceGroupCommandBufferBeginInfo & operator=( VkDeviceGroupCommandBufferBeginInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 DeviceGroupCommandBufferBeginInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 DeviceGroupCommandBufferBeginInfo & setDeviceMask( uint32_t deviceMask_ ) VULKAN_HPP_NOEXCEPT { deviceMask = deviceMask_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkDeviceGroupCommandBufferBeginInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDeviceGroupCommandBufferBeginInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, deviceMask ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( DeviceGroupCommandBufferBeginInfo const & ) const = default; #else bool operator==( DeviceGroupCommandBufferBeginInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( deviceMask == rhs.deviceMask ); # endif } bool operator!=( DeviceGroupCommandBufferBeginInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDeviceGroupCommandBufferBeginInfo; const void * pNext = {}; uint32_t deviceMask = {}; }; template <> struct CppType { using Type = DeviceGroupCommandBufferBeginInfo; }; using DeviceGroupCommandBufferBeginInfoKHR = DeviceGroupCommandBufferBeginInfo; struct DeviceGroupDeviceCreateInfo { using NativeType = VkDeviceGroupDeviceCreateInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDeviceGroupDeviceCreateInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR DeviceGroupDeviceCreateInfo( uint32_t physicalDeviceCount_ = {}, const VULKAN_HPP_NAMESPACE::PhysicalDevice * pPhysicalDevices_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , physicalDeviceCount{ physicalDeviceCount_ } , pPhysicalDevices{ pPhysicalDevices_ } { } VULKAN_HPP_CONSTEXPR DeviceGroupDeviceCreateInfo( DeviceGroupDeviceCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; DeviceGroupDeviceCreateInfo( VkDeviceGroupDeviceCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT : DeviceGroupDeviceCreateInfo( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) DeviceGroupDeviceCreateInfo( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & physicalDevices_, const void * pNext_ = nullptr ) : pNext( pNext_ ), physicalDeviceCount( static_cast( physicalDevices_.size() ) ), pPhysicalDevices( physicalDevices_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ DeviceGroupDeviceCreateInfo & operator=( DeviceGroupDeviceCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DeviceGroupDeviceCreateInfo & operator=( VkDeviceGroupDeviceCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 DeviceGroupDeviceCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 DeviceGroupDeviceCreateInfo & setPhysicalDeviceCount( uint32_t physicalDeviceCount_ ) VULKAN_HPP_NOEXCEPT { physicalDeviceCount = physicalDeviceCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 DeviceGroupDeviceCreateInfo & setPPhysicalDevices( const VULKAN_HPP_NAMESPACE::PhysicalDevice * pPhysicalDevices_ ) VULKAN_HPP_NOEXCEPT { pPhysicalDevices = pPhysicalDevices_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) DeviceGroupDeviceCreateInfo & setPhysicalDevices( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & physicalDevices_ ) VULKAN_HPP_NOEXCEPT { physicalDeviceCount = static_cast( physicalDevices_.size() ); pPhysicalDevices = physicalDevices_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkDeviceGroupDeviceCreateInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDeviceGroupDeviceCreateInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, physicalDeviceCount, pPhysicalDevices ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( DeviceGroupDeviceCreateInfo const & ) const = default; #else bool operator==( DeviceGroupDeviceCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( physicalDeviceCount == rhs.physicalDeviceCount ) && ( pPhysicalDevices == rhs.pPhysicalDevices ); # endif } bool operator!=( DeviceGroupDeviceCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDeviceGroupDeviceCreateInfo; const void * pNext = {}; uint32_t physicalDeviceCount = {}; const VULKAN_HPP_NAMESPACE::PhysicalDevice * pPhysicalDevices = {}; }; template <> struct CppType { using Type = DeviceGroupDeviceCreateInfo; }; using DeviceGroupDeviceCreateInfoKHR = DeviceGroupDeviceCreateInfo; struct DeviceGroupPresentCapabilitiesKHR { using NativeType = VkDeviceGroupPresentCapabilitiesKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDeviceGroupPresentCapabilitiesKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 DeviceGroupPresentCapabilitiesKHR( std::array const & presentMask_ = {}, VULKAN_HPP_NAMESPACE::DeviceGroupPresentModeFlagsKHR modes_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , presentMask{ presentMask_ } , modes{ modes_ } { } VULKAN_HPP_CONSTEXPR_14 DeviceGroupPresentCapabilitiesKHR( DeviceGroupPresentCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; DeviceGroupPresentCapabilitiesKHR( VkDeviceGroupPresentCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT : DeviceGroupPresentCapabilitiesKHR( *reinterpret_cast( &rhs ) ) { } DeviceGroupPresentCapabilitiesKHR & operator=( DeviceGroupPresentCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DeviceGroupPresentCapabilitiesKHR & operator=( VkDeviceGroupPresentCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkDeviceGroupPresentCapabilitiesKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDeviceGroupPresentCapabilitiesKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple const &, VULKAN_HPP_NAMESPACE::DeviceGroupPresentModeFlagsKHR const &> # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, presentMask, modes ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( DeviceGroupPresentCapabilitiesKHR const & ) const = default; #else bool operator==( DeviceGroupPresentCapabilitiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( presentMask == rhs.presentMask ) && ( modes == rhs.modes ); # endif } bool operator!=( DeviceGroupPresentCapabilitiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDeviceGroupPresentCapabilitiesKHR; void * pNext = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D presentMask = {}; VULKAN_HPP_NAMESPACE::DeviceGroupPresentModeFlagsKHR modes = {}; }; template <> struct CppType { using Type = DeviceGroupPresentCapabilitiesKHR; }; struct DeviceGroupPresentInfoKHR { using NativeType = VkDeviceGroupPresentInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDeviceGroupPresentInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR DeviceGroupPresentInfoKHR( uint32_t swapchainCount_ = {}, const uint32_t * pDeviceMasks_ = {}, VULKAN_HPP_NAMESPACE::DeviceGroupPresentModeFlagBitsKHR mode_ = VULKAN_HPP_NAMESPACE::DeviceGroupPresentModeFlagBitsKHR::eLocal, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , swapchainCount{ swapchainCount_ } , pDeviceMasks{ pDeviceMasks_ } , mode{ mode_ } { } VULKAN_HPP_CONSTEXPR DeviceGroupPresentInfoKHR( DeviceGroupPresentInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; DeviceGroupPresentInfoKHR( VkDeviceGroupPresentInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : DeviceGroupPresentInfoKHR( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) DeviceGroupPresentInfoKHR( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & deviceMasks_, VULKAN_HPP_NAMESPACE::DeviceGroupPresentModeFlagBitsKHR mode_ = VULKAN_HPP_NAMESPACE::DeviceGroupPresentModeFlagBitsKHR::eLocal, const void * pNext_ = nullptr ) : pNext( pNext_ ), swapchainCount( static_cast( deviceMasks_.size() ) ), pDeviceMasks( deviceMasks_.data() ), mode( mode_ ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ DeviceGroupPresentInfoKHR & operator=( DeviceGroupPresentInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DeviceGroupPresentInfoKHR & operator=( VkDeviceGroupPresentInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 DeviceGroupPresentInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 DeviceGroupPresentInfoKHR & setSwapchainCount( uint32_t swapchainCount_ ) VULKAN_HPP_NOEXCEPT { swapchainCount = swapchainCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 DeviceGroupPresentInfoKHR & setPDeviceMasks( const uint32_t * pDeviceMasks_ ) VULKAN_HPP_NOEXCEPT { pDeviceMasks = pDeviceMasks_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) DeviceGroupPresentInfoKHR & setDeviceMasks( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & deviceMasks_ ) VULKAN_HPP_NOEXCEPT { swapchainCount = static_cast( deviceMasks_.size() ); pDeviceMasks = deviceMasks_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 DeviceGroupPresentInfoKHR & setMode( VULKAN_HPP_NAMESPACE::DeviceGroupPresentModeFlagBitsKHR mode_ ) VULKAN_HPP_NOEXCEPT { mode = mode_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkDeviceGroupPresentInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDeviceGroupPresentInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, swapchainCount, pDeviceMasks, mode ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( DeviceGroupPresentInfoKHR const & ) const = default; #else bool operator==( DeviceGroupPresentInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( swapchainCount == rhs.swapchainCount ) && ( pDeviceMasks == rhs.pDeviceMasks ) && ( mode == rhs.mode ); # endif } bool operator!=( DeviceGroupPresentInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDeviceGroupPresentInfoKHR; const void * pNext = {}; uint32_t swapchainCount = {}; const uint32_t * pDeviceMasks = {}; VULKAN_HPP_NAMESPACE::DeviceGroupPresentModeFlagBitsKHR mode = VULKAN_HPP_NAMESPACE::DeviceGroupPresentModeFlagBitsKHR::eLocal; }; template <> struct CppType { using Type = DeviceGroupPresentInfoKHR; }; struct DeviceGroupRenderPassBeginInfo { using NativeType = VkDeviceGroupRenderPassBeginInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDeviceGroupRenderPassBeginInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR DeviceGroupRenderPassBeginInfo( uint32_t deviceMask_ = {}, uint32_t deviceRenderAreaCount_ = {}, const VULKAN_HPP_NAMESPACE::Rect2D * pDeviceRenderAreas_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , deviceMask{ deviceMask_ } , deviceRenderAreaCount{ deviceRenderAreaCount_ } , pDeviceRenderAreas{ pDeviceRenderAreas_ } { } VULKAN_HPP_CONSTEXPR DeviceGroupRenderPassBeginInfo( DeviceGroupRenderPassBeginInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; DeviceGroupRenderPassBeginInfo( VkDeviceGroupRenderPassBeginInfo const & rhs ) VULKAN_HPP_NOEXCEPT : DeviceGroupRenderPassBeginInfo( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) DeviceGroupRenderPassBeginInfo( uint32_t deviceMask_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & deviceRenderAreas_, const void * pNext_ = nullptr ) : pNext( pNext_ ) , deviceMask( deviceMask_ ) , deviceRenderAreaCount( static_cast( deviceRenderAreas_.size() ) ) , pDeviceRenderAreas( deviceRenderAreas_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ DeviceGroupRenderPassBeginInfo & operator=( DeviceGroupRenderPassBeginInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DeviceGroupRenderPassBeginInfo & operator=( VkDeviceGroupRenderPassBeginInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 DeviceGroupRenderPassBeginInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 DeviceGroupRenderPassBeginInfo & setDeviceMask( uint32_t deviceMask_ ) VULKAN_HPP_NOEXCEPT { deviceMask = deviceMask_; return *this; } VULKAN_HPP_CONSTEXPR_14 DeviceGroupRenderPassBeginInfo & setDeviceRenderAreaCount( uint32_t deviceRenderAreaCount_ ) VULKAN_HPP_NOEXCEPT { deviceRenderAreaCount = deviceRenderAreaCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 DeviceGroupRenderPassBeginInfo & setPDeviceRenderAreas( const VULKAN_HPP_NAMESPACE::Rect2D * pDeviceRenderAreas_ ) VULKAN_HPP_NOEXCEPT { pDeviceRenderAreas = pDeviceRenderAreas_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) DeviceGroupRenderPassBeginInfo & setDeviceRenderAreas( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & deviceRenderAreas_ ) VULKAN_HPP_NOEXCEPT { deviceRenderAreaCount = static_cast( deviceRenderAreas_.size() ); pDeviceRenderAreas = deviceRenderAreas_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkDeviceGroupRenderPassBeginInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDeviceGroupRenderPassBeginInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std:: tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, deviceMask, deviceRenderAreaCount, pDeviceRenderAreas ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( DeviceGroupRenderPassBeginInfo const & ) const = default; #else bool operator==( DeviceGroupRenderPassBeginInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( deviceMask == rhs.deviceMask ) && ( deviceRenderAreaCount == rhs.deviceRenderAreaCount ) && ( pDeviceRenderAreas == rhs.pDeviceRenderAreas ); # endif } bool operator!=( DeviceGroupRenderPassBeginInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDeviceGroupRenderPassBeginInfo; const void * pNext = {}; uint32_t deviceMask = {}; uint32_t deviceRenderAreaCount = {}; const VULKAN_HPP_NAMESPACE::Rect2D * pDeviceRenderAreas = {}; }; template <> struct CppType { using Type = DeviceGroupRenderPassBeginInfo; }; using DeviceGroupRenderPassBeginInfoKHR = DeviceGroupRenderPassBeginInfo; struct DeviceGroupSubmitInfo { using NativeType = VkDeviceGroupSubmitInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDeviceGroupSubmitInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR DeviceGroupSubmitInfo( uint32_t waitSemaphoreCount_ = {}, const uint32_t * pWaitSemaphoreDeviceIndices_ = {}, uint32_t commandBufferCount_ = {}, const uint32_t * pCommandBufferDeviceMasks_ = {}, uint32_t signalSemaphoreCount_ = {}, const uint32_t * pSignalSemaphoreDeviceIndices_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , waitSemaphoreCount{ waitSemaphoreCount_ } , pWaitSemaphoreDeviceIndices{ pWaitSemaphoreDeviceIndices_ } , commandBufferCount{ commandBufferCount_ } , pCommandBufferDeviceMasks{ pCommandBufferDeviceMasks_ } , signalSemaphoreCount{ signalSemaphoreCount_ } , pSignalSemaphoreDeviceIndices{ pSignalSemaphoreDeviceIndices_ } { } VULKAN_HPP_CONSTEXPR DeviceGroupSubmitInfo( DeviceGroupSubmitInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; DeviceGroupSubmitInfo( VkDeviceGroupSubmitInfo const & rhs ) VULKAN_HPP_NOEXCEPT : DeviceGroupSubmitInfo( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) DeviceGroupSubmitInfo( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & waitSemaphoreDeviceIndices_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & commandBufferDeviceMasks_ = {}, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & signalSemaphoreDeviceIndices_ = {}, const void * pNext_ = nullptr ) : pNext( pNext_ ) , waitSemaphoreCount( static_cast( waitSemaphoreDeviceIndices_.size() ) ) , pWaitSemaphoreDeviceIndices( waitSemaphoreDeviceIndices_.data() ) , commandBufferCount( static_cast( commandBufferDeviceMasks_.size() ) ) , pCommandBufferDeviceMasks( commandBufferDeviceMasks_.data() ) , signalSemaphoreCount( static_cast( signalSemaphoreDeviceIndices_.size() ) ) , pSignalSemaphoreDeviceIndices( signalSemaphoreDeviceIndices_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ DeviceGroupSubmitInfo & operator=( DeviceGroupSubmitInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DeviceGroupSubmitInfo & operator=( VkDeviceGroupSubmitInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 DeviceGroupSubmitInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 DeviceGroupSubmitInfo & setWaitSemaphoreCount( uint32_t waitSemaphoreCount_ ) VULKAN_HPP_NOEXCEPT { waitSemaphoreCount = waitSemaphoreCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 DeviceGroupSubmitInfo & setPWaitSemaphoreDeviceIndices( const uint32_t * pWaitSemaphoreDeviceIndices_ ) VULKAN_HPP_NOEXCEPT { pWaitSemaphoreDeviceIndices = pWaitSemaphoreDeviceIndices_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) DeviceGroupSubmitInfo & setWaitSemaphoreDeviceIndices( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & waitSemaphoreDeviceIndices_ ) VULKAN_HPP_NOEXCEPT { waitSemaphoreCount = static_cast( waitSemaphoreDeviceIndices_.size() ); pWaitSemaphoreDeviceIndices = waitSemaphoreDeviceIndices_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 DeviceGroupSubmitInfo & setCommandBufferCount( uint32_t commandBufferCount_ ) VULKAN_HPP_NOEXCEPT { commandBufferCount = commandBufferCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 DeviceGroupSubmitInfo & setPCommandBufferDeviceMasks( const uint32_t * pCommandBufferDeviceMasks_ ) VULKAN_HPP_NOEXCEPT { pCommandBufferDeviceMasks = pCommandBufferDeviceMasks_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) DeviceGroupSubmitInfo & setCommandBufferDeviceMasks( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & commandBufferDeviceMasks_ ) VULKAN_HPP_NOEXCEPT { commandBufferCount = static_cast( commandBufferDeviceMasks_.size() ); pCommandBufferDeviceMasks = commandBufferDeviceMasks_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 DeviceGroupSubmitInfo & setSignalSemaphoreCount( uint32_t signalSemaphoreCount_ ) VULKAN_HPP_NOEXCEPT { signalSemaphoreCount = signalSemaphoreCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 DeviceGroupSubmitInfo & setPSignalSemaphoreDeviceIndices( const uint32_t * pSignalSemaphoreDeviceIndices_ ) VULKAN_HPP_NOEXCEPT { pSignalSemaphoreDeviceIndices = pSignalSemaphoreDeviceIndices_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) DeviceGroupSubmitInfo & setSignalSemaphoreDeviceIndices( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & signalSemaphoreDeviceIndices_ ) VULKAN_HPP_NOEXCEPT { signalSemaphoreCount = static_cast( signalSemaphoreDeviceIndices_.size() ); pSignalSemaphoreDeviceIndices = signalSemaphoreDeviceIndices_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkDeviceGroupSubmitInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDeviceGroupSubmitInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, waitSemaphoreCount, pWaitSemaphoreDeviceIndices, commandBufferCount, pCommandBufferDeviceMasks, signalSemaphoreCount, pSignalSemaphoreDeviceIndices ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( DeviceGroupSubmitInfo const & ) const = default; #else bool operator==( DeviceGroupSubmitInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( waitSemaphoreCount == rhs.waitSemaphoreCount ) && ( pWaitSemaphoreDeviceIndices == rhs.pWaitSemaphoreDeviceIndices ) && ( commandBufferCount == rhs.commandBufferCount ) && ( pCommandBufferDeviceMasks == rhs.pCommandBufferDeviceMasks ) && ( signalSemaphoreCount == rhs.signalSemaphoreCount ) && ( pSignalSemaphoreDeviceIndices == rhs.pSignalSemaphoreDeviceIndices ); # endif } bool operator!=( DeviceGroupSubmitInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDeviceGroupSubmitInfo; const void * pNext = {}; uint32_t waitSemaphoreCount = {}; const uint32_t * pWaitSemaphoreDeviceIndices = {}; uint32_t commandBufferCount = {}; const uint32_t * pCommandBufferDeviceMasks = {}; uint32_t signalSemaphoreCount = {}; const uint32_t * pSignalSemaphoreDeviceIndices = {}; }; template <> struct CppType { using Type = DeviceGroupSubmitInfo; }; using DeviceGroupSubmitInfoKHR = DeviceGroupSubmitInfo; struct DeviceGroupSwapchainCreateInfoKHR { using NativeType = VkDeviceGroupSwapchainCreateInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDeviceGroupSwapchainCreateInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR DeviceGroupSwapchainCreateInfoKHR( VULKAN_HPP_NAMESPACE::DeviceGroupPresentModeFlagsKHR modes_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , modes{ modes_ } { } VULKAN_HPP_CONSTEXPR DeviceGroupSwapchainCreateInfoKHR( DeviceGroupSwapchainCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; DeviceGroupSwapchainCreateInfoKHR( VkDeviceGroupSwapchainCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : DeviceGroupSwapchainCreateInfoKHR( *reinterpret_cast( &rhs ) ) { } DeviceGroupSwapchainCreateInfoKHR & operator=( DeviceGroupSwapchainCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DeviceGroupSwapchainCreateInfoKHR & operator=( VkDeviceGroupSwapchainCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 DeviceGroupSwapchainCreateInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 DeviceGroupSwapchainCreateInfoKHR & setModes( VULKAN_HPP_NAMESPACE::DeviceGroupPresentModeFlagsKHR modes_ ) VULKAN_HPP_NOEXCEPT { modes = modes_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkDeviceGroupSwapchainCreateInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDeviceGroupSwapchainCreateInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, modes ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( DeviceGroupSwapchainCreateInfoKHR const & ) const = default; #else bool operator==( DeviceGroupSwapchainCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( modes == rhs.modes ); # endif } bool operator!=( DeviceGroupSwapchainCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDeviceGroupSwapchainCreateInfoKHR; const void * pNext = {}; VULKAN_HPP_NAMESPACE::DeviceGroupPresentModeFlagsKHR modes = {}; }; template <> struct CppType { using Type = DeviceGroupSwapchainCreateInfoKHR; }; struct ImageCreateInfo { using NativeType = VkImageCreateInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImageCreateInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ImageCreateInfo( VULKAN_HPP_NAMESPACE::ImageCreateFlags flags_ = {}, VULKAN_HPP_NAMESPACE::ImageType imageType_ = VULKAN_HPP_NAMESPACE::ImageType::e1D, VULKAN_HPP_NAMESPACE::Format format_ = VULKAN_HPP_NAMESPACE::Format::eUndefined, VULKAN_HPP_NAMESPACE::Extent3D extent_ = {}, uint32_t mipLevels_ = {}, uint32_t arrayLayers_ = {}, VULKAN_HPP_NAMESPACE::SampleCountFlagBits samples_ = VULKAN_HPP_NAMESPACE::SampleCountFlagBits::e1, VULKAN_HPP_NAMESPACE::ImageTiling tiling_ = VULKAN_HPP_NAMESPACE::ImageTiling::eOptimal, VULKAN_HPP_NAMESPACE::ImageUsageFlags usage_ = {}, VULKAN_HPP_NAMESPACE::SharingMode sharingMode_ = VULKAN_HPP_NAMESPACE::SharingMode::eExclusive, uint32_t queueFamilyIndexCount_ = {}, const uint32_t * pQueueFamilyIndices_ = {}, VULKAN_HPP_NAMESPACE::ImageLayout initialLayout_ = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , imageType{ imageType_ } , format{ format_ } , extent{ extent_ } , mipLevels{ mipLevels_ } , arrayLayers{ arrayLayers_ } , samples{ samples_ } , tiling{ tiling_ } , usage{ usage_ } , sharingMode{ sharingMode_ } , queueFamilyIndexCount{ queueFamilyIndexCount_ } , pQueueFamilyIndices{ pQueueFamilyIndices_ } , initialLayout{ initialLayout_ } { } VULKAN_HPP_CONSTEXPR ImageCreateInfo( ImageCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; ImageCreateInfo( VkImageCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT : ImageCreateInfo( *reinterpret_cast( &rhs ) ) {} # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) ImageCreateInfo( VULKAN_HPP_NAMESPACE::ImageCreateFlags flags_, VULKAN_HPP_NAMESPACE::ImageType imageType_, VULKAN_HPP_NAMESPACE::Format format_, VULKAN_HPP_NAMESPACE::Extent3D extent_, uint32_t mipLevels_, uint32_t arrayLayers_, VULKAN_HPP_NAMESPACE::SampleCountFlagBits samples_, VULKAN_HPP_NAMESPACE::ImageTiling tiling_, VULKAN_HPP_NAMESPACE::ImageUsageFlags usage_, VULKAN_HPP_NAMESPACE::SharingMode sharingMode_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & queueFamilyIndices_, VULKAN_HPP_NAMESPACE::ImageLayout initialLayout_ = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined, const void * pNext_ = nullptr ) : pNext( pNext_ ) , flags( flags_ ) , imageType( imageType_ ) , format( format_ ) , extent( extent_ ) , mipLevels( mipLevels_ ) , arrayLayers( arrayLayers_ ) , samples( samples_ ) , tiling( tiling_ ) , usage( usage_ ) , sharingMode( sharingMode_ ) , queueFamilyIndexCount( static_cast( queueFamilyIndices_.size() ) ) , pQueueFamilyIndices( queueFamilyIndices_.data() ) , initialLayout( initialLayout_ ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ ImageCreateInfo & operator=( ImageCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ImageCreateInfo & operator=( VkImageCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ImageCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::ImageCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageCreateInfo & setImageType( VULKAN_HPP_NAMESPACE::ImageType imageType_ ) VULKAN_HPP_NOEXCEPT { imageType = imageType_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageCreateInfo & setFormat( VULKAN_HPP_NAMESPACE::Format format_ ) VULKAN_HPP_NOEXCEPT { format = format_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageCreateInfo & setExtent( VULKAN_HPP_NAMESPACE::Extent3D const & extent_ ) VULKAN_HPP_NOEXCEPT { extent = extent_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageCreateInfo & setMipLevels( uint32_t mipLevels_ ) VULKAN_HPP_NOEXCEPT { mipLevels = mipLevels_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageCreateInfo & setArrayLayers( uint32_t arrayLayers_ ) VULKAN_HPP_NOEXCEPT { arrayLayers = arrayLayers_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageCreateInfo & setSamples( VULKAN_HPP_NAMESPACE::SampleCountFlagBits samples_ ) VULKAN_HPP_NOEXCEPT { samples = samples_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageCreateInfo & setTiling( VULKAN_HPP_NAMESPACE::ImageTiling tiling_ ) VULKAN_HPP_NOEXCEPT { tiling = tiling_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageCreateInfo & setUsage( VULKAN_HPP_NAMESPACE::ImageUsageFlags usage_ ) VULKAN_HPP_NOEXCEPT { usage = usage_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageCreateInfo & setSharingMode( VULKAN_HPP_NAMESPACE::SharingMode sharingMode_ ) VULKAN_HPP_NOEXCEPT { sharingMode = sharingMode_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageCreateInfo & setQueueFamilyIndexCount( uint32_t queueFamilyIndexCount_ ) VULKAN_HPP_NOEXCEPT { queueFamilyIndexCount = queueFamilyIndexCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageCreateInfo & setPQueueFamilyIndices( const uint32_t * pQueueFamilyIndices_ ) VULKAN_HPP_NOEXCEPT { pQueueFamilyIndices = pQueueFamilyIndices_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) ImageCreateInfo & setQueueFamilyIndices( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & queueFamilyIndices_ ) VULKAN_HPP_NOEXCEPT { queueFamilyIndexCount = static_cast( queueFamilyIndices_.size() ); pQueueFamilyIndices = queueFamilyIndices_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 ImageCreateInfo & setInitialLayout( VULKAN_HPP_NAMESPACE::ImageLayout initialLayout_ ) VULKAN_HPP_NOEXCEPT { initialLayout = initialLayout_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkImageCreateInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkImageCreateInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, imageType, format, extent, mipLevels, arrayLayers, samples, tiling, usage, sharingMode, queueFamilyIndexCount, pQueueFamilyIndices, initialLayout ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ImageCreateInfo const & ) const = default; #else bool operator==( ImageCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( imageType == rhs.imageType ) && ( format == rhs.format ) && ( extent == rhs.extent ) && ( mipLevels == rhs.mipLevels ) && ( arrayLayers == rhs.arrayLayers ) && ( samples == rhs.samples ) && ( tiling == rhs.tiling ) && ( usage == rhs.usage ) && ( sharingMode == rhs.sharingMode ) && ( queueFamilyIndexCount == rhs.queueFamilyIndexCount ) && ( pQueueFamilyIndices == rhs.pQueueFamilyIndices ) && ( initialLayout == rhs.initialLayout ); # endif } bool operator!=( ImageCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImageCreateInfo; const void * pNext = {}; VULKAN_HPP_NAMESPACE::ImageCreateFlags flags = {}; VULKAN_HPP_NAMESPACE::ImageType imageType = VULKAN_HPP_NAMESPACE::ImageType::e1D; VULKAN_HPP_NAMESPACE::Format format = VULKAN_HPP_NAMESPACE::Format::eUndefined; VULKAN_HPP_NAMESPACE::Extent3D extent = {}; uint32_t mipLevels = {}; uint32_t arrayLayers = {}; VULKAN_HPP_NAMESPACE::SampleCountFlagBits samples = VULKAN_HPP_NAMESPACE::SampleCountFlagBits::e1; VULKAN_HPP_NAMESPACE::ImageTiling tiling = VULKAN_HPP_NAMESPACE::ImageTiling::eOptimal; VULKAN_HPP_NAMESPACE::ImageUsageFlags usage = {}; VULKAN_HPP_NAMESPACE::SharingMode sharingMode = VULKAN_HPP_NAMESPACE::SharingMode::eExclusive; uint32_t queueFamilyIndexCount = {}; const uint32_t * pQueueFamilyIndices = {}; VULKAN_HPP_NAMESPACE::ImageLayout initialLayout = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined; }; template <> struct CppType { using Type = ImageCreateInfo; }; struct DeviceImageMemoryRequirements { using NativeType = VkDeviceImageMemoryRequirements; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDeviceImageMemoryRequirements; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR DeviceImageMemoryRequirements( const VULKAN_HPP_NAMESPACE::ImageCreateInfo * pCreateInfo_ = {}, VULKAN_HPP_NAMESPACE::ImageAspectFlagBits planeAspect_ = VULKAN_HPP_NAMESPACE::ImageAspectFlagBits::eColor, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , pCreateInfo{ pCreateInfo_ } , planeAspect{ planeAspect_ } { } VULKAN_HPP_CONSTEXPR DeviceImageMemoryRequirements( DeviceImageMemoryRequirements const & rhs ) VULKAN_HPP_NOEXCEPT = default; DeviceImageMemoryRequirements( VkDeviceImageMemoryRequirements const & rhs ) VULKAN_HPP_NOEXCEPT : DeviceImageMemoryRequirements( *reinterpret_cast( &rhs ) ) { } DeviceImageMemoryRequirements & operator=( DeviceImageMemoryRequirements const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DeviceImageMemoryRequirements & operator=( VkDeviceImageMemoryRequirements const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 DeviceImageMemoryRequirements & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 DeviceImageMemoryRequirements & setPCreateInfo( const VULKAN_HPP_NAMESPACE::ImageCreateInfo * pCreateInfo_ ) VULKAN_HPP_NOEXCEPT { pCreateInfo = pCreateInfo_; return *this; } VULKAN_HPP_CONSTEXPR_14 DeviceImageMemoryRequirements & setPlaneAspect( VULKAN_HPP_NAMESPACE::ImageAspectFlagBits planeAspect_ ) VULKAN_HPP_NOEXCEPT { planeAspect = planeAspect_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkDeviceImageMemoryRequirements const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDeviceImageMemoryRequirements &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, pCreateInfo, planeAspect ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( DeviceImageMemoryRequirements const & ) const = default; #else bool operator==( DeviceImageMemoryRequirements const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( pCreateInfo == rhs.pCreateInfo ) && ( planeAspect == rhs.planeAspect ); # endif } bool operator!=( DeviceImageMemoryRequirements const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDeviceImageMemoryRequirements; const void * pNext = {}; const VULKAN_HPP_NAMESPACE::ImageCreateInfo * pCreateInfo = {}; VULKAN_HPP_NAMESPACE::ImageAspectFlagBits planeAspect = VULKAN_HPP_NAMESPACE::ImageAspectFlagBits::eColor; }; template <> struct CppType { using Type = DeviceImageMemoryRequirements; }; using DeviceImageMemoryRequirementsKHR = DeviceImageMemoryRequirements; struct ImageSubresource2 { using NativeType = VkImageSubresource2; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImageSubresource2; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ImageSubresource2( VULKAN_HPP_NAMESPACE::ImageSubresource imageSubresource_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , imageSubresource{ imageSubresource_ } { } VULKAN_HPP_CONSTEXPR ImageSubresource2( ImageSubresource2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; ImageSubresource2( VkImageSubresource2 const & rhs ) VULKAN_HPP_NOEXCEPT : ImageSubresource2( *reinterpret_cast( &rhs ) ) {} ImageSubresource2 & operator=( ImageSubresource2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ImageSubresource2 & operator=( VkImageSubresource2 const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ImageSubresource2 & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageSubresource2 & setImageSubresource( VULKAN_HPP_NAMESPACE::ImageSubresource const & imageSubresource_ ) VULKAN_HPP_NOEXCEPT { imageSubresource = imageSubresource_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkImageSubresource2 const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkImageSubresource2 &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, imageSubresource ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ImageSubresource2 const & ) const = default; #else bool operator==( ImageSubresource2 const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( imageSubresource == rhs.imageSubresource ); # endif } bool operator!=( ImageSubresource2 const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImageSubresource2; void * pNext = {}; VULKAN_HPP_NAMESPACE::ImageSubresource imageSubresource = {}; }; template <> struct CppType { using Type = ImageSubresource2; }; using ImageSubresource2EXT = ImageSubresource2; using ImageSubresource2KHR = ImageSubresource2; struct DeviceImageSubresourceInfo { using NativeType = VkDeviceImageSubresourceInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDeviceImageSubresourceInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR DeviceImageSubresourceInfo( const VULKAN_HPP_NAMESPACE::ImageCreateInfo * pCreateInfo_ = {}, const VULKAN_HPP_NAMESPACE::ImageSubresource2 * pSubresource_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , pCreateInfo{ pCreateInfo_ } , pSubresource{ pSubresource_ } { } VULKAN_HPP_CONSTEXPR DeviceImageSubresourceInfo( DeviceImageSubresourceInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; DeviceImageSubresourceInfo( VkDeviceImageSubresourceInfo const & rhs ) VULKAN_HPP_NOEXCEPT : DeviceImageSubresourceInfo( *reinterpret_cast( &rhs ) ) { } DeviceImageSubresourceInfo & operator=( DeviceImageSubresourceInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DeviceImageSubresourceInfo & operator=( VkDeviceImageSubresourceInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 DeviceImageSubresourceInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 DeviceImageSubresourceInfo & setPCreateInfo( const VULKAN_HPP_NAMESPACE::ImageCreateInfo * pCreateInfo_ ) VULKAN_HPP_NOEXCEPT { pCreateInfo = pCreateInfo_; return *this; } VULKAN_HPP_CONSTEXPR_14 DeviceImageSubresourceInfo & setPSubresource( const VULKAN_HPP_NAMESPACE::ImageSubresource2 * pSubresource_ ) VULKAN_HPP_NOEXCEPT { pSubresource = pSubresource_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkDeviceImageSubresourceInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDeviceImageSubresourceInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, pCreateInfo, pSubresource ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( DeviceImageSubresourceInfo const & ) const = default; #else bool operator==( DeviceImageSubresourceInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( pCreateInfo == rhs.pCreateInfo ) && ( pSubresource == rhs.pSubresource ); # endif } bool operator!=( DeviceImageSubresourceInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDeviceImageSubresourceInfo; const void * pNext = {}; const VULKAN_HPP_NAMESPACE::ImageCreateInfo * pCreateInfo = {}; const VULKAN_HPP_NAMESPACE::ImageSubresource2 * pSubresource = {}; }; template <> struct CppType { using Type = DeviceImageSubresourceInfo; }; using DeviceImageSubresourceInfoKHR = DeviceImageSubresourceInfo; struct DeviceMemoryOpaqueCaptureAddressInfo { using NativeType = VkDeviceMemoryOpaqueCaptureAddressInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDeviceMemoryOpaqueCaptureAddressInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR DeviceMemoryOpaqueCaptureAddressInfo( VULKAN_HPP_NAMESPACE::DeviceMemory memory_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , memory{ memory_ } { } VULKAN_HPP_CONSTEXPR DeviceMemoryOpaqueCaptureAddressInfo( DeviceMemoryOpaqueCaptureAddressInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; DeviceMemoryOpaqueCaptureAddressInfo( VkDeviceMemoryOpaqueCaptureAddressInfo const & rhs ) VULKAN_HPP_NOEXCEPT : DeviceMemoryOpaqueCaptureAddressInfo( *reinterpret_cast( &rhs ) ) { } DeviceMemoryOpaqueCaptureAddressInfo & operator=( DeviceMemoryOpaqueCaptureAddressInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DeviceMemoryOpaqueCaptureAddressInfo & operator=( VkDeviceMemoryOpaqueCaptureAddressInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 DeviceMemoryOpaqueCaptureAddressInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 DeviceMemoryOpaqueCaptureAddressInfo & setMemory( VULKAN_HPP_NAMESPACE::DeviceMemory memory_ ) VULKAN_HPP_NOEXCEPT { memory = memory_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkDeviceMemoryOpaqueCaptureAddressInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDeviceMemoryOpaqueCaptureAddressInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, memory ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( DeviceMemoryOpaqueCaptureAddressInfo const & ) const = default; #else bool operator==( DeviceMemoryOpaqueCaptureAddressInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( memory == rhs.memory ); # endif } bool operator!=( DeviceMemoryOpaqueCaptureAddressInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDeviceMemoryOpaqueCaptureAddressInfo; const void * pNext = {}; VULKAN_HPP_NAMESPACE::DeviceMemory memory = {}; }; template <> struct CppType { using Type = DeviceMemoryOpaqueCaptureAddressInfo; }; using DeviceMemoryOpaqueCaptureAddressInfoKHR = DeviceMemoryOpaqueCaptureAddressInfo; struct DeviceMemoryOverallocationCreateInfoAMD { using NativeType = VkDeviceMemoryOverallocationCreateInfoAMD; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDeviceMemoryOverallocationCreateInfoAMD; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR DeviceMemoryOverallocationCreateInfoAMD( VULKAN_HPP_NAMESPACE::MemoryOverallocationBehaviorAMD overallocationBehavior_ = VULKAN_HPP_NAMESPACE::MemoryOverallocationBehaviorAMD::eDefault, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , overallocationBehavior{ overallocationBehavior_ } { } VULKAN_HPP_CONSTEXPR DeviceMemoryOverallocationCreateInfoAMD( DeviceMemoryOverallocationCreateInfoAMD const & rhs ) VULKAN_HPP_NOEXCEPT = default; DeviceMemoryOverallocationCreateInfoAMD( VkDeviceMemoryOverallocationCreateInfoAMD const & rhs ) VULKAN_HPP_NOEXCEPT : DeviceMemoryOverallocationCreateInfoAMD( *reinterpret_cast( &rhs ) ) { } DeviceMemoryOverallocationCreateInfoAMD & operator=( DeviceMemoryOverallocationCreateInfoAMD const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DeviceMemoryOverallocationCreateInfoAMD & operator=( VkDeviceMemoryOverallocationCreateInfoAMD const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 DeviceMemoryOverallocationCreateInfoAMD & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 DeviceMemoryOverallocationCreateInfoAMD & setOverallocationBehavior( VULKAN_HPP_NAMESPACE::MemoryOverallocationBehaviorAMD overallocationBehavior_ ) VULKAN_HPP_NOEXCEPT { overallocationBehavior = overallocationBehavior_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkDeviceMemoryOverallocationCreateInfoAMD const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDeviceMemoryOverallocationCreateInfoAMD &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, overallocationBehavior ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( DeviceMemoryOverallocationCreateInfoAMD const & ) const = default; #else bool operator==( DeviceMemoryOverallocationCreateInfoAMD const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( overallocationBehavior == rhs.overallocationBehavior ); # endif } bool operator!=( DeviceMemoryOverallocationCreateInfoAMD const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDeviceMemoryOverallocationCreateInfoAMD; const void * pNext = {}; VULKAN_HPP_NAMESPACE::MemoryOverallocationBehaviorAMD overallocationBehavior = VULKAN_HPP_NAMESPACE::MemoryOverallocationBehaviorAMD::eDefault; }; template <> struct CppType { using Type = DeviceMemoryOverallocationCreateInfoAMD; }; #if defined( VK_ENABLE_BETA_EXTENSIONS ) union DeviceOrHostAddressConstAMDX { using NativeType = VkDeviceOrHostAddressConstAMDX; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_UNION_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 DeviceOrHostAddressConstAMDX( VULKAN_HPP_NAMESPACE::DeviceAddress deviceAddress_ = {} ) : deviceAddress( deviceAddress_ ) {} VULKAN_HPP_CONSTEXPR_14 DeviceOrHostAddressConstAMDX( const void * hostAddress_ ) : hostAddress( hostAddress_ ) {} # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ # if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_UNION_SETTERS ) VULKAN_HPP_CONSTEXPR_14 DeviceOrHostAddressConstAMDX & setDeviceAddress( VULKAN_HPP_NAMESPACE::DeviceAddress deviceAddress_ ) VULKAN_HPP_NOEXCEPT { deviceAddress = deviceAddress_; return *this; } VULKAN_HPP_CONSTEXPR_14 DeviceOrHostAddressConstAMDX & setHostAddress( const void * hostAddress_ ) VULKAN_HPP_NOEXCEPT { hostAddress = hostAddress_; return *this; } # endif /*VULKAN_HPP_NO_SETTERS*/ operator VkDeviceOrHostAddressConstAMDX const &() const { return *reinterpret_cast( this ); } operator VkDeviceOrHostAddressConstAMDX &() { return *reinterpret_cast( this ); } # ifdef VULKAN_HPP_HAS_UNRESTRICTED_UNIONS VULKAN_HPP_NAMESPACE::DeviceAddress deviceAddress; const void * hostAddress; # else VkDeviceAddress deviceAddress; const void * hostAddress; # endif /*VULKAN_HPP_HAS_UNRESTRICTED_UNIONS*/ }; #endif /*VK_ENABLE_BETA_EXTENSIONS*/ struct DevicePipelineBinaryInternalCacheControlKHR { using NativeType = VkDevicePipelineBinaryInternalCacheControlKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDevicePipelineBinaryInternalCacheControlKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR DevicePipelineBinaryInternalCacheControlKHR( VULKAN_HPP_NAMESPACE::Bool32 disableInternalCache_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , disableInternalCache{ disableInternalCache_ } { } VULKAN_HPP_CONSTEXPR DevicePipelineBinaryInternalCacheControlKHR( DevicePipelineBinaryInternalCacheControlKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; DevicePipelineBinaryInternalCacheControlKHR( VkDevicePipelineBinaryInternalCacheControlKHR const & rhs ) VULKAN_HPP_NOEXCEPT : DevicePipelineBinaryInternalCacheControlKHR( *reinterpret_cast( &rhs ) ) { } DevicePipelineBinaryInternalCacheControlKHR & operator=( DevicePipelineBinaryInternalCacheControlKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DevicePipelineBinaryInternalCacheControlKHR & operator=( VkDevicePipelineBinaryInternalCacheControlKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 DevicePipelineBinaryInternalCacheControlKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 DevicePipelineBinaryInternalCacheControlKHR & setDisableInternalCache( VULKAN_HPP_NAMESPACE::Bool32 disableInternalCache_ ) VULKAN_HPP_NOEXCEPT { disableInternalCache = disableInternalCache_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkDevicePipelineBinaryInternalCacheControlKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDevicePipelineBinaryInternalCacheControlKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, disableInternalCache ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( DevicePipelineBinaryInternalCacheControlKHR const & ) const = default; #else bool operator==( DevicePipelineBinaryInternalCacheControlKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( disableInternalCache == rhs.disableInternalCache ); # endif } bool operator!=( DevicePipelineBinaryInternalCacheControlKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDevicePipelineBinaryInternalCacheControlKHR; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 disableInternalCache = {}; }; template <> struct CppType { using Type = DevicePipelineBinaryInternalCacheControlKHR; }; struct DevicePrivateDataCreateInfo { using NativeType = VkDevicePrivateDataCreateInfo; static const bool allowDuplicate = true; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDevicePrivateDataCreateInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR DevicePrivateDataCreateInfo( uint32_t privateDataSlotRequestCount_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , privateDataSlotRequestCount{ privateDataSlotRequestCount_ } { } VULKAN_HPP_CONSTEXPR DevicePrivateDataCreateInfo( DevicePrivateDataCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; DevicePrivateDataCreateInfo( VkDevicePrivateDataCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT : DevicePrivateDataCreateInfo( *reinterpret_cast( &rhs ) ) { } DevicePrivateDataCreateInfo & operator=( DevicePrivateDataCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DevicePrivateDataCreateInfo & operator=( VkDevicePrivateDataCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 DevicePrivateDataCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 DevicePrivateDataCreateInfo & setPrivateDataSlotRequestCount( uint32_t privateDataSlotRequestCount_ ) VULKAN_HPP_NOEXCEPT { privateDataSlotRequestCount = privateDataSlotRequestCount_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkDevicePrivateDataCreateInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDevicePrivateDataCreateInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, privateDataSlotRequestCount ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( DevicePrivateDataCreateInfo const & ) const = default; #else bool operator==( DevicePrivateDataCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( privateDataSlotRequestCount == rhs.privateDataSlotRequestCount ); # endif } bool operator!=( DevicePrivateDataCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDevicePrivateDataCreateInfo; const void * pNext = {}; uint32_t privateDataSlotRequestCount = {}; }; template <> struct CppType { using Type = DevicePrivateDataCreateInfo; }; using DevicePrivateDataCreateInfoEXT = DevicePrivateDataCreateInfo; struct DeviceQueueGlobalPriorityCreateInfo { using NativeType = VkDeviceQueueGlobalPriorityCreateInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDeviceQueueGlobalPriorityCreateInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR DeviceQueueGlobalPriorityCreateInfo( VULKAN_HPP_NAMESPACE::QueueGlobalPriority globalPriority_ = VULKAN_HPP_NAMESPACE::QueueGlobalPriority::eLow, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , globalPriority{ globalPriority_ } { } VULKAN_HPP_CONSTEXPR DeviceQueueGlobalPriorityCreateInfo( DeviceQueueGlobalPriorityCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; DeviceQueueGlobalPriorityCreateInfo( VkDeviceQueueGlobalPriorityCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT : DeviceQueueGlobalPriorityCreateInfo( *reinterpret_cast( &rhs ) ) { } DeviceQueueGlobalPriorityCreateInfo & operator=( DeviceQueueGlobalPriorityCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DeviceQueueGlobalPriorityCreateInfo & operator=( VkDeviceQueueGlobalPriorityCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 DeviceQueueGlobalPriorityCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 DeviceQueueGlobalPriorityCreateInfo & setGlobalPriority( VULKAN_HPP_NAMESPACE::QueueGlobalPriority globalPriority_ ) VULKAN_HPP_NOEXCEPT { globalPriority = globalPriority_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkDeviceQueueGlobalPriorityCreateInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDeviceQueueGlobalPriorityCreateInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, globalPriority ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( DeviceQueueGlobalPriorityCreateInfo const & ) const = default; #else bool operator==( DeviceQueueGlobalPriorityCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( globalPriority == rhs.globalPriority ); # endif } bool operator!=( DeviceQueueGlobalPriorityCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDeviceQueueGlobalPriorityCreateInfo; const void * pNext = {}; VULKAN_HPP_NAMESPACE::QueueGlobalPriority globalPriority = VULKAN_HPP_NAMESPACE::QueueGlobalPriority::eLow; }; template <> struct CppType { using Type = DeviceQueueGlobalPriorityCreateInfo; }; using DeviceQueueGlobalPriorityCreateInfoEXT = DeviceQueueGlobalPriorityCreateInfo; using DeviceQueueGlobalPriorityCreateInfoKHR = DeviceQueueGlobalPriorityCreateInfo; struct DeviceQueueInfo2 { using NativeType = VkDeviceQueueInfo2; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDeviceQueueInfo2; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR DeviceQueueInfo2( VULKAN_HPP_NAMESPACE::DeviceQueueCreateFlags flags_ = {}, uint32_t queueFamilyIndex_ = {}, uint32_t queueIndex_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , queueFamilyIndex{ queueFamilyIndex_ } , queueIndex{ queueIndex_ } { } VULKAN_HPP_CONSTEXPR DeviceQueueInfo2( DeviceQueueInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; DeviceQueueInfo2( VkDeviceQueueInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT : DeviceQueueInfo2( *reinterpret_cast( &rhs ) ) {} DeviceQueueInfo2 & operator=( DeviceQueueInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DeviceQueueInfo2 & operator=( VkDeviceQueueInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 DeviceQueueInfo2 & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 DeviceQueueInfo2 & setFlags( VULKAN_HPP_NAMESPACE::DeviceQueueCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 DeviceQueueInfo2 & setQueueFamilyIndex( uint32_t queueFamilyIndex_ ) VULKAN_HPP_NOEXCEPT { queueFamilyIndex = queueFamilyIndex_; return *this; } VULKAN_HPP_CONSTEXPR_14 DeviceQueueInfo2 & setQueueIndex( uint32_t queueIndex_ ) VULKAN_HPP_NOEXCEPT { queueIndex = queueIndex_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkDeviceQueueInfo2 const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDeviceQueueInfo2 &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, queueFamilyIndex, queueIndex ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( DeviceQueueInfo2 const & ) const = default; #else bool operator==( DeviceQueueInfo2 const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( queueFamilyIndex == rhs.queueFamilyIndex ) && ( queueIndex == rhs.queueIndex ); # endif } bool operator!=( DeviceQueueInfo2 const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDeviceQueueInfo2; const void * pNext = {}; VULKAN_HPP_NAMESPACE::DeviceQueueCreateFlags flags = {}; uint32_t queueFamilyIndex = {}; uint32_t queueIndex = {}; }; template <> struct CppType { using Type = DeviceQueueInfo2; }; struct DeviceQueueShaderCoreControlCreateInfoARM { using NativeType = VkDeviceQueueShaderCoreControlCreateInfoARM; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDeviceQueueShaderCoreControlCreateInfoARM; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR DeviceQueueShaderCoreControlCreateInfoARM( uint32_t shaderCoreCount_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , shaderCoreCount{ shaderCoreCount_ } { } VULKAN_HPP_CONSTEXPR DeviceQueueShaderCoreControlCreateInfoARM( DeviceQueueShaderCoreControlCreateInfoARM const & rhs ) VULKAN_HPP_NOEXCEPT = default; DeviceQueueShaderCoreControlCreateInfoARM( VkDeviceQueueShaderCoreControlCreateInfoARM const & rhs ) VULKAN_HPP_NOEXCEPT : DeviceQueueShaderCoreControlCreateInfoARM( *reinterpret_cast( &rhs ) ) { } DeviceQueueShaderCoreControlCreateInfoARM & operator=( DeviceQueueShaderCoreControlCreateInfoARM const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DeviceQueueShaderCoreControlCreateInfoARM & operator=( VkDeviceQueueShaderCoreControlCreateInfoARM const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 DeviceQueueShaderCoreControlCreateInfoARM & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 DeviceQueueShaderCoreControlCreateInfoARM & setShaderCoreCount( uint32_t shaderCoreCount_ ) VULKAN_HPP_NOEXCEPT { shaderCoreCount = shaderCoreCount_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkDeviceQueueShaderCoreControlCreateInfoARM const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDeviceQueueShaderCoreControlCreateInfoARM &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, shaderCoreCount ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( DeviceQueueShaderCoreControlCreateInfoARM const & ) const = default; #else bool operator==( DeviceQueueShaderCoreControlCreateInfoARM const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( shaderCoreCount == rhs.shaderCoreCount ); # endif } bool operator!=( DeviceQueueShaderCoreControlCreateInfoARM const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDeviceQueueShaderCoreControlCreateInfoARM; void * pNext = {}; uint32_t shaderCoreCount = {}; }; template <> struct CppType { using Type = DeviceQueueShaderCoreControlCreateInfoARM; }; typedef PFN_vkVoidFunction( VKAPI_PTR * PFN_GetInstanceProcAddrLUNARG )( VULKAN_HPP_NAMESPACE::Instance instance, const char * pName ); struct DirectDriverLoadingInfoLUNARG { using NativeType = VkDirectDriverLoadingInfoLUNARG; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDirectDriverLoadingInfoLUNARG; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR DirectDriverLoadingInfoLUNARG( VULKAN_HPP_NAMESPACE::DirectDriverLoadingFlagsLUNARG flags_ = {}, VULKAN_HPP_NAMESPACE::PFN_GetInstanceProcAddrLUNARG pfnGetInstanceProcAddr_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , pfnGetInstanceProcAddr{ pfnGetInstanceProcAddr_ } { } VULKAN_HPP_CONSTEXPR DirectDriverLoadingInfoLUNARG( DirectDriverLoadingInfoLUNARG const & rhs ) VULKAN_HPP_NOEXCEPT = default; DirectDriverLoadingInfoLUNARG( VkDirectDriverLoadingInfoLUNARG const & rhs ) VULKAN_HPP_NOEXCEPT : DirectDriverLoadingInfoLUNARG( *reinterpret_cast( &rhs ) ) { } DirectDriverLoadingInfoLUNARG & operator=( DirectDriverLoadingInfoLUNARG const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DirectDriverLoadingInfoLUNARG & operator=( VkDirectDriverLoadingInfoLUNARG const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 DirectDriverLoadingInfoLUNARG & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 DirectDriverLoadingInfoLUNARG & setFlags( VULKAN_HPP_NAMESPACE::DirectDriverLoadingFlagsLUNARG flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 DirectDriverLoadingInfoLUNARG & setPfnGetInstanceProcAddr( VULKAN_HPP_NAMESPACE::PFN_GetInstanceProcAddrLUNARG pfnGetInstanceProcAddr_ ) VULKAN_HPP_NOEXCEPT { pfnGetInstanceProcAddr = pfnGetInstanceProcAddr_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkDirectDriverLoadingInfoLUNARG const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDirectDriverLoadingInfoLUNARG &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, pfnGetInstanceProcAddr ); } #endif bool operator==( DirectDriverLoadingInfoLUNARG const & rhs ) const VULKAN_HPP_NOEXCEPT { #if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); #else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( pfnGetInstanceProcAddr == rhs.pfnGetInstanceProcAddr ); #endif } bool operator!=( DirectDriverLoadingInfoLUNARG const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDirectDriverLoadingInfoLUNARG; void * pNext = {}; VULKAN_HPP_NAMESPACE::DirectDriverLoadingFlagsLUNARG flags = {}; VULKAN_HPP_NAMESPACE::PFN_GetInstanceProcAddrLUNARG pfnGetInstanceProcAddr = {}; }; template <> struct CppType { using Type = DirectDriverLoadingInfoLUNARG; }; struct DirectDriverLoadingListLUNARG { using NativeType = VkDirectDriverLoadingListLUNARG; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDirectDriverLoadingListLUNARG; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR DirectDriverLoadingListLUNARG( VULKAN_HPP_NAMESPACE::DirectDriverLoadingModeLUNARG mode_ = VULKAN_HPP_NAMESPACE::DirectDriverLoadingModeLUNARG::eExclusive, uint32_t driverCount_ = {}, const VULKAN_HPP_NAMESPACE::DirectDriverLoadingInfoLUNARG * pDrivers_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , mode{ mode_ } , driverCount{ driverCount_ } , pDrivers{ pDrivers_ } { } VULKAN_HPP_CONSTEXPR DirectDriverLoadingListLUNARG( DirectDriverLoadingListLUNARG const & rhs ) VULKAN_HPP_NOEXCEPT = default; DirectDriverLoadingListLUNARG( VkDirectDriverLoadingListLUNARG const & rhs ) VULKAN_HPP_NOEXCEPT : DirectDriverLoadingListLUNARG( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) DirectDriverLoadingListLUNARG( VULKAN_HPP_NAMESPACE::DirectDriverLoadingModeLUNARG mode_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & drivers_, const void * pNext_ = nullptr ) : pNext( pNext_ ), mode( mode_ ), driverCount( static_cast( drivers_.size() ) ), pDrivers( drivers_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ DirectDriverLoadingListLUNARG & operator=( DirectDriverLoadingListLUNARG const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DirectDriverLoadingListLUNARG & operator=( VkDirectDriverLoadingListLUNARG const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 DirectDriverLoadingListLUNARG & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 DirectDriverLoadingListLUNARG & setMode( VULKAN_HPP_NAMESPACE::DirectDriverLoadingModeLUNARG mode_ ) VULKAN_HPP_NOEXCEPT { mode = mode_; return *this; } VULKAN_HPP_CONSTEXPR_14 DirectDriverLoadingListLUNARG & setDriverCount( uint32_t driverCount_ ) VULKAN_HPP_NOEXCEPT { driverCount = driverCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 DirectDriverLoadingListLUNARG & setPDrivers( const VULKAN_HPP_NAMESPACE::DirectDriverLoadingInfoLUNARG * pDrivers_ ) VULKAN_HPP_NOEXCEPT { pDrivers = pDrivers_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) DirectDriverLoadingListLUNARG & setDrivers( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & drivers_ ) VULKAN_HPP_NOEXCEPT { driverCount = static_cast( drivers_.size() ); pDrivers = drivers_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkDirectDriverLoadingListLUNARG const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDirectDriverLoadingListLUNARG &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, mode, driverCount, pDrivers ); } #endif bool operator==( DirectDriverLoadingListLUNARG const & rhs ) const VULKAN_HPP_NOEXCEPT { #if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); #else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( mode == rhs.mode ) && ( driverCount == rhs.driverCount ) && ( pDrivers == rhs.pDrivers ); #endif } bool operator!=( DirectDriverLoadingListLUNARG const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDirectDriverLoadingListLUNARG; const void * pNext = {}; VULKAN_HPP_NAMESPACE::DirectDriverLoadingModeLUNARG mode = VULKAN_HPP_NAMESPACE::DirectDriverLoadingModeLUNARG::eExclusive; uint32_t driverCount = {}; const VULKAN_HPP_NAMESPACE::DirectDriverLoadingInfoLUNARG * pDrivers = {}; }; template <> struct CppType { using Type = DirectDriverLoadingListLUNARG; }; #if defined( VK_USE_PLATFORM_DIRECTFB_EXT ) struct DirectFBSurfaceCreateInfoEXT { using NativeType = VkDirectFBSurfaceCreateInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDirectfbSurfaceCreateInfoEXT; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR DirectFBSurfaceCreateInfoEXT( VULKAN_HPP_NAMESPACE::DirectFBSurfaceCreateFlagsEXT flags_ = {}, IDirectFB * dfb_ = {}, IDirectFBSurface * surface_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , dfb{ dfb_ } , surface{ surface_ } { } VULKAN_HPP_CONSTEXPR DirectFBSurfaceCreateInfoEXT( DirectFBSurfaceCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; DirectFBSurfaceCreateInfoEXT( VkDirectFBSurfaceCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : DirectFBSurfaceCreateInfoEXT( *reinterpret_cast( &rhs ) ) { } DirectFBSurfaceCreateInfoEXT & operator=( DirectFBSurfaceCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DirectFBSurfaceCreateInfoEXT & operator=( VkDirectFBSurfaceCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } # if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 DirectFBSurfaceCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 DirectFBSurfaceCreateInfoEXT & setFlags( VULKAN_HPP_NAMESPACE::DirectFBSurfaceCreateFlagsEXT flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 DirectFBSurfaceCreateInfoEXT & setDfb( IDirectFB * dfb_ ) VULKAN_HPP_NOEXCEPT { dfb = dfb_; return *this; } VULKAN_HPP_CONSTEXPR_14 DirectFBSurfaceCreateInfoEXT & setSurface( IDirectFBSurface * surface_ ) VULKAN_HPP_NOEXCEPT { surface = surface_; return *this; } # endif /*VULKAN_HPP_NO_SETTERS*/ operator VkDirectFBSurfaceCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDirectFBSurfaceCreateInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, dfb, surface ); } # endif # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( DirectFBSurfaceCreateInfoEXT const & ) const = default; # else bool operator==( DirectFBSurfaceCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( dfb == rhs.dfb ) && ( surface == rhs.surface ); # endif } bool operator!=( DirectFBSurfaceCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } # endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDirectfbSurfaceCreateInfoEXT; const void * pNext = {}; VULKAN_HPP_NAMESPACE::DirectFBSurfaceCreateFlagsEXT flags = {}; IDirectFB * dfb = {}; IDirectFBSurface * surface = {}; }; template <> struct CppType { using Type = DirectFBSurfaceCreateInfoEXT; }; #endif /*VK_USE_PLATFORM_DIRECTFB_EXT*/ #if defined( VK_ENABLE_BETA_EXTENSIONS ) struct DispatchGraphCountInfoAMDX { using NativeType = VkDispatchGraphCountInfoAMDX; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 DispatchGraphCountInfoAMDX( uint32_t count_ = {}, VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstAMDX infos_ = {}, uint64_t stride_ = {} ) VULKAN_HPP_NOEXCEPT : count{ count_ } , infos{ infos_ } , stride{ stride_ } { } VULKAN_HPP_CONSTEXPR_14 DispatchGraphCountInfoAMDX( DispatchGraphCountInfoAMDX const & rhs ) VULKAN_HPP_NOEXCEPT = default; DispatchGraphCountInfoAMDX( VkDispatchGraphCountInfoAMDX const & rhs ) VULKAN_HPP_NOEXCEPT : DispatchGraphCountInfoAMDX( *reinterpret_cast( &rhs ) ) { } DispatchGraphCountInfoAMDX & operator=( DispatchGraphCountInfoAMDX const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DispatchGraphCountInfoAMDX & operator=( VkDispatchGraphCountInfoAMDX const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } # if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 DispatchGraphCountInfoAMDX & setCount( uint32_t count_ ) VULKAN_HPP_NOEXCEPT { count = count_; return *this; } VULKAN_HPP_CONSTEXPR_14 DispatchGraphCountInfoAMDX & setInfos( VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstAMDX const & infos_ ) VULKAN_HPP_NOEXCEPT { infos = infos_; return *this; } VULKAN_HPP_CONSTEXPR_14 DispatchGraphCountInfoAMDX & setStride( uint64_t stride_ ) VULKAN_HPP_NOEXCEPT { stride = stride_; return *this; } # endif /*VULKAN_HPP_NO_SETTERS*/ operator VkDispatchGraphCountInfoAMDX const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDispatchGraphCountInfoAMDX &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( count, infos, stride ); } # endif public: uint32_t count = {}; VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstAMDX infos = {}; uint64_t stride = {}; }; #endif /*VK_ENABLE_BETA_EXTENSIONS*/ #if defined( VK_ENABLE_BETA_EXTENSIONS ) struct DispatchGraphInfoAMDX { using NativeType = VkDispatchGraphInfoAMDX; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 DispatchGraphInfoAMDX( uint32_t nodeIndex_ = {}, uint32_t payloadCount_ = {}, VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstAMDX payloads_ = {}, uint64_t payloadStride_ = {} ) VULKAN_HPP_NOEXCEPT : nodeIndex{ nodeIndex_ } , payloadCount{ payloadCount_ } , payloads{ payloads_ } , payloadStride{ payloadStride_ } { } VULKAN_HPP_CONSTEXPR_14 DispatchGraphInfoAMDX( DispatchGraphInfoAMDX const & rhs ) VULKAN_HPP_NOEXCEPT = default; DispatchGraphInfoAMDX( VkDispatchGraphInfoAMDX const & rhs ) VULKAN_HPP_NOEXCEPT : DispatchGraphInfoAMDX( *reinterpret_cast( &rhs ) ) { } DispatchGraphInfoAMDX & operator=( DispatchGraphInfoAMDX const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DispatchGraphInfoAMDX & operator=( VkDispatchGraphInfoAMDX const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } # if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 DispatchGraphInfoAMDX & setNodeIndex( uint32_t nodeIndex_ ) VULKAN_HPP_NOEXCEPT { nodeIndex = nodeIndex_; return *this; } VULKAN_HPP_CONSTEXPR_14 DispatchGraphInfoAMDX & setPayloadCount( uint32_t payloadCount_ ) VULKAN_HPP_NOEXCEPT { payloadCount = payloadCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 DispatchGraphInfoAMDX & setPayloads( VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstAMDX const & payloads_ ) VULKAN_HPP_NOEXCEPT { payloads = payloads_; return *this; } VULKAN_HPP_CONSTEXPR_14 DispatchGraphInfoAMDX & setPayloadStride( uint64_t payloadStride_ ) VULKAN_HPP_NOEXCEPT { payloadStride = payloadStride_; return *this; } # endif /*VULKAN_HPP_NO_SETTERS*/ operator VkDispatchGraphInfoAMDX const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDispatchGraphInfoAMDX &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( nodeIndex, payloadCount, payloads, payloadStride ); } # endif public: uint32_t nodeIndex = {}; uint32_t payloadCount = {}; VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstAMDX payloads = {}; uint64_t payloadStride = {}; }; #endif /*VK_ENABLE_BETA_EXTENSIONS*/ struct DispatchIndirectCommand { using NativeType = VkDispatchIndirectCommand; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR DispatchIndirectCommand( uint32_t x_ = {}, uint32_t y_ = {}, uint32_t z_ = {} ) VULKAN_HPP_NOEXCEPT : x{ x_ } , y{ y_ } , z{ z_ } { } VULKAN_HPP_CONSTEXPR DispatchIndirectCommand( DispatchIndirectCommand const & rhs ) VULKAN_HPP_NOEXCEPT = default; DispatchIndirectCommand( VkDispatchIndirectCommand const & rhs ) VULKAN_HPP_NOEXCEPT : DispatchIndirectCommand( *reinterpret_cast( &rhs ) ) { } DispatchIndirectCommand & operator=( DispatchIndirectCommand const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DispatchIndirectCommand & operator=( VkDispatchIndirectCommand const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 DispatchIndirectCommand & setX( uint32_t x_ ) VULKAN_HPP_NOEXCEPT { x = x_; return *this; } VULKAN_HPP_CONSTEXPR_14 DispatchIndirectCommand & setY( uint32_t y_ ) VULKAN_HPP_NOEXCEPT { y = y_; return *this; } VULKAN_HPP_CONSTEXPR_14 DispatchIndirectCommand & setZ( uint32_t z_ ) VULKAN_HPP_NOEXCEPT { z = z_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkDispatchIndirectCommand const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDispatchIndirectCommand &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( x, y, z ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( DispatchIndirectCommand const & ) const = default; #else bool operator==( DispatchIndirectCommand const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( x == rhs.x ) && ( y == rhs.y ) && ( z == rhs.z ); # endif } bool operator!=( DispatchIndirectCommand const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: uint32_t x = {}; uint32_t y = {}; uint32_t z = {}; }; struct DisplayEventInfoEXT { using NativeType = VkDisplayEventInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDisplayEventInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR DisplayEventInfoEXT( VULKAN_HPP_NAMESPACE::DisplayEventTypeEXT displayEvent_ = VULKAN_HPP_NAMESPACE::DisplayEventTypeEXT::eFirstPixelOut, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , displayEvent{ displayEvent_ } { } VULKAN_HPP_CONSTEXPR DisplayEventInfoEXT( DisplayEventInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; DisplayEventInfoEXT( VkDisplayEventInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : DisplayEventInfoEXT( *reinterpret_cast( &rhs ) ) { } DisplayEventInfoEXT & operator=( DisplayEventInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DisplayEventInfoEXT & operator=( VkDisplayEventInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 DisplayEventInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 DisplayEventInfoEXT & setDisplayEvent( VULKAN_HPP_NAMESPACE::DisplayEventTypeEXT displayEvent_ ) VULKAN_HPP_NOEXCEPT { displayEvent = displayEvent_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkDisplayEventInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDisplayEventInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, displayEvent ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( DisplayEventInfoEXT const & ) const = default; #else bool operator==( DisplayEventInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( displayEvent == rhs.displayEvent ); # endif } bool operator!=( DisplayEventInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDisplayEventInfoEXT; const void * pNext = {}; VULKAN_HPP_NAMESPACE::DisplayEventTypeEXT displayEvent = VULKAN_HPP_NAMESPACE::DisplayEventTypeEXT::eFirstPixelOut; }; template <> struct CppType { using Type = DisplayEventInfoEXT; }; struct DisplayModeParametersKHR { using NativeType = VkDisplayModeParametersKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR DisplayModeParametersKHR( VULKAN_HPP_NAMESPACE::Extent2D visibleRegion_ = {}, uint32_t refreshRate_ = {} ) VULKAN_HPP_NOEXCEPT : visibleRegion{ visibleRegion_ } , refreshRate{ refreshRate_ } { } VULKAN_HPP_CONSTEXPR DisplayModeParametersKHR( DisplayModeParametersKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; DisplayModeParametersKHR( VkDisplayModeParametersKHR const & rhs ) VULKAN_HPP_NOEXCEPT : DisplayModeParametersKHR( *reinterpret_cast( &rhs ) ) { } DisplayModeParametersKHR & operator=( DisplayModeParametersKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DisplayModeParametersKHR & operator=( VkDisplayModeParametersKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 DisplayModeParametersKHR & setVisibleRegion( VULKAN_HPP_NAMESPACE::Extent2D const & visibleRegion_ ) VULKAN_HPP_NOEXCEPT { visibleRegion = visibleRegion_; return *this; } VULKAN_HPP_CONSTEXPR_14 DisplayModeParametersKHR & setRefreshRate( uint32_t refreshRate_ ) VULKAN_HPP_NOEXCEPT { refreshRate = refreshRate_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkDisplayModeParametersKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDisplayModeParametersKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( visibleRegion, refreshRate ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( DisplayModeParametersKHR const & ) const = default; #else bool operator==( DisplayModeParametersKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( visibleRegion == rhs.visibleRegion ) && ( refreshRate == rhs.refreshRate ); # endif } bool operator!=( DisplayModeParametersKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::Extent2D visibleRegion = {}; uint32_t refreshRate = {}; }; struct DisplayModeCreateInfoKHR { using NativeType = VkDisplayModeCreateInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDisplayModeCreateInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR DisplayModeCreateInfoKHR( VULKAN_HPP_NAMESPACE::DisplayModeCreateFlagsKHR flags_ = {}, VULKAN_HPP_NAMESPACE::DisplayModeParametersKHR parameters_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , parameters{ parameters_ } { } VULKAN_HPP_CONSTEXPR DisplayModeCreateInfoKHR( DisplayModeCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; DisplayModeCreateInfoKHR( VkDisplayModeCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : DisplayModeCreateInfoKHR( *reinterpret_cast( &rhs ) ) { } DisplayModeCreateInfoKHR & operator=( DisplayModeCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DisplayModeCreateInfoKHR & operator=( VkDisplayModeCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 DisplayModeCreateInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 DisplayModeCreateInfoKHR & setFlags( VULKAN_HPP_NAMESPACE::DisplayModeCreateFlagsKHR flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 DisplayModeCreateInfoKHR & setParameters( VULKAN_HPP_NAMESPACE::DisplayModeParametersKHR const & parameters_ ) VULKAN_HPP_NOEXCEPT { parameters = parameters_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkDisplayModeCreateInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDisplayModeCreateInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, parameters ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( DisplayModeCreateInfoKHR const & ) const = default; #else bool operator==( DisplayModeCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( parameters == rhs.parameters ); # endif } bool operator!=( DisplayModeCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDisplayModeCreateInfoKHR; const void * pNext = {}; VULKAN_HPP_NAMESPACE::DisplayModeCreateFlagsKHR flags = {}; VULKAN_HPP_NAMESPACE::DisplayModeParametersKHR parameters = {}; }; template <> struct CppType { using Type = DisplayModeCreateInfoKHR; }; struct DisplayModePropertiesKHR { using NativeType = VkDisplayModePropertiesKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR DisplayModePropertiesKHR( VULKAN_HPP_NAMESPACE::DisplayModeKHR displayMode_ = {}, VULKAN_HPP_NAMESPACE::DisplayModeParametersKHR parameters_ = {} ) VULKAN_HPP_NOEXCEPT : displayMode{ displayMode_ } , parameters{ parameters_ } { } VULKAN_HPP_CONSTEXPR DisplayModePropertiesKHR( DisplayModePropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; DisplayModePropertiesKHR( VkDisplayModePropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT : DisplayModePropertiesKHR( *reinterpret_cast( &rhs ) ) { } DisplayModePropertiesKHR & operator=( DisplayModePropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DisplayModePropertiesKHR & operator=( VkDisplayModePropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkDisplayModePropertiesKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDisplayModePropertiesKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( displayMode, parameters ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( DisplayModePropertiesKHR const & ) const = default; #else bool operator==( DisplayModePropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( displayMode == rhs.displayMode ) && ( parameters == rhs.parameters ); # endif } bool operator!=( DisplayModePropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::DisplayModeKHR displayMode = {}; VULKAN_HPP_NAMESPACE::DisplayModeParametersKHR parameters = {}; }; struct DisplayModeProperties2KHR { using NativeType = VkDisplayModeProperties2KHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDisplayModeProperties2KHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR DisplayModeProperties2KHR( VULKAN_HPP_NAMESPACE::DisplayModePropertiesKHR displayModeProperties_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , displayModeProperties{ displayModeProperties_ } { } VULKAN_HPP_CONSTEXPR DisplayModeProperties2KHR( DisplayModeProperties2KHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; DisplayModeProperties2KHR( VkDisplayModeProperties2KHR const & rhs ) VULKAN_HPP_NOEXCEPT : DisplayModeProperties2KHR( *reinterpret_cast( &rhs ) ) { } DisplayModeProperties2KHR & operator=( DisplayModeProperties2KHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DisplayModeProperties2KHR & operator=( VkDisplayModeProperties2KHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkDisplayModeProperties2KHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDisplayModeProperties2KHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, displayModeProperties ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( DisplayModeProperties2KHR const & ) const = default; #else bool operator==( DisplayModeProperties2KHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( displayModeProperties == rhs.displayModeProperties ); # endif } bool operator!=( DisplayModeProperties2KHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDisplayModeProperties2KHR; void * pNext = {}; VULKAN_HPP_NAMESPACE::DisplayModePropertiesKHR displayModeProperties = {}; }; template <> struct CppType { using Type = DisplayModeProperties2KHR; }; struct DisplayModeStereoPropertiesNV { using NativeType = VkDisplayModeStereoPropertiesNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDisplayModeStereoPropertiesNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR DisplayModeStereoPropertiesNV( VULKAN_HPP_NAMESPACE::Bool32 hdmi3DSupported_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , hdmi3DSupported{ hdmi3DSupported_ } { } VULKAN_HPP_CONSTEXPR DisplayModeStereoPropertiesNV( DisplayModeStereoPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; DisplayModeStereoPropertiesNV( VkDisplayModeStereoPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT : DisplayModeStereoPropertiesNV( *reinterpret_cast( &rhs ) ) { } DisplayModeStereoPropertiesNV & operator=( DisplayModeStereoPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DisplayModeStereoPropertiesNV & operator=( VkDisplayModeStereoPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkDisplayModeStereoPropertiesNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDisplayModeStereoPropertiesNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, hdmi3DSupported ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( DisplayModeStereoPropertiesNV const & ) const = default; #else bool operator==( DisplayModeStereoPropertiesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( hdmi3DSupported == rhs.hdmi3DSupported ); # endif } bool operator!=( DisplayModeStereoPropertiesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDisplayModeStereoPropertiesNV; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 hdmi3DSupported = {}; }; template <> struct CppType { using Type = DisplayModeStereoPropertiesNV; }; struct DisplayNativeHdrSurfaceCapabilitiesAMD { using NativeType = VkDisplayNativeHdrSurfaceCapabilitiesAMD; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDisplayNativeHdrSurfaceCapabilitiesAMD; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR DisplayNativeHdrSurfaceCapabilitiesAMD( VULKAN_HPP_NAMESPACE::Bool32 localDimmingSupport_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , localDimmingSupport{ localDimmingSupport_ } { } VULKAN_HPP_CONSTEXPR DisplayNativeHdrSurfaceCapabilitiesAMD( DisplayNativeHdrSurfaceCapabilitiesAMD const & rhs ) VULKAN_HPP_NOEXCEPT = default; DisplayNativeHdrSurfaceCapabilitiesAMD( VkDisplayNativeHdrSurfaceCapabilitiesAMD const & rhs ) VULKAN_HPP_NOEXCEPT : DisplayNativeHdrSurfaceCapabilitiesAMD( *reinterpret_cast( &rhs ) ) { } DisplayNativeHdrSurfaceCapabilitiesAMD & operator=( DisplayNativeHdrSurfaceCapabilitiesAMD const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DisplayNativeHdrSurfaceCapabilitiesAMD & operator=( VkDisplayNativeHdrSurfaceCapabilitiesAMD const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkDisplayNativeHdrSurfaceCapabilitiesAMD const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDisplayNativeHdrSurfaceCapabilitiesAMD &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, localDimmingSupport ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( DisplayNativeHdrSurfaceCapabilitiesAMD const & ) const = default; #else bool operator==( DisplayNativeHdrSurfaceCapabilitiesAMD const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( localDimmingSupport == rhs.localDimmingSupport ); # endif } bool operator!=( DisplayNativeHdrSurfaceCapabilitiesAMD const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDisplayNativeHdrSurfaceCapabilitiesAMD; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 localDimmingSupport = {}; }; template <> struct CppType { using Type = DisplayNativeHdrSurfaceCapabilitiesAMD; }; struct DisplayPlaneCapabilitiesKHR { using NativeType = VkDisplayPlaneCapabilitiesKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR DisplayPlaneCapabilitiesKHR( VULKAN_HPP_NAMESPACE::DisplayPlaneAlphaFlagsKHR supportedAlpha_ = {}, VULKAN_HPP_NAMESPACE::Offset2D minSrcPosition_ = {}, VULKAN_HPP_NAMESPACE::Offset2D maxSrcPosition_ = {}, VULKAN_HPP_NAMESPACE::Extent2D minSrcExtent_ = {}, VULKAN_HPP_NAMESPACE::Extent2D maxSrcExtent_ = {}, VULKAN_HPP_NAMESPACE::Offset2D minDstPosition_ = {}, VULKAN_HPP_NAMESPACE::Offset2D maxDstPosition_ = {}, VULKAN_HPP_NAMESPACE::Extent2D minDstExtent_ = {}, VULKAN_HPP_NAMESPACE::Extent2D maxDstExtent_ = {} ) VULKAN_HPP_NOEXCEPT : supportedAlpha{ supportedAlpha_ } , minSrcPosition{ minSrcPosition_ } , maxSrcPosition{ maxSrcPosition_ } , minSrcExtent{ minSrcExtent_ } , maxSrcExtent{ maxSrcExtent_ } , minDstPosition{ minDstPosition_ } , maxDstPosition{ maxDstPosition_ } , minDstExtent{ minDstExtent_ } , maxDstExtent{ maxDstExtent_ } { } VULKAN_HPP_CONSTEXPR DisplayPlaneCapabilitiesKHR( DisplayPlaneCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; DisplayPlaneCapabilitiesKHR( VkDisplayPlaneCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT : DisplayPlaneCapabilitiesKHR( *reinterpret_cast( &rhs ) ) { } DisplayPlaneCapabilitiesKHR & operator=( DisplayPlaneCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DisplayPlaneCapabilitiesKHR & operator=( VkDisplayPlaneCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkDisplayPlaneCapabilitiesKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDisplayPlaneCapabilitiesKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( supportedAlpha, minSrcPosition, maxSrcPosition, minSrcExtent, maxSrcExtent, minDstPosition, maxDstPosition, minDstExtent, maxDstExtent ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( DisplayPlaneCapabilitiesKHR const & ) const = default; #else bool operator==( DisplayPlaneCapabilitiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( supportedAlpha == rhs.supportedAlpha ) && ( minSrcPosition == rhs.minSrcPosition ) && ( maxSrcPosition == rhs.maxSrcPosition ) && ( minSrcExtent == rhs.minSrcExtent ) && ( maxSrcExtent == rhs.maxSrcExtent ) && ( minDstPosition == rhs.minDstPosition ) && ( maxDstPosition == rhs.maxDstPosition ) && ( minDstExtent == rhs.minDstExtent ) && ( maxDstExtent == rhs.maxDstExtent ); # endif } bool operator!=( DisplayPlaneCapabilitiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::DisplayPlaneAlphaFlagsKHR supportedAlpha = {}; VULKAN_HPP_NAMESPACE::Offset2D minSrcPosition = {}; VULKAN_HPP_NAMESPACE::Offset2D maxSrcPosition = {}; VULKAN_HPP_NAMESPACE::Extent2D minSrcExtent = {}; VULKAN_HPP_NAMESPACE::Extent2D maxSrcExtent = {}; VULKAN_HPP_NAMESPACE::Offset2D minDstPosition = {}; VULKAN_HPP_NAMESPACE::Offset2D maxDstPosition = {}; VULKAN_HPP_NAMESPACE::Extent2D minDstExtent = {}; VULKAN_HPP_NAMESPACE::Extent2D maxDstExtent = {}; }; struct DisplayPlaneCapabilities2KHR { using NativeType = VkDisplayPlaneCapabilities2KHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDisplayPlaneCapabilities2KHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR DisplayPlaneCapabilities2KHR( VULKAN_HPP_NAMESPACE::DisplayPlaneCapabilitiesKHR capabilities_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , capabilities{ capabilities_ } { } VULKAN_HPP_CONSTEXPR DisplayPlaneCapabilities2KHR( DisplayPlaneCapabilities2KHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; DisplayPlaneCapabilities2KHR( VkDisplayPlaneCapabilities2KHR const & rhs ) VULKAN_HPP_NOEXCEPT : DisplayPlaneCapabilities2KHR( *reinterpret_cast( &rhs ) ) { } DisplayPlaneCapabilities2KHR & operator=( DisplayPlaneCapabilities2KHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DisplayPlaneCapabilities2KHR & operator=( VkDisplayPlaneCapabilities2KHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkDisplayPlaneCapabilities2KHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDisplayPlaneCapabilities2KHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, capabilities ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( DisplayPlaneCapabilities2KHR const & ) const = default; #else bool operator==( DisplayPlaneCapabilities2KHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( capabilities == rhs.capabilities ); # endif } bool operator!=( DisplayPlaneCapabilities2KHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDisplayPlaneCapabilities2KHR; void * pNext = {}; VULKAN_HPP_NAMESPACE::DisplayPlaneCapabilitiesKHR capabilities = {}; }; template <> struct CppType { using Type = DisplayPlaneCapabilities2KHR; }; struct DisplayPlaneInfo2KHR { using NativeType = VkDisplayPlaneInfo2KHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDisplayPlaneInfo2KHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR DisplayPlaneInfo2KHR( VULKAN_HPP_NAMESPACE::DisplayModeKHR mode_ = {}, uint32_t planeIndex_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , mode{ mode_ } , planeIndex{ planeIndex_ } { } VULKAN_HPP_CONSTEXPR DisplayPlaneInfo2KHR( DisplayPlaneInfo2KHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; DisplayPlaneInfo2KHR( VkDisplayPlaneInfo2KHR const & rhs ) VULKAN_HPP_NOEXCEPT : DisplayPlaneInfo2KHR( *reinterpret_cast( &rhs ) ) { } DisplayPlaneInfo2KHR & operator=( DisplayPlaneInfo2KHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DisplayPlaneInfo2KHR & operator=( VkDisplayPlaneInfo2KHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 DisplayPlaneInfo2KHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 DisplayPlaneInfo2KHR & setMode( VULKAN_HPP_NAMESPACE::DisplayModeKHR mode_ ) VULKAN_HPP_NOEXCEPT { mode = mode_; return *this; } VULKAN_HPP_CONSTEXPR_14 DisplayPlaneInfo2KHR & setPlaneIndex( uint32_t planeIndex_ ) VULKAN_HPP_NOEXCEPT { planeIndex = planeIndex_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkDisplayPlaneInfo2KHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDisplayPlaneInfo2KHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, mode, planeIndex ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( DisplayPlaneInfo2KHR const & ) const = default; #else bool operator==( DisplayPlaneInfo2KHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( mode == rhs.mode ) && ( planeIndex == rhs.planeIndex ); # endif } bool operator!=( DisplayPlaneInfo2KHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDisplayPlaneInfo2KHR; const void * pNext = {}; VULKAN_HPP_NAMESPACE::DisplayModeKHR mode = {}; uint32_t planeIndex = {}; }; template <> struct CppType { using Type = DisplayPlaneInfo2KHR; }; struct DisplayPlanePropertiesKHR { using NativeType = VkDisplayPlanePropertiesKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR DisplayPlanePropertiesKHR( VULKAN_HPP_NAMESPACE::DisplayKHR currentDisplay_ = {}, uint32_t currentStackIndex_ = {} ) VULKAN_HPP_NOEXCEPT : currentDisplay{ currentDisplay_ } , currentStackIndex{ currentStackIndex_ } { } VULKAN_HPP_CONSTEXPR DisplayPlanePropertiesKHR( DisplayPlanePropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; DisplayPlanePropertiesKHR( VkDisplayPlanePropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT : DisplayPlanePropertiesKHR( *reinterpret_cast( &rhs ) ) { } DisplayPlanePropertiesKHR & operator=( DisplayPlanePropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DisplayPlanePropertiesKHR & operator=( VkDisplayPlanePropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkDisplayPlanePropertiesKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDisplayPlanePropertiesKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( currentDisplay, currentStackIndex ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( DisplayPlanePropertiesKHR const & ) const = default; #else bool operator==( DisplayPlanePropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( currentDisplay == rhs.currentDisplay ) && ( currentStackIndex == rhs.currentStackIndex ); # endif } bool operator!=( DisplayPlanePropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::DisplayKHR currentDisplay = {}; uint32_t currentStackIndex = {}; }; struct DisplayPlaneProperties2KHR { using NativeType = VkDisplayPlaneProperties2KHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDisplayPlaneProperties2KHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR DisplayPlaneProperties2KHR( VULKAN_HPP_NAMESPACE::DisplayPlanePropertiesKHR displayPlaneProperties_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , displayPlaneProperties{ displayPlaneProperties_ } { } VULKAN_HPP_CONSTEXPR DisplayPlaneProperties2KHR( DisplayPlaneProperties2KHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; DisplayPlaneProperties2KHR( VkDisplayPlaneProperties2KHR const & rhs ) VULKAN_HPP_NOEXCEPT : DisplayPlaneProperties2KHR( *reinterpret_cast( &rhs ) ) { } DisplayPlaneProperties2KHR & operator=( DisplayPlaneProperties2KHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DisplayPlaneProperties2KHR & operator=( VkDisplayPlaneProperties2KHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkDisplayPlaneProperties2KHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDisplayPlaneProperties2KHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, displayPlaneProperties ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( DisplayPlaneProperties2KHR const & ) const = default; #else bool operator==( DisplayPlaneProperties2KHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( displayPlaneProperties == rhs.displayPlaneProperties ); # endif } bool operator!=( DisplayPlaneProperties2KHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDisplayPlaneProperties2KHR; void * pNext = {}; VULKAN_HPP_NAMESPACE::DisplayPlanePropertiesKHR displayPlaneProperties = {}; }; template <> struct CppType { using Type = DisplayPlaneProperties2KHR; }; struct DisplayPowerInfoEXT { using NativeType = VkDisplayPowerInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDisplayPowerInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR DisplayPowerInfoEXT( VULKAN_HPP_NAMESPACE::DisplayPowerStateEXT powerState_ = VULKAN_HPP_NAMESPACE::DisplayPowerStateEXT::eOff, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , powerState{ powerState_ } { } VULKAN_HPP_CONSTEXPR DisplayPowerInfoEXT( DisplayPowerInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; DisplayPowerInfoEXT( VkDisplayPowerInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : DisplayPowerInfoEXT( *reinterpret_cast( &rhs ) ) { } DisplayPowerInfoEXT & operator=( DisplayPowerInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DisplayPowerInfoEXT & operator=( VkDisplayPowerInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 DisplayPowerInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 DisplayPowerInfoEXT & setPowerState( VULKAN_HPP_NAMESPACE::DisplayPowerStateEXT powerState_ ) VULKAN_HPP_NOEXCEPT { powerState = powerState_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkDisplayPowerInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDisplayPowerInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, powerState ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( DisplayPowerInfoEXT const & ) const = default; #else bool operator==( DisplayPowerInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( powerState == rhs.powerState ); # endif } bool operator!=( DisplayPowerInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDisplayPowerInfoEXT; const void * pNext = {}; VULKAN_HPP_NAMESPACE::DisplayPowerStateEXT powerState = VULKAN_HPP_NAMESPACE::DisplayPowerStateEXT::eOff; }; template <> struct CppType { using Type = DisplayPowerInfoEXT; }; struct DisplayPresentInfoKHR { using NativeType = VkDisplayPresentInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDisplayPresentInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR DisplayPresentInfoKHR( VULKAN_HPP_NAMESPACE::Rect2D srcRect_ = {}, VULKAN_HPP_NAMESPACE::Rect2D dstRect_ = {}, VULKAN_HPP_NAMESPACE::Bool32 persistent_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , srcRect{ srcRect_ } , dstRect{ dstRect_ } , persistent{ persistent_ } { } VULKAN_HPP_CONSTEXPR DisplayPresentInfoKHR( DisplayPresentInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; DisplayPresentInfoKHR( VkDisplayPresentInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : DisplayPresentInfoKHR( *reinterpret_cast( &rhs ) ) { } DisplayPresentInfoKHR & operator=( DisplayPresentInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DisplayPresentInfoKHR & operator=( VkDisplayPresentInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 DisplayPresentInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 DisplayPresentInfoKHR & setSrcRect( VULKAN_HPP_NAMESPACE::Rect2D const & srcRect_ ) VULKAN_HPP_NOEXCEPT { srcRect = srcRect_; return *this; } VULKAN_HPP_CONSTEXPR_14 DisplayPresentInfoKHR & setDstRect( VULKAN_HPP_NAMESPACE::Rect2D const & dstRect_ ) VULKAN_HPP_NOEXCEPT { dstRect = dstRect_; return *this; } VULKAN_HPP_CONSTEXPR_14 DisplayPresentInfoKHR & setPersistent( VULKAN_HPP_NAMESPACE::Bool32 persistent_ ) VULKAN_HPP_NOEXCEPT { persistent = persistent_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkDisplayPresentInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDisplayPresentInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, srcRect, dstRect, persistent ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( DisplayPresentInfoKHR const & ) const = default; #else bool operator==( DisplayPresentInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( srcRect == rhs.srcRect ) && ( dstRect == rhs.dstRect ) && ( persistent == rhs.persistent ); # endif } bool operator!=( DisplayPresentInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDisplayPresentInfoKHR; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Rect2D srcRect = {}; VULKAN_HPP_NAMESPACE::Rect2D dstRect = {}; VULKAN_HPP_NAMESPACE::Bool32 persistent = {}; }; template <> struct CppType { using Type = DisplayPresentInfoKHR; }; struct DisplayPropertiesKHR { using NativeType = VkDisplayPropertiesKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR DisplayPropertiesKHR( VULKAN_HPP_NAMESPACE::DisplayKHR display_ = {}, const char * displayName_ = {}, VULKAN_HPP_NAMESPACE::Extent2D physicalDimensions_ = {}, VULKAN_HPP_NAMESPACE::Extent2D physicalResolution_ = {}, VULKAN_HPP_NAMESPACE::SurfaceTransformFlagsKHR supportedTransforms_ = {}, VULKAN_HPP_NAMESPACE::Bool32 planeReorderPossible_ = {}, VULKAN_HPP_NAMESPACE::Bool32 persistentContent_ = {} ) VULKAN_HPP_NOEXCEPT : display{ display_ } , displayName{ displayName_ } , physicalDimensions{ physicalDimensions_ } , physicalResolution{ physicalResolution_ } , supportedTransforms{ supportedTransforms_ } , planeReorderPossible{ planeReorderPossible_ } , persistentContent{ persistentContent_ } { } VULKAN_HPP_CONSTEXPR DisplayPropertiesKHR( DisplayPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; DisplayPropertiesKHR( VkDisplayPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT : DisplayPropertiesKHR( *reinterpret_cast( &rhs ) ) { } DisplayPropertiesKHR & operator=( DisplayPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DisplayPropertiesKHR & operator=( VkDisplayPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkDisplayPropertiesKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDisplayPropertiesKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( display, displayName, physicalDimensions, physicalResolution, supportedTransforms, planeReorderPossible, persistentContent ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) std::strong_ordering operator<=>( DisplayPropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { if ( auto cmp = display <=> rhs.display; cmp != 0 ) return cmp; if ( displayName != rhs.displayName ) if ( auto cmp = strcmp( displayName, rhs.displayName ); cmp != 0 ) return ( cmp < 0 ) ? std::strong_ordering::less : std::strong_ordering::greater; if ( auto cmp = physicalDimensions <=> rhs.physicalDimensions; cmp != 0 ) return cmp; if ( auto cmp = physicalResolution <=> rhs.physicalResolution; cmp != 0 ) return cmp; if ( auto cmp = supportedTransforms <=> rhs.supportedTransforms; cmp != 0 ) return cmp; if ( auto cmp = planeReorderPossible <=> rhs.planeReorderPossible; cmp != 0 ) return cmp; if ( auto cmp = persistentContent <=> rhs.persistentContent; cmp != 0 ) return cmp; return std::strong_ordering::equivalent; } #endif bool operator==( DisplayPropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( display == rhs.display ) && ( ( displayName == rhs.displayName ) || ( strcmp( displayName, rhs.displayName ) == 0 ) ) && ( physicalDimensions == rhs.physicalDimensions ) && ( physicalResolution == rhs.physicalResolution ) && ( supportedTransforms == rhs.supportedTransforms ) && ( planeReorderPossible == rhs.planeReorderPossible ) && ( persistentContent == rhs.persistentContent ); } bool operator!=( DisplayPropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::DisplayKHR display = {}; const char * displayName = {}; VULKAN_HPP_NAMESPACE::Extent2D physicalDimensions = {}; VULKAN_HPP_NAMESPACE::Extent2D physicalResolution = {}; VULKAN_HPP_NAMESPACE::SurfaceTransformFlagsKHR supportedTransforms = {}; VULKAN_HPP_NAMESPACE::Bool32 planeReorderPossible = {}; VULKAN_HPP_NAMESPACE::Bool32 persistentContent = {}; }; struct DisplayProperties2KHR { using NativeType = VkDisplayProperties2KHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDisplayProperties2KHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR DisplayProperties2KHR( VULKAN_HPP_NAMESPACE::DisplayPropertiesKHR displayProperties_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , displayProperties{ displayProperties_ } { } VULKAN_HPP_CONSTEXPR DisplayProperties2KHR( DisplayProperties2KHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; DisplayProperties2KHR( VkDisplayProperties2KHR const & rhs ) VULKAN_HPP_NOEXCEPT : DisplayProperties2KHR( *reinterpret_cast( &rhs ) ) { } DisplayProperties2KHR & operator=( DisplayProperties2KHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DisplayProperties2KHR & operator=( VkDisplayProperties2KHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkDisplayProperties2KHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDisplayProperties2KHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, displayProperties ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( DisplayProperties2KHR const & ) const = default; #else bool operator==( DisplayProperties2KHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( displayProperties == rhs.displayProperties ); # endif } bool operator!=( DisplayProperties2KHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDisplayProperties2KHR; void * pNext = {}; VULKAN_HPP_NAMESPACE::DisplayPropertiesKHR displayProperties = {}; }; template <> struct CppType { using Type = DisplayProperties2KHR; }; struct DisplaySurfaceCreateInfoKHR { using NativeType = VkDisplaySurfaceCreateInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDisplaySurfaceCreateInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR DisplaySurfaceCreateInfoKHR( VULKAN_HPP_NAMESPACE::DisplaySurfaceCreateFlagsKHR flags_ = {}, VULKAN_HPP_NAMESPACE::DisplayModeKHR displayMode_ = {}, uint32_t planeIndex_ = {}, uint32_t planeStackIndex_ = {}, VULKAN_HPP_NAMESPACE::SurfaceTransformFlagBitsKHR transform_ = VULKAN_HPP_NAMESPACE::SurfaceTransformFlagBitsKHR::eIdentity, float globalAlpha_ = {}, VULKAN_HPP_NAMESPACE::DisplayPlaneAlphaFlagBitsKHR alphaMode_ = VULKAN_HPP_NAMESPACE::DisplayPlaneAlphaFlagBitsKHR::eOpaque, VULKAN_HPP_NAMESPACE::Extent2D imageExtent_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , displayMode{ displayMode_ } , planeIndex{ planeIndex_ } , planeStackIndex{ planeStackIndex_ } , transform{ transform_ } , globalAlpha{ globalAlpha_ } , alphaMode{ alphaMode_ } , imageExtent{ imageExtent_ } { } VULKAN_HPP_CONSTEXPR DisplaySurfaceCreateInfoKHR( DisplaySurfaceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; DisplaySurfaceCreateInfoKHR( VkDisplaySurfaceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : DisplaySurfaceCreateInfoKHR( *reinterpret_cast( &rhs ) ) { } DisplaySurfaceCreateInfoKHR & operator=( DisplaySurfaceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DisplaySurfaceCreateInfoKHR & operator=( VkDisplaySurfaceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 DisplaySurfaceCreateInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 DisplaySurfaceCreateInfoKHR & setFlags( VULKAN_HPP_NAMESPACE::DisplaySurfaceCreateFlagsKHR flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 DisplaySurfaceCreateInfoKHR & setDisplayMode( VULKAN_HPP_NAMESPACE::DisplayModeKHR displayMode_ ) VULKAN_HPP_NOEXCEPT { displayMode = displayMode_; return *this; } VULKAN_HPP_CONSTEXPR_14 DisplaySurfaceCreateInfoKHR & setPlaneIndex( uint32_t planeIndex_ ) VULKAN_HPP_NOEXCEPT { planeIndex = planeIndex_; return *this; } VULKAN_HPP_CONSTEXPR_14 DisplaySurfaceCreateInfoKHR & setPlaneStackIndex( uint32_t planeStackIndex_ ) VULKAN_HPP_NOEXCEPT { planeStackIndex = planeStackIndex_; return *this; } VULKAN_HPP_CONSTEXPR_14 DisplaySurfaceCreateInfoKHR & setTransform( VULKAN_HPP_NAMESPACE::SurfaceTransformFlagBitsKHR transform_ ) VULKAN_HPP_NOEXCEPT { transform = transform_; return *this; } VULKAN_HPP_CONSTEXPR_14 DisplaySurfaceCreateInfoKHR & setGlobalAlpha( float globalAlpha_ ) VULKAN_HPP_NOEXCEPT { globalAlpha = globalAlpha_; return *this; } VULKAN_HPP_CONSTEXPR_14 DisplaySurfaceCreateInfoKHR & setAlphaMode( VULKAN_HPP_NAMESPACE::DisplayPlaneAlphaFlagBitsKHR alphaMode_ ) VULKAN_HPP_NOEXCEPT { alphaMode = alphaMode_; return *this; } VULKAN_HPP_CONSTEXPR_14 DisplaySurfaceCreateInfoKHR & setImageExtent( VULKAN_HPP_NAMESPACE::Extent2D const & imageExtent_ ) VULKAN_HPP_NOEXCEPT { imageExtent = imageExtent_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkDisplaySurfaceCreateInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDisplaySurfaceCreateInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, displayMode, planeIndex, planeStackIndex, transform, globalAlpha, alphaMode, imageExtent ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( DisplaySurfaceCreateInfoKHR const & ) const = default; #else bool operator==( DisplaySurfaceCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( displayMode == rhs.displayMode ) && ( planeIndex == rhs.planeIndex ) && ( planeStackIndex == rhs.planeStackIndex ) && ( transform == rhs.transform ) && ( globalAlpha == rhs.globalAlpha ) && ( alphaMode == rhs.alphaMode ) && ( imageExtent == rhs.imageExtent ); # endif } bool operator!=( DisplaySurfaceCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDisplaySurfaceCreateInfoKHR; const void * pNext = {}; VULKAN_HPP_NAMESPACE::DisplaySurfaceCreateFlagsKHR flags = {}; VULKAN_HPP_NAMESPACE::DisplayModeKHR displayMode = {}; uint32_t planeIndex = {}; uint32_t planeStackIndex = {}; VULKAN_HPP_NAMESPACE::SurfaceTransformFlagBitsKHR transform = VULKAN_HPP_NAMESPACE::SurfaceTransformFlagBitsKHR::eIdentity; float globalAlpha = {}; VULKAN_HPP_NAMESPACE::DisplayPlaneAlphaFlagBitsKHR alphaMode = VULKAN_HPP_NAMESPACE::DisplayPlaneAlphaFlagBitsKHR::eOpaque; VULKAN_HPP_NAMESPACE::Extent2D imageExtent = {}; }; template <> struct CppType { using Type = DisplaySurfaceCreateInfoKHR; }; struct DisplaySurfaceStereoCreateInfoNV { using NativeType = VkDisplaySurfaceStereoCreateInfoNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDisplaySurfaceStereoCreateInfoNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR DisplaySurfaceStereoCreateInfoNV( VULKAN_HPP_NAMESPACE::DisplaySurfaceStereoTypeNV stereoType_ = VULKAN_HPP_NAMESPACE::DisplaySurfaceStereoTypeNV::eNone, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , stereoType{ stereoType_ } { } VULKAN_HPP_CONSTEXPR DisplaySurfaceStereoCreateInfoNV( DisplaySurfaceStereoCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; DisplaySurfaceStereoCreateInfoNV( VkDisplaySurfaceStereoCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT : DisplaySurfaceStereoCreateInfoNV( *reinterpret_cast( &rhs ) ) { } DisplaySurfaceStereoCreateInfoNV & operator=( DisplaySurfaceStereoCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DisplaySurfaceStereoCreateInfoNV & operator=( VkDisplaySurfaceStereoCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 DisplaySurfaceStereoCreateInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 DisplaySurfaceStereoCreateInfoNV & setStereoType( VULKAN_HPP_NAMESPACE::DisplaySurfaceStereoTypeNV stereoType_ ) VULKAN_HPP_NOEXCEPT { stereoType = stereoType_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkDisplaySurfaceStereoCreateInfoNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDisplaySurfaceStereoCreateInfoNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, stereoType ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( DisplaySurfaceStereoCreateInfoNV const & ) const = default; #else bool operator==( DisplaySurfaceStereoCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( stereoType == rhs.stereoType ); # endif } bool operator!=( DisplaySurfaceStereoCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDisplaySurfaceStereoCreateInfoNV; const void * pNext = {}; VULKAN_HPP_NAMESPACE::DisplaySurfaceStereoTypeNV stereoType = VULKAN_HPP_NAMESPACE::DisplaySurfaceStereoTypeNV::eNone; }; template <> struct CppType { using Type = DisplaySurfaceStereoCreateInfoNV; }; struct DrawIndexedIndirectCommand { using NativeType = VkDrawIndexedIndirectCommand; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR DrawIndexedIndirectCommand( uint32_t indexCount_ = {}, uint32_t instanceCount_ = {}, uint32_t firstIndex_ = {}, int32_t vertexOffset_ = {}, uint32_t firstInstance_ = {} ) VULKAN_HPP_NOEXCEPT : indexCount{ indexCount_ } , instanceCount{ instanceCount_ } , firstIndex{ firstIndex_ } , vertexOffset{ vertexOffset_ } , firstInstance{ firstInstance_ } { } VULKAN_HPP_CONSTEXPR DrawIndexedIndirectCommand( DrawIndexedIndirectCommand const & rhs ) VULKAN_HPP_NOEXCEPT = default; DrawIndexedIndirectCommand( VkDrawIndexedIndirectCommand const & rhs ) VULKAN_HPP_NOEXCEPT : DrawIndexedIndirectCommand( *reinterpret_cast( &rhs ) ) { } DrawIndexedIndirectCommand & operator=( DrawIndexedIndirectCommand const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DrawIndexedIndirectCommand & operator=( VkDrawIndexedIndirectCommand const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 DrawIndexedIndirectCommand & setIndexCount( uint32_t indexCount_ ) VULKAN_HPP_NOEXCEPT { indexCount = indexCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 DrawIndexedIndirectCommand & setInstanceCount( uint32_t instanceCount_ ) VULKAN_HPP_NOEXCEPT { instanceCount = instanceCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 DrawIndexedIndirectCommand & setFirstIndex( uint32_t firstIndex_ ) VULKAN_HPP_NOEXCEPT { firstIndex = firstIndex_; return *this; } VULKAN_HPP_CONSTEXPR_14 DrawIndexedIndirectCommand & setVertexOffset( int32_t vertexOffset_ ) VULKAN_HPP_NOEXCEPT { vertexOffset = vertexOffset_; return *this; } VULKAN_HPP_CONSTEXPR_14 DrawIndexedIndirectCommand & setFirstInstance( uint32_t firstInstance_ ) VULKAN_HPP_NOEXCEPT { firstInstance = firstInstance_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkDrawIndexedIndirectCommand const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDrawIndexedIndirectCommand &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( indexCount, instanceCount, firstIndex, vertexOffset, firstInstance ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( DrawIndexedIndirectCommand const & ) const = default; #else bool operator==( DrawIndexedIndirectCommand const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( indexCount == rhs.indexCount ) && ( instanceCount == rhs.instanceCount ) && ( firstIndex == rhs.firstIndex ) && ( vertexOffset == rhs.vertexOffset ) && ( firstInstance == rhs.firstInstance ); # endif } bool operator!=( DrawIndexedIndirectCommand const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: uint32_t indexCount = {}; uint32_t instanceCount = {}; uint32_t firstIndex = {}; int32_t vertexOffset = {}; uint32_t firstInstance = {}; }; struct DrawIndirectCommand { using NativeType = VkDrawIndirectCommand; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR DrawIndirectCommand( uint32_t vertexCount_ = {}, uint32_t instanceCount_ = {}, uint32_t firstVertex_ = {}, uint32_t firstInstance_ = {} ) VULKAN_HPP_NOEXCEPT : vertexCount{ vertexCount_ } , instanceCount{ instanceCount_ } , firstVertex{ firstVertex_ } , firstInstance{ firstInstance_ } { } VULKAN_HPP_CONSTEXPR DrawIndirectCommand( DrawIndirectCommand const & rhs ) VULKAN_HPP_NOEXCEPT = default; DrawIndirectCommand( VkDrawIndirectCommand const & rhs ) VULKAN_HPP_NOEXCEPT : DrawIndirectCommand( *reinterpret_cast( &rhs ) ) { } DrawIndirectCommand & operator=( DrawIndirectCommand const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DrawIndirectCommand & operator=( VkDrawIndirectCommand const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 DrawIndirectCommand & setVertexCount( uint32_t vertexCount_ ) VULKAN_HPP_NOEXCEPT { vertexCount = vertexCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 DrawIndirectCommand & setInstanceCount( uint32_t instanceCount_ ) VULKAN_HPP_NOEXCEPT { instanceCount = instanceCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 DrawIndirectCommand & setFirstVertex( uint32_t firstVertex_ ) VULKAN_HPP_NOEXCEPT { firstVertex = firstVertex_; return *this; } VULKAN_HPP_CONSTEXPR_14 DrawIndirectCommand & setFirstInstance( uint32_t firstInstance_ ) VULKAN_HPP_NOEXCEPT { firstInstance = firstInstance_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkDrawIndirectCommand const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDrawIndirectCommand &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( vertexCount, instanceCount, firstVertex, firstInstance ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( DrawIndirectCommand const & ) const = default; #else bool operator==( DrawIndirectCommand const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( vertexCount == rhs.vertexCount ) && ( instanceCount == rhs.instanceCount ) && ( firstVertex == rhs.firstVertex ) && ( firstInstance == rhs.firstInstance ); # endif } bool operator!=( DrawIndirectCommand const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: uint32_t vertexCount = {}; uint32_t instanceCount = {}; uint32_t firstVertex = {}; uint32_t firstInstance = {}; }; struct DrawIndirectCountIndirectCommandEXT { using NativeType = VkDrawIndirectCountIndirectCommandEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR DrawIndirectCountIndirectCommandEXT( VULKAN_HPP_NAMESPACE::DeviceAddress bufferAddress_ = {}, uint32_t stride_ = {}, uint32_t commandCount_ = {} ) VULKAN_HPP_NOEXCEPT : bufferAddress{ bufferAddress_ } , stride{ stride_ } , commandCount{ commandCount_ } { } VULKAN_HPP_CONSTEXPR DrawIndirectCountIndirectCommandEXT( DrawIndirectCountIndirectCommandEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; DrawIndirectCountIndirectCommandEXT( VkDrawIndirectCountIndirectCommandEXT const & rhs ) VULKAN_HPP_NOEXCEPT : DrawIndirectCountIndirectCommandEXT( *reinterpret_cast( &rhs ) ) { } DrawIndirectCountIndirectCommandEXT & operator=( DrawIndirectCountIndirectCommandEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DrawIndirectCountIndirectCommandEXT & operator=( VkDrawIndirectCountIndirectCommandEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 DrawIndirectCountIndirectCommandEXT & setBufferAddress( VULKAN_HPP_NAMESPACE::DeviceAddress bufferAddress_ ) VULKAN_HPP_NOEXCEPT { bufferAddress = bufferAddress_; return *this; } VULKAN_HPP_CONSTEXPR_14 DrawIndirectCountIndirectCommandEXT & setStride( uint32_t stride_ ) VULKAN_HPP_NOEXCEPT { stride = stride_; return *this; } VULKAN_HPP_CONSTEXPR_14 DrawIndirectCountIndirectCommandEXT & setCommandCount( uint32_t commandCount_ ) VULKAN_HPP_NOEXCEPT { commandCount = commandCount_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkDrawIndirectCountIndirectCommandEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDrawIndirectCountIndirectCommandEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( bufferAddress, stride, commandCount ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( DrawIndirectCountIndirectCommandEXT const & ) const = default; #else bool operator==( DrawIndirectCountIndirectCommandEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( bufferAddress == rhs.bufferAddress ) && ( stride == rhs.stride ) && ( commandCount == rhs.commandCount ); # endif } bool operator!=( DrawIndirectCountIndirectCommandEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::DeviceAddress bufferAddress = {}; uint32_t stride = {}; uint32_t commandCount = {}; }; struct DrawMeshTasksIndirectCommandEXT { using NativeType = VkDrawMeshTasksIndirectCommandEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR DrawMeshTasksIndirectCommandEXT( uint32_t groupCountX_ = {}, uint32_t groupCountY_ = {}, uint32_t groupCountZ_ = {} ) VULKAN_HPP_NOEXCEPT : groupCountX{ groupCountX_ } , groupCountY{ groupCountY_ } , groupCountZ{ groupCountZ_ } { } VULKAN_HPP_CONSTEXPR DrawMeshTasksIndirectCommandEXT( DrawMeshTasksIndirectCommandEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; DrawMeshTasksIndirectCommandEXT( VkDrawMeshTasksIndirectCommandEXT const & rhs ) VULKAN_HPP_NOEXCEPT : DrawMeshTasksIndirectCommandEXT( *reinterpret_cast( &rhs ) ) { } DrawMeshTasksIndirectCommandEXT & operator=( DrawMeshTasksIndirectCommandEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DrawMeshTasksIndirectCommandEXT & operator=( VkDrawMeshTasksIndirectCommandEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 DrawMeshTasksIndirectCommandEXT & setGroupCountX( uint32_t groupCountX_ ) VULKAN_HPP_NOEXCEPT { groupCountX = groupCountX_; return *this; } VULKAN_HPP_CONSTEXPR_14 DrawMeshTasksIndirectCommandEXT & setGroupCountY( uint32_t groupCountY_ ) VULKAN_HPP_NOEXCEPT { groupCountY = groupCountY_; return *this; } VULKAN_HPP_CONSTEXPR_14 DrawMeshTasksIndirectCommandEXT & setGroupCountZ( uint32_t groupCountZ_ ) VULKAN_HPP_NOEXCEPT { groupCountZ = groupCountZ_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkDrawMeshTasksIndirectCommandEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDrawMeshTasksIndirectCommandEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( groupCountX, groupCountY, groupCountZ ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( DrawMeshTasksIndirectCommandEXT const & ) const = default; #else bool operator==( DrawMeshTasksIndirectCommandEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( groupCountX == rhs.groupCountX ) && ( groupCountY == rhs.groupCountY ) && ( groupCountZ == rhs.groupCountZ ); # endif } bool operator!=( DrawMeshTasksIndirectCommandEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: uint32_t groupCountX = {}; uint32_t groupCountY = {}; uint32_t groupCountZ = {}; }; struct DrawMeshTasksIndirectCommandNV { using NativeType = VkDrawMeshTasksIndirectCommandNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR DrawMeshTasksIndirectCommandNV( uint32_t taskCount_ = {}, uint32_t firstTask_ = {} ) VULKAN_HPP_NOEXCEPT : taskCount{ taskCount_ } , firstTask{ firstTask_ } { } VULKAN_HPP_CONSTEXPR DrawMeshTasksIndirectCommandNV( DrawMeshTasksIndirectCommandNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; DrawMeshTasksIndirectCommandNV( VkDrawMeshTasksIndirectCommandNV const & rhs ) VULKAN_HPP_NOEXCEPT : DrawMeshTasksIndirectCommandNV( *reinterpret_cast( &rhs ) ) { } DrawMeshTasksIndirectCommandNV & operator=( DrawMeshTasksIndirectCommandNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DrawMeshTasksIndirectCommandNV & operator=( VkDrawMeshTasksIndirectCommandNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 DrawMeshTasksIndirectCommandNV & setTaskCount( uint32_t taskCount_ ) VULKAN_HPP_NOEXCEPT { taskCount = taskCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 DrawMeshTasksIndirectCommandNV & setFirstTask( uint32_t firstTask_ ) VULKAN_HPP_NOEXCEPT { firstTask = firstTask_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkDrawMeshTasksIndirectCommandNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDrawMeshTasksIndirectCommandNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( taskCount, firstTask ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( DrawMeshTasksIndirectCommandNV const & ) const = default; #else bool operator==( DrawMeshTasksIndirectCommandNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( taskCount == rhs.taskCount ) && ( firstTask == rhs.firstTask ); # endif } bool operator!=( DrawMeshTasksIndirectCommandNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: uint32_t taskCount = {}; uint32_t firstTask = {}; }; struct DrmFormatModifierProperties2EXT { using NativeType = VkDrmFormatModifierProperties2EXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR DrmFormatModifierProperties2EXT( uint64_t drmFormatModifier_ = {}, uint32_t drmFormatModifierPlaneCount_ = {}, VULKAN_HPP_NAMESPACE::FormatFeatureFlags2 drmFormatModifierTilingFeatures_ = {} ) VULKAN_HPP_NOEXCEPT : drmFormatModifier{ drmFormatModifier_ } , drmFormatModifierPlaneCount{ drmFormatModifierPlaneCount_ } , drmFormatModifierTilingFeatures{ drmFormatModifierTilingFeatures_ } { } VULKAN_HPP_CONSTEXPR DrmFormatModifierProperties2EXT( DrmFormatModifierProperties2EXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; DrmFormatModifierProperties2EXT( VkDrmFormatModifierProperties2EXT const & rhs ) VULKAN_HPP_NOEXCEPT : DrmFormatModifierProperties2EXT( *reinterpret_cast( &rhs ) ) { } DrmFormatModifierProperties2EXT & operator=( DrmFormatModifierProperties2EXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DrmFormatModifierProperties2EXT & operator=( VkDrmFormatModifierProperties2EXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkDrmFormatModifierProperties2EXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDrmFormatModifierProperties2EXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( drmFormatModifier, drmFormatModifierPlaneCount, drmFormatModifierTilingFeatures ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( DrmFormatModifierProperties2EXT const & ) const = default; #else bool operator==( DrmFormatModifierProperties2EXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( drmFormatModifier == rhs.drmFormatModifier ) && ( drmFormatModifierPlaneCount == rhs.drmFormatModifierPlaneCount ) && ( drmFormatModifierTilingFeatures == rhs.drmFormatModifierTilingFeatures ); # endif } bool operator!=( DrmFormatModifierProperties2EXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: uint64_t drmFormatModifier = {}; uint32_t drmFormatModifierPlaneCount = {}; VULKAN_HPP_NAMESPACE::FormatFeatureFlags2 drmFormatModifierTilingFeatures = {}; }; struct DrmFormatModifierPropertiesEXT { using NativeType = VkDrmFormatModifierPropertiesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR DrmFormatModifierPropertiesEXT( uint64_t drmFormatModifier_ = {}, uint32_t drmFormatModifierPlaneCount_ = {}, VULKAN_HPP_NAMESPACE::FormatFeatureFlags drmFormatModifierTilingFeatures_ = {} ) VULKAN_HPP_NOEXCEPT : drmFormatModifier{ drmFormatModifier_ } , drmFormatModifierPlaneCount{ drmFormatModifierPlaneCount_ } , drmFormatModifierTilingFeatures{ drmFormatModifierTilingFeatures_ } { } VULKAN_HPP_CONSTEXPR DrmFormatModifierPropertiesEXT( DrmFormatModifierPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; DrmFormatModifierPropertiesEXT( VkDrmFormatModifierPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : DrmFormatModifierPropertiesEXT( *reinterpret_cast( &rhs ) ) { } DrmFormatModifierPropertiesEXT & operator=( DrmFormatModifierPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DrmFormatModifierPropertiesEXT & operator=( VkDrmFormatModifierPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkDrmFormatModifierPropertiesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDrmFormatModifierPropertiesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( drmFormatModifier, drmFormatModifierPlaneCount, drmFormatModifierTilingFeatures ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( DrmFormatModifierPropertiesEXT const & ) const = default; #else bool operator==( DrmFormatModifierPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( drmFormatModifier == rhs.drmFormatModifier ) && ( drmFormatModifierPlaneCount == rhs.drmFormatModifierPlaneCount ) && ( drmFormatModifierTilingFeatures == rhs.drmFormatModifierTilingFeatures ); # endif } bool operator!=( DrmFormatModifierPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: uint64_t drmFormatModifier = {}; uint32_t drmFormatModifierPlaneCount = {}; VULKAN_HPP_NAMESPACE::FormatFeatureFlags drmFormatModifierTilingFeatures = {}; }; struct DrmFormatModifierPropertiesList2EXT { using NativeType = VkDrmFormatModifierPropertiesList2EXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDrmFormatModifierPropertiesList2EXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR DrmFormatModifierPropertiesList2EXT( uint32_t drmFormatModifierCount_ = {}, VULKAN_HPP_NAMESPACE::DrmFormatModifierProperties2EXT * pDrmFormatModifierProperties_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , drmFormatModifierCount{ drmFormatModifierCount_ } , pDrmFormatModifierProperties{ pDrmFormatModifierProperties_ } { } VULKAN_HPP_CONSTEXPR DrmFormatModifierPropertiesList2EXT( DrmFormatModifierPropertiesList2EXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; DrmFormatModifierPropertiesList2EXT( VkDrmFormatModifierPropertiesList2EXT const & rhs ) VULKAN_HPP_NOEXCEPT : DrmFormatModifierPropertiesList2EXT( *reinterpret_cast( &rhs ) ) { } DrmFormatModifierPropertiesList2EXT & operator=( DrmFormatModifierPropertiesList2EXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DrmFormatModifierPropertiesList2EXT & operator=( VkDrmFormatModifierPropertiesList2EXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkDrmFormatModifierPropertiesList2EXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDrmFormatModifierPropertiesList2EXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, drmFormatModifierCount, pDrmFormatModifierProperties ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( DrmFormatModifierPropertiesList2EXT const & ) const = default; #else bool operator==( DrmFormatModifierPropertiesList2EXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( drmFormatModifierCount == rhs.drmFormatModifierCount ) && ( pDrmFormatModifierProperties == rhs.pDrmFormatModifierProperties ); # endif } bool operator!=( DrmFormatModifierPropertiesList2EXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDrmFormatModifierPropertiesList2EXT; void * pNext = {}; uint32_t drmFormatModifierCount = {}; VULKAN_HPP_NAMESPACE::DrmFormatModifierProperties2EXT * pDrmFormatModifierProperties = {}; }; template <> struct CppType { using Type = DrmFormatModifierPropertiesList2EXT; }; struct DrmFormatModifierPropertiesListEXT { using NativeType = VkDrmFormatModifierPropertiesListEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eDrmFormatModifierPropertiesListEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR DrmFormatModifierPropertiesListEXT( uint32_t drmFormatModifierCount_ = {}, VULKAN_HPP_NAMESPACE::DrmFormatModifierPropertiesEXT * pDrmFormatModifierProperties_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , drmFormatModifierCount{ drmFormatModifierCount_ } , pDrmFormatModifierProperties{ pDrmFormatModifierProperties_ } { } VULKAN_HPP_CONSTEXPR DrmFormatModifierPropertiesListEXT( DrmFormatModifierPropertiesListEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; DrmFormatModifierPropertiesListEXT( VkDrmFormatModifierPropertiesListEXT const & rhs ) VULKAN_HPP_NOEXCEPT : DrmFormatModifierPropertiesListEXT( *reinterpret_cast( &rhs ) ) { } DrmFormatModifierPropertiesListEXT & operator=( DrmFormatModifierPropertiesListEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ DrmFormatModifierPropertiesListEXT & operator=( VkDrmFormatModifierPropertiesListEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkDrmFormatModifierPropertiesListEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkDrmFormatModifierPropertiesListEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, drmFormatModifierCount, pDrmFormatModifierProperties ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( DrmFormatModifierPropertiesListEXT const & ) const = default; #else bool operator==( DrmFormatModifierPropertiesListEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( drmFormatModifierCount == rhs.drmFormatModifierCount ) && ( pDrmFormatModifierProperties == rhs.pDrmFormatModifierProperties ); # endif } bool operator!=( DrmFormatModifierPropertiesListEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eDrmFormatModifierPropertiesListEXT; void * pNext = {}; uint32_t drmFormatModifierCount = {}; VULKAN_HPP_NAMESPACE::DrmFormatModifierPropertiesEXT * pDrmFormatModifierProperties = {}; }; template <> struct CppType { using Type = DrmFormatModifierPropertiesListEXT; }; struct EventCreateInfo { using NativeType = VkEventCreateInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eEventCreateInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR EventCreateInfo( VULKAN_HPP_NAMESPACE::EventCreateFlags flags_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } { } VULKAN_HPP_CONSTEXPR EventCreateInfo( EventCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; EventCreateInfo( VkEventCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT : EventCreateInfo( *reinterpret_cast( &rhs ) ) {} EventCreateInfo & operator=( EventCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ EventCreateInfo & operator=( VkEventCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 EventCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 EventCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::EventCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkEventCreateInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkEventCreateInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( EventCreateInfo const & ) const = default; #else bool operator==( EventCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ); # endif } bool operator!=( EventCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eEventCreateInfo; const void * pNext = {}; VULKAN_HPP_NAMESPACE::EventCreateFlags flags = {}; }; template <> struct CppType { using Type = EventCreateInfo; }; struct PipelineLibraryCreateInfoKHR { using NativeType = VkPipelineLibraryCreateInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineLibraryCreateInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PipelineLibraryCreateInfoKHR( uint32_t libraryCount_ = {}, const VULKAN_HPP_NAMESPACE::Pipeline * pLibraries_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , libraryCount{ libraryCount_ } , pLibraries{ pLibraries_ } { } VULKAN_HPP_CONSTEXPR PipelineLibraryCreateInfoKHR( PipelineLibraryCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; PipelineLibraryCreateInfoKHR( VkPipelineLibraryCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : PipelineLibraryCreateInfoKHR( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) PipelineLibraryCreateInfoKHR( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & libraries_, const void * pNext_ = nullptr ) : pNext( pNext_ ), libraryCount( static_cast( libraries_.size() ) ), pLibraries( libraries_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ PipelineLibraryCreateInfoKHR & operator=( PipelineLibraryCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PipelineLibraryCreateInfoKHR & operator=( VkPipelineLibraryCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PipelineLibraryCreateInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineLibraryCreateInfoKHR & setLibraryCount( uint32_t libraryCount_ ) VULKAN_HPP_NOEXCEPT { libraryCount = libraryCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineLibraryCreateInfoKHR & setPLibraries( const VULKAN_HPP_NAMESPACE::Pipeline * pLibraries_ ) VULKAN_HPP_NOEXCEPT { pLibraries = pLibraries_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) PipelineLibraryCreateInfoKHR & setLibraries( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & libraries_ ) VULKAN_HPP_NOEXCEPT { libraryCount = static_cast( libraries_.size() ); pLibraries = libraries_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPipelineLibraryCreateInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPipelineLibraryCreateInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, libraryCount, pLibraries ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PipelineLibraryCreateInfoKHR const & ) const = default; #else bool operator==( PipelineLibraryCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( libraryCount == rhs.libraryCount ) && ( pLibraries == rhs.pLibraries ); # endif } bool operator!=( PipelineLibraryCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineLibraryCreateInfoKHR; const void * pNext = {}; uint32_t libraryCount = {}; const VULKAN_HPP_NAMESPACE::Pipeline * pLibraries = {}; }; template <> struct CppType { using Type = PipelineLibraryCreateInfoKHR; }; #if defined( VK_ENABLE_BETA_EXTENSIONS ) struct ExecutionGraphPipelineCreateInfoAMDX { using NativeType = VkExecutionGraphPipelineCreateInfoAMDX; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eExecutionGraphPipelineCreateInfoAMDX; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ExecutionGraphPipelineCreateInfoAMDX( VULKAN_HPP_NAMESPACE::PipelineCreateFlags flags_ = {}, uint32_t stageCount_ = {}, const VULKAN_HPP_NAMESPACE::PipelineShaderStageCreateInfo * pStages_ = {}, const VULKAN_HPP_NAMESPACE::PipelineLibraryCreateInfoKHR * pLibraryInfo_ = {}, VULKAN_HPP_NAMESPACE::PipelineLayout layout_ = {}, VULKAN_HPP_NAMESPACE::Pipeline basePipelineHandle_ = {}, int32_t basePipelineIndex_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , stageCount{ stageCount_ } , pStages{ pStages_ } , pLibraryInfo{ pLibraryInfo_ } , layout{ layout_ } , basePipelineHandle{ basePipelineHandle_ } , basePipelineIndex{ basePipelineIndex_ } { } VULKAN_HPP_CONSTEXPR ExecutionGraphPipelineCreateInfoAMDX( ExecutionGraphPipelineCreateInfoAMDX const & rhs ) VULKAN_HPP_NOEXCEPT = default; ExecutionGraphPipelineCreateInfoAMDX( VkExecutionGraphPipelineCreateInfoAMDX const & rhs ) VULKAN_HPP_NOEXCEPT : ExecutionGraphPipelineCreateInfoAMDX( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) ExecutionGraphPipelineCreateInfoAMDX( VULKAN_HPP_NAMESPACE::PipelineCreateFlags flags_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & stages_, const VULKAN_HPP_NAMESPACE::PipelineLibraryCreateInfoKHR * pLibraryInfo_ = {}, VULKAN_HPP_NAMESPACE::PipelineLayout layout_ = {}, VULKAN_HPP_NAMESPACE::Pipeline basePipelineHandle_ = {}, int32_t basePipelineIndex_ = {}, const void * pNext_ = nullptr ) : pNext( pNext_ ) , flags( flags_ ) , stageCount( static_cast( stages_.size() ) ) , pStages( stages_.data() ) , pLibraryInfo( pLibraryInfo_ ) , layout( layout_ ) , basePipelineHandle( basePipelineHandle_ ) , basePipelineIndex( basePipelineIndex_ ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ ExecutionGraphPipelineCreateInfoAMDX & operator=( ExecutionGraphPipelineCreateInfoAMDX const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ExecutionGraphPipelineCreateInfoAMDX & operator=( VkExecutionGraphPipelineCreateInfoAMDX const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } # if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ExecutionGraphPipelineCreateInfoAMDX & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ExecutionGraphPipelineCreateInfoAMDX & setFlags( VULKAN_HPP_NAMESPACE::PipelineCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 ExecutionGraphPipelineCreateInfoAMDX & setStageCount( uint32_t stageCount_ ) VULKAN_HPP_NOEXCEPT { stageCount = stageCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 ExecutionGraphPipelineCreateInfoAMDX & setPStages( const VULKAN_HPP_NAMESPACE::PipelineShaderStageCreateInfo * pStages_ ) VULKAN_HPP_NOEXCEPT { pStages = pStages_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) ExecutionGraphPipelineCreateInfoAMDX & setStages( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & stages_ ) VULKAN_HPP_NOEXCEPT { stageCount = static_cast( stages_.size() ); pStages = stages_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 ExecutionGraphPipelineCreateInfoAMDX & setPLibraryInfo( const VULKAN_HPP_NAMESPACE::PipelineLibraryCreateInfoKHR * pLibraryInfo_ ) VULKAN_HPP_NOEXCEPT { pLibraryInfo = pLibraryInfo_; return *this; } VULKAN_HPP_CONSTEXPR_14 ExecutionGraphPipelineCreateInfoAMDX & setLayout( VULKAN_HPP_NAMESPACE::PipelineLayout layout_ ) VULKAN_HPP_NOEXCEPT { layout = layout_; return *this; } VULKAN_HPP_CONSTEXPR_14 ExecutionGraphPipelineCreateInfoAMDX & setBasePipelineHandle( VULKAN_HPP_NAMESPACE::Pipeline basePipelineHandle_ ) VULKAN_HPP_NOEXCEPT { basePipelineHandle = basePipelineHandle_; return *this; } VULKAN_HPP_CONSTEXPR_14 ExecutionGraphPipelineCreateInfoAMDX & setBasePipelineIndex( int32_t basePipelineIndex_ ) VULKAN_HPP_NOEXCEPT { basePipelineIndex = basePipelineIndex_; return *this; } # endif /*VULKAN_HPP_NO_SETTERS*/ operator VkExecutionGraphPipelineCreateInfoAMDX const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkExecutionGraphPipelineCreateInfoAMDX &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, stageCount, pStages, pLibraryInfo, layout, basePipelineHandle, basePipelineIndex ); } # endif # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ExecutionGraphPipelineCreateInfoAMDX const & ) const = default; # else bool operator==( ExecutionGraphPipelineCreateInfoAMDX const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( stageCount == rhs.stageCount ) && ( pStages == rhs.pStages ) && ( pLibraryInfo == rhs.pLibraryInfo ) && ( layout == rhs.layout ) && ( basePipelineHandle == rhs.basePipelineHandle ) && ( basePipelineIndex == rhs.basePipelineIndex ); # endif } bool operator!=( ExecutionGraphPipelineCreateInfoAMDX const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } # endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eExecutionGraphPipelineCreateInfoAMDX; const void * pNext = {}; VULKAN_HPP_NAMESPACE::PipelineCreateFlags flags = {}; uint32_t stageCount = {}; const VULKAN_HPP_NAMESPACE::PipelineShaderStageCreateInfo * pStages = {}; const VULKAN_HPP_NAMESPACE::PipelineLibraryCreateInfoKHR * pLibraryInfo = {}; VULKAN_HPP_NAMESPACE::PipelineLayout layout = {}; VULKAN_HPP_NAMESPACE::Pipeline basePipelineHandle = {}; int32_t basePipelineIndex = {}; }; template <> struct CppType { using Type = ExecutionGraphPipelineCreateInfoAMDX; }; #endif /*VK_ENABLE_BETA_EXTENSIONS*/ #if defined( VK_ENABLE_BETA_EXTENSIONS ) struct ExecutionGraphPipelineScratchSizeAMDX { using NativeType = VkExecutionGraphPipelineScratchSizeAMDX; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eExecutionGraphPipelineScratchSizeAMDX; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ExecutionGraphPipelineScratchSizeAMDX( VULKAN_HPP_NAMESPACE::DeviceSize minSize_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize maxSize_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize sizeGranularity_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , minSize{ minSize_ } , maxSize{ maxSize_ } , sizeGranularity{ sizeGranularity_ } { } VULKAN_HPP_CONSTEXPR ExecutionGraphPipelineScratchSizeAMDX( ExecutionGraphPipelineScratchSizeAMDX const & rhs ) VULKAN_HPP_NOEXCEPT = default; ExecutionGraphPipelineScratchSizeAMDX( VkExecutionGraphPipelineScratchSizeAMDX const & rhs ) VULKAN_HPP_NOEXCEPT : ExecutionGraphPipelineScratchSizeAMDX( *reinterpret_cast( &rhs ) ) { } ExecutionGraphPipelineScratchSizeAMDX & operator=( ExecutionGraphPipelineScratchSizeAMDX const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ExecutionGraphPipelineScratchSizeAMDX & operator=( VkExecutionGraphPipelineScratchSizeAMDX const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } # if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ExecutionGraphPipelineScratchSizeAMDX & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ExecutionGraphPipelineScratchSizeAMDX & setMinSize( VULKAN_HPP_NAMESPACE::DeviceSize minSize_ ) VULKAN_HPP_NOEXCEPT { minSize = minSize_; return *this; } VULKAN_HPP_CONSTEXPR_14 ExecutionGraphPipelineScratchSizeAMDX & setMaxSize( VULKAN_HPP_NAMESPACE::DeviceSize maxSize_ ) VULKAN_HPP_NOEXCEPT { maxSize = maxSize_; return *this; } VULKAN_HPP_CONSTEXPR_14 ExecutionGraphPipelineScratchSizeAMDX & setSizeGranularity( VULKAN_HPP_NAMESPACE::DeviceSize sizeGranularity_ ) VULKAN_HPP_NOEXCEPT { sizeGranularity = sizeGranularity_; return *this; } # endif /*VULKAN_HPP_NO_SETTERS*/ operator VkExecutionGraphPipelineScratchSizeAMDX const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkExecutionGraphPipelineScratchSizeAMDX &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, minSize, maxSize, sizeGranularity ); } # endif # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ExecutionGraphPipelineScratchSizeAMDX const & ) const = default; # else bool operator==( ExecutionGraphPipelineScratchSizeAMDX const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( minSize == rhs.minSize ) && ( maxSize == rhs.maxSize ) && ( sizeGranularity == rhs.sizeGranularity ); # endif } bool operator!=( ExecutionGraphPipelineScratchSizeAMDX const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } # endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eExecutionGraphPipelineScratchSizeAMDX; void * pNext = {}; VULKAN_HPP_NAMESPACE::DeviceSize minSize = {}; VULKAN_HPP_NAMESPACE::DeviceSize maxSize = {}; VULKAN_HPP_NAMESPACE::DeviceSize sizeGranularity = {}; }; template <> struct CppType { using Type = ExecutionGraphPipelineScratchSizeAMDX; }; #endif /*VK_ENABLE_BETA_EXTENSIONS*/ struct ExportFenceCreateInfo { using NativeType = VkExportFenceCreateInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eExportFenceCreateInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ExportFenceCreateInfo( VULKAN_HPP_NAMESPACE::ExternalFenceHandleTypeFlags handleTypes_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , handleTypes{ handleTypes_ } { } VULKAN_HPP_CONSTEXPR ExportFenceCreateInfo( ExportFenceCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; ExportFenceCreateInfo( VkExportFenceCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT : ExportFenceCreateInfo( *reinterpret_cast( &rhs ) ) { } ExportFenceCreateInfo & operator=( ExportFenceCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ExportFenceCreateInfo & operator=( VkExportFenceCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ExportFenceCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ExportFenceCreateInfo & setHandleTypes( VULKAN_HPP_NAMESPACE::ExternalFenceHandleTypeFlags handleTypes_ ) VULKAN_HPP_NOEXCEPT { handleTypes = handleTypes_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkExportFenceCreateInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkExportFenceCreateInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, handleTypes ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ExportFenceCreateInfo const & ) const = default; #else bool operator==( ExportFenceCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( handleTypes == rhs.handleTypes ); # endif } bool operator!=( ExportFenceCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eExportFenceCreateInfo; const void * pNext = {}; VULKAN_HPP_NAMESPACE::ExternalFenceHandleTypeFlags handleTypes = {}; }; template <> struct CppType { using Type = ExportFenceCreateInfo; }; using ExportFenceCreateInfoKHR = ExportFenceCreateInfo; #if defined( VK_USE_PLATFORM_WIN32_KHR ) struct ExportFenceWin32HandleInfoKHR { using NativeType = VkExportFenceWin32HandleInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eExportFenceWin32HandleInfoKHR; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ExportFenceWin32HandleInfoKHR( const SECURITY_ATTRIBUTES * pAttributes_ = {}, DWORD dwAccess_ = {}, LPCWSTR name_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , pAttributes{ pAttributes_ } , dwAccess{ dwAccess_ } , name{ name_ } { } VULKAN_HPP_CONSTEXPR ExportFenceWin32HandleInfoKHR( ExportFenceWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; ExportFenceWin32HandleInfoKHR( VkExportFenceWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : ExportFenceWin32HandleInfoKHR( *reinterpret_cast( &rhs ) ) { } ExportFenceWin32HandleInfoKHR & operator=( ExportFenceWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ExportFenceWin32HandleInfoKHR & operator=( VkExportFenceWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } # if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ExportFenceWin32HandleInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ExportFenceWin32HandleInfoKHR & setPAttributes( const SECURITY_ATTRIBUTES * pAttributes_ ) VULKAN_HPP_NOEXCEPT { pAttributes = pAttributes_; return *this; } VULKAN_HPP_CONSTEXPR_14 ExportFenceWin32HandleInfoKHR & setDwAccess( DWORD dwAccess_ ) VULKAN_HPP_NOEXCEPT { dwAccess = dwAccess_; return *this; } VULKAN_HPP_CONSTEXPR_14 ExportFenceWin32HandleInfoKHR & setName( LPCWSTR name_ ) VULKAN_HPP_NOEXCEPT { name = name_; return *this; } # endif /*VULKAN_HPP_NO_SETTERS*/ operator VkExportFenceWin32HandleInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkExportFenceWin32HandleInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, pAttributes, dwAccess, name ); } # endif # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ExportFenceWin32HandleInfoKHR const & ) const = default; # else bool operator==( ExportFenceWin32HandleInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( pAttributes == rhs.pAttributes ) && ( dwAccess == rhs.dwAccess ) && ( name == rhs.name ); # endif } bool operator!=( ExportFenceWin32HandleInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } # endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eExportFenceWin32HandleInfoKHR; const void * pNext = {}; const SECURITY_ATTRIBUTES * pAttributes = {}; DWORD dwAccess = {}; LPCWSTR name = {}; }; template <> struct CppType { using Type = ExportFenceWin32HandleInfoKHR; }; #endif /*VK_USE_PLATFORM_WIN32_KHR*/ struct ExportMemoryAllocateInfo { using NativeType = VkExportMemoryAllocateInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eExportMemoryAllocateInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ExportMemoryAllocateInfo( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlags handleTypes_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , handleTypes{ handleTypes_ } { } VULKAN_HPP_CONSTEXPR ExportMemoryAllocateInfo( ExportMemoryAllocateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; ExportMemoryAllocateInfo( VkExportMemoryAllocateInfo const & rhs ) VULKAN_HPP_NOEXCEPT : ExportMemoryAllocateInfo( *reinterpret_cast( &rhs ) ) { } ExportMemoryAllocateInfo & operator=( ExportMemoryAllocateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ExportMemoryAllocateInfo & operator=( VkExportMemoryAllocateInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ExportMemoryAllocateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ExportMemoryAllocateInfo & setHandleTypes( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlags handleTypes_ ) VULKAN_HPP_NOEXCEPT { handleTypes = handleTypes_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkExportMemoryAllocateInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkExportMemoryAllocateInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, handleTypes ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ExportMemoryAllocateInfo const & ) const = default; #else bool operator==( ExportMemoryAllocateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( handleTypes == rhs.handleTypes ); # endif } bool operator!=( ExportMemoryAllocateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eExportMemoryAllocateInfo; const void * pNext = {}; VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlags handleTypes = {}; }; template <> struct CppType { using Type = ExportMemoryAllocateInfo; }; using ExportMemoryAllocateInfoKHR = ExportMemoryAllocateInfo; struct ExportMemoryAllocateInfoNV { using NativeType = VkExportMemoryAllocateInfoNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eExportMemoryAllocateInfoNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ExportMemoryAllocateInfoNV( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagsNV handleTypes_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , handleTypes{ handleTypes_ } { } VULKAN_HPP_CONSTEXPR ExportMemoryAllocateInfoNV( ExportMemoryAllocateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; ExportMemoryAllocateInfoNV( VkExportMemoryAllocateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT : ExportMemoryAllocateInfoNV( *reinterpret_cast( &rhs ) ) { } ExportMemoryAllocateInfoNV & operator=( ExportMemoryAllocateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ExportMemoryAllocateInfoNV & operator=( VkExportMemoryAllocateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ExportMemoryAllocateInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ExportMemoryAllocateInfoNV & setHandleTypes( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagsNV handleTypes_ ) VULKAN_HPP_NOEXCEPT { handleTypes = handleTypes_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkExportMemoryAllocateInfoNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkExportMemoryAllocateInfoNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, handleTypes ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ExportMemoryAllocateInfoNV const & ) const = default; #else bool operator==( ExportMemoryAllocateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( handleTypes == rhs.handleTypes ); # endif } bool operator!=( ExportMemoryAllocateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eExportMemoryAllocateInfoNV; const void * pNext = {}; VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagsNV handleTypes = {}; }; template <> struct CppType { using Type = ExportMemoryAllocateInfoNV; }; #if defined( VK_USE_PLATFORM_WIN32_KHR ) struct ExportMemoryWin32HandleInfoKHR { using NativeType = VkExportMemoryWin32HandleInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eExportMemoryWin32HandleInfoKHR; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ExportMemoryWin32HandleInfoKHR( const SECURITY_ATTRIBUTES * pAttributes_ = {}, DWORD dwAccess_ = {}, LPCWSTR name_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , pAttributes{ pAttributes_ } , dwAccess{ dwAccess_ } , name{ name_ } { } VULKAN_HPP_CONSTEXPR ExportMemoryWin32HandleInfoKHR( ExportMemoryWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; ExportMemoryWin32HandleInfoKHR( VkExportMemoryWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : ExportMemoryWin32HandleInfoKHR( *reinterpret_cast( &rhs ) ) { } ExportMemoryWin32HandleInfoKHR & operator=( ExportMemoryWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ExportMemoryWin32HandleInfoKHR & operator=( VkExportMemoryWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } # if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ExportMemoryWin32HandleInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ExportMemoryWin32HandleInfoKHR & setPAttributes( const SECURITY_ATTRIBUTES * pAttributes_ ) VULKAN_HPP_NOEXCEPT { pAttributes = pAttributes_; return *this; } VULKAN_HPP_CONSTEXPR_14 ExportMemoryWin32HandleInfoKHR & setDwAccess( DWORD dwAccess_ ) VULKAN_HPP_NOEXCEPT { dwAccess = dwAccess_; return *this; } VULKAN_HPP_CONSTEXPR_14 ExportMemoryWin32HandleInfoKHR & setName( LPCWSTR name_ ) VULKAN_HPP_NOEXCEPT { name = name_; return *this; } # endif /*VULKAN_HPP_NO_SETTERS*/ operator VkExportMemoryWin32HandleInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkExportMemoryWin32HandleInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, pAttributes, dwAccess, name ); } # endif # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ExportMemoryWin32HandleInfoKHR const & ) const = default; # else bool operator==( ExportMemoryWin32HandleInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( pAttributes == rhs.pAttributes ) && ( dwAccess == rhs.dwAccess ) && ( name == rhs.name ); # endif } bool operator!=( ExportMemoryWin32HandleInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } # endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eExportMemoryWin32HandleInfoKHR; const void * pNext = {}; const SECURITY_ATTRIBUTES * pAttributes = {}; DWORD dwAccess = {}; LPCWSTR name = {}; }; template <> struct CppType { using Type = ExportMemoryWin32HandleInfoKHR; }; #endif /*VK_USE_PLATFORM_WIN32_KHR*/ #if defined( VK_USE_PLATFORM_WIN32_KHR ) struct ExportMemoryWin32HandleInfoNV { using NativeType = VkExportMemoryWin32HandleInfoNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eExportMemoryWin32HandleInfoNV; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ExportMemoryWin32HandleInfoNV( const SECURITY_ATTRIBUTES * pAttributes_ = {}, DWORD dwAccess_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , pAttributes{ pAttributes_ } , dwAccess{ dwAccess_ } { } VULKAN_HPP_CONSTEXPR ExportMemoryWin32HandleInfoNV( ExportMemoryWin32HandleInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; ExportMemoryWin32HandleInfoNV( VkExportMemoryWin32HandleInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT : ExportMemoryWin32HandleInfoNV( *reinterpret_cast( &rhs ) ) { } ExportMemoryWin32HandleInfoNV & operator=( ExportMemoryWin32HandleInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ExportMemoryWin32HandleInfoNV & operator=( VkExportMemoryWin32HandleInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } # if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ExportMemoryWin32HandleInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ExportMemoryWin32HandleInfoNV & setPAttributes( const SECURITY_ATTRIBUTES * pAttributes_ ) VULKAN_HPP_NOEXCEPT { pAttributes = pAttributes_; return *this; } VULKAN_HPP_CONSTEXPR_14 ExportMemoryWin32HandleInfoNV & setDwAccess( DWORD dwAccess_ ) VULKAN_HPP_NOEXCEPT { dwAccess = dwAccess_; return *this; } # endif /*VULKAN_HPP_NO_SETTERS*/ operator VkExportMemoryWin32HandleInfoNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkExportMemoryWin32HandleInfoNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, pAttributes, dwAccess ); } # endif # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ExportMemoryWin32HandleInfoNV const & ) const = default; # else bool operator==( ExportMemoryWin32HandleInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( pAttributes == rhs.pAttributes ) && ( dwAccess == rhs.dwAccess ); # endif } bool operator!=( ExportMemoryWin32HandleInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } # endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eExportMemoryWin32HandleInfoNV; const void * pNext = {}; const SECURITY_ATTRIBUTES * pAttributes = {}; DWORD dwAccess = {}; }; template <> struct CppType { using Type = ExportMemoryWin32HandleInfoNV; }; #endif /*VK_USE_PLATFORM_WIN32_KHR*/ #if defined( VK_USE_PLATFORM_METAL_EXT ) struct ExportMetalBufferInfoEXT { using NativeType = VkExportMetalBufferInfoEXT; static const bool allowDuplicate = true; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eExportMetalBufferInfoEXT; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ExportMetalBufferInfoEXT( VULKAN_HPP_NAMESPACE::DeviceMemory memory_ = {}, MTLBuffer_id mtlBuffer_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , memory{ memory_ } , mtlBuffer{ mtlBuffer_ } { } VULKAN_HPP_CONSTEXPR ExportMetalBufferInfoEXT( ExportMetalBufferInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; ExportMetalBufferInfoEXT( VkExportMetalBufferInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : ExportMetalBufferInfoEXT( *reinterpret_cast( &rhs ) ) { } ExportMetalBufferInfoEXT & operator=( ExportMetalBufferInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ExportMetalBufferInfoEXT & operator=( VkExportMetalBufferInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } # if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ExportMetalBufferInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ExportMetalBufferInfoEXT & setMemory( VULKAN_HPP_NAMESPACE::DeviceMemory memory_ ) VULKAN_HPP_NOEXCEPT { memory = memory_; return *this; } VULKAN_HPP_CONSTEXPR_14 ExportMetalBufferInfoEXT & setMtlBuffer( MTLBuffer_id mtlBuffer_ ) VULKAN_HPP_NOEXCEPT { mtlBuffer = mtlBuffer_; return *this; } # endif /*VULKAN_HPP_NO_SETTERS*/ operator VkExportMetalBufferInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkExportMetalBufferInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, memory, mtlBuffer ); } # endif # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ExportMetalBufferInfoEXT const & ) const = default; # else bool operator==( ExportMetalBufferInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( memory == rhs.memory ) && ( mtlBuffer == rhs.mtlBuffer ); # endif } bool operator!=( ExportMetalBufferInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } # endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eExportMetalBufferInfoEXT; const void * pNext = {}; VULKAN_HPP_NAMESPACE::DeviceMemory memory = {}; MTLBuffer_id mtlBuffer = {}; }; template <> struct CppType { using Type = ExportMetalBufferInfoEXT; }; #endif /*VK_USE_PLATFORM_METAL_EXT*/ #if defined( VK_USE_PLATFORM_METAL_EXT ) struct ExportMetalCommandQueueInfoEXT { using NativeType = VkExportMetalCommandQueueInfoEXT; static const bool allowDuplicate = true; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eExportMetalCommandQueueInfoEXT; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ExportMetalCommandQueueInfoEXT( VULKAN_HPP_NAMESPACE::Queue queue_ = {}, MTLCommandQueue_id mtlCommandQueue_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , queue{ queue_ } , mtlCommandQueue{ mtlCommandQueue_ } { } VULKAN_HPP_CONSTEXPR ExportMetalCommandQueueInfoEXT( ExportMetalCommandQueueInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; ExportMetalCommandQueueInfoEXT( VkExportMetalCommandQueueInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : ExportMetalCommandQueueInfoEXT( *reinterpret_cast( &rhs ) ) { } ExportMetalCommandQueueInfoEXT & operator=( ExportMetalCommandQueueInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ExportMetalCommandQueueInfoEXT & operator=( VkExportMetalCommandQueueInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } # if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ExportMetalCommandQueueInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ExportMetalCommandQueueInfoEXT & setQueue( VULKAN_HPP_NAMESPACE::Queue queue_ ) VULKAN_HPP_NOEXCEPT { queue = queue_; return *this; } VULKAN_HPP_CONSTEXPR_14 ExportMetalCommandQueueInfoEXT & setMtlCommandQueue( MTLCommandQueue_id mtlCommandQueue_ ) VULKAN_HPP_NOEXCEPT { mtlCommandQueue = mtlCommandQueue_; return *this; } # endif /*VULKAN_HPP_NO_SETTERS*/ operator VkExportMetalCommandQueueInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkExportMetalCommandQueueInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, queue, mtlCommandQueue ); } # endif # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ExportMetalCommandQueueInfoEXT const & ) const = default; # else bool operator==( ExportMetalCommandQueueInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( queue == rhs.queue ) && ( mtlCommandQueue == rhs.mtlCommandQueue ); # endif } bool operator!=( ExportMetalCommandQueueInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } # endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eExportMetalCommandQueueInfoEXT; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Queue queue = {}; MTLCommandQueue_id mtlCommandQueue = {}; }; template <> struct CppType { using Type = ExportMetalCommandQueueInfoEXT; }; #endif /*VK_USE_PLATFORM_METAL_EXT*/ #if defined( VK_USE_PLATFORM_METAL_EXT ) struct ExportMetalDeviceInfoEXT { using NativeType = VkExportMetalDeviceInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eExportMetalDeviceInfoEXT; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ExportMetalDeviceInfoEXT( MTLDevice_id mtlDevice_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , mtlDevice{ mtlDevice_ } { } VULKAN_HPP_CONSTEXPR ExportMetalDeviceInfoEXT( ExportMetalDeviceInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; ExportMetalDeviceInfoEXT( VkExportMetalDeviceInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : ExportMetalDeviceInfoEXT( *reinterpret_cast( &rhs ) ) { } ExportMetalDeviceInfoEXT & operator=( ExportMetalDeviceInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ExportMetalDeviceInfoEXT & operator=( VkExportMetalDeviceInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } # if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ExportMetalDeviceInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ExportMetalDeviceInfoEXT & setMtlDevice( MTLDevice_id mtlDevice_ ) VULKAN_HPP_NOEXCEPT { mtlDevice = mtlDevice_; return *this; } # endif /*VULKAN_HPP_NO_SETTERS*/ operator VkExportMetalDeviceInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkExportMetalDeviceInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, mtlDevice ); } # endif # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ExportMetalDeviceInfoEXT const & ) const = default; # else bool operator==( ExportMetalDeviceInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( mtlDevice == rhs.mtlDevice ); # endif } bool operator!=( ExportMetalDeviceInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } # endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eExportMetalDeviceInfoEXT; const void * pNext = {}; MTLDevice_id mtlDevice = {}; }; template <> struct CppType { using Type = ExportMetalDeviceInfoEXT; }; #endif /*VK_USE_PLATFORM_METAL_EXT*/ #if defined( VK_USE_PLATFORM_METAL_EXT ) struct ExportMetalIOSurfaceInfoEXT { using NativeType = VkExportMetalIOSurfaceInfoEXT; static const bool allowDuplicate = true; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eExportMetalIoSurfaceInfoEXT; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ExportMetalIOSurfaceInfoEXT( VULKAN_HPP_NAMESPACE::Image image_ = {}, IOSurfaceRef ioSurface_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , image{ image_ } , ioSurface{ ioSurface_ } { } VULKAN_HPP_CONSTEXPR ExportMetalIOSurfaceInfoEXT( ExportMetalIOSurfaceInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; ExportMetalIOSurfaceInfoEXT( VkExportMetalIOSurfaceInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : ExportMetalIOSurfaceInfoEXT( *reinterpret_cast( &rhs ) ) { } ExportMetalIOSurfaceInfoEXT & operator=( ExportMetalIOSurfaceInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ExportMetalIOSurfaceInfoEXT & operator=( VkExportMetalIOSurfaceInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } # if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ExportMetalIOSurfaceInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ExportMetalIOSurfaceInfoEXT & setImage( VULKAN_HPP_NAMESPACE::Image image_ ) VULKAN_HPP_NOEXCEPT { image = image_; return *this; } VULKAN_HPP_CONSTEXPR_14 ExportMetalIOSurfaceInfoEXT & setIoSurface( IOSurfaceRef ioSurface_ ) VULKAN_HPP_NOEXCEPT { ioSurface = ioSurface_; return *this; } # endif /*VULKAN_HPP_NO_SETTERS*/ operator VkExportMetalIOSurfaceInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkExportMetalIOSurfaceInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, image, ioSurface ); } # endif # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ExportMetalIOSurfaceInfoEXT const & ) const = default; # else bool operator==( ExportMetalIOSurfaceInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( image == rhs.image ) && ( ioSurface == rhs.ioSurface ); # endif } bool operator!=( ExportMetalIOSurfaceInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } # endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eExportMetalIoSurfaceInfoEXT; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Image image = {}; IOSurfaceRef ioSurface = {}; }; template <> struct CppType { using Type = ExportMetalIOSurfaceInfoEXT; }; #endif /*VK_USE_PLATFORM_METAL_EXT*/ #if defined( VK_USE_PLATFORM_METAL_EXT ) struct ExportMetalObjectCreateInfoEXT { using NativeType = VkExportMetalObjectCreateInfoEXT; static const bool allowDuplicate = true; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eExportMetalObjectCreateInfoEXT; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ExportMetalObjectCreateInfoEXT( VULKAN_HPP_NAMESPACE::ExportMetalObjectTypeFlagBitsEXT exportObjectType_ = VULKAN_HPP_NAMESPACE::ExportMetalObjectTypeFlagBitsEXT::eMetalDevice, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , exportObjectType{ exportObjectType_ } { } VULKAN_HPP_CONSTEXPR ExportMetalObjectCreateInfoEXT( ExportMetalObjectCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; ExportMetalObjectCreateInfoEXT( VkExportMetalObjectCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : ExportMetalObjectCreateInfoEXT( *reinterpret_cast( &rhs ) ) { } ExportMetalObjectCreateInfoEXT & operator=( ExportMetalObjectCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ExportMetalObjectCreateInfoEXT & operator=( VkExportMetalObjectCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } # if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ExportMetalObjectCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ExportMetalObjectCreateInfoEXT & setExportObjectType( VULKAN_HPP_NAMESPACE::ExportMetalObjectTypeFlagBitsEXT exportObjectType_ ) VULKAN_HPP_NOEXCEPT { exportObjectType = exportObjectType_; return *this; } # endif /*VULKAN_HPP_NO_SETTERS*/ operator VkExportMetalObjectCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkExportMetalObjectCreateInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, exportObjectType ); } # endif # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ExportMetalObjectCreateInfoEXT const & ) const = default; # else bool operator==( ExportMetalObjectCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( exportObjectType == rhs.exportObjectType ); # endif } bool operator!=( ExportMetalObjectCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } # endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eExportMetalObjectCreateInfoEXT; const void * pNext = {}; VULKAN_HPP_NAMESPACE::ExportMetalObjectTypeFlagBitsEXT exportObjectType = VULKAN_HPP_NAMESPACE::ExportMetalObjectTypeFlagBitsEXT::eMetalDevice; }; template <> struct CppType { using Type = ExportMetalObjectCreateInfoEXT; }; #endif /*VK_USE_PLATFORM_METAL_EXT*/ #if defined( VK_USE_PLATFORM_METAL_EXT ) struct ExportMetalObjectsInfoEXT { using NativeType = VkExportMetalObjectsInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eExportMetalObjectsInfoEXT; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ExportMetalObjectsInfoEXT( const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } {} VULKAN_HPP_CONSTEXPR ExportMetalObjectsInfoEXT( ExportMetalObjectsInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; ExportMetalObjectsInfoEXT( VkExportMetalObjectsInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : ExportMetalObjectsInfoEXT( *reinterpret_cast( &rhs ) ) { } ExportMetalObjectsInfoEXT & operator=( ExportMetalObjectsInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ExportMetalObjectsInfoEXT & operator=( VkExportMetalObjectsInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } # if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ExportMetalObjectsInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } # endif /*VULKAN_HPP_NO_SETTERS*/ operator VkExportMetalObjectsInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkExportMetalObjectsInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext ); } # endif # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ExportMetalObjectsInfoEXT const & ) const = default; # else bool operator==( ExportMetalObjectsInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ); # endif } bool operator!=( ExportMetalObjectsInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } # endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eExportMetalObjectsInfoEXT; const void * pNext = {}; }; template <> struct CppType { using Type = ExportMetalObjectsInfoEXT; }; #endif /*VK_USE_PLATFORM_METAL_EXT*/ #if defined( VK_USE_PLATFORM_METAL_EXT ) struct ExportMetalSharedEventInfoEXT { using NativeType = VkExportMetalSharedEventInfoEXT; static const bool allowDuplicate = true; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eExportMetalSharedEventInfoEXT; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ExportMetalSharedEventInfoEXT( VULKAN_HPP_NAMESPACE::Semaphore semaphore_ = {}, VULKAN_HPP_NAMESPACE::Event event_ = {}, MTLSharedEvent_id mtlSharedEvent_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , semaphore{ semaphore_ } , event{ event_ } , mtlSharedEvent{ mtlSharedEvent_ } { } VULKAN_HPP_CONSTEXPR ExportMetalSharedEventInfoEXT( ExportMetalSharedEventInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; ExportMetalSharedEventInfoEXT( VkExportMetalSharedEventInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : ExportMetalSharedEventInfoEXT( *reinterpret_cast( &rhs ) ) { } ExportMetalSharedEventInfoEXT & operator=( ExportMetalSharedEventInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ExportMetalSharedEventInfoEXT & operator=( VkExportMetalSharedEventInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } # if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ExportMetalSharedEventInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ExportMetalSharedEventInfoEXT & setSemaphore( VULKAN_HPP_NAMESPACE::Semaphore semaphore_ ) VULKAN_HPP_NOEXCEPT { semaphore = semaphore_; return *this; } VULKAN_HPP_CONSTEXPR_14 ExportMetalSharedEventInfoEXT & setEvent( VULKAN_HPP_NAMESPACE::Event event_ ) VULKAN_HPP_NOEXCEPT { event = event_; return *this; } VULKAN_HPP_CONSTEXPR_14 ExportMetalSharedEventInfoEXT & setMtlSharedEvent( MTLSharedEvent_id mtlSharedEvent_ ) VULKAN_HPP_NOEXCEPT { mtlSharedEvent = mtlSharedEvent_; return *this; } # endif /*VULKAN_HPP_NO_SETTERS*/ operator VkExportMetalSharedEventInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkExportMetalSharedEventInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, semaphore, event, mtlSharedEvent ); } # endif # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ExportMetalSharedEventInfoEXT const & ) const = default; # else bool operator==( ExportMetalSharedEventInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( semaphore == rhs.semaphore ) && ( event == rhs.event ) && ( mtlSharedEvent == rhs.mtlSharedEvent ); # endif } bool operator!=( ExportMetalSharedEventInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } # endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eExportMetalSharedEventInfoEXT; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Semaphore semaphore = {}; VULKAN_HPP_NAMESPACE::Event event = {}; MTLSharedEvent_id mtlSharedEvent = {}; }; template <> struct CppType { using Type = ExportMetalSharedEventInfoEXT; }; #endif /*VK_USE_PLATFORM_METAL_EXT*/ #if defined( VK_USE_PLATFORM_METAL_EXT ) struct ExportMetalTextureInfoEXT { using NativeType = VkExportMetalTextureInfoEXT; static const bool allowDuplicate = true; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eExportMetalTextureInfoEXT; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ExportMetalTextureInfoEXT( VULKAN_HPP_NAMESPACE::Image image_ = {}, VULKAN_HPP_NAMESPACE::ImageView imageView_ = {}, VULKAN_HPP_NAMESPACE::BufferView bufferView_ = {}, VULKAN_HPP_NAMESPACE::ImageAspectFlagBits plane_ = VULKAN_HPP_NAMESPACE::ImageAspectFlagBits::eColor, MTLTexture_id mtlTexture_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , image{ image_ } , imageView{ imageView_ } , bufferView{ bufferView_ } , plane{ plane_ } , mtlTexture{ mtlTexture_ } { } VULKAN_HPP_CONSTEXPR ExportMetalTextureInfoEXT( ExportMetalTextureInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; ExportMetalTextureInfoEXT( VkExportMetalTextureInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : ExportMetalTextureInfoEXT( *reinterpret_cast( &rhs ) ) { } ExportMetalTextureInfoEXT & operator=( ExportMetalTextureInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ExportMetalTextureInfoEXT & operator=( VkExportMetalTextureInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } # if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ExportMetalTextureInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ExportMetalTextureInfoEXT & setImage( VULKAN_HPP_NAMESPACE::Image image_ ) VULKAN_HPP_NOEXCEPT { image = image_; return *this; } VULKAN_HPP_CONSTEXPR_14 ExportMetalTextureInfoEXT & setImageView( VULKAN_HPP_NAMESPACE::ImageView imageView_ ) VULKAN_HPP_NOEXCEPT { imageView = imageView_; return *this; } VULKAN_HPP_CONSTEXPR_14 ExportMetalTextureInfoEXT & setBufferView( VULKAN_HPP_NAMESPACE::BufferView bufferView_ ) VULKAN_HPP_NOEXCEPT { bufferView = bufferView_; return *this; } VULKAN_HPP_CONSTEXPR_14 ExportMetalTextureInfoEXT & setPlane( VULKAN_HPP_NAMESPACE::ImageAspectFlagBits plane_ ) VULKAN_HPP_NOEXCEPT { plane = plane_; return *this; } VULKAN_HPP_CONSTEXPR_14 ExportMetalTextureInfoEXT & setMtlTexture( MTLTexture_id mtlTexture_ ) VULKAN_HPP_NOEXCEPT { mtlTexture = mtlTexture_; return *this; } # endif /*VULKAN_HPP_NO_SETTERS*/ operator VkExportMetalTextureInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkExportMetalTextureInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, image, imageView, bufferView, plane, mtlTexture ); } # endif # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ExportMetalTextureInfoEXT const & ) const = default; # else bool operator==( ExportMetalTextureInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( image == rhs.image ) && ( imageView == rhs.imageView ) && ( bufferView == rhs.bufferView ) && ( plane == rhs.plane ) && ( mtlTexture == rhs.mtlTexture ); # endif } bool operator!=( ExportMetalTextureInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } # endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eExportMetalTextureInfoEXT; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Image image = {}; VULKAN_HPP_NAMESPACE::ImageView imageView = {}; VULKAN_HPP_NAMESPACE::BufferView bufferView = {}; VULKAN_HPP_NAMESPACE::ImageAspectFlagBits plane = VULKAN_HPP_NAMESPACE::ImageAspectFlagBits::eColor; MTLTexture_id mtlTexture = {}; }; template <> struct CppType { using Type = ExportMetalTextureInfoEXT; }; #endif /*VK_USE_PLATFORM_METAL_EXT*/ struct ExportSemaphoreCreateInfo { using NativeType = VkExportSemaphoreCreateInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eExportSemaphoreCreateInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ExportSemaphoreCreateInfo( VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlags handleTypes_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , handleTypes{ handleTypes_ } { } VULKAN_HPP_CONSTEXPR ExportSemaphoreCreateInfo( ExportSemaphoreCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; ExportSemaphoreCreateInfo( VkExportSemaphoreCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT : ExportSemaphoreCreateInfo( *reinterpret_cast( &rhs ) ) { } ExportSemaphoreCreateInfo & operator=( ExportSemaphoreCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ExportSemaphoreCreateInfo & operator=( VkExportSemaphoreCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ExportSemaphoreCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ExportSemaphoreCreateInfo & setHandleTypes( VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlags handleTypes_ ) VULKAN_HPP_NOEXCEPT { handleTypes = handleTypes_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkExportSemaphoreCreateInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkExportSemaphoreCreateInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, handleTypes ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ExportSemaphoreCreateInfo const & ) const = default; #else bool operator==( ExportSemaphoreCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( handleTypes == rhs.handleTypes ); # endif } bool operator!=( ExportSemaphoreCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eExportSemaphoreCreateInfo; const void * pNext = {}; VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlags handleTypes = {}; }; template <> struct CppType { using Type = ExportSemaphoreCreateInfo; }; using ExportSemaphoreCreateInfoKHR = ExportSemaphoreCreateInfo; #if defined( VK_USE_PLATFORM_WIN32_KHR ) struct ExportSemaphoreWin32HandleInfoKHR { using NativeType = VkExportSemaphoreWin32HandleInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eExportSemaphoreWin32HandleInfoKHR; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ExportSemaphoreWin32HandleInfoKHR( const SECURITY_ATTRIBUTES * pAttributes_ = {}, DWORD dwAccess_ = {}, LPCWSTR name_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , pAttributes{ pAttributes_ } , dwAccess{ dwAccess_ } , name{ name_ } { } VULKAN_HPP_CONSTEXPR ExportSemaphoreWin32HandleInfoKHR( ExportSemaphoreWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; ExportSemaphoreWin32HandleInfoKHR( VkExportSemaphoreWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : ExportSemaphoreWin32HandleInfoKHR( *reinterpret_cast( &rhs ) ) { } ExportSemaphoreWin32HandleInfoKHR & operator=( ExportSemaphoreWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ExportSemaphoreWin32HandleInfoKHR & operator=( VkExportSemaphoreWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } # if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ExportSemaphoreWin32HandleInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ExportSemaphoreWin32HandleInfoKHR & setPAttributes( const SECURITY_ATTRIBUTES * pAttributes_ ) VULKAN_HPP_NOEXCEPT { pAttributes = pAttributes_; return *this; } VULKAN_HPP_CONSTEXPR_14 ExportSemaphoreWin32HandleInfoKHR & setDwAccess( DWORD dwAccess_ ) VULKAN_HPP_NOEXCEPT { dwAccess = dwAccess_; return *this; } VULKAN_HPP_CONSTEXPR_14 ExportSemaphoreWin32HandleInfoKHR & setName( LPCWSTR name_ ) VULKAN_HPP_NOEXCEPT { name = name_; return *this; } # endif /*VULKAN_HPP_NO_SETTERS*/ operator VkExportSemaphoreWin32HandleInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkExportSemaphoreWin32HandleInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, pAttributes, dwAccess, name ); } # endif # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ExportSemaphoreWin32HandleInfoKHR const & ) const = default; # else bool operator==( ExportSemaphoreWin32HandleInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( pAttributes == rhs.pAttributes ) && ( dwAccess == rhs.dwAccess ) && ( name == rhs.name ); # endif } bool operator!=( ExportSemaphoreWin32HandleInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } # endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eExportSemaphoreWin32HandleInfoKHR; const void * pNext = {}; const SECURITY_ATTRIBUTES * pAttributes = {}; DWORD dwAccess = {}; LPCWSTR name = {}; }; template <> struct CppType { using Type = ExportSemaphoreWin32HandleInfoKHR; }; #endif /*VK_USE_PLATFORM_WIN32_KHR*/ struct ExtensionProperties { using NativeType = VkExtensionProperties; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 ExtensionProperties( std::array const & extensionName_ = {}, uint32_t specVersion_ = {} ) VULKAN_HPP_NOEXCEPT : extensionName{ extensionName_ } , specVersion{ specVersion_ } { } VULKAN_HPP_CONSTEXPR_14 ExtensionProperties( ExtensionProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; ExtensionProperties( VkExtensionProperties const & rhs ) VULKAN_HPP_NOEXCEPT : ExtensionProperties( *reinterpret_cast( &rhs ) ) { } ExtensionProperties & operator=( ExtensionProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ExtensionProperties & operator=( VkExtensionProperties const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkExtensionProperties const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkExtensionProperties &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple const &, uint32_t const &> # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( extensionName, specVersion ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) std::strong_ordering operator<=>( ExtensionProperties const & rhs ) const VULKAN_HPP_NOEXCEPT { if ( auto cmp = strcmp( extensionName, rhs.extensionName ); cmp != 0 ) return ( cmp < 0 ) ? std::strong_ordering::less : std::strong_ordering::greater; if ( auto cmp = specVersion <=> rhs.specVersion; cmp != 0 ) return cmp; return std::strong_ordering::equivalent; } #endif bool operator==( ExtensionProperties const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( strcmp( extensionName, rhs.extensionName ) == 0 ) && ( specVersion == rhs.specVersion ); } bool operator!=( ExtensionProperties const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::ArrayWrapper1D extensionName = {}; uint32_t specVersion = {}; }; struct ExternalMemoryProperties { using NativeType = VkExternalMemoryProperties; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ExternalMemoryProperties( VULKAN_HPP_NAMESPACE::ExternalMemoryFeatureFlags externalMemoryFeatures_ = {}, VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlags exportFromImportedHandleTypes_ = {}, VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlags compatibleHandleTypes_ = {} ) VULKAN_HPP_NOEXCEPT : externalMemoryFeatures{ externalMemoryFeatures_ } , exportFromImportedHandleTypes{ exportFromImportedHandleTypes_ } , compatibleHandleTypes{ compatibleHandleTypes_ } { } VULKAN_HPP_CONSTEXPR ExternalMemoryProperties( ExternalMemoryProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; ExternalMemoryProperties( VkExternalMemoryProperties const & rhs ) VULKAN_HPP_NOEXCEPT : ExternalMemoryProperties( *reinterpret_cast( &rhs ) ) { } ExternalMemoryProperties & operator=( ExternalMemoryProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ExternalMemoryProperties & operator=( VkExternalMemoryProperties const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkExternalMemoryProperties const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkExternalMemoryProperties &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( externalMemoryFeatures, exportFromImportedHandleTypes, compatibleHandleTypes ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ExternalMemoryProperties const & ) const = default; #else bool operator==( ExternalMemoryProperties const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( externalMemoryFeatures == rhs.externalMemoryFeatures ) && ( exportFromImportedHandleTypes == rhs.exportFromImportedHandleTypes ) && ( compatibleHandleTypes == rhs.compatibleHandleTypes ); # endif } bool operator!=( ExternalMemoryProperties const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::ExternalMemoryFeatureFlags externalMemoryFeatures = {}; VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlags exportFromImportedHandleTypes = {}; VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlags compatibleHandleTypes = {}; }; using ExternalMemoryPropertiesKHR = ExternalMemoryProperties; struct ExternalBufferProperties { using NativeType = VkExternalBufferProperties; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eExternalBufferProperties; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ExternalBufferProperties( VULKAN_HPP_NAMESPACE::ExternalMemoryProperties externalMemoryProperties_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , externalMemoryProperties{ externalMemoryProperties_ } { } VULKAN_HPP_CONSTEXPR ExternalBufferProperties( ExternalBufferProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; ExternalBufferProperties( VkExternalBufferProperties const & rhs ) VULKAN_HPP_NOEXCEPT : ExternalBufferProperties( *reinterpret_cast( &rhs ) ) { } ExternalBufferProperties & operator=( ExternalBufferProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ExternalBufferProperties & operator=( VkExternalBufferProperties const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkExternalBufferProperties const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkExternalBufferProperties &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, externalMemoryProperties ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ExternalBufferProperties const & ) const = default; #else bool operator==( ExternalBufferProperties const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( externalMemoryProperties == rhs.externalMemoryProperties ); # endif } bool operator!=( ExternalBufferProperties const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eExternalBufferProperties; void * pNext = {}; VULKAN_HPP_NAMESPACE::ExternalMemoryProperties externalMemoryProperties = {}; }; template <> struct CppType { using Type = ExternalBufferProperties; }; using ExternalBufferPropertiesKHR = ExternalBufferProperties; struct ExternalFenceProperties { using NativeType = VkExternalFenceProperties; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eExternalFenceProperties; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ExternalFenceProperties( VULKAN_HPP_NAMESPACE::ExternalFenceHandleTypeFlags exportFromImportedHandleTypes_ = {}, VULKAN_HPP_NAMESPACE::ExternalFenceHandleTypeFlags compatibleHandleTypes_ = {}, VULKAN_HPP_NAMESPACE::ExternalFenceFeatureFlags externalFenceFeatures_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , exportFromImportedHandleTypes{ exportFromImportedHandleTypes_ } , compatibleHandleTypes{ compatibleHandleTypes_ } , externalFenceFeatures{ externalFenceFeatures_ } { } VULKAN_HPP_CONSTEXPR ExternalFenceProperties( ExternalFenceProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; ExternalFenceProperties( VkExternalFenceProperties const & rhs ) VULKAN_HPP_NOEXCEPT : ExternalFenceProperties( *reinterpret_cast( &rhs ) ) { } ExternalFenceProperties & operator=( ExternalFenceProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ExternalFenceProperties & operator=( VkExternalFenceProperties const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkExternalFenceProperties const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkExternalFenceProperties &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, exportFromImportedHandleTypes, compatibleHandleTypes, externalFenceFeatures ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ExternalFenceProperties const & ) const = default; #else bool operator==( ExternalFenceProperties const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( exportFromImportedHandleTypes == rhs.exportFromImportedHandleTypes ) && ( compatibleHandleTypes == rhs.compatibleHandleTypes ) && ( externalFenceFeatures == rhs.externalFenceFeatures ); # endif } bool operator!=( ExternalFenceProperties const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eExternalFenceProperties; void * pNext = {}; VULKAN_HPP_NAMESPACE::ExternalFenceHandleTypeFlags exportFromImportedHandleTypes = {}; VULKAN_HPP_NAMESPACE::ExternalFenceHandleTypeFlags compatibleHandleTypes = {}; VULKAN_HPP_NAMESPACE::ExternalFenceFeatureFlags externalFenceFeatures = {}; }; template <> struct CppType { using Type = ExternalFenceProperties; }; using ExternalFencePropertiesKHR = ExternalFenceProperties; #if defined( VK_USE_PLATFORM_ANDROID_KHR ) struct ExternalFormatANDROID { using NativeType = VkExternalFormatANDROID; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eExternalFormatANDROID; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ExternalFormatANDROID( uint64_t externalFormat_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , externalFormat{ externalFormat_ } { } VULKAN_HPP_CONSTEXPR ExternalFormatANDROID( ExternalFormatANDROID const & rhs ) VULKAN_HPP_NOEXCEPT = default; ExternalFormatANDROID( VkExternalFormatANDROID const & rhs ) VULKAN_HPP_NOEXCEPT : ExternalFormatANDROID( *reinterpret_cast( &rhs ) ) { } ExternalFormatANDROID & operator=( ExternalFormatANDROID const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ExternalFormatANDROID & operator=( VkExternalFormatANDROID const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } # if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ExternalFormatANDROID & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ExternalFormatANDROID & setExternalFormat( uint64_t externalFormat_ ) VULKAN_HPP_NOEXCEPT { externalFormat = externalFormat_; return *this; } # endif /*VULKAN_HPP_NO_SETTERS*/ operator VkExternalFormatANDROID const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkExternalFormatANDROID &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, externalFormat ); } # endif # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ExternalFormatANDROID const & ) const = default; # else bool operator==( ExternalFormatANDROID const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( externalFormat == rhs.externalFormat ); # endif } bool operator!=( ExternalFormatANDROID const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } # endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eExternalFormatANDROID; void * pNext = {}; uint64_t externalFormat = {}; }; template <> struct CppType { using Type = ExternalFormatANDROID; }; #endif /*VK_USE_PLATFORM_ANDROID_KHR*/ #if defined( VK_USE_PLATFORM_SCREEN_QNX ) struct ExternalFormatQNX { using NativeType = VkExternalFormatQNX; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eExternalFormatQNX; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ExternalFormatQNX( uint64_t externalFormat_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , externalFormat{ externalFormat_ } { } VULKAN_HPP_CONSTEXPR ExternalFormatQNX( ExternalFormatQNX const & rhs ) VULKAN_HPP_NOEXCEPT = default; ExternalFormatQNX( VkExternalFormatQNX const & rhs ) VULKAN_HPP_NOEXCEPT : ExternalFormatQNX( *reinterpret_cast( &rhs ) ) {} ExternalFormatQNX & operator=( ExternalFormatQNX const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ExternalFormatQNX & operator=( VkExternalFormatQNX const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } # if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ExternalFormatQNX & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ExternalFormatQNX & setExternalFormat( uint64_t externalFormat_ ) VULKAN_HPP_NOEXCEPT { externalFormat = externalFormat_; return *this; } # endif /*VULKAN_HPP_NO_SETTERS*/ operator VkExternalFormatQNX const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkExternalFormatQNX &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, externalFormat ); } # endif # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ExternalFormatQNX const & ) const = default; # else bool operator==( ExternalFormatQNX const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( externalFormat == rhs.externalFormat ); # endif } bool operator!=( ExternalFormatQNX const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } # endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eExternalFormatQNX; void * pNext = {}; uint64_t externalFormat = {}; }; template <> struct CppType { using Type = ExternalFormatQNX; }; #endif /*VK_USE_PLATFORM_SCREEN_QNX*/ struct ExternalImageFormatProperties { using NativeType = VkExternalImageFormatProperties; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eExternalImageFormatProperties; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ExternalImageFormatProperties( VULKAN_HPP_NAMESPACE::ExternalMemoryProperties externalMemoryProperties_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , externalMemoryProperties{ externalMemoryProperties_ } { } VULKAN_HPP_CONSTEXPR ExternalImageFormatProperties( ExternalImageFormatProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; ExternalImageFormatProperties( VkExternalImageFormatProperties const & rhs ) VULKAN_HPP_NOEXCEPT : ExternalImageFormatProperties( *reinterpret_cast( &rhs ) ) { } ExternalImageFormatProperties & operator=( ExternalImageFormatProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ExternalImageFormatProperties & operator=( VkExternalImageFormatProperties const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkExternalImageFormatProperties const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkExternalImageFormatProperties &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, externalMemoryProperties ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ExternalImageFormatProperties const & ) const = default; #else bool operator==( ExternalImageFormatProperties const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( externalMemoryProperties == rhs.externalMemoryProperties ); # endif } bool operator!=( ExternalImageFormatProperties const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eExternalImageFormatProperties; void * pNext = {}; VULKAN_HPP_NAMESPACE::ExternalMemoryProperties externalMemoryProperties = {}; }; template <> struct CppType { using Type = ExternalImageFormatProperties; }; using ExternalImageFormatPropertiesKHR = ExternalImageFormatProperties; struct ImageFormatProperties { using NativeType = VkImageFormatProperties; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ImageFormatProperties( VULKAN_HPP_NAMESPACE::Extent3D maxExtent_ = {}, uint32_t maxMipLevels_ = {}, uint32_t maxArrayLayers_ = {}, VULKAN_HPP_NAMESPACE::SampleCountFlags sampleCounts_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize maxResourceSize_ = {} ) VULKAN_HPP_NOEXCEPT : maxExtent{ maxExtent_ } , maxMipLevels{ maxMipLevels_ } , maxArrayLayers{ maxArrayLayers_ } , sampleCounts{ sampleCounts_ } , maxResourceSize{ maxResourceSize_ } { } VULKAN_HPP_CONSTEXPR ImageFormatProperties( ImageFormatProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; ImageFormatProperties( VkImageFormatProperties const & rhs ) VULKAN_HPP_NOEXCEPT : ImageFormatProperties( *reinterpret_cast( &rhs ) ) { } ImageFormatProperties & operator=( ImageFormatProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ImageFormatProperties & operator=( VkImageFormatProperties const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkImageFormatProperties const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkImageFormatProperties &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( maxExtent, maxMipLevels, maxArrayLayers, sampleCounts, maxResourceSize ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ImageFormatProperties const & ) const = default; #else bool operator==( ImageFormatProperties const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( maxExtent == rhs.maxExtent ) && ( maxMipLevels == rhs.maxMipLevels ) && ( maxArrayLayers == rhs.maxArrayLayers ) && ( sampleCounts == rhs.sampleCounts ) && ( maxResourceSize == rhs.maxResourceSize ); # endif } bool operator!=( ImageFormatProperties const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::Extent3D maxExtent = {}; uint32_t maxMipLevels = {}; uint32_t maxArrayLayers = {}; VULKAN_HPP_NAMESPACE::SampleCountFlags sampleCounts = {}; VULKAN_HPP_NAMESPACE::DeviceSize maxResourceSize = {}; }; struct ExternalImageFormatPropertiesNV { using NativeType = VkExternalImageFormatPropertiesNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ExternalImageFormatPropertiesNV( VULKAN_HPP_NAMESPACE::ImageFormatProperties imageFormatProperties_ = {}, VULKAN_HPP_NAMESPACE::ExternalMemoryFeatureFlagsNV externalMemoryFeatures_ = {}, VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagsNV exportFromImportedHandleTypes_ = {}, VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagsNV compatibleHandleTypes_ = {} ) VULKAN_HPP_NOEXCEPT : imageFormatProperties{ imageFormatProperties_ } , externalMemoryFeatures{ externalMemoryFeatures_ } , exportFromImportedHandleTypes{ exportFromImportedHandleTypes_ } , compatibleHandleTypes{ compatibleHandleTypes_ } { } VULKAN_HPP_CONSTEXPR ExternalImageFormatPropertiesNV( ExternalImageFormatPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; ExternalImageFormatPropertiesNV( VkExternalImageFormatPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT : ExternalImageFormatPropertiesNV( *reinterpret_cast( &rhs ) ) { } ExternalImageFormatPropertiesNV & operator=( ExternalImageFormatPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ExternalImageFormatPropertiesNV & operator=( VkExternalImageFormatPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkExternalImageFormatPropertiesNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkExternalImageFormatPropertiesNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( imageFormatProperties, externalMemoryFeatures, exportFromImportedHandleTypes, compatibleHandleTypes ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ExternalImageFormatPropertiesNV const & ) const = default; #else bool operator==( ExternalImageFormatPropertiesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( imageFormatProperties == rhs.imageFormatProperties ) && ( externalMemoryFeatures == rhs.externalMemoryFeatures ) && ( exportFromImportedHandleTypes == rhs.exportFromImportedHandleTypes ) && ( compatibleHandleTypes == rhs.compatibleHandleTypes ); # endif } bool operator!=( ExternalImageFormatPropertiesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::ImageFormatProperties imageFormatProperties = {}; VULKAN_HPP_NAMESPACE::ExternalMemoryFeatureFlagsNV externalMemoryFeatures = {}; VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagsNV exportFromImportedHandleTypes = {}; VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagsNV compatibleHandleTypes = {}; }; struct ExternalMemoryAcquireUnmodifiedEXT { using NativeType = VkExternalMemoryAcquireUnmodifiedEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eExternalMemoryAcquireUnmodifiedEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ExternalMemoryAcquireUnmodifiedEXT( VULKAN_HPP_NAMESPACE::Bool32 acquireUnmodifiedMemory_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , acquireUnmodifiedMemory{ acquireUnmodifiedMemory_ } { } VULKAN_HPP_CONSTEXPR ExternalMemoryAcquireUnmodifiedEXT( ExternalMemoryAcquireUnmodifiedEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; ExternalMemoryAcquireUnmodifiedEXT( VkExternalMemoryAcquireUnmodifiedEXT const & rhs ) VULKAN_HPP_NOEXCEPT : ExternalMemoryAcquireUnmodifiedEXT( *reinterpret_cast( &rhs ) ) { } ExternalMemoryAcquireUnmodifiedEXT & operator=( ExternalMemoryAcquireUnmodifiedEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ExternalMemoryAcquireUnmodifiedEXT & operator=( VkExternalMemoryAcquireUnmodifiedEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ExternalMemoryAcquireUnmodifiedEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ExternalMemoryAcquireUnmodifiedEXT & setAcquireUnmodifiedMemory( VULKAN_HPP_NAMESPACE::Bool32 acquireUnmodifiedMemory_ ) VULKAN_HPP_NOEXCEPT { acquireUnmodifiedMemory = acquireUnmodifiedMemory_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkExternalMemoryAcquireUnmodifiedEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkExternalMemoryAcquireUnmodifiedEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, acquireUnmodifiedMemory ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ExternalMemoryAcquireUnmodifiedEXT const & ) const = default; #else bool operator==( ExternalMemoryAcquireUnmodifiedEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( acquireUnmodifiedMemory == rhs.acquireUnmodifiedMemory ); # endif } bool operator!=( ExternalMemoryAcquireUnmodifiedEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eExternalMemoryAcquireUnmodifiedEXT; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 acquireUnmodifiedMemory = {}; }; template <> struct CppType { using Type = ExternalMemoryAcquireUnmodifiedEXT; }; struct ExternalMemoryBufferCreateInfo { using NativeType = VkExternalMemoryBufferCreateInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eExternalMemoryBufferCreateInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ExternalMemoryBufferCreateInfo( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlags handleTypes_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , handleTypes{ handleTypes_ } { } VULKAN_HPP_CONSTEXPR ExternalMemoryBufferCreateInfo( ExternalMemoryBufferCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; ExternalMemoryBufferCreateInfo( VkExternalMemoryBufferCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT : ExternalMemoryBufferCreateInfo( *reinterpret_cast( &rhs ) ) { } ExternalMemoryBufferCreateInfo & operator=( ExternalMemoryBufferCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ExternalMemoryBufferCreateInfo & operator=( VkExternalMemoryBufferCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ExternalMemoryBufferCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ExternalMemoryBufferCreateInfo & setHandleTypes( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlags handleTypes_ ) VULKAN_HPP_NOEXCEPT { handleTypes = handleTypes_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkExternalMemoryBufferCreateInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkExternalMemoryBufferCreateInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, handleTypes ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ExternalMemoryBufferCreateInfo const & ) const = default; #else bool operator==( ExternalMemoryBufferCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( handleTypes == rhs.handleTypes ); # endif } bool operator!=( ExternalMemoryBufferCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eExternalMemoryBufferCreateInfo; const void * pNext = {}; VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlags handleTypes = {}; }; template <> struct CppType { using Type = ExternalMemoryBufferCreateInfo; }; using ExternalMemoryBufferCreateInfoKHR = ExternalMemoryBufferCreateInfo; struct ExternalMemoryImageCreateInfo { using NativeType = VkExternalMemoryImageCreateInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eExternalMemoryImageCreateInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ExternalMemoryImageCreateInfo( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlags handleTypes_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , handleTypes{ handleTypes_ } { } VULKAN_HPP_CONSTEXPR ExternalMemoryImageCreateInfo( ExternalMemoryImageCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; ExternalMemoryImageCreateInfo( VkExternalMemoryImageCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT : ExternalMemoryImageCreateInfo( *reinterpret_cast( &rhs ) ) { } ExternalMemoryImageCreateInfo & operator=( ExternalMemoryImageCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ExternalMemoryImageCreateInfo & operator=( VkExternalMemoryImageCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ExternalMemoryImageCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ExternalMemoryImageCreateInfo & setHandleTypes( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlags handleTypes_ ) VULKAN_HPP_NOEXCEPT { handleTypes = handleTypes_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkExternalMemoryImageCreateInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkExternalMemoryImageCreateInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, handleTypes ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ExternalMemoryImageCreateInfo const & ) const = default; #else bool operator==( ExternalMemoryImageCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( handleTypes == rhs.handleTypes ); # endif } bool operator!=( ExternalMemoryImageCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eExternalMemoryImageCreateInfo; const void * pNext = {}; VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlags handleTypes = {}; }; template <> struct CppType { using Type = ExternalMemoryImageCreateInfo; }; using ExternalMemoryImageCreateInfoKHR = ExternalMemoryImageCreateInfo; struct ExternalMemoryImageCreateInfoNV { using NativeType = VkExternalMemoryImageCreateInfoNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eExternalMemoryImageCreateInfoNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ExternalMemoryImageCreateInfoNV( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagsNV handleTypes_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , handleTypes{ handleTypes_ } { } VULKAN_HPP_CONSTEXPR ExternalMemoryImageCreateInfoNV( ExternalMemoryImageCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; ExternalMemoryImageCreateInfoNV( VkExternalMemoryImageCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT : ExternalMemoryImageCreateInfoNV( *reinterpret_cast( &rhs ) ) { } ExternalMemoryImageCreateInfoNV & operator=( ExternalMemoryImageCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ExternalMemoryImageCreateInfoNV & operator=( VkExternalMemoryImageCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ExternalMemoryImageCreateInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ExternalMemoryImageCreateInfoNV & setHandleTypes( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagsNV handleTypes_ ) VULKAN_HPP_NOEXCEPT { handleTypes = handleTypes_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkExternalMemoryImageCreateInfoNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkExternalMemoryImageCreateInfoNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, handleTypes ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ExternalMemoryImageCreateInfoNV const & ) const = default; #else bool operator==( ExternalMemoryImageCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( handleTypes == rhs.handleTypes ); # endif } bool operator!=( ExternalMemoryImageCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eExternalMemoryImageCreateInfoNV; const void * pNext = {}; VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagsNV handleTypes = {}; }; template <> struct CppType { using Type = ExternalMemoryImageCreateInfoNV; }; struct ExternalSemaphoreProperties { using NativeType = VkExternalSemaphoreProperties; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eExternalSemaphoreProperties; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ExternalSemaphoreProperties( VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlags exportFromImportedHandleTypes_ = {}, VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlags compatibleHandleTypes_ = {}, VULKAN_HPP_NAMESPACE::ExternalSemaphoreFeatureFlags externalSemaphoreFeatures_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , exportFromImportedHandleTypes{ exportFromImportedHandleTypes_ } , compatibleHandleTypes{ compatibleHandleTypes_ } , externalSemaphoreFeatures{ externalSemaphoreFeatures_ } { } VULKAN_HPP_CONSTEXPR ExternalSemaphoreProperties( ExternalSemaphoreProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; ExternalSemaphoreProperties( VkExternalSemaphoreProperties const & rhs ) VULKAN_HPP_NOEXCEPT : ExternalSemaphoreProperties( *reinterpret_cast( &rhs ) ) { } ExternalSemaphoreProperties & operator=( ExternalSemaphoreProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ExternalSemaphoreProperties & operator=( VkExternalSemaphoreProperties const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkExternalSemaphoreProperties const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkExternalSemaphoreProperties &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, exportFromImportedHandleTypes, compatibleHandleTypes, externalSemaphoreFeatures ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ExternalSemaphoreProperties const & ) const = default; #else bool operator==( ExternalSemaphoreProperties const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( exportFromImportedHandleTypes == rhs.exportFromImportedHandleTypes ) && ( compatibleHandleTypes == rhs.compatibleHandleTypes ) && ( externalSemaphoreFeatures == rhs.externalSemaphoreFeatures ); # endif } bool operator!=( ExternalSemaphoreProperties const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eExternalSemaphoreProperties; void * pNext = {}; VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlags exportFromImportedHandleTypes = {}; VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlags compatibleHandleTypes = {}; VULKAN_HPP_NAMESPACE::ExternalSemaphoreFeatureFlags externalSemaphoreFeatures = {}; }; template <> struct CppType { using Type = ExternalSemaphoreProperties; }; using ExternalSemaphorePropertiesKHR = ExternalSemaphoreProperties; struct FenceCreateInfo { using NativeType = VkFenceCreateInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eFenceCreateInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR FenceCreateInfo( VULKAN_HPP_NAMESPACE::FenceCreateFlags flags_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } { } VULKAN_HPP_CONSTEXPR FenceCreateInfo( FenceCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; FenceCreateInfo( VkFenceCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT : FenceCreateInfo( *reinterpret_cast( &rhs ) ) {} FenceCreateInfo & operator=( FenceCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ FenceCreateInfo & operator=( VkFenceCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 FenceCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 FenceCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::FenceCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkFenceCreateInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkFenceCreateInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( FenceCreateInfo const & ) const = default; #else bool operator==( FenceCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ); # endif } bool operator!=( FenceCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eFenceCreateInfo; const void * pNext = {}; VULKAN_HPP_NAMESPACE::FenceCreateFlags flags = {}; }; template <> struct CppType { using Type = FenceCreateInfo; }; struct FenceGetFdInfoKHR { using NativeType = VkFenceGetFdInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eFenceGetFdInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR FenceGetFdInfoKHR( VULKAN_HPP_NAMESPACE::Fence fence_ = {}, VULKAN_HPP_NAMESPACE::ExternalFenceHandleTypeFlagBits handleType_ = VULKAN_HPP_NAMESPACE::ExternalFenceHandleTypeFlagBits::eOpaqueFd, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , fence{ fence_ } , handleType{ handleType_ } { } VULKAN_HPP_CONSTEXPR FenceGetFdInfoKHR( FenceGetFdInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; FenceGetFdInfoKHR( VkFenceGetFdInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : FenceGetFdInfoKHR( *reinterpret_cast( &rhs ) ) {} FenceGetFdInfoKHR & operator=( FenceGetFdInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ FenceGetFdInfoKHR & operator=( VkFenceGetFdInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 FenceGetFdInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 FenceGetFdInfoKHR & setFence( VULKAN_HPP_NAMESPACE::Fence fence_ ) VULKAN_HPP_NOEXCEPT { fence = fence_; return *this; } VULKAN_HPP_CONSTEXPR_14 FenceGetFdInfoKHR & setHandleType( VULKAN_HPP_NAMESPACE::ExternalFenceHandleTypeFlagBits handleType_ ) VULKAN_HPP_NOEXCEPT { handleType = handleType_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkFenceGetFdInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkFenceGetFdInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, fence, handleType ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( FenceGetFdInfoKHR const & ) const = default; #else bool operator==( FenceGetFdInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( fence == rhs.fence ) && ( handleType == rhs.handleType ); # endif } bool operator!=( FenceGetFdInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eFenceGetFdInfoKHR; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Fence fence = {}; VULKAN_HPP_NAMESPACE::ExternalFenceHandleTypeFlagBits handleType = VULKAN_HPP_NAMESPACE::ExternalFenceHandleTypeFlagBits::eOpaqueFd; }; template <> struct CppType { using Type = FenceGetFdInfoKHR; }; #if defined( VK_USE_PLATFORM_WIN32_KHR ) struct FenceGetWin32HandleInfoKHR { using NativeType = VkFenceGetWin32HandleInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eFenceGetWin32HandleInfoKHR; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR FenceGetWin32HandleInfoKHR( VULKAN_HPP_NAMESPACE::Fence fence_ = {}, VULKAN_HPP_NAMESPACE::ExternalFenceHandleTypeFlagBits handleType_ = VULKAN_HPP_NAMESPACE::ExternalFenceHandleTypeFlagBits::eOpaqueFd, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , fence{ fence_ } , handleType{ handleType_ } { } VULKAN_HPP_CONSTEXPR FenceGetWin32HandleInfoKHR( FenceGetWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; FenceGetWin32HandleInfoKHR( VkFenceGetWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : FenceGetWin32HandleInfoKHR( *reinterpret_cast( &rhs ) ) { } FenceGetWin32HandleInfoKHR & operator=( FenceGetWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ FenceGetWin32HandleInfoKHR & operator=( VkFenceGetWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } # if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 FenceGetWin32HandleInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 FenceGetWin32HandleInfoKHR & setFence( VULKAN_HPP_NAMESPACE::Fence fence_ ) VULKAN_HPP_NOEXCEPT { fence = fence_; return *this; } VULKAN_HPP_CONSTEXPR_14 FenceGetWin32HandleInfoKHR & setHandleType( VULKAN_HPP_NAMESPACE::ExternalFenceHandleTypeFlagBits handleType_ ) VULKAN_HPP_NOEXCEPT { handleType = handleType_; return *this; } # endif /*VULKAN_HPP_NO_SETTERS*/ operator VkFenceGetWin32HandleInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkFenceGetWin32HandleInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, fence, handleType ); } # endif # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( FenceGetWin32HandleInfoKHR const & ) const = default; # else bool operator==( FenceGetWin32HandleInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( fence == rhs.fence ) && ( handleType == rhs.handleType ); # endif } bool operator!=( FenceGetWin32HandleInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } # endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eFenceGetWin32HandleInfoKHR; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Fence fence = {}; VULKAN_HPP_NAMESPACE::ExternalFenceHandleTypeFlagBits handleType = VULKAN_HPP_NAMESPACE::ExternalFenceHandleTypeFlagBits::eOpaqueFd; }; template <> struct CppType { using Type = FenceGetWin32HandleInfoKHR; }; #endif /*VK_USE_PLATFORM_WIN32_KHR*/ struct FilterCubicImageViewImageFormatPropertiesEXT { using NativeType = VkFilterCubicImageViewImageFormatPropertiesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eFilterCubicImageViewImageFormatPropertiesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR FilterCubicImageViewImageFormatPropertiesEXT( VULKAN_HPP_NAMESPACE::Bool32 filterCubic_ = {}, VULKAN_HPP_NAMESPACE::Bool32 filterCubicMinmax_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , filterCubic{ filterCubic_ } , filterCubicMinmax{ filterCubicMinmax_ } { } VULKAN_HPP_CONSTEXPR FilterCubicImageViewImageFormatPropertiesEXT( FilterCubicImageViewImageFormatPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; FilterCubicImageViewImageFormatPropertiesEXT( VkFilterCubicImageViewImageFormatPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : FilterCubicImageViewImageFormatPropertiesEXT( *reinterpret_cast( &rhs ) ) { } FilterCubicImageViewImageFormatPropertiesEXT & operator=( FilterCubicImageViewImageFormatPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ FilterCubicImageViewImageFormatPropertiesEXT & operator=( VkFilterCubicImageViewImageFormatPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkFilterCubicImageViewImageFormatPropertiesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkFilterCubicImageViewImageFormatPropertiesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, filterCubic, filterCubicMinmax ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( FilterCubicImageViewImageFormatPropertiesEXT const & ) const = default; #else bool operator==( FilterCubicImageViewImageFormatPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( filterCubic == rhs.filterCubic ) && ( filterCubicMinmax == rhs.filterCubicMinmax ); # endif } bool operator!=( FilterCubicImageViewImageFormatPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eFilterCubicImageViewImageFormatPropertiesEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 filterCubic = {}; VULKAN_HPP_NAMESPACE::Bool32 filterCubicMinmax = {}; }; template <> struct CppType { using Type = FilterCubicImageViewImageFormatPropertiesEXT; }; struct FormatProperties { using NativeType = VkFormatProperties; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR FormatProperties( VULKAN_HPP_NAMESPACE::FormatFeatureFlags linearTilingFeatures_ = {}, VULKAN_HPP_NAMESPACE::FormatFeatureFlags optimalTilingFeatures_ = {}, VULKAN_HPP_NAMESPACE::FormatFeatureFlags bufferFeatures_ = {} ) VULKAN_HPP_NOEXCEPT : linearTilingFeatures{ linearTilingFeatures_ } , optimalTilingFeatures{ optimalTilingFeatures_ } , bufferFeatures{ bufferFeatures_ } { } VULKAN_HPP_CONSTEXPR FormatProperties( FormatProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; FormatProperties( VkFormatProperties const & rhs ) VULKAN_HPP_NOEXCEPT : FormatProperties( *reinterpret_cast( &rhs ) ) {} FormatProperties & operator=( FormatProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ FormatProperties & operator=( VkFormatProperties const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkFormatProperties const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkFormatProperties &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( linearTilingFeatures, optimalTilingFeatures, bufferFeatures ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( FormatProperties const & ) const = default; #else bool operator==( FormatProperties const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( linearTilingFeatures == rhs.linearTilingFeatures ) && ( optimalTilingFeatures == rhs.optimalTilingFeatures ) && ( bufferFeatures == rhs.bufferFeatures ); # endif } bool operator!=( FormatProperties const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::FormatFeatureFlags linearTilingFeatures = {}; VULKAN_HPP_NAMESPACE::FormatFeatureFlags optimalTilingFeatures = {}; VULKAN_HPP_NAMESPACE::FormatFeatureFlags bufferFeatures = {}; }; struct FormatProperties2 { using NativeType = VkFormatProperties2; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eFormatProperties2; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR FormatProperties2( VULKAN_HPP_NAMESPACE::FormatProperties formatProperties_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , formatProperties{ formatProperties_ } { } VULKAN_HPP_CONSTEXPR FormatProperties2( FormatProperties2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; FormatProperties2( VkFormatProperties2 const & rhs ) VULKAN_HPP_NOEXCEPT : FormatProperties2( *reinterpret_cast( &rhs ) ) {} FormatProperties2 & operator=( FormatProperties2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ FormatProperties2 & operator=( VkFormatProperties2 const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkFormatProperties2 const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkFormatProperties2 &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, formatProperties ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( FormatProperties2 const & ) const = default; #else bool operator==( FormatProperties2 const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( formatProperties == rhs.formatProperties ); # endif } bool operator!=( FormatProperties2 const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eFormatProperties2; void * pNext = {}; VULKAN_HPP_NAMESPACE::FormatProperties formatProperties = {}; }; template <> struct CppType { using Type = FormatProperties2; }; using FormatProperties2KHR = FormatProperties2; struct FormatProperties3 { using NativeType = VkFormatProperties3; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eFormatProperties3; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR FormatProperties3( VULKAN_HPP_NAMESPACE::FormatFeatureFlags2 linearTilingFeatures_ = {}, VULKAN_HPP_NAMESPACE::FormatFeatureFlags2 optimalTilingFeatures_ = {}, VULKAN_HPP_NAMESPACE::FormatFeatureFlags2 bufferFeatures_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , linearTilingFeatures{ linearTilingFeatures_ } , optimalTilingFeatures{ optimalTilingFeatures_ } , bufferFeatures{ bufferFeatures_ } { } VULKAN_HPP_CONSTEXPR FormatProperties3( FormatProperties3 const & rhs ) VULKAN_HPP_NOEXCEPT = default; FormatProperties3( VkFormatProperties3 const & rhs ) VULKAN_HPP_NOEXCEPT : FormatProperties3( *reinterpret_cast( &rhs ) ) {} FormatProperties3 & operator=( FormatProperties3 const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ FormatProperties3 & operator=( VkFormatProperties3 const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkFormatProperties3 const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkFormatProperties3 &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, linearTilingFeatures, optimalTilingFeatures, bufferFeatures ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( FormatProperties3 const & ) const = default; #else bool operator==( FormatProperties3 const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( linearTilingFeatures == rhs.linearTilingFeatures ) && ( optimalTilingFeatures == rhs.optimalTilingFeatures ) && ( bufferFeatures == rhs.bufferFeatures ); # endif } bool operator!=( FormatProperties3 const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eFormatProperties3; void * pNext = {}; VULKAN_HPP_NAMESPACE::FormatFeatureFlags2 linearTilingFeatures = {}; VULKAN_HPP_NAMESPACE::FormatFeatureFlags2 optimalTilingFeatures = {}; VULKAN_HPP_NAMESPACE::FormatFeatureFlags2 bufferFeatures = {}; }; template <> struct CppType { using Type = FormatProperties3; }; using FormatProperties3KHR = FormatProperties3; struct FragmentShadingRateAttachmentInfoKHR { using NativeType = VkFragmentShadingRateAttachmentInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eFragmentShadingRateAttachmentInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR FragmentShadingRateAttachmentInfoKHR( const VULKAN_HPP_NAMESPACE::AttachmentReference2 * pFragmentShadingRateAttachment_ = {}, VULKAN_HPP_NAMESPACE::Extent2D shadingRateAttachmentTexelSize_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , pFragmentShadingRateAttachment{ pFragmentShadingRateAttachment_ } , shadingRateAttachmentTexelSize{ shadingRateAttachmentTexelSize_ } { } VULKAN_HPP_CONSTEXPR FragmentShadingRateAttachmentInfoKHR( FragmentShadingRateAttachmentInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; FragmentShadingRateAttachmentInfoKHR( VkFragmentShadingRateAttachmentInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : FragmentShadingRateAttachmentInfoKHR( *reinterpret_cast( &rhs ) ) { } FragmentShadingRateAttachmentInfoKHR & operator=( FragmentShadingRateAttachmentInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ FragmentShadingRateAttachmentInfoKHR & operator=( VkFragmentShadingRateAttachmentInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 FragmentShadingRateAttachmentInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 FragmentShadingRateAttachmentInfoKHR & setPFragmentShadingRateAttachment( const VULKAN_HPP_NAMESPACE::AttachmentReference2 * pFragmentShadingRateAttachment_ ) VULKAN_HPP_NOEXCEPT { pFragmentShadingRateAttachment = pFragmentShadingRateAttachment_; return *this; } VULKAN_HPP_CONSTEXPR_14 FragmentShadingRateAttachmentInfoKHR & setShadingRateAttachmentTexelSize( VULKAN_HPP_NAMESPACE::Extent2D const & shadingRateAttachmentTexelSize_ ) VULKAN_HPP_NOEXCEPT { shadingRateAttachmentTexelSize = shadingRateAttachmentTexelSize_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkFragmentShadingRateAttachmentInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkFragmentShadingRateAttachmentInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, pFragmentShadingRateAttachment, shadingRateAttachmentTexelSize ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( FragmentShadingRateAttachmentInfoKHR const & ) const = default; #else bool operator==( FragmentShadingRateAttachmentInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( pFragmentShadingRateAttachment == rhs.pFragmentShadingRateAttachment ) && ( shadingRateAttachmentTexelSize == rhs.shadingRateAttachmentTexelSize ); # endif } bool operator!=( FragmentShadingRateAttachmentInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eFragmentShadingRateAttachmentInfoKHR; const void * pNext = {}; const VULKAN_HPP_NAMESPACE::AttachmentReference2 * pFragmentShadingRateAttachment = {}; VULKAN_HPP_NAMESPACE::Extent2D shadingRateAttachmentTexelSize = {}; }; template <> struct CppType { using Type = FragmentShadingRateAttachmentInfoKHR; }; struct FrameBoundaryEXT { using NativeType = VkFrameBoundaryEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eFrameBoundaryEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR FrameBoundaryEXT( VULKAN_HPP_NAMESPACE::FrameBoundaryFlagsEXT flags_ = {}, uint64_t frameID_ = {}, uint32_t imageCount_ = {}, const VULKAN_HPP_NAMESPACE::Image * pImages_ = {}, uint32_t bufferCount_ = {}, const VULKAN_HPP_NAMESPACE::Buffer * pBuffers_ = {}, uint64_t tagName_ = {}, size_t tagSize_ = {}, const void * pTag_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , frameID{ frameID_ } , imageCount{ imageCount_ } , pImages{ pImages_ } , bufferCount{ bufferCount_ } , pBuffers{ pBuffers_ } , tagName{ tagName_ } , tagSize{ tagSize_ } , pTag{ pTag_ } { } VULKAN_HPP_CONSTEXPR FrameBoundaryEXT( FrameBoundaryEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; FrameBoundaryEXT( VkFrameBoundaryEXT const & rhs ) VULKAN_HPP_NOEXCEPT : FrameBoundaryEXT( *reinterpret_cast( &rhs ) ) {} # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) template FrameBoundaryEXT( VULKAN_HPP_NAMESPACE::FrameBoundaryFlagsEXT flags_, uint64_t frameID_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & images_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & buffers_ = {}, uint64_t tagName_ = {}, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & tag_ = {}, const void * pNext_ = nullptr ) : pNext( pNext_ ) , flags( flags_ ) , frameID( frameID_ ) , imageCount( static_cast( images_.size() ) ) , pImages( images_.data() ) , bufferCount( static_cast( buffers_.size() ) ) , pBuffers( buffers_.data() ) , tagName( tagName_ ) , tagSize( tag_.size() * sizeof( T ) ) , pTag( tag_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ FrameBoundaryEXT & operator=( FrameBoundaryEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ FrameBoundaryEXT & operator=( VkFrameBoundaryEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 FrameBoundaryEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 FrameBoundaryEXT & setFlags( VULKAN_HPP_NAMESPACE::FrameBoundaryFlagsEXT flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 FrameBoundaryEXT & setFrameID( uint64_t frameID_ ) VULKAN_HPP_NOEXCEPT { frameID = frameID_; return *this; } VULKAN_HPP_CONSTEXPR_14 FrameBoundaryEXT & setImageCount( uint32_t imageCount_ ) VULKAN_HPP_NOEXCEPT { imageCount = imageCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 FrameBoundaryEXT & setPImages( const VULKAN_HPP_NAMESPACE::Image * pImages_ ) VULKAN_HPP_NOEXCEPT { pImages = pImages_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) FrameBoundaryEXT & setImages( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & images_ ) VULKAN_HPP_NOEXCEPT { imageCount = static_cast( images_.size() ); pImages = images_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 FrameBoundaryEXT & setBufferCount( uint32_t bufferCount_ ) VULKAN_HPP_NOEXCEPT { bufferCount = bufferCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 FrameBoundaryEXT & setPBuffers( const VULKAN_HPP_NAMESPACE::Buffer * pBuffers_ ) VULKAN_HPP_NOEXCEPT { pBuffers = pBuffers_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) FrameBoundaryEXT & setBuffers( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & buffers_ ) VULKAN_HPP_NOEXCEPT { bufferCount = static_cast( buffers_.size() ); pBuffers = buffers_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 FrameBoundaryEXT & setTagName( uint64_t tagName_ ) VULKAN_HPP_NOEXCEPT { tagName = tagName_; return *this; } VULKAN_HPP_CONSTEXPR_14 FrameBoundaryEXT & setTagSize( size_t tagSize_ ) VULKAN_HPP_NOEXCEPT { tagSize = tagSize_; return *this; } VULKAN_HPP_CONSTEXPR_14 FrameBoundaryEXT & setPTag( const void * pTag_ ) VULKAN_HPP_NOEXCEPT { pTag = pTag_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) template FrameBoundaryEXT & setTag( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & tag_ ) VULKAN_HPP_NOEXCEPT { tagSize = tag_.size() * sizeof( T ); pTag = tag_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkFrameBoundaryEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkFrameBoundaryEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, frameID, imageCount, pImages, bufferCount, pBuffers, tagName, tagSize, pTag ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( FrameBoundaryEXT const & ) const = default; #else bool operator==( FrameBoundaryEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( frameID == rhs.frameID ) && ( imageCount == rhs.imageCount ) && ( pImages == rhs.pImages ) && ( bufferCount == rhs.bufferCount ) && ( pBuffers == rhs.pBuffers ) && ( tagName == rhs.tagName ) && ( tagSize == rhs.tagSize ) && ( pTag == rhs.pTag ); # endif } bool operator!=( FrameBoundaryEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eFrameBoundaryEXT; const void * pNext = {}; VULKAN_HPP_NAMESPACE::FrameBoundaryFlagsEXT flags = {}; uint64_t frameID = {}; uint32_t imageCount = {}; const VULKAN_HPP_NAMESPACE::Image * pImages = {}; uint32_t bufferCount = {}; const VULKAN_HPP_NAMESPACE::Buffer * pBuffers = {}; uint64_t tagName = {}; size_t tagSize = {}; const void * pTag = {}; }; template <> struct CppType { using Type = FrameBoundaryEXT; }; struct FramebufferAttachmentImageInfo { using NativeType = VkFramebufferAttachmentImageInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eFramebufferAttachmentImageInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR FramebufferAttachmentImageInfo( VULKAN_HPP_NAMESPACE::ImageCreateFlags flags_ = {}, VULKAN_HPP_NAMESPACE::ImageUsageFlags usage_ = {}, uint32_t width_ = {}, uint32_t height_ = {}, uint32_t layerCount_ = {}, uint32_t viewFormatCount_ = {}, const VULKAN_HPP_NAMESPACE::Format * pViewFormats_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , usage{ usage_ } , width{ width_ } , height{ height_ } , layerCount{ layerCount_ } , viewFormatCount{ viewFormatCount_ } , pViewFormats{ pViewFormats_ } { } VULKAN_HPP_CONSTEXPR FramebufferAttachmentImageInfo( FramebufferAttachmentImageInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; FramebufferAttachmentImageInfo( VkFramebufferAttachmentImageInfo const & rhs ) VULKAN_HPP_NOEXCEPT : FramebufferAttachmentImageInfo( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) FramebufferAttachmentImageInfo( VULKAN_HPP_NAMESPACE::ImageCreateFlags flags_, VULKAN_HPP_NAMESPACE::ImageUsageFlags usage_, uint32_t width_, uint32_t height_, uint32_t layerCount_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & viewFormats_, const void * pNext_ = nullptr ) : pNext( pNext_ ) , flags( flags_ ) , usage( usage_ ) , width( width_ ) , height( height_ ) , layerCount( layerCount_ ) , viewFormatCount( static_cast( viewFormats_.size() ) ) , pViewFormats( viewFormats_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ FramebufferAttachmentImageInfo & operator=( FramebufferAttachmentImageInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ FramebufferAttachmentImageInfo & operator=( VkFramebufferAttachmentImageInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 FramebufferAttachmentImageInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 FramebufferAttachmentImageInfo & setFlags( VULKAN_HPP_NAMESPACE::ImageCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 FramebufferAttachmentImageInfo & setUsage( VULKAN_HPP_NAMESPACE::ImageUsageFlags usage_ ) VULKAN_HPP_NOEXCEPT { usage = usage_; return *this; } VULKAN_HPP_CONSTEXPR_14 FramebufferAttachmentImageInfo & setWidth( uint32_t width_ ) VULKAN_HPP_NOEXCEPT { width = width_; return *this; } VULKAN_HPP_CONSTEXPR_14 FramebufferAttachmentImageInfo & setHeight( uint32_t height_ ) VULKAN_HPP_NOEXCEPT { height = height_; return *this; } VULKAN_HPP_CONSTEXPR_14 FramebufferAttachmentImageInfo & setLayerCount( uint32_t layerCount_ ) VULKAN_HPP_NOEXCEPT { layerCount = layerCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 FramebufferAttachmentImageInfo & setViewFormatCount( uint32_t viewFormatCount_ ) VULKAN_HPP_NOEXCEPT { viewFormatCount = viewFormatCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 FramebufferAttachmentImageInfo & setPViewFormats( const VULKAN_HPP_NAMESPACE::Format * pViewFormats_ ) VULKAN_HPP_NOEXCEPT { pViewFormats = pViewFormats_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) FramebufferAttachmentImageInfo & setViewFormats( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & viewFormats_ ) VULKAN_HPP_NOEXCEPT { viewFormatCount = static_cast( viewFormats_.size() ); pViewFormats = viewFormats_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkFramebufferAttachmentImageInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkFramebufferAttachmentImageInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, usage, width, height, layerCount, viewFormatCount, pViewFormats ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( FramebufferAttachmentImageInfo const & ) const = default; #else bool operator==( FramebufferAttachmentImageInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( usage == rhs.usage ) && ( width == rhs.width ) && ( height == rhs.height ) && ( layerCount == rhs.layerCount ) && ( viewFormatCount == rhs.viewFormatCount ) && ( pViewFormats == rhs.pViewFormats ); # endif } bool operator!=( FramebufferAttachmentImageInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eFramebufferAttachmentImageInfo; const void * pNext = {}; VULKAN_HPP_NAMESPACE::ImageCreateFlags flags = {}; VULKAN_HPP_NAMESPACE::ImageUsageFlags usage = {}; uint32_t width = {}; uint32_t height = {}; uint32_t layerCount = {}; uint32_t viewFormatCount = {}; const VULKAN_HPP_NAMESPACE::Format * pViewFormats = {}; }; template <> struct CppType { using Type = FramebufferAttachmentImageInfo; }; using FramebufferAttachmentImageInfoKHR = FramebufferAttachmentImageInfo; struct FramebufferAttachmentsCreateInfo { using NativeType = VkFramebufferAttachmentsCreateInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eFramebufferAttachmentsCreateInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR FramebufferAttachmentsCreateInfo( uint32_t attachmentImageInfoCount_ = {}, const VULKAN_HPP_NAMESPACE::FramebufferAttachmentImageInfo * pAttachmentImageInfos_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , attachmentImageInfoCount{ attachmentImageInfoCount_ } , pAttachmentImageInfos{ pAttachmentImageInfos_ } { } VULKAN_HPP_CONSTEXPR FramebufferAttachmentsCreateInfo( FramebufferAttachmentsCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; FramebufferAttachmentsCreateInfo( VkFramebufferAttachmentsCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT : FramebufferAttachmentsCreateInfo( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) FramebufferAttachmentsCreateInfo( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & attachmentImageInfos_, const void * pNext_ = nullptr ) : pNext( pNext_ ) , attachmentImageInfoCount( static_cast( attachmentImageInfos_.size() ) ) , pAttachmentImageInfos( attachmentImageInfos_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ FramebufferAttachmentsCreateInfo & operator=( FramebufferAttachmentsCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ FramebufferAttachmentsCreateInfo & operator=( VkFramebufferAttachmentsCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 FramebufferAttachmentsCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 FramebufferAttachmentsCreateInfo & setAttachmentImageInfoCount( uint32_t attachmentImageInfoCount_ ) VULKAN_HPP_NOEXCEPT { attachmentImageInfoCount = attachmentImageInfoCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 FramebufferAttachmentsCreateInfo & setPAttachmentImageInfos( const VULKAN_HPP_NAMESPACE::FramebufferAttachmentImageInfo * pAttachmentImageInfos_ ) VULKAN_HPP_NOEXCEPT { pAttachmentImageInfos = pAttachmentImageInfos_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) FramebufferAttachmentsCreateInfo & setAttachmentImageInfos( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & attachmentImageInfos_ ) VULKAN_HPP_NOEXCEPT { attachmentImageInfoCount = static_cast( attachmentImageInfos_.size() ); pAttachmentImageInfos = attachmentImageInfos_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkFramebufferAttachmentsCreateInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkFramebufferAttachmentsCreateInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, attachmentImageInfoCount, pAttachmentImageInfos ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( FramebufferAttachmentsCreateInfo const & ) const = default; #else bool operator==( FramebufferAttachmentsCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( attachmentImageInfoCount == rhs.attachmentImageInfoCount ) && ( pAttachmentImageInfos == rhs.pAttachmentImageInfos ); # endif } bool operator!=( FramebufferAttachmentsCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eFramebufferAttachmentsCreateInfo; const void * pNext = {}; uint32_t attachmentImageInfoCount = {}; const VULKAN_HPP_NAMESPACE::FramebufferAttachmentImageInfo * pAttachmentImageInfos = {}; }; template <> struct CppType { using Type = FramebufferAttachmentsCreateInfo; }; using FramebufferAttachmentsCreateInfoKHR = FramebufferAttachmentsCreateInfo; struct FramebufferCreateInfo { using NativeType = VkFramebufferCreateInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eFramebufferCreateInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR FramebufferCreateInfo( VULKAN_HPP_NAMESPACE::FramebufferCreateFlags flags_ = {}, VULKAN_HPP_NAMESPACE::RenderPass renderPass_ = {}, uint32_t attachmentCount_ = {}, const VULKAN_HPP_NAMESPACE::ImageView * pAttachments_ = {}, uint32_t width_ = {}, uint32_t height_ = {}, uint32_t layers_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , renderPass{ renderPass_ } , attachmentCount{ attachmentCount_ } , pAttachments{ pAttachments_ } , width{ width_ } , height{ height_ } , layers{ layers_ } { } VULKAN_HPP_CONSTEXPR FramebufferCreateInfo( FramebufferCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; FramebufferCreateInfo( VkFramebufferCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT : FramebufferCreateInfo( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) FramebufferCreateInfo( VULKAN_HPP_NAMESPACE::FramebufferCreateFlags flags_, VULKAN_HPP_NAMESPACE::RenderPass renderPass_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & attachments_, uint32_t width_ = {}, uint32_t height_ = {}, uint32_t layers_ = {}, const void * pNext_ = nullptr ) : pNext( pNext_ ) , flags( flags_ ) , renderPass( renderPass_ ) , attachmentCount( static_cast( attachments_.size() ) ) , pAttachments( attachments_.data() ) , width( width_ ) , height( height_ ) , layers( layers_ ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ FramebufferCreateInfo & operator=( FramebufferCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ FramebufferCreateInfo & operator=( VkFramebufferCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 FramebufferCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 FramebufferCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::FramebufferCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 FramebufferCreateInfo & setRenderPass( VULKAN_HPP_NAMESPACE::RenderPass renderPass_ ) VULKAN_HPP_NOEXCEPT { renderPass = renderPass_; return *this; } VULKAN_HPP_CONSTEXPR_14 FramebufferCreateInfo & setAttachmentCount( uint32_t attachmentCount_ ) VULKAN_HPP_NOEXCEPT { attachmentCount = attachmentCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 FramebufferCreateInfo & setPAttachments( const VULKAN_HPP_NAMESPACE::ImageView * pAttachments_ ) VULKAN_HPP_NOEXCEPT { pAttachments = pAttachments_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) FramebufferCreateInfo & setAttachments( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & attachments_ ) VULKAN_HPP_NOEXCEPT { attachmentCount = static_cast( attachments_.size() ); pAttachments = attachments_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 FramebufferCreateInfo & setWidth( uint32_t width_ ) VULKAN_HPP_NOEXCEPT { width = width_; return *this; } VULKAN_HPP_CONSTEXPR_14 FramebufferCreateInfo & setHeight( uint32_t height_ ) VULKAN_HPP_NOEXCEPT { height = height_; return *this; } VULKAN_HPP_CONSTEXPR_14 FramebufferCreateInfo & setLayers( uint32_t layers_ ) VULKAN_HPP_NOEXCEPT { layers = layers_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkFramebufferCreateInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkFramebufferCreateInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, renderPass, attachmentCount, pAttachments, width, height, layers ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( FramebufferCreateInfo const & ) const = default; #else bool operator==( FramebufferCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( renderPass == rhs.renderPass ) && ( attachmentCount == rhs.attachmentCount ) && ( pAttachments == rhs.pAttachments ) && ( width == rhs.width ) && ( height == rhs.height ) && ( layers == rhs.layers ); # endif } bool operator!=( FramebufferCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eFramebufferCreateInfo; const void * pNext = {}; VULKAN_HPP_NAMESPACE::FramebufferCreateFlags flags = {}; VULKAN_HPP_NAMESPACE::RenderPass renderPass = {}; uint32_t attachmentCount = {}; const VULKAN_HPP_NAMESPACE::ImageView * pAttachments = {}; uint32_t width = {}; uint32_t height = {}; uint32_t layers = {}; }; template <> struct CppType { using Type = FramebufferCreateInfo; }; struct FramebufferMixedSamplesCombinationNV { using NativeType = VkFramebufferMixedSamplesCombinationNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eFramebufferMixedSamplesCombinationNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR FramebufferMixedSamplesCombinationNV( VULKAN_HPP_NAMESPACE::CoverageReductionModeNV coverageReductionMode_ = VULKAN_HPP_NAMESPACE::CoverageReductionModeNV::eMerge, VULKAN_HPP_NAMESPACE::SampleCountFlagBits rasterizationSamples_ = VULKAN_HPP_NAMESPACE::SampleCountFlagBits::e1, VULKAN_HPP_NAMESPACE::SampleCountFlags depthStencilSamples_ = {}, VULKAN_HPP_NAMESPACE::SampleCountFlags colorSamples_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , coverageReductionMode{ coverageReductionMode_ } , rasterizationSamples{ rasterizationSamples_ } , depthStencilSamples{ depthStencilSamples_ } , colorSamples{ colorSamples_ } { } VULKAN_HPP_CONSTEXPR FramebufferMixedSamplesCombinationNV( FramebufferMixedSamplesCombinationNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; FramebufferMixedSamplesCombinationNV( VkFramebufferMixedSamplesCombinationNV const & rhs ) VULKAN_HPP_NOEXCEPT : FramebufferMixedSamplesCombinationNV( *reinterpret_cast( &rhs ) ) { } FramebufferMixedSamplesCombinationNV & operator=( FramebufferMixedSamplesCombinationNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ FramebufferMixedSamplesCombinationNV & operator=( VkFramebufferMixedSamplesCombinationNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkFramebufferMixedSamplesCombinationNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkFramebufferMixedSamplesCombinationNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, coverageReductionMode, rasterizationSamples, depthStencilSamples, colorSamples ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( FramebufferMixedSamplesCombinationNV const & ) const = default; #else bool operator==( FramebufferMixedSamplesCombinationNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( coverageReductionMode == rhs.coverageReductionMode ) && ( rasterizationSamples == rhs.rasterizationSamples ) && ( depthStencilSamples == rhs.depthStencilSamples ) && ( colorSamples == rhs.colorSamples ); # endif } bool operator!=( FramebufferMixedSamplesCombinationNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eFramebufferMixedSamplesCombinationNV; void * pNext = {}; VULKAN_HPP_NAMESPACE::CoverageReductionModeNV coverageReductionMode = VULKAN_HPP_NAMESPACE::CoverageReductionModeNV::eMerge; VULKAN_HPP_NAMESPACE::SampleCountFlagBits rasterizationSamples = VULKAN_HPP_NAMESPACE::SampleCountFlagBits::e1; VULKAN_HPP_NAMESPACE::SampleCountFlags depthStencilSamples = {}; VULKAN_HPP_NAMESPACE::SampleCountFlags colorSamples = {}; }; template <> struct CppType { using Type = FramebufferMixedSamplesCombinationNV; }; struct GeneratedCommandsInfoEXT { using NativeType = VkGeneratedCommandsInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eGeneratedCommandsInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR GeneratedCommandsInfoEXT( VULKAN_HPP_NAMESPACE::ShaderStageFlags shaderStages_ = {}, VULKAN_HPP_NAMESPACE::IndirectExecutionSetEXT indirectExecutionSet_ = {}, VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutEXT indirectCommandsLayout_ = {}, VULKAN_HPP_NAMESPACE::DeviceAddress indirectAddress_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize indirectAddressSize_ = {}, VULKAN_HPP_NAMESPACE::DeviceAddress preprocessAddress_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize preprocessSize_ = {}, uint32_t maxSequenceCount_ = {}, VULKAN_HPP_NAMESPACE::DeviceAddress sequenceCountAddress_ = {}, uint32_t maxDrawCount_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , shaderStages{ shaderStages_ } , indirectExecutionSet{ indirectExecutionSet_ } , indirectCommandsLayout{ indirectCommandsLayout_ } , indirectAddress{ indirectAddress_ } , indirectAddressSize{ indirectAddressSize_ } , preprocessAddress{ preprocessAddress_ } , preprocessSize{ preprocessSize_ } , maxSequenceCount{ maxSequenceCount_ } , sequenceCountAddress{ sequenceCountAddress_ } , maxDrawCount{ maxDrawCount_ } { } VULKAN_HPP_CONSTEXPR GeneratedCommandsInfoEXT( GeneratedCommandsInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; GeneratedCommandsInfoEXT( VkGeneratedCommandsInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : GeneratedCommandsInfoEXT( *reinterpret_cast( &rhs ) ) { } GeneratedCommandsInfoEXT & operator=( GeneratedCommandsInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ GeneratedCommandsInfoEXT & operator=( VkGeneratedCommandsInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 GeneratedCommandsInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 GeneratedCommandsInfoEXT & setShaderStages( VULKAN_HPP_NAMESPACE::ShaderStageFlags shaderStages_ ) VULKAN_HPP_NOEXCEPT { shaderStages = shaderStages_; return *this; } VULKAN_HPP_CONSTEXPR_14 GeneratedCommandsInfoEXT & setIndirectExecutionSet( VULKAN_HPP_NAMESPACE::IndirectExecutionSetEXT indirectExecutionSet_ ) VULKAN_HPP_NOEXCEPT { indirectExecutionSet = indirectExecutionSet_; return *this; } VULKAN_HPP_CONSTEXPR_14 GeneratedCommandsInfoEXT & setIndirectCommandsLayout( VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutEXT indirectCommandsLayout_ ) VULKAN_HPP_NOEXCEPT { indirectCommandsLayout = indirectCommandsLayout_; return *this; } VULKAN_HPP_CONSTEXPR_14 GeneratedCommandsInfoEXT & setIndirectAddress( VULKAN_HPP_NAMESPACE::DeviceAddress indirectAddress_ ) VULKAN_HPP_NOEXCEPT { indirectAddress = indirectAddress_; return *this; } VULKAN_HPP_CONSTEXPR_14 GeneratedCommandsInfoEXT & setIndirectAddressSize( VULKAN_HPP_NAMESPACE::DeviceSize indirectAddressSize_ ) VULKAN_HPP_NOEXCEPT { indirectAddressSize = indirectAddressSize_; return *this; } VULKAN_HPP_CONSTEXPR_14 GeneratedCommandsInfoEXT & setPreprocessAddress( VULKAN_HPP_NAMESPACE::DeviceAddress preprocessAddress_ ) VULKAN_HPP_NOEXCEPT { preprocessAddress = preprocessAddress_; return *this; } VULKAN_HPP_CONSTEXPR_14 GeneratedCommandsInfoEXT & setPreprocessSize( VULKAN_HPP_NAMESPACE::DeviceSize preprocessSize_ ) VULKAN_HPP_NOEXCEPT { preprocessSize = preprocessSize_; return *this; } VULKAN_HPP_CONSTEXPR_14 GeneratedCommandsInfoEXT & setMaxSequenceCount( uint32_t maxSequenceCount_ ) VULKAN_HPP_NOEXCEPT { maxSequenceCount = maxSequenceCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 GeneratedCommandsInfoEXT & setSequenceCountAddress( VULKAN_HPP_NAMESPACE::DeviceAddress sequenceCountAddress_ ) VULKAN_HPP_NOEXCEPT { sequenceCountAddress = sequenceCountAddress_; return *this; } VULKAN_HPP_CONSTEXPR_14 GeneratedCommandsInfoEXT & setMaxDrawCount( uint32_t maxDrawCount_ ) VULKAN_HPP_NOEXCEPT { maxDrawCount = maxDrawCount_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkGeneratedCommandsInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkGeneratedCommandsInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, shaderStages, indirectExecutionSet, indirectCommandsLayout, indirectAddress, indirectAddressSize, preprocessAddress, preprocessSize, maxSequenceCount, sequenceCountAddress, maxDrawCount ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( GeneratedCommandsInfoEXT const & ) const = default; #else bool operator==( GeneratedCommandsInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( shaderStages == rhs.shaderStages ) && ( indirectExecutionSet == rhs.indirectExecutionSet ) && ( indirectCommandsLayout == rhs.indirectCommandsLayout ) && ( indirectAddress == rhs.indirectAddress ) && ( indirectAddressSize == rhs.indirectAddressSize ) && ( preprocessAddress == rhs.preprocessAddress ) && ( preprocessSize == rhs.preprocessSize ) && ( maxSequenceCount == rhs.maxSequenceCount ) && ( sequenceCountAddress == rhs.sequenceCountAddress ) && ( maxDrawCount == rhs.maxDrawCount ); # endif } bool operator!=( GeneratedCommandsInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eGeneratedCommandsInfoEXT; const void * pNext = {}; VULKAN_HPP_NAMESPACE::ShaderStageFlags shaderStages = {}; VULKAN_HPP_NAMESPACE::IndirectExecutionSetEXT indirectExecutionSet = {}; VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutEXT indirectCommandsLayout = {}; VULKAN_HPP_NAMESPACE::DeviceAddress indirectAddress = {}; VULKAN_HPP_NAMESPACE::DeviceSize indirectAddressSize = {}; VULKAN_HPP_NAMESPACE::DeviceAddress preprocessAddress = {}; VULKAN_HPP_NAMESPACE::DeviceSize preprocessSize = {}; uint32_t maxSequenceCount = {}; VULKAN_HPP_NAMESPACE::DeviceAddress sequenceCountAddress = {}; uint32_t maxDrawCount = {}; }; template <> struct CppType { using Type = GeneratedCommandsInfoEXT; }; struct IndirectCommandsStreamNV { using NativeType = VkIndirectCommandsStreamNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR IndirectCommandsStreamNV( VULKAN_HPP_NAMESPACE::Buffer buffer_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize offset_ = {} ) VULKAN_HPP_NOEXCEPT : buffer{ buffer_ } , offset{ offset_ } { } VULKAN_HPP_CONSTEXPR IndirectCommandsStreamNV( IndirectCommandsStreamNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; IndirectCommandsStreamNV( VkIndirectCommandsStreamNV const & rhs ) VULKAN_HPP_NOEXCEPT : IndirectCommandsStreamNV( *reinterpret_cast( &rhs ) ) { } IndirectCommandsStreamNV & operator=( IndirectCommandsStreamNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ IndirectCommandsStreamNV & operator=( VkIndirectCommandsStreamNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 IndirectCommandsStreamNV & setBuffer( VULKAN_HPP_NAMESPACE::Buffer buffer_ ) VULKAN_HPP_NOEXCEPT { buffer = buffer_; return *this; } VULKAN_HPP_CONSTEXPR_14 IndirectCommandsStreamNV & setOffset( VULKAN_HPP_NAMESPACE::DeviceSize offset_ ) VULKAN_HPP_NOEXCEPT { offset = offset_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkIndirectCommandsStreamNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkIndirectCommandsStreamNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( buffer, offset ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( IndirectCommandsStreamNV const & ) const = default; #else bool operator==( IndirectCommandsStreamNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( buffer == rhs.buffer ) && ( offset == rhs.offset ); # endif } bool operator!=( IndirectCommandsStreamNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::Buffer buffer = {}; VULKAN_HPP_NAMESPACE::DeviceSize offset = {}; }; struct GeneratedCommandsInfoNV { using NativeType = VkGeneratedCommandsInfoNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eGeneratedCommandsInfoNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR GeneratedCommandsInfoNV( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint_ = VULKAN_HPP_NAMESPACE::PipelineBindPoint::eGraphics, VULKAN_HPP_NAMESPACE::Pipeline pipeline_ = {}, VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNV indirectCommandsLayout_ = {}, uint32_t streamCount_ = {}, const VULKAN_HPP_NAMESPACE::IndirectCommandsStreamNV * pStreams_ = {}, uint32_t sequencesCount_ = {}, VULKAN_HPP_NAMESPACE::Buffer preprocessBuffer_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize preprocessOffset_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize preprocessSize_ = {}, VULKAN_HPP_NAMESPACE::Buffer sequencesCountBuffer_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize sequencesCountOffset_ = {}, VULKAN_HPP_NAMESPACE::Buffer sequencesIndexBuffer_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize sequencesIndexOffset_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , pipelineBindPoint{ pipelineBindPoint_ } , pipeline{ pipeline_ } , indirectCommandsLayout{ indirectCommandsLayout_ } , streamCount{ streamCount_ } , pStreams{ pStreams_ } , sequencesCount{ sequencesCount_ } , preprocessBuffer{ preprocessBuffer_ } , preprocessOffset{ preprocessOffset_ } , preprocessSize{ preprocessSize_ } , sequencesCountBuffer{ sequencesCountBuffer_ } , sequencesCountOffset{ sequencesCountOffset_ } , sequencesIndexBuffer{ sequencesIndexBuffer_ } , sequencesIndexOffset{ sequencesIndexOffset_ } { } VULKAN_HPP_CONSTEXPR GeneratedCommandsInfoNV( GeneratedCommandsInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; GeneratedCommandsInfoNV( VkGeneratedCommandsInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT : GeneratedCommandsInfoNV( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) GeneratedCommandsInfoNV( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint_, VULKAN_HPP_NAMESPACE::Pipeline pipeline_, VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNV indirectCommandsLayout_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & streams_, uint32_t sequencesCount_ = {}, VULKAN_HPP_NAMESPACE::Buffer preprocessBuffer_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize preprocessOffset_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize preprocessSize_ = {}, VULKAN_HPP_NAMESPACE::Buffer sequencesCountBuffer_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize sequencesCountOffset_ = {}, VULKAN_HPP_NAMESPACE::Buffer sequencesIndexBuffer_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize sequencesIndexOffset_ = {}, const void * pNext_ = nullptr ) : pNext( pNext_ ) , pipelineBindPoint( pipelineBindPoint_ ) , pipeline( pipeline_ ) , indirectCommandsLayout( indirectCommandsLayout_ ) , streamCount( static_cast( streams_.size() ) ) , pStreams( streams_.data() ) , sequencesCount( sequencesCount_ ) , preprocessBuffer( preprocessBuffer_ ) , preprocessOffset( preprocessOffset_ ) , preprocessSize( preprocessSize_ ) , sequencesCountBuffer( sequencesCountBuffer_ ) , sequencesCountOffset( sequencesCountOffset_ ) , sequencesIndexBuffer( sequencesIndexBuffer_ ) , sequencesIndexOffset( sequencesIndexOffset_ ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ GeneratedCommandsInfoNV & operator=( GeneratedCommandsInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ GeneratedCommandsInfoNV & operator=( VkGeneratedCommandsInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 GeneratedCommandsInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 GeneratedCommandsInfoNV & setPipelineBindPoint( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint_ ) VULKAN_HPP_NOEXCEPT { pipelineBindPoint = pipelineBindPoint_; return *this; } VULKAN_HPP_CONSTEXPR_14 GeneratedCommandsInfoNV & setPipeline( VULKAN_HPP_NAMESPACE::Pipeline pipeline_ ) VULKAN_HPP_NOEXCEPT { pipeline = pipeline_; return *this; } VULKAN_HPP_CONSTEXPR_14 GeneratedCommandsInfoNV & setIndirectCommandsLayout( VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNV indirectCommandsLayout_ ) VULKAN_HPP_NOEXCEPT { indirectCommandsLayout = indirectCommandsLayout_; return *this; } VULKAN_HPP_CONSTEXPR_14 GeneratedCommandsInfoNV & setStreamCount( uint32_t streamCount_ ) VULKAN_HPP_NOEXCEPT { streamCount = streamCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 GeneratedCommandsInfoNV & setPStreams( const VULKAN_HPP_NAMESPACE::IndirectCommandsStreamNV * pStreams_ ) VULKAN_HPP_NOEXCEPT { pStreams = pStreams_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) GeneratedCommandsInfoNV & setStreams( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & streams_ ) VULKAN_HPP_NOEXCEPT { streamCount = static_cast( streams_.size() ); pStreams = streams_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 GeneratedCommandsInfoNV & setSequencesCount( uint32_t sequencesCount_ ) VULKAN_HPP_NOEXCEPT { sequencesCount = sequencesCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 GeneratedCommandsInfoNV & setPreprocessBuffer( VULKAN_HPP_NAMESPACE::Buffer preprocessBuffer_ ) VULKAN_HPP_NOEXCEPT { preprocessBuffer = preprocessBuffer_; return *this; } VULKAN_HPP_CONSTEXPR_14 GeneratedCommandsInfoNV & setPreprocessOffset( VULKAN_HPP_NAMESPACE::DeviceSize preprocessOffset_ ) VULKAN_HPP_NOEXCEPT { preprocessOffset = preprocessOffset_; return *this; } VULKAN_HPP_CONSTEXPR_14 GeneratedCommandsInfoNV & setPreprocessSize( VULKAN_HPP_NAMESPACE::DeviceSize preprocessSize_ ) VULKAN_HPP_NOEXCEPT { preprocessSize = preprocessSize_; return *this; } VULKAN_HPP_CONSTEXPR_14 GeneratedCommandsInfoNV & setSequencesCountBuffer( VULKAN_HPP_NAMESPACE::Buffer sequencesCountBuffer_ ) VULKAN_HPP_NOEXCEPT { sequencesCountBuffer = sequencesCountBuffer_; return *this; } VULKAN_HPP_CONSTEXPR_14 GeneratedCommandsInfoNV & setSequencesCountOffset( VULKAN_HPP_NAMESPACE::DeviceSize sequencesCountOffset_ ) VULKAN_HPP_NOEXCEPT { sequencesCountOffset = sequencesCountOffset_; return *this; } VULKAN_HPP_CONSTEXPR_14 GeneratedCommandsInfoNV & setSequencesIndexBuffer( VULKAN_HPP_NAMESPACE::Buffer sequencesIndexBuffer_ ) VULKAN_HPP_NOEXCEPT { sequencesIndexBuffer = sequencesIndexBuffer_; return *this; } VULKAN_HPP_CONSTEXPR_14 GeneratedCommandsInfoNV & setSequencesIndexOffset( VULKAN_HPP_NAMESPACE::DeviceSize sequencesIndexOffset_ ) VULKAN_HPP_NOEXCEPT { sequencesIndexOffset = sequencesIndexOffset_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkGeneratedCommandsInfoNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkGeneratedCommandsInfoNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, pipelineBindPoint, pipeline, indirectCommandsLayout, streamCount, pStreams, sequencesCount, preprocessBuffer, preprocessOffset, preprocessSize, sequencesCountBuffer, sequencesCountOffset, sequencesIndexBuffer, sequencesIndexOffset ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( GeneratedCommandsInfoNV const & ) const = default; #else bool operator==( GeneratedCommandsInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( pipelineBindPoint == rhs.pipelineBindPoint ) && ( pipeline == rhs.pipeline ) && ( indirectCommandsLayout == rhs.indirectCommandsLayout ) && ( streamCount == rhs.streamCount ) && ( pStreams == rhs.pStreams ) && ( sequencesCount == rhs.sequencesCount ) && ( preprocessBuffer == rhs.preprocessBuffer ) && ( preprocessOffset == rhs.preprocessOffset ) && ( preprocessSize == rhs.preprocessSize ) && ( sequencesCountBuffer == rhs.sequencesCountBuffer ) && ( sequencesCountOffset == rhs.sequencesCountOffset ) && ( sequencesIndexBuffer == rhs.sequencesIndexBuffer ) && ( sequencesIndexOffset == rhs.sequencesIndexOffset ); # endif } bool operator!=( GeneratedCommandsInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eGeneratedCommandsInfoNV; const void * pNext = {}; VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint = VULKAN_HPP_NAMESPACE::PipelineBindPoint::eGraphics; VULKAN_HPP_NAMESPACE::Pipeline pipeline = {}; VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNV indirectCommandsLayout = {}; uint32_t streamCount = {}; const VULKAN_HPP_NAMESPACE::IndirectCommandsStreamNV * pStreams = {}; uint32_t sequencesCount = {}; VULKAN_HPP_NAMESPACE::Buffer preprocessBuffer = {}; VULKAN_HPP_NAMESPACE::DeviceSize preprocessOffset = {}; VULKAN_HPP_NAMESPACE::DeviceSize preprocessSize = {}; VULKAN_HPP_NAMESPACE::Buffer sequencesCountBuffer = {}; VULKAN_HPP_NAMESPACE::DeviceSize sequencesCountOffset = {}; VULKAN_HPP_NAMESPACE::Buffer sequencesIndexBuffer = {}; VULKAN_HPP_NAMESPACE::DeviceSize sequencesIndexOffset = {}; }; template <> struct CppType { using Type = GeneratedCommandsInfoNV; }; struct GeneratedCommandsMemoryRequirementsInfoEXT { using NativeType = VkGeneratedCommandsMemoryRequirementsInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eGeneratedCommandsMemoryRequirementsInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR GeneratedCommandsMemoryRequirementsInfoEXT( VULKAN_HPP_NAMESPACE::IndirectExecutionSetEXT indirectExecutionSet_ = {}, VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutEXT indirectCommandsLayout_ = {}, uint32_t maxSequenceCount_ = {}, uint32_t maxDrawCount_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , indirectExecutionSet{ indirectExecutionSet_ } , indirectCommandsLayout{ indirectCommandsLayout_ } , maxSequenceCount{ maxSequenceCount_ } , maxDrawCount{ maxDrawCount_ } { } VULKAN_HPP_CONSTEXPR GeneratedCommandsMemoryRequirementsInfoEXT( GeneratedCommandsMemoryRequirementsInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; GeneratedCommandsMemoryRequirementsInfoEXT( VkGeneratedCommandsMemoryRequirementsInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : GeneratedCommandsMemoryRequirementsInfoEXT( *reinterpret_cast( &rhs ) ) { } GeneratedCommandsMemoryRequirementsInfoEXT & operator=( GeneratedCommandsMemoryRequirementsInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ GeneratedCommandsMemoryRequirementsInfoEXT & operator=( VkGeneratedCommandsMemoryRequirementsInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 GeneratedCommandsMemoryRequirementsInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 GeneratedCommandsMemoryRequirementsInfoEXT & setIndirectExecutionSet( VULKAN_HPP_NAMESPACE::IndirectExecutionSetEXT indirectExecutionSet_ ) VULKAN_HPP_NOEXCEPT { indirectExecutionSet = indirectExecutionSet_; return *this; } VULKAN_HPP_CONSTEXPR_14 GeneratedCommandsMemoryRequirementsInfoEXT & setIndirectCommandsLayout( VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutEXT indirectCommandsLayout_ ) VULKAN_HPP_NOEXCEPT { indirectCommandsLayout = indirectCommandsLayout_; return *this; } VULKAN_HPP_CONSTEXPR_14 GeneratedCommandsMemoryRequirementsInfoEXT & setMaxSequenceCount( uint32_t maxSequenceCount_ ) VULKAN_HPP_NOEXCEPT { maxSequenceCount = maxSequenceCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 GeneratedCommandsMemoryRequirementsInfoEXT & setMaxDrawCount( uint32_t maxDrawCount_ ) VULKAN_HPP_NOEXCEPT { maxDrawCount = maxDrawCount_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkGeneratedCommandsMemoryRequirementsInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkGeneratedCommandsMemoryRequirementsInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, indirectExecutionSet, indirectCommandsLayout, maxSequenceCount, maxDrawCount ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( GeneratedCommandsMemoryRequirementsInfoEXT const & ) const = default; #else bool operator==( GeneratedCommandsMemoryRequirementsInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( indirectExecutionSet == rhs.indirectExecutionSet ) && ( indirectCommandsLayout == rhs.indirectCommandsLayout ) && ( maxSequenceCount == rhs.maxSequenceCount ) && ( maxDrawCount == rhs.maxDrawCount ); # endif } bool operator!=( GeneratedCommandsMemoryRequirementsInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eGeneratedCommandsMemoryRequirementsInfoEXT; const void * pNext = {}; VULKAN_HPP_NAMESPACE::IndirectExecutionSetEXT indirectExecutionSet = {}; VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutEXT indirectCommandsLayout = {}; uint32_t maxSequenceCount = {}; uint32_t maxDrawCount = {}; }; template <> struct CppType { using Type = GeneratedCommandsMemoryRequirementsInfoEXT; }; struct GeneratedCommandsMemoryRequirementsInfoNV { using NativeType = VkGeneratedCommandsMemoryRequirementsInfoNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eGeneratedCommandsMemoryRequirementsInfoNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR GeneratedCommandsMemoryRequirementsInfoNV( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint_ = VULKAN_HPP_NAMESPACE::PipelineBindPoint::eGraphics, VULKAN_HPP_NAMESPACE::Pipeline pipeline_ = {}, VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNV indirectCommandsLayout_ = {}, uint32_t maxSequencesCount_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , pipelineBindPoint{ pipelineBindPoint_ } , pipeline{ pipeline_ } , indirectCommandsLayout{ indirectCommandsLayout_ } , maxSequencesCount{ maxSequencesCount_ } { } VULKAN_HPP_CONSTEXPR GeneratedCommandsMemoryRequirementsInfoNV( GeneratedCommandsMemoryRequirementsInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; GeneratedCommandsMemoryRequirementsInfoNV( VkGeneratedCommandsMemoryRequirementsInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT : GeneratedCommandsMemoryRequirementsInfoNV( *reinterpret_cast( &rhs ) ) { } GeneratedCommandsMemoryRequirementsInfoNV & operator=( GeneratedCommandsMemoryRequirementsInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ GeneratedCommandsMemoryRequirementsInfoNV & operator=( VkGeneratedCommandsMemoryRequirementsInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 GeneratedCommandsMemoryRequirementsInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 GeneratedCommandsMemoryRequirementsInfoNV & setPipelineBindPoint( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint_ ) VULKAN_HPP_NOEXCEPT { pipelineBindPoint = pipelineBindPoint_; return *this; } VULKAN_HPP_CONSTEXPR_14 GeneratedCommandsMemoryRequirementsInfoNV & setPipeline( VULKAN_HPP_NAMESPACE::Pipeline pipeline_ ) VULKAN_HPP_NOEXCEPT { pipeline = pipeline_; return *this; } VULKAN_HPP_CONSTEXPR_14 GeneratedCommandsMemoryRequirementsInfoNV & setIndirectCommandsLayout( VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNV indirectCommandsLayout_ ) VULKAN_HPP_NOEXCEPT { indirectCommandsLayout = indirectCommandsLayout_; return *this; } VULKAN_HPP_CONSTEXPR_14 GeneratedCommandsMemoryRequirementsInfoNV & setMaxSequencesCount( uint32_t maxSequencesCount_ ) VULKAN_HPP_NOEXCEPT { maxSequencesCount = maxSequencesCount_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkGeneratedCommandsMemoryRequirementsInfoNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkGeneratedCommandsMemoryRequirementsInfoNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, pipelineBindPoint, pipeline, indirectCommandsLayout, maxSequencesCount ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( GeneratedCommandsMemoryRequirementsInfoNV const & ) const = default; #else bool operator==( GeneratedCommandsMemoryRequirementsInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( pipelineBindPoint == rhs.pipelineBindPoint ) && ( pipeline == rhs.pipeline ) && ( indirectCommandsLayout == rhs.indirectCommandsLayout ) && ( maxSequencesCount == rhs.maxSequencesCount ); # endif } bool operator!=( GeneratedCommandsMemoryRequirementsInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eGeneratedCommandsMemoryRequirementsInfoNV; const void * pNext = {}; VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint = VULKAN_HPP_NAMESPACE::PipelineBindPoint::eGraphics; VULKAN_HPP_NAMESPACE::Pipeline pipeline = {}; VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutNV indirectCommandsLayout = {}; uint32_t maxSequencesCount = {}; }; template <> struct CppType { using Type = GeneratedCommandsMemoryRequirementsInfoNV; }; struct GeneratedCommandsPipelineInfoEXT { using NativeType = VkGeneratedCommandsPipelineInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eGeneratedCommandsPipelineInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR GeneratedCommandsPipelineInfoEXT( VULKAN_HPP_NAMESPACE::Pipeline pipeline_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , pipeline{ pipeline_ } { } VULKAN_HPP_CONSTEXPR GeneratedCommandsPipelineInfoEXT( GeneratedCommandsPipelineInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; GeneratedCommandsPipelineInfoEXT( VkGeneratedCommandsPipelineInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : GeneratedCommandsPipelineInfoEXT( *reinterpret_cast( &rhs ) ) { } GeneratedCommandsPipelineInfoEXT & operator=( GeneratedCommandsPipelineInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ GeneratedCommandsPipelineInfoEXT & operator=( VkGeneratedCommandsPipelineInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 GeneratedCommandsPipelineInfoEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 GeneratedCommandsPipelineInfoEXT & setPipeline( VULKAN_HPP_NAMESPACE::Pipeline pipeline_ ) VULKAN_HPP_NOEXCEPT { pipeline = pipeline_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkGeneratedCommandsPipelineInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkGeneratedCommandsPipelineInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, pipeline ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( GeneratedCommandsPipelineInfoEXT const & ) const = default; #else bool operator==( GeneratedCommandsPipelineInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( pipeline == rhs.pipeline ); # endif } bool operator!=( GeneratedCommandsPipelineInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eGeneratedCommandsPipelineInfoEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::Pipeline pipeline = {}; }; template <> struct CppType { using Type = GeneratedCommandsPipelineInfoEXT; }; struct GeneratedCommandsShaderInfoEXT { using NativeType = VkGeneratedCommandsShaderInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eGeneratedCommandsShaderInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR GeneratedCommandsShaderInfoEXT( uint32_t shaderCount_ = {}, const VULKAN_HPP_NAMESPACE::ShaderEXT * pShaders_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , shaderCount{ shaderCount_ } , pShaders{ pShaders_ } { } VULKAN_HPP_CONSTEXPR GeneratedCommandsShaderInfoEXT( GeneratedCommandsShaderInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; GeneratedCommandsShaderInfoEXT( VkGeneratedCommandsShaderInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : GeneratedCommandsShaderInfoEXT( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) GeneratedCommandsShaderInfoEXT( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & shaders_, void * pNext_ = nullptr ) : pNext( pNext_ ), shaderCount( static_cast( shaders_.size() ) ), pShaders( shaders_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ GeneratedCommandsShaderInfoEXT & operator=( GeneratedCommandsShaderInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ GeneratedCommandsShaderInfoEXT & operator=( VkGeneratedCommandsShaderInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 GeneratedCommandsShaderInfoEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 GeneratedCommandsShaderInfoEXT & setShaderCount( uint32_t shaderCount_ ) VULKAN_HPP_NOEXCEPT { shaderCount = shaderCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 GeneratedCommandsShaderInfoEXT & setPShaders( const VULKAN_HPP_NAMESPACE::ShaderEXT * pShaders_ ) VULKAN_HPP_NOEXCEPT { pShaders = pShaders_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) GeneratedCommandsShaderInfoEXT & setShaders( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & shaders_ ) VULKAN_HPP_NOEXCEPT { shaderCount = static_cast( shaders_.size() ); pShaders = shaders_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkGeneratedCommandsShaderInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkGeneratedCommandsShaderInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, shaderCount, pShaders ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( GeneratedCommandsShaderInfoEXT const & ) const = default; #else bool operator==( GeneratedCommandsShaderInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( shaderCount == rhs.shaderCount ) && ( pShaders == rhs.pShaders ); # endif } bool operator!=( GeneratedCommandsShaderInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eGeneratedCommandsShaderInfoEXT; void * pNext = {}; uint32_t shaderCount = {}; const VULKAN_HPP_NAMESPACE::ShaderEXT * pShaders = {}; }; template <> struct CppType { using Type = GeneratedCommandsShaderInfoEXT; }; struct LatencyTimingsFrameReportNV { using NativeType = VkLatencyTimingsFrameReportNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eLatencyTimingsFrameReportNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR LatencyTimingsFrameReportNV( uint64_t presentID_ = {}, uint64_t inputSampleTimeUs_ = {}, uint64_t simStartTimeUs_ = {}, uint64_t simEndTimeUs_ = {}, uint64_t renderSubmitStartTimeUs_ = {}, uint64_t renderSubmitEndTimeUs_ = {}, uint64_t presentStartTimeUs_ = {}, uint64_t presentEndTimeUs_ = {}, uint64_t driverStartTimeUs_ = {}, uint64_t driverEndTimeUs_ = {}, uint64_t osRenderQueueStartTimeUs_ = {}, uint64_t osRenderQueueEndTimeUs_ = {}, uint64_t gpuRenderStartTimeUs_ = {}, uint64_t gpuRenderEndTimeUs_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , presentID{ presentID_ } , inputSampleTimeUs{ inputSampleTimeUs_ } , simStartTimeUs{ simStartTimeUs_ } , simEndTimeUs{ simEndTimeUs_ } , renderSubmitStartTimeUs{ renderSubmitStartTimeUs_ } , renderSubmitEndTimeUs{ renderSubmitEndTimeUs_ } , presentStartTimeUs{ presentStartTimeUs_ } , presentEndTimeUs{ presentEndTimeUs_ } , driverStartTimeUs{ driverStartTimeUs_ } , driverEndTimeUs{ driverEndTimeUs_ } , osRenderQueueStartTimeUs{ osRenderQueueStartTimeUs_ } , osRenderQueueEndTimeUs{ osRenderQueueEndTimeUs_ } , gpuRenderStartTimeUs{ gpuRenderStartTimeUs_ } , gpuRenderEndTimeUs{ gpuRenderEndTimeUs_ } { } VULKAN_HPP_CONSTEXPR LatencyTimingsFrameReportNV( LatencyTimingsFrameReportNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; LatencyTimingsFrameReportNV( VkLatencyTimingsFrameReportNV const & rhs ) VULKAN_HPP_NOEXCEPT : LatencyTimingsFrameReportNV( *reinterpret_cast( &rhs ) ) { } LatencyTimingsFrameReportNV & operator=( LatencyTimingsFrameReportNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ LatencyTimingsFrameReportNV & operator=( VkLatencyTimingsFrameReportNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkLatencyTimingsFrameReportNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkLatencyTimingsFrameReportNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, presentID, inputSampleTimeUs, simStartTimeUs, simEndTimeUs, renderSubmitStartTimeUs, renderSubmitEndTimeUs, presentStartTimeUs, presentEndTimeUs, driverStartTimeUs, driverEndTimeUs, osRenderQueueStartTimeUs, osRenderQueueEndTimeUs, gpuRenderStartTimeUs, gpuRenderEndTimeUs ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( LatencyTimingsFrameReportNV const & ) const = default; #else bool operator==( LatencyTimingsFrameReportNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( presentID == rhs.presentID ) && ( inputSampleTimeUs == rhs.inputSampleTimeUs ) && ( simStartTimeUs == rhs.simStartTimeUs ) && ( simEndTimeUs == rhs.simEndTimeUs ) && ( renderSubmitStartTimeUs == rhs.renderSubmitStartTimeUs ) && ( renderSubmitEndTimeUs == rhs.renderSubmitEndTimeUs ) && ( presentStartTimeUs == rhs.presentStartTimeUs ) && ( presentEndTimeUs == rhs.presentEndTimeUs ) && ( driverStartTimeUs == rhs.driverStartTimeUs ) && ( driverEndTimeUs == rhs.driverEndTimeUs ) && ( osRenderQueueStartTimeUs == rhs.osRenderQueueStartTimeUs ) && ( osRenderQueueEndTimeUs == rhs.osRenderQueueEndTimeUs ) && ( gpuRenderStartTimeUs == rhs.gpuRenderStartTimeUs ) && ( gpuRenderEndTimeUs == rhs.gpuRenderEndTimeUs ); # endif } bool operator!=( LatencyTimingsFrameReportNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eLatencyTimingsFrameReportNV; const void * pNext = {}; uint64_t presentID = {}; uint64_t inputSampleTimeUs = {}; uint64_t simStartTimeUs = {}; uint64_t simEndTimeUs = {}; uint64_t renderSubmitStartTimeUs = {}; uint64_t renderSubmitEndTimeUs = {}; uint64_t presentStartTimeUs = {}; uint64_t presentEndTimeUs = {}; uint64_t driverStartTimeUs = {}; uint64_t driverEndTimeUs = {}; uint64_t osRenderQueueStartTimeUs = {}; uint64_t osRenderQueueEndTimeUs = {}; uint64_t gpuRenderStartTimeUs = {}; uint64_t gpuRenderEndTimeUs = {}; }; template <> struct CppType { using Type = LatencyTimingsFrameReportNV; }; struct GetLatencyMarkerInfoNV { using NativeType = VkGetLatencyMarkerInfoNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eGetLatencyMarkerInfoNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR GetLatencyMarkerInfoNV( uint32_t timingCount_ = {}, VULKAN_HPP_NAMESPACE::LatencyTimingsFrameReportNV * pTimings_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , timingCount{ timingCount_ } , pTimings{ pTimings_ } { } VULKAN_HPP_CONSTEXPR GetLatencyMarkerInfoNV( GetLatencyMarkerInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; GetLatencyMarkerInfoNV( VkGetLatencyMarkerInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT : GetLatencyMarkerInfoNV( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) GetLatencyMarkerInfoNV( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & timings_, const void * pNext_ = nullptr ) : pNext( pNext_ ), timingCount( static_cast( timings_.size() ) ), pTimings( timings_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ GetLatencyMarkerInfoNV & operator=( GetLatencyMarkerInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ GetLatencyMarkerInfoNV & operator=( VkGetLatencyMarkerInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 GetLatencyMarkerInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 GetLatencyMarkerInfoNV & setTimingCount( uint32_t timingCount_ ) VULKAN_HPP_NOEXCEPT { timingCount = timingCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 GetLatencyMarkerInfoNV & setPTimings( VULKAN_HPP_NAMESPACE::LatencyTimingsFrameReportNV * pTimings_ ) VULKAN_HPP_NOEXCEPT { pTimings = pTimings_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) GetLatencyMarkerInfoNV & setTimings( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & timings_ ) VULKAN_HPP_NOEXCEPT { timingCount = static_cast( timings_.size() ); pTimings = timings_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkGetLatencyMarkerInfoNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkGetLatencyMarkerInfoNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, timingCount, pTimings ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( GetLatencyMarkerInfoNV const & ) const = default; #else bool operator==( GetLatencyMarkerInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( timingCount == rhs.timingCount ) && ( pTimings == rhs.pTimings ); # endif } bool operator!=( GetLatencyMarkerInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eGetLatencyMarkerInfoNV; const void * pNext = {}; uint32_t timingCount = {}; VULKAN_HPP_NAMESPACE::LatencyTimingsFrameReportNV * pTimings = {}; }; template <> struct CppType { using Type = GetLatencyMarkerInfoNV; }; struct VertexInputBindingDescription { using NativeType = VkVertexInputBindingDescription; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VertexInputBindingDescription( uint32_t binding_ = {}, uint32_t stride_ = {}, VULKAN_HPP_NAMESPACE::VertexInputRate inputRate_ = VULKAN_HPP_NAMESPACE::VertexInputRate::eVertex ) VULKAN_HPP_NOEXCEPT : binding{ binding_ } , stride{ stride_ } , inputRate{ inputRate_ } { } VULKAN_HPP_CONSTEXPR VertexInputBindingDescription( VertexInputBindingDescription const & rhs ) VULKAN_HPP_NOEXCEPT = default; VertexInputBindingDescription( VkVertexInputBindingDescription const & rhs ) VULKAN_HPP_NOEXCEPT : VertexInputBindingDescription( *reinterpret_cast( &rhs ) ) { } VertexInputBindingDescription & operator=( VertexInputBindingDescription const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VertexInputBindingDescription & operator=( VkVertexInputBindingDescription const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 VertexInputBindingDescription & setBinding( uint32_t binding_ ) VULKAN_HPP_NOEXCEPT { binding = binding_; return *this; } VULKAN_HPP_CONSTEXPR_14 VertexInputBindingDescription & setStride( uint32_t stride_ ) VULKAN_HPP_NOEXCEPT { stride = stride_; return *this; } VULKAN_HPP_CONSTEXPR_14 VertexInputBindingDescription & setInputRate( VULKAN_HPP_NAMESPACE::VertexInputRate inputRate_ ) VULKAN_HPP_NOEXCEPT { inputRate = inputRate_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkVertexInputBindingDescription const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVertexInputBindingDescription &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( binding, stride, inputRate ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( VertexInputBindingDescription const & ) const = default; #else bool operator==( VertexInputBindingDescription const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( binding == rhs.binding ) && ( stride == rhs.stride ) && ( inputRate == rhs.inputRate ); # endif } bool operator!=( VertexInputBindingDescription const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: uint32_t binding = {}; uint32_t stride = {}; VULKAN_HPP_NAMESPACE::VertexInputRate inputRate = VULKAN_HPP_NAMESPACE::VertexInputRate::eVertex; }; struct VertexInputAttributeDescription { using NativeType = VkVertexInputAttributeDescription; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VertexInputAttributeDescription( uint32_t location_ = {}, uint32_t binding_ = {}, VULKAN_HPP_NAMESPACE::Format format_ = VULKAN_HPP_NAMESPACE::Format::eUndefined, uint32_t offset_ = {} ) VULKAN_HPP_NOEXCEPT : location{ location_ } , binding{ binding_ } , format{ format_ } , offset{ offset_ } { } VULKAN_HPP_CONSTEXPR VertexInputAttributeDescription( VertexInputAttributeDescription const & rhs ) VULKAN_HPP_NOEXCEPT = default; VertexInputAttributeDescription( VkVertexInputAttributeDescription const & rhs ) VULKAN_HPP_NOEXCEPT : VertexInputAttributeDescription( *reinterpret_cast( &rhs ) ) { } VertexInputAttributeDescription & operator=( VertexInputAttributeDescription const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VertexInputAttributeDescription & operator=( VkVertexInputAttributeDescription const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 VertexInputAttributeDescription & setLocation( uint32_t location_ ) VULKAN_HPP_NOEXCEPT { location = location_; return *this; } VULKAN_HPP_CONSTEXPR_14 VertexInputAttributeDescription & setBinding( uint32_t binding_ ) VULKAN_HPP_NOEXCEPT { binding = binding_; return *this; } VULKAN_HPP_CONSTEXPR_14 VertexInputAttributeDescription & setFormat( VULKAN_HPP_NAMESPACE::Format format_ ) VULKAN_HPP_NOEXCEPT { format = format_; return *this; } VULKAN_HPP_CONSTEXPR_14 VertexInputAttributeDescription & setOffset( uint32_t offset_ ) VULKAN_HPP_NOEXCEPT { offset = offset_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkVertexInputAttributeDescription const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVertexInputAttributeDescription &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( location, binding, format, offset ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( VertexInputAttributeDescription const & ) const = default; #else bool operator==( VertexInputAttributeDescription const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( location == rhs.location ) && ( binding == rhs.binding ) && ( format == rhs.format ) && ( offset == rhs.offset ); # endif } bool operator!=( VertexInputAttributeDescription const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: uint32_t location = {}; uint32_t binding = {}; VULKAN_HPP_NAMESPACE::Format format = VULKAN_HPP_NAMESPACE::Format::eUndefined; uint32_t offset = {}; }; struct PipelineVertexInputStateCreateInfo { using NativeType = VkPipelineVertexInputStateCreateInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineVertexInputStateCreateInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PipelineVertexInputStateCreateInfo( VULKAN_HPP_NAMESPACE::PipelineVertexInputStateCreateFlags flags_ = {}, uint32_t vertexBindingDescriptionCount_ = {}, const VULKAN_HPP_NAMESPACE::VertexInputBindingDescription * pVertexBindingDescriptions_ = {}, uint32_t vertexAttributeDescriptionCount_ = {}, const VULKAN_HPP_NAMESPACE::VertexInputAttributeDescription * pVertexAttributeDescriptions_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , vertexBindingDescriptionCount{ vertexBindingDescriptionCount_ } , pVertexBindingDescriptions{ pVertexBindingDescriptions_ } , vertexAttributeDescriptionCount{ vertexAttributeDescriptionCount_ } , pVertexAttributeDescriptions{ pVertexAttributeDescriptions_ } { } VULKAN_HPP_CONSTEXPR PipelineVertexInputStateCreateInfo( PipelineVertexInputStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; PipelineVertexInputStateCreateInfo( VkPipelineVertexInputStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT : PipelineVertexInputStateCreateInfo( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) PipelineVertexInputStateCreateInfo( VULKAN_HPP_NAMESPACE::PipelineVertexInputStateCreateFlags flags_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & vertexBindingDescriptions_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & vertexAttributeDescriptions_ = {}, const void * pNext_ = nullptr ) : pNext( pNext_ ) , flags( flags_ ) , vertexBindingDescriptionCount( static_cast( vertexBindingDescriptions_.size() ) ) , pVertexBindingDescriptions( vertexBindingDescriptions_.data() ) , vertexAttributeDescriptionCount( static_cast( vertexAttributeDescriptions_.size() ) ) , pVertexAttributeDescriptions( vertexAttributeDescriptions_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ PipelineVertexInputStateCreateInfo & operator=( PipelineVertexInputStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PipelineVertexInputStateCreateInfo & operator=( VkPipelineVertexInputStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PipelineVertexInputStateCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineVertexInputStateCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::PipelineVertexInputStateCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineVertexInputStateCreateInfo & setVertexBindingDescriptionCount( uint32_t vertexBindingDescriptionCount_ ) VULKAN_HPP_NOEXCEPT { vertexBindingDescriptionCount = vertexBindingDescriptionCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineVertexInputStateCreateInfo & setPVertexBindingDescriptions( const VULKAN_HPP_NAMESPACE::VertexInputBindingDescription * pVertexBindingDescriptions_ ) VULKAN_HPP_NOEXCEPT { pVertexBindingDescriptions = pVertexBindingDescriptions_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) PipelineVertexInputStateCreateInfo & setVertexBindingDescriptions( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & vertexBindingDescriptions_ ) VULKAN_HPP_NOEXCEPT { vertexBindingDescriptionCount = static_cast( vertexBindingDescriptions_.size() ); pVertexBindingDescriptions = vertexBindingDescriptions_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 PipelineVertexInputStateCreateInfo & setVertexAttributeDescriptionCount( uint32_t vertexAttributeDescriptionCount_ ) VULKAN_HPP_NOEXCEPT { vertexAttributeDescriptionCount = vertexAttributeDescriptionCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineVertexInputStateCreateInfo & setPVertexAttributeDescriptions( const VULKAN_HPP_NAMESPACE::VertexInputAttributeDescription * pVertexAttributeDescriptions_ ) VULKAN_HPP_NOEXCEPT { pVertexAttributeDescriptions = pVertexAttributeDescriptions_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) PipelineVertexInputStateCreateInfo & setVertexAttributeDescriptions( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & vertexAttributeDescriptions_ ) VULKAN_HPP_NOEXCEPT { vertexAttributeDescriptionCount = static_cast( vertexAttributeDescriptions_.size() ); pVertexAttributeDescriptions = vertexAttributeDescriptions_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPipelineVertexInputStateCreateInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPipelineVertexInputStateCreateInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, vertexBindingDescriptionCount, pVertexBindingDescriptions, vertexAttributeDescriptionCount, pVertexAttributeDescriptions ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PipelineVertexInputStateCreateInfo const & ) const = default; #else bool operator==( PipelineVertexInputStateCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( vertexBindingDescriptionCount == rhs.vertexBindingDescriptionCount ) && ( pVertexBindingDescriptions == rhs.pVertexBindingDescriptions ) && ( vertexAttributeDescriptionCount == rhs.vertexAttributeDescriptionCount ) && ( pVertexAttributeDescriptions == rhs.pVertexAttributeDescriptions ); # endif } bool operator!=( PipelineVertexInputStateCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineVertexInputStateCreateInfo; const void * pNext = {}; VULKAN_HPP_NAMESPACE::PipelineVertexInputStateCreateFlags flags = {}; uint32_t vertexBindingDescriptionCount = {}; const VULKAN_HPP_NAMESPACE::VertexInputBindingDescription * pVertexBindingDescriptions = {}; uint32_t vertexAttributeDescriptionCount = {}; const VULKAN_HPP_NAMESPACE::VertexInputAttributeDescription * pVertexAttributeDescriptions = {}; }; template <> struct CppType { using Type = PipelineVertexInputStateCreateInfo; }; struct PipelineInputAssemblyStateCreateInfo { using NativeType = VkPipelineInputAssemblyStateCreateInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineInputAssemblyStateCreateInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PipelineInputAssemblyStateCreateInfo( VULKAN_HPP_NAMESPACE::PipelineInputAssemblyStateCreateFlags flags_ = {}, VULKAN_HPP_NAMESPACE::PrimitiveTopology topology_ = VULKAN_HPP_NAMESPACE::PrimitiveTopology::ePointList, VULKAN_HPP_NAMESPACE::Bool32 primitiveRestartEnable_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , topology{ topology_ } , primitiveRestartEnable{ primitiveRestartEnable_ } { } VULKAN_HPP_CONSTEXPR PipelineInputAssemblyStateCreateInfo( PipelineInputAssemblyStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; PipelineInputAssemblyStateCreateInfo( VkPipelineInputAssemblyStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT : PipelineInputAssemblyStateCreateInfo( *reinterpret_cast( &rhs ) ) { } PipelineInputAssemblyStateCreateInfo & operator=( PipelineInputAssemblyStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PipelineInputAssemblyStateCreateInfo & operator=( VkPipelineInputAssemblyStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PipelineInputAssemblyStateCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineInputAssemblyStateCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::PipelineInputAssemblyStateCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineInputAssemblyStateCreateInfo & setTopology( VULKAN_HPP_NAMESPACE::PrimitiveTopology topology_ ) VULKAN_HPP_NOEXCEPT { topology = topology_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineInputAssemblyStateCreateInfo & setPrimitiveRestartEnable( VULKAN_HPP_NAMESPACE::Bool32 primitiveRestartEnable_ ) VULKAN_HPP_NOEXCEPT { primitiveRestartEnable = primitiveRestartEnable_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPipelineInputAssemblyStateCreateInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPipelineInputAssemblyStateCreateInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, topology, primitiveRestartEnable ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PipelineInputAssemblyStateCreateInfo const & ) const = default; #else bool operator==( PipelineInputAssemblyStateCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( topology == rhs.topology ) && ( primitiveRestartEnable == rhs.primitiveRestartEnable ); # endif } bool operator!=( PipelineInputAssemblyStateCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineInputAssemblyStateCreateInfo; const void * pNext = {}; VULKAN_HPP_NAMESPACE::PipelineInputAssemblyStateCreateFlags flags = {}; VULKAN_HPP_NAMESPACE::PrimitiveTopology topology = VULKAN_HPP_NAMESPACE::PrimitiveTopology::ePointList; VULKAN_HPP_NAMESPACE::Bool32 primitiveRestartEnable = {}; }; template <> struct CppType { using Type = PipelineInputAssemblyStateCreateInfo; }; struct PipelineTessellationStateCreateInfo { using NativeType = VkPipelineTessellationStateCreateInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineTessellationStateCreateInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PipelineTessellationStateCreateInfo( VULKAN_HPP_NAMESPACE::PipelineTessellationStateCreateFlags flags_ = {}, uint32_t patchControlPoints_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , patchControlPoints{ patchControlPoints_ } { } VULKAN_HPP_CONSTEXPR PipelineTessellationStateCreateInfo( PipelineTessellationStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; PipelineTessellationStateCreateInfo( VkPipelineTessellationStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT : PipelineTessellationStateCreateInfo( *reinterpret_cast( &rhs ) ) { } PipelineTessellationStateCreateInfo & operator=( PipelineTessellationStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PipelineTessellationStateCreateInfo & operator=( VkPipelineTessellationStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PipelineTessellationStateCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineTessellationStateCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::PipelineTessellationStateCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineTessellationStateCreateInfo & setPatchControlPoints( uint32_t patchControlPoints_ ) VULKAN_HPP_NOEXCEPT { patchControlPoints = patchControlPoints_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPipelineTessellationStateCreateInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPipelineTessellationStateCreateInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, patchControlPoints ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PipelineTessellationStateCreateInfo const & ) const = default; #else bool operator==( PipelineTessellationStateCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( patchControlPoints == rhs.patchControlPoints ); # endif } bool operator!=( PipelineTessellationStateCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineTessellationStateCreateInfo; const void * pNext = {}; VULKAN_HPP_NAMESPACE::PipelineTessellationStateCreateFlags flags = {}; uint32_t patchControlPoints = {}; }; template <> struct CppType { using Type = PipelineTessellationStateCreateInfo; }; struct PipelineViewportStateCreateInfo { using NativeType = VkPipelineViewportStateCreateInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineViewportStateCreateInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PipelineViewportStateCreateInfo( VULKAN_HPP_NAMESPACE::PipelineViewportStateCreateFlags flags_ = {}, uint32_t viewportCount_ = {}, const VULKAN_HPP_NAMESPACE::Viewport * pViewports_ = {}, uint32_t scissorCount_ = {}, const VULKAN_HPP_NAMESPACE::Rect2D * pScissors_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , viewportCount{ viewportCount_ } , pViewports{ pViewports_ } , scissorCount{ scissorCount_ } , pScissors{ pScissors_ } { } VULKAN_HPP_CONSTEXPR PipelineViewportStateCreateInfo( PipelineViewportStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; PipelineViewportStateCreateInfo( VkPipelineViewportStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT : PipelineViewportStateCreateInfo( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) PipelineViewportStateCreateInfo( VULKAN_HPP_NAMESPACE::PipelineViewportStateCreateFlags flags_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & viewports_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & scissors_ = {}, const void * pNext_ = nullptr ) : pNext( pNext_ ) , flags( flags_ ) , viewportCount( static_cast( viewports_.size() ) ) , pViewports( viewports_.data() ) , scissorCount( static_cast( scissors_.size() ) ) , pScissors( scissors_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ PipelineViewportStateCreateInfo & operator=( PipelineViewportStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PipelineViewportStateCreateInfo & operator=( VkPipelineViewportStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PipelineViewportStateCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineViewportStateCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::PipelineViewportStateCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineViewportStateCreateInfo & setViewportCount( uint32_t viewportCount_ ) VULKAN_HPP_NOEXCEPT { viewportCount = viewportCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineViewportStateCreateInfo & setPViewports( const VULKAN_HPP_NAMESPACE::Viewport * pViewports_ ) VULKAN_HPP_NOEXCEPT { pViewports = pViewports_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) PipelineViewportStateCreateInfo & setViewports( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & viewports_ ) VULKAN_HPP_NOEXCEPT { viewportCount = static_cast( viewports_.size() ); pViewports = viewports_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 PipelineViewportStateCreateInfo & setScissorCount( uint32_t scissorCount_ ) VULKAN_HPP_NOEXCEPT { scissorCount = scissorCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineViewportStateCreateInfo & setPScissors( const VULKAN_HPP_NAMESPACE::Rect2D * pScissors_ ) VULKAN_HPP_NOEXCEPT { pScissors = pScissors_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) PipelineViewportStateCreateInfo & setScissors( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & scissors_ ) VULKAN_HPP_NOEXCEPT { scissorCount = static_cast( scissors_.size() ); pScissors = scissors_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPipelineViewportStateCreateInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPipelineViewportStateCreateInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, viewportCount, pViewports, scissorCount, pScissors ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PipelineViewportStateCreateInfo const & ) const = default; #else bool operator==( PipelineViewportStateCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( viewportCount == rhs.viewportCount ) && ( pViewports == rhs.pViewports ) && ( scissorCount == rhs.scissorCount ) && ( pScissors == rhs.pScissors ); # endif } bool operator!=( PipelineViewportStateCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineViewportStateCreateInfo; const void * pNext = {}; VULKAN_HPP_NAMESPACE::PipelineViewportStateCreateFlags flags = {}; uint32_t viewportCount = {}; const VULKAN_HPP_NAMESPACE::Viewport * pViewports = {}; uint32_t scissorCount = {}; const VULKAN_HPP_NAMESPACE::Rect2D * pScissors = {}; }; template <> struct CppType { using Type = PipelineViewportStateCreateInfo; }; struct PipelineRasterizationStateCreateInfo { using NativeType = VkPipelineRasterizationStateCreateInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineRasterizationStateCreateInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PipelineRasterizationStateCreateInfo( VULKAN_HPP_NAMESPACE::PipelineRasterizationStateCreateFlags flags_ = {}, VULKAN_HPP_NAMESPACE::Bool32 depthClampEnable_ = {}, VULKAN_HPP_NAMESPACE::Bool32 rasterizerDiscardEnable_ = {}, VULKAN_HPP_NAMESPACE::PolygonMode polygonMode_ = VULKAN_HPP_NAMESPACE::PolygonMode::eFill, VULKAN_HPP_NAMESPACE::CullModeFlags cullMode_ = {}, VULKAN_HPP_NAMESPACE::FrontFace frontFace_ = VULKAN_HPP_NAMESPACE::FrontFace::eCounterClockwise, VULKAN_HPP_NAMESPACE::Bool32 depthBiasEnable_ = {}, float depthBiasConstantFactor_ = {}, float depthBiasClamp_ = {}, float depthBiasSlopeFactor_ = {}, float lineWidth_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , depthClampEnable{ depthClampEnable_ } , rasterizerDiscardEnable{ rasterizerDiscardEnable_ } , polygonMode{ polygonMode_ } , cullMode{ cullMode_ } , frontFace{ frontFace_ } , depthBiasEnable{ depthBiasEnable_ } , depthBiasConstantFactor{ depthBiasConstantFactor_ } , depthBiasClamp{ depthBiasClamp_ } , depthBiasSlopeFactor{ depthBiasSlopeFactor_ } , lineWidth{ lineWidth_ } { } VULKAN_HPP_CONSTEXPR PipelineRasterizationStateCreateInfo( PipelineRasterizationStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; PipelineRasterizationStateCreateInfo( VkPipelineRasterizationStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT : PipelineRasterizationStateCreateInfo( *reinterpret_cast( &rhs ) ) { } PipelineRasterizationStateCreateInfo & operator=( PipelineRasterizationStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PipelineRasterizationStateCreateInfo & operator=( VkPipelineRasterizationStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PipelineRasterizationStateCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineRasterizationStateCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::PipelineRasterizationStateCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineRasterizationStateCreateInfo & setDepthClampEnable( VULKAN_HPP_NAMESPACE::Bool32 depthClampEnable_ ) VULKAN_HPP_NOEXCEPT { depthClampEnable = depthClampEnable_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineRasterizationStateCreateInfo & setRasterizerDiscardEnable( VULKAN_HPP_NAMESPACE::Bool32 rasterizerDiscardEnable_ ) VULKAN_HPP_NOEXCEPT { rasterizerDiscardEnable = rasterizerDiscardEnable_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineRasterizationStateCreateInfo & setPolygonMode( VULKAN_HPP_NAMESPACE::PolygonMode polygonMode_ ) VULKAN_HPP_NOEXCEPT { polygonMode = polygonMode_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineRasterizationStateCreateInfo & setCullMode( VULKAN_HPP_NAMESPACE::CullModeFlags cullMode_ ) VULKAN_HPP_NOEXCEPT { cullMode = cullMode_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineRasterizationStateCreateInfo & setFrontFace( VULKAN_HPP_NAMESPACE::FrontFace frontFace_ ) VULKAN_HPP_NOEXCEPT { frontFace = frontFace_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineRasterizationStateCreateInfo & setDepthBiasEnable( VULKAN_HPP_NAMESPACE::Bool32 depthBiasEnable_ ) VULKAN_HPP_NOEXCEPT { depthBiasEnable = depthBiasEnable_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineRasterizationStateCreateInfo & setDepthBiasConstantFactor( float depthBiasConstantFactor_ ) VULKAN_HPP_NOEXCEPT { depthBiasConstantFactor = depthBiasConstantFactor_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineRasterizationStateCreateInfo & setDepthBiasClamp( float depthBiasClamp_ ) VULKAN_HPP_NOEXCEPT { depthBiasClamp = depthBiasClamp_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineRasterizationStateCreateInfo & setDepthBiasSlopeFactor( float depthBiasSlopeFactor_ ) VULKAN_HPP_NOEXCEPT { depthBiasSlopeFactor = depthBiasSlopeFactor_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineRasterizationStateCreateInfo & setLineWidth( float lineWidth_ ) VULKAN_HPP_NOEXCEPT { lineWidth = lineWidth_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPipelineRasterizationStateCreateInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPipelineRasterizationStateCreateInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, depthClampEnable, rasterizerDiscardEnable, polygonMode, cullMode, frontFace, depthBiasEnable, depthBiasConstantFactor, depthBiasClamp, depthBiasSlopeFactor, lineWidth ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PipelineRasterizationStateCreateInfo const & ) const = default; #else bool operator==( PipelineRasterizationStateCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( depthClampEnable == rhs.depthClampEnable ) && ( rasterizerDiscardEnable == rhs.rasterizerDiscardEnable ) && ( polygonMode == rhs.polygonMode ) && ( cullMode == rhs.cullMode ) && ( frontFace == rhs.frontFace ) && ( depthBiasEnable == rhs.depthBiasEnable ) && ( depthBiasConstantFactor == rhs.depthBiasConstantFactor ) && ( depthBiasClamp == rhs.depthBiasClamp ) && ( depthBiasSlopeFactor == rhs.depthBiasSlopeFactor ) && ( lineWidth == rhs.lineWidth ); # endif } bool operator!=( PipelineRasterizationStateCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineRasterizationStateCreateInfo; const void * pNext = {}; VULKAN_HPP_NAMESPACE::PipelineRasterizationStateCreateFlags flags = {}; VULKAN_HPP_NAMESPACE::Bool32 depthClampEnable = {}; VULKAN_HPP_NAMESPACE::Bool32 rasterizerDiscardEnable = {}; VULKAN_HPP_NAMESPACE::PolygonMode polygonMode = VULKAN_HPP_NAMESPACE::PolygonMode::eFill; VULKAN_HPP_NAMESPACE::CullModeFlags cullMode = {}; VULKAN_HPP_NAMESPACE::FrontFace frontFace = VULKAN_HPP_NAMESPACE::FrontFace::eCounterClockwise; VULKAN_HPP_NAMESPACE::Bool32 depthBiasEnable = {}; float depthBiasConstantFactor = {}; float depthBiasClamp = {}; float depthBiasSlopeFactor = {}; float lineWidth = {}; }; template <> struct CppType { using Type = PipelineRasterizationStateCreateInfo; }; struct PipelineMultisampleStateCreateInfo { using NativeType = VkPipelineMultisampleStateCreateInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineMultisampleStateCreateInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PipelineMultisampleStateCreateInfo( VULKAN_HPP_NAMESPACE::PipelineMultisampleStateCreateFlags flags_ = {}, VULKAN_HPP_NAMESPACE::SampleCountFlagBits rasterizationSamples_ = VULKAN_HPP_NAMESPACE::SampleCountFlagBits::e1, VULKAN_HPP_NAMESPACE::Bool32 sampleShadingEnable_ = {}, float minSampleShading_ = {}, const VULKAN_HPP_NAMESPACE::SampleMask * pSampleMask_ = {}, VULKAN_HPP_NAMESPACE::Bool32 alphaToCoverageEnable_ = {}, VULKAN_HPP_NAMESPACE::Bool32 alphaToOneEnable_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , rasterizationSamples{ rasterizationSamples_ } , sampleShadingEnable{ sampleShadingEnable_ } , minSampleShading{ minSampleShading_ } , pSampleMask{ pSampleMask_ } , alphaToCoverageEnable{ alphaToCoverageEnable_ } , alphaToOneEnable{ alphaToOneEnable_ } { } VULKAN_HPP_CONSTEXPR PipelineMultisampleStateCreateInfo( PipelineMultisampleStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; PipelineMultisampleStateCreateInfo( VkPipelineMultisampleStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT : PipelineMultisampleStateCreateInfo( *reinterpret_cast( &rhs ) ) { } PipelineMultisampleStateCreateInfo & operator=( PipelineMultisampleStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PipelineMultisampleStateCreateInfo & operator=( VkPipelineMultisampleStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PipelineMultisampleStateCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineMultisampleStateCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::PipelineMultisampleStateCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineMultisampleStateCreateInfo & setRasterizationSamples( VULKAN_HPP_NAMESPACE::SampleCountFlagBits rasterizationSamples_ ) VULKAN_HPP_NOEXCEPT { rasterizationSamples = rasterizationSamples_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineMultisampleStateCreateInfo & setSampleShadingEnable( VULKAN_HPP_NAMESPACE::Bool32 sampleShadingEnable_ ) VULKAN_HPP_NOEXCEPT { sampleShadingEnable = sampleShadingEnable_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineMultisampleStateCreateInfo & setMinSampleShading( float minSampleShading_ ) VULKAN_HPP_NOEXCEPT { minSampleShading = minSampleShading_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineMultisampleStateCreateInfo & setPSampleMask( const VULKAN_HPP_NAMESPACE::SampleMask * pSampleMask_ ) VULKAN_HPP_NOEXCEPT { pSampleMask = pSampleMask_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineMultisampleStateCreateInfo & setAlphaToCoverageEnable( VULKAN_HPP_NAMESPACE::Bool32 alphaToCoverageEnable_ ) VULKAN_HPP_NOEXCEPT { alphaToCoverageEnable = alphaToCoverageEnable_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineMultisampleStateCreateInfo & setAlphaToOneEnable( VULKAN_HPP_NAMESPACE::Bool32 alphaToOneEnable_ ) VULKAN_HPP_NOEXCEPT { alphaToOneEnable = alphaToOneEnable_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPipelineMultisampleStateCreateInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPipelineMultisampleStateCreateInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, rasterizationSamples, sampleShadingEnable, minSampleShading, pSampleMask, alphaToCoverageEnable, alphaToOneEnable ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PipelineMultisampleStateCreateInfo const & ) const = default; #else bool operator==( PipelineMultisampleStateCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( rasterizationSamples == rhs.rasterizationSamples ) && ( sampleShadingEnable == rhs.sampleShadingEnable ) && ( minSampleShading == rhs.minSampleShading ) && ( pSampleMask == rhs.pSampleMask ) && ( alphaToCoverageEnable == rhs.alphaToCoverageEnable ) && ( alphaToOneEnable == rhs.alphaToOneEnable ); # endif } bool operator!=( PipelineMultisampleStateCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineMultisampleStateCreateInfo; const void * pNext = {}; VULKAN_HPP_NAMESPACE::PipelineMultisampleStateCreateFlags flags = {}; VULKAN_HPP_NAMESPACE::SampleCountFlagBits rasterizationSamples = VULKAN_HPP_NAMESPACE::SampleCountFlagBits::e1; VULKAN_HPP_NAMESPACE::Bool32 sampleShadingEnable = {}; float minSampleShading = {}; const VULKAN_HPP_NAMESPACE::SampleMask * pSampleMask = {}; VULKAN_HPP_NAMESPACE::Bool32 alphaToCoverageEnable = {}; VULKAN_HPP_NAMESPACE::Bool32 alphaToOneEnable = {}; }; template <> struct CppType { using Type = PipelineMultisampleStateCreateInfo; }; struct StencilOpState { using NativeType = VkStencilOpState; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR StencilOpState( VULKAN_HPP_NAMESPACE::StencilOp failOp_ = VULKAN_HPP_NAMESPACE::StencilOp::eKeep, VULKAN_HPP_NAMESPACE::StencilOp passOp_ = VULKAN_HPP_NAMESPACE::StencilOp::eKeep, VULKAN_HPP_NAMESPACE::StencilOp depthFailOp_ = VULKAN_HPP_NAMESPACE::StencilOp::eKeep, VULKAN_HPP_NAMESPACE::CompareOp compareOp_ = VULKAN_HPP_NAMESPACE::CompareOp::eNever, uint32_t compareMask_ = {}, uint32_t writeMask_ = {}, uint32_t reference_ = {} ) VULKAN_HPP_NOEXCEPT : failOp{ failOp_ } , passOp{ passOp_ } , depthFailOp{ depthFailOp_ } , compareOp{ compareOp_ } , compareMask{ compareMask_ } , writeMask{ writeMask_ } , reference{ reference_ } { } VULKAN_HPP_CONSTEXPR StencilOpState( StencilOpState const & rhs ) VULKAN_HPP_NOEXCEPT = default; StencilOpState( VkStencilOpState const & rhs ) VULKAN_HPP_NOEXCEPT : StencilOpState( *reinterpret_cast( &rhs ) ) {} StencilOpState & operator=( StencilOpState const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ StencilOpState & operator=( VkStencilOpState const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 StencilOpState & setFailOp( VULKAN_HPP_NAMESPACE::StencilOp failOp_ ) VULKAN_HPP_NOEXCEPT { failOp = failOp_; return *this; } VULKAN_HPP_CONSTEXPR_14 StencilOpState & setPassOp( VULKAN_HPP_NAMESPACE::StencilOp passOp_ ) VULKAN_HPP_NOEXCEPT { passOp = passOp_; return *this; } VULKAN_HPP_CONSTEXPR_14 StencilOpState & setDepthFailOp( VULKAN_HPP_NAMESPACE::StencilOp depthFailOp_ ) VULKAN_HPP_NOEXCEPT { depthFailOp = depthFailOp_; return *this; } VULKAN_HPP_CONSTEXPR_14 StencilOpState & setCompareOp( VULKAN_HPP_NAMESPACE::CompareOp compareOp_ ) VULKAN_HPP_NOEXCEPT { compareOp = compareOp_; return *this; } VULKAN_HPP_CONSTEXPR_14 StencilOpState & setCompareMask( uint32_t compareMask_ ) VULKAN_HPP_NOEXCEPT { compareMask = compareMask_; return *this; } VULKAN_HPP_CONSTEXPR_14 StencilOpState & setWriteMask( uint32_t writeMask_ ) VULKAN_HPP_NOEXCEPT { writeMask = writeMask_; return *this; } VULKAN_HPP_CONSTEXPR_14 StencilOpState & setReference( uint32_t reference_ ) VULKAN_HPP_NOEXCEPT { reference = reference_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkStencilOpState const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkStencilOpState &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( failOp, passOp, depthFailOp, compareOp, compareMask, writeMask, reference ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( StencilOpState const & ) const = default; #else bool operator==( StencilOpState const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( failOp == rhs.failOp ) && ( passOp == rhs.passOp ) && ( depthFailOp == rhs.depthFailOp ) && ( compareOp == rhs.compareOp ) && ( compareMask == rhs.compareMask ) && ( writeMask == rhs.writeMask ) && ( reference == rhs.reference ); # endif } bool operator!=( StencilOpState const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StencilOp failOp = VULKAN_HPP_NAMESPACE::StencilOp::eKeep; VULKAN_HPP_NAMESPACE::StencilOp passOp = VULKAN_HPP_NAMESPACE::StencilOp::eKeep; VULKAN_HPP_NAMESPACE::StencilOp depthFailOp = VULKAN_HPP_NAMESPACE::StencilOp::eKeep; VULKAN_HPP_NAMESPACE::CompareOp compareOp = VULKAN_HPP_NAMESPACE::CompareOp::eNever; uint32_t compareMask = {}; uint32_t writeMask = {}; uint32_t reference = {}; }; struct PipelineDepthStencilStateCreateInfo { using NativeType = VkPipelineDepthStencilStateCreateInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineDepthStencilStateCreateInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PipelineDepthStencilStateCreateInfo( VULKAN_HPP_NAMESPACE::PipelineDepthStencilStateCreateFlags flags_ = {}, VULKAN_HPP_NAMESPACE::Bool32 depthTestEnable_ = {}, VULKAN_HPP_NAMESPACE::Bool32 depthWriteEnable_ = {}, VULKAN_HPP_NAMESPACE::CompareOp depthCompareOp_ = VULKAN_HPP_NAMESPACE::CompareOp::eNever, VULKAN_HPP_NAMESPACE::Bool32 depthBoundsTestEnable_ = {}, VULKAN_HPP_NAMESPACE::Bool32 stencilTestEnable_ = {}, VULKAN_HPP_NAMESPACE::StencilOpState front_ = {}, VULKAN_HPP_NAMESPACE::StencilOpState back_ = {}, float minDepthBounds_ = {}, float maxDepthBounds_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , depthTestEnable{ depthTestEnable_ } , depthWriteEnable{ depthWriteEnable_ } , depthCompareOp{ depthCompareOp_ } , depthBoundsTestEnable{ depthBoundsTestEnable_ } , stencilTestEnable{ stencilTestEnable_ } , front{ front_ } , back{ back_ } , minDepthBounds{ minDepthBounds_ } , maxDepthBounds{ maxDepthBounds_ } { } VULKAN_HPP_CONSTEXPR PipelineDepthStencilStateCreateInfo( PipelineDepthStencilStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; PipelineDepthStencilStateCreateInfo( VkPipelineDepthStencilStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT : PipelineDepthStencilStateCreateInfo( *reinterpret_cast( &rhs ) ) { } PipelineDepthStencilStateCreateInfo & operator=( PipelineDepthStencilStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PipelineDepthStencilStateCreateInfo & operator=( VkPipelineDepthStencilStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PipelineDepthStencilStateCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineDepthStencilStateCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::PipelineDepthStencilStateCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineDepthStencilStateCreateInfo & setDepthTestEnable( VULKAN_HPP_NAMESPACE::Bool32 depthTestEnable_ ) VULKAN_HPP_NOEXCEPT { depthTestEnable = depthTestEnable_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineDepthStencilStateCreateInfo & setDepthWriteEnable( VULKAN_HPP_NAMESPACE::Bool32 depthWriteEnable_ ) VULKAN_HPP_NOEXCEPT { depthWriteEnable = depthWriteEnable_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineDepthStencilStateCreateInfo & setDepthCompareOp( VULKAN_HPP_NAMESPACE::CompareOp depthCompareOp_ ) VULKAN_HPP_NOEXCEPT { depthCompareOp = depthCompareOp_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineDepthStencilStateCreateInfo & setDepthBoundsTestEnable( VULKAN_HPP_NAMESPACE::Bool32 depthBoundsTestEnable_ ) VULKAN_HPP_NOEXCEPT { depthBoundsTestEnable = depthBoundsTestEnable_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineDepthStencilStateCreateInfo & setStencilTestEnable( VULKAN_HPP_NAMESPACE::Bool32 stencilTestEnable_ ) VULKAN_HPP_NOEXCEPT { stencilTestEnable = stencilTestEnable_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineDepthStencilStateCreateInfo & setFront( VULKAN_HPP_NAMESPACE::StencilOpState const & front_ ) VULKAN_HPP_NOEXCEPT { front = front_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineDepthStencilStateCreateInfo & setBack( VULKAN_HPP_NAMESPACE::StencilOpState const & back_ ) VULKAN_HPP_NOEXCEPT { back = back_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineDepthStencilStateCreateInfo & setMinDepthBounds( float minDepthBounds_ ) VULKAN_HPP_NOEXCEPT { minDepthBounds = minDepthBounds_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineDepthStencilStateCreateInfo & setMaxDepthBounds( float maxDepthBounds_ ) VULKAN_HPP_NOEXCEPT { maxDepthBounds = maxDepthBounds_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPipelineDepthStencilStateCreateInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPipelineDepthStencilStateCreateInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, depthTestEnable, depthWriteEnable, depthCompareOp, depthBoundsTestEnable, stencilTestEnable, front, back, minDepthBounds, maxDepthBounds ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PipelineDepthStencilStateCreateInfo const & ) const = default; #else bool operator==( PipelineDepthStencilStateCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( depthTestEnable == rhs.depthTestEnable ) && ( depthWriteEnable == rhs.depthWriteEnable ) && ( depthCompareOp == rhs.depthCompareOp ) && ( depthBoundsTestEnable == rhs.depthBoundsTestEnable ) && ( stencilTestEnable == rhs.stencilTestEnable ) && ( front == rhs.front ) && ( back == rhs.back ) && ( minDepthBounds == rhs.minDepthBounds ) && ( maxDepthBounds == rhs.maxDepthBounds ); # endif } bool operator!=( PipelineDepthStencilStateCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineDepthStencilStateCreateInfo; const void * pNext = {}; VULKAN_HPP_NAMESPACE::PipelineDepthStencilStateCreateFlags flags = {}; VULKAN_HPP_NAMESPACE::Bool32 depthTestEnable = {}; VULKAN_HPP_NAMESPACE::Bool32 depthWriteEnable = {}; VULKAN_HPP_NAMESPACE::CompareOp depthCompareOp = VULKAN_HPP_NAMESPACE::CompareOp::eNever; VULKAN_HPP_NAMESPACE::Bool32 depthBoundsTestEnable = {}; VULKAN_HPP_NAMESPACE::Bool32 stencilTestEnable = {}; VULKAN_HPP_NAMESPACE::StencilOpState front = {}; VULKAN_HPP_NAMESPACE::StencilOpState back = {}; float minDepthBounds = {}; float maxDepthBounds = {}; }; template <> struct CppType { using Type = PipelineDepthStencilStateCreateInfo; }; struct PipelineColorBlendAttachmentState { using NativeType = VkPipelineColorBlendAttachmentState; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PipelineColorBlendAttachmentState( VULKAN_HPP_NAMESPACE::Bool32 blendEnable_ = {}, VULKAN_HPP_NAMESPACE::BlendFactor srcColorBlendFactor_ = VULKAN_HPP_NAMESPACE::BlendFactor::eZero, VULKAN_HPP_NAMESPACE::BlendFactor dstColorBlendFactor_ = VULKAN_HPP_NAMESPACE::BlendFactor::eZero, VULKAN_HPP_NAMESPACE::BlendOp colorBlendOp_ = VULKAN_HPP_NAMESPACE::BlendOp::eAdd, VULKAN_HPP_NAMESPACE::BlendFactor srcAlphaBlendFactor_ = VULKAN_HPP_NAMESPACE::BlendFactor::eZero, VULKAN_HPP_NAMESPACE::BlendFactor dstAlphaBlendFactor_ = VULKAN_HPP_NAMESPACE::BlendFactor::eZero, VULKAN_HPP_NAMESPACE::BlendOp alphaBlendOp_ = VULKAN_HPP_NAMESPACE::BlendOp::eAdd, VULKAN_HPP_NAMESPACE::ColorComponentFlags colorWriteMask_ = {} ) VULKAN_HPP_NOEXCEPT : blendEnable{ blendEnable_ } , srcColorBlendFactor{ srcColorBlendFactor_ } , dstColorBlendFactor{ dstColorBlendFactor_ } , colorBlendOp{ colorBlendOp_ } , srcAlphaBlendFactor{ srcAlphaBlendFactor_ } , dstAlphaBlendFactor{ dstAlphaBlendFactor_ } , alphaBlendOp{ alphaBlendOp_ } , colorWriteMask{ colorWriteMask_ } { } VULKAN_HPP_CONSTEXPR PipelineColorBlendAttachmentState( PipelineColorBlendAttachmentState const & rhs ) VULKAN_HPP_NOEXCEPT = default; PipelineColorBlendAttachmentState( VkPipelineColorBlendAttachmentState const & rhs ) VULKAN_HPP_NOEXCEPT : PipelineColorBlendAttachmentState( *reinterpret_cast( &rhs ) ) { } PipelineColorBlendAttachmentState & operator=( PipelineColorBlendAttachmentState const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PipelineColorBlendAttachmentState & operator=( VkPipelineColorBlendAttachmentState const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PipelineColorBlendAttachmentState & setBlendEnable( VULKAN_HPP_NAMESPACE::Bool32 blendEnable_ ) VULKAN_HPP_NOEXCEPT { blendEnable = blendEnable_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineColorBlendAttachmentState & setSrcColorBlendFactor( VULKAN_HPP_NAMESPACE::BlendFactor srcColorBlendFactor_ ) VULKAN_HPP_NOEXCEPT { srcColorBlendFactor = srcColorBlendFactor_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineColorBlendAttachmentState & setDstColorBlendFactor( VULKAN_HPP_NAMESPACE::BlendFactor dstColorBlendFactor_ ) VULKAN_HPP_NOEXCEPT { dstColorBlendFactor = dstColorBlendFactor_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineColorBlendAttachmentState & setColorBlendOp( VULKAN_HPP_NAMESPACE::BlendOp colorBlendOp_ ) VULKAN_HPP_NOEXCEPT { colorBlendOp = colorBlendOp_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineColorBlendAttachmentState & setSrcAlphaBlendFactor( VULKAN_HPP_NAMESPACE::BlendFactor srcAlphaBlendFactor_ ) VULKAN_HPP_NOEXCEPT { srcAlphaBlendFactor = srcAlphaBlendFactor_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineColorBlendAttachmentState & setDstAlphaBlendFactor( VULKAN_HPP_NAMESPACE::BlendFactor dstAlphaBlendFactor_ ) VULKAN_HPP_NOEXCEPT { dstAlphaBlendFactor = dstAlphaBlendFactor_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineColorBlendAttachmentState & setAlphaBlendOp( VULKAN_HPP_NAMESPACE::BlendOp alphaBlendOp_ ) VULKAN_HPP_NOEXCEPT { alphaBlendOp = alphaBlendOp_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineColorBlendAttachmentState & setColorWriteMask( VULKAN_HPP_NAMESPACE::ColorComponentFlags colorWriteMask_ ) VULKAN_HPP_NOEXCEPT { colorWriteMask = colorWriteMask_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPipelineColorBlendAttachmentState const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPipelineColorBlendAttachmentState &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( blendEnable, srcColorBlendFactor, dstColorBlendFactor, colorBlendOp, srcAlphaBlendFactor, dstAlphaBlendFactor, alphaBlendOp, colorWriteMask ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PipelineColorBlendAttachmentState const & ) const = default; #else bool operator==( PipelineColorBlendAttachmentState const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( blendEnable == rhs.blendEnable ) && ( srcColorBlendFactor == rhs.srcColorBlendFactor ) && ( dstColorBlendFactor == rhs.dstColorBlendFactor ) && ( colorBlendOp == rhs.colorBlendOp ) && ( srcAlphaBlendFactor == rhs.srcAlphaBlendFactor ) && ( dstAlphaBlendFactor == rhs.dstAlphaBlendFactor ) && ( alphaBlendOp == rhs.alphaBlendOp ) && ( colorWriteMask == rhs.colorWriteMask ); # endif } bool operator!=( PipelineColorBlendAttachmentState const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::Bool32 blendEnable = {}; VULKAN_HPP_NAMESPACE::BlendFactor srcColorBlendFactor = VULKAN_HPP_NAMESPACE::BlendFactor::eZero; VULKAN_HPP_NAMESPACE::BlendFactor dstColorBlendFactor = VULKAN_HPP_NAMESPACE::BlendFactor::eZero; VULKAN_HPP_NAMESPACE::BlendOp colorBlendOp = VULKAN_HPP_NAMESPACE::BlendOp::eAdd; VULKAN_HPP_NAMESPACE::BlendFactor srcAlphaBlendFactor = VULKAN_HPP_NAMESPACE::BlendFactor::eZero; VULKAN_HPP_NAMESPACE::BlendFactor dstAlphaBlendFactor = VULKAN_HPP_NAMESPACE::BlendFactor::eZero; VULKAN_HPP_NAMESPACE::BlendOp alphaBlendOp = VULKAN_HPP_NAMESPACE::BlendOp::eAdd; VULKAN_HPP_NAMESPACE::ColorComponentFlags colorWriteMask = {}; }; struct PipelineColorBlendStateCreateInfo { using NativeType = VkPipelineColorBlendStateCreateInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineColorBlendStateCreateInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 PipelineColorBlendStateCreateInfo( VULKAN_HPP_NAMESPACE::PipelineColorBlendStateCreateFlags flags_ = {}, VULKAN_HPP_NAMESPACE::Bool32 logicOpEnable_ = {}, VULKAN_HPP_NAMESPACE::LogicOp logicOp_ = VULKAN_HPP_NAMESPACE::LogicOp::eClear, uint32_t attachmentCount_ = {}, const VULKAN_HPP_NAMESPACE::PipelineColorBlendAttachmentState * pAttachments_ = {}, std::array const & blendConstants_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , logicOpEnable{ logicOpEnable_ } , logicOp{ logicOp_ } , attachmentCount{ attachmentCount_ } , pAttachments{ pAttachments_ } , blendConstants{ blendConstants_ } { } VULKAN_HPP_CONSTEXPR_14 PipelineColorBlendStateCreateInfo( PipelineColorBlendStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; PipelineColorBlendStateCreateInfo( VkPipelineColorBlendStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT : PipelineColorBlendStateCreateInfo( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) PipelineColorBlendStateCreateInfo( VULKAN_HPP_NAMESPACE::PipelineColorBlendStateCreateFlags flags_, VULKAN_HPP_NAMESPACE::Bool32 logicOpEnable_, VULKAN_HPP_NAMESPACE::LogicOp logicOp_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & attachments_, std::array const & blendConstants_ = {}, const void * pNext_ = nullptr ) : pNext( pNext_ ) , flags( flags_ ) , logicOpEnable( logicOpEnable_ ) , logicOp( logicOp_ ) , attachmentCount( static_cast( attachments_.size() ) ) , pAttachments( attachments_.data() ) , blendConstants( blendConstants_ ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ PipelineColorBlendStateCreateInfo & operator=( PipelineColorBlendStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PipelineColorBlendStateCreateInfo & operator=( VkPipelineColorBlendStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PipelineColorBlendStateCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineColorBlendStateCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::PipelineColorBlendStateCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineColorBlendStateCreateInfo & setLogicOpEnable( VULKAN_HPP_NAMESPACE::Bool32 logicOpEnable_ ) VULKAN_HPP_NOEXCEPT { logicOpEnable = logicOpEnable_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineColorBlendStateCreateInfo & setLogicOp( VULKAN_HPP_NAMESPACE::LogicOp logicOp_ ) VULKAN_HPP_NOEXCEPT { logicOp = logicOp_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineColorBlendStateCreateInfo & setAttachmentCount( uint32_t attachmentCount_ ) VULKAN_HPP_NOEXCEPT { attachmentCount = attachmentCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineColorBlendStateCreateInfo & setPAttachments( const VULKAN_HPP_NAMESPACE::PipelineColorBlendAttachmentState * pAttachments_ ) VULKAN_HPP_NOEXCEPT { pAttachments = pAttachments_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) PipelineColorBlendStateCreateInfo & setAttachments( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & attachments_ ) VULKAN_HPP_NOEXCEPT { attachmentCount = static_cast( attachments_.size() ); pAttachments = attachments_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 PipelineColorBlendStateCreateInfo & setBlendConstants( std::array blendConstants_ ) VULKAN_HPP_NOEXCEPT { blendConstants = blendConstants_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPipelineColorBlendStateCreateInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPipelineColorBlendStateCreateInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple const &> # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, logicOpEnable, logicOp, attachmentCount, pAttachments, blendConstants ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PipelineColorBlendStateCreateInfo const & ) const = default; #else bool operator==( PipelineColorBlendStateCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( logicOpEnable == rhs.logicOpEnable ) && ( logicOp == rhs.logicOp ) && ( attachmentCount == rhs.attachmentCount ) && ( pAttachments == rhs.pAttachments ) && ( blendConstants == rhs.blendConstants ); # endif } bool operator!=( PipelineColorBlendStateCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineColorBlendStateCreateInfo; const void * pNext = {}; VULKAN_HPP_NAMESPACE::PipelineColorBlendStateCreateFlags flags = {}; VULKAN_HPP_NAMESPACE::Bool32 logicOpEnable = {}; VULKAN_HPP_NAMESPACE::LogicOp logicOp = VULKAN_HPP_NAMESPACE::LogicOp::eClear; uint32_t attachmentCount = {}; const VULKAN_HPP_NAMESPACE::PipelineColorBlendAttachmentState * pAttachments = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D blendConstants = {}; }; template <> struct CppType { using Type = PipelineColorBlendStateCreateInfo; }; struct PipelineDynamicStateCreateInfo { using NativeType = VkPipelineDynamicStateCreateInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineDynamicStateCreateInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PipelineDynamicStateCreateInfo( VULKAN_HPP_NAMESPACE::PipelineDynamicStateCreateFlags flags_ = {}, uint32_t dynamicStateCount_ = {}, const VULKAN_HPP_NAMESPACE::DynamicState * pDynamicStates_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , dynamicStateCount{ dynamicStateCount_ } , pDynamicStates{ pDynamicStates_ } { } VULKAN_HPP_CONSTEXPR PipelineDynamicStateCreateInfo( PipelineDynamicStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; PipelineDynamicStateCreateInfo( VkPipelineDynamicStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT : PipelineDynamicStateCreateInfo( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) PipelineDynamicStateCreateInfo( VULKAN_HPP_NAMESPACE::PipelineDynamicStateCreateFlags flags_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & dynamicStates_, const void * pNext_ = nullptr ) : pNext( pNext_ ), flags( flags_ ), dynamicStateCount( static_cast( dynamicStates_.size() ) ), pDynamicStates( dynamicStates_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ PipelineDynamicStateCreateInfo & operator=( PipelineDynamicStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PipelineDynamicStateCreateInfo & operator=( VkPipelineDynamicStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PipelineDynamicStateCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineDynamicStateCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::PipelineDynamicStateCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineDynamicStateCreateInfo & setDynamicStateCount( uint32_t dynamicStateCount_ ) VULKAN_HPP_NOEXCEPT { dynamicStateCount = dynamicStateCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineDynamicStateCreateInfo & setPDynamicStates( const VULKAN_HPP_NAMESPACE::DynamicState * pDynamicStates_ ) VULKAN_HPP_NOEXCEPT { pDynamicStates = pDynamicStates_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) PipelineDynamicStateCreateInfo & setDynamicStates( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & dynamicStates_ ) VULKAN_HPP_NOEXCEPT { dynamicStateCount = static_cast( dynamicStates_.size() ); pDynamicStates = dynamicStates_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPipelineDynamicStateCreateInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPipelineDynamicStateCreateInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, dynamicStateCount, pDynamicStates ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PipelineDynamicStateCreateInfo const & ) const = default; #else bool operator==( PipelineDynamicStateCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( dynamicStateCount == rhs.dynamicStateCount ) && ( pDynamicStates == rhs.pDynamicStates ); # endif } bool operator!=( PipelineDynamicStateCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineDynamicStateCreateInfo; const void * pNext = {}; VULKAN_HPP_NAMESPACE::PipelineDynamicStateCreateFlags flags = {}; uint32_t dynamicStateCount = {}; const VULKAN_HPP_NAMESPACE::DynamicState * pDynamicStates = {}; }; template <> struct CppType { using Type = PipelineDynamicStateCreateInfo; }; struct GraphicsPipelineCreateInfo { using NativeType = VkGraphicsPipelineCreateInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eGraphicsPipelineCreateInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 GraphicsPipelineCreateInfo( VULKAN_HPP_NAMESPACE::PipelineCreateFlags flags_ = {}, uint32_t stageCount_ = {}, const VULKAN_HPP_NAMESPACE::PipelineShaderStageCreateInfo * pStages_ = {}, const VULKAN_HPP_NAMESPACE::PipelineVertexInputStateCreateInfo * pVertexInputState_ = {}, const VULKAN_HPP_NAMESPACE::PipelineInputAssemblyStateCreateInfo * pInputAssemblyState_ = {}, const VULKAN_HPP_NAMESPACE::PipelineTessellationStateCreateInfo * pTessellationState_ = {}, const VULKAN_HPP_NAMESPACE::PipelineViewportStateCreateInfo * pViewportState_ = {}, const VULKAN_HPP_NAMESPACE::PipelineRasterizationStateCreateInfo * pRasterizationState_ = {}, const VULKAN_HPP_NAMESPACE::PipelineMultisampleStateCreateInfo * pMultisampleState_ = {}, const VULKAN_HPP_NAMESPACE::PipelineDepthStencilStateCreateInfo * pDepthStencilState_ = {}, const VULKAN_HPP_NAMESPACE::PipelineColorBlendStateCreateInfo * pColorBlendState_ = {}, const VULKAN_HPP_NAMESPACE::PipelineDynamicStateCreateInfo * pDynamicState_ = {}, VULKAN_HPP_NAMESPACE::PipelineLayout layout_ = {}, VULKAN_HPP_NAMESPACE::RenderPass renderPass_ = {}, uint32_t subpass_ = {}, VULKAN_HPP_NAMESPACE::Pipeline basePipelineHandle_ = {}, int32_t basePipelineIndex_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , stageCount{ stageCount_ } , pStages{ pStages_ } , pVertexInputState{ pVertexInputState_ } , pInputAssemblyState{ pInputAssemblyState_ } , pTessellationState{ pTessellationState_ } , pViewportState{ pViewportState_ } , pRasterizationState{ pRasterizationState_ } , pMultisampleState{ pMultisampleState_ } , pDepthStencilState{ pDepthStencilState_ } , pColorBlendState{ pColorBlendState_ } , pDynamicState{ pDynamicState_ } , layout{ layout_ } , renderPass{ renderPass_ } , subpass{ subpass_ } , basePipelineHandle{ basePipelineHandle_ } , basePipelineIndex{ basePipelineIndex_ } { } VULKAN_HPP_CONSTEXPR_14 GraphicsPipelineCreateInfo( GraphicsPipelineCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; GraphicsPipelineCreateInfo( VkGraphicsPipelineCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT : GraphicsPipelineCreateInfo( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) GraphicsPipelineCreateInfo( VULKAN_HPP_NAMESPACE::PipelineCreateFlags flags_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & stages_, const VULKAN_HPP_NAMESPACE::PipelineVertexInputStateCreateInfo * pVertexInputState_ = {}, const VULKAN_HPP_NAMESPACE::PipelineInputAssemblyStateCreateInfo * pInputAssemblyState_ = {}, const VULKAN_HPP_NAMESPACE::PipelineTessellationStateCreateInfo * pTessellationState_ = {}, const VULKAN_HPP_NAMESPACE::PipelineViewportStateCreateInfo * pViewportState_ = {}, const VULKAN_HPP_NAMESPACE::PipelineRasterizationStateCreateInfo * pRasterizationState_ = {}, const VULKAN_HPP_NAMESPACE::PipelineMultisampleStateCreateInfo * pMultisampleState_ = {}, const VULKAN_HPP_NAMESPACE::PipelineDepthStencilStateCreateInfo * pDepthStencilState_ = {}, const VULKAN_HPP_NAMESPACE::PipelineColorBlendStateCreateInfo * pColorBlendState_ = {}, const VULKAN_HPP_NAMESPACE::PipelineDynamicStateCreateInfo * pDynamicState_ = {}, VULKAN_HPP_NAMESPACE::PipelineLayout layout_ = {}, VULKAN_HPP_NAMESPACE::RenderPass renderPass_ = {}, uint32_t subpass_ = {}, VULKAN_HPP_NAMESPACE::Pipeline basePipelineHandle_ = {}, int32_t basePipelineIndex_ = {}, const void * pNext_ = nullptr ) : pNext( pNext_ ) , flags( flags_ ) , stageCount( static_cast( stages_.size() ) ) , pStages( stages_.data() ) , pVertexInputState( pVertexInputState_ ) , pInputAssemblyState( pInputAssemblyState_ ) , pTessellationState( pTessellationState_ ) , pViewportState( pViewportState_ ) , pRasterizationState( pRasterizationState_ ) , pMultisampleState( pMultisampleState_ ) , pDepthStencilState( pDepthStencilState_ ) , pColorBlendState( pColorBlendState_ ) , pDynamicState( pDynamicState_ ) , layout( layout_ ) , renderPass( renderPass_ ) , subpass( subpass_ ) , basePipelineHandle( basePipelineHandle_ ) , basePipelineIndex( basePipelineIndex_ ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ GraphicsPipelineCreateInfo & operator=( GraphicsPipelineCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ GraphicsPipelineCreateInfo & operator=( VkGraphicsPipelineCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 GraphicsPipelineCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 GraphicsPipelineCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::PipelineCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 GraphicsPipelineCreateInfo & setStageCount( uint32_t stageCount_ ) VULKAN_HPP_NOEXCEPT { stageCount = stageCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 GraphicsPipelineCreateInfo & setPStages( const VULKAN_HPP_NAMESPACE::PipelineShaderStageCreateInfo * pStages_ ) VULKAN_HPP_NOEXCEPT { pStages = pStages_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) GraphicsPipelineCreateInfo & setStages( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & stages_ ) VULKAN_HPP_NOEXCEPT { stageCount = static_cast( stages_.size() ); pStages = stages_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 GraphicsPipelineCreateInfo & setPVertexInputState( const VULKAN_HPP_NAMESPACE::PipelineVertexInputStateCreateInfo * pVertexInputState_ ) VULKAN_HPP_NOEXCEPT { pVertexInputState = pVertexInputState_; return *this; } VULKAN_HPP_CONSTEXPR_14 GraphicsPipelineCreateInfo & setPInputAssemblyState( const VULKAN_HPP_NAMESPACE::PipelineInputAssemblyStateCreateInfo * pInputAssemblyState_ ) VULKAN_HPP_NOEXCEPT { pInputAssemblyState = pInputAssemblyState_; return *this; } VULKAN_HPP_CONSTEXPR_14 GraphicsPipelineCreateInfo & setPTessellationState( const VULKAN_HPP_NAMESPACE::PipelineTessellationStateCreateInfo * pTessellationState_ ) VULKAN_HPP_NOEXCEPT { pTessellationState = pTessellationState_; return *this; } VULKAN_HPP_CONSTEXPR_14 GraphicsPipelineCreateInfo & setPViewportState( const VULKAN_HPP_NAMESPACE::PipelineViewportStateCreateInfo * pViewportState_ ) VULKAN_HPP_NOEXCEPT { pViewportState = pViewportState_; return *this; } VULKAN_HPP_CONSTEXPR_14 GraphicsPipelineCreateInfo & setPRasterizationState( const VULKAN_HPP_NAMESPACE::PipelineRasterizationStateCreateInfo * pRasterizationState_ ) VULKAN_HPP_NOEXCEPT { pRasterizationState = pRasterizationState_; return *this; } VULKAN_HPP_CONSTEXPR_14 GraphicsPipelineCreateInfo & setPMultisampleState( const VULKAN_HPP_NAMESPACE::PipelineMultisampleStateCreateInfo * pMultisampleState_ ) VULKAN_HPP_NOEXCEPT { pMultisampleState = pMultisampleState_; return *this; } VULKAN_HPP_CONSTEXPR_14 GraphicsPipelineCreateInfo & setPDepthStencilState( const VULKAN_HPP_NAMESPACE::PipelineDepthStencilStateCreateInfo * pDepthStencilState_ ) VULKAN_HPP_NOEXCEPT { pDepthStencilState = pDepthStencilState_; return *this; } VULKAN_HPP_CONSTEXPR_14 GraphicsPipelineCreateInfo & setPColorBlendState( const VULKAN_HPP_NAMESPACE::PipelineColorBlendStateCreateInfo * pColorBlendState_ ) VULKAN_HPP_NOEXCEPT { pColorBlendState = pColorBlendState_; return *this; } VULKAN_HPP_CONSTEXPR_14 GraphicsPipelineCreateInfo & setPDynamicState( const VULKAN_HPP_NAMESPACE::PipelineDynamicStateCreateInfo * pDynamicState_ ) VULKAN_HPP_NOEXCEPT { pDynamicState = pDynamicState_; return *this; } VULKAN_HPP_CONSTEXPR_14 GraphicsPipelineCreateInfo & setLayout( VULKAN_HPP_NAMESPACE::PipelineLayout layout_ ) VULKAN_HPP_NOEXCEPT { layout = layout_; return *this; } VULKAN_HPP_CONSTEXPR_14 GraphicsPipelineCreateInfo & setRenderPass( VULKAN_HPP_NAMESPACE::RenderPass renderPass_ ) VULKAN_HPP_NOEXCEPT { renderPass = renderPass_; return *this; } VULKAN_HPP_CONSTEXPR_14 GraphicsPipelineCreateInfo & setSubpass( uint32_t subpass_ ) VULKAN_HPP_NOEXCEPT { subpass = subpass_; return *this; } VULKAN_HPP_CONSTEXPR_14 GraphicsPipelineCreateInfo & setBasePipelineHandle( VULKAN_HPP_NAMESPACE::Pipeline basePipelineHandle_ ) VULKAN_HPP_NOEXCEPT { basePipelineHandle = basePipelineHandle_; return *this; } VULKAN_HPP_CONSTEXPR_14 GraphicsPipelineCreateInfo & setBasePipelineIndex( int32_t basePipelineIndex_ ) VULKAN_HPP_NOEXCEPT { basePipelineIndex = basePipelineIndex_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkGraphicsPipelineCreateInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkGraphicsPipelineCreateInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, stageCount, pStages, pVertexInputState, pInputAssemblyState, pTessellationState, pViewportState, pRasterizationState, pMultisampleState, pDepthStencilState, pColorBlendState, pDynamicState, layout, renderPass, subpass, basePipelineHandle, basePipelineIndex ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( GraphicsPipelineCreateInfo const & ) const = default; #else bool operator==( GraphicsPipelineCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( stageCount == rhs.stageCount ) && ( pStages == rhs.pStages ) && ( pVertexInputState == rhs.pVertexInputState ) && ( pInputAssemblyState == rhs.pInputAssemblyState ) && ( pTessellationState == rhs.pTessellationState ) && ( pViewportState == rhs.pViewportState ) && ( pRasterizationState == rhs.pRasterizationState ) && ( pMultisampleState == rhs.pMultisampleState ) && ( pDepthStencilState == rhs.pDepthStencilState ) && ( pColorBlendState == rhs.pColorBlendState ) && ( pDynamicState == rhs.pDynamicState ) && ( layout == rhs.layout ) && ( renderPass == rhs.renderPass ) && ( subpass == rhs.subpass ) && ( basePipelineHandle == rhs.basePipelineHandle ) && ( basePipelineIndex == rhs.basePipelineIndex ); # endif } bool operator!=( GraphicsPipelineCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eGraphicsPipelineCreateInfo; const void * pNext = {}; VULKAN_HPP_NAMESPACE::PipelineCreateFlags flags = {}; uint32_t stageCount = {}; const VULKAN_HPP_NAMESPACE::PipelineShaderStageCreateInfo * pStages = {}; const VULKAN_HPP_NAMESPACE::PipelineVertexInputStateCreateInfo * pVertexInputState = {}; const VULKAN_HPP_NAMESPACE::PipelineInputAssemblyStateCreateInfo * pInputAssemblyState = {}; const VULKAN_HPP_NAMESPACE::PipelineTessellationStateCreateInfo * pTessellationState = {}; const VULKAN_HPP_NAMESPACE::PipelineViewportStateCreateInfo * pViewportState = {}; const VULKAN_HPP_NAMESPACE::PipelineRasterizationStateCreateInfo * pRasterizationState = {}; const VULKAN_HPP_NAMESPACE::PipelineMultisampleStateCreateInfo * pMultisampleState = {}; const VULKAN_HPP_NAMESPACE::PipelineDepthStencilStateCreateInfo * pDepthStencilState = {}; const VULKAN_HPP_NAMESPACE::PipelineColorBlendStateCreateInfo * pColorBlendState = {}; const VULKAN_HPP_NAMESPACE::PipelineDynamicStateCreateInfo * pDynamicState = {}; VULKAN_HPP_NAMESPACE::PipelineLayout layout = {}; VULKAN_HPP_NAMESPACE::RenderPass renderPass = {}; uint32_t subpass = {}; VULKAN_HPP_NAMESPACE::Pipeline basePipelineHandle = {}; int32_t basePipelineIndex = {}; }; template <> struct CppType { using Type = GraphicsPipelineCreateInfo; }; struct GraphicsPipelineLibraryCreateInfoEXT { using NativeType = VkGraphicsPipelineLibraryCreateInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eGraphicsPipelineLibraryCreateInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR GraphicsPipelineLibraryCreateInfoEXT( VULKAN_HPP_NAMESPACE::GraphicsPipelineLibraryFlagsEXT flags_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } { } VULKAN_HPP_CONSTEXPR GraphicsPipelineLibraryCreateInfoEXT( GraphicsPipelineLibraryCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; GraphicsPipelineLibraryCreateInfoEXT( VkGraphicsPipelineLibraryCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : GraphicsPipelineLibraryCreateInfoEXT( *reinterpret_cast( &rhs ) ) { } GraphicsPipelineLibraryCreateInfoEXT & operator=( GraphicsPipelineLibraryCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ GraphicsPipelineLibraryCreateInfoEXT & operator=( VkGraphicsPipelineLibraryCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 GraphicsPipelineLibraryCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 GraphicsPipelineLibraryCreateInfoEXT & setFlags( VULKAN_HPP_NAMESPACE::GraphicsPipelineLibraryFlagsEXT flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkGraphicsPipelineLibraryCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkGraphicsPipelineLibraryCreateInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( GraphicsPipelineLibraryCreateInfoEXT const & ) const = default; #else bool operator==( GraphicsPipelineLibraryCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ); # endif } bool operator!=( GraphicsPipelineLibraryCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eGraphicsPipelineLibraryCreateInfoEXT; const void * pNext = {}; VULKAN_HPP_NAMESPACE::GraphicsPipelineLibraryFlagsEXT flags = {}; }; template <> struct CppType { using Type = GraphicsPipelineLibraryCreateInfoEXT; }; struct GraphicsShaderGroupCreateInfoNV { using NativeType = VkGraphicsShaderGroupCreateInfoNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eGraphicsShaderGroupCreateInfoNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR GraphicsShaderGroupCreateInfoNV( uint32_t stageCount_ = {}, const VULKAN_HPP_NAMESPACE::PipelineShaderStageCreateInfo * pStages_ = {}, const VULKAN_HPP_NAMESPACE::PipelineVertexInputStateCreateInfo * pVertexInputState_ = {}, const VULKAN_HPP_NAMESPACE::PipelineTessellationStateCreateInfo * pTessellationState_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , stageCount{ stageCount_ } , pStages{ pStages_ } , pVertexInputState{ pVertexInputState_ } , pTessellationState{ pTessellationState_ } { } VULKAN_HPP_CONSTEXPR GraphicsShaderGroupCreateInfoNV( GraphicsShaderGroupCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; GraphicsShaderGroupCreateInfoNV( VkGraphicsShaderGroupCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT : GraphicsShaderGroupCreateInfoNV( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) GraphicsShaderGroupCreateInfoNV( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & stages_, const VULKAN_HPP_NAMESPACE::PipelineVertexInputStateCreateInfo * pVertexInputState_ = {}, const VULKAN_HPP_NAMESPACE::PipelineTessellationStateCreateInfo * pTessellationState_ = {}, const void * pNext_ = nullptr ) : pNext( pNext_ ) , stageCount( static_cast( stages_.size() ) ) , pStages( stages_.data() ) , pVertexInputState( pVertexInputState_ ) , pTessellationState( pTessellationState_ ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ GraphicsShaderGroupCreateInfoNV & operator=( GraphicsShaderGroupCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ GraphicsShaderGroupCreateInfoNV & operator=( VkGraphicsShaderGroupCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 GraphicsShaderGroupCreateInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 GraphicsShaderGroupCreateInfoNV & setStageCount( uint32_t stageCount_ ) VULKAN_HPP_NOEXCEPT { stageCount = stageCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 GraphicsShaderGroupCreateInfoNV & setPStages( const VULKAN_HPP_NAMESPACE::PipelineShaderStageCreateInfo * pStages_ ) VULKAN_HPP_NOEXCEPT { pStages = pStages_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) GraphicsShaderGroupCreateInfoNV & setStages( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & stages_ ) VULKAN_HPP_NOEXCEPT { stageCount = static_cast( stages_.size() ); pStages = stages_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 GraphicsShaderGroupCreateInfoNV & setPVertexInputState( const VULKAN_HPP_NAMESPACE::PipelineVertexInputStateCreateInfo * pVertexInputState_ ) VULKAN_HPP_NOEXCEPT { pVertexInputState = pVertexInputState_; return *this; } VULKAN_HPP_CONSTEXPR_14 GraphicsShaderGroupCreateInfoNV & setPTessellationState( const VULKAN_HPP_NAMESPACE::PipelineTessellationStateCreateInfo * pTessellationState_ ) VULKAN_HPP_NOEXCEPT { pTessellationState = pTessellationState_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkGraphicsShaderGroupCreateInfoNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkGraphicsShaderGroupCreateInfoNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, stageCount, pStages, pVertexInputState, pTessellationState ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( GraphicsShaderGroupCreateInfoNV const & ) const = default; #else bool operator==( GraphicsShaderGroupCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( stageCount == rhs.stageCount ) && ( pStages == rhs.pStages ) && ( pVertexInputState == rhs.pVertexInputState ) && ( pTessellationState == rhs.pTessellationState ); # endif } bool operator!=( GraphicsShaderGroupCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eGraphicsShaderGroupCreateInfoNV; const void * pNext = {}; uint32_t stageCount = {}; const VULKAN_HPP_NAMESPACE::PipelineShaderStageCreateInfo * pStages = {}; const VULKAN_HPP_NAMESPACE::PipelineVertexInputStateCreateInfo * pVertexInputState = {}; const VULKAN_HPP_NAMESPACE::PipelineTessellationStateCreateInfo * pTessellationState = {}; }; template <> struct CppType { using Type = GraphicsShaderGroupCreateInfoNV; }; struct GraphicsPipelineShaderGroupsCreateInfoNV { using NativeType = VkGraphicsPipelineShaderGroupsCreateInfoNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eGraphicsPipelineShaderGroupsCreateInfoNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR GraphicsPipelineShaderGroupsCreateInfoNV( uint32_t groupCount_ = {}, const VULKAN_HPP_NAMESPACE::GraphicsShaderGroupCreateInfoNV * pGroups_ = {}, uint32_t pipelineCount_ = {}, const VULKAN_HPP_NAMESPACE::Pipeline * pPipelines_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , groupCount{ groupCount_ } , pGroups{ pGroups_ } , pipelineCount{ pipelineCount_ } , pPipelines{ pPipelines_ } { } VULKAN_HPP_CONSTEXPR GraphicsPipelineShaderGroupsCreateInfoNV( GraphicsPipelineShaderGroupsCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; GraphicsPipelineShaderGroupsCreateInfoNV( VkGraphicsPipelineShaderGroupsCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT : GraphicsPipelineShaderGroupsCreateInfoNV( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) GraphicsPipelineShaderGroupsCreateInfoNV( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & groups_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & pipelines_ = {}, const void * pNext_ = nullptr ) : pNext( pNext_ ) , groupCount( static_cast( groups_.size() ) ) , pGroups( groups_.data() ) , pipelineCount( static_cast( pipelines_.size() ) ) , pPipelines( pipelines_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ GraphicsPipelineShaderGroupsCreateInfoNV & operator=( GraphicsPipelineShaderGroupsCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ GraphicsPipelineShaderGroupsCreateInfoNV & operator=( VkGraphicsPipelineShaderGroupsCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 GraphicsPipelineShaderGroupsCreateInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 GraphicsPipelineShaderGroupsCreateInfoNV & setGroupCount( uint32_t groupCount_ ) VULKAN_HPP_NOEXCEPT { groupCount = groupCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 GraphicsPipelineShaderGroupsCreateInfoNV & setPGroups( const VULKAN_HPP_NAMESPACE::GraphicsShaderGroupCreateInfoNV * pGroups_ ) VULKAN_HPP_NOEXCEPT { pGroups = pGroups_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) GraphicsPipelineShaderGroupsCreateInfoNV & setGroups( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & groups_ ) VULKAN_HPP_NOEXCEPT { groupCount = static_cast( groups_.size() ); pGroups = groups_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 GraphicsPipelineShaderGroupsCreateInfoNV & setPipelineCount( uint32_t pipelineCount_ ) VULKAN_HPP_NOEXCEPT { pipelineCount = pipelineCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 GraphicsPipelineShaderGroupsCreateInfoNV & setPPipelines( const VULKAN_HPP_NAMESPACE::Pipeline * pPipelines_ ) VULKAN_HPP_NOEXCEPT { pPipelines = pPipelines_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) GraphicsPipelineShaderGroupsCreateInfoNV & setPipelines( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & pipelines_ ) VULKAN_HPP_NOEXCEPT { pipelineCount = static_cast( pipelines_.size() ); pPipelines = pipelines_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkGraphicsPipelineShaderGroupsCreateInfoNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkGraphicsPipelineShaderGroupsCreateInfoNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, groupCount, pGroups, pipelineCount, pPipelines ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( GraphicsPipelineShaderGroupsCreateInfoNV const & ) const = default; #else bool operator==( GraphicsPipelineShaderGroupsCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( groupCount == rhs.groupCount ) && ( pGroups == rhs.pGroups ) && ( pipelineCount == rhs.pipelineCount ) && ( pPipelines == rhs.pPipelines ); # endif } bool operator!=( GraphicsPipelineShaderGroupsCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eGraphicsPipelineShaderGroupsCreateInfoNV; const void * pNext = {}; uint32_t groupCount = {}; const VULKAN_HPP_NAMESPACE::GraphicsShaderGroupCreateInfoNV * pGroups = {}; uint32_t pipelineCount = {}; const VULKAN_HPP_NAMESPACE::Pipeline * pPipelines = {}; }; template <> struct CppType { using Type = GraphicsPipelineShaderGroupsCreateInfoNV; }; struct XYColorEXT { using NativeType = VkXYColorEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR XYColorEXT( float x_ = {}, float y_ = {} ) VULKAN_HPP_NOEXCEPT : x{ x_ } , y{ y_ } { } VULKAN_HPP_CONSTEXPR XYColorEXT( XYColorEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; XYColorEXT( VkXYColorEXT const & rhs ) VULKAN_HPP_NOEXCEPT : XYColorEXT( *reinterpret_cast( &rhs ) ) {} XYColorEXT & operator=( XYColorEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ XYColorEXT & operator=( VkXYColorEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 XYColorEXT & setX( float x_ ) VULKAN_HPP_NOEXCEPT { x = x_; return *this; } VULKAN_HPP_CONSTEXPR_14 XYColorEXT & setY( float y_ ) VULKAN_HPP_NOEXCEPT { y = y_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkXYColorEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkXYColorEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( x, y ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( XYColorEXT const & ) const = default; #else bool operator==( XYColorEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( x == rhs.x ) && ( y == rhs.y ); # endif } bool operator!=( XYColorEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: float x = {}; float y = {}; }; struct HdrMetadataEXT { using NativeType = VkHdrMetadataEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eHdrMetadataEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR HdrMetadataEXT( VULKAN_HPP_NAMESPACE::XYColorEXT displayPrimaryRed_ = {}, VULKAN_HPP_NAMESPACE::XYColorEXT displayPrimaryGreen_ = {}, VULKAN_HPP_NAMESPACE::XYColorEXT displayPrimaryBlue_ = {}, VULKAN_HPP_NAMESPACE::XYColorEXT whitePoint_ = {}, float maxLuminance_ = {}, float minLuminance_ = {}, float maxContentLightLevel_ = {}, float maxFrameAverageLightLevel_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , displayPrimaryRed{ displayPrimaryRed_ } , displayPrimaryGreen{ displayPrimaryGreen_ } , displayPrimaryBlue{ displayPrimaryBlue_ } , whitePoint{ whitePoint_ } , maxLuminance{ maxLuminance_ } , minLuminance{ minLuminance_ } , maxContentLightLevel{ maxContentLightLevel_ } , maxFrameAverageLightLevel{ maxFrameAverageLightLevel_ } { } VULKAN_HPP_CONSTEXPR HdrMetadataEXT( HdrMetadataEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; HdrMetadataEXT( VkHdrMetadataEXT const & rhs ) VULKAN_HPP_NOEXCEPT : HdrMetadataEXT( *reinterpret_cast( &rhs ) ) {} HdrMetadataEXT & operator=( HdrMetadataEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ HdrMetadataEXT & operator=( VkHdrMetadataEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 HdrMetadataEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 HdrMetadataEXT & setDisplayPrimaryRed( VULKAN_HPP_NAMESPACE::XYColorEXT const & displayPrimaryRed_ ) VULKAN_HPP_NOEXCEPT { displayPrimaryRed = displayPrimaryRed_; return *this; } VULKAN_HPP_CONSTEXPR_14 HdrMetadataEXT & setDisplayPrimaryGreen( VULKAN_HPP_NAMESPACE::XYColorEXT const & displayPrimaryGreen_ ) VULKAN_HPP_NOEXCEPT { displayPrimaryGreen = displayPrimaryGreen_; return *this; } VULKAN_HPP_CONSTEXPR_14 HdrMetadataEXT & setDisplayPrimaryBlue( VULKAN_HPP_NAMESPACE::XYColorEXT const & displayPrimaryBlue_ ) VULKAN_HPP_NOEXCEPT { displayPrimaryBlue = displayPrimaryBlue_; return *this; } VULKAN_HPP_CONSTEXPR_14 HdrMetadataEXT & setWhitePoint( VULKAN_HPP_NAMESPACE::XYColorEXT const & whitePoint_ ) VULKAN_HPP_NOEXCEPT { whitePoint = whitePoint_; return *this; } VULKAN_HPP_CONSTEXPR_14 HdrMetadataEXT & setMaxLuminance( float maxLuminance_ ) VULKAN_HPP_NOEXCEPT { maxLuminance = maxLuminance_; return *this; } VULKAN_HPP_CONSTEXPR_14 HdrMetadataEXT & setMinLuminance( float minLuminance_ ) VULKAN_HPP_NOEXCEPT { minLuminance = minLuminance_; return *this; } VULKAN_HPP_CONSTEXPR_14 HdrMetadataEXT & setMaxContentLightLevel( float maxContentLightLevel_ ) VULKAN_HPP_NOEXCEPT { maxContentLightLevel = maxContentLightLevel_; return *this; } VULKAN_HPP_CONSTEXPR_14 HdrMetadataEXT & setMaxFrameAverageLightLevel( float maxFrameAverageLightLevel_ ) VULKAN_HPP_NOEXCEPT { maxFrameAverageLightLevel = maxFrameAverageLightLevel_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkHdrMetadataEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkHdrMetadataEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, displayPrimaryRed, displayPrimaryGreen, displayPrimaryBlue, whitePoint, maxLuminance, minLuminance, maxContentLightLevel, maxFrameAverageLightLevel ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( HdrMetadataEXT const & ) const = default; #else bool operator==( HdrMetadataEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( displayPrimaryRed == rhs.displayPrimaryRed ) && ( displayPrimaryGreen == rhs.displayPrimaryGreen ) && ( displayPrimaryBlue == rhs.displayPrimaryBlue ) && ( whitePoint == rhs.whitePoint ) && ( maxLuminance == rhs.maxLuminance ) && ( minLuminance == rhs.minLuminance ) && ( maxContentLightLevel == rhs.maxContentLightLevel ) && ( maxFrameAverageLightLevel == rhs.maxFrameAverageLightLevel ); # endif } bool operator!=( HdrMetadataEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eHdrMetadataEXT; const void * pNext = {}; VULKAN_HPP_NAMESPACE::XYColorEXT displayPrimaryRed = {}; VULKAN_HPP_NAMESPACE::XYColorEXT displayPrimaryGreen = {}; VULKAN_HPP_NAMESPACE::XYColorEXT displayPrimaryBlue = {}; VULKAN_HPP_NAMESPACE::XYColorEXT whitePoint = {}; float maxLuminance = {}; float minLuminance = {}; float maxContentLightLevel = {}; float maxFrameAverageLightLevel = {}; }; template <> struct CppType { using Type = HdrMetadataEXT; }; struct HdrVividDynamicMetadataHUAWEI { using NativeType = VkHdrVividDynamicMetadataHUAWEI; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eHdrVividDynamicMetadataHUAWEI; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR HdrVividDynamicMetadataHUAWEI( size_t dynamicMetadataSize_ = {}, const void * pDynamicMetadata_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , dynamicMetadataSize{ dynamicMetadataSize_ } , pDynamicMetadata{ pDynamicMetadata_ } { } VULKAN_HPP_CONSTEXPR HdrVividDynamicMetadataHUAWEI( HdrVividDynamicMetadataHUAWEI const & rhs ) VULKAN_HPP_NOEXCEPT = default; HdrVividDynamicMetadataHUAWEI( VkHdrVividDynamicMetadataHUAWEI const & rhs ) VULKAN_HPP_NOEXCEPT : HdrVividDynamicMetadataHUAWEI( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) template HdrVividDynamicMetadataHUAWEI( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & dynamicMetadata_, const void * pNext_ = nullptr ) : pNext( pNext_ ), dynamicMetadataSize( dynamicMetadata_.size() * sizeof( T ) ), pDynamicMetadata( dynamicMetadata_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ HdrVividDynamicMetadataHUAWEI & operator=( HdrVividDynamicMetadataHUAWEI const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ HdrVividDynamicMetadataHUAWEI & operator=( VkHdrVividDynamicMetadataHUAWEI const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 HdrVividDynamicMetadataHUAWEI & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 HdrVividDynamicMetadataHUAWEI & setDynamicMetadataSize( size_t dynamicMetadataSize_ ) VULKAN_HPP_NOEXCEPT { dynamicMetadataSize = dynamicMetadataSize_; return *this; } VULKAN_HPP_CONSTEXPR_14 HdrVividDynamicMetadataHUAWEI & setPDynamicMetadata( const void * pDynamicMetadata_ ) VULKAN_HPP_NOEXCEPT { pDynamicMetadata = pDynamicMetadata_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) template HdrVividDynamicMetadataHUAWEI & setDynamicMetadata( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & dynamicMetadata_ ) VULKAN_HPP_NOEXCEPT { dynamicMetadataSize = dynamicMetadata_.size() * sizeof( T ); pDynamicMetadata = dynamicMetadata_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkHdrVividDynamicMetadataHUAWEI const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkHdrVividDynamicMetadataHUAWEI &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, dynamicMetadataSize, pDynamicMetadata ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( HdrVividDynamicMetadataHUAWEI const & ) const = default; #else bool operator==( HdrVividDynamicMetadataHUAWEI const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( dynamicMetadataSize == rhs.dynamicMetadataSize ) && ( pDynamicMetadata == rhs.pDynamicMetadata ); # endif } bool operator!=( HdrVividDynamicMetadataHUAWEI const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eHdrVividDynamicMetadataHUAWEI; const void * pNext = {}; size_t dynamicMetadataSize = {}; const void * pDynamicMetadata = {}; }; template <> struct CppType { using Type = HdrVividDynamicMetadataHUAWEI; }; struct HeadlessSurfaceCreateInfoEXT { using NativeType = VkHeadlessSurfaceCreateInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eHeadlessSurfaceCreateInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR HeadlessSurfaceCreateInfoEXT( VULKAN_HPP_NAMESPACE::HeadlessSurfaceCreateFlagsEXT flags_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } { } VULKAN_HPP_CONSTEXPR HeadlessSurfaceCreateInfoEXT( HeadlessSurfaceCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; HeadlessSurfaceCreateInfoEXT( VkHeadlessSurfaceCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : HeadlessSurfaceCreateInfoEXT( *reinterpret_cast( &rhs ) ) { } HeadlessSurfaceCreateInfoEXT & operator=( HeadlessSurfaceCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ HeadlessSurfaceCreateInfoEXT & operator=( VkHeadlessSurfaceCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 HeadlessSurfaceCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 HeadlessSurfaceCreateInfoEXT & setFlags( VULKAN_HPP_NAMESPACE::HeadlessSurfaceCreateFlagsEXT flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkHeadlessSurfaceCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkHeadlessSurfaceCreateInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( HeadlessSurfaceCreateInfoEXT const & ) const = default; #else bool operator==( HeadlessSurfaceCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ); # endif } bool operator!=( HeadlessSurfaceCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eHeadlessSurfaceCreateInfoEXT; const void * pNext = {}; VULKAN_HPP_NAMESPACE::HeadlessSurfaceCreateFlagsEXT flags = {}; }; template <> struct CppType { using Type = HeadlessSurfaceCreateInfoEXT; }; struct HostImageCopyDevicePerformanceQuery { using NativeType = VkHostImageCopyDevicePerformanceQuery; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eHostImageCopyDevicePerformanceQuery; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR HostImageCopyDevicePerformanceQuery( VULKAN_HPP_NAMESPACE::Bool32 optimalDeviceAccess_ = {}, VULKAN_HPP_NAMESPACE::Bool32 identicalMemoryLayout_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , optimalDeviceAccess{ optimalDeviceAccess_ } , identicalMemoryLayout{ identicalMemoryLayout_ } { } VULKAN_HPP_CONSTEXPR HostImageCopyDevicePerformanceQuery( HostImageCopyDevicePerformanceQuery const & rhs ) VULKAN_HPP_NOEXCEPT = default; HostImageCopyDevicePerformanceQuery( VkHostImageCopyDevicePerformanceQuery const & rhs ) VULKAN_HPP_NOEXCEPT : HostImageCopyDevicePerformanceQuery( *reinterpret_cast( &rhs ) ) { } HostImageCopyDevicePerformanceQuery & operator=( HostImageCopyDevicePerformanceQuery const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ HostImageCopyDevicePerformanceQuery & operator=( VkHostImageCopyDevicePerformanceQuery const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkHostImageCopyDevicePerformanceQuery const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkHostImageCopyDevicePerformanceQuery &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, optimalDeviceAccess, identicalMemoryLayout ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( HostImageCopyDevicePerformanceQuery const & ) const = default; #else bool operator==( HostImageCopyDevicePerformanceQuery const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( optimalDeviceAccess == rhs.optimalDeviceAccess ) && ( identicalMemoryLayout == rhs.identicalMemoryLayout ); # endif } bool operator!=( HostImageCopyDevicePerformanceQuery const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eHostImageCopyDevicePerformanceQuery; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 optimalDeviceAccess = {}; VULKAN_HPP_NAMESPACE::Bool32 identicalMemoryLayout = {}; }; template <> struct CppType { using Type = HostImageCopyDevicePerformanceQuery; }; using HostImageCopyDevicePerformanceQueryEXT = HostImageCopyDevicePerformanceQuery; struct HostImageLayoutTransitionInfo { using NativeType = VkHostImageLayoutTransitionInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eHostImageLayoutTransitionInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR HostImageLayoutTransitionInfo( VULKAN_HPP_NAMESPACE::Image image_ = {}, VULKAN_HPP_NAMESPACE::ImageLayout oldLayout_ = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined, VULKAN_HPP_NAMESPACE::ImageLayout newLayout_ = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined, VULKAN_HPP_NAMESPACE::ImageSubresourceRange subresourceRange_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , image{ image_ } , oldLayout{ oldLayout_ } , newLayout{ newLayout_ } , subresourceRange{ subresourceRange_ } { } VULKAN_HPP_CONSTEXPR HostImageLayoutTransitionInfo( HostImageLayoutTransitionInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; HostImageLayoutTransitionInfo( VkHostImageLayoutTransitionInfo const & rhs ) VULKAN_HPP_NOEXCEPT : HostImageLayoutTransitionInfo( *reinterpret_cast( &rhs ) ) { } HostImageLayoutTransitionInfo & operator=( HostImageLayoutTransitionInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ HostImageLayoutTransitionInfo & operator=( VkHostImageLayoutTransitionInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 HostImageLayoutTransitionInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 HostImageLayoutTransitionInfo & setImage( VULKAN_HPP_NAMESPACE::Image image_ ) VULKAN_HPP_NOEXCEPT { image = image_; return *this; } VULKAN_HPP_CONSTEXPR_14 HostImageLayoutTransitionInfo & setOldLayout( VULKAN_HPP_NAMESPACE::ImageLayout oldLayout_ ) VULKAN_HPP_NOEXCEPT { oldLayout = oldLayout_; return *this; } VULKAN_HPP_CONSTEXPR_14 HostImageLayoutTransitionInfo & setNewLayout( VULKAN_HPP_NAMESPACE::ImageLayout newLayout_ ) VULKAN_HPP_NOEXCEPT { newLayout = newLayout_; return *this; } VULKAN_HPP_CONSTEXPR_14 HostImageLayoutTransitionInfo & setSubresourceRange( VULKAN_HPP_NAMESPACE::ImageSubresourceRange const & subresourceRange_ ) VULKAN_HPP_NOEXCEPT { subresourceRange = subresourceRange_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkHostImageLayoutTransitionInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkHostImageLayoutTransitionInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, image, oldLayout, newLayout, subresourceRange ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( HostImageLayoutTransitionInfo const & ) const = default; #else bool operator==( HostImageLayoutTransitionInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( image == rhs.image ) && ( oldLayout == rhs.oldLayout ) && ( newLayout == rhs.newLayout ) && ( subresourceRange == rhs.subresourceRange ); # endif } bool operator!=( HostImageLayoutTransitionInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eHostImageLayoutTransitionInfo; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Image image = {}; VULKAN_HPP_NAMESPACE::ImageLayout oldLayout = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined; VULKAN_HPP_NAMESPACE::ImageLayout newLayout = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined; VULKAN_HPP_NAMESPACE::ImageSubresourceRange subresourceRange = {}; }; template <> struct CppType { using Type = HostImageLayoutTransitionInfo; }; using HostImageLayoutTransitionInfoEXT = HostImageLayoutTransitionInfo; #if defined( VK_USE_PLATFORM_IOS_MVK ) struct IOSSurfaceCreateInfoMVK { using NativeType = VkIOSSurfaceCreateInfoMVK; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eIosSurfaceCreateInfoMVK; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR IOSSurfaceCreateInfoMVK( VULKAN_HPP_NAMESPACE::IOSSurfaceCreateFlagsMVK flags_ = {}, const void * pView_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , pView{ pView_ } { } VULKAN_HPP_CONSTEXPR IOSSurfaceCreateInfoMVK( IOSSurfaceCreateInfoMVK const & rhs ) VULKAN_HPP_NOEXCEPT = default; IOSSurfaceCreateInfoMVK( VkIOSSurfaceCreateInfoMVK const & rhs ) VULKAN_HPP_NOEXCEPT : IOSSurfaceCreateInfoMVK( *reinterpret_cast( &rhs ) ) { } IOSSurfaceCreateInfoMVK & operator=( IOSSurfaceCreateInfoMVK const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ IOSSurfaceCreateInfoMVK & operator=( VkIOSSurfaceCreateInfoMVK const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } # if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 IOSSurfaceCreateInfoMVK & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 IOSSurfaceCreateInfoMVK & setFlags( VULKAN_HPP_NAMESPACE::IOSSurfaceCreateFlagsMVK flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 IOSSurfaceCreateInfoMVK & setPView( const void * pView_ ) VULKAN_HPP_NOEXCEPT { pView = pView_; return *this; } # endif /*VULKAN_HPP_NO_SETTERS*/ operator VkIOSSurfaceCreateInfoMVK const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkIOSSurfaceCreateInfoMVK &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, pView ); } # endif # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( IOSSurfaceCreateInfoMVK const & ) const = default; # else bool operator==( IOSSurfaceCreateInfoMVK const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( pView == rhs.pView ); # endif } bool operator!=( IOSSurfaceCreateInfoMVK const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } # endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eIosSurfaceCreateInfoMVK; const void * pNext = {}; VULKAN_HPP_NAMESPACE::IOSSurfaceCreateFlagsMVK flags = {}; const void * pView = {}; }; template <> struct CppType { using Type = IOSSurfaceCreateInfoMVK; }; #endif /*VK_USE_PLATFORM_IOS_MVK*/ struct ImageAlignmentControlCreateInfoMESA { using NativeType = VkImageAlignmentControlCreateInfoMESA; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImageAlignmentControlCreateInfoMESA; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ImageAlignmentControlCreateInfoMESA( uint32_t maximumRequestedAlignment_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , maximumRequestedAlignment{ maximumRequestedAlignment_ } { } VULKAN_HPP_CONSTEXPR ImageAlignmentControlCreateInfoMESA( ImageAlignmentControlCreateInfoMESA const & rhs ) VULKAN_HPP_NOEXCEPT = default; ImageAlignmentControlCreateInfoMESA( VkImageAlignmentControlCreateInfoMESA const & rhs ) VULKAN_HPP_NOEXCEPT : ImageAlignmentControlCreateInfoMESA( *reinterpret_cast( &rhs ) ) { } ImageAlignmentControlCreateInfoMESA & operator=( ImageAlignmentControlCreateInfoMESA const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ImageAlignmentControlCreateInfoMESA & operator=( VkImageAlignmentControlCreateInfoMESA const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ImageAlignmentControlCreateInfoMESA & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageAlignmentControlCreateInfoMESA & setMaximumRequestedAlignment( uint32_t maximumRequestedAlignment_ ) VULKAN_HPP_NOEXCEPT { maximumRequestedAlignment = maximumRequestedAlignment_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkImageAlignmentControlCreateInfoMESA const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkImageAlignmentControlCreateInfoMESA &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, maximumRequestedAlignment ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ImageAlignmentControlCreateInfoMESA const & ) const = default; #else bool operator==( ImageAlignmentControlCreateInfoMESA const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( maximumRequestedAlignment == rhs.maximumRequestedAlignment ); # endif } bool operator!=( ImageAlignmentControlCreateInfoMESA const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImageAlignmentControlCreateInfoMESA; const void * pNext = {}; uint32_t maximumRequestedAlignment = {}; }; template <> struct CppType { using Type = ImageAlignmentControlCreateInfoMESA; }; struct ImageBlit { using NativeType = VkImageBlit; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 ImageBlit( VULKAN_HPP_NAMESPACE::ImageSubresourceLayers srcSubresource_ = {}, std::array const & srcOffsets_ = {}, VULKAN_HPP_NAMESPACE::ImageSubresourceLayers dstSubresource_ = {}, std::array const & dstOffsets_ = {} ) VULKAN_HPP_NOEXCEPT : srcSubresource{ srcSubresource_ } , srcOffsets{ srcOffsets_ } , dstSubresource{ dstSubresource_ } , dstOffsets{ dstOffsets_ } { } VULKAN_HPP_CONSTEXPR_14 ImageBlit( ImageBlit const & rhs ) VULKAN_HPP_NOEXCEPT = default; ImageBlit( VkImageBlit const & rhs ) VULKAN_HPP_NOEXCEPT : ImageBlit( *reinterpret_cast( &rhs ) ) {} ImageBlit & operator=( ImageBlit const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ImageBlit & operator=( VkImageBlit const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ImageBlit & setSrcSubresource( VULKAN_HPP_NAMESPACE::ImageSubresourceLayers const & srcSubresource_ ) VULKAN_HPP_NOEXCEPT { srcSubresource = srcSubresource_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageBlit & setSrcOffsets( std::array const & srcOffsets_ ) VULKAN_HPP_NOEXCEPT { srcOffsets = srcOffsets_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageBlit & setDstSubresource( VULKAN_HPP_NAMESPACE::ImageSubresourceLayers const & dstSubresource_ ) VULKAN_HPP_NOEXCEPT { dstSubresource = dstSubresource_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageBlit & setDstOffsets( std::array const & dstOffsets_ ) VULKAN_HPP_NOEXCEPT { dstOffsets = dstOffsets_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkImageBlit const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkImageBlit &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple const &, VULKAN_HPP_NAMESPACE::ImageSubresourceLayers const &, VULKAN_HPP_NAMESPACE::ArrayWrapper1D const &> # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( srcSubresource, srcOffsets, dstSubresource, dstOffsets ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ImageBlit const & ) const = default; #else bool operator==( ImageBlit const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( srcSubresource == rhs.srcSubresource ) && ( srcOffsets == rhs.srcOffsets ) && ( dstSubresource == rhs.dstSubresource ) && ( dstOffsets == rhs.dstOffsets ); # endif } bool operator!=( ImageBlit const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::ImageSubresourceLayers srcSubresource = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D srcOffsets = {}; VULKAN_HPP_NAMESPACE::ImageSubresourceLayers dstSubresource = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D dstOffsets = {}; }; struct ImageCaptureDescriptorDataInfoEXT { using NativeType = VkImageCaptureDescriptorDataInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImageCaptureDescriptorDataInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ImageCaptureDescriptorDataInfoEXT( VULKAN_HPP_NAMESPACE::Image image_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , image{ image_ } { } VULKAN_HPP_CONSTEXPR ImageCaptureDescriptorDataInfoEXT( ImageCaptureDescriptorDataInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; ImageCaptureDescriptorDataInfoEXT( VkImageCaptureDescriptorDataInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : ImageCaptureDescriptorDataInfoEXT( *reinterpret_cast( &rhs ) ) { } ImageCaptureDescriptorDataInfoEXT & operator=( ImageCaptureDescriptorDataInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ImageCaptureDescriptorDataInfoEXT & operator=( VkImageCaptureDescriptorDataInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ImageCaptureDescriptorDataInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageCaptureDescriptorDataInfoEXT & setImage( VULKAN_HPP_NAMESPACE::Image image_ ) VULKAN_HPP_NOEXCEPT { image = image_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkImageCaptureDescriptorDataInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkImageCaptureDescriptorDataInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, image ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ImageCaptureDescriptorDataInfoEXT const & ) const = default; #else bool operator==( ImageCaptureDescriptorDataInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( image == rhs.image ); # endif } bool operator!=( ImageCaptureDescriptorDataInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImageCaptureDescriptorDataInfoEXT; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Image image = {}; }; template <> struct CppType { using Type = ImageCaptureDescriptorDataInfoEXT; }; struct ImageCompressionControlEXT { using NativeType = VkImageCompressionControlEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImageCompressionControlEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ImageCompressionControlEXT( VULKAN_HPP_NAMESPACE::ImageCompressionFlagsEXT flags_ = {}, uint32_t compressionControlPlaneCount_ = {}, VULKAN_HPP_NAMESPACE::ImageCompressionFixedRateFlagsEXT * pFixedRateFlags_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , compressionControlPlaneCount{ compressionControlPlaneCount_ } , pFixedRateFlags{ pFixedRateFlags_ } { } VULKAN_HPP_CONSTEXPR ImageCompressionControlEXT( ImageCompressionControlEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; ImageCompressionControlEXT( VkImageCompressionControlEXT const & rhs ) VULKAN_HPP_NOEXCEPT : ImageCompressionControlEXT( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) ImageCompressionControlEXT( VULKAN_HPP_NAMESPACE::ImageCompressionFlagsEXT flags_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & fixedRateFlags_, const void * pNext_ = nullptr ) : pNext( pNext_ ) , flags( flags_ ) , compressionControlPlaneCount( static_cast( fixedRateFlags_.size() ) ) , pFixedRateFlags( fixedRateFlags_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ ImageCompressionControlEXT & operator=( ImageCompressionControlEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ImageCompressionControlEXT & operator=( VkImageCompressionControlEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ImageCompressionControlEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageCompressionControlEXT & setFlags( VULKAN_HPP_NAMESPACE::ImageCompressionFlagsEXT flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageCompressionControlEXT & setCompressionControlPlaneCount( uint32_t compressionControlPlaneCount_ ) VULKAN_HPP_NOEXCEPT { compressionControlPlaneCount = compressionControlPlaneCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageCompressionControlEXT & setPFixedRateFlags( VULKAN_HPP_NAMESPACE::ImageCompressionFixedRateFlagsEXT * pFixedRateFlags_ ) VULKAN_HPP_NOEXCEPT { pFixedRateFlags = pFixedRateFlags_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) ImageCompressionControlEXT & setFixedRateFlags( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & fixedRateFlags_ ) VULKAN_HPP_NOEXCEPT { compressionControlPlaneCount = static_cast( fixedRateFlags_.size() ); pFixedRateFlags = fixedRateFlags_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkImageCompressionControlEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkImageCompressionControlEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, compressionControlPlaneCount, pFixedRateFlags ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ImageCompressionControlEXT const & ) const = default; #else bool operator==( ImageCompressionControlEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( compressionControlPlaneCount == rhs.compressionControlPlaneCount ) && ( pFixedRateFlags == rhs.pFixedRateFlags ); # endif } bool operator!=( ImageCompressionControlEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImageCompressionControlEXT; const void * pNext = {}; VULKAN_HPP_NAMESPACE::ImageCompressionFlagsEXT flags = {}; uint32_t compressionControlPlaneCount = {}; VULKAN_HPP_NAMESPACE::ImageCompressionFixedRateFlagsEXT * pFixedRateFlags = {}; }; template <> struct CppType { using Type = ImageCompressionControlEXT; }; struct ImageCompressionPropertiesEXT { using NativeType = VkImageCompressionPropertiesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImageCompressionPropertiesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ImageCompressionPropertiesEXT( VULKAN_HPP_NAMESPACE::ImageCompressionFlagsEXT imageCompressionFlags_ = {}, VULKAN_HPP_NAMESPACE::ImageCompressionFixedRateFlagsEXT imageCompressionFixedRateFlags_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , imageCompressionFlags{ imageCompressionFlags_ } , imageCompressionFixedRateFlags{ imageCompressionFixedRateFlags_ } { } VULKAN_HPP_CONSTEXPR ImageCompressionPropertiesEXT( ImageCompressionPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; ImageCompressionPropertiesEXT( VkImageCompressionPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : ImageCompressionPropertiesEXT( *reinterpret_cast( &rhs ) ) { } ImageCompressionPropertiesEXT & operator=( ImageCompressionPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ImageCompressionPropertiesEXT & operator=( VkImageCompressionPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkImageCompressionPropertiesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkImageCompressionPropertiesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, imageCompressionFlags, imageCompressionFixedRateFlags ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ImageCompressionPropertiesEXT const & ) const = default; #else bool operator==( ImageCompressionPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( imageCompressionFlags == rhs.imageCompressionFlags ) && ( imageCompressionFixedRateFlags == rhs.imageCompressionFixedRateFlags ); # endif } bool operator!=( ImageCompressionPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImageCompressionPropertiesEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::ImageCompressionFlagsEXT imageCompressionFlags = {}; VULKAN_HPP_NAMESPACE::ImageCompressionFixedRateFlagsEXT imageCompressionFixedRateFlags = {}; }; template <> struct CppType { using Type = ImageCompressionPropertiesEXT; }; #if defined( VK_USE_PLATFORM_FUCHSIA ) struct ImageFormatConstraintsInfoFUCHSIA { using NativeType = VkImageFormatConstraintsInfoFUCHSIA; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImageFormatConstraintsInfoFUCHSIA; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ImageFormatConstraintsInfoFUCHSIA( VULKAN_HPP_NAMESPACE::ImageCreateInfo imageCreateInfo_ = {}, VULKAN_HPP_NAMESPACE::FormatFeatureFlags requiredFormatFeatures_ = {}, VULKAN_HPP_NAMESPACE::ImageFormatConstraintsFlagsFUCHSIA flags_ = {}, uint64_t sysmemPixelFormat_ = {}, uint32_t colorSpaceCount_ = {}, const VULKAN_HPP_NAMESPACE::SysmemColorSpaceFUCHSIA * pColorSpaces_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , imageCreateInfo{ imageCreateInfo_ } , requiredFormatFeatures{ requiredFormatFeatures_ } , flags{ flags_ } , sysmemPixelFormat{ sysmemPixelFormat_ } , colorSpaceCount{ colorSpaceCount_ } , pColorSpaces{ pColorSpaces_ } { } VULKAN_HPP_CONSTEXPR ImageFormatConstraintsInfoFUCHSIA( ImageFormatConstraintsInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT = default; ImageFormatConstraintsInfoFUCHSIA( VkImageFormatConstraintsInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT : ImageFormatConstraintsInfoFUCHSIA( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) ImageFormatConstraintsInfoFUCHSIA( VULKAN_HPP_NAMESPACE::ImageCreateInfo imageCreateInfo_, VULKAN_HPP_NAMESPACE::FormatFeatureFlags requiredFormatFeatures_, VULKAN_HPP_NAMESPACE::ImageFormatConstraintsFlagsFUCHSIA flags_, uint64_t sysmemPixelFormat_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & colorSpaces_, const void * pNext_ = nullptr ) : pNext( pNext_ ) , imageCreateInfo( imageCreateInfo_ ) , requiredFormatFeatures( requiredFormatFeatures_ ) , flags( flags_ ) , sysmemPixelFormat( sysmemPixelFormat_ ) , colorSpaceCount( static_cast( colorSpaces_.size() ) ) , pColorSpaces( colorSpaces_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ ImageFormatConstraintsInfoFUCHSIA & operator=( ImageFormatConstraintsInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ImageFormatConstraintsInfoFUCHSIA & operator=( VkImageFormatConstraintsInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } # if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ImageFormatConstraintsInfoFUCHSIA & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageFormatConstraintsInfoFUCHSIA & setImageCreateInfo( VULKAN_HPP_NAMESPACE::ImageCreateInfo const & imageCreateInfo_ ) VULKAN_HPP_NOEXCEPT { imageCreateInfo = imageCreateInfo_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageFormatConstraintsInfoFUCHSIA & setRequiredFormatFeatures( VULKAN_HPP_NAMESPACE::FormatFeatureFlags requiredFormatFeatures_ ) VULKAN_HPP_NOEXCEPT { requiredFormatFeatures = requiredFormatFeatures_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageFormatConstraintsInfoFUCHSIA & setFlags( VULKAN_HPP_NAMESPACE::ImageFormatConstraintsFlagsFUCHSIA flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageFormatConstraintsInfoFUCHSIA & setSysmemPixelFormat( uint64_t sysmemPixelFormat_ ) VULKAN_HPP_NOEXCEPT { sysmemPixelFormat = sysmemPixelFormat_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageFormatConstraintsInfoFUCHSIA & setColorSpaceCount( uint32_t colorSpaceCount_ ) VULKAN_HPP_NOEXCEPT { colorSpaceCount = colorSpaceCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageFormatConstraintsInfoFUCHSIA & setPColorSpaces( const VULKAN_HPP_NAMESPACE::SysmemColorSpaceFUCHSIA * pColorSpaces_ ) VULKAN_HPP_NOEXCEPT { pColorSpaces = pColorSpaces_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) ImageFormatConstraintsInfoFUCHSIA & setColorSpaces( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & colorSpaces_ ) VULKAN_HPP_NOEXCEPT { colorSpaceCount = static_cast( colorSpaces_.size() ); pColorSpaces = colorSpaces_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ # endif /*VULKAN_HPP_NO_SETTERS*/ operator VkImageFormatConstraintsInfoFUCHSIA const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkImageFormatConstraintsInfoFUCHSIA &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, imageCreateInfo, requiredFormatFeatures, flags, sysmemPixelFormat, colorSpaceCount, pColorSpaces ); } # endif # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ImageFormatConstraintsInfoFUCHSIA const & ) const = default; # else bool operator==( ImageFormatConstraintsInfoFUCHSIA const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( imageCreateInfo == rhs.imageCreateInfo ) && ( requiredFormatFeatures == rhs.requiredFormatFeatures ) && ( flags == rhs.flags ) && ( sysmemPixelFormat == rhs.sysmemPixelFormat ) && ( colorSpaceCount == rhs.colorSpaceCount ) && ( pColorSpaces == rhs.pColorSpaces ); # endif } bool operator!=( ImageFormatConstraintsInfoFUCHSIA const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } # endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImageFormatConstraintsInfoFUCHSIA; const void * pNext = {}; VULKAN_HPP_NAMESPACE::ImageCreateInfo imageCreateInfo = {}; VULKAN_HPP_NAMESPACE::FormatFeatureFlags requiredFormatFeatures = {}; VULKAN_HPP_NAMESPACE::ImageFormatConstraintsFlagsFUCHSIA flags = {}; uint64_t sysmemPixelFormat = {}; uint32_t colorSpaceCount = {}; const VULKAN_HPP_NAMESPACE::SysmemColorSpaceFUCHSIA * pColorSpaces = {}; }; template <> struct CppType { using Type = ImageFormatConstraintsInfoFUCHSIA; }; #endif /*VK_USE_PLATFORM_FUCHSIA*/ #if defined( VK_USE_PLATFORM_FUCHSIA ) struct ImageConstraintsInfoFUCHSIA { using NativeType = VkImageConstraintsInfoFUCHSIA; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImageConstraintsInfoFUCHSIA; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ImageConstraintsInfoFUCHSIA( uint32_t formatConstraintsCount_ = {}, const VULKAN_HPP_NAMESPACE::ImageFormatConstraintsInfoFUCHSIA * pFormatConstraints_ = {}, VULKAN_HPP_NAMESPACE::BufferCollectionConstraintsInfoFUCHSIA bufferCollectionConstraints_ = {}, VULKAN_HPP_NAMESPACE::ImageConstraintsInfoFlagsFUCHSIA flags_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , formatConstraintsCount{ formatConstraintsCount_ } , pFormatConstraints{ pFormatConstraints_ } , bufferCollectionConstraints{ bufferCollectionConstraints_ } , flags{ flags_ } { } VULKAN_HPP_CONSTEXPR ImageConstraintsInfoFUCHSIA( ImageConstraintsInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT = default; ImageConstraintsInfoFUCHSIA( VkImageConstraintsInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT : ImageConstraintsInfoFUCHSIA( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) ImageConstraintsInfoFUCHSIA( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & formatConstraints_, VULKAN_HPP_NAMESPACE::BufferCollectionConstraintsInfoFUCHSIA bufferCollectionConstraints_ = {}, VULKAN_HPP_NAMESPACE::ImageConstraintsInfoFlagsFUCHSIA flags_ = {}, const void * pNext_ = nullptr ) : pNext( pNext_ ) , formatConstraintsCount( static_cast( formatConstraints_.size() ) ) , pFormatConstraints( formatConstraints_.data() ) , bufferCollectionConstraints( bufferCollectionConstraints_ ) , flags( flags_ ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ ImageConstraintsInfoFUCHSIA & operator=( ImageConstraintsInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ImageConstraintsInfoFUCHSIA & operator=( VkImageConstraintsInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } # if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ImageConstraintsInfoFUCHSIA & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageConstraintsInfoFUCHSIA & setFormatConstraintsCount( uint32_t formatConstraintsCount_ ) VULKAN_HPP_NOEXCEPT { formatConstraintsCount = formatConstraintsCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageConstraintsInfoFUCHSIA & setPFormatConstraints( const VULKAN_HPP_NAMESPACE::ImageFormatConstraintsInfoFUCHSIA * pFormatConstraints_ ) VULKAN_HPP_NOEXCEPT { pFormatConstraints = pFormatConstraints_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) ImageConstraintsInfoFUCHSIA & setFormatConstraints( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & formatConstraints_ ) VULKAN_HPP_NOEXCEPT { formatConstraintsCount = static_cast( formatConstraints_.size() ); pFormatConstraints = formatConstraints_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 ImageConstraintsInfoFUCHSIA & setBufferCollectionConstraints( VULKAN_HPP_NAMESPACE::BufferCollectionConstraintsInfoFUCHSIA const & bufferCollectionConstraints_ ) VULKAN_HPP_NOEXCEPT { bufferCollectionConstraints = bufferCollectionConstraints_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageConstraintsInfoFUCHSIA & setFlags( VULKAN_HPP_NAMESPACE::ImageConstraintsInfoFlagsFUCHSIA flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } # endif /*VULKAN_HPP_NO_SETTERS*/ operator VkImageConstraintsInfoFUCHSIA const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkImageConstraintsInfoFUCHSIA &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, formatConstraintsCount, pFormatConstraints, bufferCollectionConstraints, flags ); } # endif # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ImageConstraintsInfoFUCHSIA const & ) const = default; # else bool operator==( ImageConstraintsInfoFUCHSIA const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( formatConstraintsCount == rhs.formatConstraintsCount ) && ( pFormatConstraints == rhs.pFormatConstraints ) && ( bufferCollectionConstraints == rhs.bufferCollectionConstraints ) && ( flags == rhs.flags ); # endif } bool operator!=( ImageConstraintsInfoFUCHSIA const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } # endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImageConstraintsInfoFUCHSIA; const void * pNext = {}; uint32_t formatConstraintsCount = {}; const VULKAN_HPP_NAMESPACE::ImageFormatConstraintsInfoFUCHSIA * pFormatConstraints = {}; VULKAN_HPP_NAMESPACE::BufferCollectionConstraintsInfoFUCHSIA bufferCollectionConstraints = {}; VULKAN_HPP_NAMESPACE::ImageConstraintsInfoFlagsFUCHSIA flags = {}; }; template <> struct CppType { using Type = ImageConstraintsInfoFUCHSIA; }; #endif /*VK_USE_PLATFORM_FUCHSIA*/ struct ImageCopy { using NativeType = VkImageCopy; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ImageCopy( VULKAN_HPP_NAMESPACE::ImageSubresourceLayers srcSubresource_ = {}, VULKAN_HPP_NAMESPACE::Offset3D srcOffset_ = {}, VULKAN_HPP_NAMESPACE::ImageSubresourceLayers dstSubresource_ = {}, VULKAN_HPP_NAMESPACE::Offset3D dstOffset_ = {}, VULKAN_HPP_NAMESPACE::Extent3D extent_ = {} ) VULKAN_HPP_NOEXCEPT : srcSubresource{ srcSubresource_ } , srcOffset{ srcOffset_ } , dstSubresource{ dstSubresource_ } , dstOffset{ dstOffset_ } , extent{ extent_ } { } VULKAN_HPP_CONSTEXPR ImageCopy( ImageCopy const & rhs ) VULKAN_HPP_NOEXCEPT = default; ImageCopy( VkImageCopy const & rhs ) VULKAN_HPP_NOEXCEPT : ImageCopy( *reinterpret_cast( &rhs ) ) {} ImageCopy & operator=( ImageCopy const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ImageCopy & operator=( VkImageCopy const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ImageCopy & setSrcSubresource( VULKAN_HPP_NAMESPACE::ImageSubresourceLayers const & srcSubresource_ ) VULKAN_HPP_NOEXCEPT { srcSubresource = srcSubresource_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageCopy & setSrcOffset( VULKAN_HPP_NAMESPACE::Offset3D const & srcOffset_ ) VULKAN_HPP_NOEXCEPT { srcOffset = srcOffset_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageCopy & setDstSubresource( VULKAN_HPP_NAMESPACE::ImageSubresourceLayers const & dstSubresource_ ) VULKAN_HPP_NOEXCEPT { dstSubresource = dstSubresource_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageCopy & setDstOffset( VULKAN_HPP_NAMESPACE::Offset3D const & dstOffset_ ) VULKAN_HPP_NOEXCEPT { dstOffset = dstOffset_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageCopy & setExtent( VULKAN_HPP_NAMESPACE::Extent3D const & extent_ ) VULKAN_HPP_NOEXCEPT { extent = extent_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkImageCopy const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkImageCopy &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( srcSubresource, srcOffset, dstSubresource, dstOffset, extent ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ImageCopy const & ) const = default; #else bool operator==( ImageCopy const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( srcSubresource == rhs.srcSubresource ) && ( srcOffset == rhs.srcOffset ) && ( dstSubresource == rhs.dstSubresource ) && ( dstOffset == rhs.dstOffset ) && ( extent == rhs.extent ); # endif } bool operator!=( ImageCopy const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::ImageSubresourceLayers srcSubresource = {}; VULKAN_HPP_NAMESPACE::Offset3D srcOffset = {}; VULKAN_HPP_NAMESPACE::ImageSubresourceLayers dstSubresource = {}; VULKAN_HPP_NAMESPACE::Offset3D dstOffset = {}; VULKAN_HPP_NAMESPACE::Extent3D extent = {}; }; struct SubresourceLayout { using NativeType = VkSubresourceLayout; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR SubresourceLayout( VULKAN_HPP_NAMESPACE::DeviceSize offset_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize size_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize rowPitch_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize arrayPitch_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize depthPitch_ = {} ) VULKAN_HPP_NOEXCEPT : offset{ offset_ } , size{ size_ } , rowPitch{ rowPitch_ } , arrayPitch{ arrayPitch_ } , depthPitch{ depthPitch_ } { } VULKAN_HPP_CONSTEXPR SubresourceLayout( SubresourceLayout const & rhs ) VULKAN_HPP_NOEXCEPT = default; SubresourceLayout( VkSubresourceLayout const & rhs ) VULKAN_HPP_NOEXCEPT : SubresourceLayout( *reinterpret_cast( &rhs ) ) {} SubresourceLayout & operator=( SubresourceLayout const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ SubresourceLayout & operator=( VkSubresourceLayout const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 SubresourceLayout & setOffset( VULKAN_HPP_NAMESPACE::DeviceSize offset_ ) VULKAN_HPP_NOEXCEPT { offset = offset_; return *this; } VULKAN_HPP_CONSTEXPR_14 SubresourceLayout & setSize( VULKAN_HPP_NAMESPACE::DeviceSize size_ ) VULKAN_HPP_NOEXCEPT { size = size_; return *this; } VULKAN_HPP_CONSTEXPR_14 SubresourceLayout & setRowPitch( VULKAN_HPP_NAMESPACE::DeviceSize rowPitch_ ) VULKAN_HPP_NOEXCEPT { rowPitch = rowPitch_; return *this; } VULKAN_HPP_CONSTEXPR_14 SubresourceLayout & setArrayPitch( VULKAN_HPP_NAMESPACE::DeviceSize arrayPitch_ ) VULKAN_HPP_NOEXCEPT { arrayPitch = arrayPitch_; return *this; } VULKAN_HPP_CONSTEXPR_14 SubresourceLayout & setDepthPitch( VULKAN_HPP_NAMESPACE::DeviceSize depthPitch_ ) VULKAN_HPP_NOEXCEPT { depthPitch = depthPitch_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkSubresourceLayout const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkSubresourceLayout &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( offset, size, rowPitch, arrayPitch, depthPitch ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( SubresourceLayout const & ) const = default; #else bool operator==( SubresourceLayout const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( offset == rhs.offset ) && ( size == rhs.size ) && ( rowPitch == rhs.rowPitch ) && ( arrayPitch == rhs.arrayPitch ) && ( depthPitch == rhs.depthPitch ); # endif } bool operator!=( SubresourceLayout const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::DeviceSize offset = {}; VULKAN_HPP_NAMESPACE::DeviceSize size = {}; VULKAN_HPP_NAMESPACE::DeviceSize rowPitch = {}; VULKAN_HPP_NAMESPACE::DeviceSize arrayPitch = {}; VULKAN_HPP_NAMESPACE::DeviceSize depthPitch = {}; }; struct ImageDrmFormatModifierExplicitCreateInfoEXT { using NativeType = VkImageDrmFormatModifierExplicitCreateInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImageDrmFormatModifierExplicitCreateInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ImageDrmFormatModifierExplicitCreateInfoEXT( uint64_t drmFormatModifier_ = {}, uint32_t drmFormatModifierPlaneCount_ = {}, const VULKAN_HPP_NAMESPACE::SubresourceLayout * pPlaneLayouts_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , drmFormatModifier{ drmFormatModifier_ } , drmFormatModifierPlaneCount{ drmFormatModifierPlaneCount_ } , pPlaneLayouts{ pPlaneLayouts_ } { } VULKAN_HPP_CONSTEXPR ImageDrmFormatModifierExplicitCreateInfoEXT( ImageDrmFormatModifierExplicitCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; ImageDrmFormatModifierExplicitCreateInfoEXT( VkImageDrmFormatModifierExplicitCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : ImageDrmFormatModifierExplicitCreateInfoEXT( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) ImageDrmFormatModifierExplicitCreateInfoEXT( uint64_t drmFormatModifier_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & planeLayouts_, const void * pNext_ = nullptr ) : pNext( pNext_ ) , drmFormatModifier( drmFormatModifier_ ) , drmFormatModifierPlaneCount( static_cast( planeLayouts_.size() ) ) , pPlaneLayouts( planeLayouts_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ ImageDrmFormatModifierExplicitCreateInfoEXT & operator=( ImageDrmFormatModifierExplicitCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ImageDrmFormatModifierExplicitCreateInfoEXT & operator=( VkImageDrmFormatModifierExplicitCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ImageDrmFormatModifierExplicitCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageDrmFormatModifierExplicitCreateInfoEXT & setDrmFormatModifier( uint64_t drmFormatModifier_ ) VULKAN_HPP_NOEXCEPT { drmFormatModifier = drmFormatModifier_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageDrmFormatModifierExplicitCreateInfoEXT & setDrmFormatModifierPlaneCount( uint32_t drmFormatModifierPlaneCount_ ) VULKAN_HPP_NOEXCEPT { drmFormatModifierPlaneCount = drmFormatModifierPlaneCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageDrmFormatModifierExplicitCreateInfoEXT & setPPlaneLayouts( const VULKAN_HPP_NAMESPACE::SubresourceLayout * pPlaneLayouts_ ) VULKAN_HPP_NOEXCEPT { pPlaneLayouts = pPlaneLayouts_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) ImageDrmFormatModifierExplicitCreateInfoEXT & setPlaneLayouts( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & planeLayouts_ ) VULKAN_HPP_NOEXCEPT { drmFormatModifierPlaneCount = static_cast( planeLayouts_.size() ); pPlaneLayouts = planeLayouts_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkImageDrmFormatModifierExplicitCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkImageDrmFormatModifierExplicitCreateInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, drmFormatModifier, drmFormatModifierPlaneCount, pPlaneLayouts ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ImageDrmFormatModifierExplicitCreateInfoEXT const & ) const = default; #else bool operator==( ImageDrmFormatModifierExplicitCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( drmFormatModifier == rhs.drmFormatModifier ) && ( drmFormatModifierPlaneCount == rhs.drmFormatModifierPlaneCount ) && ( pPlaneLayouts == rhs.pPlaneLayouts ); # endif } bool operator!=( ImageDrmFormatModifierExplicitCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImageDrmFormatModifierExplicitCreateInfoEXT; const void * pNext = {}; uint64_t drmFormatModifier = {}; uint32_t drmFormatModifierPlaneCount = {}; const VULKAN_HPP_NAMESPACE::SubresourceLayout * pPlaneLayouts = {}; }; template <> struct CppType { using Type = ImageDrmFormatModifierExplicitCreateInfoEXT; }; struct ImageDrmFormatModifierListCreateInfoEXT { using NativeType = VkImageDrmFormatModifierListCreateInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImageDrmFormatModifierListCreateInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ImageDrmFormatModifierListCreateInfoEXT( uint32_t drmFormatModifierCount_ = {}, const uint64_t * pDrmFormatModifiers_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , drmFormatModifierCount{ drmFormatModifierCount_ } , pDrmFormatModifiers{ pDrmFormatModifiers_ } { } VULKAN_HPP_CONSTEXPR ImageDrmFormatModifierListCreateInfoEXT( ImageDrmFormatModifierListCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; ImageDrmFormatModifierListCreateInfoEXT( VkImageDrmFormatModifierListCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : ImageDrmFormatModifierListCreateInfoEXT( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) ImageDrmFormatModifierListCreateInfoEXT( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & drmFormatModifiers_, const void * pNext_ = nullptr ) : pNext( pNext_ ), drmFormatModifierCount( static_cast( drmFormatModifiers_.size() ) ), pDrmFormatModifiers( drmFormatModifiers_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ ImageDrmFormatModifierListCreateInfoEXT & operator=( ImageDrmFormatModifierListCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ImageDrmFormatModifierListCreateInfoEXT & operator=( VkImageDrmFormatModifierListCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ImageDrmFormatModifierListCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageDrmFormatModifierListCreateInfoEXT & setDrmFormatModifierCount( uint32_t drmFormatModifierCount_ ) VULKAN_HPP_NOEXCEPT { drmFormatModifierCount = drmFormatModifierCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageDrmFormatModifierListCreateInfoEXT & setPDrmFormatModifiers( const uint64_t * pDrmFormatModifiers_ ) VULKAN_HPP_NOEXCEPT { pDrmFormatModifiers = pDrmFormatModifiers_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) ImageDrmFormatModifierListCreateInfoEXT & setDrmFormatModifiers( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & drmFormatModifiers_ ) VULKAN_HPP_NOEXCEPT { drmFormatModifierCount = static_cast( drmFormatModifiers_.size() ); pDrmFormatModifiers = drmFormatModifiers_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkImageDrmFormatModifierListCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkImageDrmFormatModifierListCreateInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, drmFormatModifierCount, pDrmFormatModifiers ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ImageDrmFormatModifierListCreateInfoEXT const & ) const = default; #else bool operator==( ImageDrmFormatModifierListCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( drmFormatModifierCount == rhs.drmFormatModifierCount ) && ( pDrmFormatModifiers == rhs.pDrmFormatModifiers ); # endif } bool operator!=( ImageDrmFormatModifierListCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImageDrmFormatModifierListCreateInfoEXT; const void * pNext = {}; uint32_t drmFormatModifierCount = {}; const uint64_t * pDrmFormatModifiers = {}; }; template <> struct CppType { using Type = ImageDrmFormatModifierListCreateInfoEXT; }; struct ImageDrmFormatModifierPropertiesEXT { using NativeType = VkImageDrmFormatModifierPropertiesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImageDrmFormatModifierPropertiesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ImageDrmFormatModifierPropertiesEXT( uint64_t drmFormatModifier_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , drmFormatModifier{ drmFormatModifier_ } { } VULKAN_HPP_CONSTEXPR ImageDrmFormatModifierPropertiesEXT( ImageDrmFormatModifierPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; ImageDrmFormatModifierPropertiesEXT( VkImageDrmFormatModifierPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : ImageDrmFormatModifierPropertiesEXT( *reinterpret_cast( &rhs ) ) { } ImageDrmFormatModifierPropertiesEXT & operator=( ImageDrmFormatModifierPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ImageDrmFormatModifierPropertiesEXT & operator=( VkImageDrmFormatModifierPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkImageDrmFormatModifierPropertiesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkImageDrmFormatModifierPropertiesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, drmFormatModifier ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ImageDrmFormatModifierPropertiesEXT const & ) const = default; #else bool operator==( ImageDrmFormatModifierPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( drmFormatModifier == rhs.drmFormatModifier ); # endif } bool operator!=( ImageDrmFormatModifierPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImageDrmFormatModifierPropertiesEXT; void * pNext = {}; uint64_t drmFormatModifier = {}; }; template <> struct CppType { using Type = ImageDrmFormatModifierPropertiesEXT; }; struct ImageFormatListCreateInfo { using NativeType = VkImageFormatListCreateInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImageFormatListCreateInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ImageFormatListCreateInfo( uint32_t viewFormatCount_ = {}, const VULKAN_HPP_NAMESPACE::Format * pViewFormats_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , viewFormatCount{ viewFormatCount_ } , pViewFormats{ pViewFormats_ } { } VULKAN_HPP_CONSTEXPR ImageFormatListCreateInfo( ImageFormatListCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; ImageFormatListCreateInfo( VkImageFormatListCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT : ImageFormatListCreateInfo( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) ImageFormatListCreateInfo( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & viewFormats_, const void * pNext_ = nullptr ) : pNext( pNext_ ), viewFormatCount( static_cast( viewFormats_.size() ) ), pViewFormats( viewFormats_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ ImageFormatListCreateInfo & operator=( ImageFormatListCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ImageFormatListCreateInfo & operator=( VkImageFormatListCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ImageFormatListCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageFormatListCreateInfo & setViewFormatCount( uint32_t viewFormatCount_ ) VULKAN_HPP_NOEXCEPT { viewFormatCount = viewFormatCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageFormatListCreateInfo & setPViewFormats( const VULKAN_HPP_NAMESPACE::Format * pViewFormats_ ) VULKAN_HPP_NOEXCEPT { pViewFormats = pViewFormats_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) ImageFormatListCreateInfo & setViewFormats( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & viewFormats_ ) VULKAN_HPP_NOEXCEPT { viewFormatCount = static_cast( viewFormats_.size() ); pViewFormats = viewFormats_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkImageFormatListCreateInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkImageFormatListCreateInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, viewFormatCount, pViewFormats ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ImageFormatListCreateInfo const & ) const = default; #else bool operator==( ImageFormatListCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( viewFormatCount == rhs.viewFormatCount ) && ( pViewFormats == rhs.pViewFormats ); # endif } bool operator!=( ImageFormatListCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImageFormatListCreateInfo; const void * pNext = {}; uint32_t viewFormatCount = {}; const VULKAN_HPP_NAMESPACE::Format * pViewFormats = {}; }; template <> struct CppType { using Type = ImageFormatListCreateInfo; }; using ImageFormatListCreateInfoKHR = ImageFormatListCreateInfo; struct ImageFormatProperties2 { using NativeType = VkImageFormatProperties2; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImageFormatProperties2; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ImageFormatProperties2( VULKAN_HPP_NAMESPACE::ImageFormatProperties imageFormatProperties_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , imageFormatProperties{ imageFormatProperties_ } { } VULKAN_HPP_CONSTEXPR ImageFormatProperties2( ImageFormatProperties2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; ImageFormatProperties2( VkImageFormatProperties2 const & rhs ) VULKAN_HPP_NOEXCEPT : ImageFormatProperties2( *reinterpret_cast( &rhs ) ) { } ImageFormatProperties2 & operator=( ImageFormatProperties2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ImageFormatProperties2 & operator=( VkImageFormatProperties2 const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkImageFormatProperties2 const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkImageFormatProperties2 &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, imageFormatProperties ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ImageFormatProperties2 const & ) const = default; #else bool operator==( ImageFormatProperties2 const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( imageFormatProperties == rhs.imageFormatProperties ); # endif } bool operator!=( ImageFormatProperties2 const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImageFormatProperties2; void * pNext = {}; VULKAN_HPP_NAMESPACE::ImageFormatProperties imageFormatProperties = {}; }; template <> struct CppType { using Type = ImageFormatProperties2; }; using ImageFormatProperties2KHR = ImageFormatProperties2; struct ImageMemoryBarrier { using NativeType = VkImageMemoryBarrier; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImageMemoryBarrier; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ImageMemoryBarrier( VULKAN_HPP_NAMESPACE::AccessFlags srcAccessMask_ = {}, VULKAN_HPP_NAMESPACE::AccessFlags dstAccessMask_ = {}, VULKAN_HPP_NAMESPACE::ImageLayout oldLayout_ = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined, VULKAN_HPP_NAMESPACE::ImageLayout newLayout_ = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined, uint32_t srcQueueFamilyIndex_ = {}, uint32_t dstQueueFamilyIndex_ = {}, VULKAN_HPP_NAMESPACE::Image image_ = {}, VULKAN_HPP_NAMESPACE::ImageSubresourceRange subresourceRange_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , srcAccessMask{ srcAccessMask_ } , dstAccessMask{ dstAccessMask_ } , oldLayout{ oldLayout_ } , newLayout{ newLayout_ } , srcQueueFamilyIndex{ srcQueueFamilyIndex_ } , dstQueueFamilyIndex{ dstQueueFamilyIndex_ } , image{ image_ } , subresourceRange{ subresourceRange_ } { } VULKAN_HPP_CONSTEXPR ImageMemoryBarrier( ImageMemoryBarrier const & rhs ) VULKAN_HPP_NOEXCEPT = default; ImageMemoryBarrier( VkImageMemoryBarrier const & rhs ) VULKAN_HPP_NOEXCEPT : ImageMemoryBarrier( *reinterpret_cast( &rhs ) ) {} ImageMemoryBarrier & operator=( ImageMemoryBarrier const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ImageMemoryBarrier & operator=( VkImageMemoryBarrier const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ImageMemoryBarrier & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageMemoryBarrier & setSrcAccessMask( VULKAN_HPP_NAMESPACE::AccessFlags srcAccessMask_ ) VULKAN_HPP_NOEXCEPT { srcAccessMask = srcAccessMask_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageMemoryBarrier & setDstAccessMask( VULKAN_HPP_NAMESPACE::AccessFlags dstAccessMask_ ) VULKAN_HPP_NOEXCEPT { dstAccessMask = dstAccessMask_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageMemoryBarrier & setOldLayout( VULKAN_HPP_NAMESPACE::ImageLayout oldLayout_ ) VULKAN_HPP_NOEXCEPT { oldLayout = oldLayout_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageMemoryBarrier & setNewLayout( VULKAN_HPP_NAMESPACE::ImageLayout newLayout_ ) VULKAN_HPP_NOEXCEPT { newLayout = newLayout_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageMemoryBarrier & setSrcQueueFamilyIndex( uint32_t srcQueueFamilyIndex_ ) VULKAN_HPP_NOEXCEPT { srcQueueFamilyIndex = srcQueueFamilyIndex_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageMemoryBarrier & setDstQueueFamilyIndex( uint32_t dstQueueFamilyIndex_ ) VULKAN_HPP_NOEXCEPT { dstQueueFamilyIndex = dstQueueFamilyIndex_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageMemoryBarrier & setImage( VULKAN_HPP_NAMESPACE::Image image_ ) VULKAN_HPP_NOEXCEPT { image = image_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageMemoryBarrier & setSubresourceRange( VULKAN_HPP_NAMESPACE::ImageSubresourceRange const & subresourceRange_ ) VULKAN_HPP_NOEXCEPT { subresourceRange = subresourceRange_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkImageMemoryBarrier const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkImageMemoryBarrier &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, srcAccessMask, dstAccessMask, oldLayout, newLayout, srcQueueFamilyIndex, dstQueueFamilyIndex, image, subresourceRange ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ImageMemoryBarrier const & ) const = default; #else bool operator==( ImageMemoryBarrier const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( srcAccessMask == rhs.srcAccessMask ) && ( dstAccessMask == rhs.dstAccessMask ) && ( oldLayout == rhs.oldLayout ) && ( newLayout == rhs.newLayout ) && ( srcQueueFamilyIndex == rhs.srcQueueFamilyIndex ) && ( dstQueueFamilyIndex == rhs.dstQueueFamilyIndex ) && ( image == rhs.image ) && ( subresourceRange == rhs.subresourceRange ); # endif } bool operator!=( ImageMemoryBarrier const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImageMemoryBarrier; const void * pNext = {}; VULKAN_HPP_NAMESPACE::AccessFlags srcAccessMask = {}; VULKAN_HPP_NAMESPACE::AccessFlags dstAccessMask = {}; VULKAN_HPP_NAMESPACE::ImageLayout oldLayout = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined; VULKAN_HPP_NAMESPACE::ImageLayout newLayout = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined; uint32_t srcQueueFamilyIndex = {}; uint32_t dstQueueFamilyIndex = {}; VULKAN_HPP_NAMESPACE::Image image = {}; VULKAN_HPP_NAMESPACE::ImageSubresourceRange subresourceRange = {}; }; template <> struct CppType { using Type = ImageMemoryBarrier; }; struct ImageMemoryRequirementsInfo2 { using NativeType = VkImageMemoryRequirementsInfo2; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImageMemoryRequirementsInfo2; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ImageMemoryRequirementsInfo2( VULKAN_HPP_NAMESPACE::Image image_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , image{ image_ } { } VULKAN_HPP_CONSTEXPR ImageMemoryRequirementsInfo2( ImageMemoryRequirementsInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; ImageMemoryRequirementsInfo2( VkImageMemoryRequirementsInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT : ImageMemoryRequirementsInfo2( *reinterpret_cast( &rhs ) ) { } ImageMemoryRequirementsInfo2 & operator=( ImageMemoryRequirementsInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ImageMemoryRequirementsInfo2 & operator=( VkImageMemoryRequirementsInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ImageMemoryRequirementsInfo2 & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageMemoryRequirementsInfo2 & setImage( VULKAN_HPP_NAMESPACE::Image image_ ) VULKAN_HPP_NOEXCEPT { image = image_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkImageMemoryRequirementsInfo2 const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkImageMemoryRequirementsInfo2 &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, image ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ImageMemoryRequirementsInfo2 const & ) const = default; #else bool operator==( ImageMemoryRequirementsInfo2 const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( image == rhs.image ); # endif } bool operator!=( ImageMemoryRequirementsInfo2 const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImageMemoryRequirementsInfo2; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Image image = {}; }; template <> struct CppType { using Type = ImageMemoryRequirementsInfo2; }; using ImageMemoryRequirementsInfo2KHR = ImageMemoryRequirementsInfo2; #if defined( VK_USE_PLATFORM_FUCHSIA ) struct ImagePipeSurfaceCreateInfoFUCHSIA { using NativeType = VkImagePipeSurfaceCreateInfoFUCHSIA; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImagepipeSurfaceCreateInfoFUCHSIA; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ImagePipeSurfaceCreateInfoFUCHSIA( VULKAN_HPP_NAMESPACE::ImagePipeSurfaceCreateFlagsFUCHSIA flags_ = {}, zx_handle_t imagePipeHandle_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , imagePipeHandle{ imagePipeHandle_ } { } VULKAN_HPP_CONSTEXPR ImagePipeSurfaceCreateInfoFUCHSIA( ImagePipeSurfaceCreateInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT = default; ImagePipeSurfaceCreateInfoFUCHSIA( VkImagePipeSurfaceCreateInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT : ImagePipeSurfaceCreateInfoFUCHSIA( *reinterpret_cast( &rhs ) ) { } ImagePipeSurfaceCreateInfoFUCHSIA & operator=( ImagePipeSurfaceCreateInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ImagePipeSurfaceCreateInfoFUCHSIA & operator=( VkImagePipeSurfaceCreateInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } # if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ImagePipeSurfaceCreateInfoFUCHSIA & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImagePipeSurfaceCreateInfoFUCHSIA & setFlags( VULKAN_HPP_NAMESPACE::ImagePipeSurfaceCreateFlagsFUCHSIA flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImagePipeSurfaceCreateInfoFUCHSIA & setImagePipeHandle( zx_handle_t imagePipeHandle_ ) VULKAN_HPP_NOEXCEPT { imagePipeHandle = imagePipeHandle_; return *this; } # endif /*VULKAN_HPP_NO_SETTERS*/ operator VkImagePipeSurfaceCreateInfoFUCHSIA const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkImagePipeSurfaceCreateInfoFUCHSIA &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, imagePipeHandle ); } # endif # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) std::strong_ordering operator<=>( ImagePipeSurfaceCreateInfoFUCHSIA const & rhs ) const VULKAN_HPP_NOEXCEPT { if ( auto cmp = sType <=> rhs.sType; cmp != 0 ) return cmp; if ( auto cmp = pNext <=> rhs.pNext; cmp != 0 ) return cmp; if ( auto cmp = flags <=> rhs.flags; cmp != 0 ) return cmp; if ( auto cmp = memcmp( &imagePipeHandle, &rhs.imagePipeHandle, sizeof( zx_handle_t ) ); cmp != 0 ) return ( cmp < 0 ) ? std::strong_ordering::less : std::strong_ordering::greater; return std::strong_ordering::equivalent; } # endif bool operator==( ImagePipeSurfaceCreateInfoFUCHSIA const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( memcmp( &imagePipeHandle, &rhs.imagePipeHandle, sizeof( zx_handle_t ) ) == 0 ); } bool operator!=( ImagePipeSurfaceCreateInfoFUCHSIA const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImagepipeSurfaceCreateInfoFUCHSIA; const void * pNext = {}; VULKAN_HPP_NAMESPACE::ImagePipeSurfaceCreateFlagsFUCHSIA flags = {}; zx_handle_t imagePipeHandle = {}; }; template <> struct CppType { using Type = ImagePipeSurfaceCreateInfoFUCHSIA; }; #endif /*VK_USE_PLATFORM_FUCHSIA*/ struct ImagePlaneMemoryRequirementsInfo { using NativeType = VkImagePlaneMemoryRequirementsInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImagePlaneMemoryRequirementsInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ImagePlaneMemoryRequirementsInfo( VULKAN_HPP_NAMESPACE::ImageAspectFlagBits planeAspect_ = VULKAN_HPP_NAMESPACE::ImageAspectFlagBits::eColor, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , planeAspect{ planeAspect_ } { } VULKAN_HPP_CONSTEXPR ImagePlaneMemoryRequirementsInfo( ImagePlaneMemoryRequirementsInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; ImagePlaneMemoryRequirementsInfo( VkImagePlaneMemoryRequirementsInfo const & rhs ) VULKAN_HPP_NOEXCEPT : ImagePlaneMemoryRequirementsInfo( *reinterpret_cast( &rhs ) ) { } ImagePlaneMemoryRequirementsInfo & operator=( ImagePlaneMemoryRequirementsInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ImagePlaneMemoryRequirementsInfo & operator=( VkImagePlaneMemoryRequirementsInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ImagePlaneMemoryRequirementsInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImagePlaneMemoryRequirementsInfo & setPlaneAspect( VULKAN_HPP_NAMESPACE::ImageAspectFlagBits planeAspect_ ) VULKAN_HPP_NOEXCEPT { planeAspect = planeAspect_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkImagePlaneMemoryRequirementsInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkImagePlaneMemoryRequirementsInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, planeAspect ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ImagePlaneMemoryRequirementsInfo const & ) const = default; #else bool operator==( ImagePlaneMemoryRequirementsInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( planeAspect == rhs.planeAspect ); # endif } bool operator!=( ImagePlaneMemoryRequirementsInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImagePlaneMemoryRequirementsInfo; const void * pNext = {}; VULKAN_HPP_NAMESPACE::ImageAspectFlagBits planeAspect = VULKAN_HPP_NAMESPACE::ImageAspectFlagBits::eColor; }; template <> struct CppType { using Type = ImagePlaneMemoryRequirementsInfo; }; using ImagePlaneMemoryRequirementsInfoKHR = ImagePlaneMemoryRequirementsInfo; struct ImageResolve { using NativeType = VkImageResolve; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ImageResolve( VULKAN_HPP_NAMESPACE::ImageSubresourceLayers srcSubresource_ = {}, VULKAN_HPP_NAMESPACE::Offset3D srcOffset_ = {}, VULKAN_HPP_NAMESPACE::ImageSubresourceLayers dstSubresource_ = {}, VULKAN_HPP_NAMESPACE::Offset3D dstOffset_ = {}, VULKAN_HPP_NAMESPACE::Extent3D extent_ = {} ) VULKAN_HPP_NOEXCEPT : srcSubresource{ srcSubresource_ } , srcOffset{ srcOffset_ } , dstSubresource{ dstSubresource_ } , dstOffset{ dstOffset_ } , extent{ extent_ } { } VULKAN_HPP_CONSTEXPR ImageResolve( ImageResolve const & rhs ) VULKAN_HPP_NOEXCEPT = default; ImageResolve( VkImageResolve const & rhs ) VULKAN_HPP_NOEXCEPT : ImageResolve( *reinterpret_cast( &rhs ) ) {} ImageResolve & operator=( ImageResolve const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ImageResolve & operator=( VkImageResolve const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ImageResolve & setSrcSubresource( VULKAN_HPP_NAMESPACE::ImageSubresourceLayers const & srcSubresource_ ) VULKAN_HPP_NOEXCEPT { srcSubresource = srcSubresource_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageResolve & setSrcOffset( VULKAN_HPP_NAMESPACE::Offset3D const & srcOffset_ ) VULKAN_HPP_NOEXCEPT { srcOffset = srcOffset_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageResolve & setDstSubresource( VULKAN_HPP_NAMESPACE::ImageSubresourceLayers const & dstSubresource_ ) VULKAN_HPP_NOEXCEPT { dstSubresource = dstSubresource_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageResolve & setDstOffset( VULKAN_HPP_NAMESPACE::Offset3D const & dstOffset_ ) VULKAN_HPP_NOEXCEPT { dstOffset = dstOffset_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageResolve & setExtent( VULKAN_HPP_NAMESPACE::Extent3D const & extent_ ) VULKAN_HPP_NOEXCEPT { extent = extent_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkImageResolve const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkImageResolve &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( srcSubresource, srcOffset, dstSubresource, dstOffset, extent ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ImageResolve const & ) const = default; #else bool operator==( ImageResolve const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( srcSubresource == rhs.srcSubresource ) && ( srcOffset == rhs.srcOffset ) && ( dstSubresource == rhs.dstSubresource ) && ( dstOffset == rhs.dstOffset ) && ( extent == rhs.extent ); # endif } bool operator!=( ImageResolve const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::ImageSubresourceLayers srcSubresource = {}; VULKAN_HPP_NAMESPACE::Offset3D srcOffset = {}; VULKAN_HPP_NAMESPACE::ImageSubresourceLayers dstSubresource = {}; VULKAN_HPP_NAMESPACE::Offset3D dstOffset = {}; VULKAN_HPP_NAMESPACE::Extent3D extent = {}; }; struct ImageResolve2 { using NativeType = VkImageResolve2; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImageResolve2; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ImageResolve2( VULKAN_HPP_NAMESPACE::ImageSubresourceLayers srcSubresource_ = {}, VULKAN_HPP_NAMESPACE::Offset3D srcOffset_ = {}, VULKAN_HPP_NAMESPACE::ImageSubresourceLayers dstSubresource_ = {}, VULKAN_HPP_NAMESPACE::Offset3D dstOffset_ = {}, VULKAN_HPP_NAMESPACE::Extent3D extent_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , srcSubresource{ srcSubresource_ } , srcOffset{ srcOffset_ } , dstSubresource{ dstSubresource_ } , dstOffset{ dstOffset_ } , extent{ extent_ } { } VULKAN_HPP_CONSTEXPR ImageResolve2( ImageResolve2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; ImageResolve2( VkImageResolve2 const & rhs ) VULKAN_HPP_NOEXCEPT : ImageResolve2( *reinterpret_cast( &rhs ) ) {} ImageResolve2 & operator=( ImageResolve2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ImageResolve2 & operator=( VkImageResolve2 const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ImageResolve2 & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageResolve2 & setSrcSubresource( VULKAN_HPP_NAMESPACE::ImageSubresourceLayers const & srcSubresource_ ) VULKAN_HPP_NOEXCEPT { srcSubresource = srcSubresource_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageResolve2 & setSrcOffset( VULKAN_HPP_NAMESPACE::Offset3D const & srcOffset_ ) VULKAN_HPP_NOEXCEPT { srcOffset = srcOffset_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageResolve2 & setDstSubresource( VULKAN_HPP_NAMESPACE::ImageSubresourceLayers const & dstSubresource_ ) VULKAN_HPP_NOEXCEPT { dstSubresource = dstSubresource_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageResolve2 & setDstOffset( VULKAN_HPP_NAMESPACE::Offset3D const & dstOffset_ ) VULKAN_HPP_NOEXCEPT { dstOffset = dstOffset_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageResolve2 & setExtent( VULKAN_HPP_NAMESPACE::Extent3D const & extent_ ) VULKAN_HPP_NOEXCEPT { extent = extent_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkImageResolve2 const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkImageResolve2 &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, srcSubresource, srcOffset, dstSubresource, dstOffset, extent ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ImageResolve2 const & ) const = default; #else bool operator==( ImageResolve2 const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( srcSubresource == rhs.srcSubresource ) && ( srcOffset == rhs.srcOffset ) && ( dstSubresource == rhs.dstSubresource ) && ( dstOffset == rhs.dstOffset ) && ( extent == rhs.extent ); # endif } bool operator!=( ImageResolve2 const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImageResolve2; const void * pNext = {}; VULKAN_HPP_NAMESPACE::ImageSubresourceLayers srcSubresource = {}; VULKAN_HPP_NAMESPACE::Offset3D srcOffset = {}; VULKAN_HPP_NAMESPACE::ImageSubresourceLayers dstSubresource = {}; VULKAN_HPP_NAMESPACE::Offset3D dstOffset = {}; VULKAN_HPP_NAMESPACE::Extent3D extent = {}; }; template <> struct CppType { using Type = ImageResolve2; }; using ImageResolve2KHR = ImageResolve2; struct ImageSparseMemoryRequirementsInfo2 { using NativeType = VkImageSparseMemoryRequirementsInfo2; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImageSparseMemoryRequirementsInfo2; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ImageSparseMemoryRequirementsInfo2( VULKAN_HPP_NAMESPACE::Image image_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , image{ image_ } { } VULKAN_HPP_CONSTEXPR ImageSparseMemoryRequirementsInfo2( ImageSparseMemoryRequirementsInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; ImageSparseMemoryRequirementsInfo2( VkImageSparseMemoryRequirementsInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT : ImageSparseMemoryRequirementsInfo2( *reinterpret_cast( &rhs ) ) { } ImageSparseMemoryRequirementsInfo2 & operator=( ImageSparseMemoryRequirementsInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ImageSparseMemoryRequirementsInfo2 & operator=( VkImageSparseMemoryRequirementsInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ImageSparseMemoryRequirementsInfo2 & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageSparseMemoryRequirementsInfo2 & setImage( VULKAN_HPP_NAMESPACE::Image image_ ) VULKAN_HPP_NOEXCEPT { image = image_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkImageSparseMemoryRequirementsInfo2 const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkImageSparseMemoryRequirementsInfo2 &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, image ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ImageSparseMemoryRequirementsInfo2 const & ) const = default; #else bool operator==( ImageSparseMemoryRequirementsInfo2 const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( image == rhs.image ); # endif } bool operator!=( ImageSparseMemoryRequirementsInfo2 const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImageSparseMemoryRequirementsInfo2; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Image image = {}; }; template <> struct CppType { using Type = ImageSparseMemoryRequirementsInfo2; }; using ImageSparseMemoryRequirementsInfo2KHR = ImageSparseMemoryRequirementsInfo2; struct ImageStencilUsageCreateInfo { using NativeType = VkImageStencilUsageCreateInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImageStencilUsageCreateInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ImageStencilUsageCreateInfo( VULKAN_HPP_NAMESPACE::ImageUsageFlags stencilUsage_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , stencilUsage{ stencilUsage_ } { } VULKAN_HPP_CONSTEXPR ImageStencilUsageCreateInfo( ImageStencilUsageCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; ImageStencilUsageCreateInfo( VkImageStencilUsageCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT : ImageStencilUsageCreateInfo( *reinterpret_cast( &rhs ) ) { } ImageStencilUsageCreateInfo & operator=( ImageStencilUsageCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ImageStencilUsageCreateInfo & operator=( VkImageStencilUsageCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ImageStencilUsageCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageStencilUsageCreateInfo & setStencilUsage( VULKAN_HPP_NAMESPACE::ImageUsageFlags stencilUsage_ ) VULKAN_HPP_NOEXCEPT { stencilUsage = stencilUsage_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkImageStencilUsageCreateInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkImageStencilUsageCreateInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, stencilUsage ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ImageStencilUsageCreateInfo const & ) const = default; #else bool operator==( ImageStencilUsageCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( stencilUsage == rhs.stencilUsage ); # endif } bool operator!=( ImageStencilUsageCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImageStencilUsageCreateInfo; const void * pNext = {}; VULKAN_HPP_NAMESPACE::ImageUsageFlags stencilUsage = {}; }; template <> struct CppType { using Type = ImageStencilUsageCreateInfo; }; using ImageStencilUsageCreateInfoEXT = ImageStencilUsageCreateInfo; struct ImageSwapchainCreateInfoKHR { using NativeType = VkImageSwapchainCreateInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImageSwapchainCreateInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ImageSwapchainCreateInfoKHR( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , swapchain{ swapchain_ } { } VULKAN_HPP_CONSTEXPR ImageSwapchainCreateInfoKHR( ImageSwapchainCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; ImageSwapchainCreateInfoKHR( VkImageSwapchainCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : ImageSwapchainCreateInfoKHR( *reinterpret_cast( &rhs ) ) { } ImageSwapchainCreateInfoKHR & operator=( ImageSwapchainCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ImageSwapchainCreateInfoKHR & operator=( VkImageSwapchainCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ImageSwapchainCreateInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageSwapchainCreateInfoKHR & setSwapchain( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain_ ) VULKAN_HPP_NOEXCEPT { swapchain = swapchain_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkImageSwapchainCreateInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkImageSwapchainCreateInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, swapchain ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ImageSwapchainCreateInfoKHR const & ) const = default; #else bool operator==( ImageSwapchainCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( swapchain == rhs.swapchain ); # endif } bool operator!=( ImageSwapchainCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImageSwapchainCreateInfoKHR; const void * pNext = {}; VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain = {}; }; template <> struct CppType { using Type = ImageSwapchainCreateInfoKHR; }; struct ImageViewASTCDecodeModeEXT { using NativeType = VkImageViewASTCDecodeModeEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImageViewAstcDecodeModeEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ImageViewASTCDecodeModeEXT( VULKAN_HPP_NAMESPACE::Format decodeMode_ = VULKAN_HPP_NAMESPACE::Format::eUndefined, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , decodeMode{ decodeMode_ } { } VULKAN_HPP_CONSTEXPR ImageViewASTCDecodeModeEXT( ImageViewASTCDecodeModeEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; ImageViewASTCDecodeModeEXT( VkImageViewASTCDecodeModeEXT const & rhs ) VULKAN_HPP_NOEXCEPT : ImageViewASTCDecodeModeEXT( *reinterpret_cast( &rhs ) ) { } ImageViewASTCDecodeModeEXT & operator=( ImageViewASTCDecodeModeEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ImageViewASTCDecodeModeEXT & operator=( VkImageViewASTCDecodeModeEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ImageViewASTCDecodeModeEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageViewASTCDecodeModeEXT & setDecodeMode( VULKAN_HPP_NAMESPACE::Format decodeMode_ ) VULKAN_HPP_NOEXCEPT { decodeMode = decodeMode_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkImageViewASTCDecodeModeEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkImageViewASTCDecodeModeEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, decodeMode ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ImageViewASTCDecodeModeEXT const & ) const = default; #else bool operator==( ImageViewASTCDecodeModeEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( decodeMode == rhs.decodeMode ); # endif } bool operator!=( ImageViewASTCDecodeModeEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImageViewAstcDecodeModeEXT; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Format decodeMode = VULKAN_HPP_NAMESPACE::Format::eUndefined; }; template <> struct CppType { using Type = ImageViewASTCDecodeModeEXT; }; struct ImageViewAddressPropertiesNVX { using NativeType = VkImageViewAddressPropertiesNVX; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImageViewAddressPropertiesNVX; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ImageViewAddressPropertiesNVX( VULKAN_HPP_NAMESPACE::DeviceAddress deviceAddress_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize size_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , deviceAddress{ deviceAddress_ } , size{ size_ } { } VULKAN_HPP_CONSTEXPR ImageViewAddressPropertiesNVX( ImageViewAddressPropertiesNVX const & rhs ) VULKAN_HPP_NOEXCEPT = default; ImageViewAddressPropertiesNVX( VkImageViewAddressPropertiesNVX const & rhs ) VULKAN_HPP_NOEXCEPT : ImageViewAddressPropertiesNVX( *reinterpret_cast( &rhs ) ) { } ImageViewAddressPropertiesNVX & operator=( ImageViewAddressPropertiesNVX const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ImageViewAddressPropertiesNVX & operator=( VkImageViewAddressPropertiesNVX const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkImageViewAddressPropertiesNVX const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkImageViewAddressPropertiesNVX &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std:: tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, deviceAddress, size ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ImageViewAddressPropertiesNVX const & ) const = default; #else bool operator==( ImageViewAddressPropertiesNVX const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( deviceAddress == rhs.deviceAddress ) && ( size == rhs.size ); # endif } bool operator!=( ImageViewAddressPropertiesNVX const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImageViewAddressPropertiesNVX; void * pNext = {}; VULKAN_HPP_NAMESPACE::DeviceAddress deviceAddress = {}; VULKAN_HPP_NAMESPACE::DeviceSize size = {}; }; template <> struct CppType { using Type = ImageViewAddressPropertiesNVX; }; struct ImageViewCaptureDescriptorDataInfoEXT { using NativeType = VkImageViewCaptureDescriptorDataInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImageViewCaptureDescriptorDataInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ImageViewCaptureDescriptorDataInfoEXT( VULKAN_HPP_NAMESPACE::ImageView imageView_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , imageView{ imageView_ } { } VULKAN_HPP_CONSTEXPR ImageViewCaptureDescriptorDataInfoEXT( ImageViewCaptureDescriptorDataInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; ImageViewCaptureDescriptorDataInfoEXT( VkImageViewCaptureDescriptorDataInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : ImageViewCaptureDescriptorDataInfoEXT( *reinterpret_cast( &rhs ) ) { } ImageViewCaptureDescriptorDataInfoEXT & operator=( ImageViewCaptureDescriptorDataInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ImageViewCaptureDescriptorDataInfoEXT & operator=( VkImageViewCaptureDescriptorDataInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ImageViewCaptureDescriptorDataInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageViewCaptureDescriptorDataInfoEXT & setImageView( VULKAN_HPP_NAMESPACE::ImageView imageView_ ) VULKAN_HPP_NOEXCEPT { imageView = imageView_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkImageViewCaptureDescriptorDataInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkImageViewCaptureDescriptorDataInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, imageView ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ImageViewCaptureDescriptorDataInfoEXT const & ) const = default; #else bool operator==( ImageViewCaptureDescriptorDataInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( imageView == rhs.imageView ); # endif } bool operator!=( ImageViewCaptureDescriptorDataInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImageViewCaptureDescriptorDataInfoEXT; const void * pNext = {}; VULKAN_HPP_NAMESPACE::ImageView imageView = {}; }; template <> struct CppType { using Type = ImageViewCaptureDescriptorDataInfoEXT; }; struct ImageViewCreateInfo { using NativeType = VkImageViewCreateInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImageViewCreateInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ImageViewCreateInfo( VULKAN_HPP_NAMESPACE::ImageViewCreateFlags flags_ = {}, VULKAN_HPP_NAMESPACE::Image image_ = {}, VULKAN_HPP_NAMESPACE::ImageViewType viewType_ = VULKAN_HPP_NAMESPACE::ImageViewType::e1D, VULKAN_HPP_NAMESPACE::Format format_ = VULKAN_HPP_NAMESPACE::Format::eUndefined, VULKAN_HPP_NAMESPACE::ComponentMapping components_ = {}, VULKAN_HPP_NAMESPACE::ImageSubresourceRange subresourceRange_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , image{ image_ } , viewType{ viewType_ } , format{ format_ } , components{ components_ } , subresourceRange{ subresourceRange_ } { } VULKAN_HPP_CONSTEXPR ImageViewCreateInfo( ImageViewCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; ImageViewCreateInfo( VkImageViewCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT : ImageViewCreateInfo( *reinterpret_cast( &rhs ) ) { } ImageViewCreateInfo & operator=( ImageViewCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ImageViewCreateInfo & operator=( VkImageViewCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ImageViewCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageViewCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::ImageViewCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageViewCreateInfo & setImage( VULKAN_HPP_NAMESPACE::Image image_ ) VULKAN_HPP_NOEXCEPT { image = image_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageViewCreateInfo & setViewType( VULKAN_HPP_NAMESPACE::ImageViewType viewType_ ) VULKAN_HPP_NOEXCEPT { viewType = viewType_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageViewCreateInfo & setFormat( VULKAN_HPP_NAMESPACE::Format format_ ) VULKAN_HPP_NOEXCEPT { format = format_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageViewCreateInfo & setComponents( VULKAN_HPP_NAMESPACE::ComponentMapping const & components_ ) VULKAN_HPP_NOEXCEPT { components = components_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageViewCreateInfo & setSubresourceRange( VULKAN_HPP_NAMESPACE::ImageSubresourceRange const & subresourceRange_ ) VULKAN_HPP_NOEXCEPT { subresourceRange = subresourceRange_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkImageViewCreateInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkImageViewCreateInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, image, viewType, format, components, subresourceRange ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ImageViewCreateInfo const & ) const = default; #else bool operator==( ImageViewCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( image == rhs.image ) && ( viewType == rhs.viewType ) && ( format == rhs.format ) && ( components == rhs.components ) && ( subresourceRange == rhs.subresourceRange ); # endif } bool operator!=( ImageViewCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImageViewCreateInfo; const void * pNext = {}; VULKAN_HPP_NAMESPACE::ImageViewCreateFlags flags = {}; VULKAN_HPP_NAMESPACE::Image image = {}; VULKAN_HPP_NAMESPACE::ImageViewType viewType = VULKAN_HPP_NAMESPACE::ImageViewType::e1D; VULKAN_HPP_NAMESPACE::Format format = VULKAN_HPP_NAMESPACE::Format::eUndefined; VULKAN_HPP_NAMESPACE::ComponentMapping components = {}; VULKAN_HPP_NAMESPACE::ImageSubresourceRange subresourceRange = {}; }; template <> struct CppType { using Type = ImageViewCreateInfo; }; struct ImageViewHandleInfoNVX { using NativeType = VkImageViewHandleInfoNVX; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImageViewHandleInfoNVX; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ImageViewHandleInfoNVX( VULKAN_HPP_NAMESPACE::ImageView imageView_ = {}, VULKAN_HPP_NAMESPACE::DescriptorType descriptorType_ = VULKAN_HPP_NAMESPACE::DescriptorType::eSampler, VULKAN_HPP_NAMESPACE::Sampler sampler_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , imageView{ imageView_ } , descriptorType{ descriptorType_ } , sampler{ sampler_ } { } VULKAN_HPP_CONSTEXPR ImageViewHandleInfoNVX( ImageViewHandleInfoNVX const & rhs ) VULKAN_HPP_NOEXCEPT = default; ImageViewHandleInfoNVX( VkImageViewHandleInfoNVX const & rhs ) VULKAN_HPP_NOEXCEPT : ImageViewHandleInfoNVX( *reinterpret_cast( &rhs ) ) { } ImageViewHandleInfoNVX & operator=( ImageViewHandleInfoNVX const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ImageViewHandleInfoNVX & operator=( VkImageViewHandleInfoNVX const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ImageViewHandleInfoNVX & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageViewHandleInfoNVX & setImageView( VULKAN_HPP_NAMESPACE::ImageView imageView_ ) VULKAN_HPP_NOEXCEPT { imageView = imageView_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageViewHandleInfoNVX & setDescriptorType( VULKAN_HPP_NAMESPACE::DescriptorType descriptorType_ ) VULKAN_HPP_NOEXCEPT { descriptorType = descriptorType_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageViewHandleInfoNVX & setSampler( VULKAN_HPP_NAMESPACE::Sampler sampler_ ) VULKAN_HPP_NOEXCEPT { sampler = sampler_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkImageViewHandleInfoNVX const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkImageViewHandleInfoNVX &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, imageView, descriptorType, sampler ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ImageViewHandleInfoNVX const & ) const = default; #else bool operator==( ImageViewHandleInfoNVX const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( imageView == rhs.imageView ) && ( descriptorType == rhs.descriptorType ) && ( sampler == rhs.sampler ); # endif } bool operator!=( ImageViewHandleInfoNVX const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImageViewHandleInfoNVX; const void * pNext = {}; VULKAN_HPP_NAMESPACE::ImageView imageView = {}; VULKAN_HPP_NAMESPACE::DescriptorType descriptorType = VULKAN_HPP_NAMESPACE::DescriptorType::eSampler; VULKAN_HPP_NAMESPACE::Sampler sampler = {}; }; template <> struct CppType { using Type = ImageViewHandleInfoNVX; }; struct ImageViewMinLodCreateInfoEXT { using NativeType = VkImageViewMinLodCreateInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImageViewMinLodCreateInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ImageViewMinLodCreateInfoEXT( float minLod_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , minLod{ minLod_ } { } VULKAN_HPP_CONSTEXPR ImageViewMinLodCreateInfoEXT( ImageViewMinLodCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; ImageViewMinLodCreateInfoEXT( VkImageViewMinLodCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : ImageViewMinLodCreateInfoEXT( *reinterpret_cast( &rhs ) ) { } ImageViewMinLodCreateInfoEXT & operator=( ImageViewMinLodCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ImageViewMinLodCreateInfoEXT & operator=( VkImageViewMinLodCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ImageViewMinLodCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageViewMinLodCreateInfoEXT & setMinLod( float minLod_ ) VULKAN_HPP_NOEXCEPT { minLod = minLod_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkImageViewMinLodCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkImageViewMinLodCreateInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, minLod ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ImageViewMinLodCreateInfoEXT const & ) const = default; #else bool operator==( ImageViewMinLodCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( minLod == rhs.minLod ); # endif } bool operator!=( ImageViewMinLodCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImageViewMinLodCreateInfoEXT; const void * pNext = {}; float minLod = {}; }; template <> struct CppType { using Type = ImageViewMinLodCreateInfoEXT; }; struct ImageViewSampleWeightCreateInfoQCOM { using NativeType = VkImageViewSampleWeightCreateInfoQCOM; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImageViewSampleWeightCreateInfoQCOM; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ImageViewSampleWeightCreateInfoQCOM( VULKAN_HPP_NAMESPACE::Offset2D filterCenter_ = {}, VULKAN_HPP_NAMESPACE::Extent2D filterSize_ = {}, uint32_t numPhases_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , filterCenter{ filterCenter_ } , filterSize{ filterSize_ } , numPhases{ numPhases_ } { } VULKAN_HPP_CONSTEXPR ImageViewSampleWeightCreateInfoQCOM( ImageViewSampleWeightCreateInfoQCOM const & rhs ) VULKAN_HPP_NOEXCEPT = default; ImageViewSampleWeightCreateInfoQCOM( VkImageViewSampleWeightCreateInfoQCOM const & rhs ) VULKAN_HPP_NOEXCEPT : ImageViewSampleWeightCreateInfoQCOM( *reinterpret_cast( &rhs ) ) { } ImageViewSampleWeightCreateInfoQCOM & operator=( ImageViewSampleWeightCreateInfoQCOM const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ImageViewSampleWeightCreateInfoQCOM & operator=( VkImageViewSampleWeightCreateInfoQCOM const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ImageViewSampleWeightCreateInfoQCOM & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageViewSampleWeightCreateInfoQCOM & setFilterCenter( VULKAN_HPP_NAMESPACE::Offset2D const & filterCenter_ ) VULKAN_HPP_NOEXCEPT { filterCenter = filterCenter_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageViewSampleWeightCreateInfoQCOM & setFilterSize( VULKAN_HPP_NAMESPACE::Extent2D const & filterSize_ ) VULKAN_HPP_NOEXCEPT { filterSize = filterSize_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageViewSampleWeightCreateInfoQCOM & setNumPhases( uint32_t numPhases_ ) VULKAN_HPP_NOEXCEPT { numPhases = numPhases_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkImageViewSampleWeightCreateInfoQCOM const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkImageViewSampleWeightCreateInfoQCOM &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, filterCenter, filterSize, numPhases ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ImageViewSampleWeightCreateInfoQCOM const & ) const = default; #else bool operator==( ImageViewSampleWeightCreateInfoQCOM const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( filterCenter == rhs.filterCenter ) && ( filterSize == rhs.filterSize ) && ( numPhases == rhs.numPhases ); # endif } bool operator!=( ImageViewSampleWeightCreateInfoQCOM const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImageViewSampleWeightCreateInfoQCOM; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Offset2D filterCenter = {}; VULKAN_HPP_NAMESPACE::Extent2D filterSize = {}; uint32_t numPhases = {}; }; template <> struct CppType { using Type = ImageViewSampleWeightCreateInfoQCOM; }; struct ImageViewSlicedCreateInfoEXT { using NativeType = VkImageViewSlicedCreateInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImageViewSlicedCreateInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ImageViewSlicedCreateInfoEXT( uint32_t sliceOffset_ = {}, uint32_t sliceCount_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , sliceOffset{ sliceOffset_ } , sliceCount{ sliceCount_ } { } VULKAN_HPP_CONSTEXPR ImageViewSlicedCreateInfoEXT( ImageViewSlicedCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; ImageViewSlicedCreateInfoEXT( VkImageViewSlicedCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : ImageViewSlicedCreateInfoEXT( *reinterpret_cast( &rhs ) ) { } ImageViewSlicedCreateInfoEXT & operator=( ImageViewSlicedCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ImageViewSlicedCreateInfoEXT & operator=( VkImageViewSlicedCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ImageViewSlicedCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageViewSlicedCreateInfoEXT & setSliceOffset( uint32_t sliceOffset_ ) VULKAN_HPP_NOEXCEPT { sliceOffset = sliceOffset_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageViewSlicedCreateInfoEXT & setSliceCount( uint32_t sliceCount_ ) VULKAN_HPP_NOEXCEPT { sliceCount = sliceCount_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkImageViewSlicedCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkImageViewSlicedCreateInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, sliceOffset, sliceCount ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ImageViewSlicedCreateInfoEXT const & ) const = default; #else bool operator==( ImageViewSlicedCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( sliceOffset == rhs.sliceOffset ) && ( sliceCount == rhs.sliceCount ); # endif } bool operator!=( ImageViewSlicedCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImageViewSlicedCreateInfoEXT; const void * pNext = {}; uint32_t sliceOffset = {}; uint32_t sliceCount = {}; }; template <> struct CppType { using Type = ImageViewSlicedCreateInfoEXT; }; struct ImageViewUsageCreateInfo { using NativeType = VkImageViewUsageCreateInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImageViewUsageCreateInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ImageViewUsageCreateInfo( VULKAN_HPP_NAMESPACE::ImageUsageFlags usage_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , usage{ usage_ } { } VULKAN_HPP_CONSTEXPR ImageViewUsageCreateInfo( ImageViewUsageCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; ImageViewUsageCreateInfo( VkImageViewUsageCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT : ImageViewUsageCreateInfo( *reinterpret_cast( &rhs ) ) { } ImageViewUsageCreateInfo & operator=( ImageViewUsageCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ImageViewUsageCreateInfo & operator=( VkImageViewUsageCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ImageViewUsageCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImageViewUsageCreateInfo & setUsage( VULKAN_HPP_NAMESPACE::ImageUsageFlags usage_ ) VULKAN_HPP_NOEXCEPT { usage = usage_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkImageViewUsageCreateInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkImageViewUsageCreateInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, usage ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ImageViewUsageCreateInfo const & ) const = default; #else bool operator==( ImageViewUsageCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( usage == rhs.usage ); # endif } bool operator!=( ImageViewUsageCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImageViewUsageCreateInfo; const void * pNext = {}; VULKAN_HPP_NAMESPACE::ImageUsageFlags usage = {}; }; template <> struct CppType { using Type = ImageViewUsageCreateInfo; }; using ImageViewUsageCreateInfoKHR = ImageViewUsageCreateInfo; #if defined( VK_USE_PLATFORM_ANDROID_KHR ) struct ImportAndroidHardwareBufferInfoANDROID { using NativeType = VkImportAndroidHardwareBufferInfoANDROID; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImportAndroidHardwareBufferInfoANDROID; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ImportAndroidHardwareBufferInfoANDROID( struct AHardwareBuffer * buffer_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , buffer{ buffer_ } { } VULKAN_HPP_CONSTEXPR ImportAndroidHardwareBufferInfoANDROID( ImportAndroidHardwareBufferInfoANDROID const & rhs ) VULKAN_HPP_NOEXCEPT = default; ImportAndroidHardwareBufferInfoANDROID( VkImportAndroidHardwareBufferInfoANDROID const & rhs ) VULKAN_HPP_NOEXCEPT : ImportAndroidHardwareBufferInfoANDROID( *reinterpret_cast( &rhs ) ) { } ImportAndroidHardwareBufferInfoANDROID & operator=( ImportAndroidHardwareBufferInfoANDROID const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ImportAndroidHardwareBufferInfoANDROID & operator=( VkImportAndroidHardwareBufferInfoANDROID const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } # if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ImportAndroidHardwareBufferInfoANDROID & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImportAndroidHardwareBufferInfoANDROID & setBuffer( struct AHardwareBuffer * buffer_ ) VULKAN_HPP_NOEXCEPT { buffer = buffer_; return *this; } # endif /*VULKAN_HPP_NO_SETTERS*/ operator VkImportAndroidHardwareBufferInfoANDROID const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkImportAndroidHardwareBufferInfoANDROID &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, buffer ); } # endif # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ImportAndroidHardwareBufferInfoANDROID const & ) const = default; # else bool operator==( ImportAndroidHardwareBufferInfoANDROID const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( buffer == rhs.buffer ); # endif } bool operator!=( ImportAndroidHardwareBufferInfoANDROID const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } # endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImportAndroidHardwareBufferInfoANDROID; const void * pNext = {}; struct AHardwareBuffer * buffer = {}; }; template <> struct CppType { using Type = ImportAndroidHardwareBufferInfoANDROID; }; #endif /*VK_USE_PLATFORM_ANDROID_KHR*/ struct ImportFenceFdInfoKHR { using NativeType = VkImportFenceFdInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImportFenceFdInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ImportFenceFdInfoKHR( VULKAN_HPP_NAMESPACE::Fence fence_ = {}, VULKAN_HPP_NAMESPACE::FenceImportFlags flags_ = {}, VULKAN_HPP_NAMESPACE::ExternalFenceHandleTypeFlagBits handleType_ = VULKAN_HPP_NAMESPACE::ExternalFenceHandleTypeFlagBits::eOpaqueFd, int fd_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , fence{ fence_ } , flags{ flags_ } , handleType{ handleType_ } , fd{ fd_ } { } VULKAN_HPP_CONSTEXPR ImportFenceFdInfoKHR( ImportFenceFdInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; ImportFenceFdInfoKHR( VkImportFenceFdInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : ImportFenceFdInfoKHR( *reinterpret_cast( &rhs ) ) { } ImportFenceFdInfoKHR & operator=( ImportFenceFdInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ImportFenceFdInfoKHR & operator=( VkImportFenceFdInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ImportFenceFdInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImportFenceFdInfoKHR & setFence( VULKAN_HPP_NAMESPACE::Fence fence_ ) VULKAN_HPP_NOEXCEPT { fence = fence_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImportFenceFdInfoKHR & setFlags( VULKAN_HPP_NAMESPACE::FenceImportFlags flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImportFenceFdInfoKHR & setHandleType( VULKAN_HPP_NAMESPACE::ExternalFenceHandleTypeFlagBits handleType_ ) VULKAN_HPP_NOEXCEPT { handleType = handleType_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImportFenceFdInfoKHR & setFd( int fd_ ) VULKAN_HPP_NOEXCEPT { fd = fd_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkImportFenceFdInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkImportFenceFdInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, fence, flags, handleType, fd ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ImportFenceFdInfoKHR const & ) const = default; #else bool operator==( ImportFenceFdInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( fence == rhs.fence ) && ( flags == rhs.flags ) && ( handleType == rhs.handleType ) && ( fd == rhs.fd ); # endif } bool operator!=( ImportFenceFdInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImportFenceFdInfoKHR; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Fence fence = {}; VULKAN_HPP_NAMESPACE::FenceImportFlags flags = {}; VULKAN_HPP_NAMESPACE::ExternalFenceHandleTypeFlagBits handleType = VULKAN_HPP_NAMESPACE::ExternalFenceHandleTypeFlagBits::eOpaqueFd; int fd = {}; }; template <> struct CppType { using Type = ImportFenceFdInfoKHR; }; #if defined( VK_USE_PLATFORM_WIN32_KHR ) struct ImportFenceWin32HandleInfoKHR { using NativeType = VkImportFenceWin32HandleInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImportFenceWin32HandleInfoKHR; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ImportFenceWin32HandleInfoKHR( VULKAN_HPP_NAMESPACE::Fence fence_ = {}, VULKAN_HPP_NAMESPACE::FenceImportFlags flags_ = {}, VULKAN_HPP_NAMESPACE::ExternalFenceHandleTypeFlagBits handleType_ = VULKAN_HPP_NAMESPACE::ExternalFenceHandleTypeFlagBits::eOpaqueFd, HANDLE handle_ = {}, LPCWSTR name_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , fence{ fence_ } , flags{ flags_ } , handleType{ handleType_ } , handle{ handle_ } , name{ name_ } { } VULKAN_HPP_CONSTEXPR ImportFenceWin32HandleInfoKHR( ImportFenceWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; ImportFenceWin32HandleInfoKHR( VkImportFenceWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : ImportFenceWin32HandleInfoKHR( *reinterpret_cast( &rhs ) ) { } ImportFenceWin32HandleInfoKHR & operator=( ImportFenceWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ImportFenceWin32HandleInfoKHR & operator=( VkImportFenceWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } # if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ImportFenceWin32HandleInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImportFenceWin32HandleInfoKHR & setFence( VULKAN_HPP_NAMESPACE::Fence fence_ ) VULKAN_HPP_NOEXCEPT { fence = fence_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImportFenceWin32HandleInfoKHR & setFlags( VULKAN_HPP_NAMESPACE::FenceImportFlags flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImportFenceWin32HandleInfoKHR & setHandleType( VULKAN_HPP_NAMESPACE::ExternalFenceHandleTypeFlagBits handleType_ ) VULKAN_HPP_NOEXCEPT { handleType = handleType_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImportFenceWin32HandleInfoKHR & setHandle( HANDLE handle_ ) VULKAN_HPP_NOEXCEPT { handle = handle_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImportFenceWin32HandleInfoKHR & setName( LPCWSTR name_ ) VULKAN_HPP_NOEXCEPT { name = name_; return *this; } # endif /*VULKAN_HPP_NO_SETTERS*/ operator VkImportFenceWin32HandleInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkImportFenceWin32HandleInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, fence, flags, handleType, handle, name ); } # endif # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ImportFenceWin32HandleInfoKHR const & ) const = default; # else bool operator==( ImportFenceWin32HandleInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( fence == rhs.fence ) && ( flags == rhs.flags ) && ( handleType == rhs.handleType ) && ( handle == rhs.handle ) && ( name == rhs.name ); # endif } bool operator!=( ImportFenceWin32HandleInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } # endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImportFenceWin32HandleInfoKHR; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Fence fence = {}; VULKAN_HPP_NAMESPACE::FenceImportFlags flags = {}; VULKAN_HPP_NAMESPACE::ExternalFenceHandleTypeFlagBits handleType = VULKAN_HPP_NAMESPACE::ExternalFenceHandleTypeFlagBits::eOpaqueFd; HANDLE handle = {}; LPCWSTR name = {}; }; template <> struct CppType { using Type = ImportFenceWin32HandleInfoKHR; }; #endif /*VK_USE_PLATFORM_WIN32_KHR*/ #if defined( VK_USE_PLATFORM_FUCHSIA ) struct ImportMemoryBufferCollectionFUCHSIA { using NativeType = VkImportMemoryBufferCollectionFUCHSIA; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImportMemoryBufferCollectionFUCHSIA; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ImportMemoryBufferCollectionFUCHSIA( VULKAN_HPP_NAMESPACE::BufferCollectionFUCHSIA collection_ = {}, uint32_t index_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , collection{ collection_ } , index{ index_ } { } VULKAN_HPP_CONSTEXPR ImportMemoryBufferCollectionFUCHSIA( ImportMemoryBufferCollectionFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT = default; ImportMemoryBufferCollectionFUCHSIA( VkImportMemoryBufferCollectionFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT : ImportMemoryBufferCollectionFUCHSIA( *reinterpret_cast( &rhs ) ) { } ImportMemoryBufferCollectionFUCHSIA & operator=( ImportMemoryBufferCollectionFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ImportMemoryBufferCollectionFUCHSIA & operator=( VkImportMemoryBufferCollectionFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } # if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ImportMemoryBufferCollectionFUCHSIA & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImportMemoryBufferCollectionFUCHSIA & setCollection( VULKAN_HPP_NAMESPACE::BufferCollectionFUCHSIA collection_ ) VULKAN_HPP_NOEXCEPT { collection = collection_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImportMemoryBufferCollectionFUCHSIA & setIndex( uint32_t index_ ) VULKAN_HPP_NOEXCEPT { index = index_; return *this; } # endif /*VULKAN_HPP_NO_SETTERS*/ operator VkImportMemoryBufferCollectionFUCHSIA const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkImportMemoryBufferCollectionFUCHSIA &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, collection, index ); } # endif # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ImportMemoryBufferCollectionFUCHSIA const & ) const = default; # else bool operator==( ImportMemoryBufferCollectionFUCHSIA const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( collection == rhs.collection ) && ( index == rhs.index ); # endif } bool operator!=( ImportMemoryBufferCollectionFUCHSIA const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } # endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImportMemoryBufferCollectionFUCHSIA; const void * pNext = {}; VULKAN_HPP_NAMESPACE::BufferCollectionFUCHSIA collection = {}; uint32_t index = {}; }; template <> struct CppType { using Type = ImportMemoryBufferCollectionFUCHSIA; }; #endif /*VK_USE_PLATFORM_FUCHSIA*/ struct ImportMemoryFdInfoKHR { using NativeType = VkImportMemoryFdInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImportMemoryFdInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ImportMemoryFdInfoKHR( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType_ = VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits::eOpaqueFd, int fd_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , handleType{ handleType_ } , fd{ fd_ } { } VULKAN_HPP_CONSTEXPR ImportMemoryFdInfoKHR( ImportMemoryFdInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; ImportMemoryFdInfoKHR( VkImportMemoryFdInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : ImportMemoryFdInfoKHR( *reinterpret_cast( &rhs ) ) { } ImportMemoryFdInfoKHR & operator=( ImportMemoryFdInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ImportMemoryFdInfoKHR & operator=( VkImportMemoryFdInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ImportMemoryFdInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImportMemoryFdInfoKHR & setHandleType( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType_ ) VULKAN_HPP_NOEXCEPT { handleType = handleType_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImportMemoryFdInfoKHR & setFd( int fd_ ) VULKAN_HPP_NOEXCEPT { fd = fd_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkImportMemoryFdInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkImportMemoryFdInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, handleType, fd ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ImportMemoryFdInfoKHR const & ) const = default; #else bool operator==( ImportMemoryFdInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( handleType == rhs.handleType ) && ( fd == rhs.fd ); # endif } bool operator!=( ImportMemoryFdInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImportMemoryFdInfoKHR; const void * pNext = {}; VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType = VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits::eOpaqueFd; int fd = {}; }; template <> struct CppType { using Type = ImportMemoryFdInfoKHR; }; struct ImportMemoryHostPointerInfoEXT { using NativeType = VkImportMemoryHostPointerInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImportMemoryHostPointerInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ImportMemoryHostPointerInfoEXT( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType_ = VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits::eOpaqueFd, void * pHostPointer_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , handleType{ handleType_ } , pHostPointer{ pHostPointer_ } { } VULKAN_HPP_CONSTEXPR ImportMemoryHostPointerInfoEXT( ImportMemoryHostPointerInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; ImportMemoryHostPointerInfoEXT( VkImportMemoryHostPointerInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : ImportMemoryHostPointerInfoEXT( *reinterpret_cast( &rhs ) ) { } ImportMemoryHostPointerInfoEXT & operator=( ImportMemoryHostPointerInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ImportMemoryHostPointerInfoEXT & operator=( VkImportMemoryHostPointerInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ImportMemoryHostPointerInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImportMemoryHostPointerInfoEXT & setHandleType( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType_ ) VULKAN_HPP_NOEXCEPT { handleType = handleType_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImportMemoryHostPointerInfoEXT & setPHostPointer( void * pHostPointer_ ) VULKAN_HPP_NOEXCEPT { pHostPointer = pHostPointer_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkImportMemoryHostPointerInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkImportMemoryHostPointerInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std:: tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, handleType, pHostPointer ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ImportMemoryHostPointerInfoEXT const & ) const = default; #else bool operator==( ImportMemoryHostPointerInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( handleType == rhs.handleType ) && ( pHostPointer == rhs.pHostPointer ); # endif } bool operator!=( ImportMemoryHostPointerInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImportMemoryHostPointerInfoEXT; const void * pNext = {}; VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType = VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits::eOpaqueFd; void * pHostPointer = {}; }; template <> struct CppType { using Type = ImportMemoryHostPointerInfoEXT; }; #if defined( VK_USE_PLATFORM_METAL_EXT ) struct ImportMemoryMetalHandleInfoEXT { using NativeType = VkImportMemoryMetalHandleInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImportMemoryMetalHandleInfoEXT; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ImportMemoryMetalHandleInfoEXT( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType_ = VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits::eOpaqueFd, void * handle_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , handleType{ handleType_ } , handle{ handle_ } { } VULKAN_HPP_CONSTEXPR ImportMemoryMetalHandleInfoEXT( ImportMemoryMetalHandleInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; ImportMemoryMetalHandleInfoEXT( VkImportMemoryMetalHandleInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : ImportMemoryMetalHandleInfoEXT( *reinterpret_cast( &rhs ) ) { } ImportMemoryMetalHandleInfoEXT & operator=( ImportMemoryMetalHandleInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ImportMemoryMetalHandleInfoEXT & operator=( VkImportMemoryMetalHandleInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } # if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ImportMemoryMetalHandleInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImportMemoryMetalHandleInfoEXT & setHandleType( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType_ ) VULKAN_HPP_NOEXCEPT { handleType = handleType_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImportMemoryMetalHandleInfoEXT & setHandle( void * handle_ ) VULKAN_HPP_NOEXCEPT { handle = handle_; return *this; } # endif /*VULKAN_HPP_NO_SETTERS*/ operator VkImportMemoryMetalHandleInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkImportMemoryMetalHandleInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std:: tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, handleType, handle ); } # endif # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ImportMemoryMetalHandleInfoEXT const & ) const = default; # else bool operator==( ImportMemoryMetalHandleInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( handleType == rhs.handleType ) && ( handle == rhs.handle ); # endif } bool operator!=( ImportMemoryMetalHandleInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } # endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImportMemoryMetalHandleInfoEXT; const void * pNext = {}; VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType = VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits::eOpaqueFd; void * handle = {}; }; template <> struct CppType { using Type = ImportMemoryMetalHandleInfoEXT; }; #endif /*VK_USE_PLATFORM_METAL_EXT*/ #if defined( VK_USE_PLATFORM_WIN32_KHR ) struct ImportMemoryWin32HandleInfoKHR { using NativeType = VkImportMemoryWin32HandleInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImportMemoryWin32HandleInfoKHR; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ImportMemoryWin32HandleInfoKHR( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType_ = VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits::eOpaqueFd, HANDLE handle_ = {}, LPCWSTR name_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , handleType{ handleType_ } , handle{ handle_ } , name{ name_ } { } VULKAN_HPP_CONSTEXPR ImportMemoryWin32HandleInfoKHR( ImportMemoryWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; ImportMemoryWin32HandleInfoKHR( VkImportMemoryWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : ImportMemoryWin32HandleInfoKHR( *reinterpret_cast( &rhs ) ) { } ImportMemoryWin32HandleInfoKHR & operator=( ImportMemoryWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ImportMemoryWin32HandleInfoKHR & operator=( VkImportMemoryWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } # if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ImportMemoryWin32HandleInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImportMemoryWin32HandleInfoKHR & setHandleType( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType_ ) VULKAN_HPP_NOEXCEPT { handleType = handleType_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImportMemoryWin32HandleInfoKHR & setHandle( HANDLE handle_ ) VULKAN_HPP_NOEXCEPT { handle = handle_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImportMemoryWin32HandleInfoKHR & setName( LPCWSTR name_ ) VULKAN_HPP_NOEXCEPT { name = name_; return *this; } # endif /*VULKAN_HPP_NO_SETTERS*/ operator VkImportMemoryWin32HandleInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkImportMemoryWin32HandleInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, handleType, handle, name ); } # endif # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ImportMemoryWin32HandleInfoKHR const & ) const = default; # else bool operator==( ImportMemoryWin32HandleInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( handleType == rhs.handleType ) && ( handle == rhs.handle ) && ( name == rhs.name ); # endif } bool operator!=( ImportMemoryWin32HandleInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } # endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImportMemoryWin32HandleInfoKHR; const void * pNext = {}; VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType = VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits::eOpaqueFd; HANDLE handle = {}; LPCWSTR name = {}; }; template <> struct CppType { using Type = ImportMemoryWin32HandleInfoKHR; }; #endif /*VK_USE_PLATFORM_WIN32_KHR*/ #if defined( VK_USE_PLATFORM_WIN32_KHR ) struct ImportMemoryWin32HandleInfoNV { using NativeType = VkImportMemoryWin32HandleInfoNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImportMemoryWin32HandleInfoNV; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ImportMemoryWin32HandleInfoNV( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagsNV handleType_ = {}, HANDLE handle_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , handleType{ handleType_ } , handle{ handle_ } { } VULKAN_HPP_CONSTEXPR ImportMemoryWin32HandleInfoNV( ImportMemoryWin32HandleInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; ImportMemoryWin32HandleInfoNV( VkImportMemoryWin32HandleInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT : ImportMemoryWin32HandleInfoNV( *reinterpret_cast( &rhs ) ) { } ImportMemoryWin32HandleInfoNV & operator=( ImportMemoryWin32HandleInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ImportMemoryWin32HandleInfoNV & operator=( VkImportMemoryWin32HandleInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } # if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ImportMemoryWin32HandleInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImportMemoryWin32HandleInfoNV & setHandleType( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagsNV handleType_ ) VULKAN_HPP_NOEXCEPT { handleType = handleType_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImportMemoryWin32HandleInfoNV & setHandle( HANDLE handle_ ) VULKAN_HPP_NOEXCEPT { handle = handle_; return *this; } # endif /*VULKAN_HPP_NO_SETTERS*/ operator VkImportMemoryWin32HandleInfoNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkImportMemoryWin32HandleInfoNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, handleType, handle ); } # endif # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ImportMemoryWin32HandleInfoNV const & ) const = default; # else bool operator==( ImportMemoryWin32HandleInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( handleType == rhs.handleType ) && ( handle == rhs.handle ); # endif } bool operator!=( ImportMemoryWin32HandleInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } # endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImportMemoryWin32HandleInfoNV; const void * pNext = {}; VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagsNV handleType = {}; HANDLE handle = {}; }; template <> struct CppType { using Type = ImportMemoryWin32HandleInfoNV; }; #endif /*VK_USE_PLATFORM_WIN32_KHR*/ #if defined( VK_USE_PLATFORM_FUCHSIA ) struct ImportMemoryZirconHandleInfoFUCHSIA { using NativeType = VkImportMemoryZirconHandleInfoFUCHSIA; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImportMemoryZirconHandleInfoFUCHSIA; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ImportMemoryZirconHandleInfoFUCHSIA( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType_ = VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits::eOpaqueFd, zx_handle_t handle_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , handleType{ handleType_ } , handle{ handle_ } { } VULKAN_HPP_CONSTEXPR ImportMemoryZirconHandleInfoFUCHSIA( ImportMemoryZirconHandleInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT = default; ImportMemoryZirconHandleInfoFUCHSIA( VkImportMemoryZirconHandleInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT : ImportMemoryZirconHandleInfoFUCHSIA( *reinterpret_cast( &rhs ) ) { } ImportMemoryZirconHandleInfoFUCHSIA & operator=( ImportMemoryZirconHandleInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ImportMemoryZirconHandleInfoFUCHSIA & operator=( VkImportMemoryZirconHandleInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } # if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ImportMemoryZirconHandleInfoFUCHSIA & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImportMemoryZirconHandleInfoFUCHSIA & setHandleType( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType_ ) VULKAN_HPP_NOEXCEPT { handleType = handleType_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImportMemoryZirconHandleInfoFUCHSIA & setHandle( zx_handle_t handle_ ) VULKAN_HPP_NOEXCEPT { handle = handle_; return *this; } # endif /*VULKAN_HPP_NO_SETTERS*/ operator VkImportMemoryZirconHandleInfoFUCHSIA const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkImportMemoryZirconHandleInfoFUCHSIA &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, handleType, handle ); } # endif # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) std::strong_ordering operator<=>( ImportMemoryZirconHandleInfoFUCHSIA const & rhs ) const VULKAN_HPP_NOEXCEPT { if ( auto cmp = sType <=> rhs.sType; cmp != 0 ) return cmp; if ( auto cmp = pNext <=> rhs.pNext; cmp != 0 ) return cmp; if ( auto cmp = handleType <=> rhs.handleType; cmp != 0 ) return cmp; if ( auto cmp = memcmp( &handle, &rhs.handle, sizeof( zx_handle_t ) ); cmp != 0 ) return ( cmp < 0 ) ? std::strong_ordering::less : std::strong_ordering::greater; return std::strong_ordering::equivalent; } # endif bool operator==( ImportMemoryZirconHandleInfoFUCHSIA const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( handleType == rhs.handleType ) && ( memcmp( &handle, &rhs.handle, sizeof( zx_handle_t ) ) == 0 ); } bool operator!=( ImportMemoryZirconHandleInfoFUCHSIA const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImportMemoryZirconHandleInfoFUCHSIA; const void * pNext = {}; VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType = VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits::eOpaqueFd; zx_handle_t handle = {}; }; template <> struct CppType { using Type = ImportMemoryZirconHandleInfoFUCHSIA; }; #endif /*VK_USE_PLATFORM_FUCHSIA*/ #if defined( VK_USE_PLATFORM_METAL_EXT ) struct ImportMetalBufferInfoEXT { using NativeType = VkImportMetalBufferInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImportMetalBufferInfoEXT; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ImportMetalBufferInfoEXT( MTLBuffer_id mtlBuffer_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , mtlBuffer{ mtlBuffer_ } { } VULKAN_HPP_CONSTEXPR ImportMetalBufferInfoEXT( ImportMetalBufferInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; ImportMetalBufferInfoEXT( VkImportMetalBufferInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : ImportMetalBufferInfoEXT( *reinterpret_cast( &rhs ) ) { } ImportMetalBufferInfoEXT & operator=( ImportMetalBufferInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ImportMetalBufferInfoEXT & operator=( VkImportMetalBufferInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } # if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ImportMetalBufferInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImportMetalBufferInfoEXT & setMtlBuffer( MTLBuffer_id mtlBuffer_ ) VULKAN_HPP_NOEXCEPT { mtlBuffer = mtlBuffer_; return *this; } # endif /*VULKAN_HPP_NO_SETTERS*/ operator VkImportMetalBufferInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkImportMetalBufferInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, mtlBuffer ); } # endif # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ImportMetalBufferInfoEXT const & ) const = default; # else bool operator==( ImportMetalBufferInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( mtlBuffer == rhs.mtlBuffer ); # endif } bool operator!=( ImportMetalBufferInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } # endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImportMetalBufferInfoEXT; const void * pNext = {}; MTLBuffer_id mtlBuffer = {}; }; template <> struct CppType { using Type = ImportMetalBufferInfoEXT; }; #endif /*VK_USE_PLATFORM_METAL_EXT*/ #if defined( VK_USE_PLATFORM_METAL_EXT ) struct ImportMetalIOSurfaceInfoEXT { using NativeType = VkImportMetalIOSurfaceInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImportMetalIoSurfaceInfoEXT; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ImportMetalIOSurfaceInfoEXT( IOSurfaceRef ioSurface_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , ioSurface{ ioSurface_ } { } VULKAN_HPP_CONSTEXPR ImportMetalIOSurfaceInfoEXT( ImportMetalIOSurfaceInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; ImportMetalIOSurfaceInfoEXT( VkImportMetalIOSurfaceInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : ImportMetalIOSurfaceInfoEXT( *reinterpret_cast( &rhs ) ) { } ImportMetalIOSurfaceInfoEXT & operator=( ImportMetalIOSurfaceInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ImportMetalIOSurfaceInfoEXT & operator=( VkImportMetalIOSurfaceInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } # if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ImportMetalIOSurfaceInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImportMetalIOSurfaceInfoEXT & setIoSurface( IOSurfaceRef ioSurface_ ) VULKAN_HPP_NOEXCEPT { ioSurface = ioSurface_; return *this; } # endif /*VULKAN_HPP_NO_SETTERS*/ operator VkImportMetalIOSurfaceInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkImportMetalIOSurfaceInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, ioSurface ); } # endif # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ImportMetalIOSurfaceInfoEXT const & ) const = default; # else bool operator==( ImportMetalIOSurfaceInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( ioSurface == rhs.ioSurface ); # endif } bool operator!=( ImportMetalIOSurfaceInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } # endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImportMetalIoSurfaceInfoEXT; const void * pNext = {}; IOSurfaceRef ioSurface = {}; }; template <> struct CppType { using Type = ImportMetalIOSurfaceInfoEXT; }; #endif /*VK_USE_PLATFORM_METAL_EXT*/ #if defined( VK_USE_PLATFORM_METAL_EXT ) struct ImportMetalSharedEventInfoEXT { using NativeType = VkImportMetalSharedEventInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImportMetalSharedEventInfoEXT; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ImportMetalSharedEventInfoEXT( MTLSharedEvent_id mtlSharedEvent_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , mtlSharedEvent{ mtlSharedEvent_ } { } VULKAN_HPP_CONSTEXPR ImportMetalSharedEventInfoEXT( ImportMetalSharedEventInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; ImportMetalSharedEventInfoEXT( VkImportMetalSharedEventInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : ImportMetalSharedEventInfoEXT( *reinterpret_cast( &rhs ) ) { } ImportMetalSharedEventInfoEXT & operator=( ImportMetalSharedEventInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ImportMetalSharedEventInfoEXT & operator=( VkImportMetalSharedEventInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } # if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ImportMetalSharedEventInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImportMetalSharedEventInfoEXT & setMtlSharedEvent( MTLSharedEvent_id mtlSharedEvent_ ) VULKAN_HPP_NOEXCEPT { mtlSharedEvent = mtlSharedEvent_; return *this; } # endif /*VULKAN_HPP_NO_SETTERS*/ operator VkImportMetalSharedEventInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkImportMetalSharedEventInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, mtlSharedEvent ); } # endif # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ImportMetalSharedEventInfoEXT const & ) const = default; # else bool operator==( ImportMetalSharedEventInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( mtlSharedEvent == rhs.mtlSharedEvent ); # endif } bool operator!=( ImportMetalSharedEventInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } # endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImportMetalSharedEventInfoEXT; const void * pNext = {}; MTLSharedEvent_id mtlSharedEvent = {}; }; template <> struct CppType { using Type = ImportMetalSharedEventInfoEXT; }; #endif /*VK_USE_PLATFORM_METAL_EXT*/ #if defined( VK_USE_PLATFORM_METAL_EXT ) struct ImportMetalTextureInfoEXT { using NativeType = VkImportMetalTextureInfoEXT; static const bool allowDuplicate = true; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImportMetalTextureInfoEXT; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ImportMetalTextureInfoEXT( VULKAN_HPP_NAMESPACE::ImageAspectFlagBits plane_ = VULKAN_HPP_NAMESPACE::ImageAspectFlagBits::eColor, MTLTexture_id mtlTexture_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , plane{ plane_ } , mtlTexture{ mtlTexture_ } { } VULKAN_HPP_CONSTEXPR ImportMetalTextureInfoEXT( ImportMetalTextureInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; ImportMetalTextureInfoEXT( VkImportMetalTextureInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : ImportMetalTextureInfoEXT( *reinterpret_cast( &rhs ) ) { } ImportMetalTextureInfoEXT & operator=( ImportMetalTextureInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ImportMetalTextureInfoEXT & operator=( VkImportMetalTextureInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } # if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ImportMetalTextureInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImportMetalTextureInfoEXT & setPlane( VULKAN_HPP_NAMESPACE::ImageAspectFlagBits plane_ ) VULKAN_HPP_NOEXCEPT { plane = plane_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImportMetalTextureInfoEXT & setMtlTexture( MTLTexture_id mtlTexture_ ) VULKAN_HPP_NOEXCEPT { mtlTexture = mtlTexture_; return *this; } # endif /*VULKAN_HPP_NO_SETTERS*/ operator VkImportMetalTextureInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkImportMetalTextureInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, plane, mtlTexture ); } # endif # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ImportMetalTextureInfoEXT const & ) const = default; # else bool operator==( ImportMetalTextureInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( plane == rhs.plane ) && ( mtlTexture == rhs.mtlTexture ); # endif } bool operator!=( ImportMetalTextureInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } # endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImportMetalTextureInfoEXT; const void * pNext = {}; VULKAN_HPP_NAMESPACE::ImageAspectFlagBits plane = VULKAN_HPP_NAMESPACE::ImageAspectFlagBits::eColor; MTLTexture_id mtlTexture = {}; }; template <> struct CppType { using Type = ImportMetalTextureInfoEXT; }; #endif /*VK_USE_PLATFORM_METAL_EXT*/ #if defined( VK_USE_PLATFORM_SCREEN_QNX ) struct ImportScreenBufferInfoQNX { using NativeType = VkImportScreenBufferInfoQNX; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImportScreenBufferInfoQNX; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ImportScreenBufferInfoQNX( struct _screen_buffer * buffer_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , buffer{ buffer_ } { } VULKAN_HPP_CONSTEXPR ImportScreenBufferInfoQNX( ImportScreenBufferInfoQNX const & rhs ) VULKAN_HPP_NOEXCEPT = default; ImportScreenBufferInfoQNX( VkImportScreenBufferInfoQNX const & rhs ) VULKAN_HPP_NOEXCEPT : ImportScreenBufferInfoQNX( *reinterpret_cast( &rhs ) ) { } ImportScreenBufferInfoQNX & operator=( ImportScreenBufferInfoQNX const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ImportScreenBufferInfoQNX & operator=( VkImportScreenBufferInfoQNX const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } # if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ImportScreenBufferInfoQNX & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImportScreenBufferInfoQNX & setBuffer( struct _screen_buffer * buffer_ ) VULKAN_HPP_NOEXCEPT { buffer = buffer_; return *this; } # endif /*VULKAN_HPP_NO_SETTERS*/ operator VkImportScreenBufferInfoQNX const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkImportScreenBufferInfoQNX &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, buffer ); } # endif # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ImportScreenBufferInfoQNX const & ) const = default; # else bool operator==( ImportScreenBufferInfoQNX const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( buffer == rhs.buffer ); # endif } bool operator!=( ImportScreenBufferInfoQNX const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } # endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImportScreenBufferInfoQNX; const void * pNext = {}; struct _screen_buffer * buffer = {}; }; template <> struct CppType { using Type = ImportScreenBufferInfoQNX; }; #endif /*VK_USE_PLATFORM_SCREEN_QNX*/ struct ImportSemaphoreFdInfoKHR { using NativeType = VkImportSemaphoreFdInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImportSemaphoreFdInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ImportSemaphoreFdInfoKHR( VULKAN_HPP_NAMESPACE::Semaphore semaphore_ = {}, VULKAN_HPP_NAMESPACE::SemaphoreImportFlags flags_ = {}, VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlagBits handleType_ = VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlagBits::eOpaqueFd, int fd_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , semaphore{ semaphore_ } , flags{ flags_ } , handleType{ handleType_ } , fd{ fd_ } { } VULKAN_HPP_CONSTEXPR ImportSemaphoreFdInfoKHR( ImportSemaphoreFdInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; ImportSemaphoreFdInfoKHR( VkImportSemaphoreFdInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : ImportSemaphoreFdInfoKHR( *reinterpret_cast( &rhs ) ) { } ImportSemaphoreFdInfoKHR & operator=( ImportSemaphoreFdInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ImportSemaphoreFdInfoKHR & operator=( VkImportSemaphoreFdInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ImportSemaphoreFdInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImportSemaphoreFdInfoKHR & setSemaphore( VULKAN_HPP_NAMESPACE::Semaphore semaphore_ ) VULKAN_HPP_NOEXCEPT { semaphore = semaphore_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImportSemaphoreFdInfoKHR & setFlags( VULKAN_HPP_NAMESPACE::SemaphoreImportFlags flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImportSemaphoreFdInfoKHR & setHandleType( VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlagBits handleType_ ) VULKAN_HPP_NOEXCEPT { handleType = handleType_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImportSemaphoreFdInfoKHR & setFd( int fd_ ) VULKAN_HPP_NOEXCEPT { fd = fd_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkImportSemaphoreFdInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkImportSemaphoreFdInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, semaphore, flags, handleType, fd ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ImportSemaphoreFdInfoKHR const & ) const = default; #else bool operator==( ImportSemaphoreFdInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( semaphore == rhs.semaphore ) && ( flags == rhs.flags ) && ( handleType == rhs.handleType ) && ( fd == rhs.fd ); # endif } bool operator!=( ImportSemaphoreFdInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImportSemaphoreFdInfoKHR; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Semaphore semaphore = {}; VULKAN_HPP_NAMESPACE::SemaphoreImportFlags flags = {}; VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlagBits handleType = VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlagBits::eOpaqueFd; int fd = {}; }; template <> struct CppType { using Type = ImportSemaphoreFdInfoKHR; }; #if defined( VK_USE_PLATFORM_WIN32_KHR ) struct ImportSemaphoreWin32HandleInfoKHR { using NativeType = VkImportSemaphoreWin32HandleInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImportSemaphoreWin32HandleInfoKHR; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ImportSemaphoreWin32HandleInfoKHR( VULKAN_HPP_NAMESPACE::Semaphore semaphore_ = {}, VULKAN_HPP_NAMESPACE::SemaphoreImportFlags flags_ = {}, VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlagBits handleType_ = VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlagBits::eOpaqueFd, HANDLE handle_ = {}, LPCWSTR name_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , semaphore{ semaphore_ } , flags{ flags_ } , handleType{ handleType_ } , handle{ handle_ } , name{ name_ } { } VULKAN_HPP_CONSTEXPR ImportSemaphoreWin32HandleInfoKHR( ImportSemaphoreWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; ImportSemaphoreWin32HandleInfoKHR( VkImportSemaphoreWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : ImportSemaphoreWin32HandleInfoKHR( *reinterpret_cast( &rhs ) ) { } ImportSemaphoreWin32HandleInfoKHR & operator=( ImportSemaphoreWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ImportSemaphoreWin32HandleInfoKHR & operator=( VkImportSemaphoreWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } # if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ImportSemaphoreWin32HandleInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImportSemaphoreWin32HandleInfoKHR & setSemaphore( VULKAN_HPP_NAMESPACE::Semaphore semaphore_ ) VULKAN_HPP_NOEXCEPT { semaphore = semaphore_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImportSemaphoreWin32HandleInfoKHR & setFlags( VULKAN_HPP_NAMESPACE::SemaphoreImportFlags flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImportSemaphoreWin32HandleInfoKHR & setHandleType( VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlagBits handleType_ ) VULKAN_HPP_NOEXCEPT { handleType = handleType_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImportSemaphoreWin32HandleInfoKHR & setHandle( HANDLE handle_ ) VULKAN_HPP_NOEXCEPT { handle = handle_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImportSemaphoreWin32HandleInfoKHR & setName( LPCWSTR name_ ) VULKAN_HPP_NOEXCEPT { name = name_; return *this; } # endif /*VULKAN_HPP_NO_SETTERS*/ operator VkImportSemaphoreWin32HandleInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkImportSemaphoreWin32HandleInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, semaphore, flags, handleType, handle, name ); } # endif # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ImportSemaphoreWin32HandleInfoKHR const & ) const = default; # else bool operator==( ImportSemaphoreWin32HandleInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( semaphore == rhs.semaphore ) && ( flags == rhs.flags ) && ( handleType == rhs.handleType ) && ( handle == rhs.handle ) && ( name == rhs.name ); # endif } bool operator!=( ImportSemaphoreWin32HandleInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } # endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImportSemaphoreWin32HandleInfoKHR; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Semaphore semaphore = {}; VULKAN_HPP_NAMESPACE::SemaphoreImportFlags flags = {}; VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlagBits handleType = VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlagBits::eOpaqueFd; HANDLE handle = {}; LPCWSTR name = {}; }; template <> struct CppType { using Type = ImportSemaphoreWin32HandleInfoKHR; }; #endif /*VK_USE_PLATFORM_WIN32_KHR*/ #if defined( VK_USE_PLATFORM_FUCHSIA ) struct ImportSemaphoreZirconHandleInfoFUCHSIA { using NativeType = VkImportSemaphoreZirconHandleInfoFUCHSIA; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eImportSemaphoreZirconHandleInfoFUCHSIA; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ImportSemaphoreZirconHandleInfoFUCHSIA( VULKAN_HPP_NAMESPACE::Semaphore semaphore_ = {}, VULKAN_HPP_NAMESPACE::SemaphoreImportFlags flags_ = {}, VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlagBits handleType_ = VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlagBits::eOpaqueFd, zx_handle_t zirconHandle_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , semaphore{ semaphore_ } , flags{ flags_ } , handleType{ handleType_ } , zirconHandle{ zirconHandle_ } { } VULKAN_HPP_CONSTEXPR ImportSemaphoreZirconHandleInfoFUCHSIA( ImportSemaphoreZirconHandleInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT = default; ImportSemaphoreZirconHandleInfoFUCHSIA( VkImportSemaphoreZirconHandleInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT : ImportSemaphoreZirconHandleInfoFUCHSIA( *reinterpret_cast( &rhs ) ) { } ImportSemaphoreZirconHandleInfoFUCHSIA & operator=( ImportSemaphoreZirconHandleInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ImportSemaphoreZirconHandleInfoFUCHSIA & operator=( VkImportSemaphoreZirconHandleInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } # if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ImportSemaphoreZirconHandleInfoFUCHSIA & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImportSemaphoreZirconHandleInfoFUCHSIA & setSemaphore( VULKAN_HPP_NAMESPACE::Semaphore semaphore_ ) VULKAN_HPP_NOEXCEPT { semaphore = semaphore_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImportSemaphoreZirconHandleInfoFUCHSIA & setFlags( VULKAN_HPP_NAMESPACE::SemaphoreImportFlags flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImportSemaphoreZirconHandleInfoFUCHSIA & setHandleType( VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlagBits handleType_ ) VULKAN_HPP_NOEXCEPT { handleType = handleType_; return *this; } VULKAN_HPP_CONSTEXPR_14 ImportSemaphoreZirconHandleInfoFUCHSIA & setZirconHandle( zx_handle_t zirconHandle_ ) VULKAN_HPP_NOEXCEPT { zirconHandle = zirconHandle_; return *this; } # endif /*VULKAN_HPP_NO_SETTERS*/ operator VkImportSemaphoreZirconHandleInfoFUCHSIA const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkImportSemaphoreZirconHandleInfoFUCHSIA &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, semaphore, flags, handleType, zirconHandle ); } # endif # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) std::strong_ordering operator<=>( ImportSemaphoreZirconHandleInfoFUCHSIA const & rhs ) const VULKAN_HPP_NOEXCEPT { if ( auto cmp = sType <=> rhs.sType; cmp != 0 ) return cmp; if ( auto cmp = pNext <=> rhs.pNext; cmp != 0 ) return cmp; if ( auto cmp = semaphore <=> rhs.semaphore; cmp != 0 ) return cmp; if ( auto cmp = flags <=> rhs.flags; cmp != 0 ) return cmp; if ( auto cmp = handleType <=> rhs.handleType; cmp != 0 ) return cmp; if ( auto cmp = memcmp( &zirconHandle, &rhs.zirconHandle, sizeof( zx_handle_t ) ); cmp != 0 ) return ( cmp < 0 ) ? std::strong_ordering::less : std::strong_ordering::greater; return std::strong_ordering::equivalent; } # endif bool operator==( ImportSemaphoreZirconHandleInfoFUCHSIA const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( semaphore == rhs.semaphore ) && ( flags == rhs.flags ) && ( handleType == rhs.handleType ) && ( memcmp( &zirconHandle, &rhs.zirconHandle, sizeof( zx_handle_t ) ) == 0 ); } bool operator!=( ImportSemaphoreZirconHandleInfoFUCHSIA const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eImportSemaphoreZirconHandleInfoFUCHSIA; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Semaphore semaphore = {}; VULKAN_HPP_NAMESPACE::SemaphoreImportFlags flags = {}; VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlagBits handleType = VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlagBits::eOpaqueFd; zx_handle_t zirconHandle = {}; }; template <> struct CppType { using Type = ImportSemaphoreZirconHandleInfoFUCHSIA; }; #endif /*VK_USE_PLATFORM_FUCHSIA*/ struct IndirectCommandsExecutionSetTokenEXT { using NativeType = VkIndirectCommandsExecutionSetTokenEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR IndirectCommandsExecutionSetTokenEXT( VULKAN_HPP_NAMESPACE::IndirectExecutionSetInfoTypeEXT type_ = VULKAN_HPP_NAMESPACE::IndirectExecutionSetInfoTypeEXT::ePipelines, VULKAN_HPP_NAMESPACE::ShaderStageFlags shaderStages_ = {} ) VULKAN_HPP_NOEXCEPT : type{ type_ } , shaderStages{ shaderStages_ } { } VULKAN_HPP_CONSTEXPR IndirectCommandsExecutionSetTokenEXT( IndirectCommandsExecutionSetTokenEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; IndirectCommandsExecutionSetTokenEXT( VkIndirectCommandsExecutionSetTokenEXT const & rhs ) VULKAN_HPP_NOEXCEPT : IndirectCommandsExecutionSetTokenEXT( *reinterpret_cast( &rhs ) ) { } IndirectCommandsExecutionSetTokenEXT & operator=( IndirectCommandsExecutionSetTokenEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ IndirectCommandsExecutionSetTokenEXT & operator=( VkIndirectCommandsExecutionSetTokenEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 IndirectCommandsExecutionSetTokenEXT & setType( VULKAN_HPP_NAMESPACE::IndirectExecutionSetInfoTypeEXT type_ ) VULKAN_HPP_NOEXCEPT { type = type_; return *this; } VULKAN_HPP_CONSTEXPR_14 IndirectCommandsExecutionSetTokenEXT & setShaderStages( VULKAN_HPP_NAMESPACE::ShaderStageFlags shaderStages_ ) VULKAN_HPP_NOEXCEPT { shaderStages = shaderStages_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkIndirectCommandsExecutionSetTokenEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkIndirectCommandsExecutionSetTokenEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( type, shaderStages ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( IndirectCommandsExecutionSetTokenEXT const & ) const = default; #else bool operator==( IndirectCommandsExecutionSetTokenEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( type == rhs.type ) && ( shaderStages == rhs.shaderStages ); # endif } bool operator!=( IndirectCommandsExecutionSetTokenEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::IndirectExecutionSetInfoTypeEXT type = VULKAN_HPP_NAMESPACE::IndirectExecutionSetInfoTypeEXT::ePipelines; VULKAN_HPP_NAMESPACE::ShaderStageFlags shaderStages = {}; }; struct IndirectCommandsIndexBufferTokenEXT { using NativeType = VkIndirectCommandsIndexBufferTokenEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR IndirectCommandsIndexBufferTokenEXT( VULKAN_HPP_NAMESPACE::IndirectCommandsInputModeFlagBitsEXT mode_ = VULKAN_HPP_NAMESPACE::IndirectCommandsInputModeFlagBitsEXT::eVulkanIndexBuffer ) VULKAN_HPP_NOEXCEPT : mode{ mode_ } { } VULKAN_HPP_CONSTEXPR IndirectCommandsIndexBufferTokenEXT( IndirectCommandsIndexBufferTokenEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; IndirectCommandsIndexBufferTokenEXT( VkIndirectCommandsIndexBufferTokenEXT const & rhs ) VULKAN_HPP_NOEXCEPT : IndirectCommandsIndexBufferTokenEXT( *reinterpret_cast( &rhs ) ) { } IndirectCommandsIndexBufferTokenEXT & operator=( IndirectCommandsIndexBufferTokenEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ IndirectCommandsIndexBufferTokenEXT & operator=( VkIndirectCommandsIndexBufferTokenEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 IndirectCommandsIndexBufferTokenEXT & setMode( VULKAN_HPP_NAMESPACE::IndirectCommandsInputModeFlagBitsEXT mode_ ) VULKAN_HPP_NOEXCEPT { mode = mode_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkIndirectCommandsIndexBufferTokenEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkIndirectCommandsIndexBufferTokenEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( mode ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( IndirectCommandsIndexBufferTokenEXT const & ) const = default; #else bool operator==( IndirectCommandsIndexBufferTokenEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( mode == rhs.mode ); # endif } bool operator!=( IndirectCommandsIndexBufferTokenEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::IndirectCommandsInputModeFlagBitsEXT mode = VULKAN_HPP_NAMESPACE::IndirectCommandsInputModeFlagBitsEXT::eVulkanIndexBuffer; }; struct PushConstantRange { using NativeType = VkPushConstantRange; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PushConstantRange( VULKAN_HPP_NAMESPACE::ShaderStageFlags stageFlags_ = {}, uint32_t offset_ = {}, uint32_t size_ = {} ) VULKAN_HPP_NOEXCEPT : stageFlags{ stageFlags_ } , offset{ offset_ } , size{ size_ } { } VULKAN_HPP_CONSTEXPR PushConstantRange( PushConstantRange const & rhs ) VULKAN_HPP_NOEXCEPT = default; PushConstantRange( VkPushConstantRange const & rhs ) VULKAN_HPP_NOEXCEPT : PushConstantRange( *reinterpret_cast( &rhs ) ) {} PushConstantRange & operator=( PushConstantRange const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PushConstantRange & operator=( VkPushConstantRange const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PushConstantRange & setStageFlags( VULKAN_HPP_NAMESPACE::ShaderStageFlags stageFlags_ ) VULKAN_HPP_NOEXCEPT { stageFlags = stageFlags_; return *this; } VULKAN_HPP_CONSTEXPR_14 PushConstantRange & setOffset( uint32_t offset_ ) VULKAN_HPP_NOEXCEPT { offset = offset_; return *this; } VULKAN_HPP_CONSTEXPR_14 PushConstantRange & setSize( uint32_t size_ ) VULKAN_HPP_NOEXCEPT { size = size_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPushConstantRange const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPushConstantRange &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( stageFlags, offset, size ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PushConstantRange const & ) const = default; #else bool operator==( PushConstantRange const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( stageFlags == rhs.stageFlags ) && ( offset == rhs.offset ) && ( size == rhs.size ); # endif } bool operator!=( PushConstantRange const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::ShaderStageFlags stageFlags = {}; uint32_t offset = {}; uint32_t size = {}; }; struct IndirectCommandsPushConstantTokenEXT { using NativeType = VkIndirectCommandsPushConstantTokenEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR IndirectCommandsPushConstantTokenEXT( VULKAN_HPP_NAMESPACE::PushConstantRange updateRange_ = {} ) VULKAN_HPP_NOEXCEPT : updateRange{ updateRange_ } { } VULKAN_HPP_CONSTEXPR IndirectCommandsPushConstantTokenEXT( IndirectCommandsPushConstantTokenEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; IndirectCommandsPushConstantTokenEXT( VkIndirectCommandsPushConstantTokenEXT const & rhs ) VULKAN_HPP_NOEXCEPT : IndirectCommandsPushConstantTokenEXT( *reinterpret_cast( &rhs ) ) { } IndirectCommandsPushConstantTokenEXT & operator=( IndirectCommandsPushConstantTokenEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ IndirectCommandsPushConstantTokenEXT & operator=( VkIndirectCommandsPushConstantTokenEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 IndirectCommandsPushConstantTokenEXT & setUpdateRange( VULKAN_HPP_NAMESPACE::PushConstantRange const & updateRange_ ) VULKAN_HPP_NOEXCEPT { updateRange = updateRange_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkIndirectCommandsPushConstantTokenEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkIndirectCommandsPushConstantTokenEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( updateRange ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( IndirectCommandsPushConstantTokenEXT const & ) const = default; #else bool operator==( IndirectCommandsPushConstantTokenEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( updateRange == rhs.updateRange ); # endif } bool operator!=( IndirectCommandsPushConstantTokenEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::PushConstantRange updateRange = {}; }; struct IndirectCommandsVertexBufferTokenEXT { using NativeType = VkIndirectCommandsVertexBufferTokenEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR IndirectCommandsVertexBufferTokenEXT( uint32_t vertexBindingUnit_ = {} ) VULKAN_HPP_NOEXCEPT : vertexBindingUnit{ vertexBindingUnit_ } { } VULKAN_HPP_CONSTEXPR IndirectCommandsVertexBufferTokenEXT( IndirectCommandsVertexBufferTokenEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; IndirectCommandsVertexBufferTokenEXT( VkIndirectCommandsVertexBufferTokenEXT const & rhs ) VULKAN_HPP_NOEXCEPT : IndirectCommandsVertexBufferTokenEXT( *reinterpret_cast( &rhs ) ) { } IndirectCommandsVertexBufferTokenEXT & operator=( IndirectCommandsVertexBufferTokenEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ IndirectCommandsVertexBufferTokenEXT & operator=( VkIndirectCommandsVertexBufferTokenEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 IndirectCommandsVertexBufferTokenEXT & setVertexBindingUnit( uint32_t vertexBindingUnit_ ) VULKAN_HPP_NOEXCEPT { vertexBindingUnit = vertexBindingUnit_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkIndirectCommandsVertexBufferTokenEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkIndirectCommandsVertexBufferTokenEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( vertexBindingUnit ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( IndirectCommandsVertexBufferTokenEXT const & ) const = default; #else bool operator==( IndirectCommandsVertexBufferTokenEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( vertexBindingUnit == rhs.vertexBindingUnit ); # endif } bool operator!=( IndirectCommandsVertexBufferTokenEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: uint32_t vertexBindingUnit = {}; }; union IndirectCommandsTokenDataEXT { using NativeType = VkIndirectCommandsTokenDataEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_UNION_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 IndirectCommandsTokenDataEXT( const VULKAN_HPP_NAMESPACE::IndirectCommandsPushConstantTokenEXT * pPushConstant_ = {} ) : pPushConstant( pPushConstant_ ) { } VULKAN_HPP_CONSTEXPR_14 IndirectCommandsTokenDataEXT( const VULKAN_HPP_NAMESPACE::IndirectCommandsVertexBufferTokenEXT * pVertexBuffer_ ) : pVertexBuffer( pVertexBuffer_ ) { } VULKAN_HPP_CONSTEXPR_14 IndirectCommandsTokenDataEXT( const VULKAN_HPP_NAMESPACE::IndirectCommandsIndexBufferTokenEXT * pIndexBuffer_ ) : pIndexBuffer( pIndexBuffer_ ) { } VULKAN_HPP_CONSTEXPR_14 IndirectCommandsTokenDataEXT( const VULKAN_HPP_NAMESPACE::IndirectCommandsExecutionSetTokenEXT * pExecutionSet_ ) : pExecutionSet( pExecutionSet_ ) { } #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_UNION_SETTERS ) VULKAN_HPP_CONSTEXPR_14 IndirectCommandsTokenDataEXT & setPPushConstant( const VULKAN_HPP_NAMESPACE::IndirectCommandsPushConstantTokenEXT * pPushConstant_ ) VULKAN_HPP_NOEXCEPT { pPushConstant = pPushConstant_; return *this; } VULKAN_HPP_CONSTEXPR_14 IndirectCommandsTokenDataEXT & setPVertexBuffer( const VULKAN_HPP_NAMESPACE::IndirectCommandsVertexBufferTokenEXT * pVertexBuffer_ ) VULKAN_HPP_NOEXCEPT { pVertexBuffer = pVertexBuffer_; return *this; } VULKAN_HPP_CONSTEXPR_14 IndirectCommandsTokenDataEXT & setPIndexBuffer( const VULKAN_HPP_NAMESPACE::IndirectCommandsIndexBufferTokenEXT * pIndexBuffer_ ) VULKAN_HPP_NOEXCEPT { pIndexBuffer = pIndexBuffer_; return *this; } VULKAN_HPP_CONSTEXPR_14 IndirectCommandsTokenDataEXT & setPExecutionSet( const VULKAN_HPP_NAMESPACE::IndirectCommandsExecutionSetTokenEXT * pExecutionSet_ ) VULKAN_HPP_NOEXCEPT { pExecutionSet = pExecutionSet_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkIndirectCommandsTokenDataEXT const &() const { return *reinterpret_cast( this ); } operator VkIndirectCommandsTokenDataEXT &() { return *reinterpret_cast( this ); } #ifdef VULKAN_HPP_HAS_UNRESTRICTED_UNIONS const VULKAN_HPP_NAMESPACE::IndirectCommandsPushConstantTokenEXT * pPushConstant; const VULKAN_HPP_NAMESPACE::IndirectCommandsVertexBufferTokenEXT * pVertexBuffer; const VULKAN_HPP_NAMESPACE::IndirectCommandsIndexBufferTokenEXT * pIndexBuffer; const VULKAN_HPP_NAMESPACE::IndirectCommandsExecutionSetTokenEXT * pExecutionSet; #else const VkIndirectCommandsPushConstantTokenEXT * pPushConstant; const VkIndirectCommandsVertexBufferTokenEXT * pVertexBuffer; const VkIndirectCommandsIndexBufferTokenEXT * pIndexBuffer; const VkIndirectCommandsExecutionSetTokenEXT * pExecutionSet; #endif /*VULKAN_HPP_HAS_UNRESTRICTED_UNIONS*/ }; struct IndirectCommandsLayoutTokenEXT { using NativeType = VkIndirectCommandsLayoutTokenEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eIndirectCommandsLayoutTokenEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 IndirectCommandsLayoutTokenEXT( VULKAN_HPP_NAMESPACE::IndirectCommandsTokenTypeEXT type_ = VULKAN_HPP_NAMESPACE::IndirectCommandsTokenTypeEXT::eExecutionSet, VULKAN_HPP_NAMESPACE::IndirectCommandsTokenDataEXT data_ = {}, uint32_t offset_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , type{ type_ } , data{ data_ } , offset{ offset_ } { } VULKAN_HPP_CONSTEXPR_14 IndirectCommandsLayoutTokenEXT( IndirectCommandsLayoutTokenEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; IndirectCommandsLayoutTokenEXT( VkIndirectCommandsLayoutTokenEXT const & rhs ) VULKAN_HPP_NOEXCEPT : IndirectCommandsLayoutTokenEXT( *reinterpret_cast( &rhs ) ) { } IndirectCommandsLayoutTokenEXT & operator=( IndirectCommandsLayoutTokenEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ IndirectCommandsLayoutTokenEXT & operator=( VkIndirectCommandsLayoutTokenEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 IndirectCommandsLayoutTokenEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 IndirectCommandsLayoutTokenEXT & setType( VULKAN_HPP_NAMESPACE::IndirectCommandsTokenTypeEXT type_ ) VULKAN_HPP_NOEXCEPT { type = type_; return *this; } VULKAN_HPP_CONSTEXPR_14 IndirectCommandsLayoutTokenEXT & setData( VULKAN_HPP_NAMESPACE::IndirectCommandsTokenDataEXT const & data_ ) VULKAN_HPP_NOEXCEPT { data = data_; return *this; } VULKAN_HPP_CONSTEXPR_14 IndirectCommandsLayoutTokenEXT & setOffset( uint32_t offset_ ) VULKAN_HPP_NOEXCEPT { offset = offset_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkIndirectCommandsLayoutTokenEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkIndirectCommandsLayoutTokenEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, type, data, offset ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eIndirectCommandsLayoutTokenEXT; const void * pNext = {}; VULKAN_HPP_NAMESPACE::IndirectCommandsTokenTypeEXT type = VULKAN_HPP_NAMESPACE::IndirectCommandsTokenTypeEXT::eExecutionSet; VULKAN_HPP_NAMESPACE::IndirectCommandsTokenDataEXT data = {}; uint32_t offset = {}; }; template <> struct CppType { using Type = IndirectCommandsLayoutTokenEXT; }; struct IndirectCommandsLayoutCreateInfoEXT { using NativeType = VkIndirectCommandsLayoutCreateInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eIndirectCommandsLayoutCreateInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR IndirectCommandsLayoutCreateInfoEXT( VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutUsageFlagsEXT flags_ = {}, VULKAN_HPP_NAMESPACE::ShaderStageFlags shaderStages_ = {}, uint32_t indirectStride_ = {}, VULKAN_HPP_NAMESPACE::PipelineLayout pipelineLayout_ = {}, uint32_t tokenCount_ = {}, const VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutTokenEXT * pTokens_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , shaderStages{ shaderStages_ } , indirectStride{ indirectStride_ } , pipelineLayout{ pipelineLayout_ } , tokenCount{ tokenCount_ } , pTokens{ pTokens_ } { } VULKAN_HPP_CONSTEXPR IndirectCommandsLayoutCreateInfoEXT( IndirectCommandsLayoutCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; IndirectCommandsLayoutCreateInfoEXT( VkIndirectCommandsLayoutCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : IndirectCommandsLayoutCreateInfoEXT( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) IndirectCommandsLayoutCreateInfoEXT( VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutUsageFlagsEXT flags_, VULKAN_HPP_NAMESPACE::ShaderStageFlags shaderStages_, uint32_t indirectStride_, VULKAN_HPP_NAMESPACE::PipelineLayout pipelineLayout_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & tokens_, const void * pNext_ = nullptr ) : pNext( pNext_ ) , flags( flags_ ) , shaderStages( shaderStages_ ) , indirectStride( indirectStride_ ) , pipelineLayout( pipelineLayout_ ) , tokenCount( static_cast( tokens_.size() ) ) , pTokens( tokens_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ IndirectCommandsLayoutCreateInfoEXT & operator=( IndirectCommandsLayoutCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ IndirectCommandsLayoutCreateInfoEXT & operator=( VkIndirectCommandsLayoutCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 IndirectCommandsLayoutCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 IndirectCommandsLayoutCreateInfoEXT & setFlags( VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutUsageFlagsEXT flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 IndirectCommandsLayoutCreateInfoEXT & setShaderStages( VULKAN_HPP_NAMESPACE::ShaderStageFlags shaderStages_ ) VULKAN_HPP_NOEXCEPT { shaderStages = shaderStages_; return *this; } VULKAN_HPP_CONSTEXPR_14 IndirectCommandsLayoutCreateInfoEXT & setIndirectStride( uint32_t indirectStride_ ) VULKAN_HPP_NOEXCEPT { indirectStride = indirectStride_; return *this; } VULKAN_HPP_CONSTEXPR_14 IndirectCommandsLayoutCreateInfoEXT & setPipelineLayout( VULKAN_HPP_NAMESPACE::PipelineLayout pipelineLayout_ ) VULKAN_HPP_NOEXCEPT { pipelineLayout = pipelineLayout_; return *this; } VULKAN_HPP_CONSTEXPR_14 IndirectCommandsLayoutCreateInfoEXT & setTokenCount( uint32_t tokenCount_ ) VULKAN_HPP_NOEXCEPT { tokenCount = tokenCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 IndirectCommandsLayoutCreateInfoEXT & setPTokens( const VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutTokenEXT * pTokens_ ) VULKAN_HPP_NOEXCEPT { pTokens = pTokens_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) IndirectCommandsLayoutCreateInfoEXT & setTokens( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & tokens_ ) VULKAN_HPP_NOEXCEPT { tokenCount = static_cast( tokens_.size() ); pTokens = tokens_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkIndirectCommandsLayoutCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkIndirectCommandsLayoutCreateInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, shaderStages, indirectStride, pipelineLayout, tokenCount, pTokens ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( IndirectCommandsLayoutCreateInfoEXT const & ) const = default; #else bool operator==( IndirectCommandsLayoutCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( shaderStages == rhs.shaderStages ) && ( indirectStride == rhs.indirectStride ) && ( pipelineLayout == rhs.pipelineLayout ) && ( tokenCount == rhs.tokenCount ) && ( pTokens == rhs.pTokens ); # endif } bool operator!=( IndirectCommandsLayoutCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eIndirectCommandsLayoutCreateInfoEXT; const void * pNext = {}; VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutUsageFlagsEXT flags = {}; VULKAN_HPP_NAMESPACE::ShaderStageFlags shaderStages = {}; uint32_t indirectStride = {}; VULKAN_HPP_NAMESPACE::PipelineLayout pipelineLayout = {}; uint32_t tokenCount = {}; const VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutTokenEXT * pTokens = {}; }; template <> struct CppType { using Type = IndirectCommandsLayoutCreateInfoEXT; }; struct IndirectCommandsLayoutTokenNV { using NativeType = VkIndirectCommandsLayoutTokenNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eIndirectCommandsLayoutTokenNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR IndirectCommandsLayoutTokenNV( VULKAN_HPP_NAMESPACE::IndirectCommandsTokenTypeNV tokenType_ = VULKAN_HPP_NAMESPACE::IndirectCommandsTokenTypeNV::eShaderGroup, uint32_t stream_ = {}, uint32_t offset_ = {}, uint32_t vertexBindingUnit_ = {}, VULKAN_HPP_NAMESPACE::Bool32 vertexDynamicStride_ = {}, VULKAN_HPP_NAMESPACE::PipelineLayout pushconstantPipelineLayout_ = {}, VULKAN_HPP_NAMESPACE::ShaderStageFlags pushconstantShaderStageFlags_ = {}, uint32_t pushconstantOffset_ = {}, uint32_t pushconstantSize_ = {}, VULKAN_HPP_NAMESPACE::IndirectStateFlagsNV indirectStateFlags_ = {}, uint32_t indexTypeCount_ = {}, const VULKAN_HPP_NAMESPACE::IndexType * pIndexTypes_ = {}, const uint32_t * pIndexTypeValues_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , tokenType{ tokenType_ } , stream{ stream_ } , offset{ offset_ } , vertexBindingUnit{ vertexBindingUnit_ } , vertexDynamicStride{ vertexDynamicStride_ } , pushconstantPipelineLayout{ pushconstantPipelineLayout_ } , pushconstantShaderStageFlags{ pushconstantShaderStageFlags_ } , pushconstantOffset{ pushconstantOffset_ } , pushconstantSize{ pushconstantSize_ } , indirectStateFlags{ indirectStateFlags_ } , indexTypeCount{ indexTypeCount_ } , pIndexTypes{ pIndexTypes_ } , pIndexTypeValues{ pIndexTypeValues_ } { } VULKAN_HPP_CONSTEXPR IndirectCommandsLayoutTokenNV( IndirectCommandsLayoutTokenNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; IndirectCommandsLayoutTokenNV( VkIndirectCommandsLayoutTokenNV const & rhs ) VULKAN_HPP_NOEXCEPT : IndirectCommandsLayoutTokenNV( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) IndirectCommandsLayoutTokenNV( VULKAN_HPP_NAMESPACE::IndirectCommandsTokenTypeNV tokenType_, uint32_t stream_, uint32_t offset_, uint32_t vertexBindingUnit_, VULKAN_HPP_NAMESPACE::Bool32 vertexDynamicStride_, VULKAN_HPP_NAMESPACE::PipelineLayout pushconstantPipelineLayout_, VULKAN_HPP_NAMESPACE::ShaderStageFlags pushconstantShaderStageFlags_, uint32_t pushconstantOffset_, uint32_t pushconstantSize_, VULKAN_HPP_NAMESPACE::IndirectStateFlagsNV indirectStateFlags_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & indexTypes_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & indexTypeValues_ = {}, const void * pNext_ = nullptr ) : pNext( pNext_ ) , tokenType( tokenType_ ) , stream( stream_ ) , offset( offset_ ) , vertexBindingUnit( vertexBindingUnit_ ) , vertexDynamicStride( vertexDynamicStride_ ) , pushconstantPipelineLayout( pushconstantPipelineLayout_ ) , pushconstantShaderStageFlags( pushconstantShaderStageFlags_ ) , pushconstantOffset( pushconstantOffset_ ) , pushconstantSize( pushconstantSize_ ) , indirectStateFlags( indirectStateFlags_ ) , indexTypeCount( static_cast( indexTypes_.size() ) ) , pIndexTypes( indexTypes_.data() ) , pIndexTypeValues( indexTypeValues_.data() ) { # ifdef VULKAN_HPP_NO_EXCEPTIONS VULKAN_HPP_ASSERT( indexTypes_.size() == indexTypeValues_.size() ); # else if ( indexTypes_.size() != indexTypeValues_.size() ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::IndirectCommandsLayoutTokenNV::IndirectCommandsLayoutTokenNV: indexTypes_.size() != indexTypeValues_.size()" ); } # endif /*VULKAN_HPP_NO_EXCEPTIONS*/ } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ IndirectCommandsLayoutTokenNV & operator=( IndirectCommandsLayoutTokenNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ IndirectCommandsLayoutTokenNV & operator=( VkIndirectCommandsLayoutTokenNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 IndirectCommandsLayoutTokenNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 IndirectCommandsLayoutTokenNV & setTokenType( VULKAN_HPP_NAMESPACE::IndirectCommandsTokenTypeNV tokenType_ ) VULKAN_HPP_NOEXCEPT { tokenType = tokenType_; return *this; } VULKAN_HPP_CONSTEXPR_14 IndirectCommandsLayoutTokenNV & setStream( uint32_t stream_ ) VULKAN_HPP_NOEXCEPT { stream = stream_; return *this; } VULKAN_HPP_CONSTEXPR_14 IndirectCommandsLayoutTokenNV & setOffset( uint32_t offset_ ) VULKAN_HPP_NOEXCEPT { offset = offset_; return *this; } VULKAN_HPP_CONSTEXPR_14 IndirectCommandsLayoutTokenNV & setVertexBindingUnit( uint32_t vertexBindingUnit_ ) VULKAN_HPP_NOEXCEPT { vertexBindingUnit = vertexBindingUnit_; return *this; } VULKAN_HPP_CONSTEXPR_14 IndirectCommandsLayoutTokenNV & setVertexDynamicStride( VULKAN_HPP_NAMESPACE::Bool32 vertexDynamicStride_ ) VULKAN_HPP_NOEXCEPT { vertexDynamicStride = vertexDynamicStride_; return *this; } VULKAN_HPP_CONSTEXPR_14 IndirectCommandsLayoutTokenNV & setPushconstantPipelineLayout( VULKAN_HPP_NAMESPACE::PipelineLayout pushconstantPipelineLayout_ ) VULKAN_HPP_NOEXCEPT { pushconstantPipelineLayout = pushconstantPipelineLayout_; return *this; } VULKAN_HPP_CONSTEXPR_14 IndirectCommandsLayoutTokenNV & setPushconstantShaderStageFlags( VULKAN_HPP_NAMESPACE::ShaderStageFlags pushconstantShaderStageFlags_ ) VULKAN_HPP_NOEXCEPT { pushconstantShaderStageFlags = pushconstantShaderStageFlags_; return *this; } VULKAN_HPP_CONSTEXPR_14 IndirectCommandsLayoutTokenNV & setPushconstantOffset( uint32_t pushconstantOffset_ ) VULKAN_HPP_NOEXCEPT { pushconstantOffset = pushconstantOffset_; return *this; } VULKAN_HPP_CONSTEXPR_14 IndirectCommandsLayoutTokenNV & setPushconstantSize( uint32_t pushconstantSize_ ) VULKAN_HPP_NOEXCEPT { pushconstantSize = pushconstantSize_; return *this; } VULKAN_HPP_CONSTEXPR_14 IndirectCommandsLayoutTokenNV & setIndirectStateFlags( VULKAN_HPP_NAMESPACE::IndirectStateFlagsNV indirectStateFlags_ ) VULKAN_HPP_NOEXCEPT { indirectStateFlags = indirectStateFlags_; return *this; } VULKAN_HPP_CONSTEXPR_14 IndirectCommandsLayoutTokenNV & setIndexTypeCount( uint32_t indexTypeCount_ ) VULKAN_HPP_NOEXCEPT { indexTypeCount = indexTypeCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 IndirectCommandsLayoutTokenNV & setPIndexTypes( const VULKAN_HPP_NAMESPACE::IndexType * pIndexTypes_ ) VULKAN_HPP_NOEXCEPT { pIndexTypes = pIndexTypes_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) IndirectCommandsLayoutTokenNV & setIndexTypes( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & indexTypes_ ) VULKAN_HPP_NOEXCEPT { indexTypeCount = static_cast( indexTypes_.size() ); pIndexTypes = indexTypes_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 IndirectCommandsLayoutTokenNV & setPIndexTypeValues( const uint32_t * pIndexTypeValues_ ) VULKAN_HPP_NOEXCEPT { pIndexTypeValues = pIndexTypeValues_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) IndirectCommandsLayoutTokenNV & setIndexTypeValues( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & indexTypeValues_ ) VULKAN_HPP_NOEXCEPT { indexTypeCount = static_cast( indexTypeValues_.size() ); pIndexTypeValues = indexTypeValues_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkIndirectCommandsLayoutTokenNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkIndirectCommandsLayoutTokenNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, tokenType, stream, offset, vertexBindingUnit, vertexDynamicStride, pushconstantPipelineLayout, pushconstantShaderStageFlags, pushconstantOffset, pushconstantSize, indirectStateFlags, indexTypeCount, pIndexTypes, pIndexTypeValues ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( IndirectCommandsLayoutTokenNV const & ) const = default; #else bool operator==( IndirectCommandsLayoutTokenNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( tokenType == rhs.tokenType ) && ( stream == rhs.stream ) && ( offset == rhs.offset ) && ( vertexBindingUnit == rhs.vertexBindingUnit ) && ( vertexDynamicStride == rhs.vertexDynamicStride ) && ( pushconstantPipelineLayout == rhs.pushconstantPipelineLayout ) && ( pushconstantShaderStageFlags == rhs.pushconstantShaderStageFlags ) && ( pushconstantOffset == rhs.pushconstantOffset ) && ( pushconstantSize == rhs.pushconstantSize ) && ( indirectStateFlags == rhs.indirectStateFlags ) && ( indexTypeCount == rhs.indexTypeCount ) && ( pIndexTypes == rhs.pIndexTypes ) && ( pIndexTypeValues == rhs.pIndexTypeValues ); # endif } bool operator!=( IndirectCommandsLayoutTokenNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eIndirectCommandsLayoutTokenNV; const void * pNext = {}; VULKAN_HPP_NAMESPACE::IndirectCommandsTokenTypeNV tokenType = VULKAN_HPP_NAMESPACE::IndirectCommandsTokenTypeNV::eShaderGroup; uint32_t stream = {}; uint32_t offset = {}; uint32_t vertexBindingUnit = {}; VULKAN_HPP_NAMESPACE::Bool32 vertexDynamicStride = {}; VULKAN_HPP_NAMESPACE::PipelineLayout pushconstantPipelineLayout = {}; VULKAN_HPP_NAMESPACE::ShaderStageFlags pushconstantShaderStageFlags = {}; uint32_t pushconstantOffset = {}; uint32_t pushconstantSize = {}; VULKAN_HPP_NAMESPACE::IndirectStateFlagsNV indirectStateFlags = {}; uint32_t indexTypeCount = {}; const VULKAN_HPP_NAMESPACE::IndexType * pIndexTypes = {}; const uint32_t * pIndexTypeValues = {}; }; template <> struct CppType { using Type = IndirectCommandsLayoutTokenNV; }; struct IndirectCommandsLayoutCreateInfoNV { using NativeType = VkIndirectCommandsLayoutCreateInfoNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eIndirectCommandsLayoutCreateInfoNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR IndirectCommandsLayoutCreateInfoNV( VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutUsageFlagsNV flags_ = {}, VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint_ = VULKAN_HPP_NAMESPACE::PipelineBindPoint::eGraphics, uint32_t tokenCount_ = {}, const VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutTokenNV * pTokens_ = {}, uint32_t streamCount_ = {}, const uint32_t * pStreamStrides_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , pipelineBindPoint{ pipelineBindPoint_ } , tokenCount{ tokenCount_ } , pTokens{ pTokens_ } , streamCount{ streamCount_ } , pStreamStrides{ pStreamStrides_ } { } VULKAN_HPP_CONSTEXPR IndirectCommandsLayoutCreateInfoNV( IndirectCommandsLayoutCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; IndirectCommandsLayoutCreateInfoNV( VkIndirectCommandsLayoutCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT : IndirectCommandsLayoutCreateInfoNV( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) IndirectCommandsLayoutCreateInfoNV( VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutUsageFlagsNV flags_, VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & tokens_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & streamStrides_ = {}, const void * pNext_ = nullptr ) : pNext( pNext_ ) , flags( flags_ ) , pipelineBindPoint( pipelineBindPoint_ ) , tokenCount( static_cast( tokens_.size() ) ) , pTokens( tokens_.data() ) , streamCount( static_cast( streamStrides_.size() ) ) , pStreamStrides( streamStrides_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ IndirectCommandsLayoutCreateInfoNV & operator=( IndirectCommandsLayoutCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ IndirectCommandsLayoutCreateInfoNV & operator=( VkIndirectCommandsLayoutCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 IndirectCommandsLayoutCreateInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 IndirectCommandsLayoutCreateInfoNV & setFlags( VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutUsageFlagsNV flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 IndirectCommandsLayoutCreateInfoNV & setPipelineBindPoint( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint_ ) VULKAN_HPP_NOEXCEPT { pipelineBindPoint = pipelineBindPoint_; return *this; } VULKAN_HPP_CONSTEXPR_14 IndirectCommandsLayoutCreateInfoNV & setTokenCount( uint32_t tokenCount_ ) VULKAN_HPP_NOEXCEPT { tokenCount = tokenCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 IndirectCommandsLayoutCreateInfoNV & setPTokens( const VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutTokenNV * pTokens_ ) VULKAN_HPP_NOEXCEPT { pTokens = pTokens_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) IndirectCommandsLayoutCreateInfoNV & setTokens( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & tokens_ ) VULKAN_HPP_NOEXCEPT { tokenCount = static_cast( tokens_.size() ); pTokens = tokens_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 IndirectCommandsLayoutCreateInfoNV & setStreamCount( uint32_t streamCount_ ) VULKAN_HPP_NOEXCEPT { streamCount = streamCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 IndirectCommandsLayoutCreateInfoNV & setPStreamStrides( const uint32_t * pStreamStrides_ ) VULKAN_HPP_NOEXCEPT { pStreamStrides = pStreamStrides_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) IndirectCommandsLayoutCreateInfoNV & setStreamStrides( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & streamStrides_ ) VULKAN_HPP_NOEXCEPT { streamCount = static_cast( streamStrides_.size() ); pStreamStrides = streamStrides_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkIndirectCommandsLayoutCreateInfoNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkIndirectCommandsLayoutCreateInfoNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, pipelineBindPoint, tokenCount, pTokens, streamCount, pStreamStrides ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( IndirectCommandsLayoutCreateInfoNV const & ) const = default; #else bool operator==( IndirectCommandsLayoutCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( pipelineBindPoint == rhs.pipelineBindPoint ) && ( tokenCount == rhs.tokenCount ) && ( pTokens == rhs.pTokens ) && ( streamCount == rhs.streamCount ) && ( pStreamStrides == rhs.pStreamStrides ); # endif } bool operator!=( IndirectCommandsLayoutCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eIndirectCommandsLayoutCreateInfoNV; const void * pNext = {}; VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutUsageFlagsNV flags = {}; VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint = VULKAN_HPP_NAMESPACE::PipelineBindPoint::eGraphics; uint32_t tokenCount = {}; const VULKAN_HPP_NAMESPACE::IndirectCommandsLayoutTokenNV * pTokens = {}; uint32_t streamCount = {}; const uint32_t * pStreamStrides = {}; }; template <> struct CppType { using Type = IndirectCommandsLayoutCreateInfoNV; }; struct IndirectExecutionSetPipelineInfoEXT { using NativeType = VkIndirectExecutionSetPipelineInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eIndirectExecutionSetPipelineInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR IndirectExecutionSetPipelineInfoEXT( VULKAN_HPP_NAMESPACE::Pipeline initialPipeline_ = {}, uint32_t maxPipelineCount_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , initialPipeline{ initialPipeline_ } , maxPipelineCount{ maxPipelineCount_ } { } VULKAN_HPP_CONSTEXPR IndirectExecutionSetPipelineInfoEXT( IndirectExecutionSetPipelineInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; IndirectExecutionSetPipelineInfoEXT( VkIndirectExecutionSetPipelineInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : IndirectExecutionSetPipelineInfoEXT( *reinterpret_cast( &rhs ) ) { } IndirectExecutionSetPipelineInfoEXT & operator=( IndirectExecutionSetPipelineInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ IndirectExecutionSetPipelineInfoEXT & operator=( VkIndirectExecutionSetPipelineInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 IndirectExecutionSetPipelineInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 IndirectExecutionSetPipelineInfoEXT & setInitialPipeline( VULKAN_HPP_NAMESPACE::Pipeline initialPipeline_ ) VULKAN_HPP_NOEXCEPT { initialPipeline = initialPipeline_; return *this; } VULKAN_HPP_CONSTEXPR_14 IndirectExecutionSetPipelineInfoEXT & setMaxPipelineCount( uint32_t maxPipelineCount_ ) VULKAN_HPP_NOEXCEPT { maxPipelineCount = maxPipelineCount_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkIndirectExecutionSetPipelineInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkIndirectExecutionSetPipelineInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, initialPipeline, maxPipelineCount ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( IndirectExecutionSetPipelineInfoEXT const & ) const = default; #else bool operator==( IndirectExecutionSetPipelineInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( initialPipeline == rhs.initialPipeline ) && ( maxPipelineCount == rhs.maxPipelineCount ); # endif } bool operator!=( IndirectExecutionSetPipelineInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eIndirectExecutionSetPipelineInfoEXT; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Pipeline initialPipeline = {}; uint32_t maxPipelineCount = {}; }; template <> struct CppType { using Type = IndirectExecutionSetPipelineInfoEXT; }; struct IndirectExecutionSetShaderLayoutInfoEXT { using NativeType = VkIndirectExecutionSetShaderLayoutInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eIndirectExecutionSetShaderLayoutInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR IndirectExecutionSetShaderLayoutInfoEXT( uint32_t setLayoutCount_ = {}, const VULKAN_HPP_NAMESPACE::DescriptorSetLayout * pSetLayouts_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , setLayoutCount{ setLayoutCount_ } , pSetLayouts{ pSetLayouts_ } { } VULKAN_HPP_CONSTEXPR IndirectExecutionSetShaderLayoutInfoEXT( IndirectExecutionSetShaderLayoutInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; IndirectExecutionSetShaderLayoutInfoEXT( VkIndirectExecutionSetShaderLayoutInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : IndirectExecutionSetShaderLayoutInfoEXT( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) IndirectExecutionSetShaderLayoutInfoEXT( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & setLayouts_, const void * pNext_ = nullptr ) : pNext( pNext_ ), setLayoutCount( static_cast( setLayouts_.size() ) ), pSetLayouts( setLayouts_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ IndirectExecutionSetShaderLayoutInfoEXT & operator=( IndirectExecutionSetShaderLayoutInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ IndirectExecutionSetShaderLayoutInfoEXT & operator=( VkIndirectExecutionSetShaderLayoutInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 IndirectExecutionSetShaderLayoutInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 IndirectExecutionSetShaderLayoutInfoEXT & setSetLayoutCount( uint32_t setLayoutCount_ ) VULKAN_HPP_NOEXCEPT { setLayoutCount = setLayoutCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 IndirectExecutionSetShaderLayoutInfoEXT & setPSetLayouts( const VULKAN_HPP_NAMESPACE::DescriptorSetLayout * pSetLayouts_ ) VULKAN_HPP_NOEXCEPT { pSetLayouts = pSetLayouts_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) IndirectExecutionSetShaderLayoutInfoEXT & setSetLayouts( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & setLayouts_ ) VULKAN_HPP_NOEXCEPT { setLayoutCount = static_cast( setLayouts_.size() ); pSetLayouts = setLayouts_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkIndirectExecutionSetShaderLayoutInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkIndirectExecutionSetShaderLayoutInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, setLayoutCount, pSetLayouts ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( IndirectExecutionSetShaderLayoutInfoEXT const & ) const = default; #else bool operator==( IndirectExecutionSetShaderLayoutInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( setLayoutCount == rhs.setLayoutCount ) && ( pSetLayouts == rhs.pSetLayouts ); # endif } bool operator!=( IndirectExecutionSetShaderLayoutInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eIndirectExecutionSetShaderLayoutInfoEXT; const void * pNext = {}; uint32_t setLayoutCount = {}; const VULKAN_HPP_NAMESPACE::DescriptorSetLayout * pSetLayouts = {}; }; template <> struct CppType { using Type = IndirectExecutionSetShaderLayoutInfoEXT; }; struct IndirectExecutionSetShaderInfoEXT { using NativeType = VkIndirectExecutionSetShaderInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eIndirectExecutionSetShaderInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR IndirectExecutionSetShaderInfoEXT( uint32_t shaderCount_ = {}, const VULKAN_HPP_NAMESPACE::ShaderEXT * pInitialShaders_ = {}, const VULKAN_HPP_NAMESPACE::IndirectExecutionSetShaderLayoutInfoEXT * pSetLayoutInfos_ = {}, uint32_t maxShaderCount_ = {}, uint32_t pushConstantRangeCount_ = {}, const VULKAN_HPP_NAMESPACE::PushConstantRange * pPushConstantRanges_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , shaderCount{ shaderCount_ } , pInitialShaders{ pInitialShaders_ } , pSetLayoutInfos{ pSetLayoutInfos_ } , maxShaderCount{ maxShaderCount_ } , pushConstantRangeCount{ pushConstantRangeCount_ } , pPushConstantRanges{ pPushConstantRanges_ } { } VULKAN_HPP_CONSTEXPR IndirectExecutionSetShaderInfoEXT( IndirectExecutionSetShaderInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; IndirectExecutionSetShaderInfoEXT( VkIndirectExecutionSetShaderInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : IndirectExecutionSetShaderInfoEXT( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) IndirectExecutionSetShaderInfoEXT( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & initialShaders_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & setLayoutInfos_ = {}, uint32_t maxShaderCount_ = {}, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & pushConstantRanges_ = {}, const void * pNext_ = nullptr ) : pNext( pNext_ ) , shaderCount( static_cast( initialShaders_.size() ) ) , pInitialShaders( initialShaders_.data() ) , pSetLayoutInfos( setLayoutInfos_.data() ) , maxShaderCount( maxShaderCount_ ) , pushConstantRangeCount( static_cast( pushConstantRanges_.size() ) ) , pPushConstantRanges( pushConstantRanges_.data() ) { # ifdef VULKAN_HPP_NO_EXCEPTIONS VULKAN_HPP_ASSERT( setLayoutInfos_.empty() || ( initialShaders_.size() == setLayoutInfos_.size() ) ); # else if ( !setLayoutInfos_.empty() && ( initialShaders_.size() != setLayoutInfos_.size() ) ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::IndirectExecutionSetShaderInfoEXT::IndirectExecutionSetShaderInfoEXT: !setLayoutInfos_.empty() && ( initialShaders_.size() != setLayoutInfos_.size() )" ); } # endif /*VULKAN_HPP_NO_EXCEPTIONS*/ } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ IndirectExecutionSetShaderInfoEXT & operator=( IndirectExecutionSetShaderInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ IndirectExecutionSetShaderInfoEXT & operator=( VkIndirectExecutionSetShaderInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 IndirectExecutionSetShaderInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 IndirectExecutionSetShaderInfoEXT & setShaderCount( uint32_t shaderCount_ ) VULKAN_HPP_NOEXCEPT { shaderCount = shaderCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 IndirectExecutionSetShaderInfoEXT & setPInitialShaders( const VULKAN_HPP_NAMESPACE::ShaderEXT * pInitialShaders_ ) VULKAN_HPP_NOEXCEPT { pInitialShaders = pInitialShaders_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) IndirectExecutionSetShaderInfoEXT & setInitialShaders( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & initialShaders_ ) VULKAN_HPP_NOEXCEPT { shaderCount = static_cast( initialShaders_.size() ); pInitialShaders = initialShaders_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 IndirectExecutionSetShaderInfoEXT & setPSetLayoutInfos( const VULKAN_HPP_NAMESPACE::IndirectExecutionSetShaderLayoutInfoEXT * pSetLayoutInfos_ ) VULKAN_HPP_NOEXCEPT { pSetLayoutInfos = pSetLayoutInfos_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) IndirectExecutionSetShaderInfoEXT & setSetLayoutInfos( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & setLayoutInfos_ ) VULKAN_HPP_NOEXCEPT { shaderCount = static_cast( setLayoutInfos_.size() ); pSetLayoutInfos = setLayoutInfos_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 IndirectExecutionSetShaderInfoEXT & setMaxShaderCount( uint32_t maxShaderCount_ ) VULKAN_HPP_NOEXCEPT { maxShaderCount = maxShaderCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 IndirectExecutionSetShaderInfoEXT & setPushConstantRangeCount( uint32_t pushConstantRangeCount_ ) VULKAN_HPP_NOEXCEPT { pushConstantRangeCount = pushConstantRangeCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 IndirectExecutionSetShaderInfoEXT & setPPushConstantRanges( const VULKAN_HPP_NAMESPACE::PushConstantRange * pPushConstantRanges_ ) VULKAN_HPP_NOEXCEPT { pPushConstantRanges = pPushConstantRanges_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) IndirectExecutionSetShaderInfoEXT & setPushConstantRanges( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & pushConstantRanges_ ) VULKAN_HPP_NOEXCEPT { pushConstantRangeCount = static_cast( pushConstantRanges_.size() ); pPushConstantRanges = pushConstantRanges_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkIndirectExecutionSetShaderInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkIndirectExecutionSetShaderInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, shaderCount, pInitialShaders, pSetLayoutInfos, maxShaderCount, pushConstantRangeCount, pPushConstantRanges ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( IndirectExecutionSetShaderInfoEXT const & ) const = default; #else bool operator==( IndirectExecutionSetShaderInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( shaderCount == rhs.shaderCount ) && ( pInitialShaders == rhs.pInitialShaders ) && ( pSetLayoutInfos == rhs.pSetLayoutInfos ) && ( maxShaderCount == rhs.maxShaderCount ) && ( pushConstantRangeCount == rhs.pushConstantRangeCount ) && ( pPushConstantRanges == rhs.pPushConstantRanges ); # endif } bool operator!=( IndirectExecutionSetShaderInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eIndirectExecutionSetShaderInfoEXT; const void * pNext = {}; uint32_t shaderCount = {}; const VULKAN_HPP_NAMESPACE::ShaderEXT * pInitialShaders = {}; const VULKAN_HPP_NAMESPACE::IndirectExecutionSetShaderLayoutInfoEXT * pSetLayoutInfos = {}; uint32_t maxShaderCount = {}; uint32_t pushConstantRangeCount = {}; const VULKAN_HPP_NAMESPACE::PushConstantRange * pPushConstantRanges = {}; }; template <> struct CppType { using Type = IndirectExecutionSetShaderInfoEXT; }; union IndirectExecutionSetInfoEXT { using NativeType = VkIndirectExecutionSetInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_UNION_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 IndirectExecutionSetInfoEXT( const VULKAN_HPP_NAMESPACE::IndirectExecutionSetPipelineInfoEXT * pPipelineInfo_ = {} ) : pPipelineInfo( pPipelineInfo_ ) { } VULKAN_HPP_CONSTEXPR_14 IndirectExecutionSetInfoEXT( const VULKAN_HPP_NAMESPACE::IndirectExecutionSetShaderInfoEXT * pShaderInfo_ ) : pShaderInfo( pShaderInfo_ ) { } #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_UNION_SETTERS ) VULKAN_HPP_CONSTEXPR_14 IndirectExecutionSetInfoEXT & setPPipelineInfo( const VULKAN_HPP_NAMESPACE::IndirectExecutionSetPipelineInfoEXT * pPipelineInfo_ ) VULKAN_HPP_NOEXCEPT { pPipelineInfo = pPipelineInfo_; return *this; } VULKAN_HPP_CONSTEXPR_14 IndirectExecutionSetInfoEXT & setPShaderInfo( const VULKAN_HPP_NAMESPACE::IndirectExecutionSetShaderInfoEXT * pShaderInfo_ ) VULKAN_HPP_NOEXCEPT { pShaderInfo = pShaderInfo_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkIndirectExecutionSetInfoEXT const &() const { return *reinterpret_cast( this ); } operator VkIndirectExecutionSetInfoEXT &() { return *reinterpret_cast( this ); } #ifdef VULKAN_HPP_HAS_UNRESTRICTED_UNIONS const VULKAN_HPP_NAMESPACE::IndirectExecutionSetPipelineInfoEXT * pPipelineInfo; const VULKAN_HPP_NAMESPACE::IndirectExecutionSetShaderInfoEXT * pShaderInfo; #else const VkIndirectExecutionSetPipelineInfoEXT * pPipelineInfo; const VkIndirectExecutionSetShaderInfoEXT * pShaderInfo; #endif /*VULKAN_HPP_HAS_UNRESTRICTED_UNIONS*/ }; struct IndirectExecutionSetCreateInfoEXT { using NativeType = VkIndirectExecutionSetCreateInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eIndirectExecutionSetCreateInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 IndirectExecutionSetCreateInfoEXT( VULKAN_HPP_NAMESPACE::IndirectExecutionSetInfoTypeEXT type_ = VULKAN_HPP_NAMESPACE::IndirectExecutionSetInfoTypeEXT::ePipelines, VULKAN_HPP_NAMESPACE::IndirectExecutionSetInfoEXT info_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , type{ type_ } , info{ info_ } { } VULKAN_HPP_CONSTEXPR_14 IndirectExecutionSetCreateInfoEXT( IndirectExecutionSetCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; IndirectExecutionSetCreateInfoEXT( VkIndirectExecutionSetCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : IndirectExecutionSetCreateInfoEXT( *reinterpret_cast( &rhs ) ) { } IndirectExecutionSetCreateInfoEXT & operator=( IndirectExecutionSetCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ IndirectExecutionSetCreateInfoEXT & operator=( VkIndirectExecutionSetCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 IndirectExecutionSetCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 IndirectExecutionSetCreateInfoEXT & setType( VULKAN_HPP_NAMESPACE::IndirectExecutionSetInfoTypeEXT type_ ) VULKAN_HPP_NOEXCEPT { type = type_; return *this; } VULKAN_HPP_CONSTEXPR_14 IndirectExecutionSetCreateInfoEXT & setInfo( VULKAN_HPP_NAMESPACE::IndirectExecutionSetInfoEXT const & info_ ) VULKAN_HPP_NOEXCEPT { info = info_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkIndirectExecutionSetCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkIndirectExecutionSetCreateInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, type, info ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eIndirectExecutionSetCreateInfoEXT; const void * pNext = {}; VULKAN_HPP_NAMESPACE::IndirectExecutionSetInfoTypeEXT type = VULKAN_HPP_NAMESPACE::IndirectExecutionSetInfoTypeEXT::ePipelines; VULKAN_HPP_NAMESPACE::IndirectExecutionSetInfoEXT info = {}; }; template <> struct CppType { using Type = IndirectExecutionSetCreateInfoEXT; }; struct InitializePerformanceApiInfoINTEL { using NativeType = VkInitializePerformanceApiInfoINTEL; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eInitializePerformanceApiInfoINTEL; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR InitializePerformanceApiInfoINTEL( void * pUserData_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , pUserData{ pUserData_ } { } VULKAN_HPP_CONSTEXPR InitializePerformanceApiInfoINTEL( InitializePerformanceApiInfoINTEL const & rhs ) VULKAN_HPP_NOEXCEPT = default; InitializePerformanceApiInfoINTEL( VkInitializePerformanceApiInfoINTEL const & rhs ) VULKAN_HPP_NOEXCEPT : InitializePerformanceApiInfoINTEL( *reinterpret_cast( &rhs ) ) { } InitializePerformanceApiInfoINTEL & operator=( InitializePerformanceApiInfoINTEL const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ InitializePerformanceApiInfoINTEL & operator=( VkInitializePerformanceApiInfoINTEL const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 InitializePerformanceApiInfoINTEL & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 InitializePerformanceApiInfoINTEL & setPUserData( void * pUserData_ ) VULKAN_HPP_NOEXCEPT { pUserData = pUserData_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkInitializePerformanceApiInfoINTEL const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkInitializePerformanceApiInfoINTEL &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, pUserData ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( InitializePerformanceApiInfoINTEL const & ) const = default; #else bool operator==( InitializePerformanceApiInfoINTEL const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( pUserData == rhs.pUserData ); # endif } bool operator!=( InitializePerformanceApiInfoINTEL const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eInitializePerformanceApiInfoINTEL; const void * pNext = {}; void * pUserData = {}; }; template <> struct CppType { using Type = InitializePerformanceApiInfoINTEL; }; struct InputAttachmentAspectReference { using NativeType = VkInputAttachmentAspectReference; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR InputAttachmentAspectReference( uint32_t subpass_ = {}, uint32_t inputAttachmentIndex_ = {}, VULKAN_HPP_NAMESPACE::ImageAspectFlags aspectMask_ = {} ) VULKAN_HPP_NOEXCEPT : subpass{ subpass_ } , inputAttachmentIndex{ inputAttachmentIndex_ } , aspectMask{ aspectMask_ } { } VULKAN_HPP_CONSTEXPR InputAttachmentAspectReference( InputAttachmentAspectReference const & rhs ) VULKAN_HPP_NOEXCEPT = default; InputAttachmentAspectReference( VkInputAttachmentAspectReference const & rhs ) VULKAN_HPP_NOEXCEPT : InputAttachmentAspectReference( *reinterpret_cast( &rhs ) ) { } InputAttachmentAspectReference & operator=( InputAttachmentAspectReference const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ InputAttachmentAspectReference & operator=( VkInputAttachmentAspectReference const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 InputAttachmentAspectReference & setSubpass( uint32_t subpass_ ) VULKAN_HPP_NOEXCEPT { subpass = subpass_; return *this; } VULKAN_HPP_CONSTEXPR_14 InputAttachmentAspectReference & setInputAttachmentIndex( uint32_t inputAttachmentIndex_ ) VULKAN_HPP_NOEXCEPT { inputAttachmentIndex = inputAttachmentIndex_; return *this; } VULKAN_HPP_CONSTEXPR_14 InputAttachmentAspectReference & setAspectMask( VULKAN_HPP_NAMESPACE::ImageAspectFlags aspectMask_ ) VULKAN_HPP_NOEXCEPT { aspectMask = aspectMask_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkInputAttachmentAspectReference const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkInputAttachmentAspectReference &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( subpass, inputAttachmentIndex, aspectMask ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( InputAttachmentAspectReference const & ) const = default; #else bool operator==( InputAttachmentAspectReference const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( subpass == rhs.subpass ) && ( inputAttachmentIndex == rhs.inputAttachmentIndex ) && ( aspectMask == rhs.aspectMask ); # endif } bool operator!=( InputAttachmentAspectReference const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: uint32_t subpass = {}; uint32_t inputAttachmentIndex = {}; VULKAN_HPP_NAMESPACE::ImageAspectFlags aspectMask = {}; }; using InputAttachmentAspectReferenceKHR = InputAttachmentAspectReference; struct InstanceCreateInfo { using NativeType = VkInstanceCreateInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eInstanceCreateInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR InstanceCreateInfo( VULKAN_HPP_NAMESPACE::InstanceCreateFlags flags_ = {}, const VULKAN_HPP_NAMESPACE::ApplicationInfo * pApplicationInfo_ = {}, uint32_t enabledLayerCount_ = {}, const char * const * ppEnabledLayerNames_ = {}, uint32_t enabledExtensionCount_ = {}, const char * const * ppEnabledExtensionNames_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , pApplicationInfo{ pApplicationInfo_ } , enabledLayerCount{ enabledLayerCount_ } , ppEnabledLayerNames{ ppEnabledLayerNames_ } , enabledExtensionCount{ enabledExtensionCount_ } , ppEnabledExtensionNames{ ppEnabledExtensionNames_ } { } VULKAN_HPP_CONSTEXPR InstanceCreateInfo( InstanceCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; InstanceCreateInfo( VkInstanceCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT : InstanceCreateInfo( *reinterpret_cast( &rhs ) ) {} # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) InstanceCreateInfo( VULKAN_HPP_NAMESPACE::InstanceCreateFlags flags_, const VULKAN_HPP_NAMESPACE::ApplicationInfo * pApplicationInfo_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & pEnabledLayerNames_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & pEnabledExtensionNames_ = {}, const void * pNext_ = nullptr ) : pNext( pNext_ ) , flags( flags_ ) , pApplicationInfo( pApplicationInfo_ ) , enabledLayerCount( static_cast( pEnabledLayerNames_.size() ) ) , ppEnabledLayerNames( pEnabledLayerNames_.data() ) , enabledExtensionCount( static_cast( pEnabledExtensionNames_.size() ) ) , ppEnabledExtensionNames( pEnabledExtensionNames_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ InstanceCreateInfo & operator=( InstanceCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ InstanceCreateInfo & operator=( VkInstanceCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 InstanceCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 InstanceCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::InstanceCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 InstanceCreateInfo & setPApplicationInfo( const VULKAN_HPP_NAMESPACE::ApplicationInfo * pApplicationInfo_ ) VULKAN_HPP_NOEXCEPT { pApplicationInfo = pApplicationInfo_; return *this; } VULKAN_HPP_CONSTEXPR_14 InstanceCreateInfo & setEnabledLayerCount( uint32_t enabledLayerCount_ ) VULKAN_HPP_NOEXCEPT { enabledLayerCount = enabledLayerCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 InstanceCreateInfo & setPpEnabledLayerNames( const char * const * ppEnabledLayerNames_ ) VULKAN_HPP_NOEXCEPT { ppEnabledLayerNames = ppEnabledLayerNames_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) InstanceCreateInfo & setPEnabledLayerNames( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & pEnabledLayerNames_ ) VULKAN_HPP_NOEXCEPT { enabledLayerCount = static_cast( pEnabledLayerNames_.size() ); ppEnabledLayerNames = pEnabledLayerNames_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 InstanceCreateInfo & setEnabledExtensionCount( uint32_t enabledExtensionCount_ ) VULKAN_HPP_NOEXCEPT { enabledExtensionCount = enabledExtensionCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 InstanceCreateInfo & setPpEnabledExtensionNames( const char * const * ppEnabledExtensionNames_ ) VULKAN_HPP_NOEXCEPT { ppEnabledExtensionNames = ppEnabledExtensionNames_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) InstanceCreateInfo & setPEnabledExtensionNames( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & pEnabledExtensionNames_ ) VULKAN_HPP_NOEXCEPT { enabledExtensionCount = static_cast( pEnabledExtensionNames_.size() ); ppEnabledExtensionNames = pEnabledExtensionNames_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkInstanceCreateInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkInstanceCreateInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, pApplicationInfo, enabledLayerCount, ppEnabledLayerNames, enabledExtensionCount, ppEnabledExtensionNames ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) std::strong_ordering operator<=>( InstanceCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { if ( auto cmp = sType <=> rhs.sType; cmp != 0 ) return cmp; if ( auto cmp = pNext <=> rhs.pNext; cmp != 0 ) return cmp; if ( auto cmp = flags <=> rhs.flags; cmp != 0 ) return cmp; if ( auto cmp = pApplicationInfo <=> rhs.pApplicationInfo; cmp != 0 ) return cmp; if ( auto cmp = enabledLayerCount <=> rhs.enabledLayerCount; cmp != 0 ) return cmp; for ( size_t i = 0; i < enabledLayerCount; ++i ) { if ( ppEnabledLayerNames[i] != rhs.ppEnabledLayerNames[i] ) if ( auto cmp = strcmp( ppEnabledLayerNames[i], rhs.ppEnabledLayerNames[i] ); cmp != 0 ) return cmp < 0 ? std::strong_ordering::less : std::strong_ordering::greater; } if ( auto cmp = enabledExtensionCount <=> rhs.enabledExtensionCount; cmp != 0 ) return cmp; for ( size_t i = 0; i < enabledExtensionCount; ++i ) { if ( ppEnabledExtensionNames[i] != rhs.ppEnabledExtensionNames[i] ) if ( auto cmp = strcmp( ppEnabledExtensionNames[i], rhs.ppEnabledExtensionNames[i] ); cmp != 0 ) return cmp < 0 ? std::strong_ordering::less : std::strong_ordering::greater; } return std::strong_ordering::equivalent; } #endif bool operator==( InstanceCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( pApplicationInfo == rhs.pApplicationInfo ) && ( enabledLayerCount == rhs.enabledLayerCount ) && std::equal( ppEnabledLayerNames, ppEnabledLayerNames + enabledLayerCount, rhs.ppEnabledLayerNames, []( char const * left, char const * right ) { return ( left == right ) || ( strcmp( left, right ) == 0 ); } ) && ( enabledExtensionCount == rhs.enabledExtensionCount ) && std::equal( ppEnabledExtensionNames, ppEnabledExtensionNames + enabledExtensionCount, rhs.ppEnabledExtensionNames, []( char const * left, char const * right ) { return ( left == right ) || ( strcmp( left, right ) == 0 ); } ); } bool operator!=( InstanceCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eInstanceCreateInfo; const void * pNext = {}; VULKAN_HPP_NAMESPACE::InstanceCreateFlags flags = {}; const VULKAN_HPP_NAMESPACE::ApplicationInfo * pApplicationInfo = {}; uint32_t enabledLayerCount = {}; const char * const * ppEnabledLayerNames = {}; uint32_t enabledExtensionCount = {}; const char * const * ppEnabledExtensionNames = {}; }; template <> struct CppType { using Type = InstanceCreateInfo; }; struct LatencySleepInfoNV { using NativeType = VkLatencySleepInfoNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eLatencySleepInfoNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR LatencySleepInfoNV( VULKAN_HPP_NAMESPACE::Semaphore signalSemaphore_ = {}, uint64_t value_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , signalSemaphore{ signalSemaphore_ } , value{ value_ } { } VULKAN_HPP_CONSTEXPR LatencySleepInfoNV( LatencySleepInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; LatencySleepInfoNV( VkLatencySleepInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT : LatencySleepInfoNV( *reinterpret_cast( &rhs ) ) {} LatencySleepInfoNV & operator=( LatencySleepInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ LatencySleepInfoNV & operator=( VkLatencySleepInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 LatencySleepInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 LatencySleepInfoNV & setSignalSemaphore( VULKAN_HPP_NAMESPACE::Semaphore signalSemaphore_ ) VULKAN_HPP_NOEXCEPT { signalSemaphore = signalSemaphore_; return *this; } VULKAN_HPP_CONSTEXPR_14 LatencySleepInfoNV & setValue( uint64_t value_ ) VULKAN_HPP_NOEXCEPT { value = value_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkLatencySleepInfoNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkLatencySleepInfoNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, signalSemaphore, value ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( LatencySleepInfoNV const & ) const = default; #else bool operator==( LatencySleepInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( signalSemaphore == rhs.signalSemaphore ) && ( value == rhs.value ); # endif } bool operator!=( LatencySleepInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eLatencySleepInfoNV; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Semaphore signalSemaphore = {}; uint64_t value = {}; }; template <> struct CppType { using Type = LatencySleepInfoNV; }; struct LatencySleepModeInfoNV { using NativeType = VkLatencySleepModeInfoNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eLatencySleepModeInfoNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR LatencySleepModeInfoNV( VULKAN_HPP_NAMESPACE::Bool32 lowLatencyMode_ = {}, VULKAN_HPP_NAMESPACE::Bool32 lowLatencyBoost_ = {}, uint32_t minimumIntervalUs_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , lowLatencyMode{ lowLatencyMode_ } , lowLatencyBoost{ lowLatencyBoost_ } , minimumIntervalUs{ minimumIntervalUs_ } { } VULKAN_HPP_CONSTEXPR LatencySleepModeInfoNV( LatencySleepModeInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; LatencySleepModeInfoNV( VkLatencySleepModeInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT : LatencySleepModeInfoNV( *reinterpret_cast( &rhs ) ) { } LatencySleepModeInfoNV & operator=( LatencySleepModeInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ LatencySleepModeInfoNV & operator=( VkLatencySleepModeInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 LatencySleepModeInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 LatencySleepModeInfoNV & setLowLatencyMode( VULKAN_HPP_NAMESPACE::Bool32 lowLatencyMode_ ) VULKAN_HPP_NOEXCEPT { lowLatencyMode = lowLatencyMode_; return *this; } VULKAN_HPP_CONSTEXPR_14 LatencySleepModeInfoNV & setLowLatencyBoost( VULKAN_HPP_NAMESPACE::Bool32 lowLatencyBoost_ ) VULKAN_HPP_NOEXCEPT { lowLatencyBoost = lowLatencyBoost_; return *this; } VULKAN_HPP_CONSTEXPR_14 LatencySleepModeInfoNV & setMinimumIntervalUs( uint32_t minimumIntervalUs_ ) VULKAN_HPP_NOEXCEPT { minimumIntervalUs = minimumIntervalUs_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkLatencySleepModeInfoNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkLatencySleepModeInfoNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, lowLatencyMode, lowLatencyBoost, minimumIntervalUs ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( LatencySleepModeInfoNV const & ) const = default; #else bool operator==( LatencySleepModeInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( lowLatencyMode == rhs.lowLatencyMode ) && ( lowLatencyBoost == rhs.lowLatencyBoost ) && ( minimumIntervalUs == rhs.minimumIntervalUs ); # endif } bool operator!=( LatencySleepModeInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eLatencySleepModeInfoNV; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 lowLatencyMode = {}; VULKAN_HPP_NAMESPACE::Bool32 lowLatencyBoost = {}; uint32_t minimumIntervalUs = {}; }; template <> struct CppType { using Type = LatencySleepModeInfoNV; }; struct LatencySubmissionPresentIdNV { using NativeType = VkLatencySubmissionPresentIdNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eLatencySubmissionPresentIdNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR LatencySubmissionPresentIdNV( uint64_t presentID_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , presentID{ presentID_ } { } VULKAN_HPP_CONSTEXPR LatencySubmissionPresentIdNV( LatencySubmissionPresentIdNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; LatencySubmissionPresentIdNV( VkLatencySubmissionPresentIdNV const & rhs ) VULKAN_HPP_NOEXCEPT : LatencySubmissionPresentIdNV( *reinterpret_cast( &rhs ) ) { } LatencySubmissionPresentIdNV & operator=( LatencySubmissionPresentIdNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ LatencySubmissionPresentIdNV & operator=( VkLatencySubmissionPresentIdNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 LatencySubmissionPresentIdNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 LatencySubmissionPresentIdNV & setPresentID( uint64_t presentID_ ) VULKAN_HPP_NOEXCEPT { presentID = presentID_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkLatencySubmissionPresentIdNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkLatencySubmissionPresentIdNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, presentID ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( LatencySubmissionPresentIdNV const & ) const = default; #else bool operator==( LatencySubmissionPresentIdNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( presentID == rhs.presentID ); # endif } bool operator!=( LatencySubmissionPresentIdNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eLatencySubmissionPresentIdNV; const void * pNext = {}; uint64_t presentID = {}; }; template <> struct CppType { using Type = LatencySubmissionPresentIdNV; }; struct LatencySurfaceCapabilitiesNV { using NativeType = VkLatencySurfaceCapabilitiesNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eLatencySurfaceCapabilitiesNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR LatencySurfaceCapabilitiesNV( uint32_t presentModeCount_ = {}, VULKAN_HPP_NAMESPACE::PresentModeKHR * pPresentModes_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , presentModeCount{ presentModeCount_ } , pPresentModes{ pPresentModes_ } { } VULKAN_HPP_CONSTEXPR LatencySurfaceCapabilitiesNV( LatencySurfaceCapabilitiesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; LatencySurfaceCapabilitiesNV( VkLatencySurfaceCapabilitiesNV const & rhs ) VULKAN_HPP_NOEXCEPT : LatencySurfaceCapabilitiesNV( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) LatencySurfaceCapabilitiesNV( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & presentModes_, const void * pNext_ = nullptr ) : pNext( pNext_ ), presentModeCount( static_cast( presentModes_.size() ) ), pPresentModes( presentModes_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ LatencySurfaceCapabilitiesNV & operator=( LatencySurfaceCapabilitiesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ LatencySurfaceCapabilitiesNV & operator=( VkLatencySurfaceCapabilitiesNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 LatencySurfaceCapabilitiesNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 LatencySurfaceCapabilitiesNV & setPresentModeCount( uint32_t presentModeCount_ ) VULKAN_HPP_NOEXCEPT { presentModeCount = presentModeCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 LatencySurfaceCapabilitiesNV & setPPresentModes( VULKAN_HPP_NAMESPACE::PresentModeKHR * pPresentModes_ ) VULKAN_HPP_NOEXCEPT { pPresentModes = pPresentModes_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) LatencySurfaceCapabilitiesNV & setPresentModes( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & presentModes_ ) VULKAN_HPP_NOEXCEPT { presentModeCount = static_cast( presentModes_.size() ); pPresentModes = presentModes_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkLatencySurfaceCapabilitiesNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkLatencySurfaceCapabilitiesNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, presentModeCount, pPresentModes ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( LatencySurfaceCapabilitiesNV const & ) const = default; #else bool operator==( LatencySurfaceCapabilitiesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( presentModeCount == rhs.presentModeCount ) && ( pPresentModes == rhs.pPresentModes ); # endif } bool operator!=( LatencySurfaceCapabilitiesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eLatencySurfaceCapabilitiesNV; const void * pNext = {}; uint32_t presentModeCount = {}; VULKAN_HPP_NAMESPACE::PresentModeKHR * pPresentModes = {}; }; template <> struct CppType { using Type = LatencySurfaceCapabilitiesNV; }; struct LayerProperties { using NativeType = VkLayerProperties; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 LayerProperties( std::array const & layerName_ = {}, uint32_t specVersion_ = {}, uint32_t implementationVersion_ = {}, std::array const & description_ = {} ) VULKAN_HPP_NOEXCEPT : layerName{ layerName_ } , specVersion{ specVersion_ } , implementationVersion{ implementationVersion_ } , description{ description_ } { } VULKAN_HPP_CONSTEXPR_14 LayerProperties( LayerProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; LayerProperties( VkLayerProperties const & rhs ) VULKAN_HPP_NOEXCEPT : LayerProperties( *reinterpret_cast( &rhs ) ) {} LayerProperties & operator=( LayerProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ LayerProperties & operator=( VkLayerProperties const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkLayerProperties const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkLayerProperties &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple const &, uint32_t const &, uint32_t const &, VULKAN_HPP_NAMESPACE::ArrayWrapper1D const &> # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( layerName, specVersion, implementationVersion, description ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) std::strong_ordering operator<=>( LayerProperties const & rhs ) const VULKAN_HPP_NOEXCEPT { if ( auto cmp = strcmp( layerName, rhs.layerName ); cmp != 0 ) return ( cmp < 0 ) ? std::strong_ordering::less : std::strong_ordering::greater; if ( auto cmp = specVersion <=> rhs.specVersion; cmp != 0 ) return cmp; if ( auto cmp = implementationVersion <=> rhs.implementationVersion; cmp != 0 ) return cmp; if ( auto cmp = strcmp( description, rhs.description ); cmp != 0 ) return ( cmp < 0 ) ? std::strong_ordering::less : std::strong_ordering::greater; return std::strong_ordering::equivalent; } #endif bool operator==( LayerProperties const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( strcmp( layerName, rhs.layerName ) == 0 ) && ( specVersion == rhs.specVersion ) && ( implementationVersion == rhs.implementationVersion ) && ( strcmp( description, rhs.description ) == 0 ); } bool operator!=( LayerProperties const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::ArrayWrapper1D layerName = {}; uint32_t specVersion = {}; uint32_t implementationVersion = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D description = {}; }; struct LayerSettingEXT { using NativeType = VkLayerSettingEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR LayerSettingEXT( const char * pLayerName_ = {}, const char * pSettingName_ = {}, VULKAN_HPP_NAMESPACE::LayerSettingTypeEXT type_ = VULKAN_HPP_NAMESPACE::LayerSettingTypeEXT::eBool32, uint32_t valueCount_ = {}, const void * pValues_ = {} ) VULKAN_HPP_NOEXCEPT : pLayerName{ pLayerName_ } , pSettingName{ pSettingName_ } , type{ type_ } , valueCount{ valueCount_ } , pValues{ pValues_ } { } VULKAN_HPP_CONSTEXPR LayerSettingEXT( LayerSettingEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; LayerSettingEXT( VkLayerSettingEXT const & rhs ) VULKAN_HPP_NOEXCEPT : LayerSettingEXT( *reinterpret_cast( &rhs ) ) {} # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) // NOTE: you need to provide the type because vk::Bool32 and uint32_t are indistinguishable! LayerSettingEXT( char const * pLayerName_, char const * pSettingName_, VULKAN_HPP_NAMESPACE::LayerSettingTypeEXT type_, vk::ArrayProxyNoTemporaries const & values_ ) : pLayerName( pLayerName_ ) , pSettingName( pSettingName_ ) , type( type_ ) , valueCount( static_cast( values_.size() ) ) , pValues( values_.data() ) { VULKAN_HPP_ASSERT( VULKAN_HPP_NAMESPACE::isSameType( type ) ); } LayerSettingEXT( char const * pLayerName_, char const * pSettingName_, VULKAN_HPP_NAMESPACE::LayerSettingTypeEXT type_, vk::ArrayProxyNoTemporaries const & values_ ) : pLayerName( pLayerName_ ) , pSettingName( pSettingName_ ) , type( type_ ) , valueCount( static_cast( values_.size() ) ) , pValues( values_.data() ) { VULKAN_HPP_ASSERT( VULKAN_HPP_NAMESPACE::isSameType( type ) ); } LayerSettingEXT( char const * pLayerName_, char const * pSettingName_, VULKAN_HPP_NAMESPACE::LayerSettingTypeEXT type_, vk::ArrayProxyNoTemporaries const & values_ ) : pLayerName( pLayerName_ ) , pSettingName( pSettingName_ ) , type( type_ ) , valueCount( static_cast( values_.size() ) ) , pValues( values_.data() ) { VULKAN_HPP_ASSERT( VULKAN_HPP_NAMESPACE::isSameType( type ) ); } LayerSettingEXT( char const * pLayerName_, char const * pSettingName_, VULKAN_HPP_NAMESPACE::LayerSettingTypeEXT type_, vk::ArrayProxyNoTemporaries const & values_ ) : pLayerName( pLayerName_ ) , pSettingName( pSettingName_ ) , type( type_ ) , valueCount( static_cast( values_.size() ) ) , pValues( values_.data() ) { VULKAN_HPP_ASSERT( VULKAN_HPP_NAMESPACE::isSameType( type ) ); } LayerSettingEXT( char const * pLayerName_, char const * pSettingName_, VULKAN_HPP_NAMESPACE::LayerSettingTypeEXT type_, vk::ArrayProxyNoTemporaries const & values_ ) : pLayerName( pLayerName_ ) , pSettingName( pSettingName_ ) , type( type_ ) , valueCount( static_cast( values_.size() ) ) , pValues( values_.data() ) { VULKAN_HPP_ASSERT( VULKAN_HPP_NAMESPACE::isSameType( type ) ); } LayerSettingEXT( char const * pLayerName_, char const * pSettingName_, VULKAN_HPP_NAMESPACE::LayerSettingTypeEXT type_, vk::ArrayProxyNoTemporaries const & values_ ) : pLayerName( pLayerName_ ) , pSettingName( pSettingName_ ) , type( type_ ) , valueCount( static_cast( values_.size() ) ) , pValues( values_.data() ) { VULKAN_HPP_ASSERT( VULKAN_HPP_NAMESPACE::isSameType( type ) ); } LayerSettingEXT( char const * pLayerName_, char const * pSettingName_, VULKAN_HPP_NAMESPACE::LayerSettingTypeEXT type_, vk::ArrayProxyNoTemporaries const & values_ ) : pLayerName( pLayerName_ ) , pSettingName( pSettingName_ ) , type( type_ ) , valueCount( static_cast( values_.size() ) ) , pValues( values_.data() ) { VULKAN_HPP_ASSERT( VULKAN_HPP_NAMESPACE::isSameType( type ) ); } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ LayerSettingEXT & operator=( LayerSettingEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ LayerSettingEXT & operator=( VkLayerSettingEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 LayerSettingEXT & setPLayerName( const char * pLayerName_ ) VULKAN_HPP_NOEXCEPT { pLayerName = pLayerName_; return *this; } VULKAN_HPP_CONSTEXPR_14 LayerSettingEXT & setPSettingName( const char * pSettingName_ ) VULKAN_HPP_NOEXCEPT { pSettingName = pSettingName_; return *this; } VULKAN_HPP_CONSTEXPR_14 LayerSettingEXT & setType( VULKAN_HPP_NAMESPACE::LayerSettingTypeEXT type_ ) VULKAN_HPP_NOEXCEPT { type = type_; return *this; } VULKAN_HPP_CONSTEXPR_14 LayerSettingEXT & setValueCount( uint32_t valueCount_ ) VULKAN_HPP_NOEXCEPT { valueCount = valueCount_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) LayerSettingEXT & setValues( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & values_ ) VULKAN_HPP_NOEXCEPT { valueCount = static_cast( values_.size() ); pValues = values_.data(); return *this; } LayerSettingEXT & setValues( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & values_ ) VULKAN_HPP_NOEXCEPT { valueCount = static_cast( values_.size() ); pValues = values_.data(); return *this; } LayerSettingEXT & setValues( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & values_ ) VULKAN_HPP_NOEXCEPT { valueCount = static_cast( values_.size() ); pValues = values_.data(); return *this; } LayerSettingEXT & setValues( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & values_ ) VULKAN_HPP_NOEXCEPT { valueCount = static_cast( values_.size() ); pValues = values_.data(); return *this; } LayerSettingEXT & setValues( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & values_ ) VULKAN_HPP_NOEXCEPT { valueCount = static_cast( values_.size() ); pValues = values_.data(); return *this; } LayerSettingEXT & setValues( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & values_ ) VULKAN_HPP_NOEXCEPT { valueCount = static_cast( values_.size() ); pValues = values_.data(); return *this; } LayerSettingEXT & setValues( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & values_ ) VULKAN_HPP_NOEXCEPT { valueCount = static_cast( values_.size() ); pValues = values_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkLayerSettingEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkLayerSettingEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( pLayerName, pSettingName, type, valueCount, pValues ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) std::strong_ordering operator<=>( LayerSettingEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { if ( pLayerName != rhs.pLayerName ) if ( auto cmp = strcmp( pLayerName, rhs.pLayerName ); cmp != 0 ) return ( cmp < 0 ) ? std::strong_ordering::less : std::strong_ordering::greater; if ( pSettingName != rhs.pSettingName ) if ( auto cmp = strcmp( pSettingName, rhs.pSettingName ); cmp != 0 ) return ( cmp < 0 ) ? std::strong_ordering::less : std::strong_ordering::greater; if ( auto cmp = type <=> rhs.type; cmp != 0 ) return cmp; if ( auto cmp = valueCount <=> rhs.valueCount; cmp != 0 ) return cmp; if ( auto cmp = pValues <=> rhs.pValues; cmp != 0 ) return cmp; return std::strong_ordering::equivalent; } #endif bool operator==( LayerSettingEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( ( pLayerName == rhs.pLayerName ) || ( strcmp( pLayerName, rhs.pLayerName ) == 0 ) ) && ( ( pSettingName == rhs.pSettingName ) || ( strcmp( pSettingName, rhs.pSettingName ) == 0 ) ) && ( type == rhs.type ) && ( valueCount == rhs.valueCount ) && ( pValues == rhs.pValues ); } bool operator!=( LayerSettingEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: const char * pLayerName = {}; const char * pSettingName = {}; VULKAN_HPP_NAMESPACE::LayerSettingTypeEXT type = VULKAN_HPP_NAMESPACE::LayerSettingTypeEXT::eBool32; uint32_t valueCount = {}; const void * pValues = {}; }; struct LayerSettingsCreateInfoEXT { using NativeType = VkLayerSettingsCreateInfoEXT; static const bool allowDuplicate = true; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eLayerSettingsCreateInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR LayerSettingsCreateInfoEXT( uint32_t settingCount_ = {}, const VULKAN_HPP_NAMESPACE::LayerSettingEXT * pSettings_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , settingCount{ settingCount_ } , pSettings{ pSettings_ } { } VULKAN_HPP_CONSTEXPR LayerSettingsCreateInfoEXT( LayerSettingsCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; LayerSettingsCreateInfoEXT( VkLayerSettingsCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : LayerSettingsCreateInfoEXT( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) LayerSettingsCreateInfoEXT( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & settings_, const void * pNext_ = nullptr ) : pNext( pNext_ ), settingCount( static_cast( settings_.size() ) ), pSettings( settings_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ LayerSettingsCreateInfoEXT & operator=( LayerSettingsCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ LayerSettingsCreateInfoEXT & operator=( VkLayerSettingsCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 LayerSettingsCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 LayerSettingsCreateInfoEXT & setSettingCount( uint32_t settingCount_ ) VULKAN_HPP_NOEXCEPT { settingCount = settingCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 LayerSettingsCreateInfoEXT & setPSettings( const VULKAN_HPP_NAMESPACE::LayerSettingEXT * pSettings_ ) VULKAN_HPP_NOEXCEPT { pSettings = pSettings_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) LayerSettingsCreateInfoEXT & setSettings( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & settings_ ) VULKAN_HPP_NOEXCEPT { settingCount = static_cast( settings_.size() ); pSettings = settings_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkLayerSettingsCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkLayerSettingsCreateInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, settingCount, pSettings ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( LayerSettingsCreateInfoEXT const & ) const = default; #else bool operator==( LayerSettingsCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( settingCount == rhs.settingCount ) && ( pSettings == rhs.pSettings ); # endif } bool operator!=( LayerSettingsCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eLayerSettingsCreateInfoEXT; const void * pNext = {}; uint32_t settingCount = {}; const VULKAN_HPP_NAMESPACE::LayerSettingEXT * pSettings = {}; }; template <> struct CppType { using Type = LayerSettingsCreateInfoEXT; }; #if defined( VK_USE_PLATFORM_MACOS_MVK ) struct MacOSSurfaceCreateInfoMVK { using NativeType = VkMacOSSurfaceCreateInfoMVK; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eMacosSurfaceCreateInfoMVK; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR MacOSSurfaceCreateInfoMVK( VULKAN_HPP_NAMESPACE::MacOSSurfaceCreateFlagsMVK flags_ = {}, const void * pView_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , pView{ pView_ } { } VULKAN_HPP_CONSTEXPR MacOSSurfaceCreateInfoMVK( MacOSSurfaceCreateInfoMVK const & rhs ) VULKAN_HPP_NOEXCEPT = default; MacOSSurfaceCreateInfoMVK( VkMacOSSurfaceCreateInfoMVK const & rhs ) VULKAN_HPP_NOEXCEPT : MacOSSurfaceCreateInfoMVK( *reinterpret_cast( &rhs ) ) { } MacOSSurfaceCreateInfoMVK & operator=( MacOSSurfaceCreateInfoMVK const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ MacOSSurfaceCreateInfoMVK & operator=( VkMacOSSurfaceCreateInfoMVK const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } # if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 MacOSSurfaceCreateInfoMVK & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 MacOSSurfaceCreateInfoMVK & setFlags( VULKAN_HPP_NAMESPACE::MacOSSurfaceCreateFlagsMVK flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 MacOSSurfaceCreateInfoMVK & setPView( const void * pView_ ) VULKAN_HPP_NOEXCEPT { pView = pView_; return *this; } # endif /*VULKAN_HPP_NO_SETTERS*/ operator VkMacOSSurfaceCreateInfoMVK const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkMacOSSurfaceCreateInfoMVK &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std:: tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, pView ); } # endif # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( MacOSSurfaceCreateInfoMVK const & ) const = default; # else bool operator==( MacOSSurfaceCreateInfoMVK const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( pView == rhs.pView ); # endif } bool operator!=( MacOSSurfaceCreateInfoMVK const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } # endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eMacosSurfaceCreateInfoMVK; const void * pNext = {}; VULKAN_HPP_NAMESPACE::MacOSSurfaceCreateFlagsMVK flags = {}; const void * pView = {}; }; template <> struct CppType { using Type = MacOSSurfaceCreateInfoMVK; }; #endif /*VK_USE_PLATFORM_MACOS_MVK*/ struct MappedMemoryRange { using NativeType = VkMappedMemoryRange; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eMappedMemoryRange; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR MappedMemoryRange( VULKAN_HPP_NAMESPACE::DeviceMemory memory_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize offset_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize size_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , memory{ memory_ } , offset{ offset_ } , size{ size_ } { } VULKAN_HPP_CONSTEXPR MappedMemoryRange( MappedMemoryRange const & rhs ) VULKAN_HPP_NOEXCEPT = default; MappedMemoryRange( VkMappedMemoryRange const & rhs ) VULKAN_HPP_NOEXCEPT : MappedMemoryRange( *reinterpret_cast( &rhs ) ) {} MappedMemoryRange & operator=( MappedMemoryRange const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ MappedMemoryRange & operator=( VkMappedMemoryRange const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 MappedMemoryRange & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 MappedMemoryRange & setMemory( VULKAN_HPP_NAMESPACE::DeviceMemory memory_ ) VULKAN_HPP_NOEXCEPT { memory = memory_; return *this; } VULKAN_HPP_CONSTEXPR_14 MappedMemoryRange & setOffset( VULKAN_HPP_NAMESPACE::DeviceSize offset_ ) VULKAN_HPP_NOEXCEPT { offset = offset_; return *this; } VULKAN_HPP_CONSTEXPR_14 MappedMemoryRange & setSize( VULKAN_HPP_NAMESPACE::DeviceSize size_ ) VULKAN_HPP_NOEXCEPT { size = size_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkMappedMemoryRange const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkMappedMemoryRange &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, memory, offset, size ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( MappedMemoryRange const & ) const = default; #else bool operator==( MappedMemoryRange const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( memory == rhs.memory ) && ( offset == rhs.offset ) && ( size == rhs.size ); # endif } bool operator!=( MappedMemoryRange const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eMappedMemoryRange; const void * pNext = {}; VULKAN_HPP_NAMESPACE::DeviceMemory memory = {}; VULKAN_HPP_NAMESPACE::DeviceSize offset = {}; VULKAN_HPP_NAMESPACE::DeviceSize size = {}; }; template <> struct CppType { using Type = MappedMemoryRange; }; struct MemoryAllocateFlagsInfo { using NativeType = VkMemoryAllocateFlagsInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eMemoryAllocateFlagsInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR MemoryAllocateFlagsInfo( VULKAN_HPP_NAMESPACE::MemoryAllocateFlags flags_ = {}, uint32_t deviceMask_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , deviceMask{ deviceMask_ } { } VULKAN_HPP_CONSTEXPR MemoryAllocateFlagsInfo( MemoryAllocateFlagsInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; MemoryAllocateFlagsInfo( VkMemoryAllocateFlagsInfo const & rhs ) VULKAN_HPP_NOEXCEPT : MemoryAllocateFlagsInfo( *reinterpret_cast( &rhs ) ) { } MemoryAllocateFlagsInfo & operator=( MemoryAllocateFlagsInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ MemoryAllocateFlagsInfo & operator=( VkMemoryAllocateFlagsInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 MemoryAllocateFlagsInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 MemoryAllocateFlagsInfo & setFlags( VULKAN_HPP_NAMESPACE::MemoryAllocateFlags flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 MemoryAllocateFlagsInfo & setDeviceMask( uint32_t deviceMask_ ) VULKAN_HPP_NOEXCEPT { deviceMask = deviceMask_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkMemoryAllocateFlagsInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkMemoryAllocateFlagsInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, deviceMask ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( MemoryAllocateFlagsInfo const & ) const = default; #else bool operator==( MemoryAllocateFlagsInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( deviceMask == rhs.deviceMask ); # endif } bool operator!=( MemoryAllocateFlagsInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eMemoryAllocateFlagsInfo; const void * pNext = {}; VULKAN_HPP_NAMESPACE::MemoryAllocateFlags flags = {}; uint32_t deviceMask = {}; }; template <> struct CppType { using Type = MemoryAllocateFlagsInfo; }; using MemoryAllocateFlagsInfoKHR = MemoryAllocateFlagsInfo; struct MemoryAllocateInfo { using NativeType = VkMemoryAllocateInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eMemoryAllocateInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR MemoryAllocateInfo( VULKAN_HPP_NAMESPACE::DeviceSize allocationSize_ = {}, uint32_t memoryTypeIndex_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , allocationSize{ allocationSize_ } , memoryTypeIndex{ memoryTypeIndex_ } { } VULKAN_HPP_CONSTEXPR MemoryAllocateInfo( MemoryAllocateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; MemoryAllocateInfo( VkMemoryAllocateInfo const & rhs ) VULKAN_HPP_NOEXCEPT : MemoryAllocateInfo( *reinterpret_cast( &rhs ) ) {} MemoryAllocateInfo & operator=( MemoryAllocateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ MemoryAllocateInfo & operator=( VkMemoryAllocateInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 MemoryAllocateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 MemoryAllocateInfo & setAllocationSize( VULKAN_HPP_NAMESPACE::DeviceSize allocationSize_ ) VULKAN_HPP_NOEXCEPT { allocationSize = allocationSize_; return *this; } VULKAN_HPP_CONSTEXPR_14 MemoryAllocateInfo & setMemoryTypeIndex( uint32_t memoryTypeIndex_ ) VULKAN_HPP_NOEXCEPT { memoryTypeIndex = memoryTypeIndex_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkMemoryAllocateInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkMemoryAllocateInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, allocationSize, memoryTypeIndex ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( MemoryAllocateInfo const & ) const = default; #else bool operator==( MemoryAllocateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( allocationSize == rhs.allocationSize ) && ( memoryTypeIndex == rhs.memoryTypeIndex ); # endif } bool operator!=( MemoryAllocateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eMemoryAllocateInfo; const void * pNext = {}; VULKAN_HPP_NAMESPACE::DeviceSize allocationSize = {}; uint32_t memoryTypeIndex = {}; }; template <> struct CppType { using Type = MemoryAllocateInfo; }; struct MemoryBarrier { using NativeType = VkMemoryBarrier; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eMemoryBarrier; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR MemoryBarrier( VULKAN_HPP_NAMESPACE::AccessFlags srcAccessMask_ = {}, VULKAN_HPP_NAMESPACE::AccessFlags dstAccessMask_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , srcAccessMask{ srcAccessMask_ } , dstAccessMask{ dstAccessMask_ } { } VULKAN_HPP_CONSTEXPR MemoryBarrier( MemoryBarrier const & rhs ) VULKAN_HPP_NOEXCEPT = default; MemoryBarrier( VkMemoryBarrier const & rhs ) VULKAN_HPP_NOEXCEPT : MemoryBarrier( *reinterpret_cast( &rhs ) ) {} MemoryBarrier & operator=( MemoryBarrier const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ MemoryBarrier & operator=( VkMemoryBarrier const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 MemoryBarrier & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 MemoryBarrier & setSrcAccessMask( VULKAN_HPP_NAMESPACE::AccessFlags srcAccessMask_ ) VULKAN_HPP_NOEXCEPT { srcAccessMask = srcAccessMask_; return *this; } VULKAN_HPP_CONSTEXPR_14 MemoryBarrier & setDstAccessMask( VULKAN_HPP_NAMESPACE::AccessFlags dstAccessMask_ ) VULKAN_HPP_NOEXCEPT { dstAccessMask = dstAccessMask_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkMemoryBarrier const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkMemoryBarrier &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, srcAccessMask, dstAccessMask ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( MemoryBarrier const & ) const = default; #else bool operator==( MemoryBarrier const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( srcAccessMask == rhs.srcAccessMask ) && ( dstAccessMask == rhs.dstAccessMask ); # endif } bool operator!=( MemoryBarrier const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eMemoryBarrier; const void * pNext = {}; VULKAN_HPP_NAMESPACE::AccessFlags srcAccessMask = {}; VULKAN_HPP_NAMESPACE::AccessFlags dstAccessMask = {}; }; template <> struct CppType { using Type = MemoryBarrier; }; struct MemoryBarrierAccessFlags3KHR { using NativeType = VkMemoryBarrierAccessFlags3KHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eMemoryBarrierAccessFlags3KHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR MemoryBarrierAccessFlags3KHR( VULKAN_HPP_NAMESPACE::AccessFlags3KHR srcAccessMask3_ = {}, VULKAN_HPP_NAMESPACE::AccessFlags3KHR dstAccessMask3_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , srcAccessMask3{ srcAccessMask3_ } , dstAccessMask3{ dstAccessMask3_ } { } VULKAN_HPP_CONSTEXPR MemoryBarrierAccessFlags3KHR( MemoryBarrierAccessFlags3KHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; MemoryBarrierAccessFlags3KHR( VkMemoryBarrierAccessFlags3KHR const & rhs ) VULKAN_HPP_NOEXCEPT : MemoryBarrierAccessFlags3KHR( *reinterpret_cast( &rhs ) ) { } MemoryBarrierAccessFlags3KHR & operator=( MemoryBarrierAccessFlags3KHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ MemoryBarrierAccessFlags3KHR & operator=( VkMemoryBarrierAccessFlags3KHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 MemoryBarrierAccessFlags3KHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 MemoryBarrierAccessFlags3KHR & setSrcAccessMask3( VULKAN_HPP_NAMESPACE::AccessFlags3KHR srcAccessMask3_ ) VULKAN_HPP_NOEXCEPT { srcAccessMask3 = srcAccessMask3_; return *this; } VULKAN_HPP_CONSTEXPR_14 MemoryBarrierAccessFlags3KHR & setDstAccessMask3( VULKAN_HPP_NAMESPACE::AccessFlags3KHR dstAccessMask3_ ) VULKAN_HPP_NOEXCEPT { dstAccessMask3 = dstAccessMask3_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkMemoryBarrierAccessFlags3KHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkMemoryBarrierAccessFlags3KHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, srcAccessMask3, dstAccessMask3 ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( MemoryBarrierAccessFlags3KHR const & ) const = default; #else bool operator==( MemoryBarrierAccessFlags3KHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( srcAccessMask3 == rhs.srcAccessMask3 ) && ( dstAccessMask3 == rhs.dstAccessMask3 ); # endif } bool operator!=( MemoryBarrierAccessFlags3KHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eMemoryBarrierAccessFlags3KHR; const void * pNext = {}; VULKAN_HPP_NAMESPACE::AccessFlags3KHR srcAccessMask3 = {}; VULKAN_HPP_NAMESPACE::AccessFlags3KHR dstAccessMask3 = {}; }; template <> struct CppType { using Type = MemoryBarrierAccessFlags3KHR; }; struct MemoryDedicatedAllocateInfo { using NativeType = VkMemoryDedicatedAllocateInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eMemoryDedicatedAllocateInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR MemoryDedicatedAllocateInfo( VULKAN_HPP_NAMESPACE::Image image_ = {}, VULKAN_HPP_NAMESPACE::Buffer buffer_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , image{ image_ } , buffer{ buffer_ } { } VULKAN_HPP_CONSTEXPR MemoryDedicatedAllocateInfo( MemoryDedicatedAllocateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; MemoryDedicatedAllocateInfo( VkMemoryDedicatedAllocateInfo const & rhs ) VULKAN_HPP_NOEXCEPT : MemoryDedicatedAllocateInfo( *reinterpret_cast( &rhs ) ) { } MemoryDedicatedAllocateInfo & operator=( MemoryDedicatedAllocateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ MemoryDedicatedAllocateInfo & operator=( VkMemoryDedicatedAllocateInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 MemoryDedicatedAllocateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 MemoryDedicatedAllocateInfo & setImage( VULKAN_HPP_NAMESPACE::Image image_ ) VULKAN_HPP_NOEXCEPT { image = image_; return *this; } VULKAN_HPP_CONSTEXPR_14 MemoryDedicatedAllocateInfo & setBuffer( VULKAN_HPP_NAMESPACE::Buffer buffer_ ) VULKAN_HPP_NOEXCEPT { buffer = buffer_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkMemoryDedicatedAllocateInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkMemoryDedicatedAllocateInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, image, buffer ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( MemoryDedicatedAllocateInfo const & ) const = default; #else bool operator==( MemoryDedicatedAllocateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( image == rhs.image ) && ( buffer == rhs.buffer ); # endif } bool operator!=( MemoryDedicatedAllocateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eMemoryDedicatedAllocateInfo; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Image image = {}; VULKAN_HPP_NAMESPACE::Buffer buffer = {}; }; template <> struct CppType { using Type = MemoryDedicatedAllocateInfo; }; using MemoryDedicatedAllocateInfoKHR = MemoryDedicatedAllocateInfo; struct MemoryDedicatedRequirements { using NativeType = VkMemoryDedicatedRequirements; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eMemoryDedicatedRequirements; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR MemoryDedicatedRequirements( VULKAN_HPP_NAMESPACE::Bool32 prefersDedicatedAllocation_ = {}, VULKAN_HPP_NAMESPACE::Bool32 requiresDedicatedAllocation_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , prefersDedicatedAllocation{ prefersDedicatedAllocation_ } , requiresDedicatedAllocation{ requiresDedicatedAllocation_ } { } VULKAN_HPP_CONSTEXPR MemoryDedicatedRequirements( MemoryDedicatedRequirements const & rhs ) VULKAN_HPP_NOEXCEPT = default; MemoryDedicatedRequirements( VkMemoryDedicatedRequirements const & rhs ) VULKAN_HPP_NOEXCEPT : MemoryDedicatedRequirements( *reinterpret_cast( &rhs ) ) { } MemoryDedicatedRequirements & operator=( MemoryDedicatedRequirements const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ MemoryDedicatedRequirements & operator=( VkMemoryDedicatedRequirements const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkMemoryDedicatedRequirements const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkMemoryDedicatedRequirements &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, prefersDedicatedAllocation, requiresDedicatedAllocation ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( MemoryDedicatedRequirements const & ) const = default; #else bool operator==( MemoryDedicatedRequirements const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( prefersDedicatedAllocation == rhs.prefersDedicatedAllocation ) && ( requiresDedicatedAllocation == rhs.requiresDedicatedAllocation ); # endif } bool operator!=( MemoryDedicatedRequirements const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eMemoryDedicatedRequirements; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 prefersDedicatedAllocation = {}; VULKAN_HPP_NAMESPACE::Bool32 requiresDedicatedAllocation = {}; }; template <> struct CppType { using Type = MemoryDedicatedRequirements; }; using MemoryDedicatedRequirementsKHR = MemoryDedicatedRequirements; struct MemoryFdPropertiesKHR { using NativeType = VkMemoryFdPropertiesKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eMemoryFdPropertiesKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR MemoryFdPropertiesKHR( uint32_t memoryTypeBits_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , memoryTypeBits{ memoryTypeBits_ } { } VULKAN_HPP_CONSTEXPR MemoryFdPropertiesKHR( MemoryFdPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; MemoryFdPropertiesKHR( VkMemoryFdPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT : MemoryFdPropertiesKHR( *reinterpret_cast( &rhs ) ) { } MemoryFdPropertiesKHR & operator=( MemoryFdPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ MemoryFdPropertiesKHR & operator=( VkMemoryFdPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkMemoryFdPropertiesKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkMemoryFdPropertiesKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, memoryTypeBits ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( MemoryFdPropertiesKHR const & ) const = default; #else bool operator==( MemoryFdPropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( memoryTypeBits == rhs.memoryTypeBits ); # endif } bool operator!=( MemoryFdPropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eMemoryFdPropertiesKHR; void * pNext = {}; uint32_t memoryTypeBits = {}; }; template <> struct CppType { using Type = MemoryFdPropertiesKHR; }; #if defined( VK_USE_PLATFORM_ANDROID_KHR ) struct MemoryGetAndroidHardwareBufferInfoANDROID { using NativeType = VkMemoryGetAndroidHardwareBufferInfoANDROID; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eMemoryGetAndroidHardwareBufferInfoANDROID; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR MemoryGetAndroidHardwareBufferInfoANDROID( VULKAN_HPP_NAMESPACE::DeviceMemory memory_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , memory{ memory_ } { } VULKAN_HPP_CONSTEXPR MemoryGetAndroidHardwareBufferInfoANDROID( MemoryGetAndroidHardwareBufferInfoANDROID const & rhs ) VULKAN_HPP_NOEXCEPT = default; MemoryGetAndroidHardwareBufferInfoANDROID( VkMemoryGetAndroidHardwareBufferInfoANDROID const & rhs ) VULKAN_HPP_NOEXCEPT : MemoryGetAndroidHardwareBufferInfoANDROID( *reinterpret_cast( &rhs ) ) { } MemoryGetAndroidHardwareBufferInfoANDROID & operator=( MemoryGetAndroidHardwareBufferInfoANDROID const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ MemoryGetAndroidHardwareBufferInfoANDROID & operator=( VkMemoryGetAndroidHardwareBufferInfoANDROID const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } # if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 MemoryGetAndroidHardwareBufferInfoANDROID & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 MemoryGetAndroidHardwareBufferInfoANDROID & setMemory( VULKAN_HPP_NAMESPACE::DeviceMemory memory_ ) VULKAN_HPP_NOEXCEPT { memory = memory_; return *this; } # endif /*VULKAN_HPP_NO_SETTERS*/ operator VkMemoryGetAndroidHardwareBufferInfoANDROID const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkMemoryGetAndroidHardwareBufferInfoANDROID &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, memory ); } # endif # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( MemoryGetAndroidHardwareBufferInfoANDROID const & ) const = default; # else bool operator==( MemoryGetAndroidHardwareBufferInfoANDROID const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( memory == rhs.memory ); # endif } bool operator!=( MemoryGetAndroidHardwareBufferInfoANDROID const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } # endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eMemoryGetAndroidHardwareBufferInfoANDROID; const void * pNext = {}; VULKAN_HPP_NAMESPACE::DeviceMemory memory = {}; }; template <> struct CppType { using Type = MemoryGetAndroidHardwareBufferInfoANDROID; }; #endif /*VK_USE_PLATFORM_ANDROID_KHR*/ struct MemoryGetFdInfoKHR { using NativeType = VkMemoryGetFdInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eMemoryGetFdInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR MemoryGetFdInfoKHR( VULKAN_HPP_NAMESPACE::DeviceMemory memory_ = {}, VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType_ = VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits::eOpaqueFd, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , memory{ memory_ } , handleType{ handleType_ } { } VULKAN_HPP_CONSTEXPR MemoryGetFdInfoKHR( MemoryGetFdInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; MemoryGetFdInfoKHR( VkMemoryGetFdInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : MemoryGetFdInfoKHR( *reinterpret_cast( &rhs ) ) {} MemoryGetFdInfoKHR & operator=( MemoryGetFdInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ MemoryGetFdInfoKHR & operator=( VkMemoryGetFdInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 MemoryGetFdInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 MemoryGetFdInfoKHR & setMemory( VULKAN_HPP_NAMESPACE::DeviceMemory memory_ ) VULKAN_HPP_NOEXCEPT { memory = memory_; return *this; } VULKAN_HPP_CONSTEXPR_14 MemoryGetFdInfoKHR & setHandleType( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType_ ) VULKAN_HPP_NOEXCEPT { handleType = handleType_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkMemoryGetFdInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkMemoryGetFdInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, memory, handleType ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( MemoryGetFdInfoKHR const & ) const = default; #else bool operator==( MemoryGetFdInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( memory == rhs.memory ) && ( handleType == rhs.handleType ); # endif } bool operator!=( MemoryGetFdInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eMemoryGetFdInfoKHR; const void * pNext = {}; VULKAN_HPP_NAMESPACE::DeviceMemory memory = {}; VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType = VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits::eOpaqueFd; }; template <> struct CppType { using Type = MemoryGetFdInfoKHR; }; #if defined( VK_USE_PLATFORM_METAL_EXT ) struct MemoryGetMetalHandleInfoEXT { using NativeType = VkMemoryGetMetalHandleInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eMemoryGetMetalHandleInfoEXT; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR MemoryGetMetalHandleInfoEXT( VULKAN_HPP_NAMESPACE::DeviceMemory memory_ = {}, VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType_ = VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits::eOpaqueFd, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , memory{ memory_ } , handleType{ handleType_ } { } VULKAN_HPP_CONSTEXPR MemoryGetMetalHandleInfoEXT( MemoryGetMetalHandleInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; MemoryGetMetalHandleInfoEXT( VkMemoryGetMetalHandleInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : MemoryGetMetalHandleInfoEXT( *reinterpret_cast( &rhs ) ) { } MemoryGetMetalHandleInfoEXT & operator=( MemoryGetMetalHandleInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ MemoryGetMetalHandleInfoEXT & operator=( VkMemoryGetMetalHandleInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } # if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 MemoryGetMetalHandleInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 MemoryGetMetalHandleInfoEXT & setMemory( VULKAN_HPP_NAMESPACE::DeviceMemory memory_ ) VULKAN_HPP_NOEXCEPT { memory = memory_; return *this; } VULKAN_HPP_CONSTEXPR_14 MemoryGetMetalHandleInfoEXT & setHandleType( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType_ ) VULKAN_HPP_NOEXCEPT { handleType = handleType_; return *this; } # endif /*VULKAN_HPP_NO_SETTERS*/ operator VkMemoryGetMetalHandleInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkMemoryGetMetalHandleInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, memory, handleType ); } # endif # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( MemoryGetMetalHandleInfoEXT const & ) const = default; # else bool operator==( MemoryGetMetalHandleInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( memory == rhs.memory ) && ( handleType == rhs.handleType ); # endif } bool operator!=( MemoryGetMetalHandleInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } # endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eMemoryGetMetalHandleInfoEXT; const void * pNext = {}; VULKAN_HPP_NAMESPACE::DeviceMemory memory = {}; VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType = VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits::eOpaqueFd; }; template <> struct CppType { using Type = MemoryGetMetalHandleInfoEXT; }; #endif /*VK_USE_PLATFORM_METAL_EXT*/ struct MemoryGetRemoteAddressInfoNV { using NativeType = VkMemoryGetRemoteAddressInfoNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eMemoryGetRemoteAddressInfoNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR MemoryGetRemoteAddressInfoNV( VULKAN_HPP_NAMESPACE::DeviceMemory memory_ = {}, VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType_ = VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits::eOpaqueFd, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , memory{ memory_ } , handleType{ handleType_ } { } VULKAN_HPP_CONSTEXPR MemoryGetRemoteAddressInfoNV( MemoryGetRemoteAddressInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; MemoryGetRemoteAddressInfoNV( VkMemoryGetRemoteAddressInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT : MemoryGetRemoteAddressInfoNV( *reinterpret_cast( &rhs ) ) { } MemoryGetRemoteAddressInfoNV & operator=( MemoryGetRemoteAddressInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ MemoryGetRemoteAddressInfoNV & operator=( VkMemoryGetRemoteAddressInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 MemoryGetRemoteAddressInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 MemoryGetRemoteAddressInfoNV & setMemory( VULKAN_HPP_NAMESPACE::DeviceMemory memory_ ) VULKAN_HPP_NOEXCEPT { memory = memory_; return *this; } VULKAN_HPP_CONSTEXPR_14 MemoryGetRemoteAddressInfoNV & setHandleType( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType_ ) VULKAN_HPP_NOEXCEPT { handleType = handleType_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkMemoryGetRemoteAddressInfoNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkMemoryGetRemoteAddressInfoNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, memory, handleType ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( MemoryGetRemoteAddressInfoNV const & ) const = default; #else bool operator==( MemoryGetRemoteAddressInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( memory == rhs.memory ) && ( handleType == rhs.handleType ); # endif } bool operator!=( MemoryGetRemoteAddressInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eMemoryGetRemoteAddressInfoNV; const void * pNext = {}; VULKAN_HPP_NAMESPACE::DeviceMemory memory = {}; VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType = VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits::eOpaqueFd; }; template <> struct CppType { using Type = MemoryGetRemoteAddressInfoNV; }; #if defined( VK_USE_PLATFORM_WIN32_KHR ) struct MemoryGetWin32HandleInfoKHR { using NativeType = VkMemoryGetWin32HandleInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eMemoryGetWin32HandleInfoKHR; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR MemoryGetWin32HandleInfoKHR( VULKAN_HPP_NAMESPACE::DeviceMemory memory_ = {}, VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType_ = VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits::eOpaqueFd, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , memory{ memory_ } , handleType{ handleType_ } { } VULKAN_HPP_CONSTEXPR MemoryGetWin32HandleInfoKHR( MemoryGetWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; MemoryGetWin32HandleInfoKHR( VkMemoryGetWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : MemoryGetWin32HandleInfoKHR( *reinterpret_cast( &rhs ) ) { } MemoryGetWin32HandleInfoKHR & operator=( MemoryGetWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ MemoryGetWin32HandleInfoKHR & operator=( VkMemoryGetWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } # if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 MemoryGetWin32HandleInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 MemoryGetWin32HandleInfoKHR & setMemory( VULKAN_HPP_NAMESPACE::DeviceMemory memory_ ) VULKAN_HPP_NOEXCEPT { memory = memory_; return *this; } VULKAN_HPP_CONSTEXPR_14 MemoryGetWin32HandleInfoKHR & setHandleType( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType_ ) VULKAN_HPP_NOEXCEPT { handleType = handleType_; return *this; } # endif /*VULKAN_HPP_NO_SETTERS*/ operator VkMemoryGetWin32HandleInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkMemoryGetWin32HandleInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, memory, handleType ); } # endif # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( MemoryGetWin32HandleInfoKHR const & ) const = default; # else bool operator==( MemoryGetWin32HandleInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( memory == rhs.memory ) && ( handleType == rhs.handleType ); # endif } bool operator!=( MemoryGetWin32HandleInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } # endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eMemoryGetWin32HandleInfoKHR; const void * pNext = {}; VULKAN_HPP_NAMESPACE::DeviceMemory memory = {}; VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType = VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits::eOpaqueFd; }; template <> struct CppType { using Type = MemoryGetWin32HandleInfoKHR; }; #endif /*VK_USE_PLATFORM_WIN32_KHR*/ #if defined( VK_USE_PLATFORM_FUCHSIA ) struct MemoryGetZirconHandleInfoFUCHSIA { using NativeType = VkMemoryGetZirconHandleInfoFUCHSIA; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eMemoryGetZirconHandleInfoFUCHSIA; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR MemoryGetZirconHandleInfoFUCHSIA( VULKAN_HPP_NAMESPACE::DeviceMemory memory_ = {}, VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType_ = VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits::eOpaqueFd, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , memory{ memory_ } , handleType{ handleType_ } { } VULKAN_HPP_CONSTEXPR MemoryGetZirconHandleInfoFUCHSIA( MemoryGetZirconHandleInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT = default; MemoryGetZirconHandleInfoFUCHSIA( VkMemoryGetZirconHandleInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT : MemoryGetZirconHandleInfoFUCHSIA( *reinterpret_cast( &rhs ) ) { } MemoryGetZirconHandleInfoFUCHSIA & operator=( MemoryGetZirconHandleInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ MemoryGetZirconHandleInfoFUCHSIA & operator=( VkMemoryGetZirconHandleInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } # if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 MemoryGetZirconHandleInfoFUCHSIA & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 MemoryGetZirconHandleInfoFUCHSIA & setMemory( VULKAN_HPP_NAMESPACE::DeviceMemory memory_ ) VULKAN_HPP_NOEXCEPT { memory = memory_; return *this; } VULKAN_HPP_CONSTEXPR_14 MemoryGetZirconHandleInfoFUCHSIA & setHandleType( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType_ ) VULKAN_HPP_NOEXCEPT { handleType = handleType_; return *this; } # endif /*VULKAN_HPP_NO_SETTERS*/ operator VkMemoryGetZirconHandleInfoFUCHSIA const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkMemoryGetZirconHandleInfoFUCHSIA &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, memory, handleType ); } # endif # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( MemoryGetZirconHandleInfoFUCHSIA const & ) const = default; # else bool operator==( MemoryGetZirconHandleInfoFUCHSIA const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( memory == rhs.memory ) && ( handleType == rhs.handleType ); # endif } bool operator!=( MemoryGetZirconHandleInfoFUCHSIA const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } # endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eMemoryGetZirconHandleInfoFUCHSIA; const void * pNext = {}; VULKAN_HPP_NAMESPACE::DeviceMemory memory = {}; VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType = VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits::eOpaqueFd; }; template <> struct CppType { using Type = MemoryGetZirconHandleInfoFUCHSIA; }; #endif /*VK_USE_PLATFORM_FUCHSIA*/ struct MemoryHeap { using NativeType = VkMemoryHeap; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR MemoryHeap( VULKAN_HPP_NAMESPACE::DeviceSize size_ = {}, VULKAN_HPP_NAMESPACE::MemoryHeapFlags flags_ = {} ) VULKAN_HPP_NOEXCEPT : size{ size_ } , flags{ flags_ } { } VULKAN_HPP_CONSTEXPR MemoryHeap( MemoryHeap const & rhs ) VULKAN_HPP_NOEXCEPT = default; MemoryHeap( VkMemoryHeap const & rhs ) VULKAN_HPP_NOEXCEPT : MemoryHeap( *reinterpret_cast( &rhs ) ) {} MemoryHeap & operator=( MemoryHeap const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ MemoryHeap & operator=( VkMemoryHeap const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkMemoryHeap const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkMemoryHeap &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( size, flags ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( MemoryHeap const & ) const = default; #else bool operator==( MemoryHeap const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( size == rhs.size ) && ( flags == rhs.flags ); # endif } bool operator!=( MemoryHeap const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::DeviceSize size = {}; VULKAN_HPP_NAMESPACE::MemoryHeapFlags flags = {}; }; struct MemoryHostPointerPropertiesEXT { using NativeType = VkMemoryHostPointerPropertiesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eMemoryHostPointerPropertiesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR MemoryHostPointerPropertiesEXT( uint32_t memoryTypeBits_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , memoryTypeBits{ memoryTypeBits_ } { } VULKAN_HPP_CONSTEXPR MemoryHostPointerPropertiesEXT( MemoryHostPointerPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; MemoryHostPointerPropertiesEXT( VkMemoryHostPointerPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : MemoryHostPointerPropertiesEXT( *reinterpret_cast( &rhs ) ) { } MemoryHostPointerPropertiesEXT & operator=( MemoryHostPointerPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ MemoryHostPointerPropertiesEXT & operator=( VkMemoryHostPointerPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkMemoryHostPointerPropertiesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkMemoryHostPointerPropertiesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, memoryTypeBits ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( MemoryHostPointerPropertiesEXT const & ) const = default; #else bool operator==( MemoryHostPointerPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( memoryTypeBits == rhs.memoryTypeBits ); # endif } bool operator!=( MemoryHostPointerPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eMemoryHostPointerPropertiesEXT; void * pNext = {}; uint32_t memoryTypeBits = {}; }; template <> struct CppType { using Type = MemoryHostPointerPropertiesEXT; }; struct MemoryMapInfo { using NativeType = VkMemoryMapInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eMemoryMapInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR MemoryMapInfo( VULKAN_HPP_NAMESPACE::MemoryMapFlags flags_ = {}, VULKAN_HPP_NAMESPACE::DeviceMemory memory_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize offset_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize size_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , memory{ memory_ } , offset{ offset_ } , size{ size_ } { } VULKAN_HPP_CONSTEXPR MemoryMapInfo( MemoryMapInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; MemoryMapInfo( VkMemoryMapInfo const & rhs ) VULKAN_HPP_NOEXCEPT : MemoryMapInfo( *reinterpret_cast( &rhs ) ) {} MemoryMapInfo & operator=( MemoryMapInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ MemoryMapInfo & operator=( VkMemoryMapInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 MemoryMapInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 MemoryMapInfo & setFlags( VULKAN_HPP_NAMESPACE::MemoryMapFlags flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 MemoryMapInfo & setMemory( VULKAN_HPP_NAMESPACE::DeviceMemory memory_ ) VULKAN_HPP_NOEXCEPT { memory = memory_; return *this; } VULKAN_HPP_CONSTEXPR_14 MemoryMapInfo & setOffset( VULKAN_HPP_NAMESPACE::DeviceSize offset_ ) VULKAN_HPP_NOEXCEPT { offset = offset_; return *this; } VULKAN_HPP_CONSTEXPR_14 MemoryMapInfo & setSize( VULKAN_HPP_NAMESPACE::DeviceSize size_ ) VULKAN_HPP_NOEXCEPT { size = size_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkMemoryMapInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkMemoryMapInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, memory, offset, size ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( MemoryMapInfo const & ) const = default; #else bool operator==( MemoryMapInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( memory == rhs.memory ) && ( offset == rhs.offset ) && ( size == rhs.size ); # endif } bool operator!=( MemoryMapInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eMemoryMapInfo; const void * pNext = {}; VULKAN_HPP_NAMESPACE::MemoryMapFlags flags = {}; VULKAN_HPP_NAMESPACE::DeviceMemory memory = {}; VULKAN_HPP_NAMESPACE::DeviceSize offset = {}; VULKAN_HPP_NAMESPACE::DeviceSize size = {}; }; template <> struct CppType { using Type = MemoryMapInfo; }; using MemoryMapInfoKHR = MemoryMapInfo; struct MemoryMapPlacedInfoEXT { using NativeType = VkMemoryMapPlacedInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eMemoryMapPlacedInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR MemoryMapPlacedInfoEXT( void * pPlacedAddress_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , pPlacedAddress{ pPlacedAddress_ } { } VULKAN_HPP_CONSTEXPR MemoryMapPlacedInfoEXT( MemoryMapPlacedInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; MemoryMapPlacedInfoEXT( VkMemoryMapPlacedInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : MemoryMapPlacedInfoEXT( *reinterpret_cast( &rhs ) ) { } MemoryMapPlacedInfoEXT & operator=( MemoryMapPlacedInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ MemoryMapPlacedInfoEXT & operator=( VkMemoryMapPlacedInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 MemoryMapPlacedInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 MemoryMapPlacedInfoEXT & setPPlacedAddress( void * pPlacedAddress_ ) VULKAN_HPP_NOEXCEPT { pPlacedAddress = pPlacedAddress_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkMemoryMapPlacedInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkMemoryMapPlacedInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, pPlacedAddress ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( MemoryMapPlacedInfoEXT const & ) const = default; #else bool operator==( MemoryMapPlacedInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( pPlacedAddress == rhs.pPlacedAddress ); # endif } bool operator!=( MemoryMapPlacedInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eMemoryMapPlacedInfoEXT; const void * pNext = {}; void * pPlacedAddress = {}; }; template <> struct CppType { using Type = MemoryMapPlacedInfoEXT; }; #if defined( VK_USE_PLATFORM_METAL_EXT ) struct MemoryMetalHandlePropertiesEXT { using NativeType = VkMemoryMetalHandlePropertiesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eMemoryMetalHandlePropertiesEXT; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR MemoryMetalHandlePropertiesEXT( uint32_t memoryTypeBits_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , memoryTypeBits{ memoryTypeBits_ } { } VULKAN_HPP_CONSTEXPR MemoryMetalHandlePropertiesEXT( MemoryMetalHandlePropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; MemoryMetalHandlePropertiesEXT( VkMemoryMetalHandlePropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : MemoryMetalHandlePropertiesEXT( *reinterpret_cast( &rhs ) ) { } MemoryMetalHandlePropertiesEXT & operator=( MemoryMetalHandlePropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ MemoryMetalHandlePropertiesEXT & operator=( VkMemoryMetalHandlePropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkMemoryMetalHandlePropertiesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkMemoryMetalHandlePropertiesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, memoryTypeBits ); } # endif # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( MemoryMetalHandlePropertiesEXT const & ) const = default; # else bool operator==( MemoryMetalHandlePropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( memoryTypeBits == rhs.memoryTypeBits ); # endif } bool operator!=( MemoryMetalHandlePropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } # endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eMemoryMetalHandlePropertiesEXT; void * pNext = {}; uint32_t memoryTypeBits = {}; }; template <> struct CppType { using Type = MemoryMetalHandlePropertiesEXT; }; #endif /*VK_USE_PLATFORM_METAL_EXT*/ struct MemoryOpaqueCaptureAddressAllocateInfo { using NativeType = VkMemoryOpaqueCaptureAddressAllocateInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eMemoryOpaqueCaptureAddressAllocateInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR MemoryOpaqueCaptureAddressAllocateInfo( uint64_t opaqueCaptureAddress_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , opaqueCaptureAddress{ opaqueCaptureAddress_ } { } VULKAN_HPP_CONSTEXPR MemoryOpaqueCaptureAddressAllocateInfo( MemoryOpaqueCaptureAddressAllocateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; MemoryOpaqueCaptureAddressAllocateInfo( VkMemoryOpaqueCaptureAddressAllocateInfo const & rhs ) VULKAN_HPP_NOEXCEPT : MemoryOpaqueCaptureAddressAllocateInfo( *reinterpret_cast( &rhs ) ) { } MemoryOpaqueCaptureAddressAllocateInfo & operator=( MemoryOpaqueCaptureAddressAllocateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ MemoryOpaqueCaptureAddressAllocateInfo & operator=( VkMemoryOpaqueCaptureAddressAllocateInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 MemoryOpaqueCaptureAddressAllocateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 MemoryOpaqueCaptureAddressAllocateInfo & setOpaqueCaptureAddress( uint64_t opaqueCaptureAddress_ ) VULKAN_HPP_NOEXCEPT { opaqueCaptureAddress = opaqueCaptureAddress_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkMemoryOpaqueCaptureAddressAllocateInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkMemoryOpaqueCaptureAddressAllocateInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, opaqueCaptureAddress ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( MemoryOpaqueCaptureAddressAllocateInfo const & ) const = default; #else bool operator==( MemoryOpaqueCaptureAddressAllocateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( opaqueCaptureAddress == rhs.opaqueCaptureAddress ); # endif } bool operator!=( MemoryOpaqueCaptureAddressAllocateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eMemoryOpaqueCaptureAddressAllocateInfo; const void * pNext = {}; uint64_t opaqueCaptureAddress = {}; }; template <> struct CppType { using Type = MemoryOpaqueCaptureAddressAllocateInfo; }; using MemoryOpaqueCaptureAddressAllocateInfoKHR = MemoryOpaqueCaptureAddressAllocateInfo; struct MemoryPriorityAllocateInfoEXT { using NativeType = VkMemoryPriorityAllocateInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eMemoryPriorityAllocateInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR MemoryPriorityAllocateInfoEXT( float priority_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , priority{ priority_ } { } VULKAN_HPP_CONSTEXPR MemoryPriorityAllocateInfoEXT( MemoryPriorityAllocateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; MemoryPriorityAllocateInfoEXT( VkMemoryPriorityAllocateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : MemoryPriorityAllocateInfoEXT( *reinterpret_cast( &rhs ) ) { } MemoryPriorityAllocateInfoEXT & operator=( MemoryPriorityAllocateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ MemoryPriorityAllocateInfoEXT & operator=( VkMemoryPriorityAllocateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 MemoryPriorityAllocateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 MemoryPriorityAllocateInfoEXT & setPriority( float priority_ ) VULKAN_HPP_NOEXCEPT { priority = priority_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkMemoryPriorityAllocateInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkMemoryPriorityAllocateInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, priority ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( MemoryPriorityAllocateInfoEXT const & ) const = default; #else bool operator==( MemoryPriorityAllocateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( priority == rhs.priority ); # endif } bool operator!=( MemoryPriorityAllocateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eMemoryPriorityAllocateInfoEXT; const void * pNext = {}; float priority = {}; }; template <> struct CppType { using Type = MemoryPriorityAllocateInfoEXT; }; struct MemoryRequirements { using NativeType = VkMemoryRequirements; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR MemoryRequirements( VULKAN_HPP_NAMESPACE::DeviceSize size_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize alignment_ = {}, uint32_t memoryTypeBits_ = {} ) VULKAN_HPP_NOEXCEPT : size{ size_ } , alignment{ alignment_ } , memoryTypeBits{ memoryTypeBits_ } { } VULKAN_HPP_CONSTEXPR MemoryRequirements( MemoryRequirements const & rhs ) VULKAN_HPP_NOEXCEPT = default; MemoryRequirements( VkMemoryRequirements const & rhs ) VULKAN_HPP_NOEXCEPT : MemoryRequirements( *reinterpret_cast( &rhs ) ) {} MemoryRequirements & operator=( MemoryRequirements const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ MemoryRequirements & operator=( VkMemoryRequirements const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkMemoryRequirements const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkMemoryRequirements &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( size, alignment, memoryTypeBits ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( MemoryRequirements const & ) const = default; #else bool operator==( MemoryRequirements const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( size == rhs.size ) && ( alignment == rhs.alignment ) && ( memoryTypeBits == rhs.memoryTypeBits ); # endif } bool operator!=( MemoryRequirements const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::DeviceSize size = {}; VULKAN_HPP_NAMESPACE::DeviceSize alignment = {}; uint32_t memoryTypeBits = {}; }; struct MemoryRequirements2 { using NativeType = VkMemoryRequirements2; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eMemoryRequirements2; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR MemoryRequirements2( VULKAN_HPP_NAMESPACE::MemoryRequirements memoryRequirements_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , memoryRequirements{ memoryRequirements_ } { } VULKAN_HPP_CONSTEXPR MemoryRequirements2( MemoryRequirements2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; MemoryRequirements2( VkMemoryRequirements2 const & rhs ) VULKAN_HPP_NOEXCEPT : MemoryRequirements2( *reinterpret_cast( &rhs ) ) { } MemoryRequirements2 & operator=( MemoryRequirements2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ MemoryRequirements2 & operator=( VkMemoryRequirements2 const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkMemoryRequirements2 const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkMemoryRequirements2 &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, memoryRequirements ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( MemoryRequirements2 const & ) const = default; #else bool operator==( MemoryRequirements2 const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( memoryRequirements == rhs.memoryRequirements ); # endif } bool operator!=( MemoryRequirements2 const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eMemoryRequirements2; void * pNext = {}; VULKAN_HPP_NAMESPACE::MemoryRequirements memoryRequirements = {}; }; template <> struct CppType { using Type = MemoryRequirements2; }; using MemoryRequirements2KHR = MemoryRequirements2; struct MemoryType { using NativeType = VkMemoryType; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR MemoryType( VULKAN_HPP_NAMESPACE::MemoryPropertyFlags propertyFlags_ = {}, uint32_t heapIndex_ = {} ) VULKAN_HPP_NOEXCEPT : propertyFlags{ propertyFlags_ } , heapIndex{ heapIndex_ } { } VULKAN_HPP_CONSTEXPR MemoryType( MemoryType const & rhs ) VULKAN_HPP_NOEXCEPT = default; MemoryType( VkMemoryType const & rhs ) VULKAN_HPP_NOEXCEPT : MemoryType( *reinterpret_cast( &rhs ) ) {} MemoryType & operator=( MemoryType const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ MemoryType & operator=( VkMemoryType const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkMemoryType const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkMemoryType &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( propertyFlags, heapIndex ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( MemoryType const & ) const = default; #else bool operator==( MemoryType const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( propertyFlags == rhs.propertyFlags ) && ( heapIndex == rhs.heapIndex ); # endif } bool operator!=( MemoryType const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::MemoryPropertyFlags propertyFlags = {}; uint32_t heapIndex = {}; }; struct MemoryUnmapInfo { using NativeType = VkMemoryUnmapInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eMemoryUnmapInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR MemoryUnmapInfo( VULKAN_HPP_NAMESPACE::MemoryUnmapFlags flags_ = {}, VULKAN_HPP_NAMESPACE::DeviceMemory memory_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , memory{ memory_ } { } VULKAN_HPP_CONSTEXPR MemoryUnmapInfo( MemoryUnmapInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; MemoryUnmapInfo( VkMemoryUnmapInfo const & rhs ) VULKAN_HPP_NOEXCEPT : MemoryUnmapInfo( *reinterpret_cast( &rhs ) ) {} MemoryUnmapInfo & operator=( MemoryUnmapInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ MemoryUnmapInfo & operator=( VkMemoryUnmapInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 MemoryUnmapInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 MemoryUnmapInfo & setFlags( VULKAN_HPP_NAMESPACE::MemoryUnmapFlags flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 MemoryUnmapInfo & setMemory( VULKAN_HPP_NAMESPACE::DeviceMemory memory_ ) VULKAN_HPP_NOEXCEPT { memory = memory_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkMemoryUnmapInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkMemoryUnmapInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, memory ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( MemoryUnmapInfo const & ) const = default; #else bool operator==( MemoryUnmapInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( memory == rhs.memory ); # endif } bool operator!=( MemoryUnmapInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eMemoryUnmapInfo; const void * pNext = {}; VULKAN_HPP_NAMESPACE::MemoryUnmapFlags flags = {}; VULKAN_HPP_NAMESPACE::DeviceMemory memory = {}; }; template <> struct CppType { using Type = MemoryUnmapInfo; }; using MemoryUnmapInfoKHR = MemoryUnmapInfo; #if defined( VK_USE_PLATFORM_WIN32_KHR ) struct MemoryWin32HandlePropertiesKHR { using NativeType = VkMemoryWin32HandlePropertiesKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eMemoryWin32HandlePropertiesKHR; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR MemoryWin32HandlePropertiesKHR( uint32_t memoryTypeBits_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , memoryTypeBits{ memoryTypeBits_ } { } VULKAN_HPP_CONSTEXPR MemoryWin32HandlePropertiesKHR( MemoryWin32HandlePropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; MemoryWin32HandlePropertiesKHR( VkMemoryWin32HandlePropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT : MemoryWin32HandlePropertiesKHR( *reinterpret_cast( &rhs ) ) { } MemoryWin32HandlePropertiesKHR & operator=( MemoryWin32HandlePropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ MemoryWin32HandlePropertiesKHR & operator=( VkMemoryWin32HandlePropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkMemoryWin32HandlePropertiesKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkMemoryWin32HandlePropertiesKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, memoryTypeBits ); } # endif # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( MemoryWin32HandlePropertiesKHR const & ) const = default; # else bool operator==( MemoryWin32HandlePropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( memoryTypeBits == rhs.memoryTypeBits ); # endif } bool operator!=( MemoryWin32HandlePropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } # endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eMemoryWin32HandlePropertiesKHR; void * pNext = {}; uint32_t memoryTypeBits = {}; }; template <> struct CppType { using Type = MemoryWin32HandlePropertiesKHR; }; #endif /*VK_USE_PLATFORM_WIN32_KHR*/ #if defined( VK_USE_PLATFORM_FUCHSIA ) struct MemoryZirconHandlePropertiesFUCHSIA { using NativeType = VkMemoryZirconHandlePropertiesFUCHSIA; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eMemoryZirconHandlePropertiesFUCHSIA; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR MemoryZirconHandlePropertiesFUCHSIA( uint32_t memoryTypeBits_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , memoryTypeBits{ memoryTypeBits_ } { } VULKAN_HPP_CONSTEXPR MemoryZirconHandlePropertiesFUCHSIA( MemoryZirconHandlePropertiesFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT = default; MemoryZirconHandlePropertiesFUCHSIA( VkMemoryZirconHandlePropertiesFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT : MemoryZirconHandlePropertiesFUCHSIA( *reinterpret_cast( &rhs ) ) { } MemoryZirconHandlePropertiesFUCHSIA & operator=( MemoryZirconHandlePropertiesFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ MemoryZirconHandlePropertiesFUCHSIA & operator=( VkMemoryZirconHandlePropertiesFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkMemoryZirconHandlePropertiesFUCHSIA const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkMemoryZirconHandlePropertiesFUCHSIA &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, memoryTypeBits ); } # endif # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( MemoryZirconHandlePropertiesFUCHSIA const & ) const = default; # else bool operator==( MemoryZirconHandlePropertiesFUCHSIA const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( memoryTypeBits == rhs.memoryTypeBits ); # endif } bool operator!=( MemoryZirconHandlePropertiesFUCHSIA const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } # endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eMemoryZirconHandlePropertiesFUCHSIA; void * pNext = {}; uint32_t memoryTypeBits = {}; }; template <> struct CppType { using Type = MemoryZirconHandlePropertiesFUCHSIA; }; #endif /*VK_USE_PLATFORM_FUCHSIA*/ #if defined( VK_USE_PLATFORM_METAL_EXT ) struct MetalSurfaceCreateInfoEXT { using NativeType = VkMetalSurfaceCreateInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eMetalSurfaceCreateInfoEXT; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR MetalSurfaceCreateInfoEXT( VULKAN_HPP_NAMESPACE::MetalSurfaceCreateFlagsEXT flags_ = {}, const CAMetalLayer * pLayer_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , pLayer{ pLayer_ } { } VULKAN_HPP_CONSTEXPR MetalSurfaceCreateInfoEXT( MetalSurfaceCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; MetalSurfaceCreateInfoEXT( VkMetalSurfaceCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : MetalSurfaceCreateInfoEXT( *reinterpret_cast( &rhs ) ) { } MetalSurfaceCreateInfoEXT & operator=( MetalSurfaceCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ MetalSurfaceCreateInfoEXT & operator=( VkMetalSurfaceCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } # if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 MetalSurfaceCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 MetalSurfaceCreateInfoEXT & setFlags( VULKAN_HPP_NAMESPACE::MetalSurfaceCreateFlagsEXT flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 MetalSurfaceCreateInfoEXT & setPLayer( const CAMetalLayer * pLayer_ ) VULKAN_HPP_NOEXCEPT { pLayer = pLayer_; return *this; } # endif /*VULKAN_HPP_NO_SETTERS*/ operator VkMetalSurfaceCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkMetalSurfaceCreateInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, pLayer ); } # endif # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( MetalSurfaceCreateInfoEXT const & ) const = default; # else bool operator==( MetalSurfaceCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( pLayer == rhs.pLayer ); # endif } bool operator!=( MetalSurfaceCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } # endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eMetalSurfaceCreateInfoEXT; const void * pNext = {}; VULKAN_HPP_NAMESPACE::MetalSurfaceCreateFlagsEXT flags = {}; const CAMetalLayer * pLayer = {}; }; template <> struct CppType { using Type = MetalSurfaceCreateInfoEXT; }; #endif /*VK_USE_PLATFORM_METAL_EXT*/ struct MicromapBuildInfoEXT { using NativeType = VkMicromapBuildInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eMicromapBuildInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 MicromapBuildInfoEXT( VULKAN_HPP_NAMESPACE::MicromapTypeEXT type_ = VULKAN_HPP_NAMESPACE::MicromapTypeEXT::eOpacityMicromap, VULKAN_HPP_NAMESPACE::BuildMicromapFlagsEXT flags_ = {}, VULKAN_HPP_NAMESPACE::BuildMicromapModeEXT mode_ = VULKAN_HPP_NAMESPACE::BuildMicromapModeEXT::eBuild, VULKAN_HPP_NAMESPACE::MicromapEXT dstMicromap_ = {}, uint32_t usageCountsCount_ = {}, const VULKAN_HPP_NAMESPACE::MicromapUsageEXT * pUsageCounts_ = {}, const VULKAN_HPP_NAMESPACE::MicromapUsageEXT * const * ppUsageCounts_ = {}, VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR data_ = {}, VULKAN_HPP_NAMESPACE::DeviceOrHostAddressKHR scratchData_ = {}, VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR triangleArray_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize triangleArrayStride_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , type{ type_ } , flags{ flags_ } , mode{ mode_ } , dstMicromap{ dstMicromap_ } , usageCountsCount{ usageCountsCount_ } , pUsageCounts{ pUsageCounts_ } , ppUsageCounts{ ppUsageCounts_ } , data{ data_ } , scratchData{ scratchData_ } , triangleArray{ triangleArray_ } , triangleArrayStride{ triangleArrayStride_ } { } VULKAN_HPP_CONSTEXPR_14 MicromapBuildInfoEXT( MicromapBuildInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; MicromapBuildInfoEXT( VkMicromapBuildInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : MicromapBuildInfoEXT( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) MicromapBuildInfoEXT( VULKAN_HPP_NAMESPACE::MicromapTypeEXT type_, VULKAN_HPP_NAMESPACE::BuildMicromapFlagsEXT flags_, VULKAN_HPP_NAMESPACE::BuildMicromapModeEXT mode_, VULKAN_HPP_NAMESPACE::MicromapEXT dstMicromap_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & usageCounts_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & pUsageCounts_ = {}, VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR data_ = {}, VULKAN_HPP_NAMESPACE::DeviceOrHostAddressKHR scratchData_ = {}, VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR triangleArray_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize triangleArrayStride_ = {}, const void * pNext_ = nullptr ) : pNext( pNext_ ) , type( type_ ) , flags( flags_ ) , mode( mode_ ) , dstMicromap( dstMicromap_ ) , usageCountsCount( static_cast( !usageCounts_.empty() ? usageCounts_.size() : pUsageCounts_.size() ) ) , pUsageCounts( usageCounts_.data() ) , ppUsageCounts( pUsageCounts_.data() ) , data( data_ ) , scratchData( scratchData_ ) , triangleArray( triangleArray_ ) , triangleArrayStride( triangleArrayStride_ ) { # ifdef VULKAN_HPP_NO_EXCEPTIONS VULKAN_HPP_ASSERT( ( !usageCounts_.empty() + !pUsageCounts_.empty() ) <= 1 ); # else if ( 1 < ( !usageCounts_.empty() + !pUsageCounts_.empty() ) ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::MicromapBuildInfoEXT::MicromapBuildInfoEXT: 1 < ( !usageCounts_.empty() + !pUsageCounts_.empty() )" ); } # endif /*VULKAN_HPP_NO_EXCEPTIONS*/ } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ MicromapBuildInfoEXT & operator=( MicromapBuildInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ MicromapBuildInfoEXT & operator=( VkMicromapBuildInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 MicromapBuildInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 MicromapBuildInfoEXT & setType( VULKAN_HPP_NAMESPACE::MicromapTypeEXT type_ ) VULKAN_HPP_NOEXCEPT { type = type_; return *this; } VULKAN_HPP_CONSTEXPR_14 MicromapBuildInfoEXT & setFlags( VULKAN_HPP_NAMESPACE::BuildMicromapFlagsEXT flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 MicromapBuildInfoEXT & setMode( VULKAN_HPP_NAMESPACE::BuildMicromapModeEXT mode_ ) VULKAN_HPP_NOEXCEPT { mode = mode_; return *this; } VULKAN_HPP_CONSTEXPR_14 MicromapBuildInfoEXT & setDstMicromap( VULKAN_HPP_NAMESPACE::MicromapEXT dstMicromap_ ) VULKAN_HPP_NOEXCEPT { dstMicromap = dstMicromap_; return *this; } VULKAN_HPP_CONSTEXPR_14 MicromapBuildInfoEXT & setUsageCountsCount( uint32_t usageCountsCount_ ) VULKAN_HPP_NOEXCEPT { usageCountsCount = usageCountsCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 MicromapBuildInfoEXT & setPUsageCounts( const VULKAN_HPP_NAMESPACE::MicromapUsageEXT * pUsageCounts_ ) VULKAN_HPP_NOEXCEPT { pUsageCounts = pUsageCounts_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) MicromapBuildInfoEXT & setUsageCounts( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & usageCounts_ ) VULKAN_HPP_NOEXCEPT { usageCountsCount = static_cast( usageCounts_.size() ); pUsageCounts = usageCounts_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 MicromapBuildInfoEXT & setPpUsageCounts( const VULKAN_HPP_NAMESPACE::MicromapUsageEXT * const * ppUsageCounts_ ) VULKAN_HPP_NOEXCEPT { ppUsageCounts = ppUsageCounts_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) MicromapBuildInfoEXT & setPUsageCounts( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & pUsageCounts_ ) VULKAN_HPP_NOEXCEPT { usageCountsCount = static_cast( pUsageCounts_.size() ); ppUsageCounts = pUsageCounts_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 MicromapBuildInfoEXT & setData( VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR const & data_ ) VULKAN_HPP_NOEXCEPT { data = data_; return *this; } VULKAN_HPP_CONSTEXPR_14 MicromapBuildInfoEXT & setScratchData( VULKAN_HPP_NAMESPACE::DeviceOrHostAddressKHR const & scratchData_ ) VULKAN_HPP_NOEXCEPT { scratchData = scratchData_; return *this; } VULKAN_HPP_CONSTEXPR_14 MicromapBuildInfoEXT & setTriangleArray( VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR const & triangleArray_ ) VULKAN_HPP_NOEXCEPT { triangleArray = triangleArray_; return *this; } VULKAN_HPP_CONSTEXPR_14 MicromapBuildInfoEXT & setTriangleArrayStride( VULKAN_HPP_NAMESPACE::DeviceSize triangleArrayStride_ ) VULKAN_HPP_NOEXCEPT { triangleArrayStride = triangleArrayStride_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkMicromapBuildInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkMicromapBuildInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, type, flags, mode, dstMicromap, usageCountsCount, pUsageCounts, ppUsageCounts, data, scratchData, triangleArray, triangleArrayStride ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eMicromapBuildInfoEXT; const void * pNext = {}; VULKAN_HPP_NAMESPACE::MicromapTypeEXT type = VULKAN_HPP_NAMESPACE::MicromapTypeEXT::eOpacityMicromap; VULKAN_HPP_NAMESPACE::BuildMicromapFlagsEXT flags = {}; VULKAN_HPP_NAMESPACE::BuildMicromapModeEXT mode = VULKAN_HPP_NAMESPACE::BuildMicromapModeEXT::eBuild; VULKAN_HPP_NAMESPACE::MicromapEXT dstMicromap = {}; uint32_t usageCountsCount = {}; const VULKAN_HPP_NAMESPACE::MicromapUsageEXT * pUsageCounts = {}; const VULKAN_HPP_NAMESPACE::MicromapUsageEXT * const * ppUsageCounts = {}; VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR data = {}; VULKAN_HPP_NAMESPACE::DeviceOrHostAddressKHR scratchData = {}; VULKAN_HPP_NAMESPACE::DeviceOrHostAddressConstKHR triangleArray = {}; VULKAN_HPP_NAMESPACE::DeviceSize triangleArrayStride = {}; }; template <> struct CppType { using Type = MicromapBuildInfoEXT; }; struct MicromapBuildSizesInfoEXT { using NativeType = VkMicromapBuildSizesInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eMicromapBuildSizesInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR MicromapBuildSizesInfoEXT( VULKAN_HPP_NAMESPACE::DeviceSize micromapSize_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize buildScratchSize_ = {}, VULKAN_HPP_NAMESPACE::Bool32 discardable_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , micromapSize{ micromapSize_ } , buildScratchSize{ buildScratchSize_ } , discardable{ discardable_ } { } VULKAN_HPP_CONSTEXPR MicromapBuildSizesInfoEXT( MicromapBuildSizesInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; MicromapBuildSizesInfoEXT( VkMicromapBuildSizesInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : MicromapBuildSizesInfoEXT( *reinterpret_cast( &rhs ) ) { } MicromapBuildSizesInfoEXT & operator=( MicromapBuildSizesInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ MicromapBuildSizesInfoEXT & operator=( VkMicromapBuildSizesInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 MicromapBuildSizesInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 MicromapBuildSizesInfoEXT & setMicromapSize( VULKAN_HPP_NAMESPACE::DeviceSize micromapSize_ ) VULKAN_HPP_NOEXCEPT { micromapSize = micromapSize_; return *this; } VULKAN_HPP_CONSTEXPR_14 MicromapBuildSizesInfoEXT & setBuildScratchSize( VULKAN_HPP_NAMESPACE::DeviceSize buildScratchSize_ ) VULKAN_HPP_NOEXCEPT { buildScratchSize = buildScratchSize_; return *this; } VULKAN_HPP_CONSTEXPR_14 MicromapBuildSizesInfoEXT & setDiscardable( VULKAN_HPP_NAMESPACE::Bool32 discardable_ ) VULKAN_HPP_NOEXCEPT { discardable = discardable_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkMicromapBuildSizesInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkMicromapBuildSizesInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, micromapSize, buildScratchSize, discardable ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( MicromapBuildSizesInfoEXT const & ) const = default; #else bool operator==( MicromapBuildSizesInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( micromapSize == rhs.micromapSize ) && ( buildScratchSize == rhs.buildScratchSize ) && ( discardable == rhs.discardable ); # endif } bool operator!=( MicromapBuildSizesInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eMicromapBuildSizesInfoEXT; const void * pNext = {}; VULKAN_HPP_NAMESPACE::DeviceSize micromapSize = {}; VULKAN_HPP_NAMESPACE::DeviceSize buildScratchSize = {}; VULKAN_HPP_NAMESPACE::Bool32 discardable = {}; }; template <> struct CppType { using Type = MicromapBuildSizesInfoEXT; }; struct MicromapCreateInfoEXT { using NativeType = VkMicromapCreateInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eMicromapCreateInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR MicromapCreateInfoEXT( VULKAN_HPP_NAMESPACE::MicromapCreateFlagsEXT createFlags_ = {}, VULKAN_HPP_NAMESPACE::Buffer buffer_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize offset_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize size_ = {}, VULKAN_HPP_NAMESPACE::MicromapTypeEXT type_ = VULKAN_HPP_NAMESPACE::MicromapTypeEXT::eOpacityMicromap, VULKAN_HPP_NAMESPACE::DeviceAddress deviceAddress_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , createFlags{ createFlags_ } , buffer{ buffer_ } , offset{ offset_ } , size{ size_ } , type{ type_ } , deviceAddress{ deviceAddress_ } { } VULKAN_HPP_CONSTEXPR MicromapCreateInfoEXT( MicromapCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; MicromapCreateInfoEXT( VkMicromapCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : MicromapCreateInfoEXT( *reinterpret_cast( &rhs ) ) { } MicromapCreateInfoEXT & operator=( MicromapCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ MicromapCreateInfoEXT & operator=( VkMicromapCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 MicromapCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 MicromapCreateInfoEXT & setCreateFlags( VULKAN_HPP_NAMESPACE::MicromapCreateFlagsEXT createFlags_ ) VULKAN_HPP_NOEXCEPT { createFlags = createFlags_; return *this; } VULKAN_HPP_CONSTEXPR_14 MicromapCreateInfoEXT & setBuffer( VULKAN_HPP_NAMESPACE::Buffer buffer_ ) VULKAN_HPP_NOEXCEPT { buffer = buffer_; return *this; } VULKAN_HPP_CONSTEXPR_14 MicromapCreateInfoEXT & setOffset( VULKAN_HPP_NAMESPACE::DeviceSize offset_ ) VULKAN_HPP_NOEXCEPT { offset = offset_; return *this; } VULKAN_HPP_CONSTEXPR_14 MicromapCreateInfoEXT & setSize( VULKAN_HPP_NAMESPACE::DeviceSize size_ ) VULKAN_HPP_NOEXCEPT { size = size_; return *this; } VULKAN_HPP_CONSTEXPR_14 MicromapCreateInfoEXT & setType( VULKAN_HPP_NAMESPACE::MicromapTypeEXT type_ ) VULKAN_HPP_NOEXCEPT { type = type_; return *this; } VULKAN_HPP_CONSTEXPR_14 MicromapCreateInfoEXT & setDeviceAddress( VULKAN_HPP_NAMESPACE::DeviceAddress deviceAddress_ ) VULKAN_HPP_NOEXCEPT { deviceAddress = deviceAddress_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkMicromapCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkMicromapCreateInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, createFlags, buffer, offset, size, type, deviceAddress ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( MicromapCreateInfoEXT const & ) const = default; #else bool operator==( MicromapCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( createFlags == rhs.createFlags ) && ( buffer == rhs.buffer ) && ( offset == rhs.offset ) && ( size == rhs.size ) && ( type == rhs.type ) && ( deviceAddress == rhs.deviceAddress ); # endif } bool operator!=( MicromapCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eMicromapCreateInfoEXT; const void * pNext = {}; VULKAN_HPP_NAMESPACE::MicromapCreateFlagsEXT createFlags = {}; VULKAN_HPP_NAMESPACE::Buffer buffer = {}; VULKAN_HPP_NAMESPACE::DeviceSize offset = {}; VULKAN_HPP_NAMESPACE::DeviceSize size = {}; VULKAN_HPP_NAMESPACE::MicromapTypeEXT type = VULKAN_HPP_NAMESPACE::MicromapTypeEXT::eOpacityMicromap; VULKAN_HPP_NAMESPACE::DeviceAddress deviceAddress = {}; }; template <> struct CppType { using Type = MicromapCreateInfoEXT; }; struct MicromapTriangleEXT { using NativeType = VkMicromapTriangleEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR MicromapTriangleEXT( uint32_t dataOffset_ = {}, uint16_t subdivisionLevel_ = {}, uint16_t format_ = {} ) VULKAN_HPP_NOEXCEPT : dataOffset{ dataOffset_ } , subdivisionLevel{ subdivisionLevel_ } , format{ format_ } { } VULKAN_HPP_CONSTEXPR MicromapTriangleEXT( MicromapTriangleEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; MicromapTriangleEXT( VkMicromapTriangleEXT const & rhs ) VULKAN_HPP_NOEXCEPT : MicromapTriangleEXT( *reinterpret_cast( &rhs ) ) { } MicromapTriangleEXT & operator=( MicromapTriangleEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ MicromapTriangleEXT & operator=( VkMicromapTriangleEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 MicromapTriangleEXT & setDataOffset( uint32_t dataOffset_ ) VULKAN_HPP_NOEXCEPT { dataOffset = dataOffset_; return *this; } VULKAN_HPP_CONSTEXPR_14 MicromapTriangleEXT & setSubdivisionLevel( uint16_t subdivisionLevel_ ) VULKAN_HPP_NOEXCEPT { subdivisionLevel = subdivisionLevel_; return *this; } VULKAN_HPP_CONSTEXPR_14 MicromapTriangleEXT & setFormat( uint16_t format_ ) VULKAN_HPP_NOEXCEPT { format = format_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkMicromapTriangleEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkMicromapTriangleEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( dataOffset, subdivisionLevel, format ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( MicromapTriangleEXT const & ) const = default; #else bool operator==( MicromapTriangleEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( dataOffset == rhs.dataOffset ) && ( subdivisionLevel == rhs.subdivisionLevel ) && ( format == rhs.format ); # endif } bool operator!=( MicromapTriangleEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: uint32_t dataOffset = {}; uint16_t subdivisionLevel = {}; uint16_t format = {}; }; struct MicromapVersionInfoEXT { using NativeType = VkMicromapVersionInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eMicromapVersionInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR MicromapVersionInfoEXT( const uint8_t * pVersionData_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , pVersionData{ pVersionData_ } { } VULKAN_HPP_CONSTEXPR MicromapVersionInfoEXT( MicromapVersionInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; MicromapVersionInfoEXT( VkMicromapVersionInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : MicromapVersionInfoEXT( *reinterpret_cast( &rhs ) ) { } MicromapVersionInfoEXT & operator=( MicromapVersionInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ MicromapVersionInfoEXT & operator=( VkMicromapVersionInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 MicromapVersionInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 MicromapVersionInfoEXT & setPVersionData( const uint8_t * pVersionData_ ) VULKAN_HPP_NOEXCEPT { pVersionData = pVersionData_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkMicromapVersionInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkMicromapVersionInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, pVersionData ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( MicromapVersionInfoEXT const & ) const = default; #else bool operator==( MicromapVersionInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( pVersionData == rhs.pVersionData ); # endif } bool operator!=( MicromapVersionInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eMicromapVersionInfoEXT; const void * pNext = {}; const uint8_t * pVersionData = {}; }; template <> struct CppType { using Type = MicromapVersionInfoEXT; }; struct MultiDrawIndexedInfoEXT { using NativeType = VkMultiDrawIndexedInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR MultiDrawIndexedInfoEXT( uint32_t firstIndex_ = {}, uint32_t indexCount_ = {}, int32_t vertexOffset_ = {} ) VULKAN_HPP_NOEXCEPT : firstIndex{ firstIndex_ } , indexCount{ indexCount_ } , vertexOffset{ vertexOffset_ } { } VULKAN_HPP_CONSTEXPR MultiDrawIndexedInfoEXT( MultiDrawIndexedInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; MultiDrawIndexedInfoEXT( VkMultiDrawIndexedInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : MultiDrawIndexedInfoEXT( *reinterpret_cast( &rhs ) ) { } MultiDrawIndexedInfoEXT & operator=( MultiDrawIndexedInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ MultiDrawIndexedInfoEXT & operator=( VkMultiDrawIndexedInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 MultiDrawIndexedInfoEXT & setFirstIndex( uint32_t firstIndex_ ) VULKAN_HPP_NOEXCEPT { firstIndex = firstIndex_; return *this; } VULKAN_HPP_CONSTEXPR_14 MultiDrawIndexedInfoEXT & setIndexCount( uint32_t indexCount_ ) VULKAN_HPP_NOEXCEPT { indexCount = indexCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 MultiDrawIndexedInfoEXT & setVertexOffset( int32_t vertexOffset_ ) VULKAN_HPP_NOEXCEPT { vertexOffset = vertexOffset_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkMultiDrawIndexedInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkMultiDrawIndexedInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( firstIndex, indexCount, vertexOffset ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( MultiDrawIndexedInfoEXT const & ) const = default; #else bool operator==( MultiDrawIndexedInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( firstIndex == rhs.firstIndex ) && ( indexCount == rhs.indexCount ) && ( vertexOffset == rhs.vertexOffset ); # endif } bool operator!=( MultiDrawIndexedInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: uint32_t firstIndex = {}; uint32_t indexCount = {}; int32_t vertexOffset = {}; }; struct MultiDrawInfoEXT { using NativeType = VkMultiDrawInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR MultiDrawInfoEXT( uint32_t firstVertex_ = {}, uint32_t vertexCount_ = {} ) VULKAN_HPP_NOEXCEPT : firstVertex{ firstVertex_ } , vertexCount{ vertexCount_ } { } VULKAN_HPP_CONSTEXPR MultiDrawInfoEXT( MultiDrawInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; MultiDrawInfoEXT( VkMultiDrawInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : MultiDrawInfoEXT( *reinterpret_cast( &rhs ) ) {} MultiDrawInfoEXT & operator=( MultiDrawInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ MultiDrawInfoEXT & operator=( VkMultiDrawInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 MultiDrawInfoEXT & setFirstVertex( uint32_t firstVertex_ ) VULKAN_HPP_NOEXCEPT { firstVertex = firstVertex_; return *this; } VULKAN_HPP_CONSTEXPR_14 MultiDrawInfoEXT & setVertexCount( uint32_t vertexCount_ ) VULKAN_HPP_NOEXCEPT { vertexCount = vertexCount_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkMultiDrawInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkMultiDrawInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( firstVertex, vertexCount ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( MultiDrawInfoEXT const & ) const = default; #else bool operator==( MultiDrawInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( firstVertex == rhs.firstVertex ) && ( vertexCount == rhs.vertexCount ); # endif } bool operator!=( MultiDrawInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: uint32_t firstVertex = {}; uint32_t vertexCount = {}; }; struct MultisamplePropertiesEXT { using NativeType = VkMultisamplePropertiesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eMultisamplePropertiesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR MultisamplePropertiesEXT( VULKAN_HPP_NAMESPACE::Extent2D maxSampleLocationGridSize_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , maxSampleLocationGridSize{ maxSampleLocationGridSize_ } { } VULKAN_HPP_CONSTEXPR MultisamplePropertiesEXT( MultisamplePropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; MultisamplePropertiesEXT( VkMultisamplePropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : MultisamplePropertiesEXT( *reinterpret_cast( &rhs ) ) { } MultisamplePropertiesEXT & operator=( MultisamplePropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ MultisamplePropertiesEXT & operator=( VkMultisamplePropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkMultisamplePropertiesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkMultisamplePropertiesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, maxSampleLocationGridSize ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( MultisamplePropertiesEXT const & ) const = default; #else bool operator==( MultisamplePropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( maxSampleLocationGridSize == rhs.maxSampleLocationGridSize ); # endif } bool operator!=( MultisamplePropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eMultisamplePropertiesEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::Extent2D maxSampleLocationGridSize = {}; }; template <> struct CppType { using Type = MultisamplePropertiesEXT; }; struct MultisampledRenderToSingleSampledInfoEXT { using NativeType = VkMultisampledRenderToSingleSampledInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eMultisampledRenderToSingleSampledInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR MultisampledRenderToSingleSampledInfoEXT( VULKAN_HPP_NAMESPACE::Bool32 multisampledRenderToSingleSampledEnable_ = {}, VULKAN_HPP_NAMESPACE::SampleCountFlagBits rasterizationSamples_ = VULKAN_HPP_NAMESPACE::SampleCountFlagBits::e1, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , multisampledRenderToSingleSampledEnable{ multisampledRenderToSingleSampledEnable_ } , rasterizationSamples{ rasterizationSamples_ } { } VULKAN_HPP_CONSTEXPR MultisampledRenderToSingleSampledInfoEXT( MultisampledRenderToSingleSampledInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; MultisampledRenderToSingleSampledInfoEXT( VkMultisampledRenderToSingleSampledInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : MultisampledRenderToSingleSampledInfoEXT( *reinterpret_cast( &rhs ) ) { } MultisampledRenderToSingleSampledInfoEXT & operator=( MultisampledRenderToSingleSampledInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ MultisampledRenderToSingleSampledInfoEXT & operator=( VkMultisampledRenderToSingleSampledInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 MultisampledRenderToSingleSampledInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 MultisampledRenderToSingleSampledInfoEXT & setMultisampledRenderToSingleSampledEnable( VULKAN_HPP_NAMESPACE::Bool32 multisampledRenderToSingleSampledEnable_ ) VULKAN_HPP_NOEXCEPT { multisampledRenderToSingleSampledEnable = multisampledRenderToSingleSampledEnable_; return *this; } VULKAN_HPP_CONSTEXPR_14 MultisampledRenderToSingleSampledInfoEXT & setRasterizationSamples( VULKAN_HPP_NAMESPACE::SampleCountFlagBits rasterizationSamples_ ) VULKAN_HPP_NOEXCEPT { rasterizationSamples = rasterizationSamples_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkMultisampledRenderToSingleSampledInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkMultisampledRenderToSingleSampledInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, multisampledRenderToSingleSampledEnable, rasterizationSamples ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( MultisampledRenderToSingleSampledInfoEXT const & ) const = default; #else bool operator==( MultisampledRenderToSingleSampledInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( multisampledRenderToSingleSampledEnable == rhs.multisampledRenderToSingleSampledEnable ) && ( rasterizationSamples == rhs.rasterizationSamples ); # endif } bool operator!=( MultisampledRenderToSingleSampledInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eMultisampledRenderToSingleSampledInfoEXT; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 multisampledRenderToSingleSampledEnable = {}; VULKAN_HPP_NAMESPACE::SampleCountFlagBits rasterizationSamples = VULKAN_HPP_NAMESPACE::SampleCountFlagBits::e1; }; template <> struct CppType { using Type = MultisampledRenderToSingleSampledInfoEXT; }; struct MultiviewPerViewAttributesInfoNVX { using NativeType = VkMultiviewPerViewAttributesInfoNVX; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eMultiviewPerViewAttributesInfoNVX; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR MultiviewPerViewAttributesInfoNVX( VULKAN_HPP_NAMESPACE::Bool32 perViewAttributes_ = {}, VULKAN_HPP_NAMESPACE::Bool32 perViewAttributesPositionXOnly_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , perViewAttributes{ perViewAttributes_ } , perViewAttributesPositionXOnly{ perViewAttributesPositionXOnly_ } { } VULKAN_HPP_CONSTEXPR MultiviewPerViewAttributesInfoNVX( MultiviewPerViewAttributesInfoNVX const & rhs ) VULKAN_HPP_NOEXCEPT = default; MultiviewPerViewAttributesInfoNVX( VkMultiviewPerViewAttributesInfoNVX const & rhs ) VULKAN_HPP_NOEXCEPT : MultiviewPerViewAttributesInfoNVX( *reinterpret_cast( &rhs ) ) { } MultiviewPerViewAttributesInfoNVX & operator=( MultiviewPerViewAttributesInfoNVX const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ MultiviewPerViewAttributesInfoNVX & operator=( VkMultiviewPerViewAttributesInfoNVX const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 MultiviewPerViewAttributesInfoNVX & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 MultiviewPerViewAttributesInfoNVX & setPerViewAttributes( VULKAN_HPP_NAMESPACE::Bool32 perViewAttributes_ ) VULKAN_HPP_NOEXCEPT { perViewAttributes = perViewAttributes_; return *this; } VULKAN_HPP_CONSTEXPR_14 MultiviewPerViewAttributesInfoNVX & setPerViewAttributesPositionXOnly( VULKAN_HPP_NAMESPACE::Bool32 perViewAttributesPositionXOnly_ ) VULKAN_HPP_NOEXCEPT { perViewAttributesPositionXOnly = perViewAttributesPositionXOnly_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkMultiviewPerViewAttributesInfoNVX const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkMultiviewPerViewAttributesInfoNVX &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, perViewAttributes, perViewAttributesPositionXOnly ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( MultiviewPerViewAttributesInfoNVX const & ) const = default; #else bool operator==( MultiviewPerViewAttributesInfoNVX const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( perViewAttributes == rhs.perViewAttributes ) && ( perViewAttributesPositionXOnly == rhs.perViewAttributesPositionXOnly ); # endif } bool operator!=( MultiviewPerViewAttributesInfoNVX const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eMultiviewPerViewAttributesInfoNVX; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 perViewAttributes = {}; VULKAN_HPP_NAMESPACE::Bool32 perViewAttributesPositionXOnly = {}; }; template <> struct CppType { using Type = MultiviewPerViewAttributesInfoNVX; }; struct MultiviewPerViewRenderAreasRenderPassBeginInfoQCOM { using NativeType = VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR MultiviewPerViewRenderAreasRenderPassBeginInfoQCOM( uint32_t perViewRenderAreaCount_ = {}, const VULKAN_HPP_NAMESPACE::Rect2D * pPerViewRenderAreas_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , perViewRenderAreaCount{ perViewRenderAreaCount_ } , pPerViewRenderAreas{ pPerViewRenderAreas_ } { } VULKAN_HPP_CONSTEXPR MultiviewPerViewRenderAreasRenderPassBeginInfoQCOM( MultiviewPerViewRenderAreasRenderPassBeginInfoQCOM const & rhs ) VULKAN_HPP_NOEXCEPT = default; MultiviewPerViewRenderAreasRenderPassBeginInfoQCOM( VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM const & rhs ) VULKAN_HPP_NOEXCEPT : MultiviewPerViewRenderAreasRenderPassBeginInfoQCOM( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) MultiviewPerViewRenderAreasRenderPassBeginInfoQCOM( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & perViewRenderAreas_, const void * pNext_ = nullptr ) : pNext( pNext_ ), perViewRenderAreaCount( static_cast( perViewRenderAreas_.size() ) ), pPerViewRenderAreas( perViewRenderAreas_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ MultiviewPerViewRenderAreasRenderPassBeginInfoQCOM & operator=( MultiviewPerViewRenderAreasRenderPassBeginInfoQCOM const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ MultiviewPerViewRenderAreasRenderPassBeginInfoQCOM & operator=( VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 MultiviewPerViewRenderAreasRenderPassBeginInfoQCOM & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 MultiviewPerViewRenderAreasRenderPassBeginInfoQCOM & setPerViewRenderAreaCount( uint32_t perViewRenderAreaCount_ ) VULKAN_HPP_NOEXCEPT { perViewRenderAreaCount = perViewRenderAreaCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 MultiviewPerViewRenderAreasRenderPassBeginInfoQCOM & setPPerViewRenderAreas( const VULKAN_HPP_NAMESPACE::Rect2D * pPerViewRenderAreas_ ) VULKAN_HPP_NOEXCEPT { pPerViewRenderAreas = pPerViewRenderAreas_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) MultiviewPerViewRenderAreasRenderPassBeginInfoQCOM & setPerViewRenderAreas( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & perViewRenderAreas_ ) VULKAN_HPP_NOEXCEPT { perViewRenderAreaCount = static_cast( perViewRenderAreas_.size() ); pPerViewRenderAreas = perViewRenderAreas_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, perViewRenderAreaCount, pPerViewRenderAreas ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( MultiviewPerViewRenderAreasRenderPassBeginInfoQCOM const & ) const = default; #else bool operator==( MultiviewPerViewRenderAreasRenderPassBeginInfoQCOM const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( perViewRenderAreaCount == rhs.perViewRenderAreaCount ) && ( pPerViewRenderAreas == rhs.pPerViewRenderAreas ); # endif } bool operator!=( MultiviewPerViewRenderAreasRenderPassBeginInfoQCOM const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM; const void * pNext = {}; uint32_t perViewRenderAreaCount = {}; const VULKAN_HPP_NAMESPACE::Rect2D * pPerViewRenderAreas = {}; }; template <> struct CppType { using Type = MultiviewPerViewRenderAreasRenderPassBeginInfoQCOM; }; struct MutableDescriptorTypeListEXT { using NativeType = VkMutableDescriptorTypeListEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR MutableDescriptorTypeListEXT( uint32_t descriptorTypeCount_ = {}, const VULKAN_HPP_NAMESPACE::DescriptorType * pDescriptorTypes_ = {} ) VULKAN_HPP_NOEXCEPT : descriptorTypeCount{ descriptorTypeCount_ } , pDescriptorTypes{ pDescriptorTypes_ } { } VULKAN_HPP_CONSTEXPR MutableDescriptorTypeListEXT( MutableDescriptorTypeListEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; MutableDescriptorTypeListEXT( VkMutableDescriptorTypeListEXT const & rhs ) VULKAN_HPP_NOEXCEPT : MutableDescriptorTypeListEXT( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) MutableDescriptorTypeListEXT( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & descriptorTypes_ ) : descriptorTypeCount( static_cast( descriptorTypes_.size() ) ), pDescriptorTypes( descriptorTypes_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ MutableDescriptorTypeListEXT & operator=( MutableDescriptorTypeListEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ MutableDescriptorTypeListEXT & operator=( VkMutableDescriptorTypeListEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 MutableDescriptorTypeListEXT & setDescriptorTypeCount( uint32_t descriptorTypeCount_ ) VULKAN_HPP_NOEXCEPT { descriptorTypeCount = descriptorTypeCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 MutableDescriptorTypeListEXT & setPDescriptorTypes( const VULKAN_HPP_NAMESPACE::DescriptorType * pDescriptorTypes_ ) VULKAN_HPP_NOEXCEPT { pDescriptorTypes = pDescriptorTypes_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) MutableDescriptorTypeListEXT & setDescriptorTypes( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & descriptorTypes_ ) VULKAN_HPP_NOEXCEPT { descriptorTypeCount = static_cast( descriptorTypes_.size() ); pDescriptorTypes = descriptorTypes_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkMutableDescriptorTypeListEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkMutableDescriptorTypeListEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( descriptorTypeCount, pDescriptorTypes ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( MutableDescriptorTypeListEXT const & ) const = default; #else bool operator==( MutableDescriptorTypeListEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( descriptorTypeCount == rhs.descriptorTypeCount ) && ( pDescriptorTypes == rhs.pDescriptorTypes ); # endif } bool operator!=( MutableDescriptorTypeListEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: uint32_t descriptorTypeCount = {}; const VULKAN_HPP_NAMESPACE::DescriptorType * pDescriptorTypes = {}; }; using MutableDescriptorTypeListVALVE = MutableDescriptorTypeListEXT; struct MutableDescriptorTypeCreateInfoEXT { using NativeType = VkMutableDescriptorTypeCreateInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eMutableDescriptorTypeCreateInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR MutableDescriptorTypeCreateInfoEXT( uint32_t mutableDescriptorTypeListCount_ = {}, const VULKAN_HPP_NAMESPACE::MutableDescriptorTypeListEXT * pMutableDescriptorTypeLists_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , mutableDescriptorTypeListCount{ mutableDescriptorTypeListCount_ } , pMutableDescriptorTypeLists{ pMutableDescriptorTypeLists_ } { } VULKAN_HPP_CONSTEXPR MutableDescriptorTypeCreateInfoEXT( MutableDescriptorTypeCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; MutableDescriptorTypeCreateInfoEXT( VkMutableDescriptorTypeCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : MutableDescriptorTypeCreateInfoEXT( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) MutableDescriptorTypeCreateInfoEXT( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & mutableDescriptorTypeLists_, const void * pNext_ = nullptr ) : pNext( pNext_ ) , mutableDescriptorTypeListCount( static_cast( mutableDescriptorTypeLists_.size() ) ) , pMutableDescriptorTypeLists( mutableDescriptorTypeLists_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ MutableDescriptorTypeCreateInfoEXT & operator=( MutableDescriptorTypeCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ MutableDescriptorTypeCreateInfoEXT & operator=( VkMutableDescriptorTypeCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 MutableDescriptorTypeCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 MutableDescriptorTypeCreateInfoEXT & setMutableDescriptorTypeListCount( uint32_t mutableDescriptorTypeListCount_ ) VULKAN_HPP_NOEXCEPT { mutableDescriptorTypeListCount = mutableDescriptorTypeListCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 MutableDescriptorTypeCreateInfoEXT & setPMutableDescriptorTypeLists( const VULKAN_HPP_NAMESPACE::MutableDescriptorTypeListEXT * pMutableDescriptorTypeLists_ ) VULKAN_HPP_NOEXCEPT { pMutableDescriptorTypeLists = pMutableDescriptorTypeLists_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) MutableDescriptorTypeCreateInfoEXT & setMutableDescriptorTypeLists( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & mutableDescriptorTypeLists_ ) VULKAN_HPP_NOEXCEPT { mutableDescriptorTypeListCount = static_cast( mutableDescriptorTypeLists_.size() ); pMutableDescriptorTypeLists = mutableDescriptorTypeLists_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkMutableDescriptorTypeCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkMutableDescriptorTypeCreateInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, mutableDescriptorTypeListCount, pMutableDescriptorTypeLists ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( MutableDescriptorTypeCreateInfoEXT const & ) const = default; #else bool operator==( MutableDescriptorTypeCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( mutableDescriptorTypeListCount == rhs.mutableDescriptorTypeListCount ) && ( pMutableDescriptorTypeLists == rhs.pMutableDescriptorTypeLists ); # endif } bool operator!=( MutableDescriptorTypeCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eMutableDescriptorTypeCreateInfoEXT; const void * pNext = {}; uint32_t mutableDescriptorTypeListCount = {}; const VULKAN_HPP_NAMESPACE::MutableDescriptorTypeListEXT * pMutableDescriptorTypeLists = {}; }; template <> struct CppType { using Type = MutableDescriptorTypeCreateInfoEXT; }; using MutableDescriptorTypeCreateInfoVALVE = MutableDescriptorTypeCreateInfoEXT; struct OpaqueCaptureDescriptorDataCreateInfoEXT { using NativeType = VkOpaqueCaptureDescriptorDataCreateInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eOpaqueCaptureDescriptorDataCreateInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR OpaqueCaptureDescriptorDataCreateInfoEXT( const void * opaqueCaptureDescriptorData_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , opaqueCaptureDescriptorData{ opaqueCaptureDescriptorData_ } { } VULKAN_HPP_CONSTEXPR OpaqueCaptureDescriptorDataCreateInfoEXT( OpaqueCaptureDescriptorDataCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; OpaqueCaptureDescriptorDataCreateInfoEXT( VkOpaqueCaptureDescriptorDataCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : OpaqueCaptureDescriptorDataCreateInfoEXT( *reinterpret_cast( &rhs ) ) { } OpaqueCaptureDescriptorDataCreateInfoEXT & operator=( OpaqueCaptureDescriptorDataCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ OpaqueCaptureDescriptorDataCreateInfoEXT & operator=( VkOpaqueCaptureDescriptorDataCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 OpaqueCaptureDescriptorDataCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 OpaqueCaptureDescriptorDataCreateInfoEXT & setOpaqueCaptureDescriptorData( const void * opaqueCaptureDescriptorData_ ) VULKAN_HPP_NOEXCEPT { opaqueCaptureDescriptorData = opaqueCaptureDescriptorData_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkOpaqueCaptureDescriptorDataCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkOpaqueCaptureDescriptorDataCreateInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, opaqueCaptureDescriptorData ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( OpaqueCaptureDescriptorDataCreateInfoEXT const & ) const = default; #else bool operator==( OpaqueCaptureDescriptorDataCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( opaqueCaptureDescriptorData == rhs.opaqueCaptureDescriptorData ); # endif } bool operator!=( OpaqueCaptureDescriptorDataCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eOpaqueCaptureDescriptorDataCreateInfoEXT; const void * pNext = {}; const void * opaqueCaptureDescriptorData = {}; }; template <> struct CppType { using Type = OpaqueCaptureDescriptorDataCreateInfoEXT; }; struct OpticalFlowExecuteInfoNV { using NativeType = VkOpticalFlowExecuteInfoNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eOpticalFlowExecuteInfoNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR OpticalFlowExecuteInfoNV( VULKAN_HPP_NAMESPACE::OpticalFlowExecuteFlagsNV flags_ = {}, uint32_t regionCount_ = {}, const VULKAN_HPP_NAMESPACE::Rect2D * pRegions_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , regionCount{ regionCount_ } , pRegions{ pRegions_ } { } VULKAN_HPP_CONSTEXPR OpticalFlowExecuteInfoNV( OpticalFlowExecuteInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; OpticalFlowExecuteInfoNV( VkOpticalFlowExecuteInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT : OpticalFlowExecuteInfoNV( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) OpticalFlowExecuteInfoNV( VULKAN_HPP_NAMESPACE::OpticalFlowExecuteFlagsNV flags_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & regions_, void * pNext_ = nullptr ) : pNext( pNext_ ), flags( flags_ ), regionCount( static_cast( regions_.size() ) ), pRegions( regions_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ OpticalFlowExecuteInfoNV & operator=( OpticalFlowExecuteInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ OpticalFlowExecuteInfoNV & operator=( VkOpticalFlowExecuteInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 OpticalFlowExecuteInfoNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 OpticalFlowExecuteInfoNV & setFlags( VULKAN_HPP_NAMESPACE::OpticalFlowExecuteFlagsNV flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 OpticalFlowExecuteInfoNV & setRegionCount( uint32_t regionCount_ ) VULKAN_HPP_NOEXCEPT { regionCount = regionCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 OpticalFlowExecuteInfoNV & setPRegions( const VULKAN_HPP_NAMESPACE::Rect2D * pRegions_ ) VULKAN_HPP_NOEXCEPT { pRegions = pRegions_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) OpticalFlowExecuteInfoNV & setRegions( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & regions_ ) VULKAN_HPP_NOEXCEPT { regionCount = static_cast( regions_.size() ); pRegions = regions_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkOpticalFlowExecuteInfoNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkOpticalFlowExecuteInfoNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, regionCount, pRegions ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( OpticalFlowExecuteInfoNV const & ) const = default; #else bool operator==( OpticalFlowExecuteInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( regionCount == rhs.regionCount ) && ( pRegions == rhs.pRegions ); # endif } bool operator!=( OpticalFlowExecuteInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eOpticalFlowExecuteInfoNV; void * pNext = {}; VULKAN_HPP_NAMESPACE::OpticalFlowExecuteFlagsNV flags = {}; uint32_t regionCount = {}; const VULKAN_HPP_NAMESPACE::Rect2D * pRegions = {}; }; template <> struct CppType { using Type = OpticalFlowExecuteInfoNV; }; struct OpticalFlowImageFormatInfoNV { using NativeType = VkOpticalFlowImageFormatInfoNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eOpticalFlowImageFormatInfoNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR OpticalFlowImageFormatInfoNV( VULKAN_HPP_NAMESPACE::OpticalFlowUsageFlagsNV usage_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , usage{ usage_ } { } VULKAN_HPP_CONSTEXPR OpticalFlowImageFormatInfoNV( OpticalFlowImageFormatInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; OpticalFlowImageFormatInfoNV( VkOpticalFlowImageFormatInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT : OpticalFlowImageFormatInfoNV( *reinterpret_cast( &rhs ) ) { } OpticalFlowImageFormatInfoNV & operator=( OpticalFlowImageFormatInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ OpticalFlowImageFormatInfoNV & operator=( VkOpticalFlowImageFormatInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 OpticalFlowImageFormatInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 OpticalFlowImageFormatInfoNV & setUsage( VULKAN_HPP_NAMESPACE::OpticalFlowUsageFlagsNV usage_ ) VULKAN_HPP_NOEXCEPT { usage = usage_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkOpticalFlowImageFormatInfoNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkOpticalFlowImageFormatInfoNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, usage ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( OpticalFlowImageFormatInfoNV const & ) const = default; #else bool operator==( OpticalFlowImageFormatInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( usage == rhs.usage ); # endif } bool operator!=( OpticalFlowImageFormatInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eOpticalFlowImageFormatInfoNV; const void * pNext = {}; VULKAN_HPP_NAMESPACE::OpticalFlowUsageFlagsNV usage = {}; }; template <> struct CppType { using Type = OpticalFlowImageFormatInfoNV; }; struct OpticalFlowImageFormatPropertiesNV { using NativeType = VkOpticalFlowImageFormatPropertiesNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eOpticalFlowImageFormatPropertiesNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR OpticalFlowImageFormatPropertiesNV( VULKAN_HPP_NAMESPACE::Format format_ = VULKAN_HPP_NAMESPACE::Format::eUndefined, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , format{ format_ } { } VULKAN_HPP_CONSTEXPR OpticalFlowImageFormatPropertiesNV( OpticalFlowImageFormatPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; OpticalFlowImageFormatPropertiesNV( VkOpticalFlowImageFormatPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT : OpticalFlowImageFormatPropertiesNV( *reinterpret_cast( &rhs ) ) { } OpticalFlowImageFormatPropertiesNV & operator=( OpticalFlowImageFormatPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ OpticalFlowImageFormatPropertiesNV & operator=( VkOpticalFlowImageFormatPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkOpticalFlowImageFormatPropertiesNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkOpticalFlowImageFormatPropertiesNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, format ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( OpticalFlowImageFormatPropertiesNV const & ) const = default; #else bool operator==( OpticalFlowImageFormatPropertiesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( format == rhs.format ); # endif } bool operator!=( OpticalFlowImageFormatPropertiesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eOpticalFlowImageFormatPropertiesNV; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Format format = VULKAN_HPP_NAMESPACE::Format::eUndefined; }; template <> struct CppType { using Type = OpticalFlowImageFormatPropertiesNV; }; struct OpticalFlowSessionCreateInfoNV { using NativeType = VkOpticalFlowSessionCreateInfoNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eOpticalFlowSessionCreateInfoNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR OpticalFlowSessionCreateInfoNV( uint32_t width_ = {}, uint32_t height_ = {}, VULKAN_HPP_NAMESPACE::Format imageFormat_ = VULKAN_HPP_NAMESPACE::Format::eUndefined, VULKAN_HPP_NAMESPACE::Format flowVectorFormat_ = VULKAN_HPP_NAMESPACE::Format::eUndefined, VULKAN_HPP_NAMESPACE::Format costFormat_ = VULKAN_HPP_NAMESPACE::Format::eUndefined, VULKAN_HPP_NAMESPACE::OpticalFlowGridSizeFlagsNV outputGridSize_ = {}, VULKAN_HPP_NAMESPACE::OpticalFlowGridSizeFlagsNV hintGridSize_ = {}, VULKAN_HPP_NAMESPACE::OpticalFlowPerformanceLevelNV performanceLevel_ = VULKAN_HPP_NAMESPACE::OpticalFlowPerformanceLevelNV::eUnknown, VULKAN_HPP_NAMESPACE::OpticalFlowSessionCreateFlagsNV flags_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , width{ width_ } , height{ height_ } , imageFormat{ imageFormat_ } , flowVectorFormat{ flowVectorFormat_ } , costFormat{ costFormat_ } , outputGridSize{ outputGridSize_ } , hintGridSize{ hintGridSize_ } , performanceLevel{ performanceLevel_ } , flags{ flags_ } { } VULKAN_HPP_CONSTEXPR OpticalFlowSessionCreateInfoNV( OpticalFlowSessionCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; OpticalFlowSessionCreateInfoNV( VkOpticalFlowSessionCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT : OpticalFlowSessionCreateInfoNV( *reinterpret_cast( &rhs ) ) { } OpticalFlowSessionCreateInfoNV & operator=( OpticalFlowSessionCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ OpticalFlowSessionCreateInfoNV & operator=( VkOpticalFlowSessionCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 OpticalFlowSessionCreateInfoNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 OpticalFlowSessionCreateInfoNV & setWidth( uint32_t width_ ) VULKAN_HPP_NOEXCEPT { width = width_; return *this; } VULKAN_HPP_CONSTEXPR_14 OpticalFlowSessionCreateInfoNV & setHeight( uint32_t height_ ) VULKAN_HPP_NOEXCEPT { height = height_; return *this; } VULKAN_HPP_CONSTEXPR_14 OpticalFlowSessionCreateInfoNV & setImageFormat( VULKAN_HPP_NAMESPACE::Format imageFormat_ ) VULKAN_HPP_NOEXCEPT { imageFormat = imageFormat_; return *this; } VULKAN_HPP_CONSTEXPR_14 OpticalFlowSessionCreateInfoNV & setFlowVectorFormat( VULKAN_HPP_NAMESPACE::Format flowVectorFormat_ ) VULKAN_HPP_NOEXCEPT { flowVectorFormat = flowVectorFormat_; return *this; } VULKAN_HPP_CONSTEXPR_14 OpticalFlowSessionCreateInfoNV & setCostFormat( VULKAN_HPP_NAMESPACE::Format costFormat_ ) VULKAN_HPP_NOEXCEPT { costFormat = costFormat_; return *this; } VULKAN_HPP_CONSTEXPR_14 OpticalFlowSessionCreateInfoNV & setOutputGridSize( VULKAN_HPP_NAMESPACE::OpticalFlowGridSizeFlagsNV outputGridSize_ ) VULKAN_HPP_NOEXCEPT { outputGridSize = outputGridSize_; return *this; } VULKAN_HPP_CONSTEXPR_14 OpticalFlowSessionCreateInfoNV & setHintGridSize( VULKAN_HPP_NAMESPACE::OpticalFlowGridSizeFlagsNV hintGridSize_ ) VULKAN_HPP_NOEXCEPT { hintGridSize = hintGridSize_; return *this; } VULKAN_HPP_CONSTEXPR_14 OpticalFlowSessionCreateInfoNV & setPerformanceLevel( VULKAN_HPP_NAMESPACE::OpticalFlowPerformanceLevelNV performanceLevel_ ) VULKAN_HPP_NOEXCEPT { performanceLevel = performanceLevel_; return *this; } VULKAN_HPP_CONSTEXPR_14 OpticalFlowSessionCreateInfoNV & setFlags( VULKAN_HPP_NAMESPACE::OpticalFlowSessionCreateFlagsNV flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkOpticalFlowSessionCreateInfoNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkOpticalFlowSessionCreateInfoNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, width, height, imageFormat, flowVectorFormat, costFormat, outputGridSize, hintGridSize, performanceLevel, flags ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( OpticalFlowSessionCreateInfoNV const & ) const = default; #else bool operator==( OpticalFlowSessionCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( width == rhs.width ) && ( height == rhs.height ) && ( imageFormat == rhs.imageFormat ) && ( flowVectorFormat == rhs.flowVectorFormat ) && ( costFormat == rhs.costFormat ) && ( outputGridSize == rhs.outputGridSize ) && ( hintGridSize == rhs.hintGridSize ) && ( performanceLevel == rhs.performanceLevel ) && ( flags == rhs.flags ); # endif } bool operator!=( OpticalFlowSessionCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eOpticalFlowSessionCreateInfoNV; void * pNext = {}; uint32_t width = {}; uint32_t height = {}; VULKAN_HPP_NAMESPACE::Format imageFormat = VULKAN_HPP_NAMESPACE::Format::eUndefined; VULKAN_HPP_NAMESPACE::Format flowVectorFormat = VULKAN_HPP_NAMESPACE::Format::eUndefined; VULKAN_HPP_NAMESPACE::Format costFormat = VULKAN_HPP_NAMESPACE::Format::eUndefined; VULKAN_HPP_NAMESPACE::OpticalFlowGridSizeFlagsNV outputGridSize = {}; VULKAN_HPP_NAMESPACE::OpticalFlowGridSizeFlagsNV hintGridSize = {}; VULKAN_HPP_NAMESPACE::OpticalFlowPerformanceLevelNV performanceLevel = VULKAN_HPP_NAMESPACE::OpticalFlowPerformanceLevelNV::eUnknown; VULKAN_HPP_NAMESPACE::OpticalFlowSessionCreateFlagsNV flags = {}; }; template <> struct CppType { using Type = OpticalFlowSessionCreateInfoNV; }; struct OpticalFlowSessionCreatePrivateDataInfoNV { using NativeType = VkOpticalFlowSessionCreatePrivateDataInfoNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eOpticalFlowSessionCreatePrivateDataInfoNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR OpticalFlowSessionCreatePrivateDataInfoNV( uint32_t id_ = {}, uint32_t size_ = {}, const void * pPrivateData_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , id{ id_ } , size{ size_ } , pPrivateData{ pPrivateData_ } { } VULKAN_HPP_CONSTEXPR OpticalFlowSessionCreatePrivateDataInfoNV( OpticalFlowSessionCreatePrivateDataInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; OpticalFlowSessionCreatePrivateDataInfoNV( VkOpticalFlowSessionCreatePrivateDataInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT : OpticalFlowSessionCreatePrivateDataInfoNV( *reinterpret_cast( &rhs ) ) { } OpticalFlowSessionCreatePrivateDataInfoNV & operator=( OpticalFlowSessionCreatePrivateDataInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ OpticalFlowSessionCreatePrivateDataInfoNV & operator=( VkOpticalFlowSessionCreatePrivateDataInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 OpticalFlowSessionCreatePrivateDataInfoNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 OpticalFlowSessionCreatePrivateDataInfoNV & setId( uint32_t id_ ) VULKAN_HPP_NOEXCEPT { id = id_; return *this; } VULKAN_HPP_CONSTEXPR_14 OpticalFlowSessionCreatePrivateDataInfoNV & setSize( uint32_t size_ ) VULKAN_HPP_NOEXCEPT { size = size_; return *this; } VULKAN_HPP_CONSTEXPR_14 OpticalFlowSessionCreatePrivateDataInfoNV & setPPrivateData( const void * pPrivateData_ ) VULKAN_HPP_NOEXCEPT { pPrivateData = pPrivateData_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkOpticalFlowSessionCreatePrivateDataInfoNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkOpticalFlowSessionCreatePrivateDataInfoNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, id, size, pPrivateData ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( OpticalFlowSessionCreatePrivateDataInfoNV const & ) const = default; #else bool operator==( OpticalFlowSessionCreatePrivateDataInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( id == rhs.id ) && ( size == rhs.size ) && ( pPrivateData == rhs.pPrivateData ); # endif } bool operator!=( OpticalFlowSessionCreatePrivateDataInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eOpticalFlowSessionCreatePrivateDataInfoNV; void * pNext = {}; uint32_t id = {}; uint32_t size = {}; const void * pPrivateData = {}; }; template <> struct CppType { using Type = OpticalFlowSessionCreatePrivateDataInfoNV; }; struct OutOfBandQueueTypeInfoNV { using NativeType = VkOutOfBandQueueTypeInfoNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eOutOfBandQueueTypeInfoNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR OutOfBandQueueTypeInfoNV( VULKAN_HPP_NAMESPACE::OutOfBandQueueTypeNV queueType_ = VULKAN_HPP_NAMESPACE::OutOfBandQueueTypeNV::eRender, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , queueType{ queueType_ } { } VULKAN_HPP_CONSTEXPR OutOfBandQueueTypeInfoNV( OutOfBandQueueTypeInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; OutOfBandQueueTypeInfoNV( VkOutOfBandQueueTypeInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT : OutOfBandQueueTypeInfoNV( *reinterpret_cast( &rhs ) ) { } OutOfBandQueueTypeInfoNV & operator=( OutOfBandQueueTypeInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ OutOfBandQueueTypeInfoNV & operator=( VkOutOfBandQueueTypeInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 OutOfBandQueueTypeInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 OutOfBandQueueTypeInfoNV & setQueueType( VULKAN_HPP_NAMESPACE::OutOfBandQueueTypeNV queueType_ ) VULKAN_HPP_NOEXCEPT { queueType = queueType_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkOutOfBandQueueTypeInfoNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkOutOfBandQueueTypeInfoNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, queueType ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( OutOfBandQueueTypeInfoNV const & ) const = default; #else bool operator==( OutOfBandQueueTypeInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( queueType == rhs.queueType ); # endif } bool operator!=( OutOfBandQueueTypeInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eOutOfBandQueueTypeInfoNV; const void * pNext = {}; VULKAN_HPP_NAMESPACE::OutOfBandQueueTypeNV queueType = VULKAN_HPP_NAMESPACE::OutOfBandQueueTypeNV::eRender; }; template <> struct CppType { using Type = OutOfBandQueueTypeInfoNV; }; struct PartitionedAccelerationStructureFlagsNV { using NativeType = VkPartitionedAccelerationStructureFlagsNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePartitionedAccelerationStructureFlagsNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PartitionedAccelerationStructureFlagsNV( VULKAN_HPP_NAMESPACE::Bool32 enablePartitionTranslation_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , enablePartitionTranslation{ enablePartitionTranslation_ } { } VULKAN_HPP_CONSTEXPR PartitionedAccelerationStructureFlagsNV( PartitionedAccelerationStructureFlagsNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; PartitionedAccelerationStructureFlagsNV( VkPartitionedAccelerationStructureFlagsNV const & rhs ) VULKAN_HPP_NOEXCEPT : PartitionedAccelerationStructureFlagsNV( *reinterpret_cast( &rhs ) ) { } PartitionedAccelerationStructureFlagsNV & operator=( PartitionedAccelerationStructureFlagsNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PartitionedAccelerationStructureFlagsNV & operator=( VkPartitionedAccelerationStructureFlagsNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PartitionedAccelerationStructureFlagsNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PartitionedAccelerationStructureFlagsNV & setEnablePartitionTranslation( VULKAN_HPP_NAMESPACE::Bool32 enablePartitionTranslation_ ) VULKAN_HPP_NOEXCEPT { enablePartitionTranslation = enablePartitionTranslation_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPartitionedAccelerationStructureFlagsNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPartitionedAccelerationStructureFlagsNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, enablePartitionTranslation ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PartitionedAccelerationStructureFlagsNV const & ) const = default; #else bool operator==( PartitionedAccelerationStructureFlagsNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( enablePartitionTranslation == rhs.enablePartitionTranslation ); # endif } bool operator!=( PartitionedAccelerationStructureFlagsNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePartitionedAccelerationStructureFlagsNV; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 enablePartitionTranslation = {}; }; template <> struct CppType { using Type = PartitionedAccelerationStructureFlagsNV; }; struct PartitionedAccelerationStructureUpdateInstanceDataNV { using NativeType = VkPartitionedAccelerationStructureUpdateInstanceDataNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PartitionedAccelerationStructureUpdateInstanceDataNV( uint32_t instanceIndex_ = {}, uint32_t instanceContributionToHitGroupIndex_ = {}, VULKAN_HPP_NAMESPACE::DeviceAddress accelerationStructure_ = {} ) VULKAN_HPP_NOEXCEPT : instanceIndex{ instanceIndex_ } , instanceContributionToHitGroupIndex{ instanceContributionToHitGroupIndex_ } , accelerationStructure{ accelerationStructure_ } { } VULKAN_HPP_CONSTEXPR PartitionedAccelerationStructureUpdateInstanceDataNV( PartitionedAccelerationStructureUpdateInstanceDataNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; PartitionedAccelerationStructureUpdateInstanceDataNV( VkPartitionedAccelerationStructureUpdateInstanceDataNV const & rhs ) VULKAN_HPP_NOEXCEPT : PartitionedAccelerationStructureUpdateInstanceDataNV( *reinterpret_cast( &rhs ) ) { } PartitionedAccelerationStructureUpdateInstanceDataNV & operator=( PartitionedAccelerationStructureUpdateInstanceDataNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PartitionedAccelerationStructureUpdateInstanceDataNV & operator=( VkPartitionedAccelerationStructureUpdateInstanceDataNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PartitionedAccelerationStructureUpdateInstanceDataNV & setInstanceIndex( uint32_t instanceIndex_ ) VULKAN_HPP_NOEXCEPT { instanceIndex = instanceIndex_; return *this; } VULKAN_HPP_CONSTEXPR_14 PartitionedAccelerationStructureUpdateInstanceDataNV & setInstanceContributionToHitGroupIndex( uint32_t instanceContributionToHitGroupIndex_ ) VULKAN_HPP_NOEXCEPT { instanceContributionToHitGroupIndex = instanceContributionToHitGroupIndex_; return *this; } VULKAN_HPP_CONSTEXPR_14 PartitionedAccelerationStructureUpdateInstanceDataNV & setAccelerationStructure( VULKAN_HPP_NAMESPACE::DeviceAddress accelerationStructure_ ) VULKAN_HPP_NOEXCEPT { accelerationStructure = accelerationStructure_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPartitionedAccelerationStructureUpdateInstanceDataNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPartitionedAccelerationStructureUpdateInstanceDataNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( instanceIndex, instanceContributionToHitGroupIndex, accelerationStructure ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PartitionedAccelerationStructureUpdateInstanceDataNV const & ) const = default; #else bool operator==( PartitionedAccelerationStructureUpdateInstanceDataNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( instanceIndex == rhs.instanceIndex ) && ( instanceContributionToHitGroupIndex == rhs.instanceContributionToHitGroupIndex ) && ( accelerationStructure == rhs.accelerationStructure ); # endif } bool operator!=( PartitionedAccelerationStructureUpdateInstanceDataNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: uint32_t instanceIndex = {}; uint32_t instanceContributionToHitGroupIndex = {}; VULKAN_HPP_NAMESPACE::DeviceAddress accelerationStructure = {}; }; struct PartitionedAccelerationStructureWriteInstanceDataNV { using NativeType = VkPartitionedAccelerationStructureWriteInstanceDataNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 PartitionedAccelerationStructureWriteInstanceDataNV( VULKAN_HPP_NAMESPACE::TransformMatrixKHR transform_ = {}, std::array const & explicitAABB_ = {}, uint32_t instanceID_ = {}, uint32_t instanceMask_ = {}, uint32_t instanceContributionToHitGroupIndex_ = {}, VULKAN_HPP_NAMESPACE::PartitionedAccelerationStructureInstanceFlagsNV instanceFlags_ = {}, uint32_t instanceIndex_ = {}, uint32_t partitionIndex_ = {}, VULKAN_HPP_NAMESPACE::DeviceAddress accelerationStructure_ = {} ) VULKAN_HPP_NOEXCEPT : transform{ transform_ } , explicitAABB{ explicitAABB_ } , instanceID{ instanceID_ } , instanceMask{ instanceMask_ } , instanceContributionToHitGroupIndex{ instanceContributionToHitGroupIndex_ } , instanceFlags{ instanceFlags_ } , instanceIndex{ instanceIndex_ } , partitionIndex{ partitionIndex_ } , accelerationStructure{ accelerationStructure_ } { } VULKAN_HPP_CONSTEXPR_14 PartitionedAccelerationStructureWriteInstanceDataNV( PartitionedAccelerationStructureWriteInstanceDataNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; PartitionedAccelerationStructureWriteInstanceDataNV( VkPartitionedAccelerationStructureWriteInstanceDataNV const & rhs ) VULKAN_HPP_NOEXCEPT : PartitionedAccelerationStructureWriteInstanceDataNV( *reinterpret_cast( &rhs ) ) { } PartitionedAccelerationStructureWriteInstanceDataNV & operator=( PartitionedAccelerationStructureWriteInstanceDataNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PartitionedAccelerationStructureWriteInstanceDataNV & operator=( VkPartitionedAccelerationStructureWriteInstanceDataNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PartitionedAccelerationStructureWriteInstanceDataNV & setTransform( VULKAN_HPP_NAMESPACE::TransformMatrixKHR const & transform_ ) VULKAN_HPP_NOEXCEPT { transform = transform_; return *this; } VULKAN_HPP_CONSTEXPR_14 PartitionedAccelerationStructureWriteInstanceDataNV & setExplicitAABB( std::array explicitAABB_ ) VULKAN_HPP_NOEXCEPT { explicitAABB = explicitAABB_; return *this; } VULKAN_HPP_CONSTEXPR_14 PartitionedAccelerationStructureWriteInstanceDataNV & setInstanceID( uint32_t instanceID_ ) VULKAN_HPP_NOEXCEPT { instanceID = instanceID_; return *this; } VULKAN_HPP_CONSTEXPR_14 PartitionedAccelerationStructureWriteInstanceDataNV & setInstanceMask( uint32_t instanceMask_ ) VULKAN_HPP_NOEXCEPT { instanceMask = instanceMask_; return *this; } VULKAN_HPP_CONSTEXPR_14 PartitionedAccelerationStructureWriteInstanceDataNV & setInstanceContributionToHitGroupIndex( uint32_t instanceContributionToHitGroupIndex_ ) VULKAN_HPP_NOEXCEPT { instanceContributionToHitGroupIndex = instanceContributionToHitGroupIndex_; return *this; } VULKAN_HPP_CONSTEXPR_14 PartitionedAccelerationStructureWriteInstanceDataNV & setInstanceFlags( VULKAN_HPP_NAMESPACE::PartitionedAccelerationStructureInstanceFlagsNV instanceFlags_ ) VULKAN_HPP_NOEXCEPT { instanceFlags = instanceFlags_; return *this; } VULKAN_HPP_CONSTEXPR_14 PartitionedAccelerationStructureWriteInstanceDataNV & setInstanceIndex( uint32_t instanceIndex_ ) VULKAN_HPP_NOEXCEPT { instanceIndex = instanceIndex_; return *this; } VULKAN_HPP_CONSTEXPR_14 PartitionedAccelerationStructureWriteInstanceDataNV & setPartitionIndex( uint32_t partitionIndex_ ) VULKAN_HPP_NOEXCEPT { partitionIndex = partitionIndex_; return *this; } VULKAN_HPP_CONSTEXPR_14 PartitionedAccelerationStructureWriteInstanceDataNV & setAccelerationStructure( VULKAN_HPP_NAMESPACE::DeviceAddress accelerationStructure_ ) VULKAN_HPP_NOEXCEPT { accelerationStructure = accelerationStructure_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPartitionedAccelerationStructureWriteInstanceDataNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPartitionedAccelerationStructureWriteInstanceDataNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple const &, uint32_t const &, uint32_t const &, uint32_t const &, VULKAN_HPP_NAMESPACE::PartitionedAccelerationStructureInstanceFlagsNV const &, uint32_t const &, uint32_t const &, VULKAN_HPP_NAMESPACE::DeviceAddress const &> # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( transform, explicitAABB, instanceID, instanceMask, instanceContributionToHitGroupIndex, instanceFlags, instanceIndex, partitionIndex, accelerationStructure ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PartitionedAccelerationStructureWriteInstanceDataNV const & ) const = default; #else bool operator==( PartitionedAccelerationStructureWriteInstanceDataNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( transform == rhs.transform ) && ( explicitAABB == rhs.explicitAABB ) && ( instanceID == rhs.instanceID ) && ( instanceMask == rhs.instanceMask ) && ( instanceContributionToHitGroupIndex == rhs.instanceContributionToHitGroupIndex ) && ( instanceFlags == rhs.instanceFlags ) && ( instanceIndex == rhs.instanceIndex ) && ( partitionIndex == rhs.partitionIndex ) && ( accelerationStructure == rhs.accelerationStructure ); # endif } bool operator!=( PartitionedAccelerationStructureWriteInstanceDataNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::TransformMatrixKHR transform = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D explicitAABB = {}; uint32_t instanceID = {}; uint32_t instanceMask = {}; uint32_t instanceContributionToHitGroupIndex = {}; VULKAN_HPP_NAMESPACE::PartitionedAccelerationStructureInstanceFlagsNV instanceFlags = {}; uint32_t instanceIndex = {}; uint32_t partitionIndex = {}; VULKAN_HPP_NAMESPACE::DeviceAddress accelerationStructure = {}; }; struct PartitionedAccelerationStructureWritePartitionTranslationDataNV { using NativeType = VkPartitionedAccelerationStructureWritePartitionTranslationDataNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 PartitionedAccelerationStructureWritePartitionTranslationDataNV( uint32_t partitionIndex_ = {}, std::array const & partitionTranslation_ = {} ) VULKAN_HPP_NOEXCEPT : partitionIndex{ partitionIndex_ } , partitionTranslation{ partitionTranslation_ } { } VULKAN_HPP_CONSTEXPR_14 PartitionedAccelerationStructureWritePartitionTranslationDataNV( PartitionedAccelerationStructureWritePartitionTranslationDataNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; PartitionedAccelerationStructureWritePartitionTranslationDataNV( VkPartitionedAccelerationStructureWritePartitionTranslationDataNV const & rhs ) VULKAN_HPP_NOEXCEPT : PartitionedAccelerationStructureWritePartitionTranslationDataNV( *reinterpret_cast( &rhs ) ) { } PartitionedAccelerationStructureWritePartitionTranslationDataNV & operator=( PartitionedAccelerationStructureWritePartitionTranslationDataNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PartitionedAccelerationStructureWritePartitionTranslationDataNV & operator=( VkPartitionedAccelerationStructureWritePartitionTranslationDataNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PartitionedAccelerationStructureWritePartitionTranslationDataNV & setPartitionIndex( uint32_t partitionIndex_ ) VULKAN_HPP_NOEXCEPT { partitionIndex = partitionIndex_; return *this; } VULKAN_HPP_CONSTEXPR_14 PartitionedAccelerationStructureWritePartitionTranslationDataNV & setPartitionTranslation( std::array partitionTranslation_ ) VULKAN_HPP_NOEXCEPT { partitionTranslation = partitionTranslation_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPartitionedAccelerationStructureWritePartitionTranslationDataNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPartitionedAccelerationStructureWritePartitionTranslationDataNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple const &> # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( partitionIndex, partitionTranslation ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PartitionedAccelerationStructureWritePartitionTranslationDataNV const & ) const = default; #else bool operator==( PartitionedAccelerationStructureWritePartitionTranslationDataNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( partitionIndex == rhs.partitionIndex ) && ( partitionTranslation == rhs.partitionTranslation ); # endif } bool operator!=( PartitionedAccelerationStructureWritePartitionTranslationDataNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: uint32_t partitionIndex = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D partitionTranslation = {}; }; struct PastPresentationTimingGOOGLE { using NativeType = VkPastPresentationTimingGOOGLE; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PastPresentationTimingGOOGLE( uint32_t presentID_ = {}, uint64_t desiredPresentTime_ = {}, uint64_t actualPresentTime_ = {}, uint64_t earliestPresentTime_ = {}, uint64_t presentMargin_ = {} ) VULKAN_HPP_NOEXCEPT : presentID{ presentID_ } , desiredPresentTime{ desiredPresentTime_ } , actualPresentTime{ actualPresentTime_ } , earliestPresentTime{ earliestPresentTime_ } , presentMargin{ presentMargin_ } { } VULKAN_HPP_CONSTEXPR PastPresentationTimingGOOGLE( PastPresentationTimingGOOGLE const & rhs ) VULKAN_HPP_NOEXCEPT = default; PastPresentationTimingGOOGLE( VkPastPresentationTimingGOOGLE const & rhs ) VULKAN_HPP_NOEXCEPT : PastPresentationTimingGOOGLE( *reinterpret_cast( &rhs ) ) { } PastPresentationTimingGOOGLE & operator=( PastPresentationTimingGOOGLE const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PastPresentationTimingGOOGLE & operator=( VkPastPresentationTimingGOOGLE const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPastPresentationTimingGOOGLE const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPastPresentationTimingGOOGLE &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( presentID, desiredPresentTime, actualPresentTime, earliestPresentTime, presentMargin ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PastPresentationTimingGOOGLE const & ) const = default; #else bool operator==( PastPresentationTimingGOOGLE const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( presentID == rhs.presentID ) && ( desiredPresentTime == rhs.desiredPresentTime ) && ( actualPresentTime == rhs.actualPresentTime ) && ( earliestPresentTime == rhs.earliestPresentTime ) && ( presentMargin == rhs.presentMargin ); # endif } bool operator!=( PastPresentationTimingGOOGLE const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: uint32_t presentID = {}; uint64_t desiredPresentTime = {}; uint64_t actualPresentTime = {}; uint64_t earliestPresentTime = {}; uint64_t presentMargin = {}; }; struct PerformanceConfigurationAcquireInfoINTEL { using NativeType = VkPerformanceConfigurationAcquireInfoINTEL; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePerformanceConfigurationAcquireInfoINTEL; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PerformanceConfigurationAcquireInfoINTEL( VULKAN_HPP_NAMESPACE::PerformanceConfigurationTypeINTEL type_ = VULKAN_HPP_NAMESPACE::PerformanceConfigurationTypeINTEL::eCommandQueueMetricsDiscoveryActivated, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , type{ type_ } { } VULKAN_HPP_CONSTEXPR PerformanceConfigurationAcquireInfoINTEL( PerformanceConfigurationAcquireInfoINTEL const & rhs ) VULKAN_HPP_NOEXCEPT = default; PerformanceConfigurationAcquireInfoINTEL( VkPerformanceConfigurationAcquireInfoINTEL const & rhs ) VULKAN_HPP_NOEXCEPT : PerformanceConfigurationAcquireInfoINTEL( *reinterpret_cast( &rhs ) ) { } PerformanceConfigurationAcquireInfoINTEL & operator=( PerformanceConfigurationAcquireInfoINTEL const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PerformanceConfigurationAcquireInfoINTEL & operator=( VkPerformanceConfigurationAcquireInfoINTEL const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PerformanceConfigurationAcquireInfoINTEL & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PerformanceConfigurationAcquireInfoINTEL & setType( VULKAN_HPP_NAMESPACE::PerformanceConfigurationTypeINTEL type_ ) VULKAN_HPP_NOEXCEPT { type = type_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPerformanceConfigurationAcquireInfoINTEL const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPerformanceConfigurationAcquireInfoINTEL &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, type ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PerformanceConfigurationAcquireInfoINTEL const & ) const = default; #else bool operator==( PerformanceConfigurationAcquireInfoINTEL const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( type == rhs.type ); # endif } bool operator!=( PerformanceConfigurationAcquireInfoINTEL const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePerformanceConfigurationAcquireInfoINTEL; const void * pNext = {}; VULKAN_HPP_NAMESPACE::PerformanceConfigurationTypeINTEL type = VULKAN_HPP_NAMESPACE::PerformanceConfigurationTypeINTEL::eCommandQueueMetricsDiscoveryActivated; }; template <> struct CppType { using Type = PerformanceConfigurationAcquireInfoINTEL; }; struct PerformanceCounterDescriptionKHR { using NativeType = VkPerformanceCounterDescriptionKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePerformanceCounterDescriptionKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 PerformanceCounterDescriptionKHR( VULKAN_HPP_NAMESPACE::PerformanceCounterDescriptionFlagsKHR flags_ = {}, std::array const & name_ = {}, std::array const & category_ = {}, std::array const & description_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , name{ name_ } , category{ category_ } , description{ description_ } { } VULKAN_HPP_CONSTEXPR_14 PerformanceCounterDescriptionKHR( PerformanceCounterDescriptionKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; PerformanceCounterDescriptionKHR( VkPerformanceCounterDescriptionKHR const & rhs ) VULKAN_HPP_NOEXCEPT : PerformanceCounterDescriptionKHR( *reinterpret_cast( &rhs ) ) { } PerformanceCounterDescriptionKHR & operator=( PerformanceCounterDescriptionKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PerformanceCounterDescriptionKHR & operator=( VkPerformanceCounterDescriptionKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPerformanceCounterDescriptionKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPerformanceCounterDescriptionKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple const &, VULKAN_HPP_NAMESPACE::ArrayWrapper1D const &, VULKAN_HPP_NAMESPACE::ArrayWrapper1D const &> # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, name, category, description ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) std::strong_ordering operator<=>( PerformanceCounterDescriptionKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { if ( auto cmp = sType <=> rhs.sType; cmp != 0 ) return cmp; if ( auto cmp = pNext <=> rhs.pNext; cmp != 0 ) return cmp; if ( auto cmp = flags <=> rhs.flags; cmp != 0 ) return cmp; if ( auto cmp = strcmp( name, rhs.name ); cmp != 0 ) return ( cmp < 0 ) ? std::strong_ordering::less : std::strong_ordering::greater; if ( auto cmp = strcmp( category, rhs.category ); cmp != 0 ) return ( cmp < 0 ) ? std::strong_ordering::less : std::strong_ordering::greater; if ( auto cmp = strcmp( description, rhs.description ); cmp != 0 ) return ( cmp < 0 ) ? std::strong_ordering::less : std::strong_ordering::greater; return std::strong_ordering::equivalent; } #endif bool operator==( PerformanceCounterDescriptionKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( strcmp( name, rhs.name ) == 0 ) && ( strcmp( category, rhs.category ) == 0 ) && ( strcmp( description, rhs.description ) == 0 ); } bool operator!=( PerformanceCounterDescriptionKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePerformanceCounterDescriptionKHR; void * pNext = {}; VULKAN_HPP_NAMESPACE::PerformanceCounterDescriptionFlagsKHR flags = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D name = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D category = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D description = {}; }; template <> struct CppType { using Type = PerformanceCounterDescriptionKHR; }; struct PerformanceCounterKHR { using NativeType = VkPerformanceCounterKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePerformanceCounterKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 PerformanceCounterKHR( VULKAN_HPP_NAMESPACE::PerformanceCounterUnitKHR unit_ = VULKAN_HPP_NAMESPACE::PerformanceCounterUnitKHR::eGeneric, VULKAN_HPP_NAMESPACE::PerformanceCounterScopeKHR scope_ = VULKAN_HPP_NAMESPACE::PerformanceCounterScopeKHR::eCommandBuffer, VULKAN_HPP_NAMESPACE::PerformanceCounterStorageKHR storage_ = VULKAN_HPP_NAMESPACE::PerformanceCounterStorageKHR::eInt32, std::array const & uuid_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , unit{ unit_ } , scope{ scope_ } , storage{ storage_ } , uuid{ uuid_ } { } VULKAN_HPP_CONSTEXPR_14 PerformanceCounterKHR( PerformanceCounterKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; PerformanceCounterKHR( VkPerformanceCounterKHR const & rhs ) VULKAN_HPP_NOEXCEPT : PerformanceCounterKHR( *reinterpret_cast( &rhs ) ) { } PerformanceCounterKHR & operator=( PerformanceCounterKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PerformanceCounterKHR & operator=( VkPerformanceCounterKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPerformanceCounterKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPerformanceCounterKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple const &> # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, unit, scope, storage, uuid ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PerformanceCounterKHR const & ) const = default; #else bool operator==( PerformanceCounterKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( unit == rhs.unit ) && ( scope == rhs.scope ) && ( storage == rhs.storage ) && ( uuid == rhs.uuid ); # endif } bool operator!=( PerformanceCounterKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePerformanceCounterKHR; void * pNext = {}; VULKAN_HPP_NAMESPACE::PerformanceCounterUnitKHR unit = VULKAN_HPP_NAMESPACE::PerformanceCounterUnitKHR::eGeneric; VULKAN_HPP_NAMESPACE::PerformanceCounterScopeKHR scope = VULKAN_HPP_NAMESPACE::PerformanceCounterScopeKHR::eCommandBuffer; VULKAN_HPP_NAMESPACE::PerformanceCounterStorageKHR storage = VULKAN_HPP_NAMESPACE::PerformanceCounterStorageKHR::eInt32; VULKAN_HPP_NAMESPACE::ArrayWrapper1D uuid = {}; }; template <> struct CppType { using Type = PerformanceCounterKHR; }; union PerformanceCounterResultKHR { using NativeType = VkPerformanceCounterResultKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_UNION_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 PerformanceCounterResultKHR( int32_t int32_ = {} ) : int32( int32_ ) {} VULKAN_HPP_CONSTEXPR_14 PerformanceCounterResultKHR( int64_t int64_ ) : int64( int64_ ) {} VULKAN_HPP_CONSTEXPR_14 PerformanceCounterResultKHR( uint32_t uint32_ ) : uint32( uint32_ ) {} VULKAN_HPP_CONSTEXPR_14 PerformanceCounterResultKHR( uint64_t uint64_ ) : uint64( uint64_ ) {} VULKAN_HPP_CONSTEXPR_14 PerformanceCounterResultKHR( float float32_ ) : float32( float32_ ) {} VULKAN_HPP_CONSTEXPR_14 PerformanceCounterResultKHR( double float64_ ) : float64( float64_ ) {} #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_UNION_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PerformanceCounterResultKHR & setInt32( int32_t int32_ ) VULKAN_HPP_NOEXCEPT { int32 = int32_; return *this; } VULKAN_HPP_CONSTEXPR_14 PerformanceCounterResultKHR & setInt64( int64_t int64_ ) VULKAN_HPP_NOEXCEPT { int64 = int64_; return *this; } VULKAN_HPP_CONSTEXPR_14 PerformanceCounterResultKHR & setUint32( uint32_t uint32_ ) VULKAN_HPP_NOEXCEPT { uint32 = uint32_; return *this; } VULKAN_HPP_CONSTEXPR_14 PerformanceCounterResultKHR & setUint64( uint64_t uint64_ ) VULKAN_HPP_NOEXCEPT { uint64 = uint64_; return *this; } VULKAN_HPP_CONSTEXPR_14 PerformanceCounterResultKHR & setFloat32( float float32_ ) VULKAN_HPP_NOEXCEPT { float32 = float32_; return *this; } VULKAN_HPP_CONSTEXPR_14 PerformanceCounterResultKHR & setFloat64( double float64_ ) VULKAN_HPP_NOEXCEPT { float64 = float64_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPerformanceCounterResultKHR const &() const { return *reinterpret_cast( this ); } operator VkPerformanceCounterResultKHR &() { return *reinterpret_cast( this ); } int32_t int32; int64_t int64; uint32_t uint32; uint64_t uint64; float float32; double float64; }; struct PerformanceMarkerInfoINTEL { using NativeType = VkPerformanceMarkerInfoINTEL; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePerformanceMarkerInfoINTEL; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PerformanceMarkerInfoINTEL( uint64_t marker_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , marker{ marker_ } { } VULKAN_HPP_CONSTEXPR PerformanceMarkerInfoINTEL( PerformanceMarkerInfoINTEL const & rhs ) VULKAN_HPP_NOEXCEPT = default; PerformanceMarkerInfoINTEL( VkPerformanceMarkerInfoINTEL const & rhs ) VULKAN_HPP_NOEXCEPT : PerformanceMarkerInfoINTEL( *reinterpret_cast( &rhs ) ) { } PerformanceMarkerInfoINTEL & operator=( PerformanceMarkerInfoINTEL const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PerformanceMarkerInfoINTEL & operator=( VkPerformanceMarkerInfoINTEL const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PerformanceMarkerInfoINTEL & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PerformanceMarkerInfoINTEL & setMarker( uint64_t marker_ ) VULKAN_HPP_NOEXCEPT { marker = marker_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPerformanceMarkerInfoINTEL const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPerformanceMarkerInfoINTEL &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, marker ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PerformanceMarkerInfoINTEL const & ) const = default; #else bool operator==( PerformanceMarkerInfoINTEL const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( marker == rhs.marker ); # endif } bool operator!=( PerformanceMarkerInfoINTEL const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePerformanceMarkerInfoINTEL; const void * pNext = {}; uint64_t marker = {}; }; template <> struct CppType { using Type = PerformanceMarkerInfoINTEL; }; struct PerformanceOverrideInfoINTEL { using NativeType = VkPerformanceOverrideInfoINTEL; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePerformanceOverrideInfoINTEL; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PerformanceOverrideInfoINTEL( VULKAN_HPP_NAMESPACE::PerformanceOverrideTypeINTEL type_ = VULKAN_HPP_NAMESPACE::PerformanceOverrideTypeINTEL::eNullHardware, VULKAN_HPP_NAMESPACE::Bool32 enable_ = {}, uint64_t parameter_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , type{ type_ } , enable{ enable_ } , parameter{ parameter_ } { } VULKAN_HPP_CONSTEXPR PerformanceOverrideInfoINTEL( PerformanceOverrideInfoINTEL const & rhs ) VULKAN_HPP_NOEXCEPT = default; PerformanceOverrideInfoINTEL( VkPerformanceOverrideInfoINTEL const & rhs ) VULKAN_HPP_NOEXCEPT : PerformanceOverrideInfoINTEL( *reinterpret_cast( &rhs ) ) { } PerformanceOverrideInfoINTEL & operator=( PerformanceOverrideInfoINTEL const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PerformanceOverrideInfoINTEL & operator=( VkPerformanceOverrideInfoINTEL const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PerformanceOverrideInfoINTEL & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PerformanceOverrideInfoINTEL & setType( VULKAN_HPP_NAMESPACE::PerformanceOverrideTypeINTEL type_ ) VULKAN_HPP_NOEXCEPT { type = type_; return *this; } VULKAN_HPP_CONSTEXPR_14 PerformanceOverrideInfoINTEL & setEnable( VULKAN_HPP_NAMESPACE::Bool32 enable_ ) VULKAN_HPP_NOEXCEPT { enable = enable_; return *this; } VULKAN_HPP_CONSTEXPR_14 PerformanceOverrideInfoINTEL & setParameter( uint64_t parameter_ ) VULKAN_HPP_NOEXCEPT { parameter = parameter_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPerformanceOverrideInfoINTEL const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPerformanceOverrideInfoINTEL &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, type, enable, parameter ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PerformanceOverrideInfoINTEL const & ) const = default; #else bool operator==( PerformanceOverrideInfoINTEL const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( type == rhs.type ) && ( enable == rhs.enable ) && ( parameter == rhs.parameter ); # endif } bool operator!=( PerformanceOverrideInfoINTEL const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePerformanceOverrideInfoINTEL; const void * pNext = {}; VULKAN_HPP_NAMESPACE::PerformanceOverrideTypeINTEL type = VULKAN_HPP_NAMESPACE::PerformanceOverrideTypeINTEL::eNullHardware; VULKAN_HPP_NAMESPACE::Bool32 enable = {}; uint64_t parameter = {}; }; template <> struct CppType { using Type = PerformanceOverrideInfoINTEL; }; struct PerformanceQuerySubmitInfoKHR { using NativeType = VkPerformanceQuerySubmitInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePerformanceQuerySubmitInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PerformanceQuerySubmitInfoKHR( uint32_t counterPassIndex_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , counterPassIndex{ counterPassIndex_ } { } VULKAN_HPP_CONSTEXPR PerformanceQuerySubmitInfoKHR( PerformanceQuerySubmitInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; PerformanceQuerySubmitInfoKHR( VkPerformanceQuerySubmitInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : PerformanceQuerySubmitInfoKHR( *reinterpret_cast( &rhs ) ) { } PerformanceQuerySubmitInfoKHR & operator=( PerformanceQuerySubmitInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PerformanceQuerySubmitInfoKHR & operator=( VkPerformanceQuerySubmitInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PerformanceQuerySubmitInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PerformanceQuerySubmitInfoKHR & setCounterPassIndex( uint32_t counterPassIndex_ ) VULKAN_HPP_NOEXCEPT { counterPassIndex = counterPassIndex_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPerformanceQuerySubmitInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPerformanceQuerySubmitInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, counterPassIndex ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PerformanceQuerySubmitInfoKHR const & ) const = default; #else bool operator==( PerformanceQuerySubmitInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( counterPassIndex == rhs.counterPassIndex ); # endif } bool operator!=( PerformanceQuerySubmitInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePerformanceQuerySubmitInfoKHR; const void * pNext = {}; uint32_t counterPassIndex = {}; }; template <> struct CppType { using Type = PerformanceQuerySubmitInfoKHR; }; struct PerformanceStreamMarkerInfoINTEL { using NativeType = VkPerformanceStreamMarkerInfoINTEL; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePerformanceStreamMarkerInfoINTEL; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PerformanceStreamMarkerInfoINTEL( uint32_t marker_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , marker{ marker_ } { } VULKAN_HPP_CONSTEXPR PerformanceStreamMarkerInfoINTEL( PerformanceStreamMarkerInfoINTEL const & rhs ) VULKAN_HPP_NOEXCEPT = default; PerformanceStreamMarkerInfoINTEL( VkPerformanceStreamMarkerInfoINTEL const & rhs ) VULKAN_HPP_NOEXCEPT : PerformanceStreamMarkerInfoINTEL( *reinterpret_cast( &rhs ) ) { } PerformanceStreamMarkerInfoINTEL & operator=( PerformanceStreamMarkerInfoINTEL const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PerformanceStreamMarkerInfoINTEL & operator=( VkPerformanceStreamMarkerInfoINTEL const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PerformanceStreamMarkerInfoINTEL & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PerformanceStreamMarkerInfoINTEL & setMarker( uint32_t marker_ ) VULKAN_HPP_NOEXCEPT { marker = marker_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPerformanceStreamMarkerInfoINTEL const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPerformanceStreamMarkerInfoINTEL &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, marker ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PerformanceStreamMarkerInfoINTEL const & ) const = default; #else bool operator==( PerformanceStreamMarkerInfoINTEL const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( marker == rhs.marker ); # endif } bool operator!=( PerformanceStreamMarkerInfoINTEL const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePerformanceStreamMarkerInfoINTEL; const void * pNext = {}; uint32_t marker = {}; }; template <> struct CppType { using Type = PerformanceStreamMarkerInfoINTEL; }; union PerformanceValueDataINTEL { using NativeType = VkPerformanceValueDataINTEL; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_UNION_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 PerformanceValueDataINTEL( uint32_t value32_ = {} ) : value32( value32_ ) {} VULKAN_HPP_CONSTEXPR_14 PerformanceValueDataINTEL( uint64_t value64_ ) : value64( value64_ ) {} VULKAN_HPP_CONSTEXPR_14 PerformanceValueDataINTEL( float valueFloat_ ) : valueFloat( valueFloat_ ) {} VULKAN_HPP_CONSTEXPR_14 PerformanceValueDataINTEL( const char * valueString_ ) : valueString( valueString_ ) {} #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_UNION_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PerformanceValueDataINTEL & setValue32( uint32_t value32_ ) VULKAN_HPP_NOEXCEPT { value32 = value32_; return *this; } VULKAN_HPP_CONSTEXPR_14 PerformanceValueDataINTEL & setValue64( uint64_t value64_ ) VULKAN_HPP_NOEXCEPT { value64 = value64_; return *this; } VULKAN_HPP_CONSTEXPR_14 PerformanceValueDataINTEL & setValueFloat( float valueFloat_ ) VULKAN_HPP_NOEXCEPT { valueFloat = valueFloat_; return *this; } VULKAN_HPP_CONSTEXPR_14 PerformanceValueDataINTEL & setValueBool( VULKAN_HPP_NAMESPACE::Bool32 valueBool_ ) VULKAN_HPP_NOEXCEPT { valueBool = valueBool_; return *this; } VULKAN_HPP_CONSTEXPR_14 PerformanceValueDataINTEL & setValueString( const char * valueString_ ) VULKAN_HPP_NOEXCEPT { valueString = valueString_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPerformanceValueDataINTEL const &() const { return *reinterpret_cast( this ); } operator VkPerformanceValueDataINTEL &() { return *reinterpret_cast( this ); } #ifdef VULKAN_HPP_HAS_UNRESTRICTED_UNIONS uint32_t value32; uint64_t value64; float valueFloat; VULKAN_HPP_NAMESPACE::Bool32 valueBool; const char * valueString; #else uint32_t value32; uint64_t value64; float valueFloat; VkBool32 valueBool; const char * valueString; #endif /*VULKAN_HPP_HAS_UNRESTRICTED_UNIONS*/ }; struct PerformanceValueINTEL { using NativeType = VkPerformanceValueINTEL; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 PerformanceValueINTEL( VULKAN_HPP_NAMESPACE::PerformanceValueTypeINTEL type_ = VULKAN_HPP_NAMESPACE::PerformanceValueTypeINTEL::eUint32, VULKAN_HPP_NAMESPACE::PerformanceValueDataINTEL data_ = {} ) VULKAN_HPP_NOEXCEPT : type{ type_ } , data{ data_ } { } VULKAN_HPP_CONSTEXPR_14 PerformanceValueINTEL( PerformanceValueINTEL const & rhs ) VULKAN_HPP_NOEXCEPT = default; PerformanceValueINTEL( VkPerformanceValueINTEL const & rhs ) VULKAN_HPP_NOEXCEPT : PerformanceValueINTEL( *reinterpret_cast( &rhs ) ) { } PerformanceValueINTEL & operator=( PerformanceValueINTEL const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PerformanceValueINTEL & operator=( VkPerformanceValueINTEL const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPerformanceValueINTEL const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPerformanceValueINTEL &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( type, data ); } #endif public: VULKAN_HPP_NAMESPACE::PerformanceValueTypeINTEL type = VULKAN_HPP_NAMESPACE::PerformanceValueTypeINTEL::eUint32; VULKAN_HPP_NAMESPACE::PerformanceValueDataINTEL data = {}; }; struct PhysicalDevice16BitStorageFeatures { using NativeType = VkPhysicalDevice16BitStorageFeatures; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDevice16BitStorageFeatures; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDevice16BitStorageFeatures( VULKAN_HPP_NAMESPACE::Bool32 storageBuffer16BitAccess_ = {}, VULKAN_HPP_NAMESPACE::Bool32 uniformAndStorageBuffer16BitAccess_ = {}, VULKAN_HPP_NAMESPACE::Bool32 storagePushConstant16_ = {}, VULKAN_HPP_NAMESPACE::Bool32 storageInputOutput16_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , storageBuffer16BitAccess{ storageBuffer16BitAccess_ } , uniformAndStorageBuffer16BitAccess{ uniformAndStorageBuffer16BitAccess_ } , storagePushConstant16{ storagePushConstant16_ } , storageInputOutput16{ storageInputOutput16_ } { } VULKAN_HPP_CONSTEXPR PhysicalDevice16BitStorageFeatures( PhysicalDevice16BitStorageFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDevice16BitStorageFeatures( VkPhysicalDevice16BitStorageFeatures const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDevice16BitStorageFeatures( *reinterpret_cast( &rhs ) ) { } PhysicalDevice16BitStorageFeatures & operator=( PhysicalDevice16BitStorageFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDevice16BitStorageFeatures & operator=( VkPhysicalDevice16BitStorageFeatures const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDevice16BitStorageFeatures & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDevice16BitStorageFeatures & setStorageBuffer16BitAccess( VULKAN_HPP_NAMESPACE::Bool32 storageBuffer16BitAccess_ ) VULKAN_HPP_NOEXCEPT { storageBuffer16BitAccess = storageBuffer16BitAccess_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDevice16BitStorageFeatures & setUniformAndStorageBuffer16BitAccess( VULKAN_HPP_NAMESPACE::Bool32 uniformAndStorageBuffer16BitAccess_ ) VULKAN_HPP_NOEXCEPT { uniformAndStorageBuffer16BitAccess = uniformAndStorageBuffer16BitAccess_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDevice16BitStorageFeatures & setStoragePushConstant16( VULKAN_HPP_NAMESPACE::Bool32 storagePushConstant16_ ) VULKAN_HPP_NOEXCEPT { storagePushConstant16 = storagePushConstant16_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDevice16BitStorageFeatures & setStorageInputOutput16( VULKAN_HPP_NAMESPACE::Bool32 storageInputOutput16_ ) VULKAN_HPP_NOEXCEPT { storageInputOutput16 = storageInputOutput16_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDevice16BitStorageFeatures const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDevice16BitStorageFeatures &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, storageBuffer16BitAccess, uniformAndStorageBuffer16BitAccess, storagePushConstant16, storageInputOutput16 ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDevice16BitStorageFeatures const & ) const = default; #else bool operator==( PhysicalDevice16BitStorageFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( storageBuffer16BitAccess == rhs.storageBuffer16BitAccess ) && ( uniformAndStorageBuffer16BitAccess == rhs.uniformAndStorageBuffer16BitAccess ) && ( storagePushConstant16 == rhs.storagePushConstant16 ) && ( storageInputOutput16 == rhs.storageInputOutput16 ); # endif } bool operator!=( PhysicalDevice16BitStorageFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDevice16BitStorageFeatures; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 storageBuffer16BitAccess = {}; VULKAN_HPP_NAMESPACE::Bool32 uniformAndStorageBuffer16BitAccess = {}; VULKAN_HPP_NAMESPACE::Bool32 storagePushConstant16 = {}; VULKAN_HPP_NAMESPACE::Bool32 storageInputOutput16 = {}; }; template <> struct CppType { using Type = PhysicalDevice16BitStorageFeatures; }; using PhysicalDevice16BitStorageFeaturesKHR = PhysicalDevice16BitStorageFeatures; struct PhysicalDevice4444FormatsFeaturesEXT { using NativeType = VkPhysicalDevice4444FormatsFeaturesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDevice4444FormatsFeaturesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDevice4444FormatsFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 formatA4R4G4B4_ = {}, VULKAN_HPP_NAMESPACE::Bool32 formatA4B4G4R4_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , formatA4R4G4B4{ formatA4R4G4B4_ } , formatA4B4G4R4{ formatA4B4G4R4_ } { } VULKAN_HPP_CONSTEXPR PhysicalDevice4444FormatsFeaturesEXT( PhysicalDevice4444FormatsFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDevice4444FormatsFeaturesEXT( VkPhysicalDevice4444FormatsFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDevice4444FormatsFeaturesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDevice4444FormatsFeaturesEXT & operator=( PhysicalDevice4444FormatsFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDevice4444FormatsFeaturesEXT & operator=( VkPhysicalDevice4444FormatsFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDevice4444FormatsFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDevice4444FormatsFeaturesEXT & setFormatA4R4G4B4( VULKAN_HPP_NAMESPACE::Bool32 formatA4R4G4B4_ ) VULKAN_HPP_NOEXCEPT { formatA4R4G4B4 = formatA4R4G4B4_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDevice4444FormatsFeaturesEXT & setFormatA4B4G4R4( VULKAN_HPP_NAMESPACE::Bool32 formatA4B4G4R4_ ) VULKAN_HPP_NOEXCEPT { formatA4B4G4R4 = formatA4B4G4R4_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDevice4444FormatsFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDevice4444FormatsFeaturesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, formatA4R4G4B4, formatA4B4G4R4 ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDevice4444FormatsFeaturesEXT const & ) const = default; #else bool operator==( PhysicalDevice4444FormatsFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( formatA4R4G4B4 == rhs.formatA4R4G4B4 ) && ( formatA4B4G4R4 == rhs.formatA4B4G4R4 ); # endif } bool operator!=( PhysicalDevice4444FormatsFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDevice4444FormatsFeaturesEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 formatA4R4G4B4 = {}; VULKAN_HPP_NAMESPACE::Bool32 formatA4B4G4R4 = {}; }; template <> struct CppType { using Type = PhysicalDevice4444FormatsFeaturesEXT; }; struct PhysicalDevice8BitStorageFeatures { using NativeType = VkPhysicalDevice8BitStorageFeatures; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDevice8BitStorageFeatures; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDevice8BitStorageFeatures( VULKAN_HPP_NAMESPACE::Bool32 storageBuffer8BitAccess_ = {}, VULKAN_HPP_NAMESPACE::Bool32 uniformAndStorageBuffer8BitAccess_ = {}, VULKAN_HPP_NAMESPACE::Bool32 storagePushConstant8_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , storageBuffer8BitAccess{ storageBuffer8BitAccess_ } , uniformAndStorageBuffer8BitAccess{ uniformAndStorageBuffer8BitAccess_ } , storagePushConstant8{ storagePushConstant8_ } { } VULKAN_HPP_CONSTEXPR PhysicalDevice8BitStorageFeatures( PhysicalDevice8BitStorageFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDevice8BitStorageFeatures( VkPhysicalDevice8BitStorageFeatures const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDevice8BitStorageFeatures( *reinterpret_cast( &rhs ) ) { } PhysicalDevice8BitStorageFeatures & operator=( PhysicalDevice8BitStorageFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDevice8BitStorageFeatures & operator=( VkPhysicalDevice8BitStorageFeatures const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDevice8BitStorageFeatures & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDevice8BitStorageFeatures & setStorageBuffer8BitAccess( VULKAN_HPP_NAMESPACE::Bool32 storageBuffer8BitAccess_ ) VULKAN_HPP_NOEXCEPT { storageBuffer8BitAccess = storageBuffer8BitAccess_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDevice8BitStorageFeatures & setUniformAndStorageBuffer8BitAccess( VULKAN_HPP_NAMESPACE::Bool32 uniformAndStorageBuffer8BitAccess_ ) VULKAN_HPP_NOEXCEPT { uniformAndStorageBuffer8BitAccess = uniformAndStorageBuffer8BitAccess_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDevice8BitStorageFeatures & setStoragePushConstant8( VULKAN_HPP_NAMESPACE::Bool32 storagePushConstant8_ ) VULKAN_HPP_NOEXCEPT { storagePushConstant8 = storagePushConstant8_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDevice8BitStorageFeatures const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDevice8BitStorageFeatures &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, storageBuffer8BitAccess, uniformAndStorageBuffer8BitAccess, storagePushConstant8 ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDevice8BitStorageFeatures const & ) const = default; #else bool operator==( PhysicalDevice8BitStorageFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( storageBuffer8BitAccess == rhs.storageBuffer8BitAccess ) && ( uniformAndStorageBuffer8BitAccess == rhs.uniformAndStorageBuffer8BitAccess ) && ( storagePushConstant8 == rhs.storagePushConstant8 ); # endif } bool operator!=( PhysicalDevice8BitStorageFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDevice8BitStorageFeatures; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 storageBuffer8BitAccess = {}; VULKAN_HPP_NAMESPACE::Bool32 uniformAndStorageBuffer8BitAccess = {}; VULKAN_HPP_NAMESPACE::Bool32 storagePushConstant8 = {}; }; template <> struct CppType { using Type = PhysicalDevice8BitStorageFeatures; }; using PhysicalDevice8BitStorageFeaturesKHR = PhysicalDevice8BitStorageFeatures; struct PhysicalDeviceASTCDecodeFeaturesEXT { using NativeType = VkPhysicalDeviceASTCDecodeFeaturesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceAstcDecodeFeaturesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceASTCDecodeFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 decodeModeSharedExponent_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , decodeModeSharedExponent{ decodeModeSharedExponent_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceASTCDecodeFeaturesEXT( PhysicalDeviceASTCDecodeFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceASTCDecodeFeaturesEXT( VkPhysicalDeviceASTCDecodeFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceASTCDecodeFeaturesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceASTCDecodeFeaturesEXT & operator=( PhysicalDeviceASTCDecodeFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceASTCDecodeFeaturesEXT & operator=( VkPhysicalDeviceASTCDecodeFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceASTCDecodeFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceASTCDecodeFeaturesEXT & setDecodeModeSharedExponent( VULKAN_HPP_NAMESPACE::Bool32 decodeModeSharedExponent_ ) VULKAN_HPP_NOEXCEPT { decodeModeSharedExponent = decodeModeSharedExponent_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceASTCDecodeFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceASTCDecodeFeaturesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, decodeModeSharedExponent ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceASTCDecodeFeaturesEXT const & ) const = default; #else bool operator==( PhysicalDeviceASTCDecodeFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( decodeModeSharedExponent == rhs.decodeModeSharedExponent ); # endif } bool operator!=( PhysicalDeviceASTCDecodeFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceAstcDecodeFeaturesEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 decodeModeSharedExponent = {}; }; template <> struct CppType { using Type = PhysicalDeviceASTCDecodeFeaturesEXT; }; struct PhysicalDeviceAccelerationStructureFeaturesKHR { using NativeType = VkPhysicalDeviceAccelerationStructureFeaturesKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceAccelerationStructureFeaturesKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceAccelerationStructureFeaturesKHR( VULKAN_HPP_NAMESPACE::Bool32 accelerationStructure_ = {}, VULKAN_HPP_NAMESPACE::Bool32 accelerationStructureCaptureReplay_ = {}, VULKAN_HPP_NAMESPACE::Bool32 accelerationStructureIndirectBuild_ = {}, VULKAN_HPP_NAMESPACE::Bool32 accelerationStructureHostCommands_ = {}, VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingAccelerationStructureUpdateAfterBind_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , accelerationStructure{ accelerationStructure_ } , accelerationStructureCaptureReplay{ accelerationStructureCaptureReplay_ } , accelerationStructureIndirectBuild{ accelerationStructureIndirectBuild_ } , accelerationStructureHostCommands{ accelerationStructureHostCommands_ } , descriptorBindingAccelerationStructureUpdateAfterBind{ descriptorBindingAccelerationStructureUpdateAfterBind_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceAccelerationStructureFeaturesKHR( PhysicalDeviceAccelerationStructureFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceAccelerationStructureFeaturesKHR( VkPhysicalDeviceAccelerationStructureFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceAccelerationStructureFeaturesKHR( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceAccelerationStructureFeaturesKHR & operator=( PhysicalDeviceAccelerationStructureFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceAccelerationStructureFeaturesKHR & operator=( VkPhysicalDeviceAccelerationStructureFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceAccelerationStructureFeaturesKHR & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceAccelerationStructureFeaturesKHR & setAccelerationStructure( VULKAN_HPP_NAMESPACE::Bool32 accelerationStructure_ ) VULKAN_HPP_NOEXCEPT { accelerationStructure = accelerationStructure_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceAccelerationStructureFeaturesKHR & setAccelerationStructureCaptureReplay( VULKAN_HPP_NAMESPACE::Bool32 accelerationStructureCaptureReplay_ ) VULKAN_HPP_NOEXCEPT { accelerationStructureCaptureReplay = accelerationStructureCaptureReplay_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceAccelerationStructureFeaturesKHR & setAccelerationStructureIndirectBuild( VULKAN_HPP_NAMESPACE::Bool32 accelerationStructureIndirectBuild_ ) VULKAN_HPP_NOEXCEPT { accelerationStructureIndirectBuild = accelerationStructureIndirectBuild_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceAccelerationStructureFeaturesKHR & setAccelerationStructureHostCommands( VULKAN_HPP_NAMESPACE::Bool32 accelerationStructureHostCommands_ ) VULKAN_HPP_NOEXCEPT { accelerationStructureHostCommands = accelerationStructureHostCommands_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceAccelerationStructureFeaturesKHR & setDescriptorBindingAccelerationStructureUpdateAfterBind( VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingAccelerationStructureUpdateAfterBind_ ) VULKAN_HPP_NOEXCEPT { descriptorBindingAccelerationStructureUpdateAfterBind = descriptorBindingAccelerationStructureUpdateAfterBind_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceAccelerationStructureFeaturesKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceAccelerationStructureFeaturesKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, accelerationStructure, accelerationStructureCaptureReplay, accelerationStructureIndirectBuild, accelerationStructureHostCommands, descriptorBindingAccelerationStructureUpdateAfterBind ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceAccelerationStructureFeaturesKHR const & ) const = default; #else bool operator==( PhysicalDeviceAccelerationStructureFeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( accelerationStructure == rhs.accelerationStructure ) && ( accelerationStructureCaptureReplay == rhs.accelerationStructureCaptureReplay ) && ( accelerationStructureIndirectBuild == rhs.accelerationStructureIndirectBuild ) && ( accelerationStructureHostCommands == rhs.accelerationStructureHostCommands ) && ( descriptorBindingAccelerationStructureUpdateAfterBind == rhs.descriptorBindingAccelerationStructureUpdateAfterBind ); # endif } bool operator!=( PhysicalDeviceAccelerationStructureFeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceAccelerationStructureFeaturesKHR; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 accelerationStructure = {}; VULKAN_HPP_NAMESPACE::Bool32 accelerationStructureCaptureReplay = {}; VULKAN_HPP_NAMESPACE::Bool32 accelerationStructureIndirectBuild = {}; VULKAN_HPP_NAMESPACE::Bool32 accelerationStructureHostCommands = {}; VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingAccelerationStructureUpdateAfterBind = {}; }; template <> struct CppType { using Type = PhysicalDeviceAccelerationStructureFeaturesKHR; }; struct PhysicalDeviceAccelerationStructurePropertiesKHR { using NativeType = VkPhysicalDeviceAccelerationStructurePropertiesKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceAccelerationStructurePropertiesKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceAccelerationStructurePropertiesKHR( uint64_t maxGeometryCount_ = {}, uint64_t maxInstanceCount_ = {}, uint64_t maxPrimitiveCount_ = {}, uint32_t maxPerStageDescriptorAccelerationStructures_ = {}, uint32_t maxPerStageDescriptorUpdateAfterBindAccelerationStructures_ = {}, uint32_t maxDescriptorSetAccelerationStructures_ = {}, uint32_t maxDescriptorSetUpdateAfterBindAccelerationStructures_ = {}, uint32_t minAccelerationStructureScratchOffsetAlignment_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , maxGeometryCount{ maxGeometryCount_ } , maxInstanceCount{ maxInstanceCount_ } , maxPrimitiveCount{ maxPrimitiveCount_ } , maxPerStageDescriptorAccelerationStructures{ maxPerStageDescriptorAccelerationStructures_ } , maxPerStageDescriptorUpdateAfterBindAccelerationStructures{ maxPerStageDescriptorUpdateAfterBindAccelerationStructures_ } , maxDescriptorSetAccelerationStructures{ maxDescriptorSetAccelerationStructures_ } , maxDescriptorSetUpdateAfterBindAccelerationStructures{ maxDescriptorSetUpdateAfterBindAccelerationStructures_ } , minAccelerationStructureScratchOffsetAlignment{ minAccelerationStructureScratchOffsetAlignment_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceAccelerationStructurePropertiesKHR( PhysicalDeviceAccelerationStructurePropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceAccelerationStructurePropertiesKHR( VkPhysicalDeviceAccelerationStructurePropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceAccelerationStructurePropertiesKHR( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceAccelerationStructurePropertiesKHR & operator=( PhysicalDeviceAccelerationStructurePropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceAccelerationStructurePropertiesKHR & operator=( VkPhysicalDeviceAccelerationStructurePropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceAccelerationStructurePropertiesKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceAccelerationStructurePropertiesKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, maxGeometryCount, maxInstanceCount, maxPrimitiveCount, maxPerStageDescriptorAccelerationStructures, maxPerStageDescriptorUpdateAfterBindAccelerationStructures, maxDescriptorSetAccelerationStructures, maxDescriptorSetUpdateAfterBindAccelerationStructures, minAccelerationStructureScratchOffsetAlignment ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceAccelerationStructurePropertiesKHR const & ) const = default; #else bool operator==( PhysicalDeviceAccelerationStructurePropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( maxGeometryCount == rhs.maxGeometryCount ) && ( maxInstanceCount == rhs.maxInstanceCount ) && ( maxPrimitiveCount == rhs.maxPrimitiveCount ) && ( maxPerStageDescriptorAccelerationStructures == rhs.maxPerStageDescriptorAccelerationStructures ) && ( maxPerStageDescriptorUpdateAfterBindAccelerationStructures == rhs.maxPerStageDescriptorUpdateAfterBindAccelerationStructures ) && ( maxDescriptorSetAccelerationStructures == rhs.maxDescriptorSetAccelerationStructures ) && ( maxDescriptorSetUpdateAfterBindAccelerationStructures == rhs.maxDescriptorSetUpdateAfterBindAccelerationStructures ) && ( minAccelerationStructureScratchOffsetAlignment == rhs.minAccelerationStructureScratchOffsetAlignment ); # endif } bool operator!=( PhysicalDeviceAccelerationStructurePropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceAccelerationStructurePropertiesKHR; void * pNext = {}; uint64_t maxGeometryCount = {}; uint64_t maxInstanceCount = {}; uint64_t maxPrimitiveCount = {}; uint32_t maxPerStageDescriptorAccelerationStructures = {}; uint32_t maxPerStageDescriptorUpdateAfterBindAccelerationStructures = {}; uint32_t maxDescriptorSetAccelerationStructures = {}; uint32_t maxDescriptorSetUpdateAfterBindAccelerationStructures = {}; uint32_t minAccelerationStructureScratchOffsetAlignment = {}; }; template <> struct CppType { using Type = PhysicalDeviceAccelerationStructurePropertiesKHR; }; struct PhysicalDeviceAddressBindingReportFeaturesEXT { using NativeType = VkPhysicalDeviceAddressBindingReportFeaturesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceAddressBindingReportFeaturesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceAddressBindingReportFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 reportAddressBinding_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , reportAddressBinding{ reportAddressBinding_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceAddressBindingReportFeaturesEXT( PhysicalDeviceAddressBindingReportFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceAddressBindingReportFeaturesEXT( VkPhysicalDeviceAddressBindingReportFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceAddressBindingReportFeaturesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceAddressBindingReportFeaturesEXT & operator=( PhysicalDeviceAddressBindingReportFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceAddressBindingReportFeaturesEXT & operator=( VkPhysicalDeviceAddressBindingReportFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceAddressBindingReportFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceAddressBindingReportFeaturesEXT & setReportAddressBinding( VULKAN_HPP_NAMESPACE::Bool32 reportAddressBinding_ ) VULKAN_HPP_NOEXCEPT { reportAddressBinding = reportAddressBinding_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceAddressBindingReportFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceAddressBindingReportFeaturesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, reportAddressBinding ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceAddressBindingReportFeaturesEXT const & ) const = default; #else bool operator==( PhysicalDeviceAddressBindingReportFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( reportAddressBinding == rhs.reportAddressBinding ); # endif } bool operator!=( PhysicalDeviceAddressBindingReportFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceAddressBindingReportFeaturesEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 reportAddressBinding = {}; }; template <> struct CppType { using Type = PhysicalDeviceAddressBindingReportFeaturesEXT; }; struct PhysicalDeviceAmigoProfilingFeaturesSEC { using NativeType = VkPhysicalDeviceAmigoProfilingFeaturesSEC; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceAmigoProfilingFeaturesSEC; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceAmigoProfilingFeaturesSEC( VULKAN_HPP_NAMESPACE::Bool32 amigoProfiling_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , amigoProfiling{ amigoProfiling_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceAmigoProfilingFeaturesSEC( PhysicalDeviceAmigoProfilingFeaturesSEC const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceAmigoProfilingFeaturesSEC( VkPhysicalDeviceAmigoProfilingFeaturesSEC const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceAmigoProfilingFeaturesSEC( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceAmigoProfilingFeaturesSEC & operator=( PhysicalDeviceAmigoProfilingFeaturesSEC const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceAmigoProfilingFeaturesSEC & operator=( VkPhysicalDeviceAmigoProfilingFeaturesSEC const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceAmigoProfilingFeaturesSEC & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceAmigoProfilingFeaturesSEC & setAmigoProfiling( VULKAN_HPP_NAMESPACE::Bool32 amigoProfiling_ ) VULKAN_HPP_NOEXCEPT { amigoProfiling = amigoProfiling_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceAmigoProfilingFeaturesSEC const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceAmigoProfilingFeaturesSEC &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, amigoProfiling ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceAmigoProfilingFeaturesSEC const & ) const = default; #else bool operator==( PhysicalDeviceAmigoProfilingFeaturesSEC const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( amigoProfiling == rhs.amigoProfiling ); # endif } bool operator!=( PhysicalDeviceAmigoProfilingFeaturesSEC const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceAmigoProfilingFeaturesSEC; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 amigoProfiling = {}; }; template <> struct CppType { using Type = PhysicalDeviceAmigoProfilingFeaturesSEC; }; struct PhysicalDeviceAntiLagFeaturesAMD { using NativeType = VkPhysicalDeviceAntiLagFeaturesAMD; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceAntiLagFeaturesAMD; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceAntiLagFeaturesAMD( VULKAN_HPP_NAMESPACE::Bool32 antiLag_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , antiLag{ antiLag_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceAntiLagFeaturesAMD( PhysicalDeviceAntiLagFeaturesAMD const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceAntiLagFeaturesAMD( VkPhysicalDeviceAntiLagFeaturesAMD const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceAntiLagFeaturesAMD( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceAntiLagFeaturesAMD & operator=( PhysicalDeviceAntiLagFeaturesAMD const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceAntiLagFeaturesAMD & operator=( VkPhysicalDeviceAntiLagFeaturesAMD const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceAntiLagFeaturesAMD & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceAntiLagFeaturesAMD & setAntiLag( VULKAN_HPP_NAMESPACE::Bool32 antiLag_ ) VULKAN_HPP_NOEXCEPT { antiLag = antiLag_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceAntiLagFeaturesAMD const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceAntiLagFeaturesAMD &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, antiLag ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceAntiLagFeaturesAMD const & ) const = default; #else bool operator==( PhysicalDeviceAntiLagFeaturesAMD const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( antiLag == rhs.antiLag ); # endif } bool operator!=( PhysicalDeviceAntiLagFeaturesAMD const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceAntiLagFeaturesAMD; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 antiLag = {}; }; template <> struct CppType { using Type = PhysicalDeviceAntiLagFeaturesAMD; }; struct PhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT { using NativeType = VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 attachmentFeedbackLoopDynamicState_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , attachmentFeedbackLoopDynamicState{ attachmentFeedbackLoopDynamicState_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT( PhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT( VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT & operator=( PhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT & operator=( VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT & setAttachmentFeedbackLoopDynamicState( VULKAN_HPP_NAMESPACE::Bool32 attachmentFeedbackLoopDynamicState_ ) VULKAN_HPP_NOEXCEPT { attachmentFeedbackLoopDynamicState = attachmentFeedbackLoopDynamicState_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, attachmentFeedbackLoopDynamicState ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT const & ) const = default; #else bool operator==( PhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( attachmentFeedbackLoopDynamicState == rhs.attachmentFeedbackLoopDynamicState ); # endif } bool operator!=( PhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 attachmentFeedbackLoopDynamicState = {}; }; template <> struct CppType { using Type = PhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT; }; struct PhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT { using NativeType = VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 attachmentFeedbackLoopLayout_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , attachmentFeedbackLoopLayout{ attachmentFeedbackLoopLayout_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT( PhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT( VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT & operator=( PhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT & operator=( VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT & setAttachmentFeedbackLoopLayout( VULKAN_HPP_NAMESPACE::Bool32 attachmentFeedbackLoopLayout_ ) VULKAN_HPP_NOEXCEPT { attachmentFeedbackLoopLayout = attachmentFeedbackLoopLayout_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, attachmentFeedbackLoopLayout ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT const & ) const = default; #else bool operator==( PhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( attachmentFeedbackLoopLayout == rhs.attachmentFeedbackLoopLayout ); # endif } bool operator!=( PhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 attachmentFeedbackLoopLayout = {}; }; template <> struct CppType { using Type = PhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT; }; struct PhysicalDeviceBlendOperationAdvancedFeaturesEXT { using NativeType = VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceBlendOperationAdvancedFeaturesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceBlendOperationAdvancedFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 advancedBlendCoherentOperations_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , advancedBlendCoherentOperations{ advancedBlendCoherentOperations_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceBlendOperationAdvancedFeaturesEXT( PhysicalDeviceBlendOperationAdvancedFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceBlendOperationAdvancedFeaturesEXT( VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceBlendOperationAdvancedFeaturesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceBlendOperationAdvancedFeaturesEXT & operator=( PhysicalDeviceBlendOperationAdvancedFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceBlendOperationAdvancedFeaturesEXT & operator=( VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceBlendOperationAdvancedFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceBlendOperationAdvancedFeaturesEXT & setAdvancedBlendCoherentOperations( VULKAN_HPP_NAMESPACE::Bool32 advancedBlendCoherentOperations_ ) VULKAN_HPP_NOEXCEPT { advancedBlendCoherentOperations = advancedBlendCoherentOperations_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, advancedBlendCoherentOperations ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceBlendOperationAdvancedFeaturesEXT const & ) const = default; #else bool operator==( PhysicalDeviceBlendOperationAdvancedFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( advancedBlendCoherentOperations == rhs.advancedBlendCoherentOperations ); # endif } bool operator!=( PhysicalDeviceBlendOperationAdvancedFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceBlendOperationAdvancedFeaturesEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 advancedBlendCoherentOperations = {}; }; template <> struct CppType { using Type = PhysicalDeviceBlendOperationAdvancedFeaturesEXT; }; struct PhysicalDeviceBlendOperationAdvancedPropertiesEXT { using NativeType = VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceBlendOperationAdvancedPropertiesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceBlendOperationAdvancedPropertiesEXT( uint32_t advancedBlendMaxColorAttachments_ = {}, VULKAN_HPP_NAMESPACE::Bool32 advancedBlendIndependentBlend_ = {}, VULKAN_HPP_NAMESPACE::Bool32 advancedBlendNonPremultipliedSrcColor_ = {}, VULKAN_HPP_NAMESPACE::Bool32 advancedBlendNonPremultipliedDstColor_ = {}, VULKAN_HPP_NAMESPACE::Bool32 advancedBlendCorrelatedOverlap_ = {}, VULKAN_HPP_NAMESPACE::Bool32 advancedBlendAllOperations_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , advancedBlendMaxColorAttachments{ advancedBlendMaxColorAttachments_ } , advancedBlendIndependentBlend{ advancedBlendIndependentBlend_ } , advancedBlendNonPremultipliedSrcColor{ advancedBlendNonPremultipliedSrcColor_ } , advancedBlendNonPremultipliedDstColor{ advancedBlendNonPremultipliedDstColor_ } , advancedBlendCorrelatedOverlap{ advancedBlendCorrelatedOverlap_ } , advancedBlendAllOperations{ advancedBlendAllOperations_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceBlendOperationAdvancedPropertiesEXT( PhysicalDeviceBlendOperationAdvancedPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceBlendOperationAdvancedPropertiesEXT( VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceBlendOperationAdvancedPropertiesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceBlendOperationAdvancedPropertiesEXT & operator=( PhysicalDeviceBlendOperationAdvancedPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceBlendOperationAdvancedPropertiesEXT & operator=( VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, advancedBlendMaxColorAttachments, advancedBlendIndependentBlend, advancedBlendNonPremultipliedSrcColor, advancedBlendNonPremultipliedDstColor, advancedBlendCorrelatedOverlap, advancedBlendAllOperations ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceBlendOperationAdvancedPropertiesEXT const & ) const = default; #else bool operator==( PhysicalDeviceBlendOperationAdvancedPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( advancedBlendMaxColorAttachments == rhs.advancedBlendMaxColorAttachments ) && ( advancedBlendIndependentBlend == rhs.advancedBlendIndependentBlend ) && ( advancedBlendNonPremultipliedSrcColor == rhs.advancedBlendNonPremultipliedSrcColor ) && ( advancedBlendNonPremultipliedDstColor == rhs.advancedBlendNonPremultipliedDstColor ) && ( advancedBlendCorrelatedOverlap == rhs.advancedBlendCorrelatedOverlap ) && ( advancedBlendAllOperations == rhs.advancedBlendAllOperations ); # endif } bool operator!=( PhysicalDeviceBlendOperationAdvancedPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceBlendOperationAdvancedPropertiesEXT; void * pNext = {}; uint32_t advancedBlendMaxColorAttachments = {}; VULKAN_HPP_NAMESPACE::Bool32 advancedBlendIndependentBlend = {}; VULKAN_HPP_NAMESPACE::Bool32 advancedBlendNonPremultipliedSrcColor = {}; VULKAN_HPP_NAMESPACE::Bool32 advancedBlendNonPremultipliedDstColor = {}; VULKAN_HPP_NAMESPACE::Bool32 advancedBlendCorrelatedOverlap = {}; VULKAN_HPP_NAMESPACE::Bool32 advancedBlendAllOperations = {}; }; template <> struct CppType { using Type = PhysicalDeviceBlendOperationAdvancedPropertiesEXT; }; struct PhysicalDeviceBorderColorSwizzleFeaturesEXT { using NativeType = VkPhysicalDeviceBorderColorSwizzleFeaturesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceBorderColorSwizzleFeaturesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceBorderColorSwizzleFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 borderColorSwizzle_ = {}, VULKAN_HPP_NAMESPACE::Bool32 borderColorSwizzleFromImage_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , borderColorSwizzle{ borderColorSwizzle_ } , borderColorSwizzleFromImage{ borderColorSwizzleFromImage_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceBorderColorSwizzleFeaturesEXT( PhysicalDeviceBorderColorSwizzleFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceBorderColorSwizzleFeaturesEXT( VkPhysicalDeviceBorderColorSwizzleFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceBorderColorSwizzleFeaturesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceBorderColorSwizzleFeaturesEXT & operator=( PhysicalDeviceBorderColorSwizzleFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceBorderColorSwizzleFeaturesEXT & operator=( VkPhysicalDeviceBorderColorSwizzleFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceBorderColorSwizzleFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceBorderColorSwizzleFeaturesEXT & setBorderColorSwizzle( VULKAN_HPP_NAMESPACE::Bool32 borderColorSwizzle_ ) VULKAN_HPP_NOEXCEPT { borderColorSwizzle = borderColorSwizzle_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceBorderColorSwizzleFeaturesEXT & setBorderColorSwizzleFromImage( VULKAN_HPP_NAMESPACE::Bool32 borderColorSwizzleFromImage_ ) VULKAN_HPP_NOEXCEPT { borderColorSwizzleFromImage = borderColorSwizzleFromImage_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceBorderColorSwizzleFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceBorderColorSwizzleFeaturesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, borderColorSwizzle, borderColorSwizzleFromImage ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceBorderColorSwizzleFeaturesEXT const & ) const = default; #else bool operator==( PhysicalDeviceBorderColorSwizzleFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( borderColorSwizzle == rhs.borderColorSwizzle ) && ( borderColorSwizzleFromImage == rhs.borderColorSwizzleFromImage ); # endif } bool operator!=( PhysicalDeviceBorderColorSwizzleFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceBorderColorSwizzleFeaturesEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 borderColorSwizzle = {}; VULKAN_HPP_NAMESPACE::Bool32 borderColorSwizzleFromImage = {}; }; template <> struct CppType { using Type = PhysicalDeviceBorderColorSwizzleFeaturesEXT; }; struct PhysicalDeviceBufferDeviceAddressFeatures { using NativeType = VkPhysicalDeviceBufferDeviceAddressFeatures; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceBufferDeviceAddressFeatures; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceBufferDeviceAddressFeatures( VULKAN_HPP_NAMESPACE::Bool32 bufferDeviceAddress_ = {}, VULKAN_HPP_NAMESPACE::Bool32 bufferDeviceAddressCaptureReplay_ = {}, VULKAN_HPP_NAMESPACE::Bool32 bufferDeviceAddressMultiDevice_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , bufferDeviceAddress{ bufferDeviceAddress_ } , bufferDeviceAddressCaptureReplay{ bufferDeviceAddressCaptureReplay_ } , bufferDeviceAddressMultiDevice{ bufferDeviceAddressMultiDevice_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceBufferDeviceAddressFeatures( PhysicalDeviceBufferDeviceAddressFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceBufferDeviceAddressFeatures( VkPhysicalDeviceBufferDeviceAddressFeatures const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceBufferDeviceAddressFeatures( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceBufferDeviceAddressFeatures & operator=( PhysicalDeviceBufferDeviceAddressFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceBufferDeviceAddressFeatures & operator=( VkPhysicalDeviceBufferDeviceAddressFeatures const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceBufferDeviceAddressFeatures & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceBufferDeviceAddressFeatures & setBufferDeviceAddress( VULKAN_HPP_NAMESPACE::Bool32 bufferDeviceAddress_ ) VULKAN_HPP_NOEXCEPT { bufferDeviceAddress = bufferDeviceAddress_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceBufferDeviceAddressFeatures & setBufferDeviceAddressCaptureReplay( VULKAN_HPP_NAMESPACE::Bool32 bufferDeviceAddressCaptureReplay_ ) VULKAN_HPP_NOEXCEPT { bufferDeviceAddressCaptureReplay = bufferDeviceAddressCaptureReplay_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceBufferDeviceAddressFeatures & setBufferDeviceAddressMultiDevice( VULKAN_HPP_NAMESPACE::Bool32 bufferDeviceAddressMultiDevice_ ) VULKAN_HPP_NOEXCEPT { bufferDeviceAddressMultiDevice = bufferDeviceAddressMultiDevice_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceBufferDeviceAddressFeatures const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceBufferDeviceAddressFeatures &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, bufferDeviceAddress, bufferDeviceAddressCaptureReplay, bufferDeviceAddressMultiDevice ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceBufferDeviceAddressFeatures const & ) const = default; #else bool operator==( PhysicalDeviceBufferDeviceAddressFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( bufferDeviceAddress == rhs.bufferDeviceAddress ) && ( bufferDeviceAddressCaptureReplay == rhs.bufferDeviceAddressCaptureReplay ) && ( bufferDeviceAddressMultiDevice == rhs.bufferDeviceAddressMultiDevice ); # endif } bool operator!=( PhysicalDeviceBufferDeviceAddressFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceBufferDeviceAddressFeatures; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 bufferDeviceAddress = {}; VULKAN_HPP_NAMESPACE::Bool32 bufferDeviceAddressCaptureReplay = {}; VULKAN_HPP_NAMESPACE::Bool32 bufferDeviceAddressMultiDevice = {}; }; template <> struct CppType { using Type = PhysicalDeviceBufferDeviceAddressFeatures; }; using PhysicalDeviceBufferDeviceAddressFeaturesKHR = PhysicalDeviceBufferDeviceAddressFeatures; struct PhysicalDeviceBufferDeviceAddressFeaturesEXT { using NativeType = VkPhysicalDeviceBufferDeviceAddressFeaturesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceBufferDeviceAddressFeaturesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceBufferDeviceAddressFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 bufferDeviceAddress_ = {}, VULKAN_HPP_NAMESPACE::Bool32 bufferDeviceAddressCaptureReplay_ = {}, VULKAN_HPP_NAMESPACE::Bool32 bufferDeviceAddressMultiDevice_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , bufferDeviceAddress{ bufferDeviceAddress_ } , bufferDeviceAddressCaptureReplay{ bufferDeviceAddressCaptureReplay_ } , bufferDeviceAddressMultiDevice{ bufferDeviceAddressMultiDevice_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceBufferDeviceAddressFeaturesEXT( PhysicalDeviceBufferDeviceAddressFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceBufferDeviceAddressFeaturesEXT( VkPhysicalDeviceBufferDeviceAddressFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceBufferDeviceAddressFeaturesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceBufferDeviceAddressFeaturesEXT & operator=( PhysicalDeviceBufferDeviceAddressFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceBufferDeviceAddressFeaturesEXT & operator=( VkPhysicalDeviceBufferDeviceAddressFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceBufferDeviceAddressFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceBufferDeviceAddressFeaturesEXT & setBufferDeviceAddress( VULKAN_HPP_NAMESPACE::Bool32 bufferDeviceAddress_ ) VULKAN_HPP_NOEXCEPT { bufferDeviceAddress = bufferDeviceAddress_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceBufferDeviceAddressFeaturesEXT & setBufferDeviceAddressCaptureReplay( VULKAN_HPP_NAMESPACE::Bool32 bufferDeviceAddressCaptureReplay_ ) VULKAN_HPP_NOEXCEPT { bufferDeviceAddressCaptureReplay = bufferDeviceAddressCaptureReplay_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceBufferDeviceAddressFeaturesEXT & setBufferDeviceAddressMultiDevice( VULKAN_HPP_NAMESPACE::Bool32 bufferDeviceAddressMultiDevice_ ) VULKAN_HPP_NOEXCEPT { bufferDeviceAddressMultiDevice = bufferDeviceAddressMultiDevice_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceBufferDeviceAddressFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceBufferDeviceAddressFeaturesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, bufferDeviceAddress, bufferDeviceAddressCaptureReplay, bufferDeviceAddressMultiDevice ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceBufferDeviceAddressFeaturesEXT const & ) const = default; #else bool operator==( PhysicalDeviceBufferDeviceAddressFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( bufferDeviceAddress == rhs.bufferDeviceAddress ) && ( bufferDeviceAddressCaptureReplay == rhs.bufferDeviceAddressCaptureReplay ) && ( bufferDeviceAddressMultiDevice == rhs.bufferDeviceAddressMultiDevice ); # endif } bool operator!=( PhysicalDeviceBufferDeviceAddressFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceBufferDeviceAddressFeaturesEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 bufferDeviceAddress = {}; VULKAN_HPP_NAMESPACE::Bool32 bufferDeviceAddressCaptureReplay = {}; VULKAN_HPP_NAMESPACE::Bool32 bufferDeviceAddressMultiDevice = {}; }; template <> struct CppType { using Type = PhysicalDeviceBufferDeviceAddressFeaturesEXT; }; using PhysicalDeviceBufferAddressFeaturesEXT = PhysicalDeviceBufferDeviceAddressFeaturesEXT; struct PhysicalDeviceClusterAccelerationStructureFeaturesNV { using NativeType = VkPhysicalDeviceClusterAccelerationStructureFeaturesNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceClusterAccelerationStructureFeaturesNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceClusterAccelerationStructureFeaturesNV( VULKAN_HPP_NAMESPACE::Bool32 clusterAccelerationStructure_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , clusterAccelerationStructure{ clusterAccelerationStructure_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceClusterAccelerationStructureFeaturesNV( PhysicalDeviceClusterAccelerationStructureFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceClusterAccelerationStructureFeaturesNV( VkPhysicalDeviceClusterAccelerationStructureFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceClusterAccelerationStructureFeaturesNV( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceClusterAccelerationStructureFeaturesNV & operator=( PhysicalDeviceClusterAccelerationStructureFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceClusterAccelerationStructureFeaturesNV & operator=( VkPhysicalDeviceClusterAccelerationStructureFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceClusterAccelerationStructureFeaturesNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceClusterAccelerationStructureFeaturesNV & setClusterAccelerationStructure( VULKAN_HPP_NAMESPACE::Bool32 clusterAccelerationStructure_ ) VULKAN_HPP_NOEXCEPT { clusterAccelerationStructure = clusterAccelerationStructure_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceClusterAccelerationStructureFeaturesNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceClusterAccelerationStructureFeaturesNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, clusterAccelerationStructure ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceClusterAccelerationStructureFeaturesNV const & ) const = default; #else bool operator==( PhysicalDeviceClusterAccelerationStructureFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( clusterAccelerationStructure == rhs.clusterAccelerationStructure ); # endif } bool operator!=( PhysicalDeviceClusterAccelerationStructureFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceClusterAccelerationStructureFeaturesNV; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 clusterAccelerationStructure = {}; }; template <> struct CppType { using Type = PhysicalDeviceClusterAccelerationStructureFeaturesNV; }; struct PhysicalDeviceClusterAccelerationStructurePropertiesNV { using NativeType = VkPhysicalDeviceClusterAccelerationStructurePropertiesNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceClusterAccelerationStructurePropertiesNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceClusterAccelerationStructurePropertiesNV( uint32_t maxVerticesPerCluster_ = {}, uint32_t maxTrianglesPerCluster_ = {}, uint32_t clusterScratchByteAlignment_ = {}, uint32_t clusterByteAlignment_ = {}, uint32_t clusterTemplateByteAlignment_ = {}, uint32_t clusterBottomLevelByteAlignment_ = {}, uint32_t clusterTemplateBoundsByteAlignment_ = {}, uint32_t maxClusterGeometryIndex_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , maxVerticesPerCluster{ maxVerticesPerCluster_ } , maxTrianglesPerCluster{ maxTrianglesPerCluster_ } , clusterScratchByteAlignment{ clusterScratchByteAlignment_ } , clusterByteAlignment{ clusterByteAlignment_ } , clusterTemplateByteAlignment{ clusterTemplateByteAlignment_ } , clusterBottomLevelByteAlignment{ clusterBottomLevelByteAlignment_ } , clusterTemplateBoundsByteAlignment{ clusterTemplateBoundsByteAlignment_ } , maxClusterGeometryIndex{ maxClusterGeometryIndex_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceClusterAccelerationStructurePropertiesNV( PhysicalDeviceClusterAccelerationStructurePropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceClusterAccelerationStructurePropertiesNV( VkPhysicalDeviceClusterAccelerationStructurePropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceClusterAccelerationStructurePropertiesNV( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceClusterAccelerationStructurePropertiesNV & operator=( PhysicalDeviceClusterAccelerationStructurePropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceClusterAccelerationStructurePropertiesNV & operator=( VkPhysicalDeviceClusterAccelerationStructurePropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceClusterAccelerationStructurePropertiesNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceClusterAccelerationStructurePropertiesNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, maxVerticesPerCluster, maxTrianglesPerCluster, clusterScratchByteAlignment, clusterByteAlignment, clusterTemplateByteAlignment, clusterBottomLevelByteAlignment, clusterTemplateBoundsByteAlignment, maxClusterGeometryIndex ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceClusterAccelerationStructurePropertiesNV const & ) const = default; #else bool operator==( PhysicalDeviceClusterAccelerationStructurePropertiesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( maxVerticesPerCluster == rhs.maxVerticesPerCluster ) && ( maxTrianglesPerCluster == rhs.maxTrianglesPerCluster ) && ( clusterScratchByteAlignment == rhs.clusterScratchByteAlignment ) && ( clusterByteAlignment == rhs.clusterByteAlignment ) && ( clusterTemplateByteAlignment == rhs.clusterTemplateByteAlignment ) && ( clusterBottomLevelByteAlignment == rhs.clusterBottomLevelByteAlignment ) && ( clusterTemplateBoundsByteAlignment == rhs.clusterTemplateBoundsByteAlignment ) && ( maxClusterGeometryIndex == rhs.maxClusterGeometryIndex ); # endif } bool operator!=( PhysicalDeviceClusterAccelerationStructurePropertiesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceClusterAccelerationStructurePropertiesNV; void * pNext = {}; uint32_t maxVerticesPerCluster = {}; uint32_t maxTrianglesPerCluster = {}; uint32_t clusterScratchByteAlignment = {}; uint32_t clusterByteAlignment = {}; uint32_t clusterTemplateByteAlignment = {}; uint32_t clusterBottomLevelByteAlignment = {}; uint32_t clusterTemplateBoundsByteAlignment = {}; uint32_t maxClusterGeometryIndex = {}; }; template <> struct CppType { using Type = PhysicalDeviceClusterAccelerationStructurePropertiesNV; }; struct PhysicalDeviceClusterCullingShaderFeaturesHUAWEI { using NativeType = VkPhysicalDeviceClusterCullingShaderFeaturesHUAWEI; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceClusterCullingShaderFeaturesHUAWEI; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceClusterCullingShaderFeaturesHUAWEI( VULKAN_HPP_NAMESPACE::Bool32 clustercullingShader_ = {}, VULKAN_HPP_NAMESPACE::Bool32 multiviewClusterCullingShader_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , clustercullingShader{ clustercullingShader_ } , multiviewClusterCullingShader{ multiviewClusterCullingShader_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceClusterCullingShaderFeaturesHUAWEI( PhysicalDeviceClusterCullingShaderFeaturesHUAWEI const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceClusterCullingShaderFeaturesHUAWEI( VkPhysicalDeviceClusterCullingShaderFeaturesHUAWEI const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceClusterCullingShaderFeaturesHUAWEI( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceClusterCullingShaderFeaturesHUAWEI & operator=( PhysicalDeviceClusterCullingShaderFeaturesHUAWEI const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceClusterCullingShaderFeaturesHUAWEI & operator=( VkPhysicalDeviceClusterCullingShaderFeaturesHUAWEI const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceClusterCullingShaderFeaturesHUAWEI & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceClusterCullingShaderFeaturesHUAWEI & setClustercullingShader( VULKAN_HPP_NAMESPACE::Bool32 clustercullingShader_ ) VULKAN_HPP_NOEXCEPT { clustercullingShader = clustercullingShader_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceClusterCullingShaderFeaturesHUAWEI & setMultiviewClusterCullingShader( VULKAN_HPP_NAMESPACE::Bool32 multiviewClusterCullingShader_ ) VULKAN_HPP_NOEXCEPT { multiviewClusterCullingShader = multiviewClusterCullingShader_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceClusterCullingShaderFeaturesHUAWEI const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceClusterCullingShaderFeaturesHUAWEI &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, clustercullingShader, multiviewClusterCullingShader ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceClusterCullingShaderFeaturesHUAWEI const & ) const = default; #else bool operator==( PhysicalDeviceClusterCullingShaderFeaturesHUAWEI const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( clustercullingShader == rhs.clustercullingShader ) && ( multiviewClusterCullingShader == rhs.multiviewClusterCullingShader ); # endif } bool operator!=( PhysicalDeviceClusterCullingShaderFeaturesHUAWEI const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceClusterCullingShaderFeaturesHUAWEI; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 clustercullingShader = {}; VULKAN_HPP_NAMESPACE::Bool32 multiviewClusterCullingShader = {}; }; template <> struct CppType { using Type = PhysicalDeviceClusterCullingShaderFeaturesHUAWEI; }; struct PhysicalDeviceClusterCullingShaderPropertiesHUAWEI { using NativeType = VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceClusterCullingShaderPropertiesHUAWEI; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceClusterCullingShaderPropertiesHUAWEI( std::array const & maxWorkGroupCount_ = {}, std::array const & maxWorkGroupSize_ = {}, uint32_t maxOutputClusterCount_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize indirectBufferOffsetAlignment_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , maxWorkGroupCount{ maxWorkGroupCount_ } , maxWorkGroupSize{ maxWorkGroupSize_ } , maxOutputClusterCount{ maxOutputClusterCount_ } , indirectBufferOffsetAlignment{ indirectBufferOffsetAlignment_ } { } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceClusterCullingShaderPropertiesHUAWEI( PhysicalDeviceClusterCullingShaderPropertiesHUAWEI const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceClusterCullingShaderPropertiesHUAWEI( VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceClusterCullingShaderPropertiesHUAWEI( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceClusterCullingShaderPropertiesHUAWEI & operator=( PhysicalDeviceClusterCullingShaderPropertiesHUAWEI const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceClusterCullingShaderPropertiesHUAWEI & operator=( VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple const &, VULKAN_HPP_NAMESPACE::ArrayWrapper1D const &, uint32_t const &, VULKAN_HPP_NAMESPACE::DeviceSize const &> # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, maxWorkGroupCount, maxWorkGroupSize, maxOutputClusterCount, indirectBufferOffsetAlignment ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceClusterCullingShaderPropertiesHUAWEI const & ) const = default; #else bool operator==( PhysicalDeviceClusterCullingShaderPropertiesHUAWEI const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( maxWorkGroupCount == rhs.maxWorkGroupCount ) && ( maxWorkGroupSize == rhs.maxWorkGroupSize ) && ( maxOutputClusterCount == rhs.maxOutputClusterCount ) && ( indirectBufferOffsetAlignment == rhs.indirectBufferOffsetAlignment ); # endif } bool operator!=( PhysicalDeviceClusterCullingShaderPropertiesHUAWEI const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceClusterCullingShaderPropertiesHUAWEI; void * pNext = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D maxWorkGroupCount = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D maxWorkGroupSize = {}; uint32_t maxOutputClusterCount = {}; VULKAN_HPP_NAMESPACE::DeviceSize indirectBufferOffsetAlignment = {}; }; template <> struct CppType { using Type = PhysicalDeviceClusterCullingShaderPropertiesHUAWEI; }; struct PhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI { using NativeType = VkPhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI( VULKAN_HPP_NAMESPACE::Bool32 clusterShadingRate_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , clusterShadingRate{ clusterShadingRate_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI( PhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI( VkPhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI & operator=( PhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI & operator=( VkPhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI & setClusterShadingRate( VULKAN_HPP_NAMESPACE::Bool32 clusterShadingRate_ ) VULKAN_HPP_NOEXCEPT { clusterShadingRate = clusterShadingRate_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, clusterShadingRate ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI const & ) const = default; #else bool operator==( PhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( clusterShadingRate == rhs.clusterShadingRate ); # endif } bool operator!=( PhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 clusterShadingRate = {}; }; template <> struct CppType { using Type = PhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI; }; struct PhysicalDeviceCoherentMemoryFeaturesAMD { using NativeType = VkPhysicalDeviceCoherentMemoryFeaturesAMD; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceCoherentMemoryFeaturesAMD; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceCoherentMemoryFeaturesAMD( VULKAN_HPP_NAMESPACE::Bool32 deviceCoherentMemory_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , deviceCoherentMemory{ deviceCoherentMemory_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceCoherentMemoryFeaturesAMD( PhysicalDeviceCoherentMemoryFeaturesAMD const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceCoherentMemoryFeaturesAMD( VkPhysicalDeviceCoherentMemoryFeaturesAMD const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceCoherentMemoryFeaturesAMD( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceCoherentMemoryFeaturesAMD & operator=( PhysicalDeviceCoherentMemoryFeaturesAMD const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceCoherentMemoryFeaturesAMD & operator=( VkPhysicalDeviceCoherentMemoryFeaturesAMD const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceCoherentMemoryFeaturesAMD & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceCoherentMemoryFeaturesAMD & setDeviceCoherentMemory( VULKAN_HPP_NAMESPACE::Bool32 deviceCoherentMemory_ ) VULKAN_HPP_NOEXCEPT { deviceCoherentMemory = deviceCoherentMemory_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceCoherentMemoryFeaturesAMD const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceCoherentMemoryFeaturesAMD &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, deviceCoherentMemory ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceCoherentMemoryFeaturesAMD const & ) const = default; #else bool operator==( PhysicalDeviceCoherentMemoryFeaturesAMD const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( deviceCoherentMemory == rhs.deviceCoherentMemory ); # endif } bool operator!=( PhysicalDeviceCoherentMemoryFeaturesAMD const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceCoherentMemoryFeaturesAMD; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 deviceCoherentMemory = {}; }; template <> struct CppType { using Type = PhysicalDeviceCoherentMemoryFeaturesAMD; }; struct PhysicalDeviceColorWriteEnableFeaturesEXT { using NativeType = VkPhysicalDeviceColorWriteEnableFeaturesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceColorWriteEnableFeaturesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceColorWriteEnableFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 colorWriteEnable_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , colorWriteEnable{ colorWriteEnable_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceColorWriteEnableFeaturesEXT( PhysicalDeviceColorWriteEnableFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceColorWriteEnableFeaturesEXT( VkPhysicalDeviceColorWriteEnableFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceColorWriteEnableFeaturesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceColorWriteEnableFeaturesEXT & operator=( PhysicalDeviceColorWriteEnableFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceColorWriteEnableFeaturesEXT & operator=( VkPhysicalDeviceColorWriteEnableFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceColorWriteEnableFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceColorWriteEnableFeaturesEXT & setColorWriteEnable( VULKAN_HPP_NAMESPACE::Bool32 colorWriteEnable_ ) VULKAN_HPP_NOEXCEPT { colorWriteEnable = colorWriteEnable_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceColorWriteEnableFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceColorWriteEnableFeaturesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, colorWriteEnable ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceColorWriteEnableFeaturesEXT const & ) const = default; #else bool operator==( PhysicalDeviceColorWriteEnableFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( colorWriteEnable == rhs.colorWriteEnable ); # endif } bool operator!=( PhysicalDeviceColorWriteEnableFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceColorWriteEnableFeaturesEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 colorWriteEnable = {}; }; template <> struct CppType { using Type = PhysicalDeviceColorWriteEnableFeaturesEXT; }; struct PhysicalDeviceCommandBufferInheritanceFeaturesNV { using NativeType = VkPhysicalDeviceCommandBufferInheritanceFeaturesNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceCommandBufferInheritanceFeaturesNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceCommandBufferInheritanceFeaturesNV( VULKAN_HPP_NAMESPACE::Bool32 commandBufferInheritance_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , commandBufferInheritance{ commandBufferInheritance_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceCommandBufferInheritanceFeaturesNV( PhysicalDeviceCommandBufferInheritanceFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceCommandBufferInheritanceFeaturesNV( VkPhysicalDeviceCommandBufferInheritanceFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceCommandBufferInheritanceFeaturesNV( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceCommandBufferInheritanceFeaturesNV & operator=( PhysicalDeviceCommandBufferInheritanceFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceCommandBufferInheritanceFeaturesNV & operator=( VkPhysicalDeviceCommandBufferInheritanceFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceCommandBufferInheritanceFeaturesNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceCommandBufferInheritanceFeaturesNV & setCommandBufferInheritance( VULKAN_HPP_NAMESPACE::Bool32 commandBufferInheritance_ ) VULKAN_HPP_NOEXCEPT { commandBufferInheritance = commandBufferInheritance_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceCommandBufferInheritanceFeaturesNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceCommandBufferInheritanceFeaturesNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, commandBufferInheritance ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceCommandBufferInheritanceFeaturesNV const & ) const = default; #else bool operator==( PhysicalDeviceCommandBufferInheritanceFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( commandBufferInheritance == rhs.commandBufferInheritance ); # endif } bool operator!=( PhysicalDeviceCommandBufferInheritanceFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceCommandBufferInheritanceFeaturesNV; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 commandBufferInheritance = {}; }; template <> struct CppType { using Type = PhysicalDeviceCommandBufferInheritanceFeaturesNV; }; struct PhysicalDeviceComputeShaderDerivativesFeaturesKHR { using NativeType = VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceComputeShaderDerivativesFeaturesKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceComputeShaderDerivativesFeaturesKHR( VULKAN_HPP_NAMESPACE::Bool32 computeDerivativeGroupQuads_ = {}, VULKAN_HPP_NAMESPACE::Bool32 computeDerivativeGroupLinear_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , computeDerivativeGroupQuads{ computeDerivativeGroupQuads_ } , computeDerivativeGroupLinear{ computeDerivativeGroupLinear_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceComputeShaderDerivativesFeaturesKHR( PhysicalDeviceComputeShaderDerivativesFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceComputeShaderDerivativesFeaturesKHR( VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceComputeShaderDerivativesFeaturesKHR( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceComputeShaderDerivativesFeaturesKHR & operator=( PhysicalDeviceComputeShaderDerivativesFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceComputeShaderDerivativesFeaturesKHR & operator=( VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceComputeShaderDerivativesFeaturesKHR & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceComputeShaderDerivativesFeaturesKHR & setComputeDerivativeGroupQuads( VULKAN_HPP_NAMESPACE::Bool32 computeDerivativeGroupQuads_ ) VULKAN_HPP_NOEXCEPT { computeDerivativeGroupQuads = computeDerivativeGroupQuads_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceComputeShaderDerivativesFeaturesKHR & setComputeDerivativeGroupLinear( VULKAN_HPP_NAMESPACE::Bool32 computeDerivativeGroupLinear_ ) VULKAN_HPP_NOEXCEPT { computeDerivativeGroupLinear = computeDerivativeGroupLinear_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, computeDerivativeGroupQuads, computeDerivativeGroupLinear ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceComputeShaderDerivativesFeaturesKHR const & ) const = default; #else bool operator==( PhysicalDeviceComputeShaderDerivativesFeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( computeDerivativeGroupQuads == rhs.computeDerivativeGroupQuads ) && ( computeDerivativeGroupLinear == rhs.computeDerivativeGroupLinear ); # endif } bool operator!=( PhysicalDeviceComputeShaderDerivativesFeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceComputeShaderDerivativesFeaturesKHR; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 computeDerivativeGroupQuads = {}; VULKAN_HPP_NAMESPACE::Bool32 computeDerivativeGroupLinear = {}; }; template <> struct CppType { using Type = PhysicalDeviceComputeShaderDerivativesFeaturesKHR; }; using PhysicalDeviceComputeShaderDerivativesFeaturesNV = PhysicalDeviceComputeShaderDerivativesFeaturesKHR; struct PhysicalDeviceComputeShaderDerivativesPropertiesKHR { using NativeType = VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceComputeShaderDerivativesPropertiesKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceComputeShaderDerivativesPropertiesKHR( VULKAN_HPP_NAMESPACE::Bool32 meshAndTaskShaderDerivatives_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , meshAndTaskShaderDerivatives{ meshAndTaskShaderDerivatives_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceComputeShaderDerivativesPropertiesKHR( PhysicalDeviceComputeShaderDerivativesPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceComputeShaderDerivativesPropertiesKHR( VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceComputeShaderDerivativesPropertiesKHR( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceComputeShaderDerivativesPropertiesKHR & operator=( PhysicalDeviceComputeShaderDerivativesPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceComputeShaderDerivativesPropertiesKHR & operator=( VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, meshAndTaskShaderDerivatives ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceComputeShaderDerivativesPropertiesKHR const & ) const = default; #else bool operator==( PhysicalDeviceComputeShaderDerivativesPropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( meshAndTaskShaderDerivatives == rhs.meshAndTaskShaderDerivatives ); # endif } bool operator!=( PhysicalDeviceComputeShaderDerivativesPropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceComputeShaderDerivativesPropertiesKHR; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 meshAndTaskShaderDerivatives = {}; }; template <> struct CppType { using Type = PhysicalDeviceComputeShaderDerivativesPropertiesKHR; }; struct PhysicalDeviceConditionalRenderingFeaturesEXT { using NativeType = VkPhysicalDeviceConditionalRenderingFeaturesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceConditionalRenderingFeaturesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceConditionalRenderingFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 conditionalRendering_ = {}, VULKAN_HPP_NAMESPACE::Bool32 inheritedConditionalRendering_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , conditionalRendering{ conditionalRendering_ } , inheritedConditionalRendering{ inheritedConditionalRendering_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceConditionalRenderingFeaturesEXT( PhysicalDeviceConditionalRenderingFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceConditionalRenderingFeaturesEXT( VkPhysicalDeviceConditionalRenderingFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceConditionalRenderingFeaturesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceConditionalRenderingFeaturesEXT & operator=( PhysicalDeviceConditionalRenderingFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceConditionalRenderingFeaturesEXT & operator=( VkPhysicalDeviceConditionalRenderingFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceConditionalRenderingFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceConditionalRenderingFeaturesEXT & setConditionalRendering( VULKAN_HPP_NAMESPACE::Bool32 conditionalRendering_ ) VULKAN_HPP_NOEXCEPT { conditionalRendering = conditionalRendering_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceConditionalRenderingFeaturesEXT & setInheritedConditionalRendering( VULKAN_HPP_NAMESPACE::Bool32 inheritedConditionalRendering_ ) VULKAN_HPP_NOEXCEPT { inheritedConditionalRendering = inheritedConditionalRendering_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceConditionalRenderingFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceConditionalRenderingFeaturesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, conditionalRendering, inheritedConditionalRendering ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceConditionalRenderingFeaturesEXT const & ) const = default; #else bool operator==( PhysicalDeviceConditionalRenderingFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( conditionalRendering == rhs.conditionalRendering ) && ( inheritedConditionalRendering == rhs.inheritedConditionalRendering ); # endif } bool operator!=( PhysicalDeviceConditionalRenderingFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceConditionalRenderingFeaturesEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 conditionalRendering = {}; VULKAN_HPP_NAMESPACE::Bool32 inheritedConditionalRendering = {}; }; template <> struct CppType { using Type = PhysicalDeviceConditionalRenderingFeaturesEXT; }; struct PhysicalDeviceConservativeRasterizationPropertiesEXT { using NativeType = VkPhysicalDeviceConservativeRasterizationPropertiesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceConservativeRasterizationPropertiesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceConservativeRasterizationPropertiesEXT( float primitiveOverestimationSize_ = {}, float maxExtraPrimitiveOverestimationSize_ = {}, float extraPrimitiveOverestimationSizeGranularity_ = {}, VULKAN_HPP_NAMESPACE::Bool32 primitiveUnderestimation_ = {}, VULKAN_HPP_NAMESPACE::Bool32 conservativePointAndLineRasterization_ = {}, VULKAN_HPP_NAMESPACE::Bool32 degenerateTrianglesRasterized_ = {}, VULKAN_HPP_NAMESPACE::Bool32 degenerateLinesRasterized_ = {}, VULKAN_HPP_NAMESPACE::Bool32 fullyCoveredFragmentShaderInputVariable_ = {}, VULKAN_HPP_NAMESPACE::Bool32 conservativeRasterizationPostDepthCoverage_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , primitiveOverestimationSize{ primitiveOverestimationSize_ } , maxExtraPrimitiveOverestimationSize{ maxExtraPrimitiveOverestimationSize_ } , extraPrimitiveOverestimationSizeGranularity{ extraPrimitiveOverestimationSizeGranularity_ } , primitiveUnderestimation{ primitiveUnderestimation_ } , conservativePointAndLineRasterization{ conservativePointAndLineRasterization_ } , degenerateTrianglesRasterized{ degenerateTrianglesRasterized_ } , degenerateLinesRasterized{ degenerateLinesRasterized_ } , fullyCoveredFragmentShaderInputVariable{ fullyCoveredFragmentShaderInputVariable_ } , conservativeRasterizationPostDepthCoverage{ conservativeRasterizationPostDepthCoverage_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceConservativeRasterizationPropertiesEXT( PhysicalDeviceConservativeRasterizationPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceConservativeRasterizationPropertiesEXT( VkPhysicalDeviceConservativeRasterizationPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceConservativeRasterizationPropertiesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceConservativeRasterizationPropertiesEXT & operator=( PhysicalDeviceConservativeRasterizationPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceConservativeRasterizationPropertiesEXT & operator=( VkPhysicalDeviceConservativeRasterizationPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceConservativeRasterizationPropertiesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceConservativeRasterizationPropertiesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, primitiveOverestimationSize, maxExtraPrimitiveOverestimationSize, extraPrimitiveOverestimationSizeGranularity, primitiveUnderestimation, conservativePointAndLineRasterization, degenerateTrianglesRasterized, degenerateLinesRasterized, fullyCoveredFragmentShaderInputVariable, conservativeRasterizationPostDepthCoverage ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceConservativeRasterizationPropertiesEXT const & ) const = default; #else bool operator==( PhysicalDeviceConservativeRasterizationPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( primitiveOverestimationSize == rhs.primitiveOverestimationSize ) && ( maxExtraPrimitiveOverestimationSize == rhs.maxExtraPrimitiveOverestimationSize ) && ( extraPrimitiveOverestimationSizeGranularity == rhs.extraPrimitiveOverestimationSizeGranularity ) && ( primitiveUnderestimation == rhs.primitiveUnderestimation ) && ( conservativePointAndLineRasterization == rhs.conservativePointAndLineRasterization ) && ( degenerateTrianglesRasterized == rhs.degenerateTrianglesRasterized ) && ( degenerateLinesRasterized == rhs.degenerateLinesRasterized ) && ( fullyCoveredFragmentShaderInputVariable == rhs.fullyCoveredFragmentShaderInputVariable ) && ( conservativeRasterizationPostDepthCoverage == rhs.conservativeRasterizationPostDepthCoverage ); # endif } bool operator!=( PhysicalDeviceConservativeRasterizationPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceConservativeRasterizationPropertiesEXT; void * pNext = {}; float primitiveOverestimationSize = {}; float maxExtraPrimitiveOverestimationSize = {}; float extraPrimitiveOverestimationSizeGranularity = {}; VULKAN_HPP_NAMESPACE::Bool32 primitiveUnderestimation = {}; VULKAN_HPP_NAMESPACE::Bool32 conservativePointAndLineRasterization = {}; VULKAN_HPP_NAMESPACE::Bool32 degenerateTrianglesRasterized = {}; VULKAN_HPP_NAMESPACE::Bool32 degenerateLinesRasterized = {}; VULKAN_HPP_NAMESPACE::Bool32 fullyCoveredFragmentShaderInputVariable = {}; VULKAN_HPP_NAMESPACE::Bool32 conservativeRasterizationPostDepthCoverage = {}; }; template <> struct CppType { using Type = PhysicalDeviceConservativeRasterizationPropertiesEXT; }; struct PhysicalDeviceCooperativeMatrix2FeaturesNV { using NativeType = VkPhysicalDeviceCooperativeMatrix2FeaturesNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceCooperativeMatrix2FeaturesNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceCooperativeMatrix2FeaturesNV( VULKAN_HPP_NAMESPACE::Bool32 cooperativeMatrixWorkgroupScope_ = {}, VULKAN_HPP_NAMESPACE::Bool32 cooperativeMatrixFlexibleDimensions_ = {}, VULKAN_HPP_NAMESPACE::Bool32 cooperativeMatrixReductions_ = {}, VULKAN_HPP_NAMESPACE::Bool32 cooperativeMatrixConversions_ = {}, VULKAN_HPP_NAMESPACE::Bool32 cooperativeMatrixPerElementOperations_ = {}, VULKAN_HPP_NAMESPACE::Bool32 cooperativeMatrixTensorAddressing_ = {}, VULKAN_HPP_NAMESPACE::Bool32 cooperativeMatrixBlockLoads_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , cooperativeMatrixWorkgroupScope{ cooperativeMatrixWorkgroupScope_ } , cooperativeMatrixFlexibleDimensions{ cooperativeMatrixFlexibleDimensions_ } , cooperativeMatrixReductions{ cooperativeMatrixReductions_ } , cooperativeMatrixConversions{ cooperativeMatrixConversions_ } , cooperativeMatrixPerElementOperations{ cooperativeMatrixPerElementOperations_ } , cooperativeMatrixTensorAddressing{ cooperativeMatrixTensorAddressing_ } , cooperativeMatrixBlockLoads{ cooperativeMatrixBlockLoads_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceCooperativeMatrix2FeaturesNV( PhysicalDeviceCooperativeMatrix2FeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceCooperativeMatrix2FeaturesNV( VkPhysicalDeviceCooperativeMatrix2FeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceCooperativeMatrix2FeaturesNV( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceCooperativeMatrix2FeaturesNV & operator=( PhysicalDeviceCooperativeMatrix2FeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceCooperativeMatrix2FeaturesNV & operator=( VkPhysicalDeviceCooperativeMatrix2FeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceCooperativeMatrix2FeaturesNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceCooperativeMatrix2FeaturesNV & setCooperativeMatrixWorkgroupScope( VULKAN_HPP_NAMESPACE::Bool32 cooperativeMatrixWorkgroupScope_ ) VULKAN_HPP_NOEXCEPT { cooperativeMatrixWorkgroupScope = cooperativeMatrixWorkgroupScope_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceCooperativeMatrix2FeaturesNV & setCooperativeMatrixFlexibleDimensions( VULKAN_HPP_NAMESPACE::Bool32 cooperativeMatrixFlexibleDimensions_ ) VULKAN_HPP_NOEXCEPT { cooperativeMatrixFlexibleDimensions = cooperativeMatrixFlexibleDimensions_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceCooperativeMatrix2FeaturesNV & setCooperativeMatrixReductions( VULKAN_HPP_NAMESPACE::Bool32 cooperativeMatrixReductions_ ) VULKAN_HPP_NOEXCEPT { cooperativeMatrixReductions = cooperativeMatrixReductions_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceCooperativeMatrix2FeaturesNV & setCooperativeMatrixConversions( VULKAN_HPP_NAMESPACE::Bool32 cooperativeMatrixConversions_ ) VULKAN_HPP_NOEXCEPT { cooperativeMatrixConversions = cooperativeMatrixConversions_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceCooperativeMatrix2FeaturesNV & setCooperativeMatrixPerElementOperations( VULKAN_HPP_NAMESPACE::Bool32 cooperativeMatrixPerElementOperations_ ) VULKAN_HPP_NOEXCEPT { cooperativeMatrixPerElementOperations = cooperativeMatrixPerElementOperations_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceCooperativeMatrix2FeaturesNV & setCooperativeMatrixTensorAddressing( VULKAN_HPP_NAMESPACE::Bool32 cooperativeMatrixTensorAddressing_ ) VULKAN_HPP_NOEXCEPT { cooperativeMatrixTensorAddressing = cooperativeMatrixTensorAddressing_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceCooperativeMatrix2FeaturesNV & setCooperativeMatrixBlockLoads( VULKAN_HPP_NAMESPACE::Bool32 cooperativeMatrixBlockLoads_ ) VULKAN_HPP_NOEXCEPT { cooperativeMatrixBlockLoads = cooperativeMatrixBlockLoads_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceCooperativeMatrix2FeaturesNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceCooperativeMatrix2FeaturesNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, cooperativeMatrixWorkgroupScope, cooperativeMatrixFlexibleDimensions, cooperativeMatrixReductions, cooperativeMatrixConversions, cooperativeMatrixPerElementOperations, cooperativeMatrixTensorAddressing, cooperativeMatrixBlockLoads ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceCooperativeMatrix2FeaturesNV const & ) const = default; #else bool operator==( PhysicalDeviceCooperativeMatrix2FeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( cooperativeMatrixWorkgroupScope == rhs.cooperativeMatrixWorkgroupScope ) && ( cooperativeMatrixFlexibleDimensions == rhs.cooperativeMatrixFlexibleDimensions ) && ( cooperativeMatrixReductions == rhs.cooperativeMatrixReductions ) && ( cooperativeMatrixConversions == rhs.cooperativeMatrixConversions ) && ( cooperativeMatrixPerElementOperations == rhs.cooperativeMatrixPerElementOperations ) && ( cooperativeMatrixTensorAddressing == rhs.cooperativeMatrixTensorAddressing ) && ( cooperativeMatrixBlockLoads == rhs.cooperativeMatrixBlockLoads ); # endif } bool operator!=( PhysicalDeviceCooperativeMatrix2FeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceCooperativeMatrix2FeaturesNV; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 cooperativeMatrixWorkgroupScope = {}; VULKAN_HPP_NAMESPACE::Bool32 cooperativeMatrixFlexibleDimensions = {}; VULKAN_HPP_NAMESPACE::Bool32 cooperativeMatrixReductions = {}; VULKAN_HPP_NAMESPACE::Bool32 cooperativeMatrixConversions = {}; VULKAN_HPP_NAMESPACE::Bool32 cooperativeMatrixPerElementOperations = {}; VULKAN_HPP_NAMESPACE::Bool32 cooperativeMatrixTensorAddressing = {}; VULKAN_HPP_NAMESPACE::Bool32 cooperativeMatrixBlockLoads = {}; }; template <> struct CppType { using Type = PhysicalDeviceCooperativeMatrix2FeaturesNV; }; struct PhysicalDeviceCooperativeMatrix2PropertiesNV { using NativeType = VkPhysicalDeviceCooperativeMatrix2PropertiesNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceCooperativeMatrix2PropertiesNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceCooperativeMatrix2PropertiesNV( uint32_t cooperativeMatrixWorkgroupScopeMaxWorkgroupSize_ = {}, uint32_t cooperativeMatrixFlexibleDimensionsMaxDimension_ = {}, uint32_t cooperativeMatrixWorkgroupScopeReservedSharedMemory_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , cooperativeMatrixWorkgroupScopeMaxWorkgroupSize{ cooperativeMatrixWorkgroupScopeMaxWorkgroupSize_ } , cooperativeMatrixFlexibleDimensionsMaxDimension{ cooperativeMatrixFlexibleDimensionsMaxDimension_ } , cooperativeMatrixWorkgroupScopeReservedSharedMemory{ cooperativeMatrixWorkgroupScopeReservedSharedMemory_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceCooperativeMatrix2PropertiesNV( PhysicalDeviceCooperativeMatrix2PropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceCooperativeMatrix2PropertiesNV( VkPhysicalDeviceCooperativeMatrix2PropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceCooperativeMatrix2PropertiesNV( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceCooperativeMatrix2PropertiesNV & operator=( PhysicalDeviceCooperativeMatrix2PropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceCooperativeMatrix2PropertiesNV & operator=( VkPhysicalDeviceCooperativeMatrix2PropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceCooperativeMatrix2PropertiesNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceCooperativeMatrix2PropertiesNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, cooperativeMatrixWorkgroupScopeMaxWorkgroupSize, cooperativeMatrixFlexibleDimensionsMaxDimension, cooperativeMatrixWorkgroupScopeReservedSharedMemory ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceCooperativeMatrix2PropertiesNV const & ) const = default; #else bool operator==( PhysicalDeviceCooperativeMatrix2PropertiesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( cooperativeMatrixWorkgroupScopeMaxWorkgroupSize == rhs.cooperativeMatrixWorkgroupScopeMaxWorkgroupSize ) && ( cooperativeMatrixFlexibleDimensionsMaxDimension == rhs.cooperativeMatrixFlexibleDimensionsMaxDimension ) && ( cooperativeMatrixWorkgroupScopeReservedSharedMemory == rhs.cooperativeMatrixWorkgroupScopeReservedSharedMemory ); # endif } bool operator!=( PhysicalDeviceCooperativeMatrix2PropertiesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceCooperativeMatrix2PropertiesNV; void * pNext = {}; uint32_t cooperativeMatrixWorkgroupScopeMaxWorkgroupSize = {}; uint32_t cooperativeMatrixFlexibleDimensionsMaxDimension = {}; uint32_t cooperativeMatrixWorkgroupScopeReservedSharedMemory = {}; }; template <> struct CppType { using Type = PhysicalDeviceCooperativeMatrix2PropertiesNV; }; struct PhysicalDeviceCooperativeMatrixFeaturesKHR { using NativeType = VkPhysicalDeviceCooperativeMatrixFeaturesKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceCooperativeMatrixFeaturesKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceCooperativeMatrixFeaturesKHR( VULKAN_HPP_NAMESPACE::Bool32 cooperativeMatrix_ = {}, VULKAN_HPP_NAMESPACE::Bool32 cooperativeMatrixRobustBufferAccess_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , cooperativeMatrix{ cooperativeMatrix_ } , cooperativeMatrixRobustBufferAccess{ cooperativeMatrixRobustBufferAccess_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceCooperativeMatrixFeaturesKHR( PhysicalDeviceCooperativeMatrixFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceCooperativeMatrixFeaturesKHR( VkPhysicalDeviceCooperativeMatrixFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceCooperativeMatrixFeaturesKHR( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceCooperativeMatrixFeaturesKHR & operator=( PhysicalDeviceCooperativeMatrixFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceCooperativeMatrixFeaturesKHR & operator=( VkPhysicalDeviceCooperativeMatrixFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceCooperativeMatrixFeaturesKHR & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceCooperativeMatrixFeaturesKHR & setCooperativeMatrix( VULKAN_HPP_NAMESPACE::Bool32 cooperativeMatrix_ ) VULKAN_HPP_NOEXCEPT { cooperativeMatrix = cooperativeMatrix_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceCooperativeMatrixFeaturesKHR & setCooperativeMatrixRobustBufferAccess( VULKAN_HPP_NAMESPACE::Bool32 cooperativeMatrixRobustBufferAccess_ ) VULKAN_HPP_NOEXCEPT { cooperativeMatrixRobustBufferAccess = cooperativeMatrixRobustBufferAccess_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceCooperativeMatrixFeaturesKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceCooperativeMatrixFeaturesKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, cooperativeMatrix, cooperativeMatrixRobustBufferAccess ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceCooperativeMatrixFeaturesKHR const & ) const = default; #else bool operator==( PhysicalDeviceCooperativeMatrixFeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( cooperativeMatrix == rhs.cooperativeMatrix ) && ( cooperativeMatrixRobustBufferAccess == rhs.cooperativeMatrixRobustBufferAccess ); # endif } bool operator!=( PhysicalDeviceCooperativeMatrixFeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceCooperativeMatrixFeaturesKHR; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 cooperativeMatrix = {}; VULKAN_HPP_NAMESPACE::Bool32 cooperativeMatrixRobustBufferAccess = {}; }; template <> struct CppType { using Type = PhysicalDeviceCooperativeMatrixFeaturesKHR; }; struct PhysicalDeviceCooperativeMatrixFeaturesNV { using NativeType = VkPhysicalDeviceCooperativeMatrixFeaturesNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceCooperativeMatrixFeaturesNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceCooperativeMatrixFeaturesNV( VULKAN_HPP_NAMESPACE::Bool32 cooperativeMatrix_ = {}, VULKAN_HPP_NAMESPACE::Bool32 cooperativeMatrixRobustBufferAccess_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , cooperativeMatrix{ cooperativeMatrix_ } , cooperativeMatrixRobustBufferAccess{ cooperativeMatrixRobustBufferAccess_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceCooperativeMatrixFeaturesNV( PhysicalDeviceCooperativeMatrixFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceCooperativeMatrixFeaturesNV( VkPhysicalDeviceCooperativeMatrixFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceCooperativeMatrixFeaturesNV( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceCooperativeMatrixFeaturesNV & operator=( PhysicalDeviceCooperativeMatrixFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceCooperativeMatrixFeaturesNV & operator=( VkPhysicalDeviceCooperativeMatrixFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceCooperativeMatrixFeaturesNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceCooperativeMatrixFeaturesNV & setCooperativeMatrix( VULKAN_HPP_NAMESPACE::Bool32 cooperativeMatrix_ ) VULKAN_HPP_NOEXCEPT { cooperativeMatrix = cooperativeMatrix_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceCooperativeMatrixFeaturesNV & setCooperativeMatrixRobustBufferAccess( VULKAN_HPP_NAMESPACE::Bool32 cooperativeMatrixRobustBufferAccess_ ) VULKAN_HPP_NOEXCEPT { cooperativeMatrixRobustBufferAccess = cooperativeMatrixRobustBufferAccess_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceCooperativeMatrixFeaturesNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceCooperativeMatrixFeaturesNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, cooperativeMatrix, cooperativeMatrixRobustBufferAccess ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceCooperativeMatrixFeaturesNV const & ) const = default; #else bool operator==( PhysicalDeviceCooperativeMatrixFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( cooperativeMatrix == rhs.cooperativeMatrix ) && ( cooperativeMatrixRobustBufferAccess == rhs.cooperativeMatrixRobustBufferAccess ); # endif } bool operator!=( PhysicalDeviceCooperativeMatrixFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceCooperativeMatrixFeaturesNV; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 cooperativeMatrix = {}; VULKAN_HPP_NAMESPACE::Bool32 cooperativeMatrixRobustBufferAccess = {}; }; template <> struct CppType { using Type = PhysicalDeviceCooperativeMatrixFeaturesNV; }; struct PhysicalDeviceCooperativeMatrixPropertiesKHR { using NativeType = VkPhysicalDeviceCooperativeMatrixPropertiesKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceCooperativeMatrixPropertiesKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceCooperativeMatrixPropertiesKHR( VULKAN_HPP_NAMESPACE::ShaderStageFlags cooperativeMatrixSupportedStages_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , cooperativeMatrixSupportedStages{ cooperativeMatrixSupportedStages_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceCooperativeMatrixPropertiesKHR( PhysicalDeviceCooperativeMatrixPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceCooperativeMatrixPropertiesKHR( VkPhysicalDeviceCooperativeMatrixPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceCooperativeMatrixPropertiesKHR( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceCooperativeMatrixPropertiesKHR & operator=( PhysicalDeviceCooperativeMatrixPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceCooperativeMatrixPropertiesKHR & operator=( VkPhysicalDeviceCooperativeMatrixPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceCooperativeMatrixPropertiesKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceCooperativeMatrixPropertiesKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, cooperativeMatrixSupportedStages ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceCooperativeMatrixPropertiesKHR const & ) const = default; #else bool operator==( PhysicalDeviceCooperativeMatrixPropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( cooperativeMatrixSupportedStages == rhs.cooperativeMatrixSupportedStages ); # endif } bool operator!=( PhysicalDeviceCooperativeMatrixPropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceCooperativeMatrixPropertiesKHR; void * pNext = {}; VULKAN_HPP_NAMESPACE::ShaderStageFlags cooperativeMatrixSupportedStages = {}; }; template <> struct CppType { using Type = PhysicalDeviceCooperativeMatrixPropertiesKHR; }; struct PhysicalDeviceCooperativeMatrixPropertiesNV { using NativeType = VkPhysicalDeviceCooperativeMatrixPropertiesNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceCooperativeMatrixPropertiesNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceCooperativeMatrixPropertiesNV( VULKAN_HPP_NAMESPACE::ShaderStageFlags cooperativeMatrixSupportedStages_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , cooperativeMatrixSupportedStages{ cooperativeMatrixSupportedStages_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceCooperativeMatrixPropertiesNV( PhysicalDeviceCooperativeMatrixPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceCooperativeMatrixPropertiesNV( VkPhysicalDeviceCooperativeMatrixPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceCooperativeMatrixPropertiesNV( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceCooperativeMatrixPropertiesNV & operator=( PhysicalDeviceCooperativeMatrixPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceCooperativeMatrixPropertiesNV & operator=( VkPhysicalDeviceCooperativeMatrixPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceCooperativeMatrixPropertiesNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceCooperativeMatrixPropertiesNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, cooperativeMatrixSupportedStages ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceCooperativeMatrixPropertiesNV const & ) const = default; #else bool operator==( PhysicalDeviceCooperativeMatrixPropertiesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( cooperativeMatrixSupportedStages == rhs.cooperativeMatrixSupportedStages ); # endif } bool operator!=( PhysicalDeviceCooperativeMatrixPropertiesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceCooperativeMatrixPropertiesNV; void * pNext = {}; VULKAN_HPP_NAMESPACE::ShaderStageFlags cooperativeMatrixSupportedStages = {}; }; template <> struct CppType { using Type = PhysicalDeviceCooperativeMatrixPropertiesNV; }; struct PhysicalDeviceCooperativeVectorFeaturesNV { using NativeType = VkPhysicalDeviceCooperativeVectorFeaturesNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceCooperativeVectorFeaturesNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceCooperativeVectorFeaturesNV( VULKAN_HPP_NAMESPACE::Bool32 cooperativeVector_ = {}, VULKAN_HPP_NAMESPACE::Bool32 cooperativeVectorTraining_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , cooperativeVector{ cooperativeVector_ } , cooperativeVectorTraining{ cooperativeVectorTraining_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceCooperativeVectorFeaturesNV( PhysicalDeviceCooperativeVectorFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceCooperativeVectorFeaturesNV( VkPhysicalDeviceCooperativeVectorFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceCooperativeVectorFeaturesNV( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceCooperativeVectorFeaturesNV & operator=( PhysicalDeviceCooperativeVectorFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceCooperativeVectorFeaturesNV & operator=( VkPhysicalDeviceCooperativeVectorFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceCooperativeVectorFeaturesNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceCooperativeVectorFeaturesNV & setCooperativeVector( VULKAN_HPP_NAMESPACE::Bool32 cooperativeVector_ ) VULKAN_HPP_NOEXCEPT { cooperativeVector = cooperativeVector_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceCooperativeVectorFeaturesNV & setCooperativeVectorTraining( VULKAN_HPP_NAMESPACE::Bool32 cooperativeVectorTraining_ ) VULKAN_HPP_NOEXCEPT { cooperativeVectorTraining = cooperativeVectorTraining_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceCooperativeVectorFeaturesNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceCooperativeVectorFeaturesNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, cooperativeVector, cooperativeVectorTraining ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceCooperativeVectorFeaturesNV const & ) const = default; #else bool operator==( PhysicalDeviceCooperativeVectorFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( cooperativeVector == rhs.cooperativeVector ) && ( cooperativeVectorTraining == rhs.cooperativeVectorTraining ); # endif } bool operator!=( PhysicalDeviceCooperativeVectorFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceCooperativeVectorFeaturesNV; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 cooperativeVector = {}; VULKAN_HPP_NAMESPACE::Bool32 cooperativeVectorTraining = {}; }; template <> struct CppType { using Type = PhysicalDeviceCooperativeVectorFeaturesNV; }; struct PhysicalDeviceCooperativeVectorPropertiesNV { using NativeType = VkPhysicalDeviceCooperativeVectorPropertiesNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceCooperativeVectorPropertiesNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceCooperativeVectorPropertiesNV( VULKAN_HPP_NAMESPACE::ShaderStageFlags cooperativeVectorSupportedStages_ = {}, VULKAN_HPP_NAMESPACE::Bool32 cooperativeVectorTrainingFloat16Accumulation_ = {}, VULKAN_HPP_NAMESPACE::Bool32 cooperativeVectorTrainingFloat32Accumulation_ = {}, uint32_t maxCooperativeVectorComponents_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , cooperativeVectorSupportedStages{ cooperativeVectorSupportedStages_ } , cooperativeVectorTrainingFloat16Accumulation{ cooperativeVectorTrainingFloat16Accumulation_ } , cooperativeVectorTrainingFloat32Accumulation{ cooperativeVectorTrainingFloat32Accumulation_ } , maxCooperativeVectorComponents{ maxCooperativeVectorComponents_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceCooperativeVectorPropertiesNV( PhysicalDeviceCooperativeVectorPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceCooperativeVectorPropertiesNV( VkPhysicalDeviceCooperativeVectorPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceCooperativeVectorPropertiesNV( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceCooperativeVectorPropertiesNV & operator=( PhysicalDeviceCooperativeVectorPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceCooperativeVectorPropertiesNV & operator=( VkPhysicalDeviceCooperativeVectorPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceCooperativeVectorPropertiesNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceCooperativeVectorPropertiesNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, cooperativeVectorSupportedStages, cooperativeVectorTrainingFloat16Accumulation, cooperativeVectorTrainingFloat32Accumulation, maxCooperativeVectorComponents ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceCooperativeVectorPropertiesNV const & ) const = default; #else bool operator==( PhysicalDeviceCooperativeVectorPropertiesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( cooperativeVectorSupportedStages == rhs.cooperativeVectorSupportedStages ) && ( cooperativeVectorTrainingFloat16Accumulation == rhs.cooperativeVectorTrainingFloat16Accumulation ) && ( cooperativeVectorTrainingFloat32Accumulation == rhs.cooperativeVectorTrainingFloat32Accumulation ) && ( maxCooperativeVectorComponents == rhs.maxCooperativeVectorComponents ); # endif } bool operator!=( PhysicalDeviceCooperativeVectorPropertiesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceCooperativeVectorPropertiesNV; void * pNext = {}; VULKAN_HPP_NAMESPACE::ShaderStageFlags cooperativeVectorSupportedStages = {}; VULKAN_HPP_NAMESPACE::Bool32 cooperativeVectorTrainingFloat16Accumulation = {}; VULKAN_HPP_NAMESPACE::Bool32 cooperativeVectorTrainingFloat32Accumulation = {}; uint32_t maxCooperativeVectorComponents = {}; }; template <> struct CppType { using Type = PhysicalDeviceCooperativeVectorPropertiesNV; }; struct PhysicalDeviceCopyMemoryIndirectFeaturesNV { using NativeType = VkPhysicalDeviceCopyMemoryIndirectFeaturesNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceCopyMemoryIndirectFeaturesNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceCopyMemoryIndirectFeaturesNV( VULKAN_HPP_NAMESPACE::Bool32 indirectCopy_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , indirectCopy{ indirectCopy_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceCopyMemoryIndirectFeaturesNV( PhysicalDeviceCopyMemoryIndirectFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceCopyMemoryIndirectFeaturesNV( VkPhysicalDeviceCopyMemoryIndirectFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceCopyMemoryIndirectFeaturesNV( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceCopyMemoryIndirectFeaturesNV & operator=( PhysicalDeviceCopyMemoryIndirectFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceCopyMemoryIndirectFeaturesNV & operator=( VkPhysicalDeviceCopyMemoryIndirectFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceCopyMemoryIndirectFeaturesNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceCopyMemoryIndirectFeaturesNV & setIndirectCopy( VULKAN_HPP_NAMESPACE::Bool32 indirectCopy_ ) VULKAN_HPP_NOEXCEPT { indirectCopy = indirectCopy_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceCopyMemoryIndirectFeaturesNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceCopyMemoryIndirectFeaturesNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, indirectCopy ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceCopyMemoryIndirectFeaturesNV const & ) const = default; #else bool operator==( PhysicalDeviceCopyMemoryIndirectFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( indirectCopy == rhs.indirectCopy ); # endif } bool operator!=( PhysicalDeviceCopyMemoryIndirectFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceCopyMemoryIndirectFeaturesNV; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 indirectCopy = {}; }; template <> struct CppType { using Type = PhysicalDeviceCopyMemoryIndirectFeaturesNV; }; struct PhysicalDeviceCopyMemoryIndirectPropertiesNV { using NativeType = VkPhysicalDeviceCopyMemoryIndirectPropertiesNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceCopyMemoryIndirectPropertiesNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceCopyMemoryIndirectPropertiesNV( VULKAN_HPP_NAMESPACE::QueueFlags supportedQueues_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , supportedQueues{ supportedQueues_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceCopyMemoryIndirectPropertiesNV( PhysicalDeviceCopyMemoryIndirectPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceCopyMemoryIndirectPropertiesNV( VkPhysicalDeviceCopyMemoryIndirectPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceCopyMemoryIndirectPropertiesNV( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceCopyMemoryIndirectPropertiesNV & operator=( PhysicalDeviceCopyMemoryIndirectPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceCopyMemoryIndirectPropertiesNV & operator=( VkPhysicalDeviceCopyMemoryIndirectPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceCopyMemoryIndirectPropertiesNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceCopyMemoryIndirectPropertiesNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, supportedQueues ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceCopyMemoryIndirectPropertiesNV const & ) const = default; #else bool operator==( PhysicalDeviceCopyMemoryIndirectPropertiesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( supportedQueues == rhs.supportedQueues ); # endif } bool operator!=( PhysicalDeviceCopyMemoryIndirectPropertiesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceCopyMemoryIndirectPropertiesNV; void * pNext = {}; VULKAN_HPP_NAMESPACE::QueueFlags supportedQueues = {}; }; template <> struct CppType { using Type = PhysicalDeviceCopyMemoryIndirectPropertiesNV; }; struct PhysicalDeviceCornerSampledImageFeaturesNV { using NativeType = VkPhysicalDeviceCornerSampledImageFeaturesNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceCornerSampledImageFeaturesNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceCornerSampledImageFeaturesNV( VULKAN_HPP_NAMESPACE::Bool32 cornerSampledImage_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , cornerSampledImage{ cornerSampledImage_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceCornerSampledImageFeaturesNV( PhysicalDeviceCornerSampledImageFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceCornerSampledImageFeaturesNV( VkPhysicalDeviceCornerSampledImageFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceCornerSampledImageFeaturesNV( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceCornerSampledImageFeaturesNV & operator=( PhysicalDeviceCornerSampledImageFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceCornerSampledImageFeaturesNV & operator=( VkPhysicalDeviceCornerSampledImageFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceCornerSampledImageFeaturesNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceCornerSampledImageFeaturesNV & setCornerSampledImage( VULKAN_HPP_NAMESPACE::Bool32 cornerSampledImage_ ) VULKAN_HPP_NOEXCEPT { cornerSampledImage = cornerSampledImage_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceCornerSampledImageFeaturesNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceCornerSampledImageFeaturesNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, cornerSampledImage ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceCornerSampledImageFeaturesNV const & ) const = default; #else bool operator==( PhysicalDeviceCornerSampledImageFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( cornerSampledImage == rhs.cornerSampledImage ); # endif } bool operator!=( PhysicalDeviceCornerSampledImageFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceCornerSampledImageFeaturesNV; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 cornerSampledImage = {}; }; template <> struct CppType { using Type = PhysicalDeviceCornerSampledImageFeaturesNV; }; struct PhysicalDeviceCoverageReductionModeFeaturesNV { using NativeType = VkPhysicalDeviceCoverageReductionModeFeaturesNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceCoverageReductionModeFeaturesNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceCoverageReductionModeFeaturesNV( VULKAN_HPP_NAMESPACE::Bool32 coverageReductionMode_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , coverageReductionMode{ coverageReductionMode_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceCoverageReductionModeFeaturesNV( PhysicalDeviceCoverageReductionModeFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceCoverageReductionModeFeaturesNV( VkPhysicalDeviceCoverageReductionModeFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceCoverageReductionModeFeaturesNV( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceCoverageReductionModeFeaturesNV & operator=( PhysicalDeviceCoverageReductionModeFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceCoverageReductionModeFeaturesNV & operator=( VkPhysicalDeviceCoverageReductionModeFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceCoverageReductionModeFeaturesNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceCoverageReductionModeFeaturesNV & setCoverageReductionMode( VULKAN_HPP_NAMESPACE::Bool32 coverageReductionMode_ ) VULKAN_HPP_NOEXCEPT { coverageReductionMode = coverageReductionMode_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceCoverageReductionModeFeaturesNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceCoverageReductionModeFeaturesNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, coverageReductionMode ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceCoverageReductionModeFeaturesNV const & ) const = default; #else bool operator==( PhysicalDeviceCoverageReductionModeFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( coverageReductionMode == rhs.coverageReductionMode ); # endif } bool operator!=( PhysicalDeviceCoverageReductionModeFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceCoverageReductionModeFeaturesNV; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 coverageReductionMode = {}; }; template <> struct CppType { using Type = PhysicalDeviceCoverageReductionModeFeaturesNV; }; struct PhysicalDeviceCubicClampFeaturesQCOM { using NativeType = VkPhysicalDeviceCubicClampFeaturesQCOM; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceCubicClampFeaturesQCOM; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceCubicClampFeaturesQCOM( VULKAN_HPP_NAMESPACE::Bool32 cubicRangeClamp_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , cubicRangeClamp{ cubicRangeClamp_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceCubicClampFeaturesQCOM( PhysicalDeviceCubicClampFeaturesQCOM const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceCubicClampFeaturesQCOM( VkPhysicalDeviceCubicClampFeaturesQCOM const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceCubicClampFeaturesQCOM( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceCubicClampFeaturesQCOM & operator=( PhysicalDeviceCubicClampFeaturesQCOM const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceCubicClampFeaturesQCOM & operator=( VkPhysicalDeviceCubicClampFeaturesQCOM const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceCubicClampFeaturesQCOM & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceCubicClampFeaturesQCOM & setCubicRangeClamp( VULKAN_HPP_NAMESPACE::Bool32 cubicRangeClamp_ ) VULKAN_HPP_NOEXCEPT { cubicRangeClamp = cubicRangeClamp_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceCubicClampFeaturesQCOM const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceCubicClampFeaturesQCOM &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, cubicRangeClamp ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceCubicClampFeaturesQCOM const & ) const = default; #else bool operator==( PhysicalDeviceCubicClampFeaturesQCOM const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( cubicRangeClamp == rhs.cubicRangeClamp ); # endif } bool operator!=( PhysicalDeviceCubicClampFeaturesQCOM const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceCubicClampFeaturesQCOM; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 cubicRangeClamp = {}; }; template <> struct CppType { using Type = PhysicalDeviceCubicClampFeaturesQCOM; }; struct PhysicalDeviceCubicWeightsFeaturesQCOM { using NativeType = VkPhysicalDeviceCubicWeightsFeaturesQCOM; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceCubicWeightsFeaturesQCOM; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceCubicWeightsFeaturesQCOM( VULKAN_HPP_NAMESPACE::Bool32 selectableCubicWeights_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , selectableCubicWeights{ selectableCubicWeights_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceCubicWeightsFeaturesQCOM( PhysicalDeviceCubicWeightsFeaturesQCOM const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceCubicWeightsFeaturesQCOM( VkPhysicalDeviceCubicWeightsFeaturesQCOM const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceCubicWeightsFeaturesQCOM( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceCubicWeightsFeaturesQCOM & operator=( PhysicalDeviceCubicWeightsFeaturesQCOM const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceCubicWeightsFeaturesQCOM & operator=( VkPhysicalDeviceCubicWeightsFeaturesQCOM const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceCubicWeightsFeaturesQCOM & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceCubicWeightsFeaturesQCOM & setSelectableCubicWeights( VULKAN_HPP_NAMESPACE::Bool32 selectableCubicWeights_ ) VULKAN_HPP_NOEXCEPT { selectableCubicWeights = selectableCubicWeights_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceCubicWeightsFeaturesQCOM const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceCubicWeightsFeaturesQCOM &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, selectableCubicWeights ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceCubicWeightsFeaturesQCOM const & ) const = default; #else bool operator==( PhysicalDeviceCubicWeightsFeaturesQCOM const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( selectableCubicWeights == rhs.selectableCubicWeights ); # endif } bool operator!=( PhysicalDeviceCubicWeightsFeaturesQCOM const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceCubicWeightsFeaturesQCOM; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 selectableCubicWeights = {}; }; template <> struct CppType { using Type = PhysicalDeviceCubicWeightsFeaturesQCOM; }; #if defined( VK_ENABLE_BETA_EXTENSIONS ) struct PhysicalDeviceCudaKernelLaunchFeaturesNV { using NativeType = VkPhysicalDeviceCudaKernelLaunchFeaturesNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceCudaKernelLaunchFeaturesNV; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceCudaKernelLaunchFeaturesNV( VULKAN_HPP_NAMESPACE::Bool32 cudaKernelLaunchFeatures_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , cudaKernelLaunchFeatures{ cudaKernelLaunchFeatures_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceCudaKernelLaunchFeaturesNV( PhysicalDeviceCudaKernelLaunchFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceCudaKernelLaunchFeaturesNV( VkPhysicalDeviceCudaKernelLaunchFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceCudaKernelLaunchFeaturesNV( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceCudaKernelLaunchFeaturesNV & operator=( PhysicalDeviceCudaKernelLaunchFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceCudaKernelLaunchFeaturesNV & operator=( VkPhysicalDeviceCudaKernelLaunchFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } # if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceCudaKernelLaunchFeaturesNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceCudaKernelLaunchFeaturesNV & setCudaKernelLaunchFeatures( VULKAN_HPP_NAMESPACE::Bool32 cudaKernelLaunchFeatures_ ) VULKAN_HPP_NOEXCEPT { cudaKernelLaunchFeatures = cudaKernelLaunchFeatures_; return *this; } # endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceCudaKernelLaunchFeaturesNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceCudaKernelLaunchFeaturesNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, cudaKernelLaunchFeatures ); } # endif # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceCudaKernelLaunchFeaturesNV const & ) const = default; # else bool operator==( PhysicalDeviceCudaKernelLaunchFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( cudaKernelLaunchFeatures == rhs.cudaKernelLaunchFeatures ); # endif } bool operator!=( PhysicalDeviceCudaKernelLaunchFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } # endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceCudaKernelLaunchFeaturesNV; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 cudaKernelLaunchFeatures = {}; }; template <> struct CppType { using Type = PhysicalDeviceCudaKernelLaunchFeaturesNV; }; #endif /*VK_ENABLE_BETA_EXTENSIONS*/ #if defined( VK_ENABLE_BETA_EXTENSIONS ) struct PhysicalDeviceCudaKernelLaunchPropertiesNV { using NativeType = VkPhysicalDeviceCudaKernelLaunchPropertiesNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceCudaKernelLaunchPropertiesNV; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceCudaKernelLaunchPropertiesNV( uint32_t computeCapabilityMinor_ = {}, uint32_t computeCapabilityMajor_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , computeCapabilityMinor{ computeCapabilityMinor_ } , computeCapabilityMajor{ computeCapabilityMajor_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceCudaKernelLaunchPropertiesNV( PhysicalDeviceCudaKernelLaunchPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceCudaKernelLaunchPropertiesNV( VkPhysicalDeviceCudaKernelLaunchPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceCudaKernelLaunchPropertiesNV( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceCudaKernelLaunchPropertiesNV & operator=( PhysicalDeviceCudaKernelLaunchPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceCudaKernelLaunchPropertiesNV & operator=( VkPhysicalDeviceCudaKernelLaunchPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceCudaKernelLaunchPropertiesNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceCudaKernelLaunchPropertiesNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, computeCapabilityMinor, computeCapabilityMajor ); } # endif # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceCudaKernelLaunchPropertiesNV const & ) const = default; # else bool operator==( PhysicalDeviceCudaKernelLaunchPropertiesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( computeCapabilityMinor == rhs.computeCapabilityMinor ) && ( computeCapabilityMajor == rhs.computeCapabilityMajor ); # endif } bool operator!=( PhysicalDeviceCudaKernelLaunchPropertiesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } # endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceCudaKernelLaunchPropertiesNV; void * pNext = {}; uint32_t computeCapabilityMinor = {}; uint32_t computeCapabilityMajor = {}; }; template <> struct CppType { using Type = PhysicalDeviceCudaKernelLaunchPropertiesNV; }; #endif /*VK_ENABLE_BETA_EXTENSIONS*/ struct PhysicalDeviceCustomBorderColorFeaturesEXT { using NativeType = VkPhysicalDeviceCustomBorderColorFeaturesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceCustomBorderColorFeaturesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceCustomBorderColorFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 customBorderColors_ = {}, VULKAN_HPP_NAMESPACE::Bool32 customBorderColorWithoutFormat_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , customBorderColors{ customBorderColors_ } , customBorderColorWithoutFormat{ customBorderColorWithoutFormat_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceCustomBorderColorFeaturesEXT( PhysicalDeviceCustomBorderColorFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceCustomBorderColorFeaturesEXT( VkPhysicalDeviceCustomBorderColorFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceCustomBorderColorFeaturesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceCustomBorderColorFeaturesEXT & operator=( PhysicalDeviceCustomBorderColorFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceCustomBorderColorFeaturesEXT & operator=( VkPhysicalDeviceCustomBorderColorFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceCustomBorderColorFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceCustomBorderColorFeaturesEXT & setCustomBorderColors( VULKAN_HPP_NAMESPACE::Bool32 customBorderColors_ ) VULKAN_HPP_NOEXCEPT { customBorderColors = customBorderColors_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceCustomBorderColorFeaturesEXT & setCustomBorderColorWithoutFormat( VULKAN_HPP_NAMESPACE::Bool32 customBorderColorWithoutFormat_ ) VULKAN_HPP_NOEXCEPT { customBorderColorWithoutFormat = customBorderColorWithoutFormat_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceCustomBorderColorFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceCustomBorderColorFeaturesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, customBorderColors, customBorderColorWithoutFormat ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceCustomBorderColorFeaturesEXT const & ) const = default; #else bool operator==( PhysicalDeviceCustomBorderColorFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( customBorderColors == rhs.customBorderColors ) && ( customBorderColorWithoutFormat == rhs.customBorderColorWithoutFormat ); # endif } bool operator!=( PhysicalDeviceCustomBorderColorFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceCustomBorderColorFeaturesEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 customBorderColors = {}; VULKAN_HPP_NAMESPACE::Bool32 customBorderColorWithoutFormat = {}; }; template <> struct CppType { using Type = PhysicalDeviceCustomBorderColorFeaturesEXT; }; struct PhysicalDeviceCustomBorderColorPropertiesEXT { using NativeType = VkPhysicalDeviceCustomBorderColorPropertiesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceCustomBorderColorPropertiesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceCustomBorderColorPropertiesEXT( uint32_t maxCustomBorderColorSamplers_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , maxCustomBorderColorSamplers{ maxCustomBorderColorSamplers_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceCustomBorderColorPropertiesEXT( PhysicalDeviceCustomBorderColorPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceCustomBorderColorPropertiesEXT( VkPhysicalDeviceCustomBorderColorPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceCustomBorderColorPropertiesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceCustomBorderColorPropertiesEXT & operator=( PhysicalDeviceCustomBorderColorPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceCustomBorderColorPropertiesEXT & operator=( VkPhysicalDeviceCustomBorderColorPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceCustomBorderColorPropertiesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceCustomBorderColorPropertiesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, maxCustomBorderColorSamplers ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceCustomBorderColorPropertiesEXT const & ) const = default; #else bool operator==( PhysicalDeviceCustomBorderColorPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( maxCustomBorderColorSamplers == rhs.maxCustomBorderColorSamplers ); # endif } bool operator!=( PhysicalDeviceCustomBorderColorPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceCustomBorderColorPropertiesEXT; void * pNext = {}; uint32_t maxCustomBorderColorSamplers = {}; }; template <> struct CppType { using Type = PhysicalDeviceCustomBorderColorPropertiesEXT; }; struct PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV { using NativeType = VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV( VULKAN_HPP_NAMESPACE::Bool32 dedicatedAllocationImageAliasing_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , dedicatedAllocationImageAliasing{ dedicatedAllocationImageAliasing_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV( PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV( VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV & operator=( PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV & operator=( VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV & setDedicatedAllocationImageAliasing( VULKAN_HPP_NAMESPACE::Bool32 dedicatedAllocationImageAliasing_ ) VULKAN_HPP_NOEXCEPT { dedicatedAllocationImageAliasing = dedicatedAllocationImageAliasing_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, dedicatedAllocationImageAliasing ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV const & ) const = default; #else bool operator==( PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( dedicatedAllocationImageAliasing == rhs.dedicatedAllocationImageAliasing ); # endif } bool operator!=( PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 dedicatedAllocationImageAliasing = {}; }; template <> struct CppType { using Type = PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV; }; struct PhysicalDeviceDepthBiasControlFeaturesEXT { using NativeType = VkPhysicalDeviceDepthBiasControlFeaturesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceDepthBiasControlFeaturesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceDepthBiasControlFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 depthBiasControl_ = {}, VULKAN_HPP_NAMESPACE::Bool32 leastRepresentableValueForceUnormRepresentation_ = {}, VULKAN_HPP_NAMESPACE::Bool32 floatRepresentation_ = {}, VULKAN_HPP_NAMESPACE::Bool32 depthBiasExact_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , depthBiasControl{ depthBiasControl_ } , leastRepresentableValueForceUnormRepresentation{ leastRepresentableValueForceUnormRepresentation_ } , floatRepresentation{ floatRepresentation_ } , depthBiasExact{ depthBiasExact_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceDepthBiasControlFeaturesEXT( PhysicalDeviceDepthBiasControlFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceDepthBiasControlFeaturesEXT( VkPhysicalDeviceDepthBiasControlFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceDepthBiasControlFeaturesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceDepthBiasControlFeaturesEXT & operator=( PhysicalDeviceDepthBiasControlFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceDepthBiasControlFeaturesEXT & operator=( VkPhysicalDeviceDepthBiasControlFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDepthBiasControlFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDepthBiasControlFeaturesEXT & setDepthBiasControl( VULKAN_HPP_NAMESPACE::Bool32 depthBiasControl_ ) VULKAN_HPP_NOEXCEPT { depthBiasControl = depthBiasControl_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDepthBiasControlFeaturesEXT & setLeastRepresentableValueForceUnormRepresentation( VULKAN_HPP_NAMESPACE::Bool32 leastRepresentableValueForceUnormRepresentation_ ) VULKAN_HPP_NOEXCEPT { leastRepresentableValueForceUnormRepresentation = leastRepresentableValueForceUnormRepresentation_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDepthBiasControlFeaturesEXT & setFloatRepresentation( VULKAN_HPP_NAMESPACE::Bool32 floatRepresentation_ ) VULKAN_HPP_NOEXCEPT { floatRepresentation = floatRepresentation_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDepthBiasControlFeaturesEXT & setDepthBiasExact( VULKAN_HPP_NAMESPACE::Bool32 depthBiasExact_ ) VULKAN_HPP_NOEXCEPT { depthBiasExact = depthBiasExact_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceDepthBiasControlFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceDepthBiasControlFeaturesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, depthBiasControl, leastRepresentableValueForceUnormRepresentation, floatRepresentation, depthBiasExact ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceDepthBiasControlFeaturesEXT const & ) const = default; #else bool operator==( PhysicalDeviceDepthBiasControlFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( depthBiasControl == rhs.depthBiasControl ) && ( leastRepresentableValueForceUnormRepresentation == rhs.leastRepresentableValueForceUnormRepresentation ) && ( floatRepresentation == rhs.floatRepresentation ) && ( depthBiasExact == rhs.depthBiasExact ); # endif } bool operator!=( PhysicalDeviceDepthBiasControlFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceDepthBiasControlFeaturesEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 depthBiasControl = {}; VULKAN_HPP_NAMESPACE::Bool32 leastRepresentableValueForceUnormRepresentation = {}; VULKAN_HPP_NAMESPACE::Bool32 floatRepresentation = {}; VULKAN_HPP_NAMESPACE::Bool32 depthBiasExact = {}; }; template <> struct CppType { using Type = PhysicalDeviceDepthBiasControlFeaturesEXT; }; struct PhysicalDeviceDepthClampControlFeaturesEXT { using NativeType = VkPhysicalDeviceDepthClampControlFeaturesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceDepthClampControlFeaturesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceDepthClampControlFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 depthClampControl_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , depthClampControl{ depthClampControl_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceDepthClampControlFeaturesEXT( PhysicalDeviceDepthClampControlFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceDepthClampControlFeaturesEXT( VkPhysicalDeviceDepthClampControlFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceDepthClampControlFeaturesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceDepthClampControlFeaturesEXT & operator=( PhysicalDeviceDepthClampControlFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceDepthClampControlFeaturesEXT & operator=( VkPhysicalDeviceDepthClampControlFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDepthClampControlFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDepthClampControlFeaturesEXT & setDepthClampControl( VULKAN_HPP_NAMESPACE::Bool32 depthClampControl_ ) VULKAN_HPP_NOEXCEPT { depthClampControl = depthClampControl_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceDepthClampControlFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceDepthClampControlFeaturesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, depthClampControl ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceDepthClampControlFeaturesEXT const & ) const = default; #else bool operator==( PhysicalDeviceDepthClampControlFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( depthClampControl == rhs.depthClampControl ); # endif } bool operator!=( PhysicalDeviceDepthClampControlFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceDepthClampControlFeaturesEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 depthClampControl = {}; }; template <> struct CppType { using Type = PhysicalDeviceDepthClampControlFeaturesEXT; }; struct PhysicalDeviceDepthClampZeroOneFeaturesKHR { using NativeType = VkPhysicalDeviceDepthClampZeroOneFeaturesKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceDepthClampZeroOneFeaturesKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceDepthClampZeroOneFeaturesKHR( VULKAN_HPP_NAMESPACE::Bool32 depthClampZeroOne_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , depthClampZeroOne{ depthClampZeroOne_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceDepthClampZeroOneFeaturesKHR( PhysicalDeviceDepthClampZeroOneFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceDepthClampZeroOneFeaturesKHR( VkPhysicalDeviceDepthClampZeroOneFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceDepthClampZeroOneFeaturesKHR( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceDepthClampZeroOneFeaturesKHR & operator=( PhysicalDeviceDepthClampZeroOneFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceDepthClampZeroOneFeaturesKHR & operator=( VkPhysicalDeviceDepthClampZeroOneFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDepthClampZeroOneFeaturesKHR & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDepthClampZeroOneFeaturesKHR & setDepthClampZeroOne( VULKAN_HPP_NAMESPACE::Bool32 depthClampZeroOne_ ) VULKAN_HPP_NOEXCEPT { depthClampZeroOne = depthClampZeroOne_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceDepthClampZeroOneFeaturesKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceDepthClampZeroOneFeaturesKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, depthClampZeroOne ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceDepthClampZeroOneFeaturesKHR const & ) const = default; #else bool operator==( PhysicalDeviceDepthClampZeroOneFeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( depthClampZeroOne == rhs.depthClampZeroOne ); # endif } bool operator!=( PhysicalDeviceDepthClampZeroOneFeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceDepthClampZeroOneFeaturesKHR; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 depthClampZeroOne = {}; }; template <> struct CppType { using Type = PhysicalDeviceDepthClampZeroOneFeaturesKHR; }; using PhysicalDeviceDepthClampZeroOneFeaturesEXT = PhysicalDeviceDepthClampZeroOneFeaturesKHR; struct PhysicalDeviceDepthClipControlFeaturesEXT { using NativeType = VkPhysicalDeviceDepthClipControlFeaturesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceDepthClipControlFeaturesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceDepthClipControlFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 depthClipControl_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , depthClipControl{ depthClipControl_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceDepthClipControlFeaturesEXT( PhysicalDeviceDepthClipControlFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceDepthClipControlFeaturesEXT( VkPhysicalDeviceDepthClipControlFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceDepthClipControlFeaturesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceDepthClipControlFeaturesEXT & operator=( PhysicalDeviceDepthClipControlFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceDepthClipControlFeaturesEXT & operator=( VkPhysicalDeviceDepthClipControlFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDepthClipControlFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDepthClipControlFeaturesEXT & setDepthClipControl( VULKAN_HPP_NAMESPACE::Bool32 depthClipControl_ ) VULKAN_HPP_NOEXCEPT { depthClipControl = depthClipControl_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceDepthClipControlFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceDepthClipControlFeaturesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, depthClipControl ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceDepthClipControlFeaturesEXT const & ) const = default; #else bool operator==( PhysicalDeviceDepthClipControlFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( depthClipControl == rhs.depthClipControl ); # endif } bool operator!=( PhysicalDeviceDepthClipControlFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceDepthClipControlFeaturesEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 depthClipControl = {}; }; template <> struct CppType { using Type = PhysicalDeviceDepthClipControlFeaturesEXT; }; struct PhysicalDeviceDepthClipEnableFeaturesEXT { using NativeType = VkPhysicalDeviceDepthClipEnableFeaturesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceDepthClipEnableFeaturesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceDepthClipEnableFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 depthClipEnable_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , depthClipEnable{ depthClipEnable_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceDepthClipEnableFeaturesEXT( PhysicalDeviceDepthClipEnableFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceDepthClipEnableFeaturesEXT( VkPhysicalDeviceDepthClipEnableFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceDepthClipEnableFeaturesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceDepthClipEnableFeaturesEXT & operator=( PhysicalDeviceDepthClipEnableFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceDepthClipEnableFeaturesEXT & operator=( VkPhysicalDeviceDepthClipEnableFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDepthClipEnableFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDepthClipEnableFeaturesEXT & setDepthClipEnable( VULKAN_HPP_NAMESPACE::Bool32 depthClipEnable_ ) VULKAN_HPP_NOEXCEPT { depthClipEnable = depthClipEnable_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceDepthClipEnableFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceDepthClipEnableFeaturesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, depthClipEnable ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceDepthClipEnableFeaturesEXT const & ) const = default; #else bool operator==( PhysicalDeviceDepthClipEnableFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( depthClipEnable == rhs.depthClipEnable ); # endif } bool operator!=( PhysicalDeviceDepthClipEnableFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceDepthClipEnableFeaturesEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 depthClipEnable = {}; }; template <> struct CppType { using Type = PhysicalDeviceDepthClipEnableFeaturesEXT; }; struct PhysicalDeviceDepthStencilResolveProperties { using NativeType = VkPhysicalDeviceDepthStencilResolveProperties; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceDepthStencilResolveProperties; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceDepthStencilResolveProperties( VULKAN_HPP_NAMESPACE::ResolveModeFlags supportedDepthResolveModes_ = {}, VULKAN_HPP_NAMESPACE::ResolveModeFlags supportedStencilResolveModes_ = {}, VULKAN_HPP_NAMESPACE::Bool32 independentResolveNone_ = {}, VULKAN_HPP_NAMESPACE::Bool32 independentResolve_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , supportedDepthResolveModes{ supportedDepthResolveModes_ } , supportedStencilResolveModes{ supportedStencilResolveModes_ } , independentResolveNone{ independentResolveNone_ } , independentResolve{ independentResolve_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceDepthStencilResolveProperties( PhysicalDeviceDepthStencilResolveProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceDepthStencilResolveProperties( VkPhysicalDeviceDepthStencilResolveProperties const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceDepthStencilResolveProperties( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceDepthStencilResolveProperties & operator=( PhysicalDeviceDepthStencilResolveProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceDepthStencilResolveProperties & operator=( VkPhysicalDeviceDepthStencilResolveProperties const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceDepthStencilResolveProperties const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceDepthStencilResolveProperties &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, supportedDepthResolveModes, supportedStencilResolveModes, independentResolveNone, independentResolve ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceDepthStencilResolveProperties const & ) const = default; #else bool operator==( PhysicalDeviceDepthStencilResolveProperties const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( supportedDepthResolveModes == rhs.supportedDepthResolveModes ) && ( supportedStencilResolveModes == rhs.supportedStencilResolveModes ) && ( independentResolveNone == rhs.independentResolveNone ) && ( independentResolve == rhs.independentResolve ); # endif } bool operator!=( PhysicalDeviceDepthStencilResolveProperties const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceDepthStencilResolveProperties; void * pNext = {}; VULKAN_HPP_NAMESPACE::ResolveModeFlags supportedDepthResolveModes = {}; VULKAN_HPP_NAMESPACE::ResolveModeFlags supportedStencilResolveModes = {}; VULKAN_HPP_NAMESPACE::Bool32 independentResolveNone = {}; VULKAN_HPP_NAMESPACE::Bool32 independentResolve = {}; }; template <> struct CppType { using Type = PhysicalDeviceDepthStencilResolveProperties; }; using PhysicalDeviceDepthStencilResolvePropertiesKHR = PhysicalDeviceDepthStencilResolveProperties; struct PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT { using NativeType = VkPhysicalDeviceDescriptorBufferDensityMapPropertiesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceDescriptorBufferDensityMapPropertiesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT( size_t combinedImageSamplerDensityMapDescriptorSize_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , combinedImageSamplerDensityMapDescriptorSize{ combinedImageSamplerDensityMapDescriptorSize_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT( PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT( VkPhysicalDeviceDescriptorBufferDensityMapPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT & operator=( PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT & operator=( VkPhysicalDeviceDescriptorBufferDensityMapPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceDescriptorBufferDensityMapPropertiesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceDescriptorBufferDensityMapPropertiesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, combinedImageSamplerDensityMapDescriptorSize ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT const & ) const = default; #else bool operator==( PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( combinedImageSamplerDensityMapDescriptorSize == rhs.combinedImageSamplerDensityMapDescriptorSize ); # endif } bool operator!=( PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceDescriptorBufferDensityMapPropertiesEXT; void * pNext = {}; size_t combinedImageSamplerDensityMapDescriptorSize = {}; }; template <> struct CppType { using Type = PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT; }; struct PhysicalDeviceDescriptorBufferFeaturesEXT { using NativeType = VkPhysicalDeviceDescriptorBufferFeaturesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceDescriptorBufferFeaturesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceDescriptorBufferFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 descriptorBuffer_ = {}, VULKAN_HPP_NAMESPACE::Bool32 descriptorBufferCaptureReplay_ = {}, VULKAN_HPP_NAMESPACE::Bool32 descriptorBufferImageLayoutIgnored_ = {}, VULKAN_HPP_NAMESPACE::Bool32 descriptorBufferPushDescriptors_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , descriptorBuffer{ descriptorBuffer_ } , descriptorBufferCaptureReplay{ descriptorBufferCaptureReplay_ } , descriptorBufferImageLayoutIgnored{ descriptorBufferImageLayoutIgnored_ } , descriptorBufferPushDescriptors{ descriptorBufferPushDescriptors_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceDescriptorBufferFeaturesEXT( PhysicalDeviceDescriptorBufferFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceDescriptorBufferFeaturesEXT( VkPhysicalDeviceDescriptorBufferFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceDescriptorBufferFeaturesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceDescriptorBufferFeaturesEXT & operator=( PhysicalDeviceDescriptorBufferFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceDescriptorBufferFeaturesEXT & operator=( VkPhysicalDeviceDescriptorBufferFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDescriptorBufferFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDescriptorBufferFeaturesEXT & setDescriptorBuffer( VULKAN_HPP_NAMESPACE::Bool32 descriptorBuffer_ ) VULKAN_HPP_NOEXCEPT { descriptorBuffer = descriptorBuffer_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDescriptorBufferFeaturesEXT & setDescriptorBufferCaptureReplay( VULKAN_HPP_NAMESPACE::Bool32 descriptorBufferCaptureReplay_ ) VULKAN_HPP_NOEXCEPT { descriptorBufferCaptureReplay = descriptorBufferCaptureReplay_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDescriptorBufferFeaturesEXT & setDescriptorBufferImageLayoutIgnored( VULKAN_HPP_NAMESPACE::Bool32 descriptorBufferImageLayoutIgnored_ ) VULKAN_HPP_NOEXCEPT { descriptorBufferImageLayoutIgnored = descriptorBufferImageLayoutIgnored_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDescriptorBufferFeaturesEXT & setDescriptorBufferPushDescriptors( VULKAN_HPP_NAMESPACE::Bool32 descriptorBufferPushDescriptors_ ) VULKAN_HPP_NOEXCEPT { descriptorBufferPushDescriptors = descriptorBufferPushDescriptors_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceDescriptorBufferFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceDescriptorBufferFeaturesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, descriptorBuffer, descriptorBufferCaptureReplay, descriptorBufferImageLayoutIgnored, descriptorBufferPushDescriptors ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceDescriptorBufferFeaturesEXT const & ) const = default; #else bool operator==( PhysicalDeviceDescriptorBufferFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( descriptorBuffer == rhs.descriptorBuffer ) && ( descriptorBufferCaptureReplay == rhs.descriptorBufferCaptureReplay ) && ( descriptorBufferImageLayoutIgnored == rhs.descriptorBufferImageLayoutIgnored ) && ( descriptorBufferPushDescriptors == rhs.descriptorBufferPushDescriptors ); # endif } bool operator!=( PhysicalDeviceDescriptorBufferFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceDescriptorBufferFeaturesEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 descriptorBuffer = {}; VULKAN_HPP_NAMESPACE::Bool32 descriptorBufferCaptureReplay = {}; VULKAN_HPP_NAMESPACE::Bool32 descriptorBufferImageLayoutIgnored = {}; VULKAN_HPP_NAMESPACE::Bool32 descriptorBufferPushDescriptors = {}; }; template <> struct CppType { using Type = PhysicalDeviceDescriptorBufferFeaturesEXT; }; struct PhysicalDeviceDescriptorBufferPropertiesEXT { using NativeType = VkPhysicalDeviceDescriptorBufferPropertiesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceDescriptorBufferPropertiesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceDescriptorBufferPropertiesEXT( VULKAN_HPP_NAMESPACE::Bool32 combinedImageSamplerDescriptorSingleArray_ = {}, VULKAN_HPP_NAMESPACE::Bool32 bufferlessPushDescriptors_ = {}, VULKAN_HPP_NAMESPACE::Bool32 allowSamplerImageViewPostSubmitCreation_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize descriptorBufferOffsetAlignment_ = {}, uint32_t maxDescriptorBufferBindings_ = {}, uint32_t maxResourceDescriptorBufferBindings_ = {}, uint32_t maxSamplerDescriptorBufferBindings_ = {}, uint32_t maxEmbeddedImmutableSamplerBindings_ = {}, uint32_t maxEmbeddedImmutableSamplers_ = {}, size_t bufferCaptureReplayDescriptorDataSize_ = {}, size_t imageCaptureReplayDescriptorDataSize_ = {}, size_t imageViewCaptureReplayDescriptorDataSize_ = {}, size_t samplerCaptureReplayDescriptorDataSize_ = {}, size_t accelerationStructureCaptureReplayDescriptorDataSize_ = {}, size_t samplerDescriptorSize_ = {}, size_t combinedImageSamplerDescriptorSize_ = {}, size_t sampledImageDescriptorSize_ = {}, size_t storageImageDescriptorSize_ = {}, size_t uniformTexelBufferDescriptorSize_ = {}, size_t robustUniformTexelBufferDescriptorSize_ = {}, size_t storageTexelBufferDescriptorSize_ = {}, size_t robustStorageTexelBufferDescriptorSize_ = {}, size_t uniformBufferDescriptorSize_ = {}, size_t robustUniformBufferDescriptorSize_ = {}, size_t storageBufferDescriptorSize_ = {}, size_t robustStorageBufferDescriptorSize_ = {}, size_t inputAttachmentDescriptorSize_ = {}, size_t accelerationStructureDescriptorSize_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize maxSamplerDescriptorBufferRange_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize maxResourceDescriptorBufferRange_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize samplerDescriptorBufferAddressSpaceSize_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize resourceDescriptorBufferAddressSpaceSize_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize descriptorBufferAddressSpaceSize_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , combinedImageSamplerDescriptorSingleArray{ combinedImageSamplerDescriptorSingleArray_ } , bufferlessPushDescriptors{ bufferlessPushDescriptors_ } , allowSamplerImageViewPostSubmitCreation{ allowSamplerImageViewPostSubmitCreation_ } , descriptorBufferOffsetAlignment{ descriptorBufferOffsetAlignment_ } , maxDescriptorBufferBindings{ maxDescriptorBufferBindings_ } , maxResourceDescriptorBufferBindings{ maxResourceDescriptorBufferBindings_ } , maxSamplerDescriptorBufferBindings{ maxSamplerDescriptorBufferBindings_ } , maxEmbeddedImmutableSamplerBindings{ maxEmbeddedImmutableSamplerBindings_ } , maxEmbeddedImmutableSamplers{ maxEmbeddedImmutableSamplers_ } , bufferCaptureReplayDescriptorDataSize{ bufferCaptureReplayDescriptorDataSize_ } , imageCaptureReplayDescriptorDataSize{ imageCaptureReplayDescriptorDataSize_ } , imageViewCaptureReplayDescriptorDataSize{ imageViewCaptureReplayDescriptorDataSize_ } , samplerCaptureReplayDescriptorDataSize{ samplerCaptureReplayDescriptorDataSize_ } , accelerationStructureCaptureReplayDescriptorDataSize{ accelerationStructureCaptureReplayDescriptorDataSize_ } , samplerDescriptorSize{ samplerDescriptorSize_ } , combinedImageSamplerDescriptorSize{ combinedImageSamplerDescriptorSize_ } , sampledImageDescriptorSize{ sampledImageDescriptorSize_ } , storageImageDescriptorSize{ storageImageDescriptorSize_ } , uniformTexelBufferDescriptorSize{ uniformTexelBufferDescriptorSize_ } , robustUniformTexelBufferDescriptorSize{ robustUniformTexelBufferDescriptorSize_ } , storageTexelBufferDescriptorSize{ storageTexelBufferDescriptorSize_ } , robustStorageTexelBufferDescriptorSize{ robustStorageTexelBufferDescriptorSize_ } , uniformBufferDescriptorSize{ uniformBufferDescriptorSize_ } , robustUniformBufferDescriptorSize{ robustUniformBufferDescriptorSize_ } , storageBufferDescriptorSize{ storageBufferDescriptorSize_ } , robustStorageBufferDescriptorSize{ robustStorageBufferDescriptorSize_ } , inputAttachmentDescriptorSize{ inputAttachmentDescriptorSize_ } , accelerationStructureDescriptorSize{ accelerationStructureDescriptorSize_ } , maxSamplerDescriptorBufferRange{ maxSamplerDescriptorBufferRange_ } , maxResourceDescriptorBufferRange{ maxResourceDescriptorBufferRange_ } , samplerDescriptorBufferAddressSpaceSize{ samplerDescriptorBufferAddressSpaceSize_ } , resourceDescriptorBufferAddressSpaceSize{ resourceDescriptorBufferAddressSpaceSize_ } , descriptorBufferAddressSpaceSize{ descriptorBufferAddressSpaceSize_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceDescriptorBufferPropertiesEXT( PhysicalDeviceDescriptorBufferPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceDescriptorBufferPropertiesEXT( VkPhysicalDeviceDescriptorBufferPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceDescriptorBufferPropertiesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceDescriptorBufferPropertiesEXT & operator=( PhysicalDeviceDescriptorBufferPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceDescriptorBufferPropertiesEXT & operator=( VkPhysicalDeviceDescriptorBufferPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceDescriptorBufferPropertiesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceDescriptorBufferPropertiesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, combinedImageSamplerDescriptorSingleArray, bufferlessPushDescriptors, allowSamplerImageViewPostSubmitCreation, descriptorBufferOffsetAlignment, maxDescriptorBufferBindings, maxResourceDescriptorBufferBindings, maxSamplerDescriptorBufferBindings, maxEmbeddedImmutableSamplerBindings, maxEmbeddedImmutableSamplers, bufferCaptureReplayDescriptorDataSize, imageCaptureReplayDescriptorDataSize, imageViewCaptureReplayDescriptorDataSize, samplerCaptureReplayDescriptorDataSize, accelerationStructureCaptureReplayDescriptorDataSize, samplerDescriptorSize, combinedImageSamplerDescriptorSize, sampledImageDescriptorSize, storageImageDescriptorSize, uniformTexelBufferDescriptorSize, robustUniformTexelBufferDescriptorSize, storageTexelBufferDescriptorSize, robustStorageTexelBufferDescriptorSize, uniformBufferDescriptorSize, robustUniformBufferDescriptorSize, storageBufferDescriptorSize, robustStorageBufferDescriptorSize, inputAttachmentDescriptorSize, accelerationStructureDescriptorSize, maxSamplerDescriptorBufferRange, maxResourceDescriptorBufferRange, samplerDescriptorBufferAddressSpaceSize, resourceDescriptorBufferAddressSpaceSize, descriptorBufferAddressSpaceSize ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceDescriptorBufferPropertiesEXT const & ) const = default; #else bool operator==( PhysicalDeviceDescriptorBufferPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( combinedImageSamplerDescriptorSingleArray == rhs.combinedImageSamplerDescriptorSingleArray ) && ( bufferlessPushDescriptors == rhs.bufferlessPushDescriptors ) && ( allowSamplerImageViewPostSubmitCreation == rhs.allowSamplerImageViewPostSubmitCreation ) && ( descriptorBufferOffsetAlignment == rhs.descriptorBufferOffsetAlignment ) && ( maxDescriptorBufferBindings == rhs.maxDescriptorBufferBindings ) && ( maxResourceDescriptorBufferBindings == rhs.maxResourceDescriptorBufferBindings ) && ( maxSamplerDescriptorBufferBindings == rhs.maxSamplerDescriptorBufferBindings ) && ( maxEmbeddedImmutableSamplerBindings == rhs.maxEmbeddedImmutableSamplerBindings ) && ( maxEmbeddedImmutableSamplers == rhs.maxEmbeddedImmutableSamplers ) && ( bufferCaptureReplayDescriptorDataSize == rhs.bufferCaptureReplayDescriptorDataSize ) && ( imageCaptureReplayDescriptorDataSize == rhs.imageCaptureReplayDescriptorDataSize ) && ( imageViewCaptureReplayDescriptorDataSize == rhs.imageViewCaptureReplayDescriptorDataSize ) && ( samplerCaptureReplayDescriptorDataSize == rhs.samplerCaptureReplayDescriptorDataSize ) && ( accelerationStructureCaptureReplayDescriptorDataSize == rhs.accelerationStructureCaptureReplayDescriptorDataSize ) && ( samplerDescriptorSize == rhs.samplerDescriptorSize ) && ( combinedImageSamplerDescriptorSize == rhs.combinedImageSamplerDescriptorSize ) && ( sampledImageDescriptorSize == rhs.sampledImageDescriptorSize ) && ( storageImageDescriptorSize == rhs.storageImageDescriptorSize ) && ( uniformTexelBufferDescriptorSize == rhs.uniformTexelBufferDescriptorSize ) && ( robustUniformTexelBufferDescriptorSize == rhs.robustUniformTexelBufferDescriptorSize ) && ( storageTexelBufferDescriptorSize == rhs.storageTexelBufferDescriptorSize ) && ( robustStorageTexelBufferDescriptorSize == rhs.robustStorageTexelBufferDescriptorSize ) && ( uniformBufferDescriptorSize == rhs.uniformBufferDescriptorSize ) && ( robustUniformBufferDescriptorSize == rhs.robustUniformBufferDescriptorSize ) && ( storageBufferDescriptorSize == rhs.storageBufferDescriptorSize ) && ( robustStorageBufferDescriptorSize == rhs.robustStorageBufferDescriptorSize ) && ( inputAttachmentDescriptorSize == rhs.inputAttachmentDescriptorSize ) && ( accelerationStructureDescriptorSize == rhs.accelerationStructureDescriptorSize ) && ( maxSamplerDescriptorBufferRange == rhs.maxSamplerDescriptorBufferRange ) && ( maxResourceDescriptorBufferRange == rhs.maxResourceDescriptorBufferRange ) && ( samplerDescriptorBufferAddressSpaceSize == rhs.samplerDescriptorBufferAddressSpaceSize ) && ( resourceDescriptorBufferAddressSpaceSize == rhs.resourceDescriptorBufferAddressSpaceSize ) && ( descriptorBufferAddressSpaceSize == rhs.descriptorBufferAddressSpaceSize ); # endif } bool operator!=( PhysicalDeviceDescriptorBufferPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceDescriptorBufferPropertiesEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 combinedImageSamplerDescriptorSingleArray = {}; VULKAN_HPP_NAMESPACE::Bool32 bufferlessPushDescriptors = {}; VULKAN_HPP_NAMESPACE::Bool32 allowSamplerImageViewPostSubmitCreation = {}; VULKAN_HPP_NAMESPACE::DeviceSize descriptorBufferOffsetAlignment = {}; uint32_t maxDescriptorBufferBindings = {}; uint32_t maxResourceDescriptorBufferBindings = {}; uint32_t maxSamplerDescriptorBufferBindings = {}; uint32_t maxEmbeddedImmutableSamplerBindings = {}; uint32_t maxEmbeddedImmutableSamplers = {}; size_t bufferCaptureReplayDescriptorDataSize = {}; size_t imageCaptureReplayDescriptorDataSize = {}; size_t imageViewCaptureReplayDescriptorDataSize = {}; size_t samplerCaptureReplayDescriptorDataSize = {}; size_t accelerationStructureCaptureReplayDescriptorDataSize = {}; size_t samplerDescriptorSize = {}; size_t combinedImageSamplerDescriptorSize = {}; size_t sampledImageDescriptorSize = {}; size_t storageImageDescriptorSize = {}; size_t uniformTexelBufferDescriptorSize = {}; size_t robustUniformTexelBufferDescriptorSize = {}; size_t storageTexelBufferDescriptorSize = {}; size_t robustStorageTexelBufferDescriptorSize = {}; size_t uniformBufferDescriptorSize = {}; size_t robustUniformBufferDescriptorSize = {}; size_t storageBufferDescriptorSize = {}; size_t robustStorageBufferDescriptorSize = {}; size_t inputAttachmentDescriptorSize = {}; size_t accelerationStructureDescriptorSize = {}; VULKAN_HPP_NAMESPACE::DeviceSize maxSamplerDescriptorBufferRange = {}; VULKAN_HPP_NAMESPACE::DeviceSize maxResourceDescriptorBufferRange = {}; VULKAN_HPP_NAMESPACE::DeviceSize samplerDescriptorBufferAddressSpaceSize = {}; VULKAN_HPP_NAMESPACE::DeviceSize resourceDescriptorBufferAddressSpaceSize = {}; VULKAN_HPP_NAMESPACE::DeviceSize descriptorBufferAddressSpaceSize = {}; }; template <> struct CppType { using Type = PhysicalDeviceDescriptorBufferPropertiesEXT; }; struct PhysicalDeviceDescriptorIndexingFeatures { using NativeType = VkPhysicalDeviceDescriptorIndexingFeatures; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceDescriptorIndexingFeatures; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceDescriptorIndexingFeatures( VULKAN_HPP_NAMESPACE::Bool32 shaderInputAttachmentArrayDynamicIndexing_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderUniformTexelBufferArrayDynamicIndexing_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderStorageTexelBufferArrayDynamicIndexing_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderUniformBufferArrayNonUniformIndexing_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderSampledImageArrayNonUniformIndexing_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderStorageBufferArrayNonUniformIndexing_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderStorageImageArrayNonUniformIndexing_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderInputAttachmentArrayNonUniformIndexing_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderUniformTexelBufferArrayNonUniformIndexing_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderStorageTexelBufferArrayNonUniformIndexing_ = {}, VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingUniformBufferUpdateAfterBind_ = {}, VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingSampledImageUpdateAfterBind_ = {}, VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingStorageImageUpdateAfterBind_ = {}, VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingStorageBufferUpdateAfterBind_ = {}, VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingUniformTexelBufferUpdateAfterBind_ = {}, VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingStorageTexelBufferUpdateAfterBind_ = {}, VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingUpdateUnusedWhilePending_ = {}, VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingPartiallyBound_ = {}, VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingVariableDescriptorCount_ = {}, VULKAN_HPP_NAMESPACE::Bool32 runtimeDescriptorArray_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , shaderInputAttachmentArrayDynamicIndexing{ shaderInputAttachmentArrayDynamicIndexing_ } , shaderUniformTexelBufferArrayDynamicIndexing{ shaderUniformTexelBufferArrayDynamicIndexing_ } , shaderStorageTexelBufferArrayDynamicIndexing{ shaderStorageTexelBufferArrayDynamicIndexing_ } , shaderUniformBufferArrayNonUniformIndexing{ shaderUniformBufferArrayNonUniformIndexing_ } , shaderSampledImageArrayNonUniformIndexing{ shaderSampledImageArrayNonUniformIndexing_ } , shaderStorageBufferArrayNonUniformIndexing{ shaderStorageBufferArrayNonUniformIndexing_ } , shaderStorageImageArrayNonUniformIndexing{ shaderStorageImageArrayNonUniformIndexing_ } , shaderInputAttachmentArrayNonUniformIndexing{ shaderInputAttachmentArrayNonUniformIndexing_ } , shaderUniformTexelBufferArrayNonUniformIndexing{ shaderUniformTexelBufferArrayNonUniformIndexing_ } , shaderStorageTexelBufferArrayNonUniformIndexing{ shaderStorageTexelBufferArrayNonUniformIndexing_ } , descriptorBindingUniformBufferUpdateAfterBind{ descriptorBindingUniformBufferUpdateAfterBind_ } , descriptorBindingSampledImageUpdateAfterBind{ descriptorBindingSampledImageUpdateAfterBind_ } , descriptorBindingStorageImageUpdateAfterBind{ descriptorBindingStorageImageUpdateAfterBind_ } , descriptorBindingStorageBufferUpdateAfterBind{ descriptorBindingStorageBufferUpdateAfterBind_ } , descriptorBindingUniformTexelBufferUpdateAfterBind{ descriptorBindingUniformTexelBufferUpdateAfterBind_ } , descriptorBindingStorageTexelBufferUpdateAfterBind{ descriptorBindingStorageTexelBufferUpdateAfterBind_ } , descriptorBindingUpdateUnusedWhilePending{ descriptorBindingUpdateUnusedWhilePending_ } , descriptorBindingPartiallyBound{ descriptorBindingPartiallyBound_ } , descriptorBindingVariableDescriptorCount{ descriptorBindingVariableDescriptorCount_ } , runtimeDescriptorArray{ runtimeDescriptorArray_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceDescriptorIndexingFeatures( PhysicalDeviceDescriptorIndexingFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceDescriptorIndexingFeatures( VkPhysicalDeviceDescriptorIndexingFeatures const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceDescriptorIndexingFeatures( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceDescriptorIndexingFeatures & operator=( PhysicalDeviceDescriptorIndexingFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceDescriptorIndexingFeatures & operator=( VkPhysicalDeviceDescriptorIndexingFeatures const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDescriptorIndexingFeatures & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDescriptorIndexingFeatures & setShaderInputAttachmentArrayDynamicIndexing( VULKAN_HPP_NAMESPACE::Bool32 shaderInputAttachmentArrayDynamicIndexing_ ) VULKAN_HPP_NOEXCEPT { shaderInputAttachmentArrayDynamicIndexing = shaderInputAttachmentArrayDynamicIndexing_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDescriptorIndexingFeatures & setShaderUniformTexelBufferArrayDynamicIndexing( VULKAN_HPP_NAMESPACE::Bool32 shaderUniformTexelBufferArrayDynamicIndexing_ ) VULKAN_HPP_NOEXCEPT { shaderUniformTexelBufferArrayDynamicIndexing = shaderUniformTexelBufferArrayDynamicIndexing_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDescriptorIndexingFeatures & setShaderStorageTexelBufferArrayDynamicIndexing( VULKAN_HPP_NAMESPACE::Bool32 shaderStorageTexelBufferArrayDynamicIndexing_ ) VULKAN_HPP_NOEXCEPT { shaderStorageTexelBufferArrayDynamicIndexing = shaderStorageTexelBufferArrayDynamicIndexing_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDescriptorIndexingFeatures & setShaderUniformBufferArrayNonUniformIndexing( VULKAN_HPP_NAMESPACE::Bool32 shaderUniformBufferArrayNonUniformIndexing_ ) VULKAN_HPP_NOEXCEPT { shaderUniformBufferArrayNonUniformIndexing = shaderUniformBufferArrayNonUniformIndexing_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDescriptorIndexingFeatures & setShaderSampledImageArrayNonUniformIndexing( VULKAN_HPP_NAMESPACE::Bool32 shaderSampledImageArrayNonUniformIndexing_ ) VULKAN_HPP_NOEXCEPT { shaderSampledImageArrayNonUniformIndexing = shaderSampledImageArrayNonUniformIndexing_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDescriptorIndexingFeatures & setShaderStorageBufferArrayNonUniformIndexing( VULKAN_HPP_NAMESPACE::Bool32 shaderStorageBufferArrayNonUniformIndexing_ ) VULKAN_HPP_NOEXCEPT { shaderStorageBufferArrayNonUniformIndexing = shaderStorageBufferArrayNonUniformIndexing_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDescriptorIndexingFeatures & setShaderStorageImageArrayNonUniformIndexing( VULKAN_HPP_NAMESPACE::Bool32 shaderStorageImageArrayNonUniformIndexing_ ) VULKAN_HPP_NOEXCEPT { shaderStorageImageArrayNonUniformIndexing = shaderStorageImageArrayNonUniformIndexing_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDescriptorIndexingFeatures & setShaderInputAttachmentArrayNonUniformIndexing( VULKAN_HPP_NAMESPACE::Bool32 shaderInputAttachmentArrayNonUniformIndexing_ ) VULKAN_HPP_NOEXCEPT { shaderInputAttachmentArrayNonUniformIndexing = shaderInputAttachmentArrayNonUniformIndexing_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDescriptorIndexingFeatures & setShaderUniformTexelBufferArrayNonUniformIndexing( VULKAN_HPP_NAMESPACE::Bool32 shaderUniformTexelBufferArrayNonUniformIndexing_ ) VULKAN_HPP_NOEXCEPT { shaderUniformTexelBufferArrayNonUniformIndexing = shaderUniformTexelBufferArrayNonUniformIndexing_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDescriptorIndexingFeatures & setShaderStorageTexelBufferArrayNonUniformIndexing( VULKAN_HPP_NAMESPACE::Bool32 shaderStorageTexelBufferArrayNonUniformIndexing_ ) VULKAN_HPP_NOEXCEPT { shaderStorageTexelBufferArrayNonUniformIndexing = shaderStorageTexelBufferArrayNonUniformIndexing_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDescriptorIndexingFeatures & setDescriptorBindingUniformBufferUpdateAfterBind( VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingUniformBufferUpdateAfterBind_ ) VULKAN_HPP_NOEXCEPT { descriptorBindingUniformBufferUpdateAfterBind = descriptorBindingUniformBufferUpdateAfterBind_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDescriptorIndexingFeatures & setDescriptorBindingSampledImageUpdateAfterBind( VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingSampledImageUpdateAfterBind_ ) VULKAN_HPP_NOEXCEPT { descriptorBindingSampledImageUpdateAfterBind = descriptorBindingSampledImageUpdateAfterBind_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDescriptorIndexingFeatures & setDescriptorBindingStorageImageUpdateAfterBind( VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingStorageImageUpdateAfterBind_ ) VULKAN_HPP_NOEXCEPT { descriptorBindingStorageImageUpdateAfterBind = descriptorBindingStorageImageUpdateAfterBind_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDescriptorIndexingFeatures & setDescriptorBindingStorageBufferUpdateAfterBind( VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingStorageBufferUpdateAfterBind_ ) VULKAN_HPP_NOEXCEPT { descriptorBindingStorageBufferUpdateAfterBind = descriptorBindingStorageBufferUpdateAfterBind_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDescriptorIndexingFeatures & setDescriptorBindingUniformTexelBufferUpdateAfterBind( VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingUniformTexelBufferUpdateAfterBind_ ) VULKAN_HPP_NOEXCEPT { descriptorBindingUniformTexelBufferUpdateAfterBind = descriptorBindingUniformTexelBufferUpdateAfterBind_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDescriptorIndexingFeatures & setDescriptorBindingStorageTexelBufferUpdateAfterBind( VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingStorageTexelBufferUpdateAfterBind_ ) VULKAN_HPP_NOEXCEPT { descriptorBindingStorageTexelBufferUpdateAfterBind = descriptorBindingStorageTexelBufferUpdateAfterBind_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDescriptorIndexingFeatures & setDescriptorBindingUpdateUnusedWhilePending( VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingUpdateUnusedWhilePending_ ) VULKAN_HPP_NOEXCEPT { descriptorBindingUpdateUnusedWhilePending = descriptorBindingUpdateUnusedWhilePending_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDescriptorIndexingFeatures & setDescriptorBindingPartiallyBound( VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingPartiallyBound_ ) VULKAN_HPP_NOEXCEPT { descriptorBindingPartiallyBound = descriptorBindingPartiallyBound_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDescriptorIndexingFeatures & setDescriptorBindingVariableDescriptorCount( VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingVariableDescriptorCount_ ) VULKAN_HPP_NOEXCEPT { descriptorBindingVariableDescriptorCount = descriptorBindingVariableDescriptorCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDescriptorIndexingFeatures & setRuntimeDescriptorArray( VULKAN_HPP_NAMESPACE::Bool32 runtimeDescriptorArray_ ) VULKAN_HPP_NOEXCEPT { runtimeDescriptorArray = runtimeDescriptorArray_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceDescriptorIndexingFeatures const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceDescriptorIndexingFeatures &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, shaderInputAttachmentArrayDynamicIndexing, shaderUniformTexelBufferArrayDynamicIndexing, shaderStorageTexelBufferArrayDynamicIndexing, shaderUniformBufferArrayNonUniformIndexing, shaderSampledImageArrayNonUniformIndexing, shaderStorageBufferArrayNonUniformIndexing, shaderStorageImageArrayNonUniformIndexing, shaderInputAttachmentArrayNonUniformIndexing, shaderUniformTexelBufferArrayNonUniformIndexing, shaderStorageTexelBufferArrayNonUniformIndexing, descriptorBindingUniformBufferUpdateAfterBind, descriptorBindingSampledImageUpdateAfterBind, descriptorBindingStorageImageUpdateAfterBind, descriptorBindingStorageBufferUpdateAfterBind, descriptorBindingUniformTexelBufferUpdateAfterBind, descriptorBindingStorageTexelBufferUpdateAfterBind, descriptorBindingUpdateUnusedWhilePending, descriptorBindingPartiallyBound, descriptorBindingVariableDescriptorCount, runtimeDescriptorArray ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceDescriptorIndexingFeatures const & ) const = default; #else bool operator==( PhysicalDeviceDescriptorIndexingFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( shaderInputAttachmentArrayDynamicIndexing == rhs.shaderInputAttachmentArrayDynamicIndexing ) && ( shaderUniformTexelBufferArrayDynamicIndexing == rhs.shaderUniformTexelBufferArrayDynamicIndexing ) && ( shaderStorageTexelBufferArrayDynamicIndexing == rhs.shaderStorageTexelBufferArrayDynamicIndexing ) && ( shaderUniformBufferArrayNonUniformIndexing == rhs.shaderUniformBufferArrayNonUniformIndexing ) && ( shaderSampledImageArrayNonUniformIndexing == rhs.shaderSampledImageArrayNonUniformIndexing ) && ( shaderStorageBufferArrayNonUniformIndexing == rhs.shaderStorageBufferArrayNonUniformIndexing ) && ( shaderStorageImageArrayNonUniformIndexing == rhs.shaderStorageImageArrayNonUniformIndexing ) && ( shaderInputAttachmentArrayNonUniformIndexing == rhs.shaderInputAttachmentArrayNonUniformIndexing ) && ( shaderUniformTexelBufferArrayNonUniformIndexing == rhs.shaderUniformTexelBufferArrayNonUniformIndexing ) && ( shaderStorageTexelBufferArrayNonUniformIndexing == rhs.shaderStorageTexelBufferArrayNonUniformIndexing ) && ( descriptorBindingUniformBufferUpdateAfterBind == rhs.descriptorBindingUniformBufferUpdateAfterBind ) && ( descriptorBindingSampledImageUpdateAfterBind == rhs.descriptorBindingSampledImageUpdateAfterBind ) && ( descriptorBindingStorageImageUpdateAfterBind == rhs.descriptorBindingStorageImageUpdateAfterBind ) && ( descriptorBindingStorageBufferUpdateAfterBind == rhs.descriptorBindingStorageBufferUpdateAfterBind ) && ( descriptorBindingUniformTexelBufferUpdateAfterBind == rhs.descriptorBindingUniformTexelBufferUpdateAfterBind ) && ( descriptorBindingStorageTexelBufferUpdateAfterBind == rhs.descriptorBindingStorageTexelBufferUpdateAfterBind ) && ( descriptorBindingUpdateUnusedWhilePending == rhs.descriptorBindingUpdateUnusedWhilePending ) && ( descriptorBindingPartiallyBound == rhs.descriptorBindingPartiallyBound ) && ( descriptorBindingVariableDescriptorCount == rhs.descriptorBindingVariableDescriptorCount ) && ( runtimeDescriptorArray == rhs.runtimeDescriptorArray ); # endif } bool operator!=( PhysicalDeviceDescriptorIndexingFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceDescriptorIndexingFeatures; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderInputAttachmentArrayDynamicIndexing = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderUniformTexelBufferArrayDynamicIndexing = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderStorageTexelBufferArrayDynamicIndexing = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderUniformBufferArrayNonUniformIndexing = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderSampledImageArrayNonUniformIndexing = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderStorageBufferArrayNonUniformIndexing = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderStorageImageArrayNonUniformIndexing = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderInputAttachmentArrayNonUniformIndexing = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderUniformTexelBufferArrayNonUniformIndexing = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderStorageTexelBufferArrayNonUniformIndexing = {}; VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingUniformBufferUpdateAfterBind = {}; VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingSampledImageUpdateAfterBind = {}; VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingStorageImageUpdateAfterBind = {}; VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingStorageBufferUpdateAfterBind = {}; VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingUniformTexelBufferUpdateAfterBind = {}; VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingStorageTexelBufferUpdateAfterBind = {}; VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingUpdateUnusedWhilePending = {}; VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingPartiallyBound = {}; VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingVariableDescriptorCount = {}; VULKAN_HPP_NAMESPACE::Bool32 runtimeDescriptorArray = {}; }; template <> struct CppType { using Type = PhysicalDeviceDescriptorIndexingFeatures; }; using PhysicalDeviceDescriptorIndexingFeaturesEXT = PhysicalDeviceDescriptorIndexingFeatures; struct PhysicalDeviceDescriptorIndexingProperties { using NativeType = VkPhysicalDeviceDescriptorIndexingProperties; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceDescriptorIndexingProperties; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceDescriptorIndexingProperties( uint32_t maxUpdateAfterBindDescriptorsInAllPools_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderUniformBufferArrayNonUniformIndexingNative_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderSampledImageArrayNonUniformIndexingNative_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderStorageBufferArrayNonUniformIndexingNative_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderStorageImageArrayNonUniformIndexingNative_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderInputAttachmentArrayNonUniformIndexingNative_ = {}, VULKAN_HPP_NAMESPACE::Bool32 robustBufferAccessUpdateAfterBind_ = {}, VULKAN_HPP_NAMESPACE::Bool32 quadDivergentImplicitLod_ = {}, uint32_t maxPerStageDescriptorUpdateAfterBindSamplers_ = {}, uint32_t maxPerStageDescriptorUpdateAfterBindUniformBuffers_ = {}, uint32_t maxPerStageDescriptorUpdateAfterBindStorageBuffers_ = {}, uint32_t maxPerStageDescriptorUpdateAfterBindSampledImages_ = {}, uint32_t maxPerStageDescriptorUpdateAfterBindStorageImages_ = {}, uint32_t maxPerStageDescriptorUpdateAfterBindInputAttachments_ = {}, uint32_t maxPerStageUpdateAfterBindResources_ = {}, uint32_t maxDescriptorSetUpdateAfterBindSamplers_ = {}, uint32_t maxDescriptorSetUpdateAfterBindUniformBuffers_ = {}, uint32_t maxDescriptorSetUpdateAfterBindUniformBuffersDynamic_ = {}, uint32_t maxDescriptorSetUpdateAfterBindStorageBuffers_ = {}, uint32_t maxDescriptorSetUpdateAfterBindStorageBuffersDynamic_ = {}, uint32_t maxDescriptorSetUpdateAfterBindSampledImages_ = {}, uint32_t maxDescriptorSetUpdateAfterBindStorageImages_ = {}, uint32_t maxDescriptorSetUpdateAfterBindInputAttachments_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , maxUpdateAfterBindDescriptorsInAllPools{ maxUpdateAfterBindDescriptorsInAllPools_ } , shaderUniformBufferArrayNonUniformIndexingNative{ shaderUniformBufferArrayNonUniformIndexingNative_ } , shaderSampledImageArrayNonUniformIndexingNative{ shaderSampledImageArrayNonUniformIndexingNative_ } , shaderStorageBufferArrayNonUniformIndexingNative{ shaderStorageBufferArrayNonUniformIndexingNative_ } , shaderStorageImageArrayNonUniformIndexingNative{ shaderStorageImageArrayNonUniformIndexingNative_ } , shaderInputAttachmentArrayNonUniformIndexingNative{ shaderInputAttachmentArrayNonUniformIndexingNative_ } , robustBufferAccessUpdateAfterBind{ robustBufferAccessUpdateAfterBind_ } , quadDivergentImplicitLod{ quadDivergentImplicitLod_ } , maxPerStageDescriptorUpdateAfterBindSamplers{ maxPerStageDescriptorUpdateAfterBindSamplers_ } , maxPerStageDescriptorUpdateAfterBindUniformBuffers{ maxPerStageDescriptorUpdateAfterBindUniformBuffers_ } , maxPerStageDescriptorUpdateAfterBindStorageBuffers{ maxPerStageDescriptorUpdateAfterBindStorageBuffers_ } , maxPerStageDescriptorUpdateAfterBindSampledImages{ maxPerStageDescriptorUpdateAfterBindSampledImages_ } , maxPerStageDescriptorUpdateAfterBindStorageImages{ maxPerStageDescriptorUpdateAfterBindStorageImages_ } , maxPerStageDescriptorUpdateAfterBindInputAttachments{ maxPerStageDescriptorUpdateAfterBindInputAttachments_ } , maxPerStageUpdateAfterBindResources{ maxPerStageUpdateAfterBindResources_ } , maxDescriptorSetUpdateAfterBindSamplers{ maxDescriptorSetUpdateAfterBindSamplers_ } , maxDescriptorSetUpdateAfterBindUniformBuffers{ maxDescriptorSetUpdateAfterBindUniformBuffers_ } , maxDescriptorSetUpdateAfterBindUniformBuffersDynamic{ maxDescriptorSetUpdateAfterBindUniformBuffersDynamic_ } , maxDescriptorSetUpdateAfterBindStorageBuffers{ maxDescriptorSetUpdateAfterBindStorageBuffers_ } , maxDescriptorSetUpdateAfterBindStorageBuffersDynamic{ maxDescriptorSetUpdateAfterBindStorageBuffersDynamic_ } , maxDescriptorSetUpdateAfterBindSampledImages{ maxDescriptorSetUpdateAfterBindSampledImages_ } , maxDescriptorSetUpdateAfterBindStorageImages{ maxDescriptorSetUpdateAfterBindStorageImages_ } , maxDescriptorSetUpdateAfterBindInputAttachments{ maxDescriptorSetUpdateAfterBindInputAttachments_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceDescriptorIndexingProperties( PhysicalDeviceDescriptorIndexingProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceDescriptorIndexingProperties( VkPhysicalDeviceDescriptorIndexingProperties const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceDescriptorIndexingProperties( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceDescriptorIndexingProperties & operator=( PhysicalDeviceDescriptorIndexingProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceDescriptorIndexingProperties & operator=( VkPhysicalDeviceDescriptorIndexingProperties const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceDescriptorIndexingProperties const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceDescriptorIndexingProperties &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, maxUpdateAfterBindDescriptorsInAllPools, shaderUniformBufferArrayNonUniformIndexingNative, shaderSampledImageArrayNonUniformIndexingNative, shaderStorageBufferArrayNonUniformIndexingNative, shaderStorageImageArrayNonUniformIndexingNative, shaderInputAttachmentArrayNonUniformIndexingNative, robustBufferAccessUpdateAfterBind, quadDivergentImplicitLod, maxPerStageDescriptorUpdateAfterBindSamplers, maxPerStageDescriptorUpdateAfterBindUniformBuffers, maxPerStageDescriptorUpdateAfterBindStorageBuffers, maxPerStageDescriptorUpdateAfterBindSampledImages, maxPerStageDescriptorUpdateAfterBindStorageImages, maxPerStageDescriptorUpdateAfterBindInputAttachments, maxPerStageUpdateAfterBindResources, maxDescriptorSetUpdateAfterBindSamplers, maxDescriptorSetUpdateAfterBindUniformBuffers, maxDescriptorSetUpdateAfterBindUniformBuffersDynamic, maxDescriptorSetUpdateAfterBindStorageBuffers, maxDescriptorSetUpdateAfterBindStorageBuffersDynamic, maxDescriptorSetUpdateAfterBindSampledImages, maxDescriptorSetUpdateAfterBindStorageImages, maxDescriptorSetUpdateAfterBindInputAttachments ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceDescriptorIndexingProperties const & ) const = default; #else bool operator==( PhysicalDeviceDescriptorIndexingProperties const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( maxUpdateAfterBindDescriptorsInAllPools == rhs.maxUpdateAfterBindDescriptorsInAllPools ) && ( shaderUniformBufferArrayNonUniformIndexingNative == rhs.shaderUniformBufferArrayNonUniformIndexingNative ) && ( shaderSampledImageArrayNonUniformIndexingNative == rhs.shaderSampledImageArrayNonUniformIndexingNative ) && ( shaderStorageBufferArrayNonUniformIndexingNative == rhs.shaderStorageBufferArrayNonUniformIndexingNative ) && ( shaderStorageImageArrayNonUniformIndexingNative == rhs.shaderStorageImageArrayNonUniformIndexingNative ) && ( shaderInputAttachmentArrayNonUniformIndexingNative == rhs.shaderInputAttachmentArrayNonUniformIndexingNative ) && ( robustBufferAccessUpdateAfterBind == rhs.robustBufferAccessUpdateAfterBind ) && ( quadDivergentImplicitLod == rhs.quadDivergentImplicitLod ) && ( maxPerStageDescriptorUpdateAfterBindSamplers == rhs.maxPerStageDescriptorUpdateAfterBindSamplers ) && ( maxPerStageDescriptorUpdateAfterBindUniformBuffers == rhs.maxPerStageDescriptorUpdateAfterBindUniformBuffers ) && ( maxPerStageDescriptorUpdateAfterBindStorageBuffers == rhs.maxPerStageDescriptorUpdateAfterBindStorageBuffers ) && ( maxPerStageDescriptorUpdateAfterBindSampledImages == rhs.maxPerStageDescriptorUpdateAfterBindSampledImages ) && ( maxPerStageDescriptorUpdateAfterBindStorageImages == rhs.maxPerStageDescriptorUpdateAfterBindStorageImages ) && ( maxPerStageDescriptorUpdateAfterBindInputAttachments == rhs.maxPerStageDescriptorUpdateAfterBindInputAttachments ) && ( maxPerStageUpdateAfterBindResources == rhs.maxPerStageUpdateAfterBindResources ) && ( maxDescriptorSetUpdateAfterBindSamplers == rhs.maxDescriptorSetUpdateAfterBindSamplers ) && ( maxDescriptorSetUpdateAfterBindUniformBuffers == rhs.maxDescriptorSetUpdateAfterBindUniformBuffers ) && ( maxDescriptorSetUpdateAfterBindUniformBuffersDynamic == rhs.maxDescriptorSetUpdateAfterBindUniformBuffersDynamic ) && ( maxDescriptorSetUpdateAfterBindStorageBuffers == rhs.maxDescriptorSetUpdateAfterBindStorageBuffers ) && ( maxDescriptorSetUpdateAfterBindStorageBuffersDynamic == rhs.maxDescriptorSetUpdateAfterBindStorageBuffersDynamic ) && ( maxDescriptorSetUpdateAfterBindSampledImages == rhs.maxDescriptorSetUpdateAfterBindSampledImages ) && ( maxDescriptorSetUpdateAfterBindStorageImages == rhs.maxDescriptorSetUpdateAfterBindStorageImages ) && ( maxDescriptorSetUpdateAfterBindInputAttachments == rhs.maxDescriptorSetUpdateAfterBindInputAttachments ); # endif } bool operator!=( PhysicalDeviceDescriptorIndexingProperties const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceDescriptorIndexingProperties; void * pNext = {}; uint32_t maxUpdateAfterBindDescriptorsInAllPools = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderUniformBufferArrayNonUniformIndexingNative = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderSampledImageArrayNonUniformIndexingNative = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderStorageBufferArrayNonUniformIndexingNative = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderStorageImageArrayNonUniformIndexingNative = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderInputAttachmentArrayNonUniformIndexingNative = {}; VULKAN_HPP_NAMESPACE::Bool32 robustBufferAccessUpdateAfterBind = {}; VULKAN_HPP_NAMESPACE::Bool32 quadDivergentImplicitLod = {}; uint32_t maxPerStageDescriptorUpdateAfterBindSamplers = {}; uint32_t maxPerStageDescriptorUpdateAfterBindUniformBuffers = {}; uint32_t maxPerStageDescriptorUpdateAfterBindStorageBuffers = {}; uint32_t maxPerStageDescriptorUpdateAfterBindSampledImages = {}; uint32_t maxPerStageDescriptorUpdateAfterBindStorageImages = {}; uint32_t maxPerStageDescriptorUpdateAfterBindInputAttachments = {}; uint32_t maxPerStageUpdateAfterBindResources = {}; uint32_t maxDescriptorSetUpdateAfterBindSamplers = {}; uint32_t maxDescriptorSetUpdateAfterBindUniformBuffers = {}; uint32_t maxDescriptorSetUpdateAfterBindUniformBuffersDynamic = {}; uint32_t maxDescriptorSetUpdateAfterBindStorageBuffers = {}; uint32_t maxDescriptorSetUpdateAfterBindStorageBuffersDynamic = {}; uint32_t maxDescriptorSetUpdateAfterBindSampledImages = {}; uint32_t maxDescriptorSetUpdateAfterBindStorageImages = {}; uint32_t maxDescriptorSetUpdateAfterBindInputAttachments = {}; }; template <> struct CppType { using Type = PhysicalDeviceDescriptorIndexingProperties; }; using PhysicalDeviceDescriptorIndexingPropertiesEXT = PhysicalDeviceDescriptorIndexingProperties; struct PhysicalDeviceDescriptorPoolOverallocationFeaturesNV { using NativeType = VkPhysicalDeviceDescriptorPoolOverallocationFeaturesNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceDescriptorPoolOverallocationFeaturesNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceDescriptorPoolOverallocationFeaturesNV( VULKAN_HPP_NAMESPACE::Bool32 descriptorPoolOverallocation_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , descriptorPoolOverallocation{ descriptorPoolOverallocation_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceDescriptorPoolOverallocationFeaturesNV( PhysicalDeviceDescriptorPoolOverallocationFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceDescriptorPoolOverallocationFeaturesNV( VkPhysicalDeviceDescriptorPoolOverallocationFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceDescriptorPoolOverallocationFeaturesNV( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceDescriptorPoolOverallocationFeaturesNV & operator=( PhysicalDeviceDescriptorPoolOverallocationFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceDescriptorPoolOverallocationFeaturesNV & operator=( VkPhysicalDeviceDescriptorPoolOverallocationFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDescriptorPoolOverallocationFeaturesNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDescriptorPoolOverallocationFeaturesNV & setDescriptorPoolOverallocation( VULKAN_HPP_NAMESPACE::Bool32 descriptorPoolOverallocation_ ) VULKAN_HPP_NOEXCEPT { descriptorPoolOverallocation = descriptorPoolOverallocation_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceDescriptorPoolOverallocationFeaturesNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceDescriptorPoolOverallocationFeaturesNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, descriptorPoolOverallocation ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceDescriptorPoolOverallocationFeaturesNV const & ) const = default; #else bool operator==( PhysicalDeviceDescriptorPoolOverallocationFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( descriptorPoolOverallocation == rhs.descriptorPoolOverallocation ); # endif } bool operator!=( PhysicalDeviceDescriptorPoolOverallocationFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceDescriptorPoolOverallocationFeaturesNV; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 descriptorPoolOverallocation = {}; }; template <> struct CppType { using Type = PhysicalDeviceDescriptorPoolOverallocationFeaturesNV; }; struct PhysicalDeviceDescriptorSetHostMappingFeaturesVALVE { using NativeType = VkPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceDescriptorSetHostMappingFeaturesVALVE; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceDescriptorSetHostMappingFeaturesVALVE( VULKAN_HPP_NAMESPACE::Bool32 descriptorSetHostMapping_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , descriptorSetHostMapping{ descriptorSetHostMapping_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceDescriptorSetHostMappingFeaturesVALVE( PhysicalDeviceDescriptorSetHostMappingFeaturesVALVE const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceDescriptorSetHostMappingFeaturesVALVE( VkPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceDescriptorSetHostMappingFeaturesVALVE( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceDescriptorSetHostMappingFeaturesVALVE & operator=( PhysicalDeviceDescriptorSetHostMappingFeaturesVALVE const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceDescriptorSetHostMappingFeaturesVALVE & operator=( VkPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDescriptorSetHostMappingFeaturesVALVE & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDescriptorSetHostMappingFeaturesVALVE & setDescriptorSetHostMapping( VULKAN_HPP_NAMESPACE::Bool32 descriptorSetHostMapping_ ) VULKAN_HPP_NOEXCEPT { descriptorSetHostMapping = descriptorSetHostMapping_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, descriptorSetHostMapping ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceDescriptorSetHostMappingFeaturesVALVE const & ) const = default; #else bool operator==( PhysicalDeviceDescriptorSetHostMappingFeaturesVALVE const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( descriptorSetHostMapping == rhs.descriptorSetHostMapping ); # endif } bool operator!=( PhysicalDeviceDescriptorSetHostMappingFeaturesVALVE const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceDescriptorSetHostMappingFeaturesVALVE; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 descriptorSetHostMapping = {}; }; template <> struct CppType { using Type = PhysicalDeviceDescriptorSetHostMappingFeaturesVALVE; }; struct PhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV { using NativeType = VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV( VULKAN_HPP_NAMESPACE::Bool32 deviceGeneratedCompute_ = {}, VULKAN_HPP_NAMESPACE::Bool32 deviceGeneratedComputePipelines_ = {}, VULKAN_HPP_NAMESPACE::Bool32 deviceGeneratedComputeCaptureReplay_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , deviceGeneratedCompute{ deviceGeneratedCompute_ } , deviceGeneratedComputePipelines{ deviceGeneratedComputePipelines_ } , deviceGeneratedComputeCaptureReplay{ deviceGeneratedComputeCaptureReplay_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV( PhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV( VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV & operator=( PhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV & operator=( VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV & setDeviceGeneratedCompute( VULKAN_HPP_NAMESPACE::Bool32 deviceGeneratedCompute_ ) VULKAN_HPP_NOEXCEPT { deviceGeneratedCompute = deviceGeneratedCompute_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV & setDeviceGeneratedComputePipelines( VULKAN_HPP_NAMESPACE::Bool32 deviceGeneratedComputePipelines_ ) VULKAN_HPP_NOEXCEPT { deviceGeneratedComputePipelines = deviceGeneratedComputePipelines_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV & setDeviceGeneratedComputeCaptureReplay( VULKAN_HPP_NAMESPACE::Bool32 deviceGeneratedComputeCaptureReplay_ ) VULKAN_HPP_NOEXCEPT { deviceGeneratedComputeCaptureReplay = deviceGeneratedComputeCaptureReplay_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, deviceGeneratedCompute, deviceGeneratedComputePipelines, deviceGeneratedComputeCaptureReplay ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV const & ) const = default; #else bool operator==( PhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( deviceGeneratedCompute == rhs.deviceGeneratedCompute ) && ( deviceGeneratedComputePipelines == rhs.deviceGeneratedComputePipelines ) && ( deviceGeneratedComputeCaptureReplay == rhs.deviceGeneratedComputeCaptureReplay ); # endif } bool operator!=( PhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 deviceGeneratedCompute = {}; VULKAN_HPP_NAMESPACE::Bool32 deviceGeneratedComputePipelines = {}; VULKAN_HPP_NAMESPACE::Bool32 deviceGeneratedComputeCaptureReplay = {}; }; template <> struct CppType { using Type = PhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV; }; struct PhysicalDeviceDeviceGeneratedCommandsFeaturesEXT { using NativeType = VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceDeviceGeneratedCommandsFeaturesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceDeviceGeneratedCommandsFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 deviceGeneratedCommands_ = {}, VULKAN_HPP_NAMESPACE::Bool32 dynamicGeneratedPipelineLayout_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , deviceGeneratedCommands{ deviceGeneratedCommands_ } , dynamicGeneratedPipelineLayout{ dynamicGeneratedPipelineLayout_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceDeviceGeneratedCommandsFeaturesEXT( PhysicalDeviceDeviceGeneratedCommandsFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceDeviceGeneratedCommandsFeaturesEXT( VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceDeviceGeneratedCommandsFeaturesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceDeviceGeneratedCommandsFeaturesEXT & operator=( PhysicalDeviceDeviceGeneratedCommandsFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceDeviceGeneratedCommandsFeaturesEXT & operator=( VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDeviceGeneratedCommandsFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDeviceGeneratedCommandsFeaturesEXT & setDeviceGeneratedCommands( VULKAN_HPP_NAMESPACE::Bool32 deviceGeneratedCommands_ ) VULKAN_HPP_NOEXCEPT { deviceGeneratedCommands = deviceGeneratedCommands_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDeviceGeneratedCommandsFeaturesEXT & setDynamicGeneratedPipelineLayout( VULKAN_HPP_NAMESPACE::Bool32 dynamicGeneratedPipelineLayout_ ) VULKAN_HPP_NOEXCEPT { dynamicGeneratedPipelineLayout = dynamicGeneratedPipelineLayout_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, deviceGeneratedCommands, dynamicGeneratedPipelineLayout ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceDeviceGeneratedCommandsFeaturesEXT const & ) const = default; #else bool operator==( PhysicalDeviceDeviceGeneratedCommandsFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( deviceGeneratedCommands == rhs.deviceGeneratedCommands ) && ( dynamicGeneratedPipelineLayout == rhs.dynamicGeneratedPipelineLayout ); # endif } bool operator!=( PhysicalDeviceDeviceGeneratedCommandsFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceDeviceGeneratedCommandsFeaturesEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 deviceGeneratedCommands = {}; VULKAN_HPP_NAMESPACE::Bool32 dynamicGeneratedPipelineLayout = {}; }; template <> struct CppType { using Type = PhysicalDeviceDeviceGeneratedCommandsFeaturesEXT; }; struct PhysicalDeviceDeviceGeneratedCommandsFeaturesNV { using NativeType = VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceDeviceGeneratedCommandsFeaturesNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceDeviceGeneratedCommandsFeaturesNV( VULKAN_HPP_NAMESPACE::Bool32 deviceGeneratedCommands_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , deviceGeneratedCommands{ deviceGeneratedCommands_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceDeviceGeneratedCommandsFeaturesNV( PhysicalDeviceDeviceGeneratedCommandsFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceDeviceGeneratedCommandsFeaturesNV( VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceDeviceGeneratedCommandsFeaturesNV( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceDeviceGeneratedCommandsFeaturesNV & operator=( PhysicalDeviceDeviceGeneratedCommandsFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceDeviceGeneratedCommandsFeaturesNV & operator=( VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDeviceGeneratedCommandsFeaturesNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDeviceGeneratedCommandsFeaturesNV & setDeviceGeneratedCommands( VULKAN_HPP_NAMESPACE::Bool32 deviceGeneratedCommands_ ) VULKAN_HPP_NOEXCEPT { deviceGeneratedCommands = deviceGeneratedCommands_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, deviceGeneratedCommands ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceDeviceGeneratedCommandsFeaturesNV const & ) const = default; #else bool operator==( PhysicalDeviceDeviceGeneratedCommandsFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( deviceGeneratedCommands == rhs.deviceGeneratedCommands ); # endif } bool operator!=( PhysicalDeviceDeviceGeneratedCommandsFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceDeviceGeneratedCommandsFeaturesNV; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 deviceGeneratedCommands = {}; }; template <> struct CppType { using Type = PhysicalDeviceDeviceGeneratedCommandsFeaturesNV; }; struct PhysicalDeviceDeviceGeneratedCommandsPropertiesEXT { using NativeType = VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceDeviceGeneratedCommandsPropertiesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceDeviceGeneratedCommandsPropertiesEXT( uint32_t maxIndirectPipelineCount_ = {}, uint32_t maxIndirectShaderObjectCount_ = {}, uint32_t maxIndirectSequenceCount_ = {}, uint32_t maxIndirectCommandsTokenCount_ = {}, uint32_t maxIndirectCommandsTokenOffset_ = {}, uint32_t maxIndirectCommandsIndirectStride_ = {}, VULKAN_HPP_NAMESPACE::IndirectCommandsInputModeFlagsEXT supportedIndirectCommandsInputModes_ = {}, VULKAN_HPP_NAMESPACE::ShaderStageFlags supportedIndirectCommandsShaderStages_ = {}, VULKAN_HPP_NAMESPACE::ShaderStageFlags supportedIndirectCommandsShaderStagesPipelineBinding_ = {}, VULKAN_HPP_NAMESPACE::ShaderStageFlags supportedIndirectCommandsShaderStagesShaderBinding_ = {}, VULKAN_HPP_NAMESPACE::Bool32 deviceGeneratedCommandsTransformFeedback_ = {}, VULKAN_HPP_NAMESPACE::Bool32 deviceGeneratedCommandsMultiDrawIndirectCount_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , maxIndirectPipelineCount{ maxIndirectPipelineCount_ } , maxIndirectShaderObjectCount{ maxIndirectShaderObjectCount_ } , maxIndirectSequenceCount{ maxIndirectSequenceCount_ } , maxIndirectCommandsTokenCount{ maxIndirectCommandsTokenCount_ } , maxIndirectCommandsTokenOffset{ maxIndirectCommandsTokenOffset_ } , maxIndirectCommandsIndirectStride{ maxIndirectCommandsIndirectStride_ } , supportedIndirectCommandsInputModes{ supportedIndirectCommandsInputModes_ } , supportedIndirectCommandsShaderStages{ supportedIndirectCommandsShaderStages_ } , supportedIndirectCommandsShaderStagesPipelineBinding{ supportedIndirectCommandsShaderStagesPipelineBinding_ } , supportedIndirectCommandsShaderStagesShaderBinding{ supportedIndirectCommandsShaderStagesShaderBinding_ } , deviceGeneratedCommandsTransformFeedback{ deviceGeneratedCommandsTransformFeedback_ } , deviceGeneratedCommandsMultiDrawIndirectCount{ deviceGeneratedCommandsMultiDrawIndirectCount_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceDeviceGeneratedCommandsPropertiesEXT( PhysicalDeviceDeviceGeneratedCommandsPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceDeviceGeneratedCommandsPropertiesEXT( VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceDeviceGeneratedCommandsPropertiesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceDeviceGeneratedCommandsPropertiesEXT & operator=( PhysicalDeviceDeviceGeneratedCommandsPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceDeviceGeneratedCommandsPropertiesEXT & operator=( VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, maxIndirectPipelineCount, maxIndirectShaderObjectCount, maxIndirectSequenceCount, maxIndirectCommandsTokenCount, maxIndirectCommandsTokenOffset, maxIndirectCommandsIndirectStride, supportedIndirectCommandsInputModes, supportedIndirectCommandsShaderStages, supportedIndirectCommandsShaderStagesPipelineBinding, supportedIndirectCommandsShaderStagesShaderBinding, deviceGeneratedCommandsTransformFeedback, deviceGeneratedCommandsMultiDrawIndirectCount ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceDeviceGeneratedCommandsPropertiesEXT const & ) const = default; #else bool operator==( PhysicalDeviceDeviceGeneratedCommandsPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( maxIndirectPipelineCount == rhs.maxIndirectPipelineCount ) && ( maxIndirectShaderObjectCount == rhs.maxIndirectShaderObjectCount ) && ( maxIndirectSequenceCount == rhs.maxIndirectSequenceCount ) && ( maxIndirectCommandsTokenCount == rhs.maxIndirectCommandsTokenCount ) && ( maxIndirectCommandsTokenOffset == rhs.maxIndirectCommandsTokenOffset ) && ( maxIndirectCommandsIndirectStride == rhs.maxIndirectCommandsIndirectStride ) && ( supportedIndirectCommandsInputModes == rhs.supportedIndirectCommandsInputModes ) && ( supportedIndirectCommandsShaderStages == rhs.supportedIndirectCommandsShaderStages ) && ( supportedIndirectCommandsShaderStagesPipelineBinding == rhs.supportedIndirectCommandsShaderStagesPipelineBinding ) && ( supportedIndirectCommandsShaderStagesShaderBinding == rhs.supportedIndirectCommandsShaderStagesShaderBinding ) && ( deviceGeneratedCommandsTransformFeedback == rhs.deviceGeneratedCommandsTransformFeedback ) && ( deviceGeneratedCommandsMultiDrawIndirectCount == rhs.deviceGeneratedCommandsMultiDrawIndirectCount ); # endif } bool operator!=( PhysicalDeviceDeviceGeneratedCommandsPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceDeviceGeneratedCommandsPropertiesEXT; void * pNext = {}; uint32_t maxIndirectPipelineCount = {}; uint32_t maxIndirectShaderObjectCount = {}; uint32_t maxIndirectSequenceCount = {}; uint32_t maxIndirectCommandsTokenCount = {}; uint32_t maxIndirectCommandsTokenOffset = {}; uint32_t maxIndirectCommandsIndirectStride = {}; VULKAN_HPP_NAMESPACE::IndirectCommandsInputModeFlagsEXT supportedIndirectCommandsInputModes = {}; VULKAN_HPP_NAMESPACE::ShaderStageFlags supportedIndirectCommandsShaderStages = {}; VULKAN_HPP_NAMESPACE::ShaderStageFlags supportedIndirectCommandsShaderStagesPipelineBinding = {}; VULKAN_HPP_NAMESPACE::ShaderStageFlags supportedIndirectCommandsShaderStagesShaderBinding = {}; VULKAN_HPP_NAMESPACE::Bool32 deviceGeneratedCommandsTransformFeedback = {}; VULKAN_HPP_NAMESPACE::Bool32 deviceGeneratedCommandsMultiDrawIndirectCount = {}; }; template <> struct CppType { using Type = PhysicalDeviceDeviceGeneratedCommandsPropertiesEXT; }; struct PhysicalDeviceDeviceGeneratedCommandsPropertiesNV { using NativeType = VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceDeviceGeneratedCommandsPropertiesNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceDeviceGeneratedCommandsPropertiesNV( uint32_t maxGraphicsShaderGroupCount_ = {}, uint32_t maxIndirectSequenceCount_ = {}, uint32_t maxIndirectCommandsTokenCount_ = {}, uint32_t maxIndirectCommandsStreamCount_ = {}, uint32_t maxIndirectCommandsTokenOffset_ = {}, uint32_t maxIndirectCommandsStreamStride_ = {}, uint32_t minSequencesCountBufferOffsetAlignment_ = {}, uint32_t minSequencesIndexBufferOffsetAlignment_ = {}, uint32_t minIndirectCommandsBufferOffsetAlignment_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , maxGraphicsShaderGroupCount{ maxGraphicsShaderGroupCount_ } , maxIndirectSequenceCount{ maxIndirectSequenceCount_ } , maxIndirectCommandsTokenCount{ maxIndirectCommandsTokenCount_ } , maxIndirectCommandsStreamCount{ maxIndirectCommandsStreamCount_ } , maxIndirectCommandsTokenOffset{ maxIndirectCommandsTokenOffset_ } , maxIndirectCommandsStreamStride{ maxIndirectCommandsStreamStride_ } , minSequencesCountBufferOffsetAlignment{ minSequencesCountBufferOffsetAlignment_ } , minSequencesIndexBufferOffsetAlignment{ minSequencesIndexBufferOffsetAlignment_ } , minIndirectCommandsBufferOffsetAlignment{ minIndirectCommandsBufferOffsetAlignment_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceDeviceGeneratedCommandsPropertiesNV( PhysicalDeviceDeviceGeneratedCommandsPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceDeviceGeneratedCommandsPropertiesNV( VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceDeviceGeneratedCommandsPropertiesNV( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceDeviceGeneratedCommandsPropertiesNV & operator=( PhysicalDeviceDeviceGeneratedCommandsPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceDeviceGeneratedCommandsPropertiesNV & operator=( VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, maxGraphicsShaderGroupCount, maxIndirectSequenceCount, maxIndirectCommandsTokenCount, maxIndirectCommandsStreamCount, maxIndirectCommandsTokenOffset, maxIndirectCommandsStreamStride, minSequencesCountBufferOffsetAlignment, minSequencesIndexBufferOffsetAlignment, minIndirectCommandsBufferOffsetAlignment ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceDeviceGeneratedCommandsPropertiesNV const & ) const = default; #else bool operator==( PhysicalDeviceDeviceGeneratedCommandsPropertiesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( maxGraphicsShaderGroupCount == rhs.maxGraphicsShaderGroupCount ) && ( maxIndirectSequenceCount == rhs.maxIndirectSequenceCount ) && ( maxIndirectCommandsTokenCount == rhs.maxIndirectCommandsTokenCount ) && ( maxIndirectCommandsStreamCount == rhs.maxIndirectCommandsStreamCount ) && ( maxIndirectCommandsTokenOffset == rhs.maxIndirectCommandsTokenOffset ) && ( maxIndirectCommandsStreamStride == rhs.maxIndirectCommandsStreamStride ) && ( minSequencesCountBufferOffsetAlignment == rhs.minSequencesCountBufferOffsetAlignment ) && ( minSequencesIndexBufferOffsetAlignment == rhs.minSequencesIndexBufferOffsetAlignment ) && ( minIndirectCommandsBufferOffsetAlignment == rhs.minIndirectCommandsBufferOffsetAlignment ); # endif } bool operator!=( PhysicalDeviceDeviceGeneratedCommandsPropertiesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceDeviceGeneratedCommandsPropertiesNV; void * pNext = {}; uint32_t maxGraphicsShaderGroupCount = {}; uint32_t maxIndirectSequenceCount = {}; uint32_t maxIndirectCommandsTokenCount = {}; uint32_t maxIndirectCommandsStreamCount = {}; uint32_t maxIndirectCommandsTokenOffset = {}; uint32_t maxIndirectCommandsStreamStride = {}; uint32_t minSequencesCountBufferOffsetAlignment = {}; uint32_t minSequencesIndexBufferOffsetAlignment = {}; uint32_t minIndirectCommandsBufferOffsetAlignment = {}; }; template <> struct CppType { using Type = PhysicalDeviceDeviceGeneratedCommandsPropertiesNV; }; struct PhysicalDeviceDeviceMemoryReportFeaturesEXT { using NativeType = VkPhysicalDeviceDeviceMemoryReportFeaturesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceDeviceMemoryReportFeaturesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceDeviceMemoryReportFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 deviceMemoryReport_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , deviceMemoryReport{ deviceMemoryReport_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceDeviceMemoryReportFeaturesEXT( PhysicalDeviceDeviceMemoryReportFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceDeviceMemoryReportFeaturesEXT( VkPhysicalDeviceDeviceMemoryReportFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceDeviceMemoryReportFeaturesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceDeviceMemoryReportFeaturesEXT & operator=( PhysicalDeviceDeviceMemoryReportFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceDeviceMemoryReportFeaturesEXT & operator=( VkPhysicalDeviceDeviceMemoryReportFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDeviceMemoryReportFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDeviceMemoryReportFeaturesEXT & setDeviceMemoryReport( VULKAN_HPP_NAMESPACE::Bool32 deviceMemoryReport_ ) VULKAN_HPP_NOEXCEPT { deviceMemoryReport = deviceMemoryReport_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceDeviceMemoryReportFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceDeviceMemoryReportFeaturesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, deviceMemoryReport ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceDeviceMemoryReportFeaturesEXT const & ) const = default; #else bool operator==( PhysicalDeviceDeviceMemoryReportFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( deviceMemoryReport == rhs.deviceMemoryReport ); # endif } bool operator!=( PhysicalDeviceDeviceMemoryReportFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceDeviceMemoryReportFeaturesEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 deviceMemoryReport = {}; }; template <> struct CppType { using Type = PhysicalDeviceDeviceMemoryReportFeaturesEXT; }; struct PhysicalDeviceDiagnosticsConfigFeaturesNV { using NativeType = VkPhysicalDeviceDiagnosticsConfigFeaturesNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceDiagnosticsConfigFeaturesNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceDiagnosticsConfigFeaturesNV( VULKAN_HPP_NAMESPACE::Bool32 diagnosticsConfig_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , diagnosticsConfig{ diagnosticsConfig_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceDiagnosticsConfigFeaturesNV( PhysicalDeviceDiagnosticsConfigFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceDiagnosticsConfigFeaturesNV( VkPhysicalDeviceDiagnosticsConfigFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceDiagnosticsConfigFeaturesNV( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceDiagnosticsConfigFeaturesNV & operator=( PhysicalDeviceDiagnosticsConfigFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceDiagnosticsConfigFeaturesNV & operator=( VkPhysicalDeviceDiagnosticsConfigFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDiagnosticsConfigFeaturesNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDiagnosticsConfigFeaturesNV & setDiagnosticsConfig( VULKAN_HPP_NAMESPACE::Bool32 diagnosticsConfig_ ) VULKAN_HPP_NOEXCEPT { diagnosticsConfig = diagnosticsConfig_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceDiagnosticsConfigFeaturesNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceDiagnosticsConfigFeaturesNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, diagnosticsConfig ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceDiagnosticsConfigFeaturesNV const & ) const = default; #else bool operator==( PhysicalDeviceDiagnosticsConfigFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( diagnosticsConfig == rhs.diagnosticsConfig ); # endif } bool operator!=( PhysicalDeviceDiagnosticsConfigFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceDiagnosticsConfigFeaturesNV; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 diagnosticsConfig = {}; }; template <> struct CppType { using Type = PhysicalDeviceDiagnosticsConfigFeaturesNV; }; struct PhysicalDeviceDiscardRectanglePropertiesEXT { using NativeType = VkPhysicalDeviceDiscardRectanglePropertiesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceDiscardRectanglePropertiesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceDiscardRectanglePropertiesEXT( uint32_t maxDiscardRectangles_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , maxDiscardRectangles{ maxDiscardRectangles_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceDiscardRectanglePropertiesEXT( PhysicalDeviceDiscardRectanglePropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceDiscardRectanglePropertiesEXT( VkPhysicalDeviceDiscardRectanglePropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceDiscardRectanglePropertiesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceDiscardRectanglePropertiesEXT & operator=( PhysicalDeviceDiscardRectanglePropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceDiscardRectanglePropertiesEXT & operator=( VkPhysicalDeviceDiscardRectanglePropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceDiscardRectanglePropertiesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceDiscardRectanglePropertiesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, maxDiscardRectangles ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceDiscardRectanglePropertiesEXT const & ) const = default; #else bool operator==( PhysicalDeviceDiscardRectanglePropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( maxDiscardRectangles == rhs.maxDiscardRectangles ); # endif } bool operator!=( PhysicalDeviceDiscardRectanglePropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceDiscardRectanglePropertiesEXT; void * pNext = {}; uint32_t maxDiscardRectangles = {}; }; template <> struct CppType { using Type = PhysicalDeviceDiscardRectanglePropertiesEXT; }; #if defined( VK_ENABLE_BETA_EXTENSIONS ) struct PhysicalDeviceDisplacementMicromapFeaturesNV { using NativeType = VkPhysicalDeviceDisplacementMicromapFeaturesNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceDisplacementMicromapFeaturesNV; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceDisplacementMicromapFeaturesNV( VULKAN_HPP_NAMESPACE::Bool32 displacementMicromap_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , displacementMicromap{ displacementMicromap_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceDisplacementMicromapFeaturesNV( PhysicalDeviceDisplacementMicromapFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceDisplacementMicromapFeaturesNV( VkPhysicalDeviceDisplacementMicromapFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceDisplacementMicromapFeaturesNV( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceDisplacementMicromapFeaturesNV & operator=( PhysicalDeviceDisplacementMicromapFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceDisplacementMicromapFeaturesNV & operator=( VkPhysicalDeviceDisplacementMicromapFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } # if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDisplacementMicromapFeaturesNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDisplacementMicromapFeaturesNV & setDisplacementMicromap( VULKAN_HPP_NAMESPACE::Bool32 displacementMicromap_ ) VULKAN_HPP_NOEXCEPT { displacementMicromap = displacementMicromap_; return *this; } # endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceDisplacementMicromapFeaturesNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceDisplacementMicromapFeaturesNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, displacementMicromap ); } # endif # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceDisplacementMicromapFeaturesNV const & ) const = default; # else bool operator==( PhysicalDeviceDisplacementMicromapFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( displacementMicromap == rhs.displacementMicromap ); # endif } bool operator!=( PhysicalDeviceDisplacementMicromapFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } # endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceDisplacementMicromapFeaturesNV; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 displacementMicromap = {}; }; template <> struct CppType { using Type = PhysicalDeviceDisplacementMicromapFeaturesNV; }; #endif /*VK_ENABLE_BETA_EXTENSIONS*/ #if defined( VK_ENABLE_BETA_EXTENSIONS ) struct PhysicalDeviceDisplacementMicromapPropertiesNV { using NativeType = VkPhysicalDeviceDisplacementMicromapPropertiesNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceDisplacementMicromapPropertiesNV; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceDisplacementMicromapPropertiesNV( uint32_t maxDisplacementMicromapSubdivisionLevel_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , maxDisplacementMicromapSubdivisionLevel{ maxDisplacementMicromapSubdivisionLevel_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceDisplacementMicromapPropertiesNV( PhysicalDeviceDisplacementMicromapPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceDisplacementMicromapPropertiesNV( VkPhysicalDeviceDisplacementMicromapPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceDisplacementMicromapPropertiesNV( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceDisplacementMicromapPropertiesNV & operator=( PhysicalDeviceDisplacementMicromapPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceDisplacementMicromapPropertiesNV & operator=( VkPhysicalDeviceDisplacementMicromapPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceDisplacementMicromapPropertiesNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceDisplacementMicromapPropertiesNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, maxDisplacementMicromapSubdivisionLevel ); } # endif # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceDisplacementMicromapPropertiesNV const & ) const = default; # else bool operator==( PhysicalDeviceDisplacementMicromapPropertiesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( maxDisplacementMicromapSubdivisionLevel == rhs.maxDisplacementMicromapSubdivisionLevel ); # endif } bool operator!=( PhysicalDeviceDisplacementMicromapPropertiesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } # endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceDisplacementMicromapPropertiesNV; void * pNext = {}; uint32_t maxDisplacementMicromapSubdivisionLevel = {}; }; template <> struct CppType { using Type = PhysicalDeviceDisplacementMicromapPropertiesNV; }; #endif /*VK_ENABLE_BETA_EXTENSIONS*/ struct PhysicalDeviceDriverProperties { using NativeType = VkPhysicalDeviceDriverProperties; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceDriverProperties; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDriverProperties( VULKAN_HPP_NAMESPACE::DriverId driverID_ = VULKAN_HPP_NAMESPACE::DriverId::eAmdProprietary, std::array const & driverName_ = {}, std::array const & driverInfo_ = {}, VULKAN_HPP_NAMESPACE::ConformanceVersion conformanceVersion_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , driverID{ driverID_ } , driverName{ driverName_ } , driverInfo{ driverInfo_ } , conformanceVersion{ conformanceVersion_ } { } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDriverProperties( PhysicalDeviceDriverProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceDriverProperties( VkPhysicalDeviceDriverProperties const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceDriverProperties( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceDriverProperties & operator=( PhysicalDeviceDriverProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceDriverProperties & operator=( VkPhysicalDeviceDriverProperties const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceDriverProperties const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceDriverProperties &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple const &, VULKAN_HPP_NAMESPACE::ArrayWrapper1D const &, VULKAN_HPP_NAMESPACE::ConformanceVersion const &> # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, driverID, driverName, driverInfo, conformanceVersion ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) std::strong_ordering operator<=>( PhysicalDeviceDriverProperties const & rhs ) const VULKAN_HPP_NOEXCEPT { if ( auto cmp = sType <=> rhs.sType; cmp != 0 ) return cmp; if ( auto cmp = pNext <=> rhs.pNext; cmp != 0 ) return cmp; if ( auto cmp = driverID <=> rhs.driverID; cmp != 0 ) return cmp; if ( auto cmp = strcmp( driverName, rhs.driverName ); cmp != 0 ) return ( cmp < 0 ) ? std::strong_ordering::less : std::strong_ordering::greater; if ( auto cmp = strcmp( driverInfo, rhs.driverInfo ); cmp != 0 ) return ( cmp < 0 ) ? std::strong_ordering::less : std::strong_ordering::greater; if ( auto cmp = conformanceVersion <=> rhs.conformanceVersion; cmp != 0 ) return cmp; return std::strong_ordering::equivalent; } #endif bool operator==( PhysicalDeviceDriverProperties const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( driverID == rhs.driverID ) && ( strcmp( driverName, rhs.driverName ) == 0 ) && ( strcmp( driverInfo, rhs.driverInfo ) == 0 ) && ( conformanceVersion == rhs.conformanceVersion ); } bool operator!=( PhysicalDeviceDriverProperties const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceDriverProperties; void * pNext = {}; VULKAN_HPP_NAMESPACE::DriverId driverID = VULKAN_HPP_NAMESPACE::DriverId::eAmdProprietary; VULKAN_HPP_NAMESPACE::ArrayWrapper1D driverName = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D driverInfo = {}; VULKAN_HPP_NAMESPACE::ConformanceVersion conformanceVersion = {}; }; template <> struct CppType { using Type = PhysicalDeviceDriverProperties; }; using PhysicalDeviceDriverPropertiesKHR = PhysicalDeviceDriverProperties; struct PhysicalDeviceDrmPropertiesEXT { using NativeType = VkPhysicalDeviceDrmPropertiesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceDrmPropertiesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceDrmPropertiesEXT( VULKAN_HPP_NAMESPACE::Bool32 hasPrimary_ = {}, VULKAN_HPP_NAMESPACE::Bool32 hasRender_ = {}, int64_t primaryMajor_ = {}, int64_t primaryMinor_ = {}, int64_t renderMajor_ = {}, int64_t renderMinor_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , hasPrimary{ hasPrimary_ } , hasRender{ hasRender_ } , primaryMajor{ primaryMajor_ } , primaryMinor{ primaryMinor_ } , renderMajor{ renderMajor_ } , renderMinor{ renderMinor_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceDrmPropertiesEXT( PhysicalDeviceDrmPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceDrmPropertiesEXT( VkPhysicalDeviceDrmPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceDrmPropertiesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceDrmPropertiesEXT & operator=( PhysicalDeviceDrmPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceDrmPropertiesEXT & operator=( VkPhysicalDeviceDrmPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceDrmPropertiesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceDrmPropertiesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, hasPrimary, hasRender, primaryMajor, primaryMinor, renderMajor, renderMinor ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceDrmPropertiesEXT const & ) const = default; #else bool operator==( PhysicalDeviceDrmPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( hasPrimary == rhs.hasPrimary ) && ( hasRender == rhs.hasRender ) && ( primaryMajor == rhs.primaryMajor ) && ( primaryMinor == rhs.primaryMinor ) && ( renderMajor == rhs.renderMajor ) && ( renderMinor == rhs.renderMinor ); # endif } bool operator!=( PhysicalDeviceDrmPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceDrmPropertiesEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 hasPrimary = {}; VULKAN_HPP_NAMESPACE::Bool32 hasRender = {}; int64_t primaryMajor = {}; int64_t primaryMinor = {}; int64_t renderMajor = {}; int64_t renderMinor = {}; }; template <> struct CppType { using Type = PhysicalDeviceDrmPropertiesEXT; }; struct PhysicalDeviceDynamicRenderingFeatures { using NativeType = VkPhysicalDeviceDynamicRenderingFeatures; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceDynamicRenderingFeatures; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceDynamicRenderingFeatures( VULKAN_HPP_NAMESPACE::Bool32 dynamicRendering_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , dynamicRendering{ dynamicRendering_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceDynamicRenderingFeatures( PhysicalDeviceDynamicRenderingFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceDynamicRenderingFeatures( VkPhysicalDeviceDynamicRenderingFeatures const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceDynamicRenderingFeatures( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceDynamicRenderingFeatures & operator=( PhysicalDeviceDynamicRenderingFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceDynamicRenderingFeatures & operator=( VkPhysicalDeviceDynamicRenderingFeatures const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDynamicRenderingFeatures & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDynamicRenderingFeatures & setDynamicRendering( VULKAN_HPP_NAMESPACE::Bool32 dynamicRendering_ ) VULKAN_HPP_NOEXCEPT { dynamicRendering = dynamicRendering_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceDynamicRenderingFeatures const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceDynamicRenderingFeatures &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, dynamicRendering ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceDynamicRenderingFeatures const & ) const = default; #else bool operator==( PhysicalDeviceDynamicRenderingFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( dynamicRendering == rhs.dynamicRendering ); # endif } bool operator!=( PhysicalDeviceDynamicRenderingFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceDynamicRenderingFeatures; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 dynamicRendering = {}; }; template <> struct CppType { using Type = PhysicalDeviceDynamicRenderingFeatures; }; using PhysicalDeviceDynamicRenderingFeaturesKHR = PhysicalDeviceDynamicRenderingFeatures; struct PhysicalDeviceDynamicRenderingLocalReadFeatures { using NativeType = VkPhysicalDeviceDynamicRenderingLocalReadFeatures; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceDynamicRenderingLocalReadFeatures; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceDynamicRenderingLocalReadFeatures( VULKAN_HPP_NAMESPACE::Bool32 dynamicRenderingLocalRead_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , dynamicRenderingLocalRead{ dynamicRenderingLocalRead_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceDynamicRenderingLocalReadFeatures( PhysicalDeviceDynamicRenderingLocalReadFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceDynamicRenderingLocalReadFeatures( VkPhysicalDeviceDynamicRenderingLocalReadFeatures const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceDynamicRenderingLocalReadFeatures( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceDynamicRenderingLocalReadFeatures & operator=( PhysicalDeviceDynamicRenderingLocalReadFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceDynamicRenderingLocalReadFeatures & operator=( VkPhysicalDeviceDynamicRenderingLocalReadFeatures const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDynamicRenderingLocalReadFeatures & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDynamicRenderingLocalReadFeatures & setDynamicRenderingLocalRead( VULKAN_HPP_NAMESPACE::Bool32 dynamicRenderingLocalRead_ ) VULKAN_HPP_NOEXCEPT { dynamicRenderingLocalRead = dynamicRenderingLocalRead_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceDynamicRenderingLocalReadFeatures const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceDynamicRenderingLocalReadFeatures &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, dynamicRenderingLocalRead ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceDynamicRenderingLocalReadFeatures const & ) const = default; #else bool operator==( PhysicalDeviceDynamicRenderingLocalReadFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( dynamicRenderingLocalRead == rhs.dynamicRenderingLocalRead ); # endif } bool operator!=( PhysicalDeviceDynamicRenderingLocalReadFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceDynamicRenderingLocalReadFeatures; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 dynamicRenderingLocalRead = {}; }; template <> struct CppType { using Type = PhysicalDeviceDynamicRenderingLocalReadFeatures; }; using PhysicalDeviceDynamicRenderingLocalReadFeaturesKHR = PhysicalDeviceDynamicRenderingLocalReadFeatures; struct PhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT { using NativeType = VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 dynamicRenderingUnusedAttachments_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , dynamicRenderingUnusedAttachments{ dynamicRenderingUnusedAttachments_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT( PhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT( VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT & operator=( PhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT & operator=( VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT & setDynamicRenderingUnusedAttachments( VULKAN_HPP_NAMESPACE::Bool32 dynamicRenderingUnusedAttachments_ ) VULKAN_HPP_NOEXCEPT { dynamicRenderingUnusedAttachments = dynamicRenderingUnusedAttachments_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, dynamicRenderingUnusedAttachments ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT const & ) const = default; #else bool operator==( PhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( dynamicRenderingUnusedAttachments == rhs.dynamicRenderingUnusedAttachments ); # endif } bool operator!=( PhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 dynamicRenderingUnusedAttachments = {}; }; template <> struct CppType { using Type = PhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT; }; struct PhysicalDeviceExclusiveScissorFeaturesNV { using NativeType = VkPhysicalDeviceExclusiveScissorFeaturesNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceExclusiveScissorFeaturesNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceExclusiveScissorFeaturesNV( VULKAN_HPP_NAMESPACE::Bool32 exclusiveScissor_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , exclusiveScissor{ exclusiveScissor_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceExclusiveScissorFeaturesNV( PhysicalDeviceExclusiveScissorFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceExclusiveScissorFeaturesNV( VkPhysicalDeviceExclusiveScissorFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceExclusiveScissorFeaturesNV( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceExclusiveScissorFeaturesNV & operator=( PhysicalDeviceExclusiveScissorFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceExclusiveScissorFeaturesNV & operator=( VkPhysicalDeviceExclusiveScissorFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceExclusiveScissorFeaturesNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceExclusiveScissorFeaturesNV & setExclusiveScissor( VULKAN_HPP_NAMESPACE::Bool32 exclusiveScissor_ ) VULKAN_HPP_NOEXCEPT { exclusiveScissor = exclusiveScissor_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceExclusiveScissorFeaturesNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceExclusiveScissorFeaturesNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, exclusiveScissor ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceExclusiveScissorFeaturesNV const & ) const = default; #else bool operator==( PhysicalDeviceExclusiveScissorFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( exclusiveScissor == rhs.exclusiveScissor ); # endif } bool operator!=( PhysicalDeviceExclusiveScissorFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceExclusiveScissorFeaturesNV; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 exclusiveScissor = {}; }; template <> struct CppType { using Type = PhysicalDeviceExclusiveScissorFeaturesNV; }; struct PhysicalDeviceExtendedDynamicState2FeaturesEXT { using NativeType = VkPhysicalDeviceExtendedDynamicState2FeaturesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceExtendedDynamicState2FeaturesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceExtendedDynamicState2FeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState2_ = {}, VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState2LogicOp_ = {}, VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState2PatchControlPoints_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , extendedDynamicState2{ extendedDynamicState2_ } , extendedDynamicState2LogicOp{ extendedDynamicState2LogicOp_ } , extendedDynamicState2PatchControlPoints{ extendedDynamicState2PatchControlPoints_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceExtendedDynamicState2FeaturesEXT( PhysicalDeviceExtendedDynamicState2FeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceExtendedDynamicState2FeaturesEXT( VkPhysicalDeviceExtendedDynamicState2FeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceExtendedDynamicState2FeaturesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceExtendedDynamicState2FeaturesEXT & operator=( PhysicalDeviceExtendedDynamicState2FeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceExtendedDynamicState2FeaturesEXT & operator=( VkPhysicalDeviceExtendedDynamicState2FeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceExtendedDynamicState2FeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceExtendedDynamicState2FeaturesEXT & setExtendedDynamicState2( VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState2_ ) VULKAN_HPP_NOEXCEPT { extendedDynamicState2 = extendedDynamicState2_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceExtendedDynamicState2FeaturesEXT & setExtendedDynamicState2LogicOp( VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState2LogicOp_ ) VULKAN_HPP_NOEXCEPT { extendedDynamicState2LogicOp = extendedDynamicState2LogicOp_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceExtendedDynamicState2FeaturesEXT & setExtendedDynamicState2PatchControlPoints( VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState2PatchControlPoints_ ) VULKAN_HPP_NOEXCEPT { extendedDynamicState2PatchControlPoints = extendedDynamicState2PatchControlPoints_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceExtendedDynamicState2FeaturesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceExtendedDynamicState2FeaturesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, extendedDynamicState2, extendedDynamicState2LogicOp, extendedDynamicState2PatchControlPoints ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceExtendedDynamicState2FeaturesEXT const & ) const = default; #else bool operator==( PhysicalDeviceExtendedDynamicState2FeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( extendedDynamicState2 == rhs.extendedDynamicState2 ) && ( extendedDynamicState2LogicOp == rhs.extendedDynamicState2LogicOp ) && ( extendedDynamicState2PatchControlPoints == rhs.extendedDynamicState2PatchControlPoints ); # endif } bool operator!=( PhysicalDeviceExtendedDynamicState2FeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceExtendedDynamicState2FeaturesEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState2 = {}; VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState2LogicOp = {}; VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState2PatchControlPoints = {}; }; template <> struct CppType { using Type = PhysicalDeviceExtendedDynamicState2FeaturesEXT; }; struct PhysicalDeviceExtendedDynamicState3FeaturesEXT { using NativeType = VkPhysicalDeviceExtendedDynamicState3FeaturesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceExtendedDynamicState3FeaturesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceExtendedDynamicState3FeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3TessellationDomainOrigin_ = {}, VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3DepthClampEnable_ = {}, VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3PolygonMode_ = {}, VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3RasterizationSamples_ = {}, VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3SampleMask_ = {}, VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3AlphaToCoverageEnable_ = {}, VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3AlphaToOneEnable_ = {}, VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3LogicOpEnable_ = {}, VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3ColorBlendEnable_ = {}, VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3ColorBlendEquation_ = {}, VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3ColorWriteMask_ = {}, VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3RasterizationStream_ = {}, VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3ConservativeRasterizationMode_ = {}, VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3ExtraPrimitiveOverestimationSize_ = {}, VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3DepthClipEnable_ = {}, VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3SampleLocationsEnable_ = {}, VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3ColorBlendAdvanced_ = {}, VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3ProvokingVertexMode_ = {}, VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3LineRasterizationMode_ = {}, VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3LineStippleEnable_ = {}, VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3DepthClipNegativeOneToOne_ = {}, VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3ViewportWScalingEnable_ = {}, VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3ViewportSwizzle_ = {}, VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3CoverageToColorEnable_ = {}, VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3CoverageToColorLocation_ = {}, VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3CoverageModulationMode_ = {}, VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3CoverageModulationTableEnable_ = {}, VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3CoverageModulationTable_ = {}, VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3CoverageReductionMode_ = {}, VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3RepresentativeFragmentTestEnable_ = {}, VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3ShadingRateImageEnable_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , extendedDynamicState3TessellationDomainOrigin{ extendedDynamicState3TessellationDomainOrigin_ } , extendedDynamicState3DepthClampEnable{ extendedDynamicState3DepthClampEnable_ } , extendedDynamicState3PolygonMode{ extendedDynamicState3PolygonMode_ } , extendedDynamicState3RasterizationSamples{ extendedDynamicState3RasterizationSamples_ } , extendedDynamicState3SampleMask{ extendedDynamicState3SampleMask_ } , extendedDynamicState3AlphaToCoverageEnable{ extendedDynamicState3AlphaToCoverageEnable_ } , extendedDynamicState3AlphaToOneEnable{ extendedDynamicState3AlphaToOneEnable_ } , extendedDynamicState3LogicOpEnable{ extendedDynamicState3LogicOpEnable_ } , extendedDynamicState3ColorBlendEnable{ extendedDynamicState3ColorBlendEnable_ } , extendedDynamicState3ColorBlendEquation{ extendedDynamicState3ColorBlendEquation_ } , extendedDynamicState3ColorWriteMask{ extendedDynamicState3ColorWriteMask_ } , extendedDynamicState3RasterizationStream{ extendedDynamicState3RasterizationStream_ } , extendedDynamicState3ConservativeRasterizationMode{ extendedDynamicState3ConservativeRasterizationMode_ } , extendedDynamicState3ExtraPrimitiveOverestimationSize{ extendedDynamicState3ExtraPrimitiveOverestimationSize_ } , extendedDynamicState3DepthClipEnable{ extendedDynamicState3DepthClipEnable_ } , extendedDynamicState3SampleLocationsEnable{ extendedDynamicState3SampleLocationsEnable_ } , extendedDynamicState3ColorBlendAdvanced{ extendedDynamicState3ColorBlendAdvanced_ } , extendedDynamicState3ProvokingVertexMode{ extendedDynamicState3ProvokingVertexMode_ } , extendedDynamicState3LineRasterizationMode{ extendedDynamicState3LineRasterizationMode_ } , extendedDynamicState3LineStippleEnable{ extendedDynamicState3LineStippleEnable_ } , extendedDynamicState3DepthClipNegativeOneToOne{ extendedDynamicState3DepthClipNegativeOneToOne_ } , extendedDynamicState3ViewportWScalingEnable{ extendedDynamicState3ViewportWScalingEnable_ } , extendedDynamicState3ViewportSwizzle{ extendedDynamicState3ViewportSwizzle_ } , extendedDynamicState3CoverageToColorEnable{ extendedDynamicState3CoverageToColorEnable_ } , extendedDynamicState3CoverageToColorLocation{ extendedDynamicState3CoverageToColorLocation_ } , extendedDynamicState3CoverageModulationMode{ extendedDynamicState3CoverageModulationMode_ } , extendedDynamicState3CoverageModulationTableEnable{ extendedDynamicState3CoverageModulationTableEnable_ } , extendedDynamicState3CoverageModulationTable{ extendedDynamicState3CoverageModulationTable_ } , extendedDynamicState3CoverageReductionMode{ extendedDynamicState3CoverageReductionMode_ } , extendedDynamicState3RepresentativeFragmentTestEnable{ extendedDynamicState3RepresentativeFragmentTestEnable_ } , extendedDynamicState3ShadingRateImageEnable{ extendedDynamicState3ShadingRateImageEnable_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceExtendedDynamicState3FeaturesEXT( PhysicalDeviceExtendedDynamicState3FeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceExtendedDynamicState3FeaturesEXT( VkPhysicalDeviceExtendedDynamicState3FeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceExtendedDynamicState3FeaturesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceExtendedDynamicState3FeaturesEXT & operator=( PhysicalDeviceExtendedDynamicState3FeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceExtendedDynamicState3FeaturesEXT & operator=( VkPhysicalDeviceExtendedDynamicState3FeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceExtendedDynamicState3FeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceExtendedDynamicState3FeaturesEXT & setExtendedDynamicState3TessellationDomainOrigin( VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3TessellationDomainOrigin_ ) VULKAN_HPP_NOEXCEPT { extendedDynamicState3TessellationDomainOrigin = extendedDynamicState3TessellationDomainOrigin_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceExtendedDynamicState3FeaturesEXT & setExtendedDynamicState3DepthClampEnable( VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3DepthClampEnable_ ) VULKAN_HPP_NOEXCEPT { extendedDynamicState3DepthClampEnable = extendedDynamicState3DepthClampEnable_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceExtendedDynamicState3FeaturesEXT & setExtendedDynamicState3PolygonMode( VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3PolygonMode_ ) VULKAN_HPP_NOEXCEPT { extendedDynamicState3PolygonMode = extendedDynamicState3PolygonMode_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceExtendedDynamicState3FeaturesEXT & setExtendedDynamicState3RasterizationSamples( VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3RasterizationSamples_ ) VULKAN_HPP_NOEXCEPT { extendedDynamicState3RasterizationSamples = extendedDynamicState3RasterizationSamples_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceExtendedDynamicState3FeaturesEXT & setExtendedDynamicState3SampleMask( VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3SampleMask_ ) VULKAN_HPP_NOEXCEPT { extendedDynamicState3SampleMask = extendedDynamicState3SampleMask_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceExtendedDynamicState3FeaturesEXT & setExtendedDynamicState3AlphaToCoverageEnable( VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3AlphaToCoverageEnable_ ) VULKAN_HPP_NOEXCEPT { extendedDynamicState3AlphaToCoverageEnable = extendedDynamicState3AlphaToCoverageEnable_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceExtendedDynamicState3FeaturesEXT & setExtendedDynamicState3AlphaToOneEnable( VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3AlphaToOneEnable_ ) VULKAN_HPP_NOEXCEPT { extendedDynamicState3AlphaToOneEnable = extendedDynamicState3AlphaToOneEnable_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceExtendedDynamicState3FeaturesEXT & setExtendedDynamicState3LogicOpEnable( VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3LogicOpEnable_ ) VULKAN_HPP_NOEXCEPT { extendedDynamicState3LogicOpEnable = extendedDynamicState3LogicOpEnable_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceExtendedDynamicState3FeaturesEXT & setExtendedDynamicState3ColorBlendEnable( VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3ColorBlendEnable_ ) VULKAN_HPP_NOEXCEPT { extendedDynamicState3ColorBlendEnable = extendedDynamicState3ColorBlendEnable_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceExtendedDynamicState3FeaturesEXT & setExtendedDynamicState3ColorBlendEquation( VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3ColorBlendEquation_ ) VULKAN_HPP_NOEXCEPT { extendedDynamicState3ColorBlendEquation = extendedDynamicState3ColorBlendEquation_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceExtendedDynamicState3FeaturesEXT & setExtendedDynamicState3ColorWriteMask( VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3ColorWriteMask_ ) VULKAN_HPP_NOEXCEPT { extendedDynamicState3ColorWriteMask = extendedDynamicState3ColorWriteMask_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceExtendedDynamicState3FeaturesEXT & setExtendedDynamicState3RasterizationStream( VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3RasterizationStream_ ) VULKAN_HPP_NOEXCEPT { extendedDynamicState3RasterizationStream = extendedDynamicState3RasterizationStream_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceExtendedDynamicState3FeaturesEXT & setExtendedDynamicState3ConservativeRasterizationMode( VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3ConservativeRasterizationMode_ ) VULKAN_HPP_NOEXCEPT { extendedDynamicState3ConservativeRasterizationMode = extendedDynamicState3ConservativeRasterizationMode_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceExtendedDynamicState3FeaturesEXT & setExtendedDynamicState3ExtraPrimitiveOverestimationSize( VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3ExtraPrimitiveOverestimationSize_ ) VULKAN_HPP_NOEXCEPT { extendedDynamicState3ExtraPrimitiveOverestimationSize = extendedDynamicState3ExtraPrimitiveOverestimationSize_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceExtendedDynamicState3FeaturesEXT & setExtendedDynamicState3DepthClipEnable( VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3DepthClipEnable_ ) VULKAN_HPP_NOEXCEPT { extendedDynamicState3DepthClipEnable = extendedDynamicState3DepthClipEnable_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceExtendedDynamicState3FeaturesEXT & setExtendedDynamicState3SampleLocationsEnable( VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3SampleLocationsEnable_ ) VULKAN_HPP_NOEXCEPT { extendedDynamicState3SampleLocationsEnable = extendedDynamicState3SampleLocationsEnable_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceExtendedDynamicState3FeaturesEXT & setExtendedDynamicState3ColorBlendAdvanced( VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3ColorBlendAdvanced_ ) VULKAN_HPP_NOEXCEPT { extendedDynamicState3ColorBlendAdvanced = extendedDynamicState3ColorBlendAdvanced_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceExtendedDynamicState3FeaturesEXT & setExtendedDynamicState3ProvokingVertexMode( VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3ProvokingVertexMode_ ) VULKAN_HPP_NOEXCEPT { extendedDynamicState3ProvokingVertexMode = extendedDynamicState3ProvokingVertexMode_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceExtendedDynamicState3FeaturesEXT & setExtendedDynamicState3LineRasterizationMode( VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3LineRasterizationMode_ ) VULKAN_HPP_NOEXCEPT { extendedDynamicState3LineRasterizationMode = extendedDynamicState3LineRasterizationMode_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceExtendedDynamicState3FeaturesEXT & setExtendedDynamicState3LineStippleEnable( VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3LineStippleEnable_ ) VULKAN_HPP_NOEXCEPT { extendedDynamicState3LineStippleEnable = extendedDynamicState3LineStippleEnable_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceExtendedDynamicState3FeaturesEXT & setExtendedDynamicState3DepthClipNegativeOneToOne( VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3DepthClipNegativeOneToOne_ ) VULKAN_HPP_NOEXCEPT { extendedDynamicState3DepthClipNegativeOneToOne = extendedDynamicState3DepthClipNegativeOneToOne_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceExtendedDynamicState3FeaturesEXT & setExtendedDynamicState3ViewportWScalingEnable( VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3ViewportWScalingEnable_ ) VULKAN_HPP_NOEXCEPT { extendedDynamicState3ViewportWScalingEnable = extendedDynamicState3ViewportWScalingEnable_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceExtendedDynamicState3FeaturesEXT & setExtendedDynamicState3ViewportSwizzle( VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3ViewportSwizzle_ ) VULKAN_HPP_NOEXCEPT { extendedDynamicState3ViewportSwizzle = extendedDynamicState3ViewportSwizzle_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceExtendedDynamicState3FeaturesEXT & setExtendedDynamicState3CoverageToColorEnable( VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3CoverageToColorEnable_ ) VULKAN_HPP_NOEXCEPT { extendedDynamicState3CoverageToColorEnable = extendedDynamicState3CoverageToColorEnable_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceExtendedDynamicState3FeaturesEXT & setExtendedDynamicState3CoverageToColorLocation( VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3CoverageToColorLocation_ ) VULKAN_HPP_NOEXCEPT { extendedDynamicState3CoverageToColorLocation = extendedDynamicState3CoverageToColorLocation_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceExtendedDynamicState3FeaturesEXT & setExtendedDynamicState3CoverageModulationMode( VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3CoverageModulationMode_ ) VULKAN_HPP_NOEXCEPT { extendedDynamicState3CoverageModulationMode = extendedDynamicState3CoverageModulationMode_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceExtendedDynamicState3FeaturesEXT & setExtendedDynamicState3CoverageModulationTableEnable( VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3CoverageModulationTableEnable_ ) VULKAN_HPP_NOEXCEPT { extendedDynamicState3CoverageModulationTableEnable = extendedDynamicState3CoverageModulationTableEnable_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceExtendedDynamicState3FeaturesEXT & setExtendedDynamicState3CoverageModulationTable( VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3CoverageModulationTable_ ) VULKAN_HPP_NOEXCEPT { extendedDynamicState3CoverageModulationTable = extendedDynamicState3CoverageModulationTable_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceExtendedDynamicState3FeaturesEXT & setExtendedDynamicState3CoverageReductionMode( VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3CoverageReductionMode_ ) VULKAN_HPP_NOEXCEPT { extendedDynamicState3CoverageReductionMode = extendedDynamicState3CoverageReductionMode_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceExtendedDynamicState3FeaturesEXT & setExtendedDynamicState3RepresentativeFragmentTestEnable( VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3RepresentativeFragmentTestEnable_ ) VULKAN_HPP_NOEXCEPT { extendedDynamicState3RepresentativeFragmentTestEnable = extendedDynamicState3RepresentativeFragmentTestEnable_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceExtendedDynamicState3FeaturesEXT & setExtendedDynamicState3ShadingRateImageEnable( VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3ShadingRateImageEnable_ ) VULKAN_HPP_NOEXCEPT { extendedDynamicState3ShadingRateImageEnable = extendedDynamicState3ShadingRateImageEnable_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceExtendedDynamicState3FeaturesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceExtendedDynamicState3FeaturesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, extendedDynamicState3TessellationDomainOrigin, extendedDynamicState3DepthClampEnable, extendedDynamicState3PolygonMode, extendedDynamicState3RasterizationSamples, extendedDynamicState3SampleMask, extendedDynamicState3AlphaToCoverageEnable, extendedDynamicState3AlphaToOneEnable, extendedDynamicState3LogicOpEnable, extendedDynamicState3ColorBlendEnable, extendedDynamicState3ColorBlendEquation, extendedDynamicState3ColorWriteMask, extendedDynamicState3RasterizationStream, extendedDynamicState3ConservativeRasterizationMode, extendedDynamicState3ExtraPrimitiveOverestimationSize, extendedDynamicState3DepthClipEnable, extendedDynamicState3SampleLocationsEnable, extendedDynamicState3ColorBlendAdvanced, extendedDynamicState3ProvokingVertexMode, extendedDynamicState3LineRasterizationMode, extendedDynamicState3LineStippleEnable, extendedDynamicState3DepthClipNegativeOneToOne, extendedDynamicState3ViewportWScalingEnable, extendedDynamicState3ViewportSwizzle, extendedDynamicState3CoverageToColorEnable, extendedDynamicState3CoverageToColorLocation, extendedDynamicState3CoverageModulationMode, extendedDynamicState3CoverageModulationTableEnable, extendedDynamicState3CoverageModulationTable, extendedDynamicState3CoverageReductionMode, extendedDynamicState3RepresentativeFragmentTestEnable, extendedDynamicState3ShadingRateImageEnable ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceExtendedDynamicState3FeaturesEXT const & ) const = default; #else bool operator==( PhysicalDeviceExtendedDynamicState3FeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( extendedDynamicState3TessellationDomainOrigin == rhs.extendedDynamicState3TessellationDomainOrigin ) && ( extendedDynamicState3DepthClampEnable == rhs.extendedDynamicState3DepthClampEnable ) && ( extendedDynamicState3PolygonMode == rhs.extendedDynamicState3PolygonMode ) && ( extendedDynamicState3RasterizationSamples == rhs.extendedDynamicState3RasterizationSamples ) && ( extendedDynamicState3SampleMask == rhs.extendedDynamicState3SampleMask ) && ( extendedDynamicState3AlphaToCoverageEnable == rhs.extendedDynamicState3AlphaToCoverageEnable ) && ( extendedDynamicState3AlphaToOneEnable == rhs.extendedDynamicState3AlphaToOneEnable ) && ( extendedDynamicState3LogicOpEnable == rhs.extendedDynamicState3LogicOpEnable ) && ( extendedDynamicState3ColorBlendEnable == rhs.extendedDynamicState3ColorBlendEnable ) && ( extendedDynamicState3ColorBlendEquation == rhs.extendedDynamicState3ColorBlendEquation ) && ( extendedDynamicState3ColorWriteMask == rhs.extendedDynamicState3ColorWriteMask ) && ( extendedDynamicState3RasterizationStream == rhs.extendedDynamicState3RasterizationStream ) && ( extendedDynamicState3ConservativeRasterizationMode == rhs.extendedDynamicState3ConservativeRasterizationMode ) && ( extendedDynamicState3ExtraPrimitiveOverestimationSize == rhs.extendedDynamicState3ExtraPrimitiveOverestimationSize ) && ( extendedDynamicState3DepthClipEnable == rhs.extendedDynamicState3DepthClipEnable ) && ( extendedDynamicState3SampleLocationsEnable == rhs.extendedDynamicState3SampleLocationsEnable ) && ( extendedDynamicState3ColorBlendAdvanced == rhs.extendedDynamicState3ColorBlendAdvanced ) && ( extendedDynamicState3ProvokingVertexMode == rhs.extendedDynamicState3ProvokingVertexMode ) && ( extendedDynamicState3LineRasterizationMode == rhs.extendedDynamicState3LineRasterizationMode ) && ( extendedDynamicState3LineStippleEnable == rhs.extendedDynamicState3LineStippleEnable ) && ( extendedDynamicState3DepthClipNegativeOneToOne == rhs.extendedDynamicState3DepthClipNegativeOneToOne ) && ( extendedDynamicState3ViewportWScalingEnable == rhs.extendedDynamicState3ViewportWScalingEnable ) && ( extendedDynamicState3ViewportSwizzle == rhs.extendedDynamicState3ViewportSwizzle ) && ( extendedDynamicState3CoverageToColorEnable == rhs.extendedDynamicState3CoverageToColorEnable ) && ( extendedDynamicState3CoverageToColorLocation == rhs.extendedDynamicState3CoverageToColorLocation ) && ( extendedDynamicState3CoverageModulationMode == rhs.extendedDynamicState3CoverageModulationMode ) && ( extendedDynamicState3CoverageModulationTableEnable == rhs.extendedDynamicState3CoverageModulationTableEnable ) && ( extendedDynamicState3CoverageModulationTable == rhs.extendedDynamicState3CoverageModulationTable ) && ( extendedDynamicState3CoverageReductionMode == rhs.extendedDynamicState3CoverageReductionMode ) && ( extendedDynamicState3RepresentativeFragmentTestEnable == rhs.extendedDynamicState3RepresentativeFragmentTestEnable ) && ( extendedDynamicState3ShadingRateImageEnable == rhs.extendedDynamicState3ShadingRateImageEnable ); # endif } bool operator!=( PhysicalDeviceExtendedDynamicState3FeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceExtendedDynamicState3FeaturesEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3TessellationDomainOrigin = {}; VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3DepthClampEnable = {}; VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3PolygonMode = {}; VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3RasterizationSamples = {}; VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3SampleMask = {}; VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3AlphaToCoverageEnable = {}; VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3AlphaToOneEnable = {}; VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3LogicOpEnable = {}; VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3ColorBlendEnable = {}; VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3ColorBlendEquation = {}; VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3ColorWriteMask = {}; VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3RasterizationStream = {}; VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3ConservativeRasterizationMode = {}; VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3ExtraPrimitiveOverestimationSize = {}; VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3DepthClipEnable = {}; VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3SampleLocationsEnable = {}; VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3ColorBlendAdvanced = {}; VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3ProvokingVertexMode = {}; VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3LineRasterizationMode = {}; VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3LineStippleEnable = {}; VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3DepthClipNegativeOneToOne = {}; VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3ViewportWScalingEnable = {}; VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3ViewportSwizzle = {}; VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3CoverageToColorEnable = {}; VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3CoverageToColorLocation = {}; VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3CoverageModulationMode = {}; VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3CoverageModulationTableEnable = {}; VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3CoverageModulationTable = {}; VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3CoverageReductionMode = {}; VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3RepresentativeFragmentTestEnable = {}; VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState3ShadingRateImageEnable = {}; }; template <> struct CppType { using Type = PhysicalDeviceExtendedDynamicState3FeaturesEXT; }; struct PhysicalDeviceExtendedDynamicState3PropertiesEXT { using NativeType = VkPhysicalDeviceExtendedDynamicState3PropertiesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceExtendedDynamicState3PropertiesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceExtendedDynamicState3PropertiesEXT( VULKAN_HPP_NAMESPACE::Bool32 dynamicPrimitiveTopologyUnrestricted_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , dynamicPrimitiveTopologyUnrestricted{ dynamicPrimitiveTopologyUnrestricted_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceExtendedDynamicState3PropertiesEXT( PhysicalDeviceExtendedDynamicState3PropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceExtendedDynamicState3PropertiesEXT( VkPhysicalDeviceExtendedDynamicState3PropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceExtendedDynamicState3PropertiesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceExtendedDynamicState3PropertiesEXT & operator=( PhysicalDeviceExtendedDynamicState3PropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceExtendedDynamicState3PropertiesEXT & operator=( VkPhysicalDeviceExtendedDynamicState3PropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceExtendedDynamicState3PropertiesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceExtendedDynamicState3PropertiesEXT & setDynamicPrimitiveTopologyUnrestricted( VULKAN_HPP_NAMESPACE::Bool32 dynamicPrimitiveTopologyUnrestricted_ ) VULKAN_HPP_NOEXCEPT { dynamicPrimitiveTopologyUnrestricted = dynamicPrimitiveTopologyUnrestricted_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceExtendedDynamicState3PropertiesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceExtendedDynamicState3PropertiesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, dynamicPrimitiveTopologyUnrestricted ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceExtendedDynamicState3PropertiesEXT const & ) const = default; #else bool operator==( PhysicalDeviceExtendedDynamicState3PropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( dynamicPrimitiveTopologyUnrestricted == rhs.dynamicPrimitiveTopologyUnrestricted ); # endif } bool operator!=( PhysicalDeviceExtendedDynamicState3PropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceExtendedDynamicState3PropertiesEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 dynamicPrimitiveTopologyUnrestricted = {}; }; template <> struct CppType { using Type = PhysicalDeviceExtendedDynamicState3PropertiesEXT; }; struct PhysicalDeviceExtendedDynamicStateFeaturesEXT { using NativeType = VkPhysicalDeviceExtendedDynamicStateFeaturesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceExtendedDynamicStateFeaturesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceExtendedDynamicStateFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , extendedDynamicState{ extendedDynamicState_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceExtendedDynamicStateFeaturesEXT( PhysicalDeviceExtendedDynamicStateFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceExtendedDynamicStateFeaturesEXT( VkPhysicalDeviceExtendedDynamicStateFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceExtendedDynamicStateFeaturesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceExtendedDynamicStateFeaturesEXT & operator=( PhysicalDeviceExtendedDynamicStateFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceExtendedDynamicStateFeaturesEXT & operator=( VkPhysicalDeviceExtendedDynamicStateFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceExtendedDynamicStateFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceExtendedDynamicStateFeaturesEXT & setExtendedDynamicState( VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState_ ) VULKAN_HPP_NOEXCEPT { extendedDynamicState = extendedDynamicState_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceExtendedDynamicStateFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceExtendedDynamicStateFeaturesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, extendedDynamicState ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceExtendedDynamicStateFeaturesEXT const & ) const = default; #else bool operator==( PhysicalDeviceExtendedDynamicStateFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( extendedDynamicState == rhs.extendedDynamicState ); # endif } bool operator!=( PhysicalDeviceExtendedDynamicStateFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceExtendedDynamicStateFeaturesEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 extendedDynamicState = {}; }; template <> struct CppType { using Type = PhysicalDeviceExtendedDynamicStateFeaturesEXT; }; struct PhysicalDeviceExtendedSparseAddressSpaceFeaturesNV { using NativeType = VkPhysicalDeviceExtendedSparseAddressSpaceFeaturesNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceExtendedSparseAddressSpaceFeaturesNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceExtendedSparseAddressSpaceFeaturesNV( VULKAN_HPP_NAMESPACE::Bool32 extendedSparseAddressSpace_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , extendedSparseAddressSpace{ extendedSparseAddressSpace_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceExtendedSparseAddressSpaceFeaturesNV( PhysicalDeviceExtendedSparseAddressSpaceFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceExtendedSparseAddressSpaceFeaturesNV( VkPhysicalDeviceExtendedSparseAddressSpaceFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceExtendedSparseAddressSpaceFeaturesNV( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceExtendedSparseAddressSpaceFeaturesNV & operator=( PhysicalDeviceExtendedSparseAddressSpaceFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceExtendedSparseAddressSpaceFeaturesNV & operator=( VkPhysicalDeviceExtendedSparseAddressSpaceFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceExtendedSparseAddressSpaceFeaturesNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceExtendedSparseAddressSpaceFeaturesNV & setExtendedSparseAddressSpace( VULKAN_HPP_NAMESPACE::Bool32 extendedSparseAddressSpace_ ) VULKAN_HPP_NOEXCEPT { extendedSparseAddressSpace = extendedSparseAddressSpace_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceExtendedSparseAddressSpaceFeaturesNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceExtendedSparseAddressSpaceFeaturesNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, extendedSparseAddressSpace ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceExtendedSparseAddressSpaceFeaturesNV const & ) const = default; #else bool operator==( PhysicalDeviceExtendedSparseAddressSpaceFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( extendedSparseAddressSpace == rhs.extendedSparseAddressSpace ); # endif } bool operator!=( PhysicalDeviceExtendedSparseAddressSpaceFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceExtendedSparseAddressSpaceFeaturesNV; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 extendedSparseAddressSpace = {}; }; template <> struct CppType { using Type = PhysicalDeviceExtendedSparseAddressSpaceFeaturesNV; }; struct PhysicalDeviceExtendedSparseAddressSpacePropertiesNV { using NativeType = VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceExtendedSparseAddressSpacePropertiesNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceExtendedSparseAddressSpacePropertiesNV( VULKAN_HPP_NAMESPACE::DeviceSize extendedSparseAddressSpaceSize_ = {}, VULKAN_HPP_NAMESPACE::ImageUsageFlags extendedSparseImageUsageFlags_ = {}, VULKAN_HPP_NAMESPACE::BufferUsageFlags extendedSparseBufferUsageFlags_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , extendedSparseAddressSpaceSize{ extendedSparseAddressSpaceSize_ } , extendedSparseImageUsageFlags{ extendedSparseImageUsageFlags_ } , extendedSparseBufferUsageFlags{ extendedSparseBufferUsageFlags_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceExtendedSparseAddressSpacePropertiesNV( PhysicalDeviceExtendedSparseAddressSpacePropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceExtendedSparseAddressSpacePropertiesNV( VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceExtendedSparseAddressSpacePropertiesNV( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceExtendedSparseAddressSpacePropertiesNV & operator=( PhysicalDeviceExtendedSparseAddressSpacePropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceExtendedSparseAddressSpacePropertiesNV & operator=( VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, extendedSparseAddressSpaceSize, extendedSparseImageUsageFlags, extendedSparseBufferUsageFlags ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceExtendedSparseAddressSpacePropertiesNV const & ) const = default; #else bool operator==( PhysicalDeviceExtendedSparseAddressSpacePropertiesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( extendedSparseAddressSpaceSize == rhs.extendedSparseAddressSpaceSize ) && ( extendedSparseImageUsageFlags == rhs.extendedSparseImageUsageFlags ) && ( extendedSparseBufferUsageFlags == rhs.extendedSparseBufferUsageFlags ); # endif } bool operator!=( PhysicalDeviceExtendedSparseAddressSpacePropertiesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceExtendedSparseAddressSpacePropertiesNV; void * pNext = {}; VULKAN_HPP_NAMESPACE::DeviceSize extendedSparseAddressSpaceSize = {}; VULKAN_HPP_NAMESPACE::ImageUsageFlags extendedSparseImageUsageFlags = {}; VULKAN_HPP_NAMESPACE::BufferUsageFlags extendedSparseBufferUsageFlags = {}; }; template <> struct CppType { using Type = PhysicalDeviceExtendedSparseAddressSpacePropertiesNV; }; struct PhysicalDeviceExternalBufferInfo { using NativeType = VkPhysicalDeviceExternalBufferInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceExternalBufferInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceExternalBufferInfo( VULKAN_HPP_NAMESPACE::BufferCreateFlags flags_ = {}, VULKAN_HPP_NAMESPACE::BufferUsageFlags usage_ = {}, VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType_ = VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits::eOpaqueFd, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , usage{ usage_ } , handleType{ handleType_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceExternalBufferInfo( PhysicalDeviceExternalBufferInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceExternalBufferInfo( VkPhysicalDeviceExternalBufferInfo const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceExternalBufferInfo( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceExternalBufferInfo & operator=( PhysicalDeviceExternalBufferInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceExternalBufferInfo & operator=( VkPhysicalDeviceExternalBufferInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceExternalBufferInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceExternalBufferInfo & setFlags( VULKAN_HPP_NAMESPACE::BufferCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceExternalBufferInfo & setUsage( VULKAN_HPP_NAMESPACE::BufferUsageFlags usage_ ) VULKAN_HPP_NOEXCEPT { usage = usage_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceExternalBufferInfo & setHandleType( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType_ ) VULKAN_HPP_NOEXCEPT { handleType = handleType_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceExternalBufferInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceExternalBufferInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, usage, handleType ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceExternalBufferInfo const & ) const = default; #else bool operator==( PhysicalDeviceExternalBufferInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( usage == rhs.usage ) && ( handleType == rhs.handleType ); # endif } bool operator!=( PhysicalDeviceExternalBufferInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceExternalBufferInfo; const void * pNext = {}; VULKAN_HPP_NAMESPACE::BufferCreateFlags flags = {}; VULKAN_HPP_NAMESPACE::BufferUsageFlags usage = {}; VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType = VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits::eOpaqueFd; }; template <> struct CppType { using Type = PhysicalDeviceExternalBufferInfo; }; using PhysicalDeviceExternalBufferInfoKHR = PhysicalDeviceExternalBufferInfo; struct PhysicalDeviceExternalFenceInfo { using NativeType = VkPhysicalDeviceExternalFenceInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceExternalFenceInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceExternalFenceInfo( VULKAN_HPP_NAMESPACE::ExternalFenceHandleTypeFlagBits handleType_ = VULKAN_HPP_NAMESPACE::ExternalFenceHandleTypeFlagBits::eOpaqueFd, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , handleType{ handleType_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceExternalFenceInfo( PhysicalDeviceExternalFenceInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceExternalFenceInfo( VkPhysicalDeviceExternalFenceInfo const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceExternalFenceInfo( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceExternalFenceInfo & operator=( PhysicalDeviceExternalFenceInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceExternalFenceInfo & operator=( VkPhysicalDeviceExternalFenceInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceExternalFenceInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceExternalFenceInfo & setHandleType( VULKAN_HPP_NAMESPACE::ExternalFenceHandleTypeFlagBits handleType_ ) VULKAN_HPP_NOEXCEPT { handleType = handleType_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceExternalFenceInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceExternalFenceInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, handleType ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceExternalFenceInfo const & ) const = default; #else bool operator==( PhysicalDeviceExternalFenceInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( handleType == rhs.handleType ); # endif } bool operator!=( PhysicalDeviceExternalFenceInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceExternalFenceInfo; const void * pNext = {}; VULKAN_HPP_NAMESPACE::ExternalFenceHandleTypeFlagBits handleType = VULKAN_HPP_NAMESPACE::ExternalFenceHandleTypeFlagBits::eOpaqueFd; }; template <> struct CppType { using Type = PhysicalDeviceExternalFenceInfo; }; using PhysicalDeviceExternalFenceInfoKHR = PhysicalDeviceExternalFenceInfo; #if defined( VK_USE_PLATFORM_ANDROID_KHR ) struct PhysicalDeviceExternalFormatResolveFeaturesANDROID { using NativeType = VkPhysicalDeviceExternalFormatResolveFeaturesANDROID; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceExternalFormatResolveFeaturesANDROID; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceExternalFormatResolveFeaturesANDROID( VULKAN_HPP_NAMESPACE::Bool32 externalFormatResolve_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , externalFormatResolve{ externalFormatResolve_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceExternalFormatResolveFeaturesANDROID( PhysicalDeviceExternalFormatResolveFeaturesANDROID const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceExternalFormatResolveFeaturesANDROID( VkPhysicalDeviceExternalFormatResolveFeaturesANDROID const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceExternalFormatResolveFeaturesANDROID( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceExternalFormatResolveFeaturesANDROID & operator=( PhysicalDeviceExternalFormatResolveFeaturesANDROID const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceExternalFormatResolveFeaturesANDROID & operator=( VkPhysicalDeviceExternalFormatResolveFeaturesANDROID const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } # if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceExternalFormatResolveFeaturesANDROID & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceExternalFormatResolveFeaturesANDROID & setExternalFormatResolve( VULKAN_HPP_NAMESPACE::Bool32 externalFormatResolve_ ) VULKAN_HPP_NOEXCEPT { externalFormatResolve = externalFormatResolve_; return *this; } # endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceExternalFormatResolveFeaturesANDROID const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceExternalFormatResolveFeaturesANDROID &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, externalFormatResolve ); } # endif # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceExternalFormatResolveFeaturesANDROID const & ) const = default; # else bool operator==( PhysicalDeviceExternalFormatResolveFeaturesANDROID const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( externalFormatResolve == rhs.externalFormatResolve ); # endif } bool operator!=( PhysicalDeviceExternalFormatResolveFeaturesANDROID const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } # endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceExternalFormatResolveFeaturesANDROID; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 externalFormatResolve = {}; }; template <> struct CppType { using Type = PhysicalDeviceExternalFormatResolveFeaturesANDROID; }; #endif /*VK_USE_PLATFORM_ANDROID_KHR*/ #if defined( VK_USE_PLATFORM_ANDROID_KHR ) struct PhysicalDeviceExternalFormatResolvePropertiesANDROID { using NativeType = VkPhysicalDeviceExternalFormatResolvePropertiesANDROID; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceExternalFormatResolvePropertiesANDROID; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceExternalFormatResolvePropertiesANDROID( VULKAN_HPP_NAMESPACE::Bool32 nullColorAttachmentWithExternalFormatResolve_ = {}, VULKAN_HPP_NAMESPACE::ChromaLocation externalFormatResolveChromaOffsetX_ = VULKAN_HPP_NAMESPACE::ChromaLocation::eCositedEven, VULKAN_HPP_NAMESPACE::ChromaLocation externalFormatResolveChromaOffsetY_ = VULKAN_HPP_NAMESPACE::ChromaLocation::eCositedEven, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , nullColorAttachmentWithExternalFormatResolve{ nullColorAttachmentWithExternalFormatResolve_ } , externalFormatResolveChromaOffsetX{ externalFormatResolveChromaOffsetX_ } , externalFormatResolveChromaOffsetY{ externalFormatResolveChromaOffsetY_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceExternalFormatResolvePropertiesANDROID( PhysicalDeviceExternalFormatResolvePropertiesANDROID const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceExternalFormatResolvePropertiesANDROID( VkPhysicalDeviceExternalFormatResolvePropertiesANDROID const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceExternalFormatResolvePropertiesANDROID( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceExternalFormatResolvePropertiesANDROID & operator=( PhysicalDeviceExternalFormatResolvePropertiesANDROID const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceExternalFormatResolvePropertiesANDROID & operator=( VkPhysicalDeviceExternalFormatResolvePropertiesANDROID const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceExternalFormatResolvePropertiesANDROID const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceExternalFormatResolvePropertiesANDROID &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, nullColorAttachmentWithExternalFormatResolve, externalFormatResolveChromaOffsetX, externalFormatResolveChromaOffsetY ); } # endif # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceExternalFormatResolvePropertiesANDROID const & ) const = default; # else bool operator==( PhysicalDeviceExternalFormatResolvePropertiesANDROID const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( nullColorAttachmentWithExternalFormatResolve == rhs.nullColorAttachmentWithExternalFormatResolve ) && ( externalFormatResolveChromaOffsetX == rhs.externalFormatResolveChromaOffsetX ) && ( externalFormatResolveChromaOffsetY == rhs.externalFormatResolveChromaOffsetY ); # endif } bool operator!=( PhysicalDeviceExternalFormatResolvePropertiesANDROID const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } # endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceExternalFormatResolvePropertiesANDROID; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 nullColorAttachmentWithExternalFormatResolve = {}; VULKAN_HPP_NAMESPACE::ChromaLocation externalFormatResolveChromaOffsetX = VULKAN_HPP_NAMESPACE::ChromaLocation::eCositedEven; VULKAN_HPP_NAMESPACE::ChromaLocation externalFormatResolveChromaOffsetY = VULKAN_HPP_NAMESPACE::ChromaLocation::eCositedEven; }; template <> struct CppType { using Type = PhysicalDeviceExternalFormatResolvePropertiesANDROID; }; #endif /*VK_USE_PLATFORM_ANDROID_KHR*/ struct PhysicalDeviceExternalImageFormatInfo { using NativeType = VkPhysicalDeviceExternalImageFormatInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceExternalImageFormatInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceExternalImageFormatInfo( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType_ = VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits::eOpaqueFd, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , handleType{ handleType_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceExternalImageFormatInfo( PhysicalDeviceExternalImageFormatInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceExternalImageFormatInfo( VkPhysicalDeviceExternalImageFormatInfo const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceExternalImageFormatInfo( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceExternalImageFormatInfo & operator=( PhysicalDeviceExternalImageFormatInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceExternalImageFormatInfo & operator=( VkPhysicalDeviceExternalImageFormatInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceExternalImageFormatInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceExternalImageFormatInfo & setHandleType( VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType_ ) VULKAN_HPP_NOEXCEPT { handleType = handleType_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceExternalImageFormatInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceExternalImageFormatInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, handleType ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceExternalImageFormatInfo const & ) const = default; #else bool operator==( PhysicalDeviceExternalImageFormatInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( handleType == rhs.handleType ); # endif } bool operator!=( PhysicalDeviceExternalImageFormatInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceExternalImageFormatInfo; const void * pNext = {}; VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits handleType = VULKAN_HPP_NAMESPACE::ExternalMemoryHandleTypeFlagBits::eOpaqueFd; }; template <> struct CppType { using Type = PhysicalDeviceExternalImageFormatInfo; }; using PhysicalDeviceExternalImageFormatInfoKHR = PhysicalDeviceExternalImageFormatInfo; struct PhysicalDeviceExternalMemoryHostPropertiesEXT { using NativeType = VkPhysicalDeviceExternalMemoryHostPropertiesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceExternalMemoryHostPropertiesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceExternalMemoryHostPropertiesEXT( VULKAN_HPP_NAMESPACE::DeviceSize minImportedHostPointerAlignment_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , minImportedHostPointerAlignment{ minImportedHostPointerAlignment_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceExternalMemoryHostPropertiesEXT( PhysicalDeviceExternalMemoryHostPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceExternalMemoryHostPropertiesEXT( VkPhysicalDeviceExternalMemoryHostPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceExternalMemoryHostPropertiesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceExternalMemoryHostPropertiesEXT & operator=( PhysicalDeviceExternalMemoryHostPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceExternalMemoryHostPropertiesEXT & operator=( VkPhysicalDeviceExternalMemoryHostPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceExternalMemoryHostPropertiesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceExternalMemoryHostPropertiesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, minImportedHostPointerAlignment ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceExternalMemoryHostPropertiesEXT const & ) const = default; #else bool operator==( PhysicalDeviceExternalMemoryHostPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( minImportedHostPointerAlignment == rhs.minImportedHostPointerAlignment ); # endif } bool operator!=( PhysicalDeviceExternalMemoryHostPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceExternalMemoryHostPropertiesEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::DeviceSize minImportedHostPointerAlignment = {}; }; template <> struct CppType { using Type = PhysicalDeviceExternalMemoryHostPropertiesEXT; }; struct PhysicalDeviceExternalMemoryRDMAFeaturesNV { using NativeType = VkPhysicalDeviceExternalMemoryRDMAFeaturesNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceExternalMemoryRdmaFeaturesNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceExternalMemoryRDMAFeaturesNV( VULKAN_HPP_NAMESPACE::Bool32 externalMemoryRDMA_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , externalMemoryRDMA{ externalMemoryRDMA_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceExternalMemoryRDMAFeaturesNV( PhysicalDeviceExternalMemoryRDMAFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceExternalMemoryRDMAFeaturesNV( VkPhysicalDeviceExternalMemoryRDMAFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceExternalMemoryRDMAFeaturesNV( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceExternalMemoryRDMAFeaturesNV & operator=( PhysicalDeviceExternalMemoryRDMAFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceExternalMemoryRDMAFeaturesNV & operator=( VkPhysicalDeviceExternalMemoryRDMAFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceExternalMemoryRDMAFeaturesNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceExternalMemoryRDMAFeaturesNV & setExternalMemoryRDMA( VULKAN_HPP_NAMESPACE::Bool32 externalMemoryRDMA_ ) VULKAN_HPP_NOEXCEPT { externalMemoryRDMA = externalMemoryRDMA_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceExternalMemoryRDMAFeaturesNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceExternalMemoryRDMAFeaturesNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, externalMemoryRDMA ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceExternalMemoryRDMAFeaturesNV const & ) const = default; #else bool operator==( PhysicalDeviceExternalMemoryRDMAFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( externalMemoryRDMA == rhs.externalMemoryRDMA ); # endif } bool operator!=( PhysicalDeviceExternalMemoryRDMAFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceExternalMemoryRdmaFeaturesNV; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 externalMemoryRDMA = {}; }; template <> struct CppType { using Type = PhysicalDeviceExternalMemoryRDMAFeaturesNV; }; #if defined( VK_USE_PLATFORM_SCREEN_QNX ) struct PhysicalDeviceExternalMemoryScreenBufferFeaturesQNX { using NativeType = VkPhysicalDeviceExternalMemoryScreenBufferFeaturesQNX; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceExternalMemoryScreenBufferFeaturesQNX; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceExternalMemoryScreenBufferFeaturesQNX( VULKAN_HPP_NAMESPACE::Bool32 screenBufferImport_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , screenBufferImport{ screenBufferImport_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceExternalMemoryScreenBufferFeaturesQNX( PhysicalDeviceExternalMemoryScreenBufferFeaturesQNX const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceExternalMemoryScreenBufferFeaturesQNX( VkPhysicalDeviceExternalMemoryScreenBufferFeaturesQNX const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceExternalMemoryScreenBufferFeaturesQNX( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceExternalMemoryScreenBufferFeaturesQNX & operator=( PhysicalDeviceExternalMemoryScreenBufferFeaturesQNX const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceExternalMemoryScreenBufferFeaturesQNX & operator=( VkPhysicalDeviceExternalMemoryScreenBufferFeaturesQNX const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } # if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceExternalMemoryScreenBufferFeaturesQNX & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceExternalMemoryScreenBufferFeaturesQNX & setScreenBufferImport( VULKAN_HPP_NAMESPACE::Bool32 screenBufferImport_ ) VULKAN_HPP_NOEXCEPT { screenBufferImport = screenBufferImport_; return *this; } # endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceExternalMemoryScreenBufferFeaturesQNX const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceExternalMemoryScreenBufferFeaturesQNX &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, screenBufferImport ); } # endif # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceExternalMemoryScreenBufferFeaturesQNX const & ) const = default; # else bool operator==( PhysicalDeviceExternalMemoryScreenBufferFeaturesQNX const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( screenBufferImport == rhs.screenBufferImport ); # endif } bool operator!=( PhysicalDeviceExternalMemoryScreenBufferFeaturesQNX const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } # endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceExternalMemoryScreenBufferFeaturesQNX; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 screenBufferImport = {}; }; template <> struct CppType { using Type = PhysicalDeviceExternalMemoryScreenBufferFeaturesQNX; }; #endif /*VK_USE_PLATFORM_SCREEN_QNX*/ struct PhysicalDeviceExternalSemaphoreInfo { using NativeType = VkPhysicalDeviceExternalSemaphoreInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceExternalSemaphoreInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceExternalSemaphoreInfo( VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlagBits handleType_ = VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlagBits::eOpaqueFd, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , handleType{ handleType_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceExternalSemaphoreInfo( PhysicalDeviceExternalSemaphoreInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceExternalSemaphoreInfo( VkPhysicalDeviceExternalSemaphoreInfo const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceExternalSemaphoreInfo( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceExternalSemaphoreInfo & operator=( PhysicalDeviceExternalSemaphoreInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceExternalSemaphoreInfo & operator=( VkPhysicalDeviceExternalSemaphoreInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceExternalSemaphoreInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceExternalSemaphoreInfo & setHandleType( VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlagBits handleType_ ) VULKAN_HPP_NOEXCEPT { handleType = handleType_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceExternalSemaphoreInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceExternalSemaphoreInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, handleType ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceExternalSemaphoreInfo const & ) const = default; #else bool operator==( PhysicalDeviceExternalSemaphoreInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( handleType == rhs.handleType ); # endif } bool operator!=( PhysicalDeviceExternalSemaphoreInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceExternalSemaphoreInfo; const void * pNext = {}; VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlagBits handleType = VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlagBits::eOpaqueFd; }; template <> struct CppType { using Type = PhysicalDeviceExternalSemaphoreInfo; }; using PhysicalDeviceExternalSemaphoreInfoKHR = PhysicalDeviceExternalSemaphoreInfo; struct PhysicalDeviceFaultFeaturesEXT { using NativeType = VkPhysicalDeviceFaultFeaturesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceFaultFeaturesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceFaultFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 deviceFault_ = {}, VULKAN_HPP_NAMESPACE::Bool32 deviceFaultVendorBinary_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , deviceFault{ deviceFault_ } , deviceFaultVendorBinary{ deviceFaultVendorBinary_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceFaultFeaturesEXT( PhysicalDeviceFaultFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceFaultFeaturesEXT( VkPhysicalDeviceFaultFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceFaultFeaturesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceFaultFeaturesEXT & operator=( PhysicalDeviceFaultFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceFaultFeaturesEXT & operator=( VkPhysicalDeviceFaultFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFaultFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFaultFeaturesEXT & setDeviceFault( VULKAN_HPP_NAMESPACE::Bool32 deviceFault_ ) VULKAN_HPP_NOEXCEPT { deviceFault = deviceFault_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFaultFeaturesEXT & setDeviceFaultVendorBinary( VULKAN_HPP_NAMESPACE::Bool32 deviceFaultVendorBinary_ ) VULKAN_HPP_NOEXCEPT { deviceFaultVendorBinary = deviceFaultVendorBinary_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceFaultFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceFaultFeaturesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, deviceFault, deviceFaultVendorBinary ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceFaultFeaturesEXT const & ) const = default; #else bool operator==( PhysicalDeviceFaultFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( deviceFault == rhs.deviceFault ) && ( deviceFaultVendorBinary == rhs.deviceFaultVendorBinary ); # endif } bool operator!=( PhysicalDeviceFaultFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceFaultFeaturesEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 deviceFault = {}; VULKAN_HPP_NAMESPACE::Bool32 deviceFaultVendorBinary = {}; }; template <> struct CppType { using Type = PhysicalDeviceFaultFeaturesEXT; }; struct PhysicalDeviceFeatures2 { using NativeType = VkPhysicalDeviceFeatures2; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceFeatures2; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceFeatures2( VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures features_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , features{ features_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceFeatures2( PhysicalDeviceFeatures2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceFeatures2( VkPhysicalDeviceFeatures2 const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceFeatures2( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceFeatures2 & operator=( PhysicalDeviceFeatures2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceFeatures2 & operator=( VkPhysicalDeviceFeatures2 const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures2 & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFeatures2 & setFeatures( VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures const & features_ ) VULKAN_HPP_NOEXCEPT { features = features_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceFeatures2 const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceFeatures2 &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, features ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceFeatures2 const & ) const = default; #else bool operator==( PhysicalDeviceFeatures2 const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( features == rhs.features ); # endif } bool operator!=( PhysicalDeviceFeatures2 const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceFeatures2; void * pNext = {}; VULKAN_HPP_NAMESPACE::PhysicalDeviceFeatures features = {}; }; template <> struct CppType { using Type = PhysicalDeviceFeatures2; }; using PhysicalDeviceFeatures2KHR = PhysicalDeviceFeatures2; struct PhysicalDeviceFloatControlsProperties { using NativeType = VkPhysicalDeviceFloatControlsProperties; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceFloatControlsProperties; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceFloatControlsProperties( VULKAN_HPP_NAMESPACE::ShaderFloatControlsIndependence denormBehaviorIndependence_ = VULKAN_HPP_NAMESPACE::ShaderFloatControlsIndependence::e32BitOnly, VULKAN_HPP_NAMESPACE::ShaderFloatControlsIndependence roundingModeIndependence_ = VULKAN_HPP_NAMESPACE::ShaderFloatControlsIndependence::e32BitOnly, VULKAN_HPP_NAMESPACE::Bool32 shaderSignedZeroInfNanPreserveFloat16_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderSignedZeroInfNanPreserveFloat32_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderSignedZeroInfNanPreserveFloat64_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderDenormPreserveFloat16_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderDenormPreserveFloat32_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderDenormPreserveFloat64_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderDenormFlushToZeroFloat16_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderDenormFlushToZeroFloat32_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderDenormFlushToZeroFloat64_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderRoundingModeRTEFloat16_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderRoundingModeRTEFloat32_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderRoundingModeRTEFloat64_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderRoundingModeRTZFloat16_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderRoundingModeRTZFloat32_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderRoundingModeRTZFloat64_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , denormBehaviorIndependence{ denormBehaviorIndependence_ } , roundingModeIndependence{ roundingModeIndependence_ } , shaderSignedZeroInfNanPreserveFloat16{ shaderSignedZeroInfNanPreserveFloat16_ } , shaderSignedZeroInfNanPreserveFloat32{ shaderSignedZeroInfNanPreserveFloat32_ } , shaderSignedZeroInfNanPreserveFloat64{ shaderSignedZeroInfNanPreserveFloat64_ } , shaderDenormPreserveFloat16{ shaderDenormPreserveFloat16_ } , shaderDenormPreserveFloat32{ shaderDenormPreserveFloat32_ } , shaderDenormPreserveFloat64{ shaderDenormPreserveFloat64_ } , shaderDenormFlushToZeroFloat16{ shaderDenormFlushToZeroFloat16_ } , shaderDenormFlushToZeroFloat32{ shaderDenormFlushToZeroFloat32_ } , shaderDenormFlushToZeroFloat64{ shaderDenormFlushToZeroFloat64_ } , shaderRoundingModeRTEFloat16{ shaderRoundingModeRTEFloat16_ } , shaderRoundingModeRTEFloat32{ shaderRoundingModeRTEFloat32_ } , shaderRoundingModeRTEFloat64{ shaderRoundingModeRTEFloat64_ } , shaderRoundingModeRTZFloat16{ shaderRoundingModeRTZFloat16_ } , shaderRoundingModeRTZFloat32{ shaderRoundingModeRTZFloat32_ } , shaderRoundingModeRTZFloat64{ shaderRoundingModeRTZFloat64_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceFloatControlsProperties( PhysicalDeviceFloatControlsProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceFloatControlsProperties( VkPhysicalDeviceFloatControlsProperties const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceFloatControlsProperties( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceFloatControlsProperties & operator=( PhysicalDeviceFloatControlsProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceFloatControlsProperties & operator=( VkPhysicalDeviceFloatControlsProperties const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceFloatControlsProperties const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceFloatControlsProperties &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, denormBehaviorIndependence, roundingModeIndependence, shaderSignedZeroInfNanPreserveFloat16, shaderSignedZeroInfNanPreserveFloat32, shaderSignedZeroInfNanPreserveFloat64, shaderDenormPreserveFloat16, shaderDenormPreserveFloat32, shaderDenormPreserveFloat64, shaderDenormFlushToZeroFloat16, shaderDenormFlushToZeroFloat32, shaderDenormFlushToZeroFloat64, shaderRoundingModeRTEFloat16, shaderRoundingModeRTEFloat32, shaderRoundingModeRTEFloat64, shaderRoundingModeRTZFloat16, shaderRoundingModeRTZFloat32, shaderRoundingModeRTZFloat64 ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceFloatControlsProperties const & ) const = default; #else bool operator==( PhysicalDeviceFloatControlsProperties const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( denormBehaviorIndependence == rhs.denormBehaviorIndependence ) && ( roundingModeIndependence == rhs.roundingModeIndependence ) && ( shaderSignedZeroInfNanPreserveFloat16 == rhs.shaderSignedZeroInfNanPreserveFloat16 ) && ( shaderSignedZeroInfNanPreserveFloat32 == rhs.shaderSignedZeroInfNanPreserveFloat32 ) && ( shaderSignedZeroInfNanPreserveFloat64 == rhs.shaderSignedZeroInfNanPreserveFloat64 ) && ( shaderDenormPreserveFloat16 == rhs.shaderDenormPreserveFloat16 ) && ( shaderDenormPreserveFloat32 == rhs.shaderDenormPreserveFloat32 ) && ( shaderDenormPreserveFloat64 == rhs.shaderDenormPreserveFloat64 ) && ( shaderDenormFlushToZeroFloat16 == rhs.shaderDenormFlushToZeroFloat16 ) && ( shaderDenormFlushToZeroFloat32 == rhs.shaderDenormFlushToZeroFloat32 ) && ( shaderDenormFlushToZeroFloat64 == rhs.shaderDenormFlushToZeroFloat64 ) && ( shaderRoundingModeRTEFloat16 == rhs.shaderRoundingModeRTEFloat16 ) && ( shaderRoundingModeRTEFloat32 == rhs.shaderRoundingModeRTEFloat32 ) && ( shaderRoundingModeRTEFloat64 == rhs.shaderRoundingModeRTEFloat64 ) && ( shaderRoundingModeRTZFloat16 == rhs.shaderRoundingModeRTZFloat16 ) && ( shaderRoundingModeRTZFloat32 == rhs.shaderRoundingModeRTZFloat32 ) && ( shaderRoundingModeRTZFloat64 == rhs.shaderRoundingModeRTZFloat64 ); # endif } bool operator!=( PhysicalDeviceFloatControlsProperties const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceFloatControlsProperties; void * pNext = {}; VULKAN_HPP_NAMESPACE::ShaderFloatControlsIndependence denormBehaviorIndependence = VULKAN_HPP_NAMESPACE::ShaderFloatControlsIndependence::e32BitOnly; VULKAN_HPP_NAMESPACE::ShaderFloatControlsIndependence roundingModeIndependence = VULKAN_HPP_NAMESPACE::ShaderFloatControlsIndependence::e32BitOnly; VULKAN_HPP_NAMESPACE::Bool32 shaderSignedZeroInfNanPreserveFloat16 = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderSignedZeroInfNanPreserveFloat32 = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderSignedZeroInfNanPreserveFloat64 = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderDenormPreserveFloat16 = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderDenormPreserveFloat32 = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderDenormPreserveFloat64 = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderDenormFlushToZeroFloat16 = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderDenormFlushToZeroFloat32 = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderDenormFlushToZeroFloat64 = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderRoundingModeRTEFloat16 = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderRoundingModeRTEFloat32 = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderRoundingModeRTEFloat64 = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderRoundingModeRTZFloat16 = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderRoundingModeRTZFloat32 = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderRoundingModeRTZFloat64 = {}; }; template <> struct CppType { using Type = PhysicalDeviceFloatControlsProperties; }; using PhysicalDeviceFloatControlsPropertiesKHR = PhysicalDeviceFloatControlsProperties; struct PhysicalDeviceFragmentDensityMap2FeaturesEXT { using NativeType = VkPhysicalDeviceFragmentDensityMap2FeaturesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceFragmentDensityMap2FeaturesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceFragmentDensityMap2FeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 fragmentDensityMapDeferred_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , fragmentDensityMapDeferred{ fragmentDensityMapDeferred_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceFragmentDensityMap2FeaturesEXT( PhysicalDeviceFragmentDensityMap2FeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceFragmentDensityMap2FeaturesEXT( VkPhysicalDeviceFragmentDensityMap2FeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceFragmentDensityMap2FeaturesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceFragmentDensityMap2FeaturesEXT & operator=( PhysicalDeviceFragmentDensityMap2FeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceFragmentDensityMap2FeaturesEXT & operator=( VkPhysicalDeviceFragmentDensityMap2FeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFragmentDensityMap2FeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFragmentDensityMap2FeaturesEXT & setFragmentDensityMapDeferred( VULKAN_HPP_NAMESPACE::Bool32 fragmentDensityMapDeferred_ ) VULKAN_HPP_NOEXCEPT { fragmentDensityMapDeferred = fragmentDensityMapDeferred_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceFragmentDensityMap2FeaturesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceFragmentDensityMap2FeaturesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, fragmentDensityMapDeferred ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceFragmentDensityMap2FeaturesEXT const & ) const = default; #else bool operator==( PhysicalDeviceFragmentDensityMap2FeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( fragmentDensityMapDeferred == rhs.fragmentDensityMapDeferred ); # endif } bool operator!=( PhysicalDeviceFragmentDensityMap2FeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceFragmentDensityMap2FeaturesEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 fragmentDensityMapDeferred = {}; }; template <> struct CppType { using Type = PhysicalDeviceFragmentDensityMap2FeaturesEXT; }; struct PhysicalDeviceFragmentDensityMap2PropertiesEXT { using NativeType = VkPhysicalDeviceFragmentDensityMap2PropertiesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceFragmentDensityMap2PropertiesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceFragmentDensityMap2PropertiesEXT( VULKAN_HPP_NAMESPACE::Bool32 subsampledLoads_ = {}, VULKAN_HPP_NAMESPACE::Bool32 subsampledCoarseReconstructionEarlyAccess_ = {}, uint32_t maxSubsampledArrayLayers_ = {}, uint32_t maxDescriptorSetSubsampledSamplers_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , subsampledLoads{ subsampledLoads_ } , subsampledCoarseReconstructionEarlyAccess{ subsampledCoarseReconstructionEarlyAccess_ } , maxSubsampledArrayLayers{ maxSubsampledArrayLayers_ } , maxDescriptorSetSubsampledSamplers{ maxDescriptorSetSubsampledSamplers_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceFragmentDensityMap2PropertiesEXT( PhysicalDeviceFragmentDensityMap2PropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceFragmentDensityMap2PropertiesEXT( VkPhysicalDeviceFragmentDensityMap2PropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceFragmentDensityMap2PropertiesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceFragmentDensityMap2PropertiesEXT & operator=( PhysicalDeviceFragmentDensityMap2PropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceFragmentDensityMap2PropertiesEXT & operator=( VkPhysicalDeviceFragmentDensityMap2PropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceFragmentDensityMap2PropertiesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceFragmentDensityMap2PropertiesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, subsampledLoads, subsampledCoarseReconstructionEarlyAccess, maxSubsampledArrayLayers, maxDescriptorSetSubsampledSamplers ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceFragmentDensityMap2PropertiesEXT const & ) const = default; #else bool operator==( PhysicalDeviceFragmentDensityMap2PropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( subsampledLoads == rhs.subsampledLoads ) && ( subsampledCoarseReconstructionEarlyAccess == rhs.subsampledCoarseReconstructionEarlyAccess ) && ( maxSubsampledArrayLayers == rhs.maxSubsampledArrayLayers ) && ( maxDescriptorSetSubsampledSamplers == rhs.maxDescriptorSetSubsampledSamplers ); # endif } bool operator!=( PhysicalDeviceFragmentDensityMap2PropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceFragmentDensityMap2PropertiesEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 subsampledLoads = {}; VULKAN_HPP_NAMESPACE::Bool32 subsampledCoarseReconstructionEarlyAccess = {}; uint32_t maxSubsampledArrayLayers = {}; uint32_t maxDescriptorSetSubsampledSamplers = {}; }; template <> struct CppType { using Type = PhysicalDeviceFragmentDensityMap2PropertiesEXT; }; struct PhysicalDeviceFragmentDensityMapFeaturesEXT { using NativeType = VkPhysicalDeviceFragmentDensityMapFeaturesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceFragmentDensityMapFeaturesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceFragmentDensityMapFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 fragmentDensityMap_ = {}, VULKAN_HPP_NAMESPACE::Bool32 fragmentDensityMapDynamic_ = {}, VULKAN_HPP_NAMESPACE::Bool32 fragmentDensityMapNonSubsampledImages_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , fragmentDensityMap{ fragmentDensityMap_ } , fragmentDensityMapDynamic{ fragmentDensityMapDynamic_ } , fragmentDensityMapNonSubsampledImages{ fragmentDensityMapNonSubsampledImages_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceFragmentDensityMapFeaturesEXT( PhysicalDeviceFragmentDensityMapFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceFragmentDensityMapFeaturesEXT( VkPhysicalDeviceFragmentDensityMapFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceFragmentDensityMapFeaturesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceFragmentDensityMapFeaturesEXT & operator=( PhysicalDeviceFragmentDensityMapFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceFragmentDensityMapFeaturesEXT & operator=( VkPhysicalDeviceFragmentDensityMapFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFragmentDensityMapFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFragmentDensityMapFeaturesEXT & setFragmentDensityMap( VULKAN_HPP_NAMESPACE::Bool32 fragmentDensityMap_ ) VULKAN_HPP_NOEXCEPT { fragmentDensityMap = fragmentDensityMap_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFragmentDensityMapFeaturesEXT & setFragmentDensityMapDynamic( VULKAN_HPP_NAMESPACE::Bool32 fragmentDensityMapDynamic_ ) VULKAN_HPP_NOEXCEPT { fragmentDensityMapDynamic = fragmentDensityMapDynamic_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFragmentDensityMapFeaturesEXT & setFragmentDensityMapNonSubsampledImages( VULKAN_HPP_NAMESPACE::Bool32 fragmentDensityMapNonSubsampledImages_ ) VULKAN_HPP_NOEXCEPT { fragmentDensityMapNonSubsampledImages = fragmentDensityMapNonSubsampledImages_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceFragmentDensityMapFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceFragmentDensityMapFeaturesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, fragmentDensityMap, fragmentDensityMapDynamic, fragmentDensityMapNonSubsampledImages ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceFragmentDensityMapFeaturesEXT const & ) const = default; #else bool operator==( PhysicalDeviceFragmentDensityMapFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( fragmentDensityMap == rhs.fragmentDensityMap ) && ( fragmentDensityMapDynamic == rhs.fragmentDensityMapDynamic ) && ( fragmentDensityMapNonSubsampledImages == rhs.fragmentDensityMapNonSubsampledImages ); # endif } bool operator!=( PhysicalDeviceFragmentDensityMapFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceFragmentDensityMapFeaturesEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 fragmentDensityMap = {}; VULKAN_HPP_NAMESPACE::Bool32 fragmentDensityMapDynamic = {}; VULKAN_HPP_NAMESPACE::Bool32 fragmentDensityMapNonSubsampledImages = {}; }; template <> struct CppType { using Type = PhysicalDeviceFragmentDensityMapFeaturesEXT; }; struct PhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM { using NativeType = VkPhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM( VULKAN_HPP_NAMESPACE::Bool32 fragmentDensityMapOffset_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , fragmentDensityMapOffset{ fragmentDensityMapOffset_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM( PhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM( VkPhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM & operator=( PhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM & operator=( VkPhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM & setFragmentDensityMapOffset( VULKAN_HPP_NAMESPACE::Bool32 fragmentDensityMapOffset_ ) VULKAN_HPP_NOEXCEPT { fragmentDensityMapOffset = fragmentDensityMapOffset_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, fragmentDensityMapOffset ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM const & ) const = default; #else bool operator==( PhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( fragmentDensityMapOffset == rhs.fragmentDensityMapOffset ); # endif } bool operator!=( PhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 fragmentDensityMapOffset = {}; }; template <> struct CppType { using Type = PhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM; }; struct PhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM { using NativeType = VkPhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM( VULKAN_HPP_NAMESPACE::Extent2D fragmentDensityOffsetGranularity_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , fragmentDensityOffsetGranularity{ fragmentDensityOffsetGranularity_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM( PhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM( VkPhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM & operator=( PhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM & operator=( VkPhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, fragmentDensityOffsetGranularity ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM const & ) const = default; #else bool operator==( PhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( fragmentDensityOffsetGranularity == rhs.fragmentDensityOffsetGranularity ); # endif } bool operator!=( PhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM; void * pNext = {}; VULKAN_HPP_NAMESPACE::Extent2D fragmentDensityOffsetGranularity = {}; }; template <> struct CppType { using Type = PhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM; }; struct PhysicalDeviceFragmentDensityMapPropertiesEXT { using NativeType = VkPhysicalDeviceFragmentDensityMapPropertiesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceFragmentDensityMapPropertiesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceFragmentDensityMapPropertiesEXT( VULKAN_HPP_NAMESPACE::Extent2D minFragmentDensityTexelSize_ = {}, VULKAN_HPP_NAMESPACE::Extent2D maxFragmentDensityTexelSize_ = {}, VULKAN_HPP_NAMESPACE::Bool32 fragmentDensityInvocations_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , minFragmentDensityTexelSize{ minFragmentDensityTexelSize_ } , maxFragmentDensityTexelSize{ maxFragmentDensityTexelSize_ } , fragmentDensityInvocations{ fragmentDensityInvocations_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceFragmentDensityMapPropertiesEXT( PhysicalDeviceFragmentDensityMapPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceFragmentDensityMapPropertiesEXT( VkPhysicalDeviceFragmentDensityMapPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceFragmentDensityMapPropertiesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceFragmentDensityMapPropertiesEXT & operator=( PhysicalDeviceFragmentDensityMapPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceFragmentDensityMapPropertiesEXT & operator=( VkPhysicalDeviceFragmentDensityMapPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceFragmentDensityMapPropertiesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceFragmentDensityMapPropertiesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, minFragmentDensityTexelSize, maxFragmentDensityTexelSize, fragmentDensityInvocations ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceFragmentDensityMapPropertiesEXT const & ) const = default; #else bool operator==( PhysicalDeviceFragmentDensityMapPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( minFragmentDensityTexelSize == rhs.minFragmentDensityTexelSize ) && ( maxFragmentDensityTexelSize == rhs.maxFragmentDensityTexelSize ) && ( fragmentDensityInvocations == rhs.fragmentDensityInvocations ); # endif } bool operator!=( PhysicalDeviceFragmentDensityMapPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceFragmentDensityMapPropertiesEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::Extent2D minFragmentDensityTexelSize = {}; VULKAN_HPP_NAMESPACE::Extent2D maxFragmentDensityTexelSize = {}; VULKAN_HPP_NAMESPACE::Bool32 fragmentDensityInvocations = {}; }; template <> struct CppType { using Type = PhysicalDeviceFragmentDensityMapPropertiesEXT; }; struct PhysicalDeviceFragmentShaderBarycentricFeaturesKHR { using NativeType = VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceFragmentShaderBarycentricFeaturesKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceFragmentShaderBarycentricFeaturesKHR( VULKAN_HPP_NAMESPACE::Bool32 fragmentShaderBarycentric_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , fragmentShaderBarycentric{ fragmentShaderBarycentric_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceFragmentShaderBarycentricFeaturesKHR( PhysicalDeviceFragmentShaderBarycentricFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceFragmentShaderBarycentricFeaturesKHR( VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceFragmentShaderBarycentricFeaturesKHR( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceFragmentShaderBarycentricFeaturesKHR & operator=( PhysicalDeviceFragmentShaderBarycentricFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceFragmentShaderBarycentricFeaturesKHR & operator=( VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFragmentShaderBarycentricFeaturesKHR & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFragmentShaderBarycentricFeaturesKHR & setFragmentShaderBarycentric( VULKAN_HPP_NAMESPACE::Bool32 fragmentShaderBarycentric_ ) VULKAN_HPP_NOEXCEPT { fragmentShaderBarycentric = fragmentShaderBarycentric_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, fragmentShaderBarycentric ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceFragmentShaderBarycentricFeaturesKHR const & ) const = default; #else bool operator==( PhysicalDeviceFragmentShaderBarycentricFeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( fragmentShaderBarycentric == rhs.fragmentShaderBarycentric ); # endif } bool operator!=( PhysicalDeviceFragmentShaderBarycentricFeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceFragmentShaderBarycentricFeaturesKHR; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 fragmentShaderBarycentric = {}; }; template <> struct CppType { using Type = PhysicalDeviceFragmentShaderBarycentricFeaturesKHR; }; using PhysicalDeviceFragmentShaderBarycentricFeaturesNV = PhysicalDeviceFragmentShaderBarycentricFeaturesKHR; struct PhysicalDeviceFragmentShaderBarycentricPropertiesKHR { using NativeType = VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceFragmentShaderBarycentricPropertiesKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceFragmentShaderBarycentricPropertiesKHR( VULKAN_HPP_NAMESPACE::Bool32 triStripVertexOrderIndependentOfProvokingVertex_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , triStripVertexOrderIndependentOfProvokingVertex{ triStripVertexOrderIndependentOfProvokingVertex_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceFragmentShaderBarycentricPropertiesKHR( PhysicalDeviceFragmentShaderBarycentricPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceFragmentShaderBarycentricPropertiesKHR( VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceFragmentShaderBarycentricPropertiesKHR( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceFragmentShaderBarycentricPropertiesKHR & operator=( PhysicalDeviceFragmentShaderBarycentricPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceFragmentShaderBarycentricPropertiesKHR & operator=( VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, triStripVertexOrderIndependentOfProvokingVertex ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceFragmentShaderBarycentricPropertiesKHR const & ) const = default; #else bool operator==( PhysicalDeviceFragmentShaderBarycentricPropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( triStripVertexOrderIndependentOfProvokingVertex == rhs.triStripVertexOrderIndependentOfProvokingVertex ); # endif } bool operator!=( PhysicalDeviceFragmentShaderBarycentricPropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceFragmentShaderBarycentricPropertiesKHR; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 triStripVertexOrderIndependentOfProvokingVertex = {}; }; template <> struct CppType { using Type = PhysicalDeviceFragmentShaderBarycentricPropertiesKHR; }; struct PhysicalDeviceFragmentShaderInterlockFeaturesEXT { using NativeType = VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceFragmentShaderInterlockFeaturesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceFragmentShaderInterlockFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 fragmentShaderSampleInterlock_ = {}, VULKAN_HPP_NAMESPACE::Bool32 fragmentShaderPixelInterlock_ = {}, VULKAN_HPP_NAMESPACE::Bool32 fragmentShaderShadingRateInterlock_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , fragmentShaderSampleInterlock{ fragmentShaderSampleInterlock_ } , fragmentShaderPixelInterlock{ fragmentShaderPixelInterlock_ } , fragmentShaderShadingRateInterlock{ fragmentShaderShadingRateInterlock_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceFragmentShaderInterlockFeaturesEXT( PhysicalDeviceFragmentShaderInterlockFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceFragmentShaderInterlockFeaturesEXT( VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceFragmentShaderInterlockFeaturesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceFragmentShaderInterlockFeaturesEXT & operator=( PhysicalDeviceFragmentShaderInterlockFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceFragmentShaderInterlockFeaturesEXT & operator=( VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFragmentShaderInterlockFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFragmentShaderInterlockFeaturesEXT & setFragmentShaderSampleInterlock( VULKAN_HPP_NAMESPACE::Bool32 fragmentShaderSampleInterlock_ ) VULKAN_HPP_NOEXCEPT { fragmentShaderSampleInterlock = fragmentShaderSampleInterlock_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFragmentShaderInterlockFeaturesEXT & setFragmentShaderPixelInterlock( VULKAN_HPP_NAMESPACE::Bool32 fragmentShaderPixelInterlock_ ) VULKAN_HPP_NOEXCEPT { fragmentShaderPixelInterlock = fragmentShaderPixelInterlock_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFragmentShaderInterlockFeaturesEXT & setFragmentShaderShadingRateInterlock( VULKAN_HPP_NAMESPACE::Bool32 fragmentShaderShadingRateInterlock_ ) VULKAN_HPP_NOEXCEPT { fragmentShaderShadingRateInterlock = fragmentShaderShadingRateInterlock_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, fragmentShaderSampleInterlock, fragmentShaderPixelInterlock, fragmentShaderShadingRateInterlock ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceFragmentShaderInterlockFeaturesEXT const & ) const = default; #else bool operator==( PhysicalDeviceFragmentShaderInterlockFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( fragmentShaderSampleInterlock == rhs.fragmentShaderSampleInterlock ) && ( fragmentShaderPixelInterlock == rhs.fragmentShaderPixelInterlock ) && ( fragmentShaderShadingRateInterlock == rhs.fragmentShaderShadingRateInterlock ); # endif } bool operator!=( PhysicalDeviceFragmentShaderInterlockFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceFragmentShaderInterlockFeaturesEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 fragmentShaderSampleInterlock = {}; VULKAN_HPP_NAMESPACE::Bool32 fragmentShaderPixelInterlock = {}; VULKAN_HPP_NAMESPACE::Bool32 fragmentShaderShadingRateInterlock = {}; }; template <> struct CppType { using Type = PhysicalDeviceFragmentShaderInterlockFeaturesEXT; }; struct PhysicalDeviceFragmentShadingRateEnumsFeaturesNV { using NativeType = VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceFragmentShadingRateEnumsFeaturesNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceFragmentShadingRateEnumsFeaturesNV( VULKAN_HPP_NAMESPACE::Bool32 fragmentShadingRateEnums_ = {}, VULKAN_HPP_NAMESPACE::Bool32 supersampleFragmentShadingRates_ = {}, VULKAN_HPP_NAMESPACE::Bool32 noInvocationFragmentShadingRates_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , fragmentShadingRateEnums{ fragmentShadingRateEnums_ } , supersampleFragmentShadingRates{ supersampleFragmentShadingRates_ } , noInvocationFragmentShadingRates{ noInvocationFragmentShadingRates_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceFragmentShadingRateEnumsFeaturesNV( PhysicalDeviceFragmentShadingRateEnumsFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceFragmentShadingRateEnumsFeaturesNV( VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceFragmentShadingRateEnumsFeaturesNV( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceFragmentShadingRateEnumsFeaturesNV & operator=( PhysicalDeviceFragmentShadingRateEnumsFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceFragmentShadingRateEnumsFeaturesNV & operator=( VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFragmentShadingRateEnumsFeaturesNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFragmentShadingRateEnumsFeaturesNV & setFragmentShadingRateEnums( VULKAN_HPP_NAMESPACE::Bool32 fragmentShadingRateEnums_ ) VULKAN_HPP_NOEXCEPT { fragmentShadingRateEnums = fragmentShadingRateEnums_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFragmentShadingRateEnumsFeaturesNV & setSupersampleFragmentShadingRates( VULKAN_HPP_NAMESPACE::Bool32 supersampleFragmentShadingRates_ ) VULKAN_HPP_NOEXCEPT { supersampleFragmentShadingRates = supersampleFragmentShadingRates_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFragmentShadingRateEnumsFeaturesNV & setNoInvocationFragmentShadingRates( VULKAN_HPP_NAMESPACE::Bool32 noInvocationFragmentShadingRates_ ) VULKAN_HPP_NOEXCEPT { noInvocationFragmentShadingRates = noInvocationFragmentShadingRates_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, fragmentShadingRateEnums, supersampleFragmentShadingRates, noInvocationFragmentShadingRates ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceFragmentShadingRateEnumsFeaturesNV const & ) const = default; #else bool operator==( PhysicalDeviceFragmentShadingRateEnumsFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( fragmentShadingRateEnums == rhs.fragmentShadingRateEnums ) && ( supersampleFragmentShadingRates == rhs.supersampleFragmentShadingRates ) && ( noInvocationFragmentShadingRates == rhs.noInvocationFragmentShadingRates ); # endif } bool operator!=( PhysicalDeviceFragmentShadingRateEnumsFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceFragmentShadingRateEnumsFeaturesNV; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 fragmentShadingRateEnums = {}; VULKAN_HPP_NAMESPACE::Bool32 supersampleFragmentShadingRates = {}; VULKAN_HPP_NAMESPACE::Bool32 noInvocationFragmentShadingRates = {}; }; template <> struct CppType { using Type = PhysicalDeviceFragmentShadingRateEnumsFeaturesNV; }; struct PhysicalDeviceFragmentShadingRateEnumsPropertiesNV { using NativeType = VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceFragmentShadingRateEnumsPropertiesNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceFragmentShadingRateEnumsPropertiesNV( VULKAN_HPP_NAMESPACE::SampleCountFlagBits maxFragmentShadingRateInvocationCount_ = VULKAN_HPP_NAMESPACE::SampleCountFlagBits::e1, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , maxFragmentShadingRateInvocationCount{ maxFragmentShadingRateInvocationCount_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceFragmentShadingRateEnumsPropertiesNV( PhysicalDeviceFragmentShadingRateEnumsPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceFragmentShadingRateEnumsPropertiesNV( VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceFragmentShadingRateEnumsPropertiesNV( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceFragmentShadingRateEnumsPropertiesNV & operator=( PhysicalDeviceFragmentShadingRateEnumsPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceFragmentShadingRateEnumsPropertiesNV & operator=( VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFragmentShadingRateEnumsPropertiesNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFragmentShadingRateEnumsPropertiesNV & setMaxFragmentShadingRateInvocationCount( VULKAN_HPP_NAMESPACE::SampleCountFlagBits maxFragmentShadingRateInvocationCount_ ) VULKAN_HPP_NOEXCEPT { maxFragmentShadingRateInvocationCount = maxFragmentShadingRateInvocationCount_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, maxFragmentShadingRateInvocationCount ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceFragmentShadingRateEnumsPropertiesNV const & ) const = default; #else bool operator==( PhysicalDeviceFragmentShadingRateEnumsPropertiesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( maxFragmentShadingRateInvocationCount == rhs.maxFragmentShadingRateInvocationCount ); # endif } bool operator!=( PhysicalDeviceFragmentShadingRateEnumsPropertiesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceFragmentShadingRateEnumsPropertiesNV; void * pNext = {}; VULKAN_HPP_NAMESPACE::SampleCountFlagBits maxFragmentShadingRateInvocationCount = VULKAN_HPP_NAMESPACE::SampleCountFlagBits::e1; }; template <> struct CppType { using Type = PhysicalDeviceFragmentShadingRateEnumsPropertiesNV; }; struct PhysicalDeviceFragmentShadingRateFeaturesKHR { using NativeType = VkPhysicalDeviceFragmentShadingRateFeaturesKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceFragmentShadingRateFeaturesKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceFragmentShadingRateFeaturesKHR( VULKAN_HPP_NAMESPACE::Bool32 pipelineFragmentShadingRate_ = {}, VULKAN_HPP_NAMESPACE::Bool32 primitiveFragmentShadingRate_ = {}, VULKAN_HPP_NAMESPACE::Bool32 attachmentFragmentShadingRate_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , pipelineFragmentShadingRate{ pipelineFragmentShadingRate_ } , primitiveFragmentShadingRate{ primitiveFragmentShadingRate_ } , attachmentFragmentShadingRate{ attachmentFragmentShadingRate_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceFragmentShadingRateFeaturesKHR( PhysicalDeviceFragmentShadingRateFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceFragmentShadingRateFeaturesKHR( VkPhysicalDeviceFragmentShadingRateFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceFragmentShadingRateFeaturesKHR( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceFragmentShadingRateFeaturesKHR & operator=( PhysicalDeviceFragmentShadingRateFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceFragmentShadingRateFeaturesKHR & operator=( VkPhysicalDeviceFragmentShadingRateFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFragmentShadingRateFeaturesKHR & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFragmentShadingRateFeaturesKHR & setPipelineFragmentShadingRate( VULKAN_HPP_NAMESPACE::Bool32 pipelineFragmentShadingRate_ ) VULKAN_HPP_NOEXCEPT { pipelineFragmentShadingRate = pipelineFragmentShadingRate_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFragmentShadingRateFeaturesKHR & setPrimitiveFragmentShadingRate( VULKAN_HPP_NAMESPACE::Bool32 primitiveFragmentShadingRate_ ) VULKAN_HPP_NOEXCEPT { primitiveFragmentShadingRate = primitiveFragmentShadingRate_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFragmentShadingRateFeaturesKHR & setAttachmentFragmentShadingRate( VULKAN_HPP_NAMESPACE::Bool32 attachmentFragmentShadingRate_ ) VULKAN_HPP_NOEXCEPT { attachmentFragmentShadingRate = attachmentFragmentShadingRate_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceFragmentShadingRateFeaturesKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceFragmentShadingRateFeaturesKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, pipelineFragmentShadingRate, primitiveFragmentShadingRate, attachmentFragmentShadingRate ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceFragmentShadingRateFeaturesKHR const & ) const = default; #else bool operator==( PhysicalDeviceFragmentShadingRateFeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( pipelineFragmentShadingRate == rhs.pipelineFragmentShadingRate ) && ( primitiveFragmentShadingRate == rhs.primitiveFragmentShadingRate ) && ( attachmentFragmentShadingRate == rhs.attachmentFragmentShadingRate ); # endif } bool operator!=( PhysicalDeviceFragmentShadingRateFeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceFragmentShadingRateFeaturesKHR; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 pipelineFragmentShadingRate = {}; VULKAN_HPP_NAMESPACE::Bool32 primitiveFragmentShadingRate = {}; VULKAN_HPP_NAMESPACE::Bool32 attachmentFragmentShadingRate = {}; }; template <> struct CppType { using Type = PhysicalDeviceFragmentShadingRateFeaturesKHR; }; struct PhysicalDeviceFragmentShadingRateKHR { using NativeType = VkPhysicalDeviceFragmentShadingRateKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceFragmentShadingRateKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceFragmentShadingRateKHR( VULKAN_HPP_NAMESPACE::SampleCountFlags sampleCounts_ = {}, VULKAN_HPP_NAMESPACE::Extent2D fragmentSize_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , sampleCounts{ sampleCounts_ } , fragmentSize{ fragmentSize_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceFragmentShadingRateKHR( PhysicalDeviceFragmentShadingRateKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceFragmentShadingRateKHR( VkPhysicalDeviceFragmentShadingRateKHR const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceFragmentShadingRateKHR( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceFragmentShadingRateKHR & operator=( PhysicalDeviceFragmentShadingRateKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceFragmentShadingRateKHR & operator=( VkPhysicalDeviceFragmentShadingRateKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceFragmentShadingRateKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceFragmentShadingRateKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std:: tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, sampleCounts, fragmentSize ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceFragmentShadingRateKHR const & ) const = default; #else bool operator==( PhysicalDeviceFragmentShadingRateKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( sampleCounts == rhs.sampleCounts ) && ( fragmentSize == rhs.fragmentSize ); # endif } bool operator!=( PhysicalDeviceFragmentShadingRateKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceFragmentShadingRateKHR; void * pNext = {}; VULKAN_HPP_NAMESPACE::SampleCountFlags sampleCounts = {}; VULKAN_HPP_NAMESPACE::Extent2D fragmentSize = {}; }; template <> struct CppType { using Type = PhysicalDeviceFragmentShadingRateKHR; }; struct PhysicalDeviceFragmentShadingRatePropertiesKHR { using NativeType = VkPhysicalDeviceFragmentShadingRatePropertiesKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceFragmentShadingRatePropertiesKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceFragmentShadingRatePropertiesKHR( VULKAN_HPP_NAMESPACE::Extent2D minFragmentShadingRateAttachmentTexelSize_ = {}, VULKAN_HPP_NAMESPACE::Extent2D maxFragmentShadingRateAttachmentTexelSize_ = {}, uint32_t maxFragmentShadingRateAttachmentTexelSizeAspectRatio_ = {}, VULKAN_HPP_NAMESPACE::Bool32 primitiveFragmentShadingRateWithMultipleViewports_ = {}, VULKAN_HPP_NAMESPACE::Bool32 layeredShadingRateAttachments_ = {}, VULKAN_HPP_NAMESPACE::Bool32 fragmentShadingRateNonTrivialCombinerOps_ = {}, VULKAN_HPP_NAMESPACE::Extent2D maxFragmentSize_ = {}, uint32_t maxFragmentSizeAspectRatio_ = {}, uint32_t maxFragmentShadingRateCoverageSamples_ = {}, VULKAN_HPP_NAMESPACE::SampleCountFlagBits maxFragmentShadingRateRasterizationSamples_ = VULKAN_HPP_NAMESPACE::SampleCountFlagBits::e1, VULKAN_HPP_NAMESPACE::Bool32 fragmentShadingRateWithShaderDepthStencilWrites_ = {}, VULKAN_HPP_NAMESPACE::Bool32 fragmentShadingRateWithSampleMask_ = {}, VULKAN_HPP_NAMESPACE::Bool32 fragmentShadingRateWithShaderSampleMask_ = {}, VULKAN_HPP_NAMESPACE::Bool32 fragmentShadingRateWithConservativeRasterization_ = {}, VULKAN_HPP_NAMESPACE::Bool32 fragmentShadingRateWithFragmentShaderInterlock_ = {}, VULKAN_HPP_NAMESPACE::Bool32 fragmentShadingRateWithCustomSampleLocations_ = {}, VULKAN_HPP_NAMESPACE::Bool32 fragmentShadingRateStrictMultiplyCombiner_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , minFragmentShadingRateAttachmentTexelSize{ minFragmentShadingRateAttachmentTexelSize_ } , maxFragmentShadingRateAttachmentTexelSize{ maxFragmentShadingRateAttachmentTexelSize_ } , maxFragmentShadingRateAttachmentTexelSizeAspectRatio{ maxFragmentShadingRateAttachmentTexelSizeAspectRatio_ } , primitiveFragmentShadingRateWithMultipleViewports{ primitiveFragmentShadingRateWithMultipleViewports_ } , layeredShadingRateAttachments{ layeredShadingRateAttachments_ } , fragmentShadingRateNonTrivialCombinerOps{ fragmentShadingRateNonTrivialCombinerOps_ } , maxFragmentSize{ maxFragmentSize_ } , maxFragmentSizeAspectRatio{ maxFragmentSizeAspectRatio_ } , maxFragmentShadingRateCoverageSamples{ maxFragmentShadingRateCoverageSamples_ } , maxFragmentShadingRateRasterizationSamples{ maxFragmentShadingRateRasterizationSamples_ } , fragmentShadingRateWithShaderDepthStencilWrites{ fragmentShadingRateWithShaderDepthStencilWrites_ } , fragmentShadingRateWithSampleMask{ fragmentShadingRateWithSampleMask_ } , fragmentShadingRateWithShaderSampleMask{ fragmentShadingRateWithShaderSampleMask_ } , fragmentShadingRateWithConservativeRasterization{ fragmentShadingRateWithConservativeRasterization_ } , fragmentShadingRateWithFragmentShaderInterlock{ fragmentShadingRateWithFragmentShaderInterlock_ } , fragmentShadingRateWithCustomSampleLocations{ fragmentShadingRateWithCustomSampleLocations_ } , fragmentShadingRateStrictMultiplyCombiner{ fragmentShadingRateStrictMultiplyCombiner_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceFragmentShadingRatePropertiesKHR( PhysicalDeviceFragmentShadingRatePropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceFragmentShadingRatePropertiesKHR( VkPhysicalDeviceFragmentShadingRatePropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceFragmentShadingRatePropertiesKHR( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceFragmentShadingRatePropertiesKHR & operator=( PhysicalDeviceFragmentShadingRatePropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceFragmentShadingRatePropertiesKHR & operator=( VkPhysicalDeviceFragmentShadingRatePropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceFragmentShadingRatePropertiesKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceFragmentShadingRatePropertiesKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, minFragmentShadingRateAttachmentTexelSize, maxFragmentShadingRateAttachmentTexelSize, maxFragmentShadingRateAttachmentTexelSizeAspectRatio, primitiveFragmentShadingRateWithMultipleViewports, layeredShadingRateAttachments, fragmentShadingRateNonTrivialCombinerOps, maxFragmentSize, maxFragmentSizeAspectRatio, maxFragmentShadingRateCoverageSamples, maxFragmentShadingRateRasterizationSamples, fragmentShadingRateWithShaderDepthStencilWrites, fragmentShadingRateWithSampleMask, fragmentShadingRateWithShaderSampleMask, fragmentShadingRateWithConservativeRasterization, fragmentShadingRateWithFragmentShaderInterlock, fragmentShadingRateWithCustomSampleLocations, fragmentShadingRateStrictMultiplyCombiner ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceFragmentShadingRatePropertiesKHR const & ) const = default; #else bool operator==( PhysicalDeviceFragmentShadingRatePropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( minFragmentShadingRateAttachmentTexelSize == rhs.minFragmentShadingRateAttachmentTexelSize ) && ( maxFragmentShadingRateAttachmentTexelSize == rhs.maxFragmentShadingRateAttachmentTexelSize ) && ( maxFragmentShadingRateAttachmentTexelSizeAspectRatio == rhs.maxFragmentShadingRateAttachmentTexelSizeAspectRatio ) && ( primitiveFragmentShadingRateWithMultipleViewports == rhs.primitiveFragmentShadingRateWithMultipleViewports ) && ( layeredShadingRateAttachments == rhs.layeredShadingRateAttachments ) && ( fragmentShadingRateNonTrivialCombinerOps == rhs.fragmentShadingRateNonTrivialCombinerOps ) && ( maxFragmentSize == rhs.maxFragmentSize ) && ( maxFragmentSizeAspectRatio == rhs.maxFragmentSizeAspectRatio ) && ( maxFragmentShadingRateCoverageSamples == rhs.maxFragmentShadingRateCoverageSamples ) && ( maxFragmentShadingRateRasterizationSamples == rhs.maxFragmentShadingRateRasterizationSamples ) && ( fragmentShadingRateWithShaderDepthStencilWrites == rhs.fragmentShadingRateWithShaderDepthStencilWrites ) && ( fragmentShadingRateWithSampleMask == rhs.fragmentShadingRateWithSampleMask ) && ( fragmentShadingRateWithShaderSampleMask == rhs.fragmentShadingRateWithShaderSampleMask ) && ( fragmentShadingRateWithConservativeRasterization == rhs.fragmentShadingRateWithConservativeRasterization ) && ( fragmentShadingRateWithFragmentShaderInterlock == rhs.fragmentShadingRateWithFragmentShaderInterlock ) && ( fragmentShadingRateWithCustomSampleLocations == rhs.fragmentShadingRateWithCustomSampleLocations ) && ( fragmentShadingRateStrictMultiplyCombiner == rhs.fragmentShadingRateStrictMultiplyCombiner ); # endif } bool operator!=( PhysicalDeviceFragmentShadingRatePropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceFragmentShadingRatePropertiesKHR; void * pNext = {}; VULKAN_HPP_NAMESPACE::Extent2D minFragmentShadingRateAttachmentTexelSize = {}; VULKAN_HPP_NAMESPACE::Extent2D maxFragmentShadingRateAttachmentTexelSize = {}; uint32_t maxFragmentShadingRateAttachmentTexelSizeAspectRatio = {}; VULKAN_HPP_NAMESPACE::Bool32 primitiveFragmentShadingRateWithMultipleViewports = {}; VULKAN_HPP_NAMESPACE::Bool32 layeredShadingRateAttachments = {}; VULKAN_HPP_NAMESPACE::Bool32 fragmentShadingRateNonTrivialCombinerOps = {}; VULKAN_HPP_NAMESPACE::Extent2D maxFragmentSize = {}; uint32_t maxFragmentSizeAspectRatio = {}; uint32_t maxFragmentShadingRateCoverageSamples = {}; VULKAN_HPP_NAMESPACE::SampleCountFlagBits maxFragmentShadingRateRasterizationSamples = VULKAN_HPP_NAMESPACE::SampleCountFlagBits::e1; VULKAN_HPP_NAMESPACE::Bool32 fragmentShadingRateWithShaderDepthStencilWrites = {}; VULKAN_HPP_NAMESPACE::Bool32 fragmentShadingRateWithSampleMask = {}; VULKAN_HPP_NAMESPACE::Bool32 fragmentShadingRateWithShaderSampleMask = {}; VULKAN_HPP_NAMESPACE::Bool32 fragmentShadingRateWithConservativeRasterization = {}; VULKAN_HPP_NAMESPACE::Bool32 fragmentShadingRateWithFragmentShaderInterlock = {}; VULKAN_HPP_NAMESPACE::Bool32 fragmentShadingRateWithCustomSampleLocations = {}; VULKAN_HPP_NAMESPACE::Bool32 fragmentShadingRateStrictMultiplyCombiner = {}; }; template <> struct CppType { using Type = PhysicalDeviceFragmentShadingRatePropertiesKHR; }; struct PhysicalDeviceFrameBoundaryFeaturesEXT { using NativeType = VkPhysicalDeviceFrameBoundaryFeaturesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceFrameBoundaryFeaturesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceFrameBoundaryFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 frameBoundary_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , frameBoundary{ frameBoundary_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceFrameBoundaryFeaturesEXT( PhysicalDeviceFrameBoundaryFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceFrameBoundaryFeaturesEXT( VkPhysicalDeviceFrameBoundaryFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceFrameBoundaryFeaturesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceFrameBoundaryFeaturesEXT & operator=( PhysicalDeviceFrameBoundaryFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceFrameBoundaryFeaturesEXT & operator=( VkPhysicalDeviceFrameBoundaryFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFrameBoundaryFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceFrameBoundaryFeaturesEXT & setFrameBoundary( VULKAN_HPP_NAMESPACE::Bool32 frameBoundary_ ) VULKAN_HPP_NOEXCEPT { frameBoundary = frameBoundary_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceFrameBoundaryFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceFrameBoundaryFeaturesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, frameBoundary ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceFrameBoundaryFeaturesEXT const & ) const = default; #else bool operator==( PhysicalDeviceFrameBoundaryFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( frameBoundary == rhs.frameBoundary ); # endif } bool operator!=( PhysicalDeviceFrameBoundaryFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceFrameBoundaryFeaturesEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 frameBoundary = {}; }; template <> struct CppType { using Type = PhysicalDeviceFrameBoundaryFeaturesEXT; }; struct PhysicalDeviceGlobalPriorityQueryFeatures { using NativeType = VkPhysicalDeviceGlobalPriorityQueryFeatures; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceGlobalPriorityQueryFeatures; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceGlobalPriorityQueryFeatures( VULKAN_HPP_NAMESPACE::Bool32 globalPriorityQuery_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , globalPriorityQuery{ globalPriorityQuery_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceGlobalPriorityQueryFeatures( PhysicalDeviceGlobalPriorityQueryFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceGlobalPriorityQueryFeatures( VkPhysicalDeviceGlobalPriorityQueryFeatures const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceGlobalPriorityQueryFeatures( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceGlobalPriorityQueryFeatures & operator=( PhysicalDeviceGlobalPriorityQueryFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceGlobalPriorityQueryFeatures & operator=( VkPhysicalDeviceGlobalPriorityQueryFeatures const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceGlobalPriorityQueryFeatures & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceGlobalPriorityQueryFeatures & setGlobalPriorityQuery( VULKAN_HPP_NAMESPACE::Bool32 globalPriorityQuery_ ) VULKAN_HPP_NOEXCEPT { globalPriorityQuery = globalPriorityQuery_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceGlobalPriorityQueryFeatures const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceGlobalPriorityQueryFeatures &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, globalPriorityQuery ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceGlobalPriorityQueryFeatures const & ) const = default; #else bool operator==( PhysicalDeviceGlobalPriorityQueryFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( globalPriorityQuery == rhs.globalPriorityQuery ); # endif } bool operator!=( PhysicalDeviceGlobalPriorityQueryFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceGlobalPriorityQueryFeatures; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 globalPriorityQuery = {}; }; template <> struct CppType { using Type = PhysicalDeviceGlobalPriorityQueryFeatures; }; using PhysicalDeviceGlobalPriorityQueryFeaturesEXT = PhysicalDeviceGlobalPriorityQueryFeatures; using PhysicalDeviceGlobalPriorityQueryFeaturesKHR = PhysicalDeviceGlobalPriorityQueryFeatures; struct PhysicalDeviceGraphicsPipelineLibraryFeaturesEXT { using NativeType = VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceGraphicsPipelineLibraryFeaturesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceGraphicsPipelineLibraryFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 graphicsPipelineLibrary_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , graphicsPipelineLibrary{ graphicsPipelineLibrary_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceGraphicsPipelineLibraryFeaturesEXT( PhysicalDeviceGraphicsPipelineLibraryFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceGraphicsPipelineLibraryFeaturesEXT( VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceGraphicsPipelineLibraryFeaturesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceGraphicsPipelineLibraryFeaturesEXT & operator=( PhysicalDeviceGraphicsPipelineLibraryFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceGraphicsPipelineLibraryFeaturesEXT & operator=( VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceGraphicsPipelineLibraryFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceGraphicsPipelineLibraryFeaturesEXT & setGraphicsPipelineLibrary( VULKAN_HPP_NAMESPACE::Bool32 graphicsPipelineLibrary_ ) VULKAN_HPP_NOEXCEPT { graphicsPipelineLibrary = graphicsPipelineLibrary_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, graphicsPipelineLibrary ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceGraphicsPipelineLibraryFeaturesEXT const & ) const = default; #else bool operator==( PhysicalDeviceGraphicsPipelineLibraryFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( graphicsPipelineLibrary == rhs.graphicsPipelineLibrary ); # endif } bool operator!=( PhysicalDeviceGraphicsPipelineLibraryFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceGraphicsPipelineLibraryFeaturesEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 graphicsPipelineLibrary = {}; }; template <> struct CppType { using Type = PhysicalDeviceGraphicsPipelineLibraryFeaturesEXT; }; struct PhysicalDeviceGraphicsPipelineLibraryPropertiesEXT { using NativeType = VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceGraphicsPipelineLibraryPropertiesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceGraphicsPipelineLibraryPropertiesEXT( VULKAN_HPP_NAMESPACE::Bool32 graphicsPipelineLibraryFastLinking_ = {}, VULKAN_HPP_NAMESPACE::Bool32 graphicsPipelineLibraryIndependentInterpolationDecoration_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , graphicsPipelineLibraryFastLinking{ graphicsPipelineLibraryFastLinking_ } , graphicsPipelineLibraryIndependentInterpolationDecoration{ graphicsPipelineLibraryIndependentInterpolationDecoration_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceGraphicsPipelineLibraryPropertiesEXT( PhysicalDeviceGraphicsPipelineLibraryPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceGraphicsPipelineLibraryPropertiesEXT( VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceGraphicsPipelineLibraryPropertiesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceGraphicsPipelineLibraryPropertiesEXT & operator=( PhysicalDeviceGraphicsPipelineLibraryPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceGraphicsPipelineLibraryPropertiesEXT & operator=( VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceGraphicsPipelineLibraryPropertiesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceGraphicsPipelineLibraryPropertiesEXT & setGraphicsPipelineLibraryFastLinking( VULKAN_HPP_NAMESPACE::Bool32 graphicsPipelineLibraryFastLinking_ ) VULKAN_HPP_NOEXCEPT { graphicsPipelineLibraryFastLinking = graphicsPipelineLibraryFastLinking_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceGraphicsPipelineLibraryPropertiesEXT & setGraphicsPipelineLibraryIndependentInterpolationDecoration( VULKAN_HPP_NAMESPACE::Bool32 graphicsPipelineLibraryIndependentInterpolationDecoration_ ) VULKAN_HPP_NOEXCEPT { graphicsPipelineLibraryIndependentInterpolationDecoration = graphicsPipelineLibraryIndependentInterpolationDecoration_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, graphicsPipelineLibraryFastLinking, graphicsPipelineLibraryIndependentInterpolationDecoration ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceGraphicsPipelineLibraryPropertiesEXT const & ) const = default; #else bool operator==( PhysicalDeviceGraphicsPipelineLibraryPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( graphicsPipelineLibraryFastLinking == rhs.graphicsPipelineLibraryFastLinking ) && ( graphicsPipelineLibraryIndependentInterpolationDecoration == rhs.graphicsPipelineLibraryIndependentInterpolationDecoration ); # endif } bool operator!=( PhysicalDeviceGraphicsPipelineLibraryPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceGraphicsPipelineLibraryPropertiesEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 graphicsPipelineLibraryFastLinking = {}; VULKAN_HPP_NAMESPACE::Bool32 graphicsPipelineLibraryIndependentInterpolationDecoration = {}; }; template <> struct CppType { using Type = PhysicalDeviceGraphicsPipelineLibraryPropertiesEXT; }; struct PhysicalDeviceGroupProperties { using NativeType = VkPhysicalDeviceGroupProperties; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceGroupProperties; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceGroupProperties( uint32_t physicalDeviceCount_ = {}, std::array const & physicalDevices_ = {}, VULKAN_HPP_NAMESPACE::Bool32 subsetAllocation_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , physicalDeviceCount{ physicalDeviceCount_ } , physicalDevices{ physicalDevices_ } , subsetAllocation{ subsetAllocation_ } { } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceGroupProperties( PhysicalDeviceGroupProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceGroupProperties( VkPhysicalDeviceGroupProperties const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceGroupProperties( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceGroupProperties & operator=( PhysicalDeviceGroupProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceGroupProperties & operator=( VkPhysicalDeviceGroupProperties const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceGroupProperties const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceGroupProperties &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple const &, VULKAN_HPP_NAMESPACE::Bool32 const &> # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, physicalDeviceCount, physicalDevices, subsetAllocation ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) std::strong_ordering operator<=>( PhysicalDeviceGroupProperties const & rhs ) const VULKAN_HPP_NOEXCEPT { if ( auto cmp = sType <=> rhs.sType; cmp != 0 ) return cmp; if ( auto cmp = pNext <=> rhs.pNext; cmp != 0 ) return cmp; if ( auto cmp = physicalDeviceCount <=> rhs.physicalDeviceCount; cmp != 0 ) return cmp; for ( size_t i = 0; i < physicalDeviceCount; ++i ) { if ( auto cmp = physicalDevices[i] <=> rhs.physicalDevices[i]; cmp != 0 ) return cmp; } if ( auto cmp = subsetAllocation <=> rhs.subsetAllocation; cmp != 0 ) return cmp; return std::strong_ordering::equivalent; } #endif bool operator==( PhysicalDeviceGroupProperties const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( physicalDeviceCount == rhs.physicalDeviceCount ) && ( memcmp( physicalDevices, rhs.physicalDevices, physicalDeviceCount * sizeof( VULKAN_HPP_NAMESPACE::PhysicalDevice ) ) == 0 ) && ( subsetAllocation == rhs.subsetAllocation ); } bool operator!=( PhysicalDeviceGroupProperties const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceGroupProperties; void * pNext = {}; uint32_t physicalDeviceCount = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D physicalDevices = {}; VULKAN_HPP_NAMESPACE::Bool32 subsetAllocation = {}; }; template <> struct CppType { using Type = PhysicalDeviceGroupProperties; }; using PhysicalDeviceGroupPropertiesKHR = PhysicalDeviceGroupProperties; struct PhysicalDeviceHdrVividFeaturesHUAWEI { using NativeType = VkPhysicalDeviceHdrVividFeaturesHUAWEI; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceHdrVividFeaturesHUAWEI; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceHdrVividFeaturesHUAWEI( VULKAN_HPP_NAMESPACE::Bool32 hdrVivid_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , hdrVivid{ hdrVivid_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceHdrVividFeaturesHUAWEI( PhysicalDeviceHdrVividFeaturesHUAWEI const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceHdrVividFeaturesHUAWEI( VkPhysicalDeviceHdrVividFeaturesHUAWEI const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceHdrVividFeaturesHUAWEI( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceHdrVividFeaturesHUAWEI & operator=( PhysicalDeviceHdrVividFeaturesHUAWEI const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceHdrVividFeaturesHUAWEI & operator=( VkPhysicalDeviceHdrVividFeaturesHUAWEI const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceHdrVividFeaturesHUAWEI & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceHdrVividFeaturesHUAWEI & setHdrVivid( VULKAN_HPP_NAMESPACE::Bool32 hdrVivid_ ) VULKAN_HPP_NOEXCEPT { hdrVivid = hdrVivid_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceHdrVividFeaturesHUAWEI const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceHdrVividFeaturesHUAWEI &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, hdrVivid ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceHdrVividFeaturesHUAWEI const & ) const = default; #else bool operator==( PhysicalDeviceHdrVividFeaturesHUAWEI const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( hdrVivid == rhs.hdrVivid ); # endif } bool operator!=( PhysicalDeviceHdrVividFeaturesHUAWEI const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceHdrVividFeaturesHUAWEI; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 hdrVivid = {}; }; template <> struct CppType { using Type = PhysicalDeviceHdrVividFeaturesHUAWEI; }; struct PhysicalDeviceHostImageCopyFeatures { using NativeType = VkPhysicalDeviceHostImageCopyFeatures; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceHostImageCopyFeatures; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceHostImageCopyFeatures( VULKAN_HPP_NAMESPACE::Bool32 hostImageCopy_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , hostImageCopy{ hostImageCopy_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceHostImageCopyFeatures( PhysicalDeviceHostImageCopyFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceHostImageCopyFeatures( VkPhysicalDeviceHostImageCopyFeatures const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceHostImageCopyFeatures( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceHostImageCopyFeatures & operator=( PhysicalDeviceHostImageCopyFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceHostImageCopyFeatures & operator=( VkPhysicalDeviceHostImageCopyFeatures const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceHostImageCopyFeatures & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceHostImageCopyFeatures & setHostImageCopy( VULKAN_HPP_NAMESPACE::Bool32 hostImageCopy_ ) VULKAN_HPP_NOEXCEPT { hostImageCopy = hostImageCopy_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceHostImageCopyFeatures const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceHostImageCopyFeatures &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, hostImageCopy ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceHostImageCopyFeatures const & ) const = default; #else bool operator==( PhysicalDeviceHostImageCopyFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( hostImageCopy == rhs.hostImageCopy ); # endif } bool operator!=( PhysicalDeviceHostImageCopyFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceHostImageCopyFeatures; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 hostImageCopy = {}; }; template <> struct CppType { using Type = PhysicalDeviceHostImageCopyFeatures; }; using PhysicalDeviceHostImageCopyFeaturesEXT = PhysicalDeviceHostImageCopyFeatures; struct PhysicalDeviceHostImageCopyProperties { using NativeType = VkPhysicalDeviceHostImageCopyProperties; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceHostImageCopyProperties; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceHostImageCopyProperties( uint32_t copySrcLayoutCount_ = {}, VULKAN_HPP_NAMESPACE::ImageLayout * pCopySrcLayouts_ = {}, uint32_t copyDstLayoutCount_ = {}, VULKAN_HPP_NAMESPACE::ImageLayout * pCopyDstLayouts_ = {}, std::array const & optimalTilingLayoutUUID_ = {}, VULKAN_HPP_NAMESPACE::Bool32 identicalMemoryTypeRequirements_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , copySrcLayoutCount{ copySrcLayoutCount_ } , pCopySrcLayouts{ pCopySrcLayouts_ } , copyDstLayoutCount{ copyDstLayoutCount_ } , pCopyDstLayouts{ pCopyDstLayouts_ } , optimalTilingLayoutUUID{ optimalTilingLayoutUUID_ } , identicalMemoryTypeRequirements{ identicalMemoryTypeRequirements_ } { } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceHostImageCopyProperties( PhysicalDeviceHostImageCopyProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceHostImageCopyProperties( VkPhysicalDeviceHostImageCopyProperties const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceHostImageCopyProperties( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) PhysicalDeviceHostImageCopyProperties( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & copySrcLayouts_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & copyDstLayouts_ = {}, std::array const & optimalTilingLayoutUUID_ = {}, VULKAN_HPP_NAMESPACE::Bool32 identicalMemoryTypeRequirements_ = {}, void * pNext_ = nullptr ) : pNext( pNext_ ) , copySrcLayoutCount( static_cast( copySrcLayouts_.size() ) ) , pCopySrcLayouts( copySrcLayouts_.data() ) , copyDstLayoutCount( static_cast( copyDstLayouts_.size() ) ) , pCopyDstLayouts( copyDstLayouts_.data() ) , optimalTilingLayoutUUID( optimalTilingLayoutUUID_ ) , identicalMemoryTypeRequirements( identicalMemoryTypeRequirements_ ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ PhysicalDeviceHostImageCopyProperties & operator=( PhysicalDeviceHostImageCopyProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceHostImageCopyProperties & operator=( VkPhysicalDeviceHostImageCopyProperties const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceHostImageCopyProperties & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceHostImageCopyProperties & setCopySrcLayoutCount( uint32_t copySrcLayoutCount_ ) VULKAN_HPP_NOEXCEPT { copySrcLayoutCount = copySrcLayoutCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceHostImageCopyProperties & setPCopySrcLayouts( VULKAN_HPP_NAMESPACE::ImageLayout * pCopySrcLayouts_ ) VULKAN_HPP_NOEXCEPT { pCopySrcLayouts = pCopySrcLayouts_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) PhysicalDeviceHostImageCopyProperties & setCopySrcLayouts( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & copySrcLayouts_ ) VULKAN_HPP_NOEXCEPT { copySrcLayoutCount = static_cast( copySrcLayouts_.size() ); pCopySrcLayouts = copySrcLayouts_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceHostImageCopyProperties & setCopyDstLayoutCount( uint32_t copyDstLayoutCount_ ) VULKAN_HPP_NOEXCEPT { copyDstLayoutCount = copyDstLayoutCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceHostImageCopyProperties & setPCopyDstLayouts( VULKAN_HPP_NAMESPACE::ImageLayout * pCopyDstLayouts_ ) VULKAN_HPP_NOEXCEPT { pCopyDstLayouts = pCopyDstLayouts_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) PhysicalDeviceHostImageCopyProperties & setCopyDstLayouts( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & copyDstLayouts_ ) VULKAN_HPP_NOEXCEPT { copyDstLayoutCount = static_cast( copyDstLayouts_.size() ); pCopyDstLayouts = copyDstLayouts_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceHostImageCopyProperties & setOptimalTilingLayoutUUID( std::array optimalTilingLayoutUUID_ ) VULKAN_HPP_NOEXCEPT { optimalTilingLayoutUUID = optimalTilingLayoutUUID_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceHostImageCopyProperties & setIdenticalMemoryTypeRequirements( VULKAN_HPP_NAMESPACE::Bool32 identicalMemoryTypeRequirements_ ) VULKAN_HPP_NOEXCEPT { identicalMemoryTypeRequirements = identicalMemoryTypeRequirements_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceHostImageCopyProperties const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceHostImageCopyProperties &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple const &, VULKAN_HPP_NAMESPACE::Bool32 const &> # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, copySrcLayoutCount, pCopySrcLayouts, copyDstLayoutCount, pCopyDstLayouts, optimalTilingLayoutUUID, identicalMemoryTypeRequirements ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceHostImageCopyProperties const & ) const = default; #else bool operator==( PhysicalDeviceHostImageCopyProperties const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( copySrcLayoutCount == rhs.copySrcLayoutCount ) && ( pCopySrcLayouts == rhs.pCopySrcLayouts ) && ( copyDstLayoutCount == rhs.copyDstLayoutCount ) && ( pCopyDstLayouts == rhs.pCopyDstLayouts ) && ( optimalTilingLayoutUUID == rhs.optimalTilingLayoutUUID ) && ( identicalMemoryTypeRequirements == rhs.identicalMemoryTypeRequirements ); # endif } bool operator!=( PhysicalDeviceHostImageCopyProperties const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceHostImageCopyProperties; void * pNext = {}; uint32_t copySrcLayoutCount = {}; VULKAN_HPP_NAMESPACE::ImageLayout * pCopySrcLayouts = {}; uint32_t copyDstLayoutCount = {}; VULKAN_HPP_NAMESPACE::ImageLayout * pCopyDstLayouts = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D optimalTilingLayoutUUID = {}; VULKAN_HPP_NAMESPACE::Bool32 identicalMemoryTypeRequirements = {}; }; template <> struct CppType { using Type = PhysicalDeviceHostImageCopyProperties; }; using PhysicalDeviceHostImageCopyPropertiesEXT = PhysicalDeviceHostImageCopyProperties; struct PhysicalDeviceHostQueryResetFeatures { using NativeType = VkPhysicalDeviceHostQueryResetFeatures; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceHostQueryResetFeatures; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceHostQueryResetFeatures( VULKAN_HPP_NAMESPACE::Bool32 hostQueryReset_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , hostQueryReset{ hostQueryReset_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceHostQueryResetFeatures( PhysicalDeviceHostQueryResetFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceHostQueryResetFeatures( VkPhysicalDeviceHostQueryResetFeatures const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceHostQueryResetFeatures( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceHostQueryResetFeatures & operator=( PhysicalDeviceHostQueryResetFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceHostQueryResetFeatures & operator=( VkPhysicalDeviceHostQueryResetFeatures const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceHostQueryResetFeatures & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceHostQueryResetFeatures & setHostQueryReset( VULKAN_HPP_NAMESPACE::Bool32 hostQueryReset_ ) VULKAN_HPP_NOEXCEPT { hostQueryReset = hostQueryReset_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceHostQueryResetFeatures const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceHostQueryResetFeatures &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, hostQueryReset ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceHostQueryResetFeatures const & ) const = default; #else bool operator==( PhysicalDeviceHostQueryResetFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( hostQueryReset == rhs.hostQueryReset ); # endif } bool operator!=( PhysicalDeviceHostQueryResetFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceHostQueryResetFeatures; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 hostQueryReset = {}; }; template <> struct CppType { using Type = PhysicalDeviceHostQueryResetFeatures; }; using PhysicalDeviceHostQueryResetFeaturesEXT = PhysicalDeviceHostQueryResetFeatures; struct PhysicalDeviceIDProperties { using NativeType = VkPhysicalDeviceIDProperties; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceIdProperties; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceIDProperties( std::array const & deviceUUID_ = {}, std::array const & driverUUID_ = {}, std::array const & deviceLUID_ = {}, uint32_t deviceNodeMask_ = {}, VULKAN_HPP_NAMESPACE::Bool32 deviceLUIDValid_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , deviceUUID{ deviceUUID_ } , driverUUID{ driverUUID_ } , deviceLUID{ deviceLUID_ } , deviceNodeMask{ deviceNodeMask_ } , deviceLUIDValid{ deviceLUIDValid_ } { } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceIDProperties( PhysicalDeviceIDProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceIDProperties( VkPhysicalDeviceIDProperties const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceIDProperties( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceIDProperties & operator=( PhysicalDeviceIDProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceIDProperties & operator=( VkPhysicalDeviceIDProperties const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceIDProperties const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceIDProperties &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple const &, VULKAN_HPP_NAMESPACE::ArrayWrapper1D const &, VULKAN_HPP_NAMESPACE::ArrayWrapper1D const &, uint32_t const &, VULKAN_HPP_NAMESPACE::Bool32 const &> # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, deviceUUID, driverUUID, deviceLUID, deviceNodeMask, deviceLUIDValid ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceIDProperties const & ) const = default; #else bool operator==( PhysicalDeviceIDProperties const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( deviceUUID == rhs.deviceUUID ) && ( driverUUID == rhs.driverUUID ) && ( deviceLUID == rhs.deviceLUID ) && ( deviceNodeMask == rhs.deviceNodeMask ) && ( deviceLUIDValid == rhs.deviceLUIDValid ); # endif } bool operator!=( PhysicalDeviceIDProperties const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceIdProperties; void * pNext = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D deviceUUID = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D driverUUID = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D deviceLUID = {}; uint32_t deviceNodeMask = {}; VULKAN_HPP_NAMESPACE::Bool32 deviceLUIDValid = {}; }; template <> struct CppType { using Type = PhysicalDeviceIDProperties; }; using PhysicalDeviceIDPropertiesKHR = PhysicalDeviceIDProperties; struct PhysicalDeviceImage2DViewOf3DFeaturesEXT { using NativeType = VkPhysicalDeviceImage2DViewOf3DFeaturesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceImage2DViewOf3DFeaturesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceImage2DViewOf3DFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 image2DViewOf3D_ = {}, VULKAN_HPP_NAMESPACE::Bool32 sampler2DViewOf3D_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , image2DViewOf3D{ image2DViewOf3D_ } , sampler2DViewOf3D{ sampler2DViewOf3D_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceImage2DViewOf3DFeaturesEXT( PhysicalDeviceImage2DViewOf3DFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceImage2DViewOf3DFeaturesEXT( VkPhysicalDeviceImage2DViewOf3DFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceImage2DViewOf3DFeaturesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceImage2DViewOf3DFeaturesEXT & operator=( PhysicalDeviceImage2DViewOf3DFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceImage2DViewOf3DFeaturesEXT & operator=( VkPhysicalDeviceImage2DViewOf3DFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceImage2DViewOf3DFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceImage2DViewOf3DFeaturesEXT & setImage2DViewOf3D( VULKAN_HPP_NAMESPACE::Bool32 image2DViewOf3D_ ) VULKAN_HPP_NOEXCEPT { image2DViewOf3D = image2DViewOf3D_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceImage2DViewOf3DFeaturesEXT & setSampler2DViewOf3D( VULKAN_HPP_NAMESPACE::Bool32 sampler2DViewOf3D_ ) VULKAN_HPP_NOEXCEPT { sampler2DViewOf3D = sampler2DViewOf3D_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceImage2DViewOf3DFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceImage2DViewOf3DFeaturesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, image2DViewOf3D, sampler2DViewOf3D ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceImage2DViewOf3DFeaturesEXT const & ) const = default; #else bool operator==( PhysicalDeviceImage2DViewOf3DFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( image2DViewOf3D == rhs.image2DViewOf3D ) && ( sampler2DViewOf3D == rhs.sampler2DViewOf3D ); # endif } bool operator!=( PhysicalDeviceImage2DViewOf3DFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceImage2DViewOf3DFeaturesEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 image2DViewOf3D = {}; VULKAN_HPP_NAMESPACE::Bool32 sampler2DViewOf3D = {}; }; template <> struct CppType { using Type = PhysicalDeviceImage2DViewOf3DFeaturesEXT; }; struct PhysicalDeviceImageAlignmentControlFeaturesMESA { using NativeType = VkPhysicalDeviceImageAlignmentControlFeaturesMESA; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceImageAlignmentControlFeaturesMESA; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceImageAlignmentControlFeaturesMESA( VULKAN_HPP_NAMESPACE::Bool32 imageAlignmentControl_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , imageAlignmentControl{ imageAlignmentControl_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceImageAlignmentControlFeaturesMESA( PhysicalDeviceImageAlignmentControlFeaturesMESA const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceImageAlignmentControlFeaturesMESA( VkPhysicalDeviceImageAlignmentControlFeaturesMESA const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceImageAlignmentControlFeaturesMESA( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceImageAlignmentControlFeaturesMESA & operator=( PhysicalDeviceImageAlignmentControlFeaturesMESA const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceImageAlignmentControlFeaturesMESA & operator=( VkPhysicalDeviceImageAlignmentControlFeaturesMESA const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceImageAlignmentControlFeaturesMESA & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceImageAlignmentControlFeaturesMESA & setImageAlignmentControl( VULKAN_HPP_NAMESPACE::Bool32 imageAlignmentControl_ ) VULKAN_HPP_NOEXCEPT { imageAlignmentControl = imageAlignmentControl_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceImageAlignmentControlFeaturesMESA const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceImageAlignmentControlFeaturesMESA &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, imageAlignmentControl ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceImageAlignmentControlFeaturesMESA const & ) const = default; #else bool operator==( PhysicalDeviceImageAlignmentControlFeaturesMESA const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( imageAlignmentControl == rhs.imageAlignmentControl ); # endif } bool operator!=( PhysicalDeviceImageAlignmentControlFeaturesMESA const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceImageAlignmentControlFeaturesMESA; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 imageAlignmentControl = {}; }; template <> struct CppType { using Type = PhysicalDeviceImageAlignmentControlFeaturesMESA; }; struct PhysicalDeviceImageAlignmentControlPropertiesMESA { using NativeType = VkPhysicalDeviceImageAlignmentControlPropertiesMESA; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceImageAlignmentControlPropertiesMESA; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceImageAlignmentControlPropertiesMESA( uint32_t supportedImageAlignmentMask_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , supportedImageAlignmentMask{ supportedImageAlignmentMask_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceImageAlignmentControlPropertiesMESA( PhysicalDeviceImageAlignmentControlPropertiesMESA const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceImageAlignmentControlPropertiesMESA( VkPhysicalDeviceImageAlignmentControlPropertiesMESA const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceImageAlignmentControlPropertiesMESA( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceImageAlignmentControlPropertiesMESA & operator=( PhysicalDeviceImageAlignmentControlPropertiesMESA const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceImageAlignmentControlPropertiesMESA & operator=( VkPhysicalDeviceImageAlignmentControlPropertiesMESA const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceImageAlignmentControlPropertiesMESA & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceImageAlignmentControlPropertiesMESA & setSupportedImageAlignmentMask( uint32_t supportedImageAlignmentMask_ ) VULKAN_HPP_NOEXCEPT { supportedImageAlignmentMask = supportedImageAlignmentMask_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceImageAlignmentControlPropertiesMESA const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceImageAlignmentControlPropertiesMESA &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, supportedImageAlignmentMask ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceImageAlignmentControlPropertiesMESA const & ) const = default; #else bool operator==( PhysicalDeviceImageAlignmentControlPropertiesMESA const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( supportedImageAlignmentMask == rhs.supportedImageAlignmentMask ); # endif } bool operator!=( PhysicalDeviceImageAlignmentControlPropertiesMESA const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceImageAlignmentControlPropertiesMESA; void * pNext = {}; uint32_t supportedImageAlignmentMask = {}; }; template <> struct CppType { using Type = PhysicalDeviceImageAlignmentControlPropertiesMESA; }; struct PhysicalDeviceImageCompressionControlFeaturesEXT { using NativeType = VkPhysicalDeviceImageCompressionControlFeaturesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceImageCompressionControlFeaturesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceImageCompressionControlFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 imageCompressionControl_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , imageCompressionControl{ imageCompressionControl_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceImageCompressionControlFeaturesEXT( PhysicalDeviceImageCompressionControlFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceImageCompressionControlFeaturesEXT( VkPhysicalDeviceImageCompressionControlFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceImageCompressionControlFeaturesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceImageCompressionControlFeaturesEXT & operator=( PhysicalDeviceImageCompressionControlFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceImageCompressionControlFeaturesEXT & operator=( VkPhysicalDeviceImageCompressionControlFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceImageCompressionControlFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceImageCompressionControlFeaturesEXT & setImageCompressionControl( VULKAN_HPP_NAMESPACE::Bool32 imageCompressionControl_ ) VULKAN_HPP_NOEXCEPT { imageCompressionControl = imageCompressionControl_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceImageCompressionControlFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceImageCompressionControlFeaturesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, imageCompressionControl ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceImageCompressionControlFeaturesEXT const & ) const = default; #else bool operator==( PhysicalDeviceImageCompressionControlFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( imageCompressionControl == rhs.imageCompressionControl ); # endif } bool operator!=( PhysicalDeviceImageCompressionControlFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceImageCompressionControlFeaturesEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 imageCompressionControl = {}; }; template <> struct CppType { using Type = PhysicalDeviceImageCompressionControlFeaturesEXT; }; struct PhysicalDeviceImageCompressionControlSwapchainFeaturesEXT { using NativeType = VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceImageCompressionControlSwapchainFeaturesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceImageCompressionControlSwapchainFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 imageCompressionControlSwapchain_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , imageCompressionControlSwapchain{ imageCompressionControlSwapchain_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceImageCompressionControlSwapchainFeaturesEXT( PhysicalDeviceImageCompressionControlSwapchainFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceImageCompressionControlSwapchainFeaturesEXT( VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceImageCompressionControlSwapchainFeaturesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceImageCompressionControlSwapchainFeaturesEXT & operator=( PhysicalDeviceImageCompressionControlSwapchainFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceImageCompressionControlSwapchainFeaturesEXT & operator=( VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceImageCompressionControlSwapchainFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceImageCompressionControlSwapchainFeaturesEXT & setImageCompressionControlSwapchain( VULKAN_HPP_NAMESPACE::Bool32 imageCompressionControlSwapchain_ ) VULKAN_HPP_NOEXCEPT { imageCompressionControlSwapchain = imageCompressionControlSwapchain_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, imageCompressionControlSwapchain ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceImageCompressionControlSwapchainFeaturesEXT const & ) const = default; #else bool operator==( PhysicalDeviceImageCompressionControlSwapchainFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( imageCompressionControlSwapchain == rhs.imageCompressionControlSwapchain ); # endif } bool operator!=( PhysicalDeviceImageCompressionControlSwapchainFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceImageCompressionControlSwapchainFeaturesEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 imageCompressionControlSwapchain = {}; }; template <> struct CppType { using Type = PhysicalDeviceImageCompressionControlSwapchainFeaturesEXT; }; struct PhysicalDeviceImageDrmFormatModifierInfoEXT { using NativeType = VkPhysicalDeviceImageDrmFormatModifierInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceImageDrmFormatModifierInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceImageDrmFormatModifierInfoEXT( uint64_t drmFormatModifier_ = {}, VULKAN_HPP_NAMESPACE::SharingMode sharingMode_ = VULKAN_HPP_NAMESPACE::SharingMode::eExclusive, uint32_t queueFamilyIndexCount_ = {}, const uint32_t * pQueueFamilyIndices_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , drmFormatModifier{ drmFormatModifier_ } , sharingMode{ sharingMode_ } , queueFamilyIndexCount{ queueFamilyIndexCount_ } , pQueueFamilyIndices{ pQueueFamilyIndices_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceImageDrmFormatModifierInfoEXT( PhysicalDeviceImageDrmFormatModifierInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceImageDrmFormatModifierInfoEXT( VkPhysicalDeviceImageDrmFormatModifierInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceImageDrmFormatModifierInfoEXT( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) PhysicalDeviceImageDrmFormatModifierInfoEXT( uint64_t drmFormatModifier_, VULKAN_HPP_NAMESPACE::SharingMode sharingMode_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & queueFamilyIndices_, const void * pNext_ = nullptr ) : pNext( pNext_ ) , drmFormatModifier( drmFormatModifier_ ) , sharingMode( sharingMode_ ) , queueFamilyIndexCount( static_cast( queueFamilyIndices_.size() ) ) , pQueueFamilyIndices( queueFamilyIndices_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ PhysicalDeviceImageDrmFormatModifierInfoEXT & operator=( PhysicalDeviceImageDrmFormatModifierInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceImageDrmFormatModifierInfoEXT & operator=( VkPhysicalDeviceImageDrmFormatModifierInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceImageDrmFormatModifierInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceImageDrmFormatModifierInfoEXT & setDrmFormatModifier( uint64_t drmFormatModifier_ ) VULKAN_HPP_NOEXCEPT { drmFormatModifier = drmFormatModifier_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceImageDrmFormatModifierInfoEXT & setSharingMode( VULKAN_HPP_NAMESPACE::SharingMode sharingMode_ ) VULKAN_HPP_NOEXCEPT { sharingMode = sharingMode_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceImageDrmFormatModifierInfoEXT & setQueueFamilyIndexCount( uint32_t queueFamilyIndexCount_ ) VULKAN_HPP_NOEXCEPT { queueFamilyIndexCount = queueFamilyIndexCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceImageDrmFormatModifierInfoEXT & setPQueueFamilyIndices( const uint32_t * pQueueFamilyIndices_ ) VULKAN_HPP_NOEXCEPT { pQueueFamilyIndices = pQueueFamilyIndices_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) PhysicalDeviceImageDrmFormatModifierInfoEXT & setQueueFamilyIndices( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & queueFamilyIndices_ ) VULKAN_HPP_NOEXCEPT { queueFamilyIndexCount = static_cast( queueFamilyIndices_.size() ); pQueueFamilyIndices = queueFamilyIndices_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceImageDrmFormatModifierInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceImageDrmFormatModifierInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, drmFormatModifier, sharingMode, queueFamilyIndexCount, pQueueFamilyIndices ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceImageDrmFormatModifierInfoEXT const & ) const = default; #else bool operator==( PhysicalDeviceImageDrmFormatModifierInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( drmFormatModifier == rhs.drmFormatModifier ) && ( sharingMode == rhs.sharingMode ) && ( queueFamilyIndexCount == rhs.queueFamilyIndexCount ) && ( pQueueFamilyIndices == rhs.pQueueFamilyIndices ); # endif } bool operator!=( PhysicalDeviceImageDrmFormatModifierInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceImageDrmFormatModifierInfoEXT; const void * pNext = {}; uint64_t drmFormatModifier = {}; VULKAN_HPP_NAMESPACE::SharingMode sharingMode = VULKAN_HPP_NAMESPACE::SharingMode::eExclusive; uint32_t queueFamilyIndexCount = {}; const uint32_t * pQueueFamilyIndices = {}; }; template <> struct CppType { using Type = PhysicalDeviceImageDrmFormatModifierInfoEXT; }; struct PhysicalDeviceImageFormatInfo2 { using NativeType = VkPhysicalDeviceImageFormatInfo2; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceImageFormatInfo2; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceImageFormatInfo2( VULKAN_HPP_NAMESPACE::Format format_ = VULKAN_HPP_NAMESPACE::Format::eUndefined, VULKAN_HPP_NAMESPACE::ImageType type_ = VULKAN_HPP_NAMESPACE::ImageType::e1D, VULKAN_HPP_NAMESPACE::ImageTiling tiling_ = VULKAN_HPP_NAMESPACE::ImageTiling::eOptimal, VULKAN_HPP_NAMESPACE::ImageUsageFlags usage_ = {}, VULKAN_HPP_NAMESPACE::ImageCreateFlags flags_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , format{ format_ } , type{ type_ } , tiling{ tiling_ } , usage{ usage_ } , flags{ flags_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceImageFormatInfo2( PhysicalDeviceImageFormatInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceImageFormatInfo2( VkPhysicalDeviceImageFormatInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceImageFormatInfo2( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceImageFormatInfo2 & operator=( PhysicalDeviceImageFormatInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceImageFormatInfo2 & operator=( VkPhysicalDeviceImageFormatInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceImageFormatInfo2 & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceImageFormatInfo2 & setFormat( VULKAN_HPP_NAMESPACE::Format format_ ) VULKAN_HPP_NOEXCEPT { format = format_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceImageFormatInfo2 & setType( VULKAN_HPP_NAMESPACE::ImageType type_ ) VULKAN_HPP_NOEXCEPT { type = type_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceImageFormatInfo2 & setTiling( VULKAN_HPP_NAMESPACE::ImageTiling tiling_ ) VULKAN_HPP_NOEXCEPT { tiling = tiling_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceImageFormatInfo2 & setUsage( VULKAN_HPP_NAMESPACE::ImageUsageFlags usage_ ) VULKAN_HPP_NOEXCEPT { usage = usage_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceImageFormatInfo2 & setFlags( VULKAN_HPP_NAMESPACE::ImageCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceImageFormatInfo2 const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceImageFormatInfo2 &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, format, type, tiling, usage, flags ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceImageFormatInfo2 const & ) const = default; #else bool operator==( PhysicalDeviceImageFormatInfo2 const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( format == rhs.format ) && ( type == rhs.type ) && ( tiling == rhs.tiling ) && ( usage == rhs.usage ) && ( flags == rhs.flags ); # endif } bool operator!=( PhysicalDeviceImageFormatInfo2 const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceImageFormatInfo2; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Format format = VULKAN_HPP_NAMESPACE::Format::eUndefined; VULKAN_HPP_NAMESPACE::ImageType type = VULKAN_HPP_NAMESPACE::ImageType::e1D; VULKAN_HPP_NAMESPACE::ImageTiling tiling = VULKAN_HPP_NAMESPACE::ImageTiling::eOptimal; VULKAN_HPP_NAMESPACE::ImageUsageFlags usage = {}; VULKAN_HPP_NAMESPACE::ImageCreateFlags flags = {}; }; template <> struct CppType { using Type = PhysicalDeviceImageFormatInfo2; }; using PhysicalDeviceImageFormatInfo2KHR = PhysicalDeviceImageFormatInfo2; struct PhysicalDeviceImageProcessing2FeaturesQCOM { using NativeType = VkPhysicalDeviceImageProcessing2FeaturesQCOM; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceImageProcessing2FeaturesQCOM; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceImageProcessing2FeaturesQCOM( VULKAN_HPP_NAMESPACE::Bool32 textureBlockMatch2_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , textureBlockMatch2{ textureBlockMatch2_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceImageProcessing2FeaturesQCOM( PhysicalDeviceImageProcessing2FeaturesQCOM const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceImageProcessing2FeaturesQCOM( VkPhysicalDeviceImageProcessing2FeaturesQCOM const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceImageProcessing2FeaturesQCOM( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceImageProcessing2FeaturesQCOM & operator=( PhysicalDeviceImageProcessing2FeaturesQCOM const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceImageProcessing2FeaturesQCOM & operator=( VkPhysicalDeviceImageProcessing2FeaturesQCOM const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceImageProcessing2FeaturesQCOM & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceImageProcessing2FeaturesQCOM & setTextureBlockMatch2( VULKAN_HPP_NAMESPACE::Bool32 textureBlockMatch2_ ) VULKAN_HPP_NOEXCEPT { textureBlockMatch2 = textureBlockMatch2_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceImageProcessing2FeaturesQCOM const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceImageProcessing2FeaturesQCOM &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, textureBlockMatch2 ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceImageProcessing2FeaturesQCOM const & ) const = default; #else bool operator==( PhysicalDeviceImageProcessing2FeaturesQCOM const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( textureBlockMatch2 == rhs.textureBlockMatch2 ); # endif } bool operator!=( PhysicalDeviceImageProcessing2FeaturesQCOM const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceImageProcessing2FeaturesQCOM; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 textureBlockMatch2 = {}; }; template <> struct CppType { using Type = PhysicalDeviceImageProcessing2FeaturesQCOM; }; struct PhysicalDeviceImageProcessing2PropertiesQCOM { using NativeType = VkPhysicalDeviceImageProcessing2PropertiesQCOM; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceImageProcessing2PropertiesQCOM; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceImageProcessing2PropertiesQCOM( VULKAN_HPP_NAMESPACE::Extent2D maxBlockMatchWindow_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , maxBlockMatchWindow{ maxBlockMatchWindow_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceImageProcessing2PropertiesQCOM( PhysicalDeviceImageProcessing2PropertiesQCOM const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceImageProcessing2PropertiesQCOM( VkPhysicalDeviceImageProcessing2PropertiesQCOM const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceImageProcessing2PropertiesQCOM( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceImageProcessing2PropertiesQCOM & operator=( PhysicalDeviceImageProcessing2PropertiesQCOM const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceImageProcessing2PropertiesQCOM & operator=( VkPhysicalDeviceImageProcessing2PropertiesQCOM const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceImageProcessing2PropertiesQCOM const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceImageProcessing2PropertiesQCOM &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, maxBlockMatchWindow ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceImageProcessing2PropertiesQCOM const & ) const = default; #else bool operator==( PhysicalDeviceImageProcessing2PropertiesQCOM const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( maxBlockMatchWindow == rhs.maxBlockMatchWindow ); # endif } bool operator!=( PhysicalDeviceImageProcessing2PropertiesQCOM const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceImageProcessing2PropertiesQCOM; void * pNext = {}; VULKAN_HPP_NAMESPACE::Extent2D maxBlockMatchWindow = {}; }; template <> struct CppType { using Type = PhysicalDeviceImageProcessing2PropertiesQCOM; }; struct PhysicalDeviceImageProcessingFeaturesQCOM { using NativeType = VkPhysicalDeviceImageProcessingFeaturesQCOM; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceImageProcessingFeaturesQCOM; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceImageProcessingFeaturesQCOM( VULKAN_HPP_NAMESPACE::Bool32 textureSampleWeighted_ = {}, VULKAN_HPP_NAMESPACE::Bool32 textureBoxFilter_ = {}, VULKAN_HPP_NAMESPACE::Bool32 textureBlockMatch_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , textureSampleWeighted{ textureSampleWeighted_ } , textureBoxFilter{ textureBoxFilter_ } , textureBlockMatch{ textureBlockMatch_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceImageProcessingFeaturesQCOM( PhysicalDeviceImageProcessingFeaturesQCOM const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceImageProcessingFeaturesQCOM( VkPhysicalDeviceImageProcessingFeaturesQCOM const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceImageProcessingFeaturesQCOM( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceImageProcessingFeaturesQCOM & operator=( PhysicalDeviceImageProcessingFeaturesQCOM const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceImageProcessingFeaturesQCOM & operator=( VkPhysicalDeviceImageProcessingFeaturesQCOM const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceImageProcessingFeaturesQCOM & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceImageProcessingFeaturesQCOM & setTextureSampleWeighted( VULKAN_HPP_NAMESPACE::Bool32 textureSampleWeighted_ ) VULKAN_HPP_NOEXCEPT { textureSampleWeighted = textureSampleWeighted_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceImageProcessingFeaturesQCOM & setTextureBoxFilter( VULKAN_HPP_NAMESPACE::Bool32 textureBoxFilter_ ) VULKAN_HPP_NOEXCEPT { textureBoxFilter = textureBoxFilter_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceImageProcessingFeaturesQCOM & setTextureBlockMatch( VULKAN_HPP_NAMESPACE::Bool32 textureBlockMatch_ ) VULKAN_HPP_NOEXCEPT { textureBlockMatch = textureBlockMatch_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceImageProcessingFeaturesQCOM const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceImageProcessingFeaturesQCOM &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, textureSampleWeighted, textureBoxFilter, textureBlockMatch ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceImageProcessingFeaturesQCOM const & ) const = default; #else bool operator==( PhysicalDeviceImageProcessingFeaturesQCOM const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( textureSampleWeighted == rhs.textureSampleWeighted ) && ( textureBoxFilter == rhs.textureBoxFilter ) && ( textureBlockMatch == rhs.textureBlockMatch ); # endif } bool operator!=( PhysicalDeviceImageProcessingFeaturesQCOM const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceImageProcessingFeaturesQCOM; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 textureSampleWeighted = {}; VULKAN_HPP_NAMESPACE::Bool32 textureBoxFilter = {}; VULKAN_HPP_NAMESPACE::Bool32 textureBlockMatch = {}; }; template <> struct CppType { using Type = PhysicalDeviceImageProcessingFeaturesQCOM; }; struct PhysicalDeviceImageProcessingPropertiesQCOM { using NativeType = VkPhysicalDeviceImageProcessingPropertiesQCOM; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceImageProcessingPropertiesQCOM; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceImageProcessingPropertiesQCOM( uint32_t maxWeightFilterPhases_ = {}, VULKAN_HPP_NAMESPACE::Extent2D maxWeightFilterDimension_ = {}, VULKAN_HPP_NAMESPACE::Extent2D maxBlockMatchRegion_ = {}, VULKAN_HPP_NAMESPACE::Extent2D maxBoxFilterBlockSize_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , maxWeightFilterPhases{ maxWeightFilterPhases_ } , maxWeightFilterDimension{ maxWeightFilterDimension_ } , maxBlockMatchRegion{ maxBlockMatchRegion_ } , maxBoxFilterBlockSize{ maxBoxFilterBlockSize_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceImageProcessingPropertiesQCOM( PhysicalDeviceImageProcessingPropertiesQCOM const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceImageProcessingPropertiesQCOM( VkPhysicalDeviceImageProcessingPropertiesQCOM const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceImageProcessingPropertiesQCOM( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceImageProcessingPropertiesQCOM & operator=( PhysicalDeviceImageProcessingPropertiesQCOM const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceImageProcessingPropertiesQCOM & operator=( VkPhysicalDeviceImageProcessingPropertiesQCOM const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceImageProcessingPropertiesQCOM const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceImageProcessingPropertiesQCOM &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, maxWeightFilterPhases, maxWeightFilterDimension, maxBlockMatchRegion, maxBoxFilterBlockSize ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceImageProcessingPropertiesQCOM const & ) const = default; #else bool operator==( PhysicalDeviceImageProcessingPropertiesQCOM const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( maxWeightFilterPhases == rhs.maxWeightFilterPhases ) && ( maxWeightFilterDimension == rhs.maxWeightFilterDimension ) && ( maxBlockMatchRegion == rhs.maxBlockMatchRegion ) && ( maxBoxFilterBlockSize == rhs.maxBoxFilterBlockSize ); # endif } bool operator!=( PhysicalDeviceImageProcessingPropertiesQCOM const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceImageProcessingPropertiesQCOM; void * pNext = {}; uint32_t maxWeightFilterPhases = {}; VULKAN_HPP_NAMESPACE::Extent2D maxWeightFilterDimension = {}; VULKAN_HPP_NAMESPACE::Extent2D maxBlockMatchRegion = {}; VULKAN_HPP_NAMESPACE::Extent2D maxBoxFilterBlockSize = {}; }; template <> struct CppType { using Type = PhysicalDeviceImageProcessingPropertiesQCOM; }; struct PhysicalDeviceImageRobustnessFeatures { using NativeType = VkPhysicalDeviceImageRobustnessFeatures; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceImageRobustnessFeatures; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceImageRobustnessFeatures( VULKAN_HPP_NAMESPACE::Bool32 robustImageAccess_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , robustImageAccess{ robustImageAccess_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceImageRobustnessFeatures( PhysicalDeviceImageRobustnessFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceImageRobustnessFeatures( VkPhysicalDeviceImageRobustnessFeatures const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceImageRobustnessFeatures( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceImageRobustnessFeatures & operator=( PhysicalDeviceImageRobustnessFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceImageRobustnessFeatures & operator=( VkPhysicalDeviceImageRobustnessFeatures const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceImageRobustnessFeatures & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceImageRobustnessFeatures & setRobustImageAccess( VULKAN_HPP_NAMESPACE::Bool32 robustImageAccess_ ) VULKAN_HPP_NOEXCEPT { robustImageAccess = robustImageAccess_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceImageRobustnessFeatures const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceImageRobustnessFeatures &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, robustImageAccess ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceImageRobustnessFeatures const & ) const = default; #else bool operator==( PhysicalDeviceImageRobustnessFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( robustImageAccess == rhs.robustImageAccess ); # endif } bool operator!=( PhysicalDeviceImageRobustnessFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceImageRobustnessFeatures; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 robustImageAccess = {}; }; template <> struct CppType { using Type = PhysicalDeviceImageRobustnessFeatures; }; using PhysicalDeviceImageRobustnessFeaturesEXT = PhysicalDeviceImageRobustnessFeatures; struct PhysicalDeviceImageSlicedViewOf3DFeaturesEXT { using NativeType = VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceImageSlicedViewOf3DFeaturesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceImageSlicedViewOf3DFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 imageSlicedViewOf3D_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , imageSlicedViewOf3D{ imageSlicedViewOf3D_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceImageSlicedViewOf3DFeaturesEXT( PhysicalDeviceImageSlicedViewOf3DFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceImageSlicedViewOf3DFeaturesEXT( VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceImageSlicedViewOf3DFeaturesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceImageSlicedViewOf3DFeaturesEXT & operator=( PhysicalDeviceImageSlicedViewOf3DFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceImageSlicedViewOf3DFeaturesEXT & operator=( VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceImageSlicedViewOf3DFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceImageSlicedViewOf3DFeaturesEXT & setImageSlicedViewOf3D( VULKAN_HPP_NAMESPACE::Bool32 imageSlicedViewOf3D_ ) VULKAN_HPP_NOEXCEPT { imageSlicedViewOf3D = imageSlicedViewOf3D_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, imageSlicedViewOf3D ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceImageSlicedViewOf3DFeaturesEXT const & ) const = default; #else bool operator==( PhysicalDeviceImageSlicedViewOf3DFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( imageSlicedViewOf3D == rhs.imageSlicedViewOf3D ); # endif } bool operator!=( PhysicalDeviceImageSlicedViewOf3DFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceImageSlicedViewOf3DFeaturesEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 imageSlicedViewOf3D = {}; }; template <> struct CppType { using Type = PhysicalDeviceImageSlicedViewOf3DFeaturesEXT; }; struct PhysicalDeviceImageViewImageFormatInfoEXT { using NativeType = VkPhysicalDeviceImageViewImageFormatInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceImageViewImageFormatInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceImageViewImageFormatInfoEXT( VULKAN_HPP_NAMESPACE::ImageViewType imageViewType_ = VULKAN_HPP_NAMESPACE::ImageViewType::e1D, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , imageViewType{ imageViewType_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceImageViewImageFormatInfoEXT( PhysicalDeviceImageViewImageFormatInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceImageViewImageFormatInfoEXT( VkPhysicalDeviceImageViewImageFormatInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceImageViewImageFormatInfoEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceImageViewImageFormatInfoEXT & operator=( PhysicalDeviceImageViewImageFormatInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceImageViewImageFormatInfoEXT & operator=( VkPhysicalDeviceImageViewImageFormatInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceImageViewImageFormatInfoEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceImageViewImageFormatInfoEXT & setImageViewType( VULKAN_HPP_NAMESPACE::ImageViewType imageViewType_ ) VULKAN_HPP_NOEXCEPT { imageViewType = imageViewType_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceImageViewImageFormatInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceImageViewImageFormatInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, imageViewType ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceImageViewImageFormatInfoEXT const & ) const = default; #else bool operator==( PhysicalDeviceImageViewImageFormatInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( imageViewType == rhs.imageViewType ); # endif } bool operator!=( PhysicalDeviceImageViewImageFormatInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceImageViewImageFormatInfoEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::ImageViewType imageViewType = VULKAN_HPP_NAMESPACE::ImageViewType::e1D; }; template <> struct CppType { using Type = PhysicalDeviceImageViewImageFormatInfoEXT; }; struct PhysicalDeviceImageViewMinLodFeaturesEXT { using NativeType = VkPhysicalDeviceImageViewMinLodFeaturesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceImageViewMinLodFeaturesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceImageViewMinLodFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 minLod_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , minLod{ minLod_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceImageViewMinLodFeaturesEXT( PhysicalDeviceImageViewMinLodFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceImageViewMinLodFeaturesEXT( VkPhysicalDeviceImageViewMinLodFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceImageViewMinLodFeaturesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceImageViewMinLodFeaturesEXT & operator=( PhysicalDeviceImageViewMinLodFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceImageViewMinLodFeaturesEXT & operator=( VkPhysicalDeviceImageViewMinLodFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceImageViewMinLodFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceImageViewMinLodFeaturesEXT & setMinLod( VULKAN_HPP_NAMESPACE::Bool32 minLod_ ) VULKAN_HPP_NOEXCEPT { minLod = minLod_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceImageViewMinLodFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceImageViewMinLodFeaturesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, minLod ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceImageViewMinLodFeaturesEXT const & ) const = default; #else bool operator==( PhysicalDeviceImageViewMinLodFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( minLod == rhs.minLod ); # endif } bool operator!=( PhysicalDeviceImageViewMinLodFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceImageViewMinLodFeaturesEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 minLod = {}; }; template <> struct CppType { using Type = PhysicalDeviceImageViewMinLodFeaturesEXT; }; struct PhysicalDeviceImagelessFramebufferFeatures { using NativeType = VkPhysicalDeviceImagelessFramebufferFeatures; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceImagelessFramebufferFeatures; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceImagelessFramebufferFeatures( VULKAN_HPP_NAMESPACE::Bool32 imagelessFramebuffer_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , imagelessFramebuffer{ imagelessFramebuffer_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceImagelessFramebufferFeatures( PhysicalDeviceImagelessFramebufferFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceImagelessFramebufferFeatures( VkPhysicalDeviceImagelessFramebufferFeatures const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceImagelessFramebufferFeatures( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceImagelessFramebufferFeatures & operator=( PhysicalDeviceImagelessFramebufferFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceImagelessFramebufferFeatures & operator=( VkPhysicalDeviceImagelessFramebufferFeatures const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceImagelessFramebufferFeatures & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceImagelessFramebufferFeatures & setImagelessFramebuffer( VULKAN_HPP_NAMESPACE::Bool32 imagelessFramebuffer_ ) VULKAN_HPP_NOEXCEPT { imagelessFramebuffer = imagelessFramebuffer_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceImagelessFramebufferFeatures const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceImagelessFramebufferFeatures &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, imagelessFramebuffer ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceImagelessFramebufferFeatures const & ) const = default; #else bool operator==( PhysicalDeviceImagelessFramebufferFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( imagelessFramebuffer == rhs.imagelessFramebuffer ); # endif } bool operator!=( PhysicalDeviceImagelessFramebufferFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceImagelessFramebufferFeatures; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 imagelessFramebuffer = {}; }; template <> struct CppType { using Type = PhysicalDeviceImagelessFramebufferFeatures; }; using PhysicalDeviceImagelessFramebufferFeaturesKHR = PhysicalDeviceImagelessFramebufferFeatures; struct PhysicalDeviceIndexTypeUint8Features { using NativeType = VkPhysicalDeviceIndexTypeUint8Features; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceIndexTypeUint8Features; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceIndexTypeUint8Features( VULKAN_HPP_NAMESPACE::Bool32 indexTypeUint8_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , indexTypeUint8{ indexTypeUint8_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceIndexTypeUint8Features( PhysicalDeviceIndexTypeUint8Features const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceIndexTypeUint8Features( VkPhysicalDeviceIndexTypeUint8Features const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceIndexTypeUint8Features( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceIndexTypeUint8Features & operator=( PhysicalDeviceIndexTypeUint8Features const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceIndexTypeUint8Features & operator=( VkPhysicalDeviceIndexTypeUint8Features const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceIndexTypeUint8Features & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceIndexTypeUint8Features & setIndexTypeUint8( VULKAN_HPP_NAMESPACE::Bool32 indexTypeUint8_ ) VULKAN_HPP_NOEXCEPT { indexTypeUint8 = indexTypeUint8_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceIndexTypeUint8Features const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceIndexTypeUint8Features &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, indexTypeUint8 ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceIndexTypeUint8Features const & ) const = default; #else bool operator==( PhysicalDeviceIndexTypeUint8Features const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( indexTypeUint8 == rhs.indexTypeUint8 ); # endif } bool operator!=( PhysicalDeviceIndexTypeUint8Features const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceIndexTypeUint8Features; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 indexTypeUint8 = {}; }; template <> struct CppType { using Type = PhysicalDeviceIndexTypeUint8Features; }; using PhysicalDeviceIndexTypeUint8FeaturesEXT = PhysicalDeviceIndexTypeUint8Features; using PhysicalDeviceIndexTypeUint8FeaturesKHR = PhysicalDeviceIndexTypeUint8Features; struct PhysicalDeviceInheritedViewportScissorFeaturesNV { using NativeType = VkPhysicalDeviceInheritedViewportScissorFeaturesNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceInheritedViewportScissorFeaturesNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceInheritedViewportScissorFeaturesNV( VULKAN_HPP_NAMESPACE::Bool32 inheritedViewportScissor2D_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , inheritedViewportScissor2D{ inheritedViewportScissor2D_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceInheritedViewportScissorFeaturesNV( PhysicalDeviceInheritedViewportScissorFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceInheritedViewportScissorFeaturesNV( VkPhysicalDeviceInheritedViewportScissorFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceInheritedViewportScissorFeaturesNV( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceInheritedViewportScissorFeaturesNV & operator=( PhysicalDeviceInheritedViewportScissorFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceInheritedViewportScissorFeaturesNV & operator=( VkPhysicalDeviceInheritedViewportScissorFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceInheritedViewportScissorFeaturesNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceInheritedViewportScissorFeaturesNV & setInheritedViewportScissor2D( VULKAN_HPP_NAMESPACE::Bool32 inheritedViewportScissor2D_ ) VULKAN_HPP_NOEXCEPT { inheritedViewportScissor2D = inheritedViewportScissor2D_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceInheritedViewportScissorFeaturesNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceInheritedViewportScissorFeaturesNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, inheritedViewportScissor2D ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceInheritedViewportScissorFeaturesNV const & ) const = default; #else bool operator==( PhysicalDeviceInheritedViewportScissorFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( inheritedViewportScissor2D == rhs.inheritedViewportScissor2D ); # endif } bool operator!=( PhysicalDeviceInheritedViewportScissorFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceInheritedViewportScissorFeaturesNV; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 inheritedViewportScissor2D = {}; }; template <> struct CppType { using Type = PhysicalDeviceInheritedViewportScissorFeaturesNV; }; struct PhysicalDeviceInlineUniformBlockFeatures { using NativeType = VkPhysicalDeviceInlineUniformBlockFeatures; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceInlineUniformBlockFeatures; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceInlineUniformBlockFeatures( VULKAN_HPP_NAMESPACE::Bool32 inlineUniformBlock_ = {}, VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingInlineUniformBlockUpdateAfterBind_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , inlineUniformBlock{ inlineUniformBlock_ } , descriptorBindingInlineUniformBlockUpdateAfterBind{ descriptorBindingInlineUniformBlockUpdateAfterBind_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceInlineUniformBlockFeatures( PhysicalDeviceInlineUniformBlockFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceInlineUniformBlockFeatures( VkPhysicalDeviceInlineUniformBlockFeatures const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceInlineUniformBlockFeatures( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceInlineUniformBlockFeatures & operator=( PhysicalDeviceInlineUniformBlockFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceInlineUniformBlockFeatures & operator=( VkPhysicalDeviceInlineUniformBlockFeatures const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceInlineUniformBlockFeatures & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceInlineUniformBlockFeatures & setInlineUniformBlock( VULKAN_HPP_NAMESPACE::Bool32 inlineUniformBlock_ ) VULKAN_HPP_NOEXCEPT { inlineUniformBlock = inlineUniformBlock_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceInlineUniformBlockFeatures & setDescriptorBindingInlineUniformBlockUpdateAfterBind( VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingInlineUniformBlockUpdateAfterBind_ ) VULKAN_HPP_NOEXCEPT { descriptorBindingInlineUniformBlockUpdateAfterBind = descriptorBindingInlineUniformBlockUpdateAfterBind_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceInlineUniformBlockFeatures const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceInlineUniformBlockFeatures &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, inlineUniformBlock, descriptorBindingInlineUniformBlockUpdateAfterBind ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceInlineUniformBlockFeatures const & ) const = default; #else bool operator==( PhysicalDeviceInlineUniformBlockFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( inlineUniformBlock == rhs.inlineUniformBlock ) && ( descriptorBindingInlineUniformBlockUpdateAfterBind == rhs.descriptorBindingInlineUniformBlockUpdateAfterBind ); # endif } bool operator!=( PhysicalDeviceInlineUniformBlockFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceInlineUniformBlockFeatures; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 inlineUniformBlock = {}; VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingInlineUniformBlockUpdateAfterBind = {}; }; template <> struct CppType { using Type = PhysicalDeviceInlineUniformBlockFeatures; }; using PhysicalDeviceInlineUniformBlockFeaturesEXT = PhysicalDeviceInlineUniformBlockFeatures; struct PhysicalDeviceInlineUniformBlockProperties { using NativeType = VkPhysicalDeviceInlineUniformBlockProperties; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceInlineUniformBlockProperties; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceInlineUniformBlockProperties( uint32_t maxInlineUniformBlockSize_ = {}, uint32_t maxPerStageDescriptorInlineUniformBlocks_ = {}, uint32_t maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks_ = {}, uint32_t maxDescriptorSetInlineUniformBlocks_ = {}, uint32_t maxDescriptorSetUpdateAfterBindInlineUniformBlocks_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , maxInlineUniformBlockSize{ maxInlineUniformBlockSize_ } , maxPerStageDescriptorInlineUniformBlocks{ maxPerStageDescriptorInlineUniformBlocks_ } , maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks{ maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks_ } , maxDescriptorSetInlineUniformBlocks{ maxDescriptorSetInlineUniformBlocks_ } , maxDescriptorSetUpdateAfterBindInlineUniformBlocks{ maxDescriptorSetUpdateAfterBindInlineUniformBlocks_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceInlineUniformBlockProperties( PhysicalDeviceInlineUniformBlockProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceInlineUniformBlockProperties( VkPhysicalDeviceInlineUniformBlockProperties const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceInlineUniformBlockProperties( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceInlineUniformBlockProperties & operator=( PhysicalDeviceInlineUniformBlockProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceInlineUniformBlockProperties & operator=( VkPhysicalDeviceInlineUniformBlockProperties const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceInlineUniformBlockProperties const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceInlineUniformBlockProperties &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, maxInlineUniformBlockSize, maxPerStageDescriptorInlineUniformBlocks, maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks, maxDescriptorSetInlineUniformBlocks, maxDescriptorSetUpdateAfterBindInlineUniformBlocks ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceInlineUniformBlockProperties const & ) const = default; #else bool operator==( PhysicalDeviceInlineUniformBlockProperties const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( maxInlineUniformBlockSize == rhs.maxInlineUniformBlockSize ) && ( maxPerStageDescriptorInlineUniformBlocks == rhs.maxPerStageDescriptorInlineUniformBlocks ) && ( maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks == rhs.maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks ) && ( maxDescriptorSetInlineUniformBlocks == rhs.maxDescriptorSetInlineUniformBlocks ) && ( maxDescriptorSetUpdateAfterBindInlineUniformBlocks == rhs.maxDescriptorSetUpdateAfterBindInlineUniformBlocks ); # endif } bool operator!=( PhysicalDeviceInlineUniformBlockProperties const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceInlineUniformBlockProperties; void * pNext = {}; uint32_t maxInlineUniformBlockSize = {}; uint32_t maxPerStageDescriptorInlineUniformBlocks = {}; uint32_t maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks = {}; uint32_t maxDescriptorSetInlineUniformBlocks = {}; uint32_t maxDescriptorSetUpdateAfterBindInlineUniformBlocks = {}; }; template <> struct CppType { using Type = PhysicalDeviceInlineUniformBlockProperties; }; using PhysicalDeviceInlineUniformBlockPropertiesEXT = PhysicalDeviceInlineUniformBlockProperties; struct PhysicalDeviceInvocationMaskFeaturesHUAWEI { using NativeType = VkPhysicalDeviceInvocationMaskFeaturesHUAWEI; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceInvocationMaskFeaturesHUAWEI; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceInvocationMaskFeaturesHUAWEI( VULKAN_HPP_NAMESPACE::Bool32 invocationMask_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , invocationMask{ invocationMask_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceInvocationMaskFeaturesHUAWEI( PhysicalDeviceInvocationMaskFeaturesHUAWEI const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceInvocationMaskFeaturesHUAWEI( VkPhysicalDeviceInvocationMaskFeaturesHUAWEI const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceInvocationMaskFeaturesHUAWEI( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceInvocationMaskFeaturesHUAWEI & operator=( PhysicalDeviceInvocationMaskFeaturesHUAWEI const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceInvocationMaskFeaturesHUAWEI & operator=( VkPhysicalDeviceInvocationMaskFeaturesHUAWEI const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceInvocationMaskFeaturesHUAWEI & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceInvocationMaskFeaturesHUAWEI & setInvocationMask( VULKAN_HPP_NAMESPACE::Bool32 invocationMask_ ) VULKAN_HPP_NOEXCEPT { invocationMask = invocationMask_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceInvocationMaskFeaturesHUAWEI const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceInvocationMaskFeaturesHUAWEI &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, invocationMask ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceInvocationMaskFeaturesHUAWEI const & ) const = default; #else bool operator==( PhysicalDeviceInvocationMaskFeaturesHUAWEI const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( invocationMask == rhs.invocationMask ); # endif } bool operator!=( PhysicalDeviceInvocationMaskFeaturesHUAWEI const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceInvocationMaskFeaturesHUAWEI; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 invocationMask = {}; }; template <> struct CppType { using Type = PhysicalDeviceInvocationMaskFeaturesHUAWEI; }; struct PhysicalDeviceLayeredApiPropertiesKHR { using NativeType = VkPhysicalDeviceLayeredApiPropertiesKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceLayeredApiPropertiesKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceLayeredApiPropertiesKHR( uint32_t vendorID_ = {}, uint32_t deviceID_ = {}, VULKAN_HPP_NAMESPACE::PhysicalDeviceLayeredApiKHR layeredAPI_ = VULKAN_HPP_NAMESPACE::PhysicalDeviceLayeredApiKHR::eVulkan, std::array const & deviceName_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , vendorID{ vendorID_ } , deviceID{ deviceID_ } , layeredAPI{ layeredAPI_ } , deviceName{ deviceName_ } { } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceLayeredApiPropertiesKHR( PhysicalDeviceLayeredApiPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceLayeredApiPropertiesKHR( VkPhysicalDeviceLayeredApiPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceLayeredApiPropertiesKHR( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceLayeredApiPropertiesKHR & operator=( PhysicalDeviceLayeredApiPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceLayeredApiPropertiesKHR & operator=( VkPhysicalDeviceLayeredApiPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceLayeredApiPropertiesKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceLayeredApiPropertiesKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple const &> # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, vendorID, deviceID, layeredAPI, deviceName ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceLayeredApiPropertiesKHR const & ) const = default; #else bool operator==( PhysicalDeviceLayeredApiPropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( vendorID == rhs.vendorID ) && ( deviceID == rhs.deviceID ) && ( layeredAPI == rhs.layeredAPI ) && ( deviceName == rhs.deviceName ); # endif } bool operator!=( PhysicalDeviceLayeredApiPropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceLayeredApiPropertiesKHR; void * pNext = {}; uint32_t vendorID = {}; uint32_t deviceID = {}; VULKAN_HPP_NAMESPACE::PhysicalDeviceLayeredApiKHR layeredAPI = VULKAN_HPP_NAMESPACE::PhysicalDeviceLayeredApiKHR::eVulkan; VULKAN_HPP_NAMESPACE::ArrayWrapper1D deviceName = {}; }; template <> struct CppType { using Type = PhysicalDeviceLayeredApiPropertiesKHR; }; struct PhysicalDeviceLayeredApiPropertiesListKHR { using NativeType = VkPhysicalDeviceLayeredApiPropertiesListKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceLayeredApiPropertiesListKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceLayeredApiPropertiesListKHR( uint32_t layeredApiCount_ = {}, VULKAN_HPP_NAMESPACE::PhysicalDeviceLayeredApiPropertiesKHR * pLayeredApis_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , layeredApiCount{ layeredApiCount_ } , pLayeredApis{ pLayeredApis_ } { } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceLayeredApiPropertiesListKHR( PhysicalDeviceLayeredApiPropertiesListKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceLayeredApiPropertiesListKHR( VkPhysicalDeviceLayeredApiPropertiesListKHR const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceLayeredApiPropertiesListKHR( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) PhysicalDeviceLayeredApiPropertiesListKHR( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & layeredApis_, void * pNext_ = nullptr ) : pNext( pNext_ ), layeredApiCount( static_cast( layeredApis_.size() ) ), pLayeredApis( layeredApis_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ PhysicalDeviceLayeredApiPropertiesListKHR & operator=( PhysicalDeviceLayeredApiPropertiesListKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceLayeredApiPropertiesListKHR & operator=( VkPhysicalDeviceLayeredApiPropertiesListKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceLayeredApiPropertiesListKHR & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceLayeredApiPropertiesListKHR & setLayeredApiCount( uint32_t layeredApiCount_ ) VULKAN_HPP_NOEXCEPT { layeredApiCount = layeredApiCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceLayeredApiPropertiesListKHR & setPLayeredApis( VULKAN_HPP_NAMESPACE::PhysicalDeviceLayeredApiPropertiesKHR * pLayeredApis_ ) VULKAN_HPP_NOEXCEPT { pLayeredApis = pLayeredApis_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) PhysicalDeviceLayeredApiPropertiesListKHR & setLayeredApis( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & layeredApis_ ) VULKAN_HPP_NOEXCEPT { layeredApiCount = static_cast( layeredApis_.size() ); pLayeredApis = layeredApis_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceLayeredApiPropertiesListKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceLayeredApiPropertiesListKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, layeredApiCount, pLayeredApis ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceLayeredApiPropertiesListKHR const & ) const = default; #else bool operator==( PhysicalDeviceLayeredApiPropertiesListKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( layeredApiCount == rhs.layeredApiCount ) && ( pLayeredApis == rhs.pLayeredApis ); # endif } bool operator!=( PhysicalDeviceLayeredApiPropertiesListKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceLayeredApiPropertiesListKHR; void * pNext = {}; uint32_t layeredApiCount = {}; VULKAN_HPP_NAMESPACE::PhysicalDeviceLayeredApiPropertiesKHR * pLayeredApis = {}; }; template <> struct CppType { using Type = PhysicalDeviceLayeredApiPropertiesListKHR; }; struct PhysicalDeviceLimits { using NativeType = VkPhysicalDeviceLimits; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceLimits( uint32_t maxImageDimension1D_ = {}, uint32_t maxImageDimension2D_ = {}, uint32_t maxImageDimension3D_ = {}, uint32_t maxImageDimensionCube_ = {}, uint32_t maxImageArrayLayers_ = {}, uint32_t maxTexelBufferElements_ = {}, uint32_t maxUniformBufferRange_ = {}, uint32_t maxStorageBufferRange_ = {}, uint32_t maxPushConstantsSize_ = {}, uint32_t maxMemoryAllocationCount_ = {}, uint32_t maxSamplerAllocationCount_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize bufferImageGranularity_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize sparseAddressSpaceSize_ = {}, uint32_t maxBoundDescriptorSets_ = {}, uint32_t maxPerStageDescriptorSamplers_ = {}, uint32_t maxPerStageDescriptorUniformBuffers_ = {}, uint32_t maxPerStageDescriptorStorageBuffers_ = {}, uint32_t maxPerStageDescriptorSampledImages_ = {}, uint32_t maxPerStageDescriptorStorageImages_ = {}, uint32_t maxPerStageDescriptorInputAttachments_ = {}, uint32_t maxPerStageResources_ = {}, uint32_t maxDescriptorSetSamplers_ = {}, uint32_t maxDescriptorSetUniformBuffers_ = {}, uint32_t maxDescriptorSetUniformBuffersDynamic_ = {}, uint32_t maxDescriptorSetStorageBuffers_ = {}, uint32_t maxDescriptorSetStorageBuffersDynamic_ = {}, uint32_t maxDescriptorSetSampledImages_ = {}, uint32_t maxDescriptorSetStorageImages_ = {}, uint32_t maxDescriptorSetInputAttachments_ = {}, uint32_t maxVertexInputAttributes_ = {}, uint32_t maxVertexInputBindings_ = {}, uint32_t maxVertexInputAttributeOffset_ = {}, uint32_t maxVertexInputBindingStride_ = {}, uint32_t maxVertexOutputComponents_ = {}, uint32_t maxTessellationGenerationLevel_ = {}, uint32_t maxTessellationPatchSize_ = {}, uint32_t maxTessellationControlPerVertexInputComponents_ = {}, uint32_t maxTessellationControlPerVertexOutputComponents_ = {}, uint32_t maxTessellationControlPerPatchOutputComponents_ = {}, uint32_t maxTessellationControlTotalOutputComponents_ = {}, uint32_t maxTessellationEvaluationInputComponents_ = {}, uint32_t maxTessellationEvaluationOutputComponents_ = {}, uint32_t maxGeometryShaderInvocations_ = {}, uint32_t maxGeometryInputComponents_ = {}, uint32_t maxGeometryOutputComponents_ = {}, uint32_t maxGeometryOutputVertices_ = {}, uint32_t maxGeometryTotalOutputComponents_ = {}, uint32_t maxFragmentInputComponents_ = {}, uint32_t maxFragmentOutputAttachments_ = {}, uint32_t maxFragmentDualSrcAttachments_ = {}, uint32_t maxFragmentCombinedOutputResources_ = {}, uint32_t maxComputeSharedMemorySize_ = {}, std::array const & maxComputeWorkGroupCount_ = {}, uint32_t maxComputeWorkGroupInvocations_ = {}, std::array const & maxComputeWorkGroupSize_ = {}, uint32_t subPixelPrecisionBits_ = {}, uint32_t subTexelPrecisionBits_ = {}, uint32_t mipmapPrecisionBits_ = {}, uint32_t maxDrawIndexedIndexValue_ = {}, uint32_t maxDrawIndirectCount_ = {}, float maxSamplerLodBias_ = {}, float maxSamplerAnisotropy_ = {}, uint32_t maxViewports_ = {}, std::array const & maxViewportDimensions_ = {}, std::array const & viewportBoundsRange_ = {}, uint32_t viewportSubPixelBits_ = {}, size_t minMemoryMapAlignment_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize minTexelBufferOffsetAlignment_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize minUniformBufferOffsetAlignment_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize minStorageBufferOffsetAlignment_ = {}, int32_t minTexelOffset_ = {}, uint32_t maxTexelOffset_ = {}, int32_t minTexelGatherOffset_ = {}, uint32_t maxTexelGatherOffset_ = {}, float minInterpolationOffset_ = {}, float maxInterpolationOffset_ = {}, uint32_t subPixelInterpolationOffsetBits_ = {}, uint32_t maxFramebufferWidth_ = {}, uint32_t maxFramebufferHeight_ = {}, uint32_t maxFramebufferLayers_ = {}, VULKAN_HPP_NAMESPACE::SampleCountFlags framebufferColorSampleCounts_ = {}, VULKAN_HPP_NAMESPACE::SampleCountFlags framebufferDepthSampleCounts_ = {}, VULKAN_HPP_NAMESPACE::SampleCountFlags framebufferStencilSampleCounts_ = {}, VULKAN_HPP_NAMESPACE::SampleCountFlags framebufferNoAttachmentsSampleCounts_ = {}, uint32_t maxColorAttachments_ = {}, VULKAN_HPP_NAMESPACE::SampleCountFlags sampledImageColorSampleCounts_ = {}, VULKAN_HPP_NAMESPACE::SampleCountFlags sampledImageIntegerSampleCounts_ = {}, VULKAN_HPP_NAMESPACE::SampleCountFlags sampledImageDepthSampleCounts_ = {}, VULKAN_HPP_NAMESPACE::SampleCountFlags sampledImageStencilSampleCounts_ = {}, VULKAN_HPP_NAMESPACE::SampleCountFlags storageImageSampleCounts_ = {}, uint32_t maxSampleMaskWords_ = {}, VULKAN_HPP_NAMESPACE::Bool32 timestampComputeAndGraphics_ = {}, float timestampPeriod_ = {}, uint32_t maxClipDistances_ = {}, uint32_t maxCullDistances_ = {}, uint32_t maxCombinedClipAndCullDistances_ = {}, uint32_t discreteQueuePriorities_ = {}, std::array const & pointSizeRange_ = {}, std::array const & lineWidthRange_ = {}, float pointSizeGranularity_ = {}, float lineWidthGranularity_ = {}, VULKAN_HPP_NAMESPACE::Bool32 strictLines_ = {}, VULKAN_HPP_NAMESPACE::Bool32 standardSampleLocations_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize optimalBufferCopyOffsetAlignment_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize optimalBufferCopyRowPitchAlignment_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize nonCoherentAtomSize_ = {} ) VULKAN_HPP_NOEXCEPT : maxImageDimension1D{ maxImageDimension1D_ } , maxImageDimension2D{ maxImageDimension2D_ } , maxImageDimension3D{ maxImageDimension3D_ } , maxImageDimensionCube{ maxImageDimensionCube_ } , maxImageArrayLayers{ maxImageArrayLayers_ } , maxTexelBufferElements{ maxTexelBufferElements_ } , maxUniformBufferRange{ maxUniformBufferRange_ } , maxStorageBufferRange{ maxStorageBufferRange_ } , maxPushConstantsSize{ maxPushConstantsSize_ } , maxMemoryAllocationCount{ maxMemoryAllocationCount_ } , maxSamplerAllocationCount{ maxSamplerAllocationCount_ } , bufferImageGranularity{ bufferImageGranularity_ } , sparseAddressSpaceSize{ sparseAddressSpaceSize_ } , maxBoundDescriptorSets{ maxBoundDescriptorSets_ } , maxPerStageDescriptorSamplers{ maxPerStageDescriptorSamplers_ } , maxPerStageDescriptorUniformBuffers{ maxPerStageDescriptorUniformBuffers_ } , maxPerStageDescriptorStorageBuffers{ maxPerStageDescriptorStorageBuffers_ } , maxPerStageDescriptorSampledImages{ maxPerStageDescriptorSampledImages_ } , maxPerStageDescriptorStorageImages{ maxPerStageDescriptorStorageImages_ } , maxPerStageDescriptorInputAttachments{ maxPerStageDescriptorInputAttachments_ } , maxPerStageResources{ maxPerStageResources_ } , maxDescriptorSetSamplers{ maxDescriptorSetSamplers_ } , maxDescriptorSetUniformBuffers{ maxDescriptorSetUniformBuffers_ } , maxDescriptorSetUniformBuffersDynamic{ maxDescriptorSetUniformBuffersDynamic_ } , maxDescriptorSetStorageBuffers{ maxDescriptorSetStorageBuffers_ } , maxDescriptorSetStorageBuffersDynamic{ maxDescriptorSetStorageBuffersDynamic_ } , maxDescriptorSetSampledImages{ maxDescriptorSetSampledImages_ } , maxDescriptorSetStorageImages{ maxDescriptorSetStorageImages_ } , maxDescriptorSetInputAttachments{ maxDescriptorSetInputAttachments_ } , maxVertexInputAttributes{ maxVertexInputAttributes_ } , maxVertexInputBindings{ maxVertexInputBindings_ } , maxVertexInputAttributeOffset{ maxVertexInputAttributeOffset_ } , maxVertexInputBindingStride{ maxVertexInputBindingStride_ } , maxVertexOutputComponents{ maxVertexOutputComponents_ } , maxTessellationGenerationLevel{ maxTessellationGenerationLevel_ } , maxTessellationPatchSize{ maxTessellationPatchSize_ } , maxTessellationControlPerVertexInputComponents{ maxTessellationControlPerVertexInputComponents_ } , maxTessellationControlPerVertexOutputComponents{ maxTessellationControlPerVertexOutputComponents_ } , maxTessellationControlPerPatchOutputComponents{ maxTessellationControlPerPatchOutputComponents_ } , maxTessellationControlTotalOutputComponents{ maxTessellationControlTotalOutputComponents_ } , maxTessellationEvaluationInputComponents{ maxTessellationEvaluationInputComponents_ } , maxTessellationEvaluationOutputComponents{ maxTessellationEvaluationOutputComponents_ } , maxGeometryShaderInvocations{ maxGeometryShaderInvocations_ } , maxGeometryInputComponents{ maxGeometryInputComponents_ } , maxGeometryOutputComponents{ maxGeometryOutputComponents_ } , maxGeometryOutputVertices{ maxGeometryOutputVertices_ } , maxGeometryTotalOutputComponents{ maxGeometryTotalOutputComponents_ } , maxFragmentInputComponents{ maxFragmentInputComponents_ } , maxFragmentOutputAttachments{ maxFragmentOutputAttachments_ } , maxFragmentDualSrcAttachments{ maxFragmentDualSrcAttachments_ } , maxFragmentCombinedOutputResources{ maxFragmentCombinedOutputResources_ } , maxComputeSharedMemorySize{ maxComputeSharedMemorySize_ } , maxComputeWorkGroupCount{ maxComputeWorkGroupCount_ } , maxComputeWorkGroupInvocations{ maxComputeWorkGroupInvocations_ } , maxComputeWorkGroupSize{ maxComputeWorkGroupSize_ } , subPixelPrecisionBits{ subPixelPrecisionBits_ } , subTexelPrecisionBits{ subTexelPrecisionBits_ } , mipmapPrecisionBits{ mipmapPrecisionBits_ } , maxDrawIndexedIndexValue{ maxDrawIndexedIndexValue_ } , maxDrawIndirectCount{ maxDrawIndirectCount_ } , maxSamplerLodBias{ maxSamplerLodBias_ } , maxSamplerAnisotropy{ maxSamplerAnisotropy_ } , maxViewports{ maxViewports_ } , maxViewportDimensions{ maxViewportDimensions_ } , viewportBoundsRange{ viewportBoundsRange_ } , viewportSubPixelBits{ viewportSubPixelBits_ } , minMemoryMapAlignment{ minMemoryMapAlignment_ } , minTexelBufferOffsetAlignment{ minTexelBufferOffsetAlignment_ } , minUniformBufferOffsetAlignment{ minUniformBufferOffsetAlignment_ } , minStorageBufferOffsetAlignment{ minStorageBufferOffsetAlignment_ } , minTexelOffset{ minTexelOffset_ } , maxTexelOffset{ maxTexelOffset_ } , minTexelGatherOffset{ minTexelGatherOffset_ } , maxTexelGatherOffset{ maxTexelGatherOffset_ } , minInterpolationOffset{ minInterpolationOffset_ } , maxInterpolationOffset{ maxInterpolationOffset_ } , subPixelInterpolationOffsetBits{ subPixelInterpolationOffsetBits_ } , maxFramebufferWidth{ maxFramebufferWidth_ } , maxFramebufferHeight{ maxFramebufferHeight_ } , maxFramebufferLayers{ maxFramebufferLayers_ } , framebufferColorSampleCounts{ framebufferColorSampleCounts_ } , framebufferDepthSampleCounts{ framebufferDepthSampleCounts_ } , framebufferStencilSampleCounts{ framebufferStencilSampleCounts_ } , framebufferNoAttachmentsSampleCounts{ framebufferNoAttachmentsSampleCounts_ } , maxColorAttachments{ maxColorAttachments_ } , sampledImageColorSampleCounts{ sampledImageColorSampleCounts_ } , sampledImageIntegerSampleCounts{ sampledImageIntegerSampleCounts_ } , sampledImageDepthSampleCounts{ sampledImageDepthSampleCounts_ } , sampledImageStencilSampleCounts{ sampledImageStencilSampleCounts_ } , storageImageSampleCounts{ storageImageSampleCounts_ } , maxSampleMaskWords{ maxSampleMaskWords_ } , timestampComputeAndGraphics{ timestampComputeAndGraphics_ } , timestampPeriod{ timestampPeriod_ } , maxClipDistances{ maxClipDistances_ } , maxCullDistances{ maxCullDistances_ } , maxCombinedClipAndCullDistances{ maxCombinedClipAndCullDistances_ } , discreteQueuePriorities{ discreteQueuePriorities_ } , pointSizeRange{ pointSizeRange_ } , lineWidthRange{ lineWidthRange_ } , pointSizeGranularity{ pointSizeGranularity_ } , lineWidthGranularity{ lineWidthGranularity_ } , strictLines{ strictLines_ } , standardSampleLocations{ standardSampleLocations_ } , optimalBufferCopyOffsetAlignment{ optimalBufferCopyOffsetAlignment_ } , optimalBufferCopyRowPitchAlignment{ optimalBufferCopyRowPitchAlignment_ } , nonCoherentAtomSize{ nonCoherentAtomSize_ } { } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceLimits( PhysicalDeviceLimits const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceLimits( VkPhysicalDeviceLimits const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceLimits( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceLimits & operator=( PhysicalDeviceLimits const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceLimits & operator=( VkPhysicalDeviceLimits const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceLimits const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceLimits &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple const &, uint32_t const &, VULKAN_HPP_NAMESPACE::ArrayWrapper1D const &, uint32_t const &, uint32_t const &, uint32_t const &, uint32_t const &, uint32_t const &, float const &, float const &, uint32_t const &, VULKAN_HPP_NAMESPACE::ArrayWrapper1D const &, VULKAN_HPP_NAMESPACE::ArrayWrapper1D const &, uint32_t const &, size_t const &, VULKAN_HPP_NAMESPACE::DeviceSize const &, VULKAN_HPP_NAMESPACE::DeviceSize const &, VULKAN_HPP_NAMESPACE::DeviceSize const &, int32_t const &, uint32_t const &, int32_t const &, uint32_t const &, float const &, float const &, uint32_t const &, uint32_t const &, uint32_t const &, uint32_t const &, VULKAN_HPP_NAMESPACE::SampleCountFlags const &, VULKAN_HPP_NAMESPACE::SampleCountFlags const &, VULKAN_HPP_NAMESPACE::SampleCountFlags const &, VULKAN_HPP_NAMESPACE::SampleCountFlags const &, uint32_t const &, VULKAN_HPP_NAMESPACE::SampleCountFlags const &, VULKAN_HPP_NAMESPACE::SampleCountFlags const &, VULKAN_HPP_NAMESPACE::SampleCountFlags const &, VULKAN_HPP_NAMESPACE::SampleCountFlags const &, VULKAN_HPP_NAMESPACE::SampleCountFlags const &, uint32_t const &, VULKAN_HPP_NAMESPACE::Bool32 const &, float const &, uint32_t const &, uint32_t const &, uint32_t const &, uint32_t const &, VULKAN_HPP_NAMESPACE::ArrayWrapper1D const &, VULKAN_HPP_NAMESPACE::ArrayWrapper1D const &, float const &, float const &, VULKAN_HPP_NAMESPACE::Bool32 const &, VULKAN_HPP_NAMESPACE::Bool32 const &, VULKAN_HPP_NAMESPACE::DeviceSize const &, VULKAN_HPP_NAMESPACE::DeviceSize const &, VULKAN_HPP_NAMESPACE::DeviceSize const &> # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( maxImageDimension1D, maxImageDimension2D, maxImageDimension3D, maxImageDimensionCube, maxImageArrayLayers, maxTexelBufferElements, maxUniformBufferRange, maxStorageBufferRange, maxPushConstantsSize, maxMemoryAllocationCount, maxSamplerAllocationCount, bufferImageGranularity, sparseAddressSpaceSize, maxBoundDescriptorSets, maxPerStageDescriptorSamplers, maxPerStageDescriptorUniformBuffers, maxPerStageDescriptorStorageBuffers, maxPerStageDescriptorSampledImages, maxPerStageDescriptorStorageImages, maxPerStageDescriptorInputAttachments, maxPerStageResources, maxDescriptorSetSamplers, maxDescriptorSetUniformBuffers, maxDescriptorSetUniformBuffersDynamic, maxDescriptorSetStorageBuffers, maxDescriptorSetStorageBuffersDynamic, maxDescriptorSetSampledImages, maxDescriptorSetStorageImages, maxDescriptorSetInputAttachments, maxVertexInputAttributes, maxVertexInputBindings, maxVertexInputAttributeOffset, maxVertexInputBindingStride, maxVertexOutputComponents, maxTessellationGenerationLevel, maxTessellationPatchSize, maxTessellationControlPerVertexInputComponents, maxTessellationControlPerVertexOutputComponents, maxTessellationControlPerPatchOutputComponents, maxTessellationControlTotalOutputComponents, maxTessellationEvaluationInputComponents, maxTessellationEvaluationOutputComponents, maxGeometryShaderInvocations, maxGeometryInputComponents, maxGeometryOutputComponents, maxGeometryOutputVertices, maxGeometryTotalOutputComponents, maxFragmentInputComponents, maxFragmentOutputAttachments, maxFragmentDualSrcAttachments, maxFragmentCombinedOutputResources, maxComputeSharedMemorySize, maxComputeWorkGroupCount, maxComputeWorkGroupInvocations, maxComputeWorkGroupSize, subPixelPrecisionBits, subTexelPrecisionBits, mipmapPrecisionBits, maxDrawIndexedIndexValue, maxDrawIndirectCount, maxSamplerLodBias, maxSamplerAnisotropy, maxViewports, maxViewportDimensions, viewportBoundsRange, viewportSubPixelBits, minMemoryMapAlignment, minTexelBufferOffsetAlignment, minUniformBufferOffsetAlignment, minStorageBufferOffsetAlignment, minTexelOffset, maxTexelOffset, minTexelGatherOffset, maxTexelGatherOffset, minInterpolationOffset, maxInterpolationOffset, subPixelInterpolationOffsetBits, maxFramebufferWidth, maxFramebufferHeight, maxFramebufferLayers, framebufferColorSampleCounts, framebufferDepthSampleCounts, framebufferStencilSampleCounts, framebufferNoAttachmentsSampleCounts, maxColorAttachments, sampledImageColorSampleCounts, sampledImageIntegerSampleCounts, sampledImageDepthSampleCounts, sampledImageStencilSampleCounts, storageImageSampleCounts, maxSampleMaskWords, timestampComputeAndGraphics, timestampPeriod, maxClipDistances, maxCullDistances, maxCombinedClipAndCullDistances, discreteQueuePriorities, pointSizeRange, lineWidthRange, pointSizeGranularity, lineWidthGranularity, strictLines, standardSampleLocations, optimalBufferCopyOffsetAlignment, optimalBufferCopyRowPitchAlignment, nonCoherentAtomSize ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceLimits const & ) const = default; #else bool operator==( PhysicalDeviceLimits const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( maxImageDimension1D == rhs.maxImageDimension1D ) && ( maxImageDimension2D == rhs.maxImageDimension2D ) && ( maxImageDimension3D == rhs.maxImageDimension3D ) && ( maxImageDimensionCube == rhs.maxImageDimensionCube ) && ( maxImageArrayLayers == rhs.maxImageArrayLayers ) && ( maxTexelBufferElements == rhs.maxTexelBufferElements ) && ( maxUniformBufferRange == rhs.maxUniformBufferRange ) && ( maxStorageBufferRange == rhs.maxStorageBufferRange ) && ( maxPushConstantsSize == rhs.maxPushConstantsSize ) && ( maxMemoryAllocationCount == rhs.maxMemoryAllocationCount ) && ( maxSamplerAllocationCount == rhs.maxSamplerAllocationCount ) && ( bufferImageGranularity == rhs.bufferImageGranularity ) && ( sparseAddressSpaceSize == rhs.sparseAddressSpaceSize ) && ( maxBoundDescriptorSets == rhs.maxBoundDescriptorSets ) && ( maxPerStageDescriptorSamplers == rhs.maxPerStageDescriptorSamplers ) && ( maxPerStageDescriptorUniformBuffers == rhs.maxPerStageDescriptorUniformBuffers ) && ( maxPerStageDescriptorStorageBuffers == rhs.maxPerStageDescriptorStorageBuffers ) && ( maxPerStageDescriptorSampledImages == rhs.maxPerStageDescriptorSampledImages ) && ( maxPerStageDescriptorStorageImages == rhs.maxPerStageDescriptorStorageImages ) && ( maxPerStageDescriptorInputAttachments == rhs.maxPerStageDescriptorInputAttachments ) && ( maxPerStageResources == rhs.maxPerStageResources ) && ( maxDescriptorSetSamplers == rhs.maxDescriptorSetSamplers ) && ( maxDescriptorSetUniformBuffers == rhs.maxDescriptorSetUniformBuffers ) && ( maxDescriptorSetUniformBuffersDynamic == rhs.maxDescriptorSetUniformBuffersDynamic ) && ( maxDescriptorSetStorageBuffers == rhs.maxDescriptorSetStorageBuffers ) && ( maxDescriptorSetStorageBuffersDynamic == rhs.maxDescriptorSetStorageBuffersDynamic ) && ( maxDescriptorSetSampledImages == rhs.maxDescriptorSetSampledImages ) && ( maxDescriptorSetStorageImages == rhs.maxDescriptorSetStorageImages ) && ( maxDescriptorSetInputAttachments == rhs.maxDescriptorSetInputAttachments ) && ( maxVertexInputAttributes == rhs.maxVertexInputAttributes ) && ( maxVertexInputBindings == rhs.maxVertexInputBindings ) && ( maxVertexInputAttributeOffset == rhs.maxVertexInputAttributeOffset ) && ( maxVertexInputBindingStride == rhs.maxVertexInputBindingStride ) && ( maxVertexOutputComponents == rhs.maxVertexOutputComponents ) && ( maxTessellationGenerationLevel == rhs.maxTessellationGenerationLevel ) && ( maxTessellationPatchSize == rhs.maxTessellationPatchSize ) && ( maxTessellationControlPerVertexInputComponents == rhs.maxTessellationControlPerVertexInputComponents ) && ( maxTessellationControlPerVertexOutputComponents == rhs.maxTessellationControlPerVertexOutputComponents ) && ( maxTessellationControlPerPatchOutputComponents == rhs.maxTessellationControlPerPatchOutputComponents ) && ( maxTessellationControlTotalOutputComponents == rhs.maxTessellationControlTotalOutputComponents ) && ( maxTessellationEvaluationInputComponents == rhs.maxTessellationEvaluationInputComponents ) && ( maxTessellationEvaluationOutputComponents == rhs.maxTessellationEvaluationOutputComponents ) && ( maxGeometryShaderInvocations == rhs.maxGeometryShaderInvocations ) && ( maxGeometryInputComponents == rhs.maxGeometryInputComponents ) && ( maxGeometryOutputComponents == rhs.maxGeometryOutputComponents ) && ( maxGeometryOutputVertices == rhs.maxGeometryOutputVertices ) && ( maxGeometryTotalOutputComponents == rhs.maxGeometryTotalOutputComponents ) && ( maxFragmentInputComponents == rhs.maxFragmentInputComponents ) && ( maxFragmentOutputAttachments == rhs.maxFragmentOutputAttachments ) && ( maxFragmentDualSrcAttachments == rhs.maxFragmentDualSrcAttachments ) && ( maxFragmentCombinedOutputResources == rhs.maxFragmentCombinedOutputResources ) && ( maxComputeSharedMemorySize == rhs.maxComputeSharedMemorySize ) && ( maxComputeWorkGroupCount == rhs.maxComputeWorkGroupCount ) && ( maxComputeWorkGroupInvocations == rhs.maxComputeWorkGroupInvocations ) && ( maxComputeWorkGroupSize == rhs.maxComputeWorkGroupSize ) && ( subPixelPrecisionBits == rhs.subPixelPrecisionBits ) && ( subTexelPrecisionBits == rhs.subTexelPrecisionBits ) && ( mipmapPrecisionBits == rhs.mipmapPrecisionBits ) && ( maxDrawIndexedIndexValue == rhs.maxDrawIndexedIndexValue ) && ( maxDrawIndirectCount == rhs.maxDrawIndirectCount ) && ( maxSamplerLodBias == rhs.maxSamplerLodBias ) && ( maxSamplerAnisotropy == rhs.maxSamplerAnisotropy ) && ( maxViewports == rhs.maxViewports ) && ( maxViewportDimensions == rhs.maxViewportDimensions ) && ( viewportBoundsRange == rhs.viewportBoundsRange ) && ( viewportSubPixelBits == rhs.viewportSubPixelBits ) && ( minMemoryMapAlignment == rhs.minMemoryMapAlignment ) && ( minTexelBufferOffsetAlignment == rhs.minTexelBufferOffsetAlignment ) && ( minUniformBufferOffsetAlignment == rhs.minUniformBufferOffsetAlignment ) && ( minStorageBufferOffsetAlignment == rhs.minStorageBufferOffsetAlignment ) && ( minTexelOffset == rhs.minTexelOffset ) && ( maxTexelOffset == rhs.maxTexelOffset ) && ( minTexelGatherOffset == rhs.minTexelGatherOffset ) && ( maxTexelGatherOffset == rhs.maxTexelGatherOffset ) && ( minInterpolationOffset == rhs.minInterpolationOffset ) && ( maxInterpolationOffset == rhs.maxInterpolationOffset ) && ( subPixelInterpolationOffsetBits == rhs.subPixelInterpolationOffsetBits ) && ( maxFramebufferWidth == rhs.maxFramebufferWidth ) && ( maxFramebufferHeight == rhs.maxFramebufferHeight ) && ( maxFramebufferLayers == rhs.maxFramebufferLayers ) && ( framebufferColorSampleCounts == rhs.framebufferColorSampleCounts ) && ( framebufferDepthSampleCounts == rhs.framebufferDepthSampleCounts ) && ( framebufferStencilSampleCounts == rhs.framebufferStencilSampleCounts ) && ( framebufferNoAttachmentsSampleCounts == rhs.framebufferNoAttachmentsSampleCounts ) && ( maxColorAttachments == rhs.maxColorAttachments ) && ( sampledImageColorSampleCounts == rhs.sampledImageColorSampleCounts ) && ( sampledImageIntegerSampleCounts == rhs.sampledImageIntegerSampleCounts ) && ( sampledImageDepthSampleCounts == rhs.sampledImageDepthSampleCounts ) && ( sampledImageStencilSampleCounts == rhs.sampledImageStencilSampleCounts ) && ( storageImageSampleCounts == rhs.storageImageSampleCounts ) && ( maxSampleMaskWords == rhs.maxSampleMaskWords ) && ( timestampComputeAndGraphics == rhs.timestampComputeAndGraphics ) && ( timestampPeriod == rhs.timestampPeriod ) && ( maxClipDistances == rhs.maxClipDistances ) && ( maxCullDistances == rhs.maxCullDistances ) && ( maxCombinedClipAndCullDistances == rhs.maxCombinedClipAndCullDistances ) && ( discreteQueuePriorities == rhs.discreteQueuePriorities ) && ( pointSizeRange == rhs.pointSizeRange ) && ( lineWidthRange == rhs.lineWidthRange ) && ( pointSizeGranularity == rhs.pointSizeGranularity ) && ( lineWidthGranularity == rhs.lineWidthGranularity ) && ( strictLines == rhs.strictLines ) && ( standardSampleLocations == rhs.standardSampleLocations ) && ( optimalBufferCopyOffsetAlignment == rhs.optimalBufferCopyOffsetAlignment ) && ( optimalBufferCopyRowPitchAlignment == rhs.optimalBufferCopyRowPitchAlignment ) && ( nonCoherentAtomSize == rhs.nonCoherentAtomSize ); # endif } bool operator!=( PhysicalDeviceLimits const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: uint32_t maxImageDimension1D = {}; uint32_t maxImageDimension2D = {}; uint32_t maxImageDimension3D = {}; uint32_t maxImageDimensionCube = {}; uint32_t maxImageArrayLayers = {}; uint32_t maxTexelBufferElements = {}; uint32_t maxUniformBufferRange = {}; uint32_t maxStorageBufferRange = {}; uint32_t maxPushConstantsSize = {}; uint32_t maxMemoryAllocationCount = {}; uint32_t maxSamplerAllocationCount = {}; VULKAN_HPP_NAMESPACE::DeviceSize bufferImageGranularity = {}; VULKAN_HPP_NAMESPACE::DeviceSize sparseAddressSpaceSize = {}; uint32_t maxBoundDescriptorSets = {}; uint32_t maxPerStageDescriptorSamplers = {}; uint32_t maxPerStageDescriptorUniformBuffers = {}; uint32_t maxPerStageDescriptorStorageBuffers = {}; uint32_t maxPerStageDescriptorSampledImages = {}; uint32_t maxPerStageDescriptorStorageImages = {}; uint32_t maxPerStageDescriptorInputAttachments = {}; uint32_t maxPerStageResources = {}; uint32_t maxDescriptorSetSamplers = {}; uint32_t maxDescriptorSetUniformBuffers = {}; uint32_t maxDescriptorSetUniformBuffersDynamic = {}; uint32_t maxDescriptorSetStorageBuffers = {}; uint32_t maxDescriptorSetStorageBuffersDynamic = {}; uint32_t maxDescriptorSetSampledImages = {}; uint32_t maxDescriptorSetStorageImages = {}; uint32_t maxDescriptorSetInputAttachments = {}; uint32_t maxVertexInputAttributes = {}; uint32_t maxVertexInputBindings = {}; uint32_t maxVertexInputAttributeOffset = {}; uint32_t maxVertexInputBindingStride = {}; uint32_t maxVertexOutputComponents = {}; uint32_t maxTessellationGenerationLevel = {}; uint32_t maxTessellationPatchSize = {}; uint32_t maxTessellationControlPerVertexInputComponents = {}; uint32_t maxTessellationControlPerVertexOutputComponents = {}; uint32_t maxTessellationControlPerPatchOutputComponents = {}; uint32_t maxTessellationControlTotalOutputComponents = {}; uint32_t maxTessellationEvaluationInputComponents = {}; uint32_t maxTessellationEvaluationOutputComponents = {}; uint32_t maxGeometryShaderInvocations = {}; uint32_t maxGeometryInputComponents = {}; uint32_t maxGeometryOutputComponents = {}; uint32_t maxGeometryOutputVertices = {}; uint32_t maxGeometryTotalOutputComponents = {}; uint32_t maxFragmentInputComponents = {}; uint32_t maxFragmentOutputAttachments = {}; uint32_t maxFragmentDualSrcAttachments = {}; uint32_t maxFragmentCombinedOutputResources = {}; uint32_t maxComputeSharedMemorySize = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D maxComputeWorkGroupCount = {}; uint32_t maxComputeWorkGroupInvocations = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D maxComputeWorkGroupSize = {}; uint32_t subPixelPrecisionBits = {}; uint32_t subTexelPrecisionBits = {}; uint32_t mipmapPrecisionBits = {}; uint32_t maxDrawIndexedIndexValue = {}; uint32_t maxDrawIndirectCount = {}; float maxSamplerLodBias = {}; float maxSamplerAnisotropy = {}; uint32_t maxViewports = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D maxViewportDimensions = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D viewportBoundsRange = {}; uint32_t viewportSubPixelBits = {}; size_t minMemoryMapAlignment = {}; VULKAN_HPP_NAMESPACE::DeviceSize minTexelBufferOffsetAlignment = {}; VULKAN_HPP_NAMESPACE::DeviceSize minUniformBufferOffsetAlignment = {}; VULKAN_HPP_NAMESPACE::DeviceSize minStorageBufferOffsetAlignment = {}; int32_t minTexelOffset = {}; uint32_t maxTexelOffset = {}; int32_t minTexelGatherOffset = {}; uint32_t maxTexelGatherOffset = {}; float minInterpolationOffset = {}; float maxInterpolationOffset = {}; uint32_t subPixelInterpolationOffsetBits = {}; uint32_t maxFramebufferWidth = {}; uint32_t maxFramebufferHeight = {}; uint32_t maxFramebufferLayers = {}; VULKAN_HPP_NAMESPACE::SampleCountFlags framebufferColorSampleCounts = {}; VULKAN_HPP_NAMESPACE::SampleCountFlags framebufferDepthSampleCounts = {}; VULKAN_HPP_NAMESPACE::SampleCountFlags framebufferStencilSampleCounts = {}; VULKAN_HPP_NAMESPACE::SampleCountFlags framebufferNoAttachmentsSampleCounts = {}; uint32_t maxColorAttachments = {}; VULKAN_HPP_NAMESPACE::SampleCountFlags sampledImageColorSampleCounts = {}; VULKAN_HPP_NAMESPACE::SampleCountFlags sampledImageIntegerSampleCounts = {}; VULKAN_HPP_NAMESPACE::SampleCountFlags sampledImageDepthSampleCounts = {}; VULKAN_HPP_NAMESPACE::SampleCountFlags sampledImageStencilSampleCounts = {}; VULKAN_HPP_NAMESPACE::SampleCountFlags storageImageSampleCounts = {}; uint32_t maxSampleMaskWords = {}; VULKAN_HPP_NAMESPACE::Bool32 timestampComputeAndGraphics = {}; float timestampPeriod = {}; uint32_t maxClipDistances = {}; uint32_t maxCullDistances = {}; uint32_t maxCombinedClipAndCullDistances = {}; uint32_t discreteQueuePriorities = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D pointSizeRange = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D lineWidthRange = {}; float pointSizeGranularity = {}; float lineWidthGranularity = {}; VULKAN_HPP_NAMESPACE::Bool32 strictLines = {}; VULKAN_HPP_NAMESPACE::Bool32 standardSampleLocations = {}; VULKAN_HPP_NAMESPACE::DeviceSize optimalBufferCopyOffsetAlignment = {}; VULKAN_HPP_NAMESPACE::DeviceSize optimalBufferCopyRowPitchAlignment = {}; VULKAN_HPP_NAMESPACE::DeviceSize nonCoherentAtomSize = {}; }; struct PhysicalDeviceSparseProperties { using NativeType = VkPhysicalDeviceSparseProperties; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceSparseProperties( VULKAN_HPP_NAMESPACE::Bool32 residencyStandard2DBlockShape_ = {}, VULKAN_HPP_NAMESPACE::Bool32 residencyStandard2DMultisampleBlockShape_ = {}, VULKAN_HPP_NAMESPACE::Bool32 residencyStandard3DBlockShape_ = {}, VULKAN_HPP_NAMESPACE::Bool32 residencyAlignedMipSize_ = {}, VULKAN_HPP_NAMESPACE::Bool32 residencyNonResidentStrict_ = {} ) VULKAN_HPP_NOEXCEPT : residencyStandard2DBlockShape{ residencyStandard2DBlockShape_ } , residencyStandard2DMultisampleBlockShape{ residencyStandard2DMultisampleBlockShape_ } , residencyStandard3DBlockShape{ residencyStandard3DBlockShape_ } , residencyAlignedMipSize{ residencyAlignedMipSize_ } , residencyNonResidentStrict{ residencyNonResidentStrict_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceSparseProperties( PhysicalDeviceSparseProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceSparseProperties( VkPhysicalDeviceSparseProperties const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceSparseProperties( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceSparseProperties & operator=( PhysicalDeviceSparseProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceSparseProperties & operator=( VkPhysicalDeviceSparseProperties const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceSparseProperties const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceSparseProperties &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( residencyStandard2DBlockShape, residencyStandard2DMultisampleBlockShape, residencyStandard3DBlockShape, residencyAlignedMipSize, residencyNonResidentStrict ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceSparseProperties const & ) const = default; #else bool operator==( PhysicalDeviceSparseProperties const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( residencyStandard2DBlockShape == rhs.residencyStandard2DBlockShape ) && ( residencyStandard2DMultisampleBlockShape == rhs.residencyStandard2DMultisampleBlockShape ) && ( residencyStandard3DBlockShape == rhs.residencyStandard3DBlockShape ) && ( residencyAlignedMipSize == rhs.residencyAlignedMipSize ) && ( residencyNonResidentStrict == rhs.residencyNonResidentStrict ); # endif } bool operator!=( PhysicalDeviceSparseProperties const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::Bool32 residencyStandard2DBlockShape = {}; VULKAN_HPP_NAMESPACE::Bool32 residencyStandard2DMultisampleBlockShape = {}; VULKAN_HPP_NAMESPACE::Bool32 residencyStandard3DBlockShape = {}; VULKAN_HPP_NAMESPACE::Bool32 residencyAlignedMipSize = {}; VULKAN_HPP_NAMESPACE::Bool32 residencyNonResidentStrict = {}; }; struct PhysicalDeviceProperties { using NativeType = VkPhysicalDeviceProperties; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceProperties( uint32_t apiVersion_ = {}, uint32_t driverVersion_ = {}, uint32_t vendorID_ = {}, uint32_t deviceID_ = {}, VULKAN_HPP_NAMESPACE::PhysicalDeviceType deviceType_ = VULKAN_HPP_NAMESPACE::PhysicalDeviceType::eOther, std::array const & deviceName_ = {}, std::array const & pipelineCacheUUID_ = {}, VULKAN_HPP_NAMESPACE::PhysicalDeviceLimits limits_ = {}, VULKAN_HPP_NAMESPACE::PhysicalDeviceSparseProperties sparseProperties_ = {} ) VULKAN_HPP_NOEXCEPT : apiVersion{ apiVersion_ } , driverVersion{ driverVersion_ } , vendorID{ vendorID_ } , deviceID{ deviceID_ } , deviceType{ deviceType_ } , deviceName{ deviceName_ } , pipelineCacheUUID{ pipelineCacheUUID_ } , limits{ limits_ } , sparseProperties{ sparseProperties_ } { } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceProperties( PhysicalDeviceProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceProperties( VkPhysicalDeviceProperties const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceProperties( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceProperties & operator=( PhysicalDeviceProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceProperties & operator=( VkPhysicalDeviceProperties const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceProperties const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceProperties &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple const &, VULKAN_HPP_NAMESPACE::ArrayWrapper1D const &, VULKAN_HPP_NAMESPACE::PhysicalDeviceLimits const &, VULKAN_HPP_NAMESPACE::PhysicalDeviceSparseProperties const &> # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( apiVersion, driverVersion, vendorID, deviceID, deviceType, deviceName, pipelineCacheUUID, limits, sparseProperties ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) std::partial_ordering operator<=>( PhysicalDeviceProperties const & rhs ) const VULKAN_HPP_NOEXCEPT { if ( auto cmp = apiVersion <=> rhs.apiVersion; cmp != 0 ) return cmp; if ( auto cmp = driverVersion <=> rhs.driverVersion; cmp != 0 ) return cmp; if ( auto cmp = vendorID <=> rhs.vendorID; cmp != 0 ) return cmp; if ( auto cmp = deviceID <=> rhs.deviceID; cmp != 0 ) return cmp; if ( auto cmp = deviceType <=> rhs.deviceType; cmp != 0 ) return cmp; if ( auto cmp = strcmp( deviceName, rhs.deviceName ); cmp != 0 ) return ( cmp < 0 ) ? std::partial_ordering::less : std::partial_ordering::greater; if ( auto cmp = pipelineCacheUUID <=> rhs.pipelineCacheUUID; cmp != 0 ) return cmp; if ( auto cmp = limits <=> rhs.limits; cmp != 0 ) return cmp; if ( auto cmp = sparseProperties <=> rhs.sparseProperties; cmp != 0 ) return cmp; return std::partial_ordering::equivalent; } #endif bool operator==( PhysicalDeviceProperties const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( apiVersion == rhs.apiVersion ) && ( driverVersion == rhs.driverVersion ) && ( vendorID == rhs.vendorID ) && ( deviceID == rhs.deviceID ) && ( deviceType == rhs.deviceType ) && ( strcmp( deviceName, rhs.deviceName ) == 0 ) && ( pipelineCacheUUID == rhs.pipelineCacheUUID ) && ( limits == rhs.limits ) && ( sparseProperties == rhs.sparseProperties ); } bool operator!=( PhysicalDeviceProperties const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: uint32_t apiVersion = {}; uint32_t driverVersion = {}; uint32_t vendorID = {}; uint32_t deviceID = {}; VULKAN_HPP_NAMESPACE::PhysicalDeviceType deviceType = VULKAN_HPP_NAMESPACE::PhysicalDeviceType::eOther; VULKAN_HPP_NAMESPACE::ArrayWrapper1D deviceName = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D pipelineCacheUUID = {}; VULKAN_HPP_NAMESPACE::PhysicalDeviceLimits limits = {}; VULKAN_HPP_NAMESPACE::PhysicalDeviceSparseProperties sparseProperties = {}; }; struct PhysicalDeviceProperties2 { using NativeType = VkPhysicalDeviceProperties2; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceProperties2; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceProperties2( VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties properties_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , properties{ properties_ } { } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceProperties2( PhysicalDeviceProperties2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceProperties2( VkPhysicalDeviceProperties2 const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceProperties2( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceProperties2 & operator=( PhysicalDeviceProperties2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceProperties2 & operator=( VkPhysicalDeviceProperties2 const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceProperties2 const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceProperties2 &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, properties ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceProperties2 const & ) const = default; #else bool operator==( PhysicalDeviceProperties2 const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( properties == rhs.properties ); # endif } bool operator!=( PhysicalDeviceProperties2 const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceProperties2; void * pNext = {}; VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties properties = {}; }; template <> struct CppType { using Type = PhysicalDeviceProperties2; }; using PhysicalDeviceProperties2KHR = PhysicalDeviceProperties2; struct PhysicalDeviceLayeredApiVulkanPropertiesKHR { using NativeType = VkPhysicalDeviceLayeredApiVulkanPropertiesKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceLayeredApiVulkanPropertiesKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceLayeredApiVulkanPropertiesKHR( VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties2 properties_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , properties{ properties_ } { } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceLayeredApiVulkanPropertiesKHR( PhysicalDeviceLayeredApiVulkanPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceLayeredApiVulkanPropertiesKHR( VkPhysicalDeviceLayeredApiVulkanPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceLayeredApiVulkanPropertiesKHR( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceLayeredApiVulkanPropertiesKHR & operator=( PhysicalDeviceLayeredApiVulkanPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceLayeredApiVulkanPropertiesKHR & operator=( VkPhysicalDeviceLayeredApiVulkanPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceLayeredApiVulkanPropertiesKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceLayeredApiVulkanPropertiesKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, properties ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceLayeredApiVulkanPropertiesKHR const & ) const = default; #else bool operator==( PhysicalDeviceLayeredApiVulkanPropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( properties == rhs.properties ); # endif } bool operator!=( PhysicalDeviceLayeredApiVulkanPropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceLayeredApiVulkanPropertiesKHR; void * pNext = {}; VULKAN_HPP_NAMESPACE::PhysicalDeviceProperties2 properties = {}; }; template <> struct CppType { using Type = PhysicalDeviceLayeredApiVulkanPropertiesKHR; }; struct PhysicalDeviceLayeredDriverPropertiesMSFT { using NativeType = VkPhysicalDeviceLayeredDriverPropertiesMSFT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceLayeredDriverPropertiesMSFT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceLayeredDriverPropertiesMSFT( VULKAN_HPP_NAMESPACE::LayeredDriverUnderlyingApiMSFT underlyingAPI_ = VULKAN_HPP_NAMESPACE::LayeredDriverUnderlyingApiMSFT::eNone, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , underlyingAPI{ underlyingAPI_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceLayeredDriverPropertiesMSFT( PhysicalDeviceLayeredDriverPropertiesMSFT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceLayeredDriverPropertiesMSFT( VkPhysicalDeviceLayeredDriverPropertiesMSFT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceLayeredDriverPropertiesMSFT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceLayeredDriverPropertiesMSFT & operator=( PhysicalDeviceLayeredDriverPropertiesMSFT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceLayeredDriverPropertiesMSFT & operator=( VkPhysicalDeviceLayeredDriverPropertiesMSFT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceLayeredDriverPropertiesMSFT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceLayeredDriverPropertiesMSFT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, underlyingAPI ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceLayeredDriverPropertiesMSFT const & ) const = default; #else bool operator==( PhysicalDeviceLayeredDriverPropertiesMSFT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( underlyingAPI == rhs.underlyingAPI ); # endif } bool operator!=( PhysicalDeviceLayeredDriverPropertiesMSFT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceLayeredDriverPropertiesMSFT; void * pNext = {}; VULKAN_HPP_NAMESPACE::LayeredDriverUnderlyingApiMSFT underlyingAPI = VULKAN_HPP_NAMESPACE::LayeredDriverUnderlyingApiMSFT::eNone; }; template <> struct CppType { using Type = PhysicalDeviceLayeredDriverPropertiesMSFT; }; struct PhysicalDeviceLegacyDitheringFeaturesEXT { using NativeType = VkPhysicalDeviceLegacyDitheringFeaturesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceLegacyDitheringFeaturesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceLegacyDitheringFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 legacyDithering_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , legacyDithering{ legacyDithering_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceLegacyDitheringFeaturesEXT( PhysicalDeviceLegacyDitheringFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceLegacyDitheringFeaturesEXT( VkPhysicalDeviceLegacyDitheringFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceLegacyDitheringFeaturesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceLegacyDitheringFeaturesEXT & operator=( PhysicalDeviceLegacyDitheringFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceLegacyDitheringFeaturesEXT & operator=( VkPhysicalDeviceLegacyDitheringFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceLegacyDitheringFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceLegacyDitheringFeaturesEXT & setLegacyDithering( VULKAN_HPP_NAMESPACE::Bool32 legacyDithering_ ) VULKAN_HPP_NOEXCEPT { legacyDithering = legacyDithering_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceLegacyDitheringFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceLegacyDitheringFeaturesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, legacyDithering ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceLegacyDitheringFeaturesEXT const & ) const = default; #else bool operator==( PhysicalDeviceLegacyDitheringFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( legacyDithering == rhs.legacyDithering ); # endif } bool operator!=( PhysicalDeviceLegacyDitheringFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceLegacyDitheringFeaturesEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 legacyDithering = {}; }; template <> struct CppType { using Type = PhysicalDeviceLegacyDitheringFeaturesEXT; }; struct PhysicalDeviceLegacyVertexAttributesFeaturesEXT { using NativeType = VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceLegacyVertexAttributesFeaturesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceLegacyVertexAttributesFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 legacyVertexAttributes_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , legacyVertexAttributes{ legacyVertexAttributes_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceLegacyVertexAttributesFeaturesEXT( PhysicalDeviceLegacyVertexAttributesFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceLegacyVertexAttributesFeaturesEXT( VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceLegacyVertexAttributesFeaturesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceLegacyVertexAttributesFeaturesEXT & operator=( PhysicalDeviceLegacyVertexAttributesFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceLegacyVertexAttributesFeaturesEXT & operator=( VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceLegacyVertexAttributesFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceLegacyVertexAttributesFeaturesEXT & setLegacyVertexAttributes( VULKAN_HPP_NAMESPACE::Bool32 legacyVertexAttributes_ ) VULKAN_HPP_NOEXCEPT { legacyVertexAttributes = legacyVertexAttributes_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, legacyVertexAttributes ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceLegacyVertexAttributesFeaturesEXT const & ) const = default; #else bool operator==( PhysicalDeviceLegacyVertexAttributesFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( legacyVertexAttributes == rhs.legacyVertexAttributes ); # endif } bool operator!=( PhysicalDeviceLegacyVertexAttributesFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceLegacyVertexAttributesFeaturesEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 legacyVertexAttributes = {}; }; template <> struct CppType { using Type = PhysicalDeviceLegacyVertexAttributesFeaturesEXT; }; struct PhysicalDeviceLegacyVertexAttributesPropertiesEXT { using NativeType = VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceLegacyVertexAttributesPropertiesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceLegacyVertexAttributesPropertiesEXT( VULKAN_HPP_NAMESPACE::Bool32 nativeUnalignedPerformance_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , nativeUnalignedPerformance{ nativeUnalignedPerformance_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceLegacyVertexAttributesPropertiesEXT( PhysicalDeviceLegacyVertexAttributesPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceLegacyVertexAttributesPropertiesEXT( VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceLegacyVertexAttributesPropertiesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceLegacyVertexAttributesPropertiesEXT & operator=( PhysicalDeviceLegacyVertexAttributesPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceLegacyVertexAttributesPropertiesEXT & operator=( VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceLegacyVertexAttributesPropertiesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceLegacyVertexAttributesPropertiesEXT & setNativeUnalignedPerformance( VULKAN_HPP_NAMESPACE::Bool32 nativeUnalignedPerformance_ ) VULKAN_HPP_NOEXCEPT { nativeUnalignedPerformance = nativeUnalignedPerformance_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, nativeUnalignedPerformance ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceLegacyVertexAttributesPropertiesEXT const & ) const = default; #else bool operator==( PhysicalDeviceLegacyVertexAttributesPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( nativeUnalignedPerformance == rhs.nativeUnalignedPerformance ); # endif } bool operator!=( PhysicalDeviceLegacyVertexAttributesPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceLegacyVertexAttributesPropertiesEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 nativeUnalignedPerformance = {}; }; template <> struct CppType { using Type = PhysicalDeviceLegacyVertexAttributesPropertiesEXT; }; struct PhysicalDeviceLineRasterizationFeatures { using NativeType = VkPhysicalDeviceLineRasterizationFeatures; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceLineRasterizationFeatures; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceLineRasterizationFeatures( VULKAN_HPP_NAMESPACE::Bool32 rectangularLines_ = {}, VULKAN_HPP_NAMESPACE::Bool32 bresenhamLines_ = {}, VULKAN_HPP_NAMESPACE::Bool32 smoothLines_ = {}, VULKAN_HPP_NAMESPACE::Bool32 stippledRectangularLines_ = {}, VULKAN_HPP_NAMESPACE::Bool32 stippledBresenhamLines_ = {}, VULKAN_HPP_NAMESPACE::Bool32 stippledSmoothLines_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , rectangularLines{ rectangularLines_ } , bresenhamLines{ bresenhamLines_ } , smoothLines{ smoothLines_ } , stippledRectangularLines{ stippledRectangularLines_ } , stippledBresenhamLines{ stippledBresenhamLines_ } , stippledSmoothLines{ stippledSmoothLines_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceLineRasterizationFeatures( PhysicalDeviceLineRasterizationFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceLineRasterizationFeatures( VkPhysicalDeviceLineRasterizationFeatures const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceLineRasterizationFeatures( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceLineRasterizationFeatures & operator=( PhysicalDeviceLineRasterizationFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceLineRasterizationFeatures & operator=( VkPhysicalDeviceLineRasterizationFeatures const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceLineRasterizationFeatures & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceLineRasterizationFeatures & setRectangularLines( VULKAN_HPP_NAMESPACE::Bool32 rectangularLines_ ) VULKAN_HPP_NOEXCEPT { rectangularLines = rectangularLines_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceLineRasterizationFeatures & setBresenhamLines( VULKAN_HPP_NAMESPACE::Bool32 bresenhamLines_ ) VULKAN_HPP_NOEXCEPT { bresenhamLines = bresenhamLines_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceLineRasterizationFeatures & setSmoothLines( VULKAN_HPP_NAMESPACE::Bool32 smoothLines_ ) VULKAN_HPP_NOEXCEPT { smoothLines = smoothLines_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceLineRasterizationFeatures & setStippledRectangularLines( VULKAN_HPP_NAMESPACE::Bool32 stippledRectangularLines_ ) VULKAN_HPP_NOEXCEPT { stippledRectangularLines = stippledRectangularLines_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceLineRasterizationFeatures & setStippledBresenhamLines( VULKAN_HPP_NAMESPACE::Bool32 stippledBresenhamLines_ ) VULKAN_HPP_NOEXCEPT { stippledBresenhamLines = stippledBresenhamLines_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceLineRasterizationFeatures & setStippledSmoothLines( VULKAN_HPP_NAMESPACE::Bool32 stippledSmoothLines_ ) VULKAN_HPP_NOEXCEPT { stippledSmoothLines = stippledSmoothLines_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceLineRasterizationFeatures const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceLineRasterizationFeatures &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, rectangularLines, bresenhamLines, smoothLines, stippledRectangularLines, stippledBresenhamLines, stippledSmoothLines ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceLineRasterizationFeatures const & ) const = default; #else bool operator==( PhysicalDeviceLineRasterizationFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( rectangularLines == rhs.rectangularLines ) && ( bresenhamLines == rhs.bresenhamLines ) && ( smoothLines == rhs.smoothLines ) && ( stippledRectangularLines == rhs.stippledRectangularLines ) && ( stippledBresenhamLines == rhs.stippledBresenhamLines ) && ( stippledSmoothLines == rhs.stippledSmoothLines ); # endif } bool operator!=( PhysicalDeviceLineRasterizationFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceLineRasterizationFeatures; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 rectangularLines = {}; VULKAN_HPP_NAMESPACE::Bool32 bresenhamLines = {}; VULKAN_HPP_NAMESPACE::Bool32 smoothLines = {}; VULKAN_HPP_NAMESPACE::Bool32 stippledRectangularLines = {}; VULKAN_HPP_NAMESPACE::Bool32 stippledBresenhamLines = {}; VULKAN_HPP_NAMESPACE::Bool32 stippledSmoothLines = {}; }; template <> struct CppType { using Type = PhysicalDeviceLineRasterizationFeatures; }; using PhysicalDeviceLineRasterizationFeaturesEXT = PhysicalDeviceLineRasterizationFeatures; using PhysicalDeviceLineRasterizationFeaturesKHR = PhysicalDeviceLineRasterizationFeatures; struct PhysicalDeviceLineRasterizationProperties { using NativeType = VkPhysicalDeviceLineRasterizationProperties; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceLineRasterizationProperties; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceLineRasterizationProperties( uint32_t lineSubPixelPrecisionBits_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , lineSubPixelPrecisionBits{ lineSubPixelPrecisionBits_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceLineRasterizationProperties( PhysicalDeviceLineRasterizationProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceLineRasterizationProperties( VkPhysicalDeviceLineRasterizationProperties const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceLineRasterizationProperties( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceLineRasterizationProperties & operator=( PhysicalDeviceLineRasterizationProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceLineRasterizationProperties & operator=( VkPhysicalDeviceLineRasterizationProperties const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceLineRasterizationProperties const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceLineRasterizationProperties &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, lineSubPixelPrecisionBits ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceLineRasterizationProperties const & ) const = default; #else bool operator==( PhysicalDeviceLineRasterizationProperties const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( lineSubPixelPrecisionBits == rhs.lineSubPixelPrecisionBits ); # endif } bool operator!=( PhysicalDeviceLineRasterizationProperties const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceLineRasterizationProperties; void * pNext = {}; uint32_t lineSubPixelPrecisionBits = {}; }; template <> struct CppType { using Type = PhysicalDeviceLineRasterizationProperties; }; using PhysicalDeviceLineRasterizationPropertiesEXT = PhysicalDeviceLineRasterizationProperties; using PhysicalDeviceLineRasterizationPropertiesKHR = PhysicalDeviceLineRasterizationProperties; struct PhysicalDeviceLinearColorAttachmentFeaturesNV { using NativeType = VkPhysicalDeviceLinearColorAttachmentFeaturesNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceLinearColorAttachmentFeaturesNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceLinearColorAttachmentFeaturesNV( VULKAN_HPP_NAMESPACE::Bool32 linearColorAttachment_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , linearColorAttachment{ linearColorAttachment_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceLinearColorAttachmentFeaturesNV( PhysicalDeviceLinearColorAttachmentFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceLinearColorAttachmentFeaturesNV( VkPhysicalDeviceLinearColorAttachmentFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceLinearColorAttachmentFeaturesNV( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceLinearColorAttachmentFeaturesNV & operator=( PhysicalDeviceLinearColorAttachmentFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceLinearColorAttachmentFeaturesNV & operator=( VkPhysicalDeviceLinearColorAttachmentFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceLinearColorAttachmentFeaturesNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceLinearColorAttachmentFeaturesNV & setLinearColorAttachment( VULKAN_HPP_NAMESPACE::Bool32 linearColorAttachment_ ) VULKAN_HPP_NOEXCEPT { linearColorAttachment = linearColorAttachment_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceLinearColorAttachmentFeaturesNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceLinearColorAttachmentFeaturesNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, linearColorAttachment ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceLinearColorAttachmentFeaturesNV const & ) const = default; #else bool operator==( PhysicalDeviceLinearColorAttachmentFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( linearColorAttachment == rhs.linearColorAttachment ); # endif } bool operator!=( PhysicalDeviceLinearColorAttachmentFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceLinearColorAttachmentFeaturesNV; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 linearColorAttachment = {}; }; template <> struct CppType { using Type = PhysicalDeviceLinearColorAttachmentFeaturesNV; }; struct PhysicalDeviceMaintenance3Properties { using NativeType = VkPhysicalDeviceMaintenance3Properties; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceMaintenance3Properties; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceMaintenance3Properties( uint32_t maxPerSetDescriptors_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize maxMemoryAllocationSize_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , maxPerSetDescriptors{ maxPerSetDescriptors_ } , maxMemoryAllocationSize{ maxMemoryAllocationSize_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceMaintenance3Properties( PhysicalDeviceMaintenance3Properties const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceMaintenance3Properties( VkPhysicalDeviceMaintenance3Properties const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceMaintenance3Properties( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceMaintenance3Properties & operator=( PhysicalDeviceMaintenance3Properties const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceMaintenance3Properties & operator=( VkPhysicalDeviceMaintenance3Properties const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceMaintenance3Properties const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceMaintenance3Properties &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, maxPerSetDescriptors, maxMemoryAllocationSize ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceMaintenance3Properties const & ) const = default; #else bool operator==( PhysicalDeviceMaintenance3Properties const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( maxPerSetDescriptors == rhs.maxPerSetDescriptors ) && ( maxMemoryAllocationSize == rhs.maxMemoryAllocationSize ); # endif } bool operator!=( PhysicalDeviceMaintenance3Properties const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceMaintenance3Properties; void * pNext = {}; uint32_t maxPerSetDescriptors = {}; VULKAN_HPP_NAMESPACE::DeviceSize maxMemoryAllocationSize = {}; }; template <> struct CppType { using Type = PhysicalDeviceMaintenance3Properties; }; using PhysicalDeviceMaintenance3PropertiesKHR = PhysicalDeviceMaintenance3Properties; struct PhysicalDeviceMaintenance4Features { using NativeType = VkPhysicalDeviceMaintenance4Features; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceMaintenance4Features; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceMaintenance4Features( VULKAN_HPP_NAMESPACE::Bool32 maintenance4_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , maintenance4{ maintenance4_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceMaintenance4Features( PhysicalDeviceMaintenance4Features const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceMaintenance4Features( VkPhysicalDeviceMaintenance4Features const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceMaintenance4Features( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceMaintenance4Features & operator=( PhysicalDeviceMaintenance4Features const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceMaintenance4Features & operator=( VkPhysicalDeviceMaintenance4Features const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceMaintenance4Features & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceMaintenance4Features & setMaintenance4( VULKAN_HPP_NAMESPACE::Bool32 maintenance4_ ) VULKAN_HPP_NOEXCEPT { maintenance4 = maintenance4_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceMaintenance4Features const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceMaintenance4Features &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, maintenance4 ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceMaintenance4Features const & ) const = default; #else bool operator==( PhysicalDeviceMaintenance4Features const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( maintenance4 == rhs.maintenance4 ); # endif } bool operator!=( PhysicalDeviceMaintenance4Features const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceMaintenance4Features; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 maintenance4 = {}; }; template <> struct CppType { using Type = PhysicalDeviceMaintenance4Features; }; using PhysicalDeviceMaintenance4FeaturesKHR = PhysicalDeviceMaintenance4Features; struct PhysicalDeviceMaintenance4Properties { using NativeType = VkPhysicalDeviceMaintenance4Properties; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceMaintenance4Properties; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceMaintenance4Properties( VULKAN_HPP_NAMESPACE::DeviceSize maxBufferSize_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , maxBufferSize{ maxBufferSize_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceMaintenance4Properties( PhysicalDeviceMaintenance4Properties const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceMaintenance4Properties( VkPhysicalDeviceMaintenance4Properties const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceMaintenance4Properties( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceMaintenance4Properties & operator=( PhysicalDeviceMaintenance4Properties const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceMaintenance4Properties & operator=( VkPhysicalDeviceMaintenance4Properties const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceMaintenance4Properties const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceMaintenance4Properties &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, maxBufferSize ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceMaintenance4Properties const & ) const = default; #else bool operator==( PhysicalDeviceMaintenance4Properties const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( maxBufferSize == rhs.maxBufferSize ); # endif } bool operator!=( PhysicalDeviceMaintenance4Properties const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceMaintenance4Properties; void * pNext = {}; VULKAN_HPP_NAMESPACE::DeviceSize maxBufferSize = {}; }; template <> struct CppType { using Type = PhysicalDeviceMaintenance4Properties; }; using PhysicalDeviceMaintenance4PropertiesKHR = PhysicalDeviceMaintenance4Properties; struct PhysicalDeviceMaintenance5Features { using NativeType = VkPhysicalDeviceMaintenance5Features; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceMaintenance5Features; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceMaintenance5Features( VULKAN_HPP_NAMESPACE::Bool32 maintenance5_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , maintenance5{ maintenance5_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceMaintenance5Features( PhysicalDeviceMaintenance5Features const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceMaintenance5Features( VkPhysicalDeviceMaintenance5Features const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceMaintenance5Features( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceMaintenance5Features & operator=( PhysicalDeviceMaintenance5Features const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceMaintenance5Features & operator=( VkPhysicalDeviceMaintenance5Features const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceMaintenance5Features & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceMaintenance5Features & setMaintenance5( VULKAN_HPP_NAMESPACE::Bool32 maintenance5_ ) VULKAN_HPP_NOEXCEPT { maintenance5 = maintenance5_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceMaintenance5Features const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceMaintenance5Features &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, maintenance5 ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceMaintenance5Features const & ) const = default; #else bool operator==( PhysicalDeviceMaintenance5Features const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( maintenance5 == rhs.maintenance5 ); # endif } bool operator!=( PhysicalDeviceMaintenance5Features const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceMaintenance5Features; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 maintenance5 = {}; }; template <> struct CppType { using Type = PhysicalDeviceMaintenance5Features; }; using PhysicalDeviceMaintenance5FeaturesKHR = PhysicalDeviceMaintenance5Features; struct PhysicalDeviceMaintenance5Properties { using NativeType = VkPhysicalDeviceMaintenance5Properties; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceMaintenance5Properties; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceMaintenance5Properties( VULKAN_HPP_NAMESPACE::Bool32 earlyFragmentMultisampleCoverageAfterSampleCounting_ = {}, VULKAN_HPP_NAMESPACE::Bool32 earlyFragmentSampleMaskTestBeforeSampleCounting_ = {}, VULKAN_HPP_NAMESPACE::Bool32 depthStencilSwizzleOneSupport_ = {}, VULKAN_HPP_NAMESPACE::Bool32 polygonModePointSize_ = {}, VULKAN_HPP_NAMESPACE::Bool32 nonStrictSinglePixelWideLinesUseParallelogram_ = {}, VULKAN_HPP_NAMESPACE::Bool32 nonStrictWideLinesUseParallelogram_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , earlyFragmentMultisampleCoverageAfterSampleCounting{ earlyFragmentMultisampleCoverageAfterSampleCounting_ } , earlyFragmentSampleMaskTestBeforeSampleCounting{ earlyFragmentSampleMaskTestBeforeSampleCounting_ } , depthStencilSwizzleOneSupport{ depthStencilSwizzleOneSupport_ } , polygonModePointSize{ polygonModePointSize_ } , nonStrictSinglePixelWideLinesUseParallelogram{ nonStrictSinglePixelWideLinesUseParallelogram_ } , nonStrictWideLinesUseParallelogram{ nonStrictWideLinesUseParallelogram_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceMaintenance5Properties( PhysicalDeviceMaintenance5Properties const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceMaintenance5Properties( VkPhysicalDeviceMaintenance5Properties const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceMaintenance5Properties( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceMaintenance5Properties & operator=( PhysicalDeviceMaintenance5Properties const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceMaintenance5Properties & operator=( VkPhysicalDeviceMaintenance5Properties const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceMaintenance5Properties const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceMaintenance5Properties &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, earlyFragmentMultisampleCoverageAfterSampleCounting, earlyFragmentSampleMaskTestBeforeSampleCounting, depthStencilSwizzleOneSupport, polygonModePointSize, nonStrictSinglePixelWideLinesUseParallelogram, nonStrictWideLinesUseParallelogram ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceMaintenance5Properties const & ) const = default; #else bool operator==( PhysicalDeviceMaintenance5Properties const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( earlyFragmentMultisampleCoverageAfterSampleCounting == rhs.earlyFragmentMultisampleCoverageAfterSampleCounting ) && ( earlyFragmentSampleMaskTestBeforeSampleCounting == rhs.earlyFragmentSampleMaskTestBeforeSampleCounting ) && ( depthStencilSwizzleOneSupport == rhs.depthStencilSwizzleOneSupport ) && ( polygonModePointSize == rhs.polygonModePointSize ) && ( nonStrictSinglePixelWideLinesUseParallelogram == rhs.nonStrictSinglePixelWideLinesUseParallelogram ) && ( nonStrictWideLinesUseParallelogram == rhs.nonStrictWideLinesUseParallelogram ); # endif } bool operator!=( PhysicalDeviceMaintenance5Properties const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceMaintenance5Properties; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 earlyFragmentMultisampleCoverageAfterSampleCounting = {}; VULKAN_HPP_NAMESPACE::Bool32 earlyFragmentSampleMaskTestBeforeSampleCounting = {}; VULKAN_HPP_NAMESPACE::Bool32 depthStencilSwizzleOneSupport = {}; VULKAN_HPP_NAMESPACE::Bool32 polygonModePointSize = {}; VULKAN_HPP_NAMESPACE::Bool32 nonStrictSinglePixelWideLinesUseParallelogram = {}; VULKAN_HPP_NAMESPACE::Bool32 nonStrictWideLinesUseParallelogram = {}; }; template <> struct CppType { using Type = PhysicalDeviceMaintenance5Properties; }; using PhysicalDeviceMaintenance5PropertiesKHR = PhysicalDeviceMaintenance5Properties; struct PhysicalDeviceMaintenance6Features { using NativeType = VkPhysicalDeviceMaintenance6Features; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceMaintenance6Features; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceMaintenance6Features( VULKAN_HPP_NAMESPACE::Bool32 maintenance6_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , maintenance6{ maintenance6_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceMaintenance6Features( PhysicalDeviceMaintenance6Features const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceMaintenance6Features( VkPhysicalDeviceMaintenance6Features const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceMaintenance6Features( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceMaintenance6Features & operator=( PhysicalDeviceMaintenance6Features const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceMaintenance6Features & operator=( VkPhysicalDeviceMaintenance6Features const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceMaintenance6Features & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceMaintenance6Features & setMaintenance6( VULKAN_HPP_NAMESPACE::Bool32 maintenance6_ ) VULKAN_HPP_NOEXCEPT { maintenance6 = maintenance6_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceMaintenance6Features const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceMaintenance6Features &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, maintenance6 ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceMaintenance6Features const & ) const = default; #else bool operator==( PhysicalDeviceMaintenance6Features const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( maintenance6 == rhs.maintenance6 ); # endif } bool operator!=( PhysicalDeviceMaintenance6Features const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceMaintenance6Features; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 maintenance6 = {}; }; template <> struct CppType { using Type = PhysicalDeviceMaintenance6Features; }; using PhysicalDeviceMaintenance6FeaturesKHR = PhysicalDeviceMaintenance6Features; struct PhysicalDeviceMaintenance6Properties { using NativeType = VkPhysicalDeviceMaintenance6Properties; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceMaintenance6Properties; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceMaintenance6Properties( VULKAN_HPP_NAMESPACE::Bool32 blockTexelViewCompatibleMultipleLayers_ = {}, uint32_t maxCombinedImageSamplerDescriptorCount_ = {}, VULKAN_HPP_NAMESPACE::Bool32 fragmentShadingRateClampCombinerInputs_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , blockTexelViewCompatibleMultipleLayers{ blockTexelViewCompatibleMultipleLayers_ } , maxCombinedImageSamplerDescriptorCount{ maxCombinedImageSamplerDescriptorCount_ } , fragmentShadingRateClampCombinerInputs{ fragmentShadingRateClampCombinerInputs_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceMaintenance6Properties( PhysicalDeviceMaintenance6Properties const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceMaintenance6Properties( VkPhysicalDeviceMaintenance6Properties const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceMaintenance6Properties( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceMaintenance6Properties & operator=( PhysicalDeviceMaintenance6Properties const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceMaintenance6Properties & operator=( VkPhysicalDeviceMaintenance6Properties const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceMaintenance6Properties const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceMaintenance6Properties &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, blockTexelViewCompatibleMultipleLayers, maxCombinedImageSamplerDescriptorCount, fragmentShadingRateClampCombinerInputs ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceMaintenance6Properties const & ) const = default; #else bool operator==( PhysicalDeviceMaintenance6Properties const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( blockTexelViewCompatibleMultipleLayers == rhs.blockTexelViewCompatibleMultipleLayers ) && ( maxCombinedImageSamplerDescriptorCount == rhs.maxCombinedImageSamplerDescriptorCount ) && ( fragmentShadingRateClampCombinerInputs == rhs.fragmentShadingRateClampCombinerInputs ); # endif } bool operator!=( PhysicalDeviceMaintenance6Properties const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceMaintenance6Properties; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 blockTexelViewCompatibleMultipleLayers = {}; uint32_t maxCombinedImageSamplerDescriptorCount = {}; VULKAN_HPP_NAMESPACE::Bool32 fragmentShadingRateClampCombinerInputs = {}; }; template <> struct CppType { using Type = PhysicalDeviceMaintenance6Properties; }; using PhysicalDeviceMaintenance6PropertiesKHR = PhysicalDeviceMaintenance6Properties; struct PhysicalDeviceMaintenance7FeaturesKHR { using NativeType = VkPhysicalDeviceMaintenance7FeaturesKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceMaintenance7FeaturesKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceMaintenance7FeaturesKHR( VULKAN_HPP_NAMESPACE::Bool32 maintenance7_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , maintenance7{ maintenance7_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceMaintenance7FeaturesKHR( PhysicalDeviceMaintenance7FeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceMaintenance7FeaturesKHR( VkPhysicalDeviceMaintenance7FeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceMaintenance7FeaturesKHR( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceMaintenance7FeaturesKHR & operator=( PhysicalDeviceMaintenance7FeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceMaintenance7FeaturesKHR & operator=( VkPhysicalDeviceMaintenance7FeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceMaintenance7FeaturesKHR & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceMaintenance7FeaturesKHR & setMaintenance7( VULKAN_HPP_NAMESPACE::Bool32 maintenance7_ ) VULKAN_HPP_NOEXCEPT { maintenance7 = maintenance7_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceMaintenance7FeaturesKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceMaintenance7FeaturesKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, maintenance7 ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceMaintenance7FeaturesKHR const & ) const = default; #else bool operator==( PhysicalDeviceMaintenance7FeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( maintenance7 == rhs.maintenance7 ); # endif } bool operator!=( PhysicalDeviceMaintenance7FeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceMaintenance7FeaturesKHR; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 maintenance7 = {}; }; template <> struct CppType { using Type = PhysicalDeviceMaintenance7FeaturesKHR; }; struct PhysicalDeviceMaintenance7PropertiesKHR { using NativeType = VkPhysicalDeviceMaintenance7PropertiesKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceMaintenance7PropertiesKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceMaintenance7PropertiesKHR( VULKAN_HPP_NAMESPACE::Bool32 robustFragmentShadingRateAttachmentAccess_ = {}, VULKAN_HPP_NAMESPACE::Bool32 separateDepthStencilAttachmentAccess_ = {}, uint32_t maxDescriptorSetTotalUniformBuffersDynamic_ = {}, uint32_t maxDescriptorSetTotalStorageBuffersDynamic_ = {}, uint32_t maxDescriptorSetTotalBuffersDynamic_ = {}, uint32_t maxDescriptorSetUpdateAfterBindTotalUniformBuffersDynamic_ = {}, uint32_t maxDescriptorSetUpdateAfterBindTotalStorageBuffersDynamic_ = {}, uint32_t maxDescriptorSetUpdateAfterBindTotalBuffersDynamic_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , robustFragmentShadingRateAttachmentAccess{ robustFragmentShadingRateAttachmentAccess_ } , separateDepthStencilAttachmentAccess{ separateDepthStencilAttachmentAccess_ } , maxDescriptorSetTotalUniformBuffersDynamic{ maxDescriptorSetTotalUniformBuffersDynamic_ } , maxDescriptorSetTotalStorageBuffersDynamic{ maxDescriptorSetTotalStorageBuffersDynamic_ } , maxDescriptorSetTotalBuffersDynamic{ maxDescriptorSetTotalBuffersDynamic_ } , maxDescriptorSetUpdateAfterBindTotalUniformBuffersDynamic{ maxDescriptorSetUpdateAfterBindTotalUniformBuffersDynamic_ } , maxDescriptorSetUpdateAfterBindTotalStorageBuffersDynamic{ maxDescriptorSetUpdateAfterBindTotalStorageBuffersDynamic_ } , maxDescriptorSetUpdateAfterBindTotalBuffersDynamic{ maxDescriptorSetUpdateAfterBindTotalBuffersDynamic_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceMaintenance7PropertiesKHR( PhysicalDeviceMaintenance7PropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceMaintenance7PropertiesKHR( VkPhysicalDeviceMaintenance7PropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceMaintenance7PropertiesKHR( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceMaintenance7PropertiesKHR & operator=( PhysicalDeviceMaintenance7PropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceMaintenance7PropertiesKHR & operator=( VkPhysicalDeviceMaintenance7PropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceMaintenance7PropertiesKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceMaintenance7PropertiesKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, robustFragmentShadingRateAttachmentAccess, separateDepthStencilAttachmentAccess, maxDescriptorSetTotalUniformBuffersDynamic, maxDescriptorSetTotalStorageBuffersDynamic, maxDescriptorSetTotalBuffersDynamic, maxDescriptorSetUpdateAfterBindTotalUniformBuffersDynamic, maxDescriptorSetUpdateAfterBindTotalStorageBuffersDynamic, maxDescriptorSetUpdateAfterBindTotalBuffersDynamic ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceMaintenance7PropertiesKHR const & ) const = default; #else bool operator==( PhysicalDeviceMaintenance7PropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( robustFragmentShadingRateAttachmentAccess == rhs.robustFragmentShadingRateAttachmentAccess ) && ( separateDepthStencilAttachmentAccess == rhs.separateDepthStencilAttachmentAccess ) && ( maxDescriptorSetTotalUniformBuffersDynamic == rhs.maxDescriptorSetTotalUniformBuffersDynamic ) && ( maxDescriptorSetTotalStorageBuffersDynamic == rhs.maxDescriptorSetTotalStorageBuffersDynamic ) && ( maxDescriptorSetTotalBuffersDynamic == rhs.maxDescriptorSetTotalBuffersDynamic ) && ( maxDescriptorSetUpdateAfterBindTotalUniformBuffersDynamic == rhs.maxDescriptorSetUpdateAfterBindTotalUniformBuffersDynamic ) && ( maxDescriptorSetUpdateAfterBindTotalStorageBuffersDynamic == rhs.maxDescriptorSetUpdateAfterBindTotalStorageBuffersDynamic ) && ( maxDescriptorSetUpdateAfterBindTotalBuffersDynamic == rhs.maxDescriptorSetUpdateAfterBindTotalBuffersDynamic ); # endif } bool operator!=( PhysicalDeviceMaintenance7PropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceMaintenance7PropertiesKHR; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 robustFragmentShadingRateAttachmentAccess = {}; VULKAN_HPP_NAMESPACE::Bool32 separateDepthStencilAttachmentAccess = {}; uint32_t maxDescriptorSetTotalUniformBuffersDynamic = {}; uint32_t maxDescriptorSetTotalStorageBuffersDynamic = {}; uint32_t maxDescriptorSetTotalBuffersDynamic = {}; uint32_t maxDescriptorSetUpdateAfterBindTotalUniformBuffersDynamic = {}; uint32_t maxDescriptorSetUpdateAfterBindTotalStorageBuffersDynamic = {}; uint32_t maxDescriptorSetUpdateAfterBindTotalBuffersDynamic = {}; }; template <> struct CppType { using Type = PhysicalDeviceMaintenance7PropertiesKHR; }; struct PhysicalDeviceMaintenance8FeaturesKHR { using NativeType = VkPhysicalDeviceMaintenance8FeaturesKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceMaintenance8FeaturesKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceMaintenance8FeaturesKHR( VULKAN_HPP_NAMESPACE::Bool32 maintenance8_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , maintenance8{ maintenance8_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceMaintenance8FeaturesKHR( PhysicalDeviceMaintenance8FeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceMaintenance8FeaturesKHR( VkPhysicalDeviceMaintenance8FeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceMaintenance8FeaturesKHR( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceMaintenance8FeaturesKHR & operator=( PhysicalDeviceMaintenance8FeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceMaintenance8FeaturesKHR & operator=( VkPhysicalDeviceMaintenance8FeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceMaintenance8FeaturesKHR & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceMaintenance8FeaturesKHR & setMaintenance8( VULKAN_HPP_NAMESPACE::Bool32 maintenance8_ ) VULKAN_HPP_NOEXCEPT { maintenance8 = maintenance8_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceMaintenance8FeaturesKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceMaintenance8FeaturesKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, maintenance8 ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceMaintenance8FeaturesKHR const & ) const = default; #else bool operator==( PhysicalDeviceMaintenance8FeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( maintenance8 == rhs.maintenance8 ); # endif } bool operator!=( PhysicalDeviceMaintenance8FeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceMaintenance8FeaturesKHR; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 maintenance8 = {}; }; template <> struct CppType { using Type = PhysicalDeviceMaintenance8FeaturesKHR; }; struct PhysicalDeviceMapMemoryPlacedFeaturesEXT { using NativeType = VkPhysicalDeviceMapMemoryPlacedFeaturesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceMapMemoryPlacedFeaturesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceMapMemoryPlacedFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 memoryMapPlaced_ = {}, VULKAN_HPP_NAMESPACE::Bool32 memoryMapRangePlaced_ = {}, VULKAN_HPP_NAMESPACE::Bool32 memoryUnmapReserve_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , memoryMapPlaced{ memoryMapPlaced_ } , memoryMapRangePlaced{ memoryMapRangePlaced_ } , memoryUnmapReserve{ memoryUnmapReserve_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceMapMemoryPlacedFeaturesEXT( PhysicalDeviceMapMemoryPlacedFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceMapMemoryPlacedFeaturesEXT( VkPhysicalDeviceMapMemoryPlacedFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceMapMemoryPlacedFeaturesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceMapMemoryPlacedFeaturesEXT & operator=( PhysicalDeviceMapMemoryPlacedFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceMapMemoryPlacedFeaturesEXT & operator=( VkPhysicalDeviceMapMemoryPlacedFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceMapMemoryPlacedFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceMapMemoryPlacedFeaturesEXT & setMemoryMapPlaced( VULKAN_HPP_NAMESPACE::Bool32 memoryMapPlaced_ ) VULKAN_HPP_NOEXCEPT { memoryMapPlaced = memoryMapPlaced_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceMapMemoryPlacedFeaturesEXT & setMemoryMapRangePlaced( VULKAN_HPP_NAMESPACE::Bool32 memoryMapRangePlaced_ ) VULKAN_HPP_NOEXCEPT { memoryMapRangePlaced = memoryMapRangePlaced_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceMapMemoryPlacedFeaturesEXT & setMemoryUnmapReserve( VULKAN_HPP_NAMESPACE::Bool32 memoryUnmapReserve_ ) VULKAN_HPP_NOEXCEPT { memoryUnmapReserve = memoryUnmapReserve_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceMapMemoryPlacedFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceMapMemoryPlacedFeaturesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, memoryMapPlaced, memoryMapRangePlaced, memoryUnmapReserve ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceMapMemoryPlacedFeaturesEXT const & ) const = default; #else bool operator==( PhysicalDeviceMapMemoryPlacedFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( memoryMapPlaced == rhs.memoryMapPlaced ) && ( memoryMapRangePlaced == rhs.memoryMapRangePlaced ) && ( memoryUnmapReserve == rhs.memoryUnmapReserve ); # endif } bool operator!=( PhysicalDeviceMapMemoryPlacedFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceMapMemoryPlacedFeaturesEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 memoryMapPlaced = {}; VULKAN_HPP_NAMESPACE::Bool32 memoryMapRangePlaced = {}; VULKAN_HPP_NAMESPACE::Bool32 memoryUnmapReserve = {}; }; template <> struct CppType { using Type = PhysicalDeviceMapMemoryPlacedFeaturesEXT; }; struct PhysicalDeviceMapMemoryPlacedPropertiesEXT { using NativeType = VkPhysicalDeviceMapMemoryPlacedPropertiesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceMapMemoryPlacedPropertiesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceMapMemoryPlacedPropertiesEXT( VULKAN_HPP_NAMESPACE::DeviceSize minPlacedMemoryMapAlignment_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , minPlacedMemoryMapAlignment{ minPlacedMemoryMapAlignment_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceMapMemoryPlacedPropertiesEXT( PhysicalDeviceMapMemoryPlacedPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceMapMemoryPlacedPropertiesEXT( VkPhysicalDeviceMapMemoryPlacedPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceMapMemoryPlacedPropertiesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceMapMemoryPlacedPropertiesEXT & operator=( PhysicalDeviceMapMemoryPlacedPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceMapMemoryPlacedPropertiesEXT & operator=( VkPhysicalDeviceMapMemoryPlacedPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceMapMemoryPlacedPropertiesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceMapMemoryPlacedPropertiesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, minPlacedMemoryMapAlignment ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceMapMemoryPlacedPropertiesEXT const & ) const = default; #else bool operator==( PhysicalDeviceMapMemoryPlacedPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( minPlacedMemoryMapAlignment == rhs.minPlacedMemoryMapAlignment ); # endif } bool operator!=( PhysicalDeviceMapMemoryPlacedPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceMapMemoryPlacedPropertiesEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::DeviceSize minPlacedMemoryMapAlignment = {}; }; template <> struct CppType { using Type = PhysicalDeviceMapMemoryPlacedPropertiesEXT; }; struct PhysicalDeviceMemoryBudgetPropertiesEXT { using NativeType = VkPhysicalDeviceMemoryBudgetPropertiesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceMemoryBudgetPropertiesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceMemoryBudgetPropertiesEXT( std::array const & heapBudget_ = {}, std::array const & heapUsage_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , heapBudget{ heapBudget_ } , heapUsage{ heapUsage_ } { } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceMemoryBudgetPropertiesEXT( PhysicalDeviceMemoryBudgetPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceMemoryBudgetPropertiesEXT( VkPhysicalDeviceMemoryBudgetPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceMemoryBudgetPropertiesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceMemoryBudgetPropertiesEXT & operator=( PhysicalDeviceMemoryBudgetPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceMemoryBudgetPropertiesEXT & operator=( VkPhysicalDeviceMemoryBudgetPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceMemoryBudgetPropertiesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceMemoryBudgetPropertiesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple const &, VULKAN_HPP_NAMESPACE::ArrayWrapper1D const &> # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, heapBudget, heapUsage ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceMemoryBudgetPropertiesEXT const & ) const = default; #else bool operator==( PhysicalDeviceMemoryBudgetPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( heapBudget == rhs.heapBudget ) && ( heapUsage == rhs.heapUsage ); # endif } bool operator!=( PhysicalDeviceMemoryBudgetPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceMemoryBudgetPropertiesEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D heapBudget = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D heapUsage = {}; }; template <> struct CppType { using Type = PhysicalDeviceMemoryBudgetPropertiesEXT; }; struct PhysicalDeviceMemoryDecompressionFeaturesNV { using NativeType = VkPhysicalDeviceMemoryDecompressionFeaturesNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceMemoryDecompressionFeaturesNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceMemoryDecompressionFeaturesNV( VULKAN_HPP_NAMESPACE::Bool32 memoryDecompression_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , memoryDecompression{ memoryDecompression_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceMemoryDecompressionFeaturesNV( PhysicalDeviceMemoryDecompressionFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceMemoryDecompressionFeaturesNV( VkPhysicalDeviceMemoryDecompressionFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceMemoryDecompressionFeaturesNV( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceMemoryDecompressionFeaturesNV & operator=( PhysicalDeviceMemoryDecompressionFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceMemoryDecompressionFeaturesNV & operator=( VkPhysicalDeviceMemoryDecompressionFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceMemoryDecompressionFeaturesNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceMemoryDecompressionFeaturesNV & setMemoryDecompression( VULKAN_HPP_NAMESPACE::Bool32 memoryDecompression_ ) VULKAN_HPP_NOEXCEPT { memoryDecompression = memoryDecompression_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceMemoryDecompressionFeaturesNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceMemoryDecompressionFeaturesNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, memoryDecompression ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceMemoryDecompressionFeaturesNV const & ) const = default; #else bool operator==( PhysicalDeviceMemoryDecompressionFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( memoryDecompression == rhs.memoryDecompression ); # endif } bool operator!=( PhysicalDeviceMemoryDecompressionFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceMemoryDecompressionFeaturesNV; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 memoryDecompression = {}; }; template <> struct CppType { using Type = PhysicalDeviceMemoryDecompressionFeaturesNV; }; struct PhysicalDeviceMemoryDecompressionPropertiesNV { using NativeType = VkPhysicalDeviceMemoryDecompressionPropertiesNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceMemoryDecompressionPropertiesNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceMemoryDecompressionPropertiesNV( VULKAN_HPP_NAMESPACE::MemoryDecompressionMethodFlagsNV decompressionMethods_ = {}, uint64_t maxDecompressionIndirectCount_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , decompressionMethods{ decompressionMethods_ } , maxDecompressionIndirectCount{ maxDecompressionIndirectCount_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceMemoryDecompressionPropertiesNV( PhysicalDeviceMemoryDecompressionPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceMemoryDecompressionPropertiesNV( VkPhysicalDeviceMemoryDecompressionPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceMemoryDecompressionPropertiesNV( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceMemoryDecompressionPropertiesNV & operator=( PhysicalDeviceMemoryDecompressionPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceMemoryDecompressionPropertiesNV & operator=( VkPhysicalDeviceMemoryDecompressionPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceMemoryDecompressionPropertiesNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceMemoryDecompressionPropertiesNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, decompressionMethods, maxDecompressionIndirectCount ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceMemoryDecompressionPropertiesNV const & ) const = default; #else bool operator==( PhysicalDeviceMemoryDecompressionPropertiesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( decompressionMethods == rhs.decompressionMethods ) && ( maxDecompressionIndirectCount == rhs.maxDecompressionIndirectCount ); # endif } bool operator!=( PhysicalDeviceMemoryDecompressionPropertiesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceMemoryDecompressionPropertiesNV; void * pNext = {}; VULKAN_HPP_NAMESPACE::MemoryDecompressionMethodFlagsNV decompressionMethods = {}; uint64_t maxDecompressionIndirectCount = {}; }; template <> struct CppType { using Type = PhysicalDeviceMemoryDecompressionPropertiesNV; }; struct PhysicalDeviceMemoryPriorityFeaturesEXT { using NativeType = VkPhysicalDeviceMemoryPriorityFeaturesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceMemoryPriorityFeaturesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceMemoryPriorityFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 memoryPriority_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , memoryPriority{ memoryPriority_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceMemoryPriorityFeaturesEXT( PhysicalDeviceMemoryPriorityFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceMemoryPriorityFeaturesEXT( VkPhysicalDeviceMemoryPriorityFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceMemoryPriorityFeaturesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceMemoryPriorityFeaturesEXT & operator=( PhysicalDeviceMemoryPriorityFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceMemoryPriorityFeaturesEXT & operator=( VkPhysicalDeviceMemoryPriorityFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceMemoryPriorityFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceMemoryPriorityFeaturesEXT & setMemoryPriority( VULKAN_HPP_NAMESPACE::Bool32 memoryPriority_ ) VULKAN_HPP_NOEXCEPT { memoryPriority = memoryPriority_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceMemoryPriorityFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceMemoryPriorityFeaturesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, memoryPriority ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceMemoryPriorityFeaturesEXT const & ) const = default; #else bool operator==( PhysicalDeviceMemoryPriorityFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( memoryPriority == rhs.memoryPriority ); # endif } bool operator!=( PhysicalDeviceMemoryPriorityFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceMemoryPriorityFeaturesEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 memoryPriority = {}; }; template <> struct CppType { using Type = PhysicalDeviceMemoryPriorityFeaturesEXT; }; struct PhysicalDeviceMemoryProperties { using NativeType = VkPhysicalDeviceMemoryProperties; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceMemoryProperties( uint32_t memoryTypeCount_ = {}, std::array const & memoryTypes_ = {}, uint32_t memoryHeapCount_ = {}, std::array const & memoryHeaps_ = {} ) VULKAN_HPP_NOEXCEPT : memoryTypeCount{ memoryTypeCount_ } , memoryTypes{ memoryTypes_ } , memoryHeapCount{ memoryHeapCount_ } , memoryHeaps{ memoryHeaps_ } { } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceMemoryProperties( PhysicalDeviceMemoryProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceMemoryProperties( VkPhysicalDeviceMemoryProperties const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceMemoryProperties( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceMemoryProperties & operator=( PhysicalDeviceMemoryProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceMemoryProperties & operator=( VkPhysicalDeviceMemoryProperties const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceMemoryProperties const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceMemoryProperties &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple const &, uint32_t const &, VULKAN_HPP_NAMESPACE::ArrayWrapper1D const &> # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( memoryTypeCount, memoryTypes, memoryHeapCount, memoryHeaps ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) std::strong_ordering operator<=>( PhysicalDeviceMemoryProperties const & rhs ) const VULKAN_HPP_NOEXCEPT { if ( auto cmp = memoryTypeCount <=> rhs.memoryTypeCount; cmp != 0 ) return cmp; for ( size_t i = 0; i < memoryTypeCount; ++i ) { if ( auto cmp = memoryTypes[i] <=> rhs.memoryTypes[i]; cmp != 0 ) return cmp; } if ( auto cmp = memoryHeapCount <=> rhs.memoryHeapCount; cmp != 0 ) return cmp; for ( size_t i = 0; i < memoryHeapCount; ++i ) { if ( auto cmp = memoryHeaps[i] <=> rhs.memoryHeaps[i]; cmp != 0 ) return cmp; } return std::strong_ordering::equivalent; } #endif bool operator==( PhysicalDeviceMemoryProperties const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( memoryTypeCount == rhs.memoryTypeCount ) && ( memcmp( memoryTypes, rhs.memoryTypes, memoryTypeCount * sizeof( VULKAN_HPP_NAMESPACE::MemoryType ) ) == 0 ) && ( memoryHeapCount == rhs.memoryHeapCount ) && ( memcmp( memoryHeaps, rhs.memoryHeaps, memoryHeapCount * sizeof( VULKAN_HPP_NAMESPACE::MemoryHeap ) ) == 0 ); } bool operator!=( PhysicalDeviceMemoryProperties const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: uint32_t memoryTypeCount = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D memoryTypes = {}; uint32_t memoryHeapCount = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D memoryHeaps = {}; }; struct PhysicalDeviceMemoryProperties2 { using NativeType = VkPhysicalDeviceMemoryProperties2; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceMemoryProperties2; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceMemoryProperties2( VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties memoryProperties_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , memoryProperties{ memoryProperties_ } { } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceMemoryProperties2( PhysicalDeviceMemoryProperties2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceMemoryProperties2( VkPhysicalDeviceMemoryProperties2 const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceMemoryProperties2( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceMemoryProperties2 & operator=( PhysicalDeviceMemoryProperties2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceMemoryProperties2 & operator=( VkPhysicalDeviceMemoryProperties2 const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceMemoryProperties2 const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceMemoryProperties2 &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, memoryProperties ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceMemoryProperties2 const & ) const = default; #else bool operator==( PhysicalDeviceMemoryProperties2 const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( memoryProperties == rhs.memoryProperties ); # endif } bool operator!=( PhysicalDeviceMemoryProperties2 const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceMemoryProperties2; void * pNext = {}; VULKAN_HPP_NAMESPACE::PhysicalDeviceMemoryProperties memoryProperties = {}; }; template <> struct CppType { using Type = PhysicalDeviceMemoryProperties2; }; using PhysicalDeviceMemoryProperties2KHR = PhysicalDeviceMemoryProperties2; struct PhysicalDeviceMeshShaderFeaturesEXT { using NativeType = VkPhysicalDeviceMeshShaderFeaturesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceMeshShaderFeaturesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceMeshShaderFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 taskShader_ = {}, VULKAN_HPP_NAMESPACE::Bool32 meshShader_ = {}, VULKAN_HPP_NAMESPACE::Bool32 multiviewMeshShader_ = {}, VULKAN_HPP_NAMESPACE::Bool32 primitiveFragmentShadingRateMeshShader_ = {}, VULKAN_HPP_NAMESPACE::Bool32 meshShaderQueries_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , taskShader{ taskShader_ } , meshShader{ meshShader_ } , multiviewMeshShader{ multiviewMeshShader_ } , primitiveFragmentShadingRateMeshShader{ primitiveFragmentShadingRateMeshShader_ } , meshShaderQueries{ meshShaderQueries_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceMeshShaderFeaturesEXT( PhysicalDeviceMeshShaderFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceMeshShaderFeaturesEXT( VkPhysicalDeviceMeshShaderFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceMeshShaderFeaturesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceMeshShaderFeaturesEXT & operator=( PhysicalDeviceMeshShaderFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceMeshShaderFeaturesEXT & operator=( VkPhysicalDeviceMeshShaderFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceMeshShaderFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceMeshShaderFeaturesEXT & setTaskShader( VULKAN_HPP_NAMESPACE::Bool32 taskShader_ ) VULKAN_HPP_NOEXCEPT { taskShader = taskShader_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceMeshShaderFeaturesEXT & setMeshShader( VULKAN_HPP_NAMESPACE::Bool32 meshShader_ ) VULKAN_HPP_NOEXCEPT { meshShader = meshShader_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceMeshShaderFeaturesEXT & setMultiviewMeshShader( VULKAN_HPP_NAMESPACE::Bool32 multiviewMeshShader_ ) VULKAN_HPP_NOEXCEPT { multiviewMeshShader = multiviewMeshShader_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceMeshShaderFeaturesEXT & setPrimitiveFragmentShadingRateMeshShader( VULKAN_HPP_NAMESPACE::Bool32 primitiveFragmentShadingRateMeshShader_ ) VULKAN_HPP_NOEXCEPT { primitiveFragmentShadingRateMeshShader = primitiveFragmentShadingRateMeshShader_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceMeshShaderFeaturesEXT & setMeshShaderQueries( VULKAN_HPP_NAMESPACE::Bool32 meshShaderQueries_ ) VULKAN_HPP_NOEXCEPT { meshShaderQueries = meshShaderQueries_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceMeshShaderFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceMeshShaderFeaturesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, taskShader, meshShader, multiviewMeshShader, primitiveFragmentShadingRateMeshShader, meshShaderQueries ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceMeshShaderFeaturesEXT const & ) const = default; #else bool operator==( PhysicalDeviceMeshShaderFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( taskShader == rhs.taskShader ) && ( meshShader == rhs.meshShader ) && ( multiviewMeshShader == rhs.multiviewMeshShader ) && ( primitiveFragmentShadingRateMeshShader == rhs.primitiveFragmentShadingRateMeshShader ) && ( meshShaderQueries == rhs.meshShaderQueries ); # endif } bool operator!=( PhysicalDeviceMeshShaderFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceMeshShaderFeaturesEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 taskShader = {}; VULKAN_HPP_NAMESPACE::Bool32 meshShader = {}; VULKAN_HPP_NAMESPACE::Bool32 multiviewMeshShader = {}; VULKAN_HPP_NAMESPACE::Bool32 primitiveFragmentShadingRateMeshShader = {}; VULKAN_HPP_NAMESPACE::Bool32 meshShaderQueries = {}; }; template <> struct CppType { using Type = PhysicalDeviceMeshShaderFeaturesEXT; }; struct PhysicalDeviceMeshShaderFeaturesNV { using NativeType = VkPhysicalDeviceMeshShaderFeaturesNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceMeshShaderFeaturesNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceMeshShaderFeaturesNV( VULKAN_HPP_NAMESPACE::Bool32 taskShader_ = {}, VULKAN_HPP_NAMESPACE::Bool32 meshShader_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , taskShader{ taskShader_ } , meshShader{ meshShader_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceMeshShaderFeaturesNV( PhysicalDeviceMeshShaderFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceMeshShaderFeaturesNV( VkPhysicalDeviceMeshShaderFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceMeshShaderFeaturesNV( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceMeshShaderFeaturesNV & operator=( PhysicalDeviceMeshShaderFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceMeshShaderFeaturesNV & operator=( VkPhysicalDeviceMeshShaderFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceMeshShaderFeaturesNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceMeshShaderFeaturesNV & setTaskShader( VULKAN_HPP_NAMESPACE::Bool32 taskShader_ ) VULKAN_HPP_NOEXCEPT { taskShader = taskShader_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceMeshShaderFeaturesNV & setMeshShader( VULKAN_HPP_NAMESPACE::Bool32 meshShader_ ) VULKAN_HPP_NOEXCEPT { meshShader = meshShader_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceMeshShaderFeaturesNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceMeshShaderFeaturesNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, taskShader, meshShader ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceMeshShaderFeaturesNV const & ) const = default; #else bool operator==( PhysicalDeviceMeshShaderFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( taskShader == rhs.taskShader ) && ( meshShader == rhs.meshShader ); # endif } bool operator!=( PhysicalDeviceMeshShaderFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceMeshShaderFeaturesNV; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 taskShader = {}; VULKAN_HPP_NAMESPACE::Bool32 meshShader = {}; }; template <> struct CppType { using Type = PhysicalDeviceMeshShaderFeaturesNV; }; struct PhysicalDeviceMeshShaderPropertiesEXT { using NativeType = VkPhysicalDeviceMeshShaderPropertiesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceMeshShaderPropertiesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceMeshShaderPropertiesEXT( uint32_t maxTaskWorkGroupTotalCount_ = {}, std::array const & maxTaskWorkGroupCount_ = {}, uint32_t maxTaskWorkGroupInvocations_ = {}, std::array const & maxTaskWorkGroupSize_ = {}, uint32_t maxTaskPayloadSize_ = {}, uint32_t maxTaskSharedMemorySize_ = {}, uint32_t maxTaskPayloadAndSharedMemorySize_ = {}, uint32_t maxMeshWorkGroupTotalCount_ = {}, std::array const & maxMeshWorkGroupCount_ = {}, uint32_t maxMeshWorkGroupInvocations_ = {}, std::array const & maxMeshWorkGroupSize_ = {}, uint32_t maxMeshSharedMemorySize_ = {}, uint32_t maxMeshPayloadAndSharedMemorySize_ = {}, uint32_t maxMeshOutputMemorySize_ = {}, uint32_t maxMeshPayloadAndOutputMemorySize_ = {}, uint32_t maxMeshOutputComponents_ = {}, uint32_t maxMeshOutputVertices_ = {}, uint32_t maxMeshOutputPrimitives_ = {}, uint32_t maxMeshOutputLayers_ = {}, uint32_t maxMeshMultiviewViewCount_ = {}, uint32_t meshOutputPerVertexGranularity_ = {}, uint32_t meshOutputPerPrimitiveGranularity_ = {}, uint32_t maxPreferredTaskWorkGroupInvocations_ = {}, uint32_t maxPreferredMeshWorkGroupInvocations_ = {}, VULKAN_HPP_NAMESPACE::Bool32 prefersLocalInvocationVertexOutput_ = {}, VULKAN_HPP_NAMESPACE::Bool32 prefersLocalInvocationPrimitiveOutput_ = {}, VULKAN_HPP_NAMESPACE::Bool32 prefersCompactVertexOutput_ = {}, VULKAN_HPP_NAMESPACE::Bool32 prefersCompactPrimitiveOutput_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , maxTaskWorkGroupTotalCount{ maxTaskWorkGroupTotalCount_ } , maxTaskWorkGroupCount{ maxTaskWorkGroupCount_ } , maxTaskWorkGroupInvocations{ maxTaskWorkGroupInvocations_ } , maxTaskWorkGroupSize{ maxTaskWorkGroupSize_ } , maxTaskPayloadSize{ maxTaskPayloadSize_ } , maxTaskSharedMemorySize{ maxTaskSharedMemorySize_ } , maxTaskPayloadAndSharedMemorySize{ maxTaskPayloadAndSharedMemorySize_ } , maxMeshWorkGroupTotalCount{ maxMeshWorkGroupTotalCount_ } , maxMeshWorkGroupCount{ maxMeshWorkGroupCount_ } , maxMeshWorkGroupInvocations{ maxMeshWorkGroupInvocations_ } , maxMeshWorkGroupSize{ maxMeshWorkGroupSize_ } , maxMeshSharedMemorySize{ maxMeshSharedMemorySize_ } , maxMeshPayloadAndSharedMemorySize{ maxMeshPayloadAndSharedMemorySize_ } , maxMeshOutputMemorySize{ maxMeshOutputMemorySize_ } , maxMeshPayloadAndOutputMemorySize{ maxMeshPayloadAndOutputMemorySize_ } , maxMeshOutputComponents{ maxMeshOutputComponents_ } , maxMeshOutputVertices{ maxMeshOutputVertices_ } , maxMeshOutputPrimitives{ maxMeshOutputPrimitives_ } , maxMeshOutputLayers{ maxMeshOutputLayers_ } , maxMeshMultiviewViewCount{ maxMeshMultiviewViewCount_ } , meshOutputPerVertexGranularity{ meshOutputPerVertexGranularity_ } , meshOutputPerPrimitiveGranularity{ meshOutputPerPrimitiveGranularity_ } , maxPreferredTaskWorkGroupInvocations{ maxPreferredTaskWorkGroupInvocations_ } , maxPreferredMeshWorkGroupInvocations{ maxPreferredMeshWorkGroupInvocations_ } , prefersLocalInvocationVertexOutput{ prefersLocalInvocationVertexOutput_ } , prefersLocalInvocationPrimitiveOutput{ prefersLocalInvocationPrimitiveOutput_ } , prefersCompactVertexOutput{ prefersCompactVertexOutput_ } , prefersCompactPrimitiveOutput{ prefersCompactPrimitiveOutput_ } { } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceMeshShaderPropertiesEXT( PhysicalDeviceMeshShaderPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceMeshShaderPropertiesEXT( VkPhysicalDeviceMeshShaderPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceMeshShaderPropertiesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceMeshShaderPropertiesEXT & operator=( PhysicalDeviceMeshShaderPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceMeshShaderPropertiesEXT & operator=( VkPhysicalDeviceMeshShaderPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceMeshShaderPropertiesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceMeshShaderPropertiesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple const &, uint32_t const &, VULKAN_HPP_NAMESPACE::ArrayWrapper1D const &, uint32_t const &, uint32_t const &, uint32_t const &, uint32_t const &, VULKAN_HPP_NAMESPACE::ArrayWrapper1D const &, uint32_t const &, VULKAN_HPP_NAMESPACE::ArrayWrapper1D const &, uint32_t const &, uint32_t const &, uint32_t const &, uint32_t const &, uint32_t const &, uint32_t const &, uint32_t const &, uint32_t const &, uint32_t const &, uint32_t const &, uint32_t const &, uint32_t const &, uint32_t const &, VULKAN_HPP_NAMESPACE::Bool32 const &, VULKAN_HPP_NAMESPACE::Bool32 const &, VULKAN_HPP_NAMESPACE::Bool32 const &, VULKAN_HPP_NAMESPACE::Bool32 const &> # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, maxTaskWorkGroupTotalCount, maxTaskWorkGroupCount, maxTaskWorkGroupInvocations, maxTaskWorkGroupSize, maxTaskPayloadSize, maxTaskSharedMemorySize, maxTaskPayloadAndSharedMemorySize, maxMeshWorkGroupTotalCount, maxMeshWorkGroupCount, maxMeshWorkGroupInvocations, maxMeshWorkGroupSize, maxMeshSharedMemorySize, maxMeshPayloadAndSharedMemorySize, maxMeshOutputMemorySize, maxMeshPayloadAndOutputMemorySize, maxMeshOutputComponents, maxMeshOutputVertices, maxMeshOutputPrimitives, maxMeshOutputLayers, maxMeshMultiviewViewCount, meshOutputPerVertexGranularity, meshOutputPerPrimitiveGranularity, maxPreferredTaskWorkGroupInvocations, maxPreferredMeshWorkGroupInvocations, prefersLocalInvocationVertexOutput, prefersLocalInvocationPrimitiveOutput, prefersCompactVertexOutput, prefersCompactPrimitiveOutput ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceMeshShaderPropertiesEXT const & ) const = default; #else bool operator==( PhysicalDeviceMeshShaderPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( maxTaskWorkGroupTotalCount == rhs.maxTaskWorkGroupTotalCount ) && ( maxTaskWorkGroupCount == rhs.maxTaskWorkGroupCount ) && ( maxTaskWorkGroupInvocations == rhs.maxTaskWorkGroupInvocations ) && ( maxTaskWorkGroupSize == rhs.maxTaskWorkGroupSize ) && ( maxTaskPayloadSize == rhs.maxTaskPayloadSize ) && ( maxTaskSharedMemorySize == rhs.maxTaskSharedMemorySize ) && ( maxTaskPayloadAndSharedMemorySize == rhs.maxTaskPayloadAndSharedMemorySize ) && ( maxMeshWorkGroupTotalCount == rhs.maxMeshWorkGroupTotalCount ) && ( maxMeshWorkGroupCount == rhs.maxMeshWorkGroupCount ) && ( maxMeshWorkGroupInvocations == rhs.maxMeshWorkGroupInvocations ) && ( maxMeshWorkGroupSize == rhs.maxMeshWorkGroupSize ) && ( maxMeshSharedMemorySize == rhs.maxMeshSharedMemorySize ) && ( maxMeshPayloadAndSharedMemorySize == rhs.maxMeshPayloadAndSharedMemorySize ) && ( maxMeshOutputMemorySize == rhs.maxMeshOutputMemorySize ) && ( maxMeshPayloadAndOutputMemorySize == rhs.maxMeshPayloadAndOutputMemorySize ) && ( maxMeshOutputComponents == rhs.maxMeshOutputComponents ) && ( maxMeshOutputVertices == rhs.maxMeshOutputVertices ) && ( maxMeshOutputPrimitives == rhs.maxMeshOutputPrimitives ) && ( maxMeshOutputLayers == rhs.maxMeshOutputLayers ) && ( maxMeshMultiviewViewCount == rhs.maxMeshMultiviewViewCount ) && ( meshOutputPerVertexGranularity == rhs.meshOutputPerVertexGranularity ) && ( meshOutputPerPrimitiveGranularity == rhs.meshOutputPerPrimitiveGranularity ) && ( maxPreferredTaskWorkGroupInvocations == rhs.maxPreferredTaskWorkGroupInvocations ) && ( maxPreferredMeshWorkGroupInvocations == rhs.maxPreferredMeshWorkGroupInvocations ) && ( prefersLocalInvocationVertexOutput == rhs.prefersLocalInvocationVertexOutput ) && ( prefersLocalInvocationPrimitiveOutput == rhs.prefersLocalInvocationPrimitiveOutput ) && ( prefersCompactVertexOutput == rhs.prefersCompactVertexOutput ) && ( prefersCompactPrimitiveOutput == rhs.prefersCompactPrimitiveOutput ); # endif } bool operator!=( PhysicalDeviceMeshShaderPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceMeshShaderPropertiesEXT; void * pNext = {}; uint32_t maxTaskWorkGroupTotalCount = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D maxTaskWorkGroupCount = {}; uint32_t maxTaskWorkGroupInvocations = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D maxTaskWorkGroupSize = {}; uint32_t maxTaskPayloadSize = {}; uint32_t maxTaskSharedMemorySize = {}; uint32_t maxTaskPayloadAndSharedMemorySize = {}; uint32_t maxMeshWorkGroupTotalCount = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D maxMeshWorkGroupCount = {}; uint32_t maxMeshWorkGroupInvocations = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D maxMeshWorkGroupSize = {}; uint32_t maxMeshSharedMemorySize = {}; uint32_t maxMeshPayloadAndSharedMemorySize = {}; uint32_t maxMeshOutputMemorySize = {}; uint32_t maxMeshPayloadAndOutputMemorySize = {}; uint32_t maxMeshOutputComponents = {}; uint32_t maxMeshOutputVertices = {}; uint32_t maxMeshOutputPrimitives = {}; uint32_t maxMeshOutputLayers = {}; uint32_t maxMeshMultiviewViewCount = {}; uint32_t meshOutputPerVertexGranularity = {}; uint32_t meshOutputPerPrimitiveGranularity = {}; uint32_t maxPreferredTaskWorkGroupInvocations = {}; uint32_t maxPreferredMeshWorkGroupInvocations = {}; VULKAN_HPP_NAMESPACE::Bool32 prefersLocalInvocationVertexOutput = {}; VULKAN_HPP_NAMESPACE::Bool32 prefersLocalInvocationPrimitiveOutput = {}; VULKAN_HPP_NAMESPACE::Bool32 prefersCompactVertexOutput = {}; VULKAN_HPP_NAMESPACE::Bool32 prefersCompactPrimitiveOutput = {}; }; template <> struct CppType { using Type = PhysicalDeviceMeshShaderPropertiesEXT; }; struct PhysicalDeviceMeshShaderPropertiesNV { using NativeType = VkPhysicalDeviceMeshShaderPropertiesNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceMeshShaderPropertiesNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceMeshShaderPropertiesNV( uint32_t maxDrawMeshTasksCount_ = {}, uint32_t maxTaskWorkGroupInvocations_ = {}, std::array const & maxTaskWorkGroupSize_ = {}, uint32_t maxTaskTotalMemorySize_ = {}, uint32_t maxTaskOutputCount_ = {}, uint32_t maxMeshWorkGroupInvocations_ = {}, std::array const & maxMeshWorkGroupSize_ = {}, uint32_t maxMeshTotalMemorySize_ = {}, uint32_t maxMeshOutputVertices_ = {}, uint32_t maxMeshOutputPrimitives_ = {}, uint32_t maxMeshMultiviewViewCount_ = {}, uint32_t meshOutputPerVertexGranularity_ = {}, uint32_t meshOutputPerPrimitiveGranularity_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , maxDrawMeshTasksCount{ maxDrawMeshTasksCount_ } , maxTaskWorkGroupInvocations{ maxTaskWorkGroupInvocations_ } , maxTaskWorkGroupSize{ maxTaskWorkGroupSize_ } , maxTaskTotalMemorySize{ maxTaskTotalMemorySize_ } , maxTaskOutputCount{ maxTaskOutputCount_ } , maxMeshWorkGroupInvocations{ maxMeshWorkGroupInvocations_ } , maxMeshWorkGroupSize{ maxMeshWorkGroupSize_ } , maxMeshTotalMemorySize{ maxMeshTotalMemorySize_ } , maxMeshOutputVertices{ maxMeshOutputVertices_ } , maxMeshOutputPrimitives{ maxMeshOutputPrimitives_ } , maxMeshMultiviewViewCount{ maxMeshMultiviewViewCount_ } , meshOutputPerVertexGranularity{ meshOutputPerVertexGranularity_ } , meshOutputPerPrimitiveGranularity{ meshOutputPerPrimitiveGranularity_ } { } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceMeshShaderPropertiesNV( PhysicalDeviceMeshShaderPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceMeshShaderPropertiesNV( VkPhysicalDeviceMeshShaderPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceMeshShaderPropertiesNV( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceMeshShaderPropertiesNV & operator=( PhysicalDeviceMeshShaderPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceMeshShaderPropertiesNV & operator=( VkPhysicalDeviceMeshShaderPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceMeshShaderPropertiesNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceMeshShaderPropertiesNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple const &, uint32_t const &, uint32_t const &, uint32_t const &, VULKAN_HPP_NAMESPACE::ArrayWrapper1D const &, uint32_t const &, uint32_t const &, uint32_t const &, uint32_t const &, uint32_t const &, uint32_t const &> # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, maxDrawMeshTasksCount, maxTaskWorkGroupInvocations, maxTaskWorkGroupSize, maxTaskTotalMemorySize, maxTaskOutputCount, maxMeshWorkGroupInvocations, maxMeshWorkGroupSize, maxMeshTotalMemorySize, maxMeshOutputVertices, maxMeshOutputPrimitives, maxMeshMultiviewViewCount, meshOutputPerVertexGranularity, meshOutputPerPrimitiveGranularity ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceMeshShaderPropertiesNV const & ) const = default; #else bool operator==( PhysicalDeviceMeshShaderPropertiesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( maxDrawMeshTasksCount == rhs.maxDrawMeshTasksCount ) && ( maxTaskWorkGroupInvocations == rhs.maxTaskWorkGroupInvocations ) && ( maxTaskWorkGroupSize == rhs.maxTaskWorkGroupSize ) && ( maxTaskTotalMemorySize == rhs.maxTaskTotalMemorySize ) && ( maxTaskOutputCount == rhs.maxTaskOutputCount ) && ( maxMeshWorkGroupInvocations == rhs.maxMeshWorkGroupInvocations ) && ( maxMeshWorkGroupSize == rhs.maxMeshWorkGroupSize ) && ( maxMeshTotalMemorySize == rhs.maxMeshTotalMemorySize ) && ( maxMeshOutputVertices == rhs.maxMeshOutputVertices ) && ( maxMeshOutputPrimitives == rhs.maxMeshOutputPrimitives ) && ( maxMeshMultiviewViewCount == rhs.maxMeshMultiviewViewCount ) && ( meshOutputPerVertexGranularity == rhs.meshOutputPerVertexGranularity ) && ( meshOutputPerPrimitiveGranularity == rhs.meshOutputPerPrimitiveGranularity ); # endif } bool operator!=( PhysicalDeviceMeshShaderPropertiesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceMeshShaderPropertiesNV; void * pNext = {}; uint32_t maxDrawMeshTasksCount = {}; uint32_t maxTaskWorkGroupInvocations = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D maxTaskWorkGroupSize = {}; uint32_t maxTaskTotalMemorySize = {}; uint32_t maxTaskOutputCount = {}; uint32_t maxMeshWorkGroupInvocations = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D maxMeshWorkGroupSize = {}; uint32_t maxMeshTotalMemorySize = {}; uint32_t maxMeshOutputVertices = {}; uint32_t maxMeshOutputPrimitives = {}; uint32_t maxMeshMultiviewViewCount = {}; uint32_t meshOutputPerVertexGranularity = {}; uint32_t meshOutputPerPrimitiveGranularity = {}; }; template <> struct CppType { using Type = PhysicalDeviceMeshShaderPropertiesNV; }; struct PhysicalDeviceMultiDrawFeaturesEXT { using NativeType = VkPhysicalDeviceMultiDrawFeaturesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceMultiDrawFeaturesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceMultiDrawFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 multiDraw_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , multiDraw{ multiDraw_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceMultiDrawFeaturesEXT( PhysicalDeviceMultiDrawFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceMultiDrawFeaturesEXT( VkPhysicalDeviceMultiDrawFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceMultiDrawFeaturesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceMultiDrawFeaturesEXT & operator=( PhysicalDeviceMultiDrawFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceMultiDrawFeaturesEXT & operator=( VkPhysicalDeviceMultiDrawFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceMultiDrawFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceMultiDrawFeaturesEXT & setMultiDraw( VULKAN_HPP_NAMESPACE::Bool32 multiDraw_ ) VULKAN_HPP_NOEXCEPT { multiDraw = multiDraw_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceMultiDrawFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceMultiDrawFeaturesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, multiDraw ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceMultiDrawFeaturesEXT const & ) const = default; #else bool operator==( PhysicalDeviceMultiDrawFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( multiDraw == rhs.multiDraw ); # endif } bool operator!=( PhysicalDeviceMultiDrawFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceMultiDrawFeaturesEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 multiDraw = {}; }; template <> struct CppType { using Type = PhysicalDeviceMultiDrawFeaturesEXT; }; struct PhysicalDeviceMultiDrawPropertiesEXT { using NativeType = VkPhysicalDeviceMultiDrawPropertiesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceMultiDrawPropertiesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceMultiDrawPropertiesEXT( uint32_t maxMultiDrawCount_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , maxMultiDrawCount{ maxMultiDrawCount_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceMultiDrawPropertiesEXT( PhysicalDeviceMultiDrawPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceMultiDrawPropertiesEXT( VkPhysicalDeviceMultiDrawPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceMultiDrawPropertiesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceMultiDrawPropertiesEXT & operator=( PhysicalDeviceMultiDrawPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceMultiDrawPropertiesEXT & operator=( VkPhysicalDeviceMultiDrawPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceMultiDrawPropertiesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceMultiDrawPropertiesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, maxMultiDrawCount ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceMultiDrawPropertiesEXT const & ) const = default; #else bool operator==( PhysicalDeviceMultiDrawPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( maxMultiDrawCount == rhs.maxMultiDrawCount ); # endif } bool operator!=( PhysicalDeviceMultiDrawPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceMultiDrawPropertiesEXT; void * pNext = {}; uint32_t maxMultiDrawCount = {}; }; template <> struct CppType { using Type = PhysicalDeviceMultiDrawPropertiesEXT; }; struct PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT { using NativeType = VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 multisampledRenderToSingleSampled_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , multisampledRenderToSingleSampled{ multisampledRenderToSingleSampled_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT( PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT( VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT & operator=( PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT & operator=( VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT & setMultisampledRenderToSingleSampled( VULKAN_HPP_NAMESPACE::Bool32 multisampledRenderToSingleSampled_ ) VULKAN_HPP_NOEXCEPT { multisampledRenderToSingleSampled = multisampledRenderToSingleSampled_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, multisampledRenderToSingleSampled ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT const & ) const = default; #else bool operator==( PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( multisampledRenderToSingleSampled == rhs.multisampledRenderToSingleSampled ); # endif } bool operator!=( PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 multisampledRenderToSingleSampled = {}; }; template <> struct CppType { using Type = PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT; }; struct PhysicalDeviceMultiviewFeatures { using NativeType = VkPhysicalDeviceMultiviewFeatures; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceMultiviewFeatures; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceMultiviewFeatures( VULKAN_HPP_NAMESPACE::Bool32 multiview_ = {}, VULKAN_HPP_NAMESPACE::Bool32 multiviewGeometryShader_ = {}, VULKAN_HPP_NAMESPACE::Bool32 multiviewTessellationShader_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , multiview{ multiview_ } , multiviewGeometryShader{ multiviewGeometryShader_ } , multiviewTessellationShader{ multiviewTessellationShader_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceMultiviewFeatures( PhysicalDeviceMultiviewFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceMultiviewFeatures( VkPhysicalDeviceMultiviewFeatures const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceMultiviewFeatures( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceMultiviewFeatures & operator=( PhysicalDeviceMultiviewFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceMultiviewFeatures & operator=( VkPhysicalDeviceMultiviewFeatures const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceMultiviewFeatures & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceMultiviewFeatures & setMultiview( VULKAN_HPP_NAMESPACE::Bool32 multiview_ ) VULKAN_HPP_NOEXCEPT { multiview = multiview_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceMultiviewFeatures & setMultiviewGeometryShader( VULKAN_HPP_NAMESPACE::Bool32 multiviewGeometryShader_ ) VULKAN_HPP_NOEXCEPT { multiviewGeometryShader = multiviewGeometryShader_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceMultiviewFeatures & setMultiviewTessellationShader( VULKAN_HPP_NAMESPACE::Bool32 multiviewTessellationShader_ ) VULKAN_HPP_NOEXCEPT { multiviewTessellationShader = multiviewTessellationShader_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceMultiviewFeatures const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceMultiviewFeatures &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, multiview, multiviewGeometryShader, multiviewTessellationShader ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceMultiviewFeatures const & ) const = default; #else bool operator==( PhysicalDeviceMultiviewFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( multiview == rhs.multiview ) && ( multiviewGeometryShader == rhs.multiviewGeometryShader ) && ( multiviewTessellationShader == rhs.multiviewTessellationShader ); # endif } bool operator!=( PhysicalDeviceMultiviewFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceMultiviewFeatures; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 multiview = {}; VULKAN_HPP_NAMESPACE::Bool32 multiviewGeometryShader = {}; VULKAN_HPP_NAMESPACE::Bool32 multiviewTessellationShader = {}; }; template <> struct CppType { using Type = PhysicalDeviceMultiviewFeatures; }; using PhysicalDeviceMultiviewFeaturesKHR = PhysicalDeviceMultiviewFeatures; struct PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX { using NativeType = VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceMultiviewPerViewAttributesPropertiesNVX; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX( VULKAN_HPP_NAMESPACE::Bool32 perViewPositionAllComponents_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , perViewPositionAllComponents{ perViewPositionAllComponents_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX( PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX( VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX & operator=( PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX & operator=( VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, perViewPositionAllComponents ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX const & ) const = default; #else bool operator==( PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( perViewPositionAllComponents == rhs.perViewPositionAllComponents ); # endif } bool operator!=( PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceMultiviewPerViewAttributesPropertiesNVX; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 perViewPositionAllComponents = {}; }; template <> struct CppType { using Type = PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX; }; struct PhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM { using NativeType = VkPhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM( VULKAN_HPP_NAMESPACE::Bool32 multiviewPerViewRenderAreas_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , multiviewPerViewRenderAreas{ multiviewPerViewRenderAreas_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM( PhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM( VkPhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM & operator=( PhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM & operator=( VkPhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM & setMultiviewPerViewRenderAreas( VULKAN_HPP_NAMESPACE::Bool32 multiviewPerViewRenderAreas_ ) VULKAN_HPP_NOEXCEPT { multiviewPerViewRenderAreas = multiviewPerViewRenderAreas_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, multiviewPerViewRenderAreas ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM const & ) const = default; #else bool operator==( PhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( multiviewPerViewRenderAreas == rhs.multiviewPerViewRenderAreas ); # endif } bool operator!=( PhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 multiviewPerViewRenderAreas = {}; }; template <> struct CppType { using Type = PhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM; }; struct PhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM { using NativeType = VkPhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM( VULKAN_HPP_NAMESPACE::Bool32 multiviewPerViewViewports_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , multiviewPerViewViewports{ multiviewPerViewViewports_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM( PhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM( VkPhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM & operator=( PhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM & operator=( VkPhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM & setMultiviewPerViewViewports( VULKAN_HPP_NAMESPACE::Bool32 multiviewPerViewViewports_ ) VULKAN_HPP_NOEXCEPT { multiviewPerViewViewports = multiviewPerViewViewports_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, multiviewPerViewViewports ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM const & ) const = default; #else bool operator==( PhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( multiviewPerViewViewports == rhs.multiviewPerViewViewports ); # endif } bool operator!=( PhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 multiviewPerViewViewports = {}; }; template <> struct CppType { using Type = PhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM; }; struct PhysicalDeviceMultiviewProperties { using NativeType = VkPhysicalDeviceMultiviewProperties; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceMultiviewProperties; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceMultiviewProperties( uint32_t maxMultiviewViewCount_ = {}, uint32_t maxMultiviewInstanceIndex_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , maxMultiviewViewCount{ maxMultiviewViewCount_ } , maxMultiviewInstanceIndex{ maxMultiviewInstanceIndex_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceMultiviewProperties( PhysicalDeviceMultiviewProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceMultiviewProperties( VkPhysicalDeviceMultiviewProperties const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceMultiviewProperties( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceMultiviewProperties & operator=( PhysicalDeviceMultiviewProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceMultiviewProperties & operator=( VkPhysicalDeviceMultiviewProperties const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceMultiviewProperties const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceMultiviewProperties &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, maxMultiviewViewCount, maxMultiviewInstanceIndex ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceMultiviewProperties const & ) const = default; #else bool operator==( PhysicalDeviceMultiviewProperties const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( maxMultiviewViewCount == rhs.maxMultiviewViewCount ) && ( maxMultiviewInstanceIndex == rhs.maxMultiviewInstanceIndex ); # endif } bool operator!=( PhysicalDeviceMultiviewProperties const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceMultiviewProperties; void * pNext = {}; uint32_t maxMultiviewViewCount = {}; uint32_t maxMultiviewInstanceIndex = {}; }; template <> struct CppType { using Type = PhysicalDeviceMultiviewProperties; }; using PhysicalDeviceMultiviewPropertiesKHR = PhysicalDeviceMultiviewProperties; struct PhysicalDeviceMutableDescriptorTypeFeaturesEXT { using NativeType = VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceMutableDescriptorTypeFeaturesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceMutableDescriptorTypeFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 mutableDescriptorType_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , mutableDescriptorType{ mutableDescriptorType_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceMutableDescriptorTypeFeaturesEXT( PhysicalDeviceMutableDescriptorTypeFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceMutableDescriptorTypeFeaturesEXT( VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceMutableDescriptorTypeFeaturesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceMutableDescriptorTypeFeaturesEXT & operator=( PhysicalDeviceMutableDescriptorTypeFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceMutableDescriptorTypeFeaturesEXT & operator=( VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceMutableDescriptorTypeFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceMutableDescriptorTypeFeaturesEXT & setMutableDescriptorType( VULKAN_HPP_NAMESPACE::Bool32 mutableDescriptorType_ ) VULKAN_HPP_NOEXCEPT { mutableDescriptorType = mutableDescriptorType_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, mutableDescriptorType ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceMutableDescriptorTypeFeaturesEXT const & ) const = default; #else bool operator==( PhysicalDeviceMutableDescriptorTypeFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( mutableDescriptorType == rhs.mutableDescriptorType ); # endif } bool operator!=( PhysicalDeviceMutableDescriptorTypeFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceMutableDescriptorTypeFeaturesEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 mutableDescriptorType = {}; }; template <> struct CppType { using Type = PhysicalDeviceMutableDescriptorTypeFeaturesEXT; }; using PhysicalDeviceMutableDescriptorTypeFeaturesVALVE = PhysicalDeviceMutableDescriptorTypeFeaturesEXT; struct PhysicalDeviceNestedCommandBufferFeaturesEXT { using NativeType = VkPhysicalDeviceNestedCommandBufferFeaturesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceNestedCommandBufferFeaturesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceNestedCommandBufferFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 nestedCommandBuffer_ = {}, VULKAN_HPP_NAMESPACE::Bool32 nestedCommandBufferRendering_ = {}, VULKAN_HPP_NAMESPACE::Bool32 nestedCommandBufferSimultaneousUse_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , nestedCommandBuffer{ nestedCommandBuffer_ } , nestedCommandBufferRendering{ nestedCommandBufferRendering_ } , nestedCommandBufferSimultaneousUse{ nestedCommandBufferSimultaneousUse_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceNestedCommandBufferFeaturesEXT( PhysicalDeviceNestedCommandBufferFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceNestedCommandBufferFeaturesEXT( VkPhysicalDeviceNestedCommandBufferFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceNestedCommandBufferFeaturesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceNestedCommandBufferFeaturesEXT & operator=( PhysicalDeviceNestedCommandBufferFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceNestedCommandBufferFeaturesEXT & operator=( VkPhysicalDeviceNestedCommandBufferFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceNestedCommandBufferFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceNestedCommandBufferFeaturesEXT & setNestedCommandBuffer( VULKAN_HPP_NAMESPACE::Bool32 nestedCommandBuffer_ ) VULKAN_HPP_NOEXCEPT { nestedCommandBuffer = nestedCommandBuffer_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceNestedCommandBufferFeaturesEXT & setNestedCommandBufferRendering( VULKAN_HPP_NAMESPACE::Bool32 nestedCommandBufferRendering_ ) VULKAN_HPP_NOEXCEPT { nestedCommandBufferRendering = nestedCommandBufferRendering_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceNestedCommandBufferFeaturesEXT & setNestedCommandBufferSimultaneousUse( VULKAN_HPP_NAMESPACE::Bool32 nestedCommandBufferSimultaneousUse_ ) VULKAN_HPP_NOEXCEPT { nestedCommandBufferSimultaneousUse = nestedCommandBufferSimultaneousUse_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceNestedCommandBufferFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceNestedCommandBufferFeaturesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, nestedCommandBuffer, nestedCommandBufferRendering, nestedCommandBufferSimultaneousUse ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceNestedCommandBufferFeaturesEXT const & ) const = default; #else bool operator==( PhysicalDeviceNestedCommandBufferFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( nestedCommandBuffer == rhs.nestedCommandBuffer ) && ( nestedCommandBufferRendering == rhs.nestedCommandBufferRendering ) && ( nestedCommandBufferSimultaneousUse == rhs.nestedCommandBufferSimultaneousUse ); # endif } bool operator!=( PhysicalDeviceNestedCommandBufferFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceNestedCommandBufferFeaturesEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 nestedCommandBuffer = {}; VULKAN_HPP_NAMESPACE::Bool32 nestedCommandBufferRendering = {}; VULKAN_HPP_NAMESPACE::Bool32 nestedCommandBufferSimultaneousUse = {}; }; template <> struct CppType { using Type = PhysicalDeviceNestedCommandBufferFeaturesEXT; }; struct PhysicalDeviceNestedCommandBufferPropertiesEXT { using NativeType = VkPhysicalDeviceNestedCommandBufferPropertiesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceNestedCommandBufferPropertiesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceNestedCommandBufferPropertiesEXT( uint32_t maxCommandBufferNestingLevel_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , maxCommandBufferNestingLevel{ maxCommandBufferNestingLevel_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceNestedCommandBufferPropertiesEXT( PhysicalDeviceNestedCommandBufferPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceNestedCommandBufferPropertiesEXT( VkPhysicalDeviceNestedCommandBufferPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceNestedCommandBufferPropertiesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceNestedCommandBufferPropertiesEXT & operator=( PhysicalDeviceNestedCommandBufferPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceNestedCommandBufferPropertiesEXT & operator=( VkPhysicalDeviceNestedCommandBufferPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceNestedCommandBufferPropertiesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceNestedCommandBufferPropertiesEXT & setMaxCommandBufferNestingLevel( uint32_t maxCommandBufferNestingLevel_ ) VULKAN_HPP_NOEXCEPT { maxCommandBufferNestingLevel = maxCommandBufferNestingLevel_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceNestedCommandBufferPropertiesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceNestedCommandBufferPropertiesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, maxCommandBufferNestingLevel ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceNestedCommandBufferPropertiesEXT const & ) const = default; #else bool operator==( PhysicalDeviceNestedCommandBufferPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( maxCommandBufferNestingLevel == rhs.maxCommandBufferNestingLevel ); # endif } bool operator!=( PhysicalDeviceNestedCommandBufferPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceNestedCommandBufferPropertiesEXT; void * pNext = {}; uint32_t maxCommandBufferNestingLevel = {}; }; template <> struct CppType { using Type = PhysicalDeviceNestedCommandBufferPropertiesEXT; }; struct PhysicalDeviceNonSeamlessCubeMapFeaturesEXT { using NativeType = VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceNonSeamlessCubeMapFeaturesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceNonSeamlessCubeMapFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 nonSeamlessCubeMap_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , nonSeamlessCubeMap{ nonSeamlessCubeMap_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceNonSeamlessCubeMapFeaturesEXT( PhysicalDeviceNonSeamlessCubeMapFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceNonSeamlessCubeMapFeaturesEXT( VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceNonSeamlessCubeMapFeaturesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceNonSeamlessCubeMapFeaturesEXT & operator=( PhysicalDeviceNonSeamlessCubeMapFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceNonSeamlessCubeMapFeaturesEXT & operator=( VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceNonSeamlessCubeMapFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceNonSeamlessCubeMapFeaturesEXT & setNonSeamlessCubeMap( VULKAN_HPP_NAMESPACE::Bool32 nonSeamlessCubeMap_ ) VULKAN_HPP_NOEXCEPT { nonSeamlessCubeMap = nonSeamlessCubeMap_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, nonSeamlessCubeMap ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceNonSeamlessCubeMapFeaturesEXT const & ) const = default; #else bool operator==( PhysicalDeviceNonSeamlessCubeMapFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( nonSeamlessCubeMap == rhs.nonSeamlessCubeMap ); # endif } bool operator!=( PhysicalDeviceNonSeamlessCubeMapFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceNonSeamlessCubeMapFeaturesEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 nonSeamlessCubeMap = {}; }; template <> struct CppType { using Type = PhysicalDeviceNonSeamlessCubeMapFeaturesEXT; }; struct PhysicalDeviceOpacityMicromapFeaturesEXT { using NativeType = VkPhysicalDeviceOpacityMicromapFeaturesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceOpacityMicromapFeaturesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceOpacityMicromapFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 micromap_ = {}, VULKAN_HPP_NAMESPACE::Bool32 micromapCaptureReplay_ = {}, VULKAN_HPP_NAMESPACE::Bool32 micromapHostCommands_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , micromap{ micromap_ } , micromapCaptureReplay{ micromapCaptureReplay_ } , micromapHostCommands{ micromapHostCommands_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceOpacityMicromapFeaturesEXT( PhysicalDeviceOpacityMicromapFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceOpacityMicromapFeaturesEXT( VkPhysicalDeviceOpacityMicromapFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceOpacityMicromapFeaturesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceOpacityMicromapFeaturesEXT & operator=( PhysicalDeviceOpacityMicromapFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceOpacityMicromapFeaturesEXT & operator=( VkPhysicalDeviceOpacityMicromapFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceOpacityMicromapFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceOpacityMicromapFeaturesEXT & setMicromap( VULKAN_HPP_NAMESPACE::Bool32 micromap_ ) VULKAN_HPP_NOEXCEPT { micromap = micromap_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceOpacityMicromapFeaturesEXT & setMicromapCaptureReplay( VULKAN_HPP_NAMESPACE::Bool32 micromapCaptureReplay_ ) VULKAN_HPP_NOEXCEPT { micromapCaptureReplay = micromapCaptureReplay_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceOpacityMicromapFeaturesEXT & setMicromapHostCommands( VULKAN_HPP_NAMESPACE::Bool32 micromapHostCommands_ ) VULKAN_HPP_NOEXCEPT { micromapHostCommands = micromapHostCommands_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceOpacityMicromapFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceOpacityMicromapFeaturesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, micromap, micromapCaptureReplay, micromapHostCommands ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceOpacityMicromapFeaturesEXT const & ) const = default; #else bool operator==( PhysicalDeviceOpacityMicromapFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( micromap == rhs.micromap ) && ( micromapCaptureReplay == rhs.micromapCaptureReplay ) && ( micromapHostCommands == rhs.micromapHostCommands ); # endif } bool operator!=( PhysicalDeviceOpacityMicromapFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceOpacityMicromapFeaturesEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 micromap = {}; VULKAN_HPP_NAMESPACE::Bool32 micromapCaptureReplay = {}; VULKAN_HPP_NAMESPACE::Bool32 micromapHostCommands = {}; }; template <> struct CppType { using Type = PhysicalDeviceOpacityMicromapFeaturesEXT; }; struct PhysicalDeviceOpacityMicromapPropertiesEXT { using NativeType = VkPhysicalDeviceOpacityMicromapPropertiesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceOpacityMicromapPropertiesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceOpacityMicromapPropertiesEXT( uint32_t maxOpacity2StateSubdivisionLevel_ = {}, uint32_t maxOpacity4StateSubdivisionLevel_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , maxOpacity2StateSubdivisionLevel{ maxOpacity2StateSubdivisionLevel_ } , maxOpacity4StateSubdivisionLevel{ maxOpacity4StateSubdivisionLevel_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceOpacityMicromapPropertiesEXT( PhysicalDeviceOpacityMicromapPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceOpacityMicromapPropertiesEXT( VkPhysicalDeviceOpacityMicromapPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceOpacityMicromapPropertiesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceOpacityMicromapPropertiesEXT & operator=( PhysicalDeviceOpacityMicromapPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceOpacityMicromapPropertiesEXT & operator=( VkPhysicalDeviceOpacityMicromapPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceOpacityMicromapPropertiesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceOpacityMicromapPropertiesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, maxOpacity2StateSubdivisionLevel, maxOpacity4StateSubdivisionLevel ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceOpacityMicromapPropertiesEXT const & ) const = default; #else bool operator==( PhysicalDeviceOpacityMicromapPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( maxOpacity2StateSubdivisionLevel == rhs.maxOpacity2StateSubdivisionLevel ) && ( maxOpacity4StateSubdivisionLevel == rhs.maxOpacity4StateSubdivisionLevel ); # endif } bool operator!=( PhysicalDeviceOpacityMicromapPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceOpacityMicromapPropertiesEXT; void * pNext = {}; uint32_t maxOpacity2StateSubdivisionLevel = {}; uint32_t maxOpacity4StateSubdivisionLevel = {}; }; template <> struct CppType { using Type = PhysicalDeviceOpacityMicromapPropertiesEXT; }; struct PhysicalDeviceOpticalFlowFeaturesNV { using NativeType = VkPhysicalDeviceOpticalFlowFeaturesNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceOpticalFlowFeaturesNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceOpticalFlowFeaturesNV( VULKAN_HPP_NAMESPACE::Bool32 opticalFlow_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , opticalFlow{ opticalFlow_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceOpticalFlowFeaturesNV( PhysicalDeviceOpticalFlowFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceOpticalFlowFeaturesNV( VkPhysicalDeviceOpticalFlowFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceOpticalFlowFeaturesNV( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceOpticalFlowFeaturesNV & operator=( PhysicalDeviceOpticalFlowFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceOpticalFlowFeaturesNV & operator=( VkPhysicalDeviceOpticalFlowFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceOpticalFlowFeaturesNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceOpticalFlowFeaturesNV & setOpticalFlow( VULKAN_HPP_NAMESPACE::Bool32 opticalFlow_ ) VULKAN_HPP_NOEXCEPT { opticalFlow = opticalFlow_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceOpticalFlowFeaturesNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceOpticalFlowFeaturesNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, opticalFlow ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceOpticalFlowFeaturesNV const & ) const = default; #else bool operator==( PhysicalDeviceOpticalFlowFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( opticalFlow == rhs.opticalFlow ); # endif } bool operator!=( PhysicalDeviceOpticalFlowFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceOpticalFlowFeaturesNV; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 opticalFlow = {}; }; template <> struct CppType { using Type = PhysicalDeviceOpticalFlowFeaturesNV; }; struct PhysicalDeviceOpticalFlowPropertiesNV { using NativeType = VkPhysicalDeviceOpticalFlowPropertiesNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceOpticalFlowPropertiesNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceOpticalFlowPropertiesNV( VULKAN_HPP_NAMESPACE::OpticalFlowGridSizeFlagsNV supportedOutputGridSizes_ = {}, VULKAN_HPP_NAMESPACE::OpticalFlowGridSizeFlagsNV supportedHintGridSizes_ = {}, VULKAN_HPP_NAMESPACE::Bool32 hintSupported_ = {}, VULKAN_HPP_NAMESPACE::Bool32 costSupported_ = {}, VULKAN_HPP_NAMESPACE::Bool32 bidirectionalFlowSupported_ = {}, VULKAN_HPP_NAMESPACE::Bool32 globalFlowSupported_ = {}, uint32_t minWidth_ = {}, uint32_t minHeight_ = {}, uint32_t maxWidth_ = {}, uint32_t maxHeight_ = {}, uint32_t maxNumRegionsOfInterest_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , supportedOutputGridSizes{ supportedOutputGridSizes_ } , supportedHintGridSizes{ supportedHintGridSizes_ } , hintSupported{ hintSupported_ } , costSupported{ costSupported_ } , bidirectionalFlowSupported{ bidirectionalFlowSupported_ } , globalFlowSupported{ globalFlowSupported_ } , minWidth{ minWidth_ } , minHeight{ minHeight_ } , maxWidth{ maxWidth_ } , maxHeight{ maxHeight_ } , maxNumRegionsOfInterest{ maxNumRegionsOfInterest_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceOpticalFlowPropertiesNV( PhysicalDeviceOpticalFlowPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceOpticalFlowPropertiesNV( VkPhysicalDeviceOpticalFlowPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceOpticalFlowPropertiesNV( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceOpticalFlowPropertiesNV & operator=( PhysicalDeviceOpticalFlowPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceOpticalFlowPropertiesNV & operator=( VkPhysicalDeviceOpticalFlowPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceOpticalFlowPropertiesNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceOpticalFlowPropertiesNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, supportedOutputGridSizes, supportedHintGridSizes, hintSupported, costSupported, bidirectionalFlowSupported, globalFlowSupported, minWidth, minHeight, maxWidth, maxHeight, maxNumRegionsOfInterest ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceOpticalFlowPropertiesNV const & ) const = default; #else bool operator==( PhysicalDeviceOpticalFlowPropertiesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( supportedOutputGridSizes == rhs.supportedOutputGridSizes ) && ( supportedHintGridSizes == rhs.supportedHintGridSizes ) && ( hintSupported == rhs.hintSupported ) && ( costSupported == rhs.costSupported ) && ( bidirectionalFlowSupported == rhs.bidirectionalFlowSupported ) && ( globalFlowSupported == rhs.globalFlowSupported ) && ( minWidth == rhs.minWidth ) && ( minHeight == rhs.minHeight ) && ( maxWidth == rhs.maxWidth ) && ( maxHeight == rhs.maxHeight ) && ( maxNumRegionsOfInterest == rhs.maxNumRegionsOfInterest ); # endif } bool operator!=( PhysicalDeviceOpticalFlowPropertiesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceOpticalFlowPropertiesNV; void * pNext = {}; VULKAN_HPP_NAMESPACE::OpticalFlowGridSizeFlagsNV supportedOutputGridSizes = {}; VULKAN_HPP_NAMESPACE::OpticalFlowGridSizeFlagsNV supportedHintGridSizes = {}; VULKAN_HPP_NAMESPACE::Bool32 hintSupported = {}; VULKAN_HPP_NAMESPACE::Bool32 costSupported = {}; VULKAN_HPP_NAMESPACE::Bool32 bidirectionalFlowSupported = {}; VULKAN_HPP_NAMESPACE::Bool32 globalFlowSupported = {}; uint32_t minWidth = {}; uint32_t minHeight = {}; uint32_t maxWidth = {}; uint32_t maxHeight = {}; uint32_t maxNumRegionsOfInterest = {}; }; template <> struct CppType { using Type = PhysicalDeviceOpticalFlowPropertiesNV; }; struct PhysicalDevicePCIBusInfoPropertiesEXT { using NativeType = VkPhysicalDevicePCIBusInfoPropertiesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDevicePciBusInfoPropertiesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDevicePCIBusInfoPropertiesEXT( uint32_t pciDomain_ = {}, uint32_t pciBus_ = {}, uint32_t pciDevice_ = {}, uint32_t pciFunction_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , pciDomain{ pciDomain_ } , pciBus{ pciBus_ } , pciDevice{ pciDevice_ } , pciFunction{ pciFunction_ } { } VULKAN_HPP_CONSTEXPR PhysicalDevicePCIBusInfoPropertiesEXT( PhysicalDevicePCIBusInfoPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDevicePCIBusInfoPropertiesEXT( VkPhysicalDevicePCIBusInfoPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDevicePCIBusInfoPropertiesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDevicePCIBusInfoPropertiesEXT & operator=( PhysicalDevicePCIBusInfoPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDevicePCIBusInfoPropertiesEXT & operator=( VkPhysicalDevicePCIBusInfoPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDevicePCIBusInfoPropertiesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDevicePCIBusInfoPropertiesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, pciDomain, pciBus, pciDevice, pciFunction ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDevicePCIBusInfoPropertiesEXT const & ) const = default; #else bool operator==( PhysicalDevicePCIBusInfoPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( pciDomain == rhs.pciDomain ) && ( pciBus == rhs.pciBus ) && ( pciDevice == rhs.pciDevice ) && ( pciFunction == rhs.pciFunction ); # endif } bool operator!=( PhysicalDevicePCIBusInfoPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDevicePciBusInfoPropertiesEXT; void * pNext = {}; uint32_t pciDomain = {}; uint32_t pciBus = {}; uint32_t pciDevice = {}; uint32_t pciFunction = {}; }; template <> struct CppType { using Type = PhysicalDevicePCIBusInfoPropertiesEXT; }; struct PhysicalDevicePageableDeviceLocalMemoryFeaturesEXT { using NativeType = VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDevicePageableDeviceLocalMemoryFeaturesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDevicePageableDeviceLocalMemoryFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 pageableDeviceLocalMemory_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , pageableDeviceLocalMemory{ pageableDeviceLocalMemory_ } { } VULKAN_HPP_CONSTEXPR PhysicalDevicePageableDeviceLocalMemoryFeaturesEXT( PhysicalDevicePageableDeviceLocalMemoryFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDevicePageableDeviceLocalMemoryFeaturesEXT( VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDevicePageableDeviceLocalMemoryFeaturesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDevicePageableDeviceLocalMemoryFeaturesEXT & operator=( PhysicalDevicePageableDeviceLocalMemoryFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDevicePageableDeviceLocalMemoryFeaturesEXT & operator=( VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePageableDeviceLocalMemoryFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePageableDeviceLocalMemoryFeaturesEXT & setPageableDeviceLocalMemory( VULKAN_HPP_NAMESPACE::Bool32 pageableDeviceLocalMemory_ ) VULKAN_HPP_NOEXCEPT { pageableDeviceLocalMemory = pageableDeviceLocalMemory_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, pageableDeviceLocalMemory ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDevicePageableDeviceLocalMemoryFeaturesEXT const & ) const = default; #else bool operator==( PhysicalDevicePageableDeviceLocalMemoryFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( pageableDeviceLocalMemory == rhs.pageableDeviceLocalMemory ); # endif } bool operator!=( PhysicalDevicePageableDeviceLocalMemoryFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDevicePageableDeviceLocalMemoryFeaturesEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 pageableDeviceLocalMemory = {}; }; template <> struct CppType { using Type = PhysicalDevicePageableDeviceLocalMemoryFeaturesEXT; }; struct PhysicalDevicePartitionedAccelerationStructureFeaturesNV { using NativeType = VkPhysicalDevicePartitionedAccelerationStructureFeaturesNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDevicePartitionedAccelerationStructureFeaturesNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDevicePartitionedAccelerationStructureFeaturesNV( VULKAN_HPP_NAMESPACE::Bool32 partitionedAccelerationStructure_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , partitionedAccelerationStructure{ partitionedAccelerationStructure_ } { } VULKAN_HPP_CONSTEXPR PhysicalDevicePartitionedAccelerationStructureFeaturesNV( PhysicalDevicePartitionedAccelerationStructureFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDevicePartitionedAccelerationStructureFeaturesNV( VkPhysicalDevicePartitionedAccelerationStructureFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDevicePartitionedAccelerationStructureFeaturesNV( *reinterpret_cast( &rhs ) ) { } PhysicalDevicePartitionedAccelerationStructureFeaturesNV & operator=( PhysicalDevicePartitionedAccelerationStructureFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDevicePartitionedAccelerationStructureFeaturesNV & operator=( VkPhysicalDevicePartitionedAccelerationStructureFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePartitionedAccelerationStructureFeaturesNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePartitionedAccelerationStructureFeaturesNV & setPartitionedAccelerationStructure( VULKAN_HPP_NAMESPACE::Bool32 partitionedAccelerationStructure_ ) VULKAN_HPP_NOEXCEPT { partitionedAccelerationStructure = partitionedAccelerationStructure_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDevicePartitionedAccelerationStructureFeaturesNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDevicePartitionedAccelerationStructureFeaturesNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, partitionedAccelerationStructure ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDevicePartitionedAccelerationStructureFeaturesNV const & ) const = default; #else bool operator==( PhysicalDevicePartitionedAccelerationStructureFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( partitionedAccelerationStructure == rhs.partitionedAccelerationStructure ); # endif } bool operator!=( PhysicalDevicePartitionedAccelerationStructureFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDevicePartitionedAccelerationStructureFeaturesNV; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 partitionedAccelerationStructure = {}; }; template <> struct CppType { using Type = PhysicalDevicePartitionedAccelerationStructureFeaturesNV; }; struct PhysicalDevicePartitionedAccelerationStructurePropertiesNV { using NativeType = VkPhysicalDevicePartitionedAccelerationStructurePropertiesNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDevicePartitionedAccelerationStructurePropertiesNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDevicePartitionedAccelerationStructurePropertiesNV( uint32_t maxPartitionCount_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , maxPartitionCount{ maxPartitionCount_ } { } VULKAN_HPP_CONSTEXPR PhysicalDevicePartitionedAccelerationStructurePropertiesNV( PhysicalDevicePartitionedAccelerationStructurePropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDevicePartitionedAccelerationStructurePropertiesNV( VkPhysicalDevicePartitionedAccelerationStructurePropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDevicePartitionedAccelerationStructurePropertiesNV( *reinterpret_cast( &rhs ) ) { } PhysicalDevicePartitionedAccelerationStructurePropertiesNV & operator=( PhysicalDevicePartitionedAccelerationStructurePropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDevicePartitionedAccelerationStructurePropertiesNV & operator=( VkPhysicalDevicePartitionedAccelerationStructurePropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDevicePartitionedAccelerationStructurePropertiesNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDevicePartitionedAccelerationStructurePropertiesNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, maxPartitionCount ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDevicePartitionedAccelerationStructurePropertiesNV const & ) const = default; #else bool operator==( PhysicalDevicePartitionedAccelerationStructurePropertiesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( maxPartitionCount == rhs.maxPartitionCount ); # endif } bool operator!=( PhysicalDevicePartitionedAccelerationStructurePropertiesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDevicePartitionedAccelerationStructurePropertiesNV; void * pNext = {}; uint32_t maxPartitionCount = {}; }; template <> struct CppType { using Type = PhysicalDevicePartitionedAccelerationStructurePropertiesNV; }; struct PhysicalDevicePerStageDescriptorSetFeaturesNV { using NativeType = VkPhysicalDevicePerStageDescriptorSetFeaturesNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDevicePerStageDescriptorSetFeaturesNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDevicePerStageDescriptorSetFeaturesNV( VULKAN_HPP_NAMESPACE::Bool32 perStageDescriptorSet_ = {}, VULKAN_HPP_NAMESPACE::Bool32 dynamicPipelineLayout_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , perStageDescriptorSet{ perStageDescriptorSet_ } , dynamicPipelineLayout{ dynamicPipelineLayout_ } { } VULKAN_HPP_CONSTEXPR PhysicalDevicePerStageDescriptorSetFeaturesNV( PhysicalDevicePerStageDescriptorSetFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDevicePerStageDescriptorSetFeaturesNV( VkPhysicalDevicePerStageDescriptorSetFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDevicePerStageDescriptorSetFeaturesNV( *reinterpret_cast( &rhs ) ) { } PhysicalDevicePerStageDescriptorSetFeaturesNV & operator=( PhysicalDevicePerStageDescriptorSetFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDevicePerStageDescriptorSetFeaturesNV & operator=( VkPhysicalDevicePerStageDescriptorSetFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePerStageDescriptorSetFeaturesNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePerStageDescriptorSetFeaturesNV & setPerStageDescriptorSet( VULKAN_HPP_NAMESPACE::Bool32 perStageDescriptorSet_ ) VULKAN_HPP_NOEXCEPT { perStageDescriptorSet = perStageDescriptorSet_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePerStageDescriptorSetFeaturesNV & setDynamicPipelineLayout( VULKAN_HPP_NAMESPACE::Bool32 dynamicPipelineLayout_ ) VULKAN_HPP_NOEXCEPT { dynamicPipelineLayout = dynamicPipelineLayout_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDevicePerStageDescriptorSetFeaturesNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDevicePerStageDescriptorSetFeaturesNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, perStageDescriptorSet, dynamicPipelineLayout ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDevicePerStageDescriptorSetFeaturesNV const & ) const = default; #else bool operator==( PhysicalDevicePerStageDescriptorSetFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( perStageDescriptorSet == rhs.perStageDescriptorSet ) && ( dynamicPipelineLayout == rhs.dynamicPipelineLayout ); # endif } bool operator!=( PhysicalDevicePerStageDescriptorSetFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDevicePerStageDescriptorSetFeaturesNV; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 perStageDescriptorSet = {}; VULKAN_HPP_NAMESPACE::Bool32 dynamicPipelineLayout = {}; }; template <> struct CppType { using Type = PhysicalDevicePerStageDescriptorSetFeaturesNV; }; struct PhysicalDevicePerformanceQueryFeaturesKHR { using NativeType = VkPhysicalDevicePerformanceQueryFeaturesKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDevicePerformanceQueryFeaturesKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDevicePerformanceQueryFeaturesKHR( VULKAN_HPP_NAMESPACE::Bool32 performanceCounterQueryPools_ = {}, VULKAN_HPP_NAMESPACE::Bool32 performanceCounterMultipleQueryPools_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , performanceCounterQueryPools{ performanceCounterQueryPools_ } , performanceCounterMultipleQueryPools{ performanceCounterMultipleQueryPools_ } { } VULKAN_HPP_CONSTEXPR PhysicalDevicePerformanceQueryFeaturesKHR( PhysicalDevicePerformanceQueryFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDevicePerformanceQueryFeaturesKHR( VkPhysicalDevicePerformanceQueryFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDevicePerformanceQueryFeaturesKHR( *reinterpret_cast( &rhs ) ) { } PhysicalDevicePerformanceQueryFeaturesKHR & operator=( PhysicalDevicePerformanceQueryFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDevicePerformanceQueryFeaturesKHR & operator=( VkPhysicalDevicePerformanceQueryFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePerformanceQueryFeaturesKHR & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePerformanceQueryFeaturesKHR & setPerformanceCounterQueryPools( VULKAN_HPP_NAMESPACE::Bool32 performanceCounterQueryPools_ ) VULKAN_HPP_NOEXCEPT { performanceCounterQueryPools = performanceCounterQueryPools_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePerformanceQueryFeaturesKHR & setPerformanceCounterMultipleQueryPools( VULKAN_HPP_NAMESPACE::Bool32 performanceCounterMultipleQueryPools_ ) VULKAN_HPP_NOEXCEPT { performanceCounterMultipleQueryPools = performanceCounterMultipleQueryPools_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDevicePerformanceQueryFeaturesKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDevicePerformanceQueryFeaturesKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, performanceCounterQueryPools, performanceCounterMultipleQueryPools ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDevicePerformanceQueryFeaturesKHR const & ) const = default; #else bool operator==( PhysicalDevicePerformanceQueryFeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( performanceCounterQueryPools == rhs.performanceCounterQueryPools ) && ( performanceCounterMultipleQueryPools == rhs.performanceCounterMultipleQueryPools ); # endif } bool operator!=( PhysicalDevicePerformanceQueryFeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDevicePerformanceQueryFeaturesKHR; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 performanceCounterQueryPools = {}; VULKAN_HPP_NAMESPACE::Bool32 performanceCounterMultipleQueryPools = {}; }; template <> struct CppType { using Type = PhysicalDevicePerformanceQueryFeaturesKHR; }; struct PhysicalDevicePerformanceQueryPropertiesKHR { using NativeType = VkPhysicalDevicePerformanceQueryPropertiesKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDevicePerformanceQueryPropertiesKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDevicePerformanceQueryPropertiesKHR( VULKAN_HPP_NAMESPACE::Bool32 allowCommandBufferQueryCopies_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , allowCommandBufferQueryCopies{ allowCommandBufferQueryCopies_ } { } VULKAN_HPP_CONSTEXPR PhysicalDevicePerformanceQueryPropertiesKHR( PhysicalDevicePerformanceQueryPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDevicePerformanceQueryPropertiesKHR( VkPhysicalDevicePerformanceQueryPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDevicePerformanceQueryPropertiesKHR( *reinterpret_cast( &rhs ) ) { } PhysicalDevicePerformanceQueryPropertiesKHR & operator=( PhysicalDevicePerformanceQueryPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDevicePerformanceQueryPropertiesKHR & operator=( VkPhysicalDevicePerformanceQueryPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDevicePerformanceQueryPropertiesKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDevicePerformanceQueryPropertiesKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, allowCommandBufferQueryCopies ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDevicePerformanceQueryPropertiesKHR const & ) const = default; #else bool operator==( PhysicalDevicePerformanceQueryPropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( allowCommandBufferQueryCopies == rhs.allowCommandBufferQueryCopies ); # endif } bool operator!=( PhysicalDevicePerformanceQueryPropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDevicePerformanceQueryPropertiesKHR; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 allowCommandBufferQueryCopies = {}; }; template <> struct CppType { using Type = PhysicalDevicePerformanceQueryPropertiesKHR; }; struct PhysicalDevicePipelineBinaryFeaturesKHR { using NativeType = VkPhysicalDevicePipelineBinaryFeaturesKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDevicePipelineBinaryFeaturesKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDevicePipelineBinaryFeaturesKHR( VULKAN_HPP_NAMESPACE::Bool32 pipelineBinaries_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , pipelineBinaries{ pipelineBinaries_ } { } VULKAN_HPP_CONSTEXPR PhysicalDevicePipelineBinaryFeaturesKHR( PhysicalDevicePipelineBinaryFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDevicePipelineBinaryFeaturesKHR( VkPhysicalDevicePipelineBinaryFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDevicePipelineBinaryFeaturesKHR( *reinterpret_cast( &rhs ) ) { } PhysicalDevicePipelineBinaryFeaturesKHR & operator=( PhysicalDevicePipelineBinaryFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDevicePipelineBinaryFeaturesKHR & operator=( VkPhysicalDevicePipelineBinaryFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePipelineBinaryFeaturesKHR & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePipelineBinaryFeaturesKHR & setPipelineBinaries( VULKAN_HPP_NAMESPACE::Bool32 pipelineBinaries_ ) VULKAN_HPP_NOEXCEPT { pipelineBinaries = pipelineBinaries_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDevicePipelineBinaryFeaturesKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDevicePipelineBinaryFeaturesKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, pipelineBinaries ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDevicePipelineBinaryFeaturesKHR const & ) const = default; #else bool operator==( PhysicalDevicePipelineBinaryFeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( pipelineBinaries == rhs.pipelineBinaries ); # endif } bool operator!=( PhysicalDevicePipelineBinaryFeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDevicePipelineBinaryFeaturesKHR; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 pipelineBinaries = {}; }; template <> struct CppType { using Type = PhysicalDevicePipelineBinaryFeaturesKHR; }; struct PhysicalDevicePipelineBinaryPropertiesKHR { using NativeType = VkPhysicalDevicePipelineBinaryPropertiesKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDevicePipelineBinaryPropertiesKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDevicePipelineBinaryPropertiesKHR( VULKAN_HPP_NAMESPACE::Bool32 pipelineBinaryInternalCache_ = {}, VULKAN_HPP_NAMESPACE::Bool32 pipelineBinaryInternalCacheControl_ = {}, VULKAN_HPP_NAMESPACE::Bool32 pipelineBinaryPrefersInternalCache_ = {}, VULKAN_HPP_NAMESPACE::Bool32 pipelineBinaryPrecompiledInternalCache_ = {}, VULKAN_HPP_NAMESPACE::Bool32 pipelineBinaryCompressedData_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , pipelineBinaryInternalCache{ pipelineBinaryInternalCache_ } , pipelineBinaryInternalCacheControl{ pipelineBinaryInternalCacheControl_ } , pipelineBinaryPrefersInternalCache{ pipelineBinaryPrefersInternalCache_ } , pipelineBinaryPrecompiledInternalCache{ pipelineBinaryPrecompiledInternalCache_ } , pipelineBinaryCompressedData{ pipelineBinaryCompressedData_ } { } VULKAN_HPP_CONSTEXPR PhysicalDevicePipelineBinaryPropertiesKHR( PhysicalDevicePipelineBinaryPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDevicePipelineBinaryPropertiesKHR( VkPhysicalDevicePipelineBinaryPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDevicePipelineBinaryPropertiesKHR( *reinterpret_cast( &rhs ) ) { } PhysicalDevicePipelineBinaryPropertiesKHR & operator=( PhysicalDevicePipelineBinaryPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDevicePipelineBinaryPropertiesKHR & operator=( VkPhysicalDevicePipelineBinaryPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePipelineBinaryPropertiesKHR & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePipelineBinaryPropertiesKHR & setPipelineBinaryInternalCache( VULKAN_HPP_NAMESPACE::Bool32 pipelineBinaryInternalCache_ ) VULKAN_HPP_NOEXCEPT { pipelineBinaryInternalCache = pipelineBinaryInternalCache_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePipelineBinaryPropertiesKHR & setPipelineBinaryInternalCacheControl( VULKAN_HPP_NAMESPACE::Bool32 pipelineBinaryInternalCacheControl_ ) VULKAN_HPP_NOEXCEPT { pipelineBinaryInternalCacheControl = pipelineBinaryInternalCacheControl_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePipelineBinaryPropertiesKHR & setPipelineBinaryPrefersInternalCache( VULKAN_HPP_NAMESPACE::Bool32 pipelineBinaryPrefersInternalCache_ ) VULKAN_HPP_NOEXCEPT { pipelineBinaryPrefersInternalCache = pipelineBinaryPrefersInternalCache_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePipelineBinaryPropertiesKHR & setPipelineBinaryPrecompiledInternalCache( VULKAN_HPP_NAMESPACE::Bool32 pipelineBinaryPrecompiledInternalCache_ ) VULKAN_HPP_NOEXCEPT { pipelineBinaryPrecompiledInternalCache = pipelineBinaryPrecompiledInternalCache_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePipelineBinaryPropertiesKHR & setPipelineBinaryCompressedData( VULKAN_HPP_NAMESPACE::Bool32 pipelineBinaryCompressedData_ ) VULKAN_HPP_NOEXCEPT { pipelineBinaryCompressedData = pipelineBinaryCompressedData_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDevicePipelineBinaryPropertiesKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDevicePipelineBinaryPropertiesKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, pipelineBinaryInternalCache, pipelineBinaryInternalCacheControl, pipelineBinaryPrefersInternalCache, pipelineBinaryPrecompiledInternalCache, pipelineBinaryCompressedData ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDevicePipelineBinaryPropertiesKHR const & ) const = default; #else bool operator==( PhysicalDevicePipelineBinaryPropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( pipelineBinaryInternalCache == rhs.pipelineBinaryInternalCache ) && ( pipelineBinaryInternalCacheControl == rhs.pipelineBinaryInternalCacheControl ) && ( pipelineBinaryPrefersInternalCache == rhs.pipelineBinaryPrefersInternalCache ) && ( pipelineBinaryPrecompiledInternalCache == rhs.pipelineBinaryPrecompiledInternalCache ) && ( pipelineBinaryCompressedData == rhs.pipelineBinaryCompressedData ); # endif } bool operator!=( PhysicalDevicePipelineBinaryPropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDevicePipelineBinaryPropertiesKHR; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 pipelineBinaryInternalCache = {}; VULKAN_HPP_NAMESPACE::Bool32 pipelineBinaryInternalCacheControl = {}; VULKAN_HPP_NAMESPACE::Bool32 pipelineBinaryPrefersInternalCache = {}; VULKAN_HPP_NAMESPACE::Bool32 pipelineBinaryPrecompiledInternalCache = {}; VULKAN_HPP_NAMESPACE::Bool32 pipelineBinaryCompressedData = {}; }; template <> struct CppType { using Type = PhysicalDevicePipelineBinaryPropertiesKHR; }; struct PhysicalDevicePipelineCreationCacheControlFeatures { using NativeType = VkPhysicalDevicePipelineCreationCacheControlFeatures; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDevicePipelineCreationCacheControlFeatures; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDevicePipelineCreationCacheControlFeatures( VULKAN_HPP_NAMESPACE::Bool32 pipelineCreationCacheControl_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , pipelineCreationCacheControl{ pipelineCreationCacheControl_ } { } VULKAN_HPP_CONSTEXPR PhysicalDevicePipelineCreationCacheControlFeatures( PhysicalDevicePipelineCreationCacheControlFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDevicePipelineCreationCacheControlFeatures( VkPhysicalDevicePipelineCreationCacheControlFeatures const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDevicePipelineCreationCacheControlFeatures( *reinterpret_cast( &rhs ) ) { } PhysicalDevicePipelineCreationCacheControlFeatures & operator=( PhysicalDevicePipelineCreationCacheControlFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDevicePipelineCreationCacheControlFeatures & operator=( VkPhysicalDevicePipelineCreationCacheControlFeatures const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePipelineCreationCacheControlFeatures & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePipelineCreationCacheControlFeatures & setPipelineCreationCacheControl( VULKAN_HPP_NAMESPACE::Bool32 pipelineCreationCacheControl_ ) VULKAN_HPP_NOEXCEPT { pipelineCreationCacheControl = pipelineCreationCacheControl_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDevicePipelineCreationCacheControlFeatures const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDevicePipelineCreationCacheControlFeatures &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, pipelineCreationCacheControl ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDevicePipelineCreationCacheControlFeatures const & ) const = default; #else bool operator==( PhysicalDevicePipelineCreationCacheControlFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( pipelineCreationCacheControl == rhs.pipelineCreationCacheControl ); # endif } bool operator!=( PhysicalDevicePipelineCreationCacheControlFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDevicePipelineCreationCacheControlFeatures; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 pipelineCreationCacheControl = {}; }; template <> struct CppType { using Type = PhysicalDevicePipelineCreationCacheControlFeatures; }; using PhysicalDevicePipelineCreationCacheControlFeaturesEXT = PhysicalDevicePipelineCreationCacheControlFeatures; struct PhysicalDevicePipelineExecutablePropertiesFeaturesKHR { using NativeType = VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDevicePipelineExecutablePropertiesFeaturesKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDevicePipelineExecutablePropertiesFeaturesKHR( VULKAN_HPP_NAMESPACE::Bool32 pipelineExecutableInfo_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , pipelineExecutableInfo{ pipelineExecutableInfo_ } { } VULKAN_HPP_CONSTEXPR PhysicalDevicePipelineExecutablePropertiesFeaturesKHR( PhysicalDevicePipelineExecutablePropertiesFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDevicePipelineExecutablePropertiesFeaturesKHR( VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDevicePipelineExecutablePropertiesFeaturesKHR( *reinterpret_cast( &rhs ) ) { } PhysicalDevicePipelineExecutablePropertiesFeaturesKHR & operator=( PhysicalDevicePipelineExecutablePropertiesFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDevicePipelineExecutablePropertiesFeaturesKHR & operator=( VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePipelineExecutablePropertiesFeaturesKHR & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePipelineExecutablePropertiesFeaturesKHR & setPipelineExecutableInfo( VULKAN_HPP_NAMESPACE::Bool32 pipelineExecutableInfo_ ) VULKAN_HPP_NOEXCEPT { pipelineExecutableInfo = pipelineExecutableInfo_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, pipelineExecutableInfo ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDevicePipelineExecutablePropertiesFeaturesKHR const & ) const = default; #else bool operator==( PhysicalDevicePipelineExecutablePropertiesFeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( pipelineExecutableInfo == rhs.pipelineExecutableInfo ); # endif } bool operator!=( PhysicalDevicePipelineExecutablePropertiesFeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDevicePipelineExecutablePropertiesFeaturesKHR; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 pipelineExecutableInfo = {}; }; template <> struct CppType { using Type = PhysicalDevicePipelineExecutablePropertiesFeaturesKHR; }; struct PhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT { using NativeType = VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 pipelineLibraryGroupHandles_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , pipelineLibraryGroupHandles{ pipelineLibraryGroupHandles_ } { } VULKAN_HPP_CONSTEXPR PhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT( PhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT( VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT & operator=( PhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT & operator=( VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT & setPipelineLibraryGroupHandles( VULKAN_HPP_NAMESPACE::Bool32 pipelineLibraryGroupHandles_ ) VULKAN_HPP_NOEXCEPT { pipelineLibraryGroupHandles = pipelineLibraryGroupHandles_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, pipelineLibraryGroupHandles ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT const & ) const = default; #else bool operator==( PhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( pipelineLibraryGroupHandles == rhs.pipelineLibraryGroupHandles ); # endif } bool operator!=( PhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 pipelineLibraryGroupHandles = {}; }; template <> struct CppType { using Type = PhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT; }; struct PhysicalDevicePipelineOpacityMicromapFeaturesARM { using NativeType = VkPhysicalDevicePipelineOpacityMicromapFeaturesARM; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDevicePipelineOpacityMicromapFeaturesARM; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDevicePipelineOpacityMicromapFeaturesARM( VULKAN_HPP_NAMESPACE::Bool32 pipelineOpacityMicromap_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , pipelineOpacityMicromap{ pipelineOpacityMicromap_ } { } VULKAN_HPP_CONSTEXPR PhysicalDevicePipelineOpacityMicromapFeaturesARM( PhysicalDevicePipelineOpacityMicromapFeaturesARM const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDevicePipelineOpacityMicromapFeaturesARM( VkPhysicalDevicePipelineOpacityMicromapFeaturesARM const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDevicePipelineOpacityMicromapFeaturesARM( *reinterpret_cast( &rhs ) ) { } PhysicalDevicePipelineOpacityMicromapFeaturesARM & operator=( PhysicalDevicePipelineOpacityMicromapFeaturesARM const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDevicePipelineOpacityMicromapFeaturesARM & operator=( VkPhysicalDevicePipelineOpacityMicromapFeaturesARM const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePipelineOpacityMicromapFeaturesARM & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePipelineOpacityMicromapFeaturesARM & setPipelineOpacityMicromap( VULKAN_HPP_NAMESPACE::Bool32 pipelineOpacityMicromap_ ) VULKAN_HPP_NOEXCEPT { pipelineOpacityMicromap = pipelineOpacityMicromap_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDevicePipelineOpacityMicromapFeaturesARM const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDevicePipelineOpacityMicromapFeaturesARM &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, pipelineOpacityMicromap ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDevicePipelineOpacityMicromapFeaturesARM const & ) const = default; #else bool operator==( PhysicalDevicePipelineOpacityMicromapFeaturesARM const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( pipelineOpacityMicromap == rhs.pipelineOpacityMicromap ); # endif } bool operator!=( PhysicalDevicePipelineOpacityMicromapFeaturesARM const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDevicePipelineOpacityMicromapFeaturesARM; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 pipelineOpacityMicromap = {}; }; template <> struct CppType { using Type = PhysicalDevicePipelineOpacityMicromapFeaturesARM; }; struct PhysicalDevicePipelinePropertiesFeaturesEXT { using NativeType = VkPhysicalDevicePipelinePropertiesFeaturesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDevicePipelinePropertiesFeaturesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDevicePipelinePropertiesFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 pipelinePropertiesIdentifier_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , pipelinePropertiesIdentifier{ pipelinePropertiesIdentifier_ } { } VULKAN_HPP_CONSTEXPR PhysicalDevicePipelinePropertiesFeaturesEXT( PhysicalDevicePipelinePropertiesFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDevicePipelinePropertiesFeaturesEXT( VkPhysicalDevicePipelinePropertiesFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDevicePipelinePropertiesFeaturesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDevicePipelinePropertiesFeaturesEXT & operator=( PhysicalDevicePipelinePropertiesFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDevicePipelinePropertiesFeaturesEXT & operator=( VkPhysicalDevicePipelinePropertiesFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePipelinePropertiesFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePipelinePropertiesFeaturesEXT & setPipelinePropertiesIdentifier( VULKAN_HPP_NAMESPACE::Bool32 pipelinePropertiesIdentifier_ ) VULKAN_HPP_NOEXCEPT { pipelinePropertiesIdentifier = pipelinePropertiesIdentifier_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDevicePipelinePropertiesFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDevicePipelinePropertiesFeaturesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, pipelinePropertiesIdentifier ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDevicePipelinePropertiesFeaturesEXT const & ) const = default; #else bool operator==( PhysicalDevicePipelinePropertiesFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( pipelinePropertiesIdentifier == rhs.pipelinePropertiesIdentifier ); # endif } bool operator!=( PhysicalDevicePipelinePropertiesFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDevicePipelinePropertiesFeaturesEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 pipelinePropertiesIdentifier = {}; }; template <> struct CppType { using Type = PhysicalDevicePipelinePropertiesFeaturesEXT; }; struct PhysicalDevicePipelineProtectedAccessFeatures { using NativeType = VkPhysicalDevicePipelineProtectedAccessFeatures; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDevicePipelineProtectedAccessFeatures; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDevicePipelineProtectedAccessFeatures( VULKAN_HPP_NAMESPACE::Bool32 pipelineProtectedAccess_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , pipelineProtectedAccess{ pipelineProtectedAccess_ } { } VULKAN_HPP_CONSTEXPR PhysicalDevicePipelineProtectedAccessFeatures( PhysicalDevicePipelineProtectedAccessFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDevicePipelineProtectedAccessFeatures( VkPhysicalDevicePipelineProtectedAccessFeatures const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDevicePipelineProtectedAccessFeatures( *reinterpret_cast( &rhs ) ) { } PhysicalDevicePipelineProtectedAccessFeatures & operator=( PhysicalDevicePipelineProtectedAccessFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDevicePipelineProtectedAccessFeatures & operator=( VkPhysicalDevicePipelineProtectedAccessFeatures const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePipelineProtectedAccessFeatures & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePipelineProtectedAccessFeatures & setPipelineProtectedAccess( VULKAN_HPP_NAMESPACE::Bool32 pipelineProtectedAccess_ ) VULKAN_HPP_NOEXCEPT { pipelineProtectedAccess = pipelineProtectedAccess_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDevicePipelineProtectedAccessFeatures const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDevicePipelineProtectedAccessFeatures &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, pipelineProtectedAccess ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDevicePipelineProtectedAccessFeatures const & ) const = default; #else bool operator==( PhysicalDevicePipelineProtectedAccessFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( pipelineProtectedAccess == rhs.pipelineProtectedAccess ); # endif } bool operator!=( PhysicalDevicePipelineProtectedAccessFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDevicePipelineProtectedAccessFeatures; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 pipelineProtectedAccess = {}; }; template <> struct CppType { using Type = PhysicalDevicePipelineProtectedAccessFeatures; }; using PhysicalDevicePipelineProtectedAccessFeaturesEXT = PhysicalDevicePipelineProtectedAccessFeatures; struct PhysicalDevicePipelineRobustnessFeatures { using NativeType = VkPhysicalDevicePipelineRobustnessFeatures; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDevicePipelineRobustnessFeatures; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDevicePipelineRobustnessFeatures( VULKAN_HPP_NAMESPACE::Bool32 pipelineRobustness_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , pipelineRobustness{ pipelineRobustness_ } { } VULKAN_HPP_CONSTEXPR PhysicalDevicePipelineRobustnessFeatures( PhysicalDevicePipelineRobustnessFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDevicePipelineRobustnessFeatures( VkPhysicalDevicePipelineRobustnessFeatures const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDevicePipelineRobustnessFeatures( *reinterpret_cast( &rhs ) ) { } PhysicalDevicePipelineRobustnessFeatures & operator=( PhysicalDevicePipelineRobustnessFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDevicePipelineRobustnessFeatures & operator=( VkPhysicalDevicePipelineRobustnessFeatures const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePipelineRobustnessFeatures & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePipelineRobustnessFeatures & setPipelineRobustness( VULKAN_HPP_NAMESPACE::Bool32 pipelineRobustness_ ) VULKAN_HPP_NOEXCEPT { pipelineRobustness = pipelineRobustness_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDevicePipelineRobustnessFeatures const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDevicePipelineRobustnessFeatures &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, pipelineRobustness ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDevicePipelineRobustnessFeatures const & ) const = default; #else bool operator==( PhysicalDevicePipelineRobustnessFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( pipelineRobustness == rhs.pipelineRobustness ); # endif } bool operator!=( PhysicalDevicePipelineRobustnessFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDevicePipelineRobustnessFeatures; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 pipelineRobustness = {}; }; template <> struct CppType { using Type = PhysicalDevicePipelineRobustnessFeatures; }; using PhysicalDevicePipelineRobustnessFeaturesEXT = PhysicalDevicePipelineRobustnessFeatures; struct PhysicalDevicePipelineRobustnessProperties { using NativeType = VkPhysicalDevicePipelineRobustnessProperties; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDevicePipelineRobustnessProperties; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDevicePipelineRobustnessProperties( VULKAN_HPP_NAMESPACE::PipelineRobustnessBufferBehavior defaultRobustnessStorageBuffers_ = VULKAN_HPP_NAMESPACE::PipelineRobustnessBufferBehavior::eDeviceDefault, VULKAN_HPP_NAMESPACE::PipelineRobustnessBufferBehavior defaultRobustnessUniformBuffers_ = VULKAN_HPP_NAMESPACE::PipelineRobustnessBufferBehavior::eDeviceDefault, VULKAN_HPP_NAMESPACE::PipelineRobustnessBufferBehavior defaultRobustnessVertexInputs_ = VULKAN_HPP_NAMESPACE::PipelineRobustnessBufferBehavior::eDeviceDefault, VULKAN_HPP_NAMESPACE::PipelineRobustnessImageBehavior defaultRobustnessImages_ = VULKAN_HPP_NAMESPACE::PipelineRobustnessImageBehavior::eDeviceDefault, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , defaultRobustnessStorageBuffers{ defaultRobustnessStorageBuffers_ } , defaultRobustnessUniformBuffers{ defaultRobustnessUniformBuffers_ } , defaultRobustnessVertexInputs{ defaultRobustnessVertexInputs_ } , defaultRobustnessImages{ defaultRobustnessImages_ } { } VULKAN_HPP_CONSTEXPR PhysicalDevicePipelineRobustnessProperties( PhysicalDevicePipelineRobustnessProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDevicePipelineRobustnessProperties( VkPhysicalDevicePipelineRobustnessProperties const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDevicePipelineRobustnessProperties( *reinterpret_cast( &rhs ) ) { } PhysicalDevicePipelineRobustnessProperties & operator=( PhysicalDevicePipelineRobustnessProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDevicePipelineRobustnessProperties & operator=( VkPhysicalDevicePipelineRobustnessProperties const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDevicePipelineRobustnessProperties const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDevicePipelineRobustnessProperties &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, defaultRobustnessStorageBuffers, defaultRobustnessUniformBuffers, defaultRobustnessVertexInputs, defaultRobustnessImages ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDevicePipelineRobustnessProperties const & ) const = default; #else bool operator==( PhysicalDevicePipelineRobustnessProperties const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( defaultRobustnessStorageBuffers == rhs.defaultRobustnessStorageBuffers ) && ( defaultRobustnessUniformBuffers == rhs.defaultRobustnessUniformBuffers ) && ( defaultRobustnessVertexInputs == rhs.defaultRobustnessVertexInputs ) && ( defaultRobustnessImages == rhs.defaultRobustnessImages ); # endif } bool operator!=( PhysicalDevicePipelineRobustnessProperties const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDevicePipelineRobustnessProperties; void * pNext = {}; VULKAN_HPP_NAMESPACE::PipelineRobustnessBufferBehavior defaultRobustnessStorageBuffers = VULKAN_HPP_NAMESPACE::PipelineRobustnessBufferBehavior::eDeviceDefault; VULKAN_HPP_NAMESPACE::PipelineRobustnessBufferBehavior defaultRobustnessUniformBuffers = VULKAN_HPP_NAMESPACE::PipelineRobustnessBufferBehavior::eDeviceDefault; VULKAN_HPP_NAMESPACE::PipelineRobustnessBufferBehavior defaultRobustnessVertexInputs = VULKAN_HPP_NAMESPACE::PipelineRobustnessBufferBehavior::eDeviceDefault; VULKAN_HPP_NAMESPACE::PipelineRobustnessImageBehavior defaultRobustnessImages = VULKAN_HPP_NAMESPACE::PipelineRobustnessImageBehavior::eDeviceDefault; }; template <> struct CppType { using Type = PhysicalDevicePipelineRobustnessProperties; }; using PhysicalDevicePipelineRobustnessPropertiesEXT = PhysicalDevicePipelineRobustnessProperties; struct PhysicalDevicePointClippingProperties { using NativeType = VkPhysicalDevicePointClippingProperties; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDevicePointClippingProperties; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDevicePointClippingProperties( VULKAN_HPP_NAMESPACE::PointClippingBehavior pointClippingBehavior_ = VULKAN_HPP_NAMESPACE::PointClippingBehavior::eAllClipPlanes, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , pointClippingBehavior{ pointClippingBehavior_ } { } VULKAN_HPP_CONSTEXPR PhysicalDevicePointClippingProperties( PhysicalDevicePointClippingProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDevicePointClippingProperties( VkPhysicalDevicePointClippingProperties const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDevicePointClippingProperties( *reinterpret_cast( &rhs ) ) { } PhysicalDevicePointClippingProperties & operator=( PhysicalDevicePointClippingProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDevicePointClippingProperties & operator=( VkPhysicalDevicePointClippingProperties const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDevicePointClippingProperties const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDevicePointClippingProperties &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, pointClippingBehavior ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDevicePointClippingProperties const & ) const = default; #else bool operator==( PhysicalDevicePointClippingProperties const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( pointClippingBehavior == rhs.pointClippingBehavior ); # endif } bool operator!=( PhysicalDevicePointClippingProperties const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDevicePointClippingProperties; void * pNext = {}; VULKAN_HPP_NAMESPACE::PointClippingBehavior pointClippingBehavior = VULKAN_HPP_NAMESPACE::PointClippingBehavior::eAllClipPlanes; }; template <> struct CppType { using Type = PhysicalDevicePointClippingProperties; }; using PhysicalDevicePointClippingPropertiesKHR = PhysicalDevicePointClippingProperties; #if defined( VK_ENABLE_BETA_EXTENSIONS ) struct PhysicalDevicePortabilitySubsetFeaturesKHR { using NativeType = VkPhysicalDevicePortabilitySubsetFeaturesKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDevicePortabilitySubsetFeaturesKHR; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDevicePortabilitySubsetFeaturesKHR( VULKAN_HPP_NAMESPACE::Bool32 constantAlphaColorBlendFactors_ = {}, VULKAN_HPP_NAMESPACE::Bool32 events_ = {}, VULKAN_HPP_NAMESPACE::Bool32 imageViewFormatReinterpretation_ = {}, VULKAN_HPP_NAMESPACE::Bool32 imageViewFormatSwizzle_ = {}, VULKAN_HPP_NAMESPACE::Bool32 imageView2DOn3DImage_ = {}, VULKAN_HPP_NAMESPACE::Bool32 multisampleArrayImage_ = {}, VULKAN_HPP_NAMESPACE::Bool32 mutableComparisonSamplers_ = {}, VULKAN_HPP_NAMESPACE::Bool32 pointPolygons_ = {}, VULKAN_HPP_NAMESPACE::Bool32 samplerMipLodBias_ = {}, VULKAN_HPP_NAMESPACE::Bool32 separateStencilMaskRef_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderSampleRateInterpolationFunctions_ = {}, VULKAN_HPP_NAMESPACE::Bool32 tessellationIsolines_ = {}, VULKAN_HPP_NAMESPACE::Bool32 tessellationPointMode_ = {}, VULKAN_HPP_NAMESPACE::Bool32 triangleFans_ = {}, VULKAN_HPP_NAMESPACE::Bool32 vertexAttributeAccessBeyondStride_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , constantAlphaColorBlendFactors{ constantAlphaColorBlendFactors_ } , events{ events_ } , imageViewFormatReinterpretation{ imageViewFormatReinterpretation_ } , imageViewFormatSwizzle{ imageViewFormatSwizzle_ } , imageView2DOn3DImage{ imageView2DOn3DImage_ } , multisampleArrayImage{ multisampleArrayImage_ } , mutableComparisonSamplers{ mutableComparisonSamplers_ } , pointPolygons{ pointPolygons_ } , samplerMipLodBias{ samplerMipLodBias_ } , separateStencilMaskRef{ separateStencilMaskRef_ } , shaderSampleRateInterpolationFunctions{ shaderSampleRateInterpolationFunctions_ } , tessellationIsolines{ tessellationIsolines_ } , tessellationPointMode{ tessellationPointMode_ } , triangleFans{ triangleFans_ } , vertexAttributeAccessBeyondStride{ vertexAttributeAccessBeyondStride_ } { } VULKAN_HPP_CONSTEXPR PhysicalDevicePortabilitySubsetFeaturesKHR( PhysicalDevicePortabilitySubsetFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDevicePortabilitySubsetFeaturesKHR( VkPhysicalDevicePortabilitySubsetFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDevicePortabilitySubsetFeaturesKHR( *reinterpret_cast( &rhs ) ) { } PhysicalDevicePortabilitySubsetFeaturesKHR & operator=( PhysicalDevicePortabilitySubsetFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDevicePortabilitySubsetFeaturesKHR & operator=( VkPhysicalDevicePortabilitySubsetFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } # if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePortabilitySubsetFeaturesKHR & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePortabilitySubsetFeaturesKHR & setConstantAlphaColorBlendFactors( VULKAN_HPP_NAMESPACE::Bool32 constantAlphaColorBlendFactors_ ) VULKAN_HPP_NOEXCEPT { constantAlphaColorBlendFactors = constantAlphaColorBlendFactors_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePortabilitySubsetFeaturesKHR & setEvents( VULKAN_HPP_NAMESPACE::Bool32 events_ ) VULKAN_HPP_NOEXCEPT { events = events_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePortabilitySubsetFeaturesKHR & setImageViewFormatReinterpretation( VULKAN_HPP_NAMESPACE::Bool32 imageViewFormatReinterpretation_ ) VULKAN_HPP_NOEXCEPT { imageViewFormatReinterpretation = imageViewFormatReinterpretation_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePortabilitySubsetFeaturesKHR & setImageViewFormatSwizzle( VULKAN_HPP_NAMESPACE::Bool32 imageViewFormatSwizzle_ ) VULKAN_HPP_NOEXCEPT { imageViewFormatSwizzle = imageViewFormatSwizzle_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePortabilitySubsetFeaturesKHR & setImageView2DOn3DImage( VULKAN_HPP_NAMESPACE::Bool32 imageView2DOn3DImage_ ) VULKAN_HPP_NOEXCEPT { imageView2DOn3DImage = imageView2DOn3DImage_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePortabilitySubsetFeaturesKHR & setMultisampleArrayImage( VULKAN_HPP_NAMESPACE::Bool32 multisampleArrayImage_ ) VULKAN_HPP_NOEXCEPT { multisampleArrayImage = multisampleArrayImage_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePortabilitySubsetFeaturesKHR & setMutableComparisonSamplers( VULKAN_HPP_NAMESPACE::Bool32 mutableComparisonSamplers_ ) VULKAN_HPP_NOEXCEPT { mutableComparisonSamplers = mutableComparisonSamplers_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePortabilitySubsetFeaturesKHR & setPointPolygons( VULKAN_HPP_NAMESPACE::Bool32 pointPolygons_ ) VULKAN_HPP_NOEXCEPT { pointPolygons = pointPolygons_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePortabilitySubsetFeaturesKHR & setSamplerMipLodBias( VULKAN_HPP_NAMESPACE::Bool32 samplerMipLodBias_ ) VULKAN_HPP_NOEXCEPT { samplerMipLodBias = samplerMipLodBias_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePortabilitySubsetFeaturesKHR & setSeparateStencilMaskRef( VULKAN_HPP_NAMESPACE::Bool32 separateStencilMaskRef_ ) VULKAN_HPP_NOEXCEPT { separateStencilMaskRef = separateStencilMaskRef_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePortabilitySubsetFeaturesKHR & setShaderSampleRateInterpolationFunctions( VULKAN_HPP_NAMESPACE::Bool32 shaderSampleRateInterpolationFunctions_ ) VULKAN_HPP_NOEXCEPT { shaderSampleRateInterpolationFunctions = shaderSampleRateInterpolationFunctions_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePortabilitySubsetFeaturesKHR & setTessellationIsolines( VULKAN_HPP_NAMESPACE::Bool32 tessellationIsolines_ ) VULKAN_HPP_NOEXCEPT { tessellationIsolines = tessellationIsolines_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePortabilitySubsetFeaturesKHR & setTessellationPointMode( VULKAN_HPP_NAMESPACE::Bool32 tessellationPointMode_ ) VULKAN_HPP_NOEXCEPT { tessellationPointMode = tessellationPointMode_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePortabilitySubsetFeaturesKHR & setTriangleFans( VULKAN_HPP_NAMESPACE::Bool32 triangleFans_ ) VULKAN_HPP_NOEXCEPT { triangleFans = triangleFans_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePortabilitySubsetFeaturesKHR & setVertexAttributeAccessBeyondStride( VULKAN_HPP_NAMESPACE::Bool32 vertexAttributeAccessBeyondStride_ ) VULKAN_HPP_NOEXCEPT { vertexAttributeAccessBeyondStride = vertexAttributeAccessBeyondStride_; return *this; } # endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDevicePortabilitySubsetFeaturesKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDevicePortabilitySubsetFeaturesKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, constantAlphaColorBlendFactors, events, imageViewFormatReinterpretation, imageViewFormatSwizzle, imageView2DOn3DImage, multisampleArrayImage, mutableComparisonSamplers, pointPolygons, samplerMipLodBias, separateStencilMaskRef, shaderSampleRateInterpolationFunctions, tessellationIsolines, tessellationPointMode, triangleFans, vertexAttributeAccessBeyondStride ); } # endif # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDevicePortabilitySubsetFeaturesKHR const & ) const = default; # else bool operator==( PhysicalDevicePortabilitySubsetFeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( constantAlphaColorBlendFactors == rhs.constantAlphaColorBlendFactors ) && ( events == rhs.events ) && ( imageViewFormatReinterpretation == rhs.imageViewFormatReinterpretation ) && ( imageViewFormatSwizzle == rhs.imageViewFormatSwizzle ) && ( imageView2DOn3DImage == rhs.imageView2DOn3DImage ) && ( multisampleArrayImage == rhs.multisampleArrayImage ) && ( mutableComparisonSamplers == rhs.mutableComparisonSamplers ) && ( pointPolygons == rhs.pointPolygons ) && ( samplerMipLodBias == rhs.samplerMipLodBias ) && ( separateStencilMaskRef == rhs.separateStencilMaskRef ) && ( shaderSampleRateInterpolationFunctions == rhs.shaderSampleRateInterpolationFunctions ) && ( tessellationIsolines == rhs.tessellationIsolines ) && ( tessellationPointMode == rhs.tessellationPointMode ) && ( triangleFans == rhs.triangleFans ) && ( vertexAttributeAccessBeyondStride == rhs.vertexAttributeAccessBeyondStride ); # endif } bool operator!=( PhysicalDevicePortabilitySubsetFeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } # endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDevicePortabilitySubsetFeaturesKHR; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 constantAlphaColorBlendFactors = {}; VULKAN_HPP_NAMESPACE::Bool32 events = {}; VULKAN_HPP_NAMESPACE::Bool32 imageViewFormatReinterpretation = {}; VULKAN_HPP_NAMESPACE::Bool32 imageViewFormatSwizzle = {}; VULKAN_HPP_NAMESPACE::Bool32 imageView2DOn3DImage = {}; VULKAN_HPP_NAMESPACE::Bool32 multisampleArrayImage = {}; VULKAN_HPP_NAMESPACE::Bool32 mutableComparisonSamplers = {}; VULKAN_HPP_NAMESPACE::Bool32 pointPolygons = {}; VULKAN_HPP_NAMESPACE::Bool32 samplerMipLodBias = {}; VULKAN_HPP_NAMESPACE::Bool32 separateStencilMaskRef = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderSampleRateInterpolationFunctions = {}; VULKAN_HPP_NAMESPACE::Bool32 tessellationIsolines = {}; VULKAN_HPP_NAMESPACE::Bool32 tessellationPointMode = {}; VULKAN_HPP_NAMESPACE::Bool32 triangleFans = {}; VULKAN_HPP_NAMESPACE::Bool32 vertexAttributeAccessBeyondStride = {}; }; template <> struct CppType { using Type = PhysicalDevicePortabilitySubsetFeaturesKHR; }; #endif /*VK_ENABLE_BETA_EXTENSIONS*/ #if defined( VK_ENABLE_BETA_EXTENSIONS ) struct PhysicalDevicePortabilitySubsetPropertiesKHR { using NativeType = VkPhysicalDevicePortabilitySubsetPropertiesKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDevicePortabilitySubsetPropertiesKHR; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDevicePortabilitySubsetPropertiesKHR( uint32_t minVertexInputBindingStrideAlignment_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , minVertexInputBindingStrideAlignment{ minVertexInputBindingStrideAlignment_ } { } VULKAN_HPP_CONSTEXPR PhysicalDevicePortabilitySubsetPropertiesKHR( PhysicalDevicePortabilitySubsetPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDevicePortabilitySubsetPropertiesKHR( VkPhysicalDevicePortabilitySubsetPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDevicePortabilitySubsetPropertiesKHR( *reinterpret_cast( &rhs ) ) { } PhysicalDevicePortabilitySubsetPropertiesKHR & operator=( PhysicalDevicePortabilitySubsetPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDevicePortabilitySubsetPropertiesKHR & operator=( VkPhysicalDevicePortabilitySubsetPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } # if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePortabilitySubsetPropertiesKHR & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePortabilitySubsetPropertiesKHR & setMinVertexInputBindingStrideAlignment( uint32_t minVertexInputBindingStrideAlignment_ ) VULKAN_HPP_NOEXCEPT { minVertexInputBindingStrideAlignment = minVertexInputBindingStrideAlignment_; return *this; } # endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDevicePortabilitySubsetPropertiesKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDevicePortabilitySubsetPropertiesKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, minVertexInputBindingStrideAlignment ); } # endif # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDevicePortabilitySubsetPropertiesKHR const & ) const = default; # else bool operator==( PhysicalDevicePortabilitySubsetPropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( minVertexInputBindingStrideAlignment == rhs.minVertexInputBindingStrideAlignment ); # endif } bool operator!=( PhysicalDevicePortabilitySubsetPropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } # endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDevicePortabilitySubsetPropertiesKHR; void * pNext = {}; uint32_t minVertexInputBindingStrideAlignment = {}; }; template <> struct CppType { using Type = PhysicalDevicePortabilitySubsetPropertiesKHR; }; #endif /*VK_ENABLE_BETA_EXTENSIONS*/ struct PhysicalDevicePresentBarrierFeaturesNV { using NativeType = VkPhysicalDevicePresentBarrierFeaturesNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDevicePresentBarrierFeaturesNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDevicePresentBarrierFeaturesNV( VULKAN_HPP_NAMESPACE::Bool32 presentBarrier_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , presentBarrier{ presentBarrier_ } { } VULKAN_HPP_CONSTEXPR PhysicalDevicePresentBarrierFeaturesNV( PhysicalDevicePresentBarrierFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDevicePresentBarrierFeaturesNV( VkPhysicalDevicePresentBarrierFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDevicePresentBarrierFeaturesNV( *reinterpret_cast( &rhs ) ) { } PhysicalDevicePresentBarrierFeaturesNV & operator=( PhysicalDevicePresentBarrierFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDevicePresentBarrierFeaturesNV & operator=( VkPhysicalDevicePresentBarrierFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePresentBarrierFeaturesNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePresentBarrierFeaturesNV & setPresentBarrier( VULKAN_HPP_NAMESPACE::Bool32 presentBarrier_ ) VULKAN_HPP_NOEXCEPT { presentBarrier = presentBarrier_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDevicePresentBarrierFeaturesNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDevicePresentBarrierFeaturesNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, presentBarrier ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDevicePresentBarrierFeaturesNV const & ) const = default; #else bool operator==( PhysicalDevicePresentBarrierFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( presentBarrier == rhs.presentBarrier ); # endif } bool operator!=( PhysicalDevicePresentBarrierFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDevicePresentBarrierFeaturesNV; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 presentBarrier = {}; }; template <> struct CppType { using Type = PhysicalDevicePresentBarrierFeaturesNV; }; struct PhysicalDevicePresentIdFeaturesKHR { using NativeType = VkPhysicalDevicePresentIdFeaturesKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDevicePresentIdFeaturesKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDevicePresentIdFeaturesKHR( VULKAN_HPP_NAMESPACE::Bool32 presentId_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , presentId{ presentId_ } { } VULKAN_HPP_CONSTEXPR PhysicalDevicePresentIdFeaturesKHR( PhysicalDevicePresentIdFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDevicePresentIdFeaturesKHR( VkPhysicalDevicePresentIdFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDevicePresentIdFeaturesKHR( *reinterpret_cast( &rhs ) ) { } PhysicalDevicePresentIdFeaturesKHR & operator=( PhysicalDevicePresentIdFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDevicePresentIdFeaturesKHR & operator=( VkPhysicalDevicePresentIdFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePresentIdFeaturesKHR & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePresentIdFeaturesKHR & setPresentId( VULKAN_HPP_NAMESPACE::Bool32 presentId_ ) VULKAN_HPP_NOEXCEPT { presentId = presentId_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDevicePresentIdFeaturesKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDevicePresentIdFeaturesKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, presentId ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDevicePresentIdFeaturesKHR const & ) const = default; #else bool operator==( PhysicalDevicePresentIdFeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( presentId == rhs.presentId ); # endif } bool operator!=( PhysicalDevicePresentIdFeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDevicePresentIdFeaturesKHR; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 presentId = {}; }; template <> struct CppType { using Type = PhysicalDevicePresentIdFeaturesKHR; }; struct PhysicalDevicePresentModeFifoLatestReadyFeaturesEXT { using NativeType = VkPhysicalDevicePresentModeFifoLatestReadyFeaturesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDevicePresentModeFifoLatestReadyFeaturesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDevicePresentModeFifoLatestReadyFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 presentModeFifoLatestReady_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , presentModeFifoLatestReady{ presentModeFifoLatestReady_ } { } VULKAN_HPP_CONSTEXPR PhysicalDevicePresentModeFifoLatestReadyFeaturesEXT( PhysicalDevicePresentModeFifoLatestReadyFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDevicePresentModeFifoLatestReadyFeaturesEXT( VkPhysicalDevicePresentModeFifoLatestReadyFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDevicePresentModeFifoLatestReadyFeaturesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDevicePresentModeFifoLatestReadyFeaturesEXT & operator=( PhysicalDevicePresentModeFifoLatestReadyFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDevicePresentModeFifoLatestReadyFeaturesEXT & operator=( VkPhysicalDevicePresentModeFifoLatestReadyFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePresentModeFifoLatestReadyFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePresentModeFifoLatestReadyFeaturesEXT & setPresentModeFifoLatestReady( VULKAN_HPP_NAMESPACE::Bool32 presentModeFifoLatestReady_ ) VULKAN_HPP_NOEXCEPT { presentModeFifoLatestReady = presentModeFifoLatestReady_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDevicePresentModeFifoLatestReadyFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDevicePresentModeFifoLatestReadyFeaturesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, presentModeFifoLatestReady ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDevicePresentModeFifoLatestReadyFeaturesEXT const & ) const = default; #else bool operator==( PhysicalDevicePresentModeFifoLatestReadyFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( presentModeFifoLatestReady == rhs.presentModeFifoLatestReady ); # endif } bool operator!=( PhysicalDevicePresentModeFifoLatestReadyFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDevicePresentModeFifoLatestReadyFeaturesEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 presentModeFifoLatestReady = {}; }; template <> struct CppType { using Type = PhysicalDevicePresentModeFifoLatestReadyFeaturesEXT; }; struct PhysicalDevicePresentWaitFeaturesKHR { using NativeType = VkPhysicalDevicePresentWaitFeaturesKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDevicePresentWaitFeaturesKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDevicePresentWaitFeaturesKHR( VULKAN_HPP_NAMESPACE::Bool32 presentWait_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , presentWait{ presentWait_ } { } VULKAN_HPP_CONSTEXPR PhysicalDevicePresentWaitFeaturesKHR( PhysicalDevicePresentWaitFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDevicePresentWaitFeaturesKHR( VkPhysicalDevicePresentWaitFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDevicePresentWaitFeaturesKHR( *reinterpret_cast( &rhs ) ) { } PhysicalDevicePresentWaitFeaturesKHR & operator=( PhysicalDevicePresentWaitFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDevicePresentWaitFeaturesKHR & operator=( VkPhysicalDevicePresentWaitFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePresentWaitFeaturesKHR & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePresentWaitFeaturesKHR & setPresentWait( VULKAN_HPP_NAMESPACE::Bool32 presentWait_ ) VULKAN_HPP_NOEXCEPT { presentWait = presentWait_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDevicePresentWaitFeaturesKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDevicePresentWaitFeaturesKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, presentWait ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDevicePresentWaitFeaturesKHR const & ) const = default; #else bool operator==( PhysicalDevicePresentWaitFeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( presentWait == rhs.presentWait ); # endif } bool operator!=( PhysicalDevicePresentWaitFeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDevicePresentWaitFeaturesKHR; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 presentWait = {}; }; template <> struct CppType { using Type = PhysicalDevicePresentWaitFeaturesKHR; }; struct PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT { using NativeType = VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDevicePrimitiveTopologyListRestartFeaturesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 primitiveTopologyListRestart_ = {}, VULKAN_HPP_NAMESPACE::Bool32 primitiveTopologyPatchListRestart_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , primitiveTopologyListRestart{ primitiveTopologyListRestart_ } , primitiveTopologyPatchListRestart{ primitiveTopologyPatchListRestart_ } { } VULKAN_HPP_CONSTEXPR PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT( PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT( VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT & operator=( PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT & operator=( VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT & setPrimitiveTopologyListRestart( VULKAN_HPP_NAMESPACE::Bool32 primitiveTopologyListRestart_ ) VULKAN_HPP_NOEXCEPT { primitiveTopologyListRestart = primitiveTopologyListRestart_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT & setPrimitiveTopologyPatchListRestart( VULKAN_HPP_NAMESPACE::Bool32 primitiveTopologyPatchListRestart_ ) VULKAN_HPP_NOEXCEPT { primitiveTopologyPatchListRestart = primitiveTopologyPatchListRestart_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, primitiveTopologyListRestart, primitiveTopologyPatchListRestart ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT const & ) const = default; #else bool operator==( PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( primitiveTopologyListRestart == rhs.primitiveTopologyListRestart ) && ( primitiveTopologyPatchListRestart == rhs.primitiveTopologyPatchListRestart ); # endif } bool operator!=( PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDevicePrimitiveTopologyListRestartFeaturesEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 primitiveTopologyListRestart = {}; VULKAN_HPP_NAMESPACE::Bool32 primitiveTopologyPatchListRestart = {}; }; template <> struct CppType { using Type = PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT; }; struct PhysicalDevicePrimitivesGeneratedQueryFeaturesEXT { using NativeType = VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDevicePrimitivesGeneratedQueryFeaturesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDevicePrimitivesGeneratedQueryFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 primitivesGeneratedQuery_ = {}, VULKAN_HPP_NAMESPACE::Bool32 primitivesGeneratedQueryWithRasterizerDiscard_ = {}, VULKAN_HPP_NAMESPACE::Bool32 primitivesGeneratedQueryWithNonZeroStreams_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , primitivesGeneratedQuery{ primitivesGeneratedQuery_ } , primitivesGeneratedQueryWithRasterizerDiscard{ primitivesGeneratedQueryWithRasterizerDiscard_ } , primitivesGeneratedQueryWithNonZeroStreams{ primitivesGeneratedQueryWithNonZeroStreams_ } { } VULKAN_HPP_CONSTEXPR PhysicalDevicePrimitivesGeneratedQueryFeaturesEXT( PhysicalDevicePrimitivesGeneratedQueryFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDevicePrimitivesGeneratedQueryFeaturesEXT( VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDevicePrimitivesGeneratedQueryFeaturesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDevicePrimitivesGeneratedQueryFeaturesEXT & operator=( PhysicalDevicePrimitivesGeneratedQueryFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDevicePrimitivesGeneratedQueryFeaturesEXT & operator=( VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePrimitivesGeneratedQueryFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePrimitivesGeneratedQueryFeaturesEXT & setPrimitivesGeneratedQuery( VULKAN_HPP_NAMESPACE::Bool32 primitivesGeneratedQuery_ ) VULKAN_HPP_NOEXCEPT { primitivesGeneratedQuery = primitivesGeneratedQuery_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePrimitivesGeneratedQueryFeaturesEXT & setPrimitivesGeneratedQueryWithRasterizerDiscard( VULKAN_HPP_NAMESPACE::Bool32 primitivesGeneratedQueryWithRasterizerDiscard_ ) VULKAN_HPP_NOEXCEPT { primitivesGeneratedQueryWithRasterizerDiscard = primitivesGeneratedQueryWithRasterizerDiscard_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePrimitivesGeneratedQueryFeaturesEXT & setPrimitivesGeneratedQueryWithNonZeroStreams( VULKAN_HPP_NAMESPACE::Bool32 primitivesGeneratedQueryWithNonZeroStreams_ ) VULKAN_HPP_NOEXCEPT { primitivesGeneratedQueryWithNonZeroStreams = primitivesGeneratedQueryWithNonZeroStreams_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, primitivesGeneratedQuery, primitivesGeneratedQueryWithRasterizerDiscard, primitivesGeneratedQueryWithNonZeroStreams ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDevicePrimitivesGeneratedQueryFeaturesEXT const & ) const = default; #else bool operator==( PhysicalDevicePrimitivesGeneratedQueryFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( primitivesGeneratedQuery == rhs.primitivesGeneratedQuery ) && ( primitivesGeneratedQueryWithRasterizerDiscard == rhs.primitivesGeneratedQueryWithRasterizerDiscard ) && ( primitivesGeneratedQueryWithNonZeroStreams == rhs.primitivesGeneratedQueryWithNonZeroStreams ); # endif } bool operator!=( PhysicalDevicePrimitivesGeneratedQueryFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDevicePrimitivesGeneratedQueryFeaturesEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 primitivesGeneratedQuery = {}; VULKAN_HPP_NAMESPACE::Bool32 primitivesGeneratedQueryWithRasterizerDiscard = {}; VULKAN_HPP_NAMESPACE::Bool32 primitivesGeneratedQueryWithNonZeroStreams = {}; }; template <> struct CppType { using Type = PhysicalDevicePrimitivesGeneratedQueryFeaturesEXT; }; struct PhysicalDevicePrivateDataFeatures { using NativeType = VkPhysicalDevicePrivateDataFeatures; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDevicePrivateDataFeatures; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDevicePrivateDataFeatures( VULKAN_HPP_NAMESPACE::Bool32 privateData_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , privateData{ privateData_ } { } VULKAN_HPP_CONSTEXPR PhysicalDevicePrivateDataFeatures( PhysicalDevicePrivateDataFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDevicePrivateDataFeatures( VkPhysicalDevicePrivateDataFeatures const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDevicePrivateDataFeatures( *reinterpret_cast( &rhs ) ) { } PhysicalDevicePrivateDataFeatures & operator=( PhysicalDevicePrivateDataFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDevicePrivateDataFeatures & operator=( VkPhysicalDevicePrivateDataFeatures const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePrivateDataFeatures & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDevicePrivateDataFeatures & setPrivateData( VULKAN_HPP_NAMESPACE::Bool32 privateData_ ) VULKAN_HPP_NOEXCEPT { privateData = privateData_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDevicePrivateDataFeatures const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDevicePrivateDataFeatures &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, privateData ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDevicePrivateDataFeatures const & ) const = default; #else bool operator==( PhysicalDevicePrivateDataFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( privateData == rhs.privateData ); # endif } bool operator!=( PhysicalDevicePrivateDataFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDevicePrivateDataFeatures; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 privateData = {}; }; template <> struct CppType { using Type = PhysicalDevicePrivateDataFeatures; }; using PhysicalDevicePrivateDataFeaturesEXT = PhysicalDevicePrivateDataFeatures; struct PhysicalDeviceProtectedMemoryFeatures { using NativeType = VkPhysicalDeviceProtectedMemoryFeatures; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceProtectedMemoryFeatures; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceProtectedMemoryFeatures( VULKAN_HPP_NAMESPACE::Bool32 protectedMemory_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , protectedMemory{ protectedMemory_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceProtectedMemoryFeatures( PhysicalDeviceProtectedMemoryFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceProtectedMemoryFeatures( VkPhysicalDeviceProtectedMemoryFeatures const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceProtectedMemoryFeatures( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceProtectedMemoryFeatures & operator=( PhysicalDeviceProtectedMemoryFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceProtectedMemoryFeatures & operator=( VkPhysicalDeviceProtectedMemoryFeatures const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceProtectedMemoryFeatures & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceProtectedMemoryFeatures & setProtectedMemory( VULKAN_HPP_NAMESPACE::Bool32 protectedMemory_ ) VULKAN_HPP_NOEXCEPT { protectedMemory = protectedMemory_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceProtectedMemoryFeatures const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceProtectedMemoryFeatures &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, protectedMemory ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceProtectedMemoryFeatures const & ) const = default; #else bool operator==( PhysicalDeviceProtectedMemoryFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( protectedMemory == rhs.protectedMemory ); # endif } bool operator!=( PhysicalDeviceProtectedMemoryFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceProtectedMemoryFeatures; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 protectedMemory = {}; }; template <> struct CppType { using Type = PhysicalDeviceProtectedMemoryFeatures; }; struct PhysicalDeviceProtectedMemoryProperties { using NativeType = VkPhysicalDeviceProtectedMemoryProperties; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceProtectedMemoryProperties; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceProtectedMemoryProperties( VULKAN_HPP_NAMESPACE::Bool32 protectedNoFault_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , protectedNoFault{ protectedNoFault_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceProtectedMemoryProperties( PhysicalDeviceProtectedMemoryProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceProtectedMemoryProperties( VkPhysicalDeviceProtectedMemoryProperties const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceProtectedMemoryProperties( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceProtectedMemoryProperties & operator=( PhysicalDeviceProtectedMemoryProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceProtectedMemoryProperties & operator=( VkPhysicalDeviceProtectedMemoryProperties const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceProtectedMemoryProperties const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceProtectedMemoryProperties &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, protectedNoFault ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceProtectedMemoryProperties const & ) const = default; #else bool operator==( PhysicalDeviceProtectedMemoryProperties const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( protectedNoFault == rhs.protectedNoFault ); # endif } bool operator!=( PhysicalDeviceProtectedMemoryProperties const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceProtectedMemoryProperties; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 protectedNoFault = {}; }; template <> struct CppType { using Type = PhysicalDeviceProtectedMemoryProperties; }; struct PhysicalDeviceProvokingVertexFeaturesEXT { using NativeType = VkPhysicalDeviceProvokingVertexFeaturesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceProvokingVertexFeaturesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceProvokingVertexFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 provokingVertexLast_ = {}, VULKAN_HPP_NAMESPACE::Bool32 transformFeedbackPreservesProvokingVertex_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , provokingVertexLast{ provokingVertexLast_ } , transformFeedbackPreservesProvokingVertex{ transformFeedbackPreservesProvokingVertex_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceProvokingVertexFeaturesEXT( PhysicalDeviceProvokingVertexFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceProvokingVertexFeaturesEXT( VkPhysicalDeviceProvokingVertexFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceProvokingVertexFeaturesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceProvokingVertexFeaturesEXT & operator=( PhysicalDeviceProvokingVertexFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceProvokingVertexFeaturesEXT & operator=( VkPhysicalDeviceProvokingVertexFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceProvokingVertexFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceProvokingVertexFeaturesEXT & setProvokingVertexLast( VULKAN_HPP_NAMESPACE::Bool32 provokingVertexLast_ ) VULKAN_HPP_NOEXCEPT { provokingVertexLast = provokingVertexLast_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceProvokingVertexFeaturesEXT & setTransformFeedbackPreservesProvokingVertex( VULKAN_HPP_NAMESPACE::Bool32 transformFeedbackPreservesProvokingVertex_ ) VULKAN_HPP_NOEXCEPT { transformFeedbackPreservesProvokingVertex = transformFeedbackPreservesProvokingVertex_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceProvokingVertexFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceProvokingVertexFeaturesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, provokingVertexLast, transformFeedbackPreservesProvokingVertex ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceProvokingVertexFeaturesEXT const & ) const = default; #else bool operator==( PhysicalDeviceProvokingVertexFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( provokingVertexLast == rhs.provokingVertexLast ) && ( transformFeedbackPreservesProvokingVertex == rhs.transformFeedbackPreservesProvokingVertex ); # endif } bool operator!=( PhysicalDeviceProvokingVertexFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceProvokingVertexFeaturesEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 provokingVertexLast = {}; VULKAN_HPP_NAMESPACE::Bool32 transformFeedbackPreservesProvokingVertex = {}; }; template <> struct CppType { using Type = PhysicalDeviceProvokingVertexFeaturesEXT; }; struct PhysicalDeviceProvokingVertexPropertiesEXT { using NativeType = VkPhysicalDeviceProvokingVertexPropertiesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceProvokingVertexPropertiesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceProvokingVertexPropertiesEXT( VULKAN_HPP_NAMESPACE::Bool32 provokingVertexModePerPipeline_ = {}, VULKAN_HPP_NAMESPACE::Bool32 transformFeedbackPreservesTriangleFanProvokingVertex_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , provokingVertexModePerPipeline{ provokingVertexModePerPipeline_ } , transformFeedbackPreservesTriangleFanProvokingVertex{ transformFeedbackPreservesTriangleFanProvokingVertex_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceProvokingVertexPropertiesEXT( PhysicalDeviceProvokingVertexPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceProvokingVertexPropertiesEXT( VkPhysicalDeviceProvokingVertexPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceProvokingVertexPropertiesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceProvokingVertexPropertiesEXT & operator=( PhysicalDeviceProvokingVertexPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceProvokingVertexPropertiesEXT & operator=( VkPhysicalDeviceProvokingVertexPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceProvokingVertexPropertiesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceProvokingVertexPropertiesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, provokingVertexModePerPipeline, transformFeedbackPreservesTriangleFanProvokingVertex ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceProvokingVertexPropertiesEXT const & ) const = default; #else bool operator==( PhysicalDeviceProvokingVertexPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( provokingVertexModePerPipeline == rhs.provokingVertexModePerPipeline ) && ( transformFeedbackPreservesTriangleFanProvokingVertex == rhs.transformFeedbackPreservesTriangleFanProvokingVertex ); # endif } bool operator!=( PhysicalDeviceProvokingVertexPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceProvokingVertexPropertiesEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 provokingVertexModePerPipeline = {}; VULKAN_HPP_NAMESPACE::Bool32 transformFeedbackPreservesTriangleFanProvokingVertex = {}; }; template <> struct CppType { using Type = PhysicalDeviceProvokingVertexPropertiesEXT; }; struct PhysicalDevicePushDescriptorProperties { using NativeType = VkPhysicalDevicePushDescriptorProperties; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDevicePushDescriptorProperties; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDevicePushDescriptorProperties( uint32_t maxPushDescriptors_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , maxPushDescriptors{ maxPushDescriptors_ } { } VULKAN_HPP_CONSTEXPR PhysicalDevicePushDescriptorProperties( PhysicalDevicePushDescriptorProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDevicePushDescriptorProperties( VkPhysicalDevicePushDescriptorProperties const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDevicePushDescriptorProperties( *reinterpret_cast( &rhs ) ) { } PhysicalDevicePushDescriptorProperties & operator=( PhysicalDevicePushDescriptorProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDevicePushDescriptorProperties & operator=( VkPhysicalDevicePushDescriptorProperties const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDevicePushDescriptorProperties const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDevicePushDescriptorProperties &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, maxPushDescriptors ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDevicePushDescriptorProperties const & ) const = default; #else bool operator==( PhysicalDevicePushDescriptorProperties const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( maxPushDescriptors == rhs.maxPushDescriptors ); # endif } bool operator!=( PhysicalDevicePushDescriptorProperties const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDevicePushDescriptorProperties; void * pNext = {}; uint32_t maxPushDescriptors = {}; }; template <> struct CppType { using Type = PhysicalDevicePushDescriptorProperties; }; using PhysicalDevicePushDescriptorPropertiesKHR = PhysicalDevicePushDescriptorProperties; struct PhysicalDeviceRGBA10X6FormatsFeaturesEXT { using NativeType = VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceRgba10X6FormatsFeaturesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceRGBA10X6FormatsFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 formatRgba10x6WithoutYCbCrSampler_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , formatRgba10x6WithoutYCbCrSampler{ formatRgba10x6WithoutYCbCrSampler_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceRGBA10X6FormatsFeaturesEXT( PhysicalDeviceRGBA10X6FormatsFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceRGBA10X6FormatsFeaturesEXT( VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceRGBA10X6FormatsFeaturesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceRGBA10X6FormatsFeaturesEXT & operator=( PhysicalDeviceRGBA10X6FormatsFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceRGBA10X6FormatsFeaturesEXT & operator=( VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceRGBA10X6FormatsFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceRGBA10X6FormatsFeaturesEXT & setFormatRgba10x6WithoutYCbCrSampler( VULKAN_HPP_NAMESPACE::Bool32 formatRgba10x6WithoutYCbCrSampler_ ) VULKAN_HPP_NOEXCEPT { formatRgba10x6WithoutYCbCrSampler = formatRgba10x6WithoutYCbCrSampler_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, formatRgba10x6WithoutYCbCrSampler ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceRGBA10X6FormatsFeaturesEXT const & ) const = default; #else bool operator==( PhysicalDeviceRGBA10X6FormatsFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( formatRgba10x6WithoutYCbCrSampler == rhs.formatRgba10x6WithoutYCbCrSampler ); # endif } bool operator!=( PhysicalDeviceRGBA10X6FormatsFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceRgba10X6FormatsFeaturesEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 formatRgba10x6WithoutYCbCrSampler = {}; }; template <> struct CppType { using Type = PhysicalDeviceRGBA10X6FormatsFeaturesEXT; }; struct PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT { using NativeType = VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 rasterizationOrderColorAttachmentAccess_ = {}, VULKAN_HPP_NAMESPACE::Bool32 rasterizationOrderDepthAttachmentAccess_ = {}, VULKAN_HPP_NAMESPACE::Bool32 rasterizationOrderStencilAttachmentAccess_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , rasterizationOrderColorAttachmentAccess{ rasterizationOrderColorAttachmentAccess_ } , rasterizationOrderDepthAttachmentAccess{ rasterizationOrderDepthAttachmentAccess_ } , rasterizationOrderStencilAttachmentAccess{ rasterizationOrderStencilAttachmentAccess_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT( PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT( VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT & operator=( PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT & operator=( VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT & setRasterizationOrderColorAttachmentAccess( VULKAN_HPP_NAMESPACE::Bool32 rasterizationOrderColorAttachmentAccess_ ) VULKAN_HPP_NOEXCEPT { rasterizationOrderColorAttachmentAccess = rasterizationOrderColorAttachmentAccess_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT & setRasterizationOrderDepthAttachmentAccess( VULKAN_HPP_NAMESPACE::Bool32 rasterizationOrderDepthAttachmentAccess_ ) VULKAN_HPP_NOEXCEPT { rasterizationOrderDepthAttachmentAccess = rasterizationOrderDepthAttachmentAccess_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT & setRasterizationOrderStencilAttachmentAccess( VULKAN_HPP_NAMESPACE::Bool32 rasterizationOrderStencilAttachmentAccess_ ) VULKAN_HPP_NOEXCEPT { rasterizationOrderStencilAttachmentAccess = rasterizationOrderStencilAttachmentAccess_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, rasterizationOrderColorAttachmentAccess, rasterizationOrderDepthAttachmentAccess, rasterizationOrderStencilAttachmentAccess ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT const & ) const = default; #else bool operator==( PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( rasterizationOrderColorAttachmentAccess == rhs.rasterizationOrderColorAttachmentAccess ) && ( rasterizationOrderDepthAttachmentAccess == rhs.rasterizationOrderDepthAttachmentAccess ) && ( rasterizationOrderStencilAttachmentAccess == rhs.rasterizationOrderStencilAttachmentAccess ); # endif } bool operator!=( PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 rasterizationOrderColorAttachmentAccess = {}; VULKAN_HPP_NAMESPACE::Bool32 rasterizationOrderDepthAttachmentAccess = {}; VULKAN_HPP_NAMESPACE::Bool32 rasterizationOrderStencilAttachmentAccess = {}; }; template <> struct CppType { using Type = PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT; }; using PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesARM = PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT; struct PhysicalDeviceRawAccessChainsFeaturesNV { using NativeType = VkPhysicalDeviceRawAccessChainsFeaturesNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceRawAccessChainsFeaturesNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceRawAccessChainsFeaturesNV( VULKAN_HPP_NAMESPACE::Bool32 shaderRawAccessChains_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , shaderRawAccessChains{ shaderRawAccessChains_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceRawAccessChainsFeaturesNV( PhysicalDeviceRawAccessChainsFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceRawAccessChainsFeaturesNV( VkPhysicalDeviceRawAccessChainsFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceRawAccessChainsFeaturesNV( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceRawAccessChainsFeaturesNV & operator=( PhysicalDeviceRawAccessChainsFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceRawAccessChainsFeaturesNV & operator=( VkPhysicalDeviceRawAccessChainsFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceRawAccessChainsFeaturesNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceRawAccessChainsFeaturesNV & setShaderRawAccessChains( VULKAN_HPP_NAMESPACE::Bool32 shaderRawAccessChains_ ) VULKAN_HPP_NOEXCEPT { shaderRawAccessChains = shaderRawAccessChains_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceRawAccessChainsFeaturesNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceRawAccessChainsFeaturesNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, shaderRawAccessChains ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceRawAccessChainsFeaturesNV const & ) const = default; #else bool operator==( PhysicalDeviceRawAccessChainsFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( shaderRawAccessChains == rhs.shaderRawAccessChains ); # endif } bool operator!=( PhysicalDeviceRawAccessChainsFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceRawAccessChainsFeaturesNV; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderRawAccessChains = {}; }; template <> struct CppType { using Type = PhysicalDeviceRawAccessChainsFeaturesNV; }; struct PhysicalDeviceRayQueryFeaturesKHR { using NativeType = VkPhysicalDeviceRayQueryFeaturesKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceRayQueryFeaturesKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceRayQueryFeaturesKHR( VULKAN_HPP_NAMESPACE::Bool32 rayQuery_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , rayQuery{ rayQuery_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceRayQueryFeaturesKHR( PhysicalDeviceRayQueryFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceRayQueryFeaturesKHR( VkPhysicalDeviceRayQueryFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceRayQueryFeaturesKHR( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceRayQueryFeaturesKHR & operator=( PhysicalDeviceRayQueryFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceRayQueryFeaturesKHR & operator=( VkPhysicalDeviceRayQueryFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceRayQueryFeaturesKHR & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceRayQueryFeaturesKHR & setRayQuery( VULKAN_HPP_NAMESPACE::Bool32 rayQuery_ ) VULKAN_HPP_NOEXCEPT { rayQuery = rayQuery_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceRayQueryFeaturesKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceRayQueryFeaturesKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, rayQuery ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceRayQueryFeaturesKHR const & ) const = default; #else bool operator==( PhysicalDeviceRayQueryFeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( rayQuery == rhs.rayQuery ); # endif } bool operator!=( PhysicalDeviceRayQueryFeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceRayQueryFeaturesKHR; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 rayQuery = {}; }; template <> struct CppType { using Type = PhysicalDeviceRayQueryFeaturesKHR; }; struct PhysicalDeviceRayTracingInvocationReorderFeaturesNV { using NativeType = VkPhysicalDeviceRayTracingInvocationReorderFeaturesNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceRayTracingInvocationReorderFeaturesNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceRayTracingInvocationReorderFeaturesNV( VULKAN_HPP_NAMESPACE::Bool32 rayTracingInvocationReorder_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , rayTracingInvocationReorder{ rayTracingInvocationReorder_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceRayTracingInvocationReorderFeaturesNV( PhysicalDeviceRayTracingInvocationReorderFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceRayTracingInvocationReorderFeaturesNV( VkPhysicalDeviceRayTracingInvocationReorderFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceRayTracingInvocationReorderFeaturesNV( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceRayTracingInvocationReorderFeaturesNV & operator=( PhysicalDeviceRayTracingInvocationReorderFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceRayTracingInvocationReorderFeaturesNV & operator=( VkPhysicalDeviceRayTracingInvocationReorderFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceRayTracingInvocationReorderFeaturesNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceRayTracingInvocationReorderFeaturesNV & setRayTracingInvocationReorder( VULKAN_HPP_NAMESPACE::Bool32 rayTracingInvocationReorder_ ) VULKAN_HPP_NOEXCEPT { rayTracingInvocationReorder = rayTracingInvocationReorder_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceRayTracingInvocationReorderFeaturesNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceRayTracingInvocationReorderFeaturesNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, rayTracingInvocationReorder ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceRayTracingInvocationReorderFeaturesNV const & ) const = default; #else bool operator==( PhysicalDeviceRayTracingInvocationReorderFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( rayTracingInvocationReorder == rhs.rayTracingInvocationReorder ); # endif } bool operator!=( PhysicalDeviceRayTracingInvocationReorderFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceRayTracingInvocationReorderFeaturesNV; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 rayTracingInvocationReorder = {}; }; template <> struct CppType { using Type = PhysicalDeviceRayTracingInvocationReorderFeaturesNV; }; struct PhysicalDeviceRayTracingInvocationReorderPropertiesNV { using NativeType = VkPhysicalDeviceRayTracingInvocationReorderPropertiesNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceRayTracingInvocationReorderPropertiesNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceRayTracingInvocationReorderPropertiesNV( VULKAN_HPP_NAMESPACE::RayTracingInvocationReorderModeNV rayTracingInvocationReorderReorderingHint_ = VULKAN_HPP_NAMESPACE::RayTracingInvocationReorderModeNV::eNone, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , rayTracingInvocationReorderReorderingHint{ rayTracingInvocationReorderReorderingHint_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceRayTracingInvocationReorderPropertiesNV( PhysicalDeviceRayTracingInvocationReorderPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceRayTracingInvocationReorderPropertiesNV( VkPhysicalDeviceRayTracingInvocationReorderPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceRayTracingInvocationReorderPropertiesNV( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceRayTracingInvocationReorderPropertiesNV & operator=( PhysicalDeviceRayTracingInvocationReorderPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceRayTracingInvocationReorderPropertiesNV & operator=( VkPhysicalDeviceRayTracingInvocationReorderPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceRayTracingInvocationReorderPropertiesNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceRayTracingInvocationReorderPropertiesNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, rayTracingInvocationReorderReorderingHint ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceRayTracingInvocationReorderPropertiesNV const & ) const = default; #else bool operator==( PhysicalDeviceRayTracingInvocationReorderPropertiesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( rayTracingInvocationReorderReorderingHint == rhs.rayTracingInvocationReorderReorderingHint ); # endif } bool operator!=( PhysicalDeviceRayTracingInvocationReorderPropertiesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceRayTracingInvocationReorderPropertiesNV; void * pNext = {}; VULKAN_HPP_NAMESPACE::RayTracingInvocationReorderModeNV rayTracingInvocationReorderReorderingHint = VULKAN_HPP_NAMESPACE::RayTracingInvocationReorderModeNV::eNone; }; template <> struct CppType { using Type = PhysicalDeviceRayTracingInvocationReorderPropertiesNV; }; struct PhysicalDeviceRayTracingLinearSweptSpheresFeaturesNV { using NativeType = VkPhysicalDeviceRayTracingLinearSweptSpheresFeaturesNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceRayTracingLinearSweptSpheresFeaturesNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceRayTracingLinearSweptSpheresFeaturesNV( VULKAN_HPP_NAMESPACE::Bool32 spheres_ = {}, VULKAN_HPP_NAMESPACE::Bool32 linearSweptSpheres_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , spheres{ spheres_ } , linearSweptSpheres{ linearSweptSpheres_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceRayTracingLinearSweptSpheresFeaturesNV( PhysicalDeviceRayTracingLinearSweptSpheresFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceRayTracingLinearSweptSpheresFeaturesNV( VkPhysicalDeviceRayTracingLinearSweptSpheresFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceRayTracingLinearSweptSpheresFeaturesNV( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceRayTracingLinearSweptSpheresFeaturesNV & operator=( PhysicalDeviceRayTracingLinearSweptSpheresFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceRayTracingLinearSweptSpheresFeaturesNV & operator=( VkPhysicalDeviceRayTracingLinearSweptSpheresFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceRayTracingLinearSweptSpheresFeaturesNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceRayTracingLinearSweptSpheresFeaturesNV & setSpheres( VULKAN_HPP_NAMESPACE::Bool32 spheres_ ) VULKAN_HPP_NOEXCEPT { spheres = spheres_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceRayTracingLinearSweptSpheresFeaturesNV & setLinearSweptSpheres( VULKAN_HPP_NAMESPACE::Bool32 linearSweptSpheres_ ) VULKAN_HPP_NOEXCEPT { linearSweptSpheres = linearSweptSpheres_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceRayTracingLinearSweptSpheresFeaturesNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceRayTracingLinearSweptSpheresFeaturesNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, spheres, linearSweptSpheres ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceRayTracingLinearSweptSpheresFeaturesNV const & ) const = default; #else bool operator==( PhysicalDeviceRayTracingLinearSweptSpheresFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( spheres == rhs.spheres ) && ( linearSweptSpheres == rhs.linearSweptSpheres ); # endif } bool operator!=( PhysicalDeviceRayTracingLinearSweptSpheresFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceRayTracingLinearSweptSpheresFeaturesNV; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 spheres = {}; VULKAN_HPP_NAMESPACE::Bool32 linearSweptSpheres = {}; }; template <> struct CppType { using Type = PhysicalDeviceRayTracingLinearSweptSpheresFeaturesNV; }; struct PhysicalDeviceRayTracingMaintenance1FeaturesKHR { using NativeType = VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceRayTracingMaintenance1FeaturesKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceRayTracingMaintenance1FeaturesKHR( VULKAN_HPP_NAMESPACE::Bool32 rayTracingMaintenance1_ = {}, VULKAN_HPP_NAMESPACE::Bool32 rayTracingPipelineTraceRaysIndirect2_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , rayTracingMaintenance1{ rayTracingMaintenance1_ } , rayTracingPipelineTraceRaysIndirect2{ rayTracingPipelineTraceRaysIndirect2_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceRayTracingMaintenance1FeaturesKHR( PhysicalDeviceRayTracingMaintenance1FeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceRayTracingMaintenance1FeaturesKHR( VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceRayTracingMaintenance1FeaturesKHR( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceRayTracingMaintenance1FeaturesKHR & operator=( PhysicalDeviceRayTracingMaintenance1FeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceRayTracingMaintenance1FeaturesKHR & operator=( VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceRayTracingMaintenance1FeaturesKHR & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceRayTracingMaintenance1FeaturesKHR & setRayTracingMaintenance1( VULKAN_HPP_NAMESPACE::Bool32 rayTracingMaintenance1_ ) VULKAN_HPP_NOEXCEPT { rayTracingMaintenance1 = rayTracingMaintenance1_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceRayTracingMaintenance1FeaturesKHR & setRayTracingPipelineTraceRaysIndirect2( VULKAN_HPP_NAMESPACE::Bool32 rayTracingPipelineTraceRaysIndirect2_ ) VULKAN_HPP_NOEXCEPT { rayTracingPipelineTraceRaysIndirect2 = rayTracingPipelineTraceRaysIndirect2_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, rayTracingMaintenance1, rayTracingPipelineTraceRaysIndirect2 ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceRayTracingMaintenance1FeaturesKHR const & ) const = default; #else bool operator==( PhysicalDeviceRayTracingMaintenance1FeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( rayTracingMaintenance1 == rhs.rayTracingMaintenance1 ) && ( rayTracingPipelineTraceRaysIndirect2 == rhs.rayTracingPipelineTraceRaysIndirect2 ); # endif } bool operator!=( PhysicalDeviceRayTracingMaintenance1FeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceRayTracingMaintenance1FeaturesKHR; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 rayTracingMaintenance1 = {}; VULKAN_HPP_NAMESPACE::Bool32 rayTracingPipelineTraceRaysIndirect2 = {}; }; template <> struct CppType { using Type = PhysicalDeviceRayTracingMaintenance1FeaturesKHR; }; struct PhysicalDeviceRayTracingMotionBlurFeaturesNV { using NativeType = VkPhysicalDeviceRayTracingMotionBlurFeaturesNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceRayTracingMotionBlurFeaturesNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceRayTracingMotionBlurFeaturesNV( VULKAN_HPP_NAMESPACE::Bool32 rayTracingMotionBlur_ = {}, VULKAN_HPP_NAMESPACE::Bool32 rayTracingMotionBlurPipelineTraceRaysIndirect_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , rayTracingMotionBlur{ rayTracingMotionBlur_ } , rayTracingMotionBlurPipelineTraceRaysIndirect{ rayTracingMotionBlurPipelineTraceRaysIndirect_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceRayTracingMotionBlurFeaturesNV( PhysicalDeviceRayTracingMotionBlurFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceRayTracingMotionBlurFeaturesNV( VkPhysicalDeviceRayTracingMotionBlurFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceRayTracingMotionBlurFeaturesNV( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceRayTracingMotionBlurFeaturesNV & operator=( PhysicalDeviceRayTracingMotionBlurFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceRayTracingMotionBlurFeaturesNV & operator=( VkPhysicalDeviceRayTracingMotionBlurFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceRayTracingMotionBlurFeaturesNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceRayTracingMotionBlurFeaturesNV & setRayTracingMotionBlur( VULKAN_HPP_NAMESPACE::Bool32 rayTracingMotionBlur_ ) VULKAN_HPP_NOEXCEPT { rayTracingMotionBlur = rayTracingMotionBlur_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceRayTracingMotionBlurFeaturesNV & setRayTracingMotionBlurPipelineTraceRaysIndirect( VULKAN_HPP_NAMESPACE::Bool32 rayTracingMotionBlurPipelineTraceRaysIndirect_ ) VULKAN_HPP_NOEXCEPT { rayTracingMotionBlurPipelineTraceRaysIndirect = rayTracingMotionBlurPipelineTraceRaysIndirect_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceRayTracingMotionBlurFeaturesNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceRayTracingMotionBlurFeaturesNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, rayTracingMotionBlur, rayTracingMotionBlurPipelineTraceRaysIndirect ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceRayTracingMotionBlurFeaturesNV const & ) const = default; #else bool operator==( PhysicalDeviceRayTracingMotionBlurFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( rayTracingMotionBlur == rhs.rayTracingMotionBlur ) && ( rayTracingMotionBlurPipelineTraceRaysIndirect == rhs.rayTracingMotionBlurPipelineTraceRaysIndirect ); # endif } bool operator!=( PhysicalDeviceRayTracingMotionBlurFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceRayTracingMotionBlurFeaturesNV; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 rayTracingMotionBlur = {}; VULKAN_HPP_NAMESPACE::Bool32 rayTracingMotionBlurPipelineTraceRaysIndirect = {}; }; template <> struct CppType { using Type = PhysicalDeviceRayTracingMotionBlurFeaturesNV; }; struct PhysicalDeviceRayTracingPipelineFeaturesKHR { using NativeType = VkPhysicalDeviceRayTracingPipelineFeaturesKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceRayTracingPipelineFeaturesKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceRayTracingPipelineFeaturesKHR( VULKAN_HPP_NAMESPACE::Bool32 rayTracingPipeline_ = {}, VULKAN_HPP_NAMESPACE::Bool32 rayTracingPipelineShaderGroupHandleCaptureReplay_ = {}, VULKAN_HPP_NAMESPACE::Bool32 rayTracingPipelineShaderGroupHandleCaptureReplayMixed_ = {}, VULKAN_HPP_NAMESPACE::Bool32 rayTracingPipelineTraceRaysIndirect_ = {}, VULKAN_HPP_NAMESPACE::Bool32 rayTraversalPrimitiveCulling_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , rayTracingPipeline{ rayTracingPipeline_ } , rayTracingPipelineShaderGroupHandleCaptureReplay{ rayTracingPipelineShaderGroupHandleCaptureReplay_ } , rayTracingPipelineShaderGroupHandleCaptureReplayMixed{ rayTracingPipelineShaderGroupHandleCaptureReplayMixed_ } , rayTracingPipelineTraceRaysIndirect{ rayTracingPipelineTraceRaysIndirect_ } , rayTraversalPrimitiveCulling{ rayTraversalPrimitiveCulling_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceRayTracingPipelineFeaturesKHR( PhysicalDeviceRayTracingPipelineFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceRayTracingPipelineFeaturesKHR( VkPhysicalDeviceRayTracingPipelineFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceRayTracingPipelineFeaturesKHR( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceRayTracingPipelineFeaturesKHR & operator=( PhysicalDeviceRayTracingPipelineFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceRayTracingPipelineFeaturesKHR & operator=( VkPhysicalDeviceRayTracingPipelineFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceRayTracingPipelineFeaturesKHR & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceRayTracingPipelineFeaturesKHR & setRayTracingPipeline( VULKAN_HPP_NAMESPACE::Bool32 rayTracingPipeline_ ) VULKAN_HPP_NOEXCEPT { rayTracingPipeline = rayTracingPipeline_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceRayTracingPipelineFeaturesKHR & setRayTracingPipelineShaderGroupHandleCaptureReplay( VULKAN_HPP_NAMESPACE::Bool32 rayTracingPipelineShaderGroupHandleCaptureReplay_ ) VULKAN_HPP_NOEXCEPT { rayTracingPipelineShaderGroupHandleCaptureReplay = rayTracingPipelineShaderGroupHandleCaptureReplay_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceRayTracingPipelineFeaturesKHR & setRayTracingPipelineShaderGroupHandleCaptureReplayMixed( VULKAN_HPP_NAMESPACE::Bool32 rayTracingPipelineShaderGroupHandleCaptureReplayMixed_ ) VULKAN_HPP_NOEXCEPT { rayTracingPipelineShaderGroupHandleCaptureReplayMixed = rayTracingPipelineShaderGroupHandleCaptureReplayMixed_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceRayTracingPipelineFeaturesKHR & setRayTracingPipelineTraceRaysIndirect( VULKAN_HPP_NAMESPACE::Bool32 rayTracingPipelineTraceRaysIndirect_ ) VULKAN_HPP_NOEXCEPT { rayTracingPipelineTraceRaysIndirect = rayTracingPipelineTraceRaysIndirect_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceRayTracingPipelineFeaturesKHR & setRayTraversalPrimitiveCulling( VULKAN_HPP_NAMESPACE::Bool32 rayTraversalPrimitiveCulling_ ) VULKAN_HPP_NOEXCEPT { rayTraversalPrimitiveCulling = rayTraversalPrimitiveCulling_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceRayTracingPipelineFeaturesKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceRayTracingPipelineFeaturesKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, rayTracingPipeline, rayTracingPipelineShaderGroupHandleCaptureReplay, rayTracingPipelineShaderGroupHandleCaptureReplayMixed, rayTracingPipelineTraceRaysIndirect, rayTraversalPrimitiveCulling ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceRayTracingPipelineFeaturesKHR const & ) const = default; #else bool operator==( PhysicalDeviceRayTracingPipelineFeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( rayTracingPipeline == rhs.rayTracingPipeline ) && ( rayTracingPipelineShaderGroupHandleCaptureReplay == rhs.rayTracingPipelineShaderGroupHandleCaptureReplay ) && ( rayTracingPipelineShaderGroupHandleCaptureReplayMixed == rhs.rayTracingPipelineShaderGroupHandleCaptureReplayMixed ) && ( rayTracingPipelineTraceRaysIndirect == rhs.rayTracingPipelineTraceRaysIndirect ) && ( rayTraversalPrimitiveCulling == rhs.rayTraversalPrimitiveCulling ); # endif } bool operator!=( PhysicalDeviceRayTracingPipelineFeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceRayTracingPipelineFeaturesKHR; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 rayTracingPipeline = {}; VULKAN_HPP_NAMESPACE::Bool32 rayTracingPipelineShaderGroupHandleCaptureReplay = {}; VULKAN_HPP_NAMESPACE::Bool32 rayTracingPipelineShaderGroupHandleCaptureReplayMixed = {}; VULKAN_HPP_NAMESPACE::Bool32 rayTracingPipelineTraceRaysIndirect = {}; VULKAN_HPP_NAMESPACE::Bool32 rayTraversalPrimitiveCulling = {}; }; template <> struct CppType { using Type = PhysicalDeviceRayTracingPipelineFeaturesKHR; }; struct PhysicalDeviceRayTracingPipelinePropertiesKHR { using NativeType = VkPhysicalDeviceRayTracingPipelinePropertiesKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceRayTracingPipelinePropertiesKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceRayTracingPipelinePropertiesKHR( uint32_t shaderGroupHandleSize_ = {}, uint32_t maxRayRecursionDepth_ = {}, uint32_t maxShaderGroupStride_ = {}, uint32_t shaderGroupBaseAlignment_ = {}, uint32_t shaderGroupHandleCaptureReplaySize_ = {}, uint32_t maxRayDispatchInvocationCount_ = {}, uint32_t shaderGroupHandleAlignment_ = {}, uint32_t maxRayHitAttributeSize_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , shaderGroupHandleSize{ shaderGroupHandleSize_ } , maxRayRecursionDepth{ maxRayRecursionDepth_ } , maxShaderGroupStride{ maxShaderGroupStride_ } , shaderGroupBaseAlignment{ shaderGroupBaseAlignment_ } , shaderGroupHandleCaptureReplaySize{ shaderGroupHandleCaptureReplaySize_ } , maxRayDispatchInvocationCount{ maxRayDispatchInvocationCount_ } , shaderGroupHandleAlignment{ shaderGroupHandleAlignment_ } , maxRayHitAttributeSize{ maxRayHitAttributeSize_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceRayTracingPipelinePropertiesKHR( PhysicalDeviceRayTracingPipelinePropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceRayTracingPipelinePropertiesKHR( VkPhysicalDeviceRayTracingPipelinePropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceRayTracingPipelinePropertiesKHR( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceRayTracingPipelinePropertiesKHR & operator=( PhysicalDeviceRayTracingPipelinePropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceRayTracingPipelinePropertiesKHR & operator=( VkPhysicalDeviceRayTracingPipelinePropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceRayTracingPipelinePropertiesKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceRayTracingPipelinePropertiesKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, shaderGroupHandleSize, maxRayRecursionDepth, maxShaderGroupStride, shaderGroupBaseAlignment, shaderGroupHandleCaptureReplaySize, maxRayDispatchInvocationCount, shaderGroupHandleAlignment, maxRayHitAttributeSize ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceRayTracingPipelinePropertiesKHR const & ) const = default; #else bool operator==( PhysicalDeviceRayTracingPipelinePropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( shaderGroupHandleSize == rhs.shaderGroupHandleSize ) && ( maxRayRecursionDepth == rhs.maxRayRecursionDepth ) && ( maxShaderGroupStride == rhs.maxShaderGroupStride ) && ( shaderGroupBaseAlignment == rhs.shaderGroupBaseAlignment ) && ( shaderGroupHandleCaptureReplaySize == rhs.shaderGroupHandleCaptureReplaySize ) && ( maxRayDispatchInvocationCount == rhs.maxRayDispatchInvocationCount ) && ( shaderGroupHandleAlignment == rhs.shaderGroupHandleAlignment ) && ( maxRayHitAttributeSize == rhs.maxRayHitAttributeSize ); # endif } bool operator!=( PhysicalDeviceRayTracingPipelinePropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceRayTracingPipelinePropertiesKHR; void * pNext = {}; uint32_t shaderGroupHandleSize = {}; uint32_t maxRayRecursionDepth = {}; uint32_t maxShaderGroupStride = {}; uint32_t shaderGroupBaseAlignment = {}; uint32_t shaderGroupHandleCaptureReplaySize = {}; uint32_t maxRayDispatchInvocationCount = {}; uint32_t shaderGroupHandleAlignment = {}; uint32_t maxRayHitAttributeSize = {}; }; template <> struct CppType { using Type = PhysicalDeviceRayTracingPipelinePropertiesKHR; }; struct PhysicalDeviceRayTracingPositionFetchFeaturesKHR { using NativeType = VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceRayTracingPositionFetchFeaturesKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceRayTracingPositionFetchFeaturesKHR( VULKAN_HPP_NAMESPACE::Bool32 rayTracingPositionFetch_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , rayTracingPositionFetch{ rayTracingPositionFetch_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceRayTracingPositionFetchFeaturesKHR( PhysicalDeviceRayTracingPositionFetchFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceRayTracingPositionFetchFeaturesKHR( VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceRayTracingPositionFetchFeaturesKHR( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceRayTracingPositionFetchFeaturesKHR & operator=( PhysicalDeviceRayTracingPositionFetchFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceRayTracingPositionFetchFeaturesKHR & operator=( VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceRayTracingPositionFetchFeaturesKHR & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceRayTracingPositionFetchFeaturesKHR & setRayTracingPositionFetch( VULKAN_HPP_NAMESPACE::Bool32 rayTracingPositionFetch_ ) VULKAN_HPP_NOEXCEPT { rayTracingPositionFetch = rayTracingPositionFetch_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, rayTracingPositionFetch ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceRayTracingPositionFetchFeaturesKHR const & ) const = default; #else bool operator==( PhysicalDeviceRayTracingPositionFetchFeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( rayTracingPositionFetch == rhs.rayTracingPositionFetch ); # endif } bool operator!=( PhysicalDeviceRayTracingPositionFetchFeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceRayTracingPositionFetchFeaturesKHR; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 rayTracingPositionFetch = {}; }; template <> struct CppType { using Type = PhysicalDeviceRayTracingPositionFetchFeaturesKHR; }; struct PhysicalDeviceRayTracingPropertiesNV { using NativeType = VkPhysicalDeviceRayTracingPropertiesNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceRayTracingPropertiesNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceRayTracingPropertiesNV( uint32_t shaderGroupHandleSize_ = {}, uint32_t maxRecursionDepth_ = {}, uint32_t maxShaderGroupStride_ = {}, uint32_t shaderGroupBaseAlignment_ = {}, uint64_t maxGeometryCount_ = {}, uint64_t maxInstanceCount_ = {}, uint64_t maxTriangleCount_ = {}, uint32_t maxDescriptorSetAccelerationStructures_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , shaderGroupHandleSize{ shaderGroupHandleSize_ } , maxRecursionDepth{ maxRecursionDepth_ } , maxShaderGroupStride{ maxShaderGroupStride_ } , shaderGroupBaseAlignment{ shaderGroupBaseAlignment_ } , maxGeometryCount{ maxGeometryCount_ } , maxInstanceCount{ maxInstanceCount_ } , maxTriangleCount{ maxTriangleCount_ } , maxDescriptorSetAccelerationStructures{ maxDescriptorSetAccelerationStructures_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceRayTracingPropertiesNV( PhysicalDeviceRayTracingPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceRayTracingPropertiesNV( VkPhysicalDeviceRayTracingPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceRayTracingPropertiesNV( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceRayTracingPropertiesNV & operator=( PhysicalDeviceRayTracingPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceRayTracingPropertiesNV & operator=( VkPhysicalDeviceRayTracingPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceRayTracingPropertiesNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceRayTracingPropertiesNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, shaderGroupHandleSize, maxRecursionDepth, maxShaderGroupStride, shaderGroupBaseAlignment, maxGeometryCount, maxInstanceCount, maxTriangleCount, maxDescriptorSetAccelerationStructures ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceRayTracingPropertiesNV const & ) const = default; #else bool operator==( PhysicalDeviceRayTracingPropertiesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( shaderGroupHandleSize == rhs.shaderGroupHandleSize ) && ( maxRecursionDepth == rhs.maxRecursionDepth ) && ( maxShaderGroupStride == rhs.maxShaderGroupStride ) && ( shaderGroupBaseAlignment == rhs.shaderGroupBaseAlignment ) && ( maxGeometryCount == rhs.maxGeometryCount ) && ( maxInstanceCount == rhs.maxInstanceCount ) && ( maxTriangleCount == rhs.maxTriangleCount ) && ( maxDescriptorSetAccelerationStructures == rhs.maxDescriptorSetAccelerationStructures ); # endif } bool operator!=( PhysicalDeviceRayTracingPropertiesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceRayTracingPropertiesNV; void * pNext = {}; uint32_t shaderGroupHandleSize = {}; uint32_t maxRecursionDepth = {}; uint32_t maxShaderGroupStride = {}; uint32_t shaderGroupBaseAlignment = {}; uint64_t maxGeometryCount = {}; uint64_t maxInstanceCount = {}; uint64_t maxTriangleCount = {}; uint32_t maxDescriptorSetAccelerationStructures = {}; }; template <> struct CppType { using Type = PhysicalDeviceRayTracingPropertiesNV; }; struct PhysicalDeviceRayTracingValidationFeaturesNV { using NativeType = VkPhysicalDeviceRayTracingValidationFeaturesNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceRayTracingValidationFeaturesNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceRayTracingValidationFeaturesNV( VULKAN_HPP_NAMESPACE::Bool32 rayTracingValidation_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , rayTracingValidation{ rayTracingValidation_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceRayTracingValidationFeaturesNV( PhysicalDeviceRayTracingValidationFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceRayTracingValidationFeaturesNV( VkPhysicalDeviceRayTracingValidationFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceRayTracingValidationFeaturesNV( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceRayTracingValidationFeaturesNV & operator=( PhysicalDeviceRayTracingValidationFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceRayTracingValidationFeaturesNV & operator=( VkPhysicalDeviceRayTracingValidationFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceRayTracingValidationFeaturesNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceRayTracingValidationFeaturesNV & setRayTracingValidation( VULKAN_HPP_NAMESPACE::Bool32 rayTracingValidation_ ) VULKAN_HPP_NOEXCEPT { rayTracingValidation = rayTracingValidation_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceRayTracingValidationFeaturesNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceRayTracingValidationFeaturesNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, rayTracingValidation ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceRayTracingValidationFeaturesNV const & ) const = default; #else bool operator==( PhysicalDeviceRayTracingValidationFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( rayTracingValidation == rhs.rayTracingValidation ); # endif } bool operator!=( PhysicalDeviceRayTracingValidationFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceRayTracingValidationFeaturesNV; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 rayTracingValidation = {}; }; template <> struct CppType { using Type = PhysicalDeviceRayTracingValidationFeaturesNV; }; struct PhysicalDeviceRelaxedLineRasterizationFeaturesIMG { using NativeType = VkPhysicalDeviceRelaxedLineRasterizationFeaturesIMG; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceRelaxedLineRasterizationFeaturesIMG; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceRelaxedLineRasterizationFeaturesIMG( VULKAN_HPP_NAMESPACE::Bool32 relaxedLineRasterization_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , relaxedLineRasterization{ relaxedLineRasterization_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceRelaxedLineRasterizationFeaturesIMG( PhysicalDeviceRelaxedLineRasterizationFeaturesIMG const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceRelaxedLineRasterizationFeaturesIMG( VkPhysicalDeviceRelaxedLineRasterizationFeaturesIMG const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceRelaxedLineRasterizationFeaturesIMG( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceRelaxedLineRasterizationFeaturesIMG & operator=( PhysicalDeviceRelaxedLineRasterizationFeaturesIMG const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceRelaxedLineRasterizationFeaturesIMG & operator=( VkPhysicalDeviceRelaxedLineRasterizationFeaturesIMG const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceRelaxedLineRasterizationFeaturesIMG & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceRelaxedLineRasterizationFeaturesIMG & setRelaxedLineRasterization( VULKAN_HPP_NAMESPACE::Bool32 relaxedLineRasterization_ ) VULKAN_HPP_NOEXCEPT { relaxedLineRasterization = relaxedLineRasterization_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceRelaxedLineRasterizationFeaturesIMG const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceRelaxedLineRasterizationFeaturesIMG &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, relaxedLineRasterization ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceRelaxedLineRasterizationFeaturesIMG const & ) const = default; #else bool operator==( PhysicalDeviceRelaxedLineRasterizationFeaturesIMG const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( relaxedLineRasterization == rhs.relaxedLineRasterization ); # endif } bool operator!=( PhysicalDeviceRelaxedLineRasterizationFeaturesIMG const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceRelaxedLineRasterizationFeaturesIMG; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 relaxedLineRasterization = {}; }; template <> struct CppType { using Type = PhysicalDeviceRelaxedLineRasterizationFeaturesIMG; }; struct PhysicalDeviceRenderPassStripedFeaturesARM { using NativeType = VkPhysicalDeviceRenderPassStripedFeaturesARM; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceRenderPassStripedFeaturesARM; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceRenderPassStripedFeaturesARM( VULKAN_HPP_NAMESPACE::Bool32 renderPassStriped_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , renderPassStriped{ renderPassStriped_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceRenderPassStripedFeaturesARM( PhysicalDeviceRenderPassStripedFeaturesARM const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceRenderPassStripedFeaturesARM( VkPhysicalDeviceRenderPassStripedFeaturesARM const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceRenderPassStripedFeaturesARM( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceRenderPassStripedFeaturesARM & operator=( PhysicalDeviceRenderPassStripedFeaturesARM const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceRenderPassStripedFeaturesARM & operator=( VkPhysicalDeviceRenderPassStripedFeaturesARM const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceRenderPassStripedFeaturesARM & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceRenderPassStripedFeaturesARM & setRenderPassStriped( VULKAN_HPP_NAMESPACE::Bool32 renderPassStriped_ ) VULKAN_HPP_NOEXCEPT { renderPassStriped = renderPassStriped_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceRenderPassStripedFeaturesARM const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceRenderPassStripedFeaturesARM &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, renderPassStriped ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceRenderPassStripedFeaturesARM const & ) const = default; #else bool operator==( PhysicalDeviceRenderPassStripedFeaturesARM const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( renderPassStriped == rhs.renderPassStriped ); # endif } bool operator!=( PhysicalDeviceRenderPassStripedFeaturesARM const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceRenderPassStripedFeaturesARM; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 renderPassStriped = {}; }; template <> struct CppType { using Type = PhysicalDeviceRenderPassStripedFeaturesARM; }; struct PhysicalDeviceRenderPassStripedPropertiesARM { using NativeType = VkPhysicalDeviceRenderPassStripedPropertiesARM; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceRenderPassStripedPropertiesARM; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceRenderPassStripedPropertiesARM( VULKAN_HPP_NAMESPACE::Extent2D renderPassStripeGranularity_ = {}, uint32_t maxRenderPassStripes_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , renderPassStripeGranularity{ renderPassStripeGranularity_ } , maxRenderPassStripes{ maxRenderPassStripes_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceRenderPassStripedPropertiesARM( PhysicalDeviceRenderPassStripedPropertiesARM const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceRenderPassStripedPropertiesARM( VkPhysicalDeviceRenderPassStripedPropertiesARM const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceRenderPassStripedPropertiesARM( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceRenderPassStripedPropertiesARM & operator=( PhysicalDeviceRenderPassStripedPropertiesARM const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceRenderPassStripedPropertiesARM & operator=( VkPhysicalDeviceRenderPassStripedPropertiesARM const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceRenderPassStripedPropertiesARM const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceRenderPassStripedPropertiesARM &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, renderPassStripeGranularity, maxRenderPassStripes ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceRenderPassStripedPropertiesARM const & ) const = default; #else bool operator==( PhysicalDeviceRenderPassStripedPropertiesARM const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( renderPassStripeGranularity == rhs.renderPassStripeGranularity ) && ( maxRenderPassStripes == rhs.maxRenderPassStripes ); # endif } bool operator!=( PhysicalDeviceRenderPassStripedPropertiesARM const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceRenderPassStripedPropertiesARM; void * pNext = {}; VULKAN_HPP_NAMESPACE::Extent2D renderPassStripeGranularity = {}; uint32_t maxRenderPassStripes = {}; }; template <> struct CppType { using Type = PhysicalDeviceRenderPassStripedPropertiesARM; }; struct PhysicalDeviceRepresentativeFragmentTestFeaturesNV { using NativeType = VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceRepresentativeFragmentTestFeaturesNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceRepresentativeFragmentTestFeaturesNV( VULKAN_HPP_NAMESPACE::Bool32 representativeFragmentTest_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , representativeFragmentTest{ representativeFragmentTest_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceRepresentativeFragmentTestFeaturesNV( PhysicalDeviceRepresentativeFragmentTestFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceRepresentativeFragmentTestFeaturesNV( VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceRepresentativeFragmentTestFeaturesNV( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceRepresentativeFragmentTestFeaturesNV & operator=( PhysicalDeviceRepresentativeFragmentTestFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceRepresentativeFragmentTestFeaturesNV & operator=( VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceRepresentativeFragmentTestFeaturesNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceRepresentativeFragmentTestFeaturesNV & setRepresentativeFragmentTest( VULKAN_HPP_NAMESPACE::Bool32 representativeFragmentTest_ ) VULKAN_HPP_NOEXCEPT { representativeFragmentTest = representativeFragmentTest_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, representativeFragmentTest ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceRepresentativeFragmentTestFeaturesNV const & ) const = default; #else bool operator==( PhysicalDeviceRepresentativeFragmentTestFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( representativeFragmentTest == rhs.representativeFragmentTest ); # endif } bool operator!=( PhysicalDeviceRepresentativeFragmentTestFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceRepresentativeFragmentTestFeaturesNV; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 representativeFragmentTest = {}; }; template <> struct CppType { using Type = PhysicalDeviceRepresentativeFragmentTestFeaturesNV; }; struct PhysicalDeviceRobustness2FeaturesEXT { using NativeType = VkPhysicalDeviceRobustness2FeaturesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceRobustness2FeaturesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceRobustness2FeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 robustBufferAccess2_ = {}, VULKAN_HPP_NAMESPACE::Bool32 robustImageAccess2_ = {}, VULKAN_HPP_NAMESPACE::Bool32 nullDescriptor_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , robustBufferAccess2{ robustBufferAccess2_ } , robustImageAccess2{ robustImageAccess2_ } , nullDescriptor{ nullDescriptor_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceRobustness2FeaturesEXT( PhysicalDeviceRobustness2FeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceRobustness2FeaturesEXT( VkPhysicalDeviceRobustness2FeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceRobustness2FeaturesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceRobustness2FeaturesEXT & operator=( PhysicalDeviceRobustness2FeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceRobustness2FeaturesEXT & operator=( VkPhysicalDeviceRobustness2FeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceRobustness2FeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceRobustness2FeaturesEXT & setRobustBufferAccess2( VULKAN_HPP_NAMESPACE::Bool32 robustBufferAccess2_ ) VULKAN_HPP_NOEXCEPT { robustBufferAccess2 = robustBufferAccess2_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceRobustness2FeaturesEXT & setRobustImageAccess2( VULKAN_HPP_NAMESPACE::Bool32 robustImageAccess2_ ) VULKAN_HPP_NOEXCEPT { robustImageAccess2 = robustImageAccess2_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceRobustness2FeaturesEXT & setNullDescriptor( VULKAN_HPP_NAMESPACE::Bool32 nullDescriptor_ ) VULKAN_HPP_NOEXCEPT { nullDescriptor = nullDescriptor_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceRobustness2FeaturesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceRobustness2FeaturesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, robustBufferAccess2, robustImageAccess2, nullDescriptor ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceRobustness2FeaturesEXT const & ) const = default; #else bool operator==( PhysicalDeviceRobustness2FeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( robustBufferAccess2 == rhs.robustBufferAccess2 ) && ( robustImageAccess2 == rhs.robustImageAccess2 ) && ( nullDescriptor == rhs.nullDescriptor ); # endif } bool operator!=( PhysicalDeviceRobustness2FeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceRobustness2FeaturesEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 robustBufferAccess2 = {}; VULKAN_HPP_NAMESPACE::Bool32 robustImageAccess2 = {}; VULKAN_HPP_NAMESPACE::Bool32 nullDescriptor = {}; }; template <> struct CppType { using Type = PhysicalDeviceRobustness2FeaturesEXT; }; struct PhysicalDeviceRobustness2PropertiesEXT { using NativeType = VkPhysicalDeviceRobustness2PropertiesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceRobustness2PropertiesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceRobustness2PropertiesEXT( VULKAN_HPP_NAMESPACE::DeviceSize robustStorageBufferAccessSizeAlignment_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize robustUniformBufferAccessSizeAlignment_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , robustStorageBufferAccessSizeAlignment{ robustStorageBufferAccessSizeAlignment_ } , robustUniformBufferAccessSizeAlignment{ robustUniformBufferAccessSizeAlignment_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceRobustness2PropertiesEXT( PhysicalDeviceRobustness2PropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceRobustness2PropertiesEXT( VkPhysicalDeviceRobustness2PropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceRobustness2PropertiesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceRobustness2PropertiesEXT & operator=( PhysicalDeviceRobustness2PropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceRobustness2PropertiesEXT & operator=( VkPhysicalDeviceRobustness2PropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceRobustness2PropertiesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceRobustness2PropertiesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, robustStorageBufferAccessSizeAlignment, robustUniformBufferAccessSizeAlignment ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceRobustness2PropertiesEXT const & ) const = default; #else bool operator==( PhysicalDeviceRobustness2PropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( robustStorageBufferAccessSizeAlignment == rhs.robustStorageBufferAccessSizeAlignment ) && ( robustUniformBufferAccessSizeAlignment == rhs.robustUniformBufferAccessSizeAlignment ); # endif } bool operator!=( PhysicalDeviceRobustness2PropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceRobustness2PropertiesEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::DeviceSize robustStorageBufferAccessSizeAlignment = {}; VULKAN_HPP_NAMESPACE::DeviceSize robustUniformBufferAccessSizeAlignment = {}; }; template <> struct CppType { using Type = PhysicalDeviceRobustness2PropertiesEXT; }; struct PhysicalDeviceSampleLocationsPropertiesEXT { using NativeType = VkPhysicalDeviceSampleLocationsPropertiesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceSampleLocationsPropertiesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceSampleLocationsPropertiesEXT( VULKAN_HPP_NAMESPACE::SampleCountFlags sampleLocationSampleCounts_ = {}, VULKAN_HPP_NAMESPACE::Extent2D maxSampleLocationGridSize_ = {}, std::array const & sampleLocationCoordinateRange_ = {}, uint32_t sampleLocationSubPixelBits_ = {}, VULKAN_HPP_NAMESPACE::Bool32 variableSampleLocations_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , sampleLocationSampleCounts{ sampleLocationSampleCounts_ } , maxSampleLocationGridSize{ maxSampleLocationGridSize_ } , sampleLocationCoordinateRange{ sampleLocationCoordinateRange_ } , sampleLocationSubPixelBits{ sampleLocationSubPixelBits_ } , variableSampleLocations{ variableSampleLocations_ } { } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceSampleLocationsPropertiesEXT( PhysicalDeviceSampleLocationsPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceSampleLocationsPropertiesEXT( VkPhysicalDeviceSampleLocationsPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceSampleLocationsPropertiesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceSampleLocationsPropertiesEXT & operator=( PhysicalDeviceSampleLocationsPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceSampleLocationsPropertiesEXT & operator=( VkPhysicalDeviceSampleLocationsPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceSampleLocationsPropertiesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceSampleLocationsPropertiesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple const &, uint32_t const &, VULKAN_HPP_NAMESPACE::Bool32 const &> # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, sampleLocationSampleCounts, maxSampleLocationGridSize, sampleLocationCoordinateRange, sampleLocationSubPixelBits, variableSampleLocations ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceSampleLocationsPropertiesEXT const & ) const = default; #else bool operator==( PhysicalDeviceSampleLocationsPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( sampleLocationSampleCounts == rhs.sampleLocationSampleCounts ) && ( maxSampleLocationGridSize == rhs.maxSampleLocationGridSize ) && ( sampleLocationCoordinateRange == rhs.sampleLocationCoordinateRange ) && ( sampleLocationSubPixelBits == rhs.sampleLocationSubPixelBits ) && ( variableSampleLocations == rhs.variableSampleLocations ); # endif } bool operator!=( PhysicalDeviceSampleLocationsPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceSampleLocationsPropertiesEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::SampleCountFlags sampleLocationSampleCounts = {}; VULKAN_HPP_NAMESPACE::Extent2D maxSampleLocationGridSize = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D sampleLocationCoordinateRange = {}; uint32_t sampleLocationSubPixelBits = {}; VULKAN_HPP_NAMESPACE::Bool32 variableSampleLocations = {}; }; template <> struct CppType { using Type = PhysicalDeviceSampleLocationsPropertiesEXT; }; struct PhysicalDeviceSamplerFilterMinmaxProperties { using NativeType = VkPhysicalDeviceSamplerFilterMinmaxProperties; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceSamplerFilterMinmaxProperties; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceSamplerFilterMinmaxProperties( VULKAN_HPP_NAMESPACE::Bool32 filterMinmaxSingleComponentFormats_ = {}, VULKAN_HPP_NAMESPACE::Bool32 filterMinmaxImageComponentMapping_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , filterMinmaxSingleComponentFormats{ filterMinmaxSingleComponentFormats_ } , filterMinmaxImageComponentMapping{ filterMinmaxImageComponentMapping_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceSamplerFilterMinmaxProperties( PhysicalDeviceSamplerFilterMinmaxProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceSamplerFilterMinmaxProperties( VkPhysicalDeviceSamplerFilterMinmaxProperties const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceSamplerFilterMinmaxProperties( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceSamplerFilterMinmaxProperties & operator=( PhysicalDeviceSamplerFilterMinmaxProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceSamplerFilterMinmaxProperties & operator=( VkPhysicalDeviceSamplerFilterMinmaxProperties const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceSamplerFilterMinmaxProperties const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceSamplerFilterMinmaxProperties &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, filterMinmaxSingleComponentFormats, filterMinmaxImageComponentMapping ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceSamplerFilterMinmaxProperties const & ) const = default; #else bool operator==( PhysicalDeviceSamplerFilterMinmaxProperties const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( filterMinmaxSingleComponentFormats == rhs.filterMinmaxSingleComponentFormats ) && ( filterMinmaxImageComponentMapping == rhs.filterMinmaxImageComponentMapping ); # endif } bool operator!=( PhysicalDeviceSamplerFilterMinmaxProperties const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceSamplerFilterMinmaxProperties; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 filterMinmaxSingleComponentFormats = {}; VULKAN_HPP_NAMESPACE::Bool32 filterMinmaxImageComponentMapping = {}; }; template <> struct CppType { using Type = PhysicalDeviceSamplerFilterMinmaxProperties; }; using PhysicalDeviceSamplerFilterMinmaxPropertiesEXT = PhysicalDeviceSamplerFilterMinmaxProperties; struct PhysicalDeviceSamplerYcbcrConversionFeatures { using NativeType = VkPhysicalDeviceSamplerYcbcrConversionFeatures; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceSamplerYcbcrConversionFeatures; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceSamplerYcbcrConversionFeatures( VULKAN_HPP_NAMESPACE::Bool32 samplerYcbcrConversion_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , samplerYcbcrConversion{ samplerYcbcrConversion_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceSamplerYcbcrConversionFeatures( PhysicalDeviceSamplerYcbcrConversionFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceSamplerYcbcrConversionFeatures( VkPhysicalDeviceSamplerYcbcrConversionFeatures const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceSamplerYcbcrConversionFeatures( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceSamplerYcbcrConversionFeatures & operator=( PhysicalDeviceSamplerYcbcrConversionFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceSamplerYcbcrConversionFeatures & operator=( VkPhysicalDeviceSamplerYcbcrConversionFeatures const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceSamplerYcbcrConversionFeatures & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceSamplerYcbcrConversionFeatures & setSamplerYcbcrConversion( VULKAN_HPP_NAMESPACE::Bool32 samplerYcbcrConversion_ ) VULKAN_HPP_NOEXCEPT { samplerYcbcrConversion = samplerYcbcrConversion_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceSamplerYcbcrConversionFeatures const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceSamplerYcbcrConversionFeatures &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, samplerYcbcrConversion ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceSamplerYcbcrConversionFeatures const & ) const = default; #else bool operator==( PhysicalDeviceSamplerYcbcrConversionFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( samplerYcbcrConversion == rhs.samplerYcbcrConversion ); # endif } bool operator!=( PhysicalDeviceSamplerYcbcrConversionFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceSamplerYcbcrConversionFeatures; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 samplerYcbcrConversion = {}; }; template <> struct CppType { using Type = PhysicalDeviceSamplerYcbcrConversionFeatures; }; using PhysicalDeviceSamplerYcbcrConversionFeaturesKHR = PhysicalDeviceSamplerYcbcrConversionFeatures; struct PhysicalDeviceScalarBlockLayoutFeatures { using NativeType = VkPhysicalDeviceScalarBlockLayoutFeatures; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceScalarBlockLayoutFeatures; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceScalarBlockLayoutFeatures( VULKAN_HPP_NAMESPACE::Bool32 scalarBlockLayout_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , scalarBlockLayout{ scalarBlockLayout_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceScalarBlockLayoutFeatures( PhysicalDeviceScalarBlockLayoutFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceScalarBlockLayoutFeatures( VkPhysicalDeviceScalarBlockLayoutFeatures const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceScalarBlockLayoutFeatures( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceScalarBlockLayoutFeatures & operator=( PhysicalDeviceScalarBlockLayoutFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceScalarBlockLayoutFeatures & operator=( VkPhysicalDeviceScalarBlockLayoutFeatures const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceScalarBlockLayoutFeatures & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceScalarBlockLayoutFeatures & setScalarBlockLayout( VULKAN_HPP_NAMESPACE::Bool32 scalarBlockLayout_ ) VULKAN_HPP_NOEXCEPT { scalarBlockLayout = scalarBlockLayout_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceScalarBlockLayoutFeatures const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceScalarBlockLayoutFeatures &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, scalarBlockLayout ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceScalarBlockLayoutFeatures const & ) const = default; #else bool operator==( PhysicalDeviceScalarBlockLayoutFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( scalarBlockLayout == rhs.scalarBlockLayout ); # endif } bool operator!=( PhysicalDeviceScalarBlockLayoutFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceScalarBlockLayoutFeatures; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 scalarBlockLayout = {}; }; template <> struct CppType { using Type = PhysicalDeviceScalarBlockLayoutFeatures; }; using PhysicalDeviceScalarBlockLayoutFeaturesEXT = PhysicalDeviceScalarBlockLayoutFeatures; struct PhysicalDeviceSchedulingControlsFeaturesARM { using NativeType = VkPhysicalDeviceSchedulingControlsFeaturesARM; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceSchedulingControlsFeaturesARM; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceSchedulingControlsFeaturesARM( VULKAN_HPP_NAMESPACE::Bool32 schedulingControls_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , schedulingControls{ schedulingControls_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceSchedulingControlsFeaturesARM( PhysicalDeviceSchedulingControlsFeaturesARM const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceSchedulingControlsFeaturesARM( VkPhysicalDeviceSchedulingControlsFeaturesARM const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceSchedulingControlsFeaturesARM( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceSchedulingControlsFeaturesARM & operator=( PhysicalDeviceSchedulingControlsFeaturesARM const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceSchedulingControlsFeaturesARM & operator=( VkPhysicalDeviceSchedulingControlsFeaturesARM const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceSchedulingControlsFeaturesARM & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceSchedulingControlsFeaturesARM & setSchedulingControls( VULKAN_HPP_NAMESPACE::Bool32 schedulingControls_ ) VULKAN_HPP_NOEXCEPT { schedulingControls = schedulingControls_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceSchedulingControlsFeaturesARM const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceSchedulingControlsFeaturesARM &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, schedulingControls ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceSchedulingControlsFeaturesARM const & ) const = default; #else bool operator==( PhysicalDeviceSchedulingControlsFeaturesARM const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( schedulingControls == rhs.schedulingControls ); # endif } bool operator!=( PhysicalDeviceSchedulingControlsFeaturesARM const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceSchedulingControlsFeaturesARM; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 schedulingControls = {}; }; template <> struct CppType { using Type = PhysicalDeviceSchedulingControlsFeaturesARM; }; struct PhysicalDeviceSchedulingControlsPropertiesARM { using NativeType = VkPhysicalDeviceSchedulingControlsPropertiesARM; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceSchedulingControlsPropertiesARM; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceSchedulingControlsPropertiesARM( VULKAN_HPP_NAMESPACE::PhysicalDeviceSchedulingControlsFlagsARM schedulingControlsFlags_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , schedulingControlsFlags{ schedulingControlsFlags_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceSchedulingControlsPropertiesARM( PhysicalDeviceSchedulingControlsPropertiesARM const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceSchedulingControlsPropertiesARM( VkPhysicalDeviceSchedulingControlsPropertiesARM const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceSchedulingControlsPropertiesARM( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceSchedulingControlsPropertiesARM & operator=( PhysicalDeviceSchedulingControlsPropertiesARM const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceSchedulingControlsPropertiesARM & operator=( VkPhysicalDeviceSchedulingControlsPropertiesARM const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceSchedulingControlsPropertiesARM & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceSchedulingControlsPropertiesARM & setSchedulingControlsFlags( VULKAN_HPP_NAMESPACE::PhysicalDeviceSchedulingControlsFlagsARM schedulingControlsFlags_ ) VULKAN_HPP_NOEXCEPT { schedulingControlsFlags = schedulingControlsFlags_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceSchedulingControlsPropertiesARM const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceSchedulingControlsPropertiesARM &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, schedulingControlsFlags ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceSchedulingControlsPropertiesARM const & ) const = default; #else bool operator==( PhysicalDeviceSchedulingControlsPropertiesARM const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( schedulingControlsFlags == rhs.schedulingControlsFlags ); # endif } bool operator!=( PhysicalDeviceSchedulingControlsPropertiesARM const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceSchedulingControlsPropertiesARM; void * pNext = {}; VULKAN_HPP_NAMESPACE::PhysicalDeviceSchedulingControlsFlagsARM schedulingControlsFlags = {}; }; template <> struct CppType { using Type = PhysicalDeviceSchedulingControlsPropertiesARM; }; struct PhysicalDeviceSeparateDepthStencilLayoutsFeatures { using NativeType = VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceSeparateDepthStencilLayoutsFeatures; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceSeparateDepthStencilLayoutsFeatures( VULKAN_HPP_NAMESPACE::Bool32 separateDepthStencilLayouts_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , separateDepthStencilLayouts{ separateDepthStencilLayouts_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceSeparateDepthStencilLayoutsFeatures( PhysicalDeviceSeparateDepthStencilLayoutsFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceSeparateDepthStencilLayoutsFeatures( VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceSeparateDepthStencilLayoutsFeatures( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceSeparateDepthStencilLayoutsFeatures & operator=( PhysicalDeviceSeparateDepthStencilLayoutsFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceSeparateDepthStencilLayoutsFeatures & operator=( VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceSeparateDepthStencilLayoutsFeatures & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceSeparateDepthStencilLayoutsFeatures & setSeparateDepthStencilLayouts( VULKAN_HPP_NAMESPACE::Bool32 separateDepthStencilLayouts_ ) VULKAN_HPP_NOEXCEPT { separateDepthStencilLayouts = separateDepthStencilLayouts_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, separateDepthStencilLayouts ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceSeparateDepthStencilLayoutsFeatures const & ) const = default; #else bool operator==( PhysicalDeviceSeparateDepthStencilLayoutsFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( separateDepthStencilLayouts == rhs.separateDepthStencilLayouts ); # endif } bool operator!=( PhysicalDeviceSeparateDepthStencilLayoutsFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceSeparateDepthStencilLayoutsFeatures; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 separateDepthStencilLayouts = {}; }; template <> struct CppType { using Type = PhysicalDeviceSeparateDepthStencilLayoutsFeatures; }; using PhysicalDeviceSeparateDepthStencilLayoutsFeaturesKHR = PhysicalDeviceSeparateDepthStencilLayoutsFeatures; struct PhysicalDeviceShaderAtomicFloat16VectorFeaturesNV { using NativeType = VkPhysicalDeviceShaderAtomicFloat16VectorFeaturesNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceShaderAtomicFloat16VectorFeaturesNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderAtomicFloat16VectorFeaturesNV( VULKAN_HPP_NAMESPACE::Bool32 shaderFloat16VectorAtomics_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , shaderFloat16VectorAtomics{ shaderFloat16VectorAtomics_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderAtomicFloat16VectorFeaturesNV( PhysicalDeviceShaderAtomicFloat16VectorFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceShaderAtomicFloat16VectorFeaturesNV( VkPhysicalDeviceShaderAtomicFloat16VectorFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceShaderAtomicFloat16VectorFeaturesNV( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceShaderAtomicFloat16VectorFeaturesNV & operator=( PhysicalDeviceShaderAtomicFloat16VectorFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceShaderAtomicFloat16VectorFeaturesNV & operator=( VkPhysicalDeviceShaderAtomicFloat16VectorFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderAtomicFloat16VectorFeaturesNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderAtomicFloat16VectorFeaturesNV & setShaderFloat16VectorAtomics( VULKAN_HPP_NAMESPACE::Bool32 shaderFloat16VectorAtomics_ ) VULKAN_HPP_NOEXCEPT { shaderFloat16VectorAtomics = shaderFloat16VectorAtomics_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceShaderAtomicFloat16VectorFeaturesNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceShaderAtomicFloat16VectorFeaturesNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, shaderFloat16VectorAtomics ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceShaderAtomicFloat16VectorFeaturesNV const & ) const = default; #else bool operator==( PhysicalDeviceShaderAtomicFloat16VectorFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( shaderFloat16VectorAtomics == rhs.shaderFloat16VectorAtomics ); # endif } bool operator!=( PhysicalDeviceShaderAtomicFloat16VectorFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceShaderAtomicFloat16VectorFeaturesNV; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderFloat16VectorAtomics = {}; }; template <> struct CppType { using Type = PhysicalDeviceShaderAtomicFloat16VectorFeaturesNV; }; struct PhysicalDeviceShaderAtomicFloat2FeaturesEXT { using NativeType = VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceShaderAtomicFloat2FeaturesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderAtomicFloat2FeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 shaderBufferFloat16Atomics_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderBufferFloat16AtomicAdd_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderBufferFloat16AtomicMinMax_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderBufferFloat32AtomicMinMax_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderBufferFloat64AtomicMinMax_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderSharedFloat16Atomics_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderSharedFloat16AtomicAdd_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderSharedFloat16AtomicMinMax_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderSharedFloat32AtomicMinMax_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderSharedFloat64AtomicMinMax_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderImageFloat32AtomicMinMax_ = {}, VULKAN_HPP_NAMESPACE::Bool32 sparseImageFloat32AtomicMinMax_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , shaderBufferFloat16Atomics{ shaderBufferFloat16Atomics_ } , shaderBufferFloat16AtomicAdd{ shaderBufferFloat16AtomicAdd_ } , shaderBufferFloat16AtomicMinMax{ shaderBufferFloat16AtomicMinMax_ } , shaderBufferFloat32AtomicMinMax{ shaderBufferFloat32AtomicMinMax_ } , shaderBufferFloat64AtomicMinMax{ shaderBufferFloat64AtomicMinMax_ } , shaderSharedFloat16Atomics{ shaderSharedFloat16Atomics_ } , shaderSharedFloat16AtomicAdd{ shaderSharedFloat16AtomicAdd_ } , shaderSharedFloat16AtomicMinMax{ shaderSharedFloat16AtomicMinMax_ } , shaderSharedFloat32AtomicMinMax{ shaderSharedFloat32AtomicMinMax_ } , shaderSharedFloat64AtomicMinMax{ shaderSharedFloat64AtomicMinMax_ } , shaderImageFloat32AtomicMinMax{ shaderImageFloat32AtomicMinMax_ } , sparseImageFloat32AtomicMinMax{ sparseImageFloat32AtomicMinMax_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderAtomicFloat2FeaturesEXT( PhysicalDeviceShaderAtomicFloat2FeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceShaderAtomicFloat2FeaturesEXT( VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceShaderAtomicFloat2FeaturesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceShaderAtomicFloat2FeaturesEXT & operator=( PhysicalDeviceShaderAtomicFloat2FeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceShaderAtomicFloat2FeaturesEXT & operator=( VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderAtomicFloat2FeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderAtomicFloat2FeaturesEXT & setShaderBufferFloat16Atomics( VULKAN_HPP_NAMESPACE::Bool32 shaderBufferFloat16Atomics_ ) VULKAN_HPP_NOEXCEPT { shaderBufferFloat16Atomics = shaderBufferFloat16Atomics_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderAtomicFloat2FeaturesEXT & setShaderBufferFloat16AtomicAdd( VULKAN_HPP_NAMESPACE::Bool32 shaderBufferFloat16AtomicAdd_ ) VULKAN_HPP_NOEXCEPT { shaderBufferFloat16AtomicAdd = shaderBufferFloat16AtomicAdd_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderAtomicFloat2FeaturesEXT & setShaderBufferFloat16AtomicMinMax( VULKAN_HPP_NAMESPACE::Bool32 shaderBufferFloat16AtomicMinMax_ ) VULKAN_HPP_NOEXCEPT { shaderBufferFloat16AtomicMinMax = shaderBufferFloat16AtomicMinMax_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderAtomicFloat2FeaturesEXT & setShaderBufferFloat32AtomicMinMax( VULKAN_HPP_NAMESPACE::Bool32 shaderBufferFloat32AtomicMinMax_ ) VULKAN_HPP_NOEXCEPT { shaderBufferFloat32AtomicMinMax = shaderBufferFloat32AtomicMinMax_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderAtomicFloat2FeaturesEXT & setShaderBufferFloat64AtomicMinMax( VULKAN_HPP_NAMESPACE::Bool32 shaderBufferFloat64AtomicMinMax_ ) VULKAN_HPP_NOEXCEPT { shaderBufferFloat64AtomicMinMax = shaderBufferFloat64AtomicMinMax_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderAtomicFloat2FeaturesEXT & setShaderSharedFloat16Atomics( VULKAN_HPP_NAMESPACE::Bool32 shaderSharedFloat16Atomics_ ) VULKAN_HPP_NOEXCEPT { shaderSharedFloat16Atomics = shaderSharedFloat16Atomics_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderAtomicFloat2FeaturesEXT & setShaderSharedFloat16AtomicAdd( VULKAN_HPP_NAMESPACE::Bool32 shaderSharedFloat16AtomicAdd_ ) VULKAN_HPP_NOEXCEPT { shaderSharedFloat16AtomicAdd = shaderSharedFloat16AtomicAdd_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderAtomicFloat2FeaturesEXT & setShaderSharedFloat16AtomicMinMax( VULKAN_HPP_NAMESPACE::Bool32 shaderSharedFloat16AtomicMinMax_ ) VULKAN_HPP_NOEXCEPT { shaderSharedFloat16AtomicMinMax = shaderSharedFloat16AtomicMinMax_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderAtomicFloat2FeaturesEXT & setShaderSharedFloat32AtomicMinMax( VULKAN_HPP_NAMESPACE::Bool32 shaderSharedFloat32AtomicMinMax_ ) VULKAN_HPP_NOEXCEPT { shaderSharedFloat32AtomicMinMax = shaderSharedFloat32AtomicMinMax_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderAtomicFloat2FeaturesEXT & setShaderSharedFloat64AtomicMinMax( VULKAN_HPP_NAMESPACE::Bool32 shaderSharedFloat64AtomicMinMax_ ) VULKAN_HPP_NOEXCEPT { shaderSharedFloat64AtomicMinMax = shaderSharedFloat64AtomicMinMax_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderAtomicFloat2FeaturesEXT & setShaderImageFloat32AtomicMinMax( VULKAN_HPP_NAMESPACE::Bool32 shaderImageFloat32AtomicMinMax_ ) VULKAN_HPP_NOEXCEPT { shaderImageFloat32AtomicMinMax = shaderImageFloat32AtomicMinMax_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderAtomicFloat2FeaturesEXT & setSparseImageFloat32AtomicMinMax( VULKAN_HPP_NAMESPACE::Bool32 sparseImageFloat32AtomicMinMax_ ) VULKAN_HPP_NOEXCEPT { sparseImageFloat32AtomicMinMax = sparseImageFloat32AtomicMinMax_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, shaderBufferFloat16Atomics, shaderBufferFloat16AtomicAdd, shaderBufferFloat16AtomicMinMax, shaderBufferFloat32AtomicMinMax, shaderBufferFloat64AtomicMinMax, shaderSharedFloat16Atomics, shaderSharedFloat16AtomicAdd, shaderSharedFloat16AtomicMinMax, shaderSharedFloat32AtomicMinMax, shaderSharedFloat64AtomicMinMax, shaderImageFloat32AtomicMinMax, sparseImageFloat32AtomicMinMax ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceShaderAtomicFloat2FeaturesEXT const & ) const = default; #else bool operator==( PhysicalDeviceShaderAtomicFloat2FeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( shaderBufferFloat16Atomics == rhs.shaderBufferFloat16Atomics ) && ( shaderBufferFloat16AtomicAdd == rhs.shaderBufferFloat16AtomicAdd ) && ( shaderBufferFloat16AtomicMinMax == rhs.shaderBufferFloat16AtomicMinMax ) && ( shaderBufferFloat32AtomicMinMax == rhs.shaderBufferFloat32AtomicMinMax ) && ( shaderBufferFloat64AtomicMinMax == rhs.shaderBufferFloat64AtomicMinMax ) && ( shaderSharedFloat16Atomics == rhs.shaderSharedFloat16Atomics ) && ( shaderSharedFloat16AtomicAdd == rhs.shaderSharedFloat16AtomicAdd ) && ( shaderSharedFloat16AtomicMinMax == rhs.shaderSharedFloat16AtomicMinMax ) && ( shaderSharedFloat32AtomicMinMax == rhs.shaderSharedFloat32AtomicMinMax ) && ( shaderSharedFloat64AtomicMinMax == rhs.shaderSharedFloat64AtomicMinMax ) && ( shaderImageFloat32AtomicMinMax == rhs.shaderImageFloat32AtomicMinMax ) && ( sparseImageFloat32AtomicMinMax == rhs.sparseImageFloat32AtomicMinMax ); # endif } bool operator!=( PhysicalDeviceShaderAtomicFloat2FeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceShaderAtomicFloat2FeaturesEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderBufferFloat16Atomics = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderBufferFloat16AtomicAdd = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderBufferFloat16AtomicMinMax = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderBufferFloat32AtomicMinMax = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderBufferFloat64AtomicMinMax = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderSharedFloat16Atomics = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderSharedFloat16AtomicAdd = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderSharedFloat16AtomicMinMax = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderSharedFloat32AtomicMinMax = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderSharedFloat64AtomicMinMax = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderImageFloat32AtomicMinMax = {}; VULKAN_HPP_NAMESPACE::Bool32 sparseImageFloat32AtomicMinMax = {}; }; template <> struct CppType { using Type = PhysicalDeviceShaderAtomicFloat2FeaturesEXT; }; struct PhysicalDeviceShaderAtomicFloatFeaturesEXT { using NativeType = VkPhysicalDeviceShaderAtomicFloatFeaturesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceShaderAtomicFloatFeaturesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderAtomicFloatFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 shaderBufferFloat32Atomics_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderBufferFloat32AtomicAdd_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderBufferFloat64Atomics_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderBufferFloat64AtomicAdd_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderSharedFloat32Atomics_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderSharedFloat32AtomicAdd_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderSharedFloat64Atomics_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderSharedFloat64AtomicAdd_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderImageFloat32Atomics_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderImageFloat32AtomicAdd_ = {}, VULKAN_HPP_NAMESPACE::Bool32 sparseImageFloat32Atomics_ = {}, VULKAN_HPP_NAMESPACE::Bool32 sparseImageFloat32AtomicAdd_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , shaderBufferFloat32Atomics{ shaderBufferFloat32Atomics_ } , shaderBufferFloat32AtomicAdd{ shaderBufferFloat32AtomicAdd_ } , shaderBufferFloat64Atomics{ shaderBufferFloat64Atomics_ } , shaderBufferFloat64AtomicAdd{ shaderBufferFloat64AtomicAdd_ } , shaderSharedFloat32Atomics{ shaderSharedFloat32Atomics_ } , shaderSharedFloat32AtomicAdd{ shaderSharedFloat32AtomicAdd_ } , shaderSharedFloat64Atomics{ shaderSharedFloat64Atomics_ } , shaderSharedFloat64AtomicAdd{ shaderSharedFloat64AtomicAdd_ } , shaderImageFloat32Atomics{ shaderImageFloat32Atomics_ } , shaderImageFloat32AtomicAdd{ shaderImageFloat32AtomicAdd_ } , sparseImageFloat32Atomics{ sparseImageFloat32Atomics_ } , sparseImageFloat32AtomicAdd{ sparseImageFloat32AtomicAdd_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderAtomicFloatFeaturesEXT( PhysicalDeviceShaderAtomicFloatFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceShaderAtomicFloatFeaturesEXT( VkPhysicalDeviceShaderAtomicFloatFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceShaderAtomicFloatFeaturesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceShaderAtomicFloatFeaturesEXT & operator=( PhysicalDeviceShaderAtomicFloatFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceShaderAtomicFloatFeaturesEXT & operator=( VkPhysicalDeviceShaderAtomicFloatFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderAtomicFloatFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderAtomicFloatFeaturesEXT & setShaderBufferFloat32Atomics( VULKAN_HPP_NAMESPACE::Bool32 shaderBufferFloat32Atomics_ ) VULKAN_HPP_NOEXCEPT { shaderBufferFloat32Atomics = shaderBufferFloat32Atomics_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderAtomicFloatFeaturesEXT & setShaderBufferFloat32AtomicAdd( VULKAN_HPP_NAMESPACE::Bool32 shaderBufferFloat32AtomicAdd_ ) VULKAN_HPP_NOEXCEPT { shaderBufferFloat32AtomicAdd = shaderBufferFloat32AtomicAdd_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderAtomicFloatFeaturesEXT & setShaderBufferFloat64Atomics( VULKAN_HPP_NAMESPACE::Bool32 shaderBufferFloat64Atomics_ ) VULKAN_HPP_NOEXCEPT { shaderBufferFloat64Atomics = shaderBufferFloat64Atomics_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderAtomicFloatFeaturesEXT & setShaderBufferFloat64AtomicAdd( VULKAN_HPP_NAMESPACE::Bool32 shaderBufferFloat64AtomicAdd_ ) VULKAN_HPP_NOEXCEPT { shaderBufferFloat64AtomicAdd = shaderBufferFloat64AtomicAdd_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderAtomicFloatFeaturesEXT & setShaderSharedFloat32Atomics( VULKAN_HPP_NAMESPACE::Bool32 shaderSharedFloat32Atomics_ ) VULKAN_HPP_NOEXCEPT { shaderSharedFloat32Atomics = shaderSharedFloat32Atomics_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderAtomicFloatFeaturesEXT & setShaderSharedFloat32AtomicAdd( VULKAN_HPP_NAMESPACE::Bool32 shaderSharedFloat32AtomicAdd_ ) VULKAN_HPP_NOEXCEPT { shaderSharedFloat32AtomicAdd = shaderSharedFloat32AtomicAdd_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderAtomicFloatFeaturesEXT & setShaderSharedFloat64Atomics( VULKAN_HPP_NAMESPACE::Bool32 shaderSharedFloat64Atomics_ ) VULKAN_HPP_NOEXCEPT { shaderSharedFloat64Atomics = shaderSharedFloat64Atomics_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderAtomicFloatFeaturesEXT & setShaderSharedFloat64AtomicAdd( VULKAN_HPP_NAMESPACE::Bool32 shaderSharedFloat64AtomicAdd_ ) VULKAN_HPP_NOEXCEPT { shaderSharedFloat64AtomicAdd = shaderSharedFloat64AtomicAdd_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderAtomicFloatFeaturesEXT & setShaderImageFloat32Atomics( VULKAN_HPP_NAMESPACE::Bool32 shaderImageFloat32Atomics_ ) VULKAN_HPP_NOEXCEPT { shaderImageFloat32Atomics = shaderImageFloat32Atomics_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderAtomicFloatFeaturesEXT & setShaderImageFloat32AtomicAdd( VULKAN_HPP_NAMESPACE::Bool32 shaderImageFloat32AtomicAdd_ ) VULKAN_HPP_NOEXCEPT { shaderImageFloat32AtomicAdd = shaderImageFloat32AtomicAdd_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderAtomicFloatFeaturesEXT & setSparseImageFloat32Atomics( VULKAN_HPP_NAMESPACE::Bool32 sparseImageFloat32Atomics_ ) VULKAN_HPP_NOEXCEPT { sparseImageFloat32Atomics = sparseImageFloat32Atomics_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderAtomicFloatFeaturesEXT & setSparseImageFloat32AtomicAdd( VULKAN_HPP_NAMESPACE::Bool32 sparseImageFloat32AtomicAdd_ ) VULKAN_HPP_NOEXCEPT { sparseImageFloat32AtomicAdd = sparseImageFloat32AtomicAdd_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceShaderAtomicFloatFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceShaderAtomicFloatFeaturesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, shaderBufferFloat32Atomics, shaderBufferFloat32AtomicAdd, shaderBufferFloat64Atomics, shaderBufferFloat64AtomicAdd, shaderSharedFloat32Atomics, shaderSharedFloat32AtomicAdd, shaderSharedFloat64Atomics, shaderSharedFloat64AtomicAdd, shaderImageFloat32Atomics, shaderImageFloat32AtomicAdd, sparseImageFloat32Atomics, sparseImageFloat32AtomicAdd ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceShaderAtomicFloatFeaturesEXT const & ) const = default; #else bool operator==( PhysicalDeviceShaderAtomicFloatFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( shaderBufferFloat32Atomics == rhs.shaderBufferFloat32Atomics ) && ( shaderBufferFloat32AtomicAdd == rhs.shaderBufferFloat32AtomicAdd ) && ( shaderBufferFloat64Atomics == rhs.shaderBufferFloat64Atomics ) && ( shaderBufferFloat64AtomicAdd == rhs.shaderBufferFloat64AtomicAdd ) && ( shaderSharedFloat32Atomics == rhs.shaderSharedFloat32Atomics ) && ( shaderSharedFloat32AtomicAdd == rhs.shaderSharedFloat32AtomicAdd ) && ( shaderSharedFloat64Atomics == rhs.shaderSharedFloat64Atomics ) && ( shaderSharedFloat64AtomicAdd == rhs.shaderSharedFloat64AtomicAdd ) && ( shaderImageFloat32Atomics == rhs.shaderImageFloat32Atomics ) && ( shaderImageFloat32AtomicAdd == rhs.shaderImageFloat32AtomicAdd ) && ( sparseImageFloat32Atomics == rhs.sparseImageFloat32Atomics ) && ( sparseImageFloat32AtomicAdd == rhs.sparseImageFloat32AtomicAdd ); # endif } bool operator!=( PhysicalDeviceShaderAtomicFloatFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceShaderAtomicFloatFeaturesEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderBufferFloat32Atomics = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderBufferFloat32AtomicAdd = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderBufferFloat64Atomics = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderBufferFloat64AtomicAdd = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderSharedFloat32Atomics = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderSharedFloat32AtomicAdd = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderSharedFloat64Atomics = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderSharedFloat64AtomicAdd = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderImageFloat32Atomics = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderImageFloat32AtomicAdd = {}; VULKAN_HPP_NAMESPACE::Bool32 sparseImageFloat32Atomics = {}; VULKAN_HPP_NAMESPACE::Bool32 sparseImageFloat32AtomicAdd = {}; }; template <> struct CppType { using Type = PhysicalDeviceShaderAtomicFloatFeaturesEXT; }; struct PhysicalDeviceShaderAtomicInt64Features { using NativeType = VkPhysicalDeviceShaderAtomicInt64Features; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceShaderAtomicInt64Features; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderAtomicInt64Features( VULKAN_HPP_NAMESPACE::Bool32 shaderBufferInt64Atomics_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderSharedInt64Atomics_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , shaderBufferInt64Atomics{ shaderBufferInt64Atomics_ } , shaderSharedInt64Atomics{ shaderSharedInt64Atomics_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderAtomicInt64Features( PhysicalDeviceShaderAtomicInt64Features const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceShaderAtomicInt64Features( VkPhysicalDeviceShaderAtomicInt64Features const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceShaderAtomicInt64Features( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceShaderAtomicInt64Features & operator=( PhysicalDeviceShaderAtomicInt64Features const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceShaderAtomicInt64Features & operator=( VkPhysicalDeviceShaderAtomicInt64Features const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderAtomicInt64Features & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderAtomicInt64Features & setShaderBufferInt64Atomics( VULKAN_HPP_NAMESPACE::Bool32 shaderBufferInt64Atomics_ ) VULKAN_HPP_NOEXCEPT { shaderBufferInt64Atomics = shaderBufferInt64Atomics_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderAtomicInt64Features & setShaderSharedInt64Atomics( VULKAN_HPP_NAMESPACE::Bool32 shaderSharedInt64Atomics_ ) VULKAN_HPP_NOEXCEPT { shaderSharedInt64Atomics = shaderSharedInt64Atomics_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceShaderAtomicInt64Features const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceShaderAtomicInt64Features &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, shaderBufferInt64Atomics, shaderSharedInt64Atomics ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceShaderAtomicInt64Features const & ) const = default; #else bool operator==( PhysicalDeviceShaderAtomicInt64Features const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( shaderBufferInt64Atomics == rhs.shaderBufferInt64Atomics ) && ( shaderSharedInt64Atomics == rhs.shaderSharedInt64Atomics ); # endif } bool operator!=( PhysicalDeviceShaderAtomicInt64Features const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceShaderAtomicInt64Features; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderBufferInt64Atomics = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderSharedInt64Atomics = {}; }; template <> struct CppType { using Type = PhysicalDeviceShaderAtomicInt64Features; }; using PhysicalDeviceShaderAtomicInt64FeaturesKHR = PhysicalDeviceShaderAtomicInt64Features; struct PhysicalDeviceShaderClockFeaturesKHR { using NativeType = VkPhysicalDeviceShaderClockFeaturesKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceShaderClockFeaturesKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderClockFeaturesKHR( VULKAN_HPP_NAMESPACE::Bool32 shaderSubgroupClock_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderDeviceClock_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , shaderSubgroupClock{ shaderSubgroupClock_ } , shaderDeviceClock{ shaderDeviceClock_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderClockFeaturesKHR( PhysicalDeviceShaderClockFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceShaderClockFeaturesKHR( VkPhysicalDeviceShaderClockFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceShaderClockFeaturesKHR( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceShaderClockFeaturesKHR & operator=( PhysicalDeviceShaderClockFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceShaderClockFeaturesKHR & operator=( VkPhysicalDeviceShaderClockFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderClockFeaturesKHR & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderClockFeaturesKHR & setShaderSubgroupClock( VULKAN_HPP_NAMESPACE::Bool32 shaderSubgroupClock_ ) VULKAN_HPP_NOEXCEPT { shaderSubgroupClock = shaderSubgroupClock_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderClockFeaturesKHR & setShaderDeviceClock( VULKAN_HPP_NAMESPACE::Bool32 shaderDeviceClock_ ) VULKAN_HPP_NOEXCEPT { shaderDeviceClock = shaderDeviceClock_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceShaderClockFeaturesKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceShaderClockFeaturesKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, shaderSubgroupClock, shaderDeviceClock ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceShaderClockFeaturesKHR const & ) const = default; #else bool operator==( PhysicalDeviceShaderClockFeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( shaderSubgroupClock == rhs.shaderSubgroupClock ) && ( shaderDeviceClock == rhs.shaderDeviceClock ); # endif } bool operator!=( PhysicalDeviceShaderClockFeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceShaderClockFeaturesKHR; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderSubgroupClock = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderDeviceClock = {}; }; template <> struct CppType { using Type = PhysicalDeviceShaderClockFeaturesKHR; }; struct PhysicalDeviceShaderCoreBuiltinsFeaturesARM { using NativeType = VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceShaderCoreBuiltinsFeaturesARM; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderCoreBuiltinsFeaturesARM( VULKAN_HPP_NAMESPACE::Bool32 shaderCoreBuiltins_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , shaderCoreBuiltins{ shaderCoreBuiltins_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderCoreBuiltinsFeaturesARM( PhysicalDeviceShaderCoreBuiltinsFeaturesARM const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceShaderCoreBuiltinsFeaturesARM( VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceShaderCoreBuiltinsFeaturesARM( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceShaderCoreBuiltinsFeaturesARM & operator=( PhysicalDeviceShaderCoreBuiltinsFeaturesARM const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceShaderCoreBuiltinsFeaturesARM & operator=( VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderCoreBuiltinsFeaturesARM & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderCoreBuiltinsFeaturesARM & setShaderCoreBuiltins( VULKAN_HPP_NAMESPACE::Bool32 shaderCoreBuiltins_ ) VULKAN_HPP_NOEXCEPT { shaderCoreBuiltins = shaderCoreBuiltins_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, shaderCoreBuiltins ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceShaderCoreBuiltinsFeaturesARM const & ) const = default; #else bool operator==( PhysicalDeviceShaderCoreBuiltinsFeaturesARM const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( shaderCoreBuiltins == rhs.shaderCoreBuiltins ); # endif } bool operator!=( PhysicalDeviceShaderCoreBuiltinsFeaturesARM const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceShaderCoreBuiltinsFeaturesARM; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderCoreBuiltins = {}; }; template <> struct CppType { using Type = PhysicalDeviceShaderCoreBuiltinsFeaturesARM; }; struct PhysicalDeviceShaderCoreBuiltinsPropertiesARM { using NativeType = VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceShaderCoreBuiltinsPropertiesARM; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderCoreBuiltinsPropertiesARM( uint64_t shaderCoreMask_ = {}, uint32_t shaderCoreCount_ = {}, uint32_t shaderWarpsPerCore_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , shaderCoreMask{ shaderCoreMask_ } , shaderCoreCount{ shaderCoreCount_ } , shaderWarpsPerCore{ shaderWarpsPerCore_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderCoreBuiltinsPropertiesARM( PhysicalDeviceShaderCoreBuiltinsPropertiesARM const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceShaderCoreBuiltinsPropertiesARM( VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceShaderCoreBuiltinsPropertiesARM( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceShaderCoreBuiltinsPropertiesARM & operator=( PhysicalDeviceShaderCoreBuiltinsPropertiesARM const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceShaderCoreBuiltinsPropertiesARM & operator=( VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, shaderCoreMask, shaderCoreCount, shaderWarpsPerCore ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceShaderCoreBuiltinsPropertiesARM const & ) const = default; #else bool operator==( PhysicalDeviceShaderCoreBuiltinsPropertiesARM const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( shaderCoreMask == rhs.shaderCoreMask ) && ( shaderCoreCount == rhs.shaderCoreCount ) && ( shaderWarpsPerCore == rhs.shaderWarpsPerCore ); # endif } bool operator!=( PhysicalDeviceShaderCoreBuiltinsPropertiesARM const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceShaderCoreBuiltinsPropertiesARM; void * pNext = {}; uint64_t shaderCoreMask = {}; uint32_t shaderCoreCount = {}; uint32_t shaderWarpsPerCore = {}; }; template <> struct CppType { using Type = PhysicalDeviceShaderCoreBuiltinsPropertiesARM; }; struct PhysicalDeviceShaderCoreProperties2AMD { using NativeType = VkPhysicalDeviceShaderCoreProperties2AMD; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceShaderCoreProperties2AMD; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderCoreProperties2AMD( VULKAN_HPP_NAMESPACE::ShaderCorePropertiesFlagsAMD shaderCoreFeatures_ = {}, uint32_t activeComputeUnitCount_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , shaderCoreFeatures{ shaderCoreFeatures_ } , activeComputeUnitCount{ activeComputeUnitCount_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderCoreProperties2AMD( PhysicalDeviceShaderCoreProperties2AMD const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceShaderCoreProperties2AMD( VkPhysicalDeviceShaderCoreProperties2AMD const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceShaderCoreProperties2AMD( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceShaderCoreProperties2AMD & operator=( PhysicalDeviceShaderCoreProperties2AMD const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceShaderCoreProperties2AMD & operator=( VkPhysicalDeviceShaderCoreProperties2AMD const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceShaderCoreProperties2AMD const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceShaderCoreProperties2AMD &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, shaderCoreFeatures, activeComputeUnitCount ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceShaderCoreProperties2AMD const & ) const = default; #else bool operator==( PhysicalDeviceShaderCoreProperties2AMD const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( shaderCoreFeatures == rhs.shaderCoreFeatures ) && ( activeComputeUnitCount == rhs.activeComputeUnitCount ); # endif } bool operator!=( PhysicalDeviceShaderCoreProperties2AMD const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceShaderCoreProperties2AMD; void * pNext = {}; VULKAN_HPP_NAMESPACE::ShaderCorePropertiesFlagsAMD shaderCoreFeatures = {}; uint32_t activeComputeUnitCount = {}; }; template <> struct CppType { using Type = PhysicalDeviceShaderCoreProperties2AMD; }; struct PhysicalDeviceShaderCorePropertiesAMD { using NativeType = VkPhysicalDeviceShaderCorePropertiesAMD; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceShaderCorePropertiesAMD; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderCorePropertiesAMD( uint32_t shaderEngineCount_ = {}, uint32_t shaderArraysPerEngineCount_ = {}, uint32_t computeUnitsPerShaderArray_ = {}, uint32_t simdPerComputeUnit_ = {}, uint32_t wavefrontsPerSimd_ = {}, uint32_t wavefrontSize_ = {}, uint32_t sgprsPerSimd_ = {}, uint32_t minSgprAllocation_ = {}, uint32_t maxSgprAllocation_ = {}, uint32_t sgprAllocationGranularity_ = {}, uint32_t vgprsPerSimd_ = {}, uint32_t minVgprAllocation_ = {}, uint32_t maxVgprAllocation_ = {}, uint32_t vgprAllocationGranularity_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , shaderEngineCount{ shaderEngineCount_ } , shaderArraysPerEngineCount{ shaderArraysPerEngineCount_ } , computeUnitsPerShaderArray{ computeUnitsPerShaderArray_ } , simdPerComputeUnit{ simdPerComputeUnit_ } , wavefrontsPerSimd{ wavefrontsPerSimd_ } , wavefrontSize{ wavefrontSize_ } , sgprsPerSimd{ sgprsPerSimd_ } , minSgprAllocation{ minSgprAllocation_ } , maxSgprAllocation{ maxSgprAllocation_ } , sgprAllocationGranularity{ sgprAllocationGranularity_ } , vgprsPerSimd{ vgprsPerSimd_ } , minVgprAllocation{ minVgprAllocation_ } , maxVgprAllocation{ maxVgprAllocation_ } , vgprAllocationGranularity{ vgprAllocationGranularity_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderCorePropertiesAMD( PhysicalDeviceShaderCorePropertiesAMD const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceShaderCorePropertiesAMD( VkPhysicalDeviceShaderCorePropertiesAMD const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceShaderCorePropertiesAMD( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceShaderCorePropertiesAMD & operator=( PhysicalDeviceShaderCorePropertiesAMD const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceShaderCorePropertiesAMD & operator=( VkPhysicalDeviceShaderCorePropertiesAMD const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceShaderCorePropertiesAMD const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceShaderCorePropertiesAMD &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, shaderEngineCount, shaderArraysPerEngineCount, computeUnitsPerShaderArray, simdPerComputeUnit, wavefrontsPerSimd, wavefrontSize, sgprsPerSimd, minSgprAllocation, maxSgprAllocation, sgprAllocationGranularity, vgprsPerSimd, minVgprAllocation, maxVgprAllocation, vgprAllocationGranularity ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceShaderCorePropertiesAMD const & ) const = default; #else bool operator==( PhysicalDeviceShaderCorePropertiesAMD const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( shaderEngineCount == rhs.shaderEngineCount ) && ( shaderArraysPerEngineCount == rhs.shaderArraysPerEngineCount ) && ( computeUnitsPerShaderArray == rhs.computeUnitsPerShaderArray ) && ( simdPerComputeUnit == rhs.simdPerComputeUnit ) && ( wavefrontsPerSimd == rhs.wavefrontsPerSimd ) && ( wavefrontSize == rhs.wavefrontSize ) && ( sgprsPerSimd == rhs.sgprsPerSimd ) && ( minSgprAllocation == rhs.minSgprAllocation ) && ( maxSgprAllocation == rhs.maxSgprAllocation ) && ( sgprAllocationGranularity == rhs.sgprAllocationGranularity ) && ( vgprsPerSimd == rhs.vgprsPerSimd ) && ( minVgprAllocation == rhs.minVgprAllocation ) && ( maxVgprAllocation == rhs.maxVgprAllocation ) && ( vgprAllocationGranularity == rhs.vgprAllocationGranularity ); # endif } bool operator!=( PhysicalDeviceShaderCorePropertiesAMD const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceShaderCorePropertiesAMD; void * pNext = {}; uint32_t shaderEngineCount = {}; uint32_t shaderArraysPerEngineCount = {}; uint32_t computeUnitsPerShaderArray = {}; uint32_t simdPerComputeUnit = {}; uint32_t wavefrontsPerSimd = {}; uint32_t wavefrontSize = {}; uint32_t sgprsPerSimd = {}; uint32_t minSgprAllocation = {}; uint32_t maxSgprAllocation = {}; uint32_t sgprAllocationGranularity = {}; uint32_t vgprsPerSimd = {}; uint32_t minVgprAllocation = {}; uint32_t maxVgprAllocation = {}; uint32_t vgprAllocationGranularity = {}; }; template <> struct CppType { using Type = PhysicalDeviceShaderCorePropertiesAMD; }; struct PhysicalDeviceShaderCorePropertiesARM { using NativeType = VkPhysicalDeviceShaderCorePropertiesARM; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceShaderCorePropertiesARM; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderCorePropertiesARM( uint32_t pixelRate_ = {}, uint32_t texelRate_ = {}, uint32_t fmaRate_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , pixelRate{ pixelRate_ } , texelRate{ texelRate_ } , fmaRate{ fmaRate_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderCorePropertiesARM( PhysicalDeviceShaderCorePropertiesARM const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceShaderCorePropertiesARM( VkPhysicalDeviceShaderCorePropertiesARM const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceShaderCorePropertiesARM( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceShaderCorePropertiesARM & operator=( PhysicalDeviceShaderCorePropertiesARM const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceShaderCorePropertiesARM & operator=( VkPhysicalDeviceShaderCorePropertiesARM const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceShaderCorePropertiesARM const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceShaderCorePropertiesARM &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, pixelRate, texelRate, fmaRate ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceShaderCorePropertiesARM const & ) const = default; #else bool operator==( PhysicalDeviceShaderCorePropertiesARM const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( pixelRate == rhs.pixelRate ) && ( texelRate == rhs.texelRate ) && ( fmaRate == rhs.fmaRate ); # endif } bool operator!=( PhysicalDeviceShaderCorePropertiesARM const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceShaderCorePropertiesARM; void * pNext = {}; uint32_t pixelRate = {}; uint32_t texelRate = {}; uint32_t fmaRate = {}; }; template <> struct CppType { using Type = PhysicalDeviceShaderCorePropertiesARM; }; struct PhysicalDeviceShaderDemoteToHelperInvocationFeatures { using NativeType = VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceShaderDemoteToHelperInvocationFeatures; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderDemoteToHelperInvocationFeatures( VULKAN_HPP_NAMESPACE::Bool32 shaderDemoteToHelperInvocation_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , shaderDemoteToHelperInvocation{ shaderDemoteToHelperInvocation_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderDemoteToHelperInvocationFeatures( PhysicalDeviceShaderDemoteToHelperInvocationFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceShaderDemoteToHelperInvocationFeatures( VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceShaderDemoteToHelperInvocationFeatures( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceShaderDemoteToHelperInvocationFeatures & operator=( PhysicalDeviceShaderDemoteToHelperInvocationFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceShaderDemoteToHelperInvocationFeatures & operator=( VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderDemoteToHelperInvocationFeatures & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderDemoteToHelperInvocationFeatures & setShaderDemoteToHelperInvocation( VULKAN_HPP_NAMESPACE::Bool32 shaderDemoteToHelperInvocation_ ) VULKAN_HPP_NOEXCEPT { shaderDemoteToHelperInvocation = shaderDemoteToHelperInvocation_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, shaderDemoteToHelperInvocation ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceShaderDemoteToHelperInvocationFeatures const & ) const = default; #else bool operator==( PhysicalDeviceShaderDemoteToHelperInvocationFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( shaderDemoteToHelperInvocation == rhs.shaderDemoteToHelperInvocation ); # endif } bool operator!=( PhysicalDeviceShaderDemoteToHelperInvocationFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceShaderDemoteToHelperInvocationFeatures; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderDemoteToHelperInvocation = {}; }; template <> struct CppType { using Type = PhysicalDeviceShaderDemoteToHelperInvocationFeatures; }; using PhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT = PhysicalDeviceShaderDemoteToHelperInvocationFeatures; struct PhysicalDeviceShaderDrawParametersFeatures { using NativeType = VkPhysicalDeviceShaderDrawParametersFeatures; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceShaderDrawParametersFeatures; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderDrawParametersFeatures( VULKAN_HPP_NAMESPACE::Bool32 shaderDrawParameters_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , shaderDrawParameters{ shaderDrawParameters_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderDrawParametersFeatures( PhysicalDeviceShaderDrawParametersFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceShaderDrawParametersFeatures( VkPhysicalDeviceShaderDrawParametersFeatures const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceShaderDrawParametersFeatures( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceShaderDrawParametersFeatures & operator=( PhysicalDeviceShaderDrawParametersFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceShaderDrawParametersFeatures & operator=( VkPhysicalDeviceShaderDrawParametersFeatures const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderDrawParametersFeatures & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderDrawParametersFeatures & setShaderDrawParameters( VULKAN_HPP_NAMESPACE::Bool32 shaderDrawParameters_ ) VULKAN_HPP_NOEXCEPT { shaderDrawParameters = shaderDrawParameters_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceShaderDrawParametersFeatures const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceShaderDrawParametersFeatures &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, shaderDrawParameters ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceShaderDrawParametersFeatures const & ) const = default; #else bool operator==( PhysicalDeviceShaderDrawParametersFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( shaderDrawParameters == rhs.shaderDrawParameters ); # endif } bool operator!=( PhysicalDeviceShaderDrawParametersFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceShaderDrawParametersFeatures; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderDrawParameters = {}; }; template <> struct CppType { using Type = PhysicalDeviceShaderDrawParametersFeatures; }; using PhysicalDeviceShaderDrawParameterFeatures = PhysicalDeviceShaderDrawParametersFeatures; struct PhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD { using NativeType = VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD( VULKAN_HPP_NAMESPACE::Bool32 shaderEarlyAndLateFragmentTests_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , shaderEarlyAndLateFragmentTests{ shaderEarlyAndLateFragmentTests_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD( PhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD( VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD & operator=( PhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD & operator=( VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD & setShaderEarlyAndLateFragmentTests( VULKAN_HPP_NAMESPACE::Bool32 shaderEarlyAndLateFragmentTests_ ) VULKAN_HPP_NOEXCEPT { shaderEarlyAndLateFragmentTests = shaderEarlyAndLateFragmentTests_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, shaderEarlyAndLateFragmentTests ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD const & ) const = default; #else bool operator==( PhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( shaderEarlyAndLateFragmentTests == rhs.shaderEarlyAndLateFragmentTests ); # endif } bool operator!=( PhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderEarlyAndLateFragmentTests = {}; }; template <> struct CppType { using Type = PhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD; }; #if defined( VK_ENABLE_BETA_EXTENSIONS ) struct PhysicalDeviceShaderEnqueueFeaturesAMDX { using NativeType = VkPhysicalDeviceShaderEnqueueFeaturesAMDX; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceShaderEnqueueFeaturesAMDX; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderEnqueueFeaturesAMDX( VULKAN_HPP_NAMESPACE::Bool32 shaderEnqueue_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderMeshEnqueue_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , shaderEnqueue{ shaderEnqueue_ } , shaderMeshEnqueue{ shaderMeshEnqueue_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderEnqueueFeaturesAMDX( PhysicalDeviceShaderEnqueueFeaturesAMDX const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceShaderEnqueueFeaturesAMDX( VkPhysicalDeviceShaderEnqueueFeaturesAMDX const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceShaderEnqueueFeaturesAMDX( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceShaderEnqueueFeaturesAMDX & operator=( PhysicalDeviceShaderEnqueueFeaturesAMDX const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceShaderEnqueueFeaturesAMDX & operator=( VkPhysicalDeviceShaderEnqueueFeaturesAMDX const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } # if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderEnqueueFeaturesAMDX & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderEnqueueFeaturesAMDX & setShaderEnqueue( VULKAN_HPP_NAMESPACE::Bool32 shaderEnqueue_ ) VULKAN_HPP_NOEXCEPT { shaderEnqueue = shaderEnqueue_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderEnqueueFeaturesAMDX & setShaderMeshEnqueue( VULKAN_HPP_NAMESPACE::Bool32 shaderMeshEnqueue_ ) VULKAN_HPP_NOEXCEPT { shaderMeshEnqueue = shaderMeshEnqueue_; return *this; } # endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceShaderEnqueueFeaturesAMDX const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceShaderEnqueueFeaturesAMDX &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, shaderEnqueue, shaderMeshEnqueue ); } # endif # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceShaderEnqueueFeaturesAMDX const & ) const = default; # else bool operator==( PhysicalDeviceShaderEnqueueFeaturesAMDX const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( shaderEnqueue == rhs.shaderEnqueue ) && ( shaderMeshEnqueue == rhs.shaderMeshEnqueue ); # endif } bool operator!=( PhysicalDeviceShaderEnqueueFeaturesAMDX const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } # endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceShaderEnqueueFeaturesAMDX; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderEnqueue = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderMeshEnqueue = {}; }; template <> struct CppType { using Type = PhysicalDeviceShaderEnqueueFeaturesAMDX; }; #endif /*VK_ENABLE_BETA_EXTENSIONS*/ #if defined( VK_ENABLE_BETA_EXTENSIONS ) struct PhysicalDeviceShaderEnqueuePropertiesAMDX { using NativeType = VkPhysicalDeviceShaderEnqueuePropertiesAMDX; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceShaderEnqueuePropertiesAMDX; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderEnqueuePropertiesAMDX( uint32_t maxExecutionGraphDepth_ = {}, uint32_t maxExecutionGraphShaderOutputNodes_ = {}, uint32_t maxExecutionGraphShaderPayloadSize_ = {}, uint32_t maxExecutionGraphShaderPayloadCount_ = {}, uint32_t executionGraphDispatchAddressAlignment_ = {}, std::array const & maxExecutionGraphWorkgroupCount_ = {}, uint32_t maxExecutionGraphWorkgroups_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , maxExecutionGraphDepth{ maxExecutionGraphDepth_ } , maxExecutionGraphShaderOutputNodes{ maxExecutionGraphShaderOutputNodes_ } , maxExecutionGraphShaderPayloadSize{ maxExecutionGraphShaderPayloadSize_ } , maxExecutionGraphShaderPayloadCount{ maxExecutionGraphShaderPayloadCount_ } , executionGraphDispatchAddressAlignment{ executionGraphDispatchAddressAlignment_ } , maxExecutionGraphWorkgroupCount{ maxExecutionGraphWorkgroupCount_ } , maxExecutionGraphWorkgroups{ maxExecutionGraphWorkgroups_ } { } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderEnqueuePropertiesAMDX( PhysicalDeviceShaderEnqueuePropertiesAMDX const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceShaderEnqueuePropertiesAMDX( VkPhysicalDeviceShaderEnqueuePropertiesAMDX const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceShaderEnqueuePropertiesAMDX( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceShaderEnqueuePropertiesAMDX & operator=( PhysicalDeviceShaderEnqueuePropertiesAMDX const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceShaderEnqueuePropertiesAMDX & operator=( VkPhysicalDeviceShaderEnqueuePropertiesAMDX const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } # if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderEnqueuePropertiesAMDX & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderEnqueuePropertiesAMDX & setMaxExecutionGraphDepth( uint32_t maxExecutionGraphDepth_ ) VULKAN_HPP_NOEXCEPT { maxExecutionGraphDepth = maxExecutionGraphDepth_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderEnqueuePropertiesAMDX & setMaxExecutionGraphShaderOutputNodes( uint32_t maxExecutionGraphShaderOutputNodes_ ) VULKAN_HPP_NOEXCEPT { maxExecutionGraphShaderOutputNodes = maxExecutionGraphShaderOutputNodes_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderEnqueuePropertiesAMDX & setMaxExecutionGraphShaderPayloadSize( uint32_t maxExecutionGraphShaderPayloadSize_ ) VULKAN_HPP_NOEXCEPT { maxExecutionGraphShaderPayloadSize = maxExecutionGraphShaderPayloadSize_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderEnqueuePropertiesAMDX & setMaxExecutionGraphShaderPayloadCount( uint32_t maxExecutionGraphShaderPayloadCount_ ) VULKAN_HPP_NOEXCEPT { maxExecutionGraphShaderPayloadCount = maxExecutionGraphShaderPayloadCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderEnqueuePropertiesAMDX & setExecutionGraphDispatchAddressAlignment( uint32_t executionGraphDispatchAddressAlignment_ ) VULKAN_HPP_NOEXCEPT { executionGraphDispatchAddressAlignment = executionGraphDispatchAddressAlignment_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderEnqueuePropertiesAMDX & setMaxExecutionGraphWorkgroupCount( std::array maxExecutionGraphWorkgroupCount_ ) VULKAN_HPP_NOEXCEPT { maxExecutionGraphWorkgroupCount = maxExecutionGraphWorkgroupCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderEnqueuePropertiesAMDX & setMaxExecutionGraphWorkgroups( uint32_t maxExecutionGraphWorkgroups_ ) VULKAN_HPP_NOEXCEPT { maxExecutionGraphWorkgroups = maxExecutionGraphWorkgroups_; return *this; } # endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceShaderEnqueuePropertiesAMDX const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceShaderEnqueuePropertiesAMDX &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple const &, uint32_t const &> # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, maxExecutionGraphDepth, maxExecutionGraphShaderOutputNodes, maxExecutionGraphShaderPayloadSize, maxExecutionGraphShaderPayloadCount, executionGraphDispatchAddressAlignment, maxExecutionGraphWorkgroupCount, maxExecutionGraphWorkgroups ); } # endif # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceShaderEnqueuePropertiesAMDX const & ) const = default; # else bool operator==( PhysicalDeviceShaderEnqueuePropertiesAMDX const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( maxExecutionGraphDepth == rhs.maxExecutionGraphDepth ) && ( maxExecutionGraphShaderOutputNodes == rhs.maxExecutionGraphShaderOutputNodes ) && ( maxExecutionGraphShaderPayloadSize == rhs.maxExecutionGraphShaderPayloadSize ) && ( maxExecutionGraphShaderPayloadCount == rhs.maxExecutionGraphShaderPayloadCount ) && ( executionGraphDispatchAddressAlignment == rhs.executionGraphDispatchAddressAlignment ) && ( maxExecutionGraphWorkgroupCount == rhs.maxExecutionGraphWorkgroupCount ) && ( maxExecutionGraphWorkgroups == rhs.maxExecutionGraphWorkgroups ); # endif } bool operator!=( PhysicalDeviceShaderEnqueuePropertiesAMDX const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } # endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceShaderEnqueuePropertiesAMDX; void * pNext = {}; uint32_t maxExecutionGraphDepth = {}; uint32_t maxExecutionGraphShaderOutputNodes = {}; uint32_t maxExecutionGraphShaderPayloadSize = {}; uint32_t maxExecutionGraphShaderPayloadCount = {}; uint32_t executionGraphDispatchAddressAlignment = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D maxExecutionGraphWorkgroupCount = {}; uint32_t maxExecutionGraphWorkgroups = {}; }; template <> struct CppType { using Type = PhysicalDeviceShaderEnqueuePropertiesAMDX; }; #endif /*VK_ENABLE_BETA_EXTENSIONS*/ struct PhysicalDeviceShaderExpectAssumeFeatures { using NativeType = VkPhysicalDeviceShaderExpectAssumeFeatures; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceShaderExpectAssumeFeatures; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderExpectAssumeFeatures( VULKAN_HPP_NAMESPACE::Bool32 shaderExpectAssume_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , shaderExpectAssume{ shaderExpectAssume_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderExpectAssumeFeatures( PhysicalDeviceShaderExpectAssumeFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceShaderExpectAssumeFeatures( VkPhysicalDeviceShaderExpectAssumeFeatures const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceShaderExpectAssumeFeatures( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceShaderExpectAssumeFeatures & operator=( PhysicalDeviceShaderExpectAssumeFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceShaderExpectAssumeFeatures & operator=( VkPhysicalDeviceShaderExpectAssumeFeatures const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderExpectAssumeFeatures & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderExpectAssumeFeatures & setShaderExpectAssume( VULKAN_HPP_NAMESPACE::Bool32 shaderExpectAssume_ ) VULKAN_HPP_NOEXCEPT { shaderExpectAssume = shaderExpectAssume_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceShaderExpectAssumeFeatures const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceShaderExpectAssumeFeatures &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, shaderExpectAssume ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceShaderExpectAssumeFeatures const & ) const = default; #else bool operator==( PhysicalDeviceShaderExpectAssumeFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( shaderExpectAssume == rhs.shaderExpectAssume ); # endif } bool operator!=( PhysicalDeviceShaderExpectAssumeFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceShaderExpectAssumeFeatures; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderExpectAssume = {}; }; template <> struct CppType { using Type = PhysicalDeviceShaderExpectAssumeFeatures; }; using PhysicalDeviceShaderExpectAssumeFeaturesKHR = PhysicalDeviceShaderExpectAssumeFeatures; struct PhysicalDeviceShaderFloat16Int8Features { using NativeType = VkPhysicalDeviceShaderFloat16Int8Features; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceShaderFloat16Int8Features; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderFloat16Int8Features( VULKAN_HPP_NAMESPACE::Bool32 shaderFloat16_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderInt8_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , shaderFloat16{ shaderFloat16_ } , shaderInt8{ shaderInt8_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderFloat16Int8Features( PhysicalDeviceShaderFloat16Int8Features const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceShaderFloat16Int8Features( VkPhysicalDeviceShaderFloat16Int8Features const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceShaderFloat16Int8Features( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceShaderFloat16Int8Features & operator=( PhysicalDeviceShaderFloat16Int8Features const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceShaderFloat16Int8Features & operator=( VkPhysicalDeviceShaderFloat16Int8Features const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderFloat16Int8Features & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderFloat16Int8Features & setShaderFloat16( VULKAN_HPP_NAMESPACE::Bool32 shaderFloat16_ ) VULKAN_HPP_NOEXCEPT { shaderFloat16 = shaderFloat16_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderFloat16Int8Features & setShaderInt8( VULKAN_HPP_NAMESPACE::Bool32 shaderInt8_ ) VULKAN_HPP_NOEXCEPT { shaderInt8 = shaderInt8_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceShaderFloat16Int8Features const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceShaderFloat16Int8Features &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, shaderFloat16, shaderInt8 ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceShaderFloat16Int8Features const & ) const = default; #else bool operator==( PhysicalDeviceShaderFloat16Int8Features const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( shaderFloat16 == rhs.shaderFloat16 ) && ( shaderInt8 == rhs.shaderInt8 ); # endif } bool operator!=( PhysicalDeviceShaderFloat16Int8Features const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceShaderFloat16Int8Features; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderFloat16 = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderInt8 = {}; }; template <> struct CppType { using Type = PhysicalDeviceShaderFloat16Int8Features; }; using PhysicalDeviceFloat16Int8FeaturesKHR = PhysicalDeviceShaderFloat16Int8Features; using PhysicalDeviceShaderFloat16Int8FeaturesKHR = PhysicalDeviceShaderFloat16Int8Features; struct PhysicalDeviceShaderFloatControls2Features { using NativeType = VkPhysicalDeviceShaderFloatControls2Features; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceShaderFloatControls2Features; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderFloatControls2Features( VULKAN_HPP_NAMESPACE::Bool32 shaderFloatControls2_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , shaderFloatControls2{ shaderFloatControls2_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderFloatControls2Features( PhysicalDeviceShaderFloatControls2Features const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceShaderFloatControls2Features( VkPhysicalDeviceShaderFloatControls2Features const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceShaderFloatControls2Features( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceShaderFloatControls2Features & operator=( PhysicalDeviceShaderFloatControls2Features const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceShaderFloatControls2Features & operator=( VkPhysicalDeviceShaderFloatControls2Features const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderFloatControls2Features & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderFloatControls2Features & setShaderFloatControls2( VULKAN_HPP_NAMESPACE::Bool32 shaderFloatControls2_ ) VULKAN_HPP_NOEXCEPT { shaderFloatControls2 = shaderFloatControls2_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceShaderFloatControls2Features const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceShaderFloatControls2Features &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, shaderFloatControls2 ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceShaderFloatControls2Features const & ) const = default; #else bool operator==( PhysicalDeviceShaderFloatControls2Features const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( shaderFloatControls2 == rhs.shaderFloatControls2 ); # endif } bool operator!=( PhysicalDeviceShaderFloatControls2Features const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceShaderFloatControls2Features; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderFloatControls2 = {}; }; template <> struct CppType { using Type = PhysicalDeviceShaderFloatControls2Features; }; using PhysicalDeviceShaderFloatControls2FeaturesKHR = PhysicalDeviceShaderFloatControls2Features; struct PhysicalDeviceShaderImageAtomicInt64FeaturesEXT { using NativeType = VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceShaderImageAtomicInt64FeaturesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderImageAtomicInt64FeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 shaderImageInt64Atomics_ = {}, VULKAN_HPP_NAMESPACE::Bool32 sparseImageInt64Atomics_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , shaderImageInt64Atomics{ shaderImageInt64Atomics_ } , sparseImageInt64Atomics{ sparseImageInt64Atomics_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderImageAtomicInt64FeaturesEXT( PhysicalDeviceShaderImageAtomicInt64FeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceShaderImageAtomicInt64FeaturesEXT( VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceShaderImageAtomicInt64FeaturesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceShaderImageAtomicInt64FeaturesEXT & operator=( PhysicalDeviceShaderImageAtomicInt64FeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceShaderImageAtomicInt64FeaturesEXT & operator=( VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderImageAtomicInt64FeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderImageAtomicInt64FeaturesEXT & setShaderImageInt64Atomics( VULKAN_HPP_NAMESPACE::Bool32 shaderImageInt64Atomics_ ) VULKAN_HPP_NOEXCEPT { shaderImageInt64Atomics = shaderImageInt64Atomics_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderImageAtomicInt64FeaturesEXT & setSparseImageInt64Atomics( VULKAN_HPP_NAMESPACE::Bool32 sparseImageInt64Atomics_ ) VULKAN_HPP_NOEXCEPT { sparseImageInt64Atomics = sparseImageInt64Atomics_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, shaderImageInt64Atomics, sparseImageInt64Atomics ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceShaderImageAtomicInt64FeaturesEXT const & ) const = default; #else bool operator==( PhysicalDeviceShaderImageAtomicInt64FeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( shaderImageInt64Atomics == rhs.shaderImageInt64Atomics ) && ( sparseImageInt64Atomics == rhs.sparseImageInt64Atomics ); # endif } bool operator!=( PhysicalDeviceShaderImageAtomicInt64FeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceShaderImageAtomicInt64FeaturesEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderImageInt64Atomics = {}; VULKAN_HPP_NAMESPACE::Bool32 sparseImageInt64Atomics = {}; }; template <> struct CppType { using Type = PhysicalDeviceShaderImageAtomicInt64FeaturesEXT; }; struct PhysicalDeviceShaderImageFootprintFeaturesNV { using NativeType = VkPhysicalDeviceShaderImageFootprintFeaturesNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceShaderImageFootprintFeaturesNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderImageFootprintFeaturesNV( VULKAN_HPP_NAMESPACE::Bool32 imageFootprint_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , imageFootprint{ imageFootprint_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderImageFootprintFeaturesNV( PhysicalDeviceShaderImageFootprintFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceShaderImageFootprintFeaturesNV( VkPhysicalDeviceShaderImageFootprintFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceShaderImageFootprintFeaturesNV( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceShaderImageFootprintFeaturesNV & operator=( PhysicalDeviceShaderImageFootprintFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceShaderImageFootprintFeaturesNV & operator=( VkPhysicalDeviceShaderImageFootprintFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderImageFootprintFeaturesNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderImageFootprintFeaturesNV & setImageFootprint( VULKAN_HPP_NAMESPACE::Bool32 imageFootprint_ ) VULKAN_HPP_NOEXCEPT { imageFootprint = imageFootprint_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceShaderImageFootprintFeaturesNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceShaderImageFootprintFeaturesNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, imageFootprint ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceShaderImageFootprintFeaturesNV const & ) const = default; #else bool operator==( PhysicalDeviceShaderImageFootprintFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( imageFootprint == rhs.imageFootprint ); # endif } bool operator!=( PhysicalDeviceShaderImageFootprintFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceShaderImageFootprintFeaturesNV; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 imageFootprint = {}; }; template <> struct CppType { using Type = PhysicalDeviceShaderImageFootprintFeaturesNV; }; struct PhysicalDeviceShaderIntegerDotProductFeatures { using NativeType = VkPhysicalDeviceShaderIntegerDotProductFeatures; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceShaderIntegerDotProductFeatures; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderIntegerDotProductFeatures( VULKAN_HPP_NAMESPACE::Bool32 shaderIntegerDotProduct_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , shaderIntegerDotProduct{ shaderIntegerDotProduct_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderIntegerDotProductFeatures( PhysicalDeviceShaderIntegerDotProductFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceShaderIntegerDotProductFeatures( VkPhysicalDeviceShaderIntegerDotProductFeatures const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceShaderIntegerDotProductFeatures( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceShaderIntegerDotProductFeatures & operator=( PhysicalDeviceShaderIntegerDotProductFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceShaderIntegerDotProductFeatures & operator=( VkPhysicalDeviceShaderIntegerDotProductFeatures const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderIntegerDotProductFeatures & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderIntegerDotProductFeatures & setShaderIntegerDotProduct( VULKAN_HPP_NAMESPACE::Bool32 shaderIntegerDotProduct_ ) VULKAN_HPP_NOEXCEPT { shaderIntegerDotProduct = shaderIntegerDotProduct_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceShaderIntegerDotProductFeatures const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceShaderIntegerDotProductFeatures &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, shaderIntegerDotProduct ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceShaderIntegerDotProductFeatures const & ) const = default; #else bool operator==( PhysicalDeviceShaderIntegerDotProductFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( shaderIntegerDotProduct == rhs.shaderIntegerDotProduct ); # endif } bool operator!=( PhysicalDeviceShaderIntegerDotProductFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceShaderIntegerDotProductFeatures; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderIntegerDotProduct = {}; }; template <> struct CppType { using Type = PhysicalDeviceShaderIntegerDotProductFeatures; }; using PhysicalDeviceShaderIntegerDotProductFeaturesKHR = PhysicalDeviceShaderIntegerDotProductFeatures; struct PhysicalDeviceShaderIntegerDotProductProperties { using NativeType = VkPhysicalDeviceShaderIntegerDotProductProperties; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceShaderIntegerDotProductProperties; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderIntegerDotProductProperties( VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct8BitUnsignedAccelerated_ = {}, VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct8BitSignedAccelerated_ = {}, VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct8BitMixedSignednessAccelerated_ = {}, VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct4x8BitPackedUnsignedAccelerated_ = {}, VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct4x8BitPackedSignedAccelerated_ = {}, VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct4x8BitPackedMixedSignednessAccelerated_ = {}, VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct16BitUnsignedAccelerated_ = {}, VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct16BitSignedAccelerated_ = {}, VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct16BitMixedSignednessAccelerated_ = {}, VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct32BitUnsignedAccelerated_ = {}, VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct32BitSignedAccelerated_ = {}, VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct32BitMixedSignednessAccelerated_ = {}, VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct64BitUnsignedAccelerated_ = {}, VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct64BitSignedAccelerated_ = {}, VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct64BitMixedSignednessAccelerated_ = {}, VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating8BitUnsignedAccelerated_ = {}, VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating8BitSignedAccelerated_ = {}, VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated_ = {}, VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated_ = {}, VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated_ = {}, VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated_ = {}, VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating16BitUnsignedAccelerated_ = {}, VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating16BitSignedAccelerated_ = {}, VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated_ = {}, VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating32BitUnsignedAccelerated_ = {}, VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating32BitSignedAccelerated_ = {}, VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated_ = {}, VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating64BitUnsignedAccelerated_ = {}, VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating64BitSignedAccelerated_ = {}, VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , integerDotProduct8BitUnsignedAccelerated{ integerDotProduct8BitUnsignedAccelerated_ } , integerDotProduct8BitSignedAccelerated{ integerDotProduct8BitSignedAccelerated_ } , integerDotProduct8BitMixedSignednessAccelerated{ integerDotProduct8BitMixedSignednessAccelerated_ } , integerDotProduct4x8BitPackedUnsignedAccelerated{ integerDotProduct4x8BitPackedUnsignedAccelerated_ } , integerDotProduct4x8BitPackedSignedAccelerated{ integerDotProduct4x8BitPackedSignedAccelerated_ } , integerDotProduct4x8BitPackedMixedSignednessAccelerated{ integerDotProduct4x8BitPackedMixedSignednessAccelerated_ } , integerDotProduct16BitUnsignedAccelerated{ integerDotProduct16BitUnsignedAccelerated_ } , integerDotProduct16BitSignedAccelerated{ integerDotProduct16BitSignedAccelerated_ } , integerDotProduct16BitMixedSignednessAccelerated{ integerDotProduct16BitMixedSignednessAccelerated_ } , integerDotProduct32BitUnsignedAccelerated{ integerDotProduct32BitUnsignedAccelerated_ } , integerDotProduct32BitSignedAccelerated{ integerDotProduct32BitSignedAccelerated_ } , integerDotProduct32BitMixedSignednessAccelerated{ integerDotProduct32BitMixedSignednessAccelerated_ } , integerDotProduct64BitUnsignedAccelerated{ integerDotProduct64BitUnsignedAccelerated_ } , integerDotProduct64BitSignedAccelerated{ integerDotProduct64BitSignedAccelerated_ } , integerDotProduct64BitMixedSignednessAccelerated{ integerDotProduct64BitMixedSignednessAccelerated_ } , integerDotProductAccumulatingSaturating8BitUnsignedAccelerated{ integerDotProductAccumulatingSaturating8BitUnsignedAccelerated_ } , integerDotProductAccumulatingSaturating8BitSignedAccelerated{ integerDotProductAccumulatingSaturating8BitSignedAccelerated_ } , integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated{ integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated_ } , integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated{ integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated_ } , integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated{ integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated_ } , integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated{ integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated_ } , integerDotProductAccumulatingSaturating16BitUnsignedAccelerated{ integerDotProductAccumulatingSaturating16BitUnsignedAccelerated_ } , integerDotProductAccumulatingSaturating16BitSignedAccelerated{ integerDotProductAccumulatingSaturating16BitSignedAccelerated_ } , integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated{ integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated_ } , integerDotProductAccumulatingSaturating32BitUnsignedAccelerated{ integerDotProductAccumulatingSaturating32BitUnsignedAccelerated_ } , integerDotProductAccumulatingSaturating32BitSignedAccelerated{ integerDotProductAccumulatingSaturating32BitSignedAccelerated_ } , integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated{ integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated_ } , integerDotProductAccumulatingSaturating64BitUnsignedAccelerated{ integerDotProductAccumulatingSaturating64BitUnsignedAccelerated_ } , integerDotProductAccumulatingSaturating64BitSignedAccelerated{ integerDotProductAccumulatingSaturating64BitSignedAccelerated_ } , integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated{ integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderIntegerDotProductProperties( PhysicalDeviceShaderIntegerDotProductProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceShaderIntegerDotProductProperties( VkPhysicalDeviceShaderIntegerDotProductProperties const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceShaderIntegerDotProductProperties( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceShaderIntegerDotProductProperties & operator=( PhysicalDeviceShaderIntegerDotProductProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceShaderIntegerDotProductProperties & operator=( VkPhysicalDeviceShaderIntegerDotProductProperties const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceShaderIntegerDotProductProperties const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceShaderIntegerDotProductProperties &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, integerDotProduct8BitUnsignedAccelerated, integerDotProduct8BitSignedAccelerated, integerDotProduct8BitMixedSignednessAccelerated, integerDotProduct4x8BitPackedUnsignedAccelerated, integerDotProduct4x8BitPackedSignedAccelerated, integerDotProduct4x8BitPackedMixedSignednessAccelerated, integerDotProduct16BitUnsignedAccelerated, integerDotProduct16BitSignedAccelerated, integerDotProduct16BitMixedSignednessAccelerated, integerDotProduct32BitUnsignedAccelerated, integerDotProduct32BitSignedAccelerated, integerDotProduct32BitMixedSignednessAccelerated, integerDotProduct64BitUnsignedAccelerated, integerDotProduct64BitSignedAccelerated, integerDotProduct64BitMixedSignednessAccelerated, integerDotProductAccumulatingSaturating8BitUnsignedAccelerated, integerDotProductAccumulatingSaturating8BitSignedAccelerated, integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated, integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated, integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated, integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated, integerDotProductAccumulatingSaturating16BitUnsignedAccelerated, integerDotProductAccumulatingSaturating16BitSignedAccelerated, integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated, integerDotProductAccumulatingSaturating32BitUnsignedAccelerated, integerDotProductAccumulatingSaturating32BitSignedAccelerated, integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated, integerDotProductAccumulatingSaturating64BitUnsignedAccelerated, integerDotProductAccumulatingSaturating64BitSignedAccelerated, integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceShaderIntegerDotProductProperties const & ) const = default; #else bool operator==( PhysicalDeviceShaderIntegerDotProductProperties const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( integerDotProduct8BitUnsignedAccelerated == rhs.integerDotProduct8BitUnsignedAccelerated ) && ( integerDotProduct8BitSignedAccelerated == rhs.integerDotProduct8BitSignedAccelerated ) && ( integerDotProduct8BitMixedSignednessAccelerated == rhs.integerDotProduct8BitMixedSignednessAccelerated ) && ( integerDotProduct4x8BitPackedUnsignedAccelerated == rhs.integerDotProduct4x8BitPackedUnsignedAccelerated ) && ( integerDotProduct4x8BitPackedSignedAccelerated == rhs.integerDotProduct4x8BitPackedSignedAccelerated ) && ( integerDotProduct4x8BitPackedMixedSignednessAccelerated == rhs.integerDotProduct4x8BitPackedMixedSignednessAccelerated ) && ( integerDotProduct16BitUnsignedAccelerated == rhs.integerDotProduct16BitUnsignedAccelerated ) && ( integerDotProduct16BitSignedAccelerated == rhs.integerDotProduct16BitSignedAccelerated ) && ( integerDotProduct16BitMixedSignednessAccelerated == rhs.integerDotProduct16BitMixedSignednessAccelerated ) && ( integerDotProduct32BitUnsignedAccelerated == rhs.integerDotProduct32BitUnsignedAccelerated ) && ( integerDotProduct32BitSignedAccelerated == rhs.integerDotProduct32BitSignedAccelerated ) && ( integerDotProduct32BitMixedSignednessAccelerated == rhs.integerDotProduct32BitMixedSignednessAccelerated ) && ( integerDotProduct64BitUnsignedAccelerated == rhs.integerDotProduct64BitUnsignedAccelerated ) && ( integerDotProduct64BitSignedAccelerated == rhs.integerDotProduct64BitSignedAccelerated ) && ( integerDotProduct64BitMixedSignednessAccelerated == rhs.integerDotProduct64BitMixedSignednessAccelerated ) && ( integerDotProductAccumulatingSaturating8BitUnsignedAccelerated == rhs.integerDotProductAccumulatingSaturating8BitUnsignedAccelerated ) && ( integerDotProductAccumulatingSaturating8BitSignedAccelerated == rhs.integerDotProductAccumulatingSaturating8BitSignedAccelerated ) && ( integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated == rhs.integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated ) && ( integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated == rhs.integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated ) && ( integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated == rhs.integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated ) && ( integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated == rhs.integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated ) && ( integerDotProductAccumulatingSaturating16BitUnsignedAccelerated == rhs.integerDotProductAccumulatingSaturating16BitUnsignedAccelerated ) && ( integerDotProductAccumulatingSaturating16BitSignedAccelerated == rhs.integerDotProductAccumulatingSaturating16BitSignedAccelerated ) && ( integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated == rhs.integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated ) && ( integerDotProductAccumulatingSaturating32BitUnsignedAccelerated == rhs.integerDotProductAccumulatingSaturating32BitUnsignedAccelerated ) && ( integerDotProductAccumulatingSaturating32BitSignedAccelerated == rhs.integerDotProductAccumulatingSaturating32BitSignedAccelerated ) && ( integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated == rhs.integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated ) && ( integerDotProductAccumulatingSaturating64BitUnsignedAccelerated == rhs.integerDotProductAccumulatingSaturating64BitUnsignedAccelerated ) && ( integerDotProductAccumulatingSaturating64BitSignedAccelerated == rhs.integerDotProductAccumulatingSaturating64BitSignedAccelerated ) && ( integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated == rhs.integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated ); # endif } bool operator!=( PhysicalDeviceShaderIntegerDotProductProperties const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceShaderIntegerDotProductProperties; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct8BitUnsignedAccelerated = {}; VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct8BitSignedAccelerated = {}; VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct8BitMixedSignednessAccelerated = {}; VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct4x8BitPackedUnsignedAccelerated = {}; VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct4x8BitPackedSignedAccelerated = {}; VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct4x8BitPackedMixedSignednessAccelerated = {}; VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct16BitUnsignedAccelerated = {}; VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct16BitSignedAccelerated = {}; VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct16BitMixedSignednessAccelerated = {}; VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct32BitUnsignedAccelerated = {}; VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct32BitSignedAccelerated = {}; VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct32BitMixedSignednessAccelerated = {}; VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct64BitUnsignedAccelerated = {}; VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct64BitSignedAccelerated = {}; VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct64BitMixedSignednessAccelerated = {}; VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating8BitUnsignedAccelerated = {}; VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating8BitSignedAccelerated = {}; VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated = {}; VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated = {}; VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated = {}; VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated = {}; VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating16BitUnsignedAccelerated = {}; VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating16BitSignedAccelerated = {}; VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated = {}; VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating32BitUnsignedAccelerated = {}; VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating32BitSignedAccelerated = {}; VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated = {}; VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating64BitUnsignedAccelerated = {}; VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating64BitSignedAccelerated = {}; VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated = {}; }; template <> struct CppType { using Type = PhysicalDeviceShaderIntegerDotProductProperties; }; using PhysicalDeviceShaderIntegerDotProductPropertiesKHR = PhysicalDeviceShaderIntegerDotProductProperties; struct PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL { using NativeType = VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceShaderIntegerFunctions2FeaturesINTEL; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL( VULKAN_HPP_NAMESPACE::Bool32 shaderIntegerFunctions2_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , shaderIntegerFunctions2{ shaderIntegerFunctions2_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL( PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL( VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL & operator=( PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL & operator=( VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL & setShaderIntegerFunctions2( VULKAN_HPP_NAMESPACE::Bool32 shaderIntegerFunctions2_ ) VULKAN_HPP_NOEXCEPT { shaderIntegerFunctions2 = shaderIntegerFunctions2_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, shaderIntegerFunctions2 ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL const & ) const = default; #else bool operator==( PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( shaderIntegerFunctions2 == rhs.shaderIntegerFunctions2 ); # endif } bool operator!=( PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceShaderIntegerFunctions2FeaturesINTEL; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderIntegerFunctions2 = {}; }; template <> struct CppType { using Type = PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL; }; struct PhysicalDeviceShaderMaximalReconvergenceFeaturesKHR { using NativeType = VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceShaderMaximalReconvergenceFeaturesKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderMaximalReconvergenceFeaturesKHR( VULKAN_HPP_NAMESPACE::Bool32 shaderMaximalReconvergence_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , shaderMaximalReconvergence{ shaderMaximalReconvergence_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderMaximalReconvergenceFeaturesKHR( PhysicalDeviceShaderMaximalReconvergenceFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceShaderMaximalReconvergenceFeaturesKHR( VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceShaderMaximalReconvergenceFeaturesKHR( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceShaderMaximalReconvergenceFeaturesKHR & operator=( PhysicalDeviceShaderMaximalReconvergenceFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceShaderMaximalReconvergenceFeaturesKHR & operator=( VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderMaximalReconvergenceFeaturesKHR & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderMaximalReconvergenceFeaturesKHR & setShaderMaximalReconvergence( VULKAN_HPP_NAMESPACE::Bool32 shaderMaximalReconvergence_ ) VULKAN_HPP_NOEXCEPT { shaderMaximalReconvergence = shaderMaximalReconvergence_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, shaderMaximalReconvergence ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceShaderMaximalReconvergenceFeaturesKHR const & ) const = default; #else bool operator==( PhysicalDeviceShaderMaximalReconvergenceFeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( shaderMaximalReconvergence == rhs.shaderMaximalReconvergence ); # endif } bool operator!=( PhysicalDeviceShaderMaximalReconvergenceFeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceShaderMaximalReconvergenceFeaturesKHR; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderMaximalReconvergence = {}; }; template <> struct CppType { using Type = PhysicalDeviceShaderMaximalReconvergenceFeaturesKHR; }; struct PhysicalDeviceShaderModuleIdentifierFeaturesEXT { using NativeType = VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceShaderModuleIdentifierFeaturesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderModuleIdentifierFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 shaderModuleIdentifier_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , shaderModuleIdentifier{ shaderModuleIdentifier_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderModuleIdentifierFeaturesEXT( PhysicalDeviceShaderModuleIdentifierFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceShaderModuleIdentifierFeaturesEXT( VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceShaderModuleIdentifierFeaturesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceShaderModuleIdentifierFeaturesEXT & operator=( PhysicalDeviceShaderModuleIdentifierFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceShaderModuleIdentifierFeaturesEXT & operator=( VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderModuleIdentifierFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderModuleIdentifierFeaturesEXT & setShaderModuleIdentifier( VULKAN_HPP_NAMESPACE::Bool32 shaderModuleIdentifier_ ) VULKAN_HPP_NOEXCEPT { shaderModuleIdentifier = shaderModuleIdentifier_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, shaderModuleIdentifier ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceShaderModuleIdentifierFeaturesEXT const & ) const = default; #else bool operator==( PhysicalDeviceShaderModuleIdentifierFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( shaderModuleIdentifier == rhs.shaderModuleIdentifier ); # endif } bool operator!=( PhysicalDeviceShaderModuleIdentifierFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceShaderModuleIdentifierFeaturesEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderModuleIdentifier = {}; }; template <> struct CppType { using Type = PhysicalDeviceShaderModuleIdentifierFeaturesEXT; }; struct PhysicalDeviceShaderModuleIdentifierPropertiesEXT { using NativeType = VkPhysicalDeviceShaderModuleIdentifierPropertiesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceShaderModuleIdentifierPropertiesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderModuleIdentifierPropertiesEXT( std::array const & shaderModuleIdentifierAlgorithmUUID_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , shaderModuleIdentifierAlgorithmUUID{ shaderModuleIdentifierAlgorithmUUID_ } { } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderModuleIdentifierPropertiesEXT( PhysicalDeviceShaderModuleIdentifierPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceShaderModuleIdentifierPropertiesEXT( VkPhysicalDeviceShaderModuleIdentifierPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceShaderModuleIdentifierPropertiesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceShaderModuleIdentifierPropertiesEXT & operator=( PhysicalDeviceShaderModuleIdentifierPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceShaderModuleIdentifierPropertiesEXT & operator=( VkPhysicalDeviceShaderModuleIdentifierPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceShaderModuleIdentifierPropertiesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceShaderModuleIdentifierPropertiesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple const &> # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, shaderModuleIdentifierAlgorithmUUID ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceShaderModuleIdentifierPropertiesEXT const & ) const = default; #else bool operator==( PhysicalDeviceShaderModuleIdentifierPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( shaderModuleIdentifierAlgorithmUUID == rhs.shaderModuleIdentifierAlgorithmUUID ); # endif } bool operator!=( PhysicalDeviceShaderModuleIdentifierPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceShaderModuleIdentifierPropertiesEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D shaderModuleIdentifierAlgorithmUUID = {}; }; template <> struct CppType { using Type = PhysicalDeviceShaderModuleIdentifierPropertiesEXT; }; struct PhysicalDeviceShaderObjectFeaturesEXT { using NativeType = VkPhysicalDeviceShaderObjectFeaturesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceShaderObjectFeaturesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderObjectFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 shaderObject_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , shaderObject{ shaderObject_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderObjectFeaturesEXT( PhysicalDeviceShaderObjectFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceShaderObjectFeaturesEXT( VkPhysicalDeviceShaderObjectFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceShaderObjectFeaturesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceShaderObjectFeaturesEXT & operator=( PhysicalDeviceShaderObjectFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceShaderObjectFeaturesEXT & operator=( VkPhysicalDeviceShaderObjectFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderObjectFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderObjectFeaturesEXT & setShaderObject( VULKAN_HPP_NAMESPACE::Bool32 shaderObject_ ) VULKAN_HPP_NOEXCEPT { shaderObject = shaderObject_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceShaderObjectFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceShaderObjectFeaturesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, shaderObject ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceShaderObjectFeaturesEXT const & ) const = default; #else bool operator==( PhysicalDeviceShaderObjectFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( shaderObject == rhs.shaderObject ); # endif } bool operator!=( PhysicalDeviceShaderObjectFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceShaderObjectFeaturesEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderObject = {}; }; template <> struct CppType { using Type = PhysicalDeviceShaderObjectFeaturesEXT; }; struct PhysicalDeviceShaderObjectPropertiesEXT { using NativeType = VkPhysicalDeviceShaderObjectPropertiesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceShaderObjectPropertiesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderObjectPropertiesEXT( std::array const & shaderBinaryUUID_ = {}, uint32_t shaderBinaryVersion_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , shaderBinaryUUID{ shaderBinaryUUID_ } , shaderBinaryVersion{ shaderBinaryVersion_ } { } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderObjectPropertiesEXT( PhysicalDeviceShaderObjectPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceShaderObjectPropertiesEXT( VkPhysicalDeviceShaderObjectPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceShaderObjectPropertiesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceShaderObjectPropertiesEXT & operator=( PhysicalDeviceShaderObjectPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceShaderObjectPropertiesEXT & operator=( VkPhysicalDeviceShaderObjectPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceShaderObjectPropertiesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceShaderObjectPropertiesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std:: tuple const &, uint32_t const &> # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, shaderBinaryUUID, shaderBinaryVersion ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceShaderObjectPropertiesEXT const & ) const = default; #else bool operator==( PhysicalDeviceShaderObjectPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( shaderBinaryUUID == rhs.shaderBinaryUUID ) && ( shaderBinaryVersion == rhs.shaderBinaryVersion ); # endif } bool operator!=( PhysicalDeviceShaderObjectPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceShaderObjectPropertiesEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D shaderBinaryUUID = {}; uint32_t shaderBinaryVersion = {}; }; template <> struct CppType { using Type = PhysicalDeviceShaderObjectPropertiesEXT; }; struct PhysicalDeviceShaderQuadControlFeaturesKHR { using NativeType = VkPhysicalDeviceShaderQuadControlFeaturesKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceShaderQuadControlFeaturesKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderQuadControlFeaturesKHR( VULKAN_HPP_NAMESPACE::Bool32 shaderQuadControl_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , shaderQuadControl{ shaderQuadControl_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderQuadControlFeaturesKHR( PhysicalDeviceShaderQuadControlFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceShaderQuadControlFeaturesKHR( VkPhysicalDeviceShaderQuadControlFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceShaderQuadControlFeaturesKHR( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceShaderQuadControlFeaturesKHR & operator=( PhysicalDeviceShaderQuadControlFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceShaderQuadControlFeaturesKHR & operator=( VkPhysicalDeviceShaderQuadControlFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderQuadControlFeaturesKHR & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderQuadControlFeaturesKHR & setShaderQuadControl( VULKAN_HPP_NAMESPACE::Bool32 shaderQuadControl_ ) VULKAN_HPP_NOEXCEPT { shaderQuadControl = shaderQuadControl_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceShaderQuadControlFeaturesKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceShaderQuadControlFeaturesKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, shaderQuadControl ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceShaderQuadControlFeaturesKHR const & ) const = default; #else bool operator==( PhysicalDeviceShaderQuadControlFeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( shaderQuadControl == rhs.shaderQuadControl ); # endif } bool operator!=( PhysicalDeviceShaderQuadControlFeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceShaderQuadControlFeaturesKHR; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderQuadControl = {}; }; template <> struct CppType { using Type = PhysicalDeviceShaderQuadControlFeaturesKHR; }; struct PhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR { using NativeType = VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR( VULKAN_HPP_NAMESPACE::Bool32 shaderRelaxedExtendedInstruction_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , shaderRelaxedExtendedInstruction{ shaderRelaxedExtendedInstruction_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR( PhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR( VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR & operator=( PhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR & operator=( VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR & setShaderRelaxedExtendedInstruction( VULKAN_HPP_NAMESPACE::Bool32 shaderRelaxedExtendedInstruction_ ) VULKAN_HPP_NOEXCEPT { shaderRelaxedExtendedInstruction = shaderRelaxedExtendedInstruction_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, shaderRelaxedExtendedInstruction ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR const & ) const = default; #else bool operator==( PhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( shaderRelaxedExtendedInstruction == rhs.shaderRelaxedExtendedInstruction ); # endif } bool operator!=( PhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderRelaxedExtendedInstruction = {}; }; template <> struct CppType { using Type = PhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR; }; struct PhysicalDeviceShaderReplicatedCompositesFeaturesEXT { using NativeType = VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceShaderReplicatedCompositesFeaturesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderReplicatedCompositesFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 shaderReplicatedComposites_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , shaderReplicatedComposites{ shaderReplicatedComposites_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderReplicatedCompositesFeaturesEXT( PhysicalDeviceShaderReplicatedCompositesFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceShaderReplicatedCompositesFeaturesEXT( VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceShaderReplicatedCompositesFeaturesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceShaderReplicatedCompositesFeaturesEXT & operator=( PhysicalDeviceShaderReplicatedCompositesFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceShaderReplicatedCompositesFeaturesEXT & operator=( VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderReplicatedCompositesFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderReplicatedCompositesFeaturesEXT & setShaderReplicatedComposites( VULKAN_HPP_NAMESPACE::Bool32 shaderReplicatedComposites_ ) VULKAN_HPP_NOEXCEPT { shaderReplicatedComposites = shaderReplicatedComposites_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, shaderReplicatedComposites ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceShaderReplicatedCompositesFeaturesEXT const & ) const = default; #else bool operator==( PhysicalDeviceShaderReplicatedCompositesFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( shaderReplicatedComposites == rhs.shaderReplicatedComposites ); # endif } bool operator!=( PhysicalDeviceShaderReplicatedCompositesFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceShaderReplicatedCompositesFeaturesEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderReplicatedComposites = {}; }; template <> struct CppType { using Type = PhysicalDeviceShaderReplicatedCompositesFeaturesEXT; }; struct PhysicalDeviceShaderSMBuiltinsFeaturesNV { using NativeType = VkPhysicalDeviceShaderSMBuiltinsFeaturesNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceShaderSmBuiltinsFeaturesNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderSMBuiltinsFeaturesNV( VULKAN_HPP_NAMESPACE::Bool32 shaderSMBuiltins_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , shaderSMBuiltins{ shaderSMBuiltins_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderSMBuiltinsFeaturesNV( PhysicalDeviceShaderSMBuiltinsFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceShaderSMBuiltinsFeaturesNV( VkPhysicalDeviceShaderSMBuiltinsFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceShaderSMBuiltinsFeaturesNV( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceShaderSMBuiltinsFeaturesNV & operator=( PhysicalDeviceShaderSMBuiltinsFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceShaderSMBuiltinsFeaturesNV & operator=( VkPhysicalDeviceShaderSMBuiltinsFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderSMBuiltinsFeaturesNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderSMBuiltinsFeaturesNV & setShaderSMBuiltins( VULKAN_HPP_NAMESPACE::Bool32 shaderSMBuiltins_ ) VULKAN_HPP_NOEXCEPT { shaderSMBuiltins = shaderSMBuiltins_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceShaderSMBuiltinsFeaturesNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceShaderSMBuiltinsFeaturesNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, shaderSMBuiltins ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceShaderSMBuiltinsFeaturesNV const & ) const = default; #else bool operator==( PhysicalDeviceShaderSMBuiltinsFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( shaderSMBuiltins == rhs.shaderSMBuiltins ); # endif } bool operator!=( PhysicalDeviceShaderSMBuiltinsFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceShaderSmBuiltinsFeaturesNV; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderSMBuiltins = {}; }; template <> struct CppType { using Type = PhysicalDeviceShaderSMBuiltinsFeaturesNV; }; struct PhysicalDeviceShaderSMBuiltinsPropertiesNV { using NativeType = VkPhysicalDeviceShaderSMBuiltinsPropertiesNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceShaderSmBuiltinsPropertiesNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderSMBuiltinsPropertiesNV( uint32_t shaderSMCount_ = {}, uint32_t shaderWarpsPerSM_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , shaderSMCount{ shaderSMCount_ } , shaderWarpsPerSM{ shaderWarpsPerSM_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderSMBuiltinsPropertiesNV( PhysicalDeviceShaderSMBuiltinsPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceShaderSMBuiltinsPropertiesNV( VkPhysicalDeviceShaderSMBuiltinsPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceShaderSMBuiltinsPropertiesNV( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceShaderSMBuiltinsPropertiesNV & operator=( PhysicalDeviceShaderSMBuiltinsPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceShaderSMBuiltinsPropertiesNV & operator=( VkPhysicalDeviceShaderSMBuiltinsPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceShaderSMBuiltinsPropertiesNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceShaderSMBuiltinsPropertiesNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, shaderSMCount, shaderWarpsPerSM ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceShaderSMBuiltinsPropertiesNV const & ) const = default; #else bool operator==( PhysicalDeviceShaderSMBuiltinsPropertiesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( shaderSMCount == rhs.shaderSMCount ) && ( shaderWarpsPerSM == rhs.shaderWarpsPerSM ); # endif } bool operator!=( PhysicalDeviceShaderSMBuiltinsPropertiesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceShaderSmBuiltinsPropertiesNV; void * pNext = {}; uint32_t shaderSMCount = {}; uint32_t shaderWarpsPerSM = {}; }; template <> struct CppType { using Type = PhysicalDeviceShaderSMBuiltinsPropertiesNV; }; struct PhysicalDeviceShaderSubgroupExtendedTypesFeatures { using NativeType = VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceShaderSubgroupExtendedTypesFeatures; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderSubgroupExtendedTypesFeatures( VULKAN_HPP_NAMESPACE::Bool32 shaderSubgroupExtendedTypes_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , shaderSubgroupExtendedTypes{ shaderSubgroupExtendedTypes_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderSubgroupExtendedTypesFeatures( PhysicalDeviceShaderSubgroupExtendedTypesFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceShaderSubgroupExtendedTypesFeatures( VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceShaderSubgroupExtendedTypesFeatures( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceShaderSubgroupExtendedTypesFeatures & operator=( PhysicalDeviceShaderSubgroupExtendedTypesFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceShaderSubgroupExtendedTypesFeatures & operator=( VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderSubgroupExtendedTypesFeatures & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderSubgroupExtendedTypesFeatures & setShaderSubgroupExtendedTypes( VULKAN_HPP_NAMESPACE::Bool32 shaderSubgroupExtendedTypes_ ) VULKAN_HPP_NOEXCEPT { shaderSubgroupExtendedTypes = shaderSubgroupExtendedTypes_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, shaderSubgroupExtendedTypes ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceShaderSubgroupExtendedTypesFeatures const & ) const = default; #else bool operator==( PhysicalDeviceShaderSubgroupExtendedTypesFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( shaderSubgroupExtendedTypes == rhs.shaderSubgroupExtendedTypes ); # endif } bool operator!=( PhysicalDeviceShaderSubgroupExtendedTypesFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceShaderSubgroupExtendedTypesFeatures; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderSubgroupExtendedTypes = {}; }; template <> struct CppType { using Type = PhysicalDeviceShaderSubgroupExtendedTypesFeatures; }; using PhysicalDeviceShaderSubgroupExtendedTypesFeaturesKHR = PhysicalDeviceShaderSubgroupExtendedTypesFeatures; struct PhysicalDeviceShaderSubgroupRotateFeatures { using NativeType = VkPhysicalDeviceShaderSubgroupRotateFeatures; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceShaderSubgroupRotateFeatures; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderSubgroupRotateFeatures( VULKAN_HPP_NAMESPACE::Bool32 shaderSubgroupRotate_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderSubgroupRotateClustered_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , shaderSubgroupRotate{ shaderSubgroupRotate_ } , shaderSubgroupRotateClustered{ shaderSubgroupRotateClustered_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderSubgroupRotateFeatures( PhysicalDeviceShaderSubgroupRotateFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceShaderSubgroupRotateFeatures( VkPhysicalDeviceShaderSubgroupRotateFeatures const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceShaderSubgroupRotateFeatures( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceShaderSubgroupRotateFeatures & operator=( PhysicalDeviceShaderSubgroupRotateFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceShaderSubgroupRotateFeatures & operator=( VkPhysicalDeviceShaderSubgroupRotateFeatures const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderSubgroupRotateFeatures & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderSubgroupRotateFeatures & setShaderSubgroupRotate( VULKAN_HPP_NAMESPACE::Bool32 shaderSubgroupRotate_ ) VULKAN_HPP_NOEXCEPT { shaderSubgroupRotate = shaderSubgroupRotate_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderSubgroupRotateFeatures & setShaderSubgroupRotateClustered( VULKAN_HPP_NAMESPACE::Bool32 shaderSubgroupRotateClustered_ ) VULKAN_HPP_NOEXCEPT { shaderSubgroupRotateClustered = shaderSubgroupRotateClustered_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceShaderSubgroupRotateFeatures const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceShaderSubgroupRotateFeatures &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, shaderSubgroupRotate, shaderSubgroupRotateClustered ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceShaderSubgroupRotateFeatures const & ) const = default; #else bool operator==( PhysicalDeviceShaderSubgroupRotateFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( shaderSubgroupRotate == rhs.shaderSubgroupRotate ) && ( shaderSubgroupRotateClustered == rhs.shaderSubgroupRotateClustered ); # endif } bool operator!=( PhysicalDeviceShaderSubgroupRotateFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceShaderSubgroupRotateFeatures; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderSubgroupRotate = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderSubgroupRotateClustered = {}; }; template <> struct CppType { using Type = PhysicalDeviceShaderSubgroupRotateFeatures; }; using PhysicalDeviceShaderSubgroupRotateFeaturesKHR = PhysicalDeviceShaderSubgroupRotateFeatures; struct PhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR { using NativeType = VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR( VULKAN_HPP_NAMESPACE::Bool32 shaderSubgroupUniformControlFlow_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , shaderSubgroupUniformControlFlow{ shaderSubgroupUniformControlFlow_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR( PhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR( VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR & operator=( PhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR & operator=( VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR & setShaderSubgroupUniformControlFlow( VULKAN_HPP_NAMESPACE::Bool32 shaderSubgroupUniformControlFlow_ ) VULKAN_HPP_NOEXCEPT { shaderSubgroupUniformControlFlow = shaderSubgroupUniformControlFlow_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, shaderSubgroupUniformControlFlow ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR const & ) const = default; #else bool operator==( PhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( shaderSubgroupUniformControlFlow == rhs.shaderSubgroupUniformControlFlow ); # endif } bool operator!=( PhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderSubgroupUniformControlFlow = {}; }; template <> struct CppType { using Type = PhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR; }; struct PhysicalDeviceShaderTerminateInvocationFeatures { using NativeType = VkPhysicalDeviceShaderTerminateInvocationFeatures; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceShaderTerminateInvocationFeatures; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderTerminateInvocationFeatures( VULKAN_HPP_NAMESPACE::Bool32 shaderTerminateInvocation_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , shaderTerminateInvocation{ shaderTerminateInvocation_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderTerminateInvocationFeatures( PhysicalDeviceShaderTerminateInvocationFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceShaderTerminateInvocationFeatures( VkPhysicalDeviceShaderTerminateInvocationFeatures const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceShaderTerminateInvocationFeatures( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceShaderTerminateInvocationFeatures & operator=( PhysicalDeviceShaderTerminateInvocationFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceShaderTerminateInvocationFeatures & operator=( VkPhysicalDeviceShaderTerminateInvocationFeatures const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderTerminateInvocationFeatures & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderTerminateInvocationFeatures & setShaderTerminateInvocation( VULKAN_HPP_NAMESPACE::Bool32 shaderTerminateInvocation_ ) VULKAN_HPP_NOEXCEPT { shaderTerminateInvocation = shaderTerminateInvocation_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceShaderTerminateInvocationFeatures const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceShaderTerminateInvocationFeatures &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, shaderTerminateInvocation ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceShaderTerminateInvocationFeatures const & ) const = default; #else bool operator==( PhysicalDeviceShaderTerminateInvocationFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( shaderTerminateInvocation == rhs.shaderTerminateInvocation ); # endif } bool operator!=( PhysicalDeviceShaderTerminateInvocationFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceShaderTerminateInvocationFeatures; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderTerminateInvocation = {}; }; template <> struct CppType { using Type = PhysicalDeviceShaderTerminateInvocationFeatures; }; using PhysicalDeviceShaderTerminateInvocationFeaturesKHR = PhysicalDeviceShaderTerminateInvocationFeatures; struct PhysicalDeviceShaderTileImageFeaturesEXT { using NativeType = VkPhysicalDeviceShaderTileImageFeaturesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceShaderTileImageFeaturesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderTileImageFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 shaderTileImageColorReadAccess_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderTileImageDepthReadAccess_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderTileImageStencilReadAccess_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , shaderTileImageColorReadAccess{ shaderTileImageColorReadAccess_ } , shaderTileImageDepthReadAccess{ shaderTileImageDepthReadAccess_ } , shaderTileImageStencilReadAccess{ shaderTileImageStencilReadAccess_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderTileImageFeaturesEXT( PhysicalDeviceShaderTileImageFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceShaderTileImageFeaturesEXT( VkPhysicalDeviceShaderTileImageFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceShaderTileImageFeaturesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceShaderTileImageFeaturesEXT & operator=( PhysicalDeviceShaderTileImageFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceShaderTileImageFeaturesEXT & operator=( VkPhysicalDeviceShaderTileImageFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderTileImageFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderTileImageFeaturesEXT & setShaderTileImageColorReadAccess( VULKAN_HPP_NAMESPACE::Bool32 shaderTileImageColorReadAccess_ ) VULKAN_HPP_NOEXCEPT { shaderTileImageColorReadAccess = shaderTileImageColorReadAccess_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderTileImageFeaturesEXT & setShaderTileImageDepthReadAccess( VULKAN_HPP_NAMESPACE::Bool32 shaderTileImageDepthReadAccess_ ) VULKAN_HPP_NOEXCEPT { shaderTileImageDepthReadAccess = shaderTileImageDepthReadAccess_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShaderTileImageFeaturesEXT & setShaderTileImageStencilReadAccess( VULKAN_HPP_NAMESPACE::Bool32 shaderTileImageStencilReadAccess_ ) VULKAN_HPP_NOEXCEPT { shaderTileImageStencilReadAccess = shaderTileImageStencilReadAccess_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceShaderTileImageFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceShaderTileImageFeaturesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, shaderTileImageColorReadAccess, shaderTileImageDepthReadAccess, shaderTileImageStencilReadAccess ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceShaderTileImageFeaturesEXT const & ) const = default; #else bool operator==( PhysicalDeviceShaderTileImageFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( shaderTileImageColorReadAccess == rhs.shaderTileImageColorReadAccess ) && ( shaderTileImageDepthReadAccess == rhs.shaderTileImageDepthReadAccess ) && ( shaderTileImageStencilReadAccess == rhs.shaderTileImageStencilReadAccess ); # endif } bool operator!=( PhysicalDeviceShaderTileImageFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceShaderTileImageFeaturesEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderTileImageColorReadAccess = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderTileImageDepthReadAccess = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderTileImageStencilReadAccess = {}; }; template <> struct CppType { using Type = PhysicalDeviceShaderTileImageFeaturesEXT; }; struct PhysicalDeviceShaderTileImagePropertiesEXT { using NativeType = VkPhysicalDeviceShaderTileImagePropertiesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceShaderTileImagePropertiesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderTileImagePropertiesEXT( VULKAN_HPP_NAMESPACE::Bool32 shaderTileImageCoherentReadAccelerated_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderTileImageReadSampleFromPixelRateInvocation_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderTileImageReadFromHelperInvocation_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , shaderTileImageCoherentReadAccelerated{ shaderTileImageCoherentReadAccelerated_ } , shaderTileImageReadSampleFromPixelRateInvocation{ shaderTileImageReadSampleFromPixelRateInvocation_ } , shaderTileImageReadFromHelperInvocation{ shaderTileImageReadFromHelperInvocation_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceShaderTileImagePropertiesEXT( PhysicalDeviceShaderTileImagePropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceShaderTileImagePropertiesEXT( VkPhysicalDeviceShaderTileImagePropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceShaderTileImagePropertiesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceShaderTileImagePropertiesEXT & operator=( PhysicalDeviceShaderTileImagePropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceShaderTileImagePropertiesEXT & operator=( VkPhysicalDeviceShaderTileImagePropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceShaderTileImagePropertiesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceShaderTileImagePropertiesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, shaderTileImageCoherentReadAccelerated, shaderTileImageReadSampleFromPixelRateInvocation, shaderTileImageReadFromHelperInvocation ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceShaderTileImagePropertiesEXT const & ) const = default; #else bool operator==( PhysicalDeviceShaderTileImagePropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( shaderTileImageCoherentReadAccelerated == rhs.shaderTileImageCoherentReadAccelerated ) && ( shaderTileImageReadSampleFromPixelRateInvocation == rhs.shaderTileImageReadSampleFromPixelRateInvocation ) && ( shaderTileImageReadFromHelperInvocation == rhs.shaderTileImageReadFromHelperInvocation ); # endif } bool operator!=( PhysicalDeviceShaderTileImagePropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceShaderTileImagePropertiesEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderTileImageCoherentReadAccelerated = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderTileImageReadSampleFromPixelRateInvocation = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderTileImageReadFromHelperInvocation = {}; }; template <> struct CppType { using Type = PhysicalDeviceShaderTileImagePropertiesEXT; }; struct PhysicalDeviceShadingRateImageFeaturesNV { using NativeType = VkPhysicalDeviceShadingRateImageFeaturesNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceShadingRateImageFeaturesNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceShadingRateImageFeaturesNV( VULKAN_HPP_NAMESPACE::Bool32 shadingRateImage_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shadingRateCoarseSampleOrder_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , shadingRateImage{ shadingRateImage_ } , shadingRateCoarseSampleOrder{ shadingRateCoarseSampleOrder_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceShadingRateImageFeaturesNV( PhysicalDeviceShadingRateImageFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceShadingRateImageFeaturesNV( VkPhysicalDeviceShadingRateImageFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceShadingRateImageFeaturesNV( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceShadingRateImageFeaturesNV & operator=( PhysicalDeviceShadingRateImageFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceShadingRateImageFeaturesNV & operator=( VkPhysicalDeviceShadingRateImageFeaturesNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShadingRateImageFeaturesNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShadingRateImageFeaturesNV & setShadingRateImage( VULKAN_HPP_NAMESPACE::Bool32 shadingRateImage_ ) VULKAN_HPP_NOEXCEPT { shadingRateImage = shadingRateImage_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceShadingRateImageFeaturesNV & setShadingRateCoarseSampleOrder( VULKAN_HPP_NAMESPACE::Bool32 shadingRateCoarseSampleOrder_ ) VULKAN_HPP_NOEXCEPT { shadingRateCoarseSampleOrder = shadingRateCoarseSampleOrder_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceShadingRateImageFeaturesNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceShadingRateImageFeaturesNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, shadingRateImage, shadingRateCoarseSampleOrder ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceShadingRateImageFeaturesNV const & ) const = default; #else bool operator==( PhysicalDeviceShadingRateImageFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( shadingRateImage == rhs.shadingRateImage ) && ( shadingRateCoarseSampleOrder == rhs.shadingRateCoarseSampleOrder ); # endif } bool operator!=( PhysicalDeviceShadingRateImageFeaturesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceShadingRateImageFeaturesNV; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 shadingRateImage = {}; VULKAN_HPP_NAMESPACE::Bool32 shadingRateCoarseSampleOrder = {}; }; template <> struct CppType { using Type = PhysicalDeviceShadingRateImageFeaturesNV; }; struct PhysicalDeviceShadingRateImagePropertiesNV { using NativeType = VkPhysicalDeviceShadingRateImagePropertiesNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceShadingRateImagePropertiesNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceShadingRateImagePropertiesNV( VULKAN_HPP_NAMESPACE::Extent2D shadingRateTexelSize_ = {}, uint32_t shadingRatePaletteSize_ = {}, uint32_t shadingRateMaxCoarseSamples_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , shadingRateTexelSize{ shadingRateTexelSize_ } , shadingRatePaletteSize{ shadingRatePaletteSize_ } , shadingRateMaxCoarseSamples{ shadingRateMaxCoarseSamples_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceShadingRateImagePropertiesNV( PhysicalDeviceShadingRateImagePropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceShadingRateImagePropertiesNV( VkPhysicalDeviceShadingRateImagePropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceShadingRateImagePropertiesNV( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceShadingRateImagePropertiesNV & operator=( PhysicalDeviceShadingRateImagePropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceShadingRateImagePropertiesNV & operator=( VkPhysicalDeviceShadingRateImagePropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceShadingRateImagePropertiesNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceShadingRateImagePropertiesNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, shadingRateTexelSize, shadingRatePaletteSize, shadingRateMaxCoarseSamples ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceShadingRateImagePropertiesNV const & ) const = default; #else bool operator==( PhysicalDeviceShadingRateImagePropertiesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( shadingRateTexelSize == rhs.shadingRateTexelSize ) && ( shadingRatePaletteSize == rhs.shadingRatePaletteSize ) && ( shadingRateMaxCoarseSamples == rhs.shadingRateMaxCoarseSamples ); # endif } bool operator!=( PhysicalDeviceShadingRateImagePropertiesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceShadingRateImagePropertiesNV; void * pNext = {}; VULKAN_HPP_NAMESPACE::Extent2D shadingRateTexelSize = {}; uint32_t shadingRatePaletteSize = {}; uint32_t shadingRateMaxCoarseSamples = {}; }; template <> struct CppType { using Type = PhysicalDeviceShadingRateImagePropertiesNV; }; struct PhysicalDeviceSparseImageFormatInfo2 { using NativeType = VkPhysicalDeviceSparseImageFormatInfo2; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceSparseImageFormatInfo2; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceSparseImageFormatInfo2( VULKAN_HPP_NAMESPACE::Format format_ = VULKAN_HPP_NAMESPACE::Format::eUndefined, VULKAN_HPP_NAMESPACE::ImageType type_ = VULKAN_HPP_NAMESPACE::ImageType::e1D, VULKAN_HPP_NAMESPACE::SampleCountFlagBits samples_ = VULKAN_HPP_NAMESPACE::SampleCountFlagBits::e1, VULKAN_HPP_NAMESPACE::ImageUsageFlags usage_ = {}, VULKAN_HPP_NAMESPACE::ImageTiling tiling_ = VULKAN_HPP_NAMESPACE::ImageTiling::eOptimal, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , format{ format_ } , type{ type_ } , samples{ samples_ } , usage{ usage_ } , tiling{ tiling_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceSparseImageFormatInfo2( PhysicalDeviceSparseImageFormatInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceSparseImageFormatInfo2( VkPhysicalDeviceSparseImageFormatInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceSparseImageFormatInfo2( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceSparseImageFormatInfo2 & operator=( PhysicalDeviceSparseImageFormatInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceSparseImageFormatInfo2 & operator=( VkPhysicalDeviceSparseImageFormatInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceSparseImageFormatInfo2 & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceSparseImageFormatInfo2 & setFormat( VULKAN_HPP_NAMESPACE::Format format_ ) VULKAN_HPP_NOEXCEPT { format = format_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceSparseImageFormatInfo2 & setType( VULKAN_HPP_NAMESPACE::ImageType type_ ) VULKAN_HPP_NOEXCEPT { type = type_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceSparseImageFormatInfo2 & setSamples( VULKAN_HPP_NAMESPACE::SampleCountFlagBits samples_ ) VULKAN_HPP_NOEXCEPT { samples = samples_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceSparseImageFormatInfo2 & setUsage( VULKAN_HPP_NAMESPACE::ImageUsageFlags usage_ ) VULKAN_HPP_NOEXCEPT { usage = usage_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceSparseImageFormatInfo2 & setTiling( VULKAN_HPP_NAMESPACE::ImageTiling tiling_ ) VULKAN_HPP_NOEXCEPT { tiling = tiling_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceSparseImageFormatInfo2 const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceSparseImageFormatInfo2 &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, format, type, samples, usage, tiling ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceSparseImageFormatInfo2 const & ) const = default; #else bool operator==( PhysicalDeviceSparseImageFormatInfo2 const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( format == rhs.format ) && ( type == rhs.type ) && ( samples == rhs.samples ) && ( usage == rhs.usage ) && ( tiling == rhs.tiling ); # endif } bool operator!=( PhysicalDeviceSparseImageFormatInfo2 const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceSparseImageFormatInfo2; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Format format = VULKAN_HPP_NAMESPACE::Format::eUndefined; VULKAN_HPP_NAMESPACE::ImageType type = VULKAN_HPP_NAMESPACE::ImageType::e1D; VULKAN_HPP_NAMESPACE::SampleCountFlagBits samples = VULKAN_HPP_NAMESPACE::SampleCountFlagBits::e1; VULKAN_HPP_NAMESPACE::ImageUsageFlags usage = {}; VULKAN_HPP_NAMESPACE::ImageTiling tiling = VULKAN_HPP_NAMESPACE::ImageTiling::eOptimal; }; template <> struct CppType { using Type = PhysicalDeviceSparseImageFormatInfo2; }; using PhysicalDeviceSparseImageFormatInfo2KHR = PhysicalDeviceSparseImageFormatInfo2; struct PhysicalDeviceSubgroupProperties { using NativeType = VkPhysicalDeviceSubgroupProperties; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceSubgroupProperties; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceSubgroupProperties( uint32_t subgroupSize_ = {}, VULKAN_HPP_NAMESPACE::ShaderStageFlags supportedStages_ = {}, VULKAN_HPP_NAMESPACE::SubgroupFeatureFlags supportedOperations_ = {}, VULKAN_HPP_NAMESPACE::Bool32 quadOperationsInAllStages_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , subgroupSize{ subgroupSize_ } , supportedStages{ supportedStages_ } , supportedOperations{ supportedOperations_ } , quadOperationsInAllStages{ quadOperationsInAllStages_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceSubgroupProperties( PhysicalDeviceSubgroupProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceSubgroupProperties( VkPhysicalDeviceSubgroupProperties const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceSubgroupProperties( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceSubgroupProperties & operator=( PhysicalDeviceSubgroupProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceSubgroupProperties & operator=( VkPhysicalDeviceSubgroupProperties const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceSubgroupProperties const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceSubgroupProperties &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, subgroupSize, supportedStages, supportedOperations, quadOperationsInAllStages ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceSubgroupProperties const & ) const = default; #else bool operator==( PhysicalDeviceSubgroupProperties const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( subgroupSize == rhs.subgroupSize ) && ( supportedStages == rhs.supportedStages ) && ( supportedOperations == rhs.supportedOperations ) && ( quadOperationsInAllStages == rhs.quadOperationsInAllStages ); # endif } bool operator!=( PhysicalDeviceSubgroupProperties const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceSubgroupProperties; void * pNext = {}; uint32_t subgroupSize = {}; VULKAN_HPP_NAMESPACE::ShaderStageFlags supportedStages = {}; VULKAN_HPP_NAMESPACE::SubgroupFeatureFlags supportedOperations = {}; VULKAN_HPP_NAMESPACE::Bool32 quadOperationsInAllStages = {}; }; template <> struct CppType { using Type = PhysicalDeviceSubgroupProperties; }; struct PhysicalDeviceSubgroupSizeControlFeatures { using NativeType = VkPhysicalDeviceSubgroupSizeControlFeatures; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceSubgroupSizeControlFeatures; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceSubgroupSizeControlFeatures( VULKAN_HPP_NAMESPACE::Bool32 subgroupSizeControl_ = {}, VULKAN_HPP_NAMESPACE::Bool32 computeFullSubgroups_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , subgroupSizeControl{ subgroupSizeControl_ } , computeFullSubgroups{ computeFullSubgroups_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceSubgroupSizeControlFeatures( PhysicalDeviceSubgroupSizeControlFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceSubgroupSizeControlFeatures( VkPhysicalDeviceSubgroupSizeControlFeatures const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceSubgroupSizeControlFeatures( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceSubgroupSizeControlFeatures & operator=( PhysicalDeviceSubgroupSizeControlFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceSubgroupSizeControlFeatures & operator=( VkPhysicalDeviceSubgroupSizeControlFeatures const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceSubgroupSizeControlFeatures & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceSubgroupSizeControlFeatures & setSubgroupSizeControl( VULKAN_HPP_NAMESPACE::Bool32 subgroupSizeControl_ ) VULKAN_HPP_NOEXCEPT { subgroupSizeControl = subgroupSizeControl_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceSubgroupSizeControlFeatures & setComputeFullSubgroups( VULKAN_HPP_NAMESPACE::Bool32 computeFullSubgroups_ ) VULKAN_HPP_NOEXCEPT { computeFullSubgroups = computeFullSubgroups_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceSubgroupSizeControlFeatures const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceSubgroupSizeControlFeatures &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, subgroupSizeControl, computeFullSubgroups ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceSubgroupSizeControlFeatures const & ) const = default; #else bool operator==( PhysicalDeviceSubgroupSizeControlFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( subgroupSizeControl == rhs.subgroupSizeControl ) && ( computeFullSubgroups == rhs.computeFullSubgroups ); # endif } bool operator!=( PhysicalDeviceSubgroupSizeControlFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceSubgroupSizeControlFeatures; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 subgroupSizeControl = {}; VULKAN_HPP_NAMESPACE::Bool32 computeFullSubgroups = {}; }; template <> struct CppType { using Type = PhysicalDeviceSubgroupSizeControlFeatures; }; using PhysicalDeviceSubgroupSizeControlFeaturesEXT = PhysicalDeviceSubgroupSizeControlFeatures; struct PhysicalDeviceSubgroupSizeControlProperties { using NativeType = VkPhysicalDeviceSubgroupSizeControlProperties; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceSubgroupSizeControlProperties; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceSubgroupSizeControlProperties( uint32_t minSubgroupSize_ = {}, uint32_t maxSubgroupSize_ = {}, uint32_t maxComputeWorkgroupSubgroups_ = {}, VULKAN_HPP_NAMESPACE::ShaderStageFlags requiredSubgroupSizeStages_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , minSubgroupSize{ minSubgroupSize_ } , maxSubgroupSize{ maxSubgroupSize_ } , maxComputeWorkgroupSubgroups{ maxComputeWorkgroupSubgroups_ } , requiredSubgroupSizeStages{ requiredSubgroupSizeStages_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceSubgroupSizeControlProperties( PhysicalDeviceSubgroupSizeControlProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceSubgroupSizeControlProperties( VkPhysicalDeviceSubgroupSizeControlProperties const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceSubgroupSizeControlProperties( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceSubgroupSizeControlProperties & operator=( PhysicalDeviceSubgroupSizeControlProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceSubgroupSizeControlProperties & operator=( VkPhysicalDeviceSubgroupSizeControlProperties const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceSubgroupSizeControlProperties const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceSubgroupSizeControlProperties &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, minSubgroupSize, maxSubgroupSize, maxComputeWorkgroupSubgroups, requiredSubgroupSizeStages ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceSubgroupSizeControlProperties const & ) const = default; #else bool operator==( PhysicalDeviceSubgroupSizeControlProperties const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( minSubgroupSize == rhs.minSubgroupSize ) && ( maxSubgroupSize == rhs.maxSubgroupSize ) && ( maxComputeWorkgroupSubgroups == rhs.maxComputeWorkgroupSubgroups ) && ( requiredSubgroupSizeStages == rhs.requiredSubgroupSizeStages ); # endif } bool operator!=( PhysicalDeviceSubgroupSizeControlProperties const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceSubgroupSizeControlProperties; void * pNext = {}; uint32_t minSubgroupSize = {}; uint32_t maxSubgroupSize = {}; uint32_t maxComputeWorkgroupSubgroups = {}; VULKAN_HPP_NAMESPACE::ShaderStageFlags requiredSubgroupSizeStages = {}; }; template <> struct CppType { using Type = PhysicalDeviceSubgroupSizeControlProperties; }; using PhysicalDeviceSubgroupSizeControlPropertiesEXT = PhysicalDeviceSubgroupSizeControlProperties; struct PhysicalDeviceSubpassMergeFeedbackFeaturesEXT { using NativeType = VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceSubpassMergeFeedbackFeaturesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceSubpassMergeFeedbackFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 subpassMergeFeedback_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , subpassMergeFeedback{ subpassMergeFeedback_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceSubpassMergeFeedbackFeaturesEXT( PhysicalDeviceSubpassMergeFeedbackFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceSubpassMergeFeedbackFeaturesEXT( VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceSubpassMergeFeedbackFeaturesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceSubpassMergeFeedbackFeaturesEXT & operator=( PhysicalDeviceSubpassMergeFeedbackFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceSubpassMergeFeedbackFeaturesEXT & operator=( VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceSubpassMergeFeedbackFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceSubpassMergeFeedbackFeaturesEXT & setSubpassMergeFeedback( VULKAN_HPP_NAMESPACE::Bool32 subpassMergeFeedback_ ) VULKAN_HPP_NOEXCEPT { subpassMergeFeedback = subpassMergeFeedback_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, subpassMergeFeedback ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceSubpassMergeFeedbackFeaturesEXT const & ) const = default; #else bool operator==( PhysicalDeviceSubpassMergeFeedbackFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( subpassMergeFeedback == rhs.subpassMergeFeedback ); # endif } bool operator!=( PhysicalDeviceSubpassMergeFeedbackFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceSubpassMergeFeedbackFeaturesEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 subpassMergeFeedback = {}; }; template <> struct CppType { using Type = PhysicalDeviceSubpassMergeFeedbackFeaturesEXT; }; struct PhysicalDeviceSubpassShadingFeaturesHUAWEI { using NativeType = VkPhysicalDeviceSubpassShadingFeaturesHUAWEI; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceSubpassShadingFeaturesHUAWEI; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceSubpassShadingFeaturesHUAWEI( VULKAN_HPP_NAMESPACE::Bool32 subpassShading_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , subpassShading{ subpassShading_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceSubpassShadingFeaturesHUAWEI( PhysicalDeviceSubpassShadingFeaturesHUAWEI const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceSubpassShadingFeaturesHUAWEI( VkPhysicalDeviceSubpassShadingFeaturesHUAWEI const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceSubpassShadingFeaturesHUAWEI( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceSubpassShadingFeaturesHUAWEI & operator=( PhysicalDeviceSubpassShadingFeaturesHUAWEI const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceSubpassShadingFeaturesHUAWEI & operator=( VkPhysicalDeviceSubpassShadingFeaturesHUAWEI const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceSubpassShadingFeaturesHUAWEI & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceSubpassShadingFeaturesHUAWEI & setSubpassShading( VULKAN_HPP_NAMESPACE::Bool32 subpassShading_ ) VULKAN_HPP_NOEXCEPT { subpassShading = subpassShading_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceSubpassShadingFeaturesHUAWEI const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceSubpassShadingFeaturesHUAWEI &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, subpassShading ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceSubpassShadingFeaturesHUAWEI const & ) const = default; #else bool operator==( PhysicalDeviceSubpassShadingFeaturesHUAWEI const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( subpassShading == rhs.subpassShading ); # endif } bool operator!=( PhysicalDeviceSubpassShadingFeaturesHUAWEI const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceSubpassShadingFeaturesHUAWEI; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 subpassShading = {}; }; template <> struct CppType { using Type = PhysicalDeviceSubpassShadingFeaturesHUAWEI; }; struct PhysicalDeviceSubpassShadingPropertiesHUAWEI { using NativeType = VkPhysicalDeviceSubpassShadingPropertiesHUAWEI; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceSubpassShadingPropertiesHUAWEI; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceSubpassShadingPropertiesHUAWEI( uint32_t maxSubpassShadingWorkgroupSizeAspectRatio_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , maxSubpassShadingWorkgroupSizeAspectRatio{ maxSubpassShadingWorkgroupSizeAspectRatio_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceSubpassShadingPropertiesHUAWEI( PhysicalDeviceSubpassShadingPropertiesHUAWEI const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceSubpassShadingPropertiesHUAWEI( VkPhysicalDeviceSubpassShadingPropertiesHUAWEI const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceSubpassShadingPropertiesHUAWEI( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceSubpassShadingPropertiesHUAWEI & operator=( PhysicalDeviceSubpassShadingPropertiesHUAWEI const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceSubpassShadingPropertiesHUAWEI & operator=( VkPhysicalDeviceSubpassShadingPropertiesHUAWEI const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceSubpassShadingPropertiesHUAWEI const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceSubpassShadingPropertiesHUAWEI &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, maxSubpassShadingWorkgroupSizeAspectRatio ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceSubpassShadingPropertiesHUAWEI const & ) const = default; #else bool operator==( PhysicalDeviceSubpassShadingPropertiesHUAWEI const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( maxSubpassShadingWorkgroupSizeAspectRatio == rhs.maxSubpassShadingWorkgroupSizeAspectRatio ); # endif } bool operator!=( PhysicalDeviceSubpassShadingPropertiesHUAWEI const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceSubpassShadingPropertiesHUAWEI; void * pNext = {}; uint32_t maxSubpassShadingWorkgroupSizeAspectRatio = {}; }; template <> struct CppType { using Type = PhysicalDeviceSubpassShadingPropertiesHUAWEI; }; struct PhysicalDeviceSurfaceInfo2KHR { using NativeType = VkPhysicalDeviceSurfaceInfo2KHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceSurfaceInfo2KHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceSurfaceInfo2KHR( VULKAN_HPP_NAMESPACE::SurfaceKHR surface_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , surface{ surface_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceSurfaceInfo2KHR( PhysicalDeviceSurfaceInfo2KHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceSurfaceInfo2KHR( VkPhysicalDeviceSurfaceInfo2KHR const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceSurfaceInfo2KHR( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceSurfaceInfo2KHR & operator=( PhysicalDeviceSurfaceInfo2KHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceSurfaceInfo2KHR & operator=( VkPhysicalDeviceSurfaceInfo2KHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceSurfaceInfo2KHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceSurfaceInfo2KHR & setSurface( VULKAN_HPP_NAMESPACE::SurfaceKHR surface_ ) VULKAN_HPP_NOEXCEPT { surface = surface_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceSurfaceInfo2KHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceSurfaceInfo2KHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, surface ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceSurfaceInfo2KHR const & ) const = default; #else bool operator==( PhysicalDeviceSurfaceInfo2KHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( surface == rhs.surface ); # endif } bool operator!=( PhysicalDeviceSurfaceInfo2KHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceSurfaceInfo2KHR; const void * pNext = {}; VULKAN_HPP_NAMESPACE::SurfaceKHR surface = {}; }; template <> struct CppType { using Type = PhysicalDeviceSurfaceInfo2KHR; }; struct PhysicalDeviceSwapchainMaintenance1FeaturesEXT { using NativeType = VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceSwapchainMaintenance1FeaturesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceSwapchainMaintenance1FeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 swapchainMaintenance1_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , swapchainMaintenance1{ swapchainMaintenance1_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceSwapchainMaintenance1FeaturesEXT( PhysicalDeviceSwapchainMaintenance1FeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceSwapchainMaintenance1FeaturesEXT( VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceSwapchainMaintenance1FeaturesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceSwapchainMaintenance1FeaturesEXT & operator=( PhysicalDeviceSwapchainMaintenance1FeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceSwapchainMaintenance1FeaturesEXT & operator=( VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceSwapchainMaintenance1FeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceSwapchainMaintenance1FeaturesEXT & setSwapchainMaintenance1( VULKAN_HPP_NAMESPACE::Bool32 swapchainMaintenance1_ ) VULKAN_HPP_NOEXCEPT { swapchainMaintenance1 = swapchainMaintenance1_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, swapchainMaintenance1 ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceSwapchainMaintenance1FeaturesEXT const & ) const = default; #else bool operator==( PhysicalDeviceSwapchainMaintenance1FeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( swapchainMaintenance1 == rhs.swapchainMaintenance1 ); # endif } bool operator!=( PhysicalDeviceSwapchainMaintenance1FeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceSwapchainMaintenance1FeaturesEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 swapchainMaintenance1 = {}; }; template <> struct CppType { using Type = PhysicalDeviceSwapchainMaintenance1FeaturesEXT; }; struct PhysicalDeviceSynchronization2Features { using NativeType = VkPhysicalDeviceSynchronization2Features; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceSynchronization2Features; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceSynchronization2Features( VULKAN_HPP_NAMESPACE::Bool32 synchronization2_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , synchronization2{ synchronization2_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceSynchronization2Features( PhysicalDeviceSynchronization2Features const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceSynchronization2Features( VkPhysicalDeviceSynchronization2Features const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceSynchronization2Features( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceSynchronization2Features & operator=( PhysicalDeviceSynchronization2Features const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceSynchronization2Features & operator=( VkPhysicalDeviceSynchronization2Features const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceSynchronization2Features & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceSynchronization2Features & setSynchronization2( VULKAN_HPP_NAMESPACE::Bool32 synchronization2_ ) VULKAN_HPP_NOEXCEPT { synchronization2 = synchronization2_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceSynchronization2Features const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceSynchronization2Features &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, synchronization2 ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceSynchronization2Features const & ) const = default; #else bool operator==( PhysicalDeviceSynchronization2Features const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( synchronization2 == rhs.synchronization2 ); # endif } bool operator!=( PhysicalDeviceSynchronization2Features const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceSynchronization2Features; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 synchronization2 = {}; }; template <> struct CppType { using Type = PhysicalDeviceSynchronization2Features; }; using PhysicalDeviceSynchronization2FeaturesKHR = PhysicalDeviceSynchronization2Features; struct PhysicalDeviceTexelBufferAlignmentFeaturesEXT { using NativeType = VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceTexelBufferAlignmentFeaturesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceTexelBufferAlignmentFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 texelBufferAlignment_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , texelBufferAlignment{ texelBufferAlignment_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceTexelBufferAlignmentFeaturesEXT( PhysicalDeviceTexelBufferAlignmentFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceTexelBufferAlignmentFeaturesEXT( VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceTexelBufferAlignmentFeaturesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceTexelBufferAlignmentFeaturesEXT & operator=( PhysicalDeviceTexelBufferAlignmentFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceTexelBufferAlignmentFeaturesEXT & operator=( VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceTexelBufferAlignmentFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceTexelBufferAlignmentFeaturesEXT & setTexelBufferAlignment( VULKAN_HPP_NAMESPACE::Bool32 texelBufferAlignment_ ) VULKAN_HPP_NOEXCEPT { texelBufferAlignment = texelBufferAlignment_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, texelBufferAlignment ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceTexelBufferAlignmentFeaturesEXT const & ) const = default; #else bool operator==( PhysicalDeviceTexelBufferAlignmentFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( texelBufferAlignment == rhs.texelBufferAlignment ); # endif } bool operator!=( PhysicalDeviceTexelBufferAlignmentFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceTexelBufferAlignmentFeaturesEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 texelBufferAlignment = {}; }; template <> struct CppType { using Type = PhysicalDeviceTexelBufferAlignmentFeaturesEXT; }; struct PhysicalDeviceTexelBufferAlignmentProperties { using NativeType = VkPhysicalDeviceTexelBufferAlignmentProperties; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceTexelBufferAlignmentProperties; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceTexelBufferAlignmentProperties( VULKAN_HPP_NAMESPACE::DeviceSize storageTexelBufferOffsetAlignmentBytes_ = {}, VULKAN_HPP_NAMESPACE::Bool32 storageTexelBufferOffsetSingleTexelAlignment_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize uniformTexelBufferOffsetAlignmentBytes_ = {}, VULKAN_HPP_NAMESPACE::Bool32 uniformTexelBufferOffsetSingleTexelAlignment_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , storageTexelBufferOffsetAlignmentBytes{ storageTexelBufferOffsetAlignmentBytes_ } , storageTexelBufferOffsetSingleTexelAlignment{ storageTexelBufferOffsetSingleTexelAlignment_ } , uniformTexelBufferOffsetAlignmentBytes{ uniformTexelBufferOffsetAlignmentBytes_ } , uniformTexelBufferOffsetSingleTexelAlignment{ uniformTexelBufferOffsetSingleTexelAlignment_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceTexelBufferAlignmentProperties( PhysicalDeviceTexelBufferAlignmentProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceTexelBufferAlignmentProperties( VkPhysicalDeviceTexelBufferAlignmentProperties const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceTexelBufferAlignmentProperties( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceTexelBufferAlignmentProperties & operator=( PhysicalDeviceTexelBufferAlignmentProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceTexelBufferAlignmentProperties & operator=( VkPhysicalDeviceTexelBufferAlignmentProperties const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceTexelBufferAlignmentProperties const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceTexelBufferAlignmentProperties &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, storageTexelBufferOffsetAlignmentBytes, storageTexelBufferOffsetSingleTexelAlignment, uniformTexelBufferOffsetAlignmentBytes, uniformTexelBufferOffsetSingleTexelAlignment ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceTexelBufferAlignmentProperties const & ) const = default; #else bool operator==( PhysicalDeviceTexelBufferAlignmentProperties const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( storageTexelBufferOffsetAlignmentBytes == rhs.storageTexelBufferOffsetAlignmentBytes ) && ( storageTexelBufferOffsetSingleTexelAlignment == rhs.storageTexelBufferOffsetSingleTexelAlignment ) && ( uniformTexelBufferOffsetAlignmentBytes == rhs.uniformTexelBufferOffsetAlignmentBytes ) && ( uniformTexelBufferOffsetSingleTexelAlignment == rhs.uniformTexelBufferOffsetSingleTexelAlignment ); # endif } bool operator!=( PhysicalDeviceTexelBufferAlignmentProperties const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceTexelBufferAlignmentProperties; void * pNext = {}; VULKAN_HPP_NAMESPACE::DeviceSize storageTexelBufferOffsetAlignmentBytes = {}; VULKAN_HPP_NAMESPACE::Bool32 storageTexelBufferOffsetSingleTexelAlignment = {}; VULKAN_HPP_NAMESPACE::DeviceSize uniformTexelBufferOffsetAlignmentBytes = {}; VULKAN_HPP_NAMESPACE::Bool32 uniformTexelBufferOffsetSingleTexelAlignment = {}; }; template <> struct CppType { using Type = PhysicalDeviceTexelBufferAlignmentProperties; }; using PhysicalDeviceTexelBufferAlignmentPropertiesEXT = PhysicalDeviceTexelBufferAlignmentProperties; struct PhysicalDeviceTextureCompressionASTCHDRFeatures { using NativeType = VkPhysicalDeviceTextureCompressionASTCHDRFeatures; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceTextureCompressionAstcHdrFeatures; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceTextureCompressionASTCHDRFeatures( VULKAN_HPP_NAMESPACE::Bool32 textureCompressionASTC_HDR_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , textureCompressionASTC_HDR{ textureCompressionASTC_HDR_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceTextureCompressionASTCHDRFeatures( PhysicalDeviceTextureCompressionASTCHDRFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceTextureCompressionASTCHDRFeatures( VkPhysicalDeviceTextureCompressionASTCHDRFeatures const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceTextureCompressionASTCHDRFeatures( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceTextureCompressionASTCHDRFeatures & operator=( PhysicalDeviceTextureCompressionASTCHDRFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceTextureCompressionASTCHDRFeatures & operator=( VkPhysicalDeviceTextureCompressionASTCHDRFeatures const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceTextureCompressionASTCHDRFeatures & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceTextureCompressionASTCHDRFeatures & setTextureCompressionASTC_HDR( VULKAN_HPP_NAMESPACE::Bool32 textureCompressionASTC_HDR_ ) VULKAN_HPP_NOEXCEPT { textureCompressionASTC_HDR = textureCompressionASTC_HDR_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceTextureCompressionASTCHDRFeatures const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceTextureCompressionASTCHDRFeatures &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, textureCompressionASTC_HDR ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceTextureCompressionASTCHDRFeatures const & ) const = default; #else bool operator==( PhysicalDeviceTextureCompressionASTCHDRFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( textureCompressionASTC_HDR == rhs.textureCompressionASTC_HDR ); # endif } bool operator!=( PhysicalDeviceTextureCompressionASTCHDRFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceTextureCompressionAstcHdrFeatures; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 textureCompressionASTC_HDR = {}; }; template <> struct CppType { using Type = PhysicalDeviceTextureCompressionASTCHDRFeatures; }; using PhysicalDeviceTextureCompressionASTCHDRFeaturesEXT = PhysicalDeviceTextureCompressionASTCHDRFeatures; struct PhysicalDeviceTilePropertiesFeaturesQCOM { using NativeType = VkPhysicalDeviceTilePropertiesFeaturesQCOM; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceTilePropertiesFeaturesQCOM; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceTilePropertiesFeaturesQCOM( VULKAN_HPP_NAMESPACE::Bool32 tileProperties_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , tileProperties{ tileProperties_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceTilePropertiesFeaturesQCOM( PhysicalDeviceTilePropertiesFeaturesQCOM const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceTilePropertiesFeaturesQCOM( VkPhysicalDeviceTilePropertiesFeaturesQCOM const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceTilePropertiesFeaturesQCOM( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceTilePropertiesFeaturesQCOM & operator=( PhysicalDeviceTilePropertiesFeaturesQCOM const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceTilePropertiesFeaturesQCOM & operator=( VkPhysicalDeviceTilePropertiesFeaturesQCOM const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceTilePropertiesFeaturesQCOM & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceTilePropertiesFeaturesQCOM & setTileProperties( VULKAN_HPP_NAMESPACE::Bool32 tileProperties_ ) VULKAN_HPP_NOEXCEPT { tileProperties = tileProperties_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceTilePropertiesFeaturesQCOM const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceTilePropertiesFeaturesQCOM &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, tileProperties ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceTilePropertiesFeaturesQCOM const & ) const = default; #else bool operator==( PhysicalDeviceTilePropertiesFeaturesQCOM const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( tileProperties == rhs.tileProperties ); # endif } bool operator!=( PhysicalDeviceTilePropertiesFeaturesQCOM const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceTilePropertiesFeaturesQCOM; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 tileProperties = {}; }; template <> struct CppType { using Type = PhysicalDeviceTilePropertiesFeaturesQCOM; }; struct PhysicalDeviceTimelineSemaphoreFeatures { using NativeType = VkPhysicalDeviceTimelineSemaphoreFeatures; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceTimelineSemaphoreFeatures; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceTimelineSemaphoreFeatures( VULKAN_HPP_NAMESPACE::Bool32 timelineSemaphore_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , timelineSemaphore{ timelineSemaphore_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceTimelineSemaphoreFeatures( PhysicalDeviceTimelineSemaphoreFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceTimelineSemaphoreFeatures( VkPhysicalDeviceTimelineSemaphoreFeatures const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceTimelineSemaphoreFeatures( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceTimelineSemaphoreFeatures & operator=( PhysicalDeviceTimelineSemaphoreFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceTimelineSemaphoreFeatures & operator=( VkPhysicalDeviceTimelineSemaphoreFeatures const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceTimelineSemaphoreFeatures & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceTimelineSemaphoreFeatures & setTimelineSemaphore( VULKAN_HPP_NAMESPACE::Bool32 timelineSemaphore_ ) VULKAN_HPP_NOEXCEPT { timelineSemaphore = timelineSemaphore_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceTimelineSemaphoreFeatures const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceTimelineSemaphoreFeatures &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, timelineSemaphore ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceTimelineSemaphoreFeatures const & ) const = default; #else bool operator==( PhysicalDeviceTimelineSemaphoreFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( timelineSemaphore == rhs.timelineSemaphore ); # endif } bool operator!=( PhysicalDeviceTimelineSemaphoreFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceTimelineSemaphoreFeatures; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 timelineSemaphore = {}; }; template <> struct CppType { using Type = PhysicalDeviceTimelineSemaphoreFeatures; }; using PhysicalDeviceTimelineSemaphoreFeaturesKHR = PhysicalDeviceTimelineSemaphoreFeatures; struct PhysicalDeviceTimelineSemaphoreProperties { using NativeType = VkPhysicalDeviceTimelineSemaphoreProperties; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceTimelineSemaphoreProperties; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceTimelineSemaphoreProperties( uint64_t maxTimelineSemaphoreValueDifference_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , maxTimelineSemaphoreValueDifference{ maxTimelineSemaphoreValueDifference_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceTimelineSemaphoreProperties( PhysicalDeviceTimelineSemaphoreProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceTimelineSemaphoreProperties( VkPhysicalDeviceTimelineSemaphoreProperties const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceTimelineSemaphoreProperties( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceTimelineSemaphoreProperties & operator=( PhysicalDeviceTimelineSemaphoreProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceTimelineSemaphoreProperties & operator=( VkPhysicalDeviceTimelineSemaphoreProperties const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceTimelineSemaphoreProperties const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceTimelineSemaphoreProperties &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, maxTimelineSemaphoreValueDifference ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceTimelineSemaphoreProperties const & ) const = default; #else bool operator==( PhysicalDeviceTimelineSemaphoreProperties const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( maxTimelineSemaphoreValueDifference == rhs.maxTimelineSemaphoreValueDifference ); # endif } bool operator!=( PhysicalDeviceTimelineSemaphoreProperties const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceTimelineSemaphoreProperties; void * pNext = {}; uint64_t maxTimelineSemaphoreValueDifference = {}; }; template <> struct CppType { using Type = PhysicalDeviceTimelineSemaphoreProperties; }; using PhysicalDeviceTimelineSemaphorePropertiesKHR = PhysicalDeviceTimelineSemaphoreProperties; struct PhysicalDeviceToolProperties { using NativeType = VkPhysicalDeviceToolProperties; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceToolProperties; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceToolProperties( std::array const & name_ = {}, std::array const & version_ = {}, VULKAN_HPP_NAMESPACE::ToolPurposeFlags purposes_ = {}, std::array const & description_ = {}, std::array const & layer_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , name{ name_ } , version{ version_ } , purposes{ purposes_ } , description{ description_ } , layer{ layer_ } { } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceToolProperties( PhysicalDeviceToolProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceToolProperties( VkPhysicalDeviceToolProperties const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceToolProperties( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceToolProperties & operator=( PhysicalDeviceToolProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceToolProperties & operator=( VkPhysicalDeviceToolProperties const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceToolProperties const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceToolProperties &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple const &, VULKAN_HPP_NAMESPACE::ArrayWrapper1D const &, VULKAN_HPP_NAMESPACE::ToolPurposeFlags const &, VULKAN_HPP_NAMESPACE::ArrayWrapper1D const &, VULKAN_HPP_NAMESPACE::ArrayWrapper1D const &> # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, name, version, purposes, description, layer ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) std::strong_ordering operator<=>( PhysicalDeviceToolProperties const & rhs ) const VULKAN_HPP_NOEXCEPT { if ( auto cmp = sType <=> rhs.sType; cmp != 0 ) return cmp; if ( auto cmp = pNext <=> rhs.pNext; cmp != 0 ) return cmp; if ( auto cmp = strcmp( name, rhs.name ); cmp != 0 ) return ( cmp < 0 ) ? std::strong_ordering::less : std::strong_ordering::greater; if ( auto cmp = strcmp( version, rhs.version ); cmp != 0 ) return ( cmp < 0 ) ? std::strong_ordering::less : std::strong_ordering::greater; if ( auto cmp = purposes <=> rhs.purposes; cmp != 0 ) return cmp; if ( auto cmp = strcmp( description, rhs.description ); cmp != 0 ) return ( cmp < 0 ) ? std::strong_ordering::less : std::strong_ordering::greater; if ( auto cmp = strcmp( layer, rhs.layer ); cmp != 0 ) return ( cmp < 0 ) ? std::strong_ordering::less : std::strong_ordering::greater; return std::strong_ordering::equivalent; } #endif bool operator==( PhysicalDeviceToolProperties const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( strcmp( name, rhs.name ) == 0 ) && ( strcmp( version, rhs.version ) == 0 ) && ( purposes == rhs.purposes ) && ( strcmp( description, rhs.description ) == 0 ) && ( strcmp( layer, rhs.layer ) == 0 ); } bool operator!=( PhysicalDeviceToolProperties const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceToolProperties; void * pNext = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D name = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D version = {}; VULKAN_HPP_NAMESPACE::ToolPurposeFlags purposes = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D description = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D layer = {}; }; template <> struct CppType { using Type = PhysicalDeviceToolProperties; }; using PhysicalDeviceToolPropertiesEXT = PhysicalDeviceToolProperties; struct PhysicalDeviceTransformFeedbackFeaturesEXT { using NativeType = VkPhysicalDeviceTransformFeedbackFeaturesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceTransformFeedbackFeaturesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceTransformFeedbackFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 transformFeedback_ = {}, VULKAN_HPP_NAMESPACE::Bool32 geometryStreams_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , transformFeedback{ transformFeedback_ } , geometryStreams{ geometryStreams_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceTransformFeedbackFeaturesEXT( PhysicalDeviceTransformFeedbackFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceTransformFeedbackFeaturesEXT( VkPhysicalDeviceTransformFeedbackFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceTransformFeedbackFeaturesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceTransformFeedbackFeaturesEXT & operator=( PhysicalDeviceTransformFeedbackFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceTransformFeedbackFeaturesEXT & operator=( VkPhysicalDeviceTransformFeedbackFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceTransformFeedbackFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceTransformFeedbackFeaturesEXT & setTransformFeedback( VULKAN_HPP_NAMESPACE::Bool32 transformFeedback_ ) VULKAN_HPP_NOEXCEPT { transformFeedback = transformFeedback_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceTransformFeedbackFeaturesEXT & setGeometryStreams( VULKAN_HPP_NAMESPACE::Bool32 geometryStreams_ ) VULKAN_HPP_NOEXCEPT { geometryStreams = geometryStreams_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceTransformFeedbackFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceTransformFeedbackFeaturesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, transformFeedback, geometryStreams ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceTransformFeedbackFeaturesEXT const & ) const = default; #else bool operator==( PhysicalDeviceTransformFeedbackFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( transformFeedback == rhs.transformFeedback ) && ( geometryStreams == rhs.geometryStreams ); # endif } bool operator!=( PhysicalDeviceTransformFeedbackFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceTransformFeedbackFeaturesEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 transformFeedback = {}; VULKAN_HPP_NAMESPACE::Bool32 geometryStreams = {}; }; template <> struct CppType { using Type = PhysicalDeviceTransformFeedbackFeaturesEXT; }; struct PhysicalDeviceTransformFeedbackPropertiesEXT { using NativeType = VkPhysicalDeviceTransformFeedbackPropertiesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceTransformFeedbackPropertiesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceTransformFeedbackPropertiesEXT( uint32_t maxTransformFeedbackStreams_ = {}, uint32_t maxTransformFeedbackBuffers_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize maxTransformFeedbackBufferSize_ = {}, uint32_t maxTransformFeedbackStreamDataSize_ = {}, uint32_t maxTransformFeedbackBufferDataSize_ = {}, uint32_t maxTransformFeedbackBufferDataStride_ = {}, VULKAN_HPP_NAMESPACE::Bool32 transformFeedbackQueries_ = {}, VULKAN_HPP_NAMESPACE::Bool32 transformFeedbackStreamsLinesTriangles_ = {}, VULKAN_HPP_NAMESPACE::Bool32 transformFeedbackRasterizationStreamSelect_ = {}, VULKAN_HPP_NAMESPACE::Bool32 transformFeedbackDraw_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , maxTransformFeedbackStreams{ maxTransformFeedbackStreams_ } , maxTransformFeedbackBuffers{ maxTransformFeedbackBuffers_ } , maxTransformFeedbackBufferSize{ maxTransformFeedbackBufferSize_ } , maxTransformFeedbackStreamDataSize{ maxTransformFeedbackStreamDataSize_ } , maxTransformFeedbackBufferDataSize{ maxTransformFeedbackBufferDataSize_ } , maxTransformFeedbackBufferDataStride{ maxTransformFeedbackBufferDataStride_ } , transformFeedbackQueries{ transformFeedbackQueries_ } , transformFeedbackStreamsLinesTriangles{ transformFeedbackStreamsLinesTriangles_ } , transformFeedbackRasterizationStreamSelect{ transformFeedbackRasterizationStreamSelect_ } , transformFeedbackDraw{ transformFeedbackDraw_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceTransformFeedbackPropertiesEXT( PhysicalDeviceTransformFeedbackPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceTransformFeedbackPropertiesEXT( VkPhysicalDeviceTransformFeedbackPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceTransformFeedbackPropertiesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceTransformFeedbackPropertiesEXT & operator=( PhysicalDeviceTransformFeedbackPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceTransformFeedbackPropertiesEXT & operator=( VkPhysicalDeviceTransformFeedbackPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceTransformFeedbackPropertiesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceTransformFeedbackPropertiesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, maxTransformFeedbackStreams, maxTransformFeedbackBuffers, maxTransformFeedbackBufferSize, maxTransformFeedbackStreamDataSize, maxTransformFeedbackBufferDataSize, maxTransformFeedbackBufferDataStride, transformFeedbackQueries, transformFeedbackStreamsLinesTriangles, transformFeedbackRasterizationStreamSelect, transformFeedbackDraw ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceTransformFeedbackPropertiesEXT const & ) const = default; #else bool operator==( PhysicalDeviceTransformFeedbackPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( maxTransformFeedbackStreams == rhs.maxTransformFeedbackStreams ) && ( maxTransformFeedbackBuffers == rhs.maxTransformFeedbackBuffers ) && ( maxTransformFeedbackBufferSize == rhs.maxTransformFeedbackBufferSize ) && ( maxTransformFeedbackStreamDataSize == rhs.maxTransformFeedbackStreamDataSize ) && ( maxTransformFeedbackBufferDataSize == rhs.maxTransformFeedbackBufferDataSize ) && ( maxTransformFeedbackBufferDataStride == rhs.maxTransformFeedbackBufferDataStride ) && ( transformFeedbackQueries == rhs.transformFeedbackQueries ) && ( transformFeedbackStreamsLinesTriangles == rhs.transformFeedbackStreamsLinesTriangles ) && ( transformFeedbackRasterizationStreamSelect == rhs.transformFeedbackRasterizationStreamSelect ) && ( transformFeedbackDraw == rhs.transformFeedbackDraw ); # endif } bool operator!=( PhysicalDeviceTransformFeedbackPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceTransformFeedbackPropertiesEXT; void * pNext = {}; uint32_t maxTransformFeedbackStreams = {}; uint32_t maxTransformFeedbackBuffers = {}; VULKAN_HPP_NAMESPACE::DeviceSize maxTransformFeedbackBufferSize = {}; uint32_t maxTransformFeedbackStreamDataSize = {}; uint32_t maxTransformFeedbackBufferDataSize = {}; uint32_t maxTransformFeedbackBufferDataStride = {}; VULKAN_HPP_NAMESPACE::Bool32 transformFeedbackQueries = {}; VULKAN_HPP_NAMESPACE::Bool32 transformFeedbackStreamsLinesTriangles = {}; VULKAN_HPP_NAMESPACE::Bool32 transformFeedbackRasterizationStreamSelect = {}; VULKAN_HPP_NAMESPACE::Bool32 transformFeedbackDraw = {}; }; template <> struct CppType { using Type = PhysicalDeviceTransformFeedbackPropertiesEXT; }; struct PhysicalDeviceUniformBufferStandardLayoutFeatures { using NativeType = VkPhysicalDeviceUniformBufferStandardLayoutFeatures; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceUniformBufferStandardLayoutFeatures; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceUniformBufferStandardLayoutFeatures( VULKAN_HPP_NAMESPACE::Bool32 uniformBufferStandardLayout_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , uniformBufferStandardLayout{ uniformBufferStandardLayout_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceUniformBufferStandardLayoutFeatures( PhysicalDeviceUniformBufferStandardLayoutFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceUniformBufferStandardLayoutFeatures( VkPhysicalDeviceUniformBufferStandardLayoutFeatures const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceUniformBufferStandardLayoutFeatures( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceUniformBufferStandardLayoutFeatures & operator=( PhysicalDeviceUniformBufferStandardLayoutFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceUniformBufferStandardLayoutFeatures & operator=( VkPhysicalDeviceUniformBufferStandardLayoutFeatures const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceUniformBufferStandardLayoutFeatures & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceUniformBufferStandardLayoutFeatures & setUniformBufferStandardLayout( VULKAN_HPP_NAMESPACE::Bool32 uniformBufferStandardLayout_ ) VULKAN_HPP_NOEXCEPT { uniformBufferStandardLayout = uniformBufferStandardLayout_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceUniformBufferStandardLayoutFeatures const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceUniformBufferStandardLayoutFeatures &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, uniformBufferStandardLayout ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceUniformBufferStandardLayoutFeatures const & ) const = default; #else bool operator==( PhysicalDeviceUniformBufferStandardLayoutFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( uniformBufferStandardLayout == rhs.uniformBufferStandardLayout ); # endif } bool operator!=( PhysicalDeviceUniformBufferStandardLayoutFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceUniformBufferStandardLayoutFeatures; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 uniformBufferStandardLayout = {}; }; template <> struct CppType { using Type = PhysicalDeviceUniformBufferStandardLayoutFeatures; }; using PhysicalDeviceUniformBufferStandardLayoutFeaturesKHR = PhysicalDeviceUniformBufferStandardLayoutFeatures; struct PhysicalDeviceVariablePointersFeatures { using NativeType = VkPhysicalDeviceVariablePointersFeatures; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceVariablePointersFeatures; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceVariablePointersFeatures( VULKAN_HPP_NAMESPACE::Bool32 variablePointersStorageBuffer_ = {}, VULKAN_HPP_NAMESPACE::Bool32 variablePointers_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , variablePointersStorageBuffer{ variablePointersStorageBuffer_ } , variablePointers{ variablePointers_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceVariablePointersFeatures( PhysicalDeviceVariablePointersFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceVariablePointersFeatures( VkPhysicalDeviceVariablePointersFeatures const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceVariablePointersFeatures( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceVariablePointersFeatures & operator=( PhysicalDeviceVariablePointersFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceVariablePointersFeatures & operator=( VkPhysicalDeviceVariablePointersFeatures const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVariablePointersFeatures & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVariablePointersFeatures & setVariablePointersStorageBuffer( VULKAN_HPP_NAMESPACE::Bool32 variablePointersStorageBuffer_ ) VULKAN_HPP_NOEXCEPT { variablePointersStorageBuffer = variablePointersStorageBuffer_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVariablePointersFeatures & setVariablePointers( VULKAN_HPP_NAMESPACE::Bool32 variablePointers_ ) VULKAN_HPP_NOEXCEPT { variablePointers = variablePointers_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceVariablePointersFeatures const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceVariablePointersFeatures &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, variablePointersStorageBuffer, variablePointers ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceVariablePointersFeatures const & ) const = default; #else bool operator==( PhysicalDeviceVariablePointersFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( variablePointersStorageBuffer == rhs.variablePointersStorageBuffer ) && ( variablePointers == rhs.variablePointers ); # endif } bool operator!=( PhysicalDeviceVariablePointersFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceVariablePointersFeatures; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 variablePointersStorageBuffer = {}; VULKAN_HPP_NAMESPACE::Bool32 variablePointers = {}; }; template <> struct CppType { using Type = PhysicalDeviceVariablePointersFeatures; }; using PhysicalDeviceVariablePointerFeatures = PhysicalDeviceVariablePointersFeatures; using PhysicalDeviceVariablePointerFeaturesKHR = PhysicalDeviceVariablePointersFeatures; using PhysicalDeviceVariablePointersFeaturesKHR = PhysicalDeviceVariablePointersFeatures; struct PhysicalDeviceVertexAttributeDivisorFeatures { using NativeType = VkPhysicalDeviceVertexAttributeDivisorFeatures; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceVertexAttributeDivisorFeatures; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceVertexAttributeDivisorFeatures( VULKAN_HPP_NAMESPACE::Bool32 vertexAttributeInstanceRateDivisor_ = {}, VULKAN_HPP_NAMESPACE::Bool32 vertexAttributeInstanceRateZeroDivisor_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , vertexAttributeInstanceRateDivisor{ vertexAttributeInstanceRateDivisor_ } , vertexAttributeInstanceRateZeroDivisor{ vertexAttributeInstanceRateZeroDivisor_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceVertexAttributeDivisorFeatures( PhysicalDeviceVertexAttributeDivisorFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceVertexAttributeDivisorFeatures( VkPhysicalDeviceVertexAttributeDivisorFeatures const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceVertexAttributeDivisorFeatures( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceVertexAttributeDivisorFeatures & operator=( PhysicalDeviceVertexAttributeDivisorFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceVertexAttributeDivisorFeatures & operator=( VkPhysicalDeviceVertexAttributeDivisorFeatures const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVertexAttributeDivisorFeatures & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVertexAttributeDivisorFeatures & setVertexAttributeInstanceRateDivisor( VULKAN_HPP_NAMESPACE::Bool32 vertexAttributeInstanceRateDivisor_ ) VULKAN_HPP_NOEXCEPT { vertexAttributeInstanceRateDivisor = vertexAttributeInstanceRateDivisor_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVertexAttributeDivisorFeatures & setVertexAttributeInstanceRateZeroDivisor( VULKAN_HPP_NAMESPACE::Bool32 vertexAttributeInstanceRateZeroDivisor_ ) VULKAN_HPP_NOEXCEPT { vertexAttributeInstanceRateZeroDivisor = vertexAttributeInstanceRateZeroDivisor_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceVertexAttributeDivisorFeatures const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceVertexAttributeDivisorFeatures &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, vertexAttributeInstanceRateDivisor, vertexAttributeInstanceRateZeroDivisor ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceVertexAttributeDivisorFeatures const & ) const = default; #else bool operator==( PhysicalDeviceVertexAttributeDivisorFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( vertexAttributeInstanceRateDivisor == rhs.vertexAttributeInstanceRateDivisor ) && ( vertexAttributeInstanceRateZeroDivisor == rhs.vertexAttributeInstanceRateZeroDivisor ); # endif } bool operator!=( PhysicalDeviceVertexAttributeDivisorFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceVertexAttributeDivisorFeatures; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 vertexAttributeInstanceRateDivisor = {}; VULKAN_HPP_NAMESPACE::Bool32 vertexAttributeInstanceRateZeroDivisor = {}; }; template <> struct CppType { using Type = PhysicalDeviceVertexAttributeDivisorFeatures; }; using PhysicalDeviceVertexAttributeDivisorFeaturesEXT = PhysicalDeviceVertexAttributeDivisorFeatures; using PhysicalDeviceVertexAttributeDivisorFeaturesKHR = PhysicalDeviceVertexAttributeDivisorFeatures; struct PhysicalDeviceVertexAttributeDivisorProperties { using NativeType = VkPhysicalDeviceVertexAttributeDivisorProperties; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceVertexAttributeDivisorProperties; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceVertexAttributeDivisorProperties( uint32_t maxVertexAttribDivisor_ = {}, VULKAN_HPP_NAMESPACE::Bool32 supportsNonZeroFirstInstance_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , maxVertexAttribDivisor{ maxVertexAttribDivisor_ } , supportsNonZeroFirstInstance{ supportsNonZeroFirstInstance_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceVertexAttributeDivisorProperties( PhysicalDeviceVertexAttributeDivisorProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceVertexAttributeDivisorProperties( VkPhysicalDeviceVertexAttributeDivisorProperties const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceVertexAttributeDivisorProperties( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceVertexAttributeDivisorProperties & operator=( PhysicalDeviceVertexAttributeDivisorProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceVertexAttributeDivisorProperties & operator=( VkPhysicalDeviceVertexAttributeDivisorProperties const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceVertexAttributeDivisorProperties const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceVertexAttributeDivisorProperties &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, maxVertexAttribDivisor, supportsNonZeroFirstInstance ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceVertexAttributeDivisorProperties const & ) const = default; #else bool operator==( PhysicalDeviceVertexAttributeDivisorProperties const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( maxVertexAttribDivisor == rhs.maxVertexAttribDivisor ) && ( supportsNonZeroFirstInstance == rhs.supportsNonZeroFirstInstance ); # endif } bool operator!=( PhysicalDeviceVertexAttributeDivisorProperties const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceVertexAttributeDivisorProperties; void * pNext = {}; uint32_t maxVertexAttribDivisor = {}; VULKAN_HPP_NAMESPACE::Bool32 supportsNonZeroFirstInstance = {}; }; template <> struct CppType { using Type = PhysicalDeviceVertexAttributeDivisorProperties; }; using PhysicalDeviceVertexAttributeDivisorPropertiesKHR = PhysicalDeviceVertexAttributeDivisorProperties; struct PhysicalDeviceVertexAttributeDivisorPropertiesEXT { using NativeType = VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceVertexAttributeDivisorPropertiesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceVertexAttributeDivisorPropertiesEXT( uint32_t maxVertexAttribDivisor_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , maxVertexAttribDivisor{ maxVertexAttribDivisor_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceVertexAttributeDivisorPropertiesEXT( PhysicalDeviceVertexAttributeDivisorPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceVertexAttributeDivisorPropertiesEXT( VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceVertexAttributeDivisorPropertiesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceVertexAttributeDivisorPropertiesEXT & operator=( PhysicalDeviceVertexAttributeDivisorPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceVertexAttributeDivisorPropertiesEXT & operator=( VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, maxVertexAttribDivisor ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceVertexAttributeDivisorPropertiesEXT const & ) const = default; #else bool operator==( PhysicalDeviceVertexAttributeDivisorPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( maxVertexAttribDivisor == rhs.maxVertexAttribDivisor ); # endif } bool operator!=( PhysicalDeviceVertexAttributeDivisorPropertiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceVertexAttributeDivisorPropertiesEXT; void * pNext = {}; uint32_t maxVertexAttribDivisor = {}; }; template <> struct CppType { using Type = PhysicalDeviceVertexAttributeDivisorPropertiesEXT; }; struct PhysicalDeviceVertexAttributeRobustnessFeaturesEXT { using NativeType = VkPhysicalDeviceVertexAttributeRobustnessFeaturesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceVertexAttributeRobustnessFeaturesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceVertexAttributeRobustnessFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 vertexAttributeRobustness_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , vertexAttributeRobustness{ vertexAttributeRobustness_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceVertexAttributeRobustnessFeaturesEXT( PhysicalDeviceVertexAttributeRobustnessFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceVertexAttributeRobustnessFeaturesEXT( VkPhysicalDeviceVertexAttributeRobustnessFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceVertexAttributeRobustnessFeaturesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceVertexAttributeRobustnessFeaturesEXT & operator=( PhysicalDeviceVertexAttributeRobustnessFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceVertexAttributeRobustnessFeaturesEXT & operator=( VkPhysicalDeviceVertexAttributeRobustnessFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVertexAttributeRobustnessFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVertexAttributeRobustnessFeaturesEXT & setVertexAttributeRobustness( VULKAN_HPP_NAMESPACE::Bool32 vertexAttributeRobustness_ ) VULKAN_HPP_NOEXCEPT { vertexAttributeRobustness = vertexAttributeRobustness_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceVertexAttributeRobustnessFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceVertexAttributeRobustnessFeaturesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, vertexAttributeRobustness ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceVertexAttributeRobustnessFeaturesEXT const & ) const = default; #else bool operator==( PhysicalDeviceVertexAttributeRobustnessFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( vertexAttributeRobustness == rhs.vertexAttributeRobustness ); # endif } bool operator!=( PhysicalDeviceVertexAttributeRobustnessFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceVertexAttributeRobustnessFeaturesEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 vertexAttributeRobustness = {}; }; template <> struct CppType { using Type = PhysicalDeviceVertexAttributeRobustnessFeaturesEXT; }; struct PhysicalDeviceVertexInputDynamicStateFeaturesEXT { using NativeType = VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceVertexInputDynamicStateFeaturesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceVertexInputDynamicStateFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 vertexInputDynamicState_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , vertexInputDynamicState{ vertexInputDynamicState_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceVertexInputDynamicStateFeaturesEXT( PhysicalDeviceVertexInputDynamicStateFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceVertexInputDynamicStateFeaturesEXT( VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceVertexInputDynamicStateFeaturesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceVertexInputDynamicStateFeaturesEXT & operator=( PhysicalDeviceVertexInputDynamicStateFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceVertexInputDynamicStateFeaturesEXT & operator=( VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVertexInputDynamicStateFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVertexInputDynamicStateFeaturesEXT & setVertexInputDynamicState( VULKAN_HPP_NAMESPACE::Bool32 vertexInputDynamicState_ ) VULKAN_HPP_NOEXCEPT { vertexInputDynamicState = vertexInputDynamicState_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, vertexInputDynamicState ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceVertexInputDynamicStateFeaturesEXT const & ) const = default; #else bool operator==( PhysicalDeviceVertexInputDynamicStateFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( vertexInputDynamicState == rhs.vertexInputDynamicState ); # endif } bool operator!=( PhysicalDeviceVertexInputDynamicStateFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceVertexInputDynamicStateFeaturesEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 vertexInputDynamicState = {}; }; template <> struct CppType { using Type = PhysicalDeviceVertexInputDynamicStateFeaturesEXT; }; struct PhysicalDeviceVideoEncodeAV1FeaturesKHR { using NativeType = VkPhysicalDeviceVideoEncodeAV1FeaturesKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceVideoEncodeAv1FeaturesKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceVideoEncodeAV1FeaturesKHR( VULKAN_HPP_NAMESPACE::Bool32 videoEncodeAV1_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , videoEncodeAV1{ videoEncodeAV1_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceVideoEncodeAV1FeaturesKHR( PhysicalDeviceVideoEncodeAV1FeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceVideoEncodeAV1FeaturesKHR( VkPhysicalDeviceVideoEncodeAV1FeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceVideoEncodeAV1FeaturesKHR( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceVideoEncodeAV1FeaturesKHR & operator=( PhysicalDeviceVideoEncodeAV1FeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceVideoEncodeAV1FeaturesKHR & operator=( VkPhysicalDeviceVideoEncodeAV1FeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVideoEncodeAV1FeaturesKHR & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVideoEncodeAV1FeaturesKHR & setVideoEncodeAV1( VULKAN_HPP_NAMESPACE::Bool32 videoEncodeAV1_ ) VULKAN_HPP_NOEXCEPT { videoEncodeAV1 = videoEncodeAV1_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceVideoEncodeAV1FeaturesKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceVideoEncodeAV1FeaturesKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, videoEncodeAV1 ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceVideoEncodeAV1FeaturesKHR const & ) const = default; #else bool operator==( PhysicalDeviceVideoEncodeAV1FeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( videoEncodeAV1 == rhs.videoEncodeAV1 ); # endif } bool operator!=( PhysicalDeviceVideoEncodeAV1FeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceVideoEncodeAv1FeaturesKHR; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 videoEncodeAV1 = {}; }; template <> struct CppType { using Type = PhysicalDeviceVideoEncodeAV1FeaturesKHR; }; struct VideoProfileInfoKHR { using NativeType = VkVideoProfileInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoProfileInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoProfileInfoKHR( VULKAN_HPP_NAMESPACE::VideoCodecOperationFlagBitsKHR videoCodecOperation_ = VULKAN_HPP_NAMESPACE::VideoCodecOperationFlagBitsKHR::eNone, VULKAN_HPP_NAMESPACE::VideoChromaSubsamplingFlagsKHR chromaSubsampling_ = {}, VULKAN_HPP_NAMESPACE::VideoComponentBitDepthFlagsKHR lumaBitDepth_ = {}, VULKAN_HPP_NAMESPACE::VideoComponentBitDepthFlagsKHR chromaBitDepth_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , videoCodecOperation{ videoCodecOperation_ } , chromaSubsampling{ chromaSubsampling_ } , lumaBitDepth{ lumaBitDepth_ } , chromaBitDepth{ chromaBitDepth_ } { } VULKAN_HPP_CONSTEXPR VideoProfileInfoKHR( VideoProfileInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoProfileInfoKHR( VkVideoProfileInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoProfileInfoKHR( *reinterpret_cast( &rhs ) ) { } VideoProfileInfoKHR & operator=( VideoProfileInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoProfileInfoKHR & operator=( VkVideoProfileInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 VideoProfileInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoProfileInfoKHR & setVideoCodecOperation( VULKAN_HPP_NAMESPACE::VideoCodecOperationFlagBitsKHR videoCodecOperation_ ) VULKAN_HPP_NOEXCEPT { videoCodecOperation = videoCodecOperation_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoProfileInfoKHR & setChromaSubsampling( VULKAN_HPP_NAMESPACE::VideoChromaSubsamplingFlagsKHR chromaSubsampling_ ) VULKAN_HPP_NOEXCEPT { chromaSubsampling = chromaSubsampling_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoProfileInfoKHR & setLumaBitDepth( VULKAN_HPP_NAMESPACE::VideoComponentBitDepthFlagsKHR lumaBitDepth_ ) VULKAN_HPP_NOEXCEPT { lumaBitDepth = lumaBitDepth_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoProfileInfoKHR & setChromaBitDepth( VULKAN_HPP_NAMESPACE::VideoComponentBitDepthFlagsKHR chromaBitDepth_ ) VULKAN_HPP_NOEXCEPT { chromaBitDepth = chromaBitDepth_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkVideoProfileInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoProfileInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, videoCodecOperation, chromaSubsampling, lumaBitDepth, chromaBitDepth ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( VideoProfileInfoKHR const & ) const = default; #else bool operator==( VideoProfileInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( videoCodecOperation == rhs.videoCodecOperation ) && ( chromaSubsampling == rhs.chromaSubsampling ) && ( lumaBitDepth == rhs.lumaBitDepth ) && ( chromaBitDepth == rhs.chromaBitDepth ); # endif } bool operator!=( VideoProfileInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoProfileInfoKHR; const void * pNext = {}; VULKAN_HPP_NAMESPACE::VideoCodecOperationFlagBitsKHR videoCodecOperation = VULKAN_HPP_NAMESPACE::VideoCodecOperationFlagBitsKHR::eNone; VULKAN_HPP_NAMESPACE::VideoChromaSubsamplingFlagsKHR chromaSubsampling = {}; VULKAN_HPP_NAMESPACE::VideoComponentBitDepthFlagsKHR lumaBitDepth = {}; VULKAN_HPP_NAMESPACE::VideoComponentBitDepthFlagsKHR chromaBitDepth = {}; }; template <> struct CppType { using Type = VideoProfileInfoKHR; }; struct PhysicalDeviceVideoEncodeQualityLevelInfoKHR { using NativeType = VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceVideoEncodeQualityLevelInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceVideoEncodeQualityLevelInfoKHR( const VULKAN_HPP_NAMESPACE::VideoProfileInfoKHR * pVideoProfile_ = {}, uint32_t qualityLevel_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , pVideoProfile{ pVideoProfile_ } , qualityLevel{ qualityLevel_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceVideoEncodeQualityLevelInfoKHR( PhysicalDeviceVideoEncodeQualityLevelInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceVideoEncodeQualityLevelInfoKHR( VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceVideoEncodeQualityLevelInfoKHR( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceVideoEncodeQualityLevelInfoKHR & operator=( PhysicalDeviceVideoEncodeQualityLevelInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceVideoEncodeQualityLevelInfoKHR & operator=( VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVideoEncodeQualityLevelInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVideoEncodeQualityLevelInfoKHR & setPVideoProfile( const VULKAN_HPP_NAMESPACE::VideoProfileInfoKHR * pVideoProfile_ ) VULKAN_HPP_NOEXCEPT { pVideoProfile = pVideoProfile_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVideoEncodeQualityLevelInfoKHR & setQualityLevel( uint32_t qualityLevel_ ) VULKAN_HPP_NOEXCEPT { qualityLevel = qualityLevel_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, pVideoProfile, qualityLevel ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceVideoEncodeQualityLevelInfoKHR const & ) const = default; #else bool operator==( PhysicalDeviceVideoEncodeQualityLevelInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( pVideoProfile == rhs.pVideoProfile ) && ( qualityLevel == rhs.qualityLevel ); # endif } bool operator!=( PhysicalDeviceVideoEncodeQualityLevelInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceVideoEncodeQualityLevelInfoKHR; const void * pNext = {}; const VULKAN_HPP_NAMESPACE::VideoProfileInfoKHR * pVideoProfile = {}; uint32_t qualityLevel = {}; }; template <> struct CppType { using Type = PhysicalDeviceVideoEncodeQualityLevelInfoKHR; }; struct PhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR { using NativeType = VkPhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR( VULKAN_HPP_NAMESPACE::Bool32 videoEncodeQuantizationMap_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , videoEncodeQuantizationMap{ videoEncodeQuantizationMap_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR( PhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR( VkPhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR & operator=( PhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR & operator=( VkPhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR & setVideoEncodeQuantizationMap( VULKAN_HPP_NAMESPACE::Bool32 videoEncodeQuantizationMap_ ) VULKAN_HPP_NOEXCEPT { videoEncodeQuantizationMap = videoEncodeQuantizationMap_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, videoEncodeQuantizationMap ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR const & ) const = default; #else bool operator==( PhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( videoEncodeQuantizationMap == rhs.videoEncodeQuantizationMap ); # endif } bool operator!=( PhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 videoEncodeQuantizationMap = {}; }; template <> struct CppType { using Type = PhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR; }; struct PhysicalDeviceVideoFormatInfoKHR { using NativeType = VkPhysicalDeviceVideoFormatInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceVideoFormatInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceVideoFormatInfoKHR( VULKAN_HPP_NAMESPACE::ImageUsageFlags imageUsage_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , imageUsage{ imageUsage_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceVideoFormatInfoKHR( PhysicalDeviceVideoFormatInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceVideoFormatInfoKHR( VkPhysicalDeviceVideoFormatInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceVideoFormatInfoKHR( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceVideoFormatInfoKHR & operator=( PhysicalDeviceVideoFormatInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceVideoFormatInfoKHR & operator=( VkPhysicalDeviceVideoFormatInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVideoFormatInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVideoFormatInfoKHR & setImageUsage( VULKAN_HPP_NAMESPACE::ImageUsageFlags imageUsage_ ) VULKAN_HPP_NOEXCEPT { imageUsage = imageUsage_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceVideoFormatInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceVideoFormatInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, imageUsage ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceVideoFormatInfoKHR const & ) const = default; #else bool operator==( PhysicalDeviceVideoFormatInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( imageUsage == rhs.imageUsage ); # endif } bool operator!=( PhysicalDeviceVideoFormatInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceVideoFormatInfoKHR; const void * pNext = {}; VULKAN_HPP_NAMESPACE::ImageUsageFlags imageUsage = {}; }; template <> struct CppType { using Type = PhysicalDeviceVideoFormatInfoKHR; }; struct PhysicalDeviceVideoMaintenance1FeaturesKHR { using NativeType = VkPhysicalDeviceVideoMaintenance1FeaturesKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceVideoMaintenance1FeaturesKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceVideoMaintenance1FeaturesKHR( VULKAN_HPP_NAMESPACE::Bool32 videoMaintenance1_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , videoMaintenance1{ videoMaintenance1_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceVideoMaintenance1FeaturesKHR( PhysicalDeviceVideoMaintenance1FeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceVideoMaintenance1FeaturesKHR( VkPhysicalDeviceVideoMaintenance1FeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceVideoMaintenance1FeaturesKHR( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceVideoMaintenance1FeaturesKHR & operator=( PhysicalDeviceVideoMaintenance1FeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceVideoMaintenance1FeaturesKHR & operator=( VkPhysicalDeviceVideoMaintenance1FeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVideoMaintenance1FeaturesKHR & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVideoMaintenance1FeaturesKHR & setVideoMaintenance1( VULKAN_HPP_NAMESPACE::Bool32 videoMaintenance1_ ) VULKAN_HPP_NOEXCEPT { videoMaintenance1 = videoMaintenance1_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceVideoMaintenance1FeaturesKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceVideoMaintenance1FeaturesKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, videoMaintenance1 ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceVideoMaintenance1FeaturesKHR const & ) const = default; #else bool operator==( PhysicalDeviceVideoMaintenance1FeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( videoMaintenance1 == rhs.videoMaintenance1 ); # endif } bool operator!=( PhysicalDeviceVideoMaintenance1FeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceVideoMaintenance1FeaturesKHR; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 videoMaintenance1 = {}; }; template <> struct CppType { using Type = PhysicalDeviceVideoMaintenance1FeaturesKHR; }; struct PhysicalDeviceVideoMaintenance2FeaturesKHR { using NativeType = VkPhysicalDeviceVideoMaintenance2FeaturesKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceVideoMaintenance2FeaturesKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceVideoMaintenance2FeaturesKHR( VULKAN_HPP_NAMESPACE::Bool32 videoMaintenance2_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , videoMaintenance2{ videoMaintenance2_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceVideoMaintenance2FeaturesKHR( PhysicalDeviceVideoMaintenance2FeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceVideoMaintenance2FeaturesKHR( VkPhysicalDeviceVideoMaintenance2FeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceVideoMaintenance2FeaturesKHR( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceVideoMaintenance2FeaturesKHR & operator=( PhysicalDeviceVideoMaintenance2FeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceVideoMaintenance2FeaturesKHR & operator=( VkPhysicalDeviceVideoMaintenance2FeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVideoMaintenance2FeaturesKHR & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVideoMaintenance2FeaturesKHR & setVideoMaintenance2( VULKAN_HPP_NAMESPACE::Bool32 videoMaintenance2_ ) VULKAN_HPP_NOEXCEPT { videoMaintenance2 = videoMaintenance2_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceVideoMaintenance2FeaturesKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceVideoMaintenance2FeaturesKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, videoMaintenance2 ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceVideoMaintenance2FeaturesKHR const & ) const = default; #else bool operator==( PhysicalDeviceVideoMaintenance2FeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( videoMaintenance2 == rhs.videoMaintenance2 ); # endif } bool operator!=( PhysicalDeviceVideoMaintenance2FeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceVideoMaintenance2FeaturesKHR; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 videoMaintenance2 = {}; }; template <> struct CppType { using Type = PhysicalDeviceVideoMaintenance2FeaturesKHR; }; struct PhysicalDeviceVulkan11Features { using NativeType = VkPhysicalDeviceVulkan11Features; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceVulkan11Features; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceVulkan11Features( VULKAN_HPP_NAMESPACE::Bool32 storageBuffer16BitAccess_ = {}, VULKAN_HPP_NAMESPACE::Bool32 uniformAndStorageBuffer16BitAccess_ = {}, VULKAN_HPP_NAMESPACE::Bool32 storagePushConstant16_ = {}, VULKAN_HPP_NAMESPACE::Bool32 storageInputOutput16_ = {}, VULKAN_HPP_NAMESPACE::Bool32 multiview_ = {}, VULKAN_HPP_NAMESPACE::Bool32 multiviewGeometryShader_ = {}, VULKAN_HPP_NAMESPACE::Bool32 multiviewTessellationShader_ = {}, VULKAN_HPP_NAMESPACE::Bool32 variablePointersStorageBuffer_ = {}, VULKAN_HPP_NAMESPACE::Bool32 variablePointers_ = {}, VULKAN_HPP_NAMESPACE::Bool32 protectedMemory_ = {}, VULKAN_HPP_NAMESPACE::Bool32 samplerYcbcrConversion_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderDrawParameters_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , storageBuffer16BitAccess{ storageBuffer16BitAccess_ } , uniformAndStorageBuffer16BitAccess{ uniformAndStorageBuffer16BitAccess_ } , storagePushConstant16{ storagePushConstant16_ } , storageInputOutput16{ storageInputOutput16_ } , multiview{ multiview_ } , multiviewGeometryShader{ multiviewGeometryShader_ } , multiviewTessellationShader{ multiviewTessellationShader_ } , variablePointersStorageBuffer{ variablePointersStorageBuffer_ } , variablePointers{ variablePointers_ } , protectedMemory{ protectedMemory_ } , samplerYcbcrConversion{ samplerYcbcrConversion_ } , shaderDrawParameters{ shaderDrawParameters_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceVulkan11Features( PhysicalDeviceVulkan11Features const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceVulkan11Features( VkPhysicalDeviceVulkan11Features const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceVulkan11Features( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceVulkan11Features & operator=( PhysicalDeviceVulkan11Features const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceVulkan11Features & operator=( VkPhysicalDeviceVulkan11Features const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan11Features & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan11Features & setStorageBuffer16BitAccess( VULKAN_HPP_NAMESPACE::Bool32 storageBuffer16BitAccess_ ) VULKAN_HPP_NOEXCEPT { storageBuffer16BitAccess = storageBuffer16BitAccess_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan11Features & setUniformAndStorageBuffer16BitAccess( VULKAN_HPP_NAMESPACE::Bool32 uniformAndStorageBuffer16BitAccess_ ) VULKAN_HPP_NOEXCEPT { uniformAndStorageBuffer16BitAccess = uniformAndStorageBuffer16BitAccess_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan11Features & setStoragePushConstant16( VULKAN_HPP_NAMESPACE::Bool32 storagePushConstant16_ ) VULKAN_HPP_NOEXCEPT { storagePushConstant16 = storagePushConstant16_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan11Features & setStorageInputOutput16( VULKAN_HPP_NAMESPACE::Bool32 storageInputOutput16_ ) VULKAN_HPP_NOEXCEPT { storageInputOutput16 = storageInputOutput16_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan11Features & setMultiview( VULKAN_HPP_NAMESPACE::Bool32 multiview_ ) VULKAN_HPP_NOEXCEPT { multiview = multiview_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan11Features & setMultiviewGeometryShader( VULKAN_HPP_NAMESPACE::Bool32 multiviewGeometryShader_ ) VULKAN_HPP_NOEXCEPT { multiviewGeometryShader = multiviewGeometryShader_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan11Features & setMultiviewTessellationShader( VULKAN_HPP_NAMESPACE::Bool32 multiviewTessellationShader_ ) VULKAN_HPP_NOEXCEPT { multiviewTessellationShader = multiviewTessellationShader_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan11Features & setVariablePointersStorageBuffer( VULKAN_HPP_NAMESPACE::Bool32 variablePointersStorageBuffer_ ) VULKAN_HPP_NOEXCEPT { variablePointersStorageBuffer = variablePointersStorageBuffer_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan11Features & setVariablePointers( VULKAN_HPP_NAMESPACE::Bool32 variablePointers_ ) VULKAN_HPP_NOEXCEPT { variablePointers = variablePointers_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan11Features & setProtectedMemory( VULKAN_HPP_NAMESPACE::Bool32 protectedMemory_ ) VULKAN_HPP_NOEXCEPT { protectedMemory = protectedMemory_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan11Features & setSamplerYcbcrConversion( VULKAN_HPP_NAMESPACE::Bool32 samplerYcbcrConversion_ ) VULKAN_HPP_NOEXCEPT { samplerYcbcrConversion = samplerYcbcrConversion_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan11Features & setShaderDrawParameters( VULKAN_HPP_NAMESPACE::Bool32 shaderDrawParameters_ ) VULKAN_HPP_NOEXCEPT { shaderDrawParameters = shaderDrawParameters_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceVulkan11Features const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceVulkan11Features &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, storageBuffer16BitAccess, uniformAndStorageBuffer16BitAccess, storagePushConstant16, storageInputOutput16, multiview, multiviewGeometryShader, multiviewTessellationShader, variablePointersStorageBuffer, variablePointers, protectedMemory, samplerYcbcrConversion, shaderDrawParameters ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceVulkan11Features const & ) const = default; #else bool operator==( PhysicalDeviceVulkan11Features const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( storageBuffer16BitAccess == rhs.storageBuffer16BitAccess ) && ( uniformAndStorageBuffer16BitAccess == rhs.uniformAndStorageBuffer16BitAccess ) && ( storagePushConstant16 == rhs.storagePushConstant16 ) && ( storageInputOutput16 == rhs.storageInputOutput16 ) && ( multiview == rhs.multiview ) && ( multiviewGeometryShader == rhs.multiviewGeometryShader ) && ( multiviewTessellationShader == rhs.multiviewTessellationShader ) && ( variablePointersStorageBuffer == rhs.variablePointersStorageBuffer ) && ( variablePointers == rhs.variablePointers ) && ( protectedMemory == rhs.protectedMemory ) && ( samplerYcbcrConversion == rhs.samplerYcbcrConversion ) && ( shaderDrawParameters == rhs.shaderDrawParameters ); # endif } bool operator!=( PhysicalDeviceVulkan11Features const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceVulkan11Features; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 storageBuffer16BitAccess = {}; VULKAN_HPP_NAMESPACE::Bool32 uniformAndStorageBuffer16BitAccess = {}; VULKAN_HPP_NAMESPACE::Bool32 storagePushConstant16 = {}; VULKAN_HPP_NAMESPACE::Bool32 storageInputOutput16 = {}; VULKAN_HPP_NAMESPACE::Bool32 multiview = {}; VULKAN_HPP_NAMESPACE::Bool32 multiviewGeometryShader = {}; VULKAN_HPP_NAMESPACE::Bool32 multiviewTessellationShader = {}; VULKAN_HPP_NAMESPACE::Bool32 variablePointersStorageBuffer = {}; VULKAN_HPP_NAMESPACE::Bool32 variablePointers = {}; VULKAN_HPP_NAMESPACE::Bool32 protectedMemory = {}; VULKAN_HPP_NAMESPACE::Bool32 samplerYcbcrConversion = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderDrawParameters = {}; }; template <> struct CppType { using Type = PhysicalDeviceVulkan11Features; }; struct PhysicalDeviceVulkan11Properties { using NativeType = VkPhysicalDeviceVulkan11Properties; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceVulkan11Properties; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan11Properties( std::array const & deviceUUID_ = {}, std::array const & driverUUID_ = {}, std::array const & deviceLUID_ = {}, uint32_t deviceNodeMask_ = {}, VULKAN_HPP_NAMESPACE::Bool32 deviceLUIDValid_ = {}, uint32_t subgroupSize_ = {}, VULKAN_HPP_NAMESPACE::ShaderStageFlags subgroupSupportedStages_ = {}, VULKAN_HPP_NAMESPACE::SubgroupFeatureFlags subgroupSupportedOperations_ = {}, VULKAN_HPP_NAMESPACE::Bool32 subgroupQuadOperationsInAllStages_ = {}, VULKAN_HPP_NAMESPACE::PointClippingBehavior pointClippingBehavior_ = VULKAN_HPP_NAMESPACE::PointClippingBehavior::eAllClipPlanes, uint32_t maxMultiviewViewCount_ = {}, uint32_t maxMultiviewInstanceIndex_ = {}, VULKAN_HPP_NAMESPACE::Bool32 protectedNoFault_ = {}, uint32_t maxPerSetDescriptors_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize maxMemoryAllocationSize_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , deviceUUID{ deviceUUID_ } , driverUUID{ driverUUID_ } , deviceLUID{ deviceLUID_ } , deviceNodeMask{ deviceNodeMask_ } , deviceLUIDValid{ deviceLUIDValid_ } , subgroupSize{ subgroupSize_ } , subgroupSupportedStages{ subgroupSupportedStages_ } , subgroupSupportedOperations{ subgroupSupportedOperations_ } , subgroupQuadOperationsInAllStages{ subgroupQuadOperationsInAllStages_ } , pointClippingBehavior{ pointClippingBehavior_ } , maxMultiviewViewCount{ maxMultiviewViewCount_ } , maxMultiviewInstanceIndex{ maxMultiviewInstanceIndex_ } , protectedNoFault{ protectedNoFault_ } , maxPerSetDescriptors{ maxPerSetDescriptors_ } , maxMemoryAllocationSize{ maxMemoryAllocationSize_ } { } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan11Properties( PhysicalDeviceVulkan11Properties const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceVulkan11Properties( VkPhysicalDeviceVulkan11Properties const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceVulkan11Properties( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceVulkan11Properties & operator=( PhysicalDeviceVulkan11Properties const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceVulkan11Properties & operator=( VkPhysicalDeviceVulkan11Properties const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceVulkan11Properties const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceVulkan11Properties &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple const &, VULKAN_HPP_NAMESPACE::ArrayWrapper1D const &, VULKAN_HPP_NAMESPACE::ArrayWrapper1D const &, uint32_t const &, VULKAN_HPP_NAMESPACE::Bool32 const &, uint32_t const &, VULKAN_HPP_NAMESPACE::ShaderStageFlags const &, VULKAN_HPP_NAMESPACE::SubgroupFeatureFlags const &, VULKAN_HPP_NAMESPACE::Bool32 const &, VULKAN_HPP_NAMESPACE::PointClippingBehavior const &, uint32_t const &, uint32_t const &, VULKAN_HPP_NAMESPACE::Bool32 const &, uint32_t const &, VULKAN_HPP_NAMESPACE::DeviceSize const &> # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, deviceUUID, driverUUID, deviceLUID, deviceNodeMask, deviceLUIDValid, subgroupSize, subgroupSupportedStages, subgroupSupportedOperations, subgroupQuadOperationsInAllStages, pointClippingBehavior, maxMultiviewViewCount, maxMultiviewInstanceIndex, protectedNoFault, maxPerSetDescriptors, maxMemoryAllocationSize ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceVulkan11Properties const & ) const = default; #else bool operator==( PhysicalDeviceVulkan11Properties const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( deviceUUID == rhs.deviceUUID ) && ( driverUUID == rhs.driverUUID ) && ( deviceLUID == rhs.deviceLUID ) && ( deviceNodeMask == rhs.deviceNodeMask ) && ( deviceLUIDValid == rhs.deviceLUIDValid ) && ( subgroupSize == rhs.subgroupSize ) && ( subgroupSupportedStages == rhs.subgroupSupportedStages ) && ( subgroupSupportedOperations == rhs.subgroupSupportedOperations ) && ( subgroupQuadOperationsInAllStages == rhs.subgroupQuadOperationsInAllStages ) && ( pointClippingBehavior == rhs.pointClippingBehavior ) && ( maxMultiviewViewCount == rhs.maxMultiviewViewCount ) && ( maxMultiviewInstanceIndex == rhs.maxMultiviewInstanceIndex ) && ( protectedNoFault == rhs.protectedNoFault ) && ( maxPerSetDescriptors == rhs.maxPerSetDescriptors ) && ( maxMemoryAllocationSize == rhs.maxMemoryAllocationSize ); # endif } bool operator!=( PhysicalDeviceVulkan11Properties const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceVulkan11Properties; void * pNext = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D deviceUUID = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D driverUUID = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D deviceLUID = {}; uint32_t deviceNodeMask = {}; VULKAN_HPP_NAMESPACE::Bool32 deviceLUIDValid = {}; uint32_t subgroupSize = {}; VULKAN_HPP_NAMESPACE::ShaderStageFlags subgroupSupportedStages = {}; VULKAN_HPP_NAMESPACE::SubgroupFeatureFlags subgroupSupportedOperations = {}; VULKAN_HPP_NAMESPACE::Bool32 subgroupQuadOperationsInAllStages = {}; VULKAN_HPP_NAMESPACE::PointClippingBehavior pointClippingBehavior = VULKAN_HPP_NAMESPACE::PointClippingBehavior::eAllClipPlanes; uint32_t maxMultiviewViewCount = {}; uint32_t maxMultiviewInstanceIndex = {}; VULKAN_HPP_NAMESPACE::Bool32 protectedNoFault = {}; uint32_t maxPerSetDescriptors = {}; VULKAN_HPP_NAMESPACE::DeviceSize maxMemoryAllocationSize = {}; }; template <> struct CppType { using Type = PhysicalDeviceVulkan11Properties; }; struct PhysicalDeviceVulkan12Features { using NativeType = VkPhysicalDeviceVulkan12Features; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceVulkan12Features; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceVulkan12Features( VULKAN_HPP_NAMESPACE::Bool32 samplerMirrorClampToEdge_ = {}, VULKAN_HPP_NAMESPACE::Bool32 drawIndirectCount_ = {}, VULKAN_HPP_NAMESPACE::Bool32 storageBuffer8BitAccess_ = {}, VULKAN_HPP_NAMESPACE::Bool32 uniformAndStorageBuffer8BitAccess_ = {}, VULKAN_HPP_NAMESPACE::Bool32 storagePushConstant8_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderBufferInt64Atomics_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderSharedInt64Atomics_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderFloat16_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderInt8_ = {}, VULKAN_HPP_NAMESPACE::Bool32 descriptorIndexing_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderInputAttachmentArrayDynamicIndexing_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderUniformTexelBufferArrayDynamicIndexing_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderStorageTexelBufferArrayDynamicIndexing_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderUniformBufferArrayNonUniformIndexing_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderSampledImageArrayNonUniformIndexing_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderStorageBufferArrayNonUniformIndexing_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderStorageImageArrayNonUniformIndexing_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderInputAttachmentArrayNonUniformIndexing_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderUniformTexelBufferArrayNonUniformIndexing_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderStorageTexelBufferArrayNonUniformIndexing_ = {}, VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingUniformBufferUpdateAfterBind_ = {}, VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingSampledImageUpdateAfterBind_ = {}, VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingStorageImageUpdateAfterBind_ = {}, VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingStorageBufferUpdateAfterBind_ = {}, VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingUniformTexelBufferUpdateAfterBind_ = {}, VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingStorageTexelBufferUpdateAfterBind_ = {}, VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingUpdateUnusedWhilePending_ = {}, VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingPartiallyBound_ = {}, VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingVariableDescriptorCount_ = {}, VULKAN_HPP_NAMESPACE::Bool32 runtimeDescriptorArray_ = {}, VULKAN_HPP_NAMESPACE::Bool32 samplerFilterMinmax_ = {}, VULKAN_HPP_NAMESPACE::Bool32 scalarBlockLayout_ = {}, VULKAN_HPP_NAMESPACE::Bool32 imagelessFramebuffer_ = {}, VULKAN_HPP_NAMESPACE::Bool32 uniformBufferStandardLayout_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderSubgroupExtendedTypes_ = {}, VULKAN_HPP_NAMESPACE::Bool32 separateDepthStencilLayouts_ = {}, VULKAN_HPP_NAMESPACE::Bool32 hostQueryReset_ = {}, VULKAN_HPP_NAMESPACE::Bool32 timelineSemaphore_ = {}, VULKAN_HPP_NAMESPACE::Bool32 bufferDeviceAddress_ = {}, VULKAN_HPP_NAMESPACE::Bool32 bufferDeviceAddressCaptureReplay_ = {}, VULKAN_HPP_NAMESPACE::Bool32 bufferDeviceAddressMultiDevice_ = {}, VULKAN_HPP_NAMESPACE::Bool32 vulkanMemoryModel_ = {}, VULKAN_HPP_NAMESPACE::Bool32 vulkanMemoryModelDeviceScope_ = {}, VULKAN_HPP_NAMESPACE::Bool32 vulkanMemoryModelAvailabilityVisibilityChains_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderOutputViewportIndex_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderOutputLayer_ = {}, VULKAN_HPP_NAMESPACE::Bool32 subgroupBroadcastDynamicId_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , samplerMirrorClampToEdge{ samplerMirrorClampToEdge_ } , drawIndirectCount{ drawIndirectCount_ } , storageBuffer8BitAccess{ storageBuffer8BitAccess_ } , uniformAndStorageBuffer8BitAccess{ uniformAndStorageBuffer8BitAccess_ } , storagePushConstant8{ storagePushConstant8_ } , shaderBufferInt64Atomics{ shaderBufferInt64Atomics_ } , shaderSharedInt64Atomics{ shaderSharedInt64Atomics_ } , shaderFloat16{ shaderFloat16_ } , shaderInt8{ shaderInt8_ } , descriptorIndexing{ descriptorIndexing_ } , shaderInputAttachmentArrayDynamicIndexing{ shaderInputAttachmentArrayDynamicIndexing_ } , shaderUniformTexelBufferArrayDynamicIndexing{ shaderUniformTexelBufferArrayDynamicIndexing_ } , shaderStorageTexelBufferArrayDynamicIndexing{ shaderStorageTexelBufferArrayDynamicIndexing_ } , shaderUniformBufferArrayNonUniformIndexing{ shaderUniformBufferArrayNonUniformIndexing_ } , shaderSampledImageArrayNonUniformIndexing{ shaderSampledImageArrayNonUniformIndexing_ } , shaderStorageBufferArrayNonUniformIndexing{ shaderStorageBufferArrayNonUniformIndexing_ } , shaderStorageImageArrayNonUniformIndexing{ shaderStorageImageArrayNonUniformIndexing_ } , shaderInputAttachmentArrayNonUniformIndexing{ shaderInputAttachmentArrayNonUniformIndexing_ } , shaderUniformTexelBufferArrayNonUniformIndexing{ shaderUniformTexelBufferArrayNonUniformIndexing_ } , shaderStorageTexelBufferArrayNonUniformIndexing{ shaderStorageTexelBufferArrayNonUniformIndexing_ } , descriptorBindingUniformBufferUpdateAfterBind{ descriptorBindingUniformBufferUpdateAfterBind_ } , descriptorBindingSampledImageUpdateAfterBind{ descriptorBindingSampledImageUpdateAfterBind_ } , descriptorBindingStorageImageUpdateAfterBind{ descriptorBindingStorageImageUpdateAfterBind_ } , descriptorBindingStorageBufferUpdateAfterBind{ descriptorBindingStorageBufferUpdateAfterBind_ } , descriptorBindingUniformTexelBufferUpdateAfterBind{ descriptorBindingUniformTexelBufferUpdateAfterBind_ } , descriptorBindingStorageTexelBufferUpdateAfterBind{ descriptorBindingStorageTexelBufferUpdateAfterBind_ } , descriptorBindingUpdateUnusedWhilePending{ descriptorBindingUpdateUnusedWhilePending_ } , descriptorBindingPartiallyBound{ descriptorBindingPartiallyBound_ } , descriptorBindingVariableDescriptorCount{ descriptorBindingVariableDescriptorCount_ } , runtimeDescriptorArray{ runtimeDescriptorArray_ } , samplerFilterMinmax{ samplerFilterMinmax_ } , scalarBlockLayout{ scalarBlockLayout_ } , imagelessFramebuffer{ imagelessFramebuffer_ } , uniformBufferStandardLayout{ uniformBufferStandardLayout_ } , shaderSubgroupExtendedTypes{ shaderSubgroupExtendedTypes_ } , separateDepthStencilLayouts{ separateDepthStencilLayouts_ } , hostQueryReset{ hostQueryReset_ } , timelineSemaphore{ timelineSemaphore_ } , bufferDeviceAddress{ bufferDeviceAddress_ } , bufferDeviceAddressCaptureReplay{ bufferDeviceAddressCaptureReplay_ } , bufferDeviceAddressMultiDevice{ bufferDeviceAddressMultiDevice_ } , vulkanMemoryModel{ vulkanMemoryModel_ } , vulkanMemoryModelDeviceScope{ vulkanMemoryModelDeviceScope_ } , vulkanMemoryModelAvailabilityVisibilityChains{ vulkanMemoryModelAvailabilityVisibilityChains_ } , shaderOutputViewportIndex{ shaderOutputViewportIndex_ } , shaderOutputLayer{ shaderOutputLayer_ } , subgroupBroadcastDynamicId{ subgroupBroadcastDynamicId_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceVulkan12Features( PhysicalDeviceVulkan12Features const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceVulkan12Features( VkPhysicalDeviceVulkan12Features const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceVulkan12Features( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceVulkan12Features & operator=( PhysicalDeviceVulkan12Features const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceVulkan12Features & operator=( VkPhysicalDeviceVulkan12Features const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & setSamplerMirrorClampToEdge( VULKAN_HPP_NAMESPACE::Bool32 samplerMirrorClampToEdge_ ) VULKAN_HPP_NOEXCEPT { samplerMirrorClampToEdge = samplerMirrorClampToEdge_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & setDrawIndirectCount( VULKAN_HPP_NAMESPACE::Bool32 drawIndirectCount_ ) VULKAN_HPP_NOEXCEPT { drawIndirectCount = drawIndirectCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & setStorageBuffer8BitAccess( VULKAN_HPP_NAMESPACE::Bool32 storageBuffer8BitAccess_ ) VULKAN_HPP_NOEXCEPT { storageBuffer8BitAccess = storageBuffer8BitAccess_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & setUniformAndStorageBuffer8BitAccess( VULKAN_HPP_NAMESPACE::Bool32 uniformAndStorageBuffer8BitAccess_ ) VULKAN_HPP_NOEXCEPT { uniformAndStorageBuffer8BitAccess = uniformAndStorageBuffer8BitAccess_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & setStoragePushConstant8( VULKAN_HPP_NAMESPACE::Bool32 storagePushConstant8_ ) VULKAN_HPP_NOEXCEPT { storagePushConstant8 = storagePushConstant8_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & setShaderBufferInt64Atomics( VULKAN_HPP_NAMESPACE::Bool32 shaderBufferInt64Atomics_ ) VULKAN_HPP_NOEXCEPT { shaderBufferInt64Atomics = shaderBufferInt64Atomics_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & setShaderSharedInt64Atomics( VULKAN_HPP_NAMESPACE::Bool32 shaderSharedInt64Atomics_ ) VULKAN_HPP_NOEXCEPT { shaderSharedInt64Atomics = shaderSharedInt64Atomics_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & setShaderFloat16( VULKAN_HPP_NAMESPACE::Bool32 shaderFloat16_ ) VULKAN_HPP_NOEXCEPT { shaderFloat16 = shaderFloat16_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & setShaderInt8( VULKAN_HPP_NAMESPACE::Bool32 shaderInt8_ ) VULKAN_HPP_NOEXCEPT { shaderInt8 = shaderInt8_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & setDescriptorIndexing( VULKAN_HPP_NAMESPACE::Bool32 descriptorIndexing_ ) VULKAN_HPP_NOEXCEPT { descriptorIndexing = descriptorIndexing_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & setShaderInputAttachmentArrayDynamicIndexing( VULKAN_HPP_NAMESPACE::Bool32 shaderInputAttachmentArrayDynamicIndexing_ ) VULKAN_HPP_NOEXCEPT { shaderInputAttachmentArrayDynamicIndexing = shaderInputAttachmentArrayDynamicIndexing_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & setShaderUniformTexelBufferArrayDynamicIndexing( VULKAN_HPP_NAMESPACE::Bool32 shaderUniformTexelBufferArrayDynamicIndexing_ ) VULKAN_HPP_NOEXCEPT { shaderUniformTexelBufferArrayDynamicIndexing = shaderUniformTexelBufferArrayDynamicIndexing_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & setShaderStorageTexelBufferArrayDynamicIndexing( VULKAN_HPP_NAMESPACE::Bool32 shaderStorageTexelBufferArrayDynamicIndexing_ ) VULKAN_HPP_NOEXCEPT { shaderStorageTexelBufferArrayDynamicIndexing = shaderStorageTexelBufferArrayDynamicIndexing_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & setShaderUniformBufferArrayNonUniformIndexing( VULKAN_HPP_NAMESPACE::Bool32 shaderUniformBufferArrayNonUniformIndexing_ ) VULKAN_HPP_NOEXCEPT { shaderUniformBufferArrayNonUniformIndexing = shaderUniformBufferArrayNonUniformIndexing_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & setShaderSampledImageArrayNonUniformIndexing( VULKAN_HPP_NAMESPACE::Bool32 shaderSampledImageArrayNonUniformIndexing_ ) VULKAN_HPP_NOEXCEPT { shaderSampledImageArrayNonUniformIndexing = shaderSampledImageArrayNonUniformIndexing_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & setShaderStorageBufferArrayNonUniformIndexing( VULKAN_HPP_NAMESPACE::Bool32 shaderStorageBufferArrayNonUniformIndexing_ ) VULKAN_HPP_NOEXCEPT { shaderStorageBufferArrayNonUniformIndexing = shaderStorageBufferArrayNonUniformIndexing_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & setShaderStorageImageArrayNonUniformIndexing( VULKAN_HPP_NAMESPACE::Bool32 shaderStorageImageArrayNonUniformIndexing_ ) VULKAN_HPP_NOEXCEPT { shaderStorageImageArrayNonUniformIndexing = shaderStorageImageArrayNonUniformIndexing_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & setShaderInputAttachmentArrayNonUniformIndexing( VULKAN_HPP_NAMESPACE::Bool32 shaderInputAttachmentArrayNonUniformIndexing_ ) VULKAN_HPP_NOEXCEPT { shaderInputAttachmentArrayNonUniformIndexing = shaderInputAttachmentArrayNonUniformIndexing_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & setShaderUniformTexelBufferArrayNonUniformIndexing( VULKAN_HPP_NAMESPACE::Bool32 shaderUniformTexelBufferArrayNonUniformIndexing_ ) VULKAN_HPP_NOEXCEPT { shaderUniformTexelBufferArrayNonUniformIndexing = shaderUniformTexelBufferArrayNonUniformIndexing_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & setShaderStorageTexelBufferArrayNonUniformIndexing( VULKAN_HPP_NAMESPACE::Bool32 shaderStorageTexelBufferArrayNonUniformIndexing_ ) VULKAN_HPP_NOEXCEPT { shaderStorageTexelBufferArrayNonUniformIndexing = shaderStorageTexelBufferArrayNonUniformIndexing_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & setDescriptorBindingUniformBufferUpdateAfterBind( VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingUniformBufferUpdateAfterBind_ ) VULKAN_HPP_NOEXCEPT { descriptorBindingUniformBufferUpdateAfterBind = descriptorBindingUniformBufferUpdateAfterBind_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & setDescriptorBindingSampledImageUpdateAfterBind( VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingSampledImageUpdateAfterBind_ ) VULKAN_HPP_NOEXCEPT { descriptorBindingSampledImageUpdateAfterBind = descriptorBindingSampledImageUpdateAfterBind_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & setDescriptorBindingStorageImageUpdateAfterBind( VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingStorageImageUpdateAfterBind_ ) VULKAN_HPP_NOEXCEPT { descriptorBindingStorageImageUpdateAfterBind = descriptorBindingStorageImageUpdateAfterBind_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & setDescriptorBindingStorageBufferUpdateAfterBind( VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingStorageBufferUpdateAfterBind_ ) VULKAN_HPP_NOEXCEPT { descriptorBindingStorageBufferUpdateAfterBind = descriptorBindingStorageBufferUpdateAfterBind_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & setDescriptorBindingUniformTexelBufferUpdateAfterBind( VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingUniformTexelBufferUpdateAfterBind_ ) VULKAN_HPP_NOEXCEPT { descriptorBindingUniformTexelBufferUpdateAfterBind = descriptorBindingUniformTexelBufferUpdateAfterBind_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & setDescriptorBindingStorageTexelBufferUpdateAfterBind( VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingStorageTexelBufferUpdateAfterBind_ ) VULKAN_HPP_NOEXCEPT { descriptorBindingStorageTexelBufferUpdateAfterBind = descriptorBindingStorageTexelBufferUpdateAfterBind_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & setDescriptorBindingUpdateUnusedWhilePending( VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingUpdateUnusedWhilePending_ ) VULKAN_HPP_NOEXCEPT { descriptorBindingUpdateUnusedWhilePending = descriptorBindingUpdateUnusedWhilePending_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & setDescriptorBindingPartiallyBound( VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingPartiallyBound_ ) VULKAN_HPP_NOEXCEPT { descriptorBindingPartiallyBound = descriptorBindingPartiallyBound_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & setDescriptorBindingVariableDescriptorCount( VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingVariableDescriptorCount_ ) VULKAN_HPP_NOEXCEPT { descriptorBindingVariableDescriptorCount = descriptorBindingVariableDescriptorCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & setRuntimeDescriptorArray( VULKAN_HPP_NAMESPACE::Bool32 runtimeDescriptorArray_ ) VULKAN_HPP_NOEXCEPT { runtimeDescriptorArray = runtimeDescriptorArray_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & setSamplerFilterMinmax( VULKAN_HPP_NAMESPACE::Bool32 samplerFilterMinmax_ ) VULKAN_HPP_NOEXCEPT { samplerFilterMinmax = samplerFilterMinmax_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & setScalarBlockLayout( VULKAN_HPP_NAMESPACE::Bool32 scalarBlockLayout_ ) VULKAN_HPP_NOEXCEPT { scalarBlockLayout = scalarBlockLayout_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & setImagelessFramebuffer( VULKAN_HPP_NAMESPACE::Bool32 imagelessFramebuffer_ ) VULKAN_HPP_NOEXCEPT { imagelessFramebuffer = imagelessFramebuffer_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & setUniformBufferStandardLayout( VULKAN_HPP_NAMESPACE::Bool32 uniformBufferStandardLayout_ ) VULKAN_HPP_NOEXCEPT { uniformBufferStandardLayout = uniformBufferStandardLayout_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & setShaderSubgroupExtendedTypes( VULKAN_HPP_NAMESPACE::Bool32 shaderSubgroupExtendedTypes_ ) VULKAN_HPP_NOEXCEPT { shaderSubgroupExtendedTypes = shaderSubgroupExtendedTypes_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & setSeparateDepthStencilLayouts( VULKAN_HPP_NAMESPACE::Bool32 separateDepthStencilLayouts_ ) VULKAN_HPP_NOEXCEPT { separateDepthStencilLayouts = separateDepthStencilLayouts_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & setHostQueryReset( VULKAN_HPP_NAMESPACE::Bool32 hostQueryReset_ ) VULKAN_HPP_NOEXCEPT { hostQueryReset = hostQueryReset_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & setTimelineSemaphore( VULKAN_HPP_NAMESPACE::Bool32 timelineSemaphore_ ) VULKAN_HPP_NOEXCEPT { timelineSemaphore = timelineSemaphore_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & setBufferDeviceAddress( VULKAN_HPP_NAMESPACE::Bool32 bufferDeviceAddress_ ) VULKAN_HPP_NOEXCEPT { bufferDeviceAddress = bufferDeviceAddress_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & setBufferDeviceAddressCaptureReplay( VULKAN_HPP_NAMESPACE::Bool32 bufferDeviceAddressCaptureReplay_ ) VULKAN_HPP_NOEXCEPT { bufferDeviceAddressCaptureReplay = bufferDeviceAddressCaptureReplay_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & setBufferDeviceAddressMultiDevice( VULKAN_HPP_NAMESPACE::Bool32 bufferDeviceAddressMultiDevice_ ) VULKAN_HPP_NOEXCEPT { bufferDeviceAddressMultiDevice = bufferDeviceAddressMultiDevice_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & setVulkanMemoryModel( VULKAN_HPP_NAMESPACE::Bool32 vulkanMemoryModel_ ) VULKAN_HPP_NOEXCEPT { vulkanMemoryModel = vulkanMemoryModel_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & setVulkanMemoryModelDeviceScope( VULKAN_HPP_NAMESPACE::Bool32 vulkanMemoryModelDeviceScope_ ) VULKAN_HPP_NOEXCEPT { vulkanMemoryModelDeviceScope = vulkanMemoryModelDeviceScope_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & setVulkanMemoryModelAvailabilityVisibilityChains( VULKAN_HPP_NAMESPACE::Bool32 vulkanMemoryModelAvailabilityVisibilityChains_ ) VULKAN_HPP_NOEXCEPT { vulkanMemoryModelAvailabilityVisibilityChains = vulkanMemoryModelAvailabilityVisibilityChains_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & setShaderOutputViewportIndex( VULKAN_HPP_NAMESPACE::Bool32 shaderOutputViewportIndex_ ) VULKAN_HPP_NOEXCEPT { shaderOutputViewportIndex = shaderOutputViewportIndex_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & setShaderOutputLayer( VULKAN_HPP_NAMESPACE::Bool32 shaderOutputLayer_ ) VULKAN_HPP_NOEXCEPT { shaderOutputLayer = shaderOutputLayer_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Features & setSubgroupBroadcastDynamicId( VULKAN_HPP_NAMESPACE::Bool32 subgroupBroadcastDynamicId_ ) VULKAN_HPP_NOEXCEPT { subgroupBroadcastDynamicId = subgroupBroadcastDynamicId_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceVulkan12Features const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceVulkan12Features &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, samplerMirrorClampToEdge, drawIndirectCount, storageBuffer8BitAccess, uniformAndStorageBuffer8BitAccess, storagePushConstant8, shaderBufferInt64Atomics, shaderSharedInt64Atomics, shaderFloat16, shaderInt8, descriptorIndexing, shaderInputAttachmentArrayDynamicIndexing, shaderUniformTexelBufferArrayDynamicIndexing, shaderStorageTexelBufferArrayDynamicIndexing, shaderUniformBufferArrayNonUniformIndexing, shaderSampledImageArrayNonUniformIndexing, shaderStorageBufferArrayNonUniformIndexing, shaderStorageImageArrayNonUniformIndexing, shaderInputAttachmentArrayNonUniformIndexing, shaderUniformTexelBufferArrayNonUniformIndexing, shaderStorageTexelBufferArrayNonUniformIndexing, descriptorBindingUniformBufferUpdateAfterBind, descriptorBindingSampledImageUpdateAfterBind, descriptorBindingStorageImageUpdateAfterBind, descriptorBindingStorageBufferUpdateAfterBind, descriptorBindingUniformTexelBufferUpdateAfterBind, descriptorBindingStorageTexelBufferUpdateAfterBind, descriptorBindingUpdateUnusedWhilePending, descriptorBindingPartiallyBound, descriptorBindingVariableDescriptorCount, runtimeDescriptorArray, samplerFilterMinmax, scalarBlockLayout, imagelessFramebuffer, uniformBufferStandardLayout, shaderSubgroupExtendedTypes, separateDepthStencilLayouts, hostQueryReset, timelineSemaphore, bufferDeviceAddress, bufferDeviceAddressCaptureReplay, bufferDeviceAddressMultiDevice, vulkanMemoryModel, vulkanMemoryModelDeviceScope, vulkanMemoryModelAvailabilityVisibilityChains, shaderOutputViewportIndex, shaderOutputLayer, subgroupBroadcastDynamicId ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceVulkan12Features const & ) const = default; #else bool operator==( PhysicalDeviceVulkan12Features const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( samplerMirrorClampToEdge == rhs.samplerMirrorClampToEdge ) && ( drawIndirectCount == rhs.drawIndirectCount ) && ( storageBuffer8BitAccess == rhs.storageBuffer8BitAccess ) && ( uniformAndStorageBuffer8BitAccess == rhs.uniformAndStorageBuffer8BitAccess ) && ( storagePushConstant8 == rhs.storagePushConstant8 ) && ( shaderBufferInt64Atomics == rhs.shaderBufferInt64Atomics ) && ( shaderSharedInt64Atomics == rhs.shaderSharedInt64Atomics ) && ( shaderFloat16 == rhs.shaderFloat16 ) && ( shaderInt8 == rhs.shaderInt8 ) && ( descriptorIndexing == rhs.descriptorIndexing ) && ( shaderInputAttachmentArrayDynamicIndexing == rhs.shaderInputAttachmentArrayDynamicIndexing ) && ( shaderUniformTexelBufferArrayDynamicIndexing == rhs.shaderUniformTexelBufferArrayDynamicIndexing ) && ( shaderStorageTexelBufferArrayDynamicIndexing == rhs.shaderStorageTexelBufferArrayDynamicIndexing ) && ( shaderUniformBufferArrayNonUniformIndexing == rhs.shaderUniformBufferArrayNonUniformIndexing ) && ( shaderSampledImageArrayNonUniformIndexing == rhs.shaderSampledImageArrayNonUniformIndexing ) && ( shaderStorageBufferArrayNonUniformIndexing == rhs.shaderStorageBufferArrayNonUniformIndexing ) && ( shaderStorageImageArrayNonUniformIndexing == rhs.shaderStorageImageArrayNonUniformIndexing ) && ( shaderInputAttachmentArrayNonUniformIndexing == rhs.shaderInputAttachmentArrayNonUniformIndexing ) && ( shaderUniformTexelBufferArrayNonUniformIndexing == rhs.shaderUniformTexelBufferArrayNonUniformIndexing ) && ( shaderStorageTexelBufferArrayNonUniformIndexing == rhs.shaderStorageTexelBufferArrayNonUniformIndexing ) && ( descriptorBindingUniformBufferUpdateAfterBind == rhs.descriptorBindingUniformBufferUpdateAfterBind ) && ( descriptorBindingSampledImageUpdateAfterBind == rhs.descriptorBindingSampledImageUpdateAfterBind ) && ( descriptorBindingStorageImageUpdateAfterBind == rhs.descriptorBindingStorageImageUpdateAfterBind ) && ( descriptorBindingStorageBufferUpdateAfterBind == rhs.descriptorBindingStorageBufferUpdateAfterBind ) && ( descriptorBindingUniformTexelBufferUpdateAfterBind == rhs.descriptorBindingUniformTexelBufferUpdateAfterBind ) && ( descriptorBindingStorageTexelBufferUpdateAfterBind == rhs.descriptorBindingStorageTexelBufferUpdateAfterBind ) && ( descriptorBindingUpdateUnusedWhilePending == rhs.descriptorBindingUpdateUnusedWhilePending ) && ( descriptorBindingPartiallyBound == rhs.descriptorBindingPartiallyBound ) && ( descriptorBindingVariableDescriptorCount == rhs.descriptorBindingVariableDescriptorCount ) && ( runtimeDescriptorArray == rhs.runtimeDescriptorArray ) && ( samplerFilterMinmax == rhs.samplerFilterMinmax ) && ( scalarBlockLayout == rhs.scalarBlockLayout ) && ( imagelessFramebuffer == rhs.imagelessFramebuffer ) && ( uniformBufferStandardLayout == rhs.uniformBufferStandardLayout ) && ( shaderSubgroupExtendedTypes == rhs.shaderSubgroupExtendedTypes ) && ( separateDepthStencilLayouts == rhs.separateDepthStencilLayouts ) && ( hostQueryReset == rhs.hostQueryReset ) && ( timelineSemaphore == rhs.timelineSemaphore ) && ( bufferDeviceAddress == rhs.bufferDeviceAddress ) && ( bufferDeviceAddressCaptureReplay == rhs.bufferDeviceAddressCaptureReplay ) && ( bufferDeviceAddressMultiDevice == rhs.bufferDeviceAddressMultiDevice ) && ( vulkanMemoryModel == rhs.vulkanMemoryModel ) && ( vulkanMemoryModelDeviceScope == rhs.vulkanMemoryModelDeviceScope ) && ( vulkanMemoryModelAvailabilityVisibilityChains == rhs.vulkanMemoryModelAvailabilityVisibilityChains ) && ( shaderOutputViewportIndex == rhs.shaderOutputViewportIndex ) && ( shaderOutputLayer == rhs.shaderOutputLayer ) && ( subgroupBroadcastDynamicId == rhs.subgroupBroadcastDynamicId ); # endif } bool operator!=( PhysicalDeviceVulkan12Features const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceVulkan12Features; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 samplerMirrorClampToEdge = {}; VULKAN_HPP_NAMESPACE::Bool32 drawIndirectCount = {}; VULKAN_HPP_NAMESPACE::Bool32 storageBuffer8BitAccess = {}; VULKAN_HPP_NAMESPACE::Bool32 uniformAndStorageBuffer8BitAccess = {}; VULKAN_HPP_NAMESPACE::Bool32 storagePushConstant8 = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderBufferInt64Atomics = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderSharedInt64Atomics = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderFloat16 = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderInt8 = {}; VULKAN_HPP_NAMESPACE::Bool32 descriptorIndexing = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderInputAttachmentArrayDynamicIndexing = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderUniformTexelBufferArrayDynamicIndexing = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderStorageTexelBufferArrayDynamicIndexing = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderUniformBufferArrayNonUniformIndexing = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderSampledImageArrayNonUniformIndexing = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderStorageBufferArrayNonUniformIndexing = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderStorageImageArrayNonUniformIndexing = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderInputAttachmentArrayNonUniformIndexing = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderUniformTexelBufferArrayNonUniformIndexing = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderStorageTexelBufferArrayNonUniformIndexing = {}; VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingUniformBufferUpdateAfterBind = {}; VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingSampledImageUpdateAfterBind = {}; VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingStorageImageUpdateAfterBind = {}; VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingStorageBufferUpdateAfterBind = {}; VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingUniformTexelBufferUpdateAfterBind = {}; VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingStorageTexelBufferUpdateAfterBind = {}; VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingUpdateUnusedWhilePending = {}; VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingPartiallyBound = {}; VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingVariableDescriptorCount = {}; VULKAN_HPP_NAMESPACE::Bool32 runtimeDescriptorArray = {}; VULKAN_HPP_NAMESPACE::Bool32 samplerFilterMinmax = {}; VULKAN_HPP_NAMESPACE::Bool32 scalarBlockLayout = {}; VULKAN_HPP_NAMESPACE::Bool32 imagelessFramebuffer = {}; VULKAN_HPP_NAMESPACE::Bool32 uniformBufferStandardLayout = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderSubgroupExtendedTypes = {}; VULKAN_HPP_NAMESPACE::Bool32 separateDepthStencilLayouts = {}; VULKAN_HPP_NAMESPACE::Bool32 hostQueryReset = {}; VULKAN_HPP_NAMESPACE::Bool32 timelineSemaphore = {}; VULKAN_HPP_NAMESPACE::Bool32 bufferDeviceAddress = {}; VULKAN_HPP_NAMESPACE::Bool32 bufferDeviceAddressCaptureReplay = {}; VULKAN_HPP_NAMESPACE::Bool32 bufferDeviceAddressMultiDevice = {}; VULKAN_HPP_NAMESPACE::Bool32 vulkanMemoryModel = {}; VULKAN_HPP_NAMESPACE::Bool32 vulkanMemoryModelDeviceScope = {}; VULKAN_HPP_NAMESPACE::Bool32 vulkanMemoryModelAvailabilityVisibilityChains = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderOutputViewportIndex = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderOutputLayer = {}; VULKAN_HPP_NAMESPACE::Bool32 subgroupBroadcastDynamicId = {}; }; template <> struct CppType { using Type = PhysicalDeviceVulkan12Features; }; struct PhysicalDeviceVulkan12Properties { using NativeType = VkPhysicalDeviceVulkan12Properties; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceVulkan12Properties; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Properties( VULKAN_HPP_NAMESPACE::DriverId driverID_ = VULKAN_HPP_NAMESPACE::DriverId::eAmdProprietary, std::array const & driverName_ = {}, std::array const & driverInfo_ = {}, VULKAN_HPP_NAMESPACE::ConformanceVersion conformanceVersion_ = {}, VULKAN_HPP_NAMESPACE::ShaderFloatControlsIndependence denormBehaviorIndependence_ = VULKAN_HPP_NAMESPACE::ShaderFloatControlsIndependence::e32BitOnly, VULKAN_HPP_NAMESPACE::ShaderFloatControlsIndependence roundingModeIndependence_ = VULKAN_HPP_NAMESPACE::ShaderFloatControlsIndependence::e32BitOnly, VULKAN_HPP_NAMESPACE::Bool32 shaderSignedZeroInfNanPreserveFloat16_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderSignedZeroInfNanPreserveFloat32_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderSignedZeroInfNanPreserveFloat64_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderDenormPreserveFloat16_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderDenormPreserveFloat32_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderDenormPreserveFloat64_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderDenormFlushToZeroFloat16_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderDenormFlushToZeroFloat32_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderDenormFlushToZeroFloat64_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderRoundingModeRTEFloat16_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderRoundingModeRTEFloat32_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderRoundingModeRTEFloat64_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderRoundingModeRTZFloat16_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderRoundingModeRTZFloat32_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderRoundingModeRTZFloat64_ = {}, uint32_t maxUpdateAfterBindDescriptorsInAllPools_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderUniformBufferArrayNonUniformIndexingNative_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderSampledImageArrayNonUniformIndexingNative_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderStorageBufferArrayNonUniformIndexingNative_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderStorageImageArrayNonUniformIndexingNative_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderInputAttachmentArrayNonUniformIndexingNative_ = {}, VULKAN_HPP_NAMESPACE::Bool32 robustBufferAccessUpdateAfterBind_ = {}, VULKAN_HPP_NAMESPACE::Bool32 quadDivergentImplicitLod_ = {}, uint32_t maxPerStageDescriptorUpdateAfterBindSamplers_ = {}, uint32_t maxPerStageDescriptorUpdateAfterBindUniformBuffers_ = {}, uint32_t maxPerStageDescriptorUpdateAfterBindStorageBuffers_ = {}, uint32_t maxPerStageDescriptorUpdateAfterBindSampledImages_ = {}, uint32_t maxPerStageDescriptorUpdateAfterBindStorageImages_ = {}, uint32_t maxPerStageDescriptorUpdateAfterBindInputAttachments_ = {}, uint32_t maxPerStageUpdateAfterBindResources_ = {}, uint32_t maxDescriptorSetUpdateAfterBindSamplers_ = {}, uint32_t maxDescriptorSetUpdateAfterBindUniformBuffers_ = {}, uint32_t maxDescriptorSetUpdateAfterBindUniformBuffersDynamic_ = {}, uint32_t maxDescriptorSetUpdateAfterBindStorageBuffers_ = {}, uint32_t maxDescriptorSetUpdateAfterBindStorageBuffersDynamic_ = {}, uint32_t maxDescriptorSetUpdateAfterBindSampledImages_ = {}, uint32_t maxDescriptorSetUpdateAfterBindStorageImages_ = {}, uint32_t maxDescriptorSetUpdateAfterBindInputAttachments_ = {}, VULKAN_HPP_NAMESPACE::ResolveModeFlags supportedDepthResolveModes_ = {}, VULKAN_HPP_NAMESPACE::ResolveModeFlags supportedStencilResolveModes_ = {}, VULKAN_HPP_NAMESPACE::Bool32 independentResolveNone_ = {}, VULKAN_HPP_NAMESPACE::Bool32 independentResolve_ = {}, VULKAN_HPP_NAMESPACE::Bool32 filterMinmaxSingleComponentFormats_ = {}, VULKAN_HPP_NAMESPACE::Bool32 filterMinmaxImageComponentMapping_ = {}, uint64_t maxTimelineSemaphoreValueDifference_ = {}, VULKAN_HPP_NAMESPACE::SampleCountFlags framebufferIntegerColorSampleCounts_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , driverID{ driverID_ } , driverName{ driverName_ } , driverInfo{ driverInfo_ } , conformanceVersion{ conformanceVersion_ } , denormBehaviorIndependence{ denormBehaviorIndependence_ } , roundingModeIndependence{ roundingModeIndependence_ } , shaderSignedZeroInfNanPreserveFloat16{ shaderSignedZeroInfNanPreserveFloat16_ } , shaderSignedZeroInfNanPreserveFloat32{ shaderSignedZeroInfNanPreserveFloat32_ } , shaderSignedZeroInfNanPreserveFloat64{ shaderSignedZeroInfNanPreserveFloat64_ } , shaderDenormPreserveFloat16{ shaderDenormPreserveFloat16_ } , shaderDenormPreserveFloat32{ shaderDenormPreserveFloat32_ } , shaderDenormPreserveFloat64{ shaderDenormPreserveFloat64_ } , shaderDenormFlushToZeroFloat16{ shaderDenormFlushToZeroFloat16_ } , shaderDenormFlushToZeroFloat32{ shaderDenormFlushToZeroFloat32_ } , shaderDenormFlushToZeroFloat64{ shaderDenormFlushToZeroFloat64_ } , shaderRoundingModeRTEFloat16{ shaderRoundingModeRTEFloat16_ } , shaderRoundingModeRTEFloat32{ shaderRoundingModeRTEFloat32_ } , shaderRoundingModeRTEFloat64{ shaderRoundingModeRTEFloat64_ } , shaderRoundingModeRTZFloat16{ shaderRoundingModeRTZFloat16_ } , shaderRoundingModeRTZFloat32{ shaderRoundingModeRTZFloat32_ } , shaderRoundingModeRTZFloat64{ shaderRoundingModeRTZFloat64_ } , maxUpdateAfterBindDescriptorsInAllPools{ maxUpdateAfterBindDescriptorsInAllPools_ } , shaderUniformBufferArrayNonUniformIndexingNative{ shaderUniformBufferArrayNonUniformIndexingNative_ } , shaderSampledImageArrayNonUniformIndexingNative{ shaderSampledImageArrayNonUniformIndexingNative_ } , shaderStorageBufferArrayNonUniformIndexingNative{ shaderStorageBufferArrayNonUniformIndexingNative_ } , shaderStorageImageArrayNonUniformIndexingNative{ shaderStorageImageArrayNonUniformIndexingNative_ } , shaderInputAttachmentArrayNonUniformIndexingNative{ shaderInputAttachmentArrayNonUniformIndexingNative_ } , robustBufferAccessUpdateAfterBind{ robustBufferAccessUpdateAfterBind_ } , quadDivergentImplicitLod{ quadDivergentImplicitLod_ } , maxPerStageDescriptorUpdateAfterBindSamplers{ maxPerStageDescriptorUpdateAfterBindSamplers_ } , maxPerStageDescriptorUpdateAfterBindUniformBuffers{ maxPerStageDescriptorUpdateAfterBindUniformBuffers_ } , maxPerStageDescriptorUpdateAfterBindStorageBuffers{ maxPerStageDescriptorUpdateAfterBindStorageBuffers_ } , maxPerStageDescriptorUpdateAfterBindSampledImages{ maxPerStageDescriptorUpdateAfterBindSampledImages_ } , maxPerStageDescriptorUpdateAfterBindStorageImages{ maxPerStageDescriptorUpdateAfterBindStorageImages_ } , maxPerStageDescriptorUpdateAfterBindInputAttachments{ maxPerStageDescriptorUpdateAfterBindInputAttachments_ } , maxPerStageUpdateAfterBindResources{ maxPerStageUpdateAfterBindResources_ } , maxDescriptorSetUpdateAfterBindSamplers{ maxDescriptorSetUpdateAfterBindSamplers_ } , maxDescriptorSetUpdateAfterBindUniformBuffers{ maxDescriptorSetUpdateAfterBindUniformBuffers_ } , maxDescriptorSetUpdateAfterBindUniformBuffersDynamic{ maxDescriptorSetUpdateAfterBindUniformBuffersDynamic_ } , maxDescriptorSetUpdateAfterBindStorageBuffers{ maxDescriptorSetUpdateAfterBindStorageBuffers_ } , maxDescriptorSetUpdateAfterBindStorageBuffersDynamic{ maxDescriptorSetUpdateAfterBindStorageBuffersDynamic_ } , maxDescriptorSetUpdateAfterBindSampledImages{ maxDescriptorSetUpdateAfterBindSampledImages_ } , maxDescriptorSetUpdateAfterBindStorageImages{ maxDescriptorSetUpdateAfterBindStorageImages_ } , maxDescriptorSetUpdateAfterBindInputAttachments{ maxDescriptorSetUpdateAfterBindInputAttachments_ } , supportedDepthResolveModes{ supportedDepthResolveModes_ } , supportedStencilResolveModes{ supportedStencilResolveModes_ } , independentResolveNone{ independentResolveNone_ } , independentResolve{ independentResolve_ } , filterMinmaxSingleComponentFormats{ filterMinmaxSingleComponentFormats_ } , filterMinmaxImageComponentMapping{ filterMinmaxImageComponentMapping_ } , maxTimelineSemaphoreValueDifference{ maxTimelineSemaphoreValueDifference_ } , framebufferIntegerColorSampleCounts{ framebufferIntegerColorSampleCounts_ } { } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan12Properties( PhysicalDeviceVulkan12Properties const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceVulkan12Properties( VkPhysicalDeviceVulkan12Properties const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceVulkan12Properties( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceVulkan12Properties & operator=( PhysicalDeviceVulkan12Properties const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceVulkan12Properties & operator=( VkPhysicalDeviceVulkan12Properties const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceVulkan12Properties const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceVulkan12Properties &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple const &, VULKAN_HPP_NAMESPACE::ArrayWrapper1D const &, VULKAN_HPP_NAMESPACE::ConformanceVersion const &, VULKAN_HPP_NAMESPACE::ShaderFloatControlsIndependence const &, VULKAN_HPP_NAMESPACE::ShaderFloatControlsIndependence const &, VULKAN_HPP_NAMESPACE::Bool32 const &, VULKAN_HPP_NAMESPACE::Bool32 const &, VULKAN_HPP_NAMESPACE::Bool32 const &, VULKAN_HPP_NAMESPACE::Bool32 const &, VULKAN_HPP_NAMESPACE::Bool32 const &, VULKAN_HPP_NAMESPACE::Bool32 const &, VULKAN_HPP_NAMESPACE::Bool32 const &, VULKAN_HPP_NAMESPACE::Bool32 const &, VULKAN_HPP_NAMESPACE::Bool32 const &, VULKAN_HPP_NAMESPACE::Bool32 const &, VULKAN_HPP_NAMESPACE::Bool32 const &, VULKAN_HPP_NAMESPACE::Bool32 const &, VULKAN_HPP_NAMESPACE::Bool32 const &, VULKAN_HPP_NAMESPACE::Bool32 const &, VULKAN_HPP_NAMESPACE::Bool32 const &, uint32_t const &, VULKAN_HPP_NAMESPACE::Bool32 const &, VULKAN_HPP_NAMESPACE::Bool32 const &, VULKAN_HPP_NAMESPACE::Bool32 const &, VULKAN_HPP_NAMESPACE::Bool32 const &, VULKAN_HPP_NAMESPACE::Bool32 const &, VULKAN_HPP_NAMESPACE::Bool32 const &, VULKAN_HPP_NAMESPACE::Bool32 const &, uint32_t const &, uint32_t const &, uint32_t const &, uint32_t const &, uint32_t const &, uint32_t const &, uint32_t const &, uint32_t const &, uint32_t const &, uint32_t const &, uint32_t const &, uint32_t const &, uint32_t const &, uint32_t const &, uint32_t const &, VULKAN_HPP_NAMESPACE::ResolveModeFlags const &, VULKAN_HPP_NAMESPACE::ResolveModeFlags const &, VULKAN_HPP_NAMESPACE::Bool32 const &, VULKAN_HPP_NAMESPACE::Bool32 const &, VULKAN_HPP_NAMESPACE::Bool32 const &, VULKAN_HPP_NAMESPACE::Bool32 const &, uint64_t const &, VULKAN_HPP_NAMESPACE::SampleCountFlags const &> # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, driverID, driverName, driverInfo, conformanceVersion, denormBehaviorIndependence, roundingModeIndependence, shaderSignedZeroInfNanPreserveFloat16, shaderSignedZeroInfNanPreserveFloat32, shaderSignedZeroInfNanPreserveFloat64, shaderDenormPreserveFloat16, shaderDenormPreserveFloat32, shaderDenormPreserveFloat64, shaderDenormFlushToZeroFloat16, shaderDenormFlushToZeroFloat32, shaderDenormFlushToZeroFloat64, shaderRoundingModeRTEFloat16, shaderRoundingModeRTEFloat32, shaderRoundingModeRTEFloat64, shaderRoundingModeRTZFloat16, shaderRoundingModeRTZFloat32, shaderRoundingModeRTZFloat64, maxUpdateAfterBindDescriptorsInAllPools, shaderUniformBufferArrayNonUniformIndexingNative, shaderSampledImageArrayNonUniformIndexingNative, shaderStorageBufferArrayNonUniformIndexingNative, shaderStorageImageArrayNonUniformIndexingNative, shaderInputAttachmentArrayNonUniformIndexingNative, robustBufferAccessUpdateAfterBind, quadDivergentImplicitLod, maxPerStageDescriptorUpdateAfterBindSamplers, maxPerStageDescriptorUpdateAfterBindUniformBuffers, maxPerStageDescriptorUpdateAfterBindStorageBuffers, maxPerStageDescriptorUpdateAfterBindSampledImages, maxPerStageDescriptorUpdateAfterBindStorageImages, maxPerStageDescriptorUpdateAfterBindInputAttachments, maxPerStageUpdateAfterBindResources, maxDescriptorSetUpdateAfterBindSamplers, maxDescriptorSetUpdateAfterBindUniformBuffers, maxDescriptorSetUpdateAfterBindUniformBuffersDynamic, maxDescriptorSetUpdateAfterBindStorageBuffers, maxDescriptorSetUpdateAfterBindStorageBuffersDynamic, maxDescriptorSetUpdateAfterBindSampledImages, maxDescriptorSetUpdateAfterBindStorageImages, maxDescriptorSetUpdateAfterBindInputAttachments, supportedDepthResolveModes, supportedStencilResolveModes, independentResolveNone, independentResolve, filterMinmaxSingleComponentFormats, filterMinmaxImageComponentMapping, maxTimelineSemaphoreValueDifference, framebufferIntegerColorSampleCounts ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) std::strong_ordering operator<=>( PhysicalDeviceVulkan12Properties const & rhs ) const VULKAN_HPP_NOEXCEPT { if ( auto cmp = sType <=> rhs.sType; cmp != 0 ) return cmp; if ( auto cmp = pNext <=> rhs.pNext; cmp != 0 ) return cmp; if ( auto cmp = driverID <=> rhs.driverID; cmp != 0 ) return cmp; if ( auto cmp = strcmp( driverName, rhs.driverName ); cmp != 0 ) return ( cmp < 0 ) ? std::strong_ordering::less : std::strong_ordering::greater; if ( auto cmp = strcmp( driverInfo, rhs.driverInfo ); cmp != 0 ) return ( cmp < 0 ) ? std::strong_ordering::less : std::strong_ordering::greater; if ( auto cmp = conformanceVersion <=> rhs.conformanceVersion; cmp != 0 ) return cmp; if ( auto cmp = denormBehaviorIndependence <=> rhs.denormBehaviorIndependence; cmp != 0 ) return cmp; if ( auto cmp = roundingModeIndependence <=> rhs.roundingModeIndependence; cmp != 0 ) return cmp; if ( auto cmp = shaderSignedZeroInfNanPreserveFloat16 <=> rhs.shaderSignedZeroInfNanPreserveFloat16; cmp != 0 ) return cmp; if ( auto cmp = shaderSignedZeroInfNanPreserveFloat32 <=> rhs.shaderSignedZeroInfNanPreserveFloat32; cmp != 0 ) return cmp; if ( auto cmp = shaderSignedZeroInfNanPreserveFloat64 <=> rhs.shaderSignedZeroInfNanPreserveFloat64; cmp != 0 ) return cmp; if ( auto cmp = shaderDenormPreserveFloat16 <=> rhs.shaderDenormPreserveFloat16; cmp != 0 ) return cmp; if ( auto cmp = shaderDenormPreserveFloat32 <=> rhs.shaderDenormPreserveFloat32; cmp != 0 ) return cmp; if ( auto cmp = shaderDenormPreserveFloat64 <=> rhs.shaderDenormPreserveFloat64; cmp != 0 ) return cmp; if ( auto cmp = shaderDenormFlushToZeroFloat16 <=> rhs.shaderDenormFlushToZeroFloat16; cmp != 0 ) return cmp; if ( auto cmp = shaderDenormFlushToZeroFloat32 <=> rhs.shaderDenormFlushToZeroFloat32; cmp != 0 ) return cmp; if ( auto cmp = shaderDenormFlushToZeroFloat64 <=> rhs.shaderDenormFlushToZeroFloat64; cmp != 0 ) return cmp; if ( auto cmp = shaderRoundingModeRTEFloat16 <=> rhs.shaderRoundingModeRTEFloat16; cmp != 0 ) return cmp; if ( auto cmp = shaderRoundingModeRTEFloat32 <=> rhs.shaderRoundingModeRTEFloat32; cmp != 0 ) return cmp; if ( auto cmp = shaderRoundingModeRTEFloat64 <=> rhs.shaderRoundingModeRTEFloat64; cmp != 0 ) return cmp; if ( auto cmp = shaderRoundingModeRTZFloat16 <=> rhs.shaderRoundingModeRTZFloat16; cmp != 0 ) return cmp; if ( auto cmp = shaderRoundingModeRTZFloat32 <=> rhs.shaderRoundingModeRTZFloat32; cmp != 0 ) return cmp; if ( auto cmp = shaderRoundingModeRTZFloat64 <=> rhs.shaderRoundingModeRTZFloat64; cmp != 0 ) return cmp; if ( auto cmp = maxUpdateAfterBindDescriptorsInAllPools <=> rhs.maxUpdateAfterBindDescriptorsInAllPools; cmp != 0 ) return cmp; if ( auto cmp = shaderUniformBufferArrayNonUniformIndexingNative <=> rhs.shaderUniformBufferArrayNonUniformIndexingNative; cmp != 0 ) return cmp; if ( auto cmp = shaderSampledImageArrayNonUniformIndexingNative <=> rhs.shaderSampledImageArrayNonUniformIndexingNative; cmp != 0 ) return cmp; if ( auto cmp = shaderStorageBufferArrayNonUniformIndexingNative <=> rhs.shaderStorageBufferArrayNonUniformIndexingNative; cmp != 0 ) return cmp; if ( auto cmp = shaderStorageImageArrayNonUniformIndexingNative <=> rhs.shaderStorageImageArrayNonUniformIndexingNative; cmp != 0 ) return cmp; if ( auto cmp = shaderInputAttachmentArrayNonUniformIndexingNative <=> rhs.shaderInputAttachmentArrayNonUniformIndexingNative; cmp != 0 ) return cmp; if ( auto cmp = robustBufferAccessUpdateAfterBind <=> rhs.robustBufferAccessUpdateAfterBind; cmp != 0 ) return cmp; if ( auto cmp = quadDivergentImplicitLod <=> rhs.quadDivergentImplicitLod; cmp != 0 ) return cmp; if ( auto cmp = maxPerStageDescriptorUpdateAfterBindSamplers <=> rhs.maxPerStageDescriptorUpdateAfterBindSamplers; cmp != 0 ) return cmp; if ( auto cmp = maxPerStageDescriptorUpdateAfterBindUniformBuffers <=> rhs.maxPerStageDescriptorUpdateAfterBindUniformBuffers; cmp != 0 ) return cmp; if ( auto cmp = maxPerStageDescriptorUpdateAfterBindStorageBuffers <=> rhs.maxPerStageDescriptorUpdateAfterBindStorageBuffers; cmp != 0 ) return cmp; if ( auto cmp = maxPerStageDescriptorUpdateAfterBindSampledImages <=> rhs.maxPerStageDescriptorUpdateAfterBindSampledImages; cmp != 0 ) return cmp; if ( auto cmp = maxPerStageDescriptorUpdateAfterBindStorageImages <=> rhs.maxPerStageDescriptorUpdateAfterBindStorageImages; cmp != 0 ) return cmp; if ( auto cmp = maxPerStageDescriptorUpdateAfterBindInputAttachments <=> rhs.maxPerStageDescriptorUpdateAfterBindInputAttachments; cmp != 0 ) return cmp; if ( auto cmp = maxPerStageUpdateAfterBindResources <=> rhs.maxPerStageUpdateAfterBindResources; cmp != 0 ) return cmp; if ( auto cmp = maxDescriptorSetUpdateAfterBindSamplers <=> rhs.maxDescriptorSetUpdateAfterBindSamplers; cmp != 0 ) return cmp; if ( auto cmp = maxDescriptorSetUpdateAfterBindUniformBuffers <=> rhs.maxDescriptorSetUpdateAfterBindUniformBuffers; cmp != 0 ) return cmp; if ( auto cmp = maxDescriptorSetUpdateAfterBindUniformBuffersDynamic <=> rhs.maxDescriptorSetUpdateAfterBindUniformBuffersDynamic; cmp != 0 ) return cmp; if ( auto cmp = maxDescriptorSetUpdateAfterBindStorageBuffers <=> rhs.maxDescriptorSetUpdateAfterBindStorageBuffers; cmp != 0 ) return cmp; if ( auto cmp = maxDescriptorSetUpdateAfterBindStorageBuffersDynamic <=> rhs.maxDescriptorSetUpdateAfterBindStorageBuffersDynamic; cmp != 0 ) return cmp; if ( auto cmp = maxDescriptorSetUpdateAfterBindSampledImages <=> rhs.maxDescriptorSetUpdateAfterBindSampledImages; cmp != 0 ) return cmp; if ( auto cmp = maxDescriptorSetUpdateAfterBindStorageImages <=> rhs.maxDescriptorSetUpdateAfterBindStorageImages; cmp != 0 ) return cmp; if ( auto cmp = maxDescriptorSetUpdateAfterBindInputAttachments <=> rhs.maxDescriptorSetUpdateAfterBindInputAttachments; cmp != 0 ) return cmp; if ( auto cmp = supportedDepthResolveModes <=> rhs.supportedDepthResolveModes; cmp != 0 ) return cmp; if ( auto cmp = supportedStencilResolveModes <=> rhs.supportedStencilResolveModes; cmp != 0 ) return cmp; if ( auto cmp = independentResolveNone <=> rhs.independentResolveNone; cmp != 0 ) return cmp; if ( auto cmp = independentResolve <=> rhs.independentResolve; cmp != 0 ) return cmp; if ( auto cmp = filterMinmaxSingleComponentFormats <=> rhs.filterMinmaxSingleComponentFormats; cmp != 0 ) return cmp; if ( auto cmp = filterMinmaxImageComponentMapping <=> rhs.filterMinmaxImageComponentMapping; cmp != 0 ) return cmp; if ( auto cmp = maxTimelineSemaphoreValueDifference <=> rhs.maxTimelineSemaphoreValueDifference; cmp != 0 ) return cmp; if ( auto cmp = framebufferIntegerColorSampleCounts <=> rhs.framebufferIntegerColorSampleCounts; cmp != 0 ) return cmp; return std::strong_ordering::equivalent; } #endif bool operator==( PhysicalDeviceVulkan12Properties const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( driverID == rhs.driverID ) && ( strcmp( driverName, rhs.driverName ) == 0 ) && ( strcmp( driverInfo, rhs.driverInfo ) == 0 ) && ( conformanceVersion == rhs.conformanceVersion ) && ( denormBehaviorIndependence == rhs.denormBehaviorIndependence ) && ( roundingModeIndependence == rhs.roundingModeIndependence ) && ( shaderSignedZeroInfNanPreserveFloat16 == rhs.shaderSignedZeroInfNanPreserveFloat16 ) && ( shaderSignedZeroInfNanPreserveFloat32 == rhs.shaderSignedZeroInfNanPreserveFloat32 ) && ( shaderSignedZeroInfNanPreserveFloat64 == rhs.shaderSignedZeroInfNanPreserveFloat64 ) && ( shaderDenormPreserveFloat16 == rhs.shaderDenormPreserveFloat16 ) && ( shaderDenormPreserveFloat32 == rhs.shaderDenormPreserveFloat32 ) && ( shaderDenormPreserveFloat64 == rhs.shaderDenormPreserveFloat64 ) && ( shaderDenormFlushToZeroFloat16 == rhs.shaderDenormFlushToZeroFloat16 ) && ( shaderDenormFlushToZeroFloat32 == rhs.shaderDenormFlushToZeroFloat32 ) && ( shaderDenormFlushToZeroFloat64 == rhs.shaderDenormFlushToZeroFloat64 ) && ( shaderRoundingModeRTEFloat16 == rhs.shaderRoundingModeRTEFloat16 ) && ( shaderRoundingModeRTEFloat32 == rhs.shaderRoundingModeRTEFloat32 ) && ( shaderRoundingModeRTEFloat64 == rhs.shaderRoundingModeRTEFloat64 ) && ( shaderRoundingModeRTZFloat16 == rhs.shaderRoundingModeRTZFloat16 ) && ( shaderRoundingModeRTZFloat32 == rhs.shaderRoundingModeRTZFloat32 ) && ( shaderRoundingModeRTZFloat64 == rhs.shaderRoundingModeRTZFloat64 ) && ( maxUpdateAfterBindDescriptorsInAllPools == rhs.maxUpdateAfterBindDescriptorsInAllPools ) && ( shaderUniformBufferArrayNonUniformIndexingNative == rhs.shaderUniformBufferArrayNonUniformIndexingNative ) && ( shaderSampledImageArrayNonUniformIndexingNative == rhs.shaderSampledImageArrayNonUniformIndexingNative ) && ( shaderStorageBufferArrayNonUniformIndexingNative == rhs.shaderStorageBufferArrayNonUniformIndexingNative ) && ( shaderStorageImageArrayNonUniformIndexingNative == rhs.shaderStorageImageArrayNonUniformIndexingNative ) && ( shaderInputAttachmentArrayNonUniformIndexingNative == rhs.shaderInputAttachmentArrayNonUniformIndexingNative ) && ( robustBufferAccessUpdateAfterBind == rhs.robustBufferAccessUpdateAfterBind ) && ( quadDivergentImplicitLod == rhs.quadDivergentImplicitLod ) && ( maxPerStageDescriptorUpdateAfterBindSamplers == rhs.maxPerStageDescriptorUpdateAfterBindSamplers ) && ( maxPerStageDescriptorUpdateAfterBindUniformBuffers == rhs.maxPerStageDescriptorUpdateAfterBindUniformBuffers ) && ( maxPerStageDescriptorUpdateAfterBindStorageBuffers == rhs.maxPerStageDescriptorUpdateAfterBindStorageBuffers ) && ( maxPerStageDescriptorUpdateAfterBindSampledImages == rhs.maxPerStageDescriptorUpdateAfterBindSampledImages ) && ( maxPerStageDescriptorUpdateAfterBindStorageImages == rhs.maxPerStageDescriptorUpdateAfterBindStorageImages ) && ( maxPerStageDescriptorUpdateAfterBindInputAttachments == rhs.maxPerStageDescriptorUpdateAfterBindInputAttachments ) && ( maxPerStageUpdateAfterBindResources == rhs.maxPerStageUpdateAfterBindResources ) && ( maxDescriptorSetUpdateAfterBindSamplers == rhs.maxDescriptorSetUpdateAfterBindSamplers ) && ( maxDescriptorSetUpdateAfterBindUniformBuffers == rhs.maxDescriptorSetUpdateAfterBindUniformBuffers ) && ( maxDescriptorSetUpdateAfterBindUniformBuffersDynamic == rhs.maxDescriptorSetUpdateAfterBindUniformBuffersDynamic ) && ( maxDescriptorSetUpdateAfterBindStorageBuffers == rhs.maxDescriptorSetUpdateAfterBindStorageBuffers ) && ( maxDescriptorSetUpdateAfterBindStorageBuffersDynamic == rhs.maxDescriptorSetUpdateAfterBindStorageBuffersDynamic ) && ( maxDescriptorSetUpdateAfterBindSampledImages == rhs.maxDescriptorSetUpdateAfterBindSampledImages ) && ( maxDescriptorSetUpdateAfterBindStorageImages == rhs.maxDescriptorSetUpdateAfterBindStorageImages ) && ( maxDescriptorSetUpdateAfterBindInputAttachments == rhs.maxDescriptorSetUpdateAfterBindInputAttachments ) && ( supportedDepthResolveModes == rhs.supportedDepthResolveModes ) && ( supportedStencilResolveModes == rhs.supportedStencilResolveModes ) && ( independentResolveNone == rhs.independentResolveNone ) && ( independentResolve == rhs.independentResolve ) && ( filterMinmaxSingleComponentFormats == rhs.filterMinmaxSingleComponentFormats ) && ( filterMinmaxImageComponentMapping == rhs.filterMinmaxImageComponentMapping ) && ( maxTimelineSemaphoreValueDifference == rhs.maxTimelineSemaphoreValueDifference ) && ( framebufferIntegerColorSampleCounts == rhs.framebufferIntegerColorSampleCounts ); } bool operator!=( PhysicalDeviceVulkan12Properties const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceVulkan12Properties; void * pNext = {}; VULKAN_HPP_NAMESPACE::DriverId driverID = VULKAN_HPP_NAMESPACE::DriverId::eAmdProprietary; VULKAN_HPP_NAMESPACE::ArrayWrapper1D driverName = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D driverInfo = {}; VULKAN_HPP_NAMESPACE::ConformanceVersion conformanceVersion = {}; VULKAN_HPP_NAMESPACE::ShaderFloatControlsIndependence denormBehaviorIndependence = VULKAN_HPP_NAMESPACE::ShaderFloatControlsIndependence::e32BitOnly; VULKAN_HPP_NAMESPACE::ShaderFloatControlsIndependence roundingModeIndependence = VULKAN_HPP_NAMESPACE::ShaderFloatControlsIndependence::e32BitOnly; VULKAN_HPP_NAMESPACE::Bool32 shaderSignedZeroInfNanPreserveFloat16 = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderSignedZeroInfNanPreserveFloat32 = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderSignedZeroInfNanPreserveFloat64 = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderDenormPreserveFloat16 = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderDenormPreserveFloat32 = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderDenormPreserveFloat64 = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderDenormFlushToZeroFloat16 = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderDenormFlushToZeroFloat32 = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderDenormFlushToZeroFloat64 = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderRoundingModeRTEFloat16 = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderRoundingModeRTEFloat32 = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderRoundingModeRTEFloat64 = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderRoundingModeRTZFloat16 = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderRoundingModeRTZFloat32 = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderRoundingModeRTZFloat64 = {}; uint32_t maxUpdateAfterBindDescriptorsInAllPools = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderUniformBufferArrayNonUniformIndexingNative = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderSampledImageArrayNonUniformIndexingNative = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderStorageBufferArrayNonUniformIndexingNative = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderStorageImageArrayNonUniformIndexingNative = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderInputAttachmentArrayNonUniformIndexingNative = {}; VULKAN_HPP_NAMESPACE::Bool32 robustBufferAccessUpdateAfterBind = {}; VULKAN_HPP_NAMESPACE::Bool32 quadDivergentImplicitLod = {}; uint32_t maxPerStageDescriptorUpdateAfterBindSamplers = {}; uint32_t maxPerStageDescriptorUpdateAfterBindUniformBuffers = {}; uint32_t maxPerStageDescriptorUpdateAfterBindStorageBuffers = {}; uint32_t maxPerStageDescriptorUpdateAfterBindSampledImages = {}; uint32_t maxPerStageDescriptorUpdateAfterBindStorageImages = {}; uint32_t maxPerStageDescriptorUpdateAfterBindInputAttachments = {}; uint32_t maxPerStageUpdateAfterBindResources = {}; uint32_t maxDescriptorSetUpdateAfterBindSamplers = {}; uint32_t maxDescriptorSetUpdateAfterBindUniformBuffers = {}; uint32_t maxDescriptorSetUpdateAfterBindUniformBuffersDynamic = {}; uint32_t maxDescriptorSetUpdateAfterBindStorageBuffers = {}; uint32_t maxDescriptorSetUpdateAfterBindStorageBuffersDynamic = {}; uint32_t maxDescriptorSetUpdateAfterBindSampledImages = {}; uint32_t maxDescriptorSetUpdateAfterBindStorageImages = {}; uint32_t maxDescriptorSetUpdateAfterBindInputAttachments = {}; VULKAN_HPP_NAMESPACE::ResolveModeFlags supportedDepthResolveModes = {}; VULKAN_HPP_NAMESPACE::ResolveModeFlags supportedStencilResolveModes = {}; VULKAN_HPP_NAMESPACE::Bool32 independentResolveNone = {}; VULKAN_HPP_NAMESPACE::Bool32 independentResolve = {}; VULKAN_HPP_NAMESPACE::Bool32 filterMinmaxSingleComponentFormats = {}; VULKAN_HPP_NAMESPACE::Bool32 filterMinmaxImageComponentMapping = {}; uint64_t maxTimelineSemaphoreValueDifference = {}; VULKAN_HPP_NAMESPACE::SampleCountFlags framebufferIntegerColorSampleCounts = {}; }; template <> struct CppType { using Type = PhysicalDeviceVulkan12Properties; }; struct PhysicalDeviceVulkan13Features { using NativeType = VkPhysicalDeviceVulkan13Features; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceVulkan13Features; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceVulkan13Features( VULKAN_HPP_NAMESPACE::Bool32 robustImageAccess_ = {}, VULKAN_HPP_NAMESPACE::Bool32 inlineUniformBlock_ = {}, VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingInlineUniformBlockUpdateAfterBind_ = {}, VULKAN_HPP_NAMESPACE::Bool32 pipelineCreationCacheControl_ = {}, VULKAN_HPP_NAMESPACE::Bool32 privateData_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderDemoteToHelperInvocation_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderTerminateInvocation_ = {}, VULKAN_HPP_NAMESPACE::Bool32 subgroupSizeControl_ = {}, VULKAN_HPP_NAMESPACE::Bool32 computeFullSubgroups_ = {}, VULKAN_HPP_NAMESPACE::Bool32 synchronization2_ = {}, VULKAN_HPP_NAMESPACE::Bool32 textureCompressionASTC_HDR_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderZeroInitializeWorkgroupMemory_ = {}, VULKAN_HPP_NAMESPACE::Bool32 dynamicRendering_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderIntegerDotProduct_ = {}, VULKAN_HPP_NAMESPACE::Bool32 maintenance4_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , robustImageAccess{ robustImageAccess_ } , inlineUniformBlock{ inlineUniformBlock_ } , descriptorBindingInlineUniformBlockUpdateAfterBind{ descriptorBindingInlineUniformBlockUpdateAfterBind_ } , pipelineCreationCacheControl{ pipelineCreationCacheControl_ } , privateData{ privateData_ } , shaderDemoteToHelperInvocation{ shaderDemoteToHelperInvocation_ } , shaderTerminateInvocation{ shaderTerminateInvocation_ } , subgroupSizeControl{ subgroupSizeControl_ } , computeFullSubgroups{ computeFullSubgroups_ } , synchronization2{ synchronization2_ } , textureCompressionASTC_HDR{ textureCompressionASTC_HDR_ } , shaderZeroInitializeWorkgroupMemory{ shaderZeroInitializeWorkgroupMemory_ } , dynamicRendering{ dynamicRendering_ } , shaderIntegerDotProduct{ shaderIntegerDotProduct_ } , maintenance4{ maintenance4_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceVulkan13Features( PhysicalDeviceVulkan13Features const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceVulkan13Features( VkPhysicalDeviceVulkan13Features const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceVulkan13Features( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceVulkan13Features & operator=( PhysicalDeviceVulkan13Features const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceVulkan13Features & operator=( VkPhysicalDeviceVulkan13Features const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan13Features & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan13Features & setRobustImageAccess( VULKAN_HPP_NAMESPACE::Bool32 robustImageAccess_ ) VULKAN_HPP_NOEXCEPT { robustImageAccess = robustImageAccess_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan13Features & setInlineUniformBlock( VULKAN_HPP_NAMESPACE::Bool32 inlineUniformBlock_ ) VULKAN_HPP_NOEXCEPT { inlineUniformBlock = inlineUniformBlock_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan13Features & setDescriptorBindingInlineUniformBlockUpdateAfterBind( VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingInlineUniformBlockUpdateAfterBind_ ) VULKAN_HPP_NOEXCEPT { descriptorBindingInlineUniformBlockUpdateAfterBind = descriptorBindingInlineUniformBlockUpdateAfterBind_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan13Features & setPipelineCreationCacheControl( VULKAN_HPP_NAMESPACE::Bool32 pipelineCreationCacheControl_ ) VULKAN_HPP_NOEXCEPT { pipelineCreationCacheControl = pipelineCreationCacheControl_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan13Features & setPrivateData( VULKAN_HPP_NAMESPACE::Bool32 privateData_ ) VULKAN_HPP_NOEXCEPT { privateData = privateData_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan13Features & setShaderDemoteToHelperInvocation( VULKAN_HPP_NAMESPACE::Bool32 shaderDemoteToHelperInvocation_ ) VULKAN_HPP_NOEXCEPT { shaderDemoteToHelperInvocation = shaderDemoteToHelperInvocation_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan13Features & setShaderTerminateInvocation( VULKAN_HPP_NAMESPACE::Bool32 shaderTerminateInvocation_ ) VULKAN_HPP_NOEXCEPT { shaderTerminateInvocation = shaderTerminateInvocation_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan13Features & setSubgroupSizeControl( VULKAN_HPP_NAMESPACE::Bool32 subgroupSizeControl_ ) VULKAN_HPP_NOEXCEPT { subgroupSizeControl = subgroupSizeControl_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan13Features & setComputeFullSubgroups( VULKAN_HPP_NAMESPACE::Bool32 computeFullSubgroups_ ) VULKAN_HPP_NOEXCEPT { computeFullSubgroups = computeFullSubgroups_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan13Features & setSynchronization2( VULKAN_HPP_NAMESPACE::Bool32 synchronization2_ ) VULKAN_HPP_NOEXCEPT { synchronization2 = synchronization2_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan13Features & setTextureCompressionASTC_HDR( VULKAN_HPP_NAMESPACE::Bool32 textureCompressionASTC_HDR_ ) VULKAN_HPP_NOEXCEPT { textureCompressionASTC_HDR = textureCompressionASTC_HDR_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan13Features & setShaderZeroInitializeWorkgroupMemory( VULKAN_HPP_NAMESPACE::Bool32 shaderZeroInitializeWorkgroupMemory_ ) VULKAN_HPP_NOEXCEPT { shaderZeroInitializeWorkgroupMemory = shaderZeroInitializeWorkgroupMemory_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan13Features & setDynamicRendering( VULKAN_HPP_NAMESPACE::Bool32 dynamicRendering_ ) VULKAN_HPP_NOEXCEPT { dynamicRendering = dynamicRendering_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan13Features & setShaderIntegerDotProduct( VULKAN_HPP_NAMESPACE::Bool32 shaderIntegerDotProduct_ ) VULKAN_HPP_NOEXCEPT { shaderIntegerDotProduct = shaderIntegerDotProduct_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan13Features & setMaintenance4( VULKAN_HPP_NAMESPACE::Bool32 maintenance4_ ) VULKAN_HPP_NOEXCEPT { maintenance4 = maintenance4_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceVulkan13Features const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceVulkan13Features &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, robustImageAccess, inlineUniformBlock, descriptorBindingInlineUniformBlockUpdateAfterBind, pipelineCreationCacheControl, privateData, shaderDemoteToHelperInvocation, shaderTerminateInvocation, subgroupSizeControl, computeFullSubgroups, synchronization2, textureCompressionASTC_HDR, shaderZeroInitializeWorkgroupMemory, dynamicRendering, shaderIntegerDotProduct, maintenance4 ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceVulkan13Features const & ) const = default; #else bool operator==( PhysicalDeviceVulkan13Features const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( robustImageAccess == rhs.robustImageAccess ) && ( inlineUniformBlock == rhs.inlineUniformBlock ) && ( descriptorBindingInlineUniformBlockUpdateAfterBind == rhs.descriptorBindingInlineUniformBlockUpdateAfterBind ) && ( pipelineCreationCacheControl == rhs.pipelineCreationCacheControl ) && ( privateData == rhs.privateData ) && ( shaderDemoteToHelperInvocation == rhs.shaderDemoteToHelperInvocation ) && ( shaderTerminateInvocation == rhs.shaderTerminateInvocation ) && ( subgroupSizeControl == rhs.subgroupSizeControl ) && ( computeFullSubgroups == rhs.computeFullSubgroups ) && ( synchronization2 == rhs.synchronization2 ) && ( textureCompressionASTC_HDR == rhs.textureCompressionASTC_HDR ) && ( shaderZeroInitializeWorkgroupMemory == rhs.shaderZeroInitializeWorkgroupMemory ) && ( dynamicRendering == rhs.dynamicRendering ) && ( shaderIntegerDotProduct == rhs.shaderIntegerDotProduct ) && ( maintenance4 == rhs.maintenance4 ); # endif } bool operator!=( PhysicalDeviceVulkan13Features const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceVulkan13Features; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 robustImageAccess = {}; VULKAN_HPP_NAMESPACE::Bool32 inlineUniformBlock = {}; VULKAN_HPP_NAMESPACE::Bool32 descriptorBindingInlineUniformBlockUpdateAfterBind = {}; VULKAN_HPP_NAMESPACE::Bool32 pipelineCreationCacheControl = {}; VULKAN_HPP_NAMESPACE::Bool32 privateData = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderDemoteToHelperInvocation = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderTerminateInvocation = {}; VULKAN_HPP_NAMESPACE::Bool32 subgroupSizeControl = {}; VULKAN_HPP_NAMESPACE::Bool32 computeFullSubgroups = {}; VULKAN_HPP_NAMESPACE::Bool32 synchronization2 = {}; VULKAN_HPP_NAMESPACE::Bool32 textureCompressionASTC_HDR = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderZeroInitializeWorkgroupMemory = {}; VULKAN_HPP_NAMESPACE::Bool32 dynamicRendering = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderIntegerDotProduct = {}; VULKAN_HPP_NAMESPACE::Bool32 maintenance4 = {}; }; template <> struct CppType { using Type = PhysicalDeviceVulkan13Features; }; struct PhysicalDeviceVulkan13Properties { using NativeType = VkPhysicalDeviceVulkan13Properties; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceVulkan13Properties; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceVulkan13Properties( uint32_t minSubgroupSize_ = {}, uint32_t maxSubgroupSize_ = {}, uint32_t maxComputeWorkgroupSubgroups_ = {}, VULKAN_HPP_NAMESPACE::ShaderStageFlags requiredSubgroupSizeStages_ = {}, uint32_t maxInlineUniformBlockSize_ = {}, uint32_t maxPerStageDescriptorInlineUniformBlocks_ = {}, uint32_t maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks_ = {}, uint32_t maxDescriptorSetInlineUniformBlocks_ = {}, uint32_t maxDescriptorSetUpdateAfterBindInlineUniformBlocks_ = {}, uint32_t maxInlineUniformTotalSize_ = {}, VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct8BitUnsignedAccelerated_ = {}, VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct8BitSignedAccelerated_ = {}, VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct8BitMixedSignednessAccelerated_ = {}, VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct4x8BitPackedUnsignedAccelerated_ = {}, VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct4x8BitPackedSignedAccelerated_ = {}, VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct4x8BitPackedMixedSignednessAccelerated_ = {}, VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct16BitUnsignedAccelerated_ = {}, VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct16BitSignedAccelerated_ = {}, VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct16BitMixedSignednessAccelerated_ = {}, VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct32BitUnsignedAccelerated_ = {}, VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct32BitSignedAccelerated_ = {}, VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct32BitMixedSignednessAccelerated_ = {}, VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct64BitUnsignedAccelerated_ = {}, VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct64BitSignedAccelerated_ = {}, VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct64BitMixedSignednessAccelerated_ = {}, VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating8BitUnsignedAccelerated_ = {}, VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating8BitSignedAccelerated_ = {}, VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated_ = {}, VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated_ = {}, VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated_ = {}, VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated_ = {}, VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating16BitUnsignedAccelerated_ = {}, VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating16BitSignedAccelerated_ = {}, VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated_ = {}, VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating32BitUnsignedAccelerated_ = {}, VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating32BitSignedAccelerated_ = {}, VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated_ = {}, VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating64BitUnsignedAccelerated_ = {}, VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating64BitSignedAccelerated_ = {}, VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize storageTexelBufferOffsetAlignmentBytes_ = {}, VULKAN_HPP_NAMESPACE::Bool32 storageTexelBufferOffsetSingleTexelAlignment_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize uniformTexelBufferOffsetAlignmentBytes_ = {}, VULKAN_HPP_NAMESPACE::Bool32 uniformTexelBufferOffsetSingleTexelAlignment_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize maxBufferSize_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , minSubgroupSize{ minSubgroupSize_ } , maxSubgroupSize{ maxSubgroupSize_ } , maxComputeWorkgroupSubgroups{ maxComputeWorkgroupSubgroups_ } , requiredSubgroupSizeStages{ requiredSubgroupSizeStages_ } , maxInlineUniformBlockSize{ maxInlineUniformBlockSize_ } , maxPerStageDescriptorInlineUniformBlocks{ maxPerStageDescriptorInlineUniformBlocks_ } , maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks{ maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks_ } , maxDescriptorSetInlineUniformBlocks{ maxDescriptorSetInlineUniformBlocks_ } , maxDescriptorSetUpdateAfterBindInlineUniformBlocks{ maxDescriptorSetUpdateAfterBindInlineUniformBlocks_ } , maxInlineUniformTotalSize{ maxInlineUniformTotalSize_ } , integerDotProduct8BitUnsignedAccelerated{ integerDotProduct8BitUnsignedAccelerated_ } , integerDotProduct8BitSignedAccelerated{ integerDotProduct8BitSignedAccelerated_ } , integerDotProduct8BitMixedSignednessAccelerated{ integerDotProduct8BitMixedSignednessAccelerated_ } , integerDotProduct4x8BitPackedUnsignedAccelerated{ integerDotProduct4x8BitPackedUnsignedAccelerated_ } , integerDotProduct4x8BitPackedSignedAccelerated{ integerDotProduct4x8BitPackedSignedAccelerated_ } , integerDotProduct4x8BitPackedMixedSignednessAccelerated{ integerDotProduct4x8BitPackedMixedSignednessAccelerated_ } , integerDotProduct16BitUnsignedAccelerated{ integerDotProduct16BitUnsignedAccelerated_ } , integerDotProduct16BitSignedAccelerated{ integerDotProduct16BitSignedAccelerated_ } , integerDotProduct16BitMixedSignednessAccelerated{ integerDotProduct16BitMixedSignednessAccelerated_ } , integerDotProduct32BitUnsignedAccelerated{ integerDotProduct32BitUnsignedAccelerated_ } , integerDotProduct32BitSignedAccelerated{ integerDotProduct32BitSignedAccelerated_ } , integerDotProduct32BitMixedSignednessAccelerated{ integerDotProduct32BitMixedSignednessAccelerated_ } , integerDotProduct64BitUnsignedAccelerated{ integerDotProduct64BitUnsignedAccelerated_ } , integerDotProduct64BitSignedAccelerated{ integerDotProduct64BitSignedAccelerated_ } , integerDotProduct64BitMixedSignednessAccelerated{ integerDotProduct64BitMixedSignednessAccelerated_ } , integerDotProductAccumulatingSaturating8BitUnsignedAccelerated{ integerDotProductAccumulatingSaturating8BitUnsignedAccelerated_ } , integerDotProductAccumulatingSaturating8BitSignedAccelerated{ integerDotProductAccumulatingSaturating8BitSignedAccelerated_ } , integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated{ integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated_ } , integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated{ integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated_ } , integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated{ integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated_ } , integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated{ integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated_ } , integerDotProductAccumulatingSaturating16BitUnsignedAccelerated{ integerDotProductAccumulatingSaturating16BitUnsignedAccelerated_ } , integerDotProductAccumulatingSaturating16BitSignedAccelerated{ integerDotProductAccumulatingSaturating16BitSignedAccelerated_ } , integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated{ integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated_ } , integerDotProductAccumulatingSaturating32BitUnsignedAccelerated{ integerDotProductAccumulatingSaturating32BitUnsignedAccelerated_ } , integerDotProductAccumulatingSaturating32BitSignedAccelerated{ integerDotProductAccumulatingSaturating32BitSignedAccelerated_ } , integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated{ integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated_ } , integerDotProductAccumulatingSaturating64BitUnsignedAccelerated{ integerDotProductAccumulatingSaturating64BitUnsignedAccelerated_ } , integerDotProductAccumulatingSaturating64BitSignedAccelerated{ integerDotProductAccumulatingSaturating64BitSignedAccelerated_ } , integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated{ integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated_ } , storageTexelBufferOffsetAlignmentBytes{ storageTexelBufferOffsetAlignmentBytes_ } , storageTexelBufferOffsetSingleTexelAlignment{ storageTexelBufferOffsetSingleTexelAlignment_ } , uniformTexelBufferOffsetAlignmentBytes{ uniformTexelBufferOffsetAlignmentBytes_ } , uniformTexelBufferOffsetSingleTexelAlignment{ uniformTexelBufferOffsetSingleTexelAlignment_ } , maxBufferSize{ maxBufferSize_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceVulkan13Properties( PhysicalDeviceVulkan13Properties const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceVulkan13Properties( VkPhysicalDeviceVulkan13Properties const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceVulkan13Properties( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceVulkan13Properties & operator=( PhysicalDeviceVulkan13Properties const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceVulkan13Properties & operator=( VkPhysicalDeviceVulkan13Properties const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceVulkan13Properties const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceVulkan13Properties &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, minSubgroupSize, maxSubgroupSize, maxComputeWorkgroupSubgroups, requiredSubgroupSizeStages, maxInlineUniformBlockSize, maxPerStageDescriptorInlineUniformBlocks, maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks, maxDescriptorSetInlineUniformBlocks, maxDescriptorSetUpdateAfterBindInlineUniformBlocks, maxInlineUniformTotalSize, integerDotProduct8BitUnsignedAccelerated, integerDotProduct8BitSignedAccelerated, integerDotProduct8BitMixedSignednessAccelerated, integerDotProduct4x8BitPackedUnsignedAccelerated, integerDotProduct4x8BitPackedSignedAccelerated, integerDotProduct4x8BitPackedMixedSignednessAccelerated, integerDotProduct16BitUnsignedAccelerated, integerDotProduct16BitSignedAccelerated, integerDotProduct16BitMixedSignednessAccelerated, integerDotProduct32BitUnsignedAccelerated, integerDotProduct32BitSignedAccelerated, integerDotProduct32BitMixedSignednessAccelerated, integerDotProduct64BitUnsignedAccelerated, integerDotProduct64BitSignedAccelerated, integerDotProduct64BitMixedSignednessAccelerated, integerDotProductAccumulatingSaturating8BitUnsignedAccelerated, integerDotProductAccumulatingSaturating8BitSignedAccelerated, integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated, integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated, integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated, integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated, integerDotProductAccumulatingSaturating16BitUnsignedAccelerated, integerDotProductAccumulatingSaturating16BitSignedAccelerated, integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated, integerDotProductAccumulatingSaturating32BitUnsignedAccelerated, integerDotProductAccumulatingSaturating32BitSignedAccelerated, integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated, integerDotProductAccumulatingSaturating64BitUnsignedAccelerated, integerDotProductAccumulatingSaturating64BitSignedAccelerated, integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated, storageTexelBufferOffsetAlignmentBytes, storageTexelBufferOffsetSingleTexelAlignment, uniformTexelBufferOffsetAlignmentBytes, uniformTexelBufferOffsetSingleTexelAlignment, maxBufferSize ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceVulkan13Properties const & ) const = default; #else bool operator==( PhysicalDeviceVulkan13Properties const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( minSubgroupSize == rhs.minSubgroupSize ) && ( maxSubgroupSize == rhs.maxSubgroupSize ) && ( maxComputeWorkgroupSubgroups == rhs.maxComputeWorkgroupSubgroups ) && ( requiredSubgroupSizeStages == rhs.requiredSubgroupSizeStages ) && ( maxInlineUniformBlockSize == rhs.maxInlineUniformBlockSize ) && ( maxPerStageDescriptorInlineUniformBlocks == rhs.maxPerStageDescriptorInlineUniformBlocks ) && ( maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks == rhs.maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks ) && ( maxDescriptorSetInlineUniformBlocks == rhs.maxDescriptorSetInlineUniformBlocks ) && ( maxDescriptorSetUpdateAfterBindInlineUniformBlocks == rhs.maxDescriptorSetUpdateAfterBindInlineUniformBlocks ) && ( maxInlineUniformTotalSize == rhs.maxInlineUniformTotalSize ) && ( integerDotProduct8BitUnsignedAccelerated == rhs.integerDotProduct8BitUnsignedAccelerated ) && ( integerDotProduct8BitSignedAccelerated == rhs.integerDotProduct8BitSignedAccelerated ) && ( integerDotProduct8BitMixedSignednessAccelerated == rhs.integerDotProduct8BitMixedSignednessAccelerated ) && ( integerDotProduct4x8BitPackedUnsignedAccelerated == rhs.integerDotProduct4x8BitPackedUnsignedAccelerated ) && ( integerDotProduct4x8BitPackedSignedAccelerated == rhs.integerDotProduct4x8BitPackedSignedAccelerated ) && ( integerDotProduct4x8BitPackedMixedSignednessAccelerated == rhs.integerDotProduct4x8BitPackedMixedSignednessAccelerated ) && ( integerDotProduct16BitUnsignedAccelerated == rhs.integerDotProduct16BitUnsignedAccelerated ) && ( integerDotProduct16BitSignedAccelerated == rhs.integerDotProduct16BitSignedAccelerated ) && ( integerDotProduct16BitMixedSignednessAccelerated == rhs.integerDotProduct16BitMixedSignednessAccelerated ) && ( integerDotProduct32BitUnsignedAccelerated == rhs.integerDotProduct32BitUnsignedAccelerated ) && ( integerDotProduct32BitSignedAccelerated == rhs.integerDotProduct32BitSignedAccelerated ) && ( integerDotProduct32BitMixedSignednessAccelerated == rhs.integerDotProduct32BitMixedSignednessAccelerated ) && ( integerDotProduct64BitUnsignedAccelerated == rhs.integerDotProduct64BitUnsignedAccelerated ) && ( integerDotProduct64BitSignedAccelerated == rhs.integerDotProduct64BitSignedAccelerated ) && ( integerDotProduct64BitMixedSignednessAccelerated == rhs.integerDotProduct64BitMixedSignednessAccelerated ) && ( integerDotProductAccumulatingSaturating8BitUnsignedAccelerated == rhs.integerDotProductAccumulatingSaturating8BitUnsignedAccelerated ) && ( integerDotProductAccumulatingSaturating8BitSignedAccelerated == rhs.integerDotProductAccumulatingSaturating8BitSignedAccelerated ) && ( integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated == rhs.integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated ) && ( integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated == rhs.integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated ) && ( integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated == rhs.integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated ) && ( integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated == rhs.integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated ) && ( integerDotProductAccumulatingSaturating16BitUnsignedAccelerated == rhs.integerDotProductAccumulatingSaturating16BitUnsignedAccelerated ) && ( integerDotProductAccumulatingSaturating16BitSignedAccelerated == rhs.integerDotProductAccumulatingSaturating16BitSignedAccelerated ) && ( integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated == rhs.integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated ) && ( integerDotProductAccumulatingSaturating32BitUnsignedAccelerated == rhs.integerDotProductAccumulatingSaturating32BitUnsignedAccelerated ) && ( integerDotProductAccumulatingSaturating32BitSignedAccelerated == rhs.integerDotProductAccumulatingSaturating32BitSignedAccelerated ) && ( integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated == rhs.integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated ) && ( integerDotProductAccumulatingSaturating64BitUnsignedAccelerated == rhs.integerDotProductAccumulatingSaturating64BitUnsignedAccelerated ) && ( integerDotProductAccumulatingSaturating64BitSignedAccelerated == rhs.integerDotProductAccumulatingSaturating64BitSignedAccelerated ) && ( integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated == rhs.integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated ) && ( storageTexelBufferOffsetAlignmentBytes == rhs.storageTexelBufferOffsetAlignmentBytes ) && ( storageTexelBufferOffsetSingleTexelAlignment == rhs.storageTexelBufferOffsetSingleTexelAlignment ) && ( uniformTexelBufferOffsetAlignmentBytes == rhs.uniformTexelBufferOffsetAlignmentBytes ) && ( uniformTexelBufferOffsetSingleTexelAlignment == rhs.uniformTexelBufferOffsetSingleTexelAlignment ) && ( maxBufferSize == rhs.maxBufferSize ); # endif } bool operator!=( PhysicalDeviceVulkan13Properties const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceVulkan13Properties; void * pNext = {}; uint32_t minSubgroupSize = {}; uint32_t maxSubgroupSize = {}; uint32_t maxComputeWorkgroupSubgroups = {}; VULKAN_HPP_NAMESPACE::ShaderStageFlags requiredSubgroupSizeStages = {}; uint32_t maxInlineUniformBlockSize = {}; uint32_t maxPerStageDescriptorInlineUniformBlocks = {}; uint32_t maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks = {}; uint32_t maxDescriptorSetInlineUniformBlocks = {}; uint32_t maxDescriptorSetUpdateAfterBindInlineUniformBlocks = {}; uint32_t maxInlineUniformTotalSize = {}; VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct8BitUnsignedAccelerated = {}; VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct8BitSignedAccelerated = {}; VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct8BitMixedSignednessAccelerated = {}; VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct4x8BitPackedUnsignedAccelerated = {}; VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct4x8BitPackedSignedAccelerated = {}; VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct4x8BitPackedMixedSignednessAccelerated = {}; VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct16BitUnsignedAccelerated = {}; VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct16BitSignedAccelerated = {}; VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct16BitMixedSignednessAccelerated = {}; VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct32BitUnsignedAccelerated = {}; VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct32BitSignedAccelerated = {}; VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct32BitMixedSignednessAccelerated = {}; VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct64BitUnsignedAccelerated = {}; VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct64BitSignedAccelerated = {}; VULKAN_HPP_NAMESPACE::Bool32 integerDotProduct64BitMixedSignednessAccelerated = {}; VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating8BitUnsignedAccelerated = {}; VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating8BitSignedAccelerated = {}; VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated = {}; VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated = {}; VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated = {}; VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated = {}; VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating16BitUnsignedAccelerated = {}; VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating16BitSignedAccelerated = {}; VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated = {}; VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating32BitUnsignedAccelerated = {}; VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating32BitSignedAccelerated = {}; VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated = {}; VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating64BitUnsignedAccelerated = {}; VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating64BitSignedAccelerated = {}; VULKAN_HPP_NAMESPACE::Bool32 integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated = {}; VULKAN_HPP_NAMESPACE::DeviceSize storageTexelBufferOffsetAlignmentBytes = {}; VULKAN_HPP_NAMESPACE::Bool32 storageTexelBufferOffsetSingleTexelAlignment = {}; VULKAN_HPP_NAMESPACE::DeviceSize uniformTexelBufferOffsetAlignmentBytes = {}; VULKAN_HPP_NAMESPACE::Bool32 uniformTexelBufferOffsetSingleTexelAlignment = {}; VULKAN_HPP_NAMESPACE::DeviceSize maxBufferSize = {}; }; template <> struct CppType { using Type = PhysicalDeviceVulkan13Properties; }; struct PhysicalDeviceVulkan14Features { using NativeType = VkPhysicalDeviceVulkan14Features; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceVulkan14Features; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceVulkan14Features( VULKAN_HPP_NAMESPACE::Bool32 globalPriorityQuery_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderSubgroupRotate_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderSubgroupRotateClustered_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderFloatControls2_ = {}, VULKAN_HPP_NAMESPACE::Bool32 shaderExpectAssume_ = {}, VULKAN_HPP_NAMESPACE::Bool32 rectangularLines_ = {}, VULKAN_HPP_NAMESPACE::Bool32 bresenhamLines_ = {}, VULKAN_HPP_NAMESPACE::Bool32 smoothLines_ = {}, VULKAN_HPP_NAMESPACE::Bool32 stippledRectangularLines_ = {}, VULKAN_HPP_NAMESPACE::Bool32 stippledBresenhamLines_ = {}, VULKAN_HPP_NAMESPACE::Bool32 stippledSmoothLines_ = {}, VULKAN_HPP_NAMESPACE::Bool32 vertexAttributeInstanceRateDivisor_ = {}, VULKAN_HPP_NAMESPACE::Bool32 vertexAttributeInstanceRateZeroDivisor_ = {}, VULKAN_HPP_NAMESPACE::Bool32 indexTypeUint8_ = {}, VULKAN_HPP_NAMESPACE::Bool32 dynamicRenderingLocalRead_ = {}, VULKAN_HPP_NAMESPACE::Bool32 maintenance5_ = {}, VULKAN_HPP_NAMESPACE::Bool32 maintenance6_ = {}, VULKAN_HPP_NAMESPACE::Bool32 pipelineProtectedAccess_ = {}, VULKAN_HPP_NAMESPACE::Bool32 pipelineRobustness_ = {}, VULKAN_HPP_NAMESPACE::Bool32 hostImageCopy_ = {}, VULKAN_HPP_NAMESPACE::Bool32 pushDescriptor_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , globalPriorityQuery{ globalPriorityQuery_ } , shaderSubgroupRotate{ shaderSubgroupRotate_ } , shaderSubgroupRotateClustered{ shaderSubgroupRotateClustered_ } , shaderFloatControls2{ shaderFloatControls2_ } , shaderExpectAssume{ shaderExpectAssume_ } , rectangularLines{ rectangularLines_ } , bresenhamLines{ bresenhamLines_ } , smoothLines{ smoothLines_ } , stippledRectangularLines{ stippledRectangularLines_ } , stippledBresenhamLines{ stippledBresenhamLines_ } , stippledSmoothLines{ stippledSmoothLines_ } , vertexAttributeInstanceRateDivisor{ vertexAttributeInstanceRateDivisor_ } , vertexAttributeInstanceRateZeroDivisor{ vertexAttributeInstanceRateZeroDivisor_ } , indexTypeUint8{ indexTypeUint8_ } , dynamicRenderingLocalRead{ dynamicRenderingLocalRead_ } , maintenance5{ maintenance5_ } , maintenance6{ maintenance6_ } , pipelineProtectedAccess{ pipelineProtectedAccess_ } , pipelineRobustness{ pipelineRobustness_ } , hostImageCopy{ hostImageCopy_ } , pushDescriptor{ pushDescriptor_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceVulkan14Features( PhysicalDeviceVulkan14Features const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceVulkan14Features( VkPhysicalDeviceVulkan14Features const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceVulkan14Features( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceVulkan14Features & operator=( PhysicalDeviceVulkan14Features const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceVulkan14Features & operator=( VkPhysicalDeviceVulkan14Features const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan14Features & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan14Features & setGlobalPriorityQuery( VULKAN_HPP_NAMESPACE::Bool32 globalPriorityQuery_ ) VULKAN_HPP_NOEXCEPT { globalPriorityQuery = globalPriorityQuery_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan14Features & setShaderSubgroupRotate( VULKAN_HPP_NAMESPACE::Bool32 shaderSubgroupRotate_ ) VULKAN_HPP_NOEXCEPT { shaderSubgroupRotate = shaderSubgroupRotate_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan14Features & setShaderSubgroupRotateClustered( VULKAN_HPP_NAMESPACE::Bool32 shaderSubgroupRotateClustered_ ) VULKAN_HPP_NOEXCEPT { shaderSubgroupRotateClustered = shaderSubgroupRotateClustered_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan14Features & setShaderFloatControls2( VULKAN_HPP_NAMESPACE::Bool32 shaderFloatControls2_ ) VULKAN_HPP_NOEXCEPT { shaderFloatControls2 = shaderFloatControls2_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan14Features & setShaderExpectAssume( VULKAN_HPP_NAMESPACE::Bool32 shaderExpectAssume_ ) VULKAN_HPP_NOEXCEPT { shaderExpectAssume = shaderExpectAssume_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan14Features & setRectangularLines( VULKAN_HPP_NAMESPACE::Bool32 rectangularLines_ ) VULKAN_HPP_NOEXCEPT { rectangularLines = rectangularLines_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan14Features & setBresenhamLines( VULKAN_HPP_NAMESPACE::Bool32 bresenhamLines_ ) VULKAN_HPP_NOEXCEPT { bresenhamLines = bresenhamLines_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan14Features & setSmoothLines( VULKAN_HPP_NAMESPACE::Bool32 smoothLines_ ) VULKAN_HPP_NOEXCEPT { smoothLines = smoothLines_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan14Features & setStippledRectangularLines( VULKAN_HPP_NAMESPACE::Bool32 stippledRectangularLines_ ) VULKAN_HPP_NOEXCEPT { stippledRectangularLines = stippledRectangularLines_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan14Features & setStippledBresenhamLines( VULKAN_HPP_NAMESPACE::Bool32 stippledBresenhamLines_ ) VULKAN_HPP_NOEXCEPT { stippledBresenhamLines = stippledBresenhamLines_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan14Features & setStippledSmoothLines( VULKAN_HPP_NAMESPACE::Bool32 stippledSmoothLines_ ) VULKAN_HPP_NOEXCEPT { stippledSmoothLines = stippledSmoothLines_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan14Features & setVertexAttributeInstanceRateDivisor( VULKAN_HPP_NAMESPACE::Bool32 vertexAttributeInstanceRateDivisor_ ) VULKAN_HPP_NOEXCEPT { vertexAttributeInstanceRateDivisor = vertexAttributeInstanceRateDivisor_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan14Features & setVertexAttributeInstanceRateZeroDivisor( VULKAN_HPP_NAMESPACE::Bool32 vertexAttributeInstanceRateZeroDivisor_ ) VULKAN_HPP_NOEXCEPT { vertexAttributeInstanceRateZeroDivisor = vertexAttributeInstanceRateZeroDivisor_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan14Features & setIndexTypeUint8( VULKAN_HPP_NAMESPACE::Bool32 indexTypeUint8_ ) VULKAN_HPP_NOEXCEPT { indexTypeUint8 = indexTypeUint8_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan14Features & setDynamicRenderingLocalRead( VULKAN_HPP_NAMESPACE::Bool32 dynamicRenderingLocalRead_ ) VULKAN_HPP_NOEXCEPT { dynamicRenderingLocalRead = dynamicRenderingLocalRead_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan14Features & setMaintenance5( VULKAN_HPP_NAMESPACE::Bool32 maintenance5_ ) VULKAN_HPP_NOEXCEPT { maintenance5 = maintenance5_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan14Features & setMaintenance6( VULKAN_HPP_NAMESPACE::Bool32 maintenance6_ ) VULKAN_HPP_NOEXCEPT { maintenance6 = maintenance6_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan14Features & setPipelineProtectedAccess( VULKAN_HPP_NAMESPACE::Bool32 pipelineProtectedAccess_ ) VULKAN_HPP_NOEXCEPT { pipelineProtectedAccess = pipelineProtectedAccess_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan14Features & setPipelineRobustness( VULKAN_HPP_NAMESPACE::Bool32 pipelineRobustness_ ) VULKAN_HPP_NOEXCEPT { pipelineRobustness = pipelineRobustness_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan14Features & setHostImageCopy( VULKAN_HPP_NAMESPACE::Bool32 hostImageCopy_ ) VULKAN_HPP_NOEXCEPT { hostImageCopy = hostImageCopy_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan14Features & setPushDescriptor( VULKAN_HPP_NAMESPACE::Bool32 pushDescriptor_ ) VULKAN_HPP_NOEXCEPT { pushDescriptor = pushDescriptor_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceVulkan14Features const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceVulkan14Features &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, globalPriorityQuery, shaderSubgroupRotate, shaderSubgroupRotateClustered, shaderFloatControls2, shaderExpectAssume, rectangularLines, bresenhamLines, smoothLines, stippledRectangularLines, stippledBresenhamLines, stippledSmoothLines, vertexAttributeInstanceRateDivisor, vertexAttributeInstanceRateZeroDivisor, indexTypeUint8, dynamicRenderingLocalRead, maintenance5, maintenance6, pipelineProtectedAccess, pipelineRobustness, hostImageCopy, pushDescriptor ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceVulkan14Features const & ) const = default; #else bool operator==( PhysicalDeviceVulkan14Features const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( globalPriorityQuery == rhs.globalPriorityQuery ) && ( shaderSubgroupRotate == rhs.shaderSubgroupRotate ) && ( shaderSubgroupRotateClustered == rhs.shaderSubgroupRotateClustered ) && ( shaderFloatControls2 == rhs.shaderFloatControls2 ) && ( shaderExpectAssume == rhs.shaderExpectAssume ) && ( rectangularLines == rhs.rectangularLines ) && ( bresenhamLines == rhs.bresenhamLines ) && ( smoothLines == rhs.smoothLines ) && ( stippledRectangularLines == rhs.stippledRectangularLines ) && ( stippledBresenhamLines == rhs.stippledBresenhamLines ) && ( stippledSmoothLines == rhs.stippledSmoothLines ) && ( vertexAttributeInstanceRateDivisor == rhs.vertexAttributeInstanceRateDivisor ) && ( vertexAttributeInstanceRateZeroDivisor == rhs.vertexAttributeInstanceRateZeroDivisor ) && ( indexTypeUint8 == rhs.indexTypeUint8 ) && ( dynamicRenderingLocalRead == rhs.dynamicRenderingLocalRead ) && ( maintenance5 == rhs.maintenance5 ) && ( maintenance6 == rhs.maintenance6 ) && ( pipelineProtectedAccess == rhs.pipelineProtectedAccess ) && ( pipelineRobustness == rhs.pipelineRobustness ) && ( hostImageCopy == rhs.hostImageCopy ) && ( pushDescriptor == rhs.pushDescriptor ); # endif } bool operator!=( PhysicalDeviceVulkan14Features const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceVulkan14Features; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 globalPriorityQuery = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderSubgroupRotate = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderSubgroupRotateClustered = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderFloatControls2 = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderExpectAssume = {}; VULKAN_HPP_NAMESPACE::Bool32 rectangularLines = {}; VULKAN_HPP_NAMESPACE::Bool32 bresenhamLines = {}; VULKAN_HPP_NAMESPACE::Bool32 smoothLines = {}; VULKAN_HPP_NAMESPACE::Bool32 stippledRectangularLines = {}; VULKAN_HPP_NAMESPACE::Bool32 stippledBresenhamLines = {}; VULKAN_HPP_NAMESPACE::Bool32 stippledSmoothLines = {}; VULKAN_HPP_NAMESPACE::Bool32 vertexAttributeInstanceRateDivisor = {}; VULKAN_HPP_NAMESPACE::Bool32 vertexAttributeInstanceRateZeroDivisor = {}; VULKAN_HPP_NAMESPACE::Bool32 indexTypeUint8 = {}; VULKAN_HPP_NAMESPACE::Bool32 dynamicRenderingLocalRead = {}; VULKAN_HPP_NAMESPACE::Bool32 maintenance5 = {}; VULKAN_HPP_NAMESPACE::Bool32 maintenance6 = {}; VULKAN_HPP_NAMESPACE::Bool32 pipelineProtectedAccess = {}; VULKAN_HPP_NAMESPACE::Bool32 pipelineRobustness = {}; VULKAN_HPP_NAMESPACE::Bool32 hostImageCopy = {}; VULKAN_HPP_NAMESPACE::Bool32 pushDescriptor = {}; }; template <> struct CppType { using Type = PhysicalDeviceVulkan14Features; }; struct PhysicalDeviceVulkan14Properties { using NativeType = VkPhysicalDeviceVulkan14Properties; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceVulkan14Properties; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan14Properties( uint32_t lineSubPixelPrecisionBits_ = {}, uint32_t maxVertexAttribDivisor_ = {}, VULKAN_HPP_NAMESPACE::Bool32 supportsNonZeroFirstInstance_ = {}, uint32_t maxPushDescriptors_ = {}, VULKAN_HPP_NAMESPACE::Bool32 dynamicRenderingLocalReadDepthStencilAttachments_ = {}, VULKAN_HPP_NAMESPACE::Bool32 dynamicRenderingLocalReadMultisampledAttachments_ = {}, VULKAN_HPP_NAMESPACE::Bool32 earlyFragmentMultisampleCoverageAfterSampleCounting_ = {}, VULKAN_HPP_NAMESPACE::Bool32 earlyFragmentSampleMaskTestBeforeSampleCounting_ = {}, VULKAN_HPP_NAMESPACE::Bool32 depthStencilSwizzleOneSupport_ = {}, VULKAN_HPP_NAMESPACE::Bool32 polygonModePointSize_ = {}, VULKAN_HPP_NAMESPACE::Bool32 nonStrictSinglePixelWideLinesUseParallelogram_ = {}, VULKAN_HPP_NAMESPACE::Bool32 nonStrictWideLinesUseParallelogram_ = {}, VULKAN_HPP_NAMESPACE::Bool32 blockTexelViewCompatibleMultipleLayers_ = {}, uint32_t maxCombinedImageSamplerDescriptorCount_ = {}, VULKAN_HPP_NAMESPACE::Bool32 fragmentShadingRateClampCombinerInputs_ = {}, VULKAN_HPP_NAMESPACE::PipelineRobustnessBufferBehavior defaultRobustnessStorageBuffers_ = VULKAN_HPP_NAMESPACE::PipelineRobustnessBufferBehavior::eDeviceDefault, VULKAN_HPP_NAMESPACE::PipelineRobustnessBufferBehavior defaultRobustnessUniformBuffers_ = VULKAN_HPP_NAMESPACE::PipelineRobustnessBufferBehavior::eDeviceDefault, VULKAN_HPP_NAMESPACE::PipelineRobustnessBufferBehavior defaultRobustnessVertexInputs_ = VULKAN_HPP_NAMESPACE::PipelineRobustnessBufferBehavior::eDeviceDefault, VULKAN_HPP_NAMESPACE::PipelineRobustnessImageBehavior defaultRobustnessImages_ = VULKAN_HPP_NAMESPACE::PipelineRobustnessImageBehavior::eDeviceDefault, uint32_t copySrcLayoutCount_ = {}, VULKAN_HPP_NAMESPACE::ImageLayout * pCopySrcLayouts_ = {}, uint32_t copyDstLayoutCount_ = {}, VULKAN_HPP_NAMESPACE::ImageLayout * pCopyDstLayouts_ = {}, std::array const & optimalTilingLayoutUUID_ = {}, VULKAN_HPP_NAMESPACE::Bool32 identicalMemoryTypeRequirements_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , lineSubPixelPrecisionBits{ lineSubPixelPrecisionBits_ } , maxVertexAttribDivisor{ maxVertexAttribDivisor_ } , supportsNonZeroFirstInstance{ supportsNonZeroFirstInstance_ } , maxPushDescriptors{ maxPushDescriptors_ } , dynamicRenderingLocalReadDepthStencilAttachments{ dynamicRenderingLocalReadDepthStencilAttachments_ } , dynamicRenderingLocalReadMultisampledAttachments{ dynamicRenderingLocalReadMultisampledAttachments_ } , earlyFragmentMultisampleCoverageAfterSampleCounting{ earlyFragmentMultisampleCoverageAfterSampleCounting_ } , earlyFragmentSampleMaskTestBeforeSampleCounting{ earlyFragmentSampleMaskTestBeforeSampleCounting_ } , depthStencilSwizzleOneSupport{ depthStencilSwizzleOneSupport_ } , polygonModePointSize{ polygonModePointSize_ } , nonStrictSinglePixelWideLinesUseParallelogram{ nonStrictSinglePixelWideLinesUseParallelogram_ } , nonStrictWideLinesUseParallelogram{ nonStrictWideLinesUseParallelogram_ } , blockTexelViewCompatibleMultipleLayers{ blockTexelViewCompatibleMultipleLayers_ } , maxCombinedImageSamplerDescriptorCount{ maxCombinedImageSamplerDescriptorCount_ } , fragmentShadingRateClampCombinerInputs{ fragmentShadingRateClampCombinerInputs_ } , defaultRobustnessStorageBuffers{ defaultRobustnessStorageBuffers_ } , defaultRobustnessUniformBuffers{ defaultRobustnessUniformBuffers_ } , defaultRobustnessVertexInputs{ defaultRobustnessVertexInputs_ } , defaultRobustnessImages{ defaultRobustnessImages_ } , copySrcLayoutCount{ copySrcLayoutCount_ } , pCopySrcLayouts{ pCopySrcLayouts_ } , copyDstLayoutCount{ copyDstLayoutCount_ } , pCopyDstLayouts{ pCopyDstLayouts_ } , optimalTilingLayoutUUID{ optimalTilingLayoutUUID_ } , identicalMemoryTypeRequirements{ identicalMemoryTypeRequirements_ } { } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkan14Properties( PhysicalDeviceVulkan14Properties const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceVulkan14Properties( VkPhysicalDeviceVulkan14Properties const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceVulkan14Properties( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceVulkan14Properties & operator=( PhysicalDeviceVulkan14Properties const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceVulkan14Properties & operator=( VkPhysicalDeviceVulkan14Properties const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPhysicalDeviceVulkan14Properties const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceVulkan14Properties &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple const &, VULKAN_HPP_NAMESPACE::Bool32 const &> # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, lineSubPixelPrecisionBits, maxVertexAttribDivisor, supportsNonZeroFirstInstance, maxPushDescriptors, dynamicRenderingLocalReadDepthStencilAttachments, dynamicRenderingLocalReadMultisampledAttachments, earlyFragmentMultisampleCoverageAfterSampleCounting, earlyFragmentSampleMaskTestBeforeSampleCounting, depthStencilSwizzleOneSupport, polygonModePointSize, nonStrictSinglePixelWideLinesUseParallelogram, nonStrictWideLinesUseParallelogram, blockTexelViewCompatibleMultipleLayers, maxCombinedImageSamplerDescriptorCount, fragmentShadingRateClampCombinerInputs, defaultRobustnessStorageBuffers, defaultRobustnessUniformBuffers, defaultRobustnessVertexInputs, defaultRobustnessImages, copySrcLayoutCount, pCopySrcLayouts, copyDstLayoutCount, pCopyDstLayouts, optimalTilingLayoutUUID, identicalMemoryTypeRequirements ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceVulkan14Properties const & ) const = default; #else bool operator==( PhysicalDeviceVulkan14Properties const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( lineSubPixelPrecisionBits == rhs.lineSubPixelPrecisionBits ) && ( maxVertexAttribDivisor == rhs.maxVertexAttribDivisor ) && ( supportsNonZeroFirstInstance == rhs.supportsNonZeroFirstInstance ) && ( maxPushDescriptors == rhs.maxPushDescriptors ) && ( dynamicRenderingLocalReadDepthStencilAttachments == rhs.dynamicRenderingLocalReadDepthStencilAttachments ) && ( dynamicRenderingLocalReadMultisampledAttachments == rhs.dynamicRenderingLocalReadMultisampledAttachments ) && ( earlyFragmentMultisampleCoverageAfterSampleCounting == rhs.earlyFragmentMultisampleCoverageAfterSampleCounting ) && ( earlyFragmentSampleMaskTestBeforeSampleCounting == rhs.earlyFragmentSampleMaskTestBeforeSampleCounting ) && ( depthStencilSwizzleOneSupport == rhs.depthStencilSwizzleOneSupport ) && ( polygonModePointSize == rhs.polygonModePointSize ) && ( nonStrictSinglePixelWideLinesUseParallelogram == rhs.nonStrictSinglePixelWideLinesUseParallelogram ) && ( nonStrictWideLinesUseParallelogram == rhs.nonStrictWideLinesUseParallelogram ) && ( blockTexelViewCompatibleMultipleLayers == rhs.blockTexelViewCompatibleMultipleLayers ) && ( maxCombinedImageSamplerDescriptorCount == rhs.maxCombinedImageSamplerDescriptorCount ) && ( fragmentShadingRateClampCombinerInputs == rhs.fragmentShadingRateClampCombinerInputs ) && ( defaultRobustnessStorageBuffers == rhs.defaultRobustnessStorageBuffers ) && ( defaultRobustnessUniformBuffers == rhs.defaultRobustnessUniformBuffers ) && ( defaultRobustnessVertexInputs == rhs.defaultRobustnessVertexInputs ) && ( defaultRobustnessImages == rhs.defaultRobustnessImages ) && ( copySrcLayoutCount == rhs.copySrcLayoutCount ) && ( pCopySrcLayouts == rhs.pCopySrcLayouts ) && ( copyDstLayoutCount == rhs.copyDstLayoutCount ) && ( pCopyDstLayouts == rhs.pCopyDstLayouts ) && ( optimalTilingLayoutUUID == rhs.optimalTilingLayoutUUID ) && ( identicalMemoryTypeRequirements == rhs.identicalMemoryTypeRequirements ); # endif } bool operator!=( PhysicalDeviceVulkan14Properties const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceVulkan14Properties; void * pNext = {}; uint32_t lineSubPixelPrecisionBits = {}; uint32_t maxVertexAttribDivisor = {}; VULKAN_HPP_NAMESPACE::Bool32 supportsNonZeroFirstInstance = {}; uint32_t maxPushDescriptors = {}; VULKAN_HPP_NAMESPACE::Bool32 dynamicRenderingLocalReadDepthStencilAttachments = {}; VULKAN_HPP_NAMESPACE::Bool32 dynamicRenderingLocalReadMultisampledAttachments = {}; VULKAN_HPP_NAMESPACE::Bool32 earlyFragmentMultisampleCoverageAfterSampleCounting = {}; VULKAN_HPP_NAMESPACE::Bool32 earlyFragmentSampleMaskTestBeforeSampleCounting = {}; VULKAN_HPP_NAMESPACE::Bool32 depthStencilSwizzleOneSupport = {}; VULKAN_HPP_NAMESPACE::Bool32 polygonModePointSize = {}; VULKAN_HPP_NAMESPACE::Bool32 nonStrictSinglePixelWideLinesUseParallelogram = {}; VULKAN_HPP_NAMESPACE::Bool32 nonStrictWideLinesUseParallelogram = {}; VULKAN_HPP_NAMESPACE::Bool32 blockTexelViewCompatibleMultipleLayers = {}; uint32_t maxCombinedImageSamplerDescriptorCount = {}; VULKAN_HPP_NAMESPACE::Bool32 fragmentShadingRateClampCombinerInputs = {}; VULKAN_HPP_NAMESPACE::PipelineRobustnessBufferBehavior defaultRobustnessStorageBuffers = VULKAN_HPP_NAMESPACE::PipelineRobustnessBufferBehavior::eDeviceDefault; VULKAN_HPP_NAMESPACE::PipelineRobustnessBufferBehavior defaultRobustnessUniformBuffers = VULKAN_HPP_NAMESPACE::PipelineRobustnessBufferBehavior::eDeviceDefault; VULKAN_HPP_NAMESPACE::PipelineRobustnessBufferBehavior defaultRobustnessVertexInputs = VULKAN_HPP_NAMESPACE::PipelineRobustnessBufferBehavior::eDeviceDefault; VULKAN_HPP_NAMESPACE::PipelineRobustnessImageBehavior defaultRobustnessImages = VULKAN_HPP_NAMESPACE::PipelineRobustnessImageBehavior::eDeviceDefault; uint32_t copySrcLayoutCount = {}; VULKAN_HPP_NAMESPACE::ImageLayout * pCopySrcLayouts = {}; uint32_t copyDstLayoutCount = {}; VULKAN_HPP_NAMESPACE::ImageLayout * pCopyDstLayouts = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D optimalTilingLayoutUUID = {}; VULKAN_HPP_NAMESPACE::Bool32 identicalMemoryTypeRequirements = {}; }; template <> struct CppType { using Type = PhysicalDeviceVulkan14Properties; }; struct PhysicalDeviceVulkanMemoryModelFeatures { using NativeType = VkPhysicalDeviceVulkanMemoryModelFeatures; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceVulkanMemoryModelFeatures; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceVulkanMemoryModelFeatures( VULKAN_HPP_NAMESPACE::Bool32 vulkanMemoryModel_ = {}, VULKAN_HPP_NAMESPACE::Bool32 vulkanMemoryModelDeviceScope_ = {}, VULKAN_HPP_NAMESPACE::Bool32 vulkanMemoryModelAvailabilityVisibilityChains_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , vulkanMemoryModel{ vulkanMemoryModel_ } , vulkanMemoryModelDeviceScope{ vulkanMemoryModelDeviceScope_ } , vulkanMemoryModelAvailabilityVisibilityChains{ vulkanMemoryModelAvailabilityVisibilityChains_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceVulkanMemoryModelFeatures( PhysicalDeviceVulkanMemoryModelFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceVulkanMemoryModelFeatures( VkPhysicalDeviceVulkanMemoryModelFeatures const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceVulkanMemoryModelFeatures( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceVulkanMemoryModelFeatures & operator=( PhysicalDeviceVulkanMemoryModelFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceVulkanMemoryModelFeatures & operator=( VkPhysicalDeviceVulkanMemoryModelFeatures const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkanMemoryModelFeatures & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkanMemoryModelFeatures & setVulkanMemoryModel( VULKAN_HPP_NAMESPACE::Bool32 vulkanMemoryModel_ ) VULKAN_HPP_NOEXCEPT { vulkanMemoryModel = vulkanMemoryModel_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkanMemoryModelFeatures & setVulkanMemoryModelDeviceScope( VULKAN_HPP_NAMESPACE::Bool32 vulkanMemoryModelDeviceScope_ ) VULKAN_HPP_NOEXCEPT { vulkanMemoryModelDeviceScope = vulkanMemoryModelDeviceScope_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceVulkanMemoryModelFeatures & setVulkanMemoryModelAvailabilityVisibilityChains( VULKAN_HPP_NAMESPACE::Bool32 vulkanMemoryModelAvailabilityVisibilityChains_ ) VULKAN_HPP_NOEXCEPT { vulkanMemoryModelAvailabilityVisibilityChains = vulkanMemoryModelAvailabilityVisibilityChains_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceVulkanMemoryModelFeatures const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceVulkanMemoryModelFeatures &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, vulkanMemoryModel, vulkanMemoryModelDeviceScope, vulkanMemoryModelAvailabilityVisibilityChains ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceVulkanMemoryModelFeatures const & ) const = default; #else bool operator==( PhysicalDeviceVulkanMemoryModelFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( vulkanMemoryModel == rhs.vulkanMemoryModel ) && ( vulkanMemoryModelDeviceScope == rhs.vulkanMemoryModelDeviceScope ) && ( vulkanMemoryModelAvailabilityVisibilityChains == rhs.vulkanMemoryModelAvailabilityVisibilityChains ); # endif } bool operator!=( PhysicalDeviceVulkanMemoryModelFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceVulkanMemoryModelFeatures; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 vulkanMemoryModel = {}; VULKAN_HPP_NAMESPACE::Bool32 vulkanMemoryModelDeviceScope = {}; VULKAN_HPP_NAMESPACE::Bool32 vulkanMemoryModelAvailabilityVisibilityChains = {}; }; template <> struct CppType { using Type = PhysicalDeviceVulkanMemoryModelFeatures; }; using PhysicalDeviceVulkanMemoryModelFeaturesKHR = PhysicalDeviceVulkanMemoryModelFeatures; struct PhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR { using NativeType = VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR( VULKAN_HPP_NAMESPACE::Bool32 workgroupMemoryExplicitLayout_ = {}, VULKAN_HPP_NAMESPACE::Bool32 workgroupMemoryExplicitLayoutScalarBlockLayout_ = {}, VULKAN_HPP_NAMESPACE::Bool32 workgroupMemoryExplicitLayout8BitAccess_ = {}, VULKAN_HPP_NAMESPACE::Bool32 workgroupMemoryExplicitLayout16BitAccess_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , workgroupMemoryExplicitLayout{ workgroupMemoryExplicitLayout_ } , workgroupMemoryExplicitLayoutScalarBlockLayout{ workgroupMemoryExplicitLayoutScalarBlockLayout_ } , workgroupMemoryExplicitLayout8BitAccess{ workgroupMemoryExplicitLayout8BitAccess_ } , workgroupMemoryExplicitLayout16BitAccess{ workgroupMemoryExplicitLayout16BitAccess_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR( PhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR( VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR & operator=( PhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR & operator=( VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR & setWorkgroupMemoryExplicitLayout( VULKAN_HPP_NAMESPACE::Bool32 workgroupMemoryExplicitLayout_ ) VULKAN_HPP_NOEXCEPT { workgroupMemoryExplicitLayout = workgroupMemoryExplicitLayout_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR & setWorkgroupMemoryExplicitLayoutScalarBlockLayout( VULKAN_HPP_NAMESPACE::Bool32 workgroupMemoryExplicitLayoutScalarBlockLayout_ ) VULKAN_HPP_NOEXCEPT { workgroupMemoryExplicitLayoutScalarBlockLayout = workgroupMemoryExplicitLayoutScalarBlockLayout_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR & setWorkgroupMemoryExplicitLayout8BitAccess( VULKAN_HPP_NAMESPACE::Bool32 workgroupMemoryExplicitLayout8BitAccess_ ) VULKAN_HPP_NOEXCEPT { workgroupMemoryExplicitLayout8BitAccess = workgroupMemoryExplicitLayout8BitAccess_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR & setWorkgroupMemoryExplicitLayout16BitAccess( VULKAN_HPP_NAMESPACE::Bool32 workgroupMemoryExplicitLayout16BitAccess_ ) VULKAN_HPP_NOEXCEPT { workgroupMemoryExplicitLayout16BitAccess = workgroupMemoryExplicitLayout16BitAccess_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, workgroupMemoryExplicitLayout, workgroupMemoryExplicitLayoutScalarBlockLayout, workgroupMemoryExplicitLayout8BitAccess, workgroupMemoryExplicitLayout16BitAccess ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR const & ) const = default; #else bool operator==( PhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( workgroupMemoryExplicitLayout == rhs.workgroupMemoryExplicitLayout ) && ( workgroupMemoryExplicitLayoutScalarBlockLayout == rhs.workgroupMemoryExplicitLayoutScalarBlockLayout ) && ( workgroupMemoryExplicitLayout8BitAccess == rhs.workgroupMemoryExplicitLayout8BitAccess ) && ( workgroupMemoryExplicitLayout16BitAccess == rhs.workgroupMemoryExplicitLayout16BitAccess ); # endif } bool operator!=( PhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 workgroupMemoryExplicitLayout = {}; VULKAN_HPP_NAMESPACE::Bool32 workgroupMemoryExplicitLayoutScalarBlockLayout = {}; VULKAN_HPP_NAMESPACE::Bool32 workgroupMemoryExplicitLayout8BitAccess = {}; VULKAN_HPP_NAMESPACE::Bool32 workgroupMemoryExplicitLayout16BitAccess = {}; }; template <> struct CppType { using Type = PhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR; }; struct PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT { using NativeType = VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 ycbcr2plane444Formats_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , ycbcr2plane444Formats{ ycbcr2plane444Formats_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT( PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT( VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT & operator=( PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT & operator=( VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT & setYcbcr2plane444Formats( VULKAN_HPP_NAMESPACE::Bool32 ycbcr2plane444Formats_ ) VULKAN_HPP_NOEXCEPT { ycbcr2plane444Formats = ycbcr2plane444Formats_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, ycbcr2plane444Formats ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT const & ) const = default; #else bool operator==( PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( ycbcr2plane444Formats == rhs.ycbcr2plane444Formats ); # endif } bool operator!=( PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 ycbcr2plane444Formats = {}; }; template <> struct CppType { using Type = PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT; }; struct PhysicalDeviceYcbcrDegammaFeaturesQCOM { using NativeType = VkPhysicalDeviceYcbcrDegammaFeaturesQCOM; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceYcbcrDegammaFeaturesQCOM; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceYcbcrDegammaFeaturesQCOM( VULKAN_HPP_NAMESPACE::Bool32 ycbcrDegamma_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , ycbcrDegamma{ ycbcrDegamma_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceYcbcrDegammaFeaturesQCOM( PhysicalDeviceYcbcrDegammaFeaturesQCOM const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceYcbcrDegammaFeaturesQCOM( VkPhysicalDeviceYcbcrDegammaFeaturesQCOM const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceYcbcrDegammaFeaturesQCOM( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceYcbcrDegammaFeaturesQCOM & operator=( PhysicalDeviceYcbcrDegammaFeaturesQCOM const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceYcbcrDegammaFeaturesQCOM & operator=( VkPhysicalDeviceYcbcrDegammaFeaturesQCOM const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceYcbcrDegammaFeaturesQCOM & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceYcbcrDegammaFeaturesQCOM & setYcbcrDegamma( VULKAN_HPP_NAMESPACE::Bool32 ycbcrDegamma_ ) VULKAN_HPP_NOEXCEPT { ycbcrDegamma = ycbcrDegamma_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceYcbcrDegammaFeaturesQCOM const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceYcbcrDegammaFeaturesQCOM &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, ycbcrDegamma ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceYcbcrDegammaFeaturesQCOM const & ) const = default; #else bool operator==( PhysicalDeviceYcbcrDegammaFeaturesQCOM const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( ycbcrDegamma == rhs.ycbcrDegamma ); # endif } bool operator!=( PhysicalDeviceYcbcrDegammaFeaturesQCOM const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceYcbcrDegammaFeaturesQCOM; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 ycbcrDegamma = {}; }; template <> struct CppType { using Type = PhysicalDeviceYcbcrDegammaFeaturesQCOM; }; struct PhysicalDeviceYcbcrImageArraysFeaturesEXT { using NativeType = VkPhysicalDeviceYcbcrImageArraysFeaturesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceYcbcrImageArraysFeaturesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceYcbcrImageArraysFeaturesEXT( VULKAN_HPP_NAMESPACE::Bool32 ycbcrImageArrays_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , ycbcrImageArrays{ ycbcrImageArrays_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceYcbcrImageArraysFeaturesEXT( PhysicalDeviceYcbcrImageArraysFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceYcbcrImageArraysFeaturesEXT( VkPhysicalDeviceYcbcrImageArraysFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceYcbcrImageArraysFeaturesEXT( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceYcbcrImageArraysFeaturesEXT & operator=( PhysicalDeviceYcbcrImageArraysFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceYcbcrImageArraysFeaturesEXT & operator=( VkPhysicalDeviceYcbcrImageArraysFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceYcbcrImageArraysFeaturesEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceYcbcrImageArraysFeaturesEXT & setYcbcrImageArrays( VULKAN_HPP_NAMESPACE::Bool32 ycbcrImageArrays_ ) VULKAN_HPP_NOEXCEPT { ycbcrImageArrays = ycbcrImageArrays_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceYcbcrImageArraysFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceYcbcrImageArraysFeaturesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, ycbcrImageArrays ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceYcbcrImageArraysFeaturesEXT const & ) const = default; #else bool operator==( PhysicalDeviceYcbcrImageArraysFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( ycbcrImageArrays == rhs.ycbcrImageArrays ); # endif } bool operator!=( PhysicalDeviceYcbcrImageArraysFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceYcbcrImageArraysFeaturesEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 ycbcrImageArrays = {}; }; template <> struct CppType { using Type = PhysicalDeviceYcbcrImageArraysFeaturesEXT; }; struct PhysicalDeviceZeroInitializeWorkgroupMemoryFeatures { using NativeType = VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePhysicalDeviceZeroInitializeWorkgroupMemoryFeatures; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PhysicalDeviceZeroInitializeWorkgroupMemoryFeatures( VULKAN_HPP_NAMESPACE::Bool32 shaderZeroInitializeWorkgroupMemory_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , shaderZeroInitializeWorkgroupMemory{ shaderZeroInitializeWorkgroupMemory_ } { } VULKAN_HPP_CONSTEXPR PhysicalDeviceZeroInitializeWorkgroupMemoryFeatures( PhysicalDeviceZeroInitializeWorkgroupMemoryFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; PhysicalDeviceZeroInitializeWorkgroupMemoryFeatures( VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures const & rhs ) VULKAN_HPP_NOEXCEPT : PhysicalDeviceZeroInitializeWorkgroupMemoryFeatures( *reinterpret_cast( &rhs ) ) { } PhysicalDeviceZeroInitializeWorkgroupMemoryFeatures & operator=( PhysicalDeviceZeroInitializeWorkgroupMemoryFeatures const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PhysicalDeviceZeroInitializeWorkgroupMemoryFeatures & operator=( VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceZeroInitializeWorkgroupMemoryFeatures & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PhysicalDeviceZeroInitializeWorkgroupMemoryFeatures & setShaderZeroInitializeWorkgroupMemory( VULKAN_HPP_NAMESPACE::Bool32 shaderZeroInitializeWorkgroupMemory_ ) VULKAN_HPP_NOEXCEPT { shaderZeroInitializeWorkgroupMemory = shaderZeroInitializeWorkgroupMemory_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, shaderZeroInitializeWorkgroupMemory ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PhysicalDeviceZeroInitializeWorkgroupMemoryFeatures const & ) const = default; #else bool operator==( PhysicalDeviceZeroInitializeWorkgroupMemoryFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( shaderZeroInitializeWorkgroupMemory == rhs.shaderZeroInitializeWorkgroupMemory ); # endif } bool operator!=( PhysicalDeviceZeroInitializeWorkgroupMemoryFeatures const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePhysicalDeviceZeroInitializeWorkgroupMemoryFeatures; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 shaderZeroInitializeWorkgroupMemory = {}; }; template <> struct CppType { using Type = PhysicalDeviceZeroInitializeWorkgroupMemoryFeatures; }; using PhysicalDeviceZeroInitializeWorkgroupMemoryFeaturesKHR = PhysicalDeviceZeroInitializeWorkgroupMemoryFeatures; struct PipelineBinaryKeyKHR { using NativeType = VkPipelineBinaryKeyKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineBinaryKeyKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 PipelineBinaryKeyKHR( uint32_t keySize_ = {}, std::array const & key_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , keySize{ keySize_ } , key{ key_ } { } VULKAN_HPP_CONSTEXPR_14 PipelineBinaryKeyKHR( PipelineBinaryKeyKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; PipelineBinaryKeyKHR( VkPipelineBinaryKeyKHR const & rhs ) VULKAN_HPP_NOEXCEPT : PipelineBinaryKeyKHR( *reinterpret_cast( &rhs ) ) { } PipelineBinaryKeyKHR & operator=( PipelineBinaryKeyKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PipelineBinaryKeyKHR & operator=( VkPipelineBinaryKeyKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PipelineBinaryKeyKHR & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineBinaryKeyKHR & setKeySize( uint32_t keySize_ ) VULKAN_HPP_NOEXCEPT { keySize = keySize_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineBinaryKeyKHR & setKey( std::array key_ ) VULKAN_HPP_NOEXCEPT { key = key_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPipelineBinaryKeyKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPipelineBinaryKeyKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple const &> # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, keySize, key ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PipelineBinaryKeyKHR const & ) const = default; #else bool operator==( PipelineBinaryKeyKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( keySize == rhs.keySize ) && ( key == rhs.key ); # endif } bool operator!=( PipelineBinaryKeyKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineBinaryKeyKHR; void * pNext = {}; uint32_t keySize = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D key = {}; }; template <> struct CppType { using Type = PipelineBinaryKeyKHR; }; struct PipelineBinaryDataKHR { using NativeType = VkPipelineBinaryDataKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PipelineBinaryDataKHR( size_t dataSize_ = {}, void * pData_ = {} ) VULKAN_HPP_NOEXCEPT : dataSize{ dataSize_ } , pData{ pData_ } { } VULKAN_HPP_CONSTEXPR PipelineBinaryDataKHR( PipelineBinaryDataKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; PipelineBinaryDataKHR( VkPipelineBinaryDataKHR const & rhs ) VULKAN_HPP_NOEXCEPT : PipelineBinaryDataKHR( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) template PipelineBinaryDataKHR( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & data_ ) : dataSize( data_.size() * sizeof( T ) ), pData( data_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ PipelineBinaryDataKHR & operator=( PipelineBinaryDataKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PipelineBinaryDataKHR & operator=( VkPipelineBinaryDataKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PipelineBinaryDataKHR & setDataSize( size_t dataSize_ ) VULKAN_HPP_NOEXCEPT { dataSize = dataSize_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineBinaryDataKHR & setPData( void * pData_ ) VULKAN_HPP_NOEXCEPT { pData = pData_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) template PipelineBinaryDataKHR & setData( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & data_ ) VULKAN_HPP_NOEXCEPT { dataSize = data_.size() * sizeof( T ); pData = data_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPipelineBinaryDataKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPipelineBinaryDataKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( dataSize, pData ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PipelineBinaryDataKHR const & ) const = default; #else bool operator==( PipelineBinaryDataKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( dataSize == rhs.dataSize ) && ( pData == rhs.pData ); # endif } bool operator!=( PipelineBinaryDataKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: size_t dataSize = {}; void * pData = {}; }; struct PipelineBinaryKeysAndDataKHR { using NativeType = VkPipelineBinaryKeysAndDataKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 PipelineBinaryKeysAndDataKHR( uint32_t binaryCount_ = {}, const VULKAN_HPP_NAMESPACE::PipelineBinaryKeyKHR * pPipelineBinaryKeys_ = {}, const VULKAN_HPP_NAMESPACE::PipelineBinaryDataKHR * pPipelineBinaryData_ = {} ) VULKAN_HPP_NOEXCEPT : binaryCount{ binaryCount_ } , pPipelineBinaryKeys{ pPipelineBinaryKeys_ } , pPipelineBinaryData{ pPipelineBinaryData_ } { } VULKAN_HPP_CONSTEXPR_14 PipelineBinaryKeysAndDataKHR( PipelineBinaryKeysAndDataKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; PipelineBinaryKeysAndDataKHR( VkPipelineBinaryKeysAndDataKHR const & rhs ) VULKAN_HPP_NOEXCEPT : PipelineBinaryKeysAndDataKHR( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) PipelineBinaryKeysAndDataKHR( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & pipelineBinaryKeys_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & pipelineBinaryData_ = {} ) : binaryCount( static_cast( pipelineBinaryKeys_.size() ) ) , pPipelineBinaryKeys( pipelineBinaryKeys_.data() ) , pPipelineBinaryData( pipelineBinaryData_.data() ) { # ifdef VULKAN_HPP_NO_EXCEPTIONS VULKAN_HPP_ASSERT( pipelineBinaryKeys_.size() == pipelineBinaryData_.size() ); # else if ( pipelineBinaryKeys_.size() != pipelineBinaryData_.size() ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::PipelineBinaryKeysAndDataKHR::PipelineBinaryKeysAndDataKHR: pipelineBinaryKeys_.size() != pipelineBinaryData_.size()" ); } # endif /*VULKAN_HPP_NO_EXCEPTIONS*/ } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ PipelineBinaryKeysAndDataKHR & operator=( PipelineBinaryKeysAndDataKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PipelineBinaryKeysAndDataKHR & operator=( VkPipelineBinaryKeysAndDataKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PipelineBinaryKeysAndDataKHR & setBinaryCount( uint32_t binaryCount_ ) VULKAN_HPP_NOEXCEPT { binaryCount = binaryCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineBinaryKeysAndDataKHR & setPPipelineBinaryKeys( const VULKAN_HPP_NAMESPACE::PipelineBinaryKeyKHR * pPipelineBinaryKeys_ ) VULKAN_HPP_NOEXCEPT { pPipelineBinaryKeys = pPipelineBinaryKeys_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) PipelineBinaryKeysAndDataKHR & setPipelineBinaryKeys( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & pipelineBinaryKeys_ ) VULKAN_HPP_NOEXCEPT { binaryCount = static_cast( pipelineBinaryKeys_.size() ); pPipelineBinaryKeys = pipelineBinaryKeys_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 PipelineBinaryKeysAndDataKHR & setPPipelineBinaryData( const VULKAN_HPP_NAMESPACE::PipelineBinaryDataKHR * pPipelineBinaryData_ ) VULKAN_HPP_NOEXCEPT { pPipelineBinaryData = pPipelineBinaryData_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) PipelineBinaryKeysAndDataKHR & setPipelineBinaryData( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & pipelineBinaryData_ ) VULKAN_HPP_NOEXCEPT { binaryCount = static_cast( pipelineBinaryData_.size() ); pPipelineBinaryData = pipelineBinaryData_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPipelineBinaryKeysAndDataKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPipelineBinaryKeysAndDataKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( binaryCount, pPipelineBinaryKeys, pPipelineBinaryData ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PipelineBinaryKeysAndDataKHR const & ) const = default; #else bool operator==( PipelineBinaryKeysAndDataKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( binaryCount == rhs.binaryCount ) && ( pPipelineBinaryKeys == rhs.pPipelineBinaryKeys ) && ( pPipelineBinaryData == rhs.pPipelineBinaryData ); # endif } bool operator!=( PipelineBinaryKeysAndDataKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: uint32_t binaryCount = {}; const VULKAN_HPP_NAMESPACE::PipelineBinaryKeyKHR * pPipelineBinaryKeys = {}; const VULKAN_HPP_NAMESPACE::PipelineBinaryDataKHR * pPipelineBinaryData = {}; }; struct PipelineCreateInfoKHR { using NativeType = VkPipelineCreateInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineCreateInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PipelineCreateInfoKHR( void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } {} VULKAN_HPP_CONSTEXPR PipelineCreateInfoKHR( PipelineCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; PipelineCreateInfoKHR( VkPipelineCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : PipelineCreateInfoKHR( *reinterpret_cast( &rhs ) ) { } PipelineCreateInfoKHR & operator=( PipelineCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PipelineCreateInfoKHR & operator=( VkPipelineCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PipelineCreateInfoKHR & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPipelineCreateInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPipelineCreateInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PipelineCreateInfoKHR const & ) const = default; #else bool operator==( PipelineCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ); # endif } bool operator!=( PipelineCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineCreateInfoKHR; void * pNext = {}; }; template <> struct CppType { using Type = PipelineCreateInfoKHR; }; struct PipelineBinaryCreateInfoKHR { using NativeType = VkPipelineBinaryCreateInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineBinaryCreateInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 PipelineBinaryCreateInfoKHR( const VULKAN_HPP_NAMESPACE::PipelineBinaryKeysAndDataKHR * pKeysAndDataInfo_ = {}, VULKAN_HPP_NAMESPACE::Pipeline pipeline_ = {}, const VULKAN_HPP_NAMESPACE::PipelineCreateInfoKHR * pPipelineCreateInfo_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , pKeysAndDataInfo{ pKeysAndDataInfo_ } , pipeline{ pipeline_ } , pPipelineCreateInfo{ pPipelineCreateInfo_ } { } VULKAN_HPP_CONSTEXPR_14 PipelineBinaryCreateInfoKHR( PipelineBinaryCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; PipelineBinaryCreateInfoKHR( VkPipelineBinaryCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : PipelineBinaryCreateInfoKHR( *reinterpret_cast( &rhs ) ) { } PipelineBinaryCreateInfoKHR & operator=( PipelineBinaryCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PipelineBinaryCreateInfoKHR & operator=( VkPipelineBinaryCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PipelineBinaryCreateInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineBinaryCreateInfoKHR & setPKeysAndDataInfo( const VULKAN_HPP_NAMESPACE::PipelineBinaryKeysAndDataKHR * pKeysAndDataInfo_ ) VULKAN_HPP_NOEXCEPT { pKeysAndDataInfo = pKeysAndDataInfo_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineBinaryCreateInfoKHR & setPipeline( VULKAN_HPP_NAMESPACE::Pipeline pipeline_ ) VULKAN_HPP_NOEXCEPT { pipeline = pipeline_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineBinaryCreateInfoKHR & setPPipelineCreateInfo( const VULKAN_HPP_NAMESPACE::PipelineCreateInfoKHR * pPipelineCreateInfo_ ) VULKAN_HPP_NOEXCEPT { pPipelineCreateInfo = pPipelineCreateInfo_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPipelineBinaryCreateInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPipelineBinaryCreateInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, pKeysAndDataInfo, pipeline, pPipelineCreateInfo ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PipelineBinaryCreateInfoKHR const & ) const = default; #else bool operator==( PipelineBinaryCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( pKeysAndDataInfo == rhs.pKeysAndDataInfo ) && ( pipeline == rhs.pipeline ) && ( pPipelineCreateInfo == rhs.pPipelineCreateInfo ); # endif } bool operator!=( PipelineBinaryCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineBinaryCreateInfoKHR; const void * pNext = {}; const VULKAN_HPP_NAMESPACE::PipelineBinaryKeysAndDataKHR * pKeysAndDataInfo = {}; VULKAN_HPP_NAMESPACE::Pipeline pipeline = {}; const VULKAN_HPP_NAMESPACE::PipelineCreateInfoKHR * pPipelineCreateInfo = {}; }; template <> struct CppType { using Type = PipelineBinaryCreateInfoKHR; }; struct PipelineBinaryDataInfoKHR { using NativeType = VkPipelineBinaryDataInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineBinaryDataInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PipelineBinaryDataInfoKHR( VULKAN_HPP_NAMESPACE::PipelineBinaryKHR pipelineBinary_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , pipelineBinary{ pipelineBinary_ } { } VULKAN_HPP_CONSTEXPR PipelineBinaryDataInfoKHR( PipelineBinaryDataInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; PipelineBinaryDataInfoKHR( VkPipelineBinaryDataInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : PipelineBinaryDataInfoKHR( *reinterpret_cast( &rhs ) ) { } PipelineBinaryDataInfoKHR & operator=( PipelineBinaryDataInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PipelineBinaryDataInfoKHR & operator=( VkPipelineBinaryDataInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PipelineBinaryDataInfoKHR & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineBinaryDataInfoKHR & setPipelineBinary( VULKAN_HPP_NAMESPACE::PipelineBinaryKHR pipelineBinary_ ) VULKAN_HPP_NOEXCEPT { pipelineBinary = pipelineBinary_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPipelineBinaryDataInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPipelineBinaryDataInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, pipelineBinary ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PipelineBinaryDataInfoKHR const & ) const = default; #else bool operator==( PipelineBinaryDataInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( pipelineBinary == rhs.pipelineBinary ); # endif } bool operator!=( PipelineBinaryDataInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineBinaryDataInfoKHR; void * pNext = {}; VULKAN_HPP_NAMESPACE::PipelineBinaryKHR pipelineBinary = {}; }; template <> struct CppType { using Type = PipelineBinaryDataInfoKHR; }; struct PipelineBinaryHandlesInfoKHR { using NativeType = VkPipelineBinaryHandlesInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineBinaryHandlesInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PipelineBinaryHandlesInfoKHR( uint32_t pipelineBinaryCount_ = {}, VULKAN_HPP_NAMESPACE::PipelineBinaryKHR * pPipelineBinaries_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , pipelineBinaryCount{ pipelineBinaryCount_ } , pPipelineBinaries{ pPipelineBinaries_ } { } VULKAN_HPP_CONSTEXPR PipelineBinaryHandlesInfoKHR( PipelineBinaryHandlesInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; PipelineBinaryHandlesInfoKHR( VkPipelineBinaryHandlesInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : PipelineBinaryHandlesInfoKHR( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) PipelineBinaryHandlesInfoKHR( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & pipelineBinaries_, const void * pNext_ = nullptr ) : pNext( pNext_ ), pipelineBinaryCount( static_cast( pipelineBinaries_.size() ) ), pPipelineBinaries( pipelineBinaries_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ PipelineBinaryHandlesInfoKHR & operator=( PipelineBinaryHandlesInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PipelineBinaryHandlesInfoKHR & operator=( VkPipelineBinaryHandlesInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PipelineBinaryHandlesInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineBinaryHandlesInfoKHR & setPipelineBinaryCount( uint32_t pipelineBinaryCount_ ) VULKAN_HPP_NOEXCEPT { pipelineBinaryCount = pipelineBinaryCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineBinaryHandlesInfoKHR & setPPipelineBinaries( VULKAN_HPP_NAMESPACE::PipelineBinaryKHR * pPipelineBinaries_ ) VULKAN_HPP_NOEXCEPT { pPipelineBinaries = pPipelineBinaries_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) PipelineBinaryHandlesInfoKHR & setPipelineBinaries( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & pipelineBinaries_ ) VULKAN_HPP_NOEXCEPT { pipelineBinaryCount = static_cast( pipelineBinaries_.size() ); pPipelineBinaries = pipelineBinaries_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPipelineBinaryHandlesInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPipelineBinaryHandlesInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, pipelineBinaryCount, pPipelineBinaries ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PipelineBinaryHandlesInfoKHR const & ) const = default; #else bool operator==( PipelineBinaryHandlesInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( pipelineBinaryCount == rhs.pipelineBinaryCount ) && ( pPipelineBinaries == rhs.pPipelineBinaries ); # endif } bool operator!=( PipelineBinaryHandlesInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineBinaryHandlesInfoKHR; const void * pNext = {}; uint32_t pipelineBinaryCount = {}; VULKAN_HPP_NAMESPACE::PipelineBinaryKHR * pPipelineBinaries = {}; }; template <> struct CppType { using Type = PipelineBinaryHandlesInfoKHR; }; struct PipelineBinaryInfoKHR { using NativeType = VkPipelineBinaryInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineBinaryInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PipelineBinaryInfoKHR( uint32_t binaryCount_ = {}, const VULKAN_HPP_NAMESPACE::PipelineBinaryKHR * pPipelineBinaries_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , binaryCount{ binaryCount_ } , pPipelineBinaries{ pPipelineBinaries_ } { } VULKAN_HPP_CONSTEXPR PipelineBinaryInfoKHR( PipelineBinaryInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; PipelineBinaryInfoKHR( VkPipelineBinaryInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : PipelineBinaryInfoKHR( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) PipelineBinaryInfoKHR( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & pipelineBinaries_, const void * pNext_ = nullptr ) : pNext( pNext_ ), binaryCount( static_cast( pipelineBinaries_.size() ) ), pPipelineBinaries( pipelineBinaries_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ PipelineBinaryInfoKHR & operator=( PipelineBinaryInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PipelineBinaryInfoKHR & operator=( VkPipelineBinaryInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PipelineBinaryInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineBinaryInfoKHR & setBinaryCount( uint32_t binaryCount_ ) VULKAN_HPP_NOEXCEPT { binaryCount = binaryCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineBinaryInfoKHR & setPPipelineBinaries( const VULKAN_HPP_NAMESPACE::PipelineBinaryKHR * pPipelineBinaries_ ) VULKAN_HPP_NOEXCEPT { pPipelineBinaries = pPipelineBinaries_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) PipelineBinaryInfoKHR & setPipelineBinaries( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & pipelineBinaries_ ) VULKAN_HPP_NOEXCEPT { binaryCount = static_cast( pipelineBinaries_.size() ); pPipelineBinaries = pipelineBinaries_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPipelineBinaryInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPipelineBinaryInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, binaryCount, pPipelineBinaries ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PipelineBinaryInfoKHR const & ) const = default; #else bool operator==( PipelineBinaryInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( binaryCount == rhs.binaryCount ) && ( pPipelineBinaries == rhs.pPipelineBinaries ); # endif } bool operator!=( PipelineBinaryInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineBinaryInfoKHR; const void * pNext = {}; uint32_t binaryCount = {}; const VULKAN_HPP_NAMESPACE::PipelineBinaryKHR * pPipelineBinaries = {}; }; template <> struct CppType { using Type = PipelineBinaryInfoKHR; }; struct PipelineCacheCreateInfo { using NativeType = VkPipelineCacheCreateInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineCacheCreateInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PipelineCacheCreateInfo( VULKAN_HPP_NAMESPACE::PipelineCacheCreateFlags flags_ = {}, size_t initialDataSize_ = {}, const void * pInitialData_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , initialDataSize{ initialDataSize_ } , pInitialData{ pInitialData_ } { } VULKAN_HPP_CONSTEXPR PipelineCacheCreateInfo( PipelineCacheCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; PipelineCacheCreateInfo( VkPipelineCacheCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT : PipelineCacheCreateInfo( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) template PipelineCacheCreateInfo( VULKAN_HPP_NAMESPACE::PipelineCacheCreateFlags flags_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & initialData_, const void * pNext_ = nullptr ) : pNext( pNext_ ), flags( flags_ ), initialDataSize( initialData_.size() * sizeof( T ) ), pInitialData( initialData_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ PipelineCacheCreateInfo & operator=( PipelineCacheCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PipelineCacheCreateInfo & operator=( VkPipelineCacheCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PipelineCacheCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineCacheCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::PipelineCacheCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineCacheCreateInfo & setInitialDataSize( size_t initialDataSize_ ) VULKAN_HPP_NOEXCEPT { initialDataSize = initialDataSize_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineCacheCreateInfo & setPInitialData( const void * pInitialData_ ) VULKAN_HPP_NOEXCEPT { pInitialData = pInitialData_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) template PipelineCacheCreateInfo & setInitialData( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & initialData_ ) VULKAN_HPP_NOEXCEPT { initialDataSize = initialData_.size() * sizeof( T ); pInitialData = initialData_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPipelineCacheCreateInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPipelineCacheCreateInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, initialDataSize, pInitialData ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PipelineCacheCreateInfo const & ) const = default; #else bool operator==( PipelineCacheCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( initialDataSize == rhs.initialDataSize ) && ( pInitialData == rhs.pInitialData ); # endif } bool operator!=( PipelineCacheCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineCacheCreateInfo; const void * pNext = {}; VULKAN_HPP_NAMESPACE::PipelineCacheCreateFlags flags = {}; size_t initialDataSize = {}; const void * pInitialData = {}; }; template <> struct CppType { using Type = PipelineCacheCreateInfo; }; struct PipelineCacheHeaderVersionOne { using NativeType = VkPipelineCacheHeaderVersionOne; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 PipelineCacheHeaderVersionOne( uint32_t headerSize_ = {}, VULKAN_HPP_NAMESPACE::PipelineCacheHeaderVersion headerVersion_ = VULKAN_HPP_NAMESPACE::PipelineCacheHeaderVersion::eOne, uint32_t vendorID_ = {}, uint32_t deviceID_ = {}, std::array const & pipelineCacheUUID_ = {} ) VULKAN_HPP_NOEXCEPT : headerSize{ headerSize_ } , headerVersion{ headerVersion_ } , vendorID{ vendorID_ } , deviceID{ deviceID_ } , pipelineCacheUUID{ pipelineCacheUUID_ } { } VULKAN_HPP_CONSTEXPR_14 PipelineCacheHeaderVersionOne( PipelineCacheHeaderVersionOne const & rhs ) VULKAN_HPP_NOEXCEPT = default; PipelineCacheHeaderVersionOne( VkPipelineCacheHeaderVersionOne const & rhs ) VULKAN_HPP_NOEXCEPT : PipelineCacheHeaderVersionOne( *reinterpret_cast( &rhs ) ) { } PipelineCacheHeaderVersionOne & operator=( PipelineCacheHeaderVersionOne const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PipelineCacheHeaderVersionOne & operator=( VkPipelineCacheHeaderVersionOne const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PipelineCacheHeaderVersionOne & setHeaderSize( uint32_t headerSize_ ) VULKAN_HPP_NOEXCEPT { headerSize = headerSize_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineCacheHeaderVersionOne & setHeaderVersion( VULKAN_HPP_NAMESPACE::PipelineCacheHeaderVersion headerVersion_ ) VULKAN_HPP_NOEXCEPT { headerVersion = headerVersion_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineCacheHeaderVersionOne & setVendorID( uint32_t vendorID_ ) VULKAN_HPP_NOEXCEPT { vendorID = vendorID_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineCacheHeaderVersionOne & setDeviceID( uint32_t deviceID_ ) VULKAN_HPP_NOEXCEPT { deviceID = deviceID_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineCacheHeaderVersionOne & setPipelineCacheUUID( std::array pipelineCacheUUID_ ) VULKAN_HPP_NOEXCEPT { pipelineCacheUUID = pipelineCacheUUID_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPipelineCacheHeaderVersionOne const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPipelineCacheHeaderVersionOne &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple const &> # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( headerSize, headerVersion, vendorID, deviceID, pipelineCacheUUID ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PipelineCacheHeaderVersionOne const & ) const = default; #else bool operator==( PipelineCacheHeaderVersionOne const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( headerSize == rhs.headerSize ) && ( headerVersion == rhs.headerVersion ) && ( vendorID == rhs.vendorID ) && ( deviceID == rhs.deviceID ) && ( pipelineCacheUUID == rhs.pipelineCacheUUID ); # endif } bool operator!=( PipelineCacheHeaderVersionOne const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: uint32_t headerSize = {}; VULKAN_HPP_NAMESPACE::PipelineCacheHeaderVersion headerVersion = VULKAN_HPP_NAMESPACE::PipelineCacheHeaderVersion::eOne; uint32_t vendorID = {}; uint32_t deviceID = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D pipelineCacheUUID = {}; }; struct PipelineColorBlendAdvancedStateCreateInfoEXT { using NativeType = VkPipelineColorBlendAdvancedStateCreateInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineColorBlendAdvancedStateCreateInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PipelineColorBlendAdvancedStateCreateInfoEXT( VULKAN_HPP_NAMESPACE::Bool32 srcPremultiplied_ = {}, VULKAN_HPP_NAMESPACE::Bool32 dstPremultiplied_ = {}, VULKAN_HPP_NAMESPACE::BlendOverlapEXT blendOverlap_ = VULKAN_HPP_NAMESPACE::BlendOverlapEXT::eUncorrelated, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , srcPremultiplied{ srcPremultiplied_ } , dstPremultiplied{ dstPremultiplied_ } , blendOverlap{ blendOverlap_ } { } VULKAN_HPP_CONSTEXPR PipelineColorBlendAdvancedStateCreateInfoEXT( PipelineColorBlendAdvancedStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PipelineColorBlendAdvancedStateCreateInfoEXT( VkPipelineColorBlendAdvancedStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PipelineColorBlendAdvancedStateCreateInfoEXT( *reinterpret_cast( &rhs ) ) { } PipelineColorBlendAdvancedStateCreateInfoEXT & operator=( PipelineColorBlendAdvancedStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PipelineColorBlendAdvancedStateCreateInfoEXT & operator=( VkPipelineColorBlendAdvancedStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PipelineColorBlendAdvancedStateCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineColorBlendAdvancedStateCreateInfoEXT & setSrcPremultiplied( VULKAN_HPP_NAMESPACE::Bool32 srcPremultiplied_ ) VULKAN_HPP_NOEXCEPT { srcPremultiplied = srcPremultiplied_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineColorBlendAdvancedStateCreateInfoEXT & setDstPremultiplied( VULKAN_HPP_NAMESPACE::Bool32 dstPremultiplied_ ) VULKAN_HPP_NOEXCEPT { dstPremultiplied = dstPremultiplied_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineColorBlendAdvancedStateCreateInfoEXT & setBlendOverlap( VULKAN_HPP_NAMESPACE::BlendOverlapEXT blendOverlap_ ) VULKAN_HPP_NOEXCEPT { blendOverlap = blendOverlap_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPipelineColorBlendAdvancedStateCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPipelineColorBlendAdvancedStateCreateInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, srcPremultiplied, dstPremultiplied, blendOverlap ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PipelineColorBlendAdvancedStateCreateInfoEXT const & ) const = default; #else bool operator==( PipelineColorBlendAdvancedStateCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( srcPremultiplied == rhs.srcPremultiplied ) && ( dstPremultiplied == rhs.dstPremultiplied ) && ( blendOverlap == rhs.blendOverlap ); # endif } bool operator!=( PipelineColorBlendAdvancedStateCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineColorBlendAdvancedStateCreateInfoEXT; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 srcPremultiplied = {}; VULKAN_HPP_NAMESPACE::Bool32 dstPremultiplied = {}; VULKAN_HPP_NAMESPACE::BlendOverlapEXT blendOverlap = VULKAN_HPP_NAMESPACE::BlendOverlapEXT::eUncorrelated; }; template <> struct CppType { using Type = PipelineColorBlendAdvancedStateCreateInfoEXT; }; struct PipelineColorWriteCreateInfoEXT { using NativeType = VkPipelineColorWriteCreateInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineColorWriteCreateInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PipelineColorWriteCreateInfoEXT( uint32_t attachmentCount_ = {}, const VULKAN_HPP_NAMESPACE::Bool32 * pColorWriteEnables_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , attachmentCount{ attachmentCount_ } , pColorWriteEnables{ pColorWriteEnables_ } { } VULKAN_HPP_CONSTEXPR PipelineColorWriteCreateInfoEXT( PipelineColorWriteCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PipelineColorWriteCreateInfoEXT( VkPipelineColorWriteCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PipelineColorWriteCreateInfoEXT( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) PipelineColorWriteCreateInfoEXT( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & colorWriteEnables_, const void * pNext_ = nullptr ) : pNext( pNext_ ), attachmentCount( static_cast( colorWriteEnables_.size() ) ), pColorWriteEnables( colorWriteEnables_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ PipelineColorWriteCreateInfoEXT & operator=( PipelineColorWriteCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PipelineColorWriteCreateInfoEXT & operator=( VkPipelineColorWriteCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PipelineColorWriteCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineColorWriteCreateInfoEXT & setAttachmentCount( uint32_t attachmentCount_ ) VULKAN_HPP_NOEXCEPT { attachmentCount = attachmentCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineColorWriteCreateInfoEXT & setPColorWriteEnables( const VULKAN_HPP_NAMESPACE::Bool32 * pColorWriteEnables_ ) VULKAN_HPP_NOEXCEPT { pColorWriteEnables = pColorWriteEnables_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) PipelineColorWriteCreateInfoEXT & setColorWriteEnables( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & colorWriteEnables_ ) VULKAN_HPP_NOEXCEPT { attachmentCount = static_cast( colorWriteEnables_.size() ); pColorWriteEnables = colorWriteEnables_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPipelineColorWriteCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPipelineColorWriteCreateInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, attachmentCount, pColorWriteEnables ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PipelineColorWriteCreateInfoEXT const & ) const = default; #else bool operator==( PipelineColorWriteCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( attachmentCount == rhs.attachmentCount ) && ( pColorWriteEnables == rhs.pColorWriteEnables ); # endif } bool operator!=( PipelineColorWriteCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineColorWriteCreateInfoEXT; const void * pNext = {}; uint32_t attachmentCount = {}; const VULKAN_HPP_NAMESPACE::Bool32 * pColorWriteEnables = {}; }; template <> struct CppType { using Type = PipelineColorWriteCreateInfoEXT; }; struct PipelineCompilerControlCreateInfoAMD { using NativeType = VkPipelineCompilerControlCreateInfoAMD; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineCompilerControlCreateInfoAMD; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PipelineCompilerControlCreateInfoAMD( VULKAN_HPP_NAMESPACE::PipelineCompilerControlFlagsAMD compilerControlFlags_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , compilerControlFlags{ compilerControlFlags_ } { } VULKAN_HPP_CONSTEXPR PipelineCompilerControlCreateInfoAMD( PipelineCompilerControlCreateInfoAMD const & rhs ) VULKAN_HPP_NOEXCEPT = default; PipelineCompilerControlCreateInfoAMD( VkPipelineCompilerControlCreateInfoAMD const & rhs ) VULKAN_HPP_NOEXCEPT : PipelineCompilerControlCreateInfoAMD( *reinterpret_cast( &rhs ) ) { } PipelineCompilerControlCreateInfoAMD & operator=( PipelineCompilerControlCreateInfoAMD const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PipelineCompilerControlCreateInfoAMD & operator=( VkPipelineCompilerControlCreateInfoAMD const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PipelineCompilerControlCreateInfoAMD & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineCompilerControlCreateInfoAMD & setCompilerControlFlags( VULKAN_HPP_NAMESPACE::PipelineCompilerControlFlagsAMD compilerControlFlags_ ) VULKAN_HPP_NOEXCEPT { compilerControlFlags = compilerControlFlags_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPipelineCompilerControlCreateInfoAMD const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPipelineCompilerControlCreateInfoAMD &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, compilerControlFlags ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PipelineCompilerControlCreateInfoAMD const & ) const = default; #else bool operator==( PipelineCompilerControlCreateInfoAMD const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( compilerControlFlags == rhs.compilerControlFlags ); # endif } bool operator!=( PipelineCompilerControlCreateInfoAMD const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineCompilerControlCreateInfoAMD; const void * pNext = {}; VULKAN_HPP_NAMESPACE::PipelineCompilerControlFlagsAMD compilerControlFlags = {}; }; template <> struct CppType { using Type = PipelineCompilerControlCreateInfoAMD; }; struct PipelineCoverageModulationStateCreateInfoNV { using NativeType = VkPipelineCoverageModulationStateCreateInfoNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineCoverageModulationStateCreateInfoNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PipelineCoverageModulationStateCreateInfoNV( VULKAN_HPP_NAMESPACE::PipelineCoverageModulationStateCreateFlagsNV flags_ = {}, VULKAN_HPP_NAMESPACE::CoverageModulationModeNV coverageModulationMode_ = VULKAN_HPP_NAMESPACE::CoverageModulationModeNV::eNone, VULKAN_HPP_NAMESPACE::Bool32 coverageModulationTableEnable_ = {}, uint32_t coverageModulationTableCount_ = {}, const float * pCoverageModulationTable_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , coverageModulationMode{ coverageModulationMode_ } , coverageModulationTableEnable{ coverageModulationTableEnable_ } , coverageModulationTableCount{ coverageModulationTableCount_ } , pCoverageModulationTable{ pCoverageModulationTable_ } { } VULKAN_HPP_CONSTEXPR PipelineCoverageModulationStateCreateInfoNV( PipelineCoverageModulationStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; PipelineCoverageModulationStateCreateInfoNV( VkPipelineCoverageModulationStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT : PipelineCoverageModulationStateCreateInfoNV( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) PipelineCoverageModulationStateCreateInfoNV( VULKAN_HPP_NAMESPACE::PipelineCoverageModulationStateCreateFlagsNV flags_, VULKAN_HPP_NAMESPACE::CoverageModulationModeNV coverageModulationMode_, VULKAN_HPP_NAMESPACE::Bool32 coverageModulationTableEnable_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & coverageModulationTable_, const void * pNext_ = nullptr ) : pNext( pNext_ ) , flags( flags_ ) , coverageModulationMode( coverageModulationMode_ ) , coverageModulationTableEnable( coverageModulationTableEnable_ ) , coverageModulationTableCount( static_cast( coverageModulationTable_.size() ) ) , pCoverageModulationTable( coverageModulationTable_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ PipelineCoverageModulationStateCreateInfoNV & operator=( PipelineCoverageModulationStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PipelineCoverageModulationStateCreateInfoNV & operator=( VkPipelineCoverageModulationStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PipelineCoverageModulationStateCreateInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineCoverageModulationStateCreateInfoNV & setFlags( VULKAN_HPP_NAMESPACE::PipelineCoverageModulationStateCreateFlagsNV flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineCoverageModulationStateCreateInfoNV & setCoverageModulationMode( VULKAN_HPP_NAMESPACE::CoverageModulationModeNV coverageModulationMode_ ) VULKAN_HPP_NOEXCEPT { coverageModulationMode = coverageModulationMode_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineCoverageModulationStateCreateInfoNV & setCoverageModulationTableEnable( VULKAN_HPP_NAMESPACE::Bool32 coverageModulationTableEnable_ ) VULKAN_HPP_NOEXCEPT { coverageModulationTableEnable = coverageModulationTableEnable_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineCoverageModulationStateCreateInfoNV & setCoverageModulationTableCount( uint32_t coverageModulationTableCount_ ) VULKAN_HPP_NOEXCEPT { coverageModulationTableCount = coverageModulationTableCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineCoverageModulationStateCreateInfoNV & setPCoverageModulationTable( const float * pCoverageModulationTable_ ) VULKAN_HPP_NOEXCEPT { pCoverageModulationTable = pCoverageModulationTable_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) PipelineCoverageModulationStateCreateInfoNV & setCoverageModulationTable( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & coverageModulationTable_ ) VULKAN_HPP_NOEXCEPT { coverageModulationTableCount = static_cast( coverageModulationTable_.size() ); pCoverageModulationTable = coverageModulationTable_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPipelineCoverageModulationStateCreateInfoNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPipelineCoverageModulationStateCreateInfoNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, coverageModulationMode, coverageModulationTableEnable, coverageModulationTableCount, pCoverageModulationTable ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PipelineCoverageModulationStateCreateInfoNV const & ) const = default; #else bool operator==( PipelineCoverageModulationStateCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( coverageModulationMode == rhs.coverageModulationMode ) && ( coverageModulationTableEnable == rhs.coverageModulationTableEnable ) && ( coverageModulationTableCount == rhs.coverageModulationTableCount ) && ( pCoverageModulationTable == rhs.pCoverageModulationTable ); # endif } bool operator!=( PipelineCoverageModulationStateCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineCoverageModulationStateCreateInfoNV; const void * pNext = {}; VULKAN_HPP_NAMESPACE::PipelineCoverageModulationStateCreateFlagsNV flags = {}; VULKAN_HPP_NAMESPACE::CoverageModulationModeNV coverageModulationMode = VULKAN_HPP_NAMESPACE::CoverageModulationModeNV::eNone; VULKAN_HPP_NAMESPACE::Bool32 coverageModulationTableEnable = {}; uint32_t coverageModulationTableCount = {}; const float * pCoverageModulationTable = {}; }; template <> struct CppType { using Type = PipelineCoverageModulationStateCreateInfoNV; }; struct PipelineCoverageReductionStateCreateInfoNV { using NativeType = VkPipelineCoverageReductionStateCreateInfoNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineCoverageReductionStateCreateInfoNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PipelineCoverageReductionStateCreateInfoNV( VULKAN_HPP_NAMESPACE::PipelineCoverageReductionStateCreateFlagsNV flags_ = {}, VULKAN_HPP_NAMESPACE::CoverageReductionModeNV coverageReductionMode_ = VULKAN_HPP_NAMESPACE::CoverageReductionModeNV::eMerge, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , coverageReductionMode{ coverageReductionMode_ } { } VULKAN_HPP_CONSTEXPR PipelineCoverageReductionStateCreateInfoNV( PipelineCoverageReductionStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; PipelineCoverageReductionStateCreateInfoNV( VkPipelineCoverageReductionStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT : PipelineCoverageReductionStateCreateInfoNV( *reinterpret_cast( &rhs ) ) { } PipelineCoverageReductionStateCreateInfoNV & operator=( PipelineCoverageReductionStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PipelineCoverageReductionStateCreateInfoNV & operator=( VkPipelineCoverageReductionStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PipelineCoverageReductionStateCreateInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineCoverageReductionStateCreateInfoNV & setFlags( VULKAN_HPP_NAMESPACE::PipelineCoverageReductionStateCreateFlagsNV flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineCoverageReductionStateCreateInfoNV & setCoverageReductionMode( VULKAN_HPP_NAMESPACE::CoverageReductionModeNV coverageReductionMode_ ) VULKAN_HPP_NOEXCEPT { coverageReductionMode = coverageReductionMode_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPipelineCoverageReductionStateCreateInfoNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPipelineCoverageReductionStateCreateInfoNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, coverageReductionMode ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PipelineCoverageReductionStateCreateInfoNV const & ) const = default; #else bool operator==( PipelineCoverageReductionStateCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( coverageReductionMode == rhs.coverageReductionMode ); # endif } bool operator!=( PipelineCoverageReductionStateCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineCoverageReductionStateCreateInfoNV; const void * pNext = {}; VULKAN_HPP_NAMESPACE::PipelineCoverageReductionStateCreateFlagsNV flags = {}; VULKAN_HPP_NAMESPACE::CoverageReductionModeNV coverageReductionMode = VULKAN_HPP_NAMESPACE::CoverageReductionModeNV::eMerge; }; template <> struct CppType { using Type = PipelineCoverageReductionStateCreateInfoNV; }; struct PipelineCoverageToColorStateCreateInfoNV { using NativeType = VkPipelineCoverageToColorStateCreateInfoNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineCoverageToColorStateCreateInfoNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PipelineCoverageToColorStateCreateInfoNV( VULKAN_HPP_NAMESPACE::PipelineCoverageToColorStateCreateFlagsNV flags_ = {}, VULKAN_HPP_NAMESPACE::Bool32 coverageToColorEnable_ = {}, uint32_t coverageToColorLocation_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , coverageToColorEnable{ coverageToColorEnable_ } , coverageToColorLocation{ coverageToColorLocation_ } { } VULKAN_HPP_CONSTEXPR PipelineCoverageToColorStateCreateInfoNV( PipelineCoverageToColorStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; PipelineCoverageToColorStateCreateInfoNV( VkPipelineCoverageToColorStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT : PipelineCoverageToColorStateCreateInfoNV( *reinterpret_cast( &rhs ) ) { } PipelineCoverageToColorStateCreateInfoNV & operator=( PipelineCoverageToColorStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PipelineCoverageToColorStateCreateInfoNV & operator=( VkPipelineCoverageToColorStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PipelineCoverageToColorStateCreateInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineCoverageToColorStateCreateInfoNV & setFlags( VULKAN_HPP_NAMESPACE::PipelineCoverageToColorStateCreateFlagsNV flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineCoverageToColorStateCreateInfoNV & setCoverageToColorEnable( VULKAN_HPP_NAMESPACE::Bool32 coverageToColorEnable_ ) VULKAN_HPP_NOEXCEPT { coverageToColorEnable = coverageToColorEnable_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineCoverageToColorStateCreateInfoNV & setCoverageToColorLocation( uint32_t coverageToColorLocation_ ) VULKAN_HPP_NOEXCEPT { coverageToColorLocation = coverageToColorLocation_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPipelineCoverageToColorStateCreateInfoNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPipelineCoverageToColorStateCreateInfoNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, coverageToColorEnable, coverageToColorLocation ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PipelineCoverageToColorStateCreateInfoNV const & ) const = default; #else bool operator==( PipelineCoverageToColorStateCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( coverageToColorEnable == rhs.coverageToColorEnable ) && ( coverageToColorLocation == rhs.coverageToColorLocation ); # endif } bool operator!=( PipelineCoverageToColorStateCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineCoverageToColorStateCreateInfoNV; const void * pNext = {}; VULKAN_HPP_NAMESPACE::PipelineCoverageToColorStateCreateFlagsNV flags = {}; VULKAN_HPP_NAMESPACE::Bool32 coverageToColorEnable = {}; uint32_t coverageToColorLocation = {}; }; template <> struct CppType { using Type = PipelineCoverageToColorStateCreateInfoNV; }; struct PipelineCreateFlags2CreateInfo { using NativeType = VkPipelineCreateFlags2CreateInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineCreateFlags2CreateInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PipelineCreateFlags2CreateInfo( VULKAN_HPP_NAMESPACE::PipelineCreateFlags2 flags_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } { } VULKAN_HPP_CONSTEXPR PipelineCreateFlags2CreateInfo( PipelineCreateFlags2CreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; PipelineCreateFlags2CreateInfo( VkPipelineCreateFlags2CreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT : PipelineCreateFlags2CreateInfo( *reinterpret_cast( &rhs ) ) { } PipelineCreateFlags2CreateInfo & operator=( PipelineCreateFlags2CreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PipelineCreateFlags2CreateInfo & operator=( VkPipelineCreateFlags2CreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PipelineCreateFlags2CreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineCreateFlags2CreateInfo & setFlags( VULKAN_HPP_NAMESPACE::PipelineCreateFlags2 flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPipelineCreateFlags2CreateInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPipelineCreateFlags2CreateInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PipelineCreateFlags2CreateInfo const & ) const = default; #else bool operator==( PipelineCreateFlags2CreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ); # endif } bool operator!=( PipelineCreateFlags2CreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineCreateFlags2CreateInfo; const void * pNext = {}; VULKAN_HPP_NAMESPACE::PipelineCreateFlags2 flags = {}; }; template <> struct CppType { using Type = PipelineCreateFlags2CreateInfo; }; using PipelineCreateFlags2CreateInfoKHR = PipelineCreateFlags2CreateInfo; struct PipelineCreationFeedback { using NativeType = VkPipelineCreationFeedback; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PipelineCreationFeedback( VULKAN_HPP_NAMESPACE::PipelineCreationFeedbackFlags flags_ = {}, uint64_t duration_ = {} ) VULKAN_HPP_NOEXCEPT : flags{ flags_ } , duration{ duration_ } { } VULKAN_HPP_CONSTEXPR PipelineCreationFeedback( PipelineCreationFeedback const & rhs ) VULKAN_HPP_NOEXCEPT = default; PipelineCreationFeedback( VkPipelineCreationFeedback const & rhs ) VULKAN_HPP_NOEXCEPT : PipelineCreationFeedback( *reinterpret_cast( &rhs ) ) { } PipelineCreationFeedback & operator=( PipelineCreationFeedback const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PipelineCreationFeedback & operator=( VkPipelineCreationFeedback const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPipelineCreationFeedback const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPipelineCreationFeedback &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( flags, duration ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PipelineCreationFeedback const & ) const = default; #else bool operator==( PipelineCreationFeedback const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( flags == rhs.flags ) && ( duration == rhs.duration ); # endif } bool operator!=( PipelineCreationFeedback const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::PipelineCreationFeedbackFlags flags = {}; uint64_t duration = {}; }; using PipelineCreationFeedbackEXT = PipelineCreationFeedback; struct PipelineCreationFeedbackCreateInfo { using NativeType = VkPipelineCreationFeedbackCreateInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineCreationFeedbackCreateInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PipelineCreationFeedbackCreateInfo( VULKAN_HPP_NAMESPACE::PipelineCreationFeedback * pPipelineCreationFeedback_ = {}, uint32_t pipelineStageCreationFeedbackCount_ = {}, VULKAN_HPP_NAMESPACE::PipelineCreationFeedback * pPipelineStageCreationFeedbacks_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , pPipelineCreationFeedback{ pPipelineCreationFeedback_ } , pipelineStageCreationFeedbackCount{ pipelineStageCreationFeedbackCount_ } , pPipelineStageCreationFeedbacks{ pPipelineStageCreationFeedbacks_ } { } VULKAN_HPP_CONSTEXPR PipelineCreationFeedbackCreateInfo( PipelineCreationFeedbackCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; PipelineCreationFeedbackCreateInfo( VkPipelineCreationFeedbackCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT : PipelineCreationFeedbackCreateInfo( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) PipelineCreationFeedbackCreateInfo( VULKAN_HPP_NAMESPACE::PipelineCreationFeedback * pPipelineCreationFeedback_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & pipelineStageCreationFeedbacks_, const void * pNext_ = nullptr ) : pNext( pNext_ ) , pPipelineCreationFeedback( pPipelineCreationFeedback_ ) , pipelineStageCreationFeedbackCount( static_cast( pipelineStageCreationFeedbacks_.size() ) ) , pPipelineStageCreationFeedbacks( pipelineStageCreationFeedbacks_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ PipelineCreationFeedbackCreateInfo & operator=( PipelineCreationFeedbackCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PipelineCreationFeedbackCreateInfo & operator=( VkPipelineCreationFeedbackCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PipelineCreationFeedbackCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineCreationFeedbackCreateInfo & setPPipelineCreationFeedback( VULKAN_HPP_NAMESPACE::PipelineCreationFeedback * pPipelineCreationFeedback_ ) VULKAN_HPP_NOEXCEPT { pPipelineCreationFeedback = pPipelineCreationFeedback_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineCreationFeedbackCreateInfo & setPipelineStageCreationFeedbackCount( uint32_t pipelineStageCreationFeedbackCount_ ) VULKAN_HPP_NOEXCEPT { pipelineStageCreationFeedbackCount = pipelineStageCreationFeedbackCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineCreationFeedbackCreateInfo & setPPipelineStageCreationFeedbacks( VULKAN_HPP_NAMESPACE::PipelineCreationFeedback * pPipelineStageCreationFeedbacks_ ) VULKAN_HPP_NOEXCEPT { pPipelineStageCreationFeedbacks = pPipelineStageCreationFeedbacks_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) PipelineCreationFeedbackCreateInfo & setPipelineStageCreationFeedbacks( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & pipelineStageCreationFeedbacks_ ) VULKAN_HPP_NOEXCEPT { pipelineStageCreationFeedbackCount = static_cast( pipelineStageCreationFeedbacks_.size() ); pPipelineStageCreationFeedbacks = pipelineStageCreationFeedbacks_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPipelineCreationFeedbackCreateInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPipelineCreationFeedbackCreateInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, pPipelineCreationFeedback, pipelineStageCreationFeedbackCount, pPipelineStageCreationFeedbacks ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PipelineCreationFeedbackCreateInfo const & ) const = default; #else bool operator==( PipelineCreationFeedbackCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( pPipelineCreationFeedback == rhs.pPipelineCreationFeedback ) && ( pipelineStageCreationFeedbackCount == rhs.pipelineStageCreationFeedbackCount ) && ( pPipelineStageCreationFeedbacks == rhs.pPipelineStageCreationFeedbacks ); # endif } bool operator!=( PipelineCreationFeedbackCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineCreationFeedbackCreateInfo; const void * pNext = {}; VULKAN_HPP_NAMESPACE::PipelineCreationFeedback * pPipelineCreationFeedback = {}; uint32_t pipelineStageCreationFeedbackCount = {}; VULKAN_HPP_NAMESPACE::PipelineCreationFeedback * pPipelineStageCreationFeedbacks = {}; }; template <> struct CppType { using Type = PipelineCreationFeedbackCreateInfo; }; using PipelineCreationFeedbackCreateInfoEXT = PipelineCreationFeedbackCreateInfo; struct PipelineDiscardRectangleStateCreateInfoEXT { using NativeType = VkPipelineDiscardRectangleStateCreateInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineDiscardRectangleStateCreateInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PipelineDiscardRectangleStateCreateInfoEXT( VULKAN_HPP_NAMESPACE::PipelineDiscardRectangleStateCreateFlagsEXT flags_ = {}, VULKAN_HPP_NAMESPACE::DiscardRectangleModeEXT discardRectangleMode_ = VULKAN_HPP_NAMESPACE::DiscardRectangleModeEXT::eInclusive, uint32_t discardRectangleCount_ = {}, const VULKAN_HPP_NAMESPACE::Rect2D * pDiscardRectangles_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , discardRectangleMode{ discardRectangleMode_ } , discardRectangleCount{ discardRectangleCount_ } , pDiscardRectangles{ pDiscardRectangles_ } { } VULKAN_HPP_CONSTEXPR PipelineDiscardRectangleStateCreateInfoEXT( PipelineDiscardRectangleStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PipelineDiscardRectangleStateCreateInfoEXT( VkPipelineDiscardRectangleStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PipelineDiscardRectangleStateCreateInfoEXT( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) PipelineDiscardRectangleStateCreateInfoEXT( VULKAN_HPP_NAMESPACE::PipelineDiscardRectangleStateCreateFlagsEXT flags_, VULKAN_HPP_NAMESPACE::DiscardRectangleModeEXT discardRectangleMode_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & discardRectangles_, const void * pNext_ = nullptr ) : pNext( pNext_ ) , flags( flags_ ) , discardRectangleMode( discardRectangleMode_ ) , discardRectangleCount( static_cast( discardRectangles_.size() ) ) , pDiscardRectangles( discardRectangles_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ PipelineDiscardRectangleStateCreateInfoEXT & operator=( PipelineDiscardRectangleStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PipelineDiscardRectangleStateCreateInfoEXT & operator=( VkPipelineDiscardRectangleStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PipelineDiscardRectangleStateCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineDiscardRectangleStateCreateInfoEXT & setFlags( VULKAN_HPP_NAMESPACE::PipelineDiscardRectangleStateCreateFlagsEXT flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineDiscardRectangleStateCreateInfoEXT & setDiscardRectangleMode( VULKAN_HPP_NAMESPACE::DiscardRectangleModeEXT discardRectangleMode_ ) VULKAN_HPP_NOEXCEPT { discardRectangleMode = discardRectangleMode_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineDiscardRectangleStateCreateInfoEXT & setDiscardRectangleCount( uint32_t discardRectangleCount_ ) VULKAN_HPP_NOEXCEPT { discardRectangleCount = discardRectangleCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineDiscardRectangleStateCreateInfoEXT & setPDiscardRectangles( const VULKAN_HPP_NAMESPACE::Rect2D * pDiscardRectangles_ ) VULKAN_HPP_NOEXCEPT { pDiscardRectangles = pDiscardRectangles_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) PipelineDiscardRectangleStateCreateInfoEXT & setDiscardRectangles( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & discardRectangles_ ) VULKAN_HPP_NOEXCEPT { discardRectangleCount = static_cast( discardRectangles_.size() ); pDiscardRectangles = discardRectangles_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPipelineDiscardRectangleStateCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPipelineDiscardRectangleStateCreateInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, discardRectangleMode, discardRectangleCount, pDiscardRectangles ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PipelineDiscardRectangleStateCreateInfoEXT const & ) const = default; #else bool operator==( PipelineDiscardRectangleStateCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( discardRectangleMode == rhs.discardRectangleMode ) && ( discardRectangleCount == rhs.discardRectangleCount ) && ( pDiscardRectangles == rhs.pDiscardRectangles ); # endif } bool operator!=( PipelineDiscardRectangleStateCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineDiscardRectangleStateCreateInfoEXT; const void * pNext = {}; VULKAN_HPP_NAMESPACE::PipelineDiscardRectangleStateCreateFlagsEXT flags = {}; VULKAN_HPP_NAMESPACE::DiscardRectangleModeEXT discardRectangleMode = VULKAN_HPP_NAMESPACE::DiscardRectangleModeEXT::eInclusive; uint32_t discardRectangleCount = {}; const VULKAN_HPP_NAMESPACE::Rect2D * pDiscardRectangles = {}; }; template <> struct CppType { using Type = PipelineDiscardRectangleStateCreateInfoEXT; }; struct PipelineExecutableInfoKHR { using NativeType = VkPipelineExecutableInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineExecutableInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PipelineExecutableInfoKHR( VULKAN_HPP_NAMESPACE::Pipeline pipeline_ = {}, uint32_t executableIndex_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , pipeline{ pipeline_ } , executableIndex{ executableIndex_ } { } VULKAN_HPP_CONSTEXPR PipelineExecutableInfoKHR( PipelineExecutableInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; PipelineExecutableInfoKHR( VkPipelineExecutableInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : PipelineExecutableInfoKHR( *reinterpret_cast( &rhs ) ) { } PipelineExecutableInfoKHR & operator=( PipelineExecutableInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PipelineExecutableInfoKHR & operator=( VkPipelineExecutableInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PipelineExecutableInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineExecutableInfoKHR & setPipeline( VULKAN_HPP_NAMESPACE::Pipeline pipeline_ ) VULKAN_HPP_NOEXCEPT { pipeline = pipeline_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineExecutableInfoKHR & setExecutableIndex( uint32_t executableIndex_ ) VULKAN_HPP_NOEXCEPT { executableIndex = executableIndex_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPipelineExecutableInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPipelineExecutableInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, pipeline, executableIndex ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PipelineExecutableInfoKHR const & ) const = default; #else bool operator==( PipelineExecutableInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( pipeline == rhs.pipeline ) && ( executableIndex == rhs.executableIndex ); # endif } bool operator!=( PipelineExecutableInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineExecutableInfoKHR; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Pipeline pipeline = {}; uint32_t executableIndex = {}; }; template <> struct CppType { using Type = PipelineExecutableInfoKHR; }; struct PipelineExecutableInternalRepresentationKHR { using NativeType = VkPipelineExecutableInternalRepresentationKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineExecutableInternalRepresentationKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 PipelineExecutableInternalRepresentationKHR( std::array const & name_ = {}, std::array const & description_ = {}, VULKAN_HPP_NAMESPACE::Bool32 isText_ = {}, size_t dataSize_ = {}, void * pData_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , name{ name_ } , description{ description_ } , isText{ isText_ } , dataSize{ dataSize_ } , pData{ pData_ } { } VULKAN_HPP_CONSTEXPR_14 PipelineExecutableInternalRepresentationKHR( PipelineExecutableInternalRepresentationKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; PipelineExecutableInternalRepresentationKHR( VkPipelineExecutableInternalRepresentationKHR const & rhs ) VULKAN_HPP_NOEXCEPT : PipelineExecutableInternalRepresentationKHR( *reinterpret_cast( &rhs ) ) { } PipelineExecutableInternalRepresentationKHR & operator=( PipelineExecutableInternalRepresentationKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PipelineExecutableInternalRepresentationKHR & operator=( VkPipelineExecutableInternalRepresentationKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPipelineExecutableInternalRepresentationKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPipelineExecutableInternalRepresentationKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple const &, VULKAN_HPP_NAMESPACE::ArrayWrapper1D const &, VULKAN_HPP_NAMESPACE::Bool32 const &, size_t const &, void * const &> # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, name, description, isText, dataSize, pData ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) std::strong_ordering operator<=>( PipelineExecutableInternalRepresentationKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { if ( auto cmp = sType <=> rhs.sType; cmp != 0 ) return cmp; if ( auto cmp = pNext <=> rhs.pNext; cmp != 0 ) return cmp; if ( auto cmp = strcmp( name, rhs.name ); cmp != 0 ) return ( cmp < 0 ) ? std::strong_ordering::less : std::strong_ordering::greater; if ( auto cmp = strcmp( description, rhs.description ); cmp != 0 ) return ( cmp < 0 ) ? std::strong_ordering::less : std::strong_ordering::greater; if ( auto cmp = isText <=> rhs.isText; cmp != 0 ) return cmp; if ( auto cmp = dataSize <=> rhs.dataSize; cmp != 0 ) return cmp; if ( auto cmp = pData <=> rhs.pData; cmp != 0 ) return cmp; return std::strong_ordering::equivalent; } #endif bool operator==( PipelineExecutableInternalRepresentationKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( strcmp( name, rhs.name ) == 0 ) && ( strcmp( description, rhs.description ) == 0 ) && ( isText == rhs.isText ) && ( dataSize == rhs.dataSize ) && ( pData == rhs.pData ); } bool operator!=( PipelineExecutableInternalRepresentationKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineExecutableInternalRepresentationKHR; void * pNext = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D name = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D description = {}; VULKAN_HPP_NAMESPACE::Bool32 isText = {}; size_t dataSize = {}; void * pData = {}; }; template <> struct CppType { using Type = PipelineExecutableInternalRepresentationKHR; }; struct PipelineExecutablePropertiesKHR { using NativeType = VkPipelineExecutablePropertiesKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineExecutablePropertiesKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 PipelineExecutablePropertiesKHR( VULKAN_HPP_NAMESPACE::ShaderStageFlags stages_ = {}, std::array const & name_ = {}, std::array const & description_ = {}, uint32_t subgroupSize_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , stages{ stages_ } , name{ name_ } , description{ description_ } , subgroupSize{ subgroupSize_ } { } VULKAN_HPP_CONSTEXPR_14 PipelineExecutablePropertiesKHR( PipelineExecutablePropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; PipelineExecutablePropertiesKHR( VkPipelineExecutablePropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT : PipelineExecutablePropertiesKHR( *reinterpret_cast( &rhs ) ) { } PipelineExecutablePropertiesKHR & operator=( PipelineExecutablePropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PipelineExecutablePropertiesKHR & operator=( VkPipelineExecutablePropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPipelineExecutablePropertiesKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPipelineExecutablePropertiesKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple const &, VULKAN_HPP_NAMESPACE::ArrayWrapper1D const &, uint32_t const &> # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, stages, name, description, subgroupSize ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) std::strong_ordering operator<=>( PipelineExecutablePropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { if ( auto cmp = sType <=> rhs.sType; cmp != 0 ) return cmp; if ( auto cmp = pNext <=> rhs.pNext; cmp != 0 ) return cmp; if ( auto cmp = stages <=> rhs.stages; cmp != 0 ) return cmp; if ( auto cmp = strcmp( name, rhs.name ); cmp != 0 ) return ( cmp < 0 ) ? std::strong_ordering::less : std::strong_ordering::greater; if ( auto cmp = strcmp( description, rhs.description ); cmp != 0 ) return ( cmp < 0 ) ? std::strong_ordering::less : std::strong_ordering::greater; if ( auto cmp = subgroupSize <=> rhs.subgroupSize; cmp != 0 ) return cmp; return std::strong_ordering::equivalent; } #endif bool operator==( PipelineExecutablePropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( stages == rhs.stages ) && ( strcmp( name, rhs.name ) == 0 ) && ( strcmp( description, rhs.description ) == 0 ) && ( subgroupSize == rhs.subgroupSize ); } bool operator!=( PipelineExecutablePropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineExecutablePropertiesKHR; void * pNext = {}; VULKAN_HPP_NAMESPACE::ShaderStageFlags stages = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D name = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D description = {}; uint32_t subgroupSize = {}; }; template <> struct CppType { using Type = PipelineExecutablePropertiesKHR; }; union PipelineExecutableStatisticValueKHR { using NativeType = VkPipelineExecutableStatisticValueKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_UNION_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 PipelineExecutableStatisticValueKHR( VULKAN_HPP_NAMESPACE::Bool32 b32_ = {} ) : b32( b32_ ) {} VULKAN_HPP_CONSTEXPR_14 PipelineExecutableStatisticValueKHR( int64_t i64_ ) : i64( i64_ ) {} VULKAN_HPP_CONSTEXPR_14 PipelineExecutableStatisticValueKHR( uint64_t u64_ ) : u64( u64_ ) {} VULKAN_HPP_CONSTEXPR_14 PipelineExecutableStatisticValueKHR( double f64_ ) : f64( f64_ ) {} #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_UNION_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PipelineExecutableStatisticValueKHR & setB32( VULKAN_HPP_NAMESPACE::Bool32 b32_ ) VULKAN_HPP_NOEXCEPT { b32 = b32_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineExecutableStatisticValueKHR & setI64( int64_t i64_ ) VULKAN_HPP_NOEXCEPT { i64 = i64_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineExecutableStatisticValueKHR & setU64( uint64_t u64_ ) VULKAN_HPP_NOEXCEPT { u64 = u64_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineExecutableStatisticValueKHR & setF64( double f64_ ) VULKAN_HPP_NOEXCEPT { f64 = f64_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPipelineExecutableStatisticValueKHR const &() const { return *reinterpret_cast( this ); } operator VkPipelineExecutableStatisticValueKHR &() { return *reinterpret_cast( this ); } #ifdef VULKAN_HPP_HAS_UNRESTRICTED_UNIONS VULKAN_HPP_NAMESPACE::Bool32 b32; int64_t i64; uint64_t u64; double f64; #else VkBool32 b32; int64_t i64; uint64_t u64; double f64; #endif /*VULKAN_HPP_HAS_UNRESTRICTED_UNIONS*/ }; struct PipelineExecutableStatisticKHR { using NativeType = VkPipelineExecutableStatisticKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineExecutableStatisticKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 PipelineExecutableStatisticKHR( std::array const & name_ = {}, std::array const & description_ = {}, VULKAN_HPP_NAMESPACE::PipelineExecutableStatisticFormatKHR format_ = VULKAN_HPP_NAMESPACE::PipelineExecutableStatisticFormatKHR::eBool32, VULKAN_HPP_NAMESPACE::PipelineExecutableStatisticValueKHR value_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , name{ name_ } , description{ description_ } , format{ format_ } , value{ value_ } { } VULKAN_HPP_CONSTEXPR_14 PipelineExecutableStatisticKHR( PipelineExecutableStatisticKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; PipelineExecutableStatisticKHR( VkPipelineExecutableStatisticKHR const & rhs ) VULKAN_HPP_NOEXCEPT : PipelineExecutableStatisticKHR( *reinterpret_cast( &rhs ) ) { } PipelineExecutableStatisticKHR & operator=( PipelineExecutableStatisticKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PipelineExecutableStatisticKHR & operator=( VkPipelineExecutableStatisticKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPipelineExecutableStatisticKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPipelineExecutableStatisticKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple const &, VULKAN_HPP_NAMESPACE::ArrayWrapper1D const &, VULKAN_HPP_NAMESPACE::PipelineExecutableStatisticFormatKHR const &, VULKAN_HPP_NAMESPACE::PipelineExecutableStatisticValueKHR const &> # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, name, description, format, value ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineExecutableStatisticKHR; void * pNext = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D name = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D description = {}; VULKAN_HPP_NAMESPACE::PipelineExecutableStatisticFormatKHR format = VULKAN_HPP_NAMESPACE::PipelineExecutableStatisticFormatKHR::eBool32; VULKAN_HPP_NAMESPACE::PipelineExecutableStatisticValueKHR value = {}; }; template <> struct CppType { using Type = PipelineExecutableStatisticKHR; }; struct PipelineFragmentShadingRateEnumStateCreateInfoNV { using NativeType = VkPipelineFragmentShadingRateEnumStateCreateInfoNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineFragmentShadingRateEnumStateCreateInfoNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 PipelineFragmentShadingRateEnumStateCreateInfoNV( VULKAN_HPP_NAMESPACE::FragmentShadingRateTypeNV shadingRateType_ = VULKAN_HPP_NAMESPACE::FragmentShadingRateTypeNV::eFragmentSize, VULKAN_HPP_NAMESPACE::FragmentShadingRateNV shadingRate_ = VULKAN_HPP_NAMESPACE::FragmentShadingRateNV::e1InvocationPerPixel, std::array const & combinerOps_ = { { VULKAN_HPP_NAMESPACE::FragmentShadingRateCombinerOpKHR::eKeep, VULKAN_HPP_NAMESPACE::FragmentShadingRateCombinerOpKHR::eKeep } }, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , shadingRateType{ shadingRateType_ } , shadingRate{ shadingRate_ } , combinerOps{ combinerOps_ } { } VULKAN_HPP_CONSTEXPR_14 PipelineFragmentShadingRateEnumStateCreateInfoNV( PipelineFragmentShadingRateEnumStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; PipelineFragmentShadingRateEnumStateCreateInfoNV( VkPipelineFragmentShadingRateEnumStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT : PipelineFragmentShadingRateEnumStateCreateInfoNV( *reinterpret_cast( &rhs ) ) { } PipelineFragmentShadingRateEnumStateCreateInfoNV & operator=( PipelineFragmentShadingRateEnumStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PipelineFragmentShadingRateEnumStateCreateInfoNV & operator=( VkPipelineFragmentShadingRateEnumStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PipelineFragmentShadingRateEnumStateCreateInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineFragmentShadingRateEnumStateCreateInfoNV & setShadingRateType( VULKAN_HPP_NAMESPACE::FragmentShadingRateTypeNV shadingRateType_ ) VULKAN_HPP_NOEXCEPT { shadingRateType = shadingRateType_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineFragmentShadingRateEnumStateCreateInfoNV & setShadingRate( VULKAN_HPP_NAMESPACE::FragmentShadingRateNV shadingRate_ ) VULKAN_HPP_NOEXCEPT { shadingRate = shadingRate_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineFragmentShadingRateEnumStateCreateInfoNV & setCombinerOps( std::array combinerOps_ ) VULKAN_HPP_NOEXCEPT { combinerOps = combinerOps_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPipelineFragmentShadingRateEnumStateCreateInfoNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPipelineFragmentShadingRateEnumStateCreateInfoNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple const &> # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, shadingRateType, shadingRate, combinerOps ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PipelineFragmentShadingRateEnumStateCreateInfoNV const & ) const = default; #else bool operator==( PipelineFragmentShadingRateEnumStateCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( shadingRateType == rhs.shadingRateType ) && ( shadingRate == rhs.shadingRate ) && ( combinerOps == rhs.combinerOps ); # endif } bool operator!=( PipelineFragmentShadingRateEnumStateCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineFragmentShadingRateEnumStateCreateInfoNV; const void * pNext = {}; VULKAN_HPP_NAMESPACE::FragmentShadingRateTypeNV shadingRateType = VULKAN_HPP_NAMESPACE::FragmentShadingRateTypeNV::eFragmentSize; VULKAN_HPP_NAMESPACE::FragmentShadingRateNV shadingRate = VULKAN_HPP_NAMESPACE::FragmentShadingRateNV::e1InvocationPerPixel; VULKAN_HPP_NAMESPACE::ArrayWrapper1D combinerOps = {}; }; template <> struct CppType { using Type = PipelineFragmentShadingRateEnumStateCreateInfoNV; }; struct PipelineFragmentShadingRateStateCreateInfoKHR { using NativeType = VkPipelineFragmentShadingRateStateCreateInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineFragmentShadingRateStateCreateInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 PipelineFragmentShadingRateStateCreateInfoKHR( VULKAN_HPP_NAMESPACE::Extent2D fragmentSize_ = {}, std::array const & combinerOps_ = { { VULKAN_HPP_NAMESPACE::FragmentShadingRateCombinerOpKHR::eKeep, VULKAN_HPP_NAMESPACE::FragmentShadingRateCombinerOpKHR::eKeep } }, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , fragmentSize{ fragmentSize_ } , combinerOps{ combinerOps_ } { } VULKAN_HPP_CONSTEXPR_14 PipelineFragmentShadingRateStateCreateInfoKHR( PipelineFragmentShadingRateStateCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; PipelineFragmentShadingRateStateCreateInfoKHR( VkPipelineFragmentShadingRateStateCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : PipelineFragmentShadingRateStateCreateInfoKHR( *reinterpret_cast( &rhs ) ) { } PipelineFragmentShadingRateStateCreateInfoKHR & operator=( PipelineFragmentShadingRateStateCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PipelineFragmentShadingRateStateCreateInfoKHR & operator=( VkPipelineFragmentShadingRateStateCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PipelineFragmentShadingRateStateCreateInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineFragmentShadingRateStateCreateInfoKHR & setFragmentSize( VULKAN_HPP_NAMESPACE::Extent2D const & fragmentSize_ ) VULKAN_HPP_NOEXCEPT { fragmentSize = fragmentSize_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineFragmentShadingRateStateCreateInfoKHR & setCombinerOps( std::array combinerOps_ ) VULKAN_HPP_NOEXCEPT { combinerOps = combinerOps_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPipelineFragmentShadingRateStateCreateInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPipelineFragmentShadingRateStateCreateInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple const &> # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, fragmentSize, combinerOps ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PipelineFragmentShadingRateStateCreateInfoKHR const & ) const = default; #else bool operator==( PipelineFragmentShadingRateStateCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( fragmentSize == rhs.fragmentSize ) && ( combinerOps == rhs.combinerOps ); # endif } bool operator!=( PipelineFragmentShadingRateStateCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineFragmentShadingRateStateCreateInfoKHR; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Extent2D fragmentSize = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D combinerOps = {}; }; template <> struct CppType { using Type = PipelineFragmentShadingRateStateCreateInfoKHR; }; struct PipelineIndirectDeviceAddressInfoNV { using NativeType = VkPipelineIndirectDeviceAddressInfoNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineIndirectDeviceAddressInfoNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PipelineIndirectDeviceAddressInfoNV( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint_ = VULKAN_HPP_NAMESPACE::PipelineBindPoint::eGraphics, VULKAN_HPP_NAMESPACE::Pipeline pipeline_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , pipelineBindPoint{ pipelineBindPoint_ } , pipeline{ pipeline_ } { } VULKAN_HPP_CONSTEXPR PipelineIndirectDeviceAddressInfoNV( PipelineIndirectDeviceAddressInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; PipelineIndirectDeviceAddressInfoNV( VkPipelineIndirectDeviceAddressInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT : PipelineIndirectDeviceAddressInfoNV( *reinterpret_cast( &rhs ) ) { } PipelineIndirectDeviceAddressInfoNV & operator=( PipelineIndirectDeviceAddressInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PipelineIndirectDeviceAddressInfoNV & operator=( VkPipelineIndirectDeviceAddressInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PipelineIndirectDeviceAddressInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineIndirectDeviceAddressInfoNV & setPipelineBindPoint( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint_ ) VULKAN_HPP_NOEXCEPT { pipelineBindPoint = pipelineBindPoint_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineIndirectDeviceAddressInfoNV & setPipeline( VULKAN_HPP_NAMESPACE::Pipeline pipeline_ ) VULKAN_HPP_NOEXCEPT { pipeline = pipeline_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPipelineIndirectDeviceAddressInfoNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPipelineIndirectDeviceAddressInfoNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, pipelineBindPoint, pipeline ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PipelineIndirectDeviceAddressInfoNV const & ) const = default; #else bool operator==( PipelineIndirectDeviceAddressInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( pipelineBindPoint == rhs.pipelineBindPoint ) && ( pipeline == rhs.pipeline ); # endif } bool operator!=( PipelineIndirectDeviceAddressInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineIndirectDeviceAddressInfoNV; const void * pNext = {}; VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint = VULKAN_HPP_NAMESPACE::PipelineBindPoint::eGraphics; VULKAN_HPP_NAMESPACE::Pipeline pipeline = {}; }; template <> struct CppType { using Type = PipelineIndirectDeviceAddressInfoNV; }; struct PipelineInfoKHR { using NativeType = VkPipelineInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PipelineInfoKHR( VULKAN_HPP_NAMESPACE::Pipeline pipeline_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , pipeline{ pipeline_ } { } VULKAN_HPP_CONSTEXPR PipelineInfoKHR( PipelineInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; PipelineInfoKHR( VkPipelineInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : PipelineInfoKHR( *reinterpret_cast( &rhs ) ) {} PipelineInfoKHR & operator=( PipelineInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PipelineInfoKHR & operator=( VkPipelineInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PipelineInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineInfoKHR & setPipeline( VULKAN_HPP_NAMESPACE::Pipeline pipeline_ ) VULKAN_HPP_NOEXCEPT { pipeline = pipeline_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPipelineInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPipelineInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, pipeline ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PipelineInfoKHR const & ) const = default; #else bool operator==( PipelineInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( pipeline == rhs.pipeline ); # endif } bool operator!=( PipelineInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineInfoKHR; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Pipeline pipeline = {}; }; template <> struct CppType { using Type = PipelineInfoKHR; }; using PipelineInfoEXT = PipelineInfoKHR; struct PipelineLayoutCreateInfo { using NativeType = VkPipelineLayoutCreateInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineLayoutCreateInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PipelineLayoutCreateInfo( VULKAN_HPP_NAMESPACE::PipelineLayoutCreateFlags flags_ = {}, uint32_t setLayoutCount_ = {}, const VULKAN_HPP_NAMESPACE::DescriptorSetLayout * pSetLayouts_ = {}, uint32_t pushConstantRangeCount_ = {}, const VULKAN_HPP_NAMESPACE::PushConstantRange * pPushConstantRanges_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , setLayoutCount{ setLayoutCount_ } , pSetLayouts{ pSetLayouts_ } , pushConstantRangeCount{ pushConstantRangeCount_ } , pPushConstantRanges{ pPushConstantRanges_ } { } VULKAN_HPP_CONSTEXPR PipelineLayoutCreateInfo( PipelineLayoutCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; PipelineLayoutCreateInfo( VkPipelineLayoutCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT : PipelineLayoutCreateInfo( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) PipelineLayoutCreateInfo( VULKAN_HPP_NAMESPACE::PipelineLayoutCreateFlags flags_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & setLayouts_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & pushConstantRanges_ = {}, const void * pNext_ = nullptr ) : pNext( pNext_ ) , flags( flags_ ) , setLayoutCount( static_cast( setLayouts_.size() ) ) , pSetLayouts( setLayouts_.data() ) , pushConstantRangeCount( static_cast( pushConstantRanges_.size() ) ) , pPushConstantRanges( pushConstantRanges_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ PipelineLayoutCreateInfo & operator=( PipelineLayoutCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PipelineLayoutCreateInfo & operator=( VkPipelineLayoutCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PipelineLayoutCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineLayoutCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::PipelineLayoutCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineLayoutCreateInfo & setSetLayoutCount( uint32_t setLayoutCount_ ) VULKAN_HPP_NOEXCEPT { setLayoutCount = setLayoutCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineLayoutCreateInfo & setPSetLayouts( const VULKAN_HPP_NAMESPACE::DescriptorSetLayout * pSetLayouts_ ) VULKAN_HPP_NOEXCEPT { pSetLayouts = pSetLayouts_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) PipelineLayoutCreateInfo & setSetLayouts( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & setLayouts_ ) VULKAN_HPP_NOEXCEPT { setLayoutCount = static_cast( setLayouts_.size() ); pSetLayouts = setLayouts_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 PipelineLayoutCreateInfo & setPushConstantRangeCount( uint32_t pushConstantRangeCount_ ) VULKAN_HPP_NOEXCEPT { pushConstantRangeCount = pushConstantRangeCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineLayoutCreateInfo & setPPushConstantRanges( const VULKAN_HPP_NAMESPACE::PushConstantRange * pPushConstantRanges_ ) VULKAN_HPP_NOEXCEPT { pPushConstantRanges = pPushConstantRanges_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) PipelineLayoutCreateInfo & setPushConstantRanges( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & pushConstantRanges_ ) VULKAN_HPP_NOEXCEPT { pushConstantRangeCount = static_cast( pushConstantRanges_.size() ); pPushConstantRanges = pushConstantRanges_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPipelineLayoutCreateInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPipelineLayoutCreateInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, setLayoutCount, pSetLayouts, pushConstantRangeCount, pPushConstantRanges ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PipelineLayoutCreateInfo const & ) const = default; #else bool operator==( PipelineLayoutCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( setLayoutCount == rhs.setLayoutCount ) && ( pSetLayouts == rhs.pSetLayouts ) && ( pushConstantRangeCount == rhs.pushConstantRangeCount ) && ( pPushConstantRanges == rhs.pPushConstantRanges ); # endif } bool operator!=( PipelineLayoutCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineLayoutCreateInfo; const void * pNext = {}; VULKAN_HPP_NAMESPACE::PipelineLayoutCreateFlags flags = {}; uint32_t setLayoutCount = {}; const VULKAN_HPP_NAMESPACE::DescriptorSetLayout * pSetLayouts = {}; uint32_t pushConstantRangeCount = {}; const VULKAN_HPP_NAMESPACE::PushConstantRange * pPushConstantRanges = {}; }; template <> struct CppType { using Type = PipelineLayoutCreateInfo; }; struct PipelinePropertiesIdentifierEXT { using NativeType = VkPipelinePropertiesIdentifierEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelinePropertiesIdentifierEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 PipelinePropertiesIdentifierEXT( std::array const & pipelineIdentifier_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , pipelineIdentifier{ pipelineIdentifier_ } { } VULKAN_HPP_CONSTEXPR_14 PipelinePropertiesIdentifierEXT( PipelinePropertiesIdentifierEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PipelinePropertiesIdentifierEXT( VkPipelinePropertiesIdentifierEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PipelinePropertiesIdentifierEXT( *reinterpret_cast( &rhs ) ) { } PipelinePropertiesIdentifierEXT & operator=( PipelinePropertiesIdentifierEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PipelinePropertiesIdentifierEXT & operator=( VkPipelinePropertiesIdentifierEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPipelinePropertiesIdentifierEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPipelinePropertiesIdentifierEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple const &> # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, pipelineIdentifier ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PipelinePropertiesIdentifierEXT const & ) const = default; #else bool operator==( PipelinePropertiesIdentifierEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( pipelineIdentifier == rhs.pipelineIdentifier ); # endif } bool operator!=( PipelinePropertiesIdentifierEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelinePropertiesIdentifierEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D pipelineIdentifier = {}; }; template <> struct CppType { using Type = PipelinePropertiesIdentifierEXT; }; struct PipelineRasterizationConservativeStateCreateInfoEXT { using NativeType = VkPipelineRasterizationConservativeStateCreateInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineRasterizationConservativeStateCreateInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PipelineRasterizationConservativeStateCreateInfoEXT( VULKAN_HPP_NAMESPACE::PipelineRasterizationConservativeStateCreateFlagsEXT flags_ = {}, VULKAN_HPP_NAMESPACE::ConservativeRasterizationModeEXT conservativeRasterizationMode_ = VULKAN_HPP_NAMESPACE::ConservativeRasterizationModeEXT::eDisabled, float extraPrimitiveOverestimationSize_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , conservativeRasterizationMode{ conservativeRasterizationMode_ } , extraPrimitiveOverestimationSize{ extraPrimitiveOverestimationSize_ } { } VULKAN_HPP_CONSTEXPR PipelineRasterizationConservativeStateCreateInfoEXT( PipelineRasterizationConservativeStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PipelineRasterizationConservativeStateCreateInfoEXT( VkPipelineRasterizationConservativeStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PipelineRasterizationConservativeStateCreateInfoEXT( *reinterpret_cast( &rhs ) ) { } PipelineRasterizationConservativeStateCreateInfoEXT & operator=( PipelineRasterizationConservativeStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PipelineRasterizationConservativeStateCreateInfoEXT & operator=( VkPipelineRasterizationConservativeStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PipelineRasterizationConservativeStateCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineRasterizationConservativeStateCreateInfoEXT & setFlags( VULKAN_HPP_NAMESPACE::PipelineRasterizationConservativeStateCreateFlagsEXT flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineRasterizationConservativeStateCreateInfoEXT & setConservativeRasterizationMode( VULKAN_HPP_NAMESPACE::ConservativeRasterizationModeEXT conservativeRasterizationMode_ ) VULKAN_HPP_NOEXCEPT { conservativeRasterizationMode = conservativeRasterizationMode_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineRasterizationConservativeStateCreateInfoEXT & setExtraPrimitiveOverestimationSize( float extraPrimitiveOverestimationSize_ ) VULKAN_HPP_NOEXCEPT { extraPrimitiveOverestimationSize = extraPrimitiveOverestimationSize_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPipelineRasterizationConservativeStateCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPipelineRasterizationConservativeStateCreateInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, conservativeRasterizationMode, extraPrimitiveOverestimationSize ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PipelineRasterizationConservativeStateCreateInfoEXT const & ) const = default; #else bool operator==( PipelineRasterizationConservativeStateCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( conservativeRasterizationMode == rhs.conservativeRasterizationMode ) && ( extraPrimitiveOverestimationSize == rhs.extraPrimitiveOverestimationSize ); # endif } bool operator!=( PipelineRasterizationConservativeStateCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineRasterizationConservativeStateCreateInfoEXT; const void * pNext = {}; VULKAN_HPP_NAMESPACE::PipelineRasterizationConservativeStateCreateFlagsEXT flags = {}; VULKAN_HPP_NAMESPACE::ConservativeRasterizationModeEXT conservativeRasterizationMode = VULKAN_HPP_NAMESPACE::ConservativeRasterizationModeEXT::eDisabled; float extraPrimitiveOverestimationSize = {}; }; template <> struct CppType { using Type = PipelineRasterizationConservativeStateCreateInfoEXT; }; struct PipelineRasterizationDepthClipStateCreateInfoEXT { using NativeType = VkPipelineRasterizationDepthClipStateCreateInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineRasterizationDepthClipStateCreateInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PipelineRasterizationDepthClipStateCreateInfoEXT( VULKAN_HPP_NAMESPACE::PipelineRasterizationDepthClipStateCreateFlagsEXT flags_ = {}, VULKAN_HPP_NAMESPACE::Bool32 depthClipEnable_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , depthClipEnable{ depthClipEnable_ } { } VULKAN_HPP_CONSTEXPR PipelineRasterizationDepthClipStateCreateInfoEXT( PipelineRasterizationDepthClipStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PipelineRasterizationDepthClipStateCreateInfoEXT( VkPipelineRasterizationDepthClipStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PipelineRasterizationDepthClipStateCreateInfoEXT( *reinterpret_cast( &rhs ) ) { } PipelineRasterizationDepthClipStateCreateInfoEXT & operator=( PipelineRasterizationDepthClipStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PipelineRasterizationDepthClipStateCreateInfoEXT & operator=( VkPipelineRasterizationDepthClipStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PipelineRasterizationDepthClipStateCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineRasterizationDepthClipStateCreateInfoEXT & setFlags( VULKAN_HPP_NAMESPACE::PipelineRasterizationDepthClipStateCreateFlagsEXT flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineRasterizationDepthClipStateCreateInfoEXT & setDepthClipEnable( VULKAN_HPP_NAMESPACE::Bool32 depthClipEnable_ ) VULKAN_HPP_NOEXCEPT { depthClipEnable = depthClipEnable_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPipelineRasterizationDepthClipStateCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPipelineRasterizationDepthClipStateCreateInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, depthClipEnable ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PipelineRasterizationDepthClipStateCreateInfoEXT const & ) const = default; #else bool operator==( PipelineRasterizationDepthClipStateCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( depthClipEnable == rhs.depthClipEnable ); # endif } bool operator!=( PipelineRasterizationDepthClipStateCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineRasterizationDepthClipStateCreateInfoEXT; const void * pNext = {}; VULKAN_HPP_NAMESPACE::PipelineRasterizationDepthClipStateCreateFlagsEXT flags = {}; VULKAN_HPP_NAMESPACE::Bool32 depthClipEnable = {}; }; template <> struct CppType { using Type = PipelineRasterizationDepthClipStateCreateInfoEXT; }; struct PipelineRasterizationLineStateCreateInfo { using NativeType = VkPipelineRasterizationLineStateCreateInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineRasterizationLineStateCreateInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PipelineRasterizationLineStateCreateInfo( VULKAN_HPP_NAMESPACE::LineRasterizationMode lineRasterizationMode_ = VULKAN_HPP_NAMESPACE::LineRasterizationMode::eDefault, VULKAN_HPP_NAMESPACE::Bool32 stippledLineEnable_ = {}, uint32_t lineStippleFactor_ = {}, uint16_t lineStipplePattern_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , lineRasterizationMode{ lineRasterizationMode_ } , stippledLineEnable{ stippledLineEnable_ } , lineStippleFactor{ lineStippleFactor_ } , lineStipplePattern{ lineStipplePattern_ } { } VULKAN_HPP_CONSTEXPR PipelineRasterizationLineStateCreateInfo( PipelineRasterizationLineStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; PipelineRasterizationLineStateCreateInfo( VkPipelineRasterizationLineStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT : PipelineRasterizationLineStateCreateInfo( *reinterpret_cast( &rhs ) ) { } PipelineRasterizationLineStateCreateInfo & operator=( PipelineRasterizationLineStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PipelineRasterizationLineStateCreateInfo & operator=( VkPipelineRasterizationLineStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PipelineRasterizationLineStateCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineRasterizationLineStateCreateInfo & setLineRasterizationMode( VULKAN_HPP_NAMESPACE::LineRasterizationMode lineRasterizationMode_ ) VULKAN_HPP_NOEXCEPT { lineRasterizationMode = lineRasterizationMode_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineRasterizationLineStateCreateInfo & setStippledLineEnable( VULKAN_HPP_NAMESPACE::Bool32 stippledLineEnable_ ) VULKAN_HPP_NOEXCEPT { stippledLineEnable = stippledLineEnable_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineRasterizationLineStateCreateInfo & setLineStippleFactor( uint32_t lineStippleFactor_ ) VULKAN_HPP_NOEXCEPT { lineStippleFactor = lineStippleFactor_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineRasterizationLineStateCreateInfo & setLineStipplePattern( uint16_t lineStipplePattern_ ) VULKAN_HPP_NOEXCEPT { lineStipplePattern = lineStipplePattern_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPipelineRasterizationLineStateCreateInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPipelineRasterizationLineStateCreateInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, lineRasterizationMode, stippledLineEnable, lineStippleFactor, lineStipplePattern ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PipelineRasterizationLineStateCreateInfo const & ) const = default; #else bool operator==( PipelineRasterizationLineStateCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( lineRasterizationMode == rhs.lineRasterizationMode ) && ( stippledLineEnable == rhs.stippledLineEnable ) && ( lineStippleFactor == rhs.lineStippleFactor ) && ( lineStipplePattern == rhs.lineStipplePattern ); # endif } bool operator!=( PipelineRasterizationLineStateCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineRasterizationLineStateCreateInfo; const void * pNext = {}; VULKAN_HPP_NAMESPACE::LineRasterizationMode lineRasterizationMode = VULKAN_HPP_NAMESPACE::LineRasterizationMode::eDefault; VULKAN_HPP_NAMESPACE::Bool32 stippledLineEnable = {}; uint32_t lineStippleFactor = {}; uint16_t lineStipplePattern = {}; }; template <> struct CppType { using Type = PipelineRasterizationLineStateCreateInfo; }; using PipelineRasterizationLineStateCreateInfoEXT = PipelineRasterizationLineStateCreateInfo; using PipelineRasterizationLineStateCreateInfoKHR = PipelineRasterizationLineStateCreateInfo; struct PipelineRasterizationProvokingVertexStateCreateInfoEXT { using NativeType = VkPipelineRasterizationProvokingVertexStateCreateInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineRasterizationProvokingVertexStateCreateInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PipelineRasterizationProvokingVertexStateCreateInfoEXT( VULKAN_HPP_NAMESPACE::ProvokingVertexModeEXT provokingVertexMode_ = VULKAN_HPP_NAMESPACE::ProvokingVertexModeEXT::eFirstVertex, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , provokingVertexMode{ provokingVertexMode_ } { } VULKAN_HPP_CONSTEXPR PipelineRasterizationProvokingVertexStateCreateInfoEXT( PipelineRasterizationProvokingVertexStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PipelineRasterizationProvokingVertexStateCreateInfoEXT( VkPipelineRasterizationProvokingVertexStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PipelineRasterizationProvokingVertexStateCreateInfoEXT( *reinterpret_cast( &rhs ) ) { } PipelineRasterizationProvokingVertexStateCreateInfoEXT & operator=( PipelineRasterizationProvokingVertexStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PipelineRasterizationProvokingVertexStateCreateInfoEXT & operator=( VkPipelineRasterizationProvokingVertexStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PipelineRasterizationProvokingVertexStateCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineRasterizationProvokingVertexStateCreateInfoEXT & setProvokingVertexMode( VULKAN_HPP_NAMESPACE::ProvokingVertexModeEXT provokingVertexMode_ ) VULKAN_HPP_NOEXCEPT { provokingVertexMode = provokingVertexMode_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPipelineRasterizationProvokingVertexStateCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPipelineRasterizationProvokingVertexStateCreateInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, provokingVertexMode ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PipelineRasterizationProvokingVertexStateCreateInfoEXT const & ) const = default; #else bool operator==( PipelineRasterizationProvokingVertexStateCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( provokingVertexMode == rhs.provokingVertexMode ); # endif } bool operator!=( PipelineRasterizationProvokingVertexStateCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineRasterizationProvokingVertexStateCreateInfoEXT; const void * pNext = {}; VULKAN_HPP_NAMESPACE::ProvokingVertexModeEXT provokingVertexMode = VULKAN_HPP_NAMESPACE::ProvokingVertexModeEXT::eFirstVertex; }; template <> struct CppType { using Type = PipelineRasterizationProvokingVertexStateCreateInfoEXT; }; struct PipelineRasterizationStateRasterizationOrderAMD { using NativeType = VkPipelineRasterizationStateRasterizationOrderAMD; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineRasterizationStateRasterizationOrderAMD; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PipelineRasterizationStateRasterizationOrderAMD( VULKAN_HPP_NAMESPACE::RasterizationOrderAMD rasterizationOrder_ = VULKAN_HPP_NAMESPACE::RasterizationOrderAMD::eStrict, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , rasterizationOrder{ rasterizationOrder_ } { } VULKAN_HPP_CONSTEXPR PipelineRasterizationStateRasterizationOrderAMD( PipelineRasterizationStateRasterizationOrderAMD const & rhs ) VULKAN_HPP_NOEXCEPT = default; PipelineRasterizationStateRasterizationOrderAMD( VkPipelineRasterizationStateRasterizationOrderAMD const & rhs ) VULKAN_HPP_NOEXCEPT : PipelineRasterizationStateRasterizationOrderAMD( *reinterpret_cast( &rhs ) ) { } PipelineRasterizationStateRasterizationOrderAMD & operator=( PipelineRasterizationStateRasterizationOrderAMD const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PipelineRasterizationStateRasterizationOrderAMD & operator=( VkPipelineRasterizationStateRasterizationOrderAMD const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PipelineRasterizationStateRasterizationOrderAMD & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineRasterizationStateRasterizationOrderAMD & setRasterizationOrder( VULKAN_HPP_NAMESPACE::RasterizationOrderAMD rasterizationOrder_ ) VULKAN_HPP_NOEXCEPT { rasterizationOrder = rasterizationOrder_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPipelineRasterizationStateRasterizationOrderAMD const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPipelineRasterizationStateRasterizationOrderAMD &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, rasterizationOrder ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PipelineRasterizationStateRasterizationOrderAMD const & ) const = default; #else bool operator==( PipelineRasterizationStateRasterizationOrderAMD const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( rasterizationOrder == rhs.rasterizationOrder ); # endif } bool operator!=( PipelineRasterizationStateRasterizationOrderAMD const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineRasterizationStateRasterizationOrderAMD; const void * pNext = {}; VULKAN_HPP_NAMESPACE::RasterizationOrderAMD rasterizationOrder = VULKAN_HPP_NAMESPACE::RasterizationOrderAMD::eStrict; }; template <> struct CppType { using Type = PipelineRasterizationStateRasterizationOrderAMD; }; struct PipelineRasterizationStateStreamCreateInfoEXT { using NativeType = VkPipelineRasterizationStateStreamCreateInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineRasterizationStateStreamCreateInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PipelineRasterizationStateStreamCreateInfoEXT( VULKAN_HPP_NAMESPACE::PipelineRasterizationStateStreamCreateFlagsEXT flags_ = {}, uint32_t rasterizationStream_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , rasterizationStream{ rasterizationStream_ } { } VULKAN_HPP_CONSTEXPR PipelineRasterizationStateStreamCreateInfoEXT( PipelineRasterizationStateStreamCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PipelineRasterizationStateStreamCreateInfoEXT( VkPipelineRasterizationStateStreamCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PipelineRasterizationStateStreamCreateInfoEXT( *reinterpret_cast( &rhs ) ) { } PipelineRasterizationStateStreamCreateInfoEXT & operator=( PipelineRasterizationStateStreamCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PipelineRasterizationStateStreamCreateInfoEXT & operator=( VkPipelineRasterizationStateStreamCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PipelineRasterizationStateStreamCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineRasterizationStateStreamCreateInfoEXT & setFlags( VULKAN_HPP_NAMESPACE::PipelineRasterizationStateStreamCreateFlagsEXT flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineRasterizationStateStreamCreateInfoEXT & setRasterizationStream( uint32_t rasterizationStream_ ) VULKAN_HPP_NOEXCEPT { rasterizationStream = rasterizationStream_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPipelineRasterizationStateStreamCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPipelineRasterizationStateStreamCreateInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, rasterizationStream ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PipelineRasterizationStateStreamCreateInfoEXT const & ) const = default; #else bool operator==( PipelineRasterizationStateStreamCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( rasterizationStream == rhs.rasterizationStream ); # endif } bool operator!=( PipelineRasterizationStateStreamCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineRasterizationStateStreamCreateInfoEXT; const void * pNext = {}; VULKAN_HPP_NAMESPACE::PipelineRasterizationStateStreamCreateFlagsEXT flags = {}; uint32_t rasterizationStream = {}; }; template <> struct CppType { using Type = PipelineRasterizationStateStreamCreateInfoEXT; }; struct PipelineRenderingCreateInfo { using NativeType = VkPipelineRenderingCreateInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineRenderingCreateInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PipelineRenderingCreateInfo( uint32_t viewMask_ = {}, uint32_t colorAttachmentCount_ = {}, const VULKAN_HPP_NAMESPACE::Format * pColorAttachmentFormats_ = {}, VULKAN_HPP_NAMESPACE::Format depthAttachmentFormat_ = VULKAN_HPP_NAMESPACE::Format::eUndefined, VULKAN_HPP_NAMESPACE::Format stencilAttachmentFormat_ = VULKAN_HPP_NAMESPACE::Format::eUndefined, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , viewMask{ viewMask_ } , colorAttachmentCount{ colorAttachmentCount_ } , pColorAttachmentFormats{ pColorAttachmentFormats_ } , depthAttachmentFormat{ depthAttachmentFormat_ } , stencilAttachmentFormat{ stencilAttachmentFormat_ } { } VULKAN_HPP_CONSTEXPR PipelineRenderingCreateInfo( PipelineRenderingCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; PipelineRenderingCreateInfo( VkPipelineRenderingCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT : PipelineRenderingCreateInfo( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) PipelineRenderingCreateInfo( uint32_t viewMask_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & colorAttachmentFormats_, VULKAN_HPP_NAMESPACE::Format depthAttachmentFormat_ = VULKAN_HPP_NAMESPACE::Format::eUndefined, VULKAN_HPP_NAMESPACE::Format stencilAttachmentFormat_ = VULKAN_HPP_NAMESPACE::Format::eUndefined, const void * pNext_ = nullptr ) : pNext( pNext_ ) , viewMask( viewMask_ ) , colorAttachmentCount( static_cast( colorAttachmentFormats_.size() ) ) , pColorAttachmentFormats( colorAttachmentFormats_.data() ) , depthAttachmentFormat( depthAttachmentFormat_ ) , stencilAttachmentFormat( stencilAttachmentFormat_ ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ PipelineRenderingCreateInfo & operator=( PipelineRenderingCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PipelineRenderingCreateInfo & operator=( VkPipelineRenderingCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PipelineRenderingCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineRenderingCreateInfo & setViewMask( uint32_t viewMask_ ) VULKAN_HPP_NOEXCEPT { viewMask = viewMask_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineRenderingCreateInfo & setColorAttachmentCount( uint32_t colorAttachmentCount_ ) VULKAN_HPP_NOEXCEPT { colorAttachmentCount = colorAttachmentCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineRenderingCreateInfo & setPColorAttachmentFormats( const VULKAN_HPP_NAMESPACE::Format * pColorAttachmentFormats_ ) VULKAN_HPP_NOEXCEPT { pColorAttachmentFormats = pColorAttachmentFormats_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) PipelineRenderingCreateInfo & setColorAttachmentFormats( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & colorAttachmentFormats_ ) VULKAN_HPP_NOEXCEPT { colorAttachmentCount = static_cast( colorAttachmentFormats_.size() ); pColorAttachmentFormats = colorAttachmentFormats_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 PipelineRenderingCreateInfo & setDepthAttachmentFormat( VULKAN_HPP_NAMESPACE::Format depthAttachmentFormat_ ) VULKAN_HPP_NOEXCEPT { depthAttachmentFormat = depthAttachmentFormat_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineRenderingCreateInfo & setStencilAttachmentFormat( VULKAN_HPP_NAMESPACE::Format stencilAttachmentFormat_ ) VULKAN_HPP_NOEXCEPT { stencilAttachmentFormat = stencilAttachmentFormat_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPipelineRenderingCreateInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPipelineRenderingCreateInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, viewMask, colorAttachmentCount, pColorAttachmentFormats, depthAttachmentFormat, stencilAttachmentFormat ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PipelineRenderingCreateInfo const & ) const = default; #else bool operator==( PipelineRenderingCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( viewMask == rhs.viewMask ) && ( colorAttachmentCount == rhs.colorAttachmentCount ) && ( pColorAttachmentFormats == rhs.pColorAttachmentFormats ) && ( depthAttachmentFormat == rhs.depthAttachmentFormat ) && ( stencilAttachmentFormat == rhs.stencilAttachmentFormat ); # endif } bool operator!=( PipelineRenderingCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineRenderingCreateInfo; const void * pNext = {}; uint32_t viewMask = {}; uint32_t colorAttachmentCount = {}; const VULKAN_HPP_NAMESPACE::Format * pColorAttachmentFormats = {}; VULKAN_HPP_NAMESPACE::Format depthAttachmentFormat = VULKAN_HPP_NAMESPACE::Format::eUndefined; VULKAN_HPP_NAMESPACE::Format stencilAttachmentFormat = VULKAN_HPP_NAMESPACE::Format::eUndefined; }; template <> struct CppType { using Type = PipelineRenderingCreateInfo; }; using PipelineRenderingCreateInfoKHR = PipelineRenderingCreateInfo; struct PipelineRepresentativeFragmentTestStateCreateInfoNV { using NativeType = VkPipelineRepresentativeFragmentTestStateCreateInfoNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineRepresentativeFragmentTestStateCreateInfoNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PipelineRepresentativeFragmentTestStateCreateInfoNV( VULKAN_HPP_NAMESPACE::Bool32 representativeFragmentTestEnable_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , representativeFragmentTestEnable{ representativeFragmentTestEnable_ } { } VULKAN_HPP_CONSTEXPR PipelineRepresentativeFragmentTestStateCreateInfoNV( PipelineRepresentativeFragmentTestStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; PipelineRepresentativeFragmentTestStateCreateInfoNV( VkPipelineRepresentativeFragmentTestStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT : PipelineRepresentativeFragmentTestStateCreateInfoNV( *reinterpret_cast( &rhs ) ) { } PipelineRepresentativeFragmentTestStateCreateInfoNV & operator=( PipelineRepresentativeFragmentTestStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PipelineRepresentativeFragmentTestStateCreateInfoNV & operator=( VkPipelineRepresentativeFragmentTestStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PipelineRepresentativeFragmentTestStateCreateInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineRepresentativeFragmentTestStateCreateInfoNV & setRepresentativeFragmentTestEnable( VULKAN_HPP_NAMESPACE::Bool32 representativeFragmentTestEnable_ ) VULKAN_HPP_NOEXCEPT { representativeFragmentTestEnable = representativeFragmentTestEnable_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPipelineRepresentativeFragmentTestStateCreateInfoNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPipelineRepresentativeFragmentTestStateCreateInfoNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, representativeFragmentTestEnable ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PipelineRepresentativeFragmentTestStateCreateInfoNV const & ) const = default; #else bool operator==( PipelineRepresentativeFragmentTestStateCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( representativeFragmentTestEnable == rhs.representativeFragmentTestEnable ); # endif } bool operator!=( PipelineRepresentativeFragmentTestStateCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineRepresentativeFragmentTestStateCreateInfoNV; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 representativeFragmentTestEnable = {}; }; template <> struct CppType { using Type = PipelineRepresentativeFragmentTestStateCreateInfoNV; }; struct PipelineRobustnessCreateInfo { using NativeType = VkPipelineRobustnessCreateInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineRobustnessCreateInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PipelineRobustnessCreateInfo( VULKAN_HPP_NAMESPACE::PipelineRobustnessBufferBehavior storageBuffers_ = VULKAN_HPP_NAMESPACE::PipelineRobustnessBufferBehavior::eDeviceDefault, VULKAN_HPP_NAMESPACE::PipelineRobustnessBufferBehavior uniformBuffers_ = VULKAN_HPP_NAMESPACE::PipelineRobustnessBufferBehavior::eDeviceDefault, VULKAN_HPP_NAMESPACE::PipelineRobustnessBufferBehavior vertexInputs_ = VULKAN_HPP_NAMESPACE::PipelineRobustnessBufferBehavior::eDeviceDefault, VULKAN_HPP_NAMESPACE::PipelineRobustnessImageBehavior images_ = VULKAN_HPP_NAMESPACE::PipelineRobustnessImageBehavior::eDeviceDefault, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , storageBuffers{ storageBuffers_ } , uniformBuffers{ uniformBuffers_ } , vertexInputs{ vertexInputs_ } , images{ images_ } { } VULKAN_HPP_CONSTEXPR PipelineRobustnessCreateInfo( PipelineRobustnessCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; PipelineRobustnessCreateInfo( VkPipelineRobustnessCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT : PipelineRobustnessCreateInfo( *reinterpret_cast( &rhs ) ) { } PipelineRobustnessCreateInfo & operator=( PipelineRobustnessCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PipelineRobustnessCreateInfo & operator=( VkPipelineRobustnessCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PipelineRobustnessCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineRobustnessCreateInfo & setStorageBuffers( VULKAN_HPP_NAMESPACE::PipelineRobustnessBufferBehavior storageBuffers_ ) VULKAN_HPP_NOEXCEPT { storageBuffers = storageBuffers_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineRobustnessCreateInfo & setUniformBuffers( VULKAN_HPP_NAMESPACE::PipelineRobustnessBufferBehavior uniformBuffers_ ) VULKAN_HPP_NOEXCEPT { uniformBuffers = uniformBuffers_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineRobustnessCreateInfo & setVertexInputs( VULKAN_HPP_NAMESPACE::PipelineRobustnessBufferBehavior vertexInputs_ ) VULKAN_HPP_NOEXCEPT { vertexInputs = vertexInputs_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineRobustnessCreateInfo & setImages( VULKAN_HPP_NAMESPACE::PipelineRobustnessImageBehavior images_ ) VULKAN_HPP_NOEXCEPT { images = images_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPipelineRobustnessCreateInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPipelineRobustnessCreateInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, storageBuffers, uniformBuffers, vertexInputs, images ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PipelineRobustnessCreateInfo const & ) const = default; #else bool operator==( PipelineRobustnessCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( storageBuffers == rhs.storageBuffers ) && ( uniformBuffers == rhs.uniformBuffers ) && ( vertexInputs == rhs.vertexInputs ) && ( images == rhs.images ); # endif } bool operator!=( PipelineRobustnessCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineRobustnessCreateInfo; const void * pNext = {}; VULKAN_HPP_NAMESPACE::PipelineRobustnessBufferBehavior storageBuffers = VULKAN_HPP_NAMESPACE::PipelineRobustnessBufferBehavior::eDeviceDefault; VULKAN_HPP_NAMESPACE::PipelineRobustnessBufferBehavior uniformBuffers = VULKAN_HPP_NAMESPACE::PipelineRobustnessBufferBehavior::eDeviceDefault; VULKAN_HPP_NAMESPACE::PipelineRobustnessBufferBehavior vertexInputs = VULKAN_HPP_NAMESPACE::PipelineRobustnessBufferBehavior::eDeviceDefault; VULKAN_HPP_NAMESPACE::PipelineRobustnessImageBehavior images = VULKAN_HPP_NAMESPACE::PipelineRobustnessImageBehavior::eDeviceDefault; }; template <> struct CppType { using Type = PipelineRobustnessCreateInfo; }; using PipelineRobustnessCreateInfoEXT = PipelineRobustnessCreateInfo; struct PipelineSampleLocationsStateCreateInfoEXT { using NativeType = VkPipelineSampleLocationsStateCreateInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineSampleLocationsStateCreateInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PipelineSampleLocationsStateCreateInfoEXT( VULKAN_HPP_NAMESPACE::Bool32 sampleLocationsEnable_ = {}, VULKAN_HPP_NAMESPACE::SampleLocationsInfoEXT sampleLocationsInfo_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , sampleLocationsEnable{ sampleLocationsEnable_ } , sampleLocationsInfo{ sampleLocationsInfo_ } { } VULKAN_HPP_CONSTEXPR PipelineSampleLocationsStateCreateInfoEXT( PipelineSampleLocationsStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PipelineSampleLocationsStateCreateInfoEXT( VkPipelineSampleLocationsStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PipelineSampleLocationsStateCreateInfoEXT( *reinterpret_cast( &rhs ) ) { } PipelineSampleLocationsStateCreateInfoEXT & operator=( PipelineSampleLocationsStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PipelineSampleLocationsStateCreateInfoEXT & operator=( VkPipelineSampleLocationsStateCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PipelineSampleLocationsStateCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineSampleLocationsStateCreateInfoEXT & setSampleLocationsEnable( VULKAN_HPP_NAMESPACE::Bool32 sampleLocationsEnable_ ) VULKAN_HPP_NOEXCEPT { sampleLocationsEnable = sampleLocationsEnable_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineSampleLocationsStateCreateInfoEXT & setSampleLocationsInfo( VULKAN_HPP_NAMESPACE::SampleLocationsInfoEXT const & sampleLocationsInfo_ ) VULKAN_HPP_NOEXCEPT { sampleLocationsInfo = sampleLocationsInfo_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPipelineSampleLocationsStateCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPipelineSampleLocationsStateCreateInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, sampleLocationsEnable, sampleLocationsInfo ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PipelineSampleLocationsStateCreateInfoEXT const & ) const = default; #else bool operator==( PipelineSampleLocationsStateCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( sampleLocationsEnable == rhs.sampleLocationsEnable ) && ( sampleLocationsInfo == rhs.sampleLocationsInfo ); # endif } bool operator!=( PipelineSampleLocationsStateCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineSampleLocationsStateCreateInfoEXT; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 sampleLocationsEnable = {}; VULKAN_HPP_NAMESPACE::SampleLocationsInfoEXT sampleLocationsInfo = {}; }; template <> struct CppType { using Type = PipelineSampleLocationsStateCreateInfoEXT; }; struct PipelineShaderStageModuleIdentifierCreateInfoEXT { using NativeType = VkPipelineShaderStageModuleIdentifierCreateInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineShaderStageModuleIdentifierCreateInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PipelineShaderStageModuleIdentifierCreateInfoEXT( uint32_t identifierSize_ = {}, const uint8_t * pIdentifier_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , identifierSize{ identifierSize_ } , pIdentifier{ pIdentifier_ } { } VULKAN_HPP_CONSTEXPR PipelineShaderStageModuleIdentifierCreateInfoEXT( PipelineShaderStageModuleIdentifierCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PipelineShaderStageModuleIdentifierCreateInfoEXT( VkPipelineShaderStageModuleIdentifierCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PipelineShaderStageModuleIdentifierCreateInfoEXT( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) PipelineShaderStageModuleIdentifierCreateInfoEXT( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & identifier_, const void * pNext_ = nullptr ) : pNext( pNext_ ), identifierSize( static_cast( identifier_.size() ) ), pIdentifier( identifier_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ PipelineShaderStageModuleIdentifierCreateInfoEXT & operator=( PipelineShaderStageModuleIdentifierCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PipelineShaderStageModuleIdentifierCreateInfoEXT & operator=( VkPipelineShaderStageModuleIdentifierCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PipelineShaderStageModuleIdentifierCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineShaderStageModuleIdentifierCreateInfoEXT & setIdentifierSize( uint32_t identifierSize_ ) VULKAN_HPP_NOEXCEPT { identifierSize = identifierSize_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineShaderStageModuleIdentifierCreateInfoEXT & setPIdentifier( const uint8_t * pIdentifier_ ) VULKAN_HPP_NOEXCEPT { pIdentifier = pIdentifier_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) PipelineShaderStageModuleIdentifierCreateInfoEXT & setIdentifier( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & identifier_ ) VULKAN_HPP_NOEXCEPT { identifierSize = static_cast( identifier_.size() ); pIdentifier = identifier_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPipelineShaderStageModuleIdentifierCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPipelineShaderStageModuleIdentifierCreateInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, identifierSize, pIdentifier ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PipelineShaderStageModuleIdentifierCreateInfoEXT const & ) const = default; #else bool operator==( PipelineShaderStageModuleIdentifierCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( identifierSize == rhs.identifierSize ) && ( pIdentifier == rhs.pIdentifier ); # endif } bool operator!=( PipelineShaderStageModuleIdentifierCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineShaderStageModuleIdentifierCreateInfoEXT; const void * pNext = {}; uint32_t identifierSize = {}; const uint8_t * pIdentifier = {}; }; template <> struct CppType { using Type = PipelineShaderStageModuleIdentifierCreateInfoEXT; }; #if defined( VK_ENABLE_BETA_EXTENSIONS ) struct PipelineShaderStageNodeCreateInfoAMDX { using NativeType = VkPipelineShaderStageNodeCreateInfoAMDX; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineShaderStageNodeCreateInfoAMDX; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PipelineShaderStageNodeCreateInfoAMDX( const char * pName_ = {}, uint32_t index_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , pName{ pName_ } , index{ index_ } { } VULKAN_HPP_CONSTEXPR PipelineShaderStageNodeCreateInfoAMDX( PipelineShaderStageNodeCreateInfoAMDX const & rhs ) VULKAN_HPP_NOEXCEPT = default; PipelineShaderStageNodeCreateInfoAMDX( VkPipelineShaderStageNodeCreateInfoAMDX const & rhs ) VULKAN_HPP_NOEXCEPT : PipelineShaderStageNodeCreateInfoAMDX( *reinterpret_cast( &rhs ) ) { } PipelineShaderStageNodeCreateInfoAMDX & operator=( PipelineShaderStageNodeCreateInfoAMDX const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PipelineShaderStageNodeCreateInfoAMDX & operator=( VkPipelineShaderStageNodeCreateInfoAMDX const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } # if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PipelineShaderStageNodeCreateInfoAMDX & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineShaderStageNodeCreateInfoAMDX & setPName( const char * pName_ ) VULKAN_HPP_NOEXCEPT { pName = pName_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineShaderStageNodeCreateInfoAMDX & setIndex( uint32_t index_ ) VULKAN_HPP_NOEXCEPT { index = index_; return *this; } # endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPipelineShaderStageNodeCreateInfoAMDX const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPipelineShaderStageNodeCreateInfoAMDX &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, pName, index ); } # endif # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) std::strong_ordering operator<=>( PipelineShaderStageNodeCreateInfoAMDX const & rhs ) const VULKAN_HPP_NOEXCEPT { if ( auto cmp = sType <=> rhs.sType; cmp != 0 ) return cmp; if ( auto cmp = pNext <=> rhs.pNext; cmp != 0 ) return cmp; if ( pName != rhs.pName ) if ( auto cmp = strcmp( pName, rhs.pName ); cmp != 0 ) return ( cmp < 0 ) ? std::strong_ordering::less : std::strong_ordering::greater; if ( auto cmp = index <=> rhs.index; cmp != 0 ) return cmp; return std::strong_ordering::equivalent; } # endif bool operator==( PipelineShaderStageNodeCreateInfoAMDX const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( ( pName == rhs.pName ) || ( strcmp( pName, rhs.pName ) == 0 ) ) && ( index == rhs.index ); } bool operator!=( PipelineShaderStageNodeCreateInfoAMDX const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineShaderStageNodeCreateInfoAMDX; const void * pNext = {}; const char * pName = {}; uint32_t index = {}; }; template <> struct CppType { using Type = PipelineShaderStageNodeCreateInfoAMDX; }; #endif /*VK_ENABLE_BETA_EXTENSIONS*/ struct PipelineShaderStageRequiredSubgroupSizeCreateInfo { using NativeType = VkPipelineShaderStageRequiredSubgroupSizeCreateInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineShaderStageRequiredSubgroupSizeCreateInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PipelineShaderStageRequiredSubgroupSizeCreateInfo( uint32_t requiredSubgroupSize_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , requiredSubgroupSize{ requiredSubgroupSize_ } { } VULKAN_HPP_CONSTEXPR PipelineShaderStageRequiredSubgroupSizeCreateInfo( PipelineShaderStageRequiredSubgroupSizeCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; PipelineShaderStageRequiredSubgroupSizeCreateInfo( VkPipelineShaderStageRequiredSubgroupSizeCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT : PipelineShaderStageRequiredSubgroupSizeCreateInfo( *reinterpret_cast( &rhs ) ) { } PipelineShaderStageRequiredSubgroupSizeCreateInfo & operator=( PipelineShaderStageRequiredSubgroupSizeCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PipelineShaderStageRequiredSubgroupSizeCreateInfo & operator=( VkPipelineShaderStageRequiredSubgroupSizeCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkPipelineShaderStageRequiredSubgroupSizeCreateInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPipelineShaderStageRequiredSubgroupSizeCreateInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, requiredSubgroupSize ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PipelineShaderStageRequiredSubgroupSizeCreateInfo const & ) const = default; #else bool operator==( PipelineShaderStageRequiredSubgroupSizeCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( requiredSubgroupSize == rhs.requiredSubgroupSize ); # endif } bool operator!=( PipelineShaderStageRequiredSubgroupSizeCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineShaderStageRequiredSubgroupSizeCreateInfo; void * pNext = {}; uint32_t requiredSubgroupSize = {}; }; template <> struct CppType { using Type = PipelineShaderStageRequiredSubgroupSizeCreateInfo; }; using PipelineShaderStageRequiredSubgroupSizeCreateInfoEXT = PipelineShaderStageRequiredSubgroupSizeCreateInfo; using ShaderRequiredSubgroupSizeCreateInfoEXT = PipelineShaderStageRequiredSubgroupSizeCreateInfo; struct PipelineTessellationDomainOriginStateCreateInfo { using NativeType = VkPipelineTessellationDomainOriginStateCreateInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineTessellationDomainOriginStateCreateInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PipelineTessellationDomainOriginStateCreateInfo( VULKAN_HPP_NAMESPACE::TessellationDomainOrigin domainOrigin_ = VULKAN_HPP_NAMESPACE::TessellationDomainOrigin::eUpperLeft, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , domainOrigin{ domainOrigin_ } { } VULKAN_HPP_CONSTEXPR PipelineTessellationDomainOriginStateCreateInfo( PipelineTessellationDomainOriginStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; PipelineTessellationDomainOriginStateCreateInfo( VkPipelineTessellationDomainOriginStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT : PipelineTessellationDomainOriginStateCreateInfo( *reinterpret_cast( &rhs ) ) { } PipelineTessellationDomainOriginStateCreateInfo & operator=( PipelineTessellationDomainOriginStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PipelineTessellationDomainOriginStateCreateInfo & operator=( VkPipelineTessellationDomainOriginStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PipelineTessellationDomainOriginStateCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineTessellationDomainOriginStateCreateInfo & setDomainOrigin( VULKAN_HPP_NAMESPACE::TessellationDomainOrigin domainOrigin_ ) VULKAN_HPP_NOEXCEPT { domainOrigin = domainOrigin_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPipelineTessellationDomainOriginStateCreateInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPipelineTessellationDomainOriginStateCreateInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, domainOrigin ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PipelineTessellationDomainOriginStateCreateInfo const & ) const = default; #else bool operator==( PipelineTessellationDomainOriginStateCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( domainOrigin == rhs.domainOrigin ); # endif } bool operator!=( PipelineTessellationDomainOriginStateCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineTessellationDomainOriginStateCreateInfo; const void * pNext = {}; VULKAN_HPP_NAMESPACE::TessellationDomainOrigin domainOrigin = VULKAN_HPP_NAMESPACE::TessellationDomainOrigin::eUpperLeft; }; template <> struct CppType { using Type = PipelineTessellationDomainOriginStateCreateInfo; }; using PipelineTessellationDomainOriginStateCreateInfoKHR = PipelineTessellationDomainOriginStateCreateInfo; struct VertexInputBindingDivisorDescription { using NativeType = VkVertexInputBindingDivisorDescription; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VertexInputBindingDivisorDescription( uint32_t binding_ = {}, uint32_t divisor_ = {} ) VULKAN_HPP_NOEXCEPT : binding{ binding_ } , divisor{ divisor_ } { } VULKAN_HPP_CONSTEXPR VertexInputBindingDivisorDescription( VertexInputBindingDivisorDescription const & rhs ) VULKAN_HPP_NOEXCEPT = default; VertexInputBindingDivisorDescription( VkVertexInputBindingDivisorDescription const & rhs ) VULKAN_HPP_NOEXCEPT : VertexInputBindingDivisorDescription( *reinterpret_cast( &rhs ) ) { } VertexInputBindingDivisorDescription & operator=( VertexInputBindingDivisorDescription const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VertexInputBindingDivisorDescription & operator=( VkVertexInputBindingDivisorDescription const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 VertexInputBindingDivisorDescription & setBinding( uint32_t binding_ ) VULKAN_HPP_NOEXCEPT { binding = binding_; return *this; } VULKAN_HPP_CONSTEXPR_14 VertexInputBindingDivisorDescription & setDivisor( uint32_t divisor_ ) VULKAN_HPP_NOEXCEPT { divisor = divisor_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkVertexInputBindingDivisorDescription const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVertexInputBindingDivisorDescription &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( binding, divisor ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( VertexInputBindingDivisorDescription const & ) const = default; #else bool operator==( VertexInputBindingDivisorDescription const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( binding == rhs.binding ) && ( divisor == rhs.divisor ); # endif } bool operator!=( VertexInputBindingDivisorDescription const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: uint32_t binding = {}; uint32_t divisor = {}; }; using VertexInputBindingDivisorDescriptionEXT = VertexInputBindingDivisorDescription; using VertexInputBindingDivisorDescriptionKHR = VertexInputBindingDivisorDescription; struct PipelineVertexInputDivisorStateCreateInfo { using NativeType = VkPipelineVertexInputDivisorStateCreateInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineVertexInputDivisorStateCreateInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PipelineVertexInputDivisorStateCreateInfo( uint32_t vertexBindingDivisorCount_ = {}, const VULKAN_HPP_NAMESPACE::VertexInputBindingDivisorDescription * pVertexBindingDivisors_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , vertexBindingDivisorCount{ vertexBindingDivisorCount_ } , pVertexBindingDivisors{ pVertexBindingDivisors_ } { } VULKAN_HPP_CONSTEXPR PipelineVertexInputDivisorStateCreateInfo( PipelineVertexInputDivisorStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; PipelineVertexInputDivisorStateCreateInfo( VkPipelineVertexInputDivisorStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT : PipelineVertexInputDivisorStateCreateInfo( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) PipelineVertexInputDivisorStateCreateInfo( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & vertexBindingDivisors_, const void * pNext_ = nullptr ) : pNext( pNext_ ) , vertexBindingDivisorCount( static_cast( vertexBindingDivisors_.size() ) ) , pVertexBindingDivisors( vertexBindingDivisors_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ PipelineVertexInputDivisorStateCreateInfo & operator=( PipelineVertexInputDivisorStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PipelineVertexInputDivisorStateCreateInfo & operator=( VkPipelineVertexInputDivisorStateCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PipelineVertexInputDivisorStateCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineVertexInputDivisorStateCreateInfo & setVertexBindingDivisorCount( uint32_t vertexBindingDivisorCount_ ) VULKAN_HPP_NOEXCEPT { vertexBindingDivisorCount = vertexBindingDivisorCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineVertexInputDivisorStateCreateInfo & setPVertexBindingDivisors( const VULKAN_HPP_NAMESPACE::VertexInputBindingDivisorDescription * pVertexBindingDivisors_ ) VULKAN_HPP_NOEXCEPT { pVertexBindingDivisors = pVertexBindingDivisors_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) PipelineVertexInputDivisorStateCreateInfo & setVertexBindingDivisors( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & vertexBindingDivisors_ ) VULKAN_HPP_NOEXCEPT { vertexBindingDivisorCount = static_cast( vertexBindingDivisors_.size() ); pVertexBindingDivisors = vertexBindingDivisors_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPipelineVertexInputDivisorStateCreateInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPipelineVertexInputDivisorStateCreateInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, vertexBindingDivisorCount, pVertexBindingDivisors ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PipelineVertexInputDivisorStateCreateInfo const & ) const = default; #else bool operator==( PipelineVertexInputDivisorStateCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( vertexBindingDivisorCount == rhs.vertexBindingDivisorCount ) && ( pVertexBindingDivisors == rhs.pVertexBindingDivisors ); # endif } bool operator!=( PipelineVertexInputDivisorStateCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineVertexInputDivisorStateCreateInfo; const void * pNext = {}; uint32_t vertexBindingDivisorCount = {}; const VULKAN_HPP_NAMESPACE::VertexInputBindingDivisorDescription * pVertexBindingDivisors = {}; }; template <> struct CppType { using Type = PipelineVertexInputDivisorStateCreateInfo; }; using PipelineVertexInputDivisorStateCreateInfoEXT = PipelineVertexInputDivisorStateCreateInfo; using PipelineVertexInputDivisorStateCreateInfoKHR = PipelineVertexInputDivisorStateCreateInfo; struct PipelineViewportCoarseSampleOrderStateCreateInfoNV { using NativeType = VkPipelineViewportCoarseSampleOrderStateCreateInfoNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineViewportCoarseSampleOrderStateCreateInfoNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PipelineViewportCoarseSampleOrderStateCreateInfoNV( VULKAN_HPP_NAMESPACE::CoarseSampleOrderTypeNV sampleOrderType_ = VULKAN_HPP_NAMESPACE::CoarseSampleOrderTypeNV::eDefault, uint32_t customSampleOrderCount_ = {}, const VULKAN_HPP_NAMESPACE::CoarseSampleOrderCustomNV * pCustomSampleOrders_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , sampleOrderType{ sampleOrderType_ } , customSampleOrderCount{ customSampleOrderCount_ } , pCustomSampleOrders{ pCustomSampleOrders_ } { } VULKAN_HPP_CONSTEXPR PipelineViewportCoarseSampleOrderStateCreateInfoNV( PipelineViewportCoarseSampleOrderStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; PipelineViewportCoarseSampleOrderStateCreateInfoNV( VkPipelineViewportCoarseSampleOrderStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT : PipelineViewportCoarseSampleOrderStateCreateInfoNV( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) PipelineViewportCoarseSampleOrderStateCreateInfoNV( VULKAN_HPP_NAMESPACE::CoarseSampleOrderTypeNV sampleOrderType_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & customSampleOrders_, const void * pNext_ = nullptr ) : pNext( pNext_ ) , sampleOrderType( sampleOrderType_ ) , customSampleOrderCount( static_cast( customSampleOrders_.size() ) ) , pCustomSampleOrders( customSampleOrders_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ PipelineViewportCoarseSampleOrderStateCreateInfoNV & operator=( PipelineViewportCoarseSampleOrderStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PipelineViewportCoarseSampleOrderStateCreateInfoNV & operator=( VkPipelineViewportCoarseSampleOrderStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PipelineViewportCoarseSampleOrderStateCreateInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineViewportCoarseSampleOrderStateCreateInfoNV & setSampleOrderType( VULKAN_HPP_NAMESPACE::CoarseSampleOrderTypeNV sampleOrderType_ ) VULKAN_HPP_NOEXCEPT { sampleOrderType = sampleOrderType_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineViewportCoarseSampleOrderStateCreateInfoNV & setCustomSampleOrderCount( uint32_t customSampleOrderCount_ ) VULKAN_HPP_NOEXCEPT { customSampleOrderCount = customSampleOrderCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineViewportCoarseSampleOrderStateCreateInfoNV & setPCustomSampleOrders( const VULKAN_HPP_NAMESPACE::CoarseSampleOrderCustomNV * pCustomSampleOrders_ ) VULKAN_HPP_NOEXCEPT { pCustomSampleOrders = pCustomSampleOrders_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) PipelineViewportCoarseSampleOrderStateCreateInfoNV & setCustomSampleOrders( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & customSampleOrders_ ) VULKAN_HPP_NOEXCEPT { customSampleOrderCount = static_cast( customSampleOrders_.size() ); pCustomSampleOrders = customSampleOrders_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPipelineViewportCoarseSampleOrderStateCreateInfoNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPipelineViewportCoarseSampleOrderStateCreateInfoNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, sampleOrderType, customSampleOrderCount, pCustomSampleOrders ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PipelineViewportCoarseSampleOrderStateCreateInfoNV const & ) const = default; #else bool operator==( PipelineViewportCoarseSampleOrderStateCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( sampleOrderType == rhs.sampleOrderType ) && ( customSampleOrderCount == rhs.customSampleOrderCount ) && ( pCustomSampleOrders == rhs.pCustomSampleOrders ); # endif } bool operator!=( PipelineViewportCoarseSampleOrderStateCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineViewportCoarseSampleOrderStateCreateInfoNV; const void * pNext = {}; VULKAN_HPP_NAMESPACE::CoarseSampleOrderTypeNV sampleOrderType = VULKAN_HPP_NAMESPACE::CoarseSampleOrderTypeNV::eDefault; uint32_t customSampleOrderCount = {}; const VULKAN_HPP_NAMESPACE::CoarseSampleOrderCustomNV * pCustomSampleOrders = {}; }; template <> struct CppType { using Type = PipelineViewportCoarseSampleOrderStateCreateInfoNV; }; struct PipelineViewportDepthClampControlCreateInfoEXT { using NativeType = VkPipelineViewportDepthClampControlCreateInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineViewportDepthClampControlCreateInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PipelineViewportDepthClampControlCreateInfoEXT( VULKAN_HPP_NAMESPACE::DepthClampModeEXT depthClampMode_ = VULKAN_HPP_NAMESPACE::DepthClampModeEXT::eViewportRange, const VULKAN_HPP_NAMESPACE::DepthClampRangeEXT * pDepthClampRange_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , depthClampMode{ depthClampMode_ } , pDepthClampRange{ pDepthClampRange_ } { } VULKAN_HPP_CONSTEXPR PipelineViewportDepthClampControlCreateInfoEXT( PipelineViewportDepthClampControlCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PipelineViewportDepthClampControlCreateInfoEXT( VkPipelineViewportDepthClampControlCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PipelineViewportDepthClampControlCreateInfoEXT( *reinterpret_cast( &rhs ) ) { } PipelineViewportDepthClampControlCreateInfoEXT & operator=( PipelineViewportDepthClampControlCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PipelineViewportDepthClampControlCreateInfoEXT & operator=( VkPipelineViewportDepthClampControlCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PipelineViewportDepthClampControlCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineViewportDepthClampControlCreateInfoEXT & setDepthClampMode( VULKAN_HPP_NAMESPACE::DepthClampModeEXT depthClampMode_ ) VULKAN_HPP_NOEXCEPT { depthClampMode = depthClampMode_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineViewportDepthClampControlCreateInfoEXT & setPDepthClampRange( const VULKAN_HPP_NAMESPACE::DepthClampRangeEXT * pDepthClampRange_ ) VULKAN_HPP_NOEXCEPT { pDepthClampRange = pDepthClampRange_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPipelineViewportDepthClampControlCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPipelineViewportDepthClampControlCreateInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, depthClampMode, pDepthClampRange ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PipelineViewportDepthClampControlCreateInfoEXT const & ) const = default; #else bool operator==( PipelineViewportDepthClampControlCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( depthClampMode == rhs.depthClampMode ) && ( pDepthClampRange == rhs.pDepthClampRange ); # endif } bool operator!=( PipelineViewportDepthClampControlCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineViewportDepthClampControlCreateInfoEXT; const void * pNext = {}; VULKAN_HPP_NAMESPACE::DepthClampModeEXT depthClampMode = VULKAN_HPP_NAMESPACE::DepthClampModeEXT::eViewportRange; const VULKAN_HPP_NAMESPACE::DepthClampRangeEXT * pDepthClampRange = {}; }; template <> struct CppType { using Type = PipelineViewportDepthClampControlCreateInfoEXT; }; struct PipelineViewportDepthClipControlCreateInfoEXT { using NativeType = VkPipelineViewportDepthClipControlCreateInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineViewportDepthClipControlCreateInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PipelineViewportDepthClipControlCreateInfoEXT( VULKAN_HPP_NAMESPACE::Bool32 negativeOneToOne_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , negativeOneToOne{ negativeOneToOne_ } { } VULKAN_HPP_CONSTEXPR PipelineViewportDepthClipControlCreateInfoEXT( PipelineViewportDepthClipControlCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; PipelineViewportDepthClipControlCreateInfoEXT( VkPipelineViewportDepthClipControlCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : PipelineViewportDepthClipControlCreateInfoEXT( *reinterpret_cast( &rhs ) ) { } PipelineViewportDepthClipControlCreateInfoEXT & operator=( PipelineViewportDepthClipControlCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PipelineViewportDepthClipControlCreateInfoEXT & operator=( VkPipelineViewportDepthClipControlCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PipelineViewportDepthClipControlCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineViewportDepthClipControlCreateInfoEXT & setNegativeOneToOne( VULKAN_HPP_NAMESPACE::Bool32 negativeOneToOne_ ) VULKAN_HPP_NOEXCEPT { negativeOneToOne = negativeOneToOne_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPipelineViewportDepthClipControlCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPipelineViewportDepthClipControlCreateInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, negativeOneToOne ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PipelineViewportDepthClipControlCreateInfoEXT const & ) const = default; #else bool operator==( PipelineViewportDepthClipControlCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( negativeOneToOne == rhs.negativeOneToOne ); # endif } bool operator!=( PipelineViewportDepthClipControlCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineViewportDepthClipControlCreateInfoEXT; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 negativeOneToOne = {}; }; template <> struct CppType { using Type = PipelineViewportDepthClipControlCreateInfoEXT; }; struct PipelineViewportExclusiveScissorStateCreateInfoNV { using NativeType = VkPipelineViewportExclusiveScissorStateCreateInfoNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineViewportExclusiveScissorStateCreateInfoNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PipelineViewportExclusiveScissorStateCreateInfoNV( uint32_t exclusiveScissorCount_ = {}, const VULKAN_HPP_NAMESPACE::Rect2D * pExclusiveScissors_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , exclusiveScissorCount{ exclusiveScissorCount_ } , pExclusiveScissors{ pExclusiveScissors_ } { } VULKAN_HPP_CONSTEXPR PipelineViewportExclusiveScissorStateCreateInfoNV( PipelineViewportExclusiveScissorStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; PipelineViewportExclusiveScissorStateCreateInfoNV( VkPipelineViewportExclusiveScissorStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT : PipelineViewportExclusiveScissorStateCreateInfoNV( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) PipelineViewportExclusiveScissorStateCreateInfoNV( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & exclusiveScissors_, const void * pNext_ = nullptr ) : pNext( pNext_ ), exclusiveScissorCount( static_cast( exclusiveScissors_.size() ) ), pExclusiveScissors( exclusiveScissors_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ PipelineViewportExclusiveScissorStateCreateInfoNV & operator=( PipelineViewportExclusiveScissorStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PipelineViewportExclusiveScissorStateCreateInfoNV & operator=( VkPipelineViewportExclusiveScissorStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PipelineViewportExclusiveScissorStateCreateInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineViewportExclusiveScissorStateCreateInfoNV & setExclusiveScissorCount( uint32_t exclusiveScissorCount_ ) VULKAN_HPP_NOEXCEPT { exclusiveScissorCount = exclusiveScissorCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineViewportExclusiveScissorStateCreateInfoNV & setPExclusiveScissors( const VULKAN_HPP_NAMESPACE::Rect2D * pExclusiveScissors_ ) VULKAN_HPP_NOEXCEPT { pExclusiveScissors = pExclusiveScissors_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) PipelineViewportExclusiveScissorStateCreateInfoNV & setExclusiveScissors( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & exclusiveScissors_ ) VULKAN_HPP_NOEXCEPT { exclusiveScissorCount = static_cast( exclusiveScissors_.size() ); pExclusiveScissors = exclusiveScissors_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPipelineViewportExclusiveScissorStateCreateInfoNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPipelineViewportExclusiveScissorStateCreateInfoNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, exclusiveScissorCount, pExclusiveScissors ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PipelineViewportExclusiveScissorStateCreateInfoNV const & ) const = default; #else bool operator==( PipelineViewportExclusiveScissorStateCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( exclusiveScissorCount == rhs.exclusiveScissorCount ) && ( pExclusiveScissors == rhs.pExclusiveScissors ); # endif } bool operator!=( PipelineViewportExclusiveScissorStateCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineViewportExclusiveScissorStateCreateInfoNV; const void * pNext = {}; uint32_t exclusiveScissorCount = {}; const VULKAN_HPP_NAMESPACE::Rect2D * pExclusiveScissors = {}; }; template <> struct CppType { using Type = PipelineViewportExclusiveScissorStateCreateInfoNV; }; struct ShadingRatePaletteNV { using NativeType = VkShadingRatePaletteNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ShadingRatePaletteNV( uint32_t shadingRatePaletteEntryCount_ = {}, const VULKAN_HPP_NAMESPACE::ShadingRatePaletteEntryNV * pShadingRatePaletteEntries_ = {} ) VULKAN_HPP_NOEXCEPT : shadingRatePaletteEntryCount{ shadingRatePaletteEntryCount_ } , pShadingRatePaletteEntries{ pShadingRatePaletteEntries_ } { } VULKAN_HPP_CONSTEXPR ShadingRatePaletteNV( ShadingRatePaletteNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; ShadingRatePaletteNV( VkShadingRatePaletteNV const & rhs ) VULKAN_HPP_NOEXCEPT : ShadingRatePaletteNV( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) ShadingRatePaletteNV( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & shadingRatePaletteEntries_ ) : shadingRatePaletteEntryCount( static_cast( shadingRatePaletteEntries_.size() ) ) , pShadingRatePaletteEntries( shadingRatePaletteEntries_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ ShadingRatePaletteNV & operator=( ShadingRatePaletteNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ShadingRatePaletteNV & operator=( VkShadingRatePaletteNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ShadingRatePaletteNV & setShadingRatePaletteEntryCount( uint32_t shadingRatePaletteEntryCount_ ) VULKAN_HPP_NOEXCEPT { shadingRatePaletteEntryCount = shadingRatePaletteEntryCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 ShadingRatePaletteNV & setPShadingRatePaletteEntries( const VULKAN_HPP_NAMESPACE::ShadingRatePaletteEntryNV * pShadingRatePaletteEntries_ ) VULKAN_HPP_NOEXCEPT { pShadingRatePaletteEntries = pShadingRatePaletteEntries_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) ShadingRatePaletteNV & setShadingRatePaletteEntries( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & shadingRatePaletteEntries_ ) VULKAN_HPP_NOEXCEPT { shadingRatePaletteEntryCount = static_cast( shadingRatePaletteEntries_.size() ); pShadingRatePaletteEntries = shadingRatePaletteEntries_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkShadingRatePaletteNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkShadingRatePaletteNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( shadingRatePaletteEntryCount, pShadingRatePaletteEntries ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ShadingRatePaletteNV const & ) const = default; #else bool operator==( ShadingRatePaletteNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( shadingRatePaletteEntryCount == rhs.shadingRatePaletteEntryCount ) && ( pShadingRatePaletteEntries == rhs.pShadingRatePaletteEntries ); # endif } bool operator!=( ShadingRatePaletteNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: uint32_t shadingRatePaletteEntryCount = {}; const VULKAN_HPP_NAMESPACE::ShadingRatePaletteEntryNV * pShadingRatePaletteEntries = {}; }; struct PipelineViewportShadingRateImageStateCreateInfoNV { using NativeType = VkPipelineViewportShadingRateImageStateCreateInfoNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineViewportShadingRateImageStateCreateInfoNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PipelineViewportShadingRateImageStateCreateInfoNV( VULKAN_HPP_NAMESPACE::Bool32 shadingRateImageEnable_ = {}, uint32_t viewportCount_ = {}, const VULKAN_HPP_NAMESPACE::ShadingRatePaletteNV * pShadingRatePalettes_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , shadingRateImageEnable{ shadingRateImageEnable_ } , viewportCount{ viewportCount_ } , pShadingRatePalettes{ pShadingRatePalettes_ } { } VULKAN_HPP_CONSTEXPR PipelineViewportShadingRateImageStateCreateInfoNV( PipelineViewportShadingRateImageStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; PipelineViewportShadingRateImageStateCreateInfoNV( VkPipelineViewportShadingRateImageStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT : PipelineViewportShadingRateImageStateCreateInfoNV( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) PipelineViewportShadingRateImageStateCreateInfoNV( VULKAN_HPP_NAMESPACE::Bool32 shadingRateImageEnable_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & shadingRatePalettes_, const void * pNext_ = nullptr ) : pNext( pNext_ ) , shadingRateImageEnable( shadingRateImageEnable_ ) , viewportCount( static_cast( shadingRatePalettes_.size() ) ) , pShadingRatePalettes( shadingRatePalettes_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ PipelineViewportShadingRateImageStateCreateInfoNV & operator=( PipelineViewportShadingRateImageStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PipelineViewportShadingRateImageStateCreateInfoNV & operator=( VkPipelineViewportShadingRateImageStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PipelineViewportShadingRateImageStateCreateInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineViewportShadingRateImageStateCreateInfoNV & setShadingRateImageEnable( VULKAN_HPP_NAMESPACE::Bool32 shadingRateImageEnable_ ) VULKAN_HPP_NOEXCEPT { shadingRateImageEnable = shadingRateImageEnable_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineViewportShadingRateImageStateCreateInfoNV & setViewportCount( uint32_t viewportCount_ ) VULKAN_HPP_NOEXCEPT { viewportCount = viewportCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineViewportShadingRateImageStateCreateInfoNV & setPShadingRatePalettes( const VULKAN_HPP_NAMESPACE::ShadingRatePaletteNV * pShadingRatePalettes_ ) VULKAN_HPP_NOEXCEPT { pShadingRatePalettes = pShadingRatePalettes_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) PipelineViewportShadingRateImageStateCreateInfoNV & setShadingRatePalettes( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & shadingRatePalettes_ ) VULKAN_HPP_NOEXCEPT { viewportCount = static_cast( shadingRatePalettes_.size() ); pShadingRatePalettes = shadingRatePalettes_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPipelineViewportShadingRateImageStateCreateInfoNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPipelineViewportShadingRateImageStateCreateInfoNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, shadingRateImageEnable, viewportCount, pShadingRatePalettes ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PipelineViewportShadingRateImageStateCreateInfoNV const & ) const = default; #else bool operator==( PipelineViewportShadingRateImageStateCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( shadingRateImageEnable == rhs.shadingRateImageEnable ) && ( viewportCount == rhs.viewportCount ) && ( pShadingRatePalettes == rhs.pShadingRatePalettes ); # endif } bool operator!=( PipelineViewportShadingRateImageStateCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineViewportShadingRateImageStateCreateInfoNV; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 shadingRateImageEnable = {}; uint32_t viewportCount = {}; const VULKAN_HPP_NAMESPACE::ShadingRatePaletteNV * pShadingRatePalettes = {}; }; template <> struct CppType { using Type = PipelineViewportShadingRateImageStateCreateInfoNV; }; struct ViewportSwizzleNV { using NativeType = VkViewportSwizzleNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ViewportSwizzleNV( VULKAN_HPP_NAMESPACE::ViewportCoordinateSwizzleNV x_ = VULKAN_HPP_NAMESPACE::ViewportCoordinateSwizzleNV::ePositiveX, VULKAN_HPP_NAMESPACE::ViewportCoordinateSwizzleNV y_ = VULKAN_HPP_NAMESPACE::ViewportCoordinateSwizzleNV::ePositiveX, VULKAN_HPP_NAMESPACE::ViewportCoordinateSwizzleNV z_ = VULKAN_HPP_NAMESPACE::ViewportCoordinateSwizzleNV::ePositiveX, VULKAN_HPP_NAMESPACE::ViewportCoordinateSwizzleNV w_ = VULKAN_HPP_NAMESPACE::ViewportCoordinateSwizzleNV::ePositiveX ) VULKAN_HPP_NOEXCEPT : x{ x_ } , y{ y_ } , z{ z_ } , w{ w_ } { } VULKAN_HPP_CONSTEXPR ViewportSwizzleNV( ViewportSwizzleNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; ViewportSwizzleNV( VkViewportSwizzleNV const & rhs ) VULKAN_HPP_NOEXCEPT : ViewportSwizzleNV( *reinterpret_cast( &rhs ) ) {} ViewportSwizzleNV & operator=( ViewportSwizzleNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ViewportSwizzleNV & operator=( VkViewportSwizzleNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ViewportSwizzleNV & setX( VULKAN_HPP_NAMESPACE::ViewportCoordinateSwizzleNV x_ ) VULKAN_HPP_NOEXCEPT { x = x_; return *this; } VULKAN_HPP_CONSTEXPR_14 ViewportSwizzleNV & setY( VULKAN_HPP_NAMESPACE::ViewportCoordinateSwizzleNV y_ ) VULKAN_HPP_NOEXCEPT { y = y_; return *this; } VULKAN_HPP_CONSTEXPR_14 ViewportSwizzleNV & setZ( VULKAN_HPP_NAMESPACE::ViewportCoordinateSwizzleNV z_ ) VULKAN_HPP_NOEXCEPT { z = z_; return *this; } VULKAN_HPP_CONSTEXPR_14 ViewportSwizzleNV & setW( VULKAN_HPP_NAMESPACE::ViewportCoordinateSwizzleNV w_ ) VULKAN_HPP_NOEXCEPT { w = w_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkViewportSwizzleNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkViewportSwizzleNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( x, y, z, w ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ViewportSwizzleNV const & ) const = default; #else bool operator==( ViewportSwizzleNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( x == rhs.x ) && ( y == rhs.y ) && ( z == rhs.z ) && ( w == rhs.w ); # endif } bool operator!=( ViewportSwizzleNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::ViewportCoordinateSwizzleNV x = VULKAN_HPP_NAMESPACE::ViewportCoordinateSwizzleNV::ePositiveX; VULKAN_HPP_NAMESPACE::ViewportCoordinateSwizzleNV y = VULKAN_HPP_NAMESPACE::ViewportCoordinateSwizzleNV::ePositiveX; VULKAN_HPP_NAMESPACE::ViewportCoordinateSwizzleNV z = VULKAN_HPP_NAMESPACE::ViewportCoordinateSwizzleNV::ePositiveX; VULKAN_HPP_NAMESPACE::ViewportCoordinateSwizzleNV w = VULKAN_HPP_NAMESPACE::ViewportCoordinateSwizzleNV::ePositiveX; }; struct PipelineViewportSwizzleStateCreateInfoNV { using NativeType = VkPipelineViewportSwizzleStateCreateInfoNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineViewportSwizzleStateCreateInfoNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PipelineViewportSwizzleStateCreateInfoNV( VULKAN_HPP_NAMESPACE::PipelineViewportSwizzleStateCreateFlagsNV flags_ = {}, uint32_t viewportCount_ = {}, const VULKAN_HPP_NAMESPACE::ViewportSwizzleNV * pViewportSwizzles_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , viewportCount{ viewportCount_ } , pViewportSwizzles{ pViewportSwizzles_ } { } VULKAN_HPP_CONSTEXPR PipelineViewportSwizzleStateCreateInfoNV( PipelineViewportSwizzleStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; PipelineViewportSwizzleStateCreateInfoNV( VkPipelineViewportSwizzleStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT : PipelineViewportSwizzleStateCreateInfoNV( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) PipelineViewportSwizzleStateCreateInfoNV( VULKAN_HPP_NAMESPACE::PipelineViewportSwizzleStateCreateFlagsNV flags_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & viewportSwizzles_, const void * pNext_ = nullptr ) : pNext( pNext_ ), flags( flags_ ), viewportCount( static_cast( viewportSwizzles_.size() ) ), pViewportSwizzles( viewportSwizzles_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ PipelineViewportSwizzleStateCreateInfoNV & operator=( PipelineViewportSwizzleStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PipelineViewportSwizzleStateCreateInfoNV & operator=( VkPipelineViewportSwizzleStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PipelineViewportSwizzleStateCreateInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineViewportSwizzleStateCreateInfoNV & setFlags( VULKAN_HPP_NAMESPACE::PipelineViewportSwizzleStateCreateFlagsNV flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineViewportSwizzleStateCreateInfoNV & setViewportCount( uint32_t viewportCount_ ) VULKAN_HPP_NOEXCEPT { viewportCount = viewportCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineViewportSwizzleStateCreateInfoNV & setPViewportSwizzles( const VULKAN_HPP_NAMESPACE::ViewportSwizzleNV * pViewportSwizzles_ ) VULKAN_HPP_NOEXCEPT { pViewportSwizzles = pViewportSwizzles_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) PipelineViewportSwizzleStateCreateInfoNV & setViewportSwizzles( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & viewportSwizzles_ ) VULKAN_HPP_NOEXCEPT { viewportCount = static_cast( viewportSwizzles_.size() ); pViewportSwizzles = viewportSwizzles_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPipelineViewportSwizzleStateCreateInfoNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPipelineViewportSwizzleStateCreateInfoNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, viewportCount, pViewportSwizzles ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PipelineViewportSwizzleStateCreateInfoNV const & ) const = default; #else bool operator==( PipelineViewportSwizzleStateCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( viewportCount == rhs.viewportCount ) && ( pViewportSwizzles == rhs.pViewportSwizzles ); # endif } bool operator!=( PipelineViewportSwizzleStateCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineViewportSwizzleStateCreateInfoNV; const void * pNext = {}; VULKAN_HPP_NAMESPACE::PipelineViewportSwizzleStateCreateFlagsNV flags = {}; uint32_t viewportCount = {}; const VULKAN_HPP_NAMESPACE::ViewportSwizzleNV * pViewportSwizzles = {}; }; template <> struct CppType { using Type = PipelineViewportSwizzleStateCreateInfoNV; }; struct ViewportWScalingNV { using NativeType = VkViewportWScalingNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ViewportWScalingNV( float xcoeff_ = {}, float ycoeff_ = {} ) VULKAN_HPP_NOEXCEPT : xcoeff{ xcoeff_ } , ycoeff{ ycoeff_ } { } VULKAN_HPP_CONSTEXPR ViewportWScalingNV( ViewportWScalingNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; ViewportWScalingNV( VkViewportWScalingNV const & rhs ) VULKAN_HPP_NOEXCEPT : ViewportWScalingNV( *reinterpret_cast( &rhs ) ) {} ViewportWScalingNV & operator=( ViewportWScalingNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ViewportWScalingNV & operator=( VkViewportWScalingNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ViewportWScalingNV & setXcoeff( float xcoeff_ ) VULKAN_HPP_NOEXCEPT { xcoeff = xcoeff_; return *this; } VULKAN_HPP_CONSTEXPR_14 ViewportWScalingNV & setYcoeff( float ycoeff_ ) VULKAN_HPP_NOEXCEPT { ycoeff = ycoeff_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkViewportWScalingNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkViewportWScalingNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( xcoeff, ycoeff ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ViewportWScalingNV const & ) const = default; #else bool operator==( ViewportWScalingNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( xcoeff == rhs.xcoeff ) && ( ycoeff == rhs.ycoeff ); # endif } bool operator!=( ViewportWScalingNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: float xcoeff = {}; float ycoeff = {}; }; struct PipelineViewportWScalingStateCreateInfoNV { using NativeType = VkPipelineViewportWScalingStateCreateInfoNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePipelineViewportWScalingStateCreateInfoNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PipelineViewportWScalingStateCreateInfoNV( VULKAN_HPP_NAMESPACE::Bool32 viewportWScalingEnable_ = {}, uint32_t viewportCount_ = {}, const VULKAN_HPP_NAMESPACE::ViewportWScalingNV * pViewportWScalings_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , viewportWScalingEnable{ viewportWScalingEnable_ } , viewportCount{ viewportCount_ } , pViewportWScalings{ pViewportWScalings_ } { } VULKAN_HPP_CONSTEXPR PipelineViewportWScalingStateCreateInfoNV( PipelineViewportWScalingStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; PipelineViewportWScalingStateCreateInfoNV( VkPipelineViewportWScalingStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT : PipelineViewportWScalingStateCreateInfoNV( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) PipelineViewportWScalingStateCreateInfoNV( VULKAN_HPP_NAMESPACE::Bool32 viewportWScalingEnable_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & viewportWScalings_, const void * pNext_ = nullptr ) : pNext( pNext_ ) , viewportWScalingEnable( viewportWScalingEnable_ ) , viewportCount( static_cast( viewportWScalings_.size() ) ) , pViewportWScalings( viewportWScalings_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ PipelineViewportWScalingStateCreateInfoNV & operator=( PipelineViewportWScalingStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PipelineViewportWScalingStateCreateInfoNV & operator=( VkPipelineViewportWScalingStateCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PipelineViewportWScalingStateCreateInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineViewportWScalingStateCreateInfoNV & setViewportWScalingEnable( VULKAN_HPP_NAMESPACE::Bool32 viewportWScalingEnable_ ) VULKAN_HPP_NOEXCEPT { viewportWScalingEnable = viewportWScalingEnable_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineViewportWScalingStateCreateInfoNV & setViewportCount( uint32_t viewportCount_ ) VULKAN_HPP_NOEXCEPT { viewportCount = viewportCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 PipelineViewportWScalingStateCreateInfoNV & setPViewportWScalings( const VULKAN_HPP_NAMESPACE::ViewportWScalingNV * pViewportWScalings_ ) VULKAN_HPP_NOEXCEPT { pViewportWScalings = pViewportWScalings_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) PipelineViewportWScalingStateCreateInfoNV & setViewportWScalings( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & viewportWScalings_ ) VULKAN_HPP_NOEXCEPT { viewportCount = static_cast( viewportWScalings_.size() ); pViewportWScalings = viewportWScalings_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPipelineViewportWScalingStateCreateInfoNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPipelineViewportWScalingStateCreateInfoNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, viewportWScalingEnable, viewportCount, pViewportWScalings ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PipelineViewportWScalingStateCreateInfoNV const & ) const = default; #else bool operator==( PipelineViewportWScalingStateCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( viewportWScalingEnable == rhs.viewportWScalingEnable ) && ( viewportCount == rhs.viewportCount ) && ( pViewportWScalings == rhs.pViewportWScalings ); # endif } bool operator!=( PipelineViewportWScalingStateCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePipelineViewportWScalingStateCreateInfoNV; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 viewportWScalingEnable = {}; uint32_t viewportCount = {}; const VULKAN_HPP_NAMESPACE::ViewportWScalingNV * pViewportWScalings = {}; }; template <> struct CppType { using Type = PipelineViewportWScalingStateCreateInfoNV; }; #if defined( VK_USE_PLATFORM_GGP ) struct PresentFrameTokenGGP { using NativeType = VkPresentFrameTokenGGP; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePresentFrameTokenGGP; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PresentFrameTokenGGP( GgpFrameToken frameToken_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , frameToken{ frameToken_ } { } VULKAN_HPP_CONSTEXPR PresentFrameTokenGGP( PresentFrameTokenGGP const & rhs ) VULKAN_HPP_NOEXCEPT = default; PresentFrameTokenGGP( VkPresentFrameTokenGGP const & rhs ) VULKAN_HPP_NOEXCEPT : PresentFrameTokenGGP( *reinterpret_cast( &rhs ) ) { } PresentFrameTokenGGP & operator=( PresentFrameTokenGGP const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PresentFrameTokenGGP & operator=( VkPresentFrameTokenGGP const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } # if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PresentFrameTokenGGP & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PresentFrameTokenGGP & setFrameToken( GgpFrameToken frameToken_ ) VULKAN_HPP_NOEXCEPT { frameToken = frameToken_; return *this; } # endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPresentFrameTokenGGP const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPresentFrameTokenGGP &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, frameToken ); } # endif # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) std::strong_ordering operator<=>( PresentFrameTokenGGP const & rhs ) const VULKAN_HPP_NOEXCEPT { if ( auto cmp = sType <=> rhs.sType; cmp != 0 ) return cmp; if ( auto cmp = pNext <=> rhs.pNext; cmp != 0 ) return cmp; if ( auto cmp = memcmp( &frameToken, &rhs.frameToken, sizeof( GgpFrameToken ) ); cmp != 0 ) return ( cmp < 0 ) ? std::strong_ordering::less : std::strong_ordering::greater; return std::strong_ordering::equivalent; } # endif bool operator==( PresentFrameTokenGGP const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( memcmp( &frameToken, &rhs.frameToken, sizeof( GgpFrameToken ) ) == 0 ); } bool operator!=( PresentFrameTokenGGP const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePresentFrameTokenGGP; const void * pNext = {}; GgpFrameToken frameToken = {}; }; template <> struct CppType { using Type = PresentFrameTokenGGP; }; #endif /*VK_USE_PLATFORM_GGP*/ struct PresentIdKHR { using NativeType = VkPresentIdKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePresentIdKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PresentIdKHR( uint32_t swapchainCount_ = {}, const uint64_t * pPresentIds_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , swapchainCount{ swapchainCount_ } , pPresentIds{ pPresentIds_ } { } VULKAN_HPP_CONSTEXPR PresentIdKHR( PresentIdKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; PresentIdKHR( VkPresentIdKHR const & rhs ) VULKAN_HPP_NOEXCEPT : PresentIdKHR( *reinterpret_cast( &rhs ) ) {} # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) PresentIdKHR( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & presentIds_, const void * pNext_ = nullptr ) : pNext( pNext_ ), swapchainCount( static_cast( presentIds_.size() ) ), pPresentIds( presentIds_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ PresentIdKHR & operator=( PresentIdKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PresentIdKHR & operator=( VkPresentIdKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PresentIdKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PresentIdKHR & setSwapchainCount( uint32_t swapchainCount_ ) VULKAN_HPP_NOEXCEPT { swapchainCount = swapchainCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 PresentIdKHR & setPPresentIds( const uint64_t * pPresentIds_ ) VULKAN_HPP_NOEXCEPT { pPresentIds = pPresentIds_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) PresentIdKHR & setPresentIds( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & presentIds_ ) VULKAN_HPP_NOEXCEPT { swapchainCount = static_cast( presentIds_.size() ); pPresentIds = presentIds_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPresentIdKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPresentIdKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, swapchainCount, pPresentIds ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PresentIdKHR const & ) const = default; #else bool operator==( PresentIdKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( swapchainCount == rhs.swapchainCount ) && ( pPresentIds == rhs.pPresentIds ); # endif } bool operator!=( PresentIdKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePresentIdKHR; const void * pNext = {}; uint32_t swapchainCount = {}; const uint64_t * pPresentIds = {}; }; template <> struct CppType { using Type = PresentIdKHR; }; struct PresentInfoKHR { using NativeType = VkPresentInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePresentInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PresentInfoKHR( uint32_t waitSemaphoreCount_ = {}, const VULKAN_HPP_NAMESPACE::Semaphore * pWaitSemaphores_ = {}, uint32_t swapchainCount_ = {}, const VULKAN_HPP_NAMESPACE::SwapchainKHR * pSwapchains_ = {}, const uint32_t * pImageIndices_ = {}, VULKAN_HPP_NAMESPACE::Result * pResults_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , waitSemaphoreCount{ waitSemaphoreCount_ } , pWaitSemaphores{ pWaitSemaphores_ } , swapchainCount{ swapchainCount_ } , pSwapchains{ pSwapchains_ } , pImageIndices{ pImageIndices_ } , pResults{ pResults_ } { } VULKAN_HPP_CONSTEXPR PresentInfoKHR( PresentInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; PresentInfoKHR( VkPresentInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : PresentInfoKHR( *reinterpret_cast( &rhs ) ) {} # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) PresentInfoKHR( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & waitSemaphores_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & swapchains_ = {}, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & imageIndices_ = {}, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & results_ = {}, const void * pNext_ = nullptr ) : pNext( pNext_ ) , waitSemaphoreCount( static_cast( waitSemaphores_.size() ) ) , pWaitSemaphores( waitSemaphores_.data() ) , swapchainCount( static_cast( swapchains_.size() ) ) , pSwapchains( swapchains_.data() ) , pImageIndices( imageIndices_.data() ) , pResults( results_.data() ) { # ifdef VULKAN_HPP_NO_EXCEPTIONS VULKAN_HPP_ASSERT( swapchains_.size() == imageIndices_.size() ); VULKAN_HPP_ASSERT( results_.empty() || ( swapchains_.size() == results_.size() ) ); VULKAN_HPP_ASSERT( results_.empty() || ( imageIndices_.size() == results_.size() ) ); # else if ( swapchains_.size() != imageIndices_.size() ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::PresentInfoKHR::PresentInfoKHR: swapchains_.size() != imageIndices_.size()" ); } if ( !results_.empty() && ( swapchains_.size() != results_.size() ) ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::PresentInfoKHR::PresentInfoKHR: !results_.empty() && ( swapchains_.size() != results_.size() )" ); } if ( !results_.empty() && ( imageIndices_.size() != results_.size() ) ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::PresentInfoKHR::PresentInfoKHR: !results_.empty() && ( imageIndices_.size() != results_.size() )" ); } # endif /*VULKAN_HPP_NO_EXCEPTIONS*/ } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ PresentInfoKHR & operator=( PresentInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PresentInfoKHR & operator=( VkPresentInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PresentInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PresentInfoKHR & setWaitSemaphoreCount( uint32_t waitSemaphoreCount_ ) VULKAN_HPP_NOEXCEPT { waitSemaphoreCount = waitSemaphoreCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 PresentInfoKHR & setPWaitSemaphores( const VULKAN_HPP_NAMESPACE::Semaphore * pWaitSemaphores_ ) VULKAN_HPP_NOEXCEPT { pWaitSemaphores = pWaitSemaphores_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) PresentInfoKHR & setWaitSemaphores( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & waitSemaphores_ ) VULKAN_HPP_NOEXCEPT { waitSemaphoreCount = static_cast( waitSemaphores_.size() ); pWaitSemaphores = waitSemaphores_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 PresentInfoKHR & setSwapchainCount( uint32_t swapchainCount_ ) VULKAN_HPP_NOEXCEPT { swapchainCount = swapchainCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 PresentInfoKHR & setPSwapchains( const VULKAN_HPP_NAMESPACE::SwapchainKHR * pSwapchains_ ) VULKAN_HPP_NOEXCEPT { pSwapchains = pSwapchains_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) PresentInfoKHR & setSwapchains( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & swapchains_ ) VULKAN_HPP_NOEXCEPT { swapchainCount = static_cast( swapchains_.size() ); pSwapchains = swapchains_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 PresentInfoKHR & setPImageIndices( const uint32_t * pImageIndices_ ) VULKAN_HPP_NOEXCEPT { pImageIndices = pImageIndices_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) PresentInfoKHR & setImageIndices( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & imageIndices_ ) VULKAN_HPP_NOEXCEPT { swapchainCount = static_cast( imageIndices_.size() ); pImageIndices = imageIndices_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 PresentInfoKHR & setPResults( VULKAN_HPP_NAMESPACE::Result * pResults_ ) VULKAN_HPP_NOEXCEPT { pResults = pResults_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) PresentInfoKHR & setResults( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & results_ ) VULKAN_HPP_NOEXCEPT { swapchainCount = static_cast( results_.size() ); pResults = results_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPresentInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPresentInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, waitSemaphoreCount, pWaitSemaphores, swapchainCount, pSwapchains, pImageIndices, pResults ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PresentInfoKHR const & ) const = default; #else bool operator==( PresentInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( waitSemaphoreCount == rhs.waitSemaphoreCount ) && ( pWaitSemaphores == rhs.pWaitSemaphores ) && ( swapchainCount == rhs.swapchainCount ) && ( pSwapchains == rhs.pSwapchains ) && ( pImageIndices == rhs.pImageIndices ) && ( pResults == rhs.pResults ); # endif } bool operator!=( PresentInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePresentInfoKHR; const void * pNext = {}; uint32_t waitSemaphoreCount = {}; const VULKAN_HPP_NAMESPACE::Semaphore * pWaitSemaphores = {}; uint32_t swapchainCount = {}; const VULKAN_HPP_NAMESPACE::SwapchainKHR * pSwapchains = {}; const uint32_t * pImageIndices = {}; VULKAN_HPP_NAMESPACE::Result * pResults = {}; }; template <> struct CppType { using Type = PresentInfoKHR; }; struct RectLayerKHR { using NativeType = VkRectLayerKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR RectLayerKHR( VULKAN_HPP_NAMESPACE::Offset2D offset_ = {}, VULKAN_HPP_NAMESPACE::Extent2D extent_ = {}, uint32_t layer_ = {} ) VULKAN_HPP_NOEXCEPT : offset{ offset_ } , extent{ extent_ } , layer{ layer_ } { } VULKAN_HPP_CONSTEXPR RectLayerKHR( RectLayerKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; RectLayerKHR( VkRectLayerKHR const & rhs ) VULKAN_HPP_NOEXCEPT : RectLayerKHR( *reinterpret_cast( &rhs ) ) {} explicit RectLayerKHR( Rect2D const & rect2D, uint32_t layer_ = {} ) : offset( rect2D.offset ), extent( rect2D.extent ), layer( layer_ ) {} RectLayerKHR & operator=( RectLayerKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ RectLayerKHR & operator=( VkRectLayerKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 RectLayerKHR & setOffset( VULKAN_HPP_NAMESPACE::Offset2D const & offset_ ) VULKAN_HPP_NOEXCEPT { offset = offset_; return *this; } VULKAN_HPP_CONSTEXPR_14 RectLayerKHR & setExtent( VULKAN_HPP_NAMESPACE::Extent2D const & extent_ ) VULKAN_HPP_NOEXCEPT { extent = extent_; return *this; } VULKAN_HPP_CONSTEXPR_14 RectLayerKHR & setLayer( uint32_t layer_ ) VULKAN_HPP_NOEXCEPT { layer = layer_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkRectLayerKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkRectLayerKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( offset, extent, layer ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( RectLayerKHR const & ) const = default; #else bool operator==( RectLayerKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( offset == rhs.offset ) && ( extent == rhs.extent ) && ( layer == rhs.layer ); # endif } bool operator!=( RectLayerKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::Offset2D offset = {}; VULKAN_HPP_NAMESPACE::Extent2D extent = {}; uint32_t layer = {}; }; struct PresentRegionKHR { using NativeType = VkPresentRegionKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PresentRegionKHR( uint32_t rectangleCount_ = {}, const VULKAN_HPP_NAMESPACE::RectLayerKHR * pRectangles_ = {} ) VULKAN_HPP_NOEXCEPT : rectangleCount{ rectangleCount_ } , pRectangles{ pRectangles_ } { } VULKAN_HPP_CONSTEXPR PresentRegionKHR( PresentRegionKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; PresentRegionKHR( VkPresentRegionKHR const & rhs ) VULKAN_HPP_NOEXCEPT : PresentRegionKHR( *reinterpret_cast( &rhs ) ) {} # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) PresentRegionKHR( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & rectangles_ ) : rectangleCount( static_cast( rectangles_.size() ) ), pRectangles( rectangles_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ PresentRegionKHR & operator=( PresentRegionKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PresentRegionKHR & operator=( VkPresentRegionKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PresentRegionKHR & setRectangleCount( uint32_t rectangleCount_ ) VULKAN_HPP_NOEXCEPT { rectangleCount = rectangleCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 PresentRegionKHR & setPRectangles( const VULKAN_HPP_NAMESPACE::RectLayerKHR * pRectangles_ ) VULKAN_HPP_NOEXCEPT { pRectangles = pRectangles_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) PresentRegionKHR & setRectangles( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & rectangles_ ) VULKAN_HPP_NOEXCEPT { rectangleCount = static_cast( rectangles_.size() ); pRectangles = rectangles_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPresentRegionKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPresentRegionKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( rectangleCount, pRectangles ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PresentRegionKHR const & ) const = default; #else bool operator==( PresentRegionKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( rectangleCount == rhs.rectangleCount ) && ( pRectangles == rhs.pRectangles ); # endif } bool operator!=( PresentRegionKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: uint32_t rectangleCount = {}; const VULKAN_HPP_NAMESPACE::RectLayerKHR * pRectangles = {}; }; struct PresentRegionsKHR { using NativeType = VkPresentRegionsKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePresentRegionsKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PresentRegionsKHR( uint32_t swapchainCount_ = {}, const VULKAN_HPP_NAMESPACE::PresentRegionKHR * pRegions_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , swapchainCount{ swapchainCount_ } , pRegions{ pRegions_ } { } VULKAN_HPP_CONSTEXPR PresentRegionsKHR( PresentRegionsKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; PresentRegionsKHR( VkPresentRegionsKHR const & rhs ) VULKAN_HPP_NOEXCEPT : PresentRegionsKHR( *reinterpret_cast( &rhs ) ) {} # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) PresentRegionsKHR( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & regions_, const void * pNext_ = nullptr ) : pNext( pNext_ ), swapchainCount( static_cast( regions_.size() ) ), pRegions( regions_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ PresentRegionsKHR & operator=( PresentRegionsKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PresentRegionsKHR & operator=( VkPresentRegionsKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PresentRegionsKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PresentRegionsKHR & setSwapchainCount( uint32_t swapchainCount_ ) VULKAN_HPP_NOEXCEPT { swapchainCount = swapchainCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 PresentRegionsKHR & setPRegions( const VULKAN_HPP_NAMESPACE::PresentRegionKHR * pRegions_ ) VULKAN_HPP_NOEXCEPT { pRegions = pRegions_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) PresentRegionsKHR & setRegions( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & regions_ ) VULKAN_HPP_NOEXCEPT { swapchainCount = static_cast( regions_.size() ); pRegions = regions_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPresentRegionsKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPresentRegionsKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, swapchainCount, pRegions ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PresentRegionsKHR const & ) const = default; #else bool operator==( PresentRegionsKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( swapchainCount == rhs.swapchainCount ) && ( pRegions == rhs.pRegions ); # endif } bool operator!=( PresentRegionsKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePresentRegionsKHR; const void * pNext = {}; uint32_t swapchainCount = {}; const VULKAN_HPP_NAMESPACE::PresentRegionKHR * pRegions = {}; }; template <> struct CppType { using Type = PresentRegionsKHR; }; struct PresentTimeGOOGLE { using NativeType = VkPresentTimeGOOGLE; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PresentTimeGOOGLE( uint32_t presentID_ = {}, uint64_t desiredPresentTime_ = {} ) VULKAN_HPP_NOEXCEPT : presentID{ presentID_ } , desiredPresentTime{ desiredPresentTime_ } { } VULKAN_HPP_CONSTEXPR PresentTimeGOOGLE( PresentTimeGOOGLE const & rhs ) VULKAN_HPP_NOEXCEPT = default; PresentTimeGOOGLE( VkPresentTimeGOOGLE const & rhs ) VULKAN_HPP_NOEXCEPT : PresentTimeGOOGLE( *reinterpret_cast( &rhs ) ) {} PresentTimeGOOGLE & operator=( PresentTimeGOOGLE const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PresentTimeGOOGLE & operator=( VkPresentTimeGOOGLE const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PresentTimeGOOGLE & setPresentID( uint32_t presentID_ ) VULKAN_HPP_NOEXCEPT { presentID = presentID_; return *this; } VULKAN_HPP_CONSTEXPR_14 PresentTimeGOOGLE & setDesiredPresentTime( uint64_t desiredPresentTime_ ) VULKAN_HPP_NOEXCEPT { desiredPresentTime = desiredPresentTime_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPresentTimeGOOGLE const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPresentTimeGOOGLE &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( presentID, desiredPresentTime ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PresentTimeGOOGLE const & ) const = default; #else bool operator==( PresentTimeGOOGLE const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( presentID == rhs.presentID ) && ( desiredPresentTime == rhs.desiredPresentTime ); # endif } bool operator!=( PresentTimeGOOGLE const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: uint32_t presentID = {}; uint64_t desiredPresentTime = {}; }; struct PresentTimesInfoGOOGLE { using NativeType = VkPresentTimesInfoGOOGLE; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePresentTimesInfoGOOGLE; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PresentTimesInfoGOOGLE( uint32_t swapchainCount_ = {}, const VULKAN_HPP_NAMESPACE::PresentTimeGOOGLE * pTimes_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , swapchainCount{ swapchainCount_ } , pTimes{ pTimes_ } { } VULKAN_HPP_CONSTEXPR PresentTimesInfoGOOGLE( PresentTimesInfoGOOGLE const & rhs ) VULKAN_HPP_NOEXCEPT = default; PresentTimesInfoGOOGLE( VkPresentTimesInfoGOOGLE const & rhs ) VULKAN_HPP_NOEXCEPT : PresentTimesInfoGOOGLE( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) PresentTimesInfoGOOGLE( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & times_, const void * pNext_ = nullptr ) : pNext( pNext_ ), swapchainCount( static_cast( times_.size() ) ), pTimes( times_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ PresentTimesInfoGOOGLE & operator=( PresentTimesInfoGOOGLE const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PresentTimesInfoGOOGLE & operator=( VkPresentTimesInfoGOOGLE const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PresentTimesInfoGOOGLE & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PresentTimesInfoGOOGLE & setSwapchainCount( uint32_t swapchainCount_ ) VULKAN_HPP_NOEXCEPT { swapchainCount = swapchainCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 PresentTimesInfoGOOGLE & setPTimes( const VULKAN_HPP_NAMESPACE::PresentTimeGOOGLE * pTimes_ ) VULKAN_HPP_NOEXCEPT { pTimes = pTimes_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) PresentTimesInfoGOOGLE & setTimes( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & times_ ) VULKAN_HPP_NOEXCEPT { swapchainCount = static_cast( times_.size() ); pTimes = times_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPresentTimesInfoGOOGLE const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPresentTimesInfoGOOGLE &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, swapchainCount, pTimes ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PresentTimesInfoGOOGLE const & ) const = default; #else bool operator==( PresentTimesInfoGOOGLE const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( swapchainCount == rhs.swapchainCount ) && ( pTimes == rhs.pTimes ); # endif } bool operator!=( PresentTimesInfoGOOGLE const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePresentTimesInfoGOOGLE; const void * pNext = {}; uint32_t swapchainCount = {}; const VULKAN_HPP_NAMESPACE::PresentTimeGOOGLE * pTimes = {}; }; template <> struct CppType { using Type = PresentTimesInfoGOOGLE; }; struct PrivateDataSlotCreateInfo { using NativeType = VkPrivateDataSlotCreateInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePrivateDataSlotCreateInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PrivateDataSlotCreateInfo( VULKAN_HPP_NAMESPACE::PrivateDataSlotCreateFlags flags_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } { } VULKAN_HPP_CONSTEXPR PrivateDataSlotCreateInfo( PrivateDataSlotCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; PrivateDataSlotCreateInfo( VkPrivateDataSlotCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT : PrivateDataSlotCreateInfo( *reinterpret_cast( &rhs ) ) { } PrivateDataSlotCreateInfo & operator=( PrivateDataSlotCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PrivateDataSlotCreateInfo & operator=( VkPrivateDataSlotCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PrivateDataSlotCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PrivateDataSlotCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::PrivateDataSlotCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPrivateDataSlotCreateInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPrivateDataSlotCreateInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PrivateDataSlotCreateInfo const & ) const = default; #else bool operator==( PrivateDataSlotCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ); # endif } bool operator!=( PrivateDataSlotCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePrivateDataSlotCreateInfo; const void * pNext = {}; VULKAN_HPP_NAMESPACE::PrivateDataSlotCreateFlags flags = {}; }; template <> struct CppType { using Type = PrivateDataSlotCreateInfo; }; using PrivateDataSlotCreateInfoEXT = PrivateDataSlotCreateInfo; struct ProtectedSubmitInfo { using NativeType = VkProtectedSubmitInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eProtectedSubmitInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ProtectedSubmitInfo( VULKAN_HPP_NAMESPACE::Bool32 protectedSubmit_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , protectedSubmit{ protectedSubmit_ } { } VULKAN_HPP_CONSTEXPR ProtectedSubmitInfo( ProtectedSubmitInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; ProtectedSubmitInfo( VkProtectedSubmitInfo const & rhs ) VULKAN_HPP_NOEXCEPT : ProtectedSubmitInfo( *reinterpret_cast( &rhs ) ) { } ProtectedSubmitInfo & operator=( ProtectedSubmitInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ProtectedSubmitInfo & operator=( VkProtectedSubmitInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ProtectedSubmitInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ProtectedSubmitInfo & setProtectedSubmit( VULKAN_HPP_NAMESPACE::Bool32 protectedSubmit_ ) VULKAN_HPP_NOEXCEPT { protectedSubmit = protectedSubmit_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkProtectedSubmitInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkProtectedSubmitInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, protectedSubmit ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ProtectedSubmitInfo const & ) const = default; #else bool operator==( ProtectedSubmitInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( protectedSubmit == rhs.protectedSubmit ); # endif } bool operator!=( ProtectedSubmitInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eProtectedSubmitInfo; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 protectedSubmit = {}; }; template <> struct CppType { using Type = ProtectedSubmitInfo; }; struct PushConstantsInfo { using NativeType = VkPushConstantsInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePushConstantsInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PushConstantsInfo( VULKAN_HPP_NAMESPACE::PipelineLayout layout_ = {}, VULKAN_HPP_NAMESPACE::ShaderStageFlags stageFlags_ = {}, uint32_t offset_ = {}, uint32_t size_ = {}, const void * pValues_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , layout{ layout_ } , stageFlags{ stageFlags_ } , offset{ offset_ } , size{ size_ } , pValues{ pValues_ } { } VULKAN_HPP_CONSTEXPR PushConstantsInfo( PushConstantsInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; PushConstantsInfo( VkPushConstantsInfo const & rhs ) VULKAN_HPP_NOEXCEPT : PushConstantsInfo( *reinterpret_cast( &rhs ) ) {} # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) template PushConstantsInfo( VULKAN_HPP_NAMESPACE::PipelineLayout layout_, VULKAN_HPP_NAMESPACE::ShaderStageFlags stageFlags_, uint32_t offset_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & values_, const void * pNext_ = nullptr ) : pNext( pNext_ ) , layout( layout_ ) , stageFlags( stageFlags_ ) , offset( offset_ ) , size( static_cast( values_.size() * sizeof( T ) ) ) , pValues( values_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ PushConstantsInfo & operator=( PushConstantsInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PushConstantsInfo & operator=( VkPushConstantsInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PushConstantsInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PushConstantsInfo & setLayout( VULKAN_HPP_NAMESPACE::PipelineLayout layout_ ) VULKAN_HPP_NOEXCEPT { layout = layout_; return *this; } VULKAN_HPP_CONSTEXPR_14 PushConstantsInfo & setStageFlags( VULKAN_HPP_NAMESPACE::ShaderStageFlags stageFlags_ ) VULKAN_HPP_NOEXCEPT { stageFlags = stageFlags_; return *this; } VULKAN_HPP_CONSTEXPR_14 PushConstantsInfo & setOffset( uint32_t offset_ ) VULKAN_HPP_NOEXCEPT { offset = offset_; return *this; } VULKAN_HPP_CONSTEXPR_14 PushConstantsInfo & setSize( uint32_t size_ ) VULKAN_HPP_NOEXCEPT { size = size_; return *this; } VULKAN_HPP_CONSTEXPR_14 PushConstantsInfo & setPValues( const void * pValues_ ) VULKAN_HPP_NOEXCEPT { pValues = pValues_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) template PushConstantsInfo & setValues( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & values_ ) VULKAN_HPP_NOEXCEPT { size = static_cast( values_.size() * sizeof( T ) ); pValues = values_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPushConstantsInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPushConstantsInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, layout, stageFlags, offset, size, pValues ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PushConstantsInfo const & ) const = default; #else bool operator==( PushConstantsInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( layout == rhs.layout ) && ( stageFlags == rhs.stageFlags ) && ( offset == rhs.offset ) && ( size == rhs.size ) && ( pValues == rhs.pValues ); # endif } bool operator!=( PushConstantsInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePushConstantsInfo; const void * pNext = {}; VULKAN_HPP_NAMESPACE::PipelineLayout layout = {}; VULKAN_HPP_NAMESPACE::ShaderStageFlags stageFlags = {}; uint32_t offset = {}; uint32_t size = {}; const void * pValues = {}; }; template <> struct CppType { using Type = PushConstantsInfo; }; using PushConstantsInfoKHR = PushConstantsInfo; struct WriteDescriptorSet { using NativeType = VkWriteDescriptorSet; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eWriteDescriptorSet; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR WriteDescriptorSet( VULKAN_HPP_NAMESPACE::DescriptorSet dstSet_ = {}, uint32_t dstBinding_ = {}, uint32_t dstArrayElement_ = {}, uint32_t descriptorCount_ = {}, VULKAN_HPP_NAMESPACE::DescriptorType descriptorType_ = VULKAN_HPP_NAMESPACE::DescriptorType::eSampler, const VULKAN_HPP_NAMESPACE::DescriptorImageInfo * pImageInfo_ = {}, const VULKAN_HPP_NAMESPACE::DescriptorBufferInfo * pBufferInfo_ = {}, const VULKAN_HPP_NAMESPACE::BufferView * pTexelBufferView_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , dstSet{ dstSet_ } , dstBinding{ dstBinding_ } , dstArrayElement{ dstArrayElement_ } , descriptorCount{ descriptorCount_ } , descriptorType{ descriptorType_ } , pImageInfo{ pImageInfo_ } , pBufferInfo{ pBufferInfo_ } , pTexelBufferView{ pTexelBufferView_ } { } VULKAN_HPP_CONSTEXPR WriteDescriptorSet( WriteDescriptorSet const & rhs ) VULKAN_HPP_NOEXCEPT = default; WriteDescriptorSet( VkWriteDescriptorSet const & rhs ) VULKAN_HPP_NOEXCEPT : WriteDescriptorSet( *reinterpret_cast( &rhs ) ) {} # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) WriteDescriptorSet( VULKAN_HPP_NAMESPACE::DescriptorSet dstSet_, uint32_t dstBinding_, uint32_t dstArrayElement_, VULKAN_HPP_NAMESPACE::DescriptorType descriptorType_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & imageInfo_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & bufferInfo_ = {}, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & texelBufferView_ = {}, const void * pNext_ = nullptr ) : pNext( pNext_ ) , dstSet( dstSet_ ) , dstBinding( dstBinding_ ) , dstArrayElement( dstArrayElement_ ) , descriptorCount( static_cast( !imageInfo_.empty() ? imageInfo_.size() : !bufferInfo_.empty() ? bufferInfo_.size() : texelBufferView_.size() ) ) , descriptorType( descriptorType_ ) , pImageInfo( imageInfo_.data() ) , pBufferInfo( bufferInfo_.data() ) , pTexelBufferView( texelBufferView_.data() ) { # ifdef VULKAN_HPP_NO_EXCEPTIONS VULKAN_HPP_ASSERT( ( !imageInfo_.empty() + !bufferInfo_.empty() + !texelBufferView_.empty() ) <= 1 ); # else if ( 1 < ( !imageInfo_.empty() + !bufferInfo_.empty() + !texelBufferView_.empty() ) ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::WriteDescriptorSet::WriteDescriptorSet: 1 < ( !imageInfo_.empty() + !bufferInfo_.empty() + !texelBufferView_.empty() )" ); } # endif /*VULKAN_HPP_NO_EXCEPTIONS*/ } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ WriteDescriptorSet & operator=( WriteDescriptorSet const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ WriteDescriptorSet & operator=( VkWriteDescriptorSet const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 WriteDescriptorSet & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 WriteDescriptorSet & setDstSet( VULKAN_HPP_NAMESPACE::DescriptorSet dstSet_ ) VULKAN_HPP_NOEXCEPT { dstSet = dstSet_; return *this; } VULKAN_HPP_CONSTEXPR_14 WriteDescriptorSet & setDstBinding( uint32_t dstBinding_ ) VULKAN_HPP_NOEXCEPT { dstBinding = dstBinding_; return *this; } VULKAN_HPP_CONSTEXPR_14 WriteDescriptorSet & setDstArrayElement( uint32_t dstArrayElement_ ) VULKAN_HPP_NOEXCEPT { dstArrayElement = dstArrayElement_; return *this; } VULKAN_HPP_CONSTEXPR_14 WriteDescriptorSet & setDescriptorCount( uint32_t descriptorCount_ ) VULKAN_HPP_NOEXCEPT { descriptorCount = descriptorCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 WriteDescriptorSet & setDescriptorType( VULKAN_HPP_NAMESPACE::DescriptorType descriptorType_ ) VULKAN_HPP_NOEXCEPT { descriptorType = descriptorType_; return *this; } VULKAN_HPP_CONSTEXPR_14 WriteDescriptorSet & setPImageInfo( const VULKAN_HPP_NAMESPACE::DescriptorImageInfo * pImageInfo_ ) VULKAN_HPP_NOEXCEPT { pImageInfo = pImageInfo_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) WriteDescriptorSet & setImageInfo( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & imageInfo_ ) VULKAN_HPP_NOEXCEPT { descriptorCount = static_cast( imageInfo_.size() ); pImageInfo = imageInfo_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 WriteDescriptorSet & setPBufferInfo( const VULKAN_HPP_NAMESPACE::DescriptorBufferInfo * pBufferInfo_ ) VULKAN_HPP_NOEXCEPT { pBufferInfo = pBufferInfo_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) WriteDescriptorSet & setBufferInfo( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & bufferInfo_ ) VULKAN_HPP_NOEXCEPT { descriptorCount = static_cast( bufferInfo_.size() ); pBufferInfo = bufferInfo_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 WriteDescriptorSet & setPTexelBufferView( const VULKAN_HPP_NAMESPACE::BufferView * pTexelBufferView_ ) VULKAN_HPP_NOEXCEPT { pTexelBufferView = pTexelBufferView_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) WriteDescriptorSet & setTexelBufferView( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & texelBufferView_ ) VULKAN_HPP_NOEXCEPT { descriptorCount = static_cast( texelBufferView_.size() ); pTexelBufferView = texelBufferView_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkWriteDescriptorSet const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkWriteDescriptorSet &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, dstSet, dstBinding, dstArrayElement, descriptorCount, descriptorType, pImageInfo, pBufferInfo, pTexelBufferView ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( WriteDescriptorSet const & ) const = default; #else bool operator==( WriteDescriptorSet const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( dstSet == rhs.dstSet ) && ( dstBinding == rhs.dstBinding ) && ( dstArrayElement == rhs.dstArrayElement ) && ( descriptorCount == rhs.descriptorCount ) && ( descriptorType == rhs.descriptorType ) && ( pImageInfo == rhs.pImageInfo ) && ( pBufferInfo == rhs.pBufferInfo ) && ( pTexelBufferView == rhs.pTexelBufferView ); # endif } bool operator!=( WriteDescriptorSet const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eWriteDescriptorSet; const void * pNext = {}; VULKAN_HPP_NAMESPACE::DescriptorSet dstSet = {}; uint32_t dstBinding = {}; uint32_t dstArrayElement = {}; uint32_t descriptorCount = {}; VULKAN_HPP_NAMESPACE::DescriptorType descriptorType = VULKAN_HPP_NAMESPACE::DescriptorType::eSampler; const VULKAN_HPP_NAMESPACE::DescriptorImageInfo * pImageInfo = {}; const VULKAN_HPP_NAMESPACE::DescriptorBufferInfo * pBufferInfo = {}; const VULKAN_HPP_NAMESPACE::BufferView * pTexelBufferView = {}; }; template <> struct CppType { using Type = WriteDescriptorSet; }; struct PushDescriptorSetInfo { using NativeType = VkPushDescriptorSetInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePushDescriptorSetInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PushDescriptorSetInfo( VULKAN_HPP_NAMESPACE::ShaderStageFlags stageFlags_ = {}, VULKAN_HPP_NAMESPACE::PipelineLayout layout_ = {}, uint32_t set_ = {}, uint32_t descriptorWriteCount_ = {}, const VULKAN_HPP_NAMESPACE::WriteDescriptorSet * pDescriptorWrites_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , stageFlags{ stageFlags_ } , layout{ layout_ } , set{ set_ } , descriptorWriteCount{ descriptorWriteCount_ } , pDescriptorWrites{ pDescriptorWrites_ } { } VULKAN_HPP_CONSTEXPR PushDescriptorSetInfo( PushDescriptorSetInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; PushDescriptorSetInfo( VkPushDescriptorSetInfo const & rhs ) VULKAN_HPP_NOEXCEPT : PushDescriptorSetInfo( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) PushDescriptorSetInfo( VULKAN_HPP_NAMESPACE::ShaderStageFlags stageFlags_, VULKAN_HPP_NAMESPACE::PipelineLayout layout_, uint32_t set_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & descriptorWrites_, const void * pNext_ = nullptr ) : pNext( pNext_ ) , stageFlags( stageFlags_ ) , layout( layout_ ) , set( set_ ) , descriptorWriteCount( static_cast( descriptorWrites_.size() ) ) , pDescriptorWrites( descriptorWrites_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ PushDescriptorSetInfo & operator=( PushDescriptorSetInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PushDescriptorSetInfo & operator=( VkPushDescriptorSetInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PushDescriptorSetInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PushDescriptorSetInfo & setStageFlags( VULKAN_HPP_NAMESPACE::ShaderStageFlags stageFlags_ ) VULKAN_HPP_NOEXCEPT { stageFlags = stageFlags_; return *this; } VULKAN_HPP_CONSTEXPR_14 PushDescriptorSetInfo & setLayout( VULKAN_HPP_NAMESPACE::PipelineLayout layout_ ) VULKAN_HPP_NOEXCEPT { layout = layout_; return *this; } VULKAN_HPP_CONSTEXPR_14 PushDescriptorSetInfo & setSet( uint32_t set_ ) VULKAN_HPP_NOEXCEPT { set = set_; return *this; } VULKAN_HPP_CONSTEXPR_14 PushDescriptorSetInfo & setDescriptorWriteCount( uint32_t descriptorWriteCount_ ) VULKAN_HPP_NOEXCEPT { descriptorWriteCount = descriptorWriteCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 PushDescriptorSetInfo & setPDescriptorWrites( const VULKAN_HPP_NAMESPACE::WriteDescriptorSet * pDescriptorWrites_ ) VULKAN_HPP_NOEXCEPT { pDescriptorWrites = pDescriptorWrites_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) PushDescriptorSetInfo & setDescriptorWrites( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & descriptorWrites_ ) VULKAN_HPP_NOEXCEPT { descriptorWriteCount = static_cast( descriptorWrites_.size() ); pDescriptorWrites = descriptorWrites_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPushDescriptorSetInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPushDescriptorSetInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, stageFlags, layout, set, descriptorWriteCount, pDescriptorWrites ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PushDescriptorSetInfo const & ) const = default; #else bool operator==( PushDescriptorSetInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( stageFlags == rhs.stageFlags ) && ( layout == rhs.layout ) && ( set == rhs.set ) && ( descriptorWriteCount == rhs.descriptorWriteCount ) && ( pDescriptorWrites == rhs.pDescriptorWrites ); # endif } bool operator!=( PushDescriptorSetInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePushDescriptorSetInfo; const void * pNext = {}; VULKAN_HPP_NAMESPACE::ShaderStageFlags stageFlags = {}; VULKAN_HPP_NAMESPACE::PipelineLayout layout = {}; uint32_t set = {}; uint32_t descriptorWriteCount = {}; const VULKAN_HPP_NAMESPACE::WriteDescriptorSet * pDescriptorWrites = {}; }; template <> struct CppType { using Type = PushDescriptorSetInfo; }; using PushDescriptorSetInfoKHR = PushDescriptorSetInfo; struct PushDescriptorSetWithTemplateInfo { using NativeType = VkPushDescriptorSetWithTemplateInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::ePushDescriptorSetWithTemplateInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR PushDescriptorSetWithTemplateInfo( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate_ = {}, VULKAN_HPP_NAMESPACE::PipelineLayout layout_ = {}, uint32_t set_ = {}, const void * pData_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , descriptorUpdateTemplate{ descriptorUpdateTemplate_ } , layout{ layout_ } , set{ set_ } , pData{ pData_ } { } VULKAN_HPP_CONSTEXPR PushDescriptorSetWithTemplateInfo( PushDescriptorSetWithTemplateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; PushDescriptorSetWithTemplateInfo( VkPushDescriptorSetWithTemplateInfo const & rhs ) VULKAN_HPP_NOEXCEPT : PushDescriptorSetWithTemplateInfo( *reinterpret_cast( &rhs ) ) { } PushDescriptorSetWithTemplateInfo & operator=( PushDescriptorSetWithTemplateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ PushDescriptorSetWithTemplateInfo & operator=( VkPushDescriptorSetWithTemplateInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 PushDescriptorSetWithTemplateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 PushDescriptorSetWithTemplateInfo & setDescriptorUpdateTemplate( VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate_ ) VULKAN_HPP_NOEXCEPT { descriptorUpdateTemplate = descriptorUpdateTemplate_; return *this; } VULKAN_HPP_CONSTEXPR_14 PushDescriptorSetWithTemplateInfo & setLayout( VULKAN_HPP_NAMESPACE::PipelineLayout layout_ ) VULKAN_HPP_NOEXCEPT { layout = layout_; return *this; } VULKAN_HPP_CONSTEXPR_14 PushDescriptorSetWithTemplateInfo & setSet( uint32_t set_ ) VULKAN_HPP_NOEXCEPT { set = set_; return *this; } VULKAN_HPP_CONSTEXPR_14 PushDescriptorSetWithTemplateInfo & setPData( const void * pData_ ) VULKAN_HPP_NOEXCEPT { pData = pData_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkPushDescriptorSetWithTemplateInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkPushDescriptorSetWithTemplateInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, descriptorUpdateTemplate, layout, set, pData ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( PushDescriptorSetWithTemplateInfo const & ) const = default; #else bool operator==( PushDescriptorSetWithTemplateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( descriptorUpdateTemplate == rhs.descriptorUpdateTemplate ) && ( layout == rhs.layout ) && ( set == rhs.set ) && ( pData == rhs.pData ); # endif } bool operator!=( PushDescriptorSetWithTemplateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::ePushDescriptorSetWithTemplateInfo; const void * pNext = {}; VULKAN_HPP_NAMESPACE::DescriptorUpdateTemplate descriptorUpdateTemplate = {}; VULKAN_HPP_NAMESPACE::PipelineLayout layout = {}; uint32_t set = {}; const void * pData = {}; }; template <> struct CppType { using Type = PushDescriptorSetWithTemplateInfo; }; using PushDescriptorSetWithTemplateInfoKHR = PushDescriptorSetWithTemplateInfo; struct QueryLowLatencySupportNV { using NativeType = VkQueryLowLatencySupportNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eQueryLowLatencySupportNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR QueryLowLatencySupportNV( void * pQueriedLowLatencyData_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , pQueriedLowLatencyData{ pQueriedLowLatencyData_ } { } VULKAN_HPP_CONSTEXPR QueryLowLatencySupportNV( QueryLowLatencySupportNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; QueryLowLatencySupportNV( VkQueryLowLatencySupportNV const & rhs ) VULKAN_HPP_NOEXCEPT : QueryLowLatencySupportNV( *reinterpret_cast( &rhs ) ) { } QueryLowLatencySupportNV & operator=( QueryLowLatencySupportNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ QueryLowLatencySupportNV & operator=( VkQueryLowLatencySupportNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 QueryLowLatencySupportNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 QueryLowLatencySupportNV & setPQueriedLowLatencyData( void * pQueriedLowLatencyData_ ) VULKAN_HPP_NOEXCEPT { pQueriedLowLatencyData = pQueriedLowLatencyData_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkQueryLowLatencySupportNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkQueryLowLatencySupportNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, pQueriedLowLatencyData ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( QueryLowLatencySupportNV const & ) const = default; #else bool operator==( QueryLowLatencySupportNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( pQueriedLowLatencyData == rhs.pQueriedLowLatencyData ); # endif } bool operator!=( QueryLowLatencySupportNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eQueryLowLatencySupportNV; const void * pNext = {}; void * pQueriedLowLatencyData = {}; }; template <> struct CppType { using Type = QueryLowLatencySupportNV; }; struct QueryPoolCreateInfo { using NativeType = VkQueryPoolCreateInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eQueryPoolCreateInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR QueryPoolCreateInfo( VULKAN_HPP_NAMESPACE::QueryPoolCreateFlags flags_ = {}, VULKAN_HPP_NAMESPACE::QueryType queryType_ = VULKAN_HPP_NAMESPACE::QueryType::eOcclusion, uint32_t queryCount_ = {}, VULKAN_HPP_NAMESPACE::QueryPipelineStatisticFlags pipelineStatistics_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , queryType{ queryType_ } , queryCount{ queryCount_ } , pipelineStatistics{ pipelineStatistics_ } { } VULKAN_HPP_CONSTEXPR QueryPoolCreateInfo( QueryPoolCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; QueryPoolCreateInfo( VkQueryPoolCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT : QueryPoolCreateInfo( *reinterpret_cast( &rhs ) ) { } QueryPoolCreateInfo & operator=( QueryPoolCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ QueryPoolCreateInfo & operator=( VkQueryPoolCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 QueryPoolCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 QueryPoolCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::QueryPoolCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 QueryPoolCreateInfo & setQueryType( VULKAN_HPP_NAMESPACE::QueryType queryType_ ) VULKAN_HPP_NOEXCEPT { queryType = queryType_; return *this; } VULKAN_HPP_CONSTEXPR_14 QueryPoolCreateInfo & setQueryCount( uint32_t queryCount_ ) VULKAN_HPP_NOEXCEPT { queryCount = queryCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 QueryPoolCreateInfo & setPipelineStatistics( VULKAN_HPP_NAMESPACE::QueryPipelineStatisticFlags pipelineStatistics_ ) VULKAN_HPP_NOEXCEPT { pipelineStatistics = pipelineStatistics_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkQueryPoolCreateInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkQueryPoolCreateInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, queryType, queryCount, pipelineStatistics ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( QueryPoolCreateInfo const & ) const = default; #else bool operator==( QueryPoolCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( queryType == rhs.queryType ) && ( queryCount == rhs.queryCount ) && ( pipelineStatistics == rhs.pipelineStatistics ); # endif } bool operator!=( QueryPoolCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eQueryPoolCreateInfo; const void * pNext = {}; VULKAN_HPP_NAMESPACE::QueryPoolCreateFlags flags = {}; VULKAN_HPP_NAMESPACE::QueryType queryType = VULKAN_HPP_NAMESPACE::QueryType::eOcclusion; uint32_t queryCount = {}; VULKAN_HPP_NAMESPACE::QueryPipelineStatisticFlags pipelineStatistics = {}; }; template <> struct CppType { using Type = QueryPoolCreateInfo; }; struct QueryPoolPerformanceCreateInfoKHR { using NativeType = VkQueryPoolPerformanceCreateInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eQueryPoolPerformanceCreateInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR QueryPoolPerformanceCreateInfoKHR( uint32_t queueFamilyIndex_ = {}, uint32_t counterIndexCount_ = {}, const uint32_t * pCounterIndices_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , queueFamilyIndex{ queueFamilyIndex_ } , counterIndexCount{ counterIndexCount_ } , pCounterIndices{ pCounterIndices_ } { } VULKAN_HPP_CONSTEXPR QueryPoolPerformanceCreateInfoKHR( QueryPoolPerformanceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; QueryPoolPerformanceCreateInfoKHR( VkQueryPoolPerformanceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : QueryPoolPerformanceCreateInfoKHR( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) QueryPoolPerformanceCreateInfoKHR( uint32_t queueFamilyIndex_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & counterIndices_, const void * pNext_ = nullptr ) : pNext( pNext_ ) , queueFamilyIndex( queueFamilyIndex_ ) , counterIndexCount( static_cast( counterIndices_.size() ) ) , pCounterIndices( counterIndices_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ QueryPoolPerformanceCreateInfoKHR & operator=( QueryPoolPerformanceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ QueryPoolPerformanceCreateInfoKHR & operator=( VkQueryPoolPerformanceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 QueryPoolPerformanceCreateInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 QueryPoolPerformanceCreateInfoKHR & setQueueFamilyIndex( uint32_t queueFamilyIndex_ ) VULKAN_HPP_NOEXCEPT { queueFamilyIndex = queueFamilyIndex_; return *this; } VULKAN_HPP_CONSTEXPR_14 QueryPoolPerformanceCreateInfoKHR & setCounterIndexCount( uint32_t counterIndexCount_ ) VULKAN_HPP_NOEXCEPT { counterIndexCount = counterIndexCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 QueryPoolPerformanceCreateInfoKHR & setPCounterIndices( const uint32_t * pCounterIndices_ ) VULKAN_HPP_NOEXCEPT { pCounterIndices = pCounterIndices_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) QueryPoolPerformanceCreateInfoKHR & setCounterIndices( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & counterIndices_ ) VULKAN_HPP_NOEXCEPT { counterIndexCount = static_cast( counterIndices_.size() ); pCounterIndices = counterIndices_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkQueryPoolPerformanceCreateInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkQueryPoolPerformanceCreateInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, queueFamilyIndex, counterIndexCount, pCounterIndices ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( QueryPoolPerformanceCreateInfoKHR const & ) const = default; #else bool operator==( QueryPoolPerformanceCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( queueFamilyIndex == rhs.queueFamilyIndex ) && ( counterIndexCount == rhs.counterIndexCount ) && ( pCounterIndices == rhs.pCounterIndices ); # endif } bool operator!=( QueryPoolPerformanceCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eQueryPoolPerformanceCreateInfoKHR; const void * pNext = {}; uint32_t queueFamilyIndex = {}; uint32_t counterIndexCount = {}; const uint32_t * pCounterIndices = {}; }; template <> struct CppType { using Type = QueryPoolPerformanceCreateInfoKHR; }; struct QueryPoolPerformanceQueryCreateInfoINTEL { using NativeType = VkQueryPoolPerformanceQueryCreateInfoINTEL; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eQueryPoolPerformanceQueryCreateInfoINTEL; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR QueryPoolPerformanceQueryCreateInfoINTEL( VULKAN_HPP_NAMESPACE::QueryPoolSamplingModeINTEL performanceCountersSampling_ = VULKAN_HPP_NAMESPACE::QueryPoolSamplingModeINTEL::eManual, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , performanceCountersSampling{ performanceCountersSampling_ } { } VULKAN_HPP_CONSTEXPR QueryPoolPerformanceQueryCreateInfoINTEL( QueryPoolPerformanceQueryCreateInfoINTEL const & rhs ) VULKAN_HPP_NOEXCEPT = default; QueryPoolPerformanceQueryCreateInfoINTEL( VkQueryPoolPerformanceQueryCreateInfoINTEL const & rhs ) VULKAN_HPP_NOEXCEPT : QueryPoolPerformanceQueryCreateInfoINTEL( *reinterpret_cast( &rhs ) ) { } QueryPoolPerformanceQueryCreateInfoINTEL & operator=( QueryPoolPerformanceQueryCreateInfoINTEL const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ QueryPoolPerformanceQueryCreateInfoINTEL & operator=( VkQueryPoolPerformanceQueryCreateInfoINTEL const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 QueryPoolPerformanceQueryCreateInfoINTEL & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 QueryPoolPerformanceQueryCreateInfoINTEL & setPerformanceCountersSampling( VULKAN_HPP_NAMESPACE::QueryPoolSamplingModeINTEL performanceCountersSampling_ ) VULKAN_HPP_NOEXCEPT { performanceCountersSampling = performanceCountersSampling_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkQueryPoolPerformanceQueryCreateInfoINTEL const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkQueryPoolPerformanceQueryCreateInfoINTEL &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, performanceCountersSampling ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( QueryPoolPerformanceQueryCreateInfoINTEL const & ) const = default; #else bool operator==( QueryPoolPerformanceQueryCreateInfoINTEL const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( performanceCountersSampling == rhs.performanceCountersSampling ); # endif } bool operator!=( QueryPoolPerformanceQueryCreateInfoINTEL const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eQueryPoolPerformanceQueryCreateInfoINTEL; const void * pNext = {}; VULKAN_HPP_NAMESPACE::QueryPoolSamplingModeINTEL performanceCountersSampling = VULKAN_HPP_NAMESPACE::QueryPoolSamplingModeINTEL::eManual; }; template <> struct CppType { using Type = QueryPoolPerformanceQueryCreateInfoINTEL; }; using QueryPoolCreateInfoINTEL = QueryPoolPerformanceQueryCreateInfoINTEL; struct QueryPoolVideoEncodeFeedbackCreateInfoKHR { using NativeType = VkQueryPoolVideoEncodeFeedbackCreateInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eQueryPoolVideoEncodeFeedbackCreateInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR QueryPoolVideoEncodeFeedbackCreateInfoKHR( VULKAN_HPP_NAMESPACE::VideoEncodeFeedbackFlagsKHR encodeFeedbackFlags_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , encodeFeedbackFlags{ encodeFeedbackFlags_ } { } VULKAN_HPP_CONSTEXPR QueryPoolVideoEncodeFeedbackCreateInfoKHR( QueryPoolVideoEncodeFeedbackCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; QueryPoolVideoEncodeFeedbackCreateInfoKHR( VkQueryPoolVideoEncodeFeedbackCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : QueryPoolVideoEncodeFeedbackCreateInfoKHR( *reinterpret_cast( &rhs ) ) { } QueryPoolVideoEncodeFeedbackCreateInfoKHR & operator=( QueryPoolVideoEncodeFeedbackCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ QueryPoolVideoEncodeFeedbackCreateInfoKHR & operator=( VkQueryPoolVideoEncodeFeedbackCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 QueryPoolVideoEncodeFeedbackCreateInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 QueryPoolVideoEncodeFeedbackCreateInfoKHR & setEncodeFeedbackFlags( VULKAN_HPP_NAMESPACE::VideoEncodeFeedbackFlagsKHR encodeFeedbackFlags_ ) VULKAN_HPP_NOEXCEPT { encodeFeedbackFlags = encodeFeedbackFlags_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkQueryPoolVideoEncodeFeedbackCreateInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkQueryPoolVideoEncodeFeedbackCreateInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, encodeFeedbackFlags ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( QueryPoolVideoEncodeFeedbackCreateInfoKHR const & ) const = default; #else bool operator==( QueryPoolVideoEncodeFeedbackCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( encodeFeedbackFlags == rhs.encodeFeedbackFlags ); # endif } bool operator!=( QueryPoolVideoEncodeFeedbackCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eQueryPoolVideoEncodeFeedbackCreateInfoKHR; const void * pNext = {}; VULKAN_HPP_NAMESPACE::VideoEncodeFeedbackFlagsKHR encodeFeedbackFlags = {}; }; template <> struct CppType { using Type = QueryPoolVideoEncodeFeedbackCreateInfoKHR; }; struct QueueFamilyCheckpointProperties2NV { using NativeType = VkQueueFamilyCheckpointProperties2NV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eQueueFamilyCheckpointProperties2NV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR QueueFamilyCheckpointProperties2NV( VULKAN_HPP_NAMESPACE::PipelineStageFlags2 checkpointExecutionStageMask_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , checkpointExecutionStageMask{ checkpointExecutionStageMask_ } { } VULKAN_HPP_CONSTEXPR QueueFamilyCheckpointProperties2NV( QueueFamilyCheckpointProperties2NV const & rhs ) VULKAN_HPP_NOEXCEPT = default; QueueFamilyCheckpointProperties2NV( VkQueueFamilyCheckpointProperties2NV const & rhs ) VULKAN_HPP_NOEXCEPT : QueueFamilyCheckpointProperties2NV( *reinterpret_cast( &rhs ) ) { } QueueFamilyCheckpointProperties2NV & operator=( QueueFamilyCheckpointProperties2NV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ QueueFamilyCheckpointProperties2NV & operator=( VkQueueFamilyCheckpointProperties2NV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkQueueFamilyCheckpointProperties2NV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkQueueFamilyCheckpointProperties2NV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, checkpointExecutionStageMask ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( QueueFamilyCheckpointProperties2NV const & ) const = default; #else bool operator==( QueueFamilyCheckpointProperties2NV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( checkpointExecutionStageMask == rhs.checkpointExecutionStageMask ); # endif } bool operator!=( QueueFamilyCheckpointProperties2NV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eQueueFamilyCheckpointProperties2NV; void * pNext = {}; VULKAN_HPP_NAMESPACE::PipelineStageFlags2 checkpointExecutionStageMask = {}; }; template <> struct CppType { using Type = QueueFamilyCheckpointProperties2NV; }; struct QueueFamilyCheckpointPropertiesNV { using NativeType = VkQueueFamilyCheckpointPropertiesNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eQueueFamilyCheckpointPropertiesNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR QueueFamilyCheckpointPropertiesNV( VULKAN_HPP_NAMESPACE::PipelineStageFlags checkpointExecutionStageMask_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , checkpointExecutionStageMask{ checkpointExecutionStageMask_ } { } VULKAN_HPP_CONSTEXPR QueueFamilyCheckpointPropertiesNV( QueueFamilyCheckpointPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; QueueFamilyCheckpointPropertiesNV( VkQueueFamilyCheckpointPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT : QueueFamilyCheckpointPropertiesNV( *reinterpret_cast( &rhs ) ) { } QueueFamilyCheckpointPropertiesNV & operator=( QueueFamilyCheckpointPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ QueueFamilyCheckpointPropertiesNV & operator=( VkQueueFamilyCheckpointPropertiesNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkQueueFamilyCheckpointPropertiesNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkQueueFamilyCheckpointPropertiesNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, checkpointExecutionStageMask ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( QueueFamilyCheckpointPropertiesNV const & ) const = default; #else bool operator==( QueueFamilyCheckpointPropertiesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( checkpointExecutionStageMask == rhs.checkpointExecutionStageMask ); # endif } bool operator!=( QueueFamilyCheckpointPropertiesNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eQueueFamilyCheckpointPropertiesNV; void * pNext = {}; VULKAN_HPP_NAMESPACE::PipelineStageFlags checkpointExecutionStageMask = {}; }; template <> struct CppType { using Type = QueueFamilyCheckpointPropertiesNV; }; struct QueueFamilyGlobalPriorityProperties { using NativeType = VkQueueFamilyGlobalPriorityProperties; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eQueueFamilyGlobalPriorityProperties; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 QueueFamilyGlobalPriorityProperties( uint32_t priorityCount_ = {}, std::array const & priorities_ = { { VULKAN_HPP_NAMESPACE::QueueGlobalPriority::eLow, VULKAN_HPP_NAMESPACE::QueueGlobalPriority::eLow, VULKAN_HPP_NAMESPACE::QueueGlobalPriority::eLow, VULKAN_HPP_NAMESPACE::QueueGlobalPriority::eLow, VULKAN_HPP_NAMESPACE::QueueGlobalPriority::eLow, VULKAN_HPP_NAMESPACE::QueueGlobalPriority::eLow, VULKAN_HPP_NAMESPACE::QueueGlobalPriority::eLow, VULKAN_HPP_NAMESPACE::QueueGlobalPriority::eLow, VULKAN_HPP_NAMESPACE::QueueGlobalPriority::eLow, VULKAN_HPP_NAMESPACE::QueueGlobalPriority::eLow, VULKAN_HPP_NAMESPACE::QueueGlobalPriority::eLow, VULKAN_HPP_NAMESPACE::QueueGlobalPriority::eLow, VULKAN_HPP_NAMESPACE::QueueGlobalPriority::eLow, VULKAN_HPP_NAMESPACE::QueueGlobalPriority::eLow, VULKAN_HPP_NAMESPACE::QueueGlobalPriority::eLow, VULKAN_HPP_NAMESPACE::QueueGlobalPriority::eLow } }, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , priorityCount{ priorityCount_ } , priorities{ priorities_ } { } VULKAN_HPP_CONSTEXPR_14 QueueFamilyGlobalPriorityProperties( QueueFamilyGlobalPriorityProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; QueueFamilyGlobalPriorityProperties( VkQueueFamilyGlobalPriorityProperties const & rhs ) VULKAN_HPP_NOEXCEPT : QueueFamilyGlobalPriorityProperties( *reinterpret_cast( &rhs ) ) { } QueueFamilyGlobalPriorityProperties & operator=( QueueFamilyGlobalPriorityProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ QueueFamilyGlobalPriorityProperties & operator=( VkQueueFamilyGlobalPriorityProperties const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkQueueFamilyGlobalPriorityProperties const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkQueueFamilyGlobalPriorityProperties &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple const &> # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, priorityCount, priorities ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) std::strong_ordering operator<=>( QueueFamilyGlobalPriorityProperties const & rhs ) const VULKAN_HPP_NOEXCEPT { if ( auto cmp = sType <=> rhs.sType; cmp != 0 ) return cmp; if ( auto cmp = pNext <=> rhs.pNext; cmp != 0 ) return cmp; if ( auto cmp = priorityCount <=> rhs.priorityCount; cmp != 0 ) return cmp; for ( size_t i = 0; i < priorityCount; ++i ) { if ( auto cmp = priorities[i] <=> rhs.priorities[i]; cmp != 0 ) return cmp; } return std::strong_ordering::equivalent; } #endif bool operator==( QueueFamilyGlobalPriorityProperties const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( priorityCount == rhs.priorityCount ) && ( memcmp( priorities, rhs.priorities, priorityCount * sizeof( VULKAN_HPP_NAMESPACE::QueueGlobalPriority ) ) == 0 ); } bool operator!=( QueueFamilyGlobalPriorityProperties const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eQueueFamilyGlobalPriorityProperties; void * pNext = {}; uint32_t priorityCount = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D priorities = {}; }; template <> struct CppType { using Type = QueueFamilyGlobalPriorityProperties; }; using QueueFamilyGlobalPriorityPropertiesEXT = QueueFamilyGlobalPriorityProperties; using QueueFamilyGlobalPriorityPropertiesKHR = QueueFamilyGlobalPriorityProperties; struct QueueFamilyProperties { using NativeType = VkQueueFamilyProperties; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR QueueFamilyProperties( VULKAN_HPP_NAMESPACE::QueueFlags queueFlags_ = {}, uint32_t queueCount_ = {}, uint32_t timestampValidBits_ = {}, VULKAN_HPP_NAMESPACE::Extent3D minImageTransferGranularity_ = {} ) VULKAN_HPP_NOEXCEPT : queueFlags{ queueFlags_ } , queueCount{ queueCount_ } , timestampValidBits{ timestampValidBits_ } , minImageTransferGranularity{ minImageTransferGranularity_ } { } VULKAN_HPP_CONSTEXPR QueueFamilyProperties( QueueFamilyProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; QueueFamilyProperties( VkQueueFamilyProperties const & rhs ) VULKAN_HPP_NOEXCEPT : QueueFamilyProperties( *reinterpret_cast( &rhs ) ) { } QueueFamilyProperties & operator=( QueueFamilyProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ QueueFamilyProperties & operator=( VkQueueFamilyProperties const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkQueueFamilyProperties const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkQueueFamilyProperties &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( queueFlags, queueCount, timestampValidBits, minImageTransferGranularity ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( QueueFamilyProperties const & ) const = default; #else bool operator==( QueueFamilyProperties const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( queueFlags == rhs.queueFlags ) && ( queueCount == rhs.queueCount ) && ( timestampValidBits == rhs.timestampValidBits ) && ( minImageTransferGranularity == rhs.minImageTransferGranularity ); # endif } bool operator!=( QueueFamilyProperties const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::QueueFlags queueFlags = {}; uint32_t queueCount = {}; uint32_t timestampValidBits = {}; VULKAN_HPP_NAMESPACE::Extent3D minImageTransferGranularity = {}; }; struct QueueFamilyProperties2 { using NativeType = VkQueueFamilyProperties2; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eQueueFamilyProperties2; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR QueueFamilyProperties2( VULKAN_HPP_NAMESPACE::QueueFamilyProperties queueFamilyProperties_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , queueFamilyProperties{ queueFamilyProperties_ } { } VULKAN_HPP_CONSTEXPR QueueFamilyProperties2( QueueFamilyProperties2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; QueueFamilyProperties2( VkQueueFamilyProperties2 const & rhs ) VULKAN_HPP_NOEXCEPT : QueueFamilyProperties2( *reinterpret_cast( &rhs ) ) { } QueueFamilyProperties2 & operator=( QueueFamilyProperties2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ QueueFamilyProperties2 & operator=( VkQueueFamilyProperties2 const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkQueueFamilyProperties2 const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkQueueFamilyProperties2 &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, queueFamilyProperties ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( QueueFamilyProperties2 const & ) const = default; #else bool operator==( QueueFamilyProperties2 const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( queueFamilyProperties == rhs.queueFamilyProperties ); # endif } bool operator!=( QueueFamilyProperties2 const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eQueueFamilyProperties2; void * pNext = {}; VULKAN_HPP_NAMESPACE::QueueFamilyProperties queueFamilyProperties = {}; }; template <> struct CppType { using Type = QueueFamilyProperties2; }; using QueueFamilyProperties2KHR = QueueFamilyProperties2; struct QueueFamilyQueryResultStatusPropertiesKHR { using NativeType = VkQueueFamilyQueryResultStatusPropertiesKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eQueueFamilyQueryResultStatusPropertiesKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR QueueFamilyQueryResultStatusPropertiesKHR( VULKAN_HPP_NAMESPACE::Bool32 queryResultStatusSupport_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , queryResultStatusSupport{ queryResultStatusSupport_ } { } VULKAN_HPP_CONSTEXPR QueueFamilyQueryResultStatusPropertiesKHR( QueueFamilyQueryResultStatusPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; QueueFamilyQueryResultStatusPropertiesKHR( VkQueueFamilyQueryResultStatusPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT : QueueFamilyQueryResultStatusPropertiesKHR( *reinterpret_cast( &rhs ) ) { } QueueFamilyQueryResultStatusPropertiesKHR & operator=( QueueFamilyQueryResultStatusPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ QueueFamilyQueryResultStatusPropertiesKHR & operator=( VkQueueFamilyQueryResultStatusPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkQueueFamilyQueryResultStatusPropertiesKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkQueueFamilyQueryResultStatusPropertiesKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, queryResultStatusSupport ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( QueueFamilyQueryResultStatusPropertiesKHR const & ) const = default; #else bool operator==( QueueFamilyQueryResultStatusPropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( queryResultStatusSupport == rhs.queryResultStatusSupport ); # endif } bool operator!=( QueueFamilyQueryResultStatusPropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eQueueFamilyQueryResultStatusPropertiesKHR; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 queryResultStatusSupport = {}; }; template <> struct CppType { using Type = QueueFamilyQueryResultStatusPropertiesKHR; }; struct QueueFamilyVideoPropertiesKHR { using NativeType = VkQueueFamilyVideoPropertiesKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eQueueFamilyVideoPropertiesKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR QueueFamilyVideoPropertiesKHR( VULKAN_HPP_NAMESPACE::VideoCodecOperationFlagsKHR videoCodecOperations_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , videoCodecOperations{ videoCodecOperations_ } { } VULKAN_HPP_CONSTEXPR QueueFamilyVideoPropertiesKHR( QueueFamilyVideoPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; QueueFamilyVideoPropertiesKHR( VkQueueFamilyVideoPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT : QueueFamilyVideoPropertiesKHR( *reinterpret_cast( &rhs ) ) { } QueueFamilyVideoPropertiesKHR & operator=( QueueFamilyVideoPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ QueueFamilyVideoPropertiesKHR & operator=( VkQueueFamilyVideoPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkQueueFamilyVideoPropertiesKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkQueueFamilyVideoPropertiesKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, videoCodecOperations ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( QueueFamilyVideoPropertiesKHR const & ) const = default; #else bool operator==( QueueFamilyVideoPropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( videoCodecOperations == rhs.videoCodecOperations ); # endif } bool operator!=( QueueFamilyVideoPropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eQueueFamilyVideoPropertiesKHR; void * pNext = {}; VULKAN_HPP_NAMESPACE::VideoCodecOperationFlagsKHR videoCodecOperations = {}; }; template <> struct CppType { using Type = QueueFamilyVideoPropertiesKHR; }; struct RayTracingPipelineClusterAccelerationStructureCreateInfoNV { using NativeType = VkRayTracingPipelineClusterAccelerationStructureCreateInfoNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eRayTracingPipelineClusterAccelerationStructureCreateInfoNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR RayTracingPipelineClusterAccelerationStructureCreateInfoNV( VULKAN_HPP_NAMESPACE::Bool32 allowClusterAccelerationStructure_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , allowClusterAccelerationStructure{ allowClusterAccelerationStructure_ } { } VULKAN_HPP_CONSTEXPR RayTracingPipelineClusterAccelerationStructureCreateInfoNV( RayTracingPipelineClusterAccelerationStructureCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; RayTracingPipelineClusterAccelerationStructureCreateInfoNV( VkRayTracingPipelineClusterAccelerationStructureCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT : RayTracingPipelineClusterAccelerationStructureCreateInfoNV( *reinterpret_cast( &rhs ) ) { } RayTracingPipelineClusterAccelerationStructureCreateInfoNV & operator=( RayTracingPipelineClusterAccelerationStructureCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ RayTracingPipelineClusterAccelerationStructureCreateInfoNV & operator=( VkRayTracingPipelineClusterAccelerationStructureCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 RayTracingPipelineClusterAccelerationStructureCreateInfoNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 RayTracingPipelineClusterAccelerationStructureCreateInfoNV & setAllowClusterAccelerationStructure( VULKAN_HPP_NAMESPACE::Bool32 allowClusterAccelerationStructure_ ) VULKAN_HPP_NOEXCEPT { allowClusterAccelerationStructure = allowClusterAccelerationStructure_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkRayTracingPipelineClusterAccelerationStructureCreateInfoNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkRayTracingPipelineClusterAccelerationStructureCreateInfoNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, allowClusterAccelerationStructure ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( RayTracingPipelineClusterAccelerationStructureCreateInfoNV const & ) const = default; #else bool operator==( RayTracingPipelineClusterAccelerationStructureCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( allowClusterAccelerationStructure == rhs.allowClusterAccelerationStructure ); # endif } bool operator!=( RayTracingPipelineClusterAccelerationStructureCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eRayTracingPipelineClusterAccelerationStructureCreateInfoNV; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 allowClusterAccelerationStructure = {}; }; template <> struct CppType { using Type = RayTracingPipelineClusterAccelerationStructureCreateInfoNV; }; struct RayTracingShaderGroupCreateInfoKHR { using NativeType = VkRayTracingShaderGroupCreateInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eRayTracingShaderGroupCreateInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR RayTracingShaderGroupCreateInfoKHR( VULKAN_HPP_NAMESPACE::RayTracingShaderGroupTypeKHR type_ = VULKAN_HPP_NAMESPACE::RayTracingShaderGroupTypeKHR::eGeneral, uint32_t generalShader_ = VULKAN_HPP_NAMESPACE::ShaderUnusedKHR, uint32_t closestHitShader_ = VULKAN_HPP_NAMESPACE::ShaderUnusedKHR, uint32_t anyHitShader_ = VULKAN_HPP_NAMESPACE::ShaderUnusedKHR, uint32_t intersectionShader_ = VULKAN_HPP_NAMESPACE::ShaderUnusedKHR, const void * pShaderGroupCaptureReplayHandle_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , type{ type_ } , generalShader{ generalShader_ } , closestHitShader{ closestHitShader_ } , anyHitShader{ anyHitShader_ } , intersectionShader{ intersectionShader_ } , pShaderGroupCaptureReplayHandle{ pShaderGroupCaptureReplayHandle_ } { } VULKAN_HPP_CONSTEXPR RayTracingShaderGroupCreateInfoKHR( RayTracingShaderGroupCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; RayTracingShaderGroupCreateInfoKHR( VkRayTracingShaderGroupCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : RayTracingShaderGroupCreateInfoKHR( *reinterpret_cast( &rhs ) ) { } RayTracingShaderGroupCreateInfoKHR & operator=( RayTracingShaderGroupCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ RayTracingShaderGroupCreateInfoKHR & operator=( VkRayTracingShaderGroupCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 RayTracingShaderGroupCreateInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 RayTracingShaderGroupCreateInfoKHR & setType( VULKAN_HPP_NAMESPACE::RayTracingShaderGroupTypeKHR type_ ) VULKAN_HPP_NOEXCEPT { type = type_; return *this; } VULKAN_HPP_CONSTEXPR_14 RayTracingShaderGroupCreateInfoKHR & setGeneralShader( uint32_t generalShader_ ) VULKAN_HPP_NOEXCEPT { generalShader = generalShader_; return *this; } VULKAN_HPP_CONSTEXPR_14 RayTracingShaderGroupCreateInfoKHR & setClosestHitShader( uint32_t closestHitShader_ ) VULKAN_HPP_NOEXCEPT { closestHitShader = closestHitShader_; return *this; } VULKAN_HPP_CONSTEXPR_14 RayTracingShaderGroupCreateInfoKHR & setAnyHitShader( uint32_t anyHitShader_ ) VULKAN_HPP_NOEXCEPT { anyHitShader = anyHitShader_; return *this; } VULKAN_HPP_CONSTEXPR_14 RayTracingShaderGroupCreateInfoKHR & setIntersectionShader( uint32_t intersectionShader_ ) VULKAN_HPP_NOEXCEPT { intersectionShader = intersectionShader_; return *this; } VULKAN_HPP_CONSTEXPR_14 RayTracingShaderGroupCreateInfoKHR & setPShaderGroupCaptureReplayHandle( const void * pShaderGroupCaptureReplayHandle_ ) VULKAN_HPP_NOEXCEPT { pShaderGroupCaptureReplayHandle = pShaderGroupCaptureReplayHandle_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkRayTracingShaderGroupCreateInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkRayTracingShaderGroupCreateInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, type, generalShader, closestHitShader, anyHitShader, intersectionShader, pShaderGroupCaptureReplayHandle ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( RayTracingShaderGroupCreateInfoKHR const & ) const = default; #else bool operator==( RayTracingShaderGroupCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( type == rhs.type ) && ( generalShader == rhs.generalShader ) && ( closestHitShader == rhs.closestHitShader ) && ( anyHitShader == rhs.anyHitShader ) && ( intersectionShader == rhs.intersectionShader ) && ( pShaderGroupCaptureReplayHandle == rhs.pShaderGroupCaptureReplayHandle ); # endif } bool operator!=( RayTracingShaderGroupCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eRayTracingShaderGroupCreateInfoKHR; const void * pNext = {}; VULKAN_HPP_NAMESPACE::RayTracingShaderGroupTypeKHR type = VULKAN_HPP_NAMESPACE::RayTracingShaderGroupTypeKHR::eGeneral; uint32_t generalShader = VULKAN_HPP_NAMESPACE::ShaderUnusedKHR; uint32_t closestHitShader = VULKAN_HPP_NAMESPACE::ShaderUnusedKHR; uint32_t anyHitShader = VULKAN_HPP_NAMESPACE::ShaderUnusedKHR; uint32_t intersectionShader = VULKAN_HPP_NAMESPACE::ShaderUnusedKHR; const void * pShaderGroupCaptureReplayHandle = {}; }; template <> struct CppType { using Type = RayTracingShaderGroupCreateInfoKHR; }; struct RayTracingPipelineInterfaceCreateInfoKHR { using NativeType = VkRayTracingPipelineInterfaceCreateInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eRayTracingPipelineInterfaceCreateInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR RayTracingPipelineInterfaceCreateInfoKHR( uint32_t maxPipelineRayPayloadSize_ = {}, uint32_t maxPipelineRayHitAttributeSize_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , maxPipelineRayPayloadSize{ maxPipelineRayPayloadSize_ } , maxPipelineRayHitAttributeSize{ maxPipelineRayHitAttributeSize_ } { } VULKAN_HPP_CONSTEXPR RayTracingPipelineInterfaceCreateInfoKHR( RayTracingPipelineInterfaceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; RayTracingPipelineInterfaceCreateInfoKHR( VkRayTracingPipelineInterfaceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : RayTracingPipelineInterfaceCreateInfoKHR( *reinterpret_cast( &rhs ) ) { } RayTracingPipelineInterfaceCreateInfoKHR & operator=( RayTracingPipelineInterfaceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ RayTracingPipelineInterfaceCreateInfoKHR & operator=( VkRayTracingPipelineInterfaceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 RayTracingPipelineInterfaceCreateInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 RayTracingPipelineInterfaceCreateInfoKHR & setMaxPipelineRayPayloadSize( uint32_t maxPipelineRayPayloadSize_ ) VULKAN_HPP_NOEXCEPT { maxPipelineRayPayloadSize = maxPipelineRayPayloadSize_; return *this; } VULKAN_HPP_CONSTEXPR_14 RayTracingPipelineInterfaceCreateInfoKHR & setMaxPipelineRayHitAttributeSize( uint32_t maxPipelineRayHitAttributeSize_ ) VULKAN_HPP_NOEXCEPT { maxPipelineRayHitAttributeSize = maxPipelineRayHitAttributeSize_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkRayTracingPipelineInterfaceCreateInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkRayTracingPipelineInterfaceCreateInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, maxPipelineRayPayloadSize, maxPipelineRayHitAttributeSize ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( RayTracingPipelineInterfaceCreateInfoKHR const & ) const = default; #else bool operator==( RayTracingPipelineInterfaceCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( maxPipelineRayPayloadSize == rhs.maxPipelineRayPayloadSize ) && ( maxPipelineRayHitAttributeSize == rhs.maxPipelineRayHitAttributeSize ); # endif } bool operator!=( RayTracingPipelineInterfaceCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eRayTracingPipelineInterfaceCreateInfoKHR; const void * pNext = {}; uint32_t maxPipelineRayPayloadSize = {}; uint32_t maxPipelineRayHitAttributeSize = {}; }; template <> struct CppType { using Type = RayTracingPipelineInterfaceCreateInfoKHR; }; struct RayTracingPipelineCreateInfoKHR { using NativeType = VkRayTracingPipelineCreateInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eRayTracingPipelineCreateInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR RayTracingPipelineCreateInfoKHR( VULKAN_HPP_NAMESPACE::PipelineCreateFlags flags_ = {}, uint32_t stageCount_ = {}, const VULKAN_HPP_NAMESPACE::PipelineShaderStageCreateInfo * pStages_ = {}, uint32_t groupCount_ = {}, const VULKAN_HPP_NAMESPACE::RayTracingShaderGroupCreateInfoKHR * pGroups_ = {}, uint32_t maxPipelineRayRecursionDepth_ = {}, const VULKAN_HPP_NAMESPACE::PipelineLibraryCreateInfoKHR * pLibraryInfo_ = {}, const VULKAN_HPP_NAMESPACE::RayTracingPipelineInterfaceCreateInfoKHR * pLibraryInterface_ = {}, const VULKAN_HPP_NAMESPACE::PipelineDynamicStateCreateInfo * pDynamicState_ = {}, VULKAN_HPP_NAMESPACE::PipelineLayout layout_ = {}, VULKAN_HPP_NAMESPACE::Pipeline basePipelineHandle_ = {}, int32_t basePipelineIndex_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , stageCount{ stageCount_ } , pStages{ pStages_ } , groupCount{ groupCount_ } , pGroups{ pGroups_ } , maxPipelineRayRecursionDepth{ maxPipelineRayRecursionDepth_ } , pLibraryInfo{ pLibraryInfo_ } , pLibraryInterface{ pLibraryInterface_ } , pDynamicState{ pDynamicState_ } , layout{ layout_ } , basePipelineHandle{ basePipelineHandle_ } , basePipelineIndex{ basePipelineIndex_ } { } VULKAN_HPP_CONSTEXPR RayTracingPipelineCreateInfoKHR( RayTracingPipelineCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; RayTracingPipelineCreateInfoKHR( VkRayTracingPipelineCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : RayTracingPipelineCreateInfoKHR( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) RayTracingPipelineCreateInfoKHR( VULKAN_HPP_NAMESPACE::PipelineCreateFlags flags_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & stages_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & groups_ = {}, uint32_t maxPipelineRayRecursionDepth_ = {}, const VULKAN_HPP_NAMESPACE::PipelineLibraryCreateInfoKHR * pLibraryInfo_ = {}, const VULKAN_HPP_NAMESPACE::RayTracingPipelineInterfaceCreateInfoKHR * pLibraryInterface_ = {}, const VULKAN_HPP_NAMESPACE::PipelineDynamicStateCreateInfo * pDynamicState_ = {}, VULKAN_HPP_NAMESPACE::PipelineLayout layout_ = {}, VULKAN_HPP_NAMESPACE::Pipeline basePipelineHandle_ = {}, int32_t basePipelineIndex_ = {}, const void * pNext_ = nullptr ) : pNext( pNext_ ) , flags( flags_ ) , stageCount( static_cast( stages_.size() ) ) , pStages( stages_.data() ) , groupCount( static_cast( groups_.size() ) ) , pGroups( groups_.data() ) , maxPipelineRayRecursionDepth( maxPipelineRayRecursionDepth_ ) , pLibraryInfo( pLibraryInfo_ ) , pLibraryInterface( pLibraryInterface_ ) , pDynamicState( pDynamicState_ ) , layout( layout_ ) , basePipelineHandle( basePipelineHandle_ ) , basePipelineIndex( basePipelineIndex_ ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ RayTracingPipelineCreateInfoKHR & operator=( RayTracingPipelineCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ RayTracingPipelineCreateInfoKHR & operator=( VkRayTracingPipelineCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 RayTracingPipelineCreateInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 RayTracingPipelineCreateInfoKHR & setFlags( VULKAN_HPP_NAMESPACE::PipelineCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 RayTracingPipelineCreateInfoKHR & setStageCount( uint32_t stageCount_ ) VULKAN_HPP_NOEXCEPT { stageCount = stageCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 RayTracingPipelineCreateInfoKHR & setPStages( const VULKAN_HPP_NAMESPACE::PipelineShaderStageCreateInfo * pStages_ ) VULKAN_HPP_NOEXCEPT { pStages = pStages_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) RayTracingPipelineCreateInfoKHR & setStages( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & stages_ ) VULKAN_HPP_NOEXCEPT { stageCount = static_cast( stages_.size() ); pStages = stages_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 RayTracingPipelineCreateInfoKHR & setGroupCount( uint32_t groupCount_ ) VULKAN_HPP_NOEXCEPT { groupCount = groupCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 RayTracingPipelineCreateInfoKHR & setPGroups( const VULKAN_HPP_NAMESPACE::RayTracingShaderGroupCreateInfoKHR * pGroups_ ) VULKAN_HPP_NOEXCEPT { pGroups = pGroups_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) RayTracingPipelineCreateInfoKHR & setGroups( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & groups_ ) VULKAN_HPP_NOEXCEPT { groupCount = static_cast( groups_.size() ); pGroups = groups_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 RayTracingPipelineCreateInfoKHR & setMaxPipelineRayRecursionDepth( uint32_t maxPipelineRayRecursionDepth_ ) VULKAN_HPP_NOEXCEPT { maxPipelineRayRecursionDepth = maxPipelineRayRecursionDepth_; return *this; } VULKAN_HPP_CONSTEXPR_14 RayTracingPipelineCreateInfoKHR & setPLibraryInfo( const VULKAN_HPP_NAMESPACE::PipelineLibraryCreateInfoKHR * pLibraryInfo_ ) VULKAN_HPP_NOEXCEPT { pLibraryInfo = pLibraryInfo_; return *this; } VULKAN_HPP_CONSTEXPR_14 RayTracingPipelineCreateInfoKHR & setPLibraryInterface( const VULKAN_HPP_NAMESPACE::RayTracingPipelineInterfaceCreateInfoKHR * pLibraryInterface_ ) VULKAN_HPP_NOEXCEPT { pLibraryInterface = pLibraryInterface_; return *this; } VULKAN_HPP_CONSTEXPR_14 RayTracingPipelineCreateInfoKHR & setPDynamicState( const VULKAN_HPP_NAMESPACE::PipelineDynamicStateCreateInfo * pDynamicState_ ) VULKAN_HPP_NOEXCEPT { pDynamicState = pDynamicState_; return *this; } VULKAN_HPP_CONSTEXPR_14 RayTracingPipelineCreateInfoKHR & setLayout( VULKAN_HPP_NAMESPACE::PipelineLayout layout_ ) VULKAN_HPP_NOEXCEPT { layout = layout_; return *this; } VULKAN_HPP_CONSTEXPR_14 RayTracingPipelineCreateInfoKHR & setBasePipelineHandle( VULKAN_HPP_NAMESPACE::Pipeline basePipelineHandle_ ) VULKAN_HPP_NOEXCEPT { basePipelineHandle = basePipelineHandle_; return *this; } VULKAN_HPP_CONSTEXPR_14 RayTracingPipelineCreateInfoKHR & setBasePipelineIndex( int32_t basePipelineIndex_ ) VULKAN_HPP_NOEXCEPT { basePipelineIndex = basePipelineIndex_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkRayTracingPipelineCreateInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkRayTracingPipelineCreateInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, stageCount, pStages, groupCount, pGroups, maxPipelineRayRecursionDepth, pLibraryInfo, pLibraryInterface, pDynamicState, layout, basePipelineHandle, basePipelineIndex ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( RayTracingPipelineCreateInfoKHR const & ) const = default; #else bool operator==( RayTracingPipelineCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( stageCount == rhs.stageCount ) && ( pStages == rhs.pStages ) && ( groupCount == rhs.groupCount ) && ( pGroups == rhs.pGroups ) && ( maxPipelineRayRecursionDepth == rhs.maxPipelineRayRecursionDepth ) && ( pLibraryInfo == rhs.pLibraryInfo ) && ( pLibraryInterface == rhs.pLibraryInterface ) && ( pDynamicState == rhs.pDynamicState ) && ( layout == rhs.layout ) && ( basePipelineHandle == rhs.basePipelineHandle ) && ( basePipelineIndex == rhs.basePipelineIndex ); # endif } bool operator!=( RayTracingPipelineCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eRayTracingPipelineCreateInfoKHR; const void * pNext = {}; VULKAN_HPP_NAMESPACE::PipelineCreateFlags flags = {}; uint32_t stageCount = {}; const VULKAN_HPP_NAMESPACE::PipelineShaderStageCreateInfo * pStages = {}; uint32_t groupCount = {}; const VULKAN_HPP_NAMESPACE::RayTracingShaderGroupCreateInfoKHR * pGroups = {}; uint32_t maxPipelineRayRecursionDepth = {}; const VULKAN_HPP_NAMESPACE::PipelineLibraryCreateInfoKHR * pLibraryInfo = {}; const VULKAN_HPP_NAMESPACE::RayTracingPipelineInterfaceCreateInfoKHR * pLibraryInterface = {}; const VULKAN_HPP_NAMESPACE::PipelineDynamicStateCreateInfo * pDynamicState = {}; VULKAN_HPP_NAMESPACE::PipelineLayout layout = {}; VULKAN_HPP_NAMESPACE::Pipeline basePipelineHandle = {}; int32_t basePipelineIndex = {}; }; template <> struct CppType { using Type = RayTracingPipelineCreateInfoKHR; }; struct RayTracingShaderGroupCreateInfoNV { using NativeType = VkRayTracingShaderGroupCreateInfoNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eRayTracingShaderGroupCreateInfoNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR RayTracingShaderGroupCreateInfoNV( VULKAN_HPP_NAMESPACE::RayTracingShaderGroupTypeKHR type_ = VULKAN_HPP_NAMESPACE::RayTracingShaderGroupTypeKHR::eGeneral, uint32_t generalShader_ = VULKAN_HPP_NAMESPACE::ShaderUnusedNV, uint32_t closestHitShader_ = VULKAN_HPP_NAMESPACE::ShaderUnusedNV, uint32_t anyHitShader_ = VULKAN_HPP_NAMESPACE::ShaderUnusedNV, uint32_t intersectionShader_ = VULKAN_HPP_NAMESPACE::ShaderUnusedNV, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , type{ type_ } , generalShader{ generalShader_ } , closestHitShader{ closestHitShader_ } , anyHitShader{ anyHitShader_ } , intersectionShader{ intersectionShader_ } { } VULKAN_HPP_CONSTEXPR RayTracingShaderGroupCreateInfoNV( RayTracingShaderGroupCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; RayTracingShaderGroupCreateInfoNV( VkRayTracingShaderGroupCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT : RayTracingShaderGroupCreateInfoNV( *reinterpret_cast( &rhs ) ) { } RayTracingShaderGroupCreateInfoNV & operator=( RayTracingShaderGroupCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ RayTracingShaderGroupCreateInfoNV & operator=( VkRayTracingShaderGroupCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 RayTracingShaderGroupCreateInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 RayTracingShaderGroupCreateInfoNV & setType( VULKAN_HPP_NAMESPACE::RayTracingShaderGroupTypeKHR type_ ) VULKAN_HPP_NOEXCEPT { type = type_; return *this; } VULKAN_HPP_CONSTEXPR_14 RayTracingShaderGroupCreateInfoNV & setGeneralShader( uint32_t generalShader_ ) VULKAN_HPP_NOEXCEPT { generalShader = generalShader_; return *this; } VULKAN_HPP_CONSTEXPR_14 RayTracingShaderGroupCreateInfoNV & setClosestHitShader( uint32_t closestHitShader_ ) VULKAN_HPP_NOEXCEPT { closestHitShader = closestHitShader_; return *this; } VULKAN_HPP_CONSTEXPR_14 RayTracingShaderGroupCreateInfoNV & setAnyHitShader( uint32_t anyHitShader_ ) VULKAN_HPP_NOEXCEPT { anyHitShader = anyHitShader_; return *this; } VULKAN_HPP_CONSTEXPR_14 RayTracingShaderGroupCreateInfoNV & setIntersectionShader( uint32_t intersectionShader_ ) VULKAN_HPP_NOEXCEPT { intersectionShader = intersectionShader_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkRayTracingShaderGroupCreateInfoNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkRayTracingShaderGroupCreateInfoNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, type, generalShader, closestHitShader, anyHitShader, intersectionShader ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( RayTracingShaderGroupCreateInfoNV const & ) const = default; #else bool operator==( RayTracingShaderGroupCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( type == rhs.type ) && ( generalShader == rhs.generalShader ) && ( closestHitShader == rhs.closestHitShader ) && ( anyHitShader == rhs.anyHitShader ) && ( intersectionShader == rhs.intersectionShader ); # endif } bool operator!=( RayTracingShaderGroupCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eRayTracingShaderGroupCreateInfoNV; const void * pNext = {}; VULKAN_HPP_NAMESPACE::RayTracingShaderGroupTypeKHR type = VULKAN_HPP_NAMESPACE::RayTracingShaderGroupTypeKHR::eGeneral; uint32_t generalShader = VULKAN_HPP_NAMESPACE::ShaderUnusedNV; uint32_t closestHitShader = VULKAN_HPP_NAMESPACE::ShaderUnusedNV; uint32_t anyHitShader = VULKAN_HPP_NAMESPACE::ShaderUnusedNV; uint32_t intersectionShader = VULKAN_HPP_NAMESPACE::ShaderUnusedNV; }; template <> struct CppType { using Type = RayTracingShaderGroupCreateInfoNV; }; struct RayTracingPipelineCreateInfoNV { using NativeType = VkRayTracingPipelineCreateInfoNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eRayTracingPipelineCreateInfoNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR RayTracingPipelineCreateInfoNV( VULKAN_HPP_NAMESPACE::PipelineCreateFlags flags_ = {}, uint32_t stageCount_ = {}, const VULKAN_HPP_NAMESPACE::PipelineShaderStageCreateInfo * pStages_ = {}, uint32_t groupCount_ = {}, const VULKAN_HPP_NAMESPACE::RayTracingShaderGroupCreateInfoNV * pGroups_ = {}, uint32_t maxRecursionDepth_ = {}, VULKAN_HPP_NAMESPACE::PipelineLayout layout_ = {}, VULKAN_HPP_NAMESPACE::Pipeline basePipelineHandle_ = {}, int32_t basePipelineIndex_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , stageCount{ stageCount_ } , pStages{ pStages_ } , groupCount{ groupCount_ } , pGroups{ pGroups_ } , maxRecursionDepth{ maxRecursionDepth_ } , layout{ layout_ } , basePipelineHandle{ basePipelineHandle_ } , basePipelineIndex{ basePipelineIndex_ } { } VULKAN_HPP_CONSTEXPR RayTracingPipelineCreateInfoNV( RayTracingPipelineCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; RayTracingPipelineCreateInfoNV( VkRayTracingPipelineCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT : RayTracingPipelineCreateInfoNV( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) RayTracingPipelineCreateInfoNV( VULKAN_HPP_NAMESPACE::PipelineCreateFlags flags_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & stages_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & groups_ = {}, uint32_t maxRecursionDepth_ = {}, VULKAN_HPP_NAMESPACE::PipelineLayout layout_ = {}, VULKAN_HPP_NAMESPACE::Pipeline basePipelineHandle_ = {}, int32_t basePipelineIndex_ = {}, const void * pNext_ = nullptr ) : pNext( pNext_ ) , flags( flags_ ) , stageCount( static_cast( stages_.size() ) ) , pStages( stages_.data() ) , groupCount( static_cast( groups_.size() ) ) , pGroups( groups_.data() ) , maxRecursionDepth( maxRecursionDepth_ ) , layout( layout_ ) , basePipelineHandle( basePipelineHandle_ ) , basePipelineIndex( basePipelineIndex_ ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ RayTracingPipelineCreateInfoNV & operator=( RayTracingPipelineCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ RayTracingPipelineCreateInfoNV & operator=( VkRayTracingPipelineCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 RayTracingPipelineCreateInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 RayTracingPipelineCreateInfoNV & setFlags( VULKAN_HPP_NAMESPACE::PipelineCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 RayTracingPipelineCreateInfoNV & setStageCount( uint32_t stageCount_ ) VULKAN_HPP_NOEXCEPT { stageCount = stageCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 RayTracingPipelineCreateInfoNV & setPStages( const VULKAN_HPP_NAMESPACE::PipelineShaderStageCreateInfo * pStages_ ) VULKAN_HPP_NOEXCEPT { pStages = pStages_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) RayTracingPipelineCreateInfoNV & setStages( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & stages_ ) VULKAN_HPP_NOEXCEPT { stageCount = static_cast( stages_.size() ); pStages = stages_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 RayTracingPipelineCreateInfoNV & setGroupCount( uint32_t groupCount_ ) VULKAN_HPP_NOEXCEPT { groupCount = groupCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 RayTracingPipelineCreateInfoNV & setPGroups( const VULKAN_HPP_NAMESPACE::RayTracingShaderGroupCreateInfoNV * pGroups_ ) VULKAN_HPP_NOEXCEPT { pGroups = pGroups_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) RayTracingPipelineCreateInfoNV & setGroups( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & groups_ ) VULKAN_HPP_NOEXCEPT { groupCount = static_cast( groups_.size() ); pGroups = groups_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 RayTracingPipelineCreateInfoNV & setMaxRecursionDepth( uint32_t maxRecursionDepth_ ) VULKAN_HPP_NOEXCEPT { maxRecursionDepth = maxRecursionDepth_; return *this; } VULKAN_HPP_CONSTEXPR_14 RayTracingPipelineCreateInfoNV & setLayout( VULKAN_HPP_NAMESPACE::PipelineLayout layout_ ) VULKAN_HPP_NOEXCEPT { layout = layout_; return *this; } VULKAN_HPP_CONSTEXPR_14 RayTracingPipelineCreateInfoNV & setBasePipelineHandle( VULKAN_HPP_NAMESPACE::Pipeline basePipelineHandle_ ) VULKAN_HPP_NOEXCEPT { basePipelineHandle = basePipelineHandle_; return *this; } VULKAN_HPP_CONSTEXPR_14 RayTracingPipelineCreateInfoNV & setBasePipelineIndex( int32_t basePipelineIndex_ ) VULKAN_HPP_NOEXCEPT { basePipelineIndex = basePipelineIndex_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkRayTracingPipelineCreateInfoNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkRayTracingPipelineCreateInfoNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, stageCount, pStages, groupCount, pGroups, maxRecursionDepth, layout, basePipelineHandle, basePipelineIndex ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( RayTracingPipelineCreateInfoNV const & ) const = default; #else bool operator==( RayTracingPipelineCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( stageCount == rhs.stageCount ) && ( pStages == rhs.pStages ) && ( groupCount == rhs.groupCount ) && ( pGroups == rhs.pGroups ) && ( maxRecursionDepth == rhs.maxRecursionDepth ) && ( layout == rhs.layout ) && ( basePipelineHandle == rhs.basePipelineHandle ) && ( basePipelineIndex == rhs.basePipelineIndex ); # endif } bool operator!=( RayTracingPipelineCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eRayTracingPipelineCreateInfoNV; const void * pNext = {}; VULKAN_HPP_NAMESPACE::PipelineCreateFlags flags = {}; uint32_t stageCount = {}; const VULKAN_HPP_NAMESPACE::PipelineShaderStageCreateInfo * pStages = {}; uint32_t groupCount = {}; const VULKAN_HPP_NAMESPACE::RayTracingShaderGroupCreateInfoNV * pGroups = {}; uint32_t maxRecursionDepth = {}; VULKAN_HPP_NAMESPACE::PipelineLayout layout = {}; VULKAN_HPP_NAMESPACE::Pipeline basePipelineHandle = {}; int32_t basePipelineIndex = {}; }; template <> struct CppType { using Type = RayTracingPipelineCreateInfoNV; }; struct RefreshCycleDurationGOOGLE { using NativeType = VkRefreshCycleDurationGOOGLE; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR RefreshCycleDurationGOOGLE( uint64_t refreshDuration_ = {} ) VULKAN_HPP_NOEXCEPT : refreshDuration{ refreshDuration_ } {} VULKAN_HPP_CONSTEXPR RefreshCycleDurationGOOGLE( RefreshCycleDurationGOOGLE const & rhs ) VULKAN_HPP_NOEXCEPT = default; RefreshCycleDurationGOOGLE( VkRefreshCycleDurationGOOGLE const & rhs ) VULKAN_HPP_NOEXCEPT : RefreshCycleDurationGOOGLE( *reinterpret_cast( &rhs ) ) { } RefreshCycleDurationGOOGLE & operator=( RefreshCycleDurationGOOGLE const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ RefreshCycleDurationGOOGLE & operator=( VkRefreshCycleDurationGOOGLE const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkRefreshCycleDurationGOOGLE const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkRefreshCycleDurationGOOGLE &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( refreshDuration ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( RefreshCycleDurationGOOGLE const & ) const = default; #else bool operator==( RefreshCycleDurationGOOGLE const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( refreshDuration == rhs.refreshDuration ); # endif } bool operator!=( RefreshCycleDurationGOOGLE const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: uint64_t refreshDuration = {}; }; struct ReleaseCapturedPipelineDataInfoKHR { using NativeType = VkReleaseCapturedPipelineDataInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eReleaseCapturedPipelineDataInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ReleaseCapturedPipelineDataInfoKHR( VULKAN_HPP_NAMESPACE::Pipeline pipeline_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , pipeline{ pipeline_ } { } VULKAN_HPP_CONSTEXPR ReleaseCapturedPipelineDataInfoKHR( ReleaseCapturedPipelineDataInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; ReleaseCapturedPipelineDataInfoKHR( VkReleaseCapturedPipelineDataInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : ReleaseCapturedPipelineDataInfoKHR( *reinterpret_cast( &rhs ) ) { } ReleaseCapturedPipelineDataInfoKHR & operator=( ReleaseCapturedPipelineDataInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ReleaseCapturedPipelineDataInfoKHR & operator=( VkReleaseCapturedPipelineDataInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ReleaseCapturedPipelineDataInfoKHR & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ReleaseCapturedPipelineDataInfoKHR & setPipeline( VULKAN_HPP_NAMESPACE::Pipeline pipeline_ ) VULKAN_HPP_NOEXCEPT { pipeline = pipeline_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkReleaseCapturedPipelineDataInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkReleaseCapturedPipelineDataInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, pipeline ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ReleaseCapturedPipelineDataInfoKHR const & ) const = default; #else bool operator==( ReleaseCapturedPipelineDataInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( pipeline == rhs.pipeline ); # endif } bool operator!=( ReleaseCapturedPipelineDataInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eReleaseCapturedPipelineDataInfoKHR; void * pNext = {}; VULKAN_HPP_NAMESPACE::Pipeline pipeline = {}; }; template <> struct CppType { using Type = ReleaseCapturedPipelineDataInfoKHR; }; struct ReleaseSwapchainImagesInfoEXT { using NativeType = VkReleaseSwapchainImagesInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eReleaseSwapchainImagesInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ReleaseSwapchainImagesInfoEXT( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain_ = {}, uint32_t imageIndexCount_ = {}, const uint32_t * pImageIndices_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , swapchain{ swapchain_ } , imageIndexCount{ imageIndexCount_ } , pImageIndices{ pImageIndices_ } { } VULKAN_HPP_CONSTEXPR ReleaseSwapchainImagesInfoEXT( ReleaseSwapchainImagesInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; ReleaseSwapchainImagesInfoEXT( VkReleaseSwapchainImagesInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : ReleaseSwapchainImagesInfoEXT( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) ReleaseSwapchainImagesInfoEXT( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & imageIndices_, const void * pNext_ = nullptr ) : pNext( pNext_ ), swapchain( swapchain_ ), imageIndexCount( static_cast( imageIndices_.size() ) ), pImageIndices( imageIndices_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ ReleaseSwapchainImagesInfoEXT & operator=( ReleaseSwapchainImagesInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ReleaseSwapchainImagesInfoEXT & operator=( VkReleaseSwapchainImagesInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ReleaseSwapchainImagesInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ReleaseSwapchainImagesInfoEXT & setSwapchain( VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain_ ) VULKAN_HPP_NOEXCEPT { swapchain = swapchain_; return *this; } VULKAN_HPP_CONSTEXPR_14 ReleaseSwapchainImagesInfoEXT & setImageIndexCount( uint32_t imageIndexCount_ ) VULKAN_HPP_NOEXCEPT { imageIndexCount = imageIndexCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 ReleaseSwapchainImagesInfoEXT & setPImageIndices( const uint32_t * pImageIndices_ ) VULKAN_HPP_NOEXCEPT { pImageIndices = pImageIndices_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) ReleaseSwapchainImagesInfoEXT & setImageIndices( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & imageIndices_ ) VULKAN_HPP_NOEXCEPT { imageIndexCount = static_cast( imageIndices_.size() ); pImageIndices = imageIndices_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkReleaseSwapchainImagesInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkReleaseSwapchainImagesInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, swapchain, imageIndexCount, pImageIndices ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ReleaseSwapchainImagesInfoEXT const & ) const = default; #else bool operator==( ReleaseSwapchainImagesInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( swapchain == rhs.swapchain ) && ( imageIndexCount == rhs.imageIndexCount ) && ( pImageIndices == rhs.pImageIndices ); # endif } bool operator!=( ReleaseSwapchainImagesInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eReleaseSwapchainImagesInfoEXT; const void * pNext = {}; VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain = {}; uint32_t imageIndexCount = {}; const uint32_t * pImageIndices = {}; }; template <> struct CppType { using Type = ReleaseSwapchainImagesInfoEXT; }; struct RenderPassAttachmentBeginInfo { using NativeType = VkRenderPassAttachmentBeginInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eRenderPassAttachmentBeginInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR RenderPassAttachmentBeginInfo( uint32_t attachmentCount_ = {}, const VULKAN_HPP_NAMESPACE::ImageView * pAttachments_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , attachmentCount{ attachmentCount_ } , pAttachments{ pAttachments_ } { } VULKAN_HPP_CONSTEXPR RenderPassAttachmentBeginInfo( RenderPassAttachmentBeginInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; RenderPassAttachmentBeginInfo( VkRenderPassAttachmentBeginInfo const & rhs ) VULKAN_HPP_NOEXCEPT : RenderPassAttachmentBeginInfo( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) RenderPassAttachmentBeginInfo( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & attachments_, const void * pNext_ = nullptr ) : pNext( pNext_ ), attachmentCount( static_cast( attachments_.size() ) ), pAttachments( attachments_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ RenderPassAttachmentBeginInfo & operator=( RenderPassAttachmentBeginInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ RenderPassAttachmentBeginInfo & operator=( VkRenderPassAttachmentBeginInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 RenderPassAttachmentBeginInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 RenderPassAttachmentBeginInfo & setAttachmentCount( uint32_t attachmentCount_ ) VULKAN_HPP_NOEXCEPT { attachmentCount = attachmentCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 RenderPassAttachmentBeginInfo & setPAttachments( const VULKAN_HPP_NAMESPACE::ImageView * pAttachments_ ) VULKAN_HPP_NOEXCEPT { pAttachments = pAttachments_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) RenderPassAttachmentBeginInfo & setAttachments( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & attachments_ ) VULKAN_HPP_NOEXCEPT { attachmentCount = static_cast( attachments_.size() ); pAttachments = attachments_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkRenderPassAttachmentBeginInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkRenderPassAttachmentBeginInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, attachmentCount, pAttachments ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( RenderPassAttachmentBeginInfo const & ) const = default; #else bool operator==( RenderPassAttachmentBeginInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( attachmentCount == rhs.attachmentCount ) && ( pAttachments == rhs.pAttachments ); # endif } bool operator!=( RenderPassAttachmentBeginInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eRenderPassAttachmentBeginInfo; const void * pNext = {}; uint32_t attachmentCount = {}; const VULKAN_HPP_NAMESPACE::ImageView * pAttachments = {}; }; template <> struct CppType { using Type = RenderPassAttachmentBeginInfo; }; using RenderPassAttachmentBeginInfoKHR = RenderPassAttachmentBeginInfo; struct RenderPassBeginInfo { using NativeType = VkRenderPassBeginInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eRenderPassBeginInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 RenderPassBeginInfo( VULKAN_HPP_NAMESPACE::RenderPass renderPass_ = {}, VULKAN_HPP_NAMESPACE::Framebuffer framebuffer_ = {}, VULKAN_HPP_NAMESPACE::Rect2D renderArea_ = {}, uint32_t clearValueCount_ = {}, const VULKAN_HPP_NAMESPACE::ClearValue * pClearValues_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , renderPass{ renderPass_ } , framebuffer{ framebuffer_ } , renderArea{ renderArea_ } , clearValueCount{ clearValueCount_ } , pClearValues{ pClearValues_ } { } VULKAN_HPP_CONSTEXPR_14 RenderPassBeginInfo( RenderPassBeginInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; RenderPassBeginInfo( VkRenderPassBeginInfo const & rhs ) VULKAN_HPP_NOEXCEPT : RenderPassBeginInfo( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) RenderPassBeginInfo( VULKAN_HPP_NAMESPACE::RenderPass renderPass_, VULKAN_HPP_NAMESPACE::Framebuffer framebuffer_, VULKAN_HPP_NAMESPACE::Rect2D renderArea_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & clearValues_, const void * pNext_ = nullptr ) : pNext( pNext_ ) , renderPass( renderPass_ ) , framebuffer( framebuffer_ ) , renderArea( renderArea_ ) , clearValueCount( static_cast( clearValues_.size() ) ) , pClearValues( clearValues_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ RenderPassBeginInfo & operator=( RenderPassBeginInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ RenderPassBeginInfo & operator=( VkRenderPassBeginInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 RenderPassBeginInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 RenderPassBeginInfo & setRenderPass( VULKAN_HPP_NAMESPACE::RenderPass renderPass_ ) VULKAN_HPP_NOEXCEPT { renderPass = renderPass_; return *this; } VULKAN_HPP_CONSTEXPR_14 RenderPassBeginInfo & setFramebuffer( VULKAN_HPP_NAMESPACE::Framebuffer framebuffer_ ) VULKAN_HPP_NOEXCEPT { framebuffer = framebuffer_; return *this; } VULKAN_HPP_CONSTEXPR_14 RenderPassBeginInfo & setRenderArea( VULKAN_HPP_NAMESPACE::Rect2D const & renderArea_ ) VULKAN_HPP_NOEXCEPT { renderArea = renderArea_; return *this; } VULKAN_HPP_CONSTEXPR_14 RenderPassBeginInfo & setClearValueCount( uint32_t clearValueCount_ ) VULKAN_HPP_NOEXCEPT { clearValueCount = clearValueCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 RenderPassBeginInfo & setPClearValues( const VULKAN_HPP_NAMESPACE::ClearValue * pClearValues_ ) VULKAN_HPP_NOEXCEPT { pClearValues = pClearValues_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) RenderPassBeginInfo & setClearValues( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & clearValues_ ) VULKAN_HPP_NOEXCEPT { clearValueCount = static_cast( clearValues_.size() ); pClearValues = clearValues_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkRenderPassBeginInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkRenderPassBeginInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, renderPass, framebuffer, renderArea, clearValueCount, pClearValues ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( RenderPassBeginInfo const & ) const = default; #else bool operator==( RenderPassBeginInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( renderPass == rhs.renderPass ) && ( framebuffer == rhs.framebuffer ) && ( renderArea == rhs.renderArea ) && ( clearValueCount == rhs.clearValueCount ) && ( pClearValues == rhs.pClearValues ); # endif } bool operator!=( RenderPassBeginInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eRenderPassBeginInfo; const void * pNext = {}; VULKAN_HPP_NAMESPACE::RenderPass renderPass = {}; VULKAN_HPP_NAMESPACE::Framebuffer framebuffer = {}; VULKAN_HPP_NAMESPACE::Rect2D renderArea = {}; uint32_t clearValueCount = {}; const VULKAN_HPP_NAMESPACE::ClearValue * pClearValues = {}; }; template <> struct CppType { using Type = RenderPassBeginInfo; }; struct SubpassDescription { using NativeType = VkSubpassDescription; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR SubpassDescription( VULKAN_HPP_NAMESPACE::SubpassDescriptionFlags flags_ = {}, VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint_ = VULKAN_HPP_NAMESPACE::PipelineBindPoint::eGraphics, uint32_t inputAttachmentCount_ = {}, const VULKAN_HPP_NAMESPACE::AttachmentReference * pInputAttachments_ = {}, uint32_t colorAttachmentCount_ = {}, const VULKAN_HPP_NAMESPACE::AttachmentReference * pColorAttachments_ = {}, const VULKAN_HPP_NAMESPACE::AttachmentReference * pResolveAttachments_ = {}, const VULKAN_HPP_NAMESPACE::AttachmentReference * pDepthStencilAttachment_ = {}, uint32_t preserveAttachmentCount_ = {}, const uint32_t * pPreserveAttachments_ = {} ) VULKAN_HPP_NOEXCEPT : flags{ flags_ } , pipelineBindPoint{ pipelineBindPoint_ } , inputAttachmentCount{ inputAttachmentCount_ } , pInputAttachments{ pInputAttachments_ } , colorAttachmentCount{ colorAttachmentCount_ } , pColorAttachments{ pColorAttachments_ } , pResolveAttachments{ pResolveAttachments_ } , pDepthStencilAttachment{ pDepthStencilAttachment_ } , preserveAttachmentCount{ preserveAttachmentCount_ } , pPreserveAttachments{ pPreserveAttachments_ } { } VULKAN_HPP_CONSTEXPR SubpassDescription( SubpassDescription const & rhs ) VULKAN_HPP_NOEXCEPT = default; SubpassDescription( VkSubpassDescription const & rhs ) VULKAN_HPP_NOEXCEPT : SubpassDescription( *reinterpret_cast( &rhs ) ) {} # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) SubpassDescription( VULKAN_HPP_NAMESPACE::SubpassDescriptionFlags flags_, VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & inputAttachments_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & colorAttachments_ = {}, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & resolveAttachments_ = {}, const VULKAN_HPP_NAMESPACE::AttachmentReference * pDepthStencilAttachment_ = {}, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & preserveAttachments_ = {} ) : flags( flags_ ) , pipelineBindPoint( pipelineBindPoint_ ) , inputAttachmentCount( static_cast( inputAttachments_.size() ) ) , pInputAttachments( inputAttachments_.data() ) , colorAttachmentCount( static_cast( colorAttachments_.size() ) ) , pColorAttachments( colorAttachments_.data() ) , pResolveAttachments( resolveAttachments_.data() ) , pDepthStencilAttachment( pDepthStencilAttachment_ ) , preserveAttachmentCount( static_cast( preserveAttachments_.size() ) ) , pPreserveAttachments( preserveAttachments_.data() ) { # ifdef VULKAN_HPP_NO_EXCEPTIONS VULKAN_HPP_ASSERT( resolveAttachments_.empty() || ( colorAttachments_.size() == resolveAttachments_.size() ) ); # else if ( !resolveAttachments_.empty() && ( colorAttachments_.size() != resolveAttachments_.size() ) ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::SubpassDescription::SubpassDescription: !resolveAttachments_.empty() && ( colorAttachments_.size() != resolveAttachments_.size() )" ); } # endif /*VULKAN_HPP_NO_EXCEPTIONS*/ } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ SubpassDescription & operator=( SubpassDescription const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ SubpassDescription & operator=( VkSubpassDescription const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 SubpassDescription & setFlags( VULKAN_HPP_NAMESPACE::SubpassDescriptionFlags flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 SubpassDescription & setPipelineBindPoint( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint_ ) VULKAN_HPP_NOEXCEPT { pipelineBindPoint = pipelineBindPoint_; return *this; } VULKAN_HPP_CONSTEXPR_14 SubpassDescription & setInputAttachmentCount( uint32_t inputAttachmentCount_ ) VULKAN_HPP_NOEXCEPT { inputAttachmentCount = inputAttachmentCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 SubpassDescription & setPInputAttachments( const VULKAN_HPP_NAMESPACE::AttachmentReference * pInputAttachments_ ) VULKAN_HPP_NOEXCEPT { pInputAttachments = pInputAttachments_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) SubpassDescription & setInputAttachments( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & inputAttachments_ ) VULKAN_HPP_NOEXCEPT { inputAttachmentCount = static_cast( inputAttachments_.size() ); pInputAttachments = inputAttachments_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 SubpassDescription & setColorAttachmentCount( uint32_t colorAttachmentCount_ ) VULKAN_HPP_NOEXCEPT { colorAttachmentCount = colorAttachmentCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 SubpassDescription & setPColorAttachments( const VULKAN_HPP_NAMESPACE::AttachmentReference * pColorAttachments_ ) VULKAN_HPP_NOEXCEPT { pColorAttachments = pColorAttachments_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) SubpassDescription & setColorAttachments( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & colorAttachments_ ) VULKAN_HPP_NOEXCEPT { colorAttachmentCount = static_cast( colorAttachments_.size() ); pColorAttachments = colorAttachments_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 SubpassDescription & setPResolveAttachments( const VULKAN_HPP_NAMESPACE::AttachmentReference * pResolveAttachments_ ) VULKAN_HPP_NOEXCEPT { pResolveAttachments = pResolveAttachments_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) SubpassDescription & setResolveAttachments( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & resolveAttachments_ ) VULKAN_HPP_NOEXCEPT { colorAttachmentCount = static_cast( resolveAttachments_.size() ); pResolveAttachments = resolveAttachments_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 SubpassDescription & setPDepthStencilAttachment( const VULKAN_HPP_NAMESPACE::AttachmentReference * pDepthStencilAttachment_ ) VULKAN_HPP_NOEXCEPT { pDepthStencilAttachment = pDepthStencilAttachment_; return *this; } VULKAN_HPP_CONSTEXPR_14 SubpassDescription & setPreserveAttachmentCount( uint32_t preserveAttachmentCount_ ) VULKAN_HPP_NOEXCEPT { preserveAttachmentCount = preserveAttachmentCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 SubpassDescription & setPPreserveAttachments( const uint32_t * pPreserveAttachments_ ) VULKAN_HPP_NOEXCEPT { pPreserveAttachments = pPreserveAttachments_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) SubpassDescription & setPreserveAttachments( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & preserveAttachments_ ) VULKAN_HPP_NOEXCEPT { preserveAttachmentCount = static_cast( preserveAttachments_.size() ); pPreserveAttachments = preserveAttachments_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkSubpassDescription const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkSubpassDescription &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( flags, pipelineBindPoint, inputAttachmentCount, pInputAttachments, colorAttachmentCount, pColorAttachments, pResolveAttachments, pDepthStencilAttachment, preserveAttachmentCount, pPreserveAttachments ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( SubpassDescription const & ) const = default; #else bool operator==( SubpassDescription const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( flags == rhs.flags ) && ( pipelineBindPoint == rhs.pipelineBindPoint ) && ( inputAttachmentCount == rhs.inputAttachmentCount ) && ( pInputAttachments == rhs.pInputAttachments ) && ( colorAttachmentCount == rhs.colorAttachmentCount ) && ( pColorAttachments == rhs.pColorAttachments ) && ( pResolveAttachments == rhs.pResolveAttachments ) && ( pDepthStencilAttachment == rhs.pDepthStencilAttachment ) && ( preserveAttachmentCount == rhs.preserveAttachmentCount ) && ( pPreserveAttachments == rhs.pPreserveAttachments ); # endif } bool operator!=( SubpassDescription const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::SubpassDescriptionFlags flags = {}; VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint = VULKAN_HPP_NAMESPACE::PipelineBindPoint::eGraphics; uint32_t inputAttachmentCount = {}; const VULKAN_HPP_NAMESPACE::AttachmentReference * pInputAttachments = {}; uint32_t colorAttachmentCount = {}; const VULKAN_HPP_NAMESPACE::AttachmentReference * pColorAttachments = {}; const VULKAN_HPP_NAMESPACE::AttachmentReference * pResolveAttachments = {}; const VULKAN_HPP_NAMESPACE::AttachmentReference * pDepthStencilAttachment = {}; uint32_t preserveAttachmentCount = {}; const uint32_t * pPreserveAttachments = {}; }; struct SubpassDependency { using NativeType = VkSubpassDependency; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR SubpassDependency( uint32_t srcSubpass_ = {}, uint32_t dstSubpass_ = {}, VULKAN_HPP_NAMESPACE::PipelineStageFlags srcStageMask_ = {}, VULKAN_HPP_NAMESPACE::PipelineStageFlags dstStageMask_ = {}, VULKAN_HPP_NAMESPACE::AccessFlags srcAccessMask_ = {}, VULKAN_HPP_NAMESPACE::AccessFlags dstAccessMask_ = {}, VULKAN_HPP_NAMESPACE::DependencyFlags dependencyFlags_ = {} ) VULKAN_HPP_NOEXCEPT : srcSubpass{ srcSubpass_ } , dstSubpass{ dstSubpass_ } , srcStageMask{ srcStageMask_ } , dstStageMask{ dstStageMask_ } , srcAccessMask{ srcAccessMask_ } , dstAccessMask{ dstAccessMask_ } , dependencyFlags{ dependencyFlags_ } { } VULKAN_HPP_CONSTEXPR SubpassDependency( SubpassDependency const & rhs ) VULKAN_HPP_NOEXCEPT = default; SubpassDependency( VkSubpassDependency const & rhs ) VULKAN_HPP_NOEXCEPT : SubpassDependency( *reinterpret_cast( &rhs ) ) {} SubpassDependency & operator=( SubpassDependency const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ SubpassDependency & operator=( VkSubpassDependency const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 SubpassDependency & setSrcSubpass( uint32_t srcSubpass_ ) VULKAN_HPP_NOEXCEPT { srcSubpass = srcSubpass_; return *this; } VULKAN_HPP_CONSTEXPR_14 SubpassDependency & setDstSubpass( uint32_t dstSubpass_ ) VULKAN_HPP_NOEXCEPT { dstSubpass = dstSubpass_; return *this; } VULKAN_HPP_CONSTEXPR_14 SubpassDependency & setSrcStageMask( VULKAN_HPP_NAMESPACE::PipelineStageFlags srcStageMask_ ) VULKAN_HPP_NOEXCEPT { srcStageMask = srcStageMask_; return *this; } VULKAN_HPP_CONSTEXPR_14 SubpassDependency & setDstStageMask( VULKAN_HPP_NAMESPACE::PipelineStageFlags dstStageMask_ ) VULKAN_HPP_NOEXCEPT { dstStageMask = dstStageMask_; return *this; } VULKAN_HPP_CONSTEXPR_14 SubpassDependency & setSrcAccessMask( VULKAN_HPP_NAMESPACE::AccessFlags srcAccessMask_ ) VULKAN_HPP_NOEXCEPT { srcAccessMask = srcAccessMask_; return *this; } VULKAN_HPP_CONSTEXPR_14 SubpassDependency & setDstAccessMask( VULKAN_HPP_NAMESPACE::AccessFlags dstAccessMask_ ) VULKAN_HPP_NOEXCEPT { dstAccessMask = dstAccessMask_; return *this; } VULKAN_HPP_CONSTEXPR_14 SubpassDependency & setDependencyFlags( VULKAN_HPP_NAMESPACE::DependencyFlags dependencyFlags_ ) VULKAN_HPP_NOEXCEPT { dependencyFlags = dependencyFlags_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkSubpassDependency const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkSubpassDependency &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( srcSubpass, dstSubpass, srcStageMask, dstStageMask, srcAccessMask, dstAccessMask, dependencyFlags ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( SubpassDependency const & ) const = default; #else bool operator==( SubpassDependency const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( srcSubpass == rhs.srcSubpass ) && ( dstSubpass == rhs.dstSubpass ) && ( srcStageMask == rhs.srcStageMask ) && ( dstStageMask == rhs.dstStageMask ) && ( srcAccessMask == rhs.srcAccessMask ) && ( dstAccessMask == rhs.dstAccessMask ) && ( dependencyFlags == rhs.dependencyFlags ); # endif } bool operator!=( SubpassDependency const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: uint32_t srcSubpass = {}; uint32_t dstSubpass = {}; VULKAN_HPP_NAMESPACE::PipelineStageFlags srcStageMask = {}; VULKAN_HPP_NAMESPACE::PipelineStageFlags dstStageMask = {}; VULKAN_HPP_NAMESPACE::AccessFlags srcAccessMask = {}; VULKAN_HPP_NAMESPACE::AccessFlags dstAccessMask = {}; VULKAN_HPP_NAMESPACE::DependencyFlags dependencyFlags = {}; }; struct RenderPassCreateInfo { using NativeType = VkRenderPassCreateInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eRenderPassCreateInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR RenderPassCreateInfo( VULKAN_HPP_NAMESPACE::RenderPassCreateFlags flags_ = {}, uint32_t attachmentCount_ = {}, const VULKAN_HPP_NAMESPACE::AttachmentDescription * pAttachments_ = {}, uint32_t subpassCount_ = {}, const VULKAN_HPP_NAMESPACE::SubpassDescription * pSubpasses_ = {}, uint32_t dependencyCount_ = {}, const VULKAN_HPP_NAMESPACE::SubpassDependency * pDependencies_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , attachmentCount{ attachmentCount_ } , pAttachments{ pAttachments_ } , subpassCount{ subpassCount_ } , pSubpasses{ pSubpasses_ } , dependencyCount{ dependencyCount_ } , pDependencies{ pDependencies_ } { } VULKAN_HPP_CONSTEXPR RenderPassCreateInfo( RenderPassCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; RenderPassCreateInfo( VkRenderPassCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT : RenderPassCreateInfo( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) RenderPassCreateInfo( VULKAN_HPP_NAMESPACE::RenderPassCreateFlags flags_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & attachments_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & subpasses_ = {}, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & dependencies_ = {}, const void * pNext_ = nullptr ) : pNext( pNext_ ) , flags( flags_ ) , attachmentCount( static_cast( attachments_.size() ) ) , pAttachments( attachments_.data() ) , subpassCount( static_cast( subpasses_.size() ) ) , pSubpasses( subpasses_.data() ) , dependencyCount( static_cast( dependencies_.size() ) ) , pDependencies( dependencies_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ RenderPassCreateInfo & operator=( RenderPassCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ RenderPassCreateInfo & operator=( VkRenderPassCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 RenderPassCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 RenderPassCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::RenderPassCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 RenderPassCreateInfo & setAttachmentCount( uint32_t attachmentCount_ ) VULKAN_HPP_NOEXCEPT { attachmentCount = attachmentCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 RenderPassCreateInfo & setPAttachments( const VULKAN_HPP_NAMESPACE::AttachmentDescription * pAttachments_ ) VULKAN_HPP_NOEXCEPT { pAttachments = pAttachments_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) RenderPassCreateInfo & setAttachments( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & attachments_ ) VULKAN_HPP_NOEXCEPT { attachmentCount = static_cast( attachments_.size() ); pAttachments = attachments_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 RenderPassCreateInfo & setSubpassCount( uint32_t subpassCount_ ) VULKAN_HPP_NOEXCEPT { subpassCount = subpassCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 RenderPassCreateInfo & setPSubpasses( const VULKAN_HPP_NAMESPACE::SubpassDescription * pSubpasses_ ) VULKAN_HPP_NOEXCEPT { pSubpasses = pSubpasses_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) RenderPassCreateInfo & setSubpasses( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & subpasses_ ) VULKAN_HPP_NOEXCEPT { subpassCount = static_cast( subpasses_.size() ); pSubpasses = subpasses_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 RenderPassCreateInfo & setDependencyCount( uint32_t dependencyCount_ ) VULKAN_HPP_NOEXCEPT { dependencyCount = dependencyCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 RenderPassCreateInfo & setPDependencies( const VULKAN_HPP_NAMESPACE::SubpassDependency * pDependencies_ ) VULKAN_HPP_NOEXCEPT { pDependencies = pDependencies_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) RenderPassCreateInfo & setDependencies( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & dependencies_ ) VULKAN_HPP_NOEXCEPT { dependencyCount = static_cast( dependencies_.size() ); pDependencies = dependencies_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkRenderPassCreateInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkRenderPassCreateInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, attachmentCount, pAttachments, subpassCount, pSubpasses, dependencyCount, pDependencies ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( RenderPassCreateInfo const & ) const = default; #else bool operator==( RenderPassCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( attachmentCount == rhs.attachmentCount ) && ( pAttachments == rhs.pAttachments ) && ( subpassCount == rhs.subpassCount ) && ( pSubpasses == rhs.pSubpasses ) && ( dependencyCount == rhs.dependencyCount ) && ( pDependencies == rhs.pDependencies ); # endif } bool operator!=( RenderPassCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eRenderPassCreateInfo; const void * pNext = {}; VULKAN_HPP_NAMESPACE::RenderPassCreateFlags flags = {}; uint32_t attachmentCount = {}; const VULKAN_HPP_NAMESPACE::AttachmentDescription * pAttachments = {}; uint32_t subpassCount = {}; const VULKAN_HPP_NAMESPACE::SubpassDescription * pSubpasses = {}; uint32_t dependencyCount = {}; const VULKAN_HPP_NAMESPACE::SubpassDependency * pDependencies = {}; }; template <> struct CppType { using Type = RenderPassCreateInfo; }; struct SubpassDescription2 { using NativeType = VkSubpassDescription2; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSubpassDescription2; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR SubpassDescription2( VULKAN_HPP_NAMESPACE::SubpassDescriptionFlags flags_ = {}, VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint_ = VULKAN_HPP_NAMESPACE::PipelineBindPoint::eGraphics, uint32_t viewMask_ = {}, uint32_t inputAttachmentCount_ = {}, const VULKAN_HPP_NAMESPACE::AttachmentReference2 * pInputAttachments_ = {}, uint32_t colorAttachmentCount_ = {}, const VULKAN_HPP_NAMESPACE::AttachmentReference2 * pColorAttachments_ = {}, const VULKAN_HPP_NAMESPACE::AttachmentReference2 * pResolveAttachments_ = {}, const VULKAN_HPP_NAMESPACE::AttachmentReference2 * pDepthStencilAttachment_ = {}, uint32_t preserveAttachmentCount_ = {}, const uint32_t * pPreserveAttachments_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , pipelineBindPoint{ pipelineBindPoint_ } , viewMask{ viewMask_ } , inputAttachmentCount{ inputAttachmentCount_ } , pInputAttachments{ pInputAttachments_ } , colorAttachmentCount{ colorAttachmentCount_ } , pColorAttachments{ pColorAttachments_ } , pResolveAttachments{ pResolveAttachments_ } , pDepthStencilAttachment{ pDepthStencilAttachment_ } , preserveAttachmentCount{ preserveAttachmentCount_ } , pPreserveAttachments{ pPreserveAttachments_ } { } VULKAN_HPP_CONSTEXPR SubpassDescription2( SubpassDescription2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; SubpassDescription2( VkSubpassDescription2 const & rhs ) VULKAN_HPP_NOEXCEPT : SubpassDescription2( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) SubpassDescription2( VULKAN_HPP_NAMESPACE::SubpassDescriptionFlags flags_, VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint_, uint32_t viewMask_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & inputAttachments_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & colorAttachments_ = {}, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & resolveAttachments_ = {}, const VULKAN_HPP_NAMESPACE::AttachmentReference2 * pDepthStencilAttachment_ = {}, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & preserveAttachments_ = {}, const void * pNext_ = nullptr ) : pNext( pNext_ ) , flags( flags_ ) , pipelineBindPoint( pipelineBindPoint_ ) , viewMask( viewMask_ ) , inputAttachmentCount( static_cast( inputAttachments_.size() ) ) , pInputAttachments( inputAttachments_.data() ) , colorAttachmentCount( static_cast( colorAttachments_.size() ) ) , pColorAttachments( colorAttachments_.data() ) , pResolveAttachments( resolveAttachments_.data() ) , pDepthStencilAttachment( pDepthStencilAttachment_ ) , preserveAttachmentCount( static_cast( preserveAttachments_.size() ) ) , pPreserveAttachments( preserveAttachments_.data() ) { # ifdef VULKAN_HPP_NO_EXCEPTIONS VULKAN_HPP_ASSERT( resolveAttachments_.empty() || ( colorAttachments_.size() == resolveAttachments_.size() ) ); # else if ( !resolveAttachments_.empty() && ( colorAttachments_.size() != resolveAttachments_.size() ) ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::SubpassDescription2::SubpassDescription2: !resolveAttachments_.empty() && ( colorAttachments_.size() != resolveAttachments_.size() )" ); } # endif /*VULKAN_HPP_NO_EXCEPTIONS*/ } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ SubpassDescription2 & operator=( SubpassDescription2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ SubpassDescription2 & operator=( VkSubpassDescription2 const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 SubpassDescription2 & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 SubpassDescription2 & setFlags( VULKAN_HPP_NAMESPACE::SubpassDescriptionFlags flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 SubpassDescription2 & setPipelineBindPoint( VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint_ ) VULKAN_HPP_NOEXCEPT { pipelineBindPoint = pipelineBindPoint_; return *this; } VULKAN_HPP_CONSTEXPR_14 SubpassDescription2 & setViewMask( uint32_t viewMask_ ) VULKAN_HPP_NOEXCEPT { viewMask = viewMask_; return *this; } VULKAN_HPP_CONSTEXPR_14 SubpassDescription2 & setInputAttachmentCount( uint32_t inputAttachmentCount_ ) VULKAN_HPP_NOEXCEPT { inputAttachmentCount = inputAttachmentCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 SubpassDescription2 & setPInputAttachments( const VULKAN_HPP_NAMESPACE::AttachmentReference2 * pInputAttachments_ ) VULKAN_HPP_NOEXCEPT { pInputAttachments = pInputAttachments_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) SubpassDescription2 & setInputAttachments( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & inputAttachments_ ) VULKAN_HPP_NOEXCEPT { inputAttachmentCount = static_cast( inputAttachments_.size() ); pInputAttachments = inputAttachments_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 SubpassDescription2 & setColorAttachmentCount( uint32_t colorAttachmentCount_ ) VULKAN_HPP_NOEXCEPT { colorAttachmentCount = colorAttachmentCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 SubpassDescription2 & setPColorAttachments( const VULKAN_HPP_NAMESPACE::AttachmentReference2 * pColorAttachments_ ) VULKAN_HPP_NOEXCEPT { pColorAttachments = pColorAttachments_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) SubpassDescription2 & setColorAttachments( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & colorAttachments_ ) VULKAN_HPP_NOEXCEPT { colorAttachmentCount = static_cast( colorAttachments_.size() ); pColorAttachments = colorAttachments_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 SubpassDescription2 & setPResolveAttachments( const VULKAN_HPP_NAMESPACE::AttachmentReference2 * pResolveAttachments_ ) VULKAN_HPP_NOEXCEPT { pResolveAttachments = pResolveAttachments_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) SubpassDescription2 & setResolveAttachments( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & resolveAttachments_ ) VULKAN_HPP_NOEXCEPT { colorAttachmentCount = static_cast( resolveAttachments_.size() ); pResolveAttachments = resolveAttachments_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 SubpassDescription2 & setPDepthStencilAttachment( const VULKAN_HPP_NAMESPACE::AttachmentReference2 * pDepthStencilAttachment_ ) VULKAN_HPP_NOEXCEPT { pDepthStencilAttachment = pDepthStencilAttachment_; return *this; } VULKAN_HPP_CONSTEXPR_14 SubpassDescription2 & setPreserveAttachmentCount( uint32_t preserveAttachmentCount_ ) VULKAN_HPP_NOEXCEPT { preserveAttachmentCount = preserveAttachmentCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 SubpassDescription2 & setPPreserveAttachments( const uint32_t * pPreserveAttachments_ ) VULKAN_HPP_NOEXCEPT { pPreserveAttachments = pPreserveAttachments_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) SubpassDescription2 & setPreserveAttachments( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & preserveAttachments_ ) VULKAN_HPP_NOEXCEPT { preserveAttachmentCount = static_cast( preserveAttachments_.size() ); pPreserveAttachments = preserveAttachments_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkSubpassDescription2 const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkSubpassDescription2 &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, pipelineBindPoint, viewMask, inputAttachmentCount, pInputAttachments, colorAttachmentCount, pColorAttachments, pResolveAttachments, pDepthStencilAttachment, preserveAttachmentCount, pPreserveAttachments ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( SubpassDescription2 const & ) const = default; #else bool operator==( SubpassDescription2 const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( pipelineBindPoint == rhs.pipelineBindPoint ) && ( viewMask == rhs.viewMask ) && ( inputAttachmentCount == rhs.inputAttachmentCount ) && ( pInputAttachments == rhs.pInputAttachments ) && ( colorAttachmentCount == rhs.colorAttachmentCount ) && ( pColorAttachments == rhs.pColorAttachments ) && ( pResolveAttachments == rhs.pResolveAttachments ) && ( pDepthStencilAttachment == rhs.pDepthStencilAttachment ) && ( preserveAttachmentCount == rhs.preserveAttachmentCount ) && ( pPreserveAttachments == rhs.pPreserveAttachments ); # endif } bool operator!=( SubpassDescription2 const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSubpassDescription2; const void * pNext = {}; VULKAN_HPP_NAMESPACE::SubpassDescriptionFlags flags = {}; VULKAN_HPP_NAMESPACE::PipelineBindPoint pipelineBindPoint = VULKAN_HPP_NAMESPACE::PipelineBindPoint::eGraphics; uint32_t viewMask = {}; uint32_t inputAttachmentCount = {}; const VULKAN_HPP_NAMESPACE::AttachmentReference2 * pInputAttachments = {}; uint32_t colorAttachmentCount = {}; const VULKAN_HPP_NAMESPACE::AttachmentReference2 * pColorAttachments = {}; const VULKAN_HPP_NAMESPACE::AttachmentReference2 * pResolveAttachments = {}; const VULKAN_HPP_NAMESPACE::AttachmentReference2 * pDepthStencilAttachment = {}; uint32_t preserveAttachmentCount = {}; const uint32_t * pPreserveAttachments = {}; }; template <> struct CppType { using Type = SubpassDescription2; }; using SubpassDescription2KHR = SubpassDescription2; struct SubpassDependency2 { using NativeType = VkSubpassDependency2; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSubpassDependency2; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR SubpassDependency2( uint32_t srcSubpass_ = {}, uint32_t dstSubpass_ = {}, VULKAN_HPP_NAMESPACE::PipelineStageFlags srcStageMask_ = {}, VULKAN_HPP_NAMESPACE::PipelineStageFlags dstStageMask_ = {}, VULKAN_HPP_NAMESPACE::AccessFlags srcAccessMask_ = {}, VULKAN_HPP_NAMESPACE::AccessFlags dstAccessMask_ = {}, VULKAN_HPP_NAMESPACE::DependencyFlags dependencyFlags_ = {}, int32_t viewOffset_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , srcSubpass{ srcSubpass_ } , dstSubpass{ dstSubpass_ } , srcStageMask{ srcStageMask_ } , dstStageMask{ dstStageMask_ } , srcAccessMask{ srcAccessMask_ } , dstAccessMask{ dstAccessMask_ } , dependencyFlags{ dependencyFlags_ } , viewOffset{ viewOffset_ } { } VULKAN_HPP_CONSTEXPR SubpassDependency2( SubpassDependency2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; SubpassDependency2( VkSubpassDependency2 const & rhs ) VULKAN_HPP_NOEXCEPT : SubpassDependency2( *reinterpret_cast( &rhs ) ) {} SubpassDependency2 & operator=( SubpassDependency2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ SubpassDependency2 & operator=( VkSubpassDependency2 const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 SubpassDependency2 & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 SubpassDependency2 & setSrcSubpass( uint32_t srcSubpass_ ) VULKAN_HPP_NOEXCEPT { srcSubpass = srcSubpass_; return *this; } VULKAN_HPP_CONSTEXPR_14 SubpassDependency2 & setDstSubpass( uint32_t dstSubpass_ ) VULKAN_HPP_NOEXCEPT { dstSubpass = dstSubpass_; return *this; } VULKAN_HPP_CONSTEXPR_14 SubpassDependency2 & setSrcStageMask( VULKAN_HPP_NAMESPACE::PipelineStageFlags srcStageMask_ ) VULKAN_HPP_NOEXCEPT { srcStageMask = srcStageMask_; return *this; } VULKAN_HPP_CONSTEXPR_14 SubpassDependency2 & setDstStageMask( VULKAN_HPP_NAMESPACE::PipelineStageFlags dstStageMask_ ) VULKAN_HPP_NOEXCEPT { dstStageMask = dstStageMask_; return *this; } VULKAN_HPP_CONSTEXPR_14 SubpassDependency2 & setSrcAccessMask( VULKAN_HPP_NAMESPACE::AccessFlags srcAccessMask_ ) VULKAN_HPP_NOEXCEPT { srcAccessMask = srcAccessMask_; return *this; } VULKAN_HPP_CONSTEXPR_14 SubpassDependency2 & setDstAccessMask( VULKAN_HPP_NAMESPACE::AccessFlags dstAccessMask_ ) VULKAN_HPP_NOEXCEPT { dstAccessMask = dstAccessMask_; return *this; } VULKAN_HPP_CONSTEXPR_14 SubpassDependency2 & setDependencyFlags( VULKAN_HPP_NAMESPACE::DependencyFlags dependencyFlags_ ) VULKAN_HPP_NOEXCEPT { dependencyFlags = dependencyFlags_; return *this; } VULKAN_HPP_CONSTEXPR_14 SubpassDependency2 & setViewOffset( int32_t viewOffset_ ) VULKAN_HPP_NOEXCEPT { viewOffset = viewOffset_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkSubpassDependency2 const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkSubpassDependency2 &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, srcSubpass, dstSubpass, srcStageMask, dstStageMask, srcAccessMask, dstAccessMask, dependencyFlags, viewOffset ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( SubpassDependency2 const & ) const = default; #else bool operator==( SubpassDependency2 const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( srcSubpass == rhs.srcSubpass ) && ( dstSubpass == rhs.dstSubpass ) && ( srcStageMask == rhs.srcStageMask ) && ( dstStageMask == rhs.dstStageMask ) && ( srcAccessMask == rhs.srcAccessMask ) && ( dstAccessMask == rhs.dstAccessMask ) && ( dependencyFlags == rhs.dependencyFlags ) && ( viewOffset == rhs.viewOffset ); # endif } bool operator!=( SubpassDependency2 const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSubpassDependency2; const void * pNext = {}; uint32_t srcSubpass = {}; uint32_t dstSubpass = {}; VULKAN_HPP_NAMESPACE::PipelineStageFlags srcStageMask = {}; VULKAN_HPP_NAMESPACE::PipelineStageFlags dstStageMask = {}; VULKAN_HPP_NAMESPACE::AccessFlags srcAccessMask = {}; VULKAN_HPP_NAMESPACE::AccessFlags dstAccessMask = {}; VULKAN_HPP_NAMESPACE::DependencyFlags dependencyFlags = {}; int32_t viewOffset = {}; }; template <> struct CppType { using Type = SubpassDependency2; }; using SubpassDependency2KHR = SubpassDependency2; struct RenderPassCreateInfo2 { using NativeType = VkRenderPassCreateInfo2; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eRenderPassCreateInfo2; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR RenderPassCreateInfo2( VULKAN_HPP_NAMESPACE::RenderPassCreateFlags flags_ = {}, uint32_t attachmentCount_ = {}, const VULKAN_HPP_NAMESPACE::AttachmentDescription2 * pAttachments_ = {}, uint32_t subpassCount_ = {}, const VULKAN_HPP_NAMESPACE::SubpassDescription2 * pSubpasses_ = {}, uint32_t dependencyCount_ = {}, const VULKAN_HPP_NAMESPACE::SubpassDependency2 * pDependencies_ = {}, uint32_t correlatedViewMaskCount_ = {}, const uint32_t * pCorrelatedViewMasks_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , attachmentCount{ attachmentCount_ } , pAttachments{ pAttachments_ } , subpassCount{ subpassCount_ } , pSubpasses{ pSubpasses_ } , dependencyCount{ dependencyCount_ } , pDependencies{ pDependencies_ } , correlatedViewMaskCount{ correlatedViewMaskCount_ } , pCorrelatedViewMasks{ pCorrelatedViewMasks_ } { } VULKAN_HPP_CONSTEXPR RenderPassCreateInfo2( RenderPassCreateInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; RenderPassCreateInfo2( VkRenderPassCreateInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT : RenderPassCreateInfo2( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) RenderPassCreateInfo2( VULKAN_HPP_NAMESPACE::RenderPassCreateFlags flags_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & attachments_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & subpasses_ = {}, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & dependencies_ = {}, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & correlatedViewMasks_ = {}, const void * pNext_ = nullptr ) : pNext( pNext_ ) , flags( flags_ ) , attachmentCount( static_cast( attachments_.size() ) ) , pAttachments( attachments_.data() ) , subpassCount( static_cast( subpasses_.size() ) ) , pSubpasses( subpasses_.data() ) , dependencyCount( static_cast( dependencies_.size() ) ) , pDependencies( dependencies_.data() ) , correlatedViewMaskCount( static_cast( correlatedViewMasks_.size() ) ) , pCorrelatedViewMasks( correlatedViewMasks_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ RenderPassCreateInfo2 & operator=( RenderPassCreateInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ RenderPassCreateInfo2 & operator=( VkRenderPassCreateInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 RenderPassCreateInfo2 & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 RenderPassCreateInfo2 & setFlags( VULKAN_HPP_NAMESPACE::RenderPassCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 RenderPassCreateInfo2 & setAttachmentCount( uint32_t attachmentCount_ ) VULKAN_HPP_NOEXCEPT { attachmentCount = attachmentCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 RenderPassCreateInfo2 & setPAttachments( const VULKAN_HPP_NAMESPACE::AttachmentDescription2 * pAttachments_ ) VULKAN_HPP_NOEXCEPT { pAttachments = pAttachments_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) RenderPassCreateInfo2 & setAttachments( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & attachments_ ) VULKAN_HPP_NOEXCEPT { attachmentCount = static_cast( attachments_.size() ); pAttachments = attachments_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 RenderPassCreateInfo2 & setSubpassCount( uint32_t subpassCount_ ) VULKAN_HPP_NOEXCEPT { subpassCount = subpassCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 RenderPassCreateInfo2 & setPSubpasses( const VULKAN_HPP_NAMESPACE::SubpassDescription2 * pSubpasses_ ) VULKAN_HPP_NOEXCEPT { pSubpasses = pSubpasses_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) RenderPassCreateInfo2 & setSubpasses( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & subpasses_ ) VULKAN_HPP_NOEXCEPT { subpassCount = static_cast( subpasses_.size() ); pSubpasses = subpasses_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 RenderPassCreateInfo2 & setDependencyCount( uint32_t dependencyCount_ ) VULKAN_HPP_NOEXCEPT { dependencyCount = dependencyCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 RenderPassCreateInfo2 & setPDependencies( const VULKAN_HPP_NAMESPACE::SubpassDependency2 * pDependencies_ ) VULKAN_HPP_NOEXCEPT { pDependencies = pDependencies_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) RenderPassCreateInfo2 & setDependencies( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & dependencies_ ) VULKAN_HPP_NOEXCEPT { dependencyCount = static_cast( dependencies_.size() ); pDependencies = dependencies_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 RenderPassCreateInfo2 & setCorrelatedViewMaskCount( uint32_t correlatedViewMaskCount_ ) VULKAN_HPP_NOEXCEPT { correlatedViewMaskCount = correlatedViewMaskCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 RenderPassCreateInfo2 & setPCorrelatedViewMasks( const uint32_t * pCorrelatedViewMasks_ ) VULKAN_HPP_NOEXCEPT { pCorrelatedViewMasks = pCorrelatedViewMasks_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) RenderPassCreateInfo2 & setCorrelatedViewMasks( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & correlatedViewMasks_ ) VULKAN_HPP_NOEXCEPT { correlatedViewMaskCount = static_cast( correlatedViewMasks_.size() ); pCorrelatedViewMasks = correlatedViewMasks_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkRenderPassCreateInfo2 const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkRenderPassCreateInfo2 &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, attachmentCount, pAttachments, subpassCount, pSubpasses, dependencyCount, pDependencies, correlatedViewMaskCount, pCorrelatedViewMasks ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( RenderPassCreateInfo2 const & ) const = default; #else bool operator==( RenderPassCreateInfo2 const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( attachmentCount == rhs.attachmentCount ) && ( pAttachments == rhs.pAttachments ) && ( subpassCount == rhs.subpassCount ) && ( pSubpasses == rhs.pSubpasses ) && ( dependencyCount == rhs.dependencyCount ) && ( pDependencies == rhs.pDependencies ) && ( correlatedViewMaskCount == rhs.correlatedViewMaskCount ) && ( pCorrelatedViewMasks == rhs.pCorrelatedViewMasks ); # endif } bool operator!=( RenderPassCreateInfo2 const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eRenderPassCreateInfo2; const void * pNext = {}; VULKAN_HPP_NAMESPACE::RenderPassCreateFlags flags = {}; uint32_t attachmentCount = {}; const VULKAN_HPP_NAMESPACE::AttachmentDescription2 * pAttachments = {}; uint32_t subpassCount = {}; const VULKAN_HPP_NAMESPACE::SubpassDescription2 * pSubpasses = {}; uint32_t dependencyCount = {}; const VULKAN_HPP_NAMESPACE::SubpassDependency2 * pDependencies = {}; uint32_t correlatedViewMaskCount = {}; const uint32_t * pCorrelatedViewMasks = {}; }; template <> struct CppType { using Type = RenderPassCreateInfo2; }; using RenderPassCreateInfo2KHR = RenderPassCreateInfo2; struct RenderPassCreationControlEXT { using NativeType = VkRenderPassCreationControlEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eRenderPassCreationControlEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR RenderPassCreationControlEXT( VULKAN_HPP_NAMESPACE::Bool32 disallowMerging_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , disallowMerging{ disallowMerging_ } { } VULKAN_HPP_CONSTEXPR RenderPassCreationControlEXT( RenderPassCreationControlEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; RenderPassCreationControlEXT( VkRenderPassCreationControlEXT const & rhs ) VULKAN_HPP_NOEXCEPT : RenderPassCreationControlEXT( *reinterpret_cast( &rhs ) ) { } RenderPassCreationControlEXT & operator=( RenderPassCreationControlEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ RenderPassCreationControlEXT & operator=( VkRenderPassCreationControlEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 RenderPassCreationControlEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 RenderPassCreationControlEXT & setDisallowMerging( VULKAN_HPP_NAMESPACE::Bool32 disallowMerging_ ) VULKAN_HPP_NOEXCEPT { disallowMerging = disallowMerging_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkRenderPassCreationControlEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkRenderPassCreationControlEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, disallowMerging ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( RenderPassCreationControlEXT const & ) const = default; #else bool operator==( RenderPassCreationControlEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( disallowMerging == rhs.disallowMerging ); # endif } bool operator!=( RenderPassCreationControlEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eRenderPassCreationControlEXT; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 disallowMerging = {}; }; template <> struct CppType { using Type = RenderPassCreationControlEXT; }; struct RenderPassCreationFeedbackInfoEXT { using NativeType = VkRenderPassCreationFeedbackInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR RenderPassCreationFeedbackInfoEXT( uint32_t postMergeSubpassCount_ = {} ) VULKAN_HPP_NOEXCEPT : postMergeSubpassCount{ postMergeSubpassCount_ } { } VULKAN_HPP_CONSTEXPR RenderPassCreationFeedbackInfoEXT( RenderPassCreationFeedbackInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; RenderPassCreationFeedbackInfoEXT( VkRenderPassCreationFeedbackInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : RenderPassCreationFeedbackInfoEXT( *reinterpret_cast( &rhs ) ) { } RenderPassCreationFeedbackInfoEXT & operator=( RenderPassCreationFeedbackInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ RenderPassCreationFeedbackInfoEXT & operator=( VkRenderPassCreationFeedbackInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkRenderPassCreationFeedbackInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkRenderPassCreationFeedbackInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( postMergeSubpassCount ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( RenderPassCreationFeedbackInfoEXT const & ) const = default; #else bool operator==( RenderPassCreationFeedbackInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( postMergeSubpassCount == rhs.postMergeSubpassCount ); # endif } bool operator!=( RenderPassCreationFeedbackInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: uint32_t postMergeSubpassCount = {}; }; struct RenderPassCreationFeedbackCreateInfoEXT { using NativeType = VkRenderPassCreationFeedbackCreateInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eRenderPassCreationFeedbackCreateInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR RenderPassCreationFeedbackCreateInfoEXT( VULKAN_HPP_NAMESPACE::RenderPassCreationFeedbackInfoEXT * pRenderPassFeedback_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , pRenderPassFeedback{ pRenderPassFeedback_ } { } VULKAN_HPP_CONSTEXPR RenderPassCreationFeedbackCreateInfoEXT( RenderPassCreationFeedbackCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; RenderPassCreationFeedbackCreateInfoEXT( VkRenderPassCreationFeedbackCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : RenderPassCreationFeedbackCreateInfoEXT( *reinterpret_cast( &rhs ) ) { } RenderPassCreationFeedbackCreateInfoEXT & operator=( RenderPassCreationFeedbackCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ RenderPassCreationFeedbackCreateInfoEXT & operator=( VkRenderPassCreationFeedbackCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 RenderPassCreationFeedbackCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 RenderPassCreationFeedbackCreateInfoEXT & setPRenderPassFeedback( VULKAN_HPP_NAMESPACE::RenderPassCreationFeedbackInfoEXT * pRenderPassFeedback_ ) VULKAN_HPP_NOEXCEPT { pRenderPassFeedback = pRenderPassFeedback_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkRenderPassCreationFeedbackCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkRenderPassCreationFeedbackCreateInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, pRenderPassFeedback ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( RenderPassCreationFeedbackCreateInfoEXT const & ) const = default; #else bool operator==( RenderPassCreationFeedbackCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( pRenderPassFeedback == rhs.pRenderPassFeedback ); # endif } bool operator!=( RenderPassCreationFeedbackCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eRenderPassCreationFeedbackCreateInfoEXT; const void * pNext = {}; VULKAN_HPP_NAMESPACE::RenderPassCreationFeedbackInfoEXT * pRenderPassFeedback = {}; }; template <> struct CppType { using Type = RenderPassCreationFeedbackCreateInfoEXT; }; struct RenderPassFragmentDensityMapCreateInfoEXT { using NativeType = VkRenderPassFragmentDensityMapCreateInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eRenderPassFragmentDensityMapCreateInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR RenderPassFragmentDensityMapCreateInfoEXT( VULKAN_HPP_NAMESPACE::AttachmentReference fragmentDensityMapAttachment_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , fragmentDensityMapAttachment{ fragmentDensityMapAttachment_ } { } VULKAN_HPP_CONSTEXPR RenderPassFragmentDensityMapCreateInfoEXT( RenderPassFragmentDensityMapCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; RenderPassFragmentDensityMapCreateInfoEXT( VkRenderPassFragmentDensityMapCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : RenderPassFragmentDensityMapCreateInfoEXT( *reinterpret_cast( &rhs ) ) { } RenderPassFragmentDensityMapCreateInfoEXT & operator=( RenderPassFragmentDensityMapCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ RenderPassFragmentDensityMapCreateInfoEXT & operator=( VkRenderPassFragmentDensityMapCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 RenderPassFragmentDensityMapCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 RenderPassFragmentDensityMapCreateInfoEXT & setFragmentDensityMapAttachment( VULKAN_HPP_NAMESPACE::AttachmentReference const & fragmentDensityMapAttachment_ ) VULKAN_HPP_NOEXCEPT { fragmentDensityMapAttachment = fragmentDensityMapAttachment_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkRenderPassFragmentDensityMapCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkRenderPassFragmentDensityMapCreateInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, fragmentDensityMapAttachment ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( RenderPassFragmentDensityMapCreateInfoEXT const & ) const = default; #else bool operator==( RenderPassFragmentDensityMapCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( fragmentDensityMapAttachment == rhs.fragmentDensityMapAttachment ); # endif } bool operator!=( RenderPassFragmentDensityMapCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eRenderPassFragmentDensityMapCreateInfoEXT; const void * pNext = {}; VULKAN_HPP_NAMESPACE::AttachmentReference fragmentDensityMapAttachment = {}; }; template <> struct CppType { using Type = RenderPassFragmentDensityMapCreateInfoEXT; }; struct RenderPassInputAttachmentAspectCreateInfo { using NativeType = VkRenderPassInputAttachmentAspectCreateInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eRenderPassInputAttachmentAspectCreateInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR RenderPassInputAttachmentAspectCreateInfo( uint32_t aspectReferenceCount_ = {}, const VULKAN_HPP_NAMESPACE::InputAttachmentAspectReference * pAspectReferences_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , aspectReferenceCount{ aspectReferenceCount_ } , pAspectReferences{ pAspectReferences_ } { } VULKAN_HPP_CONSTEXPR RenderPassInputAttachmentAspectCreateInfo( RenderPassInputAttachmentAspectCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; RenderPassInputAttachmentAspectCreateInfo( VkRenderPassInputAttachmentAspectCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT : RenderPassInputAttachmentAspectCreateInfo( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) RenderPassInputAttachmentAspectCreateInfo( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & aspectReferences_, const void * pNext_ = nullptr ) : pNext( pNext_ ), aspectReferenceCount( static_cast( aspectReferences_.size() ) ), pAspectReferences( aspectReferences_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ RenderPassInputAttachmentAspectCreateInfo & operator=( RenderPassInputAttachmentAspectCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ RenderPassInputAttachmentAspectCreateInfo & operator=( VkRenderPassInputAttachmentAspectCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 RenderPassInputAttachmentAspectCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 RenderPassInputAttachmentAspectCreateInfo & setAspectReferenceCount( uint32_t aspectReferenceCount_ ) VULKAN_HPP_NOEXCEPT { aspectReferenceCount = aspectReferenceCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 RenderPassInputAttachmentAspectCreateInfo & setPAspectReferences( const VULKAN_HPP_NAMESPACE::InputAttachmentAspectReference * pAspectReferences_ ) VULKAN_HPP_NOEXCEPT { pAspectReferences = pAspectReferences_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) RenderPassInputAttachmentAspectCreateInfo & setAspectReferences( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & aspectReferences_ ) VULKAN_HPP_NOEXCEPT { aspectReferenceCount = static_cast( aspectReferences_.size() ); pAspectReferences = aspectReferences_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkRenderPassInputAttachmentAspectCreateInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkRenderPassInputAttachmentAspectCreateInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, aspectReferenceCount, pAspectReferences ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( RenderPassInputAttachmentAspectCreateInfo const & ) const = default; #else bool operator==( RenderPassInputAttachmentAspectCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( aspectReferenceCount == rhs.aspectReferenceCount ) && ( pAspectReferences == rhs.pAspectReferences ); # endif } bool operator!=( RenderPassInputAttachmentAspectCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eRenderPassInputAttachmentAspectCreateInfo; const void * pNext = {}; uint32_t aspectReferenceCount = {}; const VULKAN_HPP_NAMESPACE::InputAttachmentAspectReference * pAspectReferences = {}; }; template <> struct CppType { using Type = RenderPassInputAttachmentAspectCreateInfo; }; using RenderPassInputAttachmentAspectCreateInfoKHR = RenderPassInputAttachmentAspectCreateInfo; struct RenderPassMultiviewCreateInfo { using NativeType = VkRenderPassMultiviewCreateInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eRenderPassMultiviewCreateInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR RenderPassMultiviewCreateInfo( uint32_t subpassCount_ = {}, const uint32_t * pViewMasks_ = {}, uint32_t dependencyCount_ = {}, const int32_t * pViewOffsets_ = {}, uint32_t correlationMaskCount_ = {}, const uint32_t * pCorrelationMasks_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , subpassCount{ subpassCount_ } , pViewMasks{ pViewMasks_ } , dependencyCount{ dependencyCount_ } , pViewOffsets{ pViewOffsets_ } , correlationMaskCount{ correlationMaskCount_ } , pCorrelationMasks{ pCorrelationMasks_ } { } VULKAN_HPP_CONSTEXPR RenderPassMultiviewCreateInfo( RenderPassMultiviewCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; RenderPassMultiviewCreateInfo( VkRenderPassMultiviewCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT : RenderPassMultiviewCreateInfo( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) RenderPassMultiviewCreateInfo( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & viewMasks_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & viewOffsets_ = {}, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & correlationMasks_ = {}, const void * pNext_ = nullptr ) : pNext( pNext_ ) , subpassCount( static_cast( viewMasks_.size() ) ) , pViewMasks( viewMasks_.data() ) , dependencyCount( static_cast( viewOffsets_.size() ) ) , pViewOffsets( viewOffsets_.data() ) , correlationMaskCount( static_cast( correlationMasks_.size() ) ) , pCorrelationMasks( correlationMasks_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ RenderPassMultiviewCreateInfo & operator=( RenderPassMultiviewCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ RenderPassMultiviewCreateInfo & operator=( VkRenderPassMultiviewCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 RenderPassMultiviewCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 RenderPassMultiviewCreateInfo & setSubpassCount( uint32_t subpassCount_ ) VULKAN_HPP_NOEXCEPT { subpassCount = subpassCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 RenderPassMultiviewCreateInfo & setPViewMasks( const uint32_t * pViewMasks_ ) VULKAN_HPP_NOEXCEPT { pViewMasks = pViewMasks_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) RenderPassMultiviewCreateInfo & setViewMasks( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & viewMasks_ ) VULKAN_HPP_NOEXCEPT { subpassCount = static_cast( viewMasks_.size() ); pViewMasks = viewMasks_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 RenderPassMultiviewCreateInfo & setDependencyCount( uint32_t dependencyCount_ ) VULKAN_HPP_NOEXCEPT { dependencyCount = dependencyCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 RenderPassMultiviewCreateInfo & setPViewOffsets( const int32_t * pViewOffsets_ ) VULKAN_HPP_NOEXCEPT { pViewOffsets = pViewOffsets_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) RenderPassMultiviewCreateInfo & setViewOffsets( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & viewOffsets_ ) VULKAN_HPP_NOEXCEPT { dependencyCount = static_cast( viewOffsets_.size() ); pViewOffsets = viewOffsets_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 RenderPassMultiviewCreateInfo & setCorrelationMaskCount( uint32_t correlationMaskCount_ ) VULKAN_HPP_NOEXCEPT { correlationMaskCount = correlationMaskCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 RenderPassMultiviewCreateInfo & setPCorrelationMasks( const uint32_t * pCorrelationMasks_ ) VULKAN_HPP_NOEXCEPT { pCorrelationMasks = pCorrelationMasks_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) RenderPassMultiviewCreateInfo & setCorrelationMasks( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & correlationMasks_ ) VULKAN_HPP_NOEXCEPT { correlationMaskCount = static_cast( correlationMasks_.size() ); pCorrelationMasks = correlationMasks_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkRenderPassMultiviewCreateInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkRenderPassMultiviewCreateInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, subpassCount, pViewMasks, dependencyCount, pViewOffsets, correlationMaskCount, pCorrelationMasks ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( RenderPassMultiviewCreateInfo const & ) const = default; #else bool operator==( RenderPassMultiviewCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( subpassCount == rhs.subpassCount ) && ( pViewMasks == rhs.pViewMasks ) && ( dependencyCount == rhs.dependencyCount ) && ( pViewOffsets == rhs.pViewOffsets ) && ( correlationMaskCount == rhs.correlationMaskCount ) && ( pCorrelationMasks == rhs.pCorrelationMasks ); # endif } bool operator!=( RenderPassMultiviewCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eRenderPassMultiviewCreateInfo; const void * pNext = {}; uint32_t subpassCount = {}; const uint32_t * pViewMasks = {}; uint32_t dependencyCount = {}; const int32_t * pViewOffsets = {}; uint32_t correlationMaskCount = {}; const uint32_t * pCorrelationMasks = {}; }; template <> struct CppType { using Type = RenderPassMultiviewCreateInfo; }; using RenderPassMultiviewCreateInfoKHR = RenderPassMultiviewCreateInfo; struct SubpassSampleLocationsEXT { using NativeType = VkSubpassSampleLocationsEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR SubpassSampleLocationsEXT( uint32_t subpassIndex_ = {}, VULKAN_HPP_NAMESPACE::SampleLocationsInfoEXT sampleLocationsInfo_ = {} ) VULKAN_HPP_NOEXCEPT : subpassIndex{ subpassIndex_ } , sampleLocationsInfo{ sampleLocationsInfo_ } { } VULKAN_HPP_CONSTEXPR SubpassSampleLocationsEXT( SubpassSampleLocationsEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; SubpassSampleLocationsEXT( VkSubpassSampleLocationsEXT const & rhs ) VULKAN_HPP_NOEXCEPT : SubpassSampleLocationsEXT( *reinterpret_cast( &rhs ) ) { } SubpassSampleLocationsEXT & operator=( SubpassSampleLocationsEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ SubpassSampleLocationsEXT & operator=( VkSubpassSampleLocationsEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 SubpassSampleLocationsEXT & setSubpassIndex( uint32_t subpassIndex_ ) VULKAN_HPP_NOEXCEPT { subpassIndex = subpassIndex_; return *this; } VULKAN_HPP_CONSTEXPR_14 SubpassSampleLocationsEXT & setSampleLocationsInfo( VULKAN_HPP_NAMESPACE::SampleLocationsInfoEXT const & sampleLocationsInfo_ ) VULKAN_HPP_NOEXCEPT { sampleLocationsInfo = sampleLocationsInfo_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkSubpassSampleLocationsEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkSubpassSampleLocationsEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( subpassIndex, sampleLocationsInfo ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( SubpassSampleLocationsEXT const & ) const = default; #else bool operator==( SubpassSampleLocationsEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( subpassIndex == rhs.subpassIndex ) && ( sampleLocationsInfo == rhs.sampleLocationsInfo ); # endif } bool operator!=( SubpassSampleLocationsEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: uint32_t subpassIndex = {}; VULKAN_HPP_NAMESPACE::SampleLocationsInfoEXT sampleLocationsInfo = {}; }; struct RenderPassSampleLocationsBeginInfoEXT { using NativeType = VkRenderPassSampleLocationsBeginInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eRenderPassSampleLocationsBeginInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR RenderPassSampleLocationsBeginInfoEXT( uint32_t attachmentInitialSampleLocationsCount_ = {}, const VULKAN_HPP_NAMESPACE::AttachmentSampleLocationsEXT * pAttachmentInitialSampleLocations_ = {}, uint32_t postSubpassSampleLocationsCount_ = {}, const VULKAN_HPP_NAMESPACE::SubpassSampleLocationsEXT * pPostSubpassSampleLocations_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , attachmentInitialSampleLocationsCount{ attachmentInitialSampleLocationsCount_ } , pAttachmentInitialSampleLocations{ pAttachmentInitialSampleLocations_ } , postSubpassSampleLocationsCount{ postSubpassSampleLocationsCount_ } , pPostSubpassSampleLocations{ pPostSubpassSampleLocations_ } { } VULKAN_HPP_CONSTEXPR RenderPassSampleLocationsBeginInfoEXT( RenderPassSampleLocationsBeginInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; RenderPassSampleLocationsBeginInfoEXT( VkRenderPassSampleLocationsBeginInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : RenderPassSampleLocationsBeginInfoEXT( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) RenderPassSampleLocationsBeginInfoEXT( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & attachmentInitialSampleLocations_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & postSubpassSampleLocations_ = {}, const void * pNext_ = nullptr ) : pNext( pNext_ ) , attachmentInitialSampleLocationsCount( static_cast( attachmentInitialSampleLocations_.size() ) ) , pAttachmentInitialSampleLocations( attachmentInitialSampleLocations_.data() ) , postSubpassSampleLocationsCount( static_cast( postSubpassSampleLocations_.size() ) ) , pPostSubpassSampleLocations( postSubpassSampleLocations_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ RenderPassSampleLocationsBeginInfoEXT & operator=( RenderPassSampleLocationsBeginInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ RenderPassSampleLocationsBeginInfoEXT & operator=( VkRenderPassSampleLocationsBeginInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 RenderPassSampleLocationsBeginInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 RenderPassSampleLocationsBeginInfoEXT & setAttachmentInitialSampleLocationsCount( uint32_t attachmentInitialSampleLocationsCount_ ) VULKAN_HPP_NOEXCEPT { attachmentInitialSampleLocationsCount = attachmentInitialSampleLocationsCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 RenderPassSampleLocationsBeginInfoEXT & setPAttachmentInitialSampleLocations( const VULKAN_HPP_NAMESPACE::AttachmentSampleLocationsEXT * pAttachmentInitialSampleLocations_ ) VULKAN_HPP_NOEXCEPT { pAttachmentInitialSampleLocations = pAttachmentInitialSampleLocations_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) RenderPassSampleLocationsBeginInfoEXT & setAttachmentInitialSampleLocations( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & attachmentInitialSampleLocations_ ) VULKAN_HPP_NOEXCEPT { attachmentInitialSampleLocationsCount = static_cast( attachmentInitialSampleLocations_.size() ); pAttachmentInitialSampleLocations = attachmentInitialSampleLocations_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 RenderPassSampleLocationsBeginInfoEXT & setPostSubpassSampleLocationsCount( uint32_t postSubpassSampleLocationsCount_ ) VULKAN_HPP_NOEXCEPT { postSubpassSampleLocationsCount = postSubpassSampleLocationsCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 RenderPassSampleLocationsBeginInfoEXT & setPPostSubpassSampleLocations( const VULKAN_HPP_NAMESPACE::SubpassSampleLocationsEXT * pPostSubpassSampleLocations_ ) VULKAN_HPP_NOEXCEPT { pPostSubpassSampleLocations = pPostSubpassSampleLocations_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) RenderPassSampleLocationsBeginInfoEXT & setPostSubpassSampleLocations( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & postSubpassSampleLocations_ ) VULKAN_HPP_NOEXCEPT { postSubpassSampleLocationsCount = static_cast( postSubpassSampleLocations_.size() ); pPostSubpassSampleLocations = postSubpassSampleLocations_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkRenderPassSampleLocationsBeginInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkRenderPassSampleLocationsBeginInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, attachmentInitialSampleLocationsCount, pAttachmentInitialSampleLocations, postSubpassSampleLocationsCount, pPostSubpassSampleLocations ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( RenderPassSampleLocationsBeginInfoEXT const & ) const = default; #else bool operator==( RenderPassSampleLocationsBeginInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( attachmentInitialSampleLocationsCount == rhs.attachmentInitialSampleLocationsCount ) && ( pAttachmentInitialSampleLocations == rhs.pAttachmentInitialSampleLocations ) && ( postSubpassSampleLocationsCount == rhs.postSubpassSampleLocationsCount ) && ( pPostSubpassSampleLocations == rhs.pPostSubpassSampleLocations ); # endif } bool operator!=( RenderPassSampleLocationsBeginInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eRenderPassSampleLocationsBeginInfoEXT; const void * pNext = {}; uint32_t attachmentInitialSampleLocationsCount = {}; const VULKAN_HPP_NAMESPACE::AttachmentSampleLocationsEXT * pAttachmentInitialSampleLocations = {}; uint32_t postSubpassSampleLocationsCount = {}; const VULKAN_HPP_NAMESPACE::SubpassSampleLocationsEXT * pPostSubpassSampleLocations = {}; }; template <> struct CppType { using Type = RenderPassSampleLocationsBeginInfoEXT; }; struct RenderPassStripeInfoARM { using NativeType = VkRenderPassStripeInfoARM; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eRenderPassStripeInfoARM; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR RenderPassStripeInfoARM( VULKAN_HPP_NAMESPACE::Rect2D stripeArea_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , stripeArea{ stripeArea_ } { } VULKAN_HPP_CONSTEXPR RenderPassStripeInfoARM( RenderPassStripeInfoARM const & rhs ) VULKAN_HPP_NOEXCEPT = default; RenderPassStripeInfoARM( VkRenderPassStripeInfoARM const & rhs ) VULKAN_HPP_NOEXCEPT : RenderPassStripeInfoARM( *reinterpret_cast( &rhs ) ) { } RenderPassStripeInfoARM & operator=( RenderPassStripeInfoARM const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ RenderPassStripeInfoARM & operator=( VkRenderPassStripeInfoARM const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 RenderPassStripeInfoARM & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 RenderPassStripeInfoARM & setStripeArea( VULKAN_HPP_NAMESPACE::Rect2D const & stripeArea_ ) VULKAN_HPP_NOEXCEPT { stripeArea = stripeArea_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkRenderPassStripeInfoARM const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkRenderPassStripeInfoARM &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, stripeArea ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( RenderPassStripeInfoARM const & ) const = default; #else bool operator==( RenderPassStripeInfoARM const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( stripeArea == rhs.stripeArea ); # endif } bool operator!=( RenderPassStripeInfoARM const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eRenderPassStripeInfoARM; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Rect2D stripeArea = {}; }; template <> struct CppType { using Type = RenderPassStripeInfoARM; }; struct RenderPassStripeBeginInfoARM { using NativeType = VkRenderPassStripeBeginInfoARM; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eRenderPassStripeBeginInfoARM; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR RenderPassStripeBeginInfoARM( uint32_t stripeInfoCount_ = {}, const VULKAN_HPP_NAMESPACE::RenderPassStripeInfoARM * pStripeInfos_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , stripeInfoCount{ stripeInfoCount_ } , pStripeInfos{ pStripeInfos_ } { } VULKAN_HPP_CONSTEXPR RenderPassStripeBeginInfoARM( RenderPassStripeBeginInfoARM const & rhs ) VULKAN_HPP_NOEXCEPT = default; RenderPassStripeBeginInfoARM( VkRenderPassStripeBeginInfoARM const & rhs ) VULKAN_HPP_NOEXCEPT : RenderPassStripeBeginInfoARM( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) RenderPassStripeBeginInfoARM( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & stripeInfos_, const void * pNext_ = nullptr ) : pNext( pNext_ ), stripeInfoCount( static_cast( stripeInfos_.size() ) ), pStripeInfos( stripeInfos_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ RenderPassStripeBeginInfoARM & operator=( RenderPassStripeBeginInfoARM const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ RenderPassStripeBeginInfoARM & operator=( VkRenderPassStripeBeginInfoARM const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 RenderPassStripeBeginInfoARM & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 RenderPassStripeBeginInfoARM & setStripeInfoCount( uint32_t stripeInfoCount_ ) VULKAN_HPP_NOEXCEPT { stripeInfoCount = stripeInfoCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 RenderPassStripeBeginInfoARM & setPStripeInfos( const VULKAN_HPP_NAMESPACE::RenderPassStripeInfoARM * pStripeInfos_ ) VULKAN_HPP_NOEXCEPT { pStripeInfos = pStripeInfos_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) RenderPassStripeBeginInfoARM & setStripeInfos( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & stripeInfos_ ) VULKAN_HPP_NOEXCEPT { stripeInfoCount = static_cast( stripeInfos_.size() ); pStripeInfos = stripeInfos_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkRenderPassStripeBeginInfoARM const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkRenderPassStripeBeginInfoARM &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std:: tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, stripeInfoCount, pStripeInfos ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( RenderPassStripeBeginInfoARM const & ) const = default; #else bool operator==( RenderPassStripeBeginInfoARM const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( stripeInfoCount == rhs.stripeInfoCount ) && ( pStripeInfos == rhs.pStripeInfos ); # endif } bool operator!=( RenderPassStripeBeginInfoARM const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eRenderPassStripeBeginInfoARM; const void * pNext = {}; uint32_t stripeInfoCount = {}; const VULKAN_HPP_NAMESPACE::RenderPassStripeInfoARM * pStripeInfos = {}; }; template <> struct CppType { using Type = RenderPassStripeBeginInfoARM; }; struct SemaphoreSubmitInfo { using NativeType = VkSemaphoreSubmitInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSemaphoreSubmitInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR SemaphoreSubmitInfo( VULKAN_HPP_NAMESPACE::Semaphore semaphore_ = {}, uint64_t value_ = {}, VULKAN_HPP_NAMESPACE::PipelineStageFlags2 stageMask_ = {}, uint32_t deviceIndex_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , semaphore{ semaphore_ } , value{ value_ } , stageMask{ stageMask_ } , deviceIndex{ deviceIndex_ } { } VULKAN_HPP_CONSTEXPR SemaphoreSubmitInfo( SemaphoreSubmitInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; SemaphoreSubmitInfo( VkSemaphoreSubmitInfo const & rhs ) VULKAN_HPP_NOEXCEPT : SemaphoreSubmitInfo( *reinterpret_cast( &rhs ) ) { } SemaphoreSubmitInfo & operator=( SemaphoreSubmitInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ SemaphoreSubmitInfo & operator=( VkSemaphoreSubmitInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 SemaphoreSubmitInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 SemaphoreSubmitInfo & setSemaphore( VULKAN_HPP_NAMESPACE::Semaphore semaphore_ ) VULKAN_HPP_NOEXCEPT { semaphore = semaphore_; return *this; } VULKAN_HPP_CONSTEXPR_14 SemaphoreSubmitInfo & setValue( uint64_t value_ ) VULKAN_HPP_NOEXCEPT { value = value_; return *this; } VULKAN_HPP_CONSTEXPR_14 SemaphoreSubmitInfo & setStageMask( VULKAN_HPP_NAMESPACE::PipelineStageFlags2 stageMask_ ) VULKAN_HPP_NOEXCEPT { stageMask = stageMask_; return *this; } VULKAN_HPP_CONSTEXPR_14 SemaphoreSubmitInfo & setDeviceIndex( uint32_t deviceIndex_ ) VULKAN_HPP_NOEXCEPT { deviceIndex = deviceIndex_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkSemaphoreSubmitInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkSemaphoreSubmitInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, semaphore, value, stageMask, deviceIndex ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( SemaphoreSubmitInfo const & ) const = default; #else bool operator==( SemaphoreSubmitInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( semaphore == rhs.semaphore ) && ( value == rhs.value ) && ( stageMask == rhs.stageMask ) && ( deviceIndex == rhs.deviceIndex ); # endif } bool operator!=( SemaphoreSubmitInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSemaphoreSubmitInfo; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Semaphore semaphore = {}; uint64_t value = {}; VULKAN_HPP_NAMESPACE::PipelineStageFlags2 stageMask = {}; uint32_t deviceIndex = {}; }; template <> struct CppType { using Type = SemaphoreSubmitInfo; }; using SemaphoreSubmitInfoKHR = SemaphoreSubmitInfo; struct RenderPassStripeSubmitInfoARM { using NativeType = VkRenderPassStripeSubmitInfoARM; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eRenderPassStripeSubmitInfoARM; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR RenderPassStripeSubmitInfoARM( uint32_t stripeSemaphoreInfoCount_ = {}, const VULKAN_HPP_NAMESPACE::SemaphoreSubmitInfo * pStripeSemaphoreInfos_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , stripeSemaphoreInfoCount{ stripeSemaphoreInfoCount_ } , pStripeSemaphoreInfos{ pStripeSemaphoreInfos_ } { } VULKAN_HPP_CONSTEXPR RenderPassStripeSubmitInfoARM( RenderPassStripeSubmitInfoARM const & rhs ) VULKAN_HPP_NOEXCEPT = default; RenderPassStripeSubmitInfoARM( VkRenderPassStripeSubmitInfoARM const & rhs ) VULKAN_HPP_NOEXCEPT : RenderPassStripeSubmitInfoARM( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) RenderPassStripeSubmitInfoARM( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & stripeSemaphoreInfos_, const void * pNext_ = nullptr ) : pNext( pNext_ ) , stripeSemaphoreInfoCount( static_cast( stripeSemaphoreInfos_.size() ) ) , pStripeSemaphoreInfos( stripeSemaphoreInfos_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ RenderPassStripeSubmitInfoARM & operator=( RenderPassStripeSubmitInfoARM const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ RenderPassStripeSubmitInfoARM & operator=( VkRenderPassStripeSubmitInfoARM const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 RenderPassStripeSubmitInfoARM & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 RenderPassStripeSubmitInfoARM & setStripeSemaphoreInfoCount( uint32_t stripeSemaphoreInfoCount_ ) VULKAN_HPP_NOEXCEPT { stripeSemaphoreInfoCount = stripeSemaphoreInfoCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 RenderPassStripeSubmitInfoARM & setPStripeSemaphoreInfos( const VULKAN_HPP_NAMESPACE::SemaphoreSubmitInfo * pStripeSemaphoreInfos_ ) VULKAN_HPP_NOEXCEPT { pStripeSemaphoreInfos = pStripeSemaphoreInfos_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) RenderPassStripeSubmitInfoARM & setStripeSemaphoreInfos( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & stripeSemaphoreInfos_ ) VULKAN_HPP_NOEXCEPT { stripeSemaphoreInfoCount = static_cast( stripeSemaphoreInfos_.size() ); pStripeSemaphoreInfos = stripeSemaphoreInfos_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkRenderPassStripeSubmitInfoARM const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkRenderPassStripeSubmitInfoARM &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, stripeSemaphoreInfoCount, pStripeSemaphoreInfos ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( RenderPassStripeSubmitInfoARM const & ) const = default; #else bool operator==( RenderPassStripeSubmitInfoARM const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( stripeSemaphoreInfoCount == rhs.stripeSemaphoreInfoCount ) && ( pStripeSemaphoreInfos == rhs.pStripeSemaphoreInfos ); # endif } bool operator!=( RenderPassStripeSubmitInfoARM const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eRenderPassStripeSubmitInfoARM; const void * pNext = {}; uint32_t stripeSemaphoreInfoCount = {}; const VULKAN_HPP_NAMESPACE::SemaphoreSubmitInfo * pStripeSemaphoreInfos = {}; }; template <> struct CppType { using Type = RenderPassStripeSubmitInfoARM; }; struct RenderPassSubpassFeedbackInfoEXT { using NativeType = VkRenderPassSubpassFeedbackInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 RenderPassSubpassFeedbackInfoEXT( VULKAN_HPP_NAMESPACE::SubpassMergeStatusEXT subpassMergeStatus_ = VULKAN_HPP_NAMESPACE::SubpassMergeStatusEXT::eMerged, std::array const & description_ = {}, uint32_t postMergeIndex_ = {} ) VULKAN_HPP_NOEXCEPT : subpassMergeStatus{ subpassMergeStatus_ } , description{ description_ } , postMergeIndex{ postMergeIndex_ } { } VULKAN_HPP_CONSTEXPR_14 RenderPassSubpassFeedbackInfoEXT( RenderPassSubpassFeedbackInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; RenderPassSubpassFeedbackInfoEXT( VkRenderPassSubpassFeedbackInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : RenderPassSubpassFeedbackInfoEXT( *reinterpret_cast( &rhs ) ) { } RenderPassSubpassFeedbackInfoEXT & operator=( RenderPassSubpassFeedbackInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ RenderPassSubpassFeedbackInfoEXT & operator=( VkRenderPassSubpassFeedbackInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkRenderPassSubpassFeedbackInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkRenderPassSubpassFeedbackInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std:: tuple const &, uint32_t const &> # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( subpassMergeStatus, description, postMergeIndex ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) std::strong_ordering operator<=>( RenderPassSubpassFeedbackInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { if ( auto cmp = subpassMergeStatus <=> rhs.subpassMergeStatus; cmp != 0 ) return cmp; if ( auto cmp = strcmp( description, rhs.description ); cmp != 0 ) return ( cmp < 0 ) ? std::strong_ordering::less : std::strong_ordering::greater; if ( auto cmp = postMergeIndex <=> rhs.postMergeIndex; cmp != 0 ) return cmp; return std::strong_ordering::equivalent; } #endif bool operator==( RenderPassSubpassFeedbackInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( subpassMergeStatus == rhs.subpassMergeStatus ) && ( strcmp( description, rhs.description ) == 0 ) && ( postMergeIndex == rhs.postMergeIndex ); } bool operator!=( RenderPassSubpassFeedbackInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::SubpassMergeStatusEXT subpassMergeStatus = VULKAN_HPP_NAMESPACE::SubpassMergeStatusEXT::eMerged; VULKAN_HPP_NAMESPACE::ArrayWrapper1D description = {}; uint32_t postMergeIndex = {}; }; struct RenderPassSubpassFeedbackCreateInfoEXT { using NativeType = VkRenderPassSubpassFeedbackCreateInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eRenderPassSubpassFeedbackCreateInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 RenderPassSubpassFeedbackCreateInfoEXT( VULKAN_HPP_NAMESPACE::RenderPassSubpassFeedbackInfoEXT * pSubpassFeedback_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , pSubpassFeedback{ pSubpassFeedback_ } { } VULKAN_HPP_CONSTEXPR_14 RenderPassSubpassFeedbackCreateInfoEXT( RenderPassSubpassFeedbackCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; RenderPassSubpassFeedbackCreateInfoEXT( VkRenderPassSubpassFeedbackCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : RenderPassSubpassFeedbackCreateInfoEXT( *reinterpret_cast( &rhs ) ) { } RenderPassSubpassFeedbackCreateInfoEXT & operator=( RenderPassSubpassFeedbackCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ RenderPassSubpassFeedbackCreateInfoEXT & operator=( VkRenderPassSubpassFeedbackCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 RenderPassSubpassFeedbackCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 RenderPassSubpassFeedbackCreateInfoEXT & setPSubpassFeedback( VULKAN_HPP_NAMESPACE::RenderPassSubpassFeedbackInfoEXT * pSubpassFeedback_ ) VULKAN_HPP_NOEXCEPT { pSubpassFeedback = pSubpassFeedback_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkRenderPassSubpassFeedbackCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkRenderPassSubpassFeedbackCreateInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, pSubpassFeedback ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( RenderPassSubpassFeedbackCreateInfoEXT const & ) const = default; #else bool operator==( RenderPassSubpassFeedbackCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( pSubpassFeedback == rhs.pSubpassFeedback ); # endif } bool operator!=( RenderPassSubpassFeedbackCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eRenderPassSubpassFeedbackCreateInfoEXT; const void * pNext = {}; VULKAN_HPP_NAMESPACE::RenderPassSubpassFeedbackInfoEXT * pSubpassFeedback = {}; }; template <> struct CppType { using Type = RenderPassSubpassFeedbackCreateInfoEXT; }; struct RenderPassTransformBeginInfoQCOM { using NativeType = VkRenderPassTransformBeginInfoQCOM; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eRenderPassTransformBeginInfoQCOM; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR RenderPassTransformBeginInfoQCOM( VULKAN_HPP_NAMESPACE::SurfaceTransformFlagBitsKHR transform_ = VULKAN_HPP_NAMESPACE::SurfaceTransformFlagBitsKHR::eIdentity, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , transform{ transform_ } { } VULKAN_HPP_CONSTEXPR RenderPassTransformBeginInfoQCOM( RenderPassTransformBeginInfoQCOM const & rhs ) VULKAN_HPP_NOEXCEPT = default; RenderPassTransformBeginInfoQCOM( VkRenderPassTransformBeginInfoQCOM const & rhs ) VULKAN_HPP_NOEXCEPT : RenderPassTransformBeginInfoQCOM( *reinterpret_cast( &rhs ) ) { } RenderPassTransformBeginInfoQCOM & operator=( RenderPassTransformBeginInfoQCOM const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ RenderPassTransformBeginInfoQCOM & operator=( VkRenderPassTransformBeginInfoQCOM const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 RenderPassTransformBeginInfoQCOM & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 RenderPassTransformBeginInfoQCOM & setTransform( VULKAN_HPP_NAMESPACE::SurfaceTransformFlagBitsKHR transform_ ) VULKAN_HPP_NOEXCEPT { transform = transform_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkRenderPassTransformBeginInfoQCOM const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkRenderPassTransformBeginInfoQCOM &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, transform ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( RenderPassTransformBeginInfoQCOM const & ) const = default; #else bool operator==( RenderPassTransformBeginInfoQCOM const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( transform == rhs.transform ); # endif } bool operator!=( RenderPassTransformBeginInfoQCOM const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eRenderPassTransformBeginInfoQCOM; void * pNext = {}; VULKAN_HPP_NAMESPACE::SurfaceTransformFlagBitsKHR transform = VULKAN_HPP_NAMESPACE::SurfaceTransformFlagBitsKHR::eIdentity; }; template <> struct CppType { using Type = RenderPassTransformBeginInfoQCOM; }; struct RenderingAreaInfo { using NativeType = VkRenderingAreaInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eRenderingAreaInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR RenderingAreaInfo( uint32_t viewMask_ = {}, uint32_t colorAttachmentCount_ = {}, const VULKAN_HPP_NAMESPACE::Format * pColorAttachmentFormats_ = {}, VULKAN_HPP_NAMESPACE::Format depthAttachmentFormat_ = VULKAN_HPP_NAMESPACE::Format::eUndefined, VULKAN_HPP_NAMESPACE::Format stencilAttachmentFormat_ = VULKAN_HPP_NAMESPACE::Format::eUndefined, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , viewMask{ viewMask_ } , colorAttachmentCount{ colorAttachmentCount_ } , pColorAttachmentFormats{ pColorAttachmentFormats_ } , depthAttachmentFormat{ depthAttachmentFormat_ } , stencilAttachmentFormat{ stencilAttachmentFormat_ } { } VULKAN_HPP_CONSTEXPR RenderingAreaInfo( RenderingAreaInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; RenderingAreaInfo( VkRenderingAreaInfo const & rhs ) VULKAN_HPP_NOEXCEPT : RenderingAreaInfo( *reinterpret_cast( &rhs ) ) {} # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) RenderingAreaInfo( uint32_t viewMask_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & colorAttachmentFormats_, VULKAN_HPP_NAMESPACE::Format depthAttachmentFormat_ = VULKAN_HPP_NAMESPACE::Format::eUndefined, VULKAN_HPP_NAMESPACE::Format stencilAttachmentFormat_ = VULKAN_HPP_NAMESPACE::Format::eUndefined, const void * pNext_ = nullptr ) : pNext( pNext_ ) , viewMask( viewMask_ ) , colorAttachmentCount( static_cast( colorAttachmentFormats_.size() ) ) , pColorAttachmentFormats( colorAttachmentFormats_.data() ) , depthAttachmentFormat( depthAttachmentFormat_ ) , stencilAttachmentFormat( stencilAttachmentFormat_ ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ RenderingAreaInfo & operator=( RenderingAreaInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ RenderingAreaInfo & operator=( VkRenderingAreaInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 RenderingAreaInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 RenderingAreaInfo & setViewMask( uint32_t viewMask_ ) VULKAN_HPP_NOEXCEPT { viewMask = viewMask_; return *this; } VULKAN_HPP_CONSTEXPR_14 RenderingAreaInfo & setColorAttachmentCount( uint32_t colorAttachmentCount_ ) VULKAN_HPP_NOEXCEPT { colorAttachmentCount = colorAttachmentCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 RenderingAreaInfo & setPColorAttachmentFormats( const VULKAN_HPP_NAMESPACE::Format * pColorAttachmentFormats_ ) VULKAN_HPP_NOEXCEPT { pColorAttachmentFormats = pColorAttachmentFormats_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) RenderingAreaInfo & setColorAttachmentFormats( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & colorAttachmentFormats_ ) VULKAN_HPP_NOEXCEPT { colorAttachmentCount = static_cast( colorAttachmentFormats_.size() ); pColorAttachmentFormats = colorAttachmentFormats_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 RenderingAreaInfo & setDepthAttachmentFormat( VULKAN_HPP_NAMESPACE::Format depthAttachmentFormat_ ) VULKAN_HPP_NOEXCEPT { depthAttachmentFormat = depthAttachmentFormat_; return *this; } VULKAN_HPP_CONSTEXPR_14 RenderingAreaInfo & setStencilAttachmentFormat( VULKAN_HPP_NAMESPACE::Format stencilAttachmentFormat_ ) VULKAN_HPP_NOEXCEPT { stencilAttachmentFormat = stencilAttachmentFormat_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkRenderingAreaInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkRenderingAreaInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, viewMask, colorAttachmentCount, pColorAttachmentFormats, depthAttachmentFormat, stencilAttachmentFormat ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( RenderingAreaInfo const & ) const = default; #else bool operator==( RenderingAreaInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( viewMask == rhs.viewMask ) && ( colorAttachmentCount == rhs.colorAttachmentCount ) && ( pColorAttachmentFormats == rhs.pColorAttachmentFormats ) && ( depthAttachmentFormat == rhs.depthAttachmentFormat ) && ( stencilAttachmentFormat == rhs.stencilAttachmentFormat ); # endif } bool operator!=( RenderingAreaInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eRenderingAreaInfo; const void * pNext = {}; uint32_t viewMask = {}; uint32_t colorAttachmentCount = {}; const VULKAN_HPP_NAMESPACE::Format * pColorAttachmentFormats = {}; VULKAN_HPP_NAMESPACE::Format depthAttachmentFormat = VULKAN_HPP_NAMESPACE::Format::eUndefined; VULKAN_HPP_NAMESPACE::Format stencilAttachmentFormat = VULKAN_HPP_NAMESPACE::Format::eUndefined; }; template <> struct CppType { using Type = RenderingAreaInfo; }; using RenderingAreaInfoKHR = RenderingAreaInfo; struct RenderingAttachmentInfo { using NativeType = VkRenderingAttachmentInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eRenderingAttachmentInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 RenderingAttachmentInfo( VULKAN_HPP_NAMESPACE::ImageView imageView_ = {}, VULKAN_HPP_NAMESPACE::ImageLayout imageLayout_ = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined, VULKAN_HPP_NAMESPACE::ResolveModeFlagBits resolveMode_ = VULKAN_HPP_NAMESPACE::ResolveModeFlagBits::eNone, VULKAN_HPP_NAMESPACE::ImageView resolveImageView_ = {}, VULKAN_HPP_NAMESPACE::ImageLayout resolveImageLayout_ = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined, VULKAN_HPP_NAMESPACE::AttachmentLoadOp loadOp_ = VULKAN_HPP_NAMESPACE::AttachmentLoadOp::eLoad, VULKAN_HPP_NAMESPACE::AttachmentStoreOp storeOp_ = VULKAN_HPP_NAMESPACE::AttachmentStoreOp::eStore, VULKAN_HPP_NAMESPACE::ClearValue clearValue_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , imageView{ imageView_ } , imageLayout{ imageLayout_ } , resolveMode{ resolveMode_ } , resolveImageView{ resolveImageView_ } , resolveImageLayout{ resolveImageLayout_ } , loadOp{ loadOp_ } , storeOp{ storeOp_ } , clearValue{ clearValue_ } { } VULKAN_HPP_CONSTEXPR_14 RenderingAttachmentInfo( RenderingAttachmentInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; RenderingAttachmentInfo( VkRenderingAttachmentInfo const & rhs ) VULKAN_HPP_NOEXCEPT : RenderingAttachmentInfo( *reinterpret_cast( &rhs ) ) { } RenderingAttachmentInfo & operator=( RenderingAttachmentInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ RenderingAttachmentInfo & operator=( VkRenderingAttachmentInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 RenderingAttachmentInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 RenderingAttachmentInfo & setImageView( VULKAN_HPP_NAMESPACE::ImageView imageView_ ) VULKAN_HPP_NOEXCEPT { imageView = imageView_; return *this; } VULKAN_HPP_CONSTEXPR_14 RenderingAttachmentInfo & setImageLayout( VULKAN_HPP_NAMESPACE::ImageLayout imageLayout_ ) VULKAN_HPP_NOEXCEPT { imageLayout = imageLayout_; return *this; } VULKAN_HPP_CONSTEXPR_14 RenderingAttachmentInfo & setResolveMode( VULKAN_HPP_NAMESPACE::ResolveModeFlagBits resolveMode_ ) VULKAN_HPP_NOEXCEPT { resolveMode = resolveMode_; return *this; } VULKAN_HPP_CONSTEXPR_14 RenderingAttachmentInfo & setResolveImageView( VULKAN_HPP_NAMESPACE::ImageView resolveImageView_ ) VULKAN_HPP_NOEXCEPT { resolveImageView = resolveImageView_; return *this; } VULKAN_HPP_CONSTEXPR_14 RenderingAttachmentInfo & setResolveImageLayout( VULKAN_HPP_NAMESPACE::ImageLayout resolveImageLayout_ ) VULKAN_HPP_NOEXCEPT { resolveImageLayout = resolveImageLayout_; return *this; } VULKAN_HPP_CONSTEXPR_14 RenderingAttachmentInfo & setLoadOp( VULKAN_HPP_NAMESPACE::AttachmentLoadOp loadOp_ ) VULKAN_HPP_NOEXCEPT { loadOp = loadOp_; return *this; } VULKAN_HPP_CONSTEXPR_14 RenderingAttachmentInfo & setStoreOp( VULKAN_HPP_NAMESPACE::AttachmentStoreOp storeOp_ ) VULKAN_HPP_NOEXCEPT { storeOp = storeOp_; return *this; } VULKAN_HPP_CONSTEXPR_14 RenderingAttachmentInfo & setClearValue( VULKAN_HPP_NAMESPACE::ClearValue const & clearValue_ ) VULKAN_HPP_NOEXCEPT { clearValue = clearValue_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkRenderingAttachmentInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkRenderingAttachmentInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, imageView, imageLayout, resolveMode, resolveImageView, resolveImageLayout, loadOp, storeOp, clearValue ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eRenderingAttachmentInfo; const void * pNext = {}; VULKAN_HPP_NAMESPACE::ImageView imageView = {}; VULKAN_HPP_NAMESPACE::ImageLayout imageLayout = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined; VULKAN_HPP_NAMESPACE::ResolveModeFlagBits resolveMode = VULKAN_HPP_NAMESPACE::ResolveModeFlagBits::eNone; VULKAN_HPP_NAMESPACE::ImageView resolveImageView = {}; VULKAN_HPP_NAMESPACE::ImageLayout resolveImageLayout = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined; VULKAN_HPP_NAMESPACE::AttachmentLoadOp loadOp = VULKAN_HPP_NAMESPACE::AttachmentLoadOp::eLoad; VULKAN_HPP_NAMESPACE::AttachmentStoreOp storeOp = VULKAN_HPP_NAMESPACE::AttachmentStoreOp::eStore; VULKAN_HPP_NAMESPACE::ClearValue clearValue = {}; }; template <> struct CppType { using Type = RenderingAttachmentInfo; }; using RenderingAttachmentInfoKHR = RenderingAttachmentInfo; struct RenderingAttachmentLocationInfo { using NativeType = VkRenderingAttachmentLocationInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eRenderingAttachmentLocationInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR RenderingAttachmentLocationInfo( uint32_t colorAttachmentCount_ = {}, const uint32_t * pColorAttachmentLocations_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , colorAttachmentCount{ colorAttachmentCount_ } , pColorAttachmentLocations{ pColorAttachmentLocations_ } { } VULKAN_HPP_CONSTEXPR RenderingAttachmentLocationInfo( RenderingAttachmentLocationInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; RenderingAttachmentLocationInfo( VkRenderingAttachmentLocationInfo const & rhs ) VULKAN_HPP_NOEXCEPT : RenderingAttachmentLocationInfo( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) RenderingAttachmentLocationInfo( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & colorAttachmentLocations_, const void * pNext_ = nullptr ) : pNext( pNext_ ) , colorAttachmentCount( static_cast( colorAttachmentLocations_.size() ) ) , pColorAttachmentLocations( colorAttachmentLocations_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ RenderingAttachmentLocationInfo & operator=( RenderingAttachmentLocationInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ RenderingAttachmentLocationInfo & operator=( VkRenderingAttachmentLocationInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 RenderingAttachmentLocationInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 RenderingAttachmentLocationInfo & setColorAttachmentCount( uint32_t colorAttachmentCount_ ) VULKAN_HPP_NOEXCEPT { colorAttachmentCount = colorAttachmentCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 RenderingAttachmentLocationInfo & setPColorAttachmentLocations( const uint32_t * pColorAttachmentLocations_ ) VULKAN_HPP_NOEXCEPT { pColorAttachmentLocations = pColorAttachmentLocations_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) RenderingAttachmentLocationInfo & setColorAttachmentLocations( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & colorAttachmentLocations_ ) VULKAN_HPP_NOEXCEPT { colorAttachmentCount = static_cast( colorAttachmentLocations_.size() ); pColorAttachmentLocations = colorAttachmentLocations_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkRenderingAttachmentLocationInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkRenderingAttachmentLocationInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, colorAttachmentCount, pColorAttachmentLocations ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( RenderingAttachmentLocationInfo const & ) const = default; #else bool operator==( RenderingAttachmentLocationInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( colorAttachmentCount == rhs.colorAttachmentCount ) && ( pColorAttachmentLocations == rhs.pColorAttachmentLocations ); # endif } bool operator!=( RenderingAttachmentLocationInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eRenderingAttachmentLocationInfo; const void * pNext = {}; uint32_t colorAttachmentCount = {}; const uint32_t * pColorAttachmentLocations = {}; }; template <> struct CppType { using Type = RenderingAttachmentLocationInfo; }; using RenderingAttachmentLocationInfoKHR = RenderingAttachmentLocationInfo; struct RenderingFragmentDensityMapAttachmentInfoEXT { using NativeType = VkRenderingFragmentDensityMapAttachmentInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eRenderingFragmentDensityMapAttachmentInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR RenderingFragmentDensityMapAttachmentInfoEXT( VULKAN_HPP_NAMESPACE::ImageView imageView_ = {}, VULKAN_HPP_NAMESPACE::ImageLayout imageLayout_ = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , imageView{ imageView_ } , imageLayout{ imageLayout_ } { } VULKAN_HPP_CONSTEXPR RenderingFragmentDensityMapAttachmentInfoEXT( RenderingFragmentDensityMapAttachmentInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; RenderingFragmentDensityMapAttachmentInfoEXT( VkRenderingFragmentDensityMapAttachmentInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : RenderingFragmentDensityMapAttachmentInfoEXT( *reinterpret_cast( &rhs ) ) { } RenderingFragmentDensityMapAttachmentInfoEXT & operator=( RenderingFragmentDensityMapAttachmentInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ RenderingFragmentDensityMapAttachmentInfoEXT & operator=( VkRenderingFragmentDensityMapAttachmentInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 RenderingFragmentDensityMapAttachmentInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 RenderingFragmentDensityMapAttachmentInfoEXT & setImageView( VULKAN_HPP_NAMESPACE::ImageView imageView_ ) VULKAN_HPP_NOEXCEPT { imageView = imageView_; return *this; } VULKAN_HPP_CONSTEXPR_14 RenderingFragmentDensityMapAttachmentInfoEXT & setImageLayout( VULKAN_HPP_NAMESPACE::ImageLayout imageLayout_ ) VULKAN_HPP_NOEXCEPT { imageLayout = imageLayout_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkRenderingFragmentDensityMapAttachmentInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkRenderingFragmentDensityMapAttachmentInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, imageView, imageLayout ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( RenderingFragmentDensityMapAttachmentInfoEXT const & ) const = default; #else bool operator==( RenderingFragmentDensityMapAttachmentInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( imageView == rhs.imageView ) && ( imageLayout == rhs.imageLayout ); # endif } bool operator!=( RenderingFragmentDensityMapAttachmentInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eRenderingFragmentDensityMapAttachmentInfoEXT; const void * pNext = {}; VULKAN_HPP_NAMESPACE::ImageView imageView = {}; VULKAN_HPP_NAMESPACE::ImageLayout imageLayout = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined; }; template <> struct CppType { using Type = RenderingFragmentDensityMapAttachmentInfoEXT; }; struct RenderingFragmentShadingRateAttachmentInfoKHR { using NativeType = VkRenderingFragmentShadingRateAttachmentInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eRenderingFragmentShadingRateAttachmentInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR RenderingFragmentShadingRateAttachmentInfoKHR( VULKAN_HPP_NAMESPACE::ImageView imageView_ = {}, VULKAN_HPP_NAMESPACE::ImageLayout imageLayout_ = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined, VULKAN_HPP_NAMESPACE::Extent2D shadingRateAttachmentTexelSize_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , imageView{ imageView_ } , imageLayout{ imageLayout_ } , shadingRateAttachmentTexelSize{ shadingRateAttachmentTexelSize_ } { } VULKAN_HPP_CONSTEXPR RenderingFragmentShadingRateAttachmentInfoKHR( RenderingFragmentShadingRateAttachmentInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; RenderingFragmentShadingRateAttachmentInfoKHR( VkRenderingFragmentShadingRateAttachmentInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : RenderingFragmentShadingRateAttachmentInfoKHR( *reinterpret_cast( &rhs ) ) { } RenderingFragmentShadingRateAttachmentInfoKHR & operator=( RenderingFragmentShadingRateAttachmentInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ RenderingFragmentShadingRateAttachmentInfoKHR & operator=( VkRenderingFragmentShadingRateAttachmentInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 RenderingFragmentShadingRateAttachmentInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 RenderingFragmentShadingRateAttachmentInfoKHR & setImageView( VULKAN_HPP_NAMESPACE::ImageView imageView_ ) VULKAN_HPP_NOEXCEPT { imageView = imageView_; return *this; } VULKAN_HPP_CONSTEXPR_14 RenderingFragmentShadingRateAttachmentInfoKHR & setImageLayout( VULKAN_HPP_NAMESPACE::ImageLayout imageLayout_ ) VULKAN_HPP_NOEXCEPT { imageLayout = imageLayout_; return *this; } VULKAN_HPP_CONSTEXPR_14 RenderingFragmentShadingRateAttachmentInfoKHR & setShadingRateAttachmentTexelSize( VULKAN_HPP_NAMESPACE::Extent2D const & shadingRateAttachmentTexelSize_ ) VULKAN_HPP_NOEXCEPT { shadingRateAttachmentTexelSize = shadingRateAttachmentTexelSize_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkRenderingFragmentShadingRateAttachmentInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkRenderingFragmentShadingRateAttachmentInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, imageView, imageLayout, shadingRateAttachmentTexelSize ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( RenderingFragmentShadingRateAttachmentInfoKHR const & ) const = default; #else bool operator==( RenderingFragmentShadingRateAttachmentInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( imageView == rhs.imageView ) && ( imageLayout == rhs.imageLayout ) && ( shadingRateAttachmentTexelSize == rhs.shadingRateAttachmentTexelSize ); # endif } bool operator!=( RenderingFragmentShadingRateAttachmentInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eRenderingFragmentShadingRateAttachmentInfoKHR; const void * pNext = {}; VULKAN_HPP_NAMESPACE::ImageView imageView = {}; VULKAN_HPP_NAMESPACE::ImageLayout imageLayout = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined; VULKAN_HPP_NAMESPACE::Extent2D shadingRateAttachmentTexelSize = {}; }; template <> struct CppType { using Type = RenderingFragmentShadingRateAttachmentInfoKHR; }; struct RenderingInfo { using NativeType = VkRenderingInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eRenderingInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 RenderingInfo( VULKAN_HPP_NAMESPACE::RenderingFlags flags_ = {}, VULKAN_HPP_NAMESPACE::Rect2D renderArea_ = {}, uint32_t layerCount_ = {}, uint32_t viewMask_ = {}, uint32_t colorAttachmentCount_ = {}, const VULKAN_HPP_NAMESPACE::RenderingAttachmentInfo * pColorAttachments_ = {}, const VULKAN_HPP_NAMESPACE::RenderingAttachmentInfo * pDepthAttachment_ = {}, const VULKAN_HPP_NAMESPACE::RenderingAttachmentInfo * pStencilAttachment_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , renderArea{ renderArea_ } , layerCount{ layerCount_ } , viewMask{ viewMask_ } , colorAttachmentCount{ colorAttachmentCount_ } , pColorAttachments{ pColorAttachments_ } , pDepthAttachment{ pDepthAttachment_ } , pStencilAttachment{ pStencilAttachment_ } { } VULKAN_HPP_CONSTEXPR_14 RenderingInfo( RenderingInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; RenderingInfo( VkRenderingInfo const & rhs ) VULKAN_HPP_NOEXCEPT : RenderingInfo( *reinterpret_cast( &rhs ) ) {} # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) RenderingInfo( VULKAN_HPP_NAMESPACE::RenderingFlags flags_, VULKAN_HPP_NAMESPACE::Rect2D renderArea_, uint32_t layerCount_, uint32_t viewMask_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & colorAttachments_, const VULKAN_HPP_NAMESPACE::RenderingAttachmentInfo * pDepthAttachment_ = {}, const VULKAN_HPP_NAMESPACE::RenderingAttachmentInfo * pStencilAttachment_ = {}, const void * pNext_ = nullptr ) : pNext( pNext_ ) , flags( flags_ ) , renderArea( renderArea_ ) , layerCount( layerCount_ ) , viewMask( viewMask_ ) , colorAttachmentCount( static_cast( colorAttachments_.size() ) ) , pColorAttachments( colorAttachments_.data() ) , pDepthAttachment( pDepthAttachment_ ) , pStencilAttachment( pStencilAttachment_ ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ RenderingInfo & operator=( RenderingInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ RenderingInfo & operator=( VkRenderingInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 RenderingInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 RenderingInfo & setFlags( VULKAN_HPP_NAMESPACE::RenderingFlags flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 RenderingInfo & setRenderArea( VULKAN_HPP_NAMESPACE::Rect2D const & renderArea_ ) VULKAN_HPP_NOEXCEPT { renderArea = renderArea_; return *this; } VULKAN_HPP_CONSTEXPR_14 RenderingInfo & setLayerCount( uint32_t layerCount_ ) VULKAN_HPP_NOEXCEPT { layerCount = layerCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 RenderingInfo & setViewMask( uint32_t viewMask_ ) VULKAN_HPP_NOEXCEPT { viewMask = viewMask_; return *this; } VULKAN_HPP_CONSTEXPR_14 RenderingInfo & setColorAttachmentCount( uint32_t colorAttachmentCount_ ) VULKAN_HPP_NOEXCEPT { colorAttachmentCount = colorAttachmentCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 RenderingInfo & setPColorAttachments( const VULKAN_HPP_NAMESPACE::RenderingAttachmentInfo * pColorAttachments_ ) VULKAN_HPP_NOEXCEPT { pColorAttachments = pColorAttachments_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) RenderingInfo & setColorAttachments( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & colorAttachments_ ) VULKAN_HPP_NOEXCEPT { colorAttachmentCount = static_cast( colorAttachments_.size() ); pColorAttachments = colorAttachments_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 RenderingInfo & setPDepthAttachment( const VULKAN_HPP_NAMESPACE::RenderingAttachmentInfo * pDepthAttachment_ ) VULKAN_HPP_NOEXCEPT { pDepthAttachment = pDepthAttachment_; return *this; } VULKAN_HPP_CONSTEXPR_14 RenderingInfo & setPStencilAttachment( const VULKAN_HPP_NAMESPACE::RenderingAttachmentInfo * pStencilAttachment_ ) VULKAN_HPP_NOEXCEPT { pStencilAttachment = pStencilAttachment_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkRenderingInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkRenderingInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, renderArea, layerCount, viewMask, colorAttachmentCount, pColorAttachments, pDepthAttachment, pStencilAttachment ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( RenderingInfo const & ) const = default; #else bool operator==( RenderingInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( renderArea == rhs.renderArea ) && ( layerCount == rhs.layerCount ) && ( viewMask == rhs.viewMask ) && ( colorAttachmentCount == rhs.colorAttachmentCount ) && ( pColorAttachments == rhs.pColorAttachments ) && ( pDepthAttachment == rhs.pDepthAttachment ) && ( pStencilAttachment == rhs.pStencilAttachment ); # endif } bool operator!=( RenderingInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eRenderingInfo; const void * pNext = {}; VULKAN_HPP_NAMESPACE::RenderingFlags flags = {}; VULKAN_HPP_NAMESPACE::Rect2D renderArea = {}; uint32_t layerCount = {}; uint32_t viewMask = {}; uint32_t colorAttachmentCount = {}; const VULKAN_HPP_NAMESPACE::RenderingAttachmentInfo * pColorAttachments = {}; const VULKAN_HPP_NAMESPACE::RenderingAttachmentInfo * pDepthAttachment = {}; const VULKAN_HPP_NAMESPACE::RenderingAttachmentInfo * pStencilAttachment = {}; }; template <> struct CppType { using Type = RenderingInfo; }; using RenderingInfoKHR = RenderingInfo; struct RenderingInputAttachmentIndexInfo { using NativeType = VkRenderingInputAttachmentIndexInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eRenderingInputAttachmentIndexInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR RenderingInputAttachmentIndexInfo( uint32_t colorAttachmentCount_ = {}, const uint32_t * pColorAttachmentInputIndices_ = {}, const uint32_t * pDepthInputAttachmentIndex_ = {}, const uint32_t * pStencilInputAttachmentIndex_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , colorAttachmentCount{ colorAttachmentCount_ } , pColorAttachmentInputIndices{ pColorAttachmentInputIndices_ } , pDepthInputAttachmentIndex{ pDepthInputAttachmentIndex_ } , pStencilInputAttachmentIndex{ pStencilInputAttachmentIndex_ } { } VULKAN_HPP_CONSTEXPR RenderingInputAttachmentIndexInfo( RenderingInputAttachmentIndexInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; RenderingInputAttachmentIndexInfo( VkRenderingInputAttachmentIndexInfo const & rhs ) VULKAN_HPP_NOEXCEPT : RenderingInputAttachmentIndexInfo( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) RenderingInputAttachmentIndexInfo( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & colorAttachmentInputIndices_, const uint32_t * pDepthInputAttachmentIndex_ = {}, const uint32_t * pStencilInputAttachmentIndex_ = {}, const void * pNext_ = nullptr ) : pNext( pNext_ ) , colorAttachmentCount( static_cast( colorAttachmentInputIndices_.size() ) ) , pColorAttachmentInputIndices( colorAttachmentInputIndices_.data() ) , pDepthInputAttachmentIndex( pDepthInputAttachmentIndex_ ) , pStencilInputAttachmentIndex( pStencilInputAttachmentIndex_ ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ RenderingInputAttachmentIndexInfo & operator=( RenderingInputAttachmentIndexInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ RenderingInputAttachmentIndexInfo & operator=( VkRenderingInputAttachmentIndexInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 RenderingInputAttachmentIndexInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 RenderingInputAttachmentIndexInfo & setColorAttachmentCount( uint32_t colorAttachmentCount_ ) VULKAN_HPP_NOEXCEPT { colorAttachmentCount = colorAttachmentCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 RenderingInputAttachmentIndexInfo & setPColorAttachmentInputIndices( const uint32_t * pColorAttachmentInputIndices_ ) VULKAN_HPP_NOEXCEPT { pColorAttachmentInputIndices = pColorAttachmentInputIndices_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) RenderingInputAttachmentIndexInfo & setColorAttachmentInputIndices( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & colorAttachmentInputIndices_ ) VULKAN_HPP_NOEXCEPT { colorAttachmentCount = static_cast( colorAttachmentInputIndices_.size() ); pColorAttachmentInputIndices = colorAttachmentInputIndices_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 RenderingInputAttachmentIndexInfo & setPDepthInputAttachmentIndex( const uint32_t * pDepthInputAttachmentIndex_ ) VULKAN_HPP_NOEXCEPT { pDepthInputAttachmentIndex = pDepthInputAttachmentIndex_; return *this; } VULKAN_HPP_CONSTEXPR_14 RenderingInputAttachmentIndexInfo & setPStencilInputAttachmentIndex( const uint32_t * pStencilInputAttachmentIndex_ ) VULKAN_HPP_NOEXCEPT { pStencilInputAttachmentIndex = pStencilInputAttachmentIndex_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkRenderingInputAttachmentIndexInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkRenderingInputAttachmentIndexInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, colorAttachmentCount, pColorAttachmentInputIndices, pDepthInputAttachmentIndex, pStencilInputAttachmentIndex ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( RenderingInputAttachmentIndexInfo const & ) const = default; #else bool operator==( RenderingInputAttachmentIndexInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( colorAttachmentCount == rhs.colorAttachmentCount ) && ( pColorAttachmentInputIndices == rhs.pColorAttachmentInputIndices ) && ( pDepthInputAttachmentIndex == rhs.pDepthInputAttachmentIndex ) && ( pStencilInputAttachmentIndex == rhs.pStencilInputAttachmentIndex ); # endif } bool operator!=( RenderingInputAttachmentIndexInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eRenderingInputAttachmentIndexInfo; const void * pNext = {}; uint32_t colorAttachmentCount = {}; const uint32_t * pColorAttachmentInputIndices = {}; const uint32_t * pDepthInputAttachmentIndex = {}; const uint32_t * pStencilInputAttachmentIndex = {}; }; template <> struct CppType { using Type = RenderingInputAttachmentIndexInfo; }; using RenderingInputAttachmentIndexInfoKHR = RenderingInputAttachmentIndexInfo; struct ResolveImageInfo2 { using NativeType = VkResolveImageInfo2; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eResolveImageInfo2; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ResolveImageInfo2( VULKAN_HPP_NAMESPACE::Image srcImage_ = {}, VULKAN_HPP_NAMESPACE::ImageLayout srcImageLayout_ = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined, VULKAN_HPP_NAMESPACE::Image dstImage_ = {}, VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout_ = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined, uint32_t regionCount_ = {}, const VULKAN_HPP_NAMESPACE::ImageResolve2 * pRegions_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , srcImage{ srcImage_ } , srcImageLayout{ srcImageLayout_ } , dstImage{ dstImage_ } , dstImageLayout{ dstImageLayout_ } , regionCount{ regionCount_ } , pRegions{ pRegions_ } { } VULKAN_HPP_CONSTEXPR ResolveImageInfo2( ResolveImageInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; ResolveImageInfo2( VkResolveImageInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT : ResolveImageInfo2( *reinterpret_cast( &rhs ) ) {} # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) ResolveImageInfo2( VULKAN_HPP_NAMESPACE::Image srcImage_, VULKAN_HPP_NAMESPACE::ImageLayout srcImageLayout_, VULKAN_HPP_NAMESPACE::Image dstImage_, VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & regions_, const void * pNext_ = nullptr ) : pNext( pNext_ ) , srcImage( srcImage_ ) , srcImageLayout( srcImageLayout_ ) , dstImage( dstImage_ ) , dstImageLayout( dstImageLayout_ ) , regionCount( static_cast( regions_.size() ) ) , pRegions( regions_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ ResolveImageInfo2 & operator=( ResolveImageInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ResolveImageInfo2 & operator=( VkResolveImageInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ResolveImageInfo2 & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ResolveImageInfo2 & setSrcImage( VULKAN_HPP_NAMESPACE::Image srcImage_ ) VULKAN_HPP_NOEXCEPT { srcImage = srcImage_; return *this; } VULKAN_HPP_CONSTEXPR_14 ResolveImageInfo2 & setSrcImageLayout( VULKAN_HPP_NAMESPACE::ImageLayout srcImageLayout_ ) VULKAN_HPP_NOEXCEPT { srcImageLayout = srcImageLayout_; return *this; } VULKAN_HPP_CONSTEXPR_14 ResolveImageInfo2 & setDstImage( VULKAN_HPP_NAMESPACE::Image dstImage_ ) VULKAN_HPP_NOEXCEPT { dstImage = dstImage_; return *this; } VULKAN_HPP_CONSTEXPR_14 ResolveImageInfo2 & setDstImageLayout( VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout_ ) VULKAN_HPP_NOEXCEPT { dstImageLayout = dstImageLayout_; return *this; } VULKAN_HPP_CONSTEXPR_14 ResolveImageInfo2 & setRegionCount( uint32_t regionCount_ ) VULKAN_HPP_NOEXCEPT { regionCount = regionCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 ResolveImageInfo2 & setPRegions( const VULKAN_HPP_NAMESPACE::ImageResolve2 * pRegions_ ) VULKAN_HPP_NOEXCEPT { pRegions = pRegions_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) ResolveImageInfo2 & setRegions( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & regions_ ) VULKAN_HPP_NOEXCEPT { regionCount = static_cast( regions_.size() ); pRegions = regions_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkResolveImageInfo2 const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkResolveImageInfo2 &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, pRegions ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ResolveImageInfo2 const & ) const = default; #else bool operator==( ResolveImageInfo2 const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( srcImage == rhs.srcImage ) && ( srcImageLayout == rhs.srcImageLayout ) && ( dstImage == rhs.dstImage ) && ( dstImageLayout == rhs.dstImageLayout ) && ( regionCount == rhs.regionCount ) && ( pRegions == rhs.pRegions ); # endif } bool operator!=( ResolveImageInfo2 const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eResolveImageInfo2; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Image srcImage = {}; VULKAN_HPP_NAMESPACE::ImageLayout srcImageLayout = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined; VULKAN_HPP_NAMESPACE::Image dstImage = {}; VULKAN_HPP_NAMESPACE::ImageLayout dstImageLayout = VULKAN_HPP_NAMESPACE::ImageLayout::eUndefined; uint32_t regionCount = {}; const VULKAN_HPP_NAMESPACE::ImageResolve2 * pRegions = {}; }; template <> struct CppType { using Type = ResolveImageInfo2; }; using ResolveImageInfo2KHR = ResolveImageInfo2; struct SamplerBlockMatchWindowCreateInfoQCOM { using NativeType = VkSamplerBlockMatchWindowCreateInfoQCOM; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSamplerBlockMatchWindowCreateInfoQCOM; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR SamplerBlockMatchWindowCreateInfoQCOM( VULKAN_HPP_NAMESPACE::Extent2D windowExtent_ = {}, VULKAN_HPP_NAMESPACE::BlockMatchWindowCompareModeQCOM windowCompareMode_ = VULKAN_HPP_NAMESPACE::BlockMatchWindowCompareModeQCOM::eMin, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , windowExtent{ windowExtent_ } , windowCompareMode{ windowCompareMode_ } { } VULKAN_HPP_CONSTEXPR SamplerBlockMatchWindowCreateInfoQCOM( SamplerBlockMatchWindowCreateInfoQCOM const & rhs ) VULKAN_HPP_NOEXCEPT = default; SamplerBlockMatchWindowCreateInfoQCOM( VkSamplerBlockMatchWindowCreateInfoQCOM const & rhs ) VULKAN_HPP_NOEXCEPT : SamplerBlockMatchWindowCreateInfoQCOM( *reinterpret_cast( &rhs ) ) { } SamplerBlockMatchWindowCreateInfoQCOM & operator=( SamplerBlockMatchWindowCreateInfoQCOM const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ SamplerBlockMatchWindowCreateInfoQCOM & operator=( VkSamplerBlockMatchWindowCreateInfoQCOM const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 SamplerBlockMatchWindowCreateInfoQCOM & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 SamplerBlockMatchWindowCreateInfoQCOM & setWindowExtent( VULKAN_HPP_NAMESPACE::Extent2D const & windowExtent_ ) VULKAN_HPP_NOEXCEPT { windowExtent = windowExtent_; return *this; } VULKAN_HPP_CONSTEXPR_14 SamplerBlockMatchWindowCreateInfoQCOM & setWindowCompareMode( VULKAN_HPP_NAMESPACE::BlockMatchWindowCompareModeQCOM windowCompareMode_ ) VULKAN_HPP_NOEXCEPT { windowCompareMode = windowCompareMode_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkSamplerBlockMatchWindowCreateInfoQCOM const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkSamplerBlockMatchWindowCreateInfoQCOM &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, windowExtent, windowCompareMode ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( SamplerBlockMatchWindowCreateInfoQCOM const & ) const = default; #else bool operator==( SamplerBlockMatchWindowCreateInfoQCOM const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( windowExtent == rhs.windowExtent ) && ( windowCompareMode == rhs.windowCompareMode ); # endif } bool operator!=( SamplerBlockMatchWindowCreateInfoQCOM const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSamplerBlockMatchWindowCreateInfoQCOM; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Extent2D windowExtent = {}; VULKAN_HPP_NAMESPACE::BlockMatchWindowCompareModeQCOM windowCompareMode = VULKAN_HPP_NAMESPACE::BlockMatchWindowCompareModeQCOM::eMin; }; template <> struct CppType { using Type = SamplerBlockMatchWindowCreateInfoQCOM; }; struct SamplerBorderColorComponentMappingCreateInfoEXT { using NativeType = VkSamplerBorderColorComponentMappingCreateInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSamplerBorderColorComponentMappingCreateInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR SamplerBorderColorComponentMappingCreateInfoEXT( VULKAN_HPP_NAMESPACE::ComponentMapping components_ = {}, VULKAN_HPP_NAMESPACE::Bool32 srgb_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , components{ components_ } , srgb{ srgb_ } { } VULKAN_HPP_CONSTEXPR SamplerBorderColorComponentMappingCreateInfoEXT( SamplerBorderColorComponentMappingCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; SamplerBorderColorComponentMappingCreateInfoEXT( VkSamplerBorderColorComponentMappingCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : SamplerBorderColorComponentMappingCreateInfoEXT( *reinterpret_cast( &rhs ) ) { } SamplerBorderColorComponentMappingCreateInfoEXT & operator=( SamplerBorderColorComponentMappingCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ SamplerBorderColorComponentMappingCreateInfoEXT & operator=( VkSamplerBorderColorComponentMappingCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 SamplerBorderColorComponentMappingCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 SamplerBorderColorComponentMappingCreateInfoEXT & setComponents( VULKAN_HPP_NAMESPACE::ComponentMapping const & components_ ) VULKAN_HPP_NOEXCEPT { components = components_; return *this; } VULKAN_HPP_CONSTEXPR_14 SamplerBorderColorComponentMappingCreateInfoEXT & setSrgb( VULKAN_HPP_NAMESPACE::Bool32 srgb_ ) VULKAN_HPP_NOEXCEPT { srgb = srgb_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkSamplerBorderColorComponentMappingCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkSamplerBorderColorComponentMappingCreateInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, components, srgb ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( SamplerBorderColorComponentMappingCreateInfoEXT const & ) const = default; #else bool operator==( SamplerBorderColorComponentMappingCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( components == rhs.components ) && ( srgb == rhs.srgb ); # endif } bool operator!=( SamplerBorderColorComponentMappingCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSamplerBorderColorComponentMappingCreateInfoEXT; const void * pNext = {}; VULKAN_HPP_NAMESPACE::ComponentMapping components = {}; VULKAN_HPP_NAMESPACE::Bool32 srgb = {}; }; template <> struct CppType { using Type = SamplerBorderColorComponentMappingCreateInfoEXT; }; struct SamplerCaptureDescriptorDataInfoEXT { using NativeType = VkSamplerCaptureDescriptorDataInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSamplerCaptureDescriptorDataInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR SamplerCaptureDescriptorDataInfoEXT( VULKAN_HPP_NAMESPACE::Sampler sampler_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , sampler{ sampler_ } { } VULKAN_HPP_CONSTEXPR SamplerCaptureDescriptorDataInfoEXT( SamplerCaptureDescriptorDataInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; SamplerCaptureDescriptorDataInfoEXT( VkSamplerCaptureDescriptorDataInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : SamplerCaptureDescriptorDataInfoEXT( *reinterpret_cast( &rhs ) ) { } SamplerCaptureDescriptorDataInfoEXT & operator=( SamplerCaptureDescriptorDataInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ SamplerCaptureDescriptorDataInfoEXT & operator=( VkSamplerCaptureDescriptorDataInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 SamplerCaptureDescriptorDataInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 SamplerCaptureDescriptorDataInfoEXT & setSampler( VULKAN_HPP_NAMESPACE::Sampler sampler_ ) VULKAN_HPP_NOEXCEPT { sampler = sampler_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkSamplerCaptureDescriptorDataInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkSamplerCaptureDescriptorDataInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, sampler ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( SamplerCaptureDescriptorDataInfoEXT const & ) const = default; #else bool operator==( SamplerCaptureDescriptorDataInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( sampler == rhs.sampler ); # endif } bool operator!=( SamplerCaptureDescriptorDataInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSamplerCaptureDescriptorDataInfoEXT; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Sampler sampler = {}; }; template <> struct CppType { using Type = SamplerCaptureDescriptorDataInfoEXT; }; struct SamplerCreateInfo { using NativeType = VkSamplerCreateInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSamplerCreateInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR SamplerCreateInfo( VULKAN_HPP_NAMESPACE::SamplerCreateFlags flags_ = {}, VULKAN_HPP_NAMESPACE::Filter magFilter_ = VULKAN_HPP_NAMESPACE::Filter::eNearest, VULKAN_HPP_NAMESPACE::Filter minFilter_ = VULKAN_HPP_NAMESPACE::Filter::eNearest, VULKAN_HPP_NAMESPACE::SamplerMipmapMode mipmapMode_ = VULKAN_HPP_NAMESPACE::SamplerMipmapMode::eNearest, VULKAN_HPP_NAMESPACE::SamplerAddressMode addressModeU_ = VULKAN_HPP_NAMESPACE::SamplerAddressMode::eRepeat, VULKAN_HPP_NAMESPACE::SamplerAddressMode addressModeV_ = VULKAN_HPP_NAMESPACE::SamplerAddressMode::eRepeat, VULKAN_HPP_NAMESPACE::SamplerAddressMode addressModeW_ = VULKAN_HPP_NAMESPACE::SamplerAddressMode::eRepeat, float mipLodBias_ = {}, VULKAN_HPP_NAMESPACE::Bool32 anisotropyEnable_ = {}, float maxAnisotropy_ = {}, VULKAN_HPP_NAMESPACE::Bool32 compareEnable_ = {}, VULKAN_HPP_NAMESPACE::CompareOp compareOp_ = VULKAN_HPP_NAMESPACE::CompareOp::eNever, float minLod_ = {}, float maxLod_ = {}, VULKAN_HPP_NAMESPACE::BorderColor borderColor_ = VULKAN_HPP_NAMESPACE::BorderColor::eFloatTransparentBlack, VULKAN_HPP_NAMESPACE::Bool32 unnormalizedCoordinates_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , magFilter{ magFilter_ } , minFilter{ minFilter_ } , mipmapMode{ mipmapMode_ } , addressModeU{ addressModeU_ } , addressModeV{ addressModeV_ } , addressModeW{ addressModeW_ } , mipLodBias{ mipLodBias_ } , anisotropyEnable{ anisotropyEnable_ } , maxAnisotropy{ maxAnisotropy_ } , compareEnable{ compareEnable_ } , compareOp{ compareOp_ } , minLod{ minLod_ } , maxLod{ maxLod_ } , borderColor{ borderColor_ } , unnormalizedCoordinates{ unnormalizedCoordinates_ } { } VULKAN_HPP_CONSTEXPR SamplerCreateInfo( SamplerCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; SamplerCreateInfo( VkSamplerCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT : SamplerCreateInfo( *reinterpret_cast( &rhs ) ) {} SamplerCreateInfo & operator=( SamplerCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ SamplerCreateInfo & operator=( VkSamplerCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 SamplerCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 SamplerCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::SamplerCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 SamplerCreateInfo & setMagFilter( VULKAN_HPP_NAMESPACE::Filter magFilter_ ) VULKAN_HPP_NOEXCEPT { magFilter = magFilter_; return *this; } VULKAN_HPP_CONSTEXPR_14 SamplerCreateInfo & setMinFilter( VULKAN_HPP_NAMESPACE::Filter minFilter_ ) VULKAN_HPP_NOEXCEPT { minFilter = minFilter_; return *this; } VULKAN_HPP_CONSTEXPR_14 SamplerCreateInfo & setMipmapMode( VULKAN_HPP_NAMESPACE::SamplerMipmapMode mipmapMode_ ) VULKAN_HPP_NOEXCEPT { mipmapMode = mipmapMode_; return *this; } VULKAN_HPP_CONSTEXPR_14 SamplerCreateInfo & setAddressModeU( VULKAN_HPP_NAMESPACE::SamplerAddressMode addressModeU_ ) VULKAN_HPP_NOEXCEPT { addressModeU = addressModeU_; return *this; } VULKAN_HPP_CONSTEXPR_14 SamplerCreateInfo & setAddressModeV( VULKAN_HPP_NAMESPACE::SamplerAddressMode addressModeV_ ) VULKAN_HPP_NOEXCEPT { addressModeV = addressModeV_; return *this; } VULKAN_HPP_CONSTEXPR_14 SamplerCreateInfo & setAddressModeW( VULKAN_HPP_NAMESPACE::SamplerAddressMode addressModeW_ ) VULKAN_HPP_NOEXCEPT { addressModeW = addressModeW_; return *this; } VULKAN_HPP_CONSTEXPR_14 SamplerCreateInfo & setMipLodBias( float mipLodBias_ ) VULKAN_HPP_NOEXCEPT { mipLodBias = mipLodBias_; return *this; } VULKAN_HPP_CONSTEXPR_14 SamplerCreateInfo & setAnisotropyEnable( VULKAN_HPP_NAMESPACE::Bool32 anisotropyEnable_ ) VULKAN_HPP_NOEXCEPT { anisotropyEnable = anisotropyEnable_; return *this; } VULKAN_HPP_CONSTEXPR_14 SamplerCreateInfo & setMaxAnisotropy( float maxAnisotropy_ ) VULKAN_HPP_NOEXCEPT { maxAnisotropy = maxAnisotropy_; return *this; } VULKAN_HPP_CONSTEXPR_14 SamplerCreateInfo & setCompareEnable( VULKAN_HPP_NAMESPACE::Bool32 compareEnable_ ) VULKAN_HPP_NOEXCEPT { compareEnable = compareEnable_; return *this; } VULKAN_HPP_CONSTEXPR_14 SamplerCreateInfo & setCompareOp( VULKAN_HPP_NAMESPACE::CompareOp compareOp_ ) VULKAN_HPP_NOEXCEPT { compareOp = compareOp_; return *this; } VULKAN_HPP_CONSTEXPR_14 SamplerCreateInfo & setMinLod( float minLod_ ) VULKAN_HPP_NOEXCEPT { minLod = minLod_; return *this; } VULKAN_HPP_CONSTEXPR_14 SamplerCreateInfo & setMaxLod( float maxLod_ ) VULKAN_HPP_NOEXCEPT { maxLod = maxLod_; return *this; } VULKAN_HPP_CONSTEXPR_14 SamplerCreateInfo & setBorderColor( VULKAN_HPP_NAMESPACE::BorderColor borderColor_ ) VULKAN_HPP_NOEXCEPT { borderColor = borderColor_; return *this; } VULKAN_HPP_CONSTEXPR_14 SamplerCreateInfo & setUnnormalizedCoordinates( VULKAN_HPP_NAMESPACE::Bool32 unnormalizedCoordinates_ ) VULKAN_HPP_NOEXCEPT { unnormalizedCoordinates = unnormalizedCoordinates_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkSamplerCreateInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkSamplerCreateInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, magFilter, minFilter, mipmapMode, addressModeU, addressModeV, addressModeW, mipLodBias, anisotropyEnable, maxAnisotropy, compareEnable, compareOp, minLod, maxLod, borderColor, unnormalizedCoordinates ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( SamplerCreateInfo const & ) const = default; #else bool operator==( SamplerCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( magFilter == rhs.magFilter ) && ( minFilter == rhs.minFilter ) && ( mipmapMode == rhs.mipmapMode ) && ( addressModeU == rhs.addressModeU ) && ( addressModeV == rhs.addressModeV ) && ( addressModeW == rhs.addressModeW ) && ( mipLodBias == rhs.mipLodBias ) && ( anisotropyEnable == rhs.anisotropyEnable ) && ( maxAnisotropy == rhs.maxAnisotropy ) && ( compareEnable == rhs.compareEnable ) && ( compareOp == rhs.compareOp ) && ( minLod == rhs.minLod ) && ( maxLod == rhs.maxLod ) && ( borderColor == rhs.borderColor ) && ( unnormalizedCoordinates == rhs.unnormalizedCoordinates ); # endif } bool operator!=( SamplerCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSamplerCreateInfo; const void * pNext = {}; VULKAN_HPP_NAMESPACE::SamplerCreateFlags flags = {}; VULKAN_HPP_NAMESPACE::Filter magFilter = VULKAN_HPP_NAMESPACE::Filter::eNearest; VULKAN_HPP_NAMESPACE::Filter minFilter = VULKAN_HPP_NAMESPACE::Filter::eNearest; VULKAN_HPP_NAMESPACE::SamplerMipmapMode mipmapMode = VULKAN_HPP_NAMESPACE::SamplerMipmapMode::eNearest; VULKAN_HPP_NAMESPACE::SamplerAddressMode addressModeU = VULKAN_HPP_NAMESPACE::SamplerAddressMode::eRepeat; VULKAN_HPP_NAMESPACE::SamplerAddressMode addressModeV = VULKAN_HPP_NAMESPACE::SamplerAddressMode::eRepeat; VULKAN_HPP_NAMESPACE::SamplerAddressMode addressModeW = VULKAN_HPP_NAMESPACE::SamplerAddressMode::eRepeat; float mipLodBias = {}; VULKAN_HPP_NAMESPACE::Bool32 anisotropyEnable = {}; float maxAnisotropy = {}; VULKAN_HPP_NAMESPACE::Bool32 compareEnable = {}; VULKAN_HPP_NAMESPACE::CompareOp compareOp = VULKAN_HPP_NAMESPACE::CompareOp::eNever; float minLod = {}; float maxLod = {}; VULKAN_HPP_NAMESPACE::BorderColor borderColor = VULKAN_HPP_NAMESPACE::BorderColor::eFloatTransparentBlack; VULKAN_HPP_NAMESPACE::Bool32 unnormalizedCoordinates = {}; }; template <> struct CppType { using Type = SamplerCreateInfo; }; struct SamplerCubicWeightsCreateInfoQCOM { using NativeType = VkSamplerCubicWeightsCreateInfoQCOM; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSamplerCubicWeightsCreateInfoQCOM; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR SamplerCubicWeightsCreateInfoQCOM( VULKAN_HPP_NAMESPACE::CubicFilterWeightsQCOM cubicWeights_ = VULKAN_HPP_NAMESPACE::CubicFilterWeightsQCOM::eCatmullRom, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , cubicWeights{ cubicWeights_ } { } VULKAN_HPP_CONSTEXPR SamplerCubicWeightsCreateInfoQCOM( SamplerCubicWeightsCreateInfoQCOM const & rhs ) VULKAN_HPP_NOEXCEPT = default; SamplerCubicWeightsCreateInfoQCOM( VkSamplerCubicWeightsCreateInfoQCOM const & rhs ) VULKAN_HPP_NOEXCEPT : SamplerCubicWeightsCreateInfoQCOM( *reinterpret_cast( &rhs ) ) { } SamplerCubicWeightsCreateInfoQCOM & operator=( SamplerCubicWeightsCreateInfoQCOM const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ SamplerCubicWeightsCreateInfoQCOM & operator=( VkSamplerCubicWeightsCreateInfoQCOM const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 SamplerCubicWeightsCreateInfoQCOM & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 SamplerCubicWeightsCreateInfoQCOM & setCubicWeights( VULKAN_HPP_NAMESPACE::CubicFilterWeightsQCOM cubicWeights_ ) VULKAN_HPP_NOEXCEPT { cubicWeights = cubicWeights_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkSamplerCubicWeightsCreateInfoQCOM const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkSamplerCubicWeightsCreateInfoQCOM &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, cubicWeights ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( SamplerCubicWeightsCreateInfoQCOM const & ) const = default; #else bool operator==( SamplerCubicWeightsCreateInfoQCOM const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( cubicWeights == rhs.cubicWeights ); # endif } bool operator!=( SamplerCubicWeightsCreateInfoQCOM const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSamplerCubicWeightsCreateInfoQCOM; const void * pNext = {}; VULKAN_HPP_NAMESPACE::CubicFilterWeightsQCOM cubicWeights = VULKAN_HPP_NAMESPACE::CubicFilterWeightsQCOM::eCatmullRom; }; template <> struct CppType { using Type = SamplerCubicWeightsCreateInfoQCOM; }; struct SamplerCustomBorderColorCreateInfoEXT { using NativeType = VkSamplerCustomBorderColorCreateInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSamplerCustomBorderColorCreateInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 SamplerCustomBorderColorCreateInfoEXT( VULKAN_HPP_NAMESPACE::ClearColorValue customBorderColor_ = {}, VULKAN_HPP_NAMESPACE::Format format_ = VULKAN_HPP_NAMESPACE::Format::eUndefined, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , customBorderColor{ customBorderColor_ } , format{ format_ } { } VULKAN_HPP_CONSTEXPR_14 SamplerCustomBorderColorCreateInfoEXT( SamplerCustomBorderColorCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; SamplerCustomBorderColorCreateInfoEXT( VkSamplerCustomBorderColorCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : SamplerCustomBorderColorCreateInfoEXT( *reinterpret_cast( &rhs ) ) { } SamplerCustomBorderColorCreateInfoEXT & operator=( SamplerCustomBorderColorCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ SamplerCustomBorderColorCreateInfoEXT & operator=( VkSamplerCustomBorderColorCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 SamplerCustomBorderColorCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 SamplerCustomBorderColorCreateInfoEXT & setCustomBorderColor( VULKAN_HPP_NAMESPACE::ClearColorValue const & customBorderColor_ ) VULKAN_HPP_NOEXCEPT { customBorderColor = customBorderColor_; return *this; } VULKAN_HPP_CONSTEXPR_14 SamplerCustomBorderColorCreateInfoEXT & setFormat( VULKAN_HPP_NAMESPACE::Format format_ ) VULKAN_HPP_NOEXCEPT { format = format_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkSamplerCustomBorderColorCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkSamplerCustomBorderColorCreateInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, customBorderColor, format ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSamplerCustomBorderColorCreateInfoEXT; const void * pNext = {}; VULKAN_HPP_NAMESPACE::ClearColorValue customBorderColor = {}; VULKAN_HPP_NAMESPACE::Format format = VULKAN_HPP_NAMESPACE::Format::eUndefined; }; template <> struct CppType { using Type = SamplerCustomBorderColorCreateInfoEXT; }; struct SamplerReductionModeCreateInfo { using NativeType = VkSamplerReductionModeCreateInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSamplerReductionModeCreateInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR SamplerReductionModeCreateInfo( VULKAN_HPP_NAMESPACE::SamplerReductionMode reductionMode_ = VULKAN_HPP_NAMESPACE::SamplerReductionMode::eWeightedAverage, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , reductionMode{ reductionMode_ } { } VULKAN_HPP_CONSTEXPR SamplerReductionModeCreateInfo( SamplerReductionModeCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; SamplerReductionModeCreateInfo( VkSamplerReductionModeCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT : SamplerReductionModeCreateInfo( *reinterpret_cast( &rhs ) ) { } SamplerReductionModeCreateInfo & operator=( SamplerReductionModeCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ SamplerReductionModeCreateInfo & operator=( VkSamplerReductionModeCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 SamplerReductionModeCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 SamplerReductionModeCreateInfo & setReductionMode( VULKAN_HPP_NAMESPACE::SamplerReductionMode reductionMode_ ) VULKAN_HPP_NOEXCEPT { reductionMode = reductionMode_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkSamplerReductionModeCreateInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkSamplerReductionModeCreateInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, reductionMode ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( SamplerReductionModeCreateInfo const & ) const = default; #else bool operator==( SamplerReductionModeCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( reductionMode == rhs.reductionMode ); # endif } bool operator!=( SamplerReductionModeCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSamplerReductionModeCreateInfo; const void * pNext = {}; VULKAN_HPP_NAMESPACE::SamplerReductionMode reductionMode = VULKAN_HPP_NAMESPACE::SamplerReductionMode::eWeightedAverage; }; template <> struct CppType { using Type = SamplerReductionModeCreateInfo; }; using SamplerReductionModeCreateInfoEXT = SamplerReductionModeCreateInfo; struct SamplerYcbcrConversionCreateInfo { using NativeType = VkSamplerYcbcrConversionCreateInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSamplerYcbcrConversionCreateInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR SamplerYcbcrConversionCreateInfo( VULKAN_HPP_NAMESPACE::Format format_ = VULKAN_HPP_NAMESPACE::Format::eUndefined, VULKAN_HPP_NAMESPACE::SamplerYcbcrModelConversion ycbcrModel_ = VULKAN_HPP_NAMESPACE::SamplerYcbcrModelConversion::eRgbIdentity, VULKAN_HPP_NAMESPACE::SamplerYcbcrRange ycbcrRange_ = VULKAN_HPP_NAMESPACE::SamplerYcbcrRange::eItuFull, VULKAN_HPP_NAMESPACE::ComponentMapping components_ = {}, VULKAN_HPP_NAMESPACE::ChromaLocation xChromaOffset_ = VULKAN_HPP_NAMESPACE::ChromaLocation::eCositedEven, VULKAN_HPP_NAMESPACE::ChromaLocation yChromaOffset_ = VULKAN_HPP_NAMESPACE::ChromaLocation::eCositedEven, VULKAN_HPP_NAMESPACE::Filter chromaFilter_ = VULKAN_HPP_NAMESPACE::Filter::eNearest, VULKAN_HPP_NAMESPACE::Bool32 forceExplicitReconstruction_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , format{ format_ } , ycbcrModel{ ycbcrModel_ } , ycbcrRange{ ycbcrRange_ } , components{ components_ } , xChromaOffset{ xChromaOffset_ } , yChromaOffset{ yChromaOffset_ } , chromaFilter{ chromaFilter_ } , forceExplicitReconstruction{ forceExplicitReconstruction_ } { } VULKAN_HPP_CONSTEXPR SamplerYcbcrConversionCreateInfo( SamplerYcbcrConversionCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; SamplerYcbcrConversionCreateInfo( VkSamplerYcbcrConversionCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT : SamplerYcbcrConversionCreateInfo( *reinterpret_cast( &rhs ) ) { } SamplerYcbcrConversionCreateInfo & operator=( SamplerYcbcrConversionCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ SamplerYcbcrConversionCreateInfo & operator=( VkSamplerYcbcrConversionCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 SamplerYcbcrConversionCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 SamplerYcbcrConversionCreateInfo & setFormat( VULKAN_HPP_NAMESPACE::Format format_ ) VULKAN_HPP_NOEXCEPT { format = format_; return *this; } VULKAN_HPP_CONSTEXPR_14 SamplerYcbcrConversionCreateInfo & setYcbcrModel( VULKAN_HPP_NAMESPACE::SamplerYcbcrModelConversion ycbcrModel_ ) VULKAN_HPP_NOEXCEPT { ycbcrModel = ycbcrModel_; return *this; } VULKAN_HPP_CONSTEXPR_14 SamplerYcbcrConversionCreateInfo & setYcbcrRange( VULKAN_HPP_NAMESPACE::SamplerYcbcrRange ycbcrRange_ ) VULKAN_HPP_NOEXCEPT { ycbcrRange = ycbcrRange_; return *this; } VULKAN_HPP_CONSTEXPR_14 SamplerYcbcrConversionCreateInfo & setComponents( VULKAN_HPP_NAMESPACE::ComponentMapping const & components_ ) VULKAN_HPP_NOEXCEPT { components = components_; return *this; } VULKAN_HPP_CONSTEXPR_14 SamplerYcbcrConversionCreateInfo & setXChromaOffset( VULKAN_HPP_NAMESPACE::ChromaLocation xChromaOffset_ ) VULKAN_HPP_NOEXCEPT { xChromaOffset = xChromaOffset_; return *this; } VULKAN_HPP_CONSTEXPR_14 SamplerYcbcrConversionCreateInfo & setYChromaOffset( VULKAN_HPP_NAMESPACE::ChromaLocation yChromaOffset_ ) VULKAN_HPP_NOEXCEPT { yChromaOffset = yChromaOffset_; return *this; } VULKAN_HPP_CONSTEXPR_14 SamplerYcbcrConversionCreateInfo & setChromaFilter( VULKAN_HPP_NAMESPACE::Filter chromaFilter_ ) VULKAN_HPP_NOEXCEPT { chromaFilter = chromaFilter_; return *this; } VULKAN_HPP_CONSTEXPR_14 SamplerYcbcrConversionCreateInfo & setForceExplicitReconstruction( VULKAN_HPP_NAMESPACE::Bool32 forceExplicitReconstruction_ ) VULKAN_HPP_NOEXCEPT { forceExplicitReconstruction = forceExplicitReconstruction_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkSamplerYcbcrConversionCreateInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkSamplerYcbcrConversionCreateInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, format, ycbcrModel, ycbcrRange, components, xChromaOffset, yChromaOffset, chromaFilter, forceExplicitReconstruction ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( SamplerYcbcrConversionCreateInfo const & ) const = default; #else bool operator==( SamplerYcbcrConversionCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( format == rhs.format ) && ( ycbcrModel == rhs.ycbcrModel ) && ( ycbcrRange == rhs.ycbcrRange ) && ( components == rhs.components ) && ( xChromaOffset == rhs.xChromaOffset ) && ( yChromaOffset == rhs.yChromaOffset ) && ( chromaFilter == rhs.chromaFilter ) && ( forceExplicitReconstruction == rhs.forceExplicitReconstruction ); # endif } bool operator!=( SamplerYcbcrConversionCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSamplerYcbcrConversionCreateInfo; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Format format = VULKAN_HPP_NAMESPACE::Format::eUndefined; VULKAN_HPP_NAMESPACE::SamplerYcbcrModelConversion ycbcrModel = VULKAN_HPP_NAMESPACE::SamplerYcbcrModelConversion::eRgbIdentity; VULKAN_HPP_NAMESPACE::SamplerYcbcrRange ycbcrRange = VULKAN_HPP_NAMESPACE::SamplerYcbcrRange::eItuFull; VULKAN_HPP_NAMESPACE::ComponentMapping components = {}; VULKAN_HPP_NAMESPACE::ChromaLocation xChromaOffset = VULKAN_HPP_NAMESPACE::ChromaLocation::eCositedEven; VULKAN_HPP_NAMESPACE::ChromaLocation yChromaOffset = VULKAN_HPP_NAMESPACE::ChromaLocation::eCositedEven; VULKAN_HPP_NAMESPACE::Filter chromaFilter = VULKAN_HPP_NAMESPACE::Filter::eNearest; VULKAN_HPP_NAMESPACE::Bool32 forceExplicitReconstruction = {}; }; template <> struct CppType { using Type = SamplerYcbcrConversionCreateInfo; }; using SamplerYcbcrConversionCreateInfoKHR = SamplerYcbcrConversionCreateInfo; struct SamplerYcbcrConversionImageFormatProperties { using NativeType = VkSamplerYcbcrConversionImageFormatProperties; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSamplerYcbcrConversionImageFormatProperties; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR SamplerYcbcrConversionImageFormatProperties( uint32_t combinedImageSamplerDescriptorCount_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , combinedImageSamplerDescriptorCount{ combinedImageSamplerDescriptorCount_ } { } VULKAN_HPP_CONSTEXPR SamplerYcbcrConversionImageFormatProperties( SamplerYcbcrConversionImageFormatProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; SamplerYcbcrConversionImageFormatProperties( VkSamplerYcbcrConversionImageFormatProperties const & rhs ) VULKAN_HPP_NOEXCEPT : SamplerYcbcrConversionImageFormatProperties( *reinterpret_cast( &rhs ) ) { } SamplerYcbcrConversionImageFormatProperties & operator=( SamplerYcbcrConversionImageFormatProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ SamplerYcbcrConversionImageFormatProperties & operator=( VkSamplerYcbcrConversionImageFormatProperties const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkSamplerYcbcrConversionImageFormatProperties const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkSamplerYcbcrConversionImageFormatProperties &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, combinedImageSamplerDescriptorCount ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( SamplerYcbcrConversionImageFormatProperties const & ) const = default; #else bool operator==( SamplerYcbcrConversionImageFormatProperties const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( combinedImageSamplerDescriptorCount == rhs.combinedImageSamplerDescriptorCount ); # endif } bool operator!=( SamplerYcbcrConversionImageFormatProperties const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSamplerYcbcrConversionImageFormatProperties; void * pNext = {}; uint32_t combinedImageSamplerDescriptorCount = {}; }; template <> struct CppType { using Type = SamplerYcbcrConversionImageFormatProperties; }; using SamplerYcbcrConversionImageFormatPropertiesKHR = SamplerYcbcrConversionImageFormatProperties; struct SamplerYcbcrConversionInfo { using NativeType = VkSamplerYcbcrConversionInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSamplerYcbcrConversionInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR SamplerYcbcrConversionInfo( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion conversion_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , conversion{ conversion_ } { } VULKAN_HPP_CONSTEXPR SamplerYcbcrConversionInfo( SamplerYcbcrConversionInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; SamplerYcbcrConversionInfo( VkSamplerYcbcrConversionInfo const & rhs ) VULKAN_HPP_NOEXCEPT : SamplerYcbcrConversionInfo( *reinterpret_cast( &rhs ) ) { } SamplerYcbcrConversionInfo & operator=( SamplerYcbcrConversionInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ SamplerYcbcrConversionInfo & operator=( VkSamplerYcbcrConversionInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 SamplerYcbcrConversionInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 SamplerYcbcrConversionInfo & setConversion( VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion conversion_ ) VULKAN_HPP_NOEXCEPT { conversion = conversion_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkSamplerYcbcrConversionInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkSamplerYcbcrConversionInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, conversion ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( SamplerYcbcrConversionInfo const & ) const = default; #else bool operator==( SamplerYcbcrConversionInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( conversion == rhs.conversion ); # endif } bool operator!=( SamplerYcbcrConversionInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSamplerYcbcrConversionInfo; const void * pNext = {}; VULKAN_HPP_NAMESPACE::SamplerYcbcrConversion conversion = {}; }; template <> struct CppType { using Type = SamplerYcbcrConversionInfo; }; using SamplerYcbcrConversionInfoKHR = SamplerYcbcrConversionInfo; struct SamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM { using NativeType = VkSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR SamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM( VULKAN_HPP_NAMESPACE::Bool32 enableYDegamma_ = {}, VULKAN_HPP_NAMESPACE::Bool32 enableCbCrDegamma_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , enableYDegamma{ enableYDegamma_ } , enableCbCrDegamma{ enableCbCrDegamma_ } { } VULKAN_HPP_CONSTEXPR SamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM( SamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM const & rhs ) VULKAN_HPP_NOEXCEPT = default; SamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM( VkSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM const & rhs ) VULKAN_HPP_NOEXCEPT : SamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM( *reinterpret_cast( &rhs ) ) { } SamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM & operator=( SamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ SamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM & operator=( VkSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 SamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 SamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM & setEnableYDegamma( VULKAN_HPP_NAMESPACE::Bool32 enableYDegamma_ ) VULKAN_HPP_NOEXCEPT { enableYDegamma = enableYDegamma_; return *this; } VULKAN_HPP_CONSTEXPR_14 SamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM & setEnableCbCrDegamma( VULKAN_HPP_NAMESPACE::Bool32 enableCbCrDegamma_ ) VULKAN_HPP_NOEXCEPT { enableCbCrDegamma = enableCbCrDegamma_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, enableYDegamma, enableCbCrDegamma ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( SamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM const & ) const = default; #else bool operator==( SamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( enableYDegamma == rhs.enableYDegamma ) && ( enableCbCrDegamma == rhs.enableCbCrDegamma ); # endif } bool operator!=( SamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 enableYDegamma = {}; VULKAN_HPP_NAMESPACE::Bool32 enableCbCrDegamma = {}; }; template <> struct CppType { using Type = SamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM; }; #if defined( VK_USE_PLATFORM_SCREEN_QNX ) struct ScreenBufferFormatPropertiesQNX { using NativeType = VkScreenBufferFormatPropertiesQNX; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eScreenBufferFormatPropertiesQNX; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ScreenBufferFormatPropertiesQNX( VULKAN_HPP_NAMESPACE::Format format_ = VULKAN_HPP_NAMESPACE::Format::eUndefined, uint64_t externalFormat_ = {}, uint64_t screenUsage_ = {}, VULKAN_HPP_NAMESPACE::FormatFeatureFlags formatFeatures_ = {}, VULKAN_HPP_NAMESPACE::ComponentMapping samplerYcbcrConversionComponents_ = {}, VULKAN_HPP_NAMESPACE::SamplerYcbcrModelConversion suggestedYcbcrModel_ = VULKAN_HPP_NAMESPACE::SamplerYcbcrModelConversion::eRgbIdentity, VULKAN_HPP_NAMESPACE::SamplerYcbcrRange suggestedYcbcrRange_ = VULKAN_HPP_NAMESPACE::SamplerYcbcrRange::eItuFull, VULKAN_HPP_NAMESPACE::ChromaLocation suggestedXChromaOffset_ = VULKAN_HPP_NAMESPACE::ChromaLocation::eCositedEven, VULKAN_HPP_NAMESPACE::ChromaLocation suggestedYChromaOffset_ = VULKAN_HPP_NAMESPACE::ChromaLocation::eCositedEven, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , format{ format_ } , externalFormat{ externalFormat_ } , screenUsage{ screenUsage_ } , formatFeatures{ formatFeatures_ } , samplerYcbcrConversionComponents{ samplerYcbcrConversionComponents_ } , suggestedYcbcrModel{ suggestedYcbcrModel_ } , suggestedYcbcrRange{ suggestedYcbcrRange_ } , suggestedXChromaOffset{ suggestedXChromaOffset_ } , suggestedYChromaOffset{ suggestedYChromaOffset_ } { } VULKAN_HPP_CONSTEXPR ScreenBufferFormatPropertiesQNX( ScreenBufferFormatPropertiesQNX const & rhs ) VULKAN_HPP_NOEXCEPT = default; ScreenBufferFormatPropertiesQNX( VkScreenBufferFormatPropertiesQNX const & rhs ) VULKAN_HPP_NOEXCEPT : ScreenBufferFormatPropertiesQNX( *reinterpret_cast( &rhs ) ) { } ScreenBufferFormatPropertiesQNX & operator=( ScreenBufferFormatPropertiesQNX const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ScreenBufferFormatPropertiesQNX & operator=( VkScreenBufferFormatPropertiesQNX const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkScreenBufferFormatPropertiesQNX const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkScreenBufferFormatPropertiesQNX &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, format, externalFormat, screenUsage, formatFeatures, samplerYcbcrConversionComponents, suggestedYcbcrModel, suggestedYcbcrRange, suggestedXChromaOffset, suggestedYChromaOffset ); } # endif # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ScreenBufferFormatPropertiesQNX const & ) const = default; # else bool operator==( ScreenBufferFormatPropertiesQNX const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( format == rhs.format ) && ( externalFormat == rhs.externalFormat ) && ( screenUsage == rhs.screenUsage ) && ( formatFeatures == rhs.formatFeatures ) && ( samplerYcbcrConversionComponents == rhs.samplerYcbcrConversionComponents ) && ( suggestedYcbcrModel == rhs.suggestedYcbcrModel ) && ( suggestedYcbcrRange == rhs.suggestedYcbcrRange ) && ( suggestedXChromaOffset == rhs.suggestedXChromaOffset ) && ( suggestedYChromaOffset == rhs.suggestedYChromaOffset ); # endif } bool operator!=( ScreenBufferFormatPropertiesQNX const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } # endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eScreenBufferFormatPropertiesQNX; void * pNext = {}; VULKAN_HPP_NAMESPACE::Format format = VULKAN_HPP_NAMESPACE::Format::eUndefined; uint64_t externalFormat = {}; uint64_t screenUsage = {}; VULKAN_HPP_NAMESPACE::FormatFeatureFlags formatFeatures = {}; VULKAN_HPP_NAMESPACE::ComponentMapping samplerYcbcrConversionComponents = {}; VULKAN_HPP_NAMESPACE::SamplerYcbcrModelConversion suggestedYcbcrModel = VULKAN_HPP_NAMESPACE::SamplerYcbcrModelConversion::eRgbIdentity; VULKAN_HPP_NAMESPACE::SamplerYcbcrRange suggestedYcbcrRange = VULKAN_HPP_NAMESPACE::SamplerYcbcrRange::eItuFull; VULKAN_HPP_NAMESPACE::ChromaLocation suggestedXChromaOffset = VULKAN_HPP_NAMESPACE::ChromaLocation::eCositedEven; VULKAN_HPP_NAMESPACE::ChromaLocation suggestedYChromaOffset = VULKAN_HPP_NAMESPACE::ChromaLocation::eCositedEven; }; template <> struct CppType { using Type = ScreenBufferFormatPropertiesQNX; }; #endif /*VK_USE_PLATFORM_SCREEN_QNX*/ #if defined( VK_USE_PLATFORM_SCREEN_QNX ) struct ScreenBufferPropertiesQNX { using NativeType = VkScreenBufferPropertiesQNX; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eScreenBufferPropertiesQNX; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ScreenBufferPropertiesQNX( VULKAN_HPP_NAMESPACE::DeviceSize allocationSize_ = {}, uint32_t memoryTypeBits_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , allocationSize{ allocationSize_ } , memoryTypeBits{ memoryTypeBits_ } { } VULKAN_HPP_CONSTEXPR ScreenBufferPropertiesQNX( ScreenBufferPropertiesQNX const & rhs ) VULKAN_HPP_NOEXCEPT = default; ScreenBufferPropertiesQNX( VkScreenBufferPropertiesQNX const & rhs ) VULKAN_HPP_NOEXCEPT : ScreenBufferPropertiesQNX( *reinterpret_cast( &rhs ) ) { } ScreenBufferPropertiesQNX & operator=( ScreenBufferPropertiesQNX const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ScreenBufferPropertiesQNX & operator=( VkScreenBufferPropertiesQNX const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkScreenBufferPropertiesQNX const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkScreenBufferPropertiesQNX &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, allocationSize, memoryTypeBits ); } # endif # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ScreenBufferPropertiesQNX const & ) const = default; # else bool operator==( ScreenBufferPropertiesQNX const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( allocationSize == rhs.allocationSize ) && ( memoryTypeBits == rhs.memoryTypeBits ); # endif } bool operator!=( ScreenBufferPropertiesQNX const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } # endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eScreenBufferPropertiesQNX; void * pNext = {}; VULKAN_HPP_NAMESPACE::DeviceSize allocationSize = {}; uint32_t memoryTypeBits = {}; }; template <> struct CppType { using Type = ScreenBufferPropertiesQNX; }; #endif /*VK_USE_PLATFORM_SCREEN_QNX*/ #if defined( VK_USE_PLATFORM_SCREEN_QNX ) struct ScreenSurfaceCreateInfoQNX { using NativeType = VkScreenSurfaceCreateInfoQNX; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eScreenSurfaceCreateInfoQNX; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ScreenSurfaceCreateInfoQNX( VULKAN_HPP_NAMESPACE::ScreenSurfaceCreateFlagsQNX flags_ = {}, struct _screen_context * context_ = {}, struct _screen_window * window_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , context{ context_ } , window{ window_ } { } VULKAN_HPP_CONSTEXPR ScreenSurfaceCreateInfoQNX( ScreenSurfaceCreateInfoQNX const & rhs ) VULKAN_HPP_NOEXCEPT = default; ScreenSurfaceCreateInfoQNX( VkScreenSurfaceCreateInfoQNX const & rhs ) VULKAN_HPP_NOEXCEPT : ScreenSurfaceCreateInfoQNX( *reinterpret_cast( &rhs ) ) { } ScreenSurfaceCreateInfoQNX & operator=( ScreenSurfaceCreateInfoQNX const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ScreenSurfaceCreateInfoQNX & operator=( VkScreenSurfaceCreateInfoQNX const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } # if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ScreenSurfaceCreateInfoQNX & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ScreenSurfaceCreateInfoQNX & setFlags( VULKAN_HPP_NAMESPACE::ScreenSurfaceCreateFlagsQNX flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 ScreenSurfaceCreateInfoQNX & setContext( struct _screen_context * context_ ) VULKAN_HPP_NOEXCEPT { context = context_; return *this; } VULKAN_HPP_CONSTEXPR_14 ScreenSurfaceCreateInfoQNX & setWindow( struct _screen_window * window_ ) VULKAN_HPP_NOEXCEPT { window = window_; return *this; } # endif /*VULKAN_HPP_NO_SETTERS*/ operator VkScreenSurfaceCreateInfoQNX const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkScreenSurfaceCreateInfoQNX &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, context, window ); } # endif # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ScreenSurfaceCreateInfoQNX const & ) const = default; # else bool operator==( ScreenSurfaceCreateInfoQNX const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( context == rhs.context ) && ( window == rhs.window ); # endif } bool operator!=( ScreenSurfaceCreateInfoQNX const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } # endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eScreenSurfaceCreateInfoQNX; const void * pNext = {}; VULKAN_HPP_NAMESPACE::ScreenSurfaceCreateFlagsQNX flags = {}; struct _screen_context * context = {}; struct _screen_window * window = {}; }; template <> struct CppType { using Type = ScreenSurfaceCreateInfoQNX; }; #endif /*VK_USE_PLATFORM_SCREEN_QNX*/ struct SemaphoreCreateInfo { using NativeType = VkSemaphoreCreateInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSemaphoreCreateInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR SemaphoreCreateInfo( VULKAN_HPP_NAMESPACE::SemaphoreCreateFlags flags_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } { } VULKAN_HPP_CONSTEXPR SemaphoreCreateInfo( SemaphoreCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; SemaphoreCreateInfo( VkSemaphoreCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT : SemaphoreCreateInfo( *reinterpret_cast( &rhs ) ) { } SemaphoreCreateInfo & operator=( SemaphoreCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ SemaphoreCreateInfo & operator=( VkSemaphoreCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 SemaphoreCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 SemaphoreCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::SemaphoreCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkSemaphoreCreateInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkSemaphoreCreateInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( SemaphoreCreateInfo const & ) const = default; #else bool operator==( SemaphoreCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ); # endif } bool operator!=( SemaphoreCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSemaphoreCreateInfo; const void * pNext = {}; VULKAN_HPP_NAMESPACE::SemaphoreCreateFlags flags = {}; }; template <> struct CppType { using Type = SemaphoreCreateInfo; }; struct SemaphoreGetFdInfoKHR { using NativeType = VkSemaphoreGetFdInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSemaphoreGetFdInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR SemaphoreGetFdInfoKHR( VULKAN_HPP_NAMESPACE::Semaphore semaphore_ = {}, VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlagBits handleType_ = VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlagBits::eOpaqueFd, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , semaphore{ semaphore_ } , handleType{ handleType_ } { } VULKAN_HPP_CONSTEXPR SemaphoreGetFdInfoKHR( SemaphoreGetFdInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; SemaphoreGetFdInfoKHR( VkSemaphoreGetFdInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : SemaphoreGetFdInfoKHR( *reinterpret_cast( &rhs ) ) { } SemaphoreGetFdInfoKHR & operator=( SemaphoreGetFdInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ SemaphoreGetFdInfoKHR & operator=( VkSemaphoreGetFdInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 SemaphoreGetFdInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 SemaphoreGetFdInfoKHR & setSemaphore( VULKAN_HPP_NAMESPACE::Semaphore semaphore_ ) VULKAN_HPP_NOEXCEPT { semaphore = semaphore_; return *this; } VULKAN_HPP_CONSTEXPR_14 SemaphoreGetFdInfoKHR & setHandleType( VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlagBits handleType_ ) VULKAN_HPP_NOEXCEPT { handleType = handleType_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkSemaphoreGetFdInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkSemaphoreGetFdInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, semaphore, handleType ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( SemaphoreGetFdInfoKHR const & ) const = default; #else bool operator==( SemaphoreGetFdInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( semaphore == rhs.semaphore ) && ( handleType == rhs.handleType ); # endif } bool operator!=( SemaphoreGetFdInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSemaphoreGetFdInfoKHR; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Semaphore semaphore = {}; VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlagBits handleType = VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlagBits::eOpaqueFd; }; template <> struct CppType { using Type = SemaphoreGetFdInfoKHR; }; #if defined( VK_USE_PLATFORM_WIN32_KHR ) struct SemaphoreGetWin32HandleInfoKHR { using NativeType = VkSemaphoreGetWin32HandleInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSemaphoreGetWin32HandleInfoKHR; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR SemaphoreGetWin32HandleInfoKHR( VULKAN_HPP_NAMESPACE::Semaphore semaphore_ = {}, VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlagBits handleType_ = VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlagBits::eOpaqueFd, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , semaphore{ semaphore_ } , handleType{ handleType_ } { } VULKAN_HPP_CONSTEXPR SemaphoreGetWin32HandleInfoKHR( SemaphoreGetWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; SemaphoreGetWin32HandleInfoKHR( VkSemaphoreGetWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : SemaphoreGetWin32HandleInfoKHR( *reinterpret_cast( &rhs ) ) { } SemaphoreGetWin32HandleInfoKHR & operator=( SemaphoreGetWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ SemaphoreGetWin32HandleInfoKHR & operator=( VkSemaphoreGetWin32HandleInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } # if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 SemaphoreGetWin32HandleInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 SemaphoreGetWin32HandleInfoKHR & setSemaphore( VULKAN_HPP_NAMESPACE::Semaphore semaphore_ ) VULKAN_HPP_NOEXCEPT { semaphore = semaphore_; return *this; } VULKAN_HPP_CONSTEXPR_14 SemaphoreGetWin32HandleInfoKHR & setHandleType( VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlagBits handleType_ ) VULKAN_HPP_NOEXCEPT { handleType = handleType_; return *this; } # endif /*VULKAN_HPP_NO_SETTERS*/ operator VkSemaphoreGetWin32HandleInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkSemaphoreGetWin32HandleInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, semaphore, handleType ); } # endif # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( SemaphoreGetWin32HandleInfoKHR const & ) const = default; # else bool operator==( SemaphoreGetWin32HandleInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( semaphore == rhs.semaphore ) && ( handleType == rhs.handleType ); # endif } bool operator!=( SemaphoreGetWin32HandleInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } # endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSemaphoreGetWin32HandleInfoKHR; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Semaphore semaphore = {}; VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlagBits handleType = VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlagBits::eOpaqueFd; }; template <> struct CppType { using Type = SemaphoreGetWin32HandleInfoKHR; }; #endif /*VK_USE_PLATFORM_WIN32_KHR*/ #if defined( VK_USE_PLATFORM_FUCHSIA ) struct SemaphoreGetZirconHandleInfoFUCHSIA { using NativeType = VkSemaphoreGetZirconHandleInfoFUCHSIA; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSemaphoreGetZirconHandleInfoFUCHSIA; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR SemaphoreGetZirconHandleInfoFUCHSIA( VULKAN_HPP_NAMESPACE::Semaphore semaphore_ = {}, VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlagBits handleType_ = VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlagBits::eOpaqueFd, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , semaphore{ semaphore_ } , handleType{ handleType_ } { } VULKAN_HPP_CONSTEXPR SemaphoreGetZirconHandleInfoFUCHSIA( SemaphoreGetZirconHandleInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT = default; SemaphoreGetZirconHandleInfoFUCHSIA( VkSemaphoreGetZirconHandleInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT : SemaphoreGetZirconHandleInfoFUCHSIA( *reinterpret_cast( &rhs ) ) { } SemaphoreGetZirconHandleInfoFUCHSIA & operator=( SemaphoreGetZirconHandleInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ SemaphoreGetZirconHandleInfoFUCHSIA & operator=( VkSemaphoreGetZirconHandleInfoFUCHSIA const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } # if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 SemaphoreGetZirconHandleInfoFUCHSIA & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 SemaphoreGetZirconHandleInfoFUCHSIA & setSemaphore( VULKAN_HPP_NAMESPACE::Semaphore semaphore_ ) VULKAN_HPP_NOEXCEPT { semaphore = semaphore_; return *this; } VULKAN_HPP_CONSTEXPR_14 SemaphoreGetZirconHandleInfoFUCHSIA & setHandleType( VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlagBits handleType_ ) VULKAN_HPP_NOEXCEPT { handleType = handleType_; return *this; } # endif /*VULKAN_HPP_NO_SETTERS*/ operator VkSemaphoreGetZirconHandleInfoFUCHSIA const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkSemaphoreGetZirconHandleInfoFUCHSIA &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, semaphore, handleType ); } # endif # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( SemaphoreGetZirconHandleInfoFUCHSIA const & ) const = default; # else bool operator==( SemaphoreGetZirconHandleInfoFUCHSIA const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( semaphore == rhs.semaphore ) && ( handleType == rhs.handleType ); # endif } bool operator!=( SemaphoreGetZirconHandleInfoFUCHSIA const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } # endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSemaphoreGetZirconHandleInfoFUCHSIA; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Semaphore semaphore = {}; VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlagBits handleType = VULKAN_HPP_NAMESPACE::ExternalSemaphoreHandleTypeFlagBits::eOpaqueFd; }; template <> struct CppType { using Type = SemaphoreGetZirconHandleInfoFUCHSIA; }; #endif /*VK_USE_PLATFORM_FUCHSIA*/ struct SemaphoreSignalInfo { using NativeType = VkSemaphoreSignalInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSemaphoreSignalInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR SemaphoreSignalInfo( VULKAN_HPP_NAMESPACE::Semaphore semaphore_ = {}, uint64_t value_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , semaphore{ semaphore_ } , value{ value_ } { } VULKAN_HPP_CONSTEXPR SemaphoreSignalInfo( SemaphoreSignalInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; SemaphoreSignalInfo( VkSemaphoreSignalInfo const & rhs ) VULKAN_HPP_NOEXCEPT : SemaphoreSignalInfo( *reinterpret_cast( &rhs ) ) { } SemaphoreSignalInfo & operator=( SemaphoreSignalInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ SemaphoreSignalInfo & operator=( VkSemaphoreSignalInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 SemaphoreSignalInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 SemaphoreSignalInfo & setSemaphore( VULKAN_HPP_NAMESPACE::Semaphore semaphore_ ) VULKAN_HPP_NOEXCEPT { semaphore = semaphore_; return *this; } VULKAN_HPP_CONSTEXPR_14 SemaphoreSignalInfo & setValue( uint64_t value_ ) VULKAN_HPP_NOEXCEPT { value = value_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkSemaphoreSignalInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkSemaphoreSignalInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, semaphore, value ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( SemaphoreSignalInfo const & ) const = default; #else bool operator==( SemaphoreSignalInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( semaphore == rhs.semaphore ) && ( value == rhs.value ); # endif } bool operator!=( SemaphoreSignalInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSemaphoreSignalInfo; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Semaphore semaphore = {}; uint64_t value = {}; }; template <> struct CppType { using Type = SemaphoreSignalInfo; }; using SemaphoreSignalInfoKHR = SemaphoreSignalInfo; struct SemaphoreTypeCreateInfo { using NativeType = VkSemaphoreTypeCreateInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSemaphoreTypeCreateInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR SemaphoreTypeCreateInfo( VULKAN_HPP_NAMESPACE::SemaphoreType semaphoreType_ = VULKAN_HPP_NAMESPACE::SemaphoreType::eBinary, uint64_t initialValue_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , semaphoreType{ semaphoreType_ } , initialValue{ initialValue_ } { } VULKAN_HPP_CONSTEXPR SemaphoreTypeCreateInfo( SemaphoreTypeCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; SemaphoreTypeCreateInfo( VkSemaphoreTypeCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT : SemaphoreTypeCreateInfo( *reinterpret_cast( &rhs ) ) { } SemaphoreTypeCreateInfo & operator=( SemaphoreTypeCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ SemaphoreTypeCreateInfo & operator=( VkSemaphoreTypeCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 SemaphoreTypeCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 SemaphoreTypeCreateInfo & setSemaphoreType( VULKAN_HPP_NAMESPACE::SemaphoreType semaphoreType_ ) VULKAN_HPP_NOEXCEPT { semaphoreType = semaphoreType_; return *this; } VULKAN_HPP_CONSTEXPR_14 SemaphoreTypeCreateInfo & setInitialValue( uint64_t initialValue_ ) VULKAN_HPP_NOEXCEPT { initialValue = initialValue_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkSemaphoreTypeCreateInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkSemaphoreTypeCreateInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, semaphoreType, initialValue ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( SemaphoreTypeCreateInfo const & ) const = default; #else bool operator==( SemaphoreTypeCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( semaphoreType == rhs.semaphoreType ) && ( initialValue == rhs.initialValue ); # endif } bool operator!=( SemaphoreTypeCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSemaphoreTypeCreateInfo; const void * pNext = {}; VULKAN_HPP_NAMESPACE::SemaphoreType semaphoreType = VULKAN_HPP_NAMESPACE::SemaphoreType::eBinary; uint64_t initialValue = {}; }; template <> struct CppType { using Type = SemaphoreTypeCreateInfo; }; using SemaphoreTypeCreateInfoKHR = SemaphoreTypeCreateInfo; struct SemaphoreWaitInfo { using NativeType = VkSemaphoreWaitInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSemaphoreWaitInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR SemaphoreWaitInfo( VULKAN_HPP_NAMESPACE::SemaphoreWaitFlags flags_ = {}, uint32_t semaphoreCount_ = {}, const VULKAN_HPP_NAMESPACE::Semaphore * pSemaphores_ = {}, const uint64_t * pValues_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , semaphoreCount{ semaphoreCount_ } , pSemaphores{ pSemaphores_ } , pValues{ pValues_ } { } VULKAN_HPP_CONSTEXPR SemaphoreWaitInfo( SemaphoreWaitInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; SemaphoreWaitInfo( VkSemaphoreWaitInfo const & rhs ) VULKAN_HPP_NOEXCEPT : SemaphoreWaitInfo( *reinterpret_cast( &rhs ) ) {} # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) SemaphoreWaitInfo( VULKAN_HPP_NAMESPACE::SemaphoreWaitFlags flags_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & semaphores_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & values_ = {}, const void * pNext_ = nullptr ) : pNext( pNext_ ) , flags( flags_ ) , semaphoreCount( static_cast( semaphores_.size() ) ) , pSemaphores( semaphores_.data() ) , pValues( values_.data() ) { # ifdef VULKAN_HPP_NO_EXCEPTIONS VULKAN_HPP_ASSERT( semaphores_.size() == values_.size() ); # else if ( semaphores_.size() != values_.size() ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::SemaphoreWaitInfo::SemaphoreWaitInfo: semaphores_.size() != values_.size()" ); } # endif /*VULKAN_HPP_NO_EXCEPTIONS*/ } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ SemaphoreWaitInfo & operator=( SemaphoreWaitInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ SemaphoreWaitInfo & operator=( VkSemaphoreWaitInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 SemaphoreWaitInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 SemaphoreWaitInfo & setFlags( VULKAN_HPP_NAMESPACE::SemaphoreWaitFlags flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 SemaphoreWaitInfo & setSemaphoreCount( uint32_t semaphoreCount_ ) VULKAN_HPP_NOEXCEPT { semaphoreCount = semaphoreCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 SemaphoreWaitInfo & setPSemaphores( const VULKAN_HPP_NAMESPACE::Semaphore * pSemaphores_ ) VULKAN_HPP_NOEXCEPT { pSemaphores = pSemaphores_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) SemaphoreWaitInfo & setSemaphores( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & semaphores_ ) VULKAN_HPP_NOEXCEPT { semaphoreCount = static_cast( semaphores_.size() ); pSemaphores = semaphores_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 SemaphoreWaitInfo & setPValues( const uint64_t * pValues_ ) VULKAN_HPP_NOEXCEPT { pValues = pValues_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) SemaphoreWaitInfo & setValues( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & values_ ) VULKAN_HPP_NOEXCEPT { semaphoreCount = static_cast( values_.size() ); pValues = values_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkSemaphoreWaitInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkSemaphoreWaitInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, semaphoreCount, pSemaphores, pValues ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( SemaphoreWaitInfo const & ) const = default; #else bool operator==( SemaphoreWaitInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( semaphoreCount == rhs.semaphoreCount ) && ( pSemaphores == rhs.pSemaphores ) && ( pValues == rhs.pValues ); # endif } bool operator!=( SemaphoreWaitInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSemaphoreWaitInfo; const void * pNext = {}; VULKAN_HPP_NAMESPACE::SemaphoreWaitFlags flags = {}; uint32_t semaphoreCount = {}; const VULKAN_HPP_NAMESPACE::Semaphore * pSemaphores = {}; const uint64_t * pValues = {}; }; template <> struct CppType { using Type = SemaphoreWaitInfo; }; using SemaphoreWaitInfoKHR = SemaphoreWaitInfo; struct SetDescriptorBufferOffsetsInfoEXT { using NativeType = VkSetDescriptorBufferOffsetsInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSetDescriptorBufferOffsetsInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR SetDescriptorBufferOffsetsInfoEXT( VULKAN_HPP_NAMESPACE::ShaderStageFlags stageFlags_ = {}, VULKAN_HPP_NAMESPACE::PipelineLayout layout_ = {}, uint32_t firstSet_ = {}, uint32_t setCount_ = {}, const uint32_t * pBufferIndices_ = {}, const VULKAN_HPP_NAMESPACE::DeviceSize * pOffsets_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , stageFlags{ stageFlags_ } , layout{ layout_ } , firstSet{ firstSet_ } , setCount{ setCount_ } , pBufferIndices{ pBufferIndices_ } , pOffsets{ pOffsets_ } { } VULKAN_HPP_CONSTEXPR SetDescriptorBufferOffsetsInfoEXT( SetDescriptorBufferOffsetsInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; SetDescriptorBufferOffsetsInfoEXT( VkSetDescriptorBufferOffsetsInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : SetDescriptorBufferOffsetsInfoEXT( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) SetDescriptorBufferOffsetsInfoEXT( VULKAN_HPP_NAMESPACE::ShaderStageFlags stageFlags_, VULKAN_HPP_NAMESPACE::PipelineLayout layout_, uint32_t firstSet_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & bufferIndices_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & offsets_ = {}, const void * pNext_ = nullptr ) : pNext( pNext_ ) , stageFlags( stageFlags_ ) , layout( layout_ ) , firstSet( firstSet_ ) , setCount( static_cast( bufferIndices_.size() ) ) , pBufferIndices( bufferIndices_.data() ) , pOffsets( offsets_.data() ) { # ifdef VULKAN_HPP_NO_EXCEPTIONS VULKAN_HPP_ASSERT( bufferIndices_.size() == offsets_.size() ); # else if ( bufferIndices_.size() != offsets_.size() ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::SetDescriptorBufferOffsetsInfoEXT::SetDescriptorBufferOffsetsInfoEXT: bufferIndices_.size() != offsets_.size()" ); } # endif /*VULKAN_HPP_NO_EXCEPTIONS*/ } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ SetDescriptorBufferOffsetsInfoEXT & operator=( SetDescriptorBufferOffsetsInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ SetDescriptorBufferOffsetsInfoEXT & operator=( VkSetDescriptorBufferOffsetsInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 SetDescriptorBufferOffsetsInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 SetDescriptorBufferOffsetsInfoEXT & setStageFlags( VULKAN_HPP_NAMESPACE::ShaderStageFlags stageFlags_ ) VULKAN_HPP_NOEXCEPT { stageFlags = stageFlags_; return *this; } VULKAN_HPP_CONSTEXPR_14 SetDescriptorBufferOffsetsInfoEXT & setLayout( VULKAN_HPP_NAMESPACE::PipelineLayout layout_ ) VULKAN_HPP_NOEXCEPT { layout = layout_; return *this; } VULKAN_HPP_CONSTEXPR_14 SetDescriptorBufferOffsetsInfoEXT & setFirstSet( uint32_t firstSet_ ) VULKAN_HPP_NOEXCEPT { firstSet = firstSet_; return *this; } VULKAN_HPP_CONSTEXPR_14 SetDescriptorBufferOffsetsInfoEXT & setSetCount( uint32_t setCount_ ) VULKAN_HPP_NOEXCEPT { setCount = setCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 SetDescriptorBufferOffsetsInfoEXT & setPBufferIndices( const uint32_t * pBufferIndices_ ) VULKAN_HPP_NOEXCEPT { pBufferIndices = pBufferIndices_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) SetDescriptorBufferOffsetsInfoEXT & setBufferIndices( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & bufferIndices_ ) VULKAN_HPP_NOEXCEPT { setCount = static_cast( bufferIndices_.size() ); pBufferIndices = bufferIndices_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 SetDescriptorBufferOffsetsInfoEXT & setPOffsets( const VULKAN_HPP_NAMESPACE::DeviceSize * pOffsets_ ) VULKAN_HPP_NOEXCEPT { pOffsets = pOffsets_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) SetDescriptorBufferOffsetsInfoEXT & setOffsets( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & offsets_ ) VULKAN_HPP_NOEXCEPT { setCount = static_cast( offsets_.size() ); pOffsets = offsets_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkSetDescriptorBufferOffsetsInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkSetDescriptorBufferOffsetsInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, stageFlags, layout, firstSet, setCount, pBufferIndices, pOffsets ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( SetDescriptorBufferOffsetsInfoEXT const & ) const = default; #else bool operator==( SetDescriptorBufferOffsetsInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( stageFlags == rhs.stageFlags ) && ( layout == rhs.layout ) && ( firstSet == rhs.firstSet ) && ( setCount == rhs.setCount ) && ( pBufferIndices == rhs.pBufferIndices ) && ( pOffsets == rhs.pOffsets ); # endif } bool operator!=( SetDescriptorBufferOffsetsInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSetDescriptorBufferOffsetsInfoEXT; const void * pNext = {}; VULKAN_HPP_NAMESPACE::ShaderStageFlags stageFlags = {}; VULKAN_HPP_NAMESPACE::PipelineLayout layout = {}; uint32_t firstSet = {}; uint32_t setCount = {}; const uint32_t * pBufferIndices = {}; const VULKAN_HPP_NAMESPACE::DeviceSize * pOffsets = {}; }; template <> struct CppType { using Type = SetDescriptorBufferOffsetsInfoEXT; }; struct SetLatencyMarkerInfoNV { using NativeType = VkSetLatencyMarkerInfoNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSetLatencyMarkerInfoNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR SetLatencyMarkerInfoNV( uint64_t presentID_ = {}, VULKAN_HPP_NAMESPACE::LatencyMarkerNV marker_ = VULKAN_HPP_NAMESPACE::LatencyMarkerNV::eSimulationStart, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , presentID{ presentID_ } , marker{ marker_ } { } VULKAN_HPP_CONSTEXPR SetLatencyMarkerInfoNV( SetLatencyMarkerInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; SetLatencyMarkerInfoNV( VkSetLatencyMarkerInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT : SetLatencyMarkerInfoNV( *reinterpret_cast( &rhs ) ) { } SetLatencyMarkerInfoNV & operator=( SetLatencyMarkerInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ SetLatencyMarkerInfoNV & operator=( VkSetLatencyMarkerInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 SetLatencyMarkerInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 SetLatencyMarkerInfoNV & setPresentID( uint64_t presentID_ ) VULKAN_HPP_NOEXCEPT { presentID = presentID_; return *this; } VULKAN_HPP_CONSTEXPR_14 SetLatencyMarkerInfoNV & setMarker( VULKAN_HPP_NAMESPACE::LatencyMarkerNV marker_ ) VULKAN_HPP_NOEXCEPT { marker = marker_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkSetLatencyMarkerInfoNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkSetLatencyMarkerInfoNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, presentID, marker ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( SetLatencyMarkerInfoNV const & ) const = default; #else bool operator==( SetLatencyMarkerInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( presentID == rhs.presentID ) && ( marker == rhs.marker ); # endif } bool operator!=( SetLatencyMarkerInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSetLatencyMarkerInfoNV; const void * pNext = {}; uint64_t presentID = {}; VULKAN_HPP_NAMESPACE::LatencyMarkerNV marker = VULKAN_HPP_NAMESPACE::LatencyMarkerNV::eSimulationStart; }; template <> struct CppType { using Type = SetLatencyMarkerInfoNV; }; struct SetStateFlagsIndirectCommandNV { using NativeType = VkSetStateFlagsIndirectCommandNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR SetStateFlagsIndirectCommandNV( uint32_t data_ = {} ) VULKAN_HPP_NOEXCEPT : data{ data_ } {} VULKAN_HPP_CONSTEXPR SetStateFlagsIndirectCommandNV( SetStateFlagsIndirectCommandNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; SetStateFlagsIndirectCommandNV( VkSetStateFlagsIndirectCommandNV const & rhs ) VULKAN_HPP_NOEXCEPT : SetStateFlagsIndirectCommandNV( *reinterpret_cast( &rhs ) ) { } SetStateFlagsIndirectCommandNV & operator=( SetStateFlagsIndirectCommandNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ SetStateFlagsIndirectCommandNV & operator=( VkSetStateFlagsIndirectCommandNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 SetStateFlagsIndirectCommandNV & setData( uint32_t data_ ) VULKAN_HPP_NOEXCEPT { data = data_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkSetStateFlagsIndirectCommandNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkSetStateFlagsIndirectCommandNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( data ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( SetStateFlagsIndirectCommandNV const & ) const = default; #else bool operator==( SetStateFlagsIndirectCommandNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( data == rhs.data ); # endif } bool operator!=( SetStateFlagsIndirectCommandNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: uint32_t data = {}; }; struct ShaderCreateInfoEXT { using NativeType = VkShaderCreateInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eShaderCreateInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ShaderCreateInfoEXT( VULKAN_HPP_NAMESPACE::ShaderCreateFlagsEXT flags_ = {}, VULKAN_HPP_NAMESPACE::ShaderStageFlagBits stage_ = VULKAN_HPP_NAMESPACE::ShaderStageFlagBits::eVertex, VULKAN_HPP_NAMESPACE::ShaderStageFlags nextStage_ = {}, VULKAN_HPP_NAMESPACE::ShaderCodeTypeEXT codeType_ = VULKAN_HPP_NAMESPACE::ShaderCodeTypeEXT::eBinary, size_t codeSize_ = {}, const void * pCode_ = {}, const char * pName_ = {}, uint32_t setLayoutCount_ = {}, const VULKAN_HPP_NAMESPACE::DescriptorSetLayout * pSetLayouts_ = {}, uint32_t pushConstantRangeCount_ = {}, const VULKAN_HPP_NAMESPACE::PushConstantRange * pPushConstantRanges_ = {}, const VULKAN_HPP_NAMESPACE::SpecializationInfo * pSpecializationInfo_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , stage{ stage_ } , nextStage{ nextStage_ } , codeType{ codeType_ } , codeSize{ codeSize_ } , pCode{ pCode_ } , pName{ pName_ } , setLayoutCount{ setLayoutCount_ } , pSetLayouts{ pSetLayouts_ } , pushConstantRangeCount{ pushConstantRangeCount_ } , pPushConstantRanges{ pPushConstantRanges_ } , pSpecializationInfo{ pSpecializationInfo_ } { } VULKAN_HPP_CONSTEXPR ShaderCreateInfoEXT( ShaderCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; ShaderCreateInfoEXT( VkShaderCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : ShaderCreateInfoEXT( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) template ShaderCreateInfoEXT( VULKAN_HPP_NAMESPACE::ShaderCreateFlagsEXT flags_, VULKAN_HPP_NAMESPACE::ShaderStageFlagBits stage_, VULKAN_HPP_NAMESPACE::ShaderStageFlags nextStage_, VULKAN_HPP_NAMESPACE::ShaderCodeTypeEXT codeType_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & code_, const char * pName_ = {}, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & setLayouts_ = {}, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & pushConstantRanges_ = {}, const VULKAN_HPP_NAMESPACE::SpecializationInfo * pSpecializationInfo_ = {}, const void * pNext_ = nullptr ) : pNext( pNext_ ) , flags( flags_ ) , stage( stage_ ) , nextStage( nextStage_ ) , codeType( codeType_ ) , codeSize( code_.size() * sizeof( T ) ) , pCode( code_.data() ) , pName( pName_ ) , setLayoutCount( static_cast( setLayouts_.size() ) ) , pSetLayouts( setLayouts_.data() ) , pushConstantRangeCount( static_cast( pushConstantRanges_.size() ) ) , pPushConstantRanges( pushConstantRanges_.data() ) , pSpecializationInfo( pSpecializationInfo_ ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ ShaderCreateInfoEXT & operator=( ShaderCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ShaderCreateInfoEXT & operator=( VkShaderCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ShaderCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ShaderCreateInfoEXT & setFlags( VULKAN_HPP_NAMESPACE::ShaderCreateFlagsEXT flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 ShaderCreateInfoEXT & setStage( VULKAN_HPP_NAMESPACE::ShaderStageFlagBits stage_ ) VULKAN_HPP_NOEXCEPT { stage = stage_; return *this; } VULKAN_HPP_CONSTEXPR_14 ShaderCreateInfoEXT & setNextStage( VULKAN_HPP_NAMESPACE::ShaderStageFlags nextStage_ ) VULKAN_HPP_NOEXCEPT { nextStage = nextStage_; return *this; } VULKAN_HPP_CONSTEXPR_14 ShaderCreateInfoEXT & setCodeType( VULKAN_HPP_NAMESPACE::ShaderCodeTypeEXT codeType_ ) VULKAN_HPP_NOEXCEPT { codeType = codeType_; return *this; } VULKAN_HPP_CONSTEXPR_14 ShaderCreateInfoEXT & setCodeSize( size_t codeSize_ ) VULKAN_HPP_NOEXCEPT { codeSize = codeSize_; return *this; } VULKAN_HPP_CONSTEXPR_14 ShaderCreateInfoEXT & setPCode( const void * pCode_ ) VULKAN_HPP_NOEXCEPT { pCode = pCode_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) template ShaderCreateInfoEXT & setCode( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & code_ ) VULKAN_HPP_NOEXCEPT { codeSize = code_.size() * sizeof( T ); pCode = code_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 ShaderCreateInfoEXT & setPName( const char * pName_ ) VULKAN_HPP_NOEXCEPT { pName = pName_; return *this; } VULKAN_HPP_CONSTEXPR_14 ShaderCreateInfoEXT & setSetLayoutCount( uint32_t setLayoutCount_ ) VULKAN_HPP_NOEXCEPT { setLayoutCount = setLayoutCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 ShaderCreateInfoEXT & setPSetLayouts( const VULKAN_HPP_NAMESPACE::DescriptorSetLayout * pSetLayouts_ ) VULKAN_HPP_NOEXCEPT { pSetLayouts = pSetLayouts_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) ShaderCreateInfoEXT & setSetLayouts( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & setLayouts_ ) VULKAN_HPP_NOEXCEPT { setLayoutCount = static_cast( setLayouts_.size() ); pSetLayouts = setLayouts_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 ShaderCreateInfoEXT & setPushConstantRangeCount( uint32_t pushConstantRangeCount_ ) VULKAN_HPP_NOEXCEPT { pushConstantRangeCount = pushConstantRangeCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 ShaderCreateInfoEXT & setPPushConstantRanges( const VULKAN_HPP_NAMESPACE::PushConstantRange * pPushConstantRanges_ ) VULKAN_HPP_NOEXCEPT { pPushConstantRanges = pPushConstantRanges_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) ShaderCreateInfoEXT & setPushConstantRanges( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & pushConstantRanges_ ) VULKAN_HPP_NOEXCEPT { pushConstantRangeCount = static_cast( pushConstantRanges_.size() ); pPushConstantRanges = pushConstantRanges_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 ShaderCreateInfoEXT & setPSpecializationInfo( const VULKAN_HPP_NAMESPACE::SpecializationInfo * pSpecializationInfo_ ) VULKAN_HPP_NOEXCEPT { pSpecializationInfo = pSpecializationInfo_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkShaderCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkShaderCreateInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, stage, nextStage, codeType, codeSize, pCode, pName, setLayoutCount, pSetLayouts, pushConstantRangeCount, pPushConstantRanges, pSpecializationInfo ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) std::strong_ordering operator<=>( ShaderCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { if ( auto cmp = sType <=> rhs.sType; cmp != 0 ) return cmp; if ( auto cmp = pNext <=> rhs.pNext; cmp != 0 ) return cmp; if ( auto cmp = flags <=> rhs.flags; cmp != 0 ) return cmp; if ( auto cmp = stage <=> rhs.stage; cmp != 0 ) return cmp; if ( auto cmp = nextStage <=> rhs.nextStage; cmp != 0 ) return cmp; if ( auto cmp = codeType <=> rhs.codeType; cmp != 0 ) return cmp; if ( auto cmp = codeSize <=> rhs.codeSize; cmp != 0 ) return cmp; if ( auto cmp = pCode <=> rhs.pCode; cmp != 0 ) return cmp; if ( pName != rhs.pName ) if ( auto cmp = strcmp( pName, rhs.pName ); cmp != 0 ) return ( cmp < 0 ) ? std::strong_ordering::less : std::strong_ordering::greater; if ( auto cmp = setLayoutCount <=> rhs.setLayoutCount; cmp != 0 ) return cmp; if ( auto cmp = pSetLayouts <=> rhs.pSetLayouts; cmp != 0 ) return cmp; if ( auto cmp = pushConstantRangeCount <=> rhs.pushConstantRangeCount; cmp != 0 ) return cmp; if ( auto cmp = pPushConstantRanges <=> rhs.pPushConstantRanges; cmp != 0 ) return cmp; if ( auto cmp = pSpecializationInfo <=> rhs.pSpecializationInfo; cmp != 0 ) return cmp; return std::strong_ordering::equivalent; } #endif bool operator==( ShaderCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( stage == rhs.stage ) && ( nextStage == rhs.nextStage ) && ( codeType == rhs.codeType ) && ( codeSize == rhs.codeSize ) && ( pCode == rhs.pCode ) && ( ( pName == rhs.pName ) || ( strcmp( pName, rhs.pName ) == 0 ) ) && ( setLayoutCount == rhs.setLayoutCount ) && ( pSetLayouts == rhs.pSetLayouts ) && ( pushConstantRangeCount == rhs.pushConstantRangeCount ) && ( pPushConstantRanges == rhs.pPushConstantRanges ) && ( pSpecializationInfo == rhs.pSpecializationInfo ); } bool operator!=( ShaderCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eShaderCreateInfoEXT; const void * pNext = {}; VULKAN_HPP_NAMESPACE::ShaderCreateFlagsEXT flags = {}; VULKAN_HPP_NAMESPACE::ShaderStageFlagBits stage = VULKAN_HPP_NAMESPACE::ShaderStageFlagBits::eVertex; VULKAN_HPP_NAMESPACE::ShaderStageFlags nextStage = {}; VULKAN_HPP_NAMESPACE::ShaderCodeTypeEXT codeType = VULKAN_HPP_NAMESPACE::ShaderCodeTypeEXT::eBinary; size_t codeSize = {}; const void * pCode = {}; const char * pName = {}; uint32_t setLayoutCount = {}; const VULKAN_HPP_NAMESPACE::DescriptorSetLayout * pSetLayouts = {}; uint32_t pushConstantRangeCount = {}; const VULKAN_HPP_NAMESPACE::PushConstantRange * pPushConstantRanges = {}; const VULKAN_HPP_NAMESPACE::SpecializationInfo * pSpecializationInfo = {}; }; template <> struct CppType { using Type = ShaderCreateInfoEXT; }; struct ShaderModuleCreateInfo { using NativeType = VkShaderModuleCreateInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eShaderModuleCreateInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ShaderModuleCreateInfo( VULKAN_HPP_NAMESPACE::ShaderModuleCreateFlags flags_ = {}, size_t codeSize_ = {}, const uint32_t * pCode_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , codeSize{ codeSize_ } , pCode{ pCode_ } { } VULKAN_HPP_CONSTEXPR ShaderModuleCreateInfo( ShaderModuleCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; ShaderModuleCreateInfo( VkShaderModuleCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT : ShaderModuleCreateInfo( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) ShaderModuleCreateInfo( VULKAN_HPP_NAMESPACE::ShaderModuleCreateFlags flags_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & code_, const void * pNext_ = nullptr ) : pNext( pNext_ ), flags( flags_ ), codeSize( code_.size() * 4 ), pCode( code_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ ShaderModuleCreateInfo & operator=( ShaderModuleCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ShaderModuleCreateInfo & operator=( VkShaderModuleCreateInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ShaderModuleCreateInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ShaderModuleCreateInfo & setFlags( VULKAN_HPP_NAMESPACE::ShaderModuleCreateFlags flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 ShaderModuleCreateInfo & setCodeSize( size_t codeSize_ ) VULKAN_HPP_NOEXCEPT { codeSize = codeSize_; return *this; } VULKAN_HPP_CONSTEXPR_14 ShaderModuleCreateInfo & setPCode( const uint32_t * pCode_ ) VULKAN_HPP_NOEXCEPT { pCode = pCode_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) ShaderModuleCreateInfo & setCode( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & code_ ) VULKAN_HPP_NOEXCEPT { codeSize = code_.size() * 4; pCode = code_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkShaderModuleCreateInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkShaderModuleCreateInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, codeSize, pCode ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ShaderModuleCreateInfo const & ) const = default; #else bool operator==( ShaderModuleCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( codeSize == rhs.codeSize ) && ( pCode == rhs.pCode ); # endif } bool operator!=( ShaderModuleCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eShaderModuleCreateInfo; const void * pNext = {}; VULKAN_HPP_NAMESPACE::ShaderModuleCreateFlags flags = {}; size_t codeSize = {}; const uint32_t * pCode = {}; }; template <> struct CppType { using Type = ShaderModuleCreateInfo; }; struct ShaderModuleIdentifierEXT { using NativeType = VkShaderModuleIdentifierEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eShaderModuleIdentifierEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 ShaderModuleIdentifierEXT( uint32_t identifierSize_ = {}, std::array const & identifier_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , identifierSize{ identifierSize_ } , identifier{ identifier_ } { } VULKAN_HPP_CONSTEXPR_14 ShaderModuleIdentifierEXT( ShaderModuleIdentifierEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; ShaderModuleIdentifierEXT( VkShaderModuleIdentifierEXT const & rhs ) VULKAN_HPP_NOEXCEPT : ShaderModuleIdentifierEXT( *reinterpret_cast( &rhs ) ) { } ShaderModuleIdentifierEXT & operator=( ShaderModuleIdentifierEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ShaderModuleIdentifierEXT & operator=( VkShaderModuleIdentifierEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkShaderModuleIdentifierEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkShaderModuleIdentifierEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple const &> # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, identifierSize, identifier ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) std::strong_ordering operator<=>( ShaderModuleIdentifierEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { if ( auto cmp = sType <=> rhs.sType; cmp != 0 ) return cmp; if ( auto cmp = pNext <=> rhs.pNext; cmp != 0 ) return cmp; if ( auto cmp = identifierSize <=> rhs.identifierSize; cmp != 0 ) return cmp; for ( size_t i = 0; i < identifierSize; ++i ) { if ( auto cmp = identifier[i] <=> rhs.identifier[i]; cmp != 0 ) return cmp; } return std::strong_ordering::equivalent; } #endif bool operator==( ShaderModuleIdentifierEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( identifierSize == rhs.identifierSize ) && ( memcmp( identifier, rhs.identifier, identifierSize * sizeof( uint8_t ) ) == 0 ); } bool operator!=( ShaderModuleIdentifierEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eShaderModuleIdentifierEXT; void * pNext = {}; uint32_t identifierSize = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D identifier = {}; }; template <> struct CppType { using Type = ShaderModuleIdentifierEXT; }; struct ShaderModuleValidationCacheCreateInfoEXT { using NativeType = VkShaderModuleValidationCacheCreateInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eShaderModuleValidationCacheCreateInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ShaderModuleValidationCacheCreateInfoEXT( VULKAN_HPP_NAMESPACE::ValidationCacheEXT validationCache_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , validationCache{ validationCache_ } { } VULKAN_HPP_CONSTEXPR ShaderModuleValidationCacheCreateInfoEXT( ShaderModuleValidationCacheCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; ShaderModuleValidationCacheCreateInfoEXT( VkShaderModuleValidationCacheCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : ShaderModuleValidationCacheCreateInfoEXT( *reinterpret_cast( &rhs ) ) { } ShaderModuleValidationCacheCreateInfoEXT & operator=( ShaderModuleValidationCacheCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ShaderModuleValidationCacheCreateInfoEXT & operator=( VkShaderModuleValidationCacheCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ShaderModuleValidationCacheCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ShaderModuleValidationCacheCreateInfoEXT & setValidationCache( VULKAN_HPP_NAMESPACE::ValidationCacheEXT validationCache_ ) VULKAN_HPP_NOEXCEPT { validationCache = validationCache_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkShaderModuleValidationCacheCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkShaderModuleValidationCacheCreateInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, validationCache ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ShaderModuleValidationCacheCreateInfoEXT const & ) const = default; #else bool operator==( ShaderModuleValidationCacheCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( validationCache == rhs.validationCache ); # endif } bool operator!=( ShaderModuleValidationCacheCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eShaderModuleValidationCacheCreateInfoEXT; const void * pNext = {}; VULKAN_HPP_NAMESPACE::ValidationCacheEXT validationCache = {}; }; template <> struct CppType { using Type = ShaderModuleValidationCacheCreateInfoEXT; }; struct ShaderResourceUsageAMD { using NativeType = VkShaderResourceUsageAMD; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ShaderResourceUsageAMD( uint32_t numUsedVgprs_ = {}, uint32_t numUsedSgprs_ = {}, uint32_t ldsSizePerLocalWorkGroup_ = {}, size_t ldsUsageSizeInBytes_ = {}, size_t scratchMemUsageInBytes_ = {} ) VULKAN_HPP_NOEXCEPT : numUsedVgprs{ numUsedVgprs_ } , numUsedSgprs{ numUsedSgprs_ } , ldsSizePerLocalWorkGroup{ ldsSizePerLocalWorkGroup_ } , ldsUsageSizeInBytes{ ldsUsageSizeInBytes_ } , scratchMemUsageInBytes{ scratchMemUsageInBytes_ } { } VULKAN_HPP_CONSTEXPR ShaderResourceUsageAMD( ShaderResourceUsageAMD const & rhs ) VULKAN_HPP_NOEXCEPT = default; ShaderResourceUsageAMD( VkShaderResourceUsageAMD const & rhs ) VULKAN_HPP_NOEXCEPT : ShaderResourceUsageAMD( *reinterpret_cast( &rhs ) ) { } ShaderResourceUsageAMD & operator=( ShaderResourceUsageAMD const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ShaderResourceUsageAMD & operator=( VkShaderResourceUsageAMD const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkShaderResourceUsageAMD const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkShaderResourceUsageAMD &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( numUsedVgprs, numUsedSgprs, ldsSizePerLocalWorkGroup, ldsUsageSizeInBytes, scratchMemUsageInBytes ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ShaderResourceUsageAMD const & ) const = default; #else bool operator==( ShaderResourceUsageAMD const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( numUsedVgprs == rhs.numUsedVgprs ) && ( numUsedSgprs == rhs.numUsedSgprs ) && ( ldsSizePerLocalWorkGroup == rhs.ldsSizePerLocalWorkGroup ) && ( ldsUsageSizeInBytes == rhs.ldsUsageSizeInBytes ) && ( scratchMemUsageInBytes == rhs.scratchMemUsageInBytes ); # endif } bool operator!=( ShaderResourceUsageAMD const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: uint32_t numUsedVgprs = {}; uint32_t numUsedSgprs = {}; uint32_t ldsSizePerLocalWorkGroup = {}; size_t ldsUsageSizeInBytes = {}; size_t scratchMemUsageInBytes = {}; }; struct ShaderStatisticsInfoAMD { using NativeType = VkShaderStatisticsInfoAMD; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 ShaderStatisticsInfoAMD( VULKAN_HPP_NAMESPACE::ShaderStageFlags shaderStageMask_ = {}, VULKAN_HPP_NAMESPACE::ShaderResourceUsageAMD resourceUsage_ = {}, uint32_t numPhysicalVgprs_ = {}, uint32_t numPhysicalSgprs_ = {}, uint32_t numAvailableVgprs_ = {}, uint32_t numAvailableSgprs_ = {}, std::array const & computeWorkGroupSize_ = {} ) VULKAN_HPP_NOEXCEPT : shaderStageMask{ shaderStageMask_ } , resourceUsage{ resourceUsage_ } , numPhysicalVgprs{ numPhysicalVgprs_ } , numPhysicalSgprs{ numPhysicalSgprs_ } , numAvailableVgprs{ numAvailableVgprs_ } , numAvailableSgprs{ numAvailableSgprs_ } , computeWorkGroupSize{ computeWorkGroupSize_ } { } VULKAN_HPP_CONSTEXPR_14 ShaderStatisticsInfoAMD( ShaderStatisticsInfoAMD const & rhs ) VULKAN_HPP_NOEXCEPT = default; ShaderStatisticsInfoAMD( VkShaderStatisticsInfoAMD const & rhs ) VULKAN_HPP_NOEXCEPT : ShaderStatisticsInfoAMD( *reinterpret_cast( &rhs ) ) { } ShaderStatisticsInfoAMD & operator=( ShaderStatisticsInfoAMD const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ShaderStatisticsInfoAMD & operator=( VkShaderStatisticsInfoAMD const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkShaderStatisticsInfoAMD const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkShaderStatisticsInfoAMD &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple const &> # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( shaderStageMask, resourceUsage, numPhysicalVgprs, numPhysicalSgprs, numAvailableVgprs, numAvailableSgprs, computeWorkGroupSize ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ShaderStatisticsInfoAMD const & ) const = default; #else bool operator==( ShaderStatisticsInfoAMD const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( shaderStageMask == rhs.shaderStageMask ) && ( resourceUsage == rhs.resourceUsage ) && ( numPhysicalVgprs == rhs.numPhysicalVgprs ) && ( numPhysicalSgprs == rhs.numPhysicalSgprs ) && ( numAvailableVgprs == rhs.numAvailableVgprs ) && ( numAvailableSgprs == rhs.numAvailableSgprs ) && ( computeWorkGroupSize == rhs.computeWorkGroupSize ); # endif } bool operator!=( ShaderStatisticsInfoAMD const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::ShaderStageFlags shaderStageMask = {}; VULKAN_HPP_NAMESPACE::ShaderResourceUsageAMD resourceUsage = {}; uint32_t numPhysicalVgprs = {}; uint32_t numPhysicalSgprs = {}; uint32_t numAvailableVgprs = {}; uint32_t numAvailableSgprs = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D computeWorkGroupSize = {}; }; struct SharedPresentSurfaceCapabilitiesKHR { using NativeType = VkSharedPresentSurfaceCapabilitiesKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSharedPresentSurfaceCapabilitiesKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR SharedPresentSurfaceCapabilitiesKHR( VULKAN_HPP_NAMESPACE::ImageUsageFlags sharedPresentSupportedUsageFlags_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , sharedPresentSupportedUsageFlags{ sharedPresentSupportedUsageFlags_ } { } VULKAN_HPP_CONSTEXPR SharedPresentSurfaceCapabilitiesKHR( SharedPresentSurfaceCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; SharedPresentSurfaceCapabilitiesKHR( VkSharedPresentSurfaceCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT : SharedPresentSurfaceCapabilitiesKHR( *reinterpret_cast( &rhs ) ) { } SharedPresentSurfaceCapabilitiesKHR & operator=( SharedPresentSurfaceCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ SharedPresentSurfaceCapabilitiesKHR & operator=( VkSharedPresentSurfaceCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkSharedPresentSurfaceCapabilitiesKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkSharedPresentSurfaceCapabilitiesKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, sharedPresentSupportedUsageFlags ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( SharedPresentSurfaceCapabilitiesKHR const & ) const = default; #else bool operator==( SharedPresentSurfaceCapabilitiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( sharedPresentSupportedUsageFlags == rhs.sharedPresentSupportedUsageFlags ); # endif } bool operator!=( SharedPresentSurfaceCapabilitiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSharedPresentSurfaceCapabilitiesKHR; void * pNext = {}; VULKAN_HPP_NAMESPACE::ImageUsageFlags sharedPresentSupportedUsageFlags = {}; }; template <> struct CppType { using Type = SharedPresentSurfaceCapabilitiesKHR; }; struct SparseImageFormatProperties { using NativeType = VkSparseImageFormatProperties; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR SparseImageFormatProperties( VULKAN_HPP_NAMESPACE::ImageAspectFlags aspectMask_ = {}, VULKAN_HPP_NAMESPACE::Extent3D imageGranularity_ = {}, VULKAN_HPP_NAMESPACE::SparseImageFormatFlags flags_ = {} ) VULKAN_HPP_NOEXCEPT : aspectMask{ aspectMask_ } , imageGranularity{ imageGranularity_ } , flags{ flags_ } { } VULKAN_HPP_CONSTEXPR SparseImageFormatProperties( SparseImageFormatProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; SparseImageFormatProperties( VkSparseImageFormatProperties const & rhs ) VULKAN_HPP_NOEXCEPT : SparseImageFormatProperties( *reinterpret_cast( &rhs ) ) { } SparseImageFormatProperties & operator=( SparseImageFormatProperties const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ SparseImageFormatProperties & operator=( VkSparseImageFormatProperties const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkSparseImageFormatProperties const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkSparseImageFormatProperties &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( aspectMask, imageGranularity, flags ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( SparseImageFormatProperties const & ) const = default; #else bool operator==( SparseImageFormatProperties const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( aspectMask == rhs.aspectMask ) && ( imageGranularity == rhs.imageGranularity ) && ( flags == rhs.flags ); # endif } bool operator!=( SparseImageFormatProperties const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::ImageAspectFlags aspectMask = {}; VULKAN_HPP_NAMESPACE::Extent3D imageGranularity = {}; VULKAN_HPP_NAMESPACE::SparseImageFormatFlags flags = {}; }; struct SparseImageFormatProperties2 { using NativeType = VkSparseImageFormatProperties2; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSparseImageFormatProperties2; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR SparseImageFormatProperties2( VULKAN_HPP_NAMESPACE::SparseImageFormatProperties properties_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , properties{ properties_ } { } VULKAN_HPP_CONSTEXPR SparseImageFormatProperties2( SparseImageFormatProperties2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; SparseImageFormatProperties2( VkSparseImageFormatProperties2 const & rhs ) VULKAN_HPP_NOEXCEPT : SparseImageFormatProperties2( *reinterpret_cast( &rhs ) ) { } SparseImageFormatProperties2 & operator=( SparseImageFormatProperties2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ SparseImageFormatProperties2 & operator=( VkSparseImageFormatProperties2 const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkSparseImageFormatProperties2 const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkSparseImageFormatProperties2 &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, properties ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( SparseImageFormatProperties2 const & ) const = default; #else bool operator==( SparseImageFormatProperties2 const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( properties == rhs.properties ); # endif } bool operator!=( SparseImageFormatProperties2 const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSparseImageFormatProperties2; void * pNext = {}; VULKAN_HPP_NAMESPACE::SparseImageFormatProperties properties = {}; }; template <> struct CppType { using Type = SparseImageFormatProperties2; }; using SparseImageFormatProperties2KHR = SparseImageFormatProperties2; struct SparseImageMemoryRequirements { using NativeType = VkSparseImageMemoryRequirements; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR SparseImageMemoryRequirements( VULKAN_HPP_NAMESPACE::SparseImageFormatProperties formatProperties_ = {}, uint32_t imageMipTailFirstLod_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize imageMipTailSize_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize imageMipTailOffset_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize imageMipTailStride_ = {} ) VULKAN_HPP_NOEXCEPT : formatProperties{ formatProperties_ } , imageMipTailFirstLod{ imageMipTailFirstLod_ } , imageMipTailSize{ imageMipTailSize_ } , imageMipTailOffset{ imageMipTailOffset_ } , imageMipTailStride{ imageMipTailStride_ } { } VULKAN_HPP_CONSTEXPR SparseImageMemoryRequirements( SparseImageMemoryRequirements const & rhs ) VULKAN_HPP_NOEXCEPT = default; SparseImageMemoryRequirements( VkSparseImageMemoryRequirements const & rhs ) VULKAN_HPP_NOEXCEPT : SparseImageMemoryRequirements( *reinterpret_cast( &rhs ) ) { } SparseImageMemoryRequirements & operator=( SparseImageMemoryRequirements const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ SparseImageMemoryRequirements & operator=( VkSparseImageMemoryRequirements const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkSparseImageMemoryRequirements const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkSparseImageMemoryRequirements &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( formatProperties, imageMipTailFirstLod, imageMipTailSize, imageMipTailOffset, imageMipTailStride ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( SparseImageMemoryRequirements const & ) const = default; #else bool operator==( SparseImageMemoryRequirements const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( formatProperties == rhs.formatProperties ) && ( imageMipTailFirstLod == rhs.imageMipTailFirstLod ) && ( imageMipTailSize == rhs.imageMipTailSize ) && ( imageMipTailOffset == rhs.imageMipTailOffset ) && ( imageMipTailStride == rhs.imageMipTailStride ); # endif } bool operator!=( SparseImageMemoryRequirements const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::SparseImageFormatProperties formatProperties = {}; uint32_t imageMipTailFirstLod = {}; VULKAN_HPP_NAMESPACE::DeviceSize imageMipTailSize = {}; VULKAN_HPP_NAMESPACE::DeviceSize imageMipTailOffset = {}; VULKAN_HPP_NAMESPACE::DeviceSize imageMipTailStride = {}; }; struct SparseImageMemoryRequirements2 { using NativeType = VkSparseImageMemoryRequirements2; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSparseImageMemoryRequirements2; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR SparseImageMemoryRequirements2( VULKAN_HPP_NAMESPACE::SparseImageMemoryRequirements memoryRequirements_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , memoryRequirements{ memoryRequirements_ } { } VULKAN_HPP_CONSTEXPR SparseImageMemoryRequirements2( SparseImageMemoryRequirements2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; SparseImageMemoryRequirements2( VkSparseImageMemoryRequirements2 const & rhs ) VULKAN_HPP_NOEXCEPT : SparseImageMemoryRequirements2( *reinterpret_cast( &rhs ) ) { } SparseImageMemoryRequirements2 & operator=( SparseImageMemoryRequirements2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ SparseImageMemoryRequirements2 & operator=( VkSparseImageMemoryRequirements2 const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkSparseImageMemoryRequirements2 const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkSparseImageMemoryRequirements2 &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, memoryRequirements ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( SparseImageMemoryRequirements2 const & ) const = default; #else bool operator==( SparseImageMemoryRequirements2 const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( memoryRequirements == rhs.memoryRequirements ); # endif } bool operator!=( SparseImageMemoryRequirements2 const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSparseImageMemoryRequirements2; void * pNext = {}; VULKAN_HPP_NAMESPACE::SparseImageMemoryRequirements memoryRequirements = {}; }; template <> struct CppType { using Type = SparseImageMemoryRequirements2; }; using SparseImageMemoryRequirements2KHR = SparseImageMemoryRequirements2; #if defined( VK_USE_PLATFORM_GGP ) struct StreamDescriptorSurfaceCreateInfoGGP { using NativeType = VkStreamDescriptorSurfaceCreateInfoGGP; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eStreamDescriptorSurfaceCreateInfoGGP; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR StreamDescriptorSurfaceCreateInfoGGP( VULKAN_HPP_NAMESPACE::StreamDescriptorSurfaceCreateFlagsGGP flags_ = {}, GgpStreamDescriptor streamDescriptor_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , streamDescriptor{ streamDescriptor_ } { } VULKAN_HPP_CONSTEXPR StreamDescriptorSurfaceCreateInfoGGP( StreamDescriptorSurfaceCreateInfoGGP const & rhs ) VULKAN_HPP_NOEXCEPT = default; StreamDescriptorSurfaceCreateInfoGGP( VkStreamDescriptorSurfaceCreateInfoGGP const & rhs ) VULKAN_HPP_NOEXCEPT : StreamDescriptorSurfaceCreateInfoGGP( *reinterpret_cast( &rhs ) ) { } StreamDescriptorSurfaceCreateInfoGGP & operator=( StreamDescriptorSurfaceCreateInfoGGP const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ StreamDescriptorSurfaceCreateInfoGGP & operator=( VkStreamDescriptorSurfaceCreateInfoGGP const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } # if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 StreamDescriptorSurfaceCreateInfoGGP & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 StreamDescriptorSurfaceCreateInfoGGP & setFlags( VULKAN_HPP_NAMESPACE::StreamDescriptorSurfaceCreateFlagsGGP flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 StreamDescriptorSurfaceCreateInfoGGP & setStreamDescriptor( GgpStreamDescriptor streamDescriptor_ ) VULKAN_HPP_NOEXCEPT { streamDescriptor = streamDescriptor_; return *this; } # endif /*VULKAN_HPP_NO_SETTERS*/ operator VkStreamDescriptorSurfaceCreateInfoGGP const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkStreamDescriptorSurfaceCreateInfoGGP &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, streamDescriptor ); } # endif # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) std::strong_ordering operator<=>( StreamDescriptorSurfaceCreateInfoGGP const & rhs ) const VULKAN_HPP_NOEXCEPT { if ( auto cmp = sType <=> rhs.sType; cmp != 0 ) return cmp; if ( auto cmp = pNext <=> rhs.pNext; cmp != 0 ) return cmp; if ( auto cmp = flags <=> rhs.flags; cmp != 0 ) return cmp; if ( auto cmp = memcmp( &streamDescriptor, &rhs.streamDescriptor, sizeof( GgpStreamDescriptor ) ); cmp != 0 ) return ( cmp < 0 ) ? std::strong_ordering::less : std::strong_ordering::greater; return std::strong_ordering::equivalent; } # endif bool operator==( StreamDescriptorSurfaceCreateInfoGGP const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( memcmp( &streamDescriptor, &rhs.streamDescriptor, sizeof( GgpStreamDescriptor ) ) == 0 ); } bool operator!=( StreamDescriptorSurfaceCreateInfoGGP const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eStreamDescriptorSurfaceCreateInfoGGP; const void * pNext = {}; VULKAN_HPP_NAMESPACE::StreamDescriptorSurfaceCreateFlagsGGP flags = {}; GgpStreamDescriptor streamDescriptor = {}; }; template <> struct CppType { using Type = StreamDescriptorSurfaceCreateInfoGGP; }; #endif /*VK_USE_PLATFORM_GGP*/ struct SubmitInfo { using NativeType = VkSubmitInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSubmitInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR SubmitInfo( uint32_t waitSemaphoreCount_ = {}, const VULKAN_HPP_NAMESPACE::Semaphore * pWaitSemaphores_ = {}, const VULKAN_HPP_NAMESPACE::PipelineStageFlags * pWaitDstStageMask_ = {}, uint32_t commandBufferCount_ = {}, const VULKAN_HPP_NAMESPACE::CommandBuffer * pCommandBuffers_ = {}, uint32_t signalSemaphoreCount_ = {}, const VULKAN_HPP_NAMESPACE::Semaphore * pSignalSemaphores_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , waitSemaphoreCount{ waitSemaphoreCount_ } , pWaitSemaphores{ pWaitSemaphores_ } , pWaitDstStageMask{ pWaitDstStageMask_ } , commandBufferCount{ commandBufferCount_ } , pCommandBuffers{ pCommandBuffers_ } , signalSemaphoreCount{ signalSemaphoreCount_ } , pSignalSemaphores{ pSignalSemaphores_ } { } VULKAN_HPP_CONSTEXPR SubmitInfo( SubmitInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; SubmitInfo( VkSubmitInfo const & rhs ) VULKAN_HPP_NOEXCEPT : SubmitInfo( *reinterpret_cast( &rhs ) ) {} # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) SubmitInfo( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & waitSemaphores_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & waitDstStageMask_ = {}, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & commandBuffers_ = {}, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & signalSemaphores_ = {}, const void * pNext_ = nullptr ) : pNext( pNext_ ) , waitSemaphoreCount( static_cast( waitSemaphores_.size() ) ) , pWaitSemaphores( waitSemaphores_.data() ) , pWaitDstStageMask( waitDstStageMask_.data() ) , commandBufferCount( static_cast( commandBuffers_.size() ) ) , pCommandBuffers( commandBuffers_.data() ) , signalSemaphoreCount( static_cast( signalSemaphores_.size() ) ) , pSignalSemaphores( signalSemaphores_.data() ) { # ifdef VULKAN_HPP_NO_EXCEPTIONS VULKAN_HPP_ASSERT( waitSemaphores_.size() == waitDstStageMask_.size() ); # else if ( waitSemaphores_.size() != waitDstStageMask_.size() ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::SubmitInfo::SubmitInfo: waitSemaphores_.size() != waitDstStageMask_.size()" ); } # endif /*VULKAN_HPP_NO_EXCEPTIONS*/ } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ SubmitInfo & operator=( SubmitInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ SubmitInfo & operator=( VkSubmitInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 SubmitInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 SubmitInfo & setWaitSemaphoreCount( uint32_t waitSemaphoreCount_ ) VULKAN_HPP_NOEXCEPT { waitSemaphoreCount = waitSemaphoreCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 SubmitInfo & setPWaitSemaphores( const VULKAN_HPP_NAMESPACE::Semaphore * pWaitSemaphores_ ) VULKAN_HPP_NOEXCEPT { pWaitSemaphores = pWaitSemaphores_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) SubmitInfo & setWaitSemaphores( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & waitSemaphores_ ) VULKAN_HPP_NOEXCEPT { waitSemaphoreCount = static_cast( waitSemaphores_.size() ); pWaitSemaphores = waitSemaphores_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 SubmitInfo & setPWaitDstStageMask( const VULKAN_HPP_NAMESPACE::PipelineStageFlags * pWaitDstStageMask_ ) VULKAN_HPP_NOEXCEPT { pWaitDstStageMask = pWaitDstStageMask_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) SubmitInfo & setWaitDstStageMask( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & waitDstStageMask_ ) VULKAN_HPP_NOEXCEPT { waitSemaphoreCount = static_cast( waitDstStageMask_.size() ); pWaitDstStageMask = waitDstStageMask_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 SubmitInfo & setCommandBufferCount( uint32_t commandBufferCount_ ) VULKAN_HPP_NOEXCEPT { commandBufferCount = commandBufferCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 SubmitInfo & setPCommandBuffers( const VULKAN_HPP_NAMESPACE::CommandBuffer * pCommandBuffers_ ) VULKAN_HPP_NOEXCEPT { pCommandBuffers = pCommandBuffers_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) SubmitInfo & setCommandBuffers( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & commandBuffers_ ) VULKAN_HPP_NOEXCEPT { commandBufferCount = static_cast( commandBuffers_.size() ); pCommandBuffers = commandBuffers_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 SubmitInfo & setSignalSemaphoreCount( uint32_t signalSemaphoreCount_ ) VULKAN_HPP_NOEXCEPT { signalSemaphoreCount = signalSemaphoreCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 SubmitInfo & setPSignalSemaphores( const VULKAN_HPP_NAMESPACE::Semaphore * pSignalSemaphores_ ) VULKAN_HPP_NOEXCEPT { pSignalSemaphores = pSignalSemaphores_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) SubmitInfo & setSignalSemaphores( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & signalSemaphores_ ) VULKAN_HPP_NOEXCEPT { signalSemaphoreCount = static_cast( signalSemaphores_.size() ); pSignalSemaphores = signalSemaphores_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkSubmitInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkSubmitInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, waitSemaphoreCount, pWaitSemaphores, pWaitDstStageMask, commandBufferCount, pCommandBuffers, signalSemaphoreCount, pSignalSemaphores ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( SubmitInfo const & ) const = default; #else bool operator==( SubmitInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( waitSemaphoreCount == rhs.waitSemaphoreCount ) && ( pWaitSemaphores == rhs.pWaitSemaphores ) && ( pWaitDstStageMask == rhs.pWaitDstStageMask ) && ( commandBufferCount == rhs.commandBufferCount ) && ( pCommandBuffers == rhs.pCommandBuffers ) && ( signalSemaphoreCount == rhs.signalSemaphoreCount ) && ( pSignalSemaphores == rhs.pSignalSemaphores ); # endif } bool operator!=( SubmitInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSubmitInfo; const void * pNext = {}; uint32_t waitSemaphoreCount = {}; const VULKAN_HPP_NAMESPACE::Semaphore * pWaitSemaphores = {}; const VULKAN_HPP_NAMESPACE::PipelineStageFlags * pWaitDstStageMask = {}; uint32_t commandBufferCount = {}; const VULKAN_HPP_NAMESPACE::CommandBuffer * pCommandBuffers = {}; uint32_t signalSemaphoreCount = {}; const VULKAN_HPP_NAMESPACE::Semaphore * pSignalSemaphores = {}; }; template <> struct CppType { using Type = SubmitInfo; }; struct SubmitInfo2 { using NativeType = VkSubmitInfo2; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSubmitInfo2; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR SubmitInfo2( VULKAN_HPP_NAMESPACE::SubmitFlags flags_ = {}, uint32_t waitSemaphoreInfoCount_ = {}, const VULKAN_HPP_NAMESPACE::SemaphoreSubmitInfo * pWaitSemaphoreInfos_ = {}, uint32_t commandBufferInfoCount_ = {}, const VULKAN_HPP_NAMESPACE::CommandBufferSubmitInfo * pCommandBufferInfos_ = {}, uint32_t signalSemaphoreInfoCount_ = {}, const VULKAN_HPP_NAMESPACE::SemaphoreSubmitInfo * pSignalSemaphoreInfos_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , waitSemaphoreInfoCount{ waitSemaphoreInfoCount_ } , pWaitSemaphoreInfos{ pWaitSemaphoreInfos_ } , commandBufferInfoCount{ commandBufferInfoCount_ } , pCommandBufferInfos{ pCommandBufferInfos_ } , signalSemaphoreInfoCount{ signalSemaphoreInfoCount_ } , pSignalSemaphoreInfos{ pSignalSemaphoreInfos_ } { } VULKAN_HPP_CONSTEXPR SubmitInfo2( SubmitInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; SubmitInfo2( VkSubmitInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT : SubmitInfo2( *reinterpret_cast( &rhs ) ) {} # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) SubmitInfo2( VULKAN_HPP_NAMESPACE::SubmitFlags flags_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & waitSemaphoreInfos_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & commandBufferInfos_ = {}, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & signalSemaphoreInfos_ = {}, const void * pNext_ = nullptr ) : pNext( pNext_ ) , flags( flags_ ) , waitSemaphoreInfoCount( static_cast( waitSemaphoreInfos_.size() ) ) , pWaitSemaphoreInfos( waitSemaphoreInfos_.data() ) , commandBufferInfoCount( static_cast( commandBufferInfos_.size() ) ) , pCommandBufferInfos( commandBufferInfos_.data() ) , signalSemaphoreInfoCount( static_cast( signalSemaphoreInfos_.size() ) ) , pSignalSemaphoreInfos( signalSemaphoreInfos_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ SubmitInfo2 & operator=( SubmitInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ SubmitInfo2 & operator=( VkSubmitInfo2 const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 SubmitInfo2 & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 SubmitInfo2 & setFlags( VULKAN_HPP_NAMESPACE::SubmitFlags flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 SubmitInfo2 & setWaitSemaphoreInfoCount( uint32_t waitSemaphoreInfoCount_ ) VULKAN_HPP_NOEXCEPT { waitSemaphoreInfoCount = waitSemaphoreInfoCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 SubmitInfo2 & setPWaitSemaphoreInfos( const VULKAN_HPP_NAMESPACE::SemaphoreSubmitInfo * pWaitSemaphoreInfos_ ) VULKAN_HPP_NOEXCEPT { pWaitSemaphoreInfos = pWaitSemaphoreInfos_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) SubmitInfo2 & setWaitSemaphoreInfos( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & waitSemaphoreInfos_ ) VULKAN_HPP_NOEXCEPT { waitSemaphoreInfoCount = static_cast( waitSemaphoreInfos_.size() ); pWaitSemaphoreInfos = waitSemaphoreInfos_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 SubmitInfo2 & setCommandBufferInfoCount( uint32_t commandBufferInfoCount_ ) VULKAN_HPP_NOEXCEPT { commandBufferInfoCount = commandBufferInfoCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 SubmitInfo2 & setPCommandBufferInfos( const VULKAN_HPP_NAMESPACE::CommandBufferSubmitInfo * pCommandBufferInfos_ ) VULKAN_HPP_NOEXCEPT { pCommandBufferInfos = pCommandBufferInfos_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) SubmitInfo2 & setCommandBufferInfos( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & commandBufferInfos_ ) VULKAN_HPP_NOEXCEPT { commandBufferInfoCount = static_cast( commandBufferInfos_.size() ); pCommandBufferInfos = commandBufferInfos_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 SubmitInfo2 & setSignalSemaphoreInfoCount( uint32_t signalSemaphoreInfoCount_ ) VULKAN_HPP_NOEXCEPT { signalSemaphoreInfoCount = signalSemaphoreInfoCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 SubmitInfo2 & setPSignalSemaphoreInfos( const VULKAN_HPP_NAMESPACE::SemaphoreSubmitInfo * pSignalSemaphoreInfos_ ) VULKAN_HPP_NOEXCEPT { pSignalSemaphoreInfos = pSignalSemaphoreInfos_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) SubmitInfo2 & setSignalSemaphoreInfos( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & signalSemaphoreInfos_ ) VULKAN_HPP_NOEXCEPT { signalSemaphoreInfoCount = static_cast( signalSemaphoreInfos_.size() ); pSignalSemaphoreInfos = signalSemaphoreInfos_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkSubmitInfo2 const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkSubmitInfo2 &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, waitSemaphoreInfoCount, pWaitSemaphoreInfos, commandBufferInfoCount, pCommandBufferInfos, signalSemaphoreInfoCount, pSignalSemaphoreInfos ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( SubmitInfo2 const & ) const = default; #else bool operator==( SubmitInfo2 const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( waitSemaphoreInfoCount == rhs.waitSemaphoreInfoCount ) && ( pWaitSemaphoreInfos == rhs.pWaitSemaphoreInfos ) && ( commandBufferInfoCount == rhs.commandBufferInfoCount ) && ( pCommandBufferInfos == rhs.pCommandBufferInfos ) && ( signalSemaphoreInfoCount == rhs.signalSemaphoreInfoCount ) && ( pSignalSemaphoreInfos == rhs.pSignalSemaphoreInfos ); # endif } bool operator!=( SubmitInfo2 const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSubmitInfo2; const void * pNext = {}; VULKAN_HPP_NAMESPACE::SubmitFlags flags = {}; uint32_t waitSemaphoreInfoCount = {}; const VULKAN_HPP_NAMESPACE::SemaphoreSubmitInfo * pWaitSemaphoreInfos = {}; uint32_t commandBufferInfoCount = {}; const VULKAN_HPP_NAMESPACE::CommandBufferSubmitInfo * pCommandBufferInfos = {}; uint32_t signalSemaphoreInfoCount = {}; const VULKAN_HPP_NAMESPACE::SemaphoreSubmitInfo * pSignalSemaphoreInfos = {}; }; template <> struct CppType { using Type = SubmitInfo2; }; using SubmitInfo2KHR = SubmitInfo2; struct SubpassBeginInfo { using NativeType = VkSubpassBeginInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSubpassBeginInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR SubpassBeginInfo( VULKAN_HPP_NAMESPACE::SubpassContents contents_ = VULKAN_HPP_NAMESPACE::SubpassContents::eInline, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , contents{ contents_ } { } VULKAN_HPP_CONSTEXPR SubpassBeginInfo( SubpassBeginInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; SubpassBeginInfo( VkSubpassBeginInfo const & rhs ) VULKAN_HPP_NOEXCEPT : SubpassBeginInfo( *reinterpret_cast( &rhs ) ) {} SubpassBeginInfo & operator=( SubpassBeginInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ SubpassBeginInfo & operator=( VkSubpassBeginInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 SubpassBeginInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 SubpassBeginInfo & setContents( VULKAN_HPP_NAMESPACE::SubpassContents contents_ ) VULKAN_HPP_NOEXCEPT { contents = contents_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkSubpassBeginInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkSubpassBeginInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, contents ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( SubpassBeginInfo const & ) const = default; #else bool operator==( SubpassBeginInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( contents == rhs.contents ); # endif } bool operator!=( SubpassBeginInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSubpassBeginInfo; const void * pNext = {}; VULKAN_HPP_NAMESPACE::SubpassContents contents = VULKAN_HPP_NAMESPACE::SubpassContents::eInline; }; template <> struct CppType { using Type = SubpassBeginInfo; }; using SubpassBeginInfoKHR = SubpassBeginInfo; struct SubpassDescriptionDepthStencilResolve { using NativeType = VkSubpassDescriptionDepthStencilResolve; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSubpassDescriptionDepthStencilResolve; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR SubpassDescriptionDepthStencilResolve( VULKAN_HPP_NAMESPACE::ResolveModeFlagBits depthResolveMode_ = VULKAN_HPP_NAMESPACE::ResolveModeFlagBits::eNone, VULKAN_HPP_NAMESPACE::ResolveModeFlagBits stencilResolveMode_ = VULKAN_HPP_NAMESPACE::ResolveModeFlagBits::eNone, const VULKAN_HPP_NAMESPACE::AttachmentReference2 * pDepthStencilResolveAttachment_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , depthResolveMode{ depthResolveMode_ } , stencilResolveMode{ stencilResolveMode_ } , pDepthStencilResolveAttachment{ pDepthStencilResolveAttachment_ } { } VULKAN_HPP_CONSTEXPR SubpassDescriptionDepthStencilResolve( SubpassDescriptionDepthStencilResolve const & rhs ) VULKAN_HPP_NOEXCEPT = default; SubpassDescriptionDepthStencilResolve( VkSubpassDescriptionDepthStencilResolve const & rhs ) VULKAN_HPP_NOEXCEPT : SubpassDescriptionDepthStencilResolve( *reinterpret_cast( &rhs ) ) { } SubpassDescriptionDepthStencilResolve & operator=( SubpassDescriptionDepthStencilResolve const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ SubpassDescriptionDepthStencilResolve & operator=( VkSubpassDescriptionDepthStencilResolve const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 SubpassDescriptionDepthStencilResolve & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 SubpassDescriptionDepthStencilResolve & setDepthResolveMode( VULKAN_HPP_NAMESPACE::ResolveModeFlagBits depthResolveMode_ ) VULKAN_HPP_NOEXCEPT { depthResolveMode = depthResolveMode_; return *this; } VULKAN_HPP_CONSTEXPR_14 SubpassDescriptionDepthStencilResolve & setStencilResolveMode( VULKAN_HPP_NAMESPACE::ResolveModeFlagBits stencilResolveMode_ ) VULKAN_HPP_NOEXCEPT { stencilResolveMode = stencilResolveMode_; return *this; } VULKAN_HPP_CONSTEXPR_14 SubpassDescriptionDepthStencilResolve & setPDepthStencilResolveAttachment( const VULKAN_HPP_NAMESPACE::AttachmentReference2 * pDepthStencilResolveAttachment_ ) VULKAN_HPP_NOEXCEPT { pDepthStencilResolveAttachment = pDepthStencilResolveAttachment_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkSubpassDescriptionDepthStencilResolve const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkSubpassDescriptionDepthStencilResolve &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, depthResolveMode, stencilResolveMode, pDepthStencilResolveAttachment ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( SubpassDescriptionDepthStencilResolve const & ) const = default; #else bool operator==( SubpassDescriptionDepthStencilResolve const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( depthResolveMode == rhs.depthResolveMode ) && ( stencilResolveMode == rhs.stencilResolveMode ) && ( pDepthStencilResolveAttachment == rhs.pDepthStencilResolveAttachment ); # endif } bool operator!=( SubpassDescriptionDepthStencilResolve const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSubpassDescriptionDepthStencilResolve; const void * pNext = {}; VULKAN_HPP_NAMESPACE::ResolveModeFlagBits depthResolveMode = VULKAN_HPP_NAMESPACE::ResolveModeFlagBits::eNone; VULKAN_HPP_NAMESPACE::ResolveModeFlagBits stencilResolveMode = VULKAN_HPP_NAMESPACE::ResolveModeFlagBits::eNone; const VULKAN_HPP_NAMESPACE::AttachmentReference2 * pDepthStencilResolveAttachment = {}; }; template <> struct CppType { using Type = SubpassDescriptionDepthStencilResolve; }; using SubpassDescriptionDepthStencilResolveKHR = SubpassDescriptionDepthStencilResolve; struct SubpassEndInfo { using NativeType = VkSubpassEndInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSubpassEndInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR SubpassEndInfo( const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } {} VULKAN_HPP_CONSTEXPR SubpassEndInfo( SubpassEndInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; SubpassEndInfo( VkSubpassEndInfo const & rhs ) VULKAN_HPP_NOEXCEPT : SubpassEndInfo( *reinterpret_cast( &rhs ) ) {} SubpassEndInfo & operator=( SubpassEndInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ SubpassEndInfo & operator=( VkSubpassEndInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 SubpassEndInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkSubpassEndInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkSubpassEndInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( SubpassEndInfo const & ) const = default; #else bool operator==( SubpassEndInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ); # endif } bool operator!=( SubpassEndInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSubpassEndInfo; const void * pNext = {}; }; template <> struct CppType { using Type = SubpassEndInfo; }; using SubpassEndInfoKHR = SubpassEndInfo; struct SubpassFragmentDensityMapOffsetEndInfoQCOM { using NativeType = VkSubpassFragmentDensityMapOffsetEndInfoQCOM; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSubpassFragmentDensityMapOffsetEndInfoQCOM; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR SubpassFragmentDensityMapOffsetEndInfoQCOM( uint32_t fragmentDensityOffsetCount_ = {}, const VULKAN_HPP_NAMESPACE::Offset2D * pFragmentDensityOffsets_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , fragmentDensityOffsetCount{ fragmentDensityOffsetCount_ } , pFragmentDensityOffsets{ pFragmentDensityOffsets_ } { } VULKAN_HPP_CONSTEXPR SubpassFragmentDensityMapOffsetEndInfoQCOM( SubpassFragmentDensityMapOffsetEndInfoQCOM const & rhs ) VULKAN_HPP_NOEXCEPT = default; SubpassFragmentDensityMapOffsetEndInfoQCOM( VkSubpassFragmentDensityMapOffsetEndInfoQCOM const & rhs ) VULKAN_HPP_NOEXCEPT : SubpassFragmentDensityMapOffsetEndInfoQCOM( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) SubpassFragmentDensityMapOffsetEndInfoQCOM( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & fragmentDensityOffsets_, const void * pNext_ = nullptr ) : pNext( pNext_ ) , fragmentDensityOffsetCount( static_cast( fragmentDensityOffsets_.size() ) ) , pFragmentDensityOffsets( fragmentDensityOffsets_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ SubpassFragmentDensityMapOffsetEndInfoQCOM & operator=( SubpassFragmentDensityMapOffsetEndInfoQCOM const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ SubpassFragmentDensityMapOffsetEndInfoQCOM & operator=( VkSubpassFragmentDensityMapOffsetEndInfoQCOM const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 SubpassFragmentDensityMapOffsetEndInfoQCOM & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 SubpassFragmentDensityMapOffsetEndInfoQCOM & setFragmentDensityOffsetCount( uint32_t fragmentDensityOffsetCount_ ) VULKAN_HPP_NOEXCEPT { fragmentDensityOffsetCount = fragmentDensityOffsetCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 SubpassFragmentDensityMapOffsetEndInfoQCOM & setPFragmentDensityOffsets( const VULKAN_HPP_NAMESPACE::Offset2D * pFragmentDensityOffsets_ ) VULKAN_HPP_NOEXCEPT { pFragmentDensityOffsets = pFragmentDensityOffsets_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) SubpassFragmentDensityMapOffsetEndInfoQCOM & setFragmentDensityOffsets( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & fragmentDensityOffsets_ ) VULKAN_HPP_NOEXCEPT { fragmentDensityOffsetCount = static_cast( fragmentDensityOffsets_.size() ); pFragmentDensityOffsets = fragmentDensityOffsets_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkSubpassFragmentDensityMapOffsetEndInfoQCOM const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkSubpassFragmentDensityMapOffsetEndInfoQCOM &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, fragmentDensityOffsetCount, pFragmentDensityOffsets ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( SubpassFragmentDensityMapOffsetEndInfoQCOM const & ) const = default; #else bool operator==( SubpassFragmentDensityMapOffsetEndInfoQCOM const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( fragmentDensityOffsetCount == rhs.fragmentDensityOffsetCount ) && ( pFragmentDensityOffsets == rhs.pFragmentDensityOffsets ); # endif } bool operator!=( SubpassFragmentDensityMapOffsetEndInfoQCOM const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSubpassFragmentDensityMapOffsetEndInfoQCOM; const void * pNext = {}; uint32_t fragmentDensityOffsetCount = {}; const VULKAN_HPP_NAMESPACE::Offset2D * pFragmentDensityOffsets = {}; }; template <> struct CppType { using Type = SubpassFragmentDensityMapOffsetEndInfoQCOM; }; struct SubpassResolvePerformanceQueryEXT { using NativeType = VkSubpassResolvePerformanceQueryEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSubpassResolvePerformanceQueryEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR SubpassResolvePerformanceQueryEXT( VULKAN_HPP_NAMESPACE::Bool32 optimal_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , optimal{ optimal_ } { } VULKAN_HPP_CONSTEXPR SubpassResolvePerformanceQueryEXT( SubpassResolvePerformanceQueryEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; SubpassResolvePerformanceQueryEXT( VkSubpassResolvePerformanceQueryEXT const & rhs ) VULKAN_HPP_NOEXCEPT : SubpassResolvePerformanceQueryEXT( *reinterpret_cast( &rhs ) ) { } SubpassResolvePerformanceQueryEXT & operator=( SubpassResolvePerformanceQueryEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ SubpassResolvePerformanceQueryEXT & operator=( VkSubpassResolvePerformanceQueryEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkSubpassResolvePerformanceQueryEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkSubpassResolvePerformanceQueryEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, optimal ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( SubpassResolvePerformanceQueryEXT const & ) const = default; #else bool operator==( SubpassResolvePerformanceQueryEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( optimal == rhs.optimal ); # endif } bool operator!=( SubpassResolvePerformanceQueryEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSubpassResolvePerformanceQueryEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 optimal = {}; }; template <> struct CppType { using Type = SubpassResolvePerformanceQueryEXT; }; struct SubpassShadingPipelineCreateInfoHUAWEI { using NativeType = VkSubpassShadingPipelineCreateInfoHUAWEI; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSubpassShadingPipelineCreateInfoHUAWEI; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR SubpassShadingPipelineCreateInfoHUAWEI( VULKAN_HPP_NAMESPACE::RenderPass renderPass_ = {}, uint32_t subpass_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , renderPass{ renderPass_ } , subpass{ subpass_ } { } VULKAN_HPP_CONSTEXPR SubpassShadingPipelineCreateInfoHUAWEI( SubpassShadingPipelineCreateInfoHUAWEI const & rhs ) VULKAN_HPP_NOEXCEPT = default; SubpassShadingPipelineCreateInfoHUAWEI( VkSubpassShadingPipelineCreateInfoHUAWEI const & rhs ) VULKAN_HPP_NOEXCEPT : SubpassShadingPipelineCreateInfoHUAWEI( *reinterpret_cast( &rhs ) ) { } SubpassShadingPipelineCreateInfoHUAWEI & operator=( SubpassShadingPipelineCreateInfoHUAWEI const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ SubpassShadingPipelineCreateInfoHUAWEI & operator=( VkSubpassShadingPipelineCreateInfoHUAWEI const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 SubpassShadingPipelineCreateInfoHUAWEI & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 SubpassShadingPipelineCreateInfoHUAWEI & setRenderPass( VULKAN_HPP_NAMESPACE::RenderPass renderPass_ ) VULKAN_HPP_NOEXCEPT { renderPass = renderPass_; return *this; } VULKAN_HPP_CONSTEXPR_14 SubpassShadingPipelineCreateInfoHUAWEI & setSubpass( uint32_t subpass_ ) VULKAN_HPP_NOEXCEPT { subpass = subpass_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkSubpassShadingPipelineCreateInfoHUAWEI const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkSubpassShadingPipelineCreateInfoHUAWEI &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, renderPass, subpass ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( SubpassShadingPipelineCreateInfoHUAWEI const & ) const = default; #else bool operator==( SubpassShadingPipelineCreateInfoHUAWEI const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( renderPass == rhs.renderPass ) && ( subpass == rhs.subpass ); # endif } bool operator!=( SubpassShadingPipelineCreateInfoHUAWEI const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSubpassShadingPipelineCreateInfoHUAWEI; void * pNext = {}; VULKAN_HPP_NAMESPACE::RenderPass renderPass = {}; uint32_t subpass = {}; }; template <> struct CppType { using Type = SubpassShadingPipelineCreateInfoHUAWEI; }; struct SubresourceHostMemcpySize { using NativeType = VkSubresourceHostMemcpySize; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSubresourceHostMemcpySize; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR SubresourceHostMemcpySize( VULKAN_HPP_NAMESPACE::DeviceSize size_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , size{ size_ } { } VULKAN_HPP_CONSTEXPR SubresourceHostMemcpySize( SubresourceHostMemcpySize const & rhs ) VULKAN_HPP_NOEXCEPT = default; SubresourceHostMemcpySize( VkSubresourceHostMemcpySize const & rhs ) VULKAN_HPP_NOEXCEPT : SubresourceHostMemcpySize( *reinterpret_cast( &rhs ) ) { } SubresourceHostMemcpySize & operator=( SubresourceHostMemcpySize const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ SubresourceHostMemcpySize & operator=( VkSubresourceHostMemcpySize const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkSubresourceHostMemcpySize const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkSubresourceHostMemcpySize &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, size ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( SubresourceHostMemcpySize const & ) const = default; #else bool operator==( SubresourceHostMemcpySize const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( size == rhs.size ); # endif } bool operator!=( SubresourceHostMemcpySize const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSubresourceHostMemcpySize; void * pNext = {}; VULKAN_HPP_NAMESPACE::DeviceSize size = {}; }; template <> struct CppType { using Type = SubresourceHostMemcpySize; }; using SubresourceHostMemcpySizeEXT = SubresourceHostMemcpySize; struct SubresourceLayout2 { using NativeType = VkSubresourceLayout2; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSubresourceLayout2; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR SubresourceLayout2( VULKAN_HPP_NAMESPACE::SubresourceLayout subresourceLayout_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , subresourceLayout{ subresourceLayout_ } { } VULKAN_HPP_CONSTEXPR SubresourceLayout2( SubresourceLayout2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; SubresourceLayout2( VkSubresourceLayout2 const & rhs ) VULKAN_HPP_NOEXCEPT : SubresourceLayout2( *reinterpret_cast( &rhs ) ) {} SubresourceLayout2 & operator=( SubresourceLayout2 const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ SubresourceLayout2 & operator=( VkSubresourceLayout2 const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkSubresourceLayout2 const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkSubresourceLayout2 &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, subresourceLayout ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( SubresourceLayout2 const & ) const = default; #else bool operator==( SubresourceLayout2 const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( subresourceLayout == rhs.subresourceLayout ); # endif } bool operator!=( SubresourceLayout2 const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSubresourceLayout2; void * pNext = {}; VULKAN_HPP_NAMESPACE::SubresourceLayout subresourceLayout = {}; }; template <> struct CppType { using Type = SubresourceLayout2; }; using SubresourceLayout2EXT = SubresourceLayout2; using SubresourceLayout2KHR = SubresourceLayout2; struct SurfaceCapabilities2EXT { using NativeType = VkSurfaceCapabilities2EXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSurfaceCapabilities2EXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR SurfaceCapabilities2EXT( uint32_t minImageCount_ = {}, uint32_t maxImageCount_ = {}, VULKAN_HPP_NAMESPACE::Extent2D currentExtent_ = {}, VULKAN_HPP_NAMESPACE::Extent2D minImageExtent_ = {}, VULKAN_HPP_NAMESPACE::Extent2D maxImageExtent_ = {}, uint32_t maxImageArrayLayers_ = {}, VULKAN_HPP_NAMESPACE::SurfaceTransformFlagsKHR supportedTransforms_ = {}, VULKAN_HPP_NAMESPACE::SurfaceTransformFlagBitsKHR currentTransform_ = VULKAN_HPP_NAMESPACE::SurfaceTransformFlagBitsKHR::eIdentity, VULKAN_HPP_NAMESPACE::CompositeAlphaFlagsKHR supportedCompositeAlpha_ = {}, VULKAN_HPP_NAMESPACE::ImageUsageFlags supportedUsageFlags_ = {}, VULKAN_HPP_NAMESPACE::SurfaceCounterFlagsEXT supportedSurfaceCounters_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , minImageCount{ minImageCount_ } , maxImageCount{ maxImageCount_ } , currentExtent{ currentExtent_ } , minImageExtent{ minImageExtent_ } , maxImageExtent{ maxImageExtent_ } , maxImageArrayLayers{ maxImageArrayLayers_ } , supportedTransforms{ supportedTransforms_ } , currentTransform{ currentTransform_ } , supportedCompositeAlpha{ supportedCompositeAlpha_ } , supportedUsageFlags{ supportedUsageFlags_ } , supportedSurfaceCounters{ supportedSurfaceCounters_ } { } VULKAN_HPP_CONSTEXPR SurfaceCapabilities2EXT( SurfaceCapabilities2EXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; SurfaceCapabilities2EXT( VkSurfaceCapabilities2EXT const & rhs ) VULKAN_HPP_NOEXCEPT : SurfaceCapabilities2EXT( *reinterpret_cast( &rhs ) ) { } SurfaceCapabilities2EXT & operator=( SurfaceCapabilities2EXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ SurfaceCapabilities2EXT & operator=( VkSurfaceCapabilities2EXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkSurfaceCapabilities2EXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkSurfaceCapabilities2EXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, minImageCount, maxImageCount, currentExtent, minImageExtent, maxImageExtent, maxImageArrayLayers, supportedTransforms, currentTransform, supportedCompositeAlpha, supportedUsageFlags, supportedSurfaceCounters ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( SurfaceCapabilities2EXT const & ) const = default; #else bool operator==( SurfaceCapabilities2EXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( minImageCount == rhs.minImageCount ) && ( maxImageCount == rhs.maxImageCount ) && ( currentExtent == rhs.currentExtent ) && ( minImageExtent == rhs.minImageExtent ) && ( maxImageExtent == rhs.maxImageExtent ) && ( maxImageArrayLayers == rhs.maxImageArrayLayers ) && ( supportedTransforms == rhs.supportedTransforms ) && ( currentTransform == rhs.currentTransform ) && ( supportedCompositeAlpha == rhs.supportedCompositeAlpha ) && ( supportedUsageFlags == rhs.supportedUsageFlags ) && ( supportedSurfaceCounters == rhs.supportedSurfaceCounters ); # endif } bool operator!=( SurfaceCapabilities2EXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSurfaceCapabilities2EXT; void * pNext = {}; uint32_t minImageCount = {}; uint32_t maxImageCount = {}; VULKAN_HPP_NAMESPACE::Extent2D currentExtent = {}; VULKAN_HPP_NAMESPACE::Extent2D minImageExtent = {}; VULKAN_HPP_NAMESPACE::Extent2D maxImageExtent = {}; uint32_t maxImageArrayLayers = {}; VULKAN_HPP_NAMESPACE::SurfaceTransformFlagsKHR supportedTransforms = {}; VULKAN_HPP_NAMESPACE::SurfaceTransformFlagBitsKHR currentTransform = VULKAN_HPP_NAMESPACE::SurfaceTransformFlagBitsKHR::eIdentity; VULKAN_HPP_NAMESPACE::CompositeAlphaFlagsKHR supportedCompositeAlpha = {}; VULKAN_HPP_NAMESPACE::ImageUsageFlags supportedUsageFlags = {}; VULKAN_HPP_NAMESPACE::SurfaceCounterFlagsEXT supportedSurfaceCounters = {}; }; template <> struct CppType { using Type = SurfaceCapabilities2EXT; }; struct SurfaceCapabilitiesKHR { using NativeType = VkSurfaceCapabilitiesKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR SurfaceCapabilitiesKHR( uint32_t minImageCount_ = {}, uint32_t maxImageCount_ = {}, VULKAN_HPP_NAMESPACE::Extent2D currentExtent_ = {}, VULKAN_HPP_NAMESPACE::Extent2D minImageExtent_ = {}, VULKAN_HPP_NAMESPACE::Extent2D maxImageExtent_ = {}, uint32_t maxImageArrayLayers_ = {}, VULKAN_HPP_NAMESPACE::SurfaceTransformFlagsKHR supportedTransforms_ = {}, VULKAN_HPP_NAMESPACE::SurfaceTransformFlagBitsKHR currentTransform_ = VULKAN_HPP_NAMESPACE::SurfaceTransformFlagBitsKHR::eIdentity, VULKAN_HPP_NAMESPACE::CompositeAlphaFlagsKHR supportedCompositeAlpha_ = {}, VULKAN_HPP_NAMESPACE::ImageUsageFlags supportedUsageFlags_ = {} ) VULKAN_HPP_NOEXCEPT : minImageCount{ minImageCount_ } , maxImageCount{ maxImageCount_ } , currentExtent{ currentExtent_ } , minImageExtent{ minImageExtent_ } , maxImageExtent{ maxImageExtent_ } , maxImageArrayLayers{ maxImageArrayLayers_ } , supportedTransforms{ supportedTransforms_ } , currentTransform{ currentTransform_ } , supportedCompositeAlpha{ supportedCompositeAlpha_ } , supportedUsageFlags{ supportedUsageFlags_ } { } VULKAN_HPP_CONSTEXPR SurfaceCapabilitiesKHR( SurfaceCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; SurfaceCapabilitiesKHR( VkSurfaceCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT : SurfaceCapabilitiesKHR( *reinterpret_cast( &rhs ) ) { } SurfaceCapabilitiesKHR & operator=( SurfaceCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ SurfaceCapabilitiesKHR & operator=( VkSurfaceCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkSurfaceCapabilitiesKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkSurfaceCapabilitiesKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( minImageCount, maxImageCount, currentExtent, minImageExtent, maxImageExtent, maxImageArrayLayers, supportedTransforms, currentTransform, supportedCompositeAlpha, supportedUsageFlags ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( SurfaceCapabilitiesKHR const & ) const = default; #else bool operator==( SurfaceCapabilitiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( minImageCount == rhs.minImageCount ) && ( maxImageCount == rhs.maxImageCount ) && ( currentExtent == rhs.currentExtent ) && ( minImageExtent == rhs.minImageExtent ) && ( maxImageExtent == rhs.maxImageExtent ) && ( maxImageArrayLayers == rhs.maxImageArrayLayers ) && ( supportedTransforms == rhs.supportedTransforms ) && ( currentTransform == rhs.currentTransform ) && ( supportedCompositeAlpha == rhs.supportedCompositeAlpha ) && ( supportedUsageFlags == rhs.supportedUsageFlags ); # endif } bool operator!=( SurfaceCapabilitiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: uint32_t minImageCount = {}; uint32_t maxImageCount = {}; VULKAN_HPP_NAMESPACE::Extent2D currentExtent = {}; VULKAN_HPP_NAMESPACE::Extent2D minImageExtent = {}; VULKAN_HPP_NAMESPACE::Extent2D maxImageExtent = {}; uint32_t maxImageArrayLayers = {}; VULKAN_HPP_NAMESPACE::SurfaceTransformFlagsKHR supportedTransforms = {}; VULKAN_HPP_NAMESPACE::SurfaceTransformFlagBitsKHR currentTransform = VULKAN_HPP_NAMESPACE::SurfaceTransformFlagBitsKHR::eIdentity; VULKAN_HPP_NAMESPACE::CompositeAlphaFlagsKHR supportedCompositeAlpha = {}; VULKAN_HPP_NAMESPACE::ImageUsageFlags supportedUsageFlags = {}; }; struct SurfaceCapabilities2KHR { using NativeType = VkSurfaceCapabilities2KHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSurfaceCapabilities2KHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR SurfaceCapabilities2KHR( VULKAN_HPP_NAMESPACE::SurfaceCapabilitiesKHR surfaceCapabilities_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , surfaceCapabilities{ surfaceCapabilities_ } { } VULKAN_HPP_CONSTEXPR SurfaceCapabilities2KHR( SurfaceCapabilities2KHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; SurfaceCapabilities2KHR( VkSurfaceCapabilities2KHR const & rhs ) VULKAN_HPP_NOEXCEPT : SurfaceCapabilities2KHR( *reinterpret_cast( &rhs ) ) { } SurfaceCapabilities2KHR & operator=( SurfaceCapabilities2KHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ SurfaceCapabilities2KHR & operator=( VkSurfaceCapabilities2KHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkSurfaceCapabilities2KHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkSurfaceCapabilities2KHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, surfaceCapabilities ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( SurfaceCapabilities2KHR const & ) const = default; #else bool operator==( SurfaceCapabilities2KHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( surfaceCapabilities == rhs.surfaceCapabilities ); # endif } bool operator!=( SurfaceCapabilities2KHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSurfaceCapabilities2KHR; void * pNext = {}; VULKAN_HPP_NAMESPACE::SurfaceCapabilitiesKHR surfaceCapabilities = {}; }; template <> struct CppType { using Type = SurfaceCapabilities2KHR; }; #if defined( VK_USE_PLATFORM_WIN32_KHR ) struct SurfaceCapabilitiesFullScreenExclusiveEXT { using NativeType = VkSurfaceCapabilitiesFullScreenExclusiveEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSurfaceCapabilitiesFullScreenExclusiveEXT; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR SurfaceCapabilitiesFullScreenExclusiveEXT( VULKAN_HPP_NAMESPACE::Bool32 fullScreenExclusiveSupported_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , fullScreenExclusiveSupported{ fullScreenExclusiveSupported_ } { } VULKAN_HPP_CONSTEXPR SurfaceCapabilitiesFullScreenExclusiveEXT( SurfaceCapabilitiesFullScreenExclusiveEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; SurfaceCapabilitiesFullScreenExclusiveEXT( VkSurfaceCapabilitiesFullScreenExclusiveEXT const & rhs ) VULKAN_HPP_NOEXCEPT : SurfaceCapabilitiesFullScreenExclusiveEXT( *reinterpret_cast( &rhs ) ) { } SurfaceCapabilitiesFullScreenExclusiveEXT & operator=( SurfaceCapabilitiesFullScreenExclusiveEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ SurfaceCapabilitiesFullScreenExclusiveEXT & operator=( VkSurfaceCapabilitiesFullScreenExclusiveEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkSurfaceCapabilitiesFullScreenExclusiveEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkSurfaceCapabilitiesFullScreenExclusiveEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, fullScreenExclusiveSupported ); } # endif # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( SurfaceCapabilitiesFullScreenExclusiveEXT const & ) const = default; # else bool operator==( SurfaceCapabilitiesFullScreenExclusiveEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( fullScreenExclusiveSupported == rhs.fullScreenExclusiveSupported ); # endif } bool operator!=( SurfaceCapabilitiesFullScreenExclusiveEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } # endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSurfaceCapabilitiesFullScreenExclusiveEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 fullScreenExclusiveSupported = {}; }; template <> struct CppType { using Type = SurfaceCapabilitiesFullScreenExclusiveEXT; }; #endif /*VK_USE_PLATFORM_WIN32_KHR*/ struct SurfaceCapabilitiesPresentBarrierNV { using NativeType = VkSurfaceCapabilitiesPresentBarrierNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSurfaceCapabilitiesPresentBarrierNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR SurfaceCapabilitiesPresentBarrierNV( VULKAN_HPP_NAMESPACE::Bool32 presentBarrierSupported_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , presentBarrierSupported{ presentBarrierSupported_ } { } VULKAN_HPP_CONSTEXPR SurfaceCapabilitiesPresentBarrierNV( SurfaceCapabilitiesPresentBarrierNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; SurfaceCapabilitiesPresentBarrierNV( VkSurfaceCapabilitiesPresentBarrierNV const & rhs ) VULKAN_HPP_NOEXCEPT : SurfaceCapabilitiesPresentBarrierNV( *reinterpret_cast( &rhs ) ) { } SurfaceCapabilitiesPresentBarrierNV & operator=( SurfaceCapabilitiesPresentBarrierNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ SurfaceCapabilitiesPresentBarrierNV & operator=( VkSurfaceCapabilitiesPresentBarrierNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkSurfaceCapabilitiesPresentBarrierNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkSurfaceCapabilitiesPresentBarrierNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, presentBarrierSupported ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( SurfaceCapabilitiesPresentBarrierNV const & ) const = default; #else bool operator==( SurfaceCapabilitiesPresentBarrierNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( presentBarrierSupported == rhs.presentBarrierSupported ); # endif } bool operator!=( SurfaceCapabilitiesPresentBarrierNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSurfaceCapabilitiesPresentBarrierNV; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 presentBarrierSupported = {}; }; template <> struct CppType { using Type = SurfaceCapabilitiesPresentBarrierNV; }; struct SurfaceFormatKHR { using NativeType = VkSurfaceFormatKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR SurfaceFormatKHR( VULKAN_HPP_NAMESPACE::Format format_ = VULKAN_HPP_NAMESPACE::Format::eUndefined, VULKAN_HPP_NAMESPACE::ColorSpaceKHR colorSpace_ = VULKAN_HPP_NAMESPACE::ColorSpaceKHR::eSrgbNonlinear ) VULKAN_HPP_NOEXCEPT : format{ format_ } , colorSpace{ colorSpace_ } { } VULKAN_HPP_CONSTEXPR SurfaceFormatKHR( SurfaceFormatKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; SurfaceFormatKHR( VkSurfaceFormatKHR const & rhs ) VULKAN_HPP_NOEXCEPT : SurfaceFormatKHR( *reinterpret_cast( &rhs ) ) {} SurfaceFormatKHR & operator=( SurfaceFormatKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ SurfaceFormatKHR & operator=( VkSurfaceFormatKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkSurfaceFormatKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkSurfaceFormatKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( format, colorSpace ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( SurfaceFormatKHR const & ) const = default; #else bool operator==( SurfaceFormatKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( format == rhs.format ) && ( colorSpace == rhs.colorSpace ); # endif } bool operator!=( SurfaceFormatKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::Format format = VULKAN_HPP_NAMESPACE::Format::eUndefined; VULKAN_HPP_NAMESPACE::ColorSpaceKHR colorSpace = VULKAN_HPP_NAMESPACE::ColorSpaceKHR::eSrgbNonlinear; }; struct SurfaceFormat2KHR { using NativeType = VkSurfaceFormat2KHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSurfaceFormat2KHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR SurfaceFormat2KHR( VULKAN_HPP_NAMESPACE::SurfaceFormatKHR surfaceFormat_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , surfaceFormat{ surfaceFormat_ } { } VULKAN_HPP_CONSTEXPR SurfaceFormat2KHR( SurfaceFormat2KHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; SurfaceFormat2KHR( VkSurfaceFormat2KHR const & rhs ) VULKAN_HPP_NOEXCEPT : SurfaceFormat2KHR( *reinterpret_cast( &rhs ) ) {} SurfaceFormat2KHR & operator=( SurfaceFormat2KHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ SurfaceFormat2KHR & operator=( VkSurfaceFormat2KHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkSurfaceFormat2KHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkSurfaceFormat2KHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, surfaceFormat ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( SurfaceFormat2KHR const & ) const = default; #else bool operator==( SurfaceFormat2KHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( surfaceFormat == rhs.surfaceFormat ); # endif } bool operator!=( SurfaceFormat2KHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSurfaceFormat2KHR; void * pNext = {}; VULKAN_HPP_NAMESPACE::SurfaceFormatKHR surfaceFormat = {}; }; template <> struct CppType { using Type = SurfaceFormat2KHR; }; #if defined( VK_USE_PLATFORM_WIN32_KHR ) struct SurfaceFullScreenExclusiveInfoEXT { using NativeType = VkSurfaceFullScreenExclusiveInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSurfaceFullScreenExclusiveInfoEXT; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR SurfaceFullScreenExclusiveInfoEXT( VULKAN_HPP_NAMESPACE::FullScreenExclusiveEXT fullScreenExclusive_ = VULKAN_HPP_NAMESPACE::FullScreenExclusiveEXT::eDefault, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , fullScreenExclusive{ fullScreenExclusive_ } { } VULKAN_HPP_CONSTEXPR SurfaceFullScreenExclusiveInfoEXT( SurfaceFullScreenExclusiveInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; SurfaceFullScreenExclusiveInfoEXT( VkSurfaceFullScreenExclusiveInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : SurfaceFullScreenExclusiveInfoEXT( *reinterpret_cast( &rhs ) ) { } SurfaceFullScreenExclusiveInfoEXT & operator=( SurfaceFullScreenExclusiveInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ SurfaceFullScreenExclusiveInfoEXT & operator=( VkSurfaceFullScreenExclusiveInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } # if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 SurfaceFullScreenExclusiveInfoEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 SurfaceFullScreenExclusiveInfoEXT & setFullScreenExclusive( VULKAN_HPP_NAMESPACE::FullScreenExclusiveEXT fullScreenExclusive_ ) VULKAN_HPP_NOEXCEPT { fullScreenExclusive = fullScreenExclusive_; return *this; } # endif /*VULKAN_HPP_NO_SETTERS*/ operator VkSurfaceFullScreenExclusiveInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkSurfaceFullScreenExclusiveInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, fullScreenExclusive ); } # endif # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( SurfaceFullScreenExclusiveInfoEXT const & ) const = default; # else bool operator==( SurfaceFullScreenExclusiveInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( fullScreenExclusive == rhs.fullScreenExclusive ); # endif } bool operator!=( SurfaceFullScreenExclusiveInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } # endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSurfaceFullScreenExclusiveInfoEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::FullScreenExclusiveEXT fullScreenExclusive = VULKAN_HPP_NAMESPACE::FullScreenExclusiveEXT::eDefault; }; template <> struct CppType { using Type = SurfaceFullScreenExclusiveInfoEXT; }; #endif /*VK_USE_PLATFORM_WIN32_KHR*/ #if defined( VK_USE_PLATFORM_WIN32_KHR ) struct SurfaceFullScreenExclusiveWin32InfoEXT { using NativeType = VkSurfaceFullScreenExclusiveWin32InfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSurfaceFullScreenExclusiveWin32InfoEXT; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR SurfaceFullScreenExclusiveWin32InfoEXT( HMONITOR hmonitor_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , hmonitor{ hmonitor_ } { } VULKAN_HPP_CONSTEXPR SurfaceFullScreenExclusiveWin32InfoEXT( SurfaceFullScreenExclusiveWin32InfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; SurfaceFullScreenExclusiveWin32InfoEXT( VkSurfaceFullScreenExclusiveWin32InfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : SurfaceFullScreenExclusiveWin32InfoEXT( *reinterpret_cast( &rhs ) ) { } SurfaceFullScreenExclusiveWin32InfoEXT & operator=( SurfaceFullScreenExclusiveWin32InfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ SurfaceFullScreenExclusiveWin32InfoEXT & operator=( VkSurfaceFullScreenExclusiveWin32InfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } # if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 SurfaceFullScreenExclusiveWin32InfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 SurfaceFullScreenExclusiveWin32InfoEXT & setHmonitor( HMONITOR hmonitor_ ) VULKAN_HPP_NOEXCEPT { hmonitor = hmonitor_; return *this; } # endif /*VULKAN_HPP_NO_SETTERS*/ operator VkSurfaceFullScreenExclusiveWin32InfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkSurfaceFullScreenExclusiveWin32InfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, hmonitor ); } # endif # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( SurfaceFullScreenExclusiveWin32InfoEXT const & ) const = default; # else bool operator==( SurfaceFullScreenExclusiveWin32InfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( hmonitor == rhs.hmonitor ); # endif } bool operator!=( SurfaceFullScreenExclusiveWin32InfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } # endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSurfaceFullScreenExclusiveWin32InfoEXT; const void * pNext = {}; HMONITOR hmonitor = {}; }; template <> struct CppType { using Type = SurfaceFullScreenExclusiveWin32InfoEXT; }; #endif /*VK_USE_PLATFORM_WIN32_KHR*/ struct SurfacePresentModeCompatibilityEXT { using NativeType = VkSurfacePresentModeCompatibilityEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSurfacePresentModeCompatibilityEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR SurfacePresentModeCompatibilityEXT( uint32_t presentModeCount_ = {}, VULKAN_HPP_NAMESPACE::PresentModeKHR * pPresentModes_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , presentModeCount{ presentModeCount_ } , pPresentModes{ pPresentModes_ } { } VULKAN_HPP_CONSTEXPR SurfacePresentModeCompatibilityEXT( SurfacePresentModeCompatibilityEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; SurfacePresentModeCompatibilityEXT( VkSurfacePresentModeCompatibilityEXT const & rhs ) VULKAN_HPP_NOEXCEPT : SurfacePresentModeCompatibilityEXT( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) SurfacePresentModeCompatibilityEXT( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & presentModes_, void * pNext_ = nullptr ) : pNext( pNext_ ), presentModeCount( static_cast( presentModes_.size() ) ), pPresentModes( presentModes_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ SurfacePresentModeCompatibilityEXT & operator=( SurfacePresentModeCompatibilityEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ SurfacePresentModeCompatibilityEXT & operator=( VkSurfacePresentModeCompatibilityEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 SurfacePresentModeCompatibilityEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 SurfacePresentModeCompatibilityEXT & setPresentModeCount( uint32_t presentModeCount_ ) VULKAN_HPP_NOEXCEPT { presentModeCount = presentModeCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 SurfacePresentModeCompatibilityEXT & setPPresentModes( VULKAN_HPP_NAMESPACE::PresentModeKHR * pPresentModes_ ) VULKAN_HPP_NOEXCEPT { pPresentModes = pPresentModes_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) SurfacePresentModeCompatibilityEXT & setPresentModes( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & presentModes_ ) VULKAN_HPP_NOEXCEPT { presentModeCount = static_cast( presentModes_.size() ); pPresentModes = presentModes_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkSurfacePresentModeCompatibilityEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkSurfacePresentModeCompatibilityEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, presentModeCount, pPresentModes ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( SurfacePresentModeCompatibilityEXT const & ) const = default; #else bool operator==( SurfacePresentModeCompatibilityEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( presentModeCount == rhs.presentModeCount ) && ( pPresentModes == rhs.pPresentModes ); # endif } bool operator!=( SurfacePresentModeCompatibilityEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSurfacePresentModeCompatibilityEXT; void * pNext = {}; uint32_t presentModeCount = {}; VULKAN_HPP_NAMESPACE::PresentModeKHR * pPresentModes = {}; }; template <> struct CppType { using Type = SurfacePresentModeCompatibilityEXT; }; struct SurfacePresentModeEXT { using NativeType = VkSurfacePresentModeEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSurfacePresentModeEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR SurfacePresentModeEXT( VULKAN_HPP_NAMESPACE::PresentModeKHR presentMode_ = VULKAN_HPP_NAMESPACE::PresentModeKHR::eImmediate, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , presentMode{ presentMode_ } { } VULKAN_HPP_CONSTEXPR SurfacePresentModeEXT( SurfacePresentModeEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; SurfacePresentModeEXT( VkSurfacePresentModeEXT const & rhs ) VULKAN_HPP_NOEXCEPT : SurfacePresentModeEXT( *reinterpret_cast( &rhs ) ) { } SurfacePresentModeEXT & operator=( SurfacePresentModeEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ SurfacePresentModeEXT & operator=( VkSurfacePresentModeEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 SurfacePresentModeEXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 SurfacePresentModeEXT & setPresentMode( VULKAN_HPP_NAMESPACE::PresentModeKHR presentMode_ ) VULKAN_HPP_NOEXCEPT { presentMode = presentMode_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkSurfacePresentModeEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkSurfacePresentModeEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, presentMode ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( SurfacePresentModeEXT const & ) const = default; #else bool operator==( SurfacePresentModeEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( presentMode == rhs.presentMode ); # endif } bool operator!=( SurfacePresentModeEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSurfacePresentModeEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::PresentModeKHR presentMode = VULKAN_HPP_NAMESPACE::PresentModeKHR::eImmediate; }; template <> struct CppType { using Type = SurfacePresentModeEXT; }; struct SurfacePresentScalingCapabilitiesEXT { using NativeType = VkSurfacePresentScalingCapabilitiesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSurfacePresentScalingCapabilitiesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR SurfacePresentScalingCapabilitiesEXT( VULKAN_HPP_NAMESPACE::PresentScalingFlagsEXT supportedPresentScaling_ = {}, VULKAN_HPP_NAMESPACE::PresentGravityFlagsEXT supportedPresentGravityX_ = {}, VULKAN_HPP_NAMESPACE::PresentGravityFlagsEXT supportedPresentGravityY_ = {}, VULKAN_HPP_NAMESPACE::Extent2D minScaledImageExtent_ = {}, VULKAN_HPP_NAMESPACE::Extent2D maxScaledImageExtent_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , supportedPresentScaling{ supportedPresentScaling_ } , supportedPresentGravityX{ supportedPresentGravityX_ } , supportedPresentGravityY{ supportedPresentGravityY_ } , minScaledImageExtent{ minScaledImageExtent_ } , maxScaledImageExtent{ maxScaledImageExtent_ } { } VULKAN_HPP_CONSTEXPR SurfacePresentScalingCapabilitiesEXT( SurfacePresentScalingCapabilitiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; SurfacePresentScalingCapabilitiesEXT( VkSurfacePresentScalingCapabilitiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : SurfacePresentScalingCapabilitiesEXT( *reinterpret_cast( &rhs ) ) { } SurfacePresentScalingCapabilitiesEXT & operator=( SurfacePresentScalingCapabilitiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ SurfacePresentScalingCapabilitiesEXT & operator=( VkSurfacePresentScalingCapabilitiesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkSurfacePresentScalingCapabilitiesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkSurfacePresentScalingCapabilitiesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, supportedPresentScaling, supportedPresentGravityX, supportedPresentGravityY, minScaledImageExtent, maxScaledImageExtent ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( SurfacePresentScalingCapabilitiesEXT const & ) const = default; #else bool operator==( SurfacePresentScalingCapabilitiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( supportedPresentScaling == rhs.supportedPresentScaling ) && ( supportedPresentGravityX == rhs.supportedPresentGravityX ) && ( supportedPresentGravityY == rhs.supportedPresentGravityY ) && ( minScaledImageExtent == rhs.minScaledImageExtent ) && ( maxScaledImageExtent == rhs.maxScaledImageExtent ); # endif } bool operator!=( SurfacePresentScalingCapabilitiesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSurfacePresentScalingCapabilitiesEXT; void * pNext = {}; VULKAN_HPP_NAMESPACE::PresentScalingFlagsEXT supportedPresentScaling = {}; VULKAN_HPP_NAMESPACE::PresentGravityFlagsEXT supportedPresentGravityX = {}; VULKAN_HPP_NAMESPACE::PresentGravityFlagsEXT supportedPresentGravityY = {}; VULKAN_HPP_NAMESPACE::Extent2D minScaledImageExtent = {}; VULKAN_HPP_NAMESPACE::Extent2D maxScaledImageExtent = {}; }; template <> struct CppType { using Type = SurfacePresentScalingCapabilitiesEXT; }; struct SurfaceProtectedCapabilitiesKHR { using NativeType = VkSurfaceProtectedCapabilitiesKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSurfaceProtectedCapabilitiesKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR SurfaceProtectedCapabilitiesKHR( VULKAN_HPP_NAMESPACE::Bool32 supportsProtected_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , supportsProtected{ supportsProtected_ } { } VULKAN_HPP_CONSTEXPR SurfaceProtectedCapabilitiesKHR( SurfaceProtectedCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; SurfaceProtectedCapabilitiesKHR( VkSurfaceProtectedCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT : SurfaceProtectedCapabilitiesKHR( *reinterpret_cast( &rhs ) ) { } SurfaceProtectedCapabilitiesKHR & operator=( SurfaceProtectedCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ SurfaceProtectedCapabilitiesKHR & operator=( VkSurfaceProtectedCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkSurfaceProtectedCapabilitiesKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkSurfaceProtectedCapabilitiesKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, supportsProtected ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( SurfaceProtectedCapabilitiesKHR const & ) const = default; #else bool operator==( SurfaceProtectedCapabilitiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( supportsProtected == rhs.supportsProtected ); # endif } bool operator!=( SurfaceProtectedCapabilitiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSurfaceProtectedCapabilitiesKHR; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 supportsProtected = {}; }; template <> struct CppType { using Type = SurfaceProtectedCapabilitiesKHR; }; struct SwapchainCounterCreateInfoEXT { using NativeType = VkSwapchainCounterCreateInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSwapchainCounterCreateInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR SwapchainCounterCreateInfoEXT( VULKAN_HPP_NAMESPACE::SurfaceCounterFlagsEXT surfaceCounters_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , surfaceCounters{ surfaceCounters_ } { } VULKAN_HPP_CONSTEXPR SwapchainCounterCreateInfoEXT( SwapchainCounterCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; SwapchainCounterCreateInfoEXT( VkSwapchainCounterCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : SwapchainCounterCreateInfoEXT( *reinterpret_cast( &rhs ) ) { } SwapchainCounterCreateInfoEXT & operator=( SwapchainCounterCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ SwapchainCounterCreateInfoEXT & operator=( VkSwapchainCounterCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 SwapchainCounterCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 SwapchainCounterCreateInfoEXT & setSurfaceCounters( VULKAN_HPP_NAMESPACE::SurfaceCounterFlagsEXT surfaceCounters_ ) VULKAN_HPP_NOEXCEPT { surfaceCounters = surfaceCounters_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkSwapchainCounterCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkSwapchainCounterCreateInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, surfaceCounters ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( SwapchainCounterCreateInfoEXT const & ) const = default; #else bool operator==( SwapchainCounterCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( surfaceCounters == rhs.surfaceCounters ); # endif } bool operator!=( SwapchainCounterCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSwapchainCounterCreateInfoEXT; const void * pNext = {}; VULKAN_HPP_NAMESPACE::SurfaceCounterFlagsEXT surfaceCounters = {}; }; template <> struct CppType { using Type = SwapchainCounterCreateInfoEXT; }; struct SwapchainCreateInfoKHR { using NativeType = VkSwapchainCreateInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSwapchainCreateInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR SwapchainCreateInfoKHR( VULKAN_HPP_NAMESPACE::SwapchainCreateFlagsKHR flags_ = {}, VULKAN_HPP_NAMESPACE::SurfaceKHR surface_ = {}, uint32_t minImageCount_ = {}, VULKAN_HPP_NAMESPACE::Format imageFormat_ = VULKAN_HPP_NAMESPACE::Format::eUndefined, VULKAN_HPP_NAMESPACE::ColorSpaceKHR imageColorSpace_ = VULKAN_HPP_NAMESPACE::ColorSpaceKHR::eSrgbNonlinear, VULKAN_HPP_NAMESPACE::Extent2D imageExtent_ = {}, uint32_t imageArrayLayers_ = {}, VULKAN_HPP_NAMESPACE::ImageUsageFlags imageUsage_ = {}, VULKAN_HPP_NAMESPACE::SharingMode imageSharingMode_ = VULKAN_HPP_NAMESPACE::SharingMode::eExclusive, uint32_t queueFamilyIndexCount_ = {}, const uint32_t * pQueueFamilyIndices_ = {}, VULKAN_HPP_NAMESPACE::SurfaceTransformFlagBitsKHR preTransform_ = VULKAN_HPP_NAMESPACE::SurfaceTransformFlagBitsKHR::eIdentity, VULKAN_HPP_NAMESPACE::CompositeAlphaFlagBitsKHR compositeAlpha_ = VULKAN_HPP_NAMESPACE::CompositeAlphaFlagBitsKHR::eOpaque, VULKAN_HPP_NAMESPACE::PresentModeKHR presentMode_ = VULKAN_HPP_NAMESPACE::PresentModeKHR::eImmediate, VULKAN_HPP_NAMESPACE::Bool32 clipped_ = {}, VULKAN_HPP_NAMESPACE::SwapchainKHR oldSwapchain_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , surface{ surface_ } , minImageCount{ minImageCount_ } , imageFormat{ imageFormat_ } , imageColorSpace{ imageColorSpace_ } , imageExtent{ imageExtent_ } , imageArrayLayers{ imageArrayLayers_ } , imageUsage{ imageUsage_ } , imageSharingMode{ imageSharingMode_ } , queueFamilyIndexCount{ queueFamilyIndexCount_ } , pQueueFamilyIndices{ pQueueFamilyIndices_ } , preTransform{ preTransform_ } , compositeAlpha{ compositeAlpha_ } , presentMode{ presentMode_ } , clipped{ clipped_ } , oldSwapchain{ oldSwapchain_ } { } VULKAN_HPP_CONSTEXPR SwapchainCreateInfoKHR( SwapchainCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; SwapchainCreateInfoKHR( VkSwapchainCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : SwapchainCreateInfoKHR( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) SwapchainCreateInfoKHR( VULKAN_HPP_NAMESPACE::SwapchainCreateFlagsKHR flags_, VULKAN_HPP_NAMESPACE::SurfaceKHR surface_, uint32_t minImageCount_, VULKAN_HPP_NAMESPACE::Format imageFormat_, VULKAN_HPP_NAMESPACE::ColorSpaceKHR imageColorSpace_, VULKAN_HPP_NAMESPACE::Extent2D imageExtent_, uint32_t imageArrayLayers_, VULKAN_HPP_NAMESPACE::ImageUsageFlags imageUsage_, VULKAN_HPP_NAMESPACE::SharingMode imageSharingMode_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & queueFamilyIndices_, VULKAN_HPP_NAMESPACE::SurfaceTransformFlagBitsKHR preTransform_ = VULKAN_HPP_NAMESPACE::SurfaceTransformFlagBitsKHR::eIdentity, VULKAN_HPP_NAMESPACE::CompositeAlphaFlagBitsKHR compositeAlpha_ = VULKAN_HPP_NAMESPACE::CompositeAlphaFlagBitsKHR::eOpaque, VULKAN_HPP_NAMESPACE::PresentModeKHR presentMode_ = VULKAN_HPP_NAMESPACE::PresentModeKHR::eImmediate, VULKAN_HPP_NAMESPACE::Bool32 clipped_ = {}, VULKAN_HPP_NAMESPACE::SwapchainKHR oldSwapchain_ = {}, const void * pNext_ = nullptr ) : pNext( pNext_ ) , flags( flags_ ) , surface( surface_ ) , minImageCount( minImageCount_ ) , imageFormat( imageFormat_ ) , imageColorSpace( imageColorSpace_ ) , imageExtent( imageExtent_ ) , imageArrayLayers( imageArrayLayers_ ) , imageUsage( imageUsage_ ) , imageSharingMode( imageSharingMode_ ) , queueFamilyIndexCount( static_cast( queueFamilyIndices_.size() ) ) , pQueueFamilyIndices( queueFamilyIndices_.data() ) , preTransform( preTransform_ ) , compositeAlpha( compositeAlpha_ ) , presentMode( presentMode_ ) , clipped( clipped_ ) , oldSwapchain( oldSwapchain_ ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ SwapchainCreateInfoKHR & operator=( SwapchainCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ SwapchainCreateInfoKHR & operator=( VkSwapchainCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 SwapchainCreateInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 SwapchainCreateInfoKHR & setFlags( VULKAN_HPP_NAMESPACE::SwapchainCreateFlagsKHR flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 SwapchainCreateInfoKHR & setSurface( VULKAN_HPP_NAMESPACE::SurfaceKHR surface_ ) VULKAN_HPP_NOEXCEPT { surface = surface_; return *this; } VULKAN_HPP_CONSTEXPR_14 SwapchainCreateInfoKHR & setMinImageCount( uint32_t minImageCount_ ) VULKAN_HPP_NOEXCEPT { minImageCount = minImageCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 SwapchainCreateInfoKHR & setImageFormat( VULKAN_HPP_NAMESPACE::Format imageFormat_ ) VULKAN_HPP_NOEXCEPT { imageFormat = imageFormat_; return *this; } VULKAN_HPP_CONSTEXPR_14 SwapchainCreateInfoKHR & setImageColorSpace( VULKAN_HPP_NAMESPACE::ColorSpaceKHR imageColorSpace_ ) VULKAN_HPP_NOEXCEPT { imageColorSpace = imageColorSpace_; return *this; } VULKAN_HPP_CONSTEXPR_14 SwapchainCreateInfoKHR & setImageExtent( VULKAN_HPP_NAMESPACE::Extent2D const & imageExtent_ ) VULKAN_HPP_NOEXCEPT { imageExtent = imageExtent_; return *this; } VULKAN_HPP_CONSTEXPR_14 SwapchainCreateInfoKHR & setImageArrayLayers( uint32_t imageArrayLayers_ ) VULKAN_HPP_NOEXCEPT { imageArrayLayers = imageArrayLayers_; return *this; } VULKAN_HPP_CONSTEXPR_14 SwapchainCreateInfoKHR & setImageUsage( VULKAN_HPP_NAMESPACE::ImageUsageFlags imageUsage_ ) VULKAN_HPP_NOEXCEPT { imageUsage = imageUsage_; return *this; } VULKAN_HPP_CONSTEXPR_14 SwapchainCreateInfoKHR & setImageSharingMode( VULKAN_HPP_NAMESPACE::SharingMode imageSharingMode_ ) VULKAN_HPP_NOEXCEPT { imageSharingMode = imageSharingMode_; return *this; } VULKAN_HPP_CONSTEXPR_14 SwapchainCreateInfoKHR & setQueueFamilyIndexCount( uint32_t queueFamilyIndexCount_ ) VULKAN_HPP_NOEXCEPT { queueFamilyIndexCount = queueFamilyIndexCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 SwapchainCreateInfoKHR & setPQueueFamilyIndices( const uint32_t * pQueueFamilyIndices_ ) VULKAN_HPP_NOEXCEPT { pQueueFamilyIndices = pQueueFamilyIndices_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) SwapchainCreateInfoKHR & setQueueFamilyIndices( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & queueFamilyIndices_ ) VULKAN_HPP_NOEXCEPT { queueFamilyIndexCount = static_cast( queueFamilyIndices_.size() ); pQueueFamilyIndices = queueFamilyIndices_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 SwapchainCreateInfoKHR & setPreTransform( VULKAN_HPP_NAMESPACE::SurfaceTransformFlagBitsKHR preTransform_ ) VULKAN_HPP_NOEXCEPT { preTransform = preTransform_; return *this; } VULKAN_HPP_CONSTEXPR_14 SwapchainCreateInfoKHR & setCompositeAlpha( VULKAN_HPP_NAMESPACE::CompositeAlphaFlagBitsKHR compositeAlpha_ ) VULKAN_HPP_NOEXCEPT { compositeAlpha = compositeAlpha_; return *this; } VULKAN_HPP_CONSTEXPR_14 SwapchainCreateInfoKHR & setPresentMode( VULKAN_HPP_NAMESPACE::PresentModeKHR presentMode_ ) VULKAN_HPP_NOEXCEPT { presentMode = presentMode_; return *this; } VULKAN_HPP_CONSTEXPR_14 SwapchainCreateInfoKHR & setClipped( VULKAN_HPP_NAMESPACE::Bool32 clipped_ ) VULKAN_HPP_NOEXCEPT { clipped = clipped_; return *this; } VULKAN_HPP_CONSTEXPR_14 SwapchainCreateInfoKHR & setOldSwapchain( VULKAN_HPP_NAMESPACE::SwapchainKHR oldSwapchain_ ) VULKAN_HPP_NOEXCEPT { oldSwapchain = oldSwapchain_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkSwapchainCreateInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkSwapchainCreateInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, surface, minImageCount, imageFormat, imageColorSpace, imageExtent, imageArrayLayers, imageUsage, imageSharingMode, queueFamilyIndexCount, pQueueFamilyIndices, preTransform, compositeAlpha, presentMode, clipped, oldSwapchain ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( SwapchainCreateInfoKHR const & ) const = default; #else bool operator==( SwapchainCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( surface == rhs.surface ) && ( minImageCount == rhs.minImageCount ) && ( imageFormat == rhs.imageFormat ) && ( imageColorSpace == rhs.imageColorSpace ) && ( imageExtent == rhs.imageExtent ) && ( imageArrayLayers == rhs.imageArrayLayers ) && ( imageUsage == rhs.imageUsage ) && ( imageSharingMode == rhs.imageSharingMode ) && ( queueFamilyIndexCount == rhs.queueFamilyIndexCount ) && ( pQueueFamilyIndices == rhs.pQueueFamilyIndices ) && ( preTransform == rhs.preTransform ) && ( compositeAlpha == rhs.compositeAlpha ) && ( presentMode == rhs.presentMode ) && ( clipped == rhs.clipped ) && ( oldSwapchain == rhs.oldSwapchain ); # endif } bool operator!=( SwapchainCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSwapchainCreateInfoKHR; const void * pNext = {}; VULKAN_HPP_NAMESPACE::SwapchainCreateFlagsKHR flags = {}; VULKAN_HPP_NAMESPACE::SurfaceKHR surface = {}; uint32_t minImageCount = {}; VULKAN_HPP_NAMESPACE::Format imageFormat = VULKAN_HPP_NAMESPACE::Format::eUndefined; VULKAN_HPP_NAMESPACE::ColorSpaceKHR imageColorSpace = VULKAN_HPP_NAMESPACE::ColorSpaceKHR::eSrgbNonlinear; VULKAN_HPP_NAMESPACE::Extent2D imageExtent = {}; uint32_t imageArrayLayers = {}; VULKAN_HPP_NAMESPACE::ImageUsageFlags imageUsage = {}; VULKAN_HPP_NAMESPACE::SharingMode imageSharingMode = VULKAN_HPP_NAMESPACE::SharingMode::eExclusive; uint32_t queueFamilyIndexCount = {}; const uint32_t * pQueueFamilyIndices = {}; VULKAN_HPP_NAMESPACE::SurfaceTransformFlagBitsKHR preTransform = VULKAN_HPP_NAMESPACE::SurfaceTransformFlagBitsKHR::eIdentity; VULKAN_HPP_NAMESPACE::CompositeAlphaFlagBitsKHR compositeAlpha = VULKAN_HPP_NAMESPACE::CompositeAlphaFlagBitsKHR::eOpaque; VULKAN_HPP_NAMESPACE::PresentModeKHR presentMode = VULKAN_HPP_NAMESPACE::PresentModeKHR::eImmediate; VULKAN_HPP_NAMESPACE::Bool32 clipped = {}; VULKAN_HPP_NAMESPACE::SwapchainKHR oldSwapchain = {}; }; template <> struct CppType { using Type = SwapchainCreateInfoKHR; }; struct SwapchainDisplayNativeHdrCreateInfoAMD { using NativeType = VkSwapchainDisplayNativeHdrCreateInfoAMD; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSwapchainDisplayNativeHdrCreateInfoAMD; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR SwapchainDisplayNativeHdrCreateInfoAMD( VULKAN_HPP_NAMESPACE::Bool32 localDimmingEnable_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , localDimmingEnable{ localDimmingEnable_ } { } VULKAN_HPP_CONSTEXPR SwapchainDisplayNativeHdrCreateInfoAMD( SwapchainDisplayNativeHdrCreateInfoAMD const & rhs ) VULKAN_HPP_NOEXCEPT = default; SwapchainDisplayNativeHdrCreateInfoAMD( VkSwapchainDisplayNativeHdrCreateInfoAMD const & rhs ) VULKAN_HPP_NOEXCEPT : SwapchainDisplayNativeHdrCreateInfoAMD( *reinterpret_cast( &rhs ) ) { } SwapchainDisplayNativeHdrCreateInfoAMD & operator=( SwapchainDisplayNativeHdrCreateInfoAMD const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ SwapchainDisplayNativeHdrCreateInfoAMD & operator=( VkSwapchainDisplayNativeHdrCreateInfoAMD const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 SwapchainDisplayNativeHdrCreateInfoAMD & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 SwapchainDisplayNativeHdrCreateInfoAMD & setLocalDimmingEnable( VULKAN_HPP_NAMESPACE::Bool32 localDimmingEnable_ ) VULKAN_HPP_NOEXCEPT { localDimmingEnable = localDimmingEnable_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkSwapchainDisplayNativeHdrCreateInfoAMD const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkSwapchainDisplayNativeHdrCreateInfoAMD &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, localDimmingEnable ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( SwapchainDisplayNativeHdrCreateInfoAMD const & ) const = default; #else bool operator==( SwapchainDisplayNativeHdrCreateInfoAMD const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( localDimmingEnable == rhs.localDimmingEnable ); # endif } bool operator!=( SwapchainDisplayNativeHdrCreateInfoAMD const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSwapchainDisplayNativeHdrCreateInfoAMD; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 localDimmingEnable = {}; }; template <> struct CppType { using Type = SwapchainDisplayNativeHdrCreateInfoAMD; }; struct SwapchainLatencyCreateInfoNV { using NativeType = VkSwapchainLatencyCreateInfoNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSwapchainLatencyCreateInfoNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR SwapchainLatencyCreateInfoNV( VULKAN_HPP_NAMESPACE::Bool32 latencyModeEnable_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , latencyModeEnable{ latencyModeEnable_ } { } VULKAN_HPP_CONSTEXPR SwapchainLatencyCreateInfoNV( SwapchainLatencyCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; SwapchainLatencyCreateInfoNV( VkSwapchainLatencyCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT : SwapchainLatencyCreateInfoNV( *reinterpret_cast( &rhs ) ) { } SwapchainLatencyCreateInfoNV & operator=( SwapchainLatencyCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ SwapchainLatencyCreateInfoNV & operator=( VkSwapchainLatencyCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 SwapchainLatencyCreateInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 SwapchainLatencyCreateInfoNV & setLatencyModeEnable( VULKAN_HPP_NAMESPACE::Bool32 latencyModeEnable_ ) VULKAN_HPP_NOEXCEPT { latencyModeEnable = latencyModeEnable_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkSwapchainLatencyCreateInfoNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkSwapchainLatencyCreateInfoNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, latencyModeEnable ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( SwapchainLatencyCreateInfoNV const & ) const = default; #else bool operator==( SwapchainLatencyCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( latencyModeEnable == rhs.latencyModeEnable ); # endif } bool operator!=( SwapchainLatencyCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSwapchainLatencyCreateInfoNV; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 latencyModeEnable = {}; }; template <> struct CppType { using Type = SwapchainLatencyCreateInfoNV; }; struct SwapchainPresentBarrierCreateInfoNV { using NativeType = VkSwapchainPresentBarrierCreateInfoNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSwapchainPresentBarrierCreateInfoNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR SwapchainPresentBarrierCreateInfoNV( VULKAN_HPP_NAMESPACE::Bool32 presentBarrierEnable_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , presentBarrierEnable{ presentBarrierEnable_ } { } VULKAN_HPP_CONSTEXPR SwapchainPresentBarrierCreateInfoNV( SwapchainPresentBarrierCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; SwapchainPresentBarrierCreateInfoNV( VkSwapchainPresentBarrierCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT : SwapchainPresentBarrierCreateInfoNV( *reinterpret_cast( &rhs ) ) { } SwapchainPresentBarrierCreateInfoNV & operator=( SwapchainPresentBarrierCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ SwapchainPresentBarrierCreateInfoNV & operator=( VkSwapchainPresentBarrierCreateInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 SwapchainPresentBarrierCreateInfoNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 SwapchainPresentBarrierCreateInfoNV & setPresentBarrierEnable( VULKAN_HPP_NAMESPACE::Bool32 presentBarrierEnable_ ) VULKAN_HPP_NOEXCEPT { presentBarrierEnable = presentBarrierEnable_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkSwapchainPresentBarrierCreateInfoNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkSwapchainPresentBarrierCreateInfoNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, presentBarrierEnable ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( SwapchainPresentBarrierCreateInfoNV const & ) const = default; #else bool operator==( SwapchainPresentBarrierCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( presentBarrierEnable == rhs.presentBarrierEnable ); # endif } bool operator!=( SwapchainPresentBarrierCreateInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSwapchainPresentBarrierCreateInfoNV; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 presentBarrierEnable = {}; }; template <> struct CppType { using Type = SwapchainPresentBarrierCreateInfoNV; }; struct SwapchainPresentFenceInfoEXT { using NativeType = VkSwapchainPresentFenceInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSwapchainPresentFenceInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR SwapchainPresentFenceInfoEXT( uint32_t swapchainCount_ = {}, const VULKAN_HPP_NAMESPACE::Fence * pFences_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , swapchainCount{ swapchainCount_ } , pFences{ pFences_ } { } VULKAN_HPP_CONSTEXPR SwapchainPresentFenceInfoEXT( SwapchainPresentFenceInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; SwapchainPresentFenceInfoEXT( VkSwapchainPresentFenceInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : SwapchainPresentFenceInfoEXT( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) SwapchainPresentFenceInfoEXT( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & fences_, const void * pNext_ = nullptr ) : pNext( pNext_ ), swapchainCount( static_cast( fences_.size() ) ), pFences( fences_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ SwapchainPresentFenceInfoEXT & operator=( SwapchainPresentFenceInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ SwapchainPresentFenceInfoEXT & operator=( VkSwapchainPresentFenceInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 SwapchainPresentFenceInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 SwapchainPresentFenceInfoEXT & setSwapchainCount( uint32_t swapchainCount_ ) VULKAN_HPP_NOEXCEPT { swapchainCount = swapchainCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 SwapchainPresentFenceInfoEXT & setPFences( const VULKAN_HPP_NAMESPACE::Fence * pFences_ ) VULKAN_HPP_NOEXCEPT { pFences = pFences_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) SwapchainPresentFenceInfoEXT & setFences( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & fences_ ) VULKAN_HPP_NOEXCEPT { swapchainCount = static_cast( fences_.size() ); pFences = fences_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkSwapchainPresentFenceInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkSwapchainPresentFenceInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, swapchainCount, pFences ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( SwapchainPresentFenceInfoEXT const & ) const = default; #else bool operator==( SwapchainPresentFenceInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( swapchainCount == rhs.swapchainCount ) && ( pFences == rhs.pFences ); # endif } bool operator!=( SwapchainPresentFenceInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSwapchainPresentFenceInfoEXT; const void * pNext = {}; uint32_t swapchainCount = {}; const VULKAN_HPP_NAMESPACE::Fence * pFences = {}; }; template <> struct CppType { using Type = SwapchainPresentFenceInfoEXT; }; struct SwapchainPresentModeInfoEXT { using NativeType = VkSwapchainPresentModeInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSwapchainPresentModeInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR SwapchainPresentModeInfoEXT( uint32_t swapchainCount_ = {}, const VULKAN_HPP_NAMESPACE::PresentModeKHR * pPresentModes_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , swapchainCount{ swapchainCount_ } , pPresentModes{ pPresentModes_ } { } VULKAN_HPP_CONSTEXPR SwapchainPresentModeInfoEXT( SwapchainPresentModeInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; SwapchainPresentModeInfoEXT( VkSwapchainPresentModeInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : SwapchainPresentModeInfoEXT( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) SwapchainPresentModeInfoEXT( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & presentModes_, const void * pNext_ = nullptr ) : pNext( pNext_ ), swapchainCount( static_cast( presentModes_.size() ) ), pPresentModes( presentModes_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ SwapchainPresentModeInfoEXT & operator=( SwapchainPresentModeInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ SwapchainPresentModeInfoEXT & operator=( VkSwapchainPresentModeInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 SwapchainPresentModeInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 SwapchainPresentModeInfoEXT & setSwapchainCount( uint32_t swapchainCount_ ) VULKAN_HPP_NOEXCEPT { swapchainCount = swapchainCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 SwapchainPresentModeInfoEXT & setPPresentModes( const VULKAN_HPP_NAMESPACE::PresentModeKHR * pPresentModes_ ) VULKAN_HPP_NOEXCEPT { pPresentModes = pPresentModes_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) SwapchainPresentModeInfoEXT & setPresentModes( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & presentModes_ ) VULKAN_HPP_NOEXCEPT { swapchainCount = static_cast( presentModes_.size() ); pPresentModes = presentModes_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkSwapchainPresentModeInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkSwapchainPresentModeInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, swapchainCount, pPresentModes ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( SwapchainPresentModeInfoEXT const & ) const = default; #else bool operator==( SwapchainPresentModeInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( swapchainCount == rhs.swapchainCount ) && ( pPresentModes == rhs.pPresentModes ); # endif } bool operator!=( SwapchainPresentModeInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSwapchainPresentModeInfoEXT; const void * pNext = {}; uint32_t swapchainCount = {}; const VULKAN_HPP_NAMESPACE::PresentModeKHR * pPresentModes = {}; }; template <> struct CppType { using Type = SwapchainPresentModeInfoEXT; }; struct SwapchainPresentModesCreateInfoEXT { using NativeType = VkSwapchainPresentModesCreateInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSwapchainPresentModesCreateInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR SwapchainPresentModesCreateInfoEXT( uint32_t presentModeCount_ = {}, const VULKAN_HPP_NAMESPACE::PresentModeKHR * pPresentModes_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , presentModeCount{ presentModeCount_ } , pPresentModes{ pPresentModes_ } { } VULKAN_HPP_CONSTEXPR SwapchainPresentModesCreateInfoEXT( SwapchainPresentModesCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; SwapchainPresentModesCreateInfoEXT( VkSwapchainPresentModesCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : SwapchainPresentModesCreateInfoEXT( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) SwapchainPresentModesCreateInfoEXT( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & presentModes_, const void * pNext_ = nullptr ) : pNext( pNext_ ), presentModeCount( static_cast( presentModes_.size() ) ), pPresentModes( presentModes_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ SwapchainPresentModesCreateInfoEXT & operator=( SwapchainPresentModesCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ SwapchainPresentModesCreateInfoEXT & operator=( VkSwapchainPresentModesCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 SwapchainPresentModesCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 SwapchainPresentModesCreateInfoEXT & setPresentModeCount( uint32_t presentModeCount_ ) VULKAN_HPP_NOEXCEPT { presentModeCount = presentModeCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 SwapchainPresentModesCreateInfoEXT & setPPresentModes( const VULKAN_HPP_NAMESPACE::PresentModeKHR * pPresentModes_ ) VULKAN_HPP_NOEXCEPT { pPresentModes = pPresentModes_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) SwapchainPresentModesCreateInfoEXT & setPresentModes( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & presentModes_ ) VULKAN_HPP_NOEXCEPT { presentModeCount = static_cast( presentModes_.size() ); pPresentModes = presentModes_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkSwapchainPresentModesCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkSwapchainPresentModesCreateInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, presentModeCount, pPresentModes ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( SwapchainPresentModesCreateInfoEXT const & ) const = default; #else bool operator==( SwapchainPresentModesCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( presentModeCount == rhs.presentModeCount ) && ( pPresentModes == rhs.pPresentModes ); # endif } bool operator!=( SwapchainPresentModesCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSwapchainPresentModesCreateInfoEXT; const void * pNext = {}; uint32_t presentModeCount = {}; const VULKAN_HPP_NAMESPACE::PresentModeKHR * pPresentModes = {}; }; template <> struct CppType { using Type = SwapchainPresentModesCreateInfoEXT; }; struct SwapchainPresentScalingCreateInfoEXT { using NativeType = VkSwapchainPresentScalingCreateInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eSwapchainPresentScalingCreateInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR SwapchainPresentScalingCreateInfoEXT( VULKAN_HPP_NAMESPACE::PresentScalingFlagsEXT scalingBehavior_ = {}, VULKAN_HPP_NAMESPACE::PresentGravityFlagsEXT presentGravityX_ = {}, VULKAN_HPP_NAMESPACE::PresentGravityFlagsEXT presentGravityY_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , scalingBehavior{ scalingBehavior_ } , presentGravityX{ presentGravityX_ } , presentGravityY{ presentGravityY_ } { } VULKAN_HPP_CONSTEXPR SwapchainPresentScalingCreateInfoEXT( SwapchainPresentScalingCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; SwapchainPresentScalingCreateInfoEXT( VkSwapchainPresentScalingCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : SwapchainPresentScalingCreateInfoEXT( *reinterpret_cast( &rhs ) ) { } SwapchainPresentScalingCreateInfoEXT & operator=( SwapchainPresentScalingCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ SwapchainPresentScalingCreateInfoEXT & operator=( VkSwapchainPresentScalingCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 SwapchainPresentScalingCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 SwapchainPresentScalingCreateInfoEXT & setScalingBehavior( VULKAN_HPP_NAMESPACE::PresentScalingFlagsEXT scalingBehavior_ ) VULKAN_HPP_NOEXCEPT { scalingBehavior = scalingBehavior_; return *this; } VULKAN_HPP_CONSTEXPR_14 SwapchainPresentScalingCreateInfoEXT & setPresentGravityX( VULKAN_HPP_NAMESPACE::PresentGravityFlagsEXT presentGravityX_ ) VULKAN_HPP_NOEXCEPT { presentGravityX = presentGravityX_; return *this; } VULKAN_HPP_CONSTEXPR_14 SwapchainPresentScalingCreateInfoEXT & setPresentGravityY( VULKAN_HPP_NAMESPACE::PresentGravityFlagsEXT presentGravityY_ ) VULKAN_HPP_NOEXCEPT { presentGravityY = presentGravityY_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkSwapchainPresentScalingCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkSwapchainPresentScalingCreateInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, scalingBehavior, presentGravityX, presentGravityY ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( SwapchainPresentScalingCreateInfoEXT const & ) const = default; #else bool operator==( SwapchainPresentScalingCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( scalingBehavior == rhs.scalingBehavior ) && ( presentGravityX == rhs.presentGravityX ) && ( presentGravityY == rhs.presentGravityY ); # endif } bool operator!=( SwapchainPresentScalingCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eSwapchainPresentScalingCreateInfoEXT; const void * pNext = {}; VULKAN_HPP_NAMESPACE::PresentScalingFlagsEXT scalingBehavior = {}; VULKAN_HPP_NAMESPACE::PresentGravityFlagsEXT presentGravityX = {}; VULKAN_HPP_NAMESPACE::PresentGravityFlagsEXT presentGravityY = {}; }; template <> struct CppType { using Type = SwapchainPresentScalingCreateInfoEXT; }; struct TextureLODGatherFormatPropertiesAMD { using NativeType = VkTextureLODGatherFormatPropertiesAMD; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eTextureLodGatherFormatPropertiesAMD; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR TextureLODGatherFormatPropertiesAMD( VULKAN_HPP_NAMESPACE::Bool32 supportsTextureGatherLODBiasAMD_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , supportsTextureGatherLODBiasAMD{ supportsTextureGatherLODBiasAMD_ } { } VULKAN_HPP_CONSTEXPR TextureLODGatherFormatPropertiesAMD( TextureLODGatherFormatPropertiesAMD const & rhs ) VULKAN_HPP_NOEXCEPT = default; TextureLODGatherFormatPropertiesAMD( VkTextureLODGatherFormatPropertiesAMD const & rhs ) VULKAN_HPP_NOEXCEPT : TextureLODGatherFormatPropertiesAMD( *reinterpret_cast( &rhs ) ) { } TextureLODGatherFormatPropertiesAMD & operator=( TextureLODGatherFormatPropertiesAMD const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ TextureLODGatherFormatPropertiesAMD & operator=( VkTextureLODGatherFormatPropertiesAMD const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkTextureLODGatherFormatPropertiesAMD const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkTextureLODGatherFormatPropertiesAMD &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, supportsTextureGatherLODBiasAMD ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( TextureLODGatherFormatPropertiesAMD const & ) const = default; #else bool operator==( TextureLODGatherFormatPropertiesAMD const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( supportsTextureGatherLODBiasAMD == rhs.supportsTextureGatherLODBiasAMD ); # endif } bool operator!=( TextureLODGatherFormatPropertiesAMD const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eTextureLodGatherFormatPropertiesAMD; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 supportsTextureGatherLODBiasAMD = {}; }; template <> struct CppType { using Type = TextureLODGatherFormatPropertiesAMD; }; struct TilePropertiesQCOM { using NativeType = VkTilePropertiesQCOM; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eTilePropertiesQCOM; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR TilePropertiesQCOM( VULKAN_HPP_NAMESPACE::Extent3D tileSize_ = {}, VULKAN_HPP_NAMESPACE::Extent2D apronSize_ = {}, VULKAN_HPP_NAMESPACE::Offset2D origin_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , tileSize{ tileSize_ } , apronSize{ apronSize_ } , origin{ origin_ } { } VULKAN_HPP_CONSTEXPR TilePropertiesQCOM( TilePropertiesQCOM const & rhs ) VULKAN_HPP_NOEXCEPT = default; TilePropertiesQCOM( VkTilePropertiesQCOM const & rhs ) VULKAN_HPP_NOEXCEPT : TilePropertiesQCOM( *reinterpret_cast( &rhs ) ) {} TilePropertiesQCOM & operator=( TilePropertiesQCOM const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ TilePropertiesQCOM & operator=( VkTilePropertiesQCOM const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 TilePropertiesQCOM & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 TilePropertiesQCOM & setTileSize( VULKAN_HPP_NAMESPACE::Extent3D const & tileSize_ ) VULKAN_HPP_NOEXCEPT { tileSize = tileSize_; return *this; } VULKAN_HPP_CONSTEXPR_14 TilePropertiesQCOM & setApronSize( VULKAN_HPP_NAMESPACE::Extent2D const & apronSize_ ) VULKAN_HPP_NOEXCEPT { apronSize = apronSize_; return *this; } VULKAN_HPP_CONSTEXPR_14 TilePropertiesQCOM & setOrigin( VULKAN_HPP_NAMESPACE::Offset2D const & origin_ ) VULKAN_HPP_NOEXCEPT { origin = origin_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkTilePropertiesQCOM const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkTilePropertiesQCOM &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, tileSize, apronSize, origin ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( TilePropertiesQCOM const & ) const = default; #else bool operator==( TilePropertiesQCOM const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( tileSize == rhs.tileSize ) && ( apronSize == rhs.apronSize ) && ( origin == rhs.origin ); # endif } bool operator!=( TilePropertiesQCOM const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eTilePropertiesQCOM; void * pNext = {}; VULKAN_HPP_NAMESPACE::Extent3D tileSize = {}; VULKAN_HPP_NAMESPACE::Extent2D apronSize = {}; VULKAN_HPP_NAMESPACE::Offset2D origin = {}; }; template <> struct CppType { using Type = TilePropertiesQCOM; }; struct TimelineSemaphoreSubmitInfo { using NativeType = VkTimelineSemaphoreSubmitInfo; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eTimelineSemaphoreSubmitInfo; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR TimelineSemaphoreSubmitInfo( uint32_t waitSemaphoreValueCount_ = {}, const uint64_t * pWaitSemaphoreValues_ = {}, uint32_t signalSemaphoreValueCount_ = {}, const uint64_t * pSignalSemaphoreValues_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , waitSemaphoreValueCount{ waitSemaphoreValueCount_ } , pWaitSemaphoreValues{ pWaitSemaphoreValues_ } , signalSemaphoreValueCount{ signalSemaphoreValueCount_ } , pSignalSemaphoreValues{ pSignalSemaphoreValues_ } { } VULKAN_HPP_CONSTEXPR TimelineSemaphoreSubmitInfo( TimelineSemaphoreSubmitInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; TimelineSemaphoreSubmitInfo( VkTimelineSemaphoreSubmitInfo const & rhs ) VULKAN_HPP_NOEXCEPT : TimelineSemaphoreSubmitInfo( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) TimelineSemaphoreSubmitInfo( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & waitSemaphoreValues_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & signalSemaphoreValues_ = {}, const void * pNext_ = nullptr ) : pNext( pNext_ ) , waitSemaphoreValueCount( static_cast( waitSemaphoreValues_.size() ) ) , pWaitSemaphoreValues( waitSemaphoreValues_.data() ) , signalSemaphoreValueCount( static_cast( signalSemaphoreValues_.size() ) ) , pSignalSemaphoreValues( signalSemaphoreValues_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ TimelineSemaphoreSubmitInfo & operator=( TimelineSemaphoreSubmitInfo const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ TimelineSemaphoreSubmitInfo & operator=( VkTimelineSemaphoreSubmitInfo const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 TimelineSemaphoreSubmitInfo & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 TimelineSemaphoreSubmitInfo & setWaitSemaphoreValueCount( uint32_t waitSemaphoreValueCount_ ) VULKAN_HPP_NOEXCEPT { waitSemaphoreValueCount = waitSemaphoreValueCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 TimelineSemaphoreSubmitInfo & setPWaitSemaphoreValues( const uint64_t * pWaitSemaphoreValues_ ) VULKAN_HPP_NOEXCEPT { pWaitSemaphoreValues = pWaitSemaphoreValues_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) TimelineSemaphoreSubmitInfo & setWaitSemaphoreValues( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & waitSemaphoreValues_ ) VULKAN_HPP_NOEXCEPT { waitSemaphoreValueCount = static_cast( waitSemaphoreValues_.size() ); pWaitSemaphoreValues = waitSemaphoreValues_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 TimelineSemaphoreSubmitInfo & setSignalSemaphoreValueCount( uint32_t signalSemaphoreValueCount_ ) VULKAN_HPP_NOEXCEPT { signalSemaphoreValueCount = signalSemaphoreValueCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 TimelineSemaphoreSubmitInfo & setPSignalSemaphoreValues( const uint64_t * pSignalSemaphoreValues_ ) VULKAN_HPP_NOEXCEPT { pSignalSemaphoreValues = pSignalSemaphoreValues_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) TimelineSemaphoreSubmitInfo & setSignalSemaphoreValues( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & signalSemaphoreValues_ ) VULKAN_HPP_NOEXCEPT { signalSemaphoreValueCount = static_cast( signalSemaphoreValues_.size() ); pSignalSemaphoreValues = signalSemaphoreValues_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkTimelineSemaphoreSubmitInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkTimelineSemaphoreSubmitInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, waitSemaphoreValueCount, pWaitSemaphoreValues, signalSemaphoreValueCount, pSignalSemaphoreValues ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( TimelineSemaphoreSubmitInfo const & ) const = default; #else bool operator==( TimelineSemaphoreSubmitInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( waitSemaphoreValueCount == rhs.waitSemaphoreValueCount ) && ( pWaitSemaphoreValues == rhs.pWaitSemaphoreValues ) && ( signalSemaphoreValueCount == rhs.signalSemaphoreValueCount ) && ( pSignalSemaphoreValues == rhs.pSignalSemaphoreValues ); # endif } bool operator!=( TimelineSemaphoreSubmitInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eTimelineSemaphoreSubmitInfo; const void * pNext = {}; uint32_t waitSemaphoreValueCount = {}; const uint64_t * pWaitSemaphoreValues = {}; uint32_t signalSemaphoreValueCount = {}; const uint64_t * pSignalSemaphoreValues = {}; }; template <> struct CppType { using Type = TimelineSemaphoreSubmitInfo; }; using TimelineSemaphoreSubmitInfoKHR = TimelineSemaphoreSubmitInfo; struct TraceRaysIndirectCommand2KHR { using NativeType = VkTraceRaysIndirectCommand2KHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR TraceRaysIndirectCommand2KHR( VULKAN_HPP_NAMESPACE::DeviceAddress raygenShaderRecordAddress_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize raygenShaderRecordSize_ = {}, VULKAN_HPP_NAMESPACE::DeviceAddress missShaderBindingTableAddress_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize missShaderBindingTableSize_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize missShaderBindingTableStride_ = {}, VULKAN_HPP_NAMESPACE::DeviceAddress hitShaderBindingTableAddress_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize hitShaderBindingTableSize_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize hitShaderBindingTableStride_ = {}, VULKAN_HPP_NAMESPACE::DeviceAddress callableShaderBindingTableAddress_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize callableShaderBindingTableSize_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize callableShaderBindingTableStride_ = {}, uint32_t width_ = {}, uint32_t height_ = {}, uint32_t depth_ = {} ) VULKAN_HPP_NOEXCEPT : raygenShaderRecordAddress{ raygenShaderRecordAddress_ } , raygenShaderRecordSize{ raygenShaderRecordSize_ } , missShaderBindingTableAddress{ missShaderBindingTableAddress_ } , missShaderBindingTableSize{ missShaderBindingTableSize_ } , missShaderBindingTableStride{ missShaderBindingTableStride_ } , hitShaderBindingTableAddress{ hitShaderBindingTableAddress_ } , hitShaderBindingTableSize{ hitShaderBindingTableSize_ } , hitShaderBindingTableStride{ hitShaderBindingTableStride_ } , callableShaderBindingTableAddress{ callableShaderBindingTableAddress_ } , callableShaderBindingTableSize{ callableShaderBindingTableSize_ } , callableShaderBindingTableStride{ callableShaderBindingTableStride_ } , width{ width_ } , height{ height_ } , depth{ depth_ } { } VULKAN_HPP_CONSTEXPR TraceRaysIndirectCommand2KHR( TraceRaysIndirectCommand2KHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; TraceRaysIndirectCommand2KHR( VkTraceRaysIndirectCommand2KHR const & rhs ) VULKAN_HPP_NOEXCEPT : TraceRaysIndirectCommand2KHR( *reinterpret_cast( &rhs ) ) { } TraceRaysIndirectCommand2KHR & operator=( TraceRaysIndirectCommand2KHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ TraceRaysIndirectCommand2KHR & operator=( VkTraceRaysIndirectCommand2KHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 TraceRaysIndirectCommand2KHR & setRaygenShaderRecordAddress( VULKAN_HPP_NAMESPACE::DeviceAddress raygenShaderRecordAddress_ ) VULKAN_HPP_NOEXCEPT { raygenShaderRecordAddress = raygenShaderRecordAddress_; return *this; } VULKAN_HPP_CONSTEXPR_14 TraceRaysIndirectCommand2KHR & setRaygenShaderRecordSize( VULKAN_HPP_NAMESPACE::DeviceSize raygenShaderRecordSize_ ) VULKAN_HPP_NOEXCEPT { raygenShaderRecordSize = raygenShaderRecordSize_; return *this; } VULKAN_HPP_CONSTEXPR_14 TraceRaysIndirectCommand2KHR & setMissShaderBindingTableAddress( VULKAN_HPP_NAMESPACE::DeviceAddress missShaderBindingTableAddress_ ) VULKAN_HPP_NOEXCEPT { missShaderBindingTableAddress = missShaderBindingTableAddress_; return *this; } VULKAN_HPP_CONSTEXPR_14 TraceRaysIndirectCommand2KHR & setMissShaderBindingTableSize( VULKAN_HPP_NAMESPACE::DeviceSize missShaderBindingTableSize_ ) VULKAN_HPP_NOEXCEPT { missShaderBindingTableSize = missShaderBindingTableSize_; return *this; } VULKAN_HPP_CONSTEXPR_14 TraceRaysIndirectCommand2KHR & setMissShaderBindingTableStride( VULKAN_HPP_NAMESPACE::DeviceSize missShaderBindingTableStride_ ) VULKAN_HPP_NOEXCEPT { missShaderBindingTableStride = missShaderBindingTableStride_; return *this; } VULKAN_HPP_CONSTEXPR_14 TraceRaysIndirectCommand2KHR & setHitShaderBindingTableAddress( VULKAN_HPP_NAMESPACE::DeviceAddress hitShaderBindingTableAddress_ ) VULKAN_HPP_NOEXCEPT { hitShaderBindingTableAddress = hitShaderBindingTableAddress_; return *this; } VULKAN_HPP_CONSTEXPR_14 TraceRaysIndirectCommand2KHR & setHitShaderBindingTableSize( VULKAN_HPP_NAMESPACE::DeviceSize hitShaderBindingTableSize_ ) VULKAN_HPP_NOEXCEPT { hitShaderBindingTableSize = hitShaderBindingTableSize_; return *this; } VULKAN_HPP_CONSTEXPR_14 TraceRaysIndirectCommand2KHR & setHitShaderBindingTableStride( VULKAN_HPP_NAMESPACE::DeviceSize hitShaderBindingTableStride_ ) VULKAN_HPP_NOEXCEPT { hitShaderBindingTableStride = hitShaderBindingTableStride_; return *this; } VULKAN_HPP_CONSTEXPR_14 TraceRaysIndirectCommand2KHR & setCallableShaderBindingTableAddress( VULKAN_HPP_NAMESPACE::DeviceAddress callableShaderBindingTableAddress_ ) VULKAN_HPP_NOEXCEPT { callableShaderBindingTableAddress = callableShaderBindingTableAddress_; return *this; } VULKAN_HPP_CONSTEXPR_14 TraceRaysIndirectCommand2KHR & setCallableShaderBindingTableSize( VULKAN_HPP_NAMESPACE::DeviceSize callableShaderBindingTableSize_ ) VULKAN_HPP_NOEXCEPT { callableShaderBindingTableSize = callableShaderBindingTableSize_; return *this; } VULKAN_HPP_CONSTEXPR_14 TraceRaysIndirectCommand2KHR & setCallableShaderBindingTableStride( VULKAN_HPP_NAMESPACE::DeviceSize callableShaderBindingTableStride_ ) VULKAN_HPP_NOEXCEPT { callableShaderBindingTableStride = callableShaderBindingTableStride_; return *this; } VULKAN_HPP_CONSTEXPR_14 TraceRaysIndirectCommand2KHR & setWidth( uint32_t width_ ) VULKAN_HPP_NOEXCEPT { width = width_; return *this; } VULKAN_HPP_CONSTEXPR_14 TraceRaysIndirectCommand2KHR & setHeight( uint32_t height_ ) VULKAN_HPP_NOEXCEPT { height = height_; return *this; } VULKAN_HPP_CONSTEXPR_14 TraceRaysIndirectCommand2KHR & setDepth( uint32_t depth_ ) VULKAN_HPP_NOEXCEPT { depth = depth_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkTraceRaysIndirectCommand2KHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkTraceRaysIndirectCommand2KHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( raygenShaderRecordAddress, raygenShaderRecordSize, missShaderBindingTableAddress, missShaderBindingTableSize, missShaderBindingTableStride, hitShaderBindingTableAddress, hitShaderBindingTableSize, hitShaderBindingTableStride, callableShaderBindingTableAddress, callableShaderBindingTableSize, callableShaderBindingTableStride, width, height, depth ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( TraceRaysIndirectCommand2KHR const & ) const = default; #else bool operator==( TraceRaysIndirectCommand2KHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( raygenShaderRecordAddress == rhs.raygenShaderRecordAddress ) && ( raygenShaderRecordSize == rhs.raygenShaderRecordSize ) && ( missShaderBindingTableAddress == rhs.missShaderBindingTableAddress ) && ( missShaderBindingTableSize == rhs.missShaderBindingTableSize ) && ( missShaderBindingTableStride == rhs.missShaderBindingTableStride ) && ( hitShaderBindingTableAddress == rhs.hitShaderBindingTableAddress ) && ( hitShaderBindingTableSize == rhs.hitShaderBindingTableSize ) && ( hitShaderBindingTableStride == rhs.hitShaderBindingTableStride ) && ( callableShaderBindingTableAddress == rhs.callableShaderBindingTableAddress ) && ( callableShaderBindingTableSize == rhs.callableShaderBindingTableSize ) && ( callableShaderBindingTableStride == rhs.callableShaderBindingTableStride ) && ( width == rhs.width ) && ( height == rhs.height ) && ( depth == rhs.depth ); # endif } bool operator!=( TraceRaysIndirectCommand2KHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::DeviceAddress raygenShaderRecordAddress = {}; VULKAN_HPP_NAMESPACE::DeviceSize raygenShaderRecordSize = {}; VULKAN_HPP_NAMESPACE::DeviceAddress missShaderBindingTableAddress = {}; VULKAN_HPP_NAMESPACE::DeviceSize missShaderBindingTableSize = {}; VULKAN_HPP_NAMESPACE::DeviceSize missShaderBindingTableStride = {}; VULKAN_HPP_NAMESPACE::DeviceAddress hitShaderBindingTableAddress = {}; VULKAN_HPP_NAMESPACE::DeviceSize hitShaderBindingTableSize = {}; VULKAN_HPP_NAMESPACE::DeviceSize hitShaderBindingTableStride = {}; VULKAN_HPP_NAMESPACE::DeviceAddress callableShaderBindingTableAddress = {}; VULKAN_HPP_NAMESPACE::DeviceSize callableShaderBindingTableSize = {}; VULKAN_HPP_NAMESPACE::DeviceSize callableShaderBindingTableStride = {}; uint32_t width = {}; uint32_t height = {}; uint32_t depth = {}; }; struct TraceRaysIndirectCommandKHR { using NativeType = VkTraceRaysIndirectCommandKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR TraceRaysIndirectCommandKHR( uint32_t width_ = {}, uint32_t height_ = {}, uint32_t depth_ = {} ) VULKAN_HPP_NOEXCEPT : width{ width_ } , height{ height_ } , depth{ depth_ } { } VULKAN_HPP_CONSTEXPR TraceRaysIndirectCommandKHR( TraceRaysIndirectCommandKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; TraceRaysIndirectCommandKHR( VkTraceRaysIndirectCommandKHR const & rhs ) VULKAN_HPP_NOEXCEPT : TraceRaysIndirectCommandKHR( *reinterpret_cast( &rhs ) ) { } explicit TraceRaysIndirectCommandKHR( Extent2D const & extent2D, uint32_t depth_ = {} ) : width( extent2D.width ), height( extent2D.height ), depth( depth_ ) { } TraceRaysIndirectCommandKHR & operator=( TraceRaysIndirectCommandKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ TraceRaysIndirectCommandKHR & operator=( VkTraceRaysIndirectCommandKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 TraceRaysIndirectCommandKHR & setWidth( uint32_t width_ ) VULKAN_HPP_NOEXCEPT { width = width_; return *this; } VULKAN_HPP_CONSTEXPR_14 TraceRaysIndirectCommandKHR & setHeight( uint32_t height_ ) VULKAN_HPP_NOEXCEPT { height = height_; return *this; } VULKAN_HPP_CONSTEXPR_14 TraceRaysIndirectCommandKHR & setDepth( uint32_t depth_ ) VULKAN_HPP_NOEXCEPT { depth = depth_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkTraceRaysIndirectCommandKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkTraceRaysIndirectCommandKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( width, height, depth ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( TraceRaysIndirectCommandKHR const & ) const = default; #else bool operator==( TraceRaysIndirectCommandKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( width == rhs.width ) && ( height == rhs.height ) && ( depth == rhs.depth ); # endif } bool operator!=( TraceRaysIndirectCommandKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: uint32_t width = {}; uint32_t height = {}; uint32_t depth = {}; }; struct ValidationCacheCreateInfoEXT { using NativeType = VkValidationCacheCreateInfoEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eValidationCacheCreateInfoEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ValidationCacheCreateInfoEXT( VULKAN_HPP_NAMESPACE::ValidationCacheCreateFlagsEXT flags_ = {}, size_t initialDataSize_ = {}, const void * pInitialData_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , initialDataSize{ initialDataSize_ } , pInitialData{ pInitialData_ } { } VULKAN_HPP_CONSTEXPR ValidationCacheCreateInfoEXT( ValidationCacheCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; ValidationCacheCreateInfoEXT( VkValidationCacheCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT : ValidationCacheCreateInfoEXT( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) template ValidationCacheCreateInfoEXT( VULKAN_HPP_NAMESPACE::ValidationCacheCreateFlagsEXT flags_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & initialData_, const void * pNext_ = nullptr ) : pNext( pNext_ ), flags( flags_ ), initialDataSize( initialData_.size() * sizeof( T ) ), pInitialData( initialData_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ ValidationCacheCreateInfoEXT & operator=( ValidationCacheCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ValidationCacheCreateInfoEXT & operator=( VkValidationCacheCreateInfoEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ValidationCacheCreateInfoEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ValidationCacheCreateInfoEXT & setFlags( VULKAN_HPP_NAMESPACE::ValidationCacheCreateFlagsEXT flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 ValidationCacheCreateInfoEXT & setInitialDataSize( size_t initialDataSize_ ) VULKAN_HPP_NOEXCEPT { initialDataSize = initialDataSize_; return *this; } VULKAN_HPP_CONSTEXPR_14 ValidationCacheCreateInfoEXT & setPInitialData( const void * pInitialData_ ) VULKAN_HPP_NOEXCEPT { pInitialData = pInitialData_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) template ValidationCacheCreateInfoEXT & setInitialData( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & initialData_ ) VULKAN_HPP_NOEXCEPT { initialDataSize = initialData_.size() * sizeof( T ); pInitialData = initialData_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkValidationCacheCreateInfoEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkValidationCacheCreateInfoEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, initialDataSize, pInitialData ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ValidationCacheCreateInfoEXT const & ) const = default; #else bool operator==( ValidationCacheCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( initialDataSize == rhs.initialDataSize ) && ( pInitialData == rhs.pInitialData ); # endif } bool operator!=( ValidationCacheCreateInfoEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eValidationCacheCreateInfoEXT; const void * pNext = {}; VULKAN_HPP_NAMESPACE::ValidationCacheCreateFlagsEXT flags = {}; size_t initialDataSize = {}; const void * pInitialData = {}; }; template <> struct CppType { using Type = ValidationCacheCreateInfoEXT; }; struct ValidationFeaturesEXT { using NativeType = VkValidationFeaturesEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eValidationFeaturesEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ValidationFeaturesEXT( uint32_t enabledValidationFeatureCount_ = {}, const VULKAN_HPP_NAMESPACE::ValidationFeatureEnableEXT * pEnabledValidationFeatures_ = {}, uint32_t disabledValidationFeatureCount_ = {}, const VULKAN_HPP_NAMESPACE::ValidationFeatureDisableEXT * pDisabledValidationFeatures_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , enabledValidationFeatureCount{ enabledValidationFeatureCount_ } , pEnabledValidationFeatures{ pEnabledValidationFeatures_ } , disabledValidationFeatureCount{ disabledValidationFeatureCount_ } , pDisabledValidationFeatures{ pDisabledValidationFeatures_ } { } VULKAN_HPP_CONSTEXPR ValidationFeaturesEXT( ValidationFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; ValidationFeaturesEXT( VkValidationFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT : ValidationFeaturesEXT( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) ValidationFeaturesEXT( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & enabledValidationFeatures_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & disabledValidationFeatures_ = {}, const void * pNext_ = nullptr ) : pNext( pNext_ ) , enabledValidationFeatureCount( static_cast( enabledValidationFeatures_.size() ) ) , pEnabledValidationFeatures( enabledValidationFeatures_.data() ) , disabledValidationFeatureCount( static_cast( disabledValidationFeatures_.size() ) ) , pDisabledValidationFeatures( disabledValidationFeatures_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ ValidationFeaturesEXT & operator=( ValidationFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ValidationFeaturesEXT & operator=( VkValidationFeaturesEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ValidationFeaturesEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ValidationFeaturesEXT & setEnabledValidationFeatureCount( uint32_t enabledValidationFeatureCount_ ) VULKAN_HPP_NOEXCEPT { enabledValidationFeatureCount = enabledValidationFeatureCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 ValidationFeaturesEXT & setPEnabledValidationFeatures( const VULKAN_HPP_NAMESPACE::ValidationFeatureEnableEXT * pEnabledValidationFeatures_ ) VULKAN_HPP_NOEXCEPT { pEnabledValidationFeatures = pEnabledValidationFeatures_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) ValidationFeaturesEXT & setEnabledValidationFeatures( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & enabledValidationFeatures_ ) VULKAN_HPP_NOEXCEPT { enabledValidationFeatureCount = static_cast( enabledValidationFeatures_.size() ); pEnabledValidationFeatures = enabledValidationFeatures_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 ValidationFeaturesEXT & setDisabledValidationFeatureCount( uint32_t disabledValidationFeatureCount_ ) VULKAN_HPP_NOEXCEPT { disabledValidationFeatureCount = disabledValidationFeatureCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 ValidationFeaturesEXT & setPDisabledValidationFeatures( const VULKAN_HPP_NAMESPACE::ValidationFeatureDisableEXT * pDisabledValidationFeatures_ ) VULKAN_HPP_NOEXCEPT { pDisabledValidationFeatures = pDisabledValidationFeatures_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) ValidationFeaturesEXT & setDisabledValidationFeatures( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & disabledValidationFeatures_ ) VULKAN_HPP_NOEXCEPT { disabledValidationFeatureCount = static_cast( disabledValidationFeatures_.size() ); pDisabledValidationFeatures = disabledValidationFeatures_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkValidationFeaturesEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkValidationFeaturesEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, enabledValidationFeatureCount, pEnabledValidationFeatures, disabledValidationFeatureCount, pDisabledValidationFeatures ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ValidationFeaturesEXT const & ) const = default; #else bool operator==( ValidationFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( enabledValidationFeatureCount == rhs.enabledValidationFeatureCount ) && ( pEnabledValidationFeatures == rhs.pEnabledValidationFeatures ) && ( disabledValidationFeatureCount == rhs.disabledValidationFeatureCount ) && ( pDisabledValidationFeatures == rhs.pDisabledValidationFeatures ); # endif } bool operator!=( ValidationFeaturesEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eValidationFeaturesEXT; const void * pNext = {}; uint32_t enabledValidationFeatureCount = {}; const VULKAN_HPP_NAMESPACE::ValidationFeatureEnableEXT * pEnabledValidationFeatures = {}; uint32_t disabledValidationFeatureCount = {}; const VULKAN_HPP_NAMESPACE::ValidationFeatureDisableEXT * pDisabledValidationFeatures = {}; }; template <> struct CppType { using Type = ValidationFeaturesEXT; }; struct ValidationFlagsEXT { using NativeType = VkValidationFlagsEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eValidationFlagsEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ValidationFlagsEXT( uint32_t disabledValidationCheckCount_ = {}, const VULKAN_HPP_NAMESPACE::ValidationCheckEXT * pDisabledValidationChecks_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , disabledValidationCheckCount{ disabledValidationCheckCount_ } , pDisabledValidationChecks{ pDisabledValidationChecks_ } { } VULKAN_HPP_CONSTEXPR ValidationFlagsEXT( ValidationFlagsEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; ValidationFlagsEXT( VkValidationFlagsEXT const & rhs ) VULKAN_HPP_NOEXCEPT : ValidationFlagsEXT( *reinterpret_cast( &rhs ) ) {} # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) ValidationFlagsEXT( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & disabledValidationChecks_, const void * pNext_ = nullptr ) : pNext( pNext_ ) , disabledValidationCheckCount( static_cast( disabledValidationChecks_.size() ) ) , pDisabledValidationChecks( disabledValidationChecks_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ ValidationFlagsEXT & operator=( ValidationFlagsEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ValidationFlagsEXT & operator=( VkValidationFlagsEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ValidationFlagsEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ValidationFlagsEXT & setDisabledValidationCheckCount( uint32_t disabledValidationCheckCount_ ) VULKAN_HPP_NOEXCEPT { disabledValidationCheckCount = disabledValidationCheckCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 ValidationFlagsEXT & setPDisabledValidationChecks( const VULKAN_HPP_NAMESPACE::ValidationCheckEXT * pDisabledValidationChecks_ ) VULKAN_HPP_NOEXCEPT { pDisabledValidationChecks = pDisabledValidationChecks_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) ValidationFlagsEXT & setDisabledValidationChecks( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & disabledValidationChecks_ ) VULKAN_HPP_NOEXCEPT { disabledValidationCheckCount = static_cast( disabledValidationChecks_.size() ); pDisabledValidationChecks = disabledValidationChecks_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkValidationFlagsEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkValidationFlagsEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, disabledValidationCheckCount, pDisabledValidationChecks ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ValidationFlagsEXT const & ) const = default; #else bool operator==( ValidationFlagsEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( disabledValidationCheckCount == rhs.disabledValidationCheckCount ) && ( pDisabledValidationChecks == rhs.pDisabledValidationChecks ); # endif } bool operator!=( ValidationFlagsEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eValidationFlagsEXT; const void * pNext = {}; uint32_t disabledValidationCheckCount = {}; const VULKAN_HPP_NAMESPACE::ValidationCheckEXT * pDisabledValidationChecks = {}; }; template <> struct CppType { using Type = ValidationFlagsEXT; }; struct VertexInputAttributeDescription2EXT { using NativeType = VkVertexInputAttributeDescription2EXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVertexInputAttributeDescription2EXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VertexInputAttributeDescription2EXT( uint32_t location_ = {}, uint32_t binding_ = {}, VULKAN_HPP_NAMESPACE::Format format_ = VULKAN_HPP_NAMESPACE::Format::eUndefined, uint32_t offset_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , location{ location_ } , binding{ binding_ } , format{ format_ } , offset{ offset_ } { } VULKAN_HPP_CONSTEXPR VertexInputAttributeDescription2EXT( VertexInputAttributeDescription2EXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; VertexInputAttributeDescription2EXT( VkVertexInputAttributeDescription2EXT const & rhs ) VULKAN_HPP_NOEXCEPT : VertexInputAttributeDescription2EXT( *reinterpret_cast( &rhs ) ) { } VertexInputAttributeDescription2EXT & operator=( VertexInputAttributeDescription2EXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VertexInputAttributeDescription2EXT & operator=( VkVertexInputAttributeDescription2EXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 VertexInputAttributeDescription2EXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 VertexInputAttributeDescription2EXT & setLocation( uint32_t location_ ) VULKAN_HPP_NOEXCEPT { location = location_; return *this; } VULKAN_HPP_CONSTEXPR_14 VertexInputAttributeDescription2EXT & setBinding( uint32_t binding_ ) VULKAN_HPP_NOEXCEPT { binding = binding_; return *this; } VULKAN_HPP_CONSTEXPR_14 VertexInputAttributeDescription2EXT & setFormat( VULKAN_HPP_NAMESPACE::Format format_ ) VULKAN_HPP_NOEXCEPT { format = format_; return *this; } VULKAN_HPP_CONSTEXPR_14 VertexInputAttributeDescription2EXT & setOffset( uint32_t offset_ ) VULKAN_HPP_NOEXCEPT { offset = offset_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkVertexInputAttributeDescription2EXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVertexInputAttributeDescription2EXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, location, binding, format, offset ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( VertexInputAttributeDescription2EXT const & ) const = default; #else bool operator==( VertexInputAttributeDescription2EXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( location == rhs.location ) && ( binding == rhs.binding ) && ( format == rhs.format ) && ( offset == rhs.offset ); # endif } bool operator!=( VertexInputAttributeDescription2EXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVertexInputAttributeDescription2EXT; void * pNext = {}; uint32_t location = {}; uint32_t binding = {}; VULKAN_HPP_NAMESPACE::Format format = VULKAN_HPP_NAMESPACE::Format::eUndefined; uint32_t offset = {}; }; template <> struct CppType { using Type = VertexInputAttributeDescription2EXT; }; struct VertexInputBindingDescription2EXT { using NativeType = VkVertexInputBindingDescription2EXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVertexInputBindingDescription2EXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VertexInputBindingDescription2EXT( uint32_t binding_ = {}, uint32_t stride_ = {}, VULKAN_HPP_NAMESPACE::VertexInputRate inputRate_ = VULKAN_HPP_NAMESPACE::VertexInputRate::eVertex, uint32_t divisor_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , binding{ binding_ } , stride{ stride_ } , inputRate{ inputRate_ } , divisor{ divisor_ } { } VULKAN_HPP_CONSTEXPR VertexInputBindingDescription2EXT( VertexInputBindingDescription2EXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; VertexInputBindingDescription2EXT( VkVertexInputBindingDescription2EXT const & rhs ) VULKAN_HPP_NOEXCEPT : VertexInputBindingDescription2EXT( *reinterpret_cast( &rhs ) ) { } VertexInputBindingDescription2EXT & operator=( VertexInputBindingDescription2EXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VertexInputBindingDescription2EXT & operator=( VkVertexInputBindingDescription2EXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 VertexInputBindingDescription2EXT & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 VertexInputBindingDescription2EXT & setBinding( uint32_t binding_ ) VULKAN_HPP_NOEXCEPT { binding = binding_; return *this; } VULKAN_HPP_CONSTEXPR_14 VertexInputBindingDescription2EXT & setStride( uint32_t stride_ ) VULKAN_HPP_NOEXCEPT { stride = stride_; return *this; } VULKAN_HPP_CONSTEXPR_14 VertexInputBindingDescription2EXT & setInputRate( VULKAN_HPP_NAMESPACE::VertexInputRate inputRate_ ) VULKAN_HPP_NOEXCEPT { inputRate = inputRate_; return *this; } VULKAN_HPP_CONSTEXPR_14 VertexInputBindingDescription2EXT & setDivisor( uint32_t divisor_ ) VULKAN_HPP_NOEXCEPT { divisor = divisor_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkVertexInputBindingDescription2EXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVertexInputBindingDescription2EXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, binding, stride, inputRate, divisor ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( VertexInputBindingDescription2EXT const & ) const = default; #else bool operator==( VertexInputBindingDescription2EXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( binding == rhs.binding ) && ( stride == rhs.stride ) && ( inputRate == rhs.inputRate ) && ( divisor == rhs.divisor ); # endif } bool operator!=( VertexInputBindingDescription2EXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVertexInputBindingDescription2EXT; void * pNext = {}; uint32_t binding = {}; uint32_t stride = {}; VULKAN_HPP_NAMESPACE::VertexInputRate inputRate = VULKAN_HPP_NAMESPACE::VertexInputRate::eVertex; uint32_t divisor = {}; }; template <> struct CppType { using Type = VertexInputBindingDescription2EXT; }; #if defined( VK_USE_PLATFORM_VI_NN ) struct ViSurfaceCreateInfoNN { using NativeType = VkViSurfaceCreateInfoNN; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eViSurfaceCreateInfoNN; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR ViSurfaceCreateInfoNN( VULKAN_HPP_NAMESPACE::ViSurfaceCreateFlagsNN flags_ = {}, void * window_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , window{ window_ } { } VULKAN_HPP_CONSTEXPR ViSurfaceCreateInfoNN( ViSurfaceCreateInfoNN const & rhs ) VULKAN_HPP_NOEXCEPT = default; ViSurfaceCreateInfoNN( VkViSurfaceCreateInfoNN const & rhs ) VULKAN_HPP_NOEXCEPT : ViSurfaceCreateInfoNN( *reinterpret_cast( &rhs ) ) { } ViSurfaceCreateInfoNN & operator=( ViSurfaceCreateInfoNN const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ ViSurfaceCreateInfoNN & operator=( VkViSurfaceCreateInfoNN const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } # if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 ViSurfaceCreateInfoNN & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 ViSurfaceCreateInfoNN & setFlags( VULKAN_HPP_NAMESPACE::ViSurfaceCreateFlagsNN flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 ViSurfaceCreateInfoNN & setWindow( void * window_ ) VULKAN_HPP_NOEXCEPT { window = window_; return *this; } # endif /*VULKAN_HPP_NO_SETTERS*/ operator VkViSurfaceCreateInfoNN const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkViSurfaceCreateInfoNN &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, window ); } # endif # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( ViSurfaceCreateInfoNN const & ) const = default; # else bool operator==( ViSurfaceCreateInfoNN const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( window == rhs.window ); # endif } bool operator!=( ViSurfaceCreateInfoNN const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } # endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eViSurfaceCreateInfoNN; const void * pNext = {}; VULKAN_HPP_NAMESPACE::ViSurfaceCreateFlagsNN flags = {}; void * window = {}; }; template <> struct CppType { using Type = ViSurfaceCreateInfoNN; }; #endif /*VK_USE_PLATFORM_VI_NN*/ struct VideoPictureResourceInfoKHR { using NativeType = VkVideoPictureResourceInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoPictureResourceInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoPictureResourceInfoKHR( VULKAN_HPP_NAMESPACE::Offset2D codedOffset_ = {}, VULKAN_HPP_NAMESPACE::Extent2D codedExtent_ = {}, uint32_t baseArrayLayer_ = {}, VULKAN_HPP_NAMESPACE::ImageView imageViewBinding_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , codedOffset{ codedOffset_ } , codedExtent{ codedExtent_ } , baseArrayLayer{ baseArrayLayer_ } , imageViewBinding{ imageViewBinding_ } { } VULKAN_HPP_CONSTEXPR VideoPictureResourceInfoKHR( VideoPictureResourceInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoPictureResourceInfoKHR( VkVideoPictureResourceInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoPictureResourceInfoKHR( *reinterpret_cast( &rhs ) ) { } VideoPictureResourceInfoKHR & operator=( VideoPictureResourceInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoPictureResourceInfoKHR & operator=( VkVideoPictureResourceInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 VideoPictureResourceInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoPictureResourceInfoKHR & setCodedOffset( VULKAN_HPP_NAMESPACE::Offset2D const & codedOffset_ ) VULKAN_HPP_NOEXCEPT { codedOffset = codedOffset_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoPictureResourceInfoKHR & setCodedExtent( VULKAN_HPP_NAMESPACE::Extent2D const & codedExtent_ ) VULKAN_HPP_NOEXCEPT { codedExtent = codedExtent_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoPictureResourceInfoKHR & setBaseArrayLayer( uint32_t baseArrayLayer_ ) VULKAN_HPP_NOEXCEPT { baseArrayLayer = baseArrayLayer_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoPictureResourceInfoKHR & setImageViewBinding( VULKAN_HPP_NAMESPACE::ImageView imageViewBinding_ ) VULKAN_HPP_NOEXCEPT { imageViewBinding = imageViewBinding_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkVideoPictureResourceInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoPictureResourceInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, codedOffset, codedExtent, baseArrayLayer, imageViewBinding ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( VideoPictureResourceInfoKHR const & ) const = default; #else bool operator==( VideoPictureResourceInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( codedOffset == rhs.codedOffset ) && ( codedExtent == rhs.codedExtent ) && ( baseArrayLayer == rhs.baseArrayLayer ) && ( imageViewBinding == rhs.imageViewBinding ); # endif } bool operator!=( VideoPictureResourceInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoPictureResourceInfoKHR; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Offset2D codedOffset = {}; VULKAN_HPP_NAMESPACE::Extent2D codedExtent = {}; uint32_t baseArrayLayer = {}; VULKAN_HPP_NAMESPACE::ImageView imageViewBinding = {}; }; template <> struct CppType { using Type = VideoPictureResourceInfoKHR; }; struct VideoReferenceSlotInfoKHR { using NativeType = VkVideoReferenceSlotInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoReferenceSlotInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoReferenceSlotInfoKHR( int32_t slotIndex_ = {}, const VULKAN_HPP_NAMESPACE::VideoPictureResourceInfoKHR * pPictureResource_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , slotIndex{ slotIndex_ } , pPictureResource{ pPictureResource_ } { } VULKAN_HPP_CONSTEXPR VideoReferenceSlotInfoKHR( VideoReferenceSlotInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoReferenceSlotInfoKHR( VkVideoReferenceSlotInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoReferenceSlotInfoKHR( *reinterpret_cast( &rhs ) ) { } VideoReferenceSlotInfoKHR & operator=( VideoReferenceSlotInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoReferenceSlotInfoKHR & operator=( VkVideoReferenceSlotInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 VideoReferenceSlotInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoReferenceSlotInfoKHR & setSlotIndex( int32_t slotIndex_ ) VULKAN_HPP_NOEXCEPT { slotIndex = slotIndex_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoReferenceSlotInfoKHR & setPPictureResource( const VULKAN_HPP_NAMESPACE::VideoPictureResourceInfoKHR * pPictureResource_ ) VULKAN_HPP_NOEXCEPT { pPictureResource = pPictureResource_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkVideoReferenceSlotInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoReferenceSlotInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, slotIndex, pPictureResource ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( VideoReferenceSlotInfoKHR const & ) const = default; #else bool operator==( VideoReferenceSlotInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( slotIndex == rhs.slotIndex ) && ( pPictureResource == rhs.pPictureResource ); # endif } bool operator!=( VideoReferenceSlotInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoReferenceSlotInfoKHR; const void * pNext = {}; int32_t slotIndex = {}; const VULKAN_HPP_NAMESPACE::VideoPictureResourceInfoKHR * pPictureResource = {}; }; template <> struct CppType { using Type = VideoReferenceSlotInfoKHR; }; struct VideoBeginCodingInfoKHR { using NativeType = VkVideoBeginCodingInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoBeginCodingInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoBeginCodingInfoKHR( VULKAN_HPP_NAMESPACE::VideoBeginCodingFlagsKHR flags_ = {}, VULKAN_HPP_NAMESPACE::VideoSessionKHR videoSession_ = {}, VULKAN_HPP_NAMESPACE::VideoSessionParametersKHR videoSessionParameters_ = {}, uint32_t referenceSlotCount_ = {}, const VULKAN_HPP_NAMESPACE::VideoReferenceSlotInfoKHR * pReferenceSlots_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , videoSession{ videoSession_ } , videoSessionParameters{ videoSessionParameters_ } , referenceSlotCount{ referenceSlotCount_ } , pReferenceSlots{ pReferenceSlots_ } { } VULKAN_HPP_CONSTEXPR VideoBeginCodingInfoKHR( VideoBeginCodingInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoBeginCodingInfoKHR( VkVideoBeginCodingInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoBeginCodingInfoKHR( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) VideoBeginCodingInfoKHR( VULKAN_HPP_NAMESPACE::VideoBeginCodingFlagsKHR flags_, VULKAN_HPP_NAMESPACE::VideoSessionKHR videoSession_, VULKAN_HPP_NAMESPACE::VideoSessionParametersKHR videoSessionParameters_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & referenceSlots_, const void * pNext_ = nullptr ) : pNext( pNext_ ) , flags( flags_ ) , videoSession( videoSession_ ) , videoSessionParameters( videoSessionParameters_ ) , referenceSlotCount( static_cast( referenceSlots_.size() ) ) , pReferenceSlots( referenceSlots_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VideoBeginCodingInfoKHR & operator=( VideoBeginCodingInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoBeginCodingInfoKHR & operator=( VkVideoBeginCodingInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 VideoBeginCodingInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoBeginCodingInfoKHR & setFlags( VULKAN_HPP_NAMESPACE::VideoBeginCodingFlagsKHR flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoBeginCodingInfoKHR & setVideoSession( VULKAN_HPP_NAMESPACE::VideoSessionKHR videoSession_ ) VULKAN_HPP_NOEXCEPT { videoSession = videoSession_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoBeginCodingInfoKHR & setVideoSessionParameters( VULKAN_HPP_NAMESPACE::VideoSessionParametersKHR videoSessionParameters_ ) VULKAN_HPP_NOEXCEPT { videoSessionParameters = videoSessionParameters_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoBeginCodingInfoKHR & setReferenceSlotCount( uint32_t referenceSlotCount_ ) VULKAN_HPP_NOEXCEPT { referenceSlotCount = referenceSlotCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoBeginCodingInfoKHR & setPReferenceSlots( const VULKAN_HPP_NAMESPACE::VideoReferenceSlotInfoKHR * pReferenceSlots_ ) VULKAN_HPP_NOEXCEPT { pReferenceSlots = pReferenceSlots_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) VideoBeginCodingInfoKHR & setReferenceSlots( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & referenceSlots_ ) VULKAN_HPP_NOEXCEPT { referenceSlotCount = static_cast( referenceSlots_.size() ); pReferenceSlots = referenceSlots_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkVideoBeginCodingInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoBeginCodingInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, videoSession, videoSessionParameters, referenceSlotCount, pReferenceSlots ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( VideoBeginCodingInfoKHR const & ) const = default; #else bool operator==( VideoBeginCodingInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( videoSession == rhs.videoSession ) && ( videoSessionParameters == rhs.videoSessionParameters ) && ( referenceSlotCount == rhs.referenceSlotCount ) && ( pReferenceSlots == rhs.pReferenceSlots ); # endif } bool operator!=( VideoBeginCodingInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoBeginCodingInfoKHR; const void * pNext = {}; VULKAN_HPP_NAMESPACE::VideoBeginCodingFlagsKHR flags = {}; VULKAN_HPP_NAMESPACE::VideoSessionKHR videoSession = {}; VULKAN_HPP_NAMESPACE::VideoSessionParametersKHR videoSessionParameters = {}; uint32_t referenceSlotCount = {}; const VULKAN_HPP_NAMESPACE::VideoReferenceSlotInfoKHR * pReferenceSlots = {}; }; template <> struct CppType { using Type = VideoBeginCodingInfoKHR; }; struct VideoCapabilitiesKHR { using NativeType = VkVideoCapabilitiesKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoCapabilitiesKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 VideoCapabilitiesKHR( VULKAN_HPP_NAMESPACE::VideoCapabilityFlagsKHR flags_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize minBitstreamBufferOffsetAlignment_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize minBitstreamBufferSizeAlignment_ = {}, VULKAN_HPP_NAMESPACE::Extent2D pictureAccessGranularity_ = {}, VULKAN_HPP_NAMESPACE::Extent2D minCodedExtent_ = {}, VULKAN_HPP_NAMESPACE::Extent2D maxCodedExtent_ = {}, uint32_t maxDpbSlots_ = {}, uint32_t maxActiveReferencePictures_ = {}, VULKAN_HPP_NAMESPACE::ExtensionProperties stdHeaderVersion_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , minBitstreamBufferOffsetAlignment{ minBitstreamBufferOffsetAlignment_ } , minBitstreamBufferSizeAlignment{ minBitstreamBufferSizeAlignment_ } , pictureAccessGranularity{ pictureAccessGranularity_ } , minCodedExtent{ minCodedExtent_ } , maxCodedExtent{ maxCodedExtent_ } , maxDpbSlots{ maxDpbSlots_ } , maxActiveReferencePictures{ maxActiveReferencePictures_ } , stdHeaderVersion{ stdHeaderVersion_ } { } VULKAN_HPP_CONSTEXPR_14 VideoCapabilitiesKHR( VideoCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoCapabilitiesKHR( VkVideoCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoCapabilitiesKHR( *reinterpret_cast( &rhs ) ) { } VideoCapabilitiesKHR & operator=( VideoCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoCapabilitiesKHR & operator=( VkVideoCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkVideoCapabilitiesKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoCapabilitiesKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, minBitstreamBufferOffsetAlignment, minBitstreamBufferSizeAlignment, pictureAccessGranularity, minCodedExtent, maxCodedExtent, maxDpbSlots, maxActiveReferencePictures, stdHeaderVersion ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( VideoCapabilitiesKHR const & ) const = default; #else bool operator==( VideoCapabilitiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( minBitstreamBufferOffsetAlignment == rhs.minBitstreamBufferOffsetAlignment ) && ( minBitstreamBufferSizeAlignment == rhs.minBitstreamBufferSizeAlignment ) && ( pictureAccessGranularity == rhs.pictureAccessGranularity ) && ( minCodedExtent == rhs.minCodedExtent ) && ( maxCodedExtent == rhs.maxCodedExtent ) && ( maxDpbSlots == rhs.maxDpbSlots ) && ( maxActiveReferencePictures == rhs.maxActiveReferencePictures ) && ( stdHeaderVersion == rhs.stdHeaderVersion ); # endif } bool operator!=( VideoCapabilitiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoCapabilitiesKHR; void * pNext = {}; VULKAN_HPP_NAMESPACE::VideoCapabilityFlagsKHR flags = {}; VULKAN_HPP_NAMESPACE::DeviceSize minBitstreamBufferOffsetAlignment = {}; VULKAN_HPP_NAMESPACE::DeviceSize minBitstreamBufferSizeAlignment = {}; VULKAN_HPP_NAMESPACE::Extent2D pictureAccessGranularity = {}; VULKAN_HPP_NAMESPACE::Extent2D minCodedExtent = {}; VULKAN_HPP_NAMESPACE::Extent2D maxCodedExtent = {}; uint32_t maxDpbSlots = {}; uint32_t maxActiveReferencePictures = {}; VULKAN_HPP_NAMESPACE::ExtensionProperties stdHeaderVersion = {}; }; template <> struct CppType { using Type = VideoCapabilitiesKHR; }; struct VideoCodingControlInfoKHR { using NativeType = VkVideoCodingControlInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoCodingControlInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoCodingControlInfoKHR( VULKAN_HPP_NAMESPACE::VideoCodingControlFlagsKHR flags_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } { } VULKAN_HPP_CONSTEXPR VideoCodingControlInfoKHR( VideoCodingControlInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoCodingControlInfoKHR( VkVideoCodingControlInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoCodingControlInfoKHR( *reinterpret_cast( &rhs ) ) { } VideoCodingControlInfoKHR & operator=( VideoCodingControlInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoCodingControlInfoKHR & operator=( VkVideoCodingControlInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 VideoCodingControlInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoCodingControlInfoKHR & setFlags( VULKAN_HPP_NAMESPACE::VideoCodingControlFlagsKHR flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkVideoCodingControlInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoCodingControlInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( VideoCodingControlInfoKHR const & ) const = default; #else bool operator==( VideoCodingControlInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ); # endif } bool operator!=( VideoCodingControlInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoCodingControlInfoKHR; const void * pNext = {}; VULKAN_HPP_NAMESPACE::VideoCodingControlFlagsKHR flags = {}; }; template <> struct CppType { using Type = VideoCodingControlInfoKHR; }; struct VideoDecodeAV1CapabilitiesKHR { using NativeType = VkVideoDecodeAV1CapabilitiesKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoDecodeAv1CapabilitiesKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoDecodeAV1CapabilitiesKHR( StdVideoAV1Level maxLevel_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , maxLevel{ maxLevel_ } { } VULKAN_HPP_CONSTEXPR VideoDecodeAV1CapabilitiesKHR( VideoDecodeAV1CapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoDecodeAV1CapabilitiesKHR( VkVideoDecodeAV1CapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoDecodeAV1CapabilitiesKHR( *reinterpret_cast( &rhs ) ) { } VideoDecodeAV1CapabilitiesKHR & operator=( VideoDecodeAV1CapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoDecodeAV1CapabilitiesKHR & operator=( VkVideoDecodeAV1CapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkVideoDecodeAV1CapabilitiesKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoDecodeAV1CapabilitiesKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, maxLevel ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) std::strong_ordering operator<=>( VideoDecodeAV1CapabilitiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { if ( auto cmp = sType <=> rhs.sType; cmp != 0 ) return cmp; if ( auto cmp = pNext <=> rhs.pNext; cmp != 0 ) return cmp; if ( auto cmp = memcmp( &maxLevel, &rhs.maxLevel, sizeof( StdVideoAV1Level ) ); cmp != 0 ) return ( cmp < 0 ) ? std::strong_ordering::less : std::strong_ordering::greater; return std::strong_ordering::equivalent; } #endif bool operator==( VideoDecodeAV1CapabilitiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( memcmp( &maxLevel, &rhs.maxLevel, sizeof( StdVideoAV1Level ) ) == 0 ); } bool operator!=( VideoDecodeAV1CapabilitiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoDecodeAv1CapabilitiesKHR; void * pNext = {}; StdVideoAV1Level maxLevel = {}; }; template <> struct CppType { using Type = VideoDecodeAV1CapabilitiesKHR; }; struct VideoDecodeAV1DpbSlotInfoKHR { using NativeType = VkVideoDecodeAV1DpbSlotInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoDecodeAv1DpbSlotInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoDecodeAV1DpbSlotInfoKHR( const StdVideoDecodeAV1ReferenceInfo * pStdReferenceInfo_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , pStdReferenceInfo{ pStdReferenceInfo_ } { } VULKAN_HPP_CONSTEXPR VideoDecodeAV1DpbSlotInfoKHR( VideoDecodeAV1DpbSlotInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoDecodeAV1DpbSlotInfoKHR( VkVideoDecodeAV1DpbSlotInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoDecodeAV1DpbSlotInfoKHR( *reinterpret_cast( &rhs ) ) { } VideoDecodeAV1DpbSlotInfoKHR & operator=( VideoDecodeAV1DpbSlotInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoDecodeAV1DpbSlotInfoKHR & operator=( VkVideoDecodeAV1DpbSlotInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 VideoDecodeAV1DpbSlotInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoDecodeAV1DpbSlotInfoKHR & setPStdReferenceInfo( const StdVideoDecodeAV1ReferenceInfo * pStdReferenceInfo_ ) VULKAN_HPP_NOEXCEPT { pStdReferenceInfo = pStdReferenceInfo_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkVideoDecodeAV1DpbSlotInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoDecodeAV1DpbSlotInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, pStdReferenceInfo ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( VideoDecodeAV1DpbSlotInfoKHR const & ) const = default; #else bool operator==( VideoDecodeAV1DpbSlotInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( pStdReferenceInfo == rhs.pStdReferenceInfo ); # endif } bool operator!=( VideoDecodeAV1DpbSlotInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoDecodeAv1DpbSlotInfoKHR; const void * pNext = {}; const StdVideoDecodeAV1ReferenceInfo * pStdReferenceInfo = {}; }; template <> struct CppType { using Type = VideoDecodeAV1DpbSlotInfoKHR; }; struct VideoDecodeAV1InlineSessionParametersInfoKHR { using NativeType = VkVideoDecodeAV1InlineSessionParametersInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoDecodeAv1InlineSessionParametersInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoDecodeAV1InlineSessionParametersInfoKHR( const StdVideoAV1SequenceHeader * pStdSequenceHeader_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , pStdSequenceHeader{ pStdSequenceHeader_ } { } VULKAN_HPP_CONSTEXPR VideoDecodeAV1InlineSessionParametersInfoKHR( VideoDecodeAV1InlineSessionParametersInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoDecodeAV1InlineSessionParametersInfoKHR( VkVideoDecodeAV1InlineSessionParametersInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoDecodeAV1InlineSessionParametersInfoKHR( *reinterpret_cast( &rhs ) ) { } VideoDecodeAV1InlineSessionParametersInfoKHR & operator=( VideoDecodeAV1InlineSessionParametersInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoDecodeAV1InlineSessionParametersInfoKHR & operator=( VkVideoDecodeAV1InlineSessionParametersInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 VideoDecodeAV1InlineSessionParametersInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoDecodeAV1InlineSessionParametersInfoKHR & setPStdSequenceHeader( const StdVideoAV1SequenceHeader * pStdSequenceHeader_ ) VULKAN_HPP_NOEXCEPT { pStdSequenceHeader = pStdSequenceHeader_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkVideoDecodeAV1InlineSessionParametersInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoDecodeAV1InlineSessionParametersInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, pStdSequenceHeader ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( VideoDecodeAV1InlineSessionParametersInfoKHR const & ) const = default; #else bool operator==( VideoDecodeAV1InlineSessionParametersInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( pStdSequenceHeader == rhs.pStdSequenceHeader ); # endif } bool operator!=( VideoDecodeAV1InlineSessionParametersInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoDecodeAv1InlineSessionParametersInfoKHR; const void * pNext = {}; const StdVideoAV1SequenceHeader * pStdSequenceHeader = {}; }; template <> struct CppType { using Type = VideoDecodeAV1InlineSessionParametersInfoKHR; }; struct VideoDecodeAV1PictureInfoKHR { using NativeType = VkVideoDecodeAV1PictureInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoDecodeAv1PictureInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 VideoDecodeAV1PictureInfoKHR( const StdVideoDecodeAV1PictureInfo * pStdPictureInfo_ = {}, std::array const & referenceNameSlotIndices_ = {}, uint32_t frameHeaderOffset_ = {}, uint32_t tileCount_ = {}, const uint32_t * pTileOffsets_ = {}, const uint32_t * pTileSizes_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , pStdPictureInfo{ pStdPictureInfo_ } , referenceNameSlotIndices{ referenceNameSlotIndices_ } , frameHeaderOffset{ frameHeaderOffset_ } , tileCount{ tileCount_ } , pTileOffsets{ pTileOffsets_ } , pTileSizes{ pTileSizes_ } { } VULKAN_HPP_CONSTEXPR_14 VideoDecodeAV1PictureInfoKHR( VideoDecodeAV1PictureInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoDecodeAV1PictureInfoKHR( VkVideoDecodeAV1PictureInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoDecodeAV1PictureInfoKHR( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) VideoDecodeAV1PictureInfoKHR( const StdVideoDecodeAV1PictureInfo * pStdPictureInfo_, std::array const & referenceNameSlotIndices_, uint32_t frameHeaderOffset_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & tileOffsets_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & tileSizes_ = {}, const void * pNext_ = nullptr ) : pNext( pNext_ ) , pStdPictureInfo( pStdPictureInfo_ ) , referenceNameSlotIndices( referenceNameSlotIndices_ ) , frameHeaderOffset( frameHeaderOffset_ ) , tileCount( static_cast( tileOffsets_.size() ) ) , pTileOffsets( tileOffsets_.data() ) , pTileSizes( tileSizes_.data() ) { # ifdef VULKAN_HPP_NO_EXCEPTIONS VULKAN_HPP_ASSERT( tileOffsets_.size() == tileSizes_.size() ); # else if ( tileOffsets_.size() != tileSizes_.size() ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::VideoDecodeAV1PictureInfoKHR::VideoDecodeAV1PictureInfoKHR: tileOffsets_.size() != tileSizes_.size()" ); } # endif /*VULKAN_HPP_NO_EXCEPTIONS*/ } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VideoDecodeAV1PictureInfoKHR & operator=( VideoDecodeAV1PictureInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoDecodeAV1PictureInfoKHR & operator=( VkVideoDecodeAV1PictureInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 VideoDecodeAV1PictureInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoDecodeAV1PictureInfoKHR & setPStdPictureInfo( const StdVideoDecodeAV1PictureInfo * pStdPictureInfo_ ) VULKAN_HPP_NOEXCEPT { pStdPictureInfo = pStdPictureInfo_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoDecodeAV1PictureInfoKHR & setReferenceNameSlotIndices( std::array referenceNameSlotIndices_ ) VULKAN_HPP_NOEXCEPT { referenceNameSlotIndices = referenceNameSlotIndices_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoDecodeAV1PictureInfoKHR & setFrameHeaderOffset( uint32_t frameHeaderOffset_ ) VULKAN_HPP_NOEXCEPT { frameHeaderOffset = frameHeaderOffset_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoDecodeAV1PictureInfoKHR & setTileCount( uint32_t tileCount_ ) VULKAN_HPP_NOEXCEPT { tileCount = tileCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoDecodeAV1PictureInfoKHR & setPTileOffsets( const uint32_t * pTileOffsets_ ) VULKAN_HPP_NOEXCEPT { pTileOffsets = pTileOffsets_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) VideoDecodeAV1PictureInfoKHR & setTileOffsets( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & tileOffsets_ ) VULKAN_HPP_NOEXCEPT { tileCount = static_cast( tileOffsets_.size() ); pTileOffsets = tileOffsets_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 VideoDecodeAV1PictureInfoKHR & setPTileSizes( const uint32_t * pTileSizes_ ) VULKAN_HPP_NOEXCEPT { pTileSizes = pTileSizes_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) VideoDecodeAV1PictureInfoKHR & setTileSizes( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & tileSizes_ ) VULKAN_HPP_NOEXCEPT { tileCount = static_cast( tileSizes_.size() ); pTileSizes = tileSizes_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkVideoDecodeAV1PictureInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoDecodeAV1PictureInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple const &, uint32_t const &, uint32_t const &, const uint32_t * const &, const uint32_t * const &> # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, pStdPictureInfo, referenceNameSlotIndices, frameHeaderOffset, tileCount, pTileOffsets, pTileSizes ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( VideoDecodeAV1PictureInfoKHR const & ) const = default; #else bool operator==( VideoDecodeAV1PictureInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( pStdPictureInfo == rhs.pStdPictureInfo ) && ( referenceNameSlotIndices == rhs.referenceNameSlotIndices ) && ( frameHeaderOffset == rhs.frameHeaderOffset ) && ( tileCount == rhs.tileCount ) && ( pTileOffsets == rhs.pTileOffsets ) && ( pTileSizes == rhs.pTileSizes ); # endif } bool operator!=( VideoDecodeAV1PictureInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoDecodeAv1PictureInfoKHR; const void * pNext = {}; const StdVideoDecodeAV1PictureInfo * pStdPictureInfo = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D referenceNameSlotIndices = {}; uint32_t frameHeaderOffset = {}; uint32_t tileCount = {}; const uint32_t * pTileOffsets = {}; const uint32_t * pTileSizes = {}; }; template <> struct CppType { using Type = VideoDecodeAV1PictureInfoKHR; }; struct VideoDecodeAV1ProfileInfoKHR { using NativeType = VkVideoDecodeAV1ProfileInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoDecodeAv1ProfileInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoDecodeAV1ProfileInfoKHR( StdVideoAV1Profile stdProfile_ = {}, VULKAN_HPP_NAMESPACE::Bool32 filmGrainSupport_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , stdProfile{ stdProfile_ } , filmGrainSupport{ filmGrainSupport_ } { } VULKAN_HPP_CONSTEXPR VideoDecodeAV1ProfileInfoKHR( VideoDecodeAV1ProfileInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoDecodeAV1ProfileInfoKHR( VkVideoDecodeAV1ProfileInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoDecodeAV1ProfileInfoKHR( *reinterpret_cast( &rhs ) ) { } VideoDecodeAV1ProfileInfoKHR & operator=( VideoDecodeAV1ProfileInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoDecodeAV1ProfileInfoKHR & operator=( VkVideoDecodeAV1ProfileInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 VideoDecodeAV1ProfileInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoDecodeAV1ProfileInfoKHR & setStdProfile( StdVideoAV1Profile stdProfile_ ) VULKAN_HPP_NOEXCEPT { stdProfile = stdProfile_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoDecodeAV1ProfileInfoKHR & setFilmGrainSupport( VULKAN_HPP_NAMESPACE::Bool32 filmGrainSupport_ ) VULKAN_HPP_NOEXCEPT { filmGrainSupport = filmGrainSupport_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkVideoDecodeAV1ProfileInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoDecodeAV1ProfileInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, stdProfile, filmGrainSupport ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) std::strong_ordering operator<=>( VideoDecodeAV1ProfileInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { if ( auto cmp = sType <=> rhs.sType; cmp != 0 ) return cmp; if ( auto cmp = pNext <=> rhs.pNext; cmp != 0 ) return cmp; if ( auto cmp = memcmp( &stdProfile, &rhs.stdProfile, sizeof( StdVideoAV1Profile ) ); cmp != 0 ) return ( cmp < 0 ) ? std::strong_ordering::less : std::strong_ordering::greater; if ( auto cmp = filmGrainSupport <=> rhs.filmGrainSupport; cmp != 0 ) return cmp; return std::strong_ordering::equivalent; } #endif bool operator==( VideoDecodeAV1ProfileInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( memcmp( &stdProfile, &rhs.stdProfile, sizeof( StdVideoAV1Profile ) ) == 0 ) && ( filmGrainSupport == rhs.filmGrainSupport ); } bool operator!=( VideoDecodeAV1ProfileInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoDecodeAv1ProfileInfoKHR; const void * pNext = {}; StdVideoAV1Profile stdProfile = {}; VULKAN_HPP_NAMESPACE::Bool32 filmGrainSupport = {}; }; template <> struct CppType { using Type = VideoDecodeAV1ProfileInfoKHR; }; struct VideoDecodeAV1SessionParametersCreateInfoKHR { using NativeType = VkVideoDecodeAV1SessionParametersCreateInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoDecodeAv1SessionParametersCreateInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoDecodeAV1SessionParametersCreateInfoKHR( const StdVideoAV1SequenceHeader * pStdSequenceHeader_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , pStdSequenceHeader{ pStdSequenceHeader_ } { } VULKAN_HPP_CONSTEXPR VideoDecodeAV1SessionParametersCreateInfoKHR( VideoDecodeAV1SessionParametersCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoDecodeAV1SessionParametersCreateInfoKHR( VkVideoDecodeAV1SessionParametersCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoDecodeAV1SessionParametersCreateInfoKHR( *reinterpret_cast( &rhs ) ) { } VideoDecodeAV1SessionParametersCreateInfoKHR & operator=( VideoDecodeAV1SessionParametersCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoDecodeAV1SessionParametersCreateInfoKHR & operator=( VkVideoDecodeAV1SessionParametersCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 VideoDecodeAV1SessionParametersCreateInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoDecodeAV1SessionParametersCreateInfoKHR & setPStdSequenceHeader( const StdVideoAV1SequenceHeader * pStdSequenceHeader_ ) VULKAN_HPP_NOEXCEPT { pStdSequenceHeader = pStdSequenceHeader_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkVideoDecodeAV1SessionParametersCreateInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoDecodeAV1SessionParametersCreateInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, pStdSequenceHeader ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( VideoDecodeAV1SessionParametersCreateInfoKHR const & ) const = default; #else bool operator==( VideoDecodeAV1SessionParametersCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( pStdSequenceHeader == rhs.pStdSequenceHeader ); # endif } bool operator!=( VideoDecodeAV1SessionParametersCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoDecodeAv1SessionParametersCreateInfoKHR; const void * pNext = {}; const StdVideoAV1SequenceHeader * pStdSequenceHeader = {}; }; template <> struct CppType { using Type = VideoDecodeAV1SessionParametersCreateInfoKHR; }; struct VideoDecodeCapabilitiesKHR { using NativeType = VkVideoDecodeCapabilitiesKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoDecodeCapabilitiesKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoDecodeCapabilitiesKHR( VULKAN_HPP_NAMESPACE::VideoDecodeCapabilityFlagsKHR flags_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } { } VULKAN_HPP_CONSTEXPR VideoDecodeCapabilitiesKHR( VideoDecodeCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoDecodeCapabilitiesKHR( VkVideoDecodeCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoDecodeCapabilitiesKHR( *reinterpret_cast( &rhs ) ) { } VideoDecodeCapabilitiesKHR & operator=( VideoDecodeCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoDecodeCapabilitiesKHR & operator=( VkVideoDecodeCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkVideoDecodeCapabilitiesKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoDecodeCapabilitiesKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( VideoDecodeCapabilitiesKHR const & ) const = default; #else bool operator==( VideoDecodeCapabilitiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ); # endif } bool operator!=( VideoDecodeCapabilitiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoDecodeCapabilitiesKHR; void * pNext = {}; VULKAN_HPP_NAMESPACE::VideoDecodeCapabilityFlagsKHR flags = {}; }; template <> struct CppType { using Type = VideoDecodeCapabilitiesKHR; }; struct VideoDecodeH264CapabilitiesKHR { using NativeType = VkVideoDecodeH264CapabilitiesKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoDecodeH264CapabilitiesKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoDecodeH264CapabilitiesKHR( StdVideoH264LevelIdc maxLevelIdc_ = {}, VULKAN_HPP_NAMESPACE::Offset2D fieldOffsetGranularity_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , maxLevelIdc{ maxLevelIdc_ } , fieldOffsetGranularity{ fieldOffsetGranularity_ } { } VULKAN_HPP_CONSTEXPR VideoDecodeH264CapabilitiesKHR( VideoDecodeH264CapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoDecodeH264CapabilitiesKHR( VkVideoDecodeH264CapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoDecodeH264CapabilitiesKHR( *reinterpret_cast( &rhs ) ) { } VideoDecodeH264CapabilitiesKHR & operator=( VideoDecodeH264CapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoDecodeH264CapabilitiesKHR & operator=( VkVideoDecodeH264CapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkVideoDecodeH264CapabilitiesKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoDecodeH264CapabilitiesKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, maxLevelIdc, fieldOffsetGranularity ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) std::strong_ordering operator<=>( VideoDecodeH264CapabilitiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { if ( auto cmp = sType <=> rhs.sType; cmp != 0 ) return cmp; if ( auto cmp = pNext <=> rhs.pNext; cmp != 0 ) return cmp; if ( auto cmp = memcmp( &maxLevelIdc, &rhs.maxLevelIdc, sizeof( StdVideoH264LevelIdc ) ); cmp != 0 ) return ( cmp < 0 ) ? std::strong_ordering::less : std::strong_ordering::greater; if ( auto cmp = fieldOffsetGranularity <=> rhs.fieldOffsetGranularity; cmp != 0 ) return cmp; return std::strong_ordering::equivalent; } #endif bool operator==( VideoDecodeH264CapabilitiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( memcmp( &maxLevelIdc, &rhs.maxLevelIdc, sizeof( StdVideoH264LevelIdc ) ) == 0 ) && ( fieldOffsetGranularity == rhs.fieldOffsetGranularity ); } bool operator!=( VideoDecodeH264CapabilitiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoDecodeH264CapabilitiesKHR; void * pNext = {}; StdVideoH264LevelIdc maxLevelIdc = {}; VULKAN_HPP_NAMESPACE::Offset2D fieldOffsetGranularity = {}; }; template <> struct CppType { using Type = VideoDecodeH264CapabilitiesKHR; }; struct VideoDecodeH264DpbSlotInfoKHR { using NativeType = VkVideoDecodeH264DpbSlotInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoDecodeH264DpbSlotInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoDecodeH264DpbSlotInfoKHR( const StdVideoDecodeH264ReferenceInfo * pStdReferenceInfo_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , pStdReferenceInfo{ pStdReferenceInfo_ } { } VULKAN_HPP_CONSTEXPR VideoDecodeH264DpbSlotInfoKHR( VideoDecodeH264DpbSlotInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoDecodeH264DpbSlotInfoKHR( VkVideoDecodeH264DpbSlotInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoDecodeH264DpbSlotInfoKHR( *reinterpret_cast( &rhs ) ) { } VideoDecodeH264DpbSlotInfoKHR & operator=( VideoDecodeH264DpbSlotInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoDecodeH264DpbSlotInfoKHR & operator=( VkVideoDecodeH264DpbSlotInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 VideoDecodeH264DpbSlotInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoDecodeH264DpbSlotInfoKHR & setPStdReferenceInfo( const StdVideoDecodeH264ReferenceInfo * pStdReferenceInfo_ ) VULKAN_HPP_NOEXCEPT { pStdReferenceInfo = pStdReferenceInfo_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkVideoDecodeH264DpbSlotInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoDecodeH264DpbSlotInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, pStdReferenceInfo ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( VideoDecodeH264DpbSlotInfoKHR const & ) const = default; #else bool operator==( VideoDecodeH264DpbSlotInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( pStdReferenceInfo == rhs.pStdReferenceInfo ); # endif } bool operator!=( VideoDecodeH264DpbSlotInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoDecodeH264DpbSlotInfoKHR; const void * pNext = {}; const StdVideoDecodeH264ReferenceInfo * pStdReferenceInfo = {}; }; template <> struct CppType { using Type = VideoDecodeH264DpbSlotInfoKHR; }; struct VideoDecodeH264InlineSessionParametersInfoKHR { using NativeType = VkVideoDecodeH264InlineSessionParametersInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoDecodeH264InlineSessionParametersInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoDecodeH264InlineSessionParametersInfoKHR( const StdVideoH264SequenceParameterSet * pStdSPS_ = {}, const StdVideoH264PictureParameterSet * pStdPPS_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , pStdSPS{ pStdSPS_ } , pStdPPS{ pStdPPS_ } { } VULKAN_HPP_CONSTEXPR VideoDecodeH264InlineSessionParametersInfoKHR( VideoDecodeH264InlineSessionParametersInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoDecodeH264InlineSessionParametersInfoKHR( VkVideoDecodeH264InlineSessionParametersInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoDecodeH264InlineSessionParametersInfoKHR( *reinterpret_cast( &rhs ) ) { } VideoDecodeH264InlineSessionParametersInfoKHR & operator=( VideoDecodeH264InlineSessionParametersInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoDecodeH264InlineSessionParametersInfoKHR & operator=( VkVideoDecodeH264InlineSessionParametersInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 VideoDecodeH264InlineSessionParametersInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoDecodeH264InlineSessionParametersInfoKHR & setPStdSPS( const StdVideoH264SequenceParameterSet * pStdSPS_ ) VULKAN_HPP_NOEXCEPT { pStdSPS = pStdSPS_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoDecodeH264InlineSessionParametersInfoKHR & setPStdPPS( const StdVideoH264PictureParameterSet * pStdPPS_ ) VULKAN_HPP_NOEXCEPT { pStdPPS = pStdPPS_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkVideoDecodeH264InlineSessionParametersInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoDecodeH264InlineSessionParametersInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, pStdSPS, pStdPPS ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( VideoDecodeH264InlineSessionParametersInfoKHR const & ) const = default; #else bool operator==( VideoDecodeH264InlineSessionParametersInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( pStdSPS == rhs.pStdSPS ) && ( pStdPPS == rhs.pStdPPS ); # endif } bool operator!=( VideoDecodeH264InlineSessionParametersInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoDecodeH264InlineSessionParametersInfoKHR; const void * pNext = {}; const StdVideoH264SequenceParameterSet * pStdSPS = {}; const StdVideoH264PictureParameterSet * pStdPPS = {}; }; template <> struct CppType { using Type = VideoDecodeH264InlineSessionParametersInfoKHR; }; struct VideoDecodeH264PictureInfoKHR { using NativeType = VkVideoDecodeH264PictureInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoDecodeH264PictureInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoDecodeH264PictureInfoKHR( const StdVideoDecodeH264PictureInfo * pStdPictureInfo_ = {}, uint32_t sliceCount_ = {}, const uint32_t * pSliceOffsets_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , pStdPictureInfo{ pStdPictureInfo_ } , sliceCount{ sliceCount_ } , pSliceOffsets{ pSliceOffsets_ } { } VULKAN_HPP_CONSTEXPR VideoDecodeH264PictureInfoKHR( VideoDecodeH264PictureInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoDecodeH264PictureInfoKHR( VkVideoDecodeH264PictureInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoDecodeH264PictureInfoKHR( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) VideoDecodeH264PictureInfoKHR( const StdVideoDecodeH264PictureInfo * pStdPictureInfo_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & sliceOffsets_, const void * pNext_ = nullptr ) : pNext( pNext_ ), pStdPictureInfo( pStdPictureInfo_ ), sliceCount( static_cast( sliceOffsets_.size() ) ), pSliceOffsets( sliceOffsets_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VideoDecodeH264PictureInfoKHR & operator=( VideoDecodeH264PictureInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoDecodeH264PictureInfoKHR & operator=( VkVideoDecodeH264PictureInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 VideoDecodeH264PictureInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoDecodeH264PictureInfoKHR & setPStdPictureInfo( const StdVideoDecodeH264PictureInfo * pStdPictureInfo_ ) VULKAN_HPP_NOEXCEPT { pStdPictureInfo = pStdPictureInfo_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoDecodeH264PictureInfoKHR & setSliceCount( uint32_t sliceCount_ ) VULKAN_HPP_NOEXCEPT { sliceCount = sliceCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoDecodeH264PictureInfoKHR & setPSliceOffsets( const uint32_t * pSliceOffsets_ ) VULKAN_HPP_NOEXCEPT { pSliceOffsets = pSliceOffsets_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) VideoDecodeH264PictureInfoKHR & setSliceOffsets( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & sliceOffsets_ ) VULKAN_HPP_NOEXCEPT { sliceCount = static_cast( sliceOffsets_.size() ); pSliceOffsets = sliceOffsets_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkVideoDecodeH264PictureInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoDecodeH264PictureInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, pStdPictureInfo, sliceCount, pSliceOffsets ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( VideoDecodeH264PictureInfoKHR const & ) const = default; #else bool operator==( VideoDecodeH264PictureInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( pStdPictureInfo == rhs.pStdPictureInfo ) && ( sliceCount == rhs.sliceCount ) && ( pSliceOffsets == rhs.pSliceOffsets ); # endif } bool operator!=( VideoDecodeH264PictureInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoDecodeH264PictureInfoKHR; const void * pNext = {}; const StdVideoDecodeH264PictureInfo * pStdPictureInfo = {}; uint32_t sliceCount = {}; const uint32_t * pSliceOffsets = {}; }; template <> struct CppType { using Type = VideoDecodeH264PictureInfoKHR; }; struct VideoDecodeH264ProfileInfoKHR { using NativeType = VkVideoDecodeH264ProfileInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoDecodeH264ProfileInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoDecodeH264ProfileInfoKHR( StdVideoH264ProfileIdc stdProfileIdc_ = {}, VULKAN_HPP_NAMESPACE::VideoDecodeH264PictureLayoutFlagBitsKHR pictureLayout_ = VULKAN_HPP_NAMESPACE::VideoDecodeH264PictureLayoutFlagBitsKHR::eProgressive, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , stdProfileIdc{ stdProfileIdc_ } , pictureLayout{ pictureLayout_ } { } VULKAN_HPP_CONSTEXPR VideoDecodeH264ProfileInfoKHR( VideoDecodeH264ProfileInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoDecodeH264ProfileInfoKHR( VkVideoDecodeH264ProfileInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoDecodeH264ProfileInfoKHR( *reinterpret_cast( &rhs ) ) { } VideoDecodeH264ProfileInfoKHR & operator=( VideoDecodeH264ProfileInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoDecodeH264ProfileInfoKHR & operator=( VkVideoDecodeH264ProfileInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 VideoDecodeH264ProfileInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoDecodeH264ProfileInfoKHR & setStdProfileIdc( StdVideoH264ProfileIdc stdProfileIdc_ ) VULKAN_HPP_NOEXCEPT { stdProfileIdc = stdProfileIdc_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoDecodeH264ProfileInfoKHR & setPictureLayout( VULKAN_HPP_NAMESPACE::VideoDecodeH264PictureLayoutFlagBitsKHR pictureLayout_ ) VULKAN_HPP_NOEXCEPT { pictureLayout = pictureLayout_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkVideoDecodeH264ProfileInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoDecodeH264ProfileInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, stdProfileIdc, pictureLayout ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) std::strong_ordering operator<=>( VideoDecodeH264ProfileInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { if ( auto cmp = sType <=> rhs.sType; cmp != 0 ) return cmp; if ( auto cmp = pNext <=> rhs.pNext; cmp != 0 ) return cmp; if ( auto cmp = memcmp( &stdProfileIdc, &rhs.stdProfileIdc, sizeof( StdVideoH264ProfileIdc ) ); cmp != 0 ) return ( cmp < 0 ) ? std::strong_ordering::less : std::strong_ordering::greater; if ( auto cmp = pictureLayout <=> rhs.pictureLayout; cmp != 0 ) return cmp; return std::strong_ordering::equivalent; } #endif bool operator==( VideoDecodeH264ProfileInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( memcmp( &stdProfileIdc, &rhs.stdProfileIdc, sizeof( StdVideoH264ProfileIdc ) ) == 0 ) && ( pictureLayout == rhs.pictureLayout ); } bool operator!=( VideoDecodeH264ProfileInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoDecodeH264ProfileInfoKHR; const void * pNext = {}; StdVideoH264ProfileIdc stdProfileIdc = {}; VULKAN_HPP_NAMESPACE::VideoDecodeH264PictureLayoutFlagBitsKHR pictureLayout = VULKAN_HPP_NAMESPACE::VideoDecodeH264PictureLayoutFlagBitsKHR::eProgressive; }; template <> struct CppType { using Type = VideoDecodeH264ProfileInfoKHR; }; struct VideoDecodeH264SessionParametersAddInfoKHR { using NativeType = VkVideoDecodeH264SessionParametersAddInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoDecodeH264SessionParametersAddInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoDecodeH264SessionParametersAddInfoKHR( uint32_t stdSPSCount_ = {}, const StdVideoH264SequenceParameterSet * pStdSPSs_ = {}, uint32_t stdPPSCount_ = {}, const StdVideoH264PictureParameterSet * pStdPPSs_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , stdSPSCount{ stdSPSCount_ } , pStdSPSs{ pStdSPSs_ } , stdPPSCount{ stdPPSCount_ } , pStdPPSs{ pStdPPSs_ } { } VULKAN_HPP_CONSTEXPR VideoDecodeH264SessionParametersAddInfoKHR( VideoDecodeH264SessionParametersAddInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoDecodeH264SessionParametersAddInfoKHR( VkVideoDecodeH264SessionParametersAddInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoDecodeH264SessionParametersAddInfoKHR( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) VideoDecodeH264SessionParametersAddInfoKHR( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & stdSPSs_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & stdPPSs_ = {}, const void * pNext_ = nullptr ) : pNext( pNext_ ) , stdSPSCount( static_cast( stdSPSs_.size() ) ) , pStdSPSs( stdSPSs_.data() ) , stdPPSCount( static_cast( stdPPSs_.size() ) ) , pStdPPSs( stdPPSs_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VideoDecodeH264SessionParametersAddInfoKHR & operator=( VideoDecodeH264SessionParametersAddInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoDecodeH264SessionParametersAddInfoKHR & operator=( VkVideoDecodeH264SessionParametersAddInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 VideoDecodeH264SessionParametersAddInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoDecodeH264SessionParametersAddInfoKHR & setStdSPSCount( uint32_t stdSPSCount_ ) VULKAN_HPP_NOEXCEPT { stdSPSCount = stdSPSCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoDecodeH264SessionParametersAddInfoKHR & setPStdSPSs( const StdVideoH264SequenceParameterSet * pStdSPSs_ ) VULKAN_HPP_NOEXCEPT { pStdSPSs = pStdSPSs_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) VideoDecodeH264SessionParametersAddInfoKHR & setStdSPSs( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & stdSPSs_ ) VULKAN_HPP_NOEXCEPT { stdSPSCount = static_cast( stdSPSs_.size() ); pStdSPSs = stdSPSs_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 VideoDecodeH264SessionParametersAddInfoKHR & setStdPPSCount( uint32_t stdPPSCount_ ) VULKAN_HPP_NOEXCEPT { stdPPSCount = stdPPSCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoDecodeH264SessionParametersAddInfoKHR & setPStdPPSs( const StdVideoH264PictureParameterSet * pStdPPSs_ ) VULKAN_HPP_NOEXCEPT { pStdPPSs = pStdPPSs_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) VideoDecodeH264SessionParametersAddInfoKHR & setStdPPSs( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & stdPPSs_ ) VULKAN_HPP_NOEXCEPT { stdPPSCount = static_cast( stdPPSs_.size() ); pStdPPSs = stdPPSs_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkVideoDecodeH264SessionParametersAddInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoDecodeH264SessionParametersAddInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, stdSPSCount, pStdSPSs, stdPPSCount, pStdPPSs ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( VideoDecodeH264SessionParametersAddInfoKHR const & ) const = default; #else bool operator==( VideoDecodeH264SessionParametersAddInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( stdSPSCount == rhs.stdSPSCount ) && ( pStdSPSs == rhs.pStdSPSs ) && ( stdPPSCount == rhs.stdPPSCount ) && ( pStdPPSs == rhs.pStdPPSs ); # endif } bool operator!=( VideoDecodeH264SessionParametersAddInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoDecodeH264SessionParametersAddInfoKHR; const void * pNext = {}; uint32_t stdSPSCount = {}; const StdVideoH264SequenceParameterSet * pStdSPSs = {}; uint32_t stdPPSCount = {}; const StdVideoH264PictureParameterSet * pStdPPSs = {}; }; template <> struct CppType { using Type = VideoDecodeH264SessionParametersAddInfoKHR; }; struct VideoDecodeH264SessionParametersCreateInfoKHR { using NativeType = VkVideoDecodeH264SessionParametersCreateInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoDecodeH264SessionParametersCreateInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoDecodeH264SessionParametersCreateInfoKHR( uint32_t maxStdSPSCount_ = {}, uint32_t maxStdPPSCount_ = {}, const VULKAN_HPP_NAMESPACE::VideoDecodeH264SessionParametersAddInfoKHR * pParametersAddInfo_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , maxStdSPSCount{ maxStdSPSCount_ } , maxStdPPSCount{ maxStdPPSCount_ } , pParametersAddInfo{ pParametersAddInfo_ } { } VULKAN_HPP_CONSTEXPR VideoDecodeH264SessionParametersCreateInfoKHR( VideoDecodeH264SessionParametersCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoDecodeH264SessionParametersCreateInfoKHR( VkVideoDecodeH264SessionParametersCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoDecodeH264SessionParametersCreateInfoKHR( *reinterpret_cast( &rhs ) ) { } VideoDecodeH264SessionParametersCreateInfoKHR & operator=( VideoDecodeH264SessionParametersCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoDecodeH264SessionParametersCreateInfoKHR & operator=( VkVideoDecodeH264SessionParametersCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 VideoDecodeH264SessionParametersCreateInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoDecodeH264SessionParametersCreateInfoKHR & setMaxStdSPSCount( uint32_t maxStdSPSCount_ ) VULKAN_HPP_NOEXCEPT { maxStdSPSCount = maxStdSPSCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoDecodeH264SessionParametersCreateInfoKHR & setMaxStdPPSCount( uint32_t maxStdPPSCount_ ) VULKAN_HPP_NOEXCEPT { maxStdPPSCount = maxStdPPSCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoDecodeH264SessionParametersCreateInfoKHR & setPParametersAddInfo( const VULKAN_HPP_NAMESPACE::VideoDecodeH264SessionParametersAddInfoKHR * pParametersAddInfo_ ) VULKAN_HPP_NOEXCEPT { pParametersAddInfo = pParametersAddInfo_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkVideoDecodeH264SessionParametersCreateInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoDecodeH264SessionParametersCreateInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, maxStdSPSCount, maxStdPPSCount, pParametersAddInfo ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( VideoDecodeH264SessionParametersCreateInfoKHR const & ) const = default; #else bool operator==( VideoDecodeH264SessionParametersCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( maxStdSPSCount == rhs.maxStdSPSCount ) && ( maxStdPPSCount == rhs.maxStdPPSCount ) && ( pParametersAddInfo == rhs.pParametersAddInfo ); # endif } bool operator!=( VideoDecodeH264SessionParametersCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoDecodeH264SessionParametersCreateInfoKHR; const void * pNext = {}; uint32_t maxStdSPSCount = {}; uint32_t maxStdPPSCount = {}; const VULKAN_HPP_NAMESPACE::VideoDecodeH264SessionParametersAddInfoKHR * pParametersAddInfo = {}; }; template <> struct CppType { using Type = VideoDecodeH264SessionParametersCreateInfoKHR; }; struct VideoDecodeH265CapabilitiesKHR { using NativeType = VkVideoDecodeH265CapabilitiesKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoDecodeH265CapabilitiesKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoDecodeH265CapabilitiesKHR( StdVideoH265LevelIdc maxLevelIdc_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , maxLevelIdc{ maxLevelIdc_ } { } VULKAN_HPP_CONSTEXPR VideoDecodeH265CapabilitiesKHR( VideoDecodeH265CapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoDecodeH265CapabilitiesKHR( VkVideoDecodeH265CapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoDecodeH265CapabilitiesKHR( *reinterpret_cast( &rhs ) ) { } VideoDecodeH265CapabilitiesKHR & operator=( VideoDecodeH265CapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoDecodeH265CapabilitiesKHR & operator=( VkVideoDecodeH265CapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkVideoDecodeH265CapabilitiesKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoDecodeH265CapabilitiesKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, maxLevelIdc ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) std::strong_ordering operator<=>( VideoDecodeH265CapabilitiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { if ( auto cmp = sType <=> rhs.sType; cmp != 0 ) return cmp; if ( auto cmp = pNext <=> rhs.pNext; cmp != 0 ) return cmp; if ( auto cmp = memcmp( &maxLevelIdc, &rhs.maxLevelIdc, sizeof( StdVideoH265LevelIdc ) ); cmp != 0 ) return ( cmp < 0 ) ? std::strong_ordering::less : std::strong_ordering::greater; return std::strong_ordering::equivalent; } #endif bool operator==( VideoDecodeH265CapabilitiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( memcmp( &maxLevelIdc, &rhs.maxLevelIdc, sizeof( StdVideoH265LevelIdc ) ) == 0 ); } bool operator!=( VideoDecodeH265CapabilitiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoDecodeH265CapabilitiesKHR; void * pNext = {}; StdVideoH265LevelIdc maxLevelIdc = {}; }; template <> struct CppType { using Type = VideoDecodeH265CapabilitiesKHR; }; struct VideoDecodeH265DpbSlotInfoKHR { using NativeType = VkVideoDecodeH265DpbSlotInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoDecodeH265DpbSlotInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoDecodeH265DpbSlotInfoKHR( const StdVideoDecodeH265ReferenceInfo * pStdReferenceInfo_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , pStdReferenceInfo{ pStdReferenceInfo_ } { } VULKAN_HPP_CONSTEXPR VideoDecodeH265DpbSlotInfoKHR( VideoDecodeH265DpbSlotInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoDecodeH265DpbSlotInfoKHR( VkVideoDecodeH265DpbSlotInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoDecodeH265DpbSlotInfoKHR( *reinterpret_cast( &rhs ) ) { } VideoDecodeH265DpbSlotInfoKHR & operator=( VideoDecodeH265DpbSlotInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoDecodeH265DpbSlotInfoKHR & operator=( VkVideoDecodeH265DpbSlotInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 VideoDecodeH265DpbSlotInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoDecodeH265DpbSlotInfoKHR & setPStdReferenceInfo( const StdVideoDecodeH265ReferenceInfo * pStdReferenceInfo_ ) VULKAN_HPP_NOEXCEPT { pStdReferenceInfo = pStdReferenceInfo_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkVideoDecodeH265DpbSlotInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoDecodeH265DpbSlotInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, pStdReferenceInfo ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( VideoDecodeH265DpbSlotInfoKHR const & ) const = default; #else bool operator==( VideoDecodeH265DpbSlotInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( pStdReferenceInfo == rhs.pStdReferenceInfo ); # endif } bool operator!=( VideoDecodeH265DpbSlotInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoDecodeH265DpbSlotInfoKHR; const void * pNext = {}; const StdVideoDecodeH265ReferenceInfo * pStdReferenceInfo = {}; }; template <> struct CppType { using Type = VideoDecodeH265DpbSlotInfoKHR; }; struct VideoDecodeH265InlineSessionParametersInfoKHR { using NativeType = VkVideoDecodeH265InlineSessionParametersInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoDecodeH265InlineSessionParametersInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoDecodeH265InlineSessionParametersInfoKHR( const StdVideoH265VideoParameterSet * pStdVPS_ = {}, const StdVideoH265SequenceParameterSet * pStdSPS_ = {}, const StdVideoH265PictureParameterSet * pStdPPS_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , pStdVPS{ pStdVPS_ } , pStdSPS{ pStdSPS_ } , pStdPPS{ pStdPPS_ } { } VULKAN_HPP_CONSTEXPR VideoDecodeH265InlineSessionParametersInfoKHR( VideoDecodeH265InlineSessionParametersInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoDecodeH265InlineSessionParametersInfoKHR( VkVideoDecodeH265InlineSessionParametersInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoDecodeH265InlineSessionParametersInfoKHR( *reinterpret_cast( &rhs ) ) { } VideoDecodeH265InlineSessionParametersInfoKHR & operator=( VideoDecodeH265InlineSessionParametersInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoDecodeH265InlineSessionParametersInfoKHR & operator=( VkVideoDecodeH265InlineSessionParametersInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 VideoDecodeH265InlineSessionParametersInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoDecodeH265InlineSessionParametersInfoKHR & setPStdVPS( const StdVideoH265VideoParameterSet * pStdVPS_ ) VULKAN_HPP_NOEXCEPT { pStdVPS = pStdVPS_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoDecodeH265InlineSessionParametersInfoKHR & setPStdSPS( const StdVideoH265SequenceParameterSet * pStdSPS_ ) VULKAN_HPP_NOEXCEPT { pStdSPS = pStdSPS_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoDecodeH265InlineSessionParametersInfoKHR & setPStdPPS( const StdVideoH265PictureParameterSet * pStdPPS_ ) VULKAN_HPP_NOEXCEPT { pStdPPS = pStdPPS_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkVideoDecodeH265InlineSessionParametersInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoDecodeH265InlineSessionParametersInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, pStdVPS, pStdSPS, pStdPPS ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( VideoDecodeH265InlineSessionParametersInfoKHR const & ) const = default; #else bool operator==( VideoDecodeH265InlineSessionParametersInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( pStdVPS == rhs.pStdVPS ) && ( pStdSPS == rhs.pStdSPS ) && ( pStdPPS == rhs.pStdPPS ); # endif } bool operator!=( VideoDecodeH265InlineSessionParametersInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoDecodeH265InlineSessionParametersInfoKHR; const void * pNext = {}; const StdVideoH265VideoParameterSet * pStdVPS = {}; const StdVideoH265SequenceParameterSet * pStdSPS = {}; const StdVideoH265PictureParameterSet * pStdPPS = {}; }; template <> struct CppType { using Type = VideoDecodeH265InlineSessionParametersInfoKHR; }; struct VideoDecodeH265PictureInfoKHR { using NativeType = VkVideoDecodeH265PictureInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoDecodeH265PictureInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoDecodeH265PictureInfoKHR( const StdVideoDecodeH265PictureInfo * pStdPictureInfo_ = {}, uint32_t sliceSegmentCount_ = {}, const uint32_t * pSliceSegmentOffsets_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , pStdPictureInfo{ pStdPictureInfo_ } , sliceSegmentCount{ sliceSegmentCount_ } , pSliceSegmentOffsets{ pSliceSegmentOffsets_ } { } VULKAN_HPP_CONSTEXPR VideoDecodeH265PictureInfoKHR( VideoDecodeH265PictureInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoDecodeH265PictureInfoKHR( VkVideoDecodeH265PictureInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoDecodeH265PictureInfoKHR( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) VideoDecodeH265PictureInfoKHR( const StdVideoDecodeH265PictureInfo * pStdPictureInfo_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & sliceSegmentOffsets_, const void * pNext_ = nullptr ) : pNext( pNext_ ) , pStdPictureInfo( pStdPictureInfo_ ) , sliceSegmentCount( static_cast( sliceSegmentOffsets_.size() ) ) , pSliceSegmentOffsets( sliceSegmentOffsets_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VideoDecodeH265PictureInfoKHR & operator=( VideoDecodeH265PictureInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoDecodeH265PictureInfoKHR & operator=( VkVideoDecodeH265PictureInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 VideoDecodeH265PictureInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoDecodeH265PictureInfoKHR & setPStdPictureInfo( const StdVideoDecodeH265PictureInfo * pStdPictureInfo_ ) VULKAN_HPP_NOEXCEPT { pStdPictureInfo = pStdPictureInfo_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoDecodeH265PictureInfoKHR & setSliceSegmentCount( uint32_t sliceSegmentCount_ ) VULKAN_HPP_NOEXCEPT { sliceSegmentCount = sliceSegmentCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoDecodeH265PictureInfoKHR & setPSliceSegmentOffsets( const uint32_t * pSliceSegmentOffsets_ ) VULKAN_HPP_NOEXCEPT { pSliceSegmentOffsets = pSliceSegmentOffsets_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) VideoDecodeH265PictureInfoKHR & setSliceSegmentOffsets( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & sliceSegmentOffsets_ ) VULKAN_HPP_NOEXCEPT { sliceSegmentCount = static_cast( sliceSegmentOffsets_.size() ); pSliceSegmentOffsets = sliceSegmentOffsets_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkVideoDecodeH265PictureInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoDecodeH265PictureInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, pStdPictureInfo, sliceSegmentCount, pSliceSegmentOffsets ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( VideoDecodeH265PictureInfoKHR const & ) const = default; #else bool operator==( VideoDecodeH265PictureInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( pStdPictureInfo == rhs.pStdPictureInfo ) && ( sliceSegmentCount == rhs.sliceSegmentCount ) && ( pSliceSegmentOffsets == rhs.pSliceSegmentOffsets ); # endif } bool operator!=( VideoDecodeH265PictureInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoDecodeH265PictureInfoKHR; const void * pNext = {}; const StdVideoDecodeH265PictureInfo * pStdPictureInfo = {}; uint32_t sliceSegmentCount = {}; const uint32_t * pSliceSegmentOffsets = {}; }; template <> struct CppType { using Type = VideoDecodeH265PictureInfoKHR; }; struct VideoDecodeH265ProfileInfoKHR { using NativeType = VkVideoDecodeH265ProfileInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoDecodeH265ProfileInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoDecodeH265ProfileInfoKHR( StdVideoH265ProfileIdc stdProfileIdc_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , stdProfileIdc{ stdProfileIdc_ } { } VULKAN_HPP_CONSTEXPR VideoDecodeH265ProfileInfoKHR( VideoDecodeH265ProfileInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoDecodeH265ProfileInfoKHR( VkVideoDecodeH265ProfileInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoDecodeH265ProfileInfoKHR( *reinterpret_cast( &rhs ) ) { } VideoDecodeH265ProfileInfoKHR & operator=( VideoDecodeH265ProfileInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoDecodeH265ProfileInfoKHR & operator=( VkVideoDecodeH265ProfileInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 VideoDecodeH265ProfileInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoDecodeH265ProfileInfoKHR & setStdProfileIdc( StdVideoH265ProfileIdc stdProfileIdc_ ) VULKAN_HPP_NOEXCEPT { stdProfileIdc = stdProfileIdc_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkVideoDecodeH265ProfileInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoDecodeH265ProfileInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, stdProfileIdc ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) std::strong_ordering operator<=>( VideoDecodeH265ProfileInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { if ( auto cmp = sType <=> rhs.sType; cmp != 0 ) return cmp; if ( auto cmp = pNext <=> rhs.pNext; cmp != 0 ) return cmp; if ( auto cmp = memcmp( &stdProfileIdc, &rhs.stdProfileIdc, sizeof( StdVideoH265ProfileIdc ) ); cmp != 0 ) return ( cmp < 0 ) ? std::strong_ordering::less : std::strong_ordering::greater; return std::strong_ordering::equivalent; } #endif bool operator==( VideoDecodeH265ProfileInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( memcmp( &stdProfileIdc, &rhs.stdProfileIdc, sizeof( StdVideoH265ProfileIdc ) ) == 0 ); } bool operator!=( VideoDecodeH265ProfileInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoDecodeH265ProfileInfoKHR; const void * pNext = {}; StdVideoH265ProfileIdc stdProfileIdc = {}; }; template <> struct CppType { using Type = VideoDecodeH265ProfileInfoKHR; }; struct VideoDecodeH265SessionParametersAddInfoKHR { using NativeType = VkVideoDecodeH265SessionParametersAddInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoDecodeH265SessionParametersAddInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoDecodeH265SessionParametersAddInfoKHR( uint32_t stdVPSCount_ = {}, const StdVideoH265VideoParameterSet * pStdVPSs_ = {}, uint32_t stdSPSCount_ = {}, const StdVideoH265SequenceParameterSet * pStdSPSs_ = {}, uint32_t stdPPSCount_ = {}, const StdVideoH265PictureParameterSet * pStdPPSs_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , stdVPSCount{ stdVPSCount_ } , pStdVPSs{ pStdVPSs_ } , stdSPSCount{ stdSPSCount_ } , pStdSPSs{ pStdSPSs_ } , stdPPSCount{ stdPPSCount_ } , pStdPPSs{ pStdPPSs_ } { } VULKAN_HPP_CONSTEXPR VideoDecodeH265SessionParametersAddInfoKHR( VideoDecodeH265SessionParametersAddInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoDecodeH265SessionParametersAddInfoKHR( VkVideoDecodeH265SessionParametersAddInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoDecodeH265SessionParametersAddInfoKHR( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) VideoDecodeH265SessionParametersAddInfoKHR( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & stdVPSs_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & stdSPSs_ = {}, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & stdPPSs_ = {}, const void * pNext_ = nullptr ) : pNext( pNext_ ) , stdVPSCount( static_cast( stdVPSs_.size() ) ) , pStdVPSs( stdVPSs_.data() ) , stdSPSCount( static_cast( stdSPSs_.size() ) ) , pStdSPSs( stdSPSs_.data() ) , stdPPSCount( static_cast( stdPPSs_.size() ) ) , pStdPPSs( stdPPSs_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VideoDecodeH265SessionParametersAddInfoKHR & operator=( VideoDecodeH265SessionParametersAddInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoDecodeH265SessionParametersAddInfoKHR & operator=( VkVideoDecodeH265SessionParametersAddInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 VideoDecodeH265SessionParametersAddInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoDecodeH265SessionParametersAddInfoKHR & setStdVPSCount( uint32_t stdVPSCount_ ) VULKAN_HPP_NOEXCEPT { stdVPSCount = stdVPSCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoDecodeH265SessionParametersAddInfoKHR & setPStdVPSs( const StdVideoH265VideoParameterSet * pStdVPSs_ ) VULKAN_HPP_NOEXCEPT { pStdVPSs = pStdVPSs_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) VideoDecodeH265SessionParametersAddInfoKHR & setStdVPSs( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & stdVPSs_ ) VULKAN_HPP_NOEXCEPT { stdVPSCount = static_cast( stdVPSs_.size() ); pStdVPSs = stdVPSs_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 VideoDecodeH265SessionParametersAddInfoKHR & setStdSPSCount( uint32_t stdSPSCount_ ) VULKAN_HPP_NOEXCEPT { stdSPSCount = stdSPSCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoDecodeH265SessionParametersAddInfoKHR & setPStdSPSs( const StdVideoH265SequenceParameterSet * pStdSPSs_ ) VULKAN_HPP_NOEXCEPT { pStdSPSs = pStdSPSs_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) VideoDecodeH265SessionParametersAddInfoKHR & setStdSPSs( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & stdSPSs_ ) VULKAN_HPP_NOEXCEPT { stdSPSCount = static_cast( stdSPSs_.size() ); pStdSPSs = stdSPSs_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 VideoDecodeH265SessionParametersAddInfoKHR & setStdPPSCount( uint32_t stdPPSCount_ ) VULKAN_HPP_NOEXCEPT { stdPPSCount = stdPPSCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoDecodeH265SessionParametersAddInfoKHR & setPStdPPSs( const StdVideoH265PictureParameterSet * pStdPPSs_ ) VULKAN_HPP_NOEXCEPT { pStdPPSs = pStdPPSs_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) VideoDecodeH265SessionParametersAddInfoKHR & setStdPPSs( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & stdPPSs_ ) VULKAN_HPP_NOEXCEPT { stdPPSCount = static_cast( stdPPSs_.size() ); pStdPPSs = stdPPSs_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkVideoDecodeH265SessionParametersAddInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoDecodeH265SessionParametersAddInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, stdVPSCount, pStdVPSs, stdSPSCount, pStdSPSs, stdPPSCount, pStdPPSs ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( VideoDecodeH265SessionParametersAddInfoKHR const & ) const = default; #else bool operator==( VideoDecodeH265SessionParametersAddInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( stdVPSCount == rhs.stdVPSCount ) && ( pStdVPSs == rhs.pStdVPSs ) && ( stdSPSCount == rhs.stdSPSCount ) && ( pStdSPSs == rhs.pStdSPSs ) && ( stdPPSCount == rhs.stdPPSCount ) && ( pStdPPSs == rhs.pStdPPSs ); # endif } bool operator!=( VideoDecodeH265SessionParametersAddInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoDecodeH265SessionParametersAddInfoKHR; const void * pNext = {}; uint32_t stdVPSCount = {}; const StdVideoH265VideoParameterSet * pStdVPSs = {}; uint32_t stdSPSCount = {}; const StdVideoH265SequenceParameterSet * pStdSPSs = {}; uint32_t stdPPSCount = {}; const StdVideoH265PictureParameterSet * pStdPPSs = {}; }; template <> struct CppType { using Type = VideoDecodeH265SessionParametersAddInfoKHR; }; struct VideoDecodeH265SessionParametersCreateInfoKHR { using NativeType = VkVideoDecodeH265SessionParametersCreateInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoDecodeH265SessionParametersCreateInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoDecodeH265SessionParametersCreateInfoKHR( uint32_t maxStdVPSCount_ = {}, uint32_t maxStdSPSCount_ = {}, uint32_t maxStdPPSCount_ = {}, const VULKAN_HPP_NAMESPACE::VideoDecodeH265SessionParametersAddInfoKHR * pParametersAddInfo_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , maxStdVPSCount{ maxStdVPSCount_ } , maxStdSPSCount{ maxStdSPSCount_ } , maxStdPPSCount{ maxStdPPSCount_ } , pParametersAddInfo{ pParametersAddInfo_ } { } VULKAN_HPP_CONSTEXPR VideoDecodeH265SessionParametersCreateInfoKHR( VideoDecodeH265SessionParametersCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoDecodeH265SessionParametersCreateInfoKHR( VkVideoDecodeH265SessionParametersCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoDecodeH265SessionParametersCreateInfoKHR( *reinterpret_cast( &rhs ) ) { } VideoDecodeH265SessionParametersCreateInfoKHR & operator=( VideoDecodeH265SessionParametersCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoDecodeH265SessionParametersCreateInfoKHR & operator=( VkVideoDecodeH265SessionParametersCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 VideoDecodeH265SessionParametersCreateInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoDecodeH265SessionParametersCreateInfoKHR & setMaxStdVPSCount( uint32_t maxStdVPSCount_ ) VULKAN_HPP_NOEXCEPT { maxStdVPSCount = maxStdVPSCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoDecodeH265SessionParametersCreateInfoKHR & setMaxStdSPSCount( uint32_t maxStdSPSCount_ ) VULKAN_HPP_NOEXCEPT { maxStdSPSCount = maxStdSPSCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoDecodeH265SessionParametersCreateInfoKHR & setMaxStdPPSCount( uint32_t maxStdPPSCount_ ) VULKAN_HPP_NOEXCEPT { maxStdPPSCount = maxStdPPSCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoDecodeH265SessionParametersCreateInfoKHR & setPParametersAddInfo( const VULKAN_HPP_NAMESPACE::VideoDecodeH265SessionParametersAddInfoKHR * pParametersAddInfo_ ) VULKAN_HPP_NOEXCEPT { pParametersAddInfo = pParametersAddInfo_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkVideoDecodeH265SessionParametersCreateInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoDecodeH265SessionParametersCreateInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, maxStdVPSCount, maxStdSPSCount, maxStdPPSCount, pParametersAddInfo ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( VideoDecodeH265SessionParametersCreateInfoKHR const & ) const = default; #else bool operator==( VideoDecodeH265SessionParametersCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( maxStdVPSCount == rhs.maxStdVPSCount ) && ( maxStdSPSCount == rhs.maxStdSPSCount ) && ( maxStdPPSCount == rhs.maxStdPPSCount ) && ( pParametersAddInfo == rhs.pParametersAddInfo ); # endif } bool operator!=( VideoDecodeH265SessionParametersCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoDecodeH265SessionParametersCreateInfoKHR; const void * pNext = {}; uint32_t maxStdVPSCount = {}; uint32_t maxStdSPSCount = {}; uint32_t maxStdPPSCount = {}; const VULKAN_HPP_NAMESPACE::VideoDecodeH265SessionParametersAddInfoKHR * pParametersAddInfo = {}; }; template <> struct CppType { using Type = VideoDecodeH265SessionParametersCreateInfoKHR; }; struct VideoDecodeInfoKHR { using NativeType = VkVideoDecodeInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoDecodeInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoDecodeInfoKHR( VULKAN_HPP_NAMESPACE::VideoDecodeFlagsKHR flags_ = {}, VULKAN_HPP_NAMESPACE::Buffer srcBuffer_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize srcBufferOffset_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize srcBufferRange_ = {}, VULKAN_HPP_NAMESPACE::VideoPictureResourceInfoKHR dstPictureResource_ = {}, const VULKAN_HPP_NAMESPACE::VideoReferenceSlotInfoKHR * pSetupReferenceSlot_ = {}, uint32_t referenceSlotCount_ = {}, const VULKAN_HPP_NAMESPACE::VideoReferenceSlotInfoKHR * pReferenceSlots_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , srcBuffer{ srcBuffer_ } , srcBufferOffset{ srcBufferOffset_ } , srcBufferRange{ srcBufferRange_ } , dstPictureResource{ dstPictureResource_ } , pSetupReferenceSlot{ pSetupReferenceSlot_ } , referenceSlotCount{ referenceSlotCount_ } , pReferenceSlots{ pReferenceSlots_ } { } VULKAN_HPP_CONSTEXPR VideoDecodeInfoKHR( VideoDecodeInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoDecodeInfoKHR( VkVideoDecodeInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoDecodeInfoKHR( *reinterpret_cast( &rhs ) ) {} # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) VideoDecodeInfoKHR( VULKAN_HPP_NAMESPACE::VideoDecodeFlagsKHR flags_, VULKAN_HPP_NAMESPACE::Buffer srcBuffer_, VULKAN_HPP_NAMESPACE::DeviceSize srcBufferOffset_, VULKAN_HPP_NAMESPACE::DeviceSize srcBufferRange_, VULKAN_HPP_NAMESPACE::VideoPictureResourceInfoKHR dstPictureResource_, const VULKAN_HPP_NAMESPACE::VideoReferenceSlotInfoKHR * pSetupReferenceSlot_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & referenceSlots_, const void * pNext_ = nullptr ) : pNext( pNext_ ) , flags( flags_ ) , srcBuffer( srcBuffer_ ) , srcBufferOffset( srcBufferOffset_ ) , srcBufferRange( srcBufferRange_ ) , dstPictureResource( dstPictureResource_ ) , pSetupReferenceSlot( pSetupReferenceSlot_ ) , referenceSlotCount( static_cast( referenceSlots_.size() ) ) , pReferenceSlots( referenceSlots_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VideoDecodeInfoKHR & operator=( VideoDecodeInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoDecodeInfoKHR & operator=( VkVideoDecodeInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 VideoDecodeInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoDecodeInfoKHR & setFlags( VULKAN_HPP_NAMESPACE::VideoDecodeFlagsKHR flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoDecodeInfoKHR & setSrcBuffer( VULKAN_HPP_NAMESPACE::Buffer srcBuffer_ ) VULKAN_HPP_NOEXCEPT { srcBuffer = srcBuffer_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoDecodeInfoKHR & setSrcBufferOffset( VULKAN_HPP_NAMESPACE::DeviceSize srcBufferOffset_ ) VULKAN_HPP_NOEXCEPT { srcBufferOffset = srcBufferOffset_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoDecodeInfoKHR & setSrcBufferRange( VULKAN_HPP_NAMESPACE::DeviceSize srcBufferRange_ ) VULKAN_HPP_NOEXCEPT { srcBufferRange = srcBufferRange_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoDecodeInfoKHR & setDstPictureResource( VULKAN_HPP_NAMESPACE::VideoPictureResourceInfoKHR const & dstPictureResource_ ) VULKAN_HPP_NOEXCEPT { dstPictureResource = dstPictureResource_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoDecodeInfoKHR & setPSetupReferenceSlot( const VULKAN_HPP_NAMESPACE::VideoReferenceSlotInfoKHR * pSetupReferenceSlot_ ) VULKAN_HPP_NOEXCEPT { pSetupReferenceSlot = pSetupReferenceSlot_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoDecodeInfoKHR & setReferenceSlotCount( uint32_t referenceSlotCount_ ) VULKAN_HPP_NOEXCEPT { referenceSlotCount = referenceSlotCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoDecodeInfoKHR & setPReferenceSlots( const VULKAN_HPP_NAMESPACE::VideoReferenceSlotInfoKHR * pReferenceSlots_ ) VULKAN_HPP_NOEXCEPT { pReferenceSlots = pReferenceSlots_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) VideoDecodeInfoKHR & setReferenceSlots( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & referenceSlots_ ) VULKAN_HPP_NOEXCEPT { referenceSlotCount = static_cast( referenceSlots_.size() ); pReferenceSlots = referenceSlots_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkVideoDecodeInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoDecodeInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, srcBuffer, srcBufferOffset, srcBufferRange, dstPictureResource, pSetupReferenceSlot, referenceSlotCount, pReferenceSlots ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( VideoDecodeInfoKHR const & ) const = default; #else bool operator==( VideoDecodeInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( srcBuffer == rhs.srcBuffer ) && ( srcBufferOffset == rhs.srcBufferOffset ) && ( srcBufferRange == rhs.srcBufferRange ) && ( dstPictureResource == rhs.dstPictureResource ) && ( pSetupReferenceSlot == rhs.pSetupReferenceSlot ) && ( referenceSlotCount == rhs.referenceSlotCount ) && ( pReferenceSlots == rhs.pReferenceSlots ); # endif } bool operator!=( VideoDecodeInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoDecodeInfoKHR; const void * pNext = {}; VULKAN_HPP_NAMESPACE::VideoDecodeFlagsKHR flags = {}; VULKAN_HPP_NAMESPACE::Buffer srcBuffer = {}; VULKAN_HPP_NAMESPACE::DeviceSize srcBufferOffset = {}; VULKAN_HPP_NAMESPACE::DeviceSize srcBufferRange = {}; VULKAN_HPP_NAMESPACE::VideoPictureResourceInfoKHR dstPictureResource = {}; const VULKAN_HPP_NAMESPACE::VideoReferenceSlotInfoKHR * pSetupReferenceSlot = {}; uint32_t referenceSlotCount = {}; const VULKAN_HPP_NAMESPACE::VideoReferenceSlotInfoKHR * pReferenceSlots = {}; }; template <> struct CppType { using Type = VideoDecodeInfoKHR; }; struct VideoDecodeUsageInfoKHR { using NativeType = VkVideoDecodeUsageInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoDecodeUsageInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoDecodeUsageInfoKHR( VULKAN_HPP_NAMESPACE::VideoDecodeUsageFlagsKHR videoUsageHints_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , videoUsageHints{ videoUsageHints_ } { } VULKAN_HPP_CONSTEXPR VideoDecodeUsageInfoKHR( VideoDecodeUsageInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoDecodeUsageInfoKHR( VkVideoDecodeUsageInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoDecodeUsageInfoKHR( *reinterpret_cast( &rhs ) ) { } VideoDecodeUsageInfoKHR & operator=( VideoDecodeUsageInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoDecodeUsageInfoKHR & operator=( VkVideoDecodeUsageInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 VideoDecodeUsageInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoDecodeUsageInfoKHR & setVideoUsageHints( VULKAN_HPP_NAMESPACE::VideoDecodeUsageFlagsKHR videoUsageHints_ ) VULKAN_HPP_NOEXCEPT { videoUsageHints = videoUsageHints_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkVideoDecodeUsageInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoDecodeUsageInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, videoUsageHints ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( VideoDecodeUsageInfoKHR const & ) const = default; #else bool operator==( VideoDecodeUsageInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( videoUsageHints == rhs.videoUsageHints ); # endif } bool operator!=( VideoDecodeUsageInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoDecodeUsageInfoKHR; const void * pNext = {}; VULKAN_HPP_NAMESPACE::VideoDecodeUsageFlagsKHR videoUsageHints = {}; }; template <> struct CppType { using Type = VideoDecodeUsageInfoKHR; }; struct VideoEncodeAV1CapabilitiesKHR { using NativeType = VkVideoEncodeAV1CapabilitiesKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoEncodeAv1CapabilitiesKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoEncodeAV1CapabilitiesKHR( VULKAN_HPP_NAMESPACE::VideoEncodeAV1CapabilityFlagsKHR flags_ = {}, StdVideoAV1Level maxLevel_ = {}, VULKAN_HPP_NAMESPACE::Extent2D codedPictureAlignment_ = {}, VULKAN_HPP_NAMESPACE::Extent2D maxTiles_ = {}, VULKAN_HPP_NAMESPACE::Extent2D minTileSize_ = {}, VULKAN_HPP_NAMESPACE::Extent2D maxTileSize_ = {}, VULKAN_HPP_NAMESPACE::VideoEncodeAV1SuperblockSizeFlagsKHR superblockSizes_ = {}, uint32_t maxSingleReferenceCount_ = {}, uint32_t singleReferenceNameMask_ = {}, uint32_t maxUnidirectionalCompoundReferenceCount_ = {}, uint32_t maxUnidirectionalCompoundGroup1ReferenceCount_ = {}, uint32_t unidirectionalCompoundReferenceNameMask_ = {}, uint32_t maxBidirectionalCompoundReferenceCount_ = {}, uint32_t maxBidirectionalCompoundGroup1ReferenceCount_ = {}, uint32_t maxBidirectionalCompoundGroup2ReferenceCount_ = {}, uint32_t bidirectionalCompoundReferenceNameMask_ = {}, uint32_t maxTemporalLayerCount_ = {}, uint32_t maxSpatialLayerCount_ = {}, uint32_t maxOperatingPoints_ = {}, uint32_t minQIndex_ = {}, uint32_t maxQIndex_ = {}, VULKAN_HPP_NAMESPACE::Bool32 prefersGopRemainingFrames_ = {}, VULKAN_HPP_NAMESPACE::Bool32 requiresGopRemainingFrames_ = {}, VULKAN_HPP_NAMESPACE::VideoEncodeAV1StdFlagsKHR stdSyntaxFlags_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , maxLevel{ maxLevel_ } , codedPictureAlignment{ codedPictureAlignment_ } , maxTiles{ maxTiles_ } , minTileSize{ minTileSize_ } , maxTileSize{ maxTileSize_ } , superblockSizes{ superblockSizes_ } , maxSingleReferenceCount{ maxSingleReferenceCount_ } , singleReferenceNameMask{ singleReferenceNameMask_ } , maxUnidirectionalCompoundReferenceCount{ maxUnidirectionalCompoundReferenceCount_ } , maxUnidirectionalCompoundGroup1ReferenceCount{ maxUnidirectionalCompoundGroup1ReferenceCount_ } , unidirectionalCompoundReferenceNameMask{ unidirectionalCompoundReferenceNameMask_ } , maxBidirectionalCompoundReferenceCount{ maxBidirectionalCompoundReferenceCount_ } , maxBidirectionalCompoundGroup1ReferenceCount{ maxBidirectionalCompoundGroup1ReferenceCount_ } , maxBidirectionalCompoundGroup2ReferenceCount{ maxBidirectionalCompoundGroup2ReferenceCount_ } , bidirectionalCompoundReferenceNameMask{ bidirectionalCompoundReferenceNameMask_ } , maxTemporalLayerCount{ maxTemporalLayerCount_ } , maxSpatialLayerCount{ maxSpatialLayerCount_ } , maxOperatingPoints{ maxOperatingPoints_ } , minQIndex{ minQIndex_ } , maxQIndex{ maxQIndex_ } , prefersGopRemainingFrames{ prefersGopRemainingFrames_ } , requiresGopRemainingFrames{ requiresGopRemainingFrames_ } , stdSyntaxFlags{ stdSyntaxFlags_ } { } VULKAN_HPP_CONSTEXPR VideoEncodeAV1CapabilitiesKHR( VideoEncodeAV1CapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoEncodeAV1CapabilitiesKHR( VkVideoEncodeAV1CapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoEncodeAV1CapabilitiesKHR( *reinterpret_cast( &rhs ) ) { } VideoEncodeAV1CapabilitiesKHR & operator=( VideoEncodeAV1CapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoEncodeAV1CapabilitiesKHR & operator=( VkVideoEncodeAV1CapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkVideoEncodeAV1CapabilitiesKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoEncodeAV1CapabilitiesKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, maxLevel, codedPictureAlignment, maxTiles, minTileSize, maxTileSize, superblockSizes, maxSingleReferenceCount, singleReferenceNameMask, maxUnidirectionalCompoundReferenceCount, maxUnidirectionalCompoundGroup1ReferenceCount, unidirectionalCompoundReferenceNameMask, maxBidirectionalCompoundReferenceCount, maxBidirectionalCompoundGroup1ReferenceCount, maxBidirectionalCompoundGroup2ReferenceCount, bidirectionalCompoundReferenceNameMask, maxTemporalLayerCount, maxSpatialLayerCount, maxOperatingPoints, minQIndex, maxQIndex, prefersGopRemainingFrames, requiresGopRemainingFrames, stdSyntaxFlags ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) std::strong_ordering operator<=>( VideoEncodeAV1CapabilitiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { if ( auto cmp = sType <=> rhs.sType; cmp != 0 ) return cmp; if ( auto cmp = pNext <=> rhs.pNext; cmp != 0 ) return cmp; if ( auto cmp = flags <=> rhs.flags; cmp != 0 ) return cmp; if ( auto cmp = memcmp( &maxLevel, &rhs.maxLevel, sizeof( StdVideoAV1Level ) ); cmp != 0 ) return ( cmp < 0 ) ? std::strong_ordering::less : std::strong_ordering::greater; if ( auto cmp = codedPictureAlignment <=> rhs.codedPictureAlignment; cmp != 0 ) return cmp; if ( auto cmp = maxTiles <=> rhs.maxTiles; cmp != 0 ) return cmp; if ( auto cmp = minTileSize <=> rhs.minTileSize; cmp != 0 ) return cmp; if ( auto cmp = maxTileSize <=> rhs.maxTileSize; cmp != 0 ) return cmp; if ( auto cmp = superblockSizes <=> rhs.superblockSizes; cmp != 0 ) return cmp; if ( auto cmp = maxSingleReferenceCount <=> rhs.maxSingleReferenceCount; cmp != 0 ) return cmp; if ( auto cmp = singleReferenceNameMask <=> rhs.singleReferenceNameMask; cmp != 0 ) return cmp; if ( auto cmp = maxUnidirectionalCompoundReferenceCount <=> rhs.maxUnidirectionalCompoundReferenceCount; cmp != 0 ) return cmp; if ( auto cmp = maxUnidirectionalCompoundGroup1ReferenceCount <=> rhs.maxUnidirectionalCompoundGroup1ReferenceCount; cmp != 0 ) return cmp; if ( auto cmp = unidirectionalCompoundReferenceNameMask <=> rhs.unidirectionalCompoundReferenceNameMask; cmp != 0 ) return cmp; if ( auto cmp = maxBidirectionalCompoundReferenceCount <=> rhs.maxBidirectionalCompoundReferenceCount; cmp != 0 ) return cmp; if ( auto cmp = maxBidirectionalCompoundGroup1ReferenceCount <=> rhs.maxBidirectionalCompoundGroup1ReferenceCount; cmp != 0 ) return cmp; if ( auto cmp = maxBidirectionalCompoundGroup2ReferenceCount <=> rhs.maxBidirectionalCompoundGroup2ReferenceCount; cmp != 0 ) return cmp; if ( auto cmp = bidirectionalCompoundReferenceNameMask <=> rhs.bidirectionalCompoundReferenceNameMask; cmp != 0 ) return cmp; if ( auto cmp = maxTemporalLayerCount <=> rhs.maxTemporalLayerCount; cmp != 0 ) return cmp; if ( auto cmp = maxSpatialLayerCount <=> rhs.maxSpatialLayerCount; cmp != 0 ) return cmp; if ( auto cmp = maxOperatingPoints <=> rhs.maxOperatingPoints; cmp != 0 ) return cmp; if ( auto cmp = minQIndex <=> rhs.minQIndex; cmp != 0 ) return cmp; if ( auto cmp = maxQIndex <=> rhs.maxQIndex; cmp != 0 ) return cmp; if ( auto cmp = prefersGopRemainingFrames <=> rhs.prefersGopRemainingFrames; cmp != 0 ) return cmp; if ( auto cmp = requiresGopRemainingFrames <=> rhs.requiresGopRemainingFrames; cmp != 0 ) return cmp; if ( auto cmp = stdSyntaxFlags <=> rhs.stdSyntaxFlags; cmp != 0 ) return cmp; return std::strong_ordering::equivalent; } #endif bool operator==( VideoEncodeAV1CapabilitiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( memcmp( &maxLevel, &rhs.maxLevel, sizeof( StdVideoAV1Level ) ) == 0 ) && ( codedPictureAlignment == rhs.codedPictureAlignment ) && ( maxTiles == rhs.maxTiles ) && ( minTileSize == rhs.minTileSize ) && ( maxTileSize == rhs.maxTileSize ) && ( superblockSizes == rhs.superblockSizes ) && ( maxSingleReferenceCount == rhs.maxSingleReferenceCount ) && ( singleReferenceNameMask == rhs.singleReferenceNameMask ) && ( maxUnidirectionalCompoundReferenceCount == rhs.maxUnidirectionalCompoundReferenceCount ) && ( maxUnidirectionalCompoundGroup1ReferenceCount == rhs.maxUnidirectionalCompoundGroup1ReferenceCount ) && ( unidirectionalCompoundReferenceNameMask == rhs.unidirectionalCompoundReferenceNameMask ) && ( maxBidirectionalCompoundReferenceCount == rhs.maxBidirectionalCompoundReferenceCount ) && ( maxBidirectionalCompoundGroup1ReferenceCount == rhs.maxBidirectionalCompoundGroup1ReferenceCount ) && ( maxBidirectionalCompoundGroup2ReferenceCount == rhs.maxBidirectionalCompoundGroup2ReferenceCount ) && ( bidirectionalCompoundReferenceNameMask == rhs.bidirectionalCompoundReferenceNameMask ) && ( maxTemporalLayerCount == rhs.maxTemporalLayerCount ) && ( maxSpatialLayerCount == rhs.maxSpatialLayerCount ) && ( maxOperatingPoints == rhs.maxOperatingPoints ) && ( minQIndex == rhs.minQIndex ) && ( maxQIndex == rhs.maxQIndex ) && ( prefersGopRemainingFrames == rhs.prefersGopRemainingFrames ) && ( requiresGopRemainingFrames == rhs.requiresGopRemainingFrames ) && ( stdSyntaxFlags == rhs.stdSyntaxFlags ); } bool operator!=( VideoEncodeAV1CapabilitiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoEncodeAv1CapabilitiesKHR; void * pNext = {}; VULKAN_HPP_NAMESPACE::VideoEncodeAV1CapabilityFlagsKHR flags = {}; StdVideoAV1Level maxLevel = {}; VULKAN_HPP_NAMESPACE::Extent2D codedPictureAlignment = {}; VULKAN_HPP_NAMESPACE::Extent2D maxTiles = {}; VULKAN_HPP_NAMESPACE::Extent2D minTileSize = {}; VULKAN_HPP_NAMESPACE::Extent2D maxTileSize = {}; VULKAN_HPP_NAMESPACE::VideoEncodeAV1SuperblockSizeFlagsKHR superblockSizes = {}; uint32_t maxSingleReferenceCount = {}; uint32_t singleReferenceNameMask = {}; uint32_t maxUnidirectionalCompoundReferenceCount = {}; uint32_t maxUnidirectionalCompoundGroup1ReferenceCount = {}; uint32_t unidirectionalCompoundReferenceNameMask = {}; uint32_t maxBidirectionalCompoundReferenceCount = {}; uint32_t maxBidirectionalCompoundGroup1ReferenceCount = {}; uint32_t maxBidirectionalCompoundGroup2ReferenceCount = {}; uint32_t bidirectionalCompoundReferenceNameMask = {}; uint32_t maxTemporalLayerCount = {}; uint32_t maxSpatialLayerCount = {}; uint32_t maxOperatingPoints = {}; uint32_t minQIndex = {}; uint32_t maxQIndex = {}; VULKAN_HPP_NAMESPACE::Bool32 prefersGopRemainingFrames = {}; VULKAN_HPP_NAMESPACE::Bool32 requiresGopRemainingFrames = {}; VULKAN_HPP_NAMESPACE::VideoEncodeAV1StdFlagsKHR stdSyntaxFlags = {}; }; template <> struct CppType { using Type = VideoEncodeAV1CapabilitiesKHR; }; struct VideoEncodeAV1DpbSlotInfoKHR { using NativeType = VkVideoEncodeAV1DpbSlotInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoEncodeAv1DpbSlotInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoEncodeAV1DpbSlotInfoKHR( const StdVideoEncodeAV1ReferenceInfo * pStdReferenceInfo_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , pStdReferenceInfo{ pStdReferenceInfo_ } { } VULKAN_HPP_CONSTEXPR VideoEncodeAV1DpbSlotInfoKHR( VideoEncodeAV1DpbSlotInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoEncodeAV1DpbSlotInfoKHR( VkVideoEncodeAV1DpbSlotInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoEncodeAV1DpbSlotInfoKHR( *reinterpret_cast( &rhs ) ) { } VideoEncodeAV1DpbSlotInfoKHR & operator=( VideoEncodeAV1DpbSlotInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoEncodeAV1DpbSlotInfoKHR & operator=( VkVideoEncodeAV1DpbSlotInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 VideoEncodeAV1DpbSlotInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeAV1DpbSlotInfoKHR & setPStdReferenceInfo( const StdVideoEncodeAV1ReferenceInfo * pStdReferenceInfo_ ) VULKAN_HPP_NOEXCEPT { pStdReferenceInfo = pStdReferenceInfo_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkVideoEncodeAV1DpbSlotInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoEncodeAV1DpbSlotInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, pStdReferenceInfo ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( VideoEncodeAV1DpbSlotInfoKHR const & ) const = default; #else bool operator==( VideoEncodeAV1DpbSlotInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( pStdReferenceInfo == rhs.pStdReferenceInfo ); # endif } bool operator!=( VideoEncodeAV1DpbSlotInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoEncodeAv1DpbSlotInfoKHR; const void * pNext = {}; const StdVideoEncodeAV1ReferenceInfo * pStdReferenceInfo = {}; }; template <> struct CppType { using Type = VideoEncodeAV1DpbSlotInfoKHR; }; struct VideoEncodeAV1FrameSizeKHR { using NativeType = VkVideoEncodeAV1FrameSizeKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoEncodeAV1FrameSizeKHR( uint32_t intraFrameSize_ = {}, uint32_t predictiveFrameSize_ = {}, uint32_t bipredictiveFrameSize_ = {} ) VULKAN_HPP_NOEXCEPT : intraFrameSize{ intraFrameSize_ } , predictiveFrameSize{ predictiveFrameSize_ } , bipredictiveFrameSize{ bipredictiveFrameSize_ } { } VULKAN_HPP_CONSTEXPR VideoEncodeAV1FrameSizeKHR( VideoEncodeAV1FrameSizeKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoEncodeAV1FrameSizeKHR( VkVideoEncodeAV1FrameSizeKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoEncodeAV1FrameSizeKHR( *reinterpret_cast( &rhs ) ) { } VideoEncodeAV1FrameSizeKHR & operator=( VideoEncodeAV1FrameSizeKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoEncodeAV1FrameSizeKHR & operator=( VkVideoEncodeAV1FrameSizeKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 VideoEncodeAV1FrameSizeKHR & setIntraFrameSize( uint32_t intraFrameSize_ ) VULKAN_HPP_NOEXCEPT { intraFrameSize = intraFrameSize_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeAV1FrameSizeKHR & setPredictiveFrameSize( uint32_t predictiveFrameSize_ ) VULKAN_HPP_NOEXCEPT { predictiveFrameSize = predictiveFrameSize_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeAV1FrameSizeKHR & setBipredictiveFrameSize( uint32_t bipredictiveFrameSize_ ) VULKAN_HPP_NOEXCEPT { bipredictiveFrameSize = bipredictiveFrameSize_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkVideoEncodeAV1FrameSizeKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoEncodeAV1FrameSizeKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( intraFrameSize, predictiveFrameSize, bipredictiveFrameSize ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( VideoEncodeAV1FrameSizeKHR const & ) const = default; #else bool operator==( VideoEncodeAV1FrameSizeKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( intraFrameSize == rhs.intraFrameSize ) && ( predictiveFrameSize == rhs.predictiveFrameSize ) && ( bipredictiveFrameSize == rhs.bipredictiveFrameSize ); # endif } bool operator!=( VideoEncodeAV1FrameSizeKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: uint32_t intraFrameSize = {}; uint32_t predictiveFrameSize = {}; uint32_t bipredictiveFrameSize = {}; }; struct VideoEncodeAV1GopRemainingFrameInfoKHR { using NativeType = VkVideoEncodeAV1GopRemainingFrameInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoEncodeAv1GopRemainingFrameInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoEncodeAV1GopRemainingFrameInfoKHR( VULKAN_HPP_NAMESPACE::Bool32 useGopRemainingFrames_ = {}, uint32_t gopRemainingIntra_ = {}, uint32_t gopRemainingPredictive_ = {}, uint32_t gopRemainingBipredictive_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , useGopRemainingFrames{ useGopRemainingFrames_ } , gopRemainingIntra{ gopRemainingIntra_ } , gopRemainingPredictive{ gopRemainingPredictive_ } , gopRemainingBipredictive{ gopRemainingBipredictive_ } { } VULKAN_HPP_CONSTEXPR VideoEncodeAV1GopRemainingFrameInfoKHR( VideoEncodeAV1GopRemainingFrameInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoEncodeAV1GopRemainingFrameInfoKHR( VkVideoEncodeAV1GopRemainingFrameInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoEncodeAV1GopRemainingFrameInfoKHR( *reinterpret_cast( &rhs ) ) { } VideoEncodeAV1GopRemainingFrameInfoKHR & operator=( VideoEncodeAV1GopRemainingFrameInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoEncodeAV1GopRemainingFrameInfoKHR & operator=( VkVideoEncodeAV1GopRemainingFrameInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 VideoEncodeAV1GopRemainingFrameInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeAV1GopRemainingFrameInfoKHR & setUseGopRemainingFrames( VULKAN_HPP_NAMESPACE::Bool32 useGopRemainingFrames_ ) VULKAN_HPP_NOEXCEPT { useGopRemainingFrames = useGopRemainingFrames_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeAV1GopRemainingFrameInfoKHR & setGopRemainingIntra( uint32_t gopRemainingIntra_ ) VULKAN_HPP_NOEXCEPT { gopRemainingIntra = gopRemainingIntra_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeAV1GopRemainingFrameInfoKHR & setGopRemainingPredictive( uint32_t gopRemainingPredictive_ ) VULKAN_HPP_NOEXCEPT { gopRemainingPredictive = gopRemainingPredictive_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeAV1GopRemainingFrameInfoKHR & setGopRemainingBipredictive( uint32_t gopRemainingBipredictive_ ) VULKAN_HPP_NOEXCEPT { gopRemainingBipredictive = gopRemainingBipredictive_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkVideoEncodeAV1GopRemainingFrameInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoEncodeAV1GopRemainingFrameInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, useGopRemainingFrames, gopRemainingIntra, gopRemainingPredictive, gopRemainingBipredictive ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( VideoEncodeAV1GopRemainingFrameInfoKHR const & ) const = default; #else bool operator==( VideoEncodeAV1GopRemainingFrameInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( useGopRemainingFrames == rhs.useGopRemainingFrames ) && ( gopRemainingIntra == rhs.gopRemainingIntra ) && ( gopRemainingPredictive == rhs.gopRemainingPredictive ) && ( gopRemainingBipredictive == rhs.gopRemainingBipredictive ); # endif } bool operator!=( VideoEncodeAV1GopRemainingFrameInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoEncodeAv1GopRemainingFrameInfoKHR; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 useGopRemainingFrames = {}; uint32_t gopRemainingIntra = {}; uint32_t gopRemainingPredictive = {}; uint32_t gopRemainingBipredictive = {}; }; template <> struct CppType { using Type = VideoEncodeAV1GopRemainingFrameInfoKHR; }; struct VideoEncodeAV1PictureInfoKHR { using NativeType = VkVideoEncodeAV1PictureInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoEncodeAv1PictureInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 VideoEncodeAV1PictureInfoKHR( VULKAN_HPP_NAMESPACE::VideoEncodeAV1PredictionModeKHR predictionMode_ = VULKAN_HPP_NAMESPACE::VideoEncodeAV1PredictionModeKHR::eIntraOnly, VULKAN_HPP_NAMESPACE::VideoEncodeAV1RateControlGroupKHR rateControlGroup_ = VULKAN_HPP_NAMESPACE::VideoEncodeAV1RateControlGroupKHR::eIntra, uint32_t constantQIndex_ = {}, const StdVideoEncodeAV1PictureInfo * pStdPictureInfo_ = {}, std::array const & referenceNameSlotIndices_ = {}, VULKAN_HPP_NAMESPACE::Bool32 primaryReferenceCdfOnly_ = {}, VULKAN_HPP_NAMESPACE::Bool32 generateObuExtensionHeader_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , predictionMode{ predictionMode_ } , rateControlGroup{ rateControlGroup_ } , constantQIndex{ constantQIndex_ } , pStdPictureInfo{ pStdPictureInfo_ } , referenceNameSlotIndices{ referenceNameSlotIndices_ } , primaryReferenceCdfOnly{ primaryReferenceCdfOnly_ } , generateObuExtensionHeader{ generateObuExtensionHeader_ } { } VULKAN_HPP_CONSTEXPR_14 VideoEncodeAV1PictureInfoKHR( VideoEncodeAV1PictureInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoEncodeAV1PictureInfoKHR( VkVideoEncodeAV1PictureInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoEncodeAV1PictureInfoKHR( *reinterpret_cast( &rhs ) ) { } VideoEncodeAV1PictureInfoKHR & operator=( VideoEncodeAV1PictureInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoEncodeAV1PictureInfoKHR & operator=( VkVideoEncodeAV1PictureInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 VideoEncodeAV1PictureInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeAV1PictureInfoKHR & setPredictionMode( VULKAN_HPP_NAMESPACE::VideoEncodeAV1PredictionModeKHR predictionMode_ ) VULKAN_HPP_NOEXCEPT { predictionMode = predictionMode_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeAV1PictureInfoKHR & setRateControlGroup( VULKAN_HPP_NAMESPACE::VideoEncodeAV1RateControlGroupKHR rateControlGroup_ ) VULKAN_HPP_NOEXCEPT { rateControlGroup = rateControlGroup_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeAV1PictureInfoKHR & setConstantQIndex( uint32_t constantQIndex_ ) VULKAN_HPP_NOEXCEPT { constantQIndex = constantQIndex_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeAV1PictureInfoKHR & setPStdPictureInfo( const StdVideoEncodeAV1PictureInfo * pStdPictureInfo_ ) VULKAN_HPP_NOEXCEPT { pStdPictureInfo = pStdPictureInfo_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeAV1PictureInfoKHR & setReferenceNameSlotIndices( std::array referenceNameSlotIndices_ ) VULKAN_HPP_NOEXCEPT { referenceNameSlotIndices = referenceNameSlotIndices_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeAV1PictureInfoKHR & setPrimaryReferenceCdfOnly( VULKAN_HPP_NAMESPACE::Bool32 primaryReferenceCdfOnly_ ) VULKAN_HPP_NOEXCEPT { primaryReferenceCdfOnly = primaryReferenceCdfOnly_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeAV1PictureInfoKHR & setGenerateObuExtensionHeader( VULKAN_HPP_NAMESPACE::Bool32 generateObuExtensionHeader_ ) VULKAN_HPP_NOEXCEPT { generateObuExtensionHeader = generateObuExtensionHeader_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkVideoEncodeAV1PictureInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoEncodeAV1PictureInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple const &, VULKAN_HPP_NAMESPACE::Bool32 const &, VULKAN_HPP_NAMESPACE::Bool32 const &> # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, predictionMode, rateControlGroup, constantQIndex, pStdPictureInfo, referenceNameSlotIndices, primaryReferenceCdfOnly, generateObuExtensionHeader ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( VideoEncodeAV1PictureInfoKHR const & ) const = default; #else bool operator==( VideoEncodeAV1PictureInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( predictionMode == rhs.predictionMode ) && ( rateControlGroup == rhs.rateControlGroup ) && ( constantQIndex == rhs.constantQIndex ) && ( pStdPictureInfo == rhs.pStdPictureInfo ) && ( referenceNameSlotIndices == rhs.referenceNameSlotIndices ) && ( primaryReferenceCdfOnly == rhs.primaryReferenceCdfOnly ) && ( generateObuExtensionHeader == rhs.generateObuExtensionHeader ); # endif } bool operator!=( VideoEncodeAV1PictureInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoEncodeAv1PictureInfoKHR; const void * pNext = {}; VULKAN_HPP_NAMESPACE::VideoEncodeAV1PredictionModeKHR predictionMode = VULKAN_HPP_NAMESPACE::VideoEncodeAV1PredictionModeKHR::eIntraOnly; VULKAN_HPP_NAMESPACE::VideoEncodeAV1RateControlGroupKHR rateControlGroup = VULKAN_HPP_NAMESPACE::VideoEncodeAV1RateControlGroupKHR::eIntra; uint32_t constantQIndex = {}; const StdVideoEncodeAV1PictureInfo * pStdPictureInfo = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D referenceNameSlotIndices = {}; VULKAN_HPP_NAMESPACE::Bool32 primaryReferenceCdfOnly = {}; VULKAN_HPP_NAMESPACE::Bool32 generateObuExtensionHeader = {}; }; template <> struct CppType { using Type = VideoEncodeAV1PictureInfoKHR; }; struct VideoEncodeAV1ProfileInfoKHR { using NativeType = VkVideoEncodeAV1ProfileInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoEncodeAv1ProfileInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoEncodeAV1ProfileInfoKHR( StdVideoAV1Profile stdProfile_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , stdProfile{ stdProfile_ } { } VULKAN_HPP_CONSTEXPR VideoEncodeAV1ProfileInfoKHR( VideoEncodeAV1ProfileInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoEncodeAV1ProfileInfoKHR( VkVideoEncodeAV1ProfileInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoEncodeAV1ProfileInfoKHR( *reinterpret_cast( &rhs ) ) { } VideoEncodeAV1ProfileInfoKHR & operator=( VideoEncodeAV1ProfileInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoEncodeAV1ProfileInfoKHR & operator=( VkVideoEncodeAV1ProfileInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 VideoEncodeAV1ProfileInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeAV1ProfileInfoKHR & setStdProfile( StdVideoAV1Profile stdProfile_ ) VULKAN_HPP_NOEXCEPT { stdProfile = stdProfile_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkVideoEncodeAV1ProfileInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoEncodeAV1ProfileInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, stdProfile ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) std::strong_ordering operator<=>( VideoEncodeAV1ProfileInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { if ( auto cmp = sType <=> rhs.sType; cmp != 0 ) return cmp; if ( auto cmp = pNext <=> rhs.pNext; cmp != 0 ) return cmp; if ( auto cmp = memcmp( &stdProfile, &rhs.stdProfile, sizeof( StdVideoAV1Profile ) ); cmp != 0 ) return ( cmp < 0 ) ? std::strong_ordering::less : std::strong_ordering::greater; return std::strong_ordering::equivalent; } #endif bool operator==( VideoEncodeAV1ProfileInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( memcmp( &stdProfile, &rhs.stdProfile, sizeof( StdVideoAV1Profile ) ) == 0 ); } bool operator!=( VideoEncodeAV1ProfileInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoEncodeAv1ProfileInfoKHR; const void * pNext = {}; StdVideoAV1Profile stdProfile = {}; }; template <> struct CppType { using Type = VideoEncodeAV1ProfileInfoKHR; }; struct VideoEncodeAV1QIndexKHR { using NativeType = VkVideoEncodeAV1QIndexKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoEncodeAV1QIndexKHR( uint32_t intraQIndex_ = {}, uint32_t predictiveQIndex_ = {}, uint32_t bipredictiveQIndex_ = {} ) VULKAN_HPP_NOEXCEPT : intraQIndex{ intraQIndex_ } , predictiveQIndex{ predictiveQIndex_ } , bipredictiveQIndex{ bipredictiveQIndex_ } { } VULKAN_HPP_CONSTEXPR VideoEncodeAV1QIndexKHR( VideoEncodeAV1QIndexKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoEncodeAV1QIndexKHR( VkVideoEncodeAV1QIndexKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoEncodeAV1QIndexKHR( *reinterpret_cast( &rhs ) ) { } VideoEncodeAV1QIndexKHR & operator=( VideoEncodeAV1QIndexKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoEncodeAV1QIndexKHR & operator=( VkVideoEncodeAV1QIndexKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 VideoEncodeAV1QIndexKHR & setIntraQIndex( uint32_t intraQIndex_ ) VULKAN_HPP_NOEXCEPT { intraQIndex = intraQIndex_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeAV1QIndexKHR & setPredictiveQIndex( uint32_t predictiveQIndex_ ) VULKAN_HPP_NOEXCEPT { predictiveQIndex = predictiveQIndex_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeAV1QIndexKHR & setBipredictiveQIndex( uint32_t bipredictiveQIndex_ ) VULKAN_HPP_NOEXCEPT { bipredictiveQIndex = bipredictiveQIndex_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkVideoEncodeAV1QIndexKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoEncodeAV1QIndexKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( intraQIndex, predictiveQIndex, bipredictiveQIndex ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( VideoEncodeAV1QIndexKHR const & ) const = default; #else bool operator==( VideoEncodeAV1QIndexKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( intraQIndex == rhs.intraQIndex ) && ( predictiveQIndex == rhs.predictiveQIndex ) && ( bipredictiveQIndex == rhs.bipredictiveQIndex ); # endif } bool operator!=( VideoEncodeAV1QIndexKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: uint32_t intraQIndex = {}; uint32_t predictiveQIndex = {}; uint32_t bipredictiveQIndex = {}; }; struct VideoEncodeAV1QualityLevelPropertiesKHR { using NativeType = VkVideoEncodeAV1QualityLevelPropertiesKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoEncodeAv1QualityLevelPropertiesKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoEncodeAV1QualityLevelPropertiesKHR( VULKAN_HPP_NAMESPACE::VideoEncodeAV1RateControlFlagsKHR preferredRateControlFlags_ = {}, uint32_t preferredGopFrameCount_ = {}, uint32_t preferredKeyFramePeriod_ = {}, uint32_t preferredConsecutiveBipredictiveFrameCount_ = {}, uint32_t preferredTemporalLayerCount_ = {}, VULKAN_HPP_NAMESPACE::VideoEncodeAV1QIndexKHR preferredConstantQIndex_ = {}, uint32_t preferredMaxSingleReferenceCount_ = {}, uint32_t preferredSingleReferenceNameMask_ = {}, uint32_t preferredMaxUnidirectionalCompoundReferenceCount_ = {}, uint32_t preferredMaxUnidirectionalCompoundGroup1ReferenceCount_ = {}, uint32_t preferredUnidirectionalCompoundReferenceNameMask_ = {}, uint32_t preferredMaxBidirectionalCompoundReferenceCount_ = {}, uint32_t preferredMaxBidirectionalCompoundGroup1ReferenceCount_ = {}, uint32_t preferredMaxBidirectionalCompoundGroup2ReferenceCount_ = {}, uint32_t preferredBidirectionalCompoundReferenceNameMask_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , preferredRateControlFlags{ preferredRateControlFlags_ } , preferredGopFrameCount{ preferredGopFrameCount_ } , preferredKeyFramePeriod{ preferredKeyFramePeriod_ } , preferredConsecutiveBipredictiveFrameCount{ preferredConsecutiveBipredictiveFrameCount_ } , preferredTemporalLayerCount{ preferredTemporalLayerCount_ } , preferredConstantQIndex{ preferredConstantQIndex_ } , preferredMaxSingleReferenceCount{ preferredMaxSingleReferenceCount_ } , preferredSingleReferenceNameMask{ preferredSingleReferenceNameMask_ } , preferredMaxUnidirectionalCompoundReferenceCount{ preferredMaxUnidirectionalCompoundReferenceCount_ } , preferredMaxUnidirectionalCompoundGroup1ReferenceCount{ preferredMaxUnidirectionalCompoundGroup1ReferenceCount_ } , preferredUnidirectionalCompoundReferenceNameMask{ preferredUnidirectionalCompoundReferenceNameMask_ } , preferredMaxBidirectionalCompoundReferenceCount{ preferredMaxBidirectionalCompoundReferenceCount_ } , preferredMaxBidirectionalCompoundGroup1ReferenceCount{ preferredMaxBidirectionalCompoundGroup1ReferenceCount_ } , preferredMaxBidirectionalCompoundGroup2ReferenceCount{ preferredMaxBidirectionalCompoundGroup2ReferenceCount_ } , preferredBidirectionalCompoundReferenceNameMask{ preferredBidirectionalCompoundReferenceNameMask_ } { } VULKAN_HPP_CONSTEXPR VideoEncodeAV1QualityLevelPropertiesKHR( VideoEncodeAV1QualityLevelPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoEncodeAV1QualityLevelPropertiesKHR( VkVideoEncodeAV1QualityLevelPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoEncodeAV1QualityLevelPropertiesKHR( *reinterpret_cast( &rhs ) ) { } VideoEncodeAV1QualityLevelPropertiesKHR & operator=( VideoEncodeAV1QualityLevelPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoEncodeAV1QualityLevelPropertiesKHR & operator=( VkVideoEncodeAV1QualityLevelPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkVideoEncodeAV1QualityLevelPropertiesKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoEncodeAV1QualityLevelPropertiesKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, preferredRateControlFlags, preferredGopFrameCount, preferredKeyFramePeriod, preferredConsecutiveBipredictiveFrameCount, preferredTemporalLayerCount, preferredConstantQIndex, preferredMaxSingleReferenceCount, preferredSingleReferenceNameMask, preferredMaxUnidirectionalCompoundReferenceCount, preferredMaxUnidirectionalCompoundGroup1ReferenceCount, preferredUnidirectionalCompoundReferenceNameMask, preferredMaxBidirectionalCompoundReferenceCount, preferredMaxBidirectionalCompoundGroup1ReferenceCount, preferredMaxBidirectionalCompoundGroup2ReferenceCount, preferredBidirectionalCompoundReferenceNameMask ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( VideoEncodeAV1QualityLevelPropertiesKHR const & ) const = default; #else bool operator==( VideoEncodeAV1QualityLevelPropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( preferredRateControlFlags == rhs.preferredRateControlFlags ) && ( preferredGopFrameCount == rhs.preferredGopFrameCount ) && ( preferredKeyFramePeriod == rhs.preferredKeyFramePeriod ) && ( preferredConsecutiveBipredictiveFrameCount == rhs.preferredConsecutiveBipredictiveFrameCount ) && ( preferredTemporalLayerCount == rhs.preferredTemporalLayerCount ) && ( preferredConstantQIndex == rhs.preferredConstantQIndex ) && ( preferredMaxSingleReferenceCount == rhs.preferredMaxSingleReferenceCount ) && ( preferredSingleReferenceNameMask == rhs.preferredSingleReferenceNameMask ) && ( preferredMaxUnidirectionalCompoundReferenceCount == rhs.preferredMaxUnidirectionalCompoundReferenceCount ) && ( preferredMaxUnidirectionalCompoundGroup1ReferenceCount == rhs.preferredMaxUnidirectionalCompoundGroup1ReferenceCount ) && ( preferredUnidirectionalCompoundReferenceNameMask == rhs.preferredUnidirectionalCompoundReferenceNameMask ) && ( preferredMaxBidirectionalCompoundReferenceCount == rhs.preferredMaxBidirectionalCompoundReferenceCount ) && ( preferredMaxBidirectionalCompoundGroup1ReferenceCount == rhs.preferredMaxBidirectionalCompoundGroup1ReferenceCount ) && ( preferredMaxBidirectionalCompoundGroup2ReferenceCount == rhs.preferredMaxBidirectionalCompoundGroup2ReferenceCount ) && ( preferredBidirectionalCompoundReferenceNameMask == rhs.preferredBidirectionalCompoundReferenceNameMask ); # endif } bool operator!=( VideoEncodeAV1QualityLevelPropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoEncodeAv1QualityLevelPropertiesKHR; void * pNext = {}; VULKAN_HPP_NAMESPACE::VideoEncodeAV1RateControlFlagsKHR preferredRateControlFlags = {}; uint32_t preferredGopFrameCount = {}; uint32_t preferredKeyFramePeriod = {}; uint32_t preferredConsecutiveBipredictiveFrameCount = {}; uint32_t preferredTemporalLayerCount = {}; VULKAN_HPP_NAMESPACE::VideoEncodeAV1QIndexKHR preferredConstantQIndex = {}; uint32_t preferredMaxSingleReferenceCount = {}; uint32_t preferredSingleReferenceNameMask = {}; uint32_t preferredMaxUnidirectionalCompoundReferenceCount = {}; uint32_t preferredMaxUnidirectionalCompoundGroup1ReferenceCount = {}; uint32_t preferredUnidirectionalCompoundReferenceNameMask = {}; uint32_t preferredMaxBidirectionalCompoundReferenceCount = {}; uint32_t preferredMaxBidirectionalCompoundGroup1ReferenceCount = {}; uint32_t preferredMaxBidirectionalCompoundGroup2ReferenceCount = {}; uint32_t preferredBidirectionalCompoundReferenceNameMask = {}; }; template <> struct CppType { using Type = VideoEncodeAV1QualityLevelPropertiesKHR; }; struct VideoEncodeAV1QuantizationMapCapabilitiesKHR { using NativeType = VkVideoEncodeAV1QuantizationMapCapabilitiesKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoEncodeAv1QuantizationMapCapabilitiesKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoEncodeAV1QuantizationMapCapabilitiesKHR( int32_t minQIndexDelta_ = {}, int32_t maxQIndexDelta_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , minQIndexDelta{ minQIndexDelta_ } , maxQIndexDelta{ maxQIndexDelta_ } { } VULKAN_HPP_CONSTEXPR VideoEncodeAV1QuantizationMapCapabilitiesKHR( VideoEncodeAV1QuantizationMapCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoEncodeAV1QuantizationMapCapabilitiesKHR( VkVideoEncodeAV1QuantizationMapCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoEncodeAV1QuantizationMapCapabilitiesKHR( *reinterpret_cast( &rhs ) ) { } VideoEncodeAV1QuantizationMapCapabilitiesKHR & operator=( VideoEncodeAV1QuantizationMapCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoEncodeAV1QuantizationMapCapabilitiesKHR & operator=( VkVideoEncodeAV1QuantizationMapCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkVideoEncodeAV1QuantizationMapCapabilitiesKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoEncodeAV1QuantizationMapCapabilitiesKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, minQIndexDelta, maxQIndexDelta ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( VideoEncodeAV1QuantizationMapCapabilitiesKHR const & ) const = default; #else bool operator==( VideoEncodeAV1QuantizationMapCapabilitiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( minQIndexDelta == rhs.minQIndexDelta ) && ( maxQIndexDelta == rhs.maxQIndexDelta ); # endif } bool operator!=( VideoEncodeAV1QuantizationMapCapabilitiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoEncodeAv1QuantizationMapCapabilitiesKHR; void * pNext = {}; int32_t minQIndexDelta = {}; int32_t maxQIndexDelta = {}; }; template <> struct CppType { using Type = VideoEncodeAV1QuantizationMapCapabilitiesKHR; }; struct VideoEncodeAV1RateControlInfoKHR { using NativeType = VkVideoEncodeAV1RateControlInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoEncodeAv1RateControlInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoEncodeAV1RateControlInfoKHR( VULKAN_HPP_NAMESPACE::VideoEncodeAV1RateControlFlagsKHR flags_ = {}, uint32_t gopFrameCount_ = {}, uint32_t keyFramePeriod_ = {}, uint32_t consecutiveBipredictiveFrameCount_ = {}, uint32_t temporalLayerCount_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , gopFrameCount{ gopFrameCount_ } , keyFramePeriod{ keyFramePeriod_ } , consecutiveBipredictiveFrameCount{ consecutiveBipredictiveFrameCount_ } , temporalLayerCount{ temporalLayerCount_ } { } VULKAN_HPP_CONSTEXPR VideoEncodeAV1RateControlInfoKHR( VideoEncodeAV1RateControlInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoEncodeAV1RateControlInfoKHR( VkVideoEncodeAV1RateControlInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoEncodeAV1RateControlInfoKHR( *reinterpret_cast( &rhs ) ) { } VideoEncodeAV1RateControlInfoKHR & operator=( VideoEncodeAV1RateControlInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoEncodeAV1RateControlInfoKHR & operator=( VkVideoEncodeAV1RateControlInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 VideoEncodeAV1RateControlInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeAV1RateControlInfoKHR & setFlags( VULKAN_HPP_NAMESPACE::VideoEncodeAV1RateControlFlagsKHR flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeAV1RateControlInfoKHR & setGopFrameCount( uint32_t gopFrameCount_ ) VULKAN_HPP_NOEXCEPT { gopFrameCount = gopFrameCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeAV1RateControlInfoKHR & setKeyFramePeriod( uint32_t keyFramePeriod_ ) VULKAN_HPP_NOEXCEPT { keyFramePeriod = keyFramePeriod_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeAV1RateControlInfoKHR & setConsecutiveBipredictiveFrameCount( uint32_t consecutiveBipredictiveFrameCount_ ) VULKAN_HPP_NOEXCEPT { consecutiveBipredictiveFrameCount = consecutiveBipredictiveFrameCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeAV1RateControlInfoKHR & setTemporalLayerCount( uint32_t temporalLayerCount_ ) VULKAN_HPP_NOEXCEPT { temporalLayerCount = temporalLayerCount_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkVideoEncodeAV1RateControlInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoEncodeAV1RateControlInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, gopFrameCount, keyFramePeriod, consecutiveBipredictiveFrameCount, temporalLayerCount ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( VideoEncodeAV1RateControlInfoKHR const & ) const = default; #else bool operator==( VideoEncodeAV1RateControlInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( gopFrameCount == rhs.gopFrameCount ) && ( keyFramePeriod == rhs.keyFramePeriod ) && ( consecutiveBipredictiveFrameCount == rhs.consecutiveBipredictiveFrameCount ) && ( temporalLayerCount == rhs.temporalLayerCount ); # endif } bool operator!=( VideoEncodeAV1RateControlInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoEncodeAv1RateControlInfoKHR; const void * pNext = {}; VULKAN_HPP_NAMESPACE::VideoEncodeAV1RateControlFlagsKHR flags = {}; uint32_t gopFrameCount = {}; uint32_t keyFramePeriod = {}; uint32_t consecutiveBipredictiveFrameCount = {}; uint32_t temporalLayerCount = {}; }; template <> struct CppType { using Type = VideoEncodeAV1RateControlInfoKHR; }; struct VideoEncodeAV1RateControlLayerInfoKHR { using NativeType = VkVideoEncodeAV1RateControlLayerInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoEncodeAv1RateControlLayerInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoEncodeAV1RateControlLayerInfoKHR( VULKAN_HPP_NAMESPACE::Bool32 useMinQIndex_ = {}, VULKAN_HPP_NAMESPACE::VideoEncodeAV1QIndexKHR minQIndex_ = {}, VULKAN_HPP_NAMESPACE::Bool32 useMaxQIndex_ = {}, VULKAN_HPP_NAMESPACE::VideoEncodeAV1QIndexKHR maxQIndex_ = {}, VULKAN_HPP_NAMESPACE::Bool32 useMaxFrameSize_ = {}, VULKAN_HPP_NAMESPACE::VideoEncodeAV1FrameSizeKHR maxFrameSize_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , useMinQIndex{ useMinQIndex_ } , minQIndex{ minQIndex_ } , useMaxQIndex{ useMaxQIndex_ } , maxQIndex{ maxQIndex_ } , useMaxFrameSize{ useMaxFrameSize_ } , maxFrameSize{ maxFrameSize_ } { } VULKAN_HPP_CONSTEXPR VideoEncodeAV1RateControlLayerInfoKHR( VideoEncodeAV1RateControlLayerInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoEncodeAV1RateControlLayerInfoKHR( VkVideoEncodeAV1RateControlLayerInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoEncodeAV1RateControlLayerInfoKHR( *reinterpret_cast( &rhs ) ) { } VideoEncodeAV1RateControlLayerInfoKHR & operator=( VideoEncodeAV1RateControlLayerInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoEncodeAV1RateControlLayerInfoKHR & operator=( VkVideoEncodeAV1RateControlLayerInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 VideoEncodeAV1RateControlLayerInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeAV1RateControlLayerInfoKHR & setUseMinQIndex( VULKAN_HPP_NAMESPACE::Bool32 useMinQIndex_ ) VULKAN_HPP_NOEXCEPT { useMinQIndex = useMinQIndex_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeAV1RateControlLayerInfoKHR & setMinQIndex( VULKAN_HPP_NAMESPACE::VideoEncodeAV1QIndexKHR const & minQIndex_ ) VULKAN_HPP_NOEXCEPT { minQIndex = minQIndex_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeAV1RateControlLayerInfoKHR & setUseMaxQIndex( VULKAN_HPP_NAMESPACE::Bool32 useMaxQIndex_ ) VULKAN_HPP_NOEXCEPT { useMaxQIndex = useMaxQIndex_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeAV1RateControlLayerInfoKHR & setMaxQIndex( VULKAN_HPP_NAMESPACE::VideoEncodeAV1QIndexKHR const & maxQIndex_ ) VULKAN_HPP_NOEXCEPT { maxQIndex = maxQIndex_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeAV1RateControlLayerInfoKHR & setUseMaxFrameSize( VULKAN_HPP_NAMESPACE::Bool32 useMaxFrameSize_ ) VULKAN_HPP_NOEXCEPT { useMaxFrameSize = useMaxFrameSize_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeAV1RateControlLayerInfoKHR & setMaxFrameSize( VULKAN_HPP_NAMESPACE::VideoEncodeAV1FrameSizeKHR const & maxFrameSize_ ) VULKAN_HPP_NOEXCEPT { maxFrameSize = maxFrameSize_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkVideoEncodeAV1RateControlLayerInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoEncodeAV1RateControlLayerInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, useMinQIndex, minQIndex, useMaxQIndex, maxQIndex, useMaxFrameSize, maxFrameSize ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( VideoEncodeAV1RateControlLayerInfoKHR const & ) const = default; #else bool operator==( VideoEncodeAV1RateControlLayerInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( useMinQIndex == rhs.useMinQIndex ) && ( minQIndex == rhs.minQIndex ) && ( useMaxQIndex == rhs.useMaxQIndex ) && ( maxQIndex == rhs.maxQIndex ) && ( useMaxFrameSize == rhs.useMaxFrameSize ) && ( maxFrameSize == rhs.maxFrameSize ); # endif } bool operator!=( VideoEncodeAV1RateControlLayerInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoEncodeAv1RateControlLayerInfoKHR; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 useMinQIndex = {}; VULKAN_HPP_NAMESPACE::VideoEncodeAV1QIndexKHR minQIndex = {}; VULKAN_HPP_NAMESPACE::Bool32 useMaxQIndex = {}; VULKAN_HPP_NAMESPACE::VideoEncodeAV1QIndexKHR maxQIndex = {}; VULKAN_HPP_NAMESPACE::Bool32 useMaxFrameSize = {}; VULKAN_HPP_NAMESPACE::VideoEncodeAV1FrameSizeKHR maxFrameSize = {}; }; template <> struct CppType { using Type = VideoEncodeAV1RateControlLayerInfoKHR; }; struct VideoEncodeAV1SessionCreateInfoKHR { using NativeType = VkVideoEncodeAV1SessionCreateInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoEncodeAv1SessionCreateInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoEncodeAV1SessionCreateInfoKHR( VULKAN_HPP_NAMESPACE::Bool32 useMaxLevel_ = {}, StdVideoAV1Level maxLevel_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , useMaxLevel{ useMaxLevel_ } , maxLevel{ maxLevel_ } { } VULKAN_HPP_CONSTEXPR VideoEncodeAV1SessionCreateInfoKHR( VideoEncodeAV1SessionCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoEncodeAV1SessionCreateInfoKHR( VkVideoEncodeAV1SessionCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoEncodeAV1SessionCreateInfoKHR( *reinterpret_cast( &rhs ) ) { } VideoEncodeAV1SessionCreateInfoKHR & operator=( VideoEncodeAV1SessionCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoEncodeAV1SessionCreateInfoKHR & operator=( VkVideoEncodeAV1SessionCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 VideoEncodeAV1SessionCreateInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeAV1SessionCreateInfoKHR & setUseMaxLevel( VULKAN_HPP_NAMESPACE::Bool32 useMaxLevel_ ) VULKAN_HPP_NOEXCEPT { useMaxLevel = useMaxLevel_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeAV1SessionCreateInfoKHR & setMaxLevel( StdVideoAV1Level maxLevel_ ) VULKAN_HPP_NOEXCEPT { maxLevel = maxLevel_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkVideoEncodeAV1SessionCreateInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoEncodeAV1SessionCreateInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, useMaxLevel, maxLevel ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) std::strong_ordering operator<=>( VideoEncodeAV1SessionCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { if ( auto cmp = sType <=> rhs.sType; cmp != 0 ) return cmp; if ( auto cmp = pNext <=> rhs.pNext; cmp != 0 ) return cmp; if ( auto cmp = useMaxLevel <=> rhs.useMaxLevel; cmp != 0 ) return cmp; if ( auto cmp = memcmp( &maxLevel, &rhs.maxLevel, sizeof( StdVideoAV1Level ) ); cmp != 0 ) return ( cmp < 0 ) ? std::strong_ordering::less : std::strong_ordering::greater; return std::strong_ordering::equivalent; } #endif bool operator==( VideoEncodeAV1SessionCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( useMaxLevel == rhs.useMaxLevel ) && ( memcmp( &maxLevel, &rhs.maxLevel, sizeof( StdVideoAV1Level ) ) == 0 ); } bool operator!=( VideoEncodeAV1SessionCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoEncodeAv1SessionCreateInfoKHR; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 useMaxLevel = {}; StdVideoAV1Level maxLevel = {}; }; template <> struct CppType { using Type = VideoEncodeAV1SessionCreateInfoKHR; }; struct VideoEncodeAV1SessionParametersCreateInfoKHR { using NativeType = VkVideoEncodeAV1SessionParametersCreateInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoEncodeAv1SessionParametersCreateInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoEncodeAV1SessionParametersCreateInfoKHR( const StdVideoAV1SequenceHeader * pStdSequenceHeader_ = {}, const StdVideoEncodeAV1DecoderModelInfo * pStdDecoderModelInfo_ = {}, uint32_t stdOperatingPointCount_ = {}, const StdVideoEncodeAV1OperatingPointInfo * pStdOperatingPoints_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , pStdSequenceHeader{ pStdSequenceHeader_ } , pStdDecoderModelInfo{ pStdDecoderModelInfo_ } , stdOperatingPointCount{ stdOperatingPointCount_ } , pStdOperatingPoints{ pStdOperatingPoints_ } { } VULKAN_HPP_CONSTEXPR VideoEncodeAV1SessionParametersCreateInfoKHR( VideoEncodeAV1SessionParametersCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoEncodeAV1SessionParametersCreateInfoKHR( VkVideoEncodeAV1SessionParametersCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoEncodeAV1SessionParametersCreateInfoKHR( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) VideoEncodeAV1SessionParametersCreateInfoKHR( const StdVideoAV1SequenceHeader * pStdSequenceHeader_, const StdVideoEncodeAV1DecoderModelInfo * pStdDecoderModelInfo_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & stdOperatingPoints_, const void * pNext_ = nullptr ) : pNext( pNext_ ) , pStdSequenceHeader( pStdSequenceHeader_ ) , pStdDecoderModelInfo( pStdDecoderModelInfo_ ) , stdOperatingPointCount( static_cast( stdOperatingPoints_.size() ) ) , pStdOperatingPoints( stdOperatingPoints_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VideoEncodeAV1SessionParametersCreateInfoKHR & operator=( VideoEncodeAV1SessionParametersCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoEncodeAV1SessionParametersCreateInfoKHR & operator=( VkVideoEncodeAV1SessionParametersCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 VideoEncodeAV1SessionParametersCreateInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeAV1SessionParametersCreateInfoKHR & setPStdSequenceHeader( const StdVideoAV1SequenceHeader * pStdSequenceHeader_ ) VULKAN_HPP_NOEXCEPT { pStdSequenceHeader = pStdSequenceHeader_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeAV1SessionParametersCreateInfoKHR & setPStdDecoderModelInfo( const StdVideoEncodeAV1DecoderModelInfo * pStdDecoderModelInfo_ ) VULKAN_HPP_NOEXCEPT { pStdDecoderModelInfo = pStdDecoderModelInfo_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeAV1SessionParametersCreateInfoKHR & setStdOperatingPointCount( uint32_t stdOperatingPointCount_ ) VULKAN_HPP_NOEXCEPT { stdOperatingPointCount = stdOperatingPointCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeAV1SessionParametersCreateInfoKHR & setPStdOperatingPoints( const StdVideoEncodeAV1OperatingPointInfo * pStdOperatingPoints_ ) VULKAN_HPP_NOEXCEPT { pStdOperatingPoints = pStdOperatingPoints_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) VideoEncodeAV1SessionParametersCreateInfoKHR & setStdOperatingPoints( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & stdOperatingPoints_ ) VULKAN_HPP_NOEXCEPT { stdOperatingPointCount = static_cast( stdOperatingPoints_.size() ); pStdOperatingPoints = stdOperatingPoints_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkVideoEncodeAV1SessionParametersCreateInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoEncodeAV1SessionParametersCreateInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, pStdSequenceHeader, pStdDecoderModelInfo, stdOperatingPointCount, pStdOperatingPoints ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( VideoEncodeAV1SessionParametersCreateInfoKHR const & ) const = default; #else bool operator==( VideoEncodeAV1SessionParametersCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( pStdSequenceHeader == rhs.pStdSequenceHeader ) && ( pStdDecoderModelInfo == rhs.pStdDecoderModelInfo ) && ( stdOperatingPointCount == rhs.stdOperatingPointCount ) && ( pStdOperatingPoints == rhs.pStdOperatingPoints ); # endif } bool operator!=( VideoEncodeAV1SessionParametersCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoEncodeAv1SessionParametersCreateInfoKHR; const void * pNext = {}; const StdVideoAV1SequenceHeader * pStdSequenceHeader = {}; const StdVideoEncodeAV1DecoderModelInfo * pStdDecoderModelInfo = {}; uint32_t stdOperatingPointCount = {}; const StdVideoEncodeAV1OperatingPointInfo * pStdOperatingPoints = {}; }; template <> struct CppType { using Type = VideoEncodeAV1SessionParametersCreateInfoKHR; }; struct VideoEncodeCapabilitiesKHR { using NativeType = VkVideoEncodeCapabilitiesKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoEncodeCapabilitiesKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoEncodeCapabilitiesKHR( VULKAN_HPP_NAMESPACE::VideoEncodeCapabilityFlagsKHR flags_ = {}, VULKAN_HPP_NAMESPACE::VideoEncodeRateControlModeFlagsKHR rateControlModes_ = {}, uint32_t maxRateControlLayers_ = {}, uint64_t maxBitrate_ = {}, uint32_t maxQualityLevels_ = {}, VULKAN_HPP_NAMESPACE::Extent2D encodeInputPictureGranularity_ = {}, VULKAN_HPP_NAMESPACE::VideoEncodeFeedbackFlagsKHR supportedEncodeFeedbackFlags_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , rateControlModes{ rateControlModes_ } , maxRateControlLayers{ maxRateControlLayers_ } , maxBitrate{ maxBitrate_ } , maxQualityLevels{ maxQualityLevels_ } , encodeInputPictureGranularity{ encodeInputPictureGranularity_ } , supportedEncodeFeedbackFlags{ supportedEncodeFeedbackFlags_ } { } VULKAN_HPP_CONSTEXPR VideoEncodeCapabilitiesKHR( VideoEncodeCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoEncodeCapabilitiesKHR( VkVideoEncodeCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoEncodeCapabilitiesKHR( *reinterpret_cast( &rhs ) ) { } VideoEncodeCapabilitiesKHR & operator=( VideoEncodeCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoEncodeCapabilitiesKHR & operator=( VkVideoEncodeCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkVideoEncodeCapabilitiesKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoEncodeCapabilitiesKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, rateControlModes, maxRateControlLayers, maxBitrate, maxQualityLevels, encodeInputPictureGranularity, supportedEncodeFeedbackFlags ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( VideoEncodeCapabilitiesKHR const & ) const = default; #else bool operator==( VideoEncodeCapabilitiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( rateControlModes == rhs.rateControlModes ) && ( maxRateControlLayers == rhs.maxRateControlLayers ) && ( maxBitrate == rhs.maxBitrate ) && ( maxQualityLevels == rhs.maxQualityLevels ) && ( encodeInputPictureGranularity == rhs.encodeInputPictureGranularity ) && ( supportedEncodeFeedbackFlags == rhs.supportedEncodeFeedbackFlags ); # endif } bool operator!=( VideoEncodeCapabilitiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoEncodeCapabilitiesKHR; void * pNext = {}; VULKAN_HPP_NAMESPACE::VideoEncodeCapabilityFlagsKHR flags = {}; VULKAN_HPP_NAMESPACE::VideoEncodeRateControlModeFlagsKHR rateControlModes = {}; uint32_t maxRateControlLayers = {}; uint64_t maxBitrate = {}; uint32_t maxQualityLevels = {}; VULKAN_HPP_NAMESPACE::Extent2D encodeInputPictureGranularity = {}; VULKAN_HPP_NAMESPACE::VideoEncodeFeedbackFlagsKHR supportedEncodeFeedbackFlags = {}; }; template <> struct CppType { using Type = VideoEncodeCapabilitiesKHR; }; struct VideoEncodeH264CapabilitiesKHR { using NativeType = VkVideoEncodeH264CapabilitiesKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoEncodeH264CapabilitiesKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoEncodeH264CapabilitiesKHR( VULKAN_HPP_NAMESPACE::VideoEncodeH264CapabilityFlagsKHR flags_ = {}, StdVideoH264LevelIdc maxLevelIdc_ = {}, uint32_t maxSliceCount_ = {}, uint32_t maxPPictureL0ReferenceCount_ = {}, uint32_t maxBPictureL0ReferenceCount_ = {}, uint32_t maxL1ReferenceCount_ = {}, uint32_t maxTemporalLayerCount_ = {}, VULKAN_HPP_NAMESPACE::Bool32 expectDyadicTemporalLayerPattern_ = {}, int32_t minQp_ = {}, int32_t maxQp_ = {}, VULKAN_HPP_NAMESPACE::Bool32 prefersGopRemainingFrames_ = {}, VULKAN_HPP_NAMESPACE::Bool32 requiresGopRemainingFrames_ = {}, VULKAN_HPP_NAMESPACE::VideoEncodeH264StdFlagsKHR stdSyntaxFlags_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , maxLevelIdc{ maxLevelIdc_ } , maxSliceCount{ maxSliceCount_ } , maxPPictureL0ReferenceCount{ maxPPictureL0ReferenceCount_ } , maxBPictureL0ReferenceCount{ maxBPictureL0ReferenceCount_ } , maxL1ReferenceCount{ maxL1ReferenceCount_ } , maxTemporalLayerCount{ maxTemporalLayerCount_ } , expectDyadicTemporalLayerPattern{ expectDyadicTemporalLayerPattern_ } , minQp{ minQp_ } , maxQp{ maxQp_ } , prefersGopRemainingFrames{ prefersGopRemainingFrames_ } , requiresGopRemainingFrames{ requiresGopRemainingFrames_ } , stdSyntaxFlags{ stdSyntaxFlags_ } { } VULKAN_HPP_CONSTEXPR VideoEncodeH264CapabilitiesKHR( VideoEncodeH264CapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoEncodeH264CapabilitiesKHR( VkVideoEncodeH264CapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoEncodeH264CapabilitiesKHR( *reinterpret_cast( &rhs ) ) { } VideoEncodeH264CapabilitiesKHR & operator=( VideoEncodeH264CapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoEncodeH264CapabilitiesKHR & operator=( VkVideoEncodeH264CapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkVideoEncodeH264CapabilitiesKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoEncodeH264CapabilitiesKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, maxLevelIdc, maxSliceCount, maxPPictureL0ReferenceCount, maxBPictureL0ReferenceCount, maxL1ReferenceCount, maxTemporalLayerCount, expectDyadicTemporalLayerPattern, minQp, maxQp, prefersGopRemainingFrames, requiresGopRemainingFrames, stdSyntaxFlags ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) std::strong_ordering operator<=>( VideoEncodeH264CapabilitiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { if ( auto cmp = sType <=> rhs.sType; cmp != 0 ) return cmp; if ( auto cmp = pNext <=> rhs.pNext; cmp != 0 ) return cmp; if ( auto cmp = flags <=> rhs.flags; cmp != 0 ) return cmp; if ( auto cmp = memcmp( &maxLevelIdc, &rhs.maxLevelIdc, sizeof( StdVideoH264LevelIdc ) ); cmp != 0 ) return ( cmp < 0 ) ? std::strong_ordering::less : std::strong_ordering::greater; if ( auto cmp = maxSliceCount <=> rhs.maxSliceCount; cmp != 0 ) return cmp; if ( auto cmp = maxPPictureL0ReferenceCount <=> rhs.maxPPictureL0ReferenceCount; cmp != 0 ) return cmp; if ( auto cmp = maxBPictureL0ReferenceCount <=> rhs.maxBPictureL0ReferenceCount; cmp != 0 ) return cmp; if ( auto cmp = maxL1ReferenceCount <=> rhs.maxL1ReferenceCount; cmp != 0 ) return cmp; if ( auto cmp = maxTemporalLayerCount <=> rhs.maxTemporalLayerCount; cmp != 0 ) return cmp; if ( auto cmp = expectDyadicTemporalLayerPattern <=> rhs.expectDyadicTemporalLayerPattern; cmp != 0 ) return cmp; if ( auto cmp = minQp <=> rhs.minQp; cmp != 0 ) return cmp; if ( auto cmp = maxQp <=> rhs.maxQp; cmp != 0 ) return cmp; if ( auto cmp = prefersGopRemainingFrames <=> rhs.prefersGopRemainingFrames; cmp != 0 ) return cmp; if ( auto cmp = requiresGopRemainingFrames <=> rhs.requiresGopRemainingFrames; cmp != 0 ) return cmp; if ( auto cmp = stdSyntaxFlags <=> rhs.stdSyntaxFlags; cmp != 0 ) return cmp; return std::strong_ordering::equivalent; } #endif bool operator==( VideoEncodeH264CapabilitiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( memcmp( &maxLevelIdc, &rhs.maxLevelIdc, sizeof( StdVideoH264LevelIdc ) ) == 0 ) && ( maxSliceCount == rhs.maxSliceCount ) && ( maxPPictureL0ReferenceCount == rhs.maxPPictureL0ReferenceCount ) && ( maxBPictureL0ReferenceCount == rhs.maxBPictureL0ReferenceCount ) && ( maxL1ReferenceCount == rhs.maxL1ReferenceCount ) && ( maxTemporalLayerCount == rhs.maxTemporalLayerCount ) && ( expectDyadicTemporalLayerPattern == rhs.expectDyadicTemporalLayerPattern ) && ( minQp == rhs.minQp ) && ( maxQp == rhs.maxQp ) && ( prefersGopRemainingFrames == rhs.prefersGopRemainingFrames ) && ( requiresGopRemainingFrames == rhs.requiresGopRemainingFrames ) && ( stdSyntaxFlags == rhs.stdSyntaxFlags ); } bool operator!=( VideoEncodeH264CapabilitiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoEncodeH264CapabilitiesKHR; void * pNext = {}; VULKAN_HPP_NAMESPACE::VideoEncodeH264CapabilityFlagsKHR flags = {}; StdVideoH264LevelIdc maxLevelIdc = {}; uint32_t maxSliceCount = {}; uint32_t maxPPictureL0ReferenceCount = {}; uint32_t maxBPictureL0ReferenceCount = {}; uint32_t maxL1ReferenceCount = {}; uint32_t maxTemporalLayerCount = {}; VULKAN_HPP_NAMESPACE::Bool32 expectDyadicTemporalLayerPattern = {}; int32_t minQp = {}; int32_t maxQp = {}; VULKAN_HPP_NAMESPACE::Bool32 prefersGopRemainingFrames = {}; VULKAN_HPP_NAMESPACE::Bool32 requiresGopRemainingFrames = {}; VULKAN_HPP_NAMESPACE::VideoEncodeH264StdFlagsKHR stdSyntaxFlags = {}; }; template <> struct CppType { using Type = VideoEncodeH264CapabilitiesKHR; }; struct VideoEncodeH264DpbSlotInfoKHR { using NativeType = VkVideoEncodeH264DpbSlotInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoEncodeH264DpbSlotInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoEncodeH264DpbSlotInfoKHR( const StdVideoEncodeH264ReferenceInfo * pStdReferenceInfo_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , pStdReferenceInfo{ pStdReferenceInfo_ } { } VULKAN_HPP_CONSTEXPR VideoEncodeH264DpbSlotInfoKHR( VideoEncodeH264DpbSlotInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoEncodeH264DpbSlotInfoKHR( VkVideoEncodeH264DpbSlotInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoEncodeH264DpbSlotInfoKHR( *reinterpret_cast( &rhs ) ) { } VideoEncodeH264DpbSlotInfoKHR & operator=( VideoEncodeH264DpbSlotInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoEncodeH264DpbSlotInfoKHR & operator=( VkVideoEncodeH264DpbSlotInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264DpbSlotInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264DpbSlotInfoKHR & setPStdReferenceInfo( const StdVideoEncodeH264ReferenceInfo * pStdReferenceInfo_ ) VULKAN_HPP_NOEXCEPT { pStdReferenceInfo = pStdReferenceInfo_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkVideoEncodeH264DpbSlotInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoEncodeH264DpbSlotInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, pStdReferenceInfo ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( VideoEncodeH264DpbSlotInfoKHR const & ) const = default; #else bool operator==( VideoEncodeH264DpbSlotInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( pStdReferenceInfo == rhs.pStdReferenceInfo ); # endif } bool operator!=( VideoEncodeH264DpbSlotInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoEncodeH264DpbSlotInfoKHR; const void * pNext = {}; const StdVideoEncodeH264ReferenceInfo * pStdReferenceInfo = {}; }; template <> struct CppType { using Type = VideoEncodeH264DpbSlotInfoKHR; }; struct VideoEncodeH264FrameSizeKHR { using NativeType = VkVideoEncodeH264FrameSizeKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoEncodeH264FrameSizeKHR( uint32_t frameISize_ = {}, uint32_t framePSize_ = {}, uint32_t frameBSize_ = {} ) VULKAN_HPP_NOEXCEPT : frameISize{ frameISize_ } , framePSize{ framePSize_ } , frameBSize{ frameBSize_ } { } VULKAN_HPP_CONSTEXPR VideoEncodeH264FrameSizeKHR( VideoEncodeH264FrameSizeKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoEncodeH264FrameSizeKHR( VkVideoEncodeH264FrameSizeKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoEncodeH264FrameSizeKHR( *reinterpret_cast( &rhs ) ) { } VideoEncodeH264FrameSizeKHR & operator=( VideoEncodeH264FrameSizeKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoEncodeH264FrameSizeKHR & operator=( VkVideoEncodeH264FrameSizeKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264FrameSizeKHR & setFrameISize( uint32_t frameISize_ ) VULKAN_HPP_NOEXCEPT { frameISize = frameISize_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264FrameSizeKHR & setFramePSize( uint32_t framePSize_ ) VULKAN_HPP_NOEXCEPT { framePSize = framePSize_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264FrameSizeKHR & setFrameBSize( uint32_t frameBSize_ ) VULKAN_HPP_NOEXCEPT { frameBSize = frameBSize_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkVideoEncodeH264FrameSizeKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoEncodeH264FrameSizeKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( frameISize, framePSize, frameBSize ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( VideoEncodeH264FrameSizeKHR const & ) const = default; #else bool operator==( VideoEncodeH264FrameSizeKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( frameISize == rhs.frameISize ) && ( framePSize == rhs.framePSize ) && ( frameBSize == rhs.frameBSize ); # endif } bool operator!=( VideoEncodeH264FrameSizeKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: uint32_t frameISize = {}; uint32_t framePSize = {}; uint32_t frameBSize = {}; }; struct VideoEncodeH264GopRemainingFrameInfoKHR { using NativeType = VkVideoEncodeH264GopRemainingFrameInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoEncodeH264GopRemainingFrameInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoEncodeH264GopRemainingFrameInfoKHR( VULKAN_HPP_NAMESPACE::Bool32 useGopRemainingFrames_ = {}, uint32_t gopRemainingI_ = {}, uint32_t gopRemainingP_ = {}, uint32_t gopRemainingB_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , useGopRemainingFrames{ useGopRemainingFrames_ } , gopRemainingI{ gopRemainingI_ } , gopRemainingP{ gopRemainingP_ } , gopRemainingB{ gopRemainingB_ } { } VULKAN_HPP_CONSTEXPR VideoEncodeH264GopRemainingFrameInfoKHR( VideoEncodeH264GopRemainingFrameInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoEncodeH264GopRemainingFrameInfoKHR( VkVideoEncodeH264GopRemainingFrameInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoEncodeH264GopRemainingFrameInfoKHR( *reinterpret_cast( &rhs ) ) { } VideoEncodeH264GopRemainingFrameInfoKHR & operator=( VideoEncodeH264GopRemainingFrameInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoEncodeH264GopRemainingFrameInfoKHR & operator=( VkVideoEncodeH264GopRemainingFrameInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264GopRemainingFrameInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264GopRemainingFrameInfoKHR & setUseGopRemainingFrames( VULKAN_HPP_NAMESPACE::Bool32 useGopRemainingFrames_ ) VULKAN_HPP_NOEXCEPT { useGopRemainingFrames = useGopRemainingFrames_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264GopRemainingFrameInfoKHR & setGopRemainingI( uint32_t gopRemainingI_ ) VULKAN_HPP_NOEXCEPT { gopRemainingI = gopRemainingI_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264GopRemainingFrameInfoKHR & setGopRemainingP( uint32_t gopRemainingP_ ) VULKAN_HPP_NOEXCEPT { gopRemainingP = gopRemainingP_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264GopRemainingFrameInfoKHR & setGopRemainingB( uint32_t gopRemainingB_ ) VULKAN_HPP_NOEXCEPT { gopRemainingB = gopRemainingB_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkVideoEncodeH264GopRemainingFrameInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoEncodeH264GopRemainingFrameInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, useGopRemainingFrames, gopRemainingI, gopRemainingP, gopRemainingB ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( VideoEncodeH264GopRemainingFrameInfoKHR const & ) const = default; #else bool operator==( VideoEncodeH264GopRemainingFrameInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( useGopRemainingFrames == rhs.useGopRemainingFrames ) && ( gopRemainingI == rhs.gopRemainingI ) && ( gopRemainingP == rhs.gopRemainingP ) && ( gopRemainingB == rhs.gopRemainingB ); # endif } bool operator!=( VideoEncodeH264GopRemainingFrameInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoEncodeH264GopRemainingFrameInfoKHR; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 useGopRemainingFrames = {}; uint32_t gopRemainingI = {}; uint32_t gopRemainingP = {}; uint32_t gopRemainingB = {}; }; template <> struct CppType { using Type = VideoEncodeH264GopRemainingFrameInfoKHR; }; struct VideoEncodeH264NaluSliceInfoKHR { using NativeType = VkVideoEncodeH264NaluSliceInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoEncodeH264NaluSliceInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoEncodeH264NaluSliceInfoKHR( int32_t constantQp_ = {}, const StdVideoEncodeH264SliceHeader * pStdSliceHeader_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , constantQp{ constantQp_ } , pStdSliceHeader{ pStdSliceHeader_ } { } VULKAN_HPP_CONSTEXPR VideoEncodeH264NaluSliceInfoKHR( VideoEncodeH264NaluSliceInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoEncodeH264NaluSliceInfoKHR( VkVideoEncodeH264NaluSliceInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoEncodeH264NaluSliceInfoKHR( *reinterpret_cast( &rhs ) ) { } VideoEncodeH264NaluSliceInfoKHR & operator=( VideoEncodeH264NaluSliceInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoEncodeH264NaluSliceInfoKHR & operator=( VkVideoEncodeH264NaluSliceInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264NaluSliceInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264NaluSliceInfoKHR & setConstantQp( int32_t constantQp_ ) VULKAN_HPP_NOEXCEPT { constantQp = constantQp_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264NaluSliceInfoKHR & setPStdSliceHeader( const StdVideoEncodeH264SliceHeader * pStdSliceHeader_ ) VULKAN_HPP_NOEXCEPT { pStdSliceHeader = pStdSliceHeader_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkVideoEncodeH264NaluSliceInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoEncodeH264NaluSliceInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, constantQp, pStdSliceHeader ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( VideoEncodeH264NaluSliceInfoKHR const & ) const = default; #else bool operator==( VideoEncodeH264NaluSliceInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( constantQp == rhs.constantQp ) && ( pStdSliceHeader == rhs.pStdSliceHeader ); # endif } bool operator!=( VideoEncodeH264NaluSliceInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoEncodeH264NaluSliceInfoKHR; const void * pNext = {}; int32_t constantQp = {}; const StdVideoEncodeH264SliceHeader * pStdSliceHeader = {}; }; template <> struct CppType { using Type = VideoEncodeH264NaluSliceInfoKHR; }; struct VideoEncodeH264PictureInfoKHR { using NativeType = VkVideoEncodeH264PictureInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoEncodeH264PictureInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoEncodeH264PictureInfoKHR( uint32_t naluSliceEntryCount_ = {}, const VULKAN_HPP_NAMESPACE::VideoEncodeH264NaluSliceInfoKHR * pNaluSliceEntries_ = {}, const StdVideoEncodeH264PictureInfo * pStdPictureInfo_ = {}, VULKAN_HPP_NAMESPACE::Bool32 generatePrefixNalu_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , naluSliceEntryCount{ naluSliceEntryCount_ } , pNaluSliceEntries{ pNaluSliceEntries_ } , pStdPictureInfo{ pStdPictureInfo_ } , generatePrefixNalu{ generatePrefixNalu_ } { } VULKAN_HPP_CONSTEXPR VideoEncodeH264PictureInfoKHR( VideoEncodeH264PictureInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoEncodeH264PictureInfoKHR( VkVideoEncodeH264PictureInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoEncodeH264PictureInfoKHR( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) VideoEncodeH264PictureInfoKHR( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & naluSliceEntries_, const StdVideoEncodeH264PictureInfo * pStdPictureInfo_ = {}, VULKAN_HPP_NAMESPACE::Bool32 generatePrefixNalu_ = {}, const void * pNext_ = nullptr ) : pNext( pNext_ ) , naluSliceEntryCount( static_cast( naluSliceEntries_.size() ) ) , pNaluSliceEntries( naluSliceEntries_.data() ) , pStdPictureInfo( pStdPictureInfo_ ) , generatePrefixNalu( generatePrefixNalu_ ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VideoEncodeH264PictureInfoKHR & operator=( VideoEncodeH264PictureInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoEncodeH264PictureInfoKHR & operator=( VkVideoEncodeH264PictureInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264PictureInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264PictureInfoKHR & setNaluSliceEntryCount( uint32_t naluSliceEntryCount_ ) VULKAN_HPP_NOEXCEPT { naluSliceEntryCount = naluSliceEntryCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264PictureInfoKHR & setPNaluSliceEntries( const VULKAN_HPP_NAMESPACE::VideoEncodeH264NaluSliceInfoKHR * pNaluSliceEntries_ ) VULKAN_HPP_NOEXCEPT { pNaluSliceEntries = pNaluSliceEntries_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) VideoEncodeH264PictureInfoKHR & setNaluSliceEntries( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & naluSliceEntries_ ) VULKAN_HPP_NOEXCEPT { naluSliceEntryCount = static_cast( naluSliceEntries_.size() ); pNaluSliceEntries = naluSliceEntries_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264PictureInfoKHR & setPStdPictureInfo( const StdVideoEncodeH264PictureInfo * pStdPictureInfo_ ) VULKAN_HPP_NOEXCEPT { pStdPictureInfo = pStdPictureInfo_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264PictureInfoKHR & setGeneratePrefixNalu( VULKAN_HPP_NAMESPACE::Bool32 generatePrefixNalu_ ) VULKAN_HPP_NOEXCEPT { generatePrefixNalu = generatePrefixNalu_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkVideoEncodeH264PictureInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoEncodeH264PictureInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, naluSliceEntryCount, pNaluSliceEntries, pStdPictureInfo, generatePrefixNalu ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( VideoEncodeH264PictureInfoKHR const & ) const = default; #else bool operator==( VideoEncodeH264PictureInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( naluSliceEntryCount == rhs.naluSliceEntryCount ) && ( pNaluSliceEntries == rhs.pNaluSliceEntries ) && ( pStdPictureInfo == rhs.pStdPictureInfo ) && ( generatePrefixNalu == rhs.generatePrefixNalu ); # endif } bool operator!=( VideoEncodeH264PictureInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoEncodeH264PictureInfoKHR; const void * pNext = {}; uint32_t naluSliceEntryCount = {}; const VULKAN_HPP_NAMESPACE::VideoEncodeH264NaluSliceInfoKHR * pNaluSliceEntries = {}; const StdVideoEncodeH264PictureInfo * pStdPictureInfo = {}; VULKAN_HPP_NAMESPACE::Bool32 generatePrefixNalu = {}; }; template <> struct CppType { using Type = VideoEncodeH264PictureInfoKHR; }; struct VideoEncodeH264ProfileInfoKHR { using NativeType = VkVideoEncodeH264ProfileInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoEncodeH264ProfileInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoEncodeH264ProfileInfoKHR( StdVideoH264ProfileIdc stdProfileIdc_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , stdProfileIdc{ stdProfileIdc_ } { } VULKAN_HPP_CONSTEXPR VideoEncodeH264ProfileInfoKHR( VideoEncodeH264ProfileInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoEncodeH264ProfileInfoKHR( VkVideoEncodeH264ProfileInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoEncodeH264ProfileInfoKHR( *reinterpret_cast( &rhs ) ) { } VideoEncodeH264ProfileInfoKHR & operator=( VideoEncodeH264ProfileInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoEncodeH264ProfileInfoKHR & operator=( VkVideoEncodeH264ProfileInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264ProfileInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264ProfileInfoKHR & setStdProfileIdc( StdVideoH264ProfileIdc stdProfileIdc_ ) VULKAN_HPP_NOEXCEPT { stdProfileIdc = stdProfileIdc_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkVideoEncodeH264ProfileInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoEncodeH264ProfileInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, stdProfileIdc ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) std::strong_ordering operator<=>( VideoEncodeH264ProfileInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { if ( auto cmp = sType <=> rhs.sType; cmp != 0 ) return cmp; if ( auto cmp = pNext <=> rhs.pNext; cmp != 0 ) return cmp; if ( auto cmp = memcmp( &stdProfileIdc, &rhs.stdProfileIdc, sizeof( StdVideoH264ProfileIdc ) ); cmp != 0 ) return ( cmp < 0 ) ? std::strong_ordering::less : std::strong_ordering::greater; return std::strong_ordering::equivalent; } #endif bool operator==( VideoEncodeH264ProfileInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( memcmp( &stdProfileIdc, &rhs.stdProfileIdc, sizeof( StdVideoH264ProfileIdc ) ) == 0 ); } bool operator!=( VideoEncodeH264ProfileInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoEncodeH264ProfileInfoKHR; const void * pNext = {}; StdVideoH264ProfileIdc stdProfileIdc = {}; }; template <> struct CppType { using Type = VideoEncodeH264ProfileInfoKHR; }; struct VideoEncodeH264QpKHR { using NativeType = VkVideoEncodeH264QpKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoEncodeH264QpKHR( int32_t qpI_ = {}, int32_t qpP_ = {}, int32_t qpB_ = {} ) VULKAN_HPP_NOEXCEPT : qpI{ qpI_ } , qpP{ qpP_ } , qpB{ qpB_ } { } VULKAN_HPP_CONSTEXPR VideoEncodeH264QpKHR( VideoEncodeH264QpKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoEncodeH264QpKHR( VkVideoEncodeH264QpKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoEncodeH264QpKHR( *reinterpret_cast( &rhs ) ) { } VideoEncodeH264QpKHR & operator=( VideoEncodeH264QpKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoEncodeH264QpKHR & operator=( VkVideoEncodeH264QpKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264QpKHR & setQpI( int32_t qpI_ ) VULKAN_HPP_NOEXCEPT { qpI = qpI_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264QpKHR & setQpP( int32_t qpP_ ) VULKAN_HPP_NOEXCEPT { qpP = qpP_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264QpKHR & setQpB( int32_t qpB_ ) VULKAN_HPP_NOEXCEPT { qpB = qpB_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkVideoEncodeH264QpKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoEncodeH264QpKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( qpI, qpP, qpB ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( VideoEncodeH264QpKHR const & ) const = default; #else bool operator==( VideoEncodeH264QpKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( qpI == rhs.qpI ) && ( qpP == rhs.qpP ) && ( qpB == rhs.qpB ); # endif } bool operator!=( VideoEncodeH264QpKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: int32_t qpI = {}; int32_t qpP = {}; int32_t qpB = {}; }; struct VideoEncodeH264QualityLevelPropertiesKHR { using NativeType = VkVideoEncodeH264QualityLevelPropertiesKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoEncodeH264QualityLevelPropertiesKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoEncodeH264QualityLevelPropertiesKHR( VULKAN_HPP_NAMESPACE::VideoEncodeH264RateControlFlagsKHR preferredRateControlFlags_ = {}, uint32_t preferredGopFrameCount_ = {}, uint32_t preferredIdrPeriod_ = {}, uint32_t preferredConsecutiveBFrameCount_ = {}, uint32_t preferredTemporalLayerCount_ = {}, VULKAN_HPP_NAMESPACE::VideoEncodeH264QpKHR preferredConstantQp_ = {}, uint32_t preferredMaxL0ReferenceCount_ = {}, uint32_t preferredMaxL1ReferenceCount_ = {}, VULKAN_HPP_NAMESPACE::Bool32 preferredStdEntropyCodingModeFlag_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , preferredRateControlFlags{ preferredRateControlFlags_ } , preferredGopFrameCount{ preferredGopFrameCount_ } , preferredIdrPeriod{ preferredIdrPeriod_ } , preferredConsecutiveBFrameCount{ preferredConsecutiveBFrameCount_ } , preferredTemporalLayerCount{ preferredTemporalLayerCount_ } , preferredConstantQp{ preferredConstantQp_ } , preferredMaxL0ReferenceCount{ preferredMaxL0ReferenceCount_ } , preferredMaxL1ReferenceCount{ preferredMaxL1ReferenceCount_ } , preferredStdEntropyCodingModeFlag{ preferredStdEntropyCodingModeFlag_ } { } VULKAN_HPP_CONSTEXPR VideoEncodeH264QualityLevelPropertiesKHR( VideoEncodeH264QualityLevelPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoEncodeH264QualityLevelPropertiesKHR( VkVideoEncodeH264QualityLevelPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoEncodeH264QualityLevelPropertiesKHR( *reinterpret_cast( &rhs ) ) { } VideoEncodeH264QualityLevelPropertiesKHR & operator=( VideoEncodeH264QualityLevelPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoEncodeH264QualityLevelPropertiesKHR & operator=( VkVideoEncodeH264QualityLevelPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkVideoEncodeH264QualityLevelPropertiesKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoEncodeH264QualityLevelPropertiesKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, preferredRateControlFlags, preferredGopFrameCount, preferredIdrPeriod, preferredConsecutiveBFrameCount, preferredTemporalLayerCount, preferredConstantQp, preferredMaxL0ReferenceCount, preferredMaxL1ReferenceCount, preferredStdEntropyCodingModeFlag ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( VideoEncodeH264QualityLevelPropertiesKHR const & ) const = default; #else bool operator==( VideoEncodeH264QualityLevelPropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( preferredRateControlFlags == rhs.preferredRateControlFlags ) && ( preferredGopFrameCount == rhs.preferredGopFrameCount ) && ( preferredIdrPeriod == rhs.preferredIdrPeriod ) && ( preferredConsecutiveBFrameCount == rhs.preferredConsecutiveBFrameCount ) && ( preferredTemporalLayerCount == rhs.preferredTemporalLayerCount ) && ( preferredConstantQp == rhs.preferredConstantQp ) && ( preferredMaxL0ReferenceCount == rhs.preferredMaxL0ReferenceCount ) && ( preferredMaxL1ReferenceCount == rhs.preferredMaxL1ReferenceCount ) && ( preferredStdEntropyCodingModeFlag == rhs.preferredStdEntropyCodingModeFlag ); # endif } bool operator!=( VideoEncodeH264QualityLevelPropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoEncodeH264QualityLevelPropertiesKHR; void * pNext = {}; VULKAN_HPP_NAMESPACE::VideoEncodeH264RateControlFlagsKHR preferredRateControlFlags = {}; uint32_t preferredGopFrameCount = {}; uint32_t preferredIdrPeriod = {}; uint32_t preferredConsecutiveBFrameCount = {}; uint32_t preferredTemporalLayerCount = {}; VULKAN_HPP_NAMESPACE::VideoEncodeH264QpKHR preferredConstantQp = {}; uint32_t preferredMaxL0ReferenceCount = {}; uint32_t preferredMaxL1ReferenceCount = {}; VULKAN_HPP_NAMESPACE::Bool32 preferredStdEntropyCodingModeFlag = {}; }; template <> struct CppType { using Type = VideoEncodeH264QualityLevelPropertiesKHR; }; struct VideoEncodeH264QuantizationMapCapabilitiesKHR { using NativeType = VkVideoEncodeH264QuantizationMapCapabilitiesKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoEncodeH264QuantizationMapCapabilitiesKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoEncodeH264QuantizationMapCapabilitiesKHR( int32_t minQpDelta_ = {}, int32_t maxQpDelta_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , minQpDelta{ minQpDelta_ } , maxQpDelta{ maxQpDelta_ } { } VULKAN_HPP_CONSTEXPR VideoEncodeH264QuantizationMapCapabilitiesKHR( VideoEncodeH264QuantizationMapCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoEncodeH264QuantizationMapCapabilitiesKHR( VkVideoEncodeH264QuantizationMapCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoEncodeH264QuantizationMapCapabilitiesKHR( *reinterpret_cast( &rhs ) ) { } VideoEncodeH264QuantizationMapCapabilitiesKHR & operator=( VideoEncodeH264QuantizationMapCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoEncodeH264QuantizationMapCapabilitiesKHR & operator=( VkVideoEncodeH264QuantizationMapCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkVideoEncodeH264QuantizationMapCapabilitiesKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoEncodeH264QuantizationMapCapabilitiesKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, minQpDelta, maxQpDelta ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( VideoEncodeH264QuantizationMapCapabilitiesKHR const & ) const = default; #else bool operator==( VideoEncodeH264QuantizationMapCapabilitiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( minQpDelta == rhs.minQpDelta ) && ( maxQpDelta == rhs.maxQpDelta ); # endif } bool operator!=( VideoEncodeH264QuantizationMapCapabilitiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoEncodeH264QuantizationMapCapabilitiesKHR; void * pNext = {}; int32_t minQpDelta = {}; int32_t maxQpDelta = {}; }; template <> struct CppType { using Type = VideoEncodeH264QuantizationMapCapabilitiesKHR; }; struct VideoEncodeH264RateControlInfoKHR { using NativeType = VkVideoEncodeH264RateControlInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoEncodeH264RateControlInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoEncodeH264RateControlInfoKHR( VULKAN_HPP_NAMESPACE::VideoEncodeH264RateControlFlagsKHR flags_ = {}, uint32_t gopFrameCount_ = {}, uint32_t idrPeriod_ = {}, uint32_t consecutiveBFrameCount_ = {}, uint32_t temporalLayerCount_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , gopFrameCount{ gopFrameCount_ } , idrPeriod{ idrPeriod_ } , consecutiveBFrameCount{ consecutiveBFrameCount_ } , temporalLayerCount{ temporalLayerCount_ } { } VULKAN_HPP_CONSTEXPR VideoEncodeH264RateControlInfoKHR( VideoEncodeH264RateControlInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoEncodeH264RateControlInfoKHR( VkVideoEncodeH264RateControlInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoEncodeH264RateControlInfoKHR( *reinterpret_cast( &rhs ) ) { } VideoEncodeH264RateControlInfoKHR & operator=( VideoEncodeH264RateControlInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoEncodeH264RateControlInfoKHR & operator=( VkVideoEncodeH264RateControlInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264RateControlInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264RateControlInfoKHR & setFlags( VULKAN_HPP_NAMESPACE::VideoEncodeH264RateControlFlagsKHR flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264RateControlInfoKHR & setGopFrameCount( uint32_t gopFrameCount_ ) VULKAN_HPP_NOEXCEPT { gopFrameCount = gopFrameCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264RateControlInfoKHR & setIdrPeriod( uint32_t idrPeriod_ ) VULKAN_HPP_NOEXCEPT { idrPeriod = idrPeriod_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264RateControlInfoKHR & setConsecutiveBFrameCount( uint32_t consecutiveBFrameCount_ ) VULKAN_HPP_NOEXCEPT { consecutiveBFrameCount = consecutiveBFrameCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264RateControlInfoKHR & setTemporalLayerCount( uint32_t temporalLayerCount_ ) VULKAN_HPP_NOEXCEPT { temporalLayerCount = temporalLayerCount_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkVideoEncodeH264RateControlInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoEncodeH264RateControlInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, gopFrameCount, idrPeriod, consecutiveBFrameCount, temporalLayerCount ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( VideoEncodeH264RateControlInfoKHR const & ) const = default; #else bool operator==( VideoEncodeH264RateControlInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( gopFrameCount == rhs.gopFrameCount ) && ( idrPeriod == rhs.idrPeriod ) && ( consecutiveBFrameCount == rhs.consecutiveBFrameCount ) && ( temporalLayerCount == rhs.temporalLayerCount ); # endif } bool operator!=( VideoEncodeH264RateControlInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoEncodeH264RateControlInfoKHR; const void * pNext = {}; VULKAN_HPP_NAMESPACE::VideoEncodeH264RateControlFlagsKHR flags = {}; uint32_t gopFrameCount = {}; uint32_t idrPeriod = {}; uint32_t consecutiveBFrameCount = {}; uint32_t temporalLayerCount = {}; }; template <> struct CppType { using Type = VideoEncodeH264RateControlInfoKHR; }; struct VideoEncodeH264RateControlLayerInfoKHR { using NativeType = VkVideoEncodeH264RateControlLayerInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoEncodeH264RateControlLayerInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoEncodeH264RateControlLayerInfoKHR( VULKAN_HPP_NAMESPACE::Bool32 useMinQp_ = {}, VULKAN_HPP_NAMESPACE::VideoEncodeH264QpKHR minQp_ = {}, VULKAN_HPP_NAMESPACE::Bool32 useMaxQp_ = {}, VULKAN_HPP_NAMESPACE::VideoEncodeH264QpKHR maxQp_ = {}, VULKAN_HPP_NAMESPACE::Bool32 useMaxFrameSize_ = {}, VULKAN_HPP_NAMESPACE::VideoEncodeH264FrameSizeKHR maxFrameSize_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , useMinQp{ useMinQp_ } , minQp{ minQp_ } , useMaxQp{ useMaxQp_ } , maxQp{ maxQp_ } , useMaxFrameSize{ useMaxFrameSize_ } , maxFrameSize{ maxFrameSize_ } { } VULKAN_HPP_CONSTEXPR VideoEncodeH264RateControlLayerInfoKHR( VideoEncodeH264RateControlLayerInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoEncodeH264RateControlLayerInfoKHR( VkVideoEncodeH264RateControlLayerInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoEncodeH264RateControlLayerInfoKHR( *reinterpret_cast( &rhs ) ) { } VideoEncodeH264RateControlLayerInfoKHR & operator=( VideoEncodeH264RateControlLayerInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoEncodeH264RateControlLayerInfoKHR & operator=( VkVideoEncodeH264RateControlLayerInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264RateControlLayerInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264RateControlLayerInfoKHR & setUseMinQp( VULKAN_HPP_NAMESPACE::Bool32 useMinQp_ ) VULKAN_HPP_NOEXCEPT { useMinQp = useMinQp_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264RateControlLayerInfoKHR & setMinQp( VULKAN_HPP_NAMESPACE::VideoEncodeH264QpKHR const & minQp_ ) VULKAN_HPP_NOEXCEPT { minQp = minQp_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264RateControlLayerInfoKHR & setUseMaxQp( VULKAN_HPP_NAMESPACE::Bool32 useMaxQp_ ) VULKAN_HPP_NOEXCEPT { useMaxQp = useMaxQp_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264RateControlLayerInfoKHR & setMaxQp( VULKAN_HPP_NAMESPACE::VideoEncodeH264QpKHR const & maxQp_ ) VULKAN_HPP_NOEXCEPT { maxQp = maxQp_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264RateControlLayerInfoKHR & setUseMaxFrameSize( VULKAN_HPP_NAMESPACE::Bool32 useMaxFrameSize_ ) VULKAN_HPP_NOEXCEPT { useMaxFrameSize = useMaxFrameSize_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264RateControlLayerInfoKHR & setMaxFrameSize( VULKAN_HPP_NAMESPACE::VideoEncodeH264FrameSizeKHR const & maxFrameSize_ ) VULKAN_HPP_NOEXCEPT { maxFrameSize = maxFrameSize_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkVideoEncodeH264RateControlLayerInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoEncodeH264RateControlLayerInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, useMinQp, minQp, useMaxQp, maxQp, useMaxFrameSize, maxFrameSize ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( VideoEncodeH264RateControlLayerInfoKHR const & ) const = default; #else bool operator==( VideoEncodeH264RateControlLayerInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( useMinQp == rhs.useMinQp ) && ( minQp == rhs.minQp ) && ( useMaxQp == rhs.useMaxQp ) && ( maxQp == rhs.maxQp ) && ( useMaxFrameSize == rhs.useMaxFrameSize ) && ( maxFrameSize == rhs.maxFrameSize ); # endif } bool operator!=( VideoEncodeH264RateControlLayerInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoEncodeH264RateControlLayerInfoKHR; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 useMinQp = {}; VULKAN_HPP_NAMESPACE::VideoEncodeH264QpKHR minQp = {}; VULKAN_HPP_NAMESPACE::Bool32 useMaxQp = {}; VULKAN_HPP_NAMESPACE::VideoEncodeH264QpKHR maxQp = {}; VULKAN_HPP_NAMESPACE::Bool32 useMaxFrameSize = {}; VULKAN_HPP_NAMESPACE::VideoEncodeH264FrameSizeKHR maxFrameSize = {}; }; template <> struct CppType { using Type = VideoEncodeH264RateControlLayerInfoKHR; }; struct VideoEncodeH264SessionCreateInfoKHR { using NativeType = VkVideoEncodeH264SessionCreateInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoEncodeH264SessionCreateInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoEncodeH264SessionCreateInfoKHR( VULKAN_HPP_NAMESPACE::Bool32 useMaxLevelIdc_ = {}, StdVideoH264LevelIdc maxLevelIdc_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , useMaxLevelIdc{ useMaxLevelIdc_ } , maxLevelIdc{ maxLevelIdc_ } { } VULKAN_HPP_CONSTEXPR VideoEncodeH264SessionCreateInfoKHR( VideoEncodeH264SessionCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoEncodeH264SessionCreateInfoKHR( VkVideoEncodeH264SessionCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoEncodeH264SessionCreateInfoKHR( *reinterpret_cast( &rhs ) ) { } VideoEncodeH264SessionCreateInfoKHR & operator=( VideoEncodeH264SessionCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoEncodeH264SessionCreateInfoKHR & operator=( VkVideoEncodeH264SessionCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264SessionCreateInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264SessionCreateInfoKHR & setUseMaxLevelIdc( VULKAN_HPP_NAMESPACE::Bool32 useMaxLevelIdc_ ) VULKAN_HPP_NOEXCEPT { useMaxLevelIdc = useMaxLevelIdc_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264SessionCreateInfoKHR & setMaxLevelIdc( StdVideoH264LevelIdc maxLevelIdc_ ) VULKAN_HPP_NOEXCEPT { maxLevelIdc = maxLevelIdc_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkVideoEncodeH264SessionCreateInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoEncodeH264SessionCreateInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, useMaxLevelIdc, maxLevelIdc ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) std::strong_ordering operator<=>( VideoEncodeH264SessionCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { if ( auto cmp = sType <=> rhs.sType; cmp != 0 ) return cmp; if ( auto cmp = pNext <=> rhs.pNext; cmp != 0 ) return cmp; if ( auto cmp = useMaxLevelIdc <=> rhs.useMaxLevelIdc; cmp != 0 ) return cmp; if ( auto cmp = memcmp( &maxLevelIdc, &rhs.maxLevelIdc, sizeof( StdVideoH264LevelIdc ) ); cmp != 0 ) return ( cmp < 0 ) ? std::strong_ordering::less : std::strong_ordering::greater; return std::strong_ordering::equivalent; } #endif bool operator==( VideoEncodeH264SessionCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( useMaxLevelIdc == rhs.useMaxLevelIdc ) && ( memcmp( &maxLevelIdc, &rhs.maxLevelIdc, sizeof( StdVideoH264LevelIdc ) ) == 0 ); } bool operator!=( VideoEncodeH264SessionCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoEncodeH264SessionCreateInfoKHR; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 useMaxLevelIdc = {}; StdVideoH264LevelIdc maxLevelIdc = {}; }; template <> struct CppType { using Type = VideoEncodeH264SessionCreateInfoKHR; }; struct VideoEncodeH264SessionParametersAddInfoKHR { using NativeType = VkVideoEncodeH264SessionParametersAddInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoEncodeH264SessionParametersAddInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoEncodeH264SessionParametersAddInfoKHR( uint32_t stdSPSCount_ = {}, const StdVideoH264SequenceParameterSet * pStdSPSs_ = {}, uint32_t stdPPSCount_ = {}, const StdVideoH264PictureParameterSet * pStdPPSs_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , stdSPSCount{ stdSPSCount_ } , pStdSPSs{ pStdSPSs_ } , stdPPSCount{ stdPPSCount_ } , pStdPPSs{ pStdPPSs_ } { } VULKAN_HPP_CONSTEXPR VideoEncodeH264SessionParametersAddInfoKHR( VideoEncodeH264SessionParametersAddInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoEncodeH264SessionParametersAddInfoKHR( VkVideoEncodeH264SessionParametersAddInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoEncodeH264SessionParametersAddInfoKHR( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) VideoEncodeH264SessionParametersAddInfoKHR( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & stdSPSs_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & stdPPSs_ = {}, const void * pNext_ = nullptr ) : pNext( pNext_ ) , stdSPSCount( static_cast( stdSPSs_.size() ) ) , pStdSPSs( stdSPSs_.data() ) , stdPPSCount( static_cast( stdPPSs_.size() ) ) , pStdPPSs( stdPPSs_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VideoEncodeH264SessionParametersAddInfoKHR & operator=( VideoEncodeH264SessionParametersAddInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoEncodeH264SessionParametersAddInfoKHR & operator=( VkVideoEncodeH264SessionParametersAddInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264SessionParametersAddInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264SessionParametersAddInfoKHR & setStdSPSCount( uint32_t stdSPSCount_ ) VULKAN_HPP_NOEXCEPT { stdSPSCount = stdSPSCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264SessionParametersAddInfoKHR & setPStdSPSs( const StdVideoH264SequenceParameterSet * pStdSPSs_ ) VULKAN_HPP_NOEXCEPT { pStdSPSs = pStdSPSs_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) VideoEncodeH264SessionParametersAddInfoKHR & setStdSPSs( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & stdSPSs_ ) VULKAN_HPP_NOEXCEPT { stdSPSCount = static_cast( stdSPSs_.size() ); pStdSPSs = stdSPSs_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264SessionParametersAddInfoKHR & setStdPPSCount( uint32_t stdPPSCount_ ) VULKAN_HPP_NOEXCEPT { stdPPSCount = stdPPSCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264SessionParametersAddInfoKHR & setPStdPPSs( const StdVideoH264PictureParameterSet * pStdPPSs_ ) VULKAN_HPP_NOEXCEPT { pStdPPSs = pStdPPSs_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) VideoEncodeH264SessionParametersAddInfoKHR & setStdPPSs( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & stdPPSs_ ) VULKAN_HPP_NOEXCEPT { stdPPSCount = static_cast( stdPPSs_.size() ); pStdPPSs = stdPPSs_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkVideoEncodeH264SessionParametersAddInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoEncodeH264SessionParametersAddInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, stdSPSCount, pStdSPSs, stdPPSCount, pStdPPSs ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( VideoEncodeH264SessionParametersAddInfoKHR const & ) const = default; #else bool operator==( VideoEncodeH264SessionParametersAddInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( stdSPSCount == rhs.stdSPSCount ) && ( pStdSPSs == rhs.pStdSPSs ) && ( stdPPSCount == rhs.stdPPSCount ) && ( pStdPPSs == rhs.pStdPPSs ); # endif } bool operator!=( VideoEncodeH264SessionParametersAddInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoEncodeH264SessionParametersAddInfoKHR; const void * pNext = {}; uint32_t stdSPSCount = {}; const StdVideoH264SequenceParameterSet * pStdSPSs = {}; uint32_t stdPPSCount = {}; const StdVideoH264PictureParameterSet * pStdPPSs = {}; }; template <> struct CppType { using Type = VideoEncodeH264SessionParametersAddInfoKHR; }; struct VideoEncodeH264SessionParametersCreateInfoKHR { using NativeType = VkVideoEncodeH264SessionParametersCreateInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoEncodeH264SessionParametersCreateInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoEncodeH264SessionParametersCreateInfoKHR( uint32_t maxStdSPSCount_ = {}, uint32_t maxStdPPSCount_ = {}, const VULKAN_HPP_NAMESPACE::VideoEncodeH264SessionParametersAddInfoKHR * pParametersAddInfo_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , maxStdSPSCount{ maxStdSPSCount_ } , maxStdPPSCount{ maxStdPPSCount_ } , pParametersAddInfo{ pParametersAddInfo_ } { } VULKAN_HPP_CONSTEXPR VideoEncodeH264SessionParametersCreateInfoKHR( VideoEncodeH264SessionParametersCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoEncodeH264SessionParametersCreateInfoKHR( VkVideoEncodeH264SessionParametersCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoEncodeH264SessionParametersCreateInfoKHR( *reinterpret_cast( &rhs ) ) { } VideoEncodeH264SessionParametersCreateInfoKHR & operator=( VideoEncodeH264SessionParametersCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoEncodeH264SessionParametersCreateInfoKHR & operator=( VkVideoEncodeH264SessionParametersCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264SessionParametersCreateInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264SessionParametersCreateInfoKHR & setMaxStdSPSCount( uint32_t maxStdSPSCount_ ) VULKAN_HPP_NOEXCEPT { maxStdSPSCount = maxStdSPSCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264SessionParametersCreateInfoKHR & setMaxStdPPSCount( uint32_t maxStdPPSCount_ ) VULKAN_HPP_NOEXCEPT { maxStdPPSCount = maxStdPPSCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264SessionParametersCreateInfoKHR & setPParametersAddInfo( const VULKAN_HPP_NAMESPACE::VideoEncodeH264SessionParametersAddInfoKHR * pParametersAddInfo_ ) VULKAN_HPP_NOEXCEPT { pParametersAddInfo = pParametersAddInfo_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkVideoEncodeH264SessionParametersCreateInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoEncodeH264SessionParametersCreateInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, maxStdSPSCount, maxStdPPSCount, pParametersAddInfo ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( VideoEncodeH264SessionParametersCreateInfoKHR const & ) const = default; #else bool operator==( VideoEncodeH264SessionParametersCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( maxStdSPSCount == rhs.maxStdSPSCount ) && ( maxStdPPSCount == rhs.maxStdPPSCount ) && ( pParametersAddInfo == rhs.pParametersAddInfo ); # endif } bool operator!=( VideoEncodeH264SessionParametersCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoEncodeH264SessionParametersCreateInfoKHR; const void * pNext = {}; uint32_t maxStdSPSCount = {}; uint32_t maxStdPPSCount = {}; const VULKAN_HPP_NAMESPACE::VideoEncodeH264SessionParametersAddInfoKHR * pParametersAddInfo = {}; }; template <> struct CppType { using Type = VideoEncodeH264SessionParametersCreateInfoKHR; }; struct VideoEncodeH264SessionParametersFeedbackInfoKHR { using NativeType = VkVideoEncodeH264SessionParametersFeedbackInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoEncodeH264SessionParametersFeedbackInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoEncodeH264SessionParametersFeedbackInfoKHR( VULKAN_HPP_NAMESPACE::Bool32 hasStdSPSOverrides_ = {}, VULKAN_HPP_NAMESPACE::Bool32 hasStdPPSOverrides_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , hasStdSPSOverrides{ hasStdSPSOverrides_ } , hasStdPPSOverrides{ hasStdPPSOverrides_ } { } VULKAN_HPP_CONSTEXPR VideoEncodeH264SessionParametersFeedbackInfoKHR( VideoEncodeH264SessionParametersFeedbackInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoEncodeH264SessionParametersFeedbackInfoKHR( VkVideoEncodeH264SessionParametersFeedbackInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoEncodeH264SessionParametersFeedbackInfoKHR( *reinterpret_cast( &rhs ) ) { } VideoEncodeH264SessionParametersFeedbackInfoKHR & operator=( VideoEncodeH264SessionParametersFeedbackInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoEncodeH264SessionParametersFeedbackInfoKHR & operator=( VkVideoEncodeH264SessionParametersFeedbackInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkVideoEncodeH264SessionParametersFeedbackInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoEncodeH264SessionParametersFeedbackInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, hasStdSPSOverrides, hasStdPPSOverrides ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( VideoEncodeH264SessionParametersFeedbackInfoKHR const & ) const = default; #else bool operator==( VideoEncodeH264SessionParametersFeedbackInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( hasStdSPSOverrides == rhs.hasStdSPSOverrides ) && ( hasStdPPSOverrides == rhs.hasStdPPSOverrides ); # endif } bool operator!=( VideoEncodeH264SessionParametersFeedbackInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoEncodeH264SessionParametersFeedbackInfoKHR; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 hasStdSPSOverrides = {}; VULKAN_HPP_NAMESPACE::Bool32 hasStdPPSOverrides = {}; }; template <> struct CppType { using Type = VideoEncodeH264SessionParametersFeedbackInfoKHR; }; struct VideoEncodeH264SessionParametersGetInfoKHR { using NativeType = VkVideoEncodeH264SessionParametersGetInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoEncodeH264SessionParametersGetInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoEncodeH264SessionParametersGetInfoKHR( VULKAN_HPP_NAMESPACE::Bool32 writeStdSPS_ = {}, VULKAN_HPP_NAMESPACE::Bool32 writeStdPPS_ = {}, uint32_t stdSPSId_ = {}, uint32_t stdPPSId_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , writeStdSPS{ writeStdSPS_ } , writeStdPPS{ writeStdPPS_ } , stdSPSId{ stdSPSId_ } , stdPPSId{ stdPPSId_ } { } VULKAN_HPP_CONSTEXPR VideoEncodeH264SessionParametersGetInfoKHR( VideoEncodeH264SessionParametersGetInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoEncodeH264SessionParametersGetInfoKHR( VkVideoEncodeH264SessionParametersGetInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoEncodeH264SessionParametersGetInfoKHR( *reinterpret_cast( &rhs ) ) { } VideoEncodeH264SessionParametersGetInfoKHR & operator=( VideoEncodeH264SessionParametersGetInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoEncodeH264SessionParametersGetInfoKHR & operator=( VkVideoEncodeH264SessionParametersGetInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264SessionParametersGetInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264SessionParametersGetInfoKHR & setWriteStdSPS( VULKAN_HPP_NAMESPACE::Bool32 writeStdSPS_ ) VULKAN_HPP_NOEXCEPT { writeStdSPS = writeStdSPS_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264SessionParametersGetInfoKHR & setWriteStdPPS( VULKAN_HPP_NAMESPACE::Bool32 writeStdPPS_ ) VULKAN_HPP_NOEXCEPT { writeStdPPS = writeStdPPS_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264SessionParametersGetInfoKHR & setStdSPSId( uint32_t stdSPSId_ ) VULKAN_HPP_NOEXCEPT { stdSPSId = stdSPSId_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeH264SessionParametersGetInfoKHR & setStdPPSId( uint32_t stdPPSId_ ) VULKAN_HPP_NOEXCEPT { stdPPSId = stdPPSId_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkVideoEncodeH264SessionParametersGetInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoEncodeH264SessionParametersGetInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, writeStdSPS, writeStdPPS, stdSPSId, stdPPSId ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( VideoEncodeH264SessionParametersGetInfoKHR const & ) const = default; #else bool operator==( VideoEncodeH264SessionParametersGetInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( writeStdSPS == rhs.writeStdSPS ) && ( writeStdPPS == rhs.writeStdPPS ) && ( stdSPSId == rhs.stdSPSId ) && ( stdPPSId == rhs.stdPPSId ); # endif } bool operator!=( VideoEncodeH264SessionParametersGetInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoEncodeH264SessionParametersGetInfoKHR; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 writeStdSPS = {}; VULKAN_HPP_NAMESPACE::Bool32 writeStdPPS = {}; uint32_t stdSPSId = {}; uint32_t stdPPSId = {}; }; template <> struct CppType { using Type = VideoEncodeH264SessionParametersGetInfoKHR; }; struct VideoEncodeH265CapabilitiesKHR { using NativeType = VkVideoEncodeH265CapabilitiesKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoEncodeH265CapabilitiesKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoEncodeH265CapabilitiesKHR( VULKAN_HPP_NAMESPACE::VideoEncodeH265CapabilityFlagsKHR flags_ = {}, StdVideoH265LevelIdc maxLevelIdc_ = {}, uint32_t maxSliceSegmentCount_ = {}, VULKAN_HPP_NAMESPACE::Extent2D maxTiles_ = {}, VULKAN_HPP_NAMESPACE::VideoEncodeH265CtbSizeFlagsKHR ctbSizes_ = {}, VULKAN_HPP_NAMESPACE::VideoEncodeH265TransformBlockSizeFlagsKHR transformBlockSizes_ = {}, uint32_t maxPPictureL0ReferenceCount_ = {}, uint32_t maxBPictureL0ReferenceCount_ = {}, uint32_t maxL1ReferenceCount_ = {}, uint32_t maxSubLayerCount_ = {}, VULKAN_HPP_NAMESPACE::Bool32 expectDyadicTemporalSubLayerPattern_ = {}, int32_t minQp_ = {}, int32_t maxQp_ = {}, VULKAN_HPP_NAMESPACE::Bool32 prefersGopRemainingFrames_ = {}, VULKAN_HPP_NAMESPACE::Bool32 requiresGopRemainingFrames_ = {}, VULKAN_HPP_NAMESPACE::VideoEncodeH265StdFlagsKHR stdSyntaxFlags_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , maxLevelIdc{ maxLevelIdc_ } , maxSliceSegmentCount{ maxSliceSegmentCount_ } , maxTiles{ maxTiles_ } , ctbSizes{ ctbSizes_ } , transformBlockSizes{ transformBlockSizes_ } , maxPPictureL0ReferenceCount{ maxPPictureL0ReferenceCount_ } , maxBPictureL0ReferenceCount{ maxBPictureL0ReferenceCount_ } , maxL1ReferenceCount{ maxL1ReferenceCount_ } , maxSubLayerCount{ maxSubLayerCount_ } , expectDyadicTemporalSubLayerPattern{ expectDyadicTemporalSubLayerPattern_ } , minQp{ minQp_ } , maxQp{ maxQp_ } , prefersGopRemainingFrames{ prefersGopRemainingFrames_ } , requiresGopRemainingFrames{ requiresGopRemainingFrames_ } , stdSyntaxFlags{ stdSyntaxFlags_ } { } VULKAN_HPP_CONSTEXPR VideoEncodeH265CapabilitiesKHR( VideoEncodeH265CapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoEncodeH265CapabilitiesKHR( VkVideoEncodeH265CapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoEncodeH265CapabilitiesKHR( *reinterpret_cast( &rhs ) ) { } VideoEncodeH265CapabilitiesKHR & operator=( VideoEncodeH265CapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoEncodeH265CapabilitiesKHR & operator=( VkVideoEncodeH265CapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkVideoEncodeH265CapabilitiesKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoEncodeH265CapabilitiesKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, maxLevelIdc, maxSliceSegmentCount, maxTiles, ctbSizes, transformBlockSizes, maxPPictureL0ReferenceCount, maxBPictureL0ReferenceCount, maxL1ReferenceCount, maxSubLayerCount, expectDyadicTemporalSubLayerPattern, minQp, maxQp, prefersGopRemainingFrames, requiresGopRemainingFrames, stdSyntaxFlags ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) std::strong_ordering operator<=>( VideoEncodeH265CapabilitiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { if ( auto cmp = sType <=> rhs.sType; cmp != 0 ) return cmp; if ( auto cmp = pNext <=> rhs.pNext; cmp != 0 ) return cmp; if ( auto cmp = flags <=> rhs.flags; cmp != 0 ) return cmp; if ( auto cmp = memcmp( &maxLevelIdc, &rhs.maxLevelIdc, sizeof( StdVideoH265LevelIdc ) ); cmp != 0 ) return ( cmp < 0 ) ? std::strong_ordering::less : std::strong_ordering::greater; if ( auto cmp = maxSliceSegmentCount <=> rhs.maxSliceSegmentCount; cmp != 0 ) return cmp; if ( auto cmp = maxTiles <=> rhs.maxTiles; cmp != 0 ) return cmp; if ( auto cmp = ctbSizes <=> rhs.ctbSizes; cmp != 0 ) return cmp; if ( auto cmp = transformBlockSizes <=> rhs.transformBlockSizes; cmp != 0 ) return cmp; if ( auto cmp = maxPPictureL0ReferenceCount <=> rhs.maxPPictureL0ReferenceCount; cmp != 0 ) return cmp; if ( auto cmp = maxBPictureL0ReferenceCount <=> rhs.maxBPictureL0ReferenceCount; cmp != 0 ) return cmp; if ( auto cmp = maxL1ReferenceCount <=> rhs.maxL1ReferenceCount; cmp != 0 ) return cmp; if ( auto cmp = maxSubLayerCount <=> rhs.maxSubLayerCount; cmp != 0 ) return cmp; if ( auto cmp = expectDyadicTemporalSubLayerPattern <=> rhs.expectDyadicTemporalSubLayerPattern; cmp != 0 ) return cmp; if ( auto cmp = minQp <=> rhs.minQp; cmp != 0 ) return cmp; if ( auto cmp = maxQp <=> rhs.maxQp; cmp != 0 ) return cmp; if ( auto cmp = prefersGopRemainingFrames <=> rhs.prefersGopRemainingFrames; cmp != 0 ) return cmp; if ( auto cmp = requiresGopRemainingFrames <=> rhs.requiresGopRemainingFrames; cmp != 0 ) return cmp; if ( auto cmp = stdSyntaxFlags <=> rhs.stdSyntaxFlags; cmp != 0 ) return cmp; return std::strong_ordering::equivalent; } #endif bool operator==( VideoEncodeH265CapabilitiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( memcmp( &maxLevelIdc, &rhs.maxLevelIdc, sizeof( StdVideoH265LevelIdc ) ) == 0 ) && ( maxSliceSegmentCount == rhs.maxSliceSegmentCount ) && ( maxTiles == rhs.maxTiles ) && ( ctbSizes == rhs.ctbSizes ) && ( transformBlockSizes == rhs.transformBlockSizes ) && ( maxPPictureL0ReferenceCount == rhs.maxPPictureL0ReferenceCount ) && ( maxBPictureL0ReferenceCount == rhs.maxBPictureL0ReferenceCount ) && ( maxL1ReferenceCount == rhs.maxL1ReferenceCount ) && ( maxSubLayerCount == rhs.maxSubLayerCount ) && ( expectDyadicTemporalSubLayerPattern == rhs.expectDyadicTemporalSubLayerPattern ) && ( minQp == rhs.minQp ) && ( maxQp == rhs.maxQp ) && ( prefersGopRemainingFrames == rhs.prefersGopRemainingFrames ) && ( requiresGopRemainingFrames == rhs.requiresGopRemainingFrames ) && ( stdSyntaxFlags == rhs.stdSyntaxFlags ); } bool operator!=( VideoEncodeH265CapabilitiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoEncodeH265CapabilitiesKHR; void * pNext = {}; VULKAN_HPP_NAMESPACE::VideoEncodeH265CapabilityFlagsKHR flags = {}; StdVideoH265LevelIdc maxLevelIdc = {}; uint32_t maxSliceSegmentCount = {}; VULKAN_HPP_NAMESPACE::Extent2D maxTiles = {}; VULKAN_HPP_NAMESPACE::VideoEncodeH265CtbSizeFlagsKHR ctbSizes = {}; VULKAN_HPP_NAMESPACE::VideoEncodeH265TransformBlockSizeFlagsKHR transformBlockSizes = {}; uint32_t maxPPictureL0ReferenceCount = {}; uint32_t maxBPictureL0ReferenceCount = {}; uint32_t maxL1ReferenceCount = {}; uint32_t maxSubLayerCount = {}; VULKAN_HPP_NAMESPACE::Bool32 expectDyadicTemporalSubLayerPattern = {}; int32_t minQp = {}; int32_t maxQp = {}; VULKAN_HPP_NAMESPACE::Bool32 prefersGopRemainingFrames = {}; VULKAN_HPP_NAMESPACE::Bool32 requiresGopRemainingFrames = {}; VULKAN_HPP_NAMESPACE::VideoEncodeH265StdFlagsKHR stdSyntaxFlags = {}; }; template <> struct CppType { using Type = VideoEncodeH265CapabilitiesKHR; }; struct VideoEncodeH265DpbSlotInfoKHR { using NativeType = VkVideoEncodeH265DpbSlotInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoEncodeH265DpbSlotInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoEncodeH265DpbSlotInfoKHR( const StdVideoEncodeH265ReferenceInfo * pStdReferenceInfo_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , pStdReferenceInfo{ pStdReferenceInfo_ } { } VULKAN_HPP_CONSTEXPR VideoEncodeH265DpbSlotInfoKHR( VideoEncodeH265DpbSlotInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoEncodeH265DpbSlotInfoKHR( VkVideoEncodeH265DpbSlotInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoEncodeH265DpbSlotInfoKHR( *reinterpret_cast( &rhs ) ) { } VideoEncodeH265DpbSlotInfoKHR & operator=( VideoEncodeH265DpbSlotInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoEncodeH265DpbSlotInfoKHR & operator=( VkVideoEncodeH265DpbSlotInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265DpbSlotInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265DpbSlotInfoKHR & setPStdReferenceInfo( const StdVideoEncodeH265ReferenceInfo * pStdReferenceInfo_ ) VULKAN_HPP_NOEXCEPT { pStdReferenceInfo = pStdReferenceInfo_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkVideoEncodeH265DpbSlotInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoEncodeH265DpbSlotInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, pStdReferenceInfo ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( VideoEncodeH265DpbSlotInfoKHR const & ) const = default; #else bool operator==( VideoEncodeH265DpbSlotInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( pStdReferenceInfo == rhs.pStdReferenceInfo ); # endif } bool operator!=( VideoEncodeH265DpbSlotInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoEncodeH265DpbSlotInfoKHR; const void * pNext = {}; const StdVideoEncodeH265ReferenceInfo * pStdReferenceInfo = {}; }; template <> struct CppType { using Type = VideoEncodeH265DpbSlotInfoKHR; }; struct VideoEncodeH265FrameSizeKHR { using NativeType = VkVideoEncodeH265FrameSizeKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoEncodeH265FrameSizeKHR( uint32_t frameISize_ = {}, uint32_t framePSize_ = {}, uint32_t frameBSize_ = {} ) VULKAN_HPP_NOEXCEPT : frameISize{ frameISize_ } , framePSize{ framePSize_ } , frameBSize{ frameBSize_ } { } VULKAN_HPP_CONSTEXPR VideoEncodeH265FrameSizeKHR( VideoEncodeH265FrameSizeKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoEncodeH265FrameSizeKHR( VkVideoEncodeH265FrameSizeKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoEncodeH265FrameSizeKHR( *reinterpret_cast( &rhs ) ) { } VideoEncodeH265FrameSizeKHR & operator=( VideoEncodeH265FrameSizeKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoEncodeH265FrameSizeKHR & operator=( VkVideoEncodeH265FrameSizeKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265FrameSizeKHR & setFrameISize( uint32_t frameISize_ ) VULKAN_HPP_NOEXCEPT { frameISize = frameISize_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265FrameSizeKHR & setFramePSize( uint32_t framePSize_ ) VULKAN_HPP_NOEXCEPT { framePSize = framePSize_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265FrameSizeKHR & setFrameBSize( uint32_t frameBSize_ ) VULKAN_HPP_NOEXCEPT { frameBSize = frameBSize_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkVideoEncodeH265FrameSizeKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoEncodeH265FrameSizeKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( frameISize, framePSize, frameBSize ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( VideoEncodeH265FrameSizeKHR const & ) const = default; #else bool operator==( VideoEncodeH265FrameSizeKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( frameISize == rhs.frameISize ) && ( framePSize == rhs.framePSize ) && ( frameBSize == rhs.frameBSize ); # endif } bool operator!=( VideoEncodeH265FrameSizeKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: uint32_t frameISize = {}; uint32_t framePSize = {}; uint32_t frameBSize = {}; }; struct VideoEncodeH265GopRemainingFrameInfoKHR { using NativeType = VkVideoEncodeH265GopRemainingFrameInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoEncodeH265GopRemainingFrameInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoEncodeH265GopRemainingFrameInfoKHR( VULKAN_HPP_NAMESPACE::Bool32 useGopRemainingFrames_ = {}, uint32_t gopRemainingI_ = {}, uint32_t gopRemainingP_ = {}, uint32_t gopRemainingB_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , useGopRemainingFrames{ useGopRemainingFrames_ } , gopRemainingI{ gopRemainingI_ } , gopRemainingP{ gopRemainingP_ } , gopRemainingB{ gopRemainingB_ } { } VULKAN_HPP_CONSTEXPR VideoEncodeH265GopRemainingFrameInfoKHR( VideoEncodeH265GopRemainingFrameInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoEncodeH265GopRemainingFrameInfoKHR( VkVideoEncodeH265GopRemainingFrameInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoEncodeH265GopRemainingFrameInfoKHR( *reinterpret_cast( &rhs ) ) { } VideoEncodeH265GopRemainingFrameInfoKHR & operator=( VideoEncodeH265GopRemainingFrameInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoEncodeH265GopRemainingFrameInfoKHR & operator=( VkVideoEncodeH265GopRemainingFrameInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265GopRemainingFrameInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265GopRemainingFrameInfoKHR & setUseGopRemainingFrames( VULKAN_HPP_NAMESPACE::Bool32 useGopRemainingFrames_ ) VULKAN_HPP_NOEXCEPT { useGopRemainingFrames = useGopRemainingFrames_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265GopRemainingFrameInfoKHR & setGopRemainingI( uint32_t gopRemainingI_ ) VULKAN_HPP_NOEXCEPT { gopRemainingI = gopRemainingI_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265GopRemainingFrameInfoKHR & setGopRemainingP( uint32_t gopRemainingP_ ) VULKAN_HPP_NOEXCEPT { gopRemainingP = gopRemainingP_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265GopRemainingFrameInfoKHR & setGopRemainingB( uint32_t gopRemainingB_ ) VULKAN_HPP_NOEXCEPT { gopRemainingB = gopRemainingB_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkVideoEncodeH265GopRemainingFrameInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoEncodeH265GopRemainingFrameInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, useGopRemainingFrames, gopRemainingI, gopRemainingP, gopRemainingB ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( VideoEncodeH265GopRemainingFrameInfoKHR const & ) const = default; #else bool operator==( VideoEncodeH265GopRemainingFrameInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( useGopRemainingFrames == rhs.useGopRemainingFrames ) && ( gopRemainingI == rhs.gopRemainingI ) && ( gopRemainingP == rhs.gopRemainingP ) && ( gopRemainingB == rhs.gopRemainingB ); # endif } bool operator!=( VideoEncodeH265GopRemainingFrameInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoEncodeH265GopRemainingFrameInfoKHR; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 useGopRemainingFrames = {}; uint32_t gopRemainingI = {}; uint32_t gopRemainingP = {}; uint32_t gopRemainingB = {}; }; template <> struct CppType { using Type = VideoEncodeH265GopRemainingFrameInfoKHR; }; struct VideoEncodeH265NaluSliceSegmentInfoKHR { using NativeType = VkVideoEncodeH265NaluSliceSegmentInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoEncodeH265NaluSliceSegmentInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoEncodeH265NaluSliceSegmentInfoKHR( int32_t constantQp_ = {}, const StdVideoEncodeH265SliceSegmentHeader * pStdSliceSegmentHeader_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , constantQp{ constantQp_ } , pStdSliceSegmentHeader{ pStdSliceSegmentHeader_ } { } VULKAN_HPP_CONSTEXPR VideoEncodeH265NaluSliceSegmentInfoKHR( VideoEncodeH265NaluSliceSegmentInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoEncodeH265NaluSliceSegmentInfoKHR( VkVideoEncodeH265NaluSliceSegmentInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoEncodeH265NaluSliceSegmentInfoKHR( *reinterpret_cast( &rhs ) ) { } VideoEncodeH265NaluSliceSegmentInfoKHR & operator=( VideoEncodeH265NaluSliceSegmentInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoEncodeH265NaluSliceSegmentInfoKHR & operator=( VkVideoEncodeH265NaluSliceSegmentInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265NaluSliceSegmentInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265NaluSliceSegmentInfoKHR & setConstantQp( int32_t constantQp_ ) VULKAN_HPP_NOEXCEPT { constantQp = constantQp_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265NaluSliceSegmentInfoKHR & setPStdSliceSegmentHeader( const StdVideoEncodeH265SliceSegmentHeader * pStdSliceSegmentHeader_ ) VULKAN_HPP_NOEXCEPT { pStdSliceSegmentHeader = pStdSliceSegmentHeader_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkVideoEncodeH265NaluSliceSegmentInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoEncodeH265NaluSliceSegmentInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, constantQp, pStdSliceSegmentHeader ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( VideoEncodeH265NaluSliceSegmentInfoKHR const & ) const = default; #else bool operator==( VideoEncodeH265NaluSliceSegmentInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( constantQp == rhs.constantQp ) && ( pStdSliceSegmentHeader == rhs.pStdSliceSegmentHeader ); # endif } bool operator!=( VideoEncodeH265NaluSliceSegmentInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoEncodeH265NaluSliceSegmentInfoKHR; const void * pNext = {}; int32_t constantQp = {}; const StdVideoEncodeH265SliceSegmentHeader * pStdSliceSegmentHeader = {}; }; template <> struct CppType { using Type = VideoEncodeH265NaluSliceSegmentInfoKHR; }; struct VideoEncodeH265PictureInfoKHR { using NativeType = VkVideoEncodeH265PictureInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoEncodeH265PictureInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoEncodeH265PictureInfoKHR( uint32_t naluSliceSegmentEntryCount_ = {}, const VULKAN_HPP_NAMESPACE::VideoEncodeH265NaluSliceSegmentInfoKHR * pNaluSliceSegmentEntries_ = {}, const StdVideoEncodeH265PictureInfo * pStdPictureInfo_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , naluSliceSegmentEntryCount{ naluSliceSegmentEntryCount_ } , pNaluSliceSegmentEntries{ pNaluSliceSegmentEntries_ } , pStdPictureInfo{ pStdPictureInfo_ } { } VULKAN_HPP_CONSTEXPR VideoEncodeH265PictureInfoKHR( VideoEncodeH265PictureInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoEncodeH265PictureInfoKHR( VkVideoEncodeH265PictureInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoEncodeH265PictureInfoKHR( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) VideoEncodeH265PictureInfoKHR( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & naluSliceSegmentEntries_, const StdVideoEncodeH265PictureInfo * pStdPictureInfo_ = {}, const void * pNext_ = nullptr ) : pNext( pNext_ ) , naluSliceSegmentEntryCount( static_cast( naluSliceSegmentEntries_.size() ) ) , pNaluSliceSegmentEntries( naluSliceSegmentEntries_.data() ) , pStdPictureInfo( pStdPictureInfo_ ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VideoEncodeH265PictureInfoKHR & operator=( VideoEncodeH265PictureInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoEncodeH265PictureInfoKHR & operator=( VkVideoEncodeH265PictureInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265PictureInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265PictureInfoKHR & setNaluSliceSegmentEntryCount( uint32_t naluSliceSegmentEntryCount_ ) VULKAN_HPP_NOEXCEPT { naluSliceSegmentEntryCount = naluSliceSegmentEntryCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265PictureInfoKHR & setPNaluSliceSegmentEntries( const VULKAN_HPP_NAMESPACE::VideoEncodeH265NaluSliceSegmentInfoKHR * pNaluSliceSegmentEntries_ ) VULKAN_HPP_NOEXCEPT { pNaluSliceSegmentEntries = pNaluSliceSegmentEntries_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) VideoEncodeH265PictureInfoKHR & setNaluSliceSegmentEntries( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & naluSliceSegmentEntries_ ) VULKAN_HPP_NOEXCEPT { naluSliceSegmentEntryCount = static_cast( naluSliceSegmentEntries_.size() ); pNaluSliceSegmentEntries = naluSliceSegmentEntries_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265PictureInfoKHR & setPStdPictureInfo( const StdVideoEncodeH265PictureInfo * pStdPictureInfo_ ) VULKAN_HPP_NOEXCEPT { pStdPictureInfo = pStdPictureInfo_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkVideoEncodeH265PictureInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoEncodeH265PictureInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, naluSliceSegmentEntryCount, pNaluSliceSegmentEntries, pStdPictureInfo ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( VideoEncodeH265PictureInfoKHR const & ) const = default; #else bool operator==( VideoEncodeH265PictureInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( naluSliceSegmentEntryCount == rhs.naluSliceSegmentEntryCount ) && ( pNaluSliceSegmentEntries == rhs.pNaluSliceSegmentEntries ) && ( pStdPictureInfo == rhs.pStdPictureInfo ); # endif } bool operator!=( VideoEncodeH265PictureInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoEncodeH265PictureInfoKHR; const void * pNext = {}; uint32_t naluSliceSegmentEntryCount = {}; const VULKAN_HPP_NAMESPACE::VideoEncodeH265NaluSliceSegmentInfoKHR * pNaluSliceSegmentEntries = {}; const StdVideoEncodeH265PictureInfo * pStdPictureInfo = {}; }; template <> struct CppType { using Type = VideoEncodeH265PictureInfoKHR; }; struct VideoEncodeH265ProfileInfoKHR { using NativeType = VkVideoEncodeH265ProfileInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoEncodeH265ProfileInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoEncodeH265ProfileInfoKHR( StdVideoH265ProfileIdc stdProfileIdc_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , stdProfileIdc{ stdProfileIdc_ } { } VULKAN_HPP_CONSTEXPR VideoEncodeH265ProfileInfoKHR( VideoEncodeH265ProfileInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoEncodeH265ProfileInfoKHR( VkVideoEncodeH265ProfileInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoEncodeH265ProfileInfoKHR( *reinterpret_cast( &rhs ) ) { } VideoEncodeH265ProfileInfoKHR & operator=( VideoEncodeH265ProfileInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoEncodeH265ProfileInfoKHR & operator=( VkVideoEncodeH265ProfileInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265ProfileInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265ProfileInfoKHR & setStdProfileIdc( StdVideoH265ProfileIdc stdProfileIdc_ ) VULKAN_HPP_NOEXCEPT { stdProfileIdc = stdProfileIdc_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkVideoEncodeH265ProfileInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoEncodeH265ProfileInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, stdProfileIdc ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) std::strong_ordering operator<=>( VideoEncodeH265ProfileInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { if ( auto cmp = sType <=> rhs.sType; cmp != 0 ) return cmp; if ( auto cmp = pNext <=> rhs.pNext; cmp != 0 ) return cmp; if ( auto cmp = memcmp( &stdProfileIdc, &rhs.stdProfileIdc, sizeof( StdVideoH265ProfileIdc ) ); cmp != 0 ) return ( cmp < 0 ) ? std::strong_ordering::less : std::strong_ordering::greater; return std::strong_ordering::equivalent; } #endif bool operator==( VideoEncodeH265ProfileInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( memcmp( &stdProfileIdc, &rhs.stdProfileIdc, sizeof( StdVideoH265ProfileIdc ) ) == 0 ); } bool operator!=( VideoEncodeH265ProfileInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoEncodeH265ProfileInfoKHR; const void * pNext = {}; StdVideoH265ProfileIdc stdProfileIdc = {}; }; template <> struct CppType { using Type = VideoEncodeH265ProfileInfoKHR; }; struct VideoEncodeH265QpKHR { using NativeType = VkVideoEncodeH265QpKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoEncodeH265QpKHR( int32_t qpI_ = {}, int32_t qpP_ = {}, int32_t qpB_ = {} ) VULKAN_HPP_NOEXCEPT : qpI{ qpI_ } , qpP{ qpP_ } , qpB{ qpB_ } { } VULKAN_HPP_CONSTEXPR VideoEncodeH265QpKHR( VideoEncodeH265QpKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoEncodeH265QpKHR( VkVideoEncodeH265QpKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoEncodeH265QpKHR( *reinterpret_cast( &rhs ) ) { } VideoEncodeH265QpKHR & operator=( VideoEncodeH265QpKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoEncodeH265QpKHR & operator=( VkVideoEncodeH265QpKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265QpKHR & setQpI( int32_t qpI_ ) VULKAN_HPP_NOEXCEPT { qpI = qpI_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265QpKHR & setQpP( int32_t qpP_ ) VULKAN_HPP_NOEXCEPT { qpP = qpP_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265QpKHR & setQpB( int32_t qpB_ ) VULKAN_HPP_NOEXCEPT { qpB = qpB_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkVideoEncodeH265QpKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoEncodeH265QpKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( qpI, qpP, qpB ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( VideoEncodeH265QpKHR const & ) const = default; #else bool operator==( VideoEncodeH265QpKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( qpI == rhs.qpI ) && ( qpP == rhs.qpP ) && ( qpB == rhs.qpB ); # endif } bool operator!=( VideoEncodeH265QpKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: int32_t qpI = {}; int32_t qpP = {}; int32_t qpB = {}; }; struct VideoEncodeH265QualityLevelPropertiesKHR { using NativeType = VkVideoEncodeH265QualityLevelPropertiesKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoEncodeH265QualityLevelPropertiesKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoEncodeH265QualityLevelPropertiesKHR( VULKAN_HPP_NAMESPACE::VideoEncodeH265RateControlFlagsKHR preferredRateControlFlags_ = {}, uint32_t preferredGopFrameCount_ = {}, uint32_t preferredIdrPeriod_ = {}, uint32_t preferredConsecutiveBFrameCount_ = {}, uint32_t preferredSubLayerCount_ = {}, VULKAN_HPP_NAMESPACE::VideoEncodeH265QpKHR preferredConstantQp_ = {}, uint32_t preferredMaxL0ReferenceCount_ = {}, uint32_t preferredMaxL1ReferenceCount_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , preferredRateControlFlags{ preferredRateControlFlags_ } , preferredGopFrameCount{ preferredGopFrameCount_ } , preferredIdrPeriod{ preferredIdrPeriod_ } , preferredConsecutiveBFrameCount{ preferredConsecutiveBFrameCount_ } , preferredSubLayerCount{ preferredSubLayerCount_ } , preferredConstantQp{ preferredConstantQp_ } , preferredMaxL0ReferenceCount{ preferredMaxL0ReferenceCount_ } , preferredMaxL1ReferenceCount{ preferredMaxL1ReferenceCount_ } { } VULKAN_HPP_CONSTEXPR VideoEncodeH265QualityLevelPropertiesKHR( VideoEncodeH265QualityLevelPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoEncodeH265QualityLevelPropertiesKHR( VkVideoEncodeH265QualityLevelPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoEncodeH265QualityLevelPropertiesKHR( *reinterpret_cast( &rhs ) ) { } VideoEncodeH265QualityLevelPropertiesKHR & operator=( VideoEncodeH265QualityLevelPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoEncodeH265QualityLevelPropertiesKHR & operator=( VkVideoEncodeH265QualityLevelPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkVideoEncodeH265QualityLevelPropertiesKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoEncodeH265QualityLevelPropertiesKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, preferredRateControlFlags, preferredGopFrameCount, preferredIdrPeriod, preferredConsecutiveBFrameCount, preferredSubLayerCount, preferredConstantQp, preferredMaxL0ReferenceCount, preferredMaxL1ReferenceCount ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( VideoEncodeH265QualityLevelPropertiesKHR const & ) const = default; #else bool operator==( VideoEncodeH265QualityLevelPropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( preferredRateControlFlags == rhs.preferredRateControlFlags ) && ( preferredGopFrameCount == rhs.preferredGopFrameCount ) && ( preferredIdrPeriod == rhs.preferredIdrPeriod ) && ( preferredConsecutiveBFrameCount == rhs.preferredConsecutiveBFrameCount ) && ( preferredSubLayerCount == rhs.preferredSubLayerCount ) && ( preferredConstantQp == rhs.preferredConstantQp ) && ( preferredMaxL0ReferenceCount == rhs.preferredMaxL0ReferenceCount ) && ( preferredMaxL1ReferenceCount == rhs.preferredMaxL1ReferenceCount ); # endif } bool operator!=( VideoEncodeH265QualityLevelPropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoEncodeH265QualityLevelPropertiesKHR; void * pNext = {}; VULKAN_HPP_NAMESPACE::VideoEncodeH265RateControlFlagsKHR preferredRateControlFlags = {}; uint32_t preferredGopFrameCount = {}; uint32_t preferredIdrPeriod = {}; uint32_t preferredConsecutiveBFrameCount = {}; uint32_t preferredSubLayerCount = {}; VULKAN_HPP_NAMESPACE::VideoEncodeH265QpKHR preferredConstantQp = {}; uint32_t preferredMaxL0ReferenceCount = {}; uint32_t preferredMaxL1ReferenceCount = {}; }; template <> struct CppType { using Type = VideoEncodeH265QualityLevelPropertiesKHR; }; struct VideoEncodeH265QuantizationMapCapabilitiesKHR { using NativeType = VkVideoEncodeH265QuantizationMapCapabilitiesKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoEncodeH265QuantizationMapCapabilitiesKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoEncodeH265QuantizationMapCapabilitiesKHR( int32_t minQpDelta_ = {}, int32_t maxQpDelta_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , minQpDelta{ minQpDelta_ } , maxQpDelta{ maxQpDelta_ } { } VULKAN_HPP_CONSTEXPR VideoEncodeH265QuantizationMapCapabilitiesKHR( VideoEncodeH265QuantizationMapCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoEncodeH265QuantizationMapCapabilitiesKHR( VkVideoEncodeH265QuantizationMapCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoEncodeH265QuantizationMapCapabilitiesKHR( *reinterpret_cast( &rhs ) ) { } VideoEncodeH265QuantizationMapCapabilitiesKHR & operator=( VideoEncodeH265QuantizationMapCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoEncodeH265QuantizationMapCapabilitiesKHR & operator=( VkVideoEncodeH265QuantizationMapCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkVideoEncodeH265QuantizationMapCapabilitiesKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoEncodeH265QuantizationMapCapabilitiesKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, minQpDelta, maxQpDelta ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( VideoEncodeH265QuantizationMapCapabilitiesKHR const & ) const = default; #else bool operator==( VideoEncodeH265QuantizationMapCapabilitiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( minQpDelta == rhs.minQpDelta ) && ( maxQpDelta == rhs.maxQpDelta ); # endif } bool operator!=( VideoEncodeH265QuantizationMapCapabilitiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoEncodeH265QuantizationMapCapabilitiesKHR; void * pNext = {}; int32_t minQpDelta = {}; int32_t maxQpDelta = {}; }; template <> struct CppType { using Type = VideoEncodeH265QuantizationMapCapabilitiesKHR; }; struct VideoEncodeH265RateControlInfoKHR { using NativeType = VkVideoEncodeH265RateControlInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoEncodeH265RateControlInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoEncodeH265RateControlInfoKHR( VULKAN_HPP_NAMESPACE::VideoEncodeH265RateControlFlagsKHR flags_ = {}, uint32_t gopFrameCount_ = {}, uint32_t idrPeriod_ = {}, uint32_t consecutiveBFrameCount_ = {}, uint32_t subLayerCount_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , gopFrameCount{ gopFrameCount_ } , idrPeriod{ idrPeriod_ } , consecutiveBFrameCount{ consecutiveBFrameCount_ } , subLayerCount{ subLayerCount_ } { } VULKAN_HPP_CONSTEXPR VideoEncodeH265RateControlInfoKHR( VideoEncodeH265RateControlInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoEncodeH265RateControlInfoKHR( VkVideoEncodeH265RateControlInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoEncodeH265RateControlInfoKHR( *reinterpret_cast( &rhs ) ) { } VideoEncodeH265RateControlInfoKHR & operator=( VideoEncodeH265RateControlInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoEncodeH265RateControlInfoKHR & operator=( VkVideoEncodeH265RateControlInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265RateControlInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265RateControlInfoKHR & setFlags( VULKAN_HPP_NAMESPACE::VideoEncodeH265RateControlFlagsKHR flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265RateControlInfoKHR & setGopFrameCount( uint32_t gopFrameCount_ ) VULKAN_HPP_NOEXCEPT { gopFrameCount = gopFrameCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265RateControlInfoKHR & setIdrPeriod( uint32_t idrPeriod_ ) VULKAN_HPP_NOEXCEPT { idrPeriod = idrPeriod_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265RateControlInfoKHR & setConsecutiveBFrameCount( uint32_t consecutiveBFrameCount_ ) VULKAN_HPP_NOEXCEPT { consecutiveBFrameCount = consecutiveBFrameCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265RateControlInfoKHR & setSubLayerCount( uint32_t subLayerCount_ ) VULKAN_HPP_NOEXCEPT { subLayerCount = subLayerCount_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkVideoEncodeH265RateControlInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoEncodeH265RateControlInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, gopFrameCount, idrPeriod, consecutiveBFrameCount, subLayerCount ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( VideoEncodeH265RateControlInfoKHR const & ) const = default; #else bool operator==( VideoEncodeH265RateControlInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( gopFrameCount == rhs.gopFrameCount ) && ( idrPeriod == rhs.idrPeriod ) && ( consecutiveBFrameCount == rhs.consecutiveBFrameCount ) && ( subLayerCount == rhs.subLayerCount ); # endif } bool operator!=( VideoEncodeH265RateControlInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoEncodeH265RateControlInfoKHR; const void * pNext = {}; VULKAN_HPP_NAMESPACE::VideoEncodeH265RateControlFlagsKHR flags = {}; uint32_t gopFrameCount = {}; uint32_t idrPeriod = {}; uint32_t consecutiveBFrameCount = {}; uint32_t subLayerCount = {}; }; template <> struct CppType { using Type = VideoEncodeH265RateControlInfoKHR; }; struct VideoEncodeH265RateControlLayerInfoKHR { using NativeType = VkVideoEncodeH265RateControlLayerInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoEncodeH265RateControlLayerInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoEncodeH265RateControlLayerInfoKHR( VULKAN_HPP_NAMESPACE::Bool32 useMinQp_ = {}, VULKAN_HPP_NAMESPACE::VideoEncodeH265QpKHR minQp_ = {}, VULKAN_HPP_NAMESPACE::Bool32 useMaxQp_ = {}, VULKAN_HPP_NAMESPACE::VideoEncodeH265QpKHR maxQp_ = {}, VULKAN_HPP_NAMESPACE::Bool32 useMaxFrameSize_ = {}, VULKAN_HPP_NAMESPACE::VideoEncodeH265FrameSizeKHR maxFrameSize_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , useMinQp{ useMinQp_ } , minQp{ minQp_ } , useMaxQp{ useMaxQp_ } , maxQp{ maxQp_ } , useMaxFrameSize{ useMaxFrameSize_ } , maxFrameSize{ maxFrameSize_ } { } VULKAN_HPP_CONSTEXPR VideoEncodeH265RateControlLayerInfoKHR( VideoEncodeH265RateControlLayerInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoEncodeH265RateControlLayerInfoKHR( VkVideoEncodeH265RateControlLayerInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoEncodeH265RateControlLayerInfoKHR( *reinterpret_cast( &rhs ) ) { } VideoEncodeH265RateControlLayerInfoKHR & operator=( VideoEncodeH265RateControlLayerInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoEncodeH265RateControlLayerInfoKHR & operator=( VkVideoEncodeH265RateControlLayerInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265RateControlLayerInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265RateControlLayerInfoKHR & setUseMinQp( VULKAN_HPP_NAMESPACE::Bool32 useMinQp_ ) VULKAN_HPP_NOEXCEPT { useMinQp = useMinQp_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265RateControlLayerInfoKHR & setMinQp( VULKAN_HPP_NAMESPACE::VideoEncodeH265QpKHR const & minQp_ ) VULKAN_HPP_NOEXCEPT { minQp = minQp_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265RateControlLayerInfoKHR & setUseMaxQp( VULKAN_HPP_NAMESPACE::Bool32 useMaxQp_ ) VULKAN_HPP_NOEXCEPT { useMaxQp = useMaxQp_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265RateControlLayerInfoKHR & setMaxQp( VULKAN_HPP_NAMESPACE::VideoEncodeH265QpKHR const & maxQp_ ) VULKAN_HPP_NOEXCEPT { maxQp = maxQp_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265RateControlLayerInfoKHR & setUseMaxFrameSize( VULKAN_HPP_NAMESPACE::Bool32 useMaxFrameSize_ ) VULKAN_HPP_NOEXCEPT { useMaxFrameSize = useMaxFrameSize_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265RateControlLayerInfoKHR & setMaxFrameSize( VULKAN_HPP_NAMESPACE::VideoEncodeH265FrameSizeKHR const & maxFrameSize_ ) VULKAN_HPP_NOEXCEPT { maxFrameSize = maxFrameSize_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkVideoEncodeH265RateControlLayerInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoEncodeH265RateControlLayerInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, useMinQp, minQp, useMaxQp, maxQp, useMaxFrameSize, maxFrameSize ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( VideoEncodeH265RateControlLayerInfoKHR const & ) const = default; #else bool operator==( VideoEncodeH265RateControlLayerInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( useMinQp == rhs.useMinQp ) && ( minQp == rhs.minQp ) && ( useMaxQp == rhs.useMaxQp ) && ( maxQp == rhs.maxQp ) && ( useMaxFrameSize == rhs.useMaxFrameSize ) && ( maxFrameSize == rhs.maxFrameSize ); # endif } bool operator!=( VideoEncodeH265RateControlLayerInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoEncodeH265RateControlLayerInfoKHR; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 useMinQp = {}; VULKAN_HPP_NAMESPACE::VideoEncodeH265QpKHR minQp = {}; VULKAN_HPP_NAMESPACE::Bool32 useMaxQp = {}; VULKAN_HPP_NAMESPACE::VideoEncodeH265QpKHR maxQp = {}; VULKAN_HPP_NAMESPACE::Bool32 useMaxFrameSize = {}; VULKAN_HPP_NAMESPACE::VideoEncodeH265FrameSizeKHR maxFrameSize = {}; }; template <> struct CppType { using Type = VideoEncodeH265RateControlLayerInfoKHR; }; struct VideoEncodeH265SessionCreateInfoKHR { using NativeType = VkVideoEncodeH265SessionCreateInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoEncodeH265SessionCreateInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoEncodeH265SessionCreateInfoKHR( VULKAN_HPP_NAMESPACE::Bool32 useMaxLevelIdc_ = {}, StdVideoH265LevelIdc maxLevelIdc_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , useMaxLevelIdc{ useMaxLevelIdc_ } , maxLevelIdc{ maxLevelIdc_ } { } VULKAN_HPP_CONSTEXPR VideoEncodeH265SessionCreateInfoKHR( VideoEncodeH265SessionCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoEncodeH265SessionCreateInfoKHR( VkVideoEncodeH265SessionCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoEncodeH265SessionCreateInfoKHR( *reinterpret_cast( &rhs ) ) { } VideoEncodeH265SessionCreateInfoKHR & operator=( VideoEncodeH265SessionCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoEncodeH265SessionCreateInfoKHR & operator=( VkVideoEncodeH265SessionCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265SessionCreateInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265SessionCreateInfoKHR & setUseMaxLevelIdc( VULKAN_HPP_NAMESPACE::Bool32 useMaxLevelIdc_ ) VULKAN_HPP_NOEXCEPT { useMaxLevelIdc = useMaxLevelIdc_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265SessionCreateInfoKHR & setMaxLevelIdc( StdVideoH265LevelIdc maxLevelIdc_ ) VULKAN_HPP_NOEXCEPT { maxLevelIdc = maxLevelIdc_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkVideoEncodeH265SessionCreateInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoEncodeH265SessionCreateInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, useMaxLevelIdc, maxLevelIdc ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) std::strong_ordering operator<=>( VideoEncodeH265SessionCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { if ( auto cmp = sType <=> rhs.sType; cmp != 0 ) return cmp; if ( auto cmp = pNext <=> rhs.pNext; cmp != 0 ) return cmp; if ( auto cmp = useMaxLevelIdc <=> rhs.useMaxLevelIdc; cmp != 0 ) return cmp; if ( auto cmp = memcmp( &maxLevelIdc, &rhs.maxLevelIdc, sizeof( StdVideoH265LevelIdc ) ); cmp != 0 ) return ( cmp < 0 ) ? std::strong_ordering::less : std::strong_ordering::greater; return std::strong_ordering::equivalent; } #endif bool operator==( VideoEncodeH265SessionCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( useMaxLevelIdc == rhs.useMaxLevelIdc ) && ( memcmp( &maxLevelIdc, &rhs.maxLevelIdc, sizeof( StdVideoH265LevelIdc ) ) == 0 ); } bool operator!=( VideoEncodeH265SessionCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoEncodeH265SessionCreateInfoKHR; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 useMaxLevelIdc = {}; StdVideoH265LevelIdc maxLevelIdc = {}; }; template <> struct CppType { using Type = VideoEncodeH265SessionCreateInfoKHR; }; struct VideoEncodeH265SessionParametersAddInfoKHR { using NativeType = VkVideoEncodeH265SessionParametersAddInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoEncodeH265SessionParametersAddInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoEncodeH265SessionParametersAddInfoKHR( uint32_t stdVPSCount_ = {}, const StdVideoH265VideoParameterSet * pStdVPSs_ = {}, uint32_t stdSPSCount_ = {}, const StdVideoH265SequenceParameterSet * pStdSPSs_ = {}, uint32_t stdPPSCount_ = {}, const StdVideoH265PictureParameterSet * pStdPPSs_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , stdVPSCount{ stdVPSCount_ } , pStdVPSs{ pStdVPSs_ } , stdSPSCount{ stdSPSCount_ } , pStdSPSs{ pStdSPSs_ } , stdPPSCount{ stdPPSCount_ } , pStdPPSs{ pStdPPSs_ } { } VULKAN_HPP_CONSTEXPR VideoEncodeH265SessionParametersAddInfoKHR( VideoEncodeH265SessionParametersAddInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoEncodeH265SessionParametersAddInfoKHR( VkVideoEncodeH265SessionParametersAddInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoEncodeH265SessionParametersAddInfoKHR( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) VideoEncodeH265SessionParametersAddInfoKHR( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & stdVPSs_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & stdSPSs_ = {}, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & stdPPSs_ = {}, const void * pNext_ = nullptr ) : pNext( pNext_ ) , stdVPSCount( static_cast( stdVPSs_.size() ) ) , pStdVPSs( stdVPSs_.data() ) , stdSPSCount( static_cast( stdSPSs_.size() ) ) , pStdSPSs( stdSPSs_.data() ) , stdPPSCount( static_cast( stdPPSs_.size() ) ) , pStdPPSs( stdPPSs_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VideoEncodeH265SessionParametersAddInfoKHR & operator=( VideoEncodeH265SessionParametersAddInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoEncodeH265SessionParametersAddInfoKHR & operator=( VkVideoEncodeH265SessionParametersAddInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265SessionParametersAddInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265SessionParametersAddInfoKHR & setStdVPSCount( uint32_t stdVPSCount_ ) VULKAN_HPP_NOEXCEPT { stdVPSCount = stdVPSCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265SessionParametersAddInfoKHR & setPStdVPSs( const StdVideoH265VideoParameterSet * pStdVPSs_ ) VULKAN_HPP_NOEXCEPT { pStdVPSs = pStdVPSs_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) VideoEncodeH265SessionParametersAddInfoKHR & setStdVPSs( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & stdVPSs_ ) VULKAN_HPP_NOEXCEPT { stdVPSCount = static_cast( stdVPSs_.size() ); pStdVPSs = stdVPSs_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265SessionParametersAddInfoKHR & setStdSPSCount( uint32_t stdSPSCount_ ) VULKAN_HPP_NOEXCEPT { stdSPSCount = stdSPSCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265SessionParametersAddInfoKHR & setPStdSPSs( const StdVideoH265SequenceParameterSet * pStdSPSs_ ) VULKAN_HPP_NOEXCEPT { pStdSPSs = pStdSPSs_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) VideoEncodeH265SessionParametersAddInfoKHR & setStdSPSs( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & stdSPSs_ ) VULKAN_HPP_NOEXCEPT { stdSPSCount = static_cast( stdSPSs_.size() ); pStdSPSs = stdSPSs_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265SessionParametersAddInfoKHR & setStdPPSCount( uint32_t stdPPSCount_ ) VULKAN_HPP_NOEXCEPT { stdPPSCount = stdPPSCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265SessionParametersAddInfoKHR & setPStdPPSs( const StdVideoH265PictureParameterSet * pStdPPSs_ ) VULKAN_HPP_NOEXCEPT { pStdPPSs = pStdPPSs_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) VideoEncodeH265SessionParametersAddInfoKHR & setStdPPSs( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & stdPPSs_ ) VULKAN_HPP_NOEXCEPT { stdPPSCount = static_cast( stdPPSs_.size() ); pStdPPSs = stdPPSs_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkVideoEncodeH265SessionParametersAddInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoEncodeH265SessionParametersAddInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, stdVPSCount, pStdVPSs, stdSPSCount, pStdSPSs, stdPPSCount, pStdPPSs ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( VideoEncodeH265SessionParametersAddInfoKHR const & ) const = default; #else bool operator==( VideoEncodeH265SessionParametersAddInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( stdVPSCount == rhs.stdVPSCount ) && ( pStdVPSs == rhs.pStdVPSs ) && ( stdSPSCount == rhs.stdSPSCount ) && ( pStdSPSs == rhs.pStdSPSs ) && ( stdPPSCount == rhs.stdPPSCount ) && ( pStdPPSs == rhs.pStdPPSs ); # endif } bool operator!=( VideoEncodeH265SessionParametersAddInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoEncodeH265SessionParametersAddInfoKHR; const void * pNext = {}; uint32_t stdVPSCount = {}; const StdVideoH265VideoParameterSet * pStdVPSs = {}; uint32_t stdSPSCount = {}; const StdVideoH265SequenceParameterSet * pStdSPSs = {}; uint32_t stdPPSCount = {}; const StdVideoH265PictureParameterSet * pStdPPSs = {}; }; template <> struct CppType { using Type = VideoEncodeH265SessionParametersAddInfoKHR; }; struct VideoEncodeH265SessionParametersCreateInfoKHR { using NativeType = VkVideoEncodeH265SessionParametersCreateInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoEncodeH265SessionParametersCreateInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoEncodeH265SessionParametersCreateInfoKHR( uint32_t maxStdVPSCount_ = {}, uint32_t maxStdSPSCount_ = {}, uint32_t maxStdPPSCount_ = {}, const VULKAN_HPP_NAMESPACE::VideoEncodeH265SessionParametersAddInfoKHR * pParametersAddInfo_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , maxStdVPSCount{ maxStdVPSCount_ } , maxStdSPSCount{ maxStdSPSCount_ } , maxStdPPSCount{ maxStdPPSCount_ } , pParametersAddInfo{ pParametersAddInfo_ } { } VULKAN_HPP_CONSTEXPR VideoEncodeH265SessionParametersCreateInfoKHR( VideoEncodeH265SessionParametersCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoEncodeH265SessionParametersCreateInfoKHR( VkVideoEncodeH265SessionParametersCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoEncodeH265SessionParametersCreateInfoKHR( *reinterpret_cast( &rhs ) ) { } VideoEncodeH265SessionParametersCreateInfoKHR & operator=( VideoEncodeH265SessionParametersCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoEncodeH265SessionParametersCreateInfoKHR & operator=( VkVideoEncodeH265SessionParametersCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265SessionParametersCreateInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265SessionParametersCreateInfoKHR & setMaxStdVPSCount( uint32_t maxStdVPSCount_ ) VULKAN_HPP_NOEXCEPT { maxStdVPSCount = maxStdVPSCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265SessionParametersCreateInfoKHR & setMaxStdSPSCount( uint32_t maxStdSPSCount_ ) VULKAN_HPP_NOEXCEPT { maxStdSPSCount = maxStdSPSCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265SessionParametersCreateInfoKHR & setMaxStdPPSCount( uint32_t maxStdPPSCount_ ) VULKAN_HPP_NOEXCEPT { maxStdPPSCount = maxStdPPSCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265SessionParametersCreateInfoKHR & setPParametersAddInfo( const VULKAN_HPP_NAMESPACE::VideoEncodeH265SessionParametersAddInfoKHR * pParametersAddInfo_ ) VULKAN_HPP_NOEXCEPT { pParametersAddInfo = pParametersAddInfo_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkVideoEncodeH265SessionParametersCreateInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoEncodeH265SessionParametersCreateInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, maxStdVPSCount, maxStdSPSCount, maxStdPPSCount, pParametersAddInfo ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( VideoEncodeH265SessionParametersCreateInfoKHR const & ) const = default; #else bool operator==( VideoEncodeH265SessionParametersCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( maxStdVPSCount == rhs.maxStdVPSCount ) && ( maxStdSPSCount == rhs.maxStdSPSCount ) && ( maxStdPPSCount == rhs.maxStdPPSCount ) && ( pParametersAddInfo == rhs.pParametersAddInfo ); # endif } bool operator!=( VideoEncodeH265SessionParametersCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoEncodeH265SessionParametersCreateInfoKHR; const void * pNext = {}; uint32_t maxStdVPSCount = {}; uint32_t maxStdSPSCount = {}; uint32_t maxStdPPSCount = {}; const VULKAN_HPP_NAMESPACE::VideoEncodeH265SessionParametersAddInfoKHR * pParametersAddInfo = {}; }; template <> struct CppType { using Type = VideoEncodeH265SessionParametersCreateInfoKHR; }; struct VideoEncodeH265SessionParametersFeedbackInfoKHR { using NativeType = VkVideoEncodeH265SessionParametersFeedbackInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoEncodeH265SessionParametersFeedbackInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoEncodeH265SessionParametersFeedbackInfoKHR( VULKAN_HPP_NAMESPACE::Bool32 hasStdVPSOverrides_ = {}, VULKAN_HPP_NAMESPACE::Bool32 hasStdSPSOverrides_ = {}, VULKAN_HPP_NAMESPACE::Bool32 hasStdPPSOverrides_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , hasStdVPSOverrides{ hasStdVPSOverrides_ } , hasStdSPSOverrides{ hasStdSPSOverrides_ } , hasStdPPSOverrides{ hasStdPPSOverrides_ } { } VULKAN_HPP_CONSTEXPR VideoEncodeH265SessionParametersFeedbackInfoKHR( VideoEncodeH265SessionParametersFeedbackInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoEncodeH265SessionParametersFeedbackInfoKHR( VkVideoEncodeH265SessionParametersFeedbackInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoEncodeH265SessionParametersFeedbackInfoKHR( *reinterpret_cast( &rhs ) ) { } VideoEncodeH265SessionParametersFeedbackInfoKHR & operator=( VideoEncodeH265SessionParametersFeedbackInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoEncodeH265SessionParametersFeedbackInfoKHR & operator=( VkVideoEncodeH265SessionParametersFeedbackInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkVideoEncodeH265SessionParametersFeedbackInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoEncodeH265SessionParametersFeedbackInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, hasStdVPSOverrides, hasStdSPSOverrides, hasStdPPSOverrides ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( VideoEncodeH265SessionParametersFeedbackInfoKHR const & ) const = default; #else bool operator==( VideoEncodeH265SessionParametersFeedbackInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( hasStdVPSOverrides == rhs.hasStdVPSOverrides ) && ( hasStdSPSOverrides == rhs.hasStdSPSOverrides ) && ( hasStdPPSOverrides == rhs.hasStdPPSOverrides ); # endif } bool operator!=( VideoEncodeH265SessionParametersFeedbackInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoEncodeH265SessionParametersFeedbackInfoKHR; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 hasStdVPSOverrides = {}; VULKAN_HPP_NAMESPACE::Bool32 hasStdSPSOverrides = {}; VULKAN_HPP_NAMESPACE::Bool32 hasStdPPSOverrides = {}; }; template <> struct CppType { using Type = VideoEncodeH265SessionParametersFeedbackInfoKHR; }; struct VideoEncodeH265SessionParametersGetInfoKHR { using NativeType = VkVideoEncodeH265SessionParametersGetInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoEncodeH265SessionParametersGetInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoEncodeH265SessionParametersGetInfoKHR( VULKAN_HPP_NAMESPACE::Bool32 writeStdVPS_ = {}, VULKAN_HPP_NAMESPACE::Bool32 writeStdSPS_ = {}, VULKAN_HPP_NAMESPACE::Bool32 writeStdPPS_ = {}, uint32_t stdVPSId_ = {}, uint32_t stdSPSId_ = {}, uint32_t stdPPSId_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , writeStdVPS{ writeStdVPS_ } , writeStdSPS{ writeStdSPS_ } , writeStdPPS{ writeStdPPS_ } , stdVPSId{ stdVPSId_ } , stdSPSId{ stdSPSId_ } , stdPPSId{ stdPPSId_ } { } VULKAN_HPP_CONSTEXPR VideoEncodeH265SessionParametersGetInfoKHR( VideoEncodeH265SessionParametersGetInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoEncodeH265SessionParametersGetInfoKHR( VkVideoEncodeH265SessionParametersGetInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoEncodeH265SessionParametersGetInfoKHR( *reinterpret_cast( &rhs ) ) { } VideoEncodeH265SessionParametersGetInfoKHR & operator=( VideoEncodeH265SessionParametersGetInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoEncodeH265SessionParametersGetInfoKHR & operator=( VkVideoEncodeH265SessionParametersGetInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265SessionParametersGetInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265SessionParametersGetInfoKHR & setWriteStdVPS( VULKAN_HPP_NAMESPACE::Bool32 writeStdVPS_ ) VULKAN_HPP_NOEXCEPT { writeStdVPS = writeStdVPS_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265SessionParametersGetInfoKHR & setWriteStdSPS( VULKAN_HPP_NAMESPACE::Bool32 writeStdSPS_ ) VULKAN_HPP_NOEXCEPT { writeStdSPS = writeStdSPS_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265SessionParametersGetInfoKHR & setWriteStdPPS( VULKAN_HPP_NAMESPACE::Bool32 writeStdPPS_ ) VULKAN_HPP_NOEXCEPT { writeStdPPS = writeStdPPS_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265SessionParametersGetInfoKHR & setStdVPSId( uint32_t stdVPSId_ ) VULKAN_HPP_NOEXCEPT { stdVPSId = stdVPSId_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265SessionParametersGetInfoKHR & setStdSPSId( uint32_t stdSPSId_ ) VULKAN_HPP_NOEXCEPT { stdSPSId = stdSPSId_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeH265SessionParametersGetInfoKHR & setStdPPSId( uint32_t stdPPSId_ ) VULKAN_HPP_NOEXCEPT { stdPPSId = stdPPSId_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkVideoEncodeH265SessionParametersGetInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoEncodeH265SessionParametersGetInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, writeStdVPS, writeStdSPS, writeStdPPS, stdVPSId, stdSPSId, stdPPSId ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( VideoEncodeH265SessionParametersGetInfoKHR const & ) const = default; #else bool operator==( VideoEncodeH265SessionParametersGetInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( writeStdVPS == rhs.writeStdVPS ) && ( writeStdSPS == rhs.writeStdSPS ) && ( writeStdPPS == rhs.writeStdPPS ) && ( stdVPSId == rhs.stdVPSId ) && ( stdSPSId == rhs.stdSPSId ) && ( stdPPSId == rhs.stdPPSId ); # endif } bool operator!=( VideoEncodeH265SessionParametersGetInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoEncodeH265SessionParametersGetInfoKHR; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 writeStdVPS = {}; VULKAN_HPP_NAMESPACE::Bool32 writeStdSPS = {}; VULKAN_HPP_NAMESPACE::Bool32 writeStdPPS = {}; uint32_t stdVPSId = {}; uint32_t stdSPSId = {}; uint32_t stdPPSId = {}; }; template <> struct CppType { using Type = VideoEncodeH265SessionParametersGetInfoKHR; }; struct VideoEncodeInfoKHR { using NativeType = VkVideoEncodeInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoEncodeInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoEncodeInfoKHR( VULKAN_HPP_NAMESPACE::VideoEncodeFlagsKHR flags_ = {}, VULKAN_HPP_NAMESPACE::Buffer dstBuffer_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize dstBufferOffset_ = {}, VULKAN_HPP_NAMESPACE::DeviceSize dstBufferRange_ = {}, VULKAN_HPP_NAMESPACE::VideoPictureResourceInfoKHR srcPictureResource_ = {}, const VULKAN_HPP_NAMESPACE::VideoReferenceSlotInfoKHR * pSetupReferenceSlot_ = {}, uint32_t referenceSlotCount_ = {}, const VULKAN_HPP_NAMESPACE::VideoReferenceSlotInfoKHR * pReferenceSlots_ = {}, uint32_t precedingExternallyEncodedBytes_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , dstBuffer{ dstBuffer_ } , dstBufferOffset{ dstBufferOffset_ } , dstBufferRange{ dstBufferRange_ } , srcPictureResource{ srcPictureResource_ } , pSetupReferenceSlot{ pSetupReferenceSlot_ } , referenceSlotCount{ referenceSlotCount_ } , pReferenceSlots{ pReferenceSlots_ } , precedingExternallyEncodedBytes{ precedingExternallyEncodedBytes_ } { } VULKAN_HPP_CONSTEXPR VideoEncodeInfoKHR( VideoEncodeInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoEncodeInfoKHR( VkVideoEncodeInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoEncodeInfoKHR( *reinterpret_cast( &rhs ) ) {} # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) VideoEncodeInfoKHR( VULKAN_HPP_NAMESPACE::VideoEncodeFlagsKHR flags_, VULKAN_HPP_NAMESPACE::Buffer dstBuffer_, VULKAN_HPP_NAMESPACE::DeviceSize dstBufferOffset_, VULKAN_HPP_NAMESPACE::DeviceSize dstBufferRange_, VULKAN_HPP_NAMESPACE::VideoPictureResourceInfoKHR srcPictureResource_, const VULKAN_HPP_NAMESPACE::VideoReferenceSlotInfoKHR * pSetupReferenceSlot_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & referenceSlots_, uint32_t precedingExternallyEncodedBytes_ = {}, const void * pNext_ = nullptr ) : pNext( pNext_ ) , flags( flags_ ) , dstBuffer( dstBuffer_ ) , dstBufferOffset( dstBufferOffset_ ) , dstBufferRange( dstBufferRange_ ) , srcPictureResource( srcPictureResource_ ) , pSetupReferenceSlot( pSetupReferenceSlot_ ) , referenceSlotCount( static_cast( referenceSlots_.size() ) ) , pReferenceSlots( referenceSlots_.data() ) , precedingExternallyEncodedBytes( precedingExternallyEncodedBytes_ ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VideoEncodeInfoKHR & operator=( VideoEncodeInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoEncodeInfoKHR & operator=( VkVideoEncodeInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 VideoEncodeInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeInfoKHR & setFlags( VULKAN_HPP_NAMESPACE::VideoEncodeFlagsKHR flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeInfoKHR & setDstBuffer( VULKAN_HPP_NAMESPACE::Buffer dstBuffer_ ) VULKAN_HPP_NOEXCEPT { dstBuffer = dstBuffer_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeInfoKHR & setDstBufferOffset( VULKAN_HPP_NAMESPACE::DeviceSize dstBufferOffset_ ) VULKAN_HPP_NOEXCEPT { dstBufferOffset = dstBufferOffset_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeInfoKHR & setDstBufferRange( VULKAN_HPP_NAMESPACE::DeviceSize dstBufferRange_ ) VULKAN_HPP_NOEXCEPT { dstBufferRange = dstBufferRange_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeInfoKHR & setSrcPictureResource( VULKAN_HPP_NAMESPACE::VideoPictureResourceInfoKHR const & srcPictureResource_ ) VULKAN_HPP_NOEXCEPT { srcPictureResource = srcPictureResource_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeInfoKHR & setPSetupReferenceSlot( const VULKAN_HPP_NAMESPACE::VideoReferenceSlotInfoKHR * pSetupReferenceSlot_ ) VULKAN_HPP_NOEXCEPT { pSetupReferenceSlot = pSetupReferenceSlot_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeInfoKHR & setReferenceSlotCount( uint32_t referenceSlotCount_ ) VULKAN_HPP_NOEXCEPT { referenceSlotCount = referenceSlotCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeInfoKHR & setPReferenceSlots( const VULKAN_HPP_NAMESPACE::VideoReferenceSlotInfoKHR * pReferenceSlots_ ) VULKAN_HPP_NOEXCEPT { pReferenceSlots = pReferenceSlots_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) VideoEncodeInfoKHR & setReferenceSlots( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & referenceSlots_ ) VULKAN_HPP_NOEXCEPT { referenceSlotCount = static_cast( referenceSlots_.size() ); pReferenceSlots = referenceSlots_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 VideoEncodeInfoKHR & setPrecedingExternallyEncodedBytes( uint32_t precedingExternallyEncodedBytes_ ) VULKAN_HPP_NOEXCEPT { precedingExternallyEncodedBytes = precedingExternallyEncodedBytes_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkVideoEncodeInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoEncodeInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, dstBuffer, dstBufferOffset, dstBufferRange, srcPictureResource, pSetupReferenceSlot, referenceSlotCount, pReferenceSlots, precedingExternallyEncodedBytes ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( VideoEncodeInfoKHR const & ) const = default; #else bool operator==( VideoEncodeInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( dstBuffer == rhs.dstBuffer ) && ( dstBufferOffset == rhs.dstBufferOffset ) && ( dstBufferRange == rhs.dstBufferRange ) && ( srcPictureResource == rhs.srcPictureResource ) && ( pSetupReferenceSlot == rhs.pSetupReferenceSlot ) && ( referenceSlotCount == rhs.referenceSlotCount ) && ( pReferenceSlots == rhs.pReferenceSlots ) && ( precedingExternallyEncodedBytes == rhs.precedingExternallyEncodedBytes ); # endif } bool operator!=( VideoEncodeInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoEncodeInfoKHR; const void * pNext = {}; VULKAN_HPP_NAMESPACE::VideoEncodeFlagsKHR flags = {}; VULKAN_HPP_NAMESPACE::Buffer dstBuffer = {}; VULKAN_HPP_NAMESPACE::DeviceSize dstBufferOffset = {}; VULKAN_HPP_NAMESPACE::DeviceSize dstBufferRange = {}; VULKAN_HPP_NAMESPACE::VideoPictureResourceInfoKHR srcPictureResource = {}; const VULKAN_HPP_NAMESPACE::VideoReferenceSlotInfoKHR * pSetupReferenceSlot = {}; uint32_t referenceSlotCount = {}; const VULKAN_HPP_NAMESPACE::VideoReferenceSlotInfoKHR * pReferenceSlots = {}; uint32_t precedingExternallyEncodedBytes = {}; }; template <> struct CppType { using Type = VideoEncodeInfoKHR; }; struct VideoEncodeQualityLevelInfoKHR { using NativeType = VkVideoEncodeQualityLevelInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoEncodeQualityLevelInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoEncodeQualityLevelInfoKHR( uint32_t qualityLevel_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , qualityLevel{ qualityLevel_ } { } VULKAN_HPP_CONSTEXPR VideoEncodeQualityLevelInfoKHR( VideoEncodeQualityLevelInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoEncodeQualityLevelInfoKHR( VkVideoEncodeQualityLevelInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoEncodeQualityLevelInfoKHR( *reinterpret_cast( &rhs ) ) { } VideoEncodeQualityLevelInfoKHR & operator=( VideoEncodeQualityLevelInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoEncodeQualityLevelInfoKHR & operator=( VkVideoEncodeQualityLevelInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 VideoEncodeQualityLevelInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeQualityLevelInfoKHR & setQualityLevel( uint32_t qualityLevel_ ) VULKAN_HPP_NOEXCEPT { qualityLevel = qualityLevel_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkVideoEncodeQualityLevelInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoEncodeQualityLevelInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, qualityLevel ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( VideoEncodeQualityLevelInfoKHR const & ) const = default; #else bool operator==( VideoEncodeQualityLevelInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( qualityLevel == rhs.qualityLevel ); # endif } bool operator!=( VideoEncodeQualityLevelInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoEncodeQualityLevelInfoKHR; const void * pNext = {}; uint32_t qualityLevel = {}; }; template <> struct CppType { using Type = VideoEncodeQualityLevelInfoKHR; }; struct VideoEncodeQualityLevelPropertiesKHR { using NativeType = VkVideoEncodeQualityLevelPropertiesKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoEncodeQualityLevelPropertiesKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoEncodeQualityLevelPropertiesKHR( VULKAN_HPP_NAMESPACE::VideoEncodeRateControlModeFlagBitsKHR preferredRateControlMode_ = VULKAN_HPP_NAMESPACE::VideoEncodeRateControlModeFlagBitsKHR::eDefault, uint32_t preferredRateControlLayerCount_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , preferredRateControlMode{ preferredRateControlMode_ } , preferredRateControlLayerCount{ preferredRateControlLayerCount_ } { } VULKAN_HPP_CONSTEXPR VideoEncodeQualityLevelPropertiesKHR( VideoEncodeQualityLevelPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoEncodeQualityLevelPropertiesKHR( VkVideoEncodeQualityLevelPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoEncodeQualityLevelPropertiesKHR( *reinterpret_cast( &rhs ) ) { } VideoEncodeQualityLevelPropertiesKHR & operator=( VideoEncodeQualityLevelPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoEncodeQualityLevelPropertiesKHR & operator=( VkVideoEncodeQualityLevelPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkVideoEncodeQualityLevelPropertiesKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoEncodeQualityLevelPropertiesKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std:: tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, preferredRateControlMode, preferredRateControlLayerCount ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( VideoEncodeQualityLevelPropertiesKHR const & ) const = default; #else bool operator==( VideoEncodeQualityLevelPropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( preferredRateControlMode == rhs.preferredRateControlMode ) && ( preferredRateControlLayerCount == rhs.preferredRateControlLayerCount ); # endif } bool operator!=( VideoEncodeQualityLevelPropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoEncodeQualityLevelPropertiesKHR; void * pNext = {}; VULKAN_HPP_NAMESPACE::VideoEncodeRateControlModeFlagBitsKHR preferredRateControlMode = VULKAN_HPP_NAMESPACE::VideoEncodeRateControlModeFlagBitsKHR::eDefault; uint32_t preferredRateControlLayerCount = {}; }; template <> struct CppType { using Type = VideoEncodeQualityLevelPropertiesKHR; }; struct VideoEncodeQuantizationMapCapabilitiesKHR { using NativeType = VkVideoEncodeQuantizationMapCapabilitiesKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoEncodeQuantizationMapCapabilitiesKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoEncodeQuantizationMapCapabilitiesKHR( VULKAN_HPP_NAMESPACE::Extent2D maxQuantizationMapExtent_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , maxQuantizationMapExtent{ maxQuantizationMapExtent_ } { } VULKAN_HPP_CONSTEXPR VideoEncodeQuantizationMapCapabilitiesKHR( VideoEncodeQuantizationMapCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoEncodeQuantizationMapCapabilitiesKHR( VkVideoEncodeQuantizationMapCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoEncodeQuantizationMapCapabilitiesKHR( *reinterpret_cast( &rhs ) ) { } VideoEncodeQuantizationMapCapabilitiesKHR & operator=( VideoEncodeQuantizationMapCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoEncodeQuantizationMapCapabilitiesKHR & operator=( VkVideoEncodeQuantizationMapCapabilitiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkVideoEncodeQuantizationMapCapabilitiesKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoEncodeQuantizationMapCapabilitiesKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, maxQuantizationMapExtent ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( VideoEncodeQuantizationMapCapabilitiesKHR const & ) const = default; #else bool operator==( VideoEncodeQuantizationMapCapabilitiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( maxQuantizationMapExtent == rhs.maxQuantizationMapExtent ); # endif } bool operator!=( VideoEncodeQuantizationMapCapabilitiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoEncodeQuantizationMapCapabilitiesKHR; void * pNext = {}; VULKAN_HPP_NAMESPACE::Extent2D maxQuantizationMapExtent = {}; }; template <> struct CppType { using Type = VideoEncodeQuantizationMapCapabilitiesKHR; }; struct VideoEncodeQuantizationMapInfoKHR { using NativeType = VkVideoEncodeQuantizationMapInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoEncodeQuantizationMapInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoEncodeQuantizationMapInfoKHR( VULKAN_HPP_NAMESPACE::ImageView quantizationMap_ = {}, VULKAN_HPP_NAMESPACE::Extent2D quantizationMapExtent_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , quantizationMap{ quantizationMap_ } , quantizationMapExtent{ quantizationMapExtent_ } { } VULKAN_HPP_CONSTEXPR VideoEncodeQuantizationMapInfoKHR( VideoEncodeQuantizationMapInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoEncodeQuantizationMapInfoKHR( VkVideoEncodeQuantizationMapInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoEncodeQuantizationMapInfoKHR( *reinterpret_cast( &rhs ) ) { } VideoEncodeQuantizationMapInfoKHR & operator=( VideoEncodeQuantizationMapInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoEncodeQuantizationMapInfoKHR & operator=( VkVideoEncodeQuantizationMapInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 VideoEncodeQuantizationMapInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeQuantizationMapInfoKHR & setQuantizationMap( VULKAN_HPP_NAMESPACE::ImageView quantizationMap_ ) VULKAN_HPP_NOEXCEPT { quantizationMap = quantizationMap_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeQuantizationMapInfoKHR & setQuantizationMapExtent( VULKAN_HPP_NAMESPACE::Extent2D const & quantizationMapExtent_ ) VULKAN_HPP_NOEXCEPT { quantizationMapExtent = quantizationMapExtent_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkVideoEncodeQuantizationMapInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoEncodeQuantizationMapInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std:: tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, quantizationMap, quantizationMapExtent ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( VideoEncodeQuantizationMapInfoKHR const & ) const = default; #else bool operator==( VideoEncodeQuantizationMapInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( quantizationMap == rhs.quantizationMap ) && ( quantizationMapExtent == rhs.quantizationMapExtent ); # endif } bool operator!=( VideoEncodeQuantizationMapInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoEncodeQuantizationMapInfoKHR; const void * pNext = {}; VULKAN_HPP_NAMESPACE::ImageView quantizationMap = {}; VULKAN_HPP_NAMESPACE::Extent2D quantizationMapExtent = {}; }; template <> struct CppType { using Type = VideoEncodeQuantizationMapInfoKHR; }; struct VideoEncodeQuantizationMapSessionParametersCreateInfoKHR { using NativeType = VkVideoEncodeQuantizationMapSessionParametersCreateInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoEncodeQuantizationMapSessionParametersCreateInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoEncodeQuantizationMapSessionParametersCreateInfoKHR( VULKAN_HPP_NAMESPACE::Extent2D quantizationMapTexelSize_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , quantizationMapTexelSize{ quantizationMapTexelSize_ } { } VULKAN_HPP_CONSTEXPR VideoEncodeQuantizationMapSessionParametersCreateInfoKHR( VideoEncodeQuantizationMapSessionParametersCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoEncodeQuantizationMapSessionParametersCreateInfoKHR( VkVideoEncodeQuantizationMapSessionParametersCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoEncodeQuantizationMapSessionParametersCreateInfoKHR( *reinterpret_cast( &rhs ) ) { } VideoEncodeQuantizationMapSessionParametersCreateInfoKHR & operator=( VideoEncodeQuantizationMapSessionParametersCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoEncodeQuantizationMapSessionParametersCreateInfoKHR & operator=( VkVideoEncodeQuantizationMapSessionParametersCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 VideoEncodeQuantizationMapSessionParametersCreateInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeQuantizationMapSessionParametersCreateInfoKHR & setQuantizationMapTexelSize( VULKAN_HPP_NAMESPACE::Extent2D const & quantizationMapTexelSize_ ) VULKAN_HPP_NOEXCEPT { quantizationMapTexelSize = quantizationMapTexelSize_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkVideoEncodeQuantizationMapSessionParametersCreateInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoEncodeQuantizationMapSessionParametersCreateInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, quantizationMapTexelSize ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( VideoEncodeQuantizationMapSessionParametersCreateInfoKHR const & ) const = default; #else bool operator==( VideoEncodeQuantizationMapSessionParametersCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( quantizationMapTexelSize == rhs.quantizationMapTexelSize ); # endif } bool operator!=( VideoEncodeQuantizationMapSessionParametersCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoEncodeQuantizationMapSessionParametersCreateInfoKHR; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Extent2D quantizationMapTexelSize = {}; }; template <> struct CppType { using Type = VideoEncodeQuantizationMapSessionParametersCreateInfoKHR; }; struct VideoEncodeRateControlLayerInfoKHR { using NativeType = VkVideoEncodeRateControlLayerInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoEncodeRateControlLayerInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoEncodeRateControlLayerInfoKHR( uint64_t averageBitrate_ = {}, uint64_t maxBitrate_ = {}, uint32_t frameRateNumerator_ = {}, uint32_t frameRateDenominator_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , averageBitrate{ averageBitrate_ } , maxBitrate{ maxBitrate_ } , frameRateNumerator{ frameRateNumerator_ } , frameRateDenominator{ frameRateDenominator_ } { } VULKAN_HPP_CONSTEXPR VideoEncodeRateControlLayerInfoKHR( VideoEncodeRateControlLayerInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoEncodeRateControlLayerInfoKHR( VkVideoEncodeRateControlLayerInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoEncodeRateControlLayerInfoKHR( *reinterpret_cast( &rhs ) ) { } VideoEncodeRateControlLayerInfoKHR & operator=( VideoEncodeRateControlLayerInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoEncodeRateControlLayerInfoKHR & operator=( VkVideoEncodeRateControlLayerInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 VideoEncodeRateControlLayerInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeRateControlLayerInfoKHR & setAverageBitrate( uint64_t averageBitrate_ ) VULKAN_HPP_NOEXCEPT { averageBitrate = averageBitrate_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeRateControlLayerInfoKHR & setMaxBitrate( uint64_t maxBitrate_ ) VULKAN_HPP_NOEXCEPT { maxBitrate = maxBitrate_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeRateControlLayerInfoKHR & setFrameRateNumerator( uint32_t frameRateNumerator_ ) VULKAN_HPP_NOEXCEPT { frameRateNumerator = frameRateNumerator_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeRateControlLayerInfoKHR & setFrameRateDenominator( uint32_t frameRateDenominator_ ) VULKAN_HPP_NOEXCEPT { frameRateDenominator = frameRateDenominator_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkVideoEncodeRateControlLayerInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoEncodeRateControlLayerInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, averageBitrate, maxBitrate, frameRateNumerator, frameRateDenominator ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( VideoEncodeRateControlLayerInfoKHR const & ) const = default; #else bool operator==( VideoEncodeRateControlLayerInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( averageBitrate == rhs.averageBitrate ) && ( maxBitrate == rhs.maxBitrate ) && ( frameRateNumerator == rhs.frameRateNumerator ) && ( frameRateDenominator == rhs.frameRateDenominator ); # endif } bool operator!=( VideoEncodeRateControlLayerInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoEncodeRateControlLayerInfoKHR; const void * pNext = {}; uint64_t averageBitrate = {}; uint64_t maxBitrate = {}; uint32_t frameRateNumerator = {}; uint32_t frameRateDenominator = {}; }; template <> struct CppType { using Type = VideoEncodeRateControlLayerInfoKHR; }; struct VideoEncodeRateControlInfoKHR { using NativeType = VkVideoEncodeRateControlInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoEncodeRateControlInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoEncodeRateControlInfoKHR( VULKAN_HPP_NAMESPACE::VideoEncodeRateControlFlagsKHR flags_ = {}, VULKAN_HPP_NAMESPACE::VideoEncodeRateControlModeFlagBitsKHR rateControlMode_ = VULKAN_HPP_NAMESPACE::VideoEncodeRateControlModeFlagBitsKHR::eDefault, uint32_t layerCount_ = {}, const VULKAN_HPP_NAMESPACE::VideoEncodeRateControlLayerInfoKHR * pLayers_ = {}, uint32_t virtualBufferSizeInMs_ = {}, uint32_t initialVirtualBufferSizeInMs_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , rateControlMode{ rateControlMode_ } , layerCount{ layerCount_ } , pLayers{ pLayers_ } , virtualBufferSizeInMs{ virtualBufferSizeInMs_ } , initialVirtualBufferSizeInMs{ initialVirtualBufferSizeInMs_ } { } VULKAN_HPP_CONSTEXPR VideoEncodeRateControlInfoKHR( VideoEncodeRateControlInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoEncodeRateControlInfoKHR( VkVideoEncodeRateControlInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoEncodeRateControlInfoKHR( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) VideoEncodeRateControlInfoKHR( VULKAN_HPP_NAMESPACE::VideoEncodeRateControlFlagsKHR flags_, VULKAN_HPP_NAMESPACE::VideoEncodeRateControlModeFlagBitsKHR rateControlMode_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & layers_, uint32_t virtualBufferSizeInMs_ = {}, uint32_t initialVirtualBufferSizeInMs_ = {}, const void * pNext_ = nullptr ) : pNext( pNext_ ) , flags( flags_ ) , rateControlMode( rateControlMode_ ) , layerCount( static_cast( layers_.size() ) ) , pLayers( layers_.data() ) , virtualBufferSizeInMs( virtualBufferSizeInMs_ ) , initialVirtualBufferSizeInMs( initialVirtualBufferSizeInMs_ ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VideoEncodeRateControlInfoKHR & operator=( VideoEncodeRateControlInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoEncodeRateControlInfoKHR & operator=( VkVideoEncodeRateControlInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 VideoEncodeRateControlInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeRateControlInfoKHR & setFlags( VULKAN_HPP_NAMESPACE::VideoEncodeRateControlFlagsKHR flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeRateControlInfoKHR & setRateControlMode( VULKAN_HPP_NAMESPACE::VideoEncodeRateControlModeFlagBitsKHR rateControlMode_ ) VULKAN_HPP_NOEXCEPT { rateControlMode = rateControlMode_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeRateControlInfoKHR & setLayerCount( uint32_t layerCount_ ) VULKAN_HPP_NOEXCEPT { layerCount = layerCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeRateControlInfoKHR & setPLayers( const VULKAN_HPP_NAMESPACE::VideoEncodeRateControlLayerInfoKHR * pLayers_ ) VULKAN_HPP_NOEXCEPT { pLayers = pLayers_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) VideoEncodeRateControlInfoKHR & setLayers( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & layers_ ) VULKAN_HPP_NOEXCEPT { layerCount = static_cast( layers_.size() ); pLayers = layers_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 VideoEncodeRateControlInfoKHR & setVirtualBufferSizeInMs( uint32_t virtualBufferSizeInMs_ ) VULKAN_HPP_NOEXCEPT { virtualBufferSizeInMs = virtualBufferSizeInMs_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeRateControlInfoKHR & setInitialVirtualBufferSizeInMs( uint32_t initialVirtualBufferSizeInMs_ ) VULKAN_HPP_NOEXCEPT { initialVirtualBufferSizeInMs = initialVirtualBufferSizeInMs_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkVideoEncodeRateControlInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoEncodeRateControlInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, rateControlMode, layerCount, pLayers, virtualBufferSizeInMs, initialVirtualBufferSizeInMs ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( VideoEncodeRateControlInfoKHR const & ) const = default; #else bool operator==( VideoEncodeRateControlInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( rateControlMode == rhs.rateControlMode ) && ( layerCount == rhs.layerCount ) && ( pLayers == rhs.pLayers ) && ( virtualBufferSizeInMs == rhs.virtualBufferSizeInMs ) && ( initialVirtualBufferSizeInMs == rhs.initialVirtualBufferSizeInMs ); # endif } bool operator!=( VideoEncodeRateControlInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoEncodeRateControlInfoKHR; const void * pNext = {}; VULKAN_HPP_NAMESPACE::VideoEncodeRateControlFlagsKHR flags = {}; VULKAN_HPP_NAMESPACE::VideoEncodeRateControlModeFlagBitsKHR rateControlMode = VULKAN_HPP_NAMESPACE::VideoEncodeRateControlModeFlagBitsKHR::eDefault; uint32_t layerCount = {}; const VULKAN_HPP_NAMESPACE::VideoEncodeRateControlLayerInfoKHR * pLayers = {}; uint32_t virtualBufferSizeInMs = {}; uint32_t initialVirtualBufferSizeInMs = {}; }; template <> struct CppType { using Type = VideoEncodeRateControlInfoKHR; }; struct VideoEncodeSessionParametersFeedbackInfoKHR { using NativeType = VkVideoEncodeSessionParametersFeedbackInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoEncodeSessionParametersFeedbackInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoEncodeSessionParametersFeedbackInfoKHR( VULKAN_HPP_NAMESPACE::Bool32 hasOverrides_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , hasOverrides{ hasOverrides_ } { } VULKAN_HPP_CONSTEXPR VideoEncodeSessionParametersFeedbackInfoKHR( VideoEncodeSessionParametersFeedbackInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoEncodeSessionParametersFeedbackInfoKHR( VkVideoEncodeSessionParametersFeedbackInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoEncodeSessionParametersFeedbackInfoKHR( *reinterpret_cast( &rhs ) ) { } VideoEncodeSessionParametersFeedbackInfoKHR & operator=( VideoEncodeSessionParametersFeedbackInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoEncodeSessionParametersFeedbackInfoKHR & operator=( VkVideoEncodeSessionParametersFeedbackInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkVideoEncodeSessionParametersFeedbackInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoEncodeSessionParametersFeedbackInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, hasOverrides ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( VideoEncodeSessionParametersFeedbackInfoKHR const & ) const = default; #else bool operator==( VideoEncodeSessionParametersFeedbackInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( hasOverrides == rhs.hasOverrides ); # endif } bool operator!=( VideoEncodeSessionParametersFeedbackInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoEncodeSessionParametersFeedbackInfoKHR; void * pNext = {}; VULKAN_HPP_NAMESPACE::Bool32 hasOverrides = {}; }; template <> struct CppType { using Type = VideoEncodeSessionParametersFeedbackInfoKHR; }; struct VideoEncodeSessionParametersGetInfoKHR { using NativeType = VkVideoEncodeSessionParametersGetInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoEncodeSessionParametersGetInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoEncodeSessionParametersGetInfoKHR( VULKAN_HPP_NAMESPACE::VideoSessionParametersKHR videoSessionParameters_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , videoSessionParameters{ videoSessionParameters_ } { } VULKAN_HPP_CONSTEXPR VideoEncodeSessionParametersGetInfoKHR( VideoEncodeSessionParametersGetInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoEncodeSessionParametersGetInfoKHR( VkVideoEncodeSessionParametersGetInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoEncodeSessionParametersGetInfoKHR( *reinterpret_cast( &rhs ) ) { } VideoEncodeSessionParametersGetInfoKHR & operator=( VideoEncodeSessionParametersGetInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoEncodeSessionParametersGetInfoKHR & operator=( VkVideoEncodeSessionParametersGetInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 VideoEncodeSessionParametersGetInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeSessionParametersGetInfoKHR & setVideoSessionParameters( VULKAN_HPP_NAMESPACE::VideoSessionParametersKHR videoSessionParameters_ ) VULKAN_HPP_NOEXCEPT { videoSessionParameters = videoSessionParameters_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkVideoEncodeSessionParametersGetInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoEncodeSessionParametersGetInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, videoSessionParameters ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( VideoEncodeSessionParametersGetInfoKHR const & ) const = default; #else bool operator==( VideoEncodeSessionParametersGetInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( videoSessionParameters == rhs.videoSessionParameters ); # endif } bool operator!=( VideoEncodeSessionParametersGetInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoEncodeSessionParametersGetInfoKHR; const void * pNext = {}; VULKAN_HPP_NAMESPACE::VideoSessionParametersKHR videoSessionParameters = {}; }; template <> struct CppType { using Type = VideoEncodeSessionParametersGetInfoKHR; }; struct VideoEncodeUsageInfoKHR { using NativeType = VkVideoEncodeUsageInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoEncodeUsageInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoEncodeUsageInfoKHR( VULKAN_HPP_NAMESPACE::VideoEncodeUsageFlagsKHR videoUsageHints_ = {}, VULKAN_HPP_NAMESPACE::VideoEncodeContentFlagsKHR videoContentHints_ = {}, VULKAN_HPP_NAMESPACE::VideoEncodeTuningModeKHR tuningMode_ = VULKAN_HPP_NAMESPACE::VideoEncodeTuningModeKHR::eDefault, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , videoUsageHints{ videoUsageHints_ } , videoContentHints{ videoContentHints_ } , tuningMode{ tuningMode_ } { } VULKAN_HPP_CONSTEXPR VideoEncodeUsageInfoKHR( VideoEncodeUsageInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoEncodeUsageInfoKHR( VkVideoEncodeUsageInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoEncodeUsageInfoKHR( *reinterpret_cast( &rhs ) ) { } VideoEncodeUsageInfoKHR & operator=( VideoEncodeUsageInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoEncodeUsageInfoKHR & operator=( VkVideoEncodeUsageInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 VideoEncodeUsageInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeUsageInfoKHR & setVideoUsageHints( VULKAN_HPP_NAMESPACE::VideoEncodeUsageFlagsKHR videoUsageHints_ ) VULKAN_HPP_NOEXCEPT { videoUsageHints = videoUsageHints_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeUsageInfoKHR & setVideoContentHints( VULKAN_HPP_NAMESPACE::VideoEncodeContentFlagsKHR videoContentHints_ ) VULKAN_HPP_NOEXCEPT { videoContentHints = videoContentHints_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEncodeUsageInfoKHR & setTuningMode( VULKAN_HPP_NAMESPACE::VideoEncodeTuningModeKHR tuningMode_ ) VULKAN_HPP_NOEXCEPT { tuningMode = tuningMode_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkVideoEncodeUsageInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoEncodeUsageInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, videoUsageHints, videoContentHints, tuningMode ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( VideoEncodeUsageInfoKHR const & ) const = default; #else bool operator==( VideoEncodeUsageInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( videoUsageHints == rhs.videoUsageHints ) && ( videoContentHints == rhs.videoContentHints ) && ( tuningMode == rhs.tuningMode ); # endif } bool operator!=( VideoEncodeUsageInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoEncodeUsageInfoKHR; const void * pNext = {}; VULKAN_HPP_NAMESPACE::VideoEncodeUsageFlagsKHR videoUsageHints = {}; VULKAN_HPP_NAMESPACE::VideoEncodeContentFlagsKHR videoContentHints = {}; VULKAN_HPP_NAMESPACE::VideoEncodeTuningModeKHR tuningMode = VULKAN_HPP_NAMESPACE::VideoEncodeTuningModeKHR::eDefault; }; template <> struct CppType { using Type = VideoEncodeUsageInfoKHR; }; struct VideoEndCodingInfoKHR { using NativeType = VkVideoEndCodingInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoEndCodingInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoEndCodingInfoKHR( VULKAN_HPP_NAMESPACE::VideoEndCodingFlagsKHR flags_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } { } VULKAN_HPP_CONSTEXPR VideoEndCodingInfoKHR( VideoEndCodingInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoEndCodingInfoKHR( VkVideoEndCodingInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoEndCodingInfoKHR( *reinterpret_cast( &rhs ) ) { } VideoEndCodingInfoKHR & operator=( VideoEndCodingInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoEndCodingInfoKHR & operator=( VkVideoEndCodingInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 VideoEndCodingInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoEndCodingInfoKHR & setFlags( VULKAN_HPP_NAMESPACE::VideoEndCodingFlagsKHR flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkVideoEndCodingInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoEndCodingInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( VideoEndCodingInfoKHR const & ) const = default; #else bool operator==( VideoEndCodingInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ); # endif } bool operator!=( VideoEndCodingInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoEndCodingInfoKHR; const void * pNext = {}; VULKAN_HPP_NAMESPACE::VideoEndCodingFlagsKHR flags = {}; }; template <> struct CppType { using Type = VideoEndCodingInfoKHR; }; struct VideoFormatAV1QuantizationMapPropertiesKHR { using NativeType = VkVideoFormatAV1QuantizationMapPropertiesKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoFormatAv1QuantizationMapPropertiesKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoFormatAV1QuantizationMapPropertiesKHR( VULKAN_HPP_NAMESPACE::VideoEncodeAV1SuperblockSizeFlagsKHR compatibleSuperblockSizes_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , compatibleSuperblockSizes{ compatibleSuperblockSizes_ } { } VULKAN_HPP_CONSTEXPR VideoFormatAV1QuantizationMapPropertiesKHR( VideoFormatAV1QuantizationMapPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoFormatAV1QuantizationMapPropertiesKHR( VkVideoFormatAV1QuantizationMapPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoFormatAV1QuantizationMapPropertiesKHR( *reinterpret_cast( &rhs ) ) { } VideoFormatAV1QuantizationMapPropertiesKHR & operator=( VideoFormatAV1QuantizationMapPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoFormatAV1QuantizationMapPropertiesKHR & operator=( VkVideoFormatAV1QuantizationMapPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkVideoFormatAV1QuantizationMapPropertiesKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoFormatAV1QuantizationMapPropertiesKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, compatibleSuperblockSizes ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( VideoFormatAV1QuantizationMapPropertiesKHR const & ) const = default; #else bool operator==( VideoFormatAV1QuantizationMapPropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( compatibleSuperblockSizes == rhs.compatibleSuperblockSizes ); # endif } bool operator!=( VideoFormatAV1QuantizationMapPropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoFormatAv1QuantizationMapPropertiesKHR; void * pNext = {}; VULKAN_HPP_NAMESPACE::VideoEncodeAV1SuperblockSizeFlagsKHR compatibleSuperblockSizes = {}; }; template <> struct CppType { using Type = VideoFormatAV1QuantizationMapPropertiesKHR; }; struct VideoFormatH265QuantizationMapPropertiesKHR { using NativeType = VkVideoFormatH265QuantizationMapPropertiesKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoFormatH265QuantizationMapPropertiesKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoFormatH265QuantizationMapPropertiesKHR( VULKAN_HPP_NAMESPACE::VideoEncodeH265CtbSizeFlagsKHR compatibleCtbSizes_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , compatibleCtbSizes{ compatibleCtbSizes_ } { } VULKAN_HPP_CONSTEXPR VideoFormatH265QuantizationMapPropertiesKHR( VideoFormatH265QuantizationMapPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoFormatH265QuantizationMapPropertiesKHR( VkVideoFormatH265QuantizationMapPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoFormatH265QuantizationMapPropertiesKHR( *reinterpret_cast( &rhs ) ) { } VideoFormatH265QuantizationMapPropertiesKHR & operator=( VideoFormatH265QuantizationMapPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoFormatH265QuantizationMapPropertiesKHR & operator=( VkVideoFormatH265QuantizationMapPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkVideoFormatH265QuantizationMapPropertiesKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoFormatH265QuantizationMapPropertiesKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, compatibleCtbSizes ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( VideoFormatH265QuantizationMapPropertiesKHR const & ) const = default; #else bool operator==( VideoFormatH265QuantizationMapPropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( compatibleCtbSizes == rhs.compatibleCtbSizes ); # endif } bool operator!=( VideoFormatH265QuantizationMapPropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoFormatH265QuantizationMapPropertiesKHR; void * pNext = {}; VULKAN_HPP_NAMESPACE::VideoEncodeH265CtbSizeFlagsKHR compatibleCtbSizes = {}; }; template <> struct CppType { using Type = VideoFormatH265QuantizationMapPropertiesKHR; }; struct VideoFormatPropertiesKHR { using NativeType = VkVideoFormatPropertiesKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoFormatPropertiesKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoFormatPropertiesKHR( VULKAN_HPP_NAMESPACE::Format format_ = VULKAN_HPP_NAMESPACE::Format::eUndefined, VULKAN_HPP_NAMESPACE::ComponentMapping componentMapping_ = {}, VULKAN_HPP_NAMESPACE::ImageCreateFlags imageCreateFlags_ = {}, VULKAN_HPP_NAMESPACE::ImageType imageType_ = VULKAN_HPP_NAMESPACE::ImageType::e1D, VULKAN_HPP_NAMESPACE::ImageTiling imageTiling_ = VULKAN_HPP_NAMESPACE::ImageTiling::eOptimal, VULKAN_HPP_NAMESPACE::ImageUsageFlags imageUsageFlags_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , format{ format_ } , componentMapping{ componentMapping_ } , imageCreateFlags{ imageCreateFlags_ } , imageType{ imageType_ } , imageTiling{ imageTiling_ } , imageUsageFlags{ imageUsageFlags_ } { } VULKAN_HPP_CONSTEXPR VideoFormatPropertiesKHR( VideoFormatPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoFormatPropertiesKHR( VkVideoFormatPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoFormatPropertiesKHR( *reinterpret_cast( &rhs ) ) { } VideoFormatPropertiesKHR & operator=( VideoFormatPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoFormatPropertiesKHR & operator=( VkVideoFormatPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkVideoFormatPropertiesKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoFormatPropertiesKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, format, componentMapping, imageCreateFlags, imageType, imageTiling, imageUsageFlags ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( VideoFormatPropertiesKHR const & ) const = default; #else bool operator==( VideoFormatPropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( format == rhs.format ) && ( componentMapping == rhs.componentMapping ) && ( imageCreateFlags == rhs.imageCreateFlags ) && ( imageType == rhs.imageType ) && ( imageTiling == rhs.imageTiling ) && ( imageUsageFlags == rhs.imageUsageFlags ); # endif } bool operator!=( VideoFormatPropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoFormatPropertiesKHR; void * pNext = {}; VULKAN_HPP_NAMESPACE::Format format = VULKAN_HPP_NAMESPACE::Format::eUndefined; VULKAN_HPP_NAMESPACE::ComponentMapping componentMapping = {}; VULKAN_HPP_NAMESPACE::ImageCreateFlags imageCreateFlags = {}; VULKAN_HPP_NAMESPACE::ImageType imageType = VULKAN_HPP_NAMESPACE::ImageType::e1D; VULKAN_HPP_NAMESPACE::ImageTiling imageTiling = VULKAN_HPP_NAMESPACE::ImageTiling::eOptimal; VULKAN_HPP_NAMESPACE::ImageUsageFlags imageUsageFlags = {}; }; template <> struct CppType { using Type = VideoFormatPropertiesKHR; }; struct VideoFormatQuantizationMapPropertiesKHR { using NativeType = VkVideoFormatQuantizationMapPropertiesKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoFormatQuantizationMapPropertiesKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoFormatQuantizationMapPropertiesKHR( VULKAN_HPP_NAMESPACE::Extent2D quantizationMapTexelSize_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , quantizationMapTexelSize{ quantizationMapTexelSize_ } { } VULKAN_HPP_CONSTEXPR VideoFormatQuantizationMapPropertiesKHR( VideoFormatQuantizationMapPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoFormatQuantizationMapPropertiesKHR( VkVideoFormatQuantizationMapPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoFormatQuantizationMapPropertiesKHR( *reinterpret_cast( &rhs ) ) { } VideoFormatQuantizationMapPropertiesKHR & operator=( VideoFormatQuantizationMapPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoFormatQuantizationMapPropertiesKHR & operator=( VkVideoFormatQuantizationMapPropertiesKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkVideoFormatQuantizationMapPropertiesKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoFormatQuantizationMapPropertiesKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, quantizationMapTexelSize ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( VideoFormatQuantizationMapPropertiesKHR const & ) const = default; #else bool operator==( VideoFormatQuantizationMapPropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( quantizationMapTexelSize == rhs.quantizationMapTexelSize ); # endif } bool operator!=( VideoFormatQuantizationMapPropertiesKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoFormatQuantizationMapPropertiesKHR; void * pNext = {}; VULKAN_HPP_NAMESPACE::Extent2D quantizationMapTexelSize = {}; }; template <> struct CppType { using Type = VideoFormatQuantizationMapPropertiesKHR; }; struct VideoInlineQueryInfoKHR { using NativeType = VkVideoInlineQueryInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoInlineQueryInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoInlineQueryInfoKHR( VULKAN_HPP_NAMESPACE::QueryPool queryPool_ = {}, uint32_t firstQuery_ = {}, uint32_t queryCount_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , queryPool{ queryPool_ } , firstQuery{ firstQuery_ } , queryCount{ queryCount_ } { } VULKAN_HPP_CONSTEXPR VideoInlineQueryInfoKHR( VideoInlineQueryInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoInlineQueryInfoKHR( VkVideoInlineQueryInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoInlineQueryInfoKHR( *reinterpret_cast( &rhs ) ) { } VideoInlineQueryInfoKHR & operator=( VideoInlineQueryInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoInlineQueryInfoKHR & operator=( VkVideoInlineQueryInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 VideoInlineQueryInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoInlineQueryInfoKHR & setQueryPool( VULKAN_HPP_NAMESPACE::QueryPool queryPool_ ) VULKAN_HPP_NOEXCEPT { queryPool = queryPool_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoInlineQueryInfoKHR & setFirstQuery( uint32_t firstQuery_ ) VULKAN_HPP_NOEXCEPT { firstQuery = firstQuery_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoInlineQueryInfoKHR & setQueryCount( uint32_t queryCount_ ) VULKAN_HPP_NOEXCEPT { queryCount = queryCount_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkVideoInlineQueryInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoInlineQueryInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, queryPool, firstQuery, queryCount ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( VideoInlineQueryInfoKHR const & ) const = default; #else bool operator==( VideoInlineQueryInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( queryPool == rhs.queryPool ) && ( firstQuery == rhs.firstQuery ) && ( queryCount == rhs.queryCount ); # endif } bool operator!=( VideoInlineQueryInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoInlineQueryInfoKHR; const void * pNext = {}; VULKAN_HPP_NAMESPACE::QueryPool queryPool = {}; uint32_t firstQuery = {}; uint32_t queryCount = {}; }; template <> struct CppType { using Type = VideoInlineQueryInfoKHR; }; struct VideoProfileListInfoKHR { using NativeType = VkVideoProfileListInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoProfileListInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoProfileListInfoKHR( uint32_t profileCount_ = {}, const VULKAN_HPP_NAMESPACE::VideoProfileInfoKHR * pProfiles_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , profileCount{ profileCount_ } , pProfiles{ pProfiles_ } { } VULKAN_HPP_CONSTEXPR VideoProfileListInfoKHR( VideoProfileListInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoProfileListInfoKHR( VkVideoProfileListInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoProfileListInfoKHR( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) VideoProfileListInfoKHR( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & profiles_, const void * pNext_ = nullptr ) : pNext( pNext_ ), profileCount( static_cast( profiles_.size() ) ), pProfiles( profiles_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VideoProfileListInfoKHR & operator=( VideoProfileListInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoProfileListInfoKHR & operator=( VkVideoProfileListInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 VideoProfileListInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoProfileListInfoKHR & setProfileCount( uint32_t profileCount_ ) VULKAN_HPP_NOEXCEPT { profileCount = profileCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoProfileListInfoKHR & setPProfiles( const VULKAN_HPP_NAMESPACE::VideoProfileInfoKHR * pProfiles_ ) VULKAN_HPP_NOEXCEPT { pProfiles = pProfiles_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) VideoProfileListInfoKHR & setProfiles( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & profiles_ ) VULKAN_HPP_NOEXCEPT { profileCount = static_cast( profiles_.size() ); pProfiles = profiles_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkVideoProfileListInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoProfileListInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, profileCount, pProfiles ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( VideoProfileListInfoKHR const & ) const = default; #else bool operator==( VideoProfileListInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( profileCount == rhs.profileCount ) && ( pProfiles == rhs.pProfiles ); # endif } bool operator!=( VideoProfileListInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoProfileListInfoKHR; const void * pNext = {}; uint32_t profileCount = {}; const VULKAN_HPP_NAMESPACE::VideoProfileInfoKHR * pProfiles = {}; }; template <> struct CppType { using Type = VideoProfileListInfoKHR; }; struct VideoSessionCreateInfoKHR { using NativeType = VkVideoSessionCreateInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoSessionCreateInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR_14 VideoSessionCreateInfoKHR( uint32_t queueFamilyIndex_ = {}, VULKAN_HPP_NAMESPACE::VideoSessionCreateFlagsKHR flags_ = {}, const VULKAN_HPP_NAMESPACE::VideoProfileInfoKHR * pVideoProfile_ = {}, VULKAN_HPP_NAMESPACE::Format pictureFormat_ = VULKAN_HPP_NAMESPACE::Format::eUndefined, VULKAN_HPP_NAMESPACE::Extent2D maxCodedExtent_ = {}, VULKAN_HPP_NAMESPACE::Format referencePictureFormat_ = VULKAN_HPP_NAMESPACE::Format::eUndefined, uint32_t maxDpbSlots_ = {}, uint32_t maxActiveReferencePictures_ = {}, const VULKAN_HPP_NAMESPACE::ExtensionProperties * pStdHeaderVersion_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , queueFamilyIndex{ queueFamilyIndex_ } , flags{ flags_ } , pVideoProfile{ pVideoProfile_ } , pictureFormat{ pictureFormat_ } , maxCodedExtent{ maxCodedExtent_ } , referencePictureFormat{ referencePictureFormat_ } , maxDpbSlots{ maxDpbSlots_ } , maxActiveReferencePictures{ maxActiveReferencePictures_ } , pStdHeaderVersion{ pStdHeaderVersion_ } { } VULKAN_HPP_CONSTEXPR_14 VideoSessionCreateInfoKHR( VideoSessionCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoSessionCreateInfoKHR( VkVideoSessionCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoSessionCreateInfoKHR( *reinterpret_cast( &rhs ) ) { } VideoSessionCreateInfoKHR & operator=( VideoSessionCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoSessionCreateInfoKHR & operator=( VkVideoSessionCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 VideoSessionCreateInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoSessionCreateInfoKHR & setQueueFamilyIndex( uint32_t queueFamilyIndex_ ) VULKAN_HPP_NOEXCEPT { queueFamilyIndex = queueFamilyIndex_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoSessionCreateInfoKHR & setFlags( VULKAN_HPP_NAMESPACE::VideoSessionCreateFlagsKHR flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoSessionCreateInfoKHR & setPVideoProfile( const VULKAN_HPP_NAMESPACE::VideoProfileInfoKHR * pVideoProfile_ ) VULKAN_HPP_NOEXCEPT { pVideoProfile = pVideoProfile_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoSessionCreateInfoKHR & setPictureFormat( VULKAN_HPP_NAMESPACE::Format pictureFormat_ ) VULKAN_HPP_NOEXCEPT { pictureFormat = pictureFormat_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoSessionCreateInfoKHR & setMaxCodedExtent( VULKAN_HPP_NAMESPACE::Extent2D const & maxCodedExtent_ ) VULKAN_HPP_NOEXCEPT { maxCodedExtent = maxCodedExtent_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoSessionCreateInfoKHR & setReferencePictureFormat( VULKAN_HPP_NAMESPACE::Format referencePictureFormat_ ) VULKAN_HPP_NOEXCEPT { referencePictureFormat = referencePictureFormat_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoSessionCreateInfoKHR & setMaxDpbSlots( uint32_t maxDpbSlots_ ) VULKAN_HPP_NOEXCEPT { maxDpbSlots = maxDpbSlots_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoSessionCreateInfoKHR & setMaxActiveReferencePictures( uint32_t maxActiveReferencePictures_ ) VULKAN_HPP_NOEXCEPT { maxActiveReferencePictures = maxActiveReferencePictures_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoSessionCreateInfoKHR & setPStdHeaderVersion( const VULKAN_HPP_NAMESPACE::ExtensionProperties * pStdHeaderVersion_ ) VULKAN_HPP_NOEXCEPT { pStdHeaderVersion = pStdHeaderVersion_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkVideoSessionCreateInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoSessionCreateInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, queueFamilyIndex, flags, pVideoProfile, pictureFormat, maxCodedExtent, referencePictureFormat, maxDpbSlots, maxActiveReferencePictures, pStdHeaderVersion ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( VideoSessionCreateInfoKHR const & ) const = default; #else bool operator==( VideoSessionCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( queueFamilyIndex == rhs.queueFamilyIndex ) && ( flags == rhs.flags ) && ( pVideoProfile == rhs.pVideoProfile ) && ( pictureFormat == rhs.pictureFormat ) && ( maxCodedExtent == rhs.maxCodedExtent ) && ( referencePictureFormat == rhs.referencePictureFormat ) && ( maxDpbSlots == rhs.maxDpbSlots ) && ( maxActiveReferencePictures == rhs.maxActiveReferencePictures ) && ( pStdHeaderVersion == rhs.pStdHeaderVersion ); # endif } bool operator!=( VideoSessionCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoSessionCreateInfoKHR; const void * pNext = {}; uint32_t queueFamilyIndex = {}; VULKAN_HPP_NAMESPACE::VideoSessionCreateFlagsKHR flags = {}; const VULKAN_HPP_NAMESPACE::VideoProfileInfoKHR * pVideoProfile = {}; VULKAN_HPP_NAMESPACE::Format pictureFormat = VULKAN_HPP_NAMESPACE::Format::eUndefined; VULKAN_HPP_NAMESPACE::Extent2D maxCodedExtent = {}; VULKAN_HPP_NAMESPACE::Format referencePictureFormat = VULKAN_HPP_NAMESPACE::Format::eUndefined; uint32_t maxDpbSlots = {}; uint32_t maxActiveReferencePictures = {}; const VULKAN_HPP_NAMESPACE::ExtensionProperties * pStdHeaderVersion = {}; }; template <> struct CppType { using Type = VideoSessionCreateInfoKHR; }; struct VideoSessionMemoryRequirementsKHR { using NativeType = VkVideoSessionMemoryRequirementsKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoSessionMemoryRequirementsKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoSessionMemoryRequirementsKHR( uint32_t memoryBindIndex_ = {}, VULKAN_HPP_NAMESPACE::MemoryRequirements memoryRequirements_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , memoryBindIndex{ memoryBindIndex_ } , memoryRequirements{ memoryRequirements_ } { } VULKAN_HPP_CONSTEXPR VideoSessionMemoryRequirementsKHR( VideoSessionMemoryRequirementsKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoSessionMemoryRequirementsKHR( VkVideoSessionMemoryRequirementsKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoSessionMemoryRequirementsKHR( *reinterpret_cast( &rhs ) ) { } VideoSessionMemoryRequirementsKHR & operator=( VideoSessionMemoryRequirementsKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoSessionMemoryRequirementsKHR & operator=( VkVideoSessionMemoryRequirementsKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } operator VkVideoSessionMemoryRequirementsKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoSessionMemoryRequirementsKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, memoryBindIndex, memoryRequirements ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( VideoSessionMemoryRequirementsKHR const & ) const = default; #else bool operator==( VideoSessionMemoryRequirementsKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( memoryBindIndex == rhs.memoryBindIndex ) && ( memoryRequirements == rhs.memoryRequirements ); # endif } bool operator!=( VideoSessionMemoryRequirementsKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoSessionMemoryRequirementsKHR; void * pNext = {}; uint32_t memoryBindIndex = {}; VULKAN_HPP_NAMESPACE::MemoryRequirements memoryRequirements = {}; }; template <> struct CppType { using Type = VideoSessionMemoryRequirementsKHR; }; struct VideoSessionParametersCreateInfoKHR { using NativeType = VkVideoSessionParametersCreateInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoSessionParametersCreateInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoSessionParametersCreateInfoKHR( VULKAN_HPP_NAMESPACE::VideoSessionParametersCreateFlagsKHR flags_ = {}, VULKAN_HPP_NAMESPACE::VideoSessionParametersKHR videoSessionParametersTemplate_ = {}, VULKAN_HPP_NAMESPACE::VideoSessionKHR videoSession_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , videoSessionParametersTemplate{ videoSessionParametersTemplate_ } , videoSession{ videoSession_ } { } VULKAN_HPP_CONSTEXPR VideoSessionParametersCreateInfoKHR( VideoSessionParametersCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoSessionParametersCreateInfoKHR( VkVideoSessionParametersCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoSessionParametersCreateInfoKHR( *reinterpret_cast( &rhs ) ) { } VideoSessionParametersCreateInfoKHR & operator=( VideoSessionParametersCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoSessionParametersCreateInfoKHR & operator=( VkVideoSessionParametersCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 VideoSessionParametersCreateInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoSessionParametersCreateInfoKHR & setFlags( VULKAN_HPP_NAMESPACE::VideoSessionParametersCreateFlagsKHR flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoSessionParametersCreateInfoKHR & setVideoSessionParametersTemplate( VULKAN_HPP_NAMESPACE::VideoSessionParametersKHR videoSessionParametersTemplate_ ) VULKAN_HPP_NOEXCEPT { videoSessionParametersTemplate = videoSessionParametersTemplate_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoSessionParametersCreateInfoKHR & setVideoSession( VULKAN_HPP_NAMESPACE::VideoSessionKHR videoSession_ ) VULKAN_HPP_NOEXCEPT { videoSession = videoSession_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkVideoSessionParametersCreateInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoSessionParametersCreateInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, videoSessionParametersTemplate, videoSession ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( VideoSessionParametersCreateInfoKHR const & ) const = default; #else bool operator==( VideoSessionParametersCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( videoSessionParametersTemplate == rhs.videoSessionParametersTemplate ) && ( videoSession == rhs.videoSession ); # endif } bool operator!=( VideoSessionParametersCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoSessionParametersCreateInfoKHR; const void * pNext = {}; VULKAN_HPP_NAMESPACE::VideoSessionParametersCreateFlagsKHR flags = {}; VULKAN_HPP_NAMESPACE::VideoSessionParametersKHR videoSessionParametersTemplate = {}; VULKAN_HPP_NAMESPACE::VideoSessionKHR videoSession = {}; }; template <> struct CppType { using Type = VideoSessionParametersCreateInfoKHR; }; struct VideoSessionParametersUpdateInfoKHR { using NativeType = VkVideoSessionParametersUpdateInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eVideoSessionParametersUpdateInfoKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR VideoSessionParametersUpdateInfoKHR( uint32_t updateSequenceCount_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , updateSequenceCount{ updateSequenceCount_ } { } VULKAN_HPP_CONSTEXPR VideoSessionParametersUpdateInfoKHR( VideoSessionParametersUpdateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; VideoSessionParametersUpdateInfoKHR( VkVideoSessionParametersUpdateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : VideoSessionParametersUpdateInfoKHR( *reinterpret_cast( &rhs ) ) { } VideoSessionParametersUpdateInfoKHR & operator=( VideoSessionParametersUpdateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ VideoSessionParametersUpdateInfoKHR & operator=( VkVideoSessionParametersUpdateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 VideoSessionParametersUpdateInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 VideoSessionParametersUpdateInfoKHR & setUpdateSequenceCount( uint32_t updateSequenceCount_ ) VULKAN_HPP_NOEXCEPT { updateSequenceCount = updateSequenceCount_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkVideoSessionParametersUpdateInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkVideoSessionParametersUpdateInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, updateSequenceCount ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( VideoSessionParametersUpdateInfoKHR const & ) const = default; #else bool operator==( VideoSessionParametersUpdateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( updateSequenceCount == rhs.updateSequenceCount ); # endif } bool operator!=( VideoSessionParametersUpdateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eVideoSessionParametersUpdateInfoKHR; const void * pNext = {}; uint32_t updateSequenceCount = {}; }; template <> struct CppType { using Type = VideoSessionParametersUpdateInfoKHR; }; #if defined( VK_USE_PLATFORM_WAYLAND_KHR ) struct WaylandSurfaceCreateInfoKHR { using NativeType = VkWaylandSurfaceCreateInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eWaylandSurfaceCreateInfoKHR; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR WaylandSurfaceCreateInfoKHR( VULKAN_HPP_NAMESPACE::WaylandSurfaceCreateFlagsKHR flags_ = {}, struct wl_display * display_ = {}, struct wl_surface * surface_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , display{ display_ } , surface{ surface_ } { } VULKAN_HPP_CONSTEXPR WaylandSurfaceCreateInfoKHR( WaylandSurfaceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; WaylandSurfaceCreateInfoKHR( VkWaylandSurfaceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : WaylandSurfaceCreateInfoKHR( *reinterpret_cast( &rhs ) ) { } WaylandSurfaceCreateInfoKHR & operator=( WaylandSurfaceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ WaylandSurfaceCreateInfoKHR & operator=( VkWaylandSurfaceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } # if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 WaylandSurfaceCreateInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 WaylandSurfaceCreateInfoKHR & setFlags( VULKAN_HPP_NAMESPACE::WaylandSurfaceCreateFlagsKHR flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 WaylandSurfaceCreateInfoKHR & setDisplay( struct wl_display * display_ ) VULKAN_HPP_NOEXCEPT { display = display_; return *this; } VULKAN_HPP_CONSTEXPR_14 WaylandSurfaceCreateInfoKHR & setSurface( struct wl_surface * surface_ ) VULKAN_HPP_NOEXCEPT { surface = surface_; return *this; } # endif /*VULKAN_HPP_NO_SETTERS*/ operator VkWaylandSurfaceCreateInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkWaylandSurfaceCreateInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, display, surface ); } # endif # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( WaylandSurfaceCreateInfoKHR const & ) const = default; # else bool operator==( WaylandSurfaceCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( display == rhs.display ) && ( surface == rhs.surface ); # endif } bool operator!=( WaylandSurfaceCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } # endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eWaylandSurfaceCreateInfoKHR; const void * pNext = {}; VULKAN_HPP_NAMESPACE::WaylandSurfaceCreateFlagsKHR flags = {}; struct wl_display * display = {}; struct wl_surface * surface = {}; }; template <> struct CppType { using Type = WaylandSurfaceCreateInfoKHR; }; #endif /*VK_USE_PLATFORM_WAYLAND_KHR*/ #if defined( VK_USE_PLATFORM_WIN32_KHR ) struct Win32KeyedMutexAcquireReleaseInfoKHR { using NativeType = VkWin32KeyedMutexAcquireReleaseInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eWin32KeyedMutexAcquireReleaseInfoKHR; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR Win32KeyedMutexAcquireReleaseInfoKHR( uint32_t acquireCount_ = {}, const VULKAN_HPP_NAMESPACE::DeviceMemory * pAcquireSyncs_ = {}, const uint64_t * pAcquireKeys_ = {}, const uint32_t * pAcquireTimeouts_ = {}, uint32_t releaseCount_ = {}, const VULKAN_HPP_NAMESPACE::DeviceMemory * pReleaseSyncs_ = {}, const uint64_t * pReleaseKeys_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , acquireCount{ acquireCount_ } , pAcquireSyncs{ pAcquireSyncs_ } , pAcquireKeys{ pAcquireKeys_ } , pAcquireTimeouts{ pAcquireTimeouts_ } , releaseCount{ releaseCount_ } , pReleaseSyncs{ pReleaseSyncs_ } , pReleaseKeys{ pReleaseKeys_ } { } VULKAN_HPP_CONSTEXPR Win32KeyedMutexAcquireReleaseInfoKHR( Win32KeyedMutexAcquireReleaseInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; Win32KeyedMutexAcquireReleaseInfoKHR( VkWin32KeyedMutexAcquireReleaseInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : Win32KeyedMutexAcquireReleaseInfoKHR( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) Win32KeyedMutexAcquireReleaseInfoKHR( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & acquireSyncs_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & acquireKeys_ = {}, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & acquireTimeouts_ = {}, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & releaseSyncs_ = {}, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & releaseKeys_ = {}, const void * pNext_ = nullptr ) : pNext( pNext_ ) , acquireCount( static_cast( acquireSyncs_.size() ) ) , pAcquireSyncs( acquireSyncs_.data() ) , pAcquireKeys( acquireKeys_.data() ) , pAcquireTimeouts( acquireTimeouts_.data() ) , releaseCount( static_cast( releaseSyncs_.size() ) ) , pReleaseSyncs( releaseSyncs_.data() ) , pReleaseKeys( releaseKeys_.data() ) { # ifdef VULKAN_HPP_NO_EXCEPTIONS VULKAN_HPP_ASSERT( acquireSyncs_.size() == acquireKeys_.size() ); VULKAN_HPP_ASSERT( acquireSyncs_.size() == acquireTimeouts_.size() ); VULKAN_HPP_ASSERT( acquireKeys_.size() == acquireTimeouts_.size() ); # else if ( acquireSyncs_.size() != acquireKeys_.size() ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::Win32KeyedMutexAcquireReleaseInfoKHR::Win32KeyedMutexAcquireReleaseInfoKHR: acquireSyncs_.size() != acquireKeys_.size()" ); } if ( acquireSyncs_.size() != acquireTimeouts_.size() ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::Win32KeyedMutexAcquireReleaseInfoKHR::Win32KeyedMutexAcquireReleaseInfoKHR: acquireSyncs_.size() != acquireTimeouts_.size()" ); } if ( acquireKeys_.size() != acquireTimeouts_.size() ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::Win32KeyedMutexAcquireReleaseInfoKHR::Win32KeyedMutexAcquireReleaseInfoKHR: acquireKeys_.size() != acquireTimeouts_.size()" ); } # endif /*VULKAN_HPP_NO_EXCEPTIONS*/ # ifdef VULKAN_HPP_NO_EXCEPTIONS VULKAN_HPP_ASSERT( releaseSyncs_.size() == releaseKeys_.size() ); # else if ( releaseSyncs_.size() != releaseKeys_.size() ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::Win32KeyedMutexAcquireReleaseInfoKHR::Win32KeyedMutexAcquireReleaseInfoKHR: releaseSyncs_.size() != releaseKeys_.size()" ); } # endif /*VULKAN_HPP_NO_EXCEPTIONS*/ } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ Win32KeyedMutexAcquireReleaseInfoKHR & operator=( Win32KeyedMutexAcquireReleaseInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ Win32KeyedMutexAcquireReleaseInfoKHR & operator=( VkWin32KeyedMutexAcquireReleaseInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } # if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 Win32KeyedMutexAcquireReleaseInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 Win32KeyedMutexAcquireReleaseInfoKHR & setAcquireCount( uint32_t acquireCount_ ) VULKAN_HPP_NOEXCEPT { acquireCount = acquireCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 Win32KeyedMutexAcquireReleaseInfoKHR & setPAcquireSyncs( const VULKAN_HPP_NAMESPACE::DeviceMemory * pAcquireSyncs_ ) VULKAN_HPP_NOEXCEPT { pAcquireSyncs = pAcquireSyncs_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) Win32KeyedMutexAcquireReleaseInfoKHR & setAcquireSyncs( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & acquireSyncs_ ) VULKAN_HPP_NOEXCEPT { acquireCount = static_cast( acquireSyncs_.size() ); pAcquireSyncs = acquireSyncs_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 Win32KeyedMutexAcquireReleaseInfoKHR & setPAcquireKeys( const uint64_t * pAcquireKeys_ ) VULKAN_HPP_NOEXCEPT { pAcquireKeys = pAcquireKeys_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) Win32KeyedMutexAcquireReleaseInfoKHR & setAcquireKeys( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & acquireKeys_ ) VULKAN_HPP_NOEXCEPT { acquireCount = static_cast( acquireKeys_.size() ); pAcquireKeys = acquireKeys_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 Win32KeyedMutexAcquireReleaseInfoKHR & setPAcquireTimeouts( const uint32_t * pAcquireTimeouts_ ) VULKAN_HPP_NOEXCEPT { pAcquireTimeouts = pAcquireTimeouts_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) Win32KeyedMutexAcquireReleaseInfoKHR & setAcquireTimeouts( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & acquireTimeouts_ ) VULKAN_HPP_NOEXCEPT { acquireCount = static_cast( acquireTimeouts_.size() ); pAcquireTimeouts = acquireTimeouts_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 Win32KeyedMutexAcquireReleaseInfoKHR & setReleaseCount( uint32_t releaseCount_ ) VULKAN_HPP_NOEXCEPT { releaseCount = releaseCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 Win32KeyedMutexAcquireReleaseInfoKHR & setPReleaseSyncs( const VULKAN_HPP_NAMESPACE::DeviceMemory * pReleaseSyncs_ ) VULKAN_HPP_NOEXCEPT { pReleaseSyncs = pReleaseSyncs_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) Win32KeyedMutexAcquireReleaseInfoKHR & setReleaseSyncs( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & releaseSyncs_ ) VULKAN_HPP_NOEXCEPT { releaseCount = static_cast( releaseSyncs_.size() ); pReleaseSyncs = releaseSyncs_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 Win32KeyedMutexAcquireReleaseInfoKHR & setPReleaseKeys( const uint64_t * pReleaseKeys_ ) VULKAN_HPP_NOEXCEPT { pReleaseKeys = pReleaseKeys_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) Win32KeyedMutexAcquireReleaseInfoKHR & setReleaseKeys( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & releaseKeys_ ) VULKAN_HPP_NOEXCEPT { releaseCount = static_cast( releaseKeys_.size() ); pReleaseKeys = releaseKeys_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ # endif /*VULKAN_HPP_NO_SETTERS*/ operator VkWin32KeyedMutexAcquireReleaseInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkWin32KeyedMutexAcquireReleaseInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, acquireCount, pAcquireSyncs, pAcquireKeys, pAcquireTimeouts, releaseCount, pReleaseSyncs, pReleaseKeys ); } # endif # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( Win32KeyedMutexAcquireReleaseInfoKHR const & ) const = default; # else bool operator==( Win32KeyedMutexAcquireReleaseInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( acquireCount == rhs.acquireCount ) && ( pAcquireSyncs == rhs.pAcquireSyncs ) && ( pAcquireKeys == rhs.pAcquireKeys ) && ( pAcquireTimeouts == rhs.pAcquireTimeouts ) && ( releaseCount == rhs.releaseCount ) && ( pReleaseSyncs == rhs.pReleaseSyncs ) && ( pReleaseKeys == rhs.pReleaseKeys ); # endif } bool operator!=( Win32KeyedMutexAcquireReleaseInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } # endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eWin32KeyedMutexAcquireReleaseInfoKHR; const void * pNext = {}; uint32_t acquireCount = {}; const VULKAN_HPP_NAMESPACE::DeviceMemory * pAcquireSyncs = {}; const uint64_t * pAcquireKeys = {}; const uint32_t * pAcquireTimeouts = {}; uint32_t releaseCount = {}; const VULKAN_HPP_NAMESPACE::DeviceMemory * pReleaseSyncs = {}; const uint64_t * pReleaseKeys = {}; }; template <> struct CppType { using Type = Win32KeyedMutexAcquireReleaseInfoKHR; }; #endif /*VK_USE_PLATFORM_WIN32_KHR*/ #if defined( VK_USE_PLATFORM_WIN32_KHR ) struct Win32KeyedMutexAcquireReleaseInfoNV { using NativeType = VkWin32KeyedMutexAcquireReleaseInfoNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eWin32KeyedMutexAcquireReleaseInfoNV; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR Win32KeyedMutexAcquireReleaseInfoNV( uint32_t acquireCount_ = {}, const VULKAN_HPP_NAMESPACE::DeviceMemory * pAcquireSyncs_ = {}, const uint64_t * pAcquireKeys_ = {}, const uint32_t * pAcquireTimeoutMilliseconds_ = {}, uint32_t releaseCount_ = {}, const VULKAN_HPP_NAMESPACE::DeviceMemory * pReleaseSyncs_ = {}, const uint64_t * pReleaseKeys_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , acquireCount{ acquireCount_ } , pAcquireSyncs{ pAcquireSyncs_ } , pAcquireKeys{ pAcquireKeys_ } , pAcquireTimeoutMilliseconds{ pAcquireTimeoutMilliseconds_ } , releaseCount{ releaseCount_ } , pReleaseSyncs{ pReleaseSyncs_ } , pReleaseKeys{ pReleaseKeys_ } { } VULKAN_HPP_CONSTEXPR Win32KeyedMutexAcquireReleaseInfoNV( Win32KeyedMutexAcquireReleaseInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; Win32KeyedMutexAcquireReleaseInfoNV( VkWin32KeyedMutexAcquireReleaseInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT : Win32KeyedMutexAcquireReleaseInfoNV( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) Win32KeyedMutexAcquireReleaseInfoNV( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & acquireSyncs_, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & acquireKeys_ = {}, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & acquireTimeoutMilliseconds_ = {}, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & releaseSyncs_ = {}, VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & releaseKeys_ = {}, const void * pNext_ = nullptr ) : pNext( pNext_ ) , acquireCount( static_cast( acquireSyncs_.size() ) ) , pAcquireSyncs( acquireSyncs_.data() ) , pAcquireKeys( acquireKeys_.data() ) , pAcquireTimeoutMilliseconds( acquireTimeoutMilliseconds_.data() ) , releaseCount( static_cast( releaseSyncs_.size() ) ) , pReleaseSyncs( releaseSyncs_.data() ) , pReleaseKeys( releaseKeys_.data() ) { # ifdef VULKAN_HPP_NO_EXCEPTIONS VULKAN_HPP_ASSERT( acquireSyncs_.size() == acquireKeys_.size() ); VULKAN_HPP_ASSERT( acquireSyncs_.size() == acquireTimeoutMilliseconds_.size() ); VULKAN_HPP_ASSERT( acquireKeys_.size() == acquireTimeoutMilliseconds_.size() ); # else if ( acquireSyncs_.size() != acquireKeys_.size() ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::Win32KeyedMutexAcquireReleaseInfoNV::Win32KeyedMutexAcquireReleaseInfoNV: acquireSyncs_.size() != acquireKeys_.size()" ); } if ( acquireSyncs_.size() != acquireTimeoutMilliseconds_.size() ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::Win32KeyedMutexAcquireReleaseInfoNV::Win32KeyedMutexAcquireReleaseInfoNV: acquireSyncs_.size() != acquireTimeoutMilliseconds_.size()" ); } if ( acquireKeys_.size() != acquireTimeoutMilliseconds_.size() ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::Win32KeyedMutexAcquireReleaseInfoNV::Win32KeyedMutexAcquireReleaseInfoNV: acquireKeys_.size() != acquireTimeoutMilliseconds_.size()" ); } # endif /*VULKAN_HPP_NO_EXCEPTIONS*/ # ifdef VULKAN_HPP_NO_EXCEPTIONS VULKAN_HPP_ASSERT( releaseSyncs_.size() == releaseKeys_.size() ); # else if ( releaseSyncs_.size() != releaseKeys_.size() ) { throw LogicError( VULKAN_HPP_NAMESPACE_STRING "::Win32KeyedMutexAcquireReleaseInfoNV::Win32KeyedMutexAcquireReleaseInfoNV: releaseSyncs_.size() != releaseKeys_.size()" ); } # endif /*VULKAN_HPP_NO_EXCEPTIONS*/ } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ Win32KeyedMutexAcquireReleaseInfoNV & operator=( Win32KeyedMutexAcquireReleaseInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ Win32KeyedMutexAcquireReleaseInfoNV & operator=( VkWin32KeyedMutexAcquireReleaseInfoNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } # if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 Win32KeyedMutexAcquireReleaseInfoNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 Win32KeyedMutexAcquireReleaseInfoNV & setAcquireCount( uint32_t acquireCount_ ) VULKAN_HPP_NOEXCEPT { acquireCount = acquireCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 Win32KeyedMutexAcquireReleaseInfoNV & setPAcquireSyncs( const VULKAN_HPP_NAMESPACE::DeviceMemory * pAcquireSyncs_ ) VULKAN_HPP_NOEXCEPT { pAcquireSyncs = pAcquireSyncs_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) Win32KeyedMutexAcquireReleaseInfoNV & setAcquireSyncs( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & acquireSyncs_ ) VULKAN_HPP_NOEXCEPT { acquireCount = static_cast( acquireSyncs_.size() ); pAcquireSyncs = acquireSyncs_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 Win32KeyedMutexAcquireReleaseInfoNV & setPAcquireKeys( const uint64_t * pAcquireKeys_ ) VULKAN_HPP_NOEXCEPT { pAcquireKeys = pAcquireKeys_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) Win32KeyedMutexAcquireReleaseInfoNV & setAcquireKeys( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & acquireKeys_ ) VULKAN_HPP_NOEXCEPT { acquireCount = static_cast( acquireKeys_.size() ); pAcquireKeys = acquireKeys_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 Win32KeyedMutexAcquireReleaseInfoNV & setPAcquireTimeoutMilliseconds( const uint32_t * pAcquireTimeoutMilliseconds_ ) VULKAN_HPP_NOEXCEPT { pAcquireTimeoutMilliseconds = pAcquireTimeoutMilliseconds_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) Win32KeyedMutexAcquireReleaseInfoNV & setAcquireTimeoutMilliseconds( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & acquireTimeoutMilliseconds_ ) VULKAN_HPP_NOEXCEPT { acquireCount = static_cast( acquireTimeoutMilliseconds_.size() ); pAcquireTimeoutMilliseconds = acquireTimeoutMilliseconds_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 Win32KeyedMutexAcquireReleaseInfoNV & setReleaseCount( uint32_t releaseCount_ ) VULKAN_HPP_NOEXCEPT { releaseCount = releaseCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 Win32KeyedMutexAcquireReleaseInfoNV & setPReleaseSyncs( const VULKAN_HPP_NAMESPACE::DeviceMemory * pReleaseSyncs_ ) VULKAN_HPP_NOEXCEPT { pReleaseSyncs = pReleaseSyncs_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) Win32KeyedMutexAcquireReleaseInfoNV & setReleaseSyncs( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & releaseSyncs_ ) VULKAN_HPP_NOEXCEPT { releaseCount = static_cast( releaseSyncs_.size() ); pReleaseSyncs = releaseSyncs_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_CONSTEXPR_14 Win32KeyedMutexAcquireReleaseInfoNV & setPReleaseKeys( const uint64_t * pReleaseKeys_ ) VULKAN_HPP_NOEXCEPT { pReleaseKeys = pReleaseKeys_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) Win32KeyedMutexAcquireReleaseInfoNV & setReleaseKeys( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & releaseKeys_ ) VULKAN_HPP_NOEXCEPT { releaseCount = static_cast( releaseKeys_.size() ); pReleaseKeys = releaseKeys_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ # endif /*VULKAN_HPP_NO_SETTERS*/ operator VkWin32KeyedMutexAcquireReleaseInfoNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkWin32KeyedMutexAcquireReleaseInfoNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, acquireCount, pAcquireSyncs, pAcquireKeys, pAcquireTimeoutMilliseconds, releaseCount, pReleaseSyncs, pReleaseKeys ); } # endif # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( Win32KeyedMutexAcquireReleaseInfoNV const & ) const = default; # else bool operator==( Win32KeyedMutexAcquireReleaseInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( acquireCount == rhs.acquireCount ) && ( pAcquireSyncs == rhs.pAcquireSyncs ) && ( pAcquireKeys == rhs.pAcquireKeys ) && ( pAcquireTimeoutMilliseconds == rhs.pAcquireTimeoutMilliseconds ) && ( releaseCount == rhs.releaseCount ) && ( pReleaseSyncs == rhs.pReleaseSyncs ) && ( pReleaseKeys == rhs.pReleaseKeys ); # endif } bool operator!=( Win32KeyedMutexAcquireReleaseInfoNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } # endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eWin32KeyedMutexAcquireReleaseInfoNV; const void * pNext = {}; uint32_t acquireCount = {}; const VULKAN_HPP_NAMESPACE::DeviceMemory * pAcquireSyncs = {}; const uint64_t * pAcquireKeys = {}; const uint32_t * pAcquireTimeoutMilliseconds = {}; uint32_t releaseCount = {}; const VULKAN_HPP_NAMESPACE::DeviceMemory * pReleaseSyncs = {}; const uint64_t * pReleaseKeys = {}; }; template <> struct CppType { using Type = Win32KeyedMutexAcquireReleaseInfoNV; }; #endif /*VK_USE_PLATFORM_WIN32_KHR*/ #if defined( VK_USE_PLATFORM_WIN32_KHR ) struct Win32SurfaceCreateInfoKHR { using NativeType = VkWin32SurfaceCreateInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eWin32SurfaceCreateInfoKHR; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR Win32SurfaceCreateInfoKHR( VULKAN_HPP_NAMESPACE::Win32SurfaceCreateFlagsKHR flags_ = {}, HINSTANCE hinstance_ = {}, HWND hwnd_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , hinstance{ hinstance_ } , hwnd{ hwnd_ } { } VULKAN_HPP_CONSTEXPR Win32SurfaceCreateInfoKHR( Win32SurfaceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; Win32SurfaceCreateInfoKHR( VkWin32SurfaceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : Win32SurfaceCreateInfoKHR( *reinterpret_cast( &rhs ) ) { } Win32SurfaceCreateInfoKHR & operator=( Win32SurfaceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ Win32SurfaceCreateInfoKHR & operator=( VkWin32SurfaceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } # if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 Win32SurfaceCreateInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 Win32SurfaceCreateInfoKHR & setFlags( VULKAN_HPP_NAMESPACE::Win32SurfaceCreateFlagsKHR flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 Win32SurfaceCreateInfoKHR & setHinstance( HINSTANCE hinstance_ ) VULKAN_HPP_NOEXCEPT { hinstance = hinstance_; return *this; } VULKAN_HPP_CONSTEXPR_14 Win32SurfaceCreateInfoKHR & setHwnd( HWND hwnd_ ) VULKAN_HPP_NOEXCEPT { hwnd = hwnd_; return *this; } # endif /*VULKAN_HPP_NO_SETTERS*/ operator VkWin32SurfaceCreateInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkWin32SurfaceCreateInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, hinstance, hwnd ); } # endif # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( Win32SurfaceCreateInfoKHR const & ) const = default; # else bool operator==( Win32SurfaceCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( hinstance == rhs.hinstance ) && ( hwnd == rhs.hwnd ); # endif } bool operator!=( Win32SurfaceCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } # endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eWin32SurfaceCreateInfoKHR; const void * pNext = {}; VULKAN_HPP_NAMESPACE::Win32SurfaceCreateFlagsKHR flags = {}; HINSTANCE hinstance = {}; HWND hwnd = {}; }; template <> struct CppType { using Type = Win32SurfaceCreateInfoKHR; }; #endif /*VK_USE_PLATFORM_WIN32_KHR*/ struct WriteDescriptorSetAccelerationStructureKHR { using NativeType = VkWriteDescriptorSetAccelerationStructureKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eWriteDescriptorSetAccelerationStructureKHR; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR WriteDescriptorSetAccelerationStructureKHR( uint32_t accelerationStructureCount_ = {}, const VULKAN_HPP_NAMESPACE::AccelerationStructureKHR * pAccelerationStructures_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , accelerationStructureCount{ accelerationStructureCount_ } , pAccelerationStructures{ pAccelerationStructures_ } { } VULKAN_HPP_CONSTEXPR WriteDescriptorSetAccelerationStructureKHR( WriteDescriptorSetAccelerationStructureKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; WriteDescriptorSetAccelerationStructureKHR( VkWriteDescriptorSetAccelerationStructureKHR const & rhs ) VULKAN_HPP_NOEXCEPT : WriteDescriptorSetAccelerationStructureKHR( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) WriteDescriptorSetAccelerationStructureKHR( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & accelerationStructures_, const void * pNext_ = nullptr ) : pNext( pNext_ ) , accelerationStructureCount( static_cast( accelerationStructures_.size() ) ) , pAccelerationStructures( accelerationStructures_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ WriteDescriptorSetAccelerationStructureKHR & operator=( WriteDescriptorSetAccelerationStructureKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ WriteDescriptorSetAccelerationStructureKHR & operator=( VkWriteDescriptorSetAccelerationStructureKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 WriteDescriptorSetAccelerationStructureKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 WriteDescriptorSetAccelerationStructureKHR & setAccelerationStructureCount( uint32_t accelerationStructureCount_ ) VULKAN_HPP_NOEXCEPT { accelerationStructureCount = accelerationStructureCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 WriteDescriptorSetAccelerationStructureKHR & setPAccelerationStructures( const VULKAN_HPP_NAMESPACE::AccelerationStructureKHR * pAccelerationStructures_ ) VULKAN_HPP_NOEXCEPT { pAccelerationStructures = pAccelerationStructures_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) WriteDescriptorSetAccelerationStructureKHR & setAccelerationStructures( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & accelerationStructures_ ) VULKAN_HPP_NOEXCEPT { accelerationStructureCount = static_cast( accelerationStructures_.size() ); pAccelerationStructures = accelerationStructures_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkWriteDescriptorSetAccelerationStructureKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkWriteDescriptorSetAccelerationStructureKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std:: tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, accelerationStructureCount, pAccelerationStructures ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( WriteDescriptorSetAccelerationStructureKHR const & ) const = default; #else bool operator==( WriteDescriptorSetAccelerationStructureKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( accelerationStructureCount == rhs.accelerationStructureCount ) && ( pAccelerationStructures == rhs.pAccelerationStructures ); # endif } bool operator!=( WriteDescriptorSetAccelerationStructureKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eWriteDescriptorSetAccelerationStructureKHR; const void * pNext = {}; uint32_t accelerationStructureCount = {}; const VULKAN_HPP_NAMESPACE::AccelerationStructureKHR * pAccelerationStructures = {}; }; template <> struct CppType { using Type = WriteDescriptorSetAccelerationStructureKHR; }; struct WriteDescriptorSetAccelerationStructureNV { using NativeType = VkWriteDescriptorSetAccelerationStructureNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eWriteDescriptorSetAccelerationStructureNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR WriteDescriptorSetAccelerationStructureNV( uint32_t accelerationStructureCount_ = {}, const VULKAN_HPP_NAMESPACE::AccelerationStructureNV * pAccelerationStructures_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , accelerationStructureCount{ accelerationStructureCount_ } , pAccelerationStructures{ pAccelerationStructures_ } { } VULKAN_HPP_CONSTEXPR WriteDescriptorSetAccelerationStructureNV( WriteDescriptorSetAccelerationStructureNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; WriteDescriptorSetAccelerationStructureNV( VkWriteDescriptorSetAccelerationStructureNV const & rhs ) VULKAN_HPP_NOEXCEPT : WriteDescriptorSetAccelerationStructureNV( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) WriteDescriptorSetAccelerationStructureNV( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & accelerationStructures_, const void * pNext_ = nullptr ) : pNext( pNext_ ) , accelerationStructureCount( static_cast( accelerationStructures_.size() ) ) , pAccelerationStructures( accelerationStructures_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ WriteDescriptorSetAccelerationStructureNV & operator=( WriteDescriptorSetAccelerationStructureNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ WriteDescriptorSetAccelerationStructureNV & operator=( VkWriteDescriptorSetAccelerationStructureNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 WriteDescriptorSetAccelerationStructureNV & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 WriteDescriptorSetAccelerationStructureNV & setAccelerationStructureCount( uint32_t accelerationStructureCount_ ) VULKAN_HPP_NOEXCEPT { accelerationStructureCount = accelerationStructureCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 WriteDescriptorSetAccelerationStructureNV & setPAccelerationStructures( const VULKAN_HPP_NAMESPACE::AccelerationStructureNV * pAccelerationStructures_ ) VULKAN_HPP_NOEXCEPT { pAccelerationStructures = pAccelerationStructures_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) WriteDescriptorSetAccelerationStructureNV & setAccelerationStructures( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & accelerationStructures_ ) VULKAN_HPP_NOEXCEPT { accelerationStructureCount = static_cast( accelerationStructures_.size() ); pAccelerationStructures = accelerationStructures_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkWriteDescriptorSetAccelerationStructureNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkWriteDescriptorSetAccelerationStructureNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std:: tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, accelerationStructureCount, pAccelerationStructures ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( WriteDescriptorSetAccelerationStructureNV const & ) const = default; #else bool operator==( WriteDescriptorSetAccelerationStructureNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( accelerationStructureCount == rhs.accelerationStructureCount ) && ( pAccelerationStructures == rhs.pAccelerationStructures ); # endif } bool operator!=( WriteDescriptorSetAccelerationStructureNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eWriteDescriptorSetAccelerationStructureNV; const void * pNext = {}; uint32_t accelerationStructureCount = {}; const VULKAN_HPP_NAMESPACE::AccelerationStructureNV * pAccelerationStructures = {}; }; template <> struct CppType { using Type = WriteDescriptorSetAccelerationStructureNV; }; struct WriteDescriptorSetInlineUniformBlock { using NativeType = VkWriteDescriptorSetInlineUniformBlock; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eWriteDescriptorSetInlineUniformBlock; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR WriteDescriptorSetInlineUniformBlock( uint32_t dataSize_ = {}, const void * pData_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , dataSize{ dataSize_ } , pData{ pData_ } { } VULKAN_HPP_CONSTEXPR WriteDescriptorSetInlineUniformBlock( WriteDescriptorSetInlineUniformBlock const & rhs ) VULKAN_HPP_NOEXCEPT = default; WriteDescriptorSetInlineUniformBlock( VkWriteDescriptorSetInlineUniformBlock const & rhs ) VULKAN_HPP_NOEXCEPT : WriteDescriptorSetInlineUniformBlock( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) template WriteDescriptorSetInlineUniformBlock( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & data_, const void * pNext_ = nullptr ) : pNext( pNext_ ), dataSize( static_cast( data_.size() * sizeof( T ) ) ), pData( data_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ WriteDescriptorSetInlineUniformBlock & operator=( WriteDescriptorSetInlineUniformBlock const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ WriteDescriptorSetInlineUniformBlock & operator=( VkWriteDescriptorSetInlineUniformBlock const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 WriteDescriptorSetInlineUniformBlock & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 WriteDescriptorSetInlineUniformBlock & setDataSize( uint32_t dataSize_ ) VULKAN_HPP_NOEXCEPT { dataSize = dataSize_; return *this; } VULKAN_HPP_CONSTEXPR_14 WriteDescriptorSetInlineUniformBlock & setPData( const void * pData_ ) VULKAN_HPP_NOEXCEPT { pData = pData_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) template WriteDescriptorSetInlineUniformBlock & setData( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & data_ ) VULKAN_HPP_NOEXCEPT { dataSize = static_cast( data_.size() * sizeof( T ) ); pData = data_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkWriteDescriptorSetInlineUniformBlock const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkWriteDescriptorSetInlineUniformBlock &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, dataSize, pData ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( WriteDescriptorSetInlineUniformBlock const & ) const = default; #else bool operator==( WriteDescriptorSetInlineUniformBlock const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( dataSize == rhs.dataSize ) && ( pData == rhs.pData ); # endif } bool operator!=( WriteDescriptorSetInlineUniformBlock const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eWriteDescriptorSetInlineUniformBlock; const void * pNext = {}; uint32_t dataSize = {}; const void * pData = {}; }; template <> struct CppType { using Type = WriteDescriptorSetInlineUniformBlock; }; using WriteDescriptorSetInlineUniformBlockEXT = WriteDescriptorSetInlineUniformBlock; struct WriteDescriptorSetPartitionedAccelerationStructureNV { using NativeType = VkWriteDescriptorSetPartitionedAccelerationStructureNV; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eWriteDescriptorSetPartitionedAccelerationStructureNV; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR WriteDescriptorSetPartitionedAccelerationStructureNV( uint32_t accelerationStructureCount_ = {}, const VULKAN_HPP_NAMESPACE::DeviceAddress * pAccelerationStructures_ = {}, void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , accelerationStructureCount{ accelerationStructureCount_ } , pAccelerationStructures{ pAccelerationStructures_ } { } VULKAN_HPP_CONSTEXPR WriteDescriptorSetPartitionedAccelerationStructureNV( WriteDescriptorSetPartitionedAccelerationStructureNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; WriteDescriptorSetPartitionedAccelerationStructureNV( VkWriteDescriptorSetPartitionedAccelerationStructureNV const & rhs ) VULKAN_HPP_NOEXCEPT : WriteDescriptorSetPartitionedAccelerationStructureNV( *reinterpret_cast( &rhs ) ) { } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) WriteDescriptorSetPartitionedAccelerationStructureNV( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & accelerationStructures_, void * pNext_ = nullptr ) : pNext( pNext_ ) , accelerationStructureCount( static_cast( accelerationStructures_.size() ) ) , pAccelerationStructures( accelerationStructures_.data() ) { } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ WriteDescriptorSetPartitionedAccelerationStructureNV & operator=( WriteDescriptorSetPartitionedAccelerationStructureNV const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ WriteDescriptorSetPartitionedAccelerationStructureNV & operator=( VkWriteDescriptorSetPartitionedAccelerationStructureNV const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 WriteDescriptorSetPartitionedAccelerationStructureNV & setPNext( void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 WriteDescriptorSetPartitionedAccelerationStructureNV & setAccelerationStructureCount( uint32_t accelerationStructureCount_ ) VULKAN_HPP_NOEXCEPT { accelerationStructureCount = accelerationStructureCount_; return *this; } VULKAN_HPP_CONSTEXPR_14 WriteDescriptorSetPartitionedAccelerationStructureNV & setPAccelerationStructures( const VULKAN_HPP_NAMESPACE::DeviceAddress * pAccelerationStructures_ ) VULKAN_HPP_NOEXCEPT { pAccelerationStructures = pAccelerationStructures_; return *this; } # if !defined( VULKAN_HPP_DISABLE_ENHANCED_MODE ) WriteDescriptorSetPartitionedAccelerationStructureNV & setAccelerationStructures( VULKAN_HPP_NAMESPACE::ArrayProxyNoTemporaries const & accelerationStructures_ ) VULKAN_HPP_NOEXCEPT { accelerationStructureCount = static_cast( accelerationStructures_.size() ); pAccelerationStructures = accelerationStructures_.data(); return *this; } # endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkWriteDescriptorSetPartitionedAccelerationStructureNV const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkWriteDescriptorSetPartitionedAccelerationStructureNV &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, accelerationStructureCount, pAccelerationStructures ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( WriteDescriptorSetPartitionedAccelerationStructureNV const & ) const = default; #else bool operator==( WriteDescriptorSetPartitionedAccelerationStructureNV const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( accelerationStructureCount == rhs.accelerationStructureCount ) && ( pAccelerationStructures == rhs.pAccelerationStructures ); # endif } bool operator!=( WriteDescriptorSetPartitionedAccelerationStructureNV const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eWriteDescriptorSetPartitionedAccelerationStructureNV; void * pNext = {}; uint32_t accelerationStructureCount = {}; const VULKAN_HPP_NAMESPACE::DeviceAddress * pAccelerationStructures = {}; }; template <> struct CppType { using Type = WriteDescriptorSetPartitionedAccelerationStructureNV; }; struct WriteIndirectExecutionSetPipelineEXT { using NativeType = VkWriteIndirectExecutionSetPipelineEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eWriteIndirectExecutionSetPipelineEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR WriteIndirectExecutionSetPipelineEXT( uint32_t index_ = {}, VULKAN_HPP_NAMESPACE::Pipeline pipeline_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , index{ index_ } , pipeline{ pipeline_ } { } VULKAN_HPP_CONSTEXPR WriteIndirectExecutionSetPipelineEXT( WriteIndirectExecutionSetPipelineEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; WriteIndirectExecutionSetPipelineEXT( VkWriteIndirectExecutionSetPipelineEXT const & rhs ) VULKAN_HPP_NOEXCEPT : WriteIndirectExecutionSetPipelineEXT( *reinterpret_cast( &rhs ) ) { } WriteIndirectExecutionSetPipelineEXT & operator=( WriteIndirectExecutionSetPipelineEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ WriteIndirectExecutionSetPipelineEXT & operator=( VkWriteIndirectExecutionSetPipelineEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 WriteIndirectExecutionSetPipelineEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 WriteIndirectExecutionSetPipelineEXT & setIndex( uint32_t index_ ) VULKAN_HPP_NOEXCEPT { index = index_; return *this; } VULKAN_HPP_CONSTEXPR_14 WriteIndirectExecutionSetPipelineEXT & setPipeline( VULKAN_HPP_NAMESPACE::Pipeline pipeline_ ) VULKAN_HPP_NOEXCEPT { pipeline = pipeline_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkWriteIndirectExecutionSetPipelineEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkWriteIndirectExecutionSetPipelineEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, index, pipeline ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( WriteIndirectExecutionSetPipelineEXT const & ) const = default; #else bool operator==( WriteIndirectExecutionSetPipelineEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( index == rhs.index ) && ( pipeline == rhs.pipeline ); # endif } bool operator!=( WriteIndirectExecutionSetPipelineEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eWriteIndirectExecutionSetPipelineEXT; const void * pNext = {}; uint32_t index = {}; VULKAN_HPP_NAMESPACE::Pipeline pipeline = {}; }; template <> struct CppType { using Type = WriteIndirectExecutionSetPipelineEXT; }; struct WriteIndirectExecutionSetShaderEXT { using NativeType = VkWriteIndirectExecutionSetShaderEXT; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eWriteIndirectExecutionSetShaderEXT; #if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR WriteIndirectExecutionSetShaderEXT( uint32_t index_ = {}, VULKAN_HPP_NAMESPACE::ShaderEXT shader_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , index{ index_ } , shader{ shader_ } { } VULKAN_HPP_CONSTEXPR WriteIndirectExecutionSetShaderEXT( WriteIndirectExecutionSetShaderEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; WriteIndirectExecutionSetShaderEXT( VkWriteIndirectExecutionSetShaderEXT const & rhs ) VULKAN_HPP_NOEXCEPT : WriteIndirectExecutionSetShaderEXT( *reinterpret_cast( &rhs ) ) { } WriteIndirectExecutionSetShaderEXT & operator=( WriteIndirectExecutionSetShaderEXT const & rhs ) VULKAN_HPP_NOEXCEPT = default; #endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ WriteIndirectExecutionSetShaderEXT & operator=( VkWriteIndirectExecutionSetShaderEXT const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } #if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 WriteIndirectExecutionSetShaderEXT & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 WriteIndirectExecutionSetShaderEXT & setIndex( uint32_t index_ ) VULKAN_HPP_NOEXCEPT { index = index_; return *this; } VULKAN_HPP_CONSTEXPR_14 WriteIndirectExecutionSetShaderEXT & setShader( VULKAN_HPP_NAMESPACE::ShaderEXT shader_ ) VULKAN_HPP_NOEXCEPT { shader = shader_; return *this; } #endif /*VULKAN_HPP_NO_SETTERS*/ operator VkWriteIndirectExecutionSetShaderEXT const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkWriteIndirectExecutionSetShaderEXT &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } #if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, index, shader ); } #endif #if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) auto operator<=>( WriteIndirectExecutionSetShaderEXT const & ) const = default; #else bool operator==( WriteIndirectExecutionSetShaderEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { # if defined( VULKAN_HPP_USE_REFLECT ) return this->reflect() == rhs.reflect(); # else return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( index == rhs.index ) && ( shader == rhs.shader ); # endif } bool operator!=( WriteIndirectExecutionSetShaderEXT const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } #endif public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eWriteIndirectExecutionSetShaderEXT; const void * pNext = {}; uint32_t index = {}; VULKAN_HPP_NAMESPACE::ShaderEXT shader = {}; }; template <> struct CppType { using Type = WriteIndirectExecutionSetShaderEXT; }; #if defined( VK_USE_PLATFORM_XCB_KHR ) struct XcbSurfaceCreateInfoKHR { using NativeType = VkXcbSurfaceCreateInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eXcbSurfaceCreateInfoKHR; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR XcbSurfaceCreateInfoKHR( VULKAN_HPP_NAMESPACE::XcbSurfaceCreateFlagsKHR flags_ = {}, xcb_connection_t * connection_ = {}, xcb_window_t window_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , connection{ connection_ } , window{ window_ } { } VULKAN_HPP_CONSTEXPR XcbSurfaceCreateInfoKHR( XcbSurfaceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; XcbSurfaceCreateInfoKHR( VkXcbSurfaceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : XcbSurfaceCreateInfoKHR( *reinterpret_cast( &rhs ) ) { } XcbSurfaceCreateInfoKHR & operator=( XcbSurfaceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ XcbSurfaceCreateInfoKHR & operator=( VkXcbSurfaceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } # if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 XcbSurfaceCreateInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 XcbSurfaceCreateInfoKHR & setFlags( VULKAN_HPP_NAMESPACE::XcbSurfaceCreateFlagsKHR flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 XcbSurfaceCreateInfoKHR & setConnection( xcb_connection_t * connection_ ) VULKAN_HPP_NOEXCEPT { connection = connection_; return *this; } VULKAN_HPP_CONSTEXPR_14 XcbSurfaceCreateInfoKHR & setWindow( xcb_window_t window_ ) VULKAN_HPP_NOEXCEPT { window = window_; return *this; } # endif /*VULKAN_HPP_NO_SETTERS*/ operator VkXcbSurfaceCreateInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkXcbSurfaceCreateInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, connection, window ); } # endif # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) std::strong_ordering operator<=>( XcbSurfaceCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { if ( auto cmp = sType <=> rhs.sType; cmp != 0 ) return cmp; if ( auto cmp = pNext <=> rhs.pNext; cmp != 0 ) return cmp; if ( auto cmp = flags <=> rhs.flags; cmp != 0 ) return cmp; if ( auto cmp = connection <=> rhs.connection; cmp != 0 ) return cmp; if ( auto cmp = memcmp( &window, &rhs.window, sizeof( xcb_window_t ) ); cmp != 0 ) return ( cmp < 0 ) ? std::strong_ordering::less : std::strong_ordering::greater; return std::strong_ordering::equivalent; } # endif bool operator==( XcbSurfaceCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( connection == rhs.connection ) && ( memcmp( &window, &rhs.window, sizeof( xcb_window_t ) ) == 0 ); } bool operator!=( XcbSurfaceCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eXcbSurfaceCreateInfoKHR; const void * pNext = {}; VULKAN_HPP_NAMESPACE::XcbSurfaceCreateFlagsKHR flags = {}; xcb_connection_t * connection = {}; xcb_window_t window = {}; }; template <> struct CppType { using Type = XcbSurfaceCreateInfoKHR; }; #endif /*VK_USE_PLATFORM_XCB_KHR*/ #if defined( VK_USE_PLATFORM_XLIB_KHR ) struct XlibSurfaceCreateInfoKHR { using NativeType = VkXlibSurfaceCreateInfoKHR; static const bool allowDuplicate = false; static VULKAN_HPP_CONST_OR_CONSTEXPR StructureType structureType = StructureType::eXlibSurfaceCreateInfoKHR; # if !defined( VULKAN_HPP_NO_CONSTRUCTORS ) && !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS ) VULKAN_HPP_CONSTEXPR XlibSurfaceCreateInfoKHR( VULKAN_HPP_NAMESPACE::XlibSurfaceCreateFlagsKHR flags_ = {}, Display * dpy_ = {}, Window window_ = {}, const void * pNext_ = nullptr ) VULKAN_HPP_NOEXCEPT : pNext{ pNext_ } , flags{ flags_ } , dpy{ dpy_ } , window{ window_ } { } VULKAN_HPP_CONSTEXPR XlibSurfaceCreateInfoKHR( XlibSurfaceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; XlibSurfaceCreateInfoKHR( VkXlibSurfaceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT : XlibSurfaceCreateInfoKHR( *reinterpret_cast( &rhs ) ) { } XlibSurfaceCreateInfoKHR & operator=( XlibSurfaceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT = default; # endif /*VULKAN_HPP_NO_CONSTRUCTORS*/ XlibSurfaceCreateInfoKHR & operator=( VkXlibSurfaceCreateInfoKHR const & rhs ) VULKAN_HPP_NOEXCEPT { *this = *reinterpret_cast( &rhs ); return *this; } # if !defined( VULKAN_HPP_NO_SETTERS ) && !defined( VULKAN_HPP_NO_STRUCT_SETTERS ) VULKAN_HPP_CONSTEXPR_14 XlibSurfaceCreateInfoKHR & setPNext( const void * pNext_ ) VULKAN_HPP_NOEXCEPT { pNext = pNext_; return *this; } VULKAN_HPP_CONSTEXPR_14 XlibSurfaceCreateInfoKHR & setFlags( VULKAN_HPP_NAMESPACE::XlibSurfaceCreateFlagsKHR flags_ ) VULKAN_HPP_NOEXCEPT { flags = flags_; return *this; } VULKAN_HPP_CONSTEXPR_14 XlibSurfaceCreateInfoKHR & setDpy( Display * dpy_ ) VULKAN_HPP_NOEXCEPT { dpy = dpy_; return *this; } VULKAN_HPP_CONSTEXPR_14 XlibSurfaceCreateInfoKHR & setWindow( Window window_ ) VULKAN_HPP_NOEXCEPT { window = window_; return *this; } # endif /*VULKAN_HPP_NO_SETTERS*/ operator VkXlibSurfaceCreateInfoKHR const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator VkXlibSurfaceCreateInfoKHR &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } # if defined( VULKAN_HPP_USE_REFLECT ) # if 14 <= VULKAN_HPP_CPP_VERSION auto # else std::tuple # endif reflect() const VULKAN_HPP_NOEXCEPT { return std::tie( sType, pNext, flags, dpy, window ); } # endif # if defined( VULKAN_HPP_HAS_SPACESHIP_OPERATOR ) std::strong_ordering operator<=>( XlibSurfaceCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { if ( auto cmp = sType <=> rhs.sType; cmp != 0 ) return cmp; if ( auto cmp = pNext <=> rhs.pNext; cmp != 0 ) return cmp; if ( auto cmp = flags <=> rhs.flags; cmp != 0 ) return cmp; if ( auto cmp = dpy <=> rhs.dpy; cmp != 0 ) return cmp; if ( auto cmp = memcmp( &window, &rhs.window, sizeof( Window ) ); cmp != 0 ) return ( cmp < 0 ) ? std::strong_ordering::less : std::strong_ordering::greater; return std::strong_ordering::equivalent; } # endif bool operator==( XlibSurfaceCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( dpy == rhs.dpy ) && ( memcmp( &window, &rhs.window, sizeof( Window ) ) == 0 ); } bool operator!=( XlibSurfaceCreateInfoKHR const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::StructureType sType = StructureType::eXlibSurfaceCreateInfoKHR; const void * pNext = {}; VULKAN_HPP_NAMESPACE::XlibSurfaceCreateFlagsKHR flags = {}; Display * dpy = {}; Window window = {}; }; template <> struct CppType { using Type = XlibSurfaceCreateInfoKHR; }; #endif /*VK_USE_PLATFORM_XLIB_KHR*/ } // namespace VULKAN_HPP_NAMESPACE #endif ================================================ FILE: src/libraries/vulkanheaders/vulkan_to_string.hpp ================================================ // Copyright 2015-2025 The Khronos Group Inc. // // SPDX-License-Identifier: Apache-2.0 OR MIT // // This header is generated from the Khronos Vulkan XML API Registry. #ifndef VULKAN_TO_STRING_HPP #define VULKAN_TO_STRING_HPP #include // ignore warnings on using deprecated enum values in this header #if defined( __clang__ ) || defined( __GNUC__ ) # pragma GCC diagnostic push # pragma GCC diagnostic ignored "-Wdeprecated-declarations" #elif defined( _MSC_VER ) # pragma warning( push ) # pragma warning( disable : 4996 ) #endif #if defined( VULKAN_HPP_ENABLE_STD_MODULE ) && defined( VULKAN_HPP_STD_MODULE ) import VULKAN_HPP_STD_MODULE; #else # if __cpp_lib_format # include // std::format # else # include // std::stringstream # endif #endif namespace VULKAN_HPP_NAMESPACE { //========================== //=== BITMASKs to_string === //========================== //=== VK_VERSION_1_0 === VULKAN_HPP_INLINE std::string to_string( FormatFeatureFlags value ) { if ( !value ) return "{}"; std::string result; if ( value & FormatFeatureFlagBits::eSampledImage ) result += "SampledImage | "; if ( value & FormatFeatureFlagBits::eStorageImage ) result += "StorageImage | "; if ( value & FormatFeatureFlagBits::eStorageImageAtomic ) result += "StorageImageAtomic | "; if ( value & FormatFeatureFlagBits::eUniformTexelBuffer ) result += "UniformTexelBuffer | "; if ( value & FormatFeatureFlagBits::eStorageTexelBuffer ) result += "StorageTexelBuffer | "; if ( value & FormatFeatureFlagBits::eStorageTexelBufferAtomic ) result += "StorageTexelBufferAtomic | "; if ( value & FormatFeatureFlagBits::eVertexBuffer ) result += "VertexBuffer | "; if ( value & FormatFeatureFlagBits::eColorAttachment ) result += "ColorAttachment | "; if ( value & FormatFeatureFlagBits::eColorAttachmentBlend ) result += "ColorAttachmentBlend | "; if ( value & FormatFeatureFlagBits::eDepthStencilAttachment ) result += "DepthStencilAttachment | "; if ( value & FormatFeatureFlagBits::eBlitSrc ) result += "BlitSrc | "; if ( value & FormatFeatureFlagBits::eBlitDst ) result += "BlitDst | "; if ( value & FormatFeatureFlagBits::eSampledImageFilterLinear ) result += "SampledImageFilterLinear | "; if ( value & FormatFeatureFlagBits::eTransferSrc ) result += "TransferSrc | "; if ( value & FormatFeatureFlagBits::eTransferDst ) result += "TransferDst | "; if ( value & FormatFeatureFlagBits::eMidpointChromaSamples ) result += "MidpointChromaSamples | "; if ( value & FormatFeatureFlagBits::eSampledImageYcbcrConversionLinearFilter ) result += "SampledImageYcbcrConversionLinearFilter | "; if ( value & FormatFeatureFlagBits::eSampledImageYcbcrConversionSeparateReconstructionFilter ) result += "SampledImageYcbcrConversionSeparateReconstructionFilter | "; if ( value & FormatFeatureFlagBits::eSampledImageYcbcrConversionChromaReconstructionExplicit ) result += "SampledImageYcbcrConversionChromaReconstructionExplicit | "; if ( value & FormatFeatureFlagBits::eSampledImageYcbcrConversionChromaReconstructionExplicitForceable ) result += "SampledImageYcbcrConversionChromaReconstructionExplicitForceable | "; if ( value & FormatFeatureFlagBits::eDisjoint ) result += "Disjoint | "; if ( value & FormatFeatureFlagBits::eCositedChromaSamples ) result += "CositedChromaSamples | "; if ( value & FormatFeatureFlagBits::eSampledImageFilterMinmax ) result += "SampledImageFilterMinmax | "; if ( value & FormatFeatureFlagBits::eVideoDecodeOutputKHR ) result += "VideoDecodeOutputKHR | "; if ( value & FormatFeatureFlagBits::eVideoDecodeDpbKHR ) result += "VideoDecodeDpbKHR | "; if ( value & FormatFeatureFlagBits::eAccelerationStructureVertexBufferKHR ) result += "AccelerationStructureVertexBufferKHR | "; if ( value & FormatFeatureFlagBits::eSampledImageFilterCubicEXT ) result += "SampledImageFilterCubicEXT | "; if ( value & FormatFeatureFlagBits::eFragmentDensityMapEXT ) result += "FragmentDensityMapEXT | "; if ( value & FormatFeatureFlagBits::eFragmentShadingRateAttachmentKHR ) result += "FragmentShadingRateAttachmentKHR | "; if ( value & FormatFeatureFlagBits::eVideoEncodeInputKHR ) result += "VideoEncodeInputKHR | "; if ( value & FormatFeatureFlagBits::eVideoEncodeDpbKHR ) result += "VideoEncodeDpbKHR | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( ImageCreateFlags value ) { if ( !value ) return "{}"; std::string result; if ( value & ImageCreateFlagBits::eSparseBinding ) result += "SparseBinding | "; if ( value & ImageCreateFlagBits::eSparseResidency ) result += "SparseResidency | "; if ( value & ImageCreateFlagBits::eSparseAliased ) result += "SparseAliased | "; if ( value & ImageCreateFlagBits::eMutableFormat ) result += "MutableFormat | "; if ( value & ImageCreateFlagBits::eCubeCompatible ) result += "CubeCompatible | "; if ( value & ImageCreateFlagBits::eAlias ) result += "Alias | "; if ( value & ImageCreateFlagBits::eSplitInstanceBindRegions ) result += "SplitInstanceBindRegions | "; if ( value & ImageCreateFlagBits::e2DArrayCompatible ) result += "2DArrayCompatible | "; if ( value & ImageCreateFlagBits::eBlockTexelViewCompatible ) result += "BlockTexelViewCompatible | "; if ( value & ImageCreateFlagBits::eExtendedUsage ) result += "ExtendedUsage | "; if ( value & ImageCreateFlagBits::eProtected ) result += "Protected | "; if ( value & ImageCreateFlagBits::eDisjoint ) result += "Disjoint | "; if ( value & ImageCreateFlagBits::eCornerSampledNV ) result += "CornerSampledNV | "; if ( value & ImageCreateFlagBits::eSampleLocationsCompatibleDepthEXT ) result += "SampleLocationsCompatibleDepthEXT | "; if ( value & ImageCreateFlagBits::eSubsampledEXT ) result += "SubsampledEXT | "; if ( value & ImageCreateFlagBits::eDescriptorBufferCaptureReplayEXT ) result += "DescriptorBufferCaptureReplayEXT | "; if ( value & ImageCreateFlagBits::eMultisampledRenderToSingleSampledEXT ) result += "MultisampledRenderToSingleSampledEXT | "; if ( value & ImageCreateFlagBits::e2DViewCompatibleEXT ) result += "2DViewCompatibleEXT | "; if ( value & ImageCreateFlagBits::eFragmentDensityMapOffsetQCOM ) result += "FragmentDensityMapOffsetQCOM | "; if ( value & ImageCreateFlagBits::eVideoProfileIndependentKHR ) result += "VideoProfileIndependentKHR | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( ImageUsageFlags value ) { if ( !value ) return "{}"; std::string result; if ( value & ImageUsageFlagBits::eTransferSrc ) result += "TransferSrc | "; if ( value & ImageUsageFlagBits::eTransferDst ) result += "TransferDst | "; if ( value & ImageUsageFlagBits::eSampled ) result += "Sampled | "; if ( value & ImageUsageFlagBits::eStorage ) result += "Storage | "; if ( value & ImageUsageFlagBits::eColorAttachment ) result += "ColorAttachment | "; if ( value & ImageUsageFlagBits::eDepthStencilAttachment ) result += "DepthStencilAttachment | "; if ( value & ImageUsageFlagBits::eTransientAttachment ) result += "TransientAttachment | "; if ( value & ImageUsageFlagBits::eInputAttachment ) result += "InputAttachment | "; if ( value & ImageUsageFlagBits::eHostTransfer ) result += "HostTransfer | "; if ( value & ImageUsageFlagBits::eVideoDecodeDstKHR ) result += "VideoDecodeDstKHR | "; if ( value & ImageUsageFlagBits::eVideoDecodeSrcKHR ) result += "VideoDecodeSrcKHR | "; if ( value & ImageUsageFlagBits::eVideoDecodeDpbKHR ) result += "VideoDecodeDpbKHR | "; if ( value & ImageUsageFlagBits::eFragmentDensityMapEXT ) result += "FragmentDensityMapEXT | "; if ( value & ImageUsageFlagBits::eFragmentShadingRateAttachmentKHR ) result += "FragmentShadingRateAttachmentKHR | "; if ( value & ImageUsageFlagBits::eVideoEncodeDstKHR ) result += "VideoEncodeDstKHR | "; if ( value & ImageUsageFlagBits::eVideoEncodeSrcKHR ) result += "VideoEncodeSrcKHR | "; if ( value & ImageUsageFlagBits::eVideoEncodeDpbKHR ) result += "VideoEncodeDpbKHR | "; if ( value & ImageUsageFlagBits::eAttachmentFeedbackLoopEXT ) result += "AttachmentFeedbackLoopEXT | "; if ( value & ImageUsageFlagBits::eInvocationMaskHUAWEI ) result += "InvocationMaskHUAWEI | "; if ( value & ImageUsageFlagBits::eSampleWeightQCOM ) result += "SampleWeightQCOM | "; if ( value & ImageUsageFlagBits::eSampleBlockMatchQCOM ) result += "SampleBlockMatchQCOM | "; if ( value & ImageUsageFlagBits::eVideoEncodeQuantizationDeltaMapKHR ) result += "VideoEncodeQuantizationDeltaMapKHR | "; if ( value & ImageUsageFlagBits::eVideoEncodeEmphasisMapKHR ) result += "VideoEncodeEmphasisMapKHR | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( InstanceCreateFlags value ) { if ( !value ) return "{}"; std::string result; if ( value & InstanceCreateFlagBits::eEnumeratePortabilityKHR ) result += "EnumeratePortabilityKHR | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( MemoryHeapFlags value ) { if ( !value ) return "{}"; std::string result; if ( value & MemoryHeapFlagBits::eDeviceLocal ) result += "DeviceLocal | "; if ( value & MemoryHeapFlagBits::eMultiInstance ) result += "MultiInstance | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( MemoryPropertyFlags value ) { if ( !value ) return "{}"; std::string result; if ( value & MemoryPropertyFlagBits::eDeviceLocal ) result += "DeviceLocal | "; if ( value & MemoryPropertyFlagBits::eHostVisible ) result += "HostVisible | "; if ( value & MemoryPropertyFlagBits::eHostCoherent ) result += "HostCoherent | "; if ( value & MemoryPropertyFlagBits::eHostCached ) result += "HostCached | "; if ( value & MemoryPropertyFlagBits::eLazilyAllocated ) result += "LazilyAllocated | "; if ( value & MemoryPropertyFlagBits::eProtected ) result += "Protected | "; if ( value & MemoryPropertyFlagBits::eDeviceCoherentAMD ) result += "DeviceCoherentAMD | "; if ( value & MemoryPropertyFlagBits::eDeviceUncachedAMD ) result += "DeviceUncachedAMD | "; if ( value & MemoryPropertyFlagBits::eRdmaCapableNV ) result += "RdmaCapableNV | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( QueueFlags value ) { if ( !value ) return "{}"; std::string result; if ( value & QueueFlagBits::eGraphics ) result += "Graphics | "; if ( value & QueueFlagBits::eCompute ) result += "Compute | "; if ( value & QueueFlagBits::eTransfer ) result += "Transfer | "; if ( value & QueueFlagBits::eSparseBinding ) result += "SparseBinding | "; if ( value & QueueFlagBits::eProtected ) result += "Protected | "; if ( value & QueueFlagBits::eVideoDecodeKHR ) result += "VideoDecodeKHR | "; if ( value & QueueFlagBits::eVideoEncodeKHR ) result += "VideoEncodeKHR | "; if ( value & QueueFlagBits::eOpticalFlowNV ) result += "OpticalFlowNV | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( SampleCountFlags value ) { if ( !value ) return "{}"; std::string result; if ( value & SampleCountFlagBits::e1 ) result += "1 | "; if ( value & SampleCountFlagBits::e2 ) result += "2 | "; if ( value & SampleCountFlagBits::e4 ) result += "4 | "; if ( value & SampleCountFlagBits::e8 ) result += "8 | "; if ( value & SampleCountFlagBits::e16 ) result += "16 | "; if ( value & SampleCountFlagBits::e32 ) result += "32 | "; if ( value & SampleCountFlagBits::e64 ) result += "64 | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( DeviceCreateFlags ) { return "{}"; } VULKAN_HPP_INLINE std::string to_string( DeviceQueueCreateFlags value ) { if ( !value ) return "{}"; std::string result; if ( value & DeviceQueueCreateFlagBits::eProtected ) result += "Protected | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( PipelineStageFlags value ) { if ( !value ) return "None"; std::string result; if ( value & PipelineStageFlagBits::eTopOfPipe ) result += "TopOfPipe | "; if ( value & PipelineStageFlagBits::eDrawIndirect ) result += "DrawIndirect | "; if ( value & PipelineStageFlagBits::eVertexInput ) result += "VertexInput | "; if ( value & PipelineStageFlagBits::eVertexShader ) result += "VertexShader | "; if ( value & PipelineStageFlagBits::eTessellationControlShader ) result += "TessellationControlShader | "; if ( value & PipelineStageFlagBits::eTessellationEvaluationShader ) result += "TessellationEvaluationShader | "; if ( value & PipelineStageFlagBits::eGeometryShader ) result += "GeometryShader | "; if ( value & PipelineStageFlagBits::eFragmentShader ) result += "FragmentShader | "; if ( value & PipelineStageFlagBits::eEarlyFragmentTests ) result += "EarlyFragmentTests | "; if ( value & PipelineStageFlagBits::eLateFragmentTests ) result += "LateFragmentTests | "; if ( value & PipelineStageFlagBits::eColorAttachmentOutput ) result += "ColorAttachmentOutput | "; if ( value & PipelineStageFlagBits::eComputeShader ) result += "ComputeShader | "; if ( value & PipelineStageFlagBits::eTransfer ) result += "Transfer | "; if ( value & PipelineStageFlagBits::eBottomOfPipe ) result += "BottomOfPipe | "; if ( value & PipelineStageFlagBits::eHost ) result += "Host | "; if ( value & PipelineStageFlagBits::eAllGraphics ) result += "AllGraphics | "; if ( value & PipelineStageFlagBits::eAllCommands ) result += "AllCommands | "; if ( value & PipelineStageFlagBits::eTransformFeedbackEXT ) result += "TransformFeedbackEXT | "; if ( value & PipelineStageFlagBits::eConditionalRenderingEXT ) result += "ConditionalRenderingEXT | "; if ( value & PipelineStageFlagBits::eAccelerationStructureBuildKHR ) result += "AccelerationStructureBuildKHR | "; if ( value & PipelineStageFlagBits::eRayTracingShaderKHR ) result += "RayTracingShaderKHR | "; if ( value & PipelineStageFlagBits::eFragmentDensityProcessEXT ) result += "FragmentDensityProcessEXT | "; if ( value & PipelineStageFlagBits::eFragmentShadingRateAttachmentKHR ) result += "FragmentShadingRateAttachmentKHR | "; if ( value & PipelineStageFlagBits::eCommandPreprocessNV ) result += "CommandPreprocessNV | "; if ( value & PipelineStageFlagBits::eTaskShaderEXT ) result += "TaskShaderEXT | "; if ( value & PipelineStageFlagBits::eMeshShaderEXT ) result += "MeshShaderEXT | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( MemoryMapFlags value ) { if ( !value ) return "{}"; std::string result; if ( value & MemoryMapFlagBits::ePlacedEXT ) result += "PlacedEXT | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( ImageAspectFlags value ) { if ( !value ) return "None"; std::string result; if ( value & ImageAspectFlagBits::eColor ) result += "Color | "; if ( value & ImageAspectFlagBits::eDepth ) result += "Depth | "; if ( value & ImageAspectFlagBits::eStencil ) result += "Stencil | "; if ( value & ImageAspectFlagBits::eMetadata ) result += "Metadata | "; if ( value & ImageAspectFlagBits::ePlane0 ) result += "Plane0 | "; if ( value & ImageAspectFlagBits::ePlane1 ) result += "Plane1 | "; if ( value & ImageAspectFlagBits::ePlane2 ) result += "Plane2 | "; if ( value & ImageAspectFlagBits::eMemoryPlane0EXT ) result += "MemoryPlane0EXT | "; if ( value & ImageAspectFlagBits::eMemoryPlane1EXT ) result += "MemoryPlane1EXT | "; if ( value & ImageAspectFlagBits::eMemoryPlane2EXT ) result += "MemoryPlane2EXT | "; if ( value & ImageAspectFlagBits::eMemoryPlane3EXT ) result += "MemoryPlane3EXT | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( SparseImageFormatFlags value ) { if ( !value ) return "{}"; std::string result; if ( value & SparseImageFormatFlagBits::eSingleMiptail ) result += "SingleMiptail | "; if ( value & SparseImageFormatFlagBits::eAlignedMipSize ) result += "AlignedMipSize | "; if ( value & SparseImageFormatFlagBits::eNonstandardBlockSize ) result += "NonstandardBlockSize | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( SparseMemoryBindFlags value ) { if ( !value ) return "{}"; std::string result; if ( value & SparseMemoryBindFlagBits::eMetadata ) result += "Metadata | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( FenceCreateFlags value ) { if ( !value ) return "{}"; std::string result; if ( value & FenceCreateFlagBits::eSignaled ) result += "Signaled | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( SemaphoreCreateFlags ) { return "{}"; } VULKAN_HPP_INLINE std::string to_string( EventCreateFlags value ) { if ( !value ) return "{}"; std::string result; if ( value & EventCreateFlagBits::eDeviceOnly ) result += "DeviceOnly | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( QueryPipelineStatisticFlags value ) { if ( !value ) return "{}"; std::string result; if ( value & QueryPipelineStatisticFlagBits::eInputAssemblyVertices ) result += "InputAssemblyVertices | "; if ( value & QueryPipelineStatisticFlagBits::eInputAssemblyPrimitives ) result += "InputAssemblyPrimitives | "; if ( value & QueryPipelineStatisticFlagBits::eVertexShaderInvocations ) result += "VertexShaderInvocations | "; if ( value & QueryPipelineStatisticFlagBits::eGeometryShaderInvocations ) result += "GeometryShaderInvocations | "; if ( value & QueryPipelineStatisticFlagBits::eGeometryShaderPrimitives ) result += "GeometryShaderPrimitives | "; if ( value & QueryPipelineStatisticFlagBits::eClippingInvocations ) result += "ClippingInvocations | "; if ( value & QueryPipelineStatisticFlagBits::eClippingPrimitives ) result += "ClippingPrimitives | "; if ( value & QueryPipelineStatisticFlagBits::eFragmentShaderInvocations ) result += "FragmentShaderInvocations | "; if ( value & QueryPipelineStatisticFlagBits::eTessellationControlShaderPatches ) result += "TessellationControlShaderPatches | "; if ( value & QueryPipelineStatisticFlagBits::eTessellationEvaluationShaderInvocations ) result += "TessellationEvaluationShaderInvocations | "; if ( value & QueryPipelineStatisticFlagBits::eComputeShaderInvocations ) result += "ComputeShaderInvocations | "; if ( value & QueryPipelineStatisticFlagBits::eTaskShaderInvocationsEXT ) result += "TaskShaderInvocationsEXT | "; if ( value & QueryPipelineStatisticFlagBits::eMeshShaderInvocationsEXT ) result += "MeshShaderInvocationsEXT | "; if ( value & QueryPipelineStatisticFlagBits::eClusterCullingShaderInvocationsHUAWEI ) result += "ClusterCullingShaderInvocationsHUAWEI | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( QueryPoolCreateFlags ) { return "{}"; } VULKAN_HPP_INLINE std::string to_string( QueryResultFlags value ) { if ( !value ) return "{}"; std::string result; if ( value & QueryResultFlagBits::e64 ) result += "64 | "; if ( value & QueryResultFlagBits::eWait ) result += "Wait | "; if ( value & QueryResultFlagBits::eWithAvailability ) result += "WithAvailability | "; if ( value & QueryResultFlagBits::ePartial ) result += "Partial | "; if ( value & QueryResultFlagBits::eWithStatusKHR ) result += "WithStatusKHR | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( BufferCreateFlags value ) { if ( !value ) return "{}"; std::string result; if ( value & BufferCreateFlagBits::eSparseBinding ) result += "SparseBinding | "; if ( value & BufferCreateFlagBits::eSparseResidency ) result += "SparseResidency | "; if ( value & BufferCreateFlagBits::eSparseAliased ) result += "SparseAliased | "; if ( value & BufferCreateFlagBits::eProtected ) result += "Protected | "; if ( value & BufferCreateFlagBits::eDeviceAddressCaptureReplay ) result += "DeviceAddressCaptureReplay | "; if ( value & BufferCreateFlagBits::eDescriptorBufferCaptureReplayEXT ) result += "DescriptorBufferCaptureReplayEXT | "; if ( value & BufferCreateFlagBits::eVideoProfileIndependentKHR ) result += "VideoProfileIndependentKHR | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( BufferUsageFlags value ) { if ( !value ) return "{}"; std::string result; if ( value & BufferUsageFlagBits::eTransferSrc ) result += "TransferSrc | "; if ( value & BufferUsageFlagBits::eTransferDst ) result += "TransferDst | "; if ( value & BufferUsageFlagBits::eUniformTexelBuffer ) result += "UniformTexelBuffer | "; if ( value & BufferUsageFlagBits::eStorageTexelBuffer ) result += "StorageTexelBuffer | "; if ( value & BufferUsageFlagBits::eUniformBuffer ) result += "UniformBuffer | "; if ( value & BufferUsageFlagBits::eStorageBuffer ) result += "StorageBuffer | "; if ( value & BufferUsageFlagBits::eIndexBuffer ) result += "IndexBuffer | "; if ( value & BufferUsageFlagBits::eVertexBuffer ) result += "VertexBuffer | "; if ( value & BufferUsageFlagBits::eIndirectBuffer ) result += "IndirectBuffer | "; if ( value & BufferUsageFlagBits::eShaderDeviceAddress ) result += "ShaderDeviceAddress | "; if ( value & BufferUsageFlagBits::eVideoDecodeSrcKHR ) result += "VideoDecodeSrcKHR | "; if ( value & BufferUsageFlagBits::eVideoDecodeDstKHR ) result += "VideoDecodeDstKHR | "; if ( value & BufferUsageFlagBits::eTransformFeedbackBufferEXT ) result += "TransformFeedbackBufferEXT | "; if ( value & BufferUsageFlagBits::eTransformFeedbackCounterBufferEXT ) result += "TransformFeedbackCounterBufferEXT | "; if ( value & BufferUsageFlagBits::eConditionalRenderingEXT ) result += "ConditionalRenderingEXT | "; #if defined( VK_ENABLE_BETA_EXTENSIONS ) if ( value & BufferUsageFlagBits::eExecutionGraphScratchAMDX ) result += "ExecutionGraphScratchAMDX | "; #endif /*VK_ENABLE_BETA_EXTENSIONS*/ if ( value & BufferUsageFlagBits::eAccelerationStructureBuildInputReadOnlyKHR ) result += "AccelerationStructureBuildInputReadOnlyKHR | "; if ( value & BufferUsageFlagBits::eAccelerationStructureStorageKHR ) result += "AccelerationStructureStorageKHR | "; if ( value & BufferUsageFlagBits::eShaderBindingTableKHR ) result += "ShaderBindingTableKHR | "; if ( value & BufferUsageFlagBits::eVideoEncodeDstKHR ) result += "VideoEncodeDstKHR | "; if ( value & BufferUsageFlagBits::eVideoEncodeSrcKHR ) result += "VideoEncodeSrcKHR | "; if ( value & BufferUsageFlagBits::eSamplerDescriptorBufferEXT ) result += "SamplerDescriptorBufferEXT | "; if ( value & BufferUsageFlagBits::eResourceDescriptorBufferEXT ) result += "ResourceDescriptorBufferEXT | "; if ( value & BufferUsageFlagBits::ePushDescriptorsDescriptorBufferEXT ) result += "PushDescriptorsDescriptorBufferEXT | "; if ( value & BufferUsageFlagBits::eMicromapBuildInputReadOnlyEXT ) result += "MicromapBuildInputReadOnlyEXT | "; if ( value & BufferUsageFlagBits::eMicromapStorageEXT ) result += "MicromapStorageEXT | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( BufferViewCreateFlags ) { return "{}"; } VULKAN_HPP_INLINE std::string to_string( ImageViewCreateFlags value ) { if ( !value ) return "{}"; std::string result; if ( value & ImageViewCreateFlagBits::eFragmentDensityMapDynamicEXT ) result += "FragmentDensityMapDynamicEXT | "; if ( value & ImageViewCreateFlagBits::eDescriptorBufferCaptureReplayEXT ) result += "DescriptorBufferCaptureReplayEXT | "; if ( value & ImageViewCreateFlagBits::eFragmentDensityMapDeferredEXT ) result += "FragmentDensityMapDeferredEXT | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( ShaderModuleCreateFlags ) { return "{}"; } VULKAN_HPP_INLINE std::string to_string( PipelineCacheCreateFlags value ) { if ( !value ) return "{}"; std::string result; if ( value & PipelineCacheCreateFlagBits::eExternallySynchronized ) result += "ExternallySynchronized | "; if ( value & PipelineCacheCreateFlagBits::eInternallySynchronizedMergeKHR ) result += "InternallySynchronizedMergeKHR | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( ColorComponentFlags value ) { if ( !value ) return "{}"; std::string result; if ( value & ColorComponentFlagBits::eR ) result += "R | "; if ( value & ColorComponentFlagBits::eG ) result += "G | "; if ( value & ColorComponentFlagBits::eB ) result += "B | "; if ( value & ColorComponentFlagBits::eA ) result += "A | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( CullModeFlags value ) { if ( !value ) return "None"; std::string result; if ( value & CullModeFlagBits::eFront ) result += "Front | "; if ( value & CullModeFlagBits::eBack ) result += "Back | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( PipelineColorBlendStateCreateFlags value ) { if ( !value ) return "{}"; std::string result; if ( value & PipelineColorBlendStateCreateFlagBits::eRasterizationOrderAttachmentAccessEXT ) result += "RasterizationOrderAttachmentAccessEXT | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( PipelineCreateFlags value ) { if ( !value ) return "{}"; std::string result; if ( value & PipelineCreateFlagBits::eDisableOptimization ) result += "DisableOptimization | "; if ( value & PipelineCreateFlagBits::eAllowDerivatives ) result += "AllowDerivatives | "; if ( value & PipelineCreateFlagBits::eDerivative ) result += "Derivative | "; if ( value & PipelineCreateFlagBits::eViewIndexFromDeviceIndex ) result += "ViewIndexFromDeviceIndex | "; if ( value & PipelineCreateFlagBits::eDispatchBase ) result += "DispatchBase | "; if ( value & PipelineCreateFlagBits::eFailOnPipelineCompileRequired ) result += "FailOnPipelineCompileRequired | "; if ( value & PipelineCreateFlagBits::eEarlyReturnOnFailure ) result += "EarlyReturnOnFailure | "; if ( value & PipelineCreateFlagBits::eNoProtectedAccess ) result += "NoProtectedAccess | "; if ( value & PipelineCreateFlagBits::eProtectedAccessOnly ) result += "ProtectedAccessOnly | "; if ( value & PipelineCreateFlagBits::eRayTracingNoNullAnyHitShadersKHR ) result += "RayTracingNoNullAnyHitShadersKHR | "; if ( value & PipelineCreateFlagBits::eRayTracingNoNullClosestHitShadersKHR ) result += "RayTracingNoNullClosestHitShadersKHR | "; if ( value & PipelineCreateFlagBits::eRayTracingNoNullMissShadersKHR ) result += "RayTracingNoNullMissShadersKHR | "; if ( value & PipelineCreateFlagBits::eRayTracingNoNullIntersectionShadersKHR ) result += "RayTracingNoNullIntersectionShadersKHR | "; if ( value & PipelineCreateFlagBits::eRayTracingSkipTrianglesKHR ) result += "RayTracingSkipTrianglesKHR | "; if ( value & PipelineCreateFlagBits::eRayTracingSkipAabbsKHR ) result += "RayTracingSkipAabbsKHR | "; if ( value & PipelineCreateFlagBits::eRayTracingShaderGroupHandleCaptureReplayKHR ) result += "RayTracingShaderGroupHandleCaptureReplayKHR | "; if ( value & PipelineCreateFlagBits::eDeferCompileNV ) result += "DeferCompileNV | "; if ( value & PipelineCreateFlagBits::eRenderingFragmentDensityMapAttachmentEXT ) result += "RenderingFragmentDensityMapAttachmentEXT | "; if ( value & PipelineCreateFlagBits::eRenderingFragmentShadingRateAttachmentKHR ) result += "RenderingFragmentShadingRateAttachmentKHR | "; if ( value & PipelineCreateFlagBits::eCaptureStatisticsKHR ) result += "CaptureStatisticsKHR | "; if ( value & PipelineCreateFlagBits::eCaptureInternalRepresentationsKHR ) result += "CaptureInternalRepresentationsKHR | "; if ( value & PipelineCreateFlagBits::eIndirectBindableNV ) result += "IndirectBindableNV | "; if ( value & PipelineCreateFlagBits::eLibraryKHR ) result += "LibraryKHR | "; if ( value & PipelineCreateFlagBits::eDescriptorBufferEXT ) result += "DescriptorBufferEXT | "; if ( value & PipelineCreateFlagBits::eRetainLinkTimeOptimizationInfoEXT ) result += "RetainLinkTimeOptimizationInfoEXT | "; if ( value & PipelineCreateFlagBits::eLinkTimeOptimizationEXT ) result += "LinkTimeOptimizationEXT | "; if ( value & PipelineCreateFlagBits::eRayTracingAllowMotionNV ) result += "RayTracingAllowMotionNV | "; if ( value & PipelineCreateFlagBits::eColorAttachmentFeedbackLoopEXT ) result += "ColorAttachmentFeedbackLoopEXT | "; if ( value & PipelineCreateFlagBits::eDepthStencilAttachmentFeedbackLoopEXT ) result += "DepthStencilAttachmentFeedbackLoopEXT | "; if ( value & PipelineCreateFlagBits::eRayTracingOpacityMicromapEXT ) result += "RayTracingOpacityMicromapEXT | "; #if defined( VK_ENABLE_BETA_EXTENSIONS ) if ( value & PipelineCreateFlagBits::eRayTracingDisplacementMicromapNV ) result += "RayTracingDisplacementMicromapNV | "; #endif /*VK_ENABLE_BETA_EXTENSIONS*/ return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( PipelineDepthStencilStateCreateFlags value ) { if ( !value ) return "{}"; std::string result; if ( value & PipelineDepthStencilStateCreateFlagBits::eRasterizationOrderAttachmentDepthAccessEXT ) result += "RasterizationOrderAttachmentDepthAccessEXT | "; if ( value & PipelineDepthStencilStateCreateFlagBits::eRasterizationOrderAttachmentStencilAccessEXT ) result += "RasterizationOrderAttachmentStencilAccessEXT | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( PipelineDynamicStateCreateFlags ) { return "{}"; } VULKAN_HPP_INLINE std::string to_string( PipelineInputAssemblyStateCreateFlags ) { return "{}"; } VULKAN_HPP_INLINE std::string to_string( PipelineLayoutCreateFlags value ) { if ( !value ) return "{}"; std::string result; if ( value & PipelineLayoutCreateFlagBits::eIndependentSetsEXT ) result += "IndependentSetsEXT | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( PipelineMultisampleStateCreateFlags ) { return "{}"; } VULKAN_HPP_INLINE std::string to_string( PipelineRasterizationStateCreateFlags ) { return "{}"; } VULKAN_HPP_INLINE std::string to_string( PipelineShaderStageCreateFlags value ) { if ( !value ) return "{}"; std::string result; if ( value & PipelineShaderStageCreateFlagBits::eAllowVaryingSubgroupSize ) result += "AllowVaryingSubgroupSize | "; if ( value & PipelineShaderStageCreateFlagBits::eRequireFullSubgroups ) result += "RequireFullSubgroups | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( PipelineTessellationStateCreateFlags ) { return "{}"; } VULKAN_HPP_INLINE std::string to_string( PipelineVertexInputStateCreateFlags ) { return "{}"; } VULKAN_HPP_INLINE std::string to_string( PipelineViewportStateCreateFlags ) { return "{}"; } VULKAN_HPP_INLINE std::string to_string( ShaderStageFlags value ) { if ( !value ) return "{}"; std::string result; if ( value & ShaderStageFlagBits::eVertex ) result += "Vertex | "; if ( value & ShaderStageFlagBits::eTessellationControl ) result += "TessellationControl | "; if ( value & ShaderStageFlagBits::eTessellationEvaluation ) result += "TessellationEvaluation | "; if ( value & ShaderStageFlagBits::eGeometry ) result += "Geometry | "; if ( value & ShaderStageFlagBits::eFragment ) result += "Fragment | "; if ( value & ShaderStageFlagBits::eCompute ) result += "Compute | "; if ( value & ShaderStageFlagBits::eRaygenKHR ) result += "RaygenKHR | "; if ( value & ShaderStageFlagBits::eAnyHitKHR ) result += "AnyHitKHR | "; if ( value & ShaderStageFlagBits::eClosestHitKHR ) result += "ClosestHitKHR | "; if ( value & ShaderStageFlagBits::eMissKHR ) result += "MissKHR | "; if ( value & ShaderStageFlagBits::eIntersectionKHR ) result += "IntersectionKHR | "; if ( value & ShaderStageFlagBits::eCallableKHR ) result += "CallableKHR | "; if ( value & ShaderStageFlagBits::eTaskEXT ) result += "TaskEXT | "; if ( value & ShaderStageFlagBits::eMeshEXT ) result += "MeshEXT | "; if ( value & ShaderStageFlagBits::eSubpassShadingHUAWEI ) result += "SubpassShadingHUAWEI | "; if ( value & ShaderStageFlagBits::eClusterCullingHUAWEI ) result += "ClusterCullingHUAWEI | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( SamplerCreateFlags value ) { if ( !value ) return "{}"; std::string result; if ( value & SamplerCreateFlagBits::eSubsampledEXT ) result += "SubsampledEXT | "; if ( value & SamplerCreateFlagBits::eSubsampledCoarseReconstructionEXT ) result += "SubsampledCoarseReconstructionEXT | "; if ( value & SamplerCreateFlagBits::eDescriptorBufferCaptureReplayEXT ) result += "DescriptorBufferCaptureReplayEXT | "; if ( value & SamplerCreateFlagBits::eNonSeamlessCubeMapEXT ) result += "NonSeamlessCubeMapEXT | "; if ( value & SamplerCreateFlagBits::eImageProcessingQCOM ) result += "ImageProcessingQCOM | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( DescriptorPoolCreateFlags value ) { if ( !value ) return "{}"; std::string result; if ( value & DescriptorPoolCreateFlagBits::eFreeDescriptorSet ) result += "FreeDescriptorSet | "; if ( value & DescriptorPoolCreateFlagBits::eUpdateAfterBind ) result += "UpdateAfterBind | "; if ( value & DescriptorPoolCreateFlagBits::eHostOnlyEXT ) result += "HostOnlyEXT | "; if ( value & DescriptorPoolCreateFlagBits::eAllowOverallocationSetsNV ) result += "AllowOverallocationSetsNV | "; if ( value & DescriptorPoolCreateFlagBits::eAllowOverallocationPoolsNV ) result += "AllowOverallocationPoolsNV | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( DescriptorPoolResetFlags ) { return "{}"; } VULKAN_HPP_INLINE std::string to_string( DescriptorSetLayoutCreateFlags value ) { if ( !value ) return "{}"; std::string result; if ( value & DescriptorSetLayoutCreateFlagBits::eUpdateAfterBindPool ) result += "UpdateAfterBindPool | "; if ( value & DescriptorSetLayoutCreateFlagBits::ePushDescriptor ) result += "PushDescriptor | "; if ( value & DescriptorSetLayoutCreateFlagBits::eDescriptorBufferEXT ) result += "DescriptorBufferEXT | "; if ( value & DescriptorSetLayoutCreateFlagBits::eEmbeddedImmutableSamplersEXT ) result += "EmbeddedImmutableSamplersEXT | "; if ( value & DescriptorSetLayoutCreateFlagBits::eIndirectBindableNV ) result += "IndirectBindableNV | "; if ( value & DescriptorSetLayoutCreateFlagBits::eHostOnlyPoolEXT ) result += "HostOnlyPoolEXT | "; if ( value & DescriptorSetLayoutCreateFlagBits::ePerStageNV ) result += "PerStageNV | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( AccessFlags value ) { if ( !value ) return "None"; std::string result; if ( value & AccessFlagBits::eIndirectCommandRead ) result += "IndirectCommandRead | "; if ( value & AccessFlagBits::eIndexRead ) result += "IndexRead | "; if ( value & AccessFlagBits::eVertexAttributeRead ) result += "VertexAttributeRead | "; if ( value & AccessFlagBits::eUniformRead ) result += "UniformRead | "; if ( value & AccessFlagBits::eInputAttachmentRead ) result += "InputAttachmentRead | "; if ( value & AccessFlagBits::eShaderRead ) result += "ShaderRead | "; if ( value & AccessFlagBits::eShaderWrite ) result += "ShaderWrite | "; if ( value & AccessFlagBits::eColorAttachmentRead ) result += "ColorAttachmentRead | "; if ( value & AccessFlagBits::eColorAttachmentWrite ) result += "ColorAttachmentWrite | "; if ( value & AccessFlagBits::eDepthStencilAttachmentRead ) result += "DepthStencilAttachmentRead | "; if ( value & AccessFlagBits::eDepthStencilAttachmentWrite ) result += "DepthStencilAttachmentWrite | "; if ( value & AccessFlagBits::eTransferRead ) result += "TransferRead | "; if ( value & AccessFlagBits::eTransferWrite ) result += "TransferWrite | "; if ( value & AccessFlagBits::eHostRead ) result += "HostRead | "; if ( value & AccessFlagBits::eHostWrite ) result += "HostWrite | "; if ( value & AccessFlagBits::eMemoryRead ) result += "MemoryRead | "; if ( value & AccessFlagBits::eMemoryWrite ) result += "MemoryWrite | "; if ( value & AccessFlagBits::eTransformFeedbackWriteEXT ) result += "TransformFeedbackWriteEXT | "; if ( value & AccessFlagBits::eTransformFeedbackCounterReadEXT ) result += "TransformFeedbackCounterReadEXT | "; if ( value & AccessFlagBits::eTransformFeedbackCounterWriteEXT ) result += "TransformFeedbackCounterWriteEXT | "; if ( value & AccessFlagBits::eConditionalRenderingReadEXT ) result += "ConditionalRenderingReadEXT | "; if ( value & AccessFlagBits::eColorAttachmentReadNoncoherentEXT ) result += "ColorAttachmentReadNoncoherentEXT | "; if ( value & AccessFlagBits::eAccelerationStructureReadKHR ) result += "AccelerationStructureReadKHR | "; if ( value & AccessFlagBits::eAccelerationStructureWriteKHR ) result += "AccelerationStructureWriteKHR | "; if ( value & AccessFlagBits::eFragmentDensityMapReadEXT ) result += "FragmentDensityMapReadEXT | "; if ( value & AccessFlagBits::eFragmentShadingRateAttachmentReadKHR ) result += "FragmentShadingRateAttachmentReadKHR | "; if ( value & AccessFlagBits::eCommandPreprocessReadNV ) result += "CommandPreprocessReadNV | "; if ( value & AccessFlagBits::eCommandPreprocessWriteNV ) result += "CommandPreprocessWriteNV | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( AttachmentDescriptionFlags value ) { if ( !value ) return "{}"; std::string result; if ( value & AttachmentDescriptionFlagBits::eMayAlias ) result += "MayAlias | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( DependencyFlags value ) { if ( !value ) return "{}"; std::string result; if ( value & DependencyFlagBits::eByRegion ) result += "ByRegion | "; if ( value & DependencyFlagBits::eDeviceGroup ) result += "DeviceGroup | "; if ( value & DependencyFlagBits::eViewLocal ) result += "ViewLocal | "; if ( value & DependencyFlagBits::eFeedbackLoopEXT ) result += "FeedbackLoopEXT | "; if ( value & DependencyFlagBits::eQueueFamilyOwnershipTransferUseAllStagesKHR ) result += "QueueFamilyOwnershipTransferUseAllStagesKHR | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( FramebufferCreateFlags value ) { if ( !value ) return "{}"; std::string result; if ( value & FramebufferCreateFlagBits::eImageless ) result += "Imageless | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( RenderPassCreateFlags value ) { if ( !value ) return "{}"; std::string result; if ( value & RenderPassCreateFlagBits::eTransformQCOM ) result += "TransformQCOM | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( SubpassDescriptionFlags value ) { if ( !value ) return "{}"; std::string result; if ( value & SubpassDescriptionFlagBits::ePerViewAttributesNVX ) result += "PerViewAttributesNVX | "; if ( value & SubpassDescriptionFlagBits::ePerViewPositionXOnlyNVX ) result += "PerViewPositionXOnlyNVX | "; if ( value & SubpassDescriptionFlagBits::eFragmentRegionQCOM ) result += "FragmentRegionQCOM | "; if ( value & SubpassDescriptionFlagBits::eShaderResolveQCOM ) result += "ShaderResolveQCOM | "; if ( value & SubpassDescriptionFlagBits::eRasterizationOrderAttachmentColorAccessEXT ) result += "RasterizationOrderAttachmentColorAccessEXT | "; if ( value & SubpassDescriptionFlagBits::eRasterizationOrderAttachmentDepthAccessEXT ) result += "RasterizationOrderAttachmentDepthAccessEXT | "; if ( value & SubpassDescriptionFlagBits::eRasterizationOrderAttachmentStencilAccessEXT ) result += "RasterizationOrderAttachmentStencilAccessEXT | "; if ( value & SubpassDescriptionFlagBits::eEnableLegacyDitheringEXT ) result += "EnableLegacyDitheringEXT | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( CommandPoolCreateFlags value ) { if ( !value ) return "{}"; std::string result; if ( value & CommandPoolCreateFlagBits::eTransient ) result += "Transient | "; if ( value & CommandPoolCreateFlagBits::eResetCommandBuffer ) result += "ResetCommandBuffer | "; if ( value & CommandPoolCreateFlagBits::eProtected ) result += "Protected | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( CommandPoolResetFlags value ) { if ( !value ) return "{}"; std::string result; if ( value & CommandPoolResetFlagBits::eReleaseResources ) result += "ReleaseResources | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( CommandBufferResetFlags value ) { if ( !value ) return "{}"; std::string result; if ( value & CommandBufferResetFlagBits::eReleaseResources ) result += "ReleaseResources | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( CommandBufferUsageFlags value ) { if ( !value ) return "{}"; std::string result; if ( value & CommandBufferUsageFlagBits::eOneTimeSubmit ) result += "OneTimeSubmit | "; if ( value & CommandBufferUsageFlagBits::eRenderPassContinue ) result += "RenderPassContinue | "; if ( value & CommandBufferUsageFlagBits::eSimultaneousUse ) result += "SimultaneousUse | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( QueryControlFlags value ) { if ( !value ) return "{}"; std::string result; if ( value & QueryControlFlagBits::ePrecise ) result += "Precise | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( StencilFaceFlags value ) { if ( !value ) return "{}"; std::string result; if ( value & StencilFaceFlagBits::eFront ) result += "Front | "; if ( value & StencilFaceFlagBits::eBack ) result += "Back | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } //=== VK_VERSION_1_1 === VULKAN_HPP_INLINE std::string to_string( SubgroupFeatureFlags value ) { if ( !value ) return "{}"; std::string result; if ( value & SubgroupFeatureFlagBits::eBasic ) result += "Basic | "; if ( value & SubgroupFeatureFlagBits::eVote ) result += "Vote | "; if ( value & SubgroupFeatureFlagBits::eArithmetic ) result += "Arithmetic | "; if ( value & SubgroupFeatureFlagBits::eBallot ) result += "Ballot | "; if ( value & SubgroupFeatureFlagBits::eShuffle ) result += "Shuffle | "; if ( value & SubgroupFeatureFlagBits::eShuffleRelative ) result += "ShuffleRelative | "; if ( value & SubgroupFeatureFlagBits::eClustered ) result += "Clustered | "; if ( value & SubgroupFeatureFlagBits::eQuad ) result += "Quad | "; if ( value & SubgroupFeatureFlagBits::eRotate ) result += "Rotate | "; if ( value & SubgroupFeatureFlagBits::eRotateClustered ) result += "RotateClustered | "; if ( value & SubgroupFeatureFlagBits::ePartitionedNV ) result += "PartitionedNV | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( PeerMemoryFeatureFlags value ) { if ( !value ) return "{}"; std::string result; if ( value & PeerMemoryFeatureFlagBits::eCopySrc ) result += "CopySrc | "; if ( value & PeerMemoryFeatureFlagBits::eCopyDst ) result += "CopyDst | "; if ( value & PeerMemoryFeatureFlagBits::eGenericSrc ) result += "GenericSrc | "; if ( value & PeerMemoryFeatureFlagBits::eGenericDst ) result += "GenericDst | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( MemoryAllocateFlags value ) { if ( !value ) return "{}"; std::string result; if ( value & MemoryAllocateFlagBits::eDeviceMask ) result += "DeviceMask | "; if ( value & MemoryAllocateFlagBits::eDeviceAddress ) result += "DeviceAddress | "; if ( value & MemoryAllocateFlagBits::eDeviceAddressCaptureReplay ) result += "DeviceAddressCaptureReplay | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( CommandPoolTrimFlags ) { return "{}"; } VULKAN_HPP_INLINE std::string to_string( DescriptorUpdateTemplateCreateFlags ) { return "{}"; } VULKAN_HPP_INLINE std::string to_string( ExternalMemoryHandleTypeFlags value ) { if ( !value ) return "{}"; std::string result; if ( value & ExternalMemoryHandleTypeFlagBits::eOpaqueFd ) result += "OpaqueFd | "; if ( value & ExternalMemoryHandleTypeFlagBits::eOpaqueWin32 ) result += "OpaqueWin32 | "; if ( value & ExternalMemoryHandleTypeFlagBits::eOpaqueWin32Kmt ) result += "OpaqueWin32Kmt | "; if ( value & ExternalMemoryHandleTypeFlagBits::eD3D11Texture ) result += "D3D11Texture | "; if ( value & ExternalMemoryHandleTypeFlagBits::eD3D11TextureKmt ) result += "D3D11TextureKmt | "; if ( value & ExternalMemoryHandleTypeFlagBits::eD3D12Heap ) result += "D3D12Heap | "; if ( value & ExternalMemoryHandleTypeFlagBits::eD3D12Resource ) result += "D3D12Resource | "; if ( value & ExternalMemoryHandleTypeFlagBits::eDmaBufEXT ) result += "DmaBufEXT | "; #if defined( VK_USE_PLATFORM_ANDROID_KHR ) if ( value & ExternalMemoryHandleTypeFlagBits::eAndroidHardwareBufferANDROID ) result += "AndroidHardwareBufferANDROID | "; #endif /*VK_USE_PLATFORM_ANDROID_KHR*/ if ( value & ExternalMemoryHandleTypeFlagBits::eHostAllocationEXT ) result += "HostAllocationEXT | "; if ( value & ExternalMemoryHandleTypeFlagBits::eHostMappedForeignMemoryEXT ) result += "HostMappedForeignMemoryEXT | "; #if defined( VK_USE_PLATFORM_FUCHSIA ) if ( value & ExternalMemoryHandleTypeFlagBits::eZirconVmoFUCHSIA ) result += "ZirconVmoFUCHSIA | "; #endif /*VK_USE_PLATFORM_FUCHSIA*/ if ( value & ExternalMemoryHandleTypeFlagBits::eRdmaAddressNV ) result += "RdmaAddressNV | "; #if defined( VK_USE_PLATFORM_SCREEN_QNX ) if ( value & ExternalMemoryHandleTypeFlagBits::eScreenBufferQNX ) result += "ScreenBufferQNX | "; #endif /*VK_USE_PLATFORM_SCREEN_QNX*/ #if defined( VK_USE_PLATFORM_METAL_EXT ) if ( value & ExternalMemoryHandleTypeFlagBits::eMtlbufferEXT ) result += "MtlbufferEXT | "; if ( value & ExternalMemoryHandleTypeFlagBits::eMtltextureEXT ) result += "MtltextureEXT | "; if ( value & ExternalMemoryHandleTypeFlagBits::eMtlheapEXT ) result += "MtlheapEXT | "; #endif /*VK_USE_PLATFORM_METAL_EXT*/ return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( ExternalMemoryFeatureFlags value ) { if ( !value ) return "{}"; std::string result; if ( value & ExternalMemoryFeatureFlagBits::eDedicatedOnly ) result += "DedicatedOnly | "; if ( value & ExternalMemoryFeatureFlagBits::eExportable ) result += "Exportable | "; if ( value & ExternalMemoryFeatureFlagBits::eImportable ) result += "Importable | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( ExternalFenceHandleTypeFlags value ) { if ( !value ) return "{}"; std::string result; if ( value & ExternalFenceHandleTypeFlagBits::eOpaqueFd ) result += "OpaqueFd | "; if ( value & ExternalFenceHandleTypeFlagBits::eOpaqueWin32 ) result += "OpaqueWin32 | "; if ( value & ExternalFenceHandleTypeFlagBits::eOpaqueWin32Kmt ) result += "OpaqueWin32Kmt | "; if ( value & ExternalFenceHandleTypeFlagBits::eSyncFd ) result += "SyncFd | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( ExternalFenceFeatureFlags value ) { if ( !value ) return "{}"; std::string result; if ( value & ExternalFenceFeatureFlagBits::eExportable ) result += "Exportable | "; if ( value & ExternalFenceFeatureFlagBits::eImportable ) result += "Importable | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( FenceImportFlags value ) { if ( !value ) return "{}"; std::string result; if ( value & FenceImportFlagBits::eTemporary ) result += "Temporary | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( SemaphoreImportFlags value ) { if ( !value ) return "{}"; std::string result; if ( value & SemaphoreImportFlagBits::eTemporary ) result += "Temporary | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( ExternalSemaphoreHandleTypeFlags value ) { if ( !value ) return "{}"; std::string result; if ( value & ExternalSemaphoreHandleTypeFlagBits::eOpaqueFd ) result += "OpaqueFd | "; if ( value & ExternalSemaphoreHandleTypeFlagBits::eOpaqueWin32 ) result += "OpaqueWin32 | "; if ( value & ExternalSemaphoreHandleTypeFlagBits::eOpaqueWin32Kmt ) result += "OpaqueWin32Kmt | "; if ( value & ExternalSemaphoreHandleTypeFlagBits::eD3D12Fence ) result += "D3D12Fence | "; if ( value & ExternalSemaphoreHandleTypeFlagBits::eSyncFd ) result += "SyncFd | "; #if defined( VK_USE_PLATFORM_FUCHSIA ) if ( value & ExternalSemaphoreHandleTypeFlagBits::eZirconEventFUCHSIA ) result += "ZirconEventFUCHSIA | "; #endif /*VK_USE_PLATFORM_FUCHSIA*/ return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( ExternalSemaphoreFeatureFlags value ) { if ( !value ) return "{}"; std::string result; if ( value & ExternalSemaphoreFeatureFlagBits::eExportable ) result += "Exportable | "; if ( value & ExternalSemaphoreFeatureFlagBits::eImportable ) result += "Importable | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } //=== VK_VERSION_1_2 === VULKAN_HPP_INLINE std::string to_string( DescriptorBindingFlags value ) { if ( !value ) return "{}"; std::string result; if ( value & DescriptorBindingFlagBits::eUpdateAfterBind ) result += "UpdateAfterBind | "; if ( value & DescriptorBindingFlagBits::eUpdateUnusedWhilePending ) result += "UpdateUnusedWhilePending | "; if ( value & DescriptorBindingFlagBits::ePartiallyBound ) result += "PartiallyBound | "; if ( value & DescriptorBindingFlagBits::eVariableDescriptorCount ) result += "VariableDescriptorCount | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( ResolveModeFlags value ) { if ( !value ) return "None"; std::string result; if ( value & ResolveModeFlagBits::eSampleZero ) result += "SampleZero | "; if ( value & ResolveModeFlagBits::eAverage ) result += "Average | "; if ( value & ResolveModeFlagBits::eMin ) result += "Min | "; if ( value & ResolveModeFlagBits::eMax ) result += "Max | "; #if defined( VK_USE_PLATFORM_ANDROID_KHR ) if ( value & ResolveModeFlagBits::eExternalFormatDownsampleANDROID ) result += "ExternalFormatDownsampleANDROID | "; #endif /*VK_USE_PLATFORM_ANDROID_KHR*/ return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( SemaphoreWaitFlags value ) { if ( !value ) return "{}"; std::string result; if ( value & SemaphoreWaitFlagBits::eAny ) result += "Any | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } //=== VK_VERSION_1_3 === VULKAN_HPP_INLINE std::string to_string( PipelineCreationFeedbackFlags value ) { if ( !value ) return "{}"; std::string result; if ( value & PipelineCreationFeedbackFlagBits::eValid ) result += "Valid | "; if ( value & PipelineCreationFeedbackFlagBits::eApplicationPipelineCacheHit ) result += "ApplicationPipelineCacheHit | "; if ( value & PipelineCreationFeedbackFlagBits::eBasePipelineAcceleration ) result += "BasePipelineAcceleration | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( ToolPurposeFlags value ) { if ( !value ) return "{}"; std::string result; if ( value & ToolPurposeFlagBits::eValidation ) result += "Validation | "; if ( value & ToolPurposeFlagBits::eProfiling ) result += "Profiling | "; if ( value & ToolPurposeFlagBits::eTracing ) result += "Tracing | "; if ( value & ToolPurposeFlagBits::eAdditionalFeatures ) result += "AdditionalFeatures | "; if ( value & ToolPurposeFlagBits::eModifyingFeatures ) result += "ModifyingFeatures | "; if ( value & ToolPurposeFlagBits::eDebugReportingEXT ) result += "DebugReportingEXT | "; if ( value & ToolPurposeFlagBits::eDebugMarkersEXT ) result += "DebugMarkersEXT | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( PrivateDataSlotCreateFlags ) { return "{}"; } VULKAN_HPP_INLINE std::string to_string( PipelineStageFlags2 value ) { if ( !value ) return "None"; std::string result; if ( value & PipelineStageFlagBits2::eTopOfPipe ) result += "TopOfPipe | "; if ( value & PipelineStageFlagBits2::eDrawIndirect ) result += "DrawIndirect | "; if ( value & PipelineStageFlagBits2::eVertexInput ) result += "VertexInput | "; if ( value & PipelineStageFlagBits2::eVertexShader ) result += "VertexShader | "; if ( value & PipelineStageFlagBits2::eTessellationControlShader ) result += "TessellationControlShader | "; if ( value & PipelineStageFlagBits2::eTessellationEvaluationShader ) result += "TessellationEvaluationShader | "; if ( value & PipelineStageFlagBits2::eGeometryShader ) result += "GeometryShader | "; if ( value & PipelineStageFlagBits2::eFragmentShader ) result += "FragmentShader | "; if ( value & PipelineStageFlagBits2::eEarlyFragmentTests ) result += "EarlyFragmentTests | "; if ( value & PipelineStageFlagBits2::eLateFragmentTests ) result += "LateFragmentTests | "; if ( value & PipelineStageFlagBits2::eColorAttachmentOutput ) result += "ColorAttachmentOutput | "; if ( value & PipelineStageFlagBits2::eComputeShader ) result += "ComputeShader | "; if ( value & PipelineStageFlagBits2::eAllTransfer ) result += "AllTransfer | "; if ( value & PipelineStageFlagBits2::eBottomOfPipe ) result += "BottomOfPipe | "; if ( value & PipelineStageFlagBits2::eHost ) result += "Host | "; if ( value & PipelineStageFlagBits2::eAllGraphics ) result += "AllGraphics | "; if ( value & PipelineStageFlagBits2::eAllCommands ) result += "AllCommands | "; if ( value & PipelineStageFlagBits2::eCopy ) result += "Copy | "; if ( value & PipelineStageFlagBits2::eResolve ) result += "Resolve | "; if ( value & PipelineStageFlagBits2::eBlit ) result += "Blit | "; if ( value & PipelineStageFlagBits2::eClear ) result += "Clear | "; if ( value & PipelineStageFlagBits2::eIndexInput ) result += "IndexInput | "; if ( value & PipelineStageFlagBits2::eVertexAttributeInput ) result += "VertexAttributeInput | "; if ( value & PipelineStageFlagBits2::ePreRasterizationShaders ) result += "PreRasterizationShaders | "; if ( value & PipelineStageFlagBits2::eVideoDecodeKHR ) result += "VideoDecodeKHR | "; if ( value & PipelineStageFlagBits2::eVideoEncodeKHR ) result += "VideoEncodeKHR | "; if ( value & PipelineStageFlagBits2::eTransformFeedbackEXT ) result += "TransformFeedbackEXT | "; if ( value & PipelineStageFlagBits2::eConditionalRenderingEXT ) result += "ConditionalRenderingEXT | "; if ( value & PipelineStageFlagBits2::eCommandPreprocessNV ) result += "CommandPreprocessNV | "; if ( value & PipelineStageFlagBits2::eFragmentShadingRateAttachmentKHR ) result += "FragmentShadingRateAttachmentKHR | "; if ( value & PipelineStageFlagBits2::eAccelerationStructureBuildKHR ) result += "AccelerationStructureBuildKHR | "; if ( value & PipelineStageFlagBits2::eRayTracingShaderKHR ) result += "RayTracingShaderKHR | "; if ( value & PipelineStageFlagBits2::eFragmentDensityProcessEXT ) result += "FragmentDensityProcessEXT | "; if ( value & PipelineStageFlagBits2::eTaskShaderEXT ) result += "TaskShaderEXT | "; if ( value & PipelineStageFlagBits2::eMeshShaderEXT ) result += "MeshShaderEXT | "; if ( value & PipelineStageFlagBits2::eSubpassShaderHUAWEI ) result += "SubpassShaderHUAWEI | "; if ( value & PipelineStageFlagBits2::eInvocationMaskHUAWEI ) result += "InvocationMaskHUAWEI | "; if ( value & PipelineStageFlagBits2::eAccelerationStructureCopyKHR ) result += "AccelerationStructureCopyKHR | "; if ( value & PipelineStageFlagBits2::eMicromapBuildEXT ) result += "MicromapBuildEXT | "; if ( value & PipelineStageFlagBits2::eClusterCullingShaderHUAWEI ) result += "ClusterCullingShaderHUAWEI | "; if ( value & PipelineStageFlagBits2::eOpticalFlowNV ) result += "OpticalFlowNV | "; if ( value & PipelineStageFlagBits2::eConvertCooperativeVectorMatrixNV ) result += "ConvertCooperativeVectorMatrixNV | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( AccessFlags2 value ) { if ( !value ) return "None"; std::string result; if ( value & AccessFlagBits2::eIndirectCommandRead ) result += "IndirectCommandRead | "; if ( value & AccessFlagBits2::eIndexRead ) result += "IndexRead | "; if ( value & AccessFlagBits2::eVertexAttributeRead ) result += "VertexAttributeRead | "; if ( value & AccessFlagBits2::eUniformRead ) result += "UniformRead | "; if ( value & AccessFlagBits2::eInputAttachmentRead ) result += "InputAttachmentRead | "; if ( value & AccessFlagBits2::eShaderRead ) result += "ShaderRead | "; if ( value & AccessFlagBits2::eShaderWrite ) result += "ShaderWrite | "; if ( value & AccessFlagBits2::eColorAttachmentRead ) result += "ColorAttachmentRead | "; if ( value & AccessFlagBits2::eColorAttachmentWrite ) result += "ColorAttachmentWrite | "; if ( value & AccessFlagBits2::eDepthStencilAttachmentRead ) result += "DepthStencilAttachmentRead | "; if ( value & AccessFlagBits2::eDepthStencilAttachmentWrite ) result += "DepthStencilAttachmentWrite | "; if ( value & AccessFlagBits2::eTransferRead ) result += "TransferRead | "; if ( value & AccessFlagBits2::eTransferWrite ) result += "TransferWrite | "; if ( value & AccessFlagBits2::eHostRead ) result += "HostRead | "; if ( value & AccessFlagBits2::eHostWrite ) result += "HostWrite | "; if ( value & AccessFlagBits2::eMemoryRead ) result += "MemoryRead | "; if ( value & AccessFlagBits2::eMemoryWrite ) result += "MemoryWrite | "; if ( value & AccessFlagBits2::eShaderSampledRead ) result += "ShaderSampledRead | "; if ( value & AccessFlagBits2::eShaderStorageRead ) result += "ShaderStorageRead | "; if ( value & AccessFlagBits2::eShaderStorageWrite ) result += "ShaderStorageWrite | "; if ( value & AccessFlagBits2::eVideoDecodeReadKHR ) result += "VideoDecodeReadKHR | "; if ( value & AccessFlagBits2::eVideoDecodeWriteKHR ) result += "VideoDecodeWriteKHR | "; if ( value & AccessFlagBits2::eVideoEncodeReadKHR ) result += "VideoEncodeReadKHR | "; if ( value & AccessFlagBits2::eVideoEncodeWriteKHR ) result += "VideoEncodeWriteKHR | "; if ( value & AccessFlagBits2::eTransformFeedbackWriteEXT ) result += "TransformFeedbackWriteEXT | "; if ( value & AccessFlagBits2::eTransformFeedbackCounterReadEXT ) result += "TransformFeedbackCounterReadEXT | "; if ( value & AccessFlagBits2::eTransformFeedbackCounterWriteEXT ) result += "TransformFeedbackCounterWriteEXT | "; if ( value & AccessFlagBits2::eConditionalRenderingReadEXT ) result += "ConditionalRenderingReadEXT | "; if ( value & AccessFlagBits2::eCommandPreprocessReadNV ) result += "CommandPreprocessReadNV | "; if ( value & AccessFlagBits2::eCommandPreprocessWriteNV ) result += "CommandPreprocessWriteNV | "; if ( value & AccessFlagBits2::eFragmentShadingRateAttachmentReadKHR ) result += "FragmentShadingRateAttachmentReadKHR | "; if ( value & AccessFlagBits2::eAccelerationStructureReadKHR ) result += "AccelerationStructureReadKHR | "; if ( value & AccessFlagBits2::eAccelerationStructureWriteKHR ) result += "AccelerationStructureWriteKHR | "; if ( value & AccessFlagBits2::eFragmentDensityMapReadEXT ) result += "FragmentDensityMapReadEXT | "; if ( value & AccessFlagBits2::eColorAttachmentReadNoncoherentEXT ) result += "ColorAttachmentReadNoncoherentEXT | "; if ( value & AccessFlagBits2::eDescriptorBufferReadEXT ) result += "DescriptorBufferReadEXT | "; if ( value & AccessFlagBits2::eInvocationMaskReadHUAWEI ) result += "InvocationMaskReadHUAWEI | "; if ( value & AccessFlagBits2::eShaderBindingTableReadKHR ) result += "ShaderBindingTableReadKHR | "; if ( value & AccessFlagBits2::eMicromapReadEXT ) result += "MicromapReadEXT | "; if ( value & AccessFlagBits2::eMicromapWriteEXT ) result += "MicromapWriteEXT | "; if ( value & AccessFlagBits2::eOpticalFlowReadNV ) result += "OpticalFlowReadNV | "; if ( value & AccessFlagBits2::eOpticalFlowWriteNV ) result += "OpticalFlowWriteNV | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( SubmitFlags value ) { if ( !value ) return "{}"; std::string result; if ( value & SubmitFlagBits::eProtected ) result += "Protected | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( RenderingFlags value ) { if ( !value ) return "{}"; std::string result; if ( value & RenderingFlagBits::eContentsSecondaryCommandBuffers ) result += "ContentsSecondaryCommandBuffers | "; if ( value & RenderingFlagBits::eSuspending ) result += "Suspending | "; if ( value & RenderingFlagBits::eResuming ) result += "Resuming | "; if ( value & RenderingFlagBits::eEnableLegacyDitheringEXT ) result += "EnableLegacyDitheringEXT | "; if ( value & RenderingFlagBits::eContentsInlineKHR ) result += "ContentsInlineKHR | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( FormatFeatureFlags2 value ) { if ( !value ) return "{}"; std::string result; if ( value & FormatFeatureFlagBits2::eSampledImage ) result += "SampledImage | "; if ( value & FormatFeatureFlagBits2::eStorageImage ) result += "StorageImage | "; if ( value & FormatFeatureFlagBits2::eStorageImageAtomic ) result += "StorageImageAtomic | "; if ( value & FormatFeatureFlagBits2::eUniformTexelBuffer ) result += "UniformTexelBuffer | "; if ( value & FormatFeatureFlagBits2::eStorageTexelBuffer ) result += "StorageTexelBuffer | "; if ( value & FormatFeatureFlagBits2::eStorageTexelBufferAtomic ) result += "StorageTexelBufferAtomic | "; if ( value & FormatFeatureFlagBits2::eVertexBuffer ) result += "VertexBuffer | "; if ( value & FormatFeatureFlagBits2::eColorAttachment ) result += "ColorAttachment | "; if ( value & FormatFeatureFlagBits2::eColorAttachmentBlend ) result += "ColorAttachmentBlend | "; if ( value & FormatFeatureFlagBits2::eDepthStencilAttachment ) result += "DepthStencilAttachment | "; if ( value & FormatFeatureFlagBits2::eBlitSrc ) result += "BlitSrc | "; if ( value & FormatFeatureFlagBits2::eBlitDst ) result += "BlitDst | "; if ( value & FormatFeatureFlagBits2::eSampledImageFilterLinear ) result += "SampledImageFilterLinear | "; if ( value & FormatFeatureFlagBits2::eTransferSrc ) result += "TransferSrc | "; if ( value & FormatFeatureFlagBits2::eTransferDst ) result += "TransferDst | "; if ( value & FormatFeatureFlagBits2::eSampledImageFilterMinmax ) result += "SampledImageFilterMinmax | "; if ( value & FormatFeatureFlagBits2::eMidpointChromaSamples ) result += "MidpointChromaSamples | "; if ( value & FormatFeatureFlagBits2::eSampledImageYcbcrConversionLinearFilter ) result += "SampledImageYcbcrConversionLinearFilter | "; if ( value & FormatFeatureFlagBits2::eSampledImageYcbcrConversionSeparateReconstructionFilter ) result += "SampledImageYcbcrConversionSeparateReconstructionFilter | "; if ( value & FormatFeatureFlagBits2::eSampledImageYcbcrConversionChromaReconstructionExplicit ) result += "SampledImageYcbcrConversionChromaReconstructionExplicit | "; if ( value & FormatFeatureFlagBits2::eSampledImageYcbcrConversionChromaReconstructionExplicitForceable ) result += "SampledImageYcbcrConversionChromaReconstructionExplicitForceable | "; if ( value & FormatFeatureFlagBits2::eDisjoint ) result += "Disjoint | "; if ( value & FormatFeatureFlagBits2::eCositedChromaSamples ) result += "CositedChromaSamples | "; if ( value & FormatFeatureFlagBits2::eStorageReadWithoutFormat ) result += "StorageReadWithoutFormat | "; if ( value & FormatFeatureFlagBits2::eStorageWriteWithoutFormat ) result += "StorageWriteWithoutFormat | "; if ( value & FormatFeatureFlagBits2::eSampledImageDepthComparison ) result += "SampledImageDepthComparison | "; if ( value & FormatFeatureFlagBits2::eSampledImageFilterCubic ) result += "SampledImageFilterCubic | "; if ( value & FormatFeatureFlagBits2::eHostImageTransfer ) result += "HostImageTransfer | "; if ( value & FormatFeatureFlagBits2::eVideoDecodeOutputKHR ) result += "VideoDecodeOutputKHR | "; if ( value & FormatFeatureFlagBits2::eVideoDecodeDpbKHR ) result += "VideoDecodeDpbKHR | "; if ( value & FormatFeatureFlagBits2::eAccelerationStructureVertexBufferKHR ) result += "AccelerationStructureVertexBufferKHR | "; if ( value & FormatFeatureFlagBits2::eFragmentDensityMapEXT ) result += "FragmentDensityMapEXT | "; if ( value & FormatFeatureFlagBits2::eFragmentShadingRateAttachmentKHR ) result += "FragmentShadingRateAttachmentKHR | "; if ( value & FormatFeatureFlagBits2::eVideoEncodeInputKHR ) result += "VideoEncodeInputKHR | "; if ( value & FormatFeatureFlagBits2::eVideoEncodeDpbKHR ) result += "VideoEncodeDpbKHR | "; if ( value & FormatFeatureFlagBits2::eAccelerationStructureRadiusBufferNV ) result += "AccelerationStructureRadiusBufferNV | "; if ( value & FormatFeatureFlagBits2::eLinearColorAttachmentNV ) result += "LinearColorAttachmentNV | "; if ( value & FormatFeatureFlagBits2::eWeightImageQCOM ) result += "WeightImageQCOM | "; if ( value & FormatFeatureFlagBits2::eWeightSampledImageQCOM ) result += "WeightSampledImageQCOM | "; if ( value & FormatFeatureFlagBits2::eBlockMatchingQCOM ) result += "BlockMatchingQCOM | "; if ( value & FormatFeatureFlagBits2::eBoxFilterSampledQCOM ) result += "BoxFilterSampledQCOM | "; if ( value & FormatFeatureFlagBits2::eOpticalFlowImageNV ) result += "OpticalFlowImageNV | "; if ( value & FormatFeatureFlagBits2::eOpticalFlowVectorNV ) result += "OpticalFlowVectorNV | "; if ( value & FormatFeatureFlagBits2::eOpticalFlowCostNV ) result += "OpticalFlowCostNV | "; if ( value & FormatFeatureFlagBits2::eVideoEncodeQuantizationDeltaMapKHR ) result += "VideoEncodeQuantizationDeltaMapKHR | "; if ( value & FormatFeatureFlagBits2::eVideoEncodeEmphasisMapKHR ) result += "VideoEncodeEmphasisMapKHR | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } //=== VK_VERSION_1_4 === VULKAN_HPP_INLINE std::string to_string( MemoryUnmapFlags value ) { if ( !value ) return "{}"; std::string result; if ( value & MemoryUnmapFlagBits::eReserveEXT ) result += "ReserveEXT | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( PipelineCreateFlags2 value ) { if ( !value ) return "{}"; std::string result; if ( value & PipelineCreateFlagBits2::eDisableOptimization ) result += "DisableOptimization | "; if ( value & PipelineCreateFlagBits2::eAllowDerivatives ) result += "AllowDerivatives | "; if ( value & PipelineCreateFlagBits2::eDerivative ) result += "Derivative | "; if ( value & PipelineCreateFlagBits2::eViewIndexFromDeviceIndex ) result += "ViewIndexFromDeviceIndex | "; if ( value & PipelineCreateFlagBits2::eDispatchBase ) result += "DispatchBase | "; if ( value & PipelineCreateFlagBits2::eFailOnPipelineCompileRequired ) result += "FailOnPipelineCompileRequired | "; if ( value & PipelineCreateFlagBits2::eEarlyReturnOnFailure ) result += "EarlyReturnOnFailure | "; if ( value & PipelineCreateFlagBits2::eNoProtectedAccess ) result += "NoProtectedAccess | "; if ( value & PipelineCreateFlagBits2::eProtectedAccessOnly ) result += "ProtectedAccessOnly | "; #if defined( VK_ENABLE_BETA_EXTENSIONS ) if ( value & PipelineCreateFlagBits2::eExecutionGraphAMDX ) result += "ExecutionGraphAMDX | "; #endif /*VK_ENABLE_BETA_EXTENSIONS*/ if ( value & PipelineCreateFlagBits2::eRayTracingAllowSpheresAndLinearSweptSpheresNV ) result += "RayTracingAllowSpheresAndLinearSweptSpheresNV | "; if ( value & PipelineCreateFlagBits2::eEnableLegacyDitheringEXT ) result += "EnableLegacyDitheringEXT | "; if ( value & PipelineCreateFlagBits2::eDeferCompileNV ) result += "DeferCompileNV | "; if ( value & PipelineCreateFlagBits2::eCaptureStatisticsKHR ) result += "CaptureStatisticsKHR | "; if ( value & PipelineCreateFlagBits2::eCaptureInternalRepresentationsKHR ) result += "CaptureInternalRepresentationsKHR | "; if ( value & PipelineCreateFlagBits2::eLinkTimeOptimizationEXT ) result += "LinkTimeOptimizationEXT | "; if ( value & PipelineCreateFlagBits2::eRetainLinkTimeOptimizationInfoEXT ) result += "RetainLinkTimeOptimizationInfoEXT | "; if ( value & PipelineCreateFlagBits2::eLibraryKHR ) result += "LibraryKHR | "; if ( value & PipelineCreateFlagBits2::eRayTracingSkipTrianglesKHR ) result += "RayTracingSkipTrianglesKHR | "; if ( value & PipelineCreateFlagBits2::eRayTracingSkipAabbsKHR ) result += "RayTracingSkipAabbsKHR | "; if ( value & PipelineCreateFlagBits2::eRayTracingNoNullAnyHitShadersKHR ) result += "RayTracingNoNullAnyHitShadersKHR | "; if ( value & PipelineCreateFlagBits2::eRayTracingNoNullClosestHitShadersKHR ) result += "RayTracingNoNullClosestHitShadersKHR | "; if ( value & PipelineCreateFlagBits2::eRayTracingNoNullMissShadersKHR ) result += "RayTracingNoNullMissShadersKHR | "; if ( value & PipelineCreateFlagBits2::eRayTracingNoNullIntersectionShadersKHR ) result += "RayTracingNoNullIntersectionShadersKHR | "; if ( value & PipelineCreateFlagBits2::eRayTracingShaderGroupHandleCaptureReplayKHR ) result += "RayTracingShaderGroupHandleCaptureReplayKHR | "; if ( value & PipelineCreateFlagBits2::eIndirectBindableNV ) result += "IndirectBindableNV | "; if ( value & PipelineCreateFlagBits2::eRayTracingAllowMotionNV ) result += "RayTracingAllowMotionNV | "; if ( value & PipelineCreateFlagBits2::eRenderingFragmentShadingRateAttachmentKHR ) result += "RenderingFragmentShadingRateAttachmentKHR | "; if ( value & PipelineCreateFlagBits2::eRenderingFragmentDensityMapAttachmentEXT ) result += "RenderingFragmentDensityMapAttachmentEXT | "; if ( value & PipelineCreateFlagBits2::eRayTracingOpacityMicromapEXT ) result += "RayTracingOpacityMicromapEXT | "; if ( value & PipelineCreateFlagBits2::eColorAttachmentFeedbackLoopEXT ) result += "ColorAttachmentFeedbackLoopEXT | "; if ( value & PipelineCreateFlagBits2::eDepthStencilAttachmentFeedbackLoopEXT ) result += "DepthStencilAttachmentFeedbackLoopEXT | "; if ( value & PipelineCreateFlagBits2::eRayTracingDisplacementMicromapNV ) result += "RayTracingDisplacementMicromapNV | "; if ( value & PipelineCreateFlagBits2::eDescriptorBufferEXT ) result += "DescriptorBufferEXT | "; if ( value & PipelineCreateFlagBits2::eDisallowOpacityMicromapARM ) result += "DisallowOpacityMicromapARM | "; if ( value & PipelineCreateFlagBits2::eCaptureDataKHR ) result += "CaptureDataKHR | "; if ( value & PipelineCreateFlagBits2::eIndirectBindableEXT ) result += "IndirectBindableEXT | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( BufferUsageFlags2 value ) { if ( !value ) return "{}"; std::string result; if ( value & BufferUsageFlagBits2::eTransferSrc ) result += "TransferSrc | "; if ( value & BufferUsageFlagBits2::eTransferDst ) result += "TransferDst | "; if ( value & BufferUsageFlagBits2::eUniformTexelBuffer ) result += "UniformTexelBuffer | "; if ( value & BufferUsageFlagBits2::eStorageTexelBuffer ) result += "StorageTexelBuffer | "; if ( value & BufferUsageFlagBits2::eUniformBuffer ) result += "UniformBuffer | "; if ( value & BufferUsageFlagBits2::eStorageBuffer ) result += "StorageBuffer | "; if ( value & BufferUsageFlagBits2::eIndexBuffer ) result += "IndexBuffer | "; if ( value & BufferUsageFlagBits2::eVertexBuffer ) result += "VertexBuffer | "; if ( value & BufferUsageFlagBits2::eIndirectBuffer ) result += "IndirectBuffer | "; if ( value & BufferUsageFlagBits2::eShaderDeviceAddress ) result += "ShaderDeviceAddress | "; #if defined( VK_ENABLE_BETA_EXTENSIONS ) if ( value & BufferUsageFlagBits2::eExecutionGraphScratchAMDX ) result += "ExecutionGraphScratchAMDX | "; #endif /*VK_ENABLE_BETA_EXTENSIONS*/ if ( value & BufferUsageFlagBits2::eConditionalRenderingEXT ) result += "ConditionalRenderingEXT | "; if ( value & BufferUsageFlagBits2::eShaderBindingTableKHR ) result += "ShaderBindingTableKHR | "; if ( value & BufferUsageFlagBits2::eTransformFeedbackBufferEXT ) result += "TransformFeedbackBufferEXT | "; if ( value & BufferUsageFlagBits2::eTransformFeedbackCounterBufferEXT ) result += "TransformFeedbackCounterBufferEXT | "; if ( value & BufferUsageFlagBits2::eVideoDecodeSrcKHR ) result += "VideoDecodeSrcKHR | "; if ( value & BufferUsageFlagBits2::eVideoDecodeDstKHR ) result += "VideoDecodeDstKHR | "; if ( value & BufferUsageFlagBits2::eVideoEncodeDstKHR ) result += "VideoEncodeDstKHR | "; if ( value & BufferUsageFlagBits2::eVideoEncodeSrcKHR ) result += "VideoEncodeSrcKHR | "; if ( value & BufferUsageFlagBits2::eAccelerationStructureBuildInputReadOnlyKHR ) result += "AccelerationStructureBuildInputReadOnlyKHR | "; if ( value & BufferUsageFlagBits2::eAccelerationStructureStorageKHR ) result += "AccelerationStructureStorageKHR | "; if ( value & BufferUsageFlagBits2::eSamplerDescriptorBufferEXT ) result += "SamplerDescriptorBufferEXT | "; if ( value & BufferUsageFlagBits2::eResourceDescriptorBufferEXT ) result += "ResourceDescriptorBufferEXT | "; if ( value & BufferUsageFlagBits2::ePushDescriptorsDescriptorBufferEXT ) result += "PushDescriptorsDescriptorBufferEXT | "; if ( value & BufferUsageFlagBits2::eMicromapBuildInputReadOnlyEXT ) result += "MicromapBuildInputReadOnlyEXT | "; if ( value & BufferUsageFlagBits2::eMicromapStorageEXT ) result += "MicromapStorageEXT | "; if ( value & BufferUsageFlagBits2::ePreprocessBufferEXT ) result += "PreprocessBufferEXT | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( HostImageCopyFlags value ) { if ( !value ) return "{}"; std::string result; if ( value & HostImageCopyFlagBits::eMemcpy ) result += "Memcpy | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } //=== VK_KHR_surface === VULKAN_HPP_INLINE std::string to_string( CompositeAlphaFlagsKHR value ) { if ( !value ) return "{}"; std::string result; if ( value & CompositeAlphaFlagBitsKHR::eOpaque ) result += "Opaque | "; if ( value & CompositeAlphaFlagBitsKHR::ePreMultiplied ) result += "PreMultiplied | "; if ( value & CompositeAlphaFlagBitsKHR::ePostMultiplied ) result += "PostMultiplied | "; if ( value & CompositeAlphaFlagBitsKHR::eInherit ) result += "Inherit | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } //=== VK_KHR_swapchain === VULKAN_HPP_INLINE std::string to_string( SwapchainCreateFlagsKHR value ) { if ( !value ) return "{}"; std::string result; if ( value & SwapchainCreateFlagBitsKHR::eSplitInstanceBindRegions ) result += "SplitInstanceBindRegions | "; if ( value & SwapchainCreateFlagBitsKHR::eProtected ) result += "Protected | "; if ( value & SwapchainCreateFlagBitsKHR::eMutableFormat ) result += "MutableFormat | "; if ( value & SwapchainCreateFlagBitsKHR::eDeferredMemoryAllocationEXT ) result += "DeferredMemoryAllocationEXT | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( DeviceGroupPresentModeFlagsKHR value ) { if ( !value ) return "{}"; std::string result; if ( value & DeviceGroupPresentModeFlagBitsKHR::eLocal ) result += "Local | "; if ( value & DeviceGroupPresentModeFlagBitsKHR::eRemote ) result += "Remote | "; if ( value & DeviceGroupPresentModeFlagBitsKHR::eSum ) result += "Sum | "; if ( value & DeviceGroupPresentModeFlagBitsKHR::eLocalMultiDevice ) result += "LocalMultiDevice | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } //=== VK_KHR_display === VULKAN_HPP_INLINE std::string to_string( DisplayModeCreateFlagsKHR ) { return "{}"; } VULKAN_HPP_INLINE std::string to_string( DisplayPlaneAlphaFlagsKHR value ) { if ( !value ) return "{}"; std::string result; if ( value & DisplayPlaneAlphaFlagBitsKHR::eOpaque ) result += "Opaque | "; if ( value & DisplayPlaneAlphaFlagBitsKHR::eGlobal ) result += "Global | "; if ( value & DisplayPlaneAlphaFlagBitsKHR::ePerPixel ) result += "PerPixel | "; if ( value & DisplayPlaneAlphaFlagBitsKHR::ePerPixelPremultiplied ) result += "PerPixelPremultiplied | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( DisplaySurfaceCreateFlagsKHR ) { return "{}"; } VULKAN_HPP_INLINE std::string to_string( SurfaceTransformFlagsKHR value ) { if ( !value ) return "{}"; std::string result; if ( value & SurfaceTransformFlagBitsKHR::eIdentity ) result += "Identity | "; if ( value & SurfaceTransformFlagBitsKHR::eRotate90 ) result += "Rotate90 | "; if ( value & SurfaceTransformFlagBitsKHR::eRotate180 ) result += "Rotate180 | "; if ( value & SurfaceTransformFlagBitsKHR::eRotate270 ) result += "Rotate270 | "; if ( value & SurfaceTransformFlagBitsKHR::eHorizontalMirror ) result += "HorizontalMirror | "; if ( value & SurfaceTransformFlagBitsKHR::eHorizontalMirrorRotate90 ) result += "HorizontalMirrorRotate90 | "; if ( value & SurfaceTransformFlagBitsKHR::eHorizontalMirrorRotate180 ) result += "HorizontalMirrorRotate180 | "; if ( value & SurfaceTransformFlagBitsKHR::eHorizontalMirrorRotate270 ) result += "HorizontalMirrorRotate270 | "; if ( value & SurfaceTransformFlagBitsKHR::eInherit ) result += "Inherit | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } #if defined( VK_USE_PLATFORM_XLIB_KHR ) //=== VK_KHR_xlib_surface === VULKAN_HPP_INLINE std::string to_string( XlibSurfaceCreateFlagsKHR ) { return "{}"; } #endif /*VK_USE_PLATFORM_XLIB_KHR*/ #if defined( VK_USE_PLATFORM_XCB_KHR ) //=== VK_KHR_xcb_surface === VULKAN_HPP_INLINE std::string to_string( XcbSurfaceCreateFlagsKHR ) { return "{}"; } #endif /*VK_USE_PLATFORM_XCB_KHR*/ #if defined( VK_USE_PLATFORM_WAYLAND_KHR ) //=== VK_KHR_wayland_surface === VULKAN_HPP_INLINE std::string to_string( WaylandSurfaceCreateFlagsKHR ) { return "{}"; } #endif /*VK_USE_PLATFORM_WAYLAND_KHR*/ #if defined( VK_USE_PLATFORM_ANDROID_KHR ) //=== VK_KHR_android_surface === VULKAN_HPP_INLINE std::string to_string( AndroidSurfaceCreateFlagsKHR ) { return "{}"; } #endif /*VK_USE_PLATFORM_ANDROID_KHR*/ #if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_KHR_win32_surface === VULKAN_HPP_INLINE std::string to_string( Win32SurfaceCreateFlagsKHR ) { return "{}"; } #endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_EXT_debug_report === VULKAN_HPP_INLINE std::string to_string( DebugReportFlagsEXT value ) { if ( !value ) return "{}"; std::string result; if ( value & DebugReportFlagBitsEXT::eInformation ) result += "Information | "; if ( value & DebugReportFlagBitsEXT::eWarning ) result += "Warning | "; if ( value & DebugReportFlagBitsEXT::ePerformanceWarning ) result += "PerformanceWarning | "; if ( value & DebugReportFlagBitsEXT::eError ) result += "Error | "; if ( value & DebugReportFlagBitsEXT::eDebug ) result += "Debug | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } //=== VK_KHR_video_queue === VULKAN_HPP_INLINE std::string to_string( VideoCodecOperationFlagsKHR value ) { if ( !value ) return "None"; std::string result; if ( value & VideoCodecOperationFlagBitsKHR::eEncodeH264 ) result += "EncodeH264 | "; if ( value & VideoCodecOperationFlagBitsKHR::eEncodeH265 ) result += "EncodeH265 | "; if ( value & VideoCodecOperationFlagBitsKHR::eDecodeH264 ) result += "DecodeH264 | "; if ( value & VideoCodecOperationFlagBitsKHR::eDecodeH265 ) result += "DecodeH265 | "; if ( value & VideoCodecOperationFlagBitsKHR::eDecodeAv1 ) result += "DecodeAv1 | "; if ( value & VideoCodecOperationFlagBitsKHR::eEncodeAv1 ) result += "EncodeAv1 | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( VideoChromaSubsamplingFlagsKHR value ) { if ( !value ) return "Invalid"; std::string result; if ( value & VideoChromaSubsamplingFlagBitsKHR::eMonochrome ) result += "Monochrome | "; if ( value & VideoChromaSubsamplingFlagBitsKHR::e420 ) result += "420 | "; if ( value & VideoChromaSubsamplingFlagBitsKHR::e422 ) result += "422 | "; if ( value & VideoChromaSubsamplingFlagBitsKHR::e444 ) result += "444 | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( VideoComponentBitDepthFlagsKHR value ) { if ( !value ) return "Invalid"; std::string result; if ( value & VideoComponentBitDepthFlagBitsKHR::e8 ) result += "8 | "; if ( value & VideoComponentBitDepthFlagBitsKHR::e10 ) result += "10 | "; if ( value & VideoComponentBitDepthFlagBitsKHR::e12 ) result += "12 | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( VideoCapabilityFlagsKHR value ) { if ( !value ) return "{}"; std::string result; if ( value & VideoCapabilityFlagBitsKHR::eProtectedContent ) result += "ProtectedContent | "; if ( value & VideoCapabilityFlagBitsKHR::eSeparateReferenceImages ) result += "SeparateReferenceImages | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( VideoSessionCreateFlagsKHR value ) { if ( !value ) return "{}"; std::string result; if ( value & VideoSessionCreateFlagBitsKHR::eProtectedContent ) result += "ProtectedContent | "; if ( value & VideoSessionCreateFlagBitsKHR::eAllowEncodeParameterOptimizations ) result += "AllowEncodeParameterOptimizations | "; if ( value & VideoSessionCreateFlagBitsKHR::eInlineQueries ) result += "InlineQueries | "; if ( value & VideoSessionCreateFlagBitsKHR::eAllowEncodeQuantizationDeltaMap ) result += "AllowEncodeQuantizationDeltaMap | "; if ( value & VideoSessionCreateFlagBitsKHR::eAllowEncodeEmphasisMap ) result += "AllowEncodeEmphasisMap | "; if ( value & VideoSessionCreateFlagBitsKHR::eInlineSessionParameters ) result += "InlineSessionParameters | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( VideoSessionParametersCreateFlagsKHR value ) { if ( !value ) return "{}"; std::string result; if ( value & VideoSessionParametersCreateFlagBitsKHR::eQuantizationMapCompatible ) result += "QuantizationMapCompatible | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( VideoBeginCodingFlagsKHR ) { return "{}"; } VULKAN_HPP_INLINE std::string to_string( VideoEndCodingFlagsKHR ) { return "{}"; } VULKAN_HPP_INLINE std::string to_string( VideoCodingControlFlagsKHR value ) { if ( !value ) return "{}"; std::string result; if ( value & VideoCodingControlFlagBitsKHR::eReset ) result += "Reset | "; if ( value & VideoCodingControlFlagBitsKHR::eEncodeRateControl ) result += "EncodeRateControl | "; if ( value & VideoCodingControlFlagBitsKHR::eEncodeQualityLevel ) result += "EncodeQualityLevel | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } //=== VK_KHR_video_decode_queue === VULKAN_HPP_INLINE std::string to_string( VideoDecodeCapabilityFlagsKHR value ) { if ( !value ) return "{}"; std::string result; if ( value & VideoDecodeCapabilityFlagBitsKHR::eDpbAndOutputCoincide ) result += "DpbAndOutputCoincide | "; if ( value & VideoDecodeCapabilityFlagBitsKHR::eDpbAndOutputDistinct ) result += "DpbAndOutputDistinct | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( VideoDecodeUsageFlagsKHR value ) { if ( !value ) return "Default"; std::string result; if ( value & VideoDecodeUsageFlagBitsKHR::eTranscoding ) result += "Transcoding | "; if ( value & VideoDecodeUsageFlagBitsKHR::eOffline ) result += "Offline | "; if ( value & VideoDecodeUsageFlagBitsKHR::eStreaming ) result += "Streaming | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( VideoDecodeFlagsKHR ) { return "{}"; } //=== VK_EXT_transform_feedback === VULKAN_HPP_INLINE std::string to_string( PipelineRasterizationStateStreamCreateFlagsEXT ) { return "{}"; } //=== VK_KHR_video_encode_h264 === VULKAN_HPP_INLINE std::string to_string( VideoEncodeH264CapabilityFlagsKHR value ) { if ( !value ) return "{}"; std::string result; if ( value & VideoEncodeH264CapabilityFlagBitsKHR::eHrdCompliance ) result += "HrdCompliance | "; if ( value & VideoEncodeH264CapabilityFlagBitsKHR::ePredictionWeightTableGenerated ) result += "PredictionWeightTableGenerated | "; if ( value & VideoEncodeH264CapabilityFlagBitsKHR::eRowUnalignedSlice ) result += "RowUnalignedSlice | "; if ( value & VideoEncodeH264CapabilityFlagBitsKHR::eDifferentSliceType ) result += "DifferentSliceType | "; if ( value & VideoEncodeH264CapabilityFlagBitsKHR::eBFrameInL0List ) result += "BFrameInL0List | "; if ( value & VideoEncodeH264CapabilityFlagBitsKHR::eBFrameInL1List ) result += "BFrameInL1List | "; if ( value & VideoEncodeH264CapabilityFlagBitsKHR::ePerPictureTypeMinMaxQp ) result += "PerPictureTypeMinMaxQp | "; if ( value & VideoEncodeH264CapabilityFlagBitsKHR::ePerSliceConstantQp ) result += "PerSliceConstantQp | "; if ( value & VideoEncodeH264CapabilityFlagBitsKHR::eGeneratePrefixNalu ) result += "GeneratePrefixNalu | "; if ( value & VideoEncodeH264CapabilityFlagBitsKHR::eMbQpDiffWraparound ) result += "MbQpDiffWraparound | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( VideoEncodeH264StdFlagsKHR value ) { if ( !value ) return "{}"; std::string result; if ( value & VideoEncodeH264StdFlagBitsKHR::eSeparateColorPlaneFlagSet ) result += "SeparateColorPlaneFlagSet | "; if ( value & VideoEncodeH264StdFlagBitsKHR::eQpprimeYZeroTransformBypassFlagSet ) result += "QpprimeYZeroTransformBypassFlagSet | "; if ( value & VideoEncodeH264StdFlagBitsKHR::eScalingMatrixPresentFlagSet ) result += "ScalingMatrixPresentFlagSet | "; if ( value & VideoEncodeH264StdFlagBitsKHR::eChromaQpIndexOffset ) result += "ChromaQpIndexOffset | "; if ( value & VideoEncodeH264StdFlagBitsKHR::eSecondChromaQpIndexOffset ) result += "SecondChromaQpIndexOffset | "; if ( value & VideoEncodeH264StdFlagBitsKHR::ePicInitQpMinus26 ) result += "PicInitQpMinus26 | "; if ( value & VideoEncodeH264StdFlagBitsKHR::eWeightedPredFlagSet ) result += "WeightedPredFlagSet | "; if ( value & VideoEncodeH264StdFlagBitsKHR::eWeightedBipredIdcExplicit ) result += "WeightedBipredIdcExplicit | "; if ( value & VideoEncodeH264StdFlagBitsKHR::eWeightedBipredIdcImplicit ) result += "WeightedBipredIdcImplicit | "; if ( value & VideoEncodeH264StdFlagBitsKHR::eTransform8X8ModeFlagSet ) result += "Transform8X8ModeFlagSet | "; if ( value & VideoEncodeH264StdFlagBitsKHR::eDirectSpatialMvPredFlagUnset ) result += "DirectSpatialMvPredFlagUnset | "; if ( value & VideoEncodeH264StdFlagBitsKHR::eEntropyCodingModeFlagUnset ) result += "EntropyCodingModeFlagUnset | "; if ( value & VideoEncodeH264StdFlagBitsKHR::eEntropyCodingModeFlagSet ) result += "EntropyCodingModeFlagSet | "; if ( value & VideoEncodeH264StdFlagBitsKHR::eDirect8X8InferenceFlagUnset ) result += "Direct8X8InferenceFlagUnset | "; if ( value & VideoEncodeH264StdFlagBitsKHR::eConstrainedIntraPredFlagSet ) result += "ConstrainedIntraPredFlagSet | "; if ( value & VideoEncodeH264StdFlagBitsKHR::eDeblockingFilterDisabled ) result += "DeblockingFilterDisabled | "; if ( value & VideoEncodeH264StdFlagBitsKHR::eDeblockingFilterEnabled ) result += "DeblockingFilterEnabled | "; if ( value & VideoEncodeH264StdFlagBitsKHR::eDeblockingFilterPartial ) result += "DeblockingFilterPartial | "; if ( value & VideoEncodeH264StdFlagBitsKHR::eSliceQpDelta ) result += "SliceQpDelta | "; if ( value & VideoEncodeH264StdFlagBitsKHR::eDifferentSliceQpDelta ) result += "DifferentSliceQpDelta | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( VideoEncodeH264RateControlFlagsKHR value ) { if ( !value ) return "{}"; std::string result; if ( value & VideoEncodeH264RateControlFlagBitsKHR::eAttemptHrdCompliance ) result += "AttemptHrdCompliance | "; if ( value & VideoEncodeH264RateControlFlagBitsKHR::eRegularGop ) result += "RegularGop | "; if ( value & VideoEncodeH264RateControlFlagBitsKHR::eReferencePatternFlat ) result += "ReferencePatternFlat | "; if ( value & VideoEncodeH264RateControlFlagBitsKHR::eReferencePatternDyadic ) result += "ReferencePatternDyadic | "; if ( value & VideoEncodeH264RateControlFlagBitsKHR::eTemporalLayerPatternDyadic ) result += "TemporalLayerPatternDyadic | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } //=== VK_KHR_video_encode_h265 === VULKAN_HPP_INLINE std::string to_string( VideoEncodeH265CapabilityFlagsKHR value ) { if ( !value ) return "{}"; std::string result; if ( value & VideoEncodeH265CapabilityFlagBitsKHR::eHrdCompliance ) result += "HrdCompliance | "; if ( value & VideoEncodeH265CapabilityFlagBitsKHR::ePredictionWeightTableGenerated ) result += "PredictionWeightTableGenerated | "; if ( value & VideoEncodeH265CapabilityFlagBitsKHR::eRowUnalignedSliceSegment ) result += "RowUnalignedSliceSegment | "; if ( value & VideoEncodeH265CapabilityFlagBitsKHR::eDifferentSliceSegmentType ) result += "DifferentSliceSegmentType | "; if ( value & VideoEncodeH265CapabilityFlagBitsKHR::eBFrameInL0List ) result += "BFrameInL0List | "; if ( value & VideoEncodeH265CapabilityFlagBitsKHR::eBFrameInL1List ) result += "BFrameInL1List | "; if ( value & VideoEncodeH265CapabilityFlagBitsKHR::ePerPictureTypeMinMaxQp ) result += "PerPictureTypeMinMaxQp | "; if ( value & VideoEncodeH265CapabilityFlagBitsKHR::ePerSliceSegmentConstantQp ) result += "PerSliceSegmentConstantQp | "; if ( value & VideoEncodeH265CapabilityFlagBitsKHR::eMultipleTilesPerSliceSegment ) result += "MultipleTilesPerSliceSegment | "; if ( value & VideoEncodeH265CapabilityFlagBitsKHR::eMultipleSliceSegmentsPerTile ) result += "MultipleSliceSegmentsPerTile | "; if ( value & VideoEncodeH265CapabilityFlagBitsKHR::eCuQpDiffWraparound ) result += "CuQpDiffWraparound | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( VideoEncodeH265StdFlagsKHR value ) { if ( !value ) return "{}"; std::string result; if ( value & VideoEncodeH265StdFlagBitsKHR::eSeparateColorPlaneFlagSet ) result += "SeparateColorPlaneFlagSet | "; if ( value & VideoEncodeH265StdFlagBitsKHR::eSampleAdaptiveOffsetEnabledFlagSet ) result += "SampleAdaptiveOffsetEnabledFlagSet | "; if ( value & VideoEncodeH265StdFlagBitsKHR::eScalingListDataPresentFlagSet ) result += "ScalingListDataPresentFlagSet | "; if ( value & VideoEncodeH265StdFlagBitsKHR::ePcmEnabledFlagSet ) result += "PcmEnabledFlagSet | "; if ( value & VideoEncodeH265StdFlagBitsKHR::eSpsTemporalMvpEnabledFlagSet ) result += "SpsTemporalMvpEnabledFlagSet | "; if ( value & VideoEncodeH265StdFlagBitsKHR::eInitQpMinus26 ) result += "InitQpMinus26 | "; if ( value & VideoEncodeH265StdFlagBitsKHR::eWeightedPredFlagSet ) result += "WeightedPredFlagSet | "; if ( value & VideoEncodeH265StdFlagBitsKHR::eWeightedBipredFlagSet ) result += "WeightedBipredFlagSet | "; if ( value & VideoEncodeH265StdFlagBitsKHR::eLog2ParallelMergeLevelMinus2 ) result += "Log2ParallelMergeLevelMinus2 | "; if ( value & VideoEncodeH265StdFlagBitsKHR::eSignDataHidingEnabledFlagSet ) result += "SignDataHidingEnabledFlagSet | "; if ( value & VideoEncodeH265StdFlagBitsKHR::eTransformSkipEnabledFlagSet ) result += "TransformSkipEnabledFlagSet | "; if ( value & VideoEncodeH265StdFlagBitsKHR::eTransformSkipEnabledFlagUnset ) result += "TransformSkipEnabledFlagUnset | "; if ( value & VideoEncodeH265StdFlagBitsKHR::ePpsSliceChromaQpOffsetsPresentFlagSet ) result += "PpsSliceChromaQpOffsetsPresentFlagSet | "; if ( value & VideoEncodeH265StdFlagBitsKHR::eTransquantBypassEnabledFlagSet ) result += "TransquantBypassEnabledFlagSet | "; if ( value & VideoEncodeH265StdFlagBitsKHR::eConstrainedIntraPredFlagSet ) result += "ConstrainedIntraPredFlagSet | "; if ( value & VideoEncodeH265StdFlagBitsKHR::eEntropyCodingSyncEnabledFlagSet ) result += "EntropyCodingSyncEnabledFlagSet | "; if ( value & VideoEncodeH265StdFlagBitsKHR::eDeblockingFilterOverrideEnabledFlagSet ) result += "DeblockingFilterOverrideEnabledFlagSet | "; if ( value & VideoEncodeH265StdFlagBitsKHR::eDependentSliceSegmentsEnabledFlagSet ) result += "DependentSliceSegmentsEnabledFlagSet | "; if ( value & VideoEncodeH265StdFlagBitsKHR::eDependentSliceSegmentFlagSet ) result += "DependentSliceSegmentFlagSet | "; if ( value & VideoEncodeH265StdFlagBitsKHR::eSliceQpDelta ) result += "SliceQpDelta | "; if ( value & VideoEncodeH265StdFlagBitsKHR::eDifferentSliceQpDelta ) result += "DifferentSliceQpDelta | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( VideoEncodeH265CtbSizeFlagsKHR value ) { if ( !value ) return "{}"; std::string result; if ( value & VideoEncodeH265CtbSizeFlagBitsKHR::e16 ) result += "16 | "; if ( value & VideoEncodeH265CtbSizeFlagBitsKHR::e32 ) result += "32 | "; if ( value & VideoEncodeH265CtbSizeFlagBitsKHR::e64 ) result += "64 | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( VideoEncodeH265TransformBlockSizeFlagsKHR value ) { if ( !value ) return "{}"; std::string result; if ( value & VideoEncodeH265TransformBlockSizeFlagBitsKHR::e4 ) result += "4 | "; if ( value & VideoEncodeH265TransformBlockSizeFlagBitsKHR::e8 ) result += "8 | "; if ( value & VideoEncodeH265TransformBlockSizeFlagBitsKHR::e16 ) result += "16 | "; if ( value & VideoEncodeH265TransformBlockSizeFlagBitsKHR::e32 ) result += "32 | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( VideoEncodeH265RateControlFlagsKHR value ) { if ( !value ) return "{}"; std::string result; if ( value & VideoEncodeH265RateControlFlagBitsKHR::eAttemptHrdCompliance ) result += "AttemptHrdCompliance | "; if ( value & VideoEncodeH265RateControlFlagBitsKHR::eRegularGop ) result += "RegularGop | "; if ( value & VideoEncodeH265RateControlFlagBitsKHR::eReferencePatternFlat ) result += "ReferencePatternFlat | "; if ( value & VideoEncodeH265RateControlFlagBitsKHR::eReferencePatternDyadic ) result += "ReferencePatternDyadic | "; if ( value & VideoEncodeH265RateControlFlagBitsKHR::eTemporalSubLayerPatternDyadic ) result += "TemporalSubLayerPatternDyadic | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } //=== VK_KHR_video_decode_h264 === VULKAN_HPP_INLINE std::string to_string( VideoDecodeH264PictureLayoutFlagsKHR value ) { if ( !value ) return "Progressive"; std::string result; if ( value & VideoDecodeH264PictureLayoutFlagBitsKHR::eInterlacedInterleavedLines ) result += "InterlacedInterleavedLines | "; if ( value & VideoDecodeH264PictureLayoutFlagBitsKHR::eInterlacedSeparatePlanes ) result += "InterlacedSeparatePlanes | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } #if defined( VK_USE_PLATFORM_GGP ) //=== VK_GGP_stream_descriptor_surface === VULKAN_HPP_INLINE std::string to_string( StreamDescriptorSurfaceCreateFlagsGGP ) { return "{}"; } #endif /*VK_USE_PLATFORM_GGP*/ //=== VK_NV_external_memory_capabilities === VULKAN_HPP_INLINE std::string to_string( ExternalMemoryHandleTypeFlagsNV value ) { if ( !value ) return "{}"; std::string result; if ( value & ExternalMemoryHandleTypeFlagBitsNV::eOpaqueWin32 ) result += "OpaqueWin32 | "; if ( value & ExternalMemoryHandleTypeFlagBitsNV::eOpaqueWin32Kmt ) result += "OpaqueWin32Kmt | "; if ( value & ExternalMemoryHandleTypeFlagBitsNV::eD3D11Image ) result += "D3D11Image | "; if ( value & ExternalMemoryHandleTypeFlagBitsNV::eD3D11ImageKmt ) result += "D3D11ImageKmt | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( ExternalMemoryFeatureFlagsNV value ) { if ( !value ) return "{}"; std::string result; if ( value & ExternalMemoryFeatureFlagBitsNV::eDedicatedOnly ) result += "DedicatedOnly | "; if ( value & ExternalMemoryFeatureFlagBitsNV::eExportable ) result += "Exportable | "; if ( value & ExternalMemoryFeatureFlagBitsNV::eImportable ) result += "Importable | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } #if defined( VK_USE_PLATFORM_VI_NN ) //=== VK_NN_vi_surface === VULKAN_HPP_INLINE std::string to_string( ViSurfaceCreateFlagsNN ) { return "{}"; } #endif /*VK_USE_PLATFORM_VI_NN*/ //=== VK_EXT_conditional_rendering === VULKAN_HPP_INLINE std::string to_string( ConditionalRenderingFlagsEXT value ) { if ( !value ) return "{}"; std::string result; if ( value & ConditionalRenderingFlagBitsEXT::eInverted ) result += "Inverted | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } //=== VK_EXT_display_surface_counter === VULKAN_HPP_INLINE std::string to_string( SurfaceCounterFlagsEXT value ) { if ( !value ) return "{}"; std::string result; if ( value & SurfaceCounterFlagBitsEXT::eVblank ) result += "Vblank | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } //=== VK_NV_viewport_swizzle === VULKAN_HPP_INLINE std::string to_string( PipelineViewportSwizzleStateCreateFlagsNV ) { return "{}"; } //=== VK_EXT_discard_rectangles === VULKAN_HPP_INLINE std::string to_string( PipelineDiscardRectangleStateCreateFlagsEXT ) { return "{}"; } //=== VK_EXT_conservative_rasterization === VULKAN_HPP_INLINE std::string to_string( PipelineRasterizationConservativeStateCreateFlagsEXT ) { return "{}"; } //=== VK_EXT_depth_clip_enable === VULKAN_HPP_INLINE std::string to_string( PipelineRasterizationDepthClipStateCreateFlagsEXT ) { return "{}"; } //=== VK_KHR_performance_query === VULKAN_HPP_INLINE std::string to_string( PerformanceCounterDescriptionFlagsKHR value ) { if ( !value ) return "{}"; std::string result; if ( value & PerformanceCounterDescriptionFlagBitsKHR::ePerformanceImpacting ) result += "PerformanceImpacting | "; if ( value & PerformanceCounterDescriptionFlagBitsKHR::eConcurrentlyImpacted ) result += "ConcurrentlyImpacted | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( AcquireProfilingLockFlagsKHR ) { return "{}"; } #if defined( VK_USE_PLATFORM_IOS_MVK ) //=== VK_MVK_ios_surface === VULKAN_HPP_INLINE std::string to_string( IOSSurfaceCreateFlagsMVK ) { return "{}"; } #endif /*VK_USE_PLATFORM_IOS_MVK*/ #if defined( VK_USE_PLATFORM_MACOS_MVK ) //=== VK_MVK_macos_surface === VULKAN_HPP_INLINE std::string to_string( MacOSSurfaceCreateFlagsMVK ) { return "{}"; } #endif /*VK_USE_PLATFORM_MACOS_MVK*/ //=== VK_EXT_debug_utils === VULKAN_HPP_INLINE std::string to_string( DebugUtilsMessageSeverityFlagsEXT value ) { if ( !value ) return "{}"; std::string result; if ( value & DebugUtilsMessageSeverityFlagBitsEXT::eVerbose ) result += "Verbose | "; if ( value & DebugUtilsMessageSeverityFlagBitsEXT::eInfo ) result += "Info | "; if ( value & DebugUtilsMessageSeverityFlagBitsEXT::eWarning ) result += "Warning | "; if ( value & DebugUtilsMessageSeverityFlagBitsEXT::eError ) result += "Error | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( DebugUtilsMessageTypeFlagsEXT value ) { if ( !value ) return "{}"; std::string result; if ( value & DebugUtilsMessageTypeFlagBitsEXT::eGeneral ) result += "General | "; if ( value & DebugUtilsMessageTypeFlagBitsEXT::eValidation ) result += "Validation | "; if ( value & DebugUtilsMessageTypeFlagBitsEXT::ePerformance ) result += "Performance | "; if ( value & DebugUtilsMessageTypeFlagBitsEXT::eDeviceAddressBinding ) result += "DeviceAddressBinding | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( DebugUtilsMessengerCallbackDataFlagsEXT ) { return "{}"; } VULKAN_HPP_INLINE std::string to_string( DebugUtilsMessengerCreateFlagsEXT ) { return "{}"; } //=== VK_NV_fragment_coverage_to_color === VULKAN_HPP_INLINE std::string to_string( PipelineCoverageToColorStateCreateFlagsNV ) { return "{}"; } //=== VK_KHR_acceleration_structure === VULKAN_HPP_INLINE std::string to_string( GeometryFlagsKHR value ) { if ( !value ) return "{}"; std::string result; if ( value & GeometryFlagBitsKHR::eOpaque ) result += "Opaque | "; if ( value & GeometryFlagBitsKHR::eNoDuplicateAnyHitInvocation ) result += "NoDuplicateAnyHitInvocation | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( GeometryInstanceFlagsKHR value ) { if ( !value ) return "{}"; std::string result; if ( value & GeometryInstanceFlagBitsKHR::eTriangleFacingCullDisable ) result += "TriangleFacingCullDisable | "; if ( value & GeometryInstanceFlagBitsKHR::eTriangleFlipFacing ) result += "TriangleFlipFacing | "; if ( value & GeometryInstanceFlagBitsKHR::eForceOpaque ) result += "ForceOpaque | "; if ( value & GeometryInstanceFlagBitsKHR::eForceNoOpaque ) result += "ForceNoOpaque | "; if ( value & GeometryInstanceFlagBitsKHR::eForceOpacityMicromap2StateEXT ) result += "ForceOpacityMicromap2StateEXT | "; if ( value & GeometryInstanceFlagBitsKHR::eDisableOpacityMicromapsEXT ) result += "DisableOpacityMicromapsEXT | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( BuildAccelerationStructureFlagsKHR value ) { if ( !value ) return "{}"; std::string result; if ( value & BuildAccelerationStructureFlagBitsKHR::eAllowUpdate ) result += "AllowUpdate | "; if ( value & BuildAccelerationStructureFlagBitsKHR::eAllowCompaction ) result += "AllowCompaction | "; if ( value & BuildAccelerationStructureFlagBitsKHR::ePreferFastTrace ) result += "PreferFastTrace | "; if ( value & BuildAccelerationStructureFlagBitsKHR::ePreferFastBuild ) result += "PreferFastBuild | "; if ( value & BuildAccelerationStructureFlagBitsKHR::eLowMemory ) result += "LowMemory | "; if ( value & BuildAccelerationStructureFlagBitsKHR::eMotionNV ) result += "MotionNV | "; if ( value & BuildAccelerationStructureFlagBitsKHR::eAllowOpacityMicromapUpdateEXT ) result += "AllowOpacityMicromapUpdateEXT | "; if ( value & BuildAccelerationStructureFlagBitsKHR::eAllowDisableOpacityMicromapsEXT ) result += "AllowDisableOpacityMicromapsEXT | "; if ( value & BuildAccelerationStructureFlagBitsKHR::eAllowOpacityMicromapDataUpdateEXT ) result += "AllowOpacityMicromapDataUpdateEXT | "; #if defined( VK_ENABLE_BETA_EXTENSIONS ) if ( value & BuildAccelerationStructureFlagBitsKHR::eAllowDisplacementMicromapUpdateNV ) result += "AllowDisplacementMicromapUpdateNV | "; #endif /*VK_ENABLE_BETA_EXTENSIONS*/ if ( value & BuildAccelerationStructureFlagBitsKHR::eAllowDataAccess ) result += "AllowDataAccess | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( AccelerationStructureCreateFlagsKHR value ) { if ( !value ) return "{}"; std::string result; if ( value & AccelerationStructureCreateFlagBitsKHR::eDeviceAddressCaptureReplay ) result += "DeviceAddressCaptureReplay | "; if ( value & AccelerationStructureCreateFlagBitsKHR::eDescriptorBufferCaptureReplayEXT ) result += "DescriptorBufferCaptureReplayEXT | "; if ( value & AccelerationStructureCreateFlagBitsKHR::eMotionNV ) result += "MotionNV | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } //=== VK_NV_framebuffer_mixed_samples === VULKAN_HPP_INLINE std::string to_string( PipelineCoverageModulationStateCreateFlagsNV ) { return "{}"; } //=== VK_EXT_validation_cache === VULKAN_HPP_INLINE std::string to_string( ValidationCacheCreateFlagsEXT ) { return "{}"; } //=== VK_AMD_pipeline_compiler_control === VULKAN_HPP_INLINE std::string to_string( PipelineCompilerControlFlagsAMD ) { return "{}"; } #if defined( VK_USE_PLATFORM_FUCHSIA ) //=== VK_FUCHSIA_imagepipe_surface === VULKAN_HPP_INLINE std::string to_string( ImagePipeSurfaceCreateFlagsFUCHSIA ) { return "{}"; } #endif /*VK_USE_PLATFORM_FUCHSIA*/ #if defined( VK_USE_PLATFORM_METAL_EXT ) //=== VK_EXT_metal_surface === VULKAN_HPP_INLINE std::string to_string( MetalSurfaceCreateFlagsEXT ) { return "{}"; } #endif /*VK_USE_PLATFORM_METAL_EXT*/ //=== VK_AMD_shader_core_properties2 === VULKAN_HPP_INLINE std::string to_string( ShaderCorePropertiesFlagsAMD ) { return "{}"; } //=== VK_NV_coverage_reduction_mode === VULKAN_HPP_INLINE std::string to_string( PipelineCoverageReductionStateCreateFlagsNV ) { return "{}"; } //=== VK_EXT_headless_surface === VULKAN_HPP_INLINE std::string to_string( HeadlessSurfaceCreateFlagsEXT ) { return "{}"; } //=== VK_EXT_surface_maintenance1 === VULKAN_HPP_INLINE std::string to_string( PresentScalingFlagsEXT value ) { if ( !value ) return "{}"; std::string result; if ( value & PresentScalingFlagBitsEXT::eOneToOne ) result += "OneToOne | "; if ( value & PresentScalingFlagBitsEXT::eAspectRatioStretch ) result += "AspectRatioStretch | "; if ( value & PresentScalingFlagBitsEXT::eStretch ) result += "Stretch | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( PresentGravityFlagsEXT value ) { if ( !value ) return "{}"; std::string result; if ( value & PresentGravityFlagBitsEXT::eMin ) result += "Min | "; if ( value & PresentGravityFlagBitsEXT::eMax ) result += "Max | "; if ( value & PresentGravityFlagBitsEXT::eCentered ) result += "Centered | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } //=== VK_NV_device_generated_commands === VULKAN_HPP_INLINE std::string to_string( IndirectStateFlagsNV value ) { if ( !value ) return "{}"; std::string result; if ( value & IndirectStateFlagBitsNV::eFlagFrontface ) result += "FlagFrontface | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( IndirectCommandsLayoutUsageFlagsNV value ) { if ( !value ) return "{}"; std::string result; if ( value & IndirectCommandsLayoutUsageFlagBitsNV::eExplicitPreprocess ) result += "ExplicitPreprocess | "; if ( value & IndirectCommandsLayoutUsageFlagBitsNV::eIndexedSequences ) result += "IndexedSequences | "; if ( value & IndirectCommandsLayoutUsageFlagBitsNV::eUnorderedSequences ) result += "UnorderedSequences | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } //=== VK_EXT_device_memory_report === VULKAN_HPP_INLINE std::string to_string( DeviceMemoryReportFlagsEXT ) { return "{}"; } //=== VK_KHR_video_encode_queue === VULKAN_HPP_INLINE std::string to_string( VideoEncodeFlagsKHR value ) { if ( !value ) return "{}"; std::string result; if ( value & VideoEncodeFlagBitsKHR::eWithQuantizationDeltaMap ) result += "WithQuantizationDeltaMap | "; if ( value & VideoEncodeFlagBitsKHR::eWithEmphasisMap ) result += "WithEmphasisMap | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( VideoEncodeCapabilityFlagsKHR value ) { if ( !value ) return "{}"; std::string result; if ( value & VideoEncodeCapabilityFlagBitsKHR::ePrecedingExternallyEncodedBytes ) result += "PrecedingExternallyEncodedBytes | "; if ( value & VideoEncodeCapabilityFlagBitsKHR::eInsufficientBitstreamBufferRangeDetection ) result += "InsufficientBitstreamBufferRangeDetection | "; if ( value & VideoEncodeCapabilityFlagBitsKHR::eQuantizationDeltaMap ) result += "QuantizationDeltaMap | "; if ( value & VideoEncodeCapabilityFlagBitsKHR::eEmphasisMap ) result += "EmphasisMap | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( VideoEncodeFeedbackFlagsKHR value ) { if ( !value ) return "{}"; std::string result; if ( value & VideoEncodeFeedbackFlagBitsKHR::eBitstreamBufferOffset ) result += "BitstreamBufferOffset | "; if ( value & VideoEncodeFeedbackFlagBitsKHR::eBitstreamBytesWritten ) result += "BitstreamBytesWritten | "; if ( value & VideoEncodeFeedbackFlagBitsKHR::eBitstreamHasOverrides ) result += "BitstreamHasOverrides | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( VideoEncodeUsageFlagsKHR value ) { if ( !value ) return "Default"; std::string result; if ( value & VideoEncodeUsageFlagBitsKHR::eTranscoding ) result += "Transcoding | "; if ( value & VideoEncodeUsageFlagBitsKHR::eStreaming ) result += "Streaming | "; if ( value & VideoEncodeUsageFlagBitsKHR::eRecording ) result += "Recording | "; if ( value & VideoEncodeUsageFlagBitsKHR::eConferencing ) result += "Conferencing | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( VideoEncodeContentFlagsKHR value ) { if ( !value ) return "Default"; std::string result; if ( value & VideoEncodeContentFlagBitsKHR::eCamera ) result += "Camera | "; if ( value & VideoEncodeContentFlagBitsKHR::eDesktop ) result += "Desktop | "; if ( value & VideoEncodeContentFlagBitsKHR::eRendered ) result += "Rendered | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( VideoEncodeRateControlFlagsKHR ) { return "{}"; } VULKAN_HPP_INLINE std::string to_string( VideoEncodeRateControlModeFlagsKHR value ) { if ( !value ) return "Default"; std::string result; if ( value & VideoEncodeRateControlModeFlagBitsKHR::eDisabled ) result += "Disabled | "; if ( value & VideoEncodeRateControlModeFlagBitsKHR::eCbr ) result += "Cbr | "; if ( value & VideoEncodeRateControlModeFlagBitsKHR::eVbr ) result += "Vbr | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } //=== VK_NV_device_diagnostics_config === VULKAN_HPP_INLINE std::string to_string( DeviceDiagnosticsConfigFlagsNV value ) { if ( !value ) return "{}"; std::string result; if ( value & DeviceDiagnosticsConfigFlagBitsNV::eEnableShaderDebugInfo ) result += "EnableShaderDebugInfo | "; if ( value & DeviceDiagnosticsConfigFlagBitsNV::eEnableResourceTracking ) result += "EnableResourceTracking | "; if ( value & DeviceDiagnosticsConfigFlagBitsNV::eEnableAutomaticCheckpoints ) result += "EnableAutomaticCheckpoints | "; if ( value & DeviceDiagnosticsConfigFlagBitsNV::eEnableShaderErrorReporting ) result += "EnableShaderErrorReporting | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } #if defined( VK_USE_PLATFORM_METAL_EXT ) //=== VK_EXT_metal_objects === VULKAN_HPP_INLINE std::string to_string( ExportMetalObjectTypeFlagsEXT value ) { if ( !value ) return "{}"; std::string result; if ( value & ExportMetalObjectTypeFlagBitsEXT::eMetalDevice ) result += "MetalDevice | "; if ( value & ExportMetalObjectTypeFlagBitsEXT::eMetalCommandQueue ) result += "MetalCommandQueue | "; if ( value & ExportMetalObjectTypeFlagBitsEXT::eMetalBuffer ) result += "MetalBuffer | "; if ( value & ExportMetalObjectTypeFlagBitsEXT::eMetalTexture ) result += "MetalTexture | "; if ( value & ExportMetalObjectTypeFlagBitsEXT::eMetalIosurface ) result += "MetalIosurface | "; if ( value & ExportMetalObjectTypeFlagBitsEXT::eMetalSharedEvent ) result += "MetalSharedEvent | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } #endif /*VK_USE_PLATFORM_METAL_EXT*/ //=== VK_EXT_graphics_pipeline_library === VULKAN_HPP_INLINE std::string to_string( GraphicsPipelineLibraryFlagsEXT value ) { if ( !value ) return "{}"; std::string result; if ( value & GraphicsPipelineLibraryFlagBitsEXT::eVertexInputInterface ) result += "VertexInputInterface | "; if ( value & GraphicsPipelineLibraryFlagBitsEXT::ePreRasterizationShaders ) result += "PreRasterizationShaders | "; if ( value & GraphicsPipelineLibraryFlagBitsEXT::eFragmentShader ) result += "FragmentShader | "; if ( value & GraphicsPipelineLibraryFlagBitsEXT::eFragmentOutputInterface ) result += "FragmentOutputInterface | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } //=== VK_NV_ray_tracing_motion_blur === VULKAN_HPP_INLINE std::string to_string( AccelerationStructureMotionInfoFlagsNV ) { return "{}"; } VULKAN_HPP_INLINE std::string to_string( AccelerationStructureMotionInstanceFlagsNV ) { return "{}"; } //=== VK_EXT_image_compression_control === VULKAN_HPP_INLINE std::string to_string( ImageCompressionFlagsEXT value ) { if ( !value ) return "Default"; std::string result; if ( value & ImageCompressionFlagBitsEXT::eFixedRateDefault ) result += "FixedRateDefault | "; if ( value & ImageCompressionFlagBitsEXT::eFixedRateExplicit ) result += "FixedRateExplicit | "; if ( value & ImageCompressionFlagBitsEXT::eDisabled ) result += "Disabled | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( ImageCompressionFixedRateFlagsEXT value ) { if ( !value ) return "None"; std::string result; if ( value & ImageCompressionFixedRateFlagBitsEXT::e1Bpc ) result += "1Bpc | "; if ( value & ImageCompressionFixedRateFlagBitsEXT::e2Bpc ) result += "2Bpc | "; if ( value & ImageCompressionFixedRateFlagBitsEXT::e3Bpc ) result += "3Bpc | "; if ( value & ImageCompressionFixedRateFlagBitsEXT::e4Bpc ) result += "4Bpc | "; if ( value & ImageCompressionFixedRateFlagBitsEXT::e5Bpc ) result += "5Bpc | "; if ( value & ImageCompressionFixedRateFlagBitsEXT::e6Bpc ) result += "6Bpc | "; if ( value & ImageCompressionFixedRateFlagBitsEXT::e7Bpc ) result += "7Bpc | "; if ( value & ImageCompressionFixedRateFlagBitsEXT::e8Bpc ) result += "8Bpc | "; if ( value & ImageCompressionFixedRateFlagBitsEXT::e9Bpc ) result += "9Bpc | "; if ( value & ImageCompressionFixedRateFlagBitsEXT::e10Bpc ) result += "10Bpc | "; if ( value & ImageCompressionFixedRateFlagBitsEXT::e11Bpc ) result += "11Bpc | "; if ( value & ImageCompressionFixedRateFlagBitsEXT::e12Bpc ) result += "12Bpc | "; if ( value & ImageCompressionFixedRateFlagBitsEXT::e13Bpc ) result += "13Bpc | "; if ( value & ImageCompressionFixedRateFlagBitsEXT::e14Bpc ) result += "14Bpc | "; if ( value & ImageCompressionFixedRateFlagBitsEXT::e15Bpc ) result += "15Bpc | "; if ( value & ImageCompressionFixedRateFlagBitsEXT::e16Bpc ) result += "16Bpc | "; if ( value & ImageCompressionFixedRateFlagBitsEXT::e17Bpc ) result += "17Bpc | "; if ( value & ImageCompressionFixedRateFlagBitsEXT::e18Bpc ) result += "18Bpc | "; if ( value & ImageCompressionFixedRateFlagBitsEXT::e19Bpc ) result += "19Bpc | "; if ( value & ImageCompressionFixedRateFlagBitsEXT::e20Bpc ) result += "20Bpc | "; if ( value & ImageCompressionFixedRateFlagBitsEXT::e21Bpc ) result += "21Bpc | "; if ( value & ImageCompressionFixedRateFlagBitsEXT::e22Bpc ) result += "22Bpc | "; if ( value & ImageCompressionFixedRateFlagBitsEXT::e23Bpc ) result += "23Bpc | "; if ( value & ImageCompressionFixedRateFlagBitsEXT::e24Bpc ) result += "24Bpc | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } #if defined( VK_USE_PLATFORM_DIRECTFB_EXT ) //=== VK_EXT_directfb_surface === VULKAN_HPP_INLINE std::string to_string( DirectFBSurfaceCreateFlagsEXT ) { return "{}"; } #endif /*VK_USE_PLATFORM_DIRECTFB_EXT*/ //=== VK_EXT_device_address_binding_report === VULKAN_HPP_INLINE std::string to_string( DeviceAddressBindingFlagsEXT value ) { if ( !value ) return "{}"; std::string result; if ( value & DeviceAddressBindingFlagBitsEXT::eInternalObject ) result += "InternalObject | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } #if defined( VK_USE_PLATFORM_FUCHSIA ) //=== VK_FUCHSIA_buffer_collection === VULKAN_HPP_INLINE std::string to_string( ImageFormatConstraintsFlagsFUCHSIA ) { return "{}"; } VULKAN_HPP_INLINE std::string to_string( ImageConstraintsInfoFlagsFUCHSIA value ) { if ( !value ) return "{}"; std::string result; if ( value & ImageConstraintsInfoFlagBitsFUCHSIA::eCpuReadRarely ) result += "CpuReadRarely | "; if ( value & ImageConstraintsInfoFlagBitsFUCHSIA::eCpuReadOften ) result += "CpuReadOften | "; if ( value & ImageConstraintsInfoFlagBitsFUCHSIA::eCpuWriteRarely ) result += "CpuWriteRarely | "; if ( value & ImageConstraintsInfoFlagBitsFUCHSIA::eCpuWriteOften ) result += "CpuWriteOften | "; if ( value & ImageConstraintsInfoFlagBitsFUCHSIA::eProtectedOptional ) result += "ProtectedOptional | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } #endif /*VK_USE_PLATFORM_FUCHSIA*/ //=== VK_EXT_frame_boundary === VULKAN_HPP_INLINE std::string to_string( FrameBoundaryFlagsEXT value ) { if ( !value ) return "{}"; std::string result; if ( value & FrameBoundaryFlagBitsEXT::eFrameEnd ) result += "FrameEnd | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } #if defined( VK_USE_PLATFORM_SCREEN_QNX ) //=== VK_QNX_screen_surface === VULKAN_HPP_INLINE std::string to_string( ScreenSurfaceCreateFlagsQNX ) { return "{}"; } #endif /*VK_USE_PLATFORM_SCREEN_QNX*/ //=== VK_EXT_opacity_micromap === VULKAN_HPP_INLINE std::string to_string( BuildMicromapFlagsEXT value ) { if ( !value ) return "{}"; std::string result; if ( value & BuildMicromapFlagBitsEXT::ePreferFastTrace ) result += "PreferFastTrace | "; if ( value & BuildMicromapFlagBitsEXT::ePreferFastBuild ) result += "PreferFastBuild | "; if ( value & BuildMicromapFlagBitsEXT::eAllowCompaction ) result += "AllowCompaction | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( MicromapCreateFlagsEXT value ) { if ( !value ) return "{}"; std::string result; if ( value & MicromapCreateFlagBitsEXT::eDeviceAddressCaptureReplay ) result += "DeviceAddressCaptureReplay | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } //=== VK_ARM_scheduling_controls === VULKAN_HPP_INLINE std::string to_string( PhysicalDeviceSchedulingControlsFlagsARM value ) { if ( !value ) return "{}"; std::string result; if ( value & PhysicalDeviceSchedulingControlsFlagBitsARM::eShaderCoreCount ) result += "ShaderCoreCount | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } //=== VK_NV_memory_decompression === VULKAN_HPP_INLINE std::string to_string( MemoryDecompressionMethodFlagsNV value ) { if ( !value ) return "{}"; std::string result; if ( value & MemoryDecompressionMethodFlagBitsNV::eGdeflate10 ) result += "Gdeflate10 | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } //=== VK_LUNARG_direct_driver_loading === VULKAN_HPP_INLINE std::string to_string( DirectDriverLoadingFlagsLUNARG ) { return "{}"; } //=== VK_NV_optical_flow === VULKAN_HPP_INLINE std::string to_string( OpticalFlowUsageFlagsNV value ) { if ( !value ) return "Unknown"; std::string result; if ( value & OpticalFlowUsageFlagBitsNV::eInput ) result += "Input | "; if ( value & OpticalFlowUsageFlagBitsNV::eOutput ) result += "Output | "; if ( value & OpticalFlowUsageFlagBitsNV::eHint ) result += "Hint | "; if ( value & OpticalFlowUsageFlagBitsNV::eCost ) result += "Cost | "; if ( value & OpticalFlowUsageFlagBitsNV::eGlobalFlow ) result += "GlobalFlow | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( OpticalFlowGridSizeFlagsNV value ) { if ( !value ) return "Unknown"; std::string result; if ( value & OpticalFlowGridSizeFlagBitsNV::e1X1 ) result += "1X1 | "; if ( value & OpticalFlowGridSizeFlagBitsNV::e2X2 ) result += "2X2 | "; if ( value & OpticalFlowGridSizeFlagBitsNV::e4X4 ) result += "4X4 | "; if ( value & OpticalFlowGridSizeFlagBitsNV::e8X8 ) result += "8X8 | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( OpticalFlowSessionCreateFlagsNV value ) { if ( !value ) return "{}"; std::string result; if ( value & OpticalFlowSessionCreateFlagBitsNV::eEnableHint ) result += "EnableHint | "; if ( value & OpticalFlowSessionCreateFlagBitsNV::eEnableCost ) result += "EnableCost | "; if ( value & OpticalFlowSessionCreateFlagBitsNV::eEnableGlobalFlow ) result += "EnableGlobalFlow | "; if ( value & OpticalFlowSessionCreateFlagBitsNV::eAllowRegions ) result += "AllowRegions | "; if ( value & OpticalFlowSessionCreateFlagBitsNV::eBothDirections ) result += "BothDirections | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( OpticalFlowExecuteFlagsNV value ) { if ( !value ) return "{}"; std::string result; if ( value & OpticalFlowExecuteFlagBitsNV::eDisableTemporalHints ) result += "DisableTemporalHints | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } //=== VK_EXT_shader_object === VULKAN_HPP_INLINE std::string to_string( ShaderCreateFlagsEXT value ) { if ( !value ) return "{}"; std::string result; if ( value & ShaderCreateFlagBitsEXT::eLinkStage ) result += "LinkStage | "; if ( value & ShaderCreateFlagBitsEXT::eAllowVaryingSubgroupSize ) result += "AllowVaryingSubgroupSize | "; if ( value & ShaderCreateFlagBitsEXT::eRequireFullSubgroups ) result += "RequireFullSubgroups | "; if ( value & ShaderCreateFlagBitsEXT::eNoTaskShader ) result += "NoTaskShader | "; if ( value & ShaderCreateFlagBitsEXT::eDispatchBase ) result += "DispatchBase | "; if ( value & ShaderCreateFlagBitsEXT::eFragmentShadingRateAttachment ) result += "FragmentShadingRateAttachment | "; if ( value & ShaderCreateFlagBitsEXT::eFragmentDensityMapAttachment ) result += "FragmentDensityMapAttachment | "; if ( value & ShaderCreateFlagBitsEXT::eIndirectBindable ) result += "IndirectBindable | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } //=== VK_KHR_video_encode_av1 === VULKAN_HPP_INLINE std::string to_string( VideoEncodeAV1CapabilityFlagsKHR value ) { if ( !value ) return "{}"; std::string result; if ( value & VideoEncodeAV1CapabilityFlagBitsKHR::ePerRateControlGroupMinMaxQIndex ) result += "PerRateControlGroupMinMaxQIndex | "; if ( value & VideoEncodeAV1CapabilityFlagBitsKHR::eGenerateObuExtensionHeader ) result += "GenerateObuExtensionHeader | "; if ( value & VideoEncodeAV1CapabilityFlagBitsKHR::ePrimaryReferenceCdfOnly ) result += "PrimaryReferenceCdfOnly | "; if ( value & VideoEncodeAV1CapabilityFlagBitsKHR::eFrameSizeOverride ) result += "FrameSizeOverride | "; if ( value & VideoEncodeAV1CapabilityFlagBitsKHR::eMotionVectorScaling ) result += "MotionVectorScaling | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( VideoEncodeAV1StdFlagsKHR value ) { if ( !value ) return "{}"; std::string result; if ( value & VideoEncodeAV1StdFlagBitsKHR::eUniformTileSpacingFlagSet ) result += "UniformTileSpacingFlagSet | "; if ( value & VideoEncodeAV1StdFlagBitsKHR::eSkipModePresentUnset ) result += "SkipModePresentUnset | "; if ( value & VideoEncodeAV1StdFlagBitsKHR::ePrimaryRefFrame ) result += "PrimaryRefFrame | "; if ( value & VideoEncodeAV1StdFlagBitsKHR::eDeltaQ ) result += "DeltaQ | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( VideoEncodeAV1SuperblockSizeFlagsKHR value ) { if ( !value ) return "{}"; std::string result; if ( value & VideoEncodeAV1SuperblockSizeFlagBitsKHR::e64 ) result += "64 | "; if ( value & VideoEncodeAV1SuperblockSizeFlagBitsKHR::e128 ) result += "128 | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( VideoEncodeAV1RateControlFlagsKHR value ) { if ( !value ) return "{}"; std::string result; if ( value & VideoEncodeAV1RateControlFlagBitsKHR::eRegularGop ) result += "RegularGop | "; if ( value & VideoEncodeAV1RateControlFlagBitsKHR::eTemporalLayerPatternDyadic ) result += "TemporalLayerPatternDyadic | "; if ( value & VideoEncodeAV1RateControlFlagBitsKHR::eReferencePatternFlat ) result += "ReferencePatternFlat | "; if ( value & VideoEncodeAV1RateControlFlagBitsKHR::eReferencePatternDyadic ) result += "ReferencePatternDyadic | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } //=== VK_NV_cluster_acceleration_structure === VULKAN_HPP_INLINE std::string to_string( ClusterAccelerationStructureClusterFlagsNV value ) { if ( !value ) return "{}"; std::string result; if ( value & ClusterAccelerationStructureClusterFlagBitsNV::eAllowDisableOpacityMicromaps ) result += "AllowDisableOpacityMicromaps | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( ClusterAccelerationStructureGeometryFlagsNV value ) { if ( !value ) return "{}"; std::string result; if ( value & ClusterAccelerationStructureGeometryFlagBitsNV::eCullDisable ) result += "CullDisable | "; if ( value & ClusterAccelerationStructureGeometryFlagBitsNV::eNoDuplicateAnyhitInvocation ) result += "NoDuplicateAnyhitInvocation | "; if ( value & ClusterAccelerationStructureGeometryFlagBitsNV::eOpaque ) result += "Opaque | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( ClusterAccelerationStructureAddressResolutionFlagsNV value ) { if ( !value ) return "{}"; std::string result; if ( value & ClusterAccelerationStructureAddressResolutionFlagBitsNV::eIndirectedDstImplicitData ) result += "IndirectedDstImplicitData | "; if ( value & ClusterAccelerationStructureAddressResolutionFlagBitsNV::eIndirectedScratchData ) result += "IndirectedScratchData | "; if ( value & ClusterAccelerationStructureAddressResolutionFlagBitsNV::eIndirectedDstAddressArray ) result += "IndirectedDstAddressArray | "; if ( value & ClusterAccelerationStructureAddressResolutionFlagBitsNV::eIndirectedDstSizesArray ) result += "IndirectedDstSizesArray | "; if ( value & ClusterAccelerationStructureAddressResolutionFlagBitsNV::eIndirectedSrcInfosArray ) result += "IndirectedSrcInfosArray | "; if ( value & ClusterAccelerationStructureAddressResolutionFlagBitsNV::eIndirectedSrcInfosCount ) result += "IndirectedSrcInfosCount | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( ClusterAccelerationStructureIndexFormatFlagsNV value ) { if ( !value ) return "{}"; std::string result; if ( value & ClusterAccelerationStructureIndexFormatFlagBitsNV::e8 ) result += "8 | "; if ( value & ClusterAccelerationStructureIndexFormatFlagBitsNV::e16 ) result += "16 | "; if ( value & ClusterAccelerationStructureIndexFormatFlagBitsNV::e32 ) result += "32 | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } //=== VK_NV_partitioned_acceleration_structure === VULKAN_HPP_INLINE std::string to_string( PartitionedAccelerationStructureInstanceFlagsNV value ) { if ( !value ) return "{}"; std::string result; if ( value & PartitionedAccelerationStructureInstanceFlagBitsNV::eFlagTriangleFacingCullDisable ) result += "FlagTriangleFacingCullDisable | "; if ( value & PartitionedAccelerationStructureInstanceFlagBitsNV::eFlagTriangleFlipFacing ) result += "FlagTriangleFlipFacing | "; if ( value & PartitionedAccelerationStructureInstanceFlagBitsNV::eFlagForceOpaque ) result += "FlagForceOpaque | "; if ( value & PartitionedAccelerationStructureInstanceFlagBitsNV::eFlagForceNoOpaque ) result += "FlagForceNoOpaque | "; if ( value & PartitionedAccelerationStructureInstanceFlagBitsNV::eFlagEnableExplicitBoundingBox ) result += "FlagEnableExplicitBoundingBox | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } //=== VK_EXT_device_generated_commands === VULKAN_HPP_INLINE std::string to_string( IndirectCommandsLayoutUsageFlagsEXT value ) { if ( !value ) return "{}"; std::string result; if ( value & IndirectCommandsLayoutUsageFlagBitsEXT::eExplicitPreprocess ) result += "ExplicitPreprocess | "; if ( value & IndirectCommandsLayoutUsageFlagBitsEXT::eUnorderedSequences ) result += "UnorderedSequences | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } VULKAN_HPP_INLINE std::string to_string( IndirectCommandsInputModeFlagsEXT value ) { if ( !value ) return "{}"; std::string result; if ( value & IndirectCommandsInputModeFlagBitsEXT::eVulkanIndexBuffer ) result += "VulkanIndexBuffer | "; if ( value & IndirectCommandsInputModeFlagBitsEXT::eDxgiIndexBuffer ) result += "DxgiIndexBuffer | "; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } //=== VK_KHR_maintenance8 === VULKAN_HPP_INLINE std::string to_string( AccessFlags3KHR value ) { if ( !value ) return "None"; std::string result; return "{ " + result.substr( 0, result.size() - 3 ) + " }"; } //======================= //=== ENUMs to_string === //======================= VULKAN_HPP_INLINE std::string toHexString( uint32_t value ) { #if __cpp_lib_format return std::format( "{:x}", value ); #else std::stringstream stream; stream << std::hex << value; return stream.str(); #endif } //=== VK_VERSION_1_0 === VULKAN_HPP_INLINE std::string to_string( Result value ) { switch ( value ) { case Result::eSuccess: return "Success"; case Result::eNotReady: return "NotReady"; case Result::eTimeout: return "Timeout"; case Result::eEventSet: return "EventSet"; case Result::eEventReset: return "EventReset"; case Result::eIncomplete: return "Incomplete"; case Result::eErrorOutOfHostMemory: return "ErrorOutOfHostMemory"; case Result::eErrorOutOfDeviceMemory: return "ErrorOutOfDeviceMemory"; case Result::eErrorInitializationFailed: return "ErrorInitializationFailed"; case Result::eErrorDeviceLost: return "ErrorDeviceLost"; case Result::eErrorMemoryMapFailed: return "ErrorMemoryMapFailed"; case Result::eErrorLayerNotPresent: return "ErrorLayerNotPresent"; case Result::eErrorExtensionNotPresent: return "ErrorExtensionNotPresent"; case Result::eErrorFeatureNotPresent: return "ErrorFeatureNotPresent"; case Result::eErrorIncompatibleDriver: return "ErrorIncompatibleDriver"; case Result::eErrorTooManyObjects: return "ErrorTooManyObjects"; case Result::eErrorFormatNotSupported: return "ErrorFormatNotSupported"; case Result::eErrorFragmentedPool: return "ErrorFragmentedPool"; case Result::eErrorUnknown: return "ErrorUnknown"; case Result::eErrorOutOfPoolMemory: return "ErrorOutOfPoolMemory"; case Result::eErrorInvalidExternalHandle: return "ErrorInvalidExternalHandle"; case Result::eErrorFragmentation: return "ErrorFragmentation"; case Result::eErrorInvalidOpaqueCaptureAddress: return "ErrorInvalidOpaqueCaptureAddress"; case Result::ePipelineCompileRequired: return "PipelineCompileRequired"; case Result::eErrorNotPermitted: return "ErrorNotPermitted"; case Result::eErrorSurfaceLostKHR: return "ErrorSurfaceLostKHR"; case Result::eErrorNativeWindowInUseKHR: return "ErrorNativeWindowInUseKHR"; case Result::eSuboptimalKHR: return "SuboptimalKHR"; case Result::eErrorOutOfDateKHR: return "ErrorOutOfDateKHR"; case Result::eErrorIncompatibleDisplayKHR: return "ErrorIncompatibleDisplayKHR"; case Result::eErrorValidationFailedEXT: return "ErrorValidationFailedEXT"; case Result::eErrorInvalidShaderNV: return "ErrorInvalidShaderNV"; case Result::eErrorImageUsageNotSupportedKHR: return "ErrorImageUsageNotSupportedKHR"; case Result::eErrorVideoPictureLayoutNotSupportedKHR: return "ErrorVideoPictureLayoutNotSupportedKHR"; case Result::eErrorVideoProfileOperationNotSupportedKHR: return "ErrorVideoProfileOperationNotSupportedKHR"; case Result::eErrorVideoProfileFormatNotSupportedKHR: return "ErrorVideoProfileFormatNotSupportedKHR"; case Result::eErrorVideoProfileCodecNotSupportedKHR: return "ErrorVideoProfileCodecNotSupportedKHR"; case Result::eErrorVideoStdVersionNotSupportedKHR: return "ErrorVideoStdVersionNotSupportedKHR"; case Result::eErrorInvalidDrmFormatModifierPlaneLayoutEXT: return "ErrorInvalidDrmFormatModifierPlaneLayoutEXT"; #if defined( VK_USE_PLATFORM_WIN32_KHR ) case Result::eErrorFullScreenExclusiveModeLostEXT: return "ErrorFullScreenExclusiveModeLostEXT"; #endif /*VK_USE_PLATFORM_WIN32_KHR*/ case Result::eThreadIdleKHR: return "ThreadIdleKHR"; case Result::eThreadDoneKHR: return "ThreadDoneKHR"; case Result::eOperationDeferredKHR: return "OperationDeferredKHR"; case Result::eOperationNotDeferredKHR: return "OperationNotDeferredKHR"; case Result::eErrorInvalidVideoStdParametersKHR: return "ErrorInvalidVideoStdParametersKHR"; case Result::eErrorCompressionExhaustedEXT: return "ErrorCompressionExhaustedEXT"; case Result::eIncompatibleShaderBinaryEXT: return "IncompatibleShaderBinaryEXT"; case Result::ePipelineBinaryMissingKHR: return "PipelineBinaryMissingKHR"; case Result::eErrorNotEnoughSpaceKHR: return "ErrorNotEnoughSpaceKHR"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( StructureType value ) { switch ( value ) { case StructureType::eApplicationInfo: return "ApplicationInfo"; case StructureType::eInstanceCreateInfo: return "InstanceCreateInfo"; case StructureType::eDeviceQueueCreateInfo: return "DeviceQueueCreateInfo"; case StructureType::eDeviceCreateInfo: return "DeviceCreateInfo"; case StructureType::eSubmitInfo: return "SubmitInfo"; case StructureType::eMemoryAllocateInfo: return "MemoryAllocateInfo"; case StructureType::eMappedMemoryRange: return "MappedMemoryRange"; case StructureType::eBindSparseInfo: return "BindSparseInfo"; case StructureType::eFenceCreateInfo: return "FenceCreateInfo"; case StructureType::eSemaphoreCreateInfo: return "SemaphoreCreateInfo"; case StructureType::eEventCreateInfo: return "EventCreateInfo"; case StructureType::eQueryPoolCreateInfo: return "QueryPoolCreateInfo"; case StructureType::eBufferCreateInfo: return "BufferCreateInfo"; case StructureType::eBufferViewCreateInfo: return "BufferViewCreateInfo"; case StructureType::eImageCreateInfo: return "ImageCreateInfo"; case StructureType::eImageViewCreateInfo: return "ImageViewCreateInfo"; case StructureType::eShaderModuleCreateInfo: return "ShaderModuleCreateInfo"; case StructureType::ePipelineCacheCreateInfo: return "PipelineCacheCreateInfo"; case StructureType::ePipelineShaderStageCreateInfo: return "PipelineShaderStageCreateInfo"; case StructureType::ePipelineVertexInputStateCreateInfo: return "PipelineVertexInputStateCreateInfo"; case StructureType::ePipelineInputAssemblyStateCreateInfo: return "PipelineInputAssemblyStateCreateInfo"; case StructureType::ePipelineTessellationStateCreateInfo: return "PipelineTessellationStateCreateInfo"; case StructureType::ePipelineViewportStateCreateInfo: return "PipelineViewportStateCreateInfo"; case StructureType::ePipelineRasterizationStateCreateInfo: return "PipelineRasterizationStateCreateInfo"; case StructureType::ePipelineMultisampleStateCreateInfo: return "PipelineMultisampleStateCreateInfo"; case StructureType::ePipelineDepthStencilStateCreateInfo: return "PipelineDepthStencilStateCreateInfo"; case StructureType::ePipelineColorBlendStateCreateInfo: return "PipelineColorBlendStateCreateInfo"; case StructureType::ePipelineDynamicStateCreateInfo: return "PipelineDynamicStateCreateInfo"; case StructureType::eGraphicsPipelineCreateInfo: return "GraphicsPipelineCreateInfo"; case StructureType::eComputePipelineCreateInfo: return "ComputePipelineCreateInfo"; case StructureType::ePipelineLayoutCreateInfo: return "PipelineLayoutCreateInfo"; case StructureType::eSamplerCreateInfo: return "SamplerCreateInfo"; case StructureType::eDescriptorSetLayoutCreateInfo: return "DescriptorSetLayoutCreateInfo"; case StructureType::eDescriptorPoolCreateInfo: return "DescriptorPoolCreateInfo"; case StructureType::eDescriptorSetAllocateInfo: return "DescriptorSetAllocateInfo"; case StructureType::eWriteDescriptorSet: return "WriteDescriptorSet"; case StructureType::eCopyDescriptorSet: return "CopyDescriptorSet"; case StructureType::eFramebufferCreateInfo: return "FramebufferCreateInfo"; case StructureType::eRenderPassCreateInfo: return "RenderPassCreateInfo"; case StructureType::eCommandPoolCreateInfo: return "CommandPoolCreateInfo"; case StructureType::eCommandBufferAllocateInfo: return "CommandBufferAllocateInfo"; case StructureType::eCommandBufferInheritanceInfo: return "CommandBufferInheritanceInfo"; case StructureType::eCommandBufferBeginInfo: return "CommandBufferBeginInfo"; case StructureType::eRenderPassBeginInfo: return "RenderPassBeginInfo"; case StructureType::eBufferMemoryBarrier: return "BufferMemoryBarrier"; case StructureType::eImageMemoryBarrier: return "ImageMemoryBarrier"; case StructureType::eMemoryBarrier: return "MemoryBarrier"; case StructureType::eLoaderInstanceCreateInfo: return "LoaderInstanceCreateInfo"; case StructureType::eLoaderDeviceCreateInfo: return "LoaderDeviceCreateInfo"; case StructureType::ePhysicalDeviceSubgroupProperties: return "PhysicalDeviceSubgroupProperties"; case StructureType::eBindBufferMemoryInfo: return "BindBufferMemoryInfo"; case StructureType::eBindImageMemoryInfo: return "BindImageMemoryInfo"; case StructureType::ePhysicalDevice16BitStorageFeatures: return "PhysicalDevice16BitStorageFeatures"; case StructureType::eMemoryDedicatedRequirements: return "MemoryDedicatedRequirements"; case StructureType::eMemoryDedicatedAllocateInfo: return "MemoryDedicatedAllocateInfo"; case StructureType::eMemoryAllocateFlagsInfo: return "MemoryAllocateFlagsInfo"; case StructureType::eDeviceGroupRenderPassBeginInfo: return "DeviceGroupRenderPassBeginInfo"; case StructureType::eDeviceGroupCommandBufferBeginInfo: return "DeviceGroupCommandBufferBeginInfo"; case StructureType::eDeviceGroupSubmitInfo: return "DeviceGroupSubmitInfo"; case StructureType::eDeviceGroupBindSparseInfo: return "DeviceGroupBindSparseInfo"; case StructureType::eBindBufferMemoryDeviceGroupInfo: return "BindBufferMemoryDeviceGroupInfo"; case StructureType::eBindImageMemoryDeviceGroupInfo: return "BindImageMemoryDeviceGroupInfo"; case StructureType::ePhysicalDeviceGroupProperties: return "PhysicalDeviceGroupProperties"; case StructureType::eDeviceGroupDeviceCreateInfo: return "DeviceGroupDeviceCreateInfo"; case StructureType::eBufferMemoryRequirementsInfo2: return "BufferMemoryRequirementsInfo2"; case StructureType::eImageMemoryRequirementsInfo2: return "ImageMemoryRequirementsInfo2"; case StructureType::eImageSparseMemoryRequirementsInfo2: return "ImageSparseMemoryRequirementsInfo2"; case StructureType::eMemoryRequirements2: return "MemoryRequirements2"; case StructureType::eSparseImageMemoryRequirements2: return "SparseImageMemoryRequirements2"; case StructureType::ePhysicalDeviceFeatures2: return "PhysicalDeviceFeatures2"; case StructureType::ePhysicalDeviceProperties2: return "PhysicalDeviceProperties2"; case StructureType::eFormatProperties2: return "FormatProperties2"; case StructureType::eImageFormatProperties2: return "ImageFormatProperties2"; case StructureType::ePhysicalDeviceImageFormatInfo2: return "PhysicalDeviceImageFormatInfo2"; case StructureType::eQueueFamilyProperties2: return "QueueFamilyProperties2"; case StructureType::ePhysicalDeviceMemoryProperties2: return "PhysicalDeviceMemoryProperties2"; case StructureType::eSparseImageFormatProperties2: return "SparseImageFormatProperties2"; case StructureType::ePhysicalDeviceSparseImageFormatInfo2: return "PhysicalDeviceSparseImageFormatInfo2"; case StructureType::ePhysicalDevicePointClippingProperties: return "PhysicalDevicePointClippingProperties"; case StructureType::eRenderPassInputAttachmentAspectCreateInfo: return "RenderPassInputAttachmentAspectCreateInfo"; case StructureType::eImageViewUsageCreateInfo: return "ImageViewUsageCreateInfo"; case StructureType::ePipelineTessellationDomainOriginStateCreateInfo: return "PipelineTessellationDomainOriginStateCreateInfo"; case StructureType::eRenderPassMultiviewCreateInfo: return "RenderPassMultiviewCreateInfo"; case StructureType::ePhysicalDeviceMultiviewFeatures: return "PhysicalDeviceMultiviewFeatures"; case StructureType::ePhysicalDeviceMultiviewProperties: return "PhysicalDeviceMultiviewProperties"; case StructureType::ePhysicalDeviceVariablePointersFeatures: return "PhysicalDeviceVariablePointersFeatures"; case StructureType::eProtectedSubmitInfo: return "ProtectedSubmitInfo"; case StructureType::ePhysicalDeviceProtectedMemoryFeatures: return "PhysicalDeviceProtectedMemoryFeatures"; case StructureType::ePhysicalDeviceProtectedMemoryProperties: return "PhysicalDeviceProtectedMemoryProperties"; case StructureType::eDeviceQueueInfo2: return "DeviceQueueInfo2"; case StructureType::eSamplerYcbcrConversionCreateInfo: return "SamplerYcbcrConversionCreateInfo"; case StructureType::eSamplerYcbcrConversionInfo: return "SamplerYcbcrConversionInfo"; case StructureType::eBindImagePlaneMemoryInfo: return "BindImagePlaneMemoryInfo"; case StructureType::eImagePlaneMemoryRequirementsInfo: return "ImagePlaneMemoryRequirementsInfo"; case StructureType::ePhysicalDeviceSamplerYcbcrConversionFeatures: return "PhysicalDeviceSamplerYcbcrConversionFeatures"; case StructureType::eSamplerYcbcrConversionImageFormatProperties: return "SamplerYcbcrConversionImageFormatProperties"; case StructureType::eDescriptorUpdateTemplateCreateInfo: return "DescriptorUpdateTemplateCreateInfo"; case StructureType::ePhysicalDeviceExternalImageFormatInfo: return "PhysicalDeviceExternalImageFormatInfo"; case StructureType::eExternalImageFormatProperties: return "ExternalImageFormatProperties"; case StructureType::ePhysicalDeviceExternalBufferInfo: return "PhysicalDeviceExternalBufferInfo"; case StructureType::eExternalBufferProperties: return "ExternalBufferProperties"; case StructureType::ePhysicalDeviceIdProperties: return "PhysicalDeviceIdProperties"; case StructureType::eExternalMemoryBufferCreateInfo: return "ExternalMemoryBufferCreateInfo"; case StructureType::eExternalMemoryImageCreateInfo: return "ExternalMemoryImageCreateInfo"; case StructureType::eExportMemoryAllocateInfo: return "ExportMemoryAllocateInfo"; case StructureType::ePhysicalDeviceExternalFenceInfo: return "PhysicalDeviceExternalFenceInfo"; case StructureType::eExternalFenceProperties: return "ExternalFenceProperties"; case StructureType::eExportFenceCreateInfo: return "ExportFenceCreateInfo"; case StructureType::eExportSemaphoreCreateInfo: return "ExportSemaphoreCreateInfo"; case StructureType::ePhysicalDeviceExternalSemaphoreInfo: return "PhysicalDeviceExternalSemaphoreInfo"; case StructureType::eExternalSemaphoreProperties: return "ExternalSemaphoreProperties"; case StructureType::ePhysicalDeviceMaintenance3Properties: return "PhysicalDeviceMaintenance3Properties"; case StructureType::eDescriptorSetLayoutSupport: return "DescriptorSetLayoutSupport"; case StructureType::ePhysicalDeviceShaderDrawParametersFeatures: return "PhysicalDeviceShaderDrawParametersFeatures"; case StructureType::ePhysicalDeviceVulkan11Features: return "PhysicalDeviceVulkan11Features"; case StructureType::ePhysicalDeviceVulkan11Properties: return "PhysicalDeviceVulkan11Properties"; case StructureType::ePhysicalDeviceVulkan12Features: return "PhysicalDeviceVulkan12Features"; case StructureType::ePhysicalDeviceVulkan12Properties: return "PhysicalDeviceVulkan12Properties"; case StructureType::eImageFormatListCreateInfo: return "ImageFormatListCreateInfo"; case StructureType::eAttachmentDescription2: return "AttachmentDescription2"; case StructureType::eAttachmentReference2: return "AttachmentReference2"; case StructureType::eSubpassDescription2: return "SubpassDescription2"; case StructureType::eSubpassDependency2: return "SubpassDependency2"; case StructureType::eRenderPassCreateInfo2: return "RenderPassCreateInfo2"; case StructureType::eSubpassBeginInfo: return "SubpassBeginInfo"; case StructureType::eSubpassEndInfo: return "SubpassEndInfo"; case StructureType::ePhysicalDevice8BitStorageFeatures: return "PhysicalDevice8BitStorageFeatures"; case StructureType::ePhysicalDeviceDriverProperties: return "PhysicalDeviceDriverProperties"; case StructureType::ePhysicalDeviceShaderAtomicInt64Features: return "PhysicalDeviceShaderAtomicInt64Features"; case StructureType::ePhysicalDeviceShaderFloat16Int8Features: return "PhysicalDeviceShaderFloat16Int8Features"; case StructureType::ePhysicalDeviceFloatControlsProperties: return "PhysicalDeviceFloatControlsProperties"; case StructureType::eDescriptorSetLayoutBindingFlagsCreateInfo: return "DescriptorSetLayoutBindingFlagsCreateInfo"; case StructureType::ePhysicalDeviceDescriptorIndexingFeatures: return "PhysicalDeviceDescriptorIndexingFeatures"; case StructureType::ePhysicalDeviceDescriptorIndexingProperties: return "PhysicalDeviceDescriptorIndexingProperties"; case StructureType::eDescriptorSetVariableDescriptorCountAllocateInfo: return "DescriptorSetVariableDescriptorCountAllocateInfo"; case StructureType::eDescriptorSetVariableDescriptorCountLayoutSupport: return "DescriptorSetVariableDescriptorCountLayoutSupport"; case StructureType::ePhysicalDeviceDepthStencilResolveProperties: return "PhysicalDeviceDepthStencilResolveProperties"; case StructureType::eSubpassDescriptionDepthStencilResolve: return "SubpassDescriptionDepthStencilResolve"; case StructureType::ePhysicalDeviceScalarBlockLayoutFeatures: return "PhysicalDeviceScalarBlockLayoutFeatures"; case StructureType::eImageStencilUsageCreateInfo: return "ImageStencilUsageCreateInfo"; case StructureType::ePhysicalDeviceSamplerFilterMinmaxProperties: return "PhysicalDeviceSamplerFilterMinmaxProperties"; case StructureType::eSamplerReductionModeCreateInfo: return "SamplerReductionModeCreateInfo"; case StructureType::ePhysicalDeviceVulkanMemoryModelFeatures: return "PhysicalDeviceVulkanMemoryModelFeatures"; case StructureType::ePhysicalDeviceImagelessFramebufferFeatures: return "PhysicalDeviceImagelessFramebufferFeatures"; case StructureType::eFramebufferAttachmentsCreateInfo: return "FramebufferAttachmentsCreateInfo"; case StructureType::eFramebufferAttachmentImageInfo: return "FramebufferAttachmentImageInfo"; case StructureType::eRenderPassAttachmentBeginInfo: return "RenderPassAttachmentBeginInfo"; case StructureType::ePhysicalDeviceUniformBufferStandardLayoutFeatures: return "PhysicalDeviceUniformBufferStandardLayoutFeatures"; case StructureType::ePhysicalDeviceShaderSubgroupExtendedTypesFeatures: return "PhysicalDeviceShaderSubgroupExtendedTypesFeatures"; case StructureType::ePhysicalDeviceSeparateDepthStencilLayoutsFeatures: return "PhysicalDeviceSeparateDepthStencilLayoutsFeatures"; case StructureType::eAttachmentReferenceStencilLayout: return "AttachmentReferenceStencilLayout"; case StructureType::eAttachmentDescriptionStencilLayout: return "AttachmentDescriptionStencilLayout"; case StructureType::ePhysicalDeviceHostQueryResetFeatures: return "PhysicalDeviceHostQueryResetFeatures"; case StructureType::ePhysicalDeviceTimelineSemaphoreFeatures: return "PhysicalDeviceTimelineSemaphoreFeatures"; case StructureType::ePhysicalDeviceTimelineSemaphoreProperties: return "PhysicalDeviceTimelineSemaphoreProperties"; case StructureType::eSemaphoreTypeCreateInfo: return "SemaphoreTypeCreateInfo"; case StructureType::eTimelineSemaphoreSubmitInfo: return "TimelineSemaphoreSubmitInfo"; case StructureType::eSemaphoreWaitInfo: return "SemaphoreWaitInfo"; case StructureType::eSemaphoreSignalInfo: return "SemaphoreSignalInfo"; case StructureType::ePhysicalDeviceBufferDeviceAddressFeatures: return "PhysicalDeviceBufferDeviceAddressFeatures"; case StructureType::eBufferDeviceAddressInfo: return "BufferDeviceAddressInfo"; case StructureType::eBufferOpaqueCaptureAddressCreateInfo: return "BufferOpaqueCaptureAddressCreateInfo"; case StructureType::eMemoryOpaqueCaptureAddressAllocateInfo: return "MemoryOpaqueCaptureAddressAllocateInfo"; case StructureType::eDeviceMemoryOpaqueCaptureAddressInfo: return "DeviceMemoryOpaqueCaptureAddressInfo"; case StructureType::ePhysicalDeviceVulkan13Features: return "PhysicalDeviceVulkan13Features"; case StructureType::ePhysicalDeviceVulkan13Properties: return "PhysicalDeviceVulkan13Properties"; case StructureType::ePipelineCreationFeedbackCreateInfo: return "PipelineCreationFeedbackCreateInfo"; case StructureType::ePhysicalDeviceShaderTerminateInvocationFeatures: return "PhysicalDeviceShaderTerminateInvocationFeatures"; case StructureType::ePhysicalDeviceToolProperties: return "PhysicalDeviceToolProperties"; case StructureType::ePhysicalDeviceShaderDemoteToHelperInvocationFeatures: return "PhysicalDeviceShaderDemoteToHelperInvocationFeatures"; case StructureType::ePhysicalDevicePrivateDataFeatures: return "PhysicalDevicePrivateDataFeatures"; case StructureType::eDevicePrivateDataCreateInfo: return "DevicePrivateDataCreateInfo"; case StructureType::ePrivateDataSlotCreateInfo: return "PrivateDataSlotCreateInfo"; case StructureType::ePhysicalDevicePipelineCreationCacheControlFeatures: return "PhysicalDevicePipelineCreationCacheControlFeatures"; case StructureType::eMemoryBarrier2: return "MemoryBarrier2"; case StructureType::eBufferMemoryBarrier2: return "BufferMemoryBarrier2"; case StructureType::eImageMemoryBarrier2: return "ImageMemoryBarrier2"; case StructureType::eDependencyInfo: return "DependencyInfo"; case StructureType::eSubmitInfo2: return "SubmitInfo2"; case StructureType::eSemaphoreSubmitInfo: return "SemaphoreSubmitInfo"; case StructureType::eCommandBufferSubmitInfo: return "CommandBufferSubmitInfo"; case StructureType::ePhysicalDeviceSynchronization2Features: return "PhysicalDeviceSynchronization2Features"; case StructureType::ePhysicalDeviceZeroInitializeWorkgroupMemoryFeatures: return "PhysicalDeviceZeroInitializeWorkgroupMemoryFeatures"; case StructureType::ePhysicalDeviceImageRobustnessFeatures: return "PhysicalDeviceImageRobustnessFeatures"; case StructureType::eCopyBufferInfo2: return "CopyBufferInfo2"; case StructureType::eCopyImageInfo2: return "CopyImageInfo2"; case StructureType::eCopyBufferToImageInfo2: return "CopyBufferToImageInfo2"; case StructureType::eCopyImageToBufferInfo2: return "CopyImageToBufferInfo2"; case StructureType::eBlitImageInfo2: return "BlitImageInfo2"; case StructureType::eResolveImageInfo2: return "ResolveImageInfo2"; case StructureType::eBufferCopy2: return "BufferCopy2"; case StructureType::eImageCopy2: return "ImageCopy2"; case StructureType::eImageBlit2: return "ImageBlit2"; case StructureType::eBufferImageCopy2: return "BufferImageCopy2"; case StructureType::eImageResolve2: return "ImageResolve2"; case StructureType::ePhysicalDeviceSubgroupSizeControlProperties: return "PhysicalDeviceSubgroupSizeControlProperties"; case StructureType::ePipelineShaderStageRequiredSubgroupSizeCreateInfo: return "PipelineShaderStageRequiredSubgroupSizeCreateInfo"; case StructureType::ePhysicalDeviceSubgroupSizeControlFeatures: return "PhysicalDeviceSubgroupSizeControlFeatures"; case StructureType::ePhysicalDeviceInlineUniformBlockFeatures: return "PhysicalDeviceInlineUniformBlockFeatures"; case StructureType::ePhysicalDeviceInlineUniformBlockProperties: return "PhysicalDeviceInlineUniformBlockProperties"; case StructureType::eWriteDescriptorSetInlineUniformBlock: return "WriteDescriptorSetInlineUniformBlock"; case StructureType::eDescriptorPoolInlineUniformBlockCreateInfo: return "DescriptorPoolInlineUniformBlockCreateInfo"; case StructureType::ePhysicalDeviceTextureCompressionAstcHdrFeatures: return "PhysicalDeviceTextureCompressionAstcHdrFeatures"; case StructureType::eRenderingInfo: return "RenderingInfo"; case StructureType::eRenderingAttachmentInfo: return "RenderingAttachmentInfo"; case StructureType::ePipelineRenderingCreateInfo: return "PipelineRenderingCreateInfo"; case StructureType::ePhysicalDeviceDynamicRenderingFeatures: return "PhysicalDeviceDynamicRenderingFeatures"; case StructureType::eCommandBufferInheritanceRenderingInfo: return "CommandBufferInheritanceRenderingInfo"; case StructureType::ePhysicalDeviceShaderIntegerDotProductFeatures: return "PhysicalDeviceShaderIntegerDotProductFeatures"; case StructureType::ePhysicalDeviceShaderIntegerDotProductProperties: return "PhysicalDeviceShaderIntegerDotProductProperties"; case StructureType::ePhysicalDeviceTexelBufferAlignmentProperties: return "PhysicalDeviceTexelBufferAlignmentProperties"; case StructureType::eFormatProperties3: return "FormatProperties3"; case StructureType::ePhysicalDeviceMaintenance4Features: return "PhysicalDeviceMaintenance4Features"; case StructureType::ePhysicalDeviceMaintenance4Properties: return "PhysicalDeviceMaintenance4Properties"; case StructureType::eDeviceBufferMemoryRequirements: return "DeviceBufferMemoryRequirements"; case StructureType::eDeviceImageMemoryRequirements: return "DeviceImageMemoryRequirements"; case StructureType::ePhysicalDeviceVulkan14Features: return "PhysicalDeviceVulkan14Features"; case StructureType::ePhysicalDeviceVulkan14Properties: return "PhysicalDeviceVulkan14Properties"; case StructureType::eDeviceQueueGlobalPriorityCreateInfo: return "DeviceQueueGlobalPriorityCreateInfo"; case StructureType::ePhysicalDeviceGlobalPriorityQueryFeatures: return "PhysicalDeviceGlobalPriorityQueryFeatures"; case StructureType::eQueueFamilyGlobalPriorityProperties: return "QueueFamilyGlobalPriorityProperties"; case StructureType::ePhysicalDeviceShaderSubgroupRotateFeatures: return "PhysicalDeviceShaderSubgroupRotateFeatures"; case StructureType::ePhysicalDeviceShaderFloatControls2Features: return "PhysicalDeviceShaderFloatControls2Features"; case StructureType::ePhysicalDeviceShaderExpectAssumeFeatures: return "PhysicalDeviceShaderExpectAssumeFeatures"; case StructureType::ePhysicalDeviceLineRasterizationFeatures: return "PhysicalDeviceLineRasterizationFeatures"; case StructureType::ePipelineRasterizationLineStateCreateInfo: return "PipelineRasterizationLineStateCreateInfo"; case StructureType::ePhysicalDeviceLineRasterizationProperties: return "PhysicalDeviceLineRasterizationProperties"; case StructureType::ePhysicalDeviceVertexAttributeDivisorProperties: return "PhysicalDeviceVertexAttributeDivisorProperties"; case StructureType::ePipelineVertexInputDivisorStateCreateInfo: return "PipelineVertexInputDivisorStateCreateInfo"; case StructureType::ePhysicalDeviceVertexAttributeDivisorFeatures: return "PhysicalDeviceVertexAttributeDivisorFeatures"; case StructureType::ePhysicalDeviceIndexTypeUint8Features: return "PhysicalDeviceIndexTypeUint8Features"; case StructureType::eMemoryMapInfo: return "MemoryMapInfo"; case StructureType::eMemoryUnmapInfo: return "MemoryUnmapInfo"; case StructureType::ePhysicalDeviceMaintenance5Features: return "PhysicalDeviceMaintenance5Features"; case StructureType::ePhysicalDeviceMaintenance5Properties: return "PhysicalDeviceMaintenance5Properties"; case StructureType::eRenderingAreaInfo: return "RenderingAreaInfo"; case StructureType::eDeviceImageSubresourceInfo: return "DeviceImageSubresourceInfo"; case StructureType::eSubresourceLayout2: return "SubresourceLayout2"; case StructureType::eImageSubresource2: return "ImageSubresource2"; case StructureType::ePipelineCreateFlags2CreateInfo: return "PipelineCreateFlags2CreateInfo"; case StructureType::eBufferUsageFlags2CreateInfo: return "BufferUsageFlags2CreateInfo"; case StructureType::ePhysicalDevicePushDescriptorProperties: return "PhysicalDevicePushDescriptorProperties"; case StructureType::ePhysicalDeviceDynamicRenderingLocalReadFeatures: return "PhysicalDeviceDynamicRenderingLocalReadFeatures"; case StructureType::eRenderingAttachmentLocationInfo: return "RenderingAttachmentLocationInfo"; case StructureType::eRenderingInputAttachmentIndexInfo: return "RenderingInputAttachmentIndexInfo"; case StructureType::ePhysicalDeviceMaintenance6Features: return "PhysicalDeviceMaintenance6Features"; case StructureType::ePhysicalDeviceMaintenance6Properties: return "PhysicalDeviceMaintenance6Properties"; case StructureType::eBindMemoryStatus: return "BindMemoryStatus"; case StructureType::eBindDescriptorSetsInfo: return "BindDescriptorSetsInfo"; case StructureType::ePushConstantsInfo: return "PushConstantsInfo"; case StructureType::ePushDescriptorSetInfo: return "PushDescriptorSetInfo"; case StructureType::ePushDescriptorSetWithTemplateInfo: return "PushDescriptorSetWithTemplateInfo"; case StructureType::ePhysicalDevicePipelineProtectedAccessFeatures: return "PhysicalDevicePipelineProtectedAccessFeatures"; case StructureType::ePipelineRobustnessCreateInfo: return "PipelineRobustnessCreateInfo"; case StructureType::ePhysicalDevicePipelineRobustnessFeatures: return "PhysicalDevicePipelineRobustnessFeatures"; case StructureType::ePhysicalDevicePipelineRobustnessProperties: return "PhysicalDevicePipelineRobustnessProperties"; case StructureType::ePhysicalDeviceHostImageCopyFeatures: return "PhysicalDeviceHostImageCopyFeatures"; case StructureType::ePhysicalDeviceHostImageCopyProperties: return "PhysicalDeviceHostImageCopyProperties"; case StructureType::eMemoryToImageCopy: return "MemoryToImageCopy"; case StructureType::eImageToMemoryCopy: return "ImageToMemoryCopy"; case StructureType::eCopyImageToMemoryInfo: return "CopyImageToMemoryInfo"; case StructureType::eCopyMemoryToImageInfo: return "CopyMemoryToImageInfo"; case StructureType::eHostImageLayoutTransitionInfo: return "HostImageLayoutTransitionInfo"; case StructureType::eCopyImageToImageInfo: return "CopyImageToImageInfo"; case StructureType::eSubresourceHostMemcpySize: return "SubresourceHostMemcpySize"; case StructureType::eHostImageCopyDevicePerformanceQuery: return "HostImageCopyDevicePerformanceQuery"; case StructureType::eSwapchainCreateInfoKHR: return "SwapchainCreateInfoKHR"; case StructureType::ePresentInfoKHR: return "PresentInfoKHR"; case StructureType::eDeviceGroupPresentCapabilitiesKHR: return "DeviceGroupPresentCapabilitiesKHR"; case StructureType::eImageSwapchainCreateInfoKHR: return "ImageSwapchainCreateInfoKHR"; case StructureType::eBindImageMemorySwapchainInfoKHR: return "BindImageMemorySwapchainInfoKHR"; case StructureType::eAcquireNextImageInfoKHR: return "AcquireNextImageInfoKHR"; case StructureType::eDeviceGroupPresentInfoKHR: return "DeviceGroupPresentInfoKHR"; case StructureType::eDeviceGroupSwapchainCreateInfoKHR: return "DeviceGroupSwapchainCreateInfoKHR"; case StructureType::eDisplayModeCreateInfoKHR: return "DisplayModeCreateInfoKHR"; case StructureType::eDisplaySurfaceCreateInfoKHR: return "DisplaySurfaceCreateInfoKHR"; case StructureType::eDisplayPresentInfoKHR: return "DisplayPresentInfoKHR"; #if defined( VK_USE_PLATFORM_XLIB_KHR ) case StructureType::eXlibSurfaceCreateInfoKHR: return "XlibSurfaceCreateInfoKHR"; #endif /*VK_USE_PLATFORM_XLIB_KHR*/ #if defined( VK_USE_PLATFORM_XCB_KHR ) case StructureType::eXcbSurfaceCreateInfoKHR: return "XcbSurfaceCreateInfoKHR"; #endif /*VK_USE_PLATFORM_XCB_KHR*/ #if defined( VK_USE_PLATFORM_WAYLAND_KHR ) case StructureType::eWaylandSurfaceCreateInfoKHR: return "WaylandSurfaceCreateInfoKHR"; #endif /*VK_USE_PLATFORM_WAYLAND_KHR*/ #if defined( VK_USE_PLATFORM_ANDROID_KHR ) case StructureType::eAndroidSurfaceCreateInfoKHR: return "AndroidSurfaceCreateInfoKHR"; #endif /*VK_USE_PLATFORM_ANDROID_KHR*/ #if defined( VK_USE_PLATFORM_WIN32_KHR ) case StructureType::eWin32SurfaceCreateInfoKHR: return "Win32SurfaceCreateInfoKHR"; #endif /*VK_USE_PLATFORM_WIN32_KHR*/ case StructureType::eDebugReportCallbackCreateInfoEXT: return "DebugReportCallbackCreateInfoEXT"; case StructureType::ePipelineRasterizationStateRasterizationOrderAMD: return "PipelineRasterizationStateRasterizationOrderAMD"; case StructureType::eDebugMarkerObjectNameInfoEXT: return "DebugMarkerObjectNameInfoEXT"; case StructureType::eDebugMarkerObjectTagInfoEXT: return "DebugMarkerObjectTagInfoEXT"; case StructureType::eDebugMarkerMarkerInfoEXT: return "DebugMarkerMarkerInfoEXT"; case StructureType::eVideoProfileInfoKHR: return "VideoProfileInfoKHR"; case StructureType::eVideoCapabilitiesKHR: return "VideoCapabilitiesKHR"; case StructureType::eVideoPictureResourceInfoKHR: return "VideoPictureResourceInfoKHR"; case StructureType::eVideoSessionMemoryRequirementsKHR: return "VideoSessionMemoryRequirementsKHR"; case StructureType::eBindVideoSessionMemoryInfoKHR: return "BindVideoSessionMemoryInfoKHR"; case StructureType::eVideoSessionCreateInfoKHR: return "VideoSessionCreateInfoKHR"; case StructureType::eVideoSessionParametersCreateInfoKHR: return "VideoSessionParametersCreateInfoKHR"; case StructureType::eVideoSessionParametersUpdateInfoKHR: return "VideoSessionParametersUpdateInfoKHR"; case StructureType::eVideoBeginCodingInfoKHR: return "VideoBeginCodingInfoKHR"; case StructureType::eVideoEndCodingInfoKHR: return "VideoEndCodingInfoKHR"; case StructureType::eVideoCodingControlInfoKHR: return "VideoCodingControlInfoKHR"; case StructureType::eVideoReferenceSlotInfoKHR: return "VideoReferenceSlotInfoKHR"; case StructureType::eQueueFamilyVideoPropertiesKHR: return "QueueFamilyVideoPropertiesKHR"; case StructureType::eVideoProfileListInfoKHR: return "VideoProfileListInfoKHR"; case StructureType::ePhysicalDeviceVideoFormatInfoKHR: return "PhysicalDeviceVideoFormatInfoKHR"; case StructureType::eVideoFormatPropertiesKHR: return "VideoFormatPropertiesKHR"; case StructureType::eQueueFamilyQueryResultStatusPropertiesKHR: return "QueueFamilyQueryResultStatusPropertiesKHR"; case StructureType::eVideoDecodeInfoKHR: return "VideoDecodeInfoKHR"; case StructureType::eVideoDecodeCapabilitiesKHR: return "VideoDecodeCapabilitiesKHR"; case StructureType::eVideoDecodeUsageInfoKHR: return "VideoDecodeUsageInfoKHR"; case StructureType::eDedicatedAllocationImageCreateInfoNV: return "DedicatedAllocationImageCreateInfoNV"; case StructureType::eDedicatedAllocationBufferCreateInfoNV: return "DedicatedAllocationBufferCreateInfoNV"; case StructureType::eDedicatedAllocationMemoryAllocateInfoNV: return "DedicatedAllocationMemoryAllocateInfoNV"; case StructureType::ePhysicalDeviceTransformFeedbackFeaturesEXT: return "PhysicalDeviceTransformFeedbackFeaturesEXT"; case StructureType::ePhysicalDeviceTransformFeedbackPropertiesEXT: return "PhysicalDeviceTransformFeedbackPropertiesEXT"; case StructureType::ePipelineRasterizationStateStreamCreateInfoEXT: return "PipelineRasterizationStateStreamCreateInfoEXT"; case StructureType::eCuModuleCreateInfoNVX: return "CuModuleCreateInfoNVX"; case StructureType::eCuFunctionCreateInfoNVX: return "CuFunctionCreateInfoNVX"; case StructureType::eCuLaunchInfoNVX: return "CuLaunchInfoNVX"; case StructureType::eCuModuleTexturingModeCreateInfoNVX: return "CuModuleTexturingModeCreateInfoNVX"; case StructureType::eImageViewHandleInfoNVX: return "ImageViewHandleInfoNVX"; case StructureType::eImageViewAddressPropertiesNVX: return "ImageViewAddressPropertiesNVX"; case StructureType::eVideoEncodeH264CapabilitiesKHR: return "VideoEncodeH264CapabilitiesKHR"; case StructureType::eVideoEncodeH264SessionParametersCreateInfoKHR: return "VideoEncodeH264SessionParametersCreateInfoKHR"; case StructureType::eVideoEncodeH264SessionParametersAddInfoKHR: return "VideoEncodeH264SessionParametersAddInfoKHR"; case StructureType::eVideoEncodeH264PictureInfoKHR: return "VideoEncodeH264PictureInfoKHR"; case StructureType::eVideoEncodeH264DpbSlotInfoKHR: return "VideoEncodeH264DpbSlotInfoKHR"; case StructureType::eVideoEncodeH264NaluSliceInfoKHR: return "VideoEncodeH264NaluSliceInfoKHR"; case StructureType::eVideoEncodeH264GopRemainingFrameInfoKHR: return "VideoEncodeH264GopRemainingFrameInfoKHR"; case StructureType::eVideoEncodeH264ProfileInfoKHR: return "VideoEncodeH264ProfileInfoKHR"; case StructureType::eVideoEncodeH264RateControlInfoKHR: return "VideoEncodeH264RateControlInfoKHR"; case StructureType::eVideoEncodeH264RateControlLayerInfoKHR: return "VideoEncodeH264RateControlLayerInfoKHR"; case StructureType::eVideoEncodeH264SessionCreateInfoKHR: return "VideoEncodeH264SessionCreateInfoKHR"; case StructureType::eVideoEncodeH264QualityLevelPropertiesKHR: return "VideoEncodeH264QualityLevelPropertiesKHR"; case StructureType::eVideoEncodeH264SessionParametersGetInfoKHR: return "VideoEncodeH264SessionParametersGetInfoKHR"; case StructureType::eVideoEncodeH264SessionParametersFeedbackInfoKHR: return "VideoEncodeH264SessionParametersFeedbackInfoKHR"; case StructureType::eVideoEncodeH265CapabilitiesKHR: return "VideoEncodeH265CapabilitiesKHR"; case StructureType::eVideoEncodeH265SessionParametersCreateInfoKHR: return "VideoEncodeH265SessionParametersCreateInfoKHR"; case StructureType::eVideoEncodeH265SessionParametersAddInfoKHR: return "VideoEncodeH265SessionParametersAddInfoKHR"; case StructureType::eVideoEncodeH265PictureInfoKHR: return "VideoEncodeH265PictureInfoKHR"; case StructureType::eVideoEncodeH265DpbSlotInfoKHR: return "VideoEncodeH265DpbSlotInfoKHR"; case StructureType::eVideoEncodeH265NaluSliceSegmentInfoKHR: return "VideoEncodeH265NaluSliceSegmentInfoKHR"; case StructureType::eVideoEncodeH265GopRemainingFrameInfoKHR: return "VideoEncodeH265GopRemainingFrameInfoKHR"; case StructureType::eVideoEncodeH265ProfileInfoKHR: return "VideoEncodeH265ProfileInfoKHR"; case StructureType::eVideoEncodeH265RateControlInfoKHR: return "VideoEncodeH265RateControlInfoKHR"; case StructureType::eVideoEncodeH265RateControlLayerInfoKHR: return "VideoEncodeH265RateControlLayerInfoKHR"; case StructureType::eVideoEncodeH265SessionCreateInfoKHR: return "VideoEncodeH265SessionCreateInfoKHR"; case StructureType::eVideoEncodeH265QualityLevelPropertiesKHR: return "VideoEncodeH265QualityLevelPropertiesKHR"; case StructureType::eVideoEncodeH265SessionParametersGetInfoKHR: return "VideoEncodeH265SessionParametersGetInfoKHR"; case StructureType::eVideoEncodeH265SessionParametersFeedbackInfoKHR: return "VideoEncodeH265SessionParametersFeedbackInfoKHR"; case StructureType::eVideoDecodeH264CapabilitiesKHR: return "VideoDecodeH264CapabilitiesKHR"; case StructureType::eVideoDecodeH264PictureInfoKHR: return "VideoDecodeH264PictureInfoKHR"; case StructureType::eVideoDecodeH264ProfileInfoKHR: return "VideoDecodeH264ProfileInfoKHR"; case StructureType::eVideoDecodeH264SessionParametersCreateInfoKHR: return "VideoDecodeH264SessionParametersCreateInfoKHR"; case StructureType::eVideoDecodeH264SessionParametersAddInfoKHR: return "VideoDecodeH264SessionParametersAddInfoKHR"; case StructureType::eVideoDecodeH264DpbSlotInfoKHR: return "VideoDecodeH264DpbSlotInfoKHR"; case StructureType::eTextureLodGatherFormatPropertiesAMD: return "TextureLodGatherFormatPropertiesAMD"; #if defined( VK_USE_PLATFORM_GGP ) case StructureType::eStreamDescriptorSurfaceCreateInfoGGP: return "StreamDescriptorSurfaceCreateInfoGGP"; #endif /*VK_USE_PLATFORM_GGP*/ case StructureType::ePhysicalDeviceCornerSampledImageFeaturesNV: return "PhysicalDeviceCornerSampledImageFeaturesNV"; case StructureType::eExternalMemoryImageCreateInfoNV: return "ExternalMemoryImageCreateInfoNV"; case StructureType::eExportMemoryAllocateInfoNV: return "ExportMemoryAllocateInfoNV"; #if defined( VK_USE_PLATFORM_WIN32_KHR ) case StructureType::eImportMemoryWin32HandleInfoNV: return "ImportMemoryWin32HandleInfoNV"; case StructureType::eExportMemoryWin32HandleInfoNV: return "ExportMemoryWin32HandleInfoNV"; case StructureType::eWin32KeyedMutexAcquireReleaseInfoNV: return "Win32KeyedMutexAcquireReleaseInfoNV"; #endif /*VK_USE_PLATFORM_WIN32_KHR*/ case StructureType::eValidationFlagsEXT: return "ValidationFlagsEXT"; #if defined( VK_USE_PLATFORM_VI_NN ) case StructureType::eViSurfaceCreateInfoNN: return "ViSurfaceCreateInfoNN"; #endif /*VK_USE_PLATFORM_VI_NN*/ case StructureType::eImageViewAstcDecodeModeEXT: return "ImageViewAstcDecodeModeEXT"; case StructureType::ePhysicalDeviceAstcDecodeFeaturesEXT: return "PhysicalDeviceAstcDecodeFeaturesEXT"; #if defined( VK_USE_PLATFORM_WIN32_KHR ) case StructureType::eImportMemoryWin32HandleInfoKHR: return "ImportMemoryWin32HandleInfoKHR"; case StructureType::eExportMemoryWin32HandleInfoKHR: return "ExportMemoryWin32HandleInfoKHR"; case StructureType::eMemoryWin32HandlePropertiesKHR: return "MemoryWin32HandlePropertiesKHR"; case StructureType::eMemoryGetWin32HandleInfoKHR: return "MemoryGetWin32HandleInfoKHR"; #endif /*VK_USE_PLATFORM_WIN32_KHR*/ case StructureType::eImportMemoryFdInfoKHR: return "ImportMemoryFdInfoKHR"; case StructureType::eMemoryFdPropertiesKHR: return "MemoryFdPropertiesKHR"; case StructureType::eMemoryGetFdInfoKHR: return "MemoryGetFdInfoKHR"; #if defined( VK_USE_PLATFORM_WIN32_KHR ) case StructureType::eWin32KeyedMutexAcquireReleaseInfoKHR: return "Win32KeyedMutexAcquireReleaseInfoKHR"; case StructureType::eImportSemaphoreWin32HandleInfoKHR: return "ImportSemaphoreWin32HandleInfoKHR"; case StructureType::eExportSemaphoreWin32HandleInfoKHR: return "ExportSemaphoreWin32HandleInfoKHR"; case StructureType::eD3D12FenceSubmitInfoKHR: return "D3D12FenceSubmitInfoKHR"; case StructureType::eSemaphoreGetWin32HandleInfoKHR: return "SemaphoreGetWin32HandleInfoKHR"; #endif /*VK_USE_PLATFORM_WIN32_KHR*/ case StructureType::eImportSemaphoreFdInfoKHR: return "ImportSemaphoreFdInfoKHR"; case StructureType::eSemaphoreGetFdInfoKHR: return "SemaphoreGetFdInfoKHR"; case StructureType::eCommandBufferInheritanceConditionalRenderingInfoEXT: return "CommandBufferInheritanceConditionalRenderingInfoEXT"; case StructureType::ePhysicalDeviceConditionalRenderingFeaturesEXT: return "PhysicalDeviceConditionalRenderingFeaturesEXT"; case StructureType::eConditionalRenderingBeginInfoEXT: return "ConditionalRenderingBeginInfoEXT"; case StructureType::ePresentRegionsKHR: return "PresentRegionsKHR"; case StructureType::ePipelineViewportWScalingStateCreateInfoNV: return "PipelineViewportWScalingStateCreateInfoNV"; case StructureType::eSurfaceCapabilities2EXT: return "SurfaceCapabilities2EXT"; case StructureType::eDisplayPowerInfoEXT: return "DisplayPowerInfoEXT"; case StructureType::eDeviceEventInfoEXT: return "DeviceEventInfoEXT"; case StructureType::eDisplayEventInfoEXT: return "DisplayEventInfoEXT"; case StructureType::eSwapchainCounterCreateInfoEXT: return "SwapchainCounterCreateInfoEXT"; case StructureType::ePresentTimesInfoGOOGLE: return "PresentTimesInfoGOOGLE"; case StructureType::ePhysicalDeviceMultiviewPerViewAttributesPropertiesNVX: return "PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX"; case StructureType::eMultiviewPerViewAttributesInfoNVX: return "MultiviewPerViewAttributesInfoNVX"; case StructureType::ePipelineViewportSwizzleStateCreateInfoNV: return "PipelineViewportSwizzleStateCreateInfoNV"; case StructureType::ePhysicalDeviceDiscardRectanglePropertiesEXT: return "PhysicalDeviceDiscardRectanglePropertiesEXT"; case StructureType::ePipelineDiscardRectangleStateCreateInfoEXT: return "PipelineDiscardRectangleStateCreateInfoEXT"; case StructureType::ePhysicalDeviceConservativeRasterizationPropertiesEXT: return "PhysicalDeviceConservativeRasterizationPropertiesEXT"; case StructureType::ePipelineRasterizationConservativeStateCreateInfoEXT: return "PipelineRasterizationConservativeStateCreateInfoEXT"; case StructureType::ePhysicalDeviceDepthClipEnableFeaturesEXT: return "PhysicalDeviceDepthClipEnableFeaturesEXT"; case StructureType::ePipelineRasterizationDepthClipStateCreateInfoEXT: return "PipelineRasterizationDepthClipStateCreateInfoEXT"; case StructureType::eHdrMetadataEXT: return "HdrMetadataEXT"; case StructureType::ePhysicalDeviceRelaxedLineRasterizationFeaturesIMG: return "PhysicalDeviceRelaxedLineRasterizationFeaturesIMG"; case StructureType::eSharedPresentSurfaceCapabilitiesKHR: return "SharedPresentSurfaceCapabilitiesKHR"; #if defined( VK_USE_PLATFORM_WIN32_KHR ) case StructureType::eImportFenceWin32HandleInfoKHR: return "ImportFenceWin32HandleInfoKHR"; case StructureType::eExportFenceWin32HandleInfoKHR: return "ExportFenceWin32HandleInfoKHR"; case StructureType::eFenceGetWin32HandleInfoKHR: return "FenceGetWin32HandleInfoKHR"; #endif /*VK_USE_PLATFORM_WIN32_KHR*/ case StructureType::eImportFenceFdInfoKHR: return "ImportFenceFdInfoKHR"; case StructureType::eFenceGetFdInfoKHR: return "FenceGetFdInfoKHR"; case StructureType::ePhysicalDevicePerformanceQueryFeaturesKHR: return "PhysicalDevicePerformanceQueryFeaturesKHR"; case StructureType::ePhysicalDevicePerformanceQueryPropertiesKHR: return "PhysicalDevicePerformanceQueryPropertiesKHR"; case StructureType::eQueryPoolPerformanceCreateInfoKHR: return "QueryPoolPerformanceCreateInfoKHR"; case StructureType::ePerformanceQuerySubmitInfoKHR: return "PerformanceQuerySubmitInfoKHR"; case StructureType::eAcquireProfilingLockInfoKHR: return "AcquireProfilingLockInfoKHR"; case StructureType::ePerformanceCounterKHR: return "PerformanceCounterKHR"; case StructureType::ePerformanceCounterDescriptionKHR: return "PerformanceCounterDescriptionKHR"; case StructureType::ePhysicalDeviceSurfaceInfo2KHR: return "PhysicalDeviceSurfaceInfo2KHR"; case StructureType::eSurfaceCapabilities2KHR: return "SurfaceCapabilities2KHR"; case StructureType::eSurfaceFormat2KHR: return "SurfaceFormat2KHR"; case StructureType::eDisplayProperties2KHR: return "DisplayProperties2KHR"; case StructureType::eDisplayPlaneProperties2KHR: return "DisplayPlaneProperties2KHR"; case StructureType::eDisplayModeProperties2KHR: return "DisplayModeProperties2KHR"; case StructureType::eDisplayPlaneInfo2KHR: return "DisplayPlaneInfo2KHR"; case StructureType::eDisplayPlaneCapabilities2KHR: return "DisplayPlaneCapabilities2KHR"; #if defined( VK_USE_PLATFORM_IOS_MVK ) case StructureType::eIosSurfaceCreateInfoMVK: return "IosSurfaceCreateInfoMVK"; #endif /*VK_USE_PLATFORM_IOS_MVK*/ #if defined( VK_USE_PLATFORM_MACOS_MVK ) case StructureType::eMacosSurfaceCreateInfoMVK: return "MacosSurfaceCreateInfoMVK"; #endif /*VK_USE_PLATFORM_MACOS_MVK*/ case StructureType::eDebugUtilsObjectNameInfoEXT: return "DebugUtilsObjectNameInfoEXT"; case StructureType::eDebugUtilsObjectTagInfoEXT: return "DebugUtilsObjectTagInfoEXT"; case StructureType::eDebugUtilsLabelEXT: return "DebugUtilsLabelEXT"; case StructureType::eDebugUtilsMessengerCallbackDataEXT: return "DebugUtilsMessengerCallbackDataEXT"; case StructureType::eDebugUtilsMessengerCreateInfoEXT: return "DebugUtilsMessengerCreateInfoEXT"; #if defined( VK_USE_PLATFORM_ANDROID_KHR ) case StructureType::eAndroidHardwareBufferUsageANDROID: return "AndroidHardwareBufferUsageANDROID"; case StructureType::eAndroidHardwareBufferPropertiesANDROID: return "AndroidHardwareBufferPropertiesANDROID"; case StructureType::eAndroidHardwareBufferFormatPropertiesANDROID: return "AndroidHardwareBufferFormatPropertiesANDROID"; case StructureType::eImportAndroidHardwareBufferInfoANDROID: return "ImportAndroidHardwareBufferInfoANDROID"; case StructureType::eMemoryGetAndroidHardwareBufferInfoANDROID: return "MemoryGetAndroidHardwareBufferInfoANDROID"; case StructureType::eExternalFormatANDROID: return "ExternalFormatANDROID"; case StructureType::eAndroidHardwareBufferFormatProperties2ANDROID: return "AndroidHardwareBufferFormatProperties2ANDROID"; #endif /*VK_USE_PLATFORM_ANDROID_KHR*/ #if defined( VK_ENABLE_BETA_EXTENSIONS ) case StructureType::ePhysicalDeviceShaderEnqueueFeaturesAMDX: return "PhysicalDeviceShaderEnqueueFeaturesAMDX"; case StructureType::ePhysicalDeviceShaderEnqueuePropertiesAMDX: return "PhysicalDeviceShaderEnqueuePropertiesAMDX"; case StructureType::eExecutionGraphPipelineScratchSizeAMDX: return "ExecutionGraphPipelineScratchSizeAMDX"; case StructureType::eExecutionGraphPipelineCreateInfoAMDX: return "ExecutionGraphPipelineCreateInfoAMDX"; case StructureType::ePipelineShaderStageNodeCreateInfoAMDX: return "PipelineShaderStageNodeCreateInfoAMDX"; #endif /*VK_ENABLE_BETA_EXTENSIONS*/ case StructureType::eAttachmentSampleCountInfoAMD: return "AttachmentSampleCountInfoAMD"; case StructureType::eSampleLocationsInfoEXT: return "SampleLocationsInfoEXT"; case StructureType::eRenderPassSampleLocationsBeginInfoEXT: return "RenderPassSampleLocationsBeginInfoEXT"; case StructureType::ePipelineSampleLocationsStateCreateInfoEXT: return "PipelineSampleLocationsStateCreateInfoEXT"; case StructureType::ePhysicalDeviceSampleLocationsPropertiesEXT: return "PhysicalDeviceSampleLocationsPropertiesEXT"; case StructureType::eMultisamplePropertiesEXT: return "MultisamplePropertiesEXT"; case StructureType::ePhysicalDeviceBlendOperationAdvancedFeaturesEXT: return "PhysicalDeviceBlendOperationAdvancedFeaturesEXT"; case StructureType::ePhysicalDeviceBlendOperationAdvancedPropertiesEXT: return "PhysicalDeviceBlendOperationAdvancedPropertiesEXT"; case StructureType::ePipelineColorBlendAdvancedStateCreateInfoEXT: return "PipelineColorBlendAdvancedStateCreateInfoEXT"; case StructureType::ePipelineCoverageToColorStateCreateInfoNV: return "PipelineCoverageToColorStateCreateInfoNV"; case StructureType::eWriteDescriptorSetAccelerationStructureKHR: return "WriteDescriptorSetAccelerationStructureKHR"; case StructureType::eAccelerationStructureBuildGeometryInfoKHR: return "AccelerationStructureBuildGeometryInfoKHR"; case StructureType::eAccelerationStructureDeviceAddressInfoKHR: return "AccelerationStructureDeviceAddressInfoKHR"; case StructureType::eAccelerationStructureGeometryAabbsDataKHR: return "AccelerationStructureGeometryAabbsDataKHR"; case StructureType::eAccelerationStructureGeometryInstancesDataKHR: return "AccelerationStructureGeometryInstancesDataKHR"; case StructureType::eAccelerationStructureGeometryTrianglesDataKHR: return "AccelerationStructureGeometryTrianglesDataKHR"; case StructureType::eAccelerationStructureGeometryKHR: return "AccelerationStructureGeometryKHR"; case StructureType::eAccelerationStructureVersionInfoKHR: return "AccelerationStructureVersionInfoKHR"; case StructureType::eCopyAccelerationStructureInfoKHR: return "CopyAccelerationStructureInfoKHR"; case StructureType::eCopyAccelerationStructureToMemoryInfoKHR: return "CopyAccelerationStructureToMemoryInfoKHR"; case StructureType::eCopyMemoryToAccelerationStructureInfoKHR: return "CopyMemoryToAccelerationStructureInfoKHR"; case StructureType::ePhysicalDeviceAccelerationStructureFeaturesKHR: return "PhysicalDeviceAccelerationStructureFeaturesKHR"; case StructureType::ePhysicalDeviceAccelerationStructurePropertiesKHR: return "PhysicalDeviceAccelerationStructurePropertiesKHR"; case StructureType::eAccelerationStructureCreateInfoKHR: return "AccelerationStructureCreateInfoKHR"; case StructureType::eAccelerationStructureBuildSizesInfoKHR: return "AccelerationStructureBuildSizesInfoKHR"; case StructureType::ePhysicalDeviceRayTracingPipelineFeaturesKHR: return "PhysicalDeviceRayTracingPipelineFeaturesKHR"; case StructureType::ePhysicalDeviceRayTracingPipelinePropertiesKHR: return "PhysicalDeviceRayTracingPipelinePropertiesKHR"; case StructureType::eRayTracingPipelineCreateInfoKHR: return "RayTracingPipelineCreateInfoKHR"; case StructureType::eRayTracingShaderGroupCreateInfoKHR: return "RayTracingShaderGroupCreateInfoKHR"; case StructureType::eRayTracingPipelineInterfaceCreateInfoKHR: return "RayTracingPipelineInterfaceCreateInfoKHR"; case StructureType::ePhysicalDeviceRayQueryFeaturesKHR: return "PhysicalDeviceRayQueryFeaturesKHR"; case StructureType::ePipelineCoverageModulationStateCreateInfoNV: return "PipelineCoverageModulationStateCreateInfoNV"; case StructureType::ePhysicalDeviceShaderSmBuiltinsFeaturesNV: return "PhysicalDeviceShaderSmBuiltinsFeaturesNV"; case StructureType::ePhysicalDeviceShaderSmBuiltinsPropertiesNV: return "PhysicalDeviceShaderSmBuiltinsPropertiesNV"; case StructureType::eDrmFormatModifierPropertiesListEXT: return "DrmFormatModifierPropertiesListEXT"; case StructureType::ePhysicalDeviceImageDrmFormatModifierInfoEXT: return "PhysicalDeviceImageDrmFormatModifierInfoEXT"; case StructureType::eImageDrmFormatModifierListCreateInfoEXT: return "ImageDrmFormatModifierListCreateInfoEXT"; case StructureType::eImageDrmFormatModifierExplicitCreateInfoEXT: return "ImageDrmFormatModifierExplicitCreateInfoEXT"; case StructureType::eImageDrmFormatModifierPropertiesEXT: return "ImageDrmFormatModifierPropertiesEXT"; case StructureType::eDrmFormatModifierPropertiesList2EXT: return "DrmFormatModifierPropertiesList2EXT"; case StructureType::eValidationCacheCreateInfoEXT: return "ValidationCacheCreateInfoEXT"; case StructureType::eShaderModuleValidationCacheCreateInfoEXT: return "ShaderModuleValidationCacheCreateInfoEXT"; #if defined( VK_ENABLE_BETA_EXTENSIONS ) case StructureType::ePhysicalDevicePortabilitySubsetFeaturesKHR: return "PhysicalDevicePortabilitySubsetFeaturesKHR"; case StructureType::ePhysicalDevicePortabilitySubsetPropertiesKHR: return "PhysicalDevicePortabilitySubsetPropertiesKHR"; #endif /*VK_ENABLE_BETA_EXTENSIONS*/ case StructureType::ePipelineViewportShadingRateImageStateCreateInfoNV: return "PipelineViewportShadingRateImageStateCreateInfoNV"; case StructureType::ePhysicalDeviceShadingRateImageFeaturesNV: return "PhysicalDeviceShadingRateImageFeaturesNV"; case StructureType::ePhysicalDeviceShadingRateImagePropertiesNV: return "PhysicalDeviceShadingRateImagePropertiesNV"; case StructureType::ePipelineViewportCoarseSampleOrderStateCreateInfoNV: return "PipelineViewportCoarseSampleOrderStateCreateInfoNV"; case StructureType::eRayTracingPipelineCreateInfoNV: return "RayTracingPipelineCreateInfoNV"; case StructureType::eAccelerationStructureCreateInfoNV: return "AccelerationStructureCreateInfoNV"; case StructureType::eGeometryNV: return "GeometryNV"; case StructureType::eGeometryTrianglesNV: return "GeometryTrianglesNV"; case StructureType::eGeometryAabbNV: return "GeometryAabbNV"; case StructureType::eBindAccelerationStructureMemoryInfoNV: return "BindAccelerationStructureMemoryInfoNV"; case StructureType::eWriteDescriptorSetAccelerationStructureNV: return "WriteDescriptorSetAccelerationStructureNV"; case StructureType::eAccelerationStructureMemoryRequirementsInfoNV: return "AccelerationStructureMemoryRequirementsInfoNV"; case StructureType::ePhysicalDeviceRayTracingPropertiesNV: return "PhysicalDeviceRayTracingPropertiesNV"; case StructureType::eRayTracingShaderGroupCreateInfoNV: return "RayTracingShaderGroupCreateInfoNV"; case StructureType::eAccelerationStructureInfoNV: return "AccelerationStructureInfoNV"; case StructureType::ePhysicalDeviceRepresentativeFragmentTestFeaturesNV: return "PhysicalDeviceRepresentativeFragmentTestFeaturesNV"; case StructureType::ePipelineRepresentativeFragmentTestStateCreateInfoNV: return "PipelineRepresentativeFragmentTestStateCreateInfoNV"; case StructureType::ePhysicalDeviceImageViewImageFormatInfoEXT: return "PhysicalDeviceImageViewImageFormatInfoEXT"; case StructureType::eFilterCubicImageViewImageFormatPropertiesEXT: return "FilterCubicImageViewImageFormatPropertiesEXT"; case StructureType::eImportMemoryHostPointerInfoEXT: return "ImportMemoryHostPointerInfoEXT"; case StructureType::eMemoryHostPointerPropertiesEXT: return "MemoryHostPointerPropertiesEXT"; case StructureType::ePhysicalDeviceExternalMemoryHostPropertiesEXT: return "PhysicalDeviceExternalMemoryHostPropertiesEXT"; case StructureType::ePhysicalDeviceShaderClockFeaturesKHR: return "PhysicalDeviceShaderClockFeaturesKHR"; case StructureType::ePipelineCompilerControlCreateInfoAMD: return "PipelineCompilerControlCreateInfoAMD"; case StructureType::ePhysicalDeviceShaderCorePropertiesAMD: return "PhysicalDeviceShaderCorePropertiesAMD"; case StructureType::eVideoDecodeH265CapabilitiesKHR: return "VideoDecodeH265CapabilitiesKHR"; case StructureType::eVideoDecodeH265SessionParametersCreateInfoKHR: return "VideoDecodeH265SessionParametersCreateInfoKHR"; case StructureType::eVideoDecodeH265SessionParametersAddInfoKHR: return "VideoDecodeH265SessionParametersAddInfoKHR"; case StructureType::eVideoDecodeH265ProfileInfoKHR: return "VideoDecodeH265ProfileInfoKHR"; case StructureType::eVideoDecodeH265PictureInfoKHR: return "VideoDecodeH265PictureInfoKHR"; case StructureType::eVideoDecodeH265DpbSlotInfoKHR: return "VideoDecodeH265DpbSlotInfoKHR"; case StructureType::eDeviceMemoryOverallocationCreateInfoAMD: return "DeviceMemoryOverallocationCreateInfoAMD"; case StructureType::ePhysicalDeviceVertexAttributeDivisorPropertiesEXT: return "PhysicalDeviceVertexAttributeDivisorPropertiesEXT"; #if defined( VK_USE_PLATFORM_GGP ) case StructureType::ePresentFrameTokenGGP: return "PresentFrameTokenGGP"; #endif /*VK_USE_PLATFORM_GGP*/ case StructureType::ePhysicalDeviceMeshShaderFeaturesNV: return "PhysicalDeviceMeshShaderFeaturesNV"; case StructureType::ePhysicalDeviceMeshShaderPropertiesNV: return "PhysicalDeviceMeshShaderPropertiesNV"; case StructureType::ePhysicalDeviceShaderImageFootprintFeaturesNV: return "PhysicalDeviceShaderImageFootprintFeaturesNV"; case StructureType::ePipelineViewportExclusiveScissorStateCreateInfoNV: return "PipelineViewportExclusiveScissorStateCreateInfoNV"; case StructureType::ePhysicalDeviceExclusiveScissorFeaturesNV: return "PhysicalDeviceExclusiveScissorFeaturesNV"; case StructureType::eCheckpointDataNV: return "CheckpointDataNV"; case StructureType::eQueueFamilyCheckpointPropertiesNV: return "QueueFamilyCheckpointPropertiesNV"; case StructureType::eQueueFamilyCheckpointProperties2NV: return "QueueFamilyCheckpointProperties2NV"; case StructureType::eCheckpointData2NV: return "CheckpointData2NV"; case StructureType::ePhysicalDeviceShaderIntegerFunctions2FeaturesINTEL: return "PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL"; case StructureType::eQueryPoolPerformanceQueryCreateInfoINTEL: return "QueryPoolPerformanceQueryCreateInfoINTEL"; case StructureType::eInitializePerformanceApiInfoINTEL: return "InitializePerformanceApiInfoINTEL"; case StructureType::ePerformanceMarkerInfoINTEL: return "PerformanceMarkerInfoINTEL"; case StructureType::ePerformanceStreamMarkerInfoINTEL: return "PerformanceStreamMarkerInfoINTEL"; case StructureType::ePerformanceOverrideInfoINTEL: return "PerformanceOverrideInfoINTEL"; case StructureType::ePerformanceConfigurationAcquireInfoINTEL: return "PerformanceConfigurationAcquireInfoINTEL"; case StructureType::ePhysicalDevicePciBusInfoPropertiesEXT: return "PhysicalDevicePciBusInfoPropertiesEXT"; case StructureType::eDisplayNativeHdrSurfaceCapabilitiesAMD: return "DisplayNativeHdrSurfaceCapabilitiesAMD"; case StructureType::eSwapchainDisplayNativeHdrCreateInfoAMD: return "SwapchainDisplayNativeHdrCreateInfoAMD"; #if defined( VK_USE_PLATFORM_FUCHSIA ) case StructureType::eImagepipeSurfaceCreateInfoFUCHSIA: return "ImagepipeSurfaceCreateInfoFUCHSIA"; #endif /*VK_USE_PLATFORM_FUCHSIA*/ #if defined( VK_USE_PLATFORM_METAL_EXT ) case StructureType::eMetalSurfaceCreateInfoEXT: return "MetalSurfaceCreateInfoEXT"; #endif /*VK_USE_PLATFORM_METAL_EXT*/ case StructureType::ePhysicalDeviceFragmentDensityMapFeaturesEXT: return "PhysicalDeviceFragmentDensityMapFeaturesEXT"; case StructureType::ePhysicalDeviceFragmentDensityMapPropertiesEXT: return "PhysicalDeviceFragmentDensityMapPropertiesEXT"; case StructureType::eRenderPassFragmentDensityMapCreateInfoEXT: return "RenderPassFragmentDensityMapCreateInfoEXT"; case StructureType::eRenderingFragmentDensityMapAttachmentInfoEXT: return "RenderingFragmentDensityMapAttachmentInfoEXT"; case StructureType::eFragmentShadingRateAttachmentInfoKHR: return "FragmentShadingRateAttachmentInfoKHR"; case StructureType::ePipelineFragmentShadingRateStateCreateInfoKHR: return "PipelineFragmentShadingRateStateCreateInfoKHR"; case StructureType::ePhysicalDeviceFragmentShadingRatePropertiesKHR: return "PhysicalDeviceFragmentShadingRatePropertiesKHR"; case StructureType::ePhysicalDeviceFragmentShadingRateFeaturesKHR: return "PhysicalDeviceFragmentShadingRateFeaturesKHR"; case StructureType::ePhysicalDeviceFragmentShadingRateKHR: return "PhysicalDeviceFragmentShadingRateKHR"; case StructureType::eRenderingFragmentShadingRateAttachmentInfoKHR: return "RenderingFragmentShadingRateAttachmentInfoKHR"; case StructureType::ePhysicalDeviceShaderCoreProperties2AMD: return "PhysicalDeviceShaderCoreProperties2AMD"; case StructureType::ePhysicalDeviceCoherentMemoryFeaturesAMD: return "PhysicalDeviceCoherentMemoryFeaturesAMD"; case StructureType::ePhysicalDeviceShaderImageAtomicInt64FeaturesEXT: return "PhysicalDeviceShaderImageAtomicInt64FeaturesEXT"; case StructureType::ePhysicalDeviceShaderQuadControlFeaturesKHR: return "PhysicalDeviceShaderQuadControlFeaturesKHR"; case StructureType::ePhysicalDeviceMemoryBudgetPropertiesEXT: return "PhysicalDeviceMemoryBudgetPropertiesEXT"; case StructureType::ePhysicalDeviceMemoryPriorityFeaturesEXT: return "PhysicalDeviceMemoryPriorityFeaturesEXT"; case StructureType::eMemoryPriorityAllocateInfoEXT: return "MemoryPriorityAllocateInfoEXT"; case StructureType::eSurfaceProtectedCapabilitiesKHR: return "SurfaceProtectedCapabilitiesKHR"; case StructureType::ePhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV: return "PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV"; case StructureType::ePhysicalDeviceBufferDeviceAddressFeaturesEXT: return "PhysicalDeviceBufferDeviceAddressFeaturesEXT"; case StructureType::eBufferDeviceAddressCreateInfoEXT: return "BufferDeviceAddressCreateInfoEXT"; case StructureType::eValidationFeaturesEXT: return "ValidationFeaturesEXT"; case StructureType::ePhysicalDevicePresentWaitFeaturesKHR: return "PhysicalDevicePresentWaitFeaturesKHR"; case StructureType::ePhysicalDeviceCooperativeMatrixFeaturesNV: return "PhysicalDeviceCooperativeMatrixFeaturesNV"; case StructureType::eCooperativeMatrixPropertiesNV: return "CooperativeMatrixPropertiesNV"; case StructureType::ePhysicalDeviceCooperativeMatrixPropertiesNV: return "PhysicalDeviceCooperativeMatrixPropertiesNV"; case StructureType::ePhysicalDeviceCoverageReductionModeFeaturesNV: return "PhysicalDeviceCoverageReductionModeFeaturesNV"; case StructureType::ePipelineCoverageReductionStateCreateInfoNV: return "PipelineCoverageReductionStateCreateInfoNV"; case StructureType::eFramebufferMixedSamplesCombinationNV: return "FramebufferMixedSamplesCombinationNV"; case StructureType::ePhysicalDeviceFragmentShaderInterlockFeaturesEXT: return "PhysicalDeviceFragmentShaderInterlockFeaturesEXT"; case StructureType::ePhysicalDeviceYcbcrImageArraysFeaturesEXT: return "PhysicalDeviceYcbcrImageArraysFeaturesEXT"; case StructureType::ePhysicalDeviceProvokingVertexFeaturesEXT: return "PhysicalDeviceProvokingVertexFeaturesEXT"; case StructureType::ePipelineRasterizationProvokingVertexStateCreateInfoEXT: return "PipelineRasterizationProvokingVertexStateCreateInfoEXT"; case StructureType::ePhysicalDeviceProvokingVertexPropertiesEXT: return "PhysicalDeviceProvokingVertexPropertiesEXT"; #if defined( VK_USE_PLATFORM_WIN32_KHR ) case StructureType::eSurfaceFullScreenExclusiveInfoEXT: return "SurfaceFullScreenExclusiveInfoEXT"; case StructureType::eSurfaceCapabilitiesFullScreenExclusiveEXT: return "SurfaceCapabilitiesFullScreenExclusiveEXT"; case StructureType::eSurfaceFullScreenExclusiveWin32InfoEXT: return "SurfaceFullScreenExclusiveWin32InfoEXT"; #endif /*VK_USE_PLATFORM_WIN32_KHR*/ case StructureType::eHeadlessSurfaceCreateInfoEXT: return "HeadlessSurfaceCreateInfoEXT"; case StructureType::ePhysicalDeviceShaderAtomicFloatFeaturesEXT: return "PhysicalDeviceShaderAtomicFloatFeaturesEXT"; case StructureType::ePhysicalDeviceExtendedDynamicStateFeaturesEXT: return "PhysicalDeviceExtendedDynamicStateFeaturesEXT"; case StructureType::ePhysicalDevicePipelineExecutablePropertiesFeaturesKHR: return "PhysicalDevicePipelineExecutablePropertiesFeaturesKHR"; case StructureType::ePipelineInfoKHR: return "PipelineInfoKHR"; case StructureType::ePipelineExecutablePropertiesKHR: return "PipelineExecutablePropertiesKHR"; case StructureType::ePipelineExecutableInfoKHR: return "PipelineExecutableInfoKHR"; case StructureType::ePipelineExecutableStatisticKHR: return "PipelineExecutableStatisticKHR"; case StructureType::ePipelineExecutableInternalRepresentationKHR: return "PipelineExecutableInternalRepresentationKHR"; case StructureType::ePhysicalDeviceMapMemoryPlacedFeaturesEXT: return "PhysicalDeviceMapMemoryPlacedFeaturesEXT"; case StructureType::ePhysicalDeviceMapMemoryPlacedPropertiesEXT: return "PhysicalDeviceMapMemoryPlacedPropertiesEXT"; case StructureType::eMemoryMapPlacedInfoEXT: return "MemoryMapPlacedInfoEXT"; case StructureType::ePhysicalDeviceShaderAtomicFloat2FeaturesEXT: return "PhysicalDeviceShaderAtomicFloat2FeaturesEXT"; case StructureType::eSurfacePresentModeEXT: return "SurfacePresentModeEXT"; case StructureType::eSurfacePresentScalingCapabilitiesEXT: return "SurfacePresentScalingCapabilitiesEXT"; case StructureType::eSurfacePresentModeCompatibilityEXT: return "SurfacePresentModeCompatibilityEXT"; case StructureType::ePhysicalDeviceSwapchainMaintenance1FeaturesEXT: return "PhysicalDeviceSwapchainMaintenance1FeaturesEXT"; case StructureType::eSwapchainPresentFenceInfoEXT: return "SwapchainPresentFenceInfoEXT"; case StructureType::eSwapchainPresentModesCreateInfoEXT: return "SwapchainPresentModesCreateInfoEXT"; case StructureType::eSwapchainPresentModeInfoEXT: return "SwapchainPresentModeInfoEXT"; case StructureType::eSwapchainPresentScalingCreateInfoEXT: return "SwapchainPresentScalingCreateInfoEXT"; case StructureType::eReleaseSwapchainImagesInfoEXT: return "ReleaseSwapchainImagesInfoEXT"; case StructureType::ePhysicalDeviceDeviceGeneratedCommandsPropertiesNV: return "PhysicalDeviceDeviceGeneratedCommandsPropertiesNV"; case StructureType::eGraphicsShaderGroupCreateInfoNV: return "GraphicsShaderGroupCreateInfoNV"; case StructureType::eGraphicsPipelineShaderGroupsCreateInfoNV: return "GraphicsPipelineShaderGroupsCreateInfoNV"; case StructureType::eIndirectCommandsLayoutTokenNV: return "IndirectCommandsLayoutTokenNV"; case StructureType::eIndirectCommandsLayoutCreateInfoNV: return "IndirectCommandsLayoutCreateInfoNV"; case StructureType::eGeneratedCommandsInfoNV: return "GeneratedCommandsInfoNV"; case StructureType::eGeneratedCommandsMemoryRequirementsInfoNV: return "GeneratedCommandsMemoryRequirementsInfoNV"; case StructureType::ePhysicalDeviceDeviceGeneratedCommandsFeaturesNV: return "PhysicalDeviceDeviceGeneratedCommandsFeaturesNV"; case StructureType::ePhysicalDeviceInheritedViewportScissorFeaturesNV: return "PhysicalDeviceInheritedViewportScissorFeaturesNV"; case StructureType::eCommandBufferInheritanceViewportScissorInfoNV: return "CommandBufferInheritanceViewportScissorInfoNV"; case StructureType::ePhysicalDeviceTexelBufferAlignmentFeaturesEXT: return "PhysicalDeviceTexelBufferAlignmentFeaturesEXT"; case StructureType::eCommandBufferInheritanceRenderPassTransformInfoQCOM: return "CommandBufferInheritanceRenderPassTransformInfoQCOM"; case StructureType::eRenderPassTransformBeginInfoQCOM: return "RenderPassTransformBeginInfoQCOM"; case StructureType::ePhysicalDeviceDepthBiasControlFeaturesEXT: return "PhysicalDeviceDepthBiasControlFeaturesEXT"; case StructureType::eDepthBiasInfoEXT: return "DepthBiasInfoEXT"; case StructureType::eDepthBiasRepresentationInfoEXT: return "DepthBiasRepresentationInfoEXT"; case StructureType::ePhysicalDeviceDeviceMemoryReportFeaturesEXT: return "PhysicalDeviceDeviceMemoryReportFeaturesEXT"; case StructureType::eDeviceDeviceMemoryReportCreateInfoEXT: return "DeviceDeviceMemoryReportCreateInfoEXT"; case StructureType::eDeviceMemoryReportCallbackDataEXT: return "DeviceMemoryReportCallbackDataEXT"; case StructureType::ePhysicalDeviceRobustness2FeaturesEXT: return "PhysicalDeviceRobustness2FeaturesEXT"; case StructureType::ePhysicalDeviceRobustness2PropertiesEXT: return "PhysicalDeviceRobustness2PropertiesEXT"; case StructureType::eSamplerCustomBorderColorCreateInfoEXT: return "SamplerCustomBorderColorCreateInfoEXT"; case StructureType::ePhysicalDeviceCustomBorderColorPropertiesEXT: return "PhysicalDeviceCustomBorderColorPropertiesEXT"; case StructureType::ePhysicalDeviceCustomBorderColorFeaturesEXT: return "PhysicalDeviceCustomBorderColorFeaturesEXT"; case StructureType::ePipelineLibraryCreateInfoKHR: return "PipelineLibraryCreateInfoKHR"; case StructureType::ePhysicalDevicePresentBarrierFeaturesNV: return "PhysicalDevicePresentBarrierFeaturesNV"; case StructureType::eSurfaceCapabilitiesPresentBarrierNV: return "SurfaceCapabilitiesPresentBarrierNV"; case StructureType::eSwapchainPresentBarrierCreateInfoNV: return "SwapchainPresentBarrierCreateInfoNV"; case StructureType::ePresentIdKHR: return "PresentIdKHR"; case StructureType::ePhysicalDevicePresentIdFeaturesKHR: return "PhysicalDevicePresentIdFeaturesKHR"; case StructureType::eVideoEncodeInfoKHR: return "VideoEncodeInfoKHR"; case StructureType::eVideoEncodeRateControlInfoKHR: return "VideoEncodeRateControlInfoKHR"; case StructureType::eVideoEncodeRateControlLayerInfoKHR: return "VideoEncodeRateControlLayerInfoKHR"; case StructureType::eVideoEncodeCapabilitiesKHR: return "VideoEncodeCapabilitiesKHR"; case StructureType::eVideoEncodeUsageInfoKHR: return "VideoEncodeUsageInfoKHR"; case StructureType::eQueryPoolVideoEncodeFeedbackCreateInfoKHR: return "QueryPoolVideoEncodeFeedbackCreateInfoKHR"; case StructureType::ePhysicalDeviceVideoEncodeQualityLevelInfoKHR: return "PhysicalDeviceVideoEncodeQualityLevelInfoKHR"; case StructureType::eVideoEncodeQualityLevelPropertiesKHR: return "VideoEncodeQualityLevelPropertiesKHR"; case StructureType::eVideoEncodeQualityLevelInfoKHR: return "VideoEncodeQualityLevelInfoKHR"; case StructureType::eVideoEncodeSessionParametersGetInfoKHR: return "VideoEncodeSessionParametersGetInfoKHR"; case StructureType::eVideoEncodeSessionParametersFeedbackInfoKHR: return "VideoEncodeSessionParametersFeedbackInfoKHR"; case StructureType::ePhysicalDeviceDiagnosticsConfigFeaturesNV: return "PhysicalDeviceDiagnosticsConfigFeaturesNV"; case StructureType::eDeviceDiagnosticsConfigCreateInfoNV: return "DeviceDiagnosticsConfigCreateInfoNV"; #if defined( VK_ENABLE_BETA_EXTENSIONS ) case StructureType::eCudaModuleCreateInfoNV: return "CudaModuleCreateInfoNV"; case StructureType::eCudaFunctionCreateInfoNV: return "CudaFunctionCreateInfoNV"; case StructureType::eCudaLaunchInfoNV: return "CudaLaunchInfoNV"; case StructureType::ePhysicalDeviceCudaKernelLaunchFeaturesNV: return "PhysicalDeviceCudaKernelLaunchFeaturesNV"; case StructureType::ePhysicalDeviceCudaKernelLaunchPropertiesNV: return "PhysicalDeviceCudaKernelLaunchPropertiesNV"; #endif /*VK_ENABLE_BETA_EXTENSIONS*/ case StructureType::eQueryLowLatencySupportNV: return "QueryLowLatencySupportNV"; #if defined( VK_USE_PLATFORM_METAL_EXT ) case StructureType::eExportMetalObjectCreateInfoEXT: return "ExportMetalObjectCreateInfoEXT"; case StructureType::eExportMetalObjectsInfoEXT: return "ExportMetalObjectsInfoEXT"; case StructureType::eExportMetalDeviceInfoEXT: return "ExportMetalDeviceInfoEXT"; case StructureType::eExportMetalCommandQueueInfoEXT: return "ExportMetalCommandQueueInfoEXT"; case StructureType::eExportMetalBufferInfoEXT: return "ExportMetalBufferInfoEXT"; case StructureType::eImportMetalBufferInfoEXT: return "ImportMetalBufferInfoEXT"; case StructureType::eExportMetalTextureInfoEXT: return "ExportMetalTextureInfoEXT"; case StructureType::eImportMetalTextureInfoEXT: return "ImportMetalTextureInfoEXT"; case StructureType::eExportMetalIoSurfaceInfoEXT: return "ExportMetalIoSurfaceInfoEXT"; case StructureType::eImportMetalIoSurfaceInfoEXT: return "ImportMetalIoSurfaceInfoEXT"; case StructureType::eExportMetalSharedEventInfoEXT: return "ExportMetalSharedEventInfoEXT"; case StructureType::eImportMetalSharedEventInfoEXT: return "ImportMetalSharedEventInfoEXT"; #endif /*VK_USE_PLATFORM_METAL_EXT*/ case StructureType::ePhysicalDeviceDescriptorBufferPropertiesEXT: return "PhysicalDeviceDescriptorBufferPropertiesEXT"; case StructureType::ePhysicalDeviceDescriptorBufferDensityMapPropertiesEXT: return "PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT"; case StructureType::ePhysicalDeviceDescriptorBufferFeaturesEXT: return "PhysicalDeviceDescriptorBufferFeaturesEXT"; case StructureType::eDescriptorAddressInfoEXT: return "DescriptorAddressInfoEXT"; case StructureType::eDescriptorGetInfoEXT: return "DescriptorGetInfoEXT"; case StructureType::eBufferCaptureDescriptorDataInfoEXT: return "BufferCaptureDescriptorDataInfoEXT"; case StructureType::eImageCaptureDescriptorDataInfoEXT: return "ImageCaptureDescriptorDataInfoEXT"; case StructureType::eImageViewCaptureDescriptorDataInfoEXT: return "ImageViewCaptureDescriptorDataInfoEXT"; case StructureType::eSamplerCaptureDescriptorDataInfoEXT: return "SamplerCaptureDescriptorDataInfoEXT"; case StructureType::eOpaqueCaptureDescriptorDataCreateInfoEXT: return "OpaqueCaptureDescriptorDataCreateInfoEXT"; case StructureType::eDescriptorBufferBindingInfoEXT: return "DescriptorBufferBindingInfoEXT"; case StructureType::eDescriptorBufferBindingPushDescriptorBufferHandleEXT: return "DescriptorBufferBindingPushDescriptorBufferHandleEXT"; case StructureType::eAccelerationStructureCaptureDescriptorDataInfoEXT: return "AccelerationStructureCaptureDescriptorDataInfoEXT"; case StructureType::ePhysicalDeviceGraphicsPipelineLibraryFeaturesEXT: return "PhysicalDeviceGraphicsPipelineLibraryFeaturesEXT"; case StructureType::ePhysicalDeviceGraphicsPipelineLibraryPropertiesEXT: return "PhysicalDeviceGraphicsPipelineLibraryPropertiesEXT"; case StructureType::eGraphicsPipelineLibraryCreateInfoEXT: return "GraphicsPipelineLibraryCreateInfoEXT"; case StructureType::ePhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD: return "PhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD"; case StructureType::ePhysicalDeviceFragmentShaderBarycentricFeaturesKHR: return "PhysicalDeviceFragmentShaderBarycentricFeaturesKHR"; case StructureType::ePhysicalDeviceFragmentShaderBarycentricPropertiesKHR: return "PhysicalDeviceFragmentShaderBarycentricPropertiesKHR"; case StructureType::ePhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR: return "PhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR"; case StructureType::ePhysicalDeviceFragmentShadingRateEnumsPropertiesNV: return "PhysicalDeviceFragmentShadingRateEnumsPropertiesNV"; case StructureType::ePhysicalDeviceFragmentShadingRateEnumsFeaturesNV: return "PhysicalDeviceFragmentShadingRateEnumsFeaturesNV"; case StructureType::ePipelineFragmentShadingRateEnumStateCreateInfoNV: return "PipelineFragmentShadingRateEnumStateCreateInfoNV"; case StructureType::eAccelerationStructureGeometryMotionTrianglesDataNV: return "AccelerationStructureGeometryMotionTrianglesDataNV"; case StructureType::ePhysicalDeviceRayTracingMotionBlurFeaturesNV: return "PhysicalDeviceRayTracingMotionBlurFeaturesNV"; case StructureType::eAccelerationStructureMotionInfoNV: return "AccelerationStructureMotionInfoNV"; case StructureType::ePhysicalDeviceMeshShaderFeaturesEXT: return "PhysicalDeviceMeshShaderFeaturesEXT"; case StructureType::ePhysicalDeviceMeshShaderPropertiesEXT: return "PhysicalDeviceMeshShaderPropertiesEXT"; case StructureType::ePhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT: return "PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT"; case StructureType::ePhysicalDeviceFragmentDensityMap2FeaturesEXT: return "PhysicalDeviceFragmentDensityMap2FeaturesEXT"; case StructureType::ePhysicalDeviceFragmentDensityMap2PropertiesEXT: return "PhysicalDeviceFragmentDensityMap2PropertiesEXT"; case StructureType::eCopyCommandTransformInfoQCOM: return "CopyCommandTransformInfoQCOM"; case StructureType::ePhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR: return "PhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR"; case StructureType::ePhysicalDeviceImageCompressionControlFeaturesEXT: return "PhysicalDeviceImageCompressionControlFeaturesEXT"; case StructureType::eImageCompressionControlEXT: return "ImageCompressionControlEXT"; case StructureType::eImageCompressionPropertiesEXT: return "ImageCompressionPropertiesEXT"; case StructureType::ePhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT: return "PhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT"; case StructureType::ePhysicalDevice4444FormatsFeaturesEXT: return "PhysicalDevice4444FormatsFeaturesEXT"; case StructureType::ePhysicalDeviceFaultFeaturesEXT: return "PhysicalDeviceFaultFeaturesEXT"; case StructureType::eDeviceFaultCountsEXT: return "DeviceFaultCountsEXT"; case StructureType::eDeviceFaultInfoEXT: return "DeviceFaultInfoEXT"; case StructureType::ePhysicalDeviceRgba10X6FormatsFeaturesEXT: return "PhysicalDeviceRgba10X6FormatsFeaturesEXT"; #if defined( VK_USE_PLATFORM_DIRECTFB_EXT ) case StructureType::eDirectfbSurfaceCreateInfoEXT: return "DirectfbSurfaceCreateInfoEXT"; #endif /*VK_USE_PLATFORM_DIRECTFB_EXT*/ case StructureType::ePhysicalDeviceVertexInputDynamicStateFeaturesEXT: return "PhysicalDeviceVertexInputDynamicStateFeaturesEXT"; case StructureType::eVertexInputBindingDescription2EXT: return "VertexInputBindingDescription2EXT"; case StructureType::eVertexInputAttributeDescription2EXT: return "VertexInputAttributeDescription2EXT"; case StructureType::ePhysicalDeviceDrmPropertiesEXT: return "PhysicalDeviceDrmPropertiesEXT"; case StructureType::ePhysicalDeviceAddressBindingReportFeaturesEXT: return "PhysicalDeviceAddressBindingReportFeaturesEXT"; case StructureType::eDeviceAddressBindingCallbackDataEXT: return "DeviceAddressBindingCallbackDataEXT"; case StructureType::ePhysicalDeviceDepthClipControlFeaturesEXT: return "PhysicalDeviceDepthClipControlFeaturesEXT"; case StructureType::ePipelineViewportDepthClipControlCreateInfoEXT: return "PipelineViewportDepthClipControlCreateInfoEXT"; case StructureType::ePhysicalDevicePrimitiveTopologyListRestartFeaturesEXT: return "PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT"; case StructureType::ePhysicalDevicePresentModeFifoLatestReadyFeaturesEXT: return "PhysicalDevicePresentModeFifoLatestReadyFeaturesEXT"; #if defined( VK_USE_PLATFORM_FUCHSIA ) case StructureType::eImportMemoryZirconHandleInfoFUCHSIA: return "ImportMemoryZirconHandleInfoFUCHSIA"; case StructureType::eMemoryZirconHandlePropertiesFUCHSIA: return "MemoryZirconHandlePropertiesFUCHSIA"; case StructureType::eMemoryGetZirconHandleInfoFUCHSIA: return "MemoryGetZirconHandleInfoFUCHSIA"; case StructureType::eImportSemaphoreZirconHandleInfoFUCHSIA: return "ImportSemaphoreZirconHandleInfoFUCHSIA"; case StructureType::eSemaphoreGetZirconHandleInfoFUCHSIA: return "SemaphoreGetZirconHandleInfoFUCHSIA"; case StructureType::eBufferCollectionCreateInfoFUCHSIA: return "BufferCollectionCreateInfoFUCHSIA"; case StructureType::eImportMemoryBufferCollectionFUCHSIA: return "ImportMemoryBufferCollectionFUCHSIA"; case StructureType::eBufferCollectionImageCreateInfoFUCHSIA: return "BufferCollectionImageCreateInfoFUCHSIA"; case StructureType::eBufferCollectionPropertiesFUCHSIA: return "BufferCollectionPropertiesFUCHSIA"; case StructureType::eBufferConstraintsInfoFUCHSIA: return "BufferConstraintsInfoFUCHSIA"; case StructureType::eBufferCollectionBufferCreateInfoFUCHSIA: return "BufferCollectionBufferCreateInfoFUCHSIA"; case StructureType::eImageConstraintsInfoFUCHSIA: return "ImageConstraintsInfoFUCHSIA"; case StructureType::eImageFormatConstraintsInfoFUCHSIA: return "ImageFormatConstraintsInfoFUCHSIA"; case StructureType::eSysmemColorSpaceFUCHSIA: return "SysmemColorSpaceFUCHSIA"; case StructureType::eBufferCollectionConstraintsInfoFUCHSIA: return "BufferCollectionConstraintsInfoFUCHSIA"; #endif /*VK_USE_PLATFORM_FUCHSIA*/ case StructureType::eSubpassShadingPipelineCreateInfoHUAWEI: return "SubpassShadingPipelineCreateInfoHUAWEI"; case StructureType::ePhysicalDeviceSubpassShadingFeaturesHUAWEI: return "PhysicalDeviceSubpassShadingFeaturesHUAWEI"; case StructureType::ePhysicalDeviceSubpassShadingPropertiesHUAWEI: return "PhysicalDeviceSubpassShadingPropertiesHUAWEI"; case StructureType::ePhysicalDeviceInvocationMaskFeaturesHUAWEI: return "PhysicalDeviceInvocationMaskFeaturesHUAWEI"; case StructureType::eMemoryGetRemoteAddressInfoNV: return "MemoryGetRemoteAddressInfoNV"; case StructureType::ePhysicalDeviceExternalMemoryRdmaFeaturesNV: return "PhysicalDeviceExternalMemoryRdmaFeaturesNV"; case StructureType::ePipelinePropertiesIdentifierEXT: return "PipelinePropertiesIdentifierEXT"; case StructureType::ePhysicalDevicePipelinePropertiesFeaturesEXT: return "PhysicalDevicePipelinePropertiesFeaturesEXT"; case StructureType::ePhysicalDeviceFrameBoundaryFeaturesEXT: return "PhysicalDeviceFrameBoundaryFeaturesEXT"; case StructureType::eFrameBoundaryEXT: return "FrameBoundaryEXT"; case StructureType::ePhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT: return "PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT"; case StructureType::eSubpassResolvePerformanceQueryEXT: return "SubpassResolvePerformanceQueryEXT"; case StructureType::eMultisampledRenderToSingleSampledInfoEXT: return "MultisampledRenderToSingleSampledInfoEXT"; case StructureType::ePhysicalDeviceExtendedDynamicState2FeaturesEXT: return "PhysicalDeviceExtendedDynamicState2FeaturesEXT"; #if defined( VK_USE_PLATFORM_SCREEN_QNX ) case StructureType::eScreenSurfaceCreateInfoQNX: return "ScreenSurfaceCreateInfoQNX"; #endif /*VK_USE_PLATFORM_SCREEN_QNX*/ case StructureType::ePhysicalDeviceColorWriteEnableFeaturesEXT: return "PhysicalDeviceColorWriteEnableFeaturesEXT"; case StructureType::ePipelineColorWriteCreateInfoEXT: return "PipelineColorWriteCreateInfoEXT"; case StructureType::ePhysicalDevicePrimitivesGeneratedQueryFeaturesEXT: return "PhysicalDevicePrimitivesGeneratedQueryFeaturesEXT"; case StructureType::ePhysicalDeviceRayTracingMaintenance1FeaturesKHR: return "PhysicalDeviceRayTracingMaintenance1FeaturesKHR"; case StructureType::ePhysicalDeviceImageViewMinLodFeaturesEXT: return "PhysicalDeviceImageViewMinLodFeaturesEXT"; case StructureType::eImageViewMinLodCreateInfoEXT: return "ImageViewMinLodCreateInfoEXT"; case StructureType::ePhysicalDeviceMultiDrawFeaturesEXT: return "PhysicalDeviceMultiDrawFeaturesEXT"; case StructureType::ePhysicalDeviceMultiDrawPropertiesEXT: return "PhysicalDeviceMultiDrawPropertiesEXT"; case StructureType::ePhysicalDeviceImage2DViewOf3DFeaturesEXT: return "PhysicalDeviceImage2DViewOf3DFeaturesEXT"; case StructureType::ePhysicalDeviceShaderTileImageFeaturesEXT: return "PhysicalDeviceShaderTileImageFeaturesEXT"; case StructureType::ePhysicalDeviceShaderTileImagePropertiesEXT: return "PhysicalDeviceShaderTileImagePropertiesEXT"; case StructureType::eMicromapBuildInfoEXT: return "MicromapBuildInfoEXT"; case StructureType::eMicromapVersionInfoEXT: return "MicromapVersionInfoEXT"; case StructureType::eCopyMicromapInfoEXT: return "CopyMicromapInfoEXT"; case StructureType::eCopyMicromapToMemoryInfoEXT: return "CopyMicromapToMemoryInfoEXT"; case StructureType::eCopyMemoryToMicromapInfoEXT: return "CopyMemoryToMicromapInfoEXT"; case StructureType::ePhysicalDeviceOpacityMicromapFeaturesEXT: return "PhysicalDeviceOpacityMicromapFeaturesEXT"; case StructureType::ePhysicalDeviceOpacityMicromapPropertiesEXT: return "PhysicalDeviceOpacityMicromapPropertiesEXT"; case StructureType::eMicromapCreateInfoEXT: return "MicromapCreateInfoEXT"; case StructureType::eMicromapBuildSizesInfoEXT: return "MicromapBuildSizesInfoEXT"; case StructureType::eAccelerationStructureTrianglesOpacityMicromapEXT: return "AccelerationStructureTrianglesOpacityMicromapEXT"; #if defined( VK_ENABLE_BETA_EXTENSIONS ) case StructureType::ePhysicalDeviceDisplacementMicromapFeaturesNV: return "PhysicalDeviceDisplacementMicromapFeaturesNV"; case StructureType::ePhysicalDeviceDisplacementMicromapPropertiesNV: return "PhysicalDeviceDisplacementMicromapPropertiesNV"; case StructureType::eAccelerationStructureTrianglesDisplacementMicromapNV: return "AccelerationStructureTrianglesDisplacementMicromapNV"; #endif /*VK_ENABLE_BETA_EXTENSIONS*/ case StructureType::ePhysicalDeviceClusterCullingShaderFeaturesHUAWEI: return "PhysicalDeviceClusterCullingShaderFeaturesHUAWEI"; case StructureType::ePhysicalDeviceClusterCullingShaderPropertiesHUAWEI: return "PhysicalDeviceClusterCullingShaderPropertiesHUAWEI"; case StructureType::ePhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI: return "PhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI"; case StructureType::ePhysicalDeviceBorderColorSwizzleFeaturesEXT: return "PhysicalDeviceBorderColorSwizzleFeaturesEXT"; case StructureType::eSamplerBorderColorComponentMappingCreateInfoEXT: return "SamplerBorderColorComponentMappingCreateInfoEXT"; case StructureType::ePhysicalDevicePageableDeviceLocalMemoryFeaturesEXT: return "PhysicalDevicePageableDeviceLocalMemoryFeaturesEXT"; case StructureType::ePhysicalDeviceShaderCorePropertiesARM: return "PhysicalDeviceShaderCorePropertiesARM"; case StructureType::eDeviceQueueShaderCoreControlCreateInfoARM: return "DeviceQueueShaderCoreControlCreateInfoARM"; case StructureType::ePhysicalDeviceSchedulingControlsFeaturesARM: return "PhysicalDeviceSchedulingControlsFeaturesARM"; case StructureType::ePhysicalDeviceSchedulingControlsPropertiesARM: return "PhysicalDeviceSchedulingControlsPropertiesARM"; case StructureType::ePhysicalDeviceImageSlicedViewOf3DFeaturesEXT: return "PhysicalDeviceImageSlicedViewOf3DFeaturesEXT"; case StructureType::eImageViewSlicedCreateInfoEXT: return "ImageViewSlicedCreateInfoEXT"; case StructureType::ePhysicalDeviceDescriptorSetHostMappingFeaturesVALVE: return "PhysicalDeviceDescriptorSetHostMappingFeaturesVALVE"; case StructureType::eDescriptorSetBindingReferenceVALVE: return "DescriptorSetBindingReferenceVALVE"; case StructureType::eDescriptorSetLayoutHostMappingInfoVALVE: return "DescriptorSetLayoutHostMappingInfoVALVE"; case StructureType::ePhysicalDeviceNonSeamlessCubeMapFeaturesEXT: return "PhysicalDeviceNonSeamlessCubeMapFeaturesEXT"; case StructureType::ePhysicalDeviceRenderPassStripedFeaturesARM: return "PhysicalDeviceRenderPassStripedFeaturesARM"; case StructureType::ePhysicalDeviceRenderPassStripedPropertiesARM: return "PhysicalDeviceRenderPassStripedPropertiesARM"; case StructureType::eRenderPassStripeBeginInfoARM: return "RenderPassStripeBeginInfoARM"; case StructureType::eRenderPassStripeInfoARM: return "RenderPassStripeInfoARM"; case StructureType::eRenderPassStripeSubmitInfoARM: return "RenderPassStripeSubmitInfoARM"; case StructureType::ePhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM: return "PhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM"; case StructureType::ePhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM: return "PhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM"; case StructureType::eSubpassFragmentDensityMapOffsetEndInfoQCOM: return "SubpassFragmentDensityMapOffsetEndInfoQCOM"; case StructureType::ePhysicalDeviceCopyMemoryIndirectFeaturesNV: return "PhysicalDeviceCopyMemoryIndirectFeaturesNV"; case StructureType::ePhysicalDeviceCopyMemoryIndirectPropertiesNV: return "PhysicalDeviceCopyMemoryIndirectPropertiesNV"; case StructureType::ePhysicalDeviceMemoryDecompressionFeaturesNV: return "PhysicalDeviceMemoryDecompressionFeaturesNV"; case StructureType::ePhysicalDeviceMemoryDecompressionPropertiesNV: return "PhysicalDeviceMemoryDecompressionPropertiesNV"; case StructureType::ePhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV: return "PhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV"; case StructureType::eComputePipelineIndirectBufferInfoNV: return "ComputePipelineIndirectBufferInfoNV"; case StructureType::ePipelineIndirectDeviceAddressInfoNV: return "PipelineIndirectDeviceAddressInfoNV"; case StructureType::ePhysicalDeviceRayTracingLinearSweptSpheresFeaturesNV: return "PhysicalDeviceRayTracingLinearSweptSpheresFeaturesNV"; case StructureType::eAccelerationStructureGeometryLinearSweptSpheresDataNV: return "AccelerationStructureGeometryLinearSweptSpheresDataNV"; case StructureType::eAccelerationStructureGeometrySpheresDataNV: return "AccelerationStructureGeometrySpheresDataNV"; case StructureType::ePhysicalDeviceLinearColorAttachmentFeaturesNV: return "PhysicalDeviceLinearColorAttachmentFeaturesNV"; case StructureType::ePhysicalDeviceShaderMaximalReconvergenceFeaturesKHR: return "PhysicalDeviceShaderMaximalReconvergenceFeaturesKHR"; case StructureType::ePhysicalDeviceImageCompressionControlSwapchainFeaturesEXT: return "PhysicalDeviceImageCompressionControlSwapchainFeaturesEXT"; case StructureType::ePhysicalDeviceImageProcessingFeaturesQCOM: return "PhysicalDeviceImageProcessingFeaturesQCOM"; case StructureType::ePhysicalDeviceImageProcessingPropertiesQCOM: return "PhysicalDeviceImageProcessingPropertiesQCOM"; case StructureType::eImageViewSampleWeightCreateInfoQCOM: return "ImageViewSampleWeightCreateInfoQCOM"; case StructureType::ePhysicalDeviceNestedCommandBufferFeaturesEXT: return "PhysicalDeviceNestedCommandBufferFeaturesEXT"; case StructureType::ePhysicalDeviceNestedCommandBufferPropertiesEXT: return "PhysicalDeviceNestedCommandBufferPropertiesEXT"; case StructureType::eExternalMemoryAcquireUnmodifiedEXT: return "ExternalMemoryAcquireUnmodifiedEXT"; case StructureType::ePhysicalDeviceExtendedDynamicState3FeaturesEXT: return "PhysicalDeviceExtendedDynamicState3FeaturesEXT"; case StructureType::ePhysicalDeviceExtendedDynamicState3PropertiesEXT: return "PhysicalDeviceExtendedDynamicState3PropertiesEXT"; case StructureType::ePhysicalDeviceSubpassMergeFeedbackFeaturesEXT: return "PhysicalDeviceSubpassMergeFeedbackFeaturesEXT"; case StructureType::eRenderPassCreationControlEXT: return "RenderPassCreationControlEXT"; case StructureType::eRenderPassCreationFeedbackCreateInfoEXT: return "RenderPassCreationFeedbackCreateInfoEXT"; case StructureType::eRenderPassSubpassFeedbackCreateInfoEXT: return "RenderPassSubpassFeedbackCreateInfoEXT"; case StructureType::eDirectDriverLoadingInfoLUNARG: return "DirectDriverLoadingInfoLUNARG"; case StructureType::eDirectDriverLoadingListLUNARG: return "DirectDriverLoadingListLUNARG"; case StructureType::ePhysicalDeviceShaderModuleIdentifierFeaturesEXT: return "PhysicalDeviceShaderModuleIdentifierFeaturesEXT"; case StructureType::ePhysicalDeviceShaderModuleIdentifierPropertiesEXT: return "PhysicalDeviceShaderModuleIdentifierPropertiesEXT"; case StructureType::ePipelineShaderStageModuleIdentifierCreateInfoEXT: return "PipelineShaderStageModuleIdentifierCreateInfoEXT"; case StructureType::eShaderModuleIdentifierEXT: return "ShaderModuleIdentifierEXT"; case StructureType::ePhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT: return "PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT"; case StructureType::ePhysicalDeviceOpticalFlowFeaturesNV: return "PhysicalDeviceOpticalFlowFeaturesNV"; case StructureType::ePhysicalDeviceOpticalFlowPropertiesNV: return "PhysicalDeviceOpticalFlowPropertiesNV"; case StructureType::eOpticalFlowImageFormatInfoNV: return "OpticalFlowImageFormatInfoNV"; case StructureType::eOpticalFlowImageFormatPropertiesNV: return "OpticalFlowImageFormatPropertiesNV"; case StructureType::eOpticalFlowSessionCreateInfoNV: return "OpticalFlowSessionCreateInfoNV"; case StructureType::eOpticalFlowExecuteInfoNV: return "OpticalFlowExecuteInfoNV"; case StructureType::eOpticalFlowSessionCreatePrivateDataInfoNV: return "OpticalFlowSessionCreatePrivateDataInfoNV"; case StructureType::ePhysicalDeviceLegacyDitheringFeaturesEXT: return "PhysicalDeviceLegacyDitheringFeaturesEXT"; #if defined( VK_USE_PLATFORM_ANDROID_KHR ) case StructureType::ePhysicalDeviceExternalFormatResolveFeaturesANDROID: return "PhysicalDeviceExternalFormatResolveFeaturesANDROID"; case StructureType::ePhysicalDeviceExternalFormatResolvePropertiesANDROID: return "PhysicalDeviceExternalFormatResolvePropertiesANDROID"; case StructureType::eAndroidHardwareBufferFormatResolvePropertiesANDROID: return "AndroidHardwareBufferFormatResolvePropertiesANDROID"; #endif /*VK_USE_PLATFORM_ANDROID_KHR*/ case StructureType::ePhysicalDeviceAntiLagFeaturesAMD: return "PhysicalDeviceAntiLagFeaturesAMD"; case StructureType::eAntiLagDataAMD: return "AntiLagDataAMD"; case StructureType::eAntiLagPresentationInfoAMD: return "AntiLagPresentationInfoAMD"; case StructureType::ePhysicalDeviceRayTracingPositionFetchFeaturesKHR: return "PhysicalDeviceRayTracingPositionFetchFeaturesKHR"; case StructureType::ePhysicalDeviceShaderObjectFeaturesEXT: return "PhysicalDeviceShaderObjectFeaturesEXT"; case StructureType::ePhysicalDeviceShaderObjectPropertiesEXT: return "PhysicalDeviceShaderObjectPropertiesEXT"; case StructureType::eShaderCreateInfoEXT: return "ShaderCreateInfoEXT"; case StructureType::ePhysicalDevicePipelineBinaryFeaturesKHR: return "PhysicalDevicePipelineBinaryFeaturesKHR"; case StructureType::ePipelineBinaryCreateInfoKHR: return "PipelineBinaryCreateInfoKHR"; case StructureType::ePipelineBinaryInfoKHR: return "PipelineBinaryInfoKHR"; case StructureType::ePipelineBinaryKeyKHR: return "PipelineBinaryKeyKHR"; case StructureType::ePhysicalDevicePipelineBinaryPropertiesKHR: return "PhysicalDevicePipelineBinaryPropertiesKHR"; case StructureType::eReleaseCapturedPipelineDataInfoKHR: return "ReleaseCapturedPipelineDataInfoKHR"; case StructureType::ePipelineBinaryDataInfoKHR: return "PipelineBinaryDataInfoKHR"; case StructureType::ePipelineCreateInfoKHR: return "PipelineCreateInfoKHR"; case StructureType::eDevicePipelineBinaryInternalCacheControlKHR: return "DevicePipelineBinaryInternalCacheControlKHR"; case StructureType::ePipelineBinaryHandlesInfoKHR: return "PipelineBinaryHandlesInfoKHR"; case StructureType::ePhysicalDeviceTilePropertiesFeaturesQCOM: return "PhysicalDeviceTilePropertiesFeaturesQCOM"; case StructureType::eTilePropertiesQCOM: return "TilePropertiesQCOM"; case StructureType::ePhysicalDeviceAmigoProfilingFeaturesSEC: return "PhysicalDeviceAmigoProfilingFeaturesSEC"; case StructureType::eAmigoProfilingSubmitInfoSEC: return "AmigoProfilingSubmitInfoSEC"; case StructureType::ePhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM: return "PhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM"; case StructureType::ePhysicalDeviceRayTracingInvocationReorderFeaturesNV: return "PhysicalDeviceRayTracingInvocationReorderFeaturesNV"; case StructureType::ePhysicalDeviceRayTracingInvocationReorderPropertiesNV: return "PhysicalDeviceRayTracingInvocationReorderPropertiesNV"; case StructureType::ePhysicalDeviceCooperativeVectorFeaturesNV: return "PhysicalDeviceCooperativeVectorFeaturesNV"; case StructureType::ePhysicalDeviceCooperativeVectorPropertiesNV: return "PhysicalDeviceCooperativeVectorPropertiesNV"; case StructureType::eCooperativeVectorPropertiesNV: return "CooperativeVectorPropertiesNV"; case StructureType::eConvertCooperativeVectorMatrixInfoNV: return "ConvertCooperativeVectorMatrixInfoNV"; case StructureType::ePhysicalDeviceExtendedSparseAddressSpaceFeaturesNV: return "PhysicalDeviceExtendedSparseAddressSpaceFeaturesNV"; case StructureType::ePhysicalDeviceExtendedSparseAddressSpacePropertiesNV: return "PhysicalDeviceExtendedSparseAddressSpacePropertiesNV"; case StructureType::ePhysicalDeviceMutableDescriptorTypeFeaturesEXT: return "PhysicalDeviceMutableDescriptorTypeFeaturesEXT"; case StructureType::eMutableDescriptorTypeCreateInfoEXT: return "MutableDescriptorTypeCreateInfoEXT"; case StructureType::ePhysicalDeviceLegacyVertexAttributesFeaturesEXT: return "PhysicalDeviceLegacyVertexAttributesFeaturesEXT"; case StructureType::ePhysicalDeviceLegacyVertexAttributesPropertiesEXT: return "PhysicalDeviceLegacyVertexAttributesPropertiesEXT"; case StructureType::eLayerSettingsCreateInfoEXT: return "LayerSettingsCreateInfoEXT"; case StructureType::ePhysicalDeviceShaderCoreBuiltinsFeaturesARM: return "PhysicalDeviceShaderCoreBuiltinsFeaturesARM"; case StructureType::ePhysicalDeviceShaderCoreBuiltinsPropertiesARM: return "PhysicalDeviceShaderCoreBuiltinsPropertiesARM"; case StructureType::ePhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT: return "PhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT"; case StructureType::ePhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT: return "PhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT"; case StructureType::eLatencySleepModeInfoNV: return "LatencySleepModeInfoNV"; case StructureType::eLatencySleepInfoNV: return "LatencySleepInfoNV"; case StructureType::eSetLatencyMarkerInfoNV: return "SetLatencyMarkerInfoNV"; case StructureType::eGetLatencyMarkerInfoNV: return "GetLatencyMarkerInfoNV"; case StructureType::eLatencyTimingsFrameReportNV: return "LatencyTimingsFrameReportNV"; case StructureType::eLatencySubmissionPresentIdNV: return "LatencySubmissionPresentIdNV"; case StructureType::eOutOfBandQueueTypeInfoNV: return "OutOfBandQueueTypeInfoNV"; case StructureType::eSwapchainLatencyCreateInfoNV: return "SwapchainLatencyCreateInfoNV"; case StructureType::eLatencySurfaceCapabilitiesNV: return "LatencySurfaceCapabilitiesNV"; case StructureType::ePhysicalDeviceCooperativeMatrixFeaturesKHR: return "PhysicalDeviceCooperativeMatrixFeaturesKHR"; case StructureType::eCooperativeMatrixPropertiesKHR: return "CooperativeMatrixPropertiesKHR"; case StructureType::ePhysicalDeviceCooperativeMatrixPropertiesKHR: return "PhysicalDeviceCooperativeMatrixPropertiesKHR"; case StructureType::ePhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM: return "PhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM"; case StructureType::eMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM: return "MultiviewPerViewRenderAreasRenderPassBeginInfoQCOM"; case StructureType::ePhysicalDeviceComputeShaderDerivativesFeaturesKHR: return "PhysicalDeviceComputeShaderDerivativesFeaturesKHR"; case StructureType::ePhysicalDeviceComputeShaderDerivativesPropertiesKHR: return "PhysicalDeviceComputeShaderDerivativesPropertiesKHR"; case StructureType::eVideoDecodeAv1CapabilitiesKHR: return "VideoDecodeAv1CapabilitiesKHR"; case StructureType::eVideoDecodeAv1PictureInfoKHR: return "VideoDecodeAv1PictureInfoKHR"; case StructureType::eVideoDecodeAv1ProfileInfoKHR: return "VideoDecodeAv1ProfileInfoKHR"; case StructureType::eVideoDecodeAv1SessionParametersCreateInfoKHR: return "VideoDecodeAv1SessionParametersCreateInfoKHR"; case StructureType::eVideoDecodeAv1DpbSlotInfoKHR: return "VideoDecodeAv1DpbSlotInfoKHR"; case StructureType::eVideoEncodeAv1CapabilitiesKHR: return "VideoEncodeAv1CapabilitiesKHR"; case StructureType::eVideoEncodeAv1SessionParametersCreateInfoKHR: return "VideoEncodeAv1SessionParametersCreateInfoKHR"; case StructureType::eVideoEncodeAv1PictureInfoKHR: return "VideoEncodeAv1PictureInfoKHR"; case StructureType::eVideoEncodeAv1DpbSlotInfoKHR: return "VideoEncodeAv1DpbSlotInfoKHR"; case StructureType::ePhysicalDeviceVideoEncodeAv1FeaturesKHR: return "PhysicalDeviceVideoEncodeAv1FeaturesKHR"; case StructureType::eVideoEncodeAv1ProfileInfoKHR: return "VideoEncodeAv1ProfileInfoKHR"; case StructureType::eVideoEncodeAv1RateControlInfoKHR: return "VideoEncodeAv1RateControlInfoKHR"; case StructureType::eVideoEncodeAv1RateControlLayerInfoKHR: return "VideoEncodeAv1RateControlLayerInfoKHR"; case StructureType::eVideoEncodeAv1QualityLevelPropertiesKHR: return "VideoEncodeAv1QualityLevelPropertiesKHR"; case StructureType::eVideoEncodeAv1SessionCreateInfoKHR: return "VideoEncodeAv1SessionCreateInfoKHR"; case StructureType::eVideoEncodeAv1GopRemainingFrameInfoKHR: return "VideoEncodeAv1GopRemainingFrameInfoKHR"; case StructureType::ePhysicalDeviceVideoMaintenance1FeaturesKHR: return "PhysicalDeviceVideoMaintenance1FeaturesKHR"; case StructureType::eVideoInlineQueryInfoKHR: return "VideoInlineQueryInfoKHR"; case StructureType::ePhysicalDevicePerStageDescriptorSetFeaturesNV: return "PhysicalDevicePerStageDescriptorSetFeaturesNV"; case StructureType::ePhysicalDeviceImageProcessing2FeaturesQCOM: return "PhysicalDeviceImageProcessing2FeaturesQCOM"; case StructureType::ePhysicalDeviceImageProcessing2PropertiesQCOM: return "PhysicalDeviceImageProcessing2PropertiesQCOM"; case StructureType::eSamplerBlockMatchWindowCreateInfoQCOM: return "SamplerBlockMatchWindowCreateInfoQCOM"; case StructureType::eSamplerCubicWeightsCreateInfoQCOM: return "SamplerCubicWeightsCreateInfoQCOM"; case StructureType::ePhysicalDeviceCubicWeightsFeaturesQCOM: return "PhysicalDeviceCubicWeightsFeaturesQCOM"; case StructureType::eBlitImageCubicWeightsInfoQCOM: return "BlitImageCubicWeightsInfoQCOM"; case StructureType::ePhysicalDeviceYcbcrDegammaFeaturesQCOM: return "PhysicalDeviceYcbcrDegammaFeaturesQCOM"; case StructureType::eSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM: return "SamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM"; case StructureType::ePhysicalDeviceCubicClampFeaturesQCOM: return "PhysicalDeviceCubicClampFeaturesQCOM"; case StructureType::ePhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT: return "PhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT"; #if defined( VK_USE_PLATFORM_SCREEN_QNX ) case StructureType::eScreenBufferPropertiesQNX: return "ScreenBufferPropertiesQNX"; case StructureType::eScreenBufferFormatPropertiesQNX: return "ScreenBufferFormatPropertiesQNX"; case StructureType::eImportScreenBufferInfoQNX: return "ImportScreenBufferInfoQNX"; case StructureType::eExternalFormatQNX: return "ExternalFormatQNX"; case StructureType::ePhysicalDeviceExternalMemoryScreenBufferFeaturesQNX: return "PhysicalDeviceExternalMemoryScreenBufferFeaturesQNX"; #endif /*VK_USE_PLATFORM_SCREEN_QNX*/ case StructureType::ePhysicalDeviceLayeredDriverPropertiesMSFT: return "PhysicalDeviceLayeredDriverPropertiesMSFT"; case StructureType::eCalibratedTimestampInfoKHR: return "CalibratedTimestampInfoKHR"; case StructureType::eSetDescriptorBufferOffsetsInfoEXT: return "SetDescriptorBufferOffsetsInfoEXT"; case StructureType::eBindDescriptorBufferEmbeddedSamplersInfoEXT: return "BindDescriptorBufferEmbeddedSamplersInfoEXT"; case StructureType::ePhysicalDeviceDescriptorPoolOverallocationFeaturesNV: return "PhysicalDeviceDescriptorPoolOverallocationFeaturesNV"; case StructureType::eDisplaySurfaceStereoCreateInfoNV: return "DisplaySurfaceStereoCreateInfoNV"; case StructureType::eDisplayModeStereoPropertiesNV: return "DisplayModeStereoPropertiesNV"; case StructureType::eVideoEncodeQuantizationMapCapabilitiesKHR: return "VideoEncodeQuantizationMapCapabilitiesKHR"; case StructureType::eVideoFormatQuantizationMapPropertiesKHR: return "VideoFormatQuantizationMapPropertiesKHR"; case StructureType::eVideoEncodeQuantizationMapInfoKHR: return "VideoEncodeQuantizationMapInfoKHR"; case StructureType::eVideoEncodeQuantizationMapSessionParametersCreateInfoKHR: return "VideoEncodeQuantizationMapSessionParametersCreateInfoKHR"; case StructureType::ePhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR: return "PhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR"; case StructureType::eVideoEncodeH264QuantizationMapCapabilitiesKHR: return "VideoEncodeH264QuantizationMapCapabilitiesKHR"; case StructureType::eVideoEncodeH265QuantizationMapCapabilitiesKHR: return "VideoEncodeH265QuantizationMapCapabilitiesKHR"; case StructureType::eVideoFormatH265QuantizationMapPropertiesKHR: return "VideoFormatH265QuantizationMapPropertiesKHR"; case StructureType::eVideoEncodeAv1QuantizationMapCapabilitiesKHR: return "VideoEncodeAv1QuantizationMapCapabilitiesKHR"; case StructureType::eVideoFormatAv1QuantizationMapPropertiesKHR: return "VideoFormatAv1QuantizationMapPropertiesKHR"; case StructureType::ePhysicalDeviceRawAccessChainsFeaturesNV: return "PhysicalDeviceRawAccessChainsFeaturesNV"; case StructureType::ePhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR: return "PhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR"; case StructureType::ePhysicalDeviceCommandBufferInheritanceFeaturesNV: return "PhysicalDeviceCommandBufferInheritanceFeaturesNV"; case StructureType::ePhysicalDeviceMaintenance7FeaturesKHR: return "PhysicalDeviceMaintenance7FeaturesKHR"; case StructureType::ePhysicalDeviceMaintenance7PropertiesKHR: return "PhysicalDeviceMaintenance7PropertiesKHR"; case StructureType::ePhysicalDeviceLayeredApiPropertiesListKHR: return "PhysicalDeviceLayeredApiPropertiesListKHR"; case StructureType::ePhysicalDeviceLayeredApiPropertiesKHR: return "PhysicalDeviceLayeredApiPropertiesKHR"; case StructureType::ePhysicalDeviceLayeredApiVulkanPropertiesKHR: return "PhysicalDeviceLayeredApiVulkanPropertiesKHR"; case StructureType::ePhysicalDeviceShaderAtomicFloat16VectorFeaturesNV: return "PhysicalDeviceShaderAtomicFloat16VectorFeaturesNV"; case StructureType::ePhysicalDeviceShaderReplicatedCompositesFeaturesEXT: return "PhysicalDeviceShaderReplicatedCompositesFeaturesEXT"; case StructureType::ePhysicalDeviceRayTracingValidationFeaturesNV: return "PhysicalDeviceRayTracingValidationFeaturesNV"; case StructureType::ePhysicalDeviceClusterAccelerationStructureFeaturesNV: return "PhysicalDeviceClusterAccelerationStructureFeaturesNV"; case StructureType::ePhysicalDeviceClusterAccelerationStructurePropertiesNV: return "PhysicalDeviceClusterAccelerationStructurePropertiesNV"; case StructureType::eClusterAccelerationStructureClustersBottomLevelInputNV: return "ClusterAccelerationStructureClustersBottomLevelInputNV"; case StructureType::eClusterAccelerationStructureTriangleClusterInputNV: return "ClusterAccelerationStructureTriangleClusterInputNV"; case StructureType::eClusterAccelerationStructureMoveObjectsInputNV: return "ClusterAccelerationStructureMoveObjectsInputNV"; case StructureType::eClusterAccelerationStructureInputInfoNV: return "ClusterAccelerationStructureInputInfoNV"; case StructureType::eClusterAccelerationStructureCommandsInfoNV: return "ClusterAccelerationStructureCommandsInfoNV"; case StructureType::eRayTracingPipelineClusterAccelerationStructureCreateInfoNV: return "RayTracingPipelineClusterAccelerationStructureCreateInfoNV"; case StructureType::ePhysicalDevicePartitionedAccelerationStructureFeaturesNV: return "PhysicalDevicePartitionedAccelerationStructureFeaturesNV"; case StructureType::ePhysicalDevicePartitionedAccelerationStructurePropertiesNV: return "PhysicalDevicePartitionedAccelerationStructurePropertiesNV"; case StructureType::eWriteDescriptorSetPartitionedAccelerationStructureNV: return "WriteDescriptorSetPartitionedAccelerationStructureNV"; case StructureType::ePartitionedAccelerationStructureInstancesInputNV: return "PartitionedAccelerationStructureInstancesInputNV"; case StructureType::eBuildPartitionedAccelerationStructureInfoNV: return "BuildPartitionedAccelerationStructureInfoNV"; case StructureType::ePartitionedAccelerationStructureFlagsNV: return "PartitionedAccelerationStructureFlagsNV"; case StructureType::ePhysicalDeviceDeviceGeneratedCommandsFeaturesEXT: return "PhysicalDeviceDeviceGeneratedCommandsFeaturesEXT"; case StructureType::ePhysicalDeviceDeviceGeneratedCommandsPropertiesEXT: return "PhysicalDeviceDeviceGeneratedCommandsPropertiesEXT"; case StructureType::eGeneratedCommandsMemoryRequirementsInfoEXT: return "GeneratedCommandsMemoryRequirementsInfoEXT"; case StructureType::eIndirectExecutionSetCreateInfoEXT: return "IndirectExecutionSetCreateInfoEXT"; case StructureType::eGeneratedCommandsInfoEXT: return "GeneratedCommandsInfoEXT"; case StructureType::eIndirectCommandsLayoutCreateInfoEXT: return "IndirectCommandsLayoutCreateInfoEXT"; case StructureType::eIndirectCommandsLayoutTokenEXT: return "IndirectCommandsLayoutTokenEXT"; case StructureType::eWriteIndirectExecutionSetPipelineEXT: return "WriteIndirectExecutionSetPipelineEXT"; case StructureType::eWriteIndirectExecutionSetShaderEXT: return "WriteIndirectExecutionSetShaderEXT"; case StructureType::eIndirectExecutionSetPipelineInfoEXT: return "IndirectExecutionSetPipelineInfoEXT"; case StructureType::eIndirectExecutionSetShaderInfoEXT: return "IndirectExecutionSetShaderInfoEXT"; case StructureType::eIndirectExecutionSetShaderLayoutInfoEXT: return "IndirectExecutionSetShaderLayoutInfoEXT"; case StructureType::eGeneratedCommandsPipelineInfoEXT: return "GeneratedCommandsPipelineInfoEXT"; case StructureType::eGeneratedCommandsShaderInfoEXT: return "GeneratedCommandsShaderInfoEXT"; case StructureType::ePhysicalDeviceMaintenance8FeaturesKHR: return "PhysicalDeviceMaintenance8FeaturesKHR"; case StructureType::eMemoryBarrierAccessFlags3KHR: return "MemoryBarrierAccessFlags3KHR"; case StructureType::ePhysicalDeviceImageAlignmentControlFeaturesMESA: return "PhysicalDeviceImageAlignmentControlFeaturesMESA"; case StructureType::ePhysicalDeviceImageAlignmentControlPropertiesMESA: return "PhysicalDeviceImageAlignmentControlPropertiesMESA"; case StructureType::eImageAlignmentControlCreateInfoMESA: return "ImageAlignmentControlCreateInfoMESA"; case StructureType::ePhysicalDeviceDepthClampControlFeaturesEXT: return "PhysicalDeviceDepthClampControlFeaturesEXT"; case StructureType::ePipelineViewportDepthClampControlCreateInfoEXT: return "PipelineViewportDepthClampControlCreateInfoEXT"; case StructureType::ePhysicalDeviceVideoMaintenance2FeaturesKHR: return "PhysicalDeviceVideoMaintenance2FeaturesKHR"; case StructureType::eVideoDecodeH264InlineSessionParametersInfoKHR: return "VideoDecodeH264InlineSessionParametersInfoKHR"; case StructureType::eVideoDecodeH265InlineSessionParametersInfoKHR: return "VideoDecodeH265InlineSessionParametersInfoKHR"; case StructureType::eVideoDecodeAv1InlineSessionParametersInfoKHR: return "VideoDecodeAv1InlineSessionParametersInfoKHR"; case StructureType::ePhysicalDeviceHdrVividFeaturesHUAWEI: return "PhysicalDeviceHdrVividFeaturesHUAWEI"; case StructureType::eHdrVividDynamicMetadataHUAWEI: return "HdrVividDynamicMetadataHUAWEI"; case StructureType::ePhysicalDeviceCooperativeMatrix2FeaturesNV: return "PhysicalDeviceCooperativeMatrix2FeaturesNV"; case StructureType::eCooperativeMatrixFlexibleDimensionsPropertiesNV: return "CooperativeMatrixFlexibleDimensionsPropertiesNV"; case StructureType::ePhysicalDeviceCooperativeMatrix2PropertiesNV: return "PhysicalDeviceCooperativeMatrix2PropertiesNV"; case StructureType::ePhysicalDevicePipelineOpacityMicromapFeaturesARM: return "PhysicalDevicePipelineOpacityMicromapFeaturesARM"; #if defined( VK_USE_PLATFORM_METAL_EXT ) case StructureType::eImportMemoryMetalHandleInfoEXT: return "ImportMemoryMetalHandleInfoEXT"; case StructureType::eMemoryMetalHandlePropertiesEXT: return "MemoryMetalHandlePropertiesEXT"; case StructureType::eMemoryGetMetalHandleInfoEXT: return "MemoryGetMetalHandleInfoEXT"; #endif /*VK_USE_PLATFORM_METAL_EXT*/ case StructureType::ePhysicalDeviceDepthClampZeroOneFeaturesKHR: return "PhysicalDeviceDepthClampZeroOneFeaturesKHR"; case StructureType::ePhysicalDeviceVertexAttributeRobustnessFeaturesEXT: return "PhysicalDeviceVertexAttributeRobustnessFeaturesEXT"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( PipelineCacheHeaderVersion value ) { switch ( value ) { case PipelineCacheHeaderVersion::eOne: return "One"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( ObjectType value ) { switch ( value ) { case ObjectType::eUnknown: return "Unknown"; case ObjectType::eInstance: return "Instance"; case ObjectType::ePhysicalDevice: return "PhysicalDevice"; case ObjectType::eDevice: return "Device"; case ObjectType::eQueue: return "Queue"; case ObjectType::eSemaphore: return "Semaphore"; case ObjectType::eCommandBuffer: return "CommandBuffer"; case ObjectType::eFence: return "Fence"; case ObjectType::eDeviceMemory: return "DeviceMemory"; case ObjectType::eBuffer: return "Buffer"; case ObjectType::eImage: return "Image"; case ObjectType::eEvent: return "Event"; case ObjectType::eQueryPool: return "QueryPool"; case ObjectType::eBufferView: return "BufferView"; case ObjectType::eImageView: return "ImageView"; case ObjectType::eShaderModule: return "ShaderModule"; case ObjectType::ePipelineCache: return "PipelineCache"; case ObjectType::ePipelineLayout: return "PipelineLayout"; case ObjectType::eRenderPass: return "RenderPass"; case ObjectType::ePipeline: return "Pipeline"; case ObjectType::eDescriptorSetLayout: return "DescriptorSetLayout"; case ObjectType::eSampler: return "Sampler"; case ObjectType::eDescriptorPool: return "DescriptorPool"; case ObjectType::eDescriptorSet: return "DescriptorSet"; case ObjectType::eFramebuffer: return "Framebuffer"; case ObjectType::eCommandPool: return "CommandPool"; case ObjectType::eSamplerYcbcrConversion: return "SamplerYcbcrConversion"; case ObjectType::eDescriptorUpdateTemplate: return "DescriptorUpdateTemplate"; case ObjectType::ePrivateDataSlot: return "PrivateDataSlot"; case ObjectType::eSurfaceKHR: return "SurfaceKHR"; case ObjectType::eSwapchainKHR: return "SwapchainKHR"; case ObjectType::eDisplayKHR: return "DisplayKHR"; case ObjectType::eDisplayModeKHR: return "DisplayModeKHR"; case ObjectType::eDebugReportCallbackEXT: return "DebugReportCallbackEXT"; case ObjectType::eVideoSessionKHR: return "VideoSessionKHR"; case ObjectType::eVideoSessionParametersKHR: return "VideoSessionParametersKHR"; case ObjectType::eCuModuleNVX: return "CuModuleNVX"; case ObjectType::eCuFunctionNVX: return "CuFunctionNVX"; case ObjectType::eDebugUtilsMessengerEXT: return "DebugUtilsMessengerEXT"; case ObjectType::eAccelerationStructureKHR: return "AccelerationStructureKHR"; case ObjectType::eValidationCacheEXT: return "ValidationCacheEXT"; case ObjectType::eAccelerationStructureNV: return "AccelerationStructureNV"; case ObjectType::ePerformanceConfigurationINTEL: return "PerformanceConfigurationINTEL"; case ObjectType::eDeferredOperationKHR: return "DeferredOperationKHR"; case ObjectType::eIndirectCommandsLayoutNV: return "IndirectCommandsLayoutNV"; #if defined( VK_ENABLE_BETA_EXTENSIONS ) case ObjectType::eCudaModuleNV: return "CudaModuleNV"; case ObjectType::eCudaFunctionNV: return "CudaFunctionNV"; #endif /*VK_ENABLE_BETA_EXTENSIONS*/ #if defined( VK_USE_PLATFORM_FUCHSIA ) case ObjectType::eBufferCollectionFUCHSIA: return "BufferCollectionFUCHSIA"; #endif /*VK_USE_PLATFORM_FUCHSIA*/ case ObjectType::eMicromapEXT: return "MicromapEXT"; case ObjectType::eOpticalFlowSessionNV: return "OpticalFlowSessionNV"; case ObjectType::eShaderEXT: return "ShaderEXT"; case ObjectType::ePipelineBinaryKHR: return "PipelineBinaryKHR"; case ObjectType::eIndirectCommandsLayoutEXT: return "IndirectCommandsLayoutEXT"; case ObjectType::eIndirectExecutionSetEXT: return "IndirectExecutionSetEXT"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( VendorId value ) { switch ( value ) { case VendorId::eKhronos: return "Khronos"; case VendorId::eVIV: return "VIV"; case VendorId::eVSI: return "VSI"; case VendorId::eKazan: return "Kazan"; case VendorId::eCodeplay: return "Codeplay"; case VendorId::eMESA: return "MESA"; case VendorId::ePocl: return "Pocl"; case VendorId::eMobileye: return "Mobileye"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( Format value ) { switch ( value ) { case Format::eUndefined: return "Undefined"; case Format::eR4G4UnormPack8: return "R4G4UnormPack8"; case Format::eR4G4B4A4UnormPack16: return "R4G4B4A4UnormPack16"; case Format::eB4G4R4A4UnormPack16: return "B4G4R4A4UnormPack16"; case Format::eR5G6B5UnormPack16: return "R5G6B5UnormPack16"; case Format::eB5G6R5UnormPack16: return "B5G6R5UnormPack16"; case Format::eR5G5B5A1UnormPack16: return "R5G5B5A1UnormPack16"; case Format::eB5G5R5A1UnormPack16: return "B5G5R5A1UnormPack16"; case Format::eA1R5G5B5UnormPack16: return "A1R5G5B5UnormPack16"; case Format::eR8Unorm: return "R8Unorm"; case Format::eR8Snorm: return "R8Snorm"; case Format::eR8Uscaled: return "R8Uscaled"; case Format::eR8Sscaled: return "R8Sscaled"; case Format::eR8Uint: return "R8Uint"; case Format::eR8Sint: return "R8Sint"; case Format::eR8Srgb: return "R8Srgb"; case Format::eR8G8Unorm: return "R8G8Unorm"; case Format::eR8G8Snorm: return "R8G8Snorm"; case Format::eR8G8Uscaled: return "R8G8Uscaled"; case Format::eR8G8Sscaled: return "R8G8Sscaled"; case Format::eR8G8Uint: return "R8G8Uint"; case Format::eR8G8Sint: return "R8G8Sint"; case Format::eR8G8Srgb: return "R8G8Srgb"; case Format::eR8G8B8Unorm: return "R8G8B8Unorm"; case Format::eR8G8B8Snorm: return "R8G8B8Snorm"; case Format::eR8G8B8Uscaled: return "R8G8B8Uscaled"; case Format::eR8G8B8Sscaled: return "R8G8B8Sscaled"; case Format::eR8G8B8Uint: return "R8G8B8Uint"; case Format::eR8G8B8Sint: return "R8G8B8Sint"; case Format::eR8G8B8Srgb: return "R8G8B8Srgb"; case Format::eB8G8R8Unorm: return "B8G8R8Unorm"; case Format::eB8G8R8Snorm: return "B8G8R8Snorm"; case Format::eB8G8R8Uscaled: return "B8G8R8Uscaled"; case Format::eB8G8R8Sscaled: return "B8G8R8Sscaled"; case Format::eB8G8R8Uint: return "B8G8R8Uint"; case Format::eB8G8R8Sint: return "B8G8R8Sint"; case Format::eB8G8R8Srgb: return "B8G8R8Srgb"; case Format::eR8G8B8A8Unorm: return "R8G8B8A8Unorm"; case Format::eR8G8B8A8Snorm: return "R8G8B8A8Snorm"; case Format::eR8G8B8A8Uscaled: return "R8G8B8A8Uscaled"; case Format::eR8G8B8A8Sscaled: return "R8G8B8A8Sscaled"; case Format::eR8G8B8A8Uint: return "R8G8B8A8Uint"; case Format::eR8G8B8A8Sint: return "R8G8B8A8Sint"; case Format::eR8G8B8A8Srgb: return "R8G8B8A8Srgb"; case Format::eB8G8R8A8Unorm: return "B8G8R8A8Unorm"; case Format::eB8G8R8A8Snorm: return "B8G8R8A8Snorm"; case Format::eB8G8R8A8Uscaled: return "B8G8R8A8Uscaled"; case Format::eB8G8R8A8Sscaled: return "B8G8R8A8Sscaled"; case Format::eB8G8R8A8Uint: return "B8G8R8A8Uint"; case Format::eB8G8R8A8Sint: return "B8G8R8A8Sint"; case Format::eB8G8R8A8Srgb: return "B8G8R8A8Srgb"; case Format::eA8B8G8R8UnormPack32: return "A8B8G8R8UnormPack32"; case Format::eA8B8G8R8SnormPack32: return "A8B8G8R8SnormPack32"; case Format::eA8B8G8R8UscaledPack32: return "A8B8G8R8UscaledPack32"; case Format::eA8B8G8R8SscaledPack32: return "A8B8G8R8SscaledPack32"; case Format::eA8B8G8R8UintPack32: return "A8B8G8R8UintPack32"; case Format::eA8B8G8R8SintPack32: return "A8B8G8R8SintPack32"; case Format::eA8B8G8R8SrgbPack32: return "A8B8G8R8SrgbPack32"; case Format::eA2R10G10B10UnormPack32: return "A2R10G10B10UnormPack32"; case Format::eA2R10G10B10SnormPack32: return "A2R10G10B10SnormPack32"; case Format::eA2R10G10B10UscaledPack32: return "A2R10G10B10UscaledPack32"; case Format::eA2R10G10B10SscaledPack32: return "A2R10G10B10SscaledPack32"; case Format::eA2R10G10B10UintPack32: return "A2R10G10B10UintPack32"; case Format::eA2R10G10B10SintPack32: return "A2R10G10B10SintPack32"; case Format::eA2B10G10R10UnormPack32: return "A2B10G10R10UnormPack32"; case Format::eA2B10G10R10SnormPack32: return "A2B10G10R10SnormPack32"; case Format::eA2B10G10R10UscaledPack32: return "A2B10G10R10UscaledPack32"; case Format::eA2B10G10R10SscaledPack32: return "A2B10G10R10SscaledPack32"; case Format::eA2B10G10R10UintPack32: return "A2B10G10R10UintPack32"; case Format::eA2B10G10R10SintPack32: return "A2B10G10R10SintPack32"; case Format::eR16Unorm: return "R16Unorm"; case Format::eR16Snorm: return "R16Snorm"; case Format::eR16Uscaled: return "R16Uscaled"; case Format::eR16Sscaled: return "R16Sscaled"; case Format::eR16Uint: return "R16Uint"; case Format::eR16Sint: return "R16Sint"; case Format::eR16Sfloat: return "R16Sfloat"; case Format::eR16G16Unorm: return "R16G16Unorm"; case Format::eR16G16Snorm: return "R16G16Snorm"; case Format::eR16G16Uscaled: return "R16G16Uscaled"; case Format::eR16G16Sscaled: return "R16G16Sscaled"; case Format::eR16G16Uint: return "R16G16Uint"; case Format::eR16G16Sint: return "R16G16Sint"; case Format::eR16G16Sfloat: return "R16G16Sfloat"; case Format::eR16G16B16Unorm: return "R16G16B16Unorm"; case Format::eR16G16B16Snorm: return "R16G16B16Snorm"; case Format::eR16G16B16Uscaled: return "R16G16B16Uscaled"; case Format::eR16G16B16Sscaled: return "R16G16B16Sscaled"; case Format::eR16G16B16Uint: return "R16G16B16Uint"; case Format::eR16G16B16Sint: return "R16G16B16Sint"; case Format::eR16G16B16Sfloat: return "R16G16B16Sfloat"; case Format::eR16G16B16A16Unorm: return "R16G16B16A16Unorm"; case Format::eR16G16B16A16Snorm: return "R16G16B16A16Snorm"; case Format::eR16G16B16A16Uscaled: return "R16G16B16A16Uscaled"; case Format::eR16G16B16A16Sscaled: return "R16G16B16A16Sscaled"; case Format::eR16G16B16A16Uint: return "R16G16B16A16Uint"; case Format::eR16G16B16A16Sint: return "R16G16B16A16Sint"; case Format::eR16G16B16A16Sfloat: return "R16G16B16A16Sfloat"; case Format::eR32Uint: return "R32Uint"; case Format::eR32Sint: return "R32Sint"; case Format::eR32Sfloat: return "R32Sfloat"; case Format::eR32G32Uint: return "R32G32Uint"; case Format::eR32G32Sint: return "R32G32Sint"; case Format::eR32G32Sfloat: return "R32G32Sfloat"; case Format::eR32G32B32Uint: return "R32G32B32Uint"; case Format::eR32G32B32Sint: return "R32G32B32Sint"; case Format::eR32G32B32Sfloat: return "R32G32B32Sfloat"; case Format::eR32G32B32A32Uint: return "R32G32B32A32Uint"; case Format::eR32G32B32A32Sint: return "R32G32B32A32Sint"; case Format::eR32G32B32A32Sfloat: return "R32G32B32A32Sfloat"; case Format::eR64Uint: return "R64Uint"; case Format::eR64Sint: return "R64Sint"; case Format::eR64Sfloat: return "R64Sfloat"; case Format::eR64G64Uint: return "R64G64Uint"; case Format::eR64G64Sint: return "R64G64Sint"; case Format::eR64G64Sfloat: return "R64G64Sfloat"; case Format::eR64G64B64Uint: return "R64G64B64Uint"; case Format::eR64G64B64Sint: return "R64G64B64Sint"; case Format::eR64G64B64Sfloat: return "R64G64B64Sfloat"; case Format::eR64G64B64A64Uint: return "R64G64B64A64Uint"; case Format::eR64G64B64A64Sint: return "R64G64B64A64Sint"; case Format::eR64G64B64A64Sfloat: return "R64G64B64A64Sfloat"; case Format::eB10G11R11UfloatPack32: return "B10G11R11UfloatPack32"; case Format::eE5B9G9R9UfloatPack32: return "E5B9G9R9UfloatPack32"; case Format::eD16Unorm: return "D16Unorm"; case Format::eX8D24UnormPack32: return "X8D24UnormPack32"; case Format::eD32Sfloat: return "D32Sfloat"; case Format::eS8Uint: return "S8Uint"; case Format::eD16UnormS8Uint: return "D16UnormS8Uint"; case Format::eD24UnormS8Uint: return "D24UnormS8Uint"; case Format::eD32SfloatS8Uint: return "D32SfloatS8Uint"; case Format::eBc1RgbUnormBlock: return "Bc1RgbUnormBlock"; case Format::eBc1RgbSrgbBlock: return "Bc1RgbSrgbBlock"; case Format::eBc1RgbaUnormBlock: return "Bc1RgbaUnormBlock"; case Format::eBc1RgbaSrgbBlock: return "Bc1RgbaSrgbBlock"; case Format::eBc2UnormBlock: return "Bc2UnormBlock"; case Format::eBc2SrgbBlock: return "Bc2SrgbBlock"; case Format::eBc3UnormBlock: return "Bc3UnormBlock"; case Format::eBc3SrgbBlock: return "Bc3SrgbBlock"; case Format::eBc4UnormBlock: return "Bc4UnormBlock"; case Format::eBc4SnormBlock: return "Bc4SnormBlock"; case Format::eBc5UnormBlock: return "Bc5UnormBlock"; case Format::eBc5SnormBlock: return "Bc5SnormBlock"; case Format::eBc6HUfloatBlock: return "Bc6HUfloatBlock"; case Format::eBc6HSfloatBlock: return "Bc6HSfloatBlock"; case Format::eBc7UnormBlock: return "Bc7UnormBlock"; case Format::eBc7SrgbBlock: return "Bc7SrgbBlock"; case Format::eEtc2R8G8B8UnormBlock: return "Etc2R8G8B8UnormBlock"; case Format::eEtc2R8G8B8SrgbBlock: return "Etc2R8G8B8SrgbBlock"; case Format::eEtc2R8G8B8A1UnormBlock: return "Etc2R8G8B8A1UnormBlock"; case Format::eEtc2R8G8B8A1SrgbBlock: return "Etc2R8G8B8A1SrgbBlock"; case Format::eEtc2R8G8B8A8UnormBlock: return "Etc2R8G8B8A8UnormBlock"; case Format::eEtc2R8G8B8A8SrgbBlock: return "Etc2R8G8B8A8SrgbBlock"; case Format::eEacR11UnormBlock: return "EacR11UnormBlock"; case Format::eEacR11SnormBlock: return "EacR11SnormBlock"; case Format::eEacR11G11UnormBlock: return "EacR11G11UnormBlock"; case Format::eEacR11G11SnormBlock: return "EacR11G11SnormBlock"; case Format::eAstc4x4UnormBlock: return "Astc4x4UnormBlock"; case Format::eAstc4x4SrgbBlock: return "Astc4x4SrgbBlock"; case Format::eAstc5x4UnormBlock: return "Astc5x4UnormBlock"; case Format::eAstc5x4SrgbBlock: return "Astc5x4SrgbBlock"; case Format::eAstc5x5UnormBlock: return "Astc5x5UnormBlock"; case Format::eAstc5x5SrgbBlock: return "Astc5x5SrgbBlock"; case Format::eAstc6x5UnormBlock: return "Astc6x5UnormBlock"; case Format::eAstc6x5SrgbBlock: return "Astc6x5SrgbBlock"; case Format::eAstc6x6UnormBlock: return "Astc6x6UnormBlock"; case Format::eAstc6x6SrgbBlock: return "Astc6x6SrgbBlock"; case Format::eAstc8x5UnormBlock: return "Astc8x5UnormBlock"; case Format::eAstc8x5SrgbBlock: return "Astc8x5SrgbBlock"; case Format::eAstc8x6UnormBlock: return "Astc8x6UnormBlock"; case Format::eAstc8x6SrgbBlock: return "Astc8x6SrgbBlock"; case Format::eAstc8x8UnormBlock: return "Astc8x8UnormBlock"; case Format::eAstc8x8SrgbBlock: return "Astc8x8SrgbBlock"; case Format::eAstc10x5UnormBlock: return "Astc10x5UnormBlock"; case Format::eAstc10x5SrgbBlock: return "Astc10x5SrgbBlock"; case Format::eAstc10x6UnormBlock: return "Astc10x6UnormBlock"; case Format::eAstc10x6SrgbBlock: return "Astc10x6SrgbBlock"; case Format::eAstc10x8UnormBlock: return "Astc10x8UnormBlock"; case Format::eAstc10x8SrgbBlock: return "Astc10x8SrgbBlock"; case Format::eAstc10x10UnormBlock: return "Astc10x10UnormBlock"; case Format::eAstc10x10SrgbBlock: return "Astc10x10SrgbBlock"; case Format::eAstc12x10UnormBlock: return "Astc12x10UnormBlock"; case Format::eAstc12x10SrgbBlock: return "Astc12x10SrgbBlock"; case Format::eAstc12x12UnormBlock: return "Astc12x12UnormBlock"; case Format::eAstc12x12SrgbBlock: return "Astc12x12SrgbBlock"; case Format::eG8B8G8R8422Unorm: return "G8B8G8R8422Unorm"; case Format::eB8G8R8G8422Unorm: return "B8G8R8G8422Unorm"; case Format::eG8B8R83Plane420Unorm: return "G8B8R83Plane420Unorm"; case Format::eG8B8R82Plane420Unorm: return "G8B8R82Plane420Unorm"; case Format::eG8B8R83Plane422Unorm: return "G8B8R83Plane422Unorm"; case Format::eG8B8R82Plane422Unorm: return "G8B8R82Plane422Unorm"; case Format::eG8B8R83Plane444Unorm: return "G8B8R83Plane444Unorm"; case Format::eR10X6UnormPack16: return "R10X6UnormPack16"; case Format::eR10X6G10X6Unorm2Pack16: return "R10X6G10X6Unorm2Pack16"; case Format::eR10X6G10X6B10X6A10X6Unorm4Pack16: return "R10X6G10X6B10X6A10X6Unorm4Pack16"; case Format::eG10X6B10X6G10X6R10X6422Unorm4Pack16: return "G10X6B10X6G10X6R10X6422Unorm4Pack16"; case Format::eB10X6G10X6R10X6G10X6422Unorm4Pack16: return "B10X6G10X6R10X6G10X6422Unorm4Pack16"; case Format::eG10X6B10X6R10X63Plane420Unorm3Pack16: return "G10X6B10X6R10X63Plane420Unorm3Pack16"; case Format::eG10X6B10X6R10X62Plane420Unorm3Pack16: return "G10X6B10X6R10X62Plane420Unorm3Pack16"; case Format::eG10X6B10X6R10X63Plane422Unorm3Pack16: return "G10X6B10X6R10X63Plane422Unorm3Pack16"; case Format::eG10X6B10X6R10X62Plane422Unorm3Pack16: return "G10X6B10X6R10X62Plane422Unorm3Pack16"; case Format::eG10X6B10X6R10X63Plane444Unorm3Pack16: return "G10X6B10X6R10X63Plane444Unorm3Pack16"; case Format::eR12X4UnormPack16: return "R12X4UnormPack16"; case Format::eR12X4G12X4Unorm2Pack16: return "R12X4G12X4Unorm2Pack16"; case Format::eR12X4G12X4B12X4A12X4Unorm4Pack16: return "R12X4G12X4B12X4A12X4Unorm4Pack16"; case Format::eG12X4B12X4G12X4R12X4422Unorm4Pack16: return "G12X4B12X4G12X4R12X4422Unorm4Pack16"; case Format::eB12X4G12X4R12X4G12X4422Unorm4Pack16: return "B12X4G12X4R12X4G12X4422Unorm4Pack16"; case Format::eG12X4B12X4R12X43Plane420Unorm3Pack16: return "G12X4B12X4R12X43Plane420Unorm3Pack16"; case Format::eG12X4B12X4R12X42Plane420Unorm3Pack16: return "G12X4B12X4R12X42Plane420Unorm3Pack16"; case Format::eG12X4B12X4R12X43Plane422Unorm3Pack16: return "G12X4B12X4R12X43Plane422Unorm3Pack16"; case Format::eG12X4B12X4R12X42Plane422Unorm3Pack16: return "G12X4B12X4R12X42Plane422Unorm3Pack16"; case Format::eG12X4B12X4R12X43Plane444Unorm3Pack16: return "G12X4B12X4R12X43Plane444Unorm3Pack16"; case Format::eG16B16G16R16422Unorm: return "G16B16G16R16422Unorm"; case Format::eB16G16R16G16422Unorm: return "B16G16R16G16422Unorm"; case Format::eG16B16R163Plane420Unorm: return "G16B16R163Plane420Unorm"; case Format::eG16B16R162Plane420Unorm: return "G16B16R162Plane420Unorm"; case Format::eG16B16R163Plane422Unorm: return "G16B16R163Plane422Unorm"; case Format::eG16B16R162Plane422Unorm: return "G16B16R162Plane422Unorm"; case Format::eG16B16R163Plane444Unorm: return "G16B16R163Plane444Unorm"; case Format::eG8B8R82Plane444Unorm: return "G8B8R82Plane444Unorm"; case Format::eG10X6B10X6R10X62Plane444Unorm3Pack16: return "G10X6B10X6R10X62Plane444Unorm3Pack16"; case Format::eG12X4B12X4R12X42Plane444Unorm3Pack16: return "G12X4B12X4R12X42Plane444Unorm3Pack16"; case Format::eG16B16R162Plane444Unorm: return "G16B16R162Plane444Unorm"; case Format::eA4R4G4B4UnormPack16: return "A4R4G4B4UnormPack16"; case Format::eA4B4G4R4UnormPack16: return "A4B4G4R4UnormPack16"; case Format::eAstc4x4SfloatBlock: return "Astc4x4SfloatBlock"; case Format::eAstc5x4SfloatBlock: return "Astc5x4SfloatBlock"; case Format::eAstc5x5SfloatBlock: return "Astc5x5SfloatBlock"; case Format::eAstc6x5SfloatBlock: return "Astc6x5SfloatBlock"; case Format::eAstc6x6SfloatBlock: return "Astc6x6SfloatBlock"; case Format::eAstc8x5SfloatBlock: return "Astc8x5SfloatBlock"; case Format::eAstc8x6SfloatBlock: return "Astc8x6SfloatBlock"; case Format::eAstc8x8SfloatBlock: return "Astc8x8SfloatBlock"; case Format::eAstc10x5SfloatBlock: return "Astc10x5SfloatBlock"; case Format::eAstc10x6SfloatBlock: return "Astc10x6SfloatBlock"; case Format::eAstc10x8SfloatBlock: return "Astc10x8SfloatBlock"; case Format::eAstc10x10SfloatBlock: return "Astc10x10SfloatBlock"; case Format::eAstc12x10SfloatBlock: return "Astc12x10SfloatBlock"; case Format::eAstc12x12SfloatBlock: return "Astc12x12SfloatBlock"; case Format::eA1B5G5R5UnormPack16: return "A1B5G5R5UnormPack16"; case Format::eA8Unorm: return "A8Unorm"; case Format::ePvrtc12BppUnormBlockIMG: return "Pvrtc12BppUnormBlockIMG"; case Format::ePvrtc14BppUnormBlockIMG: return "Pvrtc14BppUnormBlockIMG"; case Format::ePvrtc22BppUnormBlockIMG: return "Pvrtc22BppUnormBlockIMG"; case Format::ePvrtc24BppUnormBlockIMG: return "Pvrtc24BppUnormBlockIMG"; case Format::ePvrtc12BppSrgbBlockIMG: return "Pvrtc12BppSrgbBlockIMG"; case Format::ePvrtc14BppSrgbBlockIMG: return "Pvrtc14BppSrgbBlockIMG"; case Format::ePvrtc22BppSrgbBlockIMG: return "Pvrtc22BppSrgbBlockIMG"; case Format::ePvrtc24BppSrgbBlockIMG: return "Pvrtc24BppSrgbBlockIMG"; case Format::eR16G16Sfixed5NV: return "R16G16Sfixed5NV"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( FormatFeatureFlagBits value ) { switch ( value ) { case FormatFeatureFlagBits::eSampledImage: return "SampledImage"; case FormatFeatureFlagBits::eStorageImage: return "StorageImage"; case FormatFeatureFlagBits::eStorageImageAtomic: return "StorageImageAtomic"; case FormatFeatureFlagBits::eUniformTexelBuffer: return "UniformTexelBuffer"; case FormatFeatureFlagBits::eStorageTexelBuffer: return "StorageTexelBuffer"; case FormatFeatureFlagBits::eStorageTexelBufferAtomic: return "StorageTexelBufferAtomic"; case FormatFeatureFlagBits::eVertexBuffer: return "VertexBuffer"; case FormatFeatureFlagBits::eColorAttachment: return "ColorAttachment"; case FormatFeatureFlagBits::eColorAttachmentBlend: return "ColorAttachmentBlend"; case FormatFeatureFlagBits::eDepthStencilAttachment: return "DepthStencilAttachment"; case FormatFeatureFlagBits::eBlitSrc: return "BlitSrc"; case FormatFeatureFlagBits::eBlitDst: return "BlitDst"; case FormatFeatureFlagBits::eSampledImageFilterLinear: return "SampledImageFilterLinear"; case FormatFeatureFlagBits::eTransferSrc: return "TransferSrc"; case FormatFeatureFlagBits::eTransferDst: return "TransferDst"; case FormatFeatureFlagBits::eMidpointChromaSamples: return "MidpointChromaSamples"; case FormatFeatureFlagBits::eSampledImageYcbcrConversionLinearFilter: return "SampledImageYcbcrConversionLinearFilter"; case FormatFeatureFlagBits::eSampledImageYcbcrConversionSeparateReconstructionFilter: return "SampledImageYcbcrConversionSeparateReconstructionFilter"; case FormatFeatureFlagBits::eSampledImageYcbcrConversionChromaReconstructionExplicit: return "SampledImageYcbcrConversionChromaReconstructionExplicit"; case FormatFeatureFlagBits::eSampledImageYcbcrConversionChromaReconstructionExplicitForceable: return "SampledImageYcbcrConversionChromaReconstructionExplicitForceable"; case FormatFeatureFlagBits::eDisjoint: return "Disjoint"; case FormatFeatureFlagBits::eCositedChromaSamples: return "CositedChromaSamples"; case FormatFeatureFlagBits::eSampledImageFilterMinmax: return "SampledImageFilterMinmax"; case FormatFeatureFlagBits::eVideoDecodeOutputKHR: return "VideoDecodeOutputKHR"; case FormatFeatureFlagBits::eVideoDecodeDpbKHR: return "VideoDecodeDpbKHR"; case FormatFeatureFlagBits::eAccelerationStructureVertexBufferKHR: return "AccelerationStructureVertexBufferKHR"; case FormatFeatureFlagBits::eSampledImageFilterCubicEXT: return "SampledImageFilterCubicEXT"; case FormatFeatureFlagBits::eFragmentDensityMapEXT: return "FragmentDensityMapEXT"; case FormatFeatureFlagBits::eFragmentShadingRateAttachmentKHR: return "FragmentShadingRateAttachmentKHR"; case FormatFeatureFlagBits::eVideoEncodeInputKHR: return "VideoEncodeInputKHR"; case FormatFeatureFlagBits::eVideoEncodeDpbKHR: return "VideoEncodeDpbKHR"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( ImageCreateFlagBits value ) { switch ( value ) { case ImageCreateFlagBits::eSparseBinding: return "SparseBinding"; case ImageCreateFlagBits::eSparseResidency: return "SparseResidency"; case ImageCreateFlagBits::eSparseAliased: return "SparseAliased"; case ImageCreateFlagBits::eMutableFormat: return "MutableFormat"; case ImageCreateFlagBits::eCubeCompatible: return "CubeCompatible"; case ImageCreateFlagBits::eAlias: return "Alias"; case ImageCreateFlagBits::eSplitInstanceBindRegions: return "SplitInstanceBindRegions"; case ImageCreateFlagBits::e2DArrayCompatible: return "2DArrayCompatible"; case ImageCreateFlagBits::eBlockTexelViewCompatible: return "BlockTexelViewCompatible"; case ImageCreateFlagBits::eExtendedUsage: return "ExtendedUsage"; case ImageCreateFlagBits::eProtected: return "Protected"; case ImageCreateFlagBits::eDisjoint: return "Disjoint"; case ImageCreateFlagBits::eCornerSampledNV: return "CornerSampledNV"; case ImageCreateFlagBits::eSampleLocationsCompatibleDepthEXT: return "SampleLocationsCompatibleDepthEXT"; case ImageCreateFlagBits::eSubsampledEXT: return "SubsampledEXT"; case ImageCreateFlagBits::eDescriptorBufferCaptureReplayEXT: return "DescriptorBufferCaptureReplayEXT"; case ImageCreateFlagBits::eMultisampledRenderToSingleSampledEXT: return "MultisampledRenderToSingleSampledEXT"; case ImageCreateFlagBits::e2DViewCompatibleEXT: return "2DViewCompatibleEXT"; case ImageCreateFlagBits::eFragmentDensityMapOffsetQCOM: return "FragmentDensityMapOffsetQCOM"; case ImageCreateFlagBits::eVideoProfileIndependentKHR: return "VideoProfileIndependentKHR"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( ImageTiling value ) { switch ( value ) { case ImageTiling::eOptimal: return "Optimal"; case ImageTiling::eLinear: return "Linear"; case ImageTiling::eDrmFormatModifierEXT: return "DrmFormatModifierEXT"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( ImageType value ) { switch ( value ) { case ImageType::e1D: return "1D"; case ImageType::e2D: return "2D"; case ImageType::e3D: return "3D"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( ImageUsageFlagBits value ) { switch ( value ) { case ImageUsageFlagBits::eTransferSrc: return "TransferSrc"; case ImageUsageFlagBits::eTransferDst: return "TransferDst"; case ImageUsageFlagBits::eSampled: return "Sampled"; case ImageUsageFlagBits::eStorage: return "Storage"; case ImageUsageFlagBits::eColorAttachment: return "ColorAttachment"; case ImageUsageFlagBits::eDepthStencilAttachment: return "DepthStencilAttachment"; case ImageUsageFlagBits::eTransientAttachment: return "TransientAttachment"; case ImageUsageFlagBits::eInputAttachment: return "InputAttachment"; case ImageUsageFlagBits::eHostTransfer: return "HostTransfer"; case ImageUsageFlagBits::eVideoDecodeDstKHR: return "VideoDecodeDstKHR"; case ImageUsageFlagBits::eVideoDecodeSrcKHR: return "VideoDecodeSrcKHR"; case ImageUsageFlagBits::eVideoDecodeDpbKHR: return "VideoDecodeDpbKHR"; case ImageUsageFlagBits::eFragmentDensityMapEXT: return "FragmentDensityMapEXT"; case ImageUsageFlagBits::eFragmentShadingRateAttachmentKHR: return "FragmentShadingRateAttachmentKHR"; case ImageUsageFlagBits::eVideoEncodeDstKHR: return "VideoEncodeDstKHR"; case ImageUsageFlagBits::eVideoEncodeSrcKHR: return "VideoEncodeSrcKHR"; case ImageUsageFlagBits::eVideoEncodeDpbKHR: return "VideoEncodeDpbKHR"; case ImageUsageFlagBits::eAttachmentFeedbackLoopEXT: return "AttachmentFeedbackLoopEXT"; case ImageUsageFlagBits::eInvocationMaskHUAWEI: return "InvocationMaskHUAWEI"; case ImageUsageFlagBits::eSampleWeightQCOM: return "SampleWeightQCOM"; case ImageUsageFlagBits::eSampleBlockMatchQCOM: return "SampleBlockMatchQCOM"; case ImageUsageFlagBits::eVideoEncodeQuantizationDeltaMapKHR: return "VideoEncodeQuantizationDeltaMapKHR"; case ImageUsageFlagBits::eVideoEncodeEmphasisMapKHR: return "VideoEncodeEmphasisMapKHR"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( InstanceCreateFlagBits value ) { switch ( value ) { case InstanceCreateFlagBits::eEnumeratePortabilityKHR: return "EnumeratePortabilityKHR"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( InternalAllocationType value ) { switch ( value ) { case InternalAllocationType::eExecutable: return "Executable"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( MemoryHeapFlagBits value ) { switch ( value ) { case MemoryHeapFlagBits::eDeviceLocal: return "DeviceLocal"; case MemoryHeapFlagBits::eMultiInstance: return "MultiInstance"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( MemoryPropertyFlagBits value ) { switch ( value ) { case MemoryPropertyFlagBits::eDeviceLocal: return "DeviceLocal"; case MemoryPropertyFlagBits::eHostVisible: return "HostVisible"; case MemoryPropertyFlagBits::eHostCoherent: return "HostCoherent"; case MemoryPropertyFlagBits::eHostCached: return "HostCached"; case MemoryPropertyFlagBits::eLazilyAllocated: return "LazilyAllocated"; case MemoryPropertyFlagBits::eProtected: return "Protected"; case MemoryPropertyFlagBits::eDeviceCoherentAMD: return "DeviceCoherentAMD"; case MemoryPropertyFlagBits::eDeviceUncachedAMD: return "DeviceUncachedAMD"; case MemoryPropertyFlagBits::eRdmaCapableNV: return "RdmaCapableNV"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( PhysicalDeviceType value ) { switch ( value ) { case PhysicalDeviceType::eOther: return "Other"; case PhysicalDeviceType::eIntegratedGpu: return "IntegratedGpu"; case PhysicalDeviceType::eDiscreteGpu: return "DiscreteGpu"; case PhysicalDeviceType::eVirtualGpu: return "VirtualGpu"; case PhysicalDeviceType::eCpu: return "Cpu"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( QueueFlagBits value ) { switch ( value ) { case QueueFlagBits::eGraphics: return "Graphics"; case QueueFlagBits::eCompute: return "Compute"; case QueueFlagBits::eTransfer: return "Transfer"; case QueueFlagBits::eSparseBinding: return "SparseBinding"; case QueueFlagBits::eProtected: return "Protected"; case QueueFlagBits::eVideoDecodeKHR: return "VideoDecodeKHR"; case QueueFlagBits::eVideoEncodeKHR: return "VideoEncodeKHR"; case QueueFlagBits::eOpticalFlowNV: return "OpticalFlowNV"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( SampleCountFlagBits value ) { switch ( value ) { case SampleCountFlagBits::e1: return "1"; case SampleCountFlagBits::e2: return "2"; case SampleCountFlagBits::e4: return "4"; case SampleCountFlagBits::e8: return "8"; case SampleCountFlagBits::e16: return "16"; case SampleCountFlagBits::e32: return "32"; case SampleCountFlagBits::e64: return "64"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( SystemAllocationScope value ) { switch ( value ) { case SystemAllocationScope::eCommand: return "Command"; case SystemAllocationScope::eObject: return "Object"; case SystemAllocationScope::eCache: return "Cache"; case SystemAllocationScope::eDevice: return "Device"; case SystemAllocationScope::eInstance: return "Instance"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( DeviceCreateFlagBits ) { return "(void)"; } VULKAN_HPP_INLINE std::string to_string( DeviceQueueCreateFlagBits value ) { switch ( value ) { case DeviceQueueCreateFlagBits::eProtected: return "Protected"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( PipelineStageFlagBits value ) { switch ( value ) { case PipelineStageFlagBits::eTopOfPipe: return "TopOfPipe"; case PipelineStageFlagBits::eDrawIndirect: return "DrawIndirect"; case PipelineStageFlagBits::eVertexInput: return "VertexInput"; case PipelineStageFlagBits::eVertexShader: return "VertexShader"; case PipelineStageFlagBits::eTessellationControlShader: return "TessellationControlShader"; case PipelineStageFlagBits::eTessellationEvaluationShader: return "TessellationEvaluationShader"; case PipelineStageFlagBits::eGeometryShader: return "GeometryShader"; case PipelineStageFlagBits::eFragmentShader: return "FragmentShader"; case PipelineStageFlagBits::eEarlyFragmentTests: return "EarlyFragmentTests"; case PipelineStageFlagBits::eLateFragmentTests: return "LateFragmentTests"; case PipelineStageFlagBits::eColorAttachmentOutput: return "ColorAttachmentOutput"; case PipelineStageFlagBits::eComputeShader: return "ComputeShader"; case PipelineStageFlagBits::eTransfer: return "Transfer"; case PipelineStageFlagBits::eBottomOfPipe: return "BottomOfPipe"; case PipelineStageFlagBits::eHost: return "Host"; case PipelineStageFlagBits::eAllGraphics: return "AllGraphics"; case PipelineStageFlagBits::eAllCommands: return "AllCommands"; case PipelineStageFlagBits::eNone: return "None"; case PipelineStageFlagBits::eTransformFeedbackEXT: return "TransformFeedbackEXT"; case PipelineStageFlagBits::eConditionalRenderingEXT: return "ConditionalRenderingEXT"; case PipelineStageFlagBits::eAccelerationStructureBuildKHR: return "AccelerationStructureBuildKHR"; case PipelineStageFlagBits::eRayTracingShaderKHR: return "RayTracingShaderKHR"; case PipelineStageFlagBits::eFragmentDensityProcessEXT: return "FragmentDensityProcessEXT"; case PipelineStageFlagBits::eFragmentShadingRateAttachmentKHR: return "FragmentShadingRateAttachmentKHR"; case PipelineStageFlagBits::eCommandPreprocessNV: return "CommandPreprocessNV"; case PipelineStageFlagBits::eTaskShaderEXT: return "TaskShaderEXT"; case PipelineStageFlagBits::eMeshShaderEXT: return "MeshShaderEXT"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( MemoryMapFlagBits value ) { switch ( value ) { case MemoryMapFlagBits::ePlacedEXT: return "PlacedEXT"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( ImageAspectFlagBits value ) { switch ( value ) { case ImageAspectFlagBits::eColor: return "Color"; case ImageAspectFlagBits::eDepth: return "Depth"; case ImageAspectFlagBits::eStencil: return "Stencil"; case ImageAspectFlagBits::eMetadata: return "Metadata"; case ImageAspectFlagBits::ePlane0: return "Plane0"; case ImageAspectFlagBits::ePlane1: return "Plane1"; case ImageAspectFlagBits::ePlane2: return "Plane2"; case ImageAspectFlagBits::eNone: return "None"; case ImageAspectFlagBits::eMemoryPlane0EXT: return "MemoryPlane0EXT"; case ImageAspectFlagBits::eMemoryPlane1EXT: return "MemoryPlane1EXT"; case ImageAspectFlagBits::eMemoryPlane2EXT: return "MemoryPlane2EXT"; case ImageAspectFlagBits::eMemoryPlane3EXT: return "MemoryPlane3EXT"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( SparseImageFormatFlagBits value ) { switch ( value ) { case SparseImageFormatFlagBits::eSingleMiptail: return "SingleMiptail"; case SparseImageFormatFlagBits::eAlignedMipSize: return "AlignedMipSize"; case SparseImageFormatFlagBits::eNonstandardBlockSize: return "NonstandardBlockSize"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( SparseMemoryBindFlagBits value ) { switch ( value ) { case SparseMemoryBindFlagBits::eMetadata: return "Metadata"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( FenceCreateFlagBits value ) { switch ( value ) { case FenceCreateFlagBits::eSignaled: return "Signaled"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( SemaphoreCreateFlagBits ) { return "(void)"; } VULKAN_HPP_INLINE std::string to_string( EventCreateFlagBits value ) { switch ( value ) { case EventCreateFlagBits::eDeviceOnly: return "DeviceOnly"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( QueryPipelineStatisticFlagBits value ) { switch ( value ) { case QueryPipelineStatisticFlagBits::eInputAssemblyVertices: return "InputAssemblyVertices"; case QueryPipelineStatisticFlagBits::eInputAssemblyPrimitives: return "InputAssemblyPrimitives"; case QueryPipelineStatisticFlagBits::eVertexShaderInvocations: return "VertexShaderInvocations"; case QueryPipelineStatisticFlagBits::eGeometryShaderInvocations: return "GeometryShaderInvocations"; case QueryPipelineStatisticFlagBits::eGeometryShaderPrimitives: return "GeometryShaderPrimitives"; case QueryPipelineStatisticFlagBits::eClippingInvocations: return "ClippingInvocations"; case QueryPipelineStatisticFlagBits::eClippingPrimitives: return "ClippingPrimitives"; case QueryPipelineStatisticFlagBits::eFragmentShaderInvocations: return "FragmentShaderInvocations"; case QueryPipelineStatisticFlagBits::eTessellationControlShaderPatches: return "TessellationControlShaderPatches"; case QueryPipelineStatisticFlagBits::eTessellationEvaluationShaderInvocations: return "TessellationEvaluationShaderInvocations"; case QueryPipelineStatisticFlagBits::eComputeShaderInvocations: return "ComputeShaderInvocations"; case QueryPipelineStatisticFlagBits::eTaskShaderInvocationsEXT: return "TaskShaderInvocationsEXT"; case QueryPipelineStatisticFlagBits::eMeshShaderInvocationsEXT: return "MeshShaderInvocationsEXT"; case QueryPipelineStatisticFlagBits::eClusterCullingShaderInvocationsHUAWEI: return "ClusterCullingShaderInvocationsHUAWEI"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( QueryResultFlagBits value ) { switch ( value ) { case QueryResultFlagBits::e64: return "64"; case QueryResultFlagBits::eWait: return "Wait"; case QueryResultFlagBits::eWithAvailability: return "WithAvailability"; case QueryResultFlagBits::ePartial: return "Partial"; case QueryResultFlagBits::eWithStatusKHR: return "WithStatusKHR"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( QueryType value ) { switch ( value ) { case QueryType::eOcclusion: return "Occlusion"; case QueryType::ePipelineStatistics: return "PipelineStatistics"; case QueryType::eTimestamp: return "Timestamp"; case QueryType::eResultStatusOnlyKHR: return "ResultStatusOnlyKHR"; case QueryType::eTransformFeedbackStreamEXT: return "TransformFeedbackStreamEXT"; case QueryType::ePerformanceQueryKHR: return "PerformanceQueryKHR"; case QueryType::eAccelerationStructureCompactedSizeKHR: return "AccelerationStructureCompactedSizeKHR"; case QueryType::eAccelerationStructureSerializationSizeKHR: return "AccelerationStructureSerializationSizeKHR"; case QueryType::eAccelerationStructureCompactedSizeNV: return "AccelerationStructureCompactedSizeNV"; case QueryType::ePerformanceQueryINTEL: return "PerformanceQueryINTEL"; case QueryType::eVideoEncodeFeedbackKHR: return "VideoEncodeFeedbackKHR"; case QueryType::eMeshPrimitivesGeneratedEXT: return "MeshPrimitivesGeneratedEXT"; case QueryType::ePrimitivesGeneratedEXT: return "PrimitivesGeneratedEXT"; case QueryType::eAccelerationStructureSerializationBottomLevelPointersKHR: return "AccelerationStructureSerializationBottomLevelPointersKHR"; case QueryType::eAccelerationStructureSizeKHR: return "AccelerationStructureSizeKHR"; case QueryType::eMicromapSerializationSizeEXT: return "MicromapSerializationSizeEXT"; case QueryType::eMicromapCompactedSizeEXT: return "MicromapCompactedSizeEXT"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( QueryPoolCreateFlagBits ) { return "(void)"; } VULKAN_HPP_INLINE std::string to_string( BufferCreateFlagBits value ) { switch ( value ) { case BufferCreateFlagBits::eSparseBinding: return "SparseBinding"; case BufferCreateFlagBits::eSparseResidency: return "SparseResidency"; case BufferCreateFlagBits::eSparseAliased: return "SparseAliased"; case BufferCreateFlagBits::eProtected: return "Protected"; case BufferCreateFlagBits::eDeviceAddressCaptureReplay: return "DeviceAddressCaptureReplay"; case BufferCreateFlagBits::eDescriptorBufferCaptureReplayEXT: return "DescriptorBufferCaptureReplayEXT"; case BufferCreateFlagBits::eVideoProfileIndependentKHR: return "VideoProfileIndependentKHR"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( BufferUsageFlagBits value ) { switch ( value ) { case BufferUsageFlagBits::eTransferSrc: return "TransferSrc"; case BufferUsageFlagBits::eTransferDst: return "TransferDst"; case BufferUsageFlagBits::eUniformTexelBuffer: return "UniformTexelBuffer"; case BufferUsageFlagBits::eStorageTexelBuffer: return "StorageTexelBuffer"; case BufferUsageFlagBits::eUniformBuffer: return "UniformBuffer"; case BufferUsageFlagBits::eStorageBuffer: return "StorageBuffer"; case BufferUsageFlagBits::eIndexBuffer: return "IndexBuffer"; case BufferUsageFlagBits::eVertexBuffer: return "VertexBuffer"; case BufferUsageFlagBits::eIndirectBuffer: return "IndirectBuffer"; case BufferUsageFlagBits::eShaderDeviceAddress: return "ShaderDeviceAddress"; case BufferUsageFlagBits::eVideoDecodeSrcKHR: return "VideoDecodeSrcKHR"; case BufferUsageFlagBits::eVideoDecodeDstKHR: return "VideoDecodeDstKHR"; case BufferUsageFlagBits::eTransformFeedbackBufferEXT: return "TransformFeedbackBufferEXT"; case BufferUsageFlagBits::eTransformFeedbackCounterBufferEXT: return "TransformFeedbackCounterBufferEXT"; case BufferUsageFlagBits::eConditionalRenderingEXT: return "ConditionalRenderingEXT"; #if defined( VK_ENABLE_BETA_EXTENSIONS ) case BufferUsageFlagBits::eExecutionGraphScratchAMDX: return "ExecutionGraphScratchAMDX"; #endif /*VK_ENABLE_BETA_EXTENSIONS*/ case BufferUsageFlagBits::eAccelerationStructureBuildInputReadOnlyKHR: return "AccelerationStructureBuildInputReadOnlyKHR"; case BufferUsageFlagBits::eAccelerationStructureStorageKHR: return "AccelerationStructureStorageKHR"; case BufferUsageFlagBits::eShaderBindingTableKHR: return "ShaderBindingTableKHR"; case BufferUsageFlagBits::eVideoEncodeDstKHR: return "VideoEncodeDstKHR"; case BufferUsageFlagBits::eVideoEncodeSrcKHR: return "VideoEncodeSrcKHR"; case BufferUsageFlagBits::eSamplerDescriptorBufferEXT: return "SamplerDescriptorBufferEXT"; case BufferUsageFlagBits::eResourceDescriptorBufferEXT: return "ResourceDescriptorBufferEXT"; case BufferUsageFlagBits::ePushDescriptorsDescriptorBufferEXT: return "PushDescriptorsDescriptorBufferEXT"; case BufferUsageFlagBits::eMicromapBuildInputReadOnlyEXT: return "MicromapBuildInputReadOnlyEXT"; case BufferUsageFlagBits::eMicromapStorageEXT: return "MicromapStorageEXT"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( SharingMode value ) { switch ( value ) { case SharingMode::eExclusive: return "Exclusive"; case SharingMode::eConcurrent: return "Concurrent"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( BufferViewCreateFlagBits ) { return "(void)"; } VULKAN_HPP_INLINE std::string to_string( ImageLayout value ) { switch ( value ) { case ImageLayout::eUndefined: return "Undefined"; case ImageLayout::eGeneral: return "General"; case ImageLayout::eColorAttachmentOptimal: return "ColorAttachmentOptimal"; case ImageLayout::eDepthStencilAttachmentOptimal: return "DepthStencilAttachmentOptimal"; case ImageLayout::eDepthStencilReadOnlyOptimal: return "DepthStencilReadOnlyOptimal"; case ImageLayout::eShaderReadOnlyOptimal: return "ShaderReadOnlyOptimal"; case ImageLayout::eTransferSrcOptimal: return "TransferSrcOptimal"; case ImageLayout::eTransferDstOptimal: return "TransferDstOptimal"; case ImageLayout::ePreinitialized: return "Preinitialized"; case ImageLayout::eDepthReadOnlyStencilAttachmentOptimal: return "DepthReadOnlyStencilAttachmentOptimal"; case ImageLayout::eDepthAttachmentStencilReadOnlyOptimal: return "DepthAttachmentStencilReadOnlyOptimal"; case ImageLayout::eDepthAttachmentOptimal: return "DepthAttachmentOptimal"; case ImageLayout::eDepthReadOnlyOptimal: return "DepthReadOnlyOptimal"; case ImageLayout::eStencilAttachmentOptimal: return "StencilAttachmentOptimal"; case ImageLayout::eStencilReadOnlyOptimal: return "StencilReadOnlyOptimal"; case ImageLayout::eReadOnlyOptimal: return "ReadOnlyOptimal"; case ImageLayout::eAttachmentOptimal: return "AttachmentOptimal"; case ImageLayout::eRenderingLocalRead: return "RenderingLocalRead"; case ImageLayout::ePresentSrcKHR: return "PresentSrcKHR"; case ImageLayout::eVideoDecodeDstKHR: return "VideoDecodeDstKHR"; case ImageLayout::eVideoDecodeSrcKHR: return "VideoDecodeSrcKHR"; case ImageLayout::eVideoDecodeDpbKHR: return "VideoDecodeDpbKHR"; case ImageLayout::eSharedPresentKHR: return "SharedPresentKHR"; case ImageLayout::eFragmentDensityMapOptimalEXT: return "FragmentDensityMapOptimalEXT"; case ImageLayout::eFragmentShadingRateAttachmentOptimalKHR: return "FragmentShadingRateAttachmentOptimalKHR"; case ImageLayout::eVideoEncodeDstKHR: return "VideoEncodeDstKHR"; case ImageLayout::eVideoEncodeSrcKHR: return "VideoEncodeSrcKHR"; case ImageLayout::eVideoEncodeDpbKHR: return "VideoEncodeDpbKHR"; case ImageLayout::eAttachmentFeedbackLoopOptimalEXT: return "AttachmentFeedbackLoopOptimalEXT"; case ImageLayout::eVideoEncodeQuantizationMapKHR: return "VideoEncodeQuantizationMapKHR"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( ComponentSwizzle value ) { switch ( value ) { case ComponentSwizzle::eIdentity: return "Identity"; case ComponentSwizzle::eZero: return "Zero"; case ComponentSwizzle::eOne: return "One"; case ComponentSwizzle::eR: return "R"; case ComponentSwizzle::eG: return "G"; case ComponentSwizzle::eB: return "B"; case ComponentSwizzle::eA: return "A"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( ImageViewCreateFlagBits value ) { switch ( value ) { case ImageViewCreateFlagBits::eFragmentDensityMapDynamicEXT: return "FragmentDensityMapDynamicEXT"; case ImageViewCreateFlagBits::eDescriptorBufferCaptureReplayEXT: return "DescriptorBufferCaptureReplayEXT"; case ImageViewCreateFlagBits::eFragmentDensityMapDeferredEXT: return "FragmentDensityMapDeferredEXT"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( ImageViewType value ) { switch ( value ) { case ImageViewType::e1D: return "1D"; case ImageViewType::e2D: return "2D"; case ImageViewType::e3D: return "3D"; case ImageViewType::eCube: return "Cube"; case ImageViewType::e1DArray: return "1DArray"; case ImageViewType::e2DArray: return "2DArray"; case ImageViewType::eCubeArray: return "CubeArray"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( ShaderModuleCreateFlagBits ) { return "(void)"; } VULKAN_HPP_INLINE std::string to_string( PipelineCacheCreateFlagBits value ) { switch ( value ) { case PipelineCacheCreateFlagBits::eExternallySynchronized: return "ExternallySynchronized"; case PipelineCacheCreateFlagBits::eInternallySynchronizedMergeKHR: return "InternallySynchronizedMergeKHR"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( BlendFactor value ) { switch ( value ) { case BlendFactor::eZero: return "Zero"; case BlendFactor::eOne: return "One"; case BlendFactor::eSrcColor: return "SrcColor"; case BlendFactor::eOneMinusSrcColor: return "OneMinusSrcColor"; case BlendFactor::eDstColor: return "DstColor"; case BlendFactor::eOneMinusDstColor: return "OneMinusDstColor"; case BlendFactor::eSrcAlpha: return "SrcAlpha"; case BlendFactor::eOneMinusSrcAlpha: return "OneMinusSrcAlpha"; case BlendFactor::eDstAlpha: return "DstAlpha"; case BlendFactor::eOneMinusDstAlpha: return "OneMinusDstAlpha"; case BlendFactor::eConstantColor: return "ConstantColor"; case BlendFactor::eOneMinusConstantColor: return "OneMinusConstantColor"; case BlendFactor::eConstantAlpha: return "ConstantAlpha"; case BlendFactor::eOneMinusConstantAlpha: return "OneMinusConstantAlpha"; case BlendFactor::eSrcAlphaSaturate: return "SrcAlphaSaturate"; case BlendFactor::eSrc1Color: return "Src1Color"; case BlendFactor::eOneMinusSrc1Color: return "OneMinusSrc1Color"; case BlendFactor::eSrc1Alpha: return "Src1Alpha"; case BlendFactor::eOneMinusSrc1Alpha: return "OneMinusSrc1Alpha"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( BlendOp value ) { switch ( value ) { case BlendOp::eAdd: return "Add"; case BlendOp::eSubtract: return "Subtract"; case BlendOp::eReverseSubtract: return "ReverseSubtract"; case BlendOp::eMin: return "Min"; case BlendOp::eMax: return "Max"; case BlendOp::eZeroEXT: return "ZeroEXT"; case BlendOp::eSrcEXT: return "SrcEXT"; case BlendOp::eDstEXT: return "DstEXT"; case BlendOp::eSrcOverEXT: return "SrcOverEXT"; case BlendOp::eDstOverEXT: return "DstOverEXT"; case BlendOp::eSrcInEXT: return "SrcInEXT"; case BlendOp::eDstInEXT: return "DstInEXT"; case BlendOp::eSrcOutEXT: return "SrcOutEXT"; case BlendOp::eDstOutEXT: return "DstOutEXT"; case BlendOp::eSrcAtopEXT: return "SrcAtopEXT"; case BlendOp::eDstAtopEXT: return "DstAtopEXT"; case BlendOp::eXorEXT: return "XorEXT"; case BlendOp::eMultiplyEXT: return "MultiplyEXT"; case BlendOp::eScreenEXT: return "ScreenEXT"; case BlendOp::eOverlayEXT: return "OverlayEXT"; case BlendOp::eDarkenEXT: return "DarkenEXT"; case BlendOp::eLightenEXT: return "LightenEXT"; case BlendOp::eColordodgeEXT: return "ColordodgeEXT"; case BlendOp::eColorburnEXT: return "ColorburnEXT"; case BlendOp::eHardlightEXT: return "HardlightEXT"; case BlendOp::eSoftlightEXT: return "SoftlightEXT"; case BlendOp::eDifferenceEXT: return "DifferenceEXT"; case BlendOp::eExclusionEXT: return "ExclusionEXT"; case BlendOp::eInvertEXT: return "InvertEXT"; case BlendOp::eInvertRgbEXT: return "InvertRgbEXT"; case BlendOp::eLineardodgeEXT: return "LineardodgeEXT"; case BlendOp::eLinearburnEXT: return "LinearburnEXT"; case BlendOp::eVividlightEXT: return "VividlightEXT"; case BlendOp::eLinearlightEXT: return "LinearlightEXT"; case BlendOp::ePinlightEXT: return "PinlightEXT"; case BlendOp::eHardmixEXT: return "HardmixEXT"; case BlendOp::eHslHueEXT: return "HslHueEXT"; case BlendOp::eHslSaturationEXT: return "HslSaturationEXT"; case BlendOp::eHslColorEXT: return "HslColorEXT"; case BlendOp::eHslLuminosityEXT: return "HslLuminosityEXT"; case BlendOp::ePlusEXT: return "PlusEXT"; case BlendOp::ePlusClampedEXT: return "PlusClampedEXT"; case BlendOp::ePlusClampedAlphaEXT: return "PlusClampedAlphaEXT"; case BlendOp::ePlusDarkerEXT: return "PlusDarkerEXT"; case BlendOp::eMinusEXT: return "MinusEXT"; case BlendOp::eMinusClampedEXT: return "MinusClampedEXT"; case BlendOp::eContrastEXT: return "ContrastEXT"; case BlendOp::eInvertOvgEXT: return "InvertOvgEXT"; case BlendOp::eRedEXT: return "RedEXT"; case BlendOp::eGreenEXT: return "GreenEXT"; case BlendOp::eBlueEXT: return "BlueEXT"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( ColorComponentFlagBits value ) { switch ( value ) { case ColorComponentFlagBits::eR: return "R"; case ColorComponentFlagBits::eG: return "G"; case ColorComponentFlagBits::eB: return "B"; case ColorComponentFlagBits::eA: return "A"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( CompareOp value ) { switch ( value ) { case CompareOp::eNever: return "Never"; case CompareOp::eLess: return "Less"; case CompareOp::eEqual: return "Equal"; case CompareOp::eLessOrEqual: return "LessOrEqual"; case CompareOp::eGreater: return "Greater"; case CompareOp::eNotEqual: return "NotEqual"; case CompareOp::eGreaterOrEqual: return "GreaterOrEqual"; case CompareOp::eAlways: return "Always"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( CullModeFlagBits value ) { switch ( value ) { case CullModeFlagBits::eNone: return "None"; case CullModeFlagBits::eFront: return "Front"; case CullModeFlagBits::eBack: return "Back"; case CullModeFlagBits::eFrontAndBack: return "FrontAndBack"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( DynamicState value ) { switch ( value ) { case DynamicState::eViewport: return "Viewport"; case DynamicState::eScissor: return "Scissor"; case DynamicState::eLineWidth: return "LineWidth"; case DynamicState::eDepthBias: return "DepthBias"; case DynamicState::eBlendConstants: return "BlendConstants"; case DynamicState::eDepthBounds: return "DepthBounds"; case DynamicState::eStencilCompareMask: return "StencilCompareMask"; case DynamicState::eStencilWriteMask: return "StencilWriteMask"; case DynamicState::eStencilReference: return "StencilReference"; case DynamicState::eCullMode: return "CullMode"; case DynamicState::eFrontFace: return "FrontFace"; case DynamicState::ePrimitiveTopology: return "PrimitiveTopology"; case DynamicState::eViewportWithCount: return "ViewportWithCount"; case DynamicState::eScissorWithCount: return "ScissorWithCount"; case DynamicState::eVertexInputBindingStride: return "VertexInputBindingStride"; case DynamicState::eDepthTestEnable: return "DepthTestEnable"; case DynamicState::eDepthWriteEnable: return "DepthWriteEnable"; case DynamicState::eDepthCompareOp: return "DepthCompareOp"; case DynamicState::eDepthBoundsTestEnable: return "DepthBoundsTestEnable"; case DynamicState::eStencilTestEnable: return "StencilTestEnable"; case DynamicState::eStencilOp: return "StencilOp"; case DynamicState::eRasterizerDiscardEnable: return "RasterizerDiscardEnable"; case DynamicState::eDepthBiasEnable: return "DepthBiasEnable"; case DynamicState::ePrimitiveRestartEnable: return "PrimitiveRestartEnable"; case DynamicState::eLineStipple: return "LineStipple"; case DynamicState::eViewportWScalingNV: return "ViewportWScalingNV"; case DynamicState::eDiscardRectangleEXT: return "DiscardRectangleEXT"; case DynamicState::eDiscardRectangleEnableEXT: return "DiscardRectangleEnableEXT"; case DynamicState::eDiscardRectangleModeEXT: return "DiscardRectangleModeEXT"; case DynamicState::eSampleLocationsEXT: return "SampleLocationsEXT"; case DynamicState::eRayTracingPipelineStackSizeKHR: return "RayTracingPipelineStackSizeKHR"; case DynamicState::eViewportShadingRatePaletteNV: return "ViewportShadingRatePaletteNV"; case DynamicState::eViewportCoarseSampleOrderNV: return "ViewportCoarseSampleOrderNV"; case DynamicState::eExclusiveScissorEnableNV: return "ExclusiveScissorEnableNV"; case DynamicState::eExclusiveScissorNV: return "ExclusiveScissorNV"; case DynamicState::eFragmentShadingRateKHR: return "FragmentShadingRateKHR"; case DynamicState::eVertexInputEXT: return "VertexInputEXT"; case DynamicState::ePatchControlPointsEXT: return "PatchControlPointsEXT"; case DynamicState::eLogicOpEXT: return "LogicOpEXT"; case DynamicState::eColorWriteEnableEXT: return "ColorWriteEnableEXT"; case DynamicState::eDepthClampEnableEXT: return "DepthClampEnableEXT"; case DynamicState::ePolygonModeEXT: return "PolygonModeEXT"; case DynamicState::eRasterizationSamplesEXT: return "RasterizationSamplesEXT"; case DynamicState::eSampleMaskEXT: return "SampleMaskEXT"; case DynamicState::eAlphaToCoverageEnableEXT: return "AlphaToCoverageEnableEXT"; case DynamicState::eAlphaToOneEnableEXT: return "AlphaToOneEnableEXT"; case DynamicState::eLogicOpEnableEXT: return "LogicOpEnableEXT"; case DynamicState::eColorBlendEnableEXT: return "ColorBlendEnableEXT"; case DynamicState::eColorBlendEquationEXT: return "ColorBlendEquationEXT"; case DynamicState::eColorWriteMaskEXT: return "ColorWriteMaskEXT"; case DynamicState::eTessellationDomainOriginEXT: return "TessellationDomainOriginEXT"; case DynamicState::eRasterizationStreamEXT: return "RasterizationStreamEXT"; case DynamicState::eConservativeRasterizationModeEXT: return "ConservativeRasterizationModeEXT"; case DynamicState::eExtraPrimitiveOverestimationSizeEXT: return "ExtraPrimitiveOverestimationSizeEXT"; case DynamicState::eDepthClipEnableEXT: return "DepthClipEnableEXT"; case DynamicState::eSampleLocationsEnableEXT: return "SampleLocationsEnableEXT"; case DynamicState::eColorBlendAdvancedEXT: return "ColorBlendAdvancedEXT"; case DynamicState::eProvokingVertexModeEXT: return "ProvokingVertexModeEXT"; case DynamicState::eLineRasterizationModeEXT: return "LineRasterizationModeEXT"; case DynamicState::eLineStippleEnableEXT: return "LineStippleEnableEXT"; case DynamicState::eDepthClipNegativeOneToOneEXT: return "DepthClipNegativeOneToOneEXT"; case DynamicState::eViewportWScalingEnableNV: return "ViewportWScalingEnableNV"; case DynamicState::eViewportSwizzleNV: return "ViewportSwizzleNV"; case DynamicState::eCoverageToColorEnableNV: return "CoverageToColorEnableNV"; case DynamicState::eCoverageToColorLocationNV: return "CoverageToColorLocationNV"; case DynamicState::eCoverageModulationModeNV: return "CoverageModulationModeNV"; case DynamicState::eCoverageModulationTableEnableNV: return "CoverageModulationTableEnableNV"; case DynamicState::eCoverageModulationTableNV: return "CoverageModulationTableNV"; case DynamicState::eShadingRateImageEnableNV: return "ShadingRateImageEnableNV"; case DynamicState::eRepresentativeFragmentTestEnableNV: return "RepresentativeFragmentTestEnableNV"; case DynamicState::eCoverageReductionModeNV: return "CoverageReductionModeNV"; case DynamicState::eAttachmentFeedbackLoopEnableEXT: return "AttachmentFeedbackLoopEnableEXT"; case DynamicState::eDepthClampRangeEXT: return "DepthClampRangeEXT"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( FrontFace value ) { switch ( value ) { case FrontFace::eCounterClockwise: return "CounterClockwise"; case FrontFace::eClockwise: return "Clockwise"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( LogicOp value ) { switch ( value ) { case LogicOp::eClear: return "Clear"; case LogicOp::eAnd: return "And"; case LogicOp::eAndReverse: return "AndReverse"; case LogicOp::eCopy: return "Copy"; case LogicOp::eAndInverted: return "AndInverted"; case LogicOp::eNoOp: return "NoOp"; case LogicOp::eXor: return "Xor"; case LogicOp::eOr: return "Or"; case LogicOp::eNor: return "Nor"; case LogicOp::eEquivalent: return "Equivalent"; case LogicOp::eInvert: return "Invert"; case LogicOp::eOrReverse: return "OrReverse"; case LogicOp::eCopyInverted: return "CopyInverted"; case LogicOp::eOrInverted: return "OrInverted"; case LogicOp::eNand: return "Nand"; case LogicOp::eSet: return "Set"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( PipelineCreateFlagBits value ) { switch ( value ) { case PipelineCreateFlagBits::eDisableOptimization: return "DisableOptimization"; case PipelineCreateFlagBits::eAllowDerivatives: return "AllowDerivatives"; case PipelineCreateFlagBits::eDerivative: return "Derivative"; case PipelineCreateFlagBits::eViewIndexFromDeviceIndex: return "ViewIndexFromDeviceIndex"; case PipelineCreateFlagBits::eDispatchBase: return "DispatchBase"; case PipelineCreateFlagBits::eFailOnPipelineCompileRequired: return "FailOnPipelineCompileRequired"; case PipelineCreateFlagBits::eEarlyReturnOnFailure: return "EarlyReturnOnFailure"; case PipelineCreateFlagBits::eNoProtectedAccess: return "NoProtectedAccess"; case PipelineCreateFlagBits::eProtectedAccessOnly: return "ProtectedAccessOnly"; case PipelineCreateFlagBits::eRayTracingNoNullAnyHitShadersKHR: return "RayTracingNoNullAnyHitShadersKHR"; case PipelineCreateFlagBits::eRayTracingNoNullClosestHitShadersKHR: return "RayTracingNoNullClosestHitShadersKHR"; case PipelineCreateFlagBits::eRayTracingNoNullMissShadersKHR: return "RayTracingNoNullMissShadersKHR"; case PipelineCreateFlagBits::eRayTracingNoNullIntersectionShadersKHR: return "RayTracingNoNullIntersectionShadersKHR"; case PipelineCreateFlagBits::eRayTracingSkipTrianglesKHR: return "RayTracingSkipTrianglesKHR"; case PipelineCreateFlagBits::eRayTracingSkipAabbsKHR: return "RayTracingSkipAabbsKHR"; case PipelineCreateFlagBits::eRayTracingShaderGroupHandleCaptureReplayKHR: return "RayTracingShaderGroupHandleCaptureReplayKHR"; case PipelineCreateFlagBits::eDeferCompileNV: return "DeferCompileNV"; case PipelineCreateFlagBits::eRenderingFragmentDensityMapAttachmentEXT: return "RenderingFragmentDensityMapAttachmentEXT"; case PipelineCreateFlagBits::eRenderingFragmentShadingRateAttachmentKHR: return "RenderingFragmentShadingRateAttachmentKHR"; case PipelineCreateFlagBits::eCaptureStatisticsKHR: return "CaptureStatisticsKHR"; case PipelineCreateFlagBits::eCaptureInternalRepresentationsKHR: return "CaptureInternalRepresentationsKHR"; case PipelineCreateFlagBits::eIndirectBindableNV: return "IndirectBindableNV"; case PipelineCreateFlagBits::eLibraryKHR: return "LibraryKHR"; case PipelineCreateFlagBits::eDescriptorBufferEXT: return "DescriptorBufferEXT"; case PipelineCreateFlagBits::eRetainLinkTimeOptimizationInfoEXT: return "RetainLinkTimeOptimizationInfoEXT"; case PipelineCreateFlagBits::eLinkTimeOptimizationEXT: return "LinkTimeOptimizationEXT"; case PipelineCreateFlagBits::eRayTracingAllowMotionNV: return "RayTracingAllowMotionNV"; case PipelineCreateFlagBits::eColorAttachmentFeedbackLoopEXT: return "ColorAttachmentFeedbackLoopEXT"; case PipelineCreateFlagBits::eDepthStencilAttachmentFeedbackLoopEXT: return "DepthStencilAttachmentFeedbackLoopEXT"; case PipelineCreateFlagBits::eRayTracingOpacityMicromapEXT: return "RayTracingOpacityMicromapEXT"; #if defined( VK_ENABLE_BETA_EXTENSIONS ) case PipelineCreateFlagBits::eRayTracingDisplacementMicromapNV: return "RayTracingDisplacementMicromapNV"; #endif /*VK_ENABLE_BETA_EXTENSIONS*/ default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( PipelineShaderStageCreateFlagBits value ) { switch ( value ) { case PipelineShaderStageCreateFlagBits::eAllowVaryingSubgroupSize: return "AllowVaryingSubgroupSize"; case PipelineShaderStageCreateFlagBits::eRequireFullSubgroups: return "RequireFullSubgroups"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( PolygonMode value ) { switch ( value ) { case PolygonMode::eFill: return "Fill"; case PolygonMode::eLine: return "Line"; case PolygonMode::ePoint: return "Point"; case PolygonMode::eFillRectangleNV: return "FillRectangleNV"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( PrimitiveTopology value ) { switch ( value ) { case PrimitiveTopology::ePointList: return "PointList"; case PrimitiveTopology::eLineList: return "LineList"; case PrimitiveTopology::eLineStrip: return "LineStrip"; case PrimitiveTopology::eTriangleList: return "TriangleList"; case PrimitiveTopology::eTriangleStrip: return "TriangleStrip"; case PrimitiveTopology::eTriangleFan: return "TriangleFan"; case PrimitiveTopology::eLineListWithAdjacency: return "LineListWithAdjacency"; case PrimitiveTopology::eLineStripWithAdjacency: return "LineStripWithAdjacency"; case PrimitiveTopology::eTriangleListWithAdjacency: return "TriangleListWithAdjacency"; case PrimitiveTopology::eTriangleStripWithAdjacency: return "TriangleStripWithAdjacency"; case PrimitiveTopology::ePatchList: return "PatchList"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( ShaderStageFlagBits value ) { switch ( value ) { case ShaderStageFlagBits::eVertex: return "Vertex"; case ShaderStageFlagBits::eTessellationControl: return "TessellationControl"; case ShaderStageFlagBits::eTessellationEvaluation: return "TessellationEvaluation"; case ShaderStageFlagBits::eGeometry: return "Geometry"; case ShaderStageFlagBits::eFragment: return "Fragment"; case ShaderStageFlagBits::eCompute: return "Compute"; case ShaderStageFlagBits::eAllGraphics: return "AllGraphics"; case ShaderStageFlagBits::eAll: return "All"; case ShaderStageFlagBits::eRaygenKHR: return "RaygenKHR"; case ShaderStageFlagBits::eAnyHitKHR: return "AnyHitKHR"; case ShaderStageFlagBits::eClosestHitKHR: return "ClosestHitKHR"; case ShaderStageFlagBits::eMissKHR: return "MissKHR"; case ShaderStageFlagBits::eIntersectionKHR: return "IntersectionKHR"; case ShaderStageFlagBits::eCallableKHR: return "CallableKHR"; case ShaderStageFlagBits::eTaskEXT: return "TaskEXT"; case ShaderStageFlagBits::eMeshEXT: return "MeshEXT"; case ShaderStageFlagBits::eSubpassShadingHUAWEI: return "SubpassShadingHUAWEI"; case ShaderStageFlagBits::eClusterCullingHUAWEI: return "ClusterCullingHUAWEI"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( StencilOp value ) { switch ( value ) { case StencilOp::eKeep: return "Keep"; case StencilOp::eZero: return "Zero"; case StencilOp::eReplace: return "Replace"; case StencilOp::eIncrementAndClamp: return "IncrementAndClamp"; case StencilOp::eDecrementAndClamp: return "DecrementAndClamp"; case StencilOp::eInvert: return "Invert"; case StencilOp::eIncrementAndWrap: return "IncrementAndWrap"; case StencilOp::eDecrementAndWrap: return "DecrementAndWrap"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( VertexInputRate value ) { switch ( value ) { case VertexInputRate::eVertex: return "Vertex"; case VertexInputRate::eInstance: return "Instance"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( PipelineColorBlendStateCreateFlagBits value ) { switch ( value ) { case PipelineColorBlendStateCreateFlagBits::eRasterizationOrderAttachmentAccessEXT: return "RasterizationOrderAttachmentAccessEXT"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( PipelineDepthStencilStateCreateFlagBits value ) { switch ( value ) { case PipelineDepthStencilStateCreateFlagBits::eRasterizationOrderAttachmentDepthAccessEXT: return "RasterizationOrderAttachmentDepthAccessEXT"; case PipelineDepthStencilStateCreateFlagBits::eRasterizationOrderAttachmentStencilAccessEXT: return "RasterizationOrderAttachmentStencilAccessEXT"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( PipelineDynamicStateCreateFlagBits ) { return "(void)"; } VULKAN_HPP_INLINE std::string to_string( PipelineInputAssemblyStateCreateFlagBits ) { return "(void)"; } VULKAN_HPP_INLINE std::string to_string( PipelineLayoutCreateFlagBits value ) { switch ( value ) { case PipelineLayoutCreateFlagBits::eIndependentSetsEXT: return "IndependentSetsEXT"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( PipelineMultisampleStateCreateFlagBits ) { return "(void)"; } VULKAN_HPP_INLINE std::string to_string( PipelineRasterizationStateCreateFlagBits ) { return "(void)"; } VULKAN_HPP_INLINE std::string to_string( PipelineTessellationStateCreateFlagBits ) { return "(void)"; } VULKAN_HPP_INLINE std::string to_string( PipelineVertexInputStateCreateFlagBits ) { return "(void)"; } VULKAN_HPP_INLINE std::string to_string( PipelineViewportStateCreateFlagBits ) { return "(void)"; } VULKAN_HPP_INLINE std::string to_string( BorderColor value ) { switch ( value ) { case BorderColor::eFloatTransparentBlack: return "FloatTransparentBlack"; case BorderColor::eIntTransparentBlack: return "IntTransparentBlack"; case BorderColor::eFloatOpaqueBlack: return "FloatOpaqueBlack"; case BorderColor::eIntOpaqueBlack: return "IntOpaqueBlack"; case BorderColor::eFloatOpaqueWhite: return "FloatOpaqueWhite"; case BorderColor::eIntOpaqueWhite: return "IntOpaqueWhite"; case BorderColor::eFloatCustomEXT: return "FloatCustomEXT"; case BorderColor::eIntCustomEXT: return "IntCustomEXT"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( Filter value ) { switch ( value ) { case Filter::eNearest: return "Nearest"; case Filter::eLinear: return "Linear"; case Filter::eCubicEXT: return "CubicEXT"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( SamplerAddressMode value ) { switch ( value ) { case SamplerAddressMode::eRepeat: return "Repeat"; case SamplerAddressMode::eMirroredRepeat: return "MirroredRepeat"; case SamplerAddressMode::eClampToEdge: return "ClampToEdge"; case SamplerAddressMode::eClampToBorder: return "ClampToBorder"; case SamplerAddressMode::eMirrorClampToEdge: return "MirrorClampToEdge"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( SamplerCreateFlagBits value ) { switch ( value ) { case SamplerCreateFlagBits::eSubsampledEXT: return "SubsampledEXT"; case SamplerCreateFlagBits::eSubsampledCoarseReconstructionEXT: return "SubsampledCoarseReconstructionEXT"; case SamplerCreateFlagBits::eDescriptorBufferCaptureReplayEXT: return "DescriptorBufferCaptureReplayEXT"; case SamplerCreateFlagBits::eNonSeamlessCubeMapEXT: return "NonSeamlessCubeMapEXT"; case SamplerCreateFlagBits::eImageProcessingQCOM: return "ImageProcessingQCOM"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( SamplerMipmapMode value ) { switch ( value ) { case SamplerMipmapMode::eNearest: return "Nearest"; case SamplerMipmapMode::eLinear: return "Linear"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( DescriptorPoolCreateFlagBits value ) { switch ( value ) { case DescriptorPoolCreateFlagBits::eFreeDescriptorSet: return "FreeDescriptorSet"; case DescriptorPoolCreateFlagBits::eUpdateAfterBind: return "UpdateAfterBind"; case DescriptorPoolCreateFlagBits::eHostOnlyEXT: return "HostOnlyEXT"; case DescriptorPoolCreateFlagBits::eAllowOverallocationSetsNV: return "AllowOverallocationSetsNV"; case DescriptorPoolCreateFlagBits::eAllowOverallocationPoolsNV: return "AllowOverallocationPoolsNV"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( DescriptorSetLayoutCreateFlagBits value ) { switch ( value ) { case DescriptorSetLayoutCreateFlagBits::eUpdateAfterBindPool: return "UpdateAfterBindPool"; case DescriptorSetLayoutCreateFlagBits::ePushDescriptor: return "PushDescriptor"; case DescriptorSetLayoutCreateFlagBits::eDescriptorBufferEXT: return "DescriptorBufferEXT"; case DescriptorSetLayoutCreateFlagBits::eEmbeddedImmutableSamplersEXT: return "EmbeddedImmutableSamplersEXT"; case DescriptorSetLayoutCreateFlagBits::eIndirectBindableNV: return "IndirectBindableNV"; case DescriptorSetLayoutCreateFlagBits::eHostOnlyPoolEXT: return "HostOnlyPoolEXT"; case DescriptorSetLayoutCreateFlagBits::ePerStageNV: return "PerStageNV"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( DescriptorType value ) { switch ( value ) { case DescriptorType::eSampler: return "Sampler"; case DescriptorType::eCombinedImageSampler: return "CombinedImageSampler"; case DescriptorType::eSampledImage: return "SampledImage"; case DescriptorType::eStorageImage: return "StorageImage"; case DescriptorType::eUniformTexelBuffer: return "UniformTexelBuffer"; case DescriptorType::eStorageTexelBuffer: return "StorageTexelBuffer"; case DescriptorType::eUniformBuffer: return "UniformBuffer"; case DescriptorType::eStorageBuffer: return "StorageBuffer"; case DescriptorType::eUniformBufferDynamic: return "UniformBufferDynamic"; case DescriptorType::eStorageBufferDynamic: return "StorageBufferDynamic"; case DescriptorType::eInputAttachment: return "InputAttachment"; case DescriptorType::eInlineUniformBlock: return "InlineUniformBlock"; case DescriptorType::eAccelerationStructureKHR: return "AccelerationStructureKHR"; case DescriptorType::eAccelerationStructureNV: return "AccelerationStructureNV"; case DescriptorType::eSampleWeightImageQCOM: return "SampleWeightImageQCOM"; case DescriptorType::eBlockMatchImageQCOM: return "BlockMatchImageQCOM"; case DescriptorType::eMutableEXT: return "MutableEXT"; case DescriptorType::ePartitionedAccelerationStructureNV: return "PartitionedAccelerationStructureNV"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( DescriptorPoolResetFlagBits ) { return "(void)"; } VULKAN_HPP_INLINE std::string to_string( AccessFlagBits value ) { switch ( value ) { case AccessFlagBits::eIndirectCommandRead: return "IndirectCommandRead"; case AccessFlagBits::eIndexRead: return "IndexRead"; case AccessFlagBits::eVertexAttributeRead: return "VertexAttributeRead"; case AccessFlagBits::eUniformRead: return "UniformRead"; case AccessFlagBits::eInputAttachmentRead: return "InputAttachmentRead"; case AccessFlagBits::eShaderRead: return "ShaderRead"; case AccessFlagBits::eShaderWrite: return "ShaderWrite"; case AccessFlagBits::eColorAttachmentRead: return "ColorAttachmentRead"; case AccessFlagBits::eColorAttachmentWrite: return "ColorAttachmentWrite"; case AccessFlagBits::eDepthStencilAttachmentRead: return "DepthStencilAttachmentRead"; case AccessFlagBits::eDepthStencilAttachmentWrite: return "DepthStencilAttachmentWrite"; case AccessFlagBits::eTransferRead: return "TransferRead"; case AccessFlagBits::eTransferWrite: return "TransferWrite"; case AccessFlagBits::eHostRead: return "HostRead"; case AccessFlagBits::eHostWrite: return "HostWrite"; case AccessFlagBits::eMemoryRead: return "MemoryRead"; case AccessFlagBits::eMemoryWrite: return "MemoryWrite"; case AccessFlagBits::eNone: return "None"; case AccessFlagBits::eTransformFeedbackWriteEXT: return "TransformFeedbackWriteEXT"; case AccessFlagBits::eTransformFeedbackCounterReadEXT: return "TransformFeedbackCounterReadEXT"; case AccessFlagBits::eTransformFeedbackCounterWriteEXT: return "TransformFeedbackCounterWriteEXT"; case AccessFlagBits::eConditionalRenderingReadEXT: return "ConditionalRenderingReadEXT"; case AccessFlagBits::eColorAttachmentReadNoncoherentEXT: return "ColorAttachmentReadNoncoherentEXT"; case AccessFlagBits::eAccelerationStructureReadKHR: return "AccelerationStructureReadKHR"; case AccessFlagBits::eAccelerationStructureWriteKHR: return "AccelerationStructureWriteKHR"; case AccessFlagBits::eFragmentDensityMapReadEXT: return "FragmentDensityMapReadEXT"; case AccessFlagBits::eFragmentShadingRateAttachmentReadKHR: return "FragmentShadingRateAttachmentReadKHR"; case AccessFlagBits::eCommandPreprocessReadNV: return "CommandPreprocessReadNV"; case AccessFlagBits::eCommandPreprocessWriteNV: return "CommandPreprocessWriteNV"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( AttachmentDescriptionFlagBits value ) { switch ( value ) { case AttachmentDescriptionFlagBits::eMayAlias: return "MayAlias"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( AttachmentLoadOp value ) { switch ( value ) { case AttachmentLoadOp::eLoad: return "Load"; case AttachmentLoadOp::eClear: return "Clear"; case AttachmentLoadOp::eDontCare: return "DontCare"; case AttachmentLoadOp::eNone: return "None"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( AttachmentStoreOp value ) { switch ( value ) { case AttachmentStoreOp::eStore: return "Store"; case AttachmentStoreOp::eDontCare: return "DontCare"; case AttachmentStoreOp::eNone: return "None"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( DependencyFlagBits value ) { switch ( value ) { case DependencyFlagBits::eByRegion: return "ByRegion"; case DependencyFlagBits::eDeviceGroup: return "DeviceGroup"; case DependencyFlagBits::eViewLocal: return "ViewLocal"; case DependencyFlagBits::eFeedbackLoopEXT: return "FeedbackLoopEXT"; case DependencyFlagBits::eQueueFamilyOwnershipTransferUseAllStagesKHR: return "QueueFamilyOwnershipTransferUseAllStagesKHR"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( FramebufferCreateFlagBits value ) { switch ( value ) { case FramebufferCreateFlagBits::eImageless: return "Imageless"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( PipelineBindPoint value ) { switch ( value ) { case PipelineBindPoint::eGraphics: return "Graphics"; case PipelineBindPoint::eCompute: return "Compute"; #if defined( VK_ENABLE_BETA_EXTENSIONS ) case PipelineBindPoint::eExecutionGraphAMDX: return "ExecutionGraphAMDX"; #endif /*VK_ENABLE_BETA_EXTENSIONS*/ case PipelineBindPoint::eRayTracingKHR: return "RayTracingKHR"; case PipelineBindPoint::eSubpassShadingHUAWEI: return "SubpassShadingHUAWEI"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( RenderPassCreateFlagBits value ) { switch ( value ) { case RenderPassCreateFlagBits::eTransformQCOM: return "TransformQCOM"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( SubpassDescriptionFlagBits value ) { switch ( value ) { case SubpassDescriptionFlagBits::ePerViewAttributesNVX: return "PerViewAttributesNVX"; case SubpassDescriptionFlagBits::ePerViewPositionXOnlyNVX: return "PerViewPositionXOnlyNVX"; case SubpassDescriptionFlagBits::eFragmentRegionQCOM: return "FragmentRegionQCOM"; case SubpassDescriptionFlagBits::eShaderResolveQCOM: return "ShaderResolveQCOM"; case SubpassDescriptionFlagBits::eRasterizationOrderAttachmentColorAccessEXT: return "RasterizationOrderAttachmentColorAccessEXT"; case SubpassDescriptionFlagBits::eRasterizationOrderAttachmentDepthAccessEXT: return "RasterizationOrderAttachmentDepthAccessEXT"; case SubpassDescriptionFlagBits::eRasterizationOrderAttachmentStencilAccessEXT: return "RasterizationOrderAttachmentStencilAccessEXT"; case SubpassDescriptionFlagBits::eEnableLegacyDitheringEXT: return "EnableLegacyDitheringEXT"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( CommandPoolCreateFlagBits value ) { switch ( value ) { case CommandPoolCreateFlagBits::eTransient: return "Transient"; case CommandPoolCreateFlagBits::eResetCommandBuffer: return "ResetCommandBuffer"; case CommandPoolCreateFlagBits::eProtected: return "Protected"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( CommandPoolResetFlagBits value ) { switch ( value ) { case CommandPoolResetFlagBits::eReleaseResources: return "ReleaseResources"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( CommandBufferLevel value ) { switch ( value ) { case CommandBufferLevel::ePrimary: return "Primary"; case CommandBufferLevel::eSecondary: return "Secondary"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( CommandBufferResetFlagBits value ) { switch ( value ) { case CommandBufferResetFlagBits::eReleaseResources: return "ReleaseResources"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( CommandBufferUsageFlagBits value ) { switch ( value ) { case CommandBufferUsageFlagBits::eOneTimeSubmit: return "OneTimeSubmit"; case CommandBufferUsageFlagBits::eRenderPassContinue: return "RenderPassContinue"; case CommandBufferUsageFlagBits::eSimultaneousUse: return "SimultaneousUse"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( QueryControlFlagBits value ) { switch ( value ) { case QueryControlFlagBits::ePrecise: return "Precise"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( IndexType value ) { switch ( value ) { case IndexType::eUint16: return "Uint16"; case IndexType::eUint32: return "Uint32"; case IndexType::eUint8: return "Uint8"; case IndexType::eNoneKHR: return "NoneKHR"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( StencilFaceFlagBits value ) { switch ( value ) { case StencilFaceFlagBits::eFront: return "Front"; case StencilFaceFlagBits::eBack: return "Back"; case StencilFaceFlagBits::eFrontAndBack: return "FrontAndBack"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( SubpassContents value ) { switch ( value ) { case SubpassContents::eInline: return "Inline"; case SubpassContents::eSecondaryCommandBuffers: return "SecondaryCommandBuffers"; case SubpassContents::eInlineAndSecondaryCommandBuffersKHR: return "InlineAndSecondaryCommandBuffersKHR"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } //=== VK_VERSION_1_1 === VULKAN_HPP_INLINE std::string to_string( SubgroupFeatureFlagBits value ) { switch ( value ) { case SubgroupFeatureFlagBits::eBasic: return "Basic"; case SubgroupFeatureFlagBits::eVote: return "Vote"; case SubgroupFeatureFlagBits::eArithmetic: return "Arithmetic"; case SubgroupFeatureFlagBits::eBallot: return "Ballot"; case SubgroupFeatureFlagBits::eShuffle: return "Shuffle"; case SubgroupFeatureFlagBits::eShuffleRelative: return "ShuffleRelative"; case SubgroupFeatureFlagBits::eClustered: return "Clustered"; case SubgroupFeatureFlagBits::eQuad: return "Quad"; case SubgroupFeatureFlagBits::eRotate: return "Rotate"; case SubgroupFeatureFlagBits::eRotateClustered: return "RotateClustered"; case SubgroupFeatureFlagBits::ePartitionedNV: return "PartitionedNV"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( PeerMemoryFeatureFlagBits value ) { switch ( value ) { case PeerMemoryFeatureFlagBits::eCopySrc: return "CopySrc"; case PeerMemoryFeatureFlagBits::eCopyDst: return "CopyDst"; case PeerMemoryFeatureFlagBits::eGenericSrc: return "GenericSrc"; case PeerMemoryFeatureFlagBits::eGenericDst: return "GenericDst"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( MemoryAllocateFlagBits value ) { switch ( value ) { case MemoryAllocateFlagBits::eDeviceMask: return "DeviceMask"; case MemoryAllocateFlagBits::eDeviceAddress: return "DeviceAddress"; case MemoryAllocateFlagBits::eDeviceAddressCaptureReplay: return "DeviceAddressCaptureReplay"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( CommandPoolTrimFlagBits ) { return "(void)"; } VULKAN_HPP_INLINE std::string to_string( PointClippingBehavior value ) { switch ( value ) { case PointClippingBehavior::eAllClipPlanes: return "AllClipPlanes"; case PointClippingBehavior::eUserClipPlanesOnly: return "UserClipPlanesOnly"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( TessellationDomainOrigin value ) { switch ( value ) { case TessellationDomainOrigin::eUpperLeft: return "UpperLeft"; case TessellationDomainOrigin::eLowerLeft: return "LowerLeft"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( SamplerYcbcrModelConversion value ) { switch ( value ) { case SamplerYcbcrModelConversion::eRgbIdentity: return "RgbIdentity"; case SamplerYcbcrModelConversion::eYcbcrIdentity: return "YcbcrIdentity"; case SamplerYcbcrModelConversion::eYcbcr709: return "Ycbcr709"; case SamplerYcbcrModelConversion::eYcbcr601: return "Ycbcr601"; case SamplerYcbcrModelConversion::eYcbcr2020: return "Ycbcr2020"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( SamplerYcbcrRange value ) { switch ( value ) { case SamplerYcbcrRange::eItuFull: return "ItuFull"; case SamplerYcbcrRange::eItuNarrow: return "ItuNarrow"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( ChromaLocation value ) { switch ( value ) { case ChromaLocation::eCositedEven: return "CositedEven"; case ChromaLocation::eMidpoint: return "Midpoint"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( DescriptorUpdateTemplateType value ) { switch ( value ) { case DescriptorUpdateTemplateType::eDescriptorSet: return "DescriptorSet"; case DescriptorUpdateTemplateType::ePushDescriptors: return "PushDescriptors"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( DescriptorUpdateTemplateCreateFlagBits ) { return "(void)"; } VULKAN_HPP_INLINE std::string to_string( ExternalMemoryHandleTypeFlagBits value ) { switch ( value ) { case ExternalMemoryHandleTypeFlagBits::eOpaqueFd: return "OpaqueFd"; case ExternalMemoryHandleTypeFlagBits::eOpaqueWin32: return "OpaqueWin32"; case ExternalMemoryHandleTypeFlagBits::eOpaqueWin32Kmt: return "OpaqueWin32Kmt"; case ExternalMemoryHandleTypeFlagBits::eD3D11Texture: return "D3D11Texture"; case ExternalMemoryHandleTypeFlagBits::eD3D11TextureKmt: return "D3D11TextureKmt"; case ExternalMemoryHandleTypeFlagBits::eD3D12Heap: return "D3D12Heap"; case ExternalMemoryHandleTypeFlagBits::eD3D12Resource: return "D3D12Resource"; case ExternalMemoryHandleTypeFlagBits::eDmaBufEXT: return "DmaBufEXT"; #if defined( VK_USE_PLATFORM_ANDROID_KHR ) case ExternalMemoryHandleTypeFlagBits::eAndroidHardwareBufferANDROID: return "AndroidHardwareBufferANDROID"; #endif /*VK_USE_PLATFORM_ANDROID_KHR*/ case ExternalMemoryHandleTypeFlagBits::eHostAllocationEXT: return "HostAllocationEXT"; case ExternalMemoryHandleTypeFlagBits::eHostMappedForeignMemoryEXT: return "HostMappedForeignMemoryEXT"; #if defined( VK_USE_PLATFORM_FUCHSIA ) case ExternalMemoryHandleTypeFlagBits::eZirconVmoFUCHSIA: return "ZirconVmoFUCHSIA"; #endif /*VK_USE_PLATFORM_FUCHSIA*/ case ExternalMemoryHandleTypeFlagBits::eRdmaAddressNV: return "RdmaAddressNV"; #if defined( VK_USE_PLATFORM_SCREEN_QNX ) case ExternalMemoryHandleTypeFlagBits::eScreenBufferQNX: return "ScreenBufferQNX"; #endif /*VK_USE_PLATFORM_SCREEN_QNX*/ #if defined( VK_USE_PLATFORM_METAL_EXT ) case ExternalMemoryHandleTypeFlagBits::eMtlbufferEXT: return "MtlbufferEXT"; case ExternalMemoryHandleTypeFlagBits::eMtltextureEXT: return "MtltextureEXT"; case ExternalMemoryHandleTypeFlagBits::eMtlheapEXT: return "MtlheapEXT"; #endif /*VK_USE_PLATFORM_METAL_EXT*/ default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( ExternalMemoryFeatureFlagBits value ) { switch ( value ) { case ExternalMemoryFeatureFlagBits::eDedicatedOnly: return "DedicatedOnly"; case ExternalMemoryFeatureFlagBits::eExportable: return "Exportable"; case ExternalMemoryFeatureFlagBits::eImportable: return "Importable"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( ExternalFenceHandleTypeFlagBits value ) { switch ( value ) { case ExternalFenceHandleTypeFlagBits::eOpaqueFd: return "OpaqueFd"; case ExternalFenceHandleTypeFlagBits::eOpaqueWin32: return "OpaqueWin32"; case ExternalFenceHandleTypeFlagBits::eOpaqueWin32Kmt: return "OpaqueWin32Kmt"; case ExternalFenceHandleTypeFlagBits::eSyncFd: return "SyncFd"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( ExternalFenceFeatureFlagBits value ) { switch ( value ) { case ExternalFenceFeatureFlagBits::eExportable: return "Exportable"; case ExternalFenceFeatureFlagBits::eImportable: return "Importable"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( FenceImportFlagBits value ) { switch ( value ) { case FenceImportFlagBits::eTemporary: return "Temporary"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( SemaphoreImportFlagBits value ) { switch ( value ) { case SemaphoreImportFlagBits::eTemporary: return "Temporary"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( ExternalSemaphoreHandleTypeFlagBits value ) { switch ( value ) { case ExternalSemaphoreHandleTypeFlagBits::eOpaqueFd: return "OpaqueFd"; case ExternalSemaphoreHandleTypeFlagBits::eOpaqueWin32: return "OpaqueWin32"; case ExternalSemaphoreHandleTypeFlagBits::eOpaqueWin32Kmt: return "OpaqueWin32Kmt"; case ExternalSemaphoreHandleTypeFlagBits::eD3D12Fence: return "D3D12Fence"; case ExternalSemaphoreHandleTypeFlagBits::eSyncFd: return "SyncFd"; #if defined( VK_USE_PLATFORM_FUCHSIA ) case ExternalSemaphoreHandleTypeFlagBits::eZirconEventFUCHSIA: return "ZirconEventFUCHSIA"; #endif /*VK_USE_PLATFORM_FUCHSIA*/ default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( ExternalSemaphoreFeatureFlagBits value ) { switch ( value ) { case ExternalSemaphoreFeatureFlagBits::eExportable: return "Exportable"; case ExternalSemaphoreFeatureFlagBits::eImportable: return "Importable"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } //=== VK_VERSION_1_2 === VULKAN_HPP_INLINE std::string to_string( DriverId value ) { switch ( value ) { case DriverId::eAmdProprietary: return "AmdProprietary"; case DriverId::eAmdOpenSource: return "AmdOpenSource"; case DriverId::eMesaRadv: return "MesaRadv"; case DriverId::eNvidiaProprietary: return "NvidiaProprietary"; case DriverId::eIntelProprietaryWindows: return "IntelProprietaryWindows"; case DriverId::eIntelOpenSourceMESA: return "IntelOpenSourceMESA"; case DriverId::eImaginationProprietary: return "ImaginationProprietary"; case DriverId::eQualcommProprietary: return "QualcommProprietary"; case DriverId::eArmProprietary: return "ArmProprietary"; case DriverId::eGoogleSwiftshader: return "GoogleSwiftshader"; case DriverId::eGgpProprietary: return "GgpProprietary"; case DriverId::eBroadcomProprietary: return "BroadcomProprietary"; case DriverId::eMesaLlvmpipe: return "MesaLlvmpipe"; case DriverId::eMoltenvk: return "Moltenvk"; case DriverId::eCoreaviProprietary: return "CoreaviProprietary"; case DriverId::eJuiceProprietary: return "JuiceProprietary"; case DriverId::eVerisiliconProprietary: return "VerisiliconProprietary"; case DriverId::eMesaTurnip: return "MesaTurnip"; case DriverId::eMesaV3Dv: return "MesaV3Dv"; case DriverId::eMesaPanvk: return "MesaPanvk"; case DriverId::eSamsungProprietary: return "SamsungProprietary"; case DriverId::eMesaVenus: return "MesaVenus"; case DriverId::eMesaDozen: return "MesaDozen"; case DriverId::eMesaNvk: return "MesaNvk"; case DriverId::eImaginationOpenSourceMESA: return "ImaginationOpenSourceMESA"; case DriverId::eMesaHoneykrisp: return "MesaHoneykrisp"; case DriverId::eVulkanScEmulationOnVulkan: return "VulkanScEmulationOnVulkan"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( ShaderFloatControlsIndependence value ) { switch ( value ) { case ShaderFloatControlsIndependence::e32BitOnly: return "32BitOnly"; case ShaderFloatControlsIndependence::eAll: return "All"; case ShaderFloatControlsIndependence::eNone: return "None"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( DescriptorBindingFlagBits value ) { switch ( value ) { case DescriptorBindingFlagBits::eUpdateAfterBind: return "UpdateAfterBind"; case DescriptorBindingFlagBits::eUpdateUnusedWhilePending: return "UpdateUnusedWhilePending"; case DescriptorBindingFlagBits::ePartiallyBound: return "PartiallyBound"; case DescriptorBindingFlagBits::eVariableDescriptorCount: return "VariableDescriptorCount"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( ResolveModeFlagBits value ) { switch ( value ) { case ResolveModeFlagBits::eNone: return "None"; case ResolveModeFlagBits::eSampleZero: return "SampleZero"; case ResolveModeFlagBits::eAverage: return "Average"; case ResolveModeFlagBits::eMin: return "Min"; case ResolveModeFlagBits::eMax: return "Max"; #if defined( VK_USE_PLATFORM_ANDROID_KHR ) case ResolveModeFlagBits::eExternalFormatDownsampleANDROID: return "ExternalFormatDownsampleANDROID"; #endif /*VK_USE_PLATFORM_ANDROID_KHR*/ default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( SamplerReductionMode value ) { switch ( value ) { case SamplerReductionMode::eWeightedAverage: return "WeightedAverage"; case SamplerReductionMode::eMin: return "Min"; case SamplerReductionMode::eMax: return "Max"; case SamplerReductionMode::eWeightedAverageRangeclampQCOM: return "WeightedAverageRangeclampQCOM"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( SemaphoreType value ) { switch ( value ) { case SemaphoreType::eBinary: return "Binary"; case SemaphoreType::eTimeline: return "Timeline"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( SemaphoreWaitFlagBits value ) { switch ( value ) { case SemaphoreWaitFlagBits::eAny: return "Any"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } //=== VK_VERSION_1_3 === VULKAN_HPP_INLINE std::string to_string( PipelineCreationFeedbackFlagBits value ) { switch ( value ) { case PipelineCreationFeedbackFlagBits::eValid: return "Valid"; case PipelineCreationFeedbackFlagBits::eApplicationPipelineCacheHit: return "ApplicationPipelineCacheHit"; case PipelineCreationFeedbackFlagBits::eBasePipelineAcceleration: return "BasePipelineAcceleration"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( ToolPurposeFlagBits value ) { switch ( value ) { case ToolPurposeFlagBits::eValidation: return "Validation"; case ToolPurposeFlagBits::eProfiling: return "Profiling"; case ToolPurposeFlagBits::eTracing: return "Tracing"; case ToolPurposeFlagBits::eAdditionalFeatures: return "AdditionalFeatures"; case ToolPurposeFlagBits::eModifyingFeatures: return "ModifyingFeatures"; case ToolPurposeFlagBits::eDebugReportingEXT: return "DebugReportingEXT"; case ToolPurposeFlagBits::eDebugMarkersEXT: return "DebugMarkersEXT"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( PrivateDataSlotCreateFlagBits ) { return "(void)"; } VULKAN_HPP_INLINE std::string to_string( PipelineStageFlagBits2 value ) { switch ( value ) { case PipelineStageFlagBits2::eNone: return "None"; case PipelineStageFlagBits2::eTopOfPipe: return "TopOfPipe"; case PipelineStageFlagBits2::eDrawIndirect: return "DrawIndirect"; case PipelineStageFlagBits2::eVertexInput: return "VertexInput"; case PipelineStageFlagBits2::eVertexShader: return "VertexShader"; case PipelineStageFlagBits2::eTessellationControlShader: return "TessellationControlShader"; case PipelineStageFlagBits2::eTessellationEvaluationShader: return "TessellationEvaluationShader"; case PipelineStageFlagBits2::eGeometryShader: return "GeometryShader"; case PipelineStageFlagBits2::eFragmentShader: return "FragmentShader"; case PipelineStageFlagBits2::eEarlyFragmentTests: return "EarlyFragmentTests"; case PipelineStageFlagBits2::eLateFragmentTests: return "LateFragmentTests"; case PipelineStageFlagBits2::eColorAttachmentOutput: return "ColorAttachmentOutput"; case PipelineStageFlagBits2::eComputeShader: return "ComputeShader"; case PipelineStageFlagBits2::eAllTransfer: return "AllTransfer"; case PipelineStageFlagBits2::eBottomOfPipe: return "BottomOfPipe"; case PipelineStageFlagBits2::eHost: return "Host"; case PipelineStageFlagBits2::eAllGraphics: return "AllGraphics"; case PipelineStageFlagBits2::eAllCommands: return "AllCommands"; case PipelineStageFlagBits2::eCopy: return "Copy"; case PipelineStageFlagBits2::eResolve: return "Resolve"; case PipelineStageFlagBits2::eBlit: return "Blit"; case PipelineStageFlagBits2::eClear: return "Clear"; case PipelineStageFlagBits2::eIndexInput: return "IndexInput"; case PipelineStageFlagBits2::eVertexAttributeInput: return "VertexAttributeInput"; case PipelineStageFlagBits2::ePreRasterizationShaders: return "PreRasterizationShaders"; case PipelineStageFlagBits2::eVideoDecodeKHR: return "VideoDecodeKHR"; case PipelineStageFlagBits2::eVideoEncodeKHR: return "VideoEncodeKHR"; case PipelineStageFlagBits2::eTransformFeedbackEXT: return "TransformFeedbackEXT"; case PipelineStageFlagBits2::eConditionalRenderingEXT: return "ConditionalRenderingEXT"; case PipelineStageFlagBits2::eCommandPreprocessNV: return "CommandPreprocessNV"; case PipelineStageFlagBits2::eFragmentShadingRateAttachmentKHR: return "FragmentShadingRateAttachmentKHR"; case PipelineStageFlagBits2::eAccelerationStructureBuildKHR: return "AccelerationStructureBuildKHR"; case PipelineStageFlagBits2::eRayTracingShaderKHR: return "RayTracingShaderKHR"; case PipelineStageFlagBits2::eFragmentDensityProcessEXT: return "FragmentDensityProcessEXT"; case PipelineStageFlagBits2::eTaskShaderEXT: return "TaskShaderEXT"; case PipelineStageFlagBits2::eMeshShaderEXT: return "MeshShaderEXT"; case PipelineStageFlagBits2::eSubpassShaderHUAWEI: return "SubpassShaderHUAWEI"; case PipelineStageFlagBits2::eInvocationMaskHUAWEI: return "InvocationMaskHUAWEI"; case PipelineStageFlagBits2::eAccelerationStructureCopyKHR: return "AccelerationStructureCopyKHR"; case PipelineStageFlagBits2::eMicromapBuildEXT: return "MicromapBuildEXT"; case PipelineStageFlagBits2::eClusterCullingShaderHUAWEI: return "ClusterCullingShaderHUAWEI"; case PipelineStageFlagBits2::eOpticalFlowNV: return "OpticalFlowNV"; case PipelineStageFlagBits2::eConvertCooperativeVectorMatrixNV: return "ConvertCooperativeVectorMatrixNV"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( AccessFlagBits2 value ) { switch ( value ) { case AccessFlagBits2::eNone: return "None"; case AccessFlagBits2::eIndirectCommandRead: return "IndirectCommandRead"; case AccessFlagBits2::eIndexRead: return "IndexRead"; case AccessFlagBits2::eVertexAttributeRead: return "VertexAttributeRead"; case AccessFlagBits2::eUniformRead: return "UniformRead"; case AccessFlagBits2::eInputAttachmentRead: return "InputAttachmentRead"; case AccessFlagBits2::eShaderRead: return "ShaderRead"; case AccessFlagBits2::eShaderWrite: return "ShaderWrite"; case AccessFlagBits2::eColorAttachmentRead: return "ColorAttachmentRead"; case AccessFlagBits2::eColorAttachmentWrite: return "ColorAttachmentWrite"; case AccessFlagBits2::eDepthStencilAttachmentRead: return "DepthStencilAttachmentRead"; case AccessFlagBits2::eDepthStencilAttachmentWrite: return "DepthStencilAttachmentWrite"; case AccessFlagBits2::eTransferRead: return "TransferRead"; case AccessFlagBits2::eTransferWrite: return "TransferWrite"; case AccessFlagBits2::eHostRead: return "HostRead"; case AccessFlagBits2::eHostWrite: return "HostWrite"; case AccessFlagBits2::eMemoryRead: return "MemoryRead"; case AccessFlagBits2::eMemoryWrite: return "MemoryWrite"; case AccessFlagBits2::eShaderSampledRead: return "ShaderSampledRead"; case AccessFlagBits2::eShaderStorageRead: return "ShaderStorageRead"; case AccessFlagBits2::eShaderStorageWrite: return "ShaderStorageWrite"; case AccessFlagBits2::eVideoDecodeReadKHR: return "VideoDecodeReadKHR"; case AccessFlagBits2::eVideoDecodeWriteKHR: return "VideoDecodeWriteKHR"; case AccessFlagBits2::eVideoEncodeReadKHR: return "VideoEncodeReadKHR"; case AccessFlagBits2::eVideoEncodeWriteKHR: return "VideoEncodeWriteKHR"; case AccessFlagBits2::eTransformFeedbackWriteEXT: return "TransformFeedbackWriteEXT"; case AccessFlagBits2::eTransformFeedbackCounterReadEXT: return "TransformFeedbackCounterReadEXT"; case AccessFlagBits2::eTransformFeedbackCounterWriteEXT: return "TransformFeedbackCounterWriteEXT"; case AccessFlagBits2::eConditionalRenderingReadEXT: return "ConditionalRenderingReadEXT"; case AccessFlagBits2::eCommandPreprocessReadNV: return "CommandPreprocessReadNV"; case AccessFlagBits2::eCommandPreprocessWriteNV: return "CommandPreprocessWriteNV"; case AccessFlagBits2::eFragmentShadingRateAttachmentReadKHR: return "FragmentShadingRateAttachmentReadKHR"; case AccessFlagBits2::eAccelerationStructureReadKHR: return "AccelerationStructureReadKHR"; case AccessFlagBits2::eAccelerationStructureWriteKHR: return "AccelerationStructureWriteKHR"; case AccessFlagBits2::eFragmentDensityMapReadEXT: return "FragmentDensityMapReadEXT"; case AccessFlagBits2::eColorAttachmentReadNoncoherentEXT: return "ColorAttachmentReadNoncoherentEXT"; case AccessFlagBits2::eDescriptorBufferReadEXT: return "DescriptorBufferReadEXT"; case AccessFlagBits2::eInvocationMaskReadHUAWEI: return "InvocationMaskReadHUAWEI"; case AccessFlagBits2::eShaderBindingTableReadKHR: return "ShaderBindingTableReadKHR"; case AccessFlagBits2::eMicromapReadEXT: return "MicromapReadEXT"; case AccessFlagBits2::eMicromapWriteEXT: return "MicromapWriteEXT"; case AccessFlagBits2::eOpticalFlowReadNV: return "OpticalFlowReadNV"; case AccessFlagBits2::eOpticalFlowWriteNV: return "OpticalFlowWriteNV"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( SubmitFlagBits value ) { switch ( value ) { case SubmitFlagBits::eProtected: return "Protected"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( RenderingFlagBits value ) { switch ( value ) { case RenderingFlagBits::eContentsSecondaryCommandBuffers: return "ContentsSecondaryCommandBuffers"; case RenderingFlagBits::eSuspending: return "Suspending"; case RenderingFlagBits::eResuming: return "Resuming"; case RenderingFlagBits::eEnableLegacyDitheringEXT: return "EnableLegacyDitheringEXT"; case RenderingFlagBits::eContentsInlineKHR: return "ContentsInlineKHR"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( FormatFeatureFlagBits2 value ) { switch ( value ) { case FormatFeatureFlagBits2::eSampledImage: return "SampledImage"; case FormatFeatureFlagBits2::eStorageImage: return "StorageImage"; case FormatFeatureFlagBits2::eStorageImageAtomic: return "StorageImageAtomic"; case FormatFeatureFlagBits2::eUniformTexelBuffer: return "UniformTexelBuffer"; case FormatFeatureFlagBits2::eStorageTexelBuffer: return "StorageTexelBuffer"; case FormatFeatureFlagBits2::eStorageTexelBufferAtomic: return "StorageTexelBufferAtomic"; case FormatFeatureFlagBits2::eVertexBuffer: return "VertexBuffer"; case FormatFeatureFlagBits2::eColorAttachment: return "ColorAttachment"; case FormatFeatureFlagBits2::eColorAttachmentBlend: return "ColorAttachmentBlend"; case FormatFeatureFlagBits2::eDepthStencilAttachment: return "DepthStencilAttachment"; case FormatFeatureFlagBits2::eBlitSrc: return "BlitSrc"; case FormatFeatureFlagBits2::eBlitDst: return "BlitDst"; case FormatFeatureFlagBits2::eSampledImageFilterLinear: return "SampledImageFilterLinear"; case FormatFeatureFlagBits2::eTransferSrc: return "TransferSrc"; case FormatFeatureFlagBits2::eTransferDst: return "TransferDst"; case FormatFeatureFlagBits2::eSampledImageFilterMinmax: return "SampledImageFilterMinmax"; case FormatFeatureFlagBits2::eMidpointChromaSamples: return "MidpointChromaSamples"; case FormatFeatureFlagBits2::eSampledImageYcbcrConversionLinearFilter: return "SampledImageYcbcrConversionLinearFilter"; case FormatFeatureFlagBits2::eSampledImageYcbcrConversionSeparateReconstructionFilter: return "SampledImageYcbcrConversionSeparateReconstructionFilter"; case FormatFeatureFlagBits2::eSampledImageYcbcrConversionChromaReconstructionExplicit: return "SampledImageYcbcrConversionChromaReconstructionExplicit"; case FormatFeatureFlagBits2::eSampledImageYcbcrConversionChromaReconstructionExplicitForceable: return "SampledImageYcbcrConversionChromaReconstructionExplicitForceable"; case FormatFeatureFlagBits2::eDisjoint: return "Disjoint"; case FormatFeatureFlagBits2::eCositedChromaSamples: return "CositedChromaSamples"; case FormatFeatureFlagBits2::eStorageReadWithoutFormat: return "StorageReadWithoutFormat"; case FormatFeatureFlagBits2::eStorageWriteWithoutFormat: return "StorageWriteWithoutFormat"; case FormatFeatureFlagBits2::eSampledImageDepthComparison: return "SampledImageDepthComparison"; case FormatFeatureFlagBits2::eSampledImageFilterCubic: return "SampledImageFilterCubic"; case FormatFeatureFlagBits2::eHostImageTransfer: return "HostImageTransfer"; case FormatFeatureFlagBits2::eVideoDecodeOutputKHR: return "VideoDecodeOutputKHR"; case FormatFeatureFlagBits2::eVideoDecodeDpbKHR: return "VideoDecodeDpbKHR"; case FormatFeatureFlagBits2::eAccelerationStructureVertexBufferKHR: return "AccelerationStructureVertexBufferKHR"; case FormatFeatureFlagBits2::eFragmentDensityMapEXT: return "FragmentDensityMapEXT"; case FormatFeatureFlagBits2::eFragmentShadingRateAttachmentKHR: return "FragmentShadingRateAttachmentKHR"; case FormatFeatureFlagBits2::eVideoEncodeInputKHR: return "VideoEncodeInputKHR"; case FormatFeatureFlagBits2::eVideoEncodeDpbKHR: return "VideoEncodeDpbKHR"; case FormatFeatureFlagBits2::eAccelerationStructureRadiusBufferNV: return "AccelerationStructureRadiusBufferNV"; case FormatFeatureFlagBits2::eLinearColorAttachmentNV: return "LinearColorAttachmentNV"; case FormatFeatureFlagBits2::eWeightImageQCOM: return "WeightImageQCOM"; case FormatFeatureFlagBits2::eWeightSampledImageQCOM: return "WeightSampledImageQCOM"; case FormatFeatureFlagBits2::eBlockMatchingQCOM: return "BlockMatchingQCOM"; case FormatFeatureFlagBits2::eBoxFilterSampledQCOM: return "BoxFilterSampledQCOM"; case FormatFeatureFlagBits2::eOpticalFlowImageNV: return "OpticalFlowImageNV"; case FormatFeatureFlagBits2::eOpticalFlowVectorNV: return "OpticalFlowVectorNV"; case FormatFeatureFlagBits2::eOpticalFlowCostNV: return "OpticalFlowCostNV"; case FormatFeatureFlagBits2::eVideoEncodeQuantizationDeltaMapKHR: return "VideoEncodeQuantizationDeltaMapKHR"; case FormatFeatureFlagBits2::eVideoEncodeEmphasisMapKHR: return "VideoEncodeEmphasisMapKHR"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } //=== VK_VERSION_1_4 === VULKAN_HPP_INLINE std::string to_string( QueueGlobalPriority value ) { switch ( value ) { case QueueGlobalPriority::eLow: return "Low"; case QueueGlobalPriority::eMedium: return "Medium"; case QueueGlobalPriority::eHigh: return "High"; case QueueGlobalPriority::eRealtime: return "Realtime"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( LineRasterizationMode value ) { switch ( value ) { case LineRasterizationMode::eDefault: return "Default"; case LineRasterizationMode::eRectangular: return "Rectangular"; case LineRasterizationMode::eBresenham: return "Bresenham"; case LineRasterizationMode::eRectangularSmooth: return "RectangularSmooth"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( MemoryUnmapFlagBits value ) { switch ( value ) { case MemoryUnmapFlagBits::eReserveEXT: return "ReserveEXT"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( PipelineCreateFlagBits2 value ) { switch ( value ) { case PipelineCreateFlagBits2::eDisableOptimization: return "DisableOptimization"; case PipelineCreateFlagBits2::eAllowDerivatives: return "AllowDerivatives"; case PipelineCreateFlagBits2::eDerivative: return "Derivative"; case PipelineCreateFlagBits2::eViewIndexFromDeviceIndex: return "ViewIndexFromDeviceIndex"; case PipelineCreateFlagBits2::eDispatchBase: return "DispatchBase"; case PipelineCreateFlagBits2::eFailOnPipelineCompileRequired: return "FailOnPipelineCompileRequired"; case PipelineCreateFlagBits2::eEarlyReturnOnFailure: return "EarlyReturnOnFailure"; case PipelineCreateFlagBits2::eNoProtectedAccess: return "NoProtectedAccess"; case PipelineCreateFlagBits2::eProtectedAccessOnly: return "ProtectedAccessOnly"; #if defined( VK_ENABLE_BETA_EXTENSIONS ) case PipelineCreateFlagBits2::eExecutionGraphAMDX: return "ExecutionGraphAMDX"; #endif /*VK_ENABLE_BETA_EXTENSIONS*/ case PipelineCreateFlagBits2::eRayTracingAllowSpheresAndLinearSweptSpheresNV: return "RayTracingAllowSpheresAndLinearSweptSpheresNV"; case PipelineCreateFlagBits2::eEnableLegacyDitheringEXT: return "EnableLegacyDitheringEXT"; case PipelineCreateFlagBits2::eDeferCompileNV: return "DeferCompileNV"; case PipelineCreateFlagBits2::eCaptureStatisticsKHR: return "CaptureStatisticsKHR"; case PipelineCreateFlagBits2::eCaptureInternalRepresentationsKHR: return "CaptureInternalRepresentationsKHR"; case PipelineCreateFlagBits2::eLinkTimeOptimizationEXT: return "LinkTimeOptimizationEXT"; case PipelineCreateFlagBits2::eRetainLinkTimeOptimizationInfoEXT: return "RetainLinkTimeOptimizationInfoEXT"; case PipelineCreateFlagBits2::eLibraryKHR: return "LibraryKHR"; case PipelineCreateFlagBits2::eRayTracingSkipTrianglesKHR: return "RayTracingSkipTrianglesKHR"; case PipelineCreateFlagBits2::eRayTracingSkipAabbsKHR: return "RayTracingSkipAabbsKHR"; case PipelineCreateFlagBits2::eRayTracingNoNullAnyHitShadersKHR: return "RayTracingNoNullAnyHitShadersKHR"; case PipelineCreateFlagBits2::eRayTracingNoNullClosestHitShadersKHR: return "RayTracingNoNullClosestHitShadersKHR"; case PipelineCreateFlagBits2::eRayTracingNoNullMissShadersKHR: return "RayTracingNoNullMissShadersKHR"; case PipelineCreateFlagBits2::eRayTracingNoNullIntersectionShadersKHR: return "RayTracingNoNullIntersectionShadersKHR"; case PipelineCreateFlagBits2::eRayTracingShaderGroupHandleCaptureReplayKHR: return "RayTracingShaderGroupHandleCaptureReplayKHR"; case PipelineCreateFlagBits2::eIndirectBindableNV: return "IndirectBindableNV"; case PipelineCreateFlagBits2::eRayTracingAllowMotionNV: return "RayTracingAllowMotionNV"; case PipelineCreateFlagBits2::eRenderingFragmentShadingRateAttachmentKHR: return "RenderingFragmentShadingRateAttachmentKHR"; case PipelineCreateFlagBits2::eRenderingFragmentDensityMapAttachmentEXT: return "RenderingFragmentDensityMapAttachmentEXT"; case PipelineCreateFlagBits2::eRayTracingOpacityMicromapEXT: return "RayTracingOpacityMicromapEXT"; case PipelineCreateFlagBits2::eColorAttachmentFeedbackLoopEXT: return "ColorAttachmentFeedbackLoopEXT"; case PipelineCreateFlagBits2::eDepthStencilAttachmentFeedbackLoopEXT: return "DepthStencilAttachmentFeedbackLoopEXT"; case PipelineCreateFlagBits2::eRayTracingDisplacementMicromapNV: return "RayTracingDisplacementMicromapNV"; case PipelineCreateFlagBits2::eDescriptorBufferEXT: return "DescriptorBufferEXT"; case PipelineCreateFlagBits2::eDisallowOpacityMicromapARM: return "DisallowOpacityMicromapARM"; case PipelineCreateFlagBits2::eCaptureDataKHR: return "CaptureDataKHR"; case PipelineCreateFlagBits2::eIndirectBindableEXT: return "IndirectBindableEXT"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( BufferUsageFlagBits2 value ) { switch ( value ) { case BufferUsageFlagBits2::eTransferSrc: return "TransferSrc"; case BufferUsageFlagBits2::eTransferDst: return "TransferDst"; case BufferUsageFlagBits2::eUniformTexelBuffer: return "UniformTexelBuffer"; case BufferUsageFlagBits2::eStorageTexelBuffer: return "StorageTexelBuffer"; case BufferUsageFlagBits2::eUniformBuffer: return "UniformBuffer"; case BufferUsageFlagBits2::eStorageBuffer: return "StorageBuffer"; case BufferUsageFlagBits2::eIndexBuffer: return "IndexBuffer"; case BufferUsageFlagBits2::eVertexBuffer: return "VertexBuffer"; case BufferUsageFlagBits2::eIndirectBuffer: return "IndirectBuffer"; case BufferUsageFlagBits2::eShaderDeviceAddress: return "ShaderDeviceAddress"; #if defined( VK_ENABLE_BETA_EXTENSIONS ) case BufferUsageFlagBits2::eExecutionGraphScratchAMDX: return "ExecutionGraphScratchAMDX"; #endif /*VK_ENABLE_BETA_EXTENSIONS*/ case BufferUsageFlagBits2::eConditionalRenderingEXT: return "ConditionalRenderingEXT"; case BufferUsageFlagBits2::eShaderBindingTableKHR: return "ShaderBindingTableKHR"; case BufferUsageFlagBits2::eTransformFeedbackBufferEXT: return "TransformFeedbackBufferEXT"; case BufferUsageFlagBits2::eTransformFeedbackCounterBufferEXT: return "TransformFeedbackCounterBufferEXT"; case BufferUsageFlagBits2::eVideoDecodeSrcKHR: return "VideoDecodeSrcKHR"; case BufferUsageFlagBits2::eVideoDecodeDstKHR: return "VideoDecodeDstKHR"; case BufferUsageFlagBits2::eVideoEncodeDstKHR: return "VideoEncodeDstKHR"; case BufferUsageFlagBits2::eVideoEncodeSrcKHR: return "VideoEncodeSrcKHR"; case BufferUsageFlagBits2::eAccelerationStructureBuildInputReadOnlyKHR: return "AccelerationStructureBuildInputReadOnlyKHR"; case BufferUsageFlagBits2::eAccelerationStructureStorageKHR: return "AccelerationStructureStorageKHR"; case BufferUsageFlagBits2::eSamplerDescriptorBufferEXT: return "SamplerDescriptorBufferEXT"; case BufferUsageFlagBits2::eResourceDescriptorBufferEXT: return "ResourceDescriptorBufferEXT"; case BufferUsageFlagBits2::ePushDescriptorsDescriptorBufferEXT: return "PushDescriptorsDescriptorBufferEXT"; case BufferUsageFlagBits2::eMicromapBuildInputReadOnlyEXT: return "MicromapBuildInputReadOnlyEXT"; case BufferUsageFlagBits2::eMicromapStorageEXT: return "MicromapStorageEXT"; case BufferUsageFlagBits2::ePreprocessBufferEXT: return "PreprocessBufferEXT"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( PipelineRobustnessBufferBehavior value ) { switch ( value ) { case PipelineRobustnessBufferBehavior::eDeviceDefault: return "DeviceDefault"; case PipelineRobustnessBufferBehavior::eDisabled: return "Disabled"; case PipelineRobustnessBufferBehavior::eRobustBufferAccess: return "RobustBufferAccess"; case PipelineRobustnessBufferBehavior::eRobustBufferAccess2: return "RobustBufferAccess2"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( PipelineRobustnessImageBehavior value ) { switch ( value ) { case PipelineRobustnessImageBehavior::eDeviceDefault: return "DeviceDefault"; case PipelineRobustnessImageBehavior::eDisabled: return "Disabled"; case PipelineRobustnessImageBehavior::eRobustImageAccess: return "RobustImageAccess"; case PipelineRobustnessImageBehavior::eRobustImageAccess2: return "RobustImageAccess2"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( HostImageCopyFlagBits value ) { switch ( value ) { case HostImageCopyFlagBits::eMemcpy: return "Memcpy"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } //=== VK_KHR_surface === VULKAN_HPP_INLINE std::string to_string( SurfaceTransformFlagBitsKHR value ) { switch ( value ) { case SurfaceTransformFlagBitsKHR::eIdentity: return "Identity"; case SurfaceTransformFlagBitsKHR::eRotate90: return "Rotate90"; case SurfaceTransformFlagBitsKHR::eRotate180: return "Rotate180"; case SurfaceTransformFlagBitsKHR::eRotate270: return "Rotate270"; case SurfaceTransformFlagBitsKHR::eHorizontalMirror: return "HorizontalMirror"; case SurfaceTransformFlagBitsKHR::eHorizontalMirrorRotate90: return "HorizontalMirrorRotate90"; case SurfaceTransformFlagBitsKHR::eHorizontalMirrorRotate180: return "HorizontalMirrorRotate180"; case SurfaceTransformFlagBitsKHR::eHorizontalMirrorRotate270: return "HorizontalMirrorRotate270"; case SurfaceTransformFlagBitsKHR::eInherit: return "Inherit"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( PresentModeKHR value ) { switch ( value ) { case PresentModeKHR::eImmediate: return "Immediate"; case PresentModeKHR::eMailbox: return "Mailbox"; case PresentModeKHR::eFifo: return "Fifo"; case PresentModeKHR::eFifoRelaxed: return "FifoRelaxed"; case PresentModeKHR::eSharedDemandRefresh: return "SharedDemandRefresh"; case PresentModeKHR::eSharedContinuousRefresh: return "SharedContinuousRefresh"; case PresentModeKHR::eFifoLatestReadyEXT: return "FifoLatestReadyEXT"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( ColorSpaceKHR value ) { switch ( value ) { case ColorSpaceKHR::eSrgbNonlinear: return "SrgbNonlinear"; case ColorSpaceKHR::eDisplayP3NonlinearEXT: return "DisplayP3NonlinearEXT"; case ColorSpaceKHR::eExtendedSrgbLinearEXT: return "ExtendedSrgbLinearEXT"; case ColorSpaceKHR::eDisplayP3LinearEXT: return "DisplayP3LinearEXT"; case ColorSpaceKHR::eDciP3NonlinearEXT: return "DciP3NonlinearEXT"; case ColorSpaceKHR::eBt709LinearEXT: return "Bt709LinearEXT"; case ColorSpaceKHR::eBt709NonlinearEXT: return "Bt709NonlinearEXT"; case ColorSpaceKHR::eBt2020LinearEXT: return "Bt2020LinearEXT"; case ColorSpaceKHR::eHdr10St2084EXT: return "Hdr10St2084EXT"; case ColorSpaceKHR::eDolbyvisionEXT: return "DolbyvisionEXT"; case ColorSpaceKHR::eHdr10HlgEXT: return "Hdr10HlgEXT"; case ColorSpaceKHR::eAdobergbLinearEXT: return "AdobergbLinearEXT"; case ColorSpaceKHR::eAdobergbNonlinearEXT: return "AdobergbNonlinearEXT"; case ColorSpaceKHR::ePassThroughEXT: return "PassThroughEXT"; case ColorSpaceKHR::eExtendedSrgbNonlinearEXT: return "ExtendedSrgbNonlinearEXT"; case ColorSpaceKHR::eDisplayNativeAMD: return "DisplayNativeAMD"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( CompositeAlphaFlagBitsKHR value ) { switch ( value ) { case CompositeAlphaFlagBitsKHR::eOpaque: return "Opaque"; case CompositeAlphaFlagBitsKHR::ePreMultiplied: return "PreMultiplied"; case CompositeAlphaFlagBitsKHR::ePostMultiplied: return "PostMultiplied"; case CompositeAlphaFlagBitsKHR::eInherit: return "Inherit"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } //=== VK_KHR_swapchain === VULKAN_HPP_INLINE std::string to_string( SwapchainCreateFlagBitsKHR value ) { switch ( value ) { case SwapchainCreateFlagBitsKHR::eSplitInstanceBindRegions: return "SplitInstanceBindRegions"; case SwapchainCreateFlagBitsKHR::eProtected: return "Protected"; case SwapchainCreateFlagBitsKHR::eMutableFormat: return "MutableFormat"; case SwapchainCreateFlagBitsKHR::eDeferredMemoryAllocationEXT: return "DeferredMemoryAllocationEXT"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( DeviceGroupPresentModeFlagBitsKHR value ) { switch ( value ) { case DeviceGroupPresentModeFlagBitsKHR::eLocal: return "Local"; case DeviceGroupPresentModeFlagBitsKHR::eRemote: return "Remote"; case DeviceGroupPresentModeFlagBitsKHR::eSum: return "Sum"; case DeviceGroupPresentModeFlagBitsKHR::eLocalMultiDevice: return "LocalMultiDevice"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } //=== VK_KHR_display === VULKAN_HPP_INLINE std::string to_string( DisplayPlaneAlphaFlagBitsKHR value ) { switch ( value ) { case DisplayPlaneAlphaFlagBitsKHR::eOpaque: return "Opaque"; case DisplayPlaneAlphaFlagBitsKHR::eGlobal: return "Global"; case DisplayPlaneAlphaFlagBitsKHR::ePerPixel: return "PerPixel"; case DisplayPlaneAlphaFlagBitsKHR::ePerPixelPremultiplied: return "PerPixelPremultiplied"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( DisplayModeCreateFlagBitsKHR ) { return "(void)"; } VULKAN_HPP_INLINE std::string to_string( DisplaySurfaceCreateFlagBitsKHR ) { return "(void)"; } #if defined( VK_USE_PLATFORM_XLIB_KHR ) //=== VK_KHR_xlib_surface === VULKAN_HPP_INLINE std::string to_string( XlibSurfaceCreateFlagBitsKHR ) { return "(void)"; } #endif /*VK_USE_PLATFORM_XLIB_KHR*/ #if defined( VK_USE_PLATFORM_XCB_KHR ) //=== VK_KHR_xcb_surface === VULKAN_HPP_INLINE std::string to_string( XcbSurfaceCreateFlagBitsKHR ) { return "(void)"; } #endif /*VK_USE_PLATFORM_XCB_KHR*/ #if defined( VK_USE_PLATFORM_WAYLAND_KHR ) //=== VK_KHR_wayland_surface === VULKAN_HPP_INLINE std::string to_string( WaylandSurfaceCreateFlagBitsKHR ) { return "(void)"; } #endif /*VK_USE_PLATFORM_WAYLAND_KHR*/ #if defined( VK_USE_PLATFORM_ANDROID_KHR ) //=== VK_KHR_android_surface === VULKAN_HPP_INLINE std::string to_string( AndroidSurfaceCreateFlagBitsKHR ) { return "(void)"; } #endif /*VK_USE_PLATFORM_ANDROID_KHR*/ #if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_KHR_win32_surface === VULKAN_HPP_INLINE std::string to_string( Win32SurfaceCreateFlagBitsKHR ) { return "(void)"; } #endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_EXT_debug_report === VULKAN_HPP_INLINE std::string to_string( DebugReportFlagBitsEXT value ) { switch ( value ) { case DebugReportFlagBitsEXT::eInformation: return "Information"; case DebugReportFlagBitsEXT::eWarning: return "Warning"; case DebugReportFlagBitsEXT::ePerformanceWarning: return "PerformanceWarning"; case DebugReportFlagBitsEXT::eError: return "Error"; case DebugReportFlagBitsEXT::eDebug: return "Debug"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( DebugReportObjectTypeEXT value ) { switch ( value ) { case DebugReportObjectTypeEXT::eUnknown: return "Unknown"; case DebugReportObjectTypeEXT::eInstance: return "Instance"; case DebugReportObjectTypeEXT::ePhysicalDevice: return "PhysicalDevice"; case DebugReportObjectTypeEXT::eDevice: return "Device"; case DebugReportObjectTypeEXT::eQueue: return "Queue"; case DebugReportObjectTypeEXT::eSemaphore: return "Semaphore"; case DebugReportObjectTypeEXT::eCommandBuffer: return "CommandBuffer"; case DebugReportObjectTypeEXT::eFence: return "Fence"; case DebugReportObjectTypeEXT::eDeviceMemory: return "DeviceMemory"; case DebugReportObjectTypeEXT::eBuffer: return "Buffer"; case DebugReportObjectTypeEXT::eImage: return "Image"; case DebugReportObjectTypeEXT::eEvent: return "Event"; case DebugReportObjectTypeEXT::eQueryPool: return "QueryPool"; case DebugReportObjectTypeEXT::eBufferView: return "BufferView"; case DebugReportObjectTypeEXT::eImageView: return "ImageView"; case DebugReportObjectTypeEXT::eShaderModule: return "ShaderModule"; case DebugReportObjectTypeEXT::ePipelineCache: return "PipelineCache"; case DebugReportObjectTypeEXT::ePipelineLayout: return "PipelineLayout"; case DebugReportObjectTypeEXT::eRenderPass: return "RenderPass"; case DebugReportObjectTypeEXT::ePipeline: return "Pipeline"; case DebugReportObjectTypeEXT::eDescriptorSetLayout: return "DescriptorSetLayout"; case DebugReportObjectTypeEXT::eSampler: return "Sampler"; case DebugReportObjectTypeEXT::eDescriptorPool: return "DescriptorPool"; case DebugReportObjectTypeEXT::eDescriptorSet: return "DescriptorSet"; case DebugReportObjectTypeEXT::eFramebuffer: return "Framebuffer"; case DebugReportObjectTypeEXT::eCommandPool: return "CommandPool"; case DebugReportObjectTypeEXT::eSurfaceKHR: return "SurfaceKHR"; case DebugReportObjectTypeEXT::eSwapchainKHR: return "SwapchainKHR"; case DebugReportObjectTypeEXT::eDebugReportCallbackEXT: return "DebugReportCallbackEXT"; case DebugReportObjectTypeEXT::eDisplayKHR: return "DisplayKHR"; case DebugReportObjectTypeEXT::eDisplayModeKHR: return "DisplayModeKHR"; case DebugReportObjectTypeEXT::eValidationCacheEXT: return "ValidationCacheEXT"; case DebugReportObjectTypeEXT::eSamplerYcbcrConversion: return "SamplerYcbcrConversion"; case DebugReportObjectTypeEXT::eDescriptorUpdateTemplate: return "DescriptorUpdateTemplate"; case DebugReportObjectTypeEXT::eCuModuleNVX: return "CuModuleNVX"; case DebugReportObjectTypeEXT::eCuFunctionNVX: return "CuFunctionNVX"; case DebugReportObjectTypeEXT::eAccelerationStructureKHR: return "AccelerationStructureKHR"; case DebugReportObjectTypeEXT::eAccelerationStructureNV: return "AccelerationStructureNV"; #if defined( VK_ENABLE_BETA_EXTENSIONS ) case DebugReportObjectTypeEXT::eCudaModuleNV: return "CudaModuleNV"; case DebugReportObjectTypeEXT::eCudaFunctionNV: return "CudaFunctionNV"; #endif /*VK_ENABLE_BETA_EXTENSIONS*/ #if defined( VK_USE_PLATFORM_FUCHSIA ) case DebugReportObjectTypeEXT::eBufferCollectionFUCHSIA: return "BufferCollectionFUCHSIA"; #endif /*VK_USE_PLATFORM_FUCHSIA*/ default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } //=== VK_AMD_rasterization_order === VULKAN_HPP_INLINE std::string to_string( RasterizationOrderAMD value ) { switch ( value ) { case RasterizationOrderAMD::eStrict: return "Strict"; case RasterizationOrderAMD::eRelaxed: return "Relaxed"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } //=== VK_KHR_video_queue === VULKAN_HPP_INLINE std::string to_string( VideoCodecOperationFlagBitsKHR value ) { switch ( value ) { case VideoCodecOperationFlagBitsKHR::eNone: return "None"; case VideoCodecOperationFlagBitsKHR::eEncodeH264: return "EncodeH264"; case VideoCodecOperationFlagBitsKHR::eEncodeH265: return "EncodeH265"; case VideoCodecOperationFlagBitsKHR::eDecodeH264: return "DecodeH264"; case VideoCodecOperationFlagBitsKHR::eDecodeH265: return "DecodeH265"; case VideoCodecOperationFlagBitsKHR::eDecodeAv1: return "DecodeAv1"; case VideoCodecOperationFlagBitsKHR::eEncodeAv1: return "EncodeAv1"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( VideoChromaSubsamplingFlagBitsKHR value ) { switch ( value ) { case VideoChromaSubsamplingFlagBitsKHR::eInvalid: return "Invalid"; case VideoChromaSubsamplingFlagBitsKHR::eMonochrome: return "Monochrome"; case VideoChromaSubsamplingFlagBitsKHR::e420: return "420"; case VideoChromaSubsamplingFlagBitsKHR::e422: return "422"; case VideoChromaSubsamplingFlagBitsKHR::e444: return "444"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( VideoComponentBitDepthFlagBitsKHR value ) { switch ( value ) { case VideoComponentBitDepthFlagBitsKHR::eInvalid: return "Invalid"; case VideoComponentBitDepthFlagBitsKHR::e8: return "8"; case VideoComponentBitDepthFlagBitsKHR::e10: return "10"; case VideoComponentBitDepthFlagBitsKHR::e12: return "12"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( VideoCapabilityFlagBitsKHR value ) { switch ( value ) { case VideoCapabilityFlagBitsKHR::eProtectedContent: return "ProtectedContent"; case VideoCapabilityFlagBitsKHR::eSeparateReferenceImages: return "SeparateReferenceImages"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( VideoSessionCreateFlagBitsKHR value ) { switch ( value ) { case VideoSessionCreateFlagBitsKHR::eProtectedContent: return "ProtectedContent"; case VideoSessionCreateFlagBitsKHR::eAllowEncodeParameterOptimizations: return "AllowEncodeParameterOptimizations"; case VideoSessionCreateFlagBitsKHR::eInlineQueries: return "InlineQueries"; case VideoSessionCreateFlagBitsKHR::eAllowEncodeQuantizationDeltaMap: return "AllowEncodeQuantizationDeltaMap"; case VideoSessionCreateFlagBitsKHR::eAllowEncodeEmphasisMap: return "AllowEncodeEmphasisMap"; case VideoSessionCreateFlagBitsKHR::eInlineSessionParameters: return "InlineSessionParameters"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( VideoCodingControlFlagBitsKHR value ) { switch ( value ) { case VideoCodingControlFlagBitsKHR::eReset: return "Reset"; case VideoCodingControlFlagBitsKHR::eEncodeRateControl: return "EncodeRateControl"; case VideoCodingControlFlagBitsKHR::eEncodeQualityLevel: return "EncodeQualityLevel"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( QueryResultStatusKHR value ) { switch ( value ) { case QueryResultStatusKHR::eError: return "Error"; case QueryResultStatusKHR::eNotReady: return "NotReady"; case QueryResultStatusKHR::eComplete: return "Complete"; case QueryResultStatusKHR::eInsufficientBitstreamBufferRange: return "InsufficientBitstreamBufferRange"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( VideoSessionParametersCreateFlagBitsKHR value ) { switch ( value ) { case VideoSessionParametersCreateFlagBitsKHR::eQuantizationMapCompatible: return "QuantizationMapCompatible"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( VideoBeginCodingFlagBitsKHR ) { return "(void)"; } VULKAN_HPP_INLINE std::string to_string( VideoEndCodingFlagBitsKHR ) { return "(void)"; } //=== VK_KHR_video_decode_queue === VULKAN_HPP_INLINE std::string to_string( VideoDecodeCapabilityFlagBitsKHR value ) { switch ( value ) { case VideoDecodeCapabilityFlagBitsKHR::eDpbAndOutputCoincide: return "DpbAndOutputCoincide"; case VideoDecodeCapabilityFlagBitsKHR::eDpbAndOutputDistinct: return "DpbAndOutputDistinct"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( VideoDecodeUsageFlagBitsKHR value ) { switch ( value ) { case VideoDecodeUsageFlagBitsKHR::eDefault: return "Default"; case VideoDecodeUsageFlagBitsKHR::eTranscoding: return "Transcoding"; case VideoDecodeUsageFlagBitsKHR::eOffline: return "Offline"; case VideoDecodeUsageFlagBitsKHR::eStreaming: return "Streaming"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( VideoDecodeFlagBitsKHR ) { return "(void)"; } //=== VK_EXT_transform_feedback === VULKAN_HPP_INLINE std::string to_string( PipelineRasterizationStateStreamCreateFlagBitsEXT ) { return "(void)"; } //=== VK_KHR_video_encode_h264 === VULKAN_HPP_INLINE std::string to_string( VideoEncodeH264CapabilityFlagBitsKHR value ) { switch ( value ) { case VideoEncodeH264CapabilityFlagBitsKHR::eHrdCompliance: return "HrdCompliance"; case VideoEncodeH264CapabilityFlagBitsKHR::ePredictionWeightTableGenerated: return "PredictionWeightTableGenerated"; case VideoEncodeH264CapabilityFlagBitsKHR::eRowUnalignedSlice: return "RowUnalignedSlice"; case VideoEncodeH264CapabilityFlagBitsKHR::eDifferentSliceType: return "DifferentSliceType"; case VideoEncodeH264CapabilityFlagBitsKHR::eBFrameInL0List: return "BFrameInL0List"; case VideoEncodeH264CapabilityFlagBitsKHR::eBFrameInL1List: return "BFrameInL1List"; case VideoEncodeH264CapabilityFlagBitsKHR::ePerPictureTypeMinMaxQp: return "PerPictureTypeMinMaxQp"; case VideoEncodeH264CapabilityFlagBitsKHR::ePerSliceConstantQp: return "PerSliceConstantQp"; case VideoEncodeH264CapabilityFlagBitsKHR::eGeneratePrefixNalu: return "GeneratePrefixNalu"; case VideoEncodeH264CapabilityFlagBitsKHR::eMbQpDiffWraparound: return "MbQpDiffWraparound"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( VideoEncodeH264StdFlagBitsKHR value ) { switch ( value ) { case VideoEncodeH264StdFlagBitsKHR::eSeparateColorPlaneFlagSet: return "SeparateColorPlaneFlagSet"; case VideoEncodeH264StdFlagBitsKHR::eQpprimeYZeroTransformBypassFlagSet: return "QpprimeYZeroTransformBypassFlagSet"; case VideoEncodeH264StdFlagBitsKHR::eScalingMatrixPresentFlagSet: return "ScalingMatrixPresentFlagSet"; case VideoEncodeH264StdFlagBitsKHR::eChromaQpIndexOffset: return "ChromaQpIndexOffset"; case VideoEncodeH264StdFlagBitsKHR::eSecondChromaQpIndexOffset: return "SecondChromaQpIndexOffset"; case VideoEncodeH264StdFlagBitsKHR::ePicInitQpMinus26: return "PicInitQpMinus26"; case VideoEncodeH264StdFlagBitsKHR::eWeightedPredFlagSet: return "WeightedPredFlagSet"; case VideoEncodeH264StdFlagBitsKHR::eWeightedBipredIdcExplicit: return "WeightedBipredIdcExplicit"; case VideoEncodeH264StdFlagBitsKHR::eWeightedBipredIdcImplicit: return "WeightedBipredIdcImplicit"; case VideoEncodeH264StdFlagBitsKHR::eTransform8X8ModeFlagSet: return "Transform8X8ModeFlagSet"; case VideoEncodeH264StdFlagBitsKHR::eDirectSpatialMvPredFlagUnset: return "DirectSpatialMvPredFlagUnset"; case VideoEncodeH264StdFlagBitsKHR::eEntropyCodingModeFlagUnset: return "EntropyCodingModeFlagUnset"; case VideoEncodeH264StdFlagBitsKHR::eEntropyCodingModeFlagSet: return "EntropyCodingModeFlagSet"; case VideoEncodeH264StdFlagBitsKHR::eDirect8X8InferenceFlagUnset: return "Direct8X8InferenceFlagUnset"; case VideoEncodeH264StdFlagBitsKHR::eConstrainedIntraPredFlagSet: return "ConstrainedIntraPredFlagSet"; case VideoEncodeH264StdFlagBitsKHR::eDeblockingFilterDisabled: return "DeblockingFilterDisabled"; case VideoEncodeH264StdFlagBitsKHR::eDeblockingFilterEnabled: return "DeblockingFilterEnabled"; case VideoEncodeH264StdFlagBitsKHR::eDeblockingFilterPartial: return "DeblockingFilterPartial"; case VideoEncodeH264StdFlagBitsKHR::eSliceQpDelta: return "SliceQpDelta"; case VideoEncodeH264StdFlagBitsKHR::eDifferentSliceQpDelta: return "DifferentSliceQpDelta"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( VideoEncodeH264RateControlFlagBitsKHR value ) { switch ( value ) { case VideoEncodeH264RateControlFlagBitsKHR::eAttemptHrdCompliance: return "AttemptHrdCompliance"; case VideoEncodeH264RateControlFlagBitsKHR::eRegularGop: return "RegularGop"; case VideoEncodeH264RateControlFlagBitsKHR::eReferencePatternFlat: return "ReferencePatternFlat"; case VideoEncodeH264RateControlFlagBitsKHR::eReferencePatternDyadic: return "ReferencePatternDyadic"; case VideoEncodeH264RateControlFlagBitsKHR::eTemporalLayerPatternDyadic: return "TemporalLayerPatternDyadic"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } //=== VK_KHR_video_encode_h265 === VULKAN_HPP_INLINE std::string to_string( VideoEncodeH265CapabilityFlagBitsKHR value ) { switch ( value ) { case VideoEncodeH265CapabilityFlagBitsKHR::eHrdCompliance: return "HrdCompliance"; case VideoEncodeH265CapabilityFlagBitsKHR::ePredictionWeightTableGenerated: return "PredictionWeightTableGenerated"; case VideoEncodeH265CapabilityFlagBitsKHR::eRowUnalignedSliceSegment: return "RowUnalignedSliceSegment"; case VideoEncodeH265CapabilityFlagBitsKHR::eDifferentSliceSegmentType: return "DifferentSliceSegmentType"; case VideoEncodeH265CapabilityFlagBitsKHR::eBFrameInL0List: return "BFrameInL0List"; case VideoEncodeH265CapabilityFlagBitsKHR::eBFrameInL1List: return "BFrameInL1List"; case VideoEncodeH265CapabilityFlagBitsKHR::ePerPictureTypeMinMaxQp: return "PerPictureTypeMinMaxQp"; case VideoEncodeH265CapabilityFlagBitsKHR::ePerSliceSegmentConstantQp: return "PerSliceSegmentConstantQp"; case VideoEncodeH265CapabilityFlagBitsKHR::eMultipleTilesPerSliceSegment: return "MultipleTilesPerSliceSegment"; case VideoEncodeH265CapabilityFlagBitsKHR::eMultipleSliceSegmentsPerTile: return "MultipleSliceSegmentsPerTile"; case VideoEncodeH265CapabilityFlagBitsKHR::eCuQpDiffWraparound: return "CuQpDiffWraparound"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( VideoEncodeH265StdFlagBitsKHR value ) { switch ( value ) { case VideoEncodeH265StdFlagBitsKHR::eSeparateColorPlaneFlagSet: return "SeparateColorPlaneFlagSet"; case VideoEncodeH265StdFlagBitsKHR::eSampleAdaptiveOffsetEnabledFlagSet: return "SampleAdaptiveOffsetEnabledFlagSet"; case VideoEncodeH265StdFlagBitsKHR::eScalingListDataPresentFlagSet: return "ScalingListDataPresentFlagSet"; case VideoEncodeH265StdFlagBitsKHR::ePcmEnabledFlagSet: return "PcmEnabledFlagSet"; case VideoEncodeH265StdFlagBitsKHR::eSpsTemporalMvpEnabledFlagSet: return "SpsTemporalMvpEnabledFlagSet"; case VideoEncodeH265StdFlagBitsKHR::eInitQpMinus26: return "InitQpMinus26"; case VideoEncodeH265StdFlagBitsKHR::eWeightedPredFlagSet: return "WeightedPredFlagSet"; case VideoEncodeH265StdFlagBitsKHR::eWeightedBipredFlagSet: return "WeightedBipredFlagSet"; case VideoEncodeH265StdFlagBitsKHR::eLog2ParallelMergeLevelMinus2: return "Log2ParallelMergeLevelMinus2"; case VideoEncodeH265StdFlagBitsKHR::eSignDataHidingEnabledFlagSet: return "SignDataHidingEnabledFlagSet"; case VideoEncodeH265StdFlagBitsKHR::eTransformSkipEnabledFlagSet: return "TransformSkipEnabledFlagSet"; case VideoEncodeH265StdFlagBitsKHR::eTransformSkipEnabledFlagUnset: return "TransformSkipEnabledFlagUnset"; case VideoEncodeH265StdFlagBitsKHR::ePpsSliceChromaQpOffsetsPresentFlagSet: return "PpsSliceChromaQpOffsetsPresentFlagSet"; case VideoEncodeH265StdFlagBitsKHR::eTransquantBypassEnabledFlagSet: return "TransquantBypassEnabledFlagSet"; case VideoEncodeH265StdFlagBitsKHR::eConstrainedIntraPredFlagSet: return "ConstrainedIntraPredFlagSet"; case VideoEncodeH265StdFlagBitsKHR::eEntropyCodingSyncEnabledFlagSet: return "EntropyCodingSyncEnabledFlagSet"; case VideoEncodeH265StdFlagBitsKHR::eDeblockingFilterOverrideEnabledFlagSet: return "DeblockingFilterOverrideEnabledFlagSet"; case VideoEncodeH265StdFlagBitsKHR::eDependentSliceSegmentsEnabledFlagSet: return "DependentSliceSegmentsEnabledFlagSet"; case VideoEncodeH265StdFlagBitsKHR::eDependentSliceSegmentFlagSet: return "DependentSliceSegmentFlagSet"; case VideoEncodeH265StdFlagBitsKHR::eSliceQpDelta: return "SliceQpDelta"; case VideoEncodeH265StdFlagBitsKHR::eDifferentSliceQpDelta: return "DifferentSliceQpDelta"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( VideoEncodeH265CtbSizeFlagBitsKHR value ) { switch ( value ) { case VideoEncodeH265CtbSizeFlagBitsKHR::e16: return "16"; case VideoEncodeH265CtbSizeFlagBitsKHR::e32: return "32"; case VideoEncodeH265CtbSizeFlagBitsKHR::e64: return "64"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( VideoEncodeH265TransformBlockSizeFlagBitsKHR value ) { switch ( value ) { case VideoEncodeH265TransformBlockSizeFlagBitsKHR::e4: return "4"; case VideoEncodeH265TransformBlockSizeFlagBitsKHR::e8: return "8"; case VideoEncodeH265TransformBlockSizeFlagBitsKHR::e16: return "16"; case VideoEncodeH265TransformBlockSizeFlagBitsKHR::e32: return "32"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( VideoEncodeH265RateControlFlagBitsKHR value ) { switch ( value ) { case VideoEncodeH265RateControlFlagBitsKHR::eAttemptHrdCompliance: return "AttemptHrdCompliance"; case VideoEncodeH265RateControlFlagBitsKHR::eRegularGop: return "RegularGop"; case VideoEncodeH265RateControlFlagBitsKHR::eReferencePatternFlat: return "ReferencePatternFlat"; case VideoEncodeH265RateControlFlagBitsKHR::eReferencePatternDyadic: return "ReferencePatternDyadic"; case VideoEncodeH265RateControlFlagBitsKHR::eTemporalSubLayerPatternDyadic: return "TemporalSubLayerPatternDyadic"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } //=== VK_KHR_video_decode_h264 === VULKAN_HPP_INLINE std::string to_string( VideoDecodeH264PictureLayoutFlagBitsKHR value ) { switch ( value ) { case VideoDecodeH264PictureLayoutFlagBitsKHR::eProgressive: return "Progressive"; case VideoDecodeH264PictureLayoutFlagBitsKHR::eInterlacedInterleavedLines: return "InterlacedInterleavedLines"; case VideoDecodeH264PictureLayoutFlagBitsKHR::eInterlacedSeparatePlanes: return "InterlacedSeparatePlanes"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } //=== VK_AMD_shader_info === VULKAN_HPP_INLINE std::string to_string( ShaderInfoTypeAMD value ) { switch ( value ) { case ShaderInfoTypeAMD::eStatistics: return "Statistics"; case ShaderInfoTypeAMD::eBinary: return "Binary"; case ShaderInfoTypeAMD::eDisassembly: return "Disassembly"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } #if defined( VK_USE_PLATFORM_GGP ) //=== VK_GGP_stream_descriptor_surface === VULKAN_HPP_INLINE std::string to_string( StreamDescriptorSurfaceCreateFlagBitsGGP ) { return "(void)"; } #endif /*VK_USE_PLATFORM_GGP*/ //=== VK_NV_external_memory_capabilities === VULKAN_HPP_INLINE std::string to_string( ExternalMemoryHandleTypeFlagBitsNV value ) { switch ( value ) { case ExternalMemoryHandleTypeFlagBitsNV::eOpaqueWin32: return "OpaqueWin32"; case ExternalMemoryHandleTypeFlagBitsNV::eOpaqueWin32Kmt: return "OpaqueWin32Kmt"; case ExternalMemoryHandleTypeFlagBitsNV::eD3D11Image: return "D3D11Image"; case ExternalMemoryHandleTypeFlagBitsNV::eD3D11ImageKmt: return "D3D11ImageKmt"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( ExternalMemoryFeatureFlagBitsNV value ) { switch ( value ) { case ExternalMemoryFeatureFlagBitsNV::eDedicatedOnly: return "DedicatedOnly"; case ExternalMemoryFeatureFlagBitsNV::eExportable: return "Exportable"; case ExternalMemoryFeatureFlagBitsNV::eImportable: return "Importable"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } //=== VK_EXT_validation_flags === VULKAN_HPP_INLINE std::string to_string( ValidationCheckEXT value ) { switch ( value ) { case ValidationCheckEXT::eAll: return "All"; case ValidationCheckEXT::eShaders: return "Shaders"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } #if defined( VK_USE_PLATFORM_VI_NN ) //=== VK_NN_vi_surface === VULKAN_HPP_INLINE std::string to_string( ViSurfaceCreateFlagBitsNN ) { return "(void)"; } #endif /*VK_USE_PLATFORM_VI_NN*/ //=== VK_EXT_conditional_rendering === VULKAN_HPP_INLINE std::string to_string( ConditionalRenderingFlagBitsEXT value ) { switch ( value ) { case ConditionalRenderingFlagBitsEXT::eInverted: return "Inverted"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } //=== VK_EXT_display_surface_counter === VULKAN_HPP_INLINE std::string to_string( SurfaceCounterFlagBitsEXT value ) { switch ( value ) { case SurfaceCounterFlagBitsEXT::eVblank: return "Vblank"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } //=== VK_EXT_display_control === VULKAN_HPP_INLINE std::string to_string( DisplayPowerStateEXT value ) { switch ( value ) { case DisplayPowerStateEXT::eOff: return "Off"; case DisplayPowerStateEXT::eSuspend: return "Suspend"; case DisplayPowerStateEXT::eOn: return "On"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( DeviceEventTypeEXT value ) { switch ( value ) { case DeviceEventTypeEXT::eDisplayHotplug: return "DisplayHotplug"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( DisplayEventTypeEXT value ) { switch ( value ) { case DisplayEventTypeEXT::eFirstPixelOut: return "FirstPixelOut"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } //=== VK_NV_viewport_swizzle === VULKAN_HPP_INLINE std::string to_string( ViewportCoordinateSwizzleNV value ) { switch ( value ) { case ViewportCoordinateSwizzleNV::ePositiveX: return "PositiveX"; case ViewportCoordinateSwizzleNV::eNegativeX: return "NegativeX"; case ViewportCoordinateSwizzleNV::ePositiveY: return "PositiveY"; case ViewportCoordinateSwizzleNV::eNegativeY: return "NegativeY"; case ViewportCoordinateSwizzleNV::ePositiveZ: return "PositiveZ"; case ViewportCoordinateSwizzleNV::eNegativeZ: return "NegativeZ"; case ViewportCoordinateSwizzleNV::ePositiveW: return "PositiveW"; case ViewportCoordinateSwizzleNV::eNegativeW: return "NegativeW"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( PipelineViewportSwizzleStateCreateFlagBitsNV ) { return "(void)"; } //=== VK_EXT_discard_rectangles === VULKAN_HPP_INLINE std::string to_string( DiscardRectangleModeEXT value ) { switch ( value ) { case DiscardRectangleModeEXT::eInclusive: return "Inclusive"; case DiscardRectangleModeEXT::eExclusive: return "Exclusive"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( PipelineDiscardRectangleStateCreateFlagBitsEXT ) { return "(void)"; } //=== VK_EXT_conservative_rasterization === VULKAN_HPP_INLINE std::string to_string( ConservativeRasterizationModeEXT value ) { switch ( value ) { case ConservativeRasterizationModeEXT::eDisabled: return "Disabled"; case ConservativeRasterizationModeEXT::eOverestimate: return "Overestimate"; case ConservativeRasterizationModeEXT::eUnderestimate: return "Underestimate"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( PipelineRasterizationConservativeStateCreateFlagBitsEXT ) { return "(void)"; } //=== VK_EXT_depth_clip_enable === VULKAN_HPP_INLINE std::string to_string( PipelineRasterizationDepthClipStateCreateFlagBitsEXT ) { return "(void)"; } //=== VK_KHR_performance_query === VULKAN_HPP_INLINE std::string to_string( PerformanceCounterDescriptionFlagBitsKHR value ) { switch ( value ) { case PerformanceCounterDescriptionFlagBitsKHR::ePerformanceImpacting: return "PerformanceImpacting"; case PerformanceCounterDescriptionFlagBitsKHR::eConcurrentlyImpacted: return "ConcurrentlyImpacted"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( PerformanceCounterScopeKHR value ) { switch ( value ) { case PerformanceCounterScopeKHR::eCommandBuffer: return "CommandBuffer"; case PerformanceCounterScopeKHR::eRenderPass: return "RenderPass"; case PerformanceCounterScopeKHR::eCommand: return "Command"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( PerformanceCounterStorageKHR value ) { switch ( value ) { case PerformanceCounterStorageKHR::eInt32: return "Int32"; case PerformanceCounterStorageKHR::eInt64: return "Int64"; case PerformanceCounterStorageKHR::eUint32: return "Uint32"; case PerformanceCounterStorageKHR::eUint64: return "Uint64"; case PerformanceCounterStorageKHR::eFloat32: return "Float32"; case PerformanceCounterStorageKHR::eFloat64: return "Float64"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( PerformanceCounterUnitKHR value ) { switch ( value ) { case PerformanceCounterUnitKHR::eGeneric: return "Generic"; case PerformanceCounterUnitKHR::ePercentage: return "Percentage"; case PerformanceCounterUnitKHR::eNanoseconds: return "Nanoseconds"; case PerformanceCounterUnitKHR::eBytes: return "Bytes"; case PerformanceCounterUnitKHR::eBytesPerSecond: return "BytesPerSecond"; case PerformanceCounterUnitKHR::eKelvin: return "Kelvin"; case PerformanceCounterUnitKHR::eWatts: return "Watts"; case PerformanceCounterUnitKHR::eVolts: return "Volts"; case PerformanceCounterUnitKHR::eAmps: return "Amps"; case PerformanceCounterUnitKHR::eHertz: return "Hertz"; case PerformanceCounterUnitKHR::eCycles: return "Cycles"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( AcquireProfilingLockFlagBitsKHR ) { return "(void)"; } #if defined( VK_USE_PLATFORM_IOS_MVK ) //=== VK_MVK_ios_surface === VULKAN_HPP_INLINE std::string to_string( IOSSurfaceCreateFlagBitsMVK ) { return "(void)"; } #endif /*VK_USE_PLATFORM_IOS_MVK*/ #if defined( VK_USE_PLATFORM_MACOS_MVK ) //=== VK_MVK_macos_surface === VULKAN_HPP_INLINE std::string to_string( MacOSSurfaceCreateFlagBitsMVK ) { return "(void)"; } #endif /*VK_USE_PLATFORM_MACOS_MVK*/ //=== VK_EXT_debug_utils === VULKAN_HPP_INLINE std::string to_string( DebugUtilsMessageSeverityFlagBitsEXT value ) { switch ( value ) { case DebugUtilsMessageSeverityFlagBitsEXT::eVerbose: return "Verbose"; case DebugUtilsMessageSeverityFlagBitsEXT::eInfo: return "Info"; case DebugUtilsMessageSeverityFlagBitsEXT::eWarning: return "Warning"; case DebugUtilsMessageSeverityFlagBitsEXT::eError: return "Error"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( DebugUtilsMessageTypeFlagBitsEXT value ) { switch ( value ) { case DebugUtilsMessageTypeFlagBitsEXT::eGeneral: return "General"; case DebugUtilsMessageTypeFlagBitsEXT::eValidation: return "Validation"; case DebugUtilsMessageTypeFlagBitsEXT::ePerformance: return "Performance"; case DebugUtilsMessageTypeFlagBitsEXT::eDeviceAddressBinding: return "DeviceAddressBinding"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( DebugUtilsMessengerCallbackDataFlagBitsEXT ) { return "(void)"; } VULKAN_HPP_INLINE std::string to_string( DebugUtilsMessengerCreateFlagBitsEXT ) { return "(void)"; } //=== VK_EXT_blend_operation_advanced === VULKAN_HPP_INLINE std::string to_string( BlendOverlapEXT value ) { switch ( value ) { case BlendOverlapEXT::eUncorrelated: return "Uncorrelated"; case BlendOverlapEXT::eDisjoint: return "Disjoint"; case BlendOverlapEXT::eConjoint: return "Conjoint"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } //=== VK_NV_fragment_coverage_to_color === VULKAN_HPP_INLINE std::string to_string( PipelineCoverageToColorStateCreateFlagBitsNV ) { return "(void)"; } //=== VK_KHR_acceleration_structure === VULKAN_HPP_INLINE std::string to_string( AccelerationStructureTypeKHR value ) { switch ( value ) { case AccelerationStructureTypeKHR::eTopLevel: return "TopLevel"; case AccelerationStructureTypeKHR::eBottomLevel: return "BottomLevel"; case AccelerationStructureTypeKHR::eGeneric: return "Generic"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( AccelerationStructureBuildTypeKHR value ) { switch ( value ) { case AccelerationStructureBuildTypeKHR::eHost: return "Host"; case AccelerationStructureBuildTypeKHR::eDevice: return "Device"; case AccelerationStructureBuildTypeKHR::eHostOrDevice: return "HostOrDevice"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( GeometryFlagBitsKHR value ) { switch ( value ) { case GeometryFlagBitsKHR::eOpaque: return "Opaque"; case GeometryFlagBitsKHR::eNoDuplicateAnyHitInvocation: return "NoDuplicateAnyHitInvocation"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( GeometryInstanceFlagBitsKHR value ) { switch ( value ) { case GeometryInstanceFlagBitsKHR::eTriangleFacingCullDisable: return "TriangleFacingCullDisable"; case GeometryInstanceFlagBitsKHR::eTriangleFlipFacing: return "TriangleFlipFacing"; case GeometryInstanceFlagBitsKHR::eForceOpaque: return "ForceOpaque"; case GeometryInstanceFlagBitsKHR::eForceNoOpaque: return "ForceNoOpaque"; case GeometryInstanceFlagBitsKHR::eForceOpacityMicromap2StateEXT: return "ForceOpacityMicromap2StateEXT"; case GeometryInstanceFlagBitsKHR::eDisableOpacityMicromapsEXT: return "DisableOpacityMicromapsEXT"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( BuildAccelerationStructureFlagBitsKHR value ) { switch ( value ) { case BuildAccelerationStructureFlagBitsKHR::eAllowUpdate: return "AllowUpdate"; case BuildAccelerationStructureFlagBitsKHR::eAllowCompaction: return "AllowCompaction"; case BuildAccelerationStructureFlagBitsKHR::ePreferFastTrace: return "PreferFastTrace"; case BuildAccelerationStructureFlagBitsKHR::ePreferFastBuild: return "PreferFastBuild"; case BuildAccelerationStructureFlagBitsKHR::eLowMemory: return "LowMemory"; case BuildAccelerationStructureFlagBitsKHR::eMotionNV: return "MotionNV"; case BuildAccelerationStructureFlagBitsKHR::eAllowOpacityMicromapUpdateEXT: return "AllowOpacityMicromapUpdateEXT"; case BuildAccelerationStructureFlagBitsKHR::eAllowDisableOpacityMicromapsEXT: return "AllowDisableOpacityMicromapsEXT"; case BuildAccelerationStructureFlagBitsKHR::eAllowOpacityMicromapDataUpdateEXT: return "AllowOpacityMicromapDataUpdateEXT"; #if defined( VK_ENABLE_BETA_EXTENSIONS ) case BuildAccelerationStructureFlagBitsKHR::eAllowDisplacementMicromapUpdateNV: return "AllowDisplacementMicromapUpdateNV"; #endif /*VK_ENABLE_BETA_EXTENSIONS*/ case BuildAccelerationStructureFlagBitsKHR::eAllowDataAccess: return "AllowDataAccess"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( CopyAccelerationStructureModeKHR value ) { switch ( value ) { case CopyAccelerationStructureModeKHR::eClone: return "Clone"; case CopyAccelerationStructureModeKHR::eCompact: return "Compact"; case CopyAccelerationStructureModeKHR::eSerialize: return "Serialize"; case CopyAccelerationStructureModeKHR::eDeserialize: return "Deserialize"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( GeometryTypeKHR value ) { switch ( value ) { case GeometryTypeKHR::eTriangles: return "Triangles"; case GeometryTypeKHR::eAabbs: return "Aabbs"; case GeometryTypeKHR::eInstances: return "Instances"; case GeometryTypeKHR::eSpheresNV: return "SpheresNV"; case GeometryTypeKHR::eLinearSweptSpheresNV: return "LinearSweptSpheresNV"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( AccelerationStructureCompatibilityKHR value ) { switch ( value ) { case AccelerationStructureCompatibilityKHR::eCompatible: return "Compatible"; case AccelerationStructureCompatibilityKHR::eIncompatible: return "Incompatible"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( AccelerationStructureCreateFlagBitsKHR value ) { switch ( value ) { case AccelerationStructureCreateFlagBitsKHR::eDeviceAddressCaptureReplay: return "DeviceAddressCaptureReplay"; case AccelerationStructureCreateFlagBitsKHR::eDescriptorBufferCaptureReplayEXT: return "DescriptorBufferCaptureReplayEXT"; case AccelerationStructureCreateFlagBitsKHR::eMotionNV: return "MotionNV"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( BuildAccelerationStructureModeKHR value ) { switch ( value ) { case BuildAccelerationStructureModeKHR::eBuild: return "Build"; case BuildAccelerationStructureModeKHR::eUpdate: return "Update"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } //=== VK_KHR_ray_tracing_pipeline === VULKAN_HPP_INLINE std::string to_string( RayTracingShaderGroupTypeKHR value ) { switch ( value ) { case RayTracingShaderGroupTypeKHR::eGeneral: return "General"; case RayTracingShaderGroupTypeKHR::eTrianglesHitGroup: return "TrianglesHitGroup"; case RayTracingShaderGroupTypeKHR::eProceduralHitGroup: return "ProceduralHitGroup"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( ShaderGroupShaderKHR value ) { switch ( value ) { case ShaderGroupShaderKHR::eGeneral: return "General"; case ShaderGroupShaderKHR::eClosestHit: return "ClosestHit"; case ShaderGroupShaderKHR::eAnyHit: return "AnyHit"; case ShaderGroupShaderKHR::eIntersection: return "Intersection"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } //=== VK_NV_framebuffer_mixed_samples === VULKAN_HPP_INLINE std::string to_string( CoverageModulationModeNV value ) { switch ( value ) { case CoverageModulationModeNV::eNone: return "None"; case CoverageModulationModeNV::eRgb: return "Rgb"; case CoverageModulationModeNV::eAlpha: return "Alpha"; case CoverageModulationModeNV::eRgba: return "Rgba"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( PipelineCoverageModulationStateCreateFlagBitsNV ) { return "(void)"; } //=== VK_EXT_validation_cache === VULKAN_HPP_INLINE std::string to_string( ValidationCacheHeaderVersionEXT value ) { switch ( value ) { case ValidationCacheHeaderVersionEXT::eOne: return "One"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( ValidationCacheCreateFlagBitsEXT ) { return "(void)"; } //=== VK_NV_shading_rate_image === VULKAN_HPP_INLINE std::string to_string( ShadingRatePaletteEntryNV value ) { switch ( value ) { case ShadingRatePaletteEntryNV::eNoInvocations: return "NoInvocations"; case ShadingRatePaletteEntryNV::e16InvocationsPerPixel: return "16InvocationsPerPixel"; case ShadingRatePaletteEntryNV::e8InvocationsPerPixel: return "8InvocationsPerPixel"; case ShadingRatePaletteEntryNV::e4InvocationsPerPixel: return "4InvocationsPerPixel"; case ShadingRatePaletteEntryNV::e2InvocationsPerPixel: return "2InvocationsPerPixel"; case ShadingRatePaletteEntryNV::e1InvocationPerPixel: return "1InvocationPerPixel"; case ShadingRatePaletteEntryNV::e1InvocationPer2X1Pixels: return "1InvocationPer2X1Pixels"; case ShadingRatePaletteEntryNV::e1InvocationPer1X2Pixels: return "1InvocationPer1X2Pixels"; case ShadingRatePaletteEntryNV::e1InvocationPer2X2Pixels: return "1InvocationPer2X2Pixels"; case ShadingRatePaletteEntryNV::e1InvocationPer4X2Pixels: return "1InvocationPer4X2Pixels"; case ShadingRatePaletteEntryNV::e1InvocationPer2X4Pixels: return "1InvocationPer2X4Pixels"; case ShadingRatePaletteEntryNV::e1InvocationPer4X4Pixels: return "1InvocationPer4X4Pixels"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( CoarseSampleOrderTypeNV value ) { switch ( value ) { case CoarseSampleOrderTypeNV::eDefault: return "Default"; case CoarseSampleOrderTypeNV::eCustom: return "Custom"; case CoarseSampleOrderTypeNV::ePixelMajor: return "PixelMajor"; case CoarseSampleOrderTypeNV::eSampleMajor: return "SampleMajor"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } //=== VK_NV_ray_tracing === VULKAN_HPP_INLINE std::string to_string( AccelerationStructureMemoryRequirementsTypeNV value ) { switch ( value ) { case AccelerationStructureMemoryRequirementsTypeNV::eObject: return "Object"; case AccelerationStructureMemoryRequirementsTypeNV::eBuildScratch: return "BuildScratch"; case AccelerationStructureMemoryRequirementsTypeNV::eUpdateScratch: return "UpdateScratch"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } //=== VK_AMD_pipeline_compiler_control === VULKAN_HPP_INLINE std::string to_string( PipelineCompilerControlFlagBitsAMD ) { return "(void)"; } //=== VK_AMD_memory_overallocation_behavior === VULKAN_HPP_INLINE std::string to_string( MemoryOverallocationBehaviorAMD value ) { switch ( value ) { case MemoryOverallocationBehaviorAMD::eDefault: return "Default"; case MemoryOverallocationBehaviorAMD::eAllowed: return "Allowed"; case MemoryOverallocationBehaviorAMD::eDisallowed: return "Disallowed"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } //=== VK_INTEL_performance_query === VULKAN_HPP_INLINE std::string to_string( PerformanceConfigurationTypeINTEL value ) { switch ( value ) { case PerformanceConfigurationTypeINTEL::eCommandQueueMetricsDiscoveryActivated: return "CommandQueueMetricsDiscoveryActivated"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( QueryPoolSamplingModeINTEL value ) { switch ( value ) { case QueryPoolSamplingModeINTEL::eManual: return "Manual"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( PerformanceOverrideTypeINTEL value ) { switch ( value ) { case PerformanceOverrideTypeINTEL::eNullHardware: return "NullHardware"; case PerformanceOverrideTypeINTEL::eFlushGpuCaches: return "FlushGpuCaches"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( PerformanceParameterTypeINTEL value ) { switch ( value ) { case PerformanceParameterTypeINTEL::eHwCountersSupported: return "HwCountersSupported"; case PerformanceParameterTypeINTEL::eStreamMarkerValidBits: return "StreamMarkerValidBits"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( PerformanceValueTypeINTEL value ) { switch ( value ) { case PerformanceValueTypeINTEL::eUint32: return "Uint32"; case PerformanceValueTypeINTEL::eUint64: return "Uint64"; case PerformanceValueTypeINTEL::eFloat: return "Float"; case PerformanceValueTypeINTEL::eBool: return "Bool"; case PerformanceValueTypeINTEL::eString: return "String"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } #if defined( VK_USE_PLATFORM_FUCHSIA ) //=== VK_FUCHSIA_imagepipe_surface === VULKAN_HPP_INLINE std::string to_string( ImagePipeSurfaceCreateFlagBitsFUCHSIA ) { return "(void)"; } #endif /*VK_USE_PLATFORM_FUCHSIA*/ #if defined( VK_USE_PLATFORM_METAL_EXT ) //=== VK_EXT_metal_surface === VULKAN_HPP_INLINE std::string to_string( MetalSurfaceCreateFlagBitsEXT ) { return "(void)"; } #endif /*VK_USE_PLATFORM_METAL_EXT*/ //=== VK_KHR_fragment_shading_rate === VULKAN_HPP_INLINE std::string to_string( FragmentShadingRateCombinerOpKHR value ) { switch ( value ) { case FragmentShadingRateCombinerOpKHR::eKeep: return "Keep"; case FragmentShadingRateCombinerOpKHR::eReplace: return "Replace"; case FragmentShadingRateCombinerOpKHR::eMin: return "Min"; case FragmentShadingRateCombinerOpKHR::eMax: return "Max"; case FragmentShadingRateCombinerOpKHR::eMul: return "Mul"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } //=== VK_AMD_shader_core_properties2 === VULKAN_HPP_INLINE std::string to_string( ShaderCorePropertiesFlagBitsAMD ) { return "(void)"; } //=== VK_EXT_validation_features === VULKAN_HPP_INLINE std::string to_string( ValidationFeatureEnableEXT value ) { switch ( value ) { case ValidationFeatureEnableEXT::eGpuAssisted: return "GpuAssisted"; case ValidationFeatureEnableEXT::eGpuAssistedReserveBindingSlot: return "GpuAssistedReserveBindingSlot"; case ValidationFeatureEnableEXT::eBestPractices: return "BestPractices"; case ValidationFeatureEnableEXT::eDebugPrintf: return "DebugPrintf"; case ValidationFeatureEnableEXT::eSynchronizationValidation: return "SynchronizationValidation"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( ValidationFeatureDisableEXT value ) { switch ( value ) { case ValidationFeatureDisableEXT::eAll: return "All"; case ValidationFeatureDisableEXT::eShaders: return "Shaders"; case ValidationFeatureDisableEXT::eThreadSafety: return "ThreadSafety"; case ValidationFeatureDisableEXT::eApiParameters: return "ApiParameters"; case ValidationFeatureDisableEXT::eObjectLifetimes: return "ObjectLifetimes"; case ValidationFeatureDisableEXT::eCoreChecks: return "CoreChecks"; case ValidationFeatureDisableEXT::eUniqueHandles: return "UniqueHandles"; case ValidationFeatureDisableEXT::eShaderValidationCache: return "ShaderValidationCache"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } //=== VK_NV_coverage_reduction_mode === VULKAN_HPP_INLINE std::string to_string( CoverageReductionModeNV value ) { switch ( value ) { case CoverageReductionModeNV::eMerge: return "Merge"; case CoverageReductionModeNV::eTruncate: return "Truncate"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( PipelineCoverageReductionStateCreateFlagBitsNV ) { return "(void)"; } //=== VK_EXT_provoking_vertex === VULKAN_HPP_INLINE std::string to_string( ProvokingVertexModeEXT value ) { switch ( value ) { case ProvokingVertexModeEXT::eFirstVertex: return "FirstVertex"; case ProvokingVertexModeEXT::eLastVertex: return "LastVertex"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } #if defined( VK_USE_PLATFORM_WIN32_KHR ) //=== VK_EXT_full_screen_exclusive === VULKAN_HPP_INLINE std::string to_string( FullScreenExclusiveEXT value ) { switch ( value ) { case FullScreenExclusiveEXT::eDefault: return "Default"; case FullScreenExclusiveEXT::eAllowed: return "Allowed"; case FullScreenExclusiveEXT::eDisallowed: return "Disallowed"; case FullScreenExclusiveEXT::eApplicationControlled: return "ApplicationControlled"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } #endif /*VK_USE_PLATFORM_WIN32_KHR*/ //=== VK_EXT_headless_surface === VULKAN_HPP_INLINE std::string to_string( HeadlessSurfaceCreateFlagBitsEXT ) { return "(void)"; } //=== VK_KHR_pipeline_executable_properties === VULKAN_HPP_INLINE std::string to_string( PipelineExecutableStatisticFormatKHR value ) { switch ( value ) { case PipelineExecutableStatisticFormatKHR::eBool32: return "Bool32"; case PipelineExecutableStatisticFormatKHR::eInt64: return "Int64"; case PipelineExecutableStatisticFormatKHR::eUint64: return "Uint64"; case PipelineExecutableStatisticFormatKHR::eFloat64: return "Float64"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } //=== VK_EXT_surface_maintenance1 === VULKAN_HPP_INLINE std::string to_string( PresentScalingFlagBitsEXT value ) { switch ( value ) { case PresentScalingFlagBitsEXT::eOneToOne: return "OneToOne"; case PresentScalingFlagBitsEXT::eAspectRatioStretch: return "AspectRatioStretch"; case PresentScalingFlagBitsEXT::eStretch: return "Stretch"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( PresentGravityFlagBitsEXT value ) { switch ( value ) { case PresentGravityFlagBitsEXT::eMin: return "Min"; case PresentGravityFlagBitsEXT::eMax: return "Max"; case PresentGravityFlagBitsEXT::eCentered: return "Centered"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } //=== VK_NV_device_generated_commands === VULKAN_HPP_INLINE std::string to_string( IndirectStateFlagBitsNV value ) { switch ( value ) { case IndirectStateFlagBitsNV::eFlagFrontface: return "FlagFrontface"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( IndirectCommandsTokenTypeNV value ) { switch ( value ) { case IndirectCommandsTokenTypeNV::eShaderGroup: return "ShaderGroup"; case IndirectCommandsTokenTypeNV::eStateFlags: return "StateFlags"; case IndirectCommandsTokenTypeNV::eIndexBuffer: return "IndexBuffer"; case IndirectCommandsTokenTypeNV::eVertexBuffer: return "VertexBuffer"; case IndirectCommandsTokenTypeNV::ePushConstant: return "PushConstant"; case IndirectCommandsTokenTypeNV::eDrawIndexed: return "DrawIndexed"; case IndirectCommandsTokenTypeNV::eDraw: return "Draw"; case IndirectCommandsTokenTypeNV::eDrawTasks: return "DrawTasks"; case IndirectCommandsTokenTypeNV::eDrawMeshTasks: return "DrawMeshTasks"; case IndirectCommandsTokenTypeNV::ePipeline: return "Pipeline"; case IndirectCommandsTokenTypeNV::eDispatch: return "Dispatch"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( IndirectCommandsLayoutUsageFlagBitsNV value ) { switch ( value ) { case IndirectCommandsLayoutUsageFlagBitsNV::eExplicitPreprocess: return "ExplicitPreprocess"; case IndirectCommandsLayoutUsageFlagBitsNV::eIndexedSequences: return "IndexedSequences"; case IndirectCommandsLayoutUsageFlagBitsNV::eUnorderedSequences: return "UnorderedSequences"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } //=== VK_EXT_depth_bias_control === VULKAN_HPP_INLINE std::string to_string( DepthBiasRepresentationEXT value ) { switch ( value ) { case DepthBiasRepresentationEXT::eLeastRepresentableValueFormat: return "LeastRepresentableValueFormat"; case DepthBiasRepresentationEXT::eLeastRepresentableValueForceUnorm: return "LeastRepresentableValueForceUnorm"; case DepthBiasRepresentationEXT::eFloat: return "Float"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } //=== VK_EXT_device_memory_report === VULKAN_HPP_INLINE std::string to_string( DeviceMemoryReportEventTypeEXT value ) { switch ( value ) { case DeviceMemoryReportEventTypeEXT::eAllocate: return "Allocate"; case DeviceMemoryReportEventTypeEXT::eFree: return "Free"; case DeviceMemoryReportEventTypeEXT::eImport: return "Import"; case DeviceMemoryReportEventTypeEXT::eUnimport: return "Unimport"; case DeviceMemoryReportEventTypeEXT::eAllocationFailed: return "AllocationFailed"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( DeviceMemoryReportFlagBitsEXT ) { return "(void)"; } //=== VK_KHR_video_encode_queue === VULKAN_HPP_INLINE std::string to_string( VideoEncodeCapabilityFlagBitsKHR value ) { switch ( value ) { case VideoEncodeCapabilityFlagBitsKHR::ePrecedingExternallyEncodedBytes: return "PrecedingExternallyEncodedBytes"; case VideoEncodeCapabilityFlagBitsKHR::eInsufficientBitstreamBufferRangeDetection: return "InsufficientBitstreamBufferRangeDetection"; case VideoEncodeCapabilityFlagBitsKHR::eQuantizationDeltaMap: return "QuantizationDeltaMap"; case VideoEncodeCapabilityFlagBitsKHR::eEmphasisMap: return "EmphasisMap"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( VideoEncodeFeedbackFlagBitsKHR value ) { switch ( value ) { case VideoEncodeFeedbackFlagBitsKHR::eBitstreamBufferOffset: return "BitstreamBufferOffset"; case VideoEncodeFeedbackFlagBitsKHR::eBitstreamBytesWritten: return "BitstreamBytesWritten"; case VideoEncodeFeedbackFlagBitsKHR::eBitstreamHasOverrides: return "BitstreamHasOverrides"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( VideoEncodeUsageFlagBitsKHR value ) { switch ( value ) { case VideoEncodeUsageFlagBitsKHR::eDefault: return "Default"; case VideoEncodeUsageFlagBitsKHR::eTranscoding: return "Transcoding"; case VideoEncodeUsageFlagBitsKHR::eStreaming: return "Streaming"; case VideoEncodeUsageFlagBitsKHR::eRecording: return "Recording"; case VideoEncodeUsageFlagBitsKHR::eConferencing: return "Conferencing"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( VideoEncodeContentFlagBitsKHR value ) { switch ( value ) { case VideoEncodeContentFlagBitsKHR::eDefault: return "Default"; case VideoEncodeContentFlagBitsKHR::eCamera: return "Camera"; case VideoEncodeContentFlagBitsKHR::eDesktop: return "Desktop"; case VideoEncodeContentFlagBitsKHR::eRendered: return "Rendered"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( VideoEncodeTuningModeKHR value ) { switch ( value ) { case VideoEncodeTuningModeKHR::eDefault: return "Default"; case VideoEncodeTuningModeKHR::eHighQuality: return "HighQuality"; case VideoEncodeTuningModeKHR::eLowLatency: return "LowLatency"; case VideoEncodeTuningModeKHR::eUltraLowLatency: return "UltraLowLatency"; case VideoEncodeTuningModeKHR::eLossless: return "Lossless"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( VideoEncodeRateControlModeFlagBitsKHR value ) { switch ( value ) { case VideoEncodeRateControlModeFlagBitsKHR::eDefault: return "Default"; case VideoEncodeRateControlModeFlagBitsKHR::eDisabled: return "Disabled"; case VideoEncodeRateControlModeFlagBitsKHR::eCbr: return "Cbr"; case VideoEncodeRateControlModeFlagBitsKHR::eVbr: return "Vbr"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( VideoEncodeFlagBitsKHR value ) { switch ( value ) { case VideoEncodeFlagBitsKHR::eWithQuantizationDeltaMap: return "WithQuantizationDeltaMap"; case VideoEncodeFlagBitsKHR::eWithEmphasisMap: return "WithEmphasisMap"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( VideoEncodeRateControlFlagBitsKHR ) { return "(void)"; } //=== VK_NV_device_diagnostics_config === VULKAN_HPP_INLINE std::string to_string( DeviceDiagnosticsConfigFlagBitsNV value ) { switch ( value ) { case DeviceDiagnosticsConfigFlagBitsNV::eEnableShaderDebugInfo: return "EnableShaderDebugInfo"; case DeviceDiagnosticsConfigFlagBitsNV::eEnableResourceTracking: return "EnableResourceTracking"; case DeviceDiagnosticsConfigFlagBitsNV::eEnableAutomaticCheckpoints: return "EnableAutomaticCheckpoints"; case DeviceDiagnosticsConfigFlagBitsNV::eEnableShaderErrorReporting: return "EnableShaderErrorReporting"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } #if defined( VK_USE_PLATFORM_METAL_EXT ) //=== VK_EXT_metal_objects === VULKAN_HPP_INLINE std::string to_string( ExportMetalObjectTypeFlagBitsEXT value ) { switch ( value ) { case ExportMetalObjectTypeFlagBitsEXT::eMetalDevice: return "MetalDevice"; case ExportMetalObjectTypeFlagBitsEXT::eMetalCommandQueue: return "MetalCommandQueue"; case ExportMetalObjectTypeFlagBitsEXT::eMetalBuffer: return "MetalBuffer"; case ExportMetalObjectTypeFlagBitsEXT::eMetalTexture: return "MetalTexture"; case ExportMetalObjectTypeFlagBitsEXT::eMetalIosurface: return "MetalIosurface"; case ExportMetalObjectTypeFlagBitsEXT::eMetalSharedEvent: return "MetalSharedEvent"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } #endif /*VK_USE_PLATFORM_METAL_EXT*/ //=== VK_EXT_graphics_pipeline_library === VULKAN_HPP_INLINE std::string to_string( GraphicsPipelineLibraryFlagBitsEXT value ) { switch ( value ) { case GraphicsPipelineLibraryFlagBitsEXT::eVertexInputInterface: return "VertexInputInterface"; case GraphicsPipelineLibraryFlagBitsEXT::ePreRasterizationShaders: return "PreRasterizationShaders"; case GraphicsPipelineLibraryFlagBitsEXT::eFragmentShader: return "FragmentShader"; case GraphicsPipelineLibraryFlagBitsEXT::eFragmentOutputInterface: return "FragmentOutputInterface"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } //=== VK_NV_fragment_shading_rate_enums === VULKAN_HPP_INLINE std::string to_string( FragmentShadingRateNV value ) { switch ( value ) { case FragmentShadingRateNV::e1InvocationPerPixel: return "1InvocationPerPixel"; case FragmentShadingRateNV::e1InvocationPer1X2Pixels: return "1InvocationPer1X2Pixels"; case FragmentShadingRateNV::e1InvocationPer2X1Pixels: return "1InvocationPer2X1Pixels"; case FragmentShadingRateNV::e1InvocationPer2X2Pixels: return "1InvocationPer2X2Pixels"; case FragmentShadingRateNV::e1InvocationPer2X4Pixels: return "1InvocationPer2X4Pixels"; case FragmentShadingRateNV::e1InvocationPer4X2Pixels: return "1InvocationPer4X2Pixels"; case FragmentShadingRateNV::e1InvocationPer4X4Pixels: return "1InvocationPer4X4Pixels"; case FragmentShadingRateNV::e2InvocationsPerPixel: return "2InvocationsPerPixel"; case FragmentShadingRateNV::e4InvocationsPerPixel: return "4InvocationsPerPixel"; case FragmentShadingRateNV::e8InvocationsPerPixel: return "8InvocationsPerPixel"; case FragmentShadingRateNV::e16InvocationsPerPixel: return "16InvocationsPerPixel"; case FragmentShadingRateNV::eNoInvocations: return "NoInvocations"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( FragmentShadingRateTypeNV value ) { switch ( value ) { case FragmentShadingRateTypeNV::eFragmentSize: return "FragmentSize"; case FragmentShadingRateTypeNV::eEnums: return "Enums"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } //=== VK_NV_ray_tracing_motion_blur === VULKAN_HPP_INLINE std::string to_string( AccelerationStructureMotionInstanceTypeNV value ) { switch ( value ) { case AccelerationStructureMotionInstanceTypeNV::eStatic: return "Static"; case AccelerationStructureMotionInstanceTypeNV::eMatrixMotion: return "MatrixMotion"; case AccelerationStructureMotionInstanceTypeNV::eSrtMotion: return "SrtMotion"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( AccelerationStructureMotionInfoFlagBitsNV ) { return "(void)"; } VULKAN_HPP_INLINE std::string to_string( AccelerationStructureMotionInstanceFlagBitsNV ) { return "(void)"; } //=== VK_EXT_image_compression_control === VULKAN_HPP_INLINE std::string to_string( ImageCompressionFlagBitsEXT value ) { switch ( value ) { case ImageCompressionFlagBitsEXT::eDefault: return "Default"; case ImageCompressionFlagBitsEXT::eFixedRateDefault: return "FixedRateDefault"; case ImageCompressionFlagBitsEXT::eFixedRateExplicit: return "FixedRateExplicit"; case ImageCompressionFlagBitsEXT::eDisabled: return "Disabled"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( ImageCompressionFixedRateFlagBitsEXT value ) { switch ( value ) { case ImageCompressionFixedRateFlagBitsEXT::eNone: return "None"; case ImageCompressionFixedRateFlagBitsEXT::e1Bpc: return "1Bpc"; case ImageCompressionFixedRateFlagBitsEXT::e2Bpc: return "2Bpc"; case ImageCompressionFixedRateFlagBitsEXT::e3Bpc: return "3Bpc"; case ImageCompressionFixedRateFlagBitsEXT::e4Bpc: return "4Bpc"; case ImageCompressionFixedRateFlagBitsEXT::e5Bpc: return "5Bpc"; case ImageCompressionFixedRateFlagBitsEXT::e6Bpc: return "6Bpc"; case ImageCompressionFixedRateFlagBitsEXT::e7Bpc: return "7Bpc"; case ImageCompressionFixedRateFlagBitsEXT::e8Bpc: return "8Bpc"; case ImageCompressionFixedRateFlagBitsEXT::e9Bpc: return "9Bpc"; case ImageCompressionFixedRateFlagBitsEXT::e10Bpc: return "10Bpc"; case ImageCompressionFixedRateFlagBitsEXT::e11Bpc: return "11Bpc"; case ImageCompressionFixedRateFlagBitsEXT::e12Bpc: return "12Bpc"; case ImageCompressionFixedRateFlagBitsEXT::e13Bpc: return "13Bpc"; case ImageCompressionFixedRateFlagBitsEXT::e14Bpc: return "14Bpc"; case ImageCompressionFixedRateFlagBitsEXT::e15Bpc: return "15Bpc"; case ImageCompressionFixedRateFlagBitsEXT::e16Bpc: return "16Bpc"; case ImageCompressionFixedRateFlagBitsEXT::e17Bpc: return "17Bpc"; case ImageCompressionFixedRateFlagBitsEXT::e18Bpc: return "18Bpc"; case ImageCompressionFixedRateFlagBitsEXT::e19Bpc: return "19Bpc"; case ImageCompressionFixedRateFlagBitsEXT::e20Bpc: return "20Bpc"; case ImageCompressionFixedRateFlagBitsEXT::e21Bpc: return "21Bpc"; case ImageCompressionFixedRateFlagBitsEXT::e22Bpc: return "22Bpc"; case ImageCompressionFixedRateFlagBitsEXT::e23Bpc: return "23Bpc"; case ImageCompressionFixedRateFlagBitsEXT::e24Bpc: return "24Bpc"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } //=== VK_EXT_device_fault === VULKAN_HPP_INLINE std::string to_string( DeviceFaultAddressTypeEXT value ) { switch ( value ) { case DeviceFaultAddressTypeEXT::eNone: return "None"; case DeviceFaultAddressTypeEXT::eReadInvalid: return "ReadInvalid"; case DeviceFaultAddressTypeEXT::eWriteInvalid: return "WriteInvalid"; case DeviceFaultAddressTypeEXT::eExecuteInvalid: return "ExecuteInvalid"; case DeviceFaultAddressTypeEXT::eInstructionPointerUnknown: return "InstructionPointerUnknown"; case DeviceFaultAddressTypeEXT::eInstructionPointerInvalid: return "InstructionPointerInvalid"; case DeviceFaultAddressTypeEXT::eInstructionPointerFault: return "InstructionPointerFault"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( DeviceFaultVendorBinaryHeaderVersionEXT value ) { switch ( value ) { case DeviceFaultVendorBinaryHeaderVersionEXT::eOne: return "One"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } #if defined( VK_USE_PLATFORM_DIRECTFB_EXT ) //=== VK_EXT_directfb_surface === VULKAN_HPP_INLINE std::string to_string( DirectFBSurfaceCreateFlagBitsEXT ) { return "(void)"; } #endif /*VK_USE_PLATFORM_DIRECTFB_EXT*/ //=== VK_EXT_device_address_binding_report === VULKAN_HPP_INLINE std::string to_string( DeviceAddressBindingFlagBitsEXT value ) { switch ( value ) { case DeviceAddressBindingFlagBitsEXT::eInternalObject: return "InternalObject"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( DeviceAddressBindingTypeEXT value ) { switch ( value ) { case DeviceAddressBindingTypeEXT::eBind: return "Bind"; case DeviceAddressBindingTypeEXT::eUnbind: return "Unbind"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } #if defined( VK_USE_PLATFORM_FUCHSIA ) //=== VK_FUCHSIA_buffer_collection === VULKAN_HPP_INLINE std::string to_string( ImageConstraintsInfoFlagBitsFUCHSIA value ) { switch ( value ) { case ImageConstraintsInfoFlagBitsFUCHSIA::eCpuReadRarely: return "CpuReadRarely"; case ImageConstraintsInfoFlagBitsFUCHSIA::eCpuReadOften: return "CpuReadOften"; case ImageConstraintsInfoFlagBitsFUCHSIA::eCpuWriteRarely: return "CpuWriteRarely"; case ImageConstraintsInfoFlagBitsFUCHSIA::eCpuWriteOften: return "CpuWriteOften"; case ImageConstraintsInfoFlagBitsFUCHSIA::eProtectedOptional: return "ProtectedOptional"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( ImageFormatConstraintsFlagBitsFUCHSIA ) { return "(void)"; } #endif /*VK_USE_PLATFORM_FUCHSIA*/ //=== VK_EXT_frame_boundary === VULKAN_HPP_INLINE std::string to_string( FrameBoundaryFlagBitsEXT value ) { switch ( value ) { case FrameBoundaryFlagBitsEXT::eFrameEnd: return "FrameEnd"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } #if defined( VK_USE_PLATFORM_SCREEN_QNX ) //=== VK_QNX_screen_surface === VULKAN_HPP_INLINE std::string to_string( ScreenSurfaceCreateFlagBitsQNX ) { return "(void)"; } #endif /*VK_USE_PLATFORM_SCREEN_QNX*/ //=== VK_EXT_opacity_micromap === VULKAN_HPP_INLINE std::string to_string( MicromapTypeEXT value ) { switch ( value ) { case MicromapTypeEXT::eOpacityMicromap: return "OpacityMicromap"; #if defined( VK_ENABLE_BETA_EXTENSIONS ) case MicromapTypeEXT::eDisplacementMicromapNV: return "DisplacementMicromapNV"; #endif /*VK_ENABLE_BETA_EXTENSIONS*/ default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( BuildMicromapFlagBitsEXT value ) { switch ( value ) { case BuildMicromapFlagBitsEXT::ePreferFastTrace: return "PreferFastTrace"; case BuildMicromapFlagBitsEXT::ePreferFastBuild: return "PreferFastBuild"; case BuildMicromapFlagBitsEXT::eAllowCompaction: return "AllowCompaction"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( CopyMicromapModeEXT value ) { switch ( value ) { case CopyMicromapModeEXT::eClone: return "Clone"; case CopyMicromapModeEXT::eSerialize: return "Serialize"; case CopyMicromapModeEXT::eDeserialize: return "Deserialize"; case CopyMicromapModeEXT::eCompact: return "Compact"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( MicromapCreateFlagBitsEXT value ) { switch ( value ) { case MicromapCreateFlagBitsEXT::eDeviceAddressCaptureReplay: return "DeviceAddressCaptureReplay"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( BuildMicromapModeEXT value ) { switch ( value ) { case BuildMicromapModeEXT::eBuild: return "Build"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( OpacityMicromapFormatEXT value ) { switch ( value ) { case OpacityMicromapFormatEXT::e2State: return "2State"; case OpacityMicromapFormatEXT::e4State: return "4State"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( OpacityMicromapSpecialIndexEXT value ) { switch ( value ) { case OpacityMicromapSpecialIndexEXT::eFullyTransparent: return "FullyTransparent"; case OpacityMicromapSpecialIndexEXT::eFullyOpaque: return "FullyOpaque"; case OpacityMicromapSpecialIndexEXT::eFullyUnknownTransparent: return "FullyUnknownTransparent"; case OpacityMicromapSpecialIndexEXT::eFullyUnknownOpaque: return "FullyUnknownOpaque"; case OpacityMicromapSpecialIndexEXT::eClusterGeometryDisableOpacityMicromapNV: return "ClusterGeometryDisableOpacityMicromapNV"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } #if defined( VK_ENABLE_BETA_EXTENSIONS ) //=== VK_NV_displacement_micromap === VULKAN_HPP_INLINE std::string to_string( DisplacementMicromapFormatNV value ) { switch ( value ) { case DisplacementMicromapFormatNV::e64Triangles64Bytes: return "64Triangles64Bytes"; case DisplacementMicromapFormatNV::e256Triangles128Bytes: return "256Triangles128Bytes"; case DisplacementMicromapFormatNV::e1024Triangles128Bytes: return "1024Triangles128Bytes"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } #endif /*VK_ENABLE_BETA_EXTENSIONS*/ //=== VK_ARM_scheduling_controls === VULKAN_HPP_INLINE std::string to_string( PhysicalDeviceSchedulingControlsFlagBitsARM value ) { switch ( value ) { case PhysicalDeviceSchedulingControlsFlagBitsARM::eShaderCoreCount: return "ShaderCoreCount"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } //=== VK_NV_memory_decompression === VULKAN_HPP_INLINE std::string to_string( MemoryDecompressionMethodFlagBitsNV value ) { switch ( value ) { case MemoryDecompressionMethodFlagBitsNV::eGdeflate10: return "Gdeflate10"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } //=== VK_NV_ray_tracing_linear_swept_spheres === VULKAN_HPP_INLINE std::string to_string( RayTracingLssIndexingModeNV value ) { switch ( value ) { case RayTracingLssIndexingModeNV::eList: return "List"; case RayTracingLssIndexingModeNV::eSuccessive: return "Successive"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( RayTracingLssPrimitiveEndCapsModeNV value ) { switch ( value ) { case RayTracingLssPrimitiveEndCapsModeNV::eNone: return "None"; case RayTracingLssPrimitiveEndCapsModeNV::eChained: return "Chained"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } //=== VK_EXT_subpass_merge_feedback === VULKAN_HPP_INLINE std::string to_string( SubpassMergeStatusEXT value ) { switch ( value ) { case SubpassMergeStatusEXT::eMerged: return "Merged"; case SubpassMergeStatusEXT::eDisallowed: return "Disallowed"; case SubpassMergeStatusEXT::eNotMergedSideEffects: return "NotMergedSideEffects"; case SubpassMergeStatusEXT::eNotMergedSamplesMismatch: return "NotMergedSamplesMismatch"; case SubpassMergeStatusEXT::eNotMergedViewsMismatch: return "NotMergedViewsMismatch"; case SubpassMergeStatusEXT::eNotMergedAliasing: return "NotMergedAliasing"; case SubpassMergeStatusEXT::eNotMergedDependencies: return "NotMergedDependencies"; case SubpassMergeStatusEXT::eNotMergedIncompatibleInputAttachment: return "NotMergedIncompatibleInputAttachment"; case SubpassMergeStatusEXT::eNotMergedTooManyAttachments: return "NotMergedTooManyAttachments"; case SubpassMergeStatusEXT::eNotMergedInsufficientStorage: return "NotMergedInsufficientStorage"; case SubpassMergeStatusEXT::eNotMergedDepthStencilCount: return "NotMergedDepthStencilCount"; case SubpassMergeStatusEXT::eNotMergedResolveAttachmentReuse: return "NotMergedResolveAttachmentReuse"; case SubpassMergeStatusEXT::eNotMergedSingleSubpass: return "NotMergedSingleSubpass"; case SubpassMergeStatusEXT::eNotMergedUnspecified: return "NotMergedUnspecified"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } //=== VK_LUNARG_direct_driver_loading === VULKAN_HPP_INLINE std::string to_string( DirectDriverLoadingModeLUNARG value ) { switch ( value ) { case DirectDriverLoadingModeLUNARG::eExclusive: return "Exclusive"; case DirectDriverLoadingModeLUNARG::eInclusive: return "Inclusive"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( DirectDriverLoadingFlagBitsLUNARG ) { return "(void)"; } //=== VK_NV_optical_flow === VULKAN_HPP_INLINE std::string to_string( OpticalFlowUsageFlagBitsNV value ) { switch ( value ) { case OpticalFlowUsageFlagBitsNV::eUnknown: return "Unknown"; case OpticalFlowUsageFlagBitsNV::eInput: return "Input"; case OpticalFlowUsageFlagBitsNV::eOutput: return "Output"; case OpticalFlowUsageFlagBitsNV::eHint: return "Hint"; case OpticalFlowUsageFlagBitsNV::eCost: return "Cost"; case OpticalFlowUsageFlagBitsNV::eGlobalFlow: return "GlobalFlow"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( OpticalFlowGridSizeFlagBitsNV value ) { switch ( value ) { case OpticalFlowGridSizeFlagBitsNV::eUnknown: return "Unknown"; case OpticalFlowGridSizeFlagBitsNV::e1X1: return "1X1"; case OpticalFlowGridSizeFlagBitsNV::e2X2: return "2X2"; case OpticalFlowGridSizeFlagBitsNV::e4X4: return "4X4"; case OpticalFlowGridSizeFlagBitsNV::e8X8: return "8X8"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( OpticalFlowPerformanceLevelNV value ) { switch ( value ) { case OpticalFlowPerformanceLevelNV::eUnknown: return "Unknown"; case OpticalFlowPerformanceLevelNV::eSlow: return "Slow"; case OpticalFlowPerformanceLevelNV::eMedium: return "Medium"; case OpticalFlowPerformanceLevelNV::eFast: return "Fast"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( OpticalFlowSessionBindingPointNV value ) { switch ( value ) { case OpticalFlowSessionBindingPointNV::eUnknown: return "Unknown"; case OpticalFlowSessionBindingPointNV::eInput: return "Input"; case OpticalFlowSessionBindingPointNV::eReference: return "Reference"; case OpticalFlowSessionBindingPointNV::eHint: return "Hint"; case OpticalFlowSessionBindingPointNV::eFlowVector: return "FlowVector"; case OpticalFlowSessionBindingPointNV::eBackwardFlowVector: return "BackwardFlowVector"; case OpticalFlowSessionBindingPointNV::eCost: return "Cost"; case OpticalFlowSessionBindingPointNV::eBackwardCost: return "BackwardCost"; case OpticalFlowSessionBindingPointNV::eGlobalFlow: return "GlobalFlow"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( OpticalFlowSessionCreateFlagBitsNV value ) { switch ( value ) { case OpticalFlowSessionCreateFlagBitsNV::eEnableHint: return "EnableHint"; case OpticalFlowSessionCreateFlagBitsNV::eEnableCost: return "EnableCost"; case OpticalFlowSessionCreateFlagBitsNV::eEnableGlobalFlow: return "EnableGlobalFlow"; case OpticalFlowSessionCreateFlagBitsNV::eAllowRegions: return "AllowRegions"; case OpticalFlowSessionCreateFlagBitsNV::eBothDirections: return "BothDirections"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( OpticalFlowExecuteFlagBitsNV value ) { switch ( value ) { case OpticalFlowExecuteFlagBitsNV::eDisableTemporalHints: return "DisableTemporalHints"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } //=== VK_AMD_anti_lag === VULKAN_HPP_INLINE std::string to_string( AntiLagModeAMD value ) { switch ( value ) { case AntiLagModeAMD::eDriverControl: return "DriverControl"; case AntiLagModeAMD::eOn: return "On"; case AntiLagModeAMD::eOff: return "Off"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( AntiLagStageAMD value ) { switch ( value ) { case AntiLagStageAMD::eInput: return "Input"; case AntiLagStageAMD::ePresent: return "Present"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } //=== VK_EXT_shader_object === VULKAN_HPP_INLINE std::string to_string( ShaderCreateFlagBitsEXT value ) { switch ( value ) { case ShaderCreateFlagBitsEXT::eLinkStage: return "LinkStage"; case ShaderCreateFlagBitsEXT::eAllowVaryingSubgroupSize: return "AllowVaryingSubgroupSize"; case ShaderCreateFlagBitsEXT::eRequireFullSubgroups: return "RequireFullSubgroups"; case ShaderCreateFlagBitsEXT::eNoTaskShader: return "NoTaskShader"; case ShaderCreateFlagBitsEXT::eDispatchBase: return "DispatchBase"; case ShaderCreateFlagBitsEXT::eFragmentShadingRateAttachment: return "FragmentShadingRateAttachment"; case ShaderCreateFlagBitsEXT::eFragmentDensityMapAttachment: return "FragmentDensityMapAttachment"; case ShaderCreateFlagBitsEXT::eIndirectBindable: return "IndirectBindable"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( ShaderCodeTypeEXT value ) { switch ( value ) { case ShaderCodeTypeEXT::eBinary: return "Binary"; case ShaderCodeTypeEXT::eSpirv: return "Spirv"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } //=== VK_NV_ray_tracing_invocation_reorder === VULKAN_HPP_INLINE std::string to_string( RayTracingInvocationReorderModeNV value ) { switch ( value ) { case RayTracingInvocationReorderModeNV::eNone: return "None"; case RayTracingInvocationReorderModeNV::eReorder: return "Reorder"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } //=== VK_NV_cooperative_vector === VULKAN_HPP_INLINE std::string to_string( CooperativeVectorMatrixLayoutNV value ) { switch ( value ) { case CooperativeVectorMatrixLayoutNV::eRowMajor: return "RowMajor"; case CooperativeVectorMatrixLayoutNV::eColumnMajor: return "ColumnMajor"; case CooperativeVectorMatrixLayoutNV::eInferencingOptimal: return "InferencingOptimal"; case CooperativeVectorMatrixLayoutNV::eTrainingOptimal: return "TrainingOptimal"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( ComponentTypeKHR value ) { switch ( value ) { case ComponentTypeKHR::eFloat16: return "Float16"; case ComponentTypeKHR::eFloat32: return "Float32"; case ComponentTypeKHR::eFloat64: return "Float64"; case ComponentTypeKHR::eSint8: return "Sint8"; case ComponentTypeKHR::eSint16: return "Sint16"; case ComponentTypeKHR::eSint32: return "Sint32"; case ComponentTypeKHR::eSint64: return "Sint64"; case ComponentTypeKHR::eUint8: return "Uint8"; case ComponentTypeKHR::eUint16: return "Uint16"; case ComponentTypeKHR::eUint32: return "Uint32"; case ComponentTypeKHR::eUint64: return "Uint64"; case ComponentTypeKHR::eSint8PackedNV: return "Sint8PackedNV"; case ComponentTypeKHR::eUint8PackedNV: return "Uint8PackedNV"; case ComponentTypeKHR::eFloatE4M3NV: return "FloatE4M3NV"; case ComponentTypeKHR::eFloatE5M2NV: return "FloatE5M2NV"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } //=== VK_EXT_layer_settings === VULKAN_HPP_INLINE std::string to_string( LayerSettingTypeEXT value ) { switch ( value ) { case LayerSettingTypeEXT::eBool32: return "Bool32"; case LayerSettingTypeEXT::eInt32: return "Int32"; case LayerSettingTypeEXT::eInt64: return "Int64"; case LayerSettingTypeEXT::eUint32: return "Uint32"; case LayerSettingTypeEXT::eUint64: return "Uint64"; case LayerSettingTypeEXT::eFloat32: return "Float32"; case LayerSettingTypeEXT::eFloat64: return "Float64"; case LayerSettingTypeEXT::eString: return "String"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } //=== VK_NV_low_latency2 === VULKAN_HPP_INLINE std::string to_string( LatencyMarkerNV value ) { switch ( value ) { case LatencyMarkerNV::eSimulationStart: return "SimulationStart"; case LatencyMarkerNV::eSimulationEnd: return "SimulationEnd"; case LatencyMarkerNV::eRendersubmitStart: return "RendersubmitStart"; case LatencyMarkerNV::eRendersubmitEnd: return "RendersubmitEnd"; case LatencyMarkerNV::ePresentStart: return "PresentStart"; case LatencyMarkerNV::ePresentEnd: return "PresentEnd"; case LatencyMarkerNV::eInputSample: return "InputSample"; case LatencyMarkerNV::eTriggerFlash: return "TriggerFlash"; case LatencyMarkerNV::eOutOfBandRendersubmitStart: return "OutOfBandRendersubmitStart"; case LatencyMarkerNV::eOutOfBandRendersubmitEnd: return "OutOfBandRendersubmitEnd"; case LatencyMarkerNV::eOutOfBandPresentStart: return "OutOfBandPresentStart"; case LatencyMarkerNV::eOutOfBandPresentEnd: return "OutOfBandPresentEnd"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( OutOfBandQueueTypeNV value ) { switch ( value ) { case OutOfBandQueueTypeNV::eRender: return "Render"; case OutOfBandQueueTypeNV::ePresent: return "Present"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } //=== VK_KHR_cooperative_matrix === VULKAN_HPP_INLINE std::string to_string( ScopeKHR value ) { switch ( value ) { case ScopeKHR::eDevice: return "Device"; case ScopeKHR::eWorkgroup: return "Workgroup"; case ScopeKHR::eSubgroup: return "Subgroup"; case ScopeKHR::eQueueFamily: return "QueueFamily"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } //=== VK_KHR_video_encode_av1 === VULKAN_HPP_INLINE std::string to_string( VideoEncodeAV1PredictionModeKHR value ) { switch ( value ) { case VideoEncodeAV1PredictionModeKHR::eIntraOnly: return "IntraOnly"; case VideoEncodeAV1PredictionModeKHR::eSingleReference: return "SingleReference"; case VideoEncodeAV1PredictionModeKHR::eUnidirectionalCompound: return "UnidirectionalCompound"; case VideoEncodeAV1PredictionModeKHR::eBidirectionalCompound: return "BidirectionalCompound"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( VideoEncodeAV1RateControlGroupKHR value ) { switch ( value ) { case VideoEncodeAV1RateControlGroupKHR::eIntra: return "Intra"; case VideoEncodeAV1RateControlGroupKHR::ePredictive: return "Predictive"; case VideoEncodeAV1RateControlGroupKHR::eBipredictive: return "Bipredictive"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( VideoEncodeAV1CapabilityFlagBitsKHR value ) { switch ( value ) { case VideoEncodeAV1CapabilityFlagBitsKHR::ePerRateControlGroupMinMaxQIndex: return "PerRateControlGroupMinMaxQIndex"; case VideoEncodeAV1CapabilityFlagBitsKHR::eGenerateObuExtensionHeader: return "GenerateObuExtensionHeader"; case VideoEncodeAV1CapabilityFlagBitsKHR::ePrimaryReferenceCdfOnly: return "PrimaryReferenceCdfOnly"; case VideoEncodeAV1CapabilityFlagBitsKHR::eFrameSizeOverride: return "FrameSizeOverride"; case VideoEncodeAV1CapabilityFlagBitsKHR::eMotionVectorScaling: return "MotionVectorScaling"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( VideoEncodeAV1StdFlagBitsKHR value ) { switch ( value ) { case VideoEncodeAV1StdFlagBitsKHR::eUniformTileSpacingFlagSet: return "UniformTileSpacingFlagSet"; case VideoEncodeAV1StdFlagBitsKHR::eSkipModePresentUnset: return "SkipModePresentUnset"; case VideoEncodeAV1StdFlagBitsKHR::ePrimaryRefFrame: return "PrimaryRefFrame"; case VideoEncodeAV1StdFlagBitsKHR::eDeltaQ: return "DeltaQ"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( VideoEncodeAV1SuperblockSizeFlagBitsKHR value ) { switch ( value ) { case VideoEncodeAV1SuperblockSizeFlagBitsKHR::e64: return "64"; case VideoEncodeAV1SuperblockSizeFlagBitsKHR::e128: return "128"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( VideoEncodeAV1RateControlFlagBitsKHR value ) { switch ( value ) { case VideoEncodeAV1RateControlFlagBitsKHR::eRegularGop: return "RegularGop"; case VideoEncodeAV1RateControlFlagBitsKHR::eTemporalLayerPatternDyadic: return "TemporalLayerPatternDyadic"; case VideoEncodeAV1RateControlFlagBitsKHR::eReferencePatternFlat: return "ReferencePatternFlat"; case VideoEncodeAV1RateControlFlagBitsKHR::eReferencePatternDyadic: return "ReferencePatternDyadic"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } //=== VK_QCOM_image_processing2 === VULKAN_HPP_INLINE std::string to_string( BlockMatchWindowCompareModeQCOM value ) { switch ( value ) { case BlockMatchWindowCompareModeQCOM::eMin: return "Min"; case BlockMatchWindowCompareModeQCOM::eMax: return "Max"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } //=== VK_QCOM_filter_cubic_weights === VULKAN_HPP_INLINE std::string to_string( CubicFilterWeightsQCOM value ) { switch ( value ) { case CubicFilterWeightsQCOM::eCatmullRom: return "CatmullRom"; case CubicFilterWeightsQCOM::eZeroTangentCardinal: return "ZeroTangentCardinal"; case CubicFilterWeightsQCOM::eBSpline: return "BSpline"; case CubicFilterWeightsQCOM::eMitchellNetravali: return "MitchellNetravali"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } //=== VK_MSFT_layered_driver === VULKAN_HPP_INLINE std::string to_string( LayeredDriverUnderlyingApiMSFT value ) { switch ( value ) { case LayeredDriverUnderlyingApiMSFT::eNone: return "None"; case LayeredDriverUnderlyingApiMSFT::eD3D12: return "D3D12"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } //=== VK_KHR_calibrated_timestamps === VULKAN_HPP_INLINE std::string to_string( TimeDomainKHR value ) { switch ( value ) { case TimeDomainKHR::eDevice: return "Device"; case TimeDomainKHR::eClockMonotonic: return "ClockMonotonic"; case TimeDomainKHR::eClockMonotonicRaw: return "ClockMonotonicRaw"; case TimeDomainKHR::eQueryPerformanceCounter: return "QueryPerformanceCounter"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } //=== VK_NV_display_stereo === VULKAN_HPP_INLINE std::string to_string( DisplaySurfaceStereoTypeNV value ) { switch ( value ) { case DisplaySurfaceStereoTypeNV::eNone: return "None"; case DisplaySurfaceStereoTypeNV::eOnboardDin: return "OnboardDin"; case DisplaySurfaceStereoTypeNV::eHdmi3D: return "Hdmi3D"; case DisplaySurfaceStereoTypeNV::eInbandDisplayport: return "InbandDisplayport"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } //=== VK_KHR_maintenance7 === VULKAN_HPP_INLINE std::string to_string( PhysicalDeviceLayeredApiKHR value ) { switch ( value ) { case PhysicalDeviceLayeredApiKHR::eVulkan: return "Vulkan"; case PhysicalDeviceLayeredApiKHR::eD3D12: return "D3D12"; case PhysicalDeviceLayeredApiKHR::eMetal: return "Metal"; case PhysicalDeviceLayeredApiKHR::eOpengl: return "Opengl"; case PhysicalDeviceLayeredApiKHR::eOpengles: return "Opengles"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } //=== VK_NV_cluster_acceleration_structure === VULKAN_HPP_INLINE std::string to_string( ClusterAccelerationStructureClusterFlagBitsNV value ) { switch ( value ) { case ClusterAccelerationStructureClusterFlagBitsNV::eAllowDisableOpacityMicromaps: return "AllowDisableOpacityMicromaps"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( ClusterAccelerationStructureGeometryFlagBitsNV value ) { switch ( value ) { case ClusterAccelerationStructureGeometryFlagBitsNV::eCullDisable: return "CullDisable"; case ClusterAccelerationStructureGeometryFlagBitsNV::eNoDuplicateAnyhitInvocation: return "NoDuplicateAnyhitInvocation"; case ClusterAccelerationStructureGeometryFlagBitsNV::eOpaque: return "Opaque"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( ClusterAccelerationStructureAddressResolutionFlagBitsNV value ) { switch ( value ) { case ClusterAccelerationStructureAddressResolutionFlagBitsNV::eIndirectedDstImplicitData: return "IndirectedDstImplicitData"; case ClusterAccelerationStructureAddressResolutionFlagBitsNV::eIndirectedScratchData: return "IndirectedScratchData"; case ClusterAccelerationStructureAddressResolutionFlagBitsNV::eIndirectedDstAddressArray: return "IndirectedDstAddressArray"; case ClusterAccelerationStructureAddressResolutionFlagBitsNV::eIndirectedDstSizesArray: return "IndirectedDstSizesArray"; case ClusterAccelerationStructureAddressResolutionFlagBitsNV::eIndirectedSrcInfosArray: return "IndirectedSrcInfosArray"; case ClusterAccelerationStructureAddressResolutionFlagBitsNV::eIndirectedSrcInfosCount: return "IndirectedSrcInfosCount"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( ClusterAccelerationStructureIndexFormatFlagBitsNV value ) { switch ( value ) { case ClusterAccelerationStructureIndexFormatFlagBitsNV::e8: return "8"; case ClusterAccelerationStructureIndexFormatFlagBitsNV::e16: return "16"; case ClusterAccelerationStructureIndexFormatFlagBitsNV::e32: return "32"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( ClusterAccelerationStructureTypeNV value ) { switch ( value ) { case ClusterAccelerationStructureTypeNV::eClustersBottomLevel: return "ClustersBottomLevel"; case ClusterAccelerationStructureTypeNV::eTriangleCluster: return "TriangleCluster"; case ClusterAccelerationStructureTypeNV::eTriangleClusterTemplate: return "TriangleClusterTemplate"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( ClusterAccelerationStructureOpTypeNV value ) { switch ( value ) { case ClusterAccelerationStructureOpTypeNV::eMoveObjects: return "MoveObjects"; case ClusterAccelerationStructureOpTypeNV::eBuildClustersBottomLevel: return "BuildClustersBottomLevel"; case ClusterAccelerationStructureOpTypeNV::eBuildTriangleCluster: return "BuildTriangleCluster"; case ClusterAccelerationStructureOpTypeNV::eBuildTriangleClusterTemplate: return "BuildTriangleClusterTemplate"; case ClusterAccelerationStructureOpTypeNV::eInstantiateTriangleCluster: return "InstantiateTriangleCluster"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( ClusterAccelerationStructureOpModeNV value ) { switch ( value ) { case ClusterAccelerationStructureOpModeNV::eImplicitDestinations: return "ImplicitDestinations"; case ClusterAccelerationStructureOpModeNV::eExplicitDestinations: return "ExplicitDestinations"; case ClusterAccelerationStructureOpModeNV::eComputeSizes: return "ComputeSizes"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } //=== VK_NV_partitioned_acceleration_structure === VULKAN_HPP_INLINE std::string to_string( PartitionedAccelerationStructureOpTypeNV value ) { switch ( value ) { case PartitionedAccelerationStructureOpTypeNV::eWriteInstance: return "WriteInstance"; case PartitionedAccelerationStructureOpTypeNV::eUpdateInstance: return "UpdateInstance"; case PartitionedAccelerationStructureOpTypeNV::eWritePartitionTranslation: return "WritePartitionTranslation"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( PartitionedAccelerationStructureInstanceFlagBitsNV value ) { switch ( value ) { case PartitionedAccelerationStructureInstanceFlagBitsNV::eFlagTriangleFacingCullDisable: return "FlagTriangleFacingCullDisable"; case PartitionedAccelerationStructureInstanceFlagBitsNV::eFlagTriangleFlipFacing: return "FlagTriangleFlipFacing"; case PartitionedAccelerationStructureInstanceFlagBitsNV::eFlagForceOpaque: return "FlagForceOpaque"; case PartitionedAccelerationStructureInstanceFlagBitsNV::eFlagForceNoOpaque: return "FlagForceNoOpaque"; case PartitionedAccelerationStructureInstanceFlagBitsNV::eFlagEnableExplicitBoundingBox: return "FlagEnableExplicitBoundingBox"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } //=== VK_EXT_device_generated_commands === VULKAN_HPP_INLINE std::string to_string( IndirectCommandsTokenTypeEXT value ) { switch ( value ) { case IndirectCommandsTokenTypeEXT::eExecutionSet: return "ExecutionSet"; case IndirectCommandsTokenTypeEXT::ePushConstant: return "PushConstant"; case IndirectCommandsTokenTypeEXT::eSequenceIndex: return "SequenceIndex"; case IndirectCommandsTokenTypeEXT::eIndexBuffer: return "IndexBuffer"; case IndirectCommandsTokenTypeEXT::eVertexBuffer: return "VertexBuffer"; case IndirectCommandsTokenTypeEXT::eDrawIndexed: return "DrawIndexed"; case IndirectCommandsTokenTypeEXT::eDraw: return "Draw"; case IndirectCommandsTokenTypeEXT::eDrawIndexedCount: return "DrawIndexedCount"; case IndirectCommandsTokenTypeEXT::eDrawCount: return "DrawCount"; case IndirectCommandsTokenTypeEXT::eDispatch: return "Dispatch"; case IndirectCommandsTokenTypeEXT::eDrawMeshTasksNV: return "DrawMeshTasksNV"; case IndirectCommandsTokenTypeEXT::eDrawMeshTasksCountNV: return "DrawMeshTasksCountNV"; case IndirectCommandsTokenTypeEXT::eDrawMeshTasks: return "DrawMeshTasks"; case IndirectCommandsTokenTypeEXT::eDrawMeshTasksCount: return "DrawMeshTasksCount"; case IndirectCommandsTokenTypeEXT::eTraceRays2: return "TraceRays2"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( IndirectExecutionSetInfoTypeEXT value ) { switch ( value ) { case IndirectExecutionSetInfoTypeEXT::ePipelines: return "Pipelines"; case IndirectExecutionSetInfoTypeEXT::eShaderObjects: return "ShaderObjects"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( IndirectCommandsLayoutUsageFlagBitsEXT value ) { switch ( value ) { case IndirectCommandsLayoutUsageFlagBitsEXT::eExplicitPreprocess: return "ExplicitPreprocess"; case IndirectCommandsLayoutUsageFlagBitsEXT::eUnorderedSequences: return "UnorderedSequences"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } VULKAN_HPP_INLINE std::string to_string( IndirectCommandsInputModeFlagBitsEXT value ) { switch ( value ) { case IndirectCommandsInputModeFlagBitsEXT::eVulkanIndexBuffer: return "VulkanIndexBuffer"; case IndirectCommandsInputModeFlagBitsEXT::eDxgiIndexBuffer: return "DxgiIndexBuffer"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } //=== VK_KHR_maintenance8 === VULKAN_HPP_INLINE std::string to_string( AccessFlagBits3KHR value ) { switch ( value ) { case AccessFlagBits3KHR::eNone: return "None"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } //=== VK_EXT_depth_clamp_control === VULKAN_HPP_INLINE std::string to_string( DepthClampModeEXT value ) { switch ( value ) { case DepthClampModeEXT::eViewportRange: return "ViewportRange"; case DepthClampModeEXT::eUserDefinedRange: return "UserDefinedRange"; default: return "invalid ( " + VULKAN_HPP_NAMESPACE::toHexString( static_cast( value ) ) + " )"; } } } // namespace VULKAN_HPP_NAMESPACE #if defined( __clang__ ) || defined( __GNUC__ ) # pragma GCC diagnostic pop #elif defined( _MSC_VER ) # pragma warning( pop ) #endif #endif ================================================ FILE: src/libraries/vulkanheaders/vulkan_vi.h ================================================ #ifndef VULKAN_VI_H_ #define VULKAN_VI_H_ 1 /* ** Copyright 2015-2025 The Khronos Group Inc. ** ** SPDX-License-Identifier: Apache-2.0 */ /* ** This header is generated from the Khronos Vulkan XML API Registry. ** */ #ifdef __cplusplus extern "C" { #endif // VK_NN_vi_surface is a preprocessor guard. Do not pass it to API calls. #define VK_NN_vi_surface 1 #define VK_NN_VI_SURFACE_SPEC_VERSION 1 #define VK_NN_VI_SURFACE_EXTENSION_NAME "VK_NN_vi_surface" typedef VkFlags VkViSurfaceCreateFlagsNN; typedef struct VkViSurfaceCreateInfoNN { VkStructureType sType; const void* pNext; VkViSurfaceCreateFlagsNN flags; void* window; } VkViSurfaceCreateInfoNN; typedef VkResult (VKAPI_PTR *PFN_vkCreateViSurfaceNN)(VkInstance instance, const VkViSurfaceCreateInfoNN* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkCreateViSurfaceNN( VkInstance instance, const VkViSurfaceCreateInfoNN* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); #endif #ifdef __cplusplus } #endif #endif ================================================ FILE: src/libraries/vulkanheaders/vulkan_video.hpp ================================================ // Copyright 2021-2025 The Khronos Group Inc. // SPDX-License-Identifier: Apache-2.0 OR MIT // // This header is generated from the Khronos Vulkan XML API Registry. #ifndef VULKAN_VIDEO_HPP #define VULKAN_VIDEO_HPP // clang-format off #include // clang-format on #include #include #if ( 301 < VK_HEADER_VERSION ) # include #endif #include #include #include #include #include #include #include #if !defined( VULKAN_HPP_VIDEO_NAMESPACE ) # define VULKAN_HPP_VIDEO_NAMESPACE video #endif namespace VULKAN_HPP_NAMESPACE { namespace VULKAN_HPP_VIDEO_NAMESPACE { //============= //=== ENUMs === //============= //=== vulkan_video_codec_h264std === enum class H264ChromaFormatIdc { eMonochrome = STD_VIDEO_H264_CHROMA_FORMAT_IDC_MONOCHROME, e420 = STD_VIDEO_H264_CHROMA_FORMAT_IDC_420, e422 = STD_VIDEO_H264_CHROMA_FORMAT_IDC_422, e444 = STD_VIDEO_H264_CHROMA_FORMAT_IDC_444, eInvalid = STD_VIDEO_H264_CHROMA_FORMAT_IDC_INVALID }; enum class H264ProfileIdc { eBaseline = STD_VIDEO_H264_PROFILE_IDC_BASELINE, eMain = STD_VIDEO_H264_PROFILE_IDC_MAIN, eHigh = STD_VIDEO_H264_PROFILE_IDC_HIGH, eHigh444Predictive = STD_VIDEO_H264_PROFILE_IDC_HIGH_444_PREDICTIVE, eInvalid = STD_VIDEO_H264_PROFILE_IDC_INVALID }; enum class H264LevelIdc { e1_0 = STD_VIDEO_H264_LEVEL_IDC_1_0, e1_1 = STD_VIDEO_H264_LEVEL_IDC_1_1, e1_2 = STD_VIDEO_H264_LEVEL_IDC_1_2, e1_3 = STD_VIDEO_H264_LEVEL_IDC_1_3, e2_0 = STD_VIDEO_H264_LEVEL_IDC_2_0, e2_1 = STD_VIDEO_H264_LEVEL_IDC_2_1, e2_2 = STD_VIDEO_H264_LEVEL_IDC_2_2, e3_0 = STD_VIDEO_H264_LEVEL_IDC_3_0, e3_1 = STD_VIDEO_H264_LEVEL_IDC_3_1, e3_2 = STD_VIDEO_H264_LEVEL_IDC_3_2, e4_0 = STD_VIDEO_H264_LEVEL_IDC_4_0, e4_1 = STD_VIDEO_H264_LEVEL_IDC_4_1, e4_2 = STD_VIDEO_H264_LEVEL_IDC_4_2, e5_0 = STD_VIDEO_H264_LEVEL_IDC_5_0, e5_1 = STD_VIDEO_H264_LEVEL_IDC_5_1, e5_2 = STD_VIDEO_H264_LEVEL_IDC_5_2, e6_0 = STD_VIDEO_H264_LEVEL_IDC_6_0, e6_1 = STD_VIDEO_H264_LEVEL_IDC_6_1, e6_2 = STD_VIDEO_H264_LEVEL_IDC_6_2, eInvalid = STD_VIDEO_H264_LEVEL_IDC_INVALID }; enum class H264PocType { e0 = STD_VIDEO_H264_POC_TYPE_0, e1 = STD_VIDEO_H264_POC_TYPE_1, e2 = STD_VIDEO_H264_POC_TYPE_2, eInvalid = STD_VIDEO_H264_POC_TYPE_INVALID }; enum class H264AspectRatioIdc { eUnspecified = STD_VIDEO_H264_ASPECT_RATIO_IDC_UNSPECIFIED, eSquare = STD_VIDEO_H264_ASPECT_RATIO_IDC_SQUARE, e12_11 = STD_VIDEO_H264_ASPECT_RATIO_IDC_12_11, e10_11 = STD_VIDEO_H264_ASPECT_RATIO_IDC_10_11, e16_11 = STD_VIDEO_H264_ASPECT_RATIO_IDC_16_11, e40_33 = STD_VIDEO_H264_ASPECT_RATIO_IDC_40_33, e24_11 = STD_VIDEO_H264_ASPECT_RATIO_IDC_24_11, e20_11 = STD_VIDEO_H264_ASPECT_RATIO_IDC_20_11, e32_11 = STD_VIDEO_H264_ASPECT_RATIO_IDC_32_11, e80_33 = STD_VIDEO_H264_ASPECT_RATIO_IDC_80_33, e18_11 = STD_VIDEO_H264_ASPECT_RATIO_IDC_18_11, e15_11 = STD_VIDEO_H264_ASPECT_RATIO_IDC_15_11, e64_33 = STD_VIDEO_H264_ASPECT_RATIO_IDC_64_33, e160_99 = STD_VIDEO_H264_ASPECT_RATIO_IDC_160_99, e4_3 = STD_VIDEO_H264_ASPECT_RATIO_IDC_4_3, e3_2 = STD_VIDEO_H264_ASPECT_RATIO_IDC_3_2, e2_1 = STD_VIDEO_H264_ASPECT_RATIO_IDC_2_1, eExtendedSar = STD_VIDEO_H264_ASPECT_RATIO_IDC_EXTENDED_SAR, eInvalid = STD_VIDEO_H264_ASPECT_RATIO_IDC_INVALID }; enum class H264WeightedBipredIdc { eDefault = STD_VIDEO_H264_WEIGHTED_BIPRED_IDC_DEFAULT, eExplicit = STD_VIDEO_H264_WEIGHTED_BIPRED_IDC_EXPLICIT, eImplicit = STD_VIDEO_H264_WEIGHTED_BIPRED_IDC_IMPLICIT, eInvalid = STD_VIDEO_H264_WEIGHTED_BIPRED_IDC_INVALID }; enum class H264ModificationOfPicNumsIdc { eShortTermSubtract = STD_VIDEO_H264_MODIFICATION_OF_PIC_NUMS_IDC_SHORT_TERM_SUBTRACT, eShortTermAdd = STD_VIDEO_H264_MODIFICATION_OF_PIC_NUMS_IDC_SHORT_TERM_ADD, eLongTerm = STD_VIDEO_H264_MODIFICATION_OF_PIC_NUMS_IDC_LONG_TERM, eEnd = STD_VIDEO_H264_MODIFICATION_OF_PIC_NUMS_IDC_END, eInvalid = STD_VIDEO_H264_MODIFICATION_OF_PIC_NUMS_IDC_INVALID }; enum class H264MemMgmtControlOp { eEnd = STD_VIDEO_H264_MEM_MGMT_CONTROL_OP_END, eUnmarkShortTerm = STD_VIDEO_H264_MEM_MGMT_CONTROL_OP_UNMARK_SHORT_TERM, eUnmarkLongTerm = STD_VIDEO_H264_MEM_MGMT_CONTROL_OP_UNMARK_LONG_TERM, eMarkLongTerm = STD_VIDEO_H264_MEM_MGMT_CONTROL_OP_MARK_LONG_TERM, eSetMaxLongTermIndex = STD_VIDEO_H264_MEM_MGMT_CONTROL_OP_SET_MAX_LONG_TERM_INDEX, eUnmarkAll = STD_VIDEO_H264_MEM_MGMT_CONTROL_OP_UNMARK_ALL, eMarkCurrentAsLongTerm = STD_VIDEO_H264_MEM_MGMT_CONTROL_OP_MARK_CURRENT_AS_LONG_TERM, eInvalid = STD_VIDEO_H264_MEM_MGMT_CONTROL_OP_INVALID }; enum class H264CabacInitIdc { e0 = STD_VIDEO_H264_CABAC_INIT_IDC_0, e1 = STD_VIDEO_H264_CABAC_INIT_IDC_1, e2 = STD_VIDEO_H264_CABAC_INIT_IDC_2, eInvalid = STD_VIDEO_H264_CABAC_INIT_IDC_INVALID }; enum class H264DisableDeblockingFilterIdc { eDisabled = STD_VIDEO_H264_DISABLE_DEBLOCKING_FILTER_IDC_DISABLED, eEnabled = STD_VIDEO_H264_DISABLE_DEBLOCKING_FILTER_IDC_ENABLED, ePartial = STD_VIDEO_H264_DISABLE_DEBLOCKING_FILTER_IDC_PARTIAL, eInvalid = STD_VIDEO_H264_DISABLE_DEBLOCKING_FILTER_IDC_INVALID }; enum class H264SliceType { eP = STD_VIDEO_H264_SLICE_TYPE_P, eB = STD_VIDEO_H264_SLICE_TYPE_B, eI = STD_VIDEO_H264_SLICE_TYPE_I, eInvalid = STD_VIDEO_H264_SLICE_TYPE_INVALID }; enum class H264PictureType { eP = STD_VIDEO_H264_PICTURE_TYPE_P, eB = STD_VIDEO_H264_PICTURE_TYPE_B, eI = STD_VIDEO_H264_PICTURE_TYPE_I, eIdr = STD_VIDEO_H264_PICTURE_TYPE_IDR, eInvalid = STD_VIDEO_H264_PICTURE_TYPE_INVALID }; enum class H264NonVclNaluType { eSps = STD_VIDEO_H264_NON_VCL_NALU_TYPE_SPS, ePps = STD_VIDEO_H264_NON_VCL_NALU_TYPE_PPS, eAud = STD_VIDEO_H264_NON_VCL_NALU_TYPE_AUD, ePrefix = STD_VIDEO_H264_NON_VCL_NALU_TYPE_PREFIX, eEndOfSequence = STD_VIDEO_H264_NON_VCL_NALU_TYPE_END_OF_SEQUENCE, eEndOfStream = STD_VIDEO_H264_NON_VCL_NALU_TYPE_END_OF_STREAM, ePrecoded = STD_VIDEO_H264_NON_VCL_NALU_TYPE_PRECODED, eInvalid = STD_VIDEO_H264_NON_VCL_NALU_TYPE_INVALID }; //=== vulkan_video_codec_h264std_decode === enum class DecodeH264FieldOrderCount { eTop = STD_VIDEO_DECODE_H264_FIELD_ORDER_COUNT_TOP, eBottom = STD_VIDEO_DECODE_H264_FIELD_ORDER_COUNT_BOTTOM, eInvalid = STD_VIDEO_DECODE_H264_FIELD_ORDER_COUNT_INVALID }; //=== vulkan_video_codec_h265std === enum class H265ChromaFormatIdc { eMonochrome = STD_VIDEO_H265_CHROMA_FORMAT_IDC_MONOCHROME, e420 = STD_VIDEO_H265_CHROMA_FORMAT_IDC_420, e422 = STD_VIDEO_H265_CHROMA_FORMAT_IDC_422, e444 = STD_VIDEO_H265_CHROMA_FORMAT_IDC_444, eInvalid = STD_VIDEO_H265_CHROMA_FORMAT_IDC_INVALID }; enum class H265ProfileIdc { eMain = STD_VIDEO_H265_PROFILE_IDC_MAIN, eMain10 = STD_VIDEO_H265_PROFILE_IDC_MAIN_10, eMainStillPicture = STD_VIDEO_H265_PROFILE_IDC_MAIN_STILL_PICTURE, eFormatRangeExtensions = STD_VIDEO_H265_PROFILE_IDC_FORMAT_RANGE_EXTENSIONS, eSccExtensions = STD_VIDEO_H265_PROFILE_IDC_SCC_EXTENSIONS, eInvalid = STD_VIDEO_H265_PROFILE_IDC_INVALID }; enum class H265LevelIdc { e1_0 = STD_VIDEO_H265_LEVEL_IDC_1_0, e2_0 = STD_VIDEO_H265_LEVEL_IDC_2_0, e2_1 = STD_VIDEO_H265_LEVEL_IDC_2_1, e3_0 = STD_VIDEO_H265_LEVEL_IDC_3_0, e3_1 = STD_VIDEO_H265_LEVEL_IDC_3_1, e4_0 = STD_VIDEO_H265_LEVEL_IDC_4_0, e4_1 = STD_VIDEO_H265_LEVEL_IDC_4_1, e5_0 = STD_VIDEO_H265_LEVEL_IDC_5_0, e5_1 = STD_VIDEO_H265_LEVEL_IDC_5_1, e5_2 = STD_VIDEO_H265_LEVEL_IDC_5_2, e6_0 = STD_VIDEO_H265_LEVEL_IDC_6_0, e6_1 = STD_VIDEO_H265_LEVEL_IDC_6_1, e6_2 = STD_VIDEO_H265_LEVEL_IDC_6_2, eInvalid = STD_VIDEO_H265_LEVEL_IDC_INVALID }; enum class H265SliceType { eB = STD_VIDEO_H265_SLICE_TYPE_B, eP = STD_VIDEO_H265_SLICE_TYPE_P, eI = STD_VIDEO_H265_SLICE_TYPE_I, eInvalid = STD_VIDEO_H265_SLICE_TYPE_INVALID }; enum class H265PictureType { eP = STD_VIDEO_H265_PICTURE_TYPE_P, eB = STD_VIDEO_H265_PICTURE_TYPE_B, eI = STD_VIDEO_H265_PICTURE_TYPE_I, eIdr = STD_VIDEO_H265_PICTURE_TYPE_IDR, eInvalid = STD_VIDEO_H265_PICTURE_TYPE_INVALID }; enum class H265AspectRatioIdc { eUnspecified = STD_VIDEO_H265_ASPECT_RATIO_IDC_UNSPECIFIED, eSquare = STD_VIDEO_H265_ASPECT_RATIO_IDC_SQUARE, e12_11 = STD_VIDEO_H265_ASPECT_RATIO_IDC_12_11, e10_11 = STD_VIDEO_H265_ASPECT_RATIO_IDC_10_11, e16_11 = STD_VIDEO_H265_ASPECT_RATIO_IDC_16_11, e40_33 = STD_VIDEO_H265_ASPECT_RATIO_IDC_40_33, e24_11 = STD_VIDEO_H265_ASPECT_RATIO_IDC_24_11, e20_11 = STD_VIDEO_H265_ASPECT_RATIO_IDC_20_11, e32_11 = STD_VIDEO_H265_ASPECT_RATIO_IDC_32_11, e80_33 = STD_VIDEO_H265_ASPECT_RATIO_IDC_80_33, e18_11 = STD_VIDEO_H265_ASPECT_RATIO_IDC_18_11, e15_11 = STD_VIDEO_H265_ASPECT_RATIO_IDC_15_11, e64_33 = STD_VIDEO_H265_ASPECT_RATIO_IDC_64_33, e160_99 = STD_VIDEO_H265_ASPECT_RATIO_IDC_160_99, e4_3 = STD_VIDEO_H265_ASPECT_RATIO_IDC_4_3, e3_2 = STD_VIDEO_H265_ASPECT_RATIO_IDC_3_2, e2_1 = STD_VIDEO_H265_ASPECT_RATIO_IDC_2_1, eExtendedSar = STD_VIDEO_H265_ASPECT_RATIO_IDC_EXTENDED_SAR, eInvalid = STD_VIDEO_H265_ASPECT_RATIO_IDC_INVALID }; //=== vulkan_video_codec_av1std === enum class AV1Profile { eMain = STD_VIDEO_AV1_PROFILE_MAIN, eHigh = STD_VIDEO_AV1_PROFILE_HIGH, eProfessional = STD_VIDEO_AV1_PROFILE_PROFESSIONAL, eInvalid = STD_VIDEO_AV1_PROFILE_INVALID }; enum class AV1Level { e2_0 = STD_VIDEO_AV1_LEVEL_2_0, e2_1 = STD_VIDEO_AV1_LEVEL_2_1, e2_2 = STD_VIDEO_AV1_LEVEL_2_2, e2_3 = STD_VIDEO_AV1_LEVEL_2_3, e3_0 = STD_VIDEO_AV1_LEVEL_3_0, e3_1 = STD_VIDEO_AV1_LEVEL_3_1, e3_2 = STD_VIDEO_AV1_LEVEL_3_2, e3_3 = STD_VIDEO_AV1_LEVEL_3_3, e4_0 = STD_VIDEO_AV1_LEVEL_4_0, e4_1 = STD_VIDEO_AV1_LEVEL_4_1, e4_2 = STD_VIDEO_AV1_LEVEL_4_2, e4_3 = STD_VIDEO_AV1_LEVEL_4_3, e5_0 = STD_VIDEO_AV1_LEVEL_5_0, e5_1 = STD_VIDEO_AV1_LEVEL_5_1, e5_2 = STD_VIDEO_AV1_LEVEL_5_2, e5_3 = STD_VIDEO_AV1_LEVEL_5_3, e6_0 = STD_VIDEO_AV1_LEVEL_6_0, e6_1 = STD_VIDEO_AV1_LEVEL_6_1, e6_2 = STD_VIDEO_AV1_LEVEL_6_2, e6_3 = STD_VIDEO_AV1_LEVEL_6_3, e7_0 = STD_VIDEO_AV1_LEVEL_7_0, e7_1 = STD_VIDEO_AV1_LEVEL_7_1, e7_2 = STD_VIDEO_AV1_LEVEL_7_2, e7_3 = STD_VIDEO_AV1_LEVEL_7_3, eInvalid = STD_VIDEO_AV1_LEVEL_INVALID }; enum class AV1FrameType { eKey = STD_VIDEO_AV1_FRAME_TYPE_KEY, eInter = STD_VIDEO_AV1_FRAME_TYPE_INTER, eIntraOnly = STD_VIDEO_AV1_FRAME_TYPE_INTRA_ONLY, eSwitch = STD_VIDEO_AV1_FRAME_TYPE_SWITCH, eInvalid = STD_VIDEO_AV1_FRAME_TYPE_INVALID }; enum class AV1ReferenceName { eIntraFrame = STD_VIDEO_AV1_REFERENCE_NAME_INTRA_FRAME, eLastFrame = STD_VIDEO_AV1_REFERENCE_NAME_LAST_FRAME, eLast2Frame = STD_VIDEO_AV1_REFERENCE_NAME_LAST2_FRAME, eLast3Frame = STD_VIDEO_AV1_REFERENCE_NAME_LAST3_FRAME, eGoldenFrame = STD_VIDEO_AV1_REFERENCE_NAME_GOLDEN_FRAME, eBwdrefFrame = STD_VIDEO_AV1_REFERENCE_NAME_BWDREF_FRAME, eAltref2Frame = STD_VIDEO_AV1_REFERENCE_NAME_ALTREF2_FRAME, eAltrefFrame = STD_VIDEO_AV1_REFERENCE_NAME_ALTREF_FRAME, eInvalid = STD_VIDEO_AV1_REFERENCE_NAME_INVALID }; enum class AV1InterpolationFilter { eEighttap = STD_VIDEO_AV1_INTERPOLATION_FILTER_EIGHTTAP, eEighttapSmooth = STD_VIDEO_AV1_INTERPOLATION_FILTER_EIGHTTAP_SMOOTH, eEighttapSharp = STD_VIDEO_AV1_INTERPOLATION_FILTER_EIGHTTAP_SHARP, eBilinear = STD_VIDEO_AV1_INTERPOLATION_FILTER_BILINEAR, eSwitchable = STD_VIDEO_AV1_INTERPOLATION_FILTER_SWITCHABLE, eInvalid = STD_VIDEO_AV1_INTERPOLATION_FILTER_INVALID }; enum class AV1TxMode { eOnly4X4 = STD_VIDEO_AV1_TX_MODE_ONLY_4X4, eLargest = STD_VIDEO_AV1_TX_MODE_LARGEST, eSelect = STD_VIDEO_AV1_TX_MODE_SELECT, eInvalid = STD_VIDEO_AV1_TX_MODE_INVALID }; enum class AV1FrameRestorationType { eNone = STD_VIDEO_AV1_FRAME_RESTORATION_TYPE_NONE, eWiener = STD_VIDEO_AV1_FRAME_RESTORATION_TYPE_WIENER, eSgrproj = STD_VIDEO_AV1_FRAME_RESTORATION_TYPE_SGRPROJ, eSwitchable = STD_VIDEO_AV1_FRAME_RESTORATION_TYPE_SWITCHABLE, eInvalid = STD_VIDEO_AV1_FRAME_RESTORATION_TYPE_INVALID }; enum class AV1ColorPrimaries { eBt709 = STD_VIDEO_AV1_COLOR_PRIMARIES_BT_709, eUnspecified = STD_VIDEO_AV1_COLOR_PRIMARIES_UNSPECIFIED, eBtUnspecified VULKAN_HPP_DEPRECATED_17( "eBtUnspecified is deprecated, eUnspecified should be used instead." ) = STD_VIDEO_AV1_COLOR_PRIMARIES_BT_UNSPECIFIED, eBt470M = STD_VIDEO_AV1_COLOR_PRIMARIES_BT_470_M, eBt470BG = STD_VIDEO_AV1_COLOR_PRIMARIES_BT_470_B_G, eBt601 = STD_VIDEO_AV1_COLOR_PRIMARIES_BT_601, eSmpte240 = STD_VIDEO_AV1_COLOR_PRIMARIES_SMPTE_240, eGenericFilm = STD_VIDEO_AV1_COLOR_PRIMARIES_GENERIC_FILM, eBt2020 = STD_VIDEO_AV1_COLOR_PRIMARIES_BT_2020, eXyz = STD_VIDEO_AV1_COLOR_PRIMARIES_XYZ, eSmpte431 = STD_VIDEO_AV1_COLOR_PRIMARIES_SMPTE_431, eSmpte432 = STD_VIDEO_AV1_COLOR_PRIMARIES_SMPTE_432, eEbu3213 = STD_VIDEO_AV1_COLOR_PRIMARIES_EBU_3213, eInvalid = STD_VIDEO_AV1_COLOR_PRIMARIES_INVALID }; enum class AV1TransferCharacteristics { eReserved0 = STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_RESERVED_0, eBt709 = STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_BT_709, eUnspecified = STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_UNSPECIFIED, eReserved3 = STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_RESERVED_3, eBt470M = STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_BT_470_M, eBt470BG = STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_BT_470_B_G, eBt601 = STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_BT_601, eSmpte240 = STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_SMPTE_240, eLinear = STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_LINEAR, eLog100 = STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_LOG_100, eLog100Sqrt10 = STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_LOG_100_SQRT10, eIec61966 = STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_IEC_61966, eBt1361 = STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_BT_1361, eSrgb = STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_SRGB, eBt2020_10Bit = STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_BT_2020_10_BIT, eBt2020_12Bit = STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_BT_2020_12_BIT, eSmpte2084 = STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_SMPTE_2084, eSmpte428 = STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_SMPTE_428, eHlg = STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_HLG, eInvalid = STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_INVALID }; enum class AV1MatrixCoefficients { eIdentity = STD_VIDEO_AV1_MATRIX_COEFFICIENTS_IDENTITY, eBt709 = STD_VIDEO_AV1_MATRIX_COEFFICIENTS_BT_709, eUnspecified = STD_VIDEO_AV1_MATRIX_COEFFICIENTS_UNSPECIFIED, eReserved3 = STD_VIDEO_AV1_MATRIX_COEFFICIENTS_RESERVED_3, eFcc = STD_VIDEO_AV1_MATRIX_COEFFICIENTS_FCC, eBt470BG = STD_VIDEO_AV1_MATRIX_COEFFICIENTS_BT_470_B_G, eBt601 = STD_VIDEO_AV1_MATRIX_COEFFICIENTS_BT_601, eSmpte240 = STD_VIDEO_AV1_MATRIX_COEFFICIENTS_SMPTE_240, eSmpteYcgco = STD_VIDEO_AV1_MATRIX_COEFFICIENTS_SMPTE_YCGCO, eBt2020Ncl = STD_VIDEO_AV1_MATRIX_COEFFICIENTS_BT_2020_NCL, eBt2020Cl = STD_VIDEO_AV1_MATRIX_COEFFICIENTS_BT_2020_CL, eSmpte2085 = STD_VIDEO_AV1_MATRIX_COEFFICIENTS_SMPTE_2085, eChromatNcl = STD_VIDEO_AV1_MATRIX_COEFFICIENTS_CHROMAT_NCL, eChromatCl = STD_VIDEO_AV1_MATRIX_COEFFICIENTS_CHROMAT_CL, eIctcp = STD_VIDEO_AV1_MATRIX_COEFFICIENTS_ICTCP, eInvalid = STD_VIDEO_AV1_MATRIX_COEFFICIENTS_INVALID }; enum class AV1ChromaSamplePosition { eUnknown = STD_VIDEO_AV1_CHROMA_SAMPLE_POSITION_UNKNOWN, eVertical = STD_VIDEO_AV1_CHROMA_SAMPLE_POSITION_VERTICAL, eColocated = STD_VIDEO_AV1_CHROMA_SAMPLE_POSITION_COLOCATED, eReserved = STD_VIDEO_AV1_CHROMA_SAMPLE_POSITION_RESERVED, eInvalid = STD_VIDEO_AV1_CHROMA_SAMPLE_POSITION_INVALID }; //=============== //=== STRUCTS === //=============== //=== vulkan_video_codec_h264std === struct H264SpsVuiFlags { using NativeType = StdVideoH264SpsVuiFlags; operator StdVideoH264SpsVuiFlags const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator StdVideoH264SpsVuiFlags &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } bool operator==( H264SpsVuiFlags const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( aspect_ratio_info_present_flag == rhs.aspect_ratio_info_present_flag ) && ( overscan_info_present_flag == rhs.overscan_info_present_flag ) && ( overscan_appropriate_flag == rhs.overscan_appropriate_flag ) && ( video_signal_type_present_flag == rhs.video_signal_type_present_flag ) && ( video_full_range_flag == rhs.video_full_range_flag ) && ( color_description_present_flag == rhs.color_description_present_flag ) && ( chroma_loc_info_present_flag == rhs.chroma_loc_info_present_flag ) && ( timing_info_present_flag == rhs.timing_info_present_flag ) && ( fixed_frame_rate_flag == rhs.fixed_frame_rate_flag ) && ( bitstream_restriction_flag == rhs.bitstream_restriction_flag ) && ( nal_hrd_parameters_present_flag == rhs.nal_hrd_parameters_present_flag ) && ( vcl_hrd_parameters_present_flag == rhs.vcl_hrd_parameters_present_flag ); } bool operator!=( H264SpsVuiFlags const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: uint32_t aspect_ratio_info_present_flag : 1; uint32_t overscan_info_present_flag : 1; uint32_t overscan_appropriate_flag : 1; uint32_t video_signal_type_present_flag : 1; uint32_t video_full_range_flag : 1; uint32_t color_description_present_flag : 1; uint32_t chroma_loc_info_present_flag : 1; uint32_t timing_info_present_flag : 1; uint32_t fixed_frame_rate_flag : 1; uint32_t bitstream_restriction_flag : 1; uint32_t nal_hrd_parameters_present_flag : 1; uint32_t vcl_hrd_parameters_present_flag : 1; }; struct H264HrdParameters { using NativeType = StdVideoH264HrdParameters; operator StdVideoH264HrdParameters const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator StdVideoH264HrdParameters &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } bool operator==( H264HrdParameters const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( cpb_cnt_minus1 == rhs.cpb_cnt_minus1 ) && ( bit_rate_scale == rhs.bit_rate_scale ) && ( cpb_size_scale == rhs.cpb_size_scale ) && ( reserved1 == rhs.reserved1 ) && ( bit_rate_value_minus1 == rhs.bit_rate_value_minus1 ) && ( cpb_size_value_minus1 == rhs.cpb_size_value_minus1 ) && ( cbr_flag == rhs.cbr_flag ) && ( initial_cpb_removal_delay_length_minus1 == rhs.initial_cpb_removal_delay_length_minus1 ) && ( cpb_removal_delay_length_minus1 == rhs.cpb_removal_delay_length_minus1 ) && ( dpb_output_delay_length_minus1 == rhs.dpb_output_delay_length_minus1 ) && ( time_offset_length == rhs.time_offset_length ); } bool operator!=( H264HrdParameters const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: uint8_t cpb_cnt_minus1 = {}; uint8_t bit_rate_scale = {}; uint8_t cpb_size_scale = {}; uint8_t reserved1 = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D bit_rate_value_minus1 = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D cpb_size_value_minus1 = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D cbr_flag = {}; uint32_t initial_cpb_removal_delay_length_minus1 = {}; uint32_t cpb_removal_delay_length_minus1 = {}; uint32_t dpb_output_delay_length_minus1 = {}; uint32_t time_offset_length = {}; }; struct H264SequenceParameterSetVui { using NativeType = StdVideoH264SequenceParameterSetVui; operator StdVideoH264SequenceParameterSetVui const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator StdVideoH264SequenceParameterSetVui &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } bool operator==( H264SequenceParameterSetVui const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( flags == rhs.flags ) && ( aspect_ratio_idc == rhs.aspect_ratio_idc ) && ( sar_width == rhs.sar_width ) && ( sar_height == rhs.sar_height ) && ( video_format == rhs.video_format ) && ( colour_primaries == rhs.colour_primaries ) && ( transfer_characteristics == rhs.transfer_characteristics ) && ( matrix_coefficients == rhs.matrix_coefficients ) && ( num_units_in_tick == rhs.num_units_in_tick ) && ( time_scale == rhs.time_scale ) && ( max_num_reorder_frames == rhs.max_num_reorder_frames ) && ( max_dec_frame_buffering == rhs.max_dec_frame_buffering ) && ( chroma_sample_loc_type_top_field == rhs.chroma_sample_loc_type_top_field ) && ( chroma_sample_loc_type_bottom_field == rhs.chroma_sample_loc_type_bottom_field ) && ( reserved1 == rhs.reserved1 ) && ( pHrdParameters == rhs.pHrdParameters ); } bool operator!=( H264SequenceParameterSetVui const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H264SpsVuiFlags flags = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H264AspectRatioIdc aspect_ratio_idc = VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H264AspectRatioIdc::eUnspecified; uint16_t sar_width = {}; uint16_t sar_height = {}; uint8_t video_format = {}; uint8_t colour_primaries = {}; uint8_t transfer_characteristics = {}; uint8_t matrix_coefficients = {}; uint32_t num_units_in_tick = {}; uint32_t time_scale = {}; uint8_t max_num_reorder_frames = {}; uint8_t max_dec_frame_buffering = {}; uint8_t chroma_sample_loc_type_top_field = {}; uint8_t chroma_sample_loc_type_bottom_field = {}; uint32_t reserved1 = {}; const VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H264HrdParameters * pHrdParameters = {}; }; struct H264SpsFlags { using NativeType = StdVideoH264SpsFlags; operator StdVideoH264SpsFlags const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator StdVideoH264SpsFlags &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } bool operator==( H264SpsFlags const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( constraint_set0_flag == rhs.constraint_set0_flag ) && ( constraint_set1_flag == rhs.constraint_set1_flag ) && ( constraint_set2_flag == rhs.constraint_set2_flag ) && ( constraint_set3_flag == rhs.constraint_set3_flag ) && ( constraint_set4_flag == rhs.constraint_set4_flag ) && ( constraint_set5_flag == rhs.constraint_set5_flag ) && ( direct_8x8_inference_flag == rhs.direct_8x8_inference_flag ) && ( mb_adaptive_frame_field_flag == rhs.mb_adaptive_frame_field_flag ) && ( frame_mbs_only_flag == rhs.frame_mbs_only_flag ) && ( delta_pic_order_always_zero_flag == rhs.delta_pic_order_always_zero_flag ) && ( separate_colour_plane_flag == rhs.separate_colour_plane_flag ) && ( gaps_in_frame_num_value_allowed_flag == rhs.gaps_in_frame_num_value_allowed_flag ) && ( qpprime_y_zero_transform_bypass_flag == rhs.qpprime_y_zero_transform_bypass_flag ) && ( frame_cropping_flag == rhs.frame_cropping_flag ) && ( seq_scaling_matrix_present_flag == rhs.seq_scaling_matrix_present_flag ) && ( vui_parameters_present_flag == rhs.vui_parameters_present_flag ); } bool operator!=( H264SpsFlags const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: uint32_t constraint_set0_flag : 1; uint32_t constraint_set1_flag : 1; uint32_t constraint_set2_flag : 1; uint32_t constraint_set3_flag : 1; uint32_t constraint_set4_flag : 1; uint32_t constraint_set5_flag : 1; uint32_t direct_8x8_inference_flag : 1; uint32_t mb_adaptive_frame_field_flag : 1; uint32_t frame_mbs_only_flag : 1; uint32_t delta_pic_order_always_zero_flag : 1; uint32_t separate_colour_plane_flag : 1; uint32_t gaps_in_frame_num_value_allowed_flag : 1; uint32_t qpprime_y_zero_transform_bypass_flag : 1; uint32_t frame_cropping_flag : 1; uint32_t seq_scaling_matrix_present_flag : 1; uint32_t vui_parameters_present_flag : 1; }; struct H264ScalingLists { using NativeType = StdVideoH264ScalingLists; operator StdVideoH264ScalingLists const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator StdVideoH264ScalingLists &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } bool operator==( H264ScalingLists const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( scaling_list_present_mask == rhs.scaling_list_present_mask ) && ( use_default_scaling_matrix_mask == rhs.use_default_scaling_matrix_mask ) && ( ScalingList4x4 == rhs.ScalingList4x4 ) && ( ScalingList8x8 == rhs.ScalingList8x8 ); } bool operator!=( H264ScalingLists const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: uint16_t scaling_list_present_mask = {}; uint16_t use_default_scaling_matrix_mask = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper2D ScalingList4x4 = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper2D ScalingList8x8 = {}; }; struct H264SequenceParameterSet { using NativeType = StdVideoH264SequenceParameterSet; operator StdVideoH264SequenceParameterSet const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator StdVideoH264SequenceParameterSet &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } bool operator==( H264SequenceParameterSet const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( flags == rhs.flags ) && ( profile_idc == rhs.profile_idc ) && ( level_idc == rhs.level_idc ) && ( chroma_format_idc == rhs.chroma_format_idc ) && ( seq_parameter_set_id == rhs.seq_parameter_set_id ) && ( bit_depth_luma_minus8 == rhs.bit_depth_luma_minus8 ) && ( bit_depth_chroma_minus8 == rhs.bit_depth_chroma_minus8 ) && ( log2_max_frame_num_minus4 == rhs.log2_max_frame_num_minus4 ) && ( pic_order_cnt_type == rhs.pic_order_cnt_type ) && ( offset_for_non_ref_pic == rhs.offset_for_non_ref_pic ) && ( offset_for_top_to_bottom_field == rhs.offset_for_top_to_bottom_field ) && ( log2_max_pic_order_cnt_lsb_minus4 == rhs.log2_max_pic_order_cnt_lsb_minus4 ) && ( num_ref_frames_in_pic_order_cnt_cycle == rhs.num_ref_frames_in_pic_order_cnt_cycle ) && ( max_num_ref_frames == rhs.max_num_ref_frames ) && ( reserved1 == rhs.reserved1 ) && ( pic_width_in_mbs_minus1 == rhs.pic_width_in_mbs_minus1 ) && ( pic_height_in_map_units_minus1 == rhs.pic_height_in_map_units_minus1 ) && ( frame_crop_left_offset == rhs.frame_crop_left_offset ) && ( frame_crop_right_offset == rhs.frame_crop_right_offset ) && ( frame_crop_top_offset == rhs.frame_crop_top_offset ) && ( frame_crop_bottom_offset == rhs.frame_crop_bottom_offset ) && ( reserved2 == rhs.reserved2 ) && ( pOffsetForRefFrame == rhs.pOffsetForRefFrame ) && ( pScalingLists == rhs.pScalingLists ) && ( pSequenceParameterSetVui == rhs.pSequenceParameterSetVui ); } bool operator!=( H264SequenceParameterSet const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H264SpsFlags flags = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H264ProfileIdc profile_idc = VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H264ProfileIdc::eBaseline; VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H264LevelIdc level_idc = VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H264LevelIdc::e1_0; VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H264ChromaFormatIdc chroma_format_idc = VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H264ChromaFormatIdc::eMonochrome; uint8_t seq_parameter_set_id = {}; uint8_t bit_depth_luma_minus8 = {}; uint8_t bit_depth_chroma_minus8 = {}; uint8_t log2_max_frame_num_minus4 = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H264PocType pic_order_cnt_type = VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H264PocType::e0; int32_t offset_for_non_ref_pic = {}; int32_t offset_for_top_to_bottom_field = {}; uint8_t log2_max_pic_order_cnt_lsb_minus4 = {}; uint8_t num_ref_frames_in_pic_order_cnt_cycle = {}; uint8_t max_num_ref_frames = {}; uint8_t reserved1 = {}; uint32_t pic_width_in_mbs_minus1 = {}; uint32_t pic_height_in_map_units_minus1 = {}; uint32_t frame_crop_left_offset = {}; uint32_t frame_crop_right_offset = {}; uint32_t frame_crop_top_offset = {}; uint32_t frame_crop_bottom_offset = {}; uint32_t reserved2 = {}; const int32_t * pOffsetForRefFrame = {}; const VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H264ScalingLists * pScalingLists = {}; const VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H264SequenceParameterSetVui * pSequenceParameterSetVui = {}; }; struct H264PpsFlags { using NativeType = StdVideoH264PpsFlags; operator StdVideoH264PpsFlags const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator StdVideoH264PpsFlags &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } bool operator==( H264PpsFlags const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( transform_8x8_mode_flag == rhs.transform_8x8_mode_flag ) && ( redundant_pic_cnt_present_flag == rhs.redundant_pic_cnt_present_flag ) && ( constrained_intra_pred_flag == rhs.constrained_intra_pred_flag ) && ( deblocking_filter_control_present_flag == rhs.deblocking_filter_control_present_flag ) && ( weighted_pred_flag == rhs.weighted_pred_flag ) && ( bottom_field_pic_order_in_frame_present_flag == rhs.bottom_field_pic_order_in_frame_present_flag ) && ( entropy_coding_mode_flag == rhs.entropy_coding_mode_flag ) && ( pic_scaling_matrix_present_flag == rhs.pic_scaling_matrix_present_flag ); } bool operator!=( H264PpsFlags const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: uint32_t transform_8x8_mode_flag : 1; uint32_t redundant_pic_cnt_present_flag : 1; uint32_t constrained_intra_pred_flag : 1; uint32_t deblocking_filter_control_present_flag : 1; uint32_t weighted_pred_flag : 1; uint32_t bottom_field_pic_order_in_frame_present_flag : 1; uint32_t entropy_coding_mode_flag : 1; uint32_t pic_scaling_matrix_present_flag : 1; }; struct H264PictureParameterSet { using NativeType = StdVideoH264PictureParameterSet; operator StdVideoH264PictureParameterSet const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator StdVideoH264PictureParameterSet &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } bool operator==( H264PictureParameterSet const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( flags == rhs.flags ) && ( seq_parameter_set_id == rhs.seq_parameter_set_id ) && ( pic_parameter_set_id == rhs.pic_parameter_set_id ) && ( num_ref_idx_l0_default_active_minus1 == rhs.num_ref_idx_l0_default_active_minus1 ) && ( num_ref_idx_l1_default_active_minus1 == rhs.num_ref_idx_l1_default_active_minus1 ) && ( weighted_bipred_idc == rhs.weighted_bipred_idc ) && ( pic_init_qp_minus26 == rhs.pic_init_qp_minus26 ) && ( pic_init_qs_minus26 == rhs.pic_init_qs_minus26 ) && ( chroma_qp_index_offset == rhs.chroma_qp_index_offset ) && ( second_chroma_qp_index_offset == rhs.second_chroma_qp_index_offset ) && ( pScalingLists == rhs.pScalingLists ); } bool operator!=( H264PictureParameterSet const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H264PpsFlags flags = {}; uint8_t seq_parameter_set_id = {}; uint8_t pic_parameter_set_id = {}; uint8_t num_ref_idx_l0_default_active_minus1 = {}; uint8_t num_ref_idx_l1_default_active_minus1 = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H264WeightedBipredIdc weighted_bipred_idc = VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H264WeightedBipredIdc::eDefault; int8_t pic_init_qp_minus26 = {}; int8_t pic_init_qs_minus26 = {}; int8_t chroma_qp_index_offset = {}; int8_t second_chroma_qp_index_offset = {}; const VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H264ScalingLists * pScalingLists = {}; }; //=== vulkan_video_codec_h264std_decode === struct DecodeH264PictureInfoFlags { using NativeType = StdVideoDecodeH264PictureInfoFlags; operator StdVideoDecodeH264PictureInfoFlags const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator StdVideoDecodeH264PictureInfoFlags &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } bool operator==( DecodeH264PictureInfoFlags const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( field_pic_flag == rhs.field_pic_flag ) && ( is_intra == rhs.is_intra ) && ( IdrPicFlag == rhs.IdrPicFlag ) && ( bottom_field_flag == rhs.bottom_field_flag ) && ( is_reference == rhs.is_reference ) && ( complementary_field_pair == rhs.complementary_field_pair ); } bool operator!=( DecodeH264PictureInfoFlags const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: uint32_t field_pic_flag : 1; uint32_t is_intra : 1; uint32_t IdrPicFlag : 1; uint32_t bottom_field_flag : 1; uint32_t is_reference : 1; uint32_t complementary_field_pair : 1; }; struct DecodeH264PictureInfo { using NativeType = StdVideoDecodeH264PictureInfo; operator StdVideoDecodeH264PictureInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator StdVideoDecodeH264PictureInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } bool operator==( DecodeH264PictureInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( flags == rhs.flags ) && ( seq_parameter_set_id == rhs.seq_parameter_set_id ) && ( pic_parameter_set_id == rhs.pic_parameter_set_id ) && ( reserved1 == rhs.reserved1 ) && ( reserved2 == rhs.reserved2 ) && ( frame_num == rhs.frame_num ) && ( idr_pic_id == rhs.idr_pic_id ) && ( PicOrderCnt == rhs.PicOrderCnt ); } bool operator!=( DecodeH264PictureInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::DecodeH264PictureInfoFlags flags = {}; uint8_t seq_parameter_set_id = {}; uint8_t pic_parameter_set_id = {}; uint8_t reserved1 = {}; uint8_t reserved2 = {}; uint16_t frame_num = {}; uint16_t idr_pic_id = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D PicOrderCnt = {}; }; struct DecodeH264ReferenceInfoFlags { using NativeType = StdVideoDecodeH264ReferenceInfoFlags; operator StdVideoDecodeH264ReferenceInfoFlags const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator StdVideoDecodeH264ReferenceInfoFlags &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } bool operator==( DecodeH264ReferenceInfoFlags const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( top_field_flag == rhs.top_field_flag ) && ( bottom_field_flag == rhs.bottom_field_flag ) && ( used_for_long_term_reference == rhs.used_for_long_term_reference ) && ( is_non_existing == rhs.is_non_existing ); } bool operator!=( DecodeH264ReferenceInfoFlags const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: uint32_t top_field_flag : 1; uint32_t bottom_field_flag : 1; uint32_t used_for_long_term_reference : 1; uint32_t is_non_existing : 1; }; struct DecodeH264ReferenceInfo { using NativeType = StdVideoDecodeH264ReferenceInfo; operator StdVideoDecodeH264ReferenceInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator StdVideoDecodeH264ReferenceInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } bool operator==( DecodeH264ReferenceInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( flags == rhs.flags ) && ( FrameNum == rhs.FrameNum ) && ( reserved == rhs.reserved ) && ( PicOrderCnt == rhs.PicOrderCnt ); } bool operator!=( DecodeH264ReferenceInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::DecodeH264ReferenceInfoFlags flags = {}; uint16_t FrameNum = {}; uint16_t reserved = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D PicOrderCnt = {}; }; //=== vulkan_video_codec_h264std_encode === struct EncodeH264WeightTableFlags { using NativeType = StdVideoEncodeH264WeightTableFlags; operator StdVideoEncodeH264WeightTableFlags const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator StdVideoEncodeH264WeightTableFlags &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } bool operator==( EncodeH264WeightTableFlags const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( luma_weight_l0_flag == rhs.luma_weight_l0_flag ) && ( chroma_weight_l0_flag == rhs.chroma_weight_l0_flag ) && ( luma_weight_l1_flag == rhs.luma_weight_l1_flag ) && ( chroma_weight_l1_flag == rhs.chroma_weight_l1_flag ); } bool operator!=( EncodeH264WeightTableFlags const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: uint32_t luma_weight_l0_flag = {}; uint32_t chroma_weight_l0_flag = {}; uint32_t luma_weight_l1_flag = {}; uint32_t chroma_weight_l1_flag = {}; }; struct EncodeH264WeightTable { using NativeType = StdVideoEncodeH264WeightTable; operator StdVideoEncodeH264WeightTable const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator StdVideoEncodeH264WeightTable &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } bool operator==( EncodeH264WeightTable const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( flags == rhs.flags ) && ( luma_log2_weight_denom == rhs.luma_log2_weight_denom ) && ( chroma_log2_weight_denom == rhs.chroma_log2_weight_denom ) && ( luma_weight_l0 == rhs.luma_weight_l0 ) && ( luma_offset_l0 == rhs.luma_offset_l0 ) && ( chroma_weight_l0 == rhs.chroma_weight_l0 ) && ( chroma_offset_l0 == rhs.chroma_offset_l0 ) && ( luma_weight_l1 == rhs.luma_weight_l1 ) && ( luma_offset_l1 == rhs.luma_offset_l1 ) && ( chroma_weight_l1 == rhs.chroma_weight_l1 ) && ( chroma_offset_l1 == rhs.chroma_offset_l1 ); } bool operator!=( EncodeH264WeightTable const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::EncodeH264WeightTableFlags flags = {}; uint8_t luma_log2_weight_denom = {}; uint8_t chroma_log2_weight_denom = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D luma_weight_l0 = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D luma_offset_l0 = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper2D chroma_weight_l0 = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper2D chroma_offset_l0 = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D luma_weight_l1 = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D luma_offset_l1 = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper2D chroma_weight_l1 = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper2D chroma_offset_l1 = {}; }; struct EncodeH264SliceHeaderFlags { using NativeType = StdVideoEncodeH264SliceHeaderFlags; operator StdVideoEncodeH264SliceHeaderFlags const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator StdVideoEncodeH264SliceHeaderFlags &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } bool operator==( EncodeH264SliceHeaderFlags const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( direct_spatial_mv_pred_flag == rhs.direct_spatial_mv_pred_flag ) && ( num_ref_idx_active_override_flag == rhs.num_ref_idx_active_override_flag ) && ( reserved == rhs.reserved ); } bool operator!=( EncodeH264SliceHeaderFlags const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: uint32_t direct_spatial_mv_pred_flag : 1; uint32_t num_ref_idx_active_override_flag : 1; uint32_t reserved : 30; }; struct EncodeH264PictureInfoFlags { using NativeType = StdVideoEncodeH264PictureInfoFlags; operator StdVideoEncodeH264PictureInfoFlags const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator StdVideoEncodeH264PictureInfoFlags &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } bool operator==( EncodeH264PictureInfoFlags const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( IdrPicFlag == rhs.IdrPicFlag ) && ( is_reference == rhs.is_reference ) && ( no_output_of_prior_pics_flag == rhs.no_output_of_prior_pics_flag ) && ( long_term_reference_flag == rhs.long_term_reference_flag ) && ( adaptive_ref_pic_marking_mode_flag == rhs.adaptive_ref_pic_marking_mode_flag ) && ( reserved == rhs.reserved ); } bool operator!=( EncodeH264PictureInfoFlags const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: uint32_t IdrPicFlag : 1; uint32_t is_reference : 1; uint32_t no_output_of_prior_pics_flag : 1; uint32_t long_term_reference_flag : 1; uint32_t adaptive_ref_pic_marking_mode_flag : 1; uint32_t reserved : 27; }; struct EncodeH264ReferenceInfoFlags { using NativeType = StdVideoEncodeH264ReferenceInfoFlags; operator StdVideoEncodeH264ReferenceInfoFlags const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator StdVideoEncodeH264ReferenceInfoFlags &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } bool operator==( EncodeH264ReferenceInfoFlags const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( used_for_long_term_reference == rhs.used_for_long_term_reference ) && ( reserved == rhs.reserved ); } bool operator!=( EncodeH264ReferenceInfoFlags const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: uint32_t used_for_long_term_reference : 1; uint32_t reserved : 31; }; struct EncodeH264ReferenceListsInfoFlags { using NativeType = StdVideoEncodeH264ReferenceListsInfoFlags; operator StdVideoEncodeH264ReferenceListsInfoFlags const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator StdVideoEncodeH264ReferenceListsInfoFlags &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } bool operator==( EncodeH264ReferenceListsInfoFlags const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( ref_pic_list_modification_flag_l0 == rhs.ref_pic_list_modification_flag_l0 ) && ( ref_pic_list_modification_flag_l1 == rhs.ref_pic_list_modification_flag_l1 ) && ( reserved == rhs.reserved ); } bool operator!=( EncodeH264ReferenceListsInfoFlags const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: uint32_t ref_pic_list_modification_flag_l0 : 1; uint32_t ref_pic_list_modification_flag_l1 : 1; uint32_t reserved : 30; }; struct EncodeH264RefListModEntry { using NativeType = StdVideoEncodeH264RefListModEntry; operator StdVideoEncodeH264RefListModEntry const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator StdVideoEncodeH264RefListModEntry &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } bool operator==( EncodeH264RefListModEntry const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( modification_of_pic_nums_idc == rhs.modification_of_pic_nums_idc ) && ( abs_diff_pic_num_minus1 == rhs.abs_diff_pic_num_minus1 ) && ( long_term_pic_num == rhs.long_term_pic_num ); } bool operator!=( EncodeH264RefListModEntry const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H264ModificationOfPicNumsIdc modification_of_pic_nums_idc = VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H264ModificationOfPicNumsIdc::eShortTermSubtract; uint16_t abs_diff_pic_num_minus1 = {}; uint16_t long_term_pic_num = {}; }; struct EncodeH264RefPicMarkingEntry { using NativeType = StdVideoEncodeH264RefPicMarkingEntry; operator StdVideoEncodeH264RefPicMarkingEntry const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator StdVideoEncodeH264RefPicMarkingEntry &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } bool operator==( EncodeH264RefPicMarkingEntry const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( memory_management_control_operation == rhs.memory_management_control_operation ) && ( difference_of_pic_nums_minus1 == rhs.difference_of_pic_nums_minus1 ) && ( long_term_pic_num == rhs.long_term_pic_num ) && ( long_term_frame_idx == rhs.long_term_frame_idx ) && ( max_long_term_frame_idx_plus1 == rhs.max_long_term_frame_idx_plus1 ); } bool operator!=( EncodeH264RefPicMarkingEntry const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H264MemMgmtControlOp memory_management_control_operation = VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H264MemMgmtControlOp::eEnd; uint16_t difference_of_pic_nums_minus1 = {}; uint16_t long_term_pic_num = {}; uint16_t long_term_frame_idx = {}; uint16_t max_long_term_frame_idx_plus1 = {}; }; struct EncodeH264ReferenceListsInfo { using NativeType = StdVideoEncodeH264ReferenceListsInfo; operator StdVideoEncodeH264ReferenceListsInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator StdVideoEncodeH264ReferenceListsInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } bool operator==( EncodeH264ReferenceListsInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( flags == rhs.flags ) && ( num_ref_idx_l0_active_minus1 == rhs.num_ref_idx_l0_active_minus1 ) && ( num_ref_idx_l1_active_minus1 == rhs.num_ref_idx_l1_active_minus1 ) && ( RefPicList0 == rhs.RefPicList0 ) && ( RefPicList1 == rhs.RefPicList1 ) && ( refList0ModOpCount == rhs.refList0ModOpCount ) && ( refList1ModOpCount == rhs.refList1ModOpCount ) && ( refPicMarkingOpCount == rhs.refPicMarkingOpCount ) && ( reserved1 == rhs.reserved1 ) && ( pRefList0ModOperations == rhs.pRefList0ModOperations ) && ( pRefList1ModOperations == rhs.pRefList1ModOperations ) && ( pRefPicMarkingOperations == rhs.pRefPicMarkingOperations ); } bool operator!=( EncodeH264ReferenceListsInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::EncodeH264ReferenceListsInfoFlags flags = {}; uint8_t num_ref_idx_l0_active_minus1 = {}; uint8_t num_ref_idx_l1_active_minus1 = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D RefPicList0 = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D RefPicList1 = {}; uint8_t refList0ModOpCount = {}; uint8_t refList1ModOpCount = {}; uint8_t refPicMarkingOpCount = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D reserved1 = {}; const VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::EncodeH264RefListModEntry * pRefList0ModOperations = {}; const VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::EncodeH264RefListModEntry * pRefList1ModOperations = {}; const VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::EncodeH264RefPicMarkingEntry * pRefPicMarkingOperations = {}; }; struct EncodeH264PictureInfo { using NativeType = StdVideoEncodeH264PictureInfo; operator StdVideoEncodeH264PictureInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator StdVideoEncodeH264PictureInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } bool operator==( EncodeH264PictureInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( flags == rhs.flags ) && ( seq_parameter_set_id == rhs.seq_parameter_set_id ) && ( pic_parameter_set_id == rhs.pic_parameter_set_id ) && ( idr_pic_id == rhs.idr_pic_id ) && ( primary_pic_type == rhs.primary_pic_type ) && ( frame_num == rhs.frame_num ) && ( PicOrderCnt == rhs.PicOrderCnt ) && ( temporal_id == rhs.temporal_id ) && ( reserved1 == rhs.reserved1 ) && ( pRefLists == rhs.pRefLists ); } bool operator!=( EncodeH264PictureInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::EncodeH264PictureInfoFlags flags = {}; uint8_t seq_parameter_set_id = {}; uint8_t pic_parameter_set_id = {}; uint16_t idr_pic_id = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H264PictureType primary_pic_type = VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H264PictureType::eP; uint32_t frame_num = {}; int32_t PicOrderCnt = {}; uint8_t temporal_id = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D reserved1 = {}; const VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::EncodeH264ReferenceListsInfo * pRefLists = {}; }; struct EncodeH264ReferenceInfo { using NativeType = StdVideoEncodeH264ReferenceInfo; operator StdVideoEncodeH264ReferenceInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator StdVideoEncodeH264ReferenceInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } bool operator==( EncodeH264ReferenceInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( flags == rhs.flags ) && ( primary_pic_type == rhs.primary_pic_type ) && ( FrameNum == rhs.FrameNum ) && ( PicOrderCnt == rhs.PicOrderCnt ) && ( long_term_pic_num == rhs.long_term_pic_num ) && ( long_term_frame_idx == rhs.long_term_frame_idx ) && ( temporal_id == rhs.temporal_id ); } bool operator!=( EncodeH264ReferenceInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::EncodeH264ReferenceInfoFlags flags = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H264PictureType primary_pic_type = VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H264PictureType::eP; uint32_t FrameNum = {}; int32_t PicOrderCnt = {}; uint16_t long_term_pic_num = {}; uint16_t long_term_frame_idx = {}; uint8_t temporal_id = {}; }; struct EncodeH264SliceHeader { using NativeType = StdVideoEncodeH264SliceHeader; operator StdVideoEncodeH264SliceHeader const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator StdVideoEncodeH264SliceHeader &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } bool operator==( EncodeH264SliceHeader const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( flags == rhs.flags ) && ( first_mb_in_slice == rhs.first_mb_in_slice ) && ( slice_type == rhs.slice_type ) && ( slice_alpha_c0_offset_div2 == rhs.slice_alpha_c0_offset_div2 ) && ( slice_beta_offset_div2 == rhs.slice_beta_offset_div2 ) && ( slice_qp_delta == rhs.slice_qp_delta ) && ( reserved1 == rhs.reserved1 ) && ( cabac_init_idc == rhs.cabac_init_idc ) && ( disable_deblocking_filter_idc == rhs.disable_deblocking_filter_idc ) && ( pWeightTable == rhs.pWeightTable ); } bool operator!=( EncodeH264SliceHeader const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::EncodeH264SliceHeaderFlags flags = {}; uint32_t first_mb_in_slice = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H264SliceType slice_type = VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H264SliceType::eP; int8_t slice_alpha_c0_offset_div2 = {}; int8_t slice_beta_offset_div2 = {}; int8_t slice_qp_delta = {}; uint8_t reserved1 = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H264CabacInitIdc cabac_init_idc = VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H264CabacInitIdc::e0; VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H264DisableDeblockingFilterIdc disable_deblocking_filter_idc = VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H264DisableDeblockingFilterIdc::eDisabled; const VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::EncodeH264WeightTable * pWeightTable = {}; }; //=== vulkan_video_codec_h265std === struct H265DecPicBufMgr { using NativeType = StdVideoH265DecPicBufMgr; operator StdVideoH265DecPicBufMgr const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator StdVideoH265DecPicBufMgr &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } bool operator==( H265DecPicBufMgr const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( max_latency_increase_plus1 == rhs.max_latency_increase_plus1 ) && ( max_dec_pic_buffering_minus1 == rhs.max_dec_pic_buffering_minus1 ) && ( max_num_reorder_pics == rhs.max_num_reorder_pics ); } bool operator!=( H265DecPicBufMgr const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::ArrayWrapper1D max_latency_increase_plus1 = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D max_dec_pic_buffering_minus1 = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D max_num_reorder_pics = {}; }; struct H265SubLayerHrdParameters { using NativeType = StdVideoH265SubLayerHrdParameters; operator StdVideoH265SubLayerHrdParameters const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator StdVideoH265SubLayerHrdParameters &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } bool operator==( H265SubLayerHrdParameters const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( bit_rate_value_minus1 == rhs.bit_rate_value_minus1 ) && ( cpb_size_value_minus1 == rhs.cpb_size_value_minus1 ) && ( cpb_size_du_value_minus1 == rhs.cpb_size_du_value_minus1 ) && ( bit_rate_du_value_minus1 == rhs.bit_rate_du_value_minus1 ) && ( cbr_flag == rhs.cbr_flag ); } bool operator!=( H265SubLayerHrdParameters const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::ArrayWrapper1D bit_rate_value_minus1 = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D cpb_size_value_minus1 = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D cpb_size_du_value_minus1 = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D bit_rate_du_value_minus1 = {}; uint32_t cbr_flag = {}; }; struct H265HrdFlags { using NativeType = StdVideoH265HrdFlags; operator StdVideoH265HrdFlags const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator StdVideoH265HrdFlags &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } bool operator==( H265HrdFlags const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( nal_hrd_parameters_present_flag == rhs.nal_hrd_parameters_present_flag ) && ( vcl_hrd_parameters_present_flag == rhs.vcl_hrd_parameters_present_flag ) && ( sub_pic_hrd_params_present_flag == rhs.sub_pic_hrd_params_present_flag ) && ( sub_pic_cpb_params_in_pic_timing_sei_flag == rhs.sub_pic_cpb_params_in_pic_timing_sei_flag ) && ( fixed_pic_rate_general_flag == rhs.fixed_pic_rate_general_flag ) && ( fixed_pic_rate_within_cvs_flag == rhs.fixed_pic_rate_within_cvs_flag ) && ( low_delay_hrd_flag == rhs.low_delay_hrd_flag ); } bool operator!=( H265HrdFlags const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: uint32_t nal_hrd_parameters_present_flag : 1; uint32_t vcl_hrd_parameters_present_flag : 1; uint32_t sub_pic_hrd_params_present_flag : 1; uint32_t sub_pic_cpb_params_in_pic_timing_sei_flag : 1; uint32_t fixed_pic_rate_general_flag : 8; uint32_t fixed_pic_rate_within_cvs_flag : 8; uint32_t low_delay_hrd_flag : 8; }; struct H265HrdParameters { using NativeType = StdVideoH265HrdParameters; operator StdVideoH265HrdParameters const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator StdVideoH265HrdParameters &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } bool operator==( H265HrdParameters const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( flags == rhs.flags ) && ( tick_divisor_minus2 == rhs.tick_divisor_minus2 ) && ( du_cpb_removal_delay_increment_length_minus1 == rhs.du_cpb_removal_delay_increment_length_minus1 ) && ( dpb_output_delay_du_length_minus1 == rhs.dpb_output_delay_du_length_minus1 ) && ( bit_rate_scale == rhs.bit_rate_scale ) && ( cpb_size_scale == rhs.cpb_size_scale ) && ( cpb_size_du_scale == rhs.cpb_size_du_scale ) && ( initial_cpb_removal_delay_length_minus1 == rhs.initial_cpb_removal_delay_length_minus1 ) && ( au_cpb_removal_delay_length_minus1 == rhs.au_cpb_removal_delay_length_minus1 ) && ( dpb_output_delay_length_minus1 == rhs.dpb_output_delay_length_minus1 ) && ( cpb_cnt_minus1 == rhs.cpb_cnt_minus1 ) && ( elemental_duration_in_tc_minus1 == rhs.elemental_duration_in_tc_minus1 ) && ( reserved == rhs.reserved ) && ( pSubLayerHrdParametersNal == rhs.pSubLayerHrdParametersNal ) && ( pSubLayerHrdParametersVcl == rhs.pSubLayerHrdParametersVcl ); } bool operator!=( H265HrdParameters const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265HrdFlags flags = {}; uint8_t tick_divisor_minus2 = {}; uint8_t du_cpb_removal_delay_increment_length_minus1 = {}; uint8_t dpb_output_delay_du_length_minus1 = {}; uint8_t bit_rate_scale = {}; uint8_t cpb_size_scale = {}; uint8_t cpb_size_du_scale = {}; uint8_t initial_cpb_removal_delay_length_minus1 = {}; uint8_t au_cpb_removal_delay_length_minus1 = {}; uint8_t dpb_output_delay_length_minus1 = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D cpb_cnt_minus1 = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D elemental_duration_in_tc_minus1 = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D reserved = {}; const VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265SubLayerHrdParameters * pSubLayerHrdParametersNal = {}; const VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265SubLayerHrdParameters * pSubLayerHrdParametersVcl = {}; }; struct H265VpsFlags { using NativeType = StdVideoH265VpsFlags; operator StdVideoH265VpsFlags const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator StdVideoH265VpsFlags &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } bool operator==( H265VpsFlags const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( vps_temporal_id_nesting_flag == rhs.vps_temporal_id_nesting_flag ) && ( vps_sub_layer_ordering_info_present_flag == rhs.vps_sub_layer_ordering_info_present_flag ) && ( vps_timing_info_present_flag == rhs.vps_timing_info_present_flag ) && ( vps_poc_proportional_to_timing_flag == rhs.vps_poc_proportional_to_timing_flag ); } bool operator!=( H265VpsFlags const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: uint32_t vps_temporal_id_nesting_flag : 1; uint32_t vps_sub_layer_ordering_info_present_flag : 1; uint32_t vps_timing_info_present_flag : 1; uint32_t vps_poc_proportional_to_timing_flag : 1; }; struct H265ProfileTierLevelFlags { using NativeType = StdVideoH265ProfileTierLevelFlags; operator StdVideoH265ProfileTierLevelFlags const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator StdVideoH265ProfileTierLevelFlags &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } bool operator==( H265ProfileTierLevelFlags const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( general_tier_flag == rhs.general_tier_flag ) && ( general_progressive_source_flag == rhs.general_progressive_source_flag ) && ( general_interlaced_source_flag == rhs.general_interlaced_source_flag ) && ( general_non_packed_constraint_flag == rhs.general_non_packed_constraint_flag ) && ( general_frame_only_constraint_flag == rhs.general_frame_only_constraint_flag ); } bool operator!=( H265ProfileTierLevelFlags const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: uint32_t general_tier_flag : 1; uint32_t general_progressive_source_flag : 1; uint32_t general_interlaced_source_flag : 1; uint32_t general_non_packed_constraint_flag : 1; uint32_t general_frame_only_constraint_flag : 1; }; struct H265ProfileTierLevel { using NativeType = StdVideoH265ProfileTierLevel; operator StdVideoH265ProfileTierLevel const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator StdVideoH265ProfileTierLevel &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } bool operator==( H265ProfileTierLevel const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( flags == rhs.flags ) && ( general_profile_idc == rhs.general_profile_idc ) && ( general_level_idc == rhs.general_level_idc ); } bool operator!=( H265ProfileTierLevel const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265ProfileTierLevelFlags flags = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265ProfileIdc general_profile_idc = VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265ProfileIdc::eMain; VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265LevelIdc general_level_idc = VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265LevelIdc::e1_0; }; struct H265VideoParameterSet { using NativeType = StdVideoH265VideoParameterSet; operator StdVideoH265VideoParameterSet const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator StdVideoH265VideoParameterSet &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } bool operator==( H265VideoParameterSet const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( flags == rhs.flags ) && ( vps_video_parameter_set_id == rhs.vps_video_parameter_set_id ) && ( vps_max_sub_layers_minus1 == rhs.vps_max_sub_layers_minus1 ) && ( reserved1 == rhs.reserved1 ) && ( reserved2 == rhs.reserved2 ) && ( vps_num_units_in_tick == rhs.vps_num_units_in_tick ) && ( vps_time_scale == rhs.vps_time_scale ) && ( vps_num_ticks_poc_diff_one_minus1 == rhs.vps_num_ticks_poc_diff_one_minus1 ) && ( reserved3 == rhs.reserved3 ) && ( pDecPicBufMgr == rhs.pDecPicBufMgr ) && ( pHrdParameters == rhs.pHrdParameters ) && ( pProfileTierLevel == rhs.pProfileTierLevel ); } bool operator!=( H265VideoParameterSet const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265VpsFlags flags = {}; uint8_t vps_video_parameter_set_id = {}; uint8_t vps_max_sub_layers_minus1 = {}; uint8_t reserved1 = {}; uint8_t reserved2 = {}; uint32_t vps_num_units_in_tick = {}; uint32_t vps_time_scale = {}; uint32_t vps_num_ticks_poc_diff_one_minus1 = {}; uint32_t reserved3 = {}; const VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265DecPicBufMgr * pDecPicBufMgr = {}; const VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265HrdParameters * pHrdParameters = {}; const VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265ProfileTierLevel * pProfileTierLevel = {}; }; struct H265ScalingLists { using NativeType = StdVideoH265ScalingLists; operator StdVideoH265ScalingLists const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator StdVideoH265ScalingLists &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } bool operator==( H265ScalingLists const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( ScalingList4x4 == rhs.ScalingList4x4 ) && ( ScalingList8x8 == rhs.ScalingList8x8 ) && ( ScalingList16x16 == rhs.ScalingList16x16 ) && ( ScalingList32x32 == rhs.ScalingList32x32 ) && ( ScalingListDCCoef16x16 == rhs.ScalingListDCCoef16x16 ) && ( ScalingListDCCoef32x32 == rhs.ScalingListDCCoef32x32 ); } bool operator!=( H265ScalingLists const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::ArrayWrapper2D ScalingList4x4 = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper2D ScalingList8x8 = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper2D ScalingList16x16 = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper2D ScalingList32x32 = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D ScalingListDCCoef16x16 = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D ScalingListDCCoef32x32 = {}; }; struct H265SpsVuiFlags { using NativeType = StdVideoH265SpsVuiFlags; operator StdVideoH265SpsVuiFlags const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator StdVideoH265SpsVuiFlags &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } bool operator==( H265SpsVuiFlags const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( aspect_ratio_info_present_flag == rhs.aspect_ratio_info_present_flag ) && ( overscan_info_present_flag == rhs.overscan_info_present_flag ) && ( overscan_appropriate_flag == rhs.overscan_appropriate_flag ) && ( video_signal_type_present_flag == rhs.video_signal_type_present_flag ) && ( video_full_range_flag == rhs.video_full_range_flag ) && ( colour_description_present_flag == rhs.colour_description_present_flag ) && ( chroma_loc_info_present_flag == rhs.chroma_loc_info_present_flag ) && ( neutral_chroma_indication_flag == rhs.neutral_chroma_indication_flag ) && ( field_seq_flag == rhs.field_seq_flag ) && ( frame_field_info_present_flag == rhs.frame_field_info_present_flag ) && ( default_display_window_flag == rhs.default_display_window_flag ) && ( vui_timing_info_present_flag == rhs.vui_timing_info_present_flag ) && ( vui_poc_proportional_to_timing_flag == rhs.vui_poc_proportional_to_timing_flag ) && ( vui_hrd_parameters_present_flag == rhs.vui_hrd_parameters_present_flag ) && ( bitstream_restriction_flag == rhs.bitstream_restriction_flag ) && ( tiles_fixed_structure_flag == rhs.tiles_fixed_structure_flag ) && ( motion_vectors_over_pic_boundaries_flag == rhs.motion_vectors_over_pic_boundaries_flag ) && ( restricted_ref_pic_lists_flag == rhs.restricted_ref_pic_lists_flag ); } bool operator!=( H265SpsVuiFlags const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: uint32_t aspect_ratio_info_present_flag : 1; uint32_t overscan_info_present_flag : 1; uint32_t overscan_appropriate_flag : 1; uint32_t video_signal_type_present_flag : 1; uint32_t video_full_range_flag : 1; uint32_t colour_description_present_flag : 1; uint32_t chroma_loc_info_present_flag : 1; uint32_t neutral_chroma_indication_flag : 1; uint32_t field_seq_flag : 1; uint32_t frame_field_info_present_flag : 1; uint32_t default_display_window_flag : 1; uint32_t vui_timing_info_present_flag : 1; uint32_t vui_poc_proportional_to_timing_flag : 1; uint32_t vui_hrd_parameters_present_flag : 1; uint32_t bitstream_restriction_flag : 1; uint32_t tiles_fixed_structure_flag : 1; uint32_t motion_vectors_over_pic_boundaries_flag : 1; uint32_t restricted_ref_pic_lists_flag : 1; }; struct H265SequenceParameterSetVui { using NativeType = StdVideoH265SequenceParameterSetVui; operator StdVideoH265SequenceParameterSetVui const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator StdVideoH265SequenceParameterSetVui &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } bool operator==( H265SequenceParameterSetVui const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( flags == rhs.flags ) && ( aspect_ratio_idc == rhs.aspect_ratio_idc ) && ( sar_width == rhs.sar_width ) && ( sar_height == rhs.sar_height ) && ( video_format == rhs.video_format ) && ( colour_primaries == rhs.colour_primaries ) && ( transfer_characteristics == rhs.transfer_characteristics ) && ( matrix_coeffs == rhs.matrix_coeffs ) && ( chroma_sample_loc_type_top_field == rhs.chroma_sample_loc_type_top_field ) && ( chroma_sample_loc_type_bottom_field == rhs.chroma_sample_loc_type_bottom_field ) && ( reserved1 == rhs.reserved1 ) && ( reserved2 == rhs.reserved2 ) && ( def_disp_win_left_offset == rhs.def_disp_win_left_offset ) && ( def_disp_win_right_offset == rhs.def_disp_win_right_offset ) && ( def_disp_win_top_offset == rhs.def_disp_win_top_offset ) && ( def_disp_win_bottom_offset == rhs.def_disp_win_bottom_offset ) && ( vui_num_units_in_tick == rhs.vui_num_units_in_tick ) && ( vui_time_scale == rhs.vui_time_scale ) && ( vui_num_ticks_poc_diff_one_minus1 == rhs.vui_num_ticks_poc_diff_one_minus1 ) && ( min_spatial_segmentation_idc == rhs.min_spatial_segmentation_idc ) && ( reserved3 == rhs.reserved3 ) && ( max_bytes_per_pic_denom == rhs.max_bytes_per_pic_denom ) && ( max_bits_per_min_cu_denom == rhs.max_bits_per_min_cu_denom ) && ( log2_max_mv_length_horizontal == rhs.log2_max_mv_length_horizontal ) && ( log2_max_mv_length_vertical == rhs.log2_max_mv_length_vertical ) && ( pHrdParameters == rhs.pHrdParameters ); } bool operator!=( H265SequenceParameterSetVui const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265SpsVuiFlags flags = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265AspectRatioIdc aspect_ratio_idc = VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265AspectRatioIdc::eUnspecified; uint16_t sar_width = {}; uint16_t sar_height = {}; uint8_t video_format = {}; uint8_t colour_primaries = {}; uint8_t transfer_characteristics = {}; uint8_t matrix_coeffs = {}; uint8_t chroma_sample_loc_type_top_field = {}; uint8_t chroma_sample_loc_type_bottom_field = {}; uint8_t reserved1 = {}; uint8_t reserved2 = {}; uint16_t def_disp_win_left_offset = {}; uint16_t def_disp_win_right_offset = {}; uint16_t def_disp_win_top_offset = {}; uint16_t def_disp_win_bottom_offset = {}; uint32_t vui_num_units_in_tick = {}; uint32_t vui_time_scale = {}; uint32_t vui_num_ticks_poc_diff_one_minus1 = {}; uint16_t min_spatial_segmentation_idc = {}; uint16_t reserved3 = {}; uint8_t max_bytes_per_pic_denom = {}; uint8_t max_bits_per_min_cu_denom = {}; uint8_t log2_max_mv_length_horizontal = {}; uint8_t log2_max_mv_length_vertical = {}; const VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265HrdParameters * pHrdParameters = {}; }; struct H265PredictorPaletteEntries { using NativeType = StdVideoH265PredictorPaletteEntries; operator StdVideoH265PredictorPaletteEntries const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator StdVideoH265PredictorPaletteEntries &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } bool operator==( H265PredictorPaletteEntries const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( PredictorPaletteEntries == rhs.PredictorPaletteEntries ); } bool operator!=( H265PredictorPaletteEntries const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE:: ArrayWrapper2D PredictorPaletteEntries = {}; }; struct H265SpsFlags { using NativeType = StdVideoH265SpsFlags; operator StdVideoH265SpsFlags const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator StdVideoH265SpsFlags &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } bool operator==( H265SpsFlags const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( sps_temporal_id_nesting_flag == rhs.sps_temporal_id_nesting_flag ) && ( separate_colour_plane_flag == rhs.separate_colour_plane_flag ) && ( conformance_window_flag == rhs.conformance_window_flag ) && ( sps_sub_layer_ordering_info_present_flag == rhs.sps_sub_layer_ordering_info_present_flag ) && ( scaling_list_enabled_flag == rhs.scaling_list_enabled_flag ) && ( sps_scaling_list_data_present_flag == rhs.sps_scaling_list_data_present_flag ) && ( amp_enabled_flag == rhs.amp_enabled_flag ) && ( sample_adaptive_offset_enabled_flag == rhs.sample_adaptive_offset_enabled_flag ) && ( pcm_enabled_flag == rhs.pcm_enabled_flag ) && ( pcm_loop_filter_disabled_flag == rhs.pcm_loop_filter_disabled_flag ) && ( long_term_ref_pics_present_flag == rhs.long_term_ref_pics_present_flag ) && ( sps_temporal_mvp_enabled_flag == rhs.sps_temporal_mvp_enabled_flag ) && ( strong_intra_smoothing_enabled_flag == rhs.strong_intra_smoothing_enabled_flag ) && ( vui_parameters_present_flag == rhs.vui_parameters_present_flag ) && ( sps_extension_present_flag == rhs.sps_extension_present_flag ) && ( sps_range_extension_flag == rhs.sps_range_extension_flag ) && ( transform_skip_rotation_enabled_flag == rhs.transform_skip_rotation_enabled_flag ) && ( transform_skip_context_enabled_flag == rhs.transform_skip_context_enabled_flag ) && ( implicit_rdpcm_enabled_flag == rhs.implicit_rdpcm_enabled_flag ) && ( explicit_rdpcm_enabled_flag == rhs.explicit_rdpcm_enabled_flag ) && ( extended_precision_processing_flag == rhs.extended_precision_processing_flag ) && ( intra_smoothing_disabled_flag == rhs.intra_smoothing_disabled_flag ) && ( high_precision_offsets_enabled_flag == rhs.high_precision_offsets_enabled_flag ) && ( persistent_rice_adaptation_enabled_flag == rhs.persistent_rice_adaptation_enabled_flag ) && ( cabac_bypass_alignment_enabled_flag == rhs.cabac_bypass_alignment_enabled_flag ) && ( sps_scc_extension_flag == rhs.sps_scc_extension_flag ) && ( sps_curr_pic_ref_enabled_flag == rhs.sps_curr_pic_ref_enabled_flag ) && ( palette_mode_enabled_flag == rhs.palette_mode_enabled_flag ) && ( sps_palette_predictor_initializers_present_flag == rhs.sps_palette_predictor_initializers_present_flag ) && ( intra_boundary_filtering_disabled_flag == rhs.intra_boundary_filtering_disabled_flag ); } bool operator!=( H265SpsFlags const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: uint32_t sps_temporal_id_nesting_flag : 1; uint32_t separate_colour_plane_flag : 1; uint32_t conformance_window_flag : 1; uint32_t sps_sub_layer_ordering_info_present_flag : 1; uint32_t scaling_list_enabled_flag : 1; uint32_t sps_scaling_list_data_present_flag : 1; uint32_t amp_enabled_flag : 1; uint32_t sample_adaptive_offset_enabled_flag : 1; uint32_t pcm_enabled_flag : 1; uint32_t pcm_loop_filter_disabled_flag : 1; uint32_t long_term_ref_pics_present_flag : 1; uint32_t sps_temporal_mvp_enabled_flag : 1; uint32_t strong_intra_smoothing_enabled_flag : 1; uint32_t vui_parameters_present_flag : 1; uint32_t sps_extension_present_flag : 1; uint32_t sps_range_extension_flag : 1; uint32_t transform_skip_rotation_enabled_flag : 1; uint32_t transform_skip_context_enabled_flag : 1; uint32_t implicit_rdpcm_enabled_flag : 1; uint32_t explicit_rdpcm_enabled_flag : 1; uint32_t extended_precision_processing_flag : 1; uint32_t intra_smoothing_disabled_flag : 1; uint32_t high_precision_offsets_enabled_flag : 1; uint32_t persistent_rice_adaptation_enabled_flag : 1; uint32_t cabac_bypass_alignment_enabled_flag : 1; uint32_t sps_scc_extension_flag : 1; uint32_t sps_curr_pic_ref_enabled_flag : 1; uint32_t palette_mode_enabled_flag : 1; uint32_t sps_palette_predictor_initializers_present_flag : 1; uint32_t intra_boundary_filtering_disabled_flag : 1; }; struct H265ShortTermRefPicSetFlags { using NativeType = StdVideoH265ShortTermRefPicSetFlags; operator StdVideoH265ShortTermRefPicSetFlags const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator StdVideoH265ShortTermRefPicSetFlags &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } bool operator==( H265ShortTermRefPicSetFlags const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( inter_ref_pic_set_prediction_flag == rhs.inter_ref_pic_set_prediction_flag ) && ( delta_rps_sign == rhs.delta_rps_sign ); } bool operator!=( H265ShortTermRefPicSetFlags const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: uint32_t inter_ref_pic_set_prediction_flag : 1; uint32_t delta_rps_sign : 1; }; struct H265ShortTermRefPicSet { using NativeType = StdVideoH265ShortTermRefPicSet; operator StdVideoH265ShortTermRefPicSet const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator StdVideoH265ShortTermRefPicSet &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } bool operator==( H265ShortTermRefPicSet const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( flags == rhs.flags ) && ( delta_idx_minus1 == rhs.delta_idx_minus1 ) && ( use_delta_flag == rhs.use_delta_flag ) && ( abs_delta_rps_minus1 == rhs.abs_delta_rps_minus1 ) && ( used_by_curr_pic_flag == rhs.used_by_curr_pic_flag ) && ( used_by_curr_pic_s0_flag == rhs.used_by_curr_pic_s0_flag ) && ( used_by_curr_pic_s1_flag == rhs.used_by_curr_pic_s1_flag ) && ( reserved1 == rhs.reserved1 ) && ( reserved2 == rhs.reserved2 ) && ( reserved3 == rhs.reserved3 ) && ( num_negative_pics == rhs.num_negative_pics ) && ( num_positive_pics == rhs.num_positive_pics ) && ( delta_poc_s0_minus1 == rhs.delta_poc_s0_minus1 ) && ( delta_poc_s1_minus1 == rhs.delta_poc_s1_minus1 ); } bool operator!=( H265ShortTermRefPicSet const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265ShortTermRefPicSetFlags flags = {}; uint32_t delta_idx_minus1 = {}; uint16_t use_delta_flag = {}; uint16_t abs_delta_rps_minus1 = {}; uint16_t used_by_curr_pic_flag = {}; uint16_t used_by_curr_pic_s0_flag = {}; uint16_t used_by_curr_pic_s1_flag = {}; uint16_t reserved1 = {}; uint8_t reserved2 = {}; uint8_t reserved3 = {}; uint8_t num_negative_pics = {}; uint8_t num_positive_pics = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D delta_poc_s0_minus1 = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D delta_poc_s1_minus1 = {}; }; struct H265LongTermRefPicsSps { using NativeType = StdVideoH265LongTermRefPicsSps; operator StdVideoH265LongTermRefPicsSps const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator StdVideoH265LongTermRefPicsSps &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } bool operator==( H265LongTermRefPicsSps const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( used_by_curr_pic_lt_sps_flag == rhs.used_by_curr_pic_lt_sps_flag ) && ( lt_ref_pic_poc_lsb_sps == rhs.lt_ref_pic_poc_lsb_sps ); } bool operator!=( H265LongTermRefPicsSps const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: uint32_t used_by_curr_pic_lt_sps_flag = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D lt_ref_pic_poc_lsb_sps = {}; }; struct H265SequenceParameterSet { using NativeType = StdVideoH265SequenceParameterSet; operator StdVideoH265SequenceParameterSet const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator StdVideoH265SequenceParameterSet &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } bool operator==( H265SequenceParameterSet const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( flags == rhs.flags ) && ( chroma_format_idc == rhs.chroma_format_idc ) && ( pic_width_in_luma_samples == rhs.pic_width_in_luma_samples ) && ( pic_height_in_luma_samples == rhs.pic_height_in_luma_samples ) && ( sps_video_parameter_set_id == rhs.sps_video_parameter_set_id ) && ( sps_max_sub_layers_minus1 == rhs.sps_max_sub_layers_minus1 ) && ( sps_seq_parameter_set_id == rhs.sps_seq_parameter_set_id ) && ( bit_depth_luma_minus8 == rhs.bit_depth_luma_minus8 ) && ( bit_depth_chroma_minus8 == rhs.bit_depth_chroma_minus8 ) && ( log2_max_pic_order_cnt_lsb_minus4 == rhs.log2_max_pic_order_cnt_lsb_minus4 ) && ( log2_min_luma_coding_block_size_minus3 == rhs.log2_min_luma_coding_block_size_minus3 ) && ( log2_diff_max_min_luma_coding_block_size == rhs.log2_diff_max_min_luma_coding_block_size ) && ( log2_min_luma_transform_block_size_minus2 == rhs.log2_min_luma_transform_block_size_minus2 ) && ( log2_diff_max_min_luma_transform_block_size == rhs.log2_diff_max_min_luma_transform_block_size ) && ( max_transform_hierarchy_depth_inter == rhs.max_transform_hierarchy_depth_inter ) && ( max_transform_hierarchy_depth_intra == rhs.max_transform_hierarchy_depth_intra ) && ( num_short_term_ref_pic_sets == rhs.num_short_term_ref_pic_sets ) && ( num_long_term_ref_pics_sps == rhs.num_long_term_ref_pics_sps ) && ( pcm_sample_bit_depth_luma_minus1 == rhs.pcm_sample_bit_depth_luma_minus1 ) && ( pcm_sample_bit_depth_chroma_minus1 == rhs.pcm_sample_bit_depth_chroma_minus1 ) && ( log2_min_pcm_luma_coding_block_size_minus3 == rhs.log2_min_pcm_luma_coding_block_size_minus3 ) && ( log2_diff_max_min_pcm_luma_coding_block_size == rhs.log2_diff_max_min_pcm_luma_coding_block_size ) && ( reserved1 == rhs.reserved1 ) && ( reserved2 == rhs.reserved2 ) && ( palette_max_size == rhs.palette_max_size ) && ( delta_palette_max_predictor_size == rhs.delta_palette_max_predictor_size ) && ( motion_vector_resolution_control_idc == rhs.motion_vector_resolution_control_idc ) && ( sps_num_palette_predictor_initializers_minus1 == rhs.sps_num_palette_predictor_initializers_minus1 ) && ( conf_win_left_offset == rhs.conf_win_left_offset ) && ( conf_win_right_offset == rhs.conf_win_right_offset ) && ( conf_win_top_offset == rhs.conf_win_top_offset ) && ( conf_win_bottom_offset == rhs.conf_win_bottom_offset ) && ( pProfileTierLevel == rhs.pProfileTierLevel ) && ( pDecPicBufMgr == rhs.pDecPicBufMgr ) && ( pScalingLists == rhs.pScalingLists ) && ( pShortTermRefPicSet == rhs.pShortTermRefPicSet ) && ( pLongTermRefPicsSps == rhs.pLongTermRefPicsSps ) && ( pSequenceParameterSetVui == rhs.pSequenceParameterSetVui ) && ( pPredictorPaletteEntries == rhs.pPredictorPaletteEntries ); } bool operator!=( H265SequenceParameterSet const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265SpsFlags flags = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265ChromaFormatIdc chroma_format_idc = VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265ChromaFormatIdc::eMonochrome; uint32_t pic_width_in_luma_samples = {}; uint32_t pic_height_in_luma_samples = {}; uint8_t sps_video_parameter_set_id = {}; uint8_t sps_max_sub_layers_minus1 = {}; uint8_t sps_seq_parameter_set_id = {}; uint8_t bit_depth_luma_minus8 = {}; uint8_t bit_depth_chroma_minus8 = {}; uint8_t log2_max_pic_order_cnt_lsb_minus4 = {}; uint8_t log2_min_luma_coding_block_size_minus3 = {}; uint8_t log2_diff_max_min_luma_coding_block_size = {}; uint8_t log2_min_luma_transform_block_size_minus2 = {}; uint8_t log2_diff_max_min_luma_transform_block_size = {}; uint8_t max_transform_hierarchy_depth_inter = {}; uint8_t max_transform_hierarchy_depth_intra = {}; uint8_t num_short_term_ref_pic_sets = {}; uint8_t num_long_term_ref_pics_sps = {}; uint8_t pcm_sample_bit_depth_luma_minus1 = {}; uint8_t pcm_sample_bit_depth_chroma_minus1 = {}; uint8_t log2_min_pcm_luma_coding_block_size_minus3 = {}; uint8_t log2_diff_max_min_pcm_luma_coding_block_size = {}; uint8_t reserved1 = {}; uint8_t reserved2 = {}; uint8_t palette_max_size = {}; uint8_t delta_palette_max_predictor_size = {}; uint8_t motion_vector_resolution_control_idc = {}; uint8_t sps_num_palette_predictor_initializers_minus1 = {}; uint32_t conf_win_left_offset = {}; uint32_t conf_win_right_offset = {}; uint32_t conf_win_top_offset = {}; uint32_t conf_win_bottom_offset = {}; const VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265ProfileTierLevel * pProfileTierLevel = {}; const VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265DecPicBufMgr * pDecPicBufMgr = {}; const VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265ScalingLists * pScalingLists = {}; const VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265ShortTermRefPicSet * pShortTermRefPicSet = {}; const VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265LongTermRefPicsSps * pLongTermRefPicsSps = {}; const VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265SequenceParameterSetVui * pSequenceParameterSetVui = {}; const VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265PredictorPaletteEntries * pPredictorPaletteEntries = {}; }; struct H265PpsFlags { using NativeType = StdVideoH265PpsFlags; operator StdVideoH265PpsFlags const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator StdVideoH265PpsFlags &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } bool operator==( H265PpsFlags const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( dependent_slice_segments_enabled_flag == rhs.dependent_slice_segments_enabled_flag ) && ( output_flag_present_flag == rhs.output_flag_present_flag ) && ( sign_data_hiding_enabled_flag == rhs.sign_data_hiding_enabled_flag ) && ( cabac_init_present_flag == rhs.cabac_init_present_flag ) && ( constrained_intra_pred_flag == rhs.constrained_intra_pred_flag ) && ( transform_skip_enabled_flag == rhs.transform_skip_enabled_flag ) && ( cu_qp_delta_enabled_flag == rhs.cu_qp_delta_enabled_flag ) && ( pps_slice_chroma_qp_offsets_present_flag == rhs.pps_slice_chroma_qp_offsets_present_flag ) && ( weighted_pred_flag == rhs.weighted_pred_flag ) && ( weighted_bipred_flag == rhs.weighted_bipred_flag ) && ( transquant_bypass_enabled_flag == rhs.transquant_bypass_enabled_flag ) && ( tiles_enabled_flag == rhs.tiles_enabled_flag ) && ( entropy_coding_sync_enabled_flag == rhs.entropy_coding_sync_enabled_flag ) && ( uniform_spacing_flag == rhs.uniform_spacing_flag ) && ( loop_filter_across_tiles_enabled_flag == rhs.loop_filter_across_tiles_enabled_flag ) && ( pps_loop_filter_across_slices_enabled_flag == rhs.pps_loop_filter_across_slices_enabled_flag ) && ( deblocking_filter_control_present_flag == rhs.deblocking_filter_control_present_flag ) && ( deblocking_filter_override_enabled_flag == rhs.deblocking_filter_override_enabled_flag ) && ( pps_deblocking_filter_disabled_flag == rhs.pps_deblocking_filter_disabled_flag ) && ( pps_scaling_list_data_present_flag == rhs.pps_scaling_list_data_present_flag ) && ( lists_modification_present_flag == rhs.lists_modification_present_flag ) && ( slice_segment_header_extension_present_flag == rhs.slice_segment_header_extension_present_flag ) && ( pps_extension_present_flag == rhs.pps_extension_present_flag ) && ( cross_component_prediction_enabled_flag == rhs.cross_component_prediction_enabled_flag ) && ( chroma_qp_offset_list_enabled_flag == rhs.chroma_qp_offset_list_enabled_flag ) && ( pps_curr_pic_ref_enabled_flag == rhs.pps_curr_pic_ref_enabled_flag ) && ( residual_adaptive_colour_transform_enabled_flag == rhs.residual_adaptive_colour_transform_enabled_flag ) && ( pps_slice_act_qp_offsets_present_flag == rhs.pps_slice_act_qp_offsets_present_flag ) && ( pps_palette_predictor_initializers_present_flag == rhs.pps_palette_predictor_initializers_present_flag ) && ( monochrome_palette_flag == rhs.monochrome_palette_flag ) && ( pps_range_extension_flag == rhs.pps_range_extension_flag ); } bool operator!=( H265PpsFlags const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: uint32_t dependent_slice_segments_enabled_flag : 1; uint32_t output_flag_present_flag : 1; uint32_t sign_data_hiding_enabled_flag : 1; uint32_t cabac_init_present_flag : 1; uint32_t constrained_intra_pred_flag : 1; uint32_t transform_skip_enabled_flag : 1; uint32_t cu_qp_delta_enabled_flag : 1; uint32_t pps_slice_chroma_qp_offsets_present_flag : 1; uint32_t weighted_pred_flag : 1; uint32_t weighted_bipred_flag : 1; uint32_t transquant_bypass_enabled_flag : 1; uint32_t tiles_enabled_flag : 1; uint32_t entropy_coding_sync_enabled_flag : 1; uint32_t uniform_spacing_flag : 1; uint32_t loop_filter_across_tiles_enabled_flag : 1; uint32_t pps_loop_filter_across_slices_enabled_flag : 1; uint32_t deblocking_filter_control_present_flag : 1; uint32_t deblocking_filter_override_enabled_flag : 1; uint32_t pps_deblocking_filter_disabled_flag : 1; uint32_t pps_scaling_list_data_present_flag : 1; uint32_t lists_modification_present_flag : 1; uint32_t slice_segment_header_extension_present_flag : 1; uint32_t pps_extension_present_flag : 1; uint32_t cross_component_prediction_enabled_flag : 1; uint32_t chroma_qp_offset_list_enabled_flag : 1; uint32_t pps_curr_pic_ref_enabled_flag : 1; uint32_t residual_adaptive_colour_transform_enabled_flag : 1; uint32_t pps_slice_act_qp_offsets_present_flag : 1; uint32_t pps_palette_predictor_initializers_present_flag : 1; uint32_t monochrome_palette_flag : 1; uint32_t pps_range_extension_flag : 1; }; struct H265PictureParameterSet { using NativeType = StdVideoH265PictureParameterSet; operator StdVideoH265PictureParameterSet const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator StdVideoH265PictureParameterSet &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } bool operator==( H265PictureParameterSet const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( flags == rhs.flags ) && ( pps_pic_parameter_set_id == rhs.pps_pic_parameter_set_id ) && ( pps_seq_parameter_set_id == rhs.pps_seq_parameter_set_id ) && ( sps_video_parameter_set_id == rhs.sps_video_parameter_set_id ) && ( num_extra_slice_header_bits == rhs.num_extra_slice_header_bits ) && ( num_ref_idx_l0_default_active_minus1 == rhs.num_ref_idx_l0_default_active_minus1 ) && ( num_ref_idx_l1_default_active_minus1 == rhs.num_ref_idx_l1_default_active_minus1 ) && ( init_qp_minus26 == rhs.init_qp_minus26 ) && ( diff_cu_qp_delta_depth == rhs.diff_cu_qp_delta_depth ) && ( pps_cb_qp_offset == rhs.pps_cb_qp_offset ) && ( pps_cr_qp_offset == rhs.pps_cr_qp_offset ) && ( pps_beta_offset_div2 == rhs.pps_beta_offset_div2 ) && ( pps_tc_offset_div2 == rhs.pps_tc_offset_div2 ) && ( log2_parallel_merge_level_minus2 == rhs.log2_parallel_merge_level_minus2 ) && ( log2_max_transform_skip_block_size_minus2 == rhs.log2_max_transform_skip_block_size_minus2 ) && ( diff_cu_chroma_qp_offset_depth == rhs.diff_cu_chroma_qp_offset_depth ) && ( chroma_qp_offset_list_len_minus1 == rhs.chroma_qp_offset_list_len_minus1 ) && ( cb_qp_offset_list == rhs.cb_qp_offset_list ) && ( cr_qp_offset_list == rhs.cr_qp_offset_list ) && ( log2_sao_offset_scale_luma == rhs.log2_sao_offset_scale_luma ) && ( log2_sao_offset_scale_chroma == rhs.log2_sao_offset_scale_chroma ) && ( pps_act_y_qp_offset_plus5 == rhs.pps_act_y_qp_offset_plus5 ) && ( pps_act_cb_qp_offset_plus5 == rhs.pps_act_cb_qp_offset_plus5 ) && ( pps_act_cr_qp_offset_plus3 == rhs.pps_act_cr_qp_offset_plus3 ) && ( pps_num_palette_predictor_initializers == rhs.pps_num_palette_predictor_initializers ) && ( luma_bit_depth_entry_minus8 == rhs.luma_bit_depth_entry_minus8 ) && ( chroma_bit_depth_entry_minus8 == rhs.chroma_bit_depth_entry_minus8 ) && ( num_tile_columns_minus1 == rhs.num_tile_columns_minus1 ) && ( num_tile_rows_minus1 == rhs.num_tile_rows_minus1 ) && ( reserved1 == rhs.reserved1 ) && ( reserved2 == rhs.reserved2 ) && ( column_width_minus1 == rhs.column_width_minus1 ) && ( row_height_minus1 == rhs.row_height_minus1 ) && ( reserved3 == rhs.reserved3 ) && ( pScalingLists == rhs.pScalingLists ) && ( pPredictorPaletteEntries == rhs.pPredictorPaletteEntries ); } bool operator!=( H265PictureParameterSet const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265PpsFlags flags = {}; uint8_t pps_pic_parameter_set_id = {}; uint8_t pps_seq_parameter_set_id = {}; uint8_t sps_video_parameter_set_id = {}; uint8_t num_extra_slice_header_bits = {}; uint8_t num_ref_idx_l0_default_active_minus1 = {}; uint8_t num_ref_idx_l1_default_active_minus1 = {}; int8_t init_qp_minus26 = {}; uint8_t diff_cu_qp_delta_depth = {}; int8_t pps_cb_qp_offset = {}; int8_t pps_cr_qp_offset = {}; int8_t pps_beta_offset_div2 = {}; int8_t pps_tc_offset_div2 = {}; uint8_t log2_parallel_merge_level_minus2 = {}; uint8_t log2_max_transform_skip_block_size_minus2 = {}; uint8_t diff_cu_chroma_qp_offset_depth = {}; uint8_t chroma_qp_offset_list_len_minus1 = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D cb_qp_offset_list = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D cr_qp_offset_list = {}; uint8_t log2_sao_offset_scale_luma = {}; uint8_t log2_sao_offset_scale_chroma = {}; int8_t pps_act_y_qp_offset_plus5 = {}; int8_t pps_act_cb_qp_offset_plus5 = {}; int8_t pps_act_cr_qp_offset_plus3 = {}; uint8_t pps_num_palette_predictor_initializers = {}; uint8_t luma_bit_depth_entry_minus8 = {}; uint8_t chroma_bit_depth_entry_minus8 = {}; uint8_t num_tile_columns_minus1 = {}; uint8_t num_tile_rows_minus1 = {}; uint8_t reserved1 = {}; uint8_t reserved2 = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D column_width_minus1 = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D row_height_minus1 = {}; uint32_t reserved3 = {}; const VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265ScalingLists * pScalingLists = {}; const VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265PredictorPaletteEntries * pPredictorPaletteEntries = {}; }; //=== vulkan_video_codec_h265std_decode === struct DecodeH265PictureInfoFlags { using NativeType = StdVideoDecodeH265PictureInfoFlags; operator StdVideoDecodeH265PictureInfoFlags const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator StdVideoDecodeH265PictureInfoFlags &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } bool operator==( DecodeH265PictureInfoFlags const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( IrapPicFlag == rhs.IrapPicFlag ) && ( IdrPicFlag == rhs.IdrPicFlag ) && ( IsReference == rhs.IsReference ) && ( short_term_ref_pic_set_sps_flag == rhs.short_term_ref_pic_set_sps_flag ); } bool operator!=( DecodeH265PictureInfoFlags const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: uint32_t IrapPicFlag : 1; uint32_t IdrPicFlag : 1; uint32_t IsReference : 1; uint32_t short_term_ref_pic_set_sps_flag : 1; }; struct DecodeH265PictureInfo { using NativeType = StdVideoDecodeH265PictureInfo; operator StdVideoDecodeH265PictureInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator StdVideoDecodeH265PictureInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } bool operator==( DecodeH265PictureInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( flags == rhs.flags ) && ( sps_video_parameter_set_id == rhs.sps_video_parameter_set_id ) && ( pps_seq_parameter_set_id == rhs.pps_seq_parameter_set_id ) && ( pps_pic_parameter_set_id == rhs.pps_pic_parameter_set_id ) && ( NumDeltaPocsOfRefRpsIdx == rhs.NumDeltaPocsOfRefRpsIdx ) && ( PicOrderCntVal == rhs.PicOrderCntVal ) && ( NumBitsForSTRefPicSetInSlice == rhs.NumBitsForSTRefPicSetInSlice ) && ( reserved == rhs.reserved ) && ( RefPicSetStCurrBefore == rhs.RefPicSetStCurrBefore ) && ( RefPicSetStCurrAfter == rhs.RefPicSetStCurrAfter ) && ( RefPicSetLtCurr == rhs.RefPicSetLtCurr ); } bool operator!=( DecodeH265PictureInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::DecodeH265PictureInfoFlags flags = {}; uint8_t sps_video_parameter_set_id = {}; uint8_t pps_seq_parameter_set_id = {}; uint8_t pps_pic_parameter_set_id = {}; uint8_t NumDeltaPocsOfRefRpsIdx = {}; int32_t PicOrderCntVal = {}; uint16_t NumBitsForSTRefPicSetInSlice = {}; uint16_t reserved = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D RefPicSetStCurrBefore = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D RefPicSetStCurrAfter = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D RefPicSetLtCurr = {}; }; struct DecodeH265ReferenceInfoFlags { using NativeType = StdVideoDecodeH265ReferenceInfoFlags; operator StdVideoDecodeH265ReferenceInfoFlags const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator StdVideoDecodeH265ReferenceInfoFlags &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } bool operator==( DecodeH265ReferenceInfoFlags const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( used_for_long_term_reference == rhs.used_for_long_term_reference ) && ( unused_for_reference == rhs.unused_for_reference ); } bool operator!=( DecodeH265ReferenceInfoFlags const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: uint32_t used_for_long_term_reference : 1; uint32_t unused_for_reference : 1; }; struct DecodeH265ReferenceInfo { using NativeType = StdVideoDecodeH265ReferenceInfo; operator StdVideoDecodeH265ReferenceInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator StdVideoDecodeH265ReferenceInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } bool operator==( DecodeH265ReferenceInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( flags == rhs.flags ) && ( PicOrderCntVal == rhs.PicOrderCntVal ); } bool operator!=( DecodeH265ReferenceInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::DecodeH265ReferenceInfoFlags flags = {}; int32_t PicOrderCntVal = {}; }; //=== vulkan_video_codec_h265std_encode === struct EncodeH265WeightTableFlags { using NativeType = StdVideoEncodeH265WeightTableFlags; operator StdVideoEncodeH265WeightTableFlags const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator StdVideoEncodeH265WeightTableFlags &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } bool operator==( EncodeH265WeightTableFlags const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( luma_weight_l0_flag == rhs.luma_weight_l0_flag ) && ( chroma_weight_l0_flag == rhs.chroma_weight_l0_flag ) && ( luma_weight_l1_flag == rhs.luma_weight_l1_flag ) && ( chroma_weight_l1_flag == rhs.chroma_weight_l1_flag ); } bool operator!=( EncodeH265WeightTableFlags const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: uint16_t luma_weight_l0_flag = {}; uint16_t chroma_weight_l0_flag = {}; uint16_t luma_weight_l1_flag = {}; uint16_t chroma_weight_l1_flag = {}; }; struct EncodeH265WeightTable { using NativeType = StdVideoEncodeH265WeightTable; operator StdVideoEncodeH265WeightTable const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator StdVideoEncodeH265WeightTable &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } bool operator==( EncodeH265WeightTable const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( flags == rhs.flags ) && ( luma_log2_weight_denom == rhs.luma_log2_weight_denom ) && ( delta_chroma_log2_weight_denom == rhs.delta_chroma_log2_weight_denom ) && ( delta_luma_weight_l0 == rhs.delta_luma_weight_l0 ) && ( luma_offset_l0 == rhs.luma_offset_l0 ) && ( delta_chroma_weight_l0 == rhs.delta_chroma_weight_l0 ) && ( delta_chroma_offset_l0 == rhs.delta_chroma_offset_l0 ) && ( delta_luma_weight_l1 == rhs.delta_luma_weight_l1 ) && ( luma_offset_l1 == rhs.luma_offset_l1 ) && ( delta_chroma_weight_l1 == rhs.delta_chroma_weight_l1 ) && ( delta_chroma_offset_l1 == rhs.delta_chroma_offset_l1 ); } bool operator!=( EncodeH265WeightTable const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::EncodeH265WeightTableFlags flags = {}; uint8_t luma_log2_weight_denom = {}; int8_t delta_chroma_log2_weight_denom = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D delta_luma_weight_l0 = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D luma_offset_l0 = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper2D delta_chroma_weight_l0 = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper2D delta_chroma_offset_l0 = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D delta_luma_weight_l1 = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D luma_offset_l1 = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper2D delta_chroma_weight_l1 = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper2D delta_chroma_offset_l1 = {}; }; struct EncodeH265SliceSegmentHeaderFlags { using NativeType = StdVideoEncodeH265SliceSegmentHeaderFlags; operator StdVideoEncodeH265SliceSegmentHeaderFlags const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator StdVideoEncodeH265SliceSegmentHeaderFlags &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } bool operator==( EncodeH265SliceSegmentHeaderFlags const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( first_slice_segment_in_pic_flag == rhs.first_slice_segment_in_pic_flag ) && ( dependent_slice_segment_flag == rhs.dependent_slice_segment_flag ) && ( slice_sao_luma_flag == rhs.slice_sao_luma_flag ) && ( slice_sao_chroma_flag == rhs.slice_sao_chroma_flag ) && ( num_ref_idx_active_override_flag == rhs.num_ref_idx_active_override_flag ) && ( mvd_l1_zero_flag == rhs.mvd_l1_zero_flag ) && ( cabac_init_flag == rhs.cabac_init_flag ) && ( cu_chroma_qp_offset_enabled_flag == rhs.cu_chroma_qp_offset_enabled_flag ) && ( deblocking_filter_override_flag == rhs.deblocking_filter_override_flag ) && ( slice_deblocking_filter_disabled_flag == rhs.slice_deblocking_filter_disabled_flag ) && ( collocated_from_l0_flag == rhs.collocated_from_l0_flag ) && ( slice_loop_filter_across_slices_enabled_flag == rhs.slice_loop_filter_across_slices_enabled_flag ) && ( reserved == rhs.reserved ); } bool operator!=( EncodeH265SliceSegmentHeaderFlags const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: uint32_t first_slice_segment_in_pic_flag : 1; uint32_t dependent_slice_segment_flag : 1; uint32_t slice_sao_luma_flag : 1; uint32_t slice_sao_chroma_flag : 1; uint32_t num_ref_idx_active_override_flag : 1; uint32_t mvd_l1_zero_flag : 1; uint32_t cabac_init_flag : 1; uint32_t cu_chroma_qp_offset_enabled_flag : 1; uint32_t deblocking_filter_override_flag : 1; uint32_t slice_deblocking_filter_disabled_flag : 1; uint32_t collocated_from_l0_flag : 1; uint32_t slice_loop_filter_across_slices_enabled_flag : 1; uint32_t reserved : 20; }; struct EncodeH265SliceSegmentHeader { using NativeType = StdVideoEncodeH265SliceSegmentHeader; operator StdVideoEncodeH265SliceSegmentHeader const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator StdVideoEncodeH265SliceSegmentHeader &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } bool operator==( EncodeH265SliceSegmentHeader const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( flags == rhs.flags ) && ( slice_type == rhs.slice_type ) && ( slice_segment_address == rhs.slice_segment_address ) && ( collocated_ref_idx == rhs.collocated_ref_idx ) && ( MaxNumMergeCand == rhs.MaxNumMergeCand ) && ( slice_cb_qp_offset == rhs.slice_cb_qp_offset ) && ( slice_cr_qp_offset == rhs.slice_cr_qp_offset ) && ( slice_beta_offset_div2 == rhs.slice_beta_offset_div2 ) && ( slice_tc_offset_div2 == rhs.slice_tc_offset_div2 ) && ( slice_act_y_qp_offset == rhs.slice_act_y_qp_offset ) && ( slice_act_cb_qp_offset == rhs.slice_act_cb_qp_offset ) && ( slice_act_cr_qp_offset == rhs.slice_act_cr_qp_offset ) && ( slice_qp_delta == rhs.slice_qp_delta ) && ( reserved1 == rhs.reserved1 ) && ( pWeightTable == rhs.pWeightTable ); } bool operator!=( EncodeH265SliceSegmentHeader const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::EncodeH265SliceSegmentHeaderFlags flags = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265SliceType slice_type = VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265SliceType::eB; uint32_t slice_segment_address = {}; uint8_t collocated_ref_idx = {}; uint8_t MaxNumMergeCand = {}; int8_t slice_cb_qp_offset = {}; int8_t slice_cr_qp_offset = {}; int8_t slice_beta_offset_div2 = {}; int8_t slice_tc_offset_div2 = {}; int8_t slice_act_y_qp_offset = {}; int8_t slice_act_cb_qp_offset = {}; int8_t slice_act_cr_qp_offset = {}; int8_t slice_qp_delta = {}; uint16_t reserved1 = {}; const VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::EncodeH265WeightTable * pWeightTable = {}; }; struct EncodeH265ReferenceListsInfoFlags { using NativeType = StdVideoEncodeH265ReferenceListsInfoFlags; operator StdVideoEncodeH265ReferenceListsInfoFlags const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator StdVideoEncodeH265ReferenceListsInfoFlags &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } bool operator==( EncodeH265ReferenceListsInfoFlags const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( ref_pic_list_modification_flag_l0 == rhs.ref_pic_list_modification_flag_l0 ) && ( ref_pic_list_modification_flag_l1 == rhs.ref_pic_list_modification_flag_l1 ) && ( reserved == rhs.reserved ); } bool operator!=( EncodeH265ReferenceListsInfoFlags const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: uint32_t ref_pic_list_modification_flag_l0 : 1; uint32_t ref_pic_list_modification_flag_l1 : 1; uint32_t reserved : 30; }; struct EncodeH265ReferenceListsInfo { using NativeType = StdVideoEncodeH265ReferenceListsInfo; operator StdVideoEncodeH265ReferenceListsInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator StdVideoEncodeH265ReferenceListsInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } bool operator==( EncodeH265ReferenceListsInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( flags == rhs.flags ) && ( num_ref_idx_l0_active_minus1 == rhs.num_ref_idx_l0_active_minus1 ) && ( num_ref_idx_l1_active_minus1 == rhs.num_ref_idx_l1_active_minus1 ) && ( RefPicList0 == rhs.RefPicList0 ) && ( RefPicList1 == rhs.RefPicList1 ) && ( list_entry_l0 == rhs.list_entry_l0 ) && ( list_entry_l1 == rhs.list_entry_l1 ); } bool operator!=( EncodeH265ReferenceListsInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::EncodeH265ReferenceListsInfoFlags flags = {}; uint8_t num_ref_idx_l0_active_minus1 = {}; uint8_t num_ref_idx_l1_active_minus1 = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D RefPicList0 = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D RefPicList1 = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D list_entry_l0 = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D list_entry_l1 = {}; }; struct EncodeH265PictureInfoFlags { using NativeType = StdVideoEncodeH265PictureInfoFlags; operator StdVideoEncodeH265PictureInfoFlags const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator StdVideoEncodeH265PictureInfoFlags &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } bool operator==( EncodeH265PictureInfoFlags const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( is_reference == rhs.is_reference ) && ( IrapPicFlag == rhs.IrapPicFlag ) && ( used_for_long_term_reference == rhs.used_for_long_term_reference ) && ( discardable_flag == rhs.discardable_flag ) && ( cross_layer_bla_flag == rhs.cross_layer_bla_flag ) && ( pic_output_flag == rhs.pic_output_flag ) && ( no_output_of_prior_pics_flag == rhs.no_output_of_prior_pics_flag ) && ( short_term_ref_pic_set_sps_flag == rhs.short_term_ref_pic_set_sps_flag ) && ( slice_temporal_mvp_enabled_flag == rhs.slice_temporal_mvp_enabled_flag ) && ( reserved == rhs.reserved ); } bool operator!=( EncodeH265PictureInfoFlags const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: uint32_t is_reference : 1; uint32_t IrapPicFlag : 1; uint32_t used_for_long_term_reference : 1; uint32_t discardable_flag : 1; uint32_t cross_layer_bla_flag : 1; uint32_t pic_output_flag : 1; uint32_t no_output_of_prior_pics_flag : 1; uint32_t short_term_ref_pic_set_sps_flag : 1; uint32_t slice_temporal_mvp_enabled_flag : 1; uint32_t reserved : 23; }; struct EncodeH265LongTermRefPics { using NativeType = StdVideoEncodeH265LongTermRefPics; operator StdVideoEncodeH265LongTermRefPics const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator StdVideoEncodeH265LongTermRefPics &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } bool operator==( EncodeH265LongTermRefPics const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( num_long_term_sps == rhs.num_long_term_sps ) && ( num_long_term_pics == rhs.num_long_term_pics ) && ( lt_idx_sps == rhs.lt_idx_sps ) && ( poc_lsb_lt == rhs.poc_lsb_lt ) && ( used_by_curr_pic_lt_flag == rhs.used_by_curr_pic_lt_flag ) && ( delta_poc_msb_present_flag == rhs.delta_poc_msb_present_flag ) && ( delta_poc_msb_cycle_lt == rhs.delta_poc_msb_cycle_lt ); } bool operator!=( EncodeH265LongTermRefPics const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: uint8_t num_long_term_sps = {}; uint8_t num_long_term_pics = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D lt_idx_sps = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D poc_lsb_lt = {}; uint16_t used_by_curr_pic_lt_flag = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D delta_poc_msb_present_flag = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D delta_poc_msb_cycle_lt = {}; }; struct EncodeH265PictureInfo { using NativeType = StdVideoEncodeH265PictureInfo; operator StdVideoEncodeH265PictureInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator StdVideoEncodeH265PictureInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } bool operator==( EncodeH265PictureInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( flags == rhs.flags ) && ( pic_type == rhs.pic_type ) && ( sps_video_parameter_set_id == rhs.sps_video_parameter_set_id ) && ( pps_seq_parameter_set_id == rhs.pps_seq_parameter_set_id ) && ( pps_pic_parameter_set_id == rhs.pps_pic_parameter_set_id ) && ( short_term_ref_pic_set_idx == rhs.short_term_ref_pic_set_idx ) && ( PicOrderCntVal == rhs.PicOrderCntVal ) && ( TemporalId == rhs.TemporalId ) && ( reserved1 == rhs.reserved1 ) && ( pRefLists == rhs.pRefLists ) && ( pShortTermRefPicSet == rhs.pShortTermRefPicSet ) && ( pLongTermRefPics == rhs.pLongTermRefPics ); } bool operator!=( EncodeH265PictureInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::EncodeH265PictureInfoFlags flags = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265PictureType pic_type = VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265PictureType::eP; uint8_t sps_video_parameter_set_id = {}; uint8_t pps_seq_parameter_set_id = {}; uint8_t pps_pic_parameter_set_id = {}; uint8_t short_term_ref_pic_set_idx = {}; int32_t PicOrderCntVal = {}; uint8_t TemporalId = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D reserved1 = {}; const VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::EncodeH265ReferenceListsInfo * pRefLists = {}; const VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265ShortTermRefPicSet * pShortTermRefPicSet = {}; const VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::EncodeH265LongTermRefPics * pLongTermRefPics = {}; }; struct EncodeH265ReferenceInfoFlags { using NativeType = StdVideoEncodeH265ReferenceInfoFlags; operator StdVideoEncodeH265ReferenceInfoFlags const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator StdVideoEncodeH265ReferenceInfoFlags &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } bool operator==( EncodeH265ReferenceInfoFlags const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( used_for_long_term_reference == rhs.used_for_long_term_reference ) && ( unused_for_reference == rhs.unused_for_reference ) && ( reserved == rhs.reserved ); } bool operator!=( EncodeH265ReferenceInfoFlags const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: uint32_t used_for_long_term_reference : 1; uint32_t unused_for_reference : 1; uint32_t reserved : 30; }; struct EncodeH265ReferenceInfo { using NativeType = StdVideoEncodeH265ReferenceInfo; operator StdVideoEncodeH265ReferenceInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator StdVideoEncodeH265ReferenceInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } bool operator==( EncodeH265ReferenceInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( flags == rhs.flags ) && ( pic_type == rhs.pic_type ) && ( PicOrderCntVal == rhs.PicOrderCntVal ) && ( TemporalId == rhs.TemporalId ); } bool operator!=( EncodeH265ReferenceInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::EncodeH265ReferenceInfoFlags flags = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265PictureType pic_type = VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265PictureType::eP; int32_t PicOrderCntVal = {}; uint8_t TemporalId = {}; }; //=== vulkan_video_codec_av1std === struct AV1ColorConfigFlags { using NativeType = StdVideoAV1ColorConfigFlags; operator StdVideoAV1ColorConfigFlags const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator StdVideoAV1ColorConfigFlags &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } bool operator==( AV1ColorConfigFlags const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( mono_chrome == rhs.mono_chrome ) && ( color_range == rhs.color_range ) && ( separate_uv_delta_q == rhs.separate_uv_delta_q ) && ( color_description_present_flag == rhs.color_description_present_flag ) && ( reserved == rhs.reserved ); } bool operator!=( AV1ColorConfigFlags const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: uint32_t mono_chrome : 1; uint32_t color_range : 1; uint32_t separate_uv_delta_q : 1; uint32_t color_description_present_flag : 1; uint32_t reserved : 28; }; struct AV1ColorConfig { using NativeType = StdVideoAV1ColorConfig; operator StdVideoAV1ColorConfig const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator StdVideoAV1ColorConfig &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } bool operator==( AV1ColorConfig const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( flags == rhs.flags ) && ( BitDepth == rhs.BitDepth ) && ( subsampling_x == rhs.subsampling_x ) && ( subsampling_y == rhs.subsampling_y ) && ( reserved1 == rhs.reserved1 ) && ( color_primaries == rhs.color_primaries ) && ( transfer_characteristics == rhs.transfer_characteristics ) && ( matrix_coefficients == rhs.matrix_coefficients ) && ( chroma_sample_position == rhs.chroma_sample_position ); } bool operator!=( AV1ColorConfig const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1ColorConfigFlags flags = {}; uint8_t BitDepth = {}; uint8_t subsampling_x = {}; uint8_t subsampling_y = {}; uint8_t reserved1 = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1ColorPrimaries color_primaries = VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1ColorPrimaries::eBt709; VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1TransferCharacteristics transfer_characteristics = VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1TransferCharacteristics::eReserved0; VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1MatrixCoefficients matrix_coefficients = VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1MatrixCoefficients::eIdentity; VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1ChromaSamplePosition chroma_sample_position = VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1ChromaSamplePosition::eUnknown; }; struct AV1TimingInfoFlags { using NativeType = StdVideoAV1TimingInfoFlags; operator StdVideoAV1TimingInfoFlags const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator StdVideoAV1TimingInfoFlags &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } bool operator==( AV1TimingInfoFlags const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( equal_picture_interval == rhs.equal_picture_interval ) && ( reserved == rhs.reserved ); } bool operator!=( AV1TimingInfoFlags const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: uint32_t equal_picture_interval : 1; uint32_t reserved : 31; }; struct AV1TimingInfo { using NativeType = StdVideoAV1TimingInfo; operator StdVideoAV1TimingInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator StdVideoAV1TimingInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } bool operator==( AV1TimingInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( flags == rhs.flags ) && ( num_units_in_display_tick == rhs.num_units_in_display_tick ) && ( time_scale == rhs.time_scale ) && ( num_ticks_per_picture_minus_1 == rhs.num_ticks_per_picture_minus_1 ); } bool operator!=( AV1TimingInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1TimingInfoFlags flags = {}; uint32_t num_units_in_display_tick = {}; uint32_t time_scale = {}; uint32_t num_ticks_per_picture_minus_1 = {}; }; struct AV1LoopFilterFlags { using NativeType = StdVideoAV1LoopFilterFlags; operator StdVideoAV1LoopFilterFlags const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator StdVideoAV1LoopFilterFlags &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } bool operator==( AV1LoopFilterFlags const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( loop_filter_delta_enabled == rhs.loop_filter_delta_enabled ) && ( loop_filter_delta_update == rhs.loop_filter_delta_update ) && ( reserved == rhs.reserved ); } bool operator!=( AV1LoopFilterFlags const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: uint32_t loop_filter_delta_enabled : 1; uint32_t loop_filter_delta_update : 1; uint32_t reserved : 30; }; struct AV1LoopFilter { using NativeType = StdVideoAV1LoopFilter; operator StdVideoAV1LoopFilter const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator StdVideoAV1LoopFilter &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } bool operator==( AV1LoopFilter const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( flags == rhs.flags ) && ( loop_filter_level == rhs.loop_filter_level ) && ( loop_filter_sharpness == rhs.loop_filter_sharpness ) && ( update_ref_delta == rhs.update_ref_delta ) && ( loop_filter_ref_deltas == rhs.loop_filter_ref_deltas ) && ( update_mode_delta == rhs.update_mode_delta ) && ( loop_filter_mode_deltas == rhs.loop_filter_mode_deltas ); } bool operator!=( AV1LoopFilter const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1LoopFilterFlags flags = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D loop_filter_level = {}; uint8_t loop_filter_sharpness = {}; uint8_t update_ref_delta = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D loop_filter_ref_deltas = {}; uint8_t update_mode_delta = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D loop_filter_mode_deltas = {}; }; struct AV1QuantizationFlags { using NativeType = StdVideoAV1QuantizationFlags; operator StdVideoAV1QuantizationFlags const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator StdVideoAV1QuantizationFlags &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } bool operator==( AV1QuantizationFlags const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( using_qmatrix == rhs.using_qmatrix ) && ( diff_uv_delta == rhs.diff_uv_delta ) && ( reserved == rhs.reserved ); } bool operator!=( AV1QuantizationFlags const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: uint32_t using_qmatrix : 1; uint32_t diff_uv_delta : 1; uint32_t reserved : 30; }; struct AV1Quantization { using NativeType = StdVideoAV1Quantization; operator StdVideoAV1Quantization const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator StdVideoAV1Quantization &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } bool operator==( AV1Quantization const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( flags == rhs.flags ) && ( base_q_idx == rhs.base_q_idx ) && ( DeltaQYDc == rhs.DeltaQYDc ) && ( DeltaQUDc == rhs.DeltaQUDc ) && ( DeltaQUAc == rhs.DeltaQUAc ) && ( DeltaQVDc == rhs.DeltaQVDc ) && ( DeltaQVAc == rhs.DeltaQVAc ) && ( qm_y == rhs.qm_y ) && ( qm_u == rhs.qm_u ) && ( qm_v == rhs.qm_v ); } bool operator!=( AV1Quantization const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1QuantizationFlags flags = {}; uint8_t base_q_idx = {}; int8_t DeltaQYDc = {}; int8_t DeltaQUDc = {}; int8_t DeltaQUAc = {}; int8_t DeltaQVDc = {}; int8_t DeltaQVAc = {}; uint8_t qm_y = {}; uint8_t qm_u = {}; uint8_t qm_v = {}; }; struct AV1Segmentation { using NativeType = StdVideoAV1Segmentation; operator StdVideoAV1Segmentation const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator StdVideoAV1Segmentation &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } bool operator==( AV1Segmentation const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( FeatureEnabled == rhs.FeatureEnabled ) && ( FeatureData == rhs.FeatureData ); } bool operator!=( AV1Segmentation const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::ArrayWrapper1D FeatureEnabled = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper2D FeatureData = {}; }; struct AV1TileInfoFlags { using NativeType = StdVideoAV1TileInfoFlags; operator StdVideoAV1TileInfoFlags const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator StdVideoAV1TileInfoFlags &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } bool operator==( AV1TileInfoFlags const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( uniform_tile_spacing_flag == rhs.uniform_tile_spacing_flag ) && ( reserved == rhs.reserved ); } bool operator!=( AV1TileInfoFlags const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: uint32_t uniform_tile_spacing_flag : 1; uint32_t reserved : 31; }; struct AV1TileInfo { using NativeType = StdVideoAV1TileInfo; operator StdVideoAV1TileInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator StdVideoAV1TileInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } bool operator==( AV1TileInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( flags == rhs.flags ) && ( TileCols == rhs.TileCols ) && ( TileRows == rhs.TileRows ) && ( context_update_tile_id == rhs.context_update_tile_id ) && ( tile_size_bytes_minus_1 == rhs.tile_size_bytes_minus_1 ) && ( reserved1 == rhs.reserved1 ) && ( pMiColStarts == rhs.pMiColStarts ) && ( pMiRowStarts == rhs.pMiRowStarts ) && ( pWidthInSbsMinus1 == rhs.pWidthInSbsMinus1 ) && ( pHeightInSbsMinus1 == rhs.pHeightInSbsMinus1 ); } bool operator!=( AV1TileInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1TileInfoFlags flags = {}; uint8_t TileCols = {}; uint8_t TileRows = {}; uint16_t context_update_tile_id = {}; uint8_t tile_size_bytes_minus_1 = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D reserved1 = {}; const uint16_t * pMiColStarts = {}; const uint16_t * pMiRowStarts = {}; const uint16_t * pWidthInSbsMinus1 = {}; const uint16_t * pHeightInSbsMinus1 = {}; }; struct AV1CDEF { using NativeType = StdVideoAV1CDEF; operator StdVideoAV1CDEF const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator StdVideoAV1CDEF &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } bool operator==( AV1CDEF const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( cdef_damping_minus_3 == rhs.cdef_damping_minus_3 ) && ( cdef_bits == rhs.cdef_bits ) && ( cdef_y_pri_strength == rhs.cdef_y_pri_strength ) && ( cdef_y_sec_strength == rhs.cdef_y_sec_strength ) && ( cdef_uv_pri_strength == rhs.cdef_uv_pri_strength ) && ( cdef_uv_sec_strength == rhs.cdef_uv_sec_strength ); } bool operator!=( AV1CDEF const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: uint8_t cdef_damping_minus_3 = {}; uint8_t cdef_bits = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D cdef_y_pri_strength = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D cdef_y_sec_strength = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D cdef_uv_pri_strength = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D cdef_uv_sec_strength = {}; }; struct AV1LoopRestoration { using NativeType = StdVideoAV1LoopRestoration; operator StdVideoAV1LoopRestoration const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator StdVideoAV1LoopRestoration &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } bool operator==( AV1LoopRestoration const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( FrameRestorationType == rhs.FrameRestorationType ) && ( LoopRestorationSize == rhs.LoopRestorationSize ); } bool operator!=( AV1LoopRestoration const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::ArrayWrapper1D FrameRestorationType = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D LoopRestorationSize = {}; }; struct AV1GlobalMotion { using NativeType = StdVideoAV1GlobalMotion; operator StdVideoAV1GlobalMotion const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator StdVideoAV1GlobalMotion &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } bool operator==( AV1GlobalMotion const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( GmType == rhs.GmType ) && ( gm_params == rhs.gm_params ); } bool operator!=( AV1GlobalMotion const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::ArrayWrapper1D GmType = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper2D gm_params = {}; }; struct AV1FilmGrainFlags { using NativeType = StdVideoAV1FilmGrainFlags; operator StdVideoAV1FilmGrainFlags const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator StdVideoAV1FilmGrainFlags &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } bool operator==( AV1FilmGrainFlags const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( chroma_scaling_from_luma == rhs.chroma_scaling_from_luma ) && ( overlap_flag == rhs.overlap_flag ) && ( clip_to_restricted_range == rhs.clip_to_restricted_range ) && ( update_grain == rhs.update_grain ) && ( reserved == rhs.reserved ); } bool operator!=( AV1FilmGrainFlags const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: uint32_t chroma_scaling_from_luma : 1; uint32_t overlap_flag : 1; uint32_t clip_to_restricted_range : 1; uint32_t update_grain : 1; uint32_t reserved : 28; }; struct AV1FilmGrain { using NativeType = StdVideoAV1FilmGrain; operator StdVideoAV1FilmGrain const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator StdVideoAV1FilmGrain &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } bool operator==( AV1FilmGrain const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( flags == rhs.flags ) && ( grain_scaling_minus_8 == rhs.grain_scaling_minus_8 ) && ( ar_coeff_lag == rhs.ar_coeff_lag ) && ( ar_coeff_shift_minus_6 == rhs.ar_coeff_shift_minus_6 ) && ( grain_scale_shift == rhs.grain_scale_shift ) && ( grain_seed == rhs.grain_seed ) && ( film_grain_params_ref_idx == rhs.film_grain_params_ref_idx ) && ( num_y_points == rhs.num_y_points ) && ( point_y_value == rhs.point_y_value ) && ( point_y_scaling == rhs.point_y_scaling ) && ( num_cb_points == rhs.num_cb_points ) && ( point_cb_value == rhs.point_cb_value ) && ( point_cb_scaling == rhs.point_cb_scaling ) && ( num_cr_points == rhs.num_cr_points ) && ( point_cr_value == rhs.point_cr_value ) && ( point_cr_scaling == rhs.point_cr_scaling ) && ( ar_coeffs_y_plus_128 == rhs.ar_coeffs_y_plus_128 ) && ( ar_coeffs_cb_plus_128 == rhs.ar_coeffs_cb_plus_128 ) && ( ar_coeffs_cr_plus_128 == rhs.ar_coeffs_cr_plus_128 ) && ( cb_mult == rhs.cb_mult ) && ( cb_luma_mult == rhs.cb_luma_mult ) && ( cb_offset == rhs.cb_offset ) && ( cr_mult == rhs.cr_mult ) && ( cr_luma_mult == rhs.cr_luma_mult ) && ( cr_offset == rhs.cr_offset ); } bool operator!=( AV1FilmGrain const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1FilmGrainFlags flags = {}; uint8_t grain_scaling_minus_8 = {}; uint8_t ar_coeff_lag = {}; uint8_t ar_coeff_shift_minus_6 = {}; uint8_t grain_scale_shift = {}; uint16_t grain_seed = {}; uint8_t film_grain_params_ref_idx = {}; uint8_t num_y_points = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D point_y_value = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D point_y_scaling = {}; uint8_t num_cb_points = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D point_cb_value = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D point_cb_scaling = {}; uint8_t num_cr_points = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D point_cr_value = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D point_cr_scaling = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D ar_coeffs_y_plus_128 = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D ar_coeffs_cb_plus_128 = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D ar_coeffs_cr_plus_128 = {}; uint8_t cb_mult = {}; uint8_t cb_luma_mult = {}; uint16_t cb_offset = {}; uint8_t cr_mult = {}; uint8_t cr_luma_mult = {}; uint16_t cr_offset = {}; }; struct AV1SequenceHeaderFlags { using NativeType = StdVideoAV1SequenceHeaderFlags; operator StdVideoAV1SequenceHeaderFlags const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator StdVideoAV1SequenceHeaderFlags &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } bool operator==( AV1SequenceHeaderFlags const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( still_picture == rhs.still_picture ) && ( reduced_still_picture_header == rhs.reduced_still_picture_header ) && ( use_128x128_superblock == rhs.use_128x128_superblock ) && ( enable_filter_intra == rhs.enable_filter_intra ) && ( enable_intra_edge_filter == rhs.enable_intra_edge_filter ) && ( enable_interintra_compound == rhs.enable_interintra_compound ) && ( enable_masked_compound == rhs.enable_masked_compound ) && ( enable_warped_motion == rhs.enable_warped_motion ) && ( enable_dual_filter == rhs.enable_dual_filter ) && ( enable_order_hint == rhs.enable_order_hint ) && ( enable_jnt_comp == rhs.enable_jnt_comp ) && ( enable_ref_frame_mvs == rhs.enable_ref_frame_mvs ) && ( frame_id_numbers_present_flag == rhs.frame_id_numbers_present_flag ) && ( enable_superres == rhs.enable_superres ) && ( enable_cdef == rhs.enable_cdef ) && ( enable_restoration == rhs.enable_restoration ) && ( film_grain_params_present == rhs.film_grain_params_present ) && ( timing_info_present_flag == rhs.timing_info_present_flag ) && ( initial_display_delay_present_flag == rhs.initial_display_delay_present_flag ) && ( reserved == rhs.reserved ); } bool operator!=( AV1SequenceHeaderFlags const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: uint32_t still_picture : 1; uint32_t reduced_still_picture_header : 1; uint32_t use_128x128_superblock : 1; uint32_t enable_filter_intra : 1; uint32_t enable_intra_edge_filter : 1; uint32_t enable_interintra_compound : 1; uint32_t enable_masked_compound : 1; uint32_t enable_warped_motion : 1; uint32_t enable_dual_filter : 1; uint32_t enable_order_hint : 1; uint32_t enable_jnt_comp : 1; uint32_t enable_ref_frame_mvs : 1; uint32_t frame_id_numbers_present_flag : 1; uint32_t enable_superres : 1; uint32_t enable_cdef : 1; uint32_t enable_restoration : 1; uint32_t film_grain_params_present : 1; uint32_t timing_info_present_flag : 1; uint32_t initial_display_delay_present_flag : 1; uint32_t reserved : 13; }; struct AV1SequenceHeader { using NativeType = StdVideoAV1SequenceHeader; operator StdVideoAV1SequenceHeader const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator StdVideoAV1SequenceHeader &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } bool operator==( AV1SequenceHeader const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( flags == rhs.flags ) && ( seq_profile == rhs.seq_profile ) && ( frame_width_bits_minus_1 == rhs.frame_width_bits_minus_1 ) && ( frame_height_bits_minus_1 == rhs.frame_height_bits_minus_1 ) && ( max_frame_width_minus_1 == rhs.max_frame_width_minus_1 ) && ( max_frame_height_minus_1 == rhs.max_frame_height_minus_1 ) && ( delta_frame_id_length_minus_2 == rhs.delta_frame_id_length_minus_2 ) && ( additional_frame_id_length_minus_1 == rhs.additional_frame_id_length_minus_1 ) && ( order_hint_bits_minus_1 == rhs.order_hint_bits_minus_1 ) && ( seq_force_integer_mv == rhs.seq_force_integer_mv ) && ( seq_force_screen_content_tools == rhs.seq_force_screen_content_tools ) && ( reserved1 == rhs.reserved1 ) && ( pColorConfig == rhs.pColorConfig ) && ( pTimingInfo == rhs.pTimingInfo ); } bool operator!=( AV1SequenceHeader const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1SequenceHeaderFlags flags = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1Profile seq_profile = VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1Profile::eMain; uint8_t frame_width_bits_minus_1 = {}; uint8_t frame_height_bits_minus_1 = {}; uint16_t max_frame_width_minus_1 = {}; uint16_t max_frame_height_minus_1 = {}; uint8_t delta_frame_id_length_minus_2 = {}; uint8_t additional_frame_id_length_minus_1 = {}; uint8_t order_hint_bits_minus_1 = {}; uint8_t seq_force_integer_mv = {}; uint8_t seq_force_screen_content_tools = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D reserved1 = {}; const VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1ColorConfig * pColorConfig = {}; const VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1TimingInfo * pTimingInfo = {}; }; //=== vulkan_video_codec_av1std_decode === struct DecodeAV1PictureInfoFlags { using NativeType = StdVideoDecodeAV1PictureInfoFlags; operator StdVideoDecodeAV1PictureInfoFlags const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator StdVideoDecodeAV1PictureInfoFlags &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } bool operator==( DecodeAV1PictureInfoFlags const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( error_resilient_mode == rhs.error_resilient_mode ) && ( disable_cdf_update == rhs.disable_cdf_update ) && ( use_superres == rhs.use_superres ) && ( render_and_frame_size_different == rhs.render_and_frame_size_different ) && ( allow_screen_content_tools == rhs.allow_screen_content_tools ) && ( is_filter_switchable == rhs.is_filter_switchable ) && ( force_integer_mv == rhs.force_integer_mv ) && ( frame_size_override_flag == rhs.frame_size_override_flag ) && ( buffer_removal_time_present_flag == rhs.buffer_removal_time_present_flag ) && ( allow_intrabc == rhs.allow_intrabc ) && ( frame_refs_short_signaling == rhs.frame_refs_short_signaling ) && ( allow_high_precision_mv == rhs.allow_high_precision_mv ) && ( is_motion_mode_switchable == rhs.is_motion_mode_switchable ) && ( use_ref_frame_mvs == rhs.use_ref_frame_mvs ) && ( disable_frame_end_update_cdf == rhs.disable_frame_end_update_cdf ) && ( allow_warped_motion == rhs.allow_warped_motion ) && ( reduced_tx_set == rhs.reduced_tx_set ) && ( reference_select == rhs.reference_select ) && ( skip_mode_present == rhs.skip_mode_present ) && ( delta_q_present == rhs.delta_q_present ) && ( delta_lf_present == rhs.delta_lf_present ) && ( delta_lf_multi == rhs.delta_lf_multi ) && ( segmentation_enabled == rhs.segmentation_enabled ) && ( segmentation_update_map == rhs.segmentation_update_map ) && ( segmentation_temporal_update == rhs.segmentation_temporal_update ) && ( segmentation_update_data == rhs.segmentation_update_data ) && ( UsesLr == rhs.UsesLr ) && ( usesChromaLr == rhs.usesChromaLr ) && ( apply_grain == rhs.apply_grain ) && ( reserved == rhs.reserved ); } bool operator!=( DecodeAV1PictureInfoFlags const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: uint32_t error_resilient_mode : 1; uint32_t disable_cdf_update : 1; uint32_t use_superres : 1; uint32_t render_and_frame_size_different : 1; uint32_t allow_screen_content_tools : 1; uint32_t is_filter_switchable : 1; uint32_t force_integer_mv : 1; uint32_t frame_size_override_flag : 1; uint32_t buffer_removal_time_present_flag : 1; uint32_t allow_intrabc : 1; uint32_t frame_refs_short_signaling : 1; uint32_t allow_high_precision_mv : 1; uint32_t is_motion_mode_switchable : 1; uint32_t use_ref_frame_mvs : 1; uint32_t disable_frame_end_update_cdf : 1; uint32_t allow_warped_motion : 1; uint32_t reduced_tx_set : 1; uint32_t reference_select : 1; uint32_t skip_mode_present : 1; uint32_t delta_q_present : 1; uint32_t delta_lf_present : 1; uint32_t delta_lf_multi : 1; uint32_t segmentation_enabled : 1; uint32_t segmentation_update_map : 1; uint32_t segmentation_temporal_update : 1; uint32_t segmentation_update_data : 1; uint32_t UsesLr : 1; uint32_t usesChromaLr : 1; uint32_t apply_grain : 1; uint32_t reserved : 3; }; struct DecodeAV1PictureInfo { using NativeType = StdVideoDecodeAV1PictureInfo; operator StdVideoDecodeAV1PictureInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator StdVideoDecodeAV1PictureInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } bool operator==( DecodeAV1PictureInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( flags == rhs.flags ) && ( frame_type == rhs.frame_type ) && ( current_frame_id == rhs.current_frame_id ) && ( OrderHint == rhs.OrderHint ) && ( primary_ref_frame == rhs.primary_ref_frame ) && ( refresh_frame_flags == rhs.refresh_frame_flags ) && ( reserved1 == rhs.reserved1 ) && ( interpolation_filter == rhs.interpolation_filter ) && ( TxMode == rhs.TxMode ) && ( delta_q_res == rhs.delta_q_res ) && ( delta_lf_res == rhs.delta_lf_res ) && ( SkipModeFrame == rhs.SkipModeFrame ) && ( coded_denom == rhs.coded_denom ) && ( reserved2 == rhs.reserved2 ) && ( OrderHints == rhs.OrderHints ) && ( expectedFrameId == rhs.expectedFrameId ) && ( pTileInfo == rhs.pTileInfo ) && ( pQuantization == rhs.pQuantization ) && ( pSegmentation == rhs.pSegmentation ) && ( pLoopFilter == rhs.pLoopFilter ) && ( pCDEF == rhs.pCDEF ) && ( pLoopRestoration == rhs.pLoopRestoration ) && ( pGlobalMotion == rhs.pGlobalMotion ) && ( pFilmGrain == rhs.pFilmGrain ); } bool operator!=( DecodeAV1PictureInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::DecodeAV1PictureInfoFlags flags = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1FrameType frame_type = VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1FrameType::eKey; uint32_t current_frame_id = {}; uint8_t OrderHint = {}; uint8_t primary_ref_frame = {}; uint8_t refresh_frame_flags = {}; uint8_t reserved1 = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1InterpolationFilter interpolation_filter = VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1InterpolationFilter::eEighttap; VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1TxMode TxMode = VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1TxMode::eOnly4X4; uint8_t delta_q_res = {}; uint8_t delta_lf_res = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D SkipModeFrame = {}; uint8_t coded_denom = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D reserved2 = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D OrderHints = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D expectedFrameId = {}; const VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1TileInfo * pTileInfo = {}; const VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1Quantization * pQuantization = {}; const VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1Segmentation * pSegmentation = {}; const VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1LoopFilter * pLoopFilter = {}; const VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1CDEF * pCDEF = {}; const VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1LoopRestoration * pLoopRestoration = {}; const VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1GlobalMotion * pGlobalMotion = {}; const VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1FilmGrain * pFilmGrain = {}; }; struct DecodeAV1ReferenceInfoFlags { using NativeType = StdVideoDecodeAV1ReferenceInfoFlags; operator StdVideoDecodeAV1ReferenceInfoFlags const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator StdVideoDecodeAV1ReferenceInfoFlags &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } bool operator==( DecodeAV1ReferenceInfoFlags const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( disable_frame_end_update_cdf == rhs.disable_frame_end_update_cdf ) && ( segmentation_enabled == rhs.segmentation_enabled ) && ( reserved == rhs.reserved ); } bool operator!=( DecodeAV1ReferenceInfoFlags const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: uint32_t disable_frame_end_update_cdf : 1; uint32_t segmentation_enabled : 1; uint32_t reserved : 30; }; struct DecodeAV1ReferenceInfo { using NativeType = StdVideoDecodeAV1ReferenceInfo; operator StdVideoDecodeAV1ReferenceInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator StdVideoDecodeAV1ReferenceInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } bool operator==( DecodeAV1ReferenceInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( flags == rhs.flags ) && ( frame_type == rhs.frame_type ) && ( RefFrameSignBias == rhs.RefFrameSignBias ) && ( OrderHint == rhs.OrderHint ) && ( SavedOrderHints == rhs.SavedOrderHints ); } bool operator!=( DecodeAV1ReferenceInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::DecodeAV1ReferenceInfoFlags flags = {}; uint8_t frame_type = {}; uint8_t RefFrameSignBias = {}; uint8_t OrderHint = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D SavedOrderHints = {}; }; //=== vulkan_video_codec_av1std_encode === struct EncodeAV1DecoderModelInfo { using NativeType = StdVideoEncodeAV1DecoderModelInfo; operator StdVideoEncodeAV1DecoderModelInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator StdVideoEncodeAV1DecoderModelInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } bool operator==( EncodeAV1DecoderModelInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( buffer_delay_length_minus_1 == rhs.buffer_delay_length_minus_1 ) && ( buffer_removal_time_length_minus_1 == rhs.buffer_removal_time_length_minus_1 ) && ( frame_presentation_time_length_minus_1 == rhs.frame_presentation_time_length_minus_1 ) && ( reserved1 == rhs.reserved1 ) && ( num_units_in_decoding_tick == rhs.num_units_in_decoding_tick ); } bool operator!=( EncodeAV1DecoderModelInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: uint8_t buffer_delay_length_minus_1 = {}; uint8_t buffer_removal_time_length_minus_1 = {}; uint8_t frame_presentation_time_length_minus_1 = {}; uint8_t reserved1 = {}; uint32_t num_units_in_decoding_tick = {}; }; struct EncodeAV1ExtensionHeader { using NativeType = StdVideoEncodeAV1ExtensionHeader; operator StdVideoEncodeAV1ExtensionHeader const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator StdVideoEncodeAV1ExtensionHeader &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } bool operator==( EncodeAV1ExtensionHeader const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( temporal_id == rhs.temporal_id ) && ( spatial_id == rhs.spatial_id ); } bool operator!=( EncodeAV1ExtensionHeader const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: uint8_t temporal_id = {}; uint8_t spatial_id = {}; }; struct EncodeAV1OperatingPointInfoFlags { using NativeType = StdVideoEncodeAV1OperatingPointInfoFlags; operator StdVideoEncodeAV1OperatingPointInfoFlags const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator StdVideoEncodeAV1OperatingPointInfoFlags &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } bool operator==( EncodeAV1OperatingPointInfoFlags const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( decoder_model_present_for_this_op == rhs.decoder_model_present_for_this_op ) && ( low_delay_mode_flag == rhs.low_delay_mode_flag ) && ( initial_display_delay_present_for_this_op == rhs.initial_display_delay_present_for_this_op ) && ( reserved == rhs.reserved ); } bool operator!=( EncodeAV1OperatingPointInfoFlags const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: uint32_t decoder_model_present_for_this_op : 1; uint32_t low_delay_mode_flag : 1; uint32_t initial_display_delay_present_for_this_op : 1; uint32_t reserved : 29; }; struct EncodeAV1OperatingPointInfo { using NativeType = StdVideoEncodeAV1OperatingPointInfo; operator StdVideoEncodeAV1OperatingPointInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator StdVideoEncodeAV1OperatingPointInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } bool operator==( EncodeAV1OperatingPointInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( flags == rhs.flags ) && ( operating_point_idc == rhs.operating_point_idc ) && ( seq_level_idx == rhs.seq_level_idx ) && ( seq_tier == rhs.seq_tier ) && ( decoder_buffer_delay == rhs.decoder_buffer_delay ) && ( encoder_buffer_delay == rhs.encoder_buffer_delay ) && ( initial_display_delay_minus_1 == rhs.initial_display_delay_minus_1 ); } bool operator!=( EncodeAV1OperatingPointInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::EncodeAV1OperatingPointInfoFlags flags = {}; uint16_t operating_point_idc = {}; uint8_t seq_level_idx = {}; uint8_t seq_tier = {}; uint32_t decoder_buffer_delay = {}; uint32_t encoder_buffer_delay = {}; uint8_t initial_display_delay_minus_1 = {}; }; struct EncodeAV1PictureInfoFlags { using NativeType = StdVideoEncodeAV1PictureInfoFlags; operator StdVideoEncodeAV1PictureInfoFlags const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator StdVideoEncodeAV1PictureInfoFlags &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } bool operator==( EncodeAV1PictureInfoFlags const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( error_resilient_mode == rhs.error_resilient_mode ) && ( disable_cdf_update == rhs.disable_cdf_update ) && ( use_superres == rhs.use_superres ) && ( render_and_frame_size_different == rhs.render_and_frame_size_different ) && ( allow_screen_content_tools == rhs.allow_screen_content_tools ) && ( is_filter_switchable == rhs.is_filter_switchable ) && ( force_integer_mv == rhs.force_integer_mv ) && ( frame_size_override_flag == rhs.frame_size_override_flag ) && ( buffer_removal_time_present_flag == rhs.buffer_removal_time_present_flag ) && ( allow_intrabc == rhs.allow_intrabc ) && ( frame_refs_short_signaling == rhs.frame_refs_short_signaling ) && ( allow_high_precision_mv == rhs.allow_high_precision_mv ) && ( is_motion_mode_switchable == rhs.is_motion_mode_switchable ) && ( use_ref_frame_mvs == rhs.use_ref_frame_mvs ) && ( disable_frame_end_update_cdf == rhs.disable_frame_end_update_cdf ) && ( allow_warped_motion == rhs.allow_warped_motion ) && ( reduced_tx_set == rhs.reduced_tx_set ) && ( skip_mode_present == rhs.skip_mode_present ) && ( delta_q_present == rhs.delta_q_present ) && ( delta_lf_present == rhs.delta_lf_present ) && ( delta_lf_multi == rhs.delta_lf_multi ) && ( segmentation_enabled == rhs.segmentation_enabled ) && ( segmentation_update_map == rhs.segmentation_update_map ) && ( segmentation_temporal_update == rhs.segmentation_temporal_update ) && ( segmentation_update_data == rhs.segmentation_update_data ) && ( UsesLr == rhs.UsesLr ) && ( usesChromaLr == rhs.usesChromaLr ) && ( show_frame == rhs.show_frame ) && ( showable_frame == rhs.showable_frame ) && ( reserved == rhs.reserved ); } bool operator!=( EncodeAV1PictureInfoFlags const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: uint32_t error_resilient_mode : 1; uint32_t disable_cdf_update : 1; uint32_t use_superres : 1; uint32_t render_and_frame_size_different : 1; uint32_t allow_screen_content_tools : 1; uint32_t is_filter_switchable : 1; uint32_t force_integer_mv : 1; uint32_t frame_size_override_flag : 1; uint32_t buffer_removal_time_present_flag : 1; uint32_t allow_intrabc : 1; uint32_t frame_refs_short_signaling : 1; uint32_t allow_high_precision_mv : 1; uint32_t is_motion_mode_switchable : 1; uint32_t use_ref_frame_mvs : 1; uint32_t disable_frame_end_update_cdf : 1; uint32_t allow_warped_motion : 1; uint32_t reduced_tx_set : 1; uint32_t skip_mode_present : 1; uint32_t delta_q_present : 1; uint32_t delta_lf_present : 1; uint32_t delta_lf_multi : 1; uint32_t segmentation_enabled : 1; uint32_t segmentation_update_map : 1; uint32_t segmentation_temporal_update : 1; uint32_t segmentation_update_data : 1; uint32_t UsesLr : 1; uint32_t usesChromaLr : 1; uint32_t show_frame : 1; uint32_t showable_frame : 1; uint32_t reserved : 3; }; struct EncodeAV1PictureInfo { using NativeType = StdVideoEncodeAV1PictureInfo; operator StdVideoEncodeAV1PictureInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator StdVideoEncodeAV1PictureInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } bool operator==( EncodeAV1PictureInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( flags == rhs.flags ) && ( frame_type == rhs.frame_type ) && ( frame_presentation_time == rhs.frame_presentation_time ) && ( current_frame_id == rhs.current_frame_id ) && ( order_hint == rhs.order_hint ) && ( primary_ref_frame == rhs.primary_ref_frame ) && ( refresh_frame_flags == rhs.refresh_frame_flags ) && ( coded_denom == rhs.coded_denom ) && ( render_width_minus_1 == rhs.render_width_minus_1 ) && ( render_height_minus_1 == rhs.render_height_minus_1 ) && ( interpolation_filter == rhs.interpolation_filter ) && ( TxMode == rhs.TxMode ) && ( delta_q_res == rhs.delta_q_res ) && ( delta_lf_res == rhs.delta_lf_res ) && ( ref_order_hint == rhs.ref_order_hint ) && ( ref_frame_idx == rhs.ref_frame_idx ) && ( reserved1 == rhs.reserved1 ) && ( delta_frame_id_minus_1 == rhs.delta_frame_id_minus_1 ) && ( pTileInfo == rhs.pTileInfo ) && ( pQuantization == rhs.pQuantization ) && ( pSegmentation == rhs.pSegmentation ) && ( pLoopFilter == rhs.pLoopFilter ) && ( pCDEF == rhs.pCDEF ) && ( pLoopRestoration == rhs.pLoopRestoration ) && ( pGlobalMotion == rhs.pGlobalMotion ) && ( pExtensionHeader == rhs.pExtensionHeader ) && ( pBufferRemovalTimes == rhs.pBufferRemovalTimes ); } bool operator!=( EncodeAV1PictureInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::EncodeAV1PictureInfoFlags flags = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1FrameType frame_type = VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1FrameType::eKey; uint32_t frame_presentation_time = {}; uint32_t current_frame_id = {}; uint8_t order_hint = {}; uint8_t primary_ref_frame = {}; uint8_t refresh_frame_flags = {}; uint8_t coded_denom = {}; uint16_t render_width_minus_1 = {}; uint16_t render_height_minus_1 = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1InterpolationFilter interpolation_filter = VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1InterpolationFilter::eEighttap; VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1TxMode TxMode = VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1TxMode::eOnly4X4; uint8_t delta_q_res = {}; uint8_t delta_lf_res = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D ref_order_hint = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D ref_frame_idx = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D reserved1 = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D delta_frame_id_minus_1 = {}; const VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1TileInfo * pTileInfo = {}; const VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1Quantization * pQuantization = {}; const VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1Segmentation * pSegmentation = {}; const VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1LoopFilter * pLoopFilter = {}; const VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1CDEF * pCDEF = {}; const VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1LoopRestoration * pLoopRestoration = {}; const VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1GlobalMotion * pGlobalMotion = {}; const VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::EncodeAV1ExtensionHeader * pExtensionHeader = {}; const uint32_t * pBufferRemovalTimes = {}; }; struct EncodeAV1ReferenceInfoFlags { using NativeType = StdVideoEncodeAV1ReferenceInfoFlags; operator StdVideoEncodeAV1ReferenceInfoFlags const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator StdVideoEncodeAV1ReferenceInfoFlags &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } bool operator==( EncodeAV1ReferenceInfoFlags const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( disable_frame_end_update_cdf == rhs.disable_frame_end_update_cdf ) && ( segmentation_enabled == rhs.segmentation_enabled ) && ( reserved == rhs.reserved ); } bool operator!=( EncodeAV1ReferenceInfoFlags const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: uint32_t disable_frame_end_update_cdf : 1; uint32_t segmentation_enabled : 1; uint32_t reserved : 30; }; struct EncodeAV1ReferenceInfo { using NativeType = StdVideoEncodeAV1ReferenceInfo; operator StdVideoEncodeAV1ReferenceInfo const &() const VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } operator StdVideoEncodeAV1ReferenceInfo &() VULKAN_HPP_NOEXCEPT { return *reinterpret_cast( this ); } bool operator==( EncodeAV1ReferenceInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return ( flags == rhs.flags ) && ( RefFrameId == rhs.RefFrameId ) && ( frame_type == rhs.frame_type ) && ( OrderHint == rhs.OrderHint ) && ( reserved1 == rhs.reserved1 ) && ( pExtensionHeader == rhs.pExtensionHeader ); } bool operator!=( EncodeAV1ReferenceInfo const & rhs ) const VULKAN_HPP_NOEXCEPT { return !operator==( rhs ); } public: VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::EncodeAV1ReferenceInfoFlags flags = {}; uint32_t RefFrameId = {}; VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1FrameType frame_type = VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1FrameType::eKey; uint8_t OrderHint = {}; VULKAN_HPP_NAMESPACE::ArrayWrapper1D reserved1 = {}; const VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::EncodeAV1ExtensionHeader * pExtensionHeader = {}; }; } // namespace VULKAN_HPP_VIDEO_NAMESPACE } // namespace VULKAN_HPP_NAMESPACE #endif ================================================ FILE: src/libraries/vulkanheaders/vulkan_wayland.h ================================================ #ifndef VULKAN_WAYLAND_H_ #define VULKAN_WAYLAND_H_ 1 /* ** Copyright 2015-2025 The Khronos Group Inc. ** ** SPDX-License-Identifier: Apache-2.0 */ /* ** This header is generated from the Khronos Vulkan XML API Registry. ** */ #ifdef __cplusplus extern "C" { #endif // VK_KHR_wayland_surface is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_wayland_surface 1 #define VK_KHR_WAYLAND_SURFACE_SPEC_VERSION 6 #define VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME "VK_KHR_wayland_surface" typedef VkFlags VkWaylandSurfaceCreateFlagsKHR; typedef struct VkWaylandSurfaceCreateInfoKHR { VkStructureType sType; const void* pNext; VkWaylandSurfaceCreateFlagsKHR flags; struct wl_display* display; struct wl_surface* surface; } VkWaylandSurfaceCreateInfoKHR; typedef VkResult (VKAPI_PTR *PFN_vkCreateWaylandSurfaceKHR)(VkInstance instance, const VkWaylandSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, struct wl_display* display); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkCreateWaylandSurfaceKHR( VkInstance instance, const VkWaylandSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceWaylandPresentationSupportKHR( VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, struct wl_display* display); #endif #ifdef __cplusplus } #endif #endif ================================================ FILE: src/libraries/vulkanheaders/vulkan_win32.h ================================================ #ifndef VULKAN_WIN32_H_ #define VULKAN_WIN32_H_ 1 /* ** Copyright 2015-2025 The Khronos Group Inc. ** ** SPDX-License-Identifier: Apache-2.0 */ /* ** This header is generated from the Khronos Vulkan XML API Registry. ** */ #ifdef __cplusplus extern "C" { #endif // VK_KHR_win32_surface is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_win32_surface 1 #define VK_KHR_WIN32_SURFACE_SPEC_VERSION 6 #define VK_KHR_WIN32_SURFACE_EXTENSION_NAME "VK_KHR_win32_surface" typedef VkFlags VkWin32SurfaceCreateFlagsKHR; typedef struct VkWin32SurfaceCreateInfoKHR { VkStructureType sType; const void* pNext; VkWin32SurfaceCreateFlagsKHR flags; HINSTANCE hinstance; HWND hwnd; } VkWin32SurfaceCreateInfoKHR; typedef VkResult (VKAPI_PTR *PFN_vkCreateWin32SurfaceKHR)(VkInstance instance, const VkWin32SurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkCreateWin32SurfaceKHR( VkInstance instance, const VkWin32SurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceWin32PresentationSupportKHR( VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex); #endif // VK_KHR_external_memory_win32 is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_external_memory_win32 1 #define VK_KHR_EXTERNAL_MEMORY_WIN32_SPEC_VERSION 1 #define VK_KHR_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME "VK_KHR_external_memory_win32" typedef struct VkImportMemoryWin32HandleInfoKHR { VkStructureType sType; const void* pNext; VkExternalMemoryHandleTypeFlagBits handleType; HANDLE handle; LPCWSTR name; } VkImportMemoryWin32HandleInfoKHR; typedef struct VkExportMemoryWin32HandleInfoKHR { VkStructureType sType; const void* pNext; const SECURITY_ATTRIBUTES* pAttributes; DWORD dwAccess; LPCWSTR name; } VkExportMemoryWin32HandleInfoKHR; typedef struct VkMemoryWin32HandlePropertiesKHR { VkStructureType sType; void* pNext; uint32_t memoryTypeBits; } VkMemoryWin32HandlePropertiesKHR; typedef struct VkMemoryGetWin32HandleInfoKHR { VkStructureType sType; const void* pNext; VkDeviceMemory memory; VkExternalMemoryHandleTypeFlagBits handleType; } VkMemoryGetWin32HandleInfoKHR; typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryWin32HandleKHR)(VkDevice device, const VkMemoryGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle); typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryWin32HandlePropertiesKHR)(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, HANDLE handle, VkMemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryWin32HandleKHR( VkDevice device, const VkMemoryGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle); VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryWin32HandlePropertiesKHR( VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, HANDLE handle, VkMemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties); #endif // VK_KHR_win32_keyed_mutex is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_win32_keyed_mutex 1 #define VK_KHR_WIN32_KEYED_MUTEX_SPEC_VERSION 1 #define VK_KHR_WIN32_KEYED_MUTEX_EXTENSION_NAME "VK_KHR_win32_keyed_mutex" typedef struct VkWin32KeyedMutexAcquireReleaseInfoKHR { VkStructureType sType; const void* pNext; uint32_t acquireCount; const VkDeviceMemory* pAcquireSyncs; const uint64_t* pAcquireKeys; const uint32_t* pAcquireTimeouts; uint32_t releaseCount; const VkDeviceMemory* pReleaseSyncs; const uint64_t* pReleaseKeys; } VkWin32KeyedMutexAcquireReleaseInfoKHR; // VK_KHR_external_semaphore_win32 is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_external_semaphore_win32 1 #define VK_KHR_EXTERNAL_SEMAPHORE_WIN32_SPEC_VERSION 1 #define VK_KHR_EXTERNAL_SEMAPHORE_WIN32_EXTENSION_NAME "VK_KHR_external_semaphore_win32" typedef struct VkImportSemaphoreWin32HandleInfoKHR { VkStructureType sType; const void* pNext; VkSemaphore semaphore; VkSemaphoreImportFlags flags; VkExternalSemaphoreHandleTypeFlagBits handleType; HANDLE handle; LPCWSTR name; } VkImportSemaphoreWin32HandleInfoKHR; typedef struct VkExportSemaphoreWin32HandleInfoKHR { VkStructureType sType; const void* pNext; const SECURITY_ATTRIBUTES* pAttributes; DWORD dwAccess; LPCWSTR name; } VkExportSemaphoreWin32HandleInfoKHR; typedef struct VkD3D12FenceSubmitInfoKHR { VkStructureType sType; const void* pNext; uint32_t waitSemaphoreValuesCount; const uint64_t* pWaitSemaphoreValues; uint32_t signalSemaphoreValuesCount; const uint64_t* pSignalSemaphoreValues; } VkD3D12FenceSubmitInfoKHR; typedef struct VkSemaphoreGetWin32HandleInfoKHR { VkStructureType sType; const void* pNext; VkSemaphore semaphore; VkExternalSemaphoreHandleTypeFlagBits handleType; } VkSemaphoreGetWin32HandleInfoKHR; typedef VkResult (VKAPI_PTR *PFN_vkImportSemaphoreWin32HandleKHR)(VkDevice device, const VkImportSemaphoreWin32HandleInfoKHR* pImportSemaphoreWin32HandleInfo); typedef VkResult (VKAPI_PTR *PFN_vkGetSemaphoreWin32HandleKHR)(VkDevice device, const VkSemaphoreGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkImportSemaphoreWin32HandleKHR( VkDevice device, const VkImportSemaphoreWin32HandleInfoKHR* pImportSemaphoreWin32HandleInfo); VKAPI_ATTR VkResult VKAPI_CALL vkGetSemaphoreWin32HandleKHR( VkDevice device, const VkSemaphoreGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle); #endif // VK_KHR_external_fence_win32 is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_external_fence_win32 1 #define VK_KHR_EXTERNAL_FENCE_WIN32_SPEC_VERSION 1 #define VK_KHR_EXTERNAL_FENCE_WIN32_EXTENSION_NAME "VK_KHR_external_fence_win32" typedef struct VkImportFenceWin32HandleInfoKHR { VkStructureType sType; const void* pNext; VkFence fence; VkFenceImportFlags flags; VkExternalFenceHandleTypeFlagBits handleType; HANDLE handle; LPCWSTR name; } VkImportFenceWin32HandleInfoKHR; typedef struct VkExportFenceWin32HandleInfoKHR { VkStructureType sType; const void* pNext; const SECURITY_ATTRIBUTES* pAttributes; DWORD dwAccess; LPCWSTR name; } VkExportFenceWin32HandleInfoKHR; typedef struct VkFenceGetWin32HandleInfoKHR { VkStructureType sType; const void* pNext; VkFence fence; VkExternalFenceHandleTypeFlagBits handleType; } VkFenceGetWin32HandleInfoKHR; typedef VkResult (VKAPI_PTR *PFN_vkImportFenceWin32HandleKHR)(VkDevice device, const VkImportFenceWin32HandleInfoKHR* pImportFenceWin32HandleInfo); typedef VkResult (VKAPI_PTR *PFN_vkGetFenceWin32HandleKHR)(VkDevice device, const VkFenceGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkImportFenceWin32HandleKHR( VkDevice device, const VkImportFenceWin32HandleInfoKHR* pImportFenceWin32HandleInfo); VKAPI_ATTR VkResult VKAPI_CALL vkGetFenceWin32HandleKHR( VkDevice device, const VkFenceGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle); #endif // VK_NV_external_memory_win32 is a preprocessor guard. Do not pass it to API calls. #define VK_NV_external_memory_win32 1 #define VK_NV_EXTERNAL_MEMORY_WIN32_SPEC_VERSION 1 #define VK_NV_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME "VK_NV_external_memory_win32" typedef struct VkImportMemoryWin32HandleInfoNV { VkStructureType sType; const void* pNext; VkExternalMemoryHandleTypeFlagsNV handleType; HANDLE handle; } VkImportMemoryWin32HandleInfoNV; typedef struct VkExportMemoryWin32HandleInfoNV { VkStructureType sType; const void* pNext; const SECURITY_ATTRIBUTES* pAttributes; DWORD dwAccess; } VkExportMemoryWin32HandleInfoNV; typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryWin32HandleNV)(VkDevice device, VkDeviceMemory memory, VkExternalMemoryHandleTypeFlagsNV handleType, HANDLE* pHandle); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryWin32HandleNV( VkDevice device, VkDeviceMemory memory, VkExternalMemoryHandleTypeFlagsNV handleType, HANDLE* pHandle); #endif // VK_NV_win32_keyed_mutex is a preprocessor guard. Do not pass it to API calls. #define VK_NV_win32_keyed_mutex 1 #define VK_NV_WIN32_KEYED_MUTEX_SPEC_VERSION 2 #define VK_NV_WIN32_KEYED_MUTEX_EXTENSION_NAME "VK_NV_win32_keyed_mutex" typedef struct VkWin32KeyedMutexAcquireReleaseInfoNV { VkStructureType sType; const void* pNext; uint32_t acquireCount; const VkDeviceMemory* pAcquireSyncs; const uint64_t* pAcquireKeys; const uint32_t* pAcquireTimeoutMilliseconds; uint32_t releaseCount; const VkDeviceMemory* pReleaseSyncs; const uint64_t* pReleaseKeys; } VkWin32KeyedMutexAcquireReleaseInfoNV; // VK_EXT_full_screen_exclusive is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_full_screen_exclusive 1 #define VK_EXT_FULL_SCREEN_EXCLUSIVE_SPEC_VERSION 4 #define VK_EXT_FULL_SCREEN_EXCLUSIVE_EXTENSION_NAME "VK_EXT_full_screen_exclusive" typedef enum VkFullScreenExclusiveEXT { VK_FULL_SCREEN_EXCLUSIVE_DEFAULT_EXT = 0, VK_FULL_SCREEN_EXCLUSIVE_ALLOWED_EXT = 1, VK_FULL_SCREEN_EXCLUSIVE_DISALLOWED_EXT = 2, VK_FULL_SCREEN_EXCLUSIVE_APPLICATION_CONTROLLED_EXT = 3, VK_FULL_SCREEN_EXCLUSIVE_MAX_ENUM_EXT = 0x7FFFFFFF } VkFullScreenExclusiveEXT; typedef struct VkSurfaceFullScreenExclusiveInfoEXT { VkStructureType sType; void* pNext; VkFullScreenExclusiveEXT fullScreenExclusive; } VkSurfaceFullScreenExclusiveInfoEXT; typedef struct VkSurfaceCapabilitiesFullScreenExclusiveEXT { VkStructureType sType; void* pNext; VkBool32 fullScreenExclusiveSupported; } VkSurfaceCapabilitiesFullScreenExclusiveEXT; typedef struct VkSurfaceFullScreenExclusiveWin32InfoEXT { VkStructureType sType; const void* pNext; HMONITOR hmonitor; } VkSurfaceFullScreenExclusiveWin32InfoEXT; typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceSurfacePresentModes2EXT)(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, uint32_t* pPresentModeCount, VkPresentModeKHR* pPresentModes); typedef VkResult (VKAPI_PTR *PFN_vkAcquireFullScreenExclusiveModeEXT)(VkDevice device, VkSwapchainKHR swapchain); typedef VkResult (VKAPI_PTR *PFN_vkReleaseFullScreenExclusiveModeEXT)(VkDevice device, VkSwapchainKHR swapchain); typedef VkResult (VKAPI_PTR *PFN_vkGetDeviceGroupSurfacePresentModes2EXT)(VkDevice device, const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, VkDeviceGroupPresentModeFlagsKHR* pModes); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfacePresentModes2EXT( VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, uint32_t* pPresentModeCount, VkPresentModeKHR* pPresentModes); VKAPI_ATTR VkResult VKAPI_CALL vkAcquireFullScreenExclusiveModeEXT( VkDevice device, VkSwapchainKHR swapchain); VKAPI_ATTR VkResult VKAPI_CALL vkReleaseFullScreenExclusiveModeEXT( VkDevice device, VkSwapchainKHR swapchain); VKAPI_ATTR VkResult VKAPI_CALL vkGetDeviceGroupSurfacePresentModes2EXT( VkDevice device, const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, VkDeviceGroupPresentModeFlagsKHR* pModes); #endif // VK_NV_acquire_winrt_display is a preprocessor guard. Do not pass it to API calls. #define VK_NV_acquire_winrt_display 1 #define VK_NV_ACQUIRE_WINRT_DISPLAY_SPEC_VERSION 1 #define VK_NV_ACQUIRE_WINRT_DISPLAY_EXTENSION_NAME "VK_NV_acquire_winrt_display" typedef VkResult (VKAPI_PTR *PFN_vkAcquireWinrtDisplayNV)(VkPhysicalDevice physicalDevice, VkDisplayKHR display); typedef VkResult (VKAPI_PTR *PFN_vkGetWinrtDisplayNV)(VkPhysicalDevice physicalDevice, uint32_t deviceRelativeId, VkDisplayKHR* pDisplay); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkAcquireWinrtDisplayNV( VkPhysicalDevice physicalDevice, VkDisplayKHR display); VKAPI_ATTR VkResult VKAPI_CALL vkGetWinrtDisplayNV( VkPhysicalDevice physicalDevice, uint32_t deviceRelativeId, VkDisplayKHR* pDisplay); #endif #ifdef __cplusplus } #endif #endif ================================================ FILE: src/libraries/vulkanheaders/vulkan_xcb.h ================================================ #ifndef VULKAN_XCB_H_ #define VULKAN_XCB_H_ 1 /* ** Copyright 2015-2025 The Khronos Group Inc. ** ** SPDX-License-Identifier: Apache-2.0 */ /* ** This header is generated from the Khronos Vulkan XML API Registry. ** */ #ifdef __cplusplus extern "C" { #endif // VK_KHR_xcb_surface is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_xcb_surface 1 #define VK_KHR_XCB_SURFACE_SPEC_VERSION 6 #define VK_KHR_XCB_SURFACE_EXTENSION_NAME "VK_KHR_xcb_surface" typedef VkFlags VkXcbSurfaceCreateFlagsKHR; typedef struct VkXcbSurfaceCreateInfoKHR { VkStructureType sType; const void* pNext; VkXcbSurfaceCreateFlagsKHR flags; xcb_connection_t* connection; xcb_window_t window; } VkXcbSurfaceCreateInfoKHR; typedef VkResult (VKAPI_PTR *PFN_vkCreateXcbSurfaceKHR)(VkInstance instance, const VkXcbSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, xcb_connection_t* connection, xcb_visualid_t visual_id); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkCreateXcbSurfaceKHR( VkInstance instance, const VkXcbSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceXcbPresentationSupportKHR( VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, xcb_connection_t* connection, xcb_visualid_t visual_id); #endif #ifdef __cplusplus } #endif #endif ================================================ FILE: src/libraries/vulkanheaders/vulkan_xlib.h ================================================ #ifndef VULKAN_XLIB_H_ #define VULKAN_XLIB_H_ 1 /* ** Copyright 2015-2025 The Khronos Group Inc. ** ** SPDX-License-Identifier: Apache-2.0 */ /* ** This header is generated from the Khronos Vulkan XML API Registry. ** */ #ifdef __cplusplus extern "C" { #endif // VK_KHR_xlib_surface is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_xlib_surface 1 #define VK_KHR_XLIB_SURFACE_SPEC_VERSION 6 #define VK_KHR_XLIB_SURFACE_EXTENSION_NAME "VK_KHR_xlib_surface" typedef VkFlags VkXlibSurfaceCreateFlagsKHR; typedef struct VkXlibSurfaceCreateInfoKHR { VkStructureType sType; const void* pNext; VkXlibSurfaceCreateFlagsKHR flags; Display* dpy; Window window; } VkXlibSurfaceCreateInfoKHR; typedef VkResult (VKAPI_PTR *PFN_vkCreateXlibSurfaceKHR)(VkInstance instance, const VkXlibSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, Display* dpy, VisualID visualID); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkCreateXlibSurfaceKHR( VkInstance instance, const VkXlibSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceXlibPresentationSupportKHR( VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, Display* dpy, VisualID visualID); #endif #ifdef __cplusplus } #endif #endif ================================================ FILE: src/libraries/vulkanheaders/vulkan_xlib_xrandr.h ================================================ #ifndef VULKAN_XLIB_XRANDR_H_ #define VULKAN_XLIB_XRANDR_H_ 1 /* ** Copyright 2015-2025 The Khronos Group Inc. ** ** SPDX-License-Identifier: Apache-2.0 */ /* ** This header is generated from the Khronos Vulkan XML API Registry. ** */ #ifdef __cplusplus extern "C" { #endif // VK_EXT_acquire_xlib_display is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_acquire_xlib_display 1 #define VK_EXT_ACQUIRE_XLIB_DISPLAY_SPEC_VERSION 1 #define VK_EXT_ACQUIRE_XLIB_DISPLAY_EXTENSION_NAME "VK_EXT_acquire_xlib_display" typedef VkResult (VKAPI_PTR *PFN_vkAcquireXlibDisplayEXT)(VkPhysicalDevice physicalDevice, Display* dpy, VkDisplayKHR display); typedef VkResult (VKAPI_PTR *PFN_vkGetRandROutputDisplayEXT)(VkPhysicalDevice physicalDevice, Display* dpy, RROutput rrOutput, VkDisplayKHR* pDisplay); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkAcquireXlibDisplayEXT( VkPhysicalDevice physicalDevice, Display* dpy, VkDisplayKHR display); VKAPI_ATTR VkResult VKAPI_CALL vkGetRandROutputDisplayEXT( VkPhysicalDevice physicalDevice, Display* dpy, RROutput rrOutput, VkDisplayKHR* pDisplay); #endif #ifdef __cplusplus } #endif #endif ================================================ FILE: src/libraries/xxHash/xxhash.c ================================================ /* * xxHash - Fast Hash algorithm * Copyright (C) 2012-2016, Yann Collet * * BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php) * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following disclaimer * in the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * You can contact the author at : * - xxHash homepage: http://www.xxhash.com * - xxHash source repository : https://github.com/Cyan4973/xxHash */ /* ************************************* * Tuning parameters ***************************************/ /*!XXH_FORCE_MEMORY_ACCESS : * By default, access to unaligned memory is controlled by `memcpy()`, which is safe and portable. * Unfortunately, on some target/compiler combinations, the generated assembly is sub-optimal. * The below switch allow to select different access method for improved performance. * Method 0 (default) : use `memcpy()`. Safe and portable. * Method 1 : `__packed` statement. It depends on compiler extension (ie, not portable). * This method is safe if your compiler supports it, and *generally* as fast or faster than `memcpy`. * Method 2 : direct access. This method doesn't depend on compiler but violate C standard. * It can generate buggy code on targets which do not support unaligned memory accesses. * But in some circumstances, it's the only known way to get the most performance (ie GCC + ARMv6) * See http://stackoverflow.com/a/32095106/646947 for details. * Prefer these methods in priority order (0 > 1 > 2) */ #ifndef XXH_FORCE_MEMORY_ACCESS /* can be defined externally, on command line for example */ # if defined(__GNUC__) && ( defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__) || defined(__ARM_ARCH_6T2__) ) # define XXH_FORCE_MEMORY_ACCESS 2 # elif defined(__INTEL_COMPILER) || \ (defined(__GNUC__) && ( defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7S__) )) # define XXH_FORCE_MEMORY_ACCESS 1 # endif #endif /*!XXH_ACCEPT_NULL_INPUT_POINTER : * If the input pointer is a null pointer, xxHash default behavior is to trigger a memory access error, since it is a bad pointer. * When this option is enabled, xxHash output for null input pointers will be the same as a null-length input. * By default, this option is disabled. To enable it, uncomment below define : */ /* #define XXH_ACCEPT_NULL_INPUT_POINTER 1 */ /*!XXH_FORCE_NATIVE_FORMAT : * By default, xxHash library provides endian-independent Hash values, based on little-endian convention. * Results are therefore identical for little-endian and big-endian CPU. * This comes at a performance cost for big-endian CPU, since some swapping is required to emulate little-endian format. * Should endian-independence be of no importance for your application, you may set the #define below to 1, * to improve speed for Big-endian CPU. * This option has no impact on Little_Endian CPU. */ #ifndef XXH_FORCE_NATIVE_FORMAT /* can be defined externally */ # define XXH_FORCE_NATIVE_FORMAT 0 #endif /*!XXH_FORCE_ALIGN_CHECK : * This is a minor performance trick, only useful with lots of very small keys. * It means : check for aligned/unaligned input. * The check costs one initial branch per hash; set to 0 when the input data * is guaranteed to be aligned. */ #ifndef XXH_FORCE_ALIGN_CHECK /* can be defined externally */ # if defined(__i386) || defined(_M_IX86) || defined(__x86_64__) || defined(_M_X64) # define XXH_FORCE_ALIGN_CHECK 0 # else # define XXH_FORCE_ALIGN_CHECK 1 # endif #endif /* ************************************* * Includes & Memory related functions ***************************************/ /*! Modify the local functions below should you wish to use some other memory routines * for malloc(), free() */ #include static void* XXH_malloc(size_t s) { return malloc(s); } static void XXH_free (void* p) { free(p); } /*! and for memcpy() */ #include static void* XXH_memcpy(void* dest, const void* src, size_t size) { return memcpy(dest,src,size); } #define XXH_STATIC_LINKING_ONLY #include "xxhash.h" /* ************************************* * Compiler Specific Options ***************************************/ #ifdef _MSC_VER /* Visual Studio */ # pragma warning(disable : 4127) /* disable: C4127: conditional expression is constant */ # define FORCE_INLINE static __forceinline #else # if defined (__cplusplus) || defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 */ # ifdef __GNUC__ # define FORCE_INLINE static inline __attribute__((always_inline)) # else # define FORCE_INLINE static inline # endif # else # define FORCE_INLINE static # endif /* __STDC_VERSION__ */ #endif /* ************************************* * Basic Types ***************************************/ #ifndef MEM_MODULE # if !defined (__VMS) && (defined (__cplusplus) || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */) ) # include typedef uint8_t BYTE; typedef uint16_t U16; typedef uint32_t U32; typedef int32_t S32; # else typedef unsigned char BYTE; typedef unsigned short U16; typedef unsigned int U32; typedef signed int S32; # endif #endif #if (defined(XXH_FORCE_MEMORY_ACCESS) && (XXH_FORCE_MEMORY_ACCESS==2)) /* Force direct memory access. Only works on CPU which support unaligned memory access in hardware */ static U32 XXH_read32(const void* memPtr) { return *(const U32*) memPtr; } #elif (defined(XXH_FORCE_MEMORY_ACCESS) && (XXH_FORCE_MEMORY_ACCESS==1)) /* __pack instructions are safer, but compiler specific, hence potentially problematic for some compilers */ /* currently only defined for gcc and icc */ typedef union { U32 u32; } __attribute__((packed)) unalign; static U32 XXH_read32(const void* ptr) { return ((const unalign*)ptr)->u32; } #else /* portable and safe solution. Generally efficient. * see : http://stackoverflow.com/a/32095106/646947 */ static U32 XXH_read32(const void* memPtr) { U32 val; memcpy(&val, memPtr, sizeof(val)); return val; } #endif /* XXH_FORCE_DIRECT_MEMORY_ACCESS */ /* **************************************** * Compiler-specific Functions and Macros ******************************************/ #define XXH_GCC_VERSION (__GNUC__ * 100 + __GNUC_MINOR__) /* Note : although _rotl exists for minGW (GCC under windows), performance seems poor */ #if defined(_MSC_VER) # define XXH_rotl32(x,r) _rotl(x,r) # define XXH_rotl64(x,r) _rotl64(x,r) #else # define XXH_rotl32(x,r) ((x << r) | (x >> (32 - r))) # define XXH_rotl64(x,r) ((x << r) | (x >> (64 - r))) #endif #if defined(_MSC_VER) /* Visual Studio */ # define XXH_swap32 _byteswap_ulong #elif XXH_GCC_VERSION >= 403 # define XXH_swap32 __builtin_bswap32 #else static U32 XXH_swap32 (U32 x) { return ((x << 24) & 0xff000000 ) | ((x << 8) & 0x00ff0000 ) | ((x >> 8) & 0x0000ff00 ) | ((x >> 24) & 0x000000ff ); } #endif /* ************************************* * Architecture Macros ***************************************/ typedef enum { XXH_bigEndian=0, XXH_littleEndian=1 } XXH_endianess; /* XXH_CPU_LITTLE_ENDIAN can be defined externally, for example on the compiler command line */ #ifndef XXH_CPU_LITTLE_ENDIAN static const int g_one = 1; # define XXH_CPU_LITTLE_ENDIAN (*(const char*)(&g_one)) #endif /* *************************** * Memory reads *****************************/ typedef enum { XXH_aligned, XXH_unaligned } XXH_alignment; FORCE_INLINE U32 XXH_readLE32_align(const void* ptr, XXH_endianess endian, XXH_alignment align) { if (align==XXH_unaligned) return endian==XXH_littleEndian ? XXH_read32(ptr) : XXH_swap32(XXH_read32(ptr)); else return endian==XXH_littleEndian ? *(const U32*)ptr : XXH_swap32(*(const U32*)ptr); } FORCE_INLINE U32 XXH_readLE32(const void* ptr, XXH_endianess endian) { return XXH_readLE32_align(ptr, endian, XXH_unaligned); } static U32 XXH_readBE32(const void* ptr) { return XXH_CPU_LITTLE_ENDIAN ? XXH_swap32(XXH_read32(ptr)) : XXH_read32(ptr); } /* ************************************* * Macros ***************************************/ #define XXH_STATIC_ASSERT(c) { enum { XXH_static_assert = 1/(int)(!!(c)) }; } /* use only *after* variable declarations */ XXH_PUBLIC_API unsigned XXH_versionNumber (void) { return XXH_VERSION_NUMBER; } /* ******************************************************************* * 32-bits hash functions *********************************************************************/ static const U32 PRIME32_1 = 2654435761U; static const U32 PRIME32_2 = 2246822519U; static const U32 PRIME32_3 = 3266489917U; static const U32 PRIME32_4 = 668265263U; static const U32 PRIME32_5 = 374761393U; static U32 XXH32_round(U32 seed, U32 input) { seed += input * PRIME32_2; seed = XXH_rotl32(seed, 13); seed *= PRIME32_1; return seed; } FORCE_INLINE U32 XXH32_endian_align(const void* input, size_t len, U32 seed, XXH_endianess endian, XXH_alignment align) { const BYTE* p = (const BYTE*)input; const BYTE* bEnd = p + len; U32 h32; #define XXH_get32bits(p) XXH_readLE32_align(p, endian, align) #ifdef XXH_ACCEPT_NULL_INPUT_POINTER if (p==NULL) { len=0; bEnd=p=(const BYTE*)(size_t)16; } #endif if (len>=16) { const BYTE* const limit = bEnd - 16; U32 v1 = seed + PRIME32_1 + PRIME32_2; U32 v2 = seed + PRIME32_2; U32 v3 = seed + 0; U32 v4 = seed - PRIME32_1; do { v1 = XXH32_round(v1, XXH_get32bits(p)); p+=4; v2 = XXH32_round(v2, XXH_get32bits(p)); p+=4; v3 = XXH32_round(v3, XXH_get32bits(p)); p+=4; v4 = XXH32_round(v4, XXH_get32bits(p)); p+=4; } while (p<=limit); h32 = XXH_rotl32(v1, 1) + XXH_rotl32(v2, 7) + XXH_rotl32(v3, 12) + XXH_rotl32(v4, 18); } else { h32 = seed + PRIME32_5; } h32 += (U32) len; while (p+4<=bEnd) { h32 += XXH_get32bits(p) * PRIME32_3; h32 = XXH_rotl32(h32, 17) * PRIME32_4 ; p+=4; } while (p> 15; h32 *= PRIME32_2; h32 ^= h32 >> 13; h32 *= PRIME32_3; h32 ^= h32 >> 16; return h32; } XXH_PUBLIC_API unsigned int XXH32 (const void* input, size_t len, unsigned int seed) { #if 0 /* Simple version, good for code maintenance, but unfortunately slow for small inputs */ XXH32_state_t state; XXH32_reset(&state, seed); XXH32_update(&state, input, len); return XXH32_digest(&state); #else XXH_endianess endian_detected = (XXH_endianess)XXH_CPU_LITTLE_ENDIAN; if (XXH_FORCE_ALIGN_CHECK) { if ((((size_t)input) & 3) == 0) { /* Input is 4-bytes aligned, leverage the speed benefit */ if ((endian_detected==XXH_littleEndian) || XXH_FORCE_NATIVE_FORMAT) return XXH32_endian_align(input, len, seed, XXH_littleEndian, XXH_aligned); else return XXH32_endian_align(input, len, seed, XXH_bigEndian, XXH_aligned); } } if ((endian_detected==XXH_littleEndian) || XXH_FORCE_NATIVE_FORMAT) return XXH32_endian_align(input, len, seed, XXH_littleEndian, XXH_unaligned); else return XXH32_endian_align(input, len, seed, XXH_bigEndian, XXH_unaligned); #endif } /*====== Hash streaming ======*/ XXH_PUBLIC_API XXH32_state_t* XXH32_createState(void) { return (XXH32_state_t*)XXH_malloc(sizeof(XXH32_state_t)); } XXH_PUBLIC_API XXH_errorcode XXH32_freeState(XXH32_state_t* statePtr) { XXH_free(statePtr); return XXH_OK; } XXH_PUBLIC_API void XXH32_copyState(XXH32_state_t* dstState, const XXH32_state_t* srcState) { memcpy(dstState, srcState, sizeof(*dstState)); } XXH_PUBLIC_API XXH_errorcode XXH32_reset(XXH32_state_t* statePtr, unsigned int seed) { XXH32_state_t state; /* using a local state to memcpy() in order to avoid strict-aliasing warnings */ memset(&state, 0, sizeof(state)-4); /* do not write into reserved, for future removal */ state.v1 = seed + PRIME32_1 + PRIME32_2; state.v2 = seed + PRIME32_2; state.v3 = seed + 0; state.v4 = seed - PRIME32_1; memcpy(statePtr, &state, sizeof(state)); return XXH_OK; } FORCE_INLINE XXH_errorcode XXH32_update_endian (XXH32_state_t* state, const void* input, size_t len, XXH_endianess endian) { const BYTE* p = (const BYTE*)input; const BYTE* const bEnd = p + len; #ifdef XXH_ACCEPT_NULL_INPUT_POINTER if (input==NULL) return XXH_ERROR; #endif state->total_len_32 += (unsigned)len; state->large_len |= (len>=16) | (state->total_len_32>=16); if (state->memsize + len < 16) { /* fill in tmp buffer */ XXH_memcpy((BYTE*)(state->mem32) + state->memsize, input, len); state->memsize += (unsigned)len; return XXH_OK; } if (state->memsize) { /* some data left from previous update */ XXH_memcpy((BYTE*)(state->mem32) + state->memsize, input, 16-state->memsize); { const U32* p32 = state->mem32; state->v1 = XXH32_round(state->v1, XXH_readLE32(p32, endian)); p32++; state->v2 = XXH32_round(state->v2, XXH_readLE32(p32, endian)); p32++; state->v3 = XXH32_round(state->v3, XXH_readLE32(p32, endian)); p32++; state->v4 = XXH32_round(state->v4, XXH_readLE32(p32, endian)); p32++; } p += 16-state->memsize; state->memsize = 0; } if (p <= bEnd-16) { const BYTE* const limit = bEnd - 16; U32 v1 = state->v1; U32 v2 = state->v2; U32 v3 = state->v3; U32 v4 = state->v4; do { v1 = XXH32_round(v1, XXH_readLE32(p, endian)); p+=4; v2 = XXH32_round(v2, XXH_readLE32(p, endian)); p+=4; v3 = XXH32_round(v3, XXH_readLE32(p, endian)); p+=4; v4 = XXH32_round(v4, XXH_readLE32(p, endian)); p+=4; } while (p<=limit); state->v1 = v1; state->v2 = v2; state->v3 = v3; state->v4 = v4; } if (p < bEnd) { XXH_memcpy(state->mem32, p, (size_t)(bEnd-p)); state->memsize = (unsigned)(bEnd-p); } return XXH_OK; } XXH_PUBLIC_API XXH_errorcode XXH32_update (XXH32_state_t* state_in, const void* input, size_t len) { XXH_endianess endian_detected = (XXH_endianess)XXH_CPU_LITTLE_ENDIAN; if ((endian_detected==XXH_littleEndian) || XXH_FORCE_NATIVE_FORMAT) return XXH32_update_endian(state_in, input, len, XXH_littleEndian); else return XXH32_update_endian(state_in, input, len, XXH_bigEndian); } FORCE_INLINE U32 XXH32_digest_endian (const XXH32_state_t* state, XXH_endianess endian) { const BYTE * p = (const BYTE*)state->mem32; const BYTE* const bEnd = (const BYTE*)(state->mem32) + state->memsize; U32 h32; if (state->large_len) { h32 = XXH_rotl32(state->v1, 1) + XXH_rotl32(state->v2, 7) + XXH_rotl32(state->v3, 12) + XXH_rotl32(state->v4, 18); } else { h32 = state->v3 /* == seed */ + PRIME32_5; } h32 += state->total_len_32; while (p+4<=bEnd) { h32 += XXH_readLE32(p, endian) * PRIME32_3; h32 = XXH_rotl32(h32, 17) * PRIME32_4; p+=4; } while (p> 15; h32 *= PRIME32_2; h32 ^= h32 >> 13; h32 *= PRIME32_3; h32 ^= h32 >> 16; return h32; } XXH_PUBLIC_API unsigned int XXH32_digest (const XXH32_state_t* state_in) { XXH_endianess endian_detected = (XXH_endianess)XXH_CPU_LITTLE_ENDIAN; if ((endian_detected==XXH_littleEndian) || XXH_FORCE_NATIVE_FORMAT) return XXH32_digest_endian(state_in, XXH_littleEndian); else return XXH32_digest_endian(state_in, XXH_bigEndian); } /*====== Canonical representation ======*/ /*! Default XXH result types are basic unsigned 32 and 64 bits. * The canonical representation follows human-readable write convention, aka big-endian (large digits first). * These functions allow transformation of hash result into and from its canonical format. * This way, hash values can be written into a file or buffer, and remain comparable across different systems and programs. */ XXH_PUBLIC_API void XXH32_canonicalFromHash(XXH32_canonical_t* dst, XXH32_hash_t hash) { XXH_STATIC_ASSERT(sizeof(XXH32_canonical_t) == sizeof(XXH32_hash_t)); if (XXH_CPU_LITTLE_ENDIAN) hash = XXH_swap32(hash); memcpy(dst, &hash, sizeof(*dst)); } XXH_PUBLIC_API XXH32_hash_t XXH32_hashFromCanonical(const XXH32_canonical_t* src) { return XXH_readBE32(src); } #ifndef XXH_NO_LONG_LONG /* ******************************************************************* * 64-bits hash functions *********************************************************************/ /*====== Memory access ======*/ #ifndef MEM_MODULE # define MEM_MODULE # if !defined (__VMS) && (defined (__cplusplus) || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */) ) # include typedef uint64_t U64; # else typedef unsigned long long U64; /* if your compiler doesn't support unsigned long long, replace by another 64-bit type here. Note that xxhash.h will also need to be updated. */ # endif #endif #if (defined(XXH_FORCE_MEMORY_ACCESS) && (XXH_FORCE_MEMORY_ACCESS==2)) /* Force direct memory access. Only works on CPU which support unaligned memory access in hardware */ static U64 XXH_read64(const void* memPtr) { return *(const U64*) memPtr; } #elif (defined(XXH_FORCE_MEMORY_ACCESS) && (XXH_FORCE_MEMORY_ACCESS==1)) /* __pack instructions are safer, but compiler specific, hence potentially problematic for some compilers */ /* currently only defined for gcc and icc */ typedef union { U32 u32; U64 u64; } __attribute__((packed)) unalign64; static U64 XXH_read64(const void* ptr) { return ((const unalign64*)ptr)->u64; } #else /* portable and safe solution. Generally efficient. * see : http://stackoverflow.com/a/32095106/646947 */ static U64 XXH_read64(const void* memPtr) { U64 val; memcpy(&val, memPtr, sizeof(val)); return val; } #endif /* XXH_FORCE_DIRECT_MEMORY_ACCESS */ #if defined(_MSC_VER) /* Visual Studio */ # define XXH_swap64 _byteswap_uint64 #elif XXH_GCC_VERSION >= 403 # define XXH_swap64 __builtin_bswap64 #else static U64 XXH_swap64 (U64 x) { return ((x << 56) & 0xff00000000000000ULL) | ((x << 40) & 0x00ff000000000000ULL) | ((x << 24) & 0x0000ff0000000000ULL) | ((x << 8) & 0x000000ff00000000ULL) | ((x >> 8) & 0x00000000ff000000ULL) | ((x >> 24) & 0x0000000000ff0000ULL) | ((x >> 40) & 0x000000000000ff00ULL) | ((x >> 56) & 0x00000000000000ffULL); } #endif FORCE_INLINE U64 XXH_readLE64_align(const void* ptr, XXH_endianess endian, XXH_alignment align) { if (align==XXH_unaligned) return endian==XXH_littleEndian ? XXH_read64(ptr) : XXH_swap64(XXH_read64(ptr)); else return endian==XXH_littleEndian ? *(const U64*)ptr : XXH_swap64(*(const U64*)ptr); } FORCE_INLINE U64 XXH_readLE64(const void* ptr, XXH_endianess endian) { return XXH_readLE64_align(ptr, endian, XXH_unaligned); } static U64 XXH_readBE64(const void* ptr) { return XXH_CPU_LITTLE_ENDIAN ? XXH_swap64(XXH_read64(ptr)) : XXH_read64(ptr); } /*====== xxh64 ======*/ static const U64 PRIME64_1 = 11400714785074694791ULL; static const U64 PRIME64_2 = 14029467366897019727ULL; static const U64 PRIME64_3 = 1609587929392839161ULL; static const U64 PRIME64_4 = 9650029242287828579ULL; static const U64 PRIME64_5 = 2870177450012600261ULL; static U64 XXH64_round(U64 acc, U64 input) { acc += input * PRIME64_2; acc = XXH_rotl64(acc, 31); acc *= PRIME64_1; return acc; } static U64 XXH64_mergeRound(U64 acc, U64 val) { val = XXH64_round(0, val); acc ^= val; acc = acc * PRIME64_1 + PRIME64_4; return acc; } FORCE_INLINE U64 XXH64_endian_align(const void* input, size_t len, U64 seed, XXH_endianess endian, XXH_alignment align) { const BYTE* p = (const BYTE*)input; const BYTE* bEnd = p + len; U64 h64; #define XXH_get64bits(p) XXH_readLE64_align(p, endian, align) #ifdef XXH_ACCEPT_NULL_INPUT_POINTER if (p==NULL) { len=0; bEnd=p=(const BYTE*)(size_t)32; } #endif if (len>=32) { const BYTE* const limit = bEnd - 32; U64 v1 = seed + PRIME64_1 + PRIME64_2; U64 v2 = seed + PRIME64_2; U64 v3 = seed + 0; U64 v4 = seed - PRIME64_1; do { v1 = XXH64_round(v1, XXH_get64bits(p)); p+=8; v2 = XXH64_round(v2, XXH_get64bits(p)); p+=8; v3 = XXH64_round(v3, XXH_get64bits(p)); p+=8; v4 = XXH64_round(v4, XXH_get64bits(p)); p+=8; } while (p<=limit); h64 = XXH_rotl64(v1, 1) + XXH_rotl64(v2, 7) + XXH_rotl64(v3, 12) + XXH_rotl64(v4, 18); h64 = XXH64_mergeRound(h64, v1); h64 = XXH64_mergeRound(h64, v2); h64 = XXH64_mergeRound(h64, v3); h64 = XXH64_mergeRound(h64, v4); } else { h64 = seed + PRIME64_5; } h64 += (U64) len; while (p+8<=bEnd) { U64 const k1 = XXH64_round(0, XXH_get64bits(p)); h64 ^= k1; h64 = XXH_rotl64(h64,27) * PRIME64_1 + PRIME64_4; p+=8; } if (p+4<=bEnd) { h64 ^= (U64)(XXH_get32bits(p)) * PRIME64_1; h64 = XXH_rotl64(h64, 23) * PRIME64_2 + PRIME64_3; p+=4; } while (p> 33; h64 *= PRIME64_2; h64 ^= h64 >> 29; h64 *= PRIME64_3; h64 ^= h64 >> 32; return h64; } XXH_PUBLIC_API unsigned long long XXH64 (const void* input, size_t len, unsigned long long seed) { #if 0 /* Simple version, good for code maintenance, but unfortunately slow for small inputs */ XXH64_state_t state; XXH64_reset(&state, seed); XXH64_update(&state, input, len); return XXH64_digest(&state); #else XXH_endianess endian_detected = (XXH_endianess)XXH_CPU_LITTLE_ENDIAN; if (XXH_FORCE_ALIGN_CHECK) { if ((((size_t)input) & 7)==0) { /* Input is aligned, let's leverage the speed advantage */ if ((endian_detected==XXH_littleEndian) || XXH_FORCE_NATIVE_FORMAT) return XXH64_endian_align(input, len, seed, XXH_littleEndian, XXH_aligned); else return XXH64_endian_align(input, len, seed, XXH_bigEndian, XXH_aligned); } } if ((endian_detected==XXH_littleEndian) || XXH_FORCE_NATIVE_FORMAT) return XXH64_endian_align(input, len, seed, XXH_littleEndian, XXH_unaligned); else return XXH64_endian_align(input, len, seed, XXH_bigEndian, XXH_unaligned); #endif } /*====== Hash Streaming ======*/ XXH_PUBLIC_API XXH64_state_t* XXH64_createState(void) { return (XXH64_state_t*)XXH_malloc(sizeof(XXH64_state_t)); } XXH_PUBLIC_API XXH_errorcode XXH64_freeState(XXH64_state_t* statePtr) { XXH_free(statePtr); return XXH_OK; } XXH_PUBLIC_API void XXH64_copyState(XXH64_state_t* dstState, const XXH64_state_t* srcState) { memcpy(dstState, srcState, sizeof(*dstState)); } XXH_PUBLIC_API XXH_errorcode XXH64_reset(XXH64_state_t* statePtr, unsigned long long seed) { XXH64_state_t state; /* using a local state to memcpy() in order to avoid strict-aliasing warnings */ memset(&state, 0, sizeof(state)-8); /* do not write into reserved, for future removal */ state.v1 = seed + PRIME64_1 + PRIME64_2; state.v2 = seed + PRIME64_2; state.v3 = seed + 0; state.v4 = seed - PRIME64_1; memcpy(statePtr, &state, sizeof(state)); return XXH_OK; } FORCE_INLINE XXH_errorcode XXH64_update_endian (XXH64_state_t* state, const void* input, size_t len, XXH_endianess endian) { const BYTE* p = (const BYTE*)input; const BYTE* const bEnd = p + len; #ifdef XXH_ACCEPT_NULL_INPUT_POINTER if (input==NULL) return XXH_ERROR; #endif state->total_len += len; if (state->memsize + len < 32) { /* fill in tmp buffer */ XXH_memcpy(((BYTE*)state->mem64) + state->memsize, input, len); state->memsize += (U32)len; return XXH_OK; } if (state->memsize) { /* tmp buffer is full */ XXH_memcpy(((BYTE*)state->mem64) + state->memsize, input, 32-state->memsize); state->v1 = XXH64_round(state->v1, XXH_readLE64(state->mem64+0, endian)); state->v2 = XXH64_round(state->v2, XXH_readLE64(state->mem64+1, endian)); state->v3 = XXH64_round(state->v3, XXH_readLE64(state->mem64+2, endian)); state->v4 = XXH64_round(state->v4, XXH_readLE64(state->mem64+3, endian)); p += 32-state->memsize; state->memsize = 0; } if (p+32 <= bEnd) { const BYTE* const limit = bEnd - 32; U64 v1 = state->v1; U64 v2 = state->v2; U64 v3 = state->v3; U64 v4 = state->v4; do { v1 = XXH64_round(v1, XXH_readLE64(p, endian)); p+=8; v2 = XXH64_round(v2, XXH_readLE64(p, endian)); p+=8; v3 = XXH64_round(v3, XXH_readLE64(p, endian)); p+=8; v4 = XXH64_round(v4, XXH_readLE64(p, endian)); p+=8; } while (p<=limit); state->v1 = v1; state->v2 = v2; state->v3 = v3; state->v4 = v4; } if (p < bEnd) { XXH_memcpy(state->mem64, p, (size_t)(bEnd-p)); state->memsize = (unsigned)(bEnd-p); } return XXH_OK; } XXH_PUBLIC_API XXH_errorcode XXH64_update (XXH64_state_t* state_in, const void* input, size_t len) { XXH_endianess endian_detected = (XXH_endianess)XXH_CPU_LITTLE_ENDIAN; if ((endian_detected==XXH_littleEndian) || XXH_FORCE_NATIVE_FORMAT) return XXH64_update_endian(state_in, input, len, XXH_littleEndian); else return XXH64_update_endian(state_in, input, len, XXH_bigEndian); } FORCE_INLINE U64 XXH64_digest_endian (const XXH64_state_t* state, XXH_endianess endian) { const BYTE * p = (const BYTE*)state->mem64; const BYTE* const bEnd = (const BYTE*)state->mem64 + state->memsize; U64 h64; if (state->total_len >= 32) { U64 const v1 = state->v1; U64 const v2 = state->v2; U64 const v3 = state->v3; U64 const v4 = state->v4; h64 = XXH_rotl64(v1, 1) + XXH_rotl64(v2, 7) + XXH_rotl64(v3, 12) + XXH_rotl64(v4, 18); h64 = XXH64_mergeRound(h64, v1); h64 = XXH64_mergeRound(h64, v2); h64 = XXH64_mergeRound(h64, v3); h64 = XXH64_mergeRound(h64, v4); } else { h64 = state->v3 + PRIME64_5; } h64 += (U64) state->total_len; while (p+8<=bEnd) { U64 const k1 = XXH64_round(0, XXH_readLE64(p, endian)); h64 ^= k1; h64 = XXH_rotl64(h64,27) * PRIME64_1 + PRIME64_4; p+=8; } if (p+4<=bEnd) { h64 ^= (U64)(XXH_readLE32(p, endian)) * PRIME64_1; h64 = XXH_rotl64(h64, 23) * PRIME64_2 + PRIME64_3; p+=4; } while (p> 33; h64 *= PRIME64_2; h64 ^= h64 >> 29; h64 *= PRIME64_3; h64 ^= h64 >> 32; return h64; } XXH_PUBLIC_API unsigned long long XXH64_digest (const XXH64_state_t* state_in) { XXH_endianess endian_detected = (XXH_endianess)XXH_CPU_LITTLE_ENDIAN; if ((endian_detected==XXH_littleEndian) || XXH_FORCE_NATIVE_FORMAT) return XXH64_digest_endian(state_in, XXH_littleEndian); else return XXH64_digest_endian(state_in, XXH_bigEndian); } /*====== Canonical representation ======*/ XXH_PUBLIC_API void XXH64_canonicalFromHash(XXH64_canonical_t* dst, XXH64_hash_t hash) { XXH_STATIC_ASSERT(sizeof(XXH64_canonical_t) == sizeof(XXH64_hash_t)); if (XXH_CPU_LITTLE_ENDIAN) hash = XXH_swap64(hash); memcpy(dst, &hash, sizeof(*dst)); } XXH_PUBLIC_API XXH64_hash_t XXH64_hashFromCanonical(const XXH64_canonical_t* src) { return XXH_readBE64(src); } #endif /* XXH_NO_LONG_LONG */ ================================================ FILE: src/libraries/xxHash/xxhash.h ================================================ /* xxHash - Extremely Fast Hash algorithm Header File Copyright (C) 2012-2016, Yann Collet. BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php) Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. You can contact the author at : - xxHash source repository : https://github.com/Cyan4973/xxHash */ /* Notice extracted from xxHash homepage : xxHash is an extremely fast Hash algorithm, running at RAM speed limits. It also successfully passes all tests from the SMHasher suite. Comparison (single thread, Windows Seven 32 bits, using SMHasher on a Core 2 Duo @3GHz) Name Speed Q.Score Author xxHash 5.4 GB/s 10 CrapWow 3.2 GB/s 2 Andrew MumurHash 3a 2.7 GB/s 10 Austin Appleby SpookyHash 2.0 GB/s 10 Bob Jenkins SBox 1.4 GB/s 9 Bret Mulvey Lookup3 1.2 GB/s 9 Bob Jenkins SuperFastHash 1.2 GB/s 1 Paul Hsieh CityHash64 1.05 GB/s 10 Pike & Alakuijala FNV 0.55 GB/s 5 Fowler, Noll, Vo CRC32 0.43 GB/s 9 MD5-32 0.33 GB/s 10 Ronald L. Rivest SHA1-32 0.28 GB/s 10 Q.Score is a measure of quality of the hash function. It depends on successfully passing SMHasher test set. 10 is a perfect score. A 64-bits version, named XXH64, is available since r35. It offers much better speed, but for 64-bits applications only. Name Speed on 64 bits Speed on 32 bits XXH64 13.8 GB/s 1.9 GB/s XXH32 6.8 GB/s 6.0 GB/s */ #ifndef XXHASH_H_5627135585666179 #define XXHASH_H_5627135585666179 1 #if defined (__cplusplus) extern "C" { #endif /* **************************** * Definitions ******************************/ #include /* size_t */ typedef enum { XXH_OK=0, XXH_ERROR } XXH_errorcode; /* **************************** * API modifier ******************************/ /** XXH_PRIVATE_API * This is useful to include xxhash functions in `static` mode * in order to inline them, and remove their symbol from the public list. * Methodology : * #define XXH_PRIVATE_API * #include "xxhash.h" * `xxhash.c` is automatically included. * It's not useful to compile and link it as a separate module. */ #ifdef XXH_PRIVATE_API # ifndef XXH_STATIC_LINKING_ONLY # define XXH_STATIC_LINKING_ONLY # endif # if defined(__GNUC__) # define XXH_PUBLIC_API static __inline __attribute__((unused)) # elif defined (__cplusplus) || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */) # define XXH_PUBLIC_API static inline # elif defined(_MSC_VER) # define XXH_PUBLIC_API static __inline # else # define XXH_PUBLIC_API static /* this version may generate warnings for unused static functions; disable the relevant warning */ # endif #else # define XXH_PUBLIC_API /* do nothing */ #endif /* XXH_PRIVATE_API */ /*!XXH_NAMESPACE, aka Namespace Emulation : If you want to include _and expose_ xxHash functions from within your own library, but also want to avoid symbol collisions with other libraries which may also include xxHash, you can use XXH_NAMESPACE, to automatically prefix any public symbol from xxhash library with the value of XXH_NAMESPACE (therefore, avoid NULL and numeric values). Note that no change is required within the calling program as long as it includes `xxhash.h` : regular symbol name will be automatically translated by this header. */ #ifdef XXH_NAMESPACE # define XXH_CAT(A,B) A##B # define XXH_NAME2(A,B) XXH_CAT(A,B) # define XXH_versionNumber XXH_NAME2(XXH_NAMESPACE, XXH_versionNumber) # define XXH32 XXH_NAME2(XXH_NAMESPACE, XXH32) # define XXH32_createState XXH_NAME2(XXH_NAMESPACE, XXH32_createState) # define XXH32_freeState XXH_NAME2(XXH_NAMESPACE, XXH32_freeState) # define XXH32_reset XXH_NAME2(XXH_NAMESPACE, XXH32_reset) # define XXH32_update XXH_NAME2(XXH_NAMESPACE, XXH32_update) # define XXH32_digest XXH_NAME2(XXH_NAMESPACE, XXH32_digest) # define XXH32_copyState XXH_NAME2(XXH_NAMESPACE, XXH32_copyState) # define XXH32_canonicalFromHash XXH_NAME2(XXH_NAMESPACE, XXH32_canonicalFromHash) # define XXH32_hashFromCanonical XXH_NAME2(XXH_NAMESPACE, XXH32_hashFromCanonical) # define XXH64 XXH_NAME2(XXH_NAMESPACE, XXH64) # define XXH64_createState XXH_NAME2(XXH_NAMESPACE, XXH64_createState) # define XXH64_freeState XXH_NAME2(XXH_NAMESPACE, XXH64_freeState) # define XXH64_reset XXH_NAME2(XXH_NAMESPACE, XXH64_reset) # define XXH64_update XXH_NAME2(XXH_NAMESPACE, XXH64_update) # define XXH64_digest XXH_NAME2(XXH_NAMESPACE, XXH64_digest) # define XXH64_copyState XXH_NAME2(XXH_NAMESPACE, XXH64_copyState) # define XXH64_canonicalFromHash XXH_NAME2(XXH_NAMESPACE, XXH64_canonicalFromHash) # define XXH64_hashFromCanonical XXH_NAME2(XXH_NAMESPACE, XXH64_hashFromCanonical) #endif /* ************************************* * Version ***************************************/ #define XXH_VERSION_MAJOR 0 #define XXH_VERSION_MINOR 6 #define XXH_VERSION_RELEASE 2 #define XXH_VERSION_NUMBER (XXH_VERSION_MAJOR *100*100 + XXH_VERSION_MINOR *100 + XXH_VERSION_RELEASE) XXH_PUBLIC_API unsigned XXH_versionNumber (void); /*-********************************************************************** * 32-bits hash ************************************************************************/ typedef unsigned int XXH32_hash_t; /*! XXH32() : Calculate the 32-bits hash of sequence "length" bytes stored at memory address "input". The memory between input & input+length must be valid (allocated and read-accessible). "seed" can be used to alter the result predictably. Speed on Core 2 Duo @ 3 GHz (single thread, SMHasher benchmark) : 5.4 GB/s */ XXH_PUBLIC_API XXH32_hash_t XXH32 (const void* input, size_t length, unsigned int seed); /*====== Streaming ======*/ typedef struct XXH32_state_s XXH32_state_t; /* incomplete type */ XXH_PUBLIC_API XXH32_state_t* XXH32_createState(void); XXH_PUBLIC_API XXH_errorcode XXH32_freeState(XXH32_state_t* statePtr); XXH_PUBLIC_API void XXH32_copyState(XXH32_state_t* dst_state, const XXH32_state_t* src_state); XXH_PUBLIC_API XXH_errorcode XXH32_reset (XXH32_state_t* statePtr, unsigned int seed); XXH_PUBLIC_API XXH_errorcode XXH32_update (XXH32_state_t* statePtr, const void* input, size_t length); XXH_PUBLIC_API XXH32_hash_t XXH32_digest (const XXH32_state_t* statePtr); /* These functions generate the xxHash of an input provided in multiple segments. Note that, for small input, they are slower than single-call functions, due to state management. For small input, prefer `XXH32()` and `XXH64()` . XXH state must first be allocated, using XXH*_createState() . Start a new hash by initializing state with a seed, using XXH*_reset(). Then, feed the hash state by calling XXH*_update() as many times as necessary. Obviously, input must be allocated and read accessible. The function returns an error code, with 0 meaning OK, and any other value meaning there is an error. Finally, a hash value can be produced anytime, by using XXH*_digest(). This function returns the nn-bits hash as an int or long long. It's still possible to continue inserting input into the hash state after a digest, and generate some new hashes later on, by calling again XXH*_digest(). When done, free XXH state space if it was allocated dynamically. */ /*====== Canonical representation ======*/ typedef struct { unsigned char digest[4]; } XXH32_canonical_t; XXH_PUBLIC_API void XXH32_canonicalFromHash(XXH32_canonical_t* dst, XXH32_hash_t hash); XXH_PUBLIC_API XXH32_hash_t XXH32_hashFromCanonical(const XXH32_canonical_t* src); /* Default result type for XXH functions are primitive unsigned 32 and 64 bits. * The canonical representation uses human-readable write convention, aka big-endian (large digits first). * These functions allow transformation of hash result into and from its canonical format. * This way, hash values can be written into a file / memory, and remain comparable on different systems and programs. */ #ifndef XXH_NO_LONG_LONG /*-********************************************************************** * 64-bits hash ************************************************************************/ typedef unsigned long long XXH64_hash_t; /*! XXH64() : Calculate the 64-bits hash of sequence of length "len" stored at memory address "input". "seed" can be used to alter the result predictably. This function runs faster on 64-bits systems, but slower on 32-bits systems (see benchmark). */ XXH_PUBLIC_API XXH64_hash_t XXH64 (const void* input, size_t length, unsigned long long seed); /*====== Streaming ======*/ typedef struct XXH64_state_s XXH64_state_t; /* incomplete type */ XXH_PUBLIC_API XXH64_state_t* XXH64_createState(void); XXH_PUBLIC_API XXH_errorcode XXH64_freeState(XXH64_state_t* statePtr); XXH_PUBLIC_API void XXH64_copyState(XXH64_state_t* dst_state, const XXH64_state_t* src_state); XXH_PUBLIC_API XXH_errorcode XXH64_reset (XXH64_state_t* statePtr, unsigned long long seed); XXH_PUBLIC_API XXH_errorcode XXH64_update (XXH64_state_t* statePtr, const void* input, size_t length); XXH_PUBLIC_API XXH64_hash_t XXH64_digest (const XXH64_state_t* statePtr); /*====== Canonical representation ======*/ typedef struct { unsigned char digest[8]; } XXH64_canonical_t; XXH_PUBLIC_API void XXH64_canonicalFromHash(XXH64_canonical_t* dst, XXH64_hash_t hash); XXH_PUBLIC_API XXH64_hash_t XXH64_hashFromCanonical(const XXH64_canonical_t* src); #endif /* XXH_NO_LONG_LONG */ #ifdef XXH_STATIC_LINKING_ONLY /* ================================================================================================ This section contains definitions which are not guaranteed to remain stable. They may change in future versions, becoming incompatible with a different version of the library. They shall only be used with static linking. Never use these definitions in association with dynamic linking ! =================================================================================================== */ /* These definitions are only meant to make possible static allocation of XXH state, on stack or in a struct for example. Never use members directly. */ struct XXH32_state_s { unsigned total_len_32; unsigned large_len; unsigned v1; unsigned v2; unsigned v3; unsigned v4; unsigned mem32[4]; /* buffer defined as U32 for alignment */ unsigned memsize; unsigned reserved; /* never read nor write, will be removed in a future version */ }; /* typedef'd to XXH32_state_t */ #ifndef XXH_NO_LONG_LONG /* remove 64-bits support */ struct XXH64_state_s { unsigned long long total_len; unsigned long long v1; unsigned long long v2; unsigned long long v3; unsigned long long v4; unsigned long long mem64[4]; /* buffer defined as U64 for alignment */ unsigned memsize; unsigned reserved[2]; /* never read nor write, will be removed in a future version */ }; /* typedef'd to XXH64_state_t */ #endif #ifdef XXH_PRIVATE_API # include "xxhash.c" /* include xxhash function bodies as `static`, for inlining */ #endif #endif /* XXH_STATIC_LINKING_ONLY */ #if defined (__cplusplus) } #endif #endif /* XXHASH_H_5627135585666179 */ ================================================ FILE: src/love.cpp ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ #include "common/version.h" #include "common/runtime.h" #include "common/Variant.h" #include "modules/love/love.h" #include #ifdef LOVE_BUILD_EXE #include // Lua extern "C" { #include #include #include } #ifdef LOVE_WINDOWS #define WIN32_LEAN_AND_MEAN #include #endif // LOVE_WINDOWS #ifdef LOVE_MACOS #include "common/macos.h" #include #endif // LOVE_MACOS #ifdef LOVE_IOS #include "common/ios.h" #endif #ifdef LOVE_WINDOWS extern "C" { // Prefer the higher performance GPU on Windows systems that use nvidia Optimus. // http://developer.download.nvidia.com/devzone/devcenter/gamegraphics/files/OptimusRenderingPolicies.pdf // TODO: Re-evaluate in the future when the average integrated GPU in Optimus // systems is less mediocre? LOVE_EXPORT DWORD NvOptimusEnablement = 1; // Same with AMD GPUs. // https://community.amd.com/thread/169965 LOVE_EXPORT DWORD AmdPowerXpressRequestHighPerformance = 1; } #endif // LOVE_WINDOWS #ifdef LOVE_LEGENDARY_APP_ARGV_HACK #include // Explicitly instantiate std::vector to work around linker issues // with libc++ when symbols are hidden-by-default. // https://stackoverflow.com/a/48273604 template class std::vector; static void get_app_arguments(int argc, char **argv, int &new_argc, char **&new_argv) { std::vector temp_argv; for (int i = 0; i < argc; i++) { // Don't copy -psn_xxx argument from argv. if (i == 0 || strncmp(argv[i], "-psn_", 5) != 0) temp_argv.push_back(std::string(argv[i])); } // If it exists, add the love file in love.app/Contents/Resources/ to argv. std::string loveResourcesPath; bool fused = true; #if defined(LOVE_MACOS) loveResourcesPath = love::macos::getLoveInResources(); #elif defined(LOVE_IOS) loveResourcesPath = love::ios::getLoveInResources(fused); #endif if (!loveResourcesPath.empty()) { std::vector::iterator it = temp_argv.begin(); it = temp_argv.insert(it + 1, loveResourcesPath); // Run in pseudo-fused mode. if (fused) temp_argv.insert(it + 1, std::string("--fused")); } #ifdef LOVE_MACOS else { // Check for a drop file string, if the app wasn't launched in a // terminal. Checking for the terminal is a pretty big hack, but works // around an issue where OS X will switch Spaces if the terminal // launching love is in its own full-screen Space. if (!isatty(STDIN_FILENO)) { // Static to keep the same value after love.event.equit("restart"). static std::string dropfilestr = love::macos::checkDropEvents(); if (!dropfilestr.empty()) temp_argv.insert(temp_argv.begin() + 1, dropfilestr); } } #endif // Copy temp argv vector to new argv array. new_argc = (int) temp_argv.size(); new_argv = new char *[new_argc+1]; for (int i = 0; i < new_argc; i++) { new_argv[i] = new char[temp_argv[i].length() + 1]; strcpy(new_argv[i], temp_argv[i].c_str()); } new_argv[new_argc] = NULL; } #endif // LOVE_LEGENDARY_APP_ARGV_HACK static int love_preload(lua_State *L, lua_CFunction f, const char *name) { lua_getglobal(L, "package"); lua_getfield(L, -1, "preload"); lua_pushcfunction(L, f); lua_setfield(L, -2, name); lua_pop(L, 2); return 0; } enum DoneAction { DONE_QUIT, DONE_RESTART, }; static void print_usage() { // when editing this message, change it at boot.lua too printf("LOVE is an *awesome* framework you can use to make 2D games in Lua\n" "https://love2d.org\n" "\n" "usage:\n" " love --version prints LOVE version and quits\n" " love --help prints this message and quits\n" " love path/to/gamedir runs the game from the given directory which contains a main.lua file\n" " love path/to/packagedgame.love runs the packaged game from the provided .love file\n" " love path/to/file.lua runs the game from the given .lua file\n" ); } static DoneAction runlove(int argc, char **argv, int &retval, love::Variant &restartvalue) { // Oh, you just want the version? Okay! if (argc > 1 && strcmp(argv[1], "--version") == 0) { #ifdef LOVE_LEGENDARY_CONSOLE_IO_HACK const char *err = nullptr; love_openConsole(err); #endif printf("LOVE %s (%s)\n", love_version(), love_codename()); retval = 0; return DONE_QUIT; } if (argc > 1 && strcmp(argv[1], "--help") == 0) { print_usage(); retval = 0; return DONE_QUIT; } // Create the virtual machine. lua_State *L = luaL_newstate(); luaL_openlibs(L); // LuaJIT-specific setup needs to be done as early as possible - before // get_app_arguments because that loads external library code. This is also // loaded inside love's Lua threads. Note that it doesn't use the love table. love_preload(L, luaopen_love_jitsetup, "love.jitsetup"); lua_getglobal(L, "require"); lua_pushstring(L, "love.jitsetup"); lua_call(L, 1, 0); #ifdef LOVE_LEGENDARY_APP_ARGV_HACK int hack_argc = 0; char **hack_argv = nullptr; get_app_arguments(argc, argv, hack_argc, hack_argv); argc = hack_argc; argv = hack_argv; #endif // LOVE_LEGENDARY_APP_ARGV_HACK // Add love to package.preload for easy requiring. love_preload(L, luaopen_love, "love"); // Add command line arguments to global arg (like stand-alone Lua). { lua_newtable(L); if (argc > 0) { lua_pushstring(L, argv[0]); lua_rawseti(L, -2, -2); } lua_pushstring(L, "embedded boot.lua"); lua_rawseti(L, -2, -1); for (int i = 1; i < argc; i++) { lua_pushstring(L, argv[i]); lua_rawseti(L, -2, i); } lua_setglobal(L, "arg"); } // require "love" lua_getglobal(L, "require"); lua_pushstring(L, "love"); lua_call(L, 1, 1); // leave the returned table on the stack. // Add love._exe = true. // This indicates that we're running the standalone version of love, and not // the library version. { lua_pushboolean(L, 1); lua_setfield(L, -2, "_exe"); } // Set love.restart = restartvalue, and clear restartvalue. love::luax_pushvariant(L, restartvalue); lua_setfield(L, -2, "restart"); restartvalue = love::Variant(); // Pop the love table returned by require "love". lua_pop(L, 1); // require "love.boot" (preloaded when love was required.) lua_getglobal(L, "require"); lua_pushstring(L, "love.boot"); lua_call(L, 1, 1); // Turn the returned boot function into a coroutine and call it until done. lua_newthread(L); lua_pushvalue(L, -2); int stackpos = lua_gettop(L); int nres; while (love::luax_resume(L, 0, &nres) == LUA_YIELD) #if LUA_VERSION_NUM >= 504 lua_pop(L, nres); #else lua_pop(L, lua_gettop(L) - stackpos); #endif retval = 0; DoneAction done = DONE_QUIT; // if love.boot() returns "restart", we'll start up again after closing this // Lua state. int retidx = stackpos; if (!lua_isnoneornil(L, retidx)) { if (lua_type(L, retidx) == LUA_TSTRING && strcmp(lua_tostring(L, retidx), "restart") == 0) done = DONE_RESTART; if (lua_isnumber(L, retidx)) retval = (int) lua_tonumber(L, retidx); // Disallow userdata (love objects) from being referenced by the restart // value. if (retidx < lua_gettop(L)) restartvalue = love::luax_checkvariant(L, retidx + 1, false); } lua_close(L); #if defined(LOVE_LEGENDARY_APP_ARGV_HACK) && !defined(LOVE_IOS) if (hack_argv) { for (int i = 0; i::Entry Audio::distanceModelEntries[] = { {"none", Audio::DISTANCE_NONE}, {"inverse", Audio::DISTANCE_INVERSE}, {"inverseclamped", Audio::DISTANCE_INVERSE_CLAMPED}, {"linear", Audio::DISTANCE_LINEAR}, {"linearclamped", Audio::DISTANCE_LINEAR_CLAMPED}, {"exponent", Audio::DISTANCE_EXPONENT}, {"exponentclamped", Audio::DISTANCE_EXPONENT_CLAMPED} }; StringMap Audio::distanceModels(Audio::distanceModelEntries, sizeof(Audio::distanceModelEntries)); bool Audio::getConstant(const char *in, DistanceModel &out) { return distanceModels.find(in, out); } bool Audio::getConstant(DistanceModel in, const char *&out) { return distanceModels.find(in, out); } std::vector Audio::getConstants(DistanceModel) { return distanceModels.getNames(); } } // audio } // love ================================================ FILE: src/modules/audio/Audio.h ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ #ifndef LOVE_AUDIO_AUDIO_H #define LOVE_AUDIO_AUDIO_H // STL #include // LOVE #include "common/Module.h" #include "common/StringMap.h" #include "Source.h" #include "Effect.h" #include "RecordingDevice.h" namespace love { namespace sound { class Decoder; class SoundData; } // sound namespace audio { /* * In some platforms (notably Android), recording from mic * requires user permission. This function sets whetever to * request the permission later or not. */ void setRequestRecordingPermission(bool rec); /* * Gets whetever recording permission will be requested. */ bool getRequestRecordingPermission(); /* * Gets whetever recording permission is granted. */ bool hasRecordingPermission(); /* * Request recording permission. This is blocking function. */ void requestRecordingPermission(); /* * In case recording permission is not granted, this * function shows the dialog about the recording permission. */ void showRecordingPermissionMissingDialog(); /** * The Audio module is responsible for playing back raw sound samples. **/ class Audio : public Module { public: /** * Attenuation by distance. */ enum DistanceModel { DISTANCE_NONE, DISTANCE_INVERSE, DISTANCE_INVERSE_CLAMPED, DISTANCE_LINEAR, DISTANCE_LINEAR_CLAMPED, DISTANCE_EXPONENT, DISTANCE_EXPONENT_CLAMPED, DISTANCE_MAX_ENUM }; static bool getConstant(const char *in, DistanceModel &out); static bool getConstant(DistanceModel in, const char *&out); static std::vector getConstants(DistanceModel); virtual ~Audio() {} virtual Source *newSource(love::sound::Decoder *decoder) = 0; virtual Source *newSource(love::sound::SoundData *soundData) = 0; virtual Source *newSource(int sampleRate, int bitDepth, int channels, int buffers) = 0; /** * Gets the current number of simultaneous playing sources. * @return The current number of simultaneous playing sources. **/ virtual int getActiveSourceCount() const = 0; /** * Gets the maximum supported number of simultaneous playing sources. * @return The maximum supported number of simultaneous playing sources. **/ virtual int getMaxSources() const = 0; /** * Play the specified Source. * @param source The Source to play. **/ virtual bool play(Source *source) = 0; /** * Play the specified Sources. * @param sources The Sources to play. **/ virtual bool play(const std::vector &sources) = 0; /** * Stops playback on the specified source. * @param source The source on which to stop the playback. **/ virtual void stop(Source *source) = 0; /** * Stops playback on the specified sources. * @param sources The sources on which to stop the playback. **/ virtual void stop(const std::vector &sources) = 0; /** * Stops all playing audio. **/ virtual void stop() = 0; /** * Pauses playback on the specified source. * @param source The source on which to pause the playback. **/ virtual void pause(Source *source) = 0; /** * Pauses playback on the specified sources. * @param sources The sources on which to pause the playback. **/ virtual void pause(const std::vector &sources) = 0; /** * Pauses all audio. **/ virtual std::vector pause() = 0; /** * Sets the master volume, where 0.0f is min (off) and 1.0f is max. * @param volume The new master volume. **/ virtual void setVolume(float volume) = 0; /** * Gets the master volume. * @return The current master volume. **/ virtual float getVolume() const = 0; /** * Gets the position of the listener. * @param v A float array of size 3 containing (x,y,z) in that order. **/ virtual void getPosition(float *v) const = 0; /** * Sets the position of the listener. * @param v A float array of size 3 containing [x,y,z] in that order. **/ virtual void setPosition(float *v) = 0; /** * Gets the orientation of the listener. * @param v A float array of size 6 containing [x,y,z] for the forward * vector, followed by [x,y,z] for the up vector. **/ virtual void getOrientation(float *v) const = 0; /** * Sets the orientation of the listener. * @param v A float array of size 6 containing [x,y,z] for the forward * vector, followed by [x,y,z] for the up vector. **/ virtual void setOrientation(float *v) = 0; /** * Gets the velocity of the listener. * @param v A float array of size 3 containing [x,y,z] in that order. **/ virtual void getVelocity(float *v) const = 0; /** * Sets the velocity of the listener. * @param v A float array of size 3 containing [x,y,z] in that order. **/ virtual void setVelocity(float *v) = 0; virtual void setDopplerScale(float scale) = 0; virtual float getDopplerScale() const = 0; //virtual void setMeter(float scale) = 0; //virtual float getMeter() const = 0; /** * @return Reference to a vector of pointers to recording devices. May be empty. **/ virtual const std::vector &getRecordingDevices() = 0; /** * Gets the distance model used for attenuation. * @return Distance model. */ virtual DistanceModel getDistanceModel() const = 0; /** * Sets the distance model used for attenuation. * @param distanceModel Distance model. */ virtual void setDistanceModel(DistanceModel distanceModel) = 0; /** * Sets scene EFX effect. * @param name Effect name to use. * @param fxparams Effect description table. * @return true if successful, false otherwise. */ virtual bool setEffect(const char *name, std::map ¶ms) = 0; /** * Removes scene EFX effect. * @param name Effect name to clear. * @return true if successful, false otherwise. */ virtual bool unsetEffect(const char *name) = 0; /** * Gets scene EFX effect. * @param name Effect name to get data from. * @param fxparams Effect description table. * @return true if effect was present, false otherwise. */ virtual bool getEffect(const char *name, std::map ¶ms) = 0; /** * Gets list of EFX effect names. * @param list List of EFX names to fill. * @return true if effect was present, false otherwise. */ virtual bool getActiveEffects(std::vector &list) const = 0; /** * Gets maximum number of scene EFX effects. * @return number of effects. */ virtual int getMaxSceneEffects() const = 0; /** * Gets maximum number of source EFX effects. * @return number of effects. */ virtual int getMaxSourceEffects() const = 0; /** * Gets EFX (or analog) availability. * @return true if supported. */ virtual bool isEFXsupported() const = 0; virtual bool setOutputSpatialization(bool enable, const char *filter = nullptr) = 0; virtual bool getOutputSpatialization(const char *&filter) const = 0; virtual void getOutputSpatializationFilters(std::vector &list) const = 0; /** * Sets whether audio from other apps mixes with love.audio or is muted, * on supported platforms. **/ static bool setMixWithSystem(bool mix); /** * Pause/resume audio context */ virtual void pauseContext() = 0; virtual void resumeContext() = 0; /** * Get current playback device name. */ virtual std::string getPlaybackDevice() = 0; /** * Retrieve list of available playback devices. */ virtual void getPlaybackDevices(std::vector &list) = 0; /** * Set the current playback device to specified device name. */ virtual void setPlaybackDevice(const char *name); protected: Audio(const char *name); private: static StringMap::Entry distanceModelEntries[]; static StringMap distanceModels; }; // Audio } // audio } // love #endif // LOVE_AUDIO_AUDIO_H ================================================ FILE: src/modules/audio/Effect.cpp ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ #include "Effect.h" namespace love { namespace audio { Effect::Effect() { } Effect::~Effect() { } Effect::Type Effect::getType() const { return type; } bool Effect::getConstant(const char *in, Type &out) { return types.find(in, out); } bool Effect::getConstant(Type in, const char *&out) { return types.find(in, out); } std::vector Effect::getConstants(Type) { return types.getNames(); } /* bool Effect::getConstant(const char *in, Phoneme &out) { return phonemes.find(in, out); } bool Effect::getConstant(Phoneme in, const char *&out) { return phonemes.find(in, out); } */ bool Effect::getConstant(const char *in, Waveform &out) { return waveforms.find(in, out); } bool Effect::getConstant(Waveform in, const char *&out) { return waveforms.find(in, out); } /* bool Effect::getConstant(const char *in, Direction &out) { return directions.find(in, out); } bool Effect::getConstant(Direction in, const char *&out) { return directions.find(in, out); } */ bool Effect::getConstant(const char *in, Parameter &out, Type t) { return parameterNames[t].find(in, out); } bool Effect::getConstant(Parameter in, const char *&out, Type t) { return parameterNames[t].find(in, out); } Effect::ParameterType Effect::getParameterType(Effect::Parameter in) { return parameterTypes[in]; } StringMap::Entry Effect::typeEntries[] = { {"reverb", Effect::TYPE_REVERB}, {"chorus", Effect::TYPE_CHORUS}, {"distortion", Effect::TYPE_DISTORTION}, {"echo", Effect::TYPE_ECHO}, {"flanger", Effect::TYPE_FLANGER}, //{"frequencyshifter", Effect::TYPE_FREQSHIFTER}, //{"vocalmorpher", Effect::TYPE_MORPHER}, //{"pitchshifter", Effect::TYPE_PITCHSHIFTER}, {"ringmodulator", Effect::TYPE_MODULATOR}, //{"autowah", Effect::TYPE_AUTOWAH}, {"compressor", Effect::TYPE_COMPRESSOR}, {"equalizer", Effect::TYPE_EQUALIZER}, }; StringMap Effect::types(Effect::typeEntries, sizeof(Effect::typeEntries)); StringMap::Entry Effect::waveformEntries[] = { {"sine", Effect::WAVE_SINE}, {"triangle", Effect::WAVE_TRIANGLE}, {"sawtooth", Effect::WAVE_SAWTOOTH}, {"square", Effect::WAVE_SQUARE}, }; StringMap Effect::waveforms(Effect::waveformEntries, sizeof(Effect::waveformEntries)); /* StringMap::Entry Effect::directionEntries[] = { {"up", Effect::DIR_UP}, {"down", Effect::DIR_DOWN}, {"none", Effect::DIR_NONE}, }; StringMap Effect::directions(Effect::directionEntries, sizeof(Effect::directionEntries)); StringMap::Entry Effect::phonemeEntries[] = { {"a", Effect::PHONEME_A}, {"e", Effect::PHONEME_E}, {"i", Effect::PHONEME_I}, {"o", Effect::PHONEME_O}, {"u", Effect::PHONEME_U}, {"aa", Effect::PHONEME_AA}, {"ae", Effect::PHONEME_AE}, {"ah", Effect::PHONEME_AH}, {"ao", Effect::PHONEME_AO}, {"eh", Effect::PHONEME_EH}, {"er", Effect::PHONEME_ER}, {"ih", Effect::PHONEME_IH}, {"iy", Effect::PHONEME_IY}, {"uh", Effect::PHONEME_UH}, {"uw", Effect::PHONEME_UW}, {"b", Effect::PHONEME_B}, {"d", Effect::PHONEME_D}, {"f", Effect::PHONEME_F}, {"g", Effect::PHONEME_G}, {"j", Effect::PHONEME_J}, {"k", Effect::PHONEME_K}, {"l", Effect::PHONEME_L}, {"m", Effect::PHONEME_M}, {"n", Effect::PHONEME_N}, {"p", Effect::PHONEME_P}, {"r", Effect::PHONEME_R}, {"s", Effect::PHONEME_S}, {"t", Effect::PHONEME_T}, {"v", Effect::PHONEME_V}, {"z", Effect::PHONEME_Z}, }; StringMap Effect::phonemes(Effect::phonemeEntries, sizeof(Effect::phonemeEntries)); */ #define StringMap LazierAndSlowerButEasilyArrayableStringMap std::vector::Entry> Effect::basicParameters = { {"type", Effect::EFFECT_TYPE}, {"volume", Effect::EFFECT_VOLUME} }; std::vector::Entry> Effect::reverbParameters = { {"gain", Effect::REVERB_GAIN}, {"highgain", Effect::REVERB_HFGAIN}, {"density", Effect::REVERB_DENSITY}, {"diffusion", Effect::REVERB_DIFFUSION}, {"decaytime", Effect::REVERB_DECAY}, {"decayhighratio", Effect::REVERB_HFDECAY}, {"earlygain", Effect::REVERB_EARLYGAIN}, {"earlydelay", Effect::REVERB_EARLYDELAY}, {"lategain", Effect::REVERB_LATEGAIN}, {"latedelay", Effect::REVERB_LATEDELAY}, {"roomrolloff", Effect::REVERB_ROLLOFF}, {"airabsorption", Effect::REVERB_AIRHFGAIN}, {"highlimit", Effect::REVERB_HFLIMITER} }; std::vector::Entry> Effect::chorusParameters = { {"waveform", Effect::CHORUS_WAVEFORM}, {"phase", Effect::CHORUS_PHASE}, {"rate", Effect::CHORUS_RATE}, {"depth", Effect::CHORUS_DEPTH}, {"feedback", Effect::CHORUS_FEEDBACK}, {"delay", Effect::CHORUS_DELAY} }; std::vector::Entry> Effect::distortionParameters = { {"gain", Effect::DISTORTION_GAIN}, {"edge", Effect::DISTORTION_EDGE}, {"lowcut", Effect::DISTORTION_LOWCUT}, {"center", Effect::DISTORTION_EQCENTER}, {"bandwidth", Effect::DISTORTION_EQBAND} }; std::vector::Entry> Effect::echoParameters = { {"delay", Effect::ECHO_DELAY}, {"tapdelay", Effect::ECHO_LRDELAY}, {"damping", Effect::ECHO_DAMPING}, {"feedback", Effect::ECHO_FEEDBACK}, {"spread", Effect::ECHO_SPREAD} }; std::vector::Entry> Effect::flangerParameters = { {"waveform", Effect::FLANGER_WAVEFORM}, {"phase", Effect::FLANGER_PHASE}, {"rate", Effect::FLANGER_RATE}, {"depth", Effect::FLANGER_DEPTH}, {"feedback", Effect::FLANGER_FEEDBACK}, {"delay", Effect::FLANGER_DELAY} }; /* std::vector::Entry> Effect::freqshifterParameters = { {"frequency", Effect::FREQSHIFTER_FREQ}, {"leftdirection", Effect::FREQSHIFTER_LEFTDIR}, {"rightdirection", Effect::FREQSHIFTER_RIGHTDIR} }; std::vector::Entry> Effect::morpherParameters = { {"waveform", Effect::MORPHER_WAVEFORM}, {"rate", Effect::MORPHER_RATE}, {"phonemea", Effect::MORPHER_PHONEMEA}, {"phonemeb", Effect::MORPHER_PHONEMEB}, {"tunea", Effect::MORPHER_COARSEA}, {"tuneb", Effect::MORPHER_COARSEB} } ; std::vector::Entry> Effect::pitchshifterParameters = { {"pitch", Effect::PITCHSHIFTER_PITCH} }; */ std::vector::Entry> Effect::modulatorParameters = { {"waveform", Effect::MODULATOR_WAVEFORM}, {"frequency", Effect::MODULATOR_FREQ}, {"highcut", Effect::MODULATOR_HIGHCUT} }; /* std::vector::Entry> Effect::autowahParameters = { {"attack", Effect::AUTOWAH_ATTACK}, {"release", Effect::AUTOWAH_RELEASE}, {"resonance", Effect::AUTOWAH_RESONANCE}, {"peakgain", Effect::AUTOWAH_PEAKGAIN} }; */ std::vector::Entry> Effect::compressorParameters = { {"enable", Effect::COMPRESSOR_ENABLE} }; std::vector::Entry> Effect::equalizerParameters = { {"lowgain", Effect::EQUALIZER_LOWGAIN}, {"lowcut", Effect::EQUALIZER_LOWCUT}, {"lowmidgain", Effect::EQUALIZER_MID1GAIN}, {"lowmidfrequency", Effect::EQUALIZER_MID1FREQ}, {"lowmidbandwidth", Effect::EQUALIZER_MID1BAND}, {"highmidgain", Effect::EQUALIZER_MID2GAIN}, {"highmidfrequency", Effect::EQUALIZER_MID2FREQ}, {"highmidbandwidth", Effect::EQUALIZER_MID2BAND}, {"highgain", Effect::EQUALIZER_HIGHGAIN}, {"highcut", Effect::EQUALIZER_HIGHCUT} }; std::map> Effect::parameterNames = { {Effect::TYPE_BASIC, Effect::basicParameters}, {Effect::TYPE_REVERB, Effect::reverbParameters}, {Effect::TYPE_CHORUS, Effect::chorusParameters}, {Effect::TYPE_DISTORTION, Effect::distortionParameters}, {Effect::TYPE_ECHO, Effect::echoParameters}, {Effect::TYPE_FLANGER, Effect::flangerParameters}, //{Effect::TYPE_FREQSHIFTER, Effect::freqshifterParameters}, //{Effect::TYPE_MORPHER, Effect::morpherbParameters}, //{Effect::TYPE_PITCHSHIFTER, Effect::pitchshifterParameters}, {Effect::TYPE_MODULATOR, Effect::modulatorParameters}, //{Effect::TYPE_AUTOWAH, Effect::autowahParameters}, {Effect::TYPE_COMPRESSOR, Effect::compressorParameters}, {Effect::TYPE_EQUALIZER, Effect::equalizerParameters} }; #undef StringMap std::map Effect::parameterTypes = { {Effect::EFFECT_TYPE, Effect::PARAM_TYPE}, {Effect::EFFECT_VOLUME, Effect::PARAM_FLOAT}, {Effect::REVERB_GAIN, Effect::PARAM_FLOAT}, {Effect::REVERB_HFGAIN, Effect::PARAM_FLOAT}, {Effect::REVERB_DENSITY, Effect::PARAM_FLOAT}, {Effect::REVERB_DIFFUSION, Effect::PARAM_FLOAT}, {Effect::REVERB_DECAY, Effect::PARAM_FLOAT}, {Effect::REVERB_HFDECAY, Effect::PARAM_FLOAT}, {Effect::REVERB_EARLYGAIN, Effect::PARAM_FLOAT}, {Effect::REVERB_EARLYDELAY, Effect::PARAM_FLOAT}, {Effect::REVERB_LATEGAIN, Effect::PARAM_FLOAT}, {Effect::REVERB_LATEDELAY, Effect::PARAM_FLOAT}, {Effect::REVERB_ROLLOFF, Effect::PARAM_FLOAT}, {Effect::REVERB_AIRHFGAIN, Effect::PARAM_FLOAT}, {Effect::REVERB_HFLIMITER, Effect::PARAM_BOOL}, {Effect::CHORUS_WAVEFORM, Effect::PARAM_WAVEFORM}, {Effect::CHORUS_PHASE, Effect::PARAM_FLOAT}, {Effect::CHORUS_RATE, Effect::PARAM_FLOAT}, {Effect::CHORUS_DEPTH, Effect::PARAM_FLOAT}, {Effect::CHORUS_FEEDBACK, Effect::PARAM_FLOAT}, {Effect::CHORUS_DELAY, Effect::PARAM_FLOAT}, {Effect::DISTORTION_GAIN, Effect::PARAM_FLOAT}, {Effect::DISTORTION_EDGE, Effect::PARAM_FLOAT}, {Effect::DISTORTION_LOWCUT, Effect::PARAM_FLOAT}, {Effect::DISTORTION_EQCENTER, Effect::PARAM_FLOAT}, {Effect::DISTORTION_EQBAND, Effect::PARAM_FLOAT}, {Effect::ECHO_DELAY, Effect::PARAM_FLOAT}, {Effect::ECHO_LRDELAY, Effect::PARAM_FLOAT}, {Effect::ECHO_DAMPING, Effect::PARAM_FLOAT}, {Effect::ECHO_FEEDBACK, Effect::PARAM_FLOAT}, {Effect::ECHO_SPREAD, Effect::PARAM_FLOAT}, {Effect::FLANGER_WAVEFORM, Effect::PARAM_WAVEFORM}, {Effect::FLANGER_PHASE, Effect::PARAM_FLOAT}, {Effect::FLANGER_RATE, Effect::PARAM_FLOAT}, {Effect::FLANGER_DEPTH, Effect::PARAM_FLOAT}, {Effect::FLANGER_FEEDBACK, Effect::PARAM_FLOAT}, {Effect::FLANGER_DELAY, Effect::PARAM_FLOAT}, /* {Effect::FREQSHIFTER_FREQ, Effect::PARAM_FLOAT}, {Effect::FREQSHIFTER_LEFTDIR, Effect::PARAM_DIRECTION}, {Effect::FREQSHIFTER_RIGHTDIR, Effect::PARAM_DIRECTION}, {Effect::MORPHER_WAVEFORM, Effect::PARAM_WAVEFORM}, {Effect::MORPHER_RATE, Effect::PARAM_FLOAT}, {Effect::MORPHER_PHONEMEA, Effect::PARAM_PHONEME}, {Effect::MORPHER_PHONEMEB, Effect::PARAM_PHONEME}, {Effect::MORPHER_TUNEA, Effect::PARAM_FLOAT}, {Effect::MORPHER_TUNEB, Effect::PARAM_FLOAT}, {Effect::PITCHSHIFTER_PITCH, Effect::PARAM_FLOAT}, */ {Effect::MODULATOR_WAVEFORM, Effect::PARAM_WAVEFORM}, {Effect::MODULATOR_FREQ, Effect::PARAM_FLOAT}, {Effect::MODULATOR_HIGHCUT, Effect::PARAM_FLOAT}, /* {Effect::AUTOWAH_ATTACK, Effect::PARAM_FLOAT}, {Effect::AUTOWAH_RELEASE, Effect::PARAM_FLOAT}, {Effect::AUTOWAH_RESONANCE, Effect::PARAM_FLOAT}, {Effect::AUTOWAH_PEAKGAIN, Effect::PARAM_FLOAT}, */ {Effect::COMPRESSOR_ENABLE, Effect::PARAM_BOOL}, {Effect::EQUALIZER_LOWGAIN, Effect::PARAM_FLOAT}, {Effect::EQUALIZER_LOWCUT, Effect::PARAM_FLOAT}, {Effect::EQUALIZER_MID1GAIN, Effect::PARAM_FLOAT}, {Effect::EQUALIZER_MID1FREQ, Effect::PARAM_FLOAT}, {Effect::EQUALIZER_MID1BAND, Effect::PARAM_FLOAT}, {Effect::EQUALIZER_MID2GAIN, Effect::PARAM_FLOAT}, {Effect::EQUALIZER_MID2FREQ, Effect::PARAM_FLOAT}, {Effect::EQUALIZER_MID2BAND, Effect::PARAM_FLOAT}, {Effect::EQUALIZER_HIGHGAIN, Effect::PARAM_FLOAT}, {Effect::EQUALIZER_HIGHCUT, Effect::PARAM_FLOAT} }; } //audio } //love ================================================ FILE: src/modules/audio/Effect.h ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ #ifndef LOVE_AUDIO_EFFECTS_H #define LOVE_AUDIO_EFFECTS_H #include "common/Object.h" #include "common/StringMap.h" #include #include template class LazierAndSlowerButEasilyArrayableStringMap { public: struct Entry { const char *key; T value; }; LazierAndSlowerButEasilyArrayableStringMap() { } LazierAndSlowerButEasilyArrayableStringMap(const std::vector &entries) { for (auto entry : entries) { forward[entry.key] = entry.value; reverse[entry.value] = entry.key; } } bool find(const char *key, T &t) { if (forward.find(key) == forward.end()) return false; t = forward[key]; return true; } bool find(T key, const char *&str) { if (reverse.find(key) == reverse.end()) return false; str = reverse[key]; return true; } private: std::map forward; std::map reverse; }; namespace love { namespace audio { class Effect { public: enum Type { TYPE_BASIC, //not a real type TYPE_REVERB, TYPE_CHORUS, TYPE_DISTORTION, TYPE_ECHO, TYPE_FLANGER, //TYPE_FREQSHIFTER, //TYPE_MORPHER, //TYPE_PITCHSHIFTER, TYPE_MODULATOR, //TYPE_AUTOWAH, TYPE_COMPRESSOR, TYPE_EQUALIZER, TYPE_MAX_ENUM }; enum Parameter { EFFECT_TYPE, EFFECT_VOLUME, REVERB_GAIN, REVERB_HFGAIN, REVERB_DENSITY, REVERB_DIFFUSION, REVERB_DECAY, REVERB_HFDECAY, REVERB_EARLYGAIN, REVERB_EARLYDELAY, REVERB_LATEGAIN, REVERB_LATEDELAY, REVERB_ROLLOFF, REVERB_AIRHFGAIN, REVERB_HFLIMITER, CHORUS_WAVEFORM, CHORUS_PHASE, CHORUS_RATE, CHORUS_DEPTH, CHORUS_FEEDBACK, CHORUS_DELAY, DISTORTION_GAIN, DISTORTION_EDGE, DISTORTION_LOWCUT, DISTORTION_EQCENTER, DISTORTION_EQBAND, ECHO_DELAY, ECHO_LRDELAY, ECHO_DAMPING, ECHO_FEEDBACK, ECHO_SPREAD, FLANGER_WAVEFORM, FLANGER_PHASE, FLANGER_RATE, FLANGER_DEPTH, FLANGER_FEEDBACK, FLANGER_DELAY, /* FREQSHIFTER_FREQ, FREQSHIFTER_LEFTDIR, FREQSHIFTER_RIGHTDIR, MORPHER_WAVEFORM, MORPHER_RATE, MORPHER_PHONEMEA, MORPHER_PHONEMEB, MORPHER_TUNEA, MORPHER_TUNEB, PITCHSHIFTER_PITCH, */ MODULATOR_WAVEFORM, MODULATOR_FREQ, MODULATOR_HIGHCUT, /* AUTOWAH_ATTACK, AUTOWAH_RELEASE, AUTOWAH_RESONANCE, AUTOWAH_PEAKGAIN, */ COMPRESSOR_ENABLE, EQUALIZER_LOWGAIN, EQUALIZER_LOWCUT, EQUALIZER_MID1GAIN, EQUALIZER_MID1FREQ, EQUALIZER_MID1BAND, EQUALIZER_MID2GAIN, EQUALIZER_MID2FREQ, EQUALIZER_MID2BAND, EQUALIZER_HIGHGAIN, EQUALIZER_HIGHCUT, EFFECT_MAX_ENUM }; enum ParameterType { PARAM_TYPE, PARAM_FLOAT, PARAM_BOOL, PARAM_WAVEFORM, //PARAM_DIRECTION, //PARAM_PHONEME, PARAM_MAX_ENUM }; enum Waveform { WAVE_SINE, WAVE_TRIANGLE, WAVE_SAWTOOTH, WAVE_SQUARE, WAVE_MAX_ENUM }; /* enum Direction { DIR_NONE, DIR_UP, DIR_DOWN, DIR_MAX_ENUM }; enum Phoneme { PHONEME_A, PHONEME_E, PHONEME_I, PHONEME_O, PHONEME_U, PHONEME_AA, PHONEME_AE, PHONEME_AH, PHONEME_AO, PHONEME_EH, PHONEME_ER, PHONEME_IH, PHONEME_IY, PHONEME_UH, PHONEME_UW, PHONEME_B, PHONEME_D, PHONEME_F, PHONEME_G, PHONEME_J, PHONEME_K, PHONEME_L, PHONEME_M, PHONEME_N, PHONEME_P, PHONEME_R, PHONEME_S, PHONEME_T, PHONEME_V, PHONEME_Z, PHONEME_MAX_ENUM }; */ Effect(); virtual ~Effect(); Type getType() const; static bool getConstant(const char *in, Type &out); static bool getConstant(Type in, const char *&out); static std::vector getConstants(Type); static bool getConstant(const char *in, Waveform &out); static bool getConstant(Waveform in, const char *&out); //static bool getConstant(const char *in, Direction &out); //static bool getConstant(Direction in, const char *&out); //static bool getConstant(const char *in, Phoneme &out); //static bool getConstant(Phoneme in, const char *&out); static bool getConstant(const char *in, Parameter &out, Type t); static bool getConstant(Parameter in, const char *&out, Type t); static ParameterType getParameterType(Parameter in); protected: Type type; private: static StringMap::Entry typeEntries[]; static StringMap types; static StringMap::Entry waveformEntries[]; static StringMap waveforms; //static StringMap::Entry directionEntries[]; //static StringMap directions; //static StringMap::Entry phonemeEntries[]; //static StringMap phonemes; #define StringMap LazierAndSlowerButEasilyArrayableStringMap static std::vector::Entry> basicParameters; static std::vector::Entry> reverbParameters; static std::vector::Entry> chorusParameters; static std::vector::Entry> distortionParameters; static std::vector::Entry> echoParameters; static std::vector::Entry> flangerParameters; //static std::vector::Entry> freqshifterParameters; //static std::vector::Entry> morpherParameters; //static std::vector::Entry> pitchshifterParameters; static std::vector::Entry> modulatorParameters; //static std::vector::Entry> autowahParameters; static std::vector::Entry> compressorParameters; static std::vector::Entry> equalizerParameters; static std::map> parameterNames; #undef StringMap static std::map parameterTypes; }; } //audio } //love #endif //LOVE_AUDIO_EFFECTS_H ================================================ FILE: src/modules/audio/Filter.cpp ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ #include "Filter.h" namespace love { namespace audio { Filter::Filter() { } Filter::~Filter() { } Filter::Type Filter::getType() const { return type; } bool Filter::getConstant(const char *in, Type &out) { return types.find(in, out); } bool Filter::getConstant(Type in, const char *&out) { return types.find(in, out); } std::vector Filter::getConstants(Type) { return types.getNames(); } bool Filter::getConstant(const char *in, Parameter &out, Type t) { return parameterNames[t].find(in, out); } bool Filter::getConstant(Parameter in, const char *&out, Type t) { return parameterNames[t].find(in, out); } Filter::ParameterType Filter::getParameterType(Parameter in) { return parameterTypes[in]; } StringMap::Entry Filter::typeEntries[] = { {"lowpass", Filter::TYPE_LOWPASS}, {"highpass", Filter::TYPE_HIGHPASS}, {"bandpass", Filter::TYPE_BANDPASS}, }; StringMap Filter::types(Filter::typeEntries, sizeof(Filter::typeEntries)); #define StringMap LazierAndSlowerButEasilyArrayableStringMap2 std::vector::Entry> Filter::basicParameters = { {"type", Filter::FILTER_TYPE}, {"volume", Filter::FILTER_VOLUME} }; std::vector::Entry> Filter::lowpassParameters = { {"highgain", Filter::FILTER_HIGHGAIN} }; std::vector::Entry> Filter::highpassParameters = { {"lowgain", Filter::FILTER_LOWGAIN} }; std::vector::Entry> Filter::bandpassParameters = { {"lowgain", Filter::FILTER_LOWGAIN}, {"highgain", Filter::FILTER_HIGHGAIN} }; std::map> Filter::parameterNames = { {Filter::TYPE_BASIC, Filter::basicParameters}, {Filter::TYPE_LOWPASS, Filter::lowpassParameters}, {Filter::TYPE_HIGHPASS, Filter::highpassParameters}, {Filter::TYPE_BANDPASS, Filter::bandpassParameters}, }; #undef StringMap std::map Filter::parameterTypes = { {Filter::FILTER_TYPE, Filter::PARAM_TYPE}, {Filter::FILTER_VOLUME, Filter::PARAM_FLOAT}, {Filter::FILTER_LOWGAIN, Filter::PARAM_FLOAT}, {Filter::FILTER_HIGHGAIN, Filter::PARAM_FLOAT} }; } //audio } //love ================================================ FILE: src/modules/audio/Filter.h ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ #ifndef LOVE_AUDIO_FILTERS_H #define LOVE_AUDIO_FILTERS_H #include "common/Object.h" #include "common/StringMap.h" #include template class LazierAndSlowerButEasilyArrayableStringMap2 { public: struct Entry { const char *key; T value; }; LazierAndSlowerButEasilyArrayableStringMap2() { } LazierAndSlowerButEasilyArrayableStringMap2(const std::vector &entries) { for (auto entry : entries) { forward[entry.key] = entry.value; reverse[entry.value] = entry.key; } } bool find(const char *key, T &t) { if (forward.find(key) == forward.end()) return false; t = forward[key]; return true; } bool find(T key, const char *&str) { if (reverse.find(key) == reverse.end()) return false; str = reverse[key]; return true; } private: std::map forward; std::map reverse; }; namespace love { namespace audio { class Filter { public: enum Type { TYPE_BASIC, TYPE_LOWPASS, TYPE_HIGHPASS, TYPE_BANDPASS, TYPE_MAX_ENUM }; enum Parameter { FILTER_TYPE, FILTER_VOLUME, FILTER_LOWGAIN, FILTER_HIGHGAIN, FILTER_MAX_ENUM }; enum ParameterType { PARAM_TYPE, PARAM_FLOAT, PARAM_MAX_ENUM }; Filter(); virtual ~Filter(); Type getType() const; static bool getConstant(const char *in, Type &out); static bool getConstant(Type in, const char *&out); static std::vector getConstants(Type); static bool getConstant(const char *in, Parameter &out, Type t); static bool getConstant(Parameter in, const char *&out, Type t); static ParameterType getParameterType(Parameter in); protected: Type type; private: static StringMap::Entry typeEntries[]; static StringMap types; #define StringMap LazierAndSlowerButEasilyArrayableStringMap2 static std::vector::Entry> basicParameters; static std::vector::Entry> lowpassParameters; static std::vector::Entry> highpassParameters; static std::vector::Entry> bandpassParameters; static std::map> parameterNames; #undef StringMap static std::map parameterTypes; }; } //audio } //love #endif //LOVE_AUDIO_FILTERS_H ================================================ FILE: src/modules/audio/RecordingDevice.cpp ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ #include "RecordingDevice.h" namespace love { namespace audio { love::Type RecordingDevice::type("RecordingDevice", &Object::type); RecordingDevice::RecordingDevice() { } RecordingDevice::~RecordingDevice() { } } //audio } //love ================================================ FILE: src/modules/audio/RecordingDevice.h ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ #ifndef LOVE_AUDIO_RECORDING_DEVICE_H #define LOVE_AUDIO_RECORDING_DEVICE_H #include "common/Object.h" #include "sound/SoundData.h" #include namespace love { namespace audio { class RecordingDevice : public love::Object { public: static love::Type type; static const int DEFAULT_SAMPLES = 8192; static const int DEFAULT_SAMPLE_RATE = 8000; static const int DEFAULT_BIT_DEPTH = 16; static const int DEFAULT_CHANNELS = 1; RecordingDevice(); virtual ~RecordingDevice(); /** * Begins audio input recording process. * @param samples Number of samples to buffer. * @param sampleRate Desired sample rate. * @param bitDepth Desired bit depth (8 or 16). * @param channels Desired number of channels. * @return True if recording started successfully. **/ virtual bool start(int samples, int sampleRate, int bitDepth, int channels) = 0; /** * Stops audio input recording. **/ virtual void stop() = 0; /** * Retreives recorded data. * @return SoundData containing data obtained from recording device. **/ virtual love::sound::SoundData *getData() = 0; /** * @return C string device name. **/ virtual const char *getName() const = 0; /** * @return Number of samples currently recorded. **/ virtual int getSampleCount() const = 0; /** * Gets the maximum number of samples that will be buffered, as set by start(). **/ virtual int getMaxSamples() const = 0; /** * @return Sample rate for recording. **/ virtual int getSampleRate() const = 0; /** * @return Bit depth for recording. **/ virtual int getBitDepth() const = 0; /** * @return Number of channels for recording. **/ virtual int getChannelCount() const = 0; /** * @return True if currently recording. **/ virtual bool isRecording() const = 0; }; //RecordingDevice } //audio } //love #endif //LOVE_AUDIO_RECORDING_DEVICE_H ================================================ FILE: src/modules/audio/Source.cpp ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ #include "Source.h" namespace love { namespace audio { love::Type Source::type("Source", &Object::type); Source::Source(Type sourceType) : sourceType(sourceType) { } Source::~Source() { } Source::Type Source::getType() const { return sourceType; } bool Source::getConstant(const char *in, Type &out) { return types.find(in, out); } bool Source::getConstant(Type in, const char *&out) { return types.find(in, out); } std::vector Source::getConstants(Type) { return types.getNames(); } bool Source::getConstant(const char *in, Unit &out) { return units.find(in, out); } bool Source::getConstant(Unit in, const char *&out) { return units.find(in, out); } std::vector Source::getConstants(Unit) { return units.getNames(); } StringMap::Entry Source::typeEntries[] = { {"static", Source::TYPE_STATIC}, {"stream", Source::TYPE_STREAM}, {"queue", Source::TYPE_QUEUE}, }; StringMap Source::types(Source::typeEntries, sizeof(Source::typeEntries)); StringMap::Entry Source::unitEntries[] = { {"seconds", Source::UNIT_SECONDS}, {"samples", Source::UNIT_SAMPLES}, }; StringMap Source::units(Source::unitEntries, sizeof(Source::unitEntries)); } // audio } // love ================================================ FILE: src/modules/audio/Source.h ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ #ifndef LOVE_AUDIO_SOURCE_H #define LOVE_AUDIO_SOURCE_H // LOVE #include "common/Object.h" #include "common/StringMap.h" #include "Filter.h" #include namespace love { namespace audio { class Source : public Object { public: static love::Type type; enum Type { TYPE_STATIC, TYPE_STREAM, TYPE_QUEUE, TYPE_MAX_ENUM }; enum Unit { UNIT_SECONDS, UNIT_SAMPLES, UNIT_MAX_ENUM }; Source(Type type); virtual ~Source(); virtual Source *clone() = 0; virtual bool play() = 0; virtual void stop() = 0; virtual void pause() = 0; virtual bool isPlaying() const = 0; virtual bool isFinished() const = 0; virtual bool update() = 0; virtual void setPitch(float pitch) = 0; virtual float getPitch() const = 0; virtual void setVolume(float volume) = 0; virtual float getVolume() const = 0; virtual void seek(double offset, Unit unit) = 0; virtual double tell(Unit unit) = 0; virtual double getDuration(Unit unit) = 0; // all float * v must be of size 3 virtual void setPosition(float *v) = 0; virtual void getPosition(float *v) const = 0; virtual void setVelocity(float *v) = 0; virtual void getVelocity(float *v) const = 0; virtual void setDirection(float *v) = 0; virtual void getDirection(float *v) const = 0; virtual void setCone(float innerAngle, float outerAngle, float outerVolume, float outerHighGain) = 0; virtual void getCone(float &innerAngle, float &outerAngle, float &outerVolume, float &outerHighGain) const = 0; virtual void setRelative(bool enable) = 0; virtual bool isRelative() const = 0; virtual void setLooping(bool looping) = 0; virtual bool isLooping() const = 0; virtual void setMinVolume(float volume) = 0; virtual float getMinVolume() const = 0; virtual void setMaxVolume(float volume) = 0; virtual float getMaxVolume() const = 0; virtual void setReferenceDistance(float distance) = 0; virtual float getReferenceDistance() const = 0; virtual void setRolloffFactor(float factor) = 0; virtual float getRolloffFactor() const = 0; virtual void setMaxDistance(float distance) = 0; virtual float getMaxDistance() const = 0; virtual void setAirAbsorptionFactor(float factor) = 0; virtual float getAirAbsorptionFactor() const = 0; virtual int getChannelCount() const = 0; virtual bool setFilter(const std::map ¶ms) = 0; virtual bool setFilter() = 0; virtual bool getFilter(std::map ¶ms) = 0; virtual bool setEffect(const char *effect) = 0; virtual bool setEffect(const char *effect, const std::map ¶ms) = 0; virtual bool unsetEffect(const char *effect) = 0; virtual bool getEffect(const char *effect, std::map ¶ms) = 0; virtual bool getActiveEffects(std::vector &list) const = 0; virtual int getFreeBufferCount() const = 0; virtual bool queue(void *data, size_t length, int dataSampleRate, int dataBitDepth, int dataChannels) = 0; virtual Type getType() const; static bool getConstant(const char *in, Type &out); static bool getConstant(Type in, const char *&out); static std::vector getConstants(Type); static bool getConstant(const char *in, Unit &out); static bool getConstant(Unit in, const char *&out); static std::vector getConstants(Unit); protected: Type sourceType; private: static StringMap::Entry typeEntries[]; static StringMap types; static StringMap::Entry unitEntries[]; static StringMap units; }; // Source } // audio } // love #endif // LOVE_AUDIO_SOURCE_H ================================================ FILE: src/modules/audio/null/Audio.cpp ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ #include "Audio.h" namespace love { namespace audio { namespace null { Audio::Audio() : love::audio::Audio("love.audio.null") , distanceModel(DISTANCE_NONE) { } Audio::~Audio() { } love::audio::Source *Audio::newSource(love::sound::Decoder *) { return new Source(); } love::audio::Source *Audio::newSource(love::sound::SoundData *) { return new Source(); } love::audio::Source *Audio::newSource(int, int, int, int) { return new Source(); } int Audio::getActiveSourceCount() const { return 0; } int Audio::getMaxSources() const { return 0; } bool Audio::play(love::audio::Source *) { return false; } bool Audio::play(const std::vector&) { return false; } void Audio::stop(love::audio::Source *) { } void Audio::stop(const std::vector&) { } void Audio::stop() { } void Audio::pause(love::audio::Source *) { } void Audio::pause(const std::vector&) { } std::vector Audio::pause() { return {}; } void Audio::setVolume(float volume) { this->volume = volume; } float Audio::getVolume() const { return volume; } void Audio::getPosition(float *) const { } void Audio::setPosition(float *) { } void Audio::getOrientation(float *) const { } void Audio::setOrientation(float *) { } void Audio::getVelocity(float *) const { } void Audio::setVelocity(float *) { } void Audio::setDopplerScale(float) { } float Audio::getDopplerScale() const { return 1.0f; } /* void setMeter(float) { } float getMeter() const { return 1.0f; } */ const std::vector &Audio::getRecordingDevices() { return capture; } Audio::DistanceModel Audio::getDistanceModel() const { return this->distanceModel; } void Audio::setDistanceModel(DistanceModel distanceModel) { this->distanceModel = distanceModel; } bool Audio::setEffect(const char *, std::map &) { return false; } bool Audio::unsetEffect(const char *) { return false; } bool Audio::getEffect(const char *, std::map &) { return false; } bool Audio::getActiveEffects(std::vector &) const { return false; } int Audio::getMaxSceneEffects() const { return 0; } int Audio::getMaxSourceEffects() const { return 0; } bool Audio::isEFXsupported() const { return false; } bool Audio::setOutputSpatialization(bool, const char *) { return false; } bool Audio::getOutputSpatialization(const char *&filter) const { filter = nullptr; return false; } void Audio::getOutputSpatializationFilters(std::vector &) const { } void Audio::pauseContext() { } void Audio::resumeContext() { } std::string Audio::getPlaybackDevice() { return ""; } void Audio::getPlaybackDevices(std::vector &/*list*/) { } } // null } // audio } // love ================================================ FILE: src/modules/audio/null/Audio.h ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ #ifndef LOVE_AUDIO_NULL_AUDIO_H #define LOVE_AUDIO_NULL_AUDIO_H // LOVE #include "audio/Audio.h" #include "RecordingDevice.h" #include "Source.h" namespace love { namespace audio { namespace null { class Audio : public love::audio::Audio { public: Audio(); virtual ~Audio(); // Implements Audio. love::audio::Source *newSource(love::sound::Decoder *decoder) override; love::audio::Source *newSource(love::sound::SoundData *soundData) override; love::audio::Source *newSource(int sampleRate, int bitDepth, int channels, int buffers) override; int getActiveSourceCount() const override; int getMaxSources() const override; bool play(love::audio::Source *source) override; bool play(const std::vector &sources) override; void stop(love::audio::Source *source) override; void stop(const std::vector &sources) override; void stop() override; void pause(love::audio::Source *source) override; void pause(const std::vector &sources) override; std::vector pause() override; void setVolume(float volume) override; float getVolume() const override; void getPosition(float *v) const override; void setPosition(float *v) override; void getOrientation(float *v) const override; void setOrientation(float *v) override; void getVelocity(float *v) const override; void setVelocity(float *v) override; void setDopplerScale(float scale) override; float getDopplerScale() const override; //void setMeter(float scale); //float getMeter() const; const std::vector &getRecordingDevices() override; DistanceModel getDistanceModel() const override; void setDistanceModel(DistanceModel distanceModel) override; bool setEffect(const char *, std::map ¶ms) override; bool unsetEffect(const char *) override; bool getEffect(const char *, std::map ¶ms) override; bool getActiveEffects(std::vector &list) const override; int getMaxSceneEffects() const override; int getMaxSourceEffects() const override; bool isEFXsupported() const override; bool setOutputSpatialization(bool enable, const char *filter = nullptr) override; bool getOutputSpatialization(const char *&filter) const override; void getOutputSpatializationFilters(std::vector &list) const override; void pauseContext() override; void resumeContext() override; std::string getPlaybackDevice() override; void getPlaybackDevices(std::vector &list) override; private: float volume; DistanceModel distanceModel; std::vector capture; }; // Audio } // null } // audio } // love #endif // LOVE_AUDIO_NULL_AUDIO_H ================================================ FILE: src/modules/audio/null/RecordingDevice.cpp ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ #include "RecordingDevice.h" #include "Audio.h" namespace love { namespace audio { namespace null { const char *RecordingDevice::name = "null"; RecordingDevice::RecordingDevice(const char *) { } RecordingDevice::~RecordingDevice() { } bool RecordingDevice::start(int, int, int, int) { return false; } void RecordingDevice::stop() { } love::sound::SoundData *RecordingDevice::getData() { return nullptr; } int RecordingDevice::getSampleCount() const { return 0; } int RecordingDevice::getMaxSamples() const { return 0; } int RecordingDevice::getSampleRate() const { return 0; } int RecordingDevice::getBitDepth() const { return 0; } int RecordingDevice::getChannelCount() const { return 0; } const char *RecordingDevice::getName() const { return name; } bool RecordingDevice::isRecording() const { return false; } } //null } //audio } //love ================================================ FILE: src/modules/audio/null/RecordingDevice.h ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ #ifndef LOVE_AUDIO_NULL_RECORDING_DEVICE_H #define LOVE_AUDIO_NULL_RECORDING_DEVICE_H #include "audio/RecordingDevice.h" #include "sound/SoundData.h" namespace love { namespace audio { namespace null { class RecordingDevice : public love::audio::RecordingDevice { public: RecordingDevice(const char *name); virtual ~RecordingDevice(); virtual bool start(int samples, int sampleRate, int bitDepth, int channels); virtual void stop(); virtual love::sound::SoundData *getData(); virtual const char *getName() const; virtual int getMaxSamples() const; virtual int getSampleCount() const; virtual int getSampleRate() const; virtual int getBitDepth() const; virtual int getChannelCount() const; virtual bool isRecording() const; private: static const char *name; }; //RecordingDevice } //null } //audio } //love #endif //LOVE_AUDIO_NULL_RECORDING_DEVICE_H ================================================ FILE: src/modules/audio/null/Source.cpp ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ #include "Source.h" namespace love { namespace audio { namespace null { Source::Source() : love::audio::Source(Source::TYPE_STATIC) { } Source::~Source() { } love::audio::Source *Source::clone() { this->retain(); return this; } bool Source::play() { return false; } void Source::stop() { } void Source::pause() { } bool Source::isPlaying() const { return false; } bool Source::isFinished() const { return true; } bool Source::update() { return false; } void Source::setPitch(float pitch) { this->pitch = pitch; } float Source::getPitch() const { return pitch; } void Source::setVolume(float volume) { this->volume = volume; } float Source::getVolume() const { return volume; } void Source::seek(double, Source::Unit) { } double Source::tell(Source::Unit) { return 0.0f; } double Source::getDuration(Unit) { return -1.0f; } void Source::setPosition(float *) { } void Source::getPosition(float *) const { } void Source::setVelocity(float *) { } void Source::getVelocity(float *) const { } void Source::setDirection(float *) { } void Source::getDirection(float *) const { } void Source::setCone(float innerAngle, float outerAngle, float outerVolume, float outerHighGain) { coneInnerAngle = innerAngle; coneOuterAngle = outerAngle; coneOuterVolume = outerVolume; coneOuterHighGain = outerHighGain; } void Source::getCone(float &innerAngle, float &outerAngle, float &outerVolume, float &outerHighGain) const { innerAngle = coneInnerAngle; outerAngle = coneOuterAngle; outerVolume = coneOuterVolume; outerHighGain = coneOuterHighGain; } void Source::setRelative(bool enable) { relative = enable; } bool Source::isRelative() const { return relative; } void Source::setLooping(bool looping) { this->looping = looping; } bool Source::isLooping() const { return looping; } void Source::setMinVolume(float volume) { this->minVolume = volume; } float Source::getMinVolume() const { return this->minVolume; } void Source::setMaxVolume(float volume) { this->maxVolume = volume; } float Source::getMaxVolume() const { return this->maxVolume; } void Source::setReferenceDistance(float distance) { this->referenceDistance = distance; } float Source::getReferenceDistance() const { return this->referenceDistance; } void Source::setRolloffFactor(float factor) { this->rolloffFactor = factor; } float Source::getRolloffFactor() const { return this->rolloffFactor; } void Source::setMaxDistance(float distance) { this->maxDistance = distance; } float Source::getMaxDistance() const { return this->maxDistance; } void Source::setAirAbsorptionFactor(float factor) { absorptionFactor = factor; } float Source::getAirAbsorptionFactor() const { return absorptionFactor; } int Source::getChannelCount() const { return 2; } int Source::getFreeBufferCount() const { return 0; } bool Source::queue(void *, size_t, int, int, int) { return false; } bool Source::setFilter(const std::map &) { return false; } bool Source::setFilter() { return false; } bool Source::getFilter(std::map &) { return false; } bool Source::setEffect(const char *) { return false; } bool Source::setEffect(const char *, const std::map &) { return false; } bool Source::unsetEffect(const char *) { return false; } bool Source::getEffect(const char *, std::map &) { return false; } bool Source::getActiveEffects(std::vector &) const { return false; } } // null } // audio } // love ================================================ FILE: src/modules/audio/null/Source.h ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ #ifndef LOVE_AUDIO_NULL_SOURCE_H #define LOVE_AUDIO_NULL_SOURCE_H // LOVE #include "common/math.h" #include "common/Object.h" #include "audio/Source.h" #include "audio/Filter.h" // STL #include namespace love { namespace audio { namespace null { class Source : public love::audio::Source { public: Source(); virtual ~Source(); virtual love::audio::Source *clone(); virtual bool play(); virtual void stop(); virtual void pause(); virtual bool isPlaying() const; virtual bool isFinished() const; virtual bool update(); virtual void setPitch(float pitch); virtual float getPitch() const; virtual void setVolume(float volume); virtual float getVolume() const; virtual void seek(double offset, Unit unit); virtual double tell(Unit unit); virtual double getDuration(Unit unit); virtual void setPosition(float *v); virtual void getPosition(float *v) const; virtual void setVelocity(float *v); virtual void getVelocity(float *v) const; virtual void setDirection(float *v); virtual void getDirection(float *v) const; virtual void setCone(float innerAngle, float outerAngle, float outerVolume, float outerHighGain); virtual void getCone(float &innerAngle, float &outerAngle, float &outerVolume, float &outerHighGain) const; virtual void setRelative(bool enable); virtual bool isRelative() const; void setLooping(bool looping); bool isLooping() const; virtual void setMinVolume(float volume); virtual float getMinVolume() const; virtual void setMaxVolume(float volume); virtual float getMaxVolume() const; virtual void setReferenceDistance(float distance); virtual float getReferenceDistance() const; virtual void setRolloffFactor(float factor); virtual float getRolloffFactor() const; virtual void setMaxDistance(float distance); virtual float getMaxDistance() const; virtual void setAirAbsorptionFactor(float factor); virtual float getAirAbsorptionFactor() const; virtual int getChannelCount() const; virtual int getFreeBufferCount() const; virtual bool queue(void *data, size_t length, int dataSampleRate, int dataBitDepth, int dataChannels); virtual bool setFilter(const std::map ¶ms); virtual bool setFilter(); virtual bool getFilter(std::map ¶ms); virtual bool setEffect(const char *effect); virtual bool setEffect(const char *effect, const std::map ¶ms); virtual bool unsetEffect(const char *effect); virtual bool getEffect(const char *effect, std::map ¶ms); virtual bool getActiveEffects(std::vector &list) const; private: float pitch = 1.0f; float volume = 1.0f; float coneInnerAngle = LOVE_TORAD(360.0f); float coneOuterAngle = LOVE_TORAD(360.0f); float coneOuterVolume = 0.0f; float coneOuterHighGain = 1.0f; bool relative = false; bool looping = false; float minVolume = 0.0f; float maxVolume = 1.0f; float referenceDistance = 1.0f; float rolloffFactor = 1.0f; float maxDistance = std::numeric_limits::max(); float absorptionFactor = 0.0f; }; // Source } // null } // audio } // love #endif // LOVE_AUDIO_NULL_SOURCE_H ================================================ FILE: src/modules/audio/openal/Audio.cpp ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ #include "Audio.h" #include "common/delay.h" #include "RecordingDevice.h" #include "sound/Decoder.h" #include #include #ifdef LOVE_IOS #include "common/ios.h" #endif namespace love { namespace audio { namespace openal { Audio::PoolThread::PoolThread(Pool *pool) : pool(pool) , finish(false) { threadName = "AudioPool"; } Audio::PoolThread::~PoolThread() { } void Audio::PoolThread::threadFunction() { while (true) { { thread::Lock lock(mutex); if (finish) { return; } } pool->update(); sleep(5); } } void Audio::PoolThread::setFinish() { thread::Lock lock(mutex); finish = true; } ALenum Audio::getFormat(int bitDepth, int channels) { if (bitDepth != 8 && bitDepth != 16) return AL_NONE; if (channels == 1) return bitDepth == 8 ? AL_FORMAT_MONO8 : AL_FORMAT_MONO16; else if (channels == 2) return bitDepth == 8 ? AL_FORMAT_STEREO8 : AL_FORMAT_STEREO16; #ifdef AL_EXT_MCFORMATS else if (alIsExtensionPresent("AL_EXT_MCFORMATS")) { if (channels == 6) return bitDepth == 8 ? AL_FORMAT_51CHN8 : AL_FORMAT_51CHN16; else if (channels == 8) return bitDepth == 8 ? AL_FORMAT_71CHN8 : AL_FORMAT_71CHN16; } #endif return AL_NONE; } static const char *getDeviceSpecifier(ALCdevice *device) { #ifndef ALC_ALL_DEVICES_SPECIFIER constexpr ALCenum ALC_ALL_DEVICES_SPECIFIER = 0x1013; #endif static ALCenum deviceEnum = alcIsExtensionPresent(nullptr, "ALC_ENUMERATE_ALL_EXT") == ALC_TRUE ? ALC_ALL_DEVICES_SPECIFIER : ALC_DEVICE_SPECIFIER; return alcGetString(device, deviceEnum); } Audio::Audio() : love::audio::Audio("love.audio.openal") , device(nullptr) , context(nullptr) , pool(nullptr) , poolThread(nullptr) , distanceModel(DISTANCE_INVERSE_CLAMPED) { // Before opening new device, check if recording // is requested. if (getRequestRecordingPermission()) { if (!hasRecordingPermission()) // Request recording permission on some OSes. requestRecordingPermission(); } { #if defined(LOVE_LINUX) // Temporarly block signals, as the thread inherits this mask love::thread::ScopedDisableSignals disableSignals; #endif // Passing null for default device. device = alcOpenDevice(nullptr); if (device == nullptr) throw love::Exception("Could not open device."); hasHRTFExtension = alcIsExtensionPresent(device, "ALC_SOFT_HRTF") == AL_TRUE; std::vector attribs = computeContextAttribs(); context = alcCreateContext(device, attribs.data()); if (context == nullptr) throw love::Exception("Could not create context: %s", alcGetString(device, alcGetError(device))); if (!alcMakeContextCurrent(context)) throw love::Exception("Could not make context current: %s", alcGetString(device, alcGetError(device))); } #ifdef ALC_EXT_EFX initializeEFX(); alcGetIntegerv(device, ALC_MAX_AUXILIARY_SENDS, 1, &MAX_SOURCE_EFFECTS); alGetError(); if (alGenAuxiliaryEffectSlots) { for (int i = 0; i < MAX_SCENE_EFFECTS; i++) { ALuint slot; alGenAuxiliaryEffectSlots(1, &slot); if (alGetError() == AL_NO_ERROR) slotlist.push(slot); else { MAX_SCENE_EFFECTS = i; break; } } } else MAX_SCENE_EFFECTS = MAX_SOURCE_EFFECTS = 0; #else MAX_SCENE_EFFECTS = MAX_SOURCE_EFFECTS = 0; #endif try { pool = new Pool(device); } catch (love::Exception &) { for (auto c : capture) delete c; #ifdef ALC_EXT_EFX if (alDeleteAuxiliaryEffectSlots) { while (!slotlist.empty()) { alDeleteAuxiliaryEffectSlots(1, &slotlist.top()); slotlist.pop(); } } #endif alcMakeContextCurrent(nullptr); alcDestroyContext(context); alcCloseDevice(device); throw; } poolThread = new PoolThread(pool); poolThread->start(); #ifdef LOVE_IOS love::ios::initAudioSessionInterruptionHandler(); #endif #ifdef LOVE_ANDROID bool hasPauseDeviceExt = alcIsExtensionPresent(device, "ALC_SOFT_pause_device") == ALC_TRUE; alcDevicePauseSOFT = hasPauseDeviceExt ? (LPALCDEVICEPAUSESOFT) alcGetProcAddress(device, "alcDevicePauseSOFT") : nullptr; alcDeviceResumeSOFT = hasPauseDeviceExt ? (LPALCDEVICERESUMESOFT) alcGetProcAddress(device, "alcDeviceResumeSOFT") : nullptr; #endif } Audio::~Audio() { #ifdef LOVE_IOS love::ios::destroyAudioSessionInterruptionHandler(); #endif poolThread->setFinish(); poolThread->wait(); delete poolThread; delete pool; for (auto c : capture) delete c; #ifdef ALC_EXT_EFX for (auto e : effectmap) { delete e.second.effect; slotlist.push(e.second.slot); } if (alDeleteAuxiliaryEffectSlots) { while (!slotlist.empty()) { alDeleteAuxiliaryEffectSlots(1, &slotlist.top()); slotlist.pop(); } } #endif alcMakeContextCurrent(nullptr); alcDestroyContext(context); alcCloseDevice(device); } std::vector Audio::computeContextAttribs() { std::vector attribs; #ifdef ALC_EXT_EFX attribs.push_back(ALC_MAX_AUXILIARY_SENDS); attribs.push_back(MAX_REQUESTED_SOURCE_EFFECTS); #endif #ifdef ALC_SOFT_HRTF if (hasHRTFExtension) { attribs.push_back(ALC_HRTF_SOFT); attribs.push_back(requestEnableHRTF ? AL_TRUE : AL_FALSE); if (!requestedHRTFFilter.empty()) { std::vector filters; getOutputSpatializationFilters(filters); for (size_t i = 0; i < filters.size(); i++) { if (filters[i] == requestedHRTFFilter) { attribs.push_back(ALC_HRTF_ID_SOFT); attribs.push_back((int)i); break; } } } } #endif attribs.push_back(0); attribs.push_back(0); return attribs; } love::audio::Source *Audio::newSource(love::sound::Decoder *decoder) { return new Source(pool, decoder); } love::audio::Source *Audio::newSource(love::sound::SoundData *soundData) { return new Source(pool, soundData); } love::audio::Source *Audio::newSource(int sampleRate, int bitDepth, int channels, int buffers) { return new Source(pool, sampleRate, bitDepth, channels, buffers); } int Audio::getActiveSourceCount() const { return pool->getActiveSourceCount(); } int Audio::getMaxSources() const { return pool->getMaxSources(); } bool Audio::play(love::audio::Source *source) { return source->play(); } bool Audio::play(const std::vector &sources) { return Source::play(sources); } void Audio::stop(love::audio::Source *source) { source->stop(); } void Audio::stop(const std::vector &sources) { return Source::stop(sources); } void Audio::stop() { return Source::stop(pool); } void Audio::pause(love::audio::Source *source) { source->pause(); } void Audio::pause(const std::vector &sources) { return Source::pause(sources); } std::vector Audio::pause() { return Source::pause(pool); } void Audio::pauseContext() { #ifdef LOVE_ANDROID if (alcDevicePauseSOFT) alcDevicePauseSOFT(device); else { // This is extremely rare case since we're using OpenAL-soft // in Android and the ALC_SOFT_pause_device has been supported // since 1.16 for (auto &src: pausedSources) src->release(); pausedSources = pause(); for (auto &src: pausedSources) src->retain(); } #else alcMakeContextCurrent(nullptr); #endif } void Audio::resumeContext() { #ifdef LOVE_ANDROID if (alcDeviceResumeSOFT) alcDeviceResumeSOFT(device); else { // Again, this is rare case play(pausedSources); for (auto &src: pausedSources) src->release(); pausedSources.resize(0); } #else if (context && alcGetCurrentContext() != context) alcMakeContextCurrent(context); #endif } std::string Audio::getPlaybackDevice() { const char *dev = getDeviceSpecifier(device); if (dev == nullptr) throw Exception("Failed to get current device: %s", alcGetString(device, alcGetError(device))); return dev; } void Audio::getPlaybackDevices(std::vector &list) { const char *devices = getDeviceSpecifier(nullptr); if (devices == nullptr) throw Exception("Failed to enumerate devices: %s", alcGetString(nullptr, alcGetError(nullptr))); for (const char *device = devices; *device; device++) { list.emplace_back(device); device += list.back().length(); } } void Audio::setPlaybackDevice(const char *name) { #ifndef ALC_SOFT_reopen_device typedef ALCboolean (ALC_APIENTRY*LPALCREOPENDEVICESOFT)(ALCdevice *device, const ALCchar *deviceName, const ALCint *attribs); #endif static LPALCREOPENDEVICESOFT alcReopenDeviceSOFT = alcIsExtensionPresent(device, "ALC_SOFT_reopen_device") == ALC_TRUE ? (LPALCREOPENDEVICESOFT) alcGetProcAddress(device, "alcReopenDeviceSOFT") : nullptr; if (alcReopenDeviceSOFT == nullptr) { // Default implementation throws exception. To make // error message consistent, call the base class. love::audio::Audio::setPlaybackDevice(name); return; } std::vector attribs = computeContextAttribs(); if (alcReopenDeviceSOFT(device, (const ALCchar *) name, attribs.data()) == ALC_FALSE) throw love::Exception("Cannot set output device: %s", alcGetString(device, alcGetError(device))); } void Audio::setVolume(float volume) { alListenerf(AL_GAIN, volume); } float Audio::getVolume() const { ALfloat volume; alGetListenerf(AL_GAIN, &volume); return volume; } void Audio::getPosition(float *v) const { alGetListenerfv(AL_POSITION, v); } void Audio::setPosition(float *v) { alListenerfv(AL_POSITION, v); } void Audio::getOrientation(float *v) const { alGetListenerfv(AL_ORIENTATION, v); } void Audio::setOrientation(float *v) { alListenerfv(AL_ORIENTATION, v); } void Audio::getVelocity(float *v) const { alGetListenerfv(AL_VELOCITY, v); } void Audio::setVelocity(float *v) { alListenerfv(AL_VELOCITY, v); } void Audio::setDopplerScale(float scale) { if (scale >= 0.0f) alDopplerFactor(scale); } float Audio::getDopplerScale() const { return alGetFloat(AL_DOPPLER_FACTOR); } /* void Audio::setMeter(float scale) { if (scale >= 0.0f) { metersPerUnit = scale; #ifdef ALC_EXT_EFX alListenerf(AL_METERS_PER_UNIT, scale); #endif } } float Audio::getMeter() const { return metersPerUnit; } */ Audio::DistanceModel Audio::getDistanceModel() const { return distanceModel; } void Audio::setDistanceModel(DistanceModel distanceModel) { this->distanceModel = distanceModel; switch (distanceModel) { case DISTANCE_NONE: alDistanceModel(AL_NONE); break; case DISTANCE_INVERSE: alDistanceModel(AL_INVERSE_DISTANCE); break; case DISTANCE_INVERSE_CLAMPED: alDistanceModel(AL_INVERSE_DISTANCE_CLAMPED); break; case DISTANCE_LINEAR: alDistanceModel(AL_LINEAR_DISTANCE); break; case DISTANCE_LINEAR_CLAMPED: alDistanceModel(AL_LINEAR_DISTANCE_CLAMPED); break; case DISTANCE_EXPONENT: alDistanceModel(AL_EXPONENT_DISTANCE); break; case DISTANCE_EXPONENT_CLAMPED: alDistanceModel(AL_EXPONENT_DISTANCE_CLAMPED); break; default: break; } } const std::vector &Audio::getRecordingDevices() { std::vector devnames; std::vector devices; // If recording permission is not granted, inform user about it // and return empty list. if (!hasRecordingPermission() && getRequestRecordingPermission()) { showRecordingPermissionMissingDialog(); capture.clear(); return capture; } std::string defaultname(alcGetString(NULL, ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER)); //no device name obtained from AL, fallback to reading from device if (defaultname.length() == 0) { //use some safe basic parameters - 8 kHz, 8 bits, 1 channel ALCdevice *defaultdevice = alcCaptureOpenDevice(NULL, 8000, AL_FORMAT_MONO8, 1024); if (alGetError() == AL_NO_ERROR) { defaultname = alcGetString(defaultdevice, ALC_CAPTURE_DEVICE_SPECIFIER); alcCaptureCloseDevice(defaultdevice); } else { //failed to open default recording device - bail, return empty list capture.clear(); return capture; } } devnames.reserve(capture.size()); devnames.push_back(defaultname); //find devices name list const ALCchar *devstr = alcGetString(NULL, ALC_CAPTURE_DEVICE_SPECIFIER); size_t offset = 0; while (true) { if (devstr[offset] == '\0') break; std::string str((ALCchar*)&devstr[offset]); if (str != defaultname) devnames.push_back(str); offset += str.length() + 1; } devices.reserve(devnames.size()); //build ordered list of devices for (int i = 0; i < (int) devnames.size(); i++) { devices.push_back(nullptr); auto d = devices.end() - 1; for (auto c : capture) if (devnames[i] == c->getName()) *d = c; if (*d == nullptr) *d = new RecordingDevice(devnames[i].c_str()); else (*d)->retain(); } for (auto c : capture) c->release(); capture.clear(); capture.reserve(devices.size()); //this needs to be executed in specific order for (unsigned int i = 0; i < devnames.size(); i++) capture.push_back(devices[i]); return capture; } bool Audio::setEffect(const char *name, std::map ¶ms) { Effect *effect; ALuint slot; auto iter = effectmap.find(name); if (iter == effectmap.end()) { //new effect needed but no more slots if (effectmap.size() >= (unsigned int)MAX_SCENE_EFFECTS) return false; effect = new Effect(); slot = slotlist.top(); slotlist.pop(); effectmap[name] = {effect, slot}; } else { effect = iter->second.effect; slot = iter->second.slot; } bool result = effect->setParams(params); #ifdef ALC_EXT_EFX if (alAuxiliaryEffectSloti) { if (result) { auto iter = params.find(Effect::EFFECT_VOLUME); if (iter != params.end()) alAuxiliaryEffectSlotf(slot, AL_EFFECTSLOT_GAIN, iter->second); alAuxiliaryEffectSloti(slot, AL_EFFECTSLOT_EFFECT, effect->getEffect()); } else alAuxiliaryEffectSloti(slot, AL_EFFECTSLOT_EFFECT, AL_EFFECT_NULL); alGetError(); } #endif return result; } bool Audio::unsetEffect(const char *name) { auto iter = effectmap.find(name); if (iter == effectmap.end()) return false; Effect *effect = iter->second.effect; ALuint slot = iter->second.slot; #ifdef ALC_EXT_EFX if (alAuxiliaryEffectSloti) alAuxiliaryEffectSloti(slot, AL_EFFECTSLOT_EFFECT, AL_EFFECT_NULL); #endif delete effect; effectmap.erase(iter); slotlist.push(slot); return true; } bool Audio::getEffect(const char *name, std::map ¶ms) { auto iter = effectmap.find(name); if (iter == effectmap.end()) return false; params = iter->second.effect->getParams(); return true; } bool Audio::getActiveEffects(std::vector &list) const { if (effectmap.empty()) return false; list.reserve(effectmap.size()); for (auto i : effectmap) list.push_back(i.first); return true; } int Audio::getMaxSceneEffects() const { return MAX_SCENE_EFFECTS; } int Audio::getMaxSourceEffects() const { return MAX_SOURCE_EFFECTS; } bool Audio::isEFXsupported() const { #ifdef ALC_EXT_EFX return (alGenEffects != nullptr); #else return false; #endif } bool Audio::setOutputSpatialization(bool enable, const char *filter) { requestEnableHRTF = enable; if (filter != nullptr) requestedHRTFFilter = filter; else requestedHRTFFilter.clear(); #ifdef ALC_SOFT_HRTF if (hasHRTFExtension) { static auto alcResetDeviceSOFT = (LPALCRESETDEVICESOFT)alcGetProcAddress(device, "alcResetDeviceSOFT"); if (alcResetDeviceSOFT == nullptr) return false; std::vector attribs = computeContextAttribs(); return alcResetDeviceSOFT(device, attribs.data()) != AL_FALSE; } #endif return false; } bool Audio::getOutputSpatialization(const char *&filter) const { #ifdef ALC_SOFT_HRTF if (hasHRTFExtension) { ALCint enabled = 0; alcGetIntegerv(device, ALC_HRTF_SOFT, 1, &enabled); if (enabled != 0) filter = alcGetString(device, ALC_HRTF_SPECIFIER_SOFT); else filter = nullptr; return enabled != 0; } #endif filter = nullptr; return false; } void Audio::getOutputSpatializationFilters(std::vector &list) const { #ifdef ALC_SOFT_HRTF if (!hasHRTFExtension) return; static auto alcGetStringiSOFT = (LPALCGETSTRINGISOFT)alcGetProcAddress(device, "alcGetStringiSOFT"); if (alcGetStringiSOFT == nullptr) return; ALCint count = 0; alcGetIntegerv(device, ALC_NUM_HRTF_SPECIFIERS_SOFT, 1, &count); for (int i = 0; i < count; i++) { const char *specifier = alcGetStringiSOFT(device, ALC_HRTF_SPECIFIER_SOFT, i); if (specifier != nullptr) list.push_back(specifier); } #else LOVE_UNUSED(list); #endif } bool Audio::getEffectID(const char *name, ALuint &id) { auto iter = effectmap.find(name); if (iter == effectmap.end()) return false; id = iter->second.slot; return true; } #ifdef ALC_EXT_EFX LPALGENEFFECTS alGenEffects = nullptr; LPALDELETEEFFECTS alDeleteEffects = nullptr; LPALISEFFECT alIsEffect = nullptr; LPALEFFECTI alEffecti = nullptr; LPALEFFECTIV alEffectiv = nullptr; LPALEFFECTF alEffectf = nullptr; LPALEFFECTFV alEffectfv = nullptr; LPALGETEFFECTI alGetEffecti = nullptr; LPALGETEFFECTIV alGetEffectiv = nullptr; LPALGETEFFECTF alGetEffectf = nullptr; LPALGETEFFECTFV alGetEffectfv = nullptr; LPALGENFILTERS alGenFilters = nullptr; LPALDELETEFILTERS alDeleteFilters = nullptr; LPALISFILTER alIsFilter = nullptr; LPALFILTERI alFilteri = nullptr; LPALFILTERIV alFilteriv = nullptr; LPALFILTERF alFilterf = nullptr; LPALFILTERFV alFilterfv = nullptr; LPALGETFILTERI alGetFilteri = nullptr; LPALGETFILTERIV alGetFilteriv = nullptr; LPALGETFILTERF alGetFilterf = nullptr; LPALGETFILTERFV alGetFilterfv = nullptr; LPALGENAUXILIARYEFFECTSLOTS alGenAuxiliaryEffectSlots = nullptr; LPALDELETEAUXILIARYEFFECTSLOTS alDeleteAuxiliaryEffectSlots = nullptr; LPALISAUXILIARYEFFECTSLOT alIsAuxiliaryEffectSlot = nullptr; LPALAUXILIARYEFFECTSLOTI alAuxiliaryEffectSloti = nullptr; LPALAUXILIARYEFFECTSLOTIV alAuxiliaryEffectSlotiv = nullptr; LPALAUXILIARYEFFECTSLOTF alAuxiliaryEffectSlotf = nullptr; LPALAUXILIARYEFFECTSLOTFV alAuxiliaryEffectSlotfv = nullptr; LPALGETAUXILIARYEFFECTSLOTI alGetAuxiliaryEffectSloti = nullptr; LPALGETAUXILIARYEFFECTSLOTIV alGetAuxiliaryEffectSlotiv = nullptr; LPALGETAUXILIARYEFFECTSLOTF alGetAuxiliaryEffectSlotf = nullptr; LPALGETAUXILIARYEFFECTSLOTFV alGetAuxiliaryEffectSlotfv = nullptr; #endif void Audio::initializeEFX() { #ifdef ALC_EXT_EFX if (alcIsExtensionPresent(device, "ALC_EXT_EFX") == AL_FALSE) return; alGenEffects = (LPALGENEFFECTS)alGetProcAddress("alGenEffects"); alDeleteEffects = (LPALDELETEEFFECTS)alGetProcAddress("alDeleteEffects"); alIsEffect = (LPALISEFFECT)alGetProcAddress("alIsEffect"); alEffecti = (LPALEFFECTI)alGetProcAddress("alEffecti"); alEffectiv = (LPALEFFECTIV)alGetProcAddress("alEffectiv"); alEffectf = (LPALEFFECTF)alGetProcAddress("alEffectf"); alEffectfv = (LPALEFFECTFV)alGetProcAddress("alEffectfv"); alGetEffecti = (LPALGETEFFECTI)alGetProcAddress("alGetEffecti"); alGetEffectiv = (LPALGETEFFECTIV)alGetProcAddress("alGetEffectiv"); alGetEffectf = (LPALGETEFFECTF)alGetProcAddress("alGetEffectf"); alGetEffectfv = (LPALGETEFFECTFV)alGetProcAddress("alGetEffectfv"); alGenFilters = (LPALGENFILTERS)alGetProcAddress("alGenFilters"); alDeleteFilters = (LPALDELETEFILTERS)alGetProcAddress("alDeleteFilters"); alIsFilter = (LPALISFILTER)alGetProcAddress("alIsFilter"); alFilteri = (LPALFILTERI)alGetProcAddress("alFilteri"); alFilteriv = (LPALFILTERIV)alGetProcAddress("alFilteriv"); alFilterf = (LPALFILTERF)alGetProcAddress("alFilterf"); alFilterfv = (LPALFILTERFV)alGetProcAddress("alFilterfv"); alGetFilteri = (LPALGETFILTERI)alGetProcAddress("alGetFilteri"); alGetFilteriv = (LPALGETFILTERIV)alGetProcAddress("alGetFilteriv"); alGetFilterf = (LPALGETFILTERF)alGetProcAddress("alGetFilterf"); alGetFilterfv = (LPALGETFILTERFV)alGetProcAddress("alGetFilterfv"); alGenAuxiliaryEffectSlots = (LPALGENAUXILIARYEFFECTSLOTS)alGetProcAddress("alGenAuxiliaryEffectSlots"); alDeleteAuxiliaryEffectSlots = (LPALDELETEAUXILIARYEFFECTSLOTS)alGetProcAddress("alDeleteAuxiliaryEffectSlots"); alIsAuxiliaryEffectSlot = (LPALISAUXILIARYEFFECTSLOT)alGetProcAddress("alIsAuxiliaryEffectSlot"); alAuxiliaryEffectSloti = (LPALAUXILIARYEFFECTSLOTI)alGetProcAddress("alAuxiliaryEffectSloti"); alAuxiliaryEffectSlotiv = (LPALAUXILIARYEFFECTSLOTIV)alGetProcAddress("alAuxiliaryEffectSlotiv"); alAuxiliaryEffectSlotf = (LPALAUXILIARYEFFECTSLOTF)alGetProcAddress("alAuxiliaryEffectSlotf"); alAuxiliaryEffectSlotfv = (LPALAUXILIARYEFFECTSLOTFV)alGetProcAddress("alAuxiliaryEffectSlotfv"); alGetAuxiliaryEffectSloti = (LPALGETAUXILIARYEFFECTSLOTI)alGetProcAddress("alGetAuxiliaryEffectSloti"); alGetAuxiliaryEffectSlotiv = (LPALGETAUXILIARYEFFECTSLOTIV)alGetProcAddress("alGetAuxiliaryEffectSlotiv"); alGetAuxiliaryEffectSlotf = (LPALGETAUXILIARYEFFECTSLOTF)alGetProcAddress("alGetAuxiliaryEffectSlotf"); alGetAuxiliaryEffectSlotfv = (LPALGETAUXILIARYEFFECTSLOTFV)alGetProcAddress("alGetAuxiliaryEffectSlotfv"); //failed to initialize functions, revert to nullptr if (!alGenEffects || !alDeleteEffects || !alIsEffect || !alGenFilters || !alDeleteFilters || !alIsFilter || !alGenAuxiliaryEffectSlots || !alDeleteAuxiliaryEffectSlots || !alIsAuxiliaryEffectSlot || !alEffecti || !alEffectiv || !alEffectf || !alEffectfv || !alGetEffecti || !alGetEffectiv || !alGetEffectf || !alGetEffectfv || !alFilteri || !alFilteriv || !alFilterf || !alFilterfv || !alGetFilteri || !alGetFilteriv || !alGetFilterf || !alGetFilterfv || !alAuxiliaryEffectSloti || !alAuxiliaryEffectSlotiv || !alAuxiliaryEffectSlotf || !alAuxiliaryEffectSlotfv || !alGetAuxiliaryEffectSloti || !alGetAuxiliaryEffectSlotiv || !alGetAuxiliaryEffectSlotf || !alGetAuxiliaryEffectSlotfv) { alGenEffects = nullptr; alDeleteEffects = nullptr; alIsEffect = nullptr; alEffecti = nullptr; alEffectiv = nullptr; alEffectf = nullptr; alEffectfv = nullptr; alGetEffecti = nullptr; alGetEffectiv = nullptr; alGetEffectf = nullptr; alGetEffectfv = nullptr; alGenFilters = nullptr; alDeleteFilters = nullptr; alIsFilter = nullptr; alFilteri = nullptr; alFilteriv = nullptr; alFilterf = nullptr; alFilterfv = nullptr; alGetFilteri = nullptr; alGetFilteriv = nullptr; alGetFilterf = nullptr; alGetFilterfv = nullptr; alGenAuxiliaryEffectSlots = nullptr; alDeleteAuxiliaryEffectSlots = nullptr; alIsAuxiliaryEffectSlot = nullptr; alAuxiliaryEffectSloti = nullptr; alAuxiliaryEffectSlotiv = nullptr; alAuxiliaryEffectSlotf = nullptr; alAuxiliaryEffectSlotfv = nullptr; alGetAuxiliaryEffectSloti = nullptr; alGetAuxiliaryEffectSlotiv = nullptr; alGetAuxiliaryEffectSlotf = nullptr; alGetAuxiliaryEffectSlotfv = nullptr; } #endif } } // openal } // audio } // love ================================================ FILE: src/modules/audio/openal/Audio.h ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ #ifndef LOVE_AUDIO_OPENAL_AUDIO_H #define LOVE_AUDIO_OPENAL_AUDIO_H // STD #include #include #include #include #include // LOVE #include "audio/Audio.h" #include "audio/RecordingDevice.h" #include "audio/Filter.h" #include "common/config.h" #include "sound/SoundData.h" #include "Source.h" #include "Effect.h" #include "Pool.h" #include "thread/threads.h" // OpenAL #ifdef LOVE_APPLE_USE_FRAMEWORKS // Frameworks have different include paths. #ifdef LOVE_IOS #include #include #else #include #include #endif #else #include #include #include #endif namespace love { namespace audio { namespace openal { class Audio : public love::audio::Audio { public: Audio(); ~Audio(); /** * Gets the OpenAL format identifier based on number of * channels and bits. * @param channels. * @param bitDepth Either 8-bit samples, or 16-bit samples. * @return One of AL_FORMAT_*, or AL_NONE if unsupported format. **/ static ALenum getFormat(int bitDepth, int channels); // Implements Audio. love::audio::Source *newSource(love::sound::Decoder *decoder) override; love::audio::Source *newSource(love::sound::SoundData *soundData) override; love::audio::Source *newSource(int sampleRate, int bitDepth, int channels, int buffers) override; int getActiveSourceCount() const override; int getMaxSources() const override; bool play(love::audio::Source *source) override; bool play(const std::vector &sources) override; void stop(love::audio::Source *source) override; void stop(const std::vector &sources) override; void stop() override; void pause(love::audio::Source *source) override; void pause(const std::vector &sources) override; std::vector pause() override; void pauseContext() override; void resumeContext() override; void setVolume(float volume) override; float getVolume() const override; void getPosition(float *v) const override; void setPosition(float *v) override; void getOrientation(float *v) const override; void setOrientation(float *v) override; void getVelocity(float *v) const override; void setVelocity(float *v) override; void setDopplerScale(float scale) override; float getDopplerScale() const override; //void setMeter(float scale); //float getMeter() const; const std::vector &getRecordingDevices() override; DistanceModel getDistanceModel() const override; void setDistanceModel(DistanceModel distanceModel) override; bool setEffect(const char *name, std::map ¶ms) override; bool unsetEffect(const char *name) override; bool getEffect(const char *name, std::map ¶ms) override; bool getActiveEffects(std::vector &list) const override; int getMaxSceneEffects() const override; int getMaxSourceEffects() const override; bool isEFXsupported() const override; bool setOutputSpatialization(bool enable, const char *filter = nullptr) override; bool getOutputSpatialization(const char *&filter) const override; void getOutputSpatializationFilters(std::vector &list) const override; bool getEffectID(const char *name, ALuint &id); std::string getPlaybackDevice() override; void getPlaybackDevices(std::vector &list) override; void setPlaybackDevice(const char *name) override; private: std::vector computeContextAttribs(); void initializeEFX(); // The OpenAL device. ALCdevice *device; // The OpenAL capture devices. std::vector capture; // The OpenAL context. ALCcontext *context; // The OpenAL effects struct EffectMapStorage { Effect *effect; ALuint slot; }; std::map effectmap; std::stack slotlist; int MAX_SCENE_EFFECTS = 64; int MAX_REQUESTED_SOURCE_EFFECTS = 64; int MAX_SOURCE_EFFECTS = 0; // Disable HRTF output by default. bool requestEnableHRTF = false; std::string requestedHRTFFilter; // The Pool. Pool *pool; class PoolThread: public thread::Threadable { protected: Pool *pool; // Set this to true when the thread should finish. // Main thread will write to this value, and PoolThread // will read from it. volatile bool finish; // finish lock love::thread::MutexRef mutex; public: PoolThread(Pool *pool); virtual ~PoolThread(); void setFinish(); void threadFunction(); }; PoolThread *poolThread; DistanceModel distanceModel; //float metersPerUnit = 1.0; bool hasHRTFExtension = false; #ifdef LOVE_ANDROID # ifndef ALC_SOFT_pause_device typedef void (ALC_APIENTRY*LPALCDEVICEPAUSESOFT)(ALCdevice *device); typedef void (ALC_APIENTRY*LPALCDEVICERESUMESOFT)(ALCdevice *device); # endif LPALCDEVICEPAUSESOFT alcDevicePauseSOFT; LPALCDEVICERESUMESOFT alcDeviceResumeSOFT; std::vector pausedSources; #endif }; // Audio #ifdef ALC_EXT_EFX // Effect objects extern LPALGENEFFECTS alGenEffects; extern LPALDELETEEFFECTS alDeleteEffects; extern LPALISEFFECT alIsEffect; extern LPALEFFECTI alEffecti; extern LPALEFFECTIV alEffectiv; extern LPALEFFECTF alEffectf; extern LPALEFFECTFV alEffectfv; extern LPALGETEFFECTI alGetEffecti; extern LPALGETEFFECTIV alGetEffectiv; extern LPALGETEFFECTF alGetEffectf; extern LPALGETEFFECTFV alGetEffectfv; //Filter objects extern LPALGENFILTERS alGenFilters; extern LPALDELETEFILTERS alDeleteFilters; extern LPALISFILTER alIsFilter; extern LPALFILTERI alFilteri; extern LPALFILTERIV alFilteriv; extern LPALFILTERF alFilterf; extern LPALFILTERFV alFilterfv; extern LPALGETFILTERI alGetFilteri; extern LPALGETFILTERIV alGetFilteriv; extern LPALGETFILTERF alGetFilterf; extern LPALGETFILTERFV alGetFilterfv; // Auxiliary slot object extern LPALGENAUXILIARYEFFECTSLOTS alGenAuxiliaryEffectSlots; extern LPALDELETEAUXILIARYEFFECTSLOTS alDeleteAuxiliaryEffectSlots; extern LPALISAUXILIARYEFFECTSLOT alIsAuxiliaryEffectSlot; extern LPALAUXILIARYEFFECTSLOTI alAuxiliaryEffectSloti; extern LPALAUXILIARYEFFECTSLOTIV alAuxiliaryEffectSlotiv; extern LPALAUXILIARYEFFECTSLOTF alAuxiliaryEffectSlotf; extern LPALAUXILIARYEFFECTSLOTFV alAuxiliaryEffectSlotfv; extern LPALGETAUXILIARYEFFECTSLOTI alGetAuxiliaryEffectSloti; extern LPALGETAUXILIARYEFFECTSLOTIV alGetAuxiliaryEffectSlotiv; extern LPALGETAUXILIARYEFFECTSLOTF alGetAuxiliaryEffectSlotf; extern LPALGETAUXILIARYEFFECTSLOTFV alGetAuxiliaryEffectSlotfv; #endif } // openal } // audio } // love #endif // LOVE_AUDIO_OPENAL_AUDIO_H ================================================ FILE: src/modules/audio/openal/Effect.cpp ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ #include "Effect.h" #include "common/Exception.h" #include #include namespace love { namespace audio { namespace openal { //base class Effect::Effect() { generateEffect(); } Effect::Effect(const Effect &s) : Effect() { setParams(s.getParams()); } Effect::~Effect() { deleteEffect(); } Effect *Effect::clone() { return new Effect(*this); } bool Effect::generateEffect() { #ifdef ALC_EXT_EFX if (!alGenEffects) return false; if (effect != AL_EFFECT_NULL) return true; alGenEffects(1, &effect); if (alGetError() != AL_NO_ERROR) throw love::Exception("Failed to create sound Effect."); return true; #else return false; #endif } void Effect::deleteEffect() { #ifdef ALC_EXT_EFX if (effect != AL_EFFECT_NULL) alDeleteEffects(1, &effect); #endif effect = AL_EFFECT_NULL; } ALuint Effect::getEffect() const { return effect; } bool Effect::setParams(const std::map ¶ms) { this->params = params; type = (Type)(int) this->params[EFFECT_TYPE]; if (!generateEffect()) return false; #ifdef ALC_EXT_EFX //parameter table without EFFECT_TYPE entry is illegal switch (type) { case TYPE_REVERB: alEffecti(effect, AL_EFFECT_TYPE, AL_EFFECT_REVERB); break; case TYPE_CHORUS: alEffecti(effect, AL_EFFECT_TYPE, AL_EFFECT_CHORUS); break; case TYPE_DISTORTION: alEffecti(effect, AL_EFFECT_TYPE, AL_EFFECT_DISTORTION); break; case TYPE_ECHO: alEffecti(effect, AL_EFFECT_TYPE, AL_EFFECT_ECHO); break; case TYPE_FLANGER: alEffecti(effect, AL_EFFECT_TYPE, AL_EFFECT_FLANGER); break; /* case TYPE_FREQSHIFTER: alEffecti(effect, AL_EFFECT_TYPE, AL_EFFECT_FREQUENCY_SHIFTER); break; case TYPE_MORPHER: alEffecti(effect, AL_EFFECT_TYPE, AL_EFFECT_VOCAL_MORPHER); break; case TYPE_PITCHSHIFTER: alEffecti(effect, AL_EFFECT_TYPE, AL_EFFECT_PITCH_SHIFTER); break; */ case TYPE_MODULATOR: alEffecti(effect, AL_EFFECT_TYPE, AL_EFFECT_RING_MODULATOR); break; /* case TYPE_AUTOWAH: alEffecti(effect, AL_EFFECT_TYPE, AL_EFFECT_AUTOWAH); break; */ case TYPE_COMPRESSOR: alEffecti(effect, AL_EFFECT_TYPE, AL_EFFECT_COMPRESSOR); break; case TYPE_EQUALIZER: alEffecti(effect, AL_EFFECT_TYPE, AL_EFFECT_EQUALIZER); break; case TYPE_BASIC: case TYPE_MAX_ENUM: break; } //failed to make effect specific type - not supported etc. if (alGetError() != AL_NO_ERROR) { deleteEffect(); return false; } #define clampf(v,l,h) fmax(fmin((v),(h)),(l)) #define PARAMSTR(i,e,v) effect,AL_##e##_##v,clampf(getValue(i,AL_##e##_DEFAULT_##v),AL_##e##_MIN_##v,AL_##e##_MAX_##v) switch (type) { case TYPE_REVERB: { alEffectf(PARAMSTR(REVERB_GAIN,REVERB,GAIN)); alEffectf(PARAMSTR(REVERB_HFGAIN,REVERB,GAINHF)); alEffectf(PARAMSTR(REVERB_DENSITY,REVERB,DENSITY)); alEffectf(PARAMSTR(REVERB_DIFFUSION,REVERB,DIFFUSION)); alEffectf(PARAMSTR(REVERB_DECAY,REVERB,DECAY_TIME)); alEffectf(PARAMSTR(REVERB_HFDECAY,REVERB,DECAY_HFRATIO)); alEffectf(PARAMSTR(REVERB_EARLYGAIN,REVERB,REFLECTIONS_GAIN)); alEffectf(PARAMSTR(REVERB_EARLYDELAY,REVERB,REFLECTIONS_DELAY)); alEffectf(PARAMSTR(REVERB_LATEGAIN,REVERB,LATE_REVERB_GAIN)); alEffectf(PARAMSTR(REVERB_LATEDELAY,REVERB,LATE_REVERB_DELAY));; alEffectf(PARAMSTR(REVERB_ROLLOFF,REVERB,ROOM_ROLLOFF_FACTOR)); alEffectf(PARAMSTR(REVERB_AIRHFGAIN,REVERB,AIR_ABSORPTION_GAINHF)); alEffecti(effect, AL_REVERB_DECAY_HFLIMIT, getValue(REVERB_HFLIMITER, 0)); break; } case TYPE_CHORUS: { Waveform wave = static_cast(getValue(CHORUS_WAVEFORM, static_cast(WAVE_MAX_ENUM))); if (wave == WAVE_SINE) alEffecti(effect, AL_CHORUS_WAVEFORM, AL_CHORUS_WAVEFORM_SINUSOID); else if (wave == WAVE_TRIANGLE) alEffecti(effect, AL_CHORUS_WAVEFORM, AL_CHORUS_WAVEFORM_TRIANGLE); else alEffecti(effect, AL_CHORUS_WAVEFORM, AL_CHORUS_DEFAULT_WAVEFORM); alEffecti(PARAMSTR(CHORUS_PHASE,CHORUS,PHASE)); alEffectf(PARAMSTR(CHORUS_RATE,CHORUS,RATE)); alEffectf(PARAMSTR(CHORUS_DEPTH,CHORUS,DEPTH)); alEffectf(PARAMSTR(CHORUS_FEEDBACK,CHORUS,FEEDBACK)); alEffectf(PARAMSTR(CHORUS_DELAY,CHORUS,DELAY)); break; } case TYPE_DISTORTION: alEffectf(PARAMSTR(DISTORTION_GAIN,DISTORTION,GAIN)); alEffectf(PARAMSTR(DISTORTION_EDGE,DISTORTION,EDGE)); alEffectf(PARAMSTR(DISTORTION_LOWCUT,DISTORTION,LOWPASS_CUTOFF)); alEffectf(PARAMSTR(DISTORTION_EQCENTER,DISTORTION,EQCENTER)); alEffectf(PARAMSTR(DISTORTION_EQBAND,DISTORTION,EQBANDWIDTH)); break; case TYPE_ECHO: alEffectf(PARAMSTR(ECHO_DELAY,ECHO,DELAY)); alEffectf(PARAMSTR(ECHO_LRDELAY,ECHO,LRDELAY)); alEffectf(PARAMSTR(ECHO_DAMPING,ECHO,DAMPING)); alEffectf(PARAMSTR(ECHO_FEEDBACK,ECHO,FEEDBACK)); alEffectf(PARAMSTR(ECHO_SPREAD,ECHO,SPREAD)); break; case TYPE_FLANGER: { Waveform wave = static_cast(getValue(FLANGER_WAVEFORM, static_cast(WAVE_MAX_ENUM))); if (wave == WAVE_SINE) alEffecti(effect, AL_FLANGER_WAVEFORM, AL_FLANGER_WAVEFORM_SINUSOID); else if (wave == WAVE_TRIANGLE) alEffecti(effect, AL_FLANGER_WAVEFORM, AL_FLANGER_WAVEFORM_TRIANGLE); else alEffecti(effect, AL_FLANGER_WAVEFORM, AL_FLANGER_DEFAULT_WAVEFORM); alEffecti(PARAMSTR(FLANGER_PHASE,FLANGER,PHASE)); alEffectf(PARAMSTR(FLANGER_RATE,FLANGER,RATE)); alEffectf(PARAMSTR(FLANGER_DEPTH,FLANGER,DEPTH)); alEffectf(PARAMSTR(FLANGER_FEEDBACK,FLANGER,FEEDBACK)); alEffectf(PARAMSTR(FLANGER_DELAY,FLANGER,DELAY)); break; } /* case TYPE_FREQSHIFTER: { alEffectf(PARAMSTR(FREQSHIFTER_FREQ,FREQUENCY_SHIFTER,FREQUENCY)); Direction dir = static_cast(getValue(FREQSHIFTER_LEFTDIR, static_cast(DIR_MAX_ENUM))); if (dir == DIR_NONE) alEffecti(effect, AL_FREQUENCY_SHIFTER_LEFT_DIRECTION, AL_FREQUENCY_SHIFTER_DIRECTION_OFF); else if(dir == DIR_UP) alEffecti(effect, AL_FREQUENCY_SHIFTER_LEFT_DIRECTION, AL_FREQUENCY_SHIFTER_DIRECTION_UP); else if(dir == DIR_DOWN) alEffecti(effect, AL_FREQUENCY_SHIFTER_LEFT_DIRECTION, AL_FREQUENCY_SHIFTER_DIRECTION_DOWN); else alEffecti(effect, AL_FREQUENCY_SHIFTER_LEFT_DIRECTION, AL_FREQUENCY_SHIFTER_DEFAULT_LEFT_DIRECTION); dir = static_cast(getValue(FREQSHIFTER_RIGHTDIR, static_cast(DIR_MAX_ENUM))); if (dir == DIR_NONE) alEffecti(effect, AL_FREQUENCY_SHIFTER_RIGHT_DIRECTION, AL_FREQUENCY_SHIFTER_DIRECTION_OFF); else if(dir == DIR_UP) alEffecti(effect, AL_FREQUENCY_SHIFTER_RIGHT_DIRECTION, AL_FREQUENCY_SHIFTER_DIRECTION_UP); else if(dir == DIR_DOWN) alEffecti(effect, AL_FREQUENCY_SHIFTER_RIGHT_DIRECTION, AL_FREQUENCY_SHIFTER_DIRECTION_DOWN); else alEffecti(effect, AL_FREQUENCY_SHIFTER_RIGHT_DIRECTION, AL_FREQUENCY_SHIFTER_DEFAULT_RIGHT_DIRECTION); break; } case TYPE_MORPHER: { Waveform wave = static_cast(getValue(MORPHER_WAVEFORM, static_cast(WAVE_MAX_ENUM))); if (wave == WAVE_SINE) alEffecti(effect, AL_VOCAL_MORPHER_WAVEFORM, AL_VOCAL_MORPHER_WAVEFORM_SINUSOID); else if (wave == WAVE_TRIANGLE) alEffecti(effect, AL_VOCAL_MORPHER_WAVEFORM, AL_VOCAL_MORPHER_WAVEFORM_TRIANGLE); else if (wave == WAVE_SAWTOOTH) alEffecti(effect, AL_VOCAL_MORPHER_WAVEFORM, AL_VOCAL_MORPHER_WAVEFORM_SAWTOOTH); else alEffecti(effect, AL_VOCAL_MORPHER_WAVEFORM, AL_VOCAL_MORPHER_DEFAULT_WAVEFORM); Phoneme phoneme = static_cast(getValue(MORPHER_PHONEMEA, static_cast(PHONEME_MAX_ENUM))); if (phoneme == PHONEME_MAX_ENUM) alEffecti(effect, AL_VOCAL_MORPHER_PHONEMEA, AL_VOCAL_MORPHER_DEFAULT_PHONEMEA); else alEffecti(effect, AL_VOCAL_MORPHER_PHONEMEA, phonemeMap[phoneme]); phoneme = static_cast(getValue(MORPHER_PHONEMEB, static_cast(PHONEME_MAX_ENUM))); if (phoneme == PHONEME_MAX_ENUM) alEffecti(effect, AL_VOCAL_MORPHER_PHONEMEB, AL_VOCAL_MORPHER_DEFAULT_PHONEMEB); else alEffecti(effect, AL_VOCAL_MORPHER_PHONEMEB, phonemeMap[phoneme]); alEffectf(PARAMSTR(MORPHER_RATE,VOCAL_MORPHER,RATE)); alEffecti(PARAMSTR(MORPHER_TUNEA,VOCAL_MORPHER,PHONEMEA_COARSE_TUNING)); alEffecti(PARAMSTR(MORPHER_TUNEB,VOCAL_MORPHER,PHONEMEB_COARSE_TUNING)); break; } case TYPE_PITCHSHIFTER: { float tune = getValue(PITCHSHIFTER_PITCH, (float)AL_PITCH_SHIFTER_DEFAULT_COARSE_TUNE + (float)(AL_PITCH_SHIFTER_DEFAULT_FINE_TUNE - 50) / 100.0 ); int coarse = (int)floor(tune); int fine = (int)(fmod(tune, 1.0)*100.0); if (fine > 50) { fine -= 100; coarse += 1; } else if (fine < -50) { fine += 100; coarse -= 1; } if (coarse > AL_PITCH_SHIFTER_MAX_COARSE_TUNE) { coarse = AL_PITCH_SHIFTER_MAX_COARSE_TUNE; fine = AL_PITCH_SHIFTER_MAX_FINE_TUNE; } else if (coarse < AL_PITCH_SHIFTER_MIN_COARSE_TUNE) { coarse = AL_PITCH_SHIFTER_MIN_COARSE_TUNE; fine = AL_PITCH_SHIFTER_MIN_FINE_TUNE; } alEffecti(effect, AL_PITCH_SHIFTER_COARSE_TUNE, coarse); alEffecti(effect, AL_PITCH_SHIFTER_FINE_TUNE, fine); break; } */ case TYPE_MODULATOR: { Waveform wave = static_cast(getValue(MODULATOR_WAVEFORM,static_cast(WAVE_MAX_ENUM))); if (wave == WAVE_SINE) alEffecti(effect, AL_RING_MODULATOR_WAVEFORM, AL_RING_MODULATOR_SINUSOID); else if (wave == WAVE_SAWTOOTH) alEffecti(effect, AL_RING_MODULATOR_WAVEFORM, AL_RING_MODULATOR_SAWTOOTH); else if (wave == WAVE_SQUARE) alEffecti(effect, AL_RING_MODULATOR_WAVEFORM, AL_RING_MODULATOR_SQUARE); else alEffecti(effect, AL_RING_MODULATOR_WAVEFORM, AL_RING_MODULATOR_DEFAULT_WAVEFORM); alEffectf(PARAMSTR(MODULATOR_FREQ,RING_MODULATOR,FREQUENCY)); alEffectf(PARAMSTR(MODULATOR_HIGHCUT,RING_MODULATOR,HIGHPASS_CUTOFF)); break; } /* case TYPE_AUTOWAH: alEffectf(PARAMSTR(AUTOWAH_ATTACK,AUTOWAH,ATTACK_TIME)); alEffectf(PARAMSTR(AUTOWAH_RELEASE,AUTOWAH,RELEASE_TIME)); alEffectf(PARAMSTR(AUTOWAH_RESONANCE,AUTOWAH,RESONANCE)); alEffectf(PARAMSTR(AUTOWAH_PEAKGAIN,AUTOWAH,PEAK_GAIN)); break; */ case TYPE_COMPRESSOR: alEffecti(effect, AL_COMPRESSOR_ONOFF, getValue(COMPRESSOR_ENABLE,static_cast(AL_COMPRESSOR_DEFAULT_ONOFF))); break; case TYPE_EQUALIZER: alEffectf(PARAMSTR(EQUALIZER_LOWGAIN,EQUALIZER,LOW_GAIN)); alEffectf(PARAMSTR(EQUALIZER_LOWCUT,EQUALIZER,LOW_CUTOFF)); alEffectf(PARAMSTR(EQUALIZER_MID1GAIN,EQUALIZER,MID1_GAIN)); alEffectf(PARAMSTR(EQUALIZER_MID1FREQ,EQUALIZER,MID1_CENTER)); alEffectf(PARAMSTR(EQUALIZER_MID1BAND,EQUALIZER,MID1_WIDTH)); alEffectf(PARAMSTR(EQUALIZER_MID2GAIN,EQUALIZER,MID2_GAIN)); alEffectf(PARAMSTR(EQUALIZER_MID2FREQ,EQUALIZER,MID2_CENTER)); alEffectf(PARAMSTR(EQUALIZER_MID2BAND,EQUALIZER,MID2_WIDTH)); alEffectf(PARAMSTR(EQUALIZER_HIGHGAIN,EQUALIZER,HIGH_GAIN)); alEffectf(PARAMSTR(EQUALIZER_HIGHCUT,EQUALIZER,HIGH_CUTOFF)); break; case TYPE_BASIC: case TYPE_MAX_ENUM: break; } #undef PARAMSTR #undef clampf //alGetError(); return true; #else return false; #endif //ALC_EXT_EFX } const std::map &Effect::getParams() const { return params; } float Effect::getValue(Parameter in, float def) const { return params.find(in) == params.end() ? def : params.at(in); } int Effect::getValue(Parameter in, int def) const { return params.find(in) == params.end() ? def : static_cast(params.at(in)); } /* std::map Effect::phonemeMap = { {Effect::PHONEME_A, AL_VOCAL_MORPHER_PHONEME_A}, {Effect::PHONEME_E, AL_VOCAL_MORPHER_PHONEME_E}, {Effect::PHONEME_I, AL_VOCAL_MORPHER_PHONEME_I}, {Effect::PHONEME_O, AL_VOCAL_MORPHER_PHONEME_O}, {Effect::PHONEME_U, AL_VOCAL_MORPHER_PHONEME_U}, {Effect::PHONEME_AA, AL_VOCAL_MORPHER_PHONEME_AA}, {Effect::PHONEME_AE, AL_VOCAL_MORPHER_PHONEME_AE}, {Effect::PHONEME_AH, AL_VOCAL_MORPHER_PHONEME_AH}, {Effect::PHONEME_AO, AL_VOCAL_MORPHER_PHONEME_AO}, {Effect::PHONEME_EH, AL_VOCAL_MORPHER_PHONEME_EH}, {Effect::PHONEME_ER, AL_VOCAL_MORPHER_PHONEME_ER}, {Effect::PHONEME_IH, AL_VOCAL_MORPHER_PHONEME_IH}, {Effect::PHONEME_IY, AL_VOCAL_MORPHER_PHONEME_IY}, {Effect::PHONEME_UH, AL_VOCAL_MORPHER_PHONEME_UH}, {Effect::PHONEME_UW, AL_VOCAL_MORPHER_PHONEME_UW}, {Effect::PHONEME_B, AL_VOCAL_MORPHER_PHONEME_B}, {Effect::PHONEME_D, AL_VOCAL_MORPHER_PHONEME_D}, {Effect::PHONEME_F, AL_VOCAL_MORPHER_PHONEME_F}, {Effect::PHONEME_G, AL_VOCAL_MORPHER_PHONEME_G}, {Effect::PHONEME_J, AL_VOCAL_MORPHER_PHONEME_J}, {Effect::PHONEME_K, AL_VOCAL_MORPHER_PHONEME_K}, {Effect::PHONEME_L, AL_VOCAL_MORPHER_PHONEME_L}, {Effect::PHONEME_M, AL_VOCAL_MORPHER_PHONEME_M}, {Effect::PHONEME_N, AL_VOCAL_MORPHER_PHONEME_N}, {Effect::PHONEME_P, AL_VOCAL_MORPHER_PHONEME_P}, {Effect::PHONEME_R, AL_VOCAL_MORPHER_PHONEME_R}, {Effect::PHONEME_S, AL_VOCAL_MORPHER_PHONEME_S}, {Effect::PHONEME_T, AL_VOCAL_MORPHER_PHONEME_T}, {Effect::PHONEME_V, AL_VOCAL_MORPHER_PHONEME_V}, {Effect::PHONEME_Z, AL_VOCAL_MORPHER_PHONEME_Z} }; */ } //openal } //audio } //love ================================================ FILE: src/modules/audio/openal/Effect.h ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ #ifndef LOVE_AUDIO_OPENAL_EFFECTS_H #define LOVE_AUDIO_OPENAL_EFFECTS_H #include "common/config.h" // OpenAL #ifdef LOVE_APPLE_USE_FRAMEWORKS // Frameworks have different include paths. #ifdef LOVE_IOS #include #include #else #include #include #include #endif #else #include #include #include #endif #include #include #include "audio/Effect.h" #include "Audio.h" #ifndef AL_EFFECT_NULL #define AL_EFFECT_NULL (0) #endif #ifndef AL_EFFECTSLOT_NULL #define AL_EFFECTSLOT_NULL (0) #endif namespace love { namespace audio { namespace openal { class Effect : public love::audio::Effect { public: Effect(); Effect(const Effect &s); virtual ~Effect(); virtual Effect *clone(); ALuint getEffect() const; virtual bool setParams(const std::map ¶ms); virtual const std::map &getParams() const; private: bool generateEffect(); void deleteEffect(); float getValue(Parameter in, float def) const; int getValue(Parameter in, int def) const; ALuint effect = AL_EFFECT_NULL; std::map params; //static std::map phonemeMap; }; } //openal } //audio } //love #endif //LOVE_AUDIO_OPENAL_EFFECTS_H ================================================ FILE: src/modules/audio/openal/Filter.cpp ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ #include "Filter.h" #include "common/Exception.h" #include namespace love { namespace audio { namespace openal { //base class Filter::Filter() { generateFilter(); } Filter::Filter(const Filter &s) : Filter() { setParams(s.getParams()); } Filter::~Filter() { deleteFilter(); } Filter *Filter::clone() { return new Filter(*this); } bool Filter::generateFilter() { #ifdef ALC_EXT_EFX if (!alGenFilters) return false; if (filter != AL_FILTER_NULL) return true; alGenFilters(1, &filter); if (alGetError() != AL_NO_ERROR) throw love::Exception("Failed to create sound Filter."); return true; #else return false; #endif } void Filter::deleteFilter() { #ifdef ALC_EXT_EFX if (filter != AL_FILTER_NULL) alDeleteFilters(1, &filter); #endif filter = AL_FILTER_NULL; } ALuint Filter::getFilter() const { return filter; } bool Filter::setParams(const std::map ¶ms) { this->params = params; type = (Type)(int) this->params[FILTER_TYPE]; if (!generateFilter()) return false; #ifdef ALC_EXT_EFX switch (type) { case TYPE_LOWPASS: alFilteri(filter, AL_FILTER_TYPE, AL_FILTER_LOWPASS); break; case TYPE_HIGHPASS: alFilteri(filter, AL_FILTER_TYPE, AL_FILTER_HIGHPASS); break; case TYPE_BANDPASS: alFilteri(filter, AL_FILTER_TYPE, AL_FILTER_BANDPASS); break; case TYPE_BASIC: case TYPE_MAX_ENUM: break; } //failed to make filter specific type - not supported etc. if (alGetError() != AL_NO_ERROR) { deleteFilter(); return false; } #define clampf(v,l,h) fmax(fmin((v),(h)),(l)) #define PARAMSTR(i,e,v) filter,AL_##e##_##v,clampf(getValue(i,AL_##e##_DEFAULT_##v),AL_##e##_MIN_##v,AL_##e##_MAX_##v) switch (type) { case TYPE_LOWPASS: alFilterf(PARAMSTR(FILTER_VOLUME,LOWPASS,GAIN)); alFilterf(PARAMSTR(FILTER_HIGHGAIN,LOWPASS,GAINHF)); break; case TYPE_HIGHPASS: alFilterf(PARAMSTR(FILTER_VOLUME,HIGHPASS,GAIN)); alFilterf(PARAMSTR(FILTER_LOWGAIN,HIGHPASS,GAINLF)); break; case TYPE_BANDPASS: alFilterf(PARAMSTR(FILTER_VOLUME,BANDPASS,GAIN)); alFilterf(PARAMSTR(FILTER_LOWGAIN,BANDPASS,GAINLF)); alFilterf(PARAMSTR(FILTER_HIGHGAIN,BANDPASS,GAINHF)); break; case TYPE_BASIC: case TYPE_MAX_ENUM: break; } #undef clampf #undef PARAMSTR //alGetError(); return true; #else return false; #endif } const std::map &Filter::getParams() const { return params; } float Filter::getValue(Parameter in, float def) const { return params.find(in) == params.end() ? def : params.at(in); } int Filter::getValue(Parameter in, int def) const { return params.find(in) == params.end() ? def : static_cast(params.at(in)); } } //openal } //audio } //love ================================================ FILE: src/modules/audio/openal/Filter.h ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ #ifndef LOVE_AUDIO_OPENAL_FILTERS_H #define LOVE_AUDIO_OPENAL_FILTERS_H #include "common/config.h" // OpenAL #ifdef LOVE_APPLE_USE_FRAMEWORKS // Frameworks have different include paths. #ifdef LOVE_IOS #include #include #else #include #include #include #endif #else #include #include #include #endif #include #include "audio/Filter.h" #include "Audio.h" #ifndef AL_FILTER_NULL #define AL_FILTER_NULL (0) #endif namespace love { namespace audio { namespace openal { class Filter : public love::audio::Filter { public: Filter(); Filter(const Filter &s); virtual ~Filter(); virtual Filter *clone(); ALuint getFilter() const; virtual bool setParams(const std::map ¶ms); virtual const std::map &getParams() const; private: bool generateFilter(); void deleteFilter(); float getValue(Parameter in, float def) const; int getValue(Parameter in, int def) const; ALuint filter = AL_FILTER_NULL; std::map params; }; } //openal } //audio } //love #endif //LOVE_AUDIO_OPENAL_FILTERS_H ================================================ FILE: src/modules/audio/openal/Pool.cpp ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ #include "Pool.h" #include "event/Event.h" #include "Source.h" namespace love { namespace audio { namespace openal { static Variant::SharedTable *putSourcesAsSharedTable(std::vector &sources) { Variant::SharedTable *table = new Variant::SharedTable(); for (int i = 0; i < (int) sources.size(); i++) table->pairs.emplace_back((double) (i + 1), Variant(&Source::type, sources[i])); return table; } Pool::Pool(ALCdevice *device) : device(device) , sources() , disconnectNotified(false) , totalSources(0) { // Clear errors. alGetError(); // Generate sources. for (int i = 0; i < MAX_SOURCES; i++) { alGenSources(1, &sources[i]); // We might hit an implementation-dependent limit on the total number // of sources before reaching MAX_SOURCES. if (alGetError() != AL_NO_ERROR) break; totalSources++; } if (totalSources < 4) throw love::Exception("Could not generate sources."); // Make all sources available initially. for (int i = 0; i < totalSources; i++) available.push(sources[i]); } Pool::~Pool() { Source::stop(this); // Free all sources. alDeleteSources(totalSources, sources); } bool Pool::isAvailable() const { bool has = false; { thread::Lock lock(mutex); has = !available.empty(); } return has; } bool Pool::isPlaying(Source *s) { bool p = false; { thread::Lock lock(mutex); p = (playing.find(s) != playing.end()); } return p; } void Pool::update() { #ifndef ALC_CONNECTED constexpr ALCenum ALC_CONNECTED = 0x313; #endif thread::Lock lock(mutex); static bool disconnectExtSupported = alcIsExtensionPresent(device, "ALC_EXT_disconnect") == ALC_TRUE; // Device disconnection event if (disconnectExtSupported) { auto eventModule = Module::getInstance(Module::M_EVENT); if (eventModule) { ALCint connected; alcGetIntegerv(device, ALC_CONNECTED, 1, &connected); if (connected) disconnectNotified = false; else if (!disconnectNotified) { // Get all sources in this Pool then stop it // since they're all internally stopped. std::vector sources = getPlayingSources(); Source::stop(sources); std::vector vargs; vargs.emplace_back(putSourcesAsSharedTable(sources)); StrongRef msg(new event::Message("audiodisconnected", vargs), Acquire::NORETAIN); eventModule->push(msg); disconnectNotified = true; } } } std::vector torelease; for (const auto &i : playing) { if (!i.first->update()) torelease.push_back(i.first); } for (Source *s : torelease) releaseSource(s); } int Pool::getActiveSourceCount() const { return (int) playing.size(); } int Pool::getMaxSources() const { return totalSources; } bool Pool::assignSource(Source *source, ALuint &out, char &wasPlaying) { out = 0; if (findSource(source, out)) return wasPlaying = true; wasPlaying = false; if (available.empty()) return false; out = available.front(); available.pop(); playing.insert(std::make_pair(source, out)); source->retain(); return true; } bool Pool::releaseSource(Source *source, bool stop) { ALuint s; if (findSource(source, s)) { if (stop) source->stopAtomic(); source->release(); available.push(s); playing.erase(source); return true; } return false; } bool Pool::findSource(Source *source, ALuint &out) { std::map::const_iterator i = playing.find(source); if (i == playing.end()) return false; out = i->second; return true; } thread::Lock Pool::lock() { return thread::Lock(mutex); } std::vector Pool::getPlayingSources() { std::vector sources; sources.reserve(playing.size()); for (auto &i : playing) sources.push_back(i.first); return sources; } } // openal } // audio } // love ================================================ FILE: src/modules/audio/openal/Pool.h ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ #ifndef LOVE_AUDIO_OPENAL_POOL_H #define LOVE_AUDIO_OPENAL_POOL_H // STD #include #include #include #include // LOVE #include "common/config.h" #include "common/Exception.h" #include "thread/threads.h" #include "audio/Source.h" // OpenAL #ifdef LOVE_APPLE_USE_FRAMEWORKS #ifdef LOVE_IOS #include #include #include #include #else #include #include #include #endif #else #include #include #include #endif namespace love { namespace audio { namespace openal { class Source; class Pool { public: Pool(ALCdevice *device); ~Pool(); /** * Checks whether an OpenAL source is available. * @return True if at least one is available, false otherwise. **/ bool isAvailable() const; /** * Checks whether a Source is currently in the playing list. **/ bool isPlaying(Source *s); void update(); int getActiveSourceCount() const; int getMaxSources() const; private: friend class Source; LOVE_WARN_UNUSED thread::Lock lock(); std::vector getPlayingSources(); /** * Makes the specified OpenAL source available for use. * @param source The OpenAL source. **/ bool releaseSource(Source *source, bool stop = true); bool assignSource(Source *source, ALuint &out, char &wasPlaying); bool findSource(Source *source, ALuint &out); // Maximum possible number of OpenAL sources the pool attempts to generate. static const int MAX_SOURCES = 64; // Current OpenAL device ALCdevice *device; // OpenAL sources ALuint sources[MAX_SOURCES]; // Is device disconnection has been notified? bool disconnectNotified; // Total number of created sources in the pool. int totalSources; // A queue of available sources. std::queue available; // A map of playing sources. std::map playing; // Only one thread can access this object at the same time. This mutex will // make sure of that. love::thread::MutexRef mutex; }; // Pool } // openal } // audio } // love #endif // LOVE_AUDIO_OPENAL_POOL_H ================================================ FILE: src/modules/audio/openal/RecordingDevice.cpp ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ #include "RecordingDevice.h" #include "Audio.h" #include "sound/Sound.h" namespace love { namespace audio { namespace openal { #define soundInstance() (Module::getInstance(Module::M_SOUND)) class InvalidFormatException : public love::Exception { public: InvalidFormatException(int channels, int bitdepth) : Exception("Recording %d channels with %d bits per sample is not supported.", channels, bitdepth) { } }; RecordingDevice::RecordingDevice(const char *name) : name(name) { } RecordingDevice::~RecordingDevice() { stop(); } bool RecordingDevice::start(int samples, int sampleRate, int bitDepth, int channels) { ALenum format = Audio::getFormat(bitDepth, channels); if (format == AL_NONE) throw InvalidFormatException(channels, bitDepth); if (samples <= 0) throw love::Exception("Invalid number of samples."); if (sampleRate <= 0) throw love::Exception("Invalid sample rate."); if (isRecording()) stop(); // This hard-crashes on iOS with Apple's OpenAL implementation, even when // the user gives permission to the app. #ifndef LOVE_IOS device = alcCaptureOpenDevice(name.c_str(), sampleRate, format, samples); #endif if (device == nullptr) return false; alcCaptureStart(device); this->samples = samples; this->sampleRate = sampleRate; this->bitDepth = bitDepth; this->channels = channels; return true; } void RecordingDevice::stop() { if (!isRecording()) return; alcCaptureStop(device); alcCaptureCloseDevice(device); device = nullptr; } love::sound::SoundData *RecordingDevice::getData() { if (!isRecording()) return nullptr; int samples = getSampleCount(); if (samples == 0) return nullptr; love::sound::SoundData *soundData = soundInstance()->newSoundData(samples, sampleRate, bitDepth, channels); alcCaptureSamples(device, soundData->getData(), samples); return soundData; } int RecordingDevice::getSampleCount() const { if (!isRecording()) return 0; ALCint samples; alcGetIntegerv(device, ALC_CAPTURE_SAMPLES, sizeof(ALCint), &samples); return (int)samples; } int RecordingDevice::getMaxSamples() const { return samples; } int RecordingDevice::getSampleRate() const { return sampleRate; } int RecordingDevice::getBitDepth() const { return bitDepth; } int RecordingDevice::getChannelCount() const { return channels; } const char *RecordingDevice::getName() const { return name.c_str(); } bool RecordingDevice::isRecording() const { return device != nullptr; } } //openal } //audio } //love ================================================ FILE: src/modules/audio/openal/RecordingDevice.h ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ #ifndef LOVE_AUDIO_OPENAL_RECORDING_DEVICE_H #define LOVE_AUDIO_OPENAL_RECORDING_DEVICE_H #include "common/config.h" #ifdef LOVE_APPLE_USE_FRAMEWORKS #ifdef LOVE_IOS #include #include #else #include #include #endif #else #include #include #endif #include "audio/RecordingDevice.h" #include "sound/SoundData.h" namespace love { namespace audio { namespace openal { class RecordingDevice : public love::audio::RecordingDevice { public: RecordingDevice(const char *name); virtual ~RecordingDevice(); virtual bool start(int samples, int sampleRate, int bitDepth, int channels); virtual void stop(); virtual love::sound::SoundData *getData(); virtual const char *getName() const; virtual int getSampleCount() const; virtual int getMaxSamples() const; virtual int getSampleRate() const; virtual int getBitDepth() const; virtual int getChannelCount() const; virtual bool isRecording() const; private: int samples = DEFAULT_SAMPLES; int sampleRate = DEFAULT_SAMPLE_RATE; int bitDepth = DEFAULT_BIT_DEPTH; int channels = DEFAULT_CHANNELS; std::string name; ALCdevice *device = nullptr; }; //RecordingDevice } //openal } //audio } //love #endif //LOVE_AUDIO_OPENAL_RECORDING_DEVICE_H ================================================ FILE: src/modules/audio/openal/Source.cpp ================================================ /** * Copyright (c) 2006-2026 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ #include "Source.h" #include "Filter.h" #include "Pool.h" #include "Audio.h" #include "common/math.h" // STD #include #include #define audiomodule() (Module::getInstance

' preview = preview .. '
' .. '

Expected

' .. '
' .. '

Actual

' if love.filesystem.openFile('tempoutput/difference/' .. filename .. '-' .. fstr .. '.png', 'r') then preview = preview .. '
' .. '

Difference

' end preview = preview .. '
' end end end -- append HTML for the test class result local status = '' local cls = 'red' if self.passed then status = '
'; cls = 'green' end if self.skipped then status = ''; cls = 'yellow' end self.testmodule.html = self.testmodule.html .. '' .. '' .. status .. '' .. '' .. self.method .. '' .. '' .. endtime .. 's' .. '' .. output .. preview .. '' .. '' -- add message if assert failed local msg = '' if self.result.message ~= nil and not self.skipped then msg = ' - ' .. self.result.key .. ' failed - (' .. self.result.message .. ')' end if self.skipped then msg = self.result.message end -- log final test result to console -- i know its hacky but its neat soz local tested = 'love.' .. self.testmodule.module .. '.' .. self.method .. '()' local matching = string.sub(self.testmodule.spacer, string.len(tested), 40) self.testmodule:log( self.testmodule.colors[self.result.result], ' ' .. tested .. matching, ' ==> ' .. self.result.result .. ' - ' .. endtime .. 's ' .. self.result.total .. msg ) -- if we failed on multiple asserts, list them here - makes it easier for -- debugging new methods added that are failing multiple asserts if #self.result.failures > 1 then for f=2,#self.result.failures do local addf = self.result.failures[f] self.testmodule:log( self.testmodule.colors[self.result.result], ' ' .. tested .. matching, ' ==> ' .. addf['key'] .. ' [' .. addf['test'] .. '] failed - ' .. addf['message'] ) end end end } ================================================ FILE: testing/classes/TestModule.lua ================================================ -- @class - TestModule -- @desc - used to run tests for a given module, each test method will spawn -- a love.test.Test object TestModule = { -- @method - TestModule:new() -- @desc - create a new Suite object -- @param {string} module - string of love module the suite is for -- @return {table} - returns the new Suite object new = function(self, module, method) local testmodule = { time = 0, spacer = ' ', colors = { PASS = 'green', FAIL = 'red', SKIP = 'grey' }, colormap = { grey = '\27[37m', green = '\27[32m', red = '\27[31m', yellow = '\27[33m' }, xml = '', html = '', tests = {}, running = {}, called = {}, passed = 0, failed = 0, skipped = 0, module = module, method = method, index = 1, start = false, } setmetatable(testmodule, self) self.__index = self return testmodule end, -- @method - TestModule:log() -- @desc - log to console with specific colors, split out to make it easier -- to adjust all console output across the tests -- @param {string} color - color key to use for the log -- @param {string} line - main message to write (LHS) -- @param {string} result - result message to write (RHS) -- @return {nil} log = function(self, color, line, result) if result == nil then result = '' end print(self.colormap[color] .. line .. result) end, -- @method - TestModule:runTests() -- @desc - starts the running of tests and sets up the list of methods to test -- @param {string} module - module to set for the test suite -- @param {string} method - specific method to test, if nil all methods tested -- @return {nil} runTests = function(self) self.running = {} self.passed = 0 self.failed = 0 if self.method ~= nil then table.insert(self.running, self.method) else for i,_ in pairs(love.test[self.module]) do table.insert(self.running, i) end table.sort(self.running) end self.index = 1 self.start = true self:log('yellow', '\nlove.' .. self.module .. '.testmodule.start') end, -- @method - TestModule:printResult() -- @desc - prints the result of the module to the console as well as appends -- the XML + HTML for the test to the testsuite output -- @return {nil} printResult = function(self) local finaltime = UtilTimeFormat(self.time) local status = '
' if self.failed == 0 then status = '
' end -- add md row to main output love.test.mdrows = love.test.mdrows .. '| ' .. status .. ' ' .. self.module .. ' | ' .. tostring(self.passed) .. ' | ' .. tostring(self.failed) .. ' | ' .. tostring(self.skipped) .. ' | ' .. finaltime .. 's |' .. '\n' -- add xml to main output love.test.xml = love.test.xml .. '\t\n' .. self.xml .. '\t\n' -- add html to main output local module_cls = 'toggle close' local module_txt = '▶' local wrap_cls = '' if self.failed > 0 then module_cls = 'toggle open' module_txt = '▼' wrap_cls = 'fail' end love.test.html = love.test.html .. '
' .. '
' .. module_txt .. '
' .. '

' .. status .. ' love.' .. self.module .. '

    ' .. '
  • ' .. tostring(self.passed) .. ' Passed
  • ' .. '
  • ' .. tostring(self.failed) .. ' Failed
  • ' .. '
  • ' .. tostring(self.skipped) .. ' Skipped
  • ' .. '
  • ' .. finaltime .. 's
  • ' .. '


' .. '' .. self.html .. '
MethodTimeDetails
' -- print module results to console self:log('yellow', 'love.' .. self.module .. '.testmodule.end') local failedcol = '\27[31m' if self.failed == 0 then failedcol = '\27[37m' end self:log('green', tostring(self.passed) .. ' PASSED' .. ' || ' .. failedcol .. tostring(self.failed) .. ' FAILED || \27[37m' .. tostring(self.skipped) .. ' SKIPPED || ' .. finaltime .. 's') self.start = false self.fakequit = false end } ================================================ FILE: testing/classes/TestSuite.lua ================================================ TestSuite = { -- @method - TestSuite:new() -- @desc - creates a new TestSuite object that handles all the tests -- @return {table} - returns the new TestSuite object new = function(self) local test = { -- testsuite internals modules = {}, module = nil, test = nil, testcanvas = nil, current = 1, output = '', totals = {0, 0, 0}, time = 0, xml = '', html = '', mdrows = '', mdfailures = '', delayed = nil, fakequit = false, windowmode = true, current_os = love._os, lua_version = tonumber(_VERSION:match("%d%.%d")), has_lua_jit = type(jit) == 'table', -- love modules to test audio = {}, data = {}, event = {}, filesystem = {}, font = {}, graphics = {}, image = {}, joystick = {}, love = {}, keyboard = {}, math = {}, mouse = {}, physics = {}, sensor = {}, sound = {}, system = {}, thread = {}, timer = {}, touch = {}, video = {}, window = {} } setmetatable(test, self) self.__index = self return test end, -- @method - TestSuite:runSuite() -- @desc - called in love.update, runs through every method or every module -- @param {number} delta - delta from love.update to track time elapsed -- @return {nil} runSuite = function(self, delta) -- stagger between tests if self.module ~= nil then if self.module.start then -- work through each test method 1 by 1 if self.module.index <= #self.module.running then -- run method once if self.module.called[self.module.index] == nil then self.module.called[self.module.index] = true local method = self.module.running[self.module.index] self.test = TestMethod:new(method, self.module) TextRun = 'love.' .. self.module.module .. '.' .. method self.test.co = coroutine.create(function() local ok, chunk, err = pcall( love.test[love.test.module.module][method], love.test.test ) if ok == false then love.test.test['passed'] = false love.test.test['fatal'] = tostring(chunk) .. tostring(err) end end) -- once called we have a corouting, so just call resume every frame -- until we have finished else -- move onto next yield if any -- pauses can be set with TestMethod:waitFrames(frames) coroutine.resume(self.test.co) -- when wait finished (or no yields) if coroutine.status(self.test.co) == 'dead' then -- now we're all done evaluate the test local ok, chunk, err = pcall(self.test.evaluateTest, self.test) if ok == false then self.test.passed = false self.test.fatal = tostring(chunk) .. tostring(err) end -- save having to :release() anything we made in the last test collectgarbage("collect") -- move onto the next test self.module.index = self.module.index + 1 end end -- once all tests have run else -- print module results and add to output self.module:printResult() -- if we have more modules to go run the next one self.current = self.current + 1 if #self.modules >= self.current then self.module = self.modules[self.current] self.module:runTests() -- otherwise print the final results and export output else self:printResult() love.event.quit(0) end end end end end, -- @method - TestSuite:printResult() -- @desc - prints the result of the whole test suite as well as writes -- the MD, XML + HTML of the testsuite output -- @return {nil} printResult = function(self) local finaltime = UtilTimeFormat(self.time) -- in case we dont have love.graphics loaded, for future module specific disabling local name = 'NONE' local version = 'NONE' local vendor = 'NONE' local device = 'NONE' if love.graphics then name, version, vendor, device = love.graphics.getRendererInfo() end local md = '\n\n### Info\n' .. '**' .. tostring(self.totals[1] + self.totals[2] + self.totals[3]) .. '** tests were completed in **' .. finaltime .. 's** with **' .. tostring(self.totals[1]) .. '** passed, **' .. tostring(self.totals[2]) .. '** failed, and **' .. tostring(self.totals[3]) .. '** skipped\n\n' .. 'Renderer: ' .. name .. ' | ' .. version .. ' | ' .. vendor .. ' | ' .. device .. '\n\n' .. '### Report\n' .. '| Module | Pass | Fail | Skip | Time |\n' .. '| --------------------- | ------ | ------ | ------- | ------ |\n' .. self.mdrows .. '\n### Failures\n' .. self.mdfailures local xml = '\n' local status = '
' if self.totals[2] == 0 then status = '
' end local html = [[ ]] local wrap_cls = '' if self.totals[2] > 0 then wrap_cls = 'fail' end html = html .. '

' .. status .. ' love.test report

' .. '

Renderer: ' .. name .. ' | ' .. version .. ' | ' .. vendor .. ' | ' .. device .. '

' .. '
    ' html = html .. '
  • ' .. tostring(self.totals[1]) .. ' Passed
  • ' .. '
  • ' .. tostring(self.totals[2]) .. ' Failed
  • ' .. '
  • ' .. tostring(self.totals[3]) .. ' Skipped
  • ' .. '
  • ' .. finaltime .. 's


' love.filesystem.write('tempoutput/' .. self.output .. '.xml', xml .. self.xml .. '') love.filesystem.write('tempoutput/' .. self.output .. '.html', html .. self.html .. '
') love.filesystem.write('tempoutput/' .. self.output .. '.md', md) self.module:log('grey', '\nFINISHED - ' .. finaltime .. 's\n') local failedcol = '\27[31m' if self.totals[2] == 0 then failedcol = '\27[37m' end self.module:log('green', tostring(self.totals[1]) .. ' PASSED' .. ' || ' .. failedcol .. tostring(self.totals[2]) .. ' FAILED || \27[37m' .. tostring(self.totals[3]) .. ' SKIPPED') end } ================================================ FILE: testing/conf.lua ================================================ function love.conf(t) print("love.conf") t.console = true t.window.name = 'love.test' t.window.width = 360 t.window.height = 240 t.window.resizable = true t.window.depth = true t.window.stencil = true t.window.usedpiscale = false end -- custom crash message here to catch anything that might occur with modules -- loading before we hit main.lua local function error_printer(msg, layer) print((debug.traceback("Error: " .. tostring(msg), 1+(layer or 1)):gsub("\n[^\n]+$", ""))) end function love.errorhandler(msg) msg = tostring(msg) error_printer(msg, 2) end ================================================ FILE: testing/examples/lovetest_runAllTests.html ================================================

🔴 love.test

  • 🟢 343 Tests
  • 🔴 2 Failures
  • 🟡 10 Skipped
  • 14.567s


🟢 love.audio

  • 🟢 31 Tests
  • 🔴 0 Failures
  • 🟡 0 Skipped
  • 1.328s


    • MethodTimeDetails
      🟢RecordingDevice0.816s
      🟢Source0.021s
      🟢getActiveEffects0.018s
      🟢getActiveSourceCount0.018s
      🟢getDistanceModel0.017s
      🟢getDopplerScale0.017s
      🟢getEffect0.016s
      🟢getMaxSceneEffects0.017s
      🟢getMaxSourceEffects0.017s
      🟢getOrientation0.017s
      🟢getPlaybackDevice0.017s
      🟢getPlaybackDevices0.017s
      🟢getPosition0.017s
      🟢getRecordingDevices0.017s
      🟢getVelocity0.017s
      🟢getVolume0.017s
      🟢isEffectsSupported0.017s
      🟢newQueueableSource0.017s
      🟢newSource0.018s
      🟢pause0.018s
      🟢play0.018s
      🟢setDistanceModel0.017s
      🟢setDopplerScale0.017s
      🟢setEffect0.017s
      🟢setMixWithSystem0.017s
      🟢setOrientation0.017s
      🟢setPlaybackDevice0.017s
      🟢setPosition0.017s
      🟢setVelocity0.017s
      🟢setVolume0.017s
      🟢stop0.018s

      🟢 love.data

      • 🟢 12 Tests
      • 🔴 0 Failures
      • 🟡 0 Skipped
      • 0.197s


        • MethodTimeDetails
          🟢ByteData0.017s
          🟢CompressedData0.017s
          🟢compress0.016s
          🟢decode0.017s
          🟢decompress0.013s
          🟢encode0.017s
          🟢getPackedSize0.015s
          🟢hash0.019s
          🟢newByteData0.017s
          🟢newDataView0.017s
          🟢pack0.017s
          🟢unpack0.018s

          🟢 love.event

          • 🟢 4 Tests
          • 🔴 0 Failures
          • 🟡 2 Skipped
          • 0.100s


            • MethodTimeDetails
              🟢clear0.017s
              🟢poll0.017s
              🟡pump0.016sused internally
              🟢push0.017s
              🟢quit0.016s
              🟡wait0.018sused internally

              🟢 love.filesystem

              • 🟢 33 Tests
              • 🔴 0 Failures
              • 🟡 2 Skipped
              • 0.601s


                • MethodTimeDetails
                  🟢File0.018s
                  🟢FileData0.017s
                  🟢append0.019s
                  🟢areSymlinksEnabled0.017s
                  🟢createDirectory0.018s
                  🟢getAppdataDirectory0.017s
                  🟢getCRequirePath0.016s
                  🟢getDirectoryItems0.019s
                  🟢getFullCommonPath0.017s
                  🟢getIdentity0.017s
                  🟢getInfo0.019s
                  🟢getRealDirectory0.018s
                  🟢getRequirePath0.016s
                  🟢getSaveDirectory0.017s
                  🟡getSource0.018sused internally
                  🟢getSourceBaseDirectory0.017s
                  🟢getUserDirectory0.016s
                  🟢getWorkingDirectory0.018s
                  🟢isFused0.018s
                  🟢lines0.017s
                  🟢load0.018s
                  🟢mount0.017s
                  🟢mountCommonPath0.017s
                  🟢mountFullPath0.017s
                  🟢newFileData0.016s
                  🟢openFile0.017s
                  🟢read0.017s
                  🟢remove0.019s
                  🟢setCRequirePath0.017s
                  🟢setIdentity0.016s
                  🟢setRequirePath0.017s
                  🟡setSource0.016sused internally
                  🟢unmount0.018s
                  🟢unmountFullPath0.016s
                  🟢write0.018s

                  🟢 love.font

                  • 🟢 7 Tests
                  • 🔴 0 Failures
                  • 🟡 0 Skipped
                  • 0.116s


                    • MethodTimeDetails
                      🟢GlyphData0.016s
                      🟢Rasterizer0.018s
                      🟢newBMFontRasterizer0.016s
                      🟢newGlyphData0.016s
                      🟢newImageRasterizer0.017s
                      🟢newRasterizer0.017s
                      🟢newTrueTypeRasterizer0.016s

                      🔴 love.graphics

                      • 🟢 104 Tests
                      • 🔴 1 Failures
                      • 🟡 2 Skipped
                      • 3.463s


                        • MethodTimeDetails
                          🟢Buffer0.017s
                          🟢Canvas0.086s

                          Expected

                          Actual

                          Expected

                          Actual

                          🟢Font0.021s

                          Expected

                          Actual

                          Expected

                          Actual

                          🟢Image0.041s

                          Expected

                          Actual

                          🟢Mesh0.018s
                          🟢ParticleSystem0.040s

                          Expected

                          Actual

                          🟢Quad0.025s

                          Expected

                          Actual

                          🔴Shader0.028sassert 4 [check shader valid] expected '' got 'vertex shader: pixel shader: '

                          Expected

                          Actual

                          🟡ShaderStorageBuffer0.017sGLSL 4 and shader storage buffers are not supported on this system
                          🟢SpriteBatch0.085s

                          Expected

                          Actual

                          Expected

                          Actual

                          Expected

                          Actual

                          🟢Text0.026s

                          Expected

                          Actual

                          🟢Video0.885s

                          Expected

                          Actual

                          🟢applyTransform0.034s

                          Expected

                          Actual

                          🟢arc0.021s

                          Expected

                          Actual

                          Expected

                          Actual

                          Expected

                          Actual

                          🟢captureScreenshot0.349s
                          🟢circle0.018s

                          Expected

                          Actual

                          🟢clear0.018s

                          Expected

                          Actual

                          🟡discard0.017scant test this worked
                          🟢draw0.032s

                          Expected

                          Actual

                          🟢drawInstanced0.034s

                          Expected

                          Actual

                          🟢drawLayer0.031s

                          Expected

                          Actual

                          🟢ellipse0.019s

                          Expected

                          Actual

                          🟢flushBatch0.018s
                          🟢getBackgroundColor0.017s
                          🟢getBlendMode0.017s
                          🟢getCanvas0.017s
                          🟢getColor0.017s
                          🟢getColorMask0.017s
                          🟢getDPIScale0.016s
                          🟢getDefaultFilter0.016s
                          🟢getDepthMode0.016s
                          🟢getDimensions0.017s
                          🟢getFont0.017s
                          🟢getFrontFaceWinding0.017s
                          🟢getHeight0.016s
                          🟢getLineJoin0.017s
                          🟢getLineStyle0.017s
                          🟢getLineWidth0.017s
                          🟢getMeshCullMode0.017s
                          🟢getPixelDimensions0.017s
                          🟢getPixelHeight0.018s
                          🟢getPixelWidth0.016s
                          🟢getPointSize0.017s
                          🟢getRendererInfo0.016s
                          🟢getScissor0.017s
                          🟢getShader0.016s
                          🟢getStackDepth0.018s
                          🟢getStats0.017s
                          🟢getStencilState0.017s
                          🟢getSupported0.017s
                          🟢getSystemLimits0.017s
                          🟢getTextureFormats0.017s
                          🟢getTextureTypes0.017s
                          🟢getWidth0.017s
                          🟢intersectScissor0.018s

                          Expected

                          Actual

                          🟢inverseTransformPoint0.017s
                          🟢isActive0.017s
                          🟢isGammaCorrect0.017s
                          🟢isWireframe0.017s
                          🟢line0.018s

                          Expected

                          Actual

                          🟢newArrayImage0.018s
                          🟢newCanvas0.017s
                          🟢newCubeImage0.020s
                          🟢newFont0.018s
                          🟢newImage0.016s
                          🟢newImageFont0.018s
                          🟢newMesh0.017s
                          🟢newParticleSystem0.017s
                          🟢newQuad0.017s
                          🟢newShader0.028s
                          🟢newSpriteBatch0.017s
                          🟢newTextBatch0.018s
                          🟢newVideo0.021s
                          🟢newVolumeImage0.018s
                          🟢origin0.019s

                          Expected

                          Actual

                          🟢points0.022s

                          Expected

                          Actual

                          🟢polygon0.017s

                          Expected

                          Actual

                          🟢pop0.017s

                          Expected

                          Actual

                          🟢print0.028s

                          Expected

                          Actual

                          🟢printf0.020s

                          Expected

                          Actual

                          🟢push0.019s

                          Expected

                          Actual

                          🟢rectangle0.024s

                          Expected

                          Actual

                          Expected

                          Actual

                          🟢replaceTransform0.020s

                          Expected

                          Actual

                          🟢reset0.017s
                          🟢rotate0.035s

                          Expected

                          Actual

                          🟢scale0.019s

                          Expected

                          Actual

                          🟢setBackgroundColor0.017s
                          🟢setBlendMode0.038s

                          Expected

                          Actual

                          🟢setCanvas0.018s

                          Expected

                          Actual

                          🟢setColor0.020s

                          Expected

                          Actual

                          🟢setColorMask0.028s

                          Expected

                          Actual

                          🟢setDefaultFilter0.017s
                          🟢setDepthMode0.017s
                          🟢setFont0.020s

                          Expected

                          Actual

                          🟢setFrontFaceWinding0.017s
                          🟢setLineJoin0.033s

                          Expected

                          Actual

                          🟢setLineStyle0.019s

                          Expected

                          Actual

                          🟢setLineWidth0.019s

                          Expected

                          Actual

                          🟢setMeshCullMode0.018s
                          🟢setScissor0.019s

                          Expected

                          Actual

                          🟢setShader0.031s

                          Expected

                          Actual

                          🟢setStencilState0.018s

                          Expected

                          Actual

                          🟢setWireframe0.018s

                          Expected

                          Actual

                          🟢shear0.020s

                          Expected

                          Actual

                          Expected

                          Actual

                          🟢transformPoint0.017s
                          🟢translate0.018s

                          Expected

                          Actual

                          🟢validateShader0.026s

                          🟢 love.image

                          • 🟢 5 Tests
                          • 🔴 0 Failures
                          • 🟡 0 Skipped
                          • 0.093s


                            • MethodTimeDetails
                              🟢CompressedImageData0.017s
                              🟢ImageData0.026s
                              🟢isCompressed0.017s
                              🟢newCompressedData0.017s
                              🟢newImageData0.017s

                              🟢 love.joystick

                              • 🟢 6 Tests
                              • 🔴 0 Failures
                              • 🟡 0 Skipped
                              • 0.116s


                                • MethodTimeDetails
                                  🟢getGamepadMappingString0.017s
                                  🟢getJoystickCount0.017s
                                  🟢getJoysticks0.017s
                                  🟢loadGamepadMappings0.023s
                                  🟢saveGamepadMappings0.024s
                                  🟢setGamepadMapping0.018s

                                  🟢 love.keyboard

                                  • 🟢 10 Tests
                                  • 🔴 0 Failures
                                  • 🟡 0 Skipped
                                  • 0.170s


                                    • MethodTimeDetails
                                      🟢getKeyFromScancode0.016s
                                      🟢getScancodeFromKey0.018s
                                      🟢hasKeyRepeat0.018s
                                      🟢hasScreenKeyboard0.017s
                                      🟢hasTextInput0.017s
                                      🟢isDown0.017s
                                      🟢isModifierActive0.017s
                                      🟢isScancodeDown0.018s
                                      🟢setKeyRepeat0.018s
                                      🟢setTextInput0.017s

                                      🟢 love.love

                                      • 🟢 6 Tests
                                      • 🔴 0 Failures
                                      • 🟡 0 Skipped
                                      • 0.100s


                                        • MethodTimeDetails
                                          🟢errhand0.017s
                                          🟢getVersion0.016s
                                          🟢hasDeprecationOutput0.017s
                                          🟢isVersionCompatible0.017s
                                          🟢run0.017s
                                          🟢setDeprecationOutput0.017s

                                          🟢 love.math

                                          • 🟢 20 Tests
                                          • 🔴 0 Failures
                                          • 🟡 0 Skipped
                                          • 0.334s


                                            • MethodTimeDetails
                                              🟢BezierCurve0.017s
                                              🟢RandomGenerator0.016s
                                              🟢Transform0.016s
                                              🟢colorFromBytes0.017s
                                              🟢colorToBytes0.016s
                                              🟢gammaToLinear0.017s
                                              🟢getRandomSeed0.018s
                                              🟢getRandomState0.016s
                                              🟢isConvex0.017s
                                              🟢linearToGamma0.017s
                                              🟢newBezierCurve0.016s
                                              🟢newRandomGenerator0.017s
                                              🟢newTransform0.016s
                                              🟢perlinNoise0.017s
                                              🟢random0.017s
                                              🟢randomNormal0.017s
                                              🟢setRandomSeed0.017s
                                              🟢setRandomState0.017s
                                              🟢simplexNoise0.017s
                                              🟢triangulate0.017s

                                              🔴 love.mouse

                                              • 🟢 17 Tests
                                              • 🔴 1 Failures
                                              • 🟡 0 Skipped
                                              • 0.301s


                                                • MethodTimeDetails
                                                  🟢getCursor0.016s
                                                  🟢getPosition0.017s
                                                  🟢getRelativeMode0.016s
                                                  🟢getSystemCursor0.017s
                                                  🟢getX0.017s
                                                  🟢getY0.016s
                                                  🟢isCursorSupported0.017s
                                                  🟢isDown0.016s
                                                  🟢isGrabbed0.017s
                                                  🟢isVisible0.017s
                                                  🟢newCursor0.016s
                                                  🟢setCursor0.017s
                                                  🔴setGrabbed0.016sassert 2 [check now grabbed] expected 'true' got 'false'
                                                  🟢setPosition0.018s
                                                  🟢setRelativeMode0.017s
                                                  🟢setVisible0.018s
                                                  🟢setX0.018s
                                                  🟢setY0.017s

                                                  🟢 love.physics

                                                  • 🟢 26 Tests
                                                  • 🔴 0 Failures
                                                  • 🟡 0 Skipped
                                                  • 0.435s


                                                    • MethodTimeDetails
                                                      🟢Body0.017s
                                                      🟢Contact0.018s
                                                      🟢Joint0.017s
                                                      🟢Shape0.017s
                                                      🟢World0.016s
                                                      🟢getDistance0.017s
                                                      🟢getMeter0.017s
                                                      🟢newBody0.017s
                                                      🟢newChainShape0.013s
                                                      🟢newCircleShape0.017s
                                                      🟢newDistanceJoint0.017s
                                                      🟢newEdgeShape0.017s
                                                      🟢newFrictionJoint0.017s
                                                      🟢newGearJoint0.018s
                                                      🟢newMotorJoint0.017s
                                                      🟢newMouseJoint0.016s
                                                      🟢newPolygonShape0.017s
                                                      🟢newPrismaticJoint0.017s
                                                      🟢newPulleyJoint0.016s
                                                      🟢newRectangleShape0.018s
                                                      🟢newRevoluteJoint0.017s
                                                      🟢newRopeJoint0.017s
                                                      🟢newWeldJoint0.017s
                                                      🟢newWheelJoint0.018s
                                                      🟢newWorld0.018s
                                                      🟢setMeter0.016s

                                                      🟢 love.sensor

                                                      • 🟢 1 Tests
                                                      • 🔴 0 Failures
                                                      • 🟡 0 Skipped
                                                      • 0.017s


                                                        • MethodTimeDetails
                                                          🟢hasSensor0.017s

                                                          🟢 love.sound

                                                          • 🟢 4 Tests
                                                          • 🔴 0 Failures
                                                          • 🟡 0 Skipped
                                                          • 0.075s


                                                            • MethodTimeDetails
                                                              🟢Decoder0.018s
                                                              🟢SoundData0.022s
                                                              🟢newDecoder0.017s
                                                              🟢newSoundData0.019s

                                                              🟢 love.system

                                                              • 🟢 7 Tests
                                                              • 🔴 0 Failures
                                                              • 🟡 2 Skipped
                                                              • 0.150s


                                                                • MethodTimeDetails
                                                                  🟢getClipboardText0.016s
                                                                  🟢getOS0.017s
                                                                  🟢getPowerInfo0.017s
                                                                  🟢getPreferredLocales0.017s
                                                                  🟢getProcessorCount0.016s
                                                                  🟢hasBackgroundMusic0.017s
                                                                  🟡openURL0.017scant test this worked
                                                                  🟢setClipboardText0.016s
                                                                  🟡vibrate0.016scant test this worked

                                                                  🟢 love.thread

                                                                  • 🟢 5 Tests
                                                                  • 🔴 0 Failures
                                                                  • 🟡 0 Skipped
                                                                  • 0.306s


                                                                    • MethodTimeDetails
                                                                      🟢Channel0.231s
                                                                      🟢Thread0.024s
                                                                      🟢getChannel0.018s
                                                                      🟢newChannel0.017s
                                                                      🟢newThread0.015s

                                                                      🟢 love.timer

                                                                      • 🟢 6 Tests
                                                                      • 🔴 0 Failures
                                                                      • 🟡 0 Skipped
                                                                      • 0.298s


                                                                        • MethodTimeDetails
                                                                          🟢getAverageDelta0.017s
                                                                          🟢getDelta0.016s
                                                                          🟢getFPS0.015s
                                                                          🟢getTime0.118s
                                                                          🟢sleep0.117s
                                                                          🟢step0.016s

                                                                          🟢 love.touch

                                                                          • 🟢 3 Tests
                                                                          • 🔴 0 Failures
                                                                          • 🟡 0 Skipped
                                                                          • 0.051s


                                                                            • MethodTimeDetails
                                                                              🟢getPosition0.017s
                                                                              🟢getPressure0.018s
                                                                              🟢getTouches0.017s

                                                                              🟢 love.video

                                                                              • 🟢 2 Tests
                                                                              • 🔴 0 Failures
                                                                              • 🟡 0 Skipped
                                                                              • 0.038s


                                                                                • MethodTimeDetails
                                                                                  🟢VideoStream0.018s
                                                                                  🟢newVideoStream0.020s

                                                                                  🟢 love.window

                                                                                  • 🟢 34 Tests
                                                                                  • 🔴 0 Failures
                                                                                  • 🟡 2 Skipped
                                                                                  • 6.275s


                                                                                    • MethodTimeDetails
                                                                                      🟢focus0.017s
                                                                                      🟢fromPixels0.017s
                                                                                      🟢getDPIScale0.017s
                                                                                      🟢getDesktopDimensions0.016s
                                                                                      🟢getDisplayCount0.016s
                                                                                      🟢getDisplayName0.016s
                                                                                      🟢getDisplayOrientation0.016s
                                                                                      🟢getFullscreen1.351s
                                                                                      🟢getFullscreenModes0.013s
                                                                                      🟢getIcon0.019s
                                                                                      🟢getMode0.017s
                                                                                      🟢getPosition0.017s
                                                                                      🟢getSafeArea0.017s
                                                                                      🟢getTitle0.018s
                                                                                      🟢getVSync0.016s
                                                                                      🟢hasFocus0.017s
                                                                                      🟢hasMouseFocus0.017s
                                                                                      🟢isDisplaySleepEnabled0.016s
                                                                                      🟢isMaximized0.186s
                                                                                      🟢isMinimized0.816s
                                                                                      🟢isOpen0.014s
                                                                                      🟢isVisible0.017s
                                                                                      🟢maximize0.186s
                                                                                      🟢minimize0.807s
                                                                                      🟡requestAttention0.016scant test this worked
                                                                                      🟢restore0.966s
                                                                                      🟢setDisplaySleepEnabled0.018s
                                                                                      🟢setFullscreen1.356s
                                                                                      🟢setIcon0.015s
                                                                                      🟢setMode0.020s
                                                                                      🟢setPosition0.183s
                                                                                      🟢setTitle0.018s
                                                                                      🟢setVSync0.015s
                                                                                      🟡showMessageBox0.002scant test this worked
                                                                                      🟢toPixels0.002s
                                                                                      🟢updateMode0.010s
================================================ FILE: testing/examples/lovetest_runAllTests.md ================================================ ### Info **355** tests were completed in **14.567s** with **343** passed, **2** failed, and **10** skipped Renderer: OpenGL | 4.1 Metal - 76.3 | Apple | Apple M1 Max ### Report | Module | Pass | Fail | Skip | Time | | --------------------- | ------ | ------ | ------- | ------ | | 🟢 audio | 31 | 0 | 0 | 1.328s | | 🟢 data | 12 | 0 | 0 | 0.197s | | 🟢 event | 4 | 0 | 2 | 0.100s | | 🟢 filesystem | 33 | 0 | 2 | 0.601s | | 🟢 font | 7 | 0 | 0 | 0.116s | | 🔴 graphics | 104 | 1 | 2 | 3.463s | | 🟢 image | 5 | 0 | 0 | 0.093s | | 🟢 joystick | 6 | 0 | 0 | 0.116s | | 🟢 keyboard | 10 | 0 | 0 | 0.170s | | 🟢 love | 6 | 0 | 0 | 0.100s | | 🟢 math | 20 | 0 | 0 | 0.334s | | 🔴 mouse | 17 | 1 | 0 | 0.301s | | 🟢 physics | 26 | 0 | 0 | 0.435s | | 🟢 sensor | 1 | 0 | 0 | 0.017s | | 🟢 sound | 4 | 0 | 0 | 0.075s | | 🟢 system | 7 | 0 | 2 | 0.150s | | 🟢 thread | 5 | 0 | 0 | 0.306s | | 🟢 timer | 6 | 0 | 0 | 0.298s | | 🟢 touch | 3 | 0 | 0 | 0.051s | | 🟢 video | 2 | 0 | 0 | 0.038s | | 🟢 window | 34 | 0 | 2 | 6.275s | ### Failures > 🔴 Shader > assert 4 [check shader valid] expected '' got 'vertex shader: pixel shader: ' > 🔴 setGrabbed > assert 2 [check now grabbed] expected 'true' got 'false' ================================================ FILE: testing/examples/lovetest_runAllTests.xml ================================================ assert 4 [check shader valid] expected '' got 'vertex shader: pixel shader: ' assert 2 [check now grabbed] expected 'true' got 'false' ================================================ FILE: testing/main.lua ================================================ -- load test objs require('classes.TestSuite') require('classes.TestModule') require('classes.TestMethod') -- create testsuite obj love.test = TestSuite:new() -- load test scripts if module is active -- this is so in future if we have per-module disabling it'll still run if love ~= nil then require('tests.love') end if love.audio ~= nil then require('tests.audio') end if love.data ~= nil then require('tests.data') end if love.event ~= nil then require('tests.event') end if love.filesystem ~= nil then require('tests.filesystem') end if love.font ~= nil then require('tests.font') end if love.graphics ~= nil then require('tests.graphics') end if love.image ~= nil then require('tests.image') end if love.joystick ~= nil then require('tests.joystick') end if love.keyboard ~= nil then require('tests.keyboard') end if love.math ~= nil then require('tests.math') end if love.mouse ~= nil then require('tests.mouse') end if love.physics ~= nil then require('tests.physics') end if love.sensor ~= nil then require('tests.sensor') end if love.sound ~= nil then require('tests.sound') end if love.system ~= nil then require('tests.system') end if love.thread ~= nil then require('tests.thread') end if love.timer ~= nil then require('tests.timer') end if love.touch ~= nil then require('tests.touch') end if love.video ~= nil then require('tests.video') end if love.window ~= nil then require('tests.window') end -- love.load -- load given arguments and run the test suite love.load = function(args) -- setup basic img to display if love.window ~= nil then love.window.updateMode(360, 240, { fullscreen = false, resizable = true, centered = true }) -- set up some graphics to draw if enabled if love.graphics ~= nil then love.graphics.setDefaultFilter("nearest", "nearest") love.graphics.setLineStyle('rough') love.graphics.setLineWidth(1) Logo = { texture = love.graphics.newImage('resources/love.png'), img = nil } Logo.img = love.graphics.newQuad(0, 0, 64, 64, Logo.texture) Font = love.graphics.newFont('resources/font.ttf', 8, 'normal') TextCommand = 'Loading...' TextRun = '' end end -- mount for output later if love.filesystem.mountFullPath then love.filesystem.mountFullPath(love.filesystem.getSource() .. "/output", "tempoutput", "readwrite") end -- get all args with any comma lists split out as seperate local arglist = {} for a=1,#args do local splits = UtilStringSplit(args[a], '([^,]+)') for s=1,#splits do table.insert(arglist, splits[s]) end end -- convert args to the cmd to run, modules, method (if any) and disabled local testcmd = '--all' local module = '' local method = '' local cmderr = 'Invalid flag used' local modules = { 'audio', 'data', 'event', 'filesystem', 'font', 'graphics', 'image', 'joystick', 'keyboard', 'love', 'math', 'mouse', 'physics', 'sensor', 'sound', 'system', 'thread', 'timer', 'touch', 'video', 'window' } GITHUB_RUNNER = false for a=1,#arglist do if testcmd == '--method' then if module == '' and (arglist[a] == 'love' or love[ arglist[a] ] ~= nil) then module = arglist[a] table.insert(modules, module) elseif module ~= '' and love[module] ~= nil and method == '' then if love.test[module][arglist[a]] ~= nil then method = arglist[a] end end end if testcmd == '--modules' then if (arglist[a] == 'love' or love[ arglist[a] ] ~= nil) and arglist[a] ~= '--isRunner' then table.insert(modules, arglist[a]) end end if arglist[a] == '--method' then testcmd = arglist[a] modules = {} end if arglist[a] == '--modules' then testcmd = arglist[a] modules = {} end if arglist[a] == '--isRunner' then GITHUB_RUNNER = true end end -- method uses the module + method given if testcmd == '--method' then local testmodule = TestModule:new(module, method) table.insert(love.test.modules, testmodule) if module ~= '' and method ~= '' then love.test.module = testmodule love.test.module:log('grey', '--method "' .. module .. '" "' .. method .. '"') love.test.output = 'lovetest_method_' .. module .. '_' .. method else if method == '' then cmderr = 'No valid method specified' end if module == '' then cmderr = 'No valid module specified' end end end -- modules runs all methods for all the modules given if testcmd == '--modules' then local modulelist = {} for m=1,#modules do local testmodule = TestModule:new(modules[m]) table.insert(love.test.modules, testmodule) table.insert(modulelist, modules[m]) end if #modulelist > 0 then love.test.module = love.test.modules[1] love.test.module:log('grey', '--modules "' .. table.concat(modulelist, '" "') .. '"') love.test.output = 'lovetest_modules_' .. table.concat(modulelist, '_') else cmderr = 'No modules specified' end end -- otherwise default runs all methods for all modules if arglist[1] == nil or arglist[1] == '' or arglist[1] == '--all' then for m=1,#modules do local testmodule = TestModule:new(modules[m]) table.insert(love.test.modules, testmodule) end love.test.module = love.test.modules[1] love.test.module:log('grey', '--all') love.test.output = 'lovetest_all' end if GITHUB_RUNNER then love.test.module:log('grey', '--isRunner') end -- invalid command if love.test.module == nil then print(cmderr) love.event.quit(0) else -- start first module TextCommand = testcmd love.test.module:runTests() end end -- love.update -- run test suite logic love.update = function(delta) love.test:runSuite(delta) end -- love.draw -- draw a little logo to the screen love.draw = function() local lw = (love.graphics.getWidth() - 128) / 2 local lh = (love.graphics.getHeight() - 128) / 2 love.graphics.draw(Logo.texture, Logo.img, lw, lh, 0, 2, 2) love.graphics.setFont(Font) love.graphics.print(TextCommand, 4, 12, 0, 2, 2) love.graphics.print(TextRun, 4, 32, 0, 2, 2) end -- love.quit -- add a hook to allow test modules to fake quit love.quit = function() if love.test.module ~= nil and love.test.module.fakequit then return true else return false end end -- added so bad threads dont fail function love.threaderror(thread, errorstr) end -- string split helper function UtilStringSplit(str, splitter) local splits = {} for word in string.gmatch(str, splitter) do table.insert(splits, word) end return splits end -- string time formatter function UtilTimeFormat(seconds) return string.format("%.3f", tostring(seconds)) end ================================================ FILE: testing/output/actual/notes.txt ================================================ # Actual Graphics Output The images generated by the tests ================================================ FILE: testing/output/difference/notes.txt ================================================ # Graphic Differences If a graphics test fails then a "difference" image will be created to highlight the differences between the actual + expected image, for use in the HTML report ================================================ FILE: testing/output/expected/notes.txt ================================================ # Expected Graphics Output The images expected by the tests ================================================ FILE: testing/output/notes.txt ================================================ # Testing Output Any tests run will output an XML, MD, and HTML file here, assuming the tests are run with readwrite permissions for this repo ================================================ FILE: testing/readme.md ================================================ # Lövetest Test suite for the [Löve](https://github.com/love2d/love) APIs, based off of [this issue](https://github.com/love2d/love/issues/1745). Currently written for [Löve 12](https://github.com/love2d/love/tree/12.0-development), which is still in development. As such the test suite may fail if you try to run it with an older version of Löve due to it trying to call methods that don't exist. While the test suite is part of the main Löve repo, the test suite has it's own repo [here](https://github.com/ellraiser/love-test) so that it can be used with other builds like [love-potion](https://github.com/lovebrew/lovepotion). If you would like to contribute to the test suite please raise a PR on the [love-test](https://github.com/ellraiser/love-test) repo. --- ## Features - [x] Simple pass/fail tests written in Lua with minimal setup - [x] Ability to run all tests with a simple command - [x] Ability to see how many tests are passing/failing - [x] Ability to run a subset of tests - [x] Ability to easily run an individual test - [x] Ability to see all visual results at a glance - [x] Compare graphics test output with an expected output - [x] Automatic testing that happens after every commit - [x] No platform-specific dependencies / scripts --- ## Coverage This is the status of all module tests. See the **Todo** section for outstanding tasks if you want to contribute! | Module | Done | Skip | Modules | Done | Skip | | ----------------- | ---- | ---- | ---------------- | ---- | ---- | | 🟢 audio | 31 | 0 | 🟢 mouse | 18 | 0 | | 🟢 data | 12 | 0 | 🟢 physics | 26 | 0 | | 🟢 event | 4 | 2 | 🟢 sensor | 1 | 0 | | 🟢 filesystem | 33 | 2 | 🟢 sound | 4 | 0 | | 🟢 font | 7 | 0 | 🟢 system | 7 | 2 | | 🟢 graphics | 105 | 1 | 🟢 thread | 5 | 0 | | 🟢 image | 5 | 0 | 🟢 timer | 6 | 0 | | 🟢 joystick | 6 | 0 | 🟢 touch | 3 | 0 | | 🟢 keyboard | 10 | 0 | 🟢 video | 2 | 0 | | 🟢 love | 6 | 0 | 🟢 window | 34 | 2 | | 🟢 math | 20 | 0 | > The following modules are covered but at a basic level as we can't emulate hardware input nicely for all platforms + virtual runners: > `joystick`, `keyboard`, `mouse`, `sensor` and `touch` --- ## Running Tests The testsuite aims to keep things as simple as possible, and just runs all the tests inside Löve to match how they'd be used by developers in-engine. To run the tests, download the repo and then run the main.lua as you would a Löve game, i.e: WINDOWS: `& 'c:\Program Files\LOVE\love.exe' PATH_TO_TESTING_FOLDER/main.lua --console` MACOS: `/Applications/love.app/Contents/MacOS/love PATH_TO_TESTING_FOLDER/main.lua` LINUX: `./love.AppImage PATH_TO_TESTING_FOLDER/main.lua` By default all tests will be run for all modules. If you want to specify a module/s you can use: `--modules filesystem,audio` If you want to specify only 1 specific method only you can use: `--method filesystem write` All results will be printed in the console per method as PASS, FAIL, or SKIP with total assertions met on a module level and overall level. When finished, the following files will be generated in the `/output` directory with a summary of the test results: - an `XML` file in the style of [JUnit XML](https://www.ibm.com/docs/en/developer-for-zos/14.1?topic=formats-junit-xml-format) - a `HTML` file that shows the report + any visual test results - a `Markdown` file you can use with [this github action](https://github.com/ellraiser/love-test-report) > An example of all types of output can be found in the `/examples` > The visual results of any graphic tests can be found in `/output/actual` --- ## Architecture Each method and object has it's own test method written in `/tests` under the matching module name. When you run the tests, a single TestSuite object is created which handles the progress + totals for all the tests. Each module has a TestModule object created, and each test method has a TestMethod object created which keeps track of assertions for that method. You can currently do the following assertions: - **assertNotNil**(value) - **assertEquals**(expected, actual, label) - **assertTrue**(value, label) - **assertFalse**(value, label) - **assertNotEquals**(expected, actual, label) - **assertRange**(actual, min, max, label) - **assertMatch**({option1, option2, option3 ...}, actual, label) - **assertGreaterEqual**(expected, actual, label) - **assertLessEqual**(expected, actual, label) - **assertObject**(table) - **assertCoords**(expected, actual, label) Example test method: ```lua -- love.filesystem.read test method -- all methods should be put under love.test.MODULE.METHOD, matching the API love.test.filesystem.read = function(test) -- setup any data needed then run any asserts using the passed test object local content, size = love.filesystem.read('resources/test.txt') test:assertNotNil(content) test:assertEquals('helloworld', content, 'check content match') test:assertEquals(10, size, 'check size match') content, size = love.filesystem.read('resources/test.txt', 5) test:assertNotNil(content) test:assertEquals('hello', content, 'check content match') test:assertEquals(5, size, 'check size match') -- no need to return anything or cleanup, GCC is called after each method end ``` Each test is run inside it's own coroutine - you can use `test:waitFrames(frames)` or `test:waitSeconds(seconds)` to pause the test for a small period if you need to check things that won't happen for a few frames/seconds. After each test method is ran, the assertions are totalled up, printed, and we move onto the next method! Once all methods in the suite are run a total pass/fail/skip is given for that module and we move onto the next module (if any) For sanity-checking, if it's currently not covered or it's not possible to test the method we can set the test to be skipped with `test:skipTest(reason)` - this way we still see the method listed in the test output without it affected the pass/fail totals --- ## Todo If you would like to contribute to the test suite please raise a PR with the main [love-test](https://github.com/ellraiser/love-test) repo. There is a list of outstanding methods that require test coverage in `todo.md`, expanding on any existing tests is also very welcome! --- ## Graphics Tolerance By default all graphic tests are run with pixel precision and 0 rgba tolerance. However there are a couple of methods that on some platforms require some slight tolerance to allow for tiny differences in rendering. | Test | OS | Exception | Reason | | -------------------------- | --------- | ------------------- | ------ | | love.graphics.drawInstanced | Windows | 1rgba tolerance | On Windows there's a couple pixels a tiny bit off, most likely due to complexity of the mesh drawn | | love.graphics.setBlendMode | Win/Lin | 1rgba tolerance | Blendmodes have some small varience on some machines | --- ## Runner Exceptions The automated tests through Github work for the most part however there are a few exceptions that have to be accounted for due to limitations of the VMs and the graphics emulation used. These exceptions are either skipped, or handled by using a 1px or 1/255rgba tolerance - when run locally on real hardware, these tests pass fine at the default 0 tolerance. You can specify the test suite is being run on a runner by adding the `--isRunner` flag in your workflow file, i.e.: `& 'c:\Program Files\LOVE\love.exe' PATH_TO_TESTING_FOLDER/main.lua --console --all --isRunner` | Test | OS | Exception | Reason | | -------------------------- | --------- | ------------------- | ------ | | love.graphics.setWireframe | MacOS | 1px tolerance | Wireframes are offset by 1,1 when drawn | | love.graphica.arc | MacOS | Skipped | Arc curves are drawn slightly off at really low scale | | love.graphics.setLineStyle | Linux | 1rgba tolerance | 'Rough' lines blend differently with the background rgba | | love.audio.RecordingDevice | All | Skipped | Recording devices can't be emulated on runners | ================================================ FILE: testing/resources/alsoft.conf ================================================ # OpenAL config file. # # Option blocks may appear multiple times, and duplicated options will take the # last value specified. Environment variables may be specified within option # values, and are automatically substituted when the config file is loaded. # Environment variable names may only contain alpha-numeric characters (a-z, # A-Z, 0-9) and underscores (_), and are prefixed with $. For example, # specifying "$HOME/file.ext" would typically result in something like # "/home/user/file.ext". To specify an actual "$" character, use "$$". # # Device-specific values may be specified by including the device name in the # block name, with "general" replaced by the device name. That is, general # options for the device "Name of Device" would be in the [Name of Device] # block, while ALSA options would be in the [alsa/Name of Device] block. # Options marked as "(global)" are not influenced by the device. # # The system-wide settings can be put in /etc/openal/alsoft.conf and user- # specific override settings in $HOME/.alsoftrc. # For Windows, these settings should go into $AppData\alsoft.ini # # Option and block names are case-senstive. The supplied values are only hints # and may not be honored (though generally it'll try to get as close as # possible). Note: options that are left unset may default to app- or system- # specified values. These are the current available settings: ## ## General stuff ## [general] ## disable-cpu-exts: (global) # Disables use of specialized methods that use specific CPU intrinsics. # Certain methods may utilize CPU extensions for improved performance, and # this option is useful for preventing some or all of those methods from being # used. The available extensions are: sse, sse2, sse3, sse4.1, and neon. # Specifying 'all' disables use of all such specialized methods. #disable-cpu-exts = ## drivers: (global) # Sets the backend driver list order, comma-seperated. Unknown backends and # duplicated names are ignored. Unlisted backends won't be considered for use # unless the list is ended with a comma (e.g. 'oss,' will try OSS first before # other backends, while 'oss' will try OSS only). Backends prepended with - # won't be considered for use (e.g. '-oss,' will try all available backends # except OSS). An empty list means to try all backends. drivers = wave ## channels: # Sets the output channel configuration. If left unspecified, one will try to # be detected from the system, and defaulting to stereo. The available values # are: mono, stereo, quad, surround51, surround51rear, surround61, surround71, # ambi1, ambi2, ambi3. Note that the ambi* configurations provide ambisonic # channels of the given order (using ACN ordering and SN3D normalization by # default), which need to be decoded to play correctly on speakers. #channels = ## sample-type: # Sets the output sample type. Currently, all mixing is done with 32-bit float # and converted to the output sample type as needed. Available values are: # int8 - signed 8-bit int # uint8 - unsigned 8-bit int # int16 - signed 16-bit int # uint16 - unsigned 16-bit int # int32 - signed 32-bit int # uint32 - unsigned 32-bit int # float32 - 32-bit float #sample-type = float32 ## frequency: # Sets the output frequency. If left unspecified it will try to detect a # default from the system, otherwise it will default to 44100. #frequency = ## period_size: # Sets the update period size, in frames. This is the number of frames needed # for each mixing update. Acceptable values range between 64 and 8192. #period_size = 1024 ## periods: # Sets the number of update periods. Higher values create a larger mix ahead, # which helps protect against skips when the CPU is under load, but increases # the delay between a sound getting mixed and being heard. Acceptable values # range between 2 and 16. #periods = 3 ## stereo-mode: # Specifies if stereo output is treated as being headphones or speakers. With # headphones, HRTF or crossfeed filters may be used for better audio quality. # Valid settings are auto, speakers, and headphones. #stereo-mode = auto ## stereo-encoding: # Specifies the encoding method for non-HRTF stereo output. 'panpot' (default) # uses standard amplitude panning (aka pair-wise, stereo pair, etc) between # -30 and +30 degrees, while 'uhj' creates stereo-compatible two-channel UHJ # output, which encodes some surround sound information into stereo output # that can be decoded with a surround sound receiver. If crossfeed filters are # used, UHJ is disabled. #stereo-encoding = panpot ## ambi-format: # Specifies the channel order and normalization for the "ambi*" set of channel # configurations. Valid settings are: fuma, acn+sn3d, acn+n3d #ambi-format = acn+sn3d ## hrtf: # Controls HRTF processing. These filters provide better spatialization of # sounds while using headphones, but do require a bit more CPU power. The # default filters will only work with 44100hz or 48000hz stereo output. While # HRTF is used, the cf_level option is ignored. Setting this to auto (default) # will allow HRTF to be used when headphones are detected or the app requests # it, while setting true or false will forcefully enable or disable HRTF # respectively. #hrtf = auto ## default-hrtf: # Specifies the default HRTF to use. When multiple HRTFs are available, this # determines the preferred one to use if none are specifically requested. Note # that this is the enumerated HRTF name, not necessarily the filename. #default-hrtf = ## hrtf-paths: # Specifies a comma-separated list of paths containing HRTF data sets. The # format of the files are described in docs/hrtf.txt. The files within the # directories must have the .mhr file extension to be recognized. By default, # OS-dependent data paths will be used. They will also be used if the list # ends with a comma. On Windows this is: # $AppData\openal\hrtf # And on other systems, it's (in order): # $XDG_DATA_HOME/openal/hrtf (defaults to $HOME/.local/share/openal/hrtf) # $XDG_DATA_DIRS/openal/hrtf (defaults to /usr/local/share/openal/hrtf and # /usr/share/openal/hrtf) #hrtf-paths = ## cf_level: # Sets the crossfeed level for stereo output. Valid values are: # 0 - No crossfeed # 1 - Low crossfeed # 2 - Middle crossfeed # 3 - High crossfeed (virtual speakers are closer to itself) # 4 - Low easy crossfeed # 5 - Middle easy crossfeed # 6 - High easy crossfeed # Users of headphones may want to try various settings. Has no effect on non- # stereo modes. #cf_level = 0 ## resampler: (global) # Selects the resampler used when mixing sources. Valid values are: # point - nearest sample, no interpolation # linear - extrapolates samples using a linear slope between samples # cubic - extrapolates samples using a Catmull-Rom spline # bsinc12 - extrapolates samples using a band-limited Sinc filter (varying # between 12 and 24 points, with anti-aliasing) # bsinc24 - extrapolates samples using a band-limited Sinc filter (varying # between 24 and 48 points, with anti-aliasing) #resampler = linear ## rt-prio: (global) # Sets real-time priority for the mixing thread. Not all drivers may use this # (eg. PortAudio) as they already control the priority of the mixing thread. # 0 and negative values will disable it. Note that this may constitute a # security risk since a real-time priority thread can indefinitely block # normal-priority threads if it fails to wait. As such, the default is # disabled. #rt-prio = 0 ## sources: # Sets the maximum number of allocatable sources. Lower values may help for # systems with apps that try to play more sounds than the CPU can handle. #sources = 256 ## slots: # Sets the maximum number of Auxiliary Effect Slots an app can create. A slot # can use a non-negligible amount of CPU time if an effect is set on it even # if no sources are feeding it, so this may help when apps use more than the # system can handle. #slots = 64 ## sends: # Limits the number of auxiliary sends allowed per source. Setting this higher # than the default has no effect. #sends = 16 ## front-stablizer: # Applies filters to "stablize" front sound imaging. A psychoacoustic method # is used to generate a front-center channel signal from the front-left and # front-right channels, improving the front response by reducing the combing # artifacts and phase errors. Consequently, it will only work with channel # configurations that include front-left, front-right, and front-center. #front-stablizer = false ## output-limiter: # Applies a gain limiter on the final mixed output. This reduces the volume # when the output samples would otherwise clamp, avoiding excessive clipping # noise. #output-limiter = true ## dither: # Applies dithering on the final mix, for 8- and 16-bit output by default. # This replaces the distortion created by nearest-value quantization with low- # level whitenoise. #dither = true ## dither-depth: # Quantization bit-depth for dithered output. A value of 0 (or less) will # match the output sample depth. For int32, uint32, and float32 output, 0 will # disable dithering because they're at or beyond the rendered precision. The # maximum dither depth is 24. #dither-depth = 0 ## volume-adjust: # A global volume adjustment for source output, expressed in decibels. The # value is logarithmic, so +6 will be a scale of (approximately) 2x, +12 will # be a scale of 4x, etc. Similarly, -6 will be x1/2, and -12 is about x1/4. A # value of 0 means no change. #volume-adjust = 0 ## excludefx: (global) # Sets which effects to exclude, preventing apps from using them. This can # help for apps that try to use effects which are too CPU intensive for the # system to handle. Available effects are: eaxreverb,reverb,autowah,chorus, # compressor,distortion,echo,equalizer,flanger,modulator,dedicated,pshifter, # fshifter #excludefx = ## default-reverb: (global) # A reverb preset that applies by default to all sources on send 0 # (applications that set their own slots on send 0 will override this). # Available presets are: None, Generic, PaddedCell, Room, Bathroom, # Livingroom, Stoneroom, Auditorium, ConcertHall, Cave, Arena, Hangar, # CarpetedHallway, Hallway, StoneCorridor, Alley, Forest, City, Moutains, # Quarry, Plain, ParkingLot, SewerPipe, Underwater, Drugged, Dizzy, Psychotic. #default-reverb = ## trap-alc-error: (global) # Generates a SIGTRAP signal when an ALC device error is generated, on systems # that support it. This helps when debugging, while trying to find the cause # of a device error. On Windows, a breakpoint exception is generated. #trap-alc-error = false ## trap-al-error: (global) # Generates a SIGTRAP signal when an AL context error is generated, on systems # that support it. This helps when debugging, while trying to find the cause # of a context error. On Windows, a breakpoint exception is generated. #trap-al-error = false ## ## Ambisonic decoder stuff ## [decoder] ## hq-mode: # Enables a high-quality ambisonic decoder. This mode is capable of frequency- # dependent processing, creating a better reproduction of 3D sound rendering # over surround sound speakers. Enabling this also requires specifying decoder # configuration files for the appropriate speaker configuration you intend to # use (see the quad, surround51, etc options below). Currently, up to third- # order decoding is supported. hq-mode = false ## distance-comp: # Enables compensation for the speakers' relative distances to the listener. # This applies the necessary delays and attenuation to make the speakers # behave as though they are all equidistant, which is important for proper # playback of 3D sound rendering. Requires the proper distances to be # specified in the decoder configuration file. distance-comp = true ## nfc: # Enables near-field control filters. This simulates and compensates for low- # frequency effects caused by the curvature of nearby sound-waves, which # creates a more realistic perception of sound distance. Note that the effect # may be stronger or weaker than intended if the application doesn't use or # specify an appropriate unit scale, or if incorrect speaker distances are set # in the decoder configuration file. Requires hq-mode to be enabled. nfc = true ## nfc-ref-delay # Specifies the reference delay value for ambisonic output. When channels is # set to one of the ambi* formats, this option enables NFC-HOA output with the # specified Reference Delay parameter. The specified value can then be shared # with an appropriate NFC-HOA decoder to reproduce correct near-field effects. # Keep in mind that despite being designed for higher-order ambisonics, this # applies to first-order output all the same. When left unset, normal output # is created with no near-field simulation. nfc-ref-delay = ## quad: # Decoder configuration file for Quadraphonic channel output. See # docs/ambdec.txt for a description of the file format. quad = ## surround51: # Decoder configuration file for 5.1 Surround (Side and Rear) channel output. # See docs/ambdec.txt for a description of the file format. surround51 = ## surround61: # Decoder configuration file for 6.1 Surround channel output. See # docs/ambdec.txt for a description of the file format. surround61 = ## surround71: # Decoder configuration file for 7.1 Surround channel output. See # docs/ambdec.txt for a description of the file format. Note: This can be used # to enable 3D7.1 with the appropriate configuration and speaker placement, # see docs/3D7.1.txt. surround71 = ## ## Reverb effect stuff (includes EAX reverb) ## [reverb] ## boost: (global) # A global amplification for reverb output, expressed in decibels. The value # is logarithmic, so +6 will be a scale of (approximately) 2x, +12 will be a # scale of 4x, etc. Similarly, -6 will be about half, and -12 about 1/4th. A # value of 0 means no change. #boost = 0 ## ## PulseAudio backend stuff ## [pulse] ## spawn-server: (global) # Attempts to autospawn a PulseAudio server whenever needed (initializing the # backend, enumerating devices, etc). Setting autospawn to false in Pulse's # client.conf will still prevent autospawning even if this is set to true. #spawn-server = true ## allow-moves: (global) # Allows PulseAudio to move active streams to different devices. Note that the # device specifier (seen by applications) will not be updated when this # occurs, and neither will the AL device configuration (sample rate, format, # etc). #allow-moves = false ## fix-rate: # Specifies whether to match the playback stream's sample rate to the device's # sample rate. Enabling this forces OpenAL Soft to mix sources and effects # directly to the actual output rate, avoiding a second resample pass by the # PulseAudio server. #fix-rate = false ## ## ALSA backend stuff ## [alsa] ## device: (global) # Sets the device name for the default playback device. #device = default ## device-prefix: (global) # Sets the prefix used by the discovered (non-default) playback devices. This # will be appended with "CARD=c,DEV=d", where c is the card id and d is the # device index for the requested device name. #device-prefix = plughw: ## device-prefix-*: (global) # Card- and device-specific prefixes may be used to override the device-prefix # option. The option may specify the card id (eg, device-prefix-NVidia), or # the card id and device index (eg, device-prefix-NVidia-0). The card id is # case-sensitive. #device-prefix- = ## capture: (global) # Sets the device name for the default capture device. #capture = default ## capture-prefix: (global) # Sets the prefix used by the discovered (non-default) capture devices. This # will be appended with "CARD=c,DEV=d", where c is the card id and d is the # device number for the requested device name. #capture-prefix = plughw: ## capture-prefix-*: (global) # Card- and device-specific prefixes may be used to override the # capture-prefix option. The option may specify the card id (eg, # capture-prefix-NVidia), or the card id and device index (eg, # capture-prefix-NVidia-0). The card id is case-sensitive. #capture-prefix- = ## mmap: # Sets whether to try using mmap mode (helps reduce latencies and CPU # consumption). If mmap isn't available, it will automatically fall back to # non-mmap mode. True, yes, on, and non-0 values will attempt to use mmap. 0 # and anything else will force mmap off. #mmap = true ## allow-resampler: # Specifies whether to allow ALSA's built-in resampler. Enabling this will # allow the playback device to be set to a different sample rate than the # actual output, causing ALSA to apply its own resampling pass after OpenAL # Soft resamples and mixes the sources and effects for output. #allow-resampler = false ## ## OSS backend stuff ## [oss] ## device: (global) # Sets the device name for OSS output. #device = /dev/dsp ## capture: (global) # Sets the device name for OSS capture. #capture = /dev/dsp ## ## Solaris backend stuff ## [solaris] ## device: (global) # Sets the device name for Solaris output. #device = /dev/audio ## ## QSA backend stuff ## [qsa] ## ## JACK backend stuff ## [jack] ## spawn-server: (global) # Attempts to autospawn a JACK server whenever needed (initializing the # backend, opening devices, etc). #spawn-server = false ## buffer-size: # Sets the update buffer size, in samples, that the backend will keep buffered # to handle the server's real-time processing requests. This value must be a # power of 2, or else it will be rounded up to the next power of 2. If it is # less than JACK's buffer update size, it will be clamped. This option may # be useful in case the server's update size is too small and doesn't give the # mixer time to keep enough audio available for the processing requests. #buffer-size = 0 ## ## WASAPI backend stuff ## [wasapi] ## ## DirectSound backend stuff ## [dsound] ## ## Windows Multimedia backend stuff ## [winmm] ## ## PortAudio backend stuff ## [port] ## device: (global) # Sets the device index for output. Negative values will use the default as # given by PortAudio itself. #device = -1 ## capture: (global) # Sets the device index for capture. Negative values will use the default as # given by PortAudio itself. #capture = -1 ## ## Wave File Writer stuff ## [wave] ## file: (global) # Sets the filename of the wave file to write to. An empty name prevents the # backend from opening, even when explicitly requested. # THIS WILL OVERWRITE EXISTING FILES WITHOUT QUESTION! file = output.wav ## bformat: (global) # Creates AMB format files using first-order ambisonics instead of a standard # single- or multi-channel .wav file. #bformat = false ================================================ FILE: testing/resources/mappings.txt ================================================ 03000000300f00000a01000000000000,3 In 1 Conversion Box,a:b2,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a3,righty:a2,start:b8,x:b3,y:b0,platform:Windows, 03000000fa2d00000100000000000000,3dRudder Foot Motion Controller,leftx:a0,lefty:a1,rightx:a5,righty:a2,platform:Windows, 03000000d0160000040d000000000000,4Play Adapter,a:b1,b:b3,back:b4,dpdown:b11,dpleft:b12,dpright:b13,dpup:b10,leftshoulder:b6,leftstick:b14,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b15,righttrigger:b9,rightx:a3,righty:a4,start:b5,x:b0,y:b2,platform:Windows, 03000000d0160000050d000000000000,4Play Adapter,a:b1,b:b3,back:b4,dpdown:b11,dpleft:b12,dpright:b13,dpup:b10,leftshoulder:b6,leftstick:b14,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b15,righttrigger:b9,rightx:a3,righty:a4,start:b5,x:b0,y:b2,platform:Windows, 03000000d0160000060d000000000000,4Play Adapter,a:b1,b:b3,back:b4,dpdown:b11,dpleft:b12,dpright:b13,dpup:b10,leftshoulder:b6,leftstick:b14,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b15,righttrigger:b9,rightx:a3,righty:a4,start:b5,x:b0,y:b2,platform:Windows, 03000000d0160000070d000000000000,4Play Adapter,a:b1,b:b3,back:b4,dpdown:b11,dpleft:b12,dpright:b13,dpup:b10,leftshoulder:b6,leftstick:b14,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b15,righttrigger:b9,rightx:a3,righty:a4,start:b5,x:b0,y:b2,platform:Windows, 03000000d0160000600a000000000000,4Play Adapter,a:b1,b:b3,back:b4,dpdown:b11,dpleft:b12,dpright:b13,dpup:b10,leftshoulder:b6,leftstick:b14,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b15,righttrigger:b9,rightx:a3,righty:a4,start:b5,x:b0,y:b2,platform:Windows, 03000000c82d00000031000000000000,8BitDo Adapter,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows, 03000000c82d00000531000000000000,8BitDo Adapter 2,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows, 03000000c82d00000951000000000000,8BitDo Dogbone,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftx:a0,lefty:a2,rightx:a3,righty:a5,start:b11,platform:Windows, 03000000008000000210000000000000,8BitDo F30,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b9,rightx:a2,righty:a5,start:b11,x:b3,y:b4,platform:Windows, 030000003512000011ab000000000000,8BitDo F30 Arcade Joystick,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 03000000c82d00001028000000000000,8BitDo F30 Arcade Joystick,a:b0,b:b1,back:b10,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b11,x:b3,y:b4,platform:Windows, 03000000c82d000011ab000000000000,8BitDo F30 Arcade Joystick,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b4,y:b3,platform:Windows, 03000000801000000900000000000000,8BitDo F30 Arcade Stick,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b9,rightx:a2,righty:a5,start:b11,x:b3,y:b4,platform:Windows, 03000000c82d00001038000000000000,8BitDo F30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a5,start:b11,x:b4,y:b3,platform:Windows, 03000000c82d00000090000000000000,8BitDo FC30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b4,y:b3,platform:Windows, 03000000c82d00001251000000000000,8BitDo Lite 2,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b4,y:b3,platform:Windows, 03000000c82d00001151000000000000,8BitDo Lite SE,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b4,y:b3,platform:Windows, 03000000c82d00000150000000000000,8BitDo M30,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftx:a0,lefty:a1,rightshoulder:b6,righttrigger:b7,rightx:a3,righty:a5,start:b11,x:b4,y:b3,platform:Windows, 03000000c82d00000151000000000000,8BitDo M30,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftx:a0,lefty:a2,rightshoulder:b6,righttrigger:b7,rightx:a3,righty:a5,start:b11,x:b3,y:b4,platform:Windows, 03000000c82d00000650000000000000,8BitDo M30,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b8,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b6,righttrigger:b7,start:b11,x:b3,y:b4,platform:Windows, 03000000c82d00005106000000000000,8BitDo M30,a:b0,b:b1,back:b10,dpdown:+a2,dpleft:-a0,dpright:+a0,dpup:-a2,guide:b2,leftshoulder:b8,lefttrigger:b9,rightshoulder:b6,righttrigger:b7,start:b11,x:b3,y:b4,platform:Windows, 03000000c82d00002090000000000000,8BitDo Micro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b4,y:b3,platform:Windows, 03000000c82d00000310000000000000,8BitDo N30,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b11,x:b3,y:b4,platform:Windows, 03000000c82d00000451000000000000,8BitDo N30,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftx:a0,lefty:a2,rightx:a3,righty:a5,start:b11,platform:Windows, 03000000c82d00002028000000000000,8BitDo N30,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a5,start:b11,x:b4,y:b3,platform:Windows, 03000000c82d00008010000000000000,8BitDo N30,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b11,x:b3,y:b4,platform:Windows, 03000000c82d0000e002000000000000,8BitDo N30,a:b0,b:b1,back:b7,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftx:a0,lefty:a1,start:b6,platform:Windows, 03000000c82d00000190000000000000,8BitDo N30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b4,y:b3,platform:Windows, 03000000c82d00001590000000000000,8BitDo N30 Pro 2,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a5,start:b11,x:b4,y:b3,platform:Windows, 03000000c82d00006528000000000000,8BitDo N30 Pro 2,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b4,y:b3,platform:Windows, 03000000c82d00000290000000000000,8BitDo N64,+rightx:b9,+righty:b3,-rightx:b4,-righty:b8,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b10,leftx:a0,lefty:a1,rightshoulder:b7,start:b11,platform:Windows, 03000000c82d00003038000000000000,8BitDo N64,+rightx:b9,+righty:b3,-rightx:b4,-righty:b8,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b10,leftx:a0,lefty:a1,rightshoulder:b7,start:b11,platform:Windows, 03000000c82d00006928000000000000,8BitDo N64,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b9,rightx:a3,righty:a4,start:b11,platform:Windows, 03000000c82d00002590000000000000,8BitDo NEOGEO,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows, 030000003512000012ab000000000000,8BitDo NES30,a:b2,b:b1,back:b6,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,rightshoulder:b5,start:b7,x:b3,y:b0,platform:Windows, 03000000c82d000012ab000000000000,8BitDo NES30,a:b1,b:b0,back:b10,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Windows, 03000000022000000090000000000000,8BitDo NES30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b4,y:b3,platform:Windows, 03000000203800000900000000000000,8BitDo NES30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b4,y:b3,platform:Windows, 03000000c82d00002038000000000000,8BitDo NES30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b4,y:b3,platform:Windows, 03000000c82d00000751000000000000,8BitDo P30,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b8,leftx:a0,lefty:a2,rightshoulder:b7,righttrigger:b9,rightx:a3,righty:a5,start:b11,x:b3,y:b4,platform:Windows, 03000000c82d00000851000000000000,8BitDo P30,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b8,leftx:a0,lefty:a2,rightshoulder:b7,righttrigger:b9,rightx:a3,righty:a5,start:b11,x:b3,y:b4,platform:Windows, 03000000c82d00000360000000000000,8BitDo Pro 2,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b4,y:b3,platform:Windows, 03000000c82d00000361000000000000,8BitDo Pro 2,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b4,y:b3,platform:Windows, 03000000c82d00000660000000000000,8BitDo Pro 2,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b4,y:b3,platform:Windows, 03000000c82d00000131000000000000,8BitDo Receiver,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b4,y:b3,platform:Windows, 03000000c82d00000231000000000000,8BitDo Receiver,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b4,y:b3,platform:Windows, 03000000c82d00000331000000000000,8BitDo Receiver,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b4,y:b3,platform:Windows, 03000000c82d00000431000000000000,8BitDo Receiver,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b4,y:b3,platform:Windows, 03000000c82d00002867000000000000,8BitDo S30,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b8,lefttrigger:b9,leftx:a0,lefty:a2,rightshoulder:b6,righttrigger:b7,rightx:a3,righty:a5,start:b10,x:b3,y:b4,platform:Windows, 03000000c82d00000130000000000000,8BitDo SF30,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a5,start:b11,x:b4,y:b3,platform:Windows, 03000000c82d00000060000000000000,8BitDo SF30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Windows, 03000000c82d00000061000000000000,8BitDo SF30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Windows, 03000000102800000900000000000000,8BitDo SFC30,a:b1,b:b0,back:b10,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Windows, 03000000c82d000021ab000000000000,8BitDo SFC30,a:b1,b:b0,back:b10,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Windows, 03000000c82d00003028000000000000,8BitDo SFC30,a:b1,b:b0,back:b10,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Windows, 030000003512000020ab000000000000,8BitDo SN30,a:b0,b:b1,back:b10,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b11,x:b4,y:b3,platform:Windows, 03000000c82d00000030000000000000,8BitDo SN30,a:b1,b:b0,back:b10,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Windows, 03000000c82d00000351000000000000,8BitDo SN30,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftx:a0,lefty:a2,rightshoulder:b7,rightx:a3,righty:a5,start:b11,x:b4,y:b3,platform:Windows, 03000000c82d00001290000000000000,8BitDo SN30,a:b1,b:b0,back:b10,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Windows, 03000000c82d000020ab000000000000,8BitDo SN30,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a5,start:b11,x:b4,y:b3,platform:Windows, 03000000c82d00004028000000000000,8BitDo SN30,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a5,start:b11,x:b4,y:b3,platform:Windows, 03000000c82d00006228000000000000,8BitDo SN30,a:b1,b:b0,back:b10,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Windows, 03000000c82d00000021000000000000,8BitDo SN30 Pro,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a5,start:b11,x:b3,y:b4,platform:Windows, 03000000c82d00000160000000000000,8BitDo SN30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Windows, 03000000c82d00000161000000000000,8BitDo SN30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Windows, 03000000c82d00000260000000000000,8BitDo SN30 Pro Plus,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Windows, 03000000c82d00000261000000000000,8BitDo SN30 Pro Plus,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Windows, 03000000c82d00001230000000000000,8BitDo Ultimate,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,paddle1:b2,paddle2:b5,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows, 03000000c82d00001530000000000000,8BitDo Ultimate C,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows, 03000000c82d00001630000000000000,8BitDo Ultimate C,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows, 03000000c82d00001730000000000000,8BitDo Ultimate C,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows, 03000000c82d00001130000000000000,8BitDo Ultimate Wired,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,misc1:b26,paddle1:b24,paddle2:b25,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows, 03000000c82d00001330000000000000,8BitDo Ultimate Wireless,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,misc1:b26,paddle1:b23,paddle2:b19,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Windows, 03000000c82d00000121000000000000,8BitDo Xbox One SN30 Pro,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows, 03000000a00500003232000000000000,8BitDo Zero,a:b0,b:b1,back:b10,dpdown:+a2,dpleft:-a0,dpright:+a0,dpup:-a2,leftshoulder:b6,rightshoulder:b7,start:b11,x:b3,y:b4,platform:Windows, 03000000c82d00001890000000000000,8BitDo Zero 2,a:b1,b:b0,back:b10,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Windows, 03000000c82d00003032000000000000,8BitDo Zero 2,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Windows, 030000008f0e00001200000000000000,Acme GA02,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b2,y:b3,platform:Windows, 03000000c01100000355000000000000,Acrux,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 03000000fa190000f0ff000000000000,Acteck AGJ 3200,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows, 03000000d1180000402c000000000000,ADT1,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a3,rightx:a2,righty:a5,x:b3,y:b4,platform:Windows, 030000006f0e00008801000000000000,Afterglow Deluxe Nintendo Switch Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,misc1:b13,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 03000000341a00003608000000000000,Afterglow PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 030000006f0e00000263000000000000,Afterglow PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 030000006f0e00001101000000000000,Afterglow PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 030000006f0e00001401000000000000,Afterglow PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 030000006f0e00001402000000000000,Afterglow PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 030000006f0e00001901000000000000,Afterglow PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 030000006f0e00001a01000000000000,Afterglow PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 030000006f0e00001301000000000000,Afterglow Xbox Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 030000006f0e00001302000000000000,Afterglow Xbox Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 030000006f0e00001304000000000000,Afterglow Xbox Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 030000006f0e00001413000000000000,Afterglow Xbox Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 030000006f0e00003901000000000000,Afterglow Xbox Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 03000000ab1200000103000000000000,Afterglow Xbox Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a2,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 03000000ad1b000000f9000000000000,Afterglow Xbox Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b10,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b11,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 03000000100000008200000000000000,Akishop Customs PS360,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Windows, 030000007c1800000006000000000000,Alienware Dual Compatible PlayStation Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b0,y:b3,platform:Windows, 03000000491900001904000000000000,Amazon Luna Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,misc1:b9,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b7,x:b2,y:b3,platform:Windows, 03000000710100001904000000000000,Amazon Luna Controller,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b11,leftshoulder:b5,leftstick:b8,leftx:a0,lefty:a1,misc1:b9,rightshoulder:b4,rightstick:b7,rightx:a3,righty:a4,start:b6,x:b3,y:b2,platform:Windows, 03000000830500000160000000000000,Arcade,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b2,righttrigger:b3,x:b4,y:b4,platform:Windows, 03000000120c0000100e000000000000,Armor 3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 03000000490b00004406000000000000,ASCII Seamic Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b2,start:b9,x:b3,y:b4,platform:Windows, 03000000869800002500000000000000,Astro C40 TR PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 03000000a30c00002700000000000000,Astro City Mini,a:b2,b:b1,back:b8,dpdown:+a4,dpleft:-a3,dpright:+a3,dpup:-a4,rightshoulder:b4,righttrigger:b5,start:b9,x:b3,y:b0,platform:Windows, 03000000a30c00002800000000000000,Astro City Mini,a:b2,b:b1,back:b8,leftx:a3,lefty:a4,rightshoulder:b4,righttrigger:b5,start:b9,x:b3,y:b0,platform:Windows, 03000000050b00000579000000000000,ASUS ROG Kunai 3,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows, 03000000050b00000679000000000000,ASUS ROG Kunai 3,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,misc1:b15,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows, 03000000503200000110000000000000,Atari VCS Classic Controller,a:b0,b:b1,back:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,start:b3,platform:Windows, 03000000503200000210000000000000,Atari VCS Modern Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,rightx:a3,righty:a4,start:b9,x:b2,y:b3,platform:Windows, 03000000e4150000103f000000000000,Batarang,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b10,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b11,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 03000000d6200000e557000000000000,Batarang PlayStation Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 03000000c01100001352000000000000,Battalife Joystick,a:b6,b:b7,back:b2,leftshoulder:b0,leftx:a0,lefty:a1,rightshoulder:b1,start:b3,x:b4,y:b5,platform:Windows, 030000006f0e00003201000000000000,Battlefield 4 PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 03000000ad1b000001f9000000000000,BB 070,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 03000000d62000002a79000000000000,BDA PS4 Fightpad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 03000000bc2000005250000000000000,Beitong G3,a:b0,b:b1,back:b2,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b11,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b5,righttrigger:b9,rightx:a3,righty:a4,start:b15,x:b3,y:b4,platform:Windows, 030000000d0500000208000000000000,Belkin Nostromo N40,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,righttrigger:b7,rightx:a5,righty:a2,start:b9,x:b2,y:b3,platform:Windows, 03000000bc2000006012000000000000,Betop 2126F,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows, 03000000bc2000000055000000000000,Betop BFM,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows, 03000000bc2000006312000000000000,Betop Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows, 03000000bc2000006321000000000000,Betop Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows, 03000000bc2000006412000000000000,Betop Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows, 03000000c01100000555000000000000,Betop Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows, 03000000c01100000655000000000000,Betop Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows, 03000000790000000700000000000000,Betop Gamepad,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a4,start:b9,x:b3,y:b0,platform:Windows, 03000000808300000300000000000000,Betop Gamepad,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a4,start:b9,x:b3,y:b0,platform:Windows, 030000006f0e00006401000000000000,BF One,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,rightx:a2,righty:a5,start:b7,x:b2,y:b3,platform:Windows, 03000000300f00000202000000000000,Bigben,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a5,righty:a2,start:b7,x:b2,y:b3,platform:Windows, 030000006b1400000209000000000000,Bigben,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 030000006b1400000055000000000000,Bigben PS3 Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows, 030000006b1400000103000000000000,Bigben PS3 Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b2,platform:Windows, 03000000120c0000200e000000000000,Brook Mars PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 03000000120c0000210e000000000000,Brook Mars PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 03000000120c0000f10e000000000000,Brook PS2 Adapter,a:b1,b:b2,back:b13,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 03000000120c0000310c000000000000,Brook Super Converter,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b5,start:b9,x:b3,y:b0,platform:Windows, 03000000d81d00000b00000000000000,Buffalo BSGP1601 Series,a:b5,b:b3,back:b12,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b8,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b9,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b13,x:b4,y:b2,platform:Windows, 030000005b1c00002400000000000000,Capcom Home Arcade Controller,a:b3,b:b4,back:b7,leftshoulder:b2,leftx:a0,lefty:a1,rightshoulder:b5,start:b6,x:b0,y:b1,platform:Windows, 030000005b1c00002500000000000000,Capcom Home Arcade Controller,a:b3,b:b4,back:b7,leftshoulder:b2,leftx:a0,lefty:a1,rightshoulder:b5,start:b6,x:b0,y:b1,platform:Windows, 030000006d04000042c2000000000000,ChillStream,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 03000000e82000006058000000000000,Cideko AK08b,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows, 03000000457500000401000000000000,Cobra,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 030000000b0400003365000000000000,Competition Pro,a:b0,b:b1,back:b2,leftx:a0,lefty:a1,start:b3,platform:Windows, 030000004c050000c505000000000000,CronusMax Adapter,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 03000000d814000007cd000000000000,Cthulhu,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 03000000d8140000cefa000000000000,Cthulhu,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 03000000260900008888000000000000,Cyber Gadget GameCube Controller,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b6,righttrigger:a4,rightx:a2,righty:a3~,start:b7,x:b2,y:b3,platform:Windows, 030000003807000002cb000000000000,Cyborg,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a2,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 03000000a306000022f6000000000000,Cyborg V.3 Rumble,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:+a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:-a3,rightx:a2,righty:a4,start:b9,x:b0,y:b3,platform:Windows, 03000000f806000000a3000000000000,DA Leader,a:b7,b:b6,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b0,leftstick:b8,lefttrigger:b1,leftx:a0,lefty:a1,rightshoulder:b2,rightstick:b9,righttrigger:b3,rightx:a2,righty:a3,start:b12,x:b4,y:b5,platform:Windows, 030000001a1c00000001000000000000,Datel Arcade Joystick,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 03000000451300000830000000000000,Defender Game Racer X7,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows, 03000000791d00000103000000000000,Dual Box Wii,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b6,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b5,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows, 03000000c0160000e105000000000000,Dual Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a3,righty:a4,start:b9,x:b0,y:b3,platform:Windows, 030000004f040000070f000000000000,Dual Power,a:b8,b:b9,back:b4,dpdown:b1,dpleft:b2,dpright:b3,dpup:b0,leftshoulder:b13,leftstick:b6,lefttrigger:b14,leftx:a0,lefty:a1,rightshoulder:b12,rightstick:b7,righttrigger:b15,start:b5,x:b10,y:b11,platform:Windows, 030000004f04000012b3000000000000,Dual Power 3,a:b0,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b1,y:b3,platform:Windows, 030000004f04000020b3000000000000,Dual Trigger,a:b0,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b1,y:b3,platform:Windows, 03000000bd12000002e0000000000000,Dual Vibration Joystick,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b9,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b10,righttrigger:b5,rightx:a3,righty:a2,start:b11,x:b3,y:b0,platform:Windows, 03000000ff1100003133000000000000,DualForce,a:b2,b:b3,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a4,start:b9,x:b0,y:b1,platform:Windows, 030000008f0e00000910000000000000,DualShock 2,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b9,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b10,righttrigger:b5,rightx:a3,righty:a2,start:b11,x:b3,y:b0,platform:Windows, 03000000317300000100000000000000,DualShock 3,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a5,start:b11,x:b3,y:b4,platform:Windows, 030000006f0e00003001000000000000,EA Sports PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 03000000fc0400000250000000000000,Easy Grip,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b2,start:b9,x:b3,y:b4,platform:Windows, 030000006e0500000a20000000000000,Elecom DUX60 MMO,a:b2,b:b3,back:b17,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b8,leftstick:b14,lefttrigger:b12,leftx:a0,lefty:a1,rightshoulder:b11,rightstick:b15,righttrigger:b13,rightx:a3,righty:a4,start:b20,x:b0,y:b1,platform:Windows, 03000000b80500000410000000000000,Elecom Gamepad,a:b2,b:b3,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b1,platform:Windows, 03000000b80500000610000000000000,Elecom Gamepad,a:b2,b:b3,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b1,platform:Windows, 030000006e0500000520000000000000,Elecom P301U PlayStation Controller Adapter,a:b2,b:b3,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b7,rightx:a2,righty:a3,start:b11,x:b0,y:b1,platform:Windows, 03000000411200004450000000000000,Elecom U1012,a:b2,b:b3,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b7,rightx:a2,righty:a3,start:b11,x:b0,y:b1,platform:Windows, 030000006e0500000320000000000000,Elecom U3613M,a:b2,b:b3,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b8,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b7,rightx:a2,righty:a3,start:b11,x:b0,y:b1,platform:Windows, 030000006e0500000e20000000000000,Elecom U3912T,a:b2,b:b3,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b7,rightx:a2,righty:a3,start:b11,x:b0,y:b1,platform:Windows, 030000006e0500000f20000000000000,Elecom U4013S,a:b2,b:b3,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b7,rightx:a2,righty:a3,start:b11,x:b0,y:b1,platform:Windows, 030000006e0500001320000000000000,Elecom U4113,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 030000006e0500001020000000000000,Elecom U4113S,a:b2,b:b3,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b7,rightx:a3,righty:a2,start:b11,x:b0,y:b1,platform:Windows, 030000006e0500000720000000000000,Elecom W01U,a:b2,b:b3,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b1,platform:Windows, 030000007d0400000640000000000000,Eliminator AfterShock,a:b1,b:b2,back:b9,dpdown:+a3,dpleft:-a5,dpright:+a5,dpup:-a3,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a4,righty:a2,start:b8,x:b0,y:b3,platform:Windows, 03000000120c0000f61c000000000000,Elite,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 03000000430b00000300000000000000,EMS Production PS2 Adapter,a:b2,b:b1,back:b8,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a3,righty:a2,start:b9,x:b3,y:b0,platform:Windows, 03000000242f000000b7000000000000,ESM 9110,a:b0,b:b1,back:b7,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Windows, 03000000101c0000181c000000000000,Essential,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b4,leftx:a1,lefty:a0,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b3,y:b0,platform:Windows, 030000008f0e00000f31000000000000,EXEQ,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b2,platform:Windows, 03000000341a00000108000000000000,EXEQ RF Gamepad,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows, 030000006f0e00008401000000000000,Faceoff Deluxe Nintendo Switch Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,misc1:b13,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 030000006f0e00008101000000000000,Faceoff Deluxe Pro Nintendo Switch Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,misc1:b13,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 030000006f0e00008001000000000000,Faceoff Pro Nintendo Switch Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,misc1:b13,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 03000000021000000090000000000000,FC30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b8,leftstick:b13,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b9,rightstick:b14,righttrigger:b7,rightx:a3,righty:a4,start:b11,x:b4,y:b3,platform:Windows, 0300000011040000c600000000000000,FC801,a:b0,b:b1,back:b6,leftshoulder:b4,leftx:a0,lefty:a1,rightshoulder:b5,start:b7,x:b2,y:b3,platform:Windows, 03000000852100000201000000000000,FF GP1,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 03000000ad1b000028f0000000000000,Fightpad,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b10,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b11,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 03000000ad1b00002ef0000000000000,Fightpad,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b7,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 03000000ad1b000038f0000000000000,Fightpad TE,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b8,rightshoulder:b5,righttrigger:b9,start:b7,x:b2,y:b3,platform:Windows, 03005036852100000000000000000000,Final Fantasy XIV Online Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 03000000f806000001a3000000000000,Firestorm,a:b9,b:b7,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b0,leftstick:b10,lefttrigger:b1,leftx:a0,lefty:a1,rightshoulder:b2,rightstick:b11,righttrigger:b3,start:b12,x:b8,y:b4,platform:Windows, 03000000b50700000399000000000000,Firestorm 2,a:b2,b:b4,back:b10,leftshoulder:b6,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b8,righttrigger:b9,start:b11,x:b3,y:b5,platform:Windows, 03000000b50700001302000000000000,Firestorm D3,a:b0,b:b2,leftshoulder:b4,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,righttrigger:b7,x:b1,y:b3,platform:Windows, 03000000b40400001024000000000000,Flydigi Apex,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a5,start:b11,x:b3,y:b4,platform:Windows, 03000000151900004000000000000000,Flydigi Vader 2,a:b27,b:b26,back:b19,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b6,leftshoulder:b23,leftstick:b17,lefttrigger:b21,leftx:a0,lefty:a1,misc1:b15,paddle1:b11,paddle2:b10,paddle3:b13,paddle4:b12,rightshoulder:b22,rightstick:b16,righttrigger:b20,rightx:a3,righty:a4,start:b18,x:b25,y:b24,platform:Windows, 03000000b40400001124000000000000,Flydigi Vader 2,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b12,lefttrigger:b8,leftx:a0,lefty:a1,misc1:b14,paddle1:b4,paddle2:b5,paddle3:b16,paddle4:b17,rightshoulder:b7,rightstick:b13,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b2,y:b3,platform:Windows, 03000000b40400001224000000000000,Flydigi Vader 2,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b12,lefttrigger:b8,leftx:a0,lefty:a1,misc1:b2,paddle1:b16,paddle2:b17,paddle3:b14,paddle4:b15,rightshoulder:b7,rightstick:b13,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows, 030000008305000000a0000000000000,G08XU,a:b0,b:b1,back:b4,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,rightshoulder:b7,start:b5,x:b2,y:b3,platform:Windows, 0300000066f700000100000000000000,Game VIB Joystick,a:b2,b:b3,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b7,rightx:a3,righty:a2,start:b11,x:b0,y:b1,platform:Windows, 03000000260900002625000000000000,GameCube Controller,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b6,lefttrigger:a4,leftx:a0,lefty:a1,righttrigger:a5,rightx:a2,righty:a3,start:b7,x:b2,y:b3,platform:Windows, 03000000341a000005f7000000000000,GameCube Controller,a:b2,b:b3,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:a4,rightx:a5,righty:a2,start:b9,x:b1,y:b0,platform:Windows, 03000000430b00000500000000000000,GameCube Controller,a:b0,b:b2,dpdown:b10,dpleft:b8,dpright:b9,dpup:b11,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b6,righttrigger:a3,rightx:a5,righty:a2,start:b7,x:b1,y:b3,platform:Windows, 03000000790000004718000000000000,GameCube Controller,a:b1,b:b0,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:a4,rightx:a5,righty:a2,start:b9,x:b2,y:b3,platform:Windows, 03000000790000004618000000000000,GameCube Controller Adapter,a:b1,b:b0,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:a4,rightx:a5,righty:a2,start:b9,x:b2,y:b3,platform:Windows, 030000008f0e00000d31000000000000,Gamepad 3 Turbo,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 03000000ac0500003d03000000000000,GameSir G3,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows, 03000000ac0500005b05000000000000,GameSir G3w,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows, 03000000ac0500002d02000000000000,GameSir G4,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a5,start:b11,x:b3,y:b4,platform:Windows, 03000000ac0500004d04000000000000,GameSir G4,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows, 03000000ac0500001a06000000000000,GameSir-T3 2.02,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b15,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows, 030000004c0e00001035000000000000,Gamester,a:b0,b:b1,back:b7,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b10,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b11,rightx:a3,righty:a4,start:b6,x:b2,y:b3,platform:Windows, 030000000d0f00001110000000000000,GameStick Controller,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,rightx:a2,righty:a5,start:b11,x:b3,y:b4,platform:Windows, 0300000047530000616d000000000000,GameStop,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows, 03000000c01100000140000000000000,GameStop PS4 Fun Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 03000000b62500000100000000000000,Gametel GT004 01,a:b3,b:b0,dpdown:b10,dpleft:b9,dpright:b8,dpup:b11,leftshoulder:b4,rightshoulder:b5,start:b7,x:b1,y:b2,platform:Windows, 030000008f0e00001411000000000000,Gamo2 Divaller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 03000000120c0000a857000000000000,Gator Claw,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 03000000c9110000f055000000000000,GC100XF,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows, 030000008305000009a0000000000000,Genius,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows, 030000008305000031b0000000000000,Genius Maxfire Blaze 3,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows, 03000000451300000010000000000000,Genius Maxfire Grandias 12,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows, 030000005c1a00003330000000000000,Genius MaxFire Grandias 12V,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b4,rightstick:b11,righttrigger:b5,rightx:a3,righty:a2,start:b9,x:b2,y:b3,platform:Windows, 03000000300f00000b01000000000000,GGE909 Recoil,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b3,y:b0,platform:Windows, 03000000f0250000c283000000000000,Gioteck PlayStation Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows, 03000000f025000021c1000000000000,Gioteck PS3 Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows, 03000000f025000031c1000000000000,Gioteck PS3 Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows, 03000000f0250000c383000000000000,Gioteck VX2 PlayStation Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows, 03000000f0250000c483000000000000,Gioteck VX2 PlayStation Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows, 030000004f04000026b3000000000000,GP XID,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 0300000079000000d418000000000000,GPD Win,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 03000000c6240000025b000000000000,GPX,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 030000007d0400000840000000000000,Gravis Destroyer Tilt,+leftx:h0.2,+lefty:h0.4,-leftx:h0.8,-lefty:h0.1,a:b1,b:b2,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,rightshoulder:b5,x:b0,y:b3,platform:Windows, 030000007d0400000540000000000000,Gravis Eliminator Pro,a:b1,b:b2,back:b8,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Windows, 03000000280400000140000000000000,Gravis GamePad Pro,a:b1,b:b2,back:b8,dpdown:+a1,dpleft:-a0,dpright:+a3,dpup:-a4,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Windows, 030000008f0e00000610000000000000,GreenAsia,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b9,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b10,righttrigger:b5,rightx:a5,righty:a2,start:b11,x:b3,y:b0,platform:Windows, 03000000ac0500006b05000000000000,GT2a,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a5,start:b11,x:b3,y:b4,platform:Windows, 03000000341a00000302000000000000,Hama Scorpad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 030000000d0f00004900000000000000,Hatsune Miku Sho PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 030000001008000001e1000000000000,Havit HV G60,a:b2,b:b1,back:b8,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b3,y:b0,platform:Windows, 030000000d0f00000c00000000000000,HEXT,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b10,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b11,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 03000000d81400000862000000000000,HitBox Edition Cthulhu,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b5,lefttrigger:b4,rightshoulder:b7,righttrigger:b6,start:b9,x:b0,y:b3,platform:Windows, 03000000632500002605000000000000,HJD X,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows, 030000000d0f00000a00000000000000,Hori DOA,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b9,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 030000000d0f00008500000000000000,Hori Fighting Commander 2016 PS3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 030000000d0f00002500000000000000,Hori Fighting Commander 3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Windows, 030000000d0f00002d00000000000000,Hori Fighting Commander 3 Pro,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 030000000d0f00005f00000000000000,Hori Fighting Commander 4 PS3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 030000000d0f00005e00000000000000,Hori Fighting Commander 4 PS4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 030000000d0f00008400000000000000,Hori Fighting Commander 5,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 030000000d0f00005100000000000000,Hori Fighting Commander PS3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 030000000d0f00008600000000000000,Hori Fighting Commander Xbox 360,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 030000000d0f0000ba00000000000000,Hori Fighting Commander Xbox 360,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 030000000d0f00008800000000000000,Hori Fighting Stick mini 4 (PS3),a:b1,b:b2,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b8,x:b0,y:b3,platform:Windows, 030000000d0f00008700000000000000,Hori Fighting Stick mini 4 (PS4),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Windows, 030000000d0f00001000000000000000,Hori Fightstick,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 030000000d0f00003200000000000000,Hori Fightstick 3W,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 030000000d0f0000c000000000000000,Hori Fightstick 4,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 030000000d0f00000d00000000000000,Hori Fightstick EX2,a:b0,b:b1,back:b7,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b10,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b11,rightx:a3,righty:a4,start:b6,x:b2,y:b3,platform:Windows, 030000000d0f00003701000000000000,Hori Fightstick Mini,a:b1,b:b0,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,rightx:a3,righty:a4,start:b7,x:b3,y:b2,platform:Windows, 030000000d0f00004000000000000000,Hori Fightstick Mini 3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b5,lefttrigger:b4,rightshoulder:b7,righttrigger:b6,start:b9,x:b0,y:b3,platform:Windows, 030000000d0f00002100000000000000,Hori Fightstick V3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 030000000d0f00002700000000000000,Hori Fightstick V3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Windows, 030000000d0f0000a000000000000000,Hori Grip TAC4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b13,x:b0,y:b3,platform:Windows, 030000000d0f0000a500000000000000,Hori Miku Project Diva X HD PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 030000000d0f0000a600000000000000,Hori Miku Project Diva X HD PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 030000000d0f00000101000000000000,Hori Mini Hatsune Miku FT,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 030000000d0f00005400000000000000,Hori Pad 3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 030000000d0f00000900000000000000,Hori Pad 3 Turbo,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 030000000d0f00004d00000000000000,Hori Pad A,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 030000000d0f00003801000000000000,Hori PC Engine Mini Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,start:b9,platform:Windows, 030000000d0f00009200000000000000,Hori Pokken Tournament DX Pro,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Windows, 030000000d0f00002301000000000000,Hori PS4 Controller Light,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a5,start:b11,x:b3,y:b4,platform:Windows, 030000000d0f00001100000000000000,Hori Real Arcade Pro 3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,rightshoulder:b5,rightstick:b11,righttrigger:b7,start:b9,x:b0,y:b3,platform:Windows, 030000000d0f00002600000000000000,Hori Real Arcade Pro 3P,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 030000000d0f00004b00000000000000,Hori Real Arcade Pro 3W,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 030000000d0f00006a00000000000000,Hori Real Arcade Pro 4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 030000000d0f00006b00000000000000,Hori Real Arcade Pro 4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 030000000d0f00008a00000000000000,Hori Real Arcade Pro 4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 030000000d0f00008b00000000000000,Hori Real Arcade Pro 4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 030000000d0f00006f00000000000000,Hori Real Arcade Pro 4 VLX,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 030000000d0f00007000000000000000,Hori Real Arcade Pro 4 VLX,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,rightshoulder:b5,rightstick:b11,righttrigger:b7,start:b9,x:b0,y:b3,platform:Windows, 030000000d0f00003d00000000000000,Hori Real Arcade Pro N3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b10,leftstick:b4,lefttrigger:b11,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b6,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 030000000d0f0000ae00000000000000,Hori Real Arcade Pro N4,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 030000000d0f00008c00000000000000,Hori Real Arcade Pro P4,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 030000000d0f0000aa00000000000000,Hori Real Arcade Pro S,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 030000000d0f0000d800000000000000,Hori Real Arcade Pro S,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Windows, 030000000d0f00002200000000000000,Hori Real Arcade Pro V3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 030000000d0f00005b00000000000000,Hori Real Arcade Pro V4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 030000000d0f00005c00000000000000,Hori Real Arcade Pro V4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 030000000d0f0000af00000000000000,Hori Real Arcade Pro VHS,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b0,y:b3,platform:Windows, 030000000d0f00001b00000000000000,Hori Real Arcade Pro VX,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b9,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 03000000ad1b000002f5000000000000,Hori Real Arcade Pro VX,a:b0,b:b1,back:b7,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b10,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b11,rightx:a2,righty:a5,start:b6,x:b2,y:b3,platform:Windows, 030000000d0f00009c00000000000000,Hori TAC Pro,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 030000000d0f0000c900000000000000,Hori Taiko Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 030000000d0f00006400000000000000,Horipad 3TP,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 030000000d0f00001300000000000000,Horipad 3W,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 030000000d0f00005500000000000000,Horipad 4 FPS,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 030000000d0f00006e00000000000000,Horipad 4 PS3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 030000000d0f00006600000000000000,Horipad 4 PS4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 030000000d0f00004200000000000000,Horipad A,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 03000000ad1b000001f5000000000000,Horipad EXT2,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b10,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b11,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 030000000d0f0000ee00000000000000,Horipad Mini 4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 030000000d0f0000c100000000000000,Horipad Nintendo Switch Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,misc1:b13,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 030000000d0f0000f600000000000000,Horipad Nintendo Switch Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows, 030000000d0f00006700000000000000,Horipad One,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 030000000d0f0000dc00000000000000,Horipad Switch,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 03000000242e00000b20000000000000,Hyperkin Admiral N64 Controller,+rightx:b11,+righty:b13,-rightx:b8,-righty:b12,a:b1,b:b0,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b14,leftx:a0,lefty:a1,rightshoulder:b5,start:b9,platform:Windows, 03000000242e0000ff0b000000000000,Hyperkin N64 Adapter,a:b1,b:b2,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightx:a2,righty:a3,start:b9,platform:Windows, 03000000790000004e95000000000000,Hyperkin N64 Controller Adapter,a:b1,b:b2,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b7,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b5,rightx:a5,righty:a2,start:b9,platform:Windows, 03000000242e00006a38000000000000,Hyperkin Trooper 2,a:b0,b:b1,back:b4,leftshoulder:b2,leftx:a0,lefty:a1,rightshoulder:b3,start:b5,platform:Windows, 03000000d81d00000e00000000000000,iBuffalo AC02 Arcade Joystick,a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b2,rightstick:b11,righttrigger:b3,rightx:a2,righty:a5,start:b8,x:b4,y:b5,platform:Windows, 03000000d81d00000f00000000000000,iBuffalo BSGP1204 Series,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows, 03000000d81d00001000000000000000,iBuffalo BSGP1204P Series,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows, 030000005c0a00000285000000000000,iDroidCon,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b9,rightx:a2,righty:a5,start:b11,x:b4,y:b6,platform:Windows, 03000000696400006964000000000000,iDroidCon Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 03000000511d00000230000000000000,iGUGU Gamecore,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b1,leftstick:b4,lefttrigger:b3,leftx:a0,lefty:a1,rightshoulder:b0,righttrigger:b2,platform:Windows, 03000000b50700001403000000000000,Impact Black,a:b2,b:b3,back:b8,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b0,y:b1,platform:Windows, 030000006f0e00002401000000000000,Injustice Fightstick PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Windows, 03000000830500005130000000000000,InterAct ActionPad,a:b0,b:b1,back:b8,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,lefttrigger:b7,rightshoulder:b5,righttrigger:b2,start:b9,x:b3,y:b4,platform:Windows, 03000000ef0500000300000000000000,InterAct AxisPad,a:b2,b:b3,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b7,rightx:a3,righty:a2,start:b11,x:b0,y:b1,platform:Windows, 03000000fd0500000230000000000000,InterAct AxisPad,a:b2,b:b3,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b7,rightx:a2,righty:a5,start:b11,x:b0,y:b1,platform:Windows, 03000000fd0500000030000000000000,Interact GoPad,a:b3,b:b4,leftshoulder:b6,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b2,righttrigger:b5,x:b0,y:b1,platform:Windows, 03000000fd0500003902000000000000,InterAct Hammerhead,a:b3,b:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b2,lefttrigger:b8,rightshoulder:b7,rightstick:b5,righttrigger:b9,start:b10,x:b0,y:b1,platform:Windows, 03000000fd0500002a26000000000000,InterAct Hammerhead FX,a:b3,b:b4,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b9,rightx:a2,righty:a5,start:b11,x:b0,y:b1,platform:Windows, 03000000fd0500002f26000000000000,InterAct Hammerhead FX,a:b4,b:b5,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b9,rightx:a2,righty:a5,start:b11,x:b1,y:b2,platform:Windows, 03000000fd0500005302000000000000,InterAct ProPad,a:b3,b:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b2,righttrigger:b5,x:b0,y:b1,platform:Windows, 03000000ac0500002c02000000000000,Ipega Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b8,leftstick:b13,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b9,rightstick:b14,righttrigger:b7,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows, 03000000491900000204000000000000,Ipega PG9023,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows, 03000000491900000304000000000000,Ipega PG9087,+righty:+a5,-righty:-a4,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,start:b11,x:b3,y:b4,platform:Windows, 030000007e0500000620000000000000,Joy-Con (L),+leftx:h0.2,+lefty:h0.4,-leftx:h0.8,-lefty:h0.1,a:b0,b:b1,back:b13,leftshoulder:b4,leftstick:b10,rightshoulder:b5,start:b8,x:b2,y:b3,platform:Windows, 030000007e0500000720000000000000,Joy-Con (R),+leftx:h0.2,+lefty:h0.4,-leftx:h0.8,-lefty:h0.1,a:b0,b:b1,back:b12,leftshoulder:b4,leftstick:b11,rightshoulder:b5,start:b9,x:b2,y:b3,platform:Windows, 03000000250900000017000000000000,Joypad Adapter,a:b2,b:b1,back:b9,leftshoulder:b5,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b6,start:b8,x:b3,y:b0,platform:Windows, 03000000bd12000003c0000000000000,Joypad Alpha Shock,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 03000000ff1100004033000000000000,JPD FFB,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a2,start:b15,x:b3,y:b0,platform:Windows, 03000000242f00002d00000000000000,JYS Adapter,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows, 03000000242f00008a00000000000000,JYS Adapter,a:b1,b:b4,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b0,y:b3,platform:Windows, 03000000c4100000c082000000000000,KADE,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 03000000828200000180000000000000,Keio,a:b4,b:b5,back:b8,leftshoulder:b2,lefttrigger:b3,leftx:a0,lefty:a1,rightshoulder:b6,righttrigger:b7,start:b9,x:b0,y:b1,platform:Windows, 03000000790000000200000000000000,King PS3 Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a4,start:b9,x:b3,y:b0,platform:Windows, 03000000bd12000001e0000000000000,Leadership,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a3,righty:a2,start:b9,x:b3,y:b0,platform:Windows, 030000006f0e00000103000000000000,Logic3,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 030000006f0e00000104000000000000,Logic3,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 030000008f0e00001300000000000000,Logic3,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows, 030000006d040000d1ca000000000000,Logitech ChillStream,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 030000006d040000d2ca000000000000,Logitech Cordless Precision,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 030000006d04000011c2000000000000,Logitech Cordless Wingman,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b5,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b2,righttrigger:b7,rightx:a3,righty:a4,x:b4,platform:Windows, 030000006d04000016c2000000000000,Logitech Dual Action,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 030000006d0400001dc2000000000000,Logitech F310,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 030000006d04000018c2000000000000,Logitech F510,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 030000006d0400001ec2000000000000,Logitech F510,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 030000006d04000019c2000000000000,Logitech F710,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 030000006d0400001fc2000000000000,Logitech F710,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 030000006d0400001ac2000000000000,Logitech Precision,a:b1,b:b2,back:b8,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Windows, 030000006d04000009c2000000000000,Logitech WingMan,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b2,start:b8,x:b3,y:b4,platform:Windows, 030000006d0400000bc2000000000000,Logitech WingMan Action Pad,a:b0,b:b1,back:b2,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b8,lefttrigger:a5~,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b5,righttrigger:a2~,start:b8,x:b3,y:b4,platform:Windows, 030000006d0400000ac2000000000000,Logitech WingMan RumblePad,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b2,rightx:a3,righty:a4,x:b3,y:b4,platform:Windows, 03000000380700005645000000000000,Lynx,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 03000000222200006000000000000000,Macally,a:b1,b:b2,back:b7,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b33,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 03000000380700003888000000000000,Mad Catz Arcade Fightstick TE S Plus PS3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 03000000380700008532000000000000,Mad Catz Arcade Fightstick TE S PS3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 03000000380700006352000000000000,Mad Catz CTRLR,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 03000000380700006652000000000000,Mad Catz CTRLR,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a3,righty:a4,start:b9,x:b0,y:b3,platform:Windows, 03000000380700005032000000000000,Mad Catz Fightpad Pro PS3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 03000000380700005082000000000000,Mad Catz Fightpad Pro PS4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 03000000380700008031000000000000,Mad Catz FightStick Alpha PS3 ,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 030000003807000038b7000000000000,Mad Catz Fightstick TE,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b8,rightshoulder:b5,righttrigger:b9,start:b7,x:b2,y:b3,platform:Windows, 03000000380700008433000000000000,Mad Catz Fightstick TE S PS3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 03000000380700008483000000000000,Mad Catz Fightstick TE S PS4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 03000000380700008134000000000000,Mad Catz Fightstick TE2 PS3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b7,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b4,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 03000000380700008184000000000000,Mad Catz Fightstick TE2 PS4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b5,leftstick:b10,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b4,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 03000000380700006252000000000000,Mad Catz Micro CTRLR,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a3,righty:a4,start:b9,x:b0,y:b3,platform:Windows, 03000000380700008232000000000000,Mad Catz PlayStation Brawlpad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 03000000380700008731000000000000,Mad Catz PlayStation Fightstick,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 030000003807000056a8000000000000,Mad Catz PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 03000000380700001888000000000000,Mad Catz SFIV Fightstick PS3,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b5,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b4,righttrigger:b6,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows, 03000000380700008081000000000000,Mad Catz SFV Arcade Fightstick Alpha PS4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 03000000380700001847000000000000,Mad Catz Street Fighter 4 Xbox 360 FightStick,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b8,rightshoulder:b5,righttrigger:b9,start:b7,x:b2,y:b3,platform:Windows, 03000000380700008034000000000000,Mad Catz TE2 PS3 Fightstick,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 03000000380700008084000000000000,Mad Catz TE2 PS4 Fightstick,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 030000002a0600001024000000000000,Matricom,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a3,righty:a4,start:b9,x:b2,y:b3,platform:Windows, 030000009f000000adbb000000000000,MaxJoypad Virtual Controller,a:b1,b:b2,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3,start:b8,x:b3,y:b0,platform:Windows, 03000000250900000128000000000000,Mayflash Arcade Stick,a:b1,b:b2,back:b8,leftshoulder:b0,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b3,righttrigger:b7,start:b9,x:b5,y:b6,platform:Windows, 030000008f0e00001330000000000000,Mayflash Controller Adapter,a:b1,b:b2,back:b8,dpdown:h0.8,dpleft:h0.2,dpright:h0.1,dpup:h0.4,leftshoulder:b6,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightx:a3~,righty:a2,start:b9,x:b0,y:b3,platform:Windows, 03000000242f00003700000000000000,Mayflash F101,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Windows, 03000000790000003018000000000000,Mayflash F300 Arcade Joystick,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Windows, 03000000242f00003900000000000000,Mayflash F300 Elite Arcade Joystick,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 03000000790000004418000000000000,Mayflash GameCube Controller,a:b1,b:b2,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:a4,rightx:a5,righty:a2,start:b9,x:b0,y:b3,platform:Windows, 03000000790000004318000000000000,Mayflash GameCube Controller Adapter,a:b1,b:b2,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:a4,rightx:a5,righty:a2,start:b9,x:b0,y:b3,platform:Windows, 03000000242f00007300000000000000,Mayflash Magic NS,a:b1,b:b4,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b0,y:b3,platform:Windows, 0300000079000000d218000000000000,Mayflash Magic NS,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows, 03000000d620000010a7000000000000,Mayflash Magic NS,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 03000000242f0000f400000000000000,Mayflash N64 Controller Adapter,a:b1,b:b2,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightx:a2,righty:a5,start:b9,platform:Windows, 03000000790000007918000000000000,Mayflash N64 Controller Adapter,a:b1,b:b2,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b9,leftx:a0,lefty:a1,righttrigger:b7,rightx:a3,righty:a2,start:b8,platform:Windows, 030000008f0e00001030000000000000,Mayflash Saturn Adapter,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b5,lefttrigger:b7,rightshoulder:b6,righttrigger:b2,start:b9,x:b3,y:b4,platform:Windows, 0300000025090000e803000000000000,Mayflash Wii Classic Adapter,a:b1,b:b0,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:a4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:a5,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b2,platform:Windows, 03000000790000000318000000000000,Mayflash Wii DolphinBar,a:b2,b:b3,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b11,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b1,platform:Windows, 03000000790000000018000000000000,Mayflash Wii U Pro Adapter,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 03000000790000002418000000000000,Mega Drive Controller,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,rightshoulder:b2,start:b9,x:b3,y:b4,platform:Windows, 0300000079000000ae18000000000000,Mega Drive Controller,a:b0,b:b1,back:b7,dpdown:b14,dpleft:b15,dpright:b13,dpup:b2,rightshoulder:b6,righttrigger:b2,start:b9,x:b3,y:b4,platform:Windows, 03000000c0160000990a000000000000,Mega Drive Controller,a:b0,b:b1,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,righttrigger:b2,start:b3,platform:Windows, 030000005e0400002800000000000000,Microsoft Dual Strike,a:b3,b:b2,back:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b8,rightshoulder:b7,rightx:a0,righty:a1~,start:b5,x:b1,y:b0,platform:Windows, 030000005e0400000300000000000000,Microsoft SideWinder,a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b2,start:b8,x:b3,y:b4,platform:Windows, 030000005e0400000700000000000000,Microsoft SideWinder,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b2,start:b9,x:b3,y:b4,platform:Windows, 030000005e0400000e00000000000000,Microsoft SideWinder Freestyle Pro,a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b2,righttrigger:b5,start:b8,x:b3,y:b4,platform:Windows, 030000005e0400002700000000000000,Microsoft SideWinder Plug and Play,a:b0,b:b1,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,lefttrigger:b4,righttrigger:b5,x:b2,y:b3,platform:Windows, 03000000280d00000202000000000000,Miller Lite Cantroller,a:b0,b:b1,back:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftx:a0,lefty:a1,start:b5,x:b2,y:b3,platform:Windows, 03000000ad1b000023f0000000000000,MLG,a:b0,b:b1,back:b7,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a6,rightx:a3,righty:a4,start:b6,x:b2,y:b3,platform:Windows, 03000000ad1b00003ef0000000000000,MLG Fightstick TE,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b8,rightshoulder:b5,righttrigger:b9,start:b7,x:b2,y:b3,platform:Windows, 03000000380700006382000000000000,MLG PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 030000004523000015e0000000000000,Mobapad Chitu HD,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,misc1:b13,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows, 03000000491900000904000000000000,Mobapad Chitu HD,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,misc1:b15,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows, 03000000ffff00000000000000000000,Mocute M053,a:b3,b:b2,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b11,leftstick:b7,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b6,righttrigger:b4,rightx:a3,righty:a4,start:b8,x:b1,y:b0,platform:Windows, 03000000d6200000e589000000000000,Moga 2,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,rightx:a2,righty:a5,start:b7,x:b2,y:b3,platform:Windows, 03000000d62000007162000000000000,Moga Pro,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,rightx:a2,righty:a5,start:b7,x:b2,y:b3,platform:Windows, 03000000d6200000ad0d000000000000,Moga Pro,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 03000000c62400002a89000000000000,Moga XP5A Plus,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b15,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows, 03000000c62400002b89000000000000,Moga XP5A Plus,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows, 03000000c62400001a89000000000000,Moga XP5X Plus,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows, 03000000c62400001b89000000000000,Moga XP5X Plus,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows, 03000000250900006688000000000000,MP-8866 Super Dual Box,a:b2,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a2,righty:a3,start:b8,x:b3,y:b0,platform:Windows, 03000000091200004488000000000000,MUSIA PlayStation 2 Input Display,a:b0,b:b2,back:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b8,leftstick:b6,lefttrigger:b10,leftx:a0,lefty:a1,rightshoulder:b9,rightstick:b7,righttrigger:b11,rightx:a2,righty:a3,start:b5,x:b1,y:b3,platform:Windows, 03000000f70600000100000000000000,N64 Adaptoid,+rightx:b2,+righty:b1,-rightx:b4,-righty:b5,a:b0,b:b3,dpdown:b11,dpleft:b12,dpright:b13,dpup:b10,leftshoulder:b6,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b7,start:b8,platform:Windows, 030000006b140000010c000000000000,Nacon GC 400ES,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows, 030000006b1400001106000000000000,Nacon Revolution 3 PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 0300000085320000170d000000000000,Nacon Revolution 5 Pro,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,touchpad:b13,x:b0,y:b3,platform:Windows, 0300000085320000190d000000000000,Nacon Revolution 5 Pro,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,touchpad:b13,x:b0,y:b3,platform:Windows, 030000006b140000100d000000000000,Nacon Revolution Infinity PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 030000006b140000080d000000000000,Nacon Revolution Unlimited Pro Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 03000000bd12000001c0000000000000,Nebular,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a5,righty:a2,start:b9,x:b3,y:b0,platform:Windows, 03000000eb0300000000000000000000,NeGcon Adapter,a:a2,b:b13,dpdown:b6,dpleft:b7,dpright:b5,dpup:b4,lefttrigger:a4,leftx:a1,righttrigger:b11,start:b3,x:a3,y:b12,platform:Windows, 0300000038070000efbe000000000000,NEO SE,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a2,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 0300000092120000474e000000000000,NeoGeo X Arcade Stick,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,start:b9,x:b3,y:b2,platform:Windows, 03000000921200004b46000000000000,NES 2 port Adapter,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,start:b11,platform:Windows, 03000000000f00000100000000000000,NES Controller,a:b1,b:b0,back:b2,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,start:b3,platform:Windows, 03000000921200004346000000000000,NES Controller,a:b0,b:b1,back:b2,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,start:b3,platform:Windows, 03000000790000004518000000000000,NEXILUX GameCube Controller Adapter,a:b1,b:b0,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:a4,rightx:a5,righty:a2,start:b9,x:b2,y:b3,platform:Windows, 030000001008000001e5000000000000,NEXT SNES Controller,a:b2,b:b1,back:b8,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,rightshoulder:b5,righttrigger:b6,start:b9,x:b3,y:b0,platform:Windows, 03000000050b00000045000000000000,Nexus,a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b7,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b8,righttrigger:a4,rightx:a2,righty:a3,start:b10,x:b2,y:b3,platform:Windows, 03000000152000000182000000000000,NGDS,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a3,righty:a4,start:b9,x:b3,y:b0,platform:Windows, 030000007e0500000920000000000000,Nintendo Switch Pro Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,misc1:b13,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows, 030000000d0500000308000000000000,Nostromo N45,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b9,leftshoulder:b4,leftstick:b12,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b10,x:b2,y:b3,platform:Windows, 030000007e0500001920000000000000,NSO N64 Controller,+rightx:b8,+righty:b2,-rightx:b3,-righty:b7,a:b1,b:b0,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,misc1:b13,rightshoulder:b5,righttrigger:b10,start:b9,platform:Windows, 030000007e0500001720000000000000,NSO SNES Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b15,start:b9,x:b2,y:b3,platform:Windows, 03000000550900001472000000000000,NVIDIA Controller,a:b11,b:b10,back:b13,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b7,leftstick:b5,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b4,righttrigger:a5,rightx:a3,righty:a6,start:b3,x:b9,y:b8,platform:Windows, 03000000550900001072000000000000,NVIDIA Shield,a:b9,b:b8,back:b11,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b5,leftstick:b3,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b4,rightstick:b2,righttrigger:a4,rightx:a2,righty:a5,start:b0,x:b7,y:b6,platform:Windows, 030000005509000000b4000000000000,NVIDIA Virtual,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:+a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:-a2,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 03000000120c00000288000000000000,Nyko Air Flo Xbox Controller,a:b0,b:b1,back:b7,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b10,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b11,rightx:a3,righty:a4,start:b6,x:b2,y:b3,platform:Windows, 030000004b120000014d000000000000,Nyko Airflo,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:a3,leftstick:a0,lefttrigger:b6,rightshoulder:b5,rightstick:a2,righttrigger:b7,start:b9,x:b2,y:b3,platform:Windows, 03000000d62000001d57000000000000,Nyko Airflo PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 03000000791d00000900000000000000,Nyko Playpad,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,rightx:a2,righty:a5,start:b11,x:b3,y:b4,platform:Windows, 03000000782300000a10000000000000,Onlive Controller,a:b15,b:b14,back:b7,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b11,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a3,righty:a4,start:b6,x:b13,y:b12,platform:Windows, 030000000d0f00000401000000000000,Onyx,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 030000008916000001fd000000000000,Onza CE,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a3,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 030000008916000000fd000000000000,Onza TE,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 03000000d62000006d57000000000000,OPP PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 030000006b14000001a1000000000000,Orange Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a4,rightx:a5,righty:a2,start:b9,x:b2,y:b3,platform:Windows, 03000000362800000100000000000000,OUYA Controller,a:b0,b:b3,dpdown:b9,dpleft:b10,dpright:b11,dpup:b8,guide:b14,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:b13,rightx:a3,righty:a4,x:b1,y:b2,platform:Windows, 03000000120c0000f60e000000000000,P4 Gamepad,a:b1,b:b2,back:b12,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b5,lefttrigger:b7,rightshoulder:b4,righttrigger:b6,start:b9,x:b0,y:b3,platform:Windows, 03000000790000002201000000000000,PC Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows, 030000006f0e00008501000000000000,PDP Fightpad Pro GameCube Controller,a:b1,b:b0,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,misc1:b13,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows, 030000006f0e00000901000000000000,PDP PS3 Versus Fighting,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Windows, 030000008f0e00004100000000000000,PlaySega,a:b1,b:b0,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,lefttrigger:b7,rightshoulder:b5,righttrigger:b2,start:b8,x:b4,y:b3,platform:Windows, 03000000666600006706000000000000,PlayStation Adapter,a:b2,b:b1,back:b8,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,leftshoulder:b6,leftstick:b9,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b10,righttrigger:b5,rightx:a2,righty:a3,start:b11,x:b3,y:b0,platform:Windows, 03000000e30500009605000000000000,PlayStation Adapter,a:b2,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a2,righty:a3,start:b8,x:b3,y:b0,platform:Windows, 030000004c050000da0c000000000000,PlayStation Classic Controller,a:b2,b:b1,back:b8,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,lefttrigger:b4,rightshoulder:b7,righttrigger:b5,start:b9,x:b3,y:b0,platform:Windows, 03000000632500002306000000000000,PlayStation Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Windows, 03000000f0250000c183000000000000,PlayStation Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 03000000d9040000160f000000000000,PlayStation Controller Adapter,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a3,righty:a2,start:b9,x:b3,y:b0,platform:Windows, 030000004c0500003713000000000000,PlayStation Vita,a:b1,b:b2,back:b8,dpdown:b13,dpleft:b15,dpright:b14,dpup:b12,leftshoulder:b4,leftx:a0,lefty:a1,rightshoulder:b5,rightx:a3,righty:a4,start:b9,x:b0,y:b3,platform:Windows, 03000000d620000011a7000000000000,PowerA Core Plus GameCube Controller,a:b1,b:b0,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,misc1:b13,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows, 03000000dd62000015a7000000000000,PowerA Fusion Nintendo Switch Arcade Stick,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,misc1:b13,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 03000000d620000012a7000000000000,PowerA Fusion Nintendo Switch Fight Pad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,misc1:b13,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 03000000dd62000016a7000000000000,PowerA Fusion Pro Nintendo Switch Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,misc1:b13,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 03000000d620000013a7000000000000,PowerA Nintendo Switch Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,misc1:b13,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 03000000d62000006dca000000000000,PowerA Pro Ex,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 0300000062060000d570000000000000,PowerA PS3 Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 03000000d620000014a7000000000000,PowerA Spectra Nintendo Switch Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,misc1:b13,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 030000006d04000084ca000000000000,Precision,a:b0,b:b1,back:b7,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b5,leftstick:b8,lefttrigger:b10,leftx:a0,lefty:a1,rightshoulder:b4,rightstick:b9,righttrigger:b11,rightx:a3,righty:a4,start:b6,x:b2,y:b3,platform:Windows, 03000000d62000009557000000000000,Pro Elite PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 03000000c62400001a53000000000000,Pro Ex Mini,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b10,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b11,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 03000000d62000009f31000000000000,Pro Ex mini PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 03000000d6200000c757000000000000,Pro Ex mini PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 03000000120c0000110e000000000000,Pro5,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 03000000100800000100000000000000,PS1 Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a3,righty:a2,start:b9,x:b3,y:b0,platform:Windows, 030000008f0e00007530000000000000,PS1 Controller,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b1,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 03000000100800000300000000000000,PS2 Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a4,righty:a2,start:b9,x:b3,y:b0,platform:Windows, 03000000250900000088000000000000,PS2 Controller,a:b2,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a2,righty:a3,start:b8,x:b3,y:b0,platform:Windows, 03000000250900006888000000000000,PS2 Controller,a:b2,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b5,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b6,rightx:a2,righty:a3,start:b8,x:b3,y:b0,platform:Windows, 03000000250900008888000000000000,PS2 Controller,a:b2,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a2,righty:a3,start:b8,x:b3,y:b0,platform:Windows, 030000006b1400000303000000000000,PS2 Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows, 030000009d0d00001330000000000000,PS2 Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows, 03000000151a00006222000000000000,PS2 Dual Plus Adapter,a:b2,b:b1,back:b9,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a2,righty:a3,start:b8,x:b3,y:b0,platform:Windows, 03000000120a00000100000000000000,PS3 Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a5,start:b11,x:b3,y:b4,platform:Windows, 03000000120c00001307000000000000,PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 03000000120c00001cf1000000000000,PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 03000000120c0000f90e000000000000,PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 03000000250900000118000000000000,PS3 Controller,a:b2,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a2,righty:a3,start:b8,x:b3,y:b0,platform:Windows, 03000000250900000218000000000000,PS3 Controller,a:b2,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a2,righty:a3,start:b8,x:b3,y:b0,platform:Windows, 03000000250900000500000000000000,PS3 Controller,a:b2,b:b1,back:b9,dpdown:h0.8,dpleft:h0.4,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a2,righty:a3,start:b8,x:b0,y:b3,platform:Windows, 030000004c0500006802000000000000,PS3 Controller,a:b2,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b10,lefttrigger:a3~,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:a4~,rightx:a2,righty:a5,start:b8,x:b3,y:b0,platform:Windows, 030000004f1f00000800000000000000,PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Windows, 03000000632500007505000000000000,PS3 Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows, 03000000888800000803000000000000,PS3 Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b9,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:b7,rightx:a3,righty:a4,start:b11,x:b3,y:b0,platform:Windows, 03000000888800000804000000000000,PS3 Controller,a:b14,b:b13,back:b0,dpdown:b6,dpleft:b7,dpright:b5,dpup:b4,guide:b16,leftshoulder:b10,leftstick:b1,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b11,rightstick:b2,righttrigger:b9,rightx:a2,righty:a3,start:b3,x:b15,y:b12,platform:Windows, 030000008f0e00000300000000000000,PS3 Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b3,y:b0,platform:Windows, 030000008f0e00001431000000000000,PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 03000000ba2200002010000000000000,PS3 Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a5,righty:a2,start:b9,x:b3,y:b2,platform:Windows, 03000000120c00000807000000000000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 03000000120c0000111e000000000000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 03000000120c0000121e000000000000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 03000000120c0000130e000000000000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 03000000120c0000150e000000000000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 03000000120c0000180e000000000000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 03000000120c0000181e000000000000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 03000000120c0000191e000000000000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 03000000120c00001e0e000000000000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 03000000120c0000a957000000000000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 03000000120c0000aa57000000000000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 03000000120c0000f21c000000000000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 03000000120c0000f31c000000000000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 03000000120c0000f41c000000000000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 03000000120c0000f51c000000000000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 03000000120c0000f70e000000000000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 03000000120e0000120c000000000000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 03000000160e0000120c000000000000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 030000001a1e0000120c000000000000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 030000004c050000a00b000000000000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 030000004c050000c405000000000000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,touchpad:b13,x:b0,y:b3,platform:Windows, 030000004c050000cc09000000000000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 030000004c050000e60c000000000000,PS5 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,misc1:b14,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,touchpad:b13,x:b0,y:b3,platform:Windows, 030000004c050000f20d000000000000,PS5 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,misc1:b14,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,touchpad:b13,x:b0,y:b3,platform:Windows, 03000000830500005020000000000000,PSX,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b7,rightx:a2,righty:a3,start:b11,x:b2,y:b3,platform:Windows, 03000000300f00000111000000000000,Qanba 2,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 03000000300f00000211000000000000,Qanba 2P,a:b1,b:b0,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows, 03000000300f00000011000000000000,Qanba Arcade Stick 1008,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,start:b10,x:b0,y:b3,platform:Windows, 03000000300f00001611000000000000,Qanba Arcade Stick 4018,a:b1,b:b2,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b9,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b8,x:b0,y:b3,platform:Windows, 03000000222c00000025000000000000,Qanba Dragon Arcade Joystick,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 03000000222c00000020000000000000,Qanba Drone Arcade Stick,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:a3,rightshoulder:b5,righttrigger:a4,start:b9,x:b0,y:b3,platform:Windows, 03000000300f00001211000000000000,Qanba Joystick,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 03000000300f00001210000000000000,Qanba Joystick Plus,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,rightshoulder:b5,start:b9,x:b2,y:b3,platform:Windows, 03000000341a00000104000000000000,Qanba Joystick Q4RAF,a:b5,b:b6,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b0,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b3,righttrigger:b7,start:b9,x:b1,y:b2,platform:Windows, 03000000222c00000223000000000000,Qanba Obsidian Arcade Stick PS3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 03000000222c00000023000000000000,Qanba Obsidian Arcade Stick PS4,a:b1,b:b2,back:b13,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 030000008a2400006682000000000000,R1 Mobile Controller,a:b3,b:b1,back:b7,leftx:a0,lefty:a1,start:b6,x:b4,y:b0,platform:Windows, 03000000086700006626000000000000,RadioShack,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b3,y:b0,platform:Windows, 03000000ff1100004733000000000000,Ramox FPS Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,start:b9,x:b3,y:b0,platform:Windows, 030000009b2800002300000000000000,Raphnet 3DO Adapter,a:b0,b:b1,back:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b2,start:b3,platform:Windows, 030000009b2800006900000000000000,Raphnet 3DO Adapter,a:b0,b:b1,back:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b2,start:b3,platform:Windows, 030000009b2800000800000000000000,Raphnet Dreamcast Adapter,a:b2,b:b1,dpdown:b5,dpleft:b6,dpright:b7,dpup:b4,lefttrigger:a2,leftx:a0,righttrigger:a3,righty:a1,start:b3,x:b10,y:b9,platform:Windows, 030000009b2800006200000000000000,Raphnet GameCube Adapter,a:b0,b:b7,dpdown:b11,dpleft:b12,dpright:b13,dpup:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b2,righttrigger:b5,rightx:a3,righty:a4,start:b3,x:b1,y:b8,platform:Windows, 030000009b2800003200000000000000,Raphnet GC and N64 Adapter,a:b0,b:b7,dpdown:b11,dpleft:b12,dpright:b13,dpup:b10,lefttrigger:+a5,leftx:a0,lefty:a1,rightshoulder:b2,righttrigger:+a2,rightx:a3,righty:a4,start:b3,x:b1,y:b8,platform:Windows, 030000009b2800006000000000000000,Raphnet GC and N64 Adapter,a:b0,b:b7,dpdown:b11,dpleft:b12,dpright:b13,dpup:b10,lefttrigger:+a5,leftx:a0,lefty:a1,rightshoulder:b2,righttrigger:+a2,rightx:a3,righty:a4,start:b3,x:b1,y:b8,platform:Windows, 030000009b2800001800000000000000,Raphnet Jaguar Adapter,a:b2,b:b1,back:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b0,righttrigger:b10,start:b3,x:b11,y:b12,platform:Windows, 030000009b2800006300000000000000,Raphnet N64 Adapter,+rightx:b9,+righty:b7,-rightx:b8,-righty:b6,a:b0,b:b1,dpdown:b11,dpleft:b12,dpright:b13,dpup:b10,leftshoulder:b4,lefttrigger:b2,leftx:a0,lefty:a1,rightshoulder:b5,start:b3,platform:Windows, 030000009b2800000200000000000000,Raphnet NES Adapter,a:b7,b:b6,back:b5,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftx:a0,lefty:a1,start:b4,platform:Windows, 030000009b2800004400000000000000,Raphnet PS1 and PS2 Adapter,a:b1,b:b2,back:b5,dpdown:b13,dpleft:b14,dpright:b15,dpup:b12,leftshoulder:b6,leftstick:b10,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b9,rightx:a3,righty:a4,start:b4,x:b0,y:b3,platform:Windows, 030000009b2800004300000000000000,Raphnet Saturn,a:b0,b:b1,dpdown:b13,dpleft:b14,dpright:b15,dpup:b12,leftshoulder:b6,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b2,start:b8,x:b3,y:b4,platform:Windows, 030000009b2800000500000000000000,Raphnet Saturn Adapter 2.0,a:b1,b:b2,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,lefttrigger:b4,rightshoulder:b7,righttrigger:b5,start:b9,x:b0,y:b3,platform:Windows, 030000009b2800000300000000000000,Raphnet SNES Adapter,a:b0,b:b4,back:b2,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b3,x:b1,y:b5,platform:Windows, 030000009b2800005600000000000000,Raphnet SNES Adapter,a:b1,b:b4,back:b2,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,rightshoulder:b7,start:b3,x:b0,y:b5,platform:Windows, 030000009b2800005700000000000000,Raphnet SNES Adapter,a:b1,b:b4,back:b2,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,rightshoulder:b7,start:b3,x:b0,y:b5,platform:Windows, 030000009b2800001e00000000000000,Raphnet Vectrex Adapter,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftx:a1,lefty:a2,x:b2,y:b3,platform:Windows, 030000009b2800002b00000000000000,Raphnet Wii Classic Adapter,a:b1,b:b4,back:b2,dpdown:b13,dpleft:b14,dpright:b15,dpup:b12,guide:b10,leftshoulder:b6,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b9,rightx:a3,righty:a4,start:b3,x:b0,y:b5,platform:Windows, 030000009b2800002c00000000000000,Raphnet Wii Classic Adapter,a:b1,b:b4,back:b2,dpdown:b13,dpleft:b14,dpright:b15,dpup:b12,guide:b10,leftshoulder:b6,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b9,rightx:a3,righty:a4,start:b3,x:b0,y:b5,platform:Windows, 030000009b2800008000000000000000,Raphnet Wii Classic Adapter,a:b1,b:b4,back:b2,dpdown:b13,dpleft:b14,dpright:b15,dpup:b12,guide:b10,leftshoulder:b6,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b9,rightx:a3,righty:a4,start:b3,x:b0,y:b5,platform:Windows, 03000000321500000003000000000000,Razer Hydra,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a2,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 03000000f8270000bf0b000000000000,Razer Kishi,a:b6,b:b7,back:b16,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b18,leftshoulder:b12,leftstick:b19,lefttrigger:b14,leftx:a0,lefty:a1,rightshoulder:b13,rightstick:b20,righttrigger:b15,rightx:a3,righty:a4,start:b17,x:b9,y:b10,platform:Windows, 03000000321500000204000000000000,Razer Panthera PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 03000000321500000104000000000000,Razer Panthera PS4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 03000000321500000010000000000000,Razer Raiju,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 03000000321500000507000000000000,Razer Raiju Mobile,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows, 03000000321500000707000000000000,Razer Raiju Mobile,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows, 03000000321500000710000000000000,Razer Raiju TE,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 03000000321500000a10000000000000,Razer Raiju TE,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 03000000321500000410000000000000,Razer Raiju UE,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 03000000321500000910000000000000,Razer Raiju UE,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 03000000321500000011000000000000,Razer Raion PS4 Fightpad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 03000000321500000009000000000000,Razer Serval,+lefty:+a2,-lefty:-a1,a:b0,b:b1,back:b12,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b8,leftx:a0,rightshoulder:b5,rightstick:b9,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 03000000921200004547000000000000,Retro Bit Sega Genesis Controller Adapter,a:b0,b:b1,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,lefttrigger:b7,rightshoulder:b5,righttrigger:b2,start:b6,x:b3,y:b4,platform:Windows, 03000000790000001100000000000000,Retro Controller,a:b1,b:b2,back:b8,dpdown:+a4,dpleft:-a3,dpright:+a3,dpup:-a4,leftshoulder:b6,lefttrigger:b7,rightshoulder:b4,righttrigger:b5,start:b9,x:b0,y:b3,platform:Windows, 03000000830500006020000000000000,Retro Controller,a:b0,b:b1,back:b6,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,lefttrigger:b5,rightshoulder:b8,righttrigger:b9,start:b7,x:b2,y:b3,platform:Windows, 0300000003040000c197000000000000,Retrode Adapter,a:b0,b:b4,back:b2,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,rightshoulder:b7,start:b3,x:b1,y:b5,platform:Windows, 03000000bd12000013d0000000000000,Retrolink Sega Saturn Classic Controller,a:b0,b:b1,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b5,lefttrigger:b6,rightshoulder:b2,righttrigger:b7,start:b8,x:b3,y:b4,platform:Windows, 03000000bd12000015d0000000000000,Retrolink SNES Controller,a:b2,b:b1,back:b8,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,rightshoulder:b5,start:b9,x:b3,y:b0,platform:Windows, 03000000341200000400000000000000,RetroUSB N64 RetroPort,+rightx:b8,+righty:b10,-rightx:b9,-righty:b11,a:b7,b:b6,dpdown:b2,dpleft:b1,dpright:b0,dpup:b3,leftshoulder:b13,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b12,start:b4,platform:Windows, 0300000000f000000300000000000000,RetroUSB RetroPad,a:b1,b:b5,back:b2,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,rightshoulder:b7,start:b3,x:b0,y:b4,platform:Windows, 0300000000f00000f100000000000000,RetroUSB Super RetroPort,a:b1,b:b5,back:b2,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,rightshoulder:b7,start:b3,x:b0,y:b4,platform:Windows, 03000000830500000960000000000000,Revenger,a:b0,b:b1,leftshoulder:b6,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b2,righttrigger:b3,x:b4,y:b5,platform:Windows, 030000006b140000010d000000000000,Revolution Pro Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 030000006b140000020d000000000000,Revolution Pro Controller 2,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 030000006b140000130d000000000000,Revolution Pro Controller 3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 030000006f0e00001f01000000000000,Rock Candy,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a2,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 030000006f0e00004601000000000000,Rock Candy,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 03000000c6240000fefa000000000000,Rock Candy Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 030000006f0e00008701000000000000,Rock Candy Nintendo Switch Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,misc1:b13,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 030000006f0e00001e01000000000000,Rock Candy PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 030000006f0e00002801000000000000,Rock Candy PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 030000006f0e00002f01000000000000,Rock Candy PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 03000000050b0000e318000000000000,ROG Chakram,a:b1,b:b0,leftx:a0,lefty:a1,x:b2,y:b3,platform:Windows, 03000000050b0000e518000000000000,ROG Chakram,a:b1,b:b0,leftx:a0,lefty:a1,x:b2,y:b3,platform:Windows, 03000000050b00005819000000000000,ROG Chakram Core,a:b1,b:b0,leftx:a0,lefty:a1,x:b2,y:b3,platform:Windows, 03000000050b0000181a000000000000,ROG Chakram X,a:b1,b:b0,leftx:a0,lefty:a1,x:b2,y:b3,platform:Windows, 03000000050b00001a1a000000000000,ROG Chakram X,a:b1,b:b0,leftx:a0,lefty:a1,x:b2,y:b3,platform:Windows, 03000000050b00001c1a000000000000,ROG Chakram X,a:b1,b:b0,leftx:a0,lefty:a1,x:b2,y:b3,platform:Windows, 030000004f04000001d0000000000000,Rumble Force,a:b0,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b1,y:b3,platform:Windows, 030000008916000000fe000000000000,Sabertooth,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 03000000c6240000045d000000000000,Sabertooth,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 03000000a30600001af5000000000000,Saitek Cyborg,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a3,righty:a4,start:b9,x:b0,y:b3,platform:Windows, 03000000a306000023f6000000000000,Saitek Cyborg V.1 Game,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a4,start:b9,x:b0,y:b3,platform:Windows, 03000000300f00001201000000000000,Saitek Dual Analog,a:b2,b:b3,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b0,y:b1,platform:Windows, 03000000a30600000701000000000000,Saitek P220,a:b2,b:b3,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,lefttrigger:b7,rightshoulder:b4,righttrigger:b5,x:b0,y:b1,platform:Windows, 03000000a30600000cff000000000000,Saitek P2500 Force Rumble,a:b2,b:b3,back:b11,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b7,rightx:a2,righty:a3,start:b10,x:b0,y:b1,platform:Windows, 03000000a30600000d5f000000000000,Saitek P2600,a:b1,b:b2,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a3,righty:a2,start:b8,x:b0,y:b3,platform:Windows, 03000000a30600000dff000000000000,Saitek P2600,a:b1,b:b2,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a5,righty:a2,start:b8,x:b0,y:b3,platform:Windows, 03000000a30600000c04000000000000,Saitek P2900,a:b1,b:b2,back:b12,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b0,y:b3,platform:Windows, 03000000a306000018f5000000000000,Saitek P3200,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a3,righty:a4,start:b9,x:b0,y:b3,platform:Windows, 03000000300f00001001000000000000,Saitek P480 Rumble,a:b2,b:b3,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b0,y:b1,platform:Windows, 03000000a30600000901000000000000,Saitek P880,a:b2,b:b3,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b8,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b4,rightstick:b9,righttrigger:b5,rightx:a3,righty:a2,x:b0,y:b1,platform:Windows, 03000000a30600000b04000000000000,Saitek P990,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b0,y:b3,platform:Windows, 03000000a30600002106000000000000,Saitek PS1000 PlayStation Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a4,start:b9,x:b0,y:b3,platform:Windows, 03000000a306000020f6000000000000,Saitek PS2700 PlayStation Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a4,start:b9,x:b0,y:b3,platform:Windows, 03000000300f00001101000000000000,Saitek Rumble,a:b2,b:b3,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b0,y:b1,platform:Windows, 03000000e804000000a0000000000000,Samsung EIGP20,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows, 03000000c01100000252000000000000,Sanwa Easy Grip,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b2,start:b9,x:b3,y:b4,platform:Windows, 03000000c01100004350000000000000,Sanwa Micro Grip P3,a:b1,b:b0,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,x:b3,y:b2,platform:Windows, 03000000411200004550000000000000,Sanwa Micro Grip Pro,a:b0,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a1,righty:a2,start:b9,x:b1,y:b3,platform:Windows, 03000000c01100004150000000000000,Sanwa Micro Grip Pro,a:b0,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b1,y:b3,platform:Windows, 03000000c01100004450000000000000,Sanwa Online Grip,a:b0,b:b1,back:b12,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b8,rightstick:b11,righttrigger:b9,rightx:a3,righty:a2,start:b14,x:b3,y:b4,platform:Windows, 03000000730700000401000000000000,Sanwa PlayOnline Mobile,a:b0,b:b1,back:b2,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,start:b3,platform:Windows, 03000000830500006120000000000000,Sanwa Smart Grip II,a:b0,b:b2,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,x:b1,y:b3,platform:Windows, 03000000c01100000051000000000000,Satechi Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a5,start:b11,x:b3,y:b4,platform:Windows, 030000004f04000028b3000000000000,Score A,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 03000000952e00002577000000000000,Scuf PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 03000000a30c00002500000000000000,Sega Genesis Mini 3B Controller,a:b2,b:b1,dpdown:+a4,dpleft:-a3,dpright:+a3,dpup:-a4,righttrigger:b5,start:b9,platform:Windows, 03000000a30c00002400000000000000,Sega Mega Drive Mini 6B Controller,a:b2,b:b1,dpdown:+a4,dpleft:-a3,dpright:+a3,dpup:-a4,rightshoulder:b4,righttrigger:b5,start:b9,x:b3,y:b0,platform:Windows, 03000000d804000086e6000000000000,Sega Multi Controller,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b7,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b2,start:b8,x:b3,y:b4,platform:Windows, 0300000000050000289b000000000000,Sega Saturn Adapter,a:b1,b:b2,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,lefttrigger:b4,rightshoulder:b7,righttrigger:b5,start:b9,x:b0,y:b3,platform:Windows, 0300000000f000000800000000000000,Sega Saturn Controller,a:b1,b:b2,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,rightshoulder:b7,righttrigger:b3,start:b0,x:b5,y:b6,platform:Windows, 03000000730700000601000000000000,Sega Saturn Controller,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b2,start:b9,x:b3,y:b4,platform:Windows, 03000000b40400000a01000000000000,Sega Saturn Controller,a:b0,b:b1,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,lefttrigger:b7,rightshoulder:b5,righttrigger:b2,start:b8,x:b3,y:b4,platform:Windows, 030000003b07000004a1000000000000,SFX,a:b0,b:b2,back:b7,leftshoulder:b6,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b9,righttrigger:b5,start:b8,x:b1,y:b3,platform:Windows, 03000000f82100001900000000000000,Shogun Bros Chameleon X1,a:b2,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b5,rightx:a2,righty:a3,start:b8,x:b3,y:b0,platform:Windows, 03000000120c00001c1e000000000000,SnakeByte 4S PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 0300000081170000960a000000000000,SNES Controller,a:b4,b:b0,back:b2,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,rightshoulder:b7,start:b3,x:b5,y:b1,platform:Windows, 03000000811700009d0a000000000000,SNES Controller,a:b0,b:b4,back:b2,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b3,x:b1,y:b5,platform:Windows, 030000008b2800000300000000000000,SNES Controller,a:b0,b:b4,back:b2,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b3,x:b1,y:b5,platform:Windows, 03000000921200004653000000000000,SNES Controller,a:b0,b:b4,back:b2,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,rightshoulder:b7,start:b3,x:b1,y:b5,platform:Windows, 03000000ff000000cb01000000000000,Sony PlayStation Portable,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftx:a0,lefty:a1,rightshoulder:b5,start:b7,x:b2,y:b3,platform:Windows, 03000000341a00000208000000000000,Speedlink 6555,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:-a4,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a4,rightx:a3,righty:a2,start:b7,x:b2,y:b3,platform:Windows, 03000000341a00000908000000000000,Speedlink 6566,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows, 03000000380700001722000000000000,Speedlink Competition Pro,a:b0,b:b1,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,x:b2,y:b3,platform:Windows, 030000008f0e00000800000000000000,Speedlink Strike FX,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows, 03000000c01100000591000000000000,Speedlink Torid,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows, 03000000d11800000094000000000000,Stadia Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:b12,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:b11,rightx:a3,righty:a4,start:b9,x:b2,y:b3,platform:Windows, 03000000de280000fc11000000000000,Steam Virtual Gamepad,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 03000000de280000ff11000000000000,Steam Virtual Gamepad,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:+a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:-a2,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 03000000120c0000160e000000000000,Steel Play Metaltech PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 03000000110100001914000000000000,SteelSeries,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftstick:b13,lefttrigger:b6,leftx:a0,lefty:a1,rightstick:b14,righttrigger:b7,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows, 03000000381000001214000000000000,SteelSeries Free,a:b0,b:b1,back:b12,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Windows, 03000000110100003114000000000000,SteelSeries Stratus Duo,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows, 03000000381000003014000000000000,SteelSeries Stratus Duo,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 03000000381000003114000000000000,SteelSeries Stratus Duo,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 03000000381000001814000000000000,SteelSeries Stratus XL,a:b0,b:b1,back:b18,dpdown:b13,dpleft:b14,dpright:b15,dpup:b12,guide:b19,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b2,y:b3,platform:Windows, 03000000790000001c18000000000000,STK 7024X,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows, 03000000380700003847000000000000,Street Fighter Fightstick TE,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b10,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b11,start:b7,x:b2,y:b3,platform:Windows, 030000001f08000001e4000000000000,Super Famicom Controller,a:b2,b:b1,back:b8,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,rightshoulder:b5,start:b9,x:b3,y:b0,platform:Windows, 03000000790000000418000000000000,Super Famicom Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b33,rightshoulder:b5,start:b7,x:b2,y:b3,platform:Windows, 03000000341200001300000000000000,Super Racer,a:b2,b:b3,back:b8,leftshoulder:b5,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b4,righttrigger:b7,x:b0,y:b1,platform:Windows, 03000000457500002211000000000000,Szmy Power PC Gamepad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 030000004f0400000ab1000000000000,T16000M,a:b0,b:b1,back:b12,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b11,leftshoulder:b4,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b6,righttrigger:b7,start:b10,x:b2,y:b3,platform:Windows, 030000000d0f00007b00000000000000,TAC GEAR,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 03000000e40a00000207000000000000,Taito Egret II Mini Controller,a:b4,b:b2,back:b6,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,guide:b9,rightshoulder:b0,righttrigger:b1,start:b7,x:b8,y:b3,platform:Windows, 03000000d814000001a0000000000000,TE Kitty,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 03000000fa1900000706000000000000,Team 5,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows, 03000000b50700001203000000000000,Techmobility X6-38V,a:b2,b:b3,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b0,y:b1,platform:Windows, 03000000ba2200000701000000000000,Technology Innovation PS2 Adapter,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b3,y:b2,platform:Windows, 03000000c61100001000000000000000,Tencent Xianyou Gamepad,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,x:b3,y:b4,platform:Windows, 03000000790000002601000000000000,TGZ,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b3,y:b0,platform:Windows, 03000000591c00002400000000000000,THEC64 Joystick,a:b0,b:b1,back:b6,leftshoulder:b4,leftx:a0,lefty:a4,rightshoulder:b5,start:b7,x:b2,y:b3,platform:Windows, 03000000591c00002600000000000000,THEGamepad,a:b2,b:b1,back:b6,leftx:a0,lefty:a1,start:b7,x:b3,y:b0,platform:Windows, 030000004f04000015b3000000000000,Thrustmaster Dual Analog 4,a:b0,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b1,y:b3,platform:Windows, 030000004f04000023b3000000000000,Thrustmaster Dual Trigger PlayStation Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 030000004f0400000ed0000000000000,ThrustMaster eSwap Pro Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 030000004f04000008d0000000000000,ThrustMaster Ferrari 150 PlayStation Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 030000004f04000000b3000000000000,Thrustmaster Firestorm Dual Power,a:b0,b:b2,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b11,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b12,righttrigger:b7,rightx:a2,righty:a3,start:b10,x:b1,y:b3,platform:Windows, 030000004f04000004b3000000000000,Thrustmaster Firestorm Dual Power,a:b0,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b1,y:b3,platform:Windows, 030000004f04000003d0000000000000,ThrustMaster Run N Drive PlayStation Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b7,leftshoulder:a3,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:a4,rightstick:b11,righttrigger:b5,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 030000004f04000009d0000000000000,ThrustMaster Run N Drive PlayStation Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 030000006d04000088ca000000000000,Thunderpad,a:b0,b:b1,back:b7,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b5,leftstick:b8,lefttrigger:b10,leftx:a0,lefty:a1,rightshoulder:b4,rightstick:b9,righttrigger:b11,rightx:a3,righty:a4,start:b6,x:b2,y:b3,platform:Windows, 03000000666600000288000000000000,TigerGame PlayStation Adapter,a:b2,b:b1,back:b9,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a2,righty:a3,start:b8,x:b3,y:b0,platform:Windows, 03000000666600000488000000000000,TigerGame PlayStation Adapter,a:b2,b:b1,back:b9,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a2,righty:a3,start:b8,x:b3,y:b0,platform:Windows, 030000004f04000007d0000000000000,TMini,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 03000000571d00002100000000000000,Tomee NES Controller Adapter,a:b1,b:b0,back:b2,dpdown:+a4,dpleft:-a0,dpright:+a0,dpup:-a4,start:b3,platform:Windows, 03000000571d00002000000000000000,Tomee SNES Controller Adapter,a:b0,b:b1,back:b6,dpdown:+a4,dpleft:-a0,dpright:+a0,dpup:-a4,leftshoulder:b4,rightshoulder:b5,start:b7,x:b2,y:b3,platform:Windows, 03000000d62000006000000000000000,Tournament PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 03000000c01100000055000000000000,Tronsmart,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows, 030000005f140000c501000000000000,Trust Gamepad,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows, 03000000b80500000210000000000000,Trust Gamepad,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows, 030000004f04000087b6000000000000,TWCS Throttle,dpdown:b8,dpleft:b9,dpright:b7,dpup:b6,leftstick:b5,lefttrigger:-a5,leftx:a0,lefty:a1,righttrigger:+a5,platform:Windows, 03000000411200000450000000000000,Twin Shock,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b9,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b10,righttrigger:b5,rightx:a3,righty:a4,start:b11,x:b3,y:b0,platform:Windows, 03000000d90400000200000000000000,TwinShock PS2 Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a3,righty:a2,start:b9,x:b3,y:b0,platform:Windows, 03000000151900005678000000000000,Uniplay U6,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows, 03000000101c0000171c000000000000,uRage Gamepad,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows, 030000000b0400003065000000000000,USB Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b3,y:b0,platform:Windows, 03000000242f00006e00000000000000,USB Controller,a:b1,b:b4,back:b10,leftshoulder:b8,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b9,righttrigger:b7,rightx:a2,righty:a5,start:b11,x:b0,y:b3,platform:Windows, 03000000300f00000701000000000000,USB Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b3,y:b0,platform:Windows, 03000000341a00002308000000000000,USB Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows, 03000000666600000188000000000000,USB Controller,a:b2,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a2,righty:a3,start:b8,x:b3,y:b0,platform:Windows, 030000006b1400000203000000000000,USB Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows, 03000000790000000a00000000000000,USB Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a4,start:b9,x:b3,y:b0,platform:Windows, 03000000b404000081c6000000000000,USB Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b3,y:b0,platform:Windows, 03000000b50700001503000000000000,USB Controller,a:b2,b:b3,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a5,righty:a2,start:b9,x:b0,y:b1,platform:Windows, 03000000bd12000012d0000000000000,USB Controller,a:b0,b:b1,back:b6,leftshoulder:b4,leftx:a0,lefty:a1,rightshoulder:b5,start:b7,x:b2,y:b3,platform:Windows, 03000000ff1100004133000000000000,USB Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a4,righty:a2,start:b9,x:b3,y:b0,platform:Windows, 03000000632500002305000000000000,USB Vibration Joystick,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows, 03000000790000001a18000000000000,Venom,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, 03000000790000001b18000000000000,Venom Arcade Joystick,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Windows, 030000006f0e00000302000000000000,Victrix PS4 Pro Fightstick,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Windows, 030000006f0e00000702000000000000,Victrix PS4 Pro Fightstick,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Windows, 0300000034120000adbe000000000000,vJoy Device,a:b0,b:b1,back:b15,dpdown:b6,dpleft:b7,dpright:b8,dpup:b5,guide:b16,leftshoulder:b9,leftstick:b13,lefttrigger:b11,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b14,righttrigger:b12,rightx:a3,righty:a4,start:b4,x:b2,y:b3,platform:Windows, 03000000120c0000ab57000000000000,Warrior Joypad JS083,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 030000007e0500003003000000000000,Wii U Pro,a:b0,b:b1,back:b8,dpdown:b14,dpleft:b15,dpright:b16,dpup:b13,leftshoulder:b6,leftstick:b11,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b12,righttrigger:b5,rightx:a2,righty:a3,start:b9,x:b3,y:b2,platform:Windows, 0300000032150000030a000000000000,Wildcat,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 0300000032150000140a000000000000,Wolverine,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 030000002e160000efbe000000000000,Xbox 360 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b10,rightshoulder:b5,righttrigger:b11,start:b7,x:b2,y:b3,platform:Windows, 03000000380700001647000000000000,Xbox 360 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 03000000380700002045000000000000,Xbox 360 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 03000000380700002644000000000000,Xbox 360 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b7,lefttrigger:b10,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b11,rightx:a2,righty:a5,start:b8,x:b2,y:b3,platform:Windows, 03000000380700002647000000000000,Xbox 360 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b10,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b11,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 030000003807000026b7000000000000,Xbox 360 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 03000000380700003647000000000000,Xbox 360 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b10,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b11,rightx:a7,righty:a5,start:b7,x:b2,y:b3,platform:Windows, 030000005e0400001907000000000000,Xbox 360 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 030000005e0400008e02000000000000,Xbox 360 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:+a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:-a2,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 030000005e0400009102000000000000,Xbox 360 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 03000000ad1b000000fd000000000000,Xbox 360 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b10,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b11,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 03000000ad1b000001fd000000000000,Xbox 360 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a2,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 03000000ad1b000016f0000000000000,Xbox 360 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 03000000ad1b00008e02000000000000,Xbox 360 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a2,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 03000000c62400000053000000000000,Xbox 360 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b10,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b11,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 03000000c6240000fdfa000000000000,Xbox 360 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 03000000380700002847000000000000,Xbox 360 Fightpad,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b10,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b11,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 030000005e040000a102000000000000,Xbox 360 Wireless Receiver,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:+a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:-a2,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 030000005e0400000a0b000000000000,Xbox Adaptive Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:+a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:-a2,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 03000000120c00000a88000000000000,Xbox Controller,a:b0,b:b1,back:b7,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b10,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b11,rightx:a2,righty:a4,start:b6,x:b2,y:b3,platform:Windows, 03000000120c00001088000000000000,Xbox Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2~,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5~,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 030000002a0600002000000000000000,Xbox Controller,a:b0,b:b1,back:b13,dpdown:b9,dpleft:b10,dpright:b11,dpup:b8,leftshoulder:b5,leftstick:b14,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b4,rightstick:b15,righttrigger:b7,rightx:a2,righty:a5,start:b12,x:b2,y:b3,platform:Windows, 03000000300f00008888000000000000,Xbox Controller,a:b0,b:b1,back:b7,dpdown:b13,dpleft:b10,dpright:b11,dpup:b12,leftshoulder:b5,leftstick:b8,lefttrigger:b10,leftx:a0,lefty:a1,rightshoulder:b4,rightstick:b9,righttrigger:b11,rightx:a3,righty:a4,start:b6,x:b2,y:b3,platform:Windows, 03000000380700001645000000000000,Xbox Controller,a:b0,b:b1,back:b7,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b5,leftstick:b8,lefttrigger:b10,leftx:a0,lefty:a1,rightshoulder:b4,rightstick:b9,righttrigger:b11,rightx:a3,righty:a4,start:b6,x:b2,y:b3,platform:Windows, 03000000380700002645000000000000,Xbox Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b10,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b11,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 03000000380700003645000000000000,Xbox Controller,a:b0,b:b1,back:b7,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b5,leftstick:b8,lefttrigger:b10,leftx:a0,lefty:a1,rightshoulder:b4,rightstick:b9,righttrigger:b11,rightx:a3,righty:a4,start:b6,x:b2,y:b3,platform:Windows, 03000000380700008645000000000000,Xbox Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 030000005e0400000202000000000000,Xbox Controller,a:b0,b:b1,back:b7,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b5,leftstick:b8,lefttrigger:b10,leftx:a0,lefty:a1,rightshoulder:b4,rightstick:b9,righttrigger:b11,rightx:a3,righty:a4,start:b6,x:b2,y:b3,platform:Windows, 030000005e0400008502000000000000,Xbox Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 030000005e0400008702000000000000,Xbox Controller,a:b0,b:b1,back:b7,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b5,leftstick:b8,lefttrigger:b10,leftx:a0,lefty:a1,rightshoulder:b4,rightstick:b9,righttrigger:b7,rightx:a3,righty:a4,start:b6,x:b2,y:b3,platform:Windows, 030000005e0400008902000000000000,Xbox Controller,a:b0,b:b1,back:b7,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b10,leftstick:b8,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b11,rightstick:b9,righttrigger:b4,rightx:a3,righty:a4,start:b6,x:b2,y:b3,platform:Windows, 030000000d0f00006300000000000000,Xbox One Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b9,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 030000005e0400000c0b000000000000,Xbox One Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 030000005e040000d102000000000000,Xbox One Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 030000005e040000dd02000000000000,Xbox One Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 030000005e040000e002000000000000,Xbox One Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 030000005e040000e302000000000000,Xbox One Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 030000005e040000ea02000000000000,Xbox One Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:+a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:-a2,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 030000005e040000fd02000000000000,Xbox One Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 030000005e040000ff02000000000000,Xbox One Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:+a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:-a2,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 030000006f0e0000a802000000000000,Xbox One Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 030000006f0e0000c802000000000000,Xbox One Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 03000000c62400003a54000000000000,Xbox One Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 030000005e040000130b000000000000,Xbox Series Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 03000000341a00000608000000000000,Xeox,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows, 03000000450c00002043000000000000,Xeox SL6556BK,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows, 030000006f0e00000300000000000000,XGear,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a5,righty:a2,start:b9,x:b3,y:b0,platform:Windows, 03000000e0ff00000201000000000000,Xiaomi Black Shark (L),back:b0,dpdown:b11,dpleft:b9,dpright:b10,dpup:b8,leftshoulder:b5,lefttrigger:b7,leftx:a0,lefty:a1,platform:Windows, 03000000172700004431000000000000,Xiaomi Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b20,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a7,rightx:a2,righty:a5,start:b11,x:b3,y:b4,platform:Windows, 03000000172700003350000000000000,Xiaomi XMGP01YM,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows, 03000000bc2000005060000000000000,Xiaomi XMGP01YM,+lefty:+a2,+righty:+a5,-lefty:-a1,-righty:-a4,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,start:b11,x:b3,y:b4,platform:Windows, xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows, 030000007d0400000340000000000000,Xterminator Digital Gamepad,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:-a4,lefttrigger:+a4,leftx:a0,lefty:a1,paddle1:b7,paddle2:b6,rightshoulder:b5,rightstick:b9,righttrigger:b2,rightx:a3,righty:a5,start:b8,x:b3,y:b4,platform:Windows, 03000000790000004f18000000000000,ZDT Android Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows, 03000000120c00000500000000000000,Zeroplus Adapter,a:b2,b:b1,back:b11,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b9,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b0,righttrigger:b5,rightx:a3,righty:a2,start:b8,x:b3,y:b0,platform:Windows, 03000000120c0000101e000000000000,Zeroplus P4 Gamepad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, 030000008f0e00000300000009010000,2 In 1 Joystick,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Mac OS X, 03000000c82d00000031000001000000,8BitDo Adapter,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Mac OS X, 03000000c82d00000531000000020000,8BitDo Adapter 2,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Mac OS X, 03000000c82d00000951000000010000,8BitDo Dogbone,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftx:a0,lefty:a1,rightx:a2,righty:a3,start:b11,platform:Mac OS X, 03000000c82d00000090000001000000,8BitDo FC30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a5,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Mac OS X, 03000000c82d00001038000000010000,8BitDo FC30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Mac OS X, 03000000c82d00001251000000010000,8BitDo Lite 2,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Mac OS X, 03000000c82d00001251000000020000,8BitDo Lite 2,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Mac OS X, 03000000c82d00001151000000010000,8BitDo Lite SE,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Mac OS X, 03000000c82d00001151000000020000,8BitDo Lite SE,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Mac OS X, 03000000a30c00002400000006020000,8BitDo M30,a:b2,b:b1,dpdown:+a4,dpleft:-a3,dpright:+a3,dpup:-a4,guide:b9,leftshoulder:b6,lefttrigger:b5,rightshoulder:b4,righttrigger:b7,start:b8,x:b3,y:b0,platform:Mac OS X, 03000000c82d00000151000000010000,8BitDo M30,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftx:a0,lefty:a1,rightshoulder:b6,righttrigger:b7,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Mac OS X, 03000000c82d00000650000001000000,8BitDo M30,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b8,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b6,righttrigger:b7,start:b11,x:b3,y:b4,platform:Mac OS X, 03000000c82d00005106000000010000,8BitDo M30,a:b1,b:b0,back:b10,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,guide:b2,leftshoulder:b6,lefttrigger:a5,rightshoulder:b7,righttrigger:a4,start:b11,x:b4,y:b3,platform:Mac OS X, 03000000c82d00002090000000010000,8BitDo Micro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Mac OS X, 03000000c82d00000451000000010000,8BitDo N30,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftx:a0,lefty:a1,rightx:a2,righty:a3,start:b11,platform:Mac OS X, 03000000c82d00001590000001000000,8BitDo N30 Pro 2,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a5,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Mac OS X, 03000000c82d00006528000000010000,8BitDo N30 Pro 2,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Mac OS X, 03000000c82d00006928000000010000,8BitDo N64,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b9,rightx:a2,righty:a3,start:b11,platform:Mac OS X, 03000000c82d00002590000000010000,8BitDo NEOGEO,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Mac OS X, 03000000c82d00002590000001000000,8BitDo NEOGEO,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Mac OS X, 03000000c82d00002690000000010000,8BitDo NEOGEOa:b0,+leftx:h0.2,+lefty:h0.4,-leftx:h0.8,-lefty:h0.1,b:b1,back:b10,leftshoulder:b6,rightshoulder:b7,start:b11,x:b3,y:b4,platform:Mac OS X, 030000003512000012ab000001000000,8BitDo NES30,a:b1,b:b0,back:b10,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Mac OS X, 03000000c82d000012ab000001000000,8BitDo NES30,a:b0,b:b1,back:b10,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,rightshoulder:b7,start:b11,x:b3,y:b4,platform:Mac OS X, 03000000c82d00002028000000010000,8BitDo NES30,a:b0,b:b1,back:b10,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,rightshoulder:b7,start:b11,x:b3,y:b4,platform:Mac OS X, 03000000022000000090000001000000,8BitDo NES30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Mac OS X, 03000000203800000900000000010000,8BitDo NES30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Mac OS X, 03000000c82d00000190000001000000,8BitDo NES30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Mac OS X, 03000000c82d00000751000000010000,8BitDo P30,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Mac OS X, 03000000c82d00000851000000010000,8BitDo P30,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Mac OS X, 03000000c82d00000660000000010000,8BitDo Pro 2,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Mac OS X, 03000000c82d00000660000000020000,8BitDo Pro 2,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Mac OS X, 03000000c82d00000131000001000000,8BitDo Receiver,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Mac OS X, 03000000c82d00000231000001000000,8BitDo Receiver,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Mac OS X, 03000000c82d00000331000001000000,8BitDo Receiver,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Mac OS X, 03000000c82d00000431000001000000,8BitDo Receiver,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Mac OS X, 03000000c82d00002867000000010000,8BitDo S30,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b8,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b6,righttrigger:b7,rightx:a2,righty:a3,start:b10,x:b3,y:b4,platform:Mac OS X, 03000000102800000900000000000000,8BitDo SFC30 Joystick,a:b1,b:b0,back:b10,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Mac OS X, 03000000c82d00000351000000010000,8BitDo SN30,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Mac OS X, 03000000c82d00001290000001000000,8BitDo SN30,a:b1,b:b0,back:b10,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Mac OS X, 03000000c82d00004028000000010000,8BitDo SN30,a:b1,b:b0,back:b10,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Mac OS X, 03000000c82d00000160000001000000,8BitDo SN30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a5,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Mac OS X, 03000000c82d00000161000000010000,8BitDo SN30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a5,start:b11,x:b4,y:b3,platform:Mac OS X, 03000000c82d00000260000001000000,8BitDo SN30 Pro Plus,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Mac OS X, 03000000c82d00000261000000010000,8BitDo SN30 Pro Plus,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Mac OS X, 03000000c82d00001230000000010000,8BitDo Ultimate,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,paddle1:b2,paddle2:b5,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Mac OS X, 03000000c82d00001530000001000000,8BitDo Ultimate C,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Mac OS X, 03000000c82d00001630000001000000,8BitDo Ultimate C,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Mac OS X, 03000000c82d00001730000001000000,8BitDo Ultimate C,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Mac OS X, 03000000c82d00001130000000020000,8BitDo Ultimate Wired,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,misc1:b26,paddle1:b24,paddle2:b25,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Mac OS X, 03000000c82d00001330000001000000,8BitDo Ultimate Wireless,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,misc1:b26,paddle1:b23,paddle2:b19,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Mac OS X, 03000000c82d00001330000000020000,8BitDo Ultimate Wireless Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,misc1:b26,paddle1:b23,paddle2:b19,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Mac OS X, 03000000a00500003232000008010000,8BitDo Zero,a:b0,b:b1,back:b10,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,rightshoulder:b7,start:b11,x:b3,y:b4,platform:Mac OS X, 03000000a00500003232000009010000,8BitDo Zero,a:b0,b:b1,back:b10,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,rightshoulder:b7,start:b11,x:b3,y:b4,platform:Mac OS X, 03000000c82d00001890000001000000,8BitDo Zero 2,a:b1,b:b0,back:b10,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Mac OS X, 03000000c82d00003032000000010000,8BitDo Zero 2,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,rightx:a2,righty:a31,start:b11,x:b4,y:b3,platform:Mac OS X, 03000000491900001904000001010000,Amazon Luna Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,misc1:b9,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b7,x:b2,y:b3,platform:Mac OS X, 03000000710100001904000000010000,Amazon Luna Controller,a:b0,b:b1,back:b11,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b7,lefttrigger:a5,leftx:a0,lefty:a1,misc1:b9,rightshoulder:b5,rightstick:b8,righttrigger:a4,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Mac OS X, 03000000a30c00002700000003030000,Astro City Mini,a:b2,b:b1,back:b8,dpdown:+a4,dpleft:-a3,dpright:+a3,dpup:-a4,rightshoulder:b4,righttrigger:b5,start:b9,x:b3,y:b0,platform:Mac OS X, 03000000a30c00002800000003030000,Astro City Mini,a:b2,b:b1,back:b8,leftx:a3,lefty:a4,rightshoulder:b4,righttrigger:b5,start:b9,x:b3,y:b0,platform:Mac OS X, 03000000050b00000045000031000000,ASUS Gamepad,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b7,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b8,righttrigger:a4,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Mac OS X, 03000000050b00000579000000010000,ASUS ROG Kunai 3,a:b0,b:b1,back:b12,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b14,leftshoulder:b6,leftstick:b15,lefttrigger:a5,leftx:a0,lefty:a1,misc1:b42,paddle1:b9,paddle2:b11,rightshoulder:b7,rightstick:b16,righttrigger:a4,rightx:a2,righty:a3,start:b13,x:b3,y:b4,platform:Mac OS X, 03000000050b00000679000000010000,ASUS ROG Kunai 3,a:b0,b:b1,back:b12,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b14,leftshoulder:b6,leftstick:b15,lefttrigger:a5,leftx:a0,lefty:a1,misc1:b23,rightshoulder:b7,rightstick:b16,righttrigger:a4,rightx:a2,righty:a3,start:b13,x:b3,y:b4,platform:Mac OS X, 03000000503200000110000047010000,Atari VCS Classic Controller,a:b0,b:b1,back:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b3,start:b2,platform:Mac OS X, 03000000503200000210000047010000,Atari VCS Modern Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b9,leftshoulder:b4,leftstick:b6,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a4,rightx:a2,righty:a3,start:b8,x:b2,y:b3,platform:Mac OS X, 03000000c62400001a89000000010000,BDA MOGA XP5-X Plus,a:b0,b:b1,back:b12,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b14,leftshoulder:b6,leftstick:b15,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b16,righttrigger:a4,rightx:a2,righty:a3,start:b13,x:b3,y:b4,platform:Mac OS X, 03000000c62400001b89000000010000,BDA MOGA XP5-X Plus,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Mac OS X, 03000000d62000002a79000000010000,BDA PS4 Fightpad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X, 03000000120c0000200e000000010000,Brook Mars PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X, 03000000120c0000210e000000010000,Brook Mars PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X, 030000008305000031b0000000000000,Cideko AK08b,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X, 03000000d8140000cecf000000000000,Cthulhu,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Mac OS X, 03000000260900008888000088020000,Cyber Gadget GameCube Controller,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b6,righttrigger:a5,rightx:a2,righty:a3~,start:b7,x:b2,y:b3,platform:Mac OS X, 03000000a306000022f6000001030000,Cyborg V3 Rumble Pad PlayStation Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:+a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:-a3,rightx:a2,righty:a4,start:b9,x:b0,y:b3,platform:Mac OS X, 03000000791d00000103000009010000,Dual Box Wii Classic Adapter,a:b2,b:b1,back:b8,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,guide:b10,leftshoulder:b6,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b5,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Mac OS X, 030000006e0500000720000010020000,Elecom JC-W01U,a:b2,b:b3,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b1,platform:Mac OS X, 030000006f0e00008401000003010000,Faceoff Deluxe Nintendo Switch Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b13,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X, 03000000151900004000000001000000,Flydigi Vader 2,a:b14,b:b15,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b21,leftshoulder:b6,leftstick:b12,lefttrigger:a5,leftx:a0,lefty:a1,paddle1:b2,paddle2:b5,paddle3:b16,paddle4:b17,rightshoulder:b7,rightstick:b13,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b0,y:b1,platform:Mac OS X, 03000000b40400001124000001040000,Flydigi Vader 2,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b12,lefttrigger:a5,leftx:a0,lefty:a1,misc1:b14,paddle1:b2,paddle2:b5,paddle3:b16,paddle4:b17,rightshoulder:b7,rightstick:b13,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Mac OS X, 03000000b40400001224000003030000,Flydigi Vader 2,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b12,lefttrigger:a5,leftx:a0,lefty:a1,misc1:b2,paddle1:b16,paddle2:b17,paddle3:b14,paddle4:b15,rightshoulder:b7,rightstick:b13,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Mac OS X, 03000000790000004618000000010000,GameCube Controller Adapter,a:b4,b:b0,dpdown:b56,dpleft:b60,dpright:b52,dpup:b48,lefttrigger:a12,leftx:a0,lefty:a4,rightshoulder:b28,righttrigger:a16,rightx:a20,righty:a8,start:b36,x:b8,y:b12,platform:Mac OS X, 03000000ac0500001a06000002020000,GameSir-T3 2.02,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b15,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Mac OS X, 03000000ad1b000001f9000000000000,Gamestop BB070 X360 Controller,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b8,x:b2,y:b3,platform:Mac OS X, 0500000047532047616d657061640000,GameStop Gamepad,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Mac OS X, 03000000c01100000140000000010000,GameStop PS4 Fun Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X, 030000006f0e00000102000000000000,GameStop Xbox 360 Controller,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b8,x:b2,y:b3,platform:Mac OS X, 03000000ff1100003133000007010000,GameWare PC Control Pad,a:b2,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b7,rightx:a3,righty:a4,start:b11,x:b3,y:b0,platform:Mac OS X, 030000007d0400000540000001010000,Gravis Eliminator Pro,a:b1,b:b2,back:b8,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Mac OS X, 03000000280400000140000000020000,Gravis GamePad Pro,a:b1,b:b2,back:b8,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Mac OS X, 030000008f0e00000300000007010000,GreenAsia Joystick,a:b2,b:b3,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b0,y:b1,platform:Mac OS X, 030000000d0f00002d00000000100000,Hori Fighting Commander 3 Pro,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X, 030000000d0f00005f00000000000000,Hori Fighting Commander 4 PS3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X, 030000000d0f00005f00000000010000,Hori Fighting Commander 4 PS3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X, 030000000d0f00005e00000000000000,Hori Fighting Commander 4 PS4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X, 030000000d0f00005e00000000010000,Hori Fighting Commander 4 PS4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X, 030000000d0f00008400000000010000,Hori Fighting Commander PS3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X, 030000000d0f00008500000000010000,Hori Fighting Commander PS3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X, 03000000341a00000302000014010000,Hori Fighting Stick Mini,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Mac OS X, 030000000d0f00008800000000010000,Hori Fighting Stick mini 4 (PS3),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,rightshoulder:b5,rightstick:b11,righttrigger:b7,start:b9,x:b0,y:b3,platform:Mac OS X, 030000000d0f00008700000000010000,Hori Fighting Stick mini 4 (PS4),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,rightshoulder:b5,rightstick:b11,righttrigger:b7,start:b9,x:b0,y:b3,platform:Mac OS X, 030000000d0f00004d00000000000000,Hori Gem Pad 3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X, 030000000d0f00003801000008010000,Hori PC Engine Mini Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,start:b9,platform:Mac OS X, 030000000d0f00009200000000010000,Hori Pokken Tournament DX Pro,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Mac OS X, 030000000d0f0000aa00000072050000,Hori Real Arcade Pro for Nintendo Switch,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Mac OS X, 030000000d0f00000002000015010000,Hori Switch Split Pad Pro,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,misc1:b13,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X, 030000000d0f00006e00000000010000,Horipad 4 PS3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X, 030000000d0f00006600000000010000,Horipad 4 PS4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X, 030000000d0f00006600000000000000,Horipad FPS Plus 4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X, 030000000d0f0000ee00000000010000,Horipad Mini 4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X, 03000000242e0000ff0b000000010000,Hyperkin N64 Adapter,a:b1,b:b2,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightx:a2,righty:a3,start:b9,platform:Mac OS X, 03000000790000004e95000000010000,Hyperkin N64 Controller Adapter,a:b1,b:b2,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,leftshoulder:b7,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightx:a5,righty:a2,start:b9,platform:Mac OS X, 03000000830500006020000000000000,iBuffalo Super Famicom Controller,a:b1,b:b0,back:b6,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,rightshoulder:b5,start:b7,x:b3,y:b2,platform:Mac OS X, 03000000ef0500000300000000020000,InterAct AxisPad,a:b2,b:b3,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b7,rightx:a3,righty:a2,start:b11,x:b0,y:b1,platform:Mac OS X, 03000000fd0500000030000010010000,Interact GoPad,a:b3,b:b4,leftshoulder:b6,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b2,righttrigger:b5,x:b0,y:b1,platform:Mac OS X, 030000007e0500000620000001000000,Joy-Con (L),+leftx:h0.2,+lefty:h0.4,-leftx:h0.8,-lefty:h0.1,a:b0,b:b1,back:b13,leftshoulder:b4,leftstick:b10,rightshoulder:b5,start:b8,x:b2,y:b3,platform:Mac OS X, 030000007e0500000720000001000000,Joy-Con (R),+leftx:h0.2,+lefty:h0.4,-leftx:h0.8,-lefty:h0.1,a:b0,b:b1,back:b12,leftshoulder:b4,leftstick:b11,rightshoulder:b5,start:b9,x:b2,y:b3,platform:Mac OS X, 03000000242f00002d00000007010000,JYS Adapter,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Mac OS X, 030000006d04000019c2000000000000,Logitech Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X, 030000006d04000016c2000000020000,Logitech Dual Action,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X, 030000006d04000016c2000000030000,Logitech Dual Action,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X, 030000006d04000016c2000014040000,Logitech Dual Action,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X, 030000006d04000016c2000000000000,Logitech F310,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X, 030000006d04000018c2000000000000,Logitech F510,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X, 030000006d04000019c2000005030000,Logitech F710,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X, 030000006d0400001fc2000000000000,Logitech F710,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b8,x:b2,y:b3,platform:Mac OS X, 030000006d04000018c2000000010000,Logitech RumblePad 2,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1~,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3~,start:b9,x:b0,y:b3,platform:Mac OS X, 03000000380700005032000000010000,Mad Catz PS3 Fightpad Pro,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X, 03000000380700008433000000010000,Mad Catz PS3 Fightstick TE S Plus,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X, 03000000380700005082000000010000,Mad Catz PS4 Fightpad Pro,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X, 03000000380700008483000000010000,Mad Catz PS4 Fightstick TE S Plus,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X, 03000000790000000600000007010000,Marvo GT-004,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Mac OS X, 030000008f0e00001330000011010000,Mayflash Controller Adapter,a:b2,b:b4,back:b16,dpdown:h0.8,dpleft:h0.2,dpright:h0.1,dpup:h0.4,leftshoulder:b12,lefttrigger:b16,leftx:a0,lefty:a2,rightshoulder:b14,rightx:a6~,righty:a4,start:b18,x:b0,y:b6,platform:Mac OS X, 03000000790000004318000000010000,Mayflash GameCube Adapter,a:b4,b:b0,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,lefttrigger:a12,leftx:a0,lefty:a4,rightshoulder:b28,righttrigger:a16,rightx:a20,righty:a8,start:b36,x:b8,y:b12,platform:Mac OS X, 03000000790000004418000000010000,Mayflash GameCube Controller,a:b1,b:b2,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:a4,rightx:a5,righty:a2,start:b9,x:b0,y:b3,platform:Mac OS X, 03000000242f00007300000000020000,Mayflash Magic NS,a:b1,b:b4,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b0,y:b3,platform:Mac OS X, 0300000079000000d218000026010000,Mayflash Magic NS,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Mac OS X, 03000000d620000010a7000003010000,Mayflash Magic NS,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X, 030000008f0e00001030000011010000,Mayflash Saturn Adapter,a:b0,b:b2,dpdown:b28,dpleft:b30,dpright:b26,dpup:b24,leftshoulder:b10,lefttrigger:b14,rightshoulder:b12,righttrigger:b4,start:b18,x:b6,y:b8,platform:Mac OS X, 0300000025090000e803000000000000,Mayflash Wii Classic Adapter,a:b1,b:b0,back:b8,dpdown:b13,dpleft:b12,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b2,platform:Mac OS X, 03000000790000000318000000010000,Mayflash Wii DolphinBar,a:b8,b:b12,back:b32,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b44,leftshoulder:b16,lefttrigger:b24,leftx:a0,lefty:a4,rightshoulder:b20,righttrigger:b28,rightx:a8,righty:a12,start:b36,x:b0,y:b4,platform:Mac OS X, 03000000790000000018000000000000,Mayflash Wii U Pro Adapter,a:b4,b:b8,back:b32,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b16,leftstick:b40,lefttrigger:b24,leftx:a0,lefty:a4,rightshoulder:b20,rightstick:b44,righttrigger:b28,rightx:a8,righty:a12,start:b36,x:b0,y:b12,platform:Mac OS X, 03000000790000000018000000010000,Mayflash Wii U Pro Adapter,a:b4,b:b8,back:b32,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b16,leftstick:b40,lefttrigger:b24,leftx:a0,lefty:a4,rightshoulder:b20,rightstick:b44,righttrigger:b28,rightx:a8,righty:a12,start:b36,x:b0,y:b12,platform:Mac OS X, 030000005e0400002800000002010000,Microsoft Dual Strike,a:b3,b:b2,back:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b8,rightshoulder:b7,rightx:a0,righty:a1~,start:b5,x:b1,y:b0,platform:Mac OS X, 030000005e0400000300000006010000,Microsoft SideWinder,a:b0,b:b1,back:b9,leftshoulder:b6,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b2,start:b8,x:b3,y:b4,platform:Mac OS X, 030000005e0400000700000006010000,Microsoft SideWinder,a:b0,b:b1,back:b8,leftshoulder:b6,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b2,start:b9,x:b3,y:b4,platform:Mac OS X, 030000005e0400002700000001010000,Microsoft SideWinder Plug and Play,a:b0,b:b1,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,lefttrigger:b4,righttrigger:b5,x:b2,y:b3,platform:Mac OS X, 030000004523000015e0000072050000,Mobapad Chitu HD,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,misc1:b13,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Mac OS X, 03000000d62000007162000001000000,Moga Pro 2,a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b7,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b8,righttrigger:a4,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Mac OS X, 03000000c62400002a89000000010000,MOGA XP5A Plus,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b21,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Mac OS X, 03000000c62400002b89000000010000,MOGA XP5A Plus,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Mac OS X, 03000000632500007505000000020000,NeoGeo mini PAD Controller,a:b1,b:b0,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,start:b9,x:b2,y:b3,platform:Mac OS X, 03000000921200004b46000003020000,NES 2-port Adapter,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,start:b11,platform:Mac OS X, 030000001008000001e5000006010000,NEXT SNES Controller,a:b2,b:b1,back:b8,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,rightshoulder:b5,righttrigger:b6,start:b9,x:b3,y:b0,platform:Mac OS X, 030000007e0500000920000000000000,Nintendo Switch Pro Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Mac OS X, 030000007e0500000920000001000000,Nintendo Switch Pro Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Mac OS X, 050000007e05000009200000ff070000,Nintendo Switch Pro Controller,a:b1,b:b0,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b9,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b10,x:b3,y:b2,platform:Mac OS X, 030000007e0500001920000001000000,NSO N64 Controller,+rightx:b8,+righty:b7,-rightx:b3,-righty:b2,a:b1,b:b0,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,misc1:b13,rightshoulder:b5,righttrigger:b10,start:b9,platform:Mac OS X, 030000007e0500001720000001000000,NSO SNES Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b15,start:b9,x:b2,y:b3,platform:Mac OS X, 03000000550900001472000025050000,NVIDIA Controller,a:b0,b:b1,back:b17,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b15,leftshoulder:b4,leftstick:b7,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b8,righttrigger:a4,rightx:a2,righty:a5,start:b6,x:b2,y:b3,platform:Mac OS X, 030000004b120000014d000000010000,Nyko Airflo EX,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b2,y:b3,platform:Mac OS X, 030000006f0e00000901000002010000,PDP PS3 Versus Fighting,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Mac OS X, 030000008f0e00000300000000000000,Piranha Xtreme PS3 Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a3,righty:a2,start:b9,x:b3,y:b0,platform:Mac OS X, 03000000666600006706000088020000,PlayStation Adapter,a:b2,b:b1,back:b8,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,leftshoulder:b6,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b5,rightx:a2,righty:a3,start:b11,x:b3,y:b0,platform:Mac OS X, 030000004c050000da0c000000010000,PlayStation Classic Controller,a:b2,b:b1,back:b8,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,lefttrigger:b4,rightshoulder:b7,righttrigger:b5,start:b9,x:b3,y:b0,platform:Mac OS X, 030000004c0500003713000000010000,PlayStation Vita,a:b1,b:b2,back:b8,dpdown:b13,dpleft:b15,dpright:b14,dpup:b12,leftshoulder:b4,leftx:a0,lefty:a1,rightshoulder:b5,rightx:a3,righty:a4,start:b9,x:b0,y:b3,platform:Mac OS X, 03000000d620000011a7000000020000,PowerA Core Plus Gamecube Controller,a:b1,b:b0,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Mac OS X, 03000000d620000011a7000010050000,PowerA Nintendo Switch Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X, 03000000d62000006dca000000010000,PowerA Pro Ex,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X, 03000000100800000300000006010000,PS2 Adapter,a:b2,b:b1,back:b8,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a4,righty:a3,start:b9,x:b3,y:b0,platform:Mac OS X, 030000004c0500006802000000000000,PS3 Controller,a:b14,b:b13,back:b0,dpdown:b6,dpleft:b7,dpright:b5,dpup:b4,guide:b16,leftshoulder:b10,leftstick:b1,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b11,rightstick:b2,righttrigger:b9,rightx:a2,righty:a3,start:b3,x:b15,y:b12,platform:Mac OS X, 030000004c0500006802000000010000,PS3 Controller,a:b14,b:b13,back:b0,dpdown:b6,dpleft:b7,dpright:b5,dpup:b4,guide:b16,leftshoulder:b10,leftstick:b1,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b11,rightstick:b2,righttrigger:b9,rightx:a2,righty:a3,start:b3,x:b15,y:b12,platform:Mac OS X, 030000004c0500006802000072050000,PS3 Controller,a:b14,b:b13,back:b0,dpdown:b6,dpleft:b7,dpright:b5,dpup:b4,guide:b16,leftshoulder:b10,leftstick:b1,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b11,rightstick:b2,righttrigger:b9,rightx:a2,righty:a3,start:b3,x:b15,y:b12,platform:Mac OS X, 030000004c050000a00b000000010000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X, 030000004c050000c405000000000000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X, 030000004c050000c405000000010000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X, 030000004c050000cc09000000010000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X, 030000004c050000e60c000000010000,PS5 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,misc1:b14,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,touchpad:b13,x:b0,y:b3,platform:Mac OS X, 030000004c050000f20d000000010000,PS5 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,misc1:b14,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,touchpad:b13,x:b0,y:b3,platform:Mac OS X, 050000004c050000e60c000000010000,PS5 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,touchpad:b13,x:b0,y:b3,platform:Mac OS X, 050000004c050000f20d000000010000,PS5 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,touchpad:b13,x:b0,y:b3,platform:Mac OS X, 030000005e040000e002000001000000,PXN P30 Pro Mobile,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Mac OS X, 03000000222c00000225000000010000,Qanba Dragon Arcade Joystick (PS3),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X, 03000000222c00000020000000010000,Qanba Drone Arcade Stick,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X, 030000008916000000fd000000000000,Razer Onza TE,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b8,x:b2,y:b3,platform:Mac OS X, 03000000321500000204000000010000,Razer Panthera PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X, 03000000321500000104000000010000,Razer Panthera PS4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X, 03000000321500000010000000010000,Razer Raiju,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X, 03000000321500000507000001010000,Razer Raiju Mobile,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b21,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Mac OS X, 03000000321500000011000000010000,Razer Raion PS4 Fightpad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X, 03000000321500000009000000020000,Razer Serval,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a4,rightx:a2,righty:a3,start:b7,x:b2,y:b3,platform:Mac OS X, 030000003215000000090000163a0000,Razer Serval,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a4,rightx:a2,righty:a3,start:b7,x:b2,y:b3,platform:Mac OS X, 0300000032150000030a000000000000,Razer Wildcat,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b8,x:b2,y:b3,platform:Mac OS X, 03000000632500008005000000010000,Redgear,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Mac OS X, 030000000d0f0000c100000072050000,Retro Bit Sega Genesis 6B Controller,a:b2,b:b1,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,lefttrigger:b8,rightshoulder:b6,righttrigger:b7,start:b9,x:b3,y:b0,platform:Mac OS X, 03000000921200004547000000020000,Retro Bit Sega Genesis Controller Adapter,a:b0,b:b2,dpdown:+a2,dpleft:-a0,dpright:+a0,dpup:-a2,lefttrigger:b14,rightshoulder:b10,righttrigger:b4,start:b12,x:b6,y:b8,platform:Mac OS X, 03000000790000001100000000000000,Retro Controller,a:b1,b:b2,back:b8,dpdown:+a4,dpleft:-a3,dpright:+a3,dpup:-a4,leftshoulder:b6,lefttrigger:b7,rightshoulder:b4,righttrigger:b5,start:b9,x:b0,y:b3,platform:Mac OS X, 03000000790000001100000005010000,Retro Controller,a:b1,b:b2,back:b8,dpdown:+a4,dpleft:-a3,dpright:+a3,dpup:-a4,leftshoulder:b6,lefttrigger:b7,rightshoulder:b5,righttrigger:b4,start:b9,x:b0,y:b3,platform:Mac OS X, 03000000830500006020000000010000,Retro Controller,a:b0,b:b1,back:b6,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,lefttrigger:b5,rightshoulder:b8,righttrigger:b9,start:b7,x:b2,y:b3,platform:Mac OS X, 0300000003040000c197000000000000,Retrode Adapter,a:b0,b:b4,back:b2,dpdown:+a4,dpleft:-a0,dpright:+a0,dpup:-a4,leftshoulder:b6,rightshoulder:b7,start:b3,x:b1,y:b5,platform:Mac OS X, 03000000790000001100000006010000,Retrolink SNES Controller,a:b2,b:b1,back:b8,dpdown:+a4,dpleft:-a3,dpright:+a3,dpup:-a4,leftshoulder:b4,rightshoulder:b5,start:b9,x:b3,y:b0,platform:Mac OS X, 03000000341200000400000000000000,RetroUSB N64 RetroPort,+rightx:b8,+righty:b10,-rightx:b9,-righty:b11,a:b7,b:b6,dpdown:b2,dpleft:b1,dpright:b0,dpup:b3,leftshoulder:b13,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b12,start:b4,platform:Mac OS X, 030000006b140000010d000000010000,Revolution Pro Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X, 030000006b140000130d000000010000,Revolution Pro Controller 3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X, 030000004c0500006802000002100000,Rii RK707,a:b14,b:b13,back:b0,dpdown:b6,dpleft:b7,dpright:b5,dpup:b4,guide:b16,leftshoulder:b10,leftstick:b2,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b11,rightstick:b3,righttrigger:b9,rightx:a2,righty:a3,start:b1,x:b15,y:b12,platform:Mac OS X, 030000006f0e00008701000005010000,Rock Candy Nintendo Switch Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X, 03000000c6240000fefa000000000000,Rock Candy PS3,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b8,x:b2,y:b3,platform:Mac OS X, 03000000e804000000a000001b010000,Samsung EIGP20,a:b1,b:b3,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b20,leftshoulder:b11,leftx:a1,lefty:a3,rightshoulder:b12,rightx:a4,righty:a5,start:b16,x:b7,y:b9,platform:Mac OS X, 03000000730700000401000000010000,Sanwa PlayOnline Mobile,a:b0,b:b1,back:b2,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,start:b3,platform:Mac OS X, 03000000a30c00002500000006020000,Sega Genesis Mini 3B Controller,a:b2,b:b1,dpdown:+a4,dpleft:-a3,dpright:+a3,dpup:-a4,righttrigger:b5,start:b9,platform:Mac OS X, 03000000811700007e05000000000000,Sega Saturn,a:b2,b:b4,dpdown:b16,dpleft:b15,dpright:b14,dpup:b17,leftshoulder:b8,lefttrigger:a5,leftx:a0,lefty:a2,rightshoulder:b9,righttrigger:a4,start:b13,x:b0,y:b6,platform:Mac OS X, 03000000b40400000a01000000000000,Sega Saturn,a:b0,b:b1,back:b5,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,guide:b2,leftshoulder:b6,rightshoulder:b7,start:b8,x:b3,y:b4,platform:Mac OS X, 030000003512000021ab000000000000,SFC30 Joystick,a:b1,b:b0,back:b10,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Mac OS X, 0300000000f00000f100000000000000,SNES RetroPort,a:b2,b:b3,back:b4,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b5,rightshoulder:b7,start:b6,x:b0,y:b1,platform:Mac OS X, 030000004c050000a00b000000000000,Sony DualShock 4 Adapter,a:b1,b:b2,back:b13,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X, 030000004c050000cc09000000000000,Sony DualShock 4 V2,a:b1,b:b2,back:b13,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X, 03000000d11800000094000000010000,Stadia Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a4,rightx:a2,righty:a3,start:b7,x:b2,y:b3,platform:Mac OS X, 030000005e0400008e02000001000000,Steam Virtual Gamepad,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b8,x:b2,y:b3,platform:Mac OS X, 03000000110100002014000000000000,SteelSeries Nimbus,a:b0,b:b1,dpdown:b9,dpleft:b11,dpright:b10,dpup:b8,guide:b12,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1~,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3~,x:b2,y:b3,platform:Mac OS X, 03000000110100002014000001000000,SteelSeries Nimbus,a:b0,b:b1,dpdown:b9,dpleft:b11,dpright:b10,dpup:b8,guide:b12,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1~,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3~,x:b2,y:b3,platform:Mac OS X, 03000000381000002014000001000000,SteelSeries Nimbus,a:b0,b:b1,dpdown:b9,dpleft:b11,dpright:b10,dpup:b8,guide:b12,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1~,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3~,x:b2,y:b3,platform:Mac OS X, 05000000484944204465766963650000,SteelSeries Nimbus Plus,a:b0,b:b1,back:b15,dpdown:b11,dpleft:b13,dpright:b12,dpup:b10,guide:b16,leftshoulder:b4,leftstick:b8,lefttrigger:b6,leftx:a0,lefty:a1~,rightshoulder:b5,rightstick:b9,righttrigger:b7,rightx:a2,righty:a3~,start:b14,x:b2,y:b3,platform:Mac OS X, 050000004e696d6275732b0000000000,SteelSeries Nimbus Plus,a:b0,b:b1,back:b15,dpdown:b11,dpleft:b13,dpright:b12,dpup:b10,guide:b16,leftshoulder:b4,leftstick:b8,lefttrigger:b6,leftx:a0,lefty:a1~,rightshoulder:b5,rightstick:b9,righttrigger:b7,rightx:a2,righty:a3~,start:b14,x:b2,y:b3,platform:Mac OS X, 03000000381000003014000000000000,SteelSeries Stratus Duo,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b8,x:b2,y:b3,platform:Mac OS X, 03000000381000003114000000000000,SteelSeries Stratus Duo,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b8,x:b2,y:b3,platform:Mac OS X, 03000000110100001714000000000000,SteelSeries Stratus XL,a:b0,b:b1,dpdown:b9,dpleft:b11,dpright:b10,dpup:b8,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1~,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3~,start:b12,x:b2,y:b3,platform:Mac OS X, 03000000110100001714000020010000,SteelSeries Stratus XL,a:b0,b:b1,dpdown:b9,dpleft:b11,dpright:b10,dpup:b8,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1~,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3~,start:b12,x:b2,y:b3,platform:Mac OS X, 030000000d0f0000f600000000010000,Switch Hori Pad,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Mac OS X, 03000000457500002211000000010000,SZMY Power PC Gamepad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X, 03000000790000001c18000003100000,TGZ Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Mac OS X, 03000000591c00002400000021000000,THEC64 Joystick,a:b0,b:b1,back:b6,leftshoulder:b4,leftx:a0,lefty:a4,rightshoulder:b5,start:b7,x:b2,y:b3,platform:Mac OS X, 03000000591c00002600000021000000,THEGamepad,a:b2,b:b1,back:b6,dpdown:+a4,dpleft:-a0,dpright:+a0,dpup:-a4,leftshoulder:b4,rightshoulder:b5,start:b7,x:b3,y:b0,platform:Mac OS X, 030000004f04000015b3000000000000,Thrustmaster Dual Analog 3.2,a:b0,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b1,y:b3,platform:Mac OS X, 030000004f0400000ed0000000020000,ThrustMaster eSwap Pro Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X, 030000004f04000000b3000000000000,Thrustmaster Firestorm Dual Power,a:b0,b:b2,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b11,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,righttrigger:b7,rightx:a2,righty:a3,start:b10,x:b1,y:b3,platform:Mac OS X, 03000000571d00002100000021000000,Tomee NES Controller Adapter,a:b1,b:b0,back:b2,dpdown:+a4,dpleft:-a0,dpright:+a0,dpup:-a4,start:b3,platform:Mac OS X, 03000000bd12000015d0000000010000,Tomee Retro Controller,a:b2,b:b1,back:b8,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,rightshoulder:b5,start:b9,x:b3,y:b0,platform:Mac OS X, 03000000bd12000015d0000000000000,Tomee SNES Controller,a:b2,b:b1,back:b8,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,rightshoulder:b5,start:b9,x:b3,y:b0,platform:Mac OS X, 03000000571d00002000000021000000,Tomee SNES Controller Adapter,a:b0,b:b1,back:b6,dpdown:+a4,dpleft:-a0,dpright:+a0,dpup:-a4,leftshoulder:b4,rightshoulder:b5,start:b7,x:b2,y:b3,platform:Mac OS X, 030000005f140000c501000000020000,Trust Gamepad,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Mac OS X, 03000000100800000100000000000000,Twin USB Joystick,a:b4,b:b2,back:b16,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b12,leftstick:b20,lefttrigger:b8,leftx:a0,lefty:a2,rightshoulder:b14,rightstick:b22,righttrigger:b10,rightx:a6,righty:a4,start:b18,x:b6,y:b0,platform:Mac OS X, 03000000632500002605000000010000,Uberwith Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Mac OS X, 03000000151900005678000010010000,Uniplay U6,a:b3,b:b6,back:b25,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b17,leftstick:b31,lefttrigger:b21,leftx:a1,lefty:a3,rightshoulder:b19,rightstick:b33,righttrigger:b23,rightx:a4,righty:a5,start:b27,x:b11,y:b13,platform:Mac OS X, 030000006f0e00000302000025040000,Victrix PS4 Pro Fightstick,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Mac OS X, 030000006f0e00000702000003060000,Victrix PS4 Pro Fightstick,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Mac OS X, 050000005769696d6f74652028303000,Wii Remote,a:b4,b:b5,back:b7,dpdown:b3,dpleft:b0,dpright:b1,dpup:b2,guide:b8,leftshoulder:b11,lefttrigger:b12,leftx:a0,lefty:a1,start:b6,x:b10,y:b9,platform:Mac OS X, 050000005769696d6f74652028313800,Wii U Pro Controller,a:b16,b:b15,back:b7,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b8,leftshoulder:b19,leftstick:b23,lefttrigger:b21,leftx:a0,lefty:a1,rightshoulder:b20,rightstick:b24,righttrigger:b22,rightx:a2,righty:a3,start:b6,x:b18,y:b17,platform:Mac OS X, 030000005e0400008e02000000000000,Xbox 360 Controller,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b8,x:b2,y:b3,platform:Mac OS X, 030000006f0e00000104000000000000,Xbox 360 Controller,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b8,x:b2,y:b3,platform:Mac OS X, 03000000c6240000045d000000000000,Xbox 360 Controller,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b8,x:b2,y:b3,platform:Mac OS X, 030000005e0400000a0b000000000000,Xbox Adaptive Controller,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b8,x:b2,y:b3,platform:Mac OS X, 030000005e040000050b000003090000,Xbox Elite Controller Series 2,a:b0,b:b1,back:b31,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b53,leftshoulder:b6,leftstick:b13,lefttrigger:a6,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a5,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Mac OS X, 030000005e040000130b000011050000,Xbox One Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Mac OS X, 030000005e040000200b000011050000,Xbox One Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Mac OS X, 030000005e040000200b000013050000,Xbox One Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Mac OS X, 030000005e040000200b000015050000,Xbox One Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Mac OS X, 030000005e040000d102000000000000,Xbox One Controller,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b8,x:b2,y:b3,platform:Mac OS X, 030000005e040000dd02000000000000,Xbox One Controller,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b8,x:b2,y:b3,platform:Mac OS X, 030000005e040000e002000000000000,Xbox One Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Mac OS X, 030000005e040000e002000003090000,Xbox One Controller,a:b0,b:b1,back:b16,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b15,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Mac OS X, 030000005e040000e302000000000000,Xbox One Controller,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b8,x:b2,y:b3,platform:Mac OS X, 030000005e040000ea02000000000000,Xbox One Controller,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b8,x:b2,y:b3,platform:Mac OS X, 030000005e040000fd02000003090000,Xbox One Controller,a:b0,b:b1,back:b16,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b15,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Mac OS X, 03000000c62400003a54000000000000,Xbox One PowerA Controller,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b8,x:b2,y:b3,platform:Mac OS X, 030000005e040000130b000001050000,Xbox Series Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Mac OS X, 030000005e040000130b000005050000,Xbox Series Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Mac OS X, 030000005e040000130b000009050000,Xbox Series Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,misc1:b15,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Mac OS X, 030000005e040000130b000013050000,Xbox Series Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Mac OS X, 030000005e040000130b000015050000,Xbox Series Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Mac OS X, 03000000172700004431000029010000,XiaoMi Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b15,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a6,rightx:a2,righty:a5,start:b11,x:b3,y:b4,platform:Mac OS X, 03000000120c0000100e000000010000,Zeroplus P4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X, 03000000120c0000101e000000010000,Zeroplus P4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X, 030000005e0400008e02000020010000,8BitDo Adapter,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 03000000c82d00000031000011010000,8BitDo Adapter,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux, 03000000c82d00000951000000010000,8BitDo Dogbone,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftx:a0,lefty:a1,rightx:a2,righty:a3,start:b11,platform:Linux, 03000000021000000090000011010000,8BitDo FC30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux, 03000000c82d00000090000011010000,8BitDo FC30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a5,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux, 05000000c82d00001038000000010000,8BitDo FC30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux, 03000000c82d00001251000011010000,8BitDo Lite 2,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a5,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux, 05000000c82d00001251000000010000,8BitDo Lite 2,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux, 03000000c82d00001151000011010000,8BitDo Lite SE,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux, 05000000c82d00001151000000010000,8BitDo Lite SE,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux, 03000000c82d00000151000000010000,8BitDo M30,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftx:a0,lefty:a1,rightshoulder:b6,righttrigger:b7,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux, 03000000c82d00000650000011010000,8BitDo M30,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b9,start:b11,x:b3,y:b4,platform:Linux, 05000000c82d00005106000000010000,8BitDo M30,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b8,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b6,righttrigger:b7,start:b11,x:b3,y:b4,platform:Linux, 03000000c82d00002090000011010000,8BitDo Micro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux, 05000000c82d00002090000000010000,8BitDo Micro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux, 03000000c82d00000451000000010000,8BitDo N30,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftx:a0,lefty:a1,rightx:a2,righty:a3,start:b11,platform:Linux, 03000000c82d00001590000011010000,8BitDo N30 Pro 2,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux, 05000000c82d00006528000000010000,8BitDo N30 Pro 2,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux, 05000000c82d00006928000000010000,8BitDo N64,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b9,rightx:a2,righty:a3,start:b11,platform:Linux, 05000000c82d00002590000001000000,8BitDo NEOGEO,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux, 03000000008000000210000011010000,8BitDo NES30,a:b1,b:b2,back:b8,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Linux, 03000000c82d00000310000011010000,8BitDo NES30,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b7,lefttrigger:b6,rightshoulder:b9,righttrigger:b8,start:b11,x:b3,y:b4,platform:Linux, 05000000c82d00008010000000010000,8BitDo NES30,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b7,lefttrigger:b6,rightshoulder:b9,righttrigger:b8,start:b11,x:b3,y:b4,platform:Linux, 03000000022000000090000011010000,8BitDo NES30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux, 03000000c82d00000190000011010000,8BitDo NES30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a5,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux, 05000000203800000900000000010000,8BitDo NES30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux, 05000000c82d00002038000000010000,8BitDo NES30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux, 03000000c82d00000751000000010000,8BitDo P30,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:a8,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux, 05000000c82d00000851000000010000,8BitDo P30,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:a8,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux, 03000000c82d00000660000011010000,8BitDo Pro 2,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux, 03000000c82d00001030000011010000,8BitDo Pro 2,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux, 05000000c82d00000660000000010000,8BitDo Pro 2,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux, 03000000c82d00000020000000000000,8BitDo Pro 2 for Xbox,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 06000000c82d00000020000006010000,8BitDo Pro 2 for Xbox,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 03000000c82d00000131000011010000,8BitDo Receiver,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux, 03000000c82d00000231000011010000,8BitDo Receiver,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux, 03000000c82d00000331000011010000,8BitDo Receiver,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux, 03000000c82d00000431000011010000,8BitDo Receiver,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux, 03000000c82d00002867000000010000,8BitDo S30,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b8,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b6,righttrigger:b7,rightx:a2,righty:a3,start:b10,x:b3,y:b4,platform:Linux, 05000000c82d00000060000000010000,8BitDo SF30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux, 05000000c82d00000061000000010000,8BitDo SF30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux, 030000003512000012ab000010010000,8BitDo SFC30,a:b2,b:b1,back:b6,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,rightshoulder:b5,start:b7,x:b3,y:b0,platform:Linux, 030000003512000021ab000010010000,8BitDo SFC30,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Linux, 03000000c82d000021ab000010010000,8BitDo SFC30,a:b1,b:b0,back:b10,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Linux, 05000000102800000900000000010000,8BitDo SFC30,a:b1,b:b0,back:b10,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Linux, 05000000c82d00003028000000010000,8BitDo SFC30,a:b1,b:b0,back:b10,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Linux, 05000000c82d00000351000000010000,8BitDo SN30,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux, 03000000c82d00000160000000000000,8BitDo SN30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b4,y:b3,platform:Linux, 03000000c82d00000160000011010000,8BitDo SN30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux, 03000000c82d00000161000000000000,8BitDo SN30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b4,y:b3,platform:Linux, 03000000c82d00001290000011010000,8BitDo SN30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b4,y:b3,platform:Linux, 05000000c82d00000161000000010000,8BitDo SN30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux, 05000000c82d00006228000000010000,8BitDo SN30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux, 03000000c82d00000260000011010000,8BitDo SN30 Pro Plus,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux, 05000000c82d00000261000000010000,8BitDo SN30 Pro Plus,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux, 05000000202800000900000000010000,8BitDo SNES30,a:b1,b:b0,back:b10,dpdown:b122,dpleft:b119,dpright:b120,dpup:b117,leftshoulder:b6,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Linux, 05000000c82d00001230000000010000,8BitDo Ultimate,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux, 03000000c82d00001530000011010000,8BitDo Ultimate C,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux, 03000000c82d00001630000011010000,8BitDo Ultimate C,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux, 03000000c82d00001730000011010000,8BitDo Ultimate C,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux, 03000000c82d00001130000011010000,8BitDo Ultimate Wired,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,misc1:b26,paddle1:b24,paddle2:b25,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux, 03000000c82d00000760000011010000,8BitDo Ultimate Wireless,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux, 03000000c82d00001230000011010000,8BitDo Ultimate Wireless,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux, 03000000c82d00001330000011010000,8BitDo Ultimate Wireless,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,misc1:b26,paddle1:b23,paddle2:b19,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux, 03000000c82d00000631000014010000,8BitDo Ultimate Wireless Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 03000000c82d00000121000011010000,8BitDo Xbox One SN30 Pro,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux, 05000000c82d00000121000000010000,8BitDo Xbox One SN30 Pro,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux, 05000000a00500003232000001000000,8BitDo Zero,a:b0,b:b1,back:b10,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,rightshoulder:b7,start:b11,x:b3,y:b4,platform:Linux, 05000000a00500003232000008010000,8BitDo Zero,a:b0,b:b1,back:b10,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,rightshoulder:b7,start:b11,x:b3,y:b4,platform:Linux, 03000000c82d00001890000011010000,8BitDo Zero 2,a:b1,b:b0,back:b10,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Linux, 050000005e040000e002000030110000,8BitDo Zero 2,a:b0,b:b1,back:b6,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,rightshoulder:b5,start:b7,x:b2,y:b3,platform:Linux, 05000000c82d00003032000000010000,8BitDo Zero 2,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux, 03000000c01100000355000011010000,Acrux Gamepad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux, 030000006f0e00008801000011010000,Afterglow Deluxe Nintendo Switch Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,misc1:b13,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux, 030000006f0e00003901000000430000,Afterglow Prismatic Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 030000006f0e00003901000013020000,Afterglow Prismatic Controller 048-007-NA,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 030000006f0e00001302000000010000,Afterglow Xbox 360 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 030000006f0e00003901000020060000,Afterglow Xbox One Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 03000000100000008200000011010000,Akishop Customs PS360,a:b1,b:b2,back:b12,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Linux, 030000007c1800000006000010010000,Alienware Dual Compatible Game PlayStation Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b0,y:b3,platform:Linux, 05000000491900000204000021000000,Amazon Fire Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b17,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,misc1:b12,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux, 03000000491900001904000011010000,Amazon Luna Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,misc1:b9,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b7,x:b2,y:b3,platform:Linux, 05000000710100001904000000010000,Amazon Luna Controller,a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b7,lefttrigger:a5,leftx:a0,lefty:a1,misc1:b11,rightshoulder:b5,rightstick:b8,righttrigger:a4,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Linux, 03000000790000003018000011010000,Arcade Fightstick F300,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Linux, 03000000a30c00002700000011010000,Astro City Mini,a:b2,b:b1,back:b8,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,rightshoulder:b4,righttrigger:b5,start:b9,x:b3,y:b0,platform:Linux, 03000000a30c00002800000011010000,Astro City Mini,a:b2,b:b1,back:b8,leftx:a0,lefty:a1,rightshoulder:b4,righttrigger:b5,start:b9,x:b3,y:b0,platform:Linux, 05000000050b00000045000031000000,ASUS Gamepad,a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b6,leftshoulder:b4,leftstick:b7,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b8,righttrigger:a4,rightx:a2,righty:a3,start:b10,x:b2,y:b3,platform:Linux, 05000000050b00000045000040000000,ASUS Gamepad,a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b6,leftshoulder:b4,leftstick:b7,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b8,righttrigger:a4,rightx:a2,righty:a3,start:b10,x:b2,y:b3,platform:Linux, 03000000050b00000579000011010000,ASUS ROG Kunai 3,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,misc1:b36,paddle1:b52,paddle2:b53,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux, 05000000050b00000679000000010000,ASUS ROG Kunai 3,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,misc1:b21,paddle1:b22,paddle2:b23,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux, 03000000503200000110000000000000,Atari Classic Controller,a:b0,b:b1,back:b2,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b4,start:b3,platform:Linux, 03000000503200000110000011010000,Atari Classic Controller,a:b0,b:b1,back:b2,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b4,start:b3,platform:Linux, 05000000503200000110000000000000,Atari Classic Controller,a:b0,b:b1,back:b2,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b4,start:b3,platform:Linux, 05000000503200000110000044010000,Atari Classic Controller,a:b0,b:b1,back:b2,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b4,start:b3,platform:Linux, 05000000503200000110000046010000,Atari Classic Controller,a:b0,b:b1,back:b2,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b4,start:b3,platform:Linux, 03000000503200000210000000000000,Atari Controller,a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a4,rightx:a2,righty:a3,start:b8,x:b2,y:b3,platform:Linux, 03000000503200000210000011010000,Atari Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b3,y:b2,platform:Linux, 05000000503200000210000000000000,Atari Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b3,y:b2,platform:Linux, 05000000503200000210000045010000,Atari Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b3,y:b2,platform:Linux, 05000000503200000210000046010000,Atari Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b3,y:b2,platform:Linux, 05000000503200000210000047010000,Atari VCS Modern Controller,a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:+a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:-a4,rightx:a2,righty:a3,start:b8,x:b2,y:b3,platform:Linux, 03000000c62400001b89000011010000,BDA MOGA XP5X Plus,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux, 03000000d62000002a79000011010000,BDA PS4 Fightpad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux, 03000000c21100000791000011010000,Be1 GC101 Controller 1.03,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux, 03000000c31100000791000011010000,Be1 GC101 Controller 1.03,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux, 030000005e0400008e02000003030000,Be1 GC101 Xbox 360,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 03000000bc2000004d50000011010000,BEITONG A1T2 BFM,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux, 05000000bc2000000055000001000000,BETOP AX1 BFM,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux, 03000000bc2000006412000011010000,Betop Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b30,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux, 030000006b1400000209000011010000,Bigben,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux, 03000000120c0000200e000011010000,Brook Mars PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux, 03000000120c0000210e000011010000,Brook Mars PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux, 03000000120c0000f70e000011010000,Brook Universal Fighting Board,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,rightshoulder:b5,rightstick:b11,righttrigger:b7,start:b9,x:b0,y:b3,platform:Linux, 03000000e82000006058000001010000,Cideko AK08b,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux, 030000000b0400003365000000010000,Competition Pro,a:b0,b:b1,back:b2,leftx:a0,lefty:a1,start:b3,platform:Linux, 03000000260900008888000000010000,Cyber Gadget GameCube Controller,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b6,righttrigger:a5,rightx:a2,righty:a3~,start:b7,x:b2,y:b3,platform:Linux, 03000000a306000022f6000011010000,Cyborg V3 Rumble,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:+a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:-a3,rightx:a2,righty:a4,start:b9,x:b0,y:b3,platform:Linux, 03000000791d00000103000010010000,Dual Box Wii Classic Adapter,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b6,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b5,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux, 030000006f0e00003001000001010000,EA Sports PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux, 03000000c11100000191000011010000,EasySMX,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux, 03000000242f00009100000000010000,EasySMX ESM-9101,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 030000006e0500000320000010010000,Elecom U3613M,a:b2,b:b3,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b8,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b7,rightx:a2,righty:a3,start:b11,x:b0,y:b1,platform:Linux, 030000006e0500000720000010010000,Elecom W01U,a:b2,b:b3,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b1,platform:Linux, 030000007d0400000640000010010000,Eliminator AfterShock,a:b1,b:b2,back:b9,dpdown:+a3,dpleft:-a5,dpright:+a5,dpup:-a3,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a4,righty:a2,start:b8,x:b0,y:b3,platform:Linux, 03000000430b00000300000000010000,EMS Production PS2 Adapter,a:b2,b:b1,back:b8,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a5,righty:a2,start:b9,x:b3,y:b0,platform:Linux, 030000006f0e00008401000011010000,Faceoff Deluxe Nintendo Switch Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,misc1:b13,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux, 030000006f0e00008101000011010000,Faceoff Deluxe Pro Nintendo Switch Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,misc1:b13,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux, 030000006f0e00008001000011010000,Faceoff Pro Nintendo Switch Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,misc1:b13,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux, 03005036852100000201000010010000,Final Fantasy XIV Online Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux, 03000000b40400001124000011010000,Flydigi Vader 2,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b12,lefttrigger:a5,leftx:a0,lefty:a1,misc1:b14,paddle1:b2,paddle2:b5,paddle3:b16,paddle4:b17,rightshoulder:b7,rightstick:b13,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux, 03000000b40400001224000011010000,Flydigi Vader 2,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b12,lefttrigger:a5,leftx:a0,lefty:a1,misc1:b2,paddle1:b16,paddle2:b17,paddle3:b14,paddle4:b15,rightshoulder:b7,rightstick:b13,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux, 05000000151900004000000001000000,Flydigi Vader 2,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b21,leftshoulder:b6,leftstick:b12,lefttrigger:a5,leftx:a0,lefty:a1,misc1:b14,paddle1:b2,paddle2:b5,paddle3:b16,paddle4:b17,rightshoulder:b7,rightstick:b13,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux, 030000007e0500003703000000000000,GameCube Adapter,a:b0,b:b1,dpdown:b9,dpleft:b10,dpright:b11,dpup:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b6,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b3,y:b2,platform:Linux, 19000000030000000300000002030000,GameForce Controller,a:b1,b:b0,back:b8,dpdown:b11,dpleft:b12,dpright:b13,dpup:b10,guide:b16,leftshoulder:b4,leftstick:b14,lefttrigger:b6,leftx:a1,lefty:a0,rightshoulder:b5,rightstick:b15,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b2,y:b3,platform:Linux, 03000000ac0500005b05000010010000,GameSir G3w,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux, 03000000bc2000000055000011010000,GameSir G3w,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux, 03000000558500001b06000010010000,GameSir G4 Pro,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux, 05000000ac0500002d0200001b010000,GameSir G4s,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b33,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux, 03000000ac0500007a05000011010000,GameSir G5,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b16,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux, 03000000bc2000005656000011010000,GameSir T4w,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux, 03000000ac0500001a06000011010000,GameSir-T3 2.02,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b15,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux, 0500000047532047616d657061640000,GameStop Gamepad,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Linux, 030000006f0e00000104000000010000,Gamestop Logic3 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 030000008f0e00000800000010010000,Gasia PlayStation Gamepad,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux, 03000000451300000010000010010000,Genius Maxfire Grandias 12,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Linux, 190000004b4800000010000000010000,GO-Advance Controller,a:b1,b:b0,back:b10,dpdown:b7,dpleft:b8,dpright:b9,dpup:b6,leftshoulder:b4,lefttrigger:b12,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b13,start:b15,x:b2,y:b3,platform:Linux, 190000004b4800000010000001010000,GO-Advance Controller,a:b1,b:b0,back:b12,dpdown:b9,dpleft:b10,dpright:b11,dpup:b8,leftshoulder:b4,leftstick:b13,lefttrigger:b14,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b16,righttrigger:b15,start:b17,x:b2,y:b3,platform:Linux, 190000004b4800000011000000010000,GO-Super Controller,a:b1,b:b0,back:b12,dpdown:b9,dpleft:b10,dpright:b11,dpup:b8,guide:b16,leftshoulder:b4,leftstick:b14,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b15,righttrigger:b7,rightx:a2,righty:a3,start:b13,x:b2,y:b3,platform:Linux, 03000000f0250000c183000010010000,Goodbetterbest Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux, 0300000079000000d418000000010000,GPD Win 2 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 030000005e0400008e02000001010000,GPD Win Max 2 (6800U) Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 030000007d0400000540000000010000,Gravis Eliminator Pro,a:b1,b:b2,back:b8,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Linux, 03000000280400000140000000010000,Gravis GamePad Pro,a:b1,b:b2,back:b8,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Linux, 030000008f0e00000610000000010000,GreenAsia Electronics Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b9,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b10,righttrigger:b5,rightx:a3,righty:a2,start:b11,x:b3,y:b0,platform:Linux, 030000008f0e00001200000010010000,GreenAsia Joystick,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b2,y:b3,platform:Linux, 0500000047532067616d657061640000,GS gamepad,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Linux, 03000000f0250000c383000010010000,GT VX2,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux, 06000000adde0000efbe000002010000,Hidromancer Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 03000000d81400000862000011010000,HitBox PS3 PC Analog Mode,a:b1,b:b2,back:b8,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,guide:b9,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b12,x:b0,y:b3,platform:Linux, 03000000c9110000f055000011010000,HJC Gamepad,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Linux, 030000000d0f00000d00000000010000,Hori,a:b0,b:b6,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b3,rightshoulder:b7,start:b9,x:b1,y:b2,platform:Linux, 030000000d0f00006d00000020010000,Hori EDGE 301,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:+a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:+a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 030000000d0f00008400000011010000,Hori Fighting Commander,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux, 030000000d0f00005f00000011010000,Hori Fighting Commander 4 PS3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux, 030000000d0f00005e00000011010000,Hori Fighting Commander 4 PS4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux, 030000000d0f00005001000009040000,Hori Fighting Commander OCTA Xbox One,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 030000000d0f00008500000010010000,Hori Fighting Commander PS3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux, 030000000d0f00008600000002010000,Hori Fighting Commander Xbox 360,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Linux, 030000000d0f00003701000013010000,Hori Fighting Stick Mini,a:b1,b:b0,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,lefttrigger:a2,rightshoulder:b5,righttrigger:a5,start:b7,x:b3,y:b2,platform:Linux, 030000000d0f00008800000011010000,Hori Fighting Stick mini 4 (PS3),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,rightshoulder:b5,rightstick:b11,righttrigger:b7,start:b9,x:b0,y:b3,platform:Linux, 030000000d0f00008700000011010000,Hori Fighting Stick mini 4 (PS4),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,rightshoulder:b5,rightstick:b11,righttrigger:a4,start:b9,x:b0,y:b3,platform:Linux, 030000000d0f00001000000011010000,Hori Fightstick 3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Linux, 03000000ad1b000003f5000033050000,Hori Fightstick VX,+leftx:h0.2,+lefty:h0.4,-leftx:h0.8,-lefty:h0.1,a:b0,b:b1,back:b8,guide:b10,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b2,y:b3,platform:Linux, 030000000d0f00004d00000011010000,Hori Gem Pad 3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux, 03000000ad1b000001f5000033050000,Hori Pad EX Turbo 2,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 030000000d0f00003801000011010000,Hori PC Engine Mini Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,start:b9,platform:Linux, 030000000d0f00009200000011010000,Hori Pokken Tournament DX Pro,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Linux, 030000000d0f00001100000011010000,Hori Real Arcade Pro 3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux, 030000000d0f00002200000011010000,Hori Real Arcade Pro 3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Linux, 030000000d0f00006a00000011010000,Hori Real Arcade Pro 4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux, 030000000d0f00006b00000011010000,Hori Real Arcade Pro 4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux, 030000000d0f00001600000000010000,Hori Real Arcade Pro EXSE,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b2,y:b3,platform:Linux, 030000000d0f0000aa00000011010000,Hori Real Arcade Pro for Nintendo Switch,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux, 030000000d0f00008501000015010000,Hori Switch Split Pad Pro,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 030000000d0f00006e00000011010000,Horipad 4 PS3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux, 030000000d0f00006600000011010000,Horipad 4 PS4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux, 030000000d0f0000ee00000011010000,Horipad Mini 4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux, 030000000d0f0000c100000011010000,Horipad Nintendo Switch Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,misc1:b13,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux, 030000000d0f00006700000001010000,Horipad One,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 050000000d0f0000f600000001000000,Horipad Switch Pro Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Linux, 03000000341a000005f7000010010000,HuiJia GameCube Controller Adapter,a:b1,b:b2,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:a4,rightx:a5,righty:a2,start:b9,x:b0,y:b3,platform:Linux, 05000000242e00000b20000001000000,Hyperkin Admiral N64 Controller,+rightx:b11,+righty:b13,-rightx:b8,-righty:b12,a:b1,b:b0,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b14,leftx:a0,lefty:a1,rightshoulder:b5,start:b9,platform:Linux, 03000000242e0000ff0b000011010000,Hyperkin N64 Adapter,a:b1,b:b2,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightx:a2,righty:a3,start:b9,platform:Linux, 03000000242e00006a38000010010000,Hyperkin Trooper 2,a:b0,b:b1,back:b4,leftshoulder:b2,leftx:a0,lefty:a1,rightshoulder:b3,start:b5,platform:Linux, 03000000242e00008816000001010000,Hyperkin X91,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 03000000f00300008d03000011010000,HyperX Clutch,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux, 03000000830500006020000010010000,iBuffalo Super Famicom Controller,a:b1,b:b0,back:b6,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,rightshoulder:b5,start:b7,x:b3,y:b2,platform:Linux, 050000006964726f69643a636f6e0000,idroidcon Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux, 03000000b50700001503000010010000,Impact,a:b2,b:b3,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b0,y:b1,platform:Linux, 03000000d80400008200000003000000,IMS PCU0,a:b1,b:b0,back:b4,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,start:b5,x:b3,y:b2,platform:Linux, 03000000120c00000500000010010000,InterAct AxisPad,a:b2,b:b3,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b7,rightx:a3,righty:a2,start:b11,x:b0,y:b1,platform:Linux, 03000000ef0500000300000000010000,InterAct AxisPad,a:b2,b:b3,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b7,rightx:a3,righty:a2,start:b11,x:b0,y:b1,platform:Linux, 03000000fd0500000030000000010000,InterAct GoPad,a:b3,b:b4,leftshoulder:b6,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b2,righttrigger:b5,x:b0,y:b1,platform:Linux, 03000000fd0500002a26000000010000,InterAct HammerHead FX,a:b3,b:b4,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b2,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b5,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b0,y:b1,platform:Linux, 0500000049190000020400001b010000,Ipega PG 9069,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b161,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux, 03000000632500007505000011010000,Ipega PG 9099,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux, 0500000049190000030400001b010000,Ipega PG9099,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux, 05000000491900000204000000000000,Ipega PG9118,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux, 03000000300f00001001000010010000,Jess Tech Dual Analog Rumble,a:b2,b:b3,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b0,y:b1,platform:Linux, 03000000300f00000b01000010010000,Jess Tech GGE909 PC Recoil,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b3,y:b0,platform:Linux, 03000000ba2200002010000001010000,Jess Technology Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b3,y:b0,platform:Linux, 030000007e0500000620000001000000,Joy-Con (L),+leftx:h0.2,+lefty:h0.4,-leftx:h0.8,-lefty:h0.1,a:b0,b:b1,back:b13,leftshoulder:b4,leftstick:b10,rightshoulder:b5,start:b8,x:b2,y:b3,platform:Linux, 050000007e0500000620000001000000,Joy-Con (L),+leftx:h0.2,+lefty:h0.4,-leftx:h0.8,-lefty:h0.1,a:b0,b:b1,back:b13,leftshoulder:b4,leftstick:b10,rightshoulder:b5,start:b8,x:b2,y:b3,platform:Linux, 030000007e0500000720000001000000,Joy-Con (R),+leftx:h0.2,+lefty:h0.4,-leftx:h0.8,-lefty:h0.1,a:b0,b:b1,back:b12,leftshoulder:b4,leftstick:b11,rightshoulder:b5,start:b9,x:b2,y:b3,platform:Linux, 050000007e0500000720000001000000,Joy-Con (R),+leftx:h0.2,+lefty:h0.4,-leftx:h0.8,-lefty:h0.1,a:b0,b:b1,back:b12,leftshoulder:b4,leftstick:b11,rightshoulder:b5,start:b9,x:b2,y:b3,platform:Linux, 03000000bd12000003c0000010010000,Joypad Alpha Shock,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux, 03000000242f00002d00000011010000,JYS Adapter,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux, 03000000242f00008a00000011010000,JYS Adapter,a:b1,b:b4,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b0,y:b3,platform:Linux, 030000006f0e00000103000000020000,Logic3 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 030000006d040000d1ca000000000000,Logitech Chillstream,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux, 030000006d040000d1ca000011010000,Logitech Chillstream,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux, 030000006d04000019c2000010010000,Logitech Cordless RumblePad 2,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux, 030000006d04000016c2000010010000,Logitech Dual Action,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux, 030000006d04000016c2000011010000,Logitech Dual Action,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux, 030000006d0400001dc2000014400000,Logitech F310,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 030000006d0400001ec2000019200000,Logitech F510,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 030000006d0400001ec2000020200000,Logitech F510,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 030000006d04000019c2000011010000,Logitech F710,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux, 030000006d0400001fc2000005030000,Logitech F710,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 030000006d04000018c2000010010000,Logitech RumblePad 2,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux, 030000006d04000011c2000010010000,Logitech WingMan Cordless RumblePad,a:b0,b:b1,back:b2,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b6,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b10,rightx:a3,righty:a4,start:b8,x:b3,y:b4,platform:Linux, 030000006d0400000ac2000010010000,Logitech WingMan RumblePad,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b2,rightx:a3,righty:a4,x:b3,y:b4,platform:Linux, 05000000380700006652000025010000,Mad Catz CTRLR,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux, 03000000380700008532000010010000,Mad Catz Fightpad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b5,rightshoulder:b6,righttrigger:b7,start:b9,x:b0,y:b3,platform:Linux, 03000000380700005032000011010000,Mad Catz Fightpad Pro PS3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux, 03000000380700005082000011010000,Mad Catz Fightpad Pro PS4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux, 03000000ad1b00002ef0000090040000,Mad Catz Fightpad SFxT,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,lefttrigger:a2,rightshoulder:b5,righttrigger:a5,start:b7,x:b2,y:b3,platform:Linux, 03000000380700008034000011010000,Mad Catz Fightstick PS3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux, 03000000380700008084000011010000,Mad Catz Fightstick PS4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux, 03000000380700008433000011010000,Mad Catz Fightstick TE S PS3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux, 03000000380700008483000011010000,Mad Catz Fightstick TE S PS4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux, 03000000380700001888000010010000,Mad Catz Joystick,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux, 03000000380700003888000010010000,Mad Catz Joystick,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:a0,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux, 03000000380700001647000010040000,Mad Catz Xbox 360 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 03000000380700003847000090040000,Mad Catz Xbox 360 Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Linux, 03000000ad1b000016f0000090040000,Mad Catz Xbox 360 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 03000000120c00000500000000010000,Manta Dualshock 2,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b2,y:b3,platform:Linux, 030000008f0e00001330000010010000,Mayflash Controller Adapter,a:b1,b:b2,back:b8,dpdown:h0.8,dpleft:h0.2,dpright:h0.1,dpup:h0.4,leftshoulder:b6,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightx:a3~,righty:a2,start:b9,x:b0,y:b3,platform:Linux, 03000000790000004318000010010000,Mayflash GameCube Adapter,a:b1,b:b0,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:a4,rightx:a5,righty:a2,start:b9,x:b2,y:b3,platform:Linux, 03000000790000004418000010010000,Mayflash GameCube Controller,a:b1,b:b0,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:a4,rightx:a5,righty:a2,start:b9,x:b2,y:b3,platform:Linux, 03000000242f00007300000011010000,Mayflash Magic NS,a:b1,b:b4,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b0,y:b3,platform:Linux, 0300000079000000d218000011010000,Mayflash Magic NS,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux, 03000000d620000010a7000011010000,Mayflash Magic NS,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux, 03000000242f0000f700000001010000,Mayflash Magic S Pro,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 030000008f0e00001030000010010000,Mayflash Saturn Adapter,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b5,lefttrigger:b7,rightshoulder:b6,righttrigger:b2,start:b9,x:b3,y:b4,platform:Linux, 0300000025090000e803000001010000,Mayflash Wii Classic Adapter,a:b1,b:b0,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:a4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:a5,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b2,platform:Linux, 03000000790000000318000011010000,Mayflash Wii DolphinBar,a:b2,b:b3,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b11,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b1,platform:Linux, 03000000790000000018000011010000,Mayflash Wii U Pro Adapter,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux, 03000000b50700001203000010010000,Mega World Logic 3 Controller,a:b2,b:b3,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b0,y:b1,platform:Linux, 03000000b50700004f00000000010000,Mega World Logic 3 Controller,a:b2,b:b3,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b1,platform:Linux, 03000000780000000600000010010000,Microntek Joystick,a:b2,b:b1,back:b8,leftshoulder:b6,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b5,start:b9,x:b3,y:b0,platform:Linux, 030000005e0400002800000000010000,Microsoft Dual Strike,a:b3,b:b2,back:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b8,rightshoulder:b7,rightx:a0,righty:a1~,start:b5,x:b1,y:b0,platform:Linux, 030000005e0400000300000000010000,Microsoft SideWinder,a:b0,b:b1,back:b9,leftshoulder:b6,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b2,start:b8,x:b3,y:b4,platform:Linux, 030000005e0400000700000000010000,Microsoft SideWinder,a:b0,b:b1,back:b8,leftshoulder:b6,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b2,start:b9,x:b3,y:b4,platform:Linux, 030000005e0400000e00000000010000,Microsoft SideWinder Freestyle Pro,a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,rightshoulder:b7,start:b8,x:b3,y:b4,platform:Linux, 030000005e0400002700000000010000,Microsoft SideWinder Plug and Play,a:b0,b:b1,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,lefttrigger:b4,righttrigger:b5,x:b2,y:b3,platform:Linux, 030000005e0400008502000000010000,Microsoft Xbox,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b5,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b2,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b3,y:b4,platform:Linux, 030000005e0400008902000021010000,Microsoft Xbox,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b5,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b2,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b3,y:b4,platform:Linux, 030000005e0400008e02000001000000,Microsoft Xbox 360,a:b0,b:b1,back:b6,dpdown:h0.1,dpleft:h0.2,dpright:h0.8,dpup:h0.4,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 030000005e0400008e02000004010000,Microsoft Xbox 360,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 030000005e0400008e02000056210000,Microsoft Xbox 360,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 030000005e0400008e02000062230000,Microsoft Xbox 360,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 030000005e040000d102000001010000,Microsoft Xbox One,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 030000005e040000d102000003020000,Microsoft Xbox One,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 030000005e040000dd02000003020000,Microsoft Xbox One,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 030000005e040000ea02000008040000,Microsoft Xbox One,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 060000005e040000120b000009050000,Microsoft Xbox One,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,misc1:b11,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 030000005e040000e302000003020000,Microsoft Xbox One Elite,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 030000005e040000000b000007040000,Microsoft Xbox One Elite 2,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,paddle1:b12,paddle2:b14,paddle3:b13,paddle4:b15,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 030000005e040000000b000008040000,Microsoft Xbox One Elite 2,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,paddle1:b12,paddle2:b14,paddle3:b13,paddle4:b15,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 050000005e040000050b000003090000,Microsoft Xbox One Elite 2,a:b0,b:b1,back:b17,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a6,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a5,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux, 050000005e0400008e02000030110000,Microsoft Xbox One Elite 2,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,paddle1:b11,paddle2:b13,paddle3:b12,paddle4:b14,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 030000005e040000120b00000b050000,Microsoft Xbox Series Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 03000000030000000300000002000000,Miroof,a:b1,b:b0,back:b6,leftshoulder:b4,leftx:a0,lefty:a1,rightshoulder:b5,start:b7,x:b3,y:b2,platform:Linux, 03000000790000001c18000010010000,Mobapad Chitu HD,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux, 050000004d4f435554452d3035335800,Mocute 053X,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Linux, 05000000e80400006e0400001b010000,Mocute 053X M59,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux, 050000004d4f435554452d3035305800,Mocute 054X,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux, 05000000d6200000e589000001000000,Moga 2,a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b7,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b8,righttrigger:a4,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Linux, 05000000d6200000ad0d000001000000,Moga Pro,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b7,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b8,righttrigger:a4,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Linux, 05000000d62000007162000001000000,Moga Pro 2,a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b7,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b8,righttrigger:a4,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Linux, 03000000c62400002b89000011010000,MOGA XP5A Plus,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux, 05000000c62400002a89000000010000,MOGA XP5A Plus,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b22,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux, 05000000c62400001a89000000010000,MOGA XP5X Plus,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux, 03000000250900006688000000010000,MP8866 Super Dual Box,a:b2,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a2,righty:a3,start:b8,x:b3,y:b0,platform:Linux, 030000005e0400008e02000010020000,MSI GC20 V2,a:b0,b:b1,back:b6,dpdown:b13,dpleft:b14,dpright:b15,dpup:b12,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 030000006b1400000906000014010000,Nacon Asymmetric Wireless PS4 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 030000006b140000010c000010010000,Nacon GC 400ES,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Linux, 03000000853200000706000012010000,Nacon GC-100,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 030000000d0f00000900000010010000,Natec Genesis P44,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux, 030000004f1f00000800000011010000,NeoGeo PS3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Linux, 0300000092120000474e000000010000,NeoGeo X Arcade Stick,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,start:b9,x:b3,y:b2,platform:Linux, 03000000790000004518000010010000,Nexilux GameCube Controller Adapter,a:b1,b:b0,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:a4,rightx:a5,righty:a2,start:b9,x:b2,y:b3,platform:Linux, 030000001008000001e5000010010000,NEXT SNES Controller,a:b2,b:b1,back:b8,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,rightshoulder:b5,righttrigger:b6,start:b9,x:b3,y:b0,platform:Linux, 060000007e0500003713000000000000,Nintendo 3DS,a:b0,b:b1,back:b8,dpdown:b11,dpleft:b12,dpright:b13,dpup:b10,leftshoulder:b4,leftx:a0,lefty:a1,rightshoulder:b5,rightx:a2,righty:a3,start:b9,x:b3,y:b2,platform:Linux, 030000009b2800008000000020020000,Nintendo Classic Controller,a:b1,b:b4,back:b2,dpdown:b13,dpleft:b14,dpright:b15,dpup:b12,leftshoulder:b6,rightshoulder:b7,start:b3,x:b0,y:b5,platform:Linux, 030000007e0500003703000000016800,Nintendo GameCube Controller,a:b0,b:b2,dpdown:b6,dpleft:b4,dpright:b5,dpup:b7,lefttrigger:a4,leftx:a0,lefty:a1~,rightshoulder:b9,righttrigger:a5,rightx:a2,righty:a3~,start:b8,x:b1,y:b3,platform:Linux, 03000000790000004618000010010000,Nintendo GameCube Controller Adapter,a:b1,b:b0,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b5,rightx:a5~,righty:a2~,start:b9,x:b2,y:b3,platform:Linux, 060000004e696e74656e646f20537700,Nintendo Switch Combined Joy-Cons,a:b0,b:b1,back:b9,dpdown:b15,dpleft:b16,dpright:b17,dpup:b14,guide:b11,leftshoulder:b5,leftstick:b12,lefttrigger:b7,leftx:a0,lefty:a1,misc1:b4,rightshoulder:b6,rightstick:b13,righttrigger:b8,rightx:a2,righty:a3,start:b10,x:b3,y:b2,platform:Linux, 060000007e0500000620000000000000,Nintendo Switch Combined Joy-Cons,a:b0,b:b1,back:b9,dpdown:b15,dpleft:b16,dpright:b17,dpup:b14,guide:b11,leftshoulder:b5,leftstick:b12,lefttrigger:b7,leftx:a0,lefty:a1,misc1:b4,rightshoulder:b6,rightstick:b13,righttrigger:b8,rightx:a2,righty:a3,start:b10,x:b3,y:b2,platform:Linux, 060000007e0500000820000000000000,Nintendo Switch Combined Joy-Cons,a:b0,b:b1,back:b9,dpdown:b15,dpleft:b16,dpright:b17,dpup:b14,guide:b11,leftshoulder:b5,leftstick:b12,lefttrigger:b7,leftx:a0,lefty:a1,misc1:b4,rightshoulder:b6,rightstick:b13,righttrigger:b8,rightx:a2,righty:a3,start:b10,x:b3,y:b2,platform:Linux, 050000004c69632050726f20436f6e00,Nintendo Switch Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,misc1:b13,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Linux, 050000007e0500000620000001800000,Nintendo Switch Left Joy-Con,a:b16,b:b15,back:b4,leftshoulder:b6,leftstick:b12,leftx:a1,lefty:a0~,rightshoulder:b8,start:b9,x:b14,y:b17,platform:Linux, 030000007e0500000920000000026803,Nintendo Switch Pro Controller,a:b1,b:b0,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b3,y:b2,platform:Linux, 030000007e0500000920000011810000,Nintendo Switch Pro Controller,a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b11,leftshoulder:b5,leftstick:b12,lefttrigger:b7,leftx:a0,lefty:a1,misc1:b4,rightshoulder:b6,rightstick:b13,righttrigger:b8,rightx:a2,righty:a3,start:b10,x:b3,y:b2,platform:Linux, 050000007e0500000920000001000000,Nintendo Switch Pro Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,misc1:b13,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Linux, 050000007e0500000920000001800000,Nintendo Switch Pro Controller,a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b11,leftshoulder:b5,leftstick:b12,lefttrigger:b7,leftx:a0,lefty:a1,misc1:b4,rightshoulder:b6,rightstick:b13,righttrigger:b8,rightx:a2,righty:a3,start:b10,x:b3,y:b2,platform:Linux, 050000007e0500000720000001800000,Nintendo Switch Right Joy-Con,a:b1,b:b2,back:b9,leftshoulder:b4,leftstick:b10,leftx:a1~,lefty:a0,rightshoulder:b6,start:b8,x:b0,y:b3,platform:Linux, 05000000010000000100000003000000,Nintendo Wii Remote,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Linux, 050000007e0500003003000001000000,Nintendo Wii U Pro Controller,a:b0,b:b1,back:b8,dpdown:b14,dpleft:b15,dpright:b16,dpup:b13,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b2,platform:Linux, 030000000d0500000308000010010000,Nostromo n45 Dual Analog,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b9,leftshoulder:b4,leftstick:b12,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b10,x:b2,y:b3,platform:Linux, 030000007e0500001920000011810000,NSO N64 Controller,+rightx:b10,+righty:b8,-rightx:b9,-righty:b7,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b11,leftshoulder:b3,lefttrigger:b2,leftx:a0,lefty:a1,misc1:b12,rightshoulder:b4,righttrigger:b5,start:b6,platform:Linux, 050000007e0500001920000001000000,NSO N64 Controller,+rightx:b8,+righty:b7,-rightx:b3,-righty:b2,a:b1,b:b0,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,misc1:b13,rightshoulder:b5,righttrigger:b10,start:b9,platform:Linux, 050000007e0500001920000001800000,NSO N64 Controller,+rightx:b10,+righty:b8,-rightx:b9,-righty:b7,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b11,leftshoulder:b3,lefttrigger:b2,leftx:a0,lefty:a1,misc1:b12,rightshoulder:b4,righttrigger:b5,start:b6,platform:Linux, 030000007e0500001720000011810000,NSO SNES Controller,a:b1,b:b0,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b3,y:b2,platform:Linux, 050000007e0500001720000001000000,NSO SNES Controller,a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b5,lefttrigger:b7,rightshoulder:b6,righttrigger:b8,start:b10,x:b3,y:b2,platform:Linux, 050000007e0500001720000001800000,NSO SNES Controller,a:b1,b:b0,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b3,y:b2,platform:Linux, 03000000550900001072000011010000,NVIDIA Controller,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b13,leftshoulder:b4,leftstick:b8,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a4,rightx:a2,righty:a3,start:b7,x:b2,y:b3,platform:Linux, 03000000550900001472000011010000,NVIDIA Controller v01.04,a:b0,b:b1,back:b14,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b16,leftshoulder:b4,leftstick:b7,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b8,righttrigger:a4,rightx:a2,righty:a5,start:b6,x:b2,y:b3,platform:Linux, 05000000550900001472000001000000,NVIDIA Controller v01.04,a:b0,b:b1,back:b14,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b16,leftshoulder:b4,leftstick:b7,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b8,righttrigger:a4,rightx:a2,righty:a5,start:b6,x:b2,y:b3,platform:Linux, 03000000451300000830000010010000,NYKO CORE,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux, 19000000010000000100000001010000,ODROID Go 2,a:b1,b:b0,dpdown:b7,dpleft:b8,dpright:b9,dpup:b6,guide:b10,leftshoulder:b4,leftstick:b12,lefttrigger:b11,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b13,righttrigger:b14,start:b15,x:b2,y:b3,platform:Linux, 19000000010000000200000011000000,ODROID Go 2,a:b1,b:b0,dpdown:b9,dpleft:b10,dpright:b11,dpup:b8,guide:b12,leftshoulder:b4,leftstick:b14,lefttrigger:b13,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b15,righttrigger:b16,start:b17,x:b2,y:b3,platform:Linux, 03000000c0160000dc27000001010000,OnyxSoft Dual JoyDivision,a:b0,b:b1,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,rightshoulder:b5,start:b6,x:b2,y:b3,platform:Linux, 05000000362800000100000002010000,OUYA Controller,a:b0,b:b3,dpdown:b9,dpleft:b10,dpright:b11,dpup:b8,guide:b14,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,x:b1,y:b2,platform:Linux, 05000000362800000100000003010000,OUYA Controller,a:b0,b:b3,dpdown:b9,dpleft:b10,dpright:b11,dpup:b8,guide:b14,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,x:b1,y:b2,platform:Linux, 05000000362800000100000004010000,OUYA Controller,a:b0,b:b3,back:b14,dpdown:b9,dpleft:b10,dpright:b11,dpup:b8,leftshoulder:b4,leftstick:b6,lefttrigger:b12,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:b13,rightx:a3,righty:a4,start:b16,x:b1,y:b2,platform:Linux, 03000000830500005020000010010000,Padix Rockfire PlayStation Bridge,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b7,rightx:a2,righty:a3,start:b11,x:b2,y:b3,platform:Linux, 03000000ff1100003133000010010000,PC Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux, 030000006f0e0000b802000001010000,PDP Afterglow Xbox One Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 030000006f0e0000b802000013020000,PDP Afterglow Xbox One Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 030000006f0e00006401000001010000,PDP Battlefield One,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 030000006f0e0000d702000006640000,PDP Black Camo Wired Xbox Series X Controller,a:b0,b:b1,back:b6,dpdown:b13,dpleft:b14,dpright:b13,dpup:b14,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 030000006f0e00003101000000010000,PDP EA Sports Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 030000006f0e00008501000011010000,PDP Fightpad Pro Gamecube Controller,a:b1,b:b0,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Linux, 030000006f0e0000c802000012010000,PDP Kingdom Hearts Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 030000006f0e00002801000011010000,PDP PS3 Rock Candy Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux, 030000006f0e00000901000011010000,PDP PS3 Versus Fighting,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Linux, 03000000ad1b000004f9000000010000,PDP Xbox 360 Versus Fighting,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,lefttrigger:a2,rightshoulder:b5,righttrigger:a5,start:b7,x:b2,y:b3,platform:Linux, 030000006f0e0000a802000023020000,PDP Xbox One Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Linux, 030000006f0e0000a702000023020000,PDP Xbox One Raven Black,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 030000006f0e0000d802000006640000,PDP Xbox Series Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 030000006f0e0000ef02000007640000,PDP Xbox Series Kinetic Wired Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 03000000666600006706000000010000,PlayStation Adapter,a:b2,b:b1,back:b8,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,leftshoulder:b6,leftstick:b9,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b10,righttrigger:b5,rightx:a2,righty:a3,start:b11,x:b3,y:b0,platform:Linux, 030000004c050000da0c000011010000,PlayStation Controller,a:b2,b:b1,back:b8,leftshoulder:b6,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b5,start:b9,x:b3,y:b0,platform:Linux, 03000000d9040000160f000000010000,PlayStation Controller Adapter,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a3,righty:a2,start:b9,x:b3,y:b0,platform:Linux, 030000004c0500003713000011010000,PlayStation Vita,a:b1,b:b2,back:b8,dpdown:b13,dpleft:b15,dpright:b14,dpup:b12,leftshoulder:b4,leftx:a0,lefty:a1,rightshoulder:b5,rightx:a3,righty:a4,start:b9,x:b0,y:b3,platform:Linux, 03000000c62400000053000000010000,PowerA,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 03000000c62400003a54000001010000,PowerA 1428124-01,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 03000000d620000011a7000011010000,PowerA Core Plus Gamecube Controller,a:b1,b:b0,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Linux, 03000000dd62000015a7000011010000,PowerA Fusion Nintendo Switch Arcade Stick,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,misc1:b13,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux, 03000000d620000012a7000011010000,PowerA Fusion Nintendo Switch Fight Pad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,misc1:b13,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux, 03000000d62000000140000001010000,PowerA Fusion Pro 2 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 03000000dd62000016a7000000000000,PowerA Fusion Pro Nintendo Switch Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,misc1:b13,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux, 03000000c62400001a53000000010000,PowerA Mini Pro Ex,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 03000000d620000013a7000011010000,PowerA Nintendo Switch Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,misc1:b13,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux, 03000000d62000006dca000011010000,PowerA Pro Ex,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux, 03000000d620000014a7000011010000,PowerA Spectra Nintendo Switch Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,misc1:b13,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux, 03000000c62400001a58000001010000,PowerA Xbox One,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 03000000d62000000220000001010000,PowerA Xbox One Controller,a:b0,b:b1,back:b7,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b6,x:b2,y:b3,platform:Linux, 03000000d62000000228000001010000,PowerA Xbox One Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 03000000c62400001a54000001010000,PowerA Xbox One Mini Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 03000000d62000000240000001010000,PowerA Xbox One Spectra Infinity,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 03000000d62000000f20000001010000,PowerA Xbox Series Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b7,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 030000006d040000d2ca000011010000,Precision Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux, 03000000ff1100004133000010010000,PS2 Controller,a:b2,b:b1,back:b8,leftshoulder:b6,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b5,start:b9,x:b3,y:b0,platform:Linux, 03000000341a00003608000011010000,PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux, 030000004c0500006802000010010000,PS3 Controller,a:b14,b:b13,back:b0,dpdown:b6,dpleft:b7,dpright:b5,dpup:b4,guide:b16,leftshoulder:b10,leftstick:b1,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b11,rightstick:b2,righttrigger:b9,rightx:a2,righty:a3,start:b3,x:b15,y:b12,platform:Linux, 030000004c0500006802000010810000,PS3 Controller,a:b0,b:b1,back:b8,dpdown:b14,dpleft:b15,dpright:b16,dpup:b13,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b3,y:b2,platform:Linux, 030000004c0500006802000011010000,PS3 Controller,a:b14,b:b13,back:b0,dpdown:b6,dpleft:b7,dpright:b5,dpup:b4,guide:b16,leftshoulder:b10,leftstick:b1,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b11,rightstick:b2,righttrigger:b9,rightx:a2,righty:a3,start:b3,x:b15,y:b12,platform:Linux, 030000004c0500006802000011810000,PS3 Controller,a:b0,b:b1,back:b8,dpdown:b14,dpleft:b15,dpright:b16,dpup:b13,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b3,y:b2,platform:Linux, 030000005f1400003102000010010000,PS3 Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux, 030000006f0e00001402000011010000,PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux, 030000008f0e00000300000010010000,PS3 Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux, 050000004c0500006802000000000000,PS3 Controller,a:b14,b:b13,back:b0,dpdown:b6,dpleft:b7,dpright:b5,dpup:b4,guide:b16,leftshoulder:b10,leftstick:b1,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b11,rightstick:b2,righttrigger:b9,rightx:a2,righty:a3,start:b3,x:b15,y:b12,platform:Linux, 050000004c0500006802000000010000,PS3 Controller,a:b14,b:b13,back:b0,dpdown:b6,dpleft:b7,dpright:b5,dpup:b4,guide:b16,leftshoulder:b10,leftstick:b1,lefttrigger:a12,leftx:a0,lefty:a1,rightshoulder:b11,rightstick:b2,righttrigger:a13,rightx:a2,righty:a3,start:b3,x:b15,y:b12,platform:Linux, 050000004c0500006802000000800000,PS3 Controller,a:b0,b:b1,back:b8,dpdown:b14,dpleft:b15,dpright:b16,dpup:b13,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b3,y:b2,platform:Linux, 050000004c0500006802000000810000,PS3 Controller,a:b0,b:b1,back:b8,dpdown:b14,dpleft:b15,dpright:b16,dpup:b13,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b3,y:b2,platform:Linux, 05000000504c415953544154494f4e00,PS3 Controller,a:b14,b:b13,back:b0,dpdown:b6,dpleft:b7,dpright:b5,dpup:b4,guide:b16,leftshoulder:b10,leftstick:b1,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b11,rightstick:b2,righttrigger:b9,rightx:a2,righty:a3,start:b3,x:b15,y:b12,platform:Linux, 060000004c0500006802000000010000,PS3 Controller,a:b14,b:b13,back:b0,dpdown:b6,dpleft:b7,dpright:b5,dpup:b4,guide:b16,leftshoulder:b10,leftstick:b1,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b11,rightstick:b2,righttrigger:b9,rightx:a2,righty:a3,start:b3,x:b15,y:b12,platform:Linux, 030000004c050000a00b000011010000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux, 030000004c050000a00b000011810000,PS4 Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b3,y:b2,platform:Linux, 030000004c050000c405000011010000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux, 030000004c050000c405000011810000,PS4 Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b3,y:b2,platform:Linux, 030000004c050000cc09000000010000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux, 030000004c050000cc09000011010000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux, 030000004c050000cc09000011810000,PS4 Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b3,y:b2,platform:Linux, 03000000c01100000140000011010000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux, 050000004c050000c405000000010000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux, 050000004c050000c405000000810000,PS4 Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b3,y:b2,platform:Linux, 050000004c050000c405000001800000,PS4 Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b3,y:b2,platform:Linux, 050000004c050000cc09000000010000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux, 050000004c050000cc09000000810000,PS4 Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b3,y:b2,platform:Linux, 050000004c050000cc09000001800000,PS4 Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b3,y:b2,platform:Linux, 030000004c050000e60c000011010000,PS5 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,misc1:b14,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,touchpad:b13,x:b0,y:b3,platform:Linux, 030000004c050000e60c000011810000,PS5 Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b3,y:b2,platform:Linux, 030000004c050000f20d000011010000,PS5 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,misc1:b14,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,touchpad:b13,x:b0,y:b3,platform:Linux, 050000004c050000e60c000000010000,PS5 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,touchpad:b13,x:b0,y:b3,platform:Linux, 050000004c050000e60c000000810000,PS5 Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b3,y:b2,platform:Linux, 050000004c050000f20d000000010000,PS5 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,touchpad:b13,x:b0,y:b3,platform:Linux, 03000000300f00001211000011010000,Qanba Arcade Joystick,a:b2,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b5,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b6,start:b9,x:b1,y:b3,platform:Linux, 03000000222c00000225000011010000,Qanba Dragon Arcade Joystick (PS3),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux, 03000000222c00000025000011010000,Qanba Dragon Arcade Joystick (PS4),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux, 03000000222c00000020000011010000,Qanba Drone Arcade PS4 Joystick,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,rightshoulder:b5,righttrigger:a4,start:b9,x:b0,y:b3,platform:Linux, 03000000300f00001210000010010000,Qanba Joystick Plus,a:b0,b:b1,back:b8,leftshoulder:b5,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b4,righttrigger:b6,start:b9,x:b2,y:b3,platform:Linux, 03000000222c00000223000011010000,Qanba Obsidian Arcade Joystick (PS3),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux, 03000000222c00000023000011010000,Qanba Obsidian Arcade Joystick (PS4),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux, 030000009b2800000300000001010000,Raphnet 4nes4snes,a:b0,b:b4,back:b2,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b3,x:b1,y:b5,platform:Linux, 030000009b2800004200000001010000,Raphnet Dual NES Adapter,a:b0,b:b1,back:b2,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,start:b3,platform:Linux, 030000009b2800003200000001010000,Raphnet GC and N64 Adapter,a:b0,b:b7,dpdown:b11,dpleft:b12,dpright:b13,dpup:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b2,righttrigger:b5,rightx:a3,righty:a4,start:b3,x:b1,y:b8,platform:Linux, 030000009b2800006000000001010000,Raphnet GC and N64 Adapter,a:b0,b:b7,dpdown:b11,dpleft:b12,dpright:b13,dpup:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b2,righttrigger:b5,rightx:a3,righty:a4,start:b3,x:b1,y:b8,platform:Linux, 03000000f8270000bf0b000011010000,Razer Kishi,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux, 030000008916000001fd000024010000,Razer Onza Classic Edition,a:b0,b:b1,back:b6,dpdown:b14,dpleft:b11,dpright:b12,dpup:b13,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 03000000321500000204000011010000,Razer Panthera PS3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux, 03000000321500000104000011010000,Razer Panthera PS4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux, 03000000321500000810000011010000,Razer Panthera PS4 Evo Arcade Stick,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b13,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux, 03000000321500000010000011010000,Razer Raiju,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux, 03000000321500000507000000010000,Razer Raiju Mobile,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b21,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux, 05000000321500000a10000001000000,Razer Raiju Tournament Edition,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b13,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux, 03000000321500000011000011010000,Razer Raion PS4 Fightpad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux, 030000008916000000fe000024010000,Razer Sabertooth,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 03000000c6240000045d000024010000,Razer Sabertooth,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 03000000c6240000045d000025010000,Razer Sabertooth,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 03000000321500000009000011010000,Razer Serval,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a4,rightx:a2,righty:a3,start:b7,x:b2,y:b3,platform:Linux, 050000003215000000090000163a0000,Razer Serval,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a4,rightx:a2,righty:a3,start:b7,x:b2,y:b3,platform:Linux, 0300000032150000030a000001010000,Razer Wildcat,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 03000000321500000b10000011010000,Razer Wolverine PS5 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,touchpad:b13,x:b0,y:b3,platform:Linux, 03000000790000001100000010010000,Retro Controller,a:b1,b:b2,back:b8,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,lefttrigger:b7,rightshoulder:b4,righttrigger:b5,start:b9,x:b0,y:b3,platform:Linux, 0300000003040000c197000011010000,Retrode Adapter,a:b0,b:b4,back:b2,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,rightshoulder:b7,start:b3,x:b1,y:b5,platform:Linux, 190000004b4800000111000000010000,RetroGame Joypad,a:b1,b:b0,back:b8,dpdown:b14,dpleft:b15,dpright:b16,dpup:b13,leftshoulder:b4,leftstick:b11,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Linux, 0300000081170000990a000001010000,Retronic Adapter,a:b0,leftx:a0,lefty:a1,platform:Linux, 0300000000f000000300000000010000,RetroPad,a:b1,b:b5,back:b2,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,start:b3,x:b0,y:b4,platform:Linux, 00000000526574726f53746f6e653200,RetroStone 2 Controller,a:b1,b:b0,back:b10,dpdown:b15,dpleft:b16,dpright:b17,dpup:b14,leftshoulder:b6,lefttrigger:b8,rightshoulder:b7,righttrigger:b9,start:b11,x:b4,y:b3,platform:Linux, 03000000341200000400000000010000,RetroUSB N64 RetroPort,+rightx:b8,+righty:b10,-rightx:b9,-righty:b11,a:b7,b:b6,dpdown:b2,dpleft:b1,dpright:b0,dpup:b3,leftshoulder:b13,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b12,start:b4,platform:Linux, 030000006b140000010d000011010000,Revolution Pro Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux, 030000006b140000130d000011010000,Revolution Pro Controller 3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux, 030000006f0e00001f01000000010000,Rock Candy,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 030000006f0e00008701000011010000,Rock Candy Nintendo Switch Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,misc1:b13,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux, 030000006f0e00001e01000011010000,Rock Candy PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux, 03000000c6240000fefa000000010000,Rock Candy Xbox 360 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 030000006f0e00004601000001010000,Rock Candy Xbox One Controller,a:b0,b:b1,back:b6,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 03000000a306000023f6000011010000,Saitek Cyborg V1 PlayStation Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a4,start:b9,x:b0,y:b3,platform:Linux, 03000000a30600001005000000010000,Saitek P150,a:b0,b:b1,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b7,lefttrigger:b6,rightshoulder:b2,righttrigger:b5,x:b3,y:b4,platform:Linux, 03000000a30600000701000000010000,Saitek P220,a:b2,b:b3,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,lefttrigger:b7,rightshoulder:b4,righttrigger:b5,x:b0,y:b1,platform:Linux, 03000000a30600000cff000010010000,Saitek P2500 Force Rumble,a:b2,b:b3,back:b11,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b7,rightx:a3,righty:a2,start:b10,x:b0,y:b1,platform:Linux, 03000000a30600000c04000011010000,Saitek P2900,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b9,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a3,righty:a2,start:b12,x:b0,y:b3,platform:Linux, 03000000a306000018f5000010010000,Saitek P3200 Rumble,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a3,righty:a4,start:b9,x:b0,y:b3,platform:Linux, 03000000300f00001201000010010000,Saitek P380,a:b2,b:b3,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b0,y:b1,platform:Linux, 03000000a30600000901000000010000,Saitek P880,a:b2,b:b3,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b7,rightx:a3,righty:a2,x:b0,y:b1,platform:Linux, 03000000a30600000b04000000010000,Saitek P990 Dual Analog,a:b1,b:b2,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b8,x:b0,y:b3,platform:Linux, 03000000a306000020f6000011010000,Saitek PS2700 Rumble,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a4,start:b9,x:b0,y:b3,platform:Linux, 05000000e804000000a000001b010000,Samsung EIGP20,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b15,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux, 03000000d81d00000e00000010010000,Savior,a:b0,b:b1,back:b8,leftshoulder:b6,leftstick:b10,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b2,rightstick:b11,righttrigger:b3,start:b9,x:b4,y:b5,platform:Linux, 03000000a30c00002500000011010000,Sega Genesis Mini 3B Controller,a:b2,b:b1,dpdown:+a4,dpleft:-a3,dpright:+a3,dpup:-a4,righttrigger:b5,start:b9,platform:Linux, 03000000790000001100000011010000,Sega Saturn,a:b1,b:b2,back:b8,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,lefttrigger:b7,rightshoulder:b5,righttrigger:b4,start:b9,x:b0,y:b3,platform:Linux, 03000000790000002201000011010000,Sega Saturn,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b5,rightshoulder:b6,righttrigger:b7,start:b9,x:b2,y:b3,platform:Linux, 03000000b40400000a01000000010000,Sega Saturn,a:b0,b:b1,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,lefttrigger:b7,rightshoulder:b5,righttrigger:b2,start:b8,x:b3,y:b4,platform:Linux, 030000001f08000001e4000010010000,SFC Controller,a:b2,b:b1,back:b8,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,rightshoulder:b5,start:b9,x:b3,y:b0,platform:Linux, 03000000632500002305000010010000,ShanWan Gamepad,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux, 03000000632500002605000010010000,Shanwan Gamepad,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux, 03000000632500007505000010010000,Shanwan Gamepad,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux, 03000000bc2000000055000010010000,Shanwan Gamepad,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux, 03000000f025000021c1000010010000,Shanwan Gioteck PS3 Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux, 03000000341a00000908000010010000,SL6566,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Linux, 050000004c050000cc09000001000000,Sony DualShock 4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux, 03000000ff000000cb01000010010000,Sony PlayStation Portable,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftx:a0,lefty:a1,rightshoulder:b5,start:b7,x:b2,y:b3,platform:Linux, 03000000250900000500000000010000,Sony PS2 pad with SmartJoy Adapter,a:b2,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a2,righty:a3,start:b8,x:b3,y:b0,platform:Linux, 030000005e0400008e02000073050000,Speedlink Torid,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 030000005e0400008e02000020200000,SpeedLink Xeox Pro Analog,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 03000000d11800000094000011010000,Stadia Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a4,rightx:a2,righty:a3,start:b7,x:b2,y:b3,platform:Linux, 05000000d11800000094000000010000,Stadia Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a4,rightx:a2,righty:a3,start:b7,x:b2,y:b3,platform:Linux, 03000000de2800000112000001000000,Steam Controller,a:b0,b:b1,back:b6,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,paddle1:b11,paddle2:b10,rightshoulder:b5,righttrigger:a3,start:b7,x:b2,y:b3,platform:Linux, 03000000de2800000112000011010000,Steam Controller,a:b2,b:b3,back:b10,dpdown:+a5,dpleft:-a4,dpright:+a4,dpup:-a5,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a7,leftx:a0,lefty:a1,paddle1:b15,paddle2:b16,rightshoulder:b7,rightstick:b14,righttrigger:a6,rightx:a2,righty:a3,start:b11,x:b4,y:b5,platform:Linux, 03000000de2800000211000001000000,Steam Controller,a:b0,b:b1,back:b6,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,paddle1:b11,paddle2:b10,rightshoulder:b5,righttrigger:a3,start:b7,x:b2,y:b3,platform:Linux, 03000000de2800000211000011010000,Steam Controller,a:b2,b:b3,back:b10,dpdown:b18,dpleft:b19,dpright:b20,dpup:b17,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,paddle1:b16,paddle2:b15,rightshoulder:b7,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b4,y:b5,platform:Linux, 03000000de2800004211000001000000,Steam Controller,a:b0,b:b1,back:b6,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,paddle1:b11,paddle2:b10,rightshoulder:b5,righttrigger:a3,start:b7,x:b2,y:b3,platform:Linux, 03000000de2800004211000011010000,Steam Controller,a:b2,b:b3,back:b10,dpdown:b18,dpleft:b19,dpright:b20,dpup:b17,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a7,leftx:a0,lefty:a1,paddle1:b16,paddle2:b15,rightshoulder:b7,righttrigger:a6,rightx:a2,righty:a3,start:b11,x:b4,y:b5,platform:Linux, 03000000de280000fc11000001000000,Steam Controller,a:b0,b:b1,back:b6,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 05000000de2800000212000001000000,Steam Controller,a:b0,b:b1,back:b6,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,paddle1:b11,paddle2:b10,rightshoulder:b5,righttrigger:a3,start:b7,x:b2,y:b3,platform:Linux, 05000000de2800000511000001000000,Steam Controller,a:b0,b:b1,back:b6,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,paddle1:b11,paddle2:b10,rightshoulder:b5,righttrigger:a3,start:b7,x:b2,y:b3,platform:Linux, 05000000de2800000611000001000000,Steam Controller,a:b0,b:b1,back:b6,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,paddle1:b11,paddle2:b10,rightshoulder:b5,righttrigger:a3,start:b7,x:b2,y:b3,platform:Linux, 03000000de2800000512000010010000,Steam Deck,a:b3,b:b4,back:b11,dpdown:b17,dpleft:b18,dpright:b19,dpup:b16,guide:b13,leftshoulder:b7,leftstick:b14,lefttrigger:a9,leftx:a0,lefty:a1,rightshoulder:b8,rightstick:b15,righttrigger:a8,rightx:a2,righty:a3,start:b12,x:b5,y:b6,platform:Linux, 03000000de280000ff11000001000000,Steam Virtual Gamepad,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 050000004e696d6275732b0000000000,SteelSeries Nimbus Plus,a:b0,b:b1,back:b10,guide:b11,leftshoulder:b4,leftstick:b8,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b7,rightx:a2,righty:a3,start:b12,x:b2,y:b3,platform:Linux, 03000000381000003014000075010000,SteelSeries Stratus Duo,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 03000000381000003114000075010000,SteelSeries Stratus Duo,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 0500000011010000311400001b010000,SteelSeries Stratus Duo,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b32,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux, 05000000110100001914000009010000,SteelSeries Stratus XL,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux, 03000000ad1b000038f0000090040000,Street Fighter IV Fightstick TE,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 030000003b07000004a1000000010000,Suncom SFX Plus,a:b0,b:b2,back:b7,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,lefttrigger:b4,rightshoulder:b9,righttrigger:b5,start:b8,x:b1,y:b3,platform:Linux, 03000000666600000488000000010000,Super Joy Box 5 Pro,a:b2,b:b1,back:b9,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a2,righty:a3,start:b8,x:b3,y:b0,platform:Linux, 0300000000f00000f100000000010000,Super RetroPort,a:b1,b:b5,back:b2,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,rightshoulder:b7,start:b3,x:b0,y:b4,platform:Linux, 030000008f0e00000d31000010010000,SZMY Power 3 Turbo,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux, 03000000457500000401000011010000,SZMY Power DS4 Wired Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,misc1:b13,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux, 03000000457500002211000010010000,SZMY Power Gamepad,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux, 030000008f0e00001431000010010000,SZMY Power PS3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux, 03000000ba2200000701000001010000,Technology Innovation PS2 Adapter,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a5,righty:a2,start:b9,x:b3,y:b2,platform:Linux, 03000000790000001c18000011010000,TGZ Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux, 03000000591c00002400000010010000,THEC64 Joystick,a:b0,b:b1,back:b6,leftshoulder:b4,leftx:a0,lefty:a1,rightshoulder:b5,start:b7,x:b2,y:b3,platform:Linux, 03000000591c00002600000010010000,THEGamepad,a:b2,b:b1,back:b6,leftshoulder:b4,leftx:a0,lefty:a1,rightshoulder:b5,start:b7,x:b3,y:b0,platform:Linux, 030000004f04000015b3000001010000,Thrustmaster Dual Analog 3.2,a:b0,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b1,y:b3,platform:Linux, 030000004f04000015b3000010010000,Thrustmaster Dual Analog 4,a:b0,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b1,y:b3,platform:Linux, 030000004f04000020b3000010010000,Thrustmaster Dual Trigger,a:b0,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b1,y:b3,platform:Linux, 030000004f04000023b3000000010000,Thrustmaster Dual Trigger PlayStation Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux, 030000004f0400000ed0000011010000,Thrustmaster eSwap Pro Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux, 03000000b50700000399000000010000,Thrustmaster Firestorm Digital 2,a:b2,b:b4,back:b11,leftshoulder:b6,leftstick:b10,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b8,rightstick:b0,righttrigger:b9,start:b1,x:b3,y:b5,platform:Linux, 030000004f04000003b3000010010000,Thrustmaster Firestorm Dual Analog 2,a:b0,b:b2,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b9,rightx:a2,righty:a3,x:b1,y:b3,platform:Linux, 030000004f04000000b3000010010000,Thrustmaster Firestorm Dual Power,a:b0,b:b2,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b11,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b12,righttrigger:b7,rightx:a2,righty:a3,start:b10,x:b1,y:b3,platform:Linux, 030000004f04000004b3000010010000,Thrustmaster Firestorm Dual Power,a:b0,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b1,y:b3,platform:Linux, 030000004f04000026b3000002040000,Thrustmaster GP XID,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 03000000c6240000025b000002020000,Thrustmaster GPX,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 030000004f04000008d0000000010000,Thrustmaster Run N Drive PlayStation Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux, 030000004f04000009d0000000010000,Thrustmaster Run N Drive PlayStation Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux, 030000004f04000007d0000000010000,Thrustmaster T Mini,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux, 030000004f04000012b3000010010000,Thrustmaster Vibrating Gamepad,a:b0,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b1,y:b3,platform:Linux, 03000000571d00002000000010010000,Tomee SNES Adapter,a:b0,b:b1,back:b6,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,rightshoulder:b5,start:b7,x:b2,y:b3,platform:Linux, 03000000bd12000015d0000010010000,Tomee SNES Controller,a:b2,b:b1,back:b8,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,rightshoulder:b5,start:b9,x:b3,y:b0,platform:Linux, 03000000d814000007cd000011010000,Toodles 2008 Chimp PC PS3,a:b0,b:b1,back:b8,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,start:b9,x:b3,y:b2,platform:Linux, 030000005e0400008e02000070050000,Torid,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 03000000c01100000591000011010000,Torid,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux, 03000000680a00000300000003000000,TRBot Virtual Joypad,a:b11,b:b12,back:b15,dpdown:b6,dpleft:b3,dpright:b4,dpup:b5,leftshoulder:b17,leftstick:b21,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b18,rightstick:b22,righttrigger:a2,rightx:a3,righty:a4,start:b16,x:b13,y:b14,platform:Linux, 03000000780300000300000003000000,TRBot Virtual Joypad,a:b11,b:b12,back:b15,dpdown:b6,dpleft:b3,dpright:b4,dpup:b5,leftshoulder:b17,leftstick:b21,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b18,rightstick:b22,righttrigger:a2,rightx:a3,righty:a4,start:b16,x:b13,y:b14,platform:Linux, 03000000e00d00000300000003000000,TRBot Virtual Joypad,a:b11,b:b12,back:b15,dpdown:b6,dpleft:b3,dpright:b4,dpup:b5,leftshoulder:b17,leftstick:b21,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b18,rightstick:b22,righttrigger:a2,rightx:a3,righty:a4,start:b16,x:b13,y:b14,platform:Linux, 03000000f00600000300000003000000,TRBot Virtual Joypad,a:b11,b:b12,back:b15,dpdown:b6,dpleft:b3,dpright:b4,dpup:b5,leftshoulder:b17,leftstick:b21,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b18,rightstick:b22,righttrigger:a2,rightx:a3,righty:a4,start:b16,x:b13,y:b14,platform:Linux, 030000005f140000c501000010010000,Trust Gamepad,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Linux, 06000000f51000000870000003010000,Turtle Beach Recon,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 03000000100800000100000010010000,Twin PS2 Adapter,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a3,righty:a2,start:b9,x:b3,y:b0,platform:Linux, 03000000151900005678000010010000,Uniplay U6,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux, 03000000100800000300000010010000,USB Gamepad,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a3,righty:a2,start:b9,x:b3,y:b0,platform:Linux, 03000000790000000600000007010000,USB gamepad,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a3,righty:a4,start:b9,x:b3,y:b0,platform:Linux, 03000000790000001100000000010000,USB Gamepad,a:b2,b:b1,back:b8,dpdown:a0,dpleft:a1,dpright:a2,dpup:a4,start:b9,platform:Linux, 030000006f0e00000302000011010000,Victrix Pro Fightstick PS4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Linux, 030000006f0e00000702000011010000,Victrix Pro Fightstick PS4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Linux, 05000000ac0500003232000001000000,VR Box Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a3,righty:a2,start:b9,x:b2,y:b3,platform:Linux, 05000000434f4d4d414e440000000000,VX Gaming Command Series,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Linux, 0000000058626f782033363020576900,Xbox 360 Controller,a:b0,b:b1,back:b14,dpdown:b11,dpleft:b12,dpright:b13,dpup:b10,guide:b7,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b6,x:b2,y:b3,platform:Linux, 030000005e0400001907000000010000,Xbox 360 Controller,a:b0,b:b1,back:b6,dpdown:b14,dpleft:b11,dpright:b12,dpup:b13,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 030000005e0400008e02000010010000,Xbox 360 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 030000005e0400008e02000014010000,Xbox 360 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 030000005e0400009102000007010000,Xbox 360 Controller,a:b0,b:b1,back:b6,dpdown:b14,dpleft:b11,dpright:b12,dpup:b13,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 030000005e040000a102000000010000,Xbox 360 Controller,a:b0,b:b1,back:b6,dpdown:b14,dpleft:b11,dpright:b12,dpup:b13,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 030000005e040000a102000007010000,Xbox 360 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 030000005e040000a102000030060000,Xbox 360 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 030000005e0400008e02000000010000,Xbox 360 EasySMX,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 030000005e040000a102000014010000,Xbox 360 Receiver,a:b0,b:b1,back:b6,dpdown:b14,dpleft:b11,dpright:b12,dpup:b13,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 030000005e0400000202000000010000,Xbox Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b5,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b2,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b3,y:b4,platform:Linux, 030000006f0e00001304000000010000,Xbox Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 03000000ffff0000ffff000000010000,Xbox Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b5,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b2,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b3,y:b4,platform:Linux, 0000000058626f782047616d65706100,Xbox Gamepad,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a4,rightx:a2,righty:a3,start:b7,x:b2,y:b3,platform:Linux, 030000005e0400000a0b000005040000,Xbox One Controller,a:b1,b:b0,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b11,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b2,platform:Linux, 030000005e040000d102000002010000,Xbox One Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 030000005e040000ea02000000000000,Xbox One Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 030000005e040000ea02000001030000,Xbox One Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 050000005e040000e002000003090000,Xbox One Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 050000005e040000fd02000003090000,Xbox One Controller,a:b0,b:b1,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b16,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux, 050000005e040000fd02000030110000,Xbox One Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 050000005e040000e302000002090000,Xbox One Elite,a:b0,b:b1,back:b136,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:a6,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a5,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux, 050000005e040000220b000013050000,Xbox One Elite 2 Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux, 050000005e040000050b000002090000,Xbox One Elite Series 2,a:b0,b:b1,back:b136,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:a6,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a5,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux, 030000005e040000ea02000011050000,Xbox One S Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 060000005e040000ea0200000b050000,Xbox One S Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 060000005e040000ea0200000d050000,Xbox One S Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 030000005e040000120b000001050000,Xbox Series Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 030000005e040000120b000005050000,Xbox Series Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 030000005e040000120b000007050000,Xbox Series Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,misc1:b11,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 030000005e040000120b000009050000,Xbox Series Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 030000005e040000120b00000d050000,Xbox Series Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,misc1:b11,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 030000005e040000120b00000f050000,Xbox Series Controller,a:b0,b:b1,back:b6,dpdown:b13,dpleft:b14,dpright:b15,dpup:b12,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 030000005e040000130b000005050000,Xbox Series Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux, 050000005e040000130b000001050000,Xbox Series Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux, 050000005e040000130b000005050000,Xbox Series Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux, 050000005e040000130b000007050000,Xbox Series Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,misc1:b15,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux, 050000005e040000130b000009050000,Xbox Series Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,misc1:b15,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux, 050000005e040000130b000011050000,Xbox Series Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,misc1:b15,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux, 050000005e040000130b000013050000,Xbox Series Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,misc1:b15,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux, 050000005e040000130b000015050000,Xbox Series Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,misc1:b15,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux, 060000005e040000120b000007050000,Xbox Series Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 060000005e040000120b00000b050000,Xbox Series Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 060000005e040000120b00000f050000,Xbox Series Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,misc1:b11,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 060000005e040000120b00000d050000,Xbox Series X Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,misc1:b11,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 050000005e040000200b000013050000,Xbox Wireless Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux, 03000000450c00002043000010010000,XEOX SL6556 BK,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Linux, 05000000172700004431000029010000,XiaoMi Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b20,leftshoulder:b6,leftstick:b13,lefttrigger:a7,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a6,rightx:a2,righty:a5,start:b11,x:b3,y:b4,platform:Linux, 03000000c0160000e105000001010000,XinMo Dual Arcade,a:b4,b:b3,back:b6,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b9,leftshoulder:b2,leftx:a0,lefty:a1,rightshoulder:b5,start:b7,x:b1,y:b0,platform:Linux, xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 03000000120c0000100e000011010000,Zeroplus P4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux, 03000000120c0000101e000011010000,Zeroplus P4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux, 38653964633230666463343334313533,8BitDo Adapter,a:b0,b:b1,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:b17,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:b18,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 36666264316630653965636634386234,8BitDo Adapter 2,a:b0,b:b1,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b19,leftshoulder:b9,leftstick:b7,lefttrigger:b17,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:b18,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 38426974446f20417263616465205374,8BitDo Arcade Stick,a:b0,b:b1,back:b15,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,guide:b5,leftshoulder:b9,lefttrigger:a4,rightshoulder:b10,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 61393962646434393836356631636132,8BitDo Arcade Stick,a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b20,righttrigger:a5,rightx:a3,righty:a4,start:b10,x:b19,y:b2,platform:Android, 64323139346131306233636562663738,8BitDo Arcade Stick,a:b0,b:b1,back:b17,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b3,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b20,righttrigger:b10,rightx:a2,righty:a3,start:b18,x:b19,y:b2,platform:Android, 64643565386136613265663236636564,8BitDo Arcade Stick,a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b20,righttrigger:a5,rightx:a3,righty:a4,start:b10,x:b19,y:b2,platform:Android, 33313433353539306634656436353432,8BitDo Dogbone,a:b1,b:b0,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftx:a0,lefty:a1,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 38426974446f20446f67626f6e65204d,8BitDo Dogbone,a:b1,b:b0,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftx:a0,lefty:a1,rightx:a2,righty:a3,start:b6,platform:Android, 34343439373236623466343934376233,8BitDo FC30 Pro,a:b0,b:b1,back:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,leftstick:b28,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b4,rightstick:b29,righttrigger:b7,start:b5,x:b30,y:b2,platform:Android, 38426974446f2038426974446f204c69,8BitDo Lite,a:b1,b:b0,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:b17,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:b18,rightx:a2,righty:a3,start:b6,x:b3,y:b2,platform:Android, 30643332373663313263316637356631,8BitDo Lite 2,a:b1,b:b0,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:b17,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:b18,rightx:a2,righty:a3,start:b6,x:b3,y:b2,platform:Android, 38426974446f204c6974652032000000,8BitDo Lite 2,a:b1,b:b0,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:b17,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:b18,rightx:a2,righty:a3,start:b6,x:b3,y:b2,platform:Android, 62656331626461363634633735353032,8BitDo Lite 2,a:b1,b:b0,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:b17,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:b18,rightx:a2,righty:a3,start:b6,x:b3,y:b2,platform:Android, 38393936616436383062666232653338,8BitDo Lite SE,a:b1,b:b0,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:b17,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:b18,rightx:a2,righty:a3,start:b6,x:b3,y:b2,platform:Android, 38426974446f204c6974652053450000,8BitDo Lite SE,a:b1,b:b0,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:b17,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:b18,rightx:a2,righty:a3,start:b6,x:b3,y:b2,platform:Android, 39356430616562366466646636643435,8BitDo Lite SE,a:b1,b:b0,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:b17,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:b18,rightx:a2,righty:a3,start:b6,x:b3,y:b2,platform:Android, 05000000c82d000006500000ffff3f00,8BitDo M30,a:b1,b:b0,back:b4,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,guide:b17,leftshoulder:b9,lefttrigger:a5,rightshoulder:b10,righttrigger:a4,start:b6,x:b3,y:b2,platform:Android, 05000000c82d000051060000ffff3f00,8BitDo M30,a:b1,b:b0,back:b4,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,guide:b17,leftshoulder:b9,lefttrigger:a4,rightshoulder:b10,righttrigger:a5,start:b6,x:b3,y:b2,platform:Android, 32323161363037623637326438643634,8BitDo M30,a:b0,b:b1,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftx:a0,lefty:a1,rightshoulder:b9,righttrigger:b10,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 33656266353630643966653238646264,8BitDo M30,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b20,righttrigger:a5,start:b10,x:b19,y:b2,platform:Android, 38426974446f204d3330204d6f646b69,8BitDo M30,a:b0,b:b1,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftx:a0,lefty:a1,rightshoulder:b9,righttrigger:b10,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 39366630663062373237616566353437,8BitDo M30,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,lefttrigger:b17,leftx:a0,lefty:a1,rightshoulder:b10,righttrigger:b18,start:b6,x:b2,y:b3,platform:Android, 64653533313537373934323436343563,8BitDo M30,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:a4,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b9,righttrigger:b10,start:b6,x:b2,y:b3,platform:Android, 66356438346136366337386437653934,8BitDo M30,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b20,righttrigger:b10,start:b18,x:b19,y:b2,platform:Android, 66393064393162303732356665666366,8BitDo M30,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,righttrigger:a5,start:b6,x:b2,y:b3,platform:Android, 38426974446f204d6963726f2067616d,8BitDo Micro,a:b1,b:b0,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b9,lefttrigger:a4,leftx:b0,lefty:b1,rightshoulder:b10,righttrigger:a5,rightx:b2,righty:b3,start:b6,x:b3,y:b2,platform:Android, 61653365323561356263373333643266,8BitDo Micro,a:b1,b:b0,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b9,lefttrigger:a4,leftx:b0,lefty:b1,rightshoulder:b10,righttrigger:a5,rightx:b2,righty:b3,start:b6,x:b3,y:b2,platform:Android, 62613137616239666338343866326336,8BitDo Micro,a:b1,b:b0,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b9,lefttrigger:a4,leftx:b0,lefty:b1,rightshoulder:b10,righttrigger:a5,rightx:b2,righty:b3,start:b6,x:b3,y:b2,platform:Android, 33663431326134333366393233616633,8BitDo N30,a:b1,b:b0,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftx:a0,lefty:a1,rightx:a2,righty:a3,start:b6,platform:Android, 38426974446f204e3330204d6f646b69,8BitDo N30,a:b1,b:b0,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftx:a0,lefty:a1,rightx:a2,righty:a3,start:b6,platform:Android, 05000000c82d000015900000ffff3f00,8BitDo N30 Pro 2,a:b1,b:b0,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,leftstick:b7,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a4,rightx:a2,righty:a3,start:b6,x:b3,y:b2,platform:Android, 05000000c82d000065280000ffff3f00,8BitDo N30 Pro 2,a:b1,b:b0,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b17,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b3,y:b2,platform:Android, 38323035343766666239373834336637,8BitDo N64,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b9,lefttrigger:b17,leftx:a0,lefty:a1,rightshoulder:b10,righttrigger:b18,rightx:a2,righty:a3,start:b6,platform:Android, 38426974446f204e3634204d6f646b69,8BitDo N64,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b9,lefttrigger:b17,leftx:a0,lefty:a1,rightshoulder:b10,righttrigger:b18,rightx:a2,righty:a3,start:b6,platform:Android, 32363135613966656338666638666237,8BitDo NEOGEO,a:b0,b:b1,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftx:a0,lefty:a1,rightshoulder:b10,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 35363534633333373639386466346631,8BitDo NEOGEO,a:b0,b:b1,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftx:a0,lefty:a1,rightshoulder:b10,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 38426974446f204e454f47454f204750,8BitDo NEOGEO,a:b0,b:b1,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftx:a0,lefty:a1,rightshoulder:b10,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 39383963623932353561633733306334,8BitDo NEOGEO,a:b0,b:b1,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftx:a0,lefty:a1,rightshoulder:b10,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 050000000220000000900000ffff3f00,8BitDo NES30 Pro,a:b1,b:b0,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b3,y:b2,platform:Android, 050000002038000009000000ffff3f00,8BitDo NES30 Pro,a:b1,b:b0,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b3,y:b2,platform:Android, 38313433643131656262306631373166,8BitDo P30,a:b0,b:b1,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,lefttrigger:b17,leftx:a0,lefty:a1,rightshoulder:b10,righttrigger:b18,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 38326536643339353865323063616339,8BitDo P30,a:b0,b:b1,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,lefttrigger:b17,leftx:a0,lefty:a1,rightshoulder:b10,righttrigger:b18,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 38426974446f2050333020636c617373,8BitDo P30,a:b0,b:b1,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,lefttrigger:b17,leftx:a0,lefty:a1,rightshoulder:b10,righttrigger:b18,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 35376664343164386333616535333434,8BitDo Pro 2,a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,leftstick:b17,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b20,rightstick:b18,righttrigger:a5,rightx:a3,start:b10,x:b19,y:b2,platform:Android, 38426974446f2038426974446f205072,8BitDo Pro 2,a:b1,b:b0,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:b17,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:b18,rightx:a2,righty:a3,start:b6,x:b3,y:b2,platform:Android, 38426974446f2050726f203200000000,8BitDo Pro 2,a:b1,b:b0,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:b17,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:b18,rightx:a2,righty:a3,start:b6,x:b3,y:b2,platform:Android, 62373739366537363166326238653463,8BitDo Pro 2,a:b1,b:b0,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,x:b3,y:b2,platform:Android, 38386464613034326435626130396565,8BitDo Receiver,a:b1,b:b0,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b19,leftshoulder:b9,leftstick:b7,lefttrigger:b17,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:b18,rightx:a2,righty:a3,start:b6,x:b3,y:b2,platform:Android, 38426974446f2038426974446f205265,8BitDo Receiver,a:b1,b:b0,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b19,leftshoulder:b9,leftstick:b7,lefttrigger:b17,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:b18,rightx:a2,righty:a3,start:b6,x:b3,y:b2,platform:Android, 66303230343038613365623964393766,8BitDo Receiver,a:b1,b:b0,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b19,leftshoulder:b9,leftstick:b7,lefttrigger:b17,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:b18,rightx:a2,righty:a3,start:b6,x:b3,y:b2,platform:Android, 38426974446f20533330204d6f646b69,8BitDo S30,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:a4,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b9,righttrigger:b10,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 66316462353561376330346462316137,8BitDo S30,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:a4,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b9,righttrigger:b10,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 05000000c82d000000600000ffff3f00,8BitDo SF30 Pro,a:b1,b:b0,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,leftstick:b7,lefttrigger:b15,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:b16,rightx:a2,righty:a3,start:b6,x:b3,y:b2,platform:Android, 05000000c82d000000610000ffff3f00,8BitDo SF30 Pro,a:b1,b:b0,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b3,y:b2,platform:Android, 38426974646f20534633302050726f00,8BitDo SF30 Pro,a:b1,b:b0,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,leftstick:b15,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b18,rightstick:b16,righttrigger:a5,rightx:a3,righty:a4,start:b10,x:b2,y:b17,platform:Android, 61623334636338643233383735326439,8BitDo SFC30,a:b0,b:b1,back:b4,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b3,rightshoulder:b31,start:b5,x:b30,y:b2,platform:Android, 05000000c82d000012900000ffff3f00,8BitDo SN30,a:b1,b:b0,back:b4,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b9,rightshoulder:b10,start:b6,x:b3,y:b2,platform:Android, 05000000c82d000062280000ffff3f00,8BitDo SN30,a:b1,b:b0,back:b4,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b9,rightshoulder:b10,start:b6,x:b3,y:b2,platform:Android, 38316230613931613964356666353839,8BitDo SN30,a:b1,b:b0,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftx:a0,lefty:a1,rightshoulder:b10,rightx:a2,righty:a3,start:b6,x:b3,y:b2,platform:Android, 38426974446f20534e3330204d6f646b,8BitDo SN30,a:b1,b:b0,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftx:a0,lefty:a1,rightshoulder:b10,rightx:a2,righty:a3,start:b6,x:b3,y:b2,platform:Android, 65323563303231646531383162646335,8BitDo SN30,a:b1,b:b0,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftx:a0,lefty:a1,rightshoulder:b10,rightx:a2,righty:a3,start:b6,x:b3,y:b2,platform:Android, 35383531346263653330306238353131,8BitDo SN30 PP,a:b0,b:b1,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 05000000c82d000001600000ffff3f00,8BitDo SN30 Pro,a:b1,b:b0,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,leftstick:b7,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a4,rightx:a2,righty:a3,start:b6,x:b3,y:b2,platform:Android, 05000000c82d000002600000ffff0f00,8BitDo SN30 Pro Plus,a:b1,b:b0,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b17,leftshoulder:b9,leftstick:b7,lefttrigger:b15,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:b16,rightx:a2,righty:a3,start:b6,x:b3,y:b2,platform:Android, 36653638656632326235346264663661,8BitDo SN30 Pro Plus,a:b0,b:b1,back:b17,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,leftstick:b15,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b20,rightstick:b6,righttrigger:b10,rightx:a2,righty:a3,start:b18,x:b19,y:b2,platform:Android, 38303232393133383836366330346462,8BitDo SN30 Pro Plus,a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,leftstick:b17,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b20,rightstick:b18,righttrigger:a5,rightx:a3,righty:a4,start:b10,x:b19,y:b2,platform:Android, 38346630346135363335366265656666,8BitDo SN30 Pro Plus,a:b1,b:b0,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:b17,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:b18,rightx:a2,righty:a3,start:b6,x:b3,y:b2,platform:Android, 38426974446f20534e33302050726f2b,8BitDo SN30 Pro Plus,a:b1,b:b0,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b19,leftshoulder:b9,leftstick:b7,lefttrigger:b17,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:b18,rightx:a2,righty:a3,start:b6,x:b3,y:b2,platform:Android, 536f6e7920436f6d707574657220456e,8BitDo SN30 Pro Plus,a:b0,b:b1,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 66306331643531333230306437353936,8BitDo SN30 Pro Plus,a:b1,b:b0,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:b17,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:b18,rightx:a2,righty:a3,start:b6,x:b3,y:b2,platform:Android, 050000002028000009000000ffff3f00,8BitDo SNES30,a:b1,b:b0,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b3,y:b2,platform:Android, 050000003512000020ab000000780f00,8BitDo SNES30,a:b21,b:b20,back:b30,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b26,rightshoulder:b27,start:b31,x:b24,y:b23,platform:Android, 33666663316164653937326237613331,8BitDo Zero,a:b0,b:b1,back:b15,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b9,rightshoulder:b10,start:b6,x:b2,y:b3,platform:Android, 38426974646f205a65726f2047616d65,8BitDo Zero,a:b0,b:b1,back:b15,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b9,rightshoulder:b10,start:b6,x:b2,y:b3,platform:Android, 05000000c82d000018900000ffff0f00,8BitDo Zero 2,a:b1,b:b0,back:b4,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b9,rightshoulder:b10,start:b6,x:b3,y:b2,platform:Android, 05000000c82d000030320000ffff0f00,8BitDo Zero 2,a:b1,b:b0,back:b4,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b9,rightshoulder:b10,start:b6,x:b3,y:b2,platform:Android, 33663434393362303033616630346337,8BitDo Zero 2,a:b0,b:b1,back:b17,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,leftx:a0,lefty:a1,rightshoulder:b20,start:b18,x:b19,y:b2,platform:Android, 34656330626361666438323266633963,8BitDo Zero 2,a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftx:a0,lefty:a1,rightshoulder:b20,start:b10,x:b19,y:b2,platform:Android, 63396666386564393334393236386630,8BitDo Zero 2,a:b1,b:b0,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftx:a0,lefty:a1,rightshoulder:b10,start:b6,x:b3,y:b2,platform:Android, 63633435623263373466343461646430,8BitDo Zero 2,a:b1,b:b0,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftx:a0,lefty:a1,rightshoulder:b10,start:b6,x:b2,y:b3,platform:Android, 32333634613735616163326165323731,Amazon Luna Controller,a:b0,b:b1,back:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,x:b2,y:b3,platform:Android, 417374726f2063697479206d696e6920,Astro City Mini,a:b23,b:b22,back:b29,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,rightshoulder:b25,righttrigger:b26,start:b30,x:b24,y:b21,platform:Android, 35643263313264386134376362363435,Atari VCS Classic Controller,a:b0,b:b1,back:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,start:b6,platform:Android, 32353831643566306563643065356239,Atari VCS Modern Controller,a:b0,b:b1,back:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 32303165626138343962363666346165,Brook Mars PS4 Controller,a:b1,b:b19,back:b17,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,leftstick:b15,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b20,rightstick:b6,righttrigger:b10,rightx:a2,righty:a3,start:b18,x:b0,y:b2,platform:Android, 38383337343564366131323064613561,Brook Mars PS4 Controller,a:b1,b:b19,back:b17,leftshoulder:b3,leftstick:b15,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b20,rightstick:b6,righttrigger:b10,rightx:a2,righty:a3,start:b18,x:b0,y:b2,platform:Android, 34313430343161653665353737323365,Elecom JC-W01U,a:b23,b:b24,back:b29,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b25,lefttrigger:b27,leftx:a0,lefty:a1,rightshoulder:b26,righttrigger:b28,rightx:a2,righty:a3,start:b30,x:b21,y:b22,platform:Android, 4875694a6961204a432d573031550000,Elecom JC-W01U,a:b23,b:b24,back:b29,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b25,lefttrigger:b27,leftx:a0,lefty:a1,rightshoulder:b26,righttrigger:b28,rightx:a2,righty:a3,start:b30,x:b21,y:b22,platform:Android, 30363230653635633863366338623265,Evo VR,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftx:a0,lefty:a1,x:b2,y:b3,platform:Android, 05000000b404000011240000dfff3f00,Flydigi Vader 2,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,paddle1:b17,paddle2:b18,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 05000000bc20000000550000ffff3f00,GameSir G3w,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,leftstick:b7,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a4,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 34323662653333636330306631326233,Google Nexus,a:b0,b:b1,back:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 35383633353935396534393230616564,Google Stadia Controller,a:b0,b:b1,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 05000000d6020000e5890000dfff3f00,GPD XD Plus,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,leftstick:b7,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a4,rightx:a2,righty:a5,start:b6,x:b2,y:b3,platform:Android, 05000000d6020000e5890000dfff3f80,GPD XD Plus,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,leftstick:b7,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a3,rightx:a4,righty:a5,start:b6,x:b2,y:b3,platform:Android, 66633030656131663837396562323935,Hori Battle,a:b0,b:b1,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a3,righty:a4,start:b6,x:b2,y:b3,platform:Android, 35623466343433653739346434636330,Hori Fighting Commander 3 Pro,a:b1,b:b19,back:b17,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b20,righttrigger:b10,rightx:a2,righty:a3,start:b18,x:b0,y:b2,platform:Android, 484f524920434f2e2c4c54442e203130,Hori Fighting Commander 3 Pro,a:b1,b:b19,back:b17,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b20,lefttrigger:b10,leftx:a0,lefty:a1,rightshoulder:b3,righttrigger:b9,rightx:a2,righty:a3,start:b18,x:b0,y:b2,platform:Android, 484f524920434f2e2c4c544420205041,Hori Gem Pad 3,a:b1,b:b17,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,leftstick:b4,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b18,rightstick:b6,righttrigger:b10,rightx:a2,righty:a3,start:b16,x:b0,y:b2,platform:Android, 65656436646661313232656661616130,Hori PC Engine Mini Controller,a:b1,b:b19,back:b17,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,start:b18,platform:Android, 31303433326562636431653534636633,Hori Real Arcade Pro 3,a:b1,b:b19,back:b17,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b20,righttrigger:b10,rightx:a2,righty:a3,start:b18,x:b0,y:b2,platform:Android, 32656664353964393561366362333636,Hori Switch Split Pad Pro,a:b0,b:b1,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a3,righty:a4,start:b6,x:b2,y:b3,platform:Android, 30306539356238653637313730656134,HORIPAD Switch Pro Controller,a:b0,b:b1,back:b17,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b3,leftstick:b15,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b20,rightstick:b6,righttrigger:b10,rightx:a2,righty:a3,start:b18,x:b19,y:b2,platform:Android, 48797065726b696e2050616400000000,Hyperkin Admiral N64 Controller,+rightx:b6,+righty:b7,-rightx:b17,-righty:b5,a:b1,b:b0,leftshoulder:b3,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b20,start:b18,platform:Android, 62333331353131353034386136626636,Hyperkin Admiral N64 Controller,+rightx:b6,+righty:b7,-rightx:b17,-righty:b5,a:b1,b:b0,leftshoulder:b3,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b20,start:b18,platform:Android, 31306635363562663834633739396333,Hyperkin N64 Adapter,a:b1,b:b19,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b20,rightx:a2,righty:a3,start:b18,platform:Android, 5368616e57616e202020202048797065,Hyperkin N64 Adapter,a:b1,b:b19,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b20,rightx:a2,righty:a3,start:b18,platform:Android, 0500000083050000602000000ffe0000,iBuffalo SNES Controller,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b15,rightshoulder:b16,start:b10,x:b2,y:b3,platform:Android, 5553422c322d6178697320382d627574,iBuffalo Super Famicom Controller,a:b1,b:b0,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b17,rightshoulder:b18,start:b10,x:b3,y:b2,platform:Android, 64306137363261396266353433303531,InterAct GoPad,a:b24,b:b25,leftshoulder:b23,lefttrigger:b27,leftx:a0,lefty:a1,rightshoulder:b26,righttrigger:b28,x:b21,y:b22,platform:Android, 532e542e442e20496e74657261637420,InterAct HammerHead FX,a:b23,b:b24,back:b30,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b26,leftstick:b22,lefttrigger:b28,leftx:a0,lefty:a1,rightshoulder:b27,rightstick:b25,righttrigger:b29,rightx:a2,righty:a3,start:b31,x:b20,y:b21,platform:Android, 65346535636333663931613264643164,Joy-Con,a:b21,b:b22,back:b29,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b25,lefttrigger:b27,leftx:a0,lefty:a1,rightshoulder:b26,righttrigger:b28,rightx:a2,righty:a3,start:b30,x:b23,y:b24,platform:Android, 33346566643039343630376565326335,Joy-Con (L),a:b0,b:b1,back:b7,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,leftstick:b15,rightshoulder:b20,start:b17,x:b19,y:b2,platform:Android, 35313531613435623366313835326238,Joy-Con (L),a:b0,b:b1,back:b7,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,leftstick:b15,rightshoulder:b20,start:b17,x:b19,y:b2,platform:Android, 4a6f792d436f6e20284c290000000000,Joy-Con (L),a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,rightshoulder:b20,start:b17,x:b19,y:b2,platform:Android, 38383665633039363066383334653465,Joy-Con (R),a:b0,b:b1,back:b5,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,leftstick:b15,rightshoulder:b20,start:b18,x:b19,y:b2,platform:Android, 39363561613936303237333537383931,Joy-Con (R),a:b0,b:b1,back:b5,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,leftstick:b15,rightshoulder:b20,start:b18,x:b19,y:b2,platform:Android, 4a6f792d436f6e202852290000000000,Joy-Con (R),a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,rightshoulder:b20,start:b18,x:b19,y:b2,platform:Android, 39656136363638323036303865326464,JYS Aapter,a:b1,b:b19,back:b17,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,leftstick:b15,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b20,rightstick:b6,righttrigger:b10,rightx:a2,righty:a3,start:b18,x:b0,y:b2,platform:Android, 63316564383539663166353034616434,JYS Adapter,a:b1,b:b3,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:b17,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:b18,rightx:a2,righty:a3,start:b6,x:b0,y:b2,platform:Android, 64623163333561643339623235373232,Logitech F310,a:b0,b:b1,back:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 35623364393661626231343866613337,Logitech F710,a:b0,b:b1,back:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:b17,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:b18,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 4c6f6769746563682047616d65706164,Logitech F710,a:b0,b:b1,back:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 64396331333230326333313330336533,Logitech F710,a:b0,b:b1,back:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 39653365373864633935383236363438,Logitech G Cloud,a:b0,b:b1,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 416d617a6f6e2047616d6520436f6e74,Luna Controller,a:b0,b:b1,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a3,righty:a4,start:b6,x:b2,y:b3,platform:Android, 4c756e612047616d6570616400000000,Luna Controller,a:b0,b:b1,back:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 30363066623539323534363639323363,Magic NS,a:b1,b:b19,back:b17,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,leftstick:b15,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b20,rightstick:b6,righttrigger:b10,rightx:a2,righty:a3,start:b18,x:b0,y:b2,platform:Android, 31353762393935386662336365626334,Magic NS,a:b1,b:b19,back:b17,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,leftstick:b15,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b20,rightstick:b6,righttrigger:b10,rightx:a2,righty:a3,start:b18,x:b0,y:b2,platform:Android, 39623565346366623931666633323530,Magic NS,a:b1,b:b3,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:b17,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:b18,rightx:a2,righty:a3,start:b6,x:b0,y:b2,platform:Android, 6d6179666c617368206c696d69746564,Mayflash GameCube Adapter,a:b22,b:b21,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,lefttrigger:b25,leftx:a0,lefty:a1,rightshoulder:b28,righttrigger:b26,rightx:a5,righty:a2,start:b30,x:b23,y:b24,platform:Android, 436f6e74726f6c6c6572000000000000,Mayflash N64 Adapter,a:b1,b:b19,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b3,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b20,rightx:a2,righty:a3,start:b18,platform:Android, 65666330633838383061313633326461,Mayflash N64 Adapter,a:b1,b:b19,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b3,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b20,rightx:a2,righty:a3,start:b18,platform:Android, 37316565396364386635383230353365,Mayflash Saturn Adapter,a:b21,b:b22,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b26,lefttrigger:b28,rightshoulder:b27,righttrigger:b23,start:b30,x:b24,y:b25,platform:Android, 4875694a696120205553422047616d65,Mayflash Saturn Adapter,a:b21,b:b22,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b26,lefttrigger:b28,rightshoulder:b27,righttrigger:b23,start:b30,x:b24,y:b25,platform:Android, 535a4d792d706f776572204c54442043,Mayflash Wii Classic Adapter,a:b23,b:b22,back:b29,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b31,leftshoulder:b27,lefttrigger:b25,leftx:a0,lefty:a1,rightshoulder:b28,righttrigger:b26,rightx:a2,righty:a3,start:b30,x:b24,y:b21,platform:Android, 30653962643666303631376438373532,Mayflash Wii DolphinBar,a:b23,b:b24,back:b29,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b0,leftshoulder:b25,lefttrigger:b27,leftx:a0,lefty:a1,rightshoulder:b26,righttrigger:b28,rightx:a2,righty:a3,start:b30,x:b21,y:b22,platform:Android, 39346131396233376535393665363161,Mayflash Wii U Pro Adapter,a:b22,b:b23,back:b29,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b25,leftstick:b31,lefttrigger:b27,rightshoulder:b26,rightstick:b0,righttrigger:b28,rightx:a0,righty:a1,start:b30,x:b21,y:b24,platform:Android, 31323564663862633234646330373138,Mega Drive,a:b23,b:b22,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,rightshoulder:b25,righttrigger:b26,start:b30,x:b24,y:b21,platform:Android, 37333564393261653735306132613061,Mega Drive,a:b21,b:b22,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b26,lefttrigger:b28,rightshoulder:b27,righttrigger:b23,start:b30,x:b24,y:b25,platform:Android, 64363363336633363736393038313464,Mega Drive,a:b1,b:b0,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,start:b9,x:b2,y:b3,platform:Android, 33323763323132376537376266393366,Microsoft Dual Strike,a:b24,b:b23,back:b25,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b27,lefttrigger:b29,rightshoulder:b78,rightx:a0,righty:a1~,start:b26,x:b22,y:b21,platform:Android, 30306461613834333439303734316539,Microsoft SideWinder Pro,a:b0,b:b1,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b20,lefttrigger:b9,rightshoulder:b19,righttrigger:b10,start:b17,x:b2,y:b3,platform:Android, 32386235353630393033393135613831,Microsoft Xbox Series Controller,a:b0,b:b1,back:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 4d4f42415041442050726f2d48440000,Mobapad Chitu HD,a:b0,b:b1,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 4d4f435554452d303533582d4d35312d,Mocute 053X,a:b0,b:b1,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 33343361376163623438613466616531,Mocute M053,a:b0,b:b1,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:b17,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:b18,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 39306635663061636563316166303966,Mocute M053,a:b0,b:b1,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:b17,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:b18,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 7573622067616d657061642020202020,NEXT SNES Controller,a:b2,b:b1,back:b8,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,rightshoulder:b5,righttrigger:b6,start:b9,x:b3,y:b0,platform:Android, 050000007e05000009200000ffff0f00,Nintendo Switch Pro Controller,a:b0,b:b1,back:b15,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b3,leftstick:b4,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b18,rightstick:b6,righttrigger:b10,rightx:a2,righty:a3,start:b16,x:b17,y:b2,platform:Android, 34323437396534643531326161633738,Nintendo Switch Pro Controller,a:b0,b:b1,back:b15,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b9,leftstick:b7,lefttrigger:b17,misc1:b5,rightshoulder:b10,rightstick:b8,righttrigger:b18,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 50726f20436f6e74726f6c6c65720000,Nintendo Switch Pro Controller,a:b0,b:b1,back:b17,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b2,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b10,rightx:a2,righty:a3,start:b18,y:b3,platform:Android, 36326533353166323965623661303933,NSO N64 Controller,+rightx:b17,+righty:b10,-rightx:b2,-righty:b19,a:b1,b:b0,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b3,lefttrigger:b9,leftx:a0,lefty:a1,misc1:b7,rightshoulder:b20,righttrigger:b15,start:b18,platform:Android, 4e363420436f6e74726f6c6c65720000,NSO N64 Controller,+rightx:b17,+righty:b10,-rightx:b2,-righty:b19,a:b1,b:b0,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b3,lefttrigger:b9,leftx:a0,lefty:a1,misc1:b7,rightshoulder:b20,righttrigger:b15,start:b18,platform:Android, 534e455320436f6e74726f6c6c657200,NSO SNES Controller,a:b0,b:b1,back:b17,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,rightshoulder:b20,start:b18,x:b19,y:b2,platform:Android, 64623863346133633561626136366634,NSO SNES Controller,a:b0,b:b1,back:b17,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,rightshoulder:b20,start:b18,x:b19,y:b2,platform:Android, 050000005509000003720000cf7f3f00,NVIDIA Controller,a:b0,b:b1,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 050000005509000010720000ffff3f00,NVIDIA Controller,a:b0,b:b1,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 050000005509000014720000df7f3f00,NVIDIA Controller,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,leftstick:b7,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a4,rightx:a2,righty:a5,start:b6,x:b2,y:b3,platform:Android, 050000005509000014720000df7f3f80,NVIDIA Controller,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,leftstick:b7,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a3,rightx:a4,righty:a5,start:b6,x:b2,y:b3,platform:Android, 37336435666338653565313731303834,NVIDIA Controller,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 4e564944494120436f72706f72617469,NVIDIA Controller,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 61363931656135336130663561616264,NVIDIA Controller,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 39383335313438623439373538343266,OUYA Controller,a:b0,b:b2,dpdown:b18,dpleft:b15,dpright:b16,dpup:b17,leftshoulder:b3,leftstick:b9,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b20,rightstick:b10,righttrigger:b7,rightx:a3,righty:a4,x:b1,y:b19,platform:Android, 4f5559412047616d6520436f6e74726f,OUYA Controller,a:b0,b:b2,dpdown:b18,dpleft:b15,dpright:b6,dpup:b17,leftshoulder:b3,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b20,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,x:b1,y:b19,platform:Android, 506572666f726d616e63652044657369,PDP PS3 Rock Candy Controller,a:b1,b:b17,back:h0.2,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,leftstick:b4,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b18,rightstick:b6,righttrigger:b10,rightx:a2,righty:a3,start:b16,x:b0,y:b2,platform:Android, 62653335326261303663356263626339,PlayStation Classic Controller,a:b19,b:b1,back:b17,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b9,lefttrigger:b3,rightshoulder:b10,righttrigger:b20,start:b18,x:b2,y:b0,platform:Android, 536f6e7920496e746572616374697665,PlayStation Controller,a:b0,b:b1,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,misc1:b8,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 576972656c65737320436f6e74726f6c,PlayStation Controller,a:b0,b:b1,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 61653962353232366130326530363061,Pokken,a:b1,b:b19,back:b17,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,lefttrigger:b9,rightshoulder:b20,righttrigger:b10,start:b18,x:b0,y:b2,platform:Android, 32666633663735353234363064386132,PS2,a:b23,b:b22,back:b29,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b27,lefttrigger:b25,leftx:a0,lefty:a1,rightshoulder:b28,righttrigger:b26,rightx:a3,righty:a2,start:b30,x:b24,y:b21,platform:Android, 050000004c05000068020000dfff3f00,PS3 Controller,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 536f6e7920504c415953544154494f4e,PS3 Controller,a:b0,b:b1,back:b15,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 61363034663839376638653463633865,PS3 Controller,a:b0,b:b1,back:b15,dpdown:a14,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,leftstick:b7,lefttrigger:b17,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:b18,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 66366539656564653432353139356536,PS3 Controller,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 66383132326164626636313737373037,PS3 Controller,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 050000004c050000c405000000783f00,PS4 Controller,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 050000004c050000c4050000fffe3f00,PS4 Controller,a:b1,b:b17,back:b15,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b3,leftstick:b4,lefttrigger:+a3,leftx:a0,lefty:a1,rightshoulder:b18,rightstick:b6,righttrigger:+a4,rightx:a2,righty:a5,start:b16,x:b0,y:b2,platform:Android, 050000004c050000c4050000fffe3f80,PS4 Controller,a:b1,b:b17,back:b15,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b3,leftstick:b4,lefttrigger:+a2,leftx:a0,lefty:a1,rightshoulder:b18,rightstick:b6,righttrigger:+a3,rightx:a4,righty:a5,start:b16,x:b0,y:b2,platform:Android, 050000004c050000c4050000ffff3f00,PS4 Controller,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 050000004c050000cc090000fffe3f00,PS4 Controller,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 050000004c050000cc090000ffff3f00,PS4 Controller,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 30303839663330346632363232623138,PS4 Controller,a:b1,b:b17,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,leftstick:b4,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b18,rightstick:b6,righttrigger:a4,rightx:a2,righty:a5,start:b16,x:b0,y:b2,platform:Android, 31326235383662333266633463653332,PS4 Controller,a:b1,b:b16,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,leftstick:b4,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b18,rightstick:b6,righttrigger:a4,rightx:a2,righty:a5,start:b17,x:b0,y:b2,platform:Android, 31373231336561636235613666323035,PS4 Controller,a:b0,b:b1,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 31663838336334393132303338353963,PS4 Controller,a:b0,b:b1,back:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 34613139376634626133336530386430,PS4 Controller,a:b0,b:b1,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 35643031303033326130316330353564,PS4 Controller,a:b1,b:b17,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b3,leftstick:b4,lefttrigger:+a3,leftx:a0,lefty:a1,rightshoulder:b18,rightstick:b6,righttrigger:+a4,rightx:a2,righty:a5,start:b16,x:b0,y:b2,platform:Android, 37626233336235343937333961353732,PS4 Controller,a:b0,b:b1,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 37626464343430636562316661643863,PS4 Controller,a:b0,b:b1,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 38393161636261653636653532386639,PS4 Controller,a:b0,b:b1,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 63313733393535663339656564343962,PS4 Controller,a:b0,b:b1,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 63393662363836383439353064663939,PS4 Controller,a:b0,b:b1,back:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 65366465656364636137653363376531,PS4 Controller,a:b1,b:b19,back:b17,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,leftstick:b15,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b20,rightstick:b6,righttrigger:b10,rightx:a2,righty:a3,start:b18,x:b0,y:b2,platform:Android, 66613532303965383534396638613230,PS4 Controller,a:b1,b:b19,back:b17,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,leftstick:b15,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b20,rightstick:b6,righttrigger:b10,rightx:a2,righty:a5,start:b18,x:b0,y:b2,platform:Android, 050000004c050000e60c0000fffe3f00,PS5 Controller,a:b1,b:b17,back:b15,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b3,leftstick:b4,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b18,rightstick:b6,righttrigger:a4,rightx:a2,righty:a5,start:b16,x:b0,y:b2,platform:Android, 050000004c050000e60c0000fffe3f80,PS5 Controller,a:b1,b:b17,back:b15,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b3,leftstick:b4,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b18,rightstick:b6,righttrigger:a3,rightx:a4,righty:a5,start:b16,x:b0,y:b2,platform:Android, 050000004c050000e60c0000ffff3f00,PS5 Controller,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 32346465346533616263386539323932,PS5 Controller,a:b0,b:b1,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 32633532643734376632656664383733,PS5 Controller,a:b1,b:b19,back:b17,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,leftstick:b15,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b20,rightstick:b6,righttrigger:b10,rightx:a2,righty:a5,start:b18,x:b0,y:b2,platform:Android, 37363764353731323963323639666565,PS5 Controller,a:b1,b:b19,back:b17,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,leftstick:b15,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b20,rightstick:b6,righttrigger:b10,rightx:a2,righty:a5,start:b18,x:b0,y:b2,platform:Android, 61303162353165316365336436343139,PS5 Controller,a:b1,b:b19,back:b17,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,leftstick:b15,lefttrigger:b9,leftx:a0,lefty:a1,misc1:b8,rightshoulder:b20,rightstick:b6,righttrigger:b10,rightx:a2,righty:a5,start:b18,x:b0,y:b2,platform:Android, 64336263393933626535303339616332,Qanba 4RAF,a:b0,b:b1,back:b17,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b20,lefttrigger:b10,leftx:a0,lefty:a1,rightshoulder:b3,righttrigger:b9,rightx:a2,righty:a3,start:b18,x:b19,y:b2,platform:Android, 36626666353861663864336130363137,Razer Junglecat,a:b0,b:b1,back:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 05000000f8270000bf0b0000ffff3f00,Razer Kishi,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 62653861643333663663383332396665,Razer Kishi,a:b0,b:b1,back:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a4,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 050000003215000005070000ffff3f00,Razer Raiju Mobile,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 050000003215000007070000ffff3f00,Razer Raiju Mobile,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 050000003215000000090000bf7f3f00,Razer Serval,a:b0,b:b1,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,x:b2,y:b3,platform:Android, 5a6869587520526574726f2042697420,Retro Bit Saturn Controller,a:b21,b:b22,back:b29,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b25,lefttrigger:b26,rightshoulder:b27,righttrigger:b28,start:b30,x:b23,y:b24,platform:Android, 32417865732031314b6579732047616d,Retro Bit SNES Controller,a:b0,b:b1,back:b15,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b9,rightshoulder:b10,start:b6,x:b2,y:b3,platform:Android, 36313938306539326233393732613361,Retro Bit SNES Controller,a:b0,b:b1,back:b15,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b9,rightshoulder:b10,start:b6,x:b2,y:b3,platform:Android, 526574726f466c616720576972656420,Retro Controller,a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b17,rightshoulder:b18,start:b10,x:b2,y:b3,platform:Android, 61343739353764363165343237303336,Retro Controller,a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b17,lefttrigger:b18,leftx:a0,lefty:a1,start:b10,x:b2,y:b3,platform:Android, 526574726f696420506f636b65742043,Retroid Pocket,a:b1,b:b0,back:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:a5,leftx:a0,lefty:a1,paddle1:b17,paddle2:b18,rightshoulder:b10,rightstick:b8,righttrigger:a4,rightx:a2,righty:a3,start:b6,x:b3,y:b2,platform:Android, 582d426f7820436f6e74726f6c6c6572,Retroid Pocket,a:b0,b:b1,back:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:a5,leftx:a0,lefty:a1,paddle1:b17,paddle2:b18,rightshoulder:b10,rightstick:b8,righttrigger:a4,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 38653130373365613538333235303036,Retroid Pocket 2,a:b0,b:b1,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,lefttrigger:b17,leftx:a0,lefty:a1,rightshoulder:b10,righttrigger:b18,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 64363363336633363736393038313463,Retrolink,a:b1,b:b0,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,start:b6,platform:Android, 37393234373533633333323633646531,RetroUSB N64 RetroPort,+rightx:b17,+righty:b15,-rightx:b18,-righty:b6,a:b10,b:b9,dpdown:b19,dpleft:b1,dpright:b0,dpup:b2,leftshoulder:b7,lefttrigger:b20,leftx:a0,lefty:a1,rightshoulder:b5,start:b3,platform:Android, 5365616c6965436f6d707574696e6720,RetroUSB N64 RetroPort,+rightx:b17,+righty:b15,-rightx:b18,-righty:b6,a:b10,b:b9,dpdown:b19,dpleft:b1,dpright:b0,dpup:b2,leftshoulder:b7,lefttrigger:b20,leftx:a0,lefty:a1,rightshoulder:b5,start:b3,platform:Android, 526574726f5553422e636f6d20534e45,RetroUSB SNES RetroPort,a:b1,b:b20,back:b19,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b9,rightshoulder:b10,start:b2,x:b0,y:b3,platform:Android, 64643037633038386238303966376137,RetroUSB SNES RetroPort,a:b1,b:b20,back:b19,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b9,rightshoulder:b10,start:b2,x:b0,y:b3,platform:Android, 37656564346533643138636436356230,Rock Candy Switch Controller,a:b1,b:b19,back:b17,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b3,leftstick:b15,lefttrigger:b9,leftx:a0,lefty:a1,misc1:b7,rightshoulder:b20,rightstick:b6,righttrigger:b10,rightx:a2,righty:a3,start:b18,x:b0,y:b2,platform:Android, 33373336396634316434323337666361,RumblePad 2,a:b22,b:b23,back:b29,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b25,lefttrigger:b27,leftx:a0,lefty:a1,rightshoulder:b26,righttrigger:b28,rightx:a2,righty:a3,start:b30,x:b21,y:b24,platform:Android, 36363537303435333566386638366333,Samsung EIGP20,a:b0,b:b1,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b9,leftstick:b7,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 53616d73756e672047616d6520506164,Samsung EIGP20,a:b0,b:b1,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b9,leftstick:b7,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 66386565396238363534313863353065,Sanwa PlayOnline Mobile,a:b21,b:b22,back:b23,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,start:b24,platform:Android, 32383165316333383766336338373261,Saturn,a:b0,b:b1,back:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,lefttrigger:b10,leftx:a0,lefty:a1,rightshoulder:a4,righttrigger:a5,x:b2,y:b3,platform:Android, 38613865396530353338373763623431,Saturn,a:b0,b:b1,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b9,lefttrigger:b10,rightshoulder:b20,righttrigger:b19,start:b17,x:b2,y:b3,platform:Android, 61316232336262373631343137633631,Saturn,a:b0,b:b1,back:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,lefttrigger:b10,leftx:a0,lefty:a1,rightshoulder:a4,righttrigger:a5,x:b2,y:b3,platform:Android, 30353835333338613130373363646337,SG H510,a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,leftstick:b17,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b20,rightstick:b18,righttrigger:a5,rightx:a3,righty:a4,start:b10,x:b19,y:b2,platform:Android, 66386262366536653765333235343634,SG H510,a:b0,b:b1,back:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,x:b2,y:b3,platform:Android, 66633132393363353531373465633064,SG H510,a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,leftstick:b17,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b20,rightstick:b18,righttrigger:a5,rightx:a3,righty:a4,start:b10,x:b19,y:b2,platform:Android, 62653761636366393366613135366338,SN30 PP,a:b1,b:b0,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:b17,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:b18,rightx:a2,righty:a3,start:b6,x:b3,y:b2,platform:Android, 38376662666661636265313264613039,SNES,a:b0,b:b1,back:b9,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b3,rightshoulder:b20,start:b10,x:b19,y:b2,platform:Android, 5346432f555342205061640000000000,SNES Adapter,a:b0,b:b1,back:b9,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b3,rightshoulder:b20,start:b10,x:b19,y:b2,platform:Android, 5553422047616d657061642000000000,SNES Controller,a:b1,b:b0,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,rightshoulder:b10,start:b6,x:b3,y:b2,platform:Android, 63303964303462366136616266653561,Sony PSP,a:b21,b:b22,back:b27,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b25,leftx:a0,lefty:a1,rightshoulder:b26,start:b28,x:b23,y:b24,platform:Android, 63376637643462343766333462383235,Sony Vita,a:b1,b:b19,back:b17,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,leftx:a0,lefty:a1,rightshoulder:b20,rightx:a3,righty:a4,start:b18,x:b0,y:b2,platform:Android, 476f6f676c65204c4c43205374616469,Stadia Controller,a:b0,b:b1,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 5374616469614e3848532d6532633400,Stadia Controller,a:b0,b:b1,back:b15,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 05000000de2800000511000001000000,Steam Controller,a:b0,b:b1,back:b6,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:a3,start:b7,x:b2,y:b3,platform:Android, 05000000de2800000611000001000000,Steam Controller,a:b0,b:b1,back:b6,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:a3,start:b7,x:b2,y:b3,platform:Android, 0500000011010000201400000f7e0f00,SteelSeries Nimbus,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b20,righttrigger:b10,rightx:a2,righty:a3,x:b19,y:b2,platform:Android, 35306436396437373135383665646464,SteelSeries Nimbus Plus,a:b0,b:b1,leftshoulder:b3,leftstick:b17,lefttrigger:b9,leftx:a0,rightshoulder:b20,rightstick:b18,righttrigger:b10,rightx:a2,x:b19,y:b2,platform:Android, 54475a20436f6e74726f6c6c65720000,TGZ Controller,a:b0,b:b1,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:b17,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:b18,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 62363434353532386238336663643836,TGZ Controller,a:b0,b:b1,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:b17,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:b18,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 37323236633763666465316365313236,THEC64 Joystick,a:b21,b:b22,back:b27,leftshoulder:b25,leftx:a0,lefty:a1,rightshoulder:b26,start:b27,x:b23,y:b24,platform:Android, 38346162326232346533316164363336,THEGamepad,a:b23,b:b22,back:b27,leftshoulder:b25,leftx:a0,lefty:a1,rightshoulder:b26,start:b28,x:b24,y:b21,platform:Android, 050000004f0400000ed00000fffe3f00,ThrustMaster eSwap Pro Controller,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 5477696e20555342204a6f7973746963,Twin Joystick,a:b22,b:b21,back:b28,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b26,leftstick:b30,lefttrigger:b24,leftx:a0,lefty:a1,rightshoulder:b27,rightstick:b31,righttrigger:b25,rightx:a3,righty:a2,start:b29,x:b23,y:b20,platform:Android, 30623739343039643830333266346439,Valve Steam Controller,a:b0,b:b1,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b9,leftstick:b7,leftx:a0,lefty:a1,paddle1:b24,paddle2:b23,rightshoulder:b10,rightstick:b8,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 31643365666432386133346639383937,Valve Steam Controller,a:b0,b:b1,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b9,leftstick:b7,leftx:a0,lefty:a1,paddle1:b24,paddle2:b23,rightshoulder:b10,rightstick:b8,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 30386438313564306161393537333663,Wii Classic Adapter,a:b23,b:b22,back:b29,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b27,lefttrigger:b25,leftx:a0,lefty:a1,rightshoulder:b28,righttrigger:b26,rightx:a2,righty:a3,start:b30,x:b24,y:b21,platform:Android, 33333034646336346339646538643633,Wii Classic Adapter,a:b23,b:b22,back:b29,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b27,lefttrigger:b25,leftx:a0,lefty:a1,rightshoulder:b28,righttrigger:b26,rightx:a2,righty:a3,start:b30,x:b24,y:b21,platform:Android, 050000005e0400008e02000000783f00,Xbox 360 Controller,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 30396232393162346330326334636566,Xbox 360 Controller,a:b0,b:b1,back:b4,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 38313038323730383864666463383533,Xbox 360 Controller,a:b0,b:b1,back:b4,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 58626f782033363020576972656c6573,Xbox 360 Controller,a:b0,b:b1,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 65353331386662343338643939643636,Xbox 360 Controller,a:b0,b:b1,back:b4,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 65613532386633373963616462363038,Xbox 360 Controller,a:b0,b:b1,back:b4,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 47656e6572696320582d426f78207061,Xbox Controller,a:b0,b:b1,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a4,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 4d6963726f736f667420582d426f7820,Xbox Controller,a:b0,b:b1,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a4,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 64633436313965656664373634323364,Xbox Controller,a:b0,b:b1,back:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b19,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 050000005e04000091020000ff073f00,Xbox One Controller,a:b0,b:b1,back:b4,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a3,righty:a4,start:b6,x:b2,y:b3,platform:Android, 050000005e04000091020000ff073f80,Xbox One Controller,a:b0,b:b1,back:b4,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 050000005e040000e00200000ffe3f00,Xbox One Controller,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b3,leftstick:b15,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b18,rightstick:b16,righttrigger:a5,rightx:a3,righty:a4,start:b10,x:b17,y:b2,platform:Android, 050000005e040000e00200000ffe3f80,Xbox One Controller,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b3,leftstick:b15,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b18,rightstick:b16,righttrigger:a5,rightx:a2,righty:a3,start:b10,x:b17,y:b2,platform:Android, 050000005e040000e0020000ffff3f00,Xbox One Controller,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b4,leftshoulder:b3,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b18,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b10,x:b17,y:b2,platform:Android, 050000005e040000e0020000ffff3f80,Xbox One Controller,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b4,leftshoulder:b3,leftstick:b8,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b18,rightstick:b7,righttrigger:a5,rightx:a2,righty:a3,start:b10,x:b17,y:b2,platform:Android, 050000005e040000fd020000ffff3f00,Xbox One Controller,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 33356661323266333733373865656366,Xbox One Controller,a:b0,b:b1,back:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 34356136633366613530316338376136,Xbox One Controller,a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b3,leftstick:b15,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b18,rightstick:b16,righttrigger:a5,rightx:a3,righty:a4,x:b17,y:b2,platform:Android, 35623965373264386238353433656138,Xbox One Controller,a:b0,b:b1,back:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 36616131643361333337396261666433,Xbox One Controller,a:b0,b:b1,back:b15,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 58626f7820576972656c65737320436f,Xbox One Controller,a:b0,b:b1,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 050000005e040000000b000000783f00,Xbox One Elite 2 Controller,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a3,righty:a4,start:b6,x:b2,y:b3,platform:Android, 050000005e040000000b000000783f80,Xbox One Elite 2 Controller,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 050000005e040000050b0000ffff3f00,Xbox One Elite 2 Controller,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,leftstick:b7,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a6,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 050000005e040000e002000000783f00,Xbox One S Controller,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 050000005e040000ea02000000783f00,Xbox One S Controller,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 050000005e040000fd020000ff7f3f00,Xbox One S Controller,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 050000005e040000120b000000783f00,Xbox Series Controller,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a3,righty:a4,start:b6,x:b2,y:b3,platform:Android, 050000005e040000120b000000783f80,Xbox Series Controller,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 050000005e040000130b0000ffff3f00,Xbox Series Controller,a:b0,b:b1,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 65633038363832353634653836396239,Xbox Series Controller,a:b0,b:b1,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Android, 050000001727000044310000ffff3f00,XiaoMi Controller,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,leftshoulder:b9,leftstick:b7,lefttrigger:a7,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a6,rightx:a2,righty:a5,start:b6,x:b2,y:b3,platform:Android, 05000000ac0500000100000000006d01,*,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b6,leftshoulder:b4,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:a5,rightx:a3,righty:a4,x:b2,y:b3,platform:iOS, 05000000ac050000010000004f066d01,*,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b6,leftshoulder:b4,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:a5,rightx:a3,righty:a4,x:b2,y:b3,platform:iOS, 05000000ac05000001000000cf076d01,*,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,x:b2,y:b3,platform:iOS, 05000000ac05000001000000df076d01,*,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b2,y:b3,platform:iOS, 05000000ac05000001000000ff076d01,*,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b9,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b10,x:b2,y:b3,platform:iOS, 05000000ac0500000200000000006d02,*,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b6,leftshoulder:b4,rightshoulder:b5,x:b2,y:b3,platform:iOS, 05000000ac050000020000004f066d02,*,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b6,leftshoulder:b4,rightshoulder:b5,x:b2,y:b3,platform:iOS, 050000008a35000003010000ff070000,Backbone One,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b10,x:b2,y:b3,platform:iOS, 050000008a35000004010000ff070000,Backbone One,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b10,x:b2,y:b3,platform:iOS, 4d466947616d65706164010000000000,MFi Extended Gamepad,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:a5,rightx:a3,righty:a4,start:b6,x:b2,y:b3,platform:iOS, 4d466947616d65706164020000000000,MFi Gamepad,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,rightshoulder:b5,start:b6,x:b2,y:b3,platform:iOS, 050000007e050000062000000f060000,Nintendo Switch Joy-Con (L),+leftx:h0.2,+lefty:h0.4,-leftx:h0.8,-lefty:h0.1,a:b0,b:b2,leftshoulder:b4,rightshoulder:b5,x:b1,y:b3,platform:iOS, 050000007e050000062000004f060000,Nintendo Switch Joy-Con (L),+leftx:h0.1,+lefty:h0.2,-leftx:h0.4,-lefty:h0.8,dpdown:b2,dpleft:b0,dpright:b3,dpup:b1,leftshoulder:b4,misc1:b6,rightshoulder:b5,platform:iOS, 050000007e05000008200000df070000,Nintendo Switch Joy-Con (L/R),a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b2,y:b3,platform:iOS, 050000007e0500000e200000df070000,Nintendo Switch Joy-Con (L/R),a:b1,b:b0,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b3,y:b2,platform:iOS, 050000007e050000072000004f060000,Nintendo Switch Joy-Con (R),+rightx:h0.4,+righty:h0.8,-rightx:h0.1,-righty:h0.2,a:b1,b:b0,guide:b6,leftshoulder:b4,rightshoulder:b5,x:b3,y:b2,platform:iOS, 050000007e05000009200000df870000,Nintendo Switch Pro Controller,a:b1,b:b0,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,misc1:b10,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b3,y:b2,platform:iOS, 050000007e05000009200000ff870000,Nintendo Switch Pro Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b9,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,misc1:b11,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b10,x:b2,y:b3,platform:iOS, 050000004c050000cc090000df070000,PS4 Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b2,y:b3,platform:iOS, 050000004c050000cc090000df870001,PS4 Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b2,y:b3,platform:iOS, 050000004c050000cc090000ff070000,PS4 Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b9,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b10,x:b2,y:b3,platform:iOS, 050000004c050000cc090000ff870001,PS4 Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b9,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b10,touchpad:b11,x:b2,y:b3,platform:iOS, 050000004c050000cc090000ff876d01,PS4 Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b9,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,misc1:b11,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b10,x:b2,y:b3,platform:iOS, 050000004c050000e60c0000df870000,PS5 Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b9,touchpad:b10,x:b2,y:b3,platform:iOS, 050000004c050000e60c0000ff870000,PS5 Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b9,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b10,touchpad:b11,x:b2,y:b3,platform:iOS, 05000000ac0500000300000000006d03,Remote,a:b0,b:b2,leftx:a0,lefty:a1,platform:iOS, 05000000ac0500000300000043006d03,Remote,a:b0,b:b2,leftx:a0,lefty:a1,platform:iOS, 05000000de2800000511000001000000,Steam Controller,a:b0,b:b1,back:b6,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:a3,start:b7,x:b2,y:b3,platform:iOS, 05000000de2800000611000001000000,Steam Controller,a:b0,b:b1,back:b6,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:a3,start:b7,x:b2,y:b3,platform:iOS, 050000005e040000050b0000df070001,Xbox Elite Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,paddle1:b10,paddle2:b12,paddle3:b11,paddle4:b13,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b2,y:b3,platform:iOS, 050000005e040000050b0000ff070001,Xbox Elite Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b9,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,paddle1:b11,paddle2:b13,paddle3:b12,paddle4:b14,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b10,x:b2,y:b3,platform:iOS, 050000005e040000e0020000df070000,Xbox One Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b2,y:b3,platform:iOS, 050000005e040000e0020000ff070000,Xbox One Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b9,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b10,x:b2,y:b3,platform:iOS, 050000005e040000130b0000df870001,Xbox Series X Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,misc1:b10,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b2,y:b3,platform:iOS, 050000005e040000130b0000ff870001,Xbox Series X Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b9,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,misc1:b11,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b10,x:b2,y:b3,platform:iOS, ================================================ FILE: testing/resources/test.txt ================================================ helloworld ================================================ FILE: testing/resources/vk_layer_settings.txt ================================================ # VK_LAYER_KHRONOS_validation # Fine Grained Locking # ===================== # .fine_grained_locking # Enable fine grained locking for Core Validation, which should improve # performance in multithreaded applications. This setting allows the # optimization to be disabled for debugging. khronos_validation.fine_grained_locking = true # Core # ===================== # .validate_core # The main, heavy-duty validation checks. This may be valuable early in the # development cycle to reduce validation output while correcting # parameter/object usage errors. khronos_validation.validate_core = true # Image Layout # ===================== # .check_image_layout # Check that the layout of each image subresource is correct whenever it is used # by a command buffer. These checks are very CPU intensive for some # applications. khronos_validation.check_image_layout = true # Command Buffer State # ===================== # .check_command_buffer # Check that all Vulkan objects used by a command buffer have not been # destroyed. These checks can be CPU intensive for some applications. khronos_validation.check_command_buffer = true # Object in Use # ===================== # .check_object_in_use # Check that Vulkan objects are not in use by a command buffer when they are # destroyed. khronos_validation.check_object_in_use = true # Query # ===================== # .check_query # Checks for commands that use VkQueryPool objects. khronos_validation.check_query = true # Shader # ===================== # .check_shaders # Shader checks. These checks can be CPU intensive during application start up, # especially if Shader Validation Caching is also disabled. khronos_validation.check_shaders = true # Caching # ===================== # .check_shaders_caching # Enable caching of shader validation results. khronos_validation.check_shaders_caching = true # Handle Wrapping # ===================== # .unique_handles # Handle wrapping checks. Disable this feature if you are exerience crashes when # creating new extensions or developing new Vulkan objects/structures. khronos_validation.unique_handles = true # Object Lifetime # ===================== # .object_lifetime # Object tracking checks. This may not always be necessary late in a development # cycle. khronos_validation.object_lifetime = true # Stateless Parameter # ===================== # .stateless_param # Stateless parameter checks. This may not always be necessary late in a # development cycle. khronos_validation.stateless_param = true # Thread Safety # ===================== # .thread_safety # Thread checks. In order to not degrade performance, it might be best to run # your program with thread-checking disabled most of the time, enabling it # occasionally for a quick sanity check or when debugging difficult application # behaviors. khronos_validation.thread_safety = true # Synchronization # ===================== # .validate_sync # Enable synchronization validation during command buffers recording. This # feature reports resource access conflicts due to missing or incorrect # synchronization operations between actions (Draw, Copy, Dispatch, Blit) # reading or writing the same regions of memory. khronos_validation.validate_sync = true # QueueSubmit Synchronization Validation # ===================== # .sync_queue_submit # Enable synchronization validation between submitted command buffers when # Synchronization Validation is enabled. This option will increase the # synchronization performance cost. khronos_validation.sync_queue_submit = true # GPU Base # ===================== # .validate_gpu_based # Setting an option here will enable specialized areas of validation khronos_validation.validate_gpu_based = GPU_BASED_NONE # Redirect Printf messages to stdout # ===================== # .printf_to_stdout # Enable redirection of Debug Printf messages from the debug callback to stdout #khronos_validation.printf_to_stdout = true # Printf verbose # ===================== # .printf_verbose # Set the verbosity of debug printf messages #khronos_validation.printf_verbose = false # Printf buffer size # ===================== # .printf_buffer_size # Set the size in bytes of the buffer used by debug printf #khronos_validation.printf_buffer_size = 1024 # Shader instrumentation # ===================== # .gpuav_shader_instrumentation # Instrument shaders to validate descriptors, descriptor indexing, buffer device # addresses and ray queries. Warning: will considerably slow down shader # executions. #khronos_validation.gpuav_shader_instrumentation = true # Descriptors indexing # ===================== # .gpuav_descriptor_checks # Enable descriptors and buffer out of bounds validation when using descriptor # indexing khronos_validation.gpuav_descriptor_checks = true # Generate warning on out of bounds accesses even if buffer robustness is enabled # ===================== # .gpuav_warn_on_robust_oob # Warn on out of bounds accesses even if robustness is enabled khronos_validation.gpuav_warn_on_robust_oob = true # Out of bounds buffer device addresses # ===================== # .gpuav_buffer_address_oob # Check for khronos_validation.gpuav_buffer_address_oob = true # Maximum number of buffer device addresses in use at one time # ===================== # .gpuav_max_buffer_device_addresses khronos_validation.gpuav_max_buffer_device_addresses = 10000 # RayQuery SPIR-V Instructions # ===================== # .gpuav_validate_ray_query # Enable shader instrumentation on OpRayQueryInitializeKHR khronos_validation.gpuav_validate_ray_query = true # Cache instrumented shaders rather than instrumenting them on every run # ===================== # .gpuav_cache_instrumented_shaders # Enable instrumented shader caching khronos_validation.gpuav_cache_instrumented_shaders = true # Enable instrumenting shaders selectively # ===================== # .gpuav_select_instrumented_shaders # Select which shaders to instrument passing a VkValidationFeaturesEXT struct # with GPU-AV enabled in the VkShaderModuleCreateInfo pNext khronos_validation.gpuav_select_instrumented_shaders = false # Buffer content validation # ===================== # .gpuav_buffers_validation # Validate buffers containing parameters used in indirect Vulkan commands, or # used in copy commands #khronos_validation.gpuav_buffers_validation = true # Indirect draws parameters # ===================== # .gpuav_indirect_draws_buffers # Validate buffers containing draw parameters used in indirect draw commands khronos_validation.gpuav_indirect_draws_buffers = true # Indirect dispatches parameters # ===================== # .indirect_dispatches # Validate buffers containing dispatch parameters used in indirect dispatch # commands khronos_validation.indirect_dispatches = true # Indirect trace rays parameters # ===================== # .indirect_trace_rays # Validate buffers containing ray tracing parameters used in indirect ray # tracing commands khronos_validation.indirect_trace_rays = true # Buffer copies # ===================== # .gpuav_buffer_copies # Validate copies involving a VkBuffer. Right now only validates copy buffer to # image. khronos_validation.gpuav_buffer_copies = true # Reserve Descriptor Set Binding Slot # ===================== # .gpuav_reserve_binding_slot # Specifies that the validation layers reserve a descriptor set binding slot for # their own use. The layer reports a value for # VkPhysicalDeviceLimits::maxBoundDescriptorSets that is one less than the value # reported by the device. If the device supports the binding of only one # descriptor set, the validation layer does not perform GPU-assisted validation. #khronos_validation.gpuav_reserve_binding_slot = true # Linear Memory Allocation Mode # ===================== # .gpuav_vma_linear_output # Use VMA linear memory allocations for GPU-AV output buffers instead of finding # best place for new allocations among free regions to optimize memory usage. # Enabling this setting reduces performance cost but disabling this method # minimizes memory usage. #khronos_validation.gpuav_vma_linear_output = true # Validate instrumented shaders # ===================== # .gpuav_debug_validate_instrumented_shaders # Run spirv-val after doing shader instrumentation #khronos_validation.gpuav_debug_validate_instrumented_shaders = false # Dump instrumented shaders # ===================== # .gpuav_debug_dump_instrumented_shaders # Will dump the instrumented shaders (before and after) to working directory #khronos_validation.gpuav_debug_dump_instrumented_shaders = false # Best Practices # ===================== # .validate_best_practices # Outputs warnings related to common misuse of the API, but which are not # explicitly prohibited by the specification. khronos_validation.validate_best_practices = true # ARM-specific best practices # ===================== # .validate_best_practices_arm # Outputs warnings for spec-conforming but non-ideal code on ARM GPUs. khronos_validation.validate_best_practices_arm = false # AMD-specific best practices # ===================== # .validate_best_practices_amd # Outputs warnings for spec-conforming but non-ideal code on AMD GPUs. khronos_validation.validate_best_practices_amd = false # IMG-specific best practices # ===================== # .validate_best_practices_img # Outputs warnings for spec-conforming but non-ideal code on Imagination GPUs. khronos_validation.validate_best_practices_img = false # NVIDIA-specific best practices # ===================== # .validate_best_practices_nvidia # Outputs warnings for spec-conforming but non-ideal code on NVIDIA GPUs. khronos_validation.validate_best_practices_nvidia = false # Debug Action # ===================== # .debug_action # Specifies what action is to be taken when a layer reports information khronos_validation.debug_action = VK_DBG_LAYER_ACTION_LOG_MSG # Log Filename # ===================== # .log_filename # Specifies the output filename khronos_validation.log_filename = stdout # Message Severity # ===================== # .report_flags # Comma-delineated list of options specifying the types of messages to be # reported khronos_validation.report_flags = error # Limit Duplicated Messages # ===================== # .enable_message_limit # Enable limiting of duplicate messages. khronos_validation.enable_message_limit = false # Max Duplicated Messages # ===================== # .duplicate_message_limit # Maximum number of times any single validation message should be reported. #khronos_validation.duplicate_message_limit = 10 # Mute Message VUIDs # ===================== # .message_id_filter # List of VUIDs and VUID identifers which are to be IGNORED by the validation # layer khronos_validation.message_id_filter = # Display Application Name # ===================== # .message_format_display_application_name # Useful when running multiple instances to know which instance the message is # from. khronos_validation.message_format_display_application_name = false ================================================ FILE: testing/tests/audio.lua ================================================ -- love.audio -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- ------------------------------------OBJECTS------------------------------------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -- RecordingDevice (love.audio.getRecordingDevices) love.test.audio.RecordingDevice = function(test) -- skip recording device on runners, they cant emulate it if GITHUB_RUNNER then return test:skipTest('cant emulate recording devices in CI') end -- check devices first local devices = love.audio.getRecordingDevices() if #devices == 0 then return test:skipTest('cant test this works: no recording devices found') end -- check object created and basics local device = devices[1] test:assertObject(device) test:assertMatch({1, 2}, device:getChannelCount(), 'check channel count is 1 or 2') test:assertNotEquals(nil, device:getName(), 'check has name') -- check initial data is empty as we haven't recorded anything yet test:assertNotNil(device:getBitDepth()) test:assertEquals(nil, device:getData(), 'check initial data empty') test:assertEquals(0, device:getSampleCount(), 'check initial sample empty') test:assertNotNil(device:getSampleRate()) test:assertFalse(device:isRecording(), 'check not recording') -- start recording for a short time local startrecording = device:start(32000, 4000, 16, 1) test:waitFrames(10) test:assertTrue(startrecording, 'check recording started') test:assertTrue(device:isRecording(), 'check now recording') test:assertEquals(4000, device:getSampleRate(), 'check sample rate set') test:assertEquals(16, device:getBitDepth(), 'check bit depth set') test:assertEquals(1, device:getChannelCount(), 'check channel count set') local recording = device:stop() test:waitFrames(10) -- after recording test:assertFalse(device:isRecording(), 'check not recording') test:assertEquals(nil, device:getData(), 'using stop should clear buffer') test:assertObject(recording) end -- Source (love.audio.newSource) love.test.audio.Source = function(test) -- create stereo source local stereo = love.audio.newSource('resources/click.ogg', 'static') test:assertObject(stereo) -- check stereo props test:assertEquals(2, stereo:getChannelCount(), 'check stereo src') test:assertRange(stereo:getDuration("seconds"), 0, 0.1, 'check stereo seconds') test:assertNotNil(stereo:getFreeBufferCount()) test:assertEquals('static', stereo:getType(), 'check stereo type') -- check cloning a stereo local clone = stereo:clone() test:assertEquals(2, clone:getChannelCount(), 'check clone stereo src') test:assertRange(clone:getDuration("seconds"), 0, 0.1, 'check clone stereo seconds') test:assertNotNil(clone:getFreeBufferCount()) test:assertEquals('static', clone:getType(), 'check cloned stereo type') -- mess with stereo playing test:assertFalse(stereo:isPlaying(), 'check not playing') stereo:setLooping(true) stereo:play() test:assertTrue(stereo:isPlaying(), 'check now playing') test:assertTrue(stereo:isLooping(), 'check now playing') stereo:pause() stereo:seek(0.01, 'seconds') test:assertEquals(0.01, stereo:tell('seconds'), 'check seek/tell') stereo:stop() test:assertFalse(stereo:isPlaying(), 'check stopped playing') -- check volume limits stereo:setVolumeLimits(0.1, 0.5) local min, max = stereo:getVolumeLimits() test:assertRange(min, 0.1, 0.2, 'check min limit') test:assertRange(max, 0.5, 0.6, 'check max limit') -- check setting volume stereo:setVolume(1) test:assertEquals(1, stereo:getVolume(), 'check set volume') stereo:setVolume(0) test:assertEquals(0, stereo:getVolume(), 'check set volume') -- change some get/set props that can apply to stereo stereo:setPitch(2) test:assertEquals(2, stereo:getPitch(), 'check pitch change') -- create mono source local mono = love.audio.newSource('resources/clickmono.ogg', 'stream') test:assertObject(mono) test:assertEquals(1, mono:getChannelCount(), 'check mono src') test:assertEquals(2927, mono:getDuration("samples"), 'check mono seconds') test:assertEquals('stream', mono:getType(), 'check mono type') -- air absorption test:assertEquals(0, mono:getAirAbsorption(), 'get air absorption') mono:setAirAbsorption(1) test:assertEquals(1, mono:getAirAbsorption(), 'set air absorption') -- cone mono:setCone(0, 90*(math.pi/180), 1) local ia, oa, ov = mono:getCone() test:assertEquals(0, ia, 'check cone ia') test:assertEquals(math.floor(9000*(math.pi/180)), math.floor(oa*100), 'check cone oa') test:assertEquals(1, ov, 'check cone ov') -- direction mono:setDirection(3, 1, -1) local x, y, z = mono:getDirection() test:assertEquals(3, x, 'check direction x') test:assertEquals(1, y, 'check direction y') test:assertEquals(-1, z, 'check direction z') -- relative mono:setRelative(true) test:assertTrue(mono:isRelative(), 'check set relative') -- position mono:setPosition(1, 2, 3) x, y, z = mono:getPosition() test:assertEquals(x, 1, 'check pos x') test:assertEquals(y, 2, 'check pos y') test:assertEquals(z, 3, 'check pos z') -- velocity mono:setVelocity(1, 3, 4) x, y, z = mono:getVelocity() test:assertEquals(x, 1, 'check velocity x') test:assertEquals(y, 3, 'check velocity x') test:assertEquals(z, 4, 'check velocity x') -- rolloff mono:setRolloff(1) test:assertEquals(1, mono:getRolloff(), 'check rolloff set') -- create queue source local queue = love.audio.newQueueableSource(44100, 16, 1, 3) local sdata = love.sound.newSoundData(1024, 44100, 16, 1) test:assertObject(queue) local run = queue:queue(sdata) test:assertTrue(run, 'check queued sound') queue:stop() -- check making a filer local setfilter = stereo:setFilter({ type = 'lowpass', volume = 0.5, highgain = 0.3 }) test:assertTrue(setfilter, 'check filter applied') local filter = stereo:getFilter() test:assertEquals('lowpass', filter.type, 'check filter type') test:assertEquals(0.5, filter.volume, 'check filter volume') test:assertRange(filter.highgain, 0.3, 0.4, 'check filter highgain') test:assertEquals(nil, filter.lowgain, 'check filter lowgain') -- add an effect local effsource = love.audio.newSource('resources/click.ogg', 'static') love.audio.setEffect('testeffect', { type = 'flanger', volume = 0.75 }) local seteffect, err = effsource:setEffect('testeffect', { type = 'highpass', volume = 0.3, lowgain = 0.1 }) -- both these fail on 12 using stereo or mono, no err test:assertTrue(seteffect, 'check effect was applied') local filtersettings = effsource:getEffect('effectthatdoesntexist', {}) test:assertNotNil(filtersettings) love.audio.stop(stereo) love.audio.stop(mono) love.audio.stop(effsource) end -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- ------------------------------------METHODS------------------------------------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -- love.audio.getActiveEffects love.test.audio.getActiveEffects = function(test) -- check we get a value test:assertNotNil(love.audio.getActiveEffects()) -- check setting an effect active love.audio.setEffect('testeffect', { type = 'chorus', volume = 0.75 }) test:assertEquals(1, #love.audio.getActiveEffects(), 'check 1 effect running') test:assertEquals('testeffect', love.audio.getActiveEffects()[1], 'check effect details') end -- love.audio.getActiveSourceCount love.test.audio.getActiveSourceCount = function(test) -- check we get a value test:assertNotNil(love.audio.getActiveSourceCount()) -- check source isn't active by default local testsource = love.audio.newSource('resources/click.ogg', 'static') love.audio.stop(testsource) test:assertEquals(0, love.audio.getActiveSourceCount(), 'check not active') -- check playing a source marks it as active love.audio.play(testsource) test:assertEquals(1, love.audio.getActiveSourceCount(), 'check now active') love.audio.pause() end -- love.audio.getDistanceModel love.test.audio.getDistanceModel = function(test) -- check we get a value test:assertNotNil(love.audio.getDistanceModel()) -- check default value from documentation test:assertEquals('inverseclamped', love.audio.getDistanceModel(), 'check default value') -- check get correct value after setting love.audio.setDistanceModel('inverse') test:assertEquals('inverse', love.audio.getDistanceModel(), 'check setting model') end -- love.audio.getDopplerScale love.test.audio.getDopplerScale = function(test) -- check default value test:assertEquals(1, love.audio.getDopplerScale(), 'check default 1') -- check correct value after setting to 0 love.audio.setDopplerScale(0) test:assertEquals(0, love.audio.getDopplerScale(), 'check setting to 0') love.audio.setDopplerScale(1) end -- love.audio.getEffect love.test.audio.getEffect = function(test) -- check getting a non-existent effect test:assertEquals(nil, love.audio.getEffect('madeupname'), 'check wrong name') -- check getting a valid effect love.audio.setEffect('testeffect', { type = 'chorus', volume = 0.75 }) test:assertNotNil(love.audio.getEffect('testeffect')) -- check effect values match creation values test:assertEquals('chorus', love.audio.getEffect('testeffect').type, 'check effect type') test:assertEquals(0.75, love.audio.getEffect('testeffect').volume, 'check effect volume') end -- love.audio.getMaxSceneEffects -- @NOTE feel like this is platform specific number so best we can do is a nil? love.test.audio.getMaxSceneEffects = function(test) test:assertNotNil(love.audio.getMaxSceneEffects()) end -- love.audio.getMaxSourceEffects -- @NOTE feel like this is platform specific number so best we can do is a nil? love.test.audio.getMaxSourceEffects = function(test) test:assertNotNil(love.audio.getMaxSourceEffects()) end -- love.audio.getOrientation -- @NOTE is there an expected default listener pos? love.test.audio.getOrientation = function(test) -- checking getting values matches what was set love.audio.setOrientation(1, 2, 3, 4, 5, 6) local fx, fy, fz, ux, uy, uz = love.audio.getOrientation() test:assertEquals(1, fx, 'check fx orientation') test:assertEquals(2, fy, 'check fy orientation') test:assertEquals(3, fz, 'check fz orientation') test:assertEquals(4, ux, 'check ux orientation') test:assertEquals(5, uy, 'check uy orientation') test:assertEquals(6, uz, 'check uz orientation') end -- love.audio.getPlaybackDevice love.test.audio.getPlaybackDevice = function(test) test:assertNotNil(love.audio.getPlaybackDevice) test:assertNotNil(love.audio.getPlaybackDevice()) end -- love.audio.getPlaybackDevices love.test.audio.getPlaybackDevices = function(test) test:assertNotNil(love.audio.getPlaybackDevices) test:assertGreaterEqual(0, #love.audio.getPlaybackDevices(), 'check table') end -- love.audio.getPosition -- @NOTE is there an expected default listener pos? love.test.audio.getPosition = function(test) -- check getting values matches what was set love.audio.setPosition(1, 2, 3) local x, y, z = love.audio.getPosition() test:assertEquals(1, x, 'check x position') test:assertEquals(2, y, 'check y position') test:assertEquals(3, z, 'check z position') end -- love.audio.getRecordingDevices -- @NOTE hardware dependent so best can do is not nil check love.test.audio.getRecordingDevices = function(test) test:assertNotNil(love.audio.getRecordingDevices()) end -- love.audio.getVelocity love.test.audio.getVelocity = function(test) -- check getting values matches what was set love.audio.setVelocity(1, 2, 3) local x, y, z = love.audio.getVelocity() test:assertEquals(1, x, 'check x velocity') test:assertEquals(2, y, 'check y velocity') test:assertEquals(3, z, 'check z velocity') end -- love.audio.getVolume love.test.audio.getVolume = function(test) -- check getting values matches what was set love.audio.setVolume(0.5) test:assertEquals(0.5, love.audio.getVolume(), 'check matches set') end -- love.audio.isEffectsSupported love.test.audio.isEffectsSupported = function(test) test:assertNotNil(love.audio.isEffectsSupported()) end -- love.audio.newQueueableSource -- @NOTE this is just basic nil checking, objs have their own test method love.test.audio.newQueueableSource = function(test) test:assertObject(love.audio.newQueueableSource(32, 8, 1, 8)) end -- love.audio.newSource -- @NOTE this is just basic nil checking, objs have their own test method love.test.audio.newSource = function(test) test:assertObject(love.audio.newSource('resources/click.ogg', 'static')) test:assertObject(love.audio.newSource('resources/click.ogg', 'stream')) end -- love.audio.pause love.test.audio.pause = function(test) -- check nothing paused (as should be nothing playing) local nopauses = love.audio.pause() test:assertEquals(0, #nopauses, 'check nothing paused') -- check 1 source paused after playing/pausing 1 local source = love.audio.newSource('resources/click.ogg', 'static') love.audio.play(source) local onepause = love.audio.pause() test:assertEquals(1, #onepause, 'check 1 paused') love.audio.stop(source) end -- love.audio.play love.test.audio.play = function(test) -- check playing source is detected local source = love.audio.newSource('resources/click.ogg', 'static') love.audio.play(source) test:assertTrue(source:isPlaying(), 'check something playing') love.audio.stop() end -- love.audio.setDistanceModel love.test.audio.setDistanceModel = function(test) -- check setting each of the distance models is accepted and val returned local distancemodel = { 'none', 'inverse', 'inverseclamped', 'linear', 'linearclamped', 'exponent', 'exponentclamped' } for d=1,#distancemodel do love.audio.setDistanceModel(distancemodel[d]) test:assertEquals(distancemodel[d], love.audio.getDistanceModel(), 'check model set to ' .. distancemodel[d]) end end -- love.audio.setDopplerScale love.test.audio.setDopplerScale = function(test) -- check setting value is returned properly love.audio.setDopplerScale(0) test:assertEquals(0, love.audio.getDopplerScale(), 'check set to 0') love.audio.setDopplerScale(1) test:assertEquals(1, love.audio.getDopplerScale(), 'check set to 1') end -- love.audio.setEffect love.test.audio.setEffect = function(test) -- check effect is set correctly local effect = love.audio.setEffect('testeffect', { type = 'chorus', volume = 0.75 }) test:assertTrue(effect, 'check effect created') -- check values set match local settings = love.audio.getEffect('testeffect') test:assertEquals('chorus', settings.type, 'check effect type') test:assertEquals(0.75, settings.volume, 'check effect volume') end -- love.audio.setMixWithSystem love.test.audio.setMixWithSystem = function(test) test:assertNotNil(love.audio.setMixWithSystem(true)) end -- love.audio.setOrientation love.test.audio.setOrientation = function(test) -- check setting orientation vals are returned love.audio.setOrientation(1, 2, 3, 4, 5, 6) local fx, fy, fz, ux, uy, uz = love.audio.getOrientation() test:assertEquals(1, fx, 'check fx orientation') test:assertEquals(2, fy, 'check fy orientation') test:assertEquals(3, fz, 'check fz orientation') test:assertEquals(4, ux, 'check ux orientation') test:assertEquals(5, uy, 'check uy orientation') test:assertEquals(6, uz, 'check uz orientation') end -- love.audio.setPlaybackDevice love.test.audio.setPlaybackDevice = function(test) -- check method test:assertNotNil(love.audio.setPlaybackDevice) -- check blank string name test:assertTrue(love.audio.setPlaybackDevice(''), 'check blank device is fine') -- check invalid name test:assertFalse(love.audio.setPlaybackDevice('loveFM'), 'check invalid device fails') -- check setting already set test:assertTrue(love.audio.setPlaybackDevice(love.audio.getPlaybackDevice()), 'check existing device is fine') -- if other devices to play with lets set a different one local devices = love.audio.getPlaybackDevices() if #devices > 1 then local another = '' local current = love.audio.getPlaybackDevice() for a=1,#devices do if devices[a] ~= current then another = devices[a] break end end if another ~= '' then -- check setting new device local success4, msg4 = love.audio.setPlaybackDevice(another) test:assertTrue(success4, 'check setting different device') -- check resetting to default local success5, msg5 = love.audio.setPlaybackDevice() test:assertTrue(success5, 'check resetting') test:assertEquals(current, love.audio.getPlaybackDevice()) end end end -- love.audio.setPosition love.test.audio.setPosition = function(test) -- check setting position vals are returned love.audio.setPosition(1, 2, 3) local x, y, z = love.audio.getPosition() test:assertEquals(1, x, 'check x position') test:assertEquals(2, y, 'check y position') test:assertEquals(3, z, 'check z position') end -- love.audio.setVelocity love.test.audio.setVelocity = function(test) -- check setting velocity vals are returned love.audio.setVelocity(1, 2, 3) local x, y, z = love.audio.getVelocity() test:assertEquals(1, x, 'check x velocity') test:assertEquals(2, y, 'check y velocity') test:assertEquals(3, z, 'check z velocity') end -- love.audio.setVolume love.test.audio.setVolume = function(test) -- check setting volume works love.audio.setVolume(0.5) test:assertEquals(0.5, love.audio.getVolume(), 'check set to 0.5') end -- love.audio.stop love.test.audio.stop = function(test) -- check source is playing first local source = love.audio.newSource('resources/click.ogg', 'static') love.audio.play(source) test:assertTrue(source:isPlaying(), 'check is playing') -- check source is then stopped love.audio.stop() test:assertFalse(source:isPlaying(), 'check stopped playing') end ================================================ FILE: testing/tests/data.lua ================================================ -- love.data -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- ------------------------------------OBJECTS------------------------------------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -- ByteData (love.data.newByteData) love.test.data.ByteData = function(test) -- create new obj local data = love.data.newByteData('helloworld') test:assertObject(data) -- check properties match expected test:assertEquals('helloworld', data:getString(), 'check data string') test:assertEquals(10, data:getSize(), 'check data size') -- check cloning the bytedata local cloneddata = data:clone() test:assertObject(cloneddata) test:assertEquals('helloworld', cloneddata:getString(), 'check cloned data') test:assertEquals(10, cloneddata:getSize(), 'check cloned size') -- check pointer access if allowed if data:getFFIPointer() ~= nil and ffi ~= nil then local pointer = data:getFFIPointer() local ptr = ffi.cast('uint8_t*', pointer) local byte5 = ptr[4] test:assertEquals('o', byte5) end -- check overwriting the byte data string data:setString('love!', 5) test:assertEquals('hellolove!', data:getString(), 'check change string') end -- CompressedData (love.data.compress) love.test.data.CompressedData = function(test) -- create new compressed data local cdata = love.data.compress('data', 'zlib', 'helloworld', -1) test:assertObject(cdata) test:assertEquals('zlib', cdata:getFormat(), 'check format used') -- check properties match expected test:assertEquals(18, cdata:getSize()) test:assertEquals('helloworld', love.data.decompress('data', cdata):getString()) -- check cloning the data local clonedcdata = cdata:clone() test:assertObject(clonedcdata) test:assertEquals('zlib', clonedcdata:getFormat()) test:assertEquals(18, clonedcdata:getSize()) test:assertEquals('helloworld', love.data.decompress('data', clonedcdata):getString()) end -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- ------------------------------------METHODS------------------------------------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -- love.data.compress love.test.data.compress = function(test) -- here just testing each combo 'works' - in decompress's test method -- we actually check the compress + decompress give the right value back local compressions = { { love.data.compress('string', 'lz4', 'helloworld', -1), 'string'}, { love.data.compress('string', 'lz4', 'helloworld', 0), 'string'}, { love.data.compress('string', 'lz4', 'helloworld', 9), 'string'}, { love.data.compress('string', 'zlib', 'helloworld', -1), 'string'}, { love.data.compress('string', 'zlib', 'helloworld', 0), 'string'}, { love.data.compress('string', 'zlib', 'helloworld', 9), 'string'}, { love.data.compress('string', 'gzip', 'helloworld', -1), 'string'}, { love.data.compress('string', 'gzip', 'helloworld', 0), 'string'}, { love.data.compress('string', 'gzip', 'helloworld', 9), 'string'}, { love.data.compress('string', 'deflate', 'aaaaaa', 1), 'string'}, { love.data.compress('string', 'deflate', 'heloworld', -1), 'string'}, { love.data.compress('string', 'deflate', 'heloworld', 0), 'string'}, { love.data.compress('string', 'deflate', 'heloworld', 9), 'string'}, { love.data.compress('data', 'lz4', 'helloworld', -1), 'userdata'}, { love.data.compress('data', 'lz4', 'helloworld', 0), 'userdata'}, { love.data.compress('data', 'lz4', 'helloworld', 9), 'userdata'}, { love.data.compress('data', 'zlib', 'helloworld', -1), 'userdata'}, { love.data.compress('data', 'zlib', 'helloworld', 0), 'userdata'}, { love.data.compress('data', 'zlib', 'helloworld', 9), 'userdata'}, { love.data.compress('data', 'gzip', 'helloworld', -1), 'userdata'}, { love.data.compress('data', 'gzip', 'helloworld', 0), 'userdata'}, { love.data.compress('data', 'gzip', 'helloworld', 9), 'userdata'}, { love.data.compress('data', 'deflate', 'heloworld', -1), 'userdata'}, { love.data.compress('data', 'deflate', 'heloworld', 0), 'userdata'}, { love.data.compress('data', 'deflate', 'heloworld', 9), 'userdata'}, } for c=1,#compressions do test:assertNotNil(compressions[c][1]) -- sense check return type and make sure bytedata returns are an object test:assertEquals(compressions[c][2], type(compressions[c][1]), 'check is userdata') if compressions[c][2] == 'userdata' then test:assertNotEquals(nil, compressions[c][1]:type(), 'check has :type()') end end end -- love.data.decode love.test.data.decode = function(test) -- setup encoded strings local str1 = love.data.encode('string', 'base64', 'helloworld', 0) local str2 = love.data.encode('string', 'hex', 'helloworld') local str3 = love.data.encode('data', 'base64', 'helloworld', 0) local str4 = love.data.encode('data', 'hex', 'helloworld') -- check value matches expected when decoded back test:assertEquals('helloworld', love.data.decode('string', 'base64', str1), 'check string base64 decode') test:assertEquals('helloworld', love.data.decode('string', 'hex', str2), 'check string hex decode') test:assertEquals(love.data.newByteData('helloworld'):getString(), love.data.decode('data', 'base64', str3):getString(), 'check data base64 decode') test:assertEquals(love.data.newByteData('helloworld'):getString(), love.data.decode('data', 'hex', str4):getString(), 'check data hex decode') end -- love.data.decompress love.test.data.decompress = function(test) -- setup compressed data for each combination local str1 = love.data.compress('string', 'lz4', 'helloworld', -1) local str2 = love.data.compress('string', 'lz4', 'helloworld', 0) local str3 = love.data.compress('string', 'lz4', 'helloworld', 9) local str4 = love.data.compress('string', 'zlib', 'helloworld', -1) local str5 = love.data.compress('string', 'zlib', 'helloworld', 0) local str6 = love.data.compress('string', 'zlib', 'helloworld', 9) local str7 = love.data.compress('string', 'gzip', 'helloworld', -1) local str8 = love.data.compress('string', 'gzip', 'helloworld', 0) local str9 = love.data.compress('string', 'gzip', 'helloworld', 9) local str10 = love.data.compress('data', 'lz4', 'helloworld', -1) local str11 = love.data.compress('data', 'lz4', 'helloworld', 0) local str12 = love.data.compress('data', 'lz4', 'helloworld', 9) local str13 = love.data.compress('data', 'zlib', 'helloworld', -1) local str14 = love.data.compress('data', 'zlib', 'helloworld', 0) local str15 = love.data.compress('data', 'zlib', 'helloworld', 9) local str16 = love.data.compress('data', 'gzip', 'helloworld', -1) local str17 = love.data.compress('data', 'gzip', 'helloworld', 0) local str18 = love.data.compress('data', 'gzip', 'helloworld', 9) -- check decompressed value matches whats expected test:assertEquals('helloworld', love.data.decompress('string', 'lz4', str1), 'check string lz4 decompress') test:assertEquals('helloworld', love.data.decompress('string', 'lz4', str2), 'check string lz4 decompress') test:assertEquals('helloworld', love.data.decompress('string', 'lz4', str3), 'check string lz4 decompress') test:assertEquals('helloworld', love.data.decompress('string', 'zlib', str4), 'check string zlib decompress') test:assertEquals('helloworld', love.data.decompress('string', 'zlib', str5), 'check string zlib decompress') test:assertEquals('helloworld', love.data.decompress('string', 'zlib', str6), 'check string zlib decompress') test:assertEquals('helloworld', love.data.decompress('string', 'gzip', str7), 'check string glib decompress') test:assertEquals('helloworld', love.data.decompress('string', 'gzip', str8), 'check string glib decompress') test:assertEquals('helloworld', love.data.decompress('string', 'gzip', str9), 'check string glib decompress') test:assertEquals(love.data.newByteData('helloworld'):getString(), love.data.decompress('data', 'lz4', str10):getString(), 'check data lz4 decompress') test:assertEquals(love.data.newByteData('helloworld'):getString(), love.data.decompress('data', 'lz4', str11):getString(), 'check data lz4 decompress') test:assertEquals(love.data.newByteData('helloworld'):getString(), love.data.decompress('data', 'lz4', str12):getString(), 'check data lz4 decompress') test:assertEquals(love.data.newByteData('helloworld'):getString(), love.data.decompress('data', 'zlib', str13):getString(), 'check data zlib decompress') test:assertEquals(love.data.newByteData('helloworld'):getString(), love.data.decompress('data', 'zlib', str14):getString(), 'check data zlib decompress') test:assertEquals(love.data.newByteData('helloworld'):getString(), love.data.decompress('data', 'zlib', str15):getString(), 'check data zlib decompress') test:assertEquals(love.data.newByteData('helloworld'):getString(), love.data.decompress('data', 'gzip', str16):getString(), 'check data glib decompress') test:assertEquals(love.data.newByteData('helloworld'):getString(), love.data.decompress('data', 'gzip', str17):getString(), 'check data glib decompress') test:assertEquals(love.data.newByteData('helloworld'):getString(), love.data.decompress('data', 'gzip', str18):getString(), 'check data glib decompress') end -- love.data.encode love.test.data.encode = function(test) -- here just testing each combo 'works' - in decode's test method -- we actually check the encode + decode give the right value back local encodes = { { love.data.encode('string', 'base64', 'helloworld', 0), 'string'}, { love.data.encode('string', 'base64', 'helloworld', 2), 'string'}, { love.data.encode('string', 'hex', 'helloworld'), 'string'}, { love.data.encode('data', 'base64', 'helloworld', 0), 'userdata'}, { love.data.encode('data', 'base64', 'helloworld', 2), 'userdata'}, { love.data.encode('data', 'hex', 'helloworld'), 'userdata'} } for e=1,#encodes do test:assertNotNil(encodes[e][1]) -- sense check return type and make sure bytedata returns are an object test:assertEquals(encodes[e][2], type(encodes[e][1]), 'check is usedata') if encodes[e][2] == 'userdata' then test:assertNotEquals(nil, encodes[e][1]:type(), 'check has :type()') end end end -- love.data.getPackedSize love.test.data.getPackedSize = function(test) local pack1 = love.data.getPackedSize('>xI3b') local pack2 = love.data.getPackedSize('>I2B') local pack3 = love.data.getPackedSize('>I4I4I4I4x') test:assertEquals(5, pack1, 'check pack size 1') test:assertEquals(3, pack2, 'check pack size 2') test:assertEquals(17, pack3, 'check pack size 3') end -- love.data.hash love.test.data.hash = function(test) -- setup all the different hashing types local str1 = love.data.hash('string', 'md5', 'helloworld') local str2 = love.data.hash('string', 'sha1', 'helloworld') local str3 = love.data.hash('string', 'sha224', 'helloworld') local str4 = love.data.hash('string', 'sha256', 'helloworld') local str5 = love.data.hash('string', 'sha384', 'helloworld') local str6 = love.data.hash('string', 'sha512', 'helloworld') local data1 = love.data.hash('data', 'md5', 'helloworld') local data2 = love.data.hash('data', 'sha1', 'helloworld') local data3 = love.data.hash('data', 'sha224', 'helloworld') local data4 = love.data.hash('data', 'sha256', 'helloworld') local data5 = love.data.hash('data', 'sha384', 'helloworld') local data6 = love.data.hash('data', 'sha512', 'helloworld') -- check encoded hash value matches what's expected for that algo -- test container string test:assertEquals('fc5e038d38a57032085441e7fe7010b0', love.data.encode("string", "hex", str1), 'check string md5 encode') test:assertEquals('6adfb183a4a2c94a2f92dab5ade762a47889a5a1', love.data.encode("string", "hex", str2), 'check string sha1 encode') test:assertEquals('b033d770602994efa135c5248af300d81567ad5b59cec4bccbf15bcc', love.data.encode("string", "hex", str3), 'check string sha224 encode') test:assertEquals('936a185caaa266bb9cbe981e9e05cb78cd732b0b3280eb944412bb6f8f8f07af', love.data.encode("string", "hex", str4), 'check string sha256 encode') test:assertEquals('97982a5b1414b9078103a1c008c4e3526c27b41cdbcf80790560a40f2a9bf2ed4427ab1428789915ed4b3dc07c454bd9', love.data.encode("string", "hex", str5), 'check string sha384 encode') test:assertEquals('1594244d52f2d8c12b142bb61f47bc2eaf503d6d9ca8480cae9fcf112f66e4967dc5e8fa98285e36db8af1b8ffa8b84cb15e0fbcf836c3deb803c13f37659a60', love.data.encode("string", "hex", str6), 'check string sha512 encode') -- test container data test:assertEquals('fc5e038d38a57032085441e7fe7010b0', love.data.encode("string", "hex", data1), 'check data md5 encode') test:assertEquals('6adfb183a4a2c94a2f92dab5ade762a47889a5a1', love.data.encode("string", "hex", data2), 'check data sha1 encode') test:assertEquals('b033d770602994efa135c5248af300d81567ad5b59cec4bccbf15bcc', love.data.encode("string", "hex", data3), 'check data sha224 encode') test:assertEquals('936a185caaa266bb9cbe981e9e05cb78cd732b0b3280eb944412bb6f8f8f07af', love.data.encode("string", "hex", data4), 'check data sha256 encode') test:assertEquals('97982a5b1414b9078103a1c008c4e3526c27b41cdbcf80790560a40f2a9bf2ed4427ab1428789915ed4b3dc07c454bd9', love.data.encode("string", "hex", data5), 'check data sha384 encode') test:assertEquals('1594244d52f2d8c12b142bb61f47bc2eaf503d6d9ca8480cae9fcf112f66e4967dc5e8fa98285e36db8af1b8ffa8b84cb15e0fbcf836c3deb803c13f37659a60', love.data.encode("string", "hex", data6), 'check data sha512 encode') end -- love.data.newByteData -- @NOTE this is just basic nil checking, objs have their own test method love.test.data.newByteData = function(test) test:assertObject(love.data.newByteData('helloworld')) end -- love.data.newDataView -- @NOTE this is just basic nil checking, objs have their own test method love.test.data.newDataView = function(test) test:assertObject(love.data.newDataView(love.data.newByteData('helloworld'), 0, 10)) end -- love.data.pack love.test.data.pack = function(test) local packed1 = love.data.pack('string', '>I4I4I4I4', 9999, 1000, 1010, 2030) local packed2 = love.data.pack('data', '>I4I4I4I4', 9999, 1000, 1010, 2030) local a, b, c, d = love.data.unpack('>I4I4I4I4', packed1) local e, f, g, h = love.data.unpack('>I4I4I4I4', packed2) test:assertEquals(9999+9999, a+e, 'check packed 1') test:assertEquals(1000+1000, b+f, 'check packed 2') test:assertEquals(1010+1010, c+g, 'check packed 3') test:assertEquals(2030+2030, d+h, 'check packed 4') end -- love.data.unpack love.test.data.unpack = function(test) local packed1 = love.data.pack('string', '>s5s4I3', 'hello', 'love', 100) local packed2 = love.data.pack('data', '>s5I2', 'world', 20) local a, b, c = love.data.unpack('>s5s4I3', packed1) local d, e = love.data.unpack('>s5I2', packed2) test:assertEquals(a .. ' ' .. d, 'hello world', 'check unpack 1') test:assertEquals(b, 'love', 'check unpack 2') test:assertEquals(c - e, 80, 'check unpack 3') end ================================================ FILE: testing/tests/event.lua ================================================ -- love.event -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- ------------------------------------METHODS------------------------------------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -- love.event.clear love.test.event.clear = function(test) -- push some events first love.event.push('test', 1, 2, 3) love.event.push('test', 1, 2, 3) love.event.push('test', 1, 2, 3) -- check after calling clear there are no events left love.event.clear() local count = 0 for n, a, b, c, d, e, f in love.event.poll() do count = count + 1 end test:assertEquals(0, count, 'check no events') end -- love.event.poll love.test.event.poll = function(test) -- push some events first love.event.push('test', 1, 2, 3) love.event.push('test', 1, 2, 3) love.event.push('test', 1, 2, 3) -- check poll recieves all events local count = 0 for n, a, b, c, d, e, f in love.event.poll() do count = count + 1 end test:assertEquals(3, count, 'check 3 events') end -- love.event.pump -- @NOTE dont think can really test as internally used love.test.event.pump = function(test) test:skipTest('used internally') end -- love.event.push love.test.event.push = function(test) -- check pushing some different types love.event.push('add', 1, 2, 3) love.event.push('ignore', 1, 2, 3) love.event.push('add', 1, 2, 3) love.event.push('ignore', 1, 2, 3) local count = 0 for n, a, b, c, d, e, f in love.event.poll() do if n == 'add' then count = count + a + b + c end end test:assertEquals(12, count, 'check total events') end -- love.event.quit love.test.event.quit = function(test) -- setting this overrides the quit hook to prevent actually quitting love.test.module.fakequit = true love.event.quit(0) -- if it failed we'd have quit here test:assertTrue(true, 'check quit hook called') end -- love.event.wait -- @NOTE not sure best way to test this one love.test.event.wait = function(test) test:skipTest('used internally') end ================================================ FILE: testing/tests/filesystem.lua ================================================ -- love.filesystem -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- ------------------------------------OBJECTS------------------------------------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -- File (love.filesystem.newFile) love.test.filesystem.File = function(test) -- setup a file to play with local file1 = love.filesystem.openFile('data.txt', 'w') file1:write('helloworld') test:assertObject(file1) file1:close() -- test read mode file1:open('r') test:assertEquals('r', file1:getMode(), 'check read mode') local contents, size = file1:read() test:assertEquals('helloworld', contents) test:assertEquals(10, size, 'check file read') test:assertEquals(10, file1:getSize()) local ok1, err1 = file1:write('hello') test:assertNotEquals(nil, err1, 'check cant write in read mode') local iterator = file1:lines() test:assertNotEquals(nil, iterator, 'check can read lines') test:assertEquals('data.txt', file1:getFilename(), 'check filename matches') file1:close() -- test write mode file1:open('w') test:assertEquals('w', file1:getMode(), 'check write mode') contents, size = file1:read() test:assertEquals(nil, contents, 'check cant read file in write mode') test:assertEquals('string', type(size), 'check err message shown') local ok2, err2 = file1:write('helloworld') test:assertTrue(ok2, 'check file write') test:assertEquals(nil, err2, 'check no err writing') -- test open/closing file1:open('r') test:assertTrue(file1:isOpen(), 'check file is open') file1:close() test:assertFalse(file1:isOpen(), 'check file gets closed') file1:close() -- test buffering and flushing file1:open('w') local ok3, err3 = file1:setBuffer('full', 10000) test:assertTrue(ok3) test:assertEquals('full', file1:getBuffer()) file1:write('replacedcontent') file1:flush() file1:close() file1:open('r') contents, size = file1:read() test:assertEquals('replacedcontent', contents, 'check buffered content was written') file1:close() -- loop through file data with seek/tell until EOF file1:open('r') local counter = 0 for i=1,100 do file1:seek(i) test:assertEquals(i, file1:tell()) if file1:isEOF() == true then counter = i break end end test:assertEquals(counter, 15) file1:close() end -- FileData (love.filesystem.newFileData) love.test.filesystem.FileData = function(test) -- create new obj local fdata = love.filesystem.newFileData('helloworld', 'test.txt') test:assertObject(fdata) test:assertEquals('test.txt', fdata:getFilename()) test:assertEquals('txt', fdata:getExtension()) -- check properties match expected test:assertEquals('helloworld', fdata:getString(), 'check data string') test:assertEquals(10, fdata:getSize(), 'check data size') -- check cloning the bytedata local clonedfdata = fdata:clone() test:assertObject(clonedfdata) test:assertEquals('helloworld', clonedfdata:getString(), 'check cloned data') test:assertEquals(10, clonedfdata:getSize(), 'check cloned size') end -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- ------------------------------------METHODS------------------------------------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -- love.filesystem.append love.test.filesystem.append = function(test) -- create a new file to test with love.filesystem.write('filesystem.append.txt', 'foo') -- try appending text and check new file contents/size matches local success, message = love.filesystem.append('filesystem.append.txt', 'bar') test:assertNotEquals(false, success, 'check success') test:assertEquals(nil, message, 'check no error msg') local contents, size = love.filesystem.read('filesystem.append.txt') test:assertEquals(contents, 'foobar', 'check file contents') test:assertEquals(size, 6, 'check file size') -- check appending a specific no. of bytes love.filesystem.append('filesystem.append.txt', 'foobarfoobarfoo', 6) contents, size = love.filesystem.read('filesystem.append.txt') test:assertEquals(contents, 'foobarfoobar', 'check appended contents') test:assertEquals(size, 12, 'check appended size') -- cleanup love.filesystem.remove('filesystem.append.txt') end -- love.filesystem.areSymlinksEnabled -- @NOTE best can do here is just check not nil love.test.filesystem.areSymlinksEnabled = function(test) test:assertNotNil(love.filesystem.areSymlinksEnabled()) end -- love.filesystem.createDirectory love.test.filesystem.createDirectory = function(test) -- try creating a dir + subdir and check both exist local success = love.filesystem.createDirectory('foo/bar') test:assertNotEquals(false, success, 'check success') test:assertNotEquals(nil, love.filesystem.getInfo('foo', 'directory'), 'check directory created') test:assertNotEquals(nil, love.filesystem.getInfo('foo/bar', 'directory'), 'check subdirectory created') -- cleanup love.filesystem.remove('foo/bar') love.filesystem.remove('foo') end -- love.filesystem.getAppdataDirectory -- @NOTE i think this is too platform dependent to be tested nicely love.test.filesystem.getAppdataDirectory = function(test) test:assertNotNil(love.filesystem.getAppdataDirectory()) end -- love.filesystem.getCRequirePath love.test.filesystem.getCRequirePath = function(test) -- check default value from documentation test:assertEquals('??', love.filesystem.getCRequirePath(), 'check default value') end -- love.filesystem.getDirectoryItems love.test.filesystem.getDirectoryItems = function(test) -- create a dir + subdir with 2 files love.filesystem.createDirectory('foo/bar') love.filesystem.write('foo/file1.txt', 'file1') love.filesystem.write('foo/bar/file2.txt', 'file2') -- check both the file + subdir exist in the item list local files = love.filesystem.getDirectoryItems('foo') local hasfile = false local hasdir = false for _,v in ipairs(files) do local info = love.filesystem.getInfo('foo/'..v) if v == 'bar' and info.type == 'directory' then hasdir = true end if v == 'file1.txt' and info.type == 'file' then hasfile = true end end test:assertTrue(hasfile, 'check file exists') test:assertTrue(hasdir, 'check directory exists') -- cleanup love.filesystem.remove('foo/file1.txt') love.filesystem.remove('foo/bar/file2.txt') love.filesystem.remove('foo/bar') love.filesystem.remove('foo') end -- love.filesystem.getFullCommonPath love.test.filesystem.getFullCommonPath = function(test) -- check standard paths local appsavedir = love.filesystem.getFullCommonPath('appsavedir') local appdocuments = love.filesystem.getFullCommonPath('appdocuments') local userhome = love.filesystem.getFullCommonPath('userhome') local userappdata = love.filesystem.getFullCommonPath('userappdata') local userdesktop = love.filesystem.getFullCommonPath('userdesktop') local userdocuments = love.filesystem.getFullCommonPath('userdocuments') test:assertNotNil(appsavedir) test:assertNotNil(appdocuments) test:assertNotNil(userhome) test:assertNotNil(userappdata) test:assertNotNil(userdesktop) test:assertNotNil(userdocuments) -- check invalid path local ok = pcall(love.filesystem.getFullCommonPath, 'fakepath') test:assertFalse(ok, 'check invalid common path') end -- love.filesystem.getIdentity love.test.filesystem.getIdentity = function(test) -- check setting identity matches local original = love.filesystem.getIdentity() love.filesystem.setIdentity('lover') test:assertEquals('lover', love.filesystem.getIdentity(), 'check identity matches') -- put back to original value love.filesystem.setIdentity(original) end -- love.filesystem.getRealDirectory love.test.filesystem.getRealDirectory = function(test) -- make a test dir + file first love.filesystem.createDirectory('foo') love.filesystem.write('foo/test.txt', 'test') -- check save dir matches the real dir we just wrote to test:assertEquals(love.filesystem.getSaveDirectory(), love.filesystem.getRealDirectory('foo/test.txt'), 'check directory matches') -- cleanup love.filesystem.remove('foo/test.txt') love.filesystem.remove('foo') end -- love.filesystem.getRequirePath love.test.filesystem.getRequirePath = function(test) test:assertEquals('?.lua;?/init.lua', love.filesystem.getRequirePath(), 'check default value') end -- love.filesystem.getSource -- @NOTE i dont think we can test this cos love calls it first love.test.filesystem.getSource = function(test) test:skipTest('used internally') end -- love.filesystem.getSourceBaseDirectory -- @NOTE i think this is too platform dependent to be tested nicely love.test.filesystem.getSourceBaseDirectory = function(test) test:assertNotNil(love.filesystem.getSourceBaseDirectory()) end -- love.filesystem.getUserDirectory -- @NOTE i think this is too platform dependent to be tested nicely love.test.filesystem.getUserDirectory = function(test) test:assertNotNil(love.filesystem.getUserDirectory()) end -- love.filesystem.getWorkingDirectory -- @NOTE i think this is too platform dependent to be tested nicely love.test.filesystem.getWorkingDirectory = function(test) test:assertNotNil(love.filesystem.getWorkingDirectory()) end -- love.filesystem.getSaveDirectory -- @NOTE i think this is too platform dependent to be tested nicely love.test.filesystem.getSaveDirectory = function(test) test:assertNotNil(love.filesystem.getSaveDirectory()) end -- love.filesystem.getInfo love.test.filesystem.getInfo = function(test) -- create a dir and subdir with a file love.filesystem.createDirectory('foo/bar') love.filesystem.write('foo/bar/file2.txt', 'file2') -- check getinfo returns the correct values test:assertEquals(nil, love.filesystem.getInfo('foo/bar/file2.txt', 'directory'), 'check not directory') test:assertNotEquals(nil, love.filesystem.getInfo('foo/bar/file2.txt'), 'check info not nil') test:assertEquals(love.filesystem.getInfo('foo/bar/file2.txt').size, 5, 'check info size match') test:assertFalse(love.filesystem.getInfo('foo/bar/file2.txt').readonly, 'check readonly') -- @TODO test modified timestamp from info.modtime? -- cleanup love.filesystem.remove('foo/bar/file2.txt') love.filesystem.remove('foo/bar') love.filesystem.remove('foo') end -- love.filesystem.isFused love.test.filesystem.isFused = function(test) -- kinda assuming you'd run the testsuite in a non-fused game test:assertEquals(love.filesystem.isFused(), false, 'check not fused') end -- love.filesystem.lines love.test.filesystem.lines = function(test) -- check lines returns the 3 lines expected love.filesystem.write('file.txt', 'line1\nline2\nline3') local linenum = 1 for line in love.filesystem.lines('file.txt') do test:assertEquals('line' .. tostring(linenum), line, 'check line matches') -- also check it removes newlines like the docs says it does test:assertEquals(nil, string.find(line, '\n'), 'check newline removed') linenum = linenum + 1 end -- cleanup love.filesystem.remove('file.txt') end -- love.filesystem.load love.test.filesystem.load = function(test) -- setup some fake lua files love.filesystem.write('test1.lua', 'function test()\nreturn 1\nend\nreturn test()') love.filesystem.write('test2.lua', 'function test()\nreturn 1') if test:isAtLeastLuaVersion(5.2) or test:isLuaJITEnabled() then -- check file that doesn't exist local chunk1, errormsg1 = love.filesystem.load('faker.lua', 'b') test:assertEquals(nil, chunk1, 'check file doesnt exist') -- check valid lua file (text load) local chunk2, errormsg2 = love.filesystem.load('test1.lua', 't') test:assertEquals(nil, errormsg2, 'check no error message') test:assertEquals(1, chunk2(), 'check lua file runs') else local _, errormsg3 = love.filesystem.load('test1.lua', 'b') test:assertNotEquals(nil, errormsg3, 'check for an error message') local _, errormsg4 = love.filesystem.load('test1.lua', 't') test:assertNotEquals(nil, errormsg4, 'check for an error message') end -- check valid lua file (any load) local chunk5, errormsg5 = love.filesystem.load('test1.lua', 'bt') test:assertEquals(nil, errormsg5, 'check no error message') test:assertEquals(1, chunk5(), 'check lua file runs') -- check invalid lua file local ok, chunk, err = pcall(love.filesystem.load, 'test2.lua') test:assertFalse(ok, 'check invalid lua file') -- cleanup love.filesystem.remove('test1.lua') love.filesystem.remove('test2.lua') end -- love.filesystem.mount love.test.filesystem.mount = function(test) -- write an example zip to savedir to use local contents, size = love.filesystem.read('resources/test.zip') -- contains test.txt love.filesystem.write('test.zip', contents, size) -- check mounting file and check contents are mounted local success = love.filesystem.mount('test.zip', 'test') test:assertTrue(success, 'check success') test:assertNotEquals(nil, love.filesystem.getInfo('test'), 'check mount not nil') test:assertEquals('directory', love.filesystem.getInfo('test').type, 'check directory made') test:assertNotEquals(nil, love.filesystem.getInfo('test/test.txt'), 'check file not nil') test:assertEquals('file', love.filesystem.getInfo('test/test.txt').type, 'check file type') -- cleanup love.filesystem.remove('test/test.txt') love.filesystem.remove('test') love.filesystem.remove('test.zip') end -- love.filesystem.mountFullPath love.test.filesystem.mountFullPath = function(test) -- mount something in the working directory local mount = love.filesystem.mountFullPath(love.filesystem.getSource() .. '/tests', 'tests', 'read') test:assertTrue(mount, 'check can mount') -- check reading file through mounted path label local contents, _ = love.filesystem.read('tests/audio.lua') test:assertNotEquals(nil, contents) local unmount = love.filesystem.unmountFullPath(love.filesystem.getSource() .. '/tests') test:assertTrue(unmount, 'reset mount') end -- love.filesystem.unmountFullPath love.test.filesystem.unmountFullPath = function(test) -- try unmounting something we never mounted local unmount1 = love.filesystem.unmountFullPath(love.filesystem.getSource() .. '/faker') test:assertFalse(unmount1, 'check not mounted to start with') -- mount something to unmount after love.filesystem.mountFullPath(love.filesystem.getSource() .. '/tests', 'tests', 'read') local unmount2 = love.filesystem.unmountFullPath(love.filesystem.getSource() .. '/tests') test:assertTrue(unmount2, 'check unmounted') end -- love.filesystem.mountCommonPath love.test.filesystem.mountCommonPath = function(test) -- check if we can mount all the expected paths local mount1 = love.filesystem.mountCommonPath('appsavedir', 'appsavedir', 'readwrite') local mount2 = love.filesystem.mountCommonPath('appdocuments', 'appdocuments', 'readwrite') local mount3 = love.filesystem.mountCommonPath('userhome', 'userhome', 'readwrite') local mount4 = love.filesystem.mountCommonPath('userappdata', 'userappdata', 'readwrite') -- userdesktop isnt valid on linux if not test:isOS('Linux') then local mount5 = love.filesystem.mountCommonPath('userdesktop', 'userdesktop', 'readwrite') test:assertTrue(mount5, 'check mount userdesktop') end local mount6 = love.filesystem.mountCommonPath('userdocuments', 'userdocuments', 'readwrite') local ok = pcall(love.filesystem.mountCommonPath, 'fakepath', 'fake', 'readwrite') test:assertFalse(mount1, 'check mount appsavedir') -- This is already mounted, we can't do it again. test:assertTrue(mount2, 'check mount appdocuments') test:assertTrue(mount3, 'check mount userhome') test:assertTrue(mount4, 'check mount userappdata') test:assertTrue(mount6, 'check mount userdocuments') test:assertFalse(ok, 'check mount invalid common path fails') end -- love.filesystem.unmountCommonPath --love.test.filesystem.unmountCommonPath = function(test) -- -- check unmounting invalid -- local ok = pcall(love.filesystem.unmountCommonPath, 'fakepath') -- test:assertFalse(ok, 'check unmount invalid common path') -- -- check mounting valid paths -- love.filesystem.mountCommonPath('appsavedir', 'appsavedir', 'read') -- love.filesystem.mountCommonPath('appdocuments', 'appdocuments', 'read') -- love.filesystem.mountCommonPath('userhome', 'userhome', 'read') -- love.filesystem.mountCommonPath('userappdata', 'userappdata', 'read') -- love.filesystem.mountCommonPath('userdesktop', 'userdesktop', 'read') -- love.filesystem.mountCommonPath('userdocuments', 'userdocuments', 'read') -- local unmount1 = love.filesystem.unmountCommonPath('appsavedir') -- local unmount2 = love.filesystem.unmountCommonPath('appdocuments') -- local unmount3 = love.filesystem.unmountCommonPath('userhome') -- local unmount4 = love.filesystem.unmountCommonPath('userappdata') -- local unmount5 = love.filesystem.unmountCommonPath('userdesktop') -- local unmount6 = love.filesystem.unmountCommonPath('userdocuments') -- test:assertTrue(unmount1, 'check unmount appsavedir') -- test:assertTrue(unmount2, 'check unmount appdocuments') -- test:assertTrue(unmount3, 'check unmount userhome') -- test:assertTrue(unmount4, 'check unmount userappdata') -- test:assertTrue(unmount5, 'check unmount userdesktop') -- test:assertTrue(unmount6, 'check unmount userdocuments') -- -- remount or future tests fail -- love.filesystem.mountCommonPath('appsavedir', 'appsavedir', 'readwrite') -- love.filesystem.mountCommonPath('appdocuments', 'appdocuments', 'readwrite') -- love.filesystem.mountCommonPath('userhome', 'userhome', 'readwrite') -- love.filesystem.mountCommonPath('userappdata', 'userappdata', 'readwrite') -- love.filesystem.mountCommonPath('userdesktop', 'userdesktop', 'readwrite') -- love.filesystem.mountCommonPath('userdocuments', 'userdocuments', 'readwrite') --end -- love.filesystem.openFile -- @NOTE this is just basic nil checking, objs have their own test method love.test.filesystem.openFile = function(test) test:assertNotNil(love.filesystem.openFile('file2.txt', 'w')) test:assertNotNil(love.filesystem.openFile('file2.txt', 'r')) test:assertNotNil(love.filesystem.openFile('file2.txt', 'a')) test:assertNotNil(love.filesystem.openFile('file2.txt', 'c')) love.filesystem.remove('file2.txt') end -- love.filesystem.newFileData -- @NOTE this is just basic nil checking, objs have their own test method love.test.filesystem.newFileData = function(test) test:assertNotNil(love.filesystem.newFileData('helloworld', 'file1')) end -- love.filesystem.read love.test.filesystem.read = function(test) -- check reading a full file local content, size = love.filesystem.read('resources/test.txt') test:assertNotEquals(nil, content, 'check not nil') test:assertEquals('helloworld', content, 'check content match') test:assertEquals(10, size, 'check size match') -- check reading partial file content, size = love.filesystem.read('resources/test.txt', 5) test:assertNotEquals(nil, content, 'check not nil') test:assertEquals('hello', content, 'check content match') test:assertEquals(5, size, 'check size match') end -- love.filesystem.remove love.test.filesystem.remove = function(test) -- create a dir + subdir with a file love.filesystem.createDirectory('foo/bar') love.filesystem.write('foo/bar/file2.txt', 'helloworld') -- check removing files + dirs (should fail to remove dir if file inside) test:assertFalse(love.filesystem.remove('foo'), 'check fail when file inside') test:assertFalse(love.filesystem.remove('foo/bar'), 'check fail when file inside') test:assertTrue(love.filesystem.remove('foo/bar/file2.txt'), 'check file removed') test:assertTrue(love.filesystem.remove('foo/bar'), 'check subdirectory removed') test:assertTrue(love.filesystem.remove('foo'), 'check directory removed') -- cleanup not needed here hopefully... end -- love.filesystem.setCRequirePath love.test.filesystem.setCRequirePath = function(test) -- check setting path val is returned love.filesystem.setCRequirePath('/??') test:assertEquals('/??', love.filesystem.getCRequirePath(), 'check crequirepath value') love.filesystem.setCRequirePath('??') end -- love.filesystem.setIdentity love.test.filesystem.setIdentity = function(test) -- check setting identity val is returned local original = love.filesystem.getIdentity() love.filesystem.setIdentity('lover') test:assertEquals('lover', love.filesystem.getIdentity(), 'check indentity value') -- return value to original love.filesystem.setIdentity(original) end -- love.filesystem.setRequirePath love.test.filesystem.setRequirePath = function(test) -- check setting path val is returned love.filesystem.setRequirePath('?.lua;?/start.lua') test:assertEquals('?.lua;?/start.lua', love.filesystem.getRequirePath(), 'check require path') -- reset to default love.filesystem.setRequirePath('?.lua;?/init.lua') end -- love.filesystem.setSource love.test.filesystem.setSource = function(test) test:skipTest('used internally') end -- love.filesystem.unmount love.test.filesystem.unmount = function(test) -- create a zip file mounted to use local contents, size = love.filesystem.read('resources/test.zip') -- contains test.txt love.filesystem.write('test.zip', contents, size) love.filesystem.mount('test.zip', 'test') -- check mounted, unmount, then check its unmounted test:assertNotEquals(nil, love.filesystem.getInfo('test/test.txt'), 'check mount exists') love.filesystem.unmount('test.zip') test:assertEquals(nil, love.filesystem.getInfo('test/test.txt'), 'check unmounted') -- cleanup love.filesystem.remove('test/test.txt') love.filesystem.remove('test') love.filesystem.remove('test.zip') end -- love.filesystem.write love.test.filesystem.write = function(test) -- check writing a bunch of files matches whats read back love.filesystem.write('test1.txt', 'helloworld') love.filesystem.write('test2.txt', 'helloworld', 10) love.filesystem.write('test3.txt', 'helloworld', 5) test:assertEquals('helloworld', love.filesystem.read('test1.txt'), 'check read file') test:assertEquals('helloworld', love.filesystem.read('test2.txt'), 'check read all') test:assertEquals('hello', love.filesystem.read('test3.txt'), 'check read partial') -- cleanup love.filesystem.remove('test1.txt') love.filesystem.remove('test2.txt') love.filesystem.remove('test3.txt') end ================================================ FILE: testing/tests/font.lua ================================================ -- love.font -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- ------------------------------------OBJECTS------------------------------------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -- GlyphData (love.font.newGlyphData) love.test.font.GlyphData = function(test) -- create obj local rasterizer = love.font.newRasterizer('resources/font.ttf') local gdata = love.font.newGlyphData(rasterizer, 97) -- 'a' test:assertObject(gdata) -- check properties match expected test:assertNotNil(gdata:getString()) test:assertEquals(128, gdata:getSize(), 'check data size') test:assertEquals(9, gdata:getAdvance(), 'check advance') test:assertEquals('la8', gdata:getFormat(), 'check format') -- @TODO --[[ currently these will return 0 and '' respectively as not implemented https://github.com/love2d/love/blob/12.0-development/src/modules/font/freetype/TrueTypeRasterizer.cpp#L140-L141 "basically I haven't decided what to do here yet, because of the more advanced text shaping that happens in love 12 having a unicode codepoint associated with a glyph probably doesn't make sense in the first place" ]]-- --test:assertEquals(97, gdata:getGlyph(), 'check glyph number') - returns 0 --test:assertEquals('a', gdata:getGlyphString(), 'check glyph string') - returns '' -- check height + width test:assertEquals(8, gdata:getHeight(), 'check height') test:assertEquals(8, gdata:getWidth(), 'check width') -- check boundary / dimensions local x, y, w, h = gdata:getBoundingBox() local dw, dh = gdata:getDimensions() test:assertEquals(0, x, 'check bbox x') test:assertEquals(-3, y, 'check bbox y') test:assertEquals(8, w, 'check bbox w') test:assertEquals(14, h, 'check bbox h') test:assertEquals(8, dw, 'check dim width') test:assertEquals(8, dh, 'check dim height') -- check bearing local bw, bh = gdata:getBearing() test:assertEquals(0, bw, 'check bearing w') test:assertEquals(11, bh, 'check bearing h') end -- Rasterizer (love.font.newRasterizer) love.test.font.Rasterizer = function(test) -- create obj local rasterizer = love.font.newRasterizer('resources/font.ttf') test:assertObject(rasterizer) -- check advance test:assertEquals(9, rasterizer:getAdvance(), 'check advance') -- check ascent/descent test:assertEquals(9, rasterizer:getAscent(), 'check ascent') test:assertEquals(-3, rasterizer:getDescent(), 'check descent') -- check glyphcount test:assertEquals(77, rasterizer:getGlyphCount(), 'check glyph count') -- check specific glyphs test:assertObject(rasterizer:getGlyphData('L')) test:assertTrue(rasterizer:hasGlyphs('L', 'O', 'V', 'E'), 'check LOVE') -- check height + lineheight test:assertEquals(12, rasterizer:getHeight(), 'check height') test:assertEquals(15, rasterizer:getLineHeight(), 'check line height') end -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- ------------------------------------METHODS------------------------------------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -- love.font.newBMFontRasterizer love.test.font.newBMFontRasterizer = function(test) local rasterizer = love.font.newBMFontRasterizer('resources/love.png'); test:assertObject(rasterizer) end -- love.font.newGlyphData -- @NOTE this is just basic nil checking, objs have their own test method love.test.font.newGlyphData = function(test) local img = love.image.newImageData('resources/love.png') local rasterizer = love.font.newImageRasterizer(img, 'ABC', 0, 1); local glyphdata = love.font.newGlyphData(rasterizer, 65) test:assertObject(glyphdata) end -- love.font.newImageRasterizer -- @NOTE this is just basic nil checking, objs have their own test method love.test.font.newImageRasterizer = function(test) local img = love.image.newImageData('resources/love.png') local rasterizer = love.font.newImageRasterizer(img, 'ABC', 0, 1); test:assertObject(rasterizer) end -- love.font.newRasterizer -- @NOTE this is just basic nil checking, objs have their own test method love.test.font.newRasterizer = function(test) test:assertObject(love.font.newRasterizer('resources/font.ttf')) end -- love.font.newTrueTypeRasterizer -- @NOTE this is just basic nil checking, objs have their own test method love.test.font.newTrueTypeRasterizer = function(test) test:assertObject(love.font.newTrueTypeRasterizer(12, "normal", 1)) test:assertObject(love.font.newTrueTypeRasterizer('resources/font.ttf', 8, "normal", 1)) end ================================================ FILE: testing/tests/graphics.lua ================================================ -- love.graphics -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- ------------------------------------OBJECTS------------------------------------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -- GraphicsBuffer (love.graphics.newBuffer) love.test.graphics.Buffer = function(test) -- setup vertex data and create some buffers local vertexformat = { {name="VertexPosition", format="floatvec2", location=0}, {name="VertexTexCoord", format="floatvec2", location=1}, {name="VertexColor", format="unorm8vec4", location=2}, } local vertexdata = { {0, 0, 0, 0, 1, 0, 1, 1}, {10, 0, 1, 0, 0, 1, 1, 1}, {10, 10, 1, 1, 0, 0, 1, 1}, {0, 10, 0, 1, 1, 0, 0, 1}, } local flatvertexdata = {} for i, vert in ipairs(vertexdata) do for j, v in ipairs(vert) do table.insert(flatvertexdata, v) end end local vertexbuffer1 = love.graphics.newBuffer(vertexformat, 4, {vertex=true, debugname='testvertexbuffer'}) local vertexbuffer2 = love.graphics.newBuffer(vertexformat, vertexdata, {vertex=true}) test:assertObject(vertexbuffer1) test:assertObject(vertexbuffer2) -- check buffer properties test:assertEquals(4, vertexbuffer1:getElementCount(), 'check vertex count 1') test:assertEquals(4, vertexbuffer2:getElementCount(), 'check vertex count 2') -- vertex buffers have their elements tightly packed. test:assertEquals(20, vertexbuffer1:getElementStride(), 'check vertex array stride') test:assertEquals(20 * 4, vertexbuffer1:getSize(), 'check vertex buffer size') vertexbuffer1:setArrayData(vertexdata) vertexbuffer1:setArrayData(flatvertexdata) vertexbuffer1:clear(8, 8) -- partial clear (the first texcoord) -- check buffer types test:assertTrue(vertexbuffer1:isBufferType('vertex'), 'check is vertex buffer') test:assertFalse(vertexbuffer1:isBufferType('index'), 'check is not index buffer') test:assertFalse(vertexbuffer1:isBufferType('texel'), 'check is not texel buffer') test:assertFalse(vertexbuffer1:isBufferType('shaderstorage'), 'check is not shader storage buffer') -- check debug name test:assertEquals('testvertexbuffer', vertexbuffer1:getDebugName(), 'check buffer debug name') -- check buffer format and format properties local format = vertexbuffer1:getFormat() test:assertEquals('table', type(format), 'check buffer format is table') test:assertEquals(#vertexformat, #format, 'check buffer format length') for i, v in ipairs(vertexformat) do test:assertEquals(v.name, format[i].name, string.format('check buffer format %d name', i)) test:assertEquals(v.format, format[i].format, string.format('check buffer format %d format', i)) test:assertEquals(0, format[i].arraylength, string.format('check buffer format %d array length', i)) test:assertNotNil(format[i].offset) end -- check index buffer local indexbuffer = love.graphics.newBuffer('uint16', 128, {index=true}) test:assertTrue(indexbuffer:isBufferType('index'), 'check is index buffer') end -- Shader Storage GraphicsBuffer (love.graphics.newBuffer) -- Separated from the above test so we can skip it when they aren't supported. love.test.graphics.ShaderStorageBuffer = function(test) if not love.graphics.getSupported().glsl4 then test:skipTest('GLSL 4 and shader storage buffers are not supported on this system') return end -- setup buffer local format = { { name="1", format="float" }, { name="2", format="floatmat4x4" }, { name="3", format="floatvec2" } } local buffer = love.graphics.newBuffer(format, 1, {shaderstorage = true}) test:assertEquals(96, buffer:getElementStride(), 'check shader storage buffer element stride') -- set new data local data = {} for i = 1, 19 do data[i] = 0 end buffer:setArrayData(data) end -- Canvas (love.graphics.newCanvas) love.test.graphics.Canvas = function(test) -- create canvas with defaults local canvas = love.graphics.newCanvas(100, 100, { type = '2d', format = 'normal', readable = true, msaa = 0, dpiscale = love.graphics.getDPIScale(), mipmaps = 'auto', debugname = 'testcanvas' }) test:assertObject(canvas) test:assertTrue(canvas:isCanvas(), 'check is canvas') test:assertFalse(canvas:isComputeWritable(), 'check not compute writable') -- check dpi test:assertEquals(love.graphics.getDPIScale(), canvas:getDPIScale(), 'check dpi scale') -- check depth test:assertEquals(1, canvas:getDepth(), 'check depth is 2d') test:assertEquals(nil, canvas:getDepthSampleMode(), 'check depth sample nil') local maxanisotropy = love.graphics.getSystemLimits().anisotropy -- check fliter local min1, mag1, ani1 = canvas:getFilter() test:assertEquals('nearest', min1, 'check filter def min') test:assertEquals('nearest', mag1, 'check filter def mag') test:assertEquals(1, ani1, 'check filter def ani') canvas:setFilter('linear', 'linear', 2) local min2, mag2, ani2 = canvas:getFilter() test:assertEquals('linear', min2, 'check filter changed min') test:assertEquals('linear', mag2, 'check filter changed mag') test:assertEquals(math.min(maxanisotropy, 2), ani2, 'check filter changed ani') -- check layer test:assertEquals(1, canvas:getLayerCount(), 'check 1 layer for 2d') -- check texture type test:assertEquals('2d', canvas:getTextureType(), 'check 2d') -- check texture wrap local horiz1, vert1 = canvas:getWrap() test:assertEquals('clamp', horiz1, 'check def wrap h') test:assertEquals('clamp', vert1, 'check def wrap v') canvas:setWrap('repeat', 'repeat') local horiz2, vert2 = canvas:getWrap() test:assertEquals('repeat', horiz2, 'check changed wrap h') test:assertEquals('repeat', vert2, 'check changed wrap v') -- check readable test:assertTrue(canvas:isReadable(), 'check canvas readable') -- check msaa test:assertEquals(1, canvas:getMSAA(), 'check samples match') -- check dimensions local cw, ch = canvas:getDimensions() test:assertEquals(100, cw, 'check canvas dim w') test:assertEquals(100, ch, 'check canvas dim h') test:assertEquals(cw, canvas:getWidth(), 'check canvas w matches dim') test:assertEquals(ch, canvas:getHeight(), 'check canvas h matches dim') local pw, ph = canvas:getPixelDimensions() test:assertEquals(100*love.graphics.getDPIScale(), pw, 'check pixel dim w') test:assertEquals(100*love.graphics.getDPIScale(), ph, 'check pixel dim h') test:assertEquals(pw, canvas:getPixelWidth(), 'check pixel w matches dim') test:assertEquals(ph, canvas:getPixelHeight(), 'check pixel h matches dim') -- check mipmaps local mode, sharpness = canvas:getMipmapFilter() test:assertEquals('linear', mode, 'check def minmap filter mode') test:assertEquals(0, sharpness, 'check def minmap filter sharpness') local name, version, vendor, device = love.graphics.getRendererInfo() canvas:setMipmapFilter('nearest', 1) mode, sharpness = canvas:getMipmapFilter() test:assertEquals('nearest', mode, 'check changed minmap filter mode') -- @NOTE mipmap sharpness wont work on opengl/metal if string.match(name, 'OpenGL ES') == nil and string.match(name, 'Metal') == nil then test:assertEquals(1, sharpness, 'check changed minmap filter sharpness') end test:assertGreaterEqual(2, canvas:getMipmapCount()) -- docs say no mipmaps should return 1 test:assertEquals('auto', canvas:getMipmapMode()) -- check debug name test:assertEquals('testcanvas', canvas:getDebugName()) -- check basic rendering canvas:renderTo(function() love.graphics.setColor(1, 0, 0) love.graphics.rectangle('fill', 0, 0, 200, 200) love.graphics.setColor(1, 1, 1, 1) end) local imgdata1 = love.graphics.readbackTexture(canvas) test:compareImg(imgdata1) -- check using canvas in love.graphics.draw() local xcanvas = love.graphics.newCanvas() love.graphics.setCanvas(xcanvas) love.graphics.draw(canvas, 0, 0) love.graphics.setCanvas() local imgdata2 = love.graphics.readbackTexture(canvas) test:compareImg(imgdata2) -- check y-down local shader1 = love.graphics.newShader[[ vec4 effect(vec4 c, Image tex, vec2 tc, vec2 pc) { return tc.y > 0.5 ? vec4(1.0, 0.0, 0.0, 1.0) : vec4(0.0, 1.0, 0.0, 1.0); } ]] local shader2 = love.graphics.newShader[[ vec4 effect(vec4 c, Image tex, vec2 tc, vec2 pc) { // rounding during quantization from float to unorm8 doesn't seem to be // totally consistent across devices, lets do it ourselves. highp vec2 value = pc / love_ScreenSize.xy; highp vec2 quantized = (floor(255.0 * value + 0.5) + 0.1) / 255.0; return vec4(quantized, 0.0, 1.0); } ]] local img = love.graphics.newImage(love.image.newImageData(1, 1)) love.graphics.push("all") love.graphics.setCanvas(canvas) love.graphics.setShader(shader1) love.graphics.draw(img, 0, 0, 0, canvas:getDimensions()) love.graphics.pop() local imgdata3 = love.graphics.readbackTexture(canvas) test:compareImg(imgdata3) love.graphics.push("all") love.graphics.setCanvas(canvas) love.graphics.setShader(shader2) love.graphics.draw(img, 0, 0, 0, canvas:getDimensions()) love.graphics.pop() local imgdata4 = love.graphics.readbackTexture(canvas) test:compareImg(imgdata4) -- check depth samples local dcanvas = love.graphics.newCanvas(100, 100, { type = '2d', format = 'depth16', readable = true }) test:assertEquals(nil, dcanvas:getDepthSampleMode(), 'check depth sample mode nil by def') dcanvas:setDepthSampleMode('equal') test:assertEquals('equal', dcanvas:getDepthSampleMode(), 'check depth sample mode set') -- check compute writeable (wont work on opengl mac) if love.graphics.getSupported().glsl4 then local ccanvas = love.graphics.newCanvas(100, 100, { type = '2d', format = 'rgba8', computewrite = true }) test:assertTrue(ccanvas:isComputeWritable()) end end -- Font (love.graphics.newFont) love.test.graphics.Font = function(test) -- create obj local font = love.graphics.newFont('resources/font.ttf', 8) test:assertObject(font) -- check ascent/descent test:assertEquals(6, font:getAscent(), 'check ascent') test:assertEquals(-2, font:getDescent(), 'check descent') -- check baseline test:assertEquals(6, font:getBaseline(), 'check baseline') -- check dpi test:assertEquals(1, font:getDPIScale(), 'check dpi') -- check filter test:assertEquals('nearest', font:getFilter(), 'check filter def') font:setFilter('linear', 'linear') test:assertEquals('linear', font:getFilter(), 'check filter change') font:setFilter('nearest', 'nearest') -- check height + lineheight test:assertEquals(8, font:getHeight(), 'check height') test:assertEquals(1, font:getLineHeight(), 'check line height') font:setLineHeight(2) test:assertEquals(2, font:getLineHeight(), 'check changed line height') font:setLineHeight(1) -- reset for drawing + wrap later -- check width + kerning test:assertEquals(0, font:getKerning('a', 'b'), 'check kerning') test:assertEquals(24, font:getWidth('test'), 'check data size') -- check specific glyphs test:assertTrue(font:hasGlyphs('test'), 'check data size') -- check font wrapping local width, wrappedtext = font:getWrap('LÖVE is an *awesome* framework you can use to make 2D games in Lua.', 50) test:assertEquals(48, width, 'check actual wrap width') test:assertEquals(8, #wrappedtext, 'check wrapped lines') test:assertEquals('LÖVE is an ', wrappedtext[1], 'check wrapped line') -- check drawing font local canvas = love.graphics.newCanvas(16, 16) love.graphics.setCanvas(canvas) love.graphics.setFont(font) love.graphics.print('Aa', 0, 5) love.graphics.setCanvas() local imgdata = love.graphics.readbackTexture(canvas) test:compareImg(imgdata) -- check font substitution local fontab = love.graphics.newImageFont('resources/font-letters-ab.png', 'AB') local fontcd = love.graphics.newImageFont('resources/font-letters-cd.png', 'CD') fontab:setFallbacks(fontcd) love.graphics.setCanvas(canvas) love.graphics.clear(0, 0, 0, 0) love.graphics.setFont(fontab) love.graphics.print('AB', 0, 0) -- should come from fontab love.graphics.print('CD', 0, 9) -- should come from fontcd love.graphics.setCanvas() local imgdata2 = love.graphics.readbackTexture(canvas) test:compareImg(imgdata2) end -- Image (love.graphics.newImage) love.test.graphics.Image = function(test) -- create object local image = love.graphics.newImage('resources/love.png', { dpiscale = 1, mipmaps = true }) test:assertObject(image) test:assertFalse(image:isCanvas(), 'check not canvas') test:assertFalse(image:isComputeWritable(), 'check not compute writable') -- check dpi test:assertEquals(love.graphics.getDPIScale(), image:getDPIScale(), 'check dpi scale') -- check depth test:assertEquals(1, image:getDepth(), 'check depth is 2d') test:assertEquals(nil, image:getDepthSampleMode(), 'check depth sample nil') local maxanisotropy = love.graphics.getSystemLimits().anisotropy -- check filter local min1, mag1, ani1 = image:getFilter() test:assertEquals('nearest', min1, 'check filter def min') test:assertEquals('nearest', mag1, 'check filter def mag') test:assertEquals(1, ani1, 'check filter def ani') image:setFilter('linear', 'linear', 2) local min2, mag2, ani2 = image:getFilter() test:assertEquals('linear', min2, 'check filter changed min') test:assertEquals('linear', mag2, 'check filter changed mag') test:assertEquals(math.min(maxanisotropy, 2), ani2, 'check filter changed ani') image:setFilter('nearest', 'nearest', 1) -- check layers test:assertEquals(1, image:getLayerCount(), 'check 1 layer for 2d') -- check texture type test:assertEquals('2d', image:getTextureType(), 'check 2d') -- check texture wrapping local horiz1, vert1 = image:getWrap() test:assertEquals('clamp', horiz1, 'check def wrap h') test:assertEquals('clamp', vert1, 'check def wrap v') image:setWrap('repeat', 'repeat') local horiz2, vert2 = image:getWrap() test:assertEquals('repeat', horiz2, 'check changed wrap h') test:assertEquals('repeat', vert2, 'check changed wrap v') -- check readable test:assertTrue(image:isReadable(), 'check canvas readable') -- check msaa test:assertEquals(1, image:getMSAA(), 'check samples match') -- check dimensions local cw, ch = image:getDimensions() test:assertEquals(64, cw, 'check canvas dim w') test:assertEquals(64, ch, 'check canvas dim h') test:assertEquals(cw, image:getWidth(), 'check canvas w matches dim') test:assertEquals(ch, image:getHeight(), 'check canvas h matches dim') local pw, ph = image:getPixelDimensions() test:assertEquals(64*love.graphics.getDPIScale(), pw, 'check pixel dim w') test:assertEquals(64*love.graphics.getDPIScale(), ph, 'check pixel dim h') test:assertEquals(pw, image:getPixelWidth(), 'check pixel w matches dim') test:assertEquals(ph, image:getPixelHeight(), 'check pixel h matches dim') -- check mipmaps local mode, sharpness = image:getMipmapFilter() test:assertEquals('linear', mode, 'check def minmap filter mode') test:assertEquals(0, sharpness, 'check def minmap filter sharpness') local name, version, vendor, device = love.graphics.getRendererInfo() -- @note mipmap sharpness wont work on opengl/metal image:setMipmapFilter('nearest', 1) mode, sharpness = image:getMipmapFilter() test:assertEquals('nearest', mode, 'check changed minmap filter mode') if string.match(name, 'OpenGL ES') == nil and string.match(name, 'Metal') == nil then test:assertEquals(1, sharpness, 'check changed minmap filter sharpness') end test:assertGreaterEqual(2, image:getMipmapCount()) -- docs say no mipmaps should return 1? -- check image properties test:assertFalse(image:isCompressed(), 'check not compressed') test:assertFalse(image:isFormatLinear(), 'check not linear') local cimage = love.graphics.newImage('resources/love.dxt1') test:assertObject(cimage) test:assertTrue(cimage:isCompressed(), 'check is compressed') -- check pixel replacement local rimage = love.image.newImageData('resources/loveinv.png') image:replacePixels(rimage) local canvas = love.graphics.newCanvas(64, 64) love.graphics.setCanvas(canvas) love.graphics.draw(image, 0, 0) love.graphics.setCanvas() local imgdata = love.graphics.readbackTexture(canvas) local r1, g1, b1 = imgdata:getPixel(25, 25) test:assertEquals(3, r1+g1+b1, 'check back to white') test:compareImg(imgdata) end -- Mesh (love.graphics.newMesh) love.test.graphics.Mesh = function(test) -- create 2d mesh with pretty colors local image = love.graphics.newImage('resources/love.png') local vertices = { { 0, 0, 0, 0, 1, 0, 0 }, { image:getWidth(), 0, 1, 0, 0, 1, 0 }, { image:getWidth(), image:getHeight(), 1, 1, 0, 0, 1 }, { 0, image:getHeight(), 0, 1, 1, 1, 0 }, } local mesh1 = love.graphics.newMesh(vertices, 'fan') test:assertObject(mesh1) -- check draw mode test:assertEquals('fan', mesh1:getDrawMode(), 'check draw mode') mesh1:setDrawMode('triangles') test:assertEquals('triangles', mesh1:getDrawMode(), 'check draw mode set') -- check draw range local min1, max1 = mesh1:getDrawRange() test:assertEquals(nil, min1, 'check draw range not set') mesh1:setDrawRange(1, 10) local min2, max2 = mesh1:getDrawRange() test:assertEquals(1, min2, 'check draw range set min') test:assertEquals(10, max2, 'check draw range set max') -- check texture pointer test:assertEquals(nil, mesh1:getTexture(), 'check no texture') mesh1:setTexture(image) test:assertEquals(image:getHeight(), mesh1:getTexture():getHeight(), 'check texture match w') test:assertEquals(image:getWidth(), mesh1:getTexture():getWidth(), 'check texture match h') -- check vertext count test:assertEquals(4, mesh1:getVertexCount(), 'check vertex count') -- check def vertex format local format = mesh1:getVertexFormat() test:assertEquals('floatvec2', format[2].format, 'check def vertex format 2') test:assertEquals('VertexColor', format[3].name, 'check def vertex format 3') -- check vertext attributes test:assertTrue(mesh1:isAttributeEnabled('VertexPosition'), 'check def attribute VertexPosition') test:assertTrue(mesh1:isAttributeEnabled('VertexTexCoord'), 'check def attribute VertexTexCoord') test:assertTrue(mesh1:isAttributeEnabled('VertexColor'), 'check def attribute VertexColor') mesh1:setAttributeEnabled('VertexPosition', false) mesh1:setAttributeEnabled('VertexTexCoord', false) mesh1:setAttributeEnabled('VertexColor', false) test:assertFalse(mesh1:isAttributeEnabled('VertexPosition'), 'check disable attribute VertexPosition') test:assertFalse(mesh1:isAttributeEnabled('VertexTexCoord'), 'check disable attribute VertexTexCoord') test:assertFalse(mesh1:isAttributeEnabled('VertexColor'), 'check disable attribute VertexColor') -- check vertex itself local x1, y1, u1, v1, r1, g1, b1, a1 = mesh1:getVertex(1) test:assertEquals(0, x1, 'check vertex props x') test:assertEquals(0, y1, 'check vertex props y') test:assertEquals(0, u1, 'check vertex props u') test:assertEquals(0, v1, 'check vertex props v') test:assertEquals(1, r1, 'check vertex props r') test:assertEquals(0, g1, 'check vertex props g') test:assertEquals(0, b1, 'check vertex props b') test:assertEquals(1, a1, 'check vertex props a') -- check setting a specific vertex mesh1:setVertex(2, image:getWidth(), 0, 1, 0, 0, 1, 1, 1) local x2, y2, u2, v2, r2, g2, b2, a2 = mesh1:getVertex(2) test:assertEquals(image:getWidth(), x2, 'check changed vertex props x') test:assertEquals(0, y2, 'check changed vertex props y') test:assertEquals(1, u2, 'check changed vertex props u') test:assertEquals(0, v2, 'check changed vertex props v') test:assertEquals(0, r2, 'check changed vertex props r') test:assertEquals(1, g2, 'check changed vertex props g') test:assertEquals(1, b2, 'check changed vertex props b') test:assertEquals(1, a2, 'check changed vertex props a') -- check setting a specific vertex attribute local r3, g3, b3, a3 = mesh1:getVertexAttribute(3, 3) test:assertEquals(1, b3, 'check specific vertex color') mesh1:setVertexAttribute(4, 3, 1, 0, 1) local r4, g4, b4, a4 = mesh1:getVertexAttribute(4, 3) test:assertEquals(0, g4, 'check changed vertex color') -- check setting a vertice mesh1:setVertices(vertices) local r5, g5, b5, a5 = mesh1:getVertexAttribute(4, 3) local x6, y6, u6, v6, r6, g6, b6, a6 = mesh1:getVertex(2) test:assertEquals(1, g5, 'check reset vertex color 1') test:assertEquals(0, b5, 'check reset vertex color 2') -- check setting the vertex map local vmap1 = mesh1:getVertexMap() test:assertEquals(nil, vmap1, 'check no map by def') mesh1:setVertexMap({4, 1, 2, 3}) local vmap2 = mesh1:getVertexMap() test:assertEquals(4, #vmap2, 'check set map len') test:assertEquals(2, vmap2[3], 'check set map val') -- check using custom attributes local mesh2 = love.graphics.newMesh({ { name = 'VertexPosition', format = 'floatvec2', location = 0}, { name = 'VertexTexCoord', format = 'floatvec2', location = 1}, { name = 'VertexColor', format = 'floatvec4', location = 2}, { name = 'CustomValue1', format = 'floatvec2', location = 3}, { name = 'CustomValue2', format = 'uint16', location = 4} }, { { 0, 0, 0, 0, 1, 0, 0, 1, 2, 1, 1005 }, { image:getWidth(), 0, 1, 0, 0, 1, 0, 0, 2, 2, 2005 }, { image:getWidth(), image:getHeight(), 1, 1, 0, 0, 1, 0, 2, 3, 3005 }, { 0, image:getHeight(), 0, 1, 1, 1, 0, 0, 2, 4, 4005 }, }, 'fan') local c1, c2 = mesh2:getVertexAttribute(1, 4) local c3 = mesh2:getVertexAttribute(1, 5) test:assertEquals(2, c1, 'check custom attribute val 1') test:assertEquals(1, c2, 'check custom attribute val 2') test:assertEquals(1005, c3, 'check custom attribute val 3') -- check attaching custom attribute + detaching mesh1:attachAttribute('CustomValue1', mesh2) test:assertTrue(mesh1:isAttributeEnabled('CustomValue1'), 'check custom attribute attached') mesh1:detachAttribute('CustomValue1') local obj, err = pcall(mesh1.isAttributeEnabled, mesh1, 'CustomValue1') test:assertNotEquals(nil, err, 'check attribute detached') mesh1:detachAttribute('VertexPosition') test:assertTrue(mesh1:isAttributeEnabled('VertexPosition'), 'check cant detach def attribute') end -- ParticleSystem (love.graphics.newParticleSystem) love.test.graphics.ParticleSystem = function(test) -- create new system local image = love.graphics.newImage('resources/pixel.png') local quad1 = love.graphics.newQuad(0, 0, 1, 1, image) local quad2 = love.graphics.newQuad(0, 0, 1, 1, image) local psystem = love.graphics.newParticleSystem(image, 1000) test:assertObject(psystem) -- check psystem state properties psystem:start() psystem:update(1) test:assertTrue(psystem:isActive(), 'check active') test:assertFalse(psystem:isPaused(), 'checked not paused by def') test:assertFalse(psystem:hasRelativeRotation(), 'check rel rot def') psystem:pause() test:assertTrue(psystem:isPaused(), 'check now paused') test:assertFalse(psystem:isStopped(), 'check not stopped by def') psystem:stop() test:assertTrue(psystem:isStopped(), 'check now stopped') psystem:start() psystem:reset() -- check emitting some particles -- need to set a lifespan at minimum or none will be counted local min, max = psystem:getParticleLifetime() test:assertEquals(0, min, 'check def lifetime min') test:assertEquals(0, max, 'check def lifetime max') psystem:setParticleLifetime(1, 2) psystem:emit(10) psystem:update(1) test:assertEquals(10, psystem:getCount(), 'check added particles') psystem:reset() test:assertEquals(0, psystem:getCount(), 'check reset') -- check setting colors local colors1 = {psystem:getColors()} test:assertEquals(1, #colors1, 'check 1 color by def') psystem:setColors(1, 1, 1, 1, 1, 0, 0, 1) local colors2 = {psystem:getColors()} test:assertEquals(2, #colors2, 'check set colors') test:assertEquals(1, colors2[2][1], 'check set color') -- check setting direction test:assertEquals(0, psystem:getDirection(), 'check def direction') psystem:setDirection(90 * (math.pi/180)) test:assertEquals(math.floor(math.pi/2*100), math.floor(psystem:getDirection()*100), 'check set direction') -- check emission area options psystem:setEmissionArea('normal', 100, 50) psystem:setEmissionArea('ellipse', 100, 50) psystem:setEmissionArea('borderellipse', 100, 50) psystem:setEmissionArea('borderrectangle', 100, 50) psystem:setEmissionArea('none', 100, 50) psystem:setEmissionArea('uniform', 100, 50) local dist, dx, dy, angle, rel = psystem:getEmissionArea() test:assertEquals('uniform', dist, 'check emission area dist') test:assertEquals(100, dx, 'check emission area dx') test:assertEquals(50, dy, 'check emission area dy') test:assertEquals(0, angle, 'check emission area angle') test:assertFalse(rel, 'check emission area rel') -- check emission rate test:assertEquals(0, psystem:getEmissionRate(), 'check def emission rate') psystem:setEmissionRate(1) test:assertEquals(1, psystem:getEmissionRate(), 'check changed emission rate') -- check emission lifetime test:assertEquals(-1, psystem:getEmitterLifetime(), 'check def emitter life') psystem:setEmitterLifetime(10) test:assertEquals(10, psystem:getEmitterLifetime(), 'check changed emitter life') -- check insert mode test:assertEquals('top', psystem:getInsertMode(), 'check def insert mode') psystem:setInsertMode('bottom') psystem:setInsertMode('random') test:assertEquals('random', psystem:getInsertMode(), 'check change insert mode') -- check linear acceleration local xmin1, ymin1, xmax1, ymax1 = psystem:getLinearAcceleration() test:assertEquals(0, xmin1, 'check def lin acceleration xmin') test:assertEquals(0, ymin1, 'check def lin acceleration ymin') test:assertEquals(0, xmax1, 'check def lin acceleration xmax') test:assertEquals(0, ymax1, 'check def lin acceleration ymax') psystem:setLinearAcceleration(1, 2, 3, 4) local xmin2, ymin2, xmax2, ymax2 = psystem:getLinearAcceleration() test:assertEquals(1, xmin2, 'check change lin acceleration xmin') test:assertEquals(2, ymin2, 'check change lin acceleration ymin') test:assertEquals(3, xmax2, 'check change lin acceleration xmax') test:assertEquals(4, ymax2, 'check change lin acceleration ymax') -- check linear damping local min3, max3 = psystem:getLinearDamping() test:assertEquals(0, min3, 'check def lin damping min') test:assertEquals(0, max3, 'check def lin damping max') psystem:setLinearDamping(1, 2) local min4, max4 = psystem:getLinearDamping() test:assertEquals(1, min4, 'check change lin damping min') test:assertEquals(2, max4, 'check change lin damping max') -- check offset local ox1, oy1 = psystem:getOffset() test:assertEquals(0.5, ox1, 'check def offset x') -- 0.5 cos middle of pixel image which is 1x1 test:assertEquals(0.5, oy1, 'check def offset y') psystem:setOffset(0, 10) local ox2, oy2 = psystem:getOffset() test:assertEquals(0, ox2, 'check change offset x') test:assertEquals(10, oy2, 'check change offset y') -- check lifetime (we set it earlier) local min5, max5 = psystem:getParticleLifetime() test:assertEquals(1, min5, 'check p lifetime min') test:assertEquals(2, max5, 'check p lifetime max') -- check position local x1, y1 = psystem:getPosition() test:assertEquals(0, x1, 'check emitter x') test:assertEquals(0, y1, 'check emitter y') psystem:setPosition(10, 12) local x2, y2 = psystem:getPosition() test:assertEquals(10, x2, 'check set emitter x') test:assertEquals(12, y2, 'check set emitter y') -- check quads test:assertEquals(0, #psystem:getQuads(), 'check def quads') psystem:setQuads({quad1}) psystem:setQuads(quad1, quad2) test:assertEquals(2, #psystem:getQuads(), 'check set quads') -- check radial acceleration local min6, max6 = psystem:getRadialAcceleration() test:assertEquals(0, min6, 'check def rad accel min') test:assertEquals(0, max6, 'check def rad accel max') psystem:setRadialAcceleration(1, 2) local min7, max7 = psystem:getRadialAcceleration() test:assertEquals(1, min7, 'check change rad accel min') test:assertEquals(2, max7, 'check change rad accel max') -- check rotation local min8, max8 = psystem:getRotation() test:assertEquals(0, min8, 'check def rot min') test:assertEquals(0, max8, 'check def rot max') psystem:setRotation(90 * (math.pi/180), 180 * (math.pi/180)) local min8, max8 = psystem:getRotation() test:assertEquals(math.floor(math.pi/2*100), math.floor(min8*100), 'check set rot min') test:assertEquals(math.floor(math.pi*100), math.floor(max8*100), 'check set rot max') -- check variation test:assertEquals(0, psystem:getSizeVariation(), 'check def variation') psystem:setSizeVariation(1) test:assertEquals(1, psystem:getSizeVariation(), 'check change variation') -- check sizes test:assertEquals(1, #{psystem:getSizes()}, 'check def size') psystem:setSizes(1, 2, 4, 1, 3, 2) local sizes = {psystem:getSizes()} test:assertEquals(6, #sizes, 'check set sizes') test:assertEquals(3, sizes[5], 'check set size') -- check speed local min9, max9 = psystem:getSpeed() test:assertEquals(0, min9, 'check def speed min') test:assertEquals(0, max9, 'check def speed max') psystem:setSpeed(1, 10) local min10, max10 = psystem:getSpeed() test:assertEquals(1, min10, 'check change speed min') test:assertEquals(10, max10, 'check change speed max') -- check variation + spin local variation = psystem:getSpinVariation() test:assertEquals(0, variation, 'check def spin variation') psystem:setSpinVariation(1) test:assertEquals(1, psystem:getSpinVariation(), 'check change spin variation') psystem:setSpin(1, 2) local min11, max11 = psystem:getSpin() test:assertEquals(1, min11, 'check change spin min') test:assertEquals(2, max11, 'check change spin max') -- check spread test:assertEquals(0, psystem:getSpread(), 'check def spread') psystem:setSpread(90 * (math.pi/180)) test:assertEquals(math.floor(math.pi/2*100), math.floor(psystem:getSpread()*100), 'check change spread') -- tangential acceleration local min12, max12 = psystem:getTangentialAcceleration() test:assertEquals(0, min12, 'check def tan accel min') test:assertEquals(0, max12, 'check def tan accel max') psystem:setTangentialAcceleration(1, 2) local min13, max13 = psystem:getTangentialAcceleration() test:assertEquals(1, min13, 'check change tan accel min') test:assertEquals(2, max13, 'check change tan accel max') -- check texture test:assertNotEquals(nil, psystem:getTexture(), 'check texture obj') test:assertObject(psystem:getTexture()) psystem:setTexture(love.graphics.newImage('resources/love.png')) test:assertObject(psystem:getTexture()) -- try a graphics test! -- hard to get exactly because of the variation but we can use some pixel -- tolerance and volume to try and cover the randomness local psystem2 = love.graphics.newParticleSystem(image, 5000) psystem2:setEmissionArea('uniform', 2, 64) psystem2:setColors(1, 0, 0, 1) psystem2:setDirection(0 * math.pi/180) psystem2:setEmitterLifetime(100) psystem2:setEmissionRate(5000) local psystem3 = psystem2:clone() psystem3:setPosition(64, 0) psystem3:setColors(0, 1, 0, 1) psystem3:setDirection(180 * (math.pi/180)) psystem2:start() psystem3:start() psystem2:update(1) psystem3:update(1) local canvas = love.graphics.newCanvas(64, 64) love.graphics.setCanvas(canvas) love.graphics.clear(0, 0, 0, 1) love.graphics.draw(psystem2, 0, 0) love.graphics.draw(psystem3, 0, 0) love.graphics.setCanvas() -- this should result in a bunch of red pixels on the left 2px of the canvas -- and a bunch of green pixels on the right 2px of the canvas local imgdata = love.graphics.readbackTexture(canvas) test.pixel_tolerance = 1 test:compareImg(imgdata) end -- Quad (love.graphics.newQuad) love.test.graphics.Quad = function(test) -- create quad obj local texture = love.graphics.newImage('resources/love.png') local quad = love.graphics.newQuad(0, 0, 32, 32, texture) test:assertObject(quad) -- check properties test:assertEquals(1, quad:getLayer(), 'check default layer') quad:setLayer(2) test:assertEquals(2, quad:getLayer(), 'check changed layer') local sw, sh = quad:getTextureDimensions() test:assertEquals(64, sw, 'check texture w') test:assertEquals(64, sh, 'check texture h') -- check drawing and viewport changes local canvas = love.graphics.newCanvas(64, 64) love.graphics.setCanvas(canvas) love.graphics.draw(texture, quad, 0, 0) quad:setViewport(32, 32, 32, 32, 64, 64) love.graphics.draw(texture, quad, 32, 32) love.graphics.setCanvas() local imgdata = love.graphics.readbackTexture(canvas) test:compareImg(imgdata) end -- Shader (love.graphics.newShader) love.test.graphics.Shader = function(test) -- check valid shader local pixelcode1 = [[ uniform Image tex2; vec4 effect(vec4 color, Image tex, vec2 texture_coords, vec2 screen_coords) { vec4 texturecolor = Texel(tex2, texture_coords); return texturecolor * color; } ]] local vertexcode1 = [[ vec4 position(mat4 transform_projection, vec4 vertex_position) { return transform_projection * vertex_position; } ]] local shader1 = love.graphics.newShader(pixelcode1, vertexcode1, {debugname = 'testshader'}) test:assertObject(shader1) test:assertEquals('', shader1:getWarnings(), 'check shader valid') test:assertFalse(shader1:hasUniform('tex1'), 'check invalid uniform') test:assertTrue(shader1:hasUniform('tex2'), 'check valid uniform') test:assertEquals('testshader', shader1:getDebugName()) -- check invalid shader local pixelcode2 = [[ uniform float ww; vec4 effect(vec4 color, Image tex, vec2 texture_coords, vec2 screen_coords) { vec4 texturecolor = Texel(tex, texture_coords); float unused = ww * 3 * color; return texturecolor * color; } ]] local res, err = pcall(love.graphics.newShader, pixelcode2, vertexcode1) test:assertNotEquals(nil, err, 'check shader compile fails') -- check using a shader to draw + sending uniforms -- shader will return a given color if overwrite set to 1, otherwise def. draw local pixelcode3 = [[ uniform vec4 col; uniform float overwrite; vec4 effect(vec4 color, Image tex, vec2 texture_coords, vec2 screen_coords) { vec4 texcol = Texel(tex, texture_coords); if (overwrite == 1.0) { return col; } else { return texcol * color; } } ]] local shader3 = love.graphics.newShader(pixelcode3, vertexcode1) local canvas = love.graphics.newCanvas(16, 16) love.graphics.push("all") love.graphics.setCanvas(canvas) -- set color to yellow love.graphics.setColor(1, 1, 0, 1) -- turn shader 'on' and use red to draw shader3:send('overwrite', 1) shader3:sendColor('col', {1, 0, 0, 1}) love.graphics.setShader(shader3) love.graphics.rectangle('fill', 0, 0, 8, 8) love.graphics.setShader() -- turn shader 'off' and draw again shader3:send('overwrite', 0) love.graphics.setShader(shader3) love.graphics.rectangle('fill', 8, 8, 8, 8) love.graphics.pop() local imgdata = love.graphics.readbackTexture(canvas) test:compareImg(imgdata) -- test some uncommon paths for shader uniforms local shader4 = love.graphics.newShader[[ uniform bool booleans[5]; vec4 effect(vec4 vcolor, Image tex, vec2 tc, vec2 pc) { return booleans[3] ? vec4(0, 1, 0, 0) : vec4(1, 0, 0, 0); } ]] shader4:send("booleans", false, true, true) local shader5 = love.graphics.newShader[[ uniform sampler2D textures[5]; vec4 effect(vec4 vcolor, Image tex, vec2 tc, vec2 pc) { return Texel(textures[2], tc) + Texel(textures[3], tc); } ]] local canvas2 = love.graphics.newCanvas(1, 1) love.graphics.setCanvas(canvas2) love.graphics.clear(0, 0.5, 0, 1) love.graphics.setCanvas() shader5:send("textures", canvas2, canvas2, canvas2, canvas2, canvas2) local shader6 = love.graphics.newShader[[ struct Data { bool boolValue; float floatValue; sampler2D tex; }; uniform Data data; uniform Data dataArray[3]; vec4 effect(vec4 vcolor, Image tex, vec2 tc, vec2 pc) { return (data.boolValue && dataArray[1].boolValue) ? Texel(dataArray[0].tex, tc) : vec4(0.0, 0.0, 0.0, 0.0); } ]] shader6:send("data.boolValue", true) shader6:send("dataArray[1].boolValue", true) shader6:send("dataArray[0].tex", canvas2) local shader7 = love.graphics.newShader[[ uniform vec3 vec3s[3]; vec4 effect(vec4 vcolor, Image tex, vec2 tc, vec2 pc) { return vec4(vec3s[1], 1.0); } ]] shader7:send("vec3s", {0, 0, 1}, {0, 1, 0}, {1, 0, 0}) local canvas3 = love.graphics.newCanvas(16, 16) love.graphics.push("all") love.graphics.setCanvas(canvas3) love.graphics.setShader(shader7) love.graphics.rectangle("fill", 0, 0, 16, 16) love.graphics.pop() local imgdata2 = love.graphics.readbackTexture(canvas3) test:compareImg(imgdata2) if love.graphics.getSupported().glsl3 then local shader8 = love.graphics.newShader[[ #pragma language glsl3 #ifdef GL_ES precision highp float; #endif varying vec4 VaryingUnused1; varying mat3 VaryingMatrix; flat varying ivec4 VaryingInt; #ifdef VERTEX layout(location = 0) in vec4 VertexPosition; layout(location = 1) in ivec4 IntAttributeUnused; void vertexmain() { VaryingMatrix = mat3(vec3(1, 0, 0), vec3(0, 1, 0), vec3(0, 0, 1)); VaryingInt = ivec4(1, 1, 1, 1); love_Position = TransformProjectionMatrix * VertexPosition; } #endif #ifdef PIXEL out ivec4 outData; void pixelmain() { outData = ivec4(VaryingMatrix[1][1] > 0.0 ? 1 : 0, 1, VaryingInt.x, 1); } #endif ]] local canvas4 = love.graphics.newCanvas(16, 16, {format="rgba8i"}) love.graphics.push("all") love.graphics.setBlendMode("none") love.graphics.setCanvas(canvas4) love.graphics.setShader(shader8) love.graphics.rectangle("fill", 0, 0, 16, 16) love.graphics.pop() local intimagedata = love.graphics.readbackTexture(canvas4) local imgdata3 = love.image.newImageData(16, 16, "rgba8") for y=0, 15 do for x=0, 15 do local ir, ig, ib, ia = intimagedata:getInt8(4 * (y * 16 + x), 4) imgdata3:setPixel(x, y, ir, ig, ib, ia) end end test:compareImg(imgdata3) else test:assertTrue(true, "skip shader IO test") end end -- SpriteBatch (love.graphics.newSpriteBatch) love.test.graphics.SpriteBatch = function(test) -- create batch local texture1 = love.graphics.newImage('resources/cubemap.png') local texture2 = love.graphics.newImage('resources/love.png') local quad1 = love.graphics.newQuad(32, 12, 1, 1, texture2) -- lovepink local quad2 = love.graphics.newQuad(32, 32, 1, 1, texture2) -- white local sbatch = love.graphics.newSpriteBatch(texture1, 5000) test:assertObject(sbatch) -- check initial count test:assertEquals(0, sbatch:getCount(), 'check batch size') -- check buffer size test:assertEquals(5000, sbatch:getBufferSize(), 'check batch size') -- check height/width/texture test:assertEquals(texture1:getWidth(), sbatch:getTexture():getWidth(), 'check texture match w') test:assertEquals(texture1:getHeight(), sbatch:getTexture():getHeight(), 'check texture match h') sbatch:setTexture(texture2) test:assertEquals(texture2:getWidth(), sbatch:getTexture():getWidth(), 'check texture change w') test:assertEquals(texture2:getHeight(), sbatch:getTexture():getHeight(), 'check texture change h') -- check colors local r1, g1, b1, a1 = sbatch:getColor() test:assertEquals(1, r1, 'check initial color r') test:assertEquals(1, g1, 'check initial color g') test:assertEquals(1, b1, 'check initial color b') test:assertEquals(1, a1, 'check initial color a') sbatch:setColor(1, 0, 0, 1) local r2, g2, b2, a2 = sbatch:getColor() test:assertEquals(1, r2, 'check set color r') test:assertEquals(0, g2, 'check set color g') test:assertEquals(0, b2, 'check set color b') test:assertEquals(1, a2, 'check set color a') -- check adding sprites local offset_x = 0 local offset_y = 0 local color = 'white' sbatch:setColor(1, 1, 1, 1) local sprites = {} for s=1,4096 do local spr = sbatch:add(quad1, offset_x, offset_y, 0, 1, 1) table.insert(sprites, {spr, offset_x, offset_y}) offset_x = offset_x + 1 if s % 64 == 0 then -- alternate row colors if color == 'white' then color = 'red' sbatch:setColor(1, 0, 0, 1) else color = 'white' sbatch:setColor(1, 1, 1, 1) end offset_y = offset_y + 1 offset_x = 0 end end test:assertEquals(4096, sbatch:getCount()) -- test drawing and setting local canvas = love.graphics.newCanvas(64, 64) love.graphics.setCanvas(canvas) love.graphics.clear(0, 0, 0, 1) love.graphics.draw(sbatch, 0, 0) love.graphics.setCanvas() local imgdata1 = love.graphics.readbackTexture(canvas) test:compareImg(imgdata1) -- use set to change some sprites for s=1,2048 do sbatch:set(sprites[s][1], quad2, sprites[s][2], sprites[s][3]+1, 0, 1, 1) end love.graphics.setCanvas(canvas) love.graphics.clear(0, 0, 0, 1) love.graphics.draw(sbatch, 0, 0) love.graphics.setCanvas() local imgdata2 = love.graphics.readbackTexture(canvas) test:compareImg(imgdata2) -- set drawRange and redraw sbatch:setDrawRange(1025, 2048) love.graphics.setCanvas(canvas) love.graphics.clear(0, 0, 0, 1) love.graphics.draw(sbatch, 0, 0) love.graphics.setCanvas() local imgdata3 = love.graphics.readbackTexture(canvas) test:compareImg(imgdata3) -- clear and redraw sbatch:clear() love.graphics.setCanvas(canvas) love.graphics.clear(0, 0, 0, 1) love.graphics.draw(sbatch, 0, 0) love.graphics.setCanvas() local imgdata4 = love.graphics.readbackTexture(canvas) test:compareImg(imgdata4) -- array texture sbatch local texture3 = love.graphics.newArrayImage({ 'resources/love.png', 'resources/loveinv.png' }) local asbatch = love.graphics.newSpriteBatch(texture3, 4096) local quad3 = love.graphics.newQuad(32, 52, 1, 1, texture3) -- loveblue sprites = {} for s=1,4096 do local spr = asbatch:addLayer(1, quad3, 0, s, math.floor(s/64), 1, 1) table.insert(sprites, {spr, s, math.floor(s/64)}) end test:assertEquals(4096, asbatch:getCount(), 'check max batch size applies') for s=1,2048 do asbatch:setLayer(sprites[s][1], 2, sprites[s][2], sprites[s][3], 0, 1, 1) end love.graphics.setCanvas(canvas) love.graphics.clear(0, 0, 0, 1) love.graphics.draw(asbatch, 0, 0) love.graphics.setCanvas() local imgdata5 = love.graphics.readbackTexture(canvas) test:compareImg(imgdata5) end -- Text (love.graphics.newTextBatch) love.test.graphics.Text = function(test) -- setup text object local font = love.graphics.newFont('resources/font.ttf', 8) local plaintext = love.graphics.newTextBatch(font, 'test') test:assertObject(plaintext) -- check height/width/dimensions test:assertEquals(font:getHeight(), plaintext:getFont():getHeight(), 'check font matches') local tw, th = plaintext:getDimensions() test:assertEquals(24, tw, 'check initial dim w') test:assertEquals(8, th, 'check initial dim h') test:assertEquals(tw, plaintext:getWidth(), 'check initial dim w') test:assertEquals(th, plaintext:getHeight(), 'check initial dim h') -- check changing text effects dimensions plaintext:add('more text', 100, 0, 0) test:assertEquals(49, plaintext:getDimensions(), 'check adding text') plaintext:set('test') test:assertEquals(24, plaintext:getDimensions(), 'check resetting text') plaintext:clear() test:assertEquals(0, plaintext:getDimensions(), 'check clearing text') -- check drawing + setting more complex text local colortext = love.graphics.newTextBatch(font, {{1, 0, 0, 1}, 'test'}) test:assertObject(colortext) colortext:setf('LÖVE is an *awesome* framework you can use to make 2D games in Lua', 60, 'right') colortext:addf({{1, 1, 0}, 'overlap'}, 1000, 'left') local font2 = love.graphics.newFont('resources/font.ttf', 8) colortext:setFont(font2) local canvas = love.graphics.newCanvas(64, 64) love.graphics.setCanvas(canvas) love.graphics.draw(colortext, 0, 10) love.graphics.setCanvas() local imgdata = love.graphics.readbackTexture(canvas) test:compareImg(imgdata) end -- Video (love.graphics.newVideo) love.test.graphics.Video = function(test) -- create video obj local video = love.graphics.newVideo('resources/sample.ogv') test:assertObject(video) -- check dimensions local w, h = video:getDimensions() test:assertEquals(496, w, 'check vid dim w') test:assertEquals(502, h, 'check vid dim h') test:assertEquals(w, video:getWidth(), 'check vid width match') test:assertEquals(h, video:getHeight(), 'check vid height match') -- check filters local min1, mag1, ani1 = video:getFilter() test:assertEquals('nearest', min1, 'check def filter min') test:assertEquals('nearest', mag1, 'check def filter mag') test:assertEquals(1, ani1, 'check def filter ani') video:setFilter('linear', 'linear', 2) local min2, mag2, ani2 = video:getFilter() test:assertEquals('linear', min2, 'check changed filter min') test:assertEquals('linear', mag2, 'check changed filter mag') test:assertEquals(2, ani2, 'check changed filter ani') -- check video playing test:assertFalse(video:isPlaying(), 'check paused by default') test:assertEquals(0, video:tell(), 'check 0:00 by default') -- covered by their own obj tests in video but check returns obj local source = video:getSource() test:assertObject(source) local stream = video:getStream() test:assertObject(stream) -- check playing / pausing / seeking states video:play() test:waitSeconds(0.25) video:pause() -- runners can be a bit funny and just not play anything sometimes if not GITHUB_RUNNER then test:assertRange(video:tell(), 0.2, 0.35, 'check video playing for 0.25s') end video:seek(0.2) test:assertEquals(0.2, video:tell(), 'check video seeking') video:rewind() test:assertEquals(0, video:tell(), 'check video rewind') video:setFilter('nearest', 'nearest', 1) -- check actuall drawing with the vid local canvas = love.graphics.newCanvas(500, 500) love.graphics.setCanvas(canvas) love.graphics.clear(1, 0, 0, 1) love.graphics.draw(video, 0, 0) love.graphics.setCanvas() local imgdata = love.graphics.readbackTexture(canvas) test:compareImg(imgdata) end -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- ------------------------------------DRAWING------------------------------------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -- love.graphics.arc love.test.graphics.arc = function(test) -- draw some arcs using pi format local canvas = love.graphics.newCanvas(32, 32) love.graphics.setCanvas(canvas) love.graphics.clear(0, 0, 0, 1) love.graphics.setColor(1, 1, 1, 1) love.graphics.arc('line', "pie", 16, 16, 16, 0 * (math.pi/180), 360 * (math.pi/180), 10) love.graphics.arc('fill', "pie", 16, 16, 16, 270 * (math.pi/180), 45 * (math.pi/180), 10) love.graphics.setColor(1, 0, 0, 1) love.graphics.arc('line', "pie", 16, 16, 16, 0 * (math.pi/180), 90 * (math.pi/180), 10) love.graphics.setColor(1, 1, 0, 1) love.graphics.arc('line', "pie", 16, 16, 16, 180 * (math.pi/180), 135 * (math.pi/180), 10) love.graphics.setColor(1, 1, 1, 1) love.graphics.setCanvas() local imgdata1 = love.graphics.readbackTexture(canvas) -- draw some arcs with open format love.graphics.setCanvas(canvas) love.graphics.clear(0, 0, 0, 1) love.graphics.setColor(1, 1, 1, 1) love.graphics.arc('line', "open", 16, 16, 16, 0 * (math.pi/180), 315 * (math.pi/180), 10) love.graphics.setColor(1, 0, 0, 1) love.graphics.arc('fill', "open", 16, 16, 16, 0 * (math.pi/180), 180 * (math.pi/180), 10) love.graphics.setColor(1, 1, 0, 1) love.graphics.arc('fill', "open", 16, 16, 16, 180 * (math.pi/180), 270 * (math.pi/180), 10) love.graphics.setColor(1, 1, 1, 1) love.graphics.setCanvas() local imgdata2 = love.graphics.readbackTexture(canvas) -- draw some arcs with closed format love.graphics.setCanvas(canvas) love.graphics.clear(0, 0, 0, 1) love.graphics.setColor(1, 1, 1, 1) love.graphics.arc('line', "closed", 16, 16, 16, 0 * (math.pi/180), 315 * (math.pi/180), 10) love.graphics.setColor(1, 0, 0, 1) love.graphics.arc('fill', "closed", 16, 16, 16, 0 * (math.pi/180), 180 * (math.pi/180), 10) love.graphics.setColor(1, 1, 0, 1) love.graphics.arc('line', "closed", 16, 16, 16, 180 * (math.pi/180), 90 * (math.pi/180), 10) love.graphics.setColor(1, 1, 1, 1) love.graphics.setCanvas() local imgdata3 = love.graphics.readbackTexture(canvas) if GITHUB_RUNNER and test:isOS('OS X') then -- on macosx runners, the arcs are not drawn as accurately at low res -- there's a couple pixels different in the curve of the arc but as we -- are at such a low resolution I think that can be expected -- on real hardware the test passes fine though test:assertTrue(true, 'skip test') else test:compareImg(imgdata1) test:compareImg(imgdata2) test:compareImg(imgdata3) end end -- love.graphics.circle love.test.graphics.circle = function(test) -- draw some circles local canvas = love.graphics.newCanvas(32, 32) love.graphics.setCanvas(canvas) love.graphics.clear(0, 0, 0, 1) love.graphics.setColor(1, 1, 1, 1) love.graphics.circle('fill', 16, 16, 16) love.graphics.setColor(1, 0, 0, 1) love.graphics.circle('line', 16, 16, 16) love.graphics.setColor(1, 1, 0, 1) love.graphics.circle('fill', 16, 16, 8) love.graphics.setColor(0, 1, 0, 1) love.graphics.circle('fill', 16, 16, 4) love.graphics.setColor(1, 1, 1, 1) love.graphics.setCanvas() local imgdata = love.graphics.readbackTexture(canvas) test:compareImg(imgdata) end -- love.graphics.clear love.test.graphics.clear = function(test) local canvas = love.graphics.newCanvas(16, 16) love.graphics.setCanvas(canvas) love.graphics.clear(0, 0, 0, 1) love.graphics.clear(1, 1, 0, 1) love.graphics.setCanvas() local imgdata = love.graphics.readbackTexture(canvas) test:compareImg(imgdata) end -- love.graphics.discard love.test.graphics.discard = function(test) -- from the docs: "on some desktops this may do nothing" test:skipTest('cant test this worked') end -- love.graphics.draw love.test.graphics.draw = function(test) local canvas1 = love.graphics.newCanvas(32, 32) local canvas2 = love.graphics.newCanvas(32, 32) local transform = love.math.newTransform( ) transform:translate(16, 0) transform:scale(0.5, 0.5) love.graphics.setCanvas(canvas1) love.graphics.clear(0, 0, 0, 1) -- img, offset love.graphics.draw(Logo.texture, Logo.img, 0, 0, 0, 1, 1, 16, 16) love.graphics.setCanvas() love.graphics.setCanvas(canvas2) love.graphics.clear(1, 0, 0, 1) -- canvas, scale, shear, transform obj love.graphics.draw(canvas1, 0, 0, 0, 1, 1, 0, 0, 2, 2) love.graphics.draw(canvas1, 0, 16, 0, 0.5, 0.5) love.graphics.draw(canvas1, 16, 16, 0, 0.5, 0.5) love.graphics.draw(canvas1, transform) love.graphics.setCanvas() local imgdata = love.graphics.readbackTexture(canvas2) test:compareImg(imgdata) end -- love.graphics.drawInstanced love.test.graphics.drawInstanced = function(test) local image = love.graphics.newImage('resources/love.png') local vertices = { { 0, 0, 0, 0, 1, 0, 0 }, { image:getWidth(), 0, 1, 0, 0, 1, 0 }, { image:getWidth(), image:getHeight(), 1, 1, 0, 0, 1 }, { 0, image:getHeight(), 0, 1, 1, 1, 0 }, } local mesh = love.graphics.newMesh(vertices, 'fan') local canvas = love.graphics.newCanvas(64, 64) love.graphics.setCanvas(canvas) love.graphics.clear(0, 0, 0, 1) love.graphics.drawInstanced(mesh, 1000, 0, 0, 0, 1, 1) love.graphics.setCanvas() local imgdata = love.graphics.readbackTexture(canvas) -- need 1 tolerance here just cos of the amount of colors test.rgba_tolerance = 1 test:compareImg(imgdata) end -- love.graphics.drawLayer love.test.graphics.drawLayer = function(test) local image = love.graphics.newArrayImage({ 'resources/love.png', 'resources/loveinv.png', 'resources/love.png', 'resources/loveinv.png' }) local canvas = love.graphics.newCanvas(64, 64) love.graphics.setCanvas(canvas) love.graphics.clear(0, 0, 0, 1) love.graphics.drawLayer(image, 1, 0, 0, 0, 1, 1) love.graphics.drawLayer(image, 2, 32, 0, 0, 0.5, 0.5) love.graphics.drawLayer(image, 4, 0, 32, 0, 0.5, 0.5) love.graphics.drawLayer(image, 3, 32, 32, 0, 2, 2, 16, 16) love.graphics.setCanvas() local imgdata = love.graphics.readbackTexture(canvas) test:compareImg(imgdata) end -- love.graphics.ellipse love.test.graphics.ellipse = function(test) local canvas = love.graphics.newCanvas(32, 32) love.graphics.setCanvas(canvas) love.graphics.clear(0, 0, 0, 1) love.graphics.setColor(1, 0, 0, 1) love.graphics.ellipse('fill', 16, 16, 16, 8) love.graphics.setColor(1, 1, 0, 1) love.graphics.ellipse('fill', 24, 24, 10, 24) love.graphics.setColor(1, 0, 1, 1) love.graphics.ellipse('fill', 16, 0, 8, 16) love.graphics.setColor(1, 1, 1, 1) love.graphics.setCanvas() local imgdata = love.graphics.readbackTexture(canvas) test:compareImg(imgdata) end -- love.graphics.flushBatch love.test.graphics.flushBatch = function(test) love.graphics.flushBatch() local initial = love.graphics.getStats()['drawcalls'] local canvas = love.graphics.newCanvas(32, 32) love.graphics.setCanvas(canvas) love.graphics.clear(0, 0, 0, 1) love.graphics.rectangle('fill', 0, 0, 32, 32) love.graphics.setColor(1, 1, 1, 1) love.graphics.setCanvas() love.graphics.flushBatch() local after = love.graphics.getStats()['drawcalls'] test:assertEquals(initial+1, after, 'check drawcalls increased') end -- love.graphics.line love.test.graphics.line = function(test) local canvas = love.graphics.newCanvas(16, 16) love.graphics.setCanvas(canvas) love.graphics.clear(0, 0, 0, 1) love.graphics.setColor(1, 0, 0, 1) love.graphics.line(1,1,16,1,16,16,1,16,1,1) love.graphics.setColor(1, 1, 0, 1) love.graphics.line({0,0,8,8,16,0,8,8,16,16,8,8,0,16}) love.graphics.setColor(1, 1, 1, 1) love.graphics.setCanvas() local imgdata = love.graphics.readbackTexture(canvas) test:compareImg(imgdata) end -- love.graphics.points love.test.graphics.points = function(test) local canvas = love.graphics.newCanvas(16, 16) love.graphics.push("all") love.graphics.setCanvas(canvas) love.graphics.clear(0, 0, 0, 1) love.graphics.translate(0.5, 0.5) -- draw points at the center of pixels love.graphics.setColor(1, 0, 0, 1) love.graphics.points(0,0,15,0,15,15,0,15,0,0) love.graphics.setColor(1, 1, 0, 1) love.graphics.points({1,1,7,7,14,1,7,8,14,14,8,8,1,14,8,7}) love.graphics.pop() local imgdata = love.graphics.readbackTexture(canvas) test:compareImg(imgdata) end -- love.graphics.polygon love.test.graphics.polygon = function(test) local canvas = love.graphics.newCanvas(16, 16) love.graphics.setCanvas(canvas) love.graphics.clear(0, 0, 0, 1) love.graphics.setColor(1, 0, 0, 1) love.graphics.polygon("fill", 1, 1, 4, 5, 8, 10, 16, 2, 7, 3, 5, 16, 16, 16, 1, 8) love.graphics.setColor(1, 1, 0, 1) love.graphics.polygon("line", {2, 2, 4, 5, 3, 7, 8, 15, 12, 4, 5, 10}) love.graphics.setColor(1, 1, 1, 1) love.graphics.setCanvas() local imgdata = love.graphics.readbackTexture(canvas) test:compareImg(imgdata) end -- love.graphics.print love.test.graphics.print = function(test) love.graphics.setFont(Font) local canvas = love.graphics.newCanvas(16, 16) love.graphics.setCanvas(canvas) love.graphics.clear(0, 0, 0, 1) love.graphics.setColor(1, 0, 0, 1) love.graphics.print('love', 0, 3, 0, 1, 1, 0, 0) love.graphics.setColor(0, 1, 0, 1) love.graphics.print('ooo', 0, 3, 0, 2, 2, 0, 0) love.graphics.setColor(0, 0, 1, 1) love.graphics.print('hello', 0, 3, 90*(math.pi/180), 1, 1, 0, 8) love.graphics.setColor(1, 1, 1, 1) love.graphics.setCanvas() local imgdata = love.graphics.readbackTexture(canvas) test:compareImg(imgdata) end -- love.graphics.printf love.test.graphics.printf = function(test) love.graphics.setFont(Font) local canvas = love.graphics.newCanvas(32, 32) love.graphics.setCanvas(canvas) love.graphics.clear(0, 0, 0, 1) love.graphics.setColor(1, 0, 0, 1) love.graphics.printf('love', 0, 0, 8, "left") love.graphics.setColor(0, 1, 0, 1) love.graphics.printf('love', 0, 5, 16, "right") love.graphics.setColor(0, 0, 1, 1) love.graphics.printf('love', 0, 7, 32, "center") love.graphics.setColor(1, 1, 1, 1) love.graphics.setCanvas() local imgdata = love.graphics.readbackTexture(canvas) test:compareImg(imgdata) end -- love.graphics.rectangle love.test.graphics.rectangle = function(test) -- setup, draw a 16x16 red rectangle with a blue central square local canvas = love.graphics.newCanvas(16, 16) love.graphics.setCanvas(canvas) love.graphics.clear(0, 0, 0, 1) love.graphics.setColor(1, 0, 0, 1) love.graphics.rectangle('fill', 0, 0, 16, 16) love.graphics.setColor(0, 0, 1, 1) love.graphics.rectangle('fill', 6, 6, 4, 4) love.graphics.setColor(1, 1, 1, 1) love.graphics.setCanvas() local imgdata1 = love.graphics.readbackTexture(canvas) test:compareImg(imgdata1) -- clear canvas to do some line testing love.graphics.setCanvas(canvas) love.graphics.clear(0, 0, 0, 1) love.graphics.setColor(1, 0, 0, 1) love.graphics.rectangle('line', 1, 1, 15, 15) -- red border love.graphics.setColor(0, 0, 1, 1) love.graphics.rectangle('line', 1, 1, 2, 15) -- 3x16 left aligned blue outline love.graphics.setColor(0, 1, 0, 1) love.graphics.rectangle('line', 11, 1, 5, 15) -- 6x16 right aligned green outline love.graphics.setColor(1, 1, 1, 1) love.graphics.setCanvas() local imgdata2 = love.graphics.readbackTexture(canvas) test:compareImg(imgdata2) end -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- --------------------------------OBJECT CREATION--------------------------------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -- love.graphics.captureScreenshot love.test.graphics.captureScreenshot = function(test) love.graphics.captureScreenshot('example-screenshot.png') test:waitFrames(1) -- need to wait until end of the frame for the screenshot test:assertTrue(love.filesystem.exists('example-screenshot.png')) love.filesystem.remove('example-screenshot.png') -- test callback version local cbdata = nil local prevtextcommand = TextCommand TextCommand = "Capturing screenshot" love.graphics.captureScreenshot(function (idata) test:assertNotEquals(nil, idata, 'check we have image data') cbdata = idata end) test:waitFrames(1) TextCommand = prevtextcommand test:assertNotNil(cbdata) if test:isOS('iOS', 'Android') then -- Mobile operating systems don't let us control the window resolution, -- so we can't compare the reference image properly. test:assertTrue(true, 'skip test') else test:compareImg(cbdata) end end -- love.graphics.newArrayImage -- @NOTE this is just basic nil checking, objs have their own test method love.test.graphics.newArrayImage = function(test) test:assertObject(love.graphics.newArrayImage({ 'resources/love.png', 'resources/love2.png', 'resources/love3.png' })) end -- love.graphics.newCanvas -- @NOTE this is just basic nil checking, objs have their own test method love.test.graphics.newCanvas = function(test) test:assertObject(love.graphics.newCanvas(16, 16, { type = '2d', format = 'normal', readable = true, msaa = 0, dpiscale = 1, mipmaps = 'none' })) test:assertObject(love.graphics.newCanvas(1000, 1000)) end -- love.graphics.newCubeImage -- @NOTE this is just basic nil checking, objs have their own test method love.test.graphics.newCubeImage = function(test) test:assertObject(love.graphics.newCubeImage('resources/cubemap.png', { mipmaps = false, linear = false })) end -- love.graphics.newFont -- @NOTE this is just basic nil checking, objs have their own test method love.test.graphics.newFont = function(test) test:assertObject(love.graphics.newFont('resources/font.ttf')) test:assertObject(love.graphics.newFont('resources/font.ttf', 8, "normal", 1)) end -- love.graphics.newImage -- @NOTE this is just basic nil checking, objs have their own test method love.test.graphics.newImage = function(test) test:assertObject(love.graphics.newImage('resources/love.png', { mipmaps = false, linear = false, dpiscale = 1 })) end -- love.graphics.newImageFont -- @NOTE this is just basic nil checking, objs have their own test method love.test.graphics.newImageFont = function(test) test:assertObject(love.graphics.newImageFont('resources/love.png', 'ABCD', 1)) end -- love.graphics.newMesh -- @NOTE this is just basic nil checking, objs have their own test method love.test.graphics.newMesh = function(test) test:assertObject(love.graphics.newMesh({{1, 1, 0, 0, 1, 1, 1, 1}}, 'fan', 'dynamic')) end -- love.graphics.newParticleSystem -- @NOTE this is just basic nil checking, objs have their own test method love.test.graphics.newParticleSystem = function(test) local imgdata = love.graphics.newImage('resources/love.png') test:assertObject(love.graphics.newParticleSystem(imgdata, 1000)) end -- love.graphics.newQuad -- @NOTE this is just basic nil checking, objs have their own test method love.test.graphics.newQuad = function(test) local imgdata = love.graphics.newImage('resources/love.png') test:assertObject(love.graphics.newQuad(0, 0, 16, 16, imgdata)) end -- love.graphics.newShader -- @NOTE this is just basic nil checking, objs have their own test method love.test.graphics.newShader = function(test) local pixelcode = [[ vec4 effect(vec4 color, Image tex, vec2 texture_coords, vec2 screen_coords) { vec4 texturecolor = Texel(tex, texture_coords); return texturecolor * color; } ]] local vertexcode = [[ vec4 position(mat4 transform_projection, vec4 vertex_position) { return transform_projection * vertex_position; } ]] test:assertObject(love.graphics.newShader(pixelcode, vertexcode)) end -- love.graphics.newSpriteBatch -- @NOTE this is just basic nil checking, objs have their own test method love.test.graphics.newSpriteBatch = function(test) local imgdata = love.graphics.newImage('resources/love.png') test:assertObject(love.graphics.newSpriteBatch(imgdata, 1000)) end -- love.graphics.newTextBatch -- @NOTE this is just basic nil checking, objs have their own test method love.test.graphics.newTextBatch = function(test) local font = love.graphics.newFont('resources/font.ttf') test:assertObject(love.graphics.newTextBatch(font, 'helloworld')) end -- love.graphics.newTexture -- @NOTE this is just basic nil checking, objs have their own test method love.test.graphics.newTexture = function(test) local imgdata = love.image.newImageData('resources/love.png') test:assertObject(love.graphics.newTexture(imgdata)) end -- love.graphics.newVideo -- @NOTE this is just basic nil checking, objs have their own test method love.test.graphics.newVideo = function(test) test:assertObject(love.graphics.newVideo('resources/sample.ogv', { audio = false, dpiscale = 1 })) end -- love.graphics.newVolumeImage -- @NOTE this is just basic nil checking, objs have their own test method love.test.graphics.newVolumeImage = function(test) test:assertObject(love.graphics.newVolumeImage({ 'resources/love.png', 'resources/love2.png', 'resources/love3.png' }, { mipmaps = false, linear = false })) end -- love.graphics.validateShader love.test.graphics.validateShader = function(test) local pixelcode = [[ vec4 effect(vec4 color, Image tex, vec2 texture_coords, vec2 screen_coords) { vec4 texturecolor = Texel(tex, texture_coords); return texturecolor * color; } ]] local vertexcode = [[ vec4 position(mat4 transform_projection, vec4 vertex_position) { return transform_projection * vertex_position; } ]] -- check made up code first local status, _ = love.graphics.validateShader(true, 'nothing here', 'or here') test:assertFalse(status, 'check invalid shader code') -- check real code status, _ = love.graphics.validateShader(true, pixelcode, vertexcode) test:assertTrue(status, 'check valid shader code') end -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- ---------------------------------GRAPHICS STATE--------------------------------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -- love.graphics.getBackgroundColor love.test.graphics.getBackgroundColor = function(test) -- check default bg is black local r, g, b, a = love.graphics.getBackgroundColor() test:assertEquals(0, r, 'check default background r') test:assertEquals(0, g, 'check default background g') test:assertEquals(0, b, 'check default background b') test:assertEquals(1, a, 'check default background a') -- check set value returns correctly love.graphics.setBackgroundColor(1, 1, 1, 0) r, g, b, a = love.graphics.getBackgroundColor() test:assertEquals(1, r, 'check updated background r') test:assertEquals(1, g, 'check updated background g') test:assertEquals(1, b, 'check updated background b') test:assertEquals(0, a, 'check updated background a') love.graphics.setBackgroundColor(0, 0, 0, 1) -- reset end -- love.graphics.getBlendMode love.test.graphics.getBlendMode = function(test) -- check default blend mode local mode, alphamode = love.graphics.getBlendMode() test:assertEquals('alpha', mode, 'check default blend mode') test:assertEquals('alphamultiply', alphamode, 'check default alpha blend') -- check set mode returns correctly love.graphics.setBlendMode('add', 'premultiplied') mode, alphamode = love.graphics.getBlendMode() test:assertEquals('add', mode, 'check changed blend mode') test:assertEquals('premultiplied', alphamode, 'check changed alpha blend') love.graphics.setBlendMode('alpha', 'alphamultiply') -- reset end -- love.graphics.getCanvas love.test.graphics.getCanvas = function(test) -- by default should be nil if drawing to real screen test:assertEquals(nil, love.graphics.getCanvas(), 'check no canvas set') -- should return not nil when we target a canvas local canvas = love.graphics.newCanvas(16, 16) love.graphics.setCanvas(canvas) test:assertObject(love.graphics.getCanvas()) love.graphics.setCanvas() end -- love.graphics.getColor love.test.graphics.getColor = function(test) -- by default should be white local r, g, b, a = love.graphics.getColor() test:assertEquals(1, r, 'check default color r') test:assertEquals(1, g, 'check default color g') test:assertEquals(1, b, 'check default color b') test:assertEquals(1, a, 'check default color a') -- check set color is returned correctly love.graphics.setColor(0, 0, 0, 0) r, g, b, a = love.graphics.getColor() test:assertEquals(0, r, 'check changed color r') test:assertEquals(0, g, 'check changed color g') test:assertEquals(0, b, 'check changed color b') test:assertEquals(0, a, 'check changed color a') love.graphics.setColor(1, 1, 1, 1) -- reset end -- love.graphics.getColorMask love.test.graphics.getColorMask = function(test) -- by default should all be active local r, g, b, a = love.graphics.getColorMask() test:assertTrue(r, 'check default color mask r') test:assertTrue(g, 'check default color mask g') test:assertTrue(b, 'check default color mask b') test:assertTrue(a, 'check default color mask a') -- check set color mask is returned correctly love.graphics.setColorMask(false, false, true, false) r, g, b, a = love.graphics.getColorMask() test:assertFalse(r, 'check changed color mask r') test:assertFalse(g, 'check changed color mask g') test:assertTrue( b, 'check changed color mask b') test:assertFalse(a, 'check changed color mask a') love.graphics.setColorMask(true, true, true, true) -- reset end -- love.graphics.getDefaultFilter love.test.graphics.getDefaultFilter = function(test) -- we set this already for testsuite so we know what it should be local min, mag, anisotropy = love.graphics.getDefaultFilter() test:assertEquals('nearest', min, 'check default filter min') test:assertEquals('nearest', mag, 'check default filter mag') test:assertEquals(1, anisotropy, 'check default filter mag') end -- love.graphics.getDepthMode love.test.graphics.getDepthMode = function(test) -- by default should be always/write local comparemode, write = love.graphics.getDepthMode() test:assertEquals('always', comparemode, 'check default compare depth') test:assertFalse(write, 'check default depth buffer write') end -- love.graphics.getFont love.test.graphics.getFont = function(test) test:assertObject(love.graphics.getFont()) end -- love.graphics.getFrontFaceWinding love.test.graphics.getFrontFaceWinding = function(test) -- check default winding test:assertEquals('ccw', love.graphics.getFrontFaceWinding()) -- check setting value changes it correctly love.graphics.setFrontFaceWinding('cw') test:assertEquals('cw', love.graphics.getFrontFaceWinding()) love.graphics.setFrontFaceWinding('ccw') -- reset end -- love.graphics.getLineJoin love.test.graphics.getLineJoin = function(test) -- check default line join test:assertEquals('miter', love.graphics.getLineJoin()) -- check set value returned correctly love.graphics.setLineJoin('none') test:assertEquals('none', love.graphics.getLineJoin()) love.graphics.setLineJoin('miter') -- reset end -- love.graphics.getLineStyle love.test.graphics.getLineStyle = function(test) -- we know this should be as testsuite sets it! test:assertEquals('rough', love.graphics.getLineStyle()) -- check set value returned correctly love.graphics.setLineStyle('smooth') test:assertEquals('smooth', love.graphics.getLineStyle()) love.graphics.setLineStyle('rough') -- reset end -- love.graphics.getLineWidth love.test.graphics.getLineWidth = function(test) -- we know this should be as testsuite sets it! test:assertEquals(1, love.graphics.getLineWidth()) -- check set value returned correctly love.graphics.setLineWidth(10) test:assertEquals(10, love.graphics.getLineWidth()) love.graphics.setLineWidth(1) -- reset end -- love.graphics.getMeshCullMode love.test.graphics.getMeshCullMode = function(test) -- get default mesh culling test:assertEquals('none', love.graphics.getMeshCullMode()) -- check set value returned correctly love.graphics.setMeshCullMode('front') test:assertEquals('front', love.graphics.getMeshCullMode()) love.graphics.setMeshCullMode('back') -- reset end -- love.graphics.getPointSize love.test.graphics.getPointSize = function(test) -- get default point size test:assertEquals(1, love.graphics.getPointSize()) -- check set value returned correctly love.graphics.setPointSize(10) test:assertEquals(10, love.graphics.getPointSize()) love.graphics.setPointSize(1) -- reset end -- love.graphics.getScissor love.test.graphics.getScissor = function(test) -- should be no scissor atm local x, y, w, h = love.graphics.getScissor() test:assertEquals(nil, x, 'check no scissor') test:assertEquals(nil, y, 'check no scissor') test:assertEquals(nil, w, 'check no scissor') test:assertEquals(nil, h, 'check no scissor') -- check set value returned correctly love.graphics.setScissor(0, 0, 16, 16) x, y, w, h = love.graphics.getScissor() test:assertEquals(0, x, 'check scissor set') test:assertEquals(0, y, 'check scissor set') test:assertEquals(16, w, 'check scissor set') test:assertEquals(16, h, 'check scissor set') love.graphics.setScissor() -- reset end -- love.graphics.getShader love.test.graphics.getShader = function(test) -- should be no shader active test:assertEquals(nil, love.graphics.getShader(), 'check no active shader') end -- love.graphics.getStackDepth love.test.graphics.getStackDepth = function(test) -- by default should be none test:assertEquals(0, love.graphics.getStackDepth(), 'check no transforms in stack') -- now add 3 love.graphics.push() love.graphics.push() love.graphics.push() test:assertEquals(3, love.graphics.getStackDepth(), 'check 3 transforms in stack') -- now remove 2 love.graphics.pop() love.graphics.pop() test:assertEquals(1, love.graphics.getStackDepth(), 'check 1 transforms in stack') -- now back to 0 love.graphics.pop() test:assertEquals(0, love.graphics.getStackDepth(), 'check no transforms in stack') end -- love.graphics.getStencilState love.test.graphics.getStencilState = function(test) -- check default vals local action, comparemode, value = love.graphics.getStencilState( ) test:assertEquals('keep', action, 'check default stencil action') test:assertEquals('always', comparemode, 'check default stencil compare') test:assertEquals(0, value, 'check default stencil value') -- check set stencil values is returned love.graphics.setStencilState('replace', 'less', 255) local action, comparemode, value = love.graphics.getStencilState() test:assertEquals('replace', action, 'check changed stencil action') test:assertEquals('less', comparemode, 'check changed stencil compare') test:assertEquals(255, value, 'check changed stencil value') love.graphics.setStencilState() -- reset end -- love.graphics.intersectScissor love.test.graphics.intersectScissor = function(test) -- make a scissor for the left half, then interset to make the top half -- then we should be able to fill the canvas with red and only top 4x4 is filled local canvas = love.graphics.newCanvas(16, 16) love.graphics.setCanvas(canvas) love.graphics.clear(0, 0, 0, 1) love.graphics.origin() love.graphics.setScissor(0, 0, 8, 16) love.graphics.intersectScissor(0, 0, 4, 4) love.graphics.setColor(1, 0, 0, 1) love.graphics.rectangle('fill', 0, 0, 16, 16) love.graphics.setColor(1, 1, 1, 1) love.graphics.setScissor() love.graphics.setCanvas() local imgdata = love.graphics.readbackTexture(canvas) test:compareImg(imgdata) end -- love.graphics.isActive love.test.graphics.isActive = function(test) test:assertTrue(love.graphics.isActive(), 'check graphics is active') -- i mean if you got this far end -- love.graphics.isGammaCorrect love.test.graphics.isGammaCorrect = function(test) -- we know the config so know this is false test:assertNotNil(love.graphics.isGammaCorrect()) end -- love.graphics.isWireframe love.test.graphics.isWireframe = function(test) local name, version, vendor, device = love.graphics.getRendererInfo() if string.match(name, 'OpenGL ES') then test:skipTest('Wireframe not supported on OpenGL ES') else -- check off by default test:assertFalse(love.graphics.isWireframe(), 'check no wireframe by default') -- check on when enabled love.graphics.setWireframe(true) test:assertTrue(love.graphics.isWireframe(), 'check wireframe is set') love.graphics.setWireframe(false) -- reset end end -- love.graphics.reset love.test.graphics.reset = function(test) -- reset should reset current canvas and any colors/scissor local canvas = love.graphics.newCanvas(16, 16) love.graphics.setBackgroundColor(0, 0, 1, 1) love.graphics.setColor(0, 1, 0, 1) love.graphics.setCanvas(canvas) love.graphics.reset() local r, g, b, a = love.graphics.getBackgroundColor() test:assertEquals(1, r+g+b+a, 'check background reset') r, g, b, a = love.graphics.getColor() test:assertEquals(4, r+g+b+a, 'check color reset') test:assertEquals(nil, love.graphics.getCanvas(), 'check canvas reset') love.graphics.setDefaultFilter("nearest", "nearest") love.graphics.setLineStyle('rough') love.graphics.setPointSize(1) love.graphics.setLineWidth(1) end -- love.graphics.setBackgroundColor love.test.graphics.setBackgroundColor = function(test) -- check background is set love.graphics.setBackgroundColor(1, 0, 0, 1) local r, g, b, a = love.graphics.getBackgroundColor() test:assertEquals(1, r, 'check set bg r') test:assertEquals(0, g, 'check set bg g') test:assertEquals(0, b, 'check set bg b') test:assertEquals(1, a, 'check set bg a') love.graphics.setBackgroundColor(0, 0, 0, 1) end -- love.graphics.setBlendMode love.test.graphics.setBlendMode = function(test) -- create fully white canvas, then draw diff. pixels through blendmodes local canvas = love.graphics.newCanvas(16, 16) love.graphics.setCanvas(canvas) love.graphics.clear(0.5, 0.5, 0.5, 1) love.graphics.setBlendMode('add', 'alphamultiply') love.graphics.setColor(1, 0, 0, 1) love.graphics.rectangle('fill', 0, 0, 1, 1) love.graphics.setBlendMode('subtract', 'alphamultiply') love.graphics.setColor(1, 1, 1, 0.5) love.graphics.rectangle('fill', 15, 0, 1, 1) love.graphics.setBlendMode('multiply', 'premultiplied') love.graphics.setColor(0, 1, 0, 1) love.graphics.rectangle('fill', 15, 15, 1, 1) love.graphics.setBlendMode('replace', 'premultiplied') love.graphics.setColor(0, 0, 1, 0.5) love.graphics.rectangle('fill', 0, 15, 1, 1) love.graphics.setColor(1, 1, 1, 1) love.graphics.setCanvas() local imgdata = love.graphics.readbackTexture(canvas) love.graphics.setBlendMode('alpha', 'alphamultiply') -- reset -- need 1rgba tolerance here on some machines test.rgba_tolerance = 1 test:compareImg(imgdata) end -- love.graphics.setCanvas love.test.graphics.setCanvas = function(test) -- make 2 canvas, set to each, draw one to the other, check output local canvas1 = love.graphics.newCanvas(16, 16) local canvas2 = love.graphics.newCanvas(16, 16, {mipmaps = "auto"}) love.graphics.setCanvas(canvas1) test:assertEquals(canvas1, love.graphics.getCanvas(), 'check canvas 1 set') love.graphics.clear(1, 0, 0, 1) love.graphics.setCanvas(canvas2) test:assertEquals(canvas2, love.graphics.getCanvas(), 'check canvas 2 set') love.graphics.clear(0, 0, 0, 1) love.graphics.draw(canvas1, 0, 0) love.graphics.setCanvas() test:assertEquals(nil, love.graphics.getCanvas(), 'check no canvas set') local imgdata = love.graphics.readbackTexture(canvas2) test:compareImg(imgdata) local imgdata2 = love.graphics.readbackTexture(canvas2, 1, 2) -- readback mipmap test:compareImg(imgdata2) end -- love.graphics.setColor love.test.graphics.setColor = function(test) -- set colors, draw rect, check color local canvas = love.graphics.newCanvas(16, 16) love.graphics.setCanvas(canvas) love.graphics.clear(0, 0, 0, 1) love.graphics.setColor(1, 0, 0, 1) local r, g, b, a = love.graphics.getColor() test:assertEquals(1, r, 'check r set') test:assertEquals(0, g, 'check g set') test:assertEquals(0, b, 'check b set') test:assertEquals(1, a, 'check a set') love.graphics.rectangle('fill', 0, 0, 16, 1) love.graphics.setColor(1, 1, 0, 1) love.graphics.rectangle('fill', 0, 1, 16, 1) love.graphics.setColor(0, 1, 0, 0.5) love.graphics.rectangle('fill', 0, 2, 16, 1) love.graphics.setColor(0, 0, 1, 1) love.graphics.rectangle('fill', 0, 3, 16, 1) love.graphics.setColor(1, 1, 1, 1) love.graphics.setCanvas() local imgdata = love.graphics.readbackTexture(canvas) test:compareImg(imgdata) end -- love.graphics.setColorMask love.test.graphics.setColorMask = function(test) -- set mask, draw stuff, check output pixels local canvas = love.graphics.newCanvas(16, 16) love.graphics.setCanvas(canvas) love.graphics.clear(0, 0, 0, 1) -- mask off blue love.graphics.setColorMask(true, true, false, true) local r, g, b, a = love.graphics.getColorMask() test:assertEquals(r, true, 'check r mask') test:assertEquals(g, true, 'check g mask') test:assertEquals(b, false, 'check b mask') test:assertEquals(a, true, 'check a mask') -- draw "black" which should then turn to yellow love.graphics.setColor(1, 1, 1, 1) love.graphics.rectangle('fill', 0, 0, 16, 16) love.graphics.setColorMask(true, true, true, true) love.graphics.setCanvas() local imgdata = love.graphics.readbackTexture(canvas) test:compareImg(imgdata) end -- love.graphics.setDefaultFilter love.test.graphics.setDefaultFilter = function(test) -- check setting filter val works love.graphics.setDefaultFilter('linear', 'linear', 1) local min, mag, anisotropy = love.graphics.getDefaultFilter() test:assertEquals('linear', min, 'check default filter min') test:assertEquals('linear', mag, 'check default filter mag') test:assertEquals(1, anisotropy, 'check default filter mag') love.graphics.setDefaultFilter('nearest', 'nearest', 1) -- reset end -- love.graphics.setDepthMode love.test.graphics.setDepthMode = function(test) -- check documented modes are valid local comparemode, write = love.graphics.getDepthMode() local modes = { 'equal', 'notequal', 'less', 'lequal', 'gequal', 'greater', 'never', 'always' } for m=1,#modes do love.graphics.setDepthMode(modes[m], true) test:assertEquals(modes[m], love.graphics.getDepthMode(), 'check depth mode ' .. modes[m] .. ' set') end love.graphics.setDepthMode(comparemode, write) -- @TODO better graphics drawing specific test end -- love.graphics.setFont love.test.graphics.setFont = function(test) -- set font doesnt return anything so draw with the test font local canvas = love.graphics.newCanvas(16, 16) love.graphics.setFont(Font) love.graphics.setCanvas(canvas) love.graphics.clear(0, 0, 0, 1) love.graphics.setColor(1, 0, 0, 1) love.graphics.print('love', 0, 3) love.graphics.setColor(1, 1, 1, 1) love.graphics.setCanvas() local imgdata = love.graphics.readbackTexture(canvas) test:compareImg(imgdata) end -- love.graphics.setFrontFaceWinding love.test.graphics.setFrontFaceWinding = function(test) -- check documented modes are valid local original = love.graphics.getFrontFaceWinding() love.graphics.setFrontFaceWinding('cw') test:assertEquals('cw', love.graphics.getFrontFaceWinding(), 'check ffw cw set') love.graphics.setFrontFaceWinding('ccw') test:assertEquals('ccw', love.graphics.getFrontFaceWinding(), 'check ffw ccw set') love.graphics.setFrontFaceWinding(original) -- @TODO better graphics drawing specific test local shader = love.graphics.newShader[[ vec4 effect(vec4 c, Image tex, vec2 tc, vec2 pc) { return gl_FrontFacing ? vec4(0.0, 1.0, 0.0, 1.0) : vec4(1.0, 0.0, 0.0, 1.0); } ]] local dummyimg = love.graphics.newImage(love.image.newImageData(1, 1)) local canvas = love.graphics.newCanvas(16, 16) love.graphics.push("all") love.graphics.setCanvas(canvas) love.graphics.setShader(shader) love.graphics.draw(dummyimg, 0, 0, 0, 16, 16) love.graphics.pop() local imgdata = love.graphics.readbackTexture(canvas) test:compareImg(imgdata) end -- love.graphics.setLineJoin love.test.graphics.setLineJoin = function(test) local canvas = love.graphics.newCanvas(16, 16) love.graphics.setFont(Font) love.graphics.setCanvas(canvas) love.graphics.clear(0, 0, 0, 1) local line = {0,1,8,1,8,8} love.graphics.setLineStyle('rough') love.graphics.setLineWidth(2) love.graphics.setColor(1, 0, 0) love.graphics.setLineJoin('bevel') love.graphics.line(line) love.graphics.translate(0, 4) love.graphics.setColor(1, 1, 0) love.graphics.setLineJoin('none') love.graphics.line(line) love.graphics.translate(0, 4) love.graphics.setColor(0, 0, 1) love.graphics.setLineJoin('miter') love.graphics.line(line) love.graphics.setColor(1, 1, 1) love.graphics.setLineWidth(1) love.graphics.origin() love.graphics.setCanvas() local imgdata = love.graphics.readbackTexture(canvas) test:compareImg(imgdata) end -- love.graphics.setLineStyle love.test.graphics.setLineStyle = function(test) local canvas = love.graphics.newCanvas(16, 16) love.graphics.setFont(Font) love.graphics.setCanvas(canvas) love.graphics.clear(0, 0, 0, 1) love.graphics.setColor(1, 0, 0) local line = {0,1,16,1} love.graphics.setLineStyle('rough') love.graphics.line(line) love.graphics.translate(0, 4) love.graphics.setLineStyle('smooth') love.graphics.line(line) love.graphics.setLineStyle('rough') love.graphics.setColor(1, 1, 1) love.graphics.origin() love.graphics.setCanvas() local imgdata = love.graphics.readbackTexture(canvas) -- linux runner needs a 1/255 tolerance for the blend between a rough line + bg if GITHUB_RUNNER and test:isOS('Linux') then test.rgba_tolerance = 1 end test:compareImg(imgdata) end -- love.graphics.setLineWidth love.test.graphics.setLineWidth = function(test) local canvas = love.graphics.newCanvas(16, 16) love.graphics.setFont(Font) love.graphics.setCanvas(canvas) love.graphics.clear(0, 0, 0, 1) local line = {0,1,8,1,8,8} love.graphics.setColor(1, 0, 0) love.graphics.setLineWidth(2) love.graphics.line(line) love.graphics.translate(0, 4) love.graphics.setColor(1, 1, 0) love.graphics.setLineWidth(3) love.graphics.line(line) love.graphics.translate(0, 4) love.graphics.setColor(0, 0, 1) love.graphics.setLineWidth(4) love.graphics.line(line) love.graphics.setColor(1, 1, 1) love.graphics.setLineWidth(1) love.graphics.origin() love.graphics.setCanvas() local imgdata = love.graphics.readbackTexture(canvas) test:compareImg(imgdata) end -- love.graphics.setMeshCullMode love.test.graphics.setMeshCullMode = function(test) -- check documented modes are valid local original = love.graphics.getMeshCullMode() local modes = {'back', 'front', 'none'} for m=1,#modes do love.graphics.setMeshCullMode(modes[m]) test:assertEquals(modes[m], love.graphics.getMeshCullMode(), 'check mesh cull mode ' .. modes[m] .. ' was set') end love.graphics.setMeshCullMode(original) -- @TODO better graphics drawing specific test end -- love.graphics.setScissor love.test.graphics.setScissor = function(test) -- make a scissor for the left half -- then we should be able to fill the canvas with red and only left is filled local canvas = love.graphics.newCanvas(16, 16) love.graphics.setCanvas(canvas) love.graphics.clear(0, 0, 0, 1) love.graphics.origin() love.graphics.setScissor(0, 0, 8, 16) love.graphics.setColor(1, 0, 0, 1) love.graphics.rectangle('fill', 0, 0, 16, 16) love.graphics.setColor(1, 1, 1, 1) love.graphics.setScissor() love.graphics.setCanvas() local imgdata = love.graphics.readbackTexture(canvas) test:compareImg(imgdata) end -- love.graphics.setShader love.test.graphics.setShader = function(test) -- make a shader that will only ever draw yellow local pixelcode = [[ vec4 effect(vec4 color, Image tex, vec2 texture_coords, vec2 screen_coords) { vec4 texturecolor = Texel(tex, texture_coords); return vec4(1.0,1.0,0.0,1.0); } ]] local vertexcode = [[ vec4 position(mat4 transform_projection, vec4 vertex_position) { return transform_projection * vertex_position; } ]] local shader = love.graphics.newShader(pixelcode, vertexcode) local canvas = love.graphics.newCanvas(16, 16) love.graphics.setCanvas(canvas) love.graphics.clear(0, 0, 0, 1) love.graphics.setShader(shader) -- draw red rectangle love.graphics.setColor(1, 0, 0, 1) love.graphics.rectangle('fill', 0, 0, 16, 16) love.graphics.setShader() love.graphics.setColor(1, 1, 1, 1) love.graphics.setCanvas() local imgdata = love.graphics.readbackTexture(canvas) test:compareImg(imgdata) end -- love.graphics.setStencilState love.test.graphics.setStencilState = function(test) local canvas = love.graphics.newCanvas(16, 16) love.graphics.setCanvas({canvas, stencil=true}) love.graphics.clear(0, 0, 0, 1) love.graphics.setStencilState('replace', 'always', 1) love.graphics.circle('fill', 8, 8, 6) love.graphics.setStencilState('keep', 'greater', 0) love.graphics.setColor(1, 0, 0, 1) love.graphics.rectangle('fill', 0, 0, 16, 16) love.graphics.setColor(1, 1, 1, 1) love.graphics.setStencilState() love.graphics.setCanvas() local imgdata = love.graphics.readbackTexture(canvas) test:compareImg(imgdata) end -- love.graphics.setWireframe love.test.graphics.setWireframe = function(test) local name, version, vendor, device = love.graphics.getRendererInfo() if string.match(name, 'OpenGL ES') then test:skipTest('Wireframe not supported on OpenGL ES') else -- check wireframe outlines love.graphics.setWireframe(true) local canvas = love.graphics.newCanvas(16, 16) love.graphics.setCanvas(canvas) love.graphics.clear(0, 0, 0, 1) love.graphics.setColor(1, 1, 0, 1) love.graphics.rectangle('fill', 2, 2, 13, 13) love.graphics.setColor(1, 1, 1, 1) love.graphics.setCanvas() love.graphics.setWireframe(false) local imgdata = love.graphics.readbackTexture(canvas) -- on macOS runners wireframes are drawn 1px off from the target if GITHUB_RUNNER and test:isOS('OS X') then test.pixel_tolerance = 1 end test:compareImg(imgdata) end end -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -------------------------------COORDINATE SYSTEM-------------------------------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -- love.graphics.applyTransform love.test.graphics.applyTransform = function(test) -- use transform object to translate the drawn rectangle local transform = love.math.newTransform() transform:translate(10, 0) local canvas = love.graphics.newCanvas(16, 16) love.graphics.setCanvas(canvas) love.graphics.clear(0, 0, 0, 1) love.graphics.setColor(1, 0, 0, 1) love.graphics.applyTransform(transform) love.graphics.rectangle('fill', 0, 0, 1, 1) love.graphics.setColor(1, 1, 1, 1) love.graphics.setCanvas() local imgdata = love.graphics.readbackTexture(canvas) test:compareImg(imgdata) end -- love.graphics.inverseTransformPoint love.test.graphics.inverseTransformPoint = function(test) -- start with 0, 0 local sx, sy = love.graphics.inverseTransformPoint(0, 0) test:assertEquals(0, sx, 'check starting x is 0') test:assertEquals(0, sy, 'check starting y is 0') -- check translation effects the point love.graphics.translate(1, 5) sx, sy = love.graphics.inverseTransformPoint(1, 5) test:assertEquals(0, sx, 'check transformed x is 0') test:assertEquals(0, sy, 'check transformed y is 0') love.graphics.origin() end -- love.graphics.origin love.test.graphics.origin = function(test) -- if we do some translations and scaling -- using .origin() should reset it all and draw the pixel at 0,0 local canvas = love.graphics.newCanvas(16, 16) love.graphics.setCanvas(canvas) love.graphics.clear(0, 0, 0, 1) love.graphics.origin() love.graphics.translate(10, 10) love.graphics.scale(1, 1) love.graphics.shear(20, 20) love.graphics.origin() love.graphics.setColor(1, 0, 0, 1) love.graphics.rectangle('fill', 0, 0, 1, 1) love.graphics.setColor(1, 1, 1, 1) love.graphics.setCanvas() local imgdata = love.graphics.readbackTexture(canvas) test:compareImg(imgdata) end -- love.graphics.pop love.test.graphics.pop = function(test) -- if we push at the start, and then run a pop -- it should reset it all and draw the pixel at 0,0 local canvas = love.graphics.newCanvas(16, 16) love.graphics.setCanvas(canvas) love.graphics.clear(0, 0, 0, 1) love.graphics.push() love.graphics.translate(10, 10) love.graphics.scale(1, 1) love.graphics.shear(20, 20) love.graphics.pop() love.graphics.setColor(1, 0, 0, 1) love.graphics.rectangle('fill', 0, 0, 1, 1) love.graphics.setColor(1, 1, 1, 1) love.graphics.setCanvas() local imgdata = love.graphics.readbackTexture(canvas) test:compareImg(imgdata) end -- love.graphics.push love.test.graphics.push = function(test) -- if we push at the start, do some stuff, then another push -- 1 pop should only go back 1 push and draw the pixel at 1, 1 local canvas = love.graphics.newCanvas(16, 16) love.graphics.setCanvas(canvas) love.graphics.clear(0, 0, 0, 1) love.graphics.push() love.graphics.scale(1, 1) love.graphics.shear(20, 20) love.graphics.push() love.graphics.translate(1, 1) love.graphics.pop() love.graphics.setColor(1, 0, 0, 1) love.graphics.rectangle('fill', 0, 0, 1, 1) love.graphics.setColor(1, 1, 1, 1) love.graphics.pop() love.graphics.setCanvas() local imgdata = love.graphics.readbackTexture(canvas) test:compareImg(imgdata) end -- love.graphics.replaceTransform love.test.graphics.replaceTransform = function(test) -- if use transform object to translate -- set some normal transforms first which should get overwritten local transform = love.math.newTransform() transform:translate(10, 0) local canvas = love.graphics.newCanvas(16, 16) love.graphics.setCanvas(canvas) love.graphics.clear(0, 0, 0, 1) love.graphics.setColor(1, 0, 0, 1) love.graphics.scale(2, 2) love.graphics.translate(10, 10) love.graphics.replaceTransform(transform) love.graphics.rectangle('fill', 0, 0, 1, 1) love.graphics.setColor(1, 1, 1, 1) love.graphics.setCanvas() local imgdata = love.graphics.readbackTexture(canvas) test:compareImg(imgdata) end -- love.graphics.rotate love.test.graphics.rotate = function(test) -- starting at 0,0, we rotate by 90deg and then draw -- we can then check the drawn rectangle is rotated local canvas = love.graphics.newCanvas(16, 16) love.graphics.setCanvas(canvas) love.graphics.clear(0, 0, 0, 1) love.graphics.setColor(1, 0, 0, 1) love.graphics.translate(4, 0) love.graphics.rotate(90 * (math.pi/180)) love.graphics.rectangle('fill', 0, 0, 4, 4) love.graphics.setColor(1, 1, 1, 1) love.graphics.setCanvas() local imgdata = love.graphics.readbackTexture(canvas) test:compareImg(imgdata) end -- love.graphics.scale love.test.graphics.scale = function(test) -- starting at 0,0, we scale by 4x and then draw -- we can then check the drawn rectangle covers the whole canvas local canvas = love.graphics.newCanvas(16, 16) love.graphics.setCanvas(canvas) love.graphics.clear(0, 0, 0, 1) love.graphics.setColor(1, 0, 0, 1) love.graphics.scale(4, 4) love.graphics.rectangle('fill', 0, 0, 4, 4) love.graphics.setColor(1, 1, 1, 1) love.graphics.setCanvas() local imgdata = love.graphics.readbackTexture(canvas) test:compareImg(imgdata) end -- love.graphics.shear love.test.graphics.shear = function(test) -- starting at 0,0, we shear by 2x and then draw -- we can then check the drawn rectangle has moved over local canvas = love.graphics.newCanvas(16, 16) love.graphics.setCanvas(canvas) love.graphics.clear(0, 0, 0, 1) love.graphics.origin() love.graphics.setColor(1, 0, 0, 1) love.graphics.shear(2, 0) love.graphics.rectangle('fill', 0, 0, 4, 4) love.graphics.setColor(1, 1, 1, 1) love.graphics.setCanvas() local imgdata1 = love.graphics.readbackTexture(canvas) test:compareImg(imgdata1) -- same again at 0,0, we shear by 2y and then draw -- we can then check the drawn rectangle has moved down love.graphics.setCanvas(canvas) love.graphics.clear(0, 0, 0, 1) love.graphics.origin() love.graphics.setColor(1, 0, 0, 1) love.graphics.shear(0, 2) love.graphics.rectangle('fill', 0, 0, 4, 4) love.graphics.setColor(1, 1, 1, 1) love.graphics.setCanvas() local imgdata2 = love.graphics.readbackTexture(canvas) test:compareImg(imgdata2) end -- love.graphics.transformPoint love.test.graphics.transformPoint = function(test) -- start with 0, 0 local sx, sy = love.graphics.transformPoint(0, 0) test:assertEquals(0, sx, 'check starting x is 0') test:assertEquals(0, sy, 'check starting y is 0') -- check translation effects the point love.graphics.translate(1, 5) sx, sy = love.graphics.transformPoint(0, 0) test:assertEquals(1, sx, 'check transformed x is 0') test:assertEquals(5, sy, 'check transformed y is 10') end -- love.graphics.translate love.test.graphics.translate = function(test) -- starting at 0,0, we translate 4 times and draw a pixel at each point -- we can then check the 4 points are now red local canvas = love.graphics.newCanvas(16, 16) love.graphics.setCanvas(canvas) love.graphics.clear(0, 0, 0, 1) love.graphics.setColor(1, 0, 0, 1) love.graphics.translate(5, 0) love.graphics.rectangle('fill', 0, 0, 1, 1) love.graphics.translate(0, 5) love.graphics.rectangle('fill', 0, 0, 1, 1) love.graphics.translate(-5, 0) love.graphics.rectangle('fill', 0, 0, 1, 1) love.graphics.translate(0, -5) love.graphics.rectangle('fill', 0, 0, 1, 1) love.graphics.setColor(1, 1, 1, 1) love.graphics.setCanvas() local imgdata = love.graphics.readbackTexture(canvas) test:compareImg(imgdata) end -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -------------------------------------WINDOW------------------------------------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -- love.graphics.getDPIScale -- @NOTE hardware dependent so can't check result love.test.graphics.getDPIScale = function(test) test:assertNotNil(love.graphics.getDPIScale()) end -- love.graphics.getDimensions love.test.graphics.getDimensions = function(test) -- check graphics dimensions match window dimensions local gwidth, gheight = love.graphics.getDimensions() local wwidth, wheight, _ = love.window.getMode() test:assertEquals(wwidth, gwidth, 'check graphics dimension w matches window w') test:assertEquals(wheight, gheight, 'check graphics dimension h matches window h') end -- love.graphics.getHeight love.test.graphics.getHeight = function(test) -- check graphics height match window height local wwidth, wheight, _ = love.window.getMode() test:assertEquals(wheight, love.graphics.getHeight(), 'check graphics h matches window h') end -- love.graphics.getPixelDimensions love.test.graphics.getPixelDimensions = function(test) -- check graphics dimensions match window dimensions relative to dpi local dpi = love.graphics.getDPIScale() local gwidth, gheight = love.graphics.getPixelDimensions() local wwidth, wheight, _ = love.window.getMode() test:assertEquals(wwidth, gwidth/dpi, 'check graphics pixel dpi w matches window w') test:assertEquals(wheight, gheight/dpi, 'check graphics pixel dpi h matches window h') end -- love.graphics.getPixelHeight love.test.graphics.getPixelHeight = function(test) -- check graphics height match window height relative to dpi local dpi = love.graphics.getDPIScale() local wwidth, wheight, _ = love.window.getMode() test:assertEquals(wheight,love.graphics.getPixelHeight()/dpi, 'check graphics pixel dpi h matches window h') end -- love.graphics.getPixelWidth love.test.graphics.getPixelWidth = function(test) -- check graphics width match window width relative to dpi local dpi = love.graphics.getDPIScale() local wwidth, wheight, _ = love.window.getMode() test:assertEquals(wwidth, love.graphics.getWidth()/dpi, 'check graphics pixel dpi w matches window w') end -- love.graphics.getWidth love.test.graphics.getWidth = function(test) -- check graphics width match window width local wwidth, wheight, _ = love.window.getMode() test:assertEquals(wwidth, love.graphics.getWidth(), 'check graphics w matches window w') end -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -------------------------------SYSTEM INFORMATION------------------------------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -- love.graphics.getTextureFormats love.test.graphics.getTextureFormats = function(test) local formats = { 'hdr', 'r8i', 'r8ui', 'r16i', 'r16ui', 'r32i', 'r32ui', 'rg8i', 'rg8ui', 'rg16i', 'rg16ui', 'rg32i', 'rg32ui', 'bgra8', 'r8', 'rgba8i', 'rgba8ui', 'rgba16i', 'rg8', 'rgba32i', 'rgba32ui', 'rgba8', 'DXT1', 'r16', 'DXT5', 'rg16', 'BC4s', 'rgba16', 'BC5s', 'r16f', 'BC6hs', 'BC7', 'PVR1rgb2', 'rg16f', 'PVR1rgba2', 'rgba16f', 'ETC1', 'r32f', 'ETC2rgba', 'rg32f', 'EACr', 'rgba32f', 'EACrg', 'rgba4', 'ASTC4x4', 'ASTC5x4', 'rgb5a1', 'ASTC6x5', 'rgb565', 'ASTC8x5', 'ASTC8x6', 'rgb10a2', 'ASTC10x5', 'rg11b10f', 'ASTC10x8', 'ASTC10x10', 'ASTC12x10', 'ASTC12x12', 'normal', 'srgba8', 'la8', 'ASTC10x6', 'ASTC8x8', 'ASTC6x6', 'ASTC5x5', 'EACrgs', 'EACrs', 'ETC2rgba1', 'ETC2rgb', 'PVR1rgba4', 'PVR1rgb4', 'BC6h', 'BC5', 'BC4', 'DXT3', 'rgba16ui', 'bgra8srgb', 'depth16', 'depth24', 'depth32f', 'depth24stencil8', 'depth32fstencil8', 'stencil8' } local supported = love.graphics.getTextureFormats({ canvas = true }) test:assertNotNil(supported) for f=1,#formats do test:assertNotEquals(nil, supported[formats[f] ], 'expected a key for format: ' .. formats[f]) end end -- love.graphics.getRendererInfo -- @NOTE hardware dependent so best can do is nil checking love.test.graphics.getRendererInfo = function(test) local name, version, vendor, device = love.graphics.getRendererInfo() test:assertNotNil(name) test:assertNotNil(version) test:assertNotNil(vendor) test:assertNotNil(device) end -- love.graphics.getStats -- @NOTE cant really predict some of these so just nil check for most love.test.graphics.getStats = function(test) local stattypes = { 'drawcalls', 'canvasswitches', 'texturememory', 'shaderswitches', 'drawcallsbatched', 'textures', 'fonts' } local stats = love.graphics.getStats() for s=1,#stattypes do test:assertNotEquals(nil, stats[stattypes[s] ], 'expected a key for stat: ' .. stattypes[s]) end end -- love.graphics.getSupported love.test.graphics.getSupported = function(test) -- cant check values as hardware dependent but we can check the keys in the -- table match what the documentation lists local gfs = { 'clampzero', 'lighten', 'glsl3', 'instancing', 'fullnpot', 'pixelshaderhighp', 'shaderderivatives', 'indirectdraw', 'copytexturetobuffer', 'multicanvasformats', 'clampone', 'glsl4' } local features = love.graphics.getSupported() for g=1,#gfs do test:assertNotEquals(nil, features[gfs[g] ], 'expected a key for graphic feature: ' .. gfs[g]) end end -- love.graphics.getSystemLimits love.test.graphics.getSystemLimits = function(test) -- cant check values as hardware dependent but we can check the keys in the -- table match what the documentation lists local glimits = { 'texelbuffersize', 'shaderstoragebuffersize', 'threadgroupsx', 'threadgroupsy', 'pointsize', 'texturesize', 'texturelayers', 'volumetexturesize', 'cubetexturesize', 'anisotropy', 'texturemsaa', 'multicanvas', 'threadgroupsz' } local limits = love.graphics.getSystemLimits() for g=1,#glimits do test:assertNotEquals(nil, limits[glimits[g] ], 'expected a key for system limit: ' .. glimits[g]) end end -- love.graphics.getTextureTypes love.test.graphics.getTextureTypes = function(test) -- cant check values as hardware dependent but we can check the keys in the -- table match what the documentation lists local ttypes = { '2d', 'array', 'cube', 'volume' } local types = love.graphics.getTextureTypes() for t=1,#ttypes do test:assertNotEquals(nil, types[ttypes[t] ], 'expected a key for texture type: ' .. ttypes[t]) end end ================================================ FILE: testing/tests/image.lua ================================================ -- love.image -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- ------------------------------------OBJECTS------------------------------------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -- CompressedImageData (love.image.newCompressedImageData) love.test.image.CompressedImageData = function(test) -- create obj local idata = love.image.newCompressedData('resources/love.dxt1') test:assertObject(idata) -- check string + size test:assertNotEquals(nil, idata:getString(), 'check data string') test:assertEquals(2744, idata:getSize(), 'check data size') -- check img dimensions local iw, ih = idata:getDimensions() test:assertEquals(64, iw, 'check image dimension w') test:assertEquals(64, ih, 'check image dimension h') test:assertEquals(64, idata:getWidth(), 'check image direct w') test:assertEquals(64, idata:getHeight(), 'check image direct h') -- check format test:assertEquals('DXT1', idata:getFormat(), 'check image format') -- check mipmap count test:assertEquals(7, idata:getMipmapCount(), 'check mipmap count') -- check linear test:assertFalse(idata:isLinear(), 'check not linear') idata:setLinear(true) test:assertTrue(idata:isLinear(), 'check now linear') end -- ImageData (love.image.newImageData) love.test.image.ImageData = function(test) -- create obj local idata = love.image.newImageData('resources/love.png') test:assertObject(idata) -- check string + size test:assertNotEquals(nil, idata:getString(), 'check data string') test:assertEquals(16384, idata:getSize(), 'check data size') -- check img dimensions local iw, ih = idata:getDimensions() test:assertEquals(64, iw, 'check image dimension w') test:assertEquals(64, ih, 'check image dimension h') test:assertEquals(64, idata:getWidth(), 'check image direct w') test:assertEquals(64, idata:getHeight(), 'check image direct h') -- check format test:assertEquals('rgba8', idata:getFormat(), 'check image format') -- manipulate image data so white heart is black local mapdata = function(x, y, r, g, b, a) if r == 1 and g == 1 and b == 1 then r = 0; g = 0; b = 0 end return r, g, b, a end idata:mapPixel(mapdata, 0, 0, 64, 64) local r1, g1, b1 = idata:getPixel(25, 25) test:assertEquals(0, r1+g1+b1, 'check mapped black') -- map some other data into the idata local idata2 = love.image.newImageData('resources/loveinv.png') idata:paste(idata2, 0, 0, 0, 0) r1, g1, b1 = idata:getPixel(25, 25) test:assertEquals(3, r1+g1+b1, 'check back to white') -- set pixels directly idata:setPixel(25, 25, 1, 0, 0, 1) local r2, g2, b2 = idata:getPixel(25, 25) test:assertEquals(1, r2+g2+b2, 'check set to red') -- check encoding to an image (png) idata:encode('png', 'test-encode.png') local read1 = love.filesystem.openFile('test-encode.png', 'r') test:assertNotNil(read1) love.filesystem.remove('test-encode.png') -- check encoding to an image (exr) local edata = love.image.newImageData(100, 100, 'r16f') edata:encode('exr', 'test-encode.exr') local read2 = love.filesystem.openFile('test-encode.exr', 'r') test:assertNotNil(read2) love.filesystem.remove('test-encode.exr') -- check linear test:assertFalse(idata:isLinear(), 'check not linear') idata:setLinear(true) test:assertTrue(idata:isLinear(), 'check now linear') end -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- ------------------------------------METHODS------------------------------------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -- love.image.isCompressed -- @NOTE really we need to test each of the files listed here: -- https://love2d.org/wiki/CompressedImageFormat -- also need to be platform dependent (e.g. dxt not suppored on phones) love.test.image.isCompressed = function(test) test:assertTrue(love.image.isCompressed('resources/love.dxt1'), 'check dxt1 valid compressed image') end -- love.image.newCompressedData -- @NOTE this is just basic nil checking, objs have their own test method love.test.image.newCompressedData = function(test) test:assertObject(love.image.newCompressedData('resources/love.dxt1')) end -- love.image.newImageData -- @NOTE this is just basic nil checking, objs have their own test method love.test.image.newImageData = function(test) test:assertObject(love.image.newImageData('resources/love.png')) test:assertObject(love.image.newImageData(16, 16, 'rgba8', nil)) end ================================================ FILE: testing/tests/joystick.lua ================================================ -- love.joystick -- @NOTE we can't test this module fully as it's hardware dependent -- however we can test methods do what is expected and can handle certain params -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- ------------------------------------METHODS------------------------------------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -- love.joystick.getGamepadMappingString love.test.joystick.getGamepadMappingString = function(test) local mapping = love.joystick.getGamepadMappingString('faker') test:assertEquals(nil, mapping, 'check no mapping for fake gui') end -- love.joystick.getJoystickCount love.test.joystick.getJoystickCount = function(test) local count = love.joystick.getJoystickCount() test:assertGreaterEqual(0, count, 'check number') end -- love.joystick.getJoysticks love.test.joystick.getJoysticks = function(test) local joysticks = love.joystick.getJoysticks() test:assertGreaterEqual(0, #joysticks, 'check is count') end -- love.joystick.loadGamepadMappings love.test.joystick.loadGamepadMappings = function(test) local ok, err = pcall(love.joystick.loadGamepadMappings, 'fakefile.txt') test:assertEquals(false, ok, 'check invalid file') love.joystick.loadGamepadMappings('resources/mappings.txt') end -- love.joystick.saveGamepadMappings love.test.joystick.saveGamepadMappings = function(test) love.joystick.loadGamepadMappings('resources/mappings.txt') local mapping = love.joystick.saveGamepadMappings() test:assertGreaterEqual(0, #mapping, 'check something mapped') end -- love.joystick.setGamepadMapping love.test.joystick.setGamepadMapping = function(test) local guid = '030000005e040000130b000011050000' local mappings = { love.joystick.setGamepadMapping(guid, 'a', 'button', 1, nil), love.joystick.setGamepadMapping(guid, 'b', 'button', 2, nil), love.joystick.setGamepadMapping(guid, 'x', 'button', 3, nil), love.joystick.setGamepadMapping(guid, 'y', 'button', 4, nil), love.joystick.setGamepadMapping(guid, 'back', 'button', 5, nil), love.joystick.setGamepadMapping(guid, 'start', 'button', 6, nil), love.joystick.setGamepadMapping(guid, 'guide', 'button', 7, nil), love.joystick.setGamepadMapping(guid, 'leftstick', 'button', 8, nil), love.joystick.setGamepadMapping(guid, 'leftshoulder', 'button', 9, nil), love.joystick.setGamepadMapping(guid, 'rightstick', 'button', 10, nil), love.joystick.setGamepadMapping(guid, 'rightshoulder', 'button', 11, nil), love.joystick.setGamepadMapping(guid, 'dpup', 'button', 12, nil), love.joystick.setGamepadMapping(guid, 'dpdown', 'button', 13, nil), love.joystick.setGamepadMapping(guid, 'dpleft', 'button', 14, nil), love.joystick.setGamepadMapping(guid, 'dpright', 'button', 15, nil), love.joystick.setGamepadMapping(guid, 'dpup', 'button', 12, 'u'), love.joystick.setGamepadMapping(guid, 'dpdown', 'button', 13, 'd'), love.joystick.setGamepadMapping(guid, 'dpleft', 'button', 14, 'l'), love.joystick.setGamepadMapping(guid, 'dpright', 'button', 15, 'r'), love.joystick.setGamepadMapping(guid, 'dpup', 'hat', 12, 'lu'), love.joystick.setGamepadMapping(guid, 'dpdown', 'hat', 13, 'ld'), love.joystick.setGamepadMapping(guid, 'dpleft', 'hat', 14, 'ru'), love.joystick.setGamepadMapping(guid, 'dpright', 'hat', 15, 'rd'), love.joystick.setGamepadMapping(guid, 'leftstick', 'axis', 8, 'c') } for m=1,#mappings do test:assertEquals(true, mappings[m], 'check mapping #' .. tostring(m)) end end ================================================ FILE: testing/tests/keyboard.lua ================================================ -- love.keyboard -- @NOTE we can't test this module fully as it's hardware dependent -- however we can test methods do what is expected and can handle certain params -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- ------------------------------------METHODS------------------------------------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -- love.keyboard.getKeyFromScancode love.test.keyboard.getKeyFromScancode = function(test) test:assertEquals('function', type(love.keyboard.getKeyFromScancode)) end -- love.keyboard.getScancodeFromKey love.test.keyboard.getScancodeFromKey = function(test) test:assertEquals('function', type(love.keyboard.getScancodeFromKey)) end -- love.keyboard.hasKeyRepeat love.test.keyboard.hasKeyRepeat = function(test) local enabled = love.keyboard.hasKeyRepeat() test:assertNotNil(enabled) end -- love.keyboard.hasScreenKeyboard love.test.keyboard.hasScreenKeyboard = function(test) local enabled = love.keyboard.hasScreenKeyboard() test:assertNotNil(enabled) end -- love.keyboard.hasTextInput love.test.keyboard.hasTextInput = function(test) local enabled = love.keyboard.hasTextInput() test:assertNotNil(enabled) end -- love.keyboard.isDown love.test.keyboard.isDown = function(test) local keydown = love.keyboard.isDown('a') test:assertNotNil(keydown) end -- love.keyboard.isScancodeDown love.test.keyboard.isScancodeDown = function(test) local keydown = love.keyboard.isScancodeDown('a') test:assertNotNil(keydown) end -- love.keyboard.setKeyRepeat love.test.keyboard.setKeyRepeat = function(test) love.keyboard.setKeyRepeat(true) local enabled = love.keyboard.hasKeyRepeat() test:assertEquals(true, enabled, 'check key repeat set') end -- love.keyboard.isModifierActive love.test.keyboard.isModifierActive = function(test) local active1 = love.keyboard.isModifierActive('numlock') local active2 = love.keyboard.isModifierActive('capslock') local active3 = love.keyboard.isModifierActive('scrolllock') local active4 = love.keyboard.isModifierActive('mode') test:assertNotNil(active1) test:assertNotNil(active2) test:assertNotNil(active3) test:assertNotNil(active4) end -- love.keyboard.setTextInput love.test.keyboard.setTextInput = function(test) love.keyboard.setTextInput(false) test:assertEquals(false, love.keyboard.hasTextInput(), 'check disable text input') end ================================================ FILE: testing/tests/love.lua ================================================ -- love -- tests for the main love hooks + methods, mainly just that they exist -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- ------------------------------------METHODS------------------------------------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -- love.getVersion love.test.love.getVersion = function(test) local major, minor, revision, codename = love.getVersion() test:assertGreaterEqual(0, major, 'check major is number') test:assertGreaterEqual(0, minor, 'check minor is number') test:assertGreaterEqual(0, revision, 'check revision is number') test:assertTrue(codename ~= nil, 'check has codename') end -- love.hasDeprecationOutput love.test.love.hasDeprecationOutput = function(test) local enabled = love.hasDeprecationOutput() test:assertEquals(true, enabled, 'check enabled by default') end -- love.isVersionCompatible love.test.love.isVersionCompatible = function(test) local major, minor, revision, _ = love.getVersion() test:assertTrue(love.isVersionCompatible(major, minor, revision), 'check own version') end -- love.setDeprecationOutput love.test.love.setDeprecationOutput = function(test) local enabled = love.hasDeprecationOutput() test:assertEquals(true, enabled, 'check enabled by default') love.setDeprecationOutput(false) test:assertEquals(false, love.hasDeprecationOutput(), 'check disable') love.setDeprecationOutput(true) end -- love.errhand love.test.love.errhand = function(test) test:assertTrue(type(love.errhand) == 'function', 'check defined') end -- love.run love.test.love.run = function(test) test:assertTrue(type(love.run) == 'function', 'check defined') end ================================================ FILE: testing/tests/math.lua ================================================ -- love.math -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- ------------------------------------OBJECTS------------------------------------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -- BezierCurve (love.math.newBezierCurve) love.test.math.BezierCurve = function(test) -- create obj local curve = love.math.newBezierCurve(1, 1, 2, 2, 3, 1) local px, py = curve:getControlPoint(2) test:assertObject(curve) -- check initial properties test:assertCoords({2, 2}, {px, py}, 'check point x/y') test:assertEquals(3, curve:getControlPointCount(), 'check 3 points') test:assertEquals(2, curve:getDegree(), 'check degree is points-1') -- check some values on the curve test:assertEquals(1, curve:evaluate(0), 'check curve evaluation 0') test:assertRange(curve:evaluate(0.1), 1.2, 1.3, 'check curve evaluation 0.1') test:assertRange(curve:evaluate(0.2), 1.4, 1.5, 'check curve evaluation 0.2') test:assertRange(curve:evaluate(0.5), 2, 2.1, 'check curve evaluation 0.5') test:assertEquals(3, curve:evaluate(1), 'check curve evaluation 1') -- check derivative local deriv = curve:getDerivative() test:assertObject(deriv) test:assertEquals(2, deriv:getControlPointCount(), 'check deriv points') test:assertRange(deriv:evaluate(0.1), 2, 2.1, 'check deriv evaluation 0.1') -- check segment local segment = curve:getSegment(0, 0.5) test:assertObject(segment) test:assertEquals(3, segment:getControlPointCount(), 'check segment points') test:assertRange(segment:evaluate(0.1), 1, 1.1, 'check segment evaluation 0.1') -- mess with control points curve:removeControlPoint(2) curve:insertControlPoint(4, 1, -1) curve:insertControlPoint(5, 3, -1) curve:insertControlPoint(6, 2, -1) curve:setControlPoint(2, 3, 2) test:assertEquals(5, curve:getControlPointCount(), 'check 3 points still') local px1, py1 = curve:getControlPoint(1) local px2, py2 = curve:getControlPoint(3) local px3, py3 = curve:getControlPoint(5) test:assertCoords({1, 1}, {px1, py1}, 'check modified point 1') test:assertCoords({5, 3}, {px2, py2}, 'check modified point 1') test:assertCoords({3, 1}, {px3, py3}, 'check modified point 1') -- check render lists local coords1 = curve:render(5) local coords2 = curve:renderSegment(0, 0.1, 5) test:assertEquals(196, #coords1, 'check coords') test:assertEquals(20, #coords2, 'check segment coords') -- check translation values px, py = curve:getControlPoint(2) test:assertCoords({3, 2}, {px, py}, 'check pretransform x/y') curve:rotate(90 * (math.pi/180), 0, 0) px, py = curve:getControlPoint(2) test:assertCoords({-2, 3}, {px, py}, 'check rotated x/y') curve:scale(2, 0, 0) px, py = curve:getControlPoint(2) test:assertCoords({-4, 6}, {px, py}, 'check scaled x/y') curve:translate(5, -5) px, py = curve:getControlPoint(2) test:assertCoords({1, 1}, {px, py}, 'check translated x/y') end -- RandomGenerator (love.math.RandomGenerator) -- @NOTE as this checks random numbers the chances this fails is very unlikely, but not 0... -- if you've managed to proc it congrats! your prize is to rerun the testsuite again love.test.math.RandomGenerator = function(test) -- create object local rng1 = love.math.newRandomGenerator(3418323524, 20529293) test:assertObject(rng1) -- check set properties local low, high = rng1:getSeed() test:assertEquals(3418323524, low, 'check seed low') test:assertEquals(20529293, high, 'check seed high') -- check states local rng2 = love.math.newRandomGenerator(1448323524, 10329293) test:assertNotEquals(rng1:random(), rng2:random(), 'check not matching states') test:assertNotEquals(rng1:randomNormal(), rng2:randomNormal(), 'check not matching states') -- check setting state works rng2:setState(rng1:getState()) test:assertEquals(rng1:random(), rng2:random(), 'check now matching') -- check overwriting seed works, should change output rng1:setSeed(os.time()) test:assertNotEquals(rng1:random(), rng2:random(), 'check not matching states') test:assertNotEquals(rng1:randomNormal(), rng2:randomNormal(), 'check not matching states') end -- Transform (love.math.Transform) love.test.math.Transform = function(test) -- create obj local transform = love.math.newTransform(0, 0, 0, 1, 1, 0, 0, 0, 0) test:assertObject(transform) -- set some values and check the matrix and transformPoint values transform:translate(10, 8) transform:scale(2, 3) transform:rotate(90*(math.pi/180)) transform:shear(1, 2) local px, py = transform:transformPoint(1, 1) test:assertCoords({4, 14}, {px, py}, 'check transformation methods') transform:reset() px, py = transform:transformPoint(1, 1) test:assertCoords({1, 1}, {px, py}, 'check reset') -- apply a transform to another transform local transform2 = love.math.newTransform() transform2:translate(5, 3) transform:apply(transform2) px, py = transform:transformPoint(1, 1) test:assertCoords({6, 4}, {px, py}, 'check apply other transform') -- check cloning a transform local transform3 = transform:clone() px, py = transform3:transformPoint(1, 1) test:assertCoords({6, 4}, {px, py}, 'check clone transform') -- check inverse and inverseTransform transform:reset() transform:translate(-14, 6) local ipx, ipy = transform:inverseTransformPoint(0, 0) transform:inverse() px, py = transform:transformPoint(0, 0) test:assertCoords({-px, -py}, {ipx, ipy}, 'check inverse points transform') -- check matrix manipulation transform:setTransformation(0, 0, 0, 1, 1, 0, 0, 0, 0) transform:translate(4, 4) local m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11, m12, m13, m14, m15, m16 = transform:getMatrix() test:assertEquals(4, m4, 'check translate matrix x') test:assertEquals(4, m8, 'check translate matrix y') transform:setMatrix(m1, m2, m3, 3, m5, m6, m7, 1, m9, m10, m11, m12, m13, m14, m15, m16) px, py = transform:transformPoint(1, 1) test:assertCoords({4, 2}, {px, py}, 'check set matrix') -- check affine vs non affine transform:reset() test:assertTrue(transform:isAffine2DTransform(), 'check affine 1') transform:translate(4, 3) test:assertTrue(transform:isAffine2DTransform(), 'check affine 2') transform:setMatrix(1, 3, 4, 5.5, 1, 4.5, 2, 1, 3.4, 5.1, 4.1, 13, 1, 1, 2, 3) test:assertFalse(transform:isAffine2DTransform(), 'check not affine') end -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- ------------------------------------METHODS------------------------------------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -- love.math.colorFromBytes love.test.math.colorFromBytes = function(test) -- check random value local r1, g1, b1, a1 = love.math.colorFromBytes(51, 51, 51, 51) test:assertEquals(r1, 0.2, 'check r from bytes') test:assertEquals(g1, 0.2, 'check g from bytes') test:assertEquals(b1, 0.2, 'check b from bytes') test:assertEquals(a1, 0.2, 'check a from bytes') -- check "max" value local r2, g2, b2, a2 = love.math.colorFromBytes(255, 255, 255, 255) test:assertEquals(r2, 1, 'check r from bytes') test:assertEquals(g2, 1, 'check g from bytes') test:assertEquals(b2, 1, 'check b from bytes') test:assertEquals(a2, 1, 'check a from bytes') -- check "min" value local r3, g3, b3, a3 = love.math.colorFromBytes(0, 0, 0, 0) test:assertEquals(r3, 0, 'check r from bytes') test:assertEquals(g3, 0, 'check g from bytes') test:assertEquals(b3, 0, 'check b from bytes') test:assertEquals(a3, 0, 'check a from bytes') end -- love.math.colorToBytes love.test.math.colorToBytes = function(test) -- check random value local r1, g1, b1, a1 = love.math.colorToBytes(0.2, 0.2, 0.2, 0.2) test:assertEquals(r1, 51, 'check bytes from r') test:assertEquals(g1, 51, 'check bytes from g') test:assertEquals(b1, 51, 'check bytes from b') test:assertEquals(a1, 51, 'check bytes from a') -- check "max" value local r2, g2, b2, a2 = love.math.colorToBytes(1, 1, 1, 1) test:assertEquals(r2, 255, 'check bytes from r') test:assertEquals(g2, 255, 'check bytes from g') test:assertEquals(b2, 255, 'check bytes from b') test:assertEquals(a2, 255, 'check bytes from a') -- check "min" value local r3, g3, b3, a3 = love.math.colorToBytes(0, 0, 0, 0) test:assertEquals(r3, 0, 'check bytes from r') test:assertEquals(g3, 0, 'check bytes from g') test:assertEquals(b3, 0, 'check bytes from b') test:assertEquals(a3, 0, 'check bytes from a') end -- love.math.gammaToLinear -- @NOTE I tried doing the same formula as the source from MathModule.cpp -- but get test failues due to slight differences love.test.math.gammaToLinear = function(test) local lr, lg, lb = love.math.gammaToLinear(1, 0.8, 0.02) --local eg = ((0.8 + 0.055) / 1.055)^2.4 --local eb = 0.02 / 12.92 test:assertGreaterEqual(0, lr, 'check gamma r to linear') test:assertGreaterEqual(0, lg, 'check gamma g to linear') test:assertGreaterEqual(0, lb, 'check gamma b to linear') end -- love.math.getRandomSeed -- @NOTE whenever i run this high is always 0, is that intended? love.test.math.getRandomSeed = function(test) local low, high = love.math.getRandomSeed() test:assertGreaterEqual(0, low, 'check random seed low') test:assertGreaterEqual(0, high, 'check random seed high') end -- love.math.getRandomState love.test.math.getRandomState = function(test) test:assertNotNil(love.math.getRandomState()) end -- love.math.isConvex love.test.math.isConvex = function(test) local isconvex = love.math.isConvex({0, 0, 1, 0, 1, 1, 1, 0, 0, 0}) -- square local notconvex = love.math.isConvex({1, 2, 2, 4, 3, 4, 2, 1, 3, 1}) -- weird shape test:assertTrue(isconvex, 'check polygon convex') test:assertFalse(notconvex, 'check polygon not convex') end -- love.math.linearToGammer -- @NOTE I tried doing the same formula as the source from MathModule.cpp -- but get test failues due to slight differences love.test.math.linearToGamma = function(test) local gr, gg, gb = love.math.linearToGamma(1, 0.8, 0.001) --local eg = 1.055 * (0.8^1/2.4) - 0.055 --local eb = 0.001 * 12.92 test:assertGreaterEqual(0, gr, 'check linear r to gamme') test:assertGreaterEqual(0, gg, 'check linear g to gamme') test:assertGreaterEqual(0, gb, 'check linear b to gamme') end -- love.math.newBezierCurve -- @NOTE this is just basic nil checking, objs have their own test method love.test.math.newBezierCurve = function(test) test:assertObject(love.math.newBezierCurve({0, 0, 0, 1, 1, 1, 2, 1})) end -- love.math.newRandomGenerator -- @NOTE this is just basic nil checking, objs have their own test method love.test.math.newRandomGenerator = function(test) test:assertObject(love.math.newRandomGenerator()) end -- love.math.newTransform -- @NOTE this is just basic nil checking, objs have their own test method love.test.math.newTransform = function(test) test:assertObject(love.math.newTransform()) end -- love.math.perlinNoise love.test.math.perlinNoise = function(test) -- check some noise values -- output should be consistent if given the same input local noise1 = love.math.perlinNoise(100) local noise2 = love.math.perlinNoise(1, 10) local noise3 = love.math.perlinNoise(1043, 31.123, 999) local noise4 = love.math.perlinNoise(99.222, 10067, 8, 1843) test:assertRange(noise1, 0.5, 0.51, 'check noise 1 dimension') test:assertRange(noise2, 0.5, 0.51, 'check noise 2 dimensions') test:assertRange(noise3, 0.56, 0.57, 'check noise 3 dimensions') test:assertRange(noise4, 0.52, 0.53, 'check noise 4 dimensions') end -- love.math.simplexNoise love.test.math.simplexNoise = function(test) -- check some noise values -- output should be consistent if given the same input local noise1 = love.math.simplexNoise(100) local noise2 = love.math.simplexNoise(1, 10) local noise3 = love.math.simplexNoise(1043, 31.123, 999) local noise4 = love.math.simplexNoise(99.222, 10067, 8, 1843) -- rounded to avoid floating point issues test:assertRange(noise1, 0.5, 0.51, 'check noise 1 dimension') test:assertRange(noise2, 0.47, 0.48, 'check noise 2 dimensions') test:assertRange(noise3, 0.26, 0.27, 'check noise 3 dimensions') test:assertRange(noise4, 0.53, 0.54, 'check noise 4 dimensions') end -- love.math.random love.test.math.random = function(test) -- check some random ranges love.math.setRandomSeed(123) test:assertRange(love.math.random(), 0.37068322251462, 0.37068322251464, "check random algorithm") test:assertEquals(love.math.random(10), 4, "check single random param") test:assertEquals(love.math.random(15, 100), 92, "check two random params") end -- love.math.randomNormal love.test.math.randomNormal = function(test) love.math.setRandomSeed(1234) test:assertRange(love.math.randomNormal(1, 2), 1.0813614997253, 1.0813614997255, 'check randomNormal two params') end -- love.math.setRandomSeed -- @NOTE same with getRandomSeed, high is always 0 when I tested it? love.test.math.setRandomSeed = function(test) love.math.setRandomSeed(9001) local low, high = love.math.getRandomSeed() test:assertEquals(9001, low, 'check seed low set') test:assertEquals(0, high, 'check seed high set') end -- love.math.setRandomState love.test.math.setRandomState = function(test) -- check setting state matches value returned local rs1 = love.math.getRandomState() love.math.setRandomState(rs1) local rs2 = love.math.getRandomState() test:assertEquals(rs1, rs2, 'check random state set') end -- love.math.triangulate love.test.math.triangulate = function(test) local triangles1 = love.math.triangulate({0, 0, 1, 0, 1, 1, 1, 0, 0, 0}) -- square local triangles2 = love.math.triangulate({1, 2, 2, 4, 3, 4, 2, 1, 3, 1}) -- weird shape test:assertEquals(3, #triangles1, 'check polygon triangles') test:assertEquals(3, #triangles2, 'check polygon triangles') end ================================================ FILE: testing/tests/mouse.lua ================================================ -- love.mouse -- @NOTE we can't test this module fully as it's hardware dependent -- however we can test methods do what is expected and can handle certain params -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- ------------------------------------METHODS------------------------------------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -- love.mouse.getCursor love.test.mouse.getCursor = function(test) local cursor = love.mouse.getCursor() test:assertEquals(nil, cursor, 'check nil initially') -- try setting a cursor to check return if supported if love.mouse.isCursorSupported() then love.mouse.setCursor(love.mouse.getSystemCursor("hand")) local newcursor = love.mouse.getCursor() test:assertObject(newcursor) love.mouse.setCursor() end end -- love.mouse.getPosition love.test.mouse.getPosition = function(test) love.mouse.setPosition(0, 0) -- cant predict local x, y = love.mouse.getPosition() test:assertEquals(0, x, 'check x pos') test:assertEquals(0, y, 'check y pos') end -- love.mouse.getRelativeMode love.test.mouse.getRelativeMode = function(test) local enabled = love.mouse.getRelativeMode() test:assertEquals(false, enabled, 'check relative mode') love.mouse.setRelativeMode(true) test:assertEquals(true, love.mouse.getRelativeMode(), 'check enabling') end -- love.mouse.getSystemCursor love.test.mouse.getSystemCursor = function(test) local hand = love.mouse.getSystemCursor('hand') test:assertObject(hand) local ok, err = pcall(love.mouse.getSystemCursor, 'love') test:assertEquals(false, ok, 'check invalid cursor') end -- love.mouse.getX love.test.mouse.getX = function(test) love.mouse.setPosition(0, 0) -- cant predict local x = love.mouse.getX() test:assertEquals(0, x, 'check x pos') love.mouse.setX(10) test:assertEquals(10, love.mouse.getX(), 'check set x') end -- love.mouse.getY love.test.mouse.getY = function(test) love.mouse.setPosition(0, 0) -- cant predict local y = love.mouse.getY() test:assertEquals(0, y, 'check x pos') love.mouse.setY(10) test:assertEquals(10, love.mouse.getY(), 'check set y') end -- love.mouse.isCursorSupported love.test.mouse.isCursorSupported = function(test) test:assertNotNil(love.mouse.isCursorSupported()) end -- love.mouse.isDown love.test.mouse.isDown = function(test) test:assertNotNil(love.mouse.isDown()) end -- love.mouse.isGrabbed love.test.mouse.isGrabbed = function(test) test:assertNotNil(love.mouse.isGrabbed()) end -- love.mouse.isVisible love.test.mouse.isVisible = function(test) local visible = love.mouse.isVisible() test:assertEquals(true, visible, 'check visible default') love.mouse.setVisible(false) test:assertEquals(false, love.mouse.isVisible(), 'check invisible') love.mouse.setVisible(true) end -- love.mouse.newCursor love.test.mouse.newCursor = function(test) -- new cursor might fail if not supported if love.mouse.isCursorSupported() then local cursor = love.mouse.newCursor('resources/love.png', 0, 0) test:assertObject(cursor) else test:skipTest('cursor not supported on this system') end end -- love.mouse.setCursor love.test.mouse.setCursor = function(test) -- cant set cursor if not supported if love.mouse.isCursorSupported() then love.mouse.setCursor() test:assertEquals(nil, love.mouse.getCursor(), 'check reset') love.mouse.setCursor(love.mouse.getSystemCursor('hand')) test:assertObject(love.mouse.getCursor()) else test:skipTest('cursor not supported on this system') end end -- love.mouse.setGrabbed -- @NOTE can fail if you move the mouse a bunch while the test runs love.test.mouse.setGrabbed = function(test) test:assertEquals(false, love.mouse.isGrabbed(), 'check not grabbed') love.mouse.setGrabbed(true) test:assertEquals(true, love.mouse.isGrabbed(), 'check now grabbed') love.mouse.setGrabbed(false) end -- love.mouse.setPosition love.test.mouse.setPosition = function(test) love.mouse.setPosition(10, 10) local x, y = love.mouse.getPosition() test:assertEquals(10, x, 'check x position') test:assertEquals(10, y, 'check y position') love.mouse.setPosition(15, 20) local x2, y2 = love.mouse.getPosition() test:assertEquals(15, x2, 'check new x position') test:assertEquals(20, y2, 'check new y position') end -- love.mouse.setRelativeMode love.test.mouse.setRelativeMode = function(test) love.mouse.setRelativeMode(true) local enabled = love.mouse.getRelativeMode() test:assertEquals(true, enabled, 'check relative mode') love.mouse.setRelativeMode(false) test:assertEquals(false, love.mouse.getRelativeMode(), 'check disabling') end -- love.mouse.setVisible love.test.mouse.setVisible = function(test) local visible = love.mouse.isVisible() test:assertEquals(true, visible, 'check visible default') love.mouse.setVisible(false) test:assertEquals(false, love.mouse.isVisible(), 'check invisible') love.mouse.setVisible(true) end -- love.mouse.setX love.test.mouse.setX = function(test) love.mouse.setX(30) local x = love.mouse.getX() test:assertEquals(30, x, 'check x pos') love.mouse.setX(10) test:assertEquals(10, love.mouse.getX(), 'check set x') end -- love.mouse.setY love.test.mouse.setY = function(test) love.mouse.setY(12) local y = love.mouse.getY() test:assertEquals(12, y, 'check x pos') love.mouse.setY(10) test:assertEquals(10, love.mouse.getY(), 'check set y') end ================================================ FILE: testing/tests/physics.lua ================================================ -- love.physics -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- ----------------------------------OBJECTS--------------------------------------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -- Body (love.physics.newBody) love.test.physics.Body = function(test) -- create body local world = love.physics.newWorld(1, 1, true) local body1 = love.physics.newBody(world, 0, 0, 'static') local body2 = love.physics.newBody(world, 30, 30, 'dynamic') love.physics.newRectangleShape(body1, 5, 5, 10, 10) love.physics.newRectangleShape(body2, 5, 5, 10, 10) test:assertObject(body1) -- check shapes test:assertEquals(1, #body1:getShapes(), 'check shapes total 1') test:assertEquals(1, #body2:getShapes(), 'check shapes total 2') test:assertNotEquals(nil, body1:getShape(), 'check shape 1') test:assertNotEquals(nil, body2:getShape(), 'check shape 2') -- check body active test:assertTrue(body1:isActive(), 'check active by def') -- check body bullet test:assertFalse(body1:isBullet(), 'check not bullet by def') body1:setBullet(true) test:assertTrue(body1:isBullet(), 'check set bullet') -- check fixed rotation test:assertFalse(body1:isFixedRotation(), 'check fix rot def') body1:setFixedRotation(true) test:assertTrue(body1:isFixedRotation(), 'check set fix rot') -- check sleeping/waking test:assertTrue(body1:isSleepingAllowed(), 'check sleep def') body1:setSleepingAllowed(false) test:assertFalse(body1:isSleepingAllowed(), 'check set sleep') body1:setSleepingAllowed(true) world:update(1) test:assertFalse(body1:isAwake(), 'check fell asleep') body1:setSleepingAllowed(false) body1:setType('dynamic') test:assertTrue(body1:isAwake(), 'check waking up') -- check touching test:assertFalse(body1:isTouching(body2)) body2:setPosition(5, 5) world:update(1) test:assertTrue(body1:isTouching(body2)) -- check children lists test:assertEquals(1, #body1:getContacts(), 'check contact list') test:assertEquals(0, #body1:getJoints(), 'check joints list') love.physics.newDistanceJoint(body1, body2, 5, 5, 10, 10, true) test:assertEquals(1, #body1:getJoints(), 'check joints list') -- check local points local x, y = body1:getLocalCenter() test:assertRange(x, 5, 6, 'check local center x') test:assertRange(y, 5, 6, 'check local center y') local lx, ly = body1:getLocalPoint(10, 10) test:assertRange(lx, 10, 11, 'check local point x') test:assertRange(ly, 9, 10, 'check local point y') local lx1, ly1, lx2, ly2 = body1:getLocalPoints(0, 5, 5, 10) test:assertRange(lx1, 0, 1, 'check local points x 1') test:assertRange(ly1, 3, 4, 'check local points y 1') test:assertRange(lx2, 5, 6, 'check local points x 2') test:assertRange(ly2, 9, 10, 'check local points y 2') -- check world points local wx, wy = body1:getWorldPoint(10.4, 9) test:assertRange(wx, 10, 11, 'check world point x') test:assertRange(wy, 10, 11, 'check world point y') local wx1, wy1, wx2, wy2 = body1:getWorldPoints(0.4, 4, 5.4, 9) test:assertRange(wx1, 0, 1, 'check world points x 1') test:assertRange(wy1, 5, 6, 'check world points y 1') test:assertRange(wx2, 5, 6, 'check world points x 2') test:assertRange(wy2, 10, 11, 'check world points y 2') -- check angular damping + velocity test:assertEquals(0, body1:getAngularDamping(), 'check angular damping') test:assertEquals(0, body1:getAngularVelocity(), 'check angular velocity') -- check world props test:assertObject(body1:getWorld()) test:assertEquals(2, body1:getWorld():getBodyCount(), 'check world count') local cx, cy = body1:getWorldCenter() test:assertRange(cx, 4, 5, 'check world center x') test:assertRange(cy, 6, 7, 'check world center y') local vx, vy = body1:getWorldVector(5, 10) test:assertEquals(5, vx, 'check vector x') test:assertEquals(10, vy, 'check vector y') -- check inertia test:assertRange(body1:getInertia(), 5, 6, 'check inertia') -- check angle test:assertEquals(0, body1:getAngle(), 'check def angle') body1:setAngle(90 * (math.pi/180)) test:assertEquals(math.floor(math.pi/2*100), math.floor(body1:getAngle()*100), 'check set angle') -- check gravity scale test:assertEquals(1, body1:getGravityScale(), 'check def grav') body1:setGravityScale(2) test:assertEquals(2, body1:getGravityScale(), 'check change grav') -- check damping test:assertEquals(0, body1:getLinearDamping(), 'check def lin damping') body1:setLinearDamping(0.1) test:assertRange(body1:getLinearDamping(), 0, 0.2, 'check change lin damping') -- check velocity local x2, y2 = body1:getLinearVelocity() test:assertEquals(1, x2, 'check def lin velocity x') test:assertEquals(1, y2, 'check def lin velocity y') body1:setLinearVelocity(4, 5) local x3, y3 = body1:getLinearVelocity() test:assertEquals(4, x3, 'check change lin velocity x') test:assertEquals(5, y3, 'check change lin velocity y') -- check mass test:assertRange(body1:getMass(), 0.1, 0.2, 'check def mass') body1:setMass(10) test:assertEquals(10, body1:getMass(), 'check change mass') body1:setMassData(3, 5, 10, 1) local x4, y4, mass4, inertia4 = body1:getMassData() test:assertEquals(3, x4, 'check mass data change x') test:assertEquals(5, y4, 'check mass data change y') test:assertEquals(10, mass4, 'check mass data change mass') test:assertRange(inertia4, 340, 341, 'check mass data change inertia') body1:resetMassData() local x5, y5, mass5, inertia5 = body1:getMassData() test:assertRange(x5, 5, 6, 'check mass data reset x') test:assertRange(y5, 5, 6, 'check mass data reset y') test:assertRange(mass5, 0.1, 0.2, 'check mass data reset mass') test:assertRange(inertia5, 5, 6, 'check mass data reset inertia') test:assertFalse(body1:hasCustomMassData()) -- check position local x6, y6 = body1:getPosition() test:assertRange(x6, -1, 0, 'check position x') test:assertRange(y6, 0, 1, 'check position y') body1:setPosition(10, 4) local x7, y7 = body1:getPosition() test:assertEquals(x7, 10, 'check set position x') test:assertEquals(y7, 4, 'check set position y') -- check type test:assertEquals('dynamic', body1:getType(), 'check type match') body1:setType('kinematic') body1:setType('static') test:assertEquals('static', body1:getType(), 'check type change') -- check userdata test:assertEquals(nil, body1:getUserData(), 'check user data') body1:setUserData({ love = 'cool' }) test:assertEquals('cool', body1:getUserData().love, 'check set user data') -- check x/y direct test:assertEquals(10, math.floor(body1:getX()), 'check get x') test:assertEquals(4, math.floor(body1:getY()), 'check get y') body1:setX(0) body1:setY(0) test:assertEquals(0, body1:getX(), 'check get x') test:assertEquals(0, body1:getY(), 'check get y') -- apply angular impulse local vel = body2:getAngularVelocity() test:assertRange(vel, 0, 0, 'check velocity before') body2:applyAngularImpulse(10) local vel1 = body2:getAngularVelocity() test:assertRange(vel1, 5, 6, 'check velocity after 1') -- apply standard force local ang1 = body2:getAngle() test:assertRange(ang1, 0.1, 0.2, 'check initial angle 1') body2:applyForce(2, 3) world:update(2) local vel2 = body2:getAngularVelocity() local ang2 = body2:getAngle() test:assertRange(ang2, -0.1, 0, 'check angle after 2') test:assertRange(vel2, 1, 2, 'check velocity after 2') -- apply linear impulse body2:applyLinearImpulse(-4, -59) world:update(1) local ang3 = body2:getAngle() local vel3 = body2:getAngularVelocity() test:assertRange(ang3, -2, -1, 'check angle after 3') test:assertRange(vel3, 0, 1, 'check velocity after 3') -- apply torque body2:applyTorque(4) world:update(2) local ang4 = body2:getAngle() local vel4 = body2:getAngularVelocity() test:assertRange(ang4, -1, 0, 'check angle after 4') test:assertRange(vel4, 0, 1, 'check velocity after 4') -- check destroy test:assertFalse(body1:isDestroyed(), 'check not destroyed') body1:destroy() test:assertTrue(body1:isDestroyed(), 'check destroyed') end -- Contact (love.physics.World:getContacts) love.test.physics.Contact = function(test) -- create a setup so we can access some contact objects local world = love.physics.newWorld(1, 1, true) local body1 = love.physics.newBody(world, 0, 0, 'dynamic') local body2 = love.physics.newBody(world, 10, 10, 'dynamic') local rectangle1 = love.physics.newRectangleShape(body1, 0, 0, 10, 10) local rectangle2 = love.physics.newRectangleShape(body2, 0, 0, 10, 10) rectangle1:setUserData('rec1') rectangle2:setUserData('rec2') -- used to check for collisions + no. of collisions local collided = false local pass = 1 -- set callback for contact start world:setCallbacks( function(shape_a, shape_b, contact) collided = true -- check contact object test:assertObject(contact) -- check child indices local indexA, indexB = contact:getChildren() test:assertEquals(1, indexA, 'check child indice a') test:assertEquals(1, indexB, 'check child indice b') -- check shapes match using userdata local shapeA, shapeB = contact:getShapes() test:assertEquals(shape_a:getUserData(), shapeA:getUserData(), 'check shape a matches') test:assertEquals(shape_b:getUserData(), shapeB:getUserData(), 'check shape b matches') -- check normal pos local nx, ny = contact:getNormal() test:assertEquals(1, nx, 'check normal x') test:assertEquals(0, ny, 'check normal y') -- check actual pos local px1, py1, px2, py2 = contact:getPositions() test:assertRange(px1, 5, 6, 'check collide x 1') test:assertRange(py1, 5, 6, 'check collide y 1') test:assertRange(px2, 5, 6, 'check collide x 2') test:assertRange(py2, 5, 6, 'check collide y 2') -- check touching test:assertTrue(contact:isTouching(), 'check touching') -- check enabled (we pass through twice to test on/off) test:assertEquals(pass == 1, contact:isEnabled(), 'check enabled for pass ' .. tostring(pass)) -- check friction test:assertRange(contact:getFriction(), 0.2, 0.3, 'check def friction') contact:setFriction(0.1) test:assertRange(contact:getFriction(), 0.1, 0.2, 'check set friction') contact:resetFriction() test:assertRange(contact:getFriction(), 0.2, 0.3, 'check reset friction') -- check restitution test:assertEquals(0, contact:getRestitution(), 'check def restitution') contact:setRestitution(1) test:assertEquals(1, contact:getRestitution(), 'check set restitution') contact:resetRestitution() test:assertEquals(0, contact:getRestitution(), 'check reset restitution') pass = pass + 1 end, function() end, function(shape_a, shape_b, contact) if pass > 2 then contact:setEnabled(false) end end, function() end ) -- check bodies collided world:update(1) test:assertTrue(collided, 'check bodies collided') -- update again for enabled check world:update(1) test:assertEquals(2, pass, 'check ran twice') end -- Joint (love.physics.newDistanceJoint) love.test.physics.Joint = function(test) -- make joint local world = love.physics.newWorld(1, 1, true) local body1 = love.physics.newBody(world, 10, 10, 'dynamic') local body2 = love.physics.newBody(world, 20, 20, 'dynamic') local joint = love.physics.newDistanceJoint(body1, body2, 10, 10, 20, 20, true) test:assertObject(joint) -- check type test:assertEquals('distance', joint:getType(), 'check joint type') -- check not destroyed test:assertFalse(joint:isDestroyed(), 'check not destroyed') -- check reaction props world:update(1) local rx1, ry1 = joint:getReactionForce(1) test:assertEquals(0, rx1, 'check reaction force x') test:assertEquals(0, ry1, 'check reaction force y') local rx2, ry2 = joint:getReactionTorque(1) test:assertEquals(0, rx2, 'check reaction torque x') test:assertEquals(nil, ry2, 'check reaction torque y') -- check body pointer local b1, b2 = joint:getBodies() test:assertEquals(body1:getX(), b1:getX(), 'check body 1') test:assertEquals(body2:getX(), b2:getX(), 'check body 2') -- check joint anchors local x1, y1, x2, y2 = joint:getAnchors() test:assertRange(x1, 10, 11, 'check anchor x1') test:assertRange(y1, 10, 11, 'check anchor y1') test:assertRange(x2, 20, 21, 'check anchor x2') test:assertRange(y2, 20, 21, 'check anchor y2') test:assertTrue(joint:getCollideConnected(), 'check not colliding') -- test userdata test:assertEquals(nil, joint:getUserData(), 'check no data by def') joint:setUserData('hello') test:assertEquals('hello', joint:getUserData(), 'check set userdata') -- destroy joint:destroy() test:assertTrue(joint:isDestroyed(), 'check destroyed') end -- Shape (love.physics.newCircleShape) -- @NOTE in 12.0 fixtures have been merged into shapes love.test.physics.Shape = function(test) -- create shape local world = love.physics.newWorld(0, 0, false) local body1 = love.physics.newBody(world, 0, 0, 'dynamic') local shape1 = love.physics.newRectangleShape(body1, 5, 5, 10, 10) test:assertObject(shape1) -- check child count test:assertEquals(1, shape1:getChildCount(), 'check child count') -- check radius test:assertRange(shape1:getRadius(), 0, 0.4, 'check radius') -- check type match test:assertEquals('polygon', shape1:getType(), 'check rectangle type') -- check body pointer test:assertEquals(0, shape1:getBody():getX(), 'check body link') -- check category test:assertEquals(1, shape1:getCategory(), 'check def category') shape1:setCategory(3, 5, 6) local categories = {shape1:getCategory()} test:assertEquals(14, categories[1] + categories[2] + categories[3], 'check set category') -- check sensor prop test:assertFalse(shape1:isSensor(), 'check sensor def') shape1:setSensor(true) test:assertTrue(shape1:isSensor(), 'check set sensor') shape1:setSensor(false) -- check not destroyed test:assertFalse(shape1:isDestroyed(), 'check not destroyed') -- check user data test:assertEquals(nil, shape1:getUserData(), 'check no user data') shape1:setUserData({ test = 14 }) test:assertEquals(14, shape1:getUserData().test, 'check user data set') -- check bounding box -- polygons have an additional skin radius to help with collisions -- so this wont be 0, 0, 10, 10 as you'd think but has an additional 0.3 padding local topLeftX, topLeftY, bottomRightX, bottomRightY = shape1:computeAABB(0, 0, 0, 1) local tlx, tly, brx, bry = shape1:getBoundingBox(1) test:assertEquals(topLeftX, tlx, 'check bbox methods match tlx') test:assertEquals(topLeftY, tly, 'check bbox methods match tly') test:assertEquals(bottomRightX, brx, 'check bbox methods match brx') test:assertEquals(bottomRightY, bry, 'check bbox methods match bry') test:assertEquals(topLeftX, topLeftY, 'check bbox tl 1') test:assertRange(topLeftY, -0.3, -0.2, 'check bbox tl 2') test:assertEquals(bottomRightX, bottomRightY, 'check bbox br 1') test:assertRange(bottomRightX, 10.3, 10.4, 'check bbox br 2') -- check density test:assertEquals(1, shape1:getDensity(), 'check def density') shape1:setDensity(5) test:assertEquals(5, shape1:getDensity(), 'check set density') -- check mass local x1, y1, mass1, inertia1 = shape1:getMassData() test:assertRange(x1, 5, 5.1, 'check shape mass pos x') test:assertRange(y1, 5, 5.1, 'check shape mass pos y') test:assertRange(mass1, 0.5, 0.6, 'check mass at 1 density') test:assertRange(inertia1, 0, 0.1, 'check intertia at 1 density') local x2, y2, mass2, inertia2 = shape1:computeMass(1000) test:assertRange(mass2, 111, 112, 'check mass at 1000 density') test:assertRange(inertia2, 7407, 7408, 'check intertia at 1000 density') -- check friction test:assertRange(shape1:getFriction(), 0.2, 0.3, 'check def friction') shape1:setFriction(1) test:assertEquals(1, shape1:getFriction(), 'check set friction') -- check restitution test:assertEquals(0, shape1:getRestitution(), 'check def restitution') shape1:setRestitution(0.5) test:assertRange(shape1:getRestitution(), 0.5, 0.6, 'check set restitution') -- check points local bodyp = love.physics.newBody(world, 0, 0, 'dynamic') local shape2 = love.physics.newRectangleShape(bodyp, 5, 5, 10, 10) test:assertTrue(shape2:testPoint(5, 5), 'check point 5,5') test:assertTrue(shape2:testPoint(10, 10, 0, 15, 15), 'check point 15,15 after translate 10,10') test:assertFalse(shape2:testPoint(5, 5, 90, 10, 10), 'check point 10,10 after translate 5,5,90') test:assertFalse(shape2:testPoint(10, 10, 90, 5, 5), 'check point 5,5 after translate 10,10,90') test:assertFalse(shape2:testPoint(15, 15), 'check point 15,15') -- check ray cast local xn1, yn1, fraction1 = shape2:rayCast(-20, -20, 20, 20, 100, 0, 0, 0, 1) test:assertNotEquals(nil, xn1, 'check ray 1 x') test:assertNotEquals(nil, xn1, 'check ray 1 y') local xn2, yn2, fraction2 = shape2:rayCast(10, 10, -150, -150, 100, 0, 0, 0, 1) test:assertEquals(nil, xn2, 'check ray 2 x') test:assertEquals(nil, yn2, 'check ray 2 y') -- check filtering test:assertEquals(nil, shape2:getMask(), 'check no mask') shape2:setMask(1, 2, 3) test:assertEquals(3, #{shape2:getMask()}, 'check set mask') test:assertEquals(0, shape2:getGroupIndex(), 'check no index') shape2:setGroupIndex(-1) test:assertEquals(-1, shape2:getGroupIndex(), 'check set index') local cat, mask, group = shape2:getFilterData() test:assertEquals(1, cat, 'check filter cat') test:assertEquals(65528, mask, 'check filter mask') test:assertEquals(-1, group, 'check filter group') -- check destroyed shape1:destroy() test:assertTrue(shape1:isDestroyed(), 'check destroyed') shape2:destroy() -- run some collision checks using filters, setup new shapes local body2 = love.physics.newBody(world, 5, 5, 'dynamic') local shape3 = love.physics.newRectangleShape(body1, 0, 0, 10, 10) local shape4 = love.physics.newRectangleShape(body2, 0, 0, 10, 10) local collisions = 0 world:setCallbacks( function() collisions = collisions + 1 end, function() end, function() end, function() end ) -- same positive group do collide shape3:setGroupIndex(1) shape4:setGroupIndex(1) world:update(1) test:assertEquals(1, collisions, 'check positive group collide') -- check negative group dont collide shape3:setGroupIndex(-1) shape4:setGroupIndex(-1) body2:setPosition(20, 20); world:update(1); body2:setPosition(0, 0); world:update(1) test:assertEquals(1, collisions, 'check negative group collide') -- check masks do collide shape3:setGroupIndex(0) shape4:setGroupIndex(0) shape3:setCategory(2) shape4:setMask(3) body2:setPosition(20, 20); world:update(1); body2:setPosition(0, 0); world:update(1) test:assertEquals(2, collisions, 'check mask collide') -- check masks not colliding shape3:setCategory(2) shape4:setMask(2, 4, 6) body2:setPosition(20, 20); world:update(1); body2:setPosition(0, 0); world:update(1) test:assertEquals(2, collisions, 'check mask not collide') end -- World (love.physics.newWorld) love.test.physics.World = function(test) -- create new world local world = love.physics.newWorld(0, 0, false) local body1 = love.physics.newBody(world, 0, 0, 'dynamic') local rectangle1 = love.physics.newRectangleShape(body1, 0, 0, 10, 10) test:assertObject(world) -- check bodies in world test:assertEquals(1, #world:getBodies(), 'check 1 body') test:assertEquals(0, world:getBodies()[1]:getX(), 'check body prop x') test:assertEquals(0, world:getBodies()[1]:getY(), 'check body prop y') world:translateOrigin(-10, -10) -- check affects bodies test:assertRange(world:getBodies()[1]:getX(), 9, 11, 'check body prop change x') test:assertRange(world:getBodies()[1]:getY(), 9, 11, 'check body prop change y') test:assertEquals(1, world:getBodyCount(), 'check 1 body count') -- check shapes in world test:assertEquals(1, #world:getShapesInArea(0, 0, 10, 10), 'check shapes in area #1') test:assertEquals(0, #world:getShapesInArea(20, 20, 30, 30), 'check shapes in area #1') -- check world status test:assertFalse(world:isLocked(), 'check not updating') test:assertFalse(world:isSleepingAllowed(), 'check no sleep (till brooklyn)') world:setSleepingAllowed(true) test:assertTrue(world:isSleepingAllowed(), 'check can sleep') -- check world objects test:assertEquals(0, #world:getJoints(), 'check no joints') test:assertEquals(0, world:getJointCount(), 'check no joints count') test:assertEquals(0, world:getGravity(), 'check def gravity') test:assertEquals(0, #world:getContacts(), 'check no contacts') test:assertEquals(0, world:getContactCount(), 'check no contact count') -- check callbacks are called local beginContact, endContact, preSolve, postSolve = world:getCallbacks() test:assertEquals(nil, beginContact, 'check no begin contact callback') test:assertEquals(nil, endContact, 'check no end contact callback') test:assertEquals(nil, preSolve, 'check no pre solve callback') test:assertEquals(nil, postSolve, 'check no post solve callback') local beginContactCheck = false local endContactCheck = false local preSolveCheck = false local postSolveCheck = false local collisions = 0 world:setCallbacks( function() beginContactCheck = true; collisions = collisions + 1 end, function() endContactCheck = true end, function() preSolveCheck = true end, function() postSolveCheck = true end ) -- setup so we can collide stuff to call the callbacks local body2 = love.physics.newBody(world, 10, 10, 'dynamic') local rectangle2 = love.physics.newRectangleShape(body2, 0, 0, 10, 10) test:assertFalse(beginContactCheck, 'check world didnt update after adding body') world:update(1) test:assertTrue(beginContactCheck, 'check contact start') test:assertTrue(preSolveCheck, 'check pre solve') test:assertTrue(postSolveCheck, 'check post solve') body2:setPosition(100, 100) world:update(1) test:assertTrue(endContactCheck, 'check contact end') -- check point checking local shapes = 0 world:queryShapesInArea(0, 0, 10, 10, function(x) shapes = shapes + 1 end) test:assertEquals(1, shapes, 'check shapes in area') -- check raycast world:rayCast(0, 0, 200, 200, function(x) shapes = shapes + 1 return 1 end) test:assertEquals(3, shapes, 'check shapes in raycast') test:assertEquals(world:rayCastClosest(0, 0, 200, 200), rectangle1, 'check closest raycast') test:assertNotEquals(nil, world:rayCastAny(0, 0, 200, 200), 'check any raycast') -- change collision logic test:assertEquals(nil, world:getContactFilter(), 'check def filter') world:update(1) world:setContactFilter(function(s1, s2) return false -- nothing collides end) body2:setPosition(10, 10) world:update(1) test:assertEquals(1, collisions, 'check collision logic change') -- check gravity world:setGravity(1, 1) test:assertEquals(1, world:getGravity(), 'check grav change') -- check destruction test:assertFalse(world:isDestroyed(), 'check not destroyed') world:destroy() test:assertTrue(world:isDestroyed(), 'check world destroyed') end -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- ------------------------------------METHODS------------------------------------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -- love.physics.getDistance love.test.physics.getDistance = function(test) -- setup two fixtues to check local world = love.physics.newWorld(0, 0, false) local body = love.physics.newBody(world, 10, 10, 'static') local shape1 = love.physics.newEdgeShape(body, 0, 0, 5, 5) local shape2 = love.physics.newEdgeShape(body, 10, 10, 15, 15) -- check distance between them test:assertRange(love.physics.getDistance(shape1, shape2), 6, 7, 'check distance matches') end -- love.physics.getMeter love.test.physics.getMeter = function(test) -- check value set is returned love.physics.setMeter(30) test:assertEquals(30, love.physics.getMeter(), 'check meter matches') end -- love.physics.newBody -- @NOTE this is just basic nil checking, objs have their own test method love.test.physics.newBody = function(test) local world = love.physics.newWorld(1, 1, true) local body = love.physics.newBody(world, 10, 10, 'static') test:assertObject(body) end -- love.physics.newChainShape -- @NOTE this is just basic nil checking, objs have their own test method love.test.physics.newChainShape = function(test) local world = love.physics.newWorld(1, 1, true) local body = love.physics.newBody(world, 10, 10, 'static') test:assertObject(love.physics.newChainShape(body, true, 0, 0, 1, 0, 1, 1, 0, 1)) end -- love.physics.newCircleShape -- @NOTE this is just basic nil checking, objs have their own test method love.test.physics.newCircleShape = function(test) local world = love.physics.newWorld(1, 1, true) local body = love.physics.newBody(world, 10, 10, 'static') test:assertObject(love.physics.newCircleShape(body, 10)) end -- love.physics.newDistanceJoint -- @NOTE this is just basic nil checking, objs have their own test method love.test.physics.newDistanceJoint = function(test) local world = love.physics.newWorld(1, 1, true) local body1 = love.physics.newBody(world, 10, 10, 'static') local body2 = love.physics.newBody(world, 20, 20, 'static') local obj = love.physics.newDistanceJoint(body1, body2, 10, 10, 20, 20, true) test:assertObject(obj) end -- love.physics.newEdgeShape -- @NOTE this is just basic nil checking, objs have their own test method love.test.physics.newEdgeShape = function(test) local world = love.physics.newWorld(1, 1, true) local body = love.physics.newBody(world, 10, 10, 'static') local obj = love.physics.newEdgeShape(body, 0, 0, 10, 10) test:assertObject(obj) end -- love.physics.newFrictionJoint -- @NOTE this is just basic nil checking, objs have their own test method love.test.physics.newFrictionJoint = function(test) local world = love.physics.newWorld(1, 1, true) local body1 = love.physics.newBody(world, 10, 10, 'static') local body2 = love.physics.newBody(world, 20, 20, 'static') local obj = love.physics.newFrictionJoint(body1, body2, 15, 15, true) test:assertObject(obj) end -- love.physics.newGearJoint -- @NOTE this is just basic nil checking, objs have their own test method love.test.physics.newGearJoint = function(test) local world = love.physics.newWorld(1, 1, true) local body1 = love.physics.newBody(world, 10, 10, 'dynamic') local body2 = love.physics.newBody(world, 20, 20, 'dynamic') local body3 = love.physics.newBody(world, 30, 30, 'dynamic') local body4 = love.physics.newBody(world, 40, 40, 'dynamic') local joint1 = love.physics.newPrismaticJoint(body1, body2, 10, 10, 20, 20, true) local joint2 = love.physics.newPrismaticJoint(body3, body4, 30, 30, 40, 40, true) local obj = love.physics.newGearJoint(joint1, joint2, 1, true) test:assertObject(obj) end -- love.physics.newMotorJoint -- @NOTE this is just basic nil checking, objs have their own test method love.test.physics.newMotorJoint = function(test) local world = love.physics.newWorld(1, 1, true) local body1 = love.physics.newBody(world, 10, 10, 'static') local body2 = love.physics.newBody(world, 20, 20, 'static') local obj = love.physics.newMotorJoint(body1, body2, 1) test:assertObject(obj) end -- love.physics.newMouseJoint -- @NOTE this is just basic nil checking, objs have their own test method love.test.physics.newMouseJoint = function(test) local world = love.physics.newWorld(1, 1, true) local body = love.physics.newBody(world, 10, 10, 'static') local obj = love.physics.newMouseJoint(body, 10, 10) test:assertObject(obj) end -- love.physics.newPolygonShape -- @NOTE this is just basic nil checking, objs have their own test method love.test.physics.newPolygonShape = function(test) local world = love.physics.newWorld(1, 1, true) local body = love.physics.newBody(world, 10, 10, 'static') local obj = love.physics.newPolygonShape(body, {0, 0, 2, 3, 2, 1, 3, 1, 5, 1}) test:assertObject(obj) end -- love.physics.newPrismaticJoint -- @NOTE this is just basic nil checking, objs have their own test method love.test.physics.newPrismaticJoint = function(test) local world = love.physics.newWorld(1, 1, true) local body1 = love.physics.newBody(world, 10, 10, 'static') local body2 = love.physics.newBody(world, 20, 20, 'static') local obj = love.physics.newPrismaticJoint(body1, body2, 10, 10, 20, 20, true) test:assertObject(obj) end -- love.physics.newPulleyJoint -- @NOTE this is just basic nil checking, objs have their own test method love.test.physics.newPulleyJoint = function(test) local world = love.physics.newWorld(1, 1, true) local body1 = love.physics.newBody(world, 10, 10, 'static') local body2 = love.physics.newBody(world, 20, 20, 'static') local obj = love.physics.newPulleyJoint(body1, body2, 10, 10, 20, 20, 15, 15, 25, 25, 1, true) test:assertObject(obj) end -- love.physics.newRectangleShape -- @NOTE this is just basic nil checking, objs have their own test method love.test.physics.newRectangleShape = function(test) local world = love.physics.newWorld(1, 1, true) local body = love.physics.newBody(world, 10, 10, 'static') local shape1 = love.physics.newRectangleShape(body, 10, 20) local shape2 = love.physics.newRectangleShape(body, 10, 10, 40, 30, 10) test:assertObject(shape1) test:assertObject(shape2) end -- love.physics.newRevoluteJoint -- @NOTE this is just basic nil checking, objs have their own test method love.test.physics.newRevoluteJoint = function(test) local world = love.physics.newWorld(1, 1, true) local body1 = love.physics.newBody(world, 10, 10, 'static') local body2 = love.physics.newBody(world, 20, 20, 'static') local obj = love.physics.newRevoluteJoint(body1, body2, 10, 10, true) test:assertObject(obj) end -- love.physics.newRopeJoint -- @NOTE this is just basic nil checking, objs have their own test method love.test.physics.newRopeJoint = function(test) local world = love.physics.newWorld(1, 1, true) local body1 = love.physics.newBody(world, 10, 10, 'static') local body2 = love.physics.newBody(world, 20, 20, 'static') local obj = love.physics.newRopeJoint(body1, body2, 10, 10, 20, 20, 50, true) test:assertObject(obj) end -- love.physics.newWeldJoint -- @NOTE this is just basic nil checking, objs have their own test method love.test.physics.newWeldJoint = function(test) local world = love.physics.newWorld(1, 1, true) local body1 = love.physics.newBody(world, 10, 10, 'static') local body2 = love.physics.newBody(world, 20, 20, 'static') local obj = love.physics.newWeldJoint(body1, body2, 10, 10, true) test:assertObject(obj) end -- love.physics.newWheelJoint -- @NOTE this is just basic nil checking, objs have their own test method love.test.physics.newWheelJoint = function(test) local world = love.physics.newWorld(1, 1, true) local body1 = love.physics.newBody(world, 10, 10, 'static') local body2 = love.physics.newBody(world, 20, 20, 'static') local obj = love.physics.newWheelJoint(body1, body2, 10, 10, 5, 5, true) test:assertObject(obj) end -- love.physics.newWorld -- @NOTE this is just basic nil checking, objs have their own test method love.test.physics.newWorld = function(test) local world = love.physics.newWorld(1, 1, true) test:assertObject(world) end -- love.physics.setMeter love.test.physics.setMeter = function(test) -- set initial meter local world = love.physics.newWorld(1, 1, true) love.physics.setMeter(30) local body = love.physics.newBody(world, 300, 300, "dynamic") -- check changing meter changes pos value relatively love.physics.setMeter(10) local x, y = body:getPosition() test:assertEquals(100, x, 'check pos x') test:assertEquals(100, y, 'check pos y') end ================================================ FILE: testing/tests/sensor.lua ================================================ -- love.sensor -- @NOTE we can't test this module fully as it's hardware dependent -- however we can test methods do what is expected and can handle certain params -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- ------------------------------------HELPERS------------------------------------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- local function testIsEnabled(test, sensorType) love.sensor.setEnabled(sensorType, true) test:assertTrue(love.sensor.isEnabled(sensorType), 'check ' .. sensorType .. ' enabled') love.sensor.setEnabled(sensorType, false) test:assertFalse(love.sensor.isEnabled(sensorType), 'check ' .. sensorType .. ' disabled') end local function testGetName(test, sensorType) love.sensor.setEnabled(sensorType, true) local ok, name = pcall(love.sensor.getName, sensorType) test:assertTrue(ok, 'check sensor.getName("' .. sensorType .. '") success') test:assertEquals(type(name), 'string', 'check sensor.getName("' .. sensorType .. '") return value type') love.sensor.setEnabled(sensorType, false) ok, name = pcall(love.sensor.getName, sensorType) test:assertFalse(ok, 'check sensor.getName("' .. sensorType .. '") errors when disabled') end local function testGetData(test, sensorType) love.sensor.setEnabled(sensorType, true) local ok, x, y, z = pcall(love.sensor.getData, sensorType) test:assertTrue(ok, 'check sensor.getData("' .. sensorType .. '") success') if ok then test:assertNotNil(x) test:assertNotNil(y) test:assertNotNil(z) end love.sensor.setEnabled(sensorType, false) ok, x, y, z = pcall(love.sensor.getData, sensorType) test:assertFalse(ok, 'check sensor.getData("' .. sensorType .. '") errors when disabled') end -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- ------------------------------------METHODS------------------------------------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -- love.sensor.hasSensor love.test.sensor.hasSensor = function(test) -- but we can make sure that the SensorTypes can be passed local accelerometer = love.sensor.hasSensor('accelerometer') local gyroscope = love.sensor.hasSensor('gyroscope') test:assertNotNil(accelerometer) test:assertNotNil(gyroscope) end -- love.sensor.isEnabled and love.sensor.setEnabled love.test.sensor.isEnabled = function(test) local accelerometer = love.sensor.hasSensor('accelerometer') local gyroscope = love.sensor.hasSensor('gyroscope') if accelerometer or gyroscope then if accelerometer then testIsEnabled(test, 'accelerometer') end if gyroscope then testIsEnabled(test, 'gyroscope') end else test:skipTest('neither accelerometer nor gyroscope are supported in this system') end end -- love.sensor.getName love.test.sensor.getName = function(test) local accelerometer = love.sensor.hasSensor('accelerometer') local gyroscope = love.sensor.hasSensor('gyroscope') if accelerometer or gyroscope then if accelerometer then testGetName(test, 'accelerometer') end if gyroscope then testGetName(test, 'gyroscope') end else test:skipTest('neither accelerometer nor gyroscope are supported in this system') end end -- love.sensor.getData love.test.sensor.getData = function(test) local accelerometer = love.sensor.hasSensor('accelerometer') local gyroscope = love.sensor.hasSensor('gyroscope') if accelerometer or gyroscope then if accelerometer then testGetData(test, 'accelerometer') end if gyroscope then testGetData(test, 'gyroscope') end else test:skipTest('neither accelerometer nor gyroscope are supported in this system') end end ================================================ FILE: testing/tests/sound.lua ================================================ -- love.sound -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- ------------------------------------OBJECTS------------------------------------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -- Decoder (love.sound.newDecoder) love.test.sound.Decoder = function(test) -- create obj local decoder = love.sound.newDecoder('resources/click.ogg') test:assertObject(decoder) -- check bit depth test:assertMatch({8, 16}, decoder:getBitDepth(), 'check bit depth') -- check channel count test:assertMatch({1, 2}, decoder:getChannelCount(), 'check channel count') -- check duration test:assertRange(decoder:getDuration(), 0.06, 0.07, 'check duration') -- check sample rate test:assertEquals(44100, decoder:getSampleRate(), 'check sample rate') -- check makes sound data (test in method below) test:assertObject(decoder:decode()) -- check cloning sound local clone = decoder:clone() test:assertMatch({8, 16}, clone:getBitDepth(), 'check cloned bit depth') test:assertMatch({1, 2}, clone:getChannelCount(), 'check cloned channel count') test:assertRange(clone:getDuration(), 0.06, 0.07, 'check cloned duration') test:assertEquals(44100, clone:getSampleRate(), 'check cloned sample rate') end -- SoundData (love.sound.newSoundData) love.test.sound.SoundData = function(test) -- create obj local sdata = love.sound.newSoundData('resources/click.ogg') test:assertObject(sdata) -- check data size + string test:assertEquals(11708, sdata:getSize(), 'check size') test:assertNotNil(sdata:getString()) -- check bit depth test:assertMatch({8, 16}, sdata:getBitDepth(), 'check bit depth') -- check channel count test:assertMatch({1, 2}, sdata:getChannelCount(), 'check channel count') -- check duration test:assertRange(sdata:getDuration(), 0.06, 0.07, 'check duration') -- check samples test:assertEquals(44100, sdata:getSampleRate(), 'check sample rate') test:assertEquals(2927, sdata:getSampleCount(), 'check sample count') -- check cloning local clone = sdata:clone() test:assertEquals(11708, clone:getSize(), 'check clone size') test:assertNotNil(clone:getString()) test:assertMatch({8, 16}, clone:getBitDepth(), 'check clone bit depth') test:assertMatch({1, 2}, clone:getChannelCount(), 'check clone channel count') test:assertRange(clone:getDuration(), 0.06, 0.07, 'check clone duration') test:assertEquals(44100, clone:getSampleRate(), 'check clone sample rate') test:assertEquals(2927, clone:getSampleCount(), 'check clone sample count') -- check sample setting test:assertRange(sdata:getSample(0.001), -0.1, 0, 'check sample 1') test:assertRange(sdata:getSample(0.005), -0.1, 0, 'check sample 1') sdata:setSample(0.002, 1) test:assertEquals(1, sdata:getSample(0.002), 'check setting sample manually') -- check copying from another sound local copy1 = love.sound.newSoundData('resources/tone.ogg') local copy2 = love.sound.newSoundData('resources/pop.ogg') local before = copy2:getSample(0.02) copy2:copyFrom(copy1, 0.01, 1, 0.02) test:assertNotEquals(before, copy2:getSample(0.02), 'check changed') -- check slicing local count = math.floor(copy1:getSampleCount()/2) local slice = copy1:slice(0, count) test:assertEquals(count, slice:getSampleCount(), 'check slice length') end -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- ------------------------------------METHODS------------------------------------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -- love.sound.newDecoder -- @NOTE this is just basic nil checking, objs have their own test method love.test.sound.newDecoder = function(test) test:assertObject(love.sound.newDecoder('resources/click.ogg')) end -- love.sound.newSoundData -- @NOTE this is just basic nil checking, objs have their own test method love.test.sound.newSoundData = function(test) test:assertObject(love.sound.newSoundData('resources/click.ogg')) test:assertObject(love.sound.newSoundData(math.floor((1/32)*44100), 44100, 16, 1)) end ================================================ FILE: testing/tests/system.lua ================================================ -- love.system -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- ----------------------------------METHODS--------------------------------------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -- love.system.getClipboardText love.test.system.getClipboardText = function(test) -- ignore if not using window if love.test.windowmode == false then return test:skipTest('clipboard only available in window mode') end -- check clipboard value is set love.system.setClipboardText('helloworld') test:assertEquals('helloworld', love.system.getClipboardText(), 'check clipboard match') end -- love.system.getOS love.test.system.getOS = function(test) -- check os is in documented values local os = love.system.getOS() local options = {'OS X', 'Windows', 'Linux', 'Android', 'iOS'} test:assertMatch(options, os, 'check value matches') end -- love.system.getPreferredLocales love.test.system.getPreferredLocales = function(test) local locale = love.system.getPreferredLocales() test:assertNotNil(locale) test:assertEquals('table', type(locale), 'check returns table') end -- love.system.getPowerInfo love.test.system.getPowerInfo = function(test) -- check battery state is one of the documented states local state, percent, seconds = love.system.getPowerInfo() local states = {'unknown', 'battery', 'nobattery', 'charging', 'charged'} test:assertMatch(states, state, 'check value matches') -- if percent/seconds check within expected range if percent ~= nil then test:assertRange(percent, 0, 100, 'check battery percent within range') end if seconds ~= nil then test:assertNotNil(seconds) end end -- love.system.getProcessorCount love.test.system.getProcessorCount = function(test) test:assertNotNil(love.system.getProcessorCount()) -- youd hope right end -- love.system.getMemorySize love.test.system.getMemorySize = function(test) test:assertNotNil(love.system.getMemorySize()) end -- love.system.hasBackgroundMusic love.test.system.hasBackgroundMusic = function(test) test:assertNotNil(love.system.hasBackgroundMusic()) end -- love.system.openURL love.test.system.openURL = function(test) test:skipTest('cant test this worked') --test:assertNotEquals(nil, love.system.openURL('https://love2d.org'), 'check open URL') end -- love.system.getClipboardText love.test.system.setClipboardText = function(test) -- ignore if not using window if love.test.windowmode == false then return test:skipTest('clipboard only available in window mode') end -- check value returned is what was set love.system.setClipboardText('helloworld') test:assertEquals('helloworld', love.system.getClipboardText(), 'check set text') end -- love.system.vibrate -- @NOTE cant really test this love.test.system.vibrate = function(test) test:skipTest('cant test this worked') end ================================================ FILE: testing/tests/thread.lua ================================================ -- love.thread -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- ----------------------------------OBJECTS--------------------------------------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -- Channel (love.thread.newChannel) love.test.thread.Channel = function(test) -- create channel local channel = love.thread.getChannel('test') test:assertObject(channel) -- setup thread to use local threadcode1 = [[ require("love.timer") love.timer.sleep(0.1) love.thread.getChannel('test'):push('hello world') love.timer.sleep(0.1) love.thread.getChannel('test'):push('me again') ]] local thread1 = love.thread.newThread(threadcode1) thread1:start() -- check message sent from thread to channel local msg1 = channel:demand() test:assertEquals('hello world', msg1, 'check 1st message was sent') thread1:wait() test:assertEquals(1, channel:getCount(), 'check still another message') test:assertEquals('me again', channel:peek(), 'check 2nd message pending') local msg2 = channel:pop() test:assertEquals('me again', msg2, 'check 2nd message was sent') channel:clear() -- setup another thread for some ping pong local threadcode2 = [[ local function setChannel(channel, value) channel:clear() return channel:push(value) end local channel = love.thread.getChannel('test') local waiting = true local sent = nil while waiting == true do if sent == nil then sent = channel:performAtomic(setChannel, 'ping') end if channel:hasRead(sent) then local msg = channel:demand() if msg == 'pong' then channel:push(msg) waiting = false end end end ]] -- first we run a thread that will send 1 ping local thread2 = love.thread.newThread(threadcode2) thread2:start() -- we wait for that ping to be sent and then send a pong back local msg3 = channel:demand() test:assertEquals('ping', msg3, 'check message recieved 1') -- thread should be waiting for us, and checking is the ping was read channel:supply('pong', 1) -- if it was then it should send back our pong and thread should die thread2:wait() local msg4 = channel:pop() test:assertEquals('pong', msg4, 'check message recieved 2') test:assertEquals(0, channel:getCount()) end -- Thread (love.thread.newThread) love.test.thread.Thread = function(test) -- create thread local threadcode = [[ local b = 0 for a=1,100000 do b = b + a end ]] local thread = love.thread.newThread(threadcode) test:assertObject(thread) -- check thread runs thread:start() test:assertTrue(thread:isRunning(), 'check started') thread:wait() test:assertFalse(thread:isRunning(), 'check finished') test:assertEquals(nil, thread:getError(), 'check no errors') -- check an invalid thread local badthreadcode = 'local b = 0\nreturn b + "string" .. 10' local badthread = love.thread.newThread(badthreadcode) badthread:start() badthread:wait() test:assertNotNil(badthread:getError()) end -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- ----------------------------------METHODS--------------------------------------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -- love.thread.getChannel -- @NOTE this is just basic nil checking, objs have their own test method love.test.thread.getChannel = function(test) test:assertObject(love.thread.getChannel('test')) end -- love.thread.newChannel -- @NOTE this is just basic nil checking, objs have their own test method love.test.thread.newChannel = function(test) test:assertObject(love.thread.newChannel()) end -- love.thread.newThread -- @NOTE this is just basic nil checking, objs have their own test method love.test.thread.newThread = function(test) test:assertObject(love.thread.newThread('classes/TestSuite.lua')) end ================================================ FILE: testing/tests/timer.lua ================================================ -- love.timer -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- ----------------------------------METHODS--------------------------------------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -- love.timer.getAverageDelta -- @NOTE not sure if you could reliably get a specific delta? love.test.timer.getAverageDelta = function(test) test:assertNotNil(love.timer.getAverageDelta()) end -- love.timer.getDelta -- @NOTE not sure if you could reliably get a specific delta? love.test.timer.getDelta = function(test) test:assertNotNil(love.timer.getDelta()) end -- love.timer.getFPS -- @NOTE not sure if you could reliably get a specific FPS? love.test.timer.getFPS = function(test) test:assertNotNil(love.timer.getFPS()) end -- love.timer.getTime love.test.timer.getTime = function(test) local starttime = love.timer.getTime() love.timer.sleep(0.1) local endtime = love.timer.getTime() - starttime test:assertRange(endtime, 0.05, 1, 'check 0.1s passes') end -- love.timer.sleep love.test.timer.sleep = function(test) local starttime = love.timer.getTime() love.timer.sleep(0.1) test:assertRange(love.timer.getTime() - starttime, 0.05, 1, 'check 0.1s passes') end -- love.timer.step -- @NOTE not sure if you could reliably get a specific step val? love.test.timer.step = function(test) test:assertNotNil(love.timer.step()) end ================================================ FILE: testing/tests/touch.lua ================================================ -- love.touch -- @NOTE we can't test this module fully as it's hardware dependent -- however we can test methods do what is expected and can handle certain params -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- ------------------------------------METHODS------------------------------------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -- love.touch.getPosition -- @TODO is there a way to fake the touchid pointer? love.test.touch.getPosition = function(test) test:assertNotNil(love.touch.getPosition) test:assertEquals('function', type(love.touch.getPosition)) end -- love.touch.getPressure -- @TODO is there a way to fake the touchid pointer? love.test.touch.getPressure = function(test) test:assertNotNil(love.touch.getPressure) test:assertEquals('function', type(love.touch.getPressure)) end -- love.touch.getTouches love.test.touch.getTouches = function(test) test:assertEquals('function', type(love.touch.getTouches)) end ================================================ FILE: testing/tests/video.lua ================================================ -- love.video -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- ----------------------------------OBJECTS--------------------------------------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -- VideoStream (love.thread.newVideoStream) love.test.video.VideoStream = function(test) -- create obj local video = love.video.newVideoStream('resources/sample.ogv') test:assertObject(video) -- check def properties test:assertEquals('resources/sample.ogv', video:getFilename(), 'check filename') test:assertFalse(video:isPlaying(), 'check not playing by def') -- check playing and pausing states video:play() test:assertTrue(video:isPlaying(), 'check now playing') video:seek(0.3) test:assertRange(video:tell(), 0.3, 0.4, 'check seek/tell') video:rewind() test:assertRange(video:tell(), 0, 0.1, 'check rewind') video:pause() test:assertFalse(video:isPlaying(), 'check paused') end -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- ----------------------------------METHODS--------------------------------------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -- love.video.newVideoStream -- @NOTE this is just basic nil checking, objs have their own test method love.test.video.newVideoStream = function(test) test:assertObject(love.video.newVideoStream('resources/sample.ogv')) end ================================================ FILE: testing/tests/window.lua ================================================ -- love.window -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- ----------------------------------METHODS--------------------------------------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -- love.window.focus love.test.window.focus = function(test) -- cant test as doesnt return anything test:assertEquals('function', type(love.window.focus), 'check method exists') end -- love.window.fromPixels love.test.window.fromPixels = function(test) -- check dpi/pixel ratio as expected local dpi = love.window.getDPIScale() local pixels = love.window.fromPixels(100) test:assertEquals(100/dpi, pixels, 'check dpi ratio') end -- love.window.getDPIScale -- @NOTE dependent on hardware so best can do is not nil love.test.window.getDPIScale = function(test) test:assertNotNil(test) end -- love.window.getDesktopDimensions -- @NOTE dependent on hardware so best can do is not nil love.test.window.getDesktopDimensions = function(test) local w, h = love.window.getDesktopDimensions() test:assertNotNil(w) test:assertNotNil(h) end -- love.window.getDisplayCount -- @NOTE cant wait for the test suite to be run headless and fail here love.test.window.getDisplayCount = function(test) test:assertGreaterEqual(1, love.window.getDisplayCount(), 'check 1 display') end -- love.window.getDisplayName -- @NOTE dependent on hardware so best can do is not nil love.test.window.getDisplayName = function(test) test:assertNotNil(love.window.getDisplayName(1)) end -- love.window.getDisplayOrientation -- @NOTE dependent on hardware so best can do is not nil love.test.window.getDisplayOrientation = function(test) test:assertNotNil(love.window.getDisplayOrientation(1)) end -- love.window.getFullscreen love.test.window.getFullscreen = function(test) if GITHUB_RUNNER and test:isOS('Linux') then return test:skipTest("xvfb on Linux doesn't support fullscreen") end -- check not fullscreen to start test:assertFalse(love.window.getFullscreen(), 'check not fullscreen') love.window.setFullscreen(true) -- check now fullscreen test:assertTrue(love.window.getFullscreen(), 'check now fullscreen') love.window.setFullscreen(false) -- reset end -- love.window.getFullscreenModes -- @NOTE dependent on hardware so best can do is not nil love.test.window.getFullscreenModes = function(test) test:assertNotNil(love.window.getFullscreenModes(1)) end -- love.window.getIcon love.test.window.getIcon = function(test) -- check icon nil by default if not set test:assertEquals(nil, love.window.getIcon(), 'check nil by default') local icon = love.image.newImageData('resources/love.png') -- check getting icon not nil after setting love.window.setIcon(icon) test:assertNotNil(love.window.getIcon()) end -- love.window.getMode -- @NOTE could prob add more checks on the flags here based on conf.lua love.test.window.getMode = function(test) local w, h, flags = love.window.getMode() test:assertEquals(360, w, 'check w') test:assertEquals(240, h, 'check h') test:assertFalse(flags["fullscreen"], 'check fullscreen') end -- love.window.getPosition -- @NOTE anything we could check display index agaisn't in getPosition return? love.test.window.getPosition = function(test) love.window.setPosition(100, 100, 1) local x, y, _ = love.window.getPosition() test:assertEquals(100, x, 'check position x') test:assertEquals(100, y, 'check position y') end -- love.window.getSafeArea -- @NOTE dependent on hardware so best can do is not nil love.test.window.getSafeArea = function(test) local x, y, w, h = love.window.getSafeArea() test:assertNotNil(x) test:assertNotNil(y) test:assertNotNil(w) test:assertNotNil(h) end -- love.window.getTitle love.test.window.getTitle = function(test) -- check title returned is what was set love.window.setTitle('love.testing') test:assertEquals('love.testing', love.window.getTitle(), 'check title match') love.window.setTitle('love.test') end -- love.window.getVSync love.test.window.getVSync = function(test) test:assertNotNil(love.window.getVSync()) end -- love.window.hasFocus -- @NOTE cant really test as cant force focus love.test.window.hasFocus = function(test) test:assertNotNil(love.window.hasFocus()) end -- love.window.hasMouseFocus -- @NOTE cant really test as cant force focus love.test.window.hasMouseFocus = function(test) test:assertNotNil(love.window.hasMouseFocus()) end -- love.window.isDisplaySleepEnabled love.test.window.isDisplaySleepEnabled = function(test) test:assertNotNil(love.window.isDisplaySleepEnabled()) -- check disabled love.window.setDisplaySleepEnabled(false) test:assertFalse(love.window.isDisplaySleepEnabled(), 'check sleep disabled') -- check enabled love.window.setDisplaySleepEnabled(true) test:assertTrue(love.window.isDisplaySleepEnabled(), 'check sleep enabled') end -- love.window.isMaximized love.test.window.isMaximized = function(test) if GITHUB_RUNNER and test:isOS('Linux') then return test:skipTest("xvfb on Linux doesn't support window maximization") end test:assertFalse(love.window.isMaximized(), 'check window not maximized') love.window.maximize() test:waitFrames(10) -- on MACOS maximize wont get recognised immedietely so wait a few frames test:assertTrue(love.window.isMaximized(), 'check window now maximized') love.window.restore() end -- love.window.isMinimized love.test.window.isMinimized = function(test) if GITHUB_RUNNER and test:isOS('Linux') then return test:skipTest("xvfb on Linux doesn't support window minimization") end -- check not minimized to start test:assertFalse(love.window.isMinimized(), 'check window not minimized') -- try to minimize love.window.minimize() test:waitFrames(10) -- on linux minimize won't get recognized immediately, so wait a few frames test:assertTrue(love.window.isMinimized(), 'check window minimized') love.window.restore() end -- love.window.isOccluded love.test.window.isOccluded = function(test) love.window.focus() test:assertFalse(love.window.isOccluded(), 'check window not occluded') end -- love.window.isOpen love.test.window.isOpen = function(test) -- check open initially test:assertTrue(love.window.isOpen(), 'check window open') -- we check closing in test.window.close end -- love.window.isVisible love.test.window.isVisible = function(test) -- check visible initially test:assertTrue(love.window.isVisible(), 'check window visible') end -- love.window.maximize love.test.window.maximize = function(test) if GITHUB_RUNNER and test:isOS('Linux') then return test:skipTest("xvfb on Linux doesn't support window maximization") end test:assertFalse(love.window.isMaximized(), 'check window not maximized') -- check maximizing is set love.window.maximize() test:waitFrames(10) -- on macos we need to wait a few frames test:assertTrue(love.window.isMaximized(), 'check window maximized') love.window.restore() end -- love.window.minimize love.test.window.minimize = function(test) if GITHUB_RUNNER and test:isOS('Linux') then return test:skipTest("xvfb on Linux doesn't support window minimization") end test:assertFalse(love.window.isMinimized(), 'check window not minimized') -- check minimizing is set love.window.minimize() test:waitFrames(10) -- on linux we need to wait a few frames test:assertTrue(love.window.isMinimized(), 'check window maximized') love.window.restore() end -- love.window.requestAttention love.test.window.requestAttention = function(test) test:skipTest('cant test this worked') end -- love.window.restore love.test.window.restore = function(test) if GITHUB_RUNNER and test:isOS('Linux') then return test:skipTest("xvfb on Linux doesn't support window minimization") end -- check minimized to start love.window.minimize() test:waitFrames(10) love.window.restore() test:waitFrames(10) -- check restoring the state of the window test:assertFalse(love.window.isMinimized(), 'check window restored') end -- love.window.setDisplaySleepEnabled love.test.window.setDisplaySleepEnabled = function(test) -- check disabling sleep love.window.setDisplaySleepEnabled(false) test:assertFalse(love.window.isDisplaySleepEnabled(), 'check sleep disabled') -- check setting it back to enabled love.window.setDisplaySleepEnabled(true) test:assertTrue(love.window.isDisplaySleepEnabled(), 'check sleep enabled') end -- love.window.setFullscreen love.test.window.setFullscreen = function(test) if GITHUB_RUNNER and test:isOS('Linux') then return test:skipTest("xvfb on Linux doesn't support fullscreen") end -- check fullscreen is set love.window.setFullscreen(true) test:assertTrue(love.window.getFullscreen(), 'check fullscreen') -- check setting back to normal love.window.setFullscreen(false) test:assertFalse(love.window.getFullscreen(), 'check not fullscreen') end -- love.window.setIcon -- @NOTE could check the image data itself? love.test.window.setIcon = function(test) -- check setting an icon returns the val local icon = love.image.newImageData('resources/love.png') love.window.setIcon(icon) test:assertNotEquals(nil, love.window.getIcon(), 'check icon not nil') end -- love.window.setMode -- @NOTE same as getMode could be checking more flag properties love.test.window.setMode = function(test) -- set window mode love.window.setMode(512, 512, { fullscreen = false, resizable = false }) -- check what we set is returned local width, height, flags = love.window.getMode() test:assertEquals(512, width, 'check window w match') test:assertEquals(512, height, 'check window h match') test:assertFalse(flags["fullscreen"], 'check window not fullscreen') test:assertFalse(flags["resizable"], 'check window not resizeable') love.window.setMode(360, 240, { fullscreen = false, resizable = true }) end -- love.window.setPosition love.test.window.setPosition = function(test) -- check position is returned love.window.setPosition(100, 100, 1) test:waitFrames(10) local x, y, _ = love.window.getPosition() test:assertEquals(100, x, 'check position x') test:assertEquals(100, y, 'check position y') end -- love.window.setTitle love.test.window.setTitle = function(test) -- check setting title val is returned love.window.setTitle('love.testing') test:assertEquals('love.testing', love.window.getTitle(), 'check title matches') love.window.setTitle('love.test') end -- love.window.setVSync love.test.window.setVSync = function(test) love.window.setVSync(0) test:assertNotNil(love.window.getVSync()) end -- love.window.showMessageBox -- @NOTE if running headless would need to skip anyway cos can't press it love.test.window.showMessageBox = function(test) test:skipTest('cant test this worked') end -- love.window.toPixels love.test.window.toPixels = function(test) -- check dpi/pixel ratio is as expected local dpi = love.window.getDPIScale() local pixels = love.window.toPixels(50) test:assertEquals(50*dpi, pixels, 'check dpi ratio') end -- love.window.updateMode love.test.window.updateMode = function(test) -- set initial mode love.window.setMode(512, 512, { fullscreen = false, resizable = false }) -- update mode with some props but not others love.window.updateMode(360, 240, nil) -- check only changed values changed local width, height, flags = love.window.getMode() test:assertEquals(360, width, 'check window w match') test:assertEquals(240, height, 'check window h match') test:assertFalse(flags["fullscreen"], 'check window not fullscreen') test:assertFalse(flags["resizable"], 'check window not resizeable') love.window.setMode(360, 240, { -- reset fullscreen = false, resizable = true }) -- test different combinations of the backbuffer depth/stencil buffer. test:waitFrames(1) love.window.updateMode(360, 240, {depth = false, stencil = false}) test:waitFrames(1) love.window.updateMode(360, 240, {depth = true, stencil = true}) test:waitFrames(1) love.window.updateMode(360, 240, {depth = true, stencil = false}) test:waitFrames(1) love.window.updateMode(360, 240, {depth = false, stencil = true}) end ================================================ FILE: testing/todo.md ================================================ # TODO These are all the outstanding methods that require test coverage, along with a few bits that still need doing / discussion. ## General - ability to test loading different combinations of modules if needed? - check expected behaviour of mount + unmount with common path try uncommenting love.filesystem.unmountCommonPath and you'll see the issues - revisit love.audio.setPlaybackDevice when we update openal soft for MacOS ## Graphics - love.graphics.copyBuffer() - love.graphics.copyBufferToTexture() - love.graphics.copyTextureToBuffer() - love.graphics.readbackTexture() - love.graphics.readbackTextureAsync() - love.graphics.readbackBuffer() - love.graphics.readbackBufferAsync() - love.graphics.newComputeShader() - love.graphics.dispatchThreadgroups() - love.graphics.dispatchIndirect() - love.graphics.drawFromShader() - love.graphics.drawFromShaderIndirect() - love.graphics.drawIndirect() - love.graphics.getQuadIndexBuffer() - love.graphics.setBlendState() - love.graphics.resetProjection() - love.graphics.Mesh:getAttachedAttributes() - love.graphics.Shader:hasStage()